1&&arguments[1]!==void 0?arguments[1]:!1,n={map:this.cache};return t.forEach(i=>{var a;n?n=(a=n==null?void 0:n.map)===null||a===void 0?void 0:a.get(i):n=void 0}),n!=null&&n.value&&r&&(n.value[1]=this.cacheCallTimes++),n==null?void 0:n.value}get(t){var r;return(r=this.internalGet(t,!0))===null||r===void 0?void 0:r[0]}has(t){return!!this.internalGet(t)}set(t,r){if(!this.has(t)){if(this.size()+1>yp.MAX_CACHE_SIZE+yp.MAX_CACHE_OFFSET){const[i]=this.keys.reduce((a,o)=>{const[,s]=a;return this.internalGet(o)[1]{if(a===t.length-1)n.set(i,{value:[r,this.cacheCallTimes++]});else{const o=n.get(i);o?o.map||(o.map=new Map):n.set(i,{map:new Map}),n=n.get(i).map}})}deleteByPath(t,r){var n;const i=t.get(r[0]);if(r.length===1)return i.map?t.set(r[0],{map:i.map}):t.delete(r[0]),(n=i.value)===null||n===void 0?void 0:n[0];const a=this.deleteByPath(i.map,r.slice(1));return(!i.map||i.map.size===0)&&!i.value&&t.delete(r[0]),a}delete(t){if(this.has(t))return this.keys=this.keys.filter(r=>!Zne(r,t)),this.deleteByPath(this.cache,t)}}yp.MAX_CACHE_SIZE=20;yp.MAX_CACHE_OFFSET=5;let PR={};function Xne(e,t){}function Kne(e,t,r){!t&&!PR[r]&&(PR[r]=!0)}function Yne(e,t){Kne(Xne,e,t)}function Jne(){}let g$=Jne,AR=0;class y${constructor(t){this.derivatives=Array.isArray(t)?t:[t],this.id=AR,t.length===0&&g$(t.length>0),AR+=1}getDerivativeToken(t){return this.derivatives.reduce((r,n)=>n(t,r),void 0)}}const d2=new yp;function _$(e){const t=Array.isArray(e)?e:[e];return d2.has(t)||d2.set(t,new y$(t)),d2.get(t)}const IR=new WeakMap;function wb(e){let t=IR.get(e)||"";return t||(Object.keys(e).forEach(r=>{const n=e[r];t+=r,n instanceof y$?t+=n.id:n&&typeof n=="object"?t+=wb(n):t+=n}),IR.set(e,t)),t}function Qne(e,t){return qI(`${t}_${wb(e)}`)}const bg=`random-${Date.now()}-${Math.random()}`.replace(/\./g,""),b$="_bAmBoO_";function eie(e,t,r){var n,i;if(jp()){xb(e,bg);const a=document.createElement("div");a.style.position="fixed",a.style.left="0",a.style.top="0",t==null||t(a),document.body.appendChild(a);const o=r?r(a):(n=getComputedStyle(a).content)===null||n===void 0?void 0:n.includes(b$);return(i=a.parentNode)===null||i===void 0||i.removeChild(a),v$(bg),o}return!1}let p2;function tie(){return p2===void 0&&(p2=eie(`@layer ${bg} { .${bg} { content: "${b$}"!important; } }`,e=>{e.className=bg})),p2}const ER={},rie=!0,nie=!1,iie=!rie&&!nie?"css-dev-only-do-not-override":"css",Mh=new Map;function aie(e){Mh.set(e,(Mh.get(e)||0)+1)}function oie(e,t){typeof document<"u"&&document.querySelectorAll(`style[${l$}="${e}"]`).forEach(n=>{var i;n[Fd]===t&&((i=n.parentNode)===null||i===void 0||i.removeChild(n))})}const sie=0;function lie(e,t){Mh.set(e,(Mh.get(e)||0)-1);const r=Array.from(Mh.keys()),n=r.filter(i=>(Mh.get(i)||0)<=0);r.length-n.length>sie&&n.forEach(i=>{oie(i,t),Mh.delete(i)})}const uie=(e,t,r,n)=>{const i=r.getDerivativeToken(e);let a=Be(Be({},i),t);return n&&(a=n(a)),a};function cie(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Qt({});const n=jx(),i=Le(()=>Be({},...t.value)),a=Le(()=>wb(i.value)),o=Le(()=>wb(r.value.override||ER));return h$("token",Le(()=>[r.value.salt||"",e.value.id,a.value,o.value]),()=>{const{salt:c="",override:d=ER,formatToken:m,getComputedToken:v}=r.value,y=v?v(i.value,d,e.value):uie(i.value,d,e.value,m),_=Qne(y,c);y._tokenKey=_,aie(_);const S=`${iie}-${qI(_)}`;return y._hashId=S,[y,S]},c=>{var d;lie(c[0]._tokenKey,(d=n.value)===null||d===void 0?void 0:d.cache.instanceId)})}var hie={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},x$="comm",w$="rule",S$="decl",fie="@import",die="@keyframes",pie="@layer",T$=Math.abs,ZI=String.fromCharCode;function C$(e){return e.trim()}function E1(e,t,r){return e.replace(t,r)}function mie(e,t,r){return e.indexOf(t,r)}function ry(e,t){return e.charCodeAt(t)|0}function ny(e,t,r){return e.slice(t,r)}function Fl(e){return e.length}function vie(e){return e.length}function b0(e,t){return t.push(e),e}var Ux=1,_p=1,P$=0,zo=0,ai=0,Hp="";function XI(e,t,r,n,i,a,o,s){return{value:e,root:t,parent:r,type:n,props:i,children:a,line:Ux,column:_p,length:o,return:"",siblings:s}}function gie(){return ai}function yie(){return ai=zo>0?ry(Hp,--zo):0,_p--,ai===10&&(_p=1,Ux--),ai}function ls(){return ai=zo2||eP(ai)>3?"":" "}function wie(e,t){for(;--t&&ls()&&!(ai<48||ai>102||ai>57&&ai<65||ai>70&&ai<97););return Gx(e,M1()+(t<6&&Gh()==32&&ls()==32))}function tP(e){for(;ls();)switch(ai){case e:return zo;case 34:case 39:e!==34&&e!==39&&tP(ai);break;case 40:e===41&&tP(e);break;case 92:ls();break}return zo}function Sie(e,t){for(;ls()&&e+ai!==57;)if(e+ai===84&&Gh()===47)break;return"/*"+Gx(t,zo-1)+"*"+ZI(e===47?e:ls())}function Tie(e){for(;!eP(Gh());)ls();return Gx(e,zo)}function Cie(e){return bie(D1("",null,null,null,[""],e=_ie(e),0,[0],e))}function D1(e,t,r,n,i,a,o,s,c){for(var d=0,m=0,v=o,y=0,_=0,S=0,I=1,E=1,M=1,L=0,R="",$=i,G=a,j=n,H=R;E;)switch(S=L,L=ls()){case 40:if(S!=108&&ry(H,v-1)==58){mie(H+=E1(m2(L),"&","&\f"),"&\f",T$(d?s[d-1]:0))!=-1&&(M=-1);break}case 34:case 39:case 91:H+=m2(L);break;case 9:case 10:case 13:case 32:H+=xie(S);break;case 92:H+=wie(M1()-1,7);continue;case 47:switch(Gh()){case 42:case 47:b0(Pie(Sie(ls(),M1()),t,r,c),c);break;default:H+="/"}break;case 123*I:s[d++]=Fl(H)*M;case 125*I:case 59:case 0:switch(L){case 0:case 125:E=0;case 59+m:M==-1&&(H=E1(H,/\f/g,"")),_>0&&Fl(H)-v&&b0(_>32?DR(H+";",n,r,v-1,c):DR(E1(H," ","")+";",n,r,v-2,c),c);break;case 59:H+=";";default:if(b0(j=MR(H,t,r,d,m,i,s,R,$=[],G=[],v,a),a),L===123)if(m===0)D1(H,t,j,j,$,a,v,s,G);else switch(y===99&&ry(H,3)===110?100:y){case 100:case 108:case 109:case 115:D1(e,j,j,n&&b0(MR(e,j,j,0,0,i,s,R,i,$=[],v,G),G),i,G,v,s,n?$:G);break;default:D1(H,j,j,j,[""],G,0,s,G)}}d=m=_=0,I=M=1,R=H="",v=o;break;case 58:v=1+Fl(H),_=S;default:if(I<1){if(L==123)--I;else if(L==125&&I++==0&&yie()==125)continue}switch(H+=ZI(L),L*I){case 38:M=m>0?1:(H+="\f",-1);break;case 44:s[d++]=(Fl(H)-1)*M,M=1;break;case 64:Gh()===45&&(H+=m2(ls())),y=Gh(),m=v=Fl(R=H+=Tie(M1())),L++;break;case 45:S===45&&Fl(H)==2&&(I=0)}}return a}function MR(e,t,r,n,i,a,o,s,c,d,m,v){for(var y=i-1,_=i===0?a:[""],S=vie(_),I=0,E=0,M=0;I0?_[L]+" "+R:E1(R,/&\f/g,_[L])))&&(c[M++]=$);return XI(e,t,r,i===0?w$:s,c,d,m,v)}function Pie(e,t,r,n){return XI(e,t,r,x$,ZI(gie()),ny(e,2,-2),0,n)}function DR(e,t,r,n,i){return XI(e,t,r,S$,ny(e,0,n),ny(e,n+1,-1),n,i)}function rP(e,t){for(var r="",n=0;n{const[a,o]=i.split(":");Wh[a]=o});const n=document.querySelector(`style[${LR}]`);n&&(A$=!1,(e=n.parentNode)===null||e===void 0||e.removeChild(n)),document.body.removeChild(t)}}function Mie(e){return Eie(),!!Wh[e]}function Die(e){const t=Wh[e];let r=null;if(t&&jp())if(A$)r=Iie;else{const n=document.querySelector(`style[${Uh}="${Wh[e]}"]`);n?r=n.innerHTML:delete Wh[e]}return[r,t]}const kR=jp(),Lie="_skip_check_",I$="_multi_value_";function RR(e){return rP(Cie(e),Aie).replace(/\{%%%\:[^;];}/g,";")}function kie(e){return typeof e=="object"&&e&&(Lie in e||I$ in e)}function Rie(e,t,r){if(!t)return e;const n=`.${t}`,i=r==="low"?`:where(${n})`:n;return e.split(",").map(o=>{var s;const c=o.trim().split(/\s+/);let d=c[0]||"";const m=((s=d.match(/^\w+/))===null||s===void 0?void 0:s[0])||"";return d=`${m}${i}${d.slice(m.length)}`,[d,...c.slice(1)].join(" ")}).join(",")}const OR=new Set,nP=function(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{root:r,injectHash:n,parentSelectors:i}=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{root:!0,parentSelectors:[]};const{hashId:a,layer:o,path:s,hashPriority:c,transformers:d=[],linters:m=[]}=t;let v="",y={};function _(E){const M=E.getName(a);if(!y[M]){const[L]=nP(E.style,t,{root:!1,parentSelectors:i});y[M]=`@keyframes ${E.getName(a)}${L}`}}function S(E){let M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return E.forEach(L=>{Array.isArray(L)?S(L,M):L&&M.push(L)}),M}if(S(Array.isArray(e)?e:[e]).forEach(E=>{const M=typeof E=="string"&&!r?{}:E;if(typeof M=="string")v+=`${M}
+`;else if(M._keyframe)_(M);else{const L=d.reduce((R,$)=>{var G;return((G=$==null?void 0:$.visit)===null||G===void 0?void 0:G.call($,R))||R},M);Object.keys(L).forEach(R=>{var $;const G=L[R];if(typeof G=="object"&&G&&(R!=="animationName"||!G._keyframe)&&!kie(G)){let j=!1,H=R.trim(),Z=!1;(r||n)&&a?H.startsWith("@")?j=!0:H=Rie(R,a,c):r&&!a&&(H==="&"||H==="")&&(H="",Z=!0);const[Q,ee]=nP(G,t,{root:Z,injectHash:j,parentSelectors:[...i,H]});y=Be(Be({},y),ee),v+=`${H}${Q}`}else{let j=function(Z,Q){const ee=Z.replace(/[A-Z]/g,ie=>`-${ie.toLowerCase()}`);let ne=Q;!hie[Z]&&typeof ne=="number"&&ne!==0&&(ne=`${ne}px`),Z==="animationName"&&(Q!=null&&Q._keyframe)&&(_(Q),ne=Q.getName(a)),v+=`${ee}:${ne};`};const H=($=G==null?void 0:G.value)!==null&&$!==void 0?$:G;typeof G=="object"&&(G!=null&&G[I$])&&Array.isArray(H)?H.forEach(Z=>{j(R,Z)}):j(R,H)}})}}),!r)v=`{${v}}`;else if(o&&tie()){const E=o.split(",");v=`@layer ${E[E.length-1].trim()} {${v}}`,E.length>1&&(v=`@layer ${o}{%%%:%}${v}`)}return[v,y]};function Oie(e,t){return qI(`${e.join("%")}${t}`)}function iP(e,t){const r=jx(),n=Le(()=>e.value.token._tokenKey),i=Le(()=>[n.value,...e.value.path]);let a=kR;return h$("style",i,()=>{const{path:o,hashId:s,layer:c,nonce:d,clientOnly:m,order:v=0}=e.value,y=i.value.join("|");if(Mie(y)){const[H,Z]=Die(y);if(H)return[H,n.value,Z,{},m,v]}const _=t(),{hashPriority:S,container:I,transformers:E,linters:M,cache:L}=r.value,[R,$]=nP(_,{hashId:s,hashPriority:S,layer:c,path:o.join("-"),transformers:E,linters:M}),G=RR(R),j=Oie(i.value,G);if(a){const H={mark:Uh,prepend:"queue",attachTo:I,priority:v},Z=typeof d=="function"?d():d;Z&&(H.csp={nonce:Z});const Q=xb(G,j,H);Q[Fd]=L.instanceId,Q.setAttribute(l$,n.value),Object.keys($).forEach(ee=>{OR.has(ee)||(OR.add(ee),xb(RR($[ee]),`_effect-${ee}`,{mark:Uh,prepend:"queue",attachTo:I}))})}return[G,n.value,j,$,m,v]},(o,s)=>{let[,,c]=o;(s||r.value.autoClear)&&kR&&v$(c,{mark:Uh})}),o=>o}class qh{constructor(t,r){this._keyframe=!0,this.name=t,this.style=r}getName(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return t?`${t}-${this.name}`:this.name}}const zie="4.2.3";function $i(e,t){Bie(e)&&(e="100%");var r=Fie(e);return e=t===360?e:Math.min(t,Math.max(0,parseFloat(e))),r&&(e=parseInt(String(e*t),10)/100),Math.abs(e-t)<1e-6?1:(t===360?e=(e<0?e%t+t:e%t)/parseFloat(String(t)):e=e%t/parseFloat(String(t)),e)}function x0(e){return Math.min(1,Math.max(0,e))}function Bie(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function Fie(e){return typeof e=="string"&&e.indexOf("%")!==-1}function E$(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function w0(e){return e<=1?"".concat(Number(e)*100,"%"):e}function zh(e){return e.length===1?"0"+e:String(e)}function $ie(e,t,r){return{r:$i(e,255)*255,g:$i(t,255)*255,b:$i(r,255)*255}}function zR(e,t,r){e=$i(e,255),t=$i(t,255),r=$i(r,255);var n=Math.max(e,t,r),i=Math.min(e,t,r),a=0,o=0,s=(n+i)/2;if(n===i)o=0,a=0;else{var c=n-i;switch(o=s>.5?c/(2-n-i):c/(n+i),n){case e:a=(t-r)/c+(t1&&(r-=1),r<1/6?e+(t-e)*(6*r):r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function Nie(e,t,r){var n,i,a;if(e=$i(e,360),t=$i(t,100),r=$i(r,100),t===0)i=r,a=r,n=r;else{var o=r<.5?r*(1+t):r+t-r*t,s=2*r-o;n=v2(s,o,e+1/3),i=v2(s,o,e),a=v2(s,o,e-1/3)}return{r:n*255,g:i*255,b:a*255}}function aP(e,t,r){e=$i(e,255),t=$i(t,255),r=$i(r,255);var n=Math.max(e,t,r),i=Math.min(e,t,r),a=0,o=n,s=n-i,c=n===0?0:s/n;if(n===i)a=0;else{switch(n){case e:a=(t-r)/s+(t>16,g:(e&65280)>>8,b:e&255}}var sP={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function Dd(e){var t={r:0,g:0,b:0},r=1,n=null,i=null,a=null,o=!1,s=!1;return typeof e=="string"&&(e=qie(e)),typeof e=="object"&&(Il(e.r)&&Il(e.g)&&Il(e.b)?(t=$ie(e.r,e.g,e.b),o=!0,s=String(e.r).substr(-1)==="%"?"prgb":"rgb"):Il(e.h)&&Il(e.s)&&Il(e.v)?(n=w0(e.s),i=w0(e.v),t=Vie(e.h,n,i),o=!0,s="hsv"):Il(e.h)&&Il(e.s)&&Il(e.l)&&(n=w0(e.s),a=w0(e.l),t=Nie(e.h,n,a),o=!0,s="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(r=e.a)),r=E$(r),{ok:o,format:e.format||s,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:r}}var Gie="[-\\+]?\\d+%?",Wie="[-\\+]?\\d*\\.\\d+%?",Uu="(?:".concat(Wie,")|(?:").concat(Gie,")"),g2="[\\s|\\(]+(".concat(Uu,")[,|\\s]+(").concat(Uu,")[,|\\s]+(").concat(Uu,")\\s*\\)?"),y2="[\\s|\\(]+(".concat(Uu,")[,|\\s]+(").concat(Uu,")[,|\\s]+(").concat(Uu,")[,|\\s]+(").concat(Uu,")\\s*\\)?"),es={CSS_UNIT:new RegExp(Uu),rgb:new RegExp("rgb"+g2),rgba:new RegExp("rgba"+y2),hsl:new RegExp("hsl"+g2),hsla:new RegExp("hsla"+y2),hsv:new RegExp("hsv"+g2),hsva:new RegExp("hsva"+y2),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function qie(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;var t=!1;if(sP[e])e=sP[e],t=!0;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var r=es.rgb.exec(e);return r?{r:r[1],g:r[2],b:r[3]}:(r=es.rgba.exec(e),r?{r:r[1],g:r[2],b:r[3],a:r[4]}:(r=es.hsl.exec(e),r?{h:r[1],s:r[2],l:r[3]}:(r=es.hsla.exec(e),r?{h:r[1],s:r[2],l:r[3],a:r[4]}:(r=es.hsv.exec(e),r?{h:r[1],s:r[2],v:r[3]}:(r=es.hsva.exec(e),r?{h:r[1],s:r[2],v:r[3],a:r[4]}:(r=es.hex8.exec(e),r?{r:Ja(r[1]),g:Ja(r[2]),b:Ja(r[3]),a:BR(r[4]),format:t?"name":"hex8"}:(r=es.hex6.exec(e),r?{r:Ja(r[1]),g:Ja(r[2]),b:Ja(r[3]),format:t?"name":"hex"}:(r=es.hex4.exec(e),r?{r:Ja(r[1]+r[1]),g:Ja(r[2]+r[2]),b:Ja(r[3]+r[3]),a:BR(r[4]+r[4]),format:t?"name":"hex8"}:(r=es.hex3.exec(e),r?{r:Ja(r[1]+r[1]),g:Ja(r[2]+r[2]),b:Ja(r[3]+r[3]),format:t?"name":"hex"}:!1)))))))))}function Il(e){return!!es.CSS_UNIT.exec(String(e))}var zi=function(){function e(t,r){t===void 0&&(t=""),r===void 0&&(r={});var n;if(t instanceof e)return t;typeof t=="number"&&(t=Uie(t)),this.originalInput=t;var i=Dd(t);this.originalInput=t,this.r=i.r,this.g=i.g,this.b=i.b,this.a=i.a,this.roundA=Math.round(100*this.a)/100,this.format=(n=r.format)!==null&&n!==void 0?n:i.format,this.gradientType=r.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=i.ok}return e.prototype.isDark=function(){return this.getBrightness()<128},e.prototype.isLight=function(){return!this.isDark()},e.prototype.getBrightness=function(){var t=this.toRgb();return(t.r*299+t.g*587+t.b*114)/1e3},e.prototype.getLuminance=function(){var t=this.toRgb(),r,n,i,a=t.r/255,o=t.g/255,s=t.b/255;return a<=.03928?r=a/12.92:r=Math.pow((a+.055)/1.055,2.4),o<=.03928?n=o/12.92:n=Math.pow((o+.055)/1.055,2.4),s<=.03928?i=s/12.92:i=Math.pow((s+.055)/1.055,2.4),.2126*r+.7152*n+.0722*i},e.prototype.getAlpha=function(){return this.a},e.prototype.setAlpha=function(t){return this.a=E$(t),this.roundA=Math.round(100*this.a)/100,this},e.prototype.isMonochrome=function(){var t=this.toHsl().s;return t===0},e.prototype.toHsv=function(){var t=aP(this.r,this.g,this.b);return{h:t.h*360,s:t.s,v:t.v,a:this.a}},e.prototype.toHsvString=function(){var t=aP(this.r,this.g,this.b),r=Math.round(t.h*360),n=Math.round(t.s*100),i=Math.round(t.v*100);return this.a===1?"hsv(".concat(r,", ").concat(n,"%, ").concat(i,"%)"):"hsva(".concat(r,", ").concat(n,"%, ").concat(i,"%, ").concat(this.roundA,")")},e.prototype.toHsl=function(){var t=zR(this.r,this.g,this.b);return{h:t.h*360,s:t.s,l:t.l,a:this.a}},e.prototype.toHslString=function(){var t=zR(this.r,this.g,this.b),r=Math.round(t.h*360),n=Math.round(t.s*100),i=Math.round(t.l*100);return this.a===1?"hsl(".concat(r,", ").concat(n,"%, ").concat(i,"%)"):"hsla(".concat(r,", ").concat(n,"%, ").concat(i,"%, ").concat(this.roundA,")")},e.prototype.toHex=function(t){return t===void 0&&(t=!1),oP(this.r,this.g,this.b,t)},e.prototype.toHexString=function(t){return t===void 0&&(t=!1),"#"+this.toHex(t)},e.prototype.toHex8=function(t){return t===void 0&&(t=!1),jie(this.r,this.g,this.b,this.a,t)},e.prototype.toHex8String=function(t){return t===void 0&&(t=!1),"#"+this.toHex8(t)},e.prototype.toHexShortString=function(t){return t===void 0&&(t=!1),this.a===1?this.toHexString(t):this.toHex8String(t)},e.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},e.prototype.toRgbString=function(){var t=Math.round(this.r),r=Math.round(this.g),n=Math.round(this.b);return this.a===1?"rgb(".concat(t,", ").concat(r,", ").concat(n,")"):"rgba(".concat(t,", ").concat(r,", ").concat(n,", ").concat(this.roundA,")")},e.prototype.toPercentageRgb=function(){var t=function(r){return"".concat(Math.round($i(r,255)*100),"%")};return{r:t(this.r),g:t(this.g),b:t(this.b),a:this.a}},e.prototype.toPercentageRgbString=function(){var t=function(r){return Math.round($i(r,255)*100)};return this.a===1?"rgb(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%)"):"rgba(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%, ").concat(this.roundA,")")},e.prototype.toName=function(){if(this.a===0)return"transparent";if(this.a<1)return!1;for(var t="#"+oP(this.r,this.g,this.b,!1),r=0,n=Object.entries(sP);r=0,a=!r&&i&&(t.startsWith("hex")||t==="name");return a?t==="name"&&this.a===0?this.toName():this.toRgbString():(t==="rgb"&&(n=this.toRgbString()),t==="prgb"&&(n=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(n=this.toHexString()),t==="hex3"&&(n=this.toHexString(!0)),t==="hex4"&&(n=this.toHex8String(!0)),t==="hex8"&&(n=this.toHex8String()),t==="name"&&(n=this.toName()),t==="hsl"&&(n=this.toHslString()),t==="hsv"&&(n=this.toHsvString()),n||this.toHexString())},e.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},e.prototype.clone=function(){return new e(this.toString())},e.prototype.lighten=function(t){t===void 0&&(t=10);var r=this.toHsl();return r.l+=t/100,r.l=x0(r.l),new e(r)},e.prototype.brighten=function(t){t===void 0&&(t=10);var r=this.toRgb();return r.r=Math.max(0,Math.min(255,r.r-Math.round(255*-(t/100)))),r.g=Math.max(0,Math.min(255,r.g-Math.round(255*-(t/100)))),r.b=Math.max(0,Math.min(255,r.b-Math.round(255*-(t/100)))),new e(r)},e.prototype.darken=function(t){t===void 0&&(t=10);var r=this.toHsl();return r.l-=t/100,r.l=x0(r.l),new e(r)},e.prototype.tint=function(t){return t===void 0&&(t=10),this.mix("white",t)},e.prototype.shade=function(t){return t===void 0&&(t=10),this.mix("black",t)},e.prototype.desaturate=function(t){t===void 0&&(t=10);var r=this.toHsl();return r.s-=t/100,r.s=x0(r.s),new e(r)},e.prototype.saturate=function(t){t===void 0&&(t=10);var r=this.toHsl();return r.s+=t/100,r.s=x0(r.s),new e(r)},e.prototype.greyscale=function(){return this.desaturate(100)},e.prototype.spin=function(t){var r=this.toHsl(),n=(r.h+t)%360;return r.h=n<0?360+n:n,new e(r)},e.prototype.mix=function(t,r){r===void 0&&(r=50);var n=this.toRgb(),i=new e(t).toRgb(),a=r/100,o={r:(i.r-n.r)*a+n.r,g:(i.g-n.g)*a+n.g,b:(i.b-n.b)*a+n.b,a:(i.a-n.a)*a+n.a};return new e(o)},e.prototype.analogous=function(t,r){t===void 0&&(t=6),r===void 0&&(r=30);var n=this.toHsl(),i=360/r,a=[this];for(n.h=(n.h-(i*t>>1)+720)%360;--t;)n.h=(n.h+i)%360,a.push(new e(n));return a},e.prototype.complement=function(){var t=this.toHsl();return t.h=(t.h+180)%360,new e(t)},e.prototype.monochromatic=function(t){t===void 0&&(t=6);for(var r=this.toHsv(),n=r.h,i=r.s,a=r.v,o=[],s=1/t;t--;)o.push(new e({h:n,s:i,v:a})),a=(a+s)%1;return o},e.prototype.splitcomplement=function(){var t=this.toHsl(),r=t.h;return[this,new e({h:(r+72)%360,s:t.s,l:t.l}),new e({h:(r+216)%360,s:t.s,l:t.l})]},e.prototype.onBackground=function(t){var r=this.toRgb(),n=new e(t).toRgb(),i=r.a+n.a*(1-r.a);return new e({r:(r.r*r.a+n.r*n.a*(1-r.a))/i,g:(r.g*r.a+n.g*n.a*(1-r.a))/i,b:(r.b*r.a+n.b*n.a*(1-r.a))/i,a:i})},e.prototype.triad=function(){return this.polyad(3)},e.prototype.tetrad=function(){return this.polyad(4)},e.prototype.polyad=function(t){for(var r=this.toHsl(),n=r.h,i=[this],a=360/t,o=1;o=60&&Math.round(e.h)<=240?n=r?Math.round(e.h)-S0*t:Math.round(e.h)+S0*t:n=r?Math.round(e.h)+S0*t:Math.round(e.h)-S0*t,n<0?n+=360:n>=360&&(n-=360),n}function VR(e,t,r){if(e.h===0&&e.s===0)return e.s;var n;return r?n=e.s-FR*t:t===D$?n=e.s+FR:n=e.s+Zie*t,n>1&&(n=1),r&&t===M$&&n>.1&&(n=.1),n<.06&&(n=.06),Number(n.toFixed(2))}function jR(e,t,r){var n;return r?n=e.v+Xie*t:n=e.v-Kie*t,n>1&&(n=1),Number(n.toFixed(2))}function rf(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=[],n=Dd(e),i=M$;i>0;i-=1){var a=$R(n),o=T0(Dd({h:NR(a,i,!0),s:VR(a,i,!0),v:jR(a,i,!0)}));r.push(o)}r.push(T0(n));for(var s=1;s<=D$;s+=1){var c=$R(n),d=T0(Dd({h:NR(c,s),s:VR(c,s),v:jR(c,s)}));r.push(d)}return t.theme==="dark"?Yie.map(function(m){var v=m.index,y=m.opacity,_=T0(Jie(Dd(t.backgroundColor||"#141414"),Dd(r[v]),y*100));return _}):r}var _2={red:"#F5222D",volcano:"#FA541C",orange:"#FA8C16",gold:"#FAAD14",yellow:"#FADB14",lime:"#A0D911",green:"#52C41A",cyan:"#13C2C2",blue:"#1890FF",geekblue:"#2F54EB",purple:"#722ED1",magenta:"#EB2F96",grey:"#666666"},L1={},b2={};Object.keys(_2).forEach(function(e){L1[e]=rf(_2[e]),L1[e].primary=L1[e][5],b2[e]=rf(_2[e],{theme:"dark",backgroundColor:"#141414"}),b2[e].primary=b2[e][5]});var Qie=L1.blue;const eae=e=>{const{controlHeight:t}=e;return{controlHeightSM:t*.75,controlHeightXS:t*.5,controlHeightLG:t*1.25}};function tae(e){const{sizeUnit:t,sizeStep:r}=e;return{sizeXXL:t*(r+8),sizeXL:t*(r+4),sizeLG:t*(r+2),sizeMD:t*(r+1),sizeMS:t*r,size:t*r,sizeSM:t*(r-1),sizeXS:t*(r-2),sizeXXS:t*(r-3)}}const L$={blue:"#1677ff",purple:"#722ED1",cyan:"#13C2C2",green:"#52C41A",magenta:"#EB2F96",pink:"#eb2f96",red:"#F5222D",orange:"#FA8C16",yellow:"#FADB14",volcano:"#FA541C",geekblue:"#2F54EB",gold:"#FAAD14",lime:"#A0D911"},Wx=Be(Be({},L$),{colorPrimary:"#1677ff",colorSuccess:"#52c41a",colorWarning:"#faad14",colorError:"#ff4d4f",colorInfo:"#1677ff",colorTextBase:"",colorBgBase:"",fontFamily:`-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
+'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol',
+'Noto Color Emoji'`,fontSize:14,lineWidth:1,lineType:"solid",motionUnit:.1,motionBase:0,motionEaseOutCirc:"cubic-bezier(0.08, 0.82, 0.17, 1)",motionEaseInOutCirc:"cubic-bezier(0.78, 0.14, 0.15, 0.86)",motionEaseOut:"cubic-bezier(0.215, 0.61, 0.355, 1)",motionEaseInOut:"cubic-bezier(0.645, 0.045, 0.355, 1)",motionEaseOutBack:"cubic-bezier(0.12, 0.4, 0.29, 1.46)",motionEaseInBack:"cubic-bezier(0.71, -0.46, 0.88, 0.6)",motionEaseInQuint:"cubic-bezier(0.755, 0.05, 0.855, 0.06)",motionEaseOutQuint:"cubic-bezier(0.23, 1, 0.32, 1)",borderRadius:6,sizeUnit:4,sizeStep:4,sizePopupArrow:16,controlHeight:32,zIndexBase:0,zIndexPopupBase:1e3,opacityImage:1,wireframe:!1});function rae(e,t){let{generateColorPalettes:r,generateNeutralColorPalettes:n}=t;const{colorSuccess:i,colorWarning:a,colorError:o,colorInfo:s,colorPrimary:c,colorBgBase:d,colorTextBase:m}=e,v=r(c),y=r(i),_=r(a),S=r(o),I=r(s),E=n(d,m);return Be(Be({},E),{colorPrimaryBg:v[1],colorPrimaryBgHover:v[2],colorPrimaryBorder:v[3],colorPrimaryBorderHover:v[4],colorPrimaryHover:v[5],colorPrimary:v[6],colorPrimaryActive:v[7],colorPrimaryTextHover:v[8],colorPrimaryText:v[9],colorPrimaryTextActive:v[10],colorSuccessBg:y[1],colorSuccessBgHover:y[2],colorSuccessBorder:y[3],colorSuccessBorderHover:y[4],colorSuccessHover:y[4],colorSuccess:y[6],colorSuccessActive:y[7],colorSuccessTextHover:y[8],colorSuccessText:y[9],colorSuccessTextActive:y[10],colorErrorBg:S[1],colorErrorBgHover:S[2],colorErrorBorder:S[3],colorErrorBorderHover:S[4],colorErrorHover:S[5],colorError:S[6],colorErrorActive:S[7],colorErrorTextHover:S[8],colorErrorText:S[9],colorErrorTextActive:S[10],colorWarningBg:_[1],colorWarningBgHover:_[2],colorWarningBorder:_[3],colorWarningBorderHover:_[4],colorWarningHover:_[4],colorWarning:_[6],colorWarningActive:_[7],colorWarningTextHover:_[8],colorWarningText:_[9],colorWarningTextActive:_[10],colorInfoBg:I[1],colorInfoBgHover:I[2],colorInfoBorder:I[3],colorInfoBorderHover:I[4],colorInfoHover:I[4],colorInfo:I[6],colorInfoActive:I[7],colorInfoTextHover:I[8],colorInfoText:I[9],colorInfoTextActive:I[10],colorBgMask:new zi("#000").setAlpha(.45).toRgbString(),colorWhite:"#fff"})}const nae=e=>{let t=e,r=e,n=e,i=e;return e<6&&e>=5?t=e+1:e<16&&e>=6?t=e+2:e>=16&&(t=16),e<7&&e>=5?r=4:e<8&&e>=7?r=5:e<14&&e>=8?r=6:e<16&&e>=14?r=7:e>=16&&(r=8),e<6&&e>=2?n=1:e>=6&&(n=2),e>4&&e<8?i=4:e>=8&&(i=6),{borderRadius:e>16?16:e,borderRadiusXS:n,borderRadiusSM:r,borderRadiusLG:t,borderRadiusOuter:i}};function iae(e){const{motionUnit:t,motionBase:r,borderRadius:n,lineWidth:i}=e;return Be({motionDurationFast:`${(r+t).toFixed(1)}s`,motionDurationMid:`${(r+t*2).toFixed(1)}s`,motionDurationSlow:`${(r+t*3).toFixed(1)}s`,lineWidthBold:i+1},nae(n))}const El=(e,t)=>new zi(e).setAlpha(t).toRgbString(),Tv=(e,t)=>new zi(e).darken(t).toHexString(),aae=e=>{const t=rf(e);return{1:t[0],2:t[1],3:t[2],4:t[3],5:t[4],6:t[5],7:t[6],8:t[4],9:t[5],10:t[6]}},oae=(e,t)=>{const r=e||"#fff",n=t||"#000";return{colorBgBase:r,colorTextBase:n,colorText:El(n,.88),colorTextSecondary:El(n,.65),colorTextTertiary:El(n,.45),colorTextQuaternary:El(n,.25),colorFill:El(n,.15),colorFillSecondary:El(n,.06),colorFillTertiary:El(n,.04),colorFillQuaternary:El(n,.02),colorBgLayout:Tv(r,4),colorBgContainer:Tv(r,0),colorBgElevated:Tv(r,0),colorBgSpotlight:El(n,.85),colorBorder:Tv(r,15),colorBorderSecondary:Tv(r,6)}};function sae(e){const t=new Array(10).fill(null).map((r,n)=>{const i=n-1,a=e*Math.pow(2.71828,i/5),o=n>1?Math.floor(a):Math.ceil(a);return Math.floor(o/2)*2});return t[1]=e,t.map(r=>{const n=r+8;return{size:r,lineHeight:n/r}})}const lae=e=>{const t=sae(e),r=t.map(i=>i.size),n=t.map(i=>i.lineHeight);return{fontSizeSM:r[0],fontSize:r[1],fontSizeLG:r[2],fontSizeXL:r[3],fontSizeHeading1:r[6],fontSizeHeading2:r[5],fontSizeHeading3:r[4],fontSizeHeading4:r[3],fontSizeHeading5:r[2],lineHeight:n[1],lineHeightLG:n[2],lineHeightSM:n[0],lineHeightHeading1:n[6],lineHeightHeading2:n[5],lineHeightHeading3:n[4],lineHeightHeading4:n[3],lineHeightHeading5:n[2]}};function uae(e){const t=Object.keys(L$).map(r=>{const n=rf(e[r]);return new Array(10).fill(1).reduce((i,a,o)=>(i[`${r}-${o+1}`]=n[o],i),{})}).reduce((r,n)=>(r=Be(Be({},r),n),r),{});return Be(Be(Be(Be(Be(Be(Be({},e),t),rae(e,{generateColorPalettes:aae,generateNeutralColorPalettes:oae})),lae(e.fontSize)),tae(e)),eae(e)),iae(e))}function x2(e){return e>=0&&e<=255}function C0(e,t){const{r,g:n,b:i,a}=new zi(e).toRgb();if(a<1)return e;const{r:o,g:s,b:c}=new zi(t).toRgb();for(let d=.01;d<=1;d+=.01){const m=Math.round((r-o*(1-d))/d),v=Math.round((n-s*(1-d))/d),y=Math.round((i-c*(1-d))/d);if(x2(m)&&x2(v)&&x2(y))return new zi({r:m,g:v,b:y,a:Math.round(d*100)/100}).toRgbString()}return new zi({r,g:n,b:i,a:1}).toRgbString()}var cae=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i{delete n[_]});const i=Be(Be({},r),n),a=480,o=576,s=768,c=992,d=1200,m=1600,v=2e3;return Be(Be(Be({},i),{colorLink:i.colorInfoText,colorLinkHover:i.colorInfoHover,colorLinkActive:i.colorInfoActive,colorFillContent:i.colorFillSecondary,colorFillContentHover:i.colorFill,colorFillAlter:i.colorFillQuaternary,colorBgContainerDisabled:i.colorFillTertiary,colorBorderBg:i.colorBgContainer,colorSplit:C0(i.colorBorderSecondary,i.colorBgContainer),colorTextPlaceholder:i.colorTextQuaternary,colorTextDisabled:i.colorTextQuaternary,colorTextHeading:i.colorText,colorTextLabel:i.colorTextSecondary,colorTextDescription:i.colorTextTertiary,colorTextLightSolid:i.colorWhite,colorHighlight:i.colorError,colorBgTextHover:i.colorFillSecondary,colorBgTextActive:i.colorFill,colorIcon:i.colorTextTertiary,colorIconHover:i.colorText,colorErrorOutline:C0(i.colorErrorBg,i.colorBgContainer),colorWarningOutline:C0(i.colorWarningBg,i.colorBgContainer),fontSizeIcon:i.fontSizeSM,lineWidth:i.lineWidth,controlOutlineWidth:i.lineWidth*2,controlInteractiveSize:i.controlHeight/2,controlItemBgHover:i.colorFillTertiary,controlItemBgActive:i.colorPrimaryBg,controlItemBgActiveHover:i.colorPrimaryBgHover,controlItemBgActiveDisabled:i.colorFill,controlTmpOutline:i.colorFillQuaternary,controlOutline:C0(i.colorPrimaryBg,i.colorBgContainer),lineType:i.lineType,borderRadius:i.borderRadius,borderRadiusXS:i.borderRadiusXS,borderRadiusSM:i.borderRadiusSM,borderRadiusLG:i.borderRadiusLG,fontWeightStrong:600,opacityLoading:.65,linkDecoration:"none",linkHoverDecoration:"none",linkFocusDecoration:"none",controlPaddingHorizontal:12,controlPaddingHorizontalSM:8,paddingXXS:i.sizeXXS,paddingXS:i.sizeXS,paddingSM:i.sizeSM,padding:i.size,paddingMD:i.sizeMD,paddingLG:i.sizeLG,paddingXL:i.sizeXL,paddingContentHorizontalLG:i.sizeLG,paddingContentVerticalLG:i.sizeMS,paddingContentHorizontal:i.sizeMS,paddingContentVertical:i.sizeSM,paddingContentHorizontalSM:i.size,paddingContentVerticalSM:i.sizeXS,marginXXS:i.sizeXXS,marginXS:i.sizeXS,marginSM:i.sizeSM,margin:i.size,marginMD:i.sizeMD,marginLG:i.sizeLG,marginXL:i.sizeXL,marginXXL:i.sizeXXL,boxShadow:`
+ 0 1px 2px 0 rgba(0, 0, 0, 0.03),
+ 0 1px 6px -1px rgba(0, 0, 0, 0.02),
+ 0 2px 4px 0 rgba(0, 0, 0, 0.02)
+ `,boxShadowSecondary:`
+ 0 6px 16px 0 rgba(0, 0, 0, 0.08),
+ 0 3px 6px -4px rgba(0, 0, 0, 0.12),
+ 0 9px 28px 8px rgba(0, 0, 0, 0.05)
+ `,boxShadowTertiary:`
+ 0 1px 2px 0 rgba(0, 0, 0, 0.03),
+ 0 1px 6px -1px rgba(0, 0, 0, 0.02),
+ 0 2px 4px 0 rgba(0, 0, 0, 0.02)
+ `,screenXS:a,screenXSMin:a,screenXSMax:o-1,screenSM:o,screenSMMin:o,screenSMMax:s-1,screenMD:s,screenMDMin:s,screenMDMax:c-1,screenLG:c,screenLGMin:c,screenLGMax:d-1,screenXL:d,screenXLMin:d,screenXLMax:m-1,screenXXL:m,screenXXLMin:m,screenXXLMax:v-1,screenXXXL:v,screenXXXLMin:v,boxShadowPopoverArrow:"3px 3px 7px rgba(0, 0, 0, 0.1)",boxShadowCard:`
+ 0 1px 2px -2px ${new zi("rgba(0, 0, 0, 0.16)").toRgbString()},
+ 0 3px 6px 0 ${new zi("rgba(0, 0, 0, 0.12)").toRgbString()},
+ 0 5px 12px 4px ${new zi("rgba(0, 0, 0, 0.09)").toRgbString()}
+ `,boxShadowDrawerRight:`
+ -6px 0 16px 0 rgba(0, 0, 0, 0.08),
+ -3px 0 6px -4px rgba(0, 0, 0, 0.12),
+ -9px 0 28px 8px rgba(0, 0, 0, 0.05)
+ `,boxShadowDrawerLeft:`
+ 6px 0 16px 0 rgba(0, 0, 0, 0.08),
+ 3px 0 6px -4px rgba(0, 0, 0, 0.12),
+ 9px 0 28px 8px rgba(0, 0, 0, 0.05)
+ `,boxShadowDrawerUp:`
+ 0 6px 16px 0 rgba(0, 0, 0, 0.08),
+ 0 3px 6px -4px rgba(0, 0, 0, 0.12),
+ 0 9px 28px 8px rgba(0, 0, 0, 0.05)
+ `,boxShadowDrawerDown:`
+ 0 -6px 16px 0 rgba(0, 0, 0, 0.08),
+ 0 -3px 6px -4px rgba(0, 0, 0, 0.12),
+ 0 -9px 28px 8px rgba(0, 0, 0, 0.05)
+ `,boxShadowTabsOverflowLeft:"inset 10px 0 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowRight:"inset -10px 0 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowTop:"inset 0 10px 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowBottom:"inset 0 -10px 8px -8px rgba(0, 0, 0, 0.08)"}),n)}const fae={overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},KI=e=>({boxSizing:"border-box",margin:0,padding:0,color:e.colorText,fontSize:e.fontSize,lineHeight:e.lineHeight,listStyle:"none",fontFamily:e.fontFamily}),dae=()=>({display:"inline-flex",alignItems:"center",color:"inherit",fontStyle:"normal",lineHeight:0,textAlign:"center",textTransform:"none",verticalAlign:"-0.125em",textRendering:"optimizeLegibility","-webkit-font-smoothing":"antialiased","-moz-osx-font-smoothing":"grayscale","> *":{lineHeight:1},svg:{display:"inline-block"}}),pae=e=>({a:{color:e.colorLink,textDecoration:e.linkDecoration,backgroundColor:"transparent",outline:"none",cursor:"pointer",transition:`color ${e.motionDurationSlow}`,"-webkit-text-decoration-skip":"objects","&:hover":{color:e.colorLinkHover},"&:active":{color:e.colorLinkActive},"&:active,\n &:hover":{textDecoration:e.linkHoverDecoration,outline:0},"&:focus":{textDecoration:e.linkFocusDecoration,outline:0},"&[disabled]":{color:e.colorTextDisabled,cursor:"not-allowed"}}}),mae=(e,t)=>{const{fontFamily:r,fontSize:n}=e,i=`[class^="${t}"], [class*=" ${t}"]`;return{[i]:{fontFamily:r,fontSize:n,boxSizing:"border-box","&::before, &::after":{boxSizing:"border-box"},[i]:{boxSizing:"border-box","&::before, &::after":{boxSizing:"border-box"}}}}},vae=e=>({outline:`${e.lineWidthBold}px solid ${e.colorPrimaryBorder}`,outlineOffset:1,transition:"outline-offset 0s, outline 0s"}),gae=e=>({"&:focus-visible":Be({},vae(e))});function hf(e,t,r){return n=>{const i=Le(()=>n==null?void 0:n.value),[a,o,s]=$y(),{getPrefixCls:c,iconPrefixCls:d}=i$(),m=Le(()=>c()),v=Le(()=>({theme:a.value,token:o.value,hashId:s.value,path:["Shared",m.value]}));iP(v,()=>[{"&":pae(o.value)}]);const y=Le(()=>({theme:a.value,token:o.value,hashId:s.value,path:[e,i.value,d.value]}));return[iP(y,()=>{const{token:_,flush:S}=_ae(o.value),I=typeof r=="function"?r(_):r,E=Be(Be({},I),o.value[e]),M=`.${i.value}`,L=pc(_,{componentCls:M,prefixCls:i.value,iconCls:`.${d.value}`,antCls:`.${m.value}`},E),R=t(L,{hashId:s.value,prefixCls:i.value,rootPrefixCls:m.value,iconPrefixCls:d.value,overrideComponentToken:o.value[e]});return S(e,E),[mae(o.value,i.value),R]}),s]}}const k$=typeof CSSINJS_STATISTIC<"u";let lP=!0;function pc(){for(var e=arguments.length,t=new Array(e),r=0;r{Object.keys(i).forEach(o=>{Object.defineProperty(n,o,{configurable:!0,enumerable:!0,get:()=>i[o]})})}),lP=!0,n}function yae(){}function _ae(e){let t,r=e,n=yae;return k$&&(t=new Set,r=new Proxy(e,{get(i,a){return lP&&t.add(a),i[a]}}),n=(i,a)=>{Array.from(t)}),{token:r,keys:t,flush:n}}const bae=_$(uae),R$={token:Wx,hashed:!0},O$=Symbol("DesignTokenContext"),uP=on(),xae=e=>{Fi(O$,e),$r(e,()=>{uP.value=ka(e),hq(uP)},{immediate:!0,deep:!0})},wae=Zt({props:{value:Ea()},setup(e,t){let{slots:r}=t;return xae(Le(()=>e.value)),()=>{var n;return(n=r.default)===null||n===void 0?void 0:n.call(r)}}});function $y(){const e=en(O$,Le(()=>uP.value||R$)),t=Le(()=>`${zie}-${e.value.hashed||""}`),r=Le(()=>e.value.theme||bae),n=cie(r,Le(()=>[Wx,e.value.token]),Le(()=>({salt:t.value,override:Be({override:e.value.token},e.value.components),formatToken:hae})));return[r,Le(()=>n.value[0]),Le(()=>e.value.hashed?n.value[1]:"")]}const z$=Zt({compatConfig:{MODE:3},setup(){const[,e]=$y(),t=Le(()=>new zi(e.value.colorBgBase).toHsl().l<.5?{opacity:.65}:{});return()=>ke("svg",{style:t.value,width:"184",height:"152",viewBox:"0 0 184 152",xmlns:"http://www.w3.org/2000/svg"},[ke("g",{fill:"none","fill-rule":"evenodd"},[ke("g",{transform:"translate(24 31.67)"},[ke("ellipse",{"fill-opacity":".8",fill:"#F5F5F7",cx:"67.797",cy:"106.89",rx:"67.797",ry:"12.668"},null),ke("path",{d:"M122.034 69.674L98.109 40.229c-1.148-1.386-2.826-2.225-4.593-2.225h-51.44c-1.766 0-3.444.839-4.592 2.225L13.56 69.674v15.383h108.475V69.674z",fill:"#AEB8C2"},null),ke("path",{d:"M101.537 86.214L80.63 61.102c-1.001-1.207-2.507-1.867-4.048-1.867H31.724c-1.54 0-3.047.66-4.048 1.867L6.769 86.214v13.792h94.768V86.214z",fill:"url(#linearGradient-1)",transform:"translate(13.56)"},null),ke("path",{d:"M33.83 0h67.933a4 4 0 0 1 4 4v93.344a4 4 0 0 1-4 4H33.83a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4z",fill:"#F5F5F7"},null),ke("path",{d:"M42.678 9.953h50.237a2 2 0 0 1 2 2V36.91a2 2 0 0 1-2 2H42.678a2 2 0 0 1-2-2V11.953a2 2 0 0 1 2-2zM42.94 49.767h49.713a2.262 2.262 0 1 1 0 4.524H42.94a2.262 2.262 0 0 1 0-4.524zM42.94 61.53h49.713a2.262 2.262 0 1 1 0 4.525H42.94a2.262 2.262 0 0 1 0-4.525zM121.813 105.032c-.775 3.071-3.497 5.36-6.735 5.36H20.515c-3.238 0-5.96-2.29-6.734-5.36a7.309 7.309 0 0 1-.222-1.79V69.675h26.318c2.907 0 5.25 2.448 5.25 5.42v.04c0 2.971 2.37 5.37 5.277 5.37h34.785c2.907 0 5.277-2.421 5.277-5.393V75.1c0-2.972 2.343-5.426 5.25-5.426h26.318v33.569c0 .617-.077 1.216-.221 1.789z",fill:"#DCE0E6"},null)]),ke("path",{d:"M149.121 33.292l-6.83 2.65a1 1 0 0 1-1.317-1.23l1.937-6.207c-2.589-2.944-4.109-6.534-4.109-10.408C138.802 8.102 148.92 0 161.402 0 173.881 0 184 8.102 184 18.097c0 9.995-10.118 18.097-22.599 18.097-4.528 0-8.744-1.066-12.28-2.902z",fill:"#DCE0E6"},null),ke("g",{transform:"translate(149.65 15.383)",fill:"#FFF"},[ke("ellipse",{cx:"20.654",cy:"3.167",rx:"2.849",ry:"2.815"},null),ke("path",{d:"M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z"},null)])])])}});z$.PRESENTED_IMAGE_DEFAULT=!0;const B$=Zt({compatConfig:{MODE:3},setup(){const[,e]=$y(),t=Le(()=>{const{colorFill:r,colorFillTertiary:n,colorFillQuaternary:i,colorBgContainer:a}=e.value;return{borderColor:new zi(r).onBackground(a).toHexString(),shadowColor:new zi(n).onBackground(a).toHexString(),contentColor:new zi(i).onBackground(a).toHexString()}});return()=>ke("svg",{width:"64",height:"41",viewBox:"0 0 64 41",xmlns:"http://www.w3.org/2000/svg"},[ke("g",{transform:"translate(0 1)",fill:"none","fill-rule":"evenodd"},[ke("ellipse",{fill:t.value.shadowColor,cx:"32",cy:"33",rx:"32",ry:"7"},null),ke("g",{"fill-rule":"nonzero",stroke:t.value.borderColor},[ke("path",{d:"M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"},null),ke("path",{d:"M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z",fill:t.value.contentColor},null)])])])}});B$.PRESENTED_IMAGE_SIMPLE=!0;const Sae=e=>{const{componentCls:t,margin:r,marginXS:n,marginXL:i,fontSize:a,lineHeight:o}=e;return{[t]:{marginInline:n,fontSize:a,lineHeight:o,textAlign:"center",[`${t}-image`]:{height:e.emptyImgHeight,marginBottom:n,opacity:e.opacityImage,img:{height:"100%"},svg:{height:"100%",margin:"auto"}},[`${t}-footer`]:{marginTop:r},"&-normal":{marginBlock:i,color:e.colorTextDisabled,[`${t}-image`]:{height:e.emptyImgHeightMD}},"&-small":{marginBlock:n,color:e.colorTextDisabled,[`${t}-image`]:{height:e.emptyImgHeightSM}}}}},Tae=hf("Empty",e=>{const{componentCls:t,controlHeightLG:r}=e,n=pc(e,{emptyImgCls:`${t}-img`,emptyImgHeight:r*2.5,emptyImgHeightMD:r,emptyImgHeightSM:r*.875});return[Sae(n)]});var Cae=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i({prefixCls:String,imageStyle:Ea(),image:is(),description:is()}),YI=Zt({name:"AEmpty",compatConfig:{MODE:3},inheritAttrs:!1,props:Pae(),setup(e,t){let{slots:r={},attrs:n}=t;const{direction:i,prefixCls:a}=Kl("empty",e),[o,s]=Tae(a);return()=>{var c,d;const m=a.value,v=Be(Be({},e),n),{image:y=((c=r.image)===null||c===void 0?void 0:c.call(r))||F$,description:_=((d=r.description)===null||d===void 0?void 0:d.call(r))||void 0,imageStyle:S,class:I=""}=v,E=Cae(v,["image","description","imageStyle","class"]);return o(ke(s$,{componentName:"Empty",children:M=>{const L=typeof _<"u"?_:M.description,R=typeof L=="string"?L:"empty";let $=null;return typeof y=="string"?$=ke("img",{alt:R,src:y},null):$=y,ke("div",Sn({class:hi(m,I,s.value,{[`${m}-normal`]:y===$$,[`${m}-rtl`]:i.value==="rtl"})},E),[ke("div",{class:`${m}-image`,style:S},[$]),L&&ke("p",{class:`${m}-description`},[L]),r.default&&ke("div",{class:`${m}-footer`},[J9(r.default())])])}},null))}}});YI.PRESENTED_IMAGE_DEFAULT=F$;YI.PRESENTED_IMAGE_SIMPLE=$$;const Cv=Vx(YI),N$=e=>{const{prefixCls:t}=Kl("empty",e);return(n=>{switch(n){case"Table":case"List":return ke(Cv,{image:Cv.PRESENTED_IMAGE_SIMPLE},null);case"Select":case"TreeSelect":case"Cascader":case"Transfer":case"Mentions":return ke(Cv,{image:Cv.PRESENTED_IMAGE_SIMPLE,class:`${t.value}-small`},null);default:return ke(Cv,null,null)}})(e.componentName)};function Aae(e){return ke(N$,{componentName:e},null)}const V$=Symbol("SizeContextKey"),j$=()=>en(V$,Qt(void 0)),Iae=e=>{const t=j$();return Fi(V$,Le(()=>e.value||t.value)),e},Kl=(e,t)=>{const r=j$(),n=WI(),i=en(GI,Be(Be({},n$),{renderEmpty:H=>xr(N$,{componentName:H})})),a=Le(()=>i.getPrefixCls(e,t.prefixCls)),o=Le(()=>{var H,Z;return(H=t.direction)!==null&&H!==void 0?H:(Z=i.direction)===null||Z===void 0?void 0:Z.value}),s=Le(()=>{var H;return(H=t.iconPrefixCls)!==null&&H!==void 0?H:i.iconPrefixCls.value}),c=Le(()=>i.getPrefixCls()),d=Le(()=>{var H;return(H=i.autoInsertSpaceInButton)===null||H===void 0?void 0:H.value}),m=i.renderEmpty,v=i.space,y=i.pageHeader,_=i.form,S=Le(()=>{var H,Z;return(H=t.getTargetContainer)!==null&&H!==void 0?H:(Z=i.getTargetContainer)===null||Z===void 0?void 0:Z.value}),I=Le(()=>{var H,Z,Q;return(Z=(H=t.getContainer)!==null&&H!==void 0?H:t.getPopupContainer)!==null&&Z!==void 0?Z:(Q=i.getPopupContainer)===null||Q===void 0?void 0:Q.value}),E=Le(()=>{var H,Z;return(H=t.dropdownMatchSelectWidth)!==null&&H!==void 0?H:(Z=i.dropdownMatchSelectWidth)===null||Z===void 0?void 0:Z.value}),M=Le(()=>{var H;return(t.virtual===void 0?((H=i.virtual)===null||H===void 0?void 0:H.value)!==!1:t.virtual!==!1)&&E.value!==!1}),L=Le(()=>t.size||r.value),R=Le(()=>{var H,Z,Q;return(H=t.autocomplete)!==null&&H!==void 0?H:(Q=(Z=i.input)===null||Z===void 0?void 0:Z.value)===null||Q===void 0?void 0:Q.autocomplete}),$=Le(()=>{var H;return(H=t.disabled)!==null&&H!==void 0?H:n.value}),G=Le(()=>{var H;return(H=t.csp)!==null&&H!==void 0?H:i.csp}),j=Le(()=>{var H,Z;return(H=t.wave)!==null&&H!==void 0?H:(Z=i.wave)===null||Z===void 0?void 0:Z.value});return{configProvider:i,prefixCls:a,direction:o,size:L,getTargetContainer:S,getPopupContainer:I,space:v,pageHeader:y,form:_,autoInsertSpaceInButton:d,renderEmpty:m,virtual:M,dropdownMatchSelectWidth:E,rootPrefixCls:c,getPrefixCls:i.getPrefixCls,autocomplete:R,csp:G,iconPrefixCls:s,disabled:$,select:i.select,wave:j}};function Eae(e,t){for(var r=0;r=0||(i[r]=e[r]);return i}function HR(e){return((t=e)!=null&&typeof t=="object"&&Array.isArray(t)===!1)==1&&Object.prototype.toString.call(e)==="[object Object]";var t}var W$=Object.prototype,q$=W$.toString,Mae=W$.hasOwnProperty,Z$=/^\s*function (\w+)/;function UR(e){var t,r=(t=e==null?void 0:e.type)!==null&&t!==void 0?t:e;if(r){var n=r.toString().match(Z$);return n?n[1]:""}return""}var nf=function(e){var t,r;return HR(e)!==!1&&typeof(t=e.constructor)=="function"&&HR(r=t.prototype)!==!1&&r.hasOwnProperty("isPrototypeOf")!==!1},Dae=function(e){return e},ga=Dae,iy=function(e,t){return Mae.call(e,t)},Lae=Number.isInteger||function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e},bp=Array.isArray||function(e){return q$.call(e)==="[object Array]"},xp=function(e){return q$.call(e)==="[object Function]"},Sb=function(e){return nf(e)&&iy(e,"_vueTypes_name")},X$=function(e){return nf(e)&&(iy(e,"type")||["_vueTypes_name","validator","default","required"].some(function(t){return iy(e,t)}))};function JI(e,t){return Object.defineProperty(e.bind(t),"__original",{value:e})}function ff(e,t,r){var n;r===void 0&&(r=!1);var i=!0,a="";n=nf(e)?e:{type:e};var o=Sb(n)?n._vueTypes_name+" - ":"";if(X$(n)&&n.type!==null){if(n.type===void 0||n.type===!0||!n.required&&t===void 0)return i;bp(n.type)?(i=n.type.some(function(v){return ff(v,t,!0)===!0}),a=n.type.map(function(v){return UR(v)}).join(" or ")):i=(a=UR(n))==="Array"?bp(t):a==="Object"?nf(t):a==="String"||a==="Number"||a==="Boolean"||a==="Function"?function(v){if(v==null)return"";var y=v.constructor.toString().match(Z$);return y?y[1]:""}(t)===a:t instanceof n.type}if(!i){var s=o+'value "'+t+'" should be of type "'+a+'"';return r===!1?(ga(s),!1):s}if(iy(n,"validator")&&xp(n.validator)){var c=ga,d=[];if(ga=function(v){d.push(v)},i=n.validator(t),ga=c,!i){var m=(d.length>1?"* ":"")+d.join(`
+* `);return d.length=0,r===!1?(ga(m),i):m}}return i}function so(e,t){var r=Object.defineProperties(t,{_vueTypes_name:{value:e,writable:!0},isRequired:{get:function(){return this.required=!0,this}},def:{value:function(i){return i!==void 0||this.default?xp(i)||ff(this,i,!0)===!0?(this.default=bp(i)?function(){return[].concat(i)}:nf(i)?function(){return Object.assign({},i)}:i,this):(ga(this._vueTypes_name+' - invalid default value: "'+i+'"'),this):this}}}),n=r.validator;return xp(n)&&(r.validator=JI(n,r)),r}function Qs(e,t){var r=so(e,t);return Object.defineProperty(r,"validate",{value:function(n){return xp(this.validator)&&ga(this._vueTypes_name+` - calling .validate() will overwrite the current custom validator function. Validator info:
+`+JSON.stringify(this)),this.validator=JI(n,this),this}})}function GR(e,t,r){var n,i,a=(n=t,i={},Object.getOwnPropertyNames(n).forEach(function(v){i[v]=Object.getOwnPropertyDescriptor(n,v)}),Object.defineProperties({},i));if(a._vueTypes_name=e,!nf(r))return a;var o,s,c=r.validator,d=G$(r,["validator"]);if(xp(c)){var m=a.validator;m&&(m=(s=(o=m).__original)!==null&&s!==void 0?s:o),a.validator=JI(m?function(v){return m.call(this,v)&&c.call(this,v)}:c,a)}return Object.assign(a,d)}function qx(e){return e.replace(/^(?!\s*$)/gm," ")}var kae=function(){return Qs("any",{})},Rae=function(){return Qs("function",{type:Function})},Oae=function(){return Qs("boolean",{type:Boolean})},zae=function(){return Qs("string",{type:String})},Bae=function(){return Qs("number",{type:Number})},Fae=function(){return Qs("array",{type:Array})},$ae=function(){return Qs("object",{type:Object})},Nae=function(){return so("integer",{type:Number,validator:function(e){return Lae(e)}})},Vae=function(){return so("symbol",{validator:function(e){return typeof e=="symbol"}})};function jae(e,t){if(t===void 0&&(t="custom validation failed"),typeof e!="function")throw new TypeError("[VueTypes error]: You must provide a function as argument");return so(e.name||"<>",{validator:function(r){var n=e(r);return n||ga(this._vueTypes_name+" - "+t),n}})}function Hae(e){if(!bp(e))throw new TypeError("[VueTypes error]: You must provide an array as argument.");var t='oneOf - value should be one of "'+e.join('", "')+'".',r=e.reduce(function(n,i){if(i!=null){var a=i.constructor;n.indexOf(a)===-1&&n.push(a)}return n},[]);return so("oneOf",{type:r.length>0?r:void 0,validator:function(n){var i=e.indexOf(n)!==-1;return i||ga(t),i}})}function Uae(e){if(!bp(e))throw new TypeError("[VueTypes error]: You must provide an array as argument");for(var t=!1,r=[],n=0;n0&&r.some(function(c){return o.indexOf(c)===-1})){var s=r.filter(function(c){return o.indexOf(c)===-1});return ga(s.length===1?'shape - required property "'+s[0]+'" is not defined.':'shape - required properties "'+s.join('", "')+'" are not defined.'),!1}return o.every(function(c){if(t.indexOf(c)===-1)return a._vueTypes_isLoose===!0||(ga('shape - shape definition does not include a "'+c+'" property. Allowed keys: "'+t.join('", "')+'".'),!1);var d=ff(e[c],i[c],!0);return typeof d=="string"&&ga('shape - "'+c+`" property validation error:
+ `+qx(d)),d===!0})}});return Object.defineProperty(n,"_vueTypes_isLoose",{writable:!0,value:!1}),Object.defineProperty(n,"loose",{get:function(){return this._vueTypes_isLoose=!0,this}}),n}var Bs=function(){function e(){}return e.extend=function(t){var r=this;if(bp(t))return t.forEach(function(v){return r.extend(v)}),this;var n=t.name,i=t.validate,a=i!==void 0&&i,o=t.getter,s=o!==void 0&&o,c=G$(t,["name","validate","getter"]);if(iy(this,n))throw new TypeError('[VueTypes error]: Type "'+n+'" already defined');var d,m=c.type;return Sb(m)?(delete c.type,Object.defineProperty(this,n,s?{get:function(){return GR(n,m,c)}}:{value:function(){var v,y=GR(n,m,c);return y.validator&&(y.validator=(v=y.validator).bind.apply(v,[y].concat([].slice.call(arguments)))),y}})):(d=s?{get:function(){var v=Object.assign({},c);return a?Qs(n,v):so(n,v)},enumerable:!0}:{value:function(){var v,y,_=Object.assign({},c);return v=a?Qs(n,_):so(n,_),_.validator&&(v.validator=(y=_.validator).bind.apply(y,[v].concat([].slice.call(arguments)))),v},enumerable:!0},Object.defineProperty(this,n,d))},H$(e,null,[{key:"any",get:function(){return kae()}},{key:"func",get:function(){return Rae().def(this.defaults.func)}},{key:"bool",get:function(){return Oae().def(this.defaults.bool)}},{key:"string",get:function(){return zae().def(this.defaults.string)}},{key:"number",get:function(){return Bae().def(this.defaults.number)}},{key:"array",get:function(){return Fae().def(this.defaults.array)}},{key:"object",get:function(){return $ae().def(this.defaults.object)}},{key:"integer",get:function(){return Nae().def(this.defaults.integer)}},{key:"symbol",get:function(){return Vae()}}]),e}();function K$(e){var t;return e===void 0&&(e={func:function(){},bool:!0,string:"",number:0,array:function(){return[]},object:function(){return{}},integer:0}),(t=function(r){function n(){return r.apply(this,arguments)||this}return U$(n,r),H$(n,null,[{key:"sensibleDefaults",get:function(){return k1({},this.defaults)},set:function(i){this.defaults=i!==!1?k1({},i!==!0?i:e):{}}}]),n}(Bs)).defaults=k1({},e),t}Bs.defaults={},Bs.custom=jae,Bs.oneOf=Hae,Bs.instanceOf=Wae,Bs.oneOfType=Uae,Bs.arrayOf=Gae,Bs.objectOf=qae,Bs.shape=Zae,Bs.utils={validate:function(e,t){return ff(t,e,!0)===!0},toType:function(e,t,r){return r===void 0&&(r=!1),r?Qs(e,t):so(e,t)}};(function(e){function t(){return e.apply(this,arguments)||this}return U$(t,e),t})(K$());const wp=K$({func:void 0,bool:void 0,string:void 0,number:void 0,array:void 0,object:void 0,integer:void 0});wp.extend([{name:"looseBool",getter:!0,type:Boolean,default:void 0},{name:"style",getter:!0,type:[String,Object],default:void 0},{name:"VueNode",getter:!0,type:null}]);const Y$=(e,t,r)=>{Yne(e,`[ant-design-vue: ${t}] ${r}`)};function Xae(e){let{prefixCls:t,animation:r,transitionName:n}=e;return r?{name:`${t}-${r}`}:n?{name:n}:{}}const Kae=e=>{if(!e)return!1;if(e.offsetParent)return!0;if(e.getBBox){const t=e.getBBox();if(t.width||t.height)return!0}if(e.getBoundingClientRect){const t=e.getBoundingClientRect();if(t.width||t.height)return!0}return!1};var J$=typeof global=="object"&&global&&global.Object===Object&&global,Yae=typeof self=="object"&&self&&self.Object===Object&&self,mc=J$||Yae||Function("return this")(),Tb=mc.Symbol,Q$=Object.prototype,Jae=Q$.hasOwnProperty,Qae=Q$.toString,Pv=Tb?Tb.toStringTag:void 0;function eoe(e){var t=Jae.call(e,Pv),r=e[Pv];try{e[Pv]=void 0;var n=!0}catch{}var i=Qae.call(e);return n&&(t?e[Pv]=r:delete e[Pv]),i}var toe=Object.prototype,roe=toe.toString;function noe(e){return roe.call(e)}var ioe="[object Null]",aoe="[object Undefined]",WR=Tb?Tb.toStringTag:void 0;function Ny(e){return e==null?e===void 0?aoe:ioe:WR&&WR in Object(e)?eoe(e):noe(e)}function e8(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var ooe="[object AsyncFunction]",soe="[object Function]",loe="[object GeneratorFunction]",uoe="[object Proxy]";function t8(e){if(!e8(e))return!1;var t=Ny(e);return t==soe||t==loe||t==ooe||t==uoe}var w2=mc["__core-js_shared__"],qR=function(){var e=/[^.]+$/.exec(w2&&w2.keys&&w2.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function coe(e){return!!qR&&qR in e}var hoe=Function.prototype,foe=hoe.toString;function df(e){if(e!=null){try{return foe.call(e)}catch{}try{return e+""}catch{}}return""}var doe=/[\\^$.*+?()[\]{}|]/g,poe=/^\[object .+?Constructor\]$/,moe=Function.prototype,voe=Object.prototype,goe=moe.toString,yoe=voe.hasOwnProperty,_oe=RegExp("^"+goe.call(yoe).replace(doe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function boe(e){if(!e8(e)||coe(e))return!1;var t=t8(e)?_oe:poe;return t.test(df(e))}function xoe(e,t){return e==null?void 0:e[t]}function Vy(e,t){var r=xoe(e,t);return boe(r)?r:void 0}var cP=Vy(mc,"Map"),woe=Array.isArray;function QI(e){return e!=null&&typeof e=="object"}var Soe="[object Arguments]";function ZR(e){return QI(e)&&Ny(e)==Soe}var r8=Object.prototype,Toe=r8.hasOwnProperty,Coe=r8.propertyIsEnumerable,Poe=ZR(function(){return arguments}())?ZR:function(e){return QI(e)&&Toe.call(e,"callee")&&!Coe.call(e,"callee")};function Aoe(){return!1}var n8=typeof exports=="object"&&exports&&!exports.nodeType&&exports,XR=n8&&typeof module=="object"&&module&&!module.nodeType&&module,Ioe=XR&&XR.exports===n8,KR=Ioe?mc.Buffer:void 0,Eoe=KR?KR.isBuffer:void 0,Moe=Eoe||Aoe,Doe=9007199254740991;function i8(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Doe}var Loe="[object Arguments]",koe="[object Array]",Roe="[object Boolean]",Ooe="[object Date]",zoe="[object Error]",Boe="[object Function]",Foe="[object Map]",$oe="[object Number]",Noe="[object Object]",Voe="[object RegExp]",joe="[object Set]",Hoe="[object String]",Uoe="[object WeakMap]",Goe="[object ArrayBuffer]",Woe="[object DataView]",qoe="[object Float32Array]",Zoe="[object Float64Array]",Xoe="[object Int8Array]",Koe="[object Int16Array]",Yoe="[object Int32Array]",Joe="[object Uint8Array]",Qoe="[object Uint8ClampedArray]",ese="[object Uint16Array]",tse="[object Uint32Array]",Ln={};Ln[qoe]=Ln[Zoe]=Ln[Xoe]=Ln[Koe]=Ln[Yoe]=Ln[Joe]=Ln[Qoe]=Ln[ese]=Ln[tse]=!0;Ln[Loe]=Ln[koe]=Ln[Goe]=Ln[Roe]=Ln[Woe]=Ln[Ooe]=Ln[zoe]=Ln[Boe]=Ln[Foe]=Ln[$oe]=Ln[Noe]=Ln[Voe]=Ln[joe]=Ln[Hoe]=Ln[Uoe]=!1;function rse(e){return QI(e)&&i8(e.length)&&!!Ln[Ny(e)]}function nse(e){return function(t){return e(t)}}var a8=typeof exports=="object"&&exports&&!exports.nodeType&&exports,xg=a8&&typeof module=="object"&&module&&!module.nodeType&&module,ise=xg&&xg.exports===a8,S2=ise&&J$.process,YR=function(){try{var e=xg&&xg.require&&xg.require("util").types;return e||S2&&S2.binding&&S2.binding("util")}catch{}}(),JR=YR&&YR.isTypedArray,ase=JR?nse(JR):rse,ose=Object.prototype;function o8(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||ose;return e===r}function sse(e,t){return function(r){return e(t(r))}}var lse=sse(Object.keys,Object),use=Object.prototype,cse=use.hasOwnProperty;function hse(e){if(!o8(e))return lse(e);var t=[];for(var r in Object(e))cse.call(e,r)&&r!="constructor"&&t.push(r);return t}function fse(e){return e!=null&&i8(e.length)&&!t8(e)}var hP=Vy(mc,"DataView"),fP=Vy(mc,"Promise"),dP=Vy(mc,"Set"),pP=Vy(mc,"WeakMap"),QR="[object Map]",dse="[object Object]",e3="[object Promise]",t3="[object Set]",r3="[object WeakMap]",n3="[object DataView]",pse=df(hP),mse=df(cP),vse=df(fP),gse=df(dP),yse=df(pP),Ph=Ny;(hP&&Ph(new hP(new ArrayBuffer(1)))!=n3||cP&&Ph(new cP)!=QR||fP&&Ph(fP.resolve())!=e3||dP&&Ph(new dP)!=t3||pP&&Ph(new pP)!=r3)&&(Ph=function(e){var t=Ny(e),r=t==dse?e.constructor:void 0,n=r?df(r):"";if(n)switch(n){case pse:return n3;case mse:return QR;case vse:return e3;case gse:return t3;case yse:return r3}return t});bb("bottomLeft","bottomRight","topLeft","topRight");const s8=function(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Be(e?{name:e,appear:!0,appearActiveClass:`${e}`,appearToClass:`${e}-appear ${e}-appear-active`,enterFromClass:`${e}-appear ${e}-enter ${e}-appear-prepare ${e}-enter-prepare`,enterActiveClass:`${e}`,enterToClass:`${e}-enter ${e}-appear ${e}-appear-active ${e}-enter-active`,leaveActiveClass:`${e} ${e}-leave`,leaveToClass:`${e}-leave-active`}:{css:!1},t)},l8=Symbol("PortalContextKey"),_se=function(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{inTriggerContext:!0};Fi(l8,{inTriggerContext:t.inTriggerContext,shouldRender:Le(()=>{const{sPopupVisible:r,popupRef:n,forceRender:i,autoDestroy:a}=e||{};let o=!1;return(r||n||i)&&(o=!0),!r&&a&&(o=!1),o})})},bse=()=>{_se({},{inTriggerContext:!1});const e=en(l8,{shouldRender:Le(()=>!1),inTriggerContext:!1});return{shouldRender:Le(()=>e.shouldRender.value||e.inTriggerContext===!1)}},xse=Zt({compatConfig:{MODE:3},name:"Portal",inheritAttrs:!1,props:{getContainer:wp.func.isRequired,didUpdate:Function},setup(e,t){let{slots:r}=t,n=!0,i;const{shouldRender:a}=bse();function o(){a.value&&(i=e.getContainer())}YB(()=>{n=!1,o()}),Tn(()=>{i||o()});const s=$r(a,()=>{a.value&&!i&&(i=e.getContainer()),i&&s()});return Px(()=>{No(()=>{var c;a.value&&((c=e.didUpdate)===null||c===void 0||c.call(e,e))})}),()=>{var c;return a.value?n?(c=r.default)===null||c===void 0?void 0:c.call(r):i?ke(fF,{to:i},r):null:null}}});function Qc(e){const t=typeof e=="function"?e():e,r=Qt(t);function n(i){r.value=i}return[r,n]}var wse=Symbol("iconContext"),u8=function(){return en(wse,{prefixCls:Qt("anticon"),rootClassName:Qt(""),csp:Qt()})};function eE(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function Sse(e,t){return e&&e.contains?e.contains(t):!1}var i3="data-vc-order",Tse="vc-icon-key",mP=new Map;function c8(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.mark;return t?t.startsWith("data-")?t:"data-".concat(t):Tse}function tE(e){if(e.attachTo)return e.attachTo;var t=document.querySelector("head");return t||document.body}function Cse(e){return e==="queue"?"prependQueue":e?"prepend":"append"}function h8(e){return Array.from((mP.get(e)||e).children).filter(function(t){return t.tagName==="STYLE"})}function f8(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!eE())return null;var r=t.csp,n=t.prepend,i=document.createElement("style");i.setAttribute(i3,Cse(n)),r&&r.nonce&&(i.nonce=r.nonce),i.innerHTML=e;var a=tE(t),o=a.firstChild;if(n){if(n==="queue"){var s=h8(a).filter(function(c){return["prepend","prependQueue"].includes(c.getAttribute(i3))});if(s.length)return a.insertBefore(i,s[s.length-1].nextSibling),i}a.insertBefore(i,o)}else a.appendChild(i);return i}function Pse(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=tE(t);return h8(r).find(function(n){return n.getAttribute(c8(t))===e})}function Ase(e,t){var r=mP.get(e);if(!r||!Sse(document,r)){var n=f8("",t),i=n.parentNode;mP.set(e,i),e.removeChild(n)}}function Ise(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=tE(r);Ase(n,r);var i=Pse(t,r);if(i)return r.csp&&r.csp.nonce&&i.nonce!==r.csp.nonce&&(i.nonce=r.csp.nonce),i.innerHTML!==e&&(i.innerHTML=e),i;var a=f8(e,r);return a.setAttribute(c8(r),t),a}function a3(e){for(var t=1;t * {
+ line-height: 1;
+}
+
+.anticon svg {
+ display: inline-block;
+}
+
+.anticon::before {
+ display: none;
+}
+
+.anticon .anticon-icon {
+ display: block;
+}
+
+.anticon[tabindex] {
+ cursor: pointer;
+}
+
+.anticon-spin::before,
+.anticon-spin {
+ display: inline-block;
+ -webkit-animation: loadingCircle 1s infinite linear;
+ animation: loadingCircle 1s infinite linear;
+}
+
+@-webkit-keyframes loadingCircle {
+ 100% {
+ -webkit-transform: rotate(360deg);
+ transform: rotate(360deg);
+ }
+}
+
+@keyframes loadingCircle {
+ 100% {
+ -webkit-transform: rotate(360deg);
+ transform: rotate(360deg);
+ }
+}
+`;function m8(e){return e&&e.getRootNode&&e.getRootNode()}function Dse(e){return eE()?m8(e)instanceof ShadowRoot:!1}function Lse(e){return Dse(e)?m8(e):null}var kse=function(){var t=u8(),r=t.prefixCls,n=t.csp,i=Xl(),a=Mse;r&&(a=a.replace(/anticon/g,r.value)),No(function(){if(eE()){var o=i.vnode.el,s=Lse(o);Ise(a,"@ant-design-vue-icons",{prepend:!0,csp:n.value,attachTo:s})}})},Rse=["icon","primaryColor","secondaryColor"];function Ose(e,t){if(e==null)return{};var r=zse(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function zse(e,t){if(e==null)return{};var r={},n=Object.keys(e),i,a;for(a=0;a=0)&&(r[i]=e[i]);return r}function R1(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function ele(e,t){if(e==null)return{};var r={},n=Object.keys(e),i,a;for(a=0;a=0)&&(r[i]=e[i]);return r}v8(Qie.primary);var wa=function(t,r){var n,i=u3({},t,r.attrs),a=i.class,o=i.icon,s=i.spin,c=i.rotate,d=i.tabindex,m=i.twoToneColor,v=i.onClick,y=Qse(i,qse),_=u8(),S=_.prefixCls,I=_.rootClassName,E=(n={},eg(n,I.value,!!I.value),eg(n,S.value,!0),eg(n,"".concat(S.value,"-").concat(o.name),!!o.name),eg(n,"".concat(S.value,"-spin"),!!s||o.name==="loading"),n),M=d;M===void 0&&v&&(M=-1);var L=c?{msTransform:"rotate(".concat(c,"deg)"),transform:"rotate(".concat(c,"deg)")}:void 0,R=p8(m),$=Zse(R,2),G=$[0],j=$[1];return ke("span",u3({role:"img","aria-label":o.name},y,{onClick:v,class:[E,a],tabindex:M}),[ke(vc,{icon:o,primaryColor:G,secondaryColor:j,style:L},null),ke(Wse,null,null)])};wa.props={spin:Boolean,rotate:Number,icon:Object,twoToneColor:[String,Array]};wa.displayName="AntdIcon";wa.inheritAttrs=!1;wa.getTwoToneColor=Gse;wa.setTwoToneColor=v8;var tle={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z"}}]},name:"loading",theme:"outlined"};function c3(e){for(var t=1;t{const o=oo({});return Fi(t,o),Hl(()=>{Be(o,i,a||{})}),o},useInject:()=>en(t,e)||{}}}const sle=e=>{const{componentCls:t}=e;return{[t]:{display:"inline-flex","&-block":{display:"flex",width:"100%"},"&-vertical":{flexDirection:"column"}}}},lle=e=>{const{componentCls:t}=e;return{[t]:{display:"inline-flex","&-rtl":{direction:"rtl"},"&-vertical":{flexDirection:"column"},"&-align":{flexDirection:"column","&-center":{alignItems:"center"},"&-start":{alignItems:"flex-start"},"&-end":{alignItems:"flex-end"},"&-baseline":{alignItems:"baseline"}},[`${t}-item`]:{"&:empty":{display:"none"}}}}},ule=hf("Space",e=>[lle(e),sle(e)]);var cle="[object Map]",hle="[object Set]",fle=Object.prototype,dle=fle.hasOwnProperty;function y8(e){if(e==null)return!0;if(fse(e)&&(woe(e)||typeof e=="string"||typeof e.splice=="function"||Moe(e)||ase(e)||Poe(e)))return!e.length;var t=Ph(e);if(t==cle||t==hle)return!e.size;if(o8(e))return!hse(e).length;for(var r in e)if(dle.call(e,r))return!1;return!0}const ple=()=>({compactSize:String,compactDirection:wp.oneOf(bb("horizontal","vertical")).def("horizontal"),isFirstItem:Hh(),isLastItem:Hh()}),rE=g8(null),mle=(e,t)=>{const r=rE.useInject(),n=Le(()=>{if(!r||y8(r))return"";const{compactDirection:i,isFirstItem:a,isLastItem:o}=r,s=i==="vertical"?"-vertical-":"-";return hi({[`${e.value}-compact${s}item`]:!0,[`${e.value}-compact${s}first-item`]:a,[`${e.value}-compact${s}last-item`]:o,[`${e.value}-compact${s}item-rtl`]:t.value==="rtl"})});return{compactSize:Le(()=>r==null?void 0:r.compactSize),compactDirection:Le(()=>r==null?void 0:r.compactDirection),compactItemClassnames:n}},vle=()=>({prefixCls:String,size:{type:String},direction:wp.oneOf(bb("horizontal","vertical")).def("horizontal"),align:wp.oneOf(bb("start","end","center","baseline")),block:{type:Boolean,default:void 0}}),gle=Zt({name:"CompactItem",props:ple(),setup(e,t){let{slots:r}=t;return rE.useProvide(e),()=>{var n;return(n=r.default)===null||n===void 0?void 0:n.call(r)}}});vle();function yle(e,t,r){const{focusElCls:n,focus:i,borderElCls:a}=r,o=a?"> *":"",s=["hover",i?"focus":null,"active"].filter(Boolean).map(c=>`&:${c} ${o}`).join(",");return{[`&-item:not(${t}-last-item)`]:{marginInlineEnd:-e.lineWidth},"&-item":Be(Be({[s]:{zIndex:2}},n?{[`&${n}`]:{zIndex:2}}:{}),{[`&[disabled] ${o}`]:{zIndex:0}})}}function _le(e,t,r){const{borderElCls:n}=r,i=n?`> ${n}`:"";return{[`&-item:not(${t}-first-item):not(${t}-last-item) ${i}`]:{borderRadius:0},[`&-item:not(${t}-last-item)${t}-first-item`]:{[`& ${i}, &${e}-sm ${i}, &${e}-lg ${i}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&-item:not(${t}-first-item)${t}-last-item`]:{[`& ${i}, &${e}-sm ${i}, &${e}-lg ${i}`]:{borderStartStartRadius:0,borderEndStartRadius:0}}}}function ble(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{focus:!0};const{componentCls:r}=e,n=`${r}-compact`;return{[n]:Be(Be({},yle(e,n,t)),_le(r,n,t))}}var xle={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M699 353h-46.9c-10.2 0-19.9 4.9-25.9 13.3L469 584.3l-71.2-98.8c-6-8.3-15.6-13.3-25.9-13.3H325c-6.5 0-10.3 7.4-6.5 12.7l124.6 172.8a31.8 31.8 0 0051.7 0l210.6-292c3.9-5.3.1-12.7-6.4-12.7z"}},{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}}]},name:"check-circle",theme:"outlined"};function d3(e){for(var t=1;t{const{componentCls:t,colorPrimary:r}=e;return{[t]:{position:"absolute",background:"transparent",pointerEvents:"none",boxSizing:"border-box",color:`var(--wave-color, ${r})`,boxShadow:"0 0 0 0 currentcolor",opacity:.2,"&.wave-motion-appear":{transition:[`box-shadow 0.4s ${e.motionEaseOutCirc}`,`opacity 2s ${e.motionEaseOutCirc}`].join(","),"&-active":{boxShadow:"0 0 0 6px currentcolor",opacity:0}}}}},zle=hf("Wave",e=>[Ole(e)]);function Ble(e){const t=(e||"").match(/rgba?\((\d*), (\d*), (\d*)(, [\d.]*)?\)/);return t&&t[1]&&t[2]&&t[3]?!(t[1]===t[2]&&t[2]===t[3]):!0}function T2(e){return e&&e!=="#fff"&&e!=="#ffffff"&&e!=="rgb(255, 255, 255)"&&e!=="rgba(255, 255, 255, 1)"&&Ble(e)&&!/rgba\((?:\d*, ){3}0\)/.test(e)&&e!=="transparent"}function Fle(e){const{borderTopColor:t,borderColor:r,backgroundColor:n}=getComputedStyle(e);return T2(t)?t:T2(r)?r:T2(n)?n:null}function C2(e){return Number.isNaN(e)?0:e}const $le=Zt({props:{target:Ea(),className:String},setup(e){const t=on(null),[r,n]=Qc(null),[i,a]=Qc([]),[o,s]=Qc(0),[c,d]=Qc(0),[m,v]=Qc(0),[y,_]=Qc(0),[S,I]=Qc(!1);function E(){const{target:H}=e,Z=getComputedStyle(H);n(Fle(H));const Q=Z.position==="static",{borderLeftWidth:ee,borderTopWidth:ne}=Z;s(Q?H.offsetLeft:C2(-parseFloat(ee))),d(Q?H.offsetTop:C2(-parseFloat(ne))),v(H.offsetWidth),_(H.offsetHeight);const{borderTopLeftRadius:ie,borderTopRightRadius:ce,borderBottomLeftRadius:Ae,borderBottomRightRadius:ue}=Z;a([ie,ce,ue,Ae].map(_e=>C2(parseFloat(_e))))}let M,L,R;const $=()=>{clearTimeout(R),KC.cancel(L),M==null||M.disconnect()},G=()=>{var H;const Z=(H=t.value)===null||H===void 0?void 0:H.parentElement;Z&&(gb(null,Z),Z.parentElement&&Z.parentElement.removeChild(Z))};Tn(()=>{$(),R=setTimeout(()=>{G()},5e3);const{target:H}=e;H&&(L=KC(()=>{E(),I(!0)}),typeof ResizeObserver<"u"&&(M=new ResizeObserver(E),M.observe(H)))}),fc(()=>{$()});const j=H=>{H.propertyName==="opacity"&&G()};return()=>{if(!S.value)return null;const H={left:`${o.value}px`,top:`${c.value}px`,width:`${m.value}px`,height:`${y.value}px`,borderRadius:i.value.map(Z=>`${Z}px`).join(" ")};return r&&(H["--wave-color"]=r.value),ke(rl,{appear:!0,name:"wave-motion",appearFromClass:"wave-motion-appear",appearActiveClass:"wave-motion-appear",appearToClass:"wave-motion-appear wave-motion-appear-active"},{default:()=>[ke("div",{ref:t,class:e.className,style:H,onTransitionend:j},null)]})}}});function Nle(e,t){const r=document.createElement("div");r.style.position="absolute",r.style.left="0px",r.style.top="0px",e==null||e.insertBefore(r,e==null?void 0:e.firstChild),gb(ke($le,{target:e,className:t},null),r)}function Vle(e,t,r){function n(){var i;const a=XC(e);!((i=r==null?void 0:r.value)===null||i===void 0)&&i.disabled||!a||Nle(a,t.value)}return n}const jle=Zt({compatConfig:{MODE:3},name:"Wave",props:{disabled:Boolean},setup(e,t){let{slots:r}=t;const n=Xl(),{prefixCls:i,wave:a}=Kl("wave",e),[,o]=zle(i),s=Vle(n,Le(()=>hi(i.value,o.value)),a);let c;const d=()=>{XC(n).removeEventListener("click",c,!0)};return Tn(()=>{$r(()=>e.disabled,()=>{d(),No(()=>{const m=XC(n);m==null||m.removeEventListener("click",c,!0),!(!m||m.nodeType!==1||e.disabled)&&(c=v=>{v.target.tagName==="INPUT"||!Kae(v.target)||!m.getAttribute||m.getAttribute("disabled")||m.disabled||m.className.includes("disabled")||m.className.includes("-leave")||s()},m.addEventListener("click",c,!0))})},{immediate:!0,flush:"post"})}),fc(()=>{d()}),()=>{var m;return(m=r.default)===null||m===void 0?void 0:m.call(r)[0]}}}),Hle=()=>({prefixCls:String,type:String,htmlType:{type:String,default:"button"},shape:{type:String},size:{type:String},loading:{type:[Boolean,Object],default:()=>!1},disabled:{type:Boolean,default:void 0},ghost:{type:Boolean,default:void 0},block:{type:Boolean,default:void 0},danger:{type:Boolean,default:void 0},icon:wp.any,href:String,target:String,title:String,onClick:xR(),onMousedown:xR()}),b3=e=>{e&&(e.style.width="0px",e.style.opacity="0",e.style.transform="scale(0)")},x3=e=>{No(()=>{e&&(e.style.width=`${e.scrollWidth}px`,e.style.opacity="1",e.style.transform="scale(1)")})},w3=e=>{e&&e.style&&(e.style.width=null,e.style.opacity=null,e.style.transform=null)},Ule=Zt({compatConfig:{MODE:3},name:"LoadingIcon",props:{prefixCls:String,loading:[Boolean,Object],existIcon:Boolean},setup(e){return()=>{const{existIcon:t,prefixCls:r,loading:n}=e;if(t)return ke("span",{class:`${r}-loading-icon`},[ke(af,null,null)]);const i=!!n;return ke(rl,{name:`${r}-loading-icon-motion`,onBeforeEnter:b3,onEnter:x3,onAfterEnter:w3,onBeforeLeave:x3,onLeave:a=>{setTimeout(()=>{b3(a)})},onAfterLeave:w3},{default:()=>[i?ke("span",{class:`${r}-loading-icon`},[ke(af,null,null)]):null]})}}}),S3=(e,t)=>({[`> span, > ${e}`]:{"&:not(:last-child)":{[`&, & > ${e}`]:{"&:not(:disabled)":{borderInlineEndColor:t}}},"&:not(:first-child)":{[`&, & > ${e}`]:{"&:not(:disabled)":{borderInlineStartColor:t}}}}}),Gle=e=>{const{componentCls:t,fontSize:r,lineWidth:n,colorPrimaryHover:i,colorErrorHover:a}=e;return{[`${t}-group`]:[{position:"relative",display:"inline-flex",[`> span, > ${t}`]:{"&:not(:last-child)":{[`&, & > ${t}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},"&:not(:first-child)":{marginInlineStart:-n,[`&, & > ${t}`]:{borderStartStartRadius:0,borderEndStartRadius:0}}},[t]:{position:"relative",zIndex:1,"&:hover,\n &:focus,\n &:active":{zIndex:2},"&[disabled]":{zIndex:0}},[`${t}-icon-only`]:{fontSize:r}},S3(`${t}-primary`,i),S3(`${t}-danger`,a)]}};function Wle(e,t){return{[`&-item:not(${t}-last-item)`]:{marginBottom:-e.lineWidth},"&-item":{"&:hover,&:focus,&:active":{zIndex:2},"&[disabled]":{zIndex:0}}}}function qle(e,t){return{[`&-item:not(${t}-first-item):not(${t}-last-item)`]:{borderRadius:0},[`&-item${t}-first-item:not(${t}-last-item)`]:{[`&, &${e}-sm, &${e}-lg`]:{borderEndEndRadius:0,borderEndStartRadius:0}},[`&-item${t}-last-item:not(${t}-first-item)`]:{[`&, &${e}-sm, &${e}-lg`]:{borderStartStartRadius:0,borderStartEndRadius:0}}}}function Zle(e){const t=`${e.componentCls}-compact-vertical`;return{[t]:Be(Be({},Wle(e,t)),qle(e.componentCls,t))}}const Xle=e=>{const{componentCls:t,iconCls:r}=e;return{[t]:{outline:"none",position:"relative",display:"inline-block",fontWeight:400,whiteSpace:"nowrap",textAlign:"center",backgroundImage:"none",backgroundColor:"transparent",border:`${e.lineWidth}px ${e.lineType} transparent`,cursor:"pointer",transition:`all ${e.motionDurationMid} ${e.motionEaseInOut}`,userSelect:"none",touchAction:"manipulation",lineHeight:e.lineHeight,color:e.colorText,"> span":{display:"inline-block"},[`> ${r} + span, > span + ${r}`]:{marginInlineStart:e.marginXS},"> a":{color:"currentColor"},"&:not(:disabled)":Be({},gae(e)),[`&-icon-only${t}-compact-item`]:{flex:"none"},[`&-compact-item${t}-primary`]:{[`&:not([disabled]) + ${t}-compact-item${t}-primary:not([disabled])`]:{position:"relative","&:before":{position:"absolute",top:-e.lineWidth,insetInlineStart:-e.lineWidth,display:"inline-block",width:e.lineWidth,height:`calc(100% + ${e.lineWidth*2}px)`,backgroundColor:e.colorPrimaryHover,content:'""'}}},"&-compact-vertical-item":{[`&${t}-primary`]:{[`&:not([disabled]) + ${t}-compact-vertical-item${t}-primary:not([disabled])`]:{position:"relative","&:before":{position:"absolute",top:-e.lineWidth,insetInlineStart:-e.lineWidth,display:"inline-block",width:`calc(100% + ${e.lineWidth*2}px)`,height:e.lineWidth,backgroundColor:e.colorPrimaryHover,content:'""'}}}}}}},Ul=(e,t)=>({"&:not(:disabled)":{"&:hover":e,"&:active":t}}),Kle=e=>({minWidth:e.controlHeight,paddingInlineStart:0,paddingInlineEnd:0,borderRadius:"50%"}),Yle=e=>({borderRadius:e.controlHeight,paddingInlineStart:e.controlHeight/2,paddingInlineEnd:e.controlHeight/2}),gP=e=>({cursor:"not-allowed",borderColor:e.colorBorder,color:e.colorTextDisabled,backgroundColor:e.colorBgContainerDisabled,boxShadow:"none"}),Cb=(e,t,r,n,i,a,o)=>({[`&${e}-background-ghost`]:Be(Be({color:t||void 0,backgroundColor:"transparent",borderColor:r||void 0,boxShadow:"none"},Ul(Be({backgroundColor:"transparent"},a),Be({backgroundColor:"transparent"},o))),{"&:disabled":{cursor:"not-allowed",color:n||void 0,borderColor:i||void 0}})}),sE=e=>({"&:disabled":Be({},gP(e))}),_8=e=>Be({},sE(e)),Pb=e=>({"&:disabled":{cursor:"not-allowed",color:e.colorTextDisabled}}),b8=e=>Be(Be(Be(Be(Be({},_8(e)),{backgroundColor:e.colorBgContainer,borderColor:e.colorBorder,boxShadow:`0 ${e.controlOutlineWidth}px 0 ${e.controlTmpOutline}`}),Ul({color:e.colorPrimaryHover,borderColor:e.colorPrimaryHover},{color:e.colorPrimaryActive,borderColor:e.colorPrimaryActive})),Cb(e.componentCls,e.colorBgContainer,e.colorBgContainer,e.colorTextDisabled,e.colorBorder)),{[`&${e.componentCls}-dangerous`]:Be(Be(Be({color:e.colorError,borderColor:e.colorError},Ul({color:e.colorErrorHover,borderColor:e.colorErrorBorderHover},{color:e.colorErrorActive,borderColor:e.colorErrorActive})),Cb(e.componentCls,e.colorError,e.colorError,e.colorTextDisabled,e.colorBorder)),sE(e))}),Jle=e=>Be(Be(Be(Be(Be({},_8(e)),{color:e.colorTextLightSolid,backgroundColor:e.colorPrimary,boxShadow:`0 ${e.controlOutlineWidth}px 0 ${e.controlOutline}`}),Ul({color:e.colorTextLightSolid,backgroundColor:e.colorPrimaryHover},{color:e.colorTextLightSolid,backgroundColor:e.colorPrimaryActive})),Cb(e.componentCls,e.colorPrimary,e.colorPrimary,e.colorTextDisabled,e.colorBorder,{color:e.colorPrimaryHover,borderColor:e.colorPrimaryHover},{color:e.colorPrimaryActive,borderColor:e.colorPrimaryActive})),{[`&${e.componentCls}-dangerous`]:Be(Be(Be({backgroundColor:e.colorError,boxShadow:`0 ${e.controlOutlineWidth}px 0 ${e.colorErrorOutline}`},Ul({backgroundColor:e.colorErrorHover},{backgroundColor:e.colorErrorActive})),Cb(e.componentCls,e.colorError,e.colorError,e.colorTextDisabled,e.colorBorder,{color:e.colorErrorHover,borderColor:e.colorErrorHover},{color:e.colorErrorActive,borderColor:e.colorErrorActive})),sE(e))}),Qle=e=>Be(Be({},b8(e)),{borderStyle:"dashed"}),eue=e=>Be(Be(Be({color:e.colorLink},Ul({color:e.colorLinkHover},{color:e.colorLinkActive})),Pb(e)),{[`&${e.componentCls}-dangerous`]:Be(Be({color:e.colorError},Ul({color:e.colorErrorHover},{color:e.colorErrorActive})),Pb(e))}),tue=e=>Be(Be(Be({},Ul({color:e.colorText,backgroundColor:e.colorBgTextHover},{color:e.colorText,backgroundColor:e.colorBgTextActive})),Pb(e)),{[`&${e.componentCls}-dangerous`]:Be(Be({color:e.colorError},Pb(e)),Ul({color:e.colorErrorHover,backgroundColor:e.colorErrorBg},{color:e.colorErrorHover,backgroundColor:e.colorErrorBg}))}),rue=e=>Be(Be({},gP(e)),{[`&${e.componentCls}:hover`]:Be({},gP(e))}),nue=e=>{const{componentCls:t}=e;return{[`${t}-default`]:b8(e),[`${t}-primary`]:Jle(e),[`${t}-dashed`]:Qle(e),[`${t}-link`]:eue(e),[`${t}-text`]:tue(e),[`${t}-disabled`]:rue(e)}},lE=function(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const{componentCls:r,iconCls:n,controlHeight:i,fontSize:a,lineHeight:o,lineWidth:s,borderRadius:c,buttonPaddingHorizontal:d}=e,m=Math.max(0,(i-a*o)/2-s),v=d-s,y=`${r}-icon-only`;return[{[`${r}${t}`]:{fontSize:a,height:i,padding:`${m}px ${v}px`,borderRadius:c,[`&${y}`]:{width:i,paddingInlineStart:0,paddingInlineEnd:0,[`&${r}-round`]:{width:"auto"},"> span":{transform:"scale(1.143)"}},[`&${r}-loading`]:{opacity:e.opacityLoading,cursor:"default"},[`${r}-loading-icon`]:{transition:`width ${e.motionDurationSlow} ${e.motionEaseInOut}, opacity ${e.motionDurationSlow} ${e.motionEaseInOut}`},[`&:not(${y}) ${r}-loading-icon > ${n}`]:{marginInlineEnd:e.marginXS}}},{[`${r}${r}-circle${t}`]:Kle(e)},{[`${r}${r}-round${t}`]:Yle(e)}]},iue=e=>lE(e),aue=e=>{const t=pc(e,{controlHeight:e.controlHeightSM,padding:e.paddingXS,buttonPaddingHorizontal:8,borderRadius:e.borderRadiusSM});return lE(t,`${e.componentCls}-sm`)},oue=e=>{const t=pc(e,{controlHeight:e.controlHeightLG,fontSize:e.fontSizeLG,borderRadius:e.borderRadiusLG});return lE(t,`${e.componentCls}-lg`)},sue=e=>{const{componentCls:t}=e;return{[t]:{[`&${t}-block`]:{width:"100%"}}}},lue=hf("Button",e=>{const{controlTmpOutline:t,paddingContentHorizontal:r}=e,n=pc(e,{colorOutlineDefault:t,buttonPaddingHorizontal:r});return[Xle(n),aue(n),iue(n),oue(n),sue(n),nue(n),Gle(n),ble(e,{focus:!1}),Zle(e)]}),uue=()=>({prefixCls:String,size:{type:String}}),x8=g8(),yP=Zt({compatConfig:{MODE:3},name:"AButtonGroup",props:uue(),setup(e,t){let{slots:r}=t;const{prefixCls:n,direction:i}=Kl("btn-group",e),[,,a]=$y();x8.useProvide(oo({size:Le(()=>e.size)}));const o=Le(()=>{const{size:s}=e;let c="";switch(s){case"large":c="lg";break;case"small":c="sm";break;case"middle":case void 0:break;default:Y$(!s,"Button.Group","Invalid prop `size`.")}return{[`${n.value}`]:!0,[`${n.value}-${c}`]:c,[`${n.value}-rtl`]:i.value==="rtl",[a.value]:!0}});return()=>{var s;return ke("div",{class:o.value},[Qg((s=r.default)===null||s===void 0?void 0:s.call(r))])}}}),T3=/^[\u4e00-\u9fa5]{2}$/,C3=T3.test.bind(T3);function P0(e){return e==="text"||e==="link"}const Sg=Zt({compatConfig:{MODE:3},name:"AButton",inheritAttrs:!1,__ANT_BUTTON:!0,props:K9(Hle(),{type:"default"}),slots:Object,setup(e,t){let{slots:r,attrs:n,emit:i,expose:a}=t;const{prefixCls:o,autoInsertSpaceInButton:s,direction:c,size:d}=Kl("btn",e),[m,v]=lue(o),y=x8.useInject(),_=WI(),S=Le(()=>{var ue;return(ue=e.disabled)!==null&&ue!==void 0?ue:_.value}),I=on(null),E=on(void 0);let M=!1;const L=on(!1),R=on(!1),$=Le(()=>s.value!==!1),{compactSize:G,compactItemClassnames:j}=mle(o,c),H=Le(()=>typeof e.loading=="object"&&e.loading.delay?e.loading.delay||!0:!!e.loading);$r(H,ue=>{clearTimeout(E.value),typeof H.value=="number"?E.value=setTimeout(()=>{L.value=ue},H.value):L.value=ue},{immediate:!0});const Z=Le(()=>{const{type:ue,shape:_e="default",ghost:He,block:$e,danger:lt}=e,Ct=o.value,Ut={large:"lg",small:"sm",middle:void 0},Vt=G.value||(y==null?void 0:y.size)||d.value,lr=Vt&&Ut[Vt]||"";return[j.value,{[v.value]:!0,[`${Ct}`]:!0,[`${Ct}-${_e}`]:_e!=="default"&&_e,[`${Ct}-${ue}`]:ue,[`${Ct}-${lr}`]:lr,[`${Ct}-loading`]:L.value,[`${Ct}-background-ghost`]:He&&!P0(ue),[`${Ct}-two-chinese-chars`]:R.value&&$.value,[`${Ct}-block`]:$e,[`${Ct}-dangerous`]:!!lt,[`${Ct}-rtl`]:c.value==="rtl"}]}),Q=()=>{const ue=I.value;if(!ue||s.value===!1)return;const _e=ue.textContent;M&&C3(_e)?R.value||(R.value=!0):R.value&&(R.value=!1)},ee=ue=>{if(L.value||S.value){ue.preventDefault();return}i("click",ue)},ne=ue=>{i("mousedown",ue)},ie=(ue,_e)=>{const He=_e?" ":"";if(ue.type===Vl){let $e=ue.children.trim();return C3($e)&&($e=$e.split("").join(He)),ke("span",null,[$e])}return ue};return Hl(()=>{Y$(!(e.ghost&&P0(e.type)),"Button","`link` or `text` button can't be a `ghost` button.")}),Tn(Q),Px(Q),fc(()=>{E.value&&clearTimeout(E.value)}),a({focus:()=>{var ue;(ue=I.value)===null||ue===void 0||ue.focus()},blur:()=>{var ue;(ue=I.value)===null||ue===void 0||ue.blur()}}),()=>{var ue,_e;const{icon:He=(ue=r.icon)===null||ue===void 0?void 0:ue.call(r)}=e,$e=Qg((_e=r.default)===null||_e===void 0?void 0:_e.call(r));M=$e.length===1&&!He&&!P0(e.type);const{type:lt,htmlType:Ct,href:Ut,title:Vt,target:lr}=e,ur=L.value?"loading":He,yr=Be(Be({},n),{title:Vt,disabled:S.value,class:[Z.value,n.class,{[`${o.value}-icon-only`]:$e.length===0&&!!ur}],onClick:ee,onMousedown:ne});S.value||delete yr.disabled;const ir=He&&!L.value?He:ke(Ule,{existIcon:!!He,prefixCls:o.value,loading:!!L.value},null),Ge=$e.map(tt=>ie(tt,M&&$.value));if(Ut!==void 0)return m(ke("a",Sn(Sn({},yr),{},{href:Ut,target:lr,ref:I}),[ir,Ge]));let st=ke("button",Sn(Sn({},yr),{},{ref:I,type:Ct}),[ir,Ge]);if(!P0(lt)){const tt=function(){return st}();st=ke(jle,{ref:"wave",disabled:!!L.value},{default:()=>[tt]})}return m(st)}}});Sg.Group=yP;Sg.install=function(e){return e.component(Sg.name,Sg),e.component(yP.name,yP),e};function w8(e,t){return e.classList?e.classList.contains(t):` ${e.className} `.indexOf(` ${t} `)>-1}function cue(e,t){e.classList?e.classList.add(t):w8(e,t)||(e.className=`${e.className} ${t}`)}function hue(e,t){if(e.classList)e.classList.remove(t);else if(w8(e,t)){const r=e.className;e.className=` ${r} `.replace(` ${t} `," ")}}var ay=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function S8(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function fue(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var r=function n(){return this instanceof n?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,i.get?i:{enumerable:!0,get:function(){return e[n]}})}),r}let P2=Be({},ey.Modal);function due(e){e?P2=Be(Be({},P2),e):P2=Be({},ey.Modal)}const _P="internalMark",O1=Zt({compatConfig:{MODE:3},name:"ALocaleProvider",props:{locale:{type:Object},ANT_MARK__:String},setup(e,t){let{slots:r}=t;g$(e.ANT_MARK__===_P);const n=oo({antLocale:Be(Be({},e.locale),{exist:!0}),ANT_MARK__:_P});return Fi("localeData",n),$r(()=>e.locale,i=>{due(i&&i.Modal),n.antLocale=Be(Be({},i),{exist:!0})},{immediate:!0}),()=>{var i;return(i=r.default)===null||i===void 0?void 0:i.call(r)}}});O1.install=function(e){return e.component(O1.name,O1),e};const pue=Vx(O1),T8=Zt({name:"Notice",inheritAttrs:!1,props:["prefixCls","duration","updateMark","noticeKey","closeIcon","closable","props","onClick","onClose","holder","visible"],setup(e,t){let{attrs:r,slots:n}=t,i,a=!1;const o=Le(()=>e.duration===void 0?4.5:e.duration),s=()=>{o.value&&!a&&(i=setTimeout(()=>{d()},o.value*1e3))},c=()=>{i&&(clearTimeout(i),i=null)},d=v=>{v&&v.stopPropagation(),c();const{onClose:y,noticeKey:_}=e;y&&y(_)},m=()=>{c(),s()};return Tn(()=>{s()}),Fp(()=>{a=!0,c()}),$r([o,()=>e.updateMark,()=>e.visible],(v,y)=>{let[_,S,I]=v,[E,M,L]=y;(_!==E||S!==M||I!==L&&L)&&m()},{flush:"post"}),()=>{var v,y;const{prefixCls:_,closable:S,closeIcon:I=(v=n.closeIcon)===null||v===void 0?void 0:v.call(n),onClick:E,holder:M}=e,{class:L,style:R}=r,$=`${_}-notice`,G=Object.keys(r).reduce((H,Z)=>((Z.startsWith("data-")||Z.startsWith("aria-")||Z==="role")&&(H[Z]=r[Z]),H),{}),j=ke("div",Sn({class:hi($,L,{[`${$}-closable`]:S}),style:R,onMouseenter:c,onMouseleave:s,onClick:E},G),[ke("div",{class:`${$}-content`},[(y=n.default)===null||y===void 0?void 0:y.call(n)]),S?ke("a",{tabindex:0,onClick:d,class:`${$}-close`},[I||ke("span",{class:`${$}-close-x`},null)]):null]);return M?ke(fF,{to:M},{default:()=>j}):j}}});var mue=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i{const{prefixCls:m,animation:v="fade"}=e;let y=e.transitionName;return!y&&v&&(y=`${m}-${v}`),s8(y)}),c=(m,v)=>{const y=m.key||A3(),_=Be(Be({},m),{key:y}),{maxCount:S}=e,I=o.value.map(M=>M.notice.key).indexOf(y),E=o.value.concat();I!==-1?E.splice(I,1,{notice:_,holderCallback:v}):(S&&o.value.length>=S&&(_.key=E[0].notice.key,_.updateMark=A3(),_.userPassKey=y,E.shift()),E.push({notice:_,holderCallback:v})),o.value=E},d=m=>{o.value=o.value.filter(v=>{let{notice:{key:y,userPassKey:_}}=v;return(_||y)!==m})};return n({add:c,remove:d,notices:o}),()=>{var m;const{prefixCls:v,closeIcon:y=(m=i.closeIcon)===null||m===void 0?void 0:m.call(i,{prefixCls:v})}=e,_=o.value.map((I,E)=>{let{notice:M,holderCallback:L}=I;const R=E===o.value.length-1?M.updateMark:void 0,{key:$,userPassKey:G}=M,{content:j}=M,H=Be(Be(Be({prefixCls:v,closeIcon:typeof y=="function"?y({prefixCls:v}):y},M),M.props),{key:$,noticeKey:G||$,updateMark:R,onClose:Z=>{var Q;d(Z),(Q=M.onClose)===null||Q===void 0||Q.call(M)},onClick:M.onClick});return L?ke("div",{key:$,class:`${v}-hook-holder`,ref:Z=>{typeof $>"u"||(Z?(a.set($,Z),L(Z,H)):a.delete($))}},null):ke(T8,Sn(Sn({},H),{},{class:hi(H.class,e.hashId)}),{default:()=>[typeof j=="function"?j({prefixCls:v}):j]})}),S={[v]:1,[r.class]:!!r.class,[e.hashId]:!0};return ke("div",{class:S,style:r.style||{top:"65px",left:"50%"}},[ke(kF,Sn({tag:"div"},s.value),{default:()=>[_]})])}}});Ab.newInstance=function(t,r){const n=t||{},{name:i="notification",getContainer:a,appContext:o,prefixCls:s,rootPrefixCls:c,transitionName:d,hasTransitionName:m,useStyle:v}=n,y=mue(n,["name","getContainer","appContext","prefixCls","rootPrefixCls","transitionName","hasTransitionName","useStyle"]),_=document.createElement("div");a?a().appendChild(_):document.body.appendChild(_);const I=ke(Zt({compatConfig:{MODE:3},name:"NotificationWrapper",setup(E,M){let{attrs:L}=M;const R=on(),$=Le(()=>Ji.getPrefixCls(i,s)),[,G]=v($);return Tn(()=>{r({notice(j){var H;(H=R.value)===null||H===void 0||H.add(j)},removeNotice(j){var H;(H=R.value)===null||H===void 0||H.remove(j)},destroy(){gb(null,_),_.parentNode&&_.parentNode.removeChild(_)},component:R})}),()=>{const j=Ji,H=j.getRootPrefixCls(c,$.value),Z=m?d:`${$.value}-${d}`;return ke(Zh,Sn(Sn({},j),{},{prefixCls:H}),{default:()=>[ke(Ab,Sn(Sn({ref:R},L),{},{prefixCls:$.value,transitionName:Z,hashId:G.value}),null)]})}}}),y);I.appContext=o||I.appContext,gb(I,_)};let I3=0;const gue=Date.now();function E3(){const e=I3;return I3+=1,`rcNotification_${gue}_${e}`}const yue=Zt({name:"HookNotification",inheritAttrs:!1,props:["prefixCls","transitionName","animation","maxCount","closeIcon","hashId","remove","notices","getStyles","getClassName","onAllRemoved","getContainer"],setup(e,t){let{attrs:r,slots:n}=t;const i=new Map,a=Le(()=>e.notices),o=Le(()=>{let m=e.transitionName;if(!m&&e.animation)switch(typeof e.animation){case"string":m=e.animation;break;case"function":m=e.animation().name;break;case"object":m=e.animation.name;break;default:m=`${e.prefixCls}-fade`;break}return s8(m)}),s=m=>e.remove(m),c=Qt({});$r(a,()=>{const m={};Object.keys(c.value).forEach(v=>{m[v]=[]}),e.notices.forEach(v=>{const{placement:y="topRight"}=v.notice;y&&(m[y]=m[y]||[],m[y].push(v))}),c.value=m});const d=Le(()=>Object.keys(c.value));return()=>{var m;const{prefixCls:v,closeIcon:y=(m=n.closeIcon)===null||m===void 0?void 0:m.call(n,{prefixCls:v})}=e,_=d.value.map(S=>{var I,E;const M=c.value[S],L=(I=e.getClassName)===null||I===void 0?void 0:I.call(e,S),R=(E=e.getStyles)===null||E===void 0?void 0:E.call(e,S),$=M.map((H,Z)=>{let{notice:Q,holderCallback:ee}=H;const ne=Z===a.value.length-1?Q.updateMark:void 0,{key:ie,userPassKey:ce}=Q,{content:Ae}=Q,ue=Be(Be(Be({prefixCls:v,closeIcon:typeof y=="function"?y({prefixCls:v}):y},Q),Q.props),{key:ie,noticeKey:ce||ie,updateMark:ne,onClose:_e=>{var He;s(_e),(He=Q.onClose)===null||He===void 0||He.call(Q)},onClick:Q.onClick});return ee?ke("div",{key:ie,class:`${v}-hook-holder`,ref:_e=>{typeof ie>"u"||(_e?(i.set(ie,_e),ee(_e,ue)):i.delete(ie))}},null):ke(T8,Sn(Sn({},ue),{},{class:hi(ue.class,e.hashId)}),{default:()=>[typeof Ae=="function"?Ae({prefixCls:v}):Ae]})}),G={[v]:1,[`${v}-${S}`]:1,[r.class]:!!r.class,[e.hashId]:!0,[L]:!!L};function j(){var H;M.length>0||(Reflect.deleteProperty(c.value,S),(H=e.onAllRemoved)===null||H===void 0||H.call(e))}return ke("div",{key:S,class:G,style:r.style||R||{top:"65px",left:"50%"}},[ke(kF,Sn(Sn({tag:"div"},o.value),{},{onAfterLeave:j}),{default:()=>[$]})])});return ke(xse,{getContainer:e.getContainer},{default:()=>[_]})}}}),_ue=yue;var bue=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);idocument.body;let M3=0;function wue(){const e={};for(var t=arguments.length,r=new Array(t),n=0;n{i&&Object.keys(i).forEach(a=>{const o=i[a];o!==void 0&&(e[a]=o)})}),e}function C8(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const{getContainer:t=xue,motion:r,prefixCls:n,maxCount:i,getClassName:a,getStyles:o,onAllRemoved:s}=e,c=bue(e,["getContainer","motion","prefixCls","maxCount","getClassName","getStyles","onAllRemoved"]),d=on([]),m=on(),v=(M,L)=>{const R=M.key||E3(),$=Be(Be({},M),{key:R}),G=d.value.map(H=>H.notice.key).indexOf(R),j=d.value.concat();G!==-1?j.splice(G,1,{notice:$,holderCallback:L}):(i&&d.value.length>=i&&($.key=j[0].notice.key,$.updateMark=E3(),$.userPassKey=R,j.shift()),j.push({notice:$,holderCallback:L})),d.value=j},y=M=>{d.value=d.value.filter(L=>{let{notice:{key:R,userPassKey:$}}=L;return($||R)!==M})},_=()=>{d.value=[]},S=()=>ke(_ue,{ref:m,prefixCls:n,maxCount:i,notices:d.value,remove:y,getClassName:a,getStyles:o,animation:r,hashId:e.hashId,onAllRemoved:s,getContainer:t},null),I=on([]),E={open:M=>{const L=wue(c,M);(L.key===null||L.key===void 0)&&(L.key=`vc-notification-${M3}`,M3+=1),I.value=[...I.value,{type:"open",config:L}]},close:M=>{I.value=[...I.value,{type:"close",key:M}]},destroy:()=>{I.value=[...I.value,{type:"destroy"}]}};return $r(I,()=>{I.value.length&&(I.value.forEach(M=>{switch(M.type){case"open":v(M.config);break;case"close":y(M.key);break;case"destroy":_();break}}),I.value=[])}),[E,S]}const Sue=e=>{const{componentCls:t,iconCls:r,boxShadowSecondary:n,colorBgElevated:i,colorSuccess:a,colorError:o,colorWarning:s,colorInfo:c,fontSizeLG:d,motionEaseInOutCirc:m,motionDurationSlow:v,marginXS:y,paddingXS:_,borderRadiusLG:S,zIndexPopup:I,messageNoticeContentPadding:E}=e,M=new qh("MessageMoveIn",{"0%":{padding:0,transform:"translateY(-100%)",opacity:0},"100%":{padding:_,transform:"translateY(0)",opacity:1}}),L=new qh("MessageMoveOut",{"0%":{maxHeight:e.height,padding:_,opacity:1},"100%":{maxHeight:0,padding:0,opacity:0}});return[{[t]:Be(Be({},KI(e)),{position:"fixed",top:y,left:"50%",transform:"translateX(-50%)",width:"100%",pointerEvents:"none",zIndex:I,[`${t}-move-up`]:{animationFillMode:"forwards"},[`
+ ${t}-move-up-appear,
+ ${t}-move-up-enter
+ `]:{animationName:M,animationDuration:v,animationPlayState:"paused",animationTimingFunction:m},[`
+ ${t}-move-up-appear${t}-move-up-appear-active,
+ ${t}-move-up-enter${t}-move-up-enter-active
+ `]:{animationPlayState:"running"},[`${t}-move-up-leave`]:{animationName:L,animationDuration:v,animationPlayState:"paused",animationTimingFunction:m},[`${t}-move-up-leave${t}-move-up-leave-active`]:{animationPlayState:"running"},"&-rtl":{direction:"rtl",span:{direction:"rtl"}}})},{[`${t}-notice`]:{padding:_,textAlign:"center",[r]:{verticalAlign:"text-bottom",marginInlineEnd:y,fontSize:d},[`${t}-notice-content`]:{display:"inline-block",padding:E,background:i,borderRadius:S,boxShadow:n,pointerEvents:"all"},[`${t}-success ${r}`]:{color:a},[`${t}-error ${r}`]:{color:o},[`${t}-warning ${r}`]:{color:s},[`
+ ${t}-info ${r},
+ ${t}-loading ${r}`]:{color:c}}},{[`${t}-notice-pure-panel`]:{padding:0,textAlign:"start"}}]},P8=hf("Message",e=>{const t=pc(e,{messageNoticeContentPadding:`${(e.controlHeightLG-e.fontSize*e.lineHeight)/2}px ${e.paddingSM}px`});return[Sue(t)]},e=>({height:150,zIndexPopup:e.zIndexPopupBase+10})),Tue={info:ke(qp,null,null),success:ke(Gp,null,null),error:ke(Up,null,null),warning:ke(Wp,null,null),loading:ke(af,null,null)},Cue=Zt({name:"PureContent",inheritAttrs:!1,props:["prefixCls","type","icon"],setup(e,t){let{slots:r}=t;return()=>{var n;return ke("div",{class:hi(`${e.prefixCls}-custom-content`,`${e.prefixCls}-${e.type}`)},[e.icon||Tue[e.type],ke("span",null,[(n=r.default)===null||n===void 0?void 0:n.call(r)])])}}});var Pue=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);ia("message",e.prefixCls)),[,c]=P8(s),d=()=>{var I;const E=(I=e.top)!==null&&I!==void 0?I:Aue;return{left:"50%",transform:"translateX(-50%)",top:typeof E=="number"?`${E}px`:E}},m=()=>hi(c.value,e.rtl?`${s.value}-rtl`:""),v=()=>{var I;return Xae({prefixCls:s.value,animation:(I=e.animation)!==null&&I!==void 0?I:"move-up",transitionName:e.transitionName})},y=ke("span",{class:`${s.value}-close-x`},[ke(jy,{class:`${s.value}-close-icon`},null)]),[_,S]=C8({getStyles:d,prefixCls:s.value,getClassName:m,motion:v,closable:!1,closeIcon:y,duration:(n=e.duration)!==null&&n!==void 0?n:Iue,getContainer:(i=e.staticGetContainer)!==null&&i!==void 0?i:o.value,maxCount:e.maxCount,onAllRemoved:e.onAllRemoved});return r(Be(Be({},_),{prefixCls:s,hashId:c})),S}});let D3=0;function Mue(e){const t=on(null),r=Symbol("messageHolderKey"),n=c=>{var d;(d=t.value)===null||d===void 0||d.close(c)},i=c=>{if(!t.value){const G=()=>{};return G.then=()=>{},G}const{open:d,prefixCls:m,hashId:v}=t.value,y=`${m}-notice`,{content:_,icon:S,type:I,key:E,class:M,onClose:L}=c,R=Pue(c,["content","icon","type","key","class","onClose"]);let $=E;return $==null&&(D3+=1,$=`antd-message-${D3}`),Mne(G=>(d(Be(Be({},R),{key:$,content:()=>ke(Cue,{prefixCls:m,type:I,icon:typeof S=="function"?S():S},{default:()=>[typeof _=="function"?_():_]}),placement:"top",class:hi(I&&`${y}-${I}`,v,M),onClose:()=>{L==null||L(),G()}})),()=>{n($)}))},o={open:i,destroy:c=>{var d;c!==void 0?n(c):(d=t.value)===null||d===void 0||d.destroy()}};return["info","success","warning","error","loading"].forEach(c=>{const d=(m,v,y)=>{let _;m&&typeof m=="object"&&"content"in m?_=m:_={content:m};let S,I;typeof v=="function"?I=v:(S=v,I=y);const E=Be(Be({onClose:I,duration:S},_),{type:c});return i(E)};o[c]=d}),[o,()=>ke(Eue,Sn(Sn({key:r},e),{},{ref:t}),null)]}function Due(e){return Mue(e)}let A8=3,I8,ya,Lue=1,E8="",M8="move-up",D8=!1,L8=()=>document.body,k8,R8=!1;function kue(){return Lue++}function Rue(e){e.top!==void 0&&(I8=e.top,ya=null),e.duration!==void 0&&(A8=e.duration),e.prefixCls!==void 0&&(E8=e.prefixCls),e.getContainer!==void 0&&(L8=e.getContainer,ya=null),e.transitionName!==void 0&&(M8=e.transitionName,ya=null,D8=!0),e.maxCount!==void 0&&(k8=e.maxCount,ya=null),e.rtl!==void 0&&(R8=e.rtl)}function Oue(e,t){if(ya){t(ya);return}Ab.newInstance({appContext:e.appContext,prefixCls:e.prefixCls||E8,rootPrefixCls:e.rootPrefixCls,transitionName:M8,hasTransitionName:D8,style:{top:I8},getContainer:L8||e.getPopupContainer,maxCount:k8,name:"message",useStyle:P8},r=>{if(ya){t(ya);return}ya=r,t(r)})}const O8={info:qp,success:Gp,error:Up,warning:Wp,loading:af},zue=Object.keys(O8);function Bue(e){const t=e.duration!==void 0?e.duration:A8,r=e.key||kue(),n=new Promise(a=>{const o=()=>(typeof e.onClose=="function"&&e.onClose(),a(!0));Oue(e,s=>{s.notice({key:r,duration:t,style:e.style||{},class:e.class,content:c=>{let{prefixCls:d}=c;const m=O8[e.type],v=m?ke(m,null,null):"",y=hi(`${d}-custom-content`,{[`${d}-${e.type}`]:e.type,[`${d}-rtl`]:R8===!0});return ke("div",{class:y},[typeof e.icon=="function"?e.icon():e.icon||v,ke("span",null,[typeof e.content=="function"?e.content():e.content])])},onClose:o,onClick:e.onClick})})}),i=()=>{ya&&ya.removeNotice(r)};return i.then=(a,o)=>n.then(a,o),i.promise=n,i}function Fue(e){return Object.prototype.toString.call(e)==="[object Object]"&&!!e.content}const oy={open:Bue,config:Rue,destroy(e){if(ya)if(e){const{removeNotice:t}=ya;t(e)}else{const{destroy:t}=ya;t(),ya=null}}};function $ue(e,t){e[t]=(r,n,i)=>Fue(r)?e.open(Be(Be({},r),{type:t})):(typeof n=="function"&&(i=n,n=void 0),e.open({content:r,duration:n,type:t,onClose:i}))}zue.forEach(e=>$ue(oy,e));oy.warn=oy.warning;oy.useMessage=Due;const Nue=e=>{const{componentCls:t,width:r,notificationMarginEdge:n}=e,i=new qh("antNotificationTopFadeIn",{"0%":{marginTop:"-100%",opacity:0},"100%":{marginTop:0,opacity:1}}),a=new qh("antNotificationBottomFadeIn",{"0%":{marginBottom:"-100%",opacity:0},"100%":{marginBottom:0,opacity:1}}),o=new qh("antNotificationLeftFadeIn",{"0%":{right:{_skip_check_:!0,value:r},opacity:0},"100%":{right:{_skip_check_:!0,value:0},opacity:1}});return{[`&${t}-top, &${t}-bottom`]:{marginInline:0},[`&${t}-top`]:{[`${t}-fade-enter${t}-fade-enter-active, ${t}-fade-appear${t}-fade-appear-active`]:{animationName:i}},[`&${t}-bottom`]:{[`${t}-fade-enter${t}-fade-enter-active, ${t}-fade-appear${t}-fade-appear-active`]:{animationName:a}},[`&${t}-topLeft, &${t}-bottomLeft`]:{marginInlineEnd:0,marginInlineStart:n,[`${t}-fade-enter${t}-fade-enter-active, ${t}-fade-appear${t}-fade-appear-active`]:{animationName:o}}}},Vue=e=>{const{iconCls:t,componentCls:r,boxShadowSecondary:n,fontSizeLG:i,notificationMarginBottom:a,borderRadiusLG:o,colorSuccess:s,colorInfo:c,colorWarning:d,colorError:m,colorTextHeading:v,notificationBg:y,notificationPadding:_,notificationMarginEdge:S,motionDurationMid:I,motionEaseInOut:E,fontSize:M,lineHeight:L,width:R,notificationIconSize:$}=e,G=`${r}-notice`,j=new qh("antNotificationFadeIn",{"0%":{left:{_skip_check_:!0,value:R},opacity:0},"100%":{left:{_skip_check_:!0,value:0},opacity:1}}),H=new qh("antNotificationFadeOut",{"0%":{maxHeight:e.animationMaxHeight,marginBottom:a,opacity:1},"100%":{maxHeight:0,marginBottom:0,paddingTop:0,paddingBottom:0,opacity:0}});return[{[r]:Be(Be(Be(Be({},KI(e)),{position:"fixed",zIndex:e.zIndexPopup,marginInlineEnd:S,[`${r}-hook-holder`]:{position:"relative"},[`&${r}-top, &${r}-bottom`]:{[`${r}-notice`]:{marginInline:"auto auto"}},[`&${r}-topLeft, &${r}-bottomLeft`]:{[`${r}-notice`]:{marginInlineEnd:"auto",marginInlineStart:0}},[`${r}-fade-enter, ${r}-fade-appear`]:{animationDuration:e.motionDurationMid,animationTimingFunction:E,animationFillMode:"both",opacity:0,animationPlayState:"paused"},[`${r}-fade-leave`]:{animationTimingFunction:E,animationFillMode:"both",animationDuration:I,animationPlayState:"paused"},[`${r}-fade-enter${r}-fade-enter-active, ${r}-fade-appear${r}-fade-appear-active`]:{animationName:j,animationPlayState:"running"},[`${r}-fade-leave${r}-fade-leave-active`]:{animationName:H,animationPlayState:"running"}}),Nue(e)),{"&-rtl":{direction:"rtl",[`${r}-notice-btn`]:{float:"left"}}})},{[G]:{position:"relative",width:R,maxWidth:`calc(100vw - ${S*2}px)`,marginBottom:a,marginInlineStart:"auto",padding:_,overflow:"hidden",lineHeight:L,wordWrap:"break-word",background:y,borderRadius:o,boxShadow:n,[`${r}-close-icon`]:{fontSize:M,cursor:"pointer"},[`${G}-message`]:{marginBottom:e.marginXS,color:v,fontSize:i,lineHeight:e.lineHeightLG},[`${G}-description`]:{fontSize:M},[`&${G}-closable ${G}-message`]:{paddingInlineEnd:e.paddingLG},[`${G}-with-icon ${G}-message`]:{marginBottom:e.marginXS,marginInlineStart:e.marginSM+$,fontSize:i},[`${G}-with-icon ${G}-description`]:{marginInlineStart:e.marginSM+$,fontSize:M},[`${G}-icon`]:{position:"absolute",fontSize:$,lineHeight:0,[`&-success${t}`]:{color:s},[`&-info${t}`]:{color:c},[`&-warning${t}`]:{color:d},[`&-error${t}`]:{color:m}},[`${G}-close`]:{position:"absolute",top:e.notificationPaddingVertical,insetInlineEnd:e.notificationPaddingHorizontal,color:e.colorIcon,outline:"none",width:e.notificationCloseButtonSize,height:e.notificationCloseButtonSize,borderRadius:e.borderRadiusSM,transition:`background-color ${e.motionDurationMid}, color ${e.motionDurationMid}`,display:"flex",alignItems:"center",justifyContent:"center","&:hover":{color:e.colorIconHover,backgroundColor:e.wireframe?"transparent":e.colorFillContent}},[`${G}-btn`]:{float:"right",marginTop:e.marginSM}}},{[`${G}-pure-panel`]:{margin:0}}]},z8=hf("Notification",e=>{const t=e.paddingMD,r=e.paddingLG,n=pc(e,{notificationBg:e.colorBgElevated,notificationPaddingVertical:t,notificationPaddingHorizontal:r,notificationPadding:`${e.paddingMD}px ${e.paddingContentHorizontalLG}px`,notificationMarginBottom:e.margin,notificationMarginEdge:e.marginLG,animationMaxHeight:150,notificationIconSize:e.fontSizeLG*e.lineHeightLG,notificationCloseButtonSize:e.controlHeightLG*.55});return[Vue(n)]},e=>({zIndexPopup:e.zIndexPopupBase+50,width:384}));function jue(e,t){return ke("span",{class:`${e}-close-x`},[ke(jy,{class:`${e}-close-icon`},null)])}ke(qp,null,null),ke(Gp,null,null),ke(Up,null,null),ke(Wp,null,null),ke(af,null,null);const Hue={success:Gp,info:qp,error:Up,warning:Wp};function Uue(e){let{prefixCls:t,icon:r,type:n,message:i,description:a,btn:o}=e,s=null;if(r)s=ke("span",{class:`${t}-icon`},[Bd(r)]);else if(n){const c=Hue[n];s=ke(c,{class:`${t}-icon ${t}-icon-${n}`},null)}return ke("div",{class:hi({[`${t}-with-icon`]:s}),role:"alert"},[s,ke("div",{class:`${t}-message`},[i]),ke("div",{class:`${t}-description`},[a]),o&&ke("div",{class:`${t}-btn`},[o])])}function B8(e,t,r){let n;switch(t=typeof t=="number"?`${t}px`:t,r=typeof r=="number"?`${r}px`:r,e){case"top":n={left:"50%",transform:"translateX(-50%)",right:"auto",top:t,bottom:"auto"};break;case"topLeft":n={left:0,top:t,bottom:"auto"};break;case"topRight":n={right:0,top:t,bottom:"auto"};break;case"bottom":n={left:"50%",transform:"translateX(-50%)",right:"auto",top:"auto",bottom:r};break;case"bottomLeft":n={left:0,top:"auto",bottom:r};break;default:n={right:0,top:"auto",bottom:r};break}return n}function Gue(e){return{name:`${e}-fade`}}var Wue=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);ie.prefixCls||n("notification")),o=y=>{var _,S;return B8(y,(_=e.top)!==null&&_!==void 0?_:L3,(S=e.bottom)!==null&&S!==void 0?S:L3)},[,s]=z8(a),c=()=>hi(s.value,{[`${a.value}-rtl`]:e.rtl}),d=()=>Gue(a.value),[m,v]=C8({prefixCls:a.value,getStyles:o,getClassName:c,motion:d,closable:!0,closeIcon:jue(a.value),duration:que,getContainer:()=>{var y,_;return((y=e.getPopupContainer)===null||y===void 0?void 0:y.call(e))||((_=i.value)===null||_===void 0?void 0:_.call(i))||document.body},maxCount:e.maxCount,hashId:s.value,onAllRemoved:e.onAllRemoved});return r(Be(Be({},m),{prefixCls:a.value,hashId:s})),v}});function Xue(e){const t=on(null),r=Symbol("notificationHolderKey"),n=s=>{if(!t.value)return;const{open:c,prefixCls:d,hashId:m}=t.value,v=`${d}-notice`,{message:y,description:_,icon:S,type:I,btn:E,class:M}=s,L=Wue(s,["message","description","icon","type","btn","class"]);return c(Be(Be({placement:"topRight"},L),{content:()=>ke(Uue,{prefixCls:v,icon:typeof S=="function"?S():S,type:I,message:typeof y=="function"?y():y,description:typeof _=="function"?_():_,btn:typeof E=="function"?E():E},null),class:hi(I&&`${v}-${I}`,m,M)}))},a={open:n,destroy:s=>{var c,d;s!==void 0?(c=t.value)===null||c===void 0||c.close(s):(d=t.value)===null||d===void 0||d.destroy()}};return["success","info","warning","error"].forEach(s=>{a[s]=c=>n(Be(Be({},c),{type:s}))}),[a,()=>ke(Zue,Sn(Sn({key:r},e),{},{ref:t}),null)]}function Kue(e){return Xue(e)}const Dh={};let F8=4.5,$8="24px",N8="24px",bP="",V8="topRight",j8=()=>document.body,H8=null,xP=!1,U8;function Yue(e){const{duration:t,placement:r,bottom:n,top:i,getContainer:a,closeIcon:o,prefixCls:s}=e;s!==void 0&&(bP=s),t!==void 0&&(F8=t),r!==void 0&&(V8=r),n!==void 0&&(N8=typeof n=="number"?`${n}px`:n),i!==void 0&&($8=typeof i=="number"?`${i}px`:i),a!==void 0&&(j8=a),o!==void 0&&(H8=o),e.rtl!==void 0&&(xP=e.rtl),e.maxCount!==void 0&&(U8=e.maxCount)}function Jue(e,t){let{prefixCls:r,placement:n=V8,getContainer:i=j8,top:a,bottom:o,closeIcon:s=H8,appContext:c}=e;const{getPrefixCls:d}=cce(),m=d("notification",r||bP),v=`${m}-${n}-${xP}`,y=Dh[v];if(y){Promise.resolve(y).then(S=>{t(S)});return}const _=hi(`${m}-${n}`,{[`${m}-rtl`]:xP===!0});Ab.newInstance({name:"notification",prefixCls:r||bP,useStyle:z8,class:_,style:B8(n,a??$8,o??N8),appContext:c,getContainer:i,closeIcon:S=>{let{prefixCls:I}=S;return ke("span",{class:`${I}-close-x`},[Bd(s,{},ke(jy,{class:`${I}-close-icon`},null))])},maxCount:U8,hasTransitionName:!0},S=>{Dh[v]=S,t(S)})}const Que={success:nE,info:aE,error:oE,warning:iE};function ece(e){const{icon:t,type:r,description:n,message:i,btn:a}=e,o=e.duration===void 0?F8:e.duration;Jue(e,s=>{s.notice({content:c=>{let{prefixCls:d}=c;const m=`${d}-notice`;let v=null;if(t)v=()=>ke("span",{class:`${m}-icon`},[Bd(t)]);else if(r){const y=Que[r];v=()=>ke(y,{class:`${m}-icon ${m}-icon-${r}`},null)}return ke("div",{class:v?`${m}-with-icon`:""},[v&&v(),ke("div",{class:`${m}-message`},[!n&&v?ke("span",{class:`${m}-message-single-line-auto-margin`},null):null,Bd(i)]),ke("div",{class:`${m}-description`},[Bd(n)]),a?ke("span",{class:`${m}-btn`},[Bd(a)]):null])},duration:o,closable:!0,onClose:e.onClose,onClick:e.onClick,key:e.key,style:e.style||{},class:e.class})})}const Sp={open:ece,close(e){Object.keys(Dh).forEach(t=>Promise.resolve(Dh[t]).then(r=>{r.removeNotice(e)}))},config:Yue,destroy(){Object.keys(Dh).forEach(e=>{Promise.resolve(Dh[e]).then(t=>{t.destroy()}),delete Dh[e]})}},tce=["success","info","warning","error"];tce.forEach(e=>{Sp[e]=t=>Sp.open(Be(Be({},t),{type:e}))});Sp.warn=Sp.warning;Sp.useNotification=Kue;const rce=`-ant-${Date.now()}-${Math.random()}`;function nce(e,t){const r={},n=(o,s)=>{let c=o.clone();return c=(s==null?void 0:s(c))||c,c.toRgbString()},i=(o,s)=>{const c=new zi(o),d=rf(c.toRgbString());r[`${s}-color`]=n(c),r[`${s}-color-disabled`]=d[1],r[`${s}-color-hover`]=d[4],r[`${s}-color-active`]=d[6],r[`${s}-color-outline`]=c.clone().setAlpha(.2).toRgbString(),r[`${s}-color-deprecated-bg`]=d[0],r[`${s}-color-deprecated-border`]=d[2]};if(t.primaryColor){i(t.primaryColor,"primary");const o=new zi(t.primaryColor),s=rf(o.toRgbString());s.forEach((d,m)=>{r[`primary-${m+1}`]=d}),r["primary-color-deprecated-l-35"]=n(o,d=>d.lighten(35)),r["primary-color-deprecated-l-20"]=n(o,d=>d.lighten(20)),r["primary-color-deprecated-t-20"]=n(o,d=>d.tint(20)),r["primary-color-deprecated-t-50"]=n(o,d=>d.tint(50)),r["primary-color-deprecated-f-12"]=n(o,d=>d.setAlpha(d.getAlpha()*.12));const c=new zi(s[0]);r["primary-color-active-deprecated-f-30"]=n(c,d=>d.setAlpha(d.getAlpha()*.3)),r["primary-color-active-deprecated-d-02"]=n(c,d=>d.darken(2))}return t.successColor&&i(t.successColor,"success"),t.warningColor&&i(t.warningColor,"warning"),t.errorColor&&i(t.errorColor,"error"),t.infoColor&&i(t.infoColor,"info"),`
+ :root {
+ ${Object.keys(r).map(o=>`--${e}-${o}: ${r[o]};`).join(`
+`)}
+ }
+ `.trim()}function ice(e,t){const r=nce(e,t);jp()&&xb(r,`${rce}-dynamic-theme`)}const ace=e=>{const[t,r]=$y();return iP(Le(()=>({theme:t.value,token:r.value,hashId:"",path:["ant-design-icons",e.value]})),()=>[{[`.${e.value}`]:Be(Be({},dae()),{[`.${e.value} .${e.value}-icon`]:{display:"block"}})}])};function oce(e,t){const r=Le(()=>(e==null?void 0:e.value)||{}),n=Le(()=>r.value.inherit===!1||!(t!=null&&t.value)?R$:t.value);return Le(()=>{if(!(e!=null&&e.value))return t==null?void 0:t.value;const a=Be({},n.value.components);return Object.keys(e.value.components||{}).forEach(o=>{a[o]=Be(Be({},a[o]),e.value.components[o])}),Be(Be(Be({},n.value),r.value),{token:Be(Be({},n.value.token),r.value.token),components:a})})}var sce=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i{Be(Ji,uE),Ji.prefixCls=rp(),Ji.iconPrefixCls=G8(),Ji.getPrefixCls=(e,t)=>t||(e?`${Ji.prefixCls}-${e}`:Ji.prefixCls),Ji.getRootPrefixCls=()=>Ji.prefixCls?Ji.prefixCls:rp()});let A2;const uce=e=>{A2&&A2(),A2=Hl(()=>{Be(uE,oo(e)),Be(Ji,oo(e))}),e.theme&&ice(rp(),e.theme)},cce=()=>({getPrefixCls:(e,t)=>t||(e?`${rp()}-${e}`:rp()),getIconPrefixCls:G8,getRootPrefixCls:()=>Ji.prefixCls?Ji.prefixCls:rp()}),Zh=Zt({compatConfig:{MODE:3},name:"AConfigProvider",inheritAttrs:!1,props:One(),setup(e,t){let{slots:r}=t;const n=i$(),i=(ue,_e)=>{const{prefixCls:He="ant"}=e;if(_e)return _e;const $e=He||n.getPrefixCls("");return ue?`${$e}-${ue}`:$e},a=Le(()=>e.iconPrefixCls||n.iconPrefixCls.value||UI),o=Le(()=>a.value!==n.iconPrefixCls.value),s=Le(()=>{var ue;return e.csp||((ue=n.csp)===null||ue===void 0?void 0:ue.value)}),c=ace(a),d=oce(Le(()=>e.theme),Le(()=>{var ue;return(ue=n.theme)===null||ue===void 0?void 0:ue.value})),m=ue=>(e.renderEmpty||r.renderEmpty||n.renderEmpty||Aae)(ue),v=Le(()=>{var ue,_e;return(ue=e.autoInsertSpaceInButton)!==null&&ue!==void 0?ue:(_e=n.autoInsertSpaceInButton)===null||_e===void 0?void 0:_e.value}),y=Le(()=>{var ue;return e.locale||((ue=n.locale)===null||ue===void 0?void 0:ue.value)});$r(y,()=>{uE.locale=y.value},{immediate:!0});const _=Le(()=>{var ue;return e.direction||((ue=n.direction)===null||ue===void 0?void 0:ue.value)}),S=Le(()=>{var ue,_e;return(ue=e.space)!==null&&ue!==void 0?ue:(_e=n.space)===null||_e===void 0?void 0:_e.value}),I=Le(()=>{var ue,_e;return(ue=e.virtual)!==null&&ue!==void 0?ue:(_e=n.virtual)===null||_e===void 0?void 0:_e.value}),E=Le(()=>{var ue,_e;return(ue=e.dropdownMatchSelectWidth)!==null&&ue!==void 0?ue:(_e=n.dropdownMatchSelectWidth)===null||_e===void 0?void 0:_e.value}),M=Le(()=>{var ue;return e.getTargetContainer!==void 0?e.getTargetContainer:(ue=n.getTargetContainer)===null||ue===void 0?void 0:ue.value}),L=Le(()=>{var ue;return e.getPopupContainer!==void 0?e.getPopupContainer:(ue=n.getPopupContainer)===null||ue===void 0?void 0:ue.value}),R=Le(()=>{var ue;return e.pageHeader!==void 0?e.pageHeader:(ue=n.pageHeader)===null||ue===void 0?void 0:ue.value}),$=Le(()=>{var ue;return e.input!==void 0?e.input:(ue=n.input)===null||ue===void 0?void 0:ue.value}),G=Le(()=>{var ue;return e.pagination!==void 0?e.pagination:(ue=n.pagination)===null||ue===void 0?void 0:ue.value}),j=Le(()=>{var ue;return e.form!==void 0?e.form:(ue=n.form)===null||ue===void 0?void 0:ue.value}),H=Le(()=>{var ue;return e.select!==void 0?e.select:(ue=n.select)===null||ue===void 0?void 0:ue.value}),Z=Le(()=>e.componentSize),Q=Le(()=>e.componentDisabled),ee=Le(()=>{var ue,_e;return(ue=e.wave)!==null&&ue!==void 0?ue:(_e=n.wave)===null||_e===void 0?void 0:_e.value}),ne={csp:s,autoInsertSpaceInButton:v,locale:y,direction:_,space:S,virtual:I,dropdownMatchSelectWidth:E,getPrefixCls:i,iconPrefixCls:a,theme:Le(()=>{var ue,_e;return(ue=d.value)!==null&&ue!==void 0?ue:(_e=n.theme)===null||_e===void 0?void 0:_e.value}),renderEmpty:m,getTargetContainer:M,getPopupContainer:L,pageHeader:R,input:$,pagination:G,form:j,select:H,componentSize:Z,componentDisabled:Q,transformCellText:Le(()=>e.transformCellText),wave:ee},ie=Le(()=>{const ue=d.value||{},{algorithm:_e,token:He}=ue,$e=sce(ue,["algorithm","token"]),lt=_e&&(!Array.isArray(_e)||_e.length>0)?_$(_e):void 0;return Be(Be({},$e),{theme:lt,token:Be(Be({},Wx),He)})}),ce=Le(()=>{var ue,_e;let He={};return y.value&&(He=((ue=y.value.Form)===null||ue===void 0?void 0:ue.defaultValidateMessages)||((_e=ey.Form)===null||_e===void 0?void 0:_e.defaultValidateMessages)||{}),e.form&&e.form.validateMessages&&(He=Be(Be({},He),e.form.validateMessages)),He});zne(ne),Rne({validateMessages:ce}),Iae(Z),Bne(Q);const Ae=ue=>{var _e,He;let $e=o.value?c((_e=r.default)===null||_e===void 0?void 0:_e.call(r)):(He=r.default)===null||He===void 0?void 0:He.call(r);if(e.theme){const lt=function(){return $e}();$e=ke(wae,{value:ie.value},{default:()=>[lt]})}return ke(pue,{locale:y.value||ue,ANT_MARK__:_P},{default:()=>[$e]})};return Hl(()=>{_.value&&(oy.config({rtl:_.value==="rtl"}),Sp.config({rtl:_.value==="rtl"}))}),()=>ke(s$,{children:(ue,_e,He)=>Ae(He)},null)}});Zh.config=uce;Zh.install=function(e){e.component(Zh.name,Zh)};function k3(e,t){return{[`${e}, ${e}:hover, ${e}:focus`]:{color:t.colorTextDisabled,cursor:"not-allowed"}}}function R3(e){return{backgroundColor:e.bgColorSelected,boxShadow:e.boxShadow}}const hce=Be({overflow:"hidden"},fae),fce=e=>{const{componentCls:t}=e;return{[t]:Be(Be(Be(Be(Be({},KI(e)),{display:"inline-block",padding:e.segmentedContainerPadding,color:e.labelColor,backgroundColor:e.bgColor,borderRadius:e.borderRadius,transition:`all ${e.motionDurationMid} ${e.motionEaseInOut}`,[`${t}-group`]:{position:"relative",display:"flex",alignItems:"stretch",justifyItems:"flex-start",width:"100%"},[`&${t}-rtl`]:{direction:"rtl"},[`&${t}-block`]:{display:"flex"},[`&${t}-block ${t}-item`]:{flex:1,minWidth:0},[`${t}-item`]:{position:"relative",textAlign:"center",cursor:"pointer",transition:`color ${e.motionDurationMid} ${e.motionEaseInOut}`,borderRadius:e.borderRadiusSM,"&-selected":Be(Be({},R3(e)),{color:e.labelColorHover}),"&::after":{content:'""',position:"absolute",width:"100%",height:"100%",top:0,insetInlineStart:0,borderRadius:"inherit",transition:`background-color ${e.motionDurationMid}`,pointerEvents:"none"},[`&:hover:not(${t}-item-selected):not(${t}-item-disabled)`]:{color:e.labelColorHover,"&::after":{backgroundColor:e.bgColorHover}},"&-label":Be({minHeight:e.controlHeight-e.segmentedContainerPadding*2,lineHeight:`${e.controlHeight-e.segmentedContainerPadding*2}px`,padding:`0 ${e.segmentedPaddingHorizontal}px`},hce),"&-icon + *":{marginInlineStart:e.marginSM/2},"&-input":{position:"absolute",insetBlockStart:0,insetInlineStart:0,width:0,height:0,opacity:0,pointerEvents:"none"}},[`${t}-thumb`]:Be(Be({},R3(e)),{position:"absolute",insetBlockStart:0,insetInlineStart:0,width:0,height:"100%",padding:`${e.paddingXXS}px 0`,borderRadius:e.borderRadiusSM,[`& ~ ${t}-item:not(${t}-item-selected):not(${t}-item-disabled)::after`]:{backgroundColor:"transparent"}}),[`&${t}-lg`]:{borderRadius:e.borderRadiusLG,[`${t}-item-label`]:{minHeight:e.controlHeightLG-e.segmentedContainerPadding*2,lineHeight:`${e.controlHeightLG-e.segmentedContainerPadding*2}px`,padding:`0 ${e.segmentedPaddingHorizontal}px`,fontSize:e.fontSizeLG},[`${t}-item, ${t}-thumb`]:{borderRadius:e.borderRadius}},[`&${t}-sm`]:{borderRadius:e.borderRadiusSM,[`${t}-item-label`]:{minHeight:e.controlHeightSM-e.segmentedContainerPadding*2,lineHeight:`${e.controlHeightSM-e.segmentedContainerPadding*2}px`,padding:`0 ${e.segmentedPaddingHorizontalSM}px`},[`${t}-item, ${t}-thumb`]:{borderRadius:e.borderRadiusXS}}}),k3(`&-disabled ${t}-item`,e)),k3(`${t}-item-disabled`,e)),{[`${t}-thumb-motion-appear-active`]:{transition:`transform ${e.motionDurationSlow} ${e.motionEaseInOut}, width ${e.motionDurationSlow} ${e.motionEaseInOut}`,willChange:"transform, width"}})}},dce=hf("Segmented",e=>{const{lineWidthBold:t,lineWidth:r,colorTextLabel:n,colorText:i,colorFillSecondary:a,colorBgLayout:o,colorBgElevated:s}=e,c=pc(e,{segmentedPaddingHorizontal:e.controlPaddingHorizontal-r,segmentedPaddingHorizontalSM:e.controlPaddingHorizontalSM-r,segmentedContainerPadding:t,labelColor:n,labelColorHover:i,bgColor:o,bgColorHover:a,bgColorSelected:s});return[fce(c)]}),O3=e=>e?{left:e.offsetLeft,right:e.parentElement.clientWidth-e.clientWidth-e.offsetLeft,width:e.clientWidth}:null,dd=e=>e!==void 0?`${e}px`:void 0,pce=Zt({props:{value:is(),getValueIndex:is(),prefixCls:is(),motionName:is(),onMotionStart:is(),onMotionEnd:is(),direction:is(),containerRef:is()},emits:["motionStart","motionEnd"],setup(e,t){let{emit:r}=t;const n=Qt(),i=S=>{var I;const E=e.getValueIndex(S),M=(I=e.containerRef.value)===null||I===void 0?void 0:I.querySelectorAll(`.${e.prefixCls}-item`)[E];return(M==null?void 0:M.offsetParent)&&M},a=Qt(null),o=Qt(null);$r(()=>e.value,(S,I)=>{const E=i(I),M=i(S),L=O3(E),R=O3(M);a.value=L,o.value=R,r(E&&M?"motionStart":"motionEnd")},{flush:"post"});const s=Le(()=>{var S,I;return e.direction==="rtl"?dd(-((S=a.value)===null||S===void 0?void 0:S.right)):dd((I=a.value)===null||I===void 0?void 0:I.left)}),c=Le(()=>{var S,I;return e.direction==="rtl"?dd(-((S=o.value)===null||S===void 0?void 0:S.right)):dd((I=o.value)===null||I===void 0?void 0:I.left)});let d;const m=S=>{clearTimeout(d),No(()=>{S&&(S.style.transform="translateX(var(--thumb-start-left))",S.style.width="var(--thumb-start-width)")})},v=S=>{d=setTimeout(()=>{S&&(cue(S,`${e.motionName}-appear-active`),S.style.transform="translateX(var(--thumb-active-left))",S.style.width="var(--thumb-active-width)")})},y=S=>{a.value=null,o.value=null,S&&(S.style.transform=null,S.style.width=null,hue(S,`${e.motionName}-appear-active`)),r("motionEnd")},_=Le(()=>{var S,I;return{"--thumb-start-left":s.value,"--thumb-start-width":dd((S=a.value)===null||S===void 0?void 0:S.width),"--thumb-active-left":c.value,"--thumb-active-width":dd((I=o.value)===null||I===void 0?void 0:I.width)}});return fc(()=>{clearTimeout(d)}),()=>{const S={ref:n,style:_.value,class:[`${e.prefixCls}-thumb`]};return ke(rl,{appear:!0,onBeforeEnter:m,onEnter:v,onAfterEnter:y},{default:()=>[!a.value||!o.value?null:ke("div",S,null)]})}}});function mce(e){return e.map(t=>typeof t=="object"&&t!==null?t:{label:t==null?void 0:t.toString(),title:t==null?void 0:t.toString(),value:t})}const vce=()=>({prefixCls:String,options:YC(),block:Hh(),disabled:Hh(),size:JC(),value:Be(Be({},r$([String,Number])),{required:!0}),motionName:String,onChange:wR(),"onUpdate:value":wR()}),W8=(e,t)=>{let{slots:r,emit:n}=t;const{value:i,disabled:a,payload:o,title:s,prefixCls:c,label:d=r.label,checked:m,className:v}=e,y=_=>{a||n("change",_,i)};return ke("label",{class:hi({[`${c}-item-disabled`]:a},v)},[ke("input",{class:`${c}-item-input`,type:"radio",disabled:a,checked:m,onChange:y},null),ke("div",{class:`${c}-item-label`,title:typeof s=="string"?s:""},[typeof d=="function"?d({value:i,disabled:a,payload:o,title:s}):d??i])])};W8.inheritAttrs=!1;const gce=Zt({name:"ASegmented",inheritAttrs:!1,props:K9(vce(),{options:[],motionName:"thumb-motion"}),slots:Object,setup(e,t){let{emit:r,slots:n,attrs:i}=t;const{prefixCls:a,direction:o,size:s}=Kl("segmented",e),[c,d]=dce(a),m=on(),v=on(!1),y=Le(()=>mce(e.options)),_=(S,I)=>{e.disabled||(r("update:value",I),r("change",I))};return()=>{const S=a.value;return c(ke("div",Sn(Sn({},i),{},{class:hi(S,{[d.value]:!0,[`${S}-block`]:e.block,[`${S}-disabled`]:e.disabled,[`${S}-lg`]:s.value=="large",[`${S}-sm`]:s.value=="small",[`${S}-rtl`]:o.value==="rtl"},i.class),ref:m}),[ke("div",{class:`${S}-group`},[ke(pce,{containerRef:m,prefixCls:S,value:e.value,motionName:`${S}-${e.motionName}`,direction:o.value,getValueIndex:I=>y.value.findIndex(E=>E.value===I),onMotionStart:()=>{v.value=!0},onMotionEnd:()=>{v.value=!1}},null),y.value.map(I=>ke(W8,Sn(Sn({key:I.value,prefixCls:S,checked:I.value===e.value,onChange:_},I),{},{className:hi(I.className,`${S}-item`,{[`${S}-item-selected`]:I.value===e.value&&!v.value}),disabled:!!e.disabled||!!I.disabled}),n))])]))}}}),q8=Vx(gce),yce={components:{AButton:Sg},data(){return{keySelected:null}},props:{objs:{},initPos:{type:Number,default:0}},mounted(){this.select(Object.keys(this.objs)[this.initPos])},watch:{objs(e){for(let t in this.objs){this.keySelected=t;break}}},computed:{},methods:{select:function(e){this.keySelected=e}}};function _ce(e,t,r,n,i,a){const o=jn("a-button");return et(),Tt(Er,null,[(et(!0),Tt(Er,null,xa(r.objs,(s,c,d)=>(et(),An(o,{key:d,onClick:m=>a.select(c),class:Bi(c==i.keySelected?"selected":"unselected"),type:c==i.keySelected?"primary":"default",size:"large"},{default:jr(()=>[Js(mr(c),1)]),_:2},1032,["onClick","class","type"]))),128)),Bn(e.$slots,"default",{selected:r.objs[i.keySelected]})],64)}const Z8=Ir(yce,[["render",_ce],["__file","ObjectSelector.vue"]]),bce={data(){return{data:null}},props:{path:{type:String}},watch:{path(e){if(e)return Lr.get(e).then(t=>{this.data=t.data})}}};function xce(e,t,r,n,i,a){return Bn(e.$slots,"default",{data:i.data})}const X8=Ir(bce,[["render",xce],["__file","DataRequest.vue"]]),wce={props:["data"]},Sce={class:"cards"};function Tce(e,t,r,n,i,a){return et(),Tt("div",Sce,[(et(!0),Tt(Er,null,xa(r.data,(o,s)=>(et(),Tt("div",{key:s,class:"card"},mr(o),1))),128))])}const Cce=Ir(wce,[["render",Tce],["__scopeId","data-v-00202de1"],["__file","GridList.vue"]]),Pce={name:"BusTable",components:{"a-config-provider":Zh,"bus-timer":Sne,"data-request":X8,"object-selector":Z8,"grid-list":Cce},mounted(){function e(t){var r={};for(let v=0;v{e(t.data)})}},Ace={id:"bustable"},Ice=It("br",null,null,-1);function Ece(e,t,r,n,i,a){const o=jn("bus-timer"),s=jn("grid-list"),c=jn("data-request"),d=jn("object-selector"),m=jn("a-config-provider");return et(),Tt("div",Ace,[ke(m,{theme:{token:{colorPrimary:"#ED6D00"}}},{default:jr(()=>[ke(d,{objs:{"工作日 Workday":!0,"节假日 Holiday":!1}},{default:jr(v=>[Ice,ke(m,{theme:{token:{colorPrimary:"#49BF7C"}}},{default:jr(()=>[ke(d,{objs:v.selected?{"Line 1 号线 │ 工学院方向 To COE":"/bus_times/one_down.json","Line 1 号线 │ 欣园方向 To Joy Highland":"/bus_times/one_up.json","Line 2 号线 │ 科研楼方向 To Research Bldg.":"/bus_times/two_down.json","Line 2 号线 │ 欣园方向 To Joy Highland":"/bus_times/two_up.json"}:{"Line 1 号线 │ 工学院方向 To COE":"/bus_times/one_down_holiday.json","Line 1 号线 │ 欣园方向 To Joy Highland":"/bus_times/one_up_holiday.json"}},{default:jr(y=>[ke(c,{path:y.selected},{default:jr(({data:_})=>[_?(et(),An(o,zW(wF({key:0},_)),null,16)):Xr("",!0),_?(et(),An(s,{key:1,data:_.times},null,8,["data"])):Xr("",!0)]),_:2},1032,["path"])]),_:2},1032,["objs"])]),_:2},1024)]),_:1})]),_:1})])}const Mce=Ir(Pce,[["render",Ece],["__file","BusTable.vue"]]),Dce={name:"TabView",components:{ASegmented:q8},props:{isMapTabEnabled:{type:Boolean,default:!0}},setup(e){const t=Qt("bus-location"),r=Qt("bus-location"),n=Qt([{value:"bus-location",payload:{title:"车辆实时位置",subTitle:"Bus Realtime Location"}},{value:"timetable",payload:{title:"时间表",subTitle:"Timetable"}}]),i=o=>{r.value=o};let a=e.isMapTabEnabled;return{initSelect:t,currentSelect:r,tabOptions:n,switchTab:i,showMapChart:a}}},Lce={style:{padding:"4px 8px"}},kce={class:"tab-container"},Rce={key:0},Oce={key:0,class:"bus-location-hint"},zce={key:1};function Bce(e,t,r,n,i,a){const o=jn("a-segmented"),s=jn("RealtimeMap"),c=jn("BusChartVue"),d=jn("BusTable");return et(),Tt("div",null,[ke(o,{value:n.initSelect,"onUpdate:value":t[0]||(t[0]=m=>n.initSelect=m),options:n.tabOptions,onChange:n.switchTab},{label:jr(({payload:m})=>[It("div",Lce,[It("div",null,mr(m.title),1),It("div",null,mr(m.subTitle),1)])]),_:1},8,["value","options","onChange"]),It("div",kce,[n.currentSelect==="bus-location"?(et(),Tt("div",Rce,[n.showMapChart?(et(),Tt("div",Oce,"位置每5秒自动刷新。Location refreshes automatically every 5 seconds. ")):Xr("",!0),n.showMapChart?(et(),An(s,{key:1})):Xr("",!0),ke(c)])):Xr("",!0),n.currentSelect==="timetable"?(et(),Tt("div",zce,[ke(d)])):Xr("",!0)])])}const Fce=Ir(Dce,[["render",Bce],["__scopeId","data-v-193a2a3d"],["__file","TabView.vue"]]);var K8={exports:{}};/**
+ * MapLibre GL JS
+ * @license 3-Clause BSD. Full text of license: https://github.com/maplibre/maplibre-gl-js/blob/v4.5.0/LICENSE.txt
+ */(function(e,t){(function(r,n){e.exports=n()})(ay,function(){var r={},n={};function i(o,s,c){if(n[o]=c,o==="index"){var d="var sharedModule = {}; ("+n.shared+")(sharedModule); ("+n.worker+")(sharedModule);",m={};return n.shared(m),n.index(r,m),typeof window<"u"&&r.setWorkerUrl(window.URL.createObjectURL(new Blob([d],{type:"text/javascript"}))),r}}i("shared",["exports"],function(o){function s(h,l,f,g){return new(f||(f=Promise))(function(x,T){function A(F){try{O(g.next(F))}catch(V){T(V)}}function D(F){try{O(g.throw(F))}catch(V){T(V)}}function O(F){var V;F.done?x(F.value):(V=F.value,V instanceof f?V:new f(function(U){U(V)})).then(A,D)}O((g=g.apply(h,l||[])).next())})}function c(h){return h&&h.__esModule&&Object.prototype.hasOwnProperty.call(h,"default")?h.default:h}typeof SuppressedError=="function"&&SuppressedError;var d=m;function m(h,l){this.x=h,this.y=l}m.prototype={clone:function(){return new m(this.x,this.y)},add:function(h){return this.clone()._add(h)},sub:function(h){return this.clone()._sub(h)},multByPoint:function(h){return this.clone()._multByPoint(h)},divByPoint:function(h){return this.clone()._divByPoint(h)},mult:function(h){return this.clone()._mult(h)},div:function(h){return this.clone()._div(h)},rotate:function(h){return this.clone()._rotate(h)},rotateAround:function(h,l){return this.clone()._rotateAround(h,l)},matMult:function(h){return this.clone()._matMult(h)},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(h){return this.x===h.x&&this.y===h.y},dist:function(h){return Math.sqrt(this.distSqr(h))},distSqr:function(h){var l=h.x-this.x,f=h.y-this.y;return l*l+f*f},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(h){return Math.atan2(this.y-h.y,this.x-h.x)},angleWith:function(h){return this.angleWithSep(h.x,h.y)},angleWithSep:function(h,l){return Math.atan2(this.x*l-this.y*h,this.x*h+this.y*l)},_matMult:function(h){var l=h[2]*this.x+h[3]*this.y;return this.x=h[0]*this.x+h[1]*this.y,this.y=l,this},_add:function(h){return this.x+=h.x,this.y+=h.y,this},_sub:function(h){return this.x-=h.x,this.y-=h.y,this},_mult:function(h){return this.x*=h,this.y*=h,this},_div:function(h){return this.x/=h,this.y/=h,this},_multByPoint:function(h){return this.x*=h.x,this.y*=h.y,this},_divByPoint:function(h){return this.x/=h.x,this.y/=h.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var h=this.y;return this.y=this.x,this.x=-h,this},_rotate:function(h){var l=Math.cos(h),f=Math.sin(h),g=f*this.x+l*this.y;return this.x=l*this.x-f*this.y,this.y=g,this},_rotateAround:function(h,l){var f=Math.cos(h),g=Math.sin(h),x=l.y+g*(this.x-l.x)+f*(this.y-l.y);return this.x=l.x+f*(this.x-l.x)-g*(this.y-l.y),this.y=x,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},m.convert=function(h){return h instanceof m?h:Array.isArray(h)?new m(h[0],h[1]):h};var v=c(d),y=_;function _(h,l,f,g){this.cx=3*h,this.bx=3*(f-h)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*l,this.by=3*(g-l)-this.cy,this.ay=1-this.cy-this.by,this.p1x=h,this.p1y=l,this.p2x=f,this.p2y=g}_.prototype={sampleCurveX:function(h){return((this.ax*h+this.bx)*h+this.cx)*h},sampleCurveY:function(h){return((this.ay*h+this.by)*h+this.cy)*h},sampleCurveDerivativeX:function(h){return(3*this.ax*h+2*this.bx)*h+this.cx},solveCurveX:function(h,l){if(l===void 0&&(l=1e-6),h<0)return 0;if(h>1)return 1;for(var f=h,g=0;g<8;g++){var x=this.sampleCurveX(f)-h;if(Math.abs(x)x?A=f:D=f,f=.5*(D-A)+A;return f},solve:function(h,l){return this.sampleCurveY(this.solveCurveX(h,l))}};var S=c(y);let I,E;function M(){return I==null&&(I=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")&&typeof createImageBitmap=="function"),I}function L(){if(E==null&&(E=!1,M())){const l=new OffscreenCanvas(5,5).getContext("2d",{willReadFrequently:!0});if(l){for(let g=0;g<5*5;g++){const x=4*g;l.fillStyle=`rgb(${x},${x+1},${x+2})`,l.fillRect(g%5,Math.floor(g/5),1,1)}const f=l.getImageData(0,0,5,5).data;for(let g=0;g<5*5*4;g++)if(g%4!=3&&f[g]!==g){E=!0;break}}}return E||!1}function R(h,l,f,g){const x=new S(h,l,f,g);return T=>x.solve(T)}const $=R(.25,.1,.25,1);function G(h,l,f){return Math.min(f,Math.max(l,h))}function j(h,l,f){const g=f-l,x=((h-l)%g+g)%g+l;return x===l?f:x}function H(h,...l){for(const f of l)for(const g in f)h[g]=f[g];return h}let Z=1;function Q(h,l,f){const g={};for(const x in h)g[x]=l.call(this,h[x],x,h);return g}function ee(h,l,f){const g={};for(const x in h)l.call(this,h[x],x,h)&&(g[x]=h[x]);return g}function ne(h){return Array.isArray(h)?h.map(ne):typeof h=="object"&&h?Q(h,ne):h}const ie={};function ce(h){ie[h]||(typeof console<"u"&&console.warn(h),ie[h]=!0)}function Ae(h,l,f){return(f.y-h.y)*(l.x-h.x)>(l.y-h.y)*(f.x-h.x)}function ue(h){return typeof WorkerGlobalScope<"u"&&h!==void 0&&h instanceof WorkerGlobalScope}let _e=null;function He(h){return typeof ImageBitmap<"u"&&h instanceof ImageBitmap}const $e="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";function lt(h,l,f,g,x){return s(this,void 0,void 0,function*(){if(typeof VideoFrame>"u")throw new Error("VideoFrame not supported");const T=new VideoFrame(h,{timestamp:0});try{const A=T==null?void 0:T.format;if(!A||!A.startsWith("BGR")&&!A.startsWith("RGB"))throw new Error(`Unrecognized format ${A}`);const D=A.startsWith("BGR"),O=new Uint8ClampedArray(g*x*4);if(yield T.copyTo(O,function(F,V,U,X,J){const re=4*Math.max(-V,0),se=(Math.max(0,U)-U)*X*4+re,de=4*X,we=Math.max(0,V),Re=Math.max(0,U);return{rect:{x:we,y:Re,width:Math.min(F.width,V+X)-we,height:Math.min(F.height,U+J)-Re},layout:[{offset:se,stride:de}]}}(h,l,f,g,x)),D)for(let F=0;Fue(self)?self.worker&&self.worker.referrer:(window.location.protocol==="blob:"?window.parent:window).location.href,tt=function(h,l){if(/:\/\//.test(h.url)&&!/^https?:|^file:/.test(h.url)){const g=yr(h.url);if(g)return g(h,l);if(ue(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:"GR",data:h,targetMapId:ir},l)}if(!(/^file:/.test(f=h.url)||/^file:/.test(st())&&!/^\w+:/.test(f))){if(fetch&&Request&&AbortController&&Object.prototype.hasOwnProperty.call(Request.prototype,"signal"))return function(g,x){return s(this,void 0,void 0,function*(){const T=new Request(g.url,{method:g.method||"GET",body:g.body,credentials:g.credentials,headers:g.headers,cache:g.cache,referrer:st(),signal:x.signal});g.type!=="json"||T.headers.has("Accept")||T.headers.set("Accept","application/json");const A=yield fetch(T);if(!A.ok){const F=yield A.blob();throw new Ge(A.status,A.statusText,g.url,F)}let D;D=g.type==="arrayBuffer"||g.type==="image"?A.arrayBuffer():g.type==="json"?A.json():A.text();const O=yield D;if(x.signal.aborted)throw lr();return{data:O,cacheControl:A.headers.get("Cache-Control"),expires:A.headers.get("Expires")}})}(h,l);if(ue(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:"GR",data:h,mustQueue:!0,targetMapId:ir},l)}var f;return function(g,x){return new Promise((T,A)=>{var D;const O=new XMLHttpRequest;O.open(g.method||"GET",g.url,!0),g.type!=="arrayBuffer"&&g.type!=="image"||(O.responseType="arraybuffer");for(const F in g.headers)O.setRequestHeader(F,g.headers[F]);g.type==="json"&&(O.responseType="text",!((D=g.headers)===null||D===void 0)&&D.Accept||O.setRequestHeader("Accept","application/json")),O.withCredentials=g.credentials==="include",O.onerror=()=>{A(new Error(O.statusText))},O.onload=()=>{if(!x.signal.aborted)if((O.status>=200&&O.status<300||O.status===0)&&O.response!==null){let F=O.response;if(g.type==="json")try{F=JSON.parse(O.response)}catch(V){return void A(V)}T({data:F,cacheControl:O.getResponseHeader("Cache-Control"),expires:O.getResponseHeader("Expires")})}else{const F=new Blob([O.response],{type:O.getResponseHeader("Content-Type")});A(new Ge(O.status,O.statusText,g.url,F))}},x.signal.addEventListener("abort",()=>{O.abort(),A(lr())}),O.send(g.body)})}(h,l)};function ft(h){if(!h||h.indexOf("://")<=0||h.indexOf("data:image/")===0||h.indexOf("blob:")===0)return!0;const l=new URL(h),f=window.location;return l.protocol===f.protocol&&l.host===f.host}function dt(h,l,f){f[h]&&f[h].indexOf(l)!==-1||(f[h]=f[h]||[],f[h].push(l))}function Dt(h,l,f){if(f&&f[h]){const g=f[h].indexOf(l);g!==-1&&f[h].splice(g,1)}}class fe{constructor(l,f={}){H(this,f),this.type=l}}class ge extends fe{constructor(l,f={}){super("error",H({error:l},f))}}class Fe{on(l,f){return this._listeners=this._listeners||{},dt(l,f,this._listeners),this}off(l,f){return Dt(l,f,this._listeners),Dt(l,f,this._oneTimeListeners),this}once(l,f){return f?(this._oneTimeListeners=this._oneTimeListeners||{},dt(l,f,this._oneTimeListeners),this):new Promise(g=>this.once(l,g))}fire(l,f){typeof l=="string"&&(l=new fe(l,f||{}));const g=l.type;if(this.listens(g)){l.target=this;const x=this._listeners&&this._listeners[g]?this._listeners[g].slice():[];for(const D of x)D.call(this,l);const T=this._oneTimeListeners&&this._oneTimeListeners[g]?this._oneTimeListeners[g].slice():[];for(const D of T)Dt(g,D,this._oneTimeListeners),D.call(this,l);const A=this._eventedParent;A&&(H(l,typeof this._eventedParentData=="function"?this._eventedParentData():this._eventedParentData),A.fire(l))}else l instanceof ge&&console.error(l.error);return this}listens(l){return this._listeners&&this._listeners[l]&&this._listeners[l].length>0||this._oneTimeListeners&&this._oneTimeListeners[l]&&this._oneTimeListeners[l].length>0||this._eventedParent&&this._eventedParent.listens(l)}setEventedParent(l,f){return this._eventedParent=l,this._eventedParentData=f,this}}var ye={$version:8,$root:{version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number"},zoom:{type:"number"},bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},light:{type:"light"},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","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"},"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:"enum",default:"mercator",values:{mercator:{},globe:{}}}},paint:["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background"],paint_fill:{"fill-antialias":{type:"boolean",default:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"}},"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-extrusion-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",transition:!0,requires:["fill-extrusion-height"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_line:{"line-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["line-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"line-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",transition:!1,requires:[{"!":"line-dasharray"},{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"}},paint_circle:{"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["circle-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{},viewport:{}},default:"map",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},paint_heatmap:{"heatmap-radius":{type:"number",default:30,minimum:1,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"heatmap-color":{type:"color",default:["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],transition:!1,expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_symbol:{"icon-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["icon-image","icon-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",default:"#000000",transition:!0,overridable:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["text-field","text-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_raster:{"raster-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",default:0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_hillshade:{"hillshade-illumination-direction":{type:"number",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",default:.5,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"color",default:"#FFFFFF",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_background:{"background-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"background-pattern"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},transition:{duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},"property-type":{"data-driven":{type:"property-type"},"cross-faded":{type:"property-type"},"cross-faded-data-driven":{type:"property-type"},"color-ramp":{type:"property-type"},"data-constant":{type:"property-type"},constant:{type:"property-type"}},promoteId:{"*":{type:"string"}}};const qe=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function rt(h,l){const f={};for(const g in h)g!=="ref"&&(f[g]=h[g]);return qe.forEach(g=>{g in l&&(f[g]=l[g])}),f}function Qe(h,l){if(Array.isArray(h)){if(!Array.isArray(l)||h.length!==l.length)return!1;for(let f=0;f`:h.itemType.kind==="value"?"array":`array<${l}>`}return h.kind}const oe=[Ei,ct,or,Kt,rn,Ho,Rn,Y(tr),bs,co,be];function me(h,l){if(l.kind==="error")return null;if(h.kind==="array"){if(l.kind==="array"&&(l.N===0&&l.itemType.kind==="value"||!me(h.itemType,l.itemType))&&(typeof h.N!="number"||h.N===l.N))return null}else{if(h.kind===l.kind)return null;if(h.kind==="value"){for(const f of oe)if(!me(f,l))return null}}return`Expected ${K(h)} but found ${K(l)} instead.`}function Ie(h,l){return l.some(f=>f.kind===h.kind)}function Ee(h,l){return l.some(f=>f==="null"?h===null:f==="array"?Array.isArray(h):f==="object"?h&&!Array.isArray(h)&&typeof h=="object":f===typeof h)}function Oe(h,l){return h.kind==="array"&&l.kind==="array"?h.itemType.kind===l.itemType.kind&&typeof h.N=="number":h.kind===l.kind}const Se=.96422,Ue=.82521,Ye=4/29,Ve=6/29,ht=3*Ve*Ve,jt=Ve*Ve*Ve,qt=Math.PI/180,hr=180/Math.PI;function Rr(h){return(h%=360)<0&&(h+=360),h}function cr([h,l,f,g]){let x,T;const A=Mn((.2225045*(h=ln(h))+.7168786*(l=ln(l))+.0606169*(f=ln(f)))/1);h===l&&l===f?x=T=A:(x=Mn((.4360747*h+.3850649*l+.1430804*f)/Se),T=Mn((.0139322*h+.0971045*l+.7141733*f)/Ue));const D=116*A-16;return[D<0?0:D,500*(x-A),200*(A-T),g]}function ln(h){return h<=.04045?h/12.92:Math.pow((h+.055)/1.055,2.4)}function Mn(h){return h>jt?Math.pow(h,1/3):h/ht+Ye}function Hn([h,l,f,g]){let x=(h+16)/116,T=isNaN(l)?x:x+l/500,A=isNaN(f)?x:x-f/200;return x=1*Wr(x),T=Se*Wr(T),A=Ue*Wr(A),[Tr(3.1338561*T-1.6168667*x-.4906146*A),Tr(-.9787684*T+1.9161415*x+.033454*A),Tr(.0719453*T-.2289914*x+1.4052427*A),g]}function Tr(h){return(h=h<=.00304?12.92*h:1.055*Math.pow(h,1/2.4)-.055)<0?0:h>1?1:h}function Wr(h){return h>Ve?h*h*h:ht*(h-Ye)}function xn(h){return parseInt(h.padEnd(2,h),16)/255}function Yn(h,l){return di(l?h/100:h,0,1)}function di(h,l,f){return Math.min(Math.max(l,h),f)}function pi(h){return!h.some(Number.isNaN)}const bc={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};class qr{constructor(l,f,g,x=1,T=!0){this.r=l,this.g=f,this.b=g,this.a=x,T||(this.r*=x,this.g*=x,this.b*=x,x||this.overwriteGetter("rgb",[l,f,g,x]))}static parse(l){if(l instanceof qr)return l;if(typeof l!="string")return;const f=function(g){if((g=g.toLowerCase().trim())==="transparent")return[0,0,0,0];const x=bc[g];if(x){const[A,D,O]=x;return[A/255,D/255,O/255,1]}if(g.startsWith("#")&&/^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/.test(g)){const A=g.length<6?1:2;let D=1;return[xn(g.slice(D,D+=A)),xn(g.slice(D,D+=A)),xn(g.slice(D,D+=A)),xn(g.slice(D,D+A)||"ff")]}if(g.startsWith("rgb")){const A=g.match(/^rgba?\(\s*([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(A){const[D,O,F,V,U,X,J,re,se,de,we,Re]=A,Ce=[V||" ",J||" ",de].join("");if(Ce===" "||Ce===" /"||Ce===",,"||Ce===",,,"){const De=[F,X,se].join(""),je=De==="%%%"?100:De===""?255:0;if(je){const Je=[di(+O/je,0,1),di(+U/je,0,1),di(+re/je,0,1),we?Yn(+we,Re):1];if(pi(Je))return Je}}return}}const T=g.match(/^hsla?\(\s*([\de.+-]+)(?:deg)?(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(T){const[A,D,O,F,V,U,X,J,re]=T,se=[O||" ",V||" ",X].join("");if(se===" "||se===" /"||se===",,"||se===",,,"){const de=[+D,di(+F,0,100),di(+U,0,100),J?Yn(+J,re):1];if(pi(de))return function([we,Re,Ce,De]){function je(Je){const yt=(Je+we/30)%12,Ht=Re*Math.min(Ce,1-Ce);return Ce-Ht*Math.max(-1,Math.min(yt-3,9-yt,1))}return we=Rr(we),Re/=100,Ce/=100,[je(0),je(8),je(4),De]}(de)}}}(l);return f?new qr(...f,!1):void 0}get rgb(){const{r:l,g:f,b:g,a:x}=this,T=x||1/0;return this.overwriteGetter("rgb",[l/T,f/T,g/T,x])}get hcl(){return this.overwriteGetter("hcl",function(l){const[f,g,x,T]=cr(l),A=Math.sqrt(g*g+x*x);return[Math.round(1e4*A)?Rr(Math.atan2(x,g)*hr):NaN,A,f,T]}(this.rgb))}get lab(){return this.overwriteGetter("lab",cr(this.rgb))}overwriteGetter(l,f){return Object.defineProperty(this,l,{value:f}),f}toString(){const[l,f,g,x]=this.rgb;return`rgba(${[l,f,g].map(T=>Math.round(255*T)).join(",")},${x})`}}qr.black=new qr(0,0,0,1),qr.white=new qr(1,1,1,1),qr.transparent=new qr(0,0,0,0),qr.red=new qr(1,0,0,1);class im{constructor(l,f,g){this.sensitivity=l?f?"variant":"case":f?"accent":"base",this.locale=g,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}compare(l,f){return this.collator.compare(l,f)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}}class am{constructor(l,f,g,x,T){this.text=l,this.image=f,this.scale=g,this.fontStack=x,this.textColor=T}}class aa{constructor(l){this.sections=l}static fromString(l){return new aa([new am(l,null,null,null,null)])}isEmpty(){return this.sections.length===0||!this.sections.some(l=>l.text.length!==0||l.image&&l.image.name.length!==0)}static factory(l){return l instanceof aa?l:aa.fromString(l)}toString(){return this.sections.length===0?"":this.sections.map(l=>l.text).join("")}}class oa{constructor(l){this.values=l.slice()}static parse(l){if(l instanceof oa)return l;if(typeof l=="number")return new oa([l,l,l,l]);if(Array.isArray(l)&&!(l.length<1||l.length>4)){for(const f of l)if(typeof f!="number")return;switch(l.length){case 1:l=[l[0],l[0],l[0],l[0]];break;case 2:l=[l[0],l[1],l[0],l[1]];break;case 3:l=[l[0],l[1],l[2],l[1]]}return new oa(l)}}toString(){return JSON.stringify(this.values)}}const zw=new Set(["center","left","right","top","bottom","top-left","top-right","bottom-left","bottom-right"]);class sa{constructor(l){this.values=l.slice()}static parse(l){if(l instanceof sa)return l;if(Array.isArray(l)&&!(l.length<1)&&l.length%2==0){for(let f=0;f=0&&h<=255&&typeof l=="number"&&l>=0&&l<=255&&typeof f=="number"&&f>=0&&f<=255?g===void 0||typeof g=="number"&&g>=0&&g<=1?null:`Invalid rgba value [${[h,l,f,g].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${(typeof g=="number"?[h,l,f,g]:[h,l,f]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function xc(h){if(h===null||typeof h=="string"||typeof h=="boolean"||typeof h=="number"||h instanceof qr||h instanceof im||h instanceof aa||h instanceof oa||h instanceof sa||h instanceof mi)return!0;if(Array.isArray(h)){for(const l of h)if(!xc(l))return!1;return!0}if(typeof h=="object"){for(const l in h)if(!xc(h[l]))return!1;return!0}return!1}function Un(h){if(h===null)return Ei;if(typeof h=="string")return or;if(typeof h=="boolean")return Kt;if(typeof h=="number")return ct;if(h instanceof qr)return rn;if(h instanceof im)return uo;if(h instanceof aa)return Ho;if(h instanceof oa)return bs;if(h instanceof sa)return be;if(h instanceof mi)return co;if(Array.isArray(h)){const l=h.length;let f;for(const g of h){const x=Un(g);if(f){if(f===x)continue;f=tr;break}f=x}return Y(f||tr,l)}return Rn}function Uo(h){const l=typeof h;return h===null?"":l==="string"||l==="number"||l==="boolean"?String(h):h instanceof qr||h instanceof aa||h instanceof oa||h instanceof sa||h instanceof mi?h.toString():JSON.stringify(h)}class cl{constructor(l,f){this.type=l,this.value=f}static parse(l,f){if(l.length!==2)return f.error(`'literal' expression requires exactly one argument, but found ${l.length-1} instead.`);if(!xc(l[1]))return f.error("invalid value");const g=l[1];let x=Un(g);const T=f.expectedType;return x.kind!=="array"||x.N!==0||!T||T.kind!=="array"||typeof T.N=="number"&&T.N!==0||(x=T),new cl(x,g)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}}class Nn{constructor(l){this.name="ExpressionEvaluationError",this.message=l}toJSON(){return this.message}}const _f={string:or,number:ct,boolean:Kt,object:Rn};class Sa{constructor(l,f){this.type=l,this.args=f}static parse(l,f){if(l.length<2)return f.error("Expected at least one argument.");let g,x=1;const T=l[0];if(T==="array"){let D,O;if(l.length>2){const F=l[1];if(typeof F!="string"||!(F in _f)||F==="object")return f.error('The item type argument of "array" must be one of string, number, boolean',1);D=_f[F],x++}else D=tr;if(l.length>3){if(l[2]!==null&&(typeof l[2]!="number"||l[2]<0||l[2]!==Math.floor(l[2])))return f.error('The length argument to "array" must be a positive integer literal',2);O=l[2],x++}g=Y(D,O)}else{if(!_f[T])throw new Error(`Types doesn't contain name = ${T}`);g=_f[T]}const A=[];for(;xl.outputDefined())}}const wc={"to-boolean":Kt,"to-color":rn,"to-number":ct,"to-string":or};class xs{constructor(l,f){this.type=l,this.args=f}static parse(l,f){if(l.length<2)return f.error("Expected at least one argument.");const g=l[0];if(!wc[g])throw new Error(`Can't parse ${g} as it is not part of the known types`);if((g==="to-boolean"||g==="to-string")&&l.length!==2)return f.error("Expected one argument.");const x=wc[g],T=[];for(let A=1;A4?`Invalid rbga value ${JSON.stringify(f)}: expected an array containing either three or four numeric values.`:yf(f[0],f[1],f[2],f[3]),!g))return new qr(f[0]/255,f[1]/255,f[2]/255,f[3])}throw new Nn(g||`Could not parse color from value '${typeof f=="string"?f:JSON.stringify(f)}'`)}case"padding":{let f;for(const g of this.args){f=g.evaluate(l);const x=oa.parse(f);if(x)return x}throw new Nn(`Could not parse padding from value '${typeof f=="string"?f:JSON.stringify(f)}'`)}case"variableAnchorOffsetCollection":{let f;for(const g of this.args){f=g.evaluate(l);const x=sa.parse(f);if(x)return x}throw new Nn(`Could not parse variableAnchorOffsetCollection from value '${typeof f=="string"?f:JSON.stringify(f)}'`)}case"number":{let f=null;for(const g of this.args){if(f=g.evaluate(l),f===null)return 0;const x=Number(f);if(!isNaN(x))return x}throw new Nn(`Could not convert ${JSON.stringify(f)} to number.`)}case"formatted":return aa.fromString(Uo(this.args[0].evaluate(l)));case"resolvedImage":return mi.fromString(Uo(this.args[0].evaluate(l)));default:return Uo(this.args[0].evaluate(l))}}eachChild(l){this.args.forEach(l)}outputDefined(){return this.args.every(l=>l.outputDefined())}}const om=["Unknown","Point","LineString","Polygon"];class Sc{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"?om[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(l){let f=this._parseColorCache[l];return f||(f=this._parseColorCache[l]=qr.parse(l)),f}}class ws{constructor(l,f,g=[],x,T=new kn,A=[]){this.registry=l,this.path=g,this.key=g.map(D=>`[${D}]`).join(""),this.scope=T,this.errors=A,this.expectedType=x,this._isConstant=f}parse(l,f,g,x,T={}){return f?this.concat(f,g,x)._parse(l,T):this._parse(l,T)}_parse(l,f){function g(x,T,A){return A==="assert"?new Sa(T,[x]):A==="coerce"?new xs(T,[x]):x}if(l!==null&&typeof l!="string"&&typeof l!="boolean"&&typeof l!="number"||(l=["literal",l]),Array.isArray(l)){if(l.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');const x=l[0];if(typeof x!="string")return this.error(`Expression name must be a string, but found ${typeof x} instead. If you wanted a literal array, use ["literal", [...]].`,0),null;const T=this.registry[x];if(T){let A=T.parse(l,this);if(!A)return null;if(this.expectedType){const D=this.expectedType,O=A.type;if(D.kind!=="string"&&D.kind!=="number"&&D.kind!=="boolean"&&D.kind!=="object"&&D.kind!=="array"||O.kind!=="value")if(D.kind!=="color"&&D.kind!=="formatted"&&D.kind!=="resolvedImage"||O.kind!=="value"&&O.kind!=="string")if(D.kind!=="padding"||O.kind!=="value"&&O.kind!=="number"&&O.kind!=="array")if(D.kind!=="variableAnchorOffsetCollection"||O.kind!=="value"&&O.kind!=="array"){if(this.checkSubtype(D,O))return null}else A=g(A,D,f.typeAnnotation||"coerce");else A=g(A,D,f.typeAnnotation||"coerce");else A=g(A,D,f.typeAnnotation||"coerce");else A=g(A,D,f.typeAnnotation||"assert")}if(!(A instanceof cl)&&A.type.kind!=="resolvedImage"&&this._isConstant(A)){const D=new Sc;try{A=new cl(A.type,A.evaluate(D))}catch(O){return this.error(O.message),null}}return A}return this.error(`Unknown expression "${x}". If you wanted a literal array, use ["literal", [...]].`,0)}return this.error(l===void 0?"'undefined' value invalid. Use null instead.":typeof l=="object"?'Bare objects invalid. Use ["literal", {...}] instead.':`Expected an array, but found ${typeof l} instead.`)}concat(l,f,g){const x=typeof l=="number"?this.path.concat(l):this.path,T=g?this.scope.concat(g):this.scope;return new ws(this.registry,this._isConstant,x,f||null,T,this.errors)}error(l,...f){const g=`${this.key}${f.map(x=>`[${x}]`).join("")}`;this.errors.push(new kr(g,l))}checkSubtype(l,f){const g=me(l,f);return g&&this.error(g),g}}class Fr{constructor(l,f){this.type=f.type,this.bindings=[].concat(l),this.result=f}evaluate(l){return this.result.evaluate(l)}eachChild(l){for(const f of this.bindings)l(f[1]);l(this.result)}static parse(l,f){if(l.length<4)return f.error(`Expected at least 3 arguments, but found ${l.length-1} instead.`);const g=[];for(let T=1;T=g.length)throw new Nn(`Array index out of bounds: ${f} > ${g.length-1}.`);if(f!==Math.floor(f))throw new Nn(`Array index must be an integer, but found ${f} instead.`);return g[f]}eachChild(l){l(this.index),l(this.input)}outputDefined(){return!1}}class Tc{constructor(l,f){this.type=Kt,this.needle=l,this.haystack=f}static parse(l,f){if(l.length!==3)return f.error(`Expected 2 arguments, but found ${l.length-1} instead.`);const g=f.parse(l[1],1,tr),x=f.parse(l[2],2,tr);return g&&x?Ie(g.type,[Kt,or,ct,Ei,tr])?new Tc(g,x):f.error(`Expected first argument to be of type boolean, string, number or null, but found ${K(g.type)} instead`):null}evaluate(l){const f=this.needle.evaluate(l),g=this.haystack.evaluate(l);if(!g)return!1;if(!Ee(f,["boolean","string","number","null"]))throw new Nn(`Expected first argument to be of type boolean, string, number or null, but found ${K(Un(f))} instead.`);if(!Ee(g,["string","array"]))throw new Nn(`Expected second argument to be of type array or string, but found ${K(Un(g))} instead.`);return g.indexOf(f)>=0}eachChild(l){l(this.needle),l(this.haystack)}outputDefined(){return!0}}class xf{constructor(l,f,g){this.type=ct,this.needle=l,this.haystack=f,this.fromIndex=g}static parse(l,f){if(l.length<=2||l.length>=5)return f.error(`Expected 3 or 4 arguments, but found ${l.length-1} instead.`);const g=f.parse(l[1],1,tr),x=f.parse(l[2],2,tr);if(!g||!x)return null;if(!Ie(g.type,[Kt,or,ct,Ei,tr]))return f.error(`Expected first argument to be of type boolean, string, number or null, but found ${K(g.type)} instead`);if(l.length===4){const T=f.parse(l[3],3,ct);return T?new xf(g,x,T):null}return new xf(g,x)}evaluate(l){const f=this.needle.evaluate(l),g=this.haystack.evaluate(l);if(!Ee(f,["boolean","string","number","null"]))throw new Nn(`Expected first argument to be of type boolean, string, number or null, but found ${K(Un(f))} instead.`);if(!Ee(g,["string","array"]))throw new Nn(`Expected second argument to be of type array or string, but found ${K(Un(g))} instead.`);if(this.fromIndex){const x=this.fromIndex.evaluate(l);return g.indexOf(f,x)}return g.indexOf(f)}eachChild(l){l(this.needle),l(this.haystack),this.fromIndex&&l(this.fromIndex)}outputDefined(){return!1}}class wf{constructor(l,f,g,x,T,A){this.inputType=l,this.type=f,this.input=g,this.cases=x,this.outputs=T,this.otherwise=A}static parse(l,f){if(l.length<5)return f.error(`Expected at least 4 arguments, but found only ${l.length-1}.`);if(l.length%2!=1)return f.error("Expected an even number of arguments.");let g,x;f.expectedType&&f.expectedType.kind!=="value"&&(x=f.expectedType);const T={},A=[];for(let F=2;FNumber.MAX_SAFE_INTEGER)return X.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);if(typeof re=="number"&&Math.floor(re)!==re)return X.error("Numeric branch labels must be integer values.");if(g){if(X.checkSubtype(g,Un(re)))return null}else g=Un(re);if(T[String(re)]!==void 0)return X.error("Branch labels must be unique.");T[String(re)]=A.length}const J=f.parse(U,F,x);if(!J)return null;x=x||J.type,A.push(J)}const D=f.parse(l[1],1,tr);if(!D)return null;const O=f.parse(l[l.length-1],l.length-1,x);return O?D.type.kind!=="value"&&f.concat(1).checkSubtype(g,D.type)?null:new wf(g,x,D,T,A,O):null}evaluate(l){const f=this.input.evaluate(l);return(Un(f)===this.inputType&&this.outputs[this.cases[f]]||this.otherwise).evaluate(l)}eachChild(l){l(this.input),this.outputs.forEach(l),l(this.otherwise)}outputDefined(){return this.outputs.every(l=>l.outputDefined())&&this.otherwise.outputDefined()}}class Sf{constructor(l,f,g){this.type=l,this.branches=f,this.otherwise=g}static parse(l,f){if(l.length<4)return f.error(`Expected at least 3 arguments, but found only ${l.length-1}.`);if(l.length%2!=0)return f.error("Expected an odd number of arguments.");let g;f.expectedType&&f.expectedType.kind!=="value"&&(g=f.expectedType);const x=[];for(let A=1;Af.outputDefined())&&this.otherwise.outputDefined()}}class Tf{constructor(l,f,g,x){this.type=l,this.input=f,this.beginIndex=g,this.endIndex=x}static parse(l,f){if(l.length<=2||l.length>=5)return f.error(`Expected 3 or 4 arguments, but found ${l.length-1} instead.`);const g=f.parse(l[1],1,tr),x=f.parse(l[2],2,ct);if(!g||!x)return null;if(!Ie(g.type,[Y(tr),or,tr]))return f.error(`Expected first argument to be of type array or string, but found ${K(g.type)} instead`);if(l.length===4){const T=f.parse(l[3],3,ct);return T?new Tf(g.type,g,x,T):null}return new Tf(g.type,g,x)}evaluate(l){const f=this.input.evaluate(l),g=this.beginIndex.evaluate(l);if(!Ee(f,["string","array"]))throw new Nn(`Expected first argument to be of type array or string, but found ${K(Un(f))} instead.`);if(this.endIndex){const x=this.endIndex.evaluate(l);return f.slice(g,x)}return f.slice(g)}eachChild(l){l(this.input),l(this.beginIndex),this.endIndex&&l(this.endIndex)}outputDefined(){return!1}}function Cc(h,l){const f=h.length-1;let g,x,T=0,A=f,D=0;for(;T<=A;)if(D=Math.floor((T+A)/2),g=h[D],x=h[D+1],g<=l){if(D===f||ll))throw new Nn("Input is not a number.");A=D-1}return 0}class Ql{constructor(l,f,g){this.type=l,this.input=f,this.labels=[],this.outputs=[];for(const[x,T]of g)this.labels.push(x),this.outputs.push(T)}static parse(l,f){if(l.length-1<4)return f.error(`Expected at least 4 arguments, but found only ${l.length-1}.`);if((l.length-1)%2!=0)return f.error("Expected an even number of arguments.");const g=f.parse(l[1],1,ct);if(!g)return null;const x=[];let T=null;f.expectedType&&f.expectedType.kind!=="value"&&(T=f.expectedType);for(let A=1;A=D)return f.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',F);const U=f.parse(O,V,T);if(!U)return null;T=T||U.type,x.push([D,U])}return new Ql(T,g,x)}evaluate(l){const f=this.labels,g=this.outputs;if(f.length===1)return g[0].evaluate(l);const x=this.input.evaluate(l);if(x<=f[0])return g[0].evaluate(l);const T=f.length;return x>=f[T-1]?g[T-1].evaluate(l):g[Cc(f,x)].evaluate(l)}eachChild(l){l(this.input);for(const f of this.outputs)l(f)}outputDefined(){return this.outputs.every(l=>l.outputDefined())}}function Bw(h){return h&&h.__esModule&&Object.prototype.hasOwnProperty.call(h,"default")?h.default:h}var Fw=e_;function e_(h,l,f,g){this.cx=3*h,this.bx=3*(f-h)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*l,this.by=3*(g-l)-this.cy,this.ay=1-this.cy-this.by,this.p1x=h,this.p1y=l,this.p2x=f,this.p2y=g}e_.prototype={sampleCurveX:function(h){return((this.ax*h+this.bx)*h+this.cx)*h},sampleCurveY:function(h){return((this.ay*h+this.by)*h+this.cy)*h},sampleCurveDerivativeX:function(h){return(3*this.ax*h+2*this.bx)*h+this.cx},solveCurveX:function(h,l){if(l===void 0&&(l=1e-6),h<0)return 0;if(h>1)return 1;for(var f=h,g=0;g<8;g++){var x=this.sampleCurveX(f)-h;if(Math.abs(x)x?A=f:D=f,f=.5*(D-A)+A;return f},solve:function(h,l){return this.sampleCurveY(this.solveCurveX(h,l))}};var $w=Bw(Fw);function Ss(h,l,f){return h+f*(l-h)}function Pc(h,l,f){return h.map((g,x)=>Ss(g,l[x],f))}const la={number:Ss,color:function(h,l,f,g="rgb"){switch(g){case"rgb":{const[x,T,A,D]=Pc(h.rgb,l.rgb,f);return new qr(x,T,A,D,!1)}case"hcl":{const[x,T,A,D]=h.hcl,[O,F,V,U]=l.hcl;let X,J;if(isNaN(x)||isNaN(O))isNaN(x)?isNaN(O)?X=NaN:(X=O,A!==1&&A!==0||(J=F)):(X=x,V!==1&&V!==0||(J=T));else{let Re=O-x;O>x&&Re>180?Re-=360:O180&&(Re+=360),X=x+f*Re}const[re,se,de,we]=function([Re,Ce,De,je]){return Re=isNaN(Re)?0:Re*qt,Hn([De,Math.cos(Re)*Ce,Math.sin(Re)*Ce,je])}([X,J??Ss(T,F,f),Ss(A,V,f),Ss(D,U,f)]);return new qr(re,se,de,we,!1)}case"lab":{const[x,T,A,D]=Hn(Pc(h.lab,l.lab,f));return new qr(x,T,A,D,!1)}}},array:Pc,padding:function(h,l,f){return new oa(Pc(h.values,l.values,f))},variableAnchorOffsetCollection:function(h,l,f){const g=h.values,x=l.values;if(g.length!==x.length)throw new Nn(`Cannot interpolate values of different length. from: ${h.toString()}, to: ${l.toString()}`);const T=[];for(let A=0;Atypeof V!="number"||V<0||V>1))return f.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);x={name:"cubic-bezier",controlPoints:F}}}if(l.length-1<4)return f.error(`Expected at least 4 arguments, but found only ${l.length-1}.`);if((l.length-1)%2!=0)return f.error("Expected an even number of arguments.");if(T=f.parse(T,2,ct),!T)return null;const D=[];let O=null;g==="interpolate-hcl"||g==="interpolate-lab"?O=rn:f.expectedType&&f.expectedType.kind!=="value"&&(O=f.expectedType);for(let F=0;F=V)return f.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',X);const re=f.parse(U,J,O);if(!re)return null;O=O||re.type,D.push([V,re])}return Oe(O,ct)||Oe(O,rn)||Oe(O,bs)||Oe(O,be)||Oe(O,Y(ct))?new ua(O,g,x,T,D):f.error(`Type ${K(O)} is not interpolatable.`)}evaluate(l){const f=this.labels,g=this.outputs;if(f.length===1)return g[0].evaluate(l);const x=this.input.evaluate(l);if(x<=f[0])return g[0].evaluate(l);const T=f.length;if(x>=f[T-1])return g[T-1].evaluate(l);const A=Cc(f,x),D=ua.interpolationFactor(this.interpolation,x,f[A],f[A+1]),O=g[A].evaluate(l),F=g[A+1].evaluate(l);switch(this.operator){case"interpolate":return la[this.type.kind](O,F,D);case"interpolate-hcl":return la.color(O,F,D,"hcl");case"interpolate-lab":return la.color(O,F,D,"lab")}}eachChild(l){l(this.input);for(const f of this.outputs)l(f)}outputDefined(){return this.outputs.every(l=>l.outputDefined())}}function Ac(h,l,f,g){const x=g-f,T=h-f;return x===0?0:l===1?T/x:(Math.pow(l,T)-1)/(Math.pow(l,x)-1)}class Cf{constructor(l,f){this.type=l,this.args=f}static parse(l,f){if(l.length<2)return f.error("Expectected at least one argument.");let g=null;const x=f.expectedType;x&&x.kind!=="value"&&(g=x);const T=[];for(const D of l.slice(1)){const O=f.parse(D,1+T.length,g,void 0,{typeAnnotation:"omit"});if(!O)return null;g=g||O.type,T.push(O)}if(!g)throw new Error("No output type");const A=x&&T.some(D=>me(x,D.type));return new Cf(A?tr:g,T)}evaluate(l){let f,g=null,x=0;for(const T of this.args)if(x++,g=T.evaluate(l),g&&g instanceof mi&&!g.available&&(f||(f=g.name),g=null,x===this.args.length&&(g=f)),g!==null)break;return g}eachChild(l){this.args.forEach(l)}outputDefined(){return this.args.every(l=>l.outputDefined())}}function t_(h,l){return h==="=="||h==="!="?l.kind==="boolean"||l.kind==="string"||l.kind==="number"||l.kind==="null"||l.kind==="value":l.kind==="string"||l.kind==="number"||l.kind==="value"}function r_(h,l,f,g){return g.compare(l,f)===0}function hl(h,l,f){const g=h!=="=="&&h!=="!=";return class Y8{constructor(T,A,D){this.type=Kt,this.lhs=T,this.rhs=A,this.collator=D,this.hasUntypedArgument=T.type.kind==="value"||A.type.kind==="value"}static parse(T,A){if(T.length!==3&&T.length!==4)return A.error("Expected two or three arguments.");const D=T[0];let O=A.parse(T[1],1,tr);if(!O)return null;if(!t_(D,O.type))return A.concat(1).error(`"${D}" comparisons are not supported for type '${K(O.type)}'.`);let F=A.parse(T[2],2,tr);if(!F)return null;if(!t_(D,F.type))return A.concat(2).error(`"${D}" comparisons are not supported for type '${K(F.type)}'.`);if(O.type.kind!==F.type.kind&&O.type.kind!=="value"&&F.type.kind!=="value")return A.error(`Cannot compare types '${K(O.type)}' and '${K(F.type)}'.`);g&&(O.type.kind==="value"&&F.type.kind!=="value"?O=new Sa(F.type,[O]):O.type.kind!=="value"&&F.type.kind==="value"&&(F=new Sa(O.type,[F])));let V=null;if(T.length===4){if(O.type.kind!=="string"&&F.type.kind!=="string"&&O.type.kind!=="value"&&F.type.kind!=="value")return A.error("Cannot use collator to compare non-string types.");if(V=A.parse(T[3],3,uo),!V)return null}return new Y8(O,F,V)}evaluate(T){const A=this.lhs.evaluate(T),D=this.rhs.evaluate(T);if(g&&this.hasUntypedArgument){const O=Un(A),F=Un(D);if(O.kind!==F.kind||O.kind!=="string"&&O.kind!=="number")throw new Nn(`Expected arguments for "${h}" to be (string, string) or (number, number), but found (${O.kind}, ${F.kind}) instead.`)}if(this.collator&&!g&&this.hasUntypedArgument){const O=Un(A),F=Un(D);if(O.kind!=="string"||F.kind!=="string")return l(T,A,D)}return this.collator?f(T,A,D,this.collator.evaluate(T)):l(T,A,D)}eachChild(T){T(this.lhs),T(this.rhs),this.collator&&T(this.collator)}outputDefined(){return!0}}}const n_=hl("==",function(h,l,f){return l===f},r_),Nw=hl("!=",function(h,l,f){return l!==f},function(h,l,f,g){return!r_(0,l,f,g)}),Vw=hl("<",function(h,l,f){return l",function(h,l,f){return l>f},function(h,l,f,g){return g.compare(l,f)>0}),a_=hl("<=",function(h,l,f){return l<=f},function(h,l,f,g){return g.compare(l,f)<=0}),jw=hl(">=",function(h,l,f){return l>=f},function(h,l,f,g){return g.compare(l,f)>=0});class Pf{constructor(l,f,g){this.type=uo,this.locale=g,this.caseSensitive=l,this.diacriticSensitive=f}static parse(l,f){if(l.length!==2)return f.error("Expected one argument.");const g=l[1];if(typeof g!="object"||Array.isArray(g))return f.error("Collator options argument must be an object.");const x=f.parse(g["case-sensitive"]!==void 0&&g["case-sensitive"],1,Kt);if(!x)return null;const T=f.parse(g["diacritic-sensitive"]!==void 0&&g["diacritic-sensitive"],1,Kt);if(!T)return null;let A=null;return g.locale&&(A=f.parse(g.locale,1,or),!A)?null:new Pf(x,T,A)}evaluate(l){return new im(this.caseSensitive.evaluate(l),this.diacriticSensitive.evaluate(l),this.locale?this.locale.evaluate(l):null)}eachChild(l){l(this.caseSensitive),l(this.diacriticSensitive),this.locale&&l(this.locale)}outputDefined(){return!1}}class lm{constructor(l,f,g,x,T){this.type=or,this.number=l,this.locale=f,this.currency=g,this.minFractionDigits=x,this.maxFractionDigits=T}static parse(l,f){if(l.length!==3)return f.error("Expected two arguments.");const g=f.parse(l[1],1,ct);if(!g)return null;const x=l[2];if(typeof x!="object"||Array.isArray(x))return f.error("NumberFormat options argument must be an object.");let T=null;if(x.locale&&(T=f.parse(x.locale,1,or),!T))return null;let A=null;if(x.currency&&(A=f.parse(x.currency,1,or),!A))return null;let D=null;if(x["min-fraction-digits"]&&(D=f.parse(x["min-fraction-digits"],1,ct),!D))return null;let O=null;return x["max-fraction-digits"]&&(O=f.parse(x["max-fraction-digits"],1,ct),!O)?null:new lm(g,T,A,D,O)}evaluate(l){return new Intl.NumberFormat(this.locale?this.locale.evaluate(l):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(l):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(l):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(l):void 0}).format(this.number.evaluate(l))}eachChild(l){l(this.number),this.locale&&l(this.locale),this.currency&&l(this.currency),this.minFractionDigits&&l(this.minFractionDigits),this.maxFractionDigits&&l(this.maxFractionDigits)}outputDefined(){return!1}}class Af{constructor(l){this.type=Ho,this.sections=l}static parse(l,f){if(l.length<2)return f.error("Expected at least one argument.");const g=l[1];if(!Array.isArray(g)&&typeof g=="object")return f.error("First argument must be an image or text section.");const x=[];let T=!1;for(let A=1;A<=l.length-1;++A){const D=l[A];if(T&&typeof D=="object"&&!Array.isArray(D)){T=!1;let O=null;if(D["font-scale"]&&(O=f.parse(D["font-scale"],1,ct),!O))return null;let F=null;if(D["text-font"]&&(F=f.parse(D["text-font"],1,Y(or)),!F))return null;let V=null;if(D["text-color"]&&(V=f.parse(D["text-color"],1,rn),!V))return null;const U=x[x.length-1];U.scale=O,U.font=F,U.textColor=V}else{const O=f.parse(l[A],1,tr);if(!O)return null;const F=O.type.kind;if(F!=="string"&&F!=="value"&&F!=="null"&&F!=="resolvedImage")return f.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");T=!0,x.push({content:O,scale:null,font:null,textColor:null})}}return new Af(x)}evaluate(l){return new aa(this.sections.map(f=>{const g=f.content.evaluate(l);return Un(g)===co?new am("",g,null,null,null):new am(Uo(g),null,f.scale?f.scale.evaluate(l):null,f.font?f.font.evaluate(l).join(","):null,f.textColor?f.textColor.evaluate(l):null)}))}eachChild(l){for(const f of this.sections)l(f.content),f.scale&&l(f.scale),f.font&&l(f.font),f.textColor&&l(f.textColor)}outputDefined(){return!1}}class um{constructor(l){this.type=co,this.input=l}static parse(l,f){if(l.length!==2)return f.error("Expected two arguments.");const g=f.parse(l[1],1,or);return g?new um(g):f.error("No image name provided.")}evaluate(l){const f=this.input.evaluate(l),g=mi.fromString(f);return g&&l.availableImages&&(g.available=l.availableImages.indexOf(f)>-1),g}eachChild(l){l(this.input)}outputDefined(){return!1}}class cm{constructor(l){this.type=ct,this.input=l}static parse(l,f){if(l.length!==2)return f.error(`Expected 1 argument, but found ${l.length-1} instead.`);const g=f.parse(l[1],1);return g?g.type.kind!=="array"&&g.type.kind!=="string"&&g.type.kind!=="value"?f.error(`Expected argument of type string or array, but found ${K(g.type)} instead.`):new cm(g):null}evaluate(l){const f=this.input.evaluate(l);if(typeof f=="string"||Array.isArray(f))return f.length;throw new Nn(`Expected value to be of type string or array, but found ${K(Un(f))} instead.`)}eachChild(l){l(this.input)}outputDefined(){return!1}}const ho=8192;function hm(h,l){const f=(180+h[0])/360,g=(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+h[1]*Math.PI/360)))/360,x=Math.pow(2,l.z);return[Math.round(f*x*ho),Math.round(g*x*ho)]}function eu(h,l){const f=Math.pow(2,l.z);return[(x=(h[0]/ho+l.x)/f,360*x-180),(g=(h[1]/ho+l.y)/f,360/Math.PI*Math.atan(Math.exp((180-360*g)*Math.PI/180))-90)];var g,x}function Mr(h,l){h[0]=Math.min(h[0],l[0]),h[1]=Math.min(h[1],l[1]),h[2]=Math.max(h[2],l[0]),h[3]=Math.max(h[3],l[1])}function Ic(h,l){return!(h[0]<=l[0]||h[2]>=l[2]||h[1]<=l[1]||h[3]>=l[3])}function Hw(h,l,f){const g=h[0]-l[0],x=h[1]-l[1],T=h[0]-f[0],A=h[1]-f[1];return g*A-T*x==0&&g*T<=0&&x*A<=0}function If(h,l,f,g){return(x=[g[0]-f[0],g[1]-f[1]])[0]*(T=[l[0]-h[0],l[1]-h[1]])[1]-x[1]*T[0]!=0&&!(!s_(h,l,f,g)||!s_(f,g,h,l));var x,T}function Uw(h,l,f){for(const g of f)for(let x=0;x(x=h)[1]!=(A=D[O+1])[1]>x[1]&&x[0]<(A[0]-T[0])*(x[1]-T[1])/(A[1]-T[1])+T[0]&&(g=!g)}var x,T,A;return g}function Gw(h,l){for(const f of l)if(tu(h,f))return!0;return!1}function o_(h,l){for(const f of h)if(!tu(f,l))return!1;for(let f=0;f0&&D<0||A<0&&D>0}function fm(h,l,f){const g=[];for(let x=0;xf[2]){const x=.5*g;let T=h[0]-f[0]>x?-g:f[0]-h[0]>x?g:0;T===0&&(T=h[0]-f[2]>x?-g:f[2]-h[0]>x?g:0),h[0]+=T}Mr(l,h)}function c_(h,l,f,g){const x=Math.pow(2,g.z)*ho,T=[g.x*ho,g.y*ho],A=[];for(const D of h)for(const O of D){const F=[O.x+T[0],O.y+T[1]];u_(F,l,f,x),A.push(F)}return A}function h_(h,l,f,g){const x=Math.pow(2,g.z)*ho,T=[g.x*ho,g.y*ho],A=[];for(const O of h){const F=[];for(const V of O){const U=[V.x+T[0],V.y+T[1]];Mr(l,U),F.push(U)}A.push(F)}if(l[2]-l[0]<=x/2){(D=l)[0]=D[1]=1/0,D[2]=D[3]=-1/0;for(const O of A)for(const F of O)u_(F,l,f,x)}var D;return A}class fl{constructor(l,f){this.type=Kt,this.geojson=l,this.geometries=f}static parse(l,f){if(l.length!==2)return f.error(`'within' expression requires exactly one argument, but found ${l.length-1} instead.`);if(xc(l[1])){const g=l[1];if(g.type==="FeatureCollection"){const x=[];for(const T of g.features){const{type:A,coordinates:D}=T.geometry;A==="Polygon"&&x.push(D),A==="MultiPolygon"&&x.push(...D)}if(x.length)return new fl(g,{type:"MultiPolygon",coordinates:x})}else if(g.type==="Feature"){const x=g.geometry.type;if(x==="Polygon"||x==="MultiPolygon")return new fl(g,g.geometry)}else if(g.type==="Polygon"||g.type==="MultiPolygon")return new fl(g,g)}return f.error("'within' expression requires valid geojson object that contains polygon geometry type.")}evaluate(l){if(l.geometry()!=null&&l.canonicalID()!=null){if(l.geometryType()==="Point")return function(f,g){const x=[1/0,1/0,-1/0,-1/0],T=[1/0,1/0,-1/0,-1/0],A=f.canonicalID();if(g.type==="Polygon"){const D=fm(g.coordinates,T,A),O=c_(f.geometry(),x,T,A);if(!Ic(x,T))return!1;for(const F of O)if(!tu(F,D))return!1}if(g.type==="MultiPolygon"){const D=l_(g.coordinates,T,A),O=c_(f.geometry(),x,T,A);if(!Ic(x,T))return!1;for(const F of O)if(!Gw(F,D))return!1}return!0}(l,this.geometries);if(l.geometryType()==="LineString")return function(f,g){const x=[1/0,1/0,-1/0,-1/0],T=[1/0,1/0,-1/0,-1/0],A=f.canonicalID();if(g.type==="Polygon"){const D=fm(g.coordinates,T,A),O=h_(f.geometry(),x,T,A);if(!Ic(x,T))return!1;for(const F of O)if(!o_(F,D))return!1}if(g.type==="MultiPolygon"){const D=l_(g.coordinates,T,A),O=h_(f.geometry(),x,T,A);if(!Ic(x,T))return!1;for(const F of O)if(!Ww(F,D))return!1}return!0}(l,this.geometries)}return!1}eachChild(){}outputDefined(){return!0}}let f_=class{constructor(h=[],l=qw){if(this.data=h,this.length=this.data.length,this.compare=l,this.length>0)for(let f=(this.length>>1)-1;f>=0;f--)this._down(f)}push(h){this.data.push(h),this.length++,this._up(this.length-1)}pop(){if(this.length===0)return;const h=this.data[0],l=this.data.pop();return this.length--,this.length>0&&(this.data[0]=l,this._down(0)),h}peek(){return this.data[0]}_up(h){const{data:l,compare:f}=this,g=l[h];for(;h>0;){const x=h-1>>1,T=l[x];if(f(g,T)>=0)break;l[h]=T,h=x}l[h]=g}_down(h){const{data:l,compare:f}=this,g=this.length>>1,x=l[h];for(;h=0)break;l[h]=A,h=T}l[h]=x}};function qw(h,l){return hl?1:0}function Zw(h,l,f,g,x){d_(h,l,f,g||h.length-1,x||Xw)}function d_(h,l,f,g,x){for(;g>f;){if(g-f>600){var T=g-f+1,A=l-f+1,D=Math.log(T),O=.5*Math.exp(2*D/3),F=.5*Math.sqrt(D*O*(T-O)/T)*(A-T/2<0?-1:1);d_(h,l,Math.max(f,Math.floor(l-A*O/T+F)),Math.min(g,Math.floor(l+(T-A)*O/T+F)),x)}var V=h[l],U=f,X=g;for(Ec(h,f,l),x(h[g],V)>0&&Ec(h,f,g);U0;)X--}x(h[f],V)===0?Ec(h,f,X):Ec(h,++X,g),X<=l&&(f=X+1),l<=X&&(g=X-1)}}function Ec(h,l,f){var g=h[l];h[l]=h[f],h[f]=g}function Xw(h,l){return hl?1:0}function Ef(h,l){if(h.length<=1)return[h];const f=[];let g,x;for(const T of h){const A=Yw(T);A!==0&&(T.area=Math.abs(A),x===void 0&&(x=A<0),x===A<0?(g&&f.push(g),g=[T]):g.push(T))}if(g&&f.push(g),l>1)for(let T=0;T1?(F=l[O+1][0],V=l[O+1][1]):J>0&&(F+=U/this.kx*J,V+=X/this.ky*J)),U=this.wrap(f[0]-F)*this.kx,X=(f[1]-V)*this.ky;const re=U*U+X*X;re180;)l-=360;return l}}function g_(h,l){return l[0]-h[0]}function Mf(h){return h[1]-h[0]+1}function Go(h,l){return h[1]>=h[0]&&h[1]h[1])return[null,null];const f=Mf(h);if(l){if(f===2)return[h,null];const x=Math.floor(f/2);return[[h[0],h[0]+x],[h[0]+x,h[1]]]}if(f===1)return[h,null];const g=Math.floor(f/2)-1;return[[h[0],h[0]+g],[h[0]+g+1,h[1]]]}function pm(h,l){if(!Go(l,h.length))return[1/0,1/0,-1/0,-1/0];const f=[1/0,1/0,-1/0,-1/0];for(let g=l[0];g<=l[1];++g)Mr(f,h[g]);return f}function mm(h){const l=[1/0,1/0,-1/0,-1/0];for(const f of h)for(const g of f)Mr(l,g);return l}function y_(h){return h[0]!==-1/0&&h[1]!==-1/0&&h[2]!==1/0&&h[3]!==1/0}function vm(h,l,f){if(!y_(h)||!y_(l))return NaN;let g=0,x=0;return h[2]l[2]&&(g=h[0]-l[2]),h[1]>l[3]&&(x=h[1]-l[3]),h[3]=g)return g;if(Ic(x,T)){if(Dc(h,l))return 0}else if(Dc(l,h))return 0;let A=1/0;for(const D of h)for(let O=0,F=D.length,V=F-1;O0;){const O=A.pop();if(O[0]>=T)continue;const F=O[1],V=l?50:100;if(Mf(F)<=V){if(!Go(F,h.length))return NaN;if(l){const U=pn(h,F,f,g);if(isNaN(U)||U===0)return U;T=Math.min(T,U)}else for(let U=F[0];U<=F[1];++U){const X=wn(h[U],f,g);if(T=Math.min(T,X),T===0)return 0}}else{const U=Mc(F,l);_m(A,T,g,h,D,U[0]),_m(A,T,g,h,D,U[1])}}return T}function kf(h,l,f,g,x,T=1/0){let A=Math.min(T,x.distance(h[0],f[0]));if(A===0)return A;const D=new f_([[0,[0,h.length-1],[0,f.length-1]]],g_);for(;D.length>0;){const O=D.pop();if(O[0]>=A)continue;const F=O[1],V=O[2],U=l?50:100,X=g?50:100;if(Mf(F)<=U&&Mf(V)<=X){if(!Go(F,h.length)&&Go(V,f.length))return NaN;let J;if(l&&g)J=Pr(h,F,f,V,x),A=Math.min(A,J);else if(l&&!g){const re=h.slice(F[0],F[1]+1);for(let se=V[0];se<=V[1];++se)if(J=un(f[se],re,x),A=Math.min(A,J),A===0)return A}else if(!l&&g){const re=f.slice(V[0],V[1]+1);for(let se=F[0];se<=F[1];++se)if(J=un(h[se],re,x),A=Math.min(A,J),A===0)return A}else J=ym(h,F,f,V,x),A=Math.min(A,J)}else{const J=Mc(F,l),re=Mc(V,g);Df(D,A,x,h,f,J[0],re[0]),Df(D,A,x,h,f,J[0],re[1]),Df(D,A,x,h,f,J[1],re[0]),Df(D,A,x,h,f,J[1],re[1])}}return A}function bm(h){return h.type==="MultiPolygon"?h.coordinates.map(l=>({type:"Polygon",coordinates:l})):h.type==="MultiLineString"?h.coordinates.map(l=>({type:"LineString",coordinates:l})):h.type==="MultiPoint"?h.coordinates.map(l=>({type:"Point",coordinates:l})):[h]}class Ts{constructor(l,f){this.type=ct,this.geojson=l,this.geometries=f}static parse(l,f){if(l.length!==2)return f.error(`'distance' expression requires exactly one argument, but found ${l.length-1} instead.`);if(xc(l[1])){const g=l[1];if(g.type==="FeatureCollection")return new Ts(g,g.features.map(x=>bm(x.geometry)).flat());if(g.type==="Feature")return new Ts(g,bm(g.geometry));if("type"in g&&"coordinates"in g)return new Ts(g,bm(g))}return f.error("'distance' expression requires valid geojson object that contains polygon geometry type.")}evaluate(l){if(l.geometry()!=null&&l.canonicalID()!=null){if(l.geometryType()==="Point")return function(f,g){const x=f.geometry(),T=x.flat().map(O=>eu([O.x,O.y],f.canonical));if(x.length===0)return NaN;const A=new dm(T[0][1]);let D=1/0;for(const O of g){switch(O.type){case"Point":D=Math.min(D,kf(T,!1,[O.coordinates],!1,A,D));break;case"LineString":D=Math.min(D,kf(T,!1,O.coordinates,!0,A,D));break;case"Polygon":D=Math.min(D,Lf(T,!1,O.coordinates,A,D))}if(D===0)return D}return D}(l,this.geometries);if(l.geometryType()==="LineString")return function(f,g){const x=f.geometry(),T=x.flat().map(O=>eu([O.x,O.y],f.canonical));if(x.length===0)return NaN;const A=new dm(T[0][1]);let D=1/0;for(const O of g){switch(O.type){case"Point":D=Math.min(D,kf(T,!0,[O.coordinates],!1,A,D));break;case"LineString":D=Math.min(D,kf(T,!0,O.coordinates,!0,A,D));break;case"Polygon":D=Math.min(D,Lf(T,!0,O.coordinates,A,D))}if(D===0)return D}return D}(l,this.geometries);if(l.geometryType()==="Polygon")return function(f,g){const x=f.geometry();if(x.length===0||x[0].length===0)return NaN;const T=Ef(x,0).map(O=>O.map(F=>F.map(V=>eu([V.x,V.y],f.canonical)))),A=new dm(T[0][0][0][1]);let D=1/0;for(const O of g)for(const F of T){switch(O.type){case"Point":D=Math.min(D,Lf([O.coordinates],!1,F,A,D));break;case"LineString":D=Math.min(D,Lf(O.coordinates,!0,F,A,D));break;case"Polygon":D=Math.min(D,__(F,O.coordinates,A,D))}if(D===0)return D}return D}(l,this.geometries)}return NaN}eachChild(){}outputDefined(){return!0}}const dl={"==":n_,"!=":Nw,">":i_,"<":Vw,">=":jw,"<=":a_,array:Sa,at:sm,boolean:Sa,case:Sf,coalesce:Cf,collator:Pf,format:Af,image:um,in:Tc,"index-of":xf,interpolate:ua,"interpolate-hcl":ua,"interpolate-lab":ua,length:cm,let:Fr,literal:cl,match:wf,number:Sa,"number-format":lm,object:Sa,slice:Tf,step:Ql,string:Sa,"to-boolean":xs,"to-color":xs,"to-number":xs,"to-string":xs,var:bf,within:fl,distance:Ts};class ca{constructor(l,f,g,x){this.name=l,this.type=f,this._evaluate=g,this.args=x}evaluate(l){return this._evaluate(l,this.args)}eachChild(l){this.args.forEach(l)}outputDefined(){return!1}static parse(l,f){const g=l[0],x=ca.definitions[g];if(!x)return f.error(`Unknown expression "${g}". If you wanted a literal array, use ["literal", [...]].`,0);const T=Array.isArray(x)?x[0]:x.type,A=Array.isArray(x)?[[x[1],x[2]]]:x.overloads,D=A.filter(([F])=>!Array.isArray(F)||F.length===l.length-1);let O=null;for(const[F,V]of D){O=new ws(f.registry,Of,f.path,null,f.scope);const U=[];let X=!1;for(let J=1;J{return X=U,Array.isArray(X)?`(${X.map(K).join(", ")})`:`(${K(X.type)}...)`;var X}).join(" | "),V=[];for(let U=1;U{f=l?f&&Of(g):f&&g instanceof cl}),!!f&&zf(h)&&Bf(h,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"])}function zf(h){if(h instanceof ca&&(h.name==="get"&&h.args.length===1||h.name==="feature-state"||h.name==="has"&&h.args.length===1||h.name==="properties"||h.name==="geometry-type"||h.name==="id"||/^filter-/.test(h.name))||h instanceof fl||h instanceof Ts)return!1;let l=!0;return h.eachChild(f=>{l&&!zf(f)&&(l=!1)}),l}function Lc(h){if(h instanceof ca&&h.name==="feature-state")return!1;let l=!0;return h.eachChild(f=>{l&&!Lc(f)&&(l=!1)}),l}function Bf(h,l){if(h instanceof ca&&l.indexOf(h.name)>=0)return!1;let f=!0;return h.eachChild(g=>{f&&!Bf(g,l)&&(f=!1)}),f}function b_(h){return{result:"success",value:h}}function ru(h){return{result:"error",value:h}}function ml(h){return h["property-type"]==="data-driven"||h["property-type"]==="cross-faded-data-driven"}function Sm(h){return!!h.expression&&h.expression.parameters.indexOf("zoom")>-1}function nu(h){return!!h.expression&&h.expression.interpolated}function Or(h){return h instanceof Number?"number":h instanceof String?"string":h instanceof Boolean?"boolean":Array.isArray(h)?"array":h===null?"null":typeof h}function kc(h){return typeof h=="object"&&h!==null&&!Array.isArray(h)}function x_(h){return h}function w_(h,l){const f=l.type==="color",g=h.stops&&typeof h.stops[0][0]=="object",x=g||!(g||h.property!==void 0),T=h.type||(nu(l)?"exponential":"interval");if(f||l.type==="padding"){const V=f?qr.parse:oa.parse;(h=Sr({},h)).stops&&(h.stops=h.stops.map(U=>[U[0],V(U[1])])),h.default=V(h.default?h.default:l.default)}if(h.colorSpace&&(A=h.colorSpace)!=="rgb"&&A!=="hcl"&&A!=="lab")throw new Error(`Unknown color space: "${h.colorSpace}"`);var A;let D,O,F;if(T==="exponential")D=Tm;else if(T==="interval")D=$f;else if(T==="categorical"){D=Ff,O=Object.create(null);for(const V of h.stops)O[V[0]]=V[1];F=typeof h.stops[0][0]}else{if(T!=="identity")throw new Error(`Unknown function type "${T}"`);D=Cm}if(g){const V={},U=[];for(let re=0;rere[0]),evaluate:({zoom:re},se)=>Tm({stops:X,base:h.base},l,re).evaluate(re,se)}}if(x){const V=T==="exponential"?{name:"exponential",base:h.base!==void 0?h.base:1}:null;return{kind:"camera",interpolationType:V,interpolationFactor:ua.interpolationFactor.bind(void 0,V),zoomStops:h.stops.map(U=>U[0]),evaluate:({zoom:U})=>D(h,l,U,O,F)}}return{kind:"source",evaluate(V,U){const X=U&&U.properties?U.properties[h.property]:void 0;return X===void 0?vl(h.default,l.default):D(h,l,X,O,F)}}}function vl(h,l,f){return h!==void 0?h:l!==void 0?l:f!==void 0?f:void 0}function Ff(h,l,f,g,x){return vl(typeof f===x?g[f]:void 0,h.default,l.default)}function $f(h,l,f){if(Or(f)!=="number")return vl(h.default,l.default);const g=h.stops.length;if(g===1||f<=h.stops[0][0])return h.stops[0][1];if(f>=h.stops[g-1][0])return h.stops[g-1][1];const x=Cc(h.stops.map(T=>T[0]),f);return h.stops[x][1]}function Tm(h,l,f){const g=h.base!==void 0?h.base:1;if(Or(f)!=="number")return vl(h.default,l.default);const x=h.stops.length;if(x===1||f<=h.stops[0][0])return h.stops[0][1];if(f>=h.stops[x-1][0])return h.stops[x-1][1];const T=Cc(h.stops.map(V=>V[0]),f),A=function(V,U,X,J){const re=J-X,se=V-X;return re===0?0:U===1?se/re:(Math.pow(U,se)-1)/(Math.pow(U,re)-1)}(f,g,h.stops[T][0],h.stops[T+1][0]),D=h.stops[T][1],O=h.stops[T+1][1],F=la[l.type]||x_;return typeof D.evaluate=="function"?{evaluate(...V){const U=D.evaluate.apply(void 0,V),X=O.evaluate.apply(void 0,V);if(U!==void 0&&X!==void 0)return F(U,X,A,h.colorSpace)}}:F(D,O,A,h.colorSpace)}function Cm(h,l,f){switch(l.type){case"color":f=qr.parse(f);break;case"formatted":f=aa.fromString(f.toString());break;case"resolvedImage":f=mi.fromString(f.toString());break;case"padding":f=oa.parse(f);break;default:Or(f)===l.type||l.type==="enum"&&l.values[f]||(f=void 0)}return vl(f,h.default,l.default)}ca.register(dl,{error:[{kind:"error"},[or],(h,[l])=>{throw new Nn(l.evaluate(h))}],typeof:[or,[tr],(h,[l])=>K(Un(l.evaluate(h)))],"to-rgba":[Y(ct,4),[rn],(h,[l])=>{const[f,g,x,T]=l.evaluate(h).rgb;return[255*f,255*g,255*x,T]}],rgb:[rn,[ct,ct,ct],xm],rgba:[rn,[ct,ct,ct,ct],xm],has:{type:Kt,overloads:[[[or],(h,[l])=>Rf(l.evaluate(h),h.properties())],[[or,Rn],(h,[l,f])=>Rf(l.evaluate(h),f.evaluate(h))]]},get:{type:tr,overloads:[[[or],(h,[l])=>wm(l.evaluate(h),h.properties())],[[or,Rn],(h,[l,f])=>wm(l.evaluate(h),f.evaluate(h))]]},"feature-state":[tr,[or],(h,[l])=>wm(l.evaluate(h),h.featureState||{})],properties:[Rn,[],h=>h.properties()],"geometry-type":[or,[],h=>h.geometryType()],id:[tr,[],h=>h.id()],zoom:[ct,[],h=>h.globals.zoom],"heatmap-density":[ct,[],h=>h.globals.heatmapDensity||0],"line-progress":[ct,[],h=>h.globals.lineProgress||0],accumulated:[tr,[],h=>h.globals.accumulated===void 0?null:h.globals.accumulated],"+":[ct,pl(ct),(h,l)=>{let f=0;for(const g of l)f+=g.evaluate(h);return f}],"*":[ct,pl(ct),(h,l)=>{let f=1;for(const g of l)f*=g.evaluate(h);return f}],"-":{type:ct,overloads:[[[ct,ct],(h,[l,f])=>l.evaluate(h)-f.evaluate(h)],[[ct],(h,[l])=>-l.evaluate(h)]]},"/":[ct,[ct,ct],(h,[l,f])=>l.evaluate(h)/f.evaluate(h)],"%":[ct,[ct,ct],(h,[l,f])=>l.evaluate(h)%f.evaluate(h)],ln2:[ct,[],()=>Math.LN2],pi:[ct,[],()=>Math.PI],e:[ct,[],()=>Math.E],"^":[ct,[ct,ct],(h,[l,f])=>Math.pow(l.evaluate(h),f.evaluate(h))],sqrt:[ct,[ct],(h,[l])=>Math.sqrt(l.evaluate(h))],log10:[ct,[ct],(h,[l])=>Math.log(l.evaluate(h))/Math.LN10],ln:[ct,[ct],(h,[l])=>Math.log(l.evaluate(h))],log2:[ct,[ct],(h,[l])=>Math.log(l.evaluate(h))/Math.LN2],sin:[ct,[ct],(h,[l])=>Math.sin(l.evaluate(h))],cos:[ct,[ct],(h,[l])=>Math.cos(l.evaluate(h))],tan:[ct,[ct],(h,[l])=>Math.tan(l.evaluate(h))],asin:[ct,[ct],(h,[l])=>Math.asin(l.evaluate(h))],acos:[ct,[ct],(h,[l])=>Math.acos(l.evaluate(h))],atan:[ct,[ct],(h,[l])=>Math.atan(l.evaluate(h))],min:[ct,pl(ct),(h,l)=>Math.min(...l.map(f=>f.evaluate(h)))],max:[ct,pl(ct),(h,l)=>Math.max(...l.map(f=>f.evaluate(h)))],abs:[ct,[ct],(h,[l])=>Math.abs(l.evaluate(h))],round:[ct,[ct],(h,[l])=>{const f=l.evaluate(h);return f<0?-Math.round(-f):Math.round(f)}],floor:[ct,[ct],(h,[l])=>Math.floor(l.evaluate(h))],ceil:[ct,[ct],(h,[l])=>Math.ceil(l.evaluate(h))],"filter-==":[Kt,[or,tr],(h,[l,f])=>h.properties()[l.value]===f.value],"filter-id-==":[Kt,[tr],(h,[l])=>h.id()===l.value],"filter-type-==":[Kt,[or],(h,[l])=>h.geometryType()===l.value],"filter-<":[Kt,[or,tr],(h,[l,f])=>{const g=h.properties()[l.value],x=f.value;return typeof g==typeof x&&g{const f=h.id(),g=l.value;return typeof f==typeof g&&f":[Kt,[or,tr],(h,[l,f])=>{const g=h.properties()[l.value],x=f.value;return typeof g==typeof x&&g>x}],"filter-id->":[Kt,[tr],(h,[l])=>{const f=h.id(),g=l.value;return typeof f==typeof g&&f>g}],"filter-<=":[Kt,[or,tr],(h,[l,f])=>{const g=h.properties()[l.value],x=f.value;return typeof g==typeof x&&g<=x}],"filter-id-<=":[Kt,[tr],(h,[l])=>{const f=h.id(),g=l.value;return typeof f==typeof g&&f<=g}],"filter->=":[Kt,[or,tr],(h,[l,f])=>{const g=h.properties()[l.value],x=f.value;return typeof g==typeof x&&g>=x}],"filter-id->=":[Kt,[tr],(h,[l])=>{const f=h.id(),g=l.value;return typeof f==typeof g&&f>=g}],"filter-has":[Kt,[tr],(h,[l])=>l.value in h.properties()],"filter-has-id":[Kt,[],h=>h.id()!==null&&h.id()!==void 0],"filter-type-in":[Kt,[Y(or)],(h,[l])=>l.value.indexOf(h.geometryType())>=0],"filter-id-in":[Kt,[Y(tr)],(h,[l])=>l.value.indexOf(h.id())>=0],"filter-in-small":[Kt,[or,Y(tr)],(h,[l,f])=>f.value.indexOf(h.properties()[l.value])>=0],"filter-in-large":[Kt,[or,Y(tr)],(h,[l,f])=>function(g,x,T,A){for(;T<=A;){const D=T+A>>1;if(x[D]===g)return!0;x[D]>g?A=D-1:T=D+1}return!1}(h.properties()[l.value],f.value,0,f.value.length-1)],all:{type:Kt,overloads:[[[Kt,Kt],(h,[l,f])=>l.evaluate(h)&&f.evaluate(h)],[pl(Kt),(h,l)=>{for(const f of l)if(!f.evaluate(h))return!1;return!0}]]},any:{type:Kt,overloads:[[[Kt,Kt],(h,[l,f])=>l.evaluate(h)||f.evaluate(h)],[pl(Kt),(h,l)=>{for(const f of l)if(f.evaluate(h))return!0;return!1}]]},"!":[Kt,[Kt],(h,[l])=>!l.evaluate(h)],"is-supported-script":[Kt,[or],(h,[l])=>{const f=h.globals&&h.globals.isSupportedScript;return!f||f(l.evaluate(h))}],upcase:[or,[or],(h,[l])=>l.evaluate(h).toUpperCase()],downcase:[or,[or],(h,[l])=>l.evaluate(h).toLowerCase()],concat:[or,pl(tr),(h,l)=>l.map(f=>Uo(f.evaluate(h))).join("")],"resolved-locale":[or,[uo],(h,[l])=>l.evaluate(h).resolvedLocale()]});class Nf{constructor(l,f){var g;this.expression=l,this._warningHistory={},this._evaluator=new Sc,this._defaultValue=f?(g=f).type==="color"&&kc(g.default)?new qr(0,0,0,0):g.type==="color"?qr.parse(g.default)||null:g.type==="padding"?oa.parse(g.default)||null:g.type==="variableAnchorOffsetCollection"?sa.parse(g.default)||null:g.default===void 0?null:g.default:null,this._enumValues=f&&f.type==="enum"?f.values:null}evaluateWithoutErrorHandling(l,f,g,x,T,A){return this._evaluator.globals=l,this._evaluator.feature=f,this._evaluator.featureState=g,this._evaluator.canonical=x,this._evaluator.availableImages=T||null,this._evaluator.formattedSection=A,this.expression.evaluate(this._evaluator)}evaluate(l,f,g,x,T,A){this._evaluator.globals=l,this._evaluator.feature=f||null,this._evaluator.featureState=g||null,this._evaluator.canonical=x,this._evaluator.availableImages=T||null,this._evaluator.formattedSection=A||null;try{const D=this.expression.evaluate(this._evaluator);if(D==null||typeof D=="number"&&D!=D)return this._defaultValue;if(this._enumValues&&!(D in this._enumValues))throw new Nn(`Expected value to be one of ${Object.keys(this._enumValues).map(O=>JSON.stringify(O)).join(", ")}, but found ${JSON.stringify(D)} instead.`);return D}catch(D){return this._warningHistory[D.message]||(this._warningHistory[D.message]=!0,typeof console<"u"&&console.warn(D.message)),this._defaultValue}}}function Rc(h){return Array.isArray(h)&&h.length>0&&typeof h[0]=="string"&&h[0]in dl}function gl(h,l){const f=new ws(dl,Of,[],l?function(x){const T={color:rn,string:or,number:ct,enum:or,boolean:Kt,formatted:Ho,padding:bs,resolvedImage:co,variableAnchorOffsetCollection:be};return x.type==="array"?Y(T[x.value]||tr,x.length):T[x.type]}(l):void 0),g=f.parse(h,void 0,void 0,void 0,l&&l.type==="string"?{typeAnnotation:"coerce"}:void 0);return g?b_(new Nf(g,l)):ru(f.errors)}class Pm{constructor(l,f){this.kind=l,this._styleExpression=f,this.isStateDependent=l!=="constant"&&!Lc(f.expression)}evaluateWithoutErrorHandling(l,f,g,x,T,A){return this._styleExpression.evaluateWithoutErrorHandling(l,f,g,x,T,A)}evaluate(l,f,g,x,T,A){return this._styleExpression.evaluate(l,f,g,x,T,A)}}class Am{constructor(l,f,g,x){this.kind=l,this.zoomStops=g,this._styleExpression=f,this.isStateDependent=l!=="camera"&&!Lc(f.expression),this.interpolationType=x}evaluateWithoutErrorHandling(l,f,g,x,T,A){return this._styleExpression.evaluateWithoutErrorHandling(l,f,g,x,T,A)}evaluate(l,f,g,x,T,A){return this._styleExpression.evaluate(l,f,g,x,T,A)}interpolationFactor(l,f,g){return this.interpolationType?ua.interpolationFactor(this.interpolationType,l,f,g):0}}function S_(h,l){const f=gl(h,l);if(f.result==="error")return f;const g=f.value.expression,x=zf(g);if(!x&&!ml(l))return ru([new kr("","data expressions not supported")]);const T=Bf(g,["zoom"]);if(!T&&!Sm(l))return ru([new kr("","zoom expressions not supported")]);const A=jf(g);return A||T?A instanceof kr?ru([A]):A instanceof ua&&!nu(l)?ru([new kr("",'"interpolate" expressions cannot be used with this property')]):b_(A?new Am(x?"camera":"composite",f.value,A.labels,A instanceof ua?A.interpolation:void 0):new Pm(x?"constant":"source",f.value)):ru([new kr("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')])}class Vf{constructor(l,f){this._parameters=l,this._specification=f,Sr(this,w_(this._parameters,this._specification))}static deserialize(l){return new Vf(l._parameters,l._specification)}static serialize(l){return{_parameters:l._parameters,_specification:l._specification}}}function jf(h){let l=null;if(h instanceof Fr)l=jf(h.result);else if(h instanceof Cf){for(const f of h.args)if(l=jf(f),l)break}else(h instanceof Ql||h instanceof ua)&&h.input instanceof ca&&h.input.name==="zoom"&&(l=h);return l instanceof kr||h.eachChild(f=>{const g=jf(f);g instanceof kr?l=g:!l&&g?l=new kr("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):l&&g&&l!==g&&(l=new kr("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),l}function iu(h){if(h===!0||h===!1)return!0;if(!Array.isArray(h)||h.length===0)return!1;switch(h[0]){case"has":return h.length>=2&&h[1]!=="$id"&&h[1]!=="$type";case"in":return h.length>=3&&(typeof h[1]!="string"||Array.isArray(h[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return h.length!==3||Array.isArray(h[1])||Array.isArray(h[2]);case"any":case"all":for(const l of h.slice(1))if(!iu(l)&&typeof l!="boolean")return!1;return!0;default:return!0}}const Hf={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function Mi(h){if(h==null)return{filter:()=>!0,needGeometry:!1};iu(h)||(h=Uf(h));const l=gl(h,Hf);if(l.result==="error")throw new Error(l.value.map(f=>`${f.key}: ${f.message}`).join(", "));return{filter:(f,g,x)=>l.value.evaluate(f,g,{},x),needGeometry:Im(h)}}function Oc(h,l){return hl?1:0}function Im(h){if(!Array.isArray(h))return!1;if(h[0]==="within"||h[0]==="distance")return!0;for(let l=1;l"||l==="<="||l===">="?Em(h[1],h[2],l):l==="any"?(f=h.slice(1),["any"].concat(f.map(Uf))):l==="all"?["all"].concat(h.slice(1).map(Uf)):l==="none"?["all"].concat(h.slice(1).map(Uf).map(ou)):l==="in"?au(h[1],h.slice(2)):l==="!in"?ou(au(h[1],h.slice(2))):l==="has"?Mm(h[1]):l!=="!has"||ou(Mm(h[1]));var f}function Em(h,l,f){switch(h){case"$type":return[`filter-type-${f}`,l];case"$id":return[`filter-id-${f}`,l];default:return[`filter-${f}`,h,l]}}function au(h,l){if(l.length===0)return!1;switch(h){case"$type":return["filter-type-in",["literal",l]];case"$id":return["filter-id-in",["literal",l]];default:return l.length>200&&!l.some(f=>typeof f!=typeof l[0])?["filter-in-large",h,["literal",l.sort(Oc)]]:["filter-in-small",h,["literal",l]]}}function Mm(h){switch(h){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",h]}}function ou(h){return["!",h]}function Dm(h){const l=typeof h;if(l==="number"||l==="boolean"||l==="string"||h==null)return JSON.stringify(h);if(Array.isArray(h)){let x="[";for(const T of h)x+=`${Dm(T)},`;return`${x}]`}const f=Object.keys(h).sort();let g="{";for(let x=0;xg.maximum?[new Ke(l,f,`${f} is greater than the maximum value ${g.maximum}`)]:[]}function km(h){const l=h.valueSpec,f=mn(h.value.type);let g,x,T,A={};const D=f!=="categorical"&&h.value.property===void 0,O=!D,F=Or(h.value.stops)==="array"&&Or(h.value.stops[0])==="array"&&Or(h.value.stops[0][0])==="object",V=Hi({key:h.key,value:h.value,valueSpec:h.styleSpec.function,validateSpec:h.validateSpec,style:h.style,styleSpec:h.styleSpec,objectElementValidators:{stops:function(J){if(f==="identity")return[new Ke(J.key,J.value,'identity function may not have a "stops" property')];let re=[];const se=J.value;return re=re.concat(Gf({key:J.key,value:se,valueSpec:J.valueSpec,validateSpec:J.validateSpec,style:J.style,styleSpec:J.styleSpec,arrayElementValidator:U})),Or(se)==="array"&&se.length===0&&re.push(new Ke(J.key,se,"array must have at least one stop")),re},default:function(J){return J.validateSpec({key:J.key,value:J.value,valueSpec:l,validateSpec:J.validateSpec,style:J.style,styleSpec:J.styleSpec})}}});return f==="identity"&&D&&V.push(new Ke(h.key,h.value,'missing required property "property"')),f==="identity"||h.value.stops||V.push(new Ke(h.key,h.value,'missing required property "stops"')),f==="exponential"&&h.valueSpec.expression&&!nu(h.valueSpec)&&V.push(new Ke(h.key,h.value,"exponential functions not supported")),h.styleSpec.$version>=8&&(O&&!ml(h.valueSpec)?V.push(new Ke(h.key,h.value,"property functions not supported")):D&&!Sm(h.valueSpec)&&V.push(new Ke(h.key,h.value,"zoom functions not supported"))),f!=="categorical"&&!F||h.value.property!==void 0||V.push(new Ke(h.key,h.value,'"property" property is required')),V;function U(J){let re=[];const se=J.value,de=J.key;if(Or(se)!=="array")return[new Ke(de,se,`array expected, ${Or(se)} found`)];if(se.length!==2)return[new Ke(de,se,`array length 2 expected, length ${se.length} found`)];if(F){if(Or(se[0])!=="object")return[new Ke(de,se,`object expected, ${Or(se[0])} found`)];if(se[0].zoom===void 0)return[new Ke(de,se,"object stop key must have zoom")];if(se[0].value===void 0)return[new Ke(de,se,"object stop key must have value")];if(T&&T>mn(se[0].zoom))return[new Ke(de,se[0].zoom,"stop zoom values must appear in ascending order")];mn(se[0].zoom)!==T&&(T=mn(se[0].zoom),x=void 0,A={}),re=re.concat(Hi({key:`${de}[0]`,value:se[0],valueSpec:{zoom:{}},validateSpec:J.validateSpec,style:J.style,styleSpec:J.styleSpec,objectElementValidators:{zoom:zc,value:X}}))}else re=re.concat(X({key:`${de}[0]`,value:se[0],valueSpec:{},validateSpec:J.validateSpec,style:J.style,styleSpec:J.styleSpec},se));return Rc(yl(se[1]))?re.concat([new Ke(`${de}[1]`,se[1],"expressions are not allowed in function stops.")]):re.concat(J.validateSpec({key:`${de}[1]`,value:se[1],valueSpec:l,validateSpec:J.validateSpec,style:J.style,styleSpec:J.styleSpec}))}function X(J,re){const se=Or(J.value),de=mn(J.value),we=J.value!==null?J.value:re;if(g){if(se!==g)return[new Ke(J.key,we,`${se} stop domain type must match previous stop domain type ${g}`)]}else g=se;if(se!=="number"&&se!=="string"&&se!=="boolean")return[new Ke(J.key,we,"stop domain value must be a number, string, or boolean")];if(se!=="number"&&f!=="categorical"){let Re=`number expected, ${se} found`;return ml(l)&&f===void 0&&(Re+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new Ke(J.key,we,Re)]}return f!=="categorical"||se!=="number"||isFinite(de)&&Math.floor(de)===de?f!=="categorical"&&se==="number"&&x!==void 0&&denew Ke(`${h.key}${g.key}`,h.value,g.message));const f=l.value.expression||l.value._styleExpression.expression;if(h.expressionContext==="property"&&h.propertyKey==="text-font"&&!f.outputDefined())return[new Ke(h.key,h.value,`Invalid data expression for "${h.propertyKey}". Output values must be contained as literals within the expression.`)];if(h.expressionContext==="property"&&h.propertyType==="layout"&&!Lc(f))return[new Ke(h.key,h.value,'"feature-state" data expressions are not supported with layout properties.')];if(h.expressionContext==="filter"&&!Lc(f))return[new Ke(h.key,h.value,'"feature-state" data expressions are not supported with filters.')];if(h.expressionContext&&h.expressionContext.indexOf("cluster")===0){if(!Bf(f,["zoom","feature-state"]))return[new Ke(h.key,h.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if(h.expressionContext==="cluster-initial"&&!zf(f))return[new Ke(h.key,h.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function Bc(h){const l=h.key,f=h.value,g=h.valueSpec,x=[];return Array.isArray(g.values)?g.values.indexOf(mn(f))===-1&&x.push(new Ke(l,f,`expected one of [${g.values.join(", ")}], ${JSON.stringify(f)} found`)):Object.keys(g.values).indexOf(mn(f))===-1&&x.push(new Ke(l,f,`expected one of [${Object.keys(g.values).join(", ")}], ${JSON.stringify(f)} found`)),x}function Fc(h){return iu(yl(h.value))?_l(Sr({},h,{expressionContext:"filter",valueSpec:{value:"boolean"}})):$c(h)}function $c(h){const l=h.value,f=h.key;if(Or(l)!=="array")return[new Ke(f,l,`array expected, ${Or(l)} found`)];const g=h.styleSpec;let x,T=[];if(l.length<1)return[new Ke(f,l,"filter array must have at least 1 element")];switch(T=T.concat(Bc({key:`${f}[0]`,value:l[0],valueSpec:g.filter_operator,style:h.style,styleSpec:h.styleSpec})),mn(l[0])){case"<":case"<=":case">":case">=":l.length>=2&&mn(l[1])==="$type"&&T.push(new Ke(f,l,`"$type" cannot be use with operator "${l[0]}"`));case"==":case"!=":l.length!==3&&T.push(new Ke(f,l,`filter array for operator "${l[0]}" must have 3 elements`));case"in":case"!in":l.length>=2&&(x=Or(l[1]),x!=="string"&&T.push(new Ke(`${f}[1]`,l[1],`string expected, ${x} found`)));for(let A=2;A{F in f&&l.push(new Ke(g,f[F],`"${F}" is prohibited for ref layers`))}),x.layers.forEach(F=>{mn(F.id)===D&&(O=F)}),O?O.ref?l.push(new Ke(g,f.ref,"ref cannot reference another ref layer")):A=mn(O.type):l.push(new Ke(g,f.ref,`ref layer "${D}" not found`))}else if(A!=="background")if(f.source){const O=x.sources&&x.sources[f.source],F=O&&mn(O.type);O?F==="vector"&&A==="raster"?l.push(new Ke(g,f.source,`layer "${f.id}" requires a raster source`)):F!=="raster-dem"&&A==="hillshade"?l.push(new Ke(g,f.source,`layer "${f.id}" requires a raster-dem source`)):F==="raster"&&A!=="raster"?l.push(new Ke(g,f.source,`layer "${f.id}" requires a vector source`)):F!=="vector"||f["source-layer"]?F==="raster-dem"&&A!=="hillshade"?l.push(new Ke(g,f.source,"raster-dem source can only be used with layer type 'hillshade'.")):A!=="line"||!f.paint||!f.paint["line-gradient"]||F==="geojson"&&O.lineMetrics||l.push(new Ke(g,f,`layer "${f.id}" specifies a line-gradient, which requires a GeoJSON source with \`lineMetrics\` enabled.`)):l.push(new Ke(g,f,`layer "${f.id}" must specify a "source-layer"`)):l.push(new Ke(g,f.source,`source "${f.source}" not found`))}else l.push(new Ke(g,f,'missing required property "source"'));return l=l.concat(Hi({key:g,value:f,valueSpec:T.layer,style:h.style,styleSpec:h.styleSpec,validateSpec:h.validateSpec,objectElementValidators:{"*":()=>[],type:()=>h.validateSpec({key:`${g}.type`,value:f.type,valueSpec:T.layer.type,style:h.style,styleSpec:h.styleSpec,validateSpec:h.validateSpec,object:f,objectKey:"type"}),filter:Fc,layout:O=>Hi({layer:f,key:O.key,value:O.value,style:O.style,styleSpec:O.styleSpec,validateSpec:O.validateSpec,objectElementValidators:{"*":F=>zm(Sr({layerType:A},F))}}),paint:O=>Hi({layer:f,key:O.key,value:O.value,style:O.style,styleSpec:O.styleSpec,validateSpec:O.validateSpec,objectElementValidators:{"*":F=>Om(Sr({layerType:A},F))}})}})),l}function Wo(h){const l=h.value,f=h.key,g=Or(l);return g!=="string"?[new Ke(f,l,`string expected, ${g} found`)]:[]}const Fm={promoteId:function({key:h,value:l}){if(Or(l)==="string")return Wo({key:h,value:l});{const f=[];for(const g in l)f.push(...Wo({key:`${h}.${g}`,value:l[g]}));return f}}};function C_(h){const l=h.value,f=h.key,g=h.styleSpec,x=h.style,T=h.validateSpec;if(!l.type)return[new Ke(f,l,'"type" is required')];const A=mn(l.type);let D;switch(A){case"vector":case"raster":return D=Hi({key:f,value:l,valueSpec:g[`source_${A.replace("-","_")}`],style:h.style,styleSpec:g,objectElementValidators:Fm,validateSpec:T}),D;case"raster-dem":return D=function(O){var F;const V=(F=O.sourceName)!==null&&F!==void 0?F:"",U=O.value,X=O.styleSpec,J=X.source_raster_dem,re=O.style;let se=[];const de=Or(U);if(U===void 0)return se;if(de!=="object")return se.push(new Ke("source_raster_dem",U,`object expected, ${de} found`)),se;const we=mn(U.encoding)==="custom",Re=["redFactor","greenFactor","blueFactor","baseShift"],Ce=O.value.encoding?`"${O.value.encoding}"`:"Default";for(const De in U)!we&&Re.includes(De)?se.push(new Ke(De,U[De],`In "${V}": "${De}" is only valid when "encoding" is set to "custom". ${Ce} encoding found`)):J[De]?se=se.concat(O.validateSpec({key:De,value:U[De],valueSpec:J[De],validateSpec:O.validateSpec,style:re,styleSpec:X})):se.push(new Ke(De,U[De],`unknown property "${De}"`));return se}({sourceName:f,value:l,style:h.style,styleSpec:g,validateSpec:T}),D;case"geojson":if(D=Hi({key:f,value:l,valueSpec:g.source_geojson,style:x,styleSpec:g,validateSpec:T,objectElementValidators:Fm}),l.cluster)for(const O in l.clusterProperties){const[F,V]=l.clusterProperties[O],U=typeof F=="string"?[F,["accumulated"],["get",O]]:F;D.push(..._l({key:`${f}.${O}.map`,value:V,validateSpec:T,expressionContext:"cluster-map"})),D.push(..._l({key:`${f}.${O}.reduce`,value:U,validateSpec:T,expressionContext:"cluster-reduce"}))}return D;case"video":return Hi({key:f,value:l,valueSpec:g.source_video,style:x,validateSpec:T,styleSpec:g});case"image":return Hi({key:f,value:l,valueSpec:g.source_image,style:x,validateSpec:T,styleSpec:g});case"canvas":return[new Ke(f,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return Bc({key:`${f}.type`,value:l.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]},style:x,validateSpec:T,styleSpec:g})}}function $m(h){const l=h.value,f=h.styleSpec,g=f.light,x=h.style;let T=[];const A=Or(l);if(l===void 0)return T;if(A!=="object")return T=T.concat([new Ke("light",l,`object expected, ${A} found`)]),T;for(const D in l){const O=D.match(/^(.*)-transition$/);T=T.concat(O&&g[O[1]]&&g[O[1]].transition?h.validateSpec({key:D,value:l[D],valueSpec:f.transition,validateSpec:h.validateSpec,style:x,styleSpec:f}):g[D]?h.validateSpec({key:D,value:l[D],valueSpec:g[D],validateSpec:h.validateSpec,style:x,styleSpec:f}):[new Ke(D,l[D],`unknown property "${D}"`)])}return T}function P_(h){const l=h.value,f=h.styleSpec,g=f.sky,x=h.style,T=Or(l);if(l===void 0)return[];if(T!=="object")return[new Ke("sky",l,`object expected, ${T} found`)];let A=[];for(const D in l)A=A.concat(g[D]?h.validateSpec({key:D,value:l[D],valueSpec:g[D],style:x,styleSpec:f}):[new Ke(D,l[D],`unknown property "${D}"`)]);return A}function Nm(h){const l=h.value,f=h.styleSpec,g=f.terrain,x=h.style;let T=[];const A=Or(l);if(l===void 0)return T;if(A!=="object")return T=T.concat([new Ke("terrain",l,`object expected, ${A} found`)]),T;for(const D in l)T=T.concat(g[D]?h.validateSpec({key:D,value:l[D],valueSpec:g[D],validateSpec:h.validateSpec,style:x,styleSpec:f}):[new Ke(D,l[D],`unknown property "${D}"`)]);return T}function Vm(h){let l=[];const f=h.value,g=h.key;if(Array.isArray(f)){const x=[],T=[];for(const A in f)f[A].id&&x.includes(f[A].id)&&l.push(new Ke(g,f,`all the sprites' ids must be unique, but ${f[A].id} is duplicated`)),x.push(f[A].id),f[A].url&&T.includes(f[A].url)&&l.push(new Ke(g,f,`all the sprites' URLs must be unique, but ${f[A].url} is duplicated`)),T.push(f[A].url),l=l.concat(Hi({key:`${g}[${A}]`,value:f[A],valueSpec:{id:{type:"string",required:!0},url:{type:"string",required:!0}},validateSpec:h.validateSpec}));return l}return Wo({key:g,value:f})}const jm={"*":()=>[],array:Gf,boolean:function(h){const l=h.value,f=h.key,g=Or(l);return g!=="boolean"?[new Ke(f,l,`boolean expected, ${g} found`)]:[]},number:zc,color:function(h){const l=h.key,f=h.value,g=Or(f);return g!=="string"?[new Ke(l,f,`color expected, ${g} found`)]:qr.parse(String(f))?[]:[new Ke(l,f,`color expected, "${f}" found`)]},constants:T_,enum:Bc,filter:Fc,function:km,layer:Bm,object:Hi,source:C_,light:$m,sky:P_,terrain:Nm,projection:function(h){const l=h.value,f=h.styleSpec,g=f.projection,x=h.style,T=Or(l);if(l===void 0)return[];if(T!=="object")return[new Ke("projection",l,`object expected, ${T} found`)];let A=[];for(const D in l)A=A.concat(g[D]?h.validateSpec({key:D,value:l[D],valueSpec:g[D],style:x,styleSpec:f}):[new Ke(D,l[D],`unknown property "${D}"`)]);return A},string:Wo,formatted:function(h){return Wo(h).length===0?[]:_l(h)},resolvedImage:function(h){return Wo(h).length===0?[]:_l(h)},padding:function(h){const l=h.key,f=h.value;if(Or(f)==="array"){if(f.length<1||f.length>4)return[new Ke(l,f,`padding requires 1 to 4 values; ${f.length} values found`)];const g={type:"number"};let x=[];for(let T=0;T[]}})),h.constants&&(f=f.concat(T_({key:"constants",value:h.constants,style:h,styleSpec:l,validateSpec:Nc}))),Hm(f)}function Na(h){return function(l){return h({...l,validateSpec:Nc})}}function Hm(h){return[].concat(h).sort((l,f)=>l.line-f.line)}function Va(h){return function(...l){return Hm(h.apply(this,l))}}Ta.source=Va(Na(C_)),Ta.sprite=Va(Na(Vm)),Ta.glyphs=Va(Na(A_)),Ta.light=Va(Na($m)),Ta.sky=Va(Na(P_)),Ta.terrain=Va(Na(Nm)),Ta.layer=Va(Na(Bm)),Ta.filter=Va(Na(Fc)),Ta.paintProperty=Va(Na(Om)),Ta.layoutProperty=Va(Na(zm));const qo=Ta,Jw=qo.light,Um=qo.sky,Qw=qo.paintProperty,eS=qo.layoutProperty;function Gm(h,l){let f=!1;if(l&&l.length)for(const g of l)h.fire(new ge(new Error(g.message))),f=!0;return f}class su{constructor(l,f,g){const x=this.cells=[];if(l instanceof ArrayBuffer){this.arrayBuffer=l;const A=new Int32Array(this.arrayBuffer);l=A[0],this.d=(f=A[1])+2*(g=A[2]);for(let O=0;O=U[re+0]&&x>=U[re+1])?(D[J]=!0,A.push(V[J])):D[J]=!1}}}}_forEachCell(l,f,g,x,T,A,D,O){const F=this._convertToCellCoord(l),V=this._convertToCellCoord(f),U=this._convertToCellCoord(g),X=this._convertToCellCoord(x);for(let J=F;J<=U;J++)for(let re=V;re<=X;re++){const se=this.d*re+J;if((!O||O(this._convertFromCellCoord(J),this._convertFromCellCoord(re),this._convertFromCellCoord(J+1),this._convertFromCellCoord(re+1)))&&T.call(this,l,f,g,x,se,A,D,O))return}}_convertFromCellCoord(l){return(l-this.padding)/this.scale}_convertToCellCoord(l){return Math.max(0,Math.min(this.d-1,Math.floor(l*this.scale)+this.padding))}toArrayBuffer(){if(this.arrayBuffer)return this.arrayBuffer;const l=this.cells,f=3+this.cells.length+1+1;let g=0;for(let A=0;A=0)continue;const A=h[T];x[T]=fo[f].shallow.indexOf(T)>=0?A:Vc(A,l)}h instanceof Error&&(x.message=h.message)}if(x.$name)throw new Error("$name property is reserved for worker serialization logic.");return f!=="Object"&&(x.$name=f),x}function po(h){if(E_(h))return h;if(Array.isArray(h))return h.map(po);if(typeof h!="object")throw new Error("can't deserialize object of type "+typeof h);const l=Wm(h)||"Object";if(!fo[l])throw new Error(`can't deserialize unregistered class ${l}`);const{klass:f}=fo[l];if(!f)throw new Error(`can't deserialize unregistered class ${l}`);if(f.deserialize)return f.deserialize(h);const g=Object.create(f.prototype);for(const x of Object.keys(h)){if(x==="$name")continue;const T=h[x];g[x]=fo[l].shallow.indexOf(x)>=0?T:po(T)}return g}class M_{constructor(){this.first=!0}update(l,f){const g=Math.floor(l);return this.first?(this.first=!1,this.lastIntegerZoom=g,this.lastIntegerZoomTime=0,this.lastZoom=l,this.lastFloorZoom=g,!0):(this.lastFloorZoom>g?(this.lastIntegerZoom=g+1,this.lastIntegerZoomTime=f):this.lastFloorZoomh>=128&&h<=255,Arabic:h=>h>=1536&&h<=1791,"Arabic Supplement":h=>h>=1872&&h<=1919,"Arabic Extended-A":h=>h>=2208&&h<=2303,"Hangul Jamo":h=>h>=4352&&h<=4607,"Unified Canadian Aboriginal Syllabics":h=>h>=5120&&h<=5759,Khmer:h=>h>=6016&&h<=6143,"Unified Canadian Aboriginal Syllabics Extended":h=>h>=6320&&h<=6399,"General Punctuation":h=>h>=8192&&h<=8303,"Letterlike Symbols":h=>h>=8448&&h<=8527,"Number Forms":h=>h>=8528&&h<=8591,"Miscellaneous Technical":h=>h>=8960&&h<=9215,"Control Pictures":h=>h>=9216&&h<=9279,"Optical Character Recognition":h=>h>=9280&&h<=9311,"Enclosed Alphanumerics":h=>h>=9312&&h<=9471,"Geometric Shapes":h=>h>=9632&&h<=9727,"Miscellaneous Symbols":h=>h>=9728&&h<=9983,"Miscellaneous Symbols and Arrows":h=>h>=11008&&h<=11263,"CJK Radicals Supplement":h=>h>=11904&&h<=12031,"Kangxi Radicals":h=>h>=12032&&h<=12255,"Ideographic Description Characters":h=>h>=12272&&h<=12287,"CJK Symbols and Punctuation":h=>h>=12288&&h<=12351,Hiragana:h=>h>=12352&&h<=12447,Katakana:h=>h>=12448&&h<=12543,Bopomofo:h=>h>=12544&&h<=12591,"Hangul Compatibility Jamo":h=>h>=12592&&h<=12687,Kanbun:h=>h>=12688&&h<=12703,"Bopomofo Extended":h=>h>=12704&&h<=12735,"CJK Strokes":h=>h>=12736&&h<=12783,"Katakana Phonetic Extensions":h=>h>=12784&&h<=12799,"Enclosed CJK Letters and Months":h=>h>=12800&&h<=13055,"CJK Compatibility":h=>h>=13056&&h<=13311,"CJK Unified Ideographs Extension A":h=>h>=13312&&h<=19903,"Yijing Hexagram Symbols":h=>h>=19904&&h<=19967,"CJK Unified Ideographs":h=>h>=19968&&h<=40959,"Yi Syllables":h=>h>=40960&&h<=42127,"Yi Radicals":h=>h>=42128&&h<=42191,"Hangul Jamo Extended-A":h=>h>=43360&&h<=43391,"Hangul Syllables":h=>h>=44032&&h<=55215,"Hangul Jamo Extended-B":h=>h>=55216&&h<=55295,"Private Use Area":h=>h>=57344&&h<=63743,"CJK Compatibility Ideographs":h=>h>=63744&&h<=64255,"Arabic Presentation Forms-A":h=>h>=64336&&h<=65023,"Vertical Forms":h=>h>=65040&&h<=65055,"CJK Compatibility Forms":h=>h>=65072&&h<=65103,"Small Form Variants":h=>h>=65104&&h<=65135,"Arabic Presentation Forms-B":h=>h>=65136&&h<=65279,"Halfwidth and Fullwidth Forms":h=>h>=65280&&h<=65519};function qm(h){for(const l of h)if(Zm(l.charCodeAt(0)))return!0;return!1}function tS(h){for(const l of h)if(!D_(l.charCodeAt(0)))return!1;return!0}function D_(h){return!(wt.Arabic(h)||wt["Arabic Supplement"](h)||wt["Arabic Extended-A"](h)||wt["Arabic Presentation Forms-A"](h)||wt["Arabic Presentation Forms-B"](h))}function Zm(h){return!(h!==746&&h!==747&&(h<4352||!(wt["Bopomofo Extended"](h)||wt.Bopomofo(h)||wt["CJK Compatibility Forms"](h)&&!(h>=65097&&h<=65103)||wt["CJK Compatibility Ideographs"](h)||wt["CJK Compatibility"](h)||wt["CJK Radicals Supplement"](h)||wt["CJK Strokes"](h)||!(!wt["CJK Symbols and Punctuation"](h)||h>=12296&&h<=12305||h>=12308&&h<=12319||h===12336)||wt["CJK Unified Ideographs Extension A"](h)||wt["CJK Unified Ideographs"](h)||wt["Enclosed CJK Letters and Months"](h)||wt["Hangul Compatibility Jamo"](h)||wt["Hangul Jamo Extended-A"](h)||wt["Hangul Jamo Extended-B"](h)||wt["Hangul Jamo"](h)||wt["Hangul Syllables"](h)||wt.Hiragana(h)||wt["Ideographic Description Characters"](h)||wt.Kanbun(h)||wt["Kangxi Radicals"](h)||wt["Katakana Phonetic Extensions"](h)||wt.Katakana(h)&&h!==12540||!(!wt["Halfwidth and Fullwidth Forms"](h)||h===65288||h===65289||h===65293||h>=65306&&h<=65310||h===65339||h===65341||h===65343||h>=65371&&h<=65503||h===65507||h>=65512&&h<=65519)||!(!wt["Small Form Variants"](h)||h>=65112&&h<=65118||h>=65123&&h<=65126)||wt["Unified Canadian Aboriginal Syllabics"](h)||wt["Unified Canadian Aboriginal Syllabics Extended"](h)||wt["Vertical Forms"](h)||wt["Yijing Hexagram Symbols"](h)||wt["Yi Syllables"](h)||wt["Yi Radicals"](h))))}function L_(h){return!(Zm(h)||function(l){return!!(wt["Latin-1 Supplement"](l)&&(l===167||l===169||l===174||l===177||l===188||l===189||l===190||l===215||l===247)||wt["General Punctuation"](l)&&(l===8214||l===8224||l===8225||l===8240||l===8241||l===8251||l===8252||l===8258||l===8263||l===8264||l===8265||l===8273)||wt["Letterlike Symbols"](l)||wt["Number Forms"](l)||wt["Miscellaneous Technical"](l)&&(l>=8960&&l<=8967||l>=8972&&l<=8991||l>=8996&&l<=9e3||l===9003||l>=9085&&l<=9114||l>=9150&&l<=9165||l===9167||l>=9169&&l<=9179||l>=9186&&l<=9215)||wt["Control Pictures"](l)&&l!==9251||wt["Optical Character Recognition"](l)||wt["Enclosed Alphanumerics"](l)||wt["Geometric Shapes"](l)||wt["Miscellaneous Symbols"](l)&&!(l>=9754&&l<=9759)||wt["Miscellaneous Symbols and Arrows"](l)&&(l>=11026&&l<=11055||l>=11088&&l<=11097||l>=11192&&l<=11243)||wt["CJK Symbols and Punctuation"](l)||wt.Katakana(l)||wt["Private Use Area"](l)||wt["CJK Compatibility Forms"](l)||wt["Small Form Variants"](l)||wt["Halfwidth and Fullwidth Forms"](l)||l===8734||l===8756||l===8757||l>=9984&&l<=10087||l>=10102&&l<=10131||l===65532||l===65533)}(h))}function Cs(h){return h>=1424&&h<=2303||wt["Arabic Presentation Forms-A"](h)||wt["Arabic Presentation Forms-B"](h)}function k_(h,l){return!(!l&&Cs(h)||h>=2304&&h<=3583||h>=3840&&h<=4255||wt.Khmer(h))}function Xm(h){for(const l of h)if(Cs(l.charCodeAt(0)))return!0;return!1}const Ps=new class{constructor(){this.applyArabicShaping=null,this.processBidirectionalText=null,this.processStyledBidirectionalText=null,this.pluginStatus="unavailable",this.pluginURL=null}setState(h){this.pluginStatus=h.pluginStatus,this.pluginURL=h.pluginURL}getState(){return{pluginStatus:this.pluginStatus,pluginURL:this.pluginURL}}setMethods(h){this.applyArabicShaping=h.applyArabicShaping,this.processBidirectionalText=h.processBidirectionalText,this.processStyledBidirectionalText=h.processStyledBidirectionalText}isParsed(){return this.applyArabicShaping!=null&&this.processBidirectionalText!=null&&this.processStyledBidirectionalText!=null}getPluginURL(){return this.pluginURL}getRTLTextPluginStatus(){return this.pluginStatus}};class cn{constructor(l,f){this.zoom=l,f?(this.now=f.now,this.fadeDuration=f.fadeDuration,this.zoomHistory=f.zoomHistory,this.transition=f.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new M_,this.transition={})}isSupportedScript(l){return function(f,g){for(const x of f)if(!k_(x.charCodeAt(0),g))return!1;return!0}(l,Ps.getRTLTextPluginStatus()==="loaded")}crossFadingFactor(){return this.fadeDuration===0?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)}getCrossfadeParameters(){const l=this.zoom,f=l-Math.floor(l),g=this.crossFadingFactor();return l>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:f+(1-f)*g}:{fromScale:.5,toScale:1,t:1-(1-g)*f}}}class Wf{constructor(l,f){this.property=l,this.value=f,this.expression=function(g,x){if(kc(g))return new Vf(g,x);if(Rc(g)){const T=S_(g,x);if(T.result==="error")throw new Error(T.value.map(A=>`${A.key}: ${A.message}`).join(", "));return T.value}{let T=g;return x.type==="color"&&typeof g=="string"?T=qr.parse(g):x.type!=="padding"||typeof g!="number"&&!Array.isArray(g)?x.type==="variableAnchorOffsetCollection"&&Array.isArray(g)&&(T=sa.parse(g)):T=oa.parse(g),{kind:"constant",evaluate:()=>T}}}(f===void 0?l.specification.default:f,l.specification)}isDataDriven(){return this.expression.kind==="source"||this.expression.kind==="composite"}possiblyEvaluate(l,f,g){return this.property.possiblyEvaluate(this,l,f,g)}}class lu{constructor(l){this.property=l,this.value=new Wf(l,void 0)}transitioned(l,f){return new R_(this.property,this.value,f,H({},l.transition,this.transition),l.now)}untransitioned(){return new R_(this.property,this.value,null,{},0)}}class uu{constructor(l){this._properties=l,this._values=Object.create(l.defaultTransitionablePropertyValues)}getValue(l){return ne(this._values[l].value.value)}setValue(l,f){Object.prototype.hasOwnProperty.call(this._values,l)||(this._values[l]=new lu(this._values[l].property)),this._values[l].value=new Wf(this._values[l].property,f===null?void 0:ne(f))}getTransition(l){return ne(this._values[l].transition)}setTransition(l,f){Object.prototype.hasOwnProperty.call(this._values,l)||(this._values[l]=new lu(this._values[l].property)),this._values[l].transition=ne(f)||void 0}serialize(){const l={};for(const f of Object.keys(this._values)){const g=this.getValue(f);g!==void 0&&(l[f]=g);const x=this.getTransition(f);x!==void 0&&(l[`${f}-transition`]=x)}return l}transitioned(l,f){const g=new Km(this._properties);for(const x of Object.keys(this._values))g._values[x]=this._values[x].transitioned(l,f._values[x]);return g}untransitioned(){const l=new Km(this._properties);for(const f of Object.keys(this._values))l._values[f]=this._values[f].untransitioned();return l}}class R_{constructor(l,f,g,x,T){this.property=l,this.value=f,this.begin=T+x.delay||0,this.end=this.begin+x.duration||0,l.specification.transition&&(x.delay||x.duration)&&(this.prior=g)}possiblyEvaluate(l,f,g){const x=l.now||0,T=this.value.possiblyEvaluate(l,f,g),A=this.prior;if(A){if(x>this.end)return this.prior=null,T;if(this.value.isDataDriven())return this.prior=null,T;if(x=1)return 1;const F=O*O,V=F*O;return 4*(O<.5?V:3*(O-F)+V-.75)}(D))}}return T}}class Km{constructor(l){this._properties=l,this._values=Object.create(l.defaultTransitioningPropertyValues)}possiblyEvaluate(l,f,g){const x=new qf(this._properties);for(const T of Object.keys(this._values))x._values[T]=this._values[T].possiblyEvaluate(l,f,g);return x}hasTransition(){for(const l of Object.keys(this._values))if(this._values[l].prior)return!0;return!1}}class jc{constructor(l){this._properties=l,this._values=Object.create(l.defaultPropertyValues)}hasValue(l){return this._values[l].value!==void 0}getValue(l){return ne(this._values[l].value)}setValue(l,f){this._values[l]=new Wf(this._values[l].property,f===null?void 0:ne(f))}serialize(){const l={};for(const f of Object.keys(this._values)){const g=this.getValue(f);g!==void 0&&(l[f]=g)}return l}possiblyEvaluate(l,f,g){const x=new qf(this._properties);for(const T of Object.keys(this._values))x._values[T]=this._values[T].possiblyEvaluate(l,f,g);return x}}class mo{constructor(l,f,g){this.property=l,this.value=f,this.parameters=g}isConstant(){return this.value.kind==="constant"}constantOr(l){return this.value.kind==="constant"?this.value.value:l}evaluate(l,f,g,x){return this.property.evaluate(this.value,this.parameters,l,f,g,x)}}class qf{constructor(l){this._properties=l,this._values=Object.create(l.defaultPossiblyEvaluatedValues)}get(l){return this._values[l]}}class $t{constructor(l){this.specification=l}possiblyEvaluate(l,f){if(l.isDataDriven())throw new Error("Value should not be data driven");return l.expression.evaluate(f)}interpolate(l,f,g){const x=la[this.specification.type];return x?x(l,f,g):l}}class Xt{constructor(l,f){this.specification=l,this.overrides=f}possiblyEvaluate(l,f,g,x){return new mo(this,l.expression.kind==="constant"||l.expression.kind==="camera"?{kind:"constant",value:l.expression.evaluate(f,null,{},g,x)}:l.expression,f)}interpolate(l,f,g){if(l.value.kind!=="constant"||f.value.kind!=="constant")return l;if(l.value.value===void 0||f.value.value===void 0)return new mo(this,{kind:"constant",value:void 0},l.parameters);const x=la[this.specification.type];if(x){const T=x(l.value.value,f.value.value,g);return new mo(this,{kind:"constant",value:T},l.parameters)}return l}evaluate(l,f,g,x,T,A){return l.kind==="constant"?l.value:l.evaluate(f,g,x,T,A)}}class C extends Xt{possiblyEvaluate(l,f,g,x){if(l.value===void 0)return new mo(this,{kind:"constant",value:void 0},f);if(l.expression.kind==="constant"){const T=l.expression.evaluate(f,null,{},g,x),A=l.property.specification.type==="resolvedImage"&&typeof T!="string"?T.name:T,D=this._calculate(A,A,A,f);return new mo(this,{kind:"constant",value:D},f)}if(l.expression.kind==="camera"){const T=this._calculate(l.expression.evaluate({zoom:f.zoom-1}),l.expression.evaluate({zoom:f.zoom}),l.expression.evaluate({zoom:f.zoom+1}),f);return new mo(this,{kind:"constant",value:T},f)}return new mo(this,l.expression,f)}evaluate(l,f,g,x,T,A){if(l.kind==="source"){const D=l.evaluate(f,g,x,T,A);return this._calculate(D,D,D,f)}return l.kind==="composite"?this._calculate(l.evaluate({zoom:Math.floor(f.zoom)-1},g,x),l.evaluate({zoom:Math.floor(f.zoom)},g,x),l.evaluate({zoom:Math.floor(f.zoom)+1},g,x),f):l.value}_calculate(l,f,g,x){return x.zoom>x.zoomHistory.lastIntegerZoom?{from:l,to:f}:{from:g,to:f}}interpolate(l){return l}}class u{constructor(l){this.specification=l}possiblyEvaluate(l,f,g,x){if(l.value!==void 0){if(l.expression.kind==="constant"){const T=l.expression.evaluate(f,null,{},g,x);return this._calculate(T,T,T,f)}return this._calculate(l.expression.evaluate(new cn(Math.floor(f.zoom-1),f)),l.expression.evaluate(new cn(Math.floor(f.zoom),f)),l.expression.evaluate(new cn(Math.floor(f.zoom+1),f)),f)}}_calculate(l,f,g,x){return x.zoom>x.zoomHistory.lastIntegerZoom?{from:l,to:f}:{from:g,to:f}}interpolate(l){return l}}class p{constructor(l){this.specification=l}possiblyEvaluate(l,f,g,x){return!!l.expression.evaluate(f,null,{},g,x)}interpolate(){return!1}}class b{constructor(l){this.properties=l,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[];for(const f in l){const g=l[f];g.specification.overridable&&this.overridableProperties.push(f);const x=this.defaultPropertyValues[f]=new Wf(g,void 0),T=this.defaultTransitionablePropertyValues[f]=new lu(g);this.defaultTransitioningPropertyValues[f]=T.untransitioned(),this.defaultPossiblyEvaluatedValues[f]=x.possiblyEvaluate({})}}}Lt("DataDrivenProperty",Xt),Lt("DataConstantProperty",$t),Lt("CrossFadedDataDrivenProperty",C),Lt("CrossFadedProperty",u),Lt("ColorRampProperty",p);const w="-transition";class P extends Fe{constructor(l,f){if(super(),this.id=l.id,this.type=l.type,this._featureFilter={filter:()=>!0,needGeometry:!1},l.type!=="custom"&&(this.metadata=l.metadata,this.minzoom=l.minzoom,this.maxzoom=l.maxzoom,l.type!=="background"&&(this.source=l.source,this.sourceLayer=l["source-layer"],this.filter=l.filter),f.layout&&(this._unevaluatedLayout=new jc(f.layout)),f.paint)){this._transitionablePaint=new uu(f.paint);for(const g in l.paint)this.setPaintProperty(g,l.paint[g],{validate:!1});for(const g in l.layout)this.setLayoutProperty(g,l.layout[g],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new qf(f.paint)}}getCrossfadeParameters(){return this._crossfadeParameters}getLayoutProperty(l){return l==="visibility"?this.visibility:this._unevaluatedLayout.getValue(l)}setLayoutProperty(l,f,g={}){f!=null&&this._validate(eS,`layers.${this.id}.layout.${l}`,l,f,g)||(l!=="visibility"?this._unevaluatedLayout.setValue(l,f):this.visibility=f)}getPaintProperty(l){return l.endsWith(w)?this._transitionablePaint.getTransition(l.slice(0,-11)):this._transitionablePaint.getValue(l)}setPaintProperty(l,f,g={}){if(f!=null&&this._validate(Qw,`layers.${this.id}.paint.${l}`,l,f,g))return!1;if(l.endsWith(w))return this._transitionablePaint.setTransition(l.slice(0,-11),f||void 0),!1;{const x=this._transitionablePaint._values[l],T=x.property.specification["property-type"]==="cross-faded-data-driven",A=x.value.isDataDriven(),D=x.value;this._transitionablePaint.setValue(l,f),this._handleSpecialPaintPropertyUpdate(l);const O=this._transitionablePaint._values[l].value;return O.isDataDriven()||A||T||this._handleOverridablePaintPropertyUpdate(l,D,O)}}_handleSpecialPaintPropertyUpdate(l){}_handleOverridablePaintPropertyUpdate(l,f,g){return!1}isHidden(l){return!!(this.minzoom&&l=this.maxzoom)||this.visibility==="none"}updateTransitions(l){this._transitioningPaint=this._transitionablePaint.transitioned(l,this._transitioningPaint)}hasTransition(){return this._transitioningPaint.hasTransition()}recalculate(l,f){l.getCrossfadeParameters&&(this._crossfadeParameters=l.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(l,void 0,f)),this.paint=this._transitioningPaint.possiblyEvaluate(l,void 0,f)}serialize(){const l={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&&(l.layout=l.layout||{},l.layout.visibility=this.visibility),ee(l,(f,g)=>!(f===void 0||g==="layout"&&!Object.keys(f).length||g==="paint"&&!Object.keys(f).length))}_validate(l,f,g,x,T={}){return(!T||T.validate!==!1)&&Gm(this,l.call(qo,{key:f,layerType:this.type,objectKey:g,value:x,styleSpec:ye,style:{glyphs:!0,sprite:!0}}))}is3D(){return!1}isTileClipped(){return!1}hasOffscreenPass(){return!1}resize(){}isStateDependent(){for(const l in this.paint._values){const f=this.paint.get(l);if(f instanceof mo&&ml(f.property.specification)&&(f.value.kind==="source"||f.value.kind==="composite")&&f.value.isStateDependent)return!0}return!1}}const k={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array};class z{constructor(l,f){this._structArray=l,this._pos1=f*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8}}class B{constructor(){this.isTransferred=!1,this.capacity=-1,this.resize(0)}static serialize(l,f){return l._trim(),f&&(l.isTransferred=!0,f.push(l.arrayBuffer)),{length:l.length,arrayBuffer:l.arrayBuffer}}static deserialize(l){const f=Object.create(this.prototype);return f.arrayBuffer=l.arrayBuffer,f.length=l.length,f.capacity=l.arrayBuffer.byteLength/f.bytesPerElement,f._refreshViews(),f}_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(l){this.reserve(l),this.length=l}reserve(l){if(l>this.capacity){this.capacity=Math.max(l,Math.floor(5*this.capacity),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);const f=this.uint8;this._refreshViews(),f&&this.uint8.set(f)}}_refreshViews(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")}}function N(h,l=1){let f=0,g=0;return{members:h.map(x=>{const T=k[x.type].BYTES_PER_ELEMENT,A=f=q(f,Math.max(l,T)),D=x.components||1;return g=Math.max(g,T),f+=T*D,{name:x.name,type:x.type,components:D,offset:A}}),size:q(f,Math.max(g,l)),alignment:l}}function q(h,l){return Math.ceil(h/l)*l}class W extends B{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(l,f){const g=this.length;return this.resize(g+1),this.emplace(g,l,f)}emplace(l,f,g){const x=2*l;return this.int16[x+0]=f,this.int16[x+1]=g,l}}W.prototype.bytesPerElement=4,Lt("StructArrayLayout2i4",W);class te extends B{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(l,f,g){const x=this.length;return this.resize(x+1),this.emplace(x,l,f,g)}emplace(l,f,g,x){const T=3*l;return this.int16[T+0]=f,this.int16[T+1]=g,this.int16[T+2]=x,l}}te.prototype.bytesPerElement=6,Lt("StructArrayLayout3i6",te);class ae extends B{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(l,f,g,x){const T=this.length;return this.resize(T+1),this.emplace(T,l,f,g,x)}emplace(l,f,g,x,T){const A=4*l;return this.int16[A+0]=f,this.int16[A+1]=g,this.int16[A+2]=x,this.int16[A+3]=T,l}}ae.prototype.bytesPerElement=8,Lt("StructArrayLayout4i8",ae);class le extends B{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(l,f,g,x,T,A){const D=this.length;return this.resize(D+1),this.emplace(D,l,f,g,x,T,A)}emplace(l,f,g,x,T,A,D){const O=6*l;return this.int16[O+0]=f,this.int16[O+1]=g,this.int16[O+2]=x,this.int16[O+3]=T,this.int16[O+4]=A,this.int16[O+5]=D,l}}le.prototype.bytesPerElement=12,Lt("StructArrayLayout2i4i12",le);class ve extends B{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(l,f,g,x,T,A){const D=this.length;return this.resize(D+1),this.emplace(D,l,f,g,x,T,A)}emplace(l,f,g,x,T,A,D){const O=4*l,F=8*l;return this.int16[O+0]=f,this.int16[O+1]=g,this.uint8[F+4]=x,this.uint8[F+5]=T,this.uint8[F+6]=A,this.uint8[F+7]=D,l}}ve.prototype.bytesPerElement=8,Lt("StructArrayLayout2i4ub8",ve);class he extends B{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(l,f){const g=this.length;return this.resize(g+1),this.emplace(g,l,f)}emplace(l,f,g){const x=2*l;return this.float32[x+0]=f,this.float32[x+1]=g,l}}he.prototype.bytesPerElement=8,Lt("StructArrayLayout2f8",he);class xe extends B{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(l,f,g,x,T,A,D,O,F,V){const U=this.length;return this.resize(U+1),this.emplace(U,l,f,g,x,T,A,D,O,F,V)}emplace(l,f,g,x,T,A,D,O,F,V,U){const X=10*l;return this.uint16[X+0]=f,this.uint16[X+1]=g,this.uint16[X+2]=x,this.uint16[X+3]=T,this.uint16[X+4]=A,this.uint16[X+5]=D,this.uint16[X+6]=O,this.uint16[X+7]=F,this.uint16[X+8]=V,this.uint16[X+9]=U,l}}xe.prototype.bytesPerElement=20,Lt("StructArrayLayout10ui20",xe);class Pe extends B{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(l,f,g,x,T,A,D,O,F,V,U,X){const J=this.length;return this.resize(J+1),this.emplace(J,l,f,g,x,T,A,D,O,F,V,U,X)}emplace(l,f,g,x,T,A,D,O,F,V,U,X,J){const re=12*l;return this.int16[re+0]=f,this.int16[re+1]=g,this.int16[re+2]=x,this.int16[re+3]=T,this.uint16[re+4]=A,this.uint16[re+5]=D,this.uint16[re+6]=O,this.uint16[re+7]=F,this.int16[re+8]=V,this.int16[re+9]=U,this.int16[re+10]=X,this.int16[re+11]=J,l}}Pe.prototype.bytesPerElement=24,Lt("StructArrayLayout4i4ui4i24",Pe);class pe extends B{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(l,f,g){const x=this.length;return this.resize(x+1),this.emplace(x,l,f,g)}emplace(l,f,g,x){const T=3*l;return this.float32[T+0]=f,this.float32[T+1]=g,this.float32[T+2]=x,l}}pe.prototype.bytesPerElement=12,Lt("StructArrayLayout3f12",pe);class Me extends B{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)}emplaceBack(l){const f=this.length;return this.resize(f+1),this.emplace(f,l)}emplace(l,f){return this.uint32[1*l+0]=f,l}}Me.prototype.bytesPerElement=4,Lt("StructArrayLayout1ul4",Me);class ze extends B{_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(l,f,g,x,T,A,D,O,F){const V=this.length;return this.resize(V+1),this.emplace(V,l,f,g,x,T,A,D,O,F)}emplace(l,f,g,x,T,A,D,O,F,V){const U=10*l,X=5*l;return this.int16[U+0]=f,this.int16[U+1]=g,this.int16[U+2]=x,this.int16[U+3]=T,this.int16[U+4]=A,this.int16[U+5]=D,this.uint32[X+3]=O,this.uint16[U+8]=F,this.uint16[U+9]=V,l}}ze.prototype.bytesPerElement=20,Lt("StructArrayLayout6i1ul2ui20",ze);class Ne extends B{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(l,f,g,x,T,A){const D=this.length;return this.resize(D+1),this.emplace(D,l,f,g,x,T,A)}emplace(l,f,g,x,T,A,D){const O=6*l;return this.int16[O+0]=f,this.int16[O+1]=g,this.int16[O+2]=x,this.int16[O+3]=T,this.int16[O+4]=A,this.int16[O+5]=D,l}}Ne.prototype.bytesPerElement=12,Lt("StructArrayLayout2i2i2i12",Ne);class Xe extends B{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(l,f,g,x,T){const A=this.length;return this.resize(A+1),this.emplace(A,l,f,g,x,T)}emplace(l,f,g,x,T,A){const D=4*l,O=8*l;return this.float32[D+0]=f,this.float32[D+1]=g,this.float32[D+2]=x,this.int16[O+6]=T,this.int16[O+7]=A,l}}Xe.prototype.bytesPerElement=16,Lt("StructArrayLayout2f1f2i16",Xe);class it extends B{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(l,f,g,x,T,A){const D=this.length;return this.resize(D+1),this.emplace(D,l,f,g,x,T,A)}emplace(l,f,g,x,T,A,D){const O=16*l,F=4*l,V=8*l;return this.uint8[O+0]=f,this.uint8[O+1]=g,this.float32[F+1]=x,this.float32[F+2]=T,this.int16[V+6]=A,this.int16[V+7]=D,l}}it.prototype.bytesPerElement=16,Lt("StructArrayLayout2ub2f2i16",it);class Pt extends B{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(l,f,g){const x=this.length;return this.resize(x+1),this.emplace(x,l,f,g)}emplace(l,f,g,x){const T=3*l;return this.uint16[T+0]=f,this.uint16[T+1]=g,this.uint16[T+2]=x,l}}Pt.prototype.bytesPerElement=6,Lt("StructArrayLayout3ui6",Pt);class At extends B{_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(l,f,g,x,T,A,D,O,F,V,U,X,J,re,se,de,we){const Re=this.length;return this.resize(Re+1),this.emplace(Re,l,f,g,x,T,A,D,O,F,V,U,X,J,re,se,de,we)}emplace(l,f,g,x,T,A,D,O,F,V,U,X,J,re,se,de,we,Re){const Ce=24*l,De=12*l,je=48*l;return this.int16[Ce+0]=f,this.int16[Ce+1]=g,this.uint16[Ce+2]=x,this.uint16[Ce+3]=T,this.uint32[De+2]=A,this.uint32[De+3]=D,this.uint32[De+4]=O,this.uint16[Ce+10]=F,this.uint16[Ce+11]=V,this.uint16[Ce+12]=U,this.float32[De+7]=X,this.float32[De+8]=J,this.uint8[je+36]=re,this.uint8[je+37]=se,this.uint8[je+38]=de,this.uint32[De+10]=we,this.int16[Ce+22]=Re,l}}At.prototype.bytesPerElement=48,Lt("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",At);class ot extends B{_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(l,f,g,x,T,A,D,O,F,V,U,X,J,re,se,de,we,Re,Ce,De,je,Je,yt,Ht,bt,gt,Bt,kt){const Mt=this.length;return this.resize(Mt+1),this.emplace(Mt,l,f,g,x,T,A,D,O,F,V,U,X,J,re,se,de,we,Re,Ce,De,je,Je,yt,Ht,bt,gt,Bt,kt)}emplace(l,f,g,x,T,A,D,O,F,V,U,X,J,re,se,de,we,Re,Ce,De,je,Je,yt,Ht,bt,gt,Bt,kt,Mt){const Ze=32*l,Nt=16*l;return this.int16[Ze+0]=f,this.int16[Ze+1]=g,this.int16[Ze+2]=x,this.int16[Ze+3]=T,this.int16[Ze+4]=A,this.int16[Ze+5]=D,this.int16[Ze+6]=O,this.int16[Ze+7]=F,this.uint16[Ze+8]=V,this.uint16[Ze+9]=U,this.uint16[Ze+10]=X,this.uint16[Ze+11]=J,this.uint16[Ze+12]=re,this.uint16[Ze+13]=se,this.uint16[Ze+14]=de,this.uint16[Ze+15]=we,this.uint16[Ze+16]=Re,this.uint16[Ze+17]=Ce,this.uint16[Ze+18]=De,this.uint16[Ze+19]=je,this.uint16[Ze+20]=Je,this.uint16[Ze+21]=yt,this.uint16[Ze+22]=Ht,this.uint32[Nt+12]=bt,this.float32[Nt+13]=gt,this.float32[Nt+14]=Bt,this.uint16[Ze+30]=kt,this.uint16[Ze+31]=Mt,l}}ot.prototype.bytesPerElement=64,Lt("StructArrayLayout8i15ui1ul2f2ui64",ot);class ut extends B{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(l){const f=this.length;return this.resize(f+1),this.emplace(f,l)}emplace(l,f){return this.float32[1*l+0]=f,l}}ut.prototype.bytesPerElement=4,Lt("StructArrayLayout1f4",ut);class Rt extends B{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(l,f,g){const x=this.length;return this.resize(x+1),this.emplace(x,l,f,g)}emplace(l,f,g,x){const T=3*l;return this.uint16[6*l+0]=f,this.float32[T+1]=g,this.float32[T+2]=x,l}}Rt.prototype.bytesPerElement=12,Lt("StructArrayLayout1ui2f12",Rt);class rr extends B{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(l,f,g){const x=this.length;return this.resize(x+1),this.emplace(x,l,f,g)}emplace(l,f,g,x){const T=4*l;return this.uint32[2*l+0]=f,this.uint16[T+2]=g,this.uint16[T+3]=x,l}}rr.prototype.bytesPerElement=8,Lt("StructArrayLayout1ul2ui8",rr);class pt extends B{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(l,f){const g=this.length;return this.resize(g+1),this.emplace(g,l,f)}emplace(l,f,g){const x=2*l;return this.uint16[x+0]=f,this.uint16[x+1]=g,l}}pt.prototype.bytesPerElement=4,Lt("StructArrayLayout2ui4",pt);class _t extends B{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(l){const f=this.length;return this.resize(f+1),this.emplace(f,l)}emplace(l,f){return this.uint16[1*l+0]=f,l}}_t.prototype.bytesPerElement=2,Lt("StructArrayLayout1ui2",_t);class Jt extends B{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(l,f,g,x){const T=this.length;return this.resize(T+1),this.emplace(T,l,f,g,x)}emplace(l,f,g,x,T){const A=4*l;return this.float32[A+0]=f,this.float32[A+1]=g,this.float32[A+2]=x,this.float32[A+3]=T,l}}Jt.prototype.bytesPerElement=16,Lt("StructArrayLayout4f16",Jt);class vn extends z{get anchorPointX(){return this._structArray.int16[this._pos2+0]}get anchorPointY(){return this._structArray.int16[this._pos2+1]}get x1(){return this._structArray.int16[this._pos2+2]}get y1(){return this._structArray.int16[this._pos2+3]}get x2(){return this._structArray.int16[this._pos2+4]}get y2(){return this._structArray.int16[this._pos2+5]}get featureIndex(){return this._structArray.uint32[this._pos4+3]}get sourceLayerIndex(){return this._structArray.uint16[this._pos2+8]}get bucketIndex(){return this._structArray.uint16[this._pos2+9]}get anchorPoint(){return new v(this.anchorPointX,this.anchorPointY)}}vn.prototype.size=20;class pr extends ze{get(l){return new vn(this,l)}}Lt("CollisionBoxArray",pr);class Ar extends z{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(l){this._structArray.uint8[this._pos1+37]=l}get hidden(){return this._structArray.uint8[this._pos1+38]}set hidden(l){this._structArray.uint8[this._pos1+38]=l}get crossTileID(){return this._structArray.uint32[this._pos4+10]}set crossTileID(l){this._structArray.uint32[this._pos4+10]=l}get associatedIconIndex(){return this._structArray.int16[this._pos2+22]}}Ar.prototype.size=48;class gn extends At{get(l){return new Ar(this,l)}}Lt("PlacedSymbolArray",gn);class vi extends z{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(l){this._structArray.uint32[this._pos4+12]=l}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]}}vi.prototype.size=64;class ja extends ot{get(l){return new vi(this,l)}}Lt("SymbolInstanceArray",ja);class yn extends ut{getoffsetX(l){return this.float32[1*l+0]}}Lt("GlyphOffsetArray",yn);class Ui extends te{getx(l){return this.int16[3*l+0]}gety(l){return this.int16[3*l+1]}gettileUnitDistanceFromAnchor(l){return this.int16[3*l+2]}}Lt("SymbolLineVertexArray",Ui);class Di extends z{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]}}Di.prototype.size=12;class gi extends Rt{get(l){return new Di(this,l)}}Lt("TextAnchorOffsetArray",gi);class yi extends z{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]}}yi.prototype.size=8;class Ha extends rr{get(l){return new yi(this,l)}}Lt("FeatureIndexArray",Ha);class bl extends W{}class Zf extends W{}class cu extends W{}class xl extends le{}class Xf extends ve{}class Ym extends he{}class oi extends xe{}class Ua extends Pe{}class As extends pe{}class hu extends Me{}class _i extends Ne{}class bi extends it{}class ri extends Pt{}class Cn extends pt{}const fu=N([{name:"a_pos",components:2,type:"Int16"}],4),{members:Jm}=fu;class Jn{constructor(l=[]){this.segments=l}prepareSegment(l,f,g,x){let T=this.segments[this.segments.length-1];return l>Jn.MAX_VERTEX_ARRAY_LENGTH&&ce(`Max vertices per segment is ${Jn.MAX_VERTEX_ARRAY_LENGTH}: bucket requested ${l}`),(!T||T.vertexLength+l>Jn.MAX_VERTEX_ARRAY_LENGTH||T.sortKey!==x)&&(T={vertexOffset:f.length,primitiveOffset:g.length,vertexLength:0,primitiveLength:0},x!==void 0&&(T.sortKey=x),this.segments.push(T)),T}get(){return this.segments}destroy(){for(const l of this.segments)for(const f in l.vaos)l.vaos[f].destroy()}static simpleSegment(l,f,g,x){return new Jn([{vertexOffset:l,primitiveOffset:f,vertexLength:g,primitiveLength:x,vaos:{},sortKey:0}])}}function O_(h,l){return 256*(h=G(Math.floor(h),0,255))+G(Math.floor(l),0,255)}Jn.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,Lt("SegmentVector",Jn);const Kf=N([{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 Yf={exports:{}},Is={exports:{}};Is.exports=function(h,l){var f,g,x,T,A,D,O,F;for(g=h.length-(f=3&h.length),x=l,A=3432918353,D=461845907,F=0;F>>16)*A&65535)<<16)&4294967295)<<15|O>>>17))*D+(((O>>>16)*D&65535)<<16)&4294967295)<<13|x>>>19))+((5*(x>>>16)&65535)<<16)&4294967295))+((58964+(T>>>16)&65535)<<16);switch(O=0,f){case 3:O^=(255&h.charCodeAt(F+2))<<16;case 2:O^=(255&h.charCodeAt(F+1))<<8;case 1:x^=O=(65535&(O=(O=(65535&(O^=255&h.charCodeAt(F)))*A+(((O>>>16)*A&65535)<<16)&4294967295)<<15|O>>>17))*D+(((O>>>16)*D&65535)<<16)&4294967295}return x^=h.length,x=2246822507*(65535&(x^=x>>>16))+((2246822507*(x>>>16)&65535)<<16)&4294967295,x=3266489909*(65535&(x^=x>>>13))+((3266489909*(x>>>16)&65535)<<16)&4294967295,(x^=x>>>16)>>>0};var z_=Is.exports,Qm={exports:{}};Qm.exports=function(h,l){for(var f,g=h.length,x=l^g,T=0;g>=4;)f=1540483477*(65535&(f=255&h.charCodeAt(T)|(255&h.charCodeAt(++T))<<8|(255&h.charCodeAt(++T))<<16|(255&h.charCodeAt(++T))<<24))+((1540483477*(f>>>16)&65535)<<16),x=1540483477*(65535&x)+((1540483477*(x>>>16)&65535)<<16)^(f=1540483477*(65535&(f^=f>>>24))+((1540483477*(f>>>16)&65535)<<16)),g-=4,++T;switch(g){case 3:x^=(255&h.charCodeAt(T+2))<<16;case 2:x^=(255&h.charCodeAt(T+1))<<8;case 1:x=1540483477*(65535&(x^=255&h.charCodeAt(T)))+((1540483477*(x>>>16)&65535)<<16)}return x=1540483477*(65535&(x^=x>>>13))+((1540483477*(x>>>16)&65535)<<16),(x^=x>>>15)>>>0};var ev=z_,tv=Qm.exports;Yf.exports=ev,Yf.exports.murmur3=ev,Yf.exports.murmur2=tv;var Jf=c(Yf.exports);class du{constructor(){this.ids=[],this.positions=[],this.indexed=!1}add(l,f,g,x){this.ids.push(rD(l)),this.positions.push(f,g,x)}getPositions(l){if(!this.indexed)throw new Error("Trying to get index, but feature positions are not indexed");const f=rD(l);let g=0,x=this.ids.length-1;for(;g>1;this.ids[A]>=f?x=A:g=A+1}const T=[];for(;this.ids[g]===f;)T.push({index:this.positions[3*g],start:this.positions[3*g+1],end:this.positions[3*g+2]}),g++;return T}static serialize(l,f){const g=new Float64Array(l.ids),x=new Uint32Array(l.positions);return rS(g,x,0,g.length-1),f&&f.push(g.buffer,x.buffer),{ids:g,positions:x}}static deserialize(l){const f=new du;return f.ids=l.ids,f.positions=l.positions,f.indexed=!0,f}}function rD(h){const l=+h;return!isNaN(l)&&l<=Number.MAX_SAFE_INTEGER?l:Jf(String(h))}function rS(h,l,f,g){for(;f>1];let T=f-1,A=g+1;for(;;){do T++;while(h[T]x);if(T>=A)break;B_(h,T,A),B_(l,3*T,3*A),B_(l,3*T+1,3*A+1),B_(l,3*T+2,3*A+2)}A-f`u_${x}`),this.type=g}setUniform(l,f,g){l.set(g.constantOr(this.value))}getBinding(l,f,g){return this.type==="color"?new iD(l,f):new F_(l,f)}}class Qf{constructor(l,f){this.uniformNames=f.map(g=>`u_${g}`),this.patternFrom=null,this.patternTo=null,this.pixelRatioFrom=1,this.pixelRatioTo=1}setConstantPatternPositions(l,f){this.pixelRatioFrom=f.pixelRatio,this.pixelRatioTo=l.pixelRatio,this.patternFrom=f.tlbr,this.patternTo=l.tlbr}setUniform(l,f,g,x){const T=x==="u_pattern_to"?this.patternTo:x==="u_pattern_from"?this.patternFrom:x==="u_pixel_ratio_to"?this.pixelRatioTo:x==="u_pixel_ratio_from"?this.pixelRatioFrom:null;T&&l.set(T)}getBinding(l,f,g){return g.substr(0,9)==="u_pattern"?new nD(l,f):new F_(l,f)}}class wl{constructor(l,f,g,x){this.expression=l,this.type=g,this.maxValue=0,this.paintVertexAttributes=f.map(T=>({name:`a_${T}`,type:"Float32",components:g==="color"?2:1,offset:0})),this.paintVertexArray=new x}populatePaintArray(l,f,g,x,T){const A=this.paintVertexArray.length,D=this.expression.evaluate(new cn(0),f,{},x,[],T);this.paintVertexArray.resize(l),this._setPaintValue(A,l,D)}updatePaintArray(l,f,g,x){const T=this.expression.evaluate({zoom:0},g,x);this._setPaintValue(l,f,T)}_setPaintValue(l,f,g){if(this.type==="color"){const x=nS(g);for(let T=l;T`u_${D}_t`),this.type=g,this.useIntegerZoom=x,this.zoom=T,this.maxValue=0,this.paintVertexAttributes=f.map(D=>({name:`a_${D}`,type:"Float32",components:g==="color"?4:2,offset:0})),this.paintVertexArray=new A}populatePaintArray(l,f,g,x,T){const A=this.expression.evaluate(new cn(this.zoom),f,{},x,[],T),D=this.expression.evaluate(new cn(this.zoom+1),f,{},x,[],T),O=this.paintVertexArray.length;this.paintVertexArray.resize(l),this._setPaintValue(O,l,A,D)}updatePaintArray(l,f,g,x){const T=this.expression.evaluate({zoom:this.zoom},g,x),A=this.expression.evaluate({zoom:this.zoom+1},g,x);this._setPaintValue(l,f,T,A)}_setPaintValue(l,f,g,x){if(this.type==="color"){const T=nS(g),A=nS(x);for(let D=l;D`#define HAS_UNIFORM_${x}`))}return l}getBinderAttributes(){const l=[];for(const f in this.binders){const g=this.binders[f];if(g instanceof wl||g instanceof Zo)for(let x=0;x!0){this.programConfigurations={};for(const x of l)this.programConfigurations[x.id]=new aD(x,f,g);this.needsUpload=!1,this._featureMap=new du,this._bufferOffset=0}populatePaintArrays(l,f,g,x,T,A){for(const D in this.programConfigurations)this.programConfigurations[D].populatePaintArrays(l,f,x,T,A);f.id!==void 0&&this._featureMap.add(f.id,g,this._bufferOffset,l),this._bufferOffset=l,this.needsUpload=!0}updatePaintArrays(l,f,g,x){for(const T of g)this.needsUpload=this.programConfigurations[T.id].updatePaintArrays(l,this._featureMap,f,T,x)||this.needsUpload}get(l){return this.programConfigurations[l]}upload(l){if(this.needsUpload){for(const f in this.programConfigurations)this.programConfigurations[f].upload(l);this.needsUpload=!1}}destroy(){for(const l in this.programConfigurations)this.programConfigurations[l].destroy()}}function kU(h,l){return{"text-opacity":["opacity"],"icon-opacity":["opacity"],"text-color":["fill_color"],"icon-color":["fill_color"],"text-halo-color":["halo_color"],"icon-halo-color":["halo_color"],"text-halo-blur":["halo_blur"],"icon-halo-blur":["halo_blur"],"text-halo-width":["halo_width"],"icon-halo-width":["halo_width"],"line-gap-width":["gapwidth"],"line-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"],"fill-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"],"fill-extrusion-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"]}[h]||[h.replace(`${l}-`,"").replace(/-/g,"_")]}function oD(h,l,f){const g={color:{source:he,composite:Jt},number:{source:ut,composite:he}},x=function(T){return{"line-pattern":{source:oi,composite:oi},"fill-pattern":{source:oi,composite:oi},"fill-extrusion-pattern":{source:oi,composite:oi}}[T]}(h);return x&&x[f]||g[l][f]}Lt("ConstantBinder",rv),Lt("CrossFadedConstantBinder",Qf),Lt("SourceExpressionBinder",wl),Lt("CrossFadedCompositeBinder",pu),Lt("CompositeExpressionBinder",Zo),Lt("ProgramConfiguration",aD,{omit:["_buffers"]}),Lt("ProgramConfigurationSet",Uc);const Gn=8192,iS=Math.pow(2,14)-1,sD=-iS-1;function Gc(h){const l=Gn/h.extent,f=h.loadGeometry();for(let g=0;gA.x+1||OA.y+1)&&ce("Geometry exceeds allowed extent, reduce your vector tile buffer size")}}return f}function Wc(h,l){return{type:h.type,id:h.id,properties:h.properties,geometry:l?Gc(h):[]}}function $_(h,l,f,g,x){h.emplaceBack(2*l+(g+1)/2,2*f+(x+1)/2)}class aS{constructor(l){this.zoom=l.zoom,this.overscaling=l.overscaling,this.layers=l.layers,this.layerIds=this.layers.map(f=>f.id),this.index=l.index,this.hasPattern=!1,this.layoutVertexArray=new Zf,this.indexArray=new ri,this.segments=new Jn,this.programConfigurations=new Uc(l.layers,l.zoom),this.stateDependentLayerIds=this.layers.filter(f=>f.isStateDependent()).map(f=>f.id)}populate(l,f,g){const x=this.layers[0],T=[];let A=null,D=!1;x.type==="circle"&&(A=x.layout.get("circle-sort-key"),D=!A.isConstant());for(const{feature:O,id:F,index:V,sourceLayerIndex:U}of l){const X=this.layers[0]._featureFilter.needGeometry,J=Wc(O,X);if(!this.layers[0]._featureFilter.filter(new cn(this.zoom),J,g))continue;const re=D?A.evaluate(J,{},g):void 0,se={id:F,properties:O.properties,type:O.type,sourceLayerIndex:U,index:V,geometry:X?J.geometry:Gc(O),patterns:{},sortKey:re};T.push(se)}D&&T.sort((O,F)=>O.sortKey-F.sortKey);for(const O of T){const{geometry:F,index:V,sourceLayerIndex:U}=O,X=l[V].feature;this.addFeature(O,F,V,g),f.featureIndex.insert(X,F,V,U,this.index)}}update(l,f,g){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(l,f,this.stateDependentLayers,g)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(l){this.uploaded||(this.layoutVertexBuffer=l.createVertexBuffer(this.layoutVertexArray,Jm),this.indexBuffer=l.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(l),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}addFeature(l,f,g,x){for(const T of f)for(const A of T){const D=A.x,O=A.y;if(D<0||D>=Gn||O<0||O>=Gn)continue;const F=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,l.sortKey),V=F.vertexLength;$_(this.layoutVertexArray,D,O,-1,-1),$_(this.layoutVertexArray,D,O,1,-1),$_(this.layoutVertexArray,D,O,1,1),$_(this.layoutVertexArray,D,O,-1,1),this.indexArray.emplaceBack(V,V+1,V+2),this.indexArray.emplaceBack(V,V+3,V+2),F.vertexLength+=4,F.primitiveLength+=2}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,l,g,{},x)}}function lD(h,l){for(let f=0;f1){if(oS(h,l))return!0;for(let g=0;g1?f:f.sub(l)._mult(x)._add(l))}function hD(h,l){let f,g,x,T=!1;for(let A=0;Al.y!=x.y>l.y&&l.x<(x.x-g.x)*(l.y-g.y)/(x.y-g.y)+g.x&&(T=!T)}return T}function ed(h,l){let f=!1;for(let g=0,x=h.length-1;gl.y!=A.y>l.y&&l.x<(A.x-T.x)*(l.y-T.y)/(A.y-T.y)+T.x&&(f=!f)}return f}function BU(h,l,f){const g=f[0],x=f[2];if(h.xx.x&&l.x>x.x||h.yx.y&&l.y>x.y)return!1;const T=Ae(h,l,f[0]);return T!==Ae(h,l,f[1])||T!==Ae(h,l,f[2])||T!==Ae(h,l,f[3])}function nv(h,l,f){const g=l.paint.get(h).value;return g.kind==="constant"?g.value:f.programConfigurations.get(l.id).getMaxValue(h)}function N_(h){return Math.sqrt(h[0]*h[0]+h[1]*h[1])}function V_(h,l,f,g,x){if(!l[0]&&!l[1])return h;const T=v.convert(l)._mult(x);f==="viewport"&&T._rotate(-g);const A=[];for(let D=0;DmD(de,se))}(F,O),J=U?V*D:V;for(const re of x)for(const se of re){const de=U?se:mD(se,O);let we=J;const Re=j_([],[se.x,se.y,0,1],O);if(this.paint.get("circle-pitch-scale")==="viewport"&&this.paint.get("circle-pitch-alignment")==="map"?we*=Re[3]/A.cameraToCenterDistance:this.paint.get("circle-pitch-scale")==="map"&&this.paint.get("circle-pitch-alignment")==="viewport"&&(we*=A.cameraToCenterDistance/Re[3]),RU(X,de,we))return!0}return!1}}function mD(h,l){const f=j_([],[h.x,h.y,0,1],l);return new v(f[0]/f[3],f[1]/f[3])}class vD extends aS{}let gD;Lt("HeatmapBucket",vD,{omit:["layers"]});var VU={get paint(){return gD=gD||new b({"heatmap-radius":new Xt(ye.paint_heatmap["heatmap-radius"]),"heatmap-weight":new Xt(ye.paint_heatmap["heatmap-weight"]),"heatmap-intensity":new $t(ye.paint_heatmap["heatmap-intensity"]),"heatmap-color":new p(ye.paint_heatmap["heatmap-color"]),"heatmap-opacity":new $t(ye.paint_heatmap["heatmap-opacity"])})}};function uS(h,{width:l,height:f},g,x){if(x){if(x instanceof Uint8ClampedArray)x=new Uint8Array(x.buffer);else if(x.length!==l*f*g)throw new RangeError(`mismatched image size. expected: ${x.length} but got: ${l*f*g}`)}else x=new Uint8Array(l*f*g);return h.width=l,h.height=f,h.data=x,h}function yD(h,{width:l,height:f},g){if(l===h.width&&f===h.height)return;const x=uS({},{width:l,height:f},g);cS(h,x,{x:0,y:0},{x:0,y:0},{width:Math.min(h.width,l),height:Math.min(h.height,f)},g),h.width=l,h.height=f,h.data=x.data}function cS(h,l,f,g,x,T){if(x.width===0||x.height===0)return l;if(x.width>h.width||x.height>h.height||f.x>h.width-x.width||f.y>h.height-x.height)throw new RangeError("out of range source coordinates for image copy");if(x.width>l.width||x.height>l.height||g.x>l.width-x.width||g.y>l.height-x.height)throw new RangeError("out of range destination coordinates for image copy");const A=h.data,D=l.data;if(A===D)throw new Error("srcData equals dstData, so image is already copied");for(let O=0;O{l[h.evaluationKey]=O;const F=h.expression.evaluate(l);x.data[A+D+0]=Math.floor(255*F.r/F.a),x.data[A+D+1]=Math.floor(255*F.g/F.a),x.data[A+D+2]=Math.floor(255*F.b/F.a),x.data[A+D+3]=Math.floor(255*F.a)};if(h.clips)for(let A=0,D=0;A80*f){g=T=h[0],x=A=h[1];for(var re=f;reT&&(T=D),O>A&&(A=O);F=(F=Math.max(T-g,A-x))!==0?32767/F:0}return ov(X,J,f,g,x,F,0),J}function xD(h,l,f,g,x){var T,A;if(x===pS(h,l,f,g)>0)for(T=l;T=l;T-=g)A=TD(T,h[T],h[T+1],A);return A&&U_(A,A.next)&&(lv(A),A=A.next),A}function qc(h,l){if(!h)return h;l||(l=h);var f,g=h;do if(f=!1,g.steiner||!U_(g,g.next)&&Vn(g.prev,g,g.next)!==0)g=g.next;else{if(lv(g),(g=l=g.prev)===g.next)break;f=!0}while(f||g!==l);return l}function ov(h,l,f,g,x,T,A){if(h){!A&&T&&function(V,U,X,J){var re=V;do re.z===0&&(re.z=fS(re.x,re.y,U,X,J)),re.prevZ=re.prev,re.nextZ=re.next,re=re.next;while(re!==V);re.prevZ.nextZ=null,re.prevZ=null,function(se){var de,we,Re,Ce,De,je,Je,yt,Ht=1;do{for(we=se,se=null,De=null,je=0;we;){for(je++,Re=we,Je=0,de=0;de0||yt>0&ℜ)Je!==0&&(yt===0||!Re||we.z<=Re.z)?(Ce=we,we=we.nextZ,Je--):(Ce=Re,Re=Re.nextZ,yt--),De?De.nextZ=Ce:se=Ce,Ce.prevZ=De,De=Ce;we=Re}De.nextZ=null,Ht*=2}while(je>1)}(re)}(h,g,x,T);for(var D,O,F=h;h.prev!==h.next;)if(D=h.prev,O=h.next,T?ZU(h,g,x,T):qU(h))l.push(D.i/f|0),l.push(h.i/f|0),l.push(O.i/f|0),lv(h),h=O.next,F=O.next;else if((h=O)===F){A?A===1?ov(h=XU(qc(h),l,f),l,f,g,x,T,2):A===2&&KU(h,l,f,g,x,T):ov(qc(h),l,f,g,x,T,1);break}}}function qU(h){var l=h.prev,f=h,g=h.next;if(Vn(l,f,g)>=0)return!1;for(var x=l.x,T=f.x,A=g.x,D=l.y,O=f.y,F=g.y,V=xT?x>A?x:A:T>A?T:A,J=D>O?D>F?D:F:O>F?O:F,re=g.next;re!==l;){if(re.x>=V&&re.x<=X&&re.y>=U&&re.y<=J&&rd(x,D,T,O,A,F,re.x,re.y)&&Vn(re.prev,re,re.next)>=0)return!1;re=re.next}return!0}function ZU(h,l,f,g){var x=h.prev,T=h,A=h.next;if(Vn(x,T,A)>=0)return!1;for(var D=x.x,O=T.x,F=A.x,V=x.y,U=T.y,X=A.y,J=DO?D>F?D:F:O>F?O:F,de=V>U?V>X?V:X:U>X?U:X,we=fS(J,re,l,f,g),Re=fS(se,de,l,f,g),Ce=h.prevZ,De=h.nextZ;Ce&&Ce.z>=we&&De&&De.z<=Re;){if(Ce.x>=J&&Ce.x<=se&&Ce.y>=re&&Ce.y<=de&&Ce!==x&&Ce!==A&&rd(D,V,O,U,F,X,Ce.x,Ce.y)&&Vn(Ce.prev,Ce,Ce.next)>=0||(Ce=Ce.prevZ,De.x>=J&&De.x<=se&&De.y>=re&&De.y<=de&&De!==x&&De!==A&&rd(D,V,O,U,F,X,De.x,De.y)&&Vn(De.prev,De,De.next)>=0))return!1;De=De.nextZ}for(;Ce&&Ce.z>=we;){if(Ce.x>=J&&Ce.x<=se&&Ce.y>=re&&Ce.y<=de&&Ce!==x&&Ce!==A&&rd(D,V,O,U,F,X,Ce.x,Ce.y)&&Vn(Ce.prev,Ce,Ce.next)>=0)return!1;Ce=Ce.prevZ}for(;De&&De.z<=Re;){if(De.x>=J&&De.x<=se&&De.y>=re&&De.y<=de&&De!==x&&De!==A&&rd(D,V,O,U,F,X,De.x,De.y)&&Vn(De.prev,De,De.next)>=0)return!1;De=De.nextZ}return!0}function XU(h,l,f){var g=h;do{var x=g.prev,T=g.next.next;!U_(x,T)&&wD(x,g,g.next,T)&&sv(x,T)&&sv(T,x)&&(l.push(x.i/f|0),l.push(g.i/f|0),l.push(T.i/f|0),lv(g),lv(g.next),g=h=T),g=g.next}while(g!==h);return qc(g)}function KU(h,l,f,g,x,T){var A=h;do{for(var D=A.next.next;D!==A.prev;){if(A.i!==D.i&&tG(A,D)){var O=SD(A,D);return A=qc(A,A.next),O=qc(O,O.next),ov(A,l,f,g,x,T,0),void ov(O,l,f,g,x,T,0)}D=D.next}A=A.next}while(A!==h)}function YU(h,l){return h.x-l.x}function JU(h,l){var f=function(x,T){var A,D=T,O=x.x,F=x.y,V=-1/0;do{if(F<=D.y&&F>=D.next.y&&D.next.y!==D.y){var U=D.x+(F-D.y)*(D.next.x-D.x)/(D.next.y-D.y);if(U<=O&&U>V&&(V=U,A=D.x=D.x&&D.x>=re&&O!==D.x&&rd(FA.x||D.x===A.x&&QU(A,D)))&&(A=D,de=X)),D=D.next;while(D!==J);return A}(h,l);if(!f)return l;var g=SD(f,h);return qc(g,g.next),qc(f,f.next)}function QU(h,l){return Vn(h.prev,h,l.prev)<0&&Vn(l.next,h,h.next)<0}function fS(h,l,f,g,x){return(h=1431655765&((h=858993459&((h=252645135&((h=16711935&((h=(h-f)*x|0)|h<<8))|h<<4))|h<<2))|h<<1))|(l=1431655765&((l=858993459&((l=252645135&((l=16711935&((l=(l-g)*x|0)|l<<8))|l<<4))|l<<2))|l<<1))<<1}function eG(h){var l=h,f=h;do(l.x=(h-A)*(T-D)&&(h-A)*(g-D)>=(f-A)*(l-D)&&(f-A)*(T-D)>=(x-A)*(g-D)}function tG(h,l){return h.next.i!==l.i&&h.prev.i!==l.i&&!function(f,g){var x=f;do{if(x.i!==f.i&&x.next.i!==f.i&&x.i!==g.i&&x.next.i!==g.i&&wD(x,x.next,f,g))return!0;x=x.next}while(x!==f);return!1}(h,l)&&(sv(h,l)&&sv(l,h)&&function(f,g){var x=f,T=!1,A=(f.x+g.x)/2,D=(f.y+g.y)/2;do x.y>D!=x.next.y>D&&x.next.y!==x.y&&A<(x.next.x-x.x)*(D-x.y)/(x.next.y-x.y)+x.x&&(T=!T),x=x.next;while(x!==f);return T}(h,l)&&(Vn(h.prev,h,l.prev)||Vn(h,l.prev,l))||U_(h,l)&&Vn(h.prev,h,h.next)>0&&Vn(l.prev,l,l.next)>0)}function Vn(h,l,f){return(l.y-h.y)*(f.x-l.x)-(l.x-h.x)*(f.y-l.y)}function U_(h,l){return h.x===l.x&&h.y===l.y}function wD(h,l,f,g){var x=W_(Vn(h,l,f)),T=W_(Vn(h,l,g)),A=W_(Vn(f,g,h)),D=W_(Vn(f,g,l));return x!==T&&A!==D||!(x!==0||!G_(h,f,l))||!(T!==0||!G_(h,g,l))||!(A!==0||!G_(f,h,g))||!(D!==0||!G_(f,l,g))}function G_(h,l,f){return l.x<=Math.max(h.x,f.x)&&l.x>=Math.min(h.x,f.x)&&l.y<=Math.max(h.y,f.y)&&l.y>=Math.min(h.y,f.y)}function W_(h){return h>0?1:h<0?-1:0}function sv(h,l){return Vn(h.prev,h,h.next)<0?Vn(h,l,h.next)>=0&&Vn(h,h.prev,l)>=0:Vn(h,l,h.prev)<0||Vn(h,h.next,l)<0}function SD(h,l){var f=new dS(h.i,h.x,h.y),g=new dS(l.i,l.x,l.y),x=h.next,T=l.prev;return h.next=l,l.prev=h,f.next=x,x.prev=f,g.next=f,f.prev=g,T.next=g,g.prev=T,g}function TD(h,l,f,g){var x=new dS(h,l,f);return g?(x.next=g.next,x.prev=g,g.next.prev=x,g.next=x):(x.prev=x,x.next=x),x}function lv(h){h.next.prev=h.prev,h.prev.next=h.next,h.prevZ&&(h.prevZ.nextZ=h.nextZ),h.nextZ&&(h.nextZ.prevZ=h.prevZ)}function dS(h,l,f){this.i=h,this.x=l,this.y=f,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}function pS(h,l,f,g){for(var x=0,T=l,A=f-g;T0&&f.holes.push(g+=h[x-1].length)}return f};var CD=c(hS.exports);function mS(h,l,f){const g=f.patternDependencies;let x=!1;for(const T of l){const A=T.paint.get(`${h}-pattern`);A.isConstant()||(x=!0);const D=A.constantOr(null);D&&(x=!0,g[D.to]=!0,g[D.from]=!0)}return x}function vS(h,l,f,g,x){const T=x.patternDependencies;for(const A of l){const D=A.paint.get(`${h}-pattern`).value;if(D.kind!=="constant"){let O=D.evaluate({zoom:g-1},f,{},x.availableImages),F=D.evaluate({zoom:g},f,{},x.availableImages),V=D.evaluate({zoom:g+1},f,{},x.availableImages);O=O&&O.name?O.name:O,F=F&&F.name?F.name:F,V=V&&V.name?V.name:V,T[O]=!0,T[F]=!0,T[V]=!0,f.patterns[A.id]={min:O,mid:F,max:V}}}return f}class gS{constructor(l){this.zoom=l.zoom,this.overscaling=l.overscaling,this.layers=l.layers,this.layerIds=this.layers.map(f=>f.id),this.index=l.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new cu,this.indexArray=new ri,this.indexArray2=new Cn,this.programConfigurations=new Uc(l.layers,l.zoom),this.segments=new Jn,this.segments2=new Jn,this.stateDependentLayerIds=this.layers.filter(f=>f.isStateDependent()).map(f=>f.id)}populate(l,f,g){this.hasPattern=mS("fill",this.layers,f);const x=this.layers[0].layout.get("fill-sort-key"),T=!x.isConstant(),A=[];for(const{feature:D,id:O,index:F,sourceLayerIndex:V}of l){const U=this.layers[0]._featureFilter.needGeometry,X=Wc(D,U);if(!this.layers[0]._featureFilter.filter(new cn(this.zoom),X,g))continue;const J=T?x.evaluate(X,{},g,f.availableImages):void 0,re={id:O,properties:D.properties,type:D.type,sourceLayerIndex:V,index:F,geometry:U?X.geometry:Gc(D),patterns:{},sortKey:J};A.push(re)}T&&A.sort((D,O)=>D.sortKey-O.sortKey);for(const D of A){const{geometry:O,index:F,sourceLayerIndex:V}=D;if(this.hasPattern){const U=vS("fill",this.layers,D,this.zoom,f);this.patternFeatures.push(U)}else this.addFeature(D,O,F,g,{});f.featureIndex.insert(l[F].feature,O,F,V,this.index)}}update(l,f,g){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(l,f,this.stateDependentLayers,g)}addFeatures(l,f,g){for(const x of this.patternFeatures)this.addFeature(x,x.geometry,x.index,f,g)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(l){this.uploaded||(this.layoutVertexBuffer=l.createVertexBuffer(this.layoutVertexArray,WU),this.indexBuffer=l.createIndexBuffer(this.indexArray),this.indexBuffer2=l.createIndexBuffer(this.indexArray2)),this.programConfigurations.upload(l),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(l,f,g,x,T){for(const A of Ef(f,500)){let D=0;for(const J of A)D+=J.length;const O=this.segments.prepareSegment(D,this.layoutVertexArray,this.indexArray),F=O.vertexLength,V=[],U=[];for(const J of A){if(J.length===0)continue;J!==A[0]&&U.push(V.length/2);const re=this.segments2.prepareSegment(J.length,this.layoutVertexArray,this.indexArray2),se=re.vertexLength;this.layoutVertexArray.emplaceBack(J[0].x,J[0].y),this.indexArray2.emplaceBack(se+J.length-1,se),V.push(J[0].x),V.push(J[0].y);for(let de=1;de>3}if(x--,g===1||g===2)T+=h.readSVarint(),A+=h.readSVarint(),g===1&&(l&&D.push(l),l=[]),l.push(new sG(T,A));else{if(g!==7)throw new Error("unknown command "+g);l&&l.push(l[0].clone())}}return l&&D.push(l),D},nd.prototype.bbox=function(){var h=this._pbf;h.pos=this._geometry;for(var l=h.readVarint()+h.pos,f=1,g=0,x=0,T=0,A=1/0,D=-1/0,O=1/0,F=-1/0;h.pos>3}if(g--,f===1||f===2)(x+=h.readSVarint())D&&(D=x),(T+=h.readSVarint())F&&(F=T);else if(f!==7)throw new Error("unknown command "+f)}return[A,O,D,F]},nd.prototype.toGeoJSON=function(h,l,f){var g,x,T=this.extent*Math.pow(2,f),A=this.extent*h,D=this.extent*l,O=this.loadGeometry(),F=nd.types[this.type];function V(J){for(var re=0;re>3;x=A===1?g.readString():A===2?g.readFloat():A===3?g.readDouble():A===4?g.readVarint64():A===5?g.readVarint():A===6?g.readSVarint():A===7?g.readBoolean():null}return x}(f))}MD.prototype.feature=function(h){if(h<0||h>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[h];var l=this._pbf.readVarint()+this._pbf.pos;return new cG(this._pbf,l,this.extent,this._keys,this._values)};var fG=ED;function dG(h,l,f){if(h===3){var g=new fG(f,f.readVarint()+f.pos);g.length&&(l[g.name]=g)}}mu.VectorTile=function(h,l){this.layers=h.readFields(dG,{},l)},mu.VectorTileFeature=ID,mu.VectorTileLayer=ED;const pG=mu.VectorTileFeature.types,yS=Math.pow(2,13);function uv(h,l,f,g,x,T,A,D){h.emplaceBack(l,f,2*Math.floor(g*yS)+A,x*yS*2,T*yS*2,Math.round(D))}class _S{constructor(l){this.zoom=l.zoom,this.overscaling=l.overscaling,this.layers=l.layers,this.layerIds=this.layers.map(f=>f.id),this.index=l.index,this.hasPattern=!1,this.layoutVertexArray=new xl,this.centroidVertexArray=new bl,this.indexArray=new ri,this.programConfigurations=new Uc(l.layers,l.zoom),this.segments=new Jn,this.stateDependentLayerIds=this.layers.filter(f=>f.isStateDependent()).map(f=>f.id)}populate(l,f,g){this.features=[],this.hasPattern=mS("fill-extrusion",this.layers,f);for(const{feature:x,id:T,index:A,sourceLayerIndex:D}of l){const O=this.layers[0]._featureFilter.needGeometry,F=Wc(x,O);if(!this.layers[0]._featureFilter.filter(new cn(this.zoom),F,g))continue;const V={id:T,sourceLayerIndex:D,index:A,geometry:O?F.geometry:Gc(x),properties:x.properties,type:x.type,patterns:{}};this.hasPattern?this.features.push(vS("fill-extrusion",this.layers,V,this.zoom,f)):this.addFeature(V,V.geometry,A,g,{}),f.featureIndex.insert(x,V.geometry,A,D,this.index,!0)}}addFeatures(l,f,g){for(const x of this.features){const{geometry:T}=x;this.addFeature(x,T,x.index,f,g)}}update(l,f,g){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(l,f,this.stateDependentLayers,g)}isEmpty(){return this.layoutVertexArray.length===0&&this.centroidVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(l){this.uploaded||(this.layoutVertexBuffer=l.createVertexBuffer(this.layoutVertexArray,oG),this.centroidVertexBuffer=l.createVertexBuffer(this.centroidVertexArray,aG.members,!0),this.indexBuffer=l.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(l),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.centroidVertexBuffer.destroy())}addFeature(l,f,g,x,T){for(const A of Ef(f,500)){const D={x:0,y:0,vertexCount:0};let O=0;for(const re of A)O+=re.length;let F=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray);for(const re of A){if(re.length===0||vG(re))continue;let se=0;for(let de=0;de=1){const Re=re[de-1];if(!mG(we,Re)){F.vertexLength+4>Jn.MAX_VERTEX_ARRAY_LENGTH&&(F=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));const Ce=we.sub(Re)._perp()._unit(),De=Re.dist(we);se+De>32768&&(se=0),uv(this.layoutVertexArray,we.x,we.y,Ce.x,Ce.y,0,0,se),uv(this.layoutVertexArray,we.x,we.y,Ce.x,Ce.y,0,1,se),D.x+=2*we.x,D.y+=2*we.y,D.vertexCount+=2,se+=De,uv(this.layoutVertexArray,Re.x,Re.y,Ce.x,Ce.y,0,0,se),uv(this.layoutVertexArray,Re.x,Re.y,Ce.x,Ce.y,0,1,se),D.x+=2*Re.x,D.y+=2*Re.y,D.vertexCount+=2;const je=F.vertexLength;this.indexArray.emplaceBack(je,je+2,je+1),this.indexArray.emplaceBack(je+1,je+2,je+3),F.vertexLength+=4,F.primitiveLength+=2}}}}if(F.vertexLength+O>Jn.MAX_VERTEX_ARRAY_LENGTH&&(F=this.segments.prepareSegment(O,this.layoutVertexArray,this.indexArray)),pG[l.type]!=="Polygon")continue;const V=[],U=[],X=F.vertexLength;for(const re of A)if(re.length!==0){re!==A[0]&&U.push(V.length/2);for(let se=0;seGn)||h.y===l.y&&(h.y<0||h.y>Gn)}function vG(h){return h.every(l=>l.x<0)||h.every(l=>l.x>Gn)||h.every(l=>l.y<0)||h.every(l=>l.y>Gn)}let DD;Lt("FillExtrusionBucket",_S,{omit:["layers","features"]});var gG={get paint(){return DD=DD||new b({"fill-extrusion-opacity":new $t(ye["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new Xt(ye["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new $t(ye["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new $t(ye["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new C(ye["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new Xt(ye["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new Xt(ye["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new $t(ye["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])})}};class yG extends P{constructor(l){super(l,gG)}createBucket(l){return new _S(l)}queryRadius(){return N_(this.paint.get("fill-extrusion-translate"))}is3D(){return!0}queryIntersectsFeature(l,f,g,x,T,A,D,O){const F=V_(l,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),A.angle,D),V=this.paint.get("fill-extrusion-height").evaluate(f,g),U=this.paint.get("fill-extrusion-base").evaluate(f,g),X=function(re,se,de,we){const Re=[];for(const Ce of re){const De=[Ce.x,Ce.y,0,1];j_(De,De,se),Re.push(new v(De[0]/De[3],De[1]/De[3]))}return Re}(F,O),J=function(re,se,de,we){const Re=[],Ce=[],De=we[8]*se,je=we[9]*se,Je=we[10]*se,yt=we[11]*se,Ht=we[8]*de,bt=we[9]*de,gt=we[10]*de,Bt=we[11]*de;for(const kt of re){const Mt=[],Ze=[];for(const Nt of kt){const zt=Nt.x,er=Nt.y,nn=we[0]*zt+we[4]*er+we[12],Jr=we[1]*zt+we[5]*er+we[13],ni=we[2]*zt+we[6]*er+we[14],vo=we[3]*zt+we[7]*er+we[15],wi=ni+Je,On=vo+yt,Wi=nn+Ht,qi=Jr+bt,Zi=ni+gt,zn=vo+Bt,ii=new v((nn+De)/On,(Jr+je)/On);ii.z=wi/On,Mt.push(ii);const Li=new v(Wi/zn,qi/zn);Li.z=Zi/zn,Ze.push(Li)}Re.push(Mt),Ce.push(Ze)}return[Re,Ce]}(x,U,V,O);return function(re,se,de){let we=1/0;uD(de,se)&&(we=LD(de,se[0]));for(let Re=0;Ref.id),this.index=l.index,this.hasPattern=!1,this.patternFeatures=[],this.lineClipsArray=[],this.gradients={},this.layers.forEach(f=>{this.gradients[f.id]={}}),this.layoutVertexArray=new Xf,this.layoutVertexArray2=new Ym,this.indexArray=new ri,this.programConfigurations=new Uc(l.layers,l.zoom),this.segments=new Jn,this.maxLineLength=0,this.stateDependentLayerIds=this.layers.filter(f=>f.isStateDependent()).map(f=>f.id)}populate(l,f,g){this.hasPattern=mS("line",this.layers,f);const x=this.layers[0].layout.get("line-sort-key"),T=!x.isConstant(),A=[];for(const{feature:D,id:O,index:F,sourceLayerIndex:V}of l){const U=this.layers[0]._featureFilter.needGeometry,X=Wc(D,U);if(!this.layers[0]._featureFilter.filter(new cn(this.zoom),X,g))continue;const J=T?x.evaluate(X,{},g):void 0,re={id:O,properties:D.properties,type:D.type,sourceLayerIndex:V,index:F,geometry:U?X.geometry:Gc(D),patterns:{},sortKey:J};A.push(re)}T&&A.sort((D,O)=>D.sortKey-O.sortKey);for(const D of A){const{geometry:O,index:F,sourceLayerIndex:V}=D;if(this.hasPattern){const U=vS("line",this.layers,D,this.zoom,f);this.patternFeatures.push(U)}else this.addFeature(D,O,F,g,{});f.featureIndex.insert(l[F].feature,O,F,V,this.index)}}update(l,f,g){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(l,f,this.stateDependentLayers,g)}addFeatures(l,f,g){for(const x of this.patternFeatures)this.addFeature(x,x.geometry,x.index,f,g)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(l){this.uploaded||(this.layoutVertexArray2.length!==0&&(this.layoutVertexBuffer2=l.createVertexBuffer(this.layoutVertexArray2,wG)),this.layoutVertexBuffer=l.createVertexBuffer(this.layoutVertexArray,bG),this.indexBuffer=l.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(l),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}lineFeatureClips(l){if(l.properties&&Object.prototype.hasOwnProperty.call(l.properties,"mapbox_clip_start")&&Object.prototype.hasOwnProperty.call(l.properties,"mapbox_clip_end"))return{start:+l.properties.mapbox_clip_start,end:+l.properties.mapbox_clip_end}}addFeature(l,f,g,x,T){const A=this.layers[0].layout,D=A.get("line-join").evaluate(l,{}),O=A.get("line-cap"),F=A.get("line-miter-limit"),V=A.get("line-round-limit");this.lineClips=this.lineFeatureClips(l);for(const U of f)this.addLine(U,l,D,O,F,V);this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,l,g,T,x)}addLine(l,f,g,x,T,A){if(this.distance=0,this.scaledDistance=0,this.totalDistance=0,this.lineClips){this.lineClipsArray.push(this.lineClips);for(let we=0;we=2&&l[O-1].equals(l[O-2]);)O--;let F=0;for(;F0;if(yt&&we>F){const Bt=X.dist(J);if(Bt>2*V){const kt=X.sub(X.sub(J)._mult(V/Bt)._round());this.updateDistance(J,kt),this.addCurrentVertex(kt,se,0,0,U),J=kt}}const bt=J&&re;let gt=bt?g:D?"butt":x;if(bt&>==="round"&&(jeT&&(gt="bevel"),gt==="bevel"&&(je>2&&(gt="flipbevel"),je100)Re=de.mult(-1);else{const Bt=je*se.add(de).mag()/se.sub(de).mag();Re._perp()._mult(Bt*(Ht?-1:1))}this.addCurrentVertex(X,Re,0,0,U),this.addCurrentVertex(X,Re.mult(-1),0,0,U)}else if(gt==="bevel"||gt==="fakeround"){const Bt=-Math.sqrt(je*je-1),kt=Ht?Bt:0,Mt=Ht?0:Bt;if(J&&this.addCurrentVertex(X,se,kt,Mt,U),gt==="fakeround"){const Ze=Math.round(180*Je/Math.PI/20);for(let Nt=1;Nt2*V){const kt=X.add(re.sub(X)._mult(V/Bt)._round());this.updateDistance(X,kt),this.addCurrentVertex(kt,de,0,0,U),X=kt}}}}addCurrentVertex(l,f,g,x,T,A=!1){const D=f.y*x-f.x,O=-f.y-f.x*x;this.addHalfVertex(l,f.x+f.y*g,f.y-f.x*g,A,!1,g,T),this.addHalfVertex(l,D,O,A,!0,-x,T),this.distance>kD/2&&this.totalDistance===0&&(this.distance=0,this.updateScaledDistance(),this.addCurrentVertex(l,f,g,x,T,A))}addHalfVertex({x:l,y:f},g,x,T,A,D,O){const F=.5*(this.lineClips?this.scaledDistance*(kD-1):this.scaledDistance);this.layoutVertexArray.emplaceBack((l<<1)+(T?1:0),(f<<1)+(A?1:0),Math.round(63*g)+128,Math.round(63*x)+128,1+(D===0?0:D<0?-1:1)|(63&F)<<2,F>>6),this.lineClips&&this.layoutVertexArray2.emplaceBack((this.scaledDistance-this.lineClips.start)/(this.lineClips.end-this.lineClips.start),this.lineClipsArray.length);const V=O.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,V),O.primitiveLength++),A?this.e2=V:this.e1=V}updateScaledDistance(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance}updateDistance(l,f){this.distance+=l.dist(f),this.updateScaledDistance()}}let RD,OD;Lt("LineBucket",bS,{omit:["layers","patternFeatures"]});var zD={get paint(){return OD=OD||new b({"line-opacity":new Xt(ye.paint_line["line-opacity"]),"line-color":new Xt(ye.paint_line["line-color"]),"line-translate":new $t(ye.paint_line["line-translate"]),"line-translate-anchor":new $t(ye.paint_line["line-translate-anchor"]),"line-width":new Xt(ye.paint_line["line-width"]),"line-gap-width":new Xt(ye.paint_line["line-gap-width"]),"line-offset":new Xt(ye.paint_line["line-offset"]),"line-blur":new Xt(ye.paint_line["line-blur"]),"line-dasharray":new u(ye.paint_line["line-dasharray"]),"line-pattern":new C(ye.paint_line["line-pattern"]),"line-gradient":new p(ye.paint_line["line-gradient"])})},get layout(){return RD=RD||new b({"line-cap":new $t(ye.layout_line["line-cap"]),"line-join":new Xt(ye.layout_line["line-join"]),"line-miter-limit":new $t(ye.layout_line["line-miter-limit"]),"line-round-limit":new $t(ye.layout_line["line-round-limit"]),"line-sort-key":new Xt(ye.layout_line["line-sort-key"])})}};class CG extends Xt{possiblyEvaluate(l,f){return f=new cn(Math.floor(f.zoom),{now:f.now,fadeDuration:f.fadeDuration,zoomHistory:f.zoomHistory,transition:f.transition}),super.possiblyEvaluate(l,f)}evaluate(l,f,g,x){return f=H({},f,{zoom:Math.floor(f.zoom)}),super.evaluate(l,f,g,x)}}let q_;class PG extends P{constructor(l){super(l,zD),this.gradientVersion=0,q_||(q_=new CG(zD.paint.properties["line-width"].specification),q_.useIntegerZoom=!0)}_handleSpecialPaintPropertyUpdate(l){if(l==="line-gradient"){const f=this.gradientExpression();this.stepInterpolant=!!function(g){return g._styleExpression!==void 0}(f)&&f._styleExpression.expression instanceof Ql,this.gradientVersion=(this.gradientVersion+1)%Number.MAX_SAFE_INTEGER}}gradientExpression(){return this._transitionablePaint._values["line-gradient"].value.expression}recalculate(l,f){super.recalculate(l,f),this.paint._values["line-floorwidth"]=q_.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,l)}createBucket(l){return new bS(l)}queryRadius(l){const f=l,g=BD(nv("line-width",this,f),nv("line-gap-width",this,f)),x=nv("line-offset",this,f);return g/2+Math.abs(x)+N_(this.paint.get("line-translate"))}queryIntersectsFeature(l,f,g,x,T,A,D){const O=V_(l,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),A.angle,D),F=D/2*BD(this.paint.get("line-width").evaluate(f,g),this.paint.get("line-gap-width").evaluate(f,g)),V=this.paint.get("line-offset").evaluate(f,g);return V&&(x=function(U,X){const J=[];for(let re=0;re=3){for(let de=0;de0?l+2*h:h}const AG=N([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),IG=N([{name:"a_projected_pos",components:3,type:"Float32"}],4);N([{name:"a_fade_opacity",components:1,type:"Uint32"}],4);const EG=N([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"},{name:"a_box_real",components:2,type:"Int16"}]);N([{type:"Int16",name:"anchorPointX"},{type:"Int16",name:"anchorPointY"},{type:"Int16",name:"x1"},{type:"Int16",name:"y1"},{type:"Int16",name:"x2"},{type:"Int16",name:"y2"},{type:"Uint32",name:"featureIndex"},{type:"Uint16",name:"sourceLayerIndex"},{type:"Uint16",name:"bucketIndex"}]);const FD=N([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4),MG=N([{name:"a_pos",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4);function DG(h,l,f){return h.sections.forEach(g=>{g.text=function(x,T,A){const D=T.layout.get("text-transform").evaluate(A,{});return D==="uppercase"?x=x.toLocaleUpperCase():D==="lowercase"&&(x=x.toLocaleLowerCase()),Ps.applyArabicShaping&&(x=Ps.applyArabicShaping(x)),x}(g.text,l,f)}),h}N([{name:"triangle",components:3,type:"Uint16"}]),N([{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"}]),N([{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"}]),N([{type:"Float32",name:"offsetX"}]),N([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]),N([{type:"Uint16",name:"textAnchor"},{type:"Float32",components:2,name:"textOffset"}]);const hv={"!":"︕","#":"#",$:"$","%":"%","&":"&","(":"︵",")":"︶","*":"*","+":"+",",":"︐","-":"︲",".":"・","/":"/",":":"︓",";":"︔","<":"︿","=":"=",">":"﹀","?":"︖","@":"@","[":"﹇","\\":"\","]":"﹈","^":"^",_:"︳","`":"`","{":"︷","|":"―","}":"︸","~":"~","¢":"¢","£":"£","¥":"¥","¦":"¦","¬":"¬","¯":" ̄","–":"︲","—":"︱","‘":"﹃","’":"﹄","“":"﹁","”":"﹂","…":"︙","‧":"・","₩":"₩","、":"︑","。":"︒","〈":"︿","〉":"﹀","《":"︽","》":"︾","「":"﹁","」":"﹂","『":"﹃","』":"﹄","【":"︻","】":"︼","〔":"︹","〕":"︺","〖":"︗","〗":"︘","!":"︕","(":"︵",")":"︶",",":"︐","-":"︲",".":"・",":":"︓",";":"︔","<":"︿",">":"﹀","?":"︖","[":"﹇","]":"﹈","_":"︳","{":"︷","|":"―","}":"︸","⦅":"︵","⦆":"︶","。":"︒","「":"﹁","」":"﹂"};var Qn=24,$D=Yr,ND=function(h,l,f,g,x){var T,A,D=8*x-g-1,O=(1<>1,V=-7,U=x-1,X=-1,J=h[l+U];for(U+=X,T=J&(1<<-V)-1,J>>=-V,V+=D;V>0;T=256*T+h[l+U],U+=X,V-=8);for(A=T&(1<<-V)-1,T>>=-V,V+=g;V>0;A=256*A+h[l+U],U+=X,V-=8);if(T===0)T=1-F;else{if(T===O)return A?NaN:1/0*(J?-1:1);A+=Math.pow(2,g),T-=F}return(J?-1:1)*A*Math.pow(2,T-g)},VD=function(h,l,f,g,x,T){var A,D,O,F=8*T-x-1,V=(1<>1,X=x===23?Math.pow(2,-24)-Math.pow(2,-77):0,J=0,re=1,se=l<0||l===0&&1/l<0?1:0;for(l=Math.abs(l),isNaN(l)||l===1/0?(D=isNaN(l)?1:0,A=V):(A=Math.floor(Math.log(l)/Math.LN2),l*(O=Math.pow(2,-A))<1&&(A--,O*=2),(l+=A+U>=1?X/O:X*Math.pow(2,1-U))*O>=2&&(A++,O/=2),A+U>=V?(D=0,A=V):A+U>=1?(D=(l*O-1)*Math.pow(2,x),A+=U):(D=l*Math.pow(2,U-1)*Math.pow(2,x),A=0));x>=8;h[f+J]=255&D,J+=re,D/=256,x-=8);for(A=A<0;h[f+J]=255&A,J+=re,A/=256,F-=8);h[f+J-re]|=128*se};function Yr(h){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(h)?h:new Uint8Array(h||0),this.pos=0,this.type=0,this.length=this.buf.length}Yr.Varint=0,Yr.Fixed64=1,Yr.Bytes=2,Yr.Fixed32=5;var xS=4294967296,jD=1/xS,HD=typeof TextDecoder>"u"?null:new TextDecoder("utf8");function Sl(h){return h.type===Yr.Bytes?h.readVarint()+h.pos:h.pos+1}function id(h,l,f){return f?4294967296*l+(h>>>0):4294967296*(l>>>0)+(h>>>0)}function UD(h,l,f){var g=l<=16383?1:l<=2097151?2:l<=268435455?3:Math.floor(Math.log(l)/(7*Math.LN2));f.realloc(g);for(var x=f.pos-1;x>=h;x--)f.buf[x+g]=f.buf[x]}function LG(h,l){for(var f=0;f>>8,h[f+2]=l>>>16,h[f+3]=l>>>24}function GD(h,l){return(h[l]|h[l+1]<<8|h[l+2]<<16)+(h[l+3]<<24)}Yr.prototype={destroy:function(){this.buf=null},readFields:function(h,l,f){for(f=f||this.length;this.pos>3,T=this.pos;this.type=7&g,h(x,l,this),this.pos===T&&this.skip(g)}return l},readMessage:function(h,l){return this.readFields(h,l,this.readVarint()+this.pos)},readFixed32:function(){var h=Z_(this.buf,this.pos);return this.pos+=4,h},readSFixed32:function(){var h=GD(this.buf,this.pos);return this.pos+=4,h},readFixed64:function(){var h=Z_(this.buf,this.pos)+Z_(this.buf,this.pos+4)*xS;return this.pos+=8,h},readSFixed64:function(){var h=Z_(this.buf,this.pos)+GD(this.buf,this.pos+4)*xS;return this.pos+=8,h},readFloat:function(){var h=ND(this.buf,this.pos,!0,23,4);return this.pos+=4,h},readDouble:function(){var h=ND(this.buf,this.pos,!0,52,8);return this.pos+=8,h},readVarint:function(h){var l,f,g=this.buf;return l=127&(f=g[this.pos++]),f<128?l:(l|=(127&(f=g[this.pos++]))<<7,f<128?l:(l|=(127&(f=g[this.pos++]))<<14,f<128?l:(l|=(127&(f=g[this.pos++]))<<21,f<128?l:function(x,T,A){var D,O,F=A.buf;if(D=(112&(O=F[A.pos++]))>>4,O<128||(D|=(127&(O=F[A.pos++]))<<3,O<128)||(D|=(127&(O=F[A.pos++]))<<10,O<128)||(D|=(127&(O=F[A.pos++]))<<17,O<128)||(D|=(127&(O=F[A.pos++]))<<24,O<128)||(D|=(1&(O=F[A.pos++]))<<31,O<128))return id(x,D,T);throw new Error("Expected varint not more than 10 bytes")}(l|=(15&(f=g[this.pos]))<<28,h,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var h=this.readVarint();return h%2==1?(h+1)/-2:h/2},readBoolean:function(){return!!this.readVarint()},readString:function(){var h=this.readVarint()+this.pos,l=this.pos;return this.pos=h,h-l>=12&&HD?function(f,g,x){return HD.decode(f.subarray(g,x))}(this.buf,l,h):function(f,g,x){for(var T="",A=g;A239?4:V>223?3:V>191?2:1;if(A+X>x)break;X===1?V<128&&(U=V):X===2?(192&(D=f[A+1]))==128&&(U=(31&V)<<6|63&D)<=127&&(U=null):X===3?(O=f[A+2],(192&(D=f[A+1]))==128&&(192&O)==128&&((U=(15&V)<<12|(63&D)<<6|63&O)<=2047||U>=55296&&U<=57343)&&(U=null)):X===4&&(O=f[A+2],F=f[A+3],(192&(D=f[A+1]))==128&&(192&O)==128&&(192&F)==128&&((U=(15&V)<<18|(63&D)<<12|(63&O)<<6|63&F)<=65535||U>=1114112)&&(U=null)),U===null?(U=65533,X=1):U>65535&&(U-=65536,T+=String.fromCharCode(U>>>10&1023|55296),U=56320|1023&U),T+=String.fromCharCode(U),A+=X}return T}(this.buf,l,h)},readBytes:function(){var h=this.readVarint()+this.pos,l=this.buf.subarray(this.pos,h);return this.pos=h,l},readPackedVarint:function(h,l){if(this.type!==Yr.Bytes)return h.push(this.readVarint(l));var f=Sl(this);for(h=h||[];this.pos127;);else if(l===Yr.Bytes)this.pos=this.readVarint()+this.pos;else if(l===Yr.Fixed32)this.pos+=4;else{if(l!==Yr.Fixed64)throw new Error("Unimplemented type: "+l);this.pos+=8}},writeTag:function(h,l){this.writeVarint(h<<3|l)},realloc:function(h){for(var l=this.length||16;l268435455||h<0?function(l,f){var g,x;if(l>=0?(g=l%4294967296|0,x=l/4294967296|0):(x=~(-l/4294967296),4294967295^(g=~(-l%4294967296))?g=g+1|0:(g=0,x=x+1|0)),l>=18446744073709552e3||l<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");f.realloc(10),function(T,A,D){D.buf[D.pos++]=127&T|128,T>>>=7,D.buf[D.pos++]=127&T|128,T>>>=7,D.buf[D.pos++]=127&T|128,T>>>=7,D.buf[D.pos++]=127&T|128,D.buf[D.pos]=127&(T>>>=7)}(g,0,f),function(T,A){var D=(7&T)<<4;A.buf[A.pos++]|=D|((T>>>=3)?128:0),T&&(A.buf[A.pos++]=127&T|((T>>>=7)?128:0),T&&(A.buf[A.pos++]=127&T|((T>>>=7)?128:0),T&&(A.buf[A.pos++]=127&T|((T>>>=7)?128:0),T&&(A.buf[A.pos++]=127&T|((T>>>=7)?128:0),T&&(A.buf[A.pos++]=127&T)))))}(x,f)}(h,this):(this.realloc(4),this.buf[this.pos++]=127&h|(h>127?128:0),h<=127||(this.buf[this.pos++]=127&(h>>>=7)|(h>127?128:0),h<=127||(this.buf[this.pos++]=127&(h>>>=7)|(h>127?128:0),h<=127||(this.buf[this.pos++]=h>>>7&127))))},writeSVarint:function(h){this.writeVarint(h<0?2*-h-1:2*h)},writeBoolean:function(h){this.writeVarint(!!h)},writeString:function(h){h=String(h),this.realloc(4*h.length),this.pos++;var l=this.pos;this.pos=function(g,x,T){for(var A,D,O=0;O55295&&A<57344){if(!D){A>56319||O+1===x.length?(g[T++]=239,g[T++]=191,g[T++]=189):D=A;continue}if(A<56320){g[T++]=239,g[T++]=191,g[T++]=189,D=A;continue}A=D-55296<<10|A-56320|65536,D=null}else D&&(g[T++]=239,g[T++]=191,g[T++]=189,D=null);A<128?g[T++]=A:(A<2048?g[T++]=A>>6|192:(A<65536?g[T++]=A>>12|224:(g[T++]=A>>18|240,g[T++]=A>>12&63|128),g[T++]=A>>6&63|128),g[T++]=63&A|128)}return T}(this.buf,h,this.pos);var f=this.pos-l;f>=128&&UD(l,f,this),this.pos=l-1,this.writeVarint(f),this.pos+=f},writeFloat:function(h){this.realloc(4),VD(this.buf,h,this.pos,!0,23,4),this.pos+=4},writeDouble:function(h){this.realloc(8),VD(this.buf,h,this.pos,!0,52,8),this.pos+=8},writeBytes:function(h){var l=h.length;this.writeVarint(l),this.realloc(l);for(var f=0;f=128&&UD(f,g,this),this.pos=f-1,this.writeVarint(g),this.pos+=g},writeMessage:function(h,l,f){this.writeTag(h,Yr.Bytes),this.writeRawMessage(l,f)},writePackedVarint:function(h,l){l.length&&this.writeMessage(h,LG,l)},writePackedSVarint:function(h,l){l.length&&this.writeMessage(h,kG,l)},writePackedBoolean:function(h,l){l.length&&this.writeMessage(h,zG,l)},writePackedFloat:function(h,l){l.length&&this.writeMessage(h,RG,l)},writePackedDouble:function(h,l){l.length&&this.writeMessage(h,OG,l)},writePackedFixed32:function(h,l){l.length&&this.writeMessage(h,BG,l)},writePackedSFixed32:function(h,l){l.length&&this.writeMessage(h,FG,l)},writePackedFixed64:function(h,l){l.length&&this.writeMessage(h,$G,l)},writePackedSFixed64:function(h,l){l.length&&this.writeMessage(h,NG,l)},writeBytesField:function(h,l){this.writeTag(h,Yr.Bytes),this.writeBytes(l)},writeFixed32Field:function(h,l){this.writeTag(h,Yr.Fixed32),this.writeFixed32(l)},writeSFixed32Field:function(h,l){this.writeTag(h,Yr.Fixed32),this.writeSFixed32(l)},writeFixed64Field:function(h,l){this.writeTag(h,Yr.Fixed64),this.writeFixed64(l)},writeSFixed64Field:function(h,l){this.writeTag(h,Yr.Fixed64),this.writeSFixed64(l)},writeVarintField:function(h,l){this.writeTag(h,Yr.Varint),this.writeVarint(l)},writeSVarintField:function(h,l){this.writeTag(h,Yr.Varint),this.writeSVarint(l)},writeStringField:function(h,l){this.writeTag(h,Yr.Bytes),this.writeString(l)},writeFloatField:function(h,l){this.writeTag(h,Yr.Fixed32),this.writeFloat(l)},writeDoubleField:function(h,l){this.writeTag(h,Yr.Fixed64),this.writeDouble(l)},writeBooleanField:function(h,l){this.writeVarintField(h,!!l)}};var wS=c($D);const SS=3;function VG(h,l,f){h===1&&f.readMessage(jG,l)}function jG(h,l,f){if(h===3){const{id:g,bitmap:x,width:T,height:A,left:D,top:O,advance:F}=f.readMessage(HG,{});l.push({id:g,bitmap:new av({width:T+2*SS,height:A+2*SS},x),metrics:{width:T,height:A,left:D,top:O,advance:F}})}}function HG(h,l,f){h===1?l.id=f.readVarint():h===2?l.bitmap=f.readBytes():h===3?l.width=f.readVarint():h===4?l.height=f.readVarint():h===5?l.left=f.readSVarint():h===6?l.top=f.readSVarint():h===7&&(l.advance=f.readVarint())}const WD=SS;function qD(h){let l=0,f=0;for(const A of h)l+=A.w*A.h,f=Math.max(f,A.w);h.sort((A,D)=>D.h-A.h);const g=[{x:0,y:0,w:Math.max(Math.ceil(Math.sqrt(l/.95)),f),h:1/0}];let x=0,T=0;for(const A of h)for(let D=g.length-1;D>=0;D--){const O=g[D];if(!(A.w>O.w||A.h>O.h)){if(A.x=O.x,A.y=O.y,T=Math.max(T,A.y+A.h),x=Math.max(x,A.x+A.w),A.w===O.w&&A.h===O.h){const F=g.pop();D=0&&g>=l&&K_[this.text.charCodeAt(g)];g--)f--;this.text=this.text.substring(l,f),this.sectionIndex=this.sectionIndex.slice(l,f)}substring(l,f){const g=new od;return g.text=this.text.substring(l,f),g.sectionIndex=this.sectionIndex.slice(l,f),g.sections=this.sections,g}toString(){return this.text}getMaxScale(){return this.sectionIndex.reduce((l,f)=>Math.max(l,this.sections[f].scale),0)}addTextSection(l,f){this.text+=l.text,this.sections.push(dv.forText(l.scale,l.fontStack||f));const g=this.sections.length-1;for(let x=0;x=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)}}function X_(h,l,f,g,x,T,A,D,O,F,V,U,X,J,re){const se=od.fromFeature(h,x);let de;U===o.ai.vertical&&se.verticalizePunctuation();const{processBidirectionalText:we,processStyledBidirectionalText:Re}=Ps;if(we&&se.sections.length===1){de=[];const je=we(se.toString(),CS(se,F,T,l,g,J));for(const Je of je){const yt=new od;yt.text=Je,yt.sections=se.sections;for(let Ht=0;Ht0&&Tl>Ti&&(Ti=Tl)}else{const Za=yt[zr.fontStack],si=Za&&Za[_n];if(si&&si.rect)cd=si.rect,Dn=si.metrics;else{const Tl=Je[zr.fontStack],yv=Tl&&Tl[_n];if(!yv)continue;Dn=yv.metrics}Ca=(ii-zr.scale)*Qn}go?(je.verticalizable=!0,Xi.push({glyph:_n,imageName:Ms,x:er,y:nn+Ca,vertical:go,scale:zr.scale,fontStack:zr.fontStack,sectionIndex:hn,metrics:Dn,rect:cd}),er+=Ds*zr.scale+Ze):(Xi.push({glyph:_n,imageName:Ms,x:er,y:nn+Ca,vertical:go,scale:zr.scale,fontStack:zr.fontStack,sectionIndex:hn,metrics:Dn,rect:cd}),er+=Dn.advance*zr.scale+Ze)}Xi.length!==0&&(Jr=Math.max(er-Ze,Jr),qG(Xi,0,Xi.length-1,vo,Ti)),er=0;const qa=gt*ii+Ti;Si.lineOffset=Math.max(Ti,Li),nn+=qa,ni=Math.max(qa,ni),++wi}var On;const Wi=nn-fv,{horizontalAlign:qi,verticalAlign:Zi}=PS(Bt);(function(zn,ii,Li,Si,Xi,Ti,qa,fa,zr){const hn=(ii-Li)*Xi;let _n=0;_n=Ti!==qa?-fa*Si-fv:(-Si*zr+.5)*qa;for(const Ca of zn)for(const Dn of Ca.positionedGlyphs)Dn.x+=hn,Dn.y+=_n})(je.positionedLines,vo,qi,Zi,Jr,ni,gt,Wi,bt.length),je.top+=-Zi*Wi,je.bottom=je.top+Wi,je.left+=-qi*Jr,je.right=je.left+Jr}(De,l,f,g,de,A,D,O,U,F,X,re),!function(je){for(const Je of je)if(Je.positionedGlyphs.length!==0)return!1;return!0}(Ce)&&De}const K_={9:!0,10:!0,11:!0,12:!0,13:!0,32:!0},UG={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},GG={40:!0};function XD(h,l,f,g,x,T){if(l.imageName){const A=g[l.imageName];return A?A.displaySize[0]*l.scale*Qn/T+x:0}{const A=f[l.fontStack],D=A&&A[h];return D?D.metrics.advance*l.scale+x:0}}function KD(h,l,f,g){const x=Math.pow(h-l,2);return g?h=0;let F=0;for(let U=0;UF){const V=Math.ceil(T/F);x*=V/A,A=V}return{x1:g,y1:x,x2:g+T,y2:x+A}}function eL(h,l,f,g,x,T){const A=h.image;let D;if(A.content){const de=A.content,we=A.pixelRatio||1;D=[de[0]/we,de[1]/we,A.displaySize[0]-de[2]/we,A.displaySize[1]-de[3]/we]}const O=l.left*T,F=l.right*T;let V,U,X,J;f==="width"||f==="both"?(J=x[0]+O-g[3],U=x[0]+F+g[1]):(J=x[0]+(O+F-A.displaySize[0])/2,U=J+A.displaySize[0]);const re=l.top*T,se=l.bottom*T;return f==="height"||f==="both"?(V=x[1]+re-g[0],X=x[1]+se+g[2]):(V=x[1]+(re+se-A.displaySize[1])/2,X=V+A.displaySize[1]),{image:A,top:V,right:U,bottom:X,left:J,collisionPadding:D}}const pv=255,Es=128,gu=pv*Es;function tL(h,l){const{expression:f}=l;if(f.kind==="constant")return{kind:"constant",layoutSize:f.evaluate(new cn(h+1))};if(f.kind==="source")return{kind:"source"};{const{zoomStops:g,interpolationType:x}=f;let T=0;for(;TA.id),this.index=l.index,this.pixelRatio=l.pixelRatio,this.sourceLayerIndex=l.sourceLayerIndex,this.hasPattern=!1,this.hasRTLText=!1,this.sortKeyRanges=[],this.collisionCircleArray=[],this.placementInvProjMatrix=lS([]),this.placementViewportMatrix=lS([]);const f=this.layers[0]._unevaluatedLayout._values;this.textSizeData=tL(this.zoom,f["text-size"]),this.iconSizeData=tL(this.zoom,f["icon-size"]);const g=this.layers[0].layout,x=g.get("symbol-sort-key"),T=g.get("symbol-z-order");this.canOverlap=AS(g,"text-overlap","text-allow-overlap")!=="never"||AS(g,"icon-overlap","icon-allow-overlap")!=="never"||g.get("text-ignore-placement")||g.get("icon-ignore-placement"),this.sortFeaturesByKey=T!=="viewport-y"&&!x.isConstant(),this.sortFeaturesByY=(T==="viewport-y"||T==="auto"&&!this.sortFeaturesByKey)&&this.canOverlap,g.get("symbol-placement")==="point"&&(this.writingModes=g.get("text-writing-mode").map(A=>o.ai[A])),this.stateDependentLayerIds=this.layers.filter(A=>A.isStateDependent()).map(A=>A.id),this.sourceID=l.sourceID}createArrays(){this.text=new ES(new Uc(this.layers,this.zoom,l=>/^text/.test(l))),this.icon=new ES(new Uc(this.layers,this.zoom,l=>/^icon/.test(l))),this.glyphOffsetArray=new yn,this.lineVertexArray=new Ui,this.symbolInstances=new ja,this.textAnchorOffsets=new gi}calculateGlyphDependencies(l,f,g,x,T){for(let A=0;A0)&&(A.value.kind!=="constant"||A.value.value.length>0),V=O.value.kind!=="constant"||!!O.value.value||Object.keys(O.parameters).length>0,U=T.get("symbol-sort-key");if(this.features=[],!F&&!V)return;const X=f.iconDependencies,J=f.glyphDependencies,re=f.availableImages,se=new cn(this.zoom);for(const{feature:de,id:we,index:Re,sourceLayerIndex:Ce}of l){const De=x._featureFilter.needGeometry,je=Wc(de,De);if(!x._featureFilter.filter(se,je,g))continue;let Je,yt;if(De||(je.geometry=Gc(de)),F){const bt=x.getValueAndResolveTokens("text-field",je,g,re),gt=aa.factory(bt),Bt=this.hasRTLText=this.hasRTLText||YG(gt);(!Bt||Ps.getRTLTextPluginStatus()==="unavailable"||Bt&&Ps.isParsed())&&(Je=DG(gt,x,je))}if(V){const bt=x.getValueAndResolveTokens("icon-image",je,g,re);yt=bt instanceof mi?bt:mi.fromString(bt)}if(!Je&&!yt)continue;const Ht=this.sortFeaturesByKey?U.evaluate(je,{},g):void 0;if(this.features.push({id:we,text:Je,icon:yt,index:Re,sourceLayerIndex:Ce,geometry:je.geometry,properties:de.properties,type:XG[de.type],sortKey:Ht}),yt&&(X[yt.name]=!0),Je){const bt=A.evaluate(je,{},g).join(","),gt=T.get("text-rotation-alignment")!=="viewport"&&T.get("symbol-placement")!=="point";this.allowVerticalPlacement=this.writingModes&&this.writingModes.indexOf(o.ai.vertical)>=0;for(const Bt of Je.sections)if(Bt.image)X[Bt.image.name]=!0;else{const kt=qm(Je.toString()),Mt=Bt.fontStack||bt,Ze=J[Mt]=J[Mt]||{};this.calculateGlyphDependencies(Bt.text,Ze,gt,this.allowVerticalPlacement,kt)}}}T.get("symbol-placement")==="line"&&(this.features=function(de){const we={},Re={},Ce=[];let De=0;function je(bt){Ce.push(de[bt]),De++}function Je(bt,gt,Bt){const kt=Re[bt];return delete Re[bt],Re[gt]=kt,Ce[kt].geometry[0].pop(),Ce[kt].geometry[0]=Ce[kt].geometry[0].concat(Bt[0]),kt}function yt(bt,gt,Bt){const kt=we[gt];return delete we[gt],we[bt]=kt,Ce[kt].geometry[0].shift(),Ce[kt].geometry[0]=Bt[0].concat(Ce[kt].geometry[0]),kt}function Ht(bt,gt,Bt){const kt=Bt?gt[0][gt[0].length-1]:gt[0][0];return`${bt}:${kt.x}:${kt.y}`}for(let bt=0;btbt.geometry)}(this.features)),this.sortFeaturesByKey&&this.features.sort((de,we)=>de.sortKey-we.sortKey)}update(l,f,g){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(l,f,this.layers,g),this.icon.programConfigurations.updatePaintArrays(l,f,this.layers,g))}isEmpty(){return this.symbolInstances.length===0&&!this.hasRTLText}uploadPending(){return!this.uploaded||this.text.programConfigurations.needsUpload||this.icon.programConfigurations.needsUpload}upload(l){!this.uploaded&&this.hasDebugData()&&(this.textCollisionBox.upload(l),this.iconCollisionBox.upload(l)),this.text.upload(l,this.sortFeaturesByY,!this.uploaded,this.text.programConfigurations.needsUpload),this.icon.upload(l,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(l,f){const g=this.lineVertexArray.length;if(l.segment!==void 0){let x=l.dist(f[l.segment+1]),T=l.dist(f[l.segment]);const A={};for(let D=l.segment+1;D=0;D--)A[D]={x:f[D].x,y:f[D].y,tileUnitDistanceFromAnchor:T},D>0&&(T+=f[D-1].dist(f[D]));for(let D=0;D0}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(l,f){const g=l.placedSymbolArray.get(f),x=g.vertexStartIndex+4*g.numGlyphs;for(let T=g.vertexStartIndex;Tx[D]-x[O]||T[O]-T[D]),A}addToSortKeyRanges(l,f){const g=this.sortKeyRanges[this.sortKeyRanges.length-1];g&&g.sortKey===f?g.symbolInstanceEnd=l+1:this.sortKeyRanges.push({sortKey:f,symbolInstanceStart:l,symbolInstanceEnd:l+1})}sortFeatures(l){if(this.sortFeaturesByY&&this.sortedAngle!==l&&!(this.text.segments.get().length>1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(l),this.sortedAngle=l,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(const f of this.symbolInstanceIndexes){const g=this.symbolInstances.get(f);this.featureSortOrder.push(g.featureIndex),[g.rightJustifiedTextSymbolIndex,g.centerJustifiedTextSymbolIndex,g.leftJustifiedTextSymbolIndex].forEach((x,T,A)=>{x>=0&&A.indexOf(x)===T&&this.addIndicesForPlacedSymbol(this.text,x)}),g.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,g.verticalPlacedTextSymbolIndex),g.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,g.placedIconSymbolIndex),g.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,g.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}}}let rL,nL;Lt("SymbolBucket",sd,{omit:["layers","collisionBoxArray","features","compareText"]}),sd.MAX_GLYPHS=65535,sd.addDynamicAttributes=IS;var DS={get paint(){return nL=nL||new b({"icon-opacity":new Xt(ye.paint_symbol["icon-opacity"]),"icon-color":new Xt(ye.paint_symbol["icon-color"]),"icon-halo-color":new Xt(ye.paint_symbol["icon-halo-color"]),"icon-halo-width":new Xt(ye.paint_symbol["icon-halo-width"]),"icon-halo-blur":new Xt(ye.paint_symbol["icon-halo-blur"]),"icon-translate":new $t(ye.paint_symbol["icon-translate"]),"icon-translate-anchor":new $t(ye.paint_symbol["icon-translate-anchor"]),"text-opacity":new Xt(ye.paint_symbol["text-opacity"]),"text-color":new Xt(ye.paint_symbol["text-color"],{runtimeType:rn,getOverride:h=>h.textColor,hasOverride:h=>!!h.textColor}),"text-halo-color":new Xt(ye.paint_symbol["text-halo-color"]),"text-halo-width":new Xt(ye.paint_symbol["text-halo-width"]),"text-halo-blur":new Xt(ye.paint_symbol["text-halo-blur"]),"text-translate":new $t(ye.paint_symbol["text-translate"]),"text-translate-anchor":new $t(ye.paint_symbol["text-translate-anchor"])})},get layout(){return rL=rL||new b({"symbol-placement":new $t(ye.layout_symbol["symbol-placement"]),"symbol-spacing":new $t(ye.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new $t(ye.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new Xt(ye.layout_symbol["symbol-sort-key"]),"symbol-z-order":new $t(ye.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new $t(ye.layout_symbol["icon-allow-overlap"]),"icon-overlap":new $t(ye.layout_symbol["icon-overlap"]),"icon-ignore-placement":new $t(ye.layout_symbol["icon-ignore-placement"]),"icon-optional":new $t(ye.layout_symbol["icon-optional"]),"icon-rotation-alignment":new $t(ye.layout_symbol["icon-rotation-alignment"]),"icon-size":new Xt(ye.layout_symbol["icon-size"]),"icon-text-fit":new $t(ye.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new $t(ye.layout_symbol["icon-text-fit-padding"]),"icon-image":new Xt(ye.layout_symbol["icon-image"]),"icon-rotate":new Xt(ye.layout_symbol["icon-rotate"]),"icon-padding":new Xt(ye.layout_symbol["icon-padding"]),"icon-keep-upright":new $t(ye.layout_symbol["icon-keep-upright"]),"icon-offset":new Xt(ye.layout_symbol["icon-offset"]),"icon-anchor":new Xt(ye.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new $t(ye.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new $t(ye.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new $t(ye.layout_symbol["text-rotation-alignment"]),"text-field":new Xt(ye.layout_symbol["text-field"]),"text-font":new Xt(ye.layout_symbol["text-font"]),"text-size":new Xt(ye.layout_symbol["text-size"]),"text-max-width":new Xt(ye.layout_symbol["text-max-width"]),"text-line-height":new $t(ye.layout_symbol["text-line-height"]),"text-letter-spacing":new Xt(ye.layout_symbol["text-letter-spacing"]),"text-justify":new Xt(ye.layout_symbol["text-justify"]),"text-radial-offset":new Xt(ye.layout_symbol["text-radial-offset"]),"text-variable-anchor":new $t(ye.layout_symbol["text-variable-anchor"]),"text-variable-anchor-offset":new Xt(ye.layout_symbol["text-variable-anchor-offset"]),"text-anchor":new Xt(ye.layout_symbol["text-anchor"]),"text-max-angle":new $t(ye.layout_symbol["text-max-angle"]),"text-writing-mode":new $t(ye.layout_symbol["text-writing-mode"]),"text-rotate":new Xt(ye.layout_symbol["text-rotate"]),"text-padding":new $t(ye.layout_symbol["text-padding"]),"text-keep-upright":new $t(ye.layout_symbol["text-keep-upright"]),"text-transform":new Xt(ye.layout_symbol["text-transform"]),"text-offset":new Xt(ye.layout_symbol["text-offset"]),"text-allow-overlap":new $t(ye.layout_symbol["text-allow-overlap"]),"text-overlap":new $t(ye.layout_symbol["text-overlap"]),"text-ignore-placement":new $t(ye.layout_symbol["text-ignore-placement"]),"text-optional":new $t(ye.layout_symbol["text-optional"])})}};class iL{constructor(l){if(l.property.overrides===void 0)throw new Error("overrides must be provided to instantiate FormatSectionOverride class");this.type=l.property.overrides?l.property.overrides.runtimeType:Ei,this.defaultValue=l}evaluate(l){if(l.formattedSection){const f=this.defaultValue.property.overrides;if(f&&f.hasOverride(l.formattedSection))return f.getOverride(l.formattedSection)}return l.feature&&l.featureState?this.defaultValue.evaluate(l.feature,l.featureState):this.defaultValue.property.specification.default}eachChild(l){this.defaultValue.isConstant()||l(this.defaultValue.value._styleExpression.expression)}outputDefined(){return!1}serialize(){return null}}Lt("FormatSectionOverride",iL,{omit:["defaultValue"]});class J_ extends P{constructor(l){super(l,DS)}recalculate(l,f){if(super.recalculate(l,f),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"){const g=this.layout.get("text-writing-mode");if(g){const x=[];for(const T of g)x.indexOf(T)<0&&x.push(T);this.layout._values["text-writing-mode"]=x}else this.layout._values["text-writing-mode"]=["horizontal"]}this._setPaintOverrides()}getValueAndResolveTokens(l,f,g,x){const T=this.layout.get(l).evaluate(f,{},g,x),A=this._unevaluatedLayout._values[l];return A.isDataDriven()||Rc(A.value)||!T?T:function(D,O){return O.replace(/{([^{}]+)}/g,(F,V)=>D&&V in D?String(D[V]):"")}(f.properties,T)}createBucket(l){return new sd(l)}queryRadius(){return 0}queryIntersectsFeature(){throw new Error("Should take a different path in FeatureIndex")}_setPaintOverrides(){for(const l of DS.paint.overridableProperties){if(!J_.hasPaintOverride(this.layout,l))continue;const f=this.paint.get(l),g=new iL(f),x=new Nf(g,f.property.specification);let T=null;T=f.value.kind==="constant"||f.value.kind==="source"?new Pm("source",x):new Am("composite",x,f.value.zoomStops),this.paint._values[l]=new mo(f.property,T,f.parameters)}}_handleOverridablePaintPropertyUpdate(l,f,g){return!(!this.layout||f.isDataDriven()||g.isDataDriven())&&J_.hasPaintOverride(this.layout,l)}static hasPaintOverride(l,f){const g=l.get("text-field"),x=DS.paint.properties[f];let T=!1;const A=D=>{for(const O of D)if(x.overrides&&x.overrides.hasOverride(O))return void(T=!0)};if(g.value.kind==="constant"&&g.value.value instanceof aa)A(g.value.value.sections);else if(g.value.kind==="source"){const D=F=>{T||(F instanceof cl&&Un(F.value)===Ho?A(F.value.sections):F instanceof Af?A(F.sections):F.eachChild(D))},O=g.value;O._styleExpression&&D(O._styleExpression.expression)}return T}}let aL;var JG={get paint(){return aL=aL||new b({"background-color":new $t(ye.paint_background["background-color"]),"background-pattern":new u(ye.paint_background["background-pattern"]),"background-opacity":new $t(ye.paint_background["background-opacity"])})}};class QG extends P{constructor(l){super(l,JG)}}let oL;var eW={get paint(){return oL=oL||new b({"raster-opacity":new $t(ye.paint_raster["raster-opacity"]),"raster-hue-rotate":new $t(ye.paint_raster["raster-hue-rotate"]),"raster-brightness-min":new $t(ye.paint_raster["raster-brightness-min"]),"raster-brightness-max":new $t(ye.paint_raster["raster-brightness-max"]),"raster-saturation":new $t(ye.paint_raster["raster-saturation"]),"raster-contrast":new $t(ye.paint_raster["raster-contrast"]),"raster-resampling":new $t(ye.paint_raster["raster-resampling"]),"raster-fade-duration":new $t(ye.paint_raster["raster-fade-duration"])})}};class tW extends P{constructor(l){super(l,eW)}}class rW extends P{constructor(l){super(l,{}),this.onAdd=f=>{this.implementation.onAdd&&this.implementation.onAdd(f,f.painter.context.gl)},this.onRemove=f=>{this.implementation.onRemove&&this.implementation.onRemove(f,f.painter.context.gl)},this.implementation=l}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 nW{constructor(l){this._methodToThrottle=l,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=()=>{}}}const LS=63710088e-1;class yu{constructor(l,f){if(isNaN(l)||isNaN(f))throw new Error(`Invalid LngLat object: (${l}, ${f})`);if(this.lng=+l,this.lat=+f,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")}wrap(){return new yu(j(this.lng,-180,180),this.lat)}toArray(){return[this.lng,this.lat]}toString(){return`LngLat(${this.lng}, ${this.lat})`}distanceTo(l){const f=Math.PI/180,g=this.lat*f,x=l.lat*f,T=Math.sin(g)*Math.sin(x)+Math.cos(g)*Math.cos(x)*Math.cos((l.lng-this.lng)*f);return LS*Math.acos(Math.min(T,1))}static convert(l){if(l instanceof yu)return l;if(Array.isArray(l)&&(l.length===2||l.length===3))return new yu(Number(l[0]),Number(l[1]));if(!Array.isArray(l)&&typeof l=="object"&&l!==null)return new yu(Number("lng"in l?l.lng:l.lon),Number(l.lat));throw new Error("`LngLatLike` argument must be specified as a LngLat instance, an object {lng: , lat: }, an object {lon: , lat: }, or an array of [, ]")}}const sL=2*Math.PI*LS;function lL(h){return sL*Math.cos(h*Math.PI/180)}function uL(h){return(180+h)/360}function cL(h){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+h*Math.PI/360)))/360}function hL(h,l){return h/lL(l)}function kS(h){return 360/Math.PI*Math.atan(Math.exp((180-360*h)*Math.PI/180))-90}class Q_{constructor(l,f,g=0){this.x=+l,this.y=+f,this.z=+g}static fromLngLat(l,f=0){const g=yu.convert(l);return new Q_(uL(g.lng),cL(g.lat),hL(f,g.lat))}toLngLat(){return new yu(360*this.x-180,kS(this.y))}toAltitude(){return this.z*lL(kS(this.y))}meterInMercatorCoordinateUnits(){return 1/sL*(l=kS(this.y),1/Math.cos(l*Math.PI/180));var l}}function fL(h,l,f){var g=2*Math.PI*6378137/256/Math.pow(2,f);return[h*g-2*Math.PI*6378137/2,l*g-2*Math.PI*6378137/2]}class RS{constructor(l,f,g){if(l<0||l>25||g<0||g>=Math.pow(2,l)||f<0||f>=Math.pow(2,l))throw new Error(`x=${f}, y=${g}, z=${l} outside of bounds. 0<=x<${Math.pow(2,l)}, 0<=y<${Math.pow(2,l)} 0<=z<=25 `);this.z=l,this.x=f,this.y=g,this.key=mv(0,l,l,f,g)}equals(l){return this.z===l.z&&this.x===l.x&&this.y===l.y}url(l,f,g){const x=(A=this.y,D=this.z,O=fL(256*(T=this.x),256*(A=Math.pow(2,D)-A-1),D),F=fL(256*(T+1),256*(A+1),D),O[0]+","+O[1]+","+F[0]+","+F[1]);var T,A,D,O,F;const V=function(U,X,J){let re,se="";for(let de=U;de>0;de--)re=1<1?"@2x":"").replace(/{quadkey}/g,V).replace(/{bbox-epsg-3857}/g,x)}isChildOf(l){const f=this.z-l.z;return f>0&&l.x===this.x>>f&&l.y===this.y>>f}getTilePoint(l){const f=Math.pow(2,this.z);return new v((l.x*f-this.x)*Gn,(l.y*f-this.y)*Gn)}toString(){return`${this.z}/${this.x}/${this.y}`}}class dL{constructor(l,f){this.wrap=l,this.canonical=f,this.key=mv(l,f.z,f.z,f.x,f.y)}}class Wa{constructor(l,f,g,x,T){if(l= z; overscaledZ = ${l}; z = ${g}`);this.overscaledZ=l,this.wrap=f,this.canonical=new RS(g,+x,+T),this.key=mv(f,l,g,x,T)}clone(){return new Wa(this.overscaledZ,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)}equals(l){return this.overscaledZ===l.overscaledZ&&this.wrap===l.wrap&&this.canonical.equals(l.canonical)}scaledTo(l){if(l>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${l}; overscaledZ = ${this.overscaledZ}`);const f=this.canonical.z-l;return l>this.canonical.z?new Wa(l,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new Wa(l,this.wrap,l,this.canonical.x>>f,this.canonical.y>>f)}calculateScaledKey(l,f){if(l>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${l}; overscaledZ = ${this.overscaledZ}`);const g=this.canonical.z-l;return l>this.canonical.z?mv(this.wrap*+f,l,this.canonical.z,this.canonical.x,this.canonical.y):mv(this.wrap*+f,l,l,this.canonical.x>>g,this.canonical.y>>g)}isChildOf(l){if(l.wrap!==this.wrap)return!1;const f=this.canonical.z-l.canonical.z;return l.overscaledZ===0||l.overscaledZ>f&&l.canonical.y===this.canonical.y>>f}children(l){if(this.overscaledZ>=l)return[new Wa(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];const f=this.canonical.z+1,g=2*this.canonical.x,x=2*this.canonical.y;return[new Wa(f,this.wrap,f,g,x),new Wa(f,this.wrap,f,g+1,x),new Wa(f,this.wrap,f,g,x+1),new Wa(f,this.wrap,f,g+1,x+1)]}isLessThan(l){return this.wrapl.wrap)&&(this.overscaledZl.overscaledZ)&&(this.canonical.xl.canonical.x)&&this.canonical.ythis.max&&(this.max=U),U=this.dim+1||f<-1||f>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return(f+1)*this.stride+(l+1)}unpack(l,f,g){return l*this.redFactor+f*this.greenFactor+g*this.blueFactor-this.baseShift}getPixels(){return new Ga({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))}backfillBorder(l,f,g){if(this.dim!==l.dim)throw new Error("dem dimension mismatch");let x=f*this.dim,T=f*this.dim+this.dim,A=g*this.dim,D=g*this.dim+this.dim;switch(f){case-1:x=T-1;break;case 1:T=x+1}switch(g){case-1:A=D-1;break;case 1:D=A+1}const O=-f*this.dim,F=-g*this.dim;for(let V=A;V=this._numberToString.length)throw new Error(`Out of bounds. Index requested n=${l} can't be >= this._numberToString.length ${this._numberToString.length}`);return this._numberToString[l]}}class vL{constructor(l,f,g,x,T){this.type="Feature",this._vectorTileFeature=l,l._z=f,l._x=g,l._y=x,this.properties=l.properties,this.id=T}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(l){this._geometry=l}toJSON(){const l={geometry:this.geometry};for(const f in this)f!=="_geometry"&&f!=="_vectorTileFeature"&&(l[f]=this[f]);return l}}class gL{constructor(l,f){this.tileID=l,this.x=l.canonical.x,this.y=l.canonical.y,this.z=l.canonical.z,this.grid=new su(Gn,16,0),this.grid3D=new su(Gn,16,0),this.featureIndexArray=new Ha,this.promoteId=f}insert(l,f,g,x,T,A){const D=this.featureIndexArray.length;this.featureIndexArray.emplaceBack(g,x,T);const O=A?this.grid3D:this.grid;for(let F=0;F=0&&U[3]>=0&&O.insert(D,U[0],U[1],U[2],U[3])}}loadVTLayers(){return this.vtLayers||(this.vtLayers=new mu.VectorTile(new wS(this.rawTileData)).layers,this.sourceLayerCoder=new mL(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers}query(l,f,g,x){this.loadVTLayers();const T=l.params||{},A=Gn/l.tileSize/l.scale,D=Mi(T.filter),O=l.queryGeometry,F=l.queryPadding*A,V=_L(O),U=this.grid.query(V.minX-F,V.minY-F,V.maxX+F,V.maxY+F),X=_L(l.cameraQueryGeometry),J=this.grid3D.query(X.minX-F,X.minY-F,X.maxX+F,X.maxY+F,(de,we,Re,Ce)=>function(De,je,Je,yt,Ht){for(const gt of De)if(je<=gt.x&&Je<=gt.y&&yt>=gt.x&&Ht>=gt.y)return!0;const bt=[new v(je,Je),new v(je,Ht),new v(yt,Ht),new v(yt,Je)];if(De.length>2){for(const gt of bt)if(ed(De,gt))return!0}for(let gt=0;gt(Ce||(Ce=Gc(De)),je.queryIntersectsFeature(O,De,Je,Ce,this.z,l.transform,A,l.pixelPosMatrix)))}return re}loadMatchingFeature(l,f,g,x,T,A,D,O,F,V,U){const X=this.bucketLayerIDs[f];if(A&&!function(de,we){for(let Re=0;Re=0)return!0;return!1}(A,X))return;const J=this.sourceLayerCoder.decode(g),re=this.vtLayers[J].feature(x);if(T.needGeometry){const de=Wc(re,!0);if(!T.filter(new cn(this.tileID.overscaledZ),de,this.tileID.canonical))return}else if(!T.filter(new cn(this.tileID.overscaledZ),re))return;const se=this.getId(re,J);for(let de=0;de{const D=l instanceof qf?l.get(A):null;return D&&D.evaluate?D.evaluate(f,g,x):D})}function _L(h){let l=1/0,f=1/0,g=-1/0,x=-1/0;for(const T of h)l=Math.min(l,T.x),f=Math.min(f,T.y),g=Math.max(g,T.x),x=Math.max(x,T.y);return{minX:l,minY:f,maxX:g,maxY:x}}function iW(h,l){return l-h}function bL(h,l,f,g,x){const T=[];for(let A=0;A=g&&U.x>=g||(V.x>=g?V=new v(g,V.y+(g-V.x)/(U.x-V.x)*(U.y-V.y))._round():U.x>=g&&(U=new v(g,V.y+(g-V.x)/(U.x-V.x)*(U.y-V.y))._round()),V.y>=x&&U.y>=x||(V.y>=x?V=new v(V.x+(x-V.y)/(U.y-V.y)*(U.x-V.x),x)._round():U.y>=x&&(U=new v(V.x+(x-V.y)/(U.y-V.y)*(U.x-V.x),x)._round()),O&&V.equals(O[O.length-1])||(O=[V],T.push(O)),O.push(U)))))}}return T}Lt("FeatureIndex",gL,{omit:["rawTileData","sourceLayerCoder"]});class _u extends v{constructor(l,f,g,x){super(l,f),this.angle=g,x!==void 0&&(this.segment=x)}clone(){return new _u(this.x,this.y,this.angle,this.segment)}}function xL(h,l,f,g,x){if(l.segment===void 0||f===0)return!0;let T=l,A=l.segment+1,D=0;for(;D>-f/2;){if(A--,A<0)return!1;D-=h[A].dist(T),T=h[A]}D+=h[A].dist(h[A+1]),A++;const O=[];let F=0;for(;Dg;)F-=O.shift().angleDelta;if(F>x)return!1;A++,D+=V.dist(U)}return!0}function wL(h){let l=0;for(let f=0;fF){const re=(F-O)/J,se=la.number(U.x,X.x,re),de=la.number(U.y,X.y,re),we=new _u(se,de,X.angleTo(U),V);return we._round(),!A||xL(h,we,D,A,l)?we:void 0}O+=J}}function oW(h,l,f,g,x,T,A,D,O){const F=SL(g,T,A),V=TL(g,x),U=V*A,X=h[0].x===0||h[0].x===O||h[0].y===0||h[0].y===O;return l-U=0&&De=0&&je=0&&X+F<=V){const Je=new _u(De,je,Re,re);Je._round(),g&&!xL(h,Je,T,g,x)||J.push(Je)}}U+=we}return D||J.length||A||(J=CL(h,U/2,f,g,x,T,A,!0,O)),J}Lt("Anchor",_u);const ld=ha;function PL(h,l,f,g){const x=[],T=h.image,A=T.pixelRatio,D=T.paddedRect.w-2*ld,O=T.paddedRect.h-2*ld;let F={x1:h.left,y1:h.top,x2:h.right,y2:h.bottom};const V=T.stretchX||[[0,D]],U=T.stretchY||[[0,O]],X=(Ze,Nt)=>Ze+Nt[1]-Nt[0],J=V.reduce(X,0),re=U.reduce(X,0),se=D-J,de=O-re;let we=0,Re=J,Ce=0,De=re,je=0,Je=se,yt=0,Ht=de;if(T.content&&g){const Ze=T.content,Nt=Ze[2]-Ze[0],zt=Ze[3]-Ze[1];(T.textFitWidth||T.textFitHeight)&&(F=QD(h)),we=e0(V,0,Ze[0]),Ce=e0(U,0,Ze[1]),Re=e0(V,Ze[0],Ze[2]),De=e0(U,Ze[1],Ze[3]),je=Ze[0]-we,yt=Ze[1]-Ce,Je=Nt-Re,Ht=zt-De}const bt=F.x1,gt=F.y1,Bt=F.x2-bt,kt=F.y2-gt,Mt=(Ze,Nt,zt,er)=>{const nn=t0(Ze.stretch-we,Re,Bt,bt),Jr=r0(Ze.fixed-je,Je,Ze.stretch,J),ni=t0(Nt.stretch-Ce,De,kt,gt),vo=r0(Nt.fixed-yt,Ht,Nt.stretch,re),wi=t0(zt.stretch-we,Re,Bt,bt),On=r0(zt.fixed-je,Je,zt.stretch,J),Wi=t0(er.stretch-Ce,De,kt,gt),qi=r0(er.fixed-yt,Ht,er.stretch,re),Zi=new v(nn,ni),zn=new v(wi,ni),ii=new v(wi,Wi),Li=new v(nn,Wi),Si=new v(Jr/A,vo/A),Xi=new v(On/A,qi/A),Ti=l*Math.PI/180;if(Ti){const zr=Math.sin(Ti),hn=Math.cos(Ti),_n=[hn,-zr,zr,hn];Zi._matMult(_n),zn._matMult(_n),Li._matMult(_n),ii._matMult(_n)}const qa=Ze.stretch+Ze.fixed,fa=Nt.stretch+Nt.fixed;return{tl:Zi,tr:zn,bl:Li,br:ii,tex:{x:T.paddedRect.x+ld+qa,y:T.paddedRect.y+ld+fa,w:zt.stretch+zt.fixed-qa,h:er.stretch+er.fixed-fa},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:Si,pixelOffsetBR:Xi,minFontScaleX:Je/A/Bt,minFontScaleY:Ht/A/kt,isSDF:f}};if(g&&(T.stretchX||T.stretchY)){const Ze=AL(V,se,J),Nt=AL(U,de,re);for(let zt=0;zt0&&(se=Math.max(10,se),this.circleDiameter=se)}else{const X=!((U=A.image)===null||U===void 0)&&U.content&&(A.image.textFitWidth||A.image.textFitHeight)?QD(A):{x1:A.left,y1:A.top,x2:A.right,y2:A.bottom};X.y1=X.y1*D-O[0],X.y2=X.y2*D+O[2],X.x1=X.x1*D-O[3],X.x2=X.x2*D+O[1];const J=A.collisionPadding;if(J&&(X.x1-=J[0]*D,X.y1-=J[1]*D,X.x2+=J[2]*D,X.y2+=J[3]*D),V){const re=new v(X.x1,X.y1),se=new v(X.x2,X.y1),de=new v(X.x1,X.y2),we=new v(X.x2,X.y2),Re=V*Math.PI/180;re._rotate(Re),se._rotate(Re),de._rotate(Re),we._rotate(Re),X.x1=Math.min(re.x,se.x,de.x,we.x),X.x2=Math.max(re.x,se.x,de.x,we.x),X.y1=Math.min(re.y,se.y,de.y,we.y),X.y2=Math.max(re.y,se.y,de.y,we.y)}l.emplaceBack(f.x,f.y,X.x1,X.y1,X.x2,X.y2,g,x,T)}this.boxEndIndex=l.length}}class sW{constructor(l=[],f=lW){if(this.data=l,this.length=this.data.length,this.compare=f,this.length>0)for(let g=(this.length>>1)-1;g>=0;g--)this._down(g)}push(l){this.data.push(l),this.length++,this._up(this.length-1)}pop(){if(this.length===0)return;const l=this.data[0],f=this.data.pop();return this.length--,this.length>0&&(this.data[0]=f,this._down(0)),l}peek(){return this.data[0]}_up(l){const{data:f,compare:g}=this,x=f[l];for(;l>0;){const T=l-1>>1,A=f[T];if(g(x,A)>=0)break;f[l]=A,l=T}f[l]=x}_down(l){const{data:f,compare:g}=this,x=this.length>>1,T=f[l];for(;l=0)break;f[l]=D,l=A}f[l]=T}}function lW(h,l){return hl?1:0}function uW(h,l=1,f=!1){let g=1/0,x=1/0,T=-1/0,A=-1/0;const D=h[0];for(let J=0;JT)&&(T=re.x),(!J||re.y>A)&&(A=re.y)}const O=Math.min(T-g,A-x);let F=O/2;const V=new sW([],cW);if(O===0)return new v(g,x);for(let J=g;JU.d||!U.d)&&(U=J,f&&console.log("found best %d after %d probes",Math.round(1e4*J.d)/1e4,X)),J.max-U.d<=l||(F=J.h/2,V.push(new ud(J.p.x-F,J.p.y-F,F,h)),V.push(new ud(J.p.x+F,J.p.y-F,F,h)),V.push(new ud(J.p.x-F,J.p.y+F,F,h)),V.push(new ud(J.p.x+F,J.p.y+F,F,h)),X+=4)}return f&&(console.log(`num probes: ${X}`),console.log(`best distance: ${U.d}`)),U.p}function cW(h,l){return l.max-h.max}function ud(h,l,f,g){this.p=new v(h,l),this.h=f,this.d=function(x,T){let A=!1,D=1/0;for(let O=0;Ox.y!=re.y>x.y&&x.x<(re.x-J.x)*(x.y-J.y)/(re.y-J.y)+J.x&&(A=!A),D=Math.min(D,cD(x,J,re))}}return(A?1:-1)*Math.sqrt(D)}(this.p,g),this.max=this.d+this.h*Math.SQRT2}var xi;o.ar=void 0,(xi=o.ar||(o.ar={}))[xi.center=1]="center",xi[xi.left=2]="left",xi[xi.right=3]="right",xi[xi.top=4]="top",xi[xi.bottom=5]="bottom",xi[xi["top-left"]=6]="top-left",xi[xi["top-right"]=7]="top-right",xi[xi["bottom-left"]=8]="bottom-left",xi[xi["bottom-right"]=9]="bottom-right";const bu=7,OS=Number.POSITIVE_INFINITY;function IL(h,l){return l[1]!==OS?function(f,g,x){let T=0,A=0;switch(g=Math.abs(g),x=Math.abs(x),f){case"top-right":case"top-left":case"top":A=x-bu;break;case"bottom-right":case"bottom-left":case"bottom":A=-x+bu}switch(f){case"top-right":case"bottom-right":case"right":T=-g;break;case"top-left":case"bottom-left":case"left":T=g}return[T,A]}(h,l[0],l[1]):function(f,g){let x=0,T=0;g<0&&(g=0);const A=g/Math.SQRT2;switch(f){case"top-right":case"top-left":T=A-bu;break;case"bottom-right":case"bottom-left":T=-A+bu;break;case"bottom":T=-g+bu;break;case"top":T=g-bu}switch(f){case"top-right":case"bottom-right":x=-A;break;case"top-left":case"bottom-left":x=A;break;case"left":x=g;break;case"right":x=-g}return[x,T]}(h,l[0])}function EL(h,l,f){var g;const x=h.layout,T=(g=x.get("text-variable-anchor-offset"))===null||g===void 0?void 0:g.evaluate(l,{},f);if(T){const D=T.values,O=[];for(let F=0;FX*Qn);V.startsWith("top")?U[1]-=bu:V.startsWith("bottom")&&(U[1]+=bu),O[F+1]=U}return new sa(O)}const A=x.get("text-variable-anchor");if(A){let D;D=h._unevaluatedLayout.getValue("text-radial-offset")!==void 0?[x.get("text-radial-offset").evaluate(l,{},f)*Qn,OS]:x.get("text-offset").evaluate(l,{},f).map(F=>F*Qn);const O=[];for(const F of A)O.push(F,IL(F,D));return new sa(O)}return null}function zS(h){switch(h){case"right":case"top-right":case"bottom-right":return"right";case"left":case"top-left":case"bottom-left":return"left"}return"center"}function hW(h,l,f,g,x,T,A,D,O,F,V){let U=T.textMaxSize.evaluate(l,{});U===void 0&&(U=A);const X=h.layers[0].layout,J=X.get("icon-offset").evaluate(l,{},V),re=DL(f.horizontal),se=A/24,de=h.tilePixelRatio*se,we=h.tilePixelRatio*U/24,Re=h.tilePixelRatio*D,Ce=h.tilePixelRatio*X.get("symbol-spacing"),De=X.get("text-padding")*h.tilePixelRatio,je=function(Ze,Nt,zt,er=1){const nn=Ze.get("icon-padding").evaluate(Nt,{},zt),Jr=nn&&nn.values;return[Jr[0]*er,Jr[1]*er,Jr[2]*er,Jr[3]*er]}(X,l,V,h.tilePixelRatio),Je=X.get("text-max-angle")/180*Math.PI,yt=X.get("text-rotation-alignment")!=="viewport"&&X.get("symbol-placement")!=="point",Ht=X.get("icon-rotation-alignment")==="map"&&X.get("symbol-placement")!=="point",bt=X.get("symbol-placement"),gt=Ce/2,Bt=X.get("icon-text-fit");let kt;g&&Bt!=="none"&&(h.allowVerticalPlacement&&f.vertical&&(kt=eL(g,f.vertical,Bt,X.get("icon-text-fit-padding"),J,se)),re&&(g=eL(g,re,Bt,X.get("icon-text-fit-padding"),J,se)));const Mt=(Ze,Nt)=>{Nt.x<0||Nt.x>=Gn||Nt.y<0||Nt.y>=Gn||function(zt,er,nn,Jr,ni,vo,wi,On,Wi,qi,Zi,zn,ii,Li,Si,Xi,Ti,qa,fa,zr,hn,_n,Ca,Dn,cd){const Ms=zt.addToLineVertexArray(er,nn);let Ds,go,Za,si,Tl=0,yv=0,OL=0,zL=0,US=-1,GS=-1;const Cl={};let BL=Jf("");if(zt.allowVerticalPlacement&&Jr.vertical){const ki=On.layout.get("text-rotate").evaluate(hn,{},Dn)+90;Za=new n0(Wi,er,qi,Zi,zn,Jr.vertical,ii,Li,Si,ki),wi&&(si=new n0(Wi,er,qi,Zi,zn,wi,Ti,qa,Si,ki))}if(ni){const ki=On.layout.get("icon-rotate").evaluate(hn,{}),Xa=On.layout.get("icon-text-fit")!=="none",Zc=PL(ni,ki,Ca,Xa),Ko=wi?PL(wi,ki,Ca,Xa):void 0;go=new n0(Wi,er,qi,Zi,zn,ni,Ti,qa,!1,ki),Tl=4*Zc.length;const Xc=zt.iconSizeData;let Ls=null;Xc.kind==="source"?(Ls=[Es*On.layout.get("icon-size").evaluate(hn,{})],Ls[0]>gu&&ce(`${zt.layerIds[0]}: Value for "icon-size" is >= ${pv}. Reduce your "icon-size".`)):Xc.kind==="composite"&&(Ls=[Es*_n.compositeIconSizes[0].evaluate(hn,{},Dn),Es*_n.compositeIconSizes[1].evaluate(hn,{},Dn)],(Ls[0]>gu||Ls[1]>gu)&&ce(`${zt.layerIds[0]}: Value for "icon-size" is >= ${pv}. Reduce your "icon-size".`)),zt.addSymbols(zt.icon,Zc,Ls,zr,fa,hn,o.ai.none,er,Ms.lineStartIndex,Ms.lineLength,-1,Dn),US=zt.icon.placedSymbolArray.length-1,Ko&&(yv=4*Ko.length,zt.addSymbols(zt.icon,Ko,Ls,zr,fa,hn,o.ai.vertical,er,Ms.lineStartIndex,Ms.lineLength,-1,Dn),GS=zt.icon.placedSymbolArray.length-1)}const FL=Object.keys(Jr.horizontal);for(const ki of FL){const Xa=Jr.horizontal[ki];if(!Ds){BL=Jf(Xa.text);const Ko=On.layout.get("text-rotate").evaluate(hn,{},Dn);Ds=new n0(Wi,er,qi,Zi,zn,Xa,ii,Li,Si,Ko)}const Zc=Xa.positionedLines.length===1;if(OL+=ML(zt,er,Xa,vo,On,Si,hn,Xi,Ms,Jr.vertical?o.ai.horizontal:o.ai.horizontalOnly,Zc?FL:[ki],Cl,US,_n,Dn),Zc)break}Jr.vertical&&(zL+=ML(zt,er,Jr.vertical,vo,On,Si,hn,Xi,Ms,o.ai.vertical,["vertical"],Cl,GS,_n,Dn));const pW=Ds?Ds.boxStartIndex:zt.collisionBoxArray.length,mW=Ds?Ds.boxEndIndex:zt.collisionBoxArray.length,vW=Za?Za.boxStartIndex:zt.collisionBoxArray.length,gW=Za?Za.boxEndIndex:zt.collisionBoxArray.length,yW=go?go.boxStartIndex:zt.collisionBoxArray.length,_W=go?go.boxEndIndex:zt.collisionBoxArray.length,bW=si?si.boxStartIndex:zt.collisionBoxArray.length,xW=si?si.boxEndIndex:zt.collisionBoxArray.length;let Xo=-1;const a0=(ki,Xa)=>ki&&ki.circleDiameter?Math.max(ki.circleDiameter,Xa):Xa;Xo=a0(Ds,Xo),Xo=a0(Za,Xo),Xo=a0(go,Xo),Xo=a0(si,Xo);const $L=Xo>-1?1:0;$L&&(Xo*=cd/Qn),zt.glyphOffsetArray.length>=sd.MAX_GLYPHS&&ce("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),hn.sortKey!==void 0&&zt.addToSortKeyRanges(zt.symbolInstances.length,hn.sortKey);const wW=EL(On,hn,Dn),[SW,TW]=function(ki,Xa){const Zc=ki.length,Ko=Xa==null?void 0:Xa.values;if((Ko==null?void 0:Ko.length)>0)for(let Xc=0;Xc=0?Cl.right:-1,Cl.center>=0?Cl.center:-1,Cl.left>=0?Cl.left:-1,Cl.vertical||-1,US,GS,BL,pW,mW,vW,gW,yW,_W,bW,xW,qi,OL,zL,Tl,yv,$L,0,ii,Xo,SW,TW)}(h,Nt,Ze,f,g,x,kt,h.layers[0],h.collisionBoxArray,l.index,l.sourceLayerIndex,h.index,de,[De,De,De,De],yt,O,Re,je,Ht,J,l,T,F,V,A)};if(bt==="line")for(const Ze of bL(l.geometry,0,0,Gn,Gn)){const Nt=oW(Ze,Ce,Je,f.vertical||re,g,24,we,h.overscaling,Gn);for(const zt of Nt)re&&fW(h,re.text,gt,zt)||Mt(Ze,zt)}else if(bt==="line-center"){for(const Ze of l.geometry)if(Ze.length>1){const Nt=aW(Ze,Je,f.vertical||re,g,24,we);Nt&&Mt(Ze,Nt)}}else if(l.type==="Polygon")for(const Ze of Ef(l.geometry,0)){const Nt=uW(Ze,16);Mt(Ze[0],new _u(Nt.x,Nt.y,0))}else if(l.type==="LineString")for(const Ze of l.geometry)Mt(Ze,new _u(Ze[0].x,Ze[0].y,0));else if(l.type==="Point")for(const Ze of l.geometry)for(const Nt of Ze)Mt([Nt],new _u(Nt.x,Nt.y,0))}function ML(h,l,f,g,x,T,A,D,O,F,V,U,X,J,re){const se=function(Re,Ce,De,je,Je,yt,Ht,bt){const gt=je.layout.get("text-rotate").evaluate(yt,{})*Math.PI/180,Bt=[];for(const kt of Ce.positionedLines)for(const Mt of kt.positionedGlyphs){if(!Mt.rect)continue;const Ze=Mt.rect||{};let Nt=WD+1,zt=!0,er=1,nn=0;const Jr=(Je||bt)&&Mt.vertical,ni=Mt.metrics.advance*Mt.scale/2;if(bt&&Ce.verticalizable&&(nn=kt.lineOffset/2-(Mt.imageName?-(Qn-Mt.metrics.width*Mt.scale)/2:(Mt.scale-1)*Qn)),Mt.imageName){const zr=Ht[Mt.imageName];zt=zr.sdf,er=zr.pixelRatio,Nt=ha/er}const vo=Je?[Mt.x+ni,Mt.y]:[0,0];let wi=Je?[0,0]:[Mt.x+ni+De[0],Mt.y+De[1]-nn],On=[0,0];Jr&&(On=wi,wi=[0,0]);const Wi=Mt.metrics.isDoubleResolution?2:1,qi=(Mt.metrics.left-Nt)*Mt.scale-ni+wi[0],Zi=(-Mt.metrics.top-Nt)*Mt.scale+wi[1],zn=qi+Ze.w/Wi*Mt.scale/er,ii=Zi+Ze.h/Wi*Mt.scale/er,Li=new v(qi,Zi),Si=new v(zn,Zi),Xi=new v(qi,ii),Ti=new v(zn,ii);if(Jr){const zr=new v(-ni,ni-fv),hn=-Math.PI/2,_n=Qn/2-ni,Ca=new v(5-fv-_n,-(Mt.imageName?_n:0)),Dn=new v(...On);Li._rotateAround(hn,zr)._add(Ca)._add(Dn),Si._rotateAround(hn,zr)._add(Ca)._add(Dn),Xi._rotateAround(hn,zr)._add(Ca)._add(Dn),Ti._rotateAround(hn,zr)._add(Ca)._add(Dn)}if(gt){const zr=Math.sin(gt),hn=Math.cos(gt),_n=[hn,-zr,zr,hn];Li._matMult(_n),Si._matMult(_n),Xi._matMult(_n),Ti._matMult(_n)}const qa=new v(0,0),fa=new v(0,0);Bt.push({tl:Li,tr:Si,bl:Xi,br:Ti,tex:Ze,writingMode:Ce.writingMode,glyphOffset:vo,sectionIndex:Mt.sectionIndex,isSDF:zt,pixelOffsetTL:qa,pixelOffsetBR:fa,minFontScaleX:0,minFontScaleY:0})}return Bt}(0,f,D,x,T,A,g,h.allowVerticalPlacement),de=h.textSizeData;let we=null;de.kind==="source"?(we=[Es*x.layout.get("text-size").evaluate(A,{})],we[0]>gu&&ce(`${h.layerIds[0]}: Value for "text-size" is >= ${pv}. Reduce your "text-size".`)):de.kind==="composite"&&(we=[Es*J.compositeTextSizes[0].evaluate(A,{},re),Es*J.compositeTextSizes[1].evaluate(A,{},re)],(we[0]>gu||we[1]>gu)&&ce(`${h.layerIds[0]}: Value for "text-size" is >= ${pv}. Reduce your "text-size".`)),h.addSymbols(h.text,se,we,D,T,A,F,l,O.lineStartIndex,O.lineLength,X,re);for(const Re of V)U[Re]=h.text.placedSymbolArray.length-1;return 4*se.length}function DL(h){for(const l in h)return h[l];return null}function fW(h,l,f,g){const x=h.compareText;if(l in x){const T=x[l];for(let A=T.length-1;A>=0;A--)if(g.dist(T[A])>4;if(x!==1)throw new Error(`Got v${x} data when expected v1.`);const T=LL[15&g];if(!T)throw new Error("Unrecognized array type.");const[A]=new Uint16Array(l,2,1),[D]=new Uint32Array(l,4,1);return new BS(D,A,T,l)}constructor(l,f=64,g=Float64Array,x){if(isNaN(l)||l<0)throw new Error(`Unpexpected numItems value: ${l}.`);this.numItems=+l,this.nodeSize=Math.min(Math.max(+f,2),65535),this.ArrayType=g,this.IndexArrayType=l<65536?Uint16Array:Uint32Array;const T=LL.indexOf(this.ArrayType),A=2*l*this.ArrayType.BYTES_PER_ELEMENT,D=l*this.IndexArrayType.BYTES_PER_ELEMENT,O=(8-D%8)%8;if(T<0)throw new Error(`Unexpected typed array class: ${g}.`);x&&x instanceof ArrayBuffer?(this.data=x,this.ids=new this.IndexArrayType(this.data,8,l),this.coords=new this.ArrayType(this.data,8+D+O,2*l),this._pos=2*l,this._finished=!0):(this.data=new ArrayBuffer(8+A+D+O),this.ids=new this.IndexArrayType(this.data,8,l),this.coords=new this.ArrayType(this.data,8+D+O,2*l),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,16+T]),new Uint16Array(this.data,2,1)[0]=f,new Uint32Array(this.data,4,1)[0]=l)}add(l,f){const g=this._pos>>1;return this.ids[g]=g,this.coords[this._pos++]=l,this.coords[this._pos++]=f,g}finish(){const l=this._pos>>1;if(l!==this.numItems)throw new Error(`Added ${l} items when expected ${this.numItems}.`);return FS(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(l,f,g,x){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:T,coords:A,nodeSize:D}=this,O=[0,T.length-1,0],F=[];for(;O.length;){const V=O.pop()||0,U=O.pop()||0,X=O.pop()||0;if(U-X<=D){for(let de=X;de<=U;de++){const we=A[2*de],Re=A[2*de+1];we>=l&&we<=g&&Re>=f&&Re<=x&&F.push(T[de])}continue}const J=X+U>>1,re=A[2*J],se=A[2*J+1];re>=l&&re<=g&&se>=f&&se<=x&&F.push(T[J]),(V===0?l<=re:f<=se)&&(O.push(X),O.push(J-1),O.push(1-V)),(V===0?g>=re:x>=se)&&(O.push(J+1),O.push(U),O.push(1-V))}return F}within(l,f,g){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:x,coords:T,nodeSize:A}=this,D=[0,x.length-1,0],O=[],F=g*g;for(;D.length;){const V=D.pop()||0,U=D.pop()||0,X=D.pop()||0;if(U-X<=A){for(let de=X;de<=U;de++)RL(T[2*de],T[2*de+1],l,f)<=F&&O.push(x[de]);continue}const J=X+U>>1,re=T[2*J],se=T[2*J+1];RL(re,se,l,f)<=F&&O.push(x[J]),(V===0?l-g<=re:f-g<=se)&&(D.push(X),D.push(J-1),D.push(1-V)),(V===0?l+g>=re:f+g>=se)&&(D.push(J+1),D.push(U),D.push(1-V))}return O}}function FS(h,l,f,g,x,T){if(x-g<=f)return;const A=g+x>>1;kL(h,l,A,g,x,T),FS(h,l,f,g,A-1,1-T),FS(h,l,f,A+1,x,1-T)}function kL(h,l,f,g,x,T){for(;x>g;){if(x-g>600){const F=x-g+1,V=f-g+1,U=Math.log(F),X=.5*Math.exp(2*U/3),J=.5*Math.sqrt(U*X*(F-X)/F)*(V-F/2<0?-1:1);kL(h,l,f,Math.max(g,Math.floor(f-V*X/F+J)),Math.min(x,Math.floor(f+(F-V)*X/F+J)),T)}const A=l[2*f+T];let D=g,O=x;for(vv(h,l,g,f),l[2*x+T]>A&&vv(h,l,g,x);DA;)O--}l[2*g+T]===A?vv(h,l,g,O):(O++,vv(h,l,O,x)),O<=f&&(g=O+1),f<=O&&(x=O-1)}}function vv(h,l,f,g){$S(h,f,g),$S(l,2*f,2*g),$S(l,2*f+1,2*g+1)}function $S(h,l,f){const g=h[l];h[l]=h[f],h[f]=g}function RL(h,l,f,g){const x=h-f,T=l-g;return x*x+T*T}var NS;o.bf=void 0,(NS=o.bf||(o.bf={})).create="create",NS.load="load",NS.fullLoad="fullLoad";let i0=null,gv=[];const VS=1e3/60,jS="loadTime",HS="fullLoadTime",dW={mark(h){performance.mark(h)},frame(h){const l=h;i0!=null&&gv.push(l-i0),i0=l},clearMetrics(){i0=null,gv=[],performance.clearMeasures(jS),performance.clearMeasures(HS);for(const h in o.bf)performance.clearMarks(o.bf[h])},getPerformanceMetrics(){performance.measure(jS,o.bf.create,o.bf.load),performance.measure(HS,o.bf.create,o.bf.fullLoad);const h=performance.getEntriesByName(jS)[0].duration,l=performance.getEntriesByName(HS)[0].duration,f=gv.length,g=1/(gv.reduce((T,A)=>T+A,0)/f/1e3),x=gv.filter(T=>T>VS).reduce((T,A)=>T+(A-VS)/VS,0);return{loadTime:h,fullLoadTime:l,fps:g,percentDroppedFrames:x/(f+x)*100,totalFrames:f}}};o.$=class extends ae{},o.A=td,o.B=Um,o.C=function(h){if(_e==null){const l=h.navigator?h.navigator.userAgent:null;_e=!!h.safari||!(!l||!(/\b(iPad|iPhone|iPod)\b/.test(l)||l.match("Safari")&&!l.match("Chrome")))}return _e},o.D=$t,o.E=Fe,o.F=class{constructor(h,l){this.target=h,this.mapId=l,this.resolveRejects={},this.tasks={},this.taskQueue=[],this.abortControllers={},this.messageHandlers={},this.invoker=new nW(()=>this.process()),this.subscription=function(f,g,x,T){return f.addEventListener(g,x,!1),{unsubscribe:()=>{f.removeEventListener(g,x,!1)}}}(this.target,"message",f=>this.receive(f)),this.globalScope=ue(self)?h:window}registerMessageHandler(h,l){this.messageHandlers[h]=l}sendAsync(h,l){return new Promise((f,g)=>{const x=Math.round(1e18*Math.random()).toString(36).substring(0,10);this.resolveRejects[x]={resolve:f,reject:g},l&&l.signal.addEventListener("abort",()=>{delete this.resolveRejects[x];const D={id:x,type:"",origin:location.origin,targetMapId:h.targetMapId,sourceMapId:this.mapId};this.target.postMessage(D)},{once:!0});const T=[],A=Object.assign(Object.assign({},h),{id:x,sourceMapId:this.mapId,origin:location.origin,data:Vc(h.data,T)});this.target.postMessage(A,{transfer:T})})}receive(h){const l=h.data,f=l.id;if(!(l.origin!=="file://"&&location.origin!=="file://"&&l.origin!==location.origin||l.targetMapId&&this.mapId!==l.targetMapId)){if(l.type===""){delete this.tasks[f];const g=this.abortControllers[f];return delete this.abortControllers[f],void(g&&g.abort())}if(ue(self)||l.mustQueue)return this.tasks[f]=l,this.taskQueue.push(f),void this.invoker.trigger();this.processTask(f,l)}}process(){if(this.taskQueue.length===0)return;const h=this.taskQueue.shift(),l=this.tasks[h];delete this.tasks[h],this.taskQueue.length>0&&this.invoker.trigger(),l&&this.processTask(h,l)}processTask(h,l){return s(this,void 0,void 0,function*(){if(l.type===""){const x=this.resolveRejects[h];return delete this.resolveRejects[h],x?void(l.error?x.reject(po(l.error)):x.resolve(po(l.data))):void 0}if(!this.messageHandlers[l.type])return void this.completeTask(h,new Error(`Could not find a registered handler for ${l.type}, map ID: ${this.mapId}, available handlers: ${Object.keys(this.messageHandlers).join(", ")}`));const f=po(l.data),g=new AbortController;this.abortControllers[h]=g;try{const x=yield this.messageHandlers[l.type](l.sourceMapId,f,g);this.completeTask(h,null,x)}catch(x){this.completeTask(h,x)}})}completeTask(h,l,f){const g=[];delete this.abortControllers[h];const x={id:h,type:"",sourceMapId:this.mapId,origin:location.origin,error:l?Vc(l):null,data:Vc(f,g)};this.target.postMessage(x,{transfer:g})}remove(){this.invoker.remove(),this.subscription.unsubscribe()}},o.G=ir,o.H=function(){var h=new td(16);return td!=Float32Array&&(h[1]=0,h[2]=0,h[3]=0,h[4]=0,h[6]=0,h[7]=0,h[8]=0,h[9]=0,h[11]=0,h[12]=0,h[13]=0,h[14]=0),h[0]=1,h[5]=1,h[10]=1,h[15]=1,h},o.I=TS,o.J=function(h,l,f){var g,x,T,A,D,O,F,V,U,X,J,re,se=f[0],de=f[1],we=f[2];return l===h?(h[12]=l[0]*se+l[4]*de+l[8]*we+l[12],h[13]=l[1]*se+l[5]*de+l[9]*we+l[13],h[14]=l[2]*se+l[6]*de+l[10]*we+l[14],h[15]=l[3]*se+l[7]*de+l[11]*we+l[15]):(x=l[1],T=l[2],A=l[3],D=l[4],O=l[5],F=l[6],V=l[7],U=l[8],X=l[9],J=l[10],re=l[11],h[0]=g=l[0],h[1]=x,h[2]=T,h[3]=A,h[4]=D,h[5]=O,h[6]=F,h[7]=V,h[8]=U,h[9]=X,h[10]=J,h[11]=re,h[12]=g*se+D*de+U*we+l[12],h[13]=x*se+O*de+X*we+l[13],h[14]=T*se+F*de+J*we+l[14],h[15]=A*se+V*de+re*we+l[15]),h},o.K=function(h,l,f){var g=f[0],x=f[1],T=f[2];return h[0]=l[0]*g,h[1]=l[1]*g,h[2]=l[2]*g,h[3]=l[3]*g,h[4]=l[4]*x,h[5]=l[5]*x,h[6]=l[6]*x,h[7]=l[7]*x,h[8]=l[8]*T,h[9]=l[9]*T,h[10]=l[10]*T,h[11]=l[11]*T,h[12]=l[12],h[13]=l[13],h[14]=l[14],h[15]=l[15],h},o.L=pD,o.M=function(h,l){const f={};for(let g=0;g{const l=window.document.createElement("video");return l.muted=!0,new Promise(f=>{l.onloadstart=()=>{f(l)};for(const g of h){const x=window.document.createElement("source");ft(g)||(l.crossOrigin="Anonymous"),x.src=g,l.appendChild(x)}})},o.a4=function(){return Z++},o.a5=pr,o.a6=sd,o.a7=Mi,o.a8=Wc,o.a9=cn,o.aA=function(h){h=h.slice();const l=Object.create(null);for(let f=0;f{"source"in A&&g[A.source]?f.push({command:"removeLayer",args:[A.id]}):T.push(A)}),f=f.concat(x),function(A,D,O){D=D||[];const F=(A=A||[]).map(ar),V=D.map(ar),U=A.reduce(vr,{}),X=D.reduce(vr,{}),J=F.slice(),re=Object.create(null);let se,de,we,Re,Ce;for(let De=0,je=0;De@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,(f,g,x,T)=>{const A=x||T;return l[g]=!A||A.toLowerCase(),""}),l["max-age"]){const f=parseInt(l["max-age"],10);isNaN(f)?delete l["max-age"]:l["max-age"]=f}return l},o.ac=function(h,l){const f=[];for(const g in h)g in l||f.push(g);return f},o.ad=G,o.ae=function(h,l,f){var g=Math.sin(f),x=Math.cos(f),T=l[0],A=l[1],D=l[2],O=l[3],F=l[4],V=l[5],U=l[6],X=l[7];return l!==h&&(h[8]=l[8],h[9]=l[9],h[10]=l[10],h[11]=l[11],h[12]=l[12],h[13]=l[13],h[14]=l[14],h[15]=l[15]),h[0]=T*x+F*g,h[1]=A*x+V*g,h[2]=D*x+U*g,h[3]=O*x+X*g,h[4]=F*x-T*g,h[5]=V*x-A*g,h[6]=U*x-D*g,h[7]=X*x-O*g,h},o.af=function(h){var l=new td(16);return l[0]=h[0],l[1]=h[1],l[2]=h[2],l[3]=h[3],l[4]=h[4],l[5]=h[5],l[6]=h[6],l[7]=h[7],l[8]=h[8],l[9]=h[9],l[10]=h[10],l[11]=h[11],l[12]=h[12],l[13]=h[13],l[14]=h[14],l[15]=h[15],l},o.ag=j_,o.ah=function(h,l){let f=0,g=0;if(h.kind==="constant")g=h.layoutSize;else if(h.kind!=="source"){const{interpolationType:x,minZoom:T,maxZoom:A}=h,D=x?G(ua.interpolationFactor(x,l,T,A),0,1):0;h.kind==="camera"?g=la.number(h.minSize,h.maxSize,D):f=D}return{uSizeT:f,uSize:g}},o.aj=function(h,{uSize:l,uSizeT:f},{lowerSize:g,upperSize:x}){return h.kind==="source"?g/Es:h.kind==="composite"?la.number(g/Es,x/Es,f):l},o.ak=IS,o.al=function(h,l,f,g){const x=l.y-h.y,T=l.x-h.x,A=g.y-f.y,D=g.x-f.x,O=A*T-D*x;if(O===0)return null;const F=(D*(h.y-f.y)-A*(h.x-f.x))/O;return new v(h.x+F*T,h.y+F*x)},o.am=bL,o.an=lD,o.ao=lS,o.ap=function(h){let l=1/0,f=1/0,g=-1/0,x=-1/0;for(const T of h)l=Math.min(l,T.x),f=Math.min(f,T.y),g=Math.max(g,T.x),x=Math.max(x,T.y);return[l,f,g,x]},o.aq=Qn,o.as=AS,o.at=function(h,l){var f=l[0],g=l[1],x=l[2],T=l[3],A=l[4],D=l[5],O=l[6],F=l[7],V=l[8],U=l[9],X=l[10],J=l[11],re=l[12],se=l[13],de=l[14],we=l[15],Re=f*D-g*A,Ce=f*O-x*A,De=f*F-T*A,je=g*O-x*D,Je=g*F-T*D,yt=x*F-T*O,Ht=V*se-U*re,bt=V*de-X*re,gt=V*we-J*re,Bt=U*de-X*se,kt=U*we-J*se,Mt=X*we-J*de,Ze=Re*Mt-Ce*kt+De*Bt+je*gt-Je*bt+yt*Ht;return Ze?(h[0]=(D*Mt-O*kt+F*Bt)*(Ze=1/Ze),h[1]=(x*kt-g*Mt-T*Bt)*Ze,h[2]=(se*yt-de*Je+we*je)*Ze,h[3]=(X*Je-U*yt-J*je)*Ze,h[4]=(O*gt-A*Mt-F*bt)*Ze,h[5]=(f*Mt-x*gt+T*bt)*Ze,h[6]=(de*De-re*yt-we*Ce)*Ze,h[7]=(V*yt-X*De+J*Ce)*Ze,h[8]=(A*kt-D*gt+F*Ht)*Ze,h[9]=(g*gt-f*kt-T*Ht)*Ze,h[10]=(re*Je-se*De+we*Re)*Ze,h[11]=(U*De-V*Je-J*Re)*Ze,h[12]=(D*bt-A*Bt-O*Ht)*Ze,h[13]=(f*Bt-g*bt+x*Ht)*Ze,h[14]=(se*Ce-re*je-de*Re)*Ze,h[15]=(V*je-U*Ce+X*Re)*Ze,h):null},o.au=zS,o.av=PS,o.aw=BS,o.ax=function(){const h={},l=ye.$version;for(const f in ye.$root){const g=ye.$root[f];if(g.required){let x=null;x=f==="version"?l:g.type==="array"?[]:{},x!=null&&(h[f]=x)}}return h},o.ay=M_,o.az=st,o.b=He,o.b0=function(h,l){return h[0]=l[0],h[1]=l[1],h[2]=l[2],h[3]=l[3],h[4]=l[4],h[5]=l[5],h[6]=l[6],h[7]=l[7],h[8]=l[8],h[9]=l[9],h[10]=l[10],h[11]=l[11],h[12]=l[12],h[13]=l[13],h[14]=l[14],h[15]=l[15],h},o.b1=function(h,l,f){return h[0]=l[0]*f[0],h[1]=l[1]*f[1],h[2]=l[2]*f[2],h[3]=l[3]*f[3],h},o.b2=function(h,l){return h[0]*l[0]+h[1]*l[1]+h[2]*l[2]+h[3]*l[3]},o.b3=j,o.b4=dL,o.b5=hL,o.b6=function(h,l,f,g,x){var T,A=1/Math.tan(l/2);return h[0]=A/f,h[1]=0,h[2]=0,h[3]=0,h[4]=0,h[5]=A,h[6]=0,h[7]=0,h[8]=0,h[9]=0,h[11]=-1,h[12]=0,h[13]=0,h[15]=0,x!=null&&x!==1/0?(h[10]=(x+g)*(T=1/(g-x)),h[14]=2*x*g*T):(h[10]=-1,h[14]=-2*g),h},o.b7=function(h,l,f){var g=Math.sin(f),x=Math.cos(f),T=l[4],A=l[5],D=l[6],O=l[7],F=l[8],V=l[9],U=l[10],X=l[11];return l!==h&&(h[0]=l[0],h[1]=l[1],h[2]=l[2],h[3]=l[3],h[12]=l[12],h[13]=l[13],h[14]=l[14],h[15]=l[15]),h[4]=T*x+F*g,h[5]=A*x+V*g,h[6]=D*x+U*g,h[7]=O*x+X*g,h[8]=F*x-T*g,h[9]=V*x-A*g,h[10]=U*x-D*g,h[11]=X*x-O*g,h},o.b8=R,o.b9=$,o.bA=function(h){return h.message===Vt},o.bB=gl,o.bC=Ps,o.ba=function(h){return h*Math.PI/180},o.bb=function(h,l){return h[0]=l[0],h[1]=0,h[2]=0,h[3]=0,h[4]=0,h[5]=l[1],h[6]=0,h[7]=0,h[8]=0,h[9]=0,h[10]=l[2],h[11]=0,h[12]=0,h[13]=0,h[14]=0,h[15]=1,h},o.bc=class extends te{},o.bd=LS,o.be=dW,o.bg=Ge,o.bh=function(h,l){ur.REGISTERED_PROTOCOLS[h]=l},o.bi=function(h){delete ur.REGISTERED_PROTOCOLS[h]},o.bj=function(h,l){const f={};for(let x=0;xMt*Qn)}let bt=A?"center":f.get("text-justify").evaluate(F,{},h.canonical);const gt=f.get("symbol-placement")==="point"?f.get("text-max-width").evaluate(F,{},h.canonical)*Qn:1/0,Bt=()=>{h.bucket.allowVerticalPlacement&&qm(De)&&(re.vertical=X_(se,h.glyphMap,h.glyphPositions,h.imagePositions,V,gt,T,yt,"left",Je,we,o.ai.vertical,!0,X,U))};if(!A&&Ht){const kt=new Set;if(bt==="auto")for(let Ze=0;Zes(void 0,void 0,void 0,function*(){if(h.byteLength===0)return createImageBitmap(new ImageData(1,1));const l=new Blob([new Uint8Array(h)],{type:"image/png"});try{return createImageBitmap(l)}catch(f){throw new Error(`Could not load image because of ${f.message}. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported.`)}}),o.e=H,o.f=h=>new Promise((l,f)=>{const g=new Image;g.onload=()=>{l(g),URL.revokeObjectURL(g.src),g.onload=null,window.requestAnimationFrame(()=>{g.src=$e})},g.onerror=()=>f(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."));const x=new Blob([new Uint8Array(h)],{type:"image/png"});g.src=h.byteLength?URL.createObjectURL(x):$e}),o.g=yr,o.h=(h,l)=>tt(H(h,{type:"json"}),l),o.i=ue,o.j=ge,o.k=fe,o.l=(h,l)=>tt(H(h,{type:"arrayBuffer"}),l),o.m=tt,o.n=function(h){return new wS(h).readFields(VG,[])},o.o=av,o.p=qD,o.q=b,o.r=Jw,o.s=ft,o.t=Gm,o.u=wt,o.v=ye,o.w=ce,o.x=qo,o.y=function([h,l,f]){return l+=90,l*=Math.PI/180,f*=Math.PI/180,{x:h*Math.cos(l)*Math.sin(f),y:h*Math.sin(l)*Math.sin(f),z:h*Math.cos(f)}},o.z=la}),i("worker",["./shared"],function(o){class s{constructor(Y){this.keyCache={},Y&&this.replace(Y)}replace(Y){this._layerConfigs={},this._layers={},this.update(Y,[])}update(Y,K){for(const me of Y){this._layerConfigs[me.id]=me;const Ie=this._layers[me.id]=o.aB(me);Ie._featureFilter=o.a7(Ie.filter),this.keyCache[me.id]&&delete this.keyCache[me.id]}for(const me of K)delete this.keyCache[me],delete this._layerConfigs[me],delete this._layers[me];this.familiesBySource={};const oe=o.bj(Object.values(this._layerConfigs),this.keyCache);for(const me of oe){const Ie=me.map(Ve=>this._layers[Ve.id]),Ee=Ie[0];if(Ee.visibility==="none")continue;const Oe=Ee.source||"";let Se=this.familiesBySource[Oe];Se||(Se=this.familiesBySource[Oe]={});const Ue=Ee.sourceLayer||"_geojsonTileLayer";let Ye=Se[Ue];Ye||(Ye=Se[Ue]=[]),Ye.push(Ie)}}}class c{constructor(Y){const K={},oe=[];for(const Oe in Y){const Se=Y[Oe],Ue=K[Oe]={};for(const Ye in Se){const Ve=Se[+Ye];if(!Ve||Ve.bitmap.width===0||Ve.bitmap.height===0)continue;const ht={x:0,y:0,w:Ve.bitmap.width+2,h:Ve.bitmap.height+2};oe.push(ht),Ue[Ye]={rect:ht,metrics:Ve.metrics}}}const{w:me,h:Ie}=o.p(oe),Ee=new o.o({width:me||1,height:Ie||1});for(const Oe in Y){const Se=Y[Oe];for(const Ue in Se){const Ye=Se[+Ue];if(!Ye||Ye.bitmap.width===0||Ye.bitmap.height===0)continue;const Ve=K[Oe][Ue].rect;o.o.copy(Ye.bitmap,Ee,{x:0,y:0},{x:Ve.x+1,y:Ve.y+1},Ye.bitmap)}}this.image=Ee,this.positions=K}}o.bk("GlyphAtlas",c);class d{constructor(Y){this.tileID=new o.S(Y.tileID.overscaledZ,Y.tileID.wrap,Y.tileID.canonical.z,Y.tileID.canonical.x,Y.tileID.canonical.y),this.uid=Y.uid,this.zoom=Y.zoom,this.pixelRatio=Y.pixelRatio,this.tileSize=Y.tileSize,this.source=Y.source,this.overscaling=this.tileID.overscaleFactor(),this.showCollisionBoxes=Y.showCollisionBoxes,this.collectResourceTiming=!!Y.collectResourceTiming,this.returnDependencies=!!Y.returnDependencies,this.promoteId=Y.promoteId,this.inFlightDependencies=[]}parse(Y,K,oe,me){return o._(this,void 0,void 0,function*(){this.status="parsing",this.data=Y,this.collisionBoxArray=new o.a5;const Ie=new o.bl(Object.keys(Y.layers).sort()),Ee=new o.bm(this.tileID,this.promoteId);Ee.bucketLayerIDs=[];const Oe={},Se={featureIndex:Ee,iconDependencies:{},patternDependencies:{},glyphDependencies:{},availableImages:oe},Ue=K.familiesBySource[this.source];for(const Tr in Ue){const Wr=Y.layers[Tr];if(!Wr)continue;Wr.version===1&&o.w(`Vector tile source "${this.source}" layer "${Tr}" does not use vector tile spec v2 and therefore may have some rendering errors.`);const xn=Ie.encode(Tr),Yn=[];for(let di=0;di=pi.maxzoom||pi.visibility!=="none"&&(m(di,this.zoom,oe),(Oe[pi.id]=pi.createBucket({index:Ee.bucketLayerIDs.length,layers:di,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:xn,sourceID:this.source})).populate(Yn,Se,this.tileID.canonical),Ee.bucketLayerIDs.push(di.map(bc=>bc.id)))}}const Ye=o.aG(Se.glyphDependencies,Tr=>Object.keys(Tr).map(Number));this.inFlightDependencies.forEach(Tr=>Tr==null?void 0:Tr.abort()),this.inFlightDependencies=[];let Ve=Promise.resolve({});if(Object.keys(Ye).length){const Tr=new AbortController;this.inFlightDependencies.push(Tr),Ve=me.sendAsync({type:"GG",data:{stacks:Ye,source:this.source,tileID:this.tileID,type:"glyphs"}},Tr)}const ht=Object.keys(Se.iconDependencies);let jt=Promise.resolve({});if(ht.length){const Tr=new AbortController;this.inFlightDependencies.push(Tr),jt=me.sendAsync({type:"GI",data:{icons:ht,source:this.source,tileID:this.tileID,type:"icons"}},Tr)}const qt=Object.keys(Se.patternDependencies);let hr=Promise.resolve({});if(qt.length){const Tr=new AbortController;this.inFlightDependencies.push(Tr),hr=me.sendAsync({type:"GI",data:{icons:qt,source:this.source,tileID:this.tileID,type:"patterns"}},Tr)}const[Rr,cr,ln]=yield Promise.all([Ve,jt,hr]),Mn=new c(Rr),Hn=new o.bn(cr,ln);for(const Tr in Oe){const Wr=Oe[Tr];Wr instanceof o.a6?(m(Wr.layers,this.zoom,oe),o.bo({bucket:Wr,glyphMap:Rr,glyphPositions:Mn.positions,imageMap:cr,imagePositions:Hn.iconPositions,showCollisionBoxes:this.showCollisionBoxes,canonical:this.tileID.canonical})):Wr.hasPattern&&(Wr instanceof o.bp||Wr instanceof o.bq||Wr instanceof o.br)&&(m(Wr.layers,this.zoom,oe),Wr.addFeatures(Se,this.tileID.canonical,Hn.patternPositions))}return this.status="done",{buckets:Object.values(Oe).filter(Tr=>!Tr.isEmpty()),featureIndex:Ee,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:Mn.image,imageAtlas:Hn,glyphMap:this.returnDependencies?Rr:null,iconMap:this.returnDependencies?cr:null,glyphPositions:this.returnDependencies?Mn.positions:null}})}}function m(be,Y,K){const oe=new o.a9(Y);for(const me of be)me.recalculate(oe,K)}class v{constructor(Y,K,oe){this.actor=Y,this.layerIndex=K,this.availableImages=oe,this.fetching={},this.loading={},this.loaded={}}loadVectorTile(Y,K){return o._(this,void 0,void 0,function*(){const oe=yield o.l(Y.request,K);try{return{vectorTile:new o.bs.VectorTile(new o.bt(oe.data)),rawData:oe.data,cacheControl:oe.cacheControl,expires:oe.expires}}catch(me){const Ie=new Uint8Array(oe.data);let Ee=`Unable to parse the tile at ${Y.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: ${me.message}`,new Error(Ee)}})}loadTile(Y){return o._(this,void 0,void 0,function*(){const K=Y.uid,oe=!!(Y&&Y.request&&Y.request.collectResourceTiming)&&new o.bu(Y.request),me=new d(Y);this.loading[K]=me;const Ie=new AbortController;me.abort=Ie;try{const Ee=yield this.loadVectorTile(Y,Ie);if(delete this.loading[K],!Ee)return null;const Oe=Ee.rawData,Se={};Ee.expires&&(Se.expires=Ee.expires),Ee.cacheControl&&(Se.cacheControl=Ee.cacheControl);const Ue={};if(oe){const Ve=oe.finish();Ve&&(Ue.resourceTiming=JSON.parse(JSON.stringify(Ve)))}me.vectorTile=Ee.vectorTile;const Ye=me.parse(Ee.vectorTile,this.layerIndex,this.availableImages,this.actor);this.loaded[K]=me,this.fetching[K]={rawTileData:Oe,cacheControl:Se,resourceTiming:Ue};try{const Ve=yield Ye;return o.e({rawTileData:Oe.slice(0)},Ve,Se,Ue)}finally{delete this.fetching[K]}}catch(Ee){throw delete this.loading[K],me.status="done",this.loaded[K]=me,Ee}})}reloadTile(Y){return o._(this,void 0,void 0,function*(){const K=Y.uid;if(!this.loaded||!this.loaded[K])throw new Error("Should not be trying to reload a tile that was never loaded or has been removed");const oe=this.loaded[K];if(oe.showCollisionBoxes=Y.showCollisionBoxes,oe.status==="parsing"){const me=yield oe.parse(oe.vectorTile,this.layerIndex,this.availableImages,this.actor);let Ie;if(this.fetching[K]){const{rawTileData:Ee,cacheControl:Oe,resourceTiming:Se}=this.fetching[K];delete this.fetching[K],Ie=o.e({rawTileData:Ee.slice(0)},me,Oe,Se)}else Ie=me;return Ie}if(oe.status==="done"&&oe.vectorTile)return oe.parse(oe.vectorTile,this.layerIndex,this.availableImages,this.actor)})}abortTile(Y){return o._(this,void 0,void 0,function*(){const K=this.loading,oe=Y.uid;K&&K[oe]&&K[oe].abort&&(K[oe].abort.abort(),delete K[oe])})}removeTile(Y){return o._(this,void 0,void 0,function*(){this.loaded&&this.loaded[Y.uid]&&delete this.loaded[Y.uid]})}}class y{constructor(){this.loaded={}}loadTile(Y){return o._(this,void 0,void 0,function*(){const{uid:K,encoding:oe,rawImageData:me,redFactor:Ie,greenFactor:Ee,blueFactor:Oe,baseShift:Se}=Y,Ue=me.width+2,Ye=me.height+2,Ve=o.b(me)?new o.R({width:Ue,height:Ye},yield o.bv(me,-1,-1,Ue,Ye)):me,ht=new o.bw(K,Ve,oe,Ie,Ee,Oe,Se);return this.loaded=this.loaded||{},this.loaded[K]=ht,ht})}removeTile(Y){const K=this.loaded,oe=Y.uid;K&&K[oe]&&delete K[oe]}}function _(be,Y){if(be.length!==0){S(be[0],Y);for(var K=1;K