jmapcloud-jakartowns 2.1.0 → 2.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,154 @@
1
+ !function(){var u,Xe,Wt={5655:function(u,Xe,Wt){"use strict";Wt.d(Xe,{A:function(){return ns}});var fr=function(){function StyleSheet(u){var Xe=this;this._insertTag=function(u){var Wt;Wt=0===Xe.tags.length?Xe.insertionPoint?Xe.insertionPoint.nextSibling:Xe.prepend?Xe.container.firstChild:Xe.before:Xe.tags[Xe.tags.length-1].nextSibling,Xe.container.insertBefore(u,Wt),Xe.tags.push(u)},this.isSpeedy=void 0===u.speedy||u.speedy,this.tags=[],this.ctr=0,this.nonce=u.nonce,this.key=u.key,this.container=u.container,this.prepend=u.prepend,this.insertionPoint=u.insertionPoint,this.before=null}var u=StyleSheet.prototype;return u.hydrate=function hydrate(u){u.forEach(this._insertTag)},u.insert=function insert(u){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(function createStyleElement(u){var Xe=document.createElement("style");return Xe.setAttribute("data-emotion",u.key),void 0!==u.nonce&&Xe.setAttribute("nonce",u.nonce),Xe.appendChild(document.createTextNode("")),Xe.setAttribute("data-s",""),Xe}(this));var Xe=this.tags[this.tags.length-1];if(this.isSpeedy){var Wt=function sheetForTag(u){if(u.sheet)return u.sheet;for(var Xe=0;Xe<document.styleSheets.length;Xe++)if(document.styleSheets[Xe].ownerNode===u)return document.styleSheets[Xe]}(Xe);try{Wt.insertRule(u,Wt.cssRules.length)}catch(u){}}else Xe.appendChild(document.createTextNode(u));this.ctr++},u.flush=function flush(){this.tags.forEach((function(u){var Xe;return null==(Xe=u.parentNode)?void 0:Xe.removeChild(u)})),this.tags=[],this.ctr=0},StyleSheet}(),_r=Math.abs,wr=String.fromCharCode,Ar=Object.assign;function trim(u){return u.trim()}function Utility_replace(u,Xe,Wt){return u.replace(Xe,Wt)}function indexof(u,Xe){return u.indexOf(Xe)}function Utility_charat(u,Xe){return 0|u.charCodeAt(Xe)}function Utility_substr(u,Xe,Wt){return u.slice(Xe,Wt)}function Utility_strlen(u){return u.length}function Utility_sizeof(u){return u.length}function Utility_append(u,Xe){return Xe.push(u),u}var Kr=1,In=1,no=0,io=0,oo=0,ao="";function node(u,Xe,Wt,fr,_r,wr,Ar){return{value:u,root:Xe,parent:Wt,type:fr,props:_r,children:wr,line:Kr,column:In,length:Ar,return:""}}function Tokenizer_copy(u,Xe){return Ar(node("",null,null,"",null,null,0),u,{length:-u.length},Xe)}function prev(){return oo=io>0?Utility_charat(ao,--io):0,In--,10===oo&&(In=1,Kr--),oo}function next(){return oo=io<no?Utility_charat(ao,io++):0,In++,10===oo&&(In=1,Kr++),oo}function peek(){return Utility_charat(ao,io)}function caret(){return io}function slice(u,Xe){return Utility_substr(ao,u,Xe)}function token(u){switch(u){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function alloc(u){return Kr=In=1,no=Utility_strlen(ao=u),io=0,[]}function dealloc(u){return ao="",u}function delimit(u){return trim(slice(io-1,delimiter(91===u?u+2:40===u?u+1:u)))}function whitespace(u){for(;(oo=peek())&&oo<33;)next();return token(u)>2||token(oo)>3?"":" "}function escaping(u,Xe){for(;--Xe&&next()&&!(oo<48||oo>102||oo>57&&oo<65||oo>70&&oo<97););return slice(u,caret()+(Xe<6&&32==peek()&&32==next()))}function delimiter(u){for(;next();)switch(oo){case u:return io;case 34:case 39:34!==u&&39!==u&&delimiter(oo);break;case 40:41===u&&delimiter(u);break;case 92:next()}return io}function commenter(u,Xe){for(;next()&&u+oo!==57&&(u+oo!==84||47!==peek()););return"/*"+slice(Xe,io-1)+"*"+wr(47===u?u:next())}function identifier(u){for(;!token(peek());)next();return slice(u,io)}var so="-ms-",co="-moz-",ho="-webkit-",go="comm",xo="rule",ko="decl",Co="@keyframes";function Serializer_serialize(u,Xe){for(var Wt="",fr=Utility_sizeof(u),_r=0;_r<fr;_r++)Wt+=Xe(u[_r],_r,u,Xe)||"";return Wt}function stringify(u,Xe,Wt,fr){switch(u.type){case"@layer":if(u.children.length)break;case"@import":case ko:return u.return=u.return||u.value;case go:return"";case Co:return u.return=u.value+"{"+Serializer_serialize(u.children,fr)+"}";case xo:u.value=u.props.join(",")}return Utility_strlen(Wt=Serializer_serialize(u.children,fr))?u.return=u.value+"{"+Wt+"}":""}function compile(u){return dealloc(parse("",null,null,null,[""],u=alloc(u),0,[0],u))}function parse(u,Xe,Wt,fr,_r,Ar,Kr,In,no){for(var io=0,oo=0,ao=Kr,so=0,co=0,ho=0,go=1,xo=1,ko=1,Co=0,Io="",zo=_r,Bo=Ar,ca=fr,ua=Io;xo;)switch(ho=Co,Co=next()){case 40:if(108!=ho&&58==Utility_charat(ua,ao-1)){-1!=indexof(ua+=Utility_replace(delimit(Co),"&","&\f"),"&\f")&&(ko=-1);break}case 34:case 39:case 91:ua+=delimit(Co);break;case 9:case 10:case 13:case 32:ua+=whitespace(ho);break;case 92:ua+=escaping(caret()-1,7);continue;case 47:switch(peek()){case 42:case 47:Utility_append(comment(commenter(next(),caret()),Xe,Wt),no);break;default:ua+="/"}break;case 123*go:In[io++]=Utility_strlen(ua)*ko;case 125*go:case 59:case 0:switch(Co){case 0:case 125:xo=0;case 59+oo:-1==ko&&(ua=Utility_replace(ua,/\f/g,"")),co>0&&Utility_strlen(ua)-ao&&Utility_append(co>32?declaration(ua+";",fr,Wt,ao-1):declaration(Utility_replace(ua," ","")+";",fr,Wt,ao-2),no);break;case 59:ua+=";";default:if(Utility_append(ca=ruleset(ua,Xe,Wt,io,oo,_r,In,Io,zo=[],Bo=[],ao),Ar),123===Co)if(0===oo)parse(ua,Xe,ca,ca,zo,Ar,ao,In,Bo);else switch(99===so&&110===Utility_charat(ua,3)?100:so){case 100:case 108:case 109:case 115:parse(u,ca,ca,fr&&Utility_append(ruleset(u,ca,ca,0,0,_r,In,Io,_r,zo=[],ao),Bo),_r,Bo,ao,In,fr?zo:Bo);break;default:parse(ua,ca,ca,ca,[""],Bo,0,In,Bo)}}io=oo=co=0,go=ko=1,Io=ua="",ao=Kr;break;case 58:ao=1+Utility_strlen(ua),co=ho;default:if(go<1)if(123==Co)--go;else if(125==Co&&0==go++&&125==prev())continue;switch(ua+=wr(Co),Co*go){case 38:ko=oo>0?1:(ua+="\f",-1);break;case 44:In[io++]=(Utility_strlen(ua)-1)*ko,ko=1;break;case 64:45===peek()&&(ua+=delimit(next())),so=peek(),oo=ao=Utility_strlen(Io=ua+=identifier(caret())),Co++;break;case 45:45===ho&&2==Utility_strlen(ua)&&(go=0)}}return Ar}function ruleset(u,Xe,Wt,fr,wr,Ar,Kr,In,no,io,oo){for(var ao=wr-1,so=0===wr?Ar:[""],co=Utility_sizeof(so),ho=0,go=0,ko=0;ho<fr;++ho)for(var Co=0,Io=Utility_substr(u,ao+1,ao=_r(go=Kr[ho])),zo=u;Co<co;++Co)(zo=trim(go>0?so[Co]+" "+Io:Utility_replace(Io,/&\f/g,so[Co])))&&(no[ko++]=zo);return node(u,Xe,Wt,0===wr?xo:In,no,io,oo)}function comment(u,Xe,Wt){return node(u,Xe,Wt,go,wr(function Tokenizer_char(){return oo}()),Utility_substr(u,2,-2),0)}function declaration(u,Xe,Wt,fr){return node(u,Xe,Wt,ko,Utility_substr(u,0,fr),Utility_substr(u,fr+1,-1),fr)}var Io=function identifierWithPointTracking(u,Xe,Wt){for(var fr=0,_r=0;fr=_r,_r=peek(),38===fr&&12===_r&&(Xe[Wt]=1),!token(_r);)next();return slice(u,io)},zo=function getRules(u,Xe){return dealloc(function toRules(u,Xe){var Wt=-1,fr=44;do{switch(token(fr)){case 0:38===fr&&12===peek()&&(Xe[Wt]=1),u[Wt]+=Io(io-1,Xe,Wt);break;case 2:u[Wt]+=delimit(fr);break;case 4:if(44===fr){u[++Wt]=58===peek()?"&\f":"",Xe[Wt]=u[Wt].length;break}default:u[Wt]+=wr(fr)}}while(fr=next());return u}(alloc(u),Xe))},Bo=new WeakMap,ca=function compat(u){if("rule"===u.type&&u.parent&&!(u.length<1)){for(var Xe=u.value,Wt=u.parent,fr=u.column===Wt.column&&u.line===Wt.line;"rule"!==Wt.type;)if(!(Wt=Wt.parent))return;if((1!==u.props.length||58===Xe.charCodeAt(0)||Bo.get(Wt))&&!fr){Bo.set(u,!0);for(var _r=[],wr=zo(Xe,_r),Ar=Wt.props,Kr=0,In=0;Kr<wr.length;Kr++)for(var no=0;no<Ar.length;no++,In++)u.props[In]=_r[Kr]?wr[Kr].replace(/&\f/g,Ar[no]):Ar[no]+" "+wr[Kr]}}},ua=function removeLabel(u){if("decl"===u.type){var Xe=u.value;108===Xe.charCodeAt(0)&&98===Xe.charCodeAt(2)&&(u.return="",u.value="")}};function emotion_cache_browser_esm_prefix(u,Xe){switch(function hash(u,Xe){return 45^Utility_charat(u,0)?(((Xe<<2^Utility_charat(u,0))<<2^Utility_charat(u,1))<<2^Utility_charat(u,2))<<2^Utility_charat(u,3):0}(u,Xe)){case 5103:return ho+"print-"+u+u;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return ho+u+u;case 5349:case 4246:case 4810:case 6968:case 2756:return ho+u+co+u+so+u+u;case 6828:case 4268:return ho+u+so+u+u;case 6165:return ho+u+so+"flex-"+u+u;case 5187:return ho+u+Utility_replace(u,/(\w+).+(:[^]+)/,ho+"box-$1$2"+so+"flex-$1$2")+u;case 5443:return ho+u+so+"flex-item-"+Utility_replace(u,/flex-|-self/,"")+u;case 4675:return ho+u+so+"flex-line-pack"+Utility_replace(u,/align-content|flex-|-self/,"")+u;case 5548:return ho+u+so+Utility_replace(u,"shrink","negative")+u;case 5292:return ho+u+so+Utility_replace(u,"basis","preferred-size")+u;case 6060:return ho+"box-"+Utility_replace(u,"-grow","")+ho+u+so+Utility_replace(u,"grow","positive")+u;case 4554:return ho+Utility_replace(u,/([^-])(transform)/g,"$1"+ho+"$2")+u;case 6187:return Utility_replace(Utility_replace(Utility_replace(u,/(zoom-|grab)/,ho+"$1"),/(image-set)/,ho+"$1"),u,"")+u;case 5495:case 3959:return Utility_replace(u,/(image-set\([^]*)/,ho+"$1$`$1");case 4968:return Utility_replace(Utility_replace(u,/(.+:)(flex-)?(.*)/,ho+"box-pack:$3"+so+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+ho+u+u;case 4095:case 3583:case 4068:case 2532:return Utility_replace(u,/(.+)-inline(.+)/,ho+"$1$2")+u;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Utility_strlen(u)-1-Xe>6)switch(Utility_charat(u,Xe+1)){case 109:if(45!==Utility_charat(u,Xe+4))break;case 102:return Utility_replace(u,/(.+:)(.+)-([^]+)/,"$1"+ho+"$2-$3$1"+co+(108==Utility_charat(u,Xe+3)?"$3":"$2-$3"))+u;case 115:return~indexof(u,"stretch")?emotion_cache_browser_esm_prefix(Utility_replace(u,"stretch","fill-available"),Xe)+u:u}break;case 4949:if(115!==Utility_charat(u,Xe+1))break;case 6444:switch(Utility_charat(u,Utility_strlen(u)-3-(~indexof(u,"!important")&&10))){case 107:return Utility_replace(u,":",":"+ho)+u;case 101:return Utility_replace(u,/(.+:)([^;!]+)(;|!.+)?/,"$1"+ho+(45===Utility_charat(u,14)?"inline-":"")+"box$3$1"+ho+"$2$3$1"+so+"$2box$3")+u}break;case 5936:switch(Utility_charat(u,Xe+11)){case 114:return ho+u+so+Utility_replace(u,/[svh]\w+-[tblr]{2}/,"tb")+u;case 108:return ho+u+so+Utility_replace(u,/[svh]\w+-[tblr]{2}/,"tb-rl")+u;case 45:return ho+u+so+Utility_replace(u,/[svh]\w+-[tblr]{2}/,"lr")+u}return ho+u+so+u+u}return u}var Da=[function prefixer(u,Xe,Wt,fr){if(u.length>-1&&!u.return)switch(u.type){case ko:u.return=emotion_cache_browser_esm_prefix(u.value,u.length);break;case Co:return Serializer_serialize([Tokenizer_copy(u,{value:Utility_replace(u.value,"@","@"+ho)})],fr);case xo:if(u.length)return function Utility_combine(u,Xe){return u.map(Xe).join("")}(u.props,(function(Xe){switch(function Utility_match(u,Xe){return(u=Xe.exec(u))?u[0]:u}(Xe,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Serializer_serialize([Tokenizer_copy(u,{props:[Utility_replace(Xe,/:(read-\w+)/,":-moz-$1")]})],fr);case"::placeholder":return Serializer_serialize([Tokenizer_copy(u,{props:[Utility_replace(Xe,/:(plac\w+)/,":"+ho+"input-$1")]}),Tokenizer_copy(u,{props:[Utility_replace(Xe,/:(plac\w+)/,":-moz-$1")]}),Tokenizer_copy(u,{props:[Utility_replace(Xe,/:(plac\w+)/,so+"input-$1")]})],fr)}return""}))}}],ns=function createCache(u){var Xe=u.key;if("css"===Xe){var Wt=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(Wt,(function(u){-1!==u.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(u),u.setAttribute("data-s",""))}))}var _r,wr,Ar=u.stylisPlugins||Da,Kr={},In=[];_r=u.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+Xe+' "]'),(function(u){for(var Xe=u.getAttribute("data-emotion").split(" "),Wt=1;Wt<Xe.length;Wt++)Kr[Xe[Wt]]=!0;In.push(u)}));var no,io,oo=[stringify,(io=function(u){no.insert(u)},function(u){u.root||(u=u.return)&&io(u)})],ao=function middleware(u){var Xe=Utility_sizeof(u);return function(Wt,fr,_r,wr){for(var Ar="",Kr=0;Kr<Xe;Kr++)Ar+=u[Kr](Wt,fr,_r,wr)||"";return Ar}}([ca,ua].concat(Ar,oo));wr=function insert(u,Xe,Wt,fr){no=Wt,function stylis(u){Serializer_serialize(compile(u),ao)}(u?u+"{"+Xe.styles+"}":Xe.styles),fr&&(so.inserted[Xe.name]=!0)};var so={key:Xe,sheet:new fr({key:Xe,container:_r,nonce:u.nonce,speedy:u.speedy,prepend:u.prepend,insertionPoint:u.insertionPoint}),nonce:u.nonce,inserted:Kr,registered:{},insert:wr};return so.sheet.hydrate(In),so}},6289:function(u,Xe,Wt){"use strict";function memoize(u){var Xe=Object.create(null);return function(Wt){return void 0===Xe[Wt]&&(Xe[Wt]=u(Wt)),Xe[Wt]}}Wt.d(Xe,{A:function(){return memoize}})},9898:function(u,Xe,Wt){"use strict";Wt.d(Xe,{C:function(){return In},T:function(){return io},a:function(){return ao},w:function(){return no}});var fr=Wt(6540),_r=Wt(5655),wr=Wt(8168),Ar=function weakMemoize(u){var Xe=new WeakMap;return function(Wt){if(Xe.has(Wt))return Xe.get(Wt);var fr=u(Wt);return Xe.set(Wt,fr),fr}},Kr=(Wt(3174),Wt(1287),fr.createContext("undefined"!=typeof HTMLElement?(0,_r.A)({key:"css"}):null)),In=Kr.Provider,no=function withEmotionCache(u){return(0,fr.forwardRef)((function(Xe,Wt){var _r=(0,fr.useContext)(Kr);return u(Xe,_r,Wt)}))},io=fr.createContext({}),oo=Ar((function(u){return Ar((function(Xe){return function getTheme(u,Xe){return"function"==typeof Xe?Xe(u):(0,wr.A)({},u,Xe)}(u,Xe)}))})),ao=function ThemeProvider(u){var Xe=fr.useContext(io);return u.theme!==Xe&&(Xe=oo(Xe)(u.theme)),fr.createElement(io.Provider,{value:Xe},u.children)}},7437:function(u,Xe,Wt){"use strict";Wt.d(Xe,{AH:function(){return css},i7:function(){return no},mL:function(){return In}});var fr=Wt(9898),_r=Wt(6540),wr=Wt(41),Ar=Wt(1287),Kr=Wt(3174),In=(Wt(5655),Wt(4146),(0,fr.w)((function(u,Xe){var Wt=u.styles,In=(0,Kr.J)([Wt],void 0,_r.useContext(fr.T)),no=_r.useRef();return(0,Ar.i)((function(){var u=Xe.key+"-global",Wt=new Xe.sheet.constructor({key:u,nonce:Xe.sheet.nonce,container:Xe.sheet.container,speedy:Xe.sheet.isSpeedy}),fr=!1,_r=document.querySelector('style[data-emotion="'+u+" "+In.name+'"]');return Xe.sheet.tags.length&&(Wt.before=Xe.sheet.tags[0]),null!==_r&&(fr=!0,_r.setAttribute("data-emotion",u),Wt.hydrate([_r])),no.current=[Wt,fr],function(){Wt.flush()}}),[Xe]),(0,Ar.i)((function(){var u=no.current,Wt=u[0];if(u[1])u[1]=!1;else{if(void 0!==In.next&&(0,wr.sk)(Xe,In.next,!0),Wt.tags.length){var fr=Wt.tags[Wt.tags.length-1].nextElementSibling;Wt.before=fr,Wt.flush()}Xe.insert("",In,Wt,!1)}}),[Xe,In.name]),null})));function css(){for(var u=arguments.length,Xe=new Array(u),Wt=0;Wt<u;Wt++)Xe[Wt]=arguments[Wt];return(0,Kr.J)(Xe)}var no=function keyframes(){var u=css.apply(void 0,arguments),Xe="animation-"+u.name;return{name:Xe,styles:"@keyframes "+Xe+"{"+u.styles+"}",anim:1,toString:function toString(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}},3174:function(u,Xe,Wt){"use strict";Wt.d(Xe,{J:function(){return serializeStyles}});var fr={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,scale: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},_r=Wt(6289),wr=!1,Ar=/[A-Z]|^ms/g,Kr=/_EMO_([^_]+?)_([^]*?)_EMO_/g,In=function isCustomProperty(u){return 45===u.charCodeAt(1)},no=function isProcessableValue(u){return null!=u&&"boolean"!=typeof u},io=(0,_r.A)((function(u){return In(u)?u:u.replace(Ar,"-$&").toLowerCase()})),oo=function processStyleValue(u,Xe){switch(u){case"animation":case"animationName":if("string"==typeof Xe)return Xe.replace(Kr,(function(u,Xe,Wt){return so={name:Xe,styles:Wt,next:so},Xe}))}return 1===fr[u]||In(u)||"number"!=typeof Xe||0===Xe?Xe:Xe+"px"},ao="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function handleInterpolation(u,Xe,Wt){if(null==Wt)return"";var fr=Wt;if(void 0!==fr.__emotion_styles)return fr;switch(typeof Wt){case"boolean":return"";case"object":var _r=Wt;if(1===_r.anim)return so={name:_r.name,styles:_r.styles,next:so},_r.name;var Ar=Wt;if(void 0!==Ar.styles){var Kr=Ar.next;if(void 0!==Kr)for(;void 0!==Kr;)so={name:Kr.name,styles:Kr.styles,next:so},Kr=Kr.next;return Ar.styles+";"}return function createStringFromObject(u,Xe,Wt){var fr="";if(Array.isArray(Wt))for(var _r=0;_r<Wt.length;_r++)fr+=handleInterpolation(u,Xe,Wt[_r])+";";else for(var Ar in Wt){var Kr=Wt[Ar];if("object"!=typeof Kr){var In=Kr;null!=Xe&&void 0!==Xe[In]?fr+=Ar+"{"+Xe[In]+"}":no(In)&&(fr+=io(Ar)+":"+oo(Ar,In)+";")}else{if("NO_COMPONENT_SELECTOR"===Ar&&wr)throw new Error(ao);if(!Array.isArray(Kr)||"string"!=typeof Kr[0]||null!=Xe&&void 0!==Xe[Kr[0]]){var so=handleInterpolation(u,Xe,Kr);switch(Ar){case"animation":case"animationName":fr+=io(Ar)+":"+so+";";break;default:fr+=Ar+"{"+so+"}"}}else for(var co=0;co<Kr.length;co++)no(Kr[co])&&(fr+=io(Ar)+":"+oo(Ar,Kr[co])+";")}}return fr}(u,Xe,Wt);case"function":if(void 0!==u){var In=so,co=Wt(u);return so=In,handleInterpolation(u,Xe,co)}}var ho=Wt;if(null==Xe)return ho;var go=Xe[ho];return void 0!==go?go:ho}var so,co=/label:\s*([^\s;{]+)\s*(;|$)/g;function serializeStyles(u,Xe,Wt){if(1===u.length&&"object"==typeof u[0]&&null!==u[0]&&void 0!==u[0].styles)return u[0];var fr=!0,_r="";so=void 0;var wr=u[0];null==wr||void 0===wr.raw?(fr=!1,_r+=handleInterpolation(Wt,Xe,wr)):_r+=wr[0];for(var Ar=1;Ar<u.length;Ar++){if(_r+=handleInterpolation(Wt,Xe,u[Ar]),fr)_r+=wr[Ar]}co.lastIndex=0;for(var Kr,In="";null!==(Kr=co.exec(_r));)In+="-"+Kr[1];var no=function murmur2(u){for(var Xe,Wt=0,fr=0,_r=u.length;_r>=4;++fr,_r-=4)Xe=1540483477*(65535&(Xe=255&u.charCodeAt(fr)|(255&u.charCodeAt(++fr))<<8|(255&u.charCodeAt(++fr))<<16|(255&u.charCodeAt(++fr))<<24))+(59797*(Xe>>>16)<<16),Wt=1540483477*(65535&(Xe^=Xe>>>24))+(59797*(Xe>>>16)<<16)^1540483477*(65535&Wt)+(59797*(Wt>>>16)<<16);switch(_r){case 3:Wt^=(255&u.charCodeAt(fr+2))<<16;case 2:Wt^=(255&u.charCodeAt(fr+1))<<8;case 1:Wt=1540483477*(65535&(Wt^=255&u.charCodeAt(fr)))+(59797*(Wt>>>16)<<16)}return(((Wt=1540483477*(65535&(Wt^=Wt>>>13))+(59797*(Wt>>>16)<<16))^Wt>>>15)>>>0).toString(36)}(_r)+In;return{name:no,styles:_r,next:so}}},1287:function(u,Xe,Wt){"use strict";var fr;Wt.d(Xe,{i:function(){return Kr},s:function(){return Ar}});var _r=Wt(6540),wr=!!(fr||(fr=Wt.t(_r,2))).useInsertionEffect&&(fr||(fr=Wt.t(_r,2))).useInsertionEffect,Ar=wr||function syncFallback(u){return u()},Kr=wr||_r.useLayoutEffect},41:function(u,Xe,Wt){"use strict";Wt.d(Xe,{Rk:function(){return getRegisteredStyles},SF:function(){return fr},sk:function(){return _r}});function getRegisteredStyles(u,Xe,Wt){var fr="";return Wt.split(" ").forEach((function(Wt){void 0!==u[Wt]?Xe.push(u[Wt]+";"):Wt&&(fr+=Wt+" ")})),fr}var fr=function registerStyles(u,Xe,Wt){var fr=u.key+"-"+Xe.name;!1===Wt&&void 0===u.registered[fr]&&(u.registered[fr]=Xe.styles)},_r=function insertStyles(u,Xe,Wt){fr(u,Xe,Wt);var _r=u.key+"-"+Xe.name;if(void 0===u.inserted[Xe.name]){var wr=Xe;do{u.insert(Xe===wr?"."+_r:"",wr,u.sheet,!0),wr=wr.next}while(void 0!==wr)}}},4865:function(u,Xe){"use strict";var Wt=[128065],fr="f06e",_r="M288 32c-80.8 0-145.5 36.8-192.6 80.6C48.6 156 17.3 208 2.5 243.7c-3.3 7.9-3.3 16.7 0 24.6C17.3 304 48.6 356 95.4 399.4C142.5 443.2 207.2 480 288 480s145.5-36.8 192.6-80.6c46.8-43.5 78.1-95.4 93-131.1c3.3-7.9 3.3-16.7 0-24.6c-14.9-35.7-46.2-87.7-93-131.1C433.5 68.8 368.8 32 288 32zM144 256a144 144 0 1 1 288 0 144 144 0 1 1 -288 0zm144-64c0 35.3-28.7 64-64 64c-7.1 0-13.9-1.2-20.3-3.3c-5.5-1.8-11.9 1.6-11.7 7.4c.3 6.9 1.3 13.8 3.2 20.7c13.7 51.2 66.4 81.6 117.6 67.9s81.6-66.4 67.9-117.6c-11.1-41.5-47.8-69.4-88.6-71.1c-5.8-.2-9.2 6.1-7.4 11.7c2.1 6.4 3.3 13.2 3.3 20.3z";Xe.mw={prefix:"fas",iconName:"eye",icon:[576,512,Wt,fr,_r]},Xe.pS=Xe.mw},7312:function(u,Xe){"use strict";var Wt="eye-slash",fr=[],_r="f070",wr="M38.8 5.1C28.4-3.1 13.3-1.2 5.1 9.2S-1.2 34.7 9.2 42.9l592 464c10.4 8.2 25.5 6.3 33.7-4.1s6.3-25.5-4.1-33.7L525.6 386.7c39.6-40.6 66.4-86.1 79.9-118.4c3.3-7.9 3.3-16.7 0-24.6c-14.9-35.7-46.2-87.7-93-131.1C465.5 68.8 400.8 32 320 32c-68.2 0-125 26.3-169.3 60.8L38.8 5.1zM223.1 149.5C248.6 126.2 282.7 112 320 112c79.5 0 144 64.5 144 144c0 24.9-6.3 48.3-17.4 68.7L408 294.5c8.4-19.3 10.6-41.4 4.8-63.3c-11.1-41.5-47.8-69.4-88.6-71.1c-5.8-.2-9.2 6.1-7.4 11.7c2.1 6.4 3.3 13.2 3.3 20.3c0 10.2-2.4 19.8-6.6 28.3l-90.3-70.8zM373 389.9c-16.4 6.5-34.3 10.1-53 10.1c-79.5 0-144-64.5-144-144c0-6.9 .5-13.6 1.4-20.2L83.1 161.5C60.3 191.2 44 220.8 34.5 243.7c-3.3 7.9-3.3 16.7 0 24.6c14.9 35.7 46.2 87.7 93 131.1C174.5 443.2 239.2 480 320 480c47.8 0 89.9-12.9 126.2-32.5L373 389.9z";Xe.mw={prefix:"fas",iconName:Wt,icon:[640,512,fr,_r,wr]},Xe.k6=Xe.mw},838:function(u,Xe){"use strict";var Wt="layer-group",fr=[],_r="f5fd",wr="M264.5 5.2c14.9-6.9 32.1-6.9 47 0l218.6 101c8.5 3.9 13.9 12.4 13.9 21.8s-5.4 17.9-13.9 21.8l-218.6 101c-14.9 6.9-32.1 6.9-47 0L45.9 149.8C37.4 145.8 32 137.3 32 128s5.4-17.9 13.9-21.8L264.5 5.2zM476.9 209.6l53.2 24.6c8.5 3.9 13.9 12.4 13.9 21.8s-5.4 17.9-13.9 21.8l-218.6 101c-14.9 6.9-32.1 6.9-47 0L45.9 277.8C37.4 273.8 32 265.3 32 256s5.4-17.9 13.9-21.8l53.2-24.6 152 70.2c23.4 10.8 50.4 10.8 73.8 0l152-70.2zm-152 198.2l152-70.2 53.2 24.6c8.5 3.9 13.9 12.4 13.9 21.8s-5.4 17.9-13.9 21.8l-218.6 101c-14.9 6.9-32.1 6.9-47 0L45.9 405.8C37.4 401.8 32 393.3 32 384s5.4-17.9 13.9-21.8l53.2-24.6 152 70.2c23.4 10.8 50.4 10.8 73.8 0z";Xe.mw={prefix:"fas",iconName:Wt,icon:[576,512,fr,_r,wr]},Xe.qI=Xe.mw},9781:function(u,Xe,Wt){"use strict";var fr=Wt(4994);Xe.A=void 0;var _r=fr(Wt(2032)),wr=Wt(4848);Xe.A=(0,_r.default)((0,wr.jsx)("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close")},1656:function(u,Xe,Wt){"use strict";var fr=Wt(4994);Xe.A=void 0;var _r=fr(Wt(2032)),wr=Wt(4848);Xe.A=(0,_r.default)((0,wr.jsx)("path",{d:"m12 8-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z"}),"ExpandLess")},2048:function(u,Xe,Wt){"use strict";var fr=Wt(4994);Xe.A=void 0;var _r=fr(Wt(2032)),wr=Wt(4848);Xe.A=(0,_r.default)((0,wr.jsx)("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}),"ExpandMore")},6434:function(u,Xe,Wt){"use strict";var fr=Wt(4994);Xe.A=void 0;var _r=fr(Wt(2032)),wr=Wt(4848);Xe.A=(0,_r.default)((0,wr.jsx)("path",{d:"M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3z"}),"Launch")},5673:function(u,Xe,Wt){"use strict";var fr=Wt(4994);Xe.A=void 0;var _r=fr(Wt(2032)),wr=Wt(4848);Xe.A=(0,_r.default)((0,wr.jsx)("path",{d:"M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5M12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5m0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3"}),"Visibility")},6768:function(u,Xe,Wt){"use strict";var fr=Wt(4994);Xe.A=void 0;var _r=fr(Wt(2032)),wr=Wt(4848);Xe.A=(0,_r.default)((0,wr.jsx)("path",{d:"M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7M2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2m4.31-.78 3.15 3.15.02-.16c0-1.66-1.34-3-3-3z"}),"VisibilityOff")},2032:function(u,Xe,Wt){"use strict";Object.defineProperty(Xe,"__esModule",{value:!0}),Object.defineProperty(Xe,"default",{enumerable:!0,get:function(){return fr.createSvgIcon}});var fr=Wt(8928)},5607:function(u,Xe,Wt){"use strict";Wt.d(Xe,{b:function(){return DefaultPropsProvider_useDefaultProps}});var fr=Wt(6540),_r=Wt(7379);Wt(4848);const wr=fr.createContext(void 0);function useDefaultProps({props:u,name:Xe}){return function getThemeProps(u){const{theme:Xe,name:Wt,props:fr}=u;if(!Xe||!Xe.components||!Xe.components[Wt])return fr;const wr=Xe.components[Wt];return wr.defaultProps?(0,_r.A)(wr.defaultProps,fr):wr.styleOverrides||wr.variants?fr:(0,_r.A)(wr,fr)}({props:u,name:Xe,theme:{components:fr.useContext(wr)}})}function DefaultPropsProvider_useDefaultProps(u){return useDefaultProps(u)}},6544:function(u,Xe,Wt){"use strict";Wt.d(Xe,{A:function(){return kl}});var fr=Wt(8168),_r=Wt(8587),wr=Wt(9453),Ar=Wt(1317),Kr=Wt(4188),In=Wt(3571),no=Wt(8749);var io=Wt(771);var oo={black:"#000",white:"#fff"};var ao={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"};var so={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",A100:"#ea80fc",A200:"#e040fb",A400:"#d500f9",A700:"#aa00ff"};var co={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"};var ho={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"};var go={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"};var xo={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",A100:"#80d8ff",A200:"#40c4ff",A400:"#00b0ff",A700:"#0091ea"};var ko={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"};const Co=["mode","contrastThreshold","tonalOffset"],Io={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:oo.white,default:oo.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},zo={text:{primary:oo.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:oo.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function addLightOrDark(u,Xe,Wt,fr){const _r=fr.light||fr,wr=fr.dark||1.5*fr;u[Xe]||(u.hasOwnProperty(Wt)?u[Xe]=u[Wt]:"light"===Xe?u.light=(0,io.a)(u.main,_r):"dark"===Xe&&(u.dark=(0,io.e$)(u.main,wr)))}function createPalette(u){const{mode:Xe="light",contrastThreshold:Wt=3,tonalOffset:Kr=.2}=u,In=(0,_r.A)(u,Co),no=u.primary||function getDefaultPrimary(u="light"){return"dark"===u?{main:go[200],light:go[50],dark:go[400]}:{main:go[700],light:go[400],dark:go[800]}}(Xe),Bo=u.secondary||function getDefaultSecondary(u="light"){return"dark"===u?{main:so[200],light:so[50],dark:so[400]}:{main:so[500],light:so[300],dark:so[700]}}(Xe),ca=u.error||function getDefaultError(u="light"){return"dark"===u?{main:co[500],light:co[300],dark:co[700]}:{main:co[700],light:co[400],dark:co[800]}}(Xe),ua=u.info||function getDefaultInfo(u="light"){return"dark"===u?{main:xo[400],light:xo[300],dark:xo[700]}:{main:xo[700],light:xo[500],dark:xo[900]}}(Xe),Da=u.success||function getDefaultSuccess(u="light"){return"dark"===u?{main:ko[400],light:ko[300],dark:ko[700]}:{main:ko[800],light:ko[500],dark:ko[900]}}(Xe),ns=u.warning||function getDefaultWarning(u="light"){return"dark"===u?{main:ho[400],light:ho[300],dark:ho[700]}:{main:"#ed6c02",light:ho[500],dark:ho[900]}}(Xe);function getContrastText(u){return(0,io.eM)(u,zo.text.primary)>=Wt?zo.text.primary:Io.text.primary}const augmentColor=({color:u,name:Xe,mainShade:Wt=500,lightShade:_r=300,darkShade:Ar=700})=>{if(!(u=(0,fr.A)({},u)).main&&u[Wt]&&(u.main=u[Wt]),!u.hasOwnProperty("main"))throw new Error((0,wr.A)(11,Xe?` (${Xe})`:"",Wt));if("string"!=typeof u.main)throw new Error((0,wr.A)(12,Xe?` (${Xe})`:"",JSON.stringify(u.main)));return addLightOrDark(u,"light",_r,Kr),addLightOrDark(u,"dark",Ar,Kr),u.contrastText||(u.contrastText=getContrastText(u.main)),u},yl={dark:zo,light:Io};return(0,Ar.A)((0,fr.A)({common:(0,fr.A)({},oo),mode:Xe,primary:augmentColor({color:no,name:"primary"}),secondary:augmentColor({color:Bo,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:augmentColor({color:ca,name:"error"}),warning:augmentColor({color:ns,name:"warning"}),info:augmentColor({color:ua,name:"info"}),success:augmentColor({color:Da,name:"success"}),grey:ao,contrastThreshold:Wt,getContrastText,augmentColor,tonalOffset:Kr},yl[Xe]),In)}const Bo=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"];const ca={textTransform:"uppercase"},ua='"Roboto", "Helvetica", "Arial", sans-serif';function createTypography(u,Xe){const Wt="function"==typeof Xe?Xe(u):Xe,{fontFamily:wr=ua,fontSize:Kr=14,fontWeightLight:In=300,fontWeightRegular:no=400,fontWeightMedium:io=500,fontWeightBold:oo=700,htmlFontSize:ao=16,allVariants:so,pxToRem:co}=Wt,ho=(0,_r.A)(Wt,Bo);const go=Kr/14,xo=co||(u=>u/ao*go+"rem"),buildVariant=(u,Xe,Wt,_r,Ar)=>{return(0,fr.A)({fontFamily:wr,fontWeight:u,fontSize:xo(Xe),lineHeight:Wt},wr===ua?{letterSpacing:(Kr=_r/Xe,Math.round(1e5*Kr)/1e5)+"em"}:{},Ar,so);var Kr},ko={h1:buildVariant(In,96,1.167,-1.5),h2:buildVariant(In,60,1.2,-.5),h3:buildVariant(no,48,1.167,0),h4:buildVariant(no,34,1.235,.25),h5:buildVariant(no,24,1.334,0),h6:buildVariant(io,20,1.6,.15),subtitle1:buildVariant(no,16,1.75,.15),subtitle2:buildVariant(io,14,1.57,.1),body1:buildVariant(no,16,1.5,.15),body2:buildVariant(no,14,1.43,.15),button:buildVariant(io,14,1.75,.4,ca),caption:buildVariant(no,12,1.66,.4),overline:buildVariant(no,12,2.66,1,ca),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return(0,Ar.A)((0,fr.A)({htmlFontSize:ao,pxToRem:xo,fontFamily:wr,fontSize:Kr,fontWeightLight:In,fontWeightRegular:no,fontWeightMedium:io,fontWeightBold:oo},ko),ho,{clone:!1})}function createShadow(...u){return[`${u[0]}px ${u[1]}px ${u[2]}px ${u[3]}px rgba(0,0,0,0.2)`,`${u[4]}px ${u[5]}px ${u[6]}px ${u[7]}px rgba(0,0,0,0.14)`,`${u[8]}px ${u[9]}px ${u[10]}px ${u[11]}px rgba(0,0,0,0.12)`].join(",")}var Da=["none",createShadow(0,2,1,-1,0,1,1,0,0,1,3,0),createShadow(0,3,1,-2,0,2,2,0,0,1,5,0),createShadow(0,3,3,-2,0,3,4,0,0,1,8,0),createShadow(0,2,4,-1,0,4,5,0,0,1,10,0),createShadow(0,3,5,-1,0,5,8,0,0,1,14,0),createShadow(0,3,5,-1,0,6,10,0,0,1,18,0),createShadow(0,4,5,-2,0,7,10,1,0,2,16,1),createShadow(0,5,5,-3,0,8,10,1,0,3,14,2),createShadow(0,5,6,-3,0,9,12,1,0,3,16,2),createShadow(0,6,6,-3,0,10,14,1,0,4,18,3),createShadow(0,6,7,-4,0,11,15,1,0,4,20,3),createShadow(0,7,8,-4,0,12,17,2,0,5,22,4),createShadow(0,7,8,-4,0,13,19,2,0,5,24,4),createShadow(0,7,9,-4,0,14,21,2,0,5,26,4),createShadow(0,8,9,-5,0,15,22,2,0,6,28,5),createShadow(0,8,10,-5,0,16,24,2,0,6,30,5),createShadow(0,8,11,-5,0,17,26,2,0,6,32,5),createShadow(0,9,11,-5,0,18,28,2,0,7,34,6),createShadow(0,9,12,-6,0,19,29,2,0,7,36,6),createShadow(0,10,13,-6,0,20,31,3,0,8,38,7),createShadow(0,10,13,-6,0,21,33,3,0,8,40,7),createShadow(0,10,14,-6,0,22,35,3,0,8,42,7),createShadow(0,11,14,-7,0,23,36,3,0,9,44,8),createShadow(0,11,15,-7,0,24,38,3,0,9,46,8)],ns=Wt(7091);var yl={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};const vl=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];function createTheme_createTheme(u={},...Xe){const{mixins:Wt={},palette:io={},transitions:oo={},typography:ao={}}=u,so=(0,_r.A)(u,vl);if(u.vars)throw new Error((0,wr.A)(18));const co=createPalette(io),ho=(0,no.A)(u);let go=(0,Ar.A)(ho,{mixins:(xo=ho.breakpoints,ko=Wt,(0,fr.A)({toolbar:{minHeight:56,[xo.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[xo.up("sm")]:{minHeight:64}}},ko)),palette:co,shadows:Da.slice(),typography:createTypography(co,ao),transitions:(0,ns.Ay)(oo),zIndex:(0,fr.A)({},yl)});var xo,ko;return go=(0,Ar.A)(go,so),go=Xe.reduce(((u,Xe)=>(0,Ar.A)(u,Xe)),go),go.unstable_sxConfig=(0,fr.A)({},Kr.A,null==so?void 0:so.unstable_sxConfig),go.unstable_sx=function sx(u){return(0,In.A)({sx:u,theme:this})},go}var kl=createTheme_createTheme},7091:function(u,Xe,Wt){"use strict";Wt.d(Xe,{Ay:function(){return createTransitions},p0:function(){return Kr}});var fr=Wt(8587),_r=Wt(8168);const wr=["duration","easing","delay"],Ar={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},Kr={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function formatMs(u){return`${Math.round(u)}ms`}function getAutoHeightDuration(u){if(!u)return 0;const Xe=u/36;return Math.round(10*(4+15*Xe**.25+Xe/5))}function createTransitions(u){const Xe=(0,_r.A)({},Ar,u.easing),Wt=(0,_r.A)({},Kr,u.duration);return(0,_r.A)({getAutoHeightDuration,create:(u=["all"],_r={})=>{const{duration:Ar=Wt.standard,easing:Kr=Xe.easeInOut,delay:In=0}=_r;(0,fr.A)(_r,wr);return(Array.isArray(u)?u:[u]).map((u=>`${u} ${"string"==typeof Ar?Ar:formatMs(Ar)} ${Kr} ${"string"==typeof In?In:formatMs(In)}`)).join(",")}},u,{easing:Xe,duration:Wt})}},2765:function(u,Xe,Wt){"use strict";const fr=(0,Wt(6544).A)();Xe.A=fr},8312:function(u,Xe){"use strict";Xe.A="$$material"},9770:function(u,Xe,Wt){"use strict";var fr=Wt(4438);Xe.A=u=>(0,fr.A)(u)&&"classes"!==u},4438:function(u,Xe){"use strict";Xe.A=function slotShouldForwardProp(u){return"ownerState"!==u&&"theme"!==u&&"sx"!==u&&"as"!==u}},1848:function(u,Xe,Wt){"use strict";var fr=Wt(6461),_r=Wt(2765),wr=Wt(8312),Ar=Wt(9770);const Kr=(0,fr.Ay)({themeId:wr.A,defaultTheme:_r.A,rootShouldForwardProp:Ar.A});Xe.Ay=Kr},8466:function(u,Xe,Wt){"use strict";var fr=Wt(3967);Xe.A=fr.A},862:function(u,Xe,Wt){"use strict";var fr=Wt(6673);Xe.A=fr.A},5003:function(u,Xe,Wt){"use strict";Wt.d(Xe,{A:function(){return createSvgIcon}});var fr=Wt(8168),_r=Wt(6540),wr=Wt(8587),Ar=Wt(4164),Kr=Wt(5659),In=Wt(8466),no=Wt(5607),io=Wt(1848),oo=Wt(8413),ao=Wt(1609);function getSvgIconUtilityClass(u){return(0,ao.Ay)("MuiSvgIcon",u)}(0,oo.A)("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);var so=Wt(4848);const co=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox"],ho=(0,io.Ay)("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(u,Xe)=>{const{ownerState:Wt}=u;return[Xe.root,"inherit"!==Wt.color&&Xe[`color${(0,In.A)(Wt.color)}`],Xe[`fontSize${(0,In.A)(Wt.fontSize)}`]]}})((({theme:u,ownerState:Xe})=>{var Wt,fr,_r,wr,Ar,Kr,In,no,io,oo,ao,so,co;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:Xe.hasSvgAsChild?void 0:"currentColor",flexShrink:0,transition:null==(Wt=u.transitions)||null==(fr=Wt.create)?void 0:fr.call(Wt,"fill",{duration:null==(_r=u.transitions)||null==(_r=_r.duration)?void 0:_r.shorter}),fontSize:{inherit:"inherit",small:(null==(wr=u.typography)||null==(Ar=wr.pxToRem)?void 0:Ar.call(wr,20))||"1.25rem",medium:(null==(Kr=u.typography)||null==(In=Kr.pxToRem)?void 0:In.call(Kr,24))||"1.5rem",large:(null==(no=u.typography)||null==(io=no.pxToRem)?void 0:io.call(no,35))||"2.1875rem"}[Xe.fontSize],color:null!=(oo=null==(ao=(u.vars||u).palette)||null==(ao=ao[Xe.color])?void 0:ao.main)?oo:{action:null==(so=(u.vars||u).palette)||null==(so=so.action)?void 0:so.active,disabled:null==(co=(u.vars||u).palette)||null==(co=co.action)?void 0:co.disabled,inherit:void 0}[Xe.color]}})),go=_r.forwardRef((function SvgIcon(u,Xe){const Wt=(0,no.b)({props:u,name:"MuiSvgIcon"}),{children:io,className:oo,color:ao="inherit",component:go="svg",fontSize:xo="medium",htmlColor:ko,inheritViewBox:Co=!1,titleAccess:Io,viewBox:zo="0 0 24 24"}=Wt,Bo=(0,wr.A)(Wt,co),ca=_r.isValidElement(io)&&"svg"===io.type,ua=(0,fr.A)({},Wt,{color:ao,component:go,fontSize:xo,instanceFontSize:u.fontSize,inheritViewBox:Co,viewBox:zo,hasSvgAsChild:ca}),Da={};Co||(Da.viewBox=zo);const ns=(u=>{const{color:Xe,fontSize:Wt,classes:fr}=u,_r={root:["root","inherit"!==Xe&&`color${(0,In.A)(Xe)}`,`fontSize${(0,In.A)(Wt)}`]};return(0,Kr.A)(_r,getSvgIconUtilityClass,fr)})(ua);return(0,so.jsxs)(ho,(0,fr.A)({as:go,className:(0,Ar.A)(ns.root,oo),focusable:"false",color:ko,"aria-hidden":!Io||void 0,role:Io?"img":void 0,ref:Xe},Da,Bo,ca&&io.props,{ownerState:ua,children:[ca?io.props.children:io,Io?(0,so.jsx)("title",{children:Io}):null]}))}));go.muiName="SvgIcon";var xo=go;function createSvgIcon(u,Xe){function Component(Wt,_r){return(0,so.jsx)(xo,(0,fr.A)({"data-testid":`${Xe}Icon`,ref:_r},Wt,{children:u}))}return Component.muiName=xo.muiName,_r.memo(_r.forwardRef(Component))}},1935:function(u,Xe,Wt){"use strict";var fr=Wt(4705);Xe.A=fr.A},8928:function(u,Xe,Wt){"use strict";Wt.r(Xe),Wt.d(Xe,{capitalize:function(){return _r.A},createChainedFunction:function(){return wr.A},createSvgIcon:function(){return Ar.A},debounce:function(){return Kr.A},deprecatedPropType:function(){return In},isMuiElement:function(){return no.A},ownerDocument:function(){return io.A},ownerWindow:function(){return oo.A},requirePropFactory:function(){return ao},setRef:function(){return so},unstable_ClassNameGenerator:function(){return zo},unstable_useEnhancedEffect:function(){return co.A},unstable_useId:function(){return ho.A},unsupportedProp:function(){return go},useControlled:function(){return xo.A},useEventCallback:function(){return ko.A},useForkRef:function(){return Co.A},useIsFocusVisible:function(){return Io.A}});var fr=Wt(9071),_r=Wt(8466),wr=Wt(862),Ar=Wt(5003),Kr=Wt(1935);var In=function deprecatedPropType(u,Xe){return()=>null},no=Wt(8593),io=Wt(6248),oo=Wt(3749);Wt(8168);var ao=function requirePropFactory(u,Xe){return()=>null},so=Wt(7365).A,co=Wt(2778),ho=Wt(1668);var go=function unsupportedProp(u,Xe,Wt,fr,_r){return null},xo=Wt(1381),ko=Wt(3034),Co=Wt(6852),Io=Wt(1984);const zo={configure:u=>{fr.A.configure(u)}}},8593:function(u,Xe,Wt){"use strict";Wt.d(Xe,{A:function(){return _r}});var fr=Wt(6540);var _r=function isMuiElement(u,Xe){var Wt,_r;return fr.isValidElement(u)&&-1!==Xe.indexOf(null!=(Wt=u.type.muiName)?Wt:null==(_r=u.type)||null==(_r=_r._payload)||null==(_r=_r.value)?void 0:_r.muiName)}},6248:function(u,Xe,Wt){"use strict";var fr=Wt(2325);Xe.A=fr.A},3749:function(u,Xe,Wt){"use strict";var fr=Wt(4877);Xe.A=fr.A},1381:function(u,Xe,Wt){"use strict";Wt.d(Xe,{A:function(){return _r}});var fr=Wt(6540);var _r=function useControlled({controlled:u,default:Xe,name:Wt,state:_r="value"}){const{current:wr}=fr.useRef(void 0!==u),[Ar,Kr]=fr.useState(Xe);return[wr?u:Ar,fr.useCallback((u=>{wr||Kr(u)}),[])]}},2778:function(u,Xe,Wt){"use strict";var fr=Wt(1529);Xe.A=fr.A},3034:function(u,Xe,Wt){"use strict";var fr=Wt(1547);Xe.A=fr.A},6852:function(u,Xe,Wt){"use strict";var fr=Wt(1523);Xe.A=fr.A},1668:function(u,Xe,Wt){"use strict";var fr=Wt(4661);Xe.A=fr.A},1984:function(u,Xe,Wt){"use strict";Wt.d(Xe,{A:function(){return no}});var fr=Wt(6540),_r=Wt(3068);let wr=!0,Ar=!1;const Kr=new _r.E,In={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function handleKeyDown(u){u.metaKey||u.altKey||u.ctrlKey||(wr=!0)}function handlePointerDown(){wr=!1}function handleVisibilityChange(){"hidden"===this.visibilityState&&Ar&&(wr=!0)}function isFocusVisible(u){const{target:Xe}=u;try{return Xe.matches(":focus-visible")}catch(u){}return wr||function focusTriggersKeyboardModality(u){const{type:Xe,tagName:Wt}=u;return!("INPUT"!==Wt||!In[Xe]||u.readOnly)||"TEXTAREA"===Wt&&!u.readOnly||!!u.isContentEditable}(Xe)}var no=function useIsFocusVisible(){const u=fr.useCallback((u=>{null!=u&&function prepare(u){u.addEventListener("keydown",handleKeyDown,!0),u.addEventListener("mousedown",handlePointerDown,!0),u.addEventListener("pointerdown",handlePointerDown,!0),u.addEventListener("touchstart",handlePointerDown,!0),u.addEventListener("visibilitychange",handleVisibilityChange,!0)}(u.ownerDocument)}),[]),Xe=fr.useRef(!1);return{isFocusVisibleRef:Xe,onFocus:function handleFocusVisible(u){return!!isFocusVisible(u)&&(Xe.current=!0,!0)},onBlur:function handleBlurVisible(){return!!Xe.current&&(Ar=!0,Kr.start(100,(()=>{Ar=!1})),Xe.current=!1,!0)},ref:u}}},9940:function(u,Xe,Wt){"use strict";Wt.d(Xe,{A:function(){return GlobalStyles}});Wt(6540);var fr=Wt(7437),_r=Wt(4848);function GlobalStyles(u){const{styles:Xe,defaultTheme:Wt={}}=u,wr="function"==typeof Xe?u=>Xe(function isEmpty(u){return null==u||0===Object.keys(u).length}(u)?Wt:u):Xe;return(0,_r.jsx)(fr.mL,{styles:wr})}},2532:function(u,Xe,Wt){"use strict";Wt.r(Xe),Wt.d(Xe,{GlobalStyles:function(){return Bo.A},StyledEngineProvider:function(){return StyledEngineProvider},ThemeContext:function(){return In.T},css:function(){return ko.AH},default:function(){return styled},internal_processStyles:function(){return internal_processStyles},keyframes:function(){return ko.i7}});var fr=Wt(8168),_r=Wt(6540),wr=Wt(6289),Ar=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,Kr=(0,wr.A)((function(u){return Ar.test(u)||111===u.charCodeAt(0)&&110===u.charCodeAt(1)&&u.charCodeAt(2)<91})),In=Wt(9898),no=Wt(41),io=Wt(3174),oo=Wt(1287),ao=Kr,so=function testOmitPropsOnComponent(u){return"theme"!==u},co=function getDefaultShouldForwardProp(u){return"string"==typeof u&&u.charCodeAt(0)>96?ao:so},ho=function composeShouldForwardProps(u,Xe,Wt){var fr;if(Xe){var _r=Xe.shouldForwardProp;fr=u.__emotion_forwardProp&&_r?function(Xe){return u.__emotion_forwardProp(Xe)&&_r(Xe)}:_r}return"function"!=typeof fr&&Wt&&(fr=u.__emotion_forwardProp),fr},go=function Insertion(u){var Xe=u.cache,Wt=u.serialized,fr=u.isStringTag;return(0,no.SF)(Xe,Wt,fr),(0,oo.s)((function(){return(0,no.sk)(Xe,Wt,fr)})),null},xo=function createStyled(u,Xe){var Wt,wr,Ar=u.__emotion_real===u,Kr=Ar&&u.__emotion_base||u;void 0!==Xe&&(Wt=Xe.label,wr=Xe.target);var oo=ho(u,Xe,Ar),ao=oo||co(Kr),so=!ao("as");return function(){var xo=arguments,ko=Ar&&void 0!==u.__emotion_styles?u.__emotion_styles.slice(0):[];if(void 0!==Wt&&ko.push("label:"+Wt+";"),null==xo[0]||void 0===xo[0].raw)ko.push.apply(ko,xo);else{ko.push(xo[0][0]);for(var Co=xo.length,Io=1;Io<Co;Io++)ko.push(xo[Io],xo[0][Io])}var zo=(0,In.w)((function(u,Xe,Wt){var fr=so&&u.as||Kr,Ar="",ho=[],xo=u;if(null==u.theme){for(var Co in xo={},u)xo[Co]=u[Co];xo.theme=_r.useContext(In.T)}"string"==typeof u.className?Ar=(0,no.Rk)(Xe.registered,ho,u.className):null!=u.className&&(Ar=u.className+" ");var Io=(0,io.J)(ko.concat(ho),Xe.registered,xo);Ar+=Xe.key+"-"+Io.name,void 0!==wr&&(Ar+=" "+wr);var zo=so&&void 0===oo?co(fr):ao,Bo={};for(var ca in u)so&&"as"===ca||zo(ca)&&(Bo[ca]=u[ca]);return Bo.className=Ar,Wt&&(Bo.ref=Wt),_r.createElement(_r.Fragment,null,_r.createElement(go,{cache:Xe,serialized:Io,isStringTag:"string"==typeof fr}),_r.createElement(fr,Bo))}));return zo.displayName=void 0!==Wt?Wt:"Styled("+("string"==typeof Kr?Kr:Kr.displayName||Kr.name||"Component")+")",zo.defaultProps=u.defaultProps,zo.__emotion_real=zo,zo.__emotion_base=Kr,zo.__emotion_styles=ko,zo.__emotion_forwardProp=oo,Object.defineProperty(zo,"toString",{value:function value(){return"."+wr}}),zo.withComponent=function(u,Wt){return createStyled(u,(0,fr.A)({},Xe,Wt,{shouldForwardProp:ho(zo,Wt,!0)})).apply(void 0,ko)},zo}}.bind();["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"].forEach((function(u){xo[u]=xo(u)}));var ko=Wt(7437),Co=Wt(5655),Io=Wt(4848);let zo;function StyledEngineProvider(u){const{injectFirst:Xe,children:Wt}=u;return Xe&&zo?(0,Io.jsx)(In.C,{value:zo,children:Wt}):Wt}"object"==typeof document&&(zo=(0,Co.A)({key:"css",prepend:!0}));var Bo=Wt(9940);function styled(u,Xe){return xo(u,Xe)}const internal_processStyles=(u,Xe)=>{Array.isArray(u.__emotion_styles)&&(u.__emotion_styles=Xe(u.__emotion_styles))}},771:function(u,Xe,Wt){"use strict";var fr=Wt(4994);Xe.X4=alpha,Xe.e$=darken,Xe.eM=function getContrastRatio(u,Xe){const Wt=getLuminance(u),fr=getLuminance(Xe);return(Math.max(Wt,fr)+.05)/(Math.min(Wt,fr)+.05)},Xe.a=lighten;var _r=fr(Wt(8944)),wr=fr(Wt(7535));function clampWrapper(u,Xe=0,Wt=1){return(0,wr.default)(u,Xe,Wt)}function hexToRgb(u){u=u.slice(1);const Xe=new RegExp(`.{1,${u.length>=6?2:1}}`,"g");let Wt=u.match(Xe);return Wt&&1===Wt[0].length&&(Wt=Wt.map((u=>u+u))),Wt?`rgb${4===Wt.length?"a":""}(${Wt.map(((u,Xe)=>Xe<3?parseInt(u,16):Math.round(parseInt(u,16)/255*1e3)/1e3)).join(", ")})`:""}function decomposeColor(u){if(u.type)return u;if("#"===u.charAt(0))return decomposeColor(hexToRgb(u));const Xe=u.indexOf("("),Wt=u.substring(0,Xe);if(-1===["rgb","rgba","hsl","hsla","color"].indexOf(Wt))throw new Error((0,_r.default)(9,u));let fr,wr=u.substring(Xe+1,u.length-1);if("color"===Wt){if(wr=wr.split(" "),fr=wr.shift(),4===wr.length&&"/"===wr[3].charAt(0)&&(wr[3]=wr[3].slice(1)),-1===["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(fr))throw new Error((0,_r.default)(10,fr))}else wr=wr.split(",");return wr=wr.map((u=>parseFloat(u))),{type:Wt,values:wr,colorSpace:fr}}const colorChannel=u=>{const Xe=decomposeColor(u);return Xe.values.slice(0,3).map(((u,Wt)=>-1!==Xe.type.indexOf("hsl")&&0!==Wt?`${u}%`:u)).join(" ")};function recomposeColor(u){const{type:Xe,colorSpace:Wt}=u;let{values:fr}=u;return-1!==Xe.indexOf("rgb")?fr=fr.map(((u,Xe)=>Xe<3?parseInt(u,10):u)):-1!==Xe.indexOf("hsl")&&(fr[1]=`${fr[1]}%`,fr[2]=`${fr[2]}%`),fr=-1!==Xe.indexOf("color")?`${Wt} ${fr.join(" ")}`:`${fr.join(", ")}`,`${Xe}(${fr})`}function hslToRgb(u){u=decomposeColor(u);const{values:Xe}=u,Wt=Xe[0],fr=Xe[1]/100,_r=Xe[2]/100,wr=fr*Math.min(_r,1-_r),f=(u,Xe=(u+Wt/30)%12)=>_r-wr*Math.max(Math.min(Xe-3,9-Xe,1),-1);let Ar="rgb";const Kr=[Math.round(255*f(0)),Math.round(255*f(8)),Math.round(255*f(4))];return"hsla"===u.type&&(Ar+="a",Kr.push(Xe[3])),recomposeColor({type:Ar,values:Kr})}function getLuminance(u){let Xe="hsl"===(u=decomposeColor(u)).type||"hsla"===u.type?decomposeColor(hslToRgb(u)).values:u.values;return Xe=Xe.map((Xe=>("color"!==u.type&&(Xe/=255),Xe<=.03928?Xe/12.92:((Xe+.055)/1.055)**2.4))),Number((.2126*Xe[0]+.7152*Xe[1]+.0722*Xe[2]).toFixed(3))}function alpha(u,Xe){return u=decomposeColor(u),Xe=clampWrapper(Xe),"rgb"!==u.type&&"hsl"!==u.type||(u.type+="a"),"color"===u.type?u.values[3]=`/${Xe}`:u.values[3]=Xe,recomposeColor(u)}function darken(u,Xe){if(u=decomposeColor(u),Xe=clampWrapper(Xe),-1!==u.type.indexOf("hsl"))u.values[2]*=1-Xe;else if(-1!==u.type.indexOf("rgb")||-1!==u.type.indexOf("color"))for(let Wt=0;Wt<3;Wt+=1)u.values[Wt]*=1-Xe;return recomposeColor(u)}function lighten(u,Xe){if(u=decomposeColor(u),Xe=clampWrapper(Xe),-1!==u.type.indexOf("hsl"))u.values[2]+=(100-u.values[2])*Xe;else if(-1!==u.type.indexOf("rgb"))for(let Wt=0;Wt<3;Wt+=1)u.values[Wt]+=(255-u.values[Wt])*Xe;else if(-1!==u.type.indexOf("color"))for(let Wt=0;Wt<3;Wt+=1)u.values[Wt]+=(1-u.values[Wt])*Xe;return recomposeColor(u)}function emphasize(u,Xe=.15){return getLuminance(u)>.5?darken(u,Xe):lighten(u,Xe)}},6461:function(u,Xe,Wt){"use strict";var fr=Wt(4994);Xe.Ay=function createStyled(u={}){const{themeId:Xe,defaultTheme:Wt=so,rootShouldForwardProp:fr=shouldForwardProp,slotShouldForwardProp:In=shouldForwardProp}=u,systemSx=u=>(0,no.default)((0,_r.default)({},u,{theme:resolveTheme((0,_r.default)({},u,{defaultTheme:Wt,themeId:Xe}))}));return systemSx.__mui_systemSx=!0,(u,no={})=>{(0,Ar.internal_processStyles)(u,(u=>u.filter((u=>!(null!=u&&u.__mui_systemSx)))));const{name:io,slot:oo,skipVariantsResolver:so,skipSx:co,overridesResolver:ho=defaultOverridesResolver(lowercaseFirstLetter(oo))}=no,go=(0,wr.default)(no,ao),xo=void 0!==so?so:oo&&"Root"!==oo&&"root"!==oo||!1,ko=co||!1;let Co=shouldForwardProp;"Root"===oo||"root"===oo?Co=fr:oo?Co=In:function isStringTag(u){return"string"==typeof u&&u.charCodeAt(0)>96}(u)&&(Co=void 0);const Io=(0,Ar.default)(u,(0,_r.default)({shouldForwardProp:Co,label:undefined},go)),transformStyleArg=u=>"function"==typeof u&&u.__emotion_real!==u||(0,Kr.isPlainObject)(u)?fr=>processStyleArg(u,(0,_r.default)({},fr,{theme:resolveTheme({theme:fr.theme,defaultTheme:Wt,themeId:Xe})})):u,muiStyledResolver=(fr,...wr)=>{let Ar=transformStyleArg(fr);const Kr=wr?wr.map(transformStyleArg):[];io&&ho&&Kr.push((u=>{const fr=resolveTheme((0,_r.default)({},u,{defaultTheme:Wt,themeId:Xe}));if(!fr.components||!fr.components[io]||!fr.components[io].styleOverrides)return null;const wr=fr.components[io].styleOverrides,Ar={};return Object.entries(wr).forEach((([Xe,Wt])=>{Ar[Xe]=processStyleArg(Wt,(0,_r.default)({},u,{theme:fr}))})),ho(u,Ar)})),io&&!xo&&Kr.push((u=>{var fr;const wr=resolveTheme((0,_r.default)({},u,{defaultTheme:Wt,themeId:Xe}));return processStyleArg({variants:null==wr||null==(fr=wr.components)||null==(fr=fr[io])?void 0:fr.variants},(0,_r.default)({},u,{theme:wr}))})),ko||Kr.push(systemSx);const In=Kr.length-wr.length;if(Array.isArray(fr)&&In>0){const u=new Array(In).fill("");Ar=[...fr,...u],Ar.raw=[...fr.raw,...u]}const no=Io(Ar,...Kr);return u.muiName&&(no.muiName=u.muiName),no};return Io.withConfig&&(muiStyledResolver.withConfig=Io.withConfig),muiStyledResolver}};var _r=fr(Wt(4634)),wr=fr(Wt(4893)),Ar=function _interopRequireWildcard(u,Xe){if(!Xe&&u&&u.__esModule)return u;if(null===u||"object"!=typeof u&&"function"!=typeof u)return{default:u};var Wt=_getRequireWildcardCache(Xe);if(Wt&&Wt.has(u))return Wt.get(u);var fr={__proto__:null},_r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var wr in u)if("default"!==wr&&Object.prototype.hasOwnProperty.call(u,wr)){var Ar=_r?Object.getOwnPropertyDescriptor(u,wr):null;Ar&&(Ar.get||Ar.set)?Object.defineProperty(fr,wr,Ar):fr[wr]=u[wr]}return fr.default=u,Wt&&Wt.set(u,fr),fr}(Wt(2532)),Kr=Wt(4239),In=(fr(Wt(7149)),fr(Wt(7320)),fr(Wt(3142))),no=fr(Wt(3857));const io=["ownerState"],oo=["variants"],ao=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function _getRequireWildcardCache(u){if("function"!=typeof WeakMap)return null;var Xe=new WeakMap,Wt=new WeakMap;return(_getRequireWildcardCache=function(u){return u?Wt:Xe})(u)}function shouldForwardProp(u){return"ownerState"!==u&&"theme"!==u&&"sx"!==u&&"as"!==u}const so=(0,In.default)(),lowercaseFirstLetter=u=>u?u.charAt(0).toLowerCase()+u.slice(1):u;function resolveTheme({defaultTheme:u,theme:Xe,themeId:Wt}){return function isEmpty(u){return 0===Object.keys(u).length}(Xe)?u:Xe[Wt]||Xe}function defaultOverridesResolver(u){return u?(Xe,Wt)=>Wt[u]:null}function processStyleArg(u,Xe){let{ownerState:Wt}=Xe,fr=(0,wr.default)(Xe,io);const Ar="function"==typeof u?u((0,_r.default)({ownerState:Wt},fr)):u;if(Array.isArray(Ar))return Ar.flatMap((u=>processStyleArg(u,(0,_r.default)({ownerState:Wt},fr))));if(Ar&&"object"==typeof Ar&&Array.isArray(Ar.variants)){const{variants:u=[]}=Ar;let Xe=(0,wr.default)(Ar,oo);return u.forEach((u=>{let wr=!0;"function"==typeof u.props?wr=u.props((0,_r.default)({ownerState:Wt},fr,Wt)):Object.keys(u.props).forEach((Xe=>{(null==Wt?void 0:Wt[Xe])!==u.props[Xe]&&fr[Xe]!==u.props[Xe]&&(wr=!1)})),wr&&(Array.isArray(Xe)||(Xe=[Xe]),Xe.push("function"==typeof u.style?u.style((0,_r.default)({ownerState:Wt},fr,Wt)):u.style))})),Xe}return Ar}},9452:function(u,Xe,Wt){"use strict";Wt.d(Xe,{EU:function(){return createEmptyBreakpointObject},NI:function(){return handleBreakpoints},iZ:function(){return mergeBreakpointsInOrder},kW:function(){return resolveBreakpointValues},vf:function(){return removeUnusedBreakpoints},zu:function(){return _r}});var fr=Wt(1317);const _r={xs:0,sm:600,md:900,lg:1200,xl:1536},wr={keys:["xs","sm","md","lg","xl"],up:u=>`@media (min-width:${_r[u]}px)`};function handleBreakpoints(u,Xe,Wt){const fr=u.theme||{};if(Array.isArray(Xe)){const u=fr.breakpoints||wr;return Xe.reduce(((fr,_r,wr)=>(fr[u.up(u.keys[wr])]=Wt(Xe[wr]),fr)),{})}if("object"==typeof Xe){const u=fr.breakpoints||wr;return Object.keys(Xe).reduce(((fr,wr)=>{if(-1!==Object.keys(u.values||_r).indexOf(wr)){fr[u.up(wr)]=Wt(Xe[wr],wr)}else{const u=wr;fr[u]=Xe[u]}return fr}),{})}return Wt(Xe)}function createEmptyBreakpointObject(u={}){var Xe;return(null==(Xe=u.keys)?void 0:Xe.reduce(((Xe,Wt)=>(Xe[u.up(Wt)]={},Xe)),{}))||{}}function removeUnusedBreakpoints(u,Xe){return u.reduce(((u,Xe)=>{const Wt=u[Xe];return(!Wt||0===Object.keys(Wt).length)&&delete u[Xe],u}),Xe)}function mergeBreakpointsInOrder(u,...Xe){const Wt=createEmptyBreakpointObject(u),_r=[Wt,...Xe].reduce(((u,Xe)=>(0,fr.A)(u,Xe)),{});return removeUnusedBreakpoints(Object.keys(Wt),_r)}function resolveBreakpointValues({values:u,breakpoints:Xe,base:Wt}){const fr=Wt||function computeBreakpointsBase(u,Xe){if("object"!=typeof u)return{};const Wt={},fr=Object.keys(Xe);return Array.isArray(u)?fr.forEach(((Xe,fr)=>{fr<u.length&&(Wt[Xe]=!0)})):fr.forEach((Xe=>{null!=u[Xe]&&(Wt[Xe]=!0)})),Wt}(u,Xe),_r=Object.keys(fr);if(0===_r.length)return u;let wr;return _r.reduce(((Xe,Wt,fr)=>(Array.isArray(u)?(Xe[Wt]=null!=u[fr]?u[fr]:u[wr],wr=fr):"object"==typeof u?(Xe[Wt]=null!=u[Wt]?u[Wt]:u[wr],wr=Wt):Xe[Wt]=u,Xe)),{})}},8336:function(u,Xe,Wt){"use strict";function applyStyles(u,Xe){const Wt=this;if(Wt.vars&&"function"==typeof Wt.getColorSchemeSelector){const fr=Wt.getColorSchemeSelector(u).replace(/(\[[^\]]+\])/,"*:where($1)");return{[fr]:Xe}}return Wt.palette.mode===u?Xe:{}}Wt.d(Xe,{A:function(){return applyStyles}})},8094:function(u,Xe,Wt){"use strict";Wt.d(Xe,{A:function(){return createBreakpoints}});var fr=Wt(8587),_r=Wt(8168);const wr=["values","unit","step"],sortBreakpointsValues=u=>{const Xe=Object.keys(u).map((Xe=>({key:Xe,val:u[Xe]})))||[];return Xe.sort(((u,Xe)=>u.val-Xe.val)),Xe.reduce(((u,Xe)=>(0,_r.A)({},u,{[Xe.key]:Xe.val})),{})};function createBreakpoints(u){const{values:Xe={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:Wt="px",step:Ar=5}=u,Kr=(0,fr.A)(u,wr),In=sortBreakpointsValues(Xe),no=Object.keys(In);function up(u){return`@media (min-width:${"number"==typeof Xe[u]?Xe[u]:u}${Wt})`}function down(u){return`@media (max-width:${("number"==typeof Xe[u]?Xe[u]:u)-Ar/100}${Wt})`}function between(u,fr){const _r=no.indexOf(fr);return`@media (min-width:${"number"==typeof Xe[u]?Xe[u]:u}${Wt}) and (max-width:${(-1!==_r&&"number"==typeof Xe[no[_r]]?Xe[no[_r]]:fr)-Ar/100}${Wt})`}return(0,_r.A)({keys:no,values:In,up,down,between,only:function only(u){return no.indexOf(u)+1<no.length?between(u,no[no.indexOf(u)+1]):up(u)},not:function not(u){const Xe=no.indexOf(u);return 0===Xe?up(no[1]):Xe===no.length-1?down(no[Xe]):between(u,no[no.indexOf(u)+1]).replace("@media","@media not all and")},unit:Wt},Kr)}},8749:function(u,Xe,Wt){"use strict";Wt.d(Xe,{A:function(){return so}});var fr=Wt(8168),_r=Wt(8587),wr=Wt(1317),Ar=Wt(8094);var Kr={borderRadius:4},In=Wt(8248);var no=Wt(3571),io=Wt(4188),oo=Wt(8336);const ao=["breakpoints","palette","spacing","shape"];var so=function createTheme(u={},...Xe){const{breakpoints:Wt={},palette:so={},spacing:co,shape:ho={}}=u,go=(0,_r.A)(u,ao),xo=(0,Ar.A)(Wt),ko=function createSpacing(u=8){if(u.mui)return u;const Xe=(0,In.LX)({spacing:u}),spacing=(...u)=>(0===u.length?[1]:u).map((u=>{const Wt=Xe(u);return"number"==typeof Wt?`${Wt}px`:Wt})).join(" ");return spacing.mui=!0,spacing}(co);let Co=(0,wr.A)({breakpoints:xo,direction:"ltr",components:{},palette:(0,fr.A)({mode:"light"},so),spacing:ko,shape:(0,fr.A)({},Kr,ho)},go);return Co.applyStyles=oo.A,Co=Xe.reduce(((u,Xe)=>(0,wr.A)(u,Xe)),Co),Co.unstable_sxConfig=(0,fr.A)({},io.A,null==go?void 0:go.unstable_sxConfig),Co.unstable_sx=function sx(u){return(0,no.A)({sx:u,theme:this})},Co}},3142:function(u,Xe,Wt){"use strict";Wt.r(Xe),Wt.d(Xe,{default:function(){return fr.A},private_createBreakpoints:function(){return _r.A},unstable_applyStyles:function(){return wr.A}});var fr=Wt(8749),_r=Wt(8094),wr=Wt(8336)},4620:function(u,Xe,Wt){"use strict";var fr=Wt(1317);Xe.A=function merge(u,Xe){return Xe?(0,fr.A)(u,Xe,{clone:!1}):u}},8248:function(u,Xe,Wt){"use strict";Wt.d(Xe,{LX:function(){return createUnarySpacing},MA:function(){return createUnaryUnit},_W:function(){return getValue},Lc:function(){return margin},Ms:function(){return padding}});var fr=Wt(9452),_r=Wt(6481),wr=Wt(4620);const Ar={m:"margin",p:"padding"},Kr={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},In={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},no=function memoize(u){const Xe={};return Wt=>(void 0===Xe[Wt]&&(Xe[Wt]=u(Wt)),Xe[Wt])}((u=>{if(u.length>2){if(!In[u])return[u];u=In[u]}const[Xe,Wt]=u.split(""),fr=Ar[Xe],_r=Kr[Wt]||"";return Array.isArray(_r)?_r.map((u=>fr+u)):[fr+_r]})),io=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],oo=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],ao=[...io,...oo];function createUnaryUnit(u,Xe,Wt,fr){var wr;const Ar=null!=(wr=(0,_r.Yn)(u,Xe,!1))?wr:Wt;return"number"==typeof Ar?u=>"string"==typeof u?u:Ar*u:Array.isArray(Ar)?u=>"string"==typeof u?u:Ar[u]:"function"==typeof Ar?Ar:()=>{}}function createUnarySpacing(u){return createUnaryUnit(u,"spacing",8)}function getValue(u,Xe){if("string"==typeof Xe||null==Xe)return Xe;const Wt=u(Math.abs(Xe));return Xe>=0?Wt:"number"==typeof Wt?-Wt:`-${Wt}`}function resolveCssProperty(u,Xe,Wt,_r){if(-1===Xe.indexOf(Wt))return null;const wr=function getStyleFromPropValue(u,Xe){return Wt=>u.reduce(((u,fr)=>(u[fr]=getValue(Xe,Wt),u)),{})}(no(Wt),_r),Ar=u[Wt];return(0,fr.NI)(u,Ar,wr)}function spacing_style(u,Xe){const Wt=createUnarySpacing(u.theme);return Object.keys(u).map((fr=>resolveCssProperty(u,Xe,fr,Wt))).reduce(wr.A,{})}function margin(u){return spacing_style(u,io)}function padding(u){return spacing_style(u,oo)}function spacing(u){return spacing_style(u,ao)}margin.propTypes={},margin.filterProps=io,padding.propTypes={},padding.filterProps=oo,spacing.propTypes={},spacing.filterProps=ao},6481:function(u,Xe,Wt){"use strict";Wt.d(Xe,{BO:function(){return getStyleValue},Yn:function(){return getPath}});var fr=Wt(3967),_r=Wt(9452);function getPath(u,Xe,Wt=!0){if(!Xe||"string"!=typeof Xe)return null;if(u&&u.vars&&Wt){const Wt=`vars.${Xe}`.split(".").reduce(((u,Xe)=>u&&u[Xe]?u[Xe]:null),u);if(null!=Wt)return Wt}return Xe.split(".").reduce(((u,Xe)=>u&&null!=u[Xe]?u[Xe]:null),u)}function getStyleValue(u,Xe,Wt,fr=Wt){let _r;return _r="function"==typeof u?u(Wt):Array.isArray(u)?u[Wt]||fr:getPath(u,Wt)||fr,Xe&&(_r=Xe(_r,fr,u)),_r}Xe.Ay=function style(u){const{prop:Xe,cssProperty:Wt=u.prop,themeKey:wr,transform:Ar}=u,fn=u=>{if(null==u[Xe])return null;const Kr=u[Xe],In=getPath(u.theme,wr)||{};return(0,_r.NI)(u,Kr,(u=>{let _r=getStyleValue(In,Ar,u);return u===_r&&"string"==typeof u&&(_r=getStyleValue(In,Ar,`${Xe}${"default"===u?"":(0,fr.A)(u)}`,u)),!1===Wt?_r:{[Wt]:_r}}))};return fn.propTypes={},fn.filterProps=[Xe],fn}},4188:function(u,Xe,Wt){"use strict";Wt.d(Xe,{A:function(){return Da}});var fr=Wt(8248),_r=Wt(6481),wr=Wt(4620);var Ar=function compose(...u){const Xe=u.reduce(((u,Xe)=>(Xe.filterProps.forEach((Wt=>{u[Wt]=Xe})),u)),{}),fn=u=>Object.keys(u).reduce(((Wt,fr)=>Xe[fr]?(0,wr.A)(Wt,Xe[fr](u)):Wt),{});return fn.propTypes={},fn.filterProps=u.reduce(((u,Xe)=>u.concat(Xe.filterProps)),[]),fn},Kr=Wt(9452);function borderTransform(u){return"number"!=typeof u?u:`${u}px solid`}function createBorderStyle(u,Xe){return(0,_r.Ay)({prop:u,themeKey:"borders",transform:Xe})}const In=createBorderStyle("border",borderTransform),no=createBorderStyle("borderTop",borderTransform),io=createBorderStyle("borderRight",borderTransform),oo=createBorderStyle("borderBottom",borderTransform),ao=createBorderStyle("borderLeft",borderTransform),so=createBorderStyle("borderColor"),co=createBorderStyle("borderTopColor"),ho=createBorderStyle("borderRightColor"),go=createBorderStyle("borderBottomColor"),xo=createBorderStyle("borderLeftColor"),ko=createBorderStyle("outline",borderTransform),Co=createBorderStyle("outlineColor"),borderRadius=u=>{if(void 0!==u.borderRadius&&null!==u.borderRadius){const Xe=(0,fr.MA)(u.theme,"shape.borderRadius",4,"borderRadius"),styleFromPropValue=u=>({borderRadius:(0,fr._W)(Xe,u)});return(0,Kr.NI)(u,u.borderRadius,styleFromPropValue)}return null};borderRadius.propTypes={},borderRadius.filterProps=["borderRadius"];Ar(In,no,io,oo,ao,so,co,ho,go,xo,borderRadius,ko,Co);const gap=u=>{if(void 0!==u.gap&&null!==u.gap){const Xe=(0,fr.MA)(u.theme,"spacing",8,"gap"),styleFromPropValue=u=>({gap:(0,fr._W)(Xe,u)});return(0,Kr.NI)(u,u.gap,styleFromPropValue)}return null};gap.propTypes={},gap.filterProps=["gap"];const columnGap=u=>{if(void 0!==u.columnGap&&null!==u.columnGap){const Xe=(0,fr.MA)(u.theme,"spacing",8,"columnGap"),styleFromPropValue=u=>({columnGap:(0,fr._W)(Xe,u)});return(0,Kr.NI)(u,u.columnGap,styleFromPropValue)}return null};columnGap.propTypes={},columnGap.filterProps=["columnGap"];const rowGap=u=>{if(void 0!==u.rowGap&&null!==u.rowGap){const Xe=(0,fr.MA)(u.theme,"spacing",8,"rowGap"),styleFromPropValue=u=>({rowGap:(0,fr._W)(Xe,u)});return(0,Kr.NI)(u,u.rowGap,styleFromPropValue)}return null};rowGap.propTypes={},rowGap.filterProps=["rowGap"];Ar(gap,columnGap,rowGap,(0,_r.Ay)({prop:"gridColumn"}),(0,_r.Ay)({prop:"gridRow"}),(0,_r.Ay)({prop:"gridAutoFlow"}),(0,_r.Ay)({prop:"gridAutoColumns"}),(0,_r.Ay)({prop:"gridAutoRows"}),(0,_r.Ay)({prop:"gridTemplateColumns"}),(0,_r.Ay)({prop:"gridTemplateRows"}),(0,_r.Ay)({prop:"gridTemplateAreas"}),(0,_r.Ay)({prop:"gridArea"}));function paletteTransform(u,Xe){return"grey"===Xe?Xe:u}Ar((0,_r.Ay)({prop:"color",themeKey:"palette",transform:paletteTransform}),(0,_r.Ay)({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:paletteTransform}),(0,_r.Ay)({prop:"backgroundColor",themeKey:"palette",transform:paletteTransform}));function sizingTransform(u){return u<=1&&0!==u?100*u+"%":u}const Io=(0,_r.Ay)({prop:"width",transform:sizingTransform}),maxWidth=u=>{if(void 0!==u.maxWidth&&null!==u.maxWidth){const styleFromPropValue=Xe=>{var Wt,fr;const _r=(null==(Wt=u.theme)||null==(Wt=Wt.breakpoints)||null==(Wt=Wt.values)?void 0:Wt[Xe])||Kr.zu[Xe];return _r?"px"!==(null==(fr=u.theme)||null==(fr=fr.breakpoints)?void 0:fr.unit)?{maxWidth:`${_r}${u.theme.breakpoints.unit}`}:{maxWidth:_r}:{maxWidth:sizingTransform(Xe)}};return(0,Kr.NI)(u,u.maxWidth,styleFromPropValue)}return null};maxWidth.filterProps=["maxWidth"];const zo=(0,_r.Ay)({prop:"minWidth",transform:sizingTransform}),Bo=(0,_r.Ay)({prop:"height",transform:sizingTransform}),ca=(0,_r.Ay)({prop:"maxHeight",transform:sizingTransform}),ua=(0,_r.Ay)({prop:"minHeight",transform:sizingTransform});(0,_r.Ay)({prop:"size",cssProperty:"width",transform:sizingTransform}),(0,_r.Ay)({prop:"size",cssProperty:"height",transform:sizingTransform}),Ar(Io,maxWidth,zo,Bo,ca,ua,(0,_r.Ay)({prop:"boxSizing"}));var Da={border:{themeKey:"borders",transform:borderTransform},borderTop:{themeKey:"borders",transform:borderTransform},borderRight:{themeKey:"borders",transform:borderTransform},borderBottom:{themeKey:"borders",transform:borderTransform},borderLeft:{themeKey:"borders",transform:borderTransform},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:borderTransform},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:borderRadius},color:{themeKey:"palette",transform:paletteTransform},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:paletteTransform},backgroundColor:{themeKey:"palette",transform:paletteTransform},p:{style:fr.Ms},pt:{style:fr.Ms},pr:{style:fr.Ms},pb:{style:fr.Ms},pl:{style:fr.Ms},px:{style:fr.Ms},py:{style:fr.Ms},padding:{style:fr.Ms},paddingTop:{style:fr.Ms},paddingRight:{style:fr.Ms},paddingBottom:{style:fr.Ms},paddingLeft:{style:fr.Ms},paddingX:{style:fr.Ms},paddingY:{style:fr.Ms},paddingInline:{style:fr.Ms},paddingInlineStart:{style:fr.Ms},paddingInlineEnd:{style:fr.Ms},paddingBlock:{style:fr.Ms},paddingBlockStart:{style:fr.Ms},paddingBlockEnd:{style:fr.Ms},m:{style:fr.Lc},mt:{style:fr.Lc},mr:{style:fr.Lc},mb:{style:fr.Lc},ml:{style:fr.Lc},mx:{style:fr.Lc},my:{style:fr.Lc},margin:{style:fr.Lc},marginTop:{style:fr.Lc},marginRight:{style:fr.Lc},marginBottom:{style:fr.Lc},marginLeft:{style:fr.Lc},marginX:{style:fr.Lc},marginY:{style:fr.Lc},marginInline:{style:fr.Lc},marginInlineStart:{style:fr.Lc},marginInlineEnd:{style:fr.Lc},marginBlock:{style:fr.Lc},marginBlockStart:{style:fr.Lc},marginBlockEnd:{style:fr.Lc},displayPrint:{cssProperty:!1,transform:u=>({"@media print":{display:u}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:gap},rowGap:{style:rowGap},columnGap:{style:columnGap},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:sizingTransform},maxWidth:{style:maxWidth},minWidth:{transform:sizingTransform},height:{transform:sizingTransform},maxHeight:{transform:sizingTransform},minHeight:{transform:sizingTransform},boxSizing:{},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}}},9599:function(u,Xe,Wt){"use strict";Wt.d(Xe,{A:function(){return extendSxProp}});var fr=Wt(8168),_r=Wt(8587),wr=Wt(1317),Ar=Wt(4188);const Kr=["sx"],splitProps=u=>{var Xe,Wt;const fr={systemProps:{},otherProps:{}},_r=null!=(Xe=null==u||null==(Wt=u.theme)?void 0:Wt.unstable_sxConfig)?Xe:Ar.A;return Object.keys(u).forEach((Xe=>{_r[Xe]?fr.systemProps[Xe]=u[Xe]:fr.otherProps[Xe]=u[Xe]})),fr};function extendSxProp(u){const{sx:Xe}=u,Wt=(0,_r.A)(u,Kr),{systemProps:Ar,otherProps:In}=splitProps(Wt);let no;return no=Array.isArray(Xe)?[Ar,...Xe]:"function"==typeof Xe?(...u)=>{const Wt=Xe(...u);return(0,wr.Q)(Wt)?(0,fr.A)({},Ar,Wt):Ar}:(0,fr.A)({},Ar,Xe),(0,fr.A)({},In,{sx:no})}},3857:function(u,Xe,Wt){"use strict";Wt.r(Xe),Wt.d(Xe,{default:function(){return fr.A},extendSxProp:function(){return _r.A},unstable_createStyleFunctionSx:function(){return fr.k},unstable_defaultSxConfig:function(){return wr.A}});var fr=Wt(3571),_r=Wt(9599),wr=Wt(4188)},3571:function(u,Xe,Wt){"use strict";Wt.d(Xe,{k:function(){return unstable_createStyleFunctionSx}});var fr=Wt(3967),_r=Wt(4620),wr=Wt(6481),Ar=Wt(9452),Kr=Wt(4188);function unstable_createStyleFunctionSx(){function getThemeValue(u,Xe,Wt,_r){const Kr={[u]:Xe,theme:Wt},In=_r[u];if(!In)return{[u]:Xe};const{cssProperty:no=u,themeKey:io,transform:oo,style:ao}=In;if(null==Xe)return null;if("typography"===io&&"inherit"===Xe)return{[u]:Xe};const so=(0,wr.Yn)(Wt,io)||{};if(ao)return ao(Kr);return(0,Ar.NI)(Kr,Xe,(Xe=>{let Wt=(0,wr.BO)(so,oo,Xe);return Xe===Wt&&"string"==typeof Xe&&(Wt=(0,wr.BO)(so,oo,`${u}${"default"===Xe?"":(0,fr.A)(Xe)}`,Xe)),!1===no?Wt:{[no]:Wt}}))}return function styleFunctionSx(u){var Xe;const{sx:Wt,theme:fr={}}=u||{};if(!Wt)return null;const wr=null!=(Xe=fr.unstable_sxConfig)?Xe:Kr.A;function traverse(u){let Xe=u;if("function"==typeof u)Xe=u(fr);else if("object"!=typeof u)return u;if(!Xe)return null;const Wt=(0,Ar.EU)(fr.breakpoints),Kr=Object.keys(Wt);let In=Wt;return Object.keys(Xe).forEach((u=>{const Wt=function callIfFn(u,Xe){return"function"==typeof u?u(Xe):u}(Xe[u],fr);if(null!=Wt)if("object"==typeof Wt)if(wr[u])In=(0,_r.A)(In,getThemeValue(u,Wt,fr,wr));else{const Xe=(0,Ar.NI)({theme:fr},Wt,(Xe=>({[u]:Xe})));!function objectsHaveSameKeys(...u){const Xe=u.reduce(((u,Xe)=>u.concat(Object.keys(Xe))),[]),Wt=new Set(Xe);return u.every((u=>Wt.size===Object.keys(u).length))}(Xe,Wt)?In=(0,_r.A)(In,Xe):In[u]=styleFunctionSx({sx:Wt,theme:fr})}else In=(0,_r.A)(In,getThemeValue(u,Wt,fr,wr))})),(0,Ar.vf)(Kr,In)}return Array.isArray(Wt)?Wt.map(traverse):traverse(Wt)}}const In=unstable_createStyleFunctionSx();In.filterProps=["sx"],Xe.A=In},2923:function(u,Xe,Wt){"use strict";Xe.A=void 0;var fr=function _interopRequireWildcard(u,Xe){if(!Xe&&u&&u.__esModule)return u;if(null===u||"object"!=typeof u&&"function"!=typeof u)return{default:u};var Wt=_getRequireWildcardCache(Xe);if(Wt&&Wt.has(u))return Wt.get(u);var fr={__proto__:null},_r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var wr in u)if("default"!==wr&&Object.prototype.hasOwnProperty.call(u,wr)){var Ar=_r?Object.getOwnPropertyDescriptor(u,wr):null;Ar&&(Ar.get||Ar.set)?Object.defineProperty(fr,wr,Ar):fr[wr]=u[wr]}return fr.default=u,Wt&&Wt.set(u,fr),fr}(Wt(6540)),_r=Wt(2532);function _getRequireWildcardCache(u){if("function"!=typeof WeakMap)return null;var Xe=new WeakMap,Wt=new WeakMap;return(_getRequireWildcardCache=function(u){return u?Wt:Xe})(u)}Xe.A=function useTheme(u=null){const Xe=fr.useContext(_r.ThemeContext);return!Xe||function isObjectEmpty(u){return 0===Object.keys(u).length}(Xe)?u:Xe}},9071:function(u,Xe){"use strict";const defaultGenerator=u=>u,Wt=(()=>{let u=defaultGenerator;return{configure(Xe){u=Xe},generate:Xe=>u(Xe),reset(){u=defaultGenerator}}})();Xe.A=Wt},3967:function(u,Xe,Wt){"use strict";Wt.d(Xe,{A:function(){return capitalize}});var fr=Wt(9453);function capitalize(u){if("string"!=typeof u)throw new Error((0,fr.A)(7));return u.charAt(0).toUpperCase()+u.slice(1)}},7149:function(u,Xe,Wt){"use strict";Wt.r(Xe),Wt.d(Xe,{default:function(){return fr.A}});var fr=Wt(3967)},7535:function(u,Xe,Wt){"use strict";Wt.r(Xe),Wt.d(Xe,{default:function(){return fr}});var fr=function clamp(u,Xe=Number.MIN_SAFE_INTEGER,Wt=Number.MAX_SAFE_INTEGER){return Math.max(Xe,Math.min(u,Wt))}},5659:function(u,Xe,Wt){"use strict";function composeClasses(u,Xe,Wt=void 0){const fr={};return Object.keys(u).forEach((_r=>{fr[_r]=u[_r].reduce(((u,fr)=>{if(fr){const _r=Xe(fr);""!==_r&&u.push(_r),Wt&&Wt[fr]&&u.push(Wt[fr])}return u}),[]).join(" ")})),fr}Wt.d(Xe,{A:function(){return composeClasses}})},6673:function(u,Xe,Wt){"use strict";function createChainedFunction(...u){return u.reduce(((u,Xe)=>null==Xe?u:function chainedFunction(...Wt){u.apply(this,Wt),Xe.apply(this,Wt)}),(()=>{}))}Wt.d(Xe,{A:function(){return createChainedFunction}})},4705:function(u,Xe,Wt){"use strict";function debounce(u,Xe=166){let Wt;function debounced(...fr){clearTimeout(Wt),Wt=setTimeout((()=>{u.apply(this,fr)}),Xe)}return debounced.clear=()=>{clearTimeout(Wt)},debounced}Wt.d(Xe,{A:function(){return debounce}})},1317:function(u,Xe,Wt){"use strict";Wt.d(Xe,{A:function(){return deepmerge},Q:function(){return isPlainObject}});var fr=Wt(8168);function isPlainObject(u){if("object"!=typeof u||null===u)return!1;const Xe=Object.getPrototypeOf(u);return!(null!==Xe&&Xe!==Object.prototype&&null!==Object.getPrototypeOf(Xe)||Symbol.toStringTag in u||Symbol.iterator in u)}function deepClone(u){if(!isPlainObject(u))return u;const Xe={};return Object.keys(u).forEach((Wt=>{Xe[Wt]=deepClone(u[Wt])})),Xe}function deepmerge(u,Xe,Wt={clone:!0}){const _r=Wt.clone?(0,fr.A)({},u):u;return isPlainObject(u)&&isPlainObject(Xe)&&Object.keys(Xe).forEach((fr=>{isPlainObject(Xe[fr])&&Object.prototype.hasOwnProperty.call(u,fr)&&isPlainObject(u[fr])?_r[fr]=deepmerge(u[fr],Xe[fr],Wt):Wt.clone?_r[fr]=isPlainObject(Xe[fr])?deepClone(Xe[fr]):Xe[fr]:_r[fr]=Xe[fr]})),_r}},4239:function(u,Xe,Wt){"use strict";Wt.r(Xe),Wt.d(Xe,{default:function(){return fr.A},isPlainObject:function(){return fr.Q}});var fr=Wt(1317)},9453:function(u,Xe,Wt){"use strict";function formatMuiErrorMessage(u){let Xe="https://mui.com/production-error/?code="+u;for(let u=1;u<arguments.length;u+=1)Xe+="&args[]="+encodeURIComponent(arguments[u]);return"Minified MUI error #"+u+"; visit "+Xe+" for the full message."}Wt.d(Xe,{A:function(){return formatMuiErrorMessage}})},8944:function(u,Xe,Wt){"use strict";Wt.r(Xe),Wt.d(Xe,{default:function(){return fr.A}});var fr=Wt(9453)},1609:function(u,Xe,Wt){"use strict";Wt.d(Xe,{Ay:function(){return generateUtilityClass}});var fr=Wt(9071);const _r={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function generateUtilityClass(u,Xe,Wt="Mui"){const wr=_r[Xe];return wr?`${Wt}-${wr}`:`${fr.A.generate(u)}-${Xe}`}},8413:function(u,Xe,Wt){"use strict";Wt.d(Xe,{A:function(){return generateUtilityClasses}});var fr=Wt(1609);function generateUtilityClasses(u,Xe,Wt="Mui"){const _r={};return Xe.forEach((Xe=>{_r[Xe]=(0,fr.Ay)(u,Xe,Wt)})),_r}},7320:function(u,Xe,Wt){"use strict";Wt.r(Xe),Wt.d(Xe,{default:function(){return getDisplayName},getFunctionName:function(){return getFunctionName}});var fr=Wt(4363);const _r=/^\s*function(?:\s|\s*\/\*.*\*\/\s*)+([^(\s/]*)\s*/;function getFunctionName(u){const Xe=`${u}`.match(_r);return Xe&&Xe[1]||""}function getFunctionComponentName(u,Xe=""){return u.displayName||u.name||getFunctionName(u)||Xe}function getWrappedName(u,Xe,Wt){const fr=getFunctionComponentName(Xe);return u.displayName||(""!==fr?`${Wt}(${fr})`:Wt)}function getDisplayName(u){if(null!=u){if("string"==typeof u)return u;if("function"==typeof u)return getFunctionComponentName(u,"Component");if("object"==typeof u)switch(u.$$typeof){case fr.ForwardRef:return getWrappedName(u,u.render,"ForwardRef");case fr.Memo:return getWrappedName(u,u.type,"memo");default:return}}}},2325:function(u,Xe,Wt){"use strict";function ownerDocument(u){return u&&u.ownerDocument||document}Wt.d(Xe,{A:function(){return ownerDocument}})},4877:function(u,Xe,Wt){"use strict";Wt.d(Xe,{A:function(){return ownerWindow}});var fr=Wt(2325);function ownerWindow(u){return(0,fr.A)(u).defaultView||window}},7379:function(u,Xe,Wt){"use strict";Wt.d(Xe,{A:function(){return resolveProps}});var fr=Wt(8168);function resolveProps(u,Xe){const Wt=(0,fr.A)({},Xe);return Object.keys(u).forEach((_r=>{if(_r.toString().match(/^(components|slots)$/))Wt[_r]=(0,fr.A)({},u[_r],Wt[_r]);else if(_r.toString().match(/^(componentsProps|slotProps)$/)){const wr=u[_r]||{},Ar=Xe[_r];Wt[_r]={},Ar&&Object.keys(Ar)?wr&&Object.keys(wr)?(Wt[_r]=(0,fr.A)({},Ar),Object.keys(wr).forEach((u=>{Wt[_r][u]=resolveProps(wr[u],Ar[u])}))):Wt[_r]=Ar:Wt[_r]=wr}else void 0===Wt[_r]&&(Wt[_r]=u[_r])})),Wt}},7365:function(u,Xe,Wt){"use strict";function setRef(u,Xe){"function"==typeof u?u(Xe):u&&(u.current=Xe)}Wt.d(Xe,{A:function(){return setRef}})},1529:function(u,Xe,Wt){"use strict";var fr=Wt(6540);const _r="undefined"!=typeof window?fr.useLayoutEffect:fr.useEffect;Xe.A=_r},1547:function(u,Xe,Wt){"use strict";var fr=Wt(6540),_r=Wt(1529);Xe.A=function useEventCallback(u){const Xe=fr.useRef(u);return(0,_r.A)((()=>{Xe.current=u})),fr.useRef(((...u)=>(0,Xe.current)(...u))).current}},1523:function(u,Xe,Wt){"use strict";Wt.d(Xe,{A:function(){return useForkRef}});var fr=Wt(6540),_r=Wt(7365);function useForkRef(...u){return fr.useMemo((()=>u.every((u=>null==u))?null:Xe=>{u.forEach((u=>{(0,_r.A)(u,Xe)}))}),u)}},4661:function(u,Xe,Wt){"use strict";var fr;Wt.d(Xe,{A:function(){return useId}});var _r=Wt(6540);let wr=0;const Ar=(fr||(fr=Wt.t(_r,2)))["useId".toString()];function useId(u){if(void 0!==Ar){const Xe=Ar();return null!=u?u:Xe}return function useGlobalId(u){const[Xe,Wt]=_r.useState(u),fr=u||Xe;return _r.useEffect((()=>{null==Xe&&(wr+=1,Wt(`mui-${wr}`))}),[Xe]),fr}(u)}},3068:function(u,Xe,Wt){"use strict";Wt.d(Xe,{E:function(){return Timeout},A:function(){return useTimeout}});var fr=Wt(6540);const _r={};const wr=[];class Timeout{constructor(){this.currentId=null,this.clear=()=>{null!==this.currentId&&(clearTimeout(this.currentId),this.currentId=null)},this.disposeEffect=()=>this.clear}static create(){return new Timeout}start(u,Xe){this.clear(),this.currentId=setTimeout((()=>{this.currentId=null,Xe()}),u)}}function useTimeout(){const u=function useLazyRef(u,Xe){const Wt=fr.useRef(_r);return Wt.current===_r&&(Wt.current=u(Xe)),Wt}(Timeout.create).current;return function useOnMount(u){fr.useEffect(u,wr)}(u.disposeEffect),u}},1508:function(u){function r(u){var Xe,Wt,fr="";if("string"==typeof u||"number"==typeof u)fr+=u;else if("object"==typeof u)if(Array.isArray(u)){var _r=u.length;for(Xe=0;Xe<_r;Xe++)u[Xe]&&(Wt=r(u[Xe]))&&(fr&&(fr+=" "),fr+=Wt)}else for(Wt in u)u[Wt]&&(fr&&(fr+=" "),fr+=Wt);return fr}function e(){for(var u,Xe,Wt=0,fr="",_r=arguments.length;Wt<_r;Wt++)(u=arguments[Wt])&&(Xe=r(u))&&(fr&&(fr+=" "),fr+=Xe);return fr}u.exports=e,u.exports.clsx=e},4146:function(u,Xe,Wt){"use strict";var fr=Wt(4363),_r={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},wr={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},Ar={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Kr={};function getStatics(u){return fr.isMemo(u)?Ar:Kr[u.$$typeof]||_r}Kr[fr.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},Kr[fr.Memo]=Ar;var In=Object.defineProperty,no=Object.getOwnPropertyNames,io=Object.getOwnPropertySymbols,oo=Object.getOwnPropertyDescriptor,ao=Object.getPrototypeOf,so=Object.prototype;u.exports=function hoistNonReactStatics(u,Xe,Wt){if("string"!=typeof Xe){if(so){var fr=ao(Xe);fr&&fr!==so&&hoistNonReactStatics(u,fr,Wt)}var _r=no(Xe);io&&(_r=_r.concat(io(Xe)));for(var Ar=getStatics(u),Kr=getStatics(Xe),co=0;co<_r.length;++co){var ho=_r[co];if(!(wr[ho]||Wt&&Wt[ho]||Kr&&Kr[ho]||Ar&&Ar[ho])){var go=oo(Xe,ho);try{In(u,ho,go)}catch(u){}}}}return u}},2694:function(u,Xe,Wt){"use strict";var fr=Wt(6925);function emptyFunction(){}function emptyFunctionWithReset(){}emptyFunctionWithReset.resetWarningCache=emptyFunction,u.exports=function(){function shim(u,Xe,Wt,_r,wr,Ar){if(Ar!==fr){var Kr=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw Kr.name="Invariant Violation",Kr}}function getShim(){return shim}shim.isRequired=shim;var u={array:shim,bigint:shim,bool:shim,func:shim,number:shim,object:shim,string:shim,symbol:shim,any:shim,arrayOf:getShim,element:shim,elementType:shim,instanceOf:getShim,node:shim,objectOf:getShim,oneOf:getShim,oneOfType:getShim,shape:getShim,exact:getShim,checkPropTypes:emptyFunctionWithReset,resetWarningCache:emptyFunction};return u.PropTypes=u,u}},5556:function(u,Xe,Wt){u.exports=Wt(2694)()},6925:function(u){"use strict";u.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},2551:function(u,Xe,Wt){"use strict";var fr=Wt(6540),_r=Wt(9982);function p(u){for(var Xe="https://reactjs.org/docs/error-decoder.html?invariant="+u,Wt=1;Wt<arguments.length;Wt++)Xe+="&args[]="+encodeURIComponent(arguments[Wt]);return"Minified React error #"+u+"; visit "+Xe+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var wr=new Set,Ar={};function fa(u,Xe){ha(u,Xe),ha(u+"Capture",Xe)}function ha(u,Xe){for(Ar[u]=Xe,u=0;u<Xe.length;u++)wr.add(Xe[u])}var Kr=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),In=Object.prototype.hasOwnProperty,no=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,io={},oo={};function v(u,Xe,Wt,fr,_r,wr,Ar){this.acceptsBooleans=2===Xe||3===Xe||4===Xe,this.attributeName=fr,this.attributeNamespace=_r,this.mustUseProperty=Wt,this.propertyName=u,this.type=Xe,this.sanitizeURL=wr,this.removeEmptyString=Ar}var ao={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(u){ao[u]=new v(u,0,!1,u,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(u){var Xe=u[0];ao[Xe]=new v(Xe,1,!1,u[1],null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(u){ao[u]=new v(u,2,!1,u.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(u){ao[u]=new v(u,2,!1,u,null,!1,!1)})),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(u){ao[u]=new v(u,3,!1,u.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((function(u){ao[u]=new v(u,3,!0,u,null,!1,!1)})),["capture","download"].forEach((function(u){ao[u]=new v(u,4,!1,u,null,!1,!1)})),["cols","rows","size","span"].forEach((function(u){ao[u]=new v(u,6,!1,u,null,!1,!1)})),["rowSpan","start"].forEach((function(u){ao[u]=new v(u,5,!1,u.toLowerCase(),null,!1,!1)}));var so=/[\-:]([a-z])/g;function sa(u){return u[1].toUpperCase()}function ta(u,Xe,Wt,fr){var _r=ao.hasOwnProperty(Xe)?ao[Xe]:null;(null!==_r?0!==_r.type:fr||!(2<Xe.length)||"o"!==Xe[0]&&"O"!==Xe[0]||"n"!==Xe[1]&&"N"!==Xe[1])&&(function qa(u,Xe,Wt,fr){if(null==Xe||function pa(u,Xe,Wt,fr){if(null!==Wt&&0===Wt.type)return!1;switch(typeof Xe){case"function":case"symbol":return!0;case"boolean":return!fr&&(null!==Wt?!Wt.acceptsBooleans:"data-"!==(u=u.toLowerCase().slice(0,5))&&"aria-"!==u);default:return!1}}(u,Xe,Wt,fr))return!0;if(fr)return!1;if(null!==Wt)switch(Wt.type){case 3:return!Xe;case 4:return!1===Xe;case 5:return isNaN(Xe);case 6:return isNaN(Xe)||1>Xe}return!1}(Xe,Wt,_r,fr)&&(Wt=null),fr||null===_r?function oa(u){return!!In.call(oo,u)||!In.call(io,u)&&(no.test(u)?oo[u]=!0:(io[u]=!0,!1))}(Xe)&&(null===Wt?u.removeAttribute(Xe):u.setAttribute(Xe,""+Wt)):_r.mustUseProperty?u[_r.propertyName]=null===Wt?3!==_r.type&&"":Wt:(Xe=_r.attributeName,fr=_r.attributeNamespace,null===Wt?u.removeAttribute(Xe):(Wt=3===(_r=_r.type)||4===_r&&!0===Wt?"":""+Wt,fr?u.setAttributeNS(fr,Xe,Wt):u.setAttribute(Xe,Wt))))}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(u){var Xe=u.replace(so,sa);ao[Xe]=new v(Xe,1,!1,u,null,!1,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(u){var Xe=u.replace(so,sa);ao[Xe]=new v(Xe,1,!1,u,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((function(u){var Xe=u.replace(so,sa);ao[Xe]=new v(Xe,1,!1,u,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(u){ao[u]=new v(u,1,!1,u.toLowerCase(),null,!1,!1)})),ao.xlinkHref=new v("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(u){ao[u]=new v(u,1,!1,u.toLowerCase(),null,!0,!0)}));var co=fr.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,ho=Symbol.for("react.element"),go=Symbol.for("react.portal"),xo=Symbol.for("react.fragment"),ko=Symbol.for("react.strict_mode"),Co=Symbol.for("react.profiler"),Io=Symbol.for("react.provider"),zo=Symbol.for("react.context"),Bo=Symbol.for("react.forward_ref"),ca=Symbol.for("react.suspense"),ua=Symbol.for("react.suspense_list"),Da=Symbol.for("react.memo"),ns=Symbol.for("react.lazy");Symbol.for("react.scope"),Symbol.for("react.debug_trace_mode");var yl=Symbol.for("react.offscreen");Symbol.for("react.legacy_hidden"),Symbol.for("react.cache"),Symbol.for("react.tracing_marker");var vl=Symbol.iterator;function Ka(u){return null===u||"object"!=typeof u?null:"function"==typeof(u=vl&&u[vl]||u["@@iterator"])?u:null}var kl,Al=Object.assign;function Ma(u){if(void 0===kl)try{throw Error()}catch(u){var Xe=u.stack.trim().match(/\n( *(at )?)/);kl=Xe&&Xe[1]||""}return"\n"+kl+u}var Ml=!1;function Oa(u,Xe){if(!u||Ml)return"";Ml=!0;var Wt=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(Xe)if(Xe=function(){throw Error()},Object.defineProperty(Xe.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(Xe,[])}catch(u){var fr=u}Reflect.construct(u,[],Xe)}else{try{Xe.call()}catch(u){fr=u}u.call(Xe.prototype)}else{try{throw Error()}catch(u){fr=u}u()}}catch(Xe){if(Xe&&fr&&"string"==typeof Xe.stack){for(var _r=Xe.stack.split("\n"),wr=fr.stack.split("\n"),Ar=_r.length-1,Kr=wr.length-1;1<=Ar&&0<=Kr&&_r[Ar]!==wr[Kr];)Kr--;for(;1<=Ar&&0<=Kr;Ar--,Kr--)if(_r[Ar]!==wr[Kr]){if(1!==Ar||1!==Kr)do{if(Ar--,0>--Kr||_r[Ar]!==wr[Kr]){var In="\n"+_r[Ar].replace(" at new "," at ");return u.displayName&&In.includes("<anonymous>")&&(In=In.replace("<anonymous>",u.displayName)),In}}while(1<=Ar&&0<=Kr);break}}}finally{Ml=!1,Error.prepareStackTrace=Wt}return(u=u?u.displayName||u.name:"")?Ma(u):""}function Pa(u){switch(u.tag){case 5:return Ma(u.type);case 16:return Ma("Lazy");case 13:return Ma("Suspense");case 19:return Ma("SuspenseList");case 0:case 2:case 15:return u=Oa(u.type,!1);case 11:return u=Oa(u.type.render,!1);case 1:return u=Oa(u.type,!0);default:return""}}function Qa(u){if(null==u)return null;if("function"==typeof u)return u.displayName||u.name||null;if("string"==typeof u)return u;switch(u){case xo:return"Fragment";case go:return"Portal";case Co:return"Profiler";case ko:return"StrictMode";case ca:return"Suspense";case ua:return"SuspenseList"}if("object"==typeof u)switch(u.$$typeof){case zo:return(u.displayName||"Context")+".Consumer";case Io:return(u._context.displayName||"Context")+".Provider";case Bo:var Xe=u.render;return(u=u.displayName)||(u=""!==(u=Xe.displayName||Xe.name||"")?"ForwardRef("+u+")":"ForwardRef"),u;case Da:return null!==(Xe=u.displayName||null)?Xe:Qa(u.type)||"Memo";case ns:Xe=u._payload,u=u._init;try{return Qa(u(Xe))}catch(u){}}return null}function Ra(u){var Xe=u.type;switch(u.tag){case 24:return"Cache";case 9:return(Xe.displayName||"Context")+".Consumer";case 10:return(Xe._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return u=(u=Xe.render).displayName||u.name||"",Xe.displayName||(""!==u?"ForwardRef("+u+")":"ForwardRef");case 7:return"Fragment";case 5:return Xe;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Qa(Xe);case 8:return Xe===ko?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if("function"==typeof Xe)return Xe.displayName||Xe.name||null;if("string"==typeof Xe)return Xe}return null}function Sa(u){switch(typeof u){case"boolean":case"number":case"string":case"undefined":case"object":return u;default:return""}}function Ta(u){var Xe=u.type;return(u=u.nodeName)&&"input"===u.toLowerCase()&&("checkbox"===Xe||"radio"===Xe)}function Va(u){u._valueTracker||(u._valueTracker=function Ua(u){var Xe=Ta(u)?"checked":"value",Wt=Object.getOwnPropertyDescriptor(u.constructor.prototype,Xe),fr=""+u[Xe];if(!u.hasOwnProperty(Xe)&&void 0!==Wt&&"function"==typeof Wt.get&&"function"==typeof Wt.set){var _r=Wt.get,wr=Wt.set;return Object.defineProperty(u,Xe,{configurable:!0,get:function(){return _r.call(this)},set:function(u){fr=""+u,wr.call(this,u)}}),Object.defineProperty(u,Xe,{enumerable:Wt.enumerable}),{getValue:function(){return fr},setValue:function(u){fr=""+u},stopTracking:function(){u._valueTracker=null,delete u[Xe]}}}}(u))}function Wa(u){if(!u)return!1;var Xe=u._valueTracker;if(!Xe)return!0;var Wt=Xe.getValue(),fr="";return u&&(fr=Ta(u)?u.checked?"true":"false":u.value),(u=fr)!==Wt&&(Xe.setValue(u),!0)}function Xa(u){if(void 0===(u=u||("undefined"!=typeof document?document:void 0)))return null;try{return u.activeElement||u.body}catch(Xe){return u.body}}function Ya(u,Xe){var Wt=Xe.checked;return Al({},Xe,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=Wt?Wt:u._wrapperState.initialChecked})}function Za(u,Xe){var Wt=null==Xe.defaultValue?"":Xe.defaultValue,fr=null!=Xe.checked?Xe.checked:Xe.defaultChecked;Wt=Sa(null!=Xe.value?Xe.value:Wt),u._wrapperState={initialChecked:fr,initialValue:Wt,controlled:"checkbox"===Xe.type||"radio"===Xe.type?null!=Xe.checked:null!=Xe.value}}function ab(u,Xe){null!=(Xe=Xe.checked)&&ta(u,"checked",Xe,!1)}function bb(u,Xe){ab(u,Xe);var Wt=Sa(Xe.value),fr=Xe.type;if(null!=Wt)"number"===fr?(0===Wt&&""===u.value||u.value!=Wt)&&(u.value=""+Wt):u.value!==""+Wt&&(u.value=""+Wt);else if("submit"===fr||"reset"===fr)return void u.removeAttribute("value");Xe.hasOwnProperty("value")?cb(u,Xe.type,Wt):Xe.hasOwnProperty("defaultValue")&&cb(u,Xe.type,Sa(Xe.defaultValue)),null==Xe.checked&&null!=Xe.defaultChecked&&(u.defaultChecked=!!Xe.defaultChecked)}function db(u,Xe,Wt){if(Xe.hasOwnProperty("value")||Xe.hasOwnProperty("defaultValue")){var fr=Xe.type;if(!("submit"!==fr&&"reset"!==fr||void 0!==Xe.value&&null!==Xe.value))return;Xe=""+u._wrapperState.initialValue,Wt||Xe===u.value||(u.value=Xe),u.defaultValue=Xe}""!==(Wt=u.name)&&(u.name=""),u.defaultChecked=!!u._wrapperState.initialChecked,""!==Wt&&(u.name=Wt)}function cb(u,Xe,Wt){"number"===Xe&&Xa(u.ownerDocument)===u||(null==Wt?u.defaultValue=""+u._wrapperState.initialValue:u.defaultValue!==""+Wt&&(u.defaultValue=""+Wt))}var Rl=Array.isArray;function fb(u,Xe,Wt,fr){if(u=u.options,Xe){Xe={};for(var _r=0;_r<Wt.length;_r++)Xe["$"+Wt[_r]]=!0;for(Wt=0;Wt<u.length;Wt++)_r=Xe.hasOwnProperty("$"+u[Wt].value),u[Wt].selected!==_r&&(u[Wt].selected=_r),_r&&fr&&(u[Wt].defaultSelected=!0)}else{for(Wt=""+Sa(Wt),Xe=null,_r=0;_r<u.length;_r++){if(u[_r].value===Wt)return u[_r].selected=!0,void(fr&&(u[_r].defaultSelected=!0));null!==Xe||u[_r].disabled||(Xe=u[_r])}null!==Xe&&(Xe.selected=!0)}}function gb(u,Xe){if(null!=Xe.dangerouslySetInnerHTML)throw Error(p(91));return Al({},Xe,{value:void 0,defaultValue:void 0,children:""+u._wrapperState.initialValue})}function hb(u,Xe){var Wt=Xe.value;if(null==Wt){if(Wt=Xe.children,Xe=Xe.defaultValue,null!=Wt){if(null!=Xe)throw Error(p(92));if(Rl(Wt)){if(1<Wt.length)throw Error(p(93));Wt=Wt[0]}Xe=Wt}null==Xe&&(Xe=""),Wt=Xe}u._wrapperState={initialValue:Sa(Wt)}}function ib(u,Xe){var Wt=Sa(Xe.value),fr=Sa(Xe.defaultValue);null!=Wt&&((Wt=""+Wt)!==u.value&&(u.value=Wt),null==Xe.defaultValue&&u.defaultValue!==Wt&&(u.defaultValue=Wt)),null!=fr&&(u.defaultValue=""+fr)}function jb(u){var Xe=u.textContent;Xe===u._wrapperState.initialValue&&""!==Xe&&null!==Xe&&(u.value=Xe)}function kb(u){switch(u){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function lb(u,Xe){return null==u||"http://www.w3.org/1999/xhtml"===u?kb(Xe):"http://www.w3.org/2000/svg"===u&&"foreignObject"===Xe?"http://www.w3.org/1999/xhtml":u}var Ol,Ll,Dl=(Ll=function(u,Xe){if("http://www.w3.org/2000/svg"!==u.namespaceURI||"innerHTML"in u)u.innerHTML=Xe;else{for((Ol=Ol||document.createElement("div")).innerHTML="<svg>"+Xe.valueOf().toString()+"</svg>",Xe=Ol.firstChild;u.firstChild;)u.removeChild(u.firstChild);for(;Xe.firstChild;)u.appendChild(Xe.firstChild)}},"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(u,Xe,Wt,fr){MSApp.execUnsafeLocalFunction((function(){return Ll(u,Xe)}))}:Ll);function ob(u,Xe){if(Xe){var Wt=u.firstChild;if(Wt&&Wt===u.lastChild&&3===Wt.nodeType)return void(Wt.nodeValue=Xe)}u.textContent=Xe}var Bl={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Nl=["Webkit","ms","Moz","O"];function rb(u,Xe,Wt){return null==Xe||"boolean"==typeof Xe||""===Xe?"":Wt||"number"!=typeof Xe||0===Xe||Bl.hasOwnProperty(u)&&Bl[u]?(""+Xe).trim():Xe+"px"}function sb(u,Xe){for(var Wt in u=u.style,Xe)if(Xe.hasOwnProperty(Wt)){var fr=0===Wt.indexOf("--"),_r=rb(Wt,Xe[Wt],fr);"float"===Wt&&(Wt="cssFloat"),fr?u.setProperty(Wt,_r):u[Wt]=_r}}Object.keys(Bl).forEach((function(u){Nl.forEach((function(Xe){Xe=Xe+u.charAt(0).toUpperCase()+u.substring(1),Bl[Xe]=Bl[u]}))}));var Vl=Al({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function ub(u,Xe){if(Xe){if(Vl[u]&&(null!=Xe.children||null!=Xe.dangerouslySetInnerHTML))throw Error(p(137,u));if(null!=Xe.dangerouslySetInnerHTML){if(null!=Xe.children)throw Error(p(60));if("object"!=typeof Xe.dangerouslySetInnerHTML||!("__html"in Xe.dangerouslySetInnerHTML))throw Error(p(61))}if(null!=Xe.style&&"object"!=typeof Xe.style)throw Error(p(62))}}function vb(u,Xe){if(-1===u.indexOf("-"))return"string"==typeof Xe.is;switch(u){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Ul=null;function xb(u){return(u=u.target||u.srcElement||window).correspondingUseElement&&(u=u.correspondingUseElement),3===u.nodeType?u.parentNode:u}var $l=null,Wl=null,Zl=null;function Bb(u){if(u=Cb(u)){if("function"!=typeof $l)throw Error(p(280));var Xe=u.stateNode;Xe&&(Xe=Db(Xe),$l(u.stateNode,u.type,Xe))}}function Eb(u){Wl?Zl?Zl.push(u):Zl=[u]:Wl=u}function Fb(){if(Wl){var u=Wl,Xe=Zl;if(Zl=Wl=null,Bb(u),Xe)for(u=0;u<Xe.length;u++)Bb(Xe[u])}}function Gb(u,Xe){return u(Xe)}function Hb(){}var Gl=!1;function Jb(u,Xe,Wt){if(Gl)return u(Xe,Wt);Gl=!0;try{return Gb(u,Xe,Wt)}finally{Gl=!1,(null!==Wl||null!==Zl)&&(Hb(),Fb())}}function Kb(u,Xe){var Wt=u.stateNode;if(null===Wt)return null;var fr=Db(Wt);if(null===fr)return null;Wt=fr[Xe];e:switch(Xe){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(fr=!fr.disabled)||(fr=!("button"===(u=u.type)||"input"===u||"select"===u||"textarea"===u)),u=!fr;break e;default:u=!1}if(u)return null;if(Wt&&"function"!=typeof Wt)throw Error(p(231,Xe,typeof Wt));return Wt}var Xl=!1;if(Kr)try{var Jl={};Object.defineProperty(Jl,"passive",{get:function(){Xl=!0}}),window.addEventListener("test",Jl,Jl),window.removeEventListener("test",Jl,Jl)}catch(Ll){Xl=!1}function Nb(u,Xe,Wt,fr,_r,wr,Ar,Kr,In){var no=Array.prototype.slice.call(arguments,3);try{Xe.apply(Wt,no)}catch(u){this.onError(u)}}var Ql=!1,rc=null,ic=!1,oc=null,lc={onError:function(u){Ql=!0,rc=u}};function Tb(u,Xe,Wt,fr,_r,wr,Ar,Kr,In){Ql=!1,rc=null,Nb.apply(lc,arguments)}function Vb(u){var Xe=u,Wt=u;if(u.alternate)for(;Xe.return;)Xe=Xe.return;else{u=Xe;do{!!(4098&(Xe=u).flags)&&(Wt=Xe.return),u=Xe.return}while(u)}return 3===Xe.tag?Wt:null}function Wb(u){if(13===u.tag){var Xe=u.memoizedState;if(null===Xe&&(null!==(u=u.alternate)&&(Xe=u.memoizedState)),null!==Xe)return Xe.dehydrated}return null}function Xb(u){if(Vb(u)!==u)throw Error(p(188))}function Zb(u){return null!==(u=function Yb(u){var Xe=u.alternate;if(!Xe){if(null===(Xe=Vb(u)))throw Error(p(188));return Xe!==u?null:u}for(var Wt=u,fr=Xe;;){var _r=Wt.return;if(null===_r)break;var wr=_r.alternate;if(null===wr){if(null!==(fr=_r.return)){Wt=fr;continue}break}if(_r.child===wr.child){for(wr=_r.child;wr;){if(wr===Wt)return Xb(_r),u;if(wr===fr)return Xb(_r),Xe;wr=wr.sibling}throw Error(p(188))}if(Wt.return!==fr.return)Wt=_r,fr=wr;else{for(var Ar=!1,Kr=_r.child;Kr;){if(Kr===Wt){Ar=!0,Wt=_r,fr=wr;break}if(Kr===fr){Ar=!0,fr=_r,Wt=wr;break}Kr=Kr.sibling}if(!Ar){for(Kr=wr.child;Kr;){if(Kr===Wt){Ar=!0,Wt=wr,fr=_r;break}if(Kr===fr){Ar=!0,fr=wr,Wt=_r;break}Kr=Kr.sibling}if(!Ar)throw Error(p(189))}}if(Wt.alternate!==fr)throw Error(p(190))}if(3!==Wt.tag)throw Error(p(188));return Wt.stateNode.current===Wt?u:Xe}(u))?$b(u):null}function $b(u){if(5===u.tag||6===u.tag)return u;for(u=u.child;null!==u;){var Xe=$b(u);if(null!==Xe)return Xe;u=u.sibling}return null}var gc=_r.unstable_scheduleCallback,bc=_r.unstable_cancelCallback,eu=_r.unstable_shouldYield,tu=_r.unstable_requestPaint,nu=_r.unstable_now,iu=_r.unstable_getCurrentPriorityLevel,su=_r.unstable_ImmediatePriority,cu=_r.unstable_UserBlockingPriority,uu=_r.unstable_NormalPriority,hu=_r.unstable_LowPriority,Iu=_r.unstable_IdlePriority,zu=null,Lu=null;var Du=Math.clz32?Math.clz32:function nc(u){return u>>>=0,0===u?32:31-(Fu(u)/Nu|0)|0},Fu=Math.log,Nu=Math.LN2;var Vu=64,Uu=4194304;function tc(u){switch(u&-u){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return 4194240&u;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return 130023424&u;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return u}}function uc(u,Xe){var Wt=u.pendingLanes;if(0===Wt)return 0;var fr=0,_r=u.suspendedLanes,wr=u.pingedLanes,Ar=268435455&Wt;if(0!==Ar){var Kr=Ar&~_r;0!==Kr?fr=tc(Kr):0!==(wr&=Ar)&&(fr=tc(wr))}else 0!==(Ar=Wt&~_r)?fr=tc(Ar):0!==wr&&(fr=tc(wr));if(0===fr)return 0;if(0!==Xe&&Xe!==fr&&!(Xe&_r)&&((_r=fr&-fr)>=(wr=Xe&-Xe)||16===_r&&4194240&wr))return Xe;if(4&fr&&(fr|=16&Wt),0!==(Xe=u.entangledLanes))for(u=u.entanglements,Xe&=fr;0<Xe;)_r=1<<(Wt=31-Du(Xe)),fr|=u[Wt],Xe&=~_r;return fr}function vc(u,Xe){switch(u){case 1:case 2:case 4:return Xe+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return Xe+5e3;default:return-1}}function xc(u){return 0!==(u=-1073741825&u.pendingLanes)?u:1073741824&u?1073741824:0}function yc(){var u=Vu;return!(4194240&(Vu<<=1))&&(Vu=64),u}function zc(u){for(var Xe=[],Wt=0;31>Wt;Wt++)Xe.push(u);return Xe}function Ac(u,Xe,Wt){u.pendingLanes|=Xe,536870912!==Xe&&(u.suspendedLanes=0,u.pingedLanes=0),(u=u.eventTimes)[Xe=31-Du(Xe)]=Wt}function Cc(u,Xe){var Wt=u.entangledLanes|=Xe;for(u=u.entanglements;Wt;){var fr=31-Du(Wt),_r=1<<fr;_r&Xe|u[fr]&Xe&&(u[fr]|=Xe),Wt&=~_r}}var qu=0;function Dc(u){return 1<(u&=-u)?4<u?268435455&u?16:536870912:4:1}var td,id,sd,ld,cd,ud=!1,dd=[],md=null,yd=null,_d=null,vd=new Map,xd=new Map,wd=[],Sd="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function Sc(u,Xe){switch(u){case"focusin":case"focusout":md=null;break;case"dragenter":case"dragleave":yd=null;break;case"mouseover":case"mouseout":_d=null;break;case"pointerover":case"pointerout":vd.delete(Xe.pointerId);break;case"gotpointercapture":case"lostpointercapture":xd.delete(Xe.pointerId)}}function Tc(u,Xe,Wt,fr,_r,wr){return null===u||u.nativeEvent!==wr?(u={blockedOn:Xe,domEventName:Wt,eventSystemFlags:fr,nativeEvent:wr,targetContainers:[_r]},null!==Xe&&(null!==(Xe=Cb(Xe))&&id(Xe)),u):(u.eventSystemFlags|=fr,Xe=u.targetContainers,null!==_r&&-1===Xe.indexOf(_r)&&Xe.push(_r),u)}function Vc(u){var Xe=Wc(u.target);if(null!==Xe){var Wt=Vb(Xe);if(null!==Wt)if(13===(Xe=Wt.tag)){if(null!==(Xe=Wb(Wt)))return u.blockedOn=Xe,void cd(u.priority,(function(){sd(Wt)}))}else if(3===Xe&&Wt.stateNode.current.memoizedState.isDehydrated)return void(u.blockedOn=3===Wt.tag?Wt.stateNode.containerInfo:null)}u.blockedOn=null}function Xc(u){if(null!==u.blockedOn)return!1;for(var Xe=u.targetContainers;0<Xe.length;){var Wt=Yc(u.domEventName,u.eventSystemFlags,Xe[0],u.nativeEvent);if(null!==Wt)return null!==(Xe=Cb(Wt))&&id(Xe),u.blockedOn=Wt,!1;var fr=new(Wt=u.nativeEvent).constructor(Wt.type,Wt);Ul=fr,Wt.target.dispatchEvent(fr),Ul=null,Xe.shift()}return!0}function Zc(u,Xe,Wt){Xc(u)&&Wt.delete(Xe)}function $c(){ud=!1,null!==md&&Xc(md)&&(md=null),null!==yd&&Xc(yd)&&(yd=null),null!==_d&&Xc(_d)&&(_d=null),vd.forEach(Zc),xd.forEach(Zc)}function ad(u,Xe){u.blockedOn===Xe&&(u.blockedOn=null,ud||(ud=!0,_r.unstable_scheduleCallback(_r.unstable_NormalPriority,$c)))}function bd(u){function b(Xe){return ad(Xe,u)}if(0<dd.length){ad(dd[0],u);for(var Xe=1;Xe<dd.length;Xe++){var Wt=dd[Xe];Wt.blockedOn===u&&(Wt.blockedOn=null)}}for(null!==md&&ad(md,u),null!==yd&&ad(yd,u),null!==_d&&ad(_d,u),vd.forEach(b),xd.forEach(b),Xe=0;Xe<wd.length;Xe++)(Wt=wd[Xe]).blockedOn===u&&(Wt.blockedOn=null);for(;0<wd.length&&null===(Xe=wd[0]).blockedOn;)Vc(Xe),null===Xe.blockedOn&&wd.shift()}var kd=co.ReactCurrentBatchConfig,Ad=!0;function ed(u,Xe,Wt,fr){var _r=qu,wr=kd.transition;kd.transition=null;try{qu=1,fd(u,Xe,Wt,fr)}finally{qu=_r,kd.transition=wr}}function gd(u,Xe,Wt,fr){var _r=qu,wr=kd.transition;kd.transition=null;try{qu=4,fd(u,Xe,Wt,fr)}finally{qu=_r,kd.transition=wr}}function fd(u,Xe,Wt,fr){if(Ad){var _r=Yc(u,Xe,Wt,fr);if(null===_r)hd(u,Xe,fr,Td,Wt),Sc(u,fr);else if(function Uc(u,Xe,Wt,fr,_r){switch(Xe){case"focusin":return md=Tc(md,u,Xe,Wt,fr,_r),!0;case"dragenter":return yd=Tc(yd,u,Xe,Wt,fr,_r),!0;case"mouseover":return _d=Tc(_d,u,Xe,Wt,fr,_r),!0;case"pointerover":var wr=_r.pointerId;return vd.set(wr,Tc(vd.get(wr)||null,u,Xe,Wt,fr,_r)),!0;case"gotpointercapture":return wr=_r.pointerId,xd.set(wr,Tc(xd.get(wr)||null,u,Xe,Wt,fr,_r)),!0}return!1}(_r,u,Xe,Wt,fr))fr.stopPropagation();else if(Sc(u,fr),4&Xe&&-1<Sd.indexOf(u)){for(;null!==_r;){var wr=Cb(_r);if(null!==wr&&td(wr),null===(wr=Yc(u,Xe,Wt,fr))&&hd(u,Xe,fr,Td,Wt),wr===_r)break;_r=wr}null!==_r&&fr.stopPropagation()}else hd(u,Xe,fr,null,Wt)}}var Td=null;function Yc(u,Xe,Wt,fr){if(Td=null,null!==(u=Wc(u=xb(fr))))if(null===(Xe=Vb(u)))u=null;else if(13===(Wt=Xe.tag)){if(null!==(u=Wb(Xe)))return u;u=null}else if(3===Wt){if(Xe.stateNode.current.memoizedState.isDehydrated)return 3===Xe.tag?Xe.stateNode.containerInfo:null;u=null}else Xe!==u&&(u=null);return Td=u,null}function jd(u){switch(u){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(iu()){case su:return 1;case cu:return 4;case uu:case hu:return 16;case Iu:return 536870912;default:return 16}default:return 16}}var Ed=null,Cd=null,Id=null;function nd(){if(Id)return Id;var u,Xe,Wt=Cd,fr=Wt.length,_r="value"in Ed?Ed.value:Ed.textContent,wr=_r.length;for(u=0;u<fr&&Wt[u]===_r[u];u++);var Ar=fr-u;for(Xe=1;Xe<=Ar&&Wt[fr-Xe]===_r[wr-Xe];Xe++);return Id=_r.slice(u,1<Xe?1-Xe:void 0)}function od(u){var Xe=u.keyCode;return"charCode"in u?0===(u=u.charCode)&&13===Xe&&(u=13):u=Xe,10===u&&(u=13),32<=u||13===u?u:0}function pd(){return!0}function qd(){return!1}function rd(u){function b(Xe,Wt,fr,_r,wr){for(var Ar in this._reactName=Xe,this._targetInst=fr,this.type=Wt,this.nativeEvent=_r,this.target=wr,this.currentTarget=null,u)u.hasOwnProperty(Ar)&&(Xe=u[Ar],this[Ar]=Xe?Xe(_r):_r[Ar]);return this.isDefaultPrevented=(null!=_r.defaultPrevented?_r.defaultPrevented:!1===_r.returnValue)?pd:qd,this.isPropagationStopped=qd,this}return Al(b.prototype,{preventDefault:function(){this.defaultPrevented=!0;var u=this.nativeEvent;u&&(u.preventDefault?u.preventDefault():"unknown"!=typeof u.returnValue&&(u.returnValue=!1),this.isDefaultPrevented=pd)},stopPropagation:function(){var u=this.nativeEvent;u&&(u.stopPropagation?u.stopPropagation():"unknown"!=typeof u.cancelBubble&&(u.cancelBubble=!0),this.isPropagationStopped=pd)},persist:function(){},isPersistent:pd}),b}var Md,Rd,Od,Ld={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(u){return u.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Dd=rd(Ld),Fd=Al({},Ld,{view:0,detail:0}),Bd=rd(Fd),Nd=Al({},Fd,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:zd,button:0,buttons:0,relatedTarget:function(u){return void 0===u.relatedTarget?u.fromElement===u.srcElement?u.toElement:u.fromElement:u.relatedTarget},movementX:function(u){return"movementX"in u?u.movementX:(u!==Od&&(Od&&"mousemove"===u.type?(Md=u.screenX-Od.screenX,Rd=u.screenY-Od.screenY):Rd=Md=0,Od=u),Md)},movementY:function(u){return"movementY"in u?u.movementY:Rd}}),Vd=rd(Nd),Ud=rd(Al({},Nd,{dataTransfer:0})),$d=rd(Al({},Fd,{relatedTarget:0})),Wd=rd(Al({},Ld,{animationName:0,elapsedTime:0,pseudoElement:0})),Zd=Al({},Ld,{clipboardData:function(u){return"clipboardData"in u?u.clipboardData:window.clipboardData}}),Hd=rd(Zd),Gd=rd(Al({},Ld,{data:0})),Kd={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Xd={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Yd={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Pd(u){var Xe=this.nativeEvent;return Xe.getModifierState?Xe.getModifierState(u):!!(u=Yd[u])&&!!Xe[u]}function zd(){return Pd}var Jd=Al({},Fd,{key:function(u){if(u.key){var Xe=Kd[u.key]||u.key;if("Unidentified"!==Xe)return Xe}return"keypress"===u.type?13===(u=od(u))?"Enter":String.fromCharCode(u):"keydown"===u.type||"keyup"===u.type?Xd[u.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:zd,charCode:function(u){return"keypress"===u.type?od(u):0},keyCode:function(u){return"keydown"===u.type||"keyup"===u.type?u.keyCode:0},which:function(u){return"keypress"===u.type?od(u):"keydown"===u.type||"keyup"===u.type?u.keyCode:0}}),Qd=rd(Jd),Rh=rd(Al({},Nd,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Oh=rd(Al({},Fd,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:zd})),Lh=rd(Al({},Ld,{propertyName:0,elapsedTime:0,pseudoElement:0})),Dh=Al({},Nd,{deltaX:function(u){return"deltaX"in u?u.deltaX:"wheelDeltaX"in u?-u.wheelDeltaX:0},deltaY:function(u){return"deltaY"in u?u.deltaY:"wheelDeltaY"in u?-u.wheelDeltaY:"wheelDelta"in u?-u.wheelDelta:0},deltaZ:0,deltaMode:0}),Fh=rd(Dh),jh=[9,13,27,32],Hh=Kr&&"CompositionEvent"in window,Gh=null;Kr&&"documentMode"in document&&(Gh=document.documentMode);var Kh=Kr&&"TextEvent"in window&&!Gh,Jh=Kr&&(!Hh||Gh&&8<Gh&&11>=Gh),Qh=String.fromCharCode(32),ep=!1;function ge(u,Xe){switch(u){case"keyup":return-1!==jh.indexOf(Xe.keyCode);case"keydown":return 229!==Xe.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function he(u){return"object"==typeof(u=u.detail)&&"data"in u?u.data:null}var tp=!1;var rp={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function me(u){var Xe=u&&u.nodeName&&u.nodeName.toLowerCase();return"input"===Xe?!!rp[u.type]:"textarea"===Xe}function ne(u,Xe,Wt,fr){Eb(fr),0<(Xe=oe(Xe,"onChange")).length&&(Wt=new Dd("onChange","change",null,Wt,fr),u.push({event:Wt,listeners:Xe}))}var np=null,ip=null;function re(u){se(u,0)}function te(u){if(Wa(ue(u)))return u}function ve(u,Xe){if("change"===u)return Xe}var op=!1;if(Kr){var ap;if(Kr){var sp="oninput"in document;if(!sp){var lp=document.createElement("div");lp.setAttribute("oninput","return;"),sp="function"==typeof lp.oninput}ap=sp}else ap=!1;op=ap&&(!document.documentMode||9<document.documentMode)}function Ae(){np&&(np.detachEvent("onpropertychange",Be),ip=np=null)}function Be(u){if("value"===u.propertyName&&te(ip)){var Xe=[];ne(Xe,ip,u,xb(u)),Jb(re,Xe)}}function Ce(u,Xe,Wt){"focusin"===u?(Ae(),ip=Wt,(np=Xe).attachEvent("onpropertychange",Be)):"focusout"===u&&Ae()}function De(u){if("selectionchange"===u||"keyup"===u||"keydown"===u)return te(ip)}function Ee(u,Xe){if("click"===u)return te(Xe)}function Fe(u,Xe){if("input"===u||"change"===u)return te(Xe)}var cp="function"==typeof Object.is?Object.is:function Ge(u,Xe){return u===Xe&&(0!==u||1/u==1/Xe)||u!=u&&Xe!=Xe};function Ie(u,Xe){if(cp(u,Xe))return!0;if("object"!=typeof u||null===u||"object"!=typeof Xe||null===Xe)return!1;var Wt=Object.keys(u),fr=Object.keys(Xe);if(Wt.length!==fr.length)return!1;for(fr=0;fr<Wt.length;fr++){var _r=Wt[fr];if(!In.call(Xe,_r)||!cp(u[_r],Xe[_r]))return!1}return!0}function Je(u){for(;u&&u.firstChild;)u=u.firstChild;return u}function Ke(u,Xe){var Wt,fr=Je(u);for(u=0;fr;){if(3===fr.nodeType){if(Wt=u+fr.textContent.length,u<=Xe&&Wt>=Xe)return{node:fr,offset:Xe-u};u=Wt}e:{for(;fr;){if(fr.nextSibling){fr=fr.nextSibling;break e}fr=fr.parentNode}fr=void 0}fr=Je(fr)}}function Le(u,Xe){return!(!u||!Xe)&&(u===Xe||(!u||3!==u.nodeType)&&(Xe&&3===Xe.nodeType?Le(u,Xe.parentNode):"contains"in u?u.contains(Xe):!!u.compareDocumentPosition&&!!(16&u.compareDocumentPosition(Xe))))}function Me(){for(var u=window,Xe=Xa();Xe instanceof u.HTMLIFrameElement;){try{var Wt="string"==typeof Xe.contentWindow.location.href}catch(u){Wt=!1}if(!Wt)break;Xe=Xa((u=Xe.contentWindow).document)}return Xe}function Ne(u){var Xe=u&&u.nodeName&&u.nodeName.toLowerCase();return Xe&&("input"===Xe&&("text"===u.type||"search"===u.type||"tel"===u.type||"url"===u.type||"password"===u.type)||"textarea"===Xe||"true"===u.contentEditable)}function Oe(u){var Xe=Me(),Wt=u.focusedElem,fr=u.selectionRange;if(Xe!==Wt&&Wt&&Wt.ownerDocument&&Le(Wt.ownerDocument.documentElement,Wt)){if(null!==fr&&Ne(Wt))if(Xe=fr.start,void 0===(u=fr.end)&&(u=Xe),"selectionStart"in Wt)Wt.selectionStart=Xe,Wt.selectionEnd=Math.min(u,Wt.value.length);else if((u=(Xe=Wt.ownerDocument||document)&&Xe.defaultView||window).getSelection){u=u.getSelection();var _r=Wt.textContent.length,wr=Math.min(fr.start,_r);fr=void 0===fr.end?wr:Math.min(fr.end,_r),!u.extend&&wr>fr&&(_r=fr,fr=wr,wr=_r),_r=Ke(Wt,wr);var Ar=Ke(Wt,fr);_r&&Ar&&(1!==u.rangeCount||u.anchorNode!==_r.node||u.anchorOffset!==_r.offset||u.focusNode!==Ar.node||u.focusOffset!==Ar.offset)&&((Xe=Xe.createRange()).setStart(_r.node,_r.offset),u.removeAllRanges(),wr>fr?(u.addRange(Xe),u.extend(Ar.node,Ar.offset)):(Xe.setEnd(Ar.node,Ar.offset),u.addRange(Xe)))}for(Xe=[],u=Wt;u=u.parentNode;)1===u.nodeType&&Xe.push({element:u,left:u.scrollLeft,top:u.scrollTop});for("function"==typeof Wt.focus&&Wt.focus(),Wt=0;Wt<Xe.length;Wt++)(u=Xe[Wt]).element.scrollLeft=u.left,u.element.scrollTop=u.top}}var dp=Kr&&"documentMode"in document&&11>=document.documentMode,hp=null,pp=null,fp=null,mp=!1;function Ue(u,Xe,Wt){var fr=Wt.window===Wt?Wt.document:9===Wt.nodeType?Wt:Wt.ownerDocument;mp||null==hp||hp!==Xa(fr)||("selectionStart"in(fr=hp)&&Ne(fr)?fr={start:fr.selectionStart,end:fr.selectionEnd}:fr={anchorNode:(fr=(fr.ownerDocument&&fr.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:fr.anchorOffset,focusNode:fr.focusNode,focusOffset:fr.focusOffset},fp&&Ie(fp,fr)||(fp=fr,0<(fr=oe(pp,"onSelect")).length&&(Xe=new Dd("onSelect","select",null,Xe,Wt),u.push({event:Xe,listeners:fr}),Xe.target=hp)))}function Ve(u,Xe){var Wt={};return Wt[u.toLowerCase()]=Xe.toLowerCase(),Wt["Webkit"+u]="webkit"+Xe,Wt["Moz"+u]="moz"+Xe,Wt}var gp={animationend:Ve("Animation","AnimationEnd"),animationiteration:Ve("Animation","AnimationIteration"),animationstart:Ve("Animation","AnimationStart"),transitionend:Ve("Transition","TransitionEnd")},yp={},_p={};function Ze(u){if(yp[u])return yp[u];if(!gp[u])return u;var Xe,Wt=gp[u];for(Xe in Wt)if(Wt.hasOwnProperty(Xe)&&Xe in _p)return yp[u]=Wt[Xe];return u}Kr&&(_p=document.createElement("div").style,"AnimationEvent"in window||(delete gp.animationend.animation,delete gp.animationiteration.animation,delete gp.animationstart.animation),"TransitionEvent"in window||delete gp.transitionend.transition);var vp=Ze("animationend"),bp=Ze("animationiteration"),xp=Ze("animationstart"),wp=Ze("transitionend"),Sp=new Map,kp="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function ff(u,Xe){Sp.set(u,Xe),fa(Xe,[u])}for(var Ap=0;Ap<kp.length;Ap++){var Tp=kp[Ap];ff(Tp.toLowerCase(),"on"+(Tp[0].toUpperCase()+Tp.slice(1)))}ff(vp,"onAnimationEnd"),ff(bp,"onAnimationIteration"),ff(xp,"onAnimationStart"),ff("dblclick","onDoubleClick"),ff("focusin","onFocus"),ff("focusout","onBlur"),ff(wp,"onTransitionEnd"),ha("onMouseEnter",["mouseout","mouseover"]),ha("onMouseLeave",["mouseout","mouseover"]),ha("onPointerEnter",["pointerout","pointerover"]),ha("onPointerLeave",["pointerout","pointerover"]),fa("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),fa("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),fa("onBeforeInput",["compositionend","keypress","textInput","paste"]),fa("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),fa("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),fa("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ep="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Cp=new Set("cancel close invalid load scroll toggle".split(" ").concat(Ep));function nf(u,Xe,Wt){var fr=u.type||"unknown-event";u.currentTarget=Wt,function Ub(u,Xe,Wt,fr,_r,wr,Ar,Kr,In){if(Tb.apply(this,arguments),Ql){if(!Ql)throw Error(p(198));var no=rc;Ql=!1,rc=null,ic||(ic=!0,oc=no)}}(fr,Xe,void 0,u),u.currentTarget=null}function se(u,Xe){Xe=!!(4&Xe);for(var Wt=0;Wt<u.length;Wt++){var fr=u[Wt],_r=fr.event;fr=fr.listeners;e:{var wr=void 0;if(Xe)for(var Ar=fr.length-1;0<=Ar;Ar--){var Kr=fr[Ar],In=Kr.instance,no=Kr.currentTarget;if(Kr=Kr.listener,In!==wr&&_r.isPropagationStopped())break e;nf(_r,Kr,no),wr=In}else for(Ar=0;Ar<fr.length;Ar++){if(In=(Kr=fr[Ar]).instance,no=Kr.currentTarget,Kr=Kr.listener,In!==wr&&_r.isPropagationStopped())break e;nf(_r,Kr,no),wr=In}}}if(ic)throw u=oc,ic=!1,oc=null,u}function D(u,Xe){var Wt=Xe[Up];void 0===Wt&&(Wt=Xe[Up]=new Set);var fr=u+"__bubble";Wt.has(fr)||(pf(Xe,u,2,!1),Wt.add(fr))}function qf(u,Xe,Wt){var fr=0;Xe&&(fr|=4),pf(Wt,u,fr,Xe)}var Pp="_reactListening"+Math.random().toString(36).slice(2);function sf(u){if(!u[Pp]){u[Pp]=!0,wr.forEach((function(Xe){"selectionchange"!==Xe&&(Cp.has(Xe)||qf(Xe,!1,u),qf(Xe,!0,u))}));var Xe=9===u.nodeType?u:u.ownerDocument;null===Xe||Xe[Pp]||(Xe[Pp]=!0,qf("selectionchange",!1,Xe))}}function pf(u,Xe,Wt,fr){switch(jd(Xe)){case 1:var _r=ed;break;case 4:_r=gd;break;default:_r=fd}Wt=_r.bind(null,Xe,Wt,u),_r=void 0,!Xl||"touchstart"!==Xe&&"touchmove"!==Xe&&"wheel"!==Xe||(_r=!0),fr?void 0!==_r?u.addEventListener(Xe,Wt,{capture:!0,passive:_r}):u.addEventListener(Xe,Wt,!0):void 0!==_r?u.addEventListener(Xe,Wt,{passive:_r}):u.addEventListener(Xe,Wt,!1)}function hd(u,Xe,Wt,fr,_r){var wr=fr;if(!(1&Xe||2&Xe||null===fr))e:for(;;){if(null===fr)return;var Ar=fr.tag;if(3===Ar||4===Ar){var Kr=fr.stateNode.containerInfo;if(Kr===_r||8===Kr.nodeType&&Kr.parentNode===_r)break;if(4===Ar)for(Ar=fr.return;null!==Ar;){var In=Ar.tag;if((3===In||4===In)&&((In=Ar.stateNode.containerInfo)===_r||8===In.nodeType&&In.parentNode===_r))return;Ar=Ar.return}for(;null!==Kr;){if(null===(Ar=Wc(Kr)))return;if(5===(In=Ar.tag)||6===In){fr=wr=Ar;continue e}Kr=Kr.parentNode}}fr=fr.return}Jb((function(){var fr=wr,_r=xb(Wt),Ar=[];e:{var Kr=Sp.get(u);if(void 0!==Kr){var In=Dd,no=u;switch(u){case"keypress":if(0===od(Wt))break e;case"keydown":case"keyup":In=Qd;break;case"focusin":no="focus",In=$d;break;case"focusout":no="blur",In=$d;break;case"beforeblur":case"afterblur":In=$d;break;case"click":if(2===Wt.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":In=Vd;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":In=Ud;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":In=Oh;break;case vp:case bp:case xp:In=Wd;break;case wp:In=Lh;break;case"scroll":In=Bd;break;case"wheel":In=Fh;break;case"copy":case"cut":case"paste":In=Hd;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":In=Rh}var io=!!(4&Xe),oo=!io&&"scroll"===u,ao=io?null!==Kr?Kr+"Capture":null:Kr;io=[];for(var so,co=fr;null!==co;){var ho=(so=co).stateNode;if(5===so.tag&&null!==ho&&(so=ho,null!==ao&&(null!=(ho=Kb(co,ao))&&io.push(tf(co,ho,so)))),oo)break;co=co.return}0<io.length&&(Kr=new In(Kr,no,null,Wt,_r),Ar.push({event:Kr,listeners:io}))}}if(!(7&Xe)){if(In="mouseout"===u||"pointerout"===u,(!(Kr="mouseover"===u||"pointerover"===u)||Wt===Ul||!(no=Wt.relatedTarget||Wt.fromElement)||!Wc(no)&&!no[Vp])&&(In||Kr)&&(Kr=_r.window===_r?_r:(Kr=_r.ownerDocument)?Kr.defaultView||Kr.parentWindow:window,In?(In=fr,null!==(no=(no=Wt.relatedTarget||Wt.toElement)?Wc(no):null)&&(no!==(oo=Vb(no))||5!==no.tag&&6!==no.tag)&&(no=null)):(In=null,no=fr),In!==no)){if(io=Vd,ho="onMouseLeave",ao="onMouseEnter",co="mouse","pointerout"!==u&&"pointerover"!==u||(io=Rh,ho="onPointerLeave",ao="onPointerEnter",co="pointer"),oo=null==In?Kr:ue(In),so=null==no?Kr:ue(no),(Kr=new io(ho,co+"leave",In,Wt,_r)).target=oo,Kr.relatedTarget=so,ho=null,Wc(_r)===fr&&((io=new io(ao,co+"enter",no,Wt,_r)).target=so,io.relatedTarget=oo,ho=io),oo=ho,In&&no)e:{for(ao=no,co=0,so=io=In;so;so=vf(so))co++;for(so=0,ho=ao;ho;ho=vf(ho))so++;for(;0<co-so;)io=vf(io),co--;for(;0<so-co;)ao=vf(ao),so--;for(;co--;){if(io===ao||null!==ao&&io===ao.alternate)break e;io=vf(io),ao=vf(ao)}io=null}else io=null;null!==In&&wf(Ar,Kr,In,io,!1),null!==no&&null!==oo&&wf(Ar,oo,no,io,!0)}if("select"===(In=(Kr=fr?ue(fr):window).nodeName&&Kr.nodeName.toLowerCase())||"input"===In&&"file"===Kr.type)var go=ve;else if(me(Kr))if(op)go=Fe;else{go=De;var xo=Ce}else(In=Kr.nodeName)&&"input"===In.toLowerCase()&&("checkbox"===Kr.type||"radio"===Kr.type)&&(go=Ee);switch(go&&(go=go(u,fr))?ne(Ar,go,Wt,_r):(xo&&xo(u,Kr,fr),"focusout"===u&&(xo=Kr._wrapperState)&&xo.controlled&&"number"===Kr.type&&cb(Kr,"number",Kr.value)),xo=fr?ue(fr):window,u){case"focusin":(me(xo)||"true"===xo.contentEditable)&&(hp=xo,pp=fr,fp=null);break;case"focusout":fp=pp=hp=null;break;case"mousedown":mp=!0;break;case"contextmenu":case"mouseup":case"dragend":mp=!1,Ue(Ar,Wt,_r);break;case"selectionchange":if(dp)break;case"keydown":case"keyup":Ue(Ar,Wt,_r)}var ko;if(Hh)e:{switch(u){case"compositionstart":var Co="onCompositionStart";break e;case"compositionend":Co="onCompositionEnd";break e;case"compositionupdate":Co="onCompositionUpdate";break e}Co=void 0}else tp?ge(u,Wt)&&(Co="onCompositionEnd"):"keydown"===u&&229===Wt.keyCode&&(Co="onCompositionStart");Co&&(Jh&&"ko"!==Wt.locale&&(tp||"onCompositionStart"!==Co?"onCompositionEnd"===Co&&tp&&(ko=nd()):(Cd="value"in(Ed=_r)?Ed.value:Ed.textContent,tp=!0)),0<(xo=oe(fr,Co)).length&&(Co=new Gd(Co,u,null,Wt,_r),Ar.push({event:Co,listeners:xo}),ko?Co.data=ko:null!==(ko=he(Wt))&&(Co.data=ko))),(ko=Kh?function je(u,Xe){switch(u){case"compositionend":return he(Xe);case"keypress":return 32!==Xe.which?null:(ep=!0,Qh);case"textInput":return(u=Xe.data)===Qh&&ep?null:u;default:return null}}(u,Wt):function ke(u,Xe){if(tp)return"compositionend"===u||!Hh&&ge(u,Xe)?(u=nd(),Id=Cd=Ed=null,tp=!1,u):null;switch(u){case"paste":default:return null;case"keypress":if(!(Xe.ctrlKey||Xe.altKey||Xe.metaKey)||Xe.ctrlKey&&Xe.altKey){if(Xe.char&&1<Xe.char.length)return Xe.char;if(Xe.which)return String.fromCharCode(Xe.which)}return null;case"compositionend":return Jh&&"ko"!==Xe.locale?null:Xe.data}}(u,Wt))&&(0<(fr=oe(fr,"onBeforeInput")).length&&(_r=new Gd("onBeforeInput","beforeinput",null,Wt,_r),Ar.push({event:_r,listeners:fr}),_r.data=ko))}se(Ar,Xe)}))}function tf(u,Xe,Wt){return{instance:u,listener:Xe,currentTarget:Wt}}function oe(u,Xe){for(var Wt=Xe+"Capture",fr=[];null!==u;){var _r=u,wr=_r.stateNode;5===_r.tag&&null!==wr&&(_r=wr,null!=(wr=Kb(u,Wt))&&fr.unshift(tf(u,wr,_r)),null!=(wr=Kb(u,Xe))&&fr.push(tf(u,wr,_r))),u=u.return}return fr}function vf(u){if(null===u)return null;do{u=u.return}while(u&&5!==u.tag);return u||null}function wf(u,Xe,Wt,fr,_r){for(var wr=Xe._reactName,Ar=[];null!==Wt&&Wt!==fr;){var Kr=Wt,In=Kr.alternate,no=Kr.stateNode;if(null!==In&&In===fr)break;5===Kr.tag&&null!==no&&(Kr=no,_r?null!=(In=Kb(Wt,wr))&&Ar.unshift(tf(Wt,In,Kr)):_r||null!=(In=Kb(Wt,wr))&&Ar.push(tf(Wt,In,Kr))),Wt=Wt.return}0!==Ar.length&&u.push({event:Xe,listeners:Ar})}var Ip=/\r\n?/g,Mp=/\u0000|\uFFFD/g;function zf(u){return("string"==typeof u?u:""+u).replace(Ip,"\n").replace(Mp,"")}function Af(u,Xe,Wt){if(Xe=zf(Xe),zf(u)!==Xe&&Wt)throw Error(p(425))}function Bf(){}var Rp=null,zp=null;function Ef(u,Xe){return"textarea"===u||"noscript"===u||"string"==typeof Xe.children||"number"==typeof Xe.children||"object"==typeof Xe.dangerouslySetInnerHTML&&null!==Xe.dangerouslySetInnerHTML&&null!=Xe.dangerouslySetInnerHTML.__html}var Op="function"==typeof setTimeout?setTimeout:void 0,Lp="function"==typeof clearTimeout?clearTimeout:void 0,Dp="function"==typeof Promise?Promise:void 0,Fp="function"==typeof queueMicrotask?queueMicrotask:void 0!==Dp?function(u){return Dp.resolve(null).then(u).catch(If)}:Op;function If(u){setTimeout((function(){throw u}))}function Kf(u,Xe){var Wt=Xe,fr=0;do{var _r=Wt.nextSibling;if(u.removeChild(Wt),_r&&8===_r.nodeType)if("/$"===(Wt=_r.data)){if(0===fr)return u.removeChild(_r),void bd(Xe);fr--}else"$"!==Wt&&"$?"!==Wt&&"$!"!==Wt||fr++;Wt=_r}while(Wt);bd(Xe)}function Lf(u){for(;null!=u;u=u.nextSibling){var Xe=u.nodeType;if(1===Xe||3===Xe)break;if(8===Xe){if("$"===(Xe=u.data)||"$!"===Xe||"$?"===Xe)break;if("/$"===Xe)return null}}return u}function Mf(u){u=u.previousSibling;for(var Xe=0;u;){if(8===u.nodeType){var Wt=u.data;if("$"===Wt||"$!"===Wt||"$?"===Wt){if(0===Xe)return u;Xe--}else"/$"===Wt&&Xe++}u=u.previousSibling}return null}var jp=Math.random().toString(36).slice(2),Bp="__reactFiber$"+jp,Np="__reactProps$"+jp,Vp="__reactContainer$"+jp,Up="__reactEvents$"+jp,$p="__reactListeners$"+jp,Wp="__reactHandles$"+jp;function Wc(u){var Xe=u[Bp];if(Xe)return Xe;for(var Wt=u.parentNode;Wt;){if(Xe=Wt[Vp]||Wt[Bp]){if(Wt=Xe.alternate,null!==Xe.child||null!==Wt&&null!==Wt.child)for(u=Mf(u);null!==u;){if(Wt=u[Bp])return Wt;u=Mf(u)}return Xe}Wt=(u=Wt).parentNode}return null}function Cb(u){return!(u=u[Bp]||u[Vp])||5!==u.tag&&6!==u.tag&&13!==u.tag&&3!==u.tag?null:u}function ue(u){if(5===u.tag||6===u.tag)return u.stateNode;throw Error(p(33))}function Db(u){return u[Np]||null}var qp=[],Zp=-1;function Uf(u){return{current:u}}function E(u){0>Zp||(u.current=qp[Zp],qp[Zp]=null,Zp--)}function G(u,Xe){Zp++,qp[Zp]=u.current,u.current=Xe}var Hp={},Gp=Uf(Hp),Kp=Uf(!1),Xp=Hp;function Yf(u,Xe){var Wt=u.type.contextTypes;if(!Wt)return Hp;var fr=u.stateNode;if(fr&&fr.__reactInternalMemoizedUnmaskedChildContext===Xe)return fr.__reactInternalMemoizedMaskedChildContext;var _r,wr={};for(_r in Wt)wr[_r]=Xe[_r];return fr&&((u=u.stateNode).__reactInternalMemoizedUnmaskedChildContext=Xe,u.__reactInternalMemoizedMaskedChildContext=wr),wr}function Zf(u){return null!=(u=u.childContextTypes)}function $f(){E(Kp),E(Gp)}function ag(u,Xe,Wt){if(Gp.current!==Hp)throw Error(p(168));G(Gp,Xe),G(Kp,Wt)}function bg(u,Xe,Wt){var fr=u.stateNode;if(Xe=Xe.childContextTypes,"function"!=typeof fr.getChildContext)return Wt;for(var _r in fr=fr.getChildContext())if(!(_r in Xe))throw Error(p(108,Ra(u)||"Unknown",_r));return Al({},Wt,fr)}function cg(u){return u=(u=u.stateNode)&&u.__reactInternalMemoizedMergedChildContext||Hp,Xp=Gp.current,G(Gp,u),G(Kp,Kp.current),!0}function dg(u,Xe,Wt){var fr=u.stateNode;if(!fr)throw Error(p(169));Wt?(u=bg(u,Xe,Xp),fr.__reactInternalMemoizedMergedChildContext=u,E(Kp),E(Gp),G(Gp,u)):E(Kp),G(Kp,Wt)}var Yp=null,Jp=!1,Qp=!1;function hg(u){null===Yp?Yp=[u]:Yp.push(u)}function jg(){if(!Qp&&null!==Yp){Qp=!0;var u=0,Xe=qu;try{var Wt=Yp;for(qu=1;u<Wt.length;u++){var fr=Wt[u];do{fr=fr(!0)}while(null!==fr)}Yp=null,Jp=!1}catch(Xe){throw null!==Yp&&(Yp=Yp.slice(u+1)),gc(su,jg),Xe}finally{qu=Xe,Qp=!1}}return null}var ef=[],rf=0,of=null,af=0,lf=[],cf=0,uf=null,df=1,hf="";function tg(u,Xe){ef[rf++]=af,ef[rf++]=of,of=u,af=Xe}function ug(u,Xe,Wt){lf[cf++]=df,lf[cf++]=hf,lf[cf++]=uf,uf=u;var fr=df;u=hf;var _r=32-Du(fr)-1;fr&=~(1<<_r),Wt+=1;var wr=32-Du(Xe)+_r;if(30<wr){var Ar=_r-_r%5;wr=(fr&(1<<Ar)-1).toString(32),fr>>=Ar,_r-=Ar,df=1<<32-Du(Xe)+_r|Wt<<_r|fr,hf=wr+u}else df=1<<wr|Wt<<_r|fr,hf=u}function vg(u){null!==u.return&&(tg(u,1),ug(u,1,0))}function wg(u){for(;u===of;)of=ef[--rf],ef[rf]=null,af=ef[--rf],ef[rf]=null;for(;u===uf;)uf=lf[--cf],lf[cf]=null,hf=lf[--cf],lf[cf]=null,df=lf[--cf],lf[cf]=null}var mf=null,gf=null,yf=!1,_f=null;function Ag(u,Xe){var Wt=Bg(5,null,null,0);Wt.elementType="DELETED",Wt.stateNode=Xe,Wt.return=u,null===(Xe=u.deletions)?(u.deletions=[Wt],u.flags|=16):Xe.push(Wt)}function Cg(u,Xe){switch(u.tag){case 5:var Wt=u.type;return null!==(Xe=1!==Xe.nodeType||Wt.toLowerCase()!==Xe.nodeName.toLowerCase()?null:Xe)&&(u.stateNode=Xe,mf=u,gf=Lf(Xe.firstChild),!0);case 6:return null!==(Xe=""===u.pendingProps||3!==Xe.nodeType?null:Xe)&&(u.stateNode=Xe,mf=u,gf=null,!0);case 13:return null!==(Xe=8!==Xe.nodeType?null:Xe)&&(Wt=null!==uf?{id:df,overflow:hf}:null,u.memoizedState={dehydrated:Xe,treeContext:Wt,retryLane:1073741824},(Wt=Bg(18,null,null,0)).stateNode=Xe,Wt.return=u,u.child=Wt,mf=u,gf=null,!0);default:return!1}}function Dg(u){return!(!(1&u.mode)||128&u.flags)}function Eg(u){if(yf){var Xe=gf;if(Xe){var Wt=Xe;if(!Cg(u,Xe)){if(Dg(u))throw Error(p(418));Xe=Lf(Wt.nextSibling);var fr=mf;Xe&&Cg(u,Xe)?Ag(fr,Wt):(u.flags=-4097&u.flags|2,yf=!1,mf=u)}}else{if(Dg(u))throw Error(p(418));u.flags=-4097&u.flags|2,yf=!1,mf=u}}}function Fg(u){for(u=u.return;null!==u&&5!==u.tag&&3!==u.tag&&13!==u.tag;)u=u.return;mf=u}function Gg(u){if(u!==mf)return!1;if(!yf)return Fg(u),yf=!0,!1;var Xe;if((Xe=3!==u.tag)&&!(Xe=5!==u.tag)&&(Xe="head"!==(Xe=u.type)&&"body"!==Xe&&!Ef(u.type,u.memoizedProps)),Xe&&(Xe=gf)){if(Dg(u))throw Hg(),Error(p(418));for(;Xe;)Ag(u,Xe),Xe=Lf(Xe.nextSibling)}if(Fg(u),13===u.tag){if(!(u=null!==(u=u.memoizedState)?u.dehydrated:null))throw Error(p(317));e:{for(u=u.nextSibling,Xe=0;u;){if(8===u.nodeType){var Wt=u.data;if("/$"===Wt){if(0===Xe){gf=Lf(u.nextSibling);break e}Xe--}else"$"!==Wt&&"$!"!==Wt&&"$?"!==Wt||Xe++}u=u.nextSibling}gf=null}}else gf=mf?Lf(u.stateNode.nextSibling):null;return!0}function Hg(){for(var u=gf;u;)u=Lf(u.nextSibling)}function Ig(){gf=mf=null,yf=!1}function Jg(u){null===_f?_f=[u]:_f.push(u)}var bf=co.ReactCurrentBatchConfig;function Lg(u,Xe,Wt){if(null!==(u=Wt.ref)&&"function"!=typeof u&&"object"!=typeof u){if(Wt._owner){if(Wt=Wt._owner){if(1!==Wt.tag)throw Error(p(309));var fr=Wt.stateNode}if(!fr)throw Error(p(147,u));var _r=fr,wr=""+u;return null!==Xe&&null!==Xe.ref&&"function"==typeof Xe.ref&&Xe.ref._stringRef===wr?Xe.ref:(Xe=function(u){var Xe=_r.refs;null===u?delete Xe[wr]:Xe[wr]=u},Xe._stringRef=wr,Xe)}if("string"!=typeof u)throw Error(p(284));if(!Wt._owner)throw Error(p(290,u))}return u}function Mg(u,Xe){throw u=Object.prototype.toString.call(Xe),Error(p(31,"[object Object]"===u?"object with keys {"+Object.keys(Xe).join(", ")+"}":u))}function Ng(u){return(0,u._init)(u._payload)}function Og(u){function b(Xe,Wt){if(u){var fr=Xe.deletions;null===fr?(Xe.deletions=[Wt],Xe.flags|=16):fr.push(Wt)}}function c(Xe,Wt){if(!u)return null;for(;null!==Wt;)b(Xe,Wt),Wt=Wt.sibling;return null}function d(u,Xe){for(u=new Map;null!==Xe;)null!==Xe.key?u.set(Xe.key,Xe):u.set(Xe.index,Xe),Xe=Xe.sibling;return u}function e(u,Xe){return(u=Pg(u,Xe)).index=0,u.sibling=null,u}function f(Xe,Wt,fr){return Xe.index=fr,u?null!==(fr=Xe.alternate)?(fr=fr.index)<Wt?(Xe.flags|=2,Wt):fr:(Xe.flags|=2,Wt):(Xe.flags|=1048576,Wt)}function g(Xe){return u&&null===Xe.alternate&&(Xe.flags|=2),Xe}function h(u,Xe,Wt,fr){return null===Xe||6!==Xe.tag?((Xe=Qg(Wt,u.mode,fr)).return=u,Xe):((Xe=e(Xe,Wt)).return=u,Xe)}function k(u,Xe,Wt,fr){var _r=Wt.type;return _r===xo?m(u,Xe,Wt.props.children,fr,Wt.key):null!==Xe&&(Xe.elementType===_r||"object"==typeof _r&&null!==_r&&_r.$$typeof===ns&&Ng(_r)===Xe.type)?((fr=e(Xe,Wt.props)).ref=Lg(u,Xe,Wt),fr.return=u,fr):((fr=Rg(Wt.type,Wt.key,Wt.props,null,u.mode,fr)).ref=Lg(u,Xe,Wt),fr.return=u,fr)}function l(u,Xe,Wt,fr){return null===Xe||4!==Xe.tag||Xe.stateNode.containerInfo!==Wt.containerInfo||Xe.stateNode.implementation!==Wt.implementation?((Xe=Sg(Wt,u.mode,fr)).return=u,Xe):((Xe=e(Xe,Wt.children||[])).return=u,Xe)}function m(u,Xe,Wt,fr,_r){return null===Xe||7!==Xe.tag?((Xe=Tg(Wt,u.mode,fr,_r)).return=u,Xe):((Xe=e(Xe,Wt)).return=u,Xe)}function q(u,Xe,Wt){if("string"==typeof Xe&&""!==Xe||"number"==typeof Xe)return(Xe=Qg(""+Xe,u.mode,Wt)).return=u,Xe;if("object"==typeof Xe&&null!==Xe){switch(Xe.$$typeof){case ho:return(Wt=Rg(Xe.type,Xe.key,Xe.props,null,u.mode,Wt)).ref=Lg(u,null,Xe),Wt.return=u,Wt;case go:return(Xe=Sg(Xe,u.mode,Wt)).return=u,Xe;case ns:return q(u,(0,Xe._init)(Xe._payload),Wt)}if(Rl(Xe)||Ka(Xe))return(Xe=Tg(Xe,u.mode,Wt,null)).return=u,Xe;Mg(u,Xe)}return null}function r(u,Xe,Wt,fr){var _r=null!==Xe?Xe.key:null;if("string"==typeof Wt&&""!==Wt||"number"==typeof Wt)return null!==_r?null:h(u,Xe,""+Wt,fr);if("object"==typeof Wt&&null!==Wt){switch(Wt.$$typeof){case ho:return Wt.key===_r?k(u,Xe,Wt,fr):null;case go:return Wt.key===_r?l(u,Xe,Wt,fr):null;case ns:return r(u,Xe,(_r=Wt._init)(Wt._payload),fr)}if(Rl(Wt)||Ka(Wt))return null!==_r?null:m(u,Xe,Wt,fr,null);Mg(u,Wt)}return null}function y(u,Xe,Wt,fr,_r){if("string"==typeof fr&&""!==fr||"number"==typeof fr)return h(Xe,u=u.get(Wt)||null,""+fr,_r);if("object"==typeof fr&&null!==fr){switch(fr.$$typeof){case ho:return k(Xe,u=u.get(null===fr.key?Wt:fr.key)||null,fr,_r);case go:return l(Xe,u=u.get(null===fr.key?Wt:fr.key)||null,fr,_r);case ns:return y(u,Xe,Wt,(0,fr._init)(fr._payload),_r)}if(Rl(fr)||Ka(fr))return m(Xe,u=u.get(Wt)||null,fr,_r,null);Mg(Xe,fr)}return null}function n(Xe,Wt,fr,_r){for(var wr=null,Ar=null,Kr=Wt,In=Wt=0,no=null;null!==Kr&&In<fr.length;In++){Kr.index>In?(no=Kr,Kr=null):no=Kr.sibling;var io=r(Xe,Kr,fr[In],_r);if(null===io){null===Kr&&(Kr=no);break}u&&Kr&&null===io.alternate&&b(Xe,Kr),Wt=f(io,Wt,In),null===Ar?wr=io:Ar.sibling=io,Ar=io,Kr=no}if(In===fr.length)return c(Xe,Kr),yf&&tg(Xe,In),wr;if(null===Kr){for(;In<fr.length;In++)null!==(Kr=q(Xe,fr[In],_r))&&(Wt=f(Kr,Wt,In),null===Ar?wr=Kr:Ar.sibling=Kr,Ar=Kr);return yf&&tg(Xe,In),wr}for(Kr=d(Xe,Kr);In<fr.length;In++)null!==(no=y(Kr,Xe,In,fr[In],_r))&&(u&&null!==no.alternate&&Kr.delete(null===no.key?In:no.key),Wt=f(no,Wt,In),null===Ar?wr=no:Ar.sibling=no,Ar=no);return u&&Kr.forEach((function(u){return b(Xe,u)})),yf&&tg(Xe,In),wr}function t(Xe,Wt,fr,_r){var wr=Ka(fr);if("function"!=typeof wr)throw Error(p(150));if(null==(fr=wr.call(fr)))throw Error(p(151));for(var Ar=wr=null,Kr=Wt,In=Wt=0,no=null,io=fr.next();null!==Kr&&!io.done;In++,io=fr.next()){Kr.index>In?(no=Kr,Kr=null):no=Kr.sibling;var oo=r(Xe,Kr,io.value,_r);if(null===oo){null===Kr&&(Kr=no);break}u&&Kr&&null===oo.alternate&&b(Xe,Kr),Wt=f(oo,Wt,In),null===Ar?wr=oo:Ar.sibling=oo,Ar=oo,Kr=no}if(io.done)return c(Xe,Kr),yf&&tg(Xe,In),wr;if(null===Kr){for(;!io.done;In++,io=fr.next())null!==(io=q(Xe,io.value,_r))&&(Wt=f(io,Wt,In),null===Ar?wr=io:Ar.sibling=io,Ar=io);return yf&&tg(Xe,In),wr}for(Kr=d(Xe,Kr);!io.done;In++,io=fr.next())null!==(io=y(Kr,Xe,In,io.value,_r))&&(u&&null!==io.alternate&&Kr.delete(null===io.key?In:io.key),Wt=f(io,Wt,In),null===Ar?wr=io:Ar.sibling=io,Ar=io);return u&&Kr.forEach((function(u){return b(Xe,u)})),yf&&tg(Xe,In),wr}return function J(u,Xe,Wt,fr){if("object"==typeof Wt&&null!==Wt&&Wt.type===xo&&null===Wt.key&&(Wt=Wt.props.children),"object"==typeof Wt&&null!==Wt){switch(Wt.$$typeof){case ho:e:{for(var _r=Wt.key,wr=Xe;null!==wr;){if(wr.key===_r){if((_r=Wt.type)===xo){if(7===wr.tag){c(u,wr.sibling),(Xe=e(wr,Wt.props.children)).return=u,u=Xe;break e}}else if(wr.elementType===_r||"object"==typeof _r&&null!==_r&&_r.$$typeof===ns&&Ng(_r)===wr.type){c(u,wr.sibling),(Xe=e(wr,Wt.props)).ref=Lg(u,wr,Wt),Xe.return=u,u=Xe;break e}c(u,wr);break}b(u,wr),wr=wr.sibling}Wt.type===xo?((Xe=Tg(Wt.props.children,u.mode,fr,Wt.key)).return=u,u=Xe):((fr=Rg(Wt.type,Wt.key,Wt.props,null,u.mode,fr)).ref=Lg(u,Xe,Wt),fr.return=u,u=fr)}return g(u);case go:e:{for(wr=Wt.key;null!==Xe;){if(Xe.key===wr){if(4===Xe.tag&&Xe.stateNode.containerInfo===Wt.containerInfo&&Xe.stateNode.implementation===Wt.implementation){c(u,Xe.sibling),(Xe=e(Xe,Wt.children||[])).return=u,u=Xe;break e}c(u,Xe);break}b(u,Xe),Xe=Xe.sibling}(Xe=Sg(Wt,u.mode,fr)).return=u,u=Xe}return g(u);case ns:return J(u,Xe,(wr=Wt._init)(Wt._payload),fr)}if(Rl(Wt))return n(u,Xe,Wt,fr);if(Ka(Wt))return t(u,Xe,Wt,fr);Mg(u,Wt)}return"string"==typeof Wt&&""!==Wt||"number"==typeof Wt?(Wt=""+Wt,null!==Xe&&6===Xe.tag?(c(u,Xe.sibling),(Xe=e(Xe,Wt)).return=u,u=Xe):(c(u,Xe),(Xe=Qg(Wt,u.mode,fr)).return=u,u=Xe),g(u)):c(u,Xe)}}var xf=Og(!0),Sf=Og(!1),kf=Uf(null),Tf=null,Cf=null,Pf=null;function $g(){Pf=Cf=Tf=null}function ah(u){var Xe=kf.current;E(kf),u._currentValue=Xe}function bh(u,Xe,Wt){for(;null!==u;){var fr=u.alternate;if((u.childLanes&Xe)!==Xe?(u.childLanes|=Xe,null!==fr&&(fr.childLanes|=Xe)):null!==fr&&(fr.childLanes&Xe)!==Xe&&(fr.childLanes|=Xe),u===Wt)break;u=u.return}}function ch(u,Xe){Tf=u,Pf=Cf=null,null!==(u=u.dependencies)&&null!==u.firstContext&&(!!(u.lanes&Xe)&&(hm=!0),u.firstContext=null)}function eh(u){var Xe=u._currentValue;if(Pf!==u)if(u={context:u,memoizedValue:Xe,next:null},null===Cf){if(null===Tf)throw Error(p(308));Cf=u,Tf.dependencies={lanes:0,firstContext:u}}else Cf=Cf.next=u;return Xe}var Rf=null;function gh(u){null===Rf?Rf=[u]:Rf.push(u)}function hh(u,Xe,Wt,fr){var _r=Xe.interleaved;return null===_r?(Wt.next=Wt,gh(Xe)):(Wt.next=_r.next,_r.next=Wt),Xe.interleaved=Wt,ih(u,fr)}function ih(u,Xe){u.lanes|=Xe;var Wt=u.alternate;for(null!==Wt&&(Wt.lanes|=Xe),Wt=u,u=u.return;null!==u;)u.childLanes|=Xe,null!==(Wt=u.alternate)&&(Wt.childLanes|=Xe),Wt=u,u=u.return;return 3===Wt.tag?Wt.stateNode:null}var Of=!1;function kh(u){u.updateQueue={baseState:u.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function lh(u,Xe){u=u.updateQueue,Xe.updateQueue===u&&(Xe.updateQueue={baseState:u.baseState,firstBaseUpdate:u.firstBaseUpdate,lastBaseUpdate:u.lastBaseUpdate,shared:u.shared,effects:u.effects})}function mh(u,Xe){return{eventTime:u,lane:Xe,tag:0,payload:null,callback:null,next:null}}function nh(u,Xe,Wt){var fr=u.updateQueue;if(null===fr)return null;if(fr=fr.shared,2&Im){var _r=fr.pending;return null===_r?Xe.next=Xe:(Xe.next=_r.next,_r.next=Xe),fr.pending=Xe,ih(u,Wt)}return null===(_r=fr.interleaved)?(Xe.next=Xe,gh(fr)):(Xe.next=_r.next,_r.next=Xe),fr.interleaved=Xe,ih(u,Wt)}function oh(u,Xe,Wt){if(null!==(Xe=Xe.updateQueue)&&(Xe=Xe.shared,4194240&Wt)){var fr=Xe.lanes;Wt|=fr&=u.pendingLanes,Xe.lanes=Wt,Cc(u,Wt)}}function ph(u,Xe){var Wt=u.updateQueue,fr=u.alternate;if(null!==fr&&Wt===(fr=fr.updateQueue)){var _r=null,wr=null;if(null!==(Wt=Wt.firstBaseUpdate)){do{var Ar={eventTime:Wt.eventTime,lane:Wt.lane,tag:Wt.tag,payload:Wt.payload,callback:Wt.callback,next:null};null===wr?_r=wr=Ar:wr=wr.next=Ar,Wt=Wt.next}while(null!==Wt);null===wr?_r=wr=Xe:wr=wr.next=Xe}else _r=wr=Xe;return Wt={baseState:fr.baseState,firstBaseUpdate:_r,lastBaseUpdate:wr,shared:fr.shared,effects:fr.effects},void(u.updateQueue=Wt)}null===(u=Wt.lastBaseUpdate)?Wt.firstBaseUpdate=Xe:u.next=Xe,Wt.lastBaseUpdate=Xe}function qh(u,Xe,Wt,fr){var _r=u.updateQueue;Of=!1;var wr=_r.firstBaseUpdate,Ar=_r.lastBaseUpdate,Kr=_r.shared.pending;if(null!==Kr){_r.shared.pending=null;var In=Kr,no=In.next;In.next=null,null===Ar?wr=no:Ar.next=no,Ar=In;var io=u.alternate;null!==io&&((Kr=(io=io.updateQueue).lastBaseUpdate)!==Ar&&(null===Kr?io.firstBaseUpdate=no:Kr.next=no,io.lastBaseUpdate=In))}if(null!==wr){var oo=_r.baseState;for(Ar=0,io=no=In=null,Kr=wr;;){var ao=Kr.lane,so=Kr.eventTime;if((fr&ao)===ao){null!==io&&(io=io.next={eventTime:so,lane:0,tag:Kr.tag,payload:Kr.payload,callback:Kr.callback,next:null});e:{var co=u,ho=Kr;switch(ao=Xe,so=Wt,ho.tag){case 1:if("function"==typeof(co=ho.payload)){oo=co.call(so,oo,ao);break e}oo=co;break e;case 3:co.flags=-65537&co.flags|128;case 0:if(null==(ao="function"==typeof(co=ho.payload)?co.call(so,oo,ao):co))break e;oo=Al({},oo,ao);break e;case 2:Of=!0}}null!==Kr.callback&&0!==Kr.lane&&(u.flags|=64,null===(ao=_r.effects)?_r.effects=[Kr]:ao.push(Kr))}else so={eventTime:so,lane:ao,tag:Kr.tag,payload:Kr.payload,callback:Kr.callback,next:null},null===io?(no=io=so,In=oo):io=io.next=so,Ar|=ao;if(null===(Kr=Kr.next)){if(null===(Kr=_r.shared.pending))break;Kr=(ao=Kr).next,ao.next=null,_r.lastBaseUpdate=ao,_r.shared.pending=null}}if(null===io&&(In=oo),_r.baseState=In,_r.firstBaseUpdate=no,_r.lastBaseUpdate=io,null!==(Xe=_r.shared.interleaved)){_r=Xe;do{Ar|=_r.lane,_r=_r.next}while(_r!==Xe)}else null===wr&&(_r.shared.lanes=0);jm|=Ar,u.lanes=Ar,u.memoizedState=oo}}function sh(u,Xe,Wt){if(u=Xe.effects,Xe.effects=null,null!==u)for(Xe=0;Xe<u.length;Xe++){var fr=u[Xe],_r=fr.callback;if(null!==_r){if(fr.callback=null,fr=Wt,"function"!=typeof _r)throw Error(p(191,_r));_r.call(fr)}}}var Df={},Ff=Uf(Df),jf=Uf(Df),Nf=Uf(Df);function xh(u){if(u===Df)throw Error(p(174));return u}function yh(u,Xe){switch(G(Nf,Xe),G(jf,u),G(Ff,Df),u=Xe.nodeType){case 9:case 11:Xe=(Xe=Xe.documentElement)?Xe.namespaceURI:lb(null,"");break;default:Xe=lb(Xe=(u=8===u?Xe.parentNode:Xe).namespaceURI||null,u=u.tagName)}E(Ff),G(Ff,Xe)}function zh(){E(Ff),E(jf),E(Nf)}function Ah(u){xh(Nf.current);var Xe=xh(Ff.current),Wt=lb(Xe,u.type);Xe!==Wt&&(G(jf,u),G(Ff,Wt))}function Bh(u){jf.current===u&&(E(Ff),E(jf))}var Vf=Uf(0);function Ch(u){for(var Xe=u;null!==Xe;){if(13===Xe.tag){var Wt=Xe.memoizedState;if(null!==Wt&&(null===(Wt=Wt.dehydrated)||"$?"===Wt.data||"$!"===Wt.data))return Xe}else if(19===Xe.tag&&void 0!==Xe.memoizedProps.revealOrder){if(128&Xe.flags)return Xe}else if(null!==Xe.child){Xe.child.return=Xe,Xe=Xe.child;continue}if(Xe===u)break;for(;null===Xe.sibling;){if(null===Xe.return||Xe.return===u)return null;Xe=Xe.return}Xe.sibling.return=Xe.return,Xe=Xe.sibling}return null}var Wf=[];function Eh(){for(var u=0;u<Wf.length;u++)Wf[u]._workInProgressVersionPrimary=null;Wf.length=0}var Hf=co.ReactCurrentDispatcher,Gf=co.ReactCurrentBatchConfig,Xf=0,Jf=null,Qf=null,em=null,tm=!1,rm=!1,nm=0,im=0;function P(){throw Error(p(321))}function Mh(u,Xe){if(null===Xe)return!1;for(var Wt=0;Wt<Xe.length&&Wt<u.length;Wt++)if(!cp(u[Wt],Xe[Wt]))return!1;return!0}function Nh(u,Xe,Wt,fr,_r,wr){if(Xf=wr,Jf=Xe,Xe.memoizedState=null,Xe.updateQueue=null,Xe.lanes=0,Hf.current=null===u||null===u.memoizedState?am:sm,u=Wt(fr,_r),rm){wr=0;do{if(rm=!1,nm=0,25<=wr)throw Error(p(301));wr+=1,em=Qf=null,Xe.updateQueue=null,Hf.current=lm,u=Wt(fr,_r)}while(rm)}if(Hf.current=om,Xe=null!==Qf&&null!==Qf.next,Xf=0,em=Qf=Jf=null,tm=!1,Xe)throw Error(p(300));return u}function Sh(){var u=0!==nm;return nm=0,u}function Th(){var u={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===em?Jf.memoizedState=em=u:em=em.next=u,em}function Uh(){if(null===Qf){var u=Jf.alternate;u=null!==u?u.memoizedState:null}else u=Qf.next;var Xe=null===em?Jf.memoizedState:em.next;if(null!==Xe)em=Xe,Qf=u;else{if(null===u)throw Error(p(310));u={memoizedState:(Qf=u).memoizedState,baseState:Qf.baseState,baseQueue:Qf.baseQueue,queue:Qf.queue,next:null},null===em?Jf.memoizedState=em=u:em=em.next=u}return em}function Vh(u,Xe){return"function"==typeof Xe?Xe(u):Xe}function Wh(u){var Xe=Uh(),Wt=Xe.queue;if(null===Wt)throw Error(p(311));Wt.lastRenderedReducer=u;var fr=Qf,_r=fr.baseQueue,wr=Wt.pending;if(null!==wr){if(null!==_r){var Ar=_r.next;_r.next=wr.next,wr.next=Ar}fr.baseQueue=_r=wr,Wt.pending=null}if(null!==_r){wr=_r.next,fr=fr.baseState;var Kr=Ar=null,In=null,no=wr;do{var io=no.lane;if((Xf&io)===io)null!==In&&(In=In.next={lane:0,action:no.action,hasEagerState:no.hasEagerState,eagerState:no.eagerState,next:null}),fr=no.hasEagerState?no.eagerState:u(fr,no.action);else{var oo={lane:io,action:no.action,hasEagerState:no.hasEagerState,eagerState:no.eagerState,next:null};null===In?(Kr=In=oo,Ar=fr):In=In.next=oo,Jf.lanes|=io,jm|=io}no=no.next}while(null!==no&&no!==wr);null===In?Ar=fr:In.next=Kr,cp(fr,Xe.memoizedState)||(hm=!0),Xe.memoizedState=fr,Xe.baseState=Ar,Xe.baseQueue=In,Wt.lastRenderedState=fr}if(null!==(u=Wt.interleaved)){_r=u;do{wr=_r.lane,Jf.lanes|=wr,jm|=wr,_r=_r.next}while(_r!==u)}else null===_r&&(Wt.lanes=0);return[Xe.memoizedState,Wt.dispatch]}function Xh(u){var Xe=Uh(),Wt=Xe.queue;if(null===Wt)throw Error(p(311));Wt.lastRenderedReducer=u;var fr=Wt.dispatch,_r=Wt.pending,wr=Xe.memoizedState;if(null!==_r){Wt.pending=null;var Ar=_r=_r.next;do{wr=u(wr,Ar.action),Ar=Ar.next}while(Ar!==_r);cp(wr,Xe.memoizedState)||(hm=!0),Xe.memoizedState=wr,null===Xe.baseQueue&&(Xe.baseState=wr),Wt.lastRenderedState=wr}return[wr,fr]}function Yh(){}function Zh(u,Xe){var Wt=Jf,fr=Uh(),_r=Xe(),wr=!cp(fr.memoizedState,_r);if(wr&&(fr.memoizedState=_r,hm=!0),fr=fr.queue,$h(ai.bind(null,Wt,fr,u),[u]),fr.getSnapshot!==Xe||wr||null!==em&&1&em.memoizedState.tag){if(Wt.flags|=2048,bi(9,ci.bind(null,Wt,fr,_r,Xe),void 0,null),null===Mm)throw Error(p(349));30&Xf||di(Wt,Xe,_r)}return _r}function di(u,Xe,Wt){u.flags|=16384,u={getSnapshot:Xe,value:Wt},null===(Xe=Jf.updateQueue)?(Xe={lastEffect:null,stores:null},Jf.updateQueue=Xe,Xe.stores=[u]):null===(Wt=Xe.stores)?Xe.stores=[u]:Wt.push(u)}function ci(u,Xe,Wt,fr){Xe.value=Wt,Xe.getSnapshot=fr,ei(Xe)&&fi(u)}function ai(u,Xe,Wt){return Wt((function(){ei(Xe)&&fi(u)}))}function ei(u){var Xe=u.getSnapshot;u=u.value;try{var Wt=Xe();return!cp(u,Wt)}catch(u){return!0}}function fi(u){var Xe=ih(u,1);null!==Xe&&gi(Xe,u,1,-1)}function hi(u){var Xe=Th();return"function"==typeof u&&(u=u()),Xe.memoizedState=Xe.baseState=u,u={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Vh,lastRenderedState:u},Xe.queue=u,u=u.dispatch=ii.bind(null,Jf,u),[Xe.memoizedState,u]}function bi(u,Xe,Wt,fr){return u={tag:u,create:Xe,destroy:Wt,deps:fr,next:null},null===(Xe=Jf.updateQueue)?(Xe={lastEffect:null,stores:null},Jf.updateQueue=Xe,Xe.lastEffect=u.next=u):null===(Wt=Xe.lastEffect)?Xe.lastEffect=u.next=u:(fr=Wt.next,Wt.next=u,u.next=fr,Xe.lastEffect=u),u}function ji(){return Uh().memoizedState}function ki(u,Xe,Wt,fr){var _r=Th();Jf.flags|=u,_r.memoizedState=bi(1|Xe,Wt,void 0,void 0===fr?null:fr)}function li(u,Xe,Wt,fr){var _r=Uh();fr=void 0===fr?null:fr;var wr=void 0;if(null!==Qf){var Ar=Qf.memoizedState;if(wr=Ar.destroy,null!==fr&&Mh(fr,Ar.deps))return void(_r.memoizedState=bi(Xe,Wt,wr,fr))}Jf.flags|=u,_r.memoizedState=bi(1|Xe,Wt,wr,fr)}function mi(u,Xe){return ki(8390656,8,u,Xe)}function $h(u,Xe){return li(2048,8,u,Xe)}function ni(u,Xe){return li(4,2,u,Xe)}function oi(u,Xe){return li(4,4,u,Xe)}function pi(u,Xe){return"function"==typeof Xe?(u=u(),Xe(u),function(){Xe(null)}):null!=Xe?(u=u(),Xe.current=u,function(){Xe.current=null}):void 0}function qi(u,Xe,Wt){return Wt=null!=Wt?Wt.concat([u]):null,li(4,4,pi.bind(null,Xe,u),Wt)}function ri(){}function si(u,Xe){var Wt=Uh();Xe=void 0===Xe?null:Xe;var fr=Wt.memoizedState;return null!==fr&&null!==Xe&&Mh(Xe,fr[1])?fr[0]:(Wt.memoizedState=[u,Xe],u)}function ti(u,Xe){var Wt=Uh();Xe=void 0===Xe?null:Xe;var fr=Wt.memoizedState;return null!==fr&&null!==Xe&&Mh(Xe,fr[1])?fr[0]:(u=u(),Wt.memoizedState=[u,Xe],u)}function ui(u,Xe,Wt){return 21&Xf?(cp(Wt,Xe)||(Wt=yc(),Jf.lanes|=Wt,jm|=Wt,u.baseState=!0),Xe):(u.baseState&&(u.baseState=!1,hm=!0),u.memoizedState=Wt)}function vi(u,Xe){var Wt=qu;qu=0!==Wt&&4>Wt?Wt:4,u(!0);var fr=Gf.transition;Gf.transition={};try{u(!1),Xe()}finally{qu=Wt,Gf.transition=fr}}function wi(){return Uh().memoizedState}function xi(u,Xe,Wt){var fr=yi(u);if(Wt={lane:fr,action:Wt,hasEagerState:!1,eagerState:null,next:null},zi(u))Ai(Xe,Wt);else if(null!==(Wt=hh(u,Xe,Wt,fr))){gi(Wt,u,fr,R()),Bi(Wt,Xe,fr)}}function ii(u,Xe,Wt){var fr=yi(u),_r={lane:fr,action:Wt,hasEagerState:!1,eagerState:null,next:null};if(zi(u))Ai(Xe,_r);else{var wr=u.alternate;if(0===u.lanes&&(null===wr||0===wr.lanes)&&null!==(wr=Xe.lastRenderedReducer))try{var Ar=Xe.lastRenderedState,Kr=wr(Ar,Wt);if(_r.hasEagerState=!0,_r.eagerState=Kr,cp(Kr,Ar)){var In=Xe.interleaved;return null===In?(_r.next=_r,gh(Xe)):(_r.next=In.next,In.next=_r),void(Xe.interleaved=_r)}}catch(u){}null!==(Wt=hh(u,Xe,_r,fr))&&(gi(Wt,u,fr,_r=R()),Bi(Wt,Xe,fr))}}function zi(u){var Xe=u.alternate;return u===Jf||null!==Xe&&Xe===Jf}function Ai(u,Xe){rm=tm=!0;var Wt=u.pending;null===Wt?Xe.next=Xe:(Xe.next=Wt.next,Wt.next=Xe),u.pending=Xe}function Bi(u,Xe,Wt){if(4194240&Wt){var fr=Xe.lanes;Wt|=fr&=u.pendingLanes,Xe.lanes=Wt,Cc(u,Wt)}}var om={readContext:eh,useCallback:P,useContext:P,useEffect:P,useImperativeHandle:P,useInsertionEffect:P,useLayoutEffect:P,useMemo:P,useReducer:P,useRef:P,useState:P,useDebugValue:P,useDeferredValue:P,useTransition:P,useMutableSource:P,useSyncExternalStore:P,useId:P,unstable_isNewReconciler:!1},am={readContext:eh,useCallback:function(u,Xe){return Th().memoizedState=[u,void 0===Xe?null:Xe],u},useContext:eh,useEffect:mi,useImperativeHandle:function(u,Xe,Wt){return Wt=null!=Wt?Wt.concat([u]):null,ki(4194308,4,pi.bind(null,Xe,u),Wt)},useLayoutEffect:function(u,Xe){return ki(4194308,4,u,Xe)},useInsertionEffect:function(u,Xe){return ki(4,2,u,Xe)},useMemo:function(u,Xe){var Wt=Th();return Xe=void 0===Xe?null:Xe,u=u(),Wt.memoizedState=[u,Xe],u},useReducer:function(u,Xe,Wt){var fr=Th();return Xe=void 0!==Wt?Wt(Xe):Xe,fr.memoizedState=fr.baseState=Xe,u={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:u,lastRenderedState:Xe},fr.queue=u,u=u.dispatch=xi.bind(null,Jf,u),[fr.memoizedState,u]},useRef:function(u){return u={current:u},Th().memoizedState=u},useState:hi,useDebugValue:ri,useDeferredValue:function(u){return Th().memoizedState=u},useTransition:function(){var u=hi(!1),Xe=u[0];return u=vi.bind(null,u[1]),Th().memoizedState=u,[Xe,u]},useMutableSource:function(){},useSyncExternalStore:function(u,Xe,Wt){var fr=Jf,_r=Th();if(yf){if(void 0===Wt)throw Error(p(407));Wt=Wt()}else{if(Wt=Xe(),null===Mm)throw Error(p(349));30&Xf||di(fr,Xe,Wt)}_r.memoizedState=Wt;var wr={value:Wt,getSnapshot:Xe};return _r.queue=wr,mi(ai.bind(null,fr,wr,u),[u]),fr.flags|=2048,bi(9,ci.bind(null,fr,wr,Wt,Xe),void 0,null),Wt},useId:function(){var u=Th(),Xe=Mm.identifierPrefix;if(yf){var Wt=hf;Xe=":"+Xe+"R"+(Wt=(df&~(1<<32-Du(df)-1)).toString(32)+Wt),0<(Wt=nm++)&&(Xe+="H"+Wt.toString(32)),Xe+=":"}else Xe=":"+Xe+"r"+(Wt=im++).toString(32)+":";return u.memoizedState=Xe},unstable_isNewReconciler:!1},sm={readContext:eh,useCallback:si,useContext:eh,useEffect:$h,useImperativeHandle:qi,useInsertionEffect:ni,useLayoutEffect:oi,useMemo:ti,useReducer:Wh,useRef:ji,useState:function(){return Wh(Vh)},useDebugValue:ri,useDeferredValue:function(u){return ui(Uh(),Qf.memoizedState,u)},useTransition:function(){return[Wh(Vh)[0],Uh().memoizedState]},useMutableSource:Yh,useSyncExternalStore:Zh,useId:wi,unstable_isNewReconciler:!1},lm={readContext:eh,useCallback:si,useContext:eh,useEffect:$h,useImperativeHandle:qi,useInsertionEffect:ni,useLayoutEffect:oi,useMemo:ti,useReducer:Xh,useRef:ji,useState:function(){return Xh(Vh)},useDebugValue:ri,useDeferredValue:function(u){var Xe=Uh();return null===Qf?Xe.memoizedState=u:ui(Xe,Qf.memoizedState,u)},useTransition:function(){return[Xh(Vh)[0],Uh().memoizedState]},useMutableSource:Yh,useSyncExternalStore:Zh,useId:wi,unstable_isNewReconciler:!1};function Ci(u,Xe){if(u&&u.defaultProps){for(var Wt in Xe=Al({},Xe),u=u.defaultProps)void 0===Xe[Wt]&&(Xe[Wt]=u[Wt]);return Xe}return Xe}function Di(u,Xe,Wt,fr){Wt=null==(Wt=Wt(fr,Xe=u.memoizedState))?Xe:Al({},Xe,Wt),u.memoizedState=Wt,0===u.lanes&&(u.updateQueue.baseState=Wt)}var cm={isMounted:function(u){return!!(u=u._reactInternals)&&Vb(u)===u},enqueueSetState:function(u,Xe,Wt){u=u._reactInternals;var fr=R(),_r=yi(u),wr=mh(fr,_r);wr.payload=Xe,null!=Wt&&(wr.callback=Wt),null!==(Xe=nh(u,wr,_r))&&(gi(Xe,u,_r,fr),oh(Xe,u,_r))},enqueueReplaceState:function(u,Xe,Wt){u=u._reactInternals;var fr=R(),_r=yi(u),wr=mh(fr,_r);wr.tag=1,wr.payload=Xe,null!=Wt&&(wr.callback=Wt),null!==(Xe=nh(u,wr,_r))&&(gi(Xe,u,_r,fr),oh(Xe,u,_r))},enqueueForceUpdate:function(u,Xe){u=u._reactInternals;var Wt=R(),fr=yi(u),_r=mh(Wt,fr);_r.tag=2,null!=Xe&&(_r.callback=Xe),null!==(Xe=nh(u,_r,fr))&&(gi(Xe,u,fr,Wt),oh(Xe,u,fr))}};function Fi(u,Xe,Wt,fr,_r,wr,Ar){return"function"==typeof(u=u.stateNode).shouldComponentUpdate?u.shouldComponentUpdate(fr,wr,Ar):!Xe.prototype||!Xe.prototype.isPureReactComponent||(!Ie(Wt,fr)||!Ie(_r,wr))}function Gi(u,Xe,Wt){var fr=!1,_r=Hp,wr=Xe.contextType;return"object"==typeof wr&&null!==wr?wr=eh(wr):(_r=Zf(Xe)?Xp:Gp.current,wr=(fr=null!=(fr=Xe.contextTypes))?Yf(u,_r):Hp),Xe=new Xe(Wt,wr),u.memoizedState=null!==Xe.state&&void 0!==Xe.state?Xe.state:null,Xe.updater=cm,u.stateNode=Xe,Xe._reactInternals=u,fr&&((u=u.stateNode).__reactInternalMemoizedUnmaskedChildContext=_r,u.__reactInternalMemoizedMaskedChildContext=wr),Xe}function Hi(u,Xe,Wt,fr){u=Xe.state,"function"==typeof Xe.componentWillReceiveProps&&Xe.componentWillReceiveProps(Wt,fr),"function"==typeof Xe.UNSAFE_componentWillReceiveProps&&Xe.UNSAFE_componentWillReceiveProps(Wt,fr),Xe.state!==u&&cm.enqueueReplaceState(Xe,Xe.state,null)}function Ii(u,Xe,Wt,fr){var _r=u.stateNode;_r.props=Wt,_r.state=u.memoizedState,_r.refs={},kh(u);var wr=Xe.contextType;"object"==typeof wr&&null!==wr?_r.context=eh(wr):(wr=Zf(Xe)?Xp:Gp.current,_r.context=Yf(u,wr)),_r.state=u.memoizedState,"function"==typeof(wr=Xe.getDerivedStateFromProps)&&(Di(u,Xe,wr,Wt),_r.state=u.memoizedState),"function"==typeof Xe.getDerivedStateFromProps||"function"==typeof _r.getSnapshotBeforeUpdate||"function"!=typeof _r.UNSAFE_componentWillMount&&"function"!=typeof _r.componentWillMount||(Xe=_r.state,"function"==typeof _r.componentWillMount&&_r.componentWillMount(),"function"==typeof _r.UNSAFE_componentWillMount&&_r.UNSAFE_componentWillMount(),Xe!==_r.state&&cm.enqueueReplaceState(_r,_r.state,null),qh(u,Wt,_r,fr),_r.state=u.memoizedState),"function"==typeof _r.componentDidMount&&(u.flags|=4194308)}function Ji(u,Xe){try{var Wt="",fr=Xe;do{Wt+=Pa(fr),fr=fr.return}while(fr);var _r=Wt}catch(u){_r="\nError generating stack: "+u.message+"\n"+u.stack}return{value:u,source:Xe,stack:_r,digest:null}}function Ki(u,Xe,Wt){return{value:u,source:null,stack:null!=Wt?Wt:null,digest:null!=Xe?Xe:null}}function Li(u,Xe){try{console.error(Xe.value)}catch(u){setTimeout((function(){throw u}))}}var um="function"==typeof WeakMap?WeakMap:Map;function Ni(u,Xe,Wt){(Wt=mh(-1,Wt)).tag=3,Wt.payload={element:null};var fr=Xe.value;return Wt.callback=function(){Zm||(Zm=!0,Hm=fr),Li(0,Xe)},Wt}function Qi(u,Xe,Wt){(Wt=mh(-1,Wt)).tag=3;var fr=u.type.getDerivedStateFromError;if("function"==typeof fr){var _r=Xe.value;Wt.payload=function(){return fr(_r)},Wt.callback=function(){Li(0,Xe)}}var wr=u.stateNode;return null!==wr&&"function"==typeof wr.componentDidCatch&&(Wt.callback=function(){Li(0,Xe),"function"!=typeof fr&&(null===Gm?Gm=new Set([this]):Gm.add(this));var u=Xe.stack;this.componentDidCatch(Xe.value,{componentStack:null!==u?u:""})}),Wt}function Si(u,Xe,Wt){var fr=u.pingCache;if(null===fr){fr=u.pingCache=new um;var _r=new Set;fr.set(Xe,_r)}else void 0===(_r=fr.get(Xe))&&(_r=new Set,fr.set(Xe,_r));_r.has(Wt)||(_r.add(Wt),u=Ti.bind(null,u,Xe,Wt),Xe.then(u,u))}function Ui(u){do{var Xe;if((Xe=13===u.tag)&&(Xe=null===(Xe=u.memoizedState)||null!==Xe.dehydrated),Xe)return u;u=u.return}while(null!==u);return null}function Vi(u,Xe,Wt,fr,_r){return 1&u.mode?(u.flags|=65536,u.lanes=_r,u):(u===Xe?u.flags|=65536:(u.flags|=128,Wt.flags|=131072,Wt.flags&=-52805,1===Wt.tag&&(null===Wt.alternate?Wt.tag=17:((Xe=mh(-1,1)).tag=2,nh(Wt,Xe,1))),Wt.lanes|=1),u)}var dm=co.ReactCurrentOwner,hm=!1;function Xi(u,Xe,Wt,fr){Xe.child=null===u?Sf(Xe,null,Wt,fr):xf(Xe,u.child,Wt,fr)}function Yi(u,Xe,Wt,fr,_r){Wt=Wt.render;var wr=Xe.ref;return ch(Xe,_r),fr=Nh(u,Xe,Wt,fr,wr,_r),Wt=Sh(),null===u||hm?(yf&&Wt&&vg(Xe),Xe.flags|=1,Xi(u,Xe,fr,_r),Xe.child):(Xe.updateQueue=u.updateQueue,Xe.flags&=-2053,u.lanes&=~_r,Zi(u,Xe,_r))}function $i(u,Xe,Wt,fr,_r){if(null===u){var wr=Wt.type;return"function"!=typeof wr||aj(wr)||void 0!==wr.defaultProps||null!==Wt.compare||void 0!==Wt.defaultProps?((u=Rg(Wt.type,null,fr,Xe,Xe.mode,_r)).ref=Xe.ref,u.return=Xe,Xe.child=u):(Xe.tag=15,Xe.type=wr,bj(u,Xe,wr,fr,_r))}if(wr=u.child,!(u.lanes&_r)){var Ar=wr.memoizedProps;if((Wt=null!==(Wt=Wt.compare)?Wt:Ie)(Ar,fr)&&u.ref===Xe.ref)return Zi(u,Xe,_r)}return Xe.flags|=1,(u=Pg(wr,fr)).ref=Xe.ref,u.return=Xe,Xe.child=u}function bj(u,Xe,Wt,fr,_r){if(null!==u){var wr=u.memoizedProps;if(Ie(wr,fr)&&u.ref===Xe.ref){if(hm=!1,Xe.pendingProps=fr=wr,!(u.lanes&_r))return Xe.lanes=u.lanes,Zi(u,Xe,_r);131072&u.flags&&(hm=!0)}}return cj(u,Xe,Wt,fr,_r)}function dj(u,Xe,Wt){var fr=Xe.pendingProps,_r=fr.children,wr=null!==u?u.memoizedState:null;if("hidden"===fr.mode)if(1&Xe.mode){if(!(1073741824&Wt))return u=null!==wr?wr.baseLanes|Wt:Wt,Xe.lanes=Xe.childLanes=1073741824,Xe.memoizedState={baseLanes:u,cachePool:null,transitions:null},Xe.updateQueue=null,G(Lm,Om),Om|=u,null;Xe.memoizedState={baseLanes:0,cachePool:null,transitions:null},fr=null!==wr?wr.baseLanes:Wt,G(Lm,Om),Om|=fr}else Xe.memoizedState={baseLanes:0,cachePool:null,transitions:null},G(Lm,Om),Om|=Wt;else null!==wr?(fr=wr.baseLanes|Wt,Xe.memoizedState=null):fr=Wt,G(Lm,Om),Om|=fr;return Xi(u,Xe,_r,Wt),Xe.child}function gj(u,Xe){var Wt=Xe.ref;(null===u&&null!==Wt||null!==u&&u.ref!==Wt)&&(Xe.flags|=512,Xe.flags|=2097152)}function cj(u,Xe,Wt,fr,_r){var wr=Zf(Wt)?Xp:Gp.current;return wr=Yf(Xe,wr),ch(Xe,_r),Wt=Nh(u,Xe,Wt,fr,wr,_r),fr=Sh(),null===u||hm?(yf&&fr&&vg(Xe),Xe.flags|=1,Xi(u,Xe,Wt,_r),Xe.child):(Xe.updateQueue=u.updateQueue,Xe.flags&=-2053,u.lanes&=~_r,Zi(u,Xe,_r))}function hj(u,Xe,Wt,fr,_r){if(Zf(Wt)){var wr=!0;cg(Xe)}else wr=!1;if(ch(Xe,_r),null===Xe.stateNode)ij(u,Xe),Gi(Xe,Wt,fr),Ii(Xe,Wt,fr,_r),fr=!0;else if(null===u){var Ar=Xe.stateNode,Kr=Xe.memoizedProps;Ar.props=Kr;var In=Ar.context,no=Wt.contextType;"object"==typeof no&&null!==no?no=eh(no):no=Yf(Xe,no=Zf(Wt)?Xp:Gp.current);var io=Wt.getDerivedStateFromProps,oo="function"==typeof io||"function"==typeof Ar.getSnapshotBeforeUpdate;oo||"function"!=typeof Ar.UNSAFE_componentWillReceiveProps&&"function"!=typeof Ar.componentWillReceiveProps||(Kr!==fr||In!==no)&&Hi(Xe,Ar,fr,no),Of=!1;var ao=Xe.memoizedState;Ar.state=ao,qh(Xe,fr,Ar,_r),In=Xe.memoizedState,Kr!==fr||ao!==In||Kp.current||Of?("function"==typeof io&&(Di(Xe,Wt,io,fr),In=Xe.memoizedState),(Kr=Of||Fi(Xe,Wt,Kr,fr,ao,In,no))?(oo||"function"!=typeof Ar.UNSAFE_componentWillMount&&"function"!=typeof Ar.componentWillMount||("function"==typeof Ar.componentWillMount&&Ar.componentWillMount(),"function"==typeof Ar.UNSAFE_componentWillMount&&Ar.UNSAFE_componentWillMount()),"function"==typeof Ar.componentDidMount&&(Xe.flags|=4194308)):("function"==typeof Ar.componentDidMount&&(Xe.flags|=4194308),Xe.memoizedProps=fr,Xe.memoizedState=In),Ar.props=fr,Ar.state=In,Ar.context=no,fr=Kr):("function"==typeof Ar.componentDidMount&&(Xe.flags|=4194308),fr=!1)}else{Ar=Xe.stateNode,lh(u,Xe),Kr=Xe.memoizedProps,no=Xe.type===Xe.elementType?Kr:Ci(Xe.type,Kr),Ar.props=no,oo=Xe.pendingProps,ao=Ar.context,"object"==typeof(In=Wt.contextType)&&null!==In?In=eh(In):In=Yf(Xe,In=Zf(Wt)?Xp:Gp.current);var so=Wt.getDerivedStateFromProps;(io="function"==typeof so||"function"==typeof Ar.getSnapshotBeforeUpdate)||"function"!=typeof Ar.UNSAFE_componentWillReceiveProps&&"function"!=typeof Ar.componentWillReceiveProps||(Kr!==oo||ao!==In)&&Hi(Xe,Ar,fr,In),Of=!1,ao=Xe.memoizedState,Ar.state=ao,qh(Xe,fr,Ar,_r);var co=Xe.memoizedState;Kr!==oo||ao!==co||Kp.current||Of?("function"==typeof so&&(Di(Xe,Wt,so,fr),co=Xe.memoizedState),(no=Of||Fi(Xe,Wt,no,fr,ao,co,In)||!1)?(io||"function"!=typeof Ar.UNSAFE_componentWillUpdate&&"function"!=typeof Ar.componentWillUpdate||("function"==typeof Ar.componentWillUpdate&&Ar.componentWillUpdate(fr,co,In),"function"==typeof Ar.UNSAFE_componentWillUpdate&&Ar.UNSAFE_componentWillUpdate(fr,co,In)),"function"==typeof Ar.componentDidUpdate&&(Xe.flags|=4),"function"==typeof Ar.getSnapshotBeforeUpdate&&(Xe.flags|=1024)):("function"!=typeof Ar.componentDidUpdate||Kr===u.memoizedProps&&ao===u.memoizedState||(Xe.flags|=4),"function"!=typeof Ar.getSnapshotBeforeUpdate||Kr===u.memoizedProps&&ao===u.memoizedState||(Xe.flags|=1024),Xe.memoizedProps=fr,Xe.memoizedState=co),Ar.props=fr,Ar.state=co,Ar.context=In,fr=no):("function"!=typeof Ar.componentDidUpdate||Kr===u.memoizedProps&&ao===u.memoizedState||(Xe.flags|=4),"function"!=typeof Ar.getSnapshotBeforeUpdate||Kr===u.memoizedProps&&ao===u.memoizedState||(Xe.flags|=1024),fr=!1)}return jj(u,Xe,Wt,fr,wr,_r)}function jj(u,Xe,Wt,fr,_r,wr){gj(u,Xe);var Ar=!!(128&Xe.flags);if(!fr&&!Ar)return _r&&dg(Xe,Wt,!1),Zi(u,Xe,wr);fr=Xe.stateNode,dm.current=Xe;var Kr=Ar&&"function"!=typeof Wt.getDerivedStateFromError?null:fr.render();return Xe.flags|=1,null!==u&&Ar?(Xe.child=xf(Xe,u.child,null,wr),Xe.child=xf(Xe,null,Kr,wr)):Xi(u,Xe,Kr,wr),Xe.memoizedState=fr.state,_r&&dg(Xe,Wt,!0),Xe.child}function kj(u){var Xe=u.stateNode;Xe.pendingContext?ag(0,Xe.pendingContext,Xe.pendingContext!==Xe.context):Xe.context&&ag(0,Xe.context,!1),yh(u,Xe.containerInfo)}function lj(u,Xe,Wt,fr,_r){return Ig(),Jg(_r),Xe.flags|=256,Xi(u,Xe,Wt,fr),Xe.child}var pm,fm,mm,gm,ym={dehydrated:null,treeContext:null,retryLane:0};function nj(u){return{baseLanes:u,cachePool:null,transitions:null}}function oj(u,Xe,Wt){var fr,_r=Xe.pendingProps,wr=Vf.current,Ar=!1,Kr=!!(128&Xe.flags);if((fr=Kr)||(fr=(null===u||null!==u.memoizedState)&&!!(2&wr)),fr?(Ar=!0,Xe.flags&=-129):null!==u&&null===u.memoizedState||(wr|=1),G(Vf,1&wr),null===u)return Eg(Xe),null!==(u=Xe.memoizedState)&&null!==(u=u.dehydrated)?(1&Xe.mode?"$!"===u.data?Xe.lanes=8:Xe.lanes=1073741824:Xe.lanes=1,null):(Kr=_r.children,u=_r.fallback,Ar?(_r=Xe.mode,Ar=Xe.child,Kr={mode:"hidden",children:Kr},1&_r||null===Ar?Ar=pj(Kr,_r,0,null):(Ar.childLanes=0,Ar.pendingProps=Kr),u=Tg(u,_r,Wt,null),Ar.return=Xe,u.return=Xe,Ar.sibling=u,Xe.child=Ar,Xe.child.memoizedState=nj(Wt),Xe.memoizedState=ym,u):qj(Xe,Kr));if(null!==(wr=u.memoizedState)&&null!==(fr=wr.dehydrated))return function rj(u,Xe,Wt,fr,_r,wr,Ar){if(Wt)return 256&Xe.flags?(Xe.flags&=-257,sj(u,Xe,Ar,fr=Ki(Error(p(422))))):null!==Xe.memoizedState?(Xe.child=u.child,Xe.flags|=128,null):(wr=fr.fallback,_r=Xe.mode,fr=pj({mode:"visible",children:fr.children},_r,0,null),(wr=Tg(wr,_r,Ar,null)).flags|=2,fr.return=Xe,wr.return=Xe,fr.sibling=wr,Xe.child=fr,1&Xe.mode&&xf(Xe,u.child,null,Ar),Xe.child.memoizedState=nj(Ar),Xe.memoizedState=ym,wr);if(!(1&Xe.mode))return sj(u,Xe,Ar,null);if("$!"===_r.data){if(fr=_r.nextSibling&&_r.nextSibling.dataset)var Kr=fr.dgst;return fr=Kr,sj(u,Xe,Ar,fr=Ki(wr=Error(p(419)),fr,void 0))}if(Kr=!!(Ar&u.childLanes),hm||Kr){if(null!==(fr=Mm)){switch(Ar&-Ar){case 4:_r=2;break;case 16:_r=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:_r=32;break;case 536870912:_r=268435456;break;default:_r=0}0!==(_r=_r&(fr.suspendedLanes|Ar)?0:_r)&&_r!==wr.retryLane&&(wr.retryLane=_r,ih(u,_r),gi(fr,u,_r,-1))}return tj(),sj(u,Xe,Ar,fr=Ki(Error(p(421))))}return"$?"===_r.data?(Xe.flags|=128,Xe.child=u.child,Xe=uj.bind(null,u),_r._reactRetry=Xe,null):(u=wr.treeContext,gf=Lf(_r.nextSibling),mf=Xe,yf=!0,_f=null,null!==u&&(lf[cf++]=df,lf[cf++]=hf,lf[cf++]=uf,df=u.id,hf=u.overflow,uf=Xe),Xe=qj(Xe,fr.children),Xe.flags|=4096,Xe)}(u,Xe,Kr,_r,fr,wr,Wt);if(Ar){Ar=_r.fallback,Kr=Xe.mode,fr=(wr=u.child).sibling;var In={mode:"hidden",children:_r.children};return 1&Kr||Xe.child===wr?(_r=Pg(wr,In)).subtreeFlags=14680064&wr.subtreeFlags:((_r=Xe.child).childLanes=0,_r.pendingProps=In,Xe.deletions=null),null!==fr?Ar=Pg(fr,Ar):(Ar=Tg(Ar,Kr,Wt,null)).flags|=2,Ar.return=Xe,_r.return=Xe,_r.sibling=Ar,Xe.child=_r,_r=Ar,Ar=Xe.child,Kr=null===(Kr=u.child.memoizedState)?nj(Wt):{baseLanes:Kr.baseLanes|Wt,cachePool:null,transitions:Kr.transitions},Ar.memoizedState=Kr,Ar.childLanes=u.childLanes&~Wt,Xe.memoizedState=ym,_r}return u=(Ar=u.child).sibling,_r=Pg(Ar,{mode:"visible",children:_r.children}),!(1&Xe.mode)&&(_r.lanes=Wt),_r.return=Xe,_r.sibling=null,null!==u&&(null===(Wt=Xe.deletions)?(Xe.deletions=[u],Xe.flags|=16):Wt.push(u)),Xe.child=_r,Xe.memoizedState=null,_r}function qj(u,Xe){return(Xe=pj({mode:"visible",children:Xe},u.mode,0,null)).return=u,u.child=Xe}function sj(u,Xe,Wt,fr){return null!==fr&&Jg(fr),xf(Xe,u.child,null,Wt),(u=qj(Xe,Xe.pendingProps.children)).flags|=2,Xe.memoizedState=null,u}function vj(u,Xe,Wt){u.lanes|=Xe;var fr=u.alternate;null!==fr&&(fr.lanes|=Xe),bh(u.return,Xe,Wt)}function wj(u,Xe,Wt,fr,_r){var wr=u.memoizedState;null===wr?u.memoizedState={isBackwards:Xe,rendering:null,renderingStartTime:0,last:fr,tail:Wt,tailMode:_r}:(wr.isBackwards=Xe,wr.rendering=null,wr.renderingStartTime=0,wr.last=fr,wr.tail=Wt,wr.tailMode=_r)}function xj(u,Xe,Wt){var fr=Xe.pendingProps,_r=fr.revealOrder,wr=fr.tail;if(Xi(u,Xe,fr.children,Wt),2&(fr=Vf.current))fr=1&fr|2,Xe.flags|=128;else{if(null!==u&&128&u.flags)e:for(u=Xe.child;null!==u;){if(13===u.tag)null!==u.memoizedState&&vj(u,Wt,Xe);else if(19===u.tag)vj(u,Wt,Xe);else if(null!==u.child){u.child.return=u,u=u.child;continue}if(u===Xe)break e;for(;null===u.sibling;){if(null===u.return||u.return===Xe)break e;u=u.return}u.sibling.return=u.return,u=u.sibling}fr&=1}if(G(Vf,fr),1&Xe.mode)switch(_r){case"forwards":for(Wt=Xe.child,_r=null;null!==Wt;)null!==(u=Wt.alternate)&&null===Ch(u)&&(_r=Wt),Wt=Wt.sibling;null===(Wt=_r)?(_r=Xe.child,Xe.child=null):(_r=Wt.sibling,Wt.sibling=null),wj(Xe,!1,_r,Wt,wr);break;case"backwards":for(Wt=null,_r=Xe.child,Xe.child=null;null!==_r;){if(null!==(u=_r.alternate)&&null===Ch(u)){Xe.child=_r;break}u=_r.sibling,_r.sibling=Wt,Wt=_r,_r=u}wj(Xe,!0,Wt,null,wr);break;case"together":wj(Xe,!1,null,null,void 0);break;default:Xe.memoizedState=null}else Xe.memoizedState=null;return Xe.child}function ij(u,Xe){!(1&Xe.mode)&&null!==u&&(u.alternate=null,Xe.alternate=null,Xe.flags|=2)}function Zi(u,Xe,Wt){if(null!==u&&(Xe.dependencies=u.dependencies),jm|=Xe.lanes,!(Wt&Xe.childLanes))return null;if(null!==u&&Xe.child!==u.child)throw Error(p(153));if(null!==Xe.child){for(Wt=Pg(u=Xe.child,u.pendingProps),Xe.child=Wt,Wt.return=Xe;null!==u.sibling;)u=u.sibling,(Wt=Wt.sibling=Pg(u,u.pendingProps)).return=Xe;Wt.sibling=null}return Xe.child}function Dj(u,Xe){if(!yf)switch(u.tailMode){case"hidden":Xe=u.tail;for(var Wt=null;null!==Xe;)null!==Xe.alternate&&(Wt=Xe),Xe=Xe.sibling;null===Wt?u.tail=null:Wt.sibling=null;break;case"collapsed":Wt=u.tail;for(var fr=null;null!==Wt;)null!==Wt.alternate&&(fr=Wt),Wt=Wt.sibling;null===fr?Xe||null===u.tail?u.tail=null:u.tail.sibling=null:fr.sibling=null}}function S(u){var Xe=null!==u.alternate&&u.alternate.child===u.child,Wt=0,fr=0;if(Xe)for(var _r=u.child;null!==_r;)Wt|=_r.lanes|_r.childLanes,fr|=14680064&_r.subtreeFlags,fr|=14680064&_r.flags,_r.return=u,_r=_r.sibling;else for(_r=u.child;null!==_r;)Wt|=_r.lanes|_r.childLanes,fr|=_r.subtreeFlags,fr|=_r.flags,_r.return=u,_r=_r.sibling;return u.subtreeFlags|=fr,u.childLanes=Wt,Xe}function Ej(u,Xe,Wt){var fr=Xe.pendingProps;switch(wg(Xe),Xe.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return S(Xe),null;case 1:case 17:return Zf(Xe.type)&&$f(),S(Xe),null;case 3:return fr=Xe.stateNode,zh(),E(Kp),E(Gp),Eh(),fr.pendingContext&&(fr.context=fr.pendingContext,fr.pendingContext=null),null!==u&&null!==u.child||(Gg(Xe)?Xe.flags|=4:null===u||u.memoizedState.isDehydrated&&!(256&Xe.flags)||(Xe.flags|=1024,null!==_f&&(Fj(_f),_f=null))),fm(u,Xe),S(Xe),null;case 5:Bh(Xe);var _r=xh(Nf.current);if(Wt=Xe.type,null!==u&&null!=Xe.stateNode)mm(u,Xe,Wt,fr,_r),u.ref!==Xe.ref&&(Xe.flags|=512,Xe.flags|=2097152);else{if(!fr){if(null===Xe.stateNode)throw Error(p(166));return S(Xe),null}if(u=xh(Ff.current),Gg(Xe)){fr=Xe.stateNode,Wt=Xe.type;var wr=Xe.memoizedProps;switch(fr[Bp]=Xe,fr[Np]=wr,u=!!(1&Xe.mode),Wt){case"dialog":D("cancel",fr),D("close",fr);break;case"iframe":case"object":case"embed":D("load",fr);break;case"video":case"audio":for(_r=0;_r<Ep.length;_r++)D(Ep[_r],fr);break;case"source":D("error",fr);break;case"img":case"image":case"link":D("error",fr),D("load",fr);break;case"details":D("toggle",fr);break;case"input":Za(fr,wr),D("invalid",fr);break;case"select":fr._wrapperState={wasMultiple:!!wr.multiple},D("invalid",fr);break;case"textarea":hb(fr,wr),D("invalid",fr)}for(var Kr in ub(Wt,wr),_r=null,wr)if(wr.hasOwnProperty(Kr)){var In=wr[Kr];"children"===Kr?"string"==typeof In?fr.textContent!==In&&(!0!==wr.suppressHydrationWarning&&Af(fr.textContent,In,u),_r=["children",In]):"number"==typeof In&&fr.textContent!==""+In&&(!0!==wr.suppressHydrationWarning&&Af(fr.textContent,In,u),_r=["children",""+In]):Ar.hasOwnProperty(Kr)&&null!=In&&"onScroll"===Kr&&D("scroll",fr)}switch(Wt){case"input":Va(fr),db(fr,wr,!0);break;case"textarea":Va(fr),jb(fr);break;case"select":case"option":break;default:"function"==typeof wr.onClick&&(fr.onclick=Bf)}fr=_r,Xe.updateQueue=fr,null!==fr&&(Xe.flags|=4)}else{Kr=9===_r.nodeType?_r:_r.ownerDocument,"http://www.w3.org/1999/xhtml"===u&&(u=kb(Wt)),"http://www.w3.org/1999/xhtml"===u?"script"===Wt?((u=Kr.createElement("div")).innerHTML="<script><\/script>",u=u.removeChild(u.firstChild)):"string"==typeof fr.is?u=Kr.createElement(Wt,{is:fr.is}):(u=Kr.createElement(Wt),"select"===Wt&&(Kr=u,fr.multiple?Kr.multiple=!0:fr.size&&(Kr.size=fr.size))):u=Kr.createElementNS(u,Wt),u[Bp]=Xe,u[Np]=fr,pm(u,Xe,!1,!1),Xe.stateNode=u;e:{switch(Kr=vb(Wt,fr),Wt){case"dialog":D("cancel",u),D("close",u),_r=fr;break;case"iframe":case"object":case"embed":D("load",u),_r=fr;break;case"video":case"audio":for(_r=0;_r<Ep.length;_r++)D(Ep[_r],u);_r=fr;break;case"source":D("error",u),_r=fr;break;case"img":case"image":case"link":D("error",u),D("load",u),_r=fr;break;case"details":D("toggle",u),_r=fr;break;case"input":Za(u,fr),_r=Ya(u,fr),D("invalid",u);break;case"option":default:_r=fr;break;case"select":u._wrapperState={wasMultiple:!!fr.multiple},_r=Al({},fr,{value:void 0}),D("invalid",u);break;case"textarea":hb(u,fr),_r=gb(u,fr),D("invalid",u)}for(wr in ub(Wt,_r),In=_r)if(In.hasOwnProperty(wr)){var no=In[wr];"style"===wr?sb(u,no):"dangerouslySetInnerHTML"===wr?null!=(no=no?no.__html:void 0)&&Dl(u,no):"children"===wr?"string"==typeof no?("textarea"!==Wt||""!==no)&&ob(u,no):"number"==typeof no&&ob(u,""+no):"suppressContentEditableWarning"!==wr&&"suppressHydrationWarning"!==wr&&"autoFocus"!==wr&&(Ar.hasOwnProperty(wr)?null!=no&&"onScroll"===wr&&D("scroll",u):null!=no&&ta(u,wr,no,Kr))}switch(Wt){case"input":Va(u),db(u,fr,!1);break;case"textarea":Va(u),jb(u);break;case"option":null!=fr.value&&u.setAttribute("value",""+Sa(fr.value));break;case"select":u.multiple=!!fr.multiple,null!=(wr=fr.value)?fb(u,!!fr.multiple,wr,!1):null!=fr.defaultValue&&fb(u,!!fr.multiple,fr.defaultValue,!0);break;default:"function"==typeof _r.onClick&&(u.onclick=Bf)}switch(Wt){case"button":case"input":case"select":case"textarea":fr=!!fr.autoFocus;break e;case"img":fr=!0;break e;default:fr=!1}}fr&&(Xe.flags|=4)}null!==Xe.ref&&(Xe.flags|=512,Xe.flags|=2097152)}return S(Xe),null;case 6:if(u&&null!=Xe.stateNode)gm(u,Xe,u.memoizedProps,fr);else{if("string"!=typeof fr&&null===Xe.stateNode)throw Error(p(166));if(Wt=xh(Nf.current),xh(Ff.current),Gg(Xe)){if(fr=Xe.stateNode,Wt=Xe.memoizedProps,fr[Bp]=Xe,(wr=fr.nodeValue!==Wt)&&null!==(u=mf))switch(u.tag){case 3:Af(fr.nodeValue,Wt,!!(1&u.mode));break;case 5:!0!==u.memoizedProps.suppressHydrationWarning&&Af(fr.nodeValue,Wt,!!(1&u.mode))}wr&&(Xe.flags|=4)}else(fr=(9===Wt.nodeType?Wt:Wt.ownerDocument).createTextNode(fr))[Bp]=Xe,Xe.stateNode=fr}return S(Xe),null;case 13:if(E(Vf),fr=Xe.memoizedState,null===u||null!==u.memoizedState&&null!==u.memoizedState.dehydrated){if(yf&&null!==gf&&1&Xe.mode&&!(128&Xe.flags))Hg(),Ig(),Xe.flags|=98560,wr=!1;else if(wr=Gg(Xe),null!==fr&&null!==fr.dehydrated){if(null===u){if(!wr)throw Error(p(318));if(!(wr=null!==(wr=Xe.memoizedState)?wr.dehydrated:null))throw Error(p(317));wr[Bp]=Xe}else Ig(),!(128&Xe.flags)&&(Xe.memoizedState=null),Xe.flags|=4;S(Xe),wr=!1}else null!==_f&&(Fj(_f),_f=null),wr=!0;if(!wr)return 65536&Xe.flags?Xe:null}return 128&Xe.flags?(Xe.lanes=Wt,Xe):((fr=null!==fr)!==(null!==u&&null!==u.memoizedState)&&fr&&(Xe.child.flags|=8192,1&Xe.mode&&(null===u||1&Vf.current?0===Dm&&(Dm=3):tj())),null!==Xe.updateQueue&&(Xe.flags|=4),S(Xe),null);case 4:return zh(),fm(u,Xe),null===u&&sf(Xe.stateNode.containerInfo),S(Xe),null;case 10:return ah(Xe.type._context),S(Xe),null;case 19:if(E(Vf),null===(wr=Xe.memoizedState))return S(Xe),null;if(fr=!!(128&Xe.flags),null===(Kr=wr.rendering))if(fr)Dj(wr,!1);else{if(0!==Dm||null!==u&&128&u.flags)for(u=Xe.child;null!==u;){if(null!==(Kr=Ch(u))){for(Xe.flags|=128,Dj(wr,!1),null!==(fr=Kr.updateQueue)&&(Xe.updateQueue=fr,Xe.flags|=4),Xe.subtreeFlags=0,fr=Wt,Wt=Xe.child;null!==Wt;)u=fr,(wr=Wt).flags&=14680066,null===(Kr=wr.alternate)?(wr.childLanes=0,wr.lanes=u,wr.child=null,wr.subtreeFlags=0,wr.memoizedProps=null,wr.memoizedState=null,wr.updateQueue=null,wr.dependencies=null,wr.stateNode=null):(wr.childLanes=Kr.childLanes,wr.lanes=Kr.lanes,wr.child=Kr.child,wr.subtreeFlags=0,wr.deletions=null,wr.memoizedProps=Kr.memoizedProps,wr.memoizedState=Kr.memoizedState,wr.updateQueue=Kr.updateQueue,wr.type=Kr.type,u=Kr.dependencies,wr.dependencies=null===u?null:{lanes:u.lanes,firstContext:u.firstContext}),Wt=Wt.sibling;return G(Vf,1&Vf.current|2),Xe.child}u=u.sibling}null!==wr.tail&&nu()>Wm&&(Xe.flags|=128,fr=!0,Dj(wr,!1),Xe.lanes=4194304)}else{if(!fr)if(null!==(u=Ch(Kr))){if(Xe.flags|=128,fr=!0,null!==(Wt=u.updateQueue)&&(Xe.updateQueue=Wt,Xe.flags|=4),Dj(wr,!0),null===wr.tail&&"hidden"===wr.tailMode&&!Kr.alternate&&!yf)return S(Xe),null}else 2*nu()-wr.renderingStartTime>Wm&&1073741824!==Wt&&(Xe.flags|=128,fr=!0,Dj(wr,!1),Xe.lanes=4194304);wr.isBackwards?(Kr.sibling=Xe.child,Xe.child=Kr):(null!==(Wt=wr.last)?Wt.sibling=Kr:Xe.child=Kr,wr.last=Kr)}return null!==wr.tail?(Xe=wr.tail,wr.rendering=Xe,wr.tail=Xe.sibling,wr.renderingStartTime=nu(),Xe.sibling=null,Wt=Vf.current,G(Vf,fr?1&Wt|2:1&Wt),Xe):(S(Xe),null);case 22:case 23:return Hj(),fr=null!==Xe.memoizedState,null!==u&&null!==u.memoizedState!==fr&&(Xe.flags|=8192),fr&&1&Xe.mode?!!(1073741824&Om)&&(S(Xe),6&Xe.subtreeFlags&&(Xe.flags|=8192)):S(Xe),null;case 24:case 25:return null}throw Error(p(156,Xe.tag))}function Ij(u,Xe){switch(wg(Xe),Xe.tag){case 1:return Zf(Xe.type)&&$f(),65536&(u=Xe.flags)?(Xe.flags=-65537&u|128,Xe):null;case 3:return zh(),E(Kp),E(Gp),Eh(),65536&(u=Xe.flags)&&!(128&u)?(Xe.flags=-65537&u|128,Xe):null;case 5:return Bh(Xe),null;case 13:if(E(Vf),null!==(u=Xe.memoizedState)&&null!==u.dehydrated){if(null===Xe.alternate)throw Error(p(340));Ig()}return 65536&(u=Xe.flags)?(Xe.flags=-65537&u|128,Xe):null;case 19:return E(Vf),null;case 4:return zh(),null;case 10:return ah(Xe.type._context),null;case 22:case 23:return Hj(),null;default:return null}}pm=function(u,Xe){for(var Wt=Xe.child;null!==Wt;){if(5===Wt.tag||6===Wt.tag)u.appendChild(Wt.stateNode);else if(4!==Wt.tag&&null!==Wt.child){Wt.child.return=Wt,Wt=Wt.child;continue}if(Wt===Xe)break;for(;null===Wt.sibling;){if(null===Wt.return||Wt.return===Xe)return;Wt=Wt.return}Wt.sibling.return=Wt.return,Wt=Wt.sibling}},fm=function(){},mm=function(u,Xe,Wt,fr){var _r=u.memoizedProps;if(_r!==fr){u=Xe.stateNode,xh(Ff.current);var wr,Kr=null;switch(Wt){case"input":_r=Ya(u,_r),fr=Ya(u,fr),Kr=[];break;case"select":_r=Al({},_r,{value:void 0}),fr=Al({},fr,{value:void 0}),Kr=[];break;case"textarea":_r=gb(u,_r),fr=gb(u,fr),Kr=[];break;default:"function"!=typeof _r.onClick&&"function"==typeof fr.onClick&&(u.onclick=Bf)}for(io in ub(Wt,fr),Wt=null,_r)if(!fr.hasOwnProperty(io)&&_r.hasOwnProperty(io)&&null!=_r[io])if("style"===io){var In=_r[io];for(wr in In)In.hasOwnProperty(wr)&&(Wt||(Wt={}),Wt[wr]="")}else"dangerouslySetInnerHTML"!==io&&"children"!==io&&"suppressContentEditableWarning"!==io&&"suppressHydrationWarning"!==io&&"autoFocus"!==io&&(Ar.hasOwnProperty(io)?Kr||(Kr=[]):(Kr=Kr||[]).push(io,null));for(io in fr){var no=fr[io];if(In=null!=_r?_r[io]:void 0,fr.hasOwnProperty(io)&&no!==In&&(null!=no||null!=In))if("style"===io)if(In){for(wr in In)!In.hasOwnProperty(wr)||no&&no.hasOwnProperty(wr)||(Wt||(Wt={}),Wt[wr]="");for(wr in no)no.hasOwnProperty(wr)&&In[wr]!==no[wr]&&(Wt||(Wt={}),Wt[wr]=no[wr])}else Wt||(Kr||(Kr=[]),Kr.push(io,Wt)),Wt=no;else"dangerouslySetInnerHTML"===io?(no=no?no.__html:void 0,In=In?In.__html:void 0,null!=no&&In!==no&&(Kr=Kr||[]).push(io,no)):"children"===io?"string"!=typeof no&&"number"!=typeof no||(Kr=Kr||[]).push(io,""+no):"suppressContentEditableWarning"!==io&&"suppressHydrationWarning"!==io&&(Ar.hasOwnProperty(io)?(null!=no&&"onScroll"===io&&D("scroll",u),Kr||In===no||(Kr=[])):(Kr=Kr||[]).push(io,no))}Wt&&(Kr=Kr||[]).push("style",Wt);var io=Kr;(Xe.updateQueue=io)&&(Xe.flags|=4)}},gm=function(u,Xe,Wt,fr){Wt!==fr&&(Xe.flags|=4)};var _m=!1,vm=!1,bm="function"==typeof WeakSet?WeakSet:Set,xm=null;function Lj(u,Xe){var Wt=u.ref;if(null!==Wt)if("function"==typeof Wt)try{Wt(null)}catch(Wt){W(u,Xe,Wt)}else Wt.current=null}function Mj(u,Xe,Wt){try{Wt()}catch(Wt){W(u,Xe,Wt)}}var wm=!1;function Pj(u,Xe,Wt){var fr=Xe.updateQueue;if(null!==(fr=null!==fr?fr.lastEffect:null)){var _r=fr=fr.next;do{if((_r.tag&u)===u){var wr=_r.destroy;_r.destroy=void 0,void 0!==wr&&Mj(Xe,Wt,wr)}_r=_r.next}while(_r!==fr)}}function Qj(u,Xe){if(null!==(Xe=null!==(Xe=Xe.updateQueue)?Xe.lastEffect:null)){var Wt=Xe=Xe.next;do{if((Wt.tag&u)===u){var fr=Wt.create;Wt.destroy=fr()}Wt=Wt.next}while(Wt!==Xe)}}function Rj(u){var Xe=u.ref;if(null!==Xe){var Wt=u.stateNode;u.tag,u=Wt,"function"==typeof Xe?Xe(u):Xe.current=u}}function Sj(u){var Xe=u.alternate;null!==Xe&&(u.alternate=null,Sj(Xe)),u.child=null,u.deletions=null,u.sibling=null,5===u.tag&&(null!==(Xe=u.stateNode)&&(delete Xe[Bp],delete Xe[Np],delete Xe[Up],delete Xe[$p],delete Xe[Wp])),u.stateNode=null,u.return=null,u.dependencies=null,u.memoizedProps=null,u.memoizedState=null,u.pendingProps=null,u.stateNode=null,u.updateQueue=null}function Tj(u){return 5===u.tag||3===u.tag||4===u.tag}function Uj(u){e:for(;;){for(;null===u.sibling;){if(null===u.return||Tj(u.return))return null;u=u.return}for(u.sibling.return=u.return,u=u.sibling;5!==u.tag&&6!==u.tag&&18!==u.tag;){if(2&u.flags)continue e;if(null===u.child||4===u.tag)continue e;u.child.return=u,u=u.child}if(!(2&u.flags))return u.stateNode}}function Vj(u,Xe,Wt){var fr=u.tag;if(5===fr||6===fr)u=u.stateNode,Xe?8===Wt.nodeType?Wt.parentNode.insertBefore(u,Xe):Wt.insertBefore(u,Xe):(8===Wt.nodeType?(Xe=Wt.parentNode).insertBefore(u,Wt):(Xe=Wt).appendChild(u),null!=(Wt=Wt._reactRootContainer)||null!==Xe.onclick||(Xe.onclick=Bf));else if(4!==fr&&null!==(u=u.child))for(Vj(u,Xe,Wt),u=u.sibling;null!==u;)Vj(u,Xe,Wt),u=u.sibling}function Wj(u,Xe,Wt){var fr=u.tag;if(5===fr||6===fr)u=u.stateNode,Xe?Wt.insertBefore(u,Xe):Wt.appendChild(u);else if(4!==fr&&null!==(u=u.child))for(Wj(u,Xe,Wt),u=u.sibling;null!==u;)Wj(u,Xe,Wt),u=u.sibling}var Sm=null,km=!1;function Yj(u,Xe,Wt){for(Wt=Wt.child;null!==Wt;)Zj(u,Xe,Wt),Wt=Wt.sibling}function Zj(u,Xe,Wt){if(Lu&&"function"==typeof Lu.onCommitFiberUnmount)try{Lu.onCommitFiberUnmount(zu,Wt)}catch(u){}switch(Wt.tag){case 5:vm||Lj(Wt,Xe);case 6:var fr=Sm,_r=km;Sm=null,Yj(u,Xe,Wt),km=_r,null!==(Sm=fr)&&(km?(u=Sm,Wt=Wt.stateNode,8===u.nodeType?u.parentNode.removeChild(Wt):u.removeChild(Wt)):Sm.removeChild(Wt.stateNode));break;case 18:null!==Sm&&(km?(u=Sm,Wt=Wt.stateNode,8===u.nodeType?Kf(u.parentNode,Wt):1===u.nodeType&&Kf(u,Wt),bd(u)):Kf(Sm,Wt.stateNode));break;case 4:fr=Sm,_r=km,Sm=Wt.stateNode.containerInfo,km=!0,Yj(u,Xe,Wt),Sm=fr,km=_r;break;case 0:case 11:case 14:case 15:if(!vm&&(null!==(fr=Wt.updateQueue)&&null!==(fr=fr.lastEffect))){_r=fr=fr.next;do{var wr=_r,Ar=wr.destroy;wr=wr.tag,void 0!==Ar&&(2&wr||4&wr)&&Mj(Wt,Xe,Ar),_r=_r.next}while(_r!==fr)}Yj(u,Xe,Wt);break;case 1:if(!vm&&(Lj(Wt,Xe),"function"==typeof(fr=Wt.stateNode).componentWillUnmount))try{fr.props=Wt.memoizedProps,fr.state=Wt.memoizedState,fr.componentWillUnmount()}catch(u){W(Wt,Xe,u)}Yj(u,Xe,Wt);break;case 21:Yj(u,Xe,Wt);break;case 22:1&Wt.mode?(vm=(fr=vm)||null!==Wt.memoizedState,Yj(u,Xe,Wt),vm=fr):Yj(u,Xe,Wt);break;default:Yj(u,Xe,Wt)}}function ak(u){var Xe=u.updateQueue;if(null!==Xe){u.updateQueue=null;var Wt=u.stateNode;null===Wt&&(Wt=u.stateNode=new bm),Xe.forEach((function(Xe){var fr=bk.bind(null,u,Xe);Wt.has(Xe)||(Wt.add(Xe),Xe.then(fr,fr))}))}}function ck(u,Xe){var Wt=Xe.deletions;if(null!==Wt)for(var fr=0;fr<Wt.length;fr++){var _r=Wt[fr];try{var wr=u,Ar=Xe,Kr=Ar;e:for(;null!==Kr;){switch(Kr.tag){case 5:Sm=Kr.stateNode,km=!1;break e;case 3:case 4:Sm=Kr.stateNode.containerInfo,km=!0;break e}Kr=Kr.return}if(null===Sm)throw Error(p(160));Zj(wr,Ar,_r),Sm=null,km=!1;var In=_r.alternate;null!==In&&(In.return=null),_r.return=null}catch(u){W(_r,Xe,u)}}if(12854&Xe.subtreeFlags)for(Xe=Xe.child;null!==Xe;)dk(Xe,u),Xe=Xe.sibling}function dk(u,Xe){var Wt=u.alternate,fr=u.flags;switch(u.tag){case 0:case 11:case 14:case 15:if(ck(Xe,u),ek(u),4&fr){try{Pj(3,u,u.return),Qj(3,u)}catch(Xe){W(u,u.return,Xe)}try{Pj(5,u,u.return)}catch(Xe){W(u,u.return,Xe)}}break;case 1:ck(Xe,u),ek(u),512&fr&&null!==Wt&&Lj(Wt,Wt.return);break;case 5:if(ck(Xe,u),ek(u),512&fr&&null!==Wt&&Lj(Wt,Wt.return),32&u.flags){var _r=u.stateNode;try{ob(_r,"")}catch(Xe){W(u,u.return,Xe)}}if(4&fr&&null!=(_r=u.stateNode)){var wr=u.memoizedProps,Ar=null!==Wt?Wt.memoizedProps:wr,Kr=u.type,In=u.updateQueue;if(u.updateQueue=null,null!==In)try{"input"===Kr&&"radio"===wr.type&&null!=wr.name&&ab(_r,wr),vb(Kr,Ar);var no=vb(Kr,wr);for(Ar=0;Ar<In.length;Ar+=2){var io=In[Ar],oo=In[Ar+1];"style"===io?sb(_r,oo):"dangerouslySetInnerHTML"===io?Dl(_r,oo):"children"===io?ob(_r,oo):ta(_r,io,oo,no)}switch(Kr){case"input":bb(_r,wr);break;case"textarea":ib(_r,wr);break;case"select":var ao=_r._wrapperState.wasMultiple;_r._wrapperState.wasMultiple=!!wr.multiple;var so=wr.value;null!=so?fb(_r,!!wr.multiple,so,!1):ao!==!!wr.multiple&&(null!=wr.defaultValue?fb(_r,!!wr.multiple,wr.defaultValue,!0):fb(_r,!!wr.multiple,wr.multiple?[]:"",!1))}_r[Np]=wr}catch(Xe){W(u,u.return,Xe)}}break;case 6:if(ck(Xe,u),ek(u),4&fr){if(null===u.stateNode)throw Error(p(162));_r=u.stateNode,wr=u.memoizedProps;try{_r.nodeValue=wr}catch(Xe){W(u,u.return,Xe)}}break;case 3:if(ck(Xe,u),ek(u),4&fr&&null!==Wt&&Wt.memoizedState.isDehydrated)try{bd(Xe.containerInfo)}catch(Xe){W(u,u.return,Xe)}break;case 4:default:ck(Xe,u),ek(u);break;case 13:ck(Xe,u),ek(u),8192&(_r=u.child).flags&&(wr=null!==_r.memoizedState,_r.stateNode.isHidden=wr,!wr||null!==_r.alternate&&null!==_r.alternate.memoizedState||($m=nu())),4&fr&&ak(u);break;case 22:if(io=null!==Wt&&null!==Wt.memoizedState,1&u.mode?(vm=(no=vm)||io,ck(Xe,u),vm=no):ck(Xe,u),ek(u),8192&fr){if(no=null!==u.memoizedState,(u.stateNode.isHidden=no)&&!io&&1&u.mode)for(xm=u,io=u.child;null!==io;){for(oo=xm=io;null!==xm;){switch(so=(ao=xm).child,ao.tag){case 0:case 11:case 14:case 15:Pj(4,ao,ao.return);break;case 1:Lj(ao,ao.return);var co=ao.stateNode;if("function"==typeof co.componentWillUnmount){fr=ao,Wt=ao.return;try{Xe=fr,co.props=Xe.memoizedProps,co.state=Xe.memoizedState,co.componentWillUnmount()}catch(u){W(fr,Wt,u)}}break;case 5:Lj(ao,ao.return);break;case 22:if(null!==ao.memoizedState){gk(oo);continue}}null!==so?(so.return=ao,xm=so):gk(oo)}io=io.sibling}e:for(io=null,oo=u;;){if(5===oo.tag){if(null===io){io=oo;try{_r=oo.stateNode,no?"function"==typeof(wr=_r.style).setProperty?wr.setProperty("display","none","important"):wr.display="none":(Kr=oo.stateNode,Ar=null!=(In=oo.memoizedProps.style)&&In.hasOwnProperty("display")?In.display:null,Kr.style.display=rb("display",Ar))}catch(Xe){W(u,u.return,Xe)}}}else if(6===oo.tag){if(null===io)try{oo.stateNode.nodeValue=no?"":oo.memoizedProps}catch(Xe){W(u,u.return,Xe)}}else if((22!==oo.tag&&23!==oo.tag||null===oo.memoizedState||oo===u)&&null!==oo.child){oo.child.return=oo,oo=oo.child;continue}if(oo===u)break e;for(;null===oo.sibling;){if(null===oo.return||oo.return===u)break e;io===oo&&(io=null),oo=oo.return}io===oo&&(io=null),oo.sibling.return=oo.return,oo=oo.sibling}}break;case 19:ck(Xe,u),ek(u),4&fr&&ak(u);case 21:}}function ek(u){var Xe=u.flags;if(2&Xe){try{e:{for(var Wt=u.return;null!==Wt;){if(Tj(Wt)){var fr=Wt;break e}Wt=Wt.return}throw Error(p(160))}switch(fr.tag){case 5:var _r=fr.stateNode;32&fr.flags&&(ob(_r,""),fr.flags&=-33),Wj(u,Uj(u),_r);break;case 3:case 4:var wr=fr.stateNode.containerInfo;Vj(u,Uj(u),wr);break;default:throw Error(p(161))}}catch(Xe){W(u,u.return,Xe)}u.flags&=-3}4096&Xe&&(u.flags&=-4097)}function hk(u,Xe,Wt){xm=u,ik(u,Xe,Wt)}function ik(u,Xe,Wt){for(var fr=!!(1&u.mode);null!==xm;){var _r=xm,wr=_r.child;if(22===_r.tag&&fr){var Ar=null!==_r.memoizedState||_m;if(!Ar){var Kr=_r.alternate,In=null!==Kr&&null!==Kr.memoizedState||vm;Kr=_m;var no=vm;if(_m=Ar,(vm=In)&&!no)for(xm=_r;null!==xm;)In=(Ar=xm).child,22===Ar.tag&&null!==Ar.memoizedState?jk(_r):null!==In?(In.return=Ar,xm=In):jk(_r);for(;null!==wr;)xm=wr,ik(wr,Xe,Wt),wr=wr.sibling;xm=_r,_m=Kr,vm=no}kk(u)}else 8772&_r.subtreeFlags&&null!==wr?(wr.return=_r,xm=wr):kk(u)}}function kk(u){for(;null!==xm;){var Xe=xm;if(8772&Xe.flags){var Wt=Xe.alternate;try{if(8772&Xe.flags)switch(Xe.tag){case 0:case 11:case 15:vm||Qj(5,Xe);break;case 1:var fr=Xe.stateNode;if(4&Xe.flags&&!vm)if(null===Wt)fr.componentDidMount();else{var _r=Xe.elementType===Xe.type?Wt.memoizedProps:Ci(Xe.type,Wt.memoizedProps);fr.componentDidUpdate(_r,Wt.memoizedState,fr.__reactInternalSnapshotBeforeUpdate)}var wr=Xe.updateQueue;null!==wr&&sh(Xe,wr,fr);break;case 3:var Ar=Xe.updateQueue;if(null!==Ar){if(Wt=null,null!==Xe.child)switch(Xe.child.tag){case 5:case 1:Wt=Xe.child.stateNode}sh(Xe,Ar,Wt)}break;case 5:var Kr=Xe.stateNode;if(null===Wt&&4&Xe.flags){Wt=Kr;var In=Xe.memoizedProps;switch(Xe.type){case"button":case"input":case"select":case"textarea":In.autoFocus&&Wt.focus();break;case"img":In.src&&(Wt.src=In.src)}}break;case 6:case 4:case 12:case 19:case 17:case 21:case 22:case 23:case 25:break;case 13:if(null===Xe.memoizedState){var no=Xe.alternate;if(null!==no){var io=no.memoizedState;if(null!==io){var oo=io.dehydrated;null!==oo&&bd(oo)}}}break;default:throw Error(p(163))}vm||512&Xe.flags&&Rj(Xe)}catch(u){W(Xe,Xe.return,u)}}if(Xe===u){xm=null;break}if(null!==(Wt=Xe.sibling)){Wt.return=Xe.return,xm=Wt;break}xm=Xe.return}}function gk(u){for(;null!==xm;){var Xe=xm;if(Xe===u){xm=null;break}var Wt=Xe.sibling;if(null!==Wt){Wt.return=Xe.return,xm=Wt;break}xm=Xe.return}}function jk(u){for(;null!==xm;){var Xe=xm;try{switch(Xe.tag){case 0:case 11:case 15:var Wt=Xe.return;try{Qj(4,Xe)}catch(u){W(Xe,Wt,u)}break;case 1:var fr=Xe.stateNode;if("function"==typeof fr.componentDidMount){var _r=Xe.return;try{fr.componentDidMount()}catch(u){W(Xe,_r,u)}}var wr=Xe.return;try{Rj(Xe)}catch(u){W(Xe,wr,u)}break;case 5:var Ar=Xe.return;try{Rj(Xe)}catch(u){W(Xe,Ar,u)}}}catch(u){W(Xe,Xe.return,u)}if(Xe===u){xm=null;break}var Kr=Xe.sibling;if(null!==Kr){Kr.return=Xe.return,xm=Kr;break}xm=Xe.return}}var Am,Tm=Math.ceil,Em=co.ReactCurrentDispatcher,Cm=co.ReactCurrentOwner,Pm=co.ReactCurrentBatchConfig,Im=0,Mm=null,Rm=null,zm=0,Om=0,Lm=Uf(0),Dm=0,Fm=null,jm=0,Bm=0,Nm=0,Vm=null,Um=null,$m=0,Wm=1/0,qm=null,Zm=!1,Hm=null,Gm=null,Km=!1,Xm=null,Ym=0,Jm=0,Qm=null,eg=-1,rg=0;function R(){return 6&Im?nu():-1!==eg?eg:eg=nu()}function yi(u){return 1&u.mode?2&Im&&0!==zm?zm&-zm:null!==bf.transition?(0===rg&&(rg=yc()),rg):0!==(u=qu)?u:u=void 0===(u=window.event)?16:jd(u.type):1}function gi(u,Xe,Wt,fr){if(50<Jm)throw Jm=0,Qm=null,Error(p(185));Ac(u,Wt,fr),2&Im&&u===Mm||(u===Mm&&(!(2&Im)&&(Bm|=Wt),4===Dm&&Ck(u,zm)),Dk(u,fr),1===Wt&&0===Im&&!(1&Xe.mode)&&(Wm=nu()+500,Jp&&jg()))}function Dk(u,Xe){var Wt=u.callbackNode;!function wc(u,Xe){for(var Wt=u.suspendedLanes,fr=u.pingedLanes,_r=u.expirationTimes,wr=u.pendingLanes;0<wr;){var Ar=31-Du(wr),Kr=1<<Ar,In=_r[Ar];-1===In?Kr&Wt&&!(Kr&fr)||(_r[Ar]=vc(Kr,Xe)):In<=Xe&&(u.expiredLanes|=Kr),wr&=~Kr}}(u,Xe);var fr=uc(u,u===Mm?zm:0);if(0===fr)null!==Wt&&bc(Wt),u.callbackNode=null,u.callbackPriority=0;else if(Xe=fr&-fr,u.callbackPriority!==Xe){if(null!=Wt&&bc(Wt),1===Xe)0===u.tag?function ig(u){Jp=!0,hg(u)}(Ek.bind(null,u)):hg(Ek.bind(null,u)),Fp((function(){!(6&Im)&&jg()})),Wt=null;else{switch(Dc(fr)){case 1:Wt=su;break;case 4:Wt=cu;break;case 16:default:Wt=uu;break;case 536870912:Wt=Iu}Wt=Fk(Wt,Gk.bind(null,u))}u.callbackPriority=Xe,u.callbackNode=Wt}}function Gk(u,Xe){if(eg=-1,rg=0,6&Im)throw Error(p(327));var Wt=u.callbackNode;if(Hk()&&u.callbackNode!==Wt)return null;var fr=uc(u,u===Mm?zm:0);if(0===fr)return null;if(30&fr||fr&u.expiredLanes||Xe)Xe=Ik(u,fr);else{Xe=fr;var _r=Im;Im|=2;var wr=Jk();for(Mm===u&&zm===Xe||(qm=null,Wm=nu()+500,Kk(u,Xe));;)try{Lk();break}catch(Xe){Mk(u,Xe)}$g(),Em.current=wr,Im=_r,null!==Rm?Xe=0:(Mm=null,zm=0,Xe=Dm)}if(0!==Xe){if(2===Xe&&(0!==(_r=xc(u))&&(fr=_r,Xe=Nk(u,_r))),1===Xe)throw Wt=Fm,Kk(u,0),Ck(u,fr),Dk(u,nu()),Wt;if(6===Xe)Ck(u,fr);else{if(_r=u.current.alternate,!(30&fr||function Ok(u){for(var Xe=u;;){if(16384&Xe.flags){var Wt=Xe.updateQueue;if(null!==Wt&&null!==(Wt=Wt.stores))for(var fr=0;fr<Wt.length;fr++){var _r=Wt[fr],wr=_r.getSnapshot;_r=_r.value;try{if(!cp(wr(),_r))return!1}catch(u){return!1}}}if(Wt=Xe.child,16384&Xe.subtreeFlags&&null!==Wt)Wt.return=Xe,Xe=Wt;else{if(Xe===u)break;for(;null===Xe.sibling;){if(null===Xe.return||Xe.return===u)return!0;Xe=Xe.return}Xe.sibling.return=Xe.return,Xe=Xe.sibling}}return!0}(_r)||(Xe=Ik(u,fr),2===Xe&&(wr=xc(u),0!==wr&&(fr=wr,Xe=Nk(u,wr))),1!==Xe)))throw Wt=Fm,Kk(u,0),Ck(u,fr),Dk(u,nu()),Wt;switch(u.finishedWork=_r,u.finishedLanes=fr,Xe){case 0:case 1:throw Error(p(345));case 2:case 5:Pk(u,Um,qm);break;case 3:if(Ck(u,fr),(130023424&fr)===fr&&10<(Xe=$m+500-nu())){if(0!==uc(u,0))break;if(((_r=u.suspendedLanes)&fr)!==fr){R(),u.pingedLanes|=u.suspendedLanes&_r;break}u.timeoutHandle=Op(Pk.bind(null,u,Um,qm),Xe);break}Pk(u,Um,qm);break;case 4:if(Ck(u,fr),(4194240&fr)===fr)break;for(Xe=u.eventTimes,_r=-1;0<fr;){var Ar=31-Du(fr);wr=1<<Ar,(Ar=Xe[Ar])>_r&&(_r=Ar),fr&=~wr}if(fr=_r,10<(fr=(120>(fr=nu()-fr)?120:480>fr?480:1080>fr?1080:1920>fr?1920:3e3>fr?3e3:4320>fr?4320:1960*Tm(fr/1960))-fr)){u.timeoutHandle=Op(Pk.bind(null,u,Um,qm),fr);break}Pk(u,Um,qm);break;default:throw Error(p(329))}}}return Dk(u,nu()),u.callbackNode===Wt?Gk.bind(null,u):null}function Nk(u,Xe){var Wt=Vm;return u.current.memoizedState.isDehydrated&&(Kk(u,Xe).flags|=256),2!==(u=Ik(u,Xe))&&(Xe=Um,Um=Wt,null!==Xe&&Fj(Xe)),u}function Fj(u){null===Um?Um=u:Um.push.apply(Um,u)}function Ck(u,Xe){for(Xe&=~Nm,Xe&=~Bm,u.suspendedLanes|=Xe,u.pingedLanes&=~Xe,u=u.expirationTimes;0<Xe;){var Wt=31-Du(Xe),fr=1<<Wt;u[Wt]=-1,Xe&=~fr}}function Ek(u){if(6&Im)throw Error(p(327));Hk();var Xe=uc(u,0);if(!(1&Xe))return Dk(u,nu()),null;var Wt=Ik(u,Xe);if(0!==u.tag&&2===Wt){var fr=xc(u);0!==fr&&(Xe=fr,Wt=Nk(u,fr))}if(1===Wt)throw Wt=Fm,Kk(u,0),Ck(u,Xe),Dk(u,nu()),Wt;if(6===Wt)throw Error(p(345));return u.finishedWork=u.current.alternate,u.finishedLanes=Xe,Pk(u,Um,qm),Dk(u,nu()),null}function Qk(u,Xe){var Wt=Im;Im|=1;try{return u(Xe)}finally{0===(Im=Wt)&&(Wm=nu()+500,Jp&&jg())}}function Rk(u){null!==Xm&&0===Xm.tag&&!(6&Im)&&Hk();var Xe=Im;Im|=1;var Wt=Pm.transition,fr=qu;try{if(Pm.transition=null,qu=1,u)return u()}finally{qu=fr,Pm.transition=Wt,!(6&(Im=Xe))&&jg()}}function Hj(){Om=Lm.current,E(Lm)}function Kk(u,Xe){u.finishedWork=null,u.finishedLanes=0;var Wt=u.timeoutHandle;if(-1!==Wt&&(u.timeoutHandle=-1,Lp(Wt)),null!==Rm)for(Wt=Rm.return;null!==Wt;){var fr=Wt;switch(wg(fr),fr.tag){case 1:null!=(fr=fr.type.childContextTypes)&&$f();break;case 3:zh(),E(Kp),E(Gp),Eh();break;case 5:Bh(fr);break;case 4:zh();break;case 13:case 19:E(Vf);break;case 10:ah(fr.type._context);break;case 22:case 23:Hj()}Wt=Wt.return}if(Mm=u,Rm=u=Pg(u.current,null),zm=Om=Xe,Dm=0,Fm=null,Nm=Bm=jm=0,Um=Vm=null,null!==Rf){for(Xe=0;Xe<Rf.length;Xe++)if(null!==(fr=(Wt=Rf[Xe]).interleaved)){Wt.interleaved=null;var _r=fr.next,wr=Wt.pending;if(null!==wr){var Ar=wr.next;wr.next=_r,fr.next=Ar}Wt.pending=fr}Rf=null}return u}function Mk(u,Xe){for(;;){var Wt=Rm;try{if($g(),Hf.current=om,tm){for(var fr=Jf.memoizedState;null!==fr;){var _r=fr.queue;null!==_r&&(_r.pending=null),fr=fr.next}tm=!1}if(Xf=0,em=Qf=Jf=null,rm=!1,nm=0,Cm.current=null,null===Wt||null===Wt.return){Dm=1,Fm=Xe,Rm=null;break}e:{var wr=u,Ar=Wt.return,Kr=Wt,In=Xe;if(Xe=zm,Kr.flags|=32768,null!==In&&"object"==typeof In&&"function"==typeof In.then){var no=In,io=Kr,oo=io.tag;if(!(1&io.mode||0!==oo&&11!==oo&&15!==oo)){var ao=io.alternate;ao?(io.updateQueue=ao.updateQueue,io.memoizedState=ao.memoizedState,io.lanes=ao.lanes):(io.updateQueue=null,io.memoizedState=null)}var so=Ui(Ar);if(null!==so){so.flags&=-257,Vi(so,Ar,Kr,0,Xe),1&so.mode&&Si(wr,no,Xe),In=no;var co=(Xe=so).updateQueue;if(null===co){var ho=new Set;ho.add(In),Xe.updateQueue=ho}else co.add(In);break e}if(!(1&Xe)){Si(wr,no,Xe),tj();break e}In=Error(p(426))}else if(yf&&1&Kr.mode){var go=Ui(Ar);if(null!==go){!(65536&go.flags)&&(go.flags|=256),Vi(go,Ar,Kr,0,Xe),Jg(Ji(In,Kr));break e}}wr=In=Ji(In,Kr),4!==Dm&&(Dm=2),null===Vm?Vm=[wr]:Vm.push(wr),wr=Ar;do{switch(wr.tag){case 3:wr.flags|=65536,Xe&=-Xe,wr.lanes|=Xe,ph(wr,Ni(0,In,Xe));break e;case 1:Kr=In;var xo=wr.type,ko=wr.stateNode;if(!(128&wr.flags||"function"!=typeof xo.getDerivedStateFromError&&(null===ko||"function"!=typeof ko.componentDidCatch||null!==Gm&&Gm.has(ko)))){wr.flags|=65536,Xe&=-Xe,wr.lanes|=Xe,ph(wr,Qi(wr,Kr,Xe));break e}}wr=wr.return}while(null!==wr)}Sk(Wt)}catch(u){Xe=u,Rm===Wt&&null!==Wt&&(Rm=Wt=Wt.return);continue}break}}function Jk(){var u=Em.current;return Em.current=om,null===u?om:u}function tj(){0!==Dm&&3!==Dm&&2!==Dm||(Dm=4),null===Mm||!(268435455&jm)&&!(268435455&Bm)||Ck(Mm,zm)}function Ik(u,Xe){var Wt=Im;Im|=2;var fr=Jk();for(Mm===u&&zm===Xe||(qm=null,Kk(u,Xe));;)try{Tk();break}catch(Xe){Mk(u,Xe)}if($g(),Im=Wt,Em.current=fr,null!==Rm)throw Error(p(261));return Mm=null,zm=0,Dm}function Tk(){for(;null!==Rm;)Uk(Rm)}function Lk(){for(;null!==Rm&&!eu();)Uk(Rm)}function Uk(u){var Xe=Am(u.alternate,u,Om);u.memoizedProps=u.pendingProps,null===Xe?Sk(u):Rm=Xe,Cm.current=null}function Sk(u){var Xe=u;do{var Wt=Xe.alternate;if(u=Xe.return,32768&Xe.flags){if(null!==(Wt=Ij(Wt,Xe)))return Wt.flags&=32767,void(Rm=Wt);if(null===u)return Dm=6,void(Rm=null);u.flags|=32768,u.subtreeFlags=0,u.deletions=null}else if(null!==(Wt=Ej(Wt,Xe,Om)))return void(Rm=Wt);if(null!==(Xe=Xe.sibling))return void(Rm=Xe);Rm=Xe=u}while(null!==Xe);0===Dm&&(Dm=5)}function Pk(u,Xe,Wt){var fr=qu,_r=Pm.transition;try{Pm.transition=null,qu=1,function Wk(u,Xe,Wt,fr){do{Hk()}while(null!==Xm);if(6&Im)throw Error(p(327));Wt=u.finishedWork;var _r=u.finishedLanes;if(null===Wt)return null;if(u.finishedWork=null,u.finishedLanes=0,Wt===u.current)throw Error(p(177));u.callbackNode=null,u.callbackPriority=0;var wr=Wt.lanes|Wt.childLanes;if(function Bc(u,Xe){var Wt=u.pendingLanes&~Xe;u.pendingLanes=Xe,u.suspendedLanes=0,u.pingedLanes=0,u.expiredLanes&=Xe,u.mutableReadLanes&=Xe,u.entangledLanes&=Xe,Xe=u.entanglements;var fr=u.eventTimes;for(u=u.expirationTimes;0<Wt;){var _r=31-Du(Wt),wr=1<<_r;Xe[_r]=0,fr[_r]=-1,u[_r]=-1,Wt&=~wr}}(u,wr),u===Mm&&(Rm=Mm=null,zm=0),!(2064&Wt.subtreeFlags)&&!(2064&Wt.flags)||Km||(Km=!0,Fk(uu,(function(){return Hk(),null}))),wr=!!(15990&Wt.flags),!!(15990&Wt.subtreeFlags)||wr){wr=Pm.transition,Pm.transition=null;var Ar=qu;qu=1;var Kr=Im;Im|=4,Cm.current=null,function Oj(u,Xe){if(Rp=Ad,Ne(u=Me())){if("selectionStart"in u)var Wt={start:u.selectionStart,end:u.selectionEnd};else e:{var fr=(Wt=(Wt=u.ownerDocument)&&Wt.defaultView||window).getSelection&&Wt.getSelection();if(fr&&0!==fr.rangeCount){Wt=fr.anchorNode;var _r=fr.anchorOffset,wr=fr.focusNode;fr=fr.focusOffset;try{Wt.nodeType,wr.nodeType}catch(u){Wt=null;break e}var Ar=0,Kr=-1,In=-1,no=0,io=0,oo=u,ao=null;t:for(;;){for(var so;oo!==Wt||0!==_r&&3!==oo.nodeType||(Kr=Ar+_r),oo!==wr||0!==fr&&3!==oo.nodeType||(In=Ar+fr),3===oo.nodeType&&(Ar+=oo.nodeValue.length),null!==(so=oo.firstChild);)ao=oo,oo=so;for(;;){if(oo===u)break t;if(ao===Wt&&++no===_r&&(Kr=Ar),ao===wr&&++io===fr&&(In=Ar),null!==(so=oo.nextSibling))break;ao=(oo=ao).parentNode}oo=so}Wt=-1===Kr||-1===In?null:{start:Kr,end:In}}else Wt=null}Wt=Wt||{start:0,end:0}}else Wt=null;for(zp={focusedElem:u,selectionRange:Wt},Ad=!1,xm=Xe;null!==xm;)if(u=(Xe=xm).child,1028&Xe.subtreeFlags&&null!==u)u.return=Xe,xm=u;else for(;null!==xm;){Xe=xm;try{var co=Xe.alternate;if(1024&Xe.flags)switch(Xe.tag){case 0:case 11:case 15:case 5:case 6:case 4:case 17:break;case 1:if(null!==co){var ho=co.memoizedProps,go=co.memoizedState,xo=Xe.stateNode,ko=xo.getSnapshotBeforeUpdate(Xe.elementType===Xe.type?ho:Ci(Xe.type,ho),go);xo.__reactInternalSnapshotBeforeUpdate=ko}break;case 3:var Co=Xe.stateNode.containerInfo;1===Co.nodeType?Co.textContent="":9===Co.nodeType&&Co.documentElement&&Co.removeChild(Co.documentElement);break;default:throw Error(p(163))}}catch(u){W(Xe,Xe.return,u)}if(null!==(u=Xe.sibling)){u.return=Xe.return,xm=u;break}xm=Xe.return}return co=wm,wm=!1,co}(u,Wt),dk(Wt,u),Oe(zp),Ad=!!Rp,zp=Rp=null,u.current=Wt,hk(Wt,u,_r),tu(),Im=Kr,qu=Ar,Pm.transition=wr}else u.current=Wt;if(Km&&(Km=!1,Xm=u,Ym=_r),wr=u.pendingLanes,0===wr&&(Gm=null),function mc(u){if(Lu&&"function"==typeof Lu.onCommitFiberRoot)try{Lu.onCommitFiberRoot(zu,u,void 0,!(128&~u.current.flags))}catch(u){}}(Wt.stateNode),Dk(u,nu()),null!==Xe)for(fr=u.onRecoverableError,Wt=0;Wt<Xe.length;Wt++)_r=Xe[Wt],fr(_r.value,{componentStack:_r.stack,digest:_r.digest});if(Zm)throw Zm=!1,u=Hm,Hm=null,u;return!!(1&Ym)&&0!==u.tag&&Hk(),wr=u.pendingLanes,1&wr?u===Qm?Jm++:(Jm=0,Qm=u):Jm=0,jg(),null}(u,Xe,Wt,fr)}finally{Pm.transition=_r,qu=fr}return null}function Hk(){if(null!==Xm){var u=Dc(Ym),Xe=Pm.transition,Wt=qu;try{if(Pm.transition=null,qu=16>u?16:u,null===Xm)var fr=!1;else{if(u=Xm,Xm=null,Ym=0,6&Im)throw Error(p(331));var _r=Im;for(Im|=4,xm=u.current;null!==xm;){var wr=xm,Ar=wr.child;if(16&xm.flags){var Kr=wr.deletions;if(null!==Kr){for(var In=0;In<Kr.length;In++){var no=Kr[In];for(xm=no;null!==xm;){var io=xm;switch(io.tag){case 0:case 11:case 15:Pj(8,io,wr)}var oo=io.child;if(null!==oo)oo.return=io,xm=oo;else for(;null!==xm;){var ao=(io=xm).sibling,so=io.return;if(Sj(io),io===no){xm=null;break}if(null!==ao){ao.return=so,xm=ao;break}xm=so}}}var co=wr.alternate;if(null!==co){var ho=co.child;if(null!==ho){co.child=null;do{var go=ho.sibling;ho.sibling=null,ho=go}while(null!==ho)}}xm=wr}}if(2064&wr.subtreeFlags&&null!==Ar)Ar.return=wr,xm=Ar;else e:for(;null!==xm;){if(2048&(wr=xm).flags)switch(wr.tag){case 0:case 11:case 15:Pj(9,wr,wr.return)}var xo=wr.sibling;if(null!==xo){xo.return=wr.return,xm=xo;break e}xm=wr.return}}var ko=u.current;for(xm=ko;null!==xm;){var Co=(Ar=xm).child;if(2064&Ar.subtreeFlags&&null!==Co)Co.return=Ar,xm=Co;else e:for(Ar=ko;null!==xm;){if(2048&(Kr=xm).flags)try{switch(Kr.tag){case 0:case 11:case 15:Qj(9,Kr)}}catch(u){W(Kr,Kr.return,u)}if(Kr===Ar){xm=null;break e}var Io=Kr.sibling;if(null!==Io){Io.return=Kr.return,xm=Io;break e}xm=Kr.return}}if(Im=_r,jg(),Lu&&"function"==typeof Lu.onPostCommitFiberRoot)try{Lu.onPostCommitFiberRoot(zu,u)}catch(u){}fr=!0}return fr}finally{qu=Wt,Pm.transition=Xe}}return!1}function Xk(u,Xe,Wt){u=nh(u,Xe=Ni(0,Xe=Ji(Wt,Xe),1),1),Xe=R(),null!==u&&(Ac(u,1,Xe),Dk(u,Xe))}function W(u,Xe,Wt){if(3===u.tag)Xk(u,u,Wt);else for(;null!==Xe;){if(3===Xe.tag){Xk(Xe,u,Wt);break}if(1===Xe.tag){var fr=Xe.stateNode;if("function"==typeof Xe.type.getDerivedStateFromError||"function"==typeof fr.componentDidCatch&&(null===Gm||!Gm.has(fr))){Xe=nh(Xe,u=Qi(Xe,u=Ji(Wt,u),1),1),u=R(),null!==Xe&&(Ac(Xe,1,u),Dk(Xe,u));break}}Xe=Xe.return}}function Ti(u,Xe,Wt){var fr=u.pingCache;null!==fr&&fr.delete(Xe),Xe=R(),u.pingedLanes|=u.suspendedLanes&Wt,Mm===u&&(zm&Wt)===Wt&&(4===Dm||3===Dm&&(130023424&zm)===zm&&500>nu()-$m?Kk(u,0):Nm|=Wt),Dk(u,Xe)}function Yk(u,Xe){0===Xe&&(1&u.mode?(Xe=Uu,!(130023424&(Uu<<=1))&&(Uu=4194304)):Xe=1);var Wt=R();null!==(u=ih(u,Xe))&&(Ac(u,Xe,Wt),Dk(u,Wt))}function uj(u){var Xe=u.memoizedState,Wt=0;null!==Xe&&(Wt=Xe.retryLane),Yk(u,Wt)}function bk(u,Xe){var Wt=0;switch(u.tag){case 13:var fr=u.stateNode,_r=u.memoizedState;null!==_r&&(Wt=_r.retryLane);break;case 19:fr=u.stateNode;break;default:throw Error(p(314))}null!==fr&&fr.delete(Xe),Yk(u,Wt)}function Fk(u,Xe){return gc(u,Xe)}function $k(u,Xe,Wt,fr){this.tag=u,this.key=Wt,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=Xe,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=fr,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Bg(u,Xe,Wt,fr){return new $k(u,Xe,Wt,fr)}function aj(u){return!(!(u=u.prototype)||!u.isReactComponent)}function Pg(u,Xe){var Wt=u.alternate;return null===Wt?((Wt=Bg(u.tag,Xe,u.key,u.mode)).elementType=u.elementType,Wt.type=u.type,Wt.stateNode=u.stateNode,Wt.alternate=u,u.alternate=Wt):(Wt.pendingProps=Xe,Wt.type=u.type,Wt.flags=0,Wt.subtreeFlags=0,Wt.deletions=null),Wt.flags=14680064&u.flags,Wt.childLanes=u.childLanes,Wt.lanes=u.lanes,Wt.child=u.child,Wt.memoizedProps=u.memoizedProps,Wt.memoizedState=u.memoizedState,Wt.updateQueue=u.updateQueue,Xe=u.dependencies,Wt.dependencies=null===Xe?null:{lanes:Xe.lanes,firstContext:Xe.firstContext},Wt.sibling=u.sibling,Wt.index=u.index,Wt.ref=u.ref,Wt}function Rg(u,Xe,Wt,fr,_r,wr){var Ar=2;if(fr=u,"function"==typeof u)aj(u)&&(Ar=1);else if("string"==typeof u)Ar=5;else e:switch(u){case xo:return Tg(Wt.children,_r,wr,Xe);case ko:Ar=8,_r|=8;break;case Co:return(u=Bg(12,Wt,Xe,2|_r)).elementType=Co,u.lanes=wr,u;case ca:return(u=Bg(13,Wt,Xe,_r)).elementType=ca,u.lanes=wr,u;case ua:return(u=Bg(19,Wt,Xe,_r)).elementType=ua,u.lanes=wr,u;case yl:return pj(Wt,_r,wr,Xe);default:if("object"==typeof u&&null!==u)switch(u.$$typeof){case Io:Ar=10;break e;case zo:Ar=9;break e;case Bo:Ar=11;break e;case Da:Ar=14;break e;case ns:Ar=16,fr=null;break e}throw Error(p(130,null==u?u:typeof u,""))}return(Xe=Bg(Ar,Wt,Xe,_r)).elementType=u,Xe.type=fr,Xe.lanes=wr,Xe}function Tg(u,Xe,Wt,fr){return(u=Bg(7,u,fr,Xe)).lanes=Wt,u}function pj(u,Xe,Wt,fr){return(u=Bg(22,u,fr,Xe)).elementType=yl,u.lanes=Wt,u.stateNode={isHidden:!1},u}function Qg(u,Xe,Wt){return(u=Bg(6,u,null,Xe)).lanes=Wt,u}function Sg(u,Xe,Wt){return(Xe=Bg(4,null!==u.children?u.children:[],u.key,Xe)).lanes=Wt,Xe.stateNode={containerInfo:u.containerInfo,pendingChildren:null,implementation:u.implementation},Xe}function al(u,Xe,Wt,fr,_r){this.tag=Xe,this.containerInfo=u,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=zc(0),this.expirationTimes=zc(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=zc(0),this.identifierPrefix=fr,this.onRecoverableError=_r,this.mutableSourceEagerHydrationData=null}function bl(u,Xe,Wt,fr,_r,wr,Ar,Kr,In){return u=new al(u,Xe,Wt,Kr,In),1===Xe?(Xe=1,!0===wr&&(Xe|=8)):Xe=0,wr=Bg(3,null,null,Xe),u.current=wr,wr.stateNode=u,wr.memoizedState={element:fr,isDehydrated:Wt,cache:null,transitions:null,pendingSuspenseBoundaries:null},kh(wr),u}function dl(u){if(!u)return Hp;e:{if(Vb(u=u._reactInternals)!==u||1!==u.tag)throw Error(p(170));var Xe=u;do{switch(Xe.tag){case 3:Xe=Xe.stateNode.context;break e;case 1:if(Zf(Xe.type)){Xe=Xe.stateNode.__reactInternalMemoizedMergedChildContext;break e}}Xe=Xe.return}while(null!==Xe);throw Error(p(171))}if(1===u.tag){var Wt=u.type;if(Zf(Wt))return bg(u,Wt,Xe)}return Xe}function el(u,Xe,Wt,fr,_r,wr,Ar,Kr,In){return(u=bl(Wt,fr,!0,u,0,wr,0,Kr,In)).context=dl(null),Wt=u.current,(wr=mh(fr=R(),_r=yi(Wt))).callback=null!=Xe?Xe:null,nh(Wt,wr,_r),u.current.lanes=_r,Ac(u,_r,fr),Dk(u,fr),u}function fl(u,Xe,Wt,fr){var _r=Xe.current,wr=R(),Ar=yi(_r);return Wt=dl(Wt),null===Xe.context?Xe.context=Wt:Xe.pendingContext=Wt,(Xe=mh(wr,Ar)).payload={element:u},null!==(fr=void 0===fr?null:fr)&&(Xe.callback=fr),null!==(u=nh(_r,Xe,Ar))&&(gi(u,_r,Ar,wr),oh(u,_r,Ar)),Ar}function gl(u){return(u=u.current).child?(u.child.tag,u.child.stateNode):null}function hl(u,Xe){if(null!==(u=u.memoizedState)&&null!==u.dehydrated){var Wt=u.retryLane;u.retryLane=0!==Wt&&Wt<Xe?Wt:Xe}}function il(u,Xe){hl(u,Xe),(u=u.alternate)&&hl(u,Xe)}Am=function(u,Xe,Wt){if(null!==u)if(u.memoizedProps!==Xe.pendingProps||Kp.current)hm=!0;else{if(!(u.lanes&Wt||128&Xe.flags))return hm=!1,function yj(u,Xe,Wt){switch(Xe.tag){case 3:kj(Xe),Ig();break;case 5:Ah(Xe);break;case 1:Zf(Xe.type)&&cg(Xe);break;case 4:yh(Xe,Xe.stateNode.containerInfo);break;case 10:var fr=Xe.type._context,_r=Xe.memoizedProps.value;G(kf,fr._currentValue),fr._currentValue=_r;break;case 13:if(null!==(fr=Xe.memoizedState))return null!==fr.dehydrated?(G(Vf,1&Vf.current),Xe.flags|=128,null):Wt&Xe.child.childLanes?oj(u,Xe,Wt):(G(Vf,1&Vf.current),null!==(u=Zi(u,Xe,Wt))?u.sibling:null);G(Vf,1&Vf.current);break;case 19:if(fr=!!(Wt&Xe.childLanes),128&u.flags){if(fr)return xj(u,Xe,Wt);Xe.flags|=128}if(null!==(_r=Xe.memoizedState)&&(_r.rendering=null,_r.tail=null,_r.lastEffect=null),G(Vf,Vf.current),fr)break;return null;case 22:case 23:return Xe.lanes=0,dj(u,Xe,Wt)}return Zi(u,Xe,Wt)}(u,Xe,Wt);hm=!!(131072&u.flags)}else hm=!1,yf&&1048576&Xe.flags&&ug(Xe,af,Xe.index);switch(Xe.lanes=0,Xe.tag){case 2:var fr=Xe.type;ij(u,Xe),u=Xe.pendingProps;var _r=Yf(Xe,Gp.current);ch(Xe,Wt),_r=Nh(null,Xe,fr,u,_r,Wt);var wr=Sh();return Xe.flags|=1,"object"==typeof _r&&null!==_r&&"function"==typeof _r.render&&void 0===_r.$$typeof?(Xe.tag=1,Xe.memoizedState=null,Xe.updateQueue=null,Zf(fr)?(wr=!0,cg(Xe)):wr=!1,Xe.memoizedState=null!==_r.state&&void 0!==_r.state?_r.state:null,kh(Xe),_r.updater=cm,Xe.stateNode=_r,_r._reactInternals=Xe,Ii(Xe,fr,u,Wt),Xe=jj(null,Xe,fr,!0,wr,Wt)):(Xe.tag=0,yf&&wr&&vg(Xe),Xi(null,Xe,_r,Wt),Xe=Xe.child),Xe;case 16:fr=Xe.elementType;e:{switch(ij(u,Xe),u=Xe.pendingProps,fr=(_r=fr._init)(fr._payload),Xe.type=fr,_r=Xe.tag=function Zk(u){if("function"==typeof u)return aj(u)?1:0;if(null!=u){if((u=u.$$typeof)===Bo)return 11;if(u===Da)return 14}return 2}(fr),u=Ci(fr,u),_r){case 0:Xe=cj(null,Xe,fr,u,Wt);break e;case 1:Xe=hj(null,Xe,fr,u,Wt);break e;case 11:Xe=Yi(null,Xe,fr,u,Wt);break e;case 14:Xe=$i(null,Xe,fr,Ci(fr.type,u),Wt);break e}throw Error(p(306,fr,""))}return Xe;case 0:return fr=Xe.type,_r=Xe.pendingProps,cj(u,Xe,fr,_r=Xe.elementType===fr?_r:Ci(fr,_r),Wt);case 1:return fr=Xe.type,_r=Xe.pendingProps,hj(u,Xe,fr,_r=Xe.elementType===fr?_r:Ci(fr,_r),Wt);case 3:e:{if(kj(Xe),null===u)throw Error(p(387));fr=Xe.pendingProps,_r=(wr=Xe.memoizedState).element,lh(u,Xe),qh(Xe,fr,null,Wt);var Ar=Xe.memoizedState;if(fr=Ar.element,wr.isDehydrated){if(wr={element:fr,isDehydrated:!1,cache:Ar.cache,pendingSuspenseBoundaries:Ar.pendingSuspenseBoundaries,transitions:Ar.transitions},Xe.updateQueue.baseState=wr,Xe.memoizedState=wr,256&Xe.flags){Xe=lj(u,Xe,fr,Wt,_r=Ji(Error(p(423)),Xe));break e}if(fr!==_r){Xe=lj(u,Xe,fr,Wt,_r=Ji(Error(p(424)),Xe));break e}for(gf=Lf(Xe.stateNode.containerInfo.firstChild),mf=Xe,yf=!0,_f=null,Wt=Sf(Xe,null,fr,Wt),Xe.child=Wt;Wt;)Wt.flags=-3&Wt.flags|4096,Wt=Wt.sibling}else{if(Ig(),fr===_r){Xe=Zi(u,Xe,Wt);break e}Xi(u,Xe,fr,Wt)}Xe=Xe.child}return Xe;case 5:return Ah(Xe),null===u&&Eg(Xe),fr=Xe.type,_r=Xe.pendingProps,wr=null!==u?u.memoizedProps:null,Ar=_r.children,Ef(fr,_r)?Ar=null:null!==wr&&Ef(fr,wr)&&(Xe.flags|=32),gj(u,Xe),Xi(u,Xe,Ar,Wt),Xe.child;case 6:return null===u&&Eg(Xe),null;case 13:return oj(u,Xe,Wt);case 4:return yh(Xe,Xe.stateNode.containerInfo),fr=Xe.pendingProps,null===u?Xe.child=xf(Xe,null,fr,Wt):Xi(u,Xe,fr,Wt),Xe.child;case 11:return fr=Xe.type,_r=Xe.pendingProps,Yi(u,Xe,fr,_r=Xe.elementType===fr?_r:Ci(fr,_r),Wt);case 7:return Xi(u,Xe,Xe.pendingProps,Wt),Xe.child;case 8:case 12:return Xi(u,Xe,Xe.pendingProps.children,Wt),Xe.child;case 10:e:{if(fr=Xe.type._context,_r=Xe.pendingProps,wr=Xe.memoizedProps,Ar=_r.value,G(kf,fr._currentValue),fr._currentValue=Ar,null!==wr)if(cp(wr.value,Ar)){if(wr.children===_r.children&&!Kp.current){Xe=Zi(u,Xe,Wt);break e}}else for(null!==(wr=Xe.child)&&(wr.return=Xe);null!==wr;){var Kr=wr.dependencies;if(null!==Kr){Ar=wr.child;for(var In=Kr.firstContext;null!==In;){if(In.context===fr){if(1===wr.tag){(In=mh(-1,Wt&-Wt)).tag=2;var no=wr.updateQueue;if(null!==no){var io=(no=no.shared).pending;null===io?In.next=In:(In.next=io.next,io.next=In),no.pending=In}}wr.lanes|=Wt,null!==(In=wr.alternate)&&(In.lanes|=Wt),bh(wr.return,Wt,Xe),Kr.lanes|=Wt;break}In=In.next}}else if(10===wr.tag)Ar=wr.type===Xe.type?null:wr.child;else if(18===wr.tag){if(null===(Ar=wr.return))throw Error(p(341));Ar.lanes|=Wt,null!==(Kr=Ar.alternate)&&(Kr.lanes|=Wt),bh(Ar,Wt,Xe),Ar=wr.sibling}else Ar=wr.child;if(null!==Ar)Ar.return=wr;else for(Ar=wr;null!==Ar;){if(Ar===Xe){Ar=null;break}if(null!==(wr=Ar.sibling)){wr.return=Ar.return,Ar=wr;break}Ar=Ar.return}wr=Ar}Xi(u,Xe,_r.children,Wt),Xe=Xe.child}return Xe;case 9:return _r=Xe.type,fr=Xe.pendingProps.children,ch(Xe,Wt),fr=fr(_r=eh(_r)),Xe.flags|=1,Xi(u,Xe,fr,Wt),Xe.child;case 14:return _r=Ci(fr=Xe.type,Xe.pendingProps),$i(u,Xe,fr,_r=Ci(fr.type,_r),Wt);case 15:return bj(u,Xe,Xe.type,Xe.pendingProps,Wt);case 17:return fr=Xe.type,_r=Xe.pendingProps,_r=Xe.elementType===fr?_r:Ci(fr,_r),ij(u,Xe),Xe.tag=1,Zf(fr)?(u=!0,cg(Xe)):u=!1,ch(Xe,Wt),Gi(Xe,fr,_r),Ii(Xe,fr,_r,Wt),jj(null,Xe,fr,!0,u,Wt);case 19:return xj(u,Xe,Wt);case 22:return dj(u,Xe,Wt)}throw Error(p(156,Xe.tag))};var ng="function"==typeof reportError?reportError:function(u){console.error(u)};function ll(u){this._internalRoot=u}function ml(u){this._internalRoot=u}function nl(u){return!(!u||1!==u.nodeType&&9!==u.nodeType&&11!==u.nodeType)}function ol(u){return!(!u||1!==u.nodeType&&9!==u.nodeType&&11!==u.nodeType&&(8!==u.nodeType||" react-mount-point-unstable "!==u.nodeValue))}function pl(){}function rl(u,Xe,Wt,fr,_r){var wr=Wt._reactRootContainer;if(wr){var Ar=wr;if("function"==typeof _r){var Kr=_r;_r=function(){var u=gl(Ar);Kr.call(u)}}fl(Xe,Ar,u,_r)}else Ar=function ql(u,Xe,Wt,fr,_r){if(_r){if("function"==typeof fr){var wr=fr;fr=function(){var u=gl(Ar);wr.call(u)}}var Ar=el(Xe,fr,u,0,null,!1,0,"",pl);return u._reactRootContainer=Ar,u[Vp]=Ar.current,sf(8===u.nodeType?u.parentNode:u),Rk(),Ar}for(;_r=u.lastChild;)u.removeChild(_r);if("function"==typeof fr){var Kr=fr;fr=function(){var u=gl(In);Kr.call(u)}}var In=bl(u,0,!1,null,0,!1,0,"",pl);return u._reactRootContainer=In,u[Vp]=In.current,sf(8===u.nodeType?u.parentNode:u),Rk((function(){fl(Xe,In,Wt,fr)})),In}(Wt,Xe,u,_r,fr);return gl(Ar)}ml.prototype.render=ll.prototype.render=function(u){var Xe=this._internalRoot;if(null===Xe)throw Error(p(409));fl(u,Xe,null,null)},ml.prototype.unmount=ll.prototype.unmount=function(){var u=this._internalRoot;if(null!==u){this._internalRoot=null;var Xe=u.containerInfo;Rk((function(){fl(null,u,null,null)})),Xe[Vp]=null}},ml.prototype.unstable_scheduleHydration=function(u){if(u){var Xe=ld();u={blockedOn:null,target:u,priority:Xe};for(var Wt=0;Wt<wd.length&&0!==Xe&&Xe<wd[Wt].priority;Wt++);wd.splice(Wt,0,u),0===Wt&&Vc(u)}},td=function(u){switch(u.tag){case 3:var Xe=u.stateNode;if(Xe.current.memoizedState.isDehydrated){var Wt=tc(Xe.pendingLanes);0!==Wt&&(Cc(Xe,1|Wt),Dk(Xe,nu()),!(6&Im)&&(Wm=nu()+500,jg()))}break;case 13:Rk((function(){var Xe=ih(u,1);if(null!==Xe){var Wt=R();gi(Xe,u,1,Wt)}})),il(u,1)}},id=function(u){if(13===u.tag){var Xe=ih(u,134217728);if(null!==Xe)gi(Xe,u,134217728,R());il(u,134217728)}},sd=function(u){if(13===u.tag){var Xe=yi(u),Wt=ih(u,Xe);if(null!==Wt)gi(Wt,u,Xe,R());il(u,Xe)}},ld=function(){return qu},cd=function(u,Xe){var Wt=qu;try{return qu=u,Xe()}finally{qu=Wt}},$l=function(u,Xe,Wt){switch(Xe){case"input":if(bb(u,Wt),Xe=Wt.name,"radio"===Wt.type&&null!=Xe){for(Wt=u;Wt.parentNode;)Wt=Wt.parentNode;for(Wt=Wt.querySelectorAll("input[name="+JSON.stringify(""+Xe)+'][type="radio"]'),Xe=0;Xe<Wt.length;Xe++){var fr=Wt[Xe];if(fr!==u&&fr.form===u.form){var _r=Db(fr);if(!_r)throw Error(p(90));Wa(fr),bb(fr,_r)}}}break;case"textarea":ib(u,Wt);break;case"select":null!=(Xe=Wt.value)&&fb(u,!!Wt.multiple,Xe,!1)}},Gb=Qk,Hb=Rk;var og={usingClientEntryPoint:!1,Events:[Cb,ue,Db,Eb,Fb,Qk]},sg={findFiberByHostInstance:Wc,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},lg={bundleType:sg.bundleType,version:sg.version,rendererPackageName:sg.rendererPackageName,rendererConfig:sg.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:co.ReactCurrentDispatcher,findHostInstanceByFiber:function(u){return null===(u=Zb(u))?null:u.stateNode},findFiberByHostInstance:sg.findFiberByHostInstance||function jl(){return null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var pg=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!pg.isDisabled&&pg.supportsFiber)try{zu=pg.inject(lg),Lu=pg}catch(Ll){}}Xe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=og,Xe.createPortal=function(u,Xe){var Wt=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!nl(Xe))throw Error(p(200));return function cl(u,Xe,Wt){var fr=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:go,key:null==fr?null:""+fr,children:u,containerInfo:Xe,implementation:Wt}}(u,Xe,null,Wt)},Xe.createRoot=function(u,Xe){if(!nl(u))throw Error(p(299));var Wt=!1,fr="",_r=ng;return null!=Xe&&(!0===Xe.unstable_strictMode&&(Wt=!0),void 0!==Xe.identifierPrefix&&(fr=Xe.identifierPrefix),void 0!==Xe.onRecoverableError&&(_r=Xe.onRecoverableError)),Xe=bl(u,1,!1,null,0,Wt,0,fr,_r),u[Vp]=Xe.current,sf(8===u.nodeType?u.parentNode:u),new ll(Xe)},Xe.findDOMNode=function(u){if(null==u)return null;if(1===u.nodeType)return u;var Xe=u._reactInternals;if(void 0===Xe){if("function"==typeof u.render)throw Error(p(188));throw u=Object.keys(u).join(","),Error(p(268,u))}return u=null===(u=Zb(Xe))?null:u.stateNode},Xe.flushSync=function(u){return Rk(u)},Xe.hydrate=function(u,Xe,Wt){if(!ol(Xe))throw Error(p(200));return rl(null,u,Xe,!0,Wt)},Xe.hydrateRoot=function(u,Xe,Wt){if(!nl(u))throw Error(p(405));var fr=null!=Wt&&Wt.hydratedSources||null,_r=!1,wr="",Ar=ng;if(null!=Wt&&(!0===Wt.unstable_strictMode&&(_r=!0),void 0!==Wt.identifierPrefix&&(wr=Wt.identifierPrefix),void 0!==Wt.onRecoverableError&&(Ar=Wt.onRecoverableError)),Xe=el(Xe,null,u,1,null!=Wt?Wt:null,_r,0,wr,Ar),u[Vp]=Xe.current,sf(u),fr)for(u=0;u<fr.length;u++)_r=(_r=(Wt=fr[u])._getVersion)(Wt._source),null==Xe.mutableSourceEagerHydrationData?Xe.mutableSourceEagerHydrationData=[Wt,_r]:Xe.mutableSourceEagerHydrationData.push(Wt,_r);return new ml(Xe)},Xe.render=function(u,Xe,Wt){if(!ol(Xe))throw Error(p(200));return rl(null,u,Xe,!1,Wt)},Xe.unmountComponentAtNode=function(u){if(!ol(u))throw Error(p(40));return!!u._reactRootContainer&&(Rk((function(){rl(null,null,u,!1,(function(){u._reactRootContainer=null,u[Vp]=null}))})),!0)},Xe.unstable_batchedUpdates=Qk,Xe.unstable_renderSubtreeIntoContainer=function(u,Xe,Wt,fr){if(!ol(Wt))throw Error(p(200));if(null==u||void 0===u._reactInternals)throw Error(p(38));return rl(u,Xe,Wt,!1,fr)},Xe.version="18.3.1-next-f1338f8080-20240426"},5338:function(u,Xe,Wt){"use strict";var fr=Wt(961);Xe.H=fr.createRoot,fr.hydrateRoot},961:function(u,Xe,Wt){"use strict";!function checkDCE(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(checkDCE)}catch(u){console.error(u)}}(),u.exports=Wt(2551)},6027:function(u,Xe,Wt){"use strict";Object.defineProperty(Xe,"__esModule",{value:!0}),Object.defineProperty(Xe,"DraggableCore",{enumerable:!0,get:function(){return io.default}}),Xe.default=void 0;var fr=function _interopRequireWildcard(u,Xe){if(!Xe&&u&&u.__esModule)return u;if(null===u||"object"!=typeof u&&"function"!=typeof u)return{default:u};var Wt=_getRequireWildcardCache(Xe);if(Wt&&Wt.has(u))return Wt.get(u);var fr={},_r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var wr in u)if("default"!==wr&&Object.prototype.hasOwnProperty.call(u,wr)){var Ar=_r?Object.getOwnPropertyDescriptor(u,wr):null;Ar&&(Ar.get||Ar.set)?Object.defineProperty(fr,wr,Ar):fr[wr]=u[wr]}fr.default=u,Wt&&Wt.set(u,fr);return fr}(Wt(6540)),_r=_interopRequireDefault(Wt(5556)),wr=_interopRequireDefault(Wt(961)),Ar=_interopRequireDefault(Wt(1508)),Kr=Wt(1089),In=Wt(1726),no=Wt(7056),io=_interopRequireDefault(Wt(6888)),oo=_interopRequireDefault(Wt(8696));function _interopRequireDefault(u){return u&&u.__esModule?u:{default:u}}function _getRequireWildcardCache(u){if("function"!=typeof WeakMap)return null;var Xe=new WeakMap,Wt=new WeakMap;return(_getRequireWildcardCache=function(u){return u?Wt:Xe})(u)}function _extends(){return _extends=Object.assign?Object.assign.bind():function(u){for(var Xe=1;Xe<arguments.length;Xe++){var Wt=arguments[Xe];for(var fr in Wt)Object.prototype.hasOwnProperty.call(Wt,fr)&&(u[fr]=Wt[fr])}return u},_extends.apply(this,arguments)}function _defineProperty(u,Xe,Wt){return(Xe=function _toPropertyKey(u){var Xe=function _toPrimitive(u,Xe){if("object"!=typeof u||null===u)return u;var Wt=u[Symbol.toPrimitive];if(void 0!==Wt){var fr=Wt.call(u,Xe||"default");if("object"!=typeof fr)return fr;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===Xe?String:Number)(u)}(u,"string");return"symbol"==typeof Xe?Xe:String(Xe)}(Xe))in u?Object.defineProperty(u,Xe,{value:Wt,enumerable:!0,configurable:!0,writable:!0}):u[Xe]=Wt,u}class Draggable extends fr.Component{static getDerivedStateFromProps(u,Xe){let{position:Wt}=u,{prevPropsPosition:fr}=Xe;return!Wt||fr&&Wt.x===fr.x&&Wt.y===fr.y?null:((0,oo.default)("Draggable: getDerivedStateFromProps %j",{position:Wt,prevPropsPosition:fr}),{x:Wt.x,y:Wt.y,prevPropsPosition:{...Wt}})}constructor(u){super(u),_defineProperty(this,"onDragStart",((u,Xe)=>{(0,oo.default)("Draggable: onDragStart: %j",Xe);if(!1===this.props.onStart(u,(0,In.createDraggableData)(this,Xe)))return!1;this.setState({dragging:!0,dragged:!0})})),_defineProperty(this,"onDrag",((u,Xe)=>{if(!this.state.dragging)return!1;(0,oo.default)("Draggable: onDrag: %j",Xe);const Wt=(0,In.createDraggableData)(this,Xe),fr={x:Wt.x,y:Wt.y,slackX:0,slackY:0};if(this.props.bounds){const{x:u,y:Xe}=fr;fr.x+=this.state.slackX,fr.y+=this.state.slackY;const[_r,wr]=(0,In.getBoundPosition)(this,fr.x,fr.y);fr.x=_r,fr.y=wr,fr.slackX=this.state.slackX+(u-fr.x),fr.slackY=this.state.slackY+(Xe-fr.y),Wt.x=fr.x,Wt.y=fr.y,Wt.deltaX=fr.x-this.state.x,Wt.deltaY=fr.y-this.state.y}if(!1===this.props.onDrag(u,Wt))return!1;this.setState(fr)})),_defineProperty(this,"onDragStop",((u,Xe)=>{if(!this.state.dragging)return!1;if(!1===this.props.onStop(u,(0,In.createDraggableData)(this,Xe)))return!1;(0,oo.default)("Draggable: onDragStop: %j",Xe);const Wt={dragging:!1,slackX:0,slackY:0};if(Boolean(this.props.position)){const{x:u,y:Xe}=this.props.position;Wt.x=u,Wt.y=Xe}this.setState(Wt)})),this.state={dragging:!1,dragged:!1,x:u.position?u.position.x:u.defaultPosition.x,y:u.position?u.position.y:u.defaultPosition.y,prevPropsPosition:{...u.position},slackX:0,slackY:0,isElementSVG:!1},!u.position||u.onDrag||u.onStop||console.warn("A `position` was applied to this <Draggable>, without drag handlers. This will make this component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the `position` of this element.")}componentDidMount(){void 0!==window.SVGElement&&this.findDOMNode()instanceof window.SVGElement&&this.setState({isElementSVG:!0})}componentWillUnmount(){this.setState({dragging:!1})}findDOMNode(){var u,Xe;return null!==(u=null===(Xe=this.props)||void 0===Xe||null===(Xe=Xe.nodeRef)||void 0===Xe?void 0:Xe.current)&&void 0!==u?u:wr.default.findDOMNode(this)}render(){const{axis:u,bounds:Xe,children:Wt,defaultPosition:_r,defaultClassName:wr,defaultClassNameDragging:no,defaultClassNameDragged:oo,position:ao,positionOffset:so,scale:co,...ho}=this.props;let go={},xo=null;const ko=!Boolean(ao)||this.state.dragging,Co=ao||_r,Io={x:(0,In.canDragX)(this)&&ko?this.state.x:Co.x,y:(0,In.canDragY)(this)&&ko?this.state.y:Co.y};this.state.isElementSVG?xo=(0,Kr.createSVGTransform)(Io,so):go=(0,Kr.createCSSTransform)(Io,so);const zo=(0,Ar.default)(Wt.props.className||"",wr,{[no]:this.state.dragging,[oo]:this.state.dragged});return fr.createElement(io.default,_extends({},ho,{onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop}),fr.cloneElement(fr.Children.only(Wt),{className:zo,style:{...Wt.props.style,...go},transform:xo}))}}Xe.default=Draggable,_defineProperty(Draggable,"displayName","Draggable"),_defineProperty(Draggable,"propTypes",{...io.default.propTypes,axis:_r.default.oneOf(["both","x","y","none"]),bounds:_r.default.oneOfType([_r.default.shape({left:_r.default.number,right:_r.default.number,top:_r.default.number,bottom:_r.default.number}),_r.default.string,_r.default.oneOf([!1])]),defaultClassName:_r.default.string,defaultClassNameDragging:_r.default.string,defaultClassNameDragged:_r.default.string,defaultPosition:_r.default.shape({x:_r.default.number,y:_r.default.number}),positionOffset:_r.default.shape({x:_r.default.oneOfType([_r.default.number,_r.default.string]),y:_r.default.oneOfType([_r.default.number,_r.default.string])}),position:_r.default.shape({x:_r.default.number,y:_r.default.number}),className:no.dontSetMe,style:no.dontSetMe,transform:no.dontSetMe}),_defineProperty(Draggable,"defaultProps",{...io.default.defaultProps,axis:"both",bounds:!1,defaultClassName:"react-draggable",defaultClassNameDragging:"react-draggable-dragging",defaultClassNameDragged:"react-draggable-dragged",defaultPosition:{x:0,y:0},scale:1})},6888:function(u,Xe,Wt){"use strict";Object.defineProperty(Xe,"__esModule",{value:!0}),Xe.default=void 0;var fr=function _interopRequireWildcard(u,Xe){if(!Xe&&u&&u.__esModule)return u;if(null===u||"object"!=typeof u&&"function"!=typeof u)return{default:u};var Wt=_getRequireWildcardCache(Xe);if(Wt&&Wt.has(u))return Wt.get(u);var fr={},_r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var wr in u)if("default"!==wr&&Object.prototype.hasOwnProperty.call(u,wr)){var Ar=_r?Object.getOwnPropertyDescriptor(u,wr):null;Ar&&(Ar.get||Ar.set)?Object.defineProperty(fr,wr,Ar):fr[wr]=u[wr]}fr.default=u,Wt&&Wt.set(u,fr);return fr}(Wt(6540)),_r=_interopRequireDefault(Wt(5556)),wr=_interopRequireDefault(Wt(961)),Ar=Wt(1089),Kr=Wt(1726),In=Wt(7056),no=_interopRequireDefault(Wt(8696));function _interopRequireDefault(u){return u&&u.__esModule?u:{default:u}}function _getRequireWildcardCache(u){if("function"!=typeof WeakMap)return null;var Xe=new WeakMap,Wt=new WeakMap;return(_getRequireWildcardCache=function(u){return u?Wt:Xe})(u)}function _defineProperty(u,Xe,Wt){return(Xe=function _toPropertyKey(u){var Xe=function _toPrimitive(u,Xe){if("object"!=typeof u||null===u)return u;var Wt=u[Symbol.toPrimitive];if(void 0!==Wt){var fr=Wt.call(u,Xe||"default");if("object"!=typeof fr)return fr;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===Xe?String:Number)(u)}(u,"string");return"symbol"==typeof Xe?Xe:String(Xe)}(Xe))in u?Object.defineProperty(u,Xe,{value:Wt,enumerable:!0,configurable:!0,writable:!0}):u[Xe]=Wt,u}const io={start:"touchstart",move:"touchmove",stop:"touchend"},oo={start:"mousedown",move:"mousemove",stop:"mouseup"};let ao=oo;class DraggableCore extends fr.Component{constructor(){super(...arguments),_defineProperty(this,"dragging",!1),_defineProperty(this,"lastX",NaN),_defineProperty(this,"lastY",NaN),_defineProperty(this,"touchIdentifier",null),_defineProperty(this,"mounted",!1),_defineProperty(this,"handleDragStart",(u=>{if(this.props.onMouseDown(u),!this.props.allowAnyClick&&"number"==typeof u.button&&0!==u.button)return!1;const Xe=this.findDOMNode();if(!Xe||!Xe.ownerDocument||!Xe.ownerDocument.body)throw new Error("<DraggableCore> not mounted on DragStart!");const{ownerDocument:Wt}=Xe;if(this.props.disabled||!(u.target instanceof Wt.defaultView.Node)||this.props.handle&&!(0,Ar.matchesSelectorAndParentsTo)(u.target,this.props.handle,Xe)||this.props.cancel&&(0,Ar.matchesSelectorAndParentsTo)(u.target,this.props.cancel,Xe))return;"touchstart"===u.type&&u.preventDefault();const fr=(0,Ar.getTouchIdentifier)(u);this.touchIdentifier=fr;const _r=(0,Kr.getControlPosition)(u,fr,this);if(null==_r)return;const{x:wr,y:In}=_r,io=(0,Kr.createCoreData)(this,wr,In);(0,no.default)("DraggableCore: handleDragStart: %j",io),(0,no.default)("calling",this.props.onStart);!1!==this.props.onStart(u,io)&&!1!==this.mounted&&(this.props.enableUserSelectHack&&(0,Ar.addUserSelectStyles)(Wt),this.dragging=!0,this.lastX=wr,this.lastY=In,(0,Ar.addEvent)(Wt,ao.move,this.handleDrag),(0,Ar.addEvent)(Wt,ao.stop,this.handleDragStop))})),_defineProperty(this,"handleDrag",(u=>{const Xe=(0,Kr.getControlPosition)(u,this.touchIdentifier,this);if(null==Xe)return;let{x:Wt,y:fr}=Xe;if(Array.isArray(this.props.grid)){let u=Wt-this.lastX,Xe=fr-this.lastY;if([u,Xe]=(0,Kr.snapToGrid)(this.props.grid,u,Xe),!u&&!Xe)return;Wt=this.lastX+u,fr=this.lastY+Xe}const _r=(0,Kr.createCoreData)(this,Wt,fr);(0,no.default)("DraggableCore: handleDrag: %j",_r);if(!1!==this.props.onDrag(u,_r)&&!1!==this.mounted)this.lastX=Wt,this.lastY=fr;else try{this.handleDragStop(new MouseEvent("mouseup"))}catch(u){const Xe=document.createEvent("MouseEvents");Xe.initMouseEvent("mouseup",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),this.handleDragStop(Xe)}})),_defineProperty(this,"handleDragStop",(u=>{if(!this.dragging)return;const Xe=(0,Kr.getControlPosition)(u,this.touchIdentifier,this);if(null==Xe)return;let{x:Wt,y:fr}=Xe;if(Array.isArray(this.props.grid)){let u=Wt-this.lastX||0,Xe=fr-this.lastY||0;[u,Xe]=(0,Kr.snapToGrid)(this.props.grid,u,Xe),Wt=this.lastX+u,fr=this.lastY+Xe}const _r=(0,Kr.createCoreData)(this,Wt,fr);if(!1===this.props.onStop(u,_r)||!1===this.mounted)return!1;const wr=this.findDOMNode();wr&&this.props.enableUserSelectHack&&(0,Ar.removeUserSelectStyles)(wr.ownerDocument),(0,no.default)("DraggableCore: handleDragStop: %j",_r),this.dragging=!1,this.lastX=NaN,this.lastY=NaN,wr&&((0,no.default)("DraggableCore: Removing handlers"),(0,Ar.removeEvent)(wr.ownerDocument,ao.move,this.handleDrag),(0,Ar.removeEvent)(wr.ownerDocument,ao.stop,this.handleDragStop))})),_defineProperty(this,"onMouseDown",(u=>(ao=oo,this.handleDragStart(u)))),_defineProperty(this,"onMouseUp",(u=>(ao=oo,this.handleDragStop(u)))),_defineProperty(this,"onTouchStart",(u=>(ao=io,this.handleDragStart(u)))),_defineProperty(this,"onTouchEnd",(u=>(ao=io,this.handleDragStop(u))))}componentDidMount(){this.mounted=!0;const u=this.findDOMNode();u&&(0,Ar.addEvent)(u,io.start,this.onTouchStart,{passive:!1})}componentWillUnmount(){this.mounted=!1;const u=this.findDOMNode();if(u){const{ownerDocument:Xe}=u;(0,Ar.removeEvent)(Xe,oo.move,this.handleDrag),(0,Ar.removeEvent)(Xe,io.move,this.handleDrag),(0,Ar.removeEvent)(Xe,oo.stop,this.handleDragStop),(0,Ar.removeEvent)(Xe,io.stop,this.handleDragStop),(0,Ar.removeEvent)(u,io.start,this.onTouchStart,{passive:!1}),this.props.enableUserSelectHack&&(0,Ar.removeUserSelectStyles)(Xe)}}findDOMNode(){var u,Xe;return null!==(u=this.props)&&void 0!==u&&u.nodeRef?null===(Xe=this.props)||void 0===Xe||null===(Xe=Xe.nodeRef)||void 0===Xe?void 0:Xe.current:wr.default.findDOMNode(this)}render(){return fr.cloneElement(fr.Children.only(this.props.children),{onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}}Xe.default=DraggableCore,_defineProperty(DraggableCore,"displayName","DraggableCore"),_defineProperty(DraggableCore,"propTypes",{allowAnyClick:_r.default.bool,children:_r.default.node.isRequired,disabled:_r.default.bool,enableUserSelectHack:_r.default.bool,offsetParent:function(u,Xe){if(u[Xe]&&1!==u[Xe].nodeType)throw new Error("Draggable's offsetParent must be a DOM Node.")},grid:_r.default.arrayOf(_r.default.number),handle:_r.default.string,cancel:_r.default.string,nodeRef:_r.default.object,onStart:_r.default.func,onDrag:_r.default.func,onStop:_r.default.func,onMouseDown:_r.default.func,scale:_r.default.number,className:In.dontSetMe,style:In.dontSetMe,transform:In.dontSetMe}),_defineProperty(DraggableCore,"defaultProps",{allowAnyClick:!1,disabled:!1,enableUserSelectHack:!0,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){},scale:1})},5794:function(u,Xe,Wt){"use strict";const{default:fr,DraggableCore:_r}=Wt(6027);u.exports=fr,u.exports.default=fr,u.exports.DraggableCore=_r},1089:function(u,Xe,Wt){"use strict";Object.defineProperty(Xe,"__esModule",{value:!0}),Xe.addClassName=addClassName,Xe.addEvent=function addEvent(u,Xe,Wt,fr){if(!u)return;const _r={capture:!0,...fr};u.addEventListener?u.addEventListener(Xe,Wt,_r):u.attachEvent?u.attachEvent("on"+Xe,Wt):u["on"+Xe]=Wt},Xe.addUserSelectStyles=function addUserSelectStyles(u){if(!u)return;let Xe=u.getElementById("react-draggable-style-el");Xe||(Xe=u.createElement("style"),Xe.type="text/css",Xe.id="react-draggable-style-el",Xe.innerHTML=".react-draggable-transparent-selection *::-moz-selection {all: inherit;}\n",Xe.innerHTML+=".react-draggable-transparent-selection *::selection {all: inherit;}\n",u.getElementsByTagName("head")[0].appendChild(Xe));u.body&&addClassName(u.body,"react-draggable-transparent-selection")},Xe.createCSSTransform=function createCSSTransform(u,Xe){const Wt=getTranslation(u,Xe,"px");return{[(0,_r.browserPrefixToKey)("transform",_r.default)]:Wt}},Xe.createSVGTransform=function createSVGTransform(u,Xe){return getTranslation(u,Xe,"")},Xe.getTouch=function getTouch(u,Xe){return u.targetTouches&&(0,fr.findInArray)(u.targetTouches,(u=>Xe===u.identifier))||u.changedTouches&&(0,fr.findInArray)(u.changedTouches,(u=>Xe===u.identifier))},Xe.getTouchIdentifier=function getTouchIdentifier(u){if(u.targetTouches&&u.targetTouches[0])return u.targetTouches[0].identifier;if(u.changedTouches&&u.changedTouches[0])return u.changedTouches[0].identifier},Xe.getTranslation=getTranslation,Xe.innerHeight=function innerHeight(u){let Xe=u.clientHeight;const Wt=u.ownerDocument.defaultView.getComputedStyle(u);return Xe-=(0,fr.int)(Wt.paddingTop),Xe-=(0,fr.int)(Wt.paddingBottom),Xe},Xe.innerWidth=function innerWidth(u){let Xe=u.clientWidth;const Wt=u.ownerDocument.defaultView.getComputedStyle(u);return Xe-=(0,fr.int)(Wt.paddingLeft),Xe-=(0,fr.int)(Wt.paddingRight),Xe},Xe.matchesSelector=matchesSelector,Xe.matchesSelectorAndParentsTo=function matchesSelectorAndParentsTo(u,Xe,Wt){let fr=u;do{if(matchesSelector(fr,Xe))return!0;if(fr===Wt)return!1;fr=fr.parentNode}while(fr);return!1},Xe.offsetXYFromParent=function offsetXYFromParent(u,Xe,Wt){const fr=Xe===Xe.ownerDocument.body?{left:0,top:0}:Xe.getBoundingClientRect(),_r=(u.clientX+Xe.scrollLeft-fr.left)/Wt,wr=(u.clientY+Xe.scrollTop-fr.top)/Wt;return{x:_r,y:wr}},Xe.outerHeight=function outerHeight(u){let Xe=u.clientHeight;const Wt=u.ownerDocument.defaultView.getComputedStyle(u);return Xe+=(0,fr.int)(Wt.borderTopWidth),Xe+=(0,fr.int)(Wt.borderBottomWidth),Xe},Xe.outerWidth=function outerWidth(u){let Xe=u.clientWidth;const Wt=u.ownerDocument.defaultView.getComputedStyle(u);return Xe+=(0,fr.int)(Wt.borderLeftWidth),Xe+=(0,fr.int)(Wt.borderRightWidth),Xe},Xe.removeClassName=removeClassName,Xe.removeEvent=function removeEvent(u,Xe,Wt,fr){if(!u)return;const _r={capture:!0,...fr};u.removeEventListener?u.removeEventListener(Xe,Wt,_r):u.detachEvent?u.detachEvent("on"+Xe,Wt):u["on"+Xe]=null},Xe.removeUserSelectStyles=function removeUserSelectStyles(u){if(!u)return;try{if(u.body&&removeClassName(u.body,"react-draggable-transparent-selection"),u.selection)u.selection.empty();else{const Xe=(u.defaultView||window).getSelection();Xe&&"Caret"!==Xe.type&&Xe.removeAllRanges()}}catch(u){}};var fr=Wt(7056),_r=function _interopRequireWildcard(u,Xe){if(!Xe&&u&&u.__esModule)return u;if(null===u||"object"!=typeof u&&"function"!=typeof u)return{default:u};var Wt=_getRequireWildcardCache(Xe);if(Wt&&Wt.has(u))return Wt.get(u);var fr={},_r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var wr in u)if("default"!==wr&&Object.prototype.hasOwnProperty.call(u,wr)){var Ar=_r?Object.getOwnPropertyDescriptor(u,wr):null;Ar&&(Ar.get||Ar.set)?Object.defineProperty(fr,wr,Ar):fr[wr]=u[wr]}fr.default=u,Wt&&Wt.set(u,fr);return fr}(Wt(3514));function _getRequireWildcardCache(u){if("function"!=typeof WeakMap)return null;var Xe=new WeakMap,Wt=new WeakMap;return(_getRequireWildcardCache=function(u){return u?Wt:Xe})(u)}let wr="";function matchesSelector(u,Xe){return wr||(wr=(0,fr.findInArray)(["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"],(function(Xe){return(0,fr.isFunction)(u[Xe])}))),!!(0,fr.isFunction)(u[wr])&&u[wr](Xe)}function getTranslation(u,Xe,Wt){let{x:fr,y:_r}=u,wr="translate(".concat(fr).concat(Wt,",").concat(_r).concat(Wt,")");if(Xe){const u="".concat("string"==typeof Xe.x?Xe.x:Xe.x+Wt),fr="".concat("string"==typeof Xe.y?Xe.y:Xe.y+Wt);wr="translate(".concat(u,", ").concat(fr,")")+wr}return wr}function addClassName(u,Xe){u.classList?u.classList.add(Xe):u.className.match(new RegExp("(?:^|\\s)".concat(Xe,"(?!\\S)")))||(u.className+=" ".concat(Xe))}function removeClassName(u,Xe){u.classList?u.classList.remove(Xe):u.className=u.className.replace(new RegExp("(?:^|\\s)".concat(Xe,"(?!\\S)"),"g"),"")}},3514:function(u,Xe){"use strict";Object.defineProperty(Xe,"__esModule",{value:!0}),Xe.browserPrefixToKey=browserPrefixToKey,Xe.browserPrefixToStyle=function browserPrefixToStyle(u,Xe){return Xe?"-".concat(Xe.toLowerCase(),"-").concat(u):u},Xe.default=void 0,Xe.getPrefix=getPrefix;const Wt=["Moz","Webkit","O","ms"];function getPrefix(){var u;let Xe=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"transform";if("undefined"==typeof window)return"";const fr=null===(u=window.document)||void 0===u||null===(u=u.documentElement)||void 0===u?void 0:u.style;if(!fr)return"";if(Xe in fr)return"";for(let u=0;u<Wt.length;u++)if(browserPrefixToKey(Xe,Wt[u])in fr)return Wt[u];return""}function browserPrefixToKey(u,Xe){return Xe?"".concat(Xe).concat(function kebabToTitleCase(u){let Xe="",Wt=!0;for(let fr=0;fr<u.length;fr++)Wt?(Xe+=u[fr].toUpperCase(),Wt=!1):"-"===u[fr]?Wt=!0:Xe+=u[fr];return Xe}(u)):u}Xe.default=getPrefix()},8696:function(u,Xe){"use strict";Object.defineProperty(Xe,"__esModule",{value:!0}),Xe.default=function log(){0}},1726:function(u,Xe,Wt){"use strict";Object.defineProperty(Xe,"__esModule",{value:!0}),Xe.canDragX=function canDragX(u){return"both"===u.props.axis||"x"===u.props.axis},Xe.canDragY=function canDragY(u){return"both"===u.props.axis||"y"===u.props.axis},Xe.createCoreData=function createCoreData(u,Xe,Wt){const _r=!(0,fr.isNum)(u.lastX),wr=findDOMNode(u);return _r?{node:wr,deltaX:0,deltaY:0,lastX:Xe,lastY:Wt,x:Xe,y:Wt}:{node:wr,deltaX:Xe-u.lastX,deltaY:Wt-u.lastY,lastX:u.lastX,lastY:u.lastY,x:Xe,y:Wt}},Xe.createDraggableData=function createDraggableData(u,Xe){const Wt=u.props.scale;return{node:Xe.node,x:u.state.x+Xe.deltaX/Wt,y:u.state.y+Xe.deltaY/Wt,deltaX:Xe.deltaX/Wt,deltaY:Xe.deltaY/Wt,lastX:u.state.x,lastY:u.state.y}},Xe.getBoundPosition=function getBoundPosition(u,Xe,Wt){if(!u.props.bounds)return[Xe,Wt];let{bounds:wr}=u.props;wr="string"==typeof wr?wr:function cloneBounds(u){return{left:u.left,top:u.top,right:u.right,bottom:u.bottom}}(wr);const Ar=findDOMNode(u);if("string"==typeof wr){const{ownerDocument:u}=Ar,Xe=u.defaultView;let Wt;if(Wt="parent"===wr?Ar.parentNode:u.querySelector(wr),!(Wt instanceof Xe.HTMLElement))throw new Error('Bounds selector "'+wr+'" could not find an element.');const Kr=Wt,In=Xe.getComputedStyle(Ar),no=Xe.getComputedStyle(Kr);wr={left:-Ar.offsetLeft+(0,fr.int)(no.paddingLeft)+(0,fr.int)(In.marginLeft),top:-Ar.offsetTop+(0,fr.int)(no.paddingTop)+(0,fr.int)(In.marginTop),right:(0,_r.innerWidth)(Kr)-(0,_r.outerWidth)(Ar)-Ar.offsetLeft+(0,fr.int)(no.paddingRight)-(0,fr.int)(In.marginRight),bottom:(0,_r.innerHeight)(Kr)-(0,_r.outerHeight)(Ar)-Ar.offsetTop+(0,fr.int)(no.paddingBottom)-(0,fr.int)(In.marginBottom)}}(0,fr.isNum)(wr.right)&&(Xe=Math.min(Xe,wr.right));(0,fr.isNum)(wr.bottom)&&(Wt=Math.min(Wt,wr.bottom));(0,fr.isNum)(wr.left)&&(Xe=Math.max(Xe,wr.left));(0,fr.isNum)(wr.top)&&(Wt=Math.max(Wt,wr.top));return[Xe,Wt]},Xe.getControlPosition=function getControlPosition(u,Xe,Wt){const fr="number"==typeof Xe?(0,_r.getTouch)(u,Xe):null;if("number"==typeof Xe&&!fr)return null;const wr=findDOMNode(Wt),Ar=Wt.props.offsetParent||wr.offsetParent||wr.ownerDocument.body;return(0,_r.offsetXYFromParent)(fr||u,Ar,Wt.props.scale)},Xe.snapToGrid=function snapToGrid(u,Xe,Wt){const fr=Math.round(Xe/u[0])*u[0],_r=Math.round(Wt/u[1])*u[1];return[fr,_r]};var fr=Wt(7056),_r=Wt(1089);function findDOMNode(u){const Xe=u.findDOMNode();if(!Xe)throw new Error("<DraggableCore>: Unmounted during event!");return Xe}},7056:function(u,Xe){"use strict";Object.defineProperty(Xe,"__esModule",{value:!0}),Xe.dontSetMe=function dontSetMe(u,Xe,Wt){if(u[Xe])return new Error("Invalid prop ".concat(Xe," passed to ").concat(Wt," - do not set this, set it on the child."))},Xe.findInArray=function findInArray(u,Xe){for(let Wt=0,fr=u.length;Wt<fr;Wt++)if(Xe.apply(Xe,[u[Wt],Wt,u]))return u[Wt]},Xe.int=function int(u){return parseInt(u,10)},Xe.isFunction=function isFunction(u){return"function"==typeof u||"[object Function]"===Object.prototype.toString.call(u)},Xe.isNum=function isNum(u){return"number"==typeof u&&!isNaN(u)}},2799:function(u,Xe){"use strict";var Wt,fr=Symbol.for("react.element"),_r=Symbol.for("react.portal"),wr=Symbol.for("react.fragment"),Ar=Symbol.for("react.strict_mode"),Kr=Symbol.for("react.profiler"),In=Symbol.for("react.provider"),no=Symbol.for("react.context"),io=Symbol.for("react.server_context"),oo=Symbol.for("react.forward_ref"),ao=Symbol.for("react.suspense"),so=Symbol.for("react.suspense_list"),co=Symbol.for("react.memo"),ho=Symbol.for("react.lazy"),go=Symbol.for("react.offscreen");function v(u){if("object"==typeof u&&null!==u){var Xe=u.$$typeof;switch(Xe){case fr:switch(u=u.type){case wr:case Kr:case Ar:case ao:case so:return u;default:switch(u=u&&u.$$typeof){case io:case no:case oo:case ho:case co:case In:return u;default:return Xe}}case _r:return Xe}}}Wt=Symbol.for("react.module.reference"),Xe.ContextConsumer=no,Xe.ContextProvider=In,Xe.Element=fr,Xe.ForwardRef=oo,Xe.Fragment=wr,Xe.Lazy=ho,Xe.Memo=co,Xe.Portal=_r,Xe.Profiler=Kr,Xe.StrictMode=Ar,Xe.Suspense=ao,Xe.SuspenseList=so,Xe.isAsyncMode=function(){return!1},Xe.isConcurrentMode=function(){return!1},Xe.isContextConsumer=function(u){return v(u)===no},Xe.isContextProvider=function(u){return v(u)===In},Xe.isElement=function(u){return"object"==typeof u&&null!==u&&u.$$typeof===fr},Xe.isForwardRef=function(u){return v(u)===oo},Xe.isFragment=function(u){return v(u)===wr},Xe.isLazy=function(u){return v(u)===ho},Xe.isMemo=function(u){return v(u)===co},Xe.isPortal=function(u){return v(u)===_r},Xe.isProfiler=function(u){return v(u)===Kr},Xe.isStrictMode=function(u){return v(u)===Ar},Xe.isSuspense=function(u){return v(u)===ao},Xe.isSuspenseList=function(u){return v(u)===so},Xe.isValidElementType=function(u){return"string"==typeof u||"function"==typeof u||u===wr||u===Kr||u===Ar||u===ao||u===so||u===go||"object"==typeof u&&null!==u&&(u.$$typeof===ho||u.$$typeof===co||u.$$typeof===In||u.$$typeof===no||u.$$typeof===oo||u.$$typeof===Wt||void 0!==u.getModuleId)},Xe.typeOf=v},4363:function(u,Xe,Wt){"use strict";u.exports=Wt(2799)},1020:function(u,Xe,Wt){"use strict";var fr=Wt(6540),_r=Symbol.for("react.element"),wr=Symbol.for("react.fragment"),Ar=Object.prototype.hasOwnProperty,Kr=fr.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,In={key:!0,ref:!0,__self:!0,__source:!0};function q(u,Xe,Wt){var fr,wr={},no=null,io=null;for(fr in void 0!==Wt&&(no=""+Wt),void 0!==Xe.key&&(no=""+Xe.key),void 0!==Xe.ref&&(io=Xe.ref),Xe)Ar.call(Xe,fr)&&!In.hasOwnProperty(fr)&&(wr[fr]=Xe[fr]);if(u&&u.defaultProps)for(fr in Xe=u.defaultProps)void 0===wr[fr]&&(wr[fr]=Xe[fr]);return{$$typeof:_r,type:u,key:no,ref:io,props:wr,_owner:Kr.current}}Xe.Fragment=wr,Xe.jsx=q,Xe.jsxs=q},5287:function(u,Xe){"use strict";var Wt=Symbol.for("react.element"),fr=Symbol.for("react.portal"),_r=Symbol.for("react.fragment"),wr=Symbol.for("react.strict_mode"),Ar=Symbol.for("react.profiler"),Kr=Symbol.for("react.provider"),In=Symbol.for("react.context"),no=Symbol.for("react.forward_ref"),io=Symbol.for("react.suspense"),oo=Symbol.for("react.memo"),ao=Symbol.for("react.lazy"),so=Symbol.iterator;var co={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},ho=Object.assign,go={};function E(u,Xe,Wt){this.props=u,this.context=Xe,this.refs=go,this.updater=Wt||co}function F(){}function G(u,Xe,Wt){this.props=u,this.context=Xe,this.refs=go,this.updater=Wt||co}E.prototype.isReactComponent={},E.prototype.setState=function(u,Xe){if("object"!=typeof u&&"function"!=typeof u&&null!=u)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,u,Xe,"setState")},E.prototype.forceUpdate=function(u){this.updater.enqueueForceUpdate(this,u,"forceUpdate")},F.prototype=E.prototype;var xo=G.prototype=new F;xo.constructor=G,ho(xo,E.prototype),xo.isPureReactComponent=!0;var ko=Array.isArray,Co=Object.prototype.hasOwnProperty,Io={current:null},zo={key:!0,ref:!0,__self:!0,__source:!0};function M(u,Xe,fr){var _r,wr={},Ar=null,Kr=null;if(null!=Xe)for(_r in void 0!==Xe.ref&&(Kr=Xe.ref),void 0!==Xe.key&&(Ar=""+Xe.key),Xe)Co.call(Xe,_r)&&!zo.hasOwnProperty(_r)&&(wr[_r]=Xe[_r]);var In=arguments.length-2;if(1===In)wr.children=fr;else if(1<In){for(var no=Array(In),io=0;io<In;io++)no[io]=arguments[io+2];wr.children=no}if(u&&u.defaultProps)for(_r in In=u.defaultProps)void 0===wr[_r]&&(wr[_r]=In[_r]);return{$$typeof:Wt,type:u,key:Ar,ref:Kr,props:wr,_owner:Io.current}}function O(u){return"object"==typeof u&&null!==u&&u.$$typeof===Wt}var Bo=/\/+/g;function Q(u,Xe){return"object"==typeof u&&null!==u&&null!=u.key?function escape(u){var Xe={"=":"=0",":":"=2"};return"$"+u.replace(/[=:]/g,(function(u){return Xe[u]}))}(""+u.key):Xe.toString(36)}function R(u,Xe,_r,wr,Ar){var Kr=typeof u;"undefined"!==Kr&&"boolean"!==Kr||(u=null);var In=!1;if(null===u)In=!0;else switch(Kr){case"string":case"number":In=!0;break;case"object":switch(u.$$typeof){case Wt:case fr:In=!0}}if(In)return Ar=Ar(In=u),u=""===wr?"."+Q(In,0):wr,ko(Ar)?(_r="",null!=u&&(_r=u.replace(Bo,"$&/")+"/"),R(Ar,Xe,_r,"",(function(u){return u}))):null!=Ar&&(O(Ar)&&(Ar=function N(u,Xe){return{$$typeof:Wt,type:u.type,key:Xe,ref:u.ref,props:u.props,_owner:u._owner}}(Ar,_r+(!Ar.key||In&&In.key===Ar.key?"":(""+Ar.key).replace(Bo,"$&/")+"/")+u)),Xe.push(Ar)),1;if(In=0,wr=""===wr?".":wr+":",ko(u))for(var no=0;no<u.length;no++){var io=wr+Q(Kr=u[no],no);In+=R(Kr,Xe,_r,io,Ar)}else if(io=function A(u){return null===u||"object"!=typeof u?null:"function"==typeof(u=so&&u[so]||u["@@iterator"])?u:null}(u),"function"==typeof io)for(u=io.call(u),no=0;!(Kr=u.next()).done;)In+=R(Kr=Kr.value,Xe,_r,io=wr+Q(Kr,no++),Ar);else if("object"===Kr)throw Xe=String(u),Error("Objects are not valid as a React child (found: "+("[object Object]"===Xe?"object with keys {"+Object.keys(u).join(", ")+"}":Xe)+"). If you meant to render a collection of children, use an array instead.");return In}function S(u,Xe,Wt){if(null==u)return u;var fr=[],_r=0;return R(u,fr,"","",(function(u){return Xe.call(Wt,u,_r++)})),fr}function T(u){if(-1===u._status){var Xe=u._result;(Xe=Xe()).then((function(Xe){0!==u._status&&-1!==u._status||(u._status=1,u._result=Xe)}),(function(Xe){0!==u._status&&-1!==u._status||(u._status=2,u._result=Xe)})),-1===u._status&&(u._status=0,u._result=Xe)}if(1===u._status)return u._result.default;throw u._result}var ca={current:null},ua={transition:null},Da={ReactCurrentDispatcher:ca,ReactCurrentBatchConfig:ua,ReactCurrentOwner:Io};function X(){throw Error("act(...) is not supported in production builds of React.")}Xe.Children={map:S,forEach:function(u,Xe,Wt){S(u,(function(){Xe.apply(this,arguments)}),Wt)},count:function(u){var Xe=0;return S(u,(function(){Xe++})),Xe},toArray:function(u){return S(u,(function(u){return u}))||[]},only:function(u){if(!O(u))throw Error("React.Children.only expected to receive a single React element child.");return u}},Xe.Component=E,Xe.Fragment=_r,Xe.Profiler=Ar,Xe.PureComponent=G,Xe.StrictMode=wr,Xe.Suspense=io,Xe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Da,Xe.act=X,Xe.cloneElement=function(u,Xe,fr){if(null==u)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+u+".");var _r=ho({},u.props),wr=u.key,Ar=u.ref,Kr=u._owner;if(null!=Xe){if(void 0!==Xe.ref&&(Ar=Xe.ref,Kr=Io.current),void 0!==Xe.key&&(wr=""+Xe.key),u.type&&u.type.defaultProps)var In=u.type.defaultProps;for(no in Xe)Co.call(Xe,no)&&!zo.hasOwnProperty(no)&&(_r[no]=void 0===Xe[no]&&void 0!==In?In[no]:Xe[no])}var no=arguments.length-2;if(1===no)_r.children=fr;else if(1<no){In=Array(no);for(var io=0;io<no;io++)In[io]=arguments[io+2];_r.children=In}return{$$typeof:Wt,type:u.type,key:wr,ref:Ar,props:_r,_owner:Kr}},Xe.createContext=function(u){return(u={$$typeof:In,_currentValue:u,_currentValue2:u,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null}).Provider={$$typeof:Kr,_context:u},u.Consumer=u},Xe.createElement=M,Xe.createFactory=function(u){var Xe=M.bind(null,u);return Xe.type=u,Xe},Xe.createRef=function(){return{current:null}},Xe.forwardRef=function(u){return{$$typeof:no,render:u}},Xe.isValidElement=O,Xe.lazy=function(u){return{$$typeof:ao,_payload:{_status:-1,_result:u},_init:T}},Xe.memo=function(u,Xe){return{$$typeof:oo,type:u,compare:void 0===Xe?null:Xe}},Xe.startTransition=function(u){var Xe=ua.transition;ua.transition={};try{u()}finally{ua.transition=Xe}},Xe.unstable_act=X,Xe.useCallback=function(u,Xe){return ca.current.useCallback(u,Xe)},Xe.useContext=function(u){return ca.current.useContext(u)},Xe.useDebugValue=function(){},Xe.useDeferredValue=function(u){return ca.current.useDeferredValue(u)},Xe.useEffect=function(u,Xe){return ca.current.useEffect(u,Xe)},Xe.useId=function(){return ca.current.useId()},Xe.useImperativeHandle=function(u,Xe,Wt){return ca.current.useImperativeHandle(u,Xe,Wt)},Xe.useInsertionEffect=function(u,Xe){return ca.current.useInsertionEffect(u,Xe)},Xe.useLayoutEffect=function(u,Xe){return ca.current.useLayoutEffect(u,Xe)},Xe.useMemo=function(u,Xe){return ca.current.useMemo(u,Xe)},Xe.useReducer=function(u,Xe,Wt){return ca.current.useReducer(u,Xe,Wt)},Xe.useRef=function(u){return ca.current.useRef(u)},Xe.useState=function(u){return ca.current.useState(u)},Xe.useSyncExternalStore=function(u,Xe,Wt){return ca.current.useSyncExternalStore(u,Xe,Wt)},Xe.useTransition=function(){return ca.current.useTransition()},Xe.version="18.3.1"},6540:function(u,Xe,Wt){"use strict";u.exports=Wt(5287)},4848:function(u,Xe,Wt){"use strict";u.exports=Wt(1020)},7463:function(u,Xe){"use strict";function f(u,Xe){var Wt=u.length;u.push(Xe);e:for(;0<Wt;){var fr=Wt-1>>>1,_r=u[fr];if(!(0<g(_r,Xe)))break e;u[fr]=Xe,u[Wt]=_r,Wt=fr}}function h(u){return 0===u.length?null:u[0]}function k(u){if(0===u.length)return null;var Xe=u[0],Wt=u.pop();if(Wt!==Xe){u[0]=Wt;e:for(var fr=0,_r=u.length,wr=_r>>>1;fr<wr;){var Ar=2*(fr+1)-1,Kr=u[Ar],In=Ar+1,no=u[In];if(0>g(Kr,Wt))In<_r&&0>g(no,Kr)?(u[fr]=no,u[In]=Wt,fr=In):(u[fr]=Kr,u[Ar]=Wt,fr=Ar);else{if(!(In<_r&&0>g(no,Wt)))break e;u[fr]=no,u[In]=Wt,fr=In}}}return Xe}function g(u,Xe){var Wt=u.sortIndex-Xe.sortIndex;return 0!==Wt?Wt:u.id-Xe.id}if("object"==typeof performance&&"function"==typeof performance.now){var Wt=performance;Xe.unstable_now=function(){return Wt.now()}}else{var fr=Date,_r=fr.now();Xe.unstable_now=function(){return fr.now()-_r}}var wr=[],Ar=[],Kr=1,In=null,no=3,io=!1,oo=!1,ao=!1,so="function"==typeof setTimeout?setTimeout:null,co="function"==typeof clearTimeout?clearTimeout:null,ho="undefined"!=typeof setImmediate?setImmediate:null;function G(u){for(var Xe=h(Ar);null!==Xe;){if(null===Xe.callback)k(Ar);else{if(!(Xe.startTime<=u))break;k(Ar),Xe.sortIndex=Xe.expirationTime,f(wr,Xe)}Xe=h(Ar)}}function H(u){if(ao=!1,G(u),!oo)if(null!==h(wr))oo=!0,I(J);else{var Xe=h(Ar);null!==Xe&&K(H,Xe.startTime-u)}}function J(u,Wt){oo=!1,ao&&(ao=!1,co(Co),Co=-1),io=!0;var fr=no;try{for(G(Wt),In=h(wr);null!==In&&(!(In.expirationTime>Wt)||u&&!M());){var _r=In.callback;if("function"==typeof _r){In.callback=null,no=In.priorityLevel;var Kr=_r(In.expirationTime<=Wt);Wt=Xe.unstable_now(),"function"==typeof Kr?In.callback=Kr:In===h(wr)&&k(wr),G(Wt)}else k(wr);In=h(wr)}if(null!==In)var so=!0;else{var ho=h(Ar);null!==ho&&K(H,ho.startTime-Wt),so=!1}return so}finally{In=null,no=fr,io=!1}}"undefined"!=typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var go,xo=!1,ko=null,Co=-1,Io=5,zo=-1;function M(){return!(Xe.unstable_now()-zo<Io)}function R(){if(null!==ko){var u=Xe.unstable_now();zo=u;var Wt=!0;try{Wt=ko(!0,u)}finally{Wt?go():(xo=!1,ko=null)}}else xo=!1}if("function"==typeof ho)go=function(){ho(R)};else if("undefined"!=typeof MessageChannel){var Bo=new MessageChannel,ca=Bo.port2;Bo.port1.onmessage=R,go=function(){ca.postMessage(null)}}else go=function(){so(R,0)};function I(u){ko=u,xo||(xo=!0,go())}function K(u,Wt){Co=so((function(){u(Xe.unstable_now())}),Wt)}Xe.unstable_IdlePriority=5,Xe.unstable_ImmediatePriority=1,Xe.unstable_LowPriority=4,Xe.unstable_NormalPriority=3,Xe.unstable_Profiling=null,Xe.unstable_UserBlockingPriority=2,Xe.unstable_cancelCallback=function(u){u.callback=null},Xe.unstable_continueExecution=function(){oo||io||(oo=!0,I(J))},Xe.unstable_forceFrameRate=function(u){0>u||125<u?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Io=0<u?Math.floor(1e3/u):5},Xe.unstable_getCurrentPriorityLevel=function(){return no},Xe.unstable_getFirstCallbackNode=function(){return h(wr)},Xe.unstable_next=function(u){switch(no){case 1:case 2:case 3:var Xe=3;break;default:Xe=no}var Wt=no;no=Xe;try{return u()}finally{no=Wt}},Xe.unstable_pauseExecution=function(){},Xe.unstable_requestPaint=function(){},Xe.unstable_runWithPriority=function(u,Xe){switch(u){case 1:case 2:case 3:case 4:case 5:break;default:u=3}var Wt=no;no=u;try{return Xe()}finally{no=Wt}},Xe.unstable_scheduleCallback=function(u,Wt,fr){var _r=Xe.unstable_now();switch("object"==typeof fr&&null!==fr?fr="number"==typeof(fr=fr.delay)&&0<fr?_r+fr:_r:fr=_r,u){case 1:var In=-1;break;case 2:In=250;break;case 5:In=1073741823;break;case 4:In=1e4;break;default:In=5e3}return u={id:Kr++,callback:Wt,priorityLevel:u,startTime:fr,expirationTime:In=fr+In,sortIndex:-1},fr>_r?(u.sortIndex=fr,f(Ar,u),null===h(wr)&&u===h(Ar)&&(ao?(co(Co),Co=-1):ao=!0,K(H,fr-_r))):(u.sortIndex=In,f(wr,u),oo||io||(oo=!0,I(J))),u},Xe.unstable_shouldYield=M,Xe.unstable_wrapCallback=function(u){var Xe=no;return function(){var Wt=no;no=Xe;try{return u.apply(this,arguments)}finally{no=Wt}}}},9982:function(u,Xe,Wt){"use strict";u.exports=Wt(7463)},7154:function(u,Xe,Wt){"use strict";var fr=Wt(6540);var _r="function"==typeof Object.is?Object.is:function n(u,Xe){return u===Xe&&(0!==u||1/u==1/Xe)||u!=u&&Xe!=Xe},wr=fr.useSyncExternalStore,Ar=fr.useRef,Kr=fr.useEffect,In=fr.useMemo,no=fr.useDebugValue;Xe.useSyncExternalStoreWithSelector=function(u,Xe,Wt,fr,io){var oo=Ar(null);if(null===oo.current){var ao={hasValue:!1,value:null};oo.current=ao}else ao=oo.current;oo=In((function(){function a(Xe){if(!Ar){if(Ar=!0,u=Xe,Xe=fr(Xe),void 0!==io&&ao.hasValue){var Wt=ao.value;if(io(Wt,Xe))return wr=Wt}return wr=Xe}if(Wt=wr,_r(u,Xe))return Wt;var Kr=fr(Xe);return void 0!==io&&io(Wt,Kr)?Wt:(u=Xe,wr=Kr)}var u,wr,Ar=!1,Kr=void 0===Wt?null:Wt;return[function(){return a(Xe())},null===Kr?void 0:function(){return a(Kr())}]}),[Xe,Wt,fr,io]);var so=wr(u,oo[0],oo[1]);return Kr((function(){ao.hasValue=!0,ao.value=so}),[so]),no(so),so}},8418:function(u,Xe,Wt){"use strict";u.exports=Wt(7154)},4634:function(u){function _extends(){return u.exports=_extends=Object.assign?Object.assign.bind():function(u){for(var Xe=1;Xe<arguments.length;Xe++){var Wt=arguments[Xe];for(var fr in Wt)({}).hasOwnProperty.call(Wt,fr)&&(u[fr]=Wt[fr])}return u},u.exports.__esModule=!0,u.exports.default=u.exports,_extends.apply(null,arguments)}u.exports=_extends,u.exports.__esModule=!0,u.exports.default=u.exports},4994:function(u){u.exports=function _interopRequireDefault(u){return u&&u.__esModule?u:{default:u}},u.exports.__esModule=!0,u.exports.default=u.exports},4893:function(u){u.exports=function _objectWithoutPropertiesLoose(u,Xe){if(null==u)return{};var Wt={};for(var fr in u)if({}.hasOwnProperty.call(u,fr)){if(Xe.includes(fr))continue;Wt[fr]=u[fr]}return Wt},u.exports.__esModule=!0,u.exports.default=u.exports},9306:function(u,Xe,Wt){"use strict";var fr=Wt(4901),_r=Wt(6823),wr=TypeError;u.exports=function(u){if(fr(u))return u;throw new wr(_r(u)+" is not a function")}},8551:function(u,Xe,Wt){"use strict";var fr=Wt(34),_r=String,wr=TypeError;u.exports=function(u){if(fr(u))return u;throw new wr(_r(u)+" is not an object")}},2195:function(u,Xe,Wt){"use strict";var fr=Wt(9504),_r=fr({}.toString),wr=fr("".slice);u.exports=function(u){return wr(_r(u),8,-1)}},6955:function(u,Xe,Wt){"use strict";var fr=Wt(2140),_r=Wt(4901),wr=Wt(2195),Ar=Wt(8227)("toStringTag"),Kr=Object,In="Arguments"===wr(function(){return arguments}());u.exports=fr?wr:function(u){var Xe,Wt,fr;return void 0===u?"Undefined":null===u?"Null":"string"==typeof(Wt=function(u,Xe){try{return u[Xe]}catch(u){}}(Xe=Kr(u),Ar))?Wt:In?wr(Xe):"Object"===(fr=wr(Xe))&&_r(Xe.callee)?"Arguments":fr}},6699:function(u,Xe,Wt){"use strict";var fr=Wt(3724),_r=Wt(4913),wr=Wt(6980);u.exports=fr?function(u,Xe,Wt){return _r.f(u,Xe,wr(1,Wt))}:function(u,Xe,Wt){return u[Xe]=Wt,u}},6980:function(u){"use strict";u.exports=function(u,Xe){return{enumerable:!(1&u),configurable:!(2&u),writable:!(4&u),value:Xe}}},2106:function(u,Xe,Wt){"use strict";var fr=Wt(283),_r=Wt(4913);u.exports=function(u,Xe,Wt){return Wt.get&&fr(Wt.get,Xe,{getter:!0}),Wt.set&&fr(Wt.set,Xe,{setter:!0}),_r.f(u,Xe,Wt)}},6840:function(u,Xe,Wt){"use strict";var fr=Wt(4901),_r=Wt(4913),wr=Wt(283),Ar=Wt(9433);u.exports=function(u,Xe,Wt,Kr){Kr||(Kr={});var In=Kr.enumerable,no=void 0!==Kr.name?Kr.name:Xe;if(fr(Wt)&&wr(Wt,no,Kr),Kr.global)In?u[Xe]=Wt:Ar(Xe,Wt);else{try{Kr.unsafe?u[Xe]&&(In=!0):delete u[Xe]}catch(u){}In?u[Xe]=Wt:_r.f(u,Xe,{value:Wt,enumerable:!1,configurable:!Kr.nonConfigurable,writable:!Kr.nonWritable})}return u}},9433:function(u,Xe,Wt){"use strict";var fr=Wt(4576),_r=Object.defineProperty;u.exports=function(u,Xe){try{_r(fr,u,{value:Xe,configurable:!0,writable:!0})}catch(Wt){fr[u]=Xe}return Xe}},3724:function(u,Xe,Wt){"use strict";var fr=Wt(9039);u.exports=!fr((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}))},4055:function(u,Xe,Wt){"use strict";var fr=Wt(4576),_r=Wt(34),wr=fr.document,Ar=_r(wr)&&_r(wr.createElement);u.exports=function(u){return Ar?wr.createElement(u):{}}},2839:function(u,Xe,Wt){"use strict";var fr=Wt(4576).navigator,_r=fr&&fr.userAgent;u.exports=_r?String(_r):""},9519:function(u,Xe,Wt){"use strict";var fr,_r,wr=Wt(4576),Ar=Wt(2839),Kr=wr.process,In=wr.Deno,no=Kr&&Kr.versions||In&&In.version,io=no&&no.v8;io&&(_r=(fr=io.split("."))[0]>0&&fr[0]<4?1:+(fr[0]+fr[1])),!_r&&Ar&&(!(fr=Ar.match(/Edge\/(\d+)/))||fr[1]>=74)&&(fr=Ar.match(/Chrome\/(\d+)/))&&(_r=+fr[1]),u.exports=_r},9039:function(u){"use strict";u.exports=function(u){try{return!!u()}catch(u){return!0}}},616:function(u,Xe,Wt){"use strict";var fr=Wt(9039);u.exports=!fr((function(){var u=function(){}.bind();return"function"!=typeof u||u.hasOwnProperty("prototype")}))},9565:function(u,Xe,Wt){"use strict";var fr=Wt(616),_r=Function.prototype.call;u.exports=fr?_r.bind(_r):function(){return _r.apply(_r,arguments)}},350:function(u,Xe,Wt){"use strict";var fr=Wt(3724),_r=Wt(9297),wr=Function.prototype,Ar=fr&&Object.getOwnPropertyDescriptor,Kr=_r(wr,"name"),In=Kr&&"something"===function something(){}.name,no=Kr&&(!fr||fr&&Ar(wr,"name").configurable);u.exports={EXISTS:Kr,PROPER:In,CONFIGURABLE:no}},9504:function(u,Xe,Wt){"use strict";var fr=Wt(616),_r=Function.prototype,wr=_r.call,Ar=fr&&_r.bind.bind(wr,wr);u.exports=fr?Ar:function(u){return function(){return wr.apply(u,arguments)}}},7751:function(u,Xe,Wt){"use strict";var fr=Wt(4576),_r=Wt(4901);u.exports=function(u,Xe){return arguments.length<2?(Wt=fr[u],_r(Wt)?Wt:void 0):fr[u]&&fr[u][Xe];var Wt}},5966:function(u,Xe,Wt){"use strict";var fr=Wt(9306),_r=Wt(4117);u.exports=function(u,Xe){var Wt=u[Xe];return _r(Wt)?void 0:fr(Wt)}},4576:function(u,Xe,Wt){"use strict";var check=function(u){return u&&u.Math===Math&&u};u.exports=check("object"==typeof globalThis&&globalThis)||check("object"==typeof window&&window)||check("object"==typeof self&&self)||check("object"==typeof Wt.g&&Wt.g)||check("object"==typeof this&&this)||function(){return this}()||Function("return this")()},9297:function(u,Xe,Wt){"use strict";var fr=Wt(9504),_r=Wt(8981),wr=fr({}.hasOwnProperty);u.exports=Object.hasOwn||function hasOwn(u,Xe){return wr(_r(u),Xe)}},421:function(u){"use strict";u.exports={}},5917:function(u,Xe,Wt){"use strict";var fr=Wt(3724),_r=Wt(9039),wr=Wt(4055);u.exports=!fr&&!_r((function(){return 7!==Object.defineProperty(wr("div"),"a",{get:function(){return 7}}).a}))},3706:function(u,Xe,Wt){"use strict";var fr=Wt(9504),_r=Wt(4901),wr=Wt(7629),Ar=fr(Function.toString);_r(wr.inspectSource)||(wr.inspectSource=function(u){return Ar(u)}),u.exports=wr.inspectSource},1181:function(u,Xe,Wt){"use strict";var fr,_r,wr,Ar=Wt(8622),Kr=Wt(4576),In=Wt(34),no=Wt(6699),io=Wt(9297),oo=Wt(7629),ao=Wt(6119),so=Wt(421),co="Object already initialized",ho=Kr.TypeError,go=Kr.WeakMap;if(Ar||oo.state){var xo=oo.state||(oo.state=new go);xo.get=xo.get,xo.has=xo.has,xo.set=xo.set,fr=function(u,Xe){if(xo.has(u))throw new ho(co);return Xe.facade=u,xo.set(u,Xe),Xe},_r=function(u){return xo.get(u)||{}},wr=function(u){return xo.has(u)}}else{var ko=ao("state");so[ko]=!0,fr=function(u,Xe){if(io(u,ko))throw new ho(co);return Xe.facade=u,no(u,ko,Xe),Xe},_r=function(u){return io(u,ko)?u[ko]:{}},wr=function(u){return io(u,ko)}}u.exports={set:fr,get:_r,has:wr,enforce:function(u){return wr(u)?_r(u):fr(u,{})},getterFor:function(u){return function(Xe){var Wt;if(!In(Xe)||(Wt=_r(Xe)).type!==u)throw new ho("Incompatible receiver, "+u+" required");return Wt}}}},4901:function(u){"use strict";var Xe="object"==typeof document&&document.all;u.exports=void 0===Xe&&void 0!==Xe?function(u){return"function"==typeof u||u===Xe}:function(u){return"function"==typeof u}},4117:function(u){"use strict";u.exports=function(u){return null==u}},34:function(u,Xe,Wt){"use strict";var fr=Wt(4901);u.exports=function(u){return"object"==typeof u?null!==u:fr(u)}},6395:function(u){"use strict";u.exports=!1},757:function(u,Xe,Wt){"use strict";var fr=Wt(7751),_r=Wt(4901),wr=Wt(1625),Ar=Wt(7040),Kr=Object;u.exports=Ar?function(u){return"symbol"==typeof u}:function(u){var Xe=fr("Symbol");return _r(Xe)&&wr(Xe.prototype,Kr(u))}},283:function(u,Xe,Wt){"use strict";var fr=Wt(9504),_r=Wt(9039),wr=Wt(4901),Ar=Wt(9297),Kr=Wt(3724),In=Wt(350).CONFIGURABLE,no=Wt(3706),io=Wt(1181),oo=io.enforce,ao=io.get,so=String,co=Object.defineProperty,ho=fr("".slice),go=fr("".replace),xo=fr([].join),ko=Kr&&!_r((function(){return 8!==co((function(){}),"length",{value:8}).length})),Co=String(String).split("String"),Io=u.exports=function(u,Xe,Wt){"Symbol("===ho(so(Xe),0,7)&&(Xe="["+go(so(Xe),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),Wt&&Wt.getter&&(Xe="get "+Xe),Wt&&Wt.setter&&(Xe="set "+Xe),(!Ar(u,"name")||In&&u.name!==Xe)&&(Kr?co(u,"name",{value:Xe,configurable:!0}):u.name=Xe),ko&&Wt&&Ar(Wt,"arity")&&u.length!==Wt.arity&&co(u,"length",{value:Wt.arity});try{Wt&&Ar(Wt,"constructor")&&Wt.constructor?Kr&&co(u,"prototype",{writable:!1}):u.prototype&&(u.prototype=void 0)}catch(u){}var fr=oo(u);return Ar(fr,"source")||(fr.source=xo(Co,"string"==typeof Xe?Xe:"")),u};Function.prototype.toString=Io((function toString(){return wr(this)&&ao(this).source||no(this)}),"toString")},4913:function(u,Xe,Wt){"use strict";var fr=Wt(3724),_r=Wt(5917),wr=Wt(8686),Ar=Wt(8551),Kr=Wt(6969),In=TypeError,no=Object.defineProperty,io=Object.getOwnPropertyDescriptor,oo="enumerable",ao="configurable",so="writable";Xe.f=fr?wr?function defineProperty(u,Xe,Wt){if(Ar(u),Xe=Kr(Xe),Ar(Wt),"function"==typeof u&&"prototype"===Xe&&"value"in Wt&&so in Wt&&!Wt[so]){var fr=io(u,Xe);fr&&fr[so]&&(u[Xe]=Wt.value,Wt={configurable:ao in Wt?Wt[ao]:fr[ao],enumerable:oo in Wt?Wt[oo]:fr[oo],writable:!1})}return no(u,Xe,Wt)}:no:function defineProperty(u,Xe,Wt){if(Ar(u),Xe=Kr(Xe),Ar(Wt),_r)try{return no(u,Xe,Wt)}catch(u){}if("get"in Wt||"set"in Wt)throw new In("Accessors not supported");return"value"in Wt&&(u[Xe]=Wt.value),u}},1625:function(u,Xe,Wt){"use strict";var fr=Wt(9504);u.exports=fr({}.isPrototypeOf)},4270:function(u,Xe,Wt){"use strict";var fr=Wt(9565),_r=Wt(4901),wr=Wt(34),Ar=TypeError;u.exports=function(u,Xe){var Wt,Kr;if("string"===Xe&&_r(Wt=u.toString)&&!wr(Kr=fr(Wt,u)))return Kr;if(_r(Wt=u.valueOf)&&!wr(Kr=fr(Wt,u)))return Kr;if("string"!==Xe&&_r(Wt=u.toString)&&!wr(Kr=fr(Wt,u)))return Kr;throw new Ar("Can't convert object to primitive value")}},7750:function(u,Xe,Wt){"use strict";var fr=Wt(4117),_r=TypeError;u.exports=function(u){if(fr(u))throw new _r("Can't call method on "+u);return u}},6119:function(u,Xe,Wt){"use strict";var fr=Wt(5745),_r=Wt(3392),wr=fr("keys");u.exports=function(u){return wr[u]||(wr[u]=_r(u))}},7629:function(u,Xe,Wt){"use strict";var fr=Wt(6395),_r=Wt(4576),wr=Wt(9433),Ar="__core-js_shared__",Kr=u.exports=_r[Ar]||wr(Ar,{});(Kr.versions||(Kr.versions=[])).push({version:"3.38.1",mode:fr?"pure":"global",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.38.1/LICENSE",source:"https://github.com/zloirock/core-js"})},5745:function(u,Xe,Wt){"use strict";var fr=Wt(7629);u.exports=function(u,Xe){return fr[u]||(fr[u]=Xe||{})}},4495:function(u,Xe,Wt){"use strict";var fr=Wt(9519),_r=Wt(9039),wr=Wt(4576).String;u.exports=!!Object.getOwnPropertySymbols&&!_r((function(){var u=Symbol("symbol detection");return!wr(u)||!(Object(u)instanceof Symbol)||!Symbol.sham&&fr&&fr<41}))},8981:function(u,Xe,Wt){"use strict";var fr=Wt(7750),_r=Object;u.exports=function(u){return _r(fr(u))}},2777:function(u,Xe,Wt){"use strict";var fr=Wt(9565),_r=Wt(34),wr=Wt(757),Ar=Wt(5966),Kr=Wt(4270),In=Wt(8227),no=TypeError,io=In("toPrimitive");u.exports=function(u,Xe){if(!_r(u)||wr(u))return u;var Wt,In=Ar(u,io);if(In){if(void 0===Xe&&(Xe="default"),Wt=fr(In,u,Xe),!_r(Wt)||wr(Wt))return Wt;throw new no("Can't convert object to primitive value")}return void 0===Xe&&(Xe="number"),Kr(u,Xe)}},6969:function(u,Xe,Wt){"use strict";var fr=Wt(2777),_r=Wt(757);u.exports=function(u){var Xe=fr(u,"string");return _r(Xe)?Xe:Xe+""}},2140:function(u,Xe,Wt){"use strict";var fr={};fr[Wt(8227)("toStringTag")]="z",u.exports="[object z]"===String(fr)},655:function(u,Xe,Wt){"use strict";var fr=Wt(6955),_r=String;u.exports=function(u){if("Symbol"===fr(u))throw new TypeError("Cannot convert a Symbol value to a string");return _r(u)}},6823:function(u){"use strict";var Xe=String;u.exports=function(u){try{return Xe(u)}catch(u){return"Object"}}},3392:function(u,Xe,Wt){"use strict";var fr=Wt(9504),_r=0,wr=Math.random(),Ar=fr(1..toString);u.exports=function(u){return"Symbol("+(void 0===u?"":u)+")_"+Ar(++_r+wr,36)}},7040:function(u,Xe,Wt){"use strict";var fr=Wt(4495);u.exports=fr&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},8686:function(u,Xe,Wt){"use strict";var fr=Wt(3724),_r=Wt(9039);u.exports=fr&&_r((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},2812:function(u){"use strict";var Xe=TypeError;u.exports=function(u,Wt){if(u<Wt)throw new Xe("Not enough arguments");return u}},8622:function(u,Xe,Wt){"use strict";var fr=Wt(4576),_r=Wt(4901),wr=fr.WeakMap;u.exports=_r(wr)&&/native code/.test(String(wr))},8227:function(u,Xe,Wt){"use strict";var fr=Wt(4576),_r=Wt(5745),wr=Wt(9297),Ar=Wt(3392),Kr=Wt(4495),In=Wt(7040),no=fr.Symbol,io=_r("wks"),oo=In?no.for||no:no&&no.withoutSetter||Ar;u.exports=function(u){return wr(io,u)||(io[u]=Kr&&wr(no,u)?no[u]:oo("Symbol."+u)),io[u]}},4603:function(u,Xe,Wt){"use strict";var fr=Wt(6840),_r=Wt(9504),wr=Wt(655),Ar=Wt(2812),Kr=URLSearchParams,In=Kr.prototype,no=_r(In.append),io=_r(In.delete),oo=_r(In.forEach),ao=_r([].push),so=new Kr("a=1&a=2&b=3");so.delete("a",1),so.delete("b",void 0),so+""!="a=2"&&fr(In,"delete",(function(u){var Xe=arguments.length,Wt=Xe<2?void 0:arguments[1];if(Xe&&void 0===Wt)return io(this,u);var fr=[];oo(this,(function(u,Xe){ao(fr,{key:Xe,value:u})})),Ar(Xe,1);for(var _r,Kr=wr(u),In=wr(Wt),so=0,co=0,ho=!1,go=fr.length;so<go;)_r=fr[so++],ho||_r.key===Kr?(ho=!0,io(this,_r.key)):co++;for(;co<go;)(_r=fr[co++]).key===Kr&&_r.value===In||no(this,_r.key,_r.value)}),{enumerable:!0,unsafe:!0})},7566:function(u,Xe,Wt){"use strict";var fr=Wt(6840),_r=Wt(9504),wr=Wt(655),Ar=Wt(2812),Kr=URLSearchParams,In=Kr.prototype,no=_r(In.getAll),io=_r(In.has),oo=new Kr("a=1");!oo.has("a",2)&&oo.has("a",void 0)||fr(In,"has",(function has(u){var Xe=arguments.length,Wt=Xe<2?void 0:arguments[1];if(Xe&&void 0===Wt)return io(this,u);var fr=no(this,u);Ar(Xe,1);for(var _r=wr(Wt),Kr=0;Kr<fr.length;)if(fr[Kr++]===_r)return!0;return!1}),{enumerable:!0,unsafe:!0})},8721:function(u,Xe,Wt){"use strict";var fr=Wt(3724),_r=Wt(9504),wr=Wt(2106),Ar=URLSearchParams.prototype,Kr=_r(Ar.forEach);fr&&!("size"in Ar)&&wr(Ar,"size",{get:function size(){var u=0;return Kr(this,(function(){u++})),u},configurable:!0,enumerable:!0})},6443:function(u){u.exports=function(){"use strict";var u={},Xe={};function define(Wt,fr,_r){if(Xe[Wt]=_r,"index"===Wt){var wr="var sharedModule = {}; ("+Xe.shared+")(sharedModule); ("+Xe.worker+")(sharedModule);",Ar={};return Xe.shared(Ar),Xe.index(u,Ar),"undefined"!=typeof window&&u.setWorkerUrl(window.URL.createObjectURL(new Blob([wr],{type:"text/javascript"}))),u}}return define("shared",["exports"],(function(u){function e(u,Xe,Wt,fr){return new(Wt||(Wt=Promise))((function(_r,wr){function a(u){try{l(fr.next(u))}catch(u){wr(u)}}function o(u){try{l(fr.throw(u))}catch(u){wr(u)}}function l(u){var Xe;u.done?_r(u.value):(Xe=u.value,Xe instanceof Wt?Xe:new Wt((function(u){u(Xe)}))).then(a,o)}l((fr=fr.apply(u,Xe||[])).next())}))}function r(u){return u&&u.__esModule&&Object.prototype.hasOwnProperty.call(u,"default")?u.default:u}"function"==typeof SuppressedError&&SuppressedError;var Xe=i;function i(u,Xe){this.x=u,this.y=Xe}i.prototype={clone:function(){return new i(this.x,this.y)},add:function(u){return this.clone()._add(u)},sub:function(u){return this.clone()._sub(u)},multByPoint:function(u){return this.clone()._multByPoint(u)},divByPoint:function(u){return this.clone()._divByPoint(u)},mult:function(u){return this.clone()._mult(u)},div:function(u){return this.clone()._div(u)},rotate:function(u){return this.clone()._rotate(u)},rotateAround:function(u,Xe){return this.clone()._rotateAround(u,Xe)},matMult:function(u){return this.clone()._matMult(u)},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(u){return this.x===u.x&&this.y===u.y},dist:function(u){return Math.sqrt(this.distSqr(u))},distSqr:function(u){var Xe=u.x-this.x,Wt=u.y-this.y;return Xe*Xe+Wt*Wt},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(u){return Math.atan2(this.y-u.y,this.x-u.x)},angleWith:function(u){return this.angleWithSep(u.x,u.y)},angleWithSep:function(u,Xe){return Math.atan2(this.x*Xe-this.y*u,this.x*u+this.y*Xe)},_matMult:function(u){var Xe=u[2]*this.x+u[3]*this.y;return this.x=u[0]*this.x+u[1]*this.y,this.y=Xe,this},_add:function(u){return this.x+=u.x,this.y+=u.y,this},_sub:function(u){return this.x-=u.x,this.y-=u.y,this},_mult:function(u){return this.x*=u,this.y*=u,this},_div:function(u){return this.x/=u,this.y/=u,this},_multByPoint:function(u){return this.x*=u.x,this.y*=u.y,this},_divByPoint:function(u){return this.x/=u.x,this.y/=u.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var u=this.y;return this.y=this.x,this.x=-u,this},_rotate:function(u){var Xe=Math.cos(u),Wt=Math.sin(u),fr=Wt*this.x+Xe*this.y;return this.x=Xe*this.x-Wt*this.y,this.y=fr,this},_rotateAround:function(u,Xe){var Wt=Math.cos(u),fr=Math.sin(u),_r=Xe.y+fr*(this.x-Xe.x)+Wt*(this.y-Xe.y);return this.x=Xe.x+Wt*(this.x-Xe.x)-fr*(this.y-Xe.y),this.y=_r,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},i.convert=function(u){return u instanceof i?u:Array.isArray(u)?new i(u[0],u[1]):u};var Wt=r(Xe),fr=o;function o(u,Xe,Wt,fr){this.cx=3*u,this.bx=3*(Wt-u)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*Xe,this.by=3*(fr-Xe)-this.cy,this.ay=1-this.cy-this.by,this.p1x=u,this.p1y=Xe,this.p2x=Wt,this.p2y=fr}o.prototype={sampleCurveX:function(u){return((this.ax*u+this.bx)*u+this.cx)*u},sampleCurveY:function(u){return((this.ay*u+this.by)*u+this.cy)*u},sampleCurveDerivativeX:function(u){return(3*this.ax*u+2*this.bx)*u+this.cx},solveCurveX:function(u,Xe){if(void 0===Xe&&(Xe=1e-6),u<0)return 0;if(u>1)return 1;for(var Wt=u,fr=0;fr<8;fr++){var _r=this.sampleCurveX(Wt)-u;if(Math.abs(_r)<Xe)return Wt;var wr=this.sampleCurveDerivativeX(Wt);if(Math.abs(wr)<1e-6)break;Wt-=_r/wr}var Ar=0,Kr=1;for(Wt=u,fr=0;fr<20&&(_r=this.sampleCurveX(Wt),!(Math.abs(_r-u)<Xe));fr++)u>_r?Ar=Wt:Kr=Wt,Wt=.5*(Kr-Ar)+Ar;return Wt},solve:function(u,Xe){return this.sampleCurveY(this.solveCurveX(u,Xe))}};var _r=r(fr);let wr,Ar;function h(){return null==wr&&(wr="undefined"!=typeof OffscreenCanvas&&new OffscreenCanvas(1,1).getContext("2d")&&"function"==typeof createImageBitmap),wr}function p(){if(null==Ar&&(Ar=!1,h())){const u=5,Xe=new OffscreenCanvas(u,u).getContext("2d",{willReadFrequently:!0});if(Xe){for(let Wt=0;Wt<u*u;Wt++){const fr=4*Wt;Xe.fillStyle=`rgb(${fr},${fr+1},${fr+2})`,Xe.fillRect(Wt%u,Math.floor(Wt/u),1,1)}const Wt=Xe.getImageData(0,0,u,u).data;for(let Xe=0;Xe<u*u*4;Xe++)if(Xe%4!=3&&Wt[Xe]!==Xe){Ar=!0;break}}}return Ar||!1}function f(u,Xe,Wt,fr){const wr=new _r(u,Xe,Wt,fr);return u=>wr.solve(u)}const Kr=f(.25,.1,.25,1);function y(u,Xe,Wt){return Math.min(Wt,Math.max(Xe,u))}function m(u,Xe,Wt){const fr=Wt-Xe,_r=((u-Xe)%fr+fr)%fr+Xe;return _r===Xe?Wt:_r}function g(u,...Xe){for(const Wt of Xe)for(const Xe in Wt)u[Xe]=Wt[Xe];return u}let In=1;function v(u,Xe,Wt){const fr={};for(const Wt in u)fr[Wt]=Xe.call(this,u[Wt],Wt,u);return fr}function b(u,Xe,Wt){const fr={};for(const Wt in u)Xe.call(this,u[Wt],Wt,u)&&(fr[Wt]=u[Wt]);return fr}function w(u){return Array.isArray(u)?u.map(w):"object"==typeof u&&u?v(u,w):u}const no={};function A(u){no[u]||("undefined"!=typeof console&&console.warn(u),no[u]=!0)}function S(u,Xe,Wt){return(Wt.y-u.y)*(Xe.x-u.x)>(Xe.y-u.y)*(Wt.x-u.x)}function k(u){return"undefined"!=typeof WorkerGlobalScope&&void 0!==u&&u instanceof WorkerGlobalScope}let io=null;function I(u){return"undefined"!=typeof ImageBitmap&&u instanceof ImageBitmap}const oo="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";function P(u,Xe,Wt,fr,_r){return e(this,void 0,void 0,(function*(){if("undefined"==typeof VideoFrame)throw new Error("VideoFrame not supported");const wr=new VideoFrame(u,{timestamp:0});try{const Ar=null==wr?void 0:wr.format;if(!Ar||!Ar.startsWith("BGR")&&!Ar.startsWith("RGB"))throw new Error(`Unrecognized format ${Ar}`);const Kr=Ar.startsWith("BGR"),In=new Uint8ClampedArray(fr*_r*4);if(yield wr.copyTo(In,function(u,Xe,Wt,fr,_r){const wr=4*Math.max(-Xe,0),Ar=(Math.max(0,Wt)-Wt)*fr*4+wr,Kr=4*fr,In=Math.max(0,Xe),no=Math.max(0,Wt);return{rect:{x:In,y:no,width:Math.min(u.width,Xe+fr)-In,height:Math.min(u.height,Wt+_r)-no},layout:[{offset:Ar,stride:Kr}]}}(u,Xe,Wt,fr,_r)),Kr)for(let u=0;u<In.length;u+=4){const Xe=In[u];In[u]=In[u+2],In[u+2]=Xe}return In}finally{wr.close()}}))}let ao,so;const co="AbortError";function E(){return new Error(co)}const ho={MAX_PARALLEL_IMAGE_REQUESTS:16,MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:8,MAX_TILE_CACHE_ZOOM_LEVELS:5,REGISTERED_PROTOCOLS:{},WORKER_URL:""};function T(u){return ho.REGISTERED_PROTOCOLS[u.substring(0,u.indexOf("://"))]}const go="global-dispatcher";class L extends Error{constructor(u,Xe,Wt,fr){super(`AJAXError: ${Xe} (${u}): ${Wt}`),this.status=u,this.statusText=Xe,this.url=Wt,this.body=fr}}const D=()=>k(self)?self.worker&&self.worker.referrer:("blob:"===window.location.protocol?window.parent:window).location.href,O=function(u,Xe){if(/:\/\//.test(u.url)&&!/^https?:|^file:/.test(u.url)){const Wt=T(u.url);if(Wt)return Wt(u,Xe);if(k(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:"GR",data:u,targetMapId:go},Xe)}if(!(/^file:/.test(Wt=u.url)||/^file:/.test(D())&&!/^\w+:/.test(Wt))){if(fetch&&Request&&AbortController&&Object.prototype.hasOwnProperty.call(Request.prototype,"signal"))return function(u,Xe){return e(this,void 0,void 0,(function*(){const Wt=new Request(u.url,{method:u.method||"GET",body:u.body,credentials:u.credentials,headers:u.headers,cache:u.cache,referrer:D(),signal:Xe.signal});"json"!==u.type||Wt.headers.has("Accept")||Wt.headers.set("Accept","application/json");const fr=yield fetch(Wt);if(!fr.ok){const Xe=yield fr.blob();throw new L(fr.status,fr.statusText,u.url,Xe)}let _r;_r="arrayBuffer"===u.type||"image"===u.type?fr.arrayBuffer():"json"===u.type?fr.json():fr.text();const wr=yield _r;if(Xe.signal.aborted)throw E();return{data:wr,cacheControl:fr.headers.get("Cache-Control"),expires:fr.headers.get("Expires")}}))}(u,Xe);if(k(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:"GR",data:u,mustQueue:!0,targetMapId:go},Xe)}var Wt;return function(u,Xe){return new Promise(((Wt,fr)=>{var _r;const wr=new XMLHttpRequest;wr.open(u.method||"GET",u.url,!0),"arrayBuffer"!==u.type&&"image"!==u.type||(wr.responseType="arraybuffer");for(const Xe in u.headers)wr.setRequestHeader(Xe,u.headers[Xe]);"json"===u.type&&(wr.responseType="text",(null===(_r=u.headers)||void 0===_r?void 0:_r.Accept)||wr.setRequestHeader("Accept","application/json")),wr.withCredentials="include"===u.credentials,wr.onerror=()=>{fr(new Error(wr.statusText))},wr.onload=()=>{if(!Xe.signal.aborted)if((wr.status>=200&&wr.status<300||0===wr.status)&&null!==wr.response){let Xe=wr.response;if("json"===u.type)try{Xe=JSON.parse(wr.response)}catch(u){return void fr(u)}Wt({data:Xe,cacheControl:wr.getResponseHeader("Cache-Control"),expires:wr.getResponseHeader("Expires")})}else{const Xe=new Blob([wr.response],{type:wr.getResponseHeader("Content-Type")});fr(new L(wr.status,wr.statusText,u.url,Xe))}},Xe.signal.addEventListener("abort",(()=>{wr.abort(),fr(E())})),wr.send(u.body)}))}(u,Xe)};function j(u){if(!u||u.indexOf("://")<=0||0===u.indexOf("data:image/")||0===u.indexOf("blob:"))return!0;const Xe=new URL(u),Wt=window.location;return Xe.protocol===Wt.protocol&&Xe.host===Wt.host}function R(u,Xe,Wt){Wt[u]&&-1!==Wt[u].indexOf(Xe)||(Wt[u]=Wt[u]||[],Wt[u].push(Xe))}function U(u,Xe,Wt){if(Wt&&Wt[u]){const fr=Wt[u].indexOf(Xe);-1!==fr&&Wt[u].splice(fr,1)}}class q{constructor(u,Xe={}){g(this,Xe),this.type=u}}class N extends q{constructor(u,Xe={}){super("error",g({error:u},Xe))}}class Z{on(u,Xe){return this._listeners=this._listeners||{},R(u,Xe,this._listeners),this}off(u,Xe){return U(u,Xe,this._listeners),U(u,Xe,this._oneTimeListeners),this}once(u,Xe){return Xe?(this._oneTimeListeners=this._oneTimeListeners||{},R(u,Xe,this._oneTimeListeners),this):new Promise((Xe=>this.once(u,Xe)))}fire(u,Xe){"string"==typeof u&&(u=new q(u,Xe||{}));const Wt=u.type;if(this.listens(Wt)){u.target=this;const Xe=this._listeners&&this._listeners[Wt]?this._listeners[Wt].slice():[];for(const Wt of Xe)Wt.call(this,u);const fr=this._oneTimeListeners&&this._oneTimeListeners[Wt]?this._oneTimeListeners[Wt].slice():[];for(const Xe of fr)U(Wt,Xe,this._oneTimeListeners),Xe.call(this,u);const _r=this._eventedParent;_r&&(g(u,"function"==typeof this._eventedParentData?this._eventedParentData():this._eventedParentData),_r.fire(u))}else u instanceof N&&console.error(u.error);return this}listens(u){return this._listeners&&this._listeners[u]&&this._listeners[u].length>0||this._oneTimeListeners&&this._oneTimeListeners[u]&&this._oneTimeListeners[u].length>0||this._eventedParent&&this._eventedParent.listens(u)}setEventedParent(u,Xe){return this._eventedParent=u,this._eventedParentData=Xe,this}}var xo={$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 ko=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function X(u,Xe){const Wt={};for(const Xe in u)"ref"!==Xe&&(Wt[Xe]=u[Xe]);return ko.forEach((u=>{u in Xe&&(Wt[u]=Xe[u])})),Wt}function H(u,Xe){if(Array.isArray(u)){if(!Array.isArray(Xe)||u.length!==Xe.length)return!1;for(let Wt=0;Wt<u.length;Wt++)if(!H(u[Wt],Xe[Wt]))return!1;return!0}if("object"==typeof u&&null!==u&&null!==Xe){if("object"!=typeof Xe)return!1;if(Object.keys(u).length!==Object.keys(Xe).length)return!1;for(const Wt in u)if(!H(u[Wt],Xe[Wt]))return!1;return!0}return u===Xe}function Y(u,Xe){u.push(Xe)}function J(u,Xe,Wt){Y(Wt,{command:"addSource",args:[u,Xe[u]]})}function W(u,Xe,Wt){Y(Xe,{command:"removeSource",args:[u]}),Wt[u]=!0}function Q(u,Xe,Wt,fr){W(u,Wt,fr),J(u,Xe,Wt)}function tt(u,Xe,Wt){let fr;for(fr in u[Wt])if(Object.prototype.hasOwnProperty.call(u[Wt],fr)&&"data"!==fr&&!H(u[Wt][fr],Xe[Wt][fr]))return!1;for(fr in Xe[Wt])if(Object.prototype.hasOwnProperty.call(Xe[Wt],fr)&&"data"!==fr&&!H(u[Wt][fr],Xe[Wt][fr]))return!1;return!0}function et(u,Xe,Wt,fr,_r,wr){u=u||{},Xe=Xe||{};for(const Ar in u)Object.prototype.hasOwnProperty.call(u,Ar)&&(H(u[Ar],Xe[Ar])||Wt.push({command:wr,args:[fr,Ar,Xe[Ar],_r]}));for(const Ar in Xe)Object.prototype.hasOwnProperty.call(Xe,Ar)&&!Object.prototype.hasOwnProperty.call(u,Ar)&&(H(u[Ar],Xe[Ar])||Wt.push({command:wr,args:[fr,Ar,Xe[Ar],_r]}))}function rt(u){return u.id}function nt(u,Xe){return u[Xe.id]=Xe,u}class it{constructor(u,Xe,Wt,fr){this.message=(u?`${u}: `:"")+Wt,fr&&(this.identifier=fr),null!=Xe&&Xe.__line__&&(this.line=Xe.__line__)}}function st(u,...Xe){for(const Wt of Xe)for(const Xe in Wt)u[Xe]=Wt[Xe];return u}class at extends Error{constructor(u,Xe){super(Xe),this.message=Xe,this.key=u}}class ot{constructor(u,Xe=[]){this.parent=u,this.bindings={};for(const[u,Wt]of Xe)this.bindings[u]=Wt}concat(u){return new ot(this,u)}get(u){if(this.bindings[u])return this.bindings[u];if(this.parent)return this.parent.get(u);throw new Error(`${u} not found in scope.`)}has(u){return!!this.bindings[u]||!!this.parent&&this.parent.has(u)}}const Co={kind:"null"},Io={kind:"number"},zo={kind:"string"},Bo={kind:"boolean"},ca={kind:"color"},ua={kind:"object"},Da={kind:"value"},ns={kind:"collator"},yl={kind:"formatted"},vl={kind:"padding"},kl={kind:"resolvedImage"},Al={kind:"variableAnchorOffsetCollection"};function bt(u,Xe){return{kind:"array",itemType:u,N:Xe}}function wt(u){if("array"===u.kind){const Xe=wt(u.itemType);return"number"==typeof u.N?`array<${Xe}, ${u.N}>`:"value"===u.itemType.kind?"array":`array<${Xe}>`}return u.kind}const Ml=[Co,Io,zo,Bo,ca,yl,ua,bt(Da),vl,kl,Al];function At(u,Xe){if("error"===Xe.kind)return null;if("array"===u.kind){if("array"===Xe.kind&&(0===Xe.N&&"value"===Xe.itemType.kind||!At(u.itemType,Xe.itemType))&&("number"!=typeof u.N||u.N===Xe.N))return null}else{if(u.kind===Xe.kind)return null;if("value"===u.kind)for(const u of Ml)if(!At(u,Xe))return null}return`Expected ${wt(u)} but found ${wt(Xe)} instead.`}function St(u,Xe){return Xe.some((Xe=>Xe.kind===u.kind))}function kt(u,Xe){return Xe.some((Xe=>"null"===Xe?null===u:"array"===Xe?Array.isArray(u):"object"===Xe?u&&!Array.isArray(u)&&"object"==typeof u:Xe===typeof u))}function Mt(u,Xe){return"array"===u.kind&&"array"===Xe.kind?u.itemType.kind===Xe.itemType.kind&&"number"==typeof u.N:u.kind===Xe.kind}const Rl=.96422,Ol=.82521,Ll=4/29,Dl=6/29,Bl=3*Dl*Dl,Nl=Dl*Dl*Dl,Vl=Math.PI/180,Ul=180/Math.PI;function Tt(u){return(u%=360)<0&&(u+=360),u}function $t([u,Xe,Wt,fr]){let _r,wr;const Ar=Dt((.2225045*(u=Lt(u))+.7168786*(Xe=Lt(Xe))+.0606169*(Wt=Lt(Wt)))/1);u===Xe&&Xe===Wt?_r=wr=Ar:(_r=Dt((.4360747*u+.3850649*Xe+.1430804*Wt)/Rl),wr=Dt((.0139322*u+.0971045*Xe+.7141733*Wt)/Ol));const Kr=116*Ar-16;return[Kr<0?0:Kr,500*(_r-Ar),200*(Ar-wr),fr]}function Lt(u){return u<=.04045?u/12.92:Math.pow((u+.055)/1.055,2.4)}function Dt(u){return u>Nl?Math.pow(u,1/3):u/Bl+Ll}function Ot([u,Xe,Wt,fr]){let _r=(u+16)/116,wr=isNaN(Xe)?_r:_r+Xe/500,Ar=isNaN(Wt)?_r:_r-Wt/200;return _r=1*Rt(_r),wr=Rl*Rt(wr),Ar=Ol*Rt(Ar),[jt(3.1338561*wr-1.6168667*_r-.4906146*Ar),jt(-.9787684*wr+1.9161415*_r+.033454*Ar),jt(.0719453*wr-.2289914*_r+1.4052427*Ar),fr]}function jt(u){return(u=u<=.00304?12.92*u:1.055*Math.pow(u,1/2.4)-.055)<0?0:u>1?1:u}function Rt(u){return u>Dl?u*u*u:Bl*(u-Ll)}function Ut(u){return parseInt(u.padEnd(2,u),16)/255}function qt(u,Xe){return Nt(Xe?u/100:u,0,1)}function Nt(u,Xe,Wt){return Math.min(Math.max(Xe,u),Wt)}function Zt(u){return!u.some(Number.isNaN)}const $l={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 Kt{constructor(u,Xe,Wt,fr=1,_r=!0){this.r=u,this.g=Xe,this.b=Wt,this.a=fr,_r||(this.r*=fr,this.g*=fr,this.b*=fr,fr||this.overwriteGetter("rgb",[u,Xe,Wt,fr]))}static parse(u){if(u instanceof Kt)return u;if("string"!=typeof u)return;const Xe=function(u){if("transparent"===(u=u.toLowerCase().trim()))return[0,0,0,0];const Xe=$l[u];if(Xe){const[u,Wt,fr]=Xe;return[u/255,Wt/255,fr/255,1]}if(u.startsWith("#")&&/^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/.test(u)){const Xe=u.length<6?1:2;let Wt=1;return[Ut(u.slice(Wt,Wt+=Xe)),Ut(u.slice(Wt,Wt+=Xe)),Ut(u.slice(Wt,Wt+=Xe)),Ut(u.slice(Wt,Wt+Xe)||"ff")]}if(u.startsWith("rgb")){const Xe=u.match(/^rgba?\(\s*([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(Xe){const[u,Wt,fr,_r,wr,Ar,Kr,In,no,io,oo,ao]=Xe,so=[_r||" ",Kr||" ",io].join("");if(" "===so||" /"===so||",,"===so||",,,"===so){const u=[fr,Ar,no].join(""),Xe="%%%"===u?100:""===u?255:0;if(Xe){const u=[Nt(+Wt/Xe,0,1),Nt(+wr/Xe,0,1),Nt(+In/Xe,0,1),oo?qt(+oo,ao):1];if(Zt(u))return u}}return}}const Wt=u.match(/^hsla?\(\s*([\de.+-]+)(?:deg)?(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(Wt){const[u,Xe,fr,_r,wr,Ar,Kr,In,no]=Wt,io=[fr||" ",wr||" ",Kr].join("");if(" "===io||" /"===io||",,"===io||",,,"===io){const u=[+Xe,Nt(+_r,0,100),Nt(+Ar,0,100),In?qt(+In,no):1];if(Zt(u))return function([u,Xe,Wt,fr]){function i(fr){const _r=(fr+u/30)%12,wr=Xe*Math.min(Wt,1-Wt);return Wt-wr*Math.max(-1,Math.min(_r-3,9-_r,1))}return u=Tt(u),Xe/=100,Wt/=100,[i(0),i(8),i(4),fr]}(u)}}}(u);return Xe?new Kt(...Xe,!1):void 0}get rgb(){const{r:u,g:Xe,b:Wt,a:fr}=this,_r=fr||1/0;return this.overwriteGetter("rgb",[u/_r,Xe/_r,Wt/_r,fr])}get hcl(){return this.overwriteGetter("hcl",function(u){const[Xe,Wt,fr,_r]=$t(u),wr=Math.sqrt(Wt*Wt+fr*fr);return[Math.round(1e4*wr)?Tt(Math.atan2(fr,Wt)*Ul):NaN,wr,Xe,_r]}(this.rgb))}get lab(){return this.overwriteGetter("lab",$t(this.rgb))}overwriteGetter(u,Xe){return Object.defineProperty(this,u,{value:Xe}),Xe}toString(){const[u,Xe,Wt,fr]=this.rgb;return`rgba(${[u,Xe,Wt].map((u=>Math.round(255*u))).join(",")},${fr})`}}Kt.black=new Kt(0,0,0,1),Kt.white=new Kt(1,1,1,1),Kt.transparent=new Kt(0,0,0,0),Kt.red=new Kt(1,0,0,1);class Xt{constructor(u,Xe,Wt){this.sensitivity=u?Xe?"variant":"case":Xe?"accent":"base",this.locale=Wt,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}compare(u,Xe){return this.collator.compare(u,Xe)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}}class Ht{constructor(u,Xe,Wt,fr,_r){this.text=u,this.image=Xe,this.scale=Wt,this.fontStack=fr,this.textColor=_r}}class Yt{constructor(u){this.sections=u}static fromString(u){return new Yt([new Ht(u,null,null,null,null)])}isEmpty(){return 0===this.sections.length||!this.sections.some((u=>0!==u.text.length||u.image&&0!==u.image.name.length))}static factory(u){return u instanceof Yt?u:Yt.fromString(u)}toString(){return 0===this.sections.length?"":this.sections.map((u=>u.text)).join("")}}class Jt{constructor(u){this.values=u.slice()}static parse(u){if(u instanceof Jt)return u;if("number"==typeof u)return new Jt([u,u,u,u]);if(Array.isArray(u)&&!(u.length<1||u.length>4)){for(const Xe of u)if("number"!=typeof Xe)return;switch(u.length){case 1:u=[u[0],u[0],u[0],u[0]];break;case 2:u=[u[0],u[1],u[0],u[1]];break;case 3:u=[u[0],u[1],u[2],u[1]]}return new Jt(u)}}toString(){return JSON.stringify(this.values)}}const Wl=new Set(["center","left","right","top","bottom","top-left","top-right","bottom-left","bottom-right"]);class Qt{constructor(u){this.values=u.slice()}static parse(u){if(u instanceof Qt)return u;if(Array.isArray(u)&&!(u.length<1)&&u.length%2==0){for(let Xe=0;Xe<u.length;Xe+=2){const Wt=u[Xe],fr=u[Xe+1];if("string"!=typeof Wt||!Wl.has(Wt))return;if(!Array.isArray(fr)||2!==fr.length||"number"!=typeof fr[0]||"number"!=typeof fr[1])return}return new Qt(u)}}toString(){return JSON.stringify(this.values)}}class te{constructor(u){this.name=u.name,this.available=u.available}toString(){return this.name}static fromString(u){return u?new te({name:u,available:!1}):null}}function ee(u,Xe,Wt,fr){return"number"==typeof u&&u>=0&&u<=255&&"number"==typeof Xe&&Xe>=0&&Xe<=255&&"number"==typeof Wt&&Wt>=0&&Wt<=255?void 0===fr||"number"==typeof fr&&fr>=0&&fr<=1?null:`Invalid rgba value [${[u,Xe,Wt,fr].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${("number"==typeof fr?[u,Xe,Wt,fr]:[u,Xe,Wt]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function re(u){if(null===u||"string"==typeof u||"boolean"==typeof u||"number"==typeof u||u instanceof Kt||u instanceof Xt||u instanceof Yt||u instanceof Jt||u instanceof Qt||u instanceof te)return!0;if(Array.isArray(u)){for(const Xe of u)if(!re(Xe))return!1;return!0}if("object"==typeof u){for(const Xe in u)if(!re(u[Xe]))return!1;return!0}return!1}function ne(u){if(null===u)return Co;if("string"==typeof u)return zo;if("boolean"==typeof u)return Bo;if("number"==typeof u)return Io;if(u instanceof Kt)return ca;if(u instanceof Xt)return ns;if(u instanceof Yt)return yl;if(u instanceof Jt)return vl;if(u instanceof Qt)return Al;if(u instanceof te)return kl;if(Array.isArray(u)){const Xe=u.length;let Wt;for(const Xe of u){const u=ne(Xe);if(Wt){if(Wt===u)continue;Wt=Da;break}Wt=u}return bt(Wt||Da,Xe)}return ua}function ie(u){const Xe=typeof u;return null===u?"":"string"===Xe||"number"===Xe||"boolean"===Xe?String(u):u instanceof Kt||u instanceof Yt||u instanceof Jt||u instanceof Qt||u instanceof te?u.toString():JSON.stringify(u)}class se{constructor(u,Xe){this.type=u,this.value=Xe}static parse(u,Xe){if(2!==u.length)return Xe.error(`'literal' expression requires exactly one argument, but found ${u.length-1} instead.`);if(!re(u[1]))return Xe.error("invalid value");const Wt=u[1];let fr=ne(Wt);const _r=Xe.expectedType;return"array"!==fr.kind||0!==fr.N||!_r||"array"!==_r.kind||"number"==typeof _r.N&&0!==_r.N||(fr=_r),new se(fr,Wt)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}}class ae{constructor(u){this.name="ExpressionEvaluationError",this.message=u}toJSON(){return this.message}}const Zl={string:zo,number:Io,boolean:Bo,object:ua};class le{constructor(u,Xe){this.type=u,this.args=Xe}static parse(u,Xe){if(u.length<2)return Xe.error("Expected at least one argument.");let Wt,fr=1;const _r=u[0];if("array"===_r){let _r,wr;if(u.length>2){const Wt=u[1];if("string"!=typeof Wt||!(Wt in Zl)||"object"===Wt)return Xe.error('The item type argument of "array" must be one of string, number, boolean',1);_r=Zl[Wt],fr++}else _r=Da;if(u.length>3){if(null!==u[2]&&("number"!=typeof u[2]||u[2]<0||u[2]!==Math.floor(u[2])))return Xe.error('The length argument to "array" must be a positive integer literal',2);wr=u[2],fr++}Wt=bt(_r,wr)}else{if(!Zl[_r])throw new Error(`Types doesn't contain name = ${_r}`);Wt=Zl[_r]}const wr=[];for(;fr<u.length;fr++){const Wt=Xe.parse(u[fr],fr,Da);if(!Wt)return null;wr.push(Wt)}return new le(Wt,wr)}evaluate(u){for(let Xe=0;Xe<this.args.length;Xe++){const Wt=this.args[Xe].evaluate(u);if(!At(this.type,ne(Wt)))return Wt;if(Xe===this.args.length-1)throw new ae(`Expected value to be of type ${wt(this.type)}, but found ${wt(ne(Wt))} instead.`)}throw new Error}eachChild(u){this.args.forEach(u)}outputDefined(){return this.args.every((u=>u.outputDefined()))}}const Gl={"to-boolean":Bo,"to-color":ca,"to-number":Io,"to-string":zo};class ce{constructor(u,Xe){this.type=u,this.args=Xe}static parse(u,Xe){if(u.length<2)return Xe.error("Expected at least one argument.");const Wt=u[0];if(!Gl[Wt])throw new Error(`Can't parse ${Wt} as it is not part of the known types`);if(("to-boolean"===Wt||"to-string"===Wt)&&2!==u.length)return Xe.error("Expected one argument.");const fr=Gl[Wt],_r=[];for(let Wt=1;Wt<u.length;Wt++){const fr=Xe.parse(u[Wt],Wt,Da);if(!fr)return null;_r.push(fr)}return new ce(fr,_r)}evaluate(u){switch(this.type.kind){case"boolean":return Boolean(this.args[0].evaluate(u));case"color":{let Xe,Wt;for(const fr of this.args){if(Xe=fr.evaluate(u),Wt=null,Xe instanceof Kt)return Xe;if("string"==typeof Xe){const Wt=u.parseColor(Xe);if(Wt)return Wt}else if(Array.isArray(Xe)&&(Wt=Xe.length<3||Xe.length>4?`Invalid rbga value ${JSON.stringify(Xe)}: expected an array containing either three or four numeric values.`:ee(Xe[0],Xe[1],Xe[2],Xe[3]),!Wt))return new Kt(Xe[0]/255,Xe[1]/255,Xe[2]/255,Xe[3])}throw new ae(Wt||`Could not parse color from value '${"string"==typeof Xe?Xe:JSON.stringify(Xe)}'`)}case"padding":{let Xe;for(const Wt of this.args){Xe=Wt.evaluate(u);const fr=Jt.parse(Xe);if(fr)return fr}throw new ae(`Could not parse padding from value '${"string"==typeof Xe?Xe:JSON.stringify(Xe)}'`)}case"variableAnchorOffsetCollection":{let Xe;for(const Wt of this.args){Xe=Wt.evaluate(u);const fr=Qt.parse(Xe);if(fr)return fr}throw new ae(`Could not parse variableAnchorOffsetCollection from value '${"string"==typeof Xe?Xe:JSON.stringify(Xe)}'`)}case"number":{let Xe=null;for(const Wt of this.args){if(Xe=Wt.evaluate(u),null===Xe)return 0;const fr=Number(Xe);if(!isNaN(fr))return fr}throw new ae(`Could not convert ${JSON.stringify(Xe)} to number.`)}case"formatted":return Yt.fromString(ie(this.args[0].evaluate(u)));case"resolvedImage":return te.fromString(ie(this.args[0].evaluate(u)));default:return ie(this.args[0].evaluate(u))}}eachChild(u){this.args.forEach(u)}outputDefined(){return this.args.every((u=>u.outputDefined()))}}const Xl=["Unknown","Point","LineString","Polygon"];class pe{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?"number"==typeof this.feature.type?Xl[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(u){let Xe=this._parseColorCache[u];return Xe||(Xe=this._parseColorCache[u]=Kt.parse(u)),Xe}}class fe{constructor(u,Xe,Wt=[],fr,_r=new ot,wr=[]){this.registry=u,this.path=Wt,this.key=Wt.map((u=>`[${u}]`)).join(""),this.scope=_r,this.errors=wr,this.expectedType=fr,this._isConstant=Xe}parse(u,Xe,Wt,fr,_r={}){return Xe?this.concat(Xe,Wt,fr)._parse(u,_r):this._parse(u,_r)}_parse(u,Xe){function r(u,Xe,Wt){return"assert"===Wt?new le(Xe,[u]):"coerce"===Wt?new ce(Xe,[u]):u}if(null!==u&&"string"!=typeof u&&"boolean"!=typeof u&&"number"!=typeof u||(u=["literal",u]),Array.isArray(u)){if(0===u.length)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');const Wt=u[0];if("string"!=typeof Wt)return this.error(`Expression name must be a string, but found ${typeof Wt} instead. If you wanted a literal array, use ["literal", [...]].`,0),null;const fr=this.registry[Wt];if(fr){let Wt=fr.parse(u,this);if(!Wt)return null;if(this.expectedType){const u=this.expectedType,fr=Wt.type;if("string"!==u.kind&&"number"!==u.kind&&"boolean"!==u.kind&&"object"!==u.kind&&"array"!==u.kind||"value"!==fr.kind)if("color"!==u.kind&&"formatted"!==u.kind&&"resolvedImage"!==u.kind||"value"!==fr.kind&&"string"!==fr.kind)if("padding"!==u.kind||"value"!==fr.kind&&"number"!==fr.kind&&"array"!==fr.kind)if("variableAnchorOffsetCollection"!==u.kind||"value"!==fr.kind&&"array"!==fr.kind){if(this.checkSubtype(u,fr))return null}else Wt=r(Wt,u,Xe.typeAnnotation||"coerce");else Wt=r(Wt,u,Xe.typeAnnotation||"coerce");else Wt=r(Wt,u,Xe.typeAnnotation||"coerce");else Wt=r(Wt,u,Xe.typeAnnotation||"assert")}if(!(Wt instanceof se)&&"resolvedImage"!==Wt.type.kind&&this._isConstant(Wt)){const Xe=new pe;try{Wt=new se(Wt.type,Wt.evaluate(Xe))}catch(u){return this.error(u.message),null}}return Wt}return this.error(`Unknown expression "${Wt}". If you wanted a literal array, use ["literal", [...]].`,0)}return this.error(void 0===u?"'undefined' value invalid. Use null instead.":"object"==typeof u?'Bare objects invalid. Use ["literal", {...}] instead.':`Expected an array, but found ${typeof u} instead.`)}concat(u,Xe,Wt){const fr="number"==typeof u?this.path.concat(u):this.path,_r=Wt?this.scope.concat(Wt):this.scope;return new fe(this.registry,this._isConstant,fr,Xe||null,_r,this.errors)}error(u,...Xe){const Wt=`${this.key}${Xe.map((u=>`[${u}]`)).join("")}`;this.errors.push(new at(Wt,u))}checkSubtype(u,Xe){const Wt=At(u,Xe);return Wt&&this.error(Wt),Wt}}class de{constructor(u,Xe){this.type=Xe.type,this.bindings=[].concat(u),this.result=Xe}evaluate(u){return this.result.evaluate(u)}eachChild(u){for(const Xe of this.bindings)u(Xe[1]);u(this.result)}static parse(u,Xe){if(u.length<4)return Xe.error(`Expected at least 3 arguments, but found ${u.length-1} instead.`);const Wt=[];for(let fr=1;fr<u.length-1;fr+=2){const _r=u[fr];if("string"!=typeof _r)return Xe.error(`Expected string, but found ${typeof _r} instead.`,fr);if(/[^a-zA-Z0-9_]/.test(_r))return Xe.error("Variable names must contain only alphanumeric characters or '_'.",fr);const wr=Xe.parse(u[fr+1],fr+1);if(!wr)return null;Wt.push([_r,wr])}const fr=Xe.parse(u[u.length-1],u.length-1,Xe.expectedType,Wt);return fr?new de(Wt,fr):null}outputDefined(){return this.result.outputDefined()}}class ye{constructor(u,Xe){this.type=Xe.type,this.name=u,this.boundExpression=Xe}static parse(u,Xe){if(2!==u.length||"string"!=typeof u[1])return Xe.error("'var' expression requires exactly one string literal argument.");const Wt=u[1];return Xe.scope.has(Wt)?new ye(Wt,Xe.scope.get(Wt)):Xe.error(`Unknown variable "${Wt}". Make sure "${Wt}" has been bound in an enclosing "let" expression before using it.`,1)}evaluate(u){return this.boundExpression.evaluate(u)}eachChild(){}outputDefined(){return!1}}class me{constructor(u,Xe,Wt){this.type=u,this.index=Xe,this.input=Wt}static parse(u,Xe){if(3!==u.length)return Xe.error(`Expected 2 arguments, but found ${u.length-1} instead.`);const Wt=Xe.parse(u[1],1,Io),fr=Xe.parse(u[2],2,bt(Xe.expectedType||Da));return Wt&&fr?new me(fr.type.itemType,Wt,fr):null}evaluate(u){const Xe=this.index.evaluate(u),Wt=this.input.evaluate(u);if(Xe<0)throw new ae(`Array index out of bounds: ${Xe} < 0.`);if(Xe>=Wt.length)throw new ae(`Array index out of bounds: ${Xe} > ${Wt.length-1}.`);if(Xe!==Math.floor(Xe))throw new ae(`Array index must be an integer, but found ${Xe} instead.`);return Wt[Xe]}eachChild(u){u(this.index),u(this.input)}outputDefined(){return!1}}class ge{constructor(u,Xe){this.type=Bo,this.needle=u,this.haystack=Xe}static parse(u,Xe){if(3!==u.length)return Xe.error(`Expected 2 arguments, but found ${u.length-1} instead.`);const Wt=Xe.parse(u[1],1,Da),fr=Xe.parse(u[2],2,Da);return Wt&&fr?St(Wt.type,[Bo,zo,Io,Co,Da])?new ge(Wt,fr):Xe.error(`Expected first argument to be of type boolean, string, number or null, but found ${wt(Wt.type)} instead`):null}evaluate(u){const Xe=this.needle.evaluate(u),Wt=this.haystack.evaluate(u);if(!Wt)return!1;if(!kt(Xe,["boolean","string","number","null"]))throw new ae(`Expected first argument to be of type boolean, string, number or null, but found ${wt(ne(Xe))} instead.`);if(!kt(Wt,["string","array"]))throw new ae(`Expected second argument to be of type array or string, but found ${wt(ne(Wt))} instead.`);return Wt.indexOf(Xe)>=0}eachChild(u){u(this.needle),u(this.haystack)}outputDefined(){return!0}}class xe{constructor(u,Xe,Wt){this.type=Io,this.needle=u,this.haystack=Xe,this.fromIndex=Wt}static parse(u,Xe){if(u.length<=2||u.length>=5)return Xe.error(`Expected 3 or 4 arguments, but found ${u.length-1} instead.`);const Wt=Xe.parse(u[1],1,Da),fr=Xe.parse(u[2],2,Da);if(!Wt||!fr)return null;if(!St(Wt.type,[Bo,zo,Io,Co,Da]))return Xe.error(`Expected first argument to be of type boolean, string, number or null, but found ${wt(Wt.type)} instead`);if(4===u.length){const _r=Xe.parse(u[3],3,Io);return _r?new xe(Wt,fr,_r):null}return new xe(Wt,fr)}evaluate(u){const Xe=this.needle.evaluate(u),Wt=this.haystack.evaluate(u);if(!kt(Xe,["boolean","string","number","null"]))throw new ae(`Expected first argument to be of type boolean, string, number or null, but found ${wt(ne(Xe))} instead.`);let fr;if(this.fromIndex&&(fr=this.fromIndex.evaluate(u)),kt(Wt,["string"])){const u=Wt.indexOf(Xe,fr);return-1===u?-1:[...Wt.slice(0,u)].length}if(kt(Wt,["array"]))return Wt.indexOf(Xe,fr);throw new ae(`Expected second argument to be of type array or string, but found ${wt(ne(Wt))} instead.`)}eachChild(u){u(this.needle),u(this.haystack),this.fromIndex&&u(this.fromIndex)}outputDefined(){return!1}}class ve{constructor(u,Xe,Wt,fr,_r,wr){this.inputType=u,this.type=Xe,this.input=Wt,this.cases=fr,this.outputs=_r,this.otherwise=wr}static parse(u,Xe){if(u.length<5)return Xe.error(`Expected at least 4 arguments, but found only ${u.length-1}.`);if(u.length%2!=1)return Xe.error("Expected an even number of arguments.");let Wt,fr;Xe.expectedType&&"value"!==Xe.expectedType.kind&&(fr=Xe.expectedType);const _r={},wr=[];for(let Ar=2;Ar<u.length-1;Ar+=2){let Kr=u[Ar];const In=u[Ar+1];Array.isArray(Kr)||(Kr=[Kr]);const no=Xe.concat(Ar);if(0===Kr.length)return no.error("Expected at least one branch label.");for(const u of Kr){if("number"!=typeof u&&"string"!=typeof u)return no.error("Branch labels must be numbers or strings.");if("number"==typeof u&&Math.abs(u)>Number.MAX_SAFE_INTEGER)return no.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);if("number"==typeof u&&Math.floor(u)!==u)return no.error("Numeric branch labels must be integer values.");if(Wt){if(no.checkSubtype(Wt,ne(u)))return null}else Wt=ne(u);if(void 0!==_r[String(u)])return no.error("Branch labels must be unique.");_r[String(u)]=wr.length}const io=Xe.parse(In,Ar,fr);if(!io)return null;fr=fr||io.type,wr.push(io)}const Ar=Xe.parse(u[1],1,Da);if(!Ar)return null;const Kr=Xe.parse(u[u.length-1],u.length-1,fr);return Kr?"value"!==Ar.type.kind&&Xe.concat(1).checkSubtype(Wt,Ar.type)?null:new ve(Wt,fr,Ar,_r,wr,Kr):null}evaluate(u){const Xe=this.input.evaluate(u);return(ne(Xe)===this.inputType&&this.outputs[this.cases[Xe]]||this.otherwise).evaluate(u)}eachChild(u){u(this.input),this.outputs.forEach(u),u(this.otherwise)}outputDefined(){return this.outputs.every((u=>u.outputDefined()))&&this.otherwise.outputDefined()}}class be{constructor(u,Xe,Wt){this.type=u,this.branches=Xe,this.otherwise=Wt}static parse(u,Xe){if(u.length<4)return Xe.error(`Expected at least 3 arguments, but found only ${u.length-1}.`);if(u.length%2!=0)return Xe.error("Expected an odd number of arguments.");let Wt;Xe.expectedType&&"value"!==Xe.expectedType.kind&&(Wt=Xe.expectedType);const fr=[];for(let _r=1;_r<u.length-1;_r+=2){const wr=Xe.parse(u[_r],_r,Bo);if(!wr)return null;const Ar=Xe.parse(u[_r+1],_r+1,Wt);if(!Ar)return null;fr.push([wr,Ar]),Wt=Wt||Ar.type}const _r=Xe.parse(u[u.length-1],u.length-1,Wt);if(!_r)return null;if(!Wt)throw new Error("Can't infer output type");return new be(Wt,fr,_r)}evaluate(u){for(const[Xe,Wt]of this.branches)if(Xe.evaluate(u))return Wt.evaluate(u);return this.otherwise.evaluate(u)}eachChild(u){for(const[Xe,Wt]of this.branches)u(Xe),u(Wt);u(this.otherwise)}outputDefined(){return this.branches.every((([u,Xe])=>Xe.outputDefined()))&&this.otherwise.outputDefined()}}class we{constructor(u,Xe,Wt,fr){this.type=u,this.input=Xe,this.beginIndex=Wt,this.endIndex=fr}static parse(u,Xe){if(u.length<=2||u.length>=5)return Xe.error(`Expected 3 or 4 arguments, but found ${u.length-1} instead.`);const Wt=Xe.parse(u[1],1,Da),fr=Xe.parse(u[2],2,Io);if(!Wt||!fr)return null;if(!St(Wt.type,[bt(Da),zo,Da]))return Xe.error(`Expected first argument to be of type array or string, but found ${wt(Wt.type)} instead`);if(4===u.length){const _r=Xe.parse(u[3],3,Io);return _r?new we(Wt.type,Wt,fr,_r):null}return new we(Wt.type,Wt,fr)}evaluate(u){const Xe=this.input.evaluate(u),Wt=this.beginIndex.evaluate(u);let fr;if(this.endIndex&&(fr=this.endIndex.evaluate(u)),kt(Xe,["string"]))return[...Xe].slice(Wt,fr).join("");if(kt(Xe,["array"]))return Xe.slice(Wt,fr);throw new ae(`Expected first argument to be of type array or string, but found ${wt(ne(Xe))} instead.`)}eachChild(u){u(this.input),u(this.beginIndex),this.endIndex&&u(this.endIndex)}outputDefined(){return!1}}function _e(u,Xe){const Wt=u.length-1;let fr,_r,wr=0,Ar=Wt,Kr=0;for(;wr<=Ar;)if(Kr=Math.floor((wr+Ar)/2),fr=u[Kr],_r=u[Kr+1],fr<=Xe){if(Kr===Wt||Xe<_r)return Kr;wr=Kr+1}else{if(!(fr>Xe))throw new ae("Input is not a number.");Ar=Kr-1}return 0}class Ae{constructor(u,Xe,Wt){this.type=u,this.input=Xe,this.labels=[],this.outputs=[];for(const[u,Xe]of Wt)this.labels.push(u),this.outputs.push(Xe)}static parse(u,Xe){if(u.length-1<4)return Xe.error(`Expected at least 4 arguments, but found only ${u.length-1}.`);if((u.length-1)%2!=0)return Xe.error("Expected an even number of arguments.");const Wt=Xe.parse(u[1],1,Io);if(!Wt)return null;const fr=[];let _r=null;Xe.expectedType&&"value"!==Xe.expectedType.kind&&(_r=Xe.expectedType);for(let Wt=1;Wt<u.length;Wt+=2){const wr=1===Wt?-1/0:u[Wt],Ar=u[Wt+1],Kr=Wt,In=Wt+1;if("number"!=typeof wr)return Xe.error('Input/output pairs for "step" expressions must be defined using literal numeric values (not computed expressions) for the input values.',Kr);if(fr.length&&fr[fr.length-1][0]>=wr)return Xe.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',Kr);const no=Xe.parse(Ar,In,_r);if(!no)return null;_r=_r||no.type,fr.push([wr,no])}return new Ae(_r,Wt,fr)}evaluate(u){const Xe=this.labels,Wt=this.outputs;if(1===Xe.length)return Wt[0].evaluate(u);const fr=this.input.evaluate(u);if(fr<=Xe[0])return Wt[0].evaluate(u);const _r=Xe.length;return fr>=Xe[_r-1]?Wt[_r-1].evaluate(u):Wt[_e(Xe,fr)].evaluate(u)}eachChild(u){u(this.input);for(const Xe of this.outputs)u(Xe)}outputDefined(){return this.outputs.every((u=>u.outputDefined()))}}function Se(u){return u&&u.__esModule&&Object.prototype.hasOwnProperty.call(u,"default")?u.default:u}var Jl=Me;function Me(u,Xe,Wt,fr){this.cx=3*u,this.bx=3*(Wt-u)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*Xe,this.by=3*(fr-Xe)-this.cy,this.ay=1-this.cy-this.by,this.p1x=u,this.p1y=Xe,this.p2x=Wt,this.p2y=fr}Me.prototype={sampleCurveX:function(u){return((this.ax*u+this.bx)*u+this.cx)*u},sampleCurveY:function(u){return((this.ay*u+this.by)*u+this.cy)*u},sampleCurveDerivativeX:function(u){return(3*this.ax*u+2*this.bx)*u+this.cx},solveCurveX:function(u,Xe){if(void 0===Xe&&(Xe=1e-6),u<0)return 0;if(u>1)return 1;for(var Wt=u,fr=0;fr<8;fr++){var _r=this.sampleCurveX(Wt)-u;if(Math.abs(_r)<Xe)return Wt;var wr=this.sampleCurveDerivativeX(Wt);if(Math.abs(wr)<1e-6)break;Wt-=_r/wr}var Ar=0,Kr=1;for(Wt=u,fr=0;fr<20&&(_r=this.sampleCurveX(Wt),!(Math.abs(_r-u)<Xe));fr++)u>_r?Ar=Wt:Kr=Wt,Wt=.5*(Kr-Ar)+Ar;return Wt},solve:function(u,Xe){return this.sampleCurveY(this.solveCurveX(u,Xe))}};var Ql=Se(Jl);function ze(u,Xe,Wt){return u+Wt*(Xe-u)}function Pe(u,Xe,Wt){return u.map(((u,fr)=>ze(u,Xe[fr],Wt)))}const rc={number:ze,color:function(u,Xe,Wt,fr="rgb"){switch(fr){case"rgb":{const[fr,_r,wr,Ar]=Pe(u.rgb,Xe.rgb,Wt);return new Kt(fr,_r,wr,Ar,!1)}case"hcl":{const[fr,_r,wr,Ar]=u.hcl,[Kr,In,no,io]=Xe.hcl;let oo,ao;if(isNaN(fr)||isNaN(Kr))isNaN(fr)?isNaN(Kr)?oo=NaN:(oo=Kr,1!==wr&&0!==wr||(ao=In)):(oo=fr,1!==no&&0!==no||(ao=_r));else{let u=Kr-fr;Kr>fr&&u>180?u-=360:Kr<fr&&fr-Kr>180&&(u+=360),oo=fr+Wt*u}const[so,co,ho,go]=function([u,Xe,Wt,fr]){return u=isNaN(u)?0:u*Vl,Ot([Wt,Math.cos(u)*Xe,Math.sin(u)*Xe,fr])}([oo,null!=ao?ao:ze(_r,In,Wt),ze(wr,no,Wt),ze(Ar,io,Wt)]);return new Kt(so,co,ho,go,!1)}case"lab":{const[fr,_r,wr,Ar]=Ot(Pe(u.lab,Xe.lab,Wt));return new Kt(fr,_r,wr,Ar,!1)}}},array:Pe,padding:function(u,Xe,Wt){return new Jt(Pe(u.values,Xe.values,Wt))},variableAnchorOffsetCollection:function(u,Xe,Wt){const fr=u.values,_r=Xe.values;if(fr.length!==_r.length)throw new ae(`Cannot interpolate values of different length. from: ${u.toString()}, to: ${Xe.toString()}`);const wr=[];for(let u=0;u<fr.length;u+=2){if(fr[u]!==_r[u])throw new ae(`Cannot interpolate values containing mismatched anchors. from[${u}]: ${fr[u]}, to[${u}]: ${_r[u]}`);wr.push(fr[u]);const[Xe,Ar]=fr[u+1],[Kr,In]=_r[u+1];wr.push([ze(Xe,Kr,Wt),ze(Ar,In,Wt)])}return new Qt(wr)}};class Be{constructor(u,Xe,Wt,fr,_r){this.type=u,this.operator=Xe,this.interpolation=Wt,this.input=fr,this.labels=[],this.outputs=[];for(const[u,Xe]of _r)this.labels.push(u),this.outputs.push(Xe)}static interpolationFactor(u,Xe,Wt,fr){let _r=0;if("exponential"===u.name)_r=Ve(Xe,u.base,Wt,fr);else if("linear"===u.name)_r=Ve(Xe,1,Wt,fr);else if("cubic-bezier"===u.name){const wr=u.controlPoints;_r=new Ql(wr[0],wr[1],wr[2],wr[3]).solve(Ve(Xe,1,Wt,fr))}return _r}static parse(u,Xe){let[Wt,fr,_r,...wr]=u;if(!Array.isArray(fr)||0===fr.length)return Xe.error("Expected an interpolation type expression.",1);if("linear"===fr[0])fr={name:"linear"};else if("exponential"===fr[0]){const u=fr[1];if("number"!=typeof u)return Xe.error("Exponential interpolation requires a numeric base.",1,1);fr={name:"exponential",base:u}}else{if("cubic-bezier"!==fr[0])return Xe.error(`Unknown interpolation type ${String(fr[0])}`,1,0);{const u=fr.slice(1);if(4!==u.length||u.some((u=>"number"!=typeof u||u<0||u>1)))return Xe.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);fr={name:"cubic-bezier",controlPoints:u}}}if(u.length-1<4)return Xe.error(`Expected at least 4 arguments, but found only ${u.length-1}.`);if((u.length-1)%2!=0)return Xe.error("Expected an even number of arguments.");if(_r=Xe.parse(_r,2,Io),!_r)return null;const Ar=[];let Kr=null;"interpolate-hcl"===Wt||"interpolate-lab"===Wt?Kr=ca:Xe.expectedType&&"value"!==Xe.expectedType.kind&&(Kr=Xe.expectedType);for(let u=0;u<wr.length;u+=2){const Wt=wr[u],fr=wr[u+1],_r=u+3,In=u+4;if("number"!=typeof Wt)return Xe.error('Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not computed expressions) for the input values.',_r);if(Ar.length&&Ar[Ar.length-1][0]>=Wt)return Xe.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',_r);const no=Xe.parse(fr,In,Kr);if(!no)return null;Kr=Kr||no.type,Ar.push([Wt,no])}return Mt(Kr,Io)||Mt(Kr,ca)||Mt(Kr,vl)||Mt(Kr,Al)||Mt(Kr,bt(Io))?new Be(Kr,Wt,fr,_r,Ar):Xe.error(`Type ${wt(Kr)} is not interpolatable.`)}evaluate(u){const Xe=this.labels,Wt=this.outputs;if(1===Xe.length)return Wt[0].evaluate(u);const fr=this.input.evaluate(u);if(fr<=Xe[0])return Wt[0].evaluate(u);const _r=Xe.length;if(fr>=Xe[_r-1])return Wt[_r-1].evaluate(u);const wr=_e(Xe,fr),Ar=Be.interpolationFactor(this.interpolation,fr,Xe[wr],Xe[wr+1]),Kr=Wt[wr].evaluate(u),In=Wt[wr+1].evaluate(u);switch(this.operator){case"interpolate":return rc[this.type.kind](Kr,In,Ar);case"interpolate-hcl":return rc.color(Kr,In,Ar,"hcl");case"interpolate-lab":return rc.color(Kr,In,Ar,"lab")}}eachChild(u){u(this.input);for(const Xe of this.outputs)u(Xe)}outputDefined(){return this.outputs.every((u=>u.outputDefined()))}}function Ve(u,Xe,Wt,fr){const _r=fr-Wt,wr=u-Wt;return 0===_r?0:1===Xe?wr/_r:(Math.pow(Xe,wr)-1)/(Math.pow(Xe,_r)-1)}class Ee{constructor(u,Xe){this.type=u,this.args=Xe}static parse(u,Xe){if(u.length<2)return Xe.error("Expectected at least one argument.");let Wt=null;const fr=Xe.expectedType;fr&&"value"!==fr.kind&&(Wt=fr);const _r=[];for(const fr of u.slice(1)){const u=Xe.parse(fr,1+_r.length,Wt,void 0,{typeAnnotation:"omit"});if(!u)return null;Wt=Wt||u.type,_r.push(u)}if(!Wt)throw new Error("No output type");const wr=fr&&_r.some((u=>At(fr,u.type)));return new Ee(wr?Da:Wt,_r)}evaluate(u){let Xe,Wt=null,fr=0;for(const _r of this.args)if(fr++,Wt=_r.evaluate(u),Wt&&Wt instanceof te&&!Wt.available&&(Xe||(Xe=Wt.name),Wt=null,fr===this.args.length&&(Wt=Xe)),null!==Wt)break;return Wt}eachChild(u){this.args.forEach(u)}outputDefined(){return this.args.every((u=>u.outputDefined()))}}function Fe(u,Xe){return"=="===u||"!="===u?"boolean"===Xe.kind||"string"===Xe.kind||"number"===Xe.kind||"null"===Xe.kind||"value"===Xe.kind:"string"===Xe.kind||"number"===Xe.kind||"value"===Xe.kind}function Te(u,Xe,Wt,fr){return 0===fr.compare(Xe,Wt)}function $e(u,Xe,Wt){const fr="=="!==u&&"!="!==u;return class i{constructor(u,Xe,Wt){this.type=Bo,this.lhs=u,this.rhs=Xe,this.collator=Wt,this.hasUntypedArgument="value"===u.type.kind||"value"===Xe.type.kind}static parse(u,Xe){if(3!==u.length&&4!==u.length)return Xe.error("Expected two or three arguments.");const Wt=u[0];let _r=Xe.parse(u[1],1,Da);if(!_r)return null;if(!Fe(Wt,_r.type))return Xe.concat(1).error(`"${Wt}" comparisons are not supported for type '${wt(_r.type)}'.`);let wr=Xe.parse(u[2],2,Da);if(!wr)return null;if(!Fe(Wt,wr.type))return Xe.concat(2).error(`"${Wt}" comparisons are not supported for type '${wt(wr.type)}'.`);if(_r.type.kind!==wr.type.kind&&"value"!==_r.type.kind&&"value"!==wr.type.kind)return Xe.error(`Cannot compare types '${wt(_r.type)}' and '${wt(wr.type)}'.`);fr&&("value"===_r.type.kind&&"value"!==wr.type.kind?_r=new le(wr.type,[_r]):"value"!==_r.type.kind&&"value"===wr.type.kind&&(wr=new le(_r.type,[wr])));let Ar=null;if(4===u.length){if("string"!==_r.type.kind&&"string"!==wr.type.kind&&"value"!==_r.type.kind&&"value"!==wr.type.kind)return Xe.error("Cannot use collator to compare non-string types.");if(Ar=Xe.parse(u[3],3,ns),!Ar)return null}return new i(_r,wr,Ar)}evaluate(_r){const wr=this.lhs.evaluate(_r),Ar=this.rhs.evaluate(_r);if(fr&&this.hasUntypedArgument){const Xe=ne(wr),Wt=ne(Ar);if(Xe.kind!==Wt.kind||"string"!==Xe.kind&&"number"!==Xe.kind)throw new ae(`Expected arguments for "${u}" to be (string, string) or (number, number), but found (${Xe.kind}, ${Wt.kind}) instead.`)}if(this.collator&&!fr&&this.hasUntypedArgument){const u=ne(wr),Wt=ne(Ar);if("string"!==u.kind||"string"!==Wt.kind)return Xe(_r,wr,Ar)}return this.collator?Wt(_r,wr,Ar,this.collator.evaluate(_r)):Xe(_r,wr,Ar)}eachChild(u){u(this.lhs),u(this.rhs),this.collator&&u(this.collator)}outputDefined(){return!0}}}const ic=$e("==",(function(u,Xe,Wt){return Xe===Wt}),Te),oc=$e("!=",(function(u,Xe,Wt){return Xe!==Wt}),(function(u,Xe,Wt,fr){return!Te(0,Xe,Wt,fr)})),lc=$e("<",(function(u,Xe,Wt){return Xe<Wt}),(function(u,Xe,Wt,fr){return fr.compare(Xe,Wt)<0})),gc=$e(">",(function(u,Xe,Wt){return Xe>Wt}),(function(u,Xe,Wt,fr){return fr.compare(Xe,Wt)>0})),bc=$e("<=",(function(u,Xe,Wt){return Xe<=Wt}),(function(u,Xe,Wt,fr){return fr.compare(Xe,Wt)<=0})),eu=$e(">=",(function(u,Xe,Wt){return Xe>=Wt}),(function(u,Xe,Wt,fr){return fr.compare(Xe,Wt)>=0}));class qe{constructor(u,Xe,Wt){this.type=ns,this.locale=Wt,this.caseSensitive=u,this.diacriticSensitive=Xe}static parse(u,Xe){if(2!==u.length)return Xe.error("Expected one argument.");const Wt=u[1];if("object"!=typeof Wt||Array.isArray(Wt))return Xe.error("Collator options argument must be an object.");const fr=Xe.parse(void 0!==Wt["case-sensitive"]&&Wt["case-sensitive"],1,Bo);if(!fr)return null;const _r=Xe.parse(void 0!==Wt["diacritic-sensitive"]&&Wt["diacritic-sensitive"],1,Bo);if(!_r)return null;let wr=null;return Wt.locale&&(wr=Xe.parse(Wt.locale,1,zo),!wr)?null:new qe(fr,_r,wr)}evaluate(u){return new Xt(this.caseSensitive.evaluate(u),this.diacriticSensitive.evaluate(u),this.locale?this.locale.evaluate(u):null)}eachChild(u){u(this.caseSensitive),u(this.diacriticSensitive),this.locale&&u(this.locale)}outputDefined(){return!1}}class Ne{constructor(u,Xe,Wt,fr,_r){this.type=zo,this.number=u,this.locale=Xe,this.currency=Wt,this.minFractionDigits=fr,this.maxFractionDigits=_r}static parse(u,Xe){if(3!==u.length)return Xe.error("Expected two arguments.");const Wt=Xe.parse(u[1],1,Io);if(!Wt)return null;const fr=u[2];if("object"!=typeof fr||Array.isArray(fr))return Xe.error("NumberFormat options argument must be an object.");let _r=null;if(fr.locale&&(_r=Xe.parse(fr.locale,1,zo),!_r))return null;let wr=null;if(fr.currency&&(wr=Xe.parse(fr.currency,1,zo),!wr))return null;let Ar=null;if(fr["min-fraction-digits"]&&(Ar=Xe.parse(fr["min-fraction-digits"],1,Io),!Ar))return null;let Kr=null;return fr["max-fraction-digits"]&&(Kr=Xe.parse(fr["max-fraction-digits"],1,Io),!Kr)?null:new Ne(Wt,_r,wr,Ar,Kr)}evaluate(u){return new Intl.NumberFormat(this.locale?this.locale.evaluate(u):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(u):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(u):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(u):void 0}).format(this.number.evaluate(u))}eachChild(u){u(this.number),this.locale&&u(this.locale),this.currency&&u(this.currency),this.minFractionDigits&&u(this.minFractionDigits),this.maxFractionDigits&&u(this.maxFractionDigits)}outputDefined(){return!1}}class Ze{constructor(u){this.type=yl,this.sections=u}static parse(u,Xe){if(u.length<2)return Xe.error("Expected at least one argument.");const Wt=u[1];if(!Array.isArray(Wt)&&"object"==typeof Wt)return Xe.error("First argument must be an image or text section.");const fr=[];let _r=!1;for(let Wt=1;Wt<=u.length-1;++Wt){const wr=u[Wt];if(_r&&"object"==typeof wr&&!Array.isArray(wr)){_r=!1;let u=null;if(wr["font-scale"]&&(u=Xe.parse(wr["font-scale"],1,Io),!u))return null;let Wt=null;if(wr["text-font"]&&(Wt=Xe.parse(wr["text-font"],1,bt(zo)),!Wt))return null;let Ar=null;if(wr["text-color"]&&(Ar=Xe.parse(wr["text-color"],1,ca),!Ar))return null;const Kr=fr[fr.length-1];Kr.scale=u,Kr.font=Wt,Kr.textColor=Ar}else{const wr=Xe.parse(u[Wt],1,Da);if(!wr)return null;const Ar=wr.type.kind;if("string"!==Ar&&"value"!==Ar&&"null"!==Ar&&"resolvedImage"!==Ar)return Xe.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");_r=!0,fr.push({content:wr,scale:null,font:null,textColor:null})}}return new Ze(fr)}evaluate(u){return new Yt(this.sections.map((Xe=>{const Wt=Xe.content.evaluate(u);return ne(Wt)===kl?new Ht("",Wt,null,null,null):new Ht(ie(Wt),null,Xe.scale?Xe.scale.evaluate(u):null,Xe.font?Xe.font.evaluate(u).join(","):null,Xe.textColor?Xe.textColor.evaluate(u):null)})))}eachChild(u){for(const Xe of this.sections)u(Xe.content),Xe.scale&&u(Xe.scale),Xe.font&&u(Xe.font),Xe.textColor&&u(Xe.textColor)}outputDefined(){return!1}}class Ge{constructor(u){this.type=kl,this.input=u}static parse(u,Xe){if(2!==u.length)return Xe.error("Expected two arguments.");const Wt=Xe.parse(u[1],1,zo);return Wt?new Ge(Wt):Xe.error("No image name provided.")}evaluate(u){const Xe=this.input.evaluate(u),Wt=te.fromString(Xe);return Wt&&u.availableImages&&(Wt.available=u.availableImages.indexOf(Xe)>-1),Wt}eachChild(u){u(this.input)}outputDefined(){return!1}}class Ke{constructor(u){this.type=Io,this.input=u}static parse(u,Xe){if(2!==u.length)return Xe.error(`Expected 1 argument, but found ${u.length-1} instead.`);const Wt=Xe.parse(u[1],1);return Wt?"array"!==Wt.type.kind&&"string"!==Wt.type.kind&&"value"!==Wt.type.kind?Xe.error(`Expected argument of type string or array, but found ${wt(Wt.type)} instead.`):new Ke(Wt):null}evaluate(u){const Xe=this.input.evaluate(u);if("string"==typeof Xe)return[...Xe].length;if(Array.isArray(Xe))return Xe.length;throw new ae(`Expected value to be of type string or array, but found ${wt(ne(Xe))} instead.`)}eachChild(u){u(this.input)}outputDefined(){return!1}}const tu=8192;function He(u,Xe){const Wt=(180+u[0])/360,fr=(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+u[1]*Math.PI/360)))/360,_r=Math.pow(2,Xe.z);return[Math.round(Wt*_r*tu),Math.round(fr*_r*tu)]}function Ye(u,Xe){const Wt=Math.pow(2,Xe.z);return[(_r=(u[0]/tu+Xe.x)/Wt,360*_r-180),(fr=(u[1]/tu+Xe.y)/Wt,360/Math.PI*Math.atan(Math.exp((180-360*fr)*Math.PI/180))-90)];var fr,_r}function Je(u,Xe){u[0]=Math.min(u[0],Xe[0]),u[1]=Math.min(u[1],Xe[1]),u[2]=Math.max(u[2],Xe[0]),u[3]=Math.max(u[3],Xe[1])}function We(u,Xe){return!(u[0]<=Xe[0]||u[2]>=Xe[2]||u[1]<=Xe[1]||u[3]>=Xe[3])}function Qe(u,Xe,Wt){const fr=u[0]-Xe[0],_r=u[1]-Xe[1],wr=u[0]-Wt[0],Ar=u[1]-Wt[1];return fr*Ar-wr*_r==0&&fr*wr<=0&&_r*Ar<=0}function tr(u,Xe,Wt,fr){return 0!=(_r=[fr[0]-Wt[0],fr[1]-Wt[1]])[0]*(wr=[Xe[0]-u[0],Xe[1]-u[1]])[1]-_r[1]*wr[0]&&!(!ar(u,Xe,Wt,fr)||!ar(Wt,fr,u,Xe));var _r,wr}function er(u,Xe,Wt){for(const fr of Wt)for(let Wt=0;Wt<fr.length-1;++Wt)if(tr(u,Xe,fr[Wt],fr[Wt+1]))return!0;return!1}function rr(u,Xe,Wt=!1){let fr=!1;for(const Kr of Xe)for(let Xe=0;Xe<Kr.length-1;Xe++){if(Qe(u,Kr[Xe],Kr[Xe+1]))return Wt;(wr=Kr[Xe])[1]>(_r=u)[1]!=(Ar=Kr[Xe+1])[1]>_r[1]&&_r[0]<(Ar[0]-wr[0])*(_r[1]-wr[1])/(Ar[1]-wr[1])+wr[0]&&(fr=!fr)}var _r,wr,Ar;return fr}function nr(u,Xe){for(const Wt of Xe)if(rr(u,Wt))return!0;return!1}function ir(u,Xe){for(const Wt of u)if(!rr(Wt,Xe))return!1;for(let Wt=0;Wt<u.length-1;++Wt)if(er(u[Wt],u[Wt+1],Xe))return!1;return!0}function sr(u,Xe){for(const Wt of Xe)if(ir(u,Wt))return!0;return!1}function ar(u,Xe,Wt,fr){const _r=fr[0]-Wt[0],wr=fr[1]-Wt[1],Ar=(u[0]-Wt[0])*wr-_r*(u[1]-Wt[1]),Kr=(Xe[0]-Wt[0])*wr-_r*(Xe[1]-Wt[1]);return Ar>0&&Kr<0||Ar<0&&Kr>0}function or(u,Xe,Wt){const fr=[];for(let _r=0;_r<u.length;_r++){const wr=[];for(let fr=0;fr<u[_r].length;fr++){const Ar=He(u[_r][fr],Wt);Je(Xe,Ar),wr.push(Ar)}fr.push(wr)}return fr}function lr(u,Xe,Wt){const fr=[];for(let _r=0;_r<u.length;_r++){const wr=or(u[_r],Xe,Wt);fr.push(wr)}return fr}function ur(u,Xe,Wt,fr){if(u[0]<Wt[0]||u[0]>Wt[2]){const Xe=.5*fr;let _r=u[0]-Wt[0]>Xe?-fr:Wt[0]-u[0]>Xe?fr:0;0===_r&&(_r=u[0]-Wt[2]>Xe?-fr:Wt[2]-u[0]>Xe?fr:0),u[0]+=_r}Je(Xe,u)}function cr(u,Xe,Wt,fr){const _r=Math.pow(2,fr.z)*tu,wr=[fr.x*tu,fr.y*tu],Ar=[];for(const fr of u)for(const u of fr){const fr=[u.x+wr[0],u.y+wr[1]];ur(fr,Xe,Wt,_r),Ar.push(fr)}return Ar}function hr(u,Xe,Wt,fr){const _r=Math.pow(2,fr.z)*tu,wr=[fr.x*tu,fr.y*tu],Ar=[];for(const Wt of u){const u=[];for(const fr of Wt){const Wt=[fr.x+wr[0],fr.y+wr[1]];Je(Xe,Wt),u.push(Wt)}Ar.push(u)}if(Xe[2]-Xe[0]<=_r/2){(Kr=Xe)[0]=Kr[1]=1/0,Kr[2]=Kr[3]=-1/0;for(const u of Ar)for(const fr of u)ur(fr,Xe,Wt,_r)}var Kr;return Ar}class pr{constructor(u,Xe){this.type=Bo,this.geojson=u,this.geometries=Xe}static parse(u,Xe){if(2!==u.length)return Xe.error(`'within' expression requires exactly one argument, but found ${u.length-1} instead.`);if(re(u[1])){const Xe=u[1];if("FeatureCollection"===Xe.type){const u=[];for(const Wt of Xe.features){const{type:Xe,coordinates:fr}=Wt.geometry;"Polygon"===Xe&&u.push(fr),"MultiPolygon"===Xe&&u.push(...fr)}if(u.length)return new pr(Xe,{type:"MultiPolygon",coordinates:u})}else if("Feature"===Xe.type){const u=Xe.geometry.type;if("Polygon"===u||"MultiPolygon"===u)return new pr(Xe,Xe.geometry)}else if("Polygon"===Xe.type||"MultiPolygon"===Xe.type)return new pr(Xe,Xe)}return Xe.error("'within' expression requires valid geojson object that contains polygon geometry type.")}evaluate(u){if(null!=u.geometry()&&null!=u.canonicalID()){if("Point"===u.geometryType())return function(u,Xe){const Wt=[1/0,1/0,-1/0,-1/0],fr=[1/0,1/0,-1/0,-1/0],_r=u.canonicalID();if("Polygon"===Xe.type){const wr=or(Xe.coordinates,fr,_r),Ar=cr(u.geometry(),Wt,fr,_r);if(!We(Wt,fr))return!1;for(const u of Ar)if(!rr(u,wr))return!1}if("MultiPolygon"===Xe.type){const wr=lr(Xe.coordinates,fr,_r),Ar=cr(u.geometry(),Wt,fr,_r);if(!We(Wt,fr))return!1;for(const u of Ar)if(!nr(u,wr))return!1}return!0}(u,this.geometries);if("LineString"===u.geometryType())return function(u,Xe){const Wt=[1/0,1/0,-1/0,-1/0],fr=[1/0,1/0,-1/0,-1/0],_r=u.canonicalID();if("Polygon"===Xe.type){const wr=or(Xe.coordinates,fr,_r),Ar=hr(u.geometry(),Wt,fr,_r);if(!We(Wt,fr))return!1;for(const u of Ar)if(!ir(u,wr))return!1}if("MultiPolygon"===Xe.type){const wr=lr(Xe.coordinates,fr,_r),Ar=hr(u.geometry(),Wt,fr,_r);if(!We(Wt,fr))return!1;for(const u of Ar)if(!sr(u,wr))return!1}return!0}(u,this.geometries)}return!1}eachChild(){}outputDefined(){return!0}}let nu=class{constructor(u=[],Xe=(u,Xe)=>u<Xe?-1:u>Xe?1:0){if(this.data=u,this.length=this.data.length,this.compare=Xe,this.length>0)for(let u=(this.length>>1)-1;u>=0;u--)this._down(u)}push(u){this.data.push(u),this._up(this.length++)}pop(){if(0===this.length)return;const u=this.data[0],Xe=this.data.pop();return--this.length>0&&(this.data[0]=Xe,this._down(0)),u}peek(){return this.data[0]}_up(u){const{data:Xe,compare:Wt}=this,fr=Xe[u];for(;u>0;){const _r=u-1>>1,wr=Xe[_r];if(Wt(fr,wr)>=0)break;Xe[u]=wr,u=_r}Xe[u]=fr}_down(u){const{data:Xe,compare:Wt}=this,fr=this.length>>1,_r=Xe[u];for(;u<fr;){let fr=1+(u<<1);const wr=fr+1;if(wr<this.length&&Wt(Xe[wr],Xe[fr])<0&&(fr=wr),Wt(Xe[fr],_r)>=0)break;Xe[u]=Xe[fr],u=fr}Xe[u]=_r}};function dr(u,Xe,Wt,fr,_r){yr(u,Xe,Wt,fr||u.length-1,_r||gr)}function yr(u,Xe,Wt,fr,_r){for(;fr>Wt;){if(fr-Wt>600){var wr=fr-Wt+1,Ar=Xe-Wt+1,Kr=Math.log(wr),In=.5*Math.exp(2*Kr/3),no=.5*Math.sqrt(Kr*In*(wr-In)/wr)*(Ar-wr/2<0?-1:1);yr(u,Xe,Math.max(Wt,Math.floor(Xe-Ar*In/wr+no)),Math.min(fr,Math.floor(Xe+(wr-Ar)*In/wr+no)),_r)}var io=u[Xe],oo=Wt,ao=fr;for(mr(u,Wt,Xe),_r(u[fr],io)>0&&mr(u,Wt,fr);oo<ao;){for(mr(u,oo,ao),oo++,ao--;_r(u[oo],io)<0;)oo++;for(;_r(u[ao],io)>0;)ao--}0===_r(u[Wt],io)?mr(u,Wt,ao):mr(u,++ao,fr),ao<=Xe&&(Wt=ao+1),Xe<=ao&&(fr=ao-1)}}function mr(u,Xe,Wt){var fr=u[Xe];u[Xe]=u[Wt],u[Wt]=fr}function gr(u,Xe){return u<Xe?-1:u>Xe?1:0}function xr(u,Xe){if(u.length<=1)return[u];const Wt=[];let fr,_r;for(const Xe of u){const u=br(Xe);0!==u&&(Xe.area=Math.abs(u),void 0===_r&&(_r=u<0),_r===u<0?(fr&&Wt.push(fr),fr=[Xe]):fr.push(Xe))}if(fr&&Wt.push(fr),Xe>1)for(let u=0;u<Wt.length;u++)Wt[u].length<=Xe||(dr(Wt[u],Xe,1,Wt[u].length-1,vr),Wt[u]=Wt[u].slice(0,Xe));return Wt}function vr(u,Xe){return Xe.area-u.area}function br(u){let Xe=0;for(let Wt,fr,_r=0,wr=u.length,Ar=wr-1;_r<wr;Ar=_r++)Wt=u[_r],fr=u[Ar],Xe+=(fr.x-Wt.x)*(Wt.y+fr.y);return Xe}const iu=1/298.257223563,su=iu*(2-iu),cu=Math.PI/180;class Sr{constructor(u){const Xe=6378.137*cu*1e3,Wt=Math.cos(u*cu),fr=1/(1-su*(1-Wt*Wt)),_r=Math.sqrt(fr);this.kx=Xe*_r*Wt,this.ky=Xe*_r*fr*(1-su)}distance(u,Xe){const Wt=this.wrap(u[0]-Xe[0])*this.kx,fr=(u[1]-Xe[1])*this.ky;return Math.sqrt(Wt*Wt+fr*fr)}pointOnLine(u,Xe){let Wt,fr,_r,wr,Ar=1/0;for(let Kr=0;Kr<u.length-1;Kr++){let In=u[Kr][0],no=u[Kr][1],io=this.wrap(u[Kr+1][0]-In)*this.kx,oo=(u[Kr+1][1]-no)*this.ky,ao=0;0===io&&0===oo||(ao=(this.wrap(Xe[0]-In)*this.kx*io+(Xe[1]-no)*this.ky*oo)/(io*io+oo*oo),ao>1?(In=u[Kr+1][0],no=u[Kr+1][1]):ao>0&&(In+=io/this.kx*ao,no+=oo/this.ky*ao)),io=this.wrap(Xe[0]-In)*this.kx,oo=(Xe[1]-no)*this.ky;const so=io*io+oo*oo;so<Ar&&(Ar=so,Wt=In,fr=no,_r=Kr,wr=ao)}return{point:[Wt,fr],index:_r,t:Math.max(0,Math.min(1,wr))}}wrap(u){for(;u<-180;)u+=360;for(;u>180;)u-=360;return u}}function kr(u,Xe){return Xe[0]-u[0]}function Mr(u){return u[1]-u[0]+1}function Ir(u,Xe){return u[1]>=u[0]&&u[1]<Xe}function zr(u,Xe){if(u[0]>u[1])return[null,null];const Wt=Mr(u);if(Xe){if(2===Wt)return[u,null];const Xe=Math.floor(Wt/2);return[[u[0],u[0]+Xe],[u[0]+Xe,u[1]]]}if(1===Wt)return[u,null];const fr=Math.floor(Wt/2)-1;return[[u[0],u[0]+fr],[u[0]+fr+1,u[1]]]}function Pr(u,Xe){if(!Ir(Xe,u.length))return[1/0,1/0,-1/0,-1/0];const Wt=[1/0,1/0,-1/0,-1/0];for(let fr=Xe[0];fr<=Xe[1];++fr)Je(Wt,u[fr]);return Wt}function Cr(u){const Xe=[1/0,1/0,-1/0,-1/0];for(const Wt of u)for(const u of Wt)Je(Xe,u);return Xe}function Br(u){return u[0]!==-1/0&&u[1]!==-1/0&&u[2]!==1/0&&u[3]!==1/0}function Vr(u,Xe,Wt){if(!Br(u)||!Br(Xe))return NaN;let fr=0,_r=0;return u[2]<Xe[0]&&(fr=Xe[0]-u[2]),u[0]>Xe[2]&&(fr=u[0]-Xe[2]),u[1]>Xe[3]&&(_r=u[1]-Xe[3]),u[3]<Xe[1]&&(_r=Xe[1]-u[3]),Wt.distance([0,0],[fr,_r])}function Er(u,Xe,Wt){const fr=Wt.pointOnLine(Xe,u);return Wt.distance(u,fr.point)}function Fr(u,Xe,Wt,fr,_r){const wr=Math.min(Er(u,[Wt,fr],_r),Er(Xe,[Wt,fr],_r)),Ar=Math.min(Er(Wt,[u,Xe],_r),Er(fr,[u,Xe],_r));return Math.min(wr,Ar)}function Tr(u,Xe,Wt,fr,_r){if(!Ir(Xe,u.length)||!Ir(fr,Wt.length))return 1/0;let wr=1/0;for(let Ar=Xe[0];Ar<Xe[1];++Ar){const Xe=u[Ar],Kr=u[Ar+1];for(let u=fr[0];u<fr[1];++u){const fr=Wt[u],Ar=Wt[u+1];if(tr(Xe,Kr,fr,Ar))return 0;wr=Math.min(wr,Fr(Xe,Kr,fr,Ar,_r))}}return wr}function $r(u,Xe,Wt,fr,_r){if(!Ir(Xe,u.length)||!Ir(fr,Wt.length))return NaN;let wr=1/0;for(let Ar=Xe[0];Ar<=Xe[1];++Ar)for(let Xe=fr[0];Xe<=fr[1];++Xe)if(wr=Math.min(wr,_r.distance(u[Ar],Wt[Xe])),0===wr)return wr;return wr}function Lr(u,Xe,Wt){if(rr(u,Xe,!0))return 0;let fr=1/0;for(const _r of Xe){const Xe=_r[0],wr=_r[_r.length-1];if(Xe!==wr&&(fr=Math.min(fr,Er(u,[wr,Xe],Wt)),0===fr))return fr;const Ar=Wt.pointOnLine(_r,u);if(fr=Math.min(fr,Wt.distance(u,Ar.point)),0===fr)return fr}return fr}function Dr(u,Xe,Wt,fr){if(!Ir(Xe,u.length))return NaN;for(let fr=Xe[0];fr<=Xe[1];++fr)if(rr(u[fr],Wt,!0))return 0;let _r=1/0;for(let wr=Xe[0];wr<Xe[1];++wr){const Xe=u[wr],Ar=u[wr+1];for(const u of Wt)for(let Wt=0,wr=u.length,Kr=wr-1;Wt<wr;Kr=Wt++){const wr=u[Kr],In=u[Wt];if(tr(Xe,Ar,wr,In))return 0;_r=Math.min(_r,Fr(Xe,Ar,wr,In,fr))}}return _r}function Or(u,Xe){for(const Wt of u)for(const u of Wt)if(rr(u,Xe,!0))return!0;return!1}function jr(u,Xe,Wt,fr=1/0){const _r=Cr(u),wr=Cr(Xe);if(fr!==1/0&&Vr(_r,wr,Wt)>=fr)return fr;if(We(_r,wr)){if(Or(u,Xe))return 0}else if(Or(Xe,u))return 0;let Ar=1/0;for(const fr of u)for(let u=0,_r=fr.length,wr=_r-1;u<_r;wr=u++){const _r=fr[wr],Kr=fr[u];for(const u of Xe)for(let Xe=0,fr=u.length,wr=fr-1;Xe<fr;wr=Xe++){const fr=u[wr],In=u[Xe];if(tr(_r,Kr,fr,In))return 0;Ar=Math.min(Ar,Fr(_r,Kr,fr,In,Wt))}}return Ar}function Rr(u,Xe,Wt,fr,_r,wr){if(!wr)return;const Ar=Vr(Pr(fr,wr),_r,Wt);Ar<Xe&&u.push([Ar,wr,[0,0]])}function Ur(u,Xe,Wt,fr,_r,wr,Ar){if(!wr||!Ar)return;const Kr=Vr(Pr(fr,wr),Pr(_r,Ar),Wt);Kr<Xe&&u.push([Kr,wr,Ar])}function qr(u,Xe,Wt,fr,_r=1/0){let wr=Math.min(fr.distance(u[0],Wt[0][0]),_r);if(0===wr)return wr;const Ar=new nu([[0,[0,u.length-1],[0,0]]],kr),Kr=Cr(Wt);for(;Ar.length>0;){const _r=Ar.pop();if(_r[0]>=wr)continue;const In=_r[1],no=Xe?50:100;if(Mr(In)<=no){if(!Ir(In,u.length))return NaN;if(Xe){const Xe=Dr(u,In,Wt,fr);if(isNaN(Xe)||0===Xe)return Xe;wr=Math.min(wr,Xe)}else for(let Xe=In[0];Xe<=In[1];++Xe){const _r=Lr(u[Xe],Wt,fr);if(wr=Math.min(wr,_r),0===wr)return 0}}else{const Wt=zr(In,Xe);Rr(Ar,wr,fr,u,Kr,Wt[0]),Rr(Ar,wr,fr,u,Kr,Wt[1])}}return wr}function Nr(u,Xe,Wt,fr,_r,wr=1/0){let Ar=Math.min(wr,_r.distance(u[0],Wt[0]));if(0===Ar)return Ar;const Kr=new nu([[0,[0,u.length-1],[0,Wt.length-1]]],kr);for(;Kr.length>0;){const wr=Kr.pop();if(wr[0]>=Ar)continue;const In=wr[1],no=wr[2],io=Xe?50:100,oo=fr?50:100;if(Mr(In)<=io&&Mr(no)<=oo){if(!Ir(In,u.length)&&Ir(no,Wt.length))return NaN;let wr;if(Xe&&fr)wr=Tr(u,In,Wt,no,_r),Ar=Math.min(Ar,wr);else if(Xe&&!fr){const Xe=u.slice(In[0],In[1]+1);for(let u=no[0];u<=no[1];++u)if(wr=Er(Wt[u],Xe,_r),Ar=Math.min(Ar,wr),0===Ar)return Ar}else if(!Xe&&fr){const Xe=Wt.slice(no[0],no[1]+1);for(let Wt=In[0];Wt<=In[1];++Wt)if(wr=Er(u[Wt],Xe,_r),Ar=Math.min(Ar,wr),0===Ar)return Ar}else wr=$r(u,In,Wt,no,_r),Ar=Math.min(Ar,wr)}else{const wr=zr(In,Xe),io=zr(no,fr);Ur(Kr,Ar,_r,u,Wt,wr[0],io[0]),Ur(Kr,Ar,_r,u,Wt,wr[0],io[1]),Ur(Kr,Ar,_r,u,Wt,wr[1],io[0]),Ur(Kr,Ar,_r,u,Wt,wr[1],io[1])}}return Ar}function Zr(u){return"MultiPolygon"===u.type?u.coordinates.map((u=>({type:"Polygon",coordinates:u}))):"MultiLineString"===u.type?u.coordinates.map((u=>({type:"LineString",coordinates:u}))):"MultiPoint"===u.type?u.coordinates.map((u=>({type:"Point",coordinates:u}))):[u]}class Gr{constructor(u,Xe){this.type=Io,this.geojson=u,this.geometries=Xe}static parse(u,Xe){if(2!==u.length)return Xe.error(`'distance' expression requires exactly one argument, but found ${u.length-1} instead.`);if(re(u[1])){const Xe=u[1];if("FeatureCollection"===Xe.type)return new Gr(Xe,Xe.features.map((u=>Zr(u.geometry))).flat());if("Feature"===Xe.type)return new Gr(Xe,Zr(Xe.geometry));if("type"in Xe&&"coordinates"in Xe)return new Gr(Xe,Zr(Xe))}return Xe.error("'distance' expression requires valid geojson object that contains polygon geometry type.")}evaluate(u){if(null!=u.geometry()&&null!=u.canonicalID()){if("Point"===u.geometryType())return function(u,Xe){const Wt=u.geometry(),fr=Wt.flat().map((Xe=>Ye([Xe.x,Xe.y],u.canonical)));if(0===Wt.length)return NaN;const _r=new Sr(fr[0][1]);let wr=1/0;for(const u of Xe){switch(u.type){case"Point":wr=Math.min(wr,Nr(fr,!1,[u.coordinates],!1,_r,wr));break;case"LineString":wr=Math.min(wr,Nr(fr,!1,u.coordinates,!0,_r,wr));break;case"Polygon":wr=Math.min(wr,qr(fr,!1,u.coordinates,_r,wr))}if(0===wr)return wr}return wr}(u,this.geometries);if("LineString"===u.geometryType())return function(u,Xe){const Wt=u.geometry(),fr=Wt.flat().map((Xe=>Ye([Xe.x,Xe.y],u.canonical)));if(0===Wt.length)return NaN;const _r=new Sr(fr[0][1]);let wr=1/0;for(const u of Xe){switch(u.type){case"Point":wr=Math.min(wr,Nr(fr,!0,[u.coordinates],!1,_r,wr));break;case"LineString":wr=Math.min(wr,Nr(fr,!0,u.coordinates,!0,_r,wr));break;case"Polygon":wr=Math.min(wr,qr(fr,!0,u.coordinates,_r,wr))}if(0===wr)return wr}return wr}(u,this.geometries);if("Polygon"===u.geometryType())return function(u,Xe){const Wt=u.geometry();if(0===Wt.length||0===Wt[0].length)return NaN;const fr=xr(Wt,0).map((Xe=>Xe.map((Xe=>Xe.map((Xe=>Ye([Xe.x,Xe.y],u.canonical))))))),_r=new Sr(fr[0][0][0][1]);let wr=1/0;for(const u of Xe)for(const Xe of fr){switch(u.type){case"Point":wr=Math.min(wr,qr([u.coordinates],!1,Xe,_r,wr));break;case"LineString":wr=Math.min(wr,qr(u.coordinates,!0,Xe,_r,wr));break;case"Polygon":wr=Math.min(wr,jr(Xe,u.coordinates,_r,wr))}if(0===wr)return wr}return wr}(u,this.geometries)}return NaN}eachChild(){}outputDefined(){return!0}}const uu={"==":ic,"!=":oc,">":gc,"<":lc,">=":eu,"<=":bc,array:le,at:me,boolean:le,case:be,coalesce:Ee,collator:qe,format:Ze,image:Ge,in:ge,"index-of":xe,interpolate:Be,"interpolate-hcl":Be,"interpolate-lab":Be,length:Ke,let:de,literal:se,match:ve,number:le,"number-format":Ne,object:le,slice:we,step:Ae,string:le,"to-boolean":ce,"to-color":ce,"to-number":ce,"to-string":ce,var:ye,within:pr,distance:Gr};class Xr{constructor(u,Xe,Wt,fr){this.name=u,this.type=Xe,this._evaluate=Wt,this.args=fr}evaluate(u){return this._evaluate(u,this.args)}eachChild(u){this.args.forEach(u)}outputDefined(){return!1}static parse(u,Xe){const Wt=u[0],fr=Xr.definitions[Wt];if(!fr)return Xe.error(`Unknown expression "${Wt}". If you wanted a literal array, use ["literal", [...]].`,0);const _r=Array.isArray(fr)?fr[0]:fr.type,wr=Array.isArray(fr)?[[fr[1],fr[2]]]:fr.overloads,Ar=wr.filter((([Xe])=>!Array.isArray(Xe)||Xe.length===u.length-1));let Kr=null;for(const[fr,wr]of Ar){Kr=new fe(Xe.registry,Qr,Xe.path,null,Xe.scope);const Ar=[];let In=!1;for(let Xe=1;Xe<u.length;Xe++){const Wt=u[Xe],_r=Array.isArray(fr)?fr[Xe-1]:fr.type,wr=Kr.parse(Wt,1+Ar.length,_r);if(!wr){In=!0;break}Ar.push(wr)}if(!In)if(Array.isArray(fr)&&fr.length!==Ar.length)Kr.error(`Expected ${fr.length} arguments, but found ${Ar.length} instead.`);else{for(let u=0;u<Ar.length;u++){const Xe=Array.isArray(fr)?fr[u]:fr.type,Wt=Ar[u];Kr.concat(u+1).checkSubtype(Xe,Wt.type)}if(0===Kr.errors.length)return new Xr(Wt,_r,wr,Ar)}}if(1===Ar.length)Xe.errors.push(...Kr.errors);else{const Wt=(Ar.length?Ar:wr).map((([u])=>{return Xe=u,Array.isArray(Xe)?`(${Xe.map(wt).join(", ")})`:`(${wt(Xe.type)}...)`;var Xe})).join(" | "),fr=[];for(let Wt=1;Wt<u.length;Wt++){const _r=Xe.parse(u[Wt],1+fr.length);if(!_r)return null;fr.push(wt(_r.type))}Xe.error(`Expected arguments of type ${Wt}, but found (${fr.join(", ")}) instead.`)}return null}static register(u,Xe){Xr.definitions=Xe;for(const Wt in Xe)u[Wt]=Xr}}function Hr(u,[Xe,Wt,fr,_r]){Xe=Xe.evaluate(u),Wt=Wt.evaluate(u),fr=fr.evaluate(u);const wr=_r?_r.evaluate(u):1,Ar=ee(Xe,Wt,fr,wr);if(Ar)throw new ae(Ar);return new Kt(Xe/255,Wt/255,fr/255,wr,!1)}function Yr(u,Xe){return u in Xe}function Jr(u,Xe){const Wt=Xe[u];return void 0===Wt?null:Wt}function Wr(u){return{type:u}}function Qr(u){if(u instanceof ye)return Qr(u.boundExpression);if(u instanceof Xr&&"error"===u.name)return!1;if(u instanceof qe)return!1;if(u instanceof pr)return!1;if(u instanceof Gr)return!1;const Xe=u instanceof ce||u instanceof le;let Wt=!0;return u.eachChild((u=>{Wt=Xe?Wt&&Qr(u):Wt&&u instanceof se})),!!Wt&&tn(u)&&rn(u,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"])}function tn(u){if(u instanceof Xr){if("get"===u.name&&1===u.args.length)return!1;if("feature-state"===u.name)return!1;if("has"===u.name&&1===u.args.length)return!1;if("properties"===u.name||"geometry-type"===u.name||"id"===u.name)return!1;if(/^filter-/.test(u.name))return!1}if(u instanceof pr)return!1;if(u instanceof Gr)return!1;let Xe=!0;return u.eachChild((u=>{Xe&&!tn(u)&&(Xe=!1)})),Xe}function en(u){if(u instanceof Xr&&"feature-state"===u.name)return!1;let Xe=!0;return u.eachChild((u=>{Xe&&!en(u)&&(Xe=!1)})),Xe}function rn(u,Xe){if(u instanceof Xr&&Xe.indexOf(u.name)>=0)return!1;let Wt=!0;return u.eachChild((u=>{Wt&&!rn(u,Xe)&&(Wt=!1)})),Wt}function nn(u){return{result:"success",value:u}}function sn(u){return{result:"error",value:u}}function an(u){return"data-driven"===u["property-type"]||"cross-faded-data-driven"===u["property-type"]}function on(u){return!!u.expression&&u.expression.parameters.indexOf("zoom")>-1}function ln(u){return!!u.expression&&u.expression.interpolated}function un(u){return u instanceof Number?"number":u instanceof String?"string":u instanceof Boolean?"boolean":Array.isArray(u)?"array":null===u?"null":typeof u}function cn(u){return"object"==typeof u&&null!==u&&!Array.isArray(u)}function hn(u){return u}function pn(u,Xe){const Wt="color"===Xe.type,fr=u.stops&&"object"==typeof u.stops[0][0],_r=fr||!(fr||void 0!==u.property),wr=u.type||(ln(Xe)?"exponential":"interval");if(Wt||"padding"===Xe.type){const fr=Wt?Kt.parse:Jt.parse;(u=st({},u)).stops&&(u.stops=u.stops.map((u=>[u[0],fr(u[1])]))),u.default=fr(u.default?u.default:Xe.default)}if(u.colorSpace&&"rgb"!==(Ar=u.colorSpace)&&"hcl"!==Ar&&"lab"!==Ar)throw new Error(`Unknown color space: "${u.colorSpace}"`);var Ar;let Kr,In,no;if("exponential"===wr)Kr=mn;else if("interval"===wr)Kr=yn;else if("categorical"===wr){Kr=dn,In=Object.create(null);for(const Xe of u.stops)In[Xe[0]]=Xe[1];no=typeof u.stops[0][0]}else{if("identity"!==wr)throw new Error(`Unknown function type "${wr}"`);Kr=gn}if(fr){const Wt={},fr=[];for(let Xe=0;Xe<u.stops.length;Xe++){const _r=u.stops[Xe],wr=_r[0].zoom;void 0===Wt[wr]&&(Wt[wr]={zoom:wr,type:u.type,property:u.property,default:u.default,stops:[]},fr.push(wr)),Wt[wr].stops.push([_r[0].value,_r[1]])}const _r=[];for(const u of fr)_r.push([Wt[u].zoom,pn(Wt[u],Xe)]);const wr={name:"linear"};return{kind:"composite",interpolationType:wr,interpolationFactor:Be.interpolationFactor.bind(void 0,wr),zoomStops:_r.map((u=>u[0])),evaluate:({zoom:Wt},fr)=>mn({stops:_r,base:u.base},Xe,Wt).evaluate(Wt,fr)}}if(_r){const Wt="exponential"===wr?{name:"exponential",base:void 0!==u.base?u.base:1}:null;return{kind:"camera",interpolationType:Wt,interpolationFactor:Be.interpolationFactor.bind(void 0,Wt),zoomStops:u.stops.map((u=>u[0])),evaluate:({zoom:Wt})=>Kr(u,Xe,Wt,In,no)}}return{kind:"source",evaluate(Wt,fr){const _r=fr&&fr.properties?fr.properties[u.property]:void 0;return void 0===_r?fn(u.default,Xe.default):Kr(u,Xe,_r,In,no)}}}function fn(u,Xe,Wt){return void 0!==u?u:void 0!==Xe?Xe:void 0!==Wt?Wt:void 0}function dn(u,Xe,Wt,fr,_r){return fn(typeof Wt===_r?fr[Wt]:void 0,u.default,Xe.default)}function yn(u,Xe,Wt){if("number"!==un(Wt))return fn(u.default,Xe.default);const fr=u.stops.length;if(1===fr)return u.stops[0][1];if(Wt<=u.stops[0][0])return u.stops[0][1];if(Wt>=u.stops[fr-1][0])return u.stops[fr-1][1];const _r=_e(u.stops.map((u=>u[0])),Wt);return u.stops[_r][1]}function mn(u,Xe,Wt){const fr=void 0!==u.base?u.base:1;if("number"!==un(Wt))return fn(u.default,Xe.default);const _r=u.stops.length;if(1===_r)return u.stops[0][1];if(Wt<=u.stops[0][0])return u.stops[0][1];if(Wt>=u.stops[_r-1][0])return u.stops[_r-1][1];const wr=_e(u.stops.map((u=>u[0])),Wt),Ar=function(u,Xe,Wt,fr){const _r=fr-Wt,wr=u-Wt;return 0===_r?0:1===Xe?wr/_r:(Math.pow(Xe,wr)-1)/(Math.pow(Xe,_r)-1)}(Wt,fr,u.stops[wr][0],u.stops[wr+1][0]),Kr=u.stops[wr][1],In=u.stops[wr+1][1],no=rc[Xe.type]||hn;return"function"==typeof Kr.evaluate?{evaluate(...Xe){const Wt=Kr.evaluate.apply(void 0,Xe),fr=In.evaluate.apply(void 0,Xe);if(void 0!==Wt&&void 0!==fr)return no(Wt,fr,Ar,u.colorSpace)}}:no(Kr,In,Ar,u.colorSpace)}function gn(u,Xe,Wt){switch(Xe.type){case"color":Wt=Kt.parse(Wt);break;case"formatted":Wt=Yt.fromString(Wt.toString());break;case"resolvedImage":Wt=te.fromString(Wt.toString());break;case"padding":Wt=Jt.parse(Wt);break;default:un(Wt)===Xe.type||"enum"===Xe.type&&Xe.values[Wt]||(Wt=void 0)}return fn(Wt,u.default,Xe.default)}Xr.register(uu,{error:[{kind:"error"},[zo],(u,[Xe])=>{throw new ae(Xe.evaluate(u))}],typeof:[zo,[Da],(u,[Xe])=>wt(ne(Xe.evaluate(u)))],"to-rgba":[bt(Io,4),[ca],(u,[Xe])=>{const[Wt,fr,_r,wr]=Xe.evaluate(u).rgb;return[255*Wt,255*fr,255*_r,wr]}],rgb:[ca,[Io,Io,Io],Hr],rgba:[ca,[Io,Io,Io,Io],Hr],has:{type:Bo,overloads:[[[zo],(u,[Xe])=>Yr(Xe.evaluate(u),u.properties())],[[zo,ua],(u,[Xe,Wt])=>Yr(Xe.evaluate(u),Wt.evaluate(u))]]},get:{type:Da,overloads:[[[zo],(u,[Xe])=>Jr(Xe.evaluate(u),u.properties())],[[zo,ua],(u,[Xe,Wt])=>Jr(Xe.evaluate(u),Wt.evaluate(u))]]},"feature-state":[Da,[zo],(u,[Xe])=>Jr(Xe.evaluate(u),u.featureState||{})],properties:[ua,[],u=>u.properties()],"geometry-type":[zo,[],u=>u.geometryType()],id:[Da,[],u=>u.id()],zoom:[Io,[],u=>u.globals.zoom],"heatmap-density":[Io,[],u=>u.globals.heatmapDensity||0],"line-progress":[Io,[],u=>u.globals.lineProgress||0],accumulated:[Da,[],u=>void 0===u.globals.accumulated?null:u.globals.accumulated],"+":[Io,Wr(Io),(u,Xe)=>{let Wt=0;for(const fr of Xe)Wt+=fr.evaluate(u);return Wt}],"*":[Io,Wr(Io),(u,Xe)=>{let Wt=1;for(const fr of Xe)Wt*=fr.evaluate(u);return Wt}],"-":{type:Io,overloads:[[[Io,Io],(u,[Xe,Wt])=>Xe.evaluate(u)-Wt.evaluate(u)],[[Io],(u,[Xe])=>-Xe.evaluate(u)]]},"/":[Io,[Io,Io],(u,[Xe,Wt])=>Xe.evaluate(u)/Wt.evaluate(u)],"%":[Io,[Io,Io],(u,[Xe,Wt])=>Xe.evaluate(u)%Wt.evaluate(u)],ln2:[Io,[],()=>Math.LN2],pi:[Io,[],()=>Math.PI],e:[Io,[],()=>Math.E],"^":[Io,[Io,Io],(u,[Xe,Wt])=>Math.pow(Xe.evaluate(u),Wt.evaluate(u))],sqrt:[Io,[Io],(u,[Xe])=>Math.sqrt(Xe.evaluate(u))],log10:[Io,[Io],(u,[Xe])=>Math.log(Xe.evaluate(u))/Math.LN10],ln:[Io,[Io],(u,[Xe])=>Math.log(Xe.evaluate(u))],log2:[Io,[Io],(u,[Xe])=>Math.log(Xe.evaluate(u))/Math.LN2],sin:[Io,[Io],(u,[Xe])=>Math.sin(Xe.evaluate(u))],cos:[Io,[Io],(u,[Xe])=>Math.cos(Xe.evaluate(u))],tan:[Io,[Io],(u,[Xe])=>Math.tan(Xe.evaluate(u))],asin:[Io,[Io],(u,[Xe])=>Math.asin(Xe.evaluate(u))],acos:[Io,[Io],(u,[Xe])=>Math.acos(Xe.evaluate(u))],atan:[Io,[Io],(u,[Xe])=>Math.atan(Xe.evaluate(u))],min:[Io,Wr(Io),(u,Xe)=>Math.min(...Xe.map((Xe=>Xe.evaluate(u))))],max:[Io,Wr(Io),(u,Xe)=>Math.max(...Xe.map((Xe=>Xe.evaluate(u))))],abs:[Io,[Io],(u,[Xe])=>Math.abs(Xe.evaluate(u))],round:[Io,[Io],(u,[Xe])=>{const Wt=Xe.evaluate(u);return Wt<0?-Math.round(-Wt):Math.round(Wt)}],floor:[Io,[Io],(u,[Xe])=>Math.floor(Xe.evaluate(u))],ceil:[Io,[Io],(u,[Xe])=>Math.ceil(Xe.evaluate(u))],"filter-==":[Bo,[zo,Da],(u,[Xe,Wt])=>u.properties()[Xe.value]===Wt.value],"filter-id-==":[Bo,[Da],(u,[Xe])=>u.id()===Xe.value],"filter-type-==":[Bo,[zo],(u,[Xe])=>u.geometryType()===Xe.value],"filter-<":[Bo,[zo,Da],(u,[Xe,Wt])=>{const fr=u.properties()[Xe.value],_r=Wt.value;return typeof fr==typeof _r&&fr<_r}],"filter-id-<":[Bo,[Da],(u,[Xe])=>{const Wt=u.id(),fr=Xe.value;return typeof Wt==typeof fr&&Wt<fr}],"filter->":[Bo,[zo,Da],(u,[Xe,Wt])=>{const fr=u.properties()[Xe.value],_r=Wt.value;return typeof fr==typeof _r&&fr>_r}],"filter-id->":[Bo,[Da],(u,[Xe])=>{const Wt=u.id(),fr=Xe.value;return typeof Wt==typeof fr&&Wt>fr}],"filter-<=":[Bo,[zo,Da],(u,[Xe,Wt])=>{const fr=u.properties()[Xe.value],_r=Wt.value;return typeof fr==typeof _r&&fr<=_r}],"filter-id-<=":[Bo,[Da],(u,[Xe])=>{const Wt=u.id(),fr=Xe.value;return typeof Wt==typeof fr&&Wt<=fr}],"filter->=":[Bo,[zo,Da],(u,[Xe,Wt])=>{const fr=u.properties()[Xe.value],_r=Wt.value;return typeof fr==typeof _r&&fr>=_r}],"filter-id->=":[Bo,[Da],(u,[Xe])=>{const Wt=u.id(),fr=Xe.value;return typeof Wt==typeof fr&&Wt>=fr}],"filter-has":[Bo,[Da],(u,[Xe])=>Xe.value in u.properties()],"filter-has-id":[Bo,[],u=>null!==u.id()&&void 0!==u.id()],"filter-type-in":[Bo,[bt(zo)],(u,[Xe])=>Xe.value.indexOf(u.geometryType())>=0],"filter-id-in":[Bo,[bt(Da)],(u,[Xe])=>Xe.value.indexOf(u.id())>=0],"filter-in-small":[Bo,[zo,bt(Da)],(u,[Xe,Wt])=>Wt.value.indexOf(u.properties()[Xe.value])>=0],"filter-in-large":[Bo,[zo,bt(Da)],(u,[Xe,Wt])=>function(u,Xe,Wt,fr){for(;Wt<=fr;){const _r=Wt+fr>>1;if(Xe[_r]===u)return!0;Xe[_r]>u?fr=_r-1:Wt=_r+1}return!1}(u.properties()[Xe.value],Wt.value,0,Wt.value.length-1)],all:{type:Bo,overloads:[[[Bo,Bo],(u,[Xe,Wt])=>Xe.evaluate(u)&&Wt.evaluate(u)],[Wr(Bo),(u,Xe)=>{for(const Wt of Xe)if(!Wt.evaluate(u))return!1;return!0}]]},any:{type:Bo,overloads:[[[Bo,Bo],(u,[Xe,Wt])=>Xe.evaluate(u)||Wt.evaluate(u)],[Wr(Bo),(u,Xe)=>{for(const Wt of Xe)if(Wt.evaluate(u))return!0;return!1}]]},"!":[Bo,[Bo],(u,[Xe])=>!Xe.evaluate(u)],"is-supported-script":[Bo,[zo],(u,[Xe])=>{const Wt=u.globals&&u.globals.isSupportedScript;return!Wt||Wt(Xe.evaluate(u))}],upcase:[zo,[zo],(u,[Xe])=>Xe.evaluate(u).toUpperCase()],downcase:[zo,[zo],(u,[Xe])=>Xe.evaluate(u).toLowerCase()],concat:[zo,Wr(Da),(u,Xe)=>Xe.map((Xe=>ie(Xe.evaluate(u)))).join("")],"resolved-locale":[zo,[ns],(u,[Xe])=>Xe.evaluate(u).resolvedLocale()]});class xn{constructor(u,Xe){var Wt;this.expression=u,this._warningHistory={},this._evaluator=new pe,this._defaultValue=Xe?"color"===(Wt=Xe).type&&cn(Wt.default)?new Kt(0,0,0,0):"color"===Wt.type?Kt.parse(Wt.default)||null:"padding"===Wt.type?Jt.parse(Wt.default)||null:"variableAnchorOffsetCollection"===Wt.type?Qt.parse(Wt.default)||null:void 0===Wt.default?null:Wt.default:null,this._enumValues=Xe&&"enum"===Xe.type?Xe.values:null}evaluateWithoutErrorHandling(u,Xe,Wt,fr,_r,wr){return this._evaluator.globals=u,this._evaluator.feature=Xe,this._evaluator.featureState=Wt,this._evaluator.canonical=fr,this._evaluator.availableImages=_r||null,this._evaluator.formattedSection=wr,this.expression.evaluate(this._evaluator)}evaluate(u,Xe,Wt,fr,_r,wr){this._evaluator.globals=u,this._evaluator.feature=Xe||null,this._evaluator.featureState=Wt||null,this._evaluator.canonical=fr,this._evaluator.availableImages=_r||null,this._evaluator.formattedSection=wr||null;try{const u=this.expression.evaluate(this._evaluator);if(null==u||"number"==typeof u&&u!=u)return this._defaultValue;if(this._enumValues&&!(u in this._enumValues))throw new ae(`Expected value to be one of ${Object.keys(this._enumValues).map((u=>JSON.stringify(u))).join(", ")}, but found ${JSON.stringify(u)} instead.`);return u}catch(u){return this._warningHistory[u.message]||(this._warningHistory[u.message]=!0,"undefined"!=typeof console&&console.warn(u.message)),this._defaultValue}}}function vn(u){return Array.isArray(u)&&u.length>0&&"string"==typeof u[0]&&u[0]in uu}function bn(u,Xe){const Wt=new fe(uu,Qr,[],Xe?function(u){const Xe={color:ca,string:zo,number:Io,enum:zo,boolean:Bo,formatted:yl,padding:vl,resolvedImage:kl,variableAnchorOffsetCollection:Al};return"array"===u.type?bt(Xe[u.value]||Da,u.length):Xe[u.type]}(Xe):void 0),fr=Wt.parse(u,void 0,void 0,void 0,Xe&&"string"===Xe.type?{typeAnnotation:"coerce"}:void 0);return fr?nn(new xn(fr,Xe)):sn(Wt.errors)}class wn{constructor(u,Xe){this.kind=u,this._styleExpression=Xe,this.isStateDependent="constant"!==u&&!en(Xe.expression)}evaluateWithoutErrorHandling(u,Xe,Wt,fr,_r,wr){return this._styleExpression.evaluateWithoutErrorHandling(u,Xe,Wt,fr,_r,wr)}evaluate(u,Xe,Wt,fr,_r,wr){return this._styleExpression.evaluate(u,Xe,Wt,fr,_r,wr)}}class _n{constructor(u,Xe,Wt,fr){this.kind=u,this.zoomStops=Wt,this._styleExpression=Xe,this.isStateDependent="camera"!==u&&!en(Xe.expression),this.interpolationType=fr}evaluateWithoutErrorHandling(u,Xe,Wt,fr,_r,wr){return this._styleExpression.evaluateWithoutErrorHandling(u,Xe,Wt,fr,_r,wr)}evaluate(u,Xe,Wt,fr,_r,wr){return this._styleExpression.evaluate(u,Xe,Wt,fr,_r,wr)}interpolationFactor(u,Xe,Wt){return this.interpolationType?Be.interpolationFactor(this.interpolationType,u,Xe,Wt):0}}function An(u,Xe){const Wt=bn(u,Xe);if("error"===Wt.result)return Wt;const fr=Wt.value.expression,_r=tn(fr);if(!_r&&!an(Xe))return sn([new at("","data expressions not supported")]);const wr=rn(fr,["zoom"]);if(!wr&&!on(Xe))return sn([new at("","zoom expressions not supported")]);const Ar=kn(fr);return Ar||wr?Ar instanceof at?sn([Ar]):Ar instanceof Be&&!ln(Xe)?sn([new at("",'"interpolate" expressions cannot be used with this property')]):nn(Ar?new _n(_r?"camera":"composite",Wt.value,Ar.labels,Ar instanceof Be?Ar.interpolation:void 0):new wn(_r?"constant":"source",Wt.value)):sn([new at("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')])}class Sn{constructor(u,Xe){this._parameters=u,this._specification=Xe,st(this,pn(this._parameters,this._specification))}static deserialize(u){return new Sn(u._parameters,u._specification)}static serialize(u){return{_parameters:u._parameters,_specification:u._specification}}}function kn(u){let Xe=null;if(u instanceof de)Xe=kn(u.result);else if(u instanceof Ee){for(const Wt of u.args)if(Xe=kn(Wt),Xe)break}else(u instanceof Ae||u instanceof Be)&&u.input instanceof Xr&&"zoom"===u.input.name&&(Xe=u);return Xe instanceof at||u.eachChild((u=>{const Wt=kn(u);Wt instanceof at?Xe=Wt:!Xe&&Wt?Xe=new at("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):Xe&&Wt&&Xe!==Wt&&(Xe=new at("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))})),Xe}function Mn(u){if(!0===u||!1===u)return!0;if(!Array.isArray(u)||0===u.length)return!1;switch(u[0]){case"has":return u.length>=2&&"$id"!==u[1]&&"$type"!==u[1];case"in":return u.length>=3&&("string"!=typeof u[1]||Array.isArray(u[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return 3!==u.length||Array.isArray(u[1])||Array.isArray(u[2]);case"any":case"all":for(const Xe of u.slice(1))if(!Mn(Xe)&&"boolean"!=typeof Xe)return!1;return!0;default:return!0}}const hu={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function zn(u){if(null==u)return{filter:()=>!0,needGeometry:!1};Mn(u)||(u=Bn(u));const Xe=bn(u,hu);if("error"===Xe.result)throw new Error(Xe.value.map((u=>`${u.key}: ${u.message}`)).join(", "));return{filter:(u,Wt,fr)=>Xe.value.evaluate(u,Wt,{},fr),needGeometry:Cn(u)}}function Pn(u,Xe){return u<Xe?-1:u>Xe?1:0}function Cn(u){if(!Array.isArray(u))return!1;if("within"===u[0]||"distance"===u[0])return!0;for(let Xe=1;Xe<u.length;Xe++)if(Cn(u[Xe]))return!0;return!1}function Bn(u){if(!u)return!0;const Xe=u[0];return u.length<=1?"any"!==Xe:"=="===Xe?Vn(u[1],u[2],"=="):"!="===Xe?Tn(Vn(u[1],u[2],"==")):"<"===Xe||">"===Xe||"<="===Xe||">="===Xe?Vn(u[1],u[2],Xe):"any"===Xe?(Wt=u.slice(1),["any"].concat(Wt.map(Bn))):"all"===Xe?["all"].concat(u.slice(1).map(Bn)):"none"===Xe?["all"].concat(u.slice(1).map(Bn).map(Tn)):"in"===Xe?En(u[1],u.slice(2)):"!in"===Xe?Tn(En(u[1],u.slice(2))):"has"===Xe?Fn(u[1]):"!has"!==Xe||Tn(Fn(u[1]));var Wt}function Vn(u,Xe,Wt){switch(u){case"$type":return[`filter-type-${Wt}`,Xe];case"$id":return[`filter-id-${Wt}`,Xe];default:return[`filter-${Wt}`,u,Xe]}}function En(u,Xe){if(0===Xe.length)return!1;switch(u){case"$type":return["filter-type-in",["literal",Xe]];case"$id":return["filter-id-in",["literal",Xe]];default:return Xe.length>200&&!Xe.some((u=>typeof u!=typeof Xe[0]))?["filter-in-large",u,["literal",Xe.sort(Pn)]]:["filter-in-small",u,["literal",Xe]]}}function Fn(u){switch(u){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",u]}}function Tn(u){return["!",u]}function $n(u){const Xe=typeof u;if("number"===Xe||"boolean"===Xe||"string"===Xe||null==u)return JSON.stringify(u);if(Array.isArray(u)){let Xe="[";for(const Wt of u)Xe+=`${$n(Wt)},`;return`${Xe}]`}const Wt=Object.keys(u).sort();let fr="{";for(let Xe=0;Xe<Wt.length;Xe++)fr+=`${JSON.stringify(Wt[Xe])}:${$n(u[Wt[Xe]])},`;return`${fr}}`}function Ln(u){let Xe="";for(const Wt of ko)Xe+=`/${$n(u[Wt])}`;return Xe}function Dn(u){const Xe=u.value;return Xe?[new it(u.key,Xe,"constants have been deprecated as of v8")]:[]}function On(u){return u instanceof Number||u instanceof String||u instanceof Boolean?u.valueOf():u}function jn(u){if(Array.isArray(u))return u.map(jn);if(u instanceof Object&&!(u instanceof Number||u instanceof String||u instanceof Boolean)){const Xe={};for(const Wt in u)Xe[Wt]=jn(u[Wt]);return Xe}return On(u)}function Rn(u){const Xe=u.key,Wt=u.value,fr=u.valueSpec||{},_r=u.objectElementValidators||{},wr=u.style,Ar=u.styleSpec,Kr=u.validateSpec;let In=[];const no=un(Wt);if("object"!==no)return[new it(Xe,Wt,`object expected, ${no} found`)];for(const u in Wt){const no=u.split(".")[0],io=fr[no]||fr["*"];let oo;if(_r[no])oo=_r[no];else if(fr[no])oo=Kr;else if(_r["*"])oo=_r["*"];else{if(!fr["*"]){In.push(new it(Xe,Wt[u],`unknown property "${u}"`));continue}oo=Kr}In=In.concat(oo({key:(Xe?`${Xe}.`:Xe)+u,value:Wt[u],valueSpec:io,style:wr,styleSpec:Ar,object:Wt,objectKey:u,validateSpec:Kr},Wt))}for(const u in fr)_r[u]||fr[u].required&&void 0===fr[u].default&&void 0===Wt[u]&&In.push(new it(Xe,Wt,`missing required property "${u}"`));return In}function Un(u){const Xe=u.value,Wt=u.valueSpec,fr=u.style,_r=u.styleSpec,wr=u.key,Ar=u.arrayElementValidator||u.validateSpec;if("array"!==un(Xe))return[new it(wr,Xe,`array expected, ${un(Xe)} found`)];if(Wt.length&&Xe.length!==Wt.length)return[new it(wr,Xe,`array length ${Wt.length} expected, length ${Xe.length} found`)];if(Wt["min-length"]&&Xe.length<Wt["min-length"])return[new it(wr,Xe,`array length at least ${Wt["min-length"]} expected, length ${Xe.length} found`)];let Kr={type:Wt.value,values:Wt.values};_r.$version<7&&(Kr.function=Wt.function),"object"===un(Wt.value)&&(Kr=Wt.value);let In=[];for(let Wt=0;Wt<Xe.length;Wt++)In=In.concat(Ar({array:Xe,arrayIndex:Wt,value:Xe[Wt],valueSpec:Kr,validateSpec:u.validateSpec,style:fr,styleSpec:_r,key:`${wr}[${Wt}]`}));return In}function qn(u){const Xe=u.key,Wt=u.value,fr=u.valueSpec;let _r=un(Wt);return"number"===_r&&Wt!=Wt&&(_r="NaN"),"number"!==_r?[new it(Xe,Wt,`number expected, ${_r} found`)]:"minimum"in fr&&Wt<fr.minimum?[new it(Xe,Wt,`${Wt} is less than the minimum value ${fr.minimum}`)]:"maximum"in fr&&Wt>fr.maximum?[new it(Xe,Wt,`${Wt} is greater than the maximum value ${fr.maximum}`)]:[]}function Nn(u){const Xe=u.valueSpec,Wt=On(u.value.type);let fr,_r,wr,Ar={};const Kr="categorical"!==Wt&&void 0===u.value.property,In=!Kr,no="array"===un(u.value.stops)&&"array"===un(u.value.stops[0])&&"object"===un(u.value.stops[0][0]),io=Rn({key:u.key,value:u.value,valueSpec:u.styleSpec.function,validateSpec:u.validateSpec,style:u.style,styleSpec:u.styleSpec,objectElementValidators:{stops:function(u){if("identity"===Wt)return[new it(u.key,u.value,'identity function may not have a "stops" property')];let Xe=[];const fr=u.value;return Xe=Xe.concat(Un({key:u.key,value:fr,valueSpec:u.valueSpec,validateSpec:u.validateSpec,style:u.style,styleSpec:u.styleSpec,arrayElementValidator:h})),"array"===un(fr)&&0===fr.length&&Xe.push(new it(u.key,fr,"array must have at least one stop")),Xe},default:function(u){return u.validateSpec({key:u.key,value:u.value,valueSpec:Xe,validateSpec:u.validateSpec,style:u.style,styleSpec:u.styleSpec})}}});return"identity"===Wt&&Kr&&io.push(new it(u.key,u.value,'missing required property "property"')),"identity"===Wt||u.value.stops||io.push(new it(u.key,u.value,'missing required property "stops"')),"exponential"===Wt&&u.valueSpec.expression&&!ln(u.valueSpec)&&io.push(new it(u.key,u.value,"exponential functions not supported")),u.styleSpec.$version>=8&&(In&&!an(u.valueSpec)?io.push(new it(u.key,u.value,"property functions not supported")):Kr&&!on(u.valueSpec)&&io.push(new it(u.key,u.value,"zoom functions not supported"))),"categorical"!==Wt&&!no||void 0!==u.value.property||io.push(new it(u.key,u.value,'"property" property is required')),io;function h(u){let Wt=[];const fr=u.value,Kr=u.key;if("array"!==un(fr))return[new it(Kr,fr,`array expected, ${un(fr)} found`)];if(2!==fr.length)return[new it(Kr,fr,`array length 2 expected, length ${fr.length} found`)];if(no){if("object"!==un(fr[0]))return[new it(Kr,fr,`object expected, ${un(fr[0])} found`)];if(void 0===fr[0].zoom)return[new it(Kr,fr,"object stop key must have zoom")];if(void 0===fr[0].value)return[new it(Kr,fr,"object stop key must have value")];if(wr&&wr>On(fr[0].zoom))return[new it(Kr,fr[0].zoom,"stop zoom values must appear in ascending order")];On(fr[0].zoom)!==wr&&(wr=On(fr[0].zoom),_r=void 0,Ar={}),Wt=Wt.concat(Rn({key:`${Kr}[0]`,value:fr[0],valueSpec:{zoom:{}},validateSpec:u.validateSpec,style:u.style,styleSpec:u.styleSpec,objectElementValidators:{zoom:qn,value:p}}))}else Wt=Wt.concat(p({key:`${Kr}[0]`,value:fr[0],valueSpec:{},validateSpec:u.validateSpec,style:u.style,styleSpec:u.styleSpec},fr));return vn(jn(fr[1]))?Wt.concat([new it(`${Kr}[1]`,fr[1],"expressions are not allowed in function stops.")]):Wt.concat(u.validateSpec({key:`${Kr}[1]`,value:fr[1],valueSpec:Xe,validateSpec:u.validateSpec,style:u.style,styleSpec:u.styleSpec}))}function p(u,wr){const Kr=un(u.value),In=On(u.value),no=null!==u.value?u.value:wr;if(fr){if(Kr!==fr)return[new it(u.key,no,`${Kr} stop domain type must match previous stop domain type ${fr}`)]}else fr=Kr;if("number"!==Kr&&"string"!==Kr&&"boolean"!==Kr)return[new it(u.key,no,"stop domain value must be a number, string, or boolean")];if("number"!==Kr&&"categorical"!==Wt){let fr=`number expected, ${Kr} found`;return an(Xe)&&void 0===Wt&&(fr+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new it(u.key,no,fr)]}return"categorical"!==Wt||"number"!==Kr||isFinite(In)&&Math.floor(In)===In?"categorical"!==Wt&&"number"===Kr&&void 0!==_r&&In<_r?[new it(u.key,no,"stop domain values must appear in ascending order")]:(_r=In,"categorical"===Wt&&In in Ar?[new it(u.key,no,"stop domain values must be unique")]:(Ar[In]=!0,[])):[new it(u.key,no,`integer expected, found ${In}`)]}}function Zn(u){const Xe=("property"===u.expressionContext?An:bn)(jn(u.value),u.valueSpec);if("error"===Xe.result)return Xe.value.map((Xe=>new it(`${u.key}${Xe.key}`,u.value,Xe.message)));const Wt=Xe.value.expression||Xe.value._styleExpression.expression;if("property"===u.expressionContext&&"text-font"===u.propertyKey&&!Wt.outputDefined())return[new it(u.key,u.value,`Invalid data expression for "${u.propertyKey}". Output values must be contained as literals within the expression.`)];if("property"===u.expressionContext&&"layout"===u.propertyType&&!en(Wt))return[new it(u.key,u.value,'"feature-state" data expressions are not supported with layout properties.')];if("filter"===u.expressionContext&&!en(Wt))return[new it(u.key,u.value,'"feature-state" data expressions are not supported with filters.')];if(u.expressionContext&&0===u.expressionContext.indexOf("cluster")){if(!rn(Wt,["zoom","feature-state"]))return[new it(u.key,u.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if("cluster-initial"===u.expressionContext&&!tn(Wt))return[new it(u.key,u.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function Gn(u){const Xe=u.key,Wt=u.value,fr=u.valueSpec,_r=[];return Array.isArray(fr.values)?-1===fr.values.indexOf(On(Wt))&&_r.push(new it(Xe,Wt,`expected one of [${fr.values.join(", ")}], ${JSON.stringify(Wt)} found`)):-1===Object.keys(fr.values).indexOf(On(Wt))&&_r.push(new it(Xe,Wt,`expected one of [${Object.keys(fr.values).join(", ")}], ${JSON.stringify(Wt)} found`)),_r}function Kn(u){return Mn(jn(u.value))?Zn(st({},u,{expressionContext:"filter",valueSpec:{value:"boolean"}})):Xn(u)}function Xn(u){const Xe=u.value,Wt=u.key;if("array"!==un(Xe))return[new it(Wt,Xe,`array expected, ${un(Xe)} found`)];const fr=u.styleSpec;let _r,wr=[];if(Xe.length<1)return[new it(Wt,Xe,"filter array must have at least 1 element")];switch(wr=wr.concat(Gn({key:`${Wt}[0]`,value:Xe[0],valueSpec:fr.filter_operator,style:u.style,styleSpec:u.styleSpec})),On(Xe[0])){case"<":case"<=":case">":case">=":Xe.length>=2&&"$type"===On(Xe[1])&&wr.push(new it(Wt,Xe,`"$type" cannot be use with operator "${Xe[0]}"`));case"==":case"!=":3!==Xe.length&&wr.push(new it(Wt,Xe,`filter array for operator "${Xe[0]}" must have 3 elements`));case"in":case"!in":Xe.length>=2&&(_r=un(Xe[1]),"string"!==_r&&wr.push(new it(`${Wt}[1]`,Xe[1],`string expected, ${_r} found`)));for(let Ar=2;Ar<Xe.length;Ar++)_r=un(Xe[Ar]),"$type"===On(Xe[1])?wr=wr.concat(Gn({key:`${Wt}[${Ar}]`,value:Xe[Ar],valueSpec:fr.geometry_type,style:u.style,styleSpec:u.styleSpec})):"string"!==_r&&"number"!==_r&&"boolean"!==_r&&wr.push(new it(`${Wt}[${Ar}]`,Xe[Ar],`string, number, or boolean expected, ${_r} found`));break;case"any":case"all":case"none":for(let fr=1;fr<Xe.length;fr++)wr=wr.concat(Xn({key:`${Wt}[${fr}]`,value:Xe[fr],style:u.style,styleSpec:u.styleSpec}));break;case"has":case"!has":_r=un(Xe[1]),2!==Xe.length?wr.push(new it(Wt,Xe,`filter array for "${Xe[0]}" operator must have 2 elements`)):"string"!==_r&&wr.push(new it(`${Wt}[1]`,Xe[1],`string expected, ${_r} found`))}return wr}function Hn(u,Xe){const Wt=u.key,fr=u.validateSpec,_r=u.style,wr=u.styleSpec,Ar=u.value,Kr=u.objectKey,In=wr[`${Xe}_${u.layerType}`];if(!In)return[];const no=Kr.match(/^(.*)-transition$/);if("paint"===Xe&&no&&In[no[1]]&&In[no[1]].transition)return fr({key:Wt,value:Ar,valueSpec:wr.transition,style:_r,styleSpec:wr});const io=u.valueSpec||In[Kr];if(!io)return[new it(Wt,Ar,`unknown property "${Kr}"`)];let oo;if("string"===un(Ar)&&an(io)&&!io.tokens&&(oo=/^{([^}]+)}$/.exec(Ar)))return[new it(Wt,Ar,`"${Kr}" does not support interpolation syntax\nUse an identity property function instead: \`{ "type": "identity", "property": ${JSON.stringify(oo[1])} }\`.`)];const ao=[];return"symbol"===u.layerType&&("text-field"===Kr&&_r&&!_r.glyphs&&ao.push(new it(Wt,Ar,'use of "text-field" requires a style "glyphs" property')),"text-font"===Kr&&cn(jn(Ar))&&"identity"===On(Ar.type)&&ao.push(new it(Wt,Ar,'"text-font" does not support identity functions'))),ao.concat(fr({key:u.key,value:Ar,valueSpec:io,style:_r,styleSpec:wr,expressionContext:"property",propertyType:Xe,propertyKey:Kr}))}function Yn(u){return Hn(u,"paint")}function Jn(u){return Hn(u,"layout")}function Wn(u){let Xe=[];const Wt=u.value,fr=u.key,_r=u.style,wr=u.styleSpec;Wt.type||Wt.ref||Xe.push(new it(fr,Wt,'either "type" or "ref" is required'));let Ar=On(Wt.type);const Kr=On(Wt.ref);if(Wt.id){const wr=On(Wt.id);for(let Ar=0;Ar<u.arrayIndex;Ar++){const u=_r.layers[Ar];On(u.id)===wr&&Xe.push(new it(fr,Wt.id,`duplicate layer id "${Wt.id}", previously used at line ${u.id.__line__}`))}}if("ref"in Wt){let u;["type","source","source-layer","filter","layout"].forEach((u=>{u in Wt&&Xe.push(new it(fr,Wt[u],`"${u}" is prohibited for ref layers`))})),_r.layers.forEach((Xe=>{On(Xe.id)===Kr&&(u=Xe)})),u?u.ref?Xe.push(new it(fr,Wt.ref,"ref cannot reference another ref layer")):Ar=On(u.type):Xe.push(new it(fr,Wt.ref,`ref layer "${Kr}" not found`))}else if("background"!==Ar)if(Wt.source){const u=_r.sources&&_r.sources[Wt.source],wr=u&&On(u.type);u?"vector"===wr&&"raster"===Ar?Xe.push(new it(fr,Wt.source,`layer "${Wt.id}" requires a raster source`)):"raster-dem"!==wr&&"hillshade"===Ar?Xe.push(new it(fr,Wt.source,`layer "${Wt.id}" requires a raster-dem source`)):"raster"===wr&&"raster"!==Ar?Xe.push(new it(fr,Wt.source,`layer "${Wt.id}" requires a vector source`)):"vector"!==wr||Wt["source-layer"]?"raster-dem"===wr&&"hillshade"!==Ar?Xe.push(new it(fr,Wt.source,"raster-dem source can only be used with layer type 'hillshade'.")):"line"!==Ar||!Wt.paint||!Wt.paint["line-gradient"]||"geojson"===wr&&u.lineMetrics||Xe.push(new it(fr,Wt,`layer "${Wt.id}" specifies a line-gradient, which requires a GeoJSON source with \`lineMetrics\` enabled.`)):Xe.push(new it(fr,Wt,`layer "${Wt.id}" must specify a "source-layer"`)):Xe.push(new it(fr,Wt.source,`source "${Wt.source}" not found`))}else Xe.push(new it(fr,Wt,'missing required property "source"'));return Xe=Xe.concat(Rn({key:fr,value:Wt,valueSpec:wr.layer,style:u.style,styleSpec:u.styleSpec,validateSpec:u.validateSpec,objectElementValidators:{"*":()=>[],type:()=>u.validateSpec({key:`${fr}.type`,value:Wt.type,valueSpec:wr.layer.type,style:u.style,styleSpec:u.styleSpec,validateSpec:u.validateSpec,object:Wt,objectKey:"type"}),filter:Kn,layout:u=>Rn({layer:Wt,key:u.key,value:u.value,style:u.style,styleSpec:u.styleSpec,validateSpec:u.validateSpec,objectElementValidators:{"*":u=>Jn(st({layerType:Ar},u))}}),paint:u=>Rn({layer:Wt,key:u.key,value:u.value,style:u.style,styleSpec:u.styleSpec,validateSpec:u.validateSpec,objectElementValidators:{"*":u=>Yn(st({layerType:Ar},u))}})}})),Xe}function Qn(u){const Xe=u.value,Wt=u.key,fr=un(Xe);return"string"!==fr?[new it(Wt,Xe,`string expected, ${fr} found`)]:[]}const Iu={promoteId:function({key:u,value:Xe}){if("string"===un(Xe))return Qn({key:u,value:Xe});{const Wt=[];for(const fr in Xe)Wt.push(...Qn({key:`${u}.${fr}`,value:Xe[fr]}));return Wt}}};function ei(u){const Xe=u.value,Wt=u.key,fr=u.styleSpec,_r=u.style,wr=u.validateSpec;if(!Xe.type)return[new it(Wt,Xe,'"type" is required')];const Ar=On(Xe.type);let Kr;switch(Ar){case"vector":case"raster":return Kr=Rn({key:Wt,value:Xe,valueSpec:fr[`source_${Ar.replace("-","_")}`],style:u.style,styleSpec:fr,objectElementValidators:Iu,validateSpec:wr}),Kr;case"raster-dem":return Kr=function(u){var Xe;const Wt=null!==(Xe=u.sourceName)&&void 0!==Xe?Xe:"",fr=u.value,_r=u.styleSpec,wr=_r.source_raster_dem,Ar=u.style;let Kr=[];const In=un(fr);if(void 0===fr)return Kr;if("object"!==In)return Kr.push(new it("source_raster_dem",fr,`object expected, ${In} found`)),Kr;const no="custom"===On(fr.encoding),io=["redFactor","greenFactor","blueFactor","baseShift"],oo=u.value.encoding?`"${u.value.encoding}"`:"Default";for(const Xe in fr)!no&&io.includes(Xe)?Kr.push(new it(Xe,fr[Xe],`In "${Wt}": "${Xe}" is only valid when "encoding" is set to "custom". ${oo} encoding found`)):wr[Xe]?Kr=Kr.concat(u.validateSpec({key:Xe,value:fr[Xe],valueSpec:wr[Xe],validateSpec:u.validateSpec,style:Ar,styleSpec:_r})):Kr.push(new it(Xe,fr[Xe],`unknown property "${Xe}"`));return Kr}({sourceName:Wt,value:Xe,style:u.style,styleSpec:fr,validateSpec:wr}),Kr;case"geojson":if(Kr=Rn({key:Wt,value:Xe,valueSpec:fr.source_geojson,style:_r,styleSpec:fr,validateSpec:wr,objectElementValidators:Iu}),Xe.cluster)for(const u in Xe.clusterProperties){const[fr,_r]=Xe.clusterProperties[u],Ar="string"==typeof fr?[fr,["accumulated"],["get",u]]:fr;Kr.push(...Zn({key:`${Wt}.${u}.map`,value:_r,validateSpec:wr,expressionContext:"cluster-map"})),Kr.push(...Zn({key:`${Wt}.${u}.reduce`,value:Ar,validateSpec:wr,expressionContext:"cluster-reduce"}))}return Kr;case"video":return Rn({key:Wt,value:Xe,valueSpec:fr.source_video,style:_r,validateSpec:wr,styleSpec:fr});case"image":return Rn({key:Wt,value:Xe,valueSpec:fr.source_image,style:_r,validateSpec:wr,styleSpec:fr});case"canvas":return[new it(Wt,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return Gn({key:`${Wt}.type`,value:Xe.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]},style:_r,validateSpec:wr,styleSpec:fr})}}function ri(u){const Xe=u.value,Wt=u.styleSpec,fr=Wt.light,_r=u.style;let wr=[];const Ar=un(Xe);if(void 0===Xe)return wr;if("object"!==Ar)return wr=wr.concat([new it("light",Xe,`object expected, ${Ar} found`)]),wr;for(const Ar in Xe){const Kr=Ar.match(/^(.*)-transition$/);wr=wr.concat(Kr&&fr[Kr[1]]&&fr[Kr[1]].transition?u.validateSpec({key:Ar,value:Xe[Ar],valueSpec:Wt.transition,validateSpec:u.validateSpec,style:_r,styleSpec:Wt}):fr[Ar]?u.validateSpec({key:Ar,value:Xe[Ar],valueSpec:fr[Ar],validateSpec:u.validateSpec,style:_r,styleSpec:Wt}):[new it(Ar,Xe[Ar],`unknown property "${Ar}"`)])}return wr}function ni(u){const Xe=u.value,Wt=u.styleSpec,fr=Wt.sky,_r=u.style,wr=un(Xe);if(void 0===Xe)return[];if("object"!==wr)return[new it("sky",Xe,`object expected, ${wr} found`)];let Ar=[];for(const wr in Xe)Ar=Ar.concat(fr[wr]?u.validateSpec({key:wr,value:Xe[wr],valueSpec:fr[wr],style:_r,styleSpec:Wt}):[new it(wr,Xe[wr],`unknown property "${wr}"`)]);return Ar}function ii(u){const Xe=u.value,Wt=u.styleSpec,fr=Wt.terrain,_r=u.style;let wr=[];const Ar=un(Xe);if(void 0===Xe)return wr;if("object"!==Ar)return wr=wr.concat([new it("terrain",Xe,`object expected, ${Ar} found`)]),wr;for(const Ar in Xe)wr=wr.concat(fr[Ar]?u.validateSpec({key:Ar,value:Xe[Ar],valueSpec:fr[Ar],validateSpec:u.validateSpec,style:_r,styleSpec:Wt}):[new it(Ar,Xe[Ar],`unknown property "${Ar}"`)]);return wr}function si(u){let Xe=[];const Wt=u.value,fr=u.key;if(Array.isArray(Wt)){const _r=[],wr=[];for(const Ar in Wt)Wt[Ar].id&&_r.includes(Wt[Ar].id)&&Xe.push(new it(fr,Wt,`all the sprites' ids must be unique, but ${Wt[Ar].id} is duplicated`)),_r.push(Wt[Ar].id),Wt[Ar].url&&wr.includes(Wt[Ar].url)&&Xe.push(new it(fr,Wt,`all the sprites' URLs must be unique, but ${Wt[Ar].url} is duplicated`)),wr.push(Wt[Ar].url),Xe=Xe.concat(Rn({key:`${fr}[${Ar}]`,value:Wt[Ar],valueSpec:{id:{type:"string",required:!0},url:{type:"string",required:!0}},validateSpec:u.validateSpec}));return Xe}return Qn({key:fr,value:Wt})}const zu={"*":()=>[],array:Un,boolean:function(u){const Xe=u.value,Wt=u.key,fr=un(Xe);return"boolean"!==fr?[new it(Wt,Xe,`boolean expected, ${fr} found`)]:[]},number:qn,color:function(u){const Xe=u.key,Wt=u.value,fr=un(Wt);return"string"!==fr?[new it(Xe,Wt,`color expected, ${fr} found`)]:Kt.parse(String(Wt))?[]:[new it(Xe,Wt,`color expected, "${Wt}" found`)]},constants:Dn,enum:Gn,filter:Kn,function:Nn,layer:Wn,object:Rn,source:ei,light:ri,sky:ni,terrain:ii,projection:function(u){const Xe=u.value,Wt=u.styleSpec,fr=Wt.projection,_r=u.style,wr=un(Xe);if(void 0===Xe)return[];if("object"!==wr)return[new it("projection",Xe,`object expected, ${wr} found`)];let Ar=[];for(const wr in Xe)Ar=Ar.concat(fr[wr]?u.validateSpec({key:wr,value:Xe[wr],valueSpec:fr[wr],style:_r,styleSpec:Wt}):[new it(wr,Xe[wr],`unknown property "${wr}"`)]);return Ar},string:Qn,formatted:function(u){return 0===Qn(u).length?[]:Zn(u)},resolvedImage:function(u){return 0===Qn(u).length?[]:Zn(u)},padding:function(u){const Xe=u.key,Wt=u.value;if("array"===un(Wt)){if(Wt.length<1||Wt.length>4)return[new it(Xe,Wt,`padding requires 1 to 4 values; ${Wt.length} values found`)];const fr={type:"number"};let _r=[];for(let wr=0;wr<Wt.length;wr++)_r=_r.concat(u.validateSpec({key:`${Xe}[${wr}]`,value:Wt[wr],validateSpec:u.validateSpec,valueSpec:fr}));return _r}return qn({key:Xe,value:Wt,valueSpec:{}})},variableAnchorOffsetCollection:function(u){const Xe=u.key,Wt=u.value,fr=un(Wt),_r=u.styleSpec;if("array"!==fr||Wt.length<1||Wt.length%2!=0)return[new it(Xe,Wt,"variableAnchorOffsetCollection requires a non-empty array of even length")];let wr=[];for(let fr=0;fr<Wt.length;fr+=2)wr=wr.concat(Gn({key:`${Xe}[${fr}]`,value:Wt[fr],valueSpec:_r.layout_symbol["text-anchor"]})),wr=wr.concat(Un({key:`${Xe}[${fr+1}]`,value:Wt[fr+1],valueSpec:{length:2,value:"number"},validateSpec:u.validateSpec,style:u.style,styleSpec:_r}));return wr},sprite:si};function oi(u){const Xe=u.value,Wt=u.valueSpec,fr=u.styleSpec;return u.validateSpec=oi,Wt.expression&&cn(On(Xe))?Nn(u):Wt.expression&&vn(jn(Xe))?Zn(u):Wt.type&&zu[Wt.type]?zu[Wt.type](u):Rn(st({},u,{valueSpec:Wt.type?fr[Wt.type]:Wt}))}function li(u){const Xe=u.value,Wt=u.key,fr=Qn(u);return fr.length||(-1===Xe.indexOf("{fontstack}")&&fr.push(new it(Wt,Xe,'"glyphs" url must include a "{fontstack}" token')),-1===Xe.indexOf("{range}")&&fr.push(new it(Wt,Xe,'"glyphs" url must include a "{range}" token'))),fr}function ui(u,Xe=xo){let Wt=[];return Wt=Wt.concat(oi({key:"",value:u,valueSpec:Xe.$root,styleSpec:Xe,style:u,validateSpec:oi,objectElementValidators:{glyphs:li,"*":()=>[]}})),u.constants&&(Wt=Wt.concat(Dn({key:"constants",value:u.constants,style:u,styleSpec:Xe,validateSpec:oi}))),hi(Wt)}function ci(u){return function(Xe){return u({...Xe,validateSpec:oi})}}function hi(u){return[].concat(u).sort(((u,Xe)=>u.line-Xe.line))}function pi(u){return function(...Xe){return hi(u.apply(this,Xe))}}ui.source=pi(ci(ei)),ui.sprite=pi(ci(si)),ui.glyphs=pi(ci(li)),ui.light=pi(ci(ri)),ui.sky=pi(ci(ni)),ui.terrain=pi(ci(ii)),ui.layer=pi(ci(Wn)),ui.filter=pi(ci(Kn)),ui.paintProperty=pi(ci(Yn)),ui.layoutProperty=pi(ci(Jn));const Lu=ui,Du=Lu.light,Fu=Lu.sky,Nu=Lu.paintProperty,Vu=Lu.layoutProperty;function xi(u,Xe){let Wt=!1;if(Xe&&Xe.length)for(const fr of Xe)u.fire(new N(new Error(fr.message))),Wt=!0;return Wt}class vi{constructor(u,Xe,Wt){const fr=this.cells=[];if(u instanceof ArrayBuffer){this.arrayBuffer=u;const _r=new Int32Array(this.arrayBuffer);u=_r[0],this.d=(Xe=_r[1])+2*(Wt=_r[2]);for(let u=0;u<this.d*this.d;u++){const Xe=_r[3+u],Wt=_r[3+u+1];fr.push(Xe===Wt?null:_r.subarray(Xe,Wt))}const wr=_r[3+fr.length+1];this.keys=_r.subarray(_r[3+fr.length],wr),this.bboxes=_r.subarray(wr),this.insert=this._insertReadonly}else{this.d=Xe+2*Wt;for(let u=0;u<this.d*this.d;u++)fr.push([]);this.keys=[],this.bboxes=[]}this.n=Xe,this.extent=u,this.padding=Wt,this.scale=Xe/u,this.uid=0;const _r=Wt/Xe*u;this.min=-_r,this.max=u+_r}insert(u,Xe,Wt,fr,_r){this._forEachCell(Xe,Wt,fr,_r,this._insertCell,this.uid++,void 0,void 0),this.keys.push(u),this.bboxes.push(Xe),this.bboxes.push(Wt),this.bboxes.push(fr),this.bboxes.push(_r)}_insertReadonly(){throw new Error("Cannot insert into a GridIndex created from an ArrayBuffer.")}_insertCell(u,Xe,Wt,fr,_r,wr){this.cells[_r].push(wr)}query(u,Xe,Wt,fr,_r){const wr=this.min,Ar=this.max;if(u<=wr&&Xe<=wr&&Ar<=Wt&&Ar<=fr&&!_r)return Array.prototype.slice.call(this.keys);{const wr=[];return this._forEachCell(u,Xe,Wt,fr,this._queryCell,wr,{},_r),wr}}_queryCell(u,Xe,Wt,fr,_r,wr,Ar,Kr){const In=this.cells[_r];if(null!==In){const _r=this.keys,no=this.bboxes;for(let io=0;io<In.length;io++){const oo=In[io];if(void 0===Ar[oo]){const In=4*oo;(Kr?Kr(no[In+0],no[In+1],no[In+2],no[In+3]):u<=no[In+2]&&Xe<=no[In+3]&&Wt>=no[In+0]&&fr>=no[In+1])?(Ar[oo]=!0,wr.push(_r[oo])):Ar[oo]=!1}}}}_forEachCell(u,Xe,Wt,fr,_r,wr,Ar,Kr){const In=this._convertToCellCoord(u),no=this._convertToCellCoord(Xe),io=this._convertToCellCoord(Wt),oo=this._convertToCellCoord(fr);for(let ao=In;ao<=io;ao++)for(let In=no;In<=oo;In++){const no=this.d*In+ao;if((!Kr||Kr(this._convertFromCellCoord(ao),this._convertFromCellCoord(In),this._convertFromCellCoord(ao+1),this._convertFromCellCoord(In+1)))&&_r.call(this,u,Xe,Wt,fr,no,wr,Ar,Kr))return}}_convertFromCellCoord(u){return(u-this.padding)/this.scale}_convertToCellCoord(u){return Math.max(0,Math.min(this.d-1,Math.floor(u*this.scale)+this.padding))}toArrayBuffer(){if(this.arrayBuffer)return this.arrayBuffer;const u=this.cells,Xe=3+this.cells.length+1+1;let Wt=0;for(let u=0;u<this.cells.length;u++)Wt+=this.cells[u].length;const fr=new Int32Array(Xe+Wt+this.keys.length+this.bboxes.length);fr[0]=this.extent,fr[1]=this.n,fr[2]=this.padding;let _r=Xe;for(let Xe=0;Xe<u.length;Xe++){const Wt=u[Xe];fr[3+Xe]=_r,fr.set(Wt,_r),_r+=Wt.length}return fr[3+u.length]=_r,fr.set(this.keys,_r),_r+=this.keys.length,fr[3+u.length+1]=_r,fr.set(this.bboxes,_r),_r+=this.bboxes.length,fr.buffer}static serialize(u,Xe){const Wt=u.toArrayBuffer();return Xe&&Xe.push(Wt),{buffer:Wt}}static deserialize(u){return new vi(u.buffer)}}const Uu={};function wi(u,Xe,Wt={}){if(Uu[u])throw new Error(`${u} is already registered.`);Object.defineProperty(Xe,"_classRegistryKey",{value:u,writeable:!1}),Uu[u]={klass:Xe,omit:Wt.omit||[],shallow:Wt.shallow||[]}}wi("Object",Object),wi("TransferableGridIndex",vi),wi("Color",Kt),wi("Error",Error),wi("AJAXError",L),wi("ResolvedImage",te),wi("StylePropertyFunction",Sn),wi("StyleExpression",xn,{omit:["_evaluator"]}),wi("ZoomDependentExpression",_n),wi("ZoomConstantExpression",wn),wi("CompoundExpression",Xr,{omit:["_evaluate"]});for(const u in uu)uu[u]._classRegistryKey||wi(`Expression_${u}`,uu[u]);function _i(u){return u&&"undefined"!=typeof ArrayBuffer&&(u instanceof ArrayBuffer||u.constructor&&"ArrayBuffer"===u.constructor.name)}function Ai(u){return u.$name||u.constructor._classRegistryKey}function Si(u){return!function(u){if(null===u||"object"!=typeof u)return!1;const Xe=Ai(u);return!(!Xe||"Object"===Xe)}(u)&&(null==u||"boolean"==typeof u||"number"==typeof u||"string"==typeof u||u instanceof Boolean||u instanceof Number||u instanceof String||u instanceof Date||u instanceof RegExp||u instanceof Blob||u instanceof Error||_i(u)||I(u)||ArrayBuffer.isView(u)||u instanceof ImageData)}function ki(u,Xe){if(Si(u))return(_i(u)||I(u))&&Xe&&Xe.push(u),ArrayBuffer.isView(u)&&Xe&&Xe.push(u.buffer),u instanceof ImageData&&Xe&&Xe.push(u.data.buffer),u;if(Array.isArray(u)){const Wt=[];for(const fr of u)Wt.push(ki(fr,Xe));return Wt}if("object"!=typeof u)throw new Error("can't serialize object of type "+typeof u);const Wt=Ai(u);if(!Wt)throw new Error(`can't serialize object of unregistered class ${u.constructor.name}`);if(!Uu[Wt])throw new Error(`${Wt} is not registered.`);const{klass:fr}=Uu[Wt],_r=fr.serialize?fr.serialize(u,Xe):{};if(fr.serialize){if(Xe&&_r===Xe[Xe.length-1])throw new Error("statically serialized object won't survive transfer of $name property")}else{for(const fr in u){if(!u.hasOwnProperty(fr))continue;if(Uu[Wt].omit.indexOf(fr)>=0)continue;const wr=u[fr];_r[fr]=Uu[Wt].shallow.indexOf(fr)>=0?wr:ki(wr,Xe)}u instanceof Error&&(_r.message=u.message)}if(_r.$name)throw new Error("$name property is reserved for worker serialization logic.");return"Object"!==Wt&&(_r.$name=Wt),_r}function Mi(u){if(Si(u))return u;if(Array.isArray(u))return u.map(Mi);if("object"!=typeof u)throw new Error("can't deserialize object of type "+typeof u);const Xe=Ai(u)||"Object";if(!Uu[Xe])throw new Error(`can't deserialize unregistered class ${Xe}`);const{klass:Wt}=Uu[Xe];if(!Wt)throw new Error(`can't deserialize unregistered class ${Xe}`);if(Wt.deserialize)return Wt.deserialize(u);const fr=Object.create(Wt.prototype);for(const Wt of Object.keys(u)){if("$name"===Wt)continue;const _r=u[Wt];fr[Wt]=Uu[Xe].shallow.indexOf(Wt)>=0?_r:Mi(_r)}return fr}class Ii{constructor(){this.first=!0}update(u,Xe){const Wt=Math.floor(u);return this.first?(this.first=!1,this.lastIntegerZoom=Wt,this.lastIntegerZoomTime=0,this.lastZoom=u,this.lastFloorZoom=Wt,!0):(this.lastFloorZoom>Wt?(this.lastIntegerZoom=Wt+1,this.lastIntegerZoomTime=Xe):this.lastFloorZoom<Wt&&(this.lastIntegerZoom=Wt,this.lastIntegerZoomTime=Xe),u!==this.lastZoom&&(this.lastZoom=u,this.lastFloorZoom=Wt,!0))}}const qu={"Latin-1 Supplement":u=>u>=128&&u<=255,"Hangul Jamo":u=>u>=4352&&u<=4607,Khmer:u=>u>=6016&&u<=6143,"General Punctuation":u=>u>=8192&&u<=8303,"Letterlike Symbols":u=>u>=8448&&u<=8527,"Number Forms":u=>u>=8528&&u<=8591,"Miscellaneous Technical":u=>u>=8960&&u<=9215,"Control Pictures":u=>u>=9216&&u<=9279,"Optical Character Recognition":u=>u>=9280&&u<=9311,"Enclosed Alphanumerics":u=>u>=9312&&u<=9471,"Geometric Shapes":u=>u>=9632&&u<=9727,"Miscellaneous Symbols":u=>u>=9728&&u<=9983,"Miscellaneous Symbols and Arrows":u=>u>=11008&&u<=11263,"Ideographic Description Characters":u=>u>=12272&&u<=12287,"CJK Symbols and Punctuation":u=>u>=12288&&u<=12351,Katakana:u=>u>=12448&&u<=12543,Kanbun:u=>u>=12688&&u<=12703,"CJK Strokes":u=>u>=12736&&u<=12783,"Enclosed CJK Letters and Months":u=>u>=12800&&u<=13055,"CJK Compatibility":u=>u>=13056&&u<=13311,"Yijing Hexagram Symbols":u=>u>=19904&&u<=19967,"Private Use Area":u=>u>=57344&&u<=63743,"Vertical Forms":u=>u>=65040&&u<=65055,"CJK Compatibility Forms":u=>u>=65072&&u<=65103,"Small Form Variants":u=>u>=65104&&u<=65135,"Halfwidth and Fullwidth Forms":u=>u>=65280&&u<=65519};function Pi(u){for(const Xe of u)if(Ti(Xe.charCodeAt(0)))return!0;return!1}function Ci(u){for(const Xe of u)if(!Ei(Xe.charCodeAt(0)))return!1;return!0}function Bi(u){const Xe=u.map((u=>{try{return new RegExp(`\\p{sc=${u}}`,"u").source}catch(u){return null}})).filter((u=>u));return new RegExp(Xe.join("|"),"u")}const td=Bi(["Arab","Dupl","Mong","Ougr","Syrc"]);function Ei(u){return!td.test(String.fromCodePoint(u))}const id=Bi(["Bopo","Hani","Hira","Kana","Kits","Nshu","Tang","Yiii"]);function Ti(u){return!(746!==u&&747!==u&&(u<4352||!(qu["CJK Compatibility Forms"](u)&&!(u>=65097&&u<=65103)||qu["CJK Compatibility"](u)||qu["CJK Strokes"](u)||!(!qu["CJK Symbols and Punctuation"](u)||u>=12296&&u<=12305||u>=12308&&u<=12319||12336===u)||qu["Enclosed CJK Letters and Months"](u)||qu["Ideographic Description Characters"](u)||qu.Kanbun(u)||qu.Katakana(u)&&12540!==u||!(!qu["Halfwidth and Fullwidth Forms"](u)||65288===u||65289===u||65293===u||u>=65306&&u<=65310||65339===u||65341===u||65343===u||u>=65371&&u<=65503||65507===u||u>=65512&&u<=65519)||!(!qu["Small Form Variants"](u)||u>=65112&&u<=65118||u>=65123&&u<=65126)||qu["Vertical Forms"](u)||qu["Yijing Hexagram Symbols"](u)||/\p{sc=Cans}/u.test(String.fromCodePoint(u))||/\p{sc=Hang}/u.test(String.fromCodePoint(u))||id.test(String.fromCodePoint(u)))))}function $i(u){return!(Ti(u)||function(u){return!!(qu["Latin-1 Supplement"](u)&&(167===u||169===u||174===u||177===u||188===u||189===u||190===u||215===u||247===u)||qu["General Punctuation"](u)&&(8214===u||8224===u||8225===u||8240===u||8241===u||8251===u||8252===u||8258===u||8263===u||8264===u||8265===u||8273===u)||qu["Letterlike Symbols"](u)||qu["Number Forms"](u)||qu["Miscellaneous Technical"](u)&&(u>=8960&&u<=8967||u>=8972&&u<=8991||u>=8996&&u<=9e3||9003===u||u>=9085&&u<=9114||u>=9150&&u<=9165||9167===u||u>=9169&&u<=9179||u>=9186&&u<=9215)||qu["Control Pictures"](u)&&9251!==u||qu["Optical Character Recognition"](u)||qu["Enclosed Alphanumerics"](u)||qu["Geometric Shapes"](u)||qu["Miscellaneous Symbols"](u)&&!(u>=9754&&u<=9759)||qu["Miscellaneous Symbols and Arrows"](u)&&(u>=11026&&u<=11055||u>=11088&&u<=11097||u>=11192&&u<=11243)||qu["CJK Symbols and Punctuation"](u)||qu.Katakana(u)||qu["Private Use Area"](u)||qu["CJK Compatibility Forms"](u)||qu["Small Form Variants"](u)||qu["Halfwidth and Fullwidth Forms"](u)||8734===u||8756===u||8757===u||u>=9984&&u<=10087||u>=10102&&u<=10131||65532===u||65533===u)}(u))}const sd=Bi(["Adlm","Arab","Armi","Avst","Chrs","Cprt","Egyp","Elym","Gara","Hatr","Hebr","Hung","Khar","Lydi","Mand","Mani","Mend","Merc","Mero","Narb","Nbat","Nkoo","Orkh","Palm","Phli","Phlp","Phnx","Prti","Rohg","Samr","Sarb","Sogo","Syrc","Thaa","Todr","Yezi"]);function Di(u){return sd.test(String.fromCodePoint(u))}function Oi(u,Xe){return!(!Xe&&Di(u)||u>=2304&&u<=3583||u>=3840&&u<=4255||qu.Khmer(u))}function ji(u){for(const Xe of u)if(Di(Xe.charCodeAt(0)))return!0;return!1}const ld=new class{constructor(){this.applyArabicShaping=null,this.processBidirectionalText=null,this.processStyledBidirectionalText=null,this.pluginStatus="unavailable",this.pluginURL=null}setState(u){this.pluginStatus=u.pluginStatus,this.pluginURL=u.pluginURL}getState(){return{pluginStatus:this.pluginStatus,pluginURL:this.pluginURL}}setMethods(u){this.applyArabicShaping=u.applyArabicShaping,this.processBidirectionalText=u.processBidirectionalText,this.processStyledBidirectionalText=u.processStyledBidirectionalText}isParsed(){return null!=this.applyArabicShaping&&null!=this.processBidirectionalText&&null!=this.processStyledBidirectionalText}getPluginURL(){return this.pluginURL}getRTLTextPluginStatus(){return this.pluginStatus}};class Ui{constructor(u,Xe){this.zoom=u,Xe?(this.now=Xe.now,this.fadeDuration=Xe.fadeDuration,this.zoomHistory=Xe.zoomHistory,this.transition=Xe.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new Ii,this.transition={})}isSupportedScript(u){return function(u,Xe){for(const Wt of u)if(!Oi(Wt.charCodeAt(0),Xe))return!1;return!0}(u,"loaded"===ld.getRTLTextPluginStatus())}crossFadingFactor(){return 0===this.fadeDuration?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)}getCrossfadeParameters(){const u=this.zoom,Xe=u-Math.floor(u),Wt=this.crossFadingFactor();return u>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:Xe+(1-Xe)*Wt}:{fromScale:.5,toScale:1,t:1-(1-Wt)*Xe}}}class qi{constructor(u,Xe){this.property=u,this.value=Xe,this.expression=function(u,Xe){if(cn(u))return new Sn(u,Xe);if(vn(u)){const Wt=An(u,Xe);if("error"===Wt.result)throw new Error(Wt.value.map((u=>`${u.key}: ${u.message}`)).join(", "));return Wt.value}{let Wt=u;return"color"===Xe.type&&"string"==typeof u?Wt=Kt.parse(u):"padding"!==Xe.type||"number"!=typeof u&&!Array.isArray(u)?"variableAnchorOffsetCollection"===Xe.type&&Array.isArray(u)&&(Wt=Qt.parse(u)):Wt=Jt.parse(u),{kind:"constant",evaluate:()=>Wt}}}(void 0===Xe?u.specification.default:Xe,u.specification)}isDataDriven(){return"source"===this.expression.kind||"composite"===this.expression.kind}possiblyEvaluate(u,Xe,Wt){return this.property.possiblyEvaluate(this,u,Xe,Wt)}}class Ni{constructor(u){this.property=u,this.value=new qi(u,void 0)}transitioned(u,Xe){return new Gi(this.property,this.value,Xe,g({},u.transition,this.transition),u.now)}untransitioned(){return new Gi(this.property,this.value,null,{},0)}}class Zi{constructor(u){this._properties=u,this._values=Object.create(u.defaultTransitionablePropertyValues)}getValue(u){return w(this._values[u].value.value)}setValue(u,Xe){Object.prototype.hasOwnProperty.call(this._values,u)||(this._values[u]=new Ni(this._values[u].property)),this._values[u].value=new qi(this._values[u].property,null===Xe?void 0:w(Xe))}getTransition(u){return w(this._values[u].transition)}setTransition(u,Xe){Object.prototype.hasOwnProperty.call(this._values,u)||(this._values[u]=new Ni(this._values[u].property)),this._values[u].transition=w(Xe)||void 0}serialize(){const u={};for(const Xe of Object.keys(this._values)){const Wt=this.getValue(Xe);void 0!==Wt&&(u[Xe]=Wt);const fr=this.getTransition(Xe);void 0!==fr&&(u[`${Xe}-transition`]=fr)}return u}transitioned(u,Xe){const Wt=new Ki(this._properties);for(const fr of Object.keys(this._values))Wt._values[fr]=this._values[fr].transitioned(u,Xe._values[fr]);return Wt}untransitioned(){const u=new Ki(this._properties);for(const Xe of Object.keys(this._values))u._values[Xe]=this._values[Xe].untransitioned();return u}}class Gi{constructor(u,Xe,Wt,fr,_r){this.property=u,this.value=Xe,this.begin=_r+fr.delay||0,this.end=this.begin+fr.duration||0,u.specification.transition&&(fr.delay||fr.duration)&&(this.prior=Wt)}possiblyEvaluate(u,Xe,Wt){const fr=u.now||0,_r=this.value.possiblyEvaluate(u,Xe,Wt),wr=this.prior;if(wr){if(fr>this.end)return this.prior=null,_r;if(this.value.isDataDriven())return this.prior=null,_r;if(fr<this.begin)return wr.possiblyEvaluate(u,Xe,Wt);{const Ar=(fr-this.begin)/(this.end-this.begin);return this.property.interpolate(wr.possiblyEvaluate(u,Xe,Wt),_r,function(u){if(u<=0)return 0;if(u>=1)return 1;const Xe=u*u,Wt=Xe*u;return 4*(u<.5?Wt:3*(u-Xe)+Wt-.75)}(Ar))}}return _r}}class Ki{constructor(u){this._properties=u,this._values=Object.create(u.defaultTransitioningPropertyValues)}possiblyEvaluate(u,Xe,Wt){const fr=new Yi(this._properties);for(const _r of Object.keys(this._values))fr._values[_r]=this._values[_r].possiblyEvaluate(u,Xe,Wt);return fr}hasTransition(){for(const u of Object.keys(this._values))if(this._values[u].prior)return!0;return!1}}class Xi{constructor(u){this._properties=u,this._values=Object.create(u.defaultPropertyValues)}hasValue(u){return void 0!==this._values[u].value}getValue(u){return w(this._values[u].value)}setValue(u,Xe){this._values[u]=new qi(this._values[u].property,null===Xe?void 0:w(Xe))}serialize(){const u={};for(const Xe of Object.keys(this._values)){const Wt=this.getValue(Xe);void 0!==Wt&&(u[Xe]=Wt)}return u}possiblyEvaluate(u,Xe,Wt){const fr=new Yi(this._properties);for(const _r of Object.keys(this._values))fr._values[_r]=this._values[_r].possiblyEvaluate(u,Xe,Wt);return fr}}class Hi{constructor(u,Xe,Wt){this.property=u,this.value=Xe,this.parameters=Wt}isConstant(){return"constant"===this.value.kind}constantOr(u){return"constant"===this.value.kind?this.value.value:u}evaluate(u,Xe,Wt,fr){return this.property.evaluate(this.value,this.parameters,u,Xe,Wt,fr)}}class Yi{constructor(u){this._properties=u,this._values=Object.create(u.defaultPossiblyEvaluatedValues)}get(u){return this._values[u]}}class Ji{constructor(u){this.specification=u}possiblyEvaluate(u,Xe){if(u.isDataDriven())throw new Error("Value should not be data driven");return u.expression.evaluate(Xe)}interpolate(u,Xe,Wt){const fr=rc[this.specification.type];return fr?fr(u,Xe,Wt):u}}class Wi{constructor(u,Xe){this.specification=u,this.overrides=Xe}possiblyEvaluate(u,Xe,Wt,fr){return new Hi(this,"constant"===u.expression.kind||"camera"===u.expression.kind?{kind:"constant",value:u.expression.evaluate(Xe,null,{},Wt,fr)}:u.expression,Xe)}interpolate(u,Xe,Wt){if("constant"!==u.value.kind||"constant"!==Xe.value.kind)return u;if(void 0===u.value.value||void 0===Xe.value.value)return new Hi(this,{kind:"constant",value:void 0},u.parameters);const fr=rc[this.specification.type];if(fr){const _r=fr(u.value.value,Xe.value.value,Wt);return new Hi(this,{kind:"constant",value:_r},u.parameters)}return u}evaluate(u,Xe,Wt,fr,_r,wr){return"constant"===u.kind?u.value:u.evaluate(Xe,Wt,fr,_r,wr)}}class Qi extends Wi{possiblyEvaluate(u,Xe,Wt,fr){if(void 0===u.value)return new Hi(this,{kind:"constant",value:void 0},Xe);if("constant"===u.expression.kind){const _r=u.expression.evaluate(Xe,null,{},Wt,fr),wr="resolvedImage"===u.property.specification.type&&"string"!=typeof _r?_r.name:_r,Ar=this._calculate(wr,wr,wr,Xe);return new Hi(this,{kind:"constant",value:Ar},Xe)}if("camera"===u.expression.kind){const Wt=this._calculate(u.expression.evaluate({zoom:Xe.zoom-1}),u.expression.evaluate({zoom:Xe.zoom}),u.expression.evaluate({zoom:Xe.zoom+1}),Xe);return new Hi(this,{kind:"constant",value:Wt},Xe)}return new Hi(this,u.expression,Xe)}evaluate(u,Xe,Wt,fr,_r,wr){if("source"===u.kind){const Ar=u.evaluate(Xe,Wt,fr,_r,wr);return this._calculate(Ar,Ar,Ar,Xe)}return"composite"===u.kind?this._calculate(u.evaluate({zoom:Math.floor(Xe.zoom)-1},Wt,fr),u.evaluate({zoom:Math.floor(Xe.zoom)},Wt,fr),u.evaluate({zoom:Math.floor(Xe.zoom)+1},Wt,fr),Xe):u.value}_calculate(u,Xe,Wt,fr){return fr.zoom>fr.zoomHistory.lastIntegerZoom?{from:u,to:Xe}:{from:Wt,to:Xe}}interpolate(u){return u}}class ts{constructor(u){this.specification=u}possiblyEvaluate(u,Xe,Wt,fr){if(void 0!==u.value){if("constant"===u.expression.kind){const _r=u.expression.evaluate(Xe,null,{},Wt,fr);return this._calculate(_r,_r,_r,Xe)}return this._calculate(u.expression.evaluate(new Ui(Math.floor(Xe.zoom-1),Xe)),u.expression.evaluate(new Ui(Math.floor(Xe.zoom),Xe)),u.expression.evaluate(new Ui(Math.floor(Xe.zoom+1),Xe)),Xe)}}_calculate(u,Xe,Wt,fr){return fr.zoom>fr.zoomHistory.lastIntegerZoom?{from:u,to:Xe}:{from:Wt,to:Xe}}interpolate(u){return u}}class es{constructor(u){this.specification=u}possiblyEvaluate(u,Xe,Wt,fr){return!!u.expression.evaluate(Xe,null,{},Wt,fr)}interpolate(){return!1}}class rs{constructor(u){this.properties=u,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[];for(const Xe in u){const Wt=u[Xe];Wt.specification.overridable&&this.overridableProperties.push(Xe);const fr=this.defaultPropertyValues[Xe]=new qi(Wt,void 0),_r=this.defaultTransitionablePropertyValues[Xe]=new Ni(Wt);this.defaultTransitioningPropertyValues[Xe]=_r.untransitioned(),this.defaultPossiblyEvaluatedValues[Xe]=fr.possiblyEvaluate({})}}}wi("DataDrivenProperty",Wi),wi("DataConstantProperty",Ji),wi("CrossFadedDataDrivenProperty",Qi),wi("CrossFadedProperty",ts),wi("ColorRampProperty",es);const cd="-transition";class is extends Z{constructor(u,Xe){if(super(),this.id=u.id,this.type=u.type,this._featureFilter={filter:()=>!0,needGeometry:!1},"custom"!==u.type&&(this.metadata=u.metadata,this.minzoom=u.minzoom,this.maxzoom=u.maxzoom,"background"!==u.type&&(this.source=u.source,this.sourceLayer=u["source-layer"],this.filter=u.filter),Xe.layout&&(this._unevaluatedLayout=new Xi(Xe.layout)),Xe.paint)){this._transitionablePaint=new Zi(Xe.paint);for(const Xe in u.paint)this.setPaintProperty(Xe,u.paint[Xe],{validate:!1});for(const Xe in u.layout)this.setLayoutProperty(Xe,u.layout[Xe],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new Yi(Xe.paint)}}getCrossfadeParameters(){return this._crossfadeParameters}getLayoutProperty(u){return"visibility"===u?this.visibility:this._unevaluatedLayout.getValue(u)}setLayoutProperty(u,Xe,Wt={}){null!=Xe&&this._validate(Vu,`layers.${this.id}.layout.${u}`,u,Xe,Wt)||("visibility"!==u?this._unevaluatedLayout.setValue(u,Xe):this.visibility=Xe)}getPaintProperty(u){return u.endsWith(cd)?this._transitionablePaint.getTransition(u.slice(0,-11)):this._transitionablePaint.getValue(u)}setPaintProperty(u,Xe,Wt={}){if(null!=Xe&&this._validate(Nu,`layers.${this.id}.paint.${u}`,u,Xe,Wt))return!1;if(u.endsWith(cd))return this._transitionablePaint.setTransition(u.slice(0,-11),Xe||void 0),!1;{const Wt=this._transitionablePaint._values[u],fr="cross-faded-data-driven"===Wt.property.specification["property-type"],_r=Wt.value.isDataDriven(),wr=Wt.value;this._transitionablePaint.setValue(u,Xe),this._handleSpecialPaintPropertyUpdate(u);const Ar=this._transitionablePaint._values[u].value;return Ar.isDataDriven()||_r||fr||this._handleOverridablePaintPropertyUpdate(u,wr,Ar)}}_handleSpecialPaintPropertyUpdate(u){}_handleOverridablePaintPropertyUpdate(u,Xe,Wt){return!1}isHidden(u){return!!(this.minzoom&&u<this.minzoom)||!!(this.maxzoom&&u>=this.maxzoom)||"none"===this.visibility}updateTransitions(u){this._transitioningPaint=this._transitionablePaint.transitioned(u,this._transitioningPaint)}hasTransition(){return this._transitioningPaint.hasTransition()}recalculate(u,Xe){u.getCrossfadeParameters&&(this._crossfadeParameters=u.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(u,void 0,Xe)),this.paint=this._transitioningPaint.possiblyEvaluate(u,void 0,Xe)}serialize(){const u={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&&(u.layout=u.layout||{},u.layout.visibility=this.visibility),b(u,((u,Xe)=>!(void 0===u||"layout"===Xe&&!Object.keys(u).length||"paint"===Xe&&!Object.keys(u).length)))}_validate(u,Xe,Wt,fr,_r={}){return(!_r||!1!==_r.validate)&&xi(this,u.call(Lu,{key:Xe,layerType:this.type,objectKey:Wt,value:fr,styleSpec:xo,style:{glyphs:!0,sprite:!0}}))}is3D(){return!1}isTileClipped(){return!1}hasOffscreenPass(){return!1}resize(){}isStateDependent(){for(const u in this.paint._values){const Xe=this.paint.get(u);if(Xe instanceof Hi&&an(Xe.property.specification)&&("source"===Xe.value.kind||"composite"===Xe.value.kind)&&Xe.value.isStateDependent)return!0}return!1}}const ud={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array};class as{constructor(u,Xe){this._structArray=u,this._pos1=Xe*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8}}class os{constructor(){this.isTransferred=!1,this.capacity=-1,this.resize(0)}static serialize(u,Xe){return u._trim(),Xe&&(u.isTransferred=!0,Xe.push(u.arrayBuffer)),{length:u.length,arrayBuffer:u.arrayBuffer}}static deserialize(u){const Xe=Object.create(this.prototype);return Xe.arrayBuffer=u.arrayBuffer,Xe.length=u.length,Xe.capacity=u.arrayBuffer.byteLength/Xe.bytesPerElement,Xe._refreshViews(),Xe}_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(u){this.reserve(u),this.length=u}reserve(u){if(u>this.capacity){this.capacity=Math.max(u,Math.floor(5*this.capacity),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);const Xe=this.uint8;this._refreshViews(),Xe&&this.uint8.set(Xe)}}_refreshViews(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")}}function ls(u,Xe=1){let Wt=0,fr=0;return{members:u.map((u=>{const _r=ud[u.type].BYTES_PER_ELEMENT,wr=Wt=us(Wt,Math.max(Xe,_r)),Ar=u.components||1;return fr=Math.max(fr,_r),Wt+=_r*Ar,{name:u.name,type:u.type,components:Ar,offset:wr}})),size:us(Wt,Math.max(fr,Xe)),alignment:Xe}}function us(u,Xe){return Math.ceil(u/Xe)*Xe}class cs extends os{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(u,Xe){const Wt=this.length;return this.resize(Wt+1),this.emplace(Wt,u,Xe)}emplace(u,Xe,Wt){const fr=2*u;return this.int16[fr+0]=Xe,this.int16[fr+1]=Wt,u}}cs.prototype.bytesPerElement=4,wi("StructArrayLayout2i4",cs);class hs extends os{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(u,Xe,Wt){const fr=this.length;return this.resize(fr+1),this.emplace(fr,u,Xe,Wt)}emplace(u,Xe,Wt,fr){const _r=3*u;return this.int16[_r+0]=Xe,this.int16[_r+1]=Wt,this.int16[_r+2]=fr,u}}hs.prototype.bytesPerElement=6,wi("StructArrayLayout3i6",hs);class ps extends os{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(u,Xe,Wt,fr){const _r=this.length;return this.resize(_r+1),this.emplace(_r,u,Xe,Wt,fr)}emplace(u,Xe,Wt,fr,_r){const wr=4*u;return this.int16[wr+0]=Xe,this.int16[wr+1]=Wt,this.int16[wr+2]=fr,this.int16[wr+3]=_r,u}}ps.prototype.bytesPerElement=8,wi("StructArrayLayout4i8",ps);class fs extends os{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(u,Xe,Wt,fr,_r,wr){const Ar=this.length;return this.resize(Ar+1),this.emplace(Ar,u,Xe,Wt,fr,_r,wr)}emplace(u,Xe,Wt,fr,_r,wr,Ar){const Kr=6*u;return this.int16[Kr+0]=Xe,this.int16[Kr+1]=Wt,this.int16[Kr+2]=fr,this.int16[Kr+3]=_r,this.int16[Kr+4]=wr,this.int16[Kr+5]=Ar,u}}fs.prototype.bytesPerElement=12,wi("StructArrayLayout2i4i12",fs);class ds extends os{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(u,Xe,Wt,fr,_r,wr){const Ar=this.length;return this.resize(Ar+1),this.emplace(Ar,u,Xe,Wt,fr,_r,wr)}emplace(u,Xe,Wt,fr,_r,wr,Ar){const Kr=4*u,In=8*u;return this.int16[Kr+0]=Xe,this.int16[Kr+1]=Wt,this.uint8[In+4]=fr,this.uint8[In+5]=_r,this.uint8[In+6]=wr,this.uint8[In+7]=Ar,u}}ds.prototype.bytesPerElement=8,wi("StructArrayLayout2i4ub8",ds);class ys extends os{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(u,Xe){const Wt=this.length;return this.resize(Wt+1),this.emplace(Wt,u,Xe)}emplace(u,Xe,Wt){const fr=2*u;return this.float32[fr+0]=Xe,this.float32[fr+1]=Wt,u}}ys.prototype.bytesPerElement=8,wi("StructArrayLayout2f8",ys);class ms extends os{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(u,Xe,Wt,fr,_r,wr,Ar,Kr,In,no){const io=this.length;return this.resize(io+1),this.emplace(io,u,Xe,Wt,fr,_r,wr,Ar,Kr,In,no)}emplace(u,Xe,Wt,fr,_r,wr,Ar,Kr,In,no,io){const oo=10*u;return this.uint16[oo+0]=Xe,this.uint16[oo+1]=Wt,this.uint16[oo+2]=fr,this.uint16[oo+3]=_r,this.uint16[oo+4]=wr,this.uint16[oo+5]=Ar,this.uint16[oo+6]=Kr,this.uint16[oo+7]=In,this.uint16[oo+8]=no,this.uint16[oo+9]=io,u}}ms.prototype.bytesPerElement=20,wi("StructArrayLayout10ui20",ms);class gs extends os{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(u,Xe,Wt,fr,_r,wr,Ar,Kr,In,no,io,oo){const ao=this.length;return this.resize(ao+1),this.emplace(ao,u,Xe,Wt,fr,_r,wr,Ar,Kr,In,no,io,oo)}emplace(u,Xe,Wt,fr,_r,wr,Ar,Kr,In,no,io,oo,ao){const so=12*u;return this.int16[so+0]=Xe,this.int16[so+1]=Wt,this.int16[so+2]=fr,this.int16[so+3]=_r,this.uint16[so+4]=wr,this.uint16[so+5]=Ar,this.uint16[so+6]=Kr,this.uint16[so+7]=In,this.int16[so+8]=no,this.int16[so+9]=io,this.int16[so+10]=oo,this.int16[so+11]=ao,u}}gs.prototype.bytesPerElement=24,wi("StructArrayLayout4i4ui4i24",gs);class xs extends os{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(u,Xe,Wt){const fr=this.length;return this.resize(fr+1),this.emplace(fr,u,Xe,Wt)}emplace(u,Xe,Wt,fr){const _r=3*u;return this.float32[_r+0]=Xe,this.float32[_r+1]=Wt,this.float32[_r+2]=fr,u}}xs.prototype.bytesPerElement=12,wi("StructArrayLayout3f12",xs);class vs extends os{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)}emplaceBack(u){const Xe=this.length;return this.resize(Xe+1),this.emplace(Xe,u)}emplace(u,Xe){return this.uint32[1*u+0]=Xe,u}}vs.prototype.bytesPerElement=4,wi("StructArrayLayout1ul4",vs);class bs extends os{_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(u,Xe,Wt,fr,_r,wr,Ar,Kr,In){const no=this.length;return this.resize(no+1),this.emplace(no,u,Xe,Wt,fr,_r,wr,Ar,Kr,In)}emplace(u,Xe,Wt,fr,_r,wr,Ar,Kr,In,no){const io=10*u,oo=5*u;return this.int16[io+0]=Xe,this.int16[io+1]=Wt,this.int16[io+2]=fr,this.int16[io+3]=_r,this.int16[io+4]=wr,this.int16[io+5]=Ar,this.uint32[oo+3]=Kr,this.uint16[io+8]=In,this.uint16[io+9]=no,u}}bs.prototype.bytesPerElement=20,wi("StructArrayLayout6i1ul2ui20",bs);class ws extends os{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(u,Xe,Wt,fr,_r,wr){const Ar=this.length;return this.resize(Ar+1),this.emplace(Ar,u,Xe,Wt,fr,_r,wr)}emplace(u,Xe,Wt,fr,_r,wr,Ar){const Kr=6*u;return this.int16[Kr+0]=Xe,this.int16[Kr+1]=Wt,this.int16[Kr+2]=fr,this.int16[Kr+3]=_r,this.int16[Kr+4]=wr,this.int16[Kr+5]=Ar,u}}ws.prototype.bytesPerElement=12,wi("StructArrayLayout2i2i2i12",ws);class _s extends os{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(u,Xe,Wt,fr,_r){const wr=this.length;return this.resize(wr+1),this.emplace(wr,u,Xe,Wt,fr,_r)}emplace(u,Xe,Wt,fr,_r,wr){const Ar=4*u,Kr=8*u;return this.float32[Ar+0]=Xe,this.float32[Ar+1]=Wt,this.float32[Ar+2]=fr,this.int16[Kr+6]=_r,this.int16[Kr+7]=wr,u}}_s.prototype.bytesPerElement=16,wi("StructArrayLayout2f1f2i16",_s);class As extends os{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(u,Xe,Wt,fr,_r,wr){const Ar=this.length;return this.resize(Ar+1),this.emplace(Ar,u,Xe,Wt,fr,_r,wr)}emplace(u,Xe,Wt,fr,_r,wr,Ar){const Kr=16*u,In=4*u,no=8*u;return this.uint8[Kr+0]=Xe,this.uint8[Kr+1]=Wt,this.float32[In+1]=fr,this.float32[In+2]=_r,this.int16[no+6]=wr,this.int16[no+7]=Ar,u}}As.prototype.bytesPerElement=16,wi("StructArrayLayout2ub2f2i16",As);class Ss extends os{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(u,Xe,Wt){const fr=this.length;return this.resize(fr+1),this.emplace(fr,u,Xe,Wt)}emplace(u,Xe,Wt,fr){const _r=3*u;return this.uint16[_r+0]=Xe,this.uint16[_r+1]=Wt,this.uint16[_r+2]=fr,u}}Ss.prototype.bytesPerElement=6,wi("StructArrayLayout3ui6",Ss);class ks extends os{_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(u,Xe,Wt,fr,_r,wr,Ar,Kr,In,no,io,oo,ao,so,co,ho,go){const xo=this.length;return this.resize(xo+1),this.emplace(xo,u,Xe,Wt,fr,_r,wr,Ar,Kr,In,no,io,oo,ao,so,co,ho,go)}emplace(u,Xe,Wt,fr,_r,wr,Ar,Kr,In,no,io,oo,ao,so,co,ho,go,xo){const ko=24*u,Co=12*u,Io=48*u;return this.int16[ko+0]=Xe,this.int16[ko+1]=Wt,this.uint16[ko+2]=fr,this.uint16[ko+3]=_r,this.uint32[Co+2]=wr,this.uint32[Co+3]=Ar,this.uint32[Co+4]=Kr,this.uint16[ko+10]=In,this.uint16[ko+11]=no,this.uint16[ko+12]=io,this.float32[Co+7]=oo,this.float32[Co+8]=ao,this.uint8[Io+36]=so,this.uint8[Io+37]=co,this.uint8[Io+38]=ho,this.uint32[Co+10]=go,this.int16[ko+22]=xo,u}}ks.prototype.bytesPerElement=48,wi("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",ks);class Ms extends os{_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(u,Xe,Wt,fr,_r,wr,Ar,Kr,In,no,io,oo,ao,so,co,ho,go,xo,ko,Co,Io,zo,Bo,ca,ua,Da,ns,yl){const vl=this.length;return this.resize(vl+1),this.emplace(vl,u,Xe,Wt,fr,_r,wr,Ar,Kr,In,no,io,oo,ao,so,co,ho,go,xo,ko,Co,Io,zo,Bo,ca,ua,Da,ns,yl)}emplace(u,Xe,Wt,fr,_r,wr,Ar,Kr,In,no,io,oo,ao,so,co,ho,go,xo,ko,Co,Io,zo,Bo,ca,ua,Da,ns,yl,vl){const kl=32*u,Al=16*u;return this.int16[kl+0]=Xe,this.int16[kl+1]=Wt,this.int16[kl+2]=fr,this.int16[kl+3]=_r,this.int16[kl+4]=wr,this.int16[kl+5]=Ar,this.int16[kl+6]=Kr,this.int16[kl+7]=In,this.uint16[kl+8]=no,this.uint16[kl+9]=io,this.uint16[kl+10]=oo,this.uint16[kl+11]=ao,this.uint16[kl+12]=so,this.uint16[kl+13]=co,this.uint16[kl+14]=ho,this.uint16[kl+15]=go,this.uint16[kl+16]=xo,this.uint16[kl+17]=ko,this.uint16[kl+18]=Co,this.uint16[kl+19]=Io,this.uint16[kl+20]=zo,this.uint16[kl+21]=Bo,this.uint16[kl+22]=ca,this.uint32[Al+12]=ua,this.float32[Al+13]=Da,this.float32[Al+14]=ns,this.uint16[kl+30]=yl,this.uint16[kl+31]=vl,u}}Ms.prototype.bytesPerElement=64,wi("StructArrayLayout8i15ui1ul2f2ui64",Ms);class Is extends os{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(u){const Xe=this.length;return this.resize(Xe+1),this.emplace(Xe,u)}emplace(u,Xe){return this.float32[1*u+0]=Xe,u}}Is.prototype.bytesPerElement=4,wi("StructArrayLayout1f4",Is);class zs extends os{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(u,Xe,Wt){const fr=this.length;return this.resize(fr+1),this.emplace(fr,u,Xe,Wt)}emplace(u,Xe,Wt,fr){const _r=3*u;return this.uint16[6*u+0]=Xe,this.float32[_r+1]=Wt,this.float32[_r+2]=fr,u}}zs.prototype.bytesPerElement=12,wi("StructArrayLayout1ui2f12",zs);class Ps extends os{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(u,Xe,Wt){const fr=this.length;return this.resize(fr+1),this.emplace(fr,u,Xe,Wt)}emplace(u,Xe,Wt,fr){const _r=4*u;return this.uint32[2*u+0]=Xe,this.uint16[_r+2]=Wt,this.uint16[_r+3]=fr,u}}Ps.prototype.bytesPerElement=8,wi("StructArrayLayout1ul2ui8",Ps);class Cs extends os{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(u,Xe){const Wt=this.length;return this.resize(Wt+1),this.emplace(Wt,u,Xe)}emplace(u,Xe,Wt){const fr=2*u;return this.uint16[fr+0]=Xe,this.uint16[fr+1]=Wt,u}}Cs.prototype.bytesPerElement=4,wi("StructArrayLayout2ui4",Cs);class Bs extends os{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(u){const Xe=this.length;return this.resize(Xe+1),this.emplace(Xe,u)}emplace(u,Xe){return this.uint16[1*u+0]=Xe,u}}Bs.prototype.bytesPerElement=2,wi("StructArrayLayout1ui2",Bs);class Vs extends os{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(u,Xe,Wt,fr){const _r=this.length;return this.resize(_r+1),this.emplace(_r,u,Xe,Wt,fr)}emplace(u,Xe,Wt,fr,_r){const wr=4*u;return this.float32[wr+0]=Xe,this.float32[wr+1]=Wt,this.float32[wr+2]=fr,this.float32[wr+3]=_r,u}}Vs.prototype.bytesPerElement=16,wi("StructArrayLayout4f16",Vs);class Es extends as{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 Wt(this.anchorPointX,this.anchorPointY)}}Es.prototype.size=20;class Fs extends bs{get(u){return new Es(this,u)}}wi("CollisionBoxArray",Fs);class Ts extends as{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(u){this._structArray.uint8[this._pos1+37]=u}get hidden(){return this._structArray.uint8[this._pos1+38]}set hidden(u){this._structArray.uint8[this._pos1+38]=u}get crossTileID(){return this._structArray.uint32[this._pos4+10]}set crossTileID(u){this._structArray.uint32[this._pos4+10]=u}get associatedIconIndex(){return this._structArray.int16[this._pos2+22]}}Ts.prototype.size=48;class $s extends ks{get(u){return new Ts(this,u)}}wi("PlacedSymbolArray",$s);class Ls extends as{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(u){this._structArray.uint32[this._pos4+12]=u}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]}}Ls.prototype.size=64;class Ds extends Ms{get(u){return new Ls(this,u)}}wi("SymbolInstanceArray",Ds);class Os extends Is{getoffsetX(u){return this.float32[1*u+0]}}wi("GlyphOffsetArray",Os);class js extends hs{getx(u){return this.int16[3*u+0]}gety(u){return this.int16[3*u+1]}gettileUnitDistanceFromAnchor(u){return this.int16[3*u+2]}}wi("SymbolLineVertexArray",js);class Rs extends as{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]}}Rs.prototype.size=12;class Us extends zs{get(u){return new Rs(this,u)}}wi("TextAnchorOffsetArray",Us);class qs extends as{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]}}qs.prototype.size=8;class Ns extends Ps{get(u){return new qs(this,u)}}wi("FeatureIndexArray",Ns);class Zs extends cs{}class Gs extends cs{}class Ks extends cs{}class Xs extends fs{}class Hs extends ds{}class Ys extends ys{}class Js extends ms{}class Ws extends gs{}class Qs extends xs{}class ta extends vs{}class ea extends ws{}class ra extends As{}class na extends Ss{}class ia extends Cs{}const dd=ls([{name:"a_pos",components:2,type:"Int16"}],4),{members:md}=dd;class oa{constructor(u=[]){this.segments=u}prepareSegment(u,Xe,Wt,fr){let _r=this.segments[this.segments.length-1];return u>oa.MAX_VERTEX_ARRAY_LENGTH&&A(`Max vertices per segment is ${oa.MAX_VERTEX_ARRAY_LENGTH}: bucket requested ${u}`),(!_r||_r.vertexLength+u>oa.MAX_VERTEX_ARRAY_LENGTH||_r.sortKey!==fr)&&(_r={vertexOffset:Xe.length,primitiveOffset:Wt.length,vertexLength:0,primitiveLength:0},void 0!==fr&&(_r.sortKey=fr),this.segments.push(_r)),_r}get(){return this.segments}destroy(){for(const u of this.segments)for(const Xe in u.vaos)u.vaos[Xe].destroy()}static simpleSegment(u,Xe,Wt,fr){return new oa([{vertexOffset:u,primitiveOffset:Xe,vertexLength:Wt,primitiveLength:fr,vaos:{},sortKey:0}])}}function la(u,Xe){return 256*(u=y(Math.floor(u),0,255))+y(Math.floor(Xe),0,255)}oa.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,wi("SegmentVector",oa);const yd=ls([{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 _d={exports:{}},vd={exports:function(u,Xe){var Wt,fr,_r,wr,Ar,Kr,In,no;for(fr=u.length-(Wt=3&u.length),_r=Xe,Ar=3432918353,Kr=461845907,no=0;no<fr;)In=255&u.charCodeAt(no)|(255&u.charCodeAt(++no))<<8|(255&u.charCodeAt(++no))<<16|(255&u.charCodeAt(++no))<<24,++no,_r=27492+(65535&(wr=5*(65535&(_r=(_r^=In=(65535&(In=(In=(65535&In)*Ar+(((In>>>16)*Ar&65535)<<16)&4294967295)<<15|In>>>17))*Kr+(((In>>>16)*Kr&65535)<<16)&4294967295)<<13|_r>>>19))+((5*(_r>>>16)&65535)<<16)&4294967295))+((58964+(wr>>>16)&65535)<<16);switch(In=0,Wt){case 3:In^=(255&u.charCodeAt(no+2))<<16;case 2:In^=(255&u.charCodeAt(no+1))<<8;case 1:_r^=In=(65535&(In=(In=(65535&(In^=255&u.charCodeAt(no)))*Ar+(((In>>>16)*Ar&65535)<<16)&4294967295)<<15|In>>>17))*Kr+(((In>>>16)*Kr&65535)<<16)&4294967295}return _r^=u.length,_r=2246822507*(65535&(_r^=_r>>>16))+((2246822507*(_r>>>16)&65535)<<16)&4294967295,_r=3266489909*(65535&(_r^=_r>>>13))+((3266489909*(_r>>>16)&65535)<<16)&4294967295,(_r^=_r>>>16)>>>0}},xd={exports:function(u,Xe){for(var Wt,fr=u.length,_r=Xe^fr,wr=0;fr>=4;)Wt=1540483477*(65535&(Wt=255&u.charCodeAt(wr)|(255&u.charCodeAt(++wr))<<8|(255&u.charCodeAt(++wr))<<16|(255&u.charCodeAt(++wr))<<24))+((1540483477*(Wt>>>16)&65535)<<16),_r=1540483477*(65535&_r)+((1540483477*(_r>>>16)&65535)<<16)^(Wt=1540483477*(65535&(Wt^=Wt>>>24))+((1540483477*(Wt>>>16)&65535)<<16)),fr-=4,++wr;switch(fr){case 3:_r^=(255&u.charCodeAt(wr+2))<<16;case 2:_r^=(255&u.charCodeAt(wr+1))<<8;case 1:_r=1540483477*(65535&(_r^=255&u.charCodeAt(wr)))+((1540483477*(_r>>>16)&65535)<<16)}return _r=1540483477*(65535&(_r^=_r>>>13))+((1540483477*(_r>>>16)&65535)<<16),(_r^=_r>>>15)>>>0}},wd=vd.exports,Sd=xd.exports;_d.exports=wd,_d.exports.murmur3=wd,_d.exports.murmur2=Sd;var kd=r(_d.exports);class ga{constructor(){this.ids=[],this.positions=[],this.indexed=!1}add(u,Xe,Wt,fr){this.ids.push(xa(u)),this.positions.push(Xe,Wt,fr)}getPositions(u){if(!this.indexed)throw new Error("Trying to get index, but feature positions are not indexed");const Xe=xa(u);let Wt=0,fr=this.ids.length-1;for(;Wt<fr;){const u=Wt+fr>>1;this.ids[u]>=Xe?fr=u:Wt=u+1}const _r=[];for(;this.ids[Wt]===Xe;)_r.push({index:this.positions[3*Wt],start:this.positions[3*Wt+1],end:this.positions[3*Wt+2]}),Wt++;return _r}static serialize(u,Xe){const Wt=new Float64Array(u.ids),fr=new Uint32Array(u.positions);return va(Wt,fr,0,Wt.length-1),Xe&&Xe.push(Wt.buffer,fr.buffer),{ids:Wt,positions:fr}}static deserialize(u){const Xe=new ga;return Xe.ids=u.ids,Xe.positions=u.positions,Xe.indexed=!0,Xe}}function xa(u){const Xe=+u;return!isNaN(Xe)&&Xe<=Number.MAX_SAFE_INTEGER?Xe:kd(String(u))}function va(u,Xe,Wt,fr){for(;Wt<fr;){const _r=u[Wt+fr>>1];let wr=Wt-1,Ar=fr+1;for(;;){do{wr++}while(u[wr]<_r);do{Ar--}while(u[Ar]>_r);if(wr>=Ar)break;ba(u,wr,Ar),ba(Xe,3*wr,3*Ar),ba(Xe,3*wr+1,3*Ar+1),ba(Xe,3*wr+2,3*Ar+2)}Ar-Wt<fr-Ar?(va(u,Xe,Wt,Ar),Wt=Ar+1):(va(u,Xe,Ar+1,fr),fr=Ar)}}function ba(u,Xe,Wt){const fr=u[Xe];u[Xe]=u[Wt],u[Wt]=fr}wi("FeaturePositionMap",ga);class wa{constructor(u,Xe){this.gl=u.gl,this.location=Xe}}class _a extends wa{constructor(u,Xe){super(u,Xe),this.current=0}set(u){this.current!==u&&(this.current=u,this.gl.uniform1f(this.location,u))}}class Aa extends wa{constructor(u,Xe){super(u,Xe),this.current=[0,0,0,0]}set(u){u[0]===this.current[0]&&u[1]===this.current[1]&&u[2]===this.current[2]&&u[3]===this.current[3]||(this.current=u,this.gl.uniform4f(this.location,u[0],u[1],u[2],u[3]))}}class Sa extends wa{constructor(u,Xe){super(u,Xe),this.current=Kt.transparent}set(u){u.r===this.current.r&&u.g===this.current.g&&u.b===this.current.b&&u.a===this.current.a||(this.current=u,this.gl.uniform4f(this.location,u.r,u.g,u.b,u.a))}}const Ad=new Float32Array(16);function Ma(u){return[la(255*u.r,255*u.g),la(255*u.b,255*u.a)]}class Ia{constructor(u,Xe,Wt){this.value=u,this.uniformNames=Xe.map((u=>`u_${u}`)),this.type=Wt}setUniform(u,Xe,Wt){u.set(Wt.constantOr(this.value))}getBinding(u,Xe,Wt){return"color"===this.type?new Sa(u,Xe):new _a(u,Xe)}}class za{constructor(u,Xe){this.uniformNames=Xe.map((u=>`u_${u}`)),this.patternFrom=null,this.patternTo=null,this.pixelRatioFrom=1,this.pixelRatioTo=1}setConstantPatternPositions(u,Xe){this.pixelRatioFrom=Xe.pixelRatio,this.pixelRatioTo=u.pixelRatio,this.patternFrom=Xe.tlbr,this.patternTo=u.tlbr}setUniform(u,Xe,Wt,fr){const _r="u_pattern_to"===fr?this.patternTo:"u_pattern_from"===fr?this.patternFrom:"u_pixel_ratio_to"===fr?this.pixelRatioTo:"u_pixel_ratio_from"===fr?this.pixelRatioFrom:null;_r&&u.set(_r)}getBinding(u,Xe,Wt){return"u_pattern"===Wt.substr(0,9)?new Aa(u,Xe):new _a(u,Xe)}}class Pa{constructor(u,Xe,Wt,fr){this.expression=u,this.type=Wt,this.maxValue=0,this.paintVertexAttributes=Xe.map((u=>({name:`a_${u}`,type:"Float32",components:"color"===Wt?2:1,offset:0}))),this.paintVertexArray=new fr}populatePaintArray(u,Xe,Wt,fr,_r){const wr=this.paintVertexArray.length,Ar=this.expression.evaluate(new Ui(0),Xe,{},fr,[],_r);this.paintVertexArray.resize(u),this._setPaintValue(wr,u,Ar)}updatePaintArray(u,Xe,Wt,fr){const _r=this.expression.evaluate({zoom:0},Wt,fr);this._setPaintValue(u,Xe,_r)}_setPaintValue(u,Xe,Wt){if("color"===this.type){const fr=Ma(Wt);for(let Wt=u;Wt<Xe;Wt++)this.paintVertexArray.emplace(Wt,fr[0],fr[1])}else{for(let fr=u;fr<Xe;fr++)this.paintVertexArray.emplace(fr,Wt);this.maxValue=Math.max(this.maxValue,Math.abs(Wt))}}upload(u){this.paintVertexArray&&this.paintVertexArray.arrayBuffer&&(this.paintVertexBuffer&&this.paintVertexBuffer.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=u.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent))}destroy(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()}}class Ca{constructor(u,Xe,Wt,fr,_r,wr){this.expression=u,this.uniformNames=Xe.map((u=>`u_${u}_t`)),this.type=Wt,this.useIntegerZoom=fr,this.zoom=_r,this.maxValue=0,this.paintVertexAttributes=Xe.map((u=>({name:`a_${u}`,type:"Float32",components:"color"===Wt?4:2,offset:0}))),this.paintVertexArray=new wr}populatePaintArray(u,Xe,Wt,fr,_r){const wr=this.expression.evaluate(new Ui(this.zoom),Xe,{},fr,[],_r),Ar=this.expression.evaluate(new Ui(this.zoom+1),Xe,{},fr,[],_r),Kr=this.paintVertexArray.length;this.paintVertexArray.resize(u),this._setPaintValue(Kr,u,wr,Ar)}updatePaintArray(u,Xe,Wt,fr){const _r=this.expression.evaluate({zoom:this.zoom},Wt,fr),wr=this.expression.evaluate({zoom:this.zoom+1},Wt,fr);this._setPaintValue(u,Xe,_r,wr)}_setPaintValue(u,Xe,Wt,fr){if("color"===this.type){const _r=Ma(Wt),wr=Ma(fr);for(let Wt=u;Wt<Xe;Wt++)this.paintVertexArray.emplace(Wt,_r[0],_r[1],wr[0],wr[1])}else{for(let _r=u;_r<Xe;_r++)this.paintVertexArray.emplace(_r,Wt,fr);this.maxValue=Math.max(this.maxValue,Math.abs(Wt),Math.abs(fr))}}upload(u){this.paintVertexArray&&this.paintVertexArray.arrayBuffer&&(this.paintVertexBuffer&&this.paintVertexBuffer.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=u.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent))}destroy(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()}setUniform(u,Xe){const Wt=this.useIntegerZoom?Math.floor(Xe.zoom):Xe.zoom,fr=y(this.expression.interpolationFactor(Wt,this.zoom,this.zoom+1),0,1);u.set(fr)}getBinding(u,Xe,Wt){return new _a(u,Xe)}}class Ba{constructor(u,Xe,Wt,fr,_r,wr){this.expression=u,this.type=Xe,this.useIntegerZoom=Wt,this.zoom=fr,this.layerId=wr,this.zoomInPaintVertexArray=new _r,this.zoomOutPaintVertexArray=new _r}populatePaintArray(u,Xe,Wt){const fr=this.zoomInPaintVertexArray.length;this.zoomInPaintVertexArray.resize(u),this.zoomOutPaintVertexArray.resize(u),this._setPaintValues(fr,u,Xe.patterns&&Xe.patterns[this.layerId],Wt)}updatePaintArray(u,Xe,Wt,fr,_r){this._setPaintValues(u,Xe,Wt.patterns&&Wt.patterns[this.layerId],_r)}_setPaintValues(u,Xe,Wt,fr){if(!fr||!Wt)return;const{min:_r,mid:wr,max:Ar}=Wt,Kr=fr[_r],In=fr[wr],no=fr[Ar];if(Kr&&In&&no)for(let Wt=u;Wt<Xe;Wt++)this.zoomInPaintVertexArray.emplace(Wt,In.tl[0],In.tl[1],In.br[0],In.br[1],Kr.tl[0],Kr.tl[1],Kr.br[0],Kr.br[1],In.pixelRatio,Kr.pixelRatio),this.zoomOutPaintVertexArray.emplace(Wt,In.tl[0],In.tl[1],In.br[0],In.br[1],no.tl[0],no.tl[1],no.br[0],no.br[1],In.pixelRatio,no.pixelRatio)}upload(u){this.zoomInPaintVertexArray&&this.zoomInPaintVertexArray.arrayBuffer&&this.zoomOutPaintVertexArray&&this.zoomOutPaintVertexArray.arrayBuffer&&(this.zoomInPaintVertexBuffer=u.createVertexBuffer(this.zoomInPaintVertexArray,yd.members,this.expression.isStateDependent),this.zoomOutPaintVertexBuffer=u.createVertexBuffer(this.zoomOutPaintVertexArray,yd.members,this.expression.isStateDependent))}destroy(){this.zoomOutPaintVertexBuffer&&this.zoomOutPaintVertexBuffer.destroy(),this.zoomInPaintVertexBuffer&&this.zoomInPaintVertexBuffer.destroy()}}class Va{constructor(u,Xe,Wt){this.binders={},this._buffers=[];const fr=[];for(const _r in u.paint._values){if(!Wt(_r))continue;const wr=u.paint.get(_r);if(!(wr instanceof Hi&&an(wr.property.specification)))continue;const Ar=Fa(_r,u.type),Kr=wr.value,In=wr.property.specification.type,no=wr.property.useIntegerZoom,io=wr.property.specification["property-type"],oo="cross-faded"===io||"cross-faded-data-driven"===io;if("constant"===Kr.kind)this.binders[_r]=oo?new za(Kr.value,Ar):new Ia(Kr.value,Ar,In),fr.push(`/u_${_r}`);else if("source"===Kr.kind||oo){const Wt=Ta(_r,In,"source");this.binders[_r]=oo?new Ba(Kr,In,no,Xe,Wt,u.id):new Pa(Kr,Ar,In,Wt),fr.push(`/a_${_r}`)}else{const u=Ta(_r,In,"composite");this.binders[_r]=new Ca(Kr,Ar,In,no,Xe,u),fr.push(`/z_${_r}`)}}this.cacheKey=fr.sort().join("")}getMaxValue(u){const Xe=this.binders[u];return Xe instanceof Pa||Xe instanceof Ca?Xe.maxValue:0}populatePaintArrays(u,Xe,Wt,fr,_r){for(const wr in this.binders){const Ar=this.binders[wr];(Ar instanceof Pa||Ar instanceof Ca||Ar instanceof Ba)&&Ar.populatePaintArray(u,Xe,Wt,fr,_r)}}setConstantPatternPositions(u,Xe){for(const Wt in this.binders){const fr=this.binders[Wt];fr instanceof za&&fr.setConstantPatternPositions(u,Xe)}}updatePaintArrays(u,Xe,Wt,fr,_r){let wr=!1;for(const Ar in u){const Kr=Xe.getPositions(Ar);for(const Xe of Kr){const Kr=Wt.feature(Xe.index);for(const Wt in this.binders){const In=this.binders[Wt];if((In instanceof Pa||In instanceof Ca||In instanceof Ba)&&!0===In.expression.isStateDependent){const no=fr.paint.get(Wt);In.expression=no.value,In.updatePaintArray(Xe.start,Xe.end,Kr,u[Ar],_r),wr=!0}}}}return wr}defines(){const u=[];for(const Xe in this.binders){const Wt=this.binders[Xe];(Wt instanceof Ia||Wt instanceof za)&&u.push(...Wt.uniformNames.map((u=>`#define HAS_UNIFORM_${u}`)))}return u}getBinderAttributes(){const u=[];for(const Xe in this.binders){const Wt=this.binders[Xe];if(Wt instanceof Pa||Wt instanceof Ca)for(let Xe=0;Xe<Wt.paintVertexAttributes.length;Xe++)u.push(Wt.paintVertexAttributes[Xe].name);else if(Wt instanceof Ba)for(let Xe=0;Xe<yd.members.length;Xe++)u.push(yd.members[Xe].name)}return u}getBinderUniforms(){const u=[];for(const Xe in this.binders){const Wt=this.binders[Xe];if(Wt instanceof Ia||Wt instanceof za||Wt instanceof Ca)for(const Xe of Wt.uniformNames)u.push(Xe)}return u}getPaintVertexBuffers(){return this._buffers}getUniforms(u,Xe){const Wt=[];for(const fr in this.binders){const _r=this.binders[fr];if(_r instanceof Ia||_r instanceof za||_r instanceof Ca)for(const wr of _r.uniformNames)if(Xe[wr]){const Ar=_r.getBinding(u,Xe[wr],wr);Wt.push({name:wr,property:fr,binding:Ar})}}return Wt}setUniforms(u,Xe,Wt,fr){for(const{name:u,property:_r,binding:wr}of Xe)this.binders[_r].setUniform(wr,fr,Wt.get(_r),u)}updatePaintBuffers(u){this._buffers=[];for(const Xe in this.binders){const Wt=this.binders[Xe];if(u&&Wt instanceof Ba){const Xe=2===u.fromScale?Wt.zoomInPaintVertexBuffer:Wt.zoomOutPaintVertexBuffer;Xe&&this._buffers.push(Xe)}else(Wt instanceof Pa||Wt instanceof Ca)&&Wt.paintVertexBuffer&&this._buffers.push(Wt.paintVertexBuffer)}}upload(u){for(const Xe in this.binders){const Wt=this.binders[Xe];(Wt instanceof Pa||Wt instanceof Ca||Wt instanceof Ba)&&Wt.upload(u)}this.updatePaintBuffers()}destroy(){for(const u in this.binders){const Xe=this.binders[u];(Xe instanceof Pa||Xe instanceof Ca||Xe instanceof Ba)&&Xe.destroy()}}}class Ea{constructor(u,Xe,Wt=()=>!0){this.programConfigurations={};for(const fr of u)this.programConfigurations[fr.id]=new Va(fr,Xe,Wt);this.needsUpload=!1,this._featureMap=new ga,this._bufferOffset=0}populatePaintArrays(u,Xe,Wt,fr,_r,wr){for(const Wt in this.programConfigurations)this.programConfigurations[Wt].populatePaintArrays(u,Xe,fr,_r,wr);void 0!==Xe.id&&this._featureMap.add(Xe.id,Wt,this._bufferOffset,u),this._bufferOffset=u,this.needsUpload=!0}updatePaintArrays(u,Xe,Wt,fr){for(const _r of Wt)this.needsUpload=this.programConfigurations[_r.id].updatePaintArrays(u,this._featureMap,Xe,_r,fr)||this.needsUpload}get(u){return this.programConfigurations[u]}upload(u){if(this.needsUpload){for(const Xe in this.programConfigurations)this.programConfigurations[Xe].upload(u);this.needsUpload=!1}}destroy(){for(const u in this.programConfigurations)this.programConfigurations[u].destroy()}}function Fa(u,Xe){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"]}[u]||[u.replace(`${Xe}-`,"").replace(/-/g,"_")]}function Ta(u,Xe,Wt){const fr={color:{source:ys,composite:Vs},number:{source:Is,composite:ys}},_r=function(u){return{"line-pattern":{source:Js,composite:Js},"fill-pattern":{source:Js,composite:Js},"fill-extrusion-pattern":{source:Js,composite:Js}}[u]}(u);return _r&&_r[Wt]||fr[Xe][Wt]}wi("ConstantBinder",Ia),wi("CrossFadedConstantBinder",za),wi("SourceExpressionBinder",Pa),wi("CrossFadedCompositeBinder",Ba),wi("CompositeExpressionBinder",Ca),wi("ProgramConfiguration",Va,{omit:["_buffers"]}),wi("ProgramConfigurationSet",Ea);const Td=8192,Ed=Math.pow(2,14)-1,Cd=-Ed-1;function Oa(u){const Xe=Td/u.extent,Wt=u.loadGeometry();for(let u=0;u<Wt.length;u++){const fr=Wt[u];for(let u=0;u<fr.length;u++){const Wt=fr[u],_r=Math.round(Wt.x*Xe),wr=Math.round(Wt.y*Xe);Wt.x=y(_r,Cd,Ed),Wt.y=y(wr,Cd,Ed),(_r<Wt.x||_r>Wt.x+1||wr<Wt.y||wr>Wt.y+1)&&A("Geometry exceeds allowed extent, reduce your vector tile buffer size")}}return Wt}function ja(u,Xe){return{type:u.type,id:u.id,properties:u.properties,geometry:Xe?Oa(u):[]}}function Ra(u,Xe,Wt,fr,_r){u.emplaceBack(2*Xe+(fr+1)/2,2*Wt+(_r+1)/2)}class Ua{constructor(u){this.zoom=u.zoom,this.overscaling=u.overscaling,this.layers=u.layers,this.layerIds=this.layers.map((u=>u.id)),this.index=u.index,this.hasPattern=!1,this.layoutVertexArray=new Gs,this.indexArray=new na,this.segments=new oa,this.programConfigurations=new Ea(u.layers,u.zoom),this.stateDependentLayerIds=this.layers.filter((u=>u.isStateDependent())).map((u=>u.id))}populate(u,Xe,Wt){const fr=this.layers[0],_r=[];let wr=null,Ar=!1;"circle"===fr.type&&(wr=fr.layout.get("circle-sort-key"),Ar=!wr.isConstant());for(const{feature:Xe,id:fr,index:Kr,sourceLayerIndex:In}of u){const u=this.layers[0]._featureFilter.needGeometry,no=ja(Xe,u);if(!this.layers[0]._featureFilter.filter(new Ui(this.zoom),no,Wt))continue;const io=Ar?wr.evaluate(no,{},Wt):void 0,oo={id:fr,properties:Xe.properties,type:Xe.type,sourceLayerIndex:In,index:Kr,geometry:u?no.geometry:Oa(Xe),patterns:{},sortKey:io};_r.push(oo)}Ar&&_r.sort(((u,Xe)=>u.sortKey-Xe.sortKey));for(const fr of _r){const{geometry:_r,index:wr,sourceLayerIndex:Ar}=fr,Kr=u[wr].feature;this.addFeature(fr,_r,wr,Wt),Xe.featureIndex.insert(Kr,_r,wr,Ar,this.index)}}update(u,Xe,Wt){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(u,Xe,this.stateDependentLayers,Wt)}isEmpty(){return 0===this.layoutVertexArray.length}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(u){this.uploaded||(this.layoutVertexBuffer=u.createVertexBuffer(this.layoutVertexArray,md),this.indexBuffer=u.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(u),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}addFeature(u,Xe,Wt,fr){for(const Wt of Xe)for(const Xe of Wt){const Wt=Xe.x,fr=Xe.y;if(Wt<0||Wt>=Td||fr<0||fr>=Td)continue;const _r=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,u.sortKey),wr=_r.vertexLength;Ra(this.layoutVertexArray,Wt,fr,-1,-1),Ra(this.layoutVertexArray,Wt,fr,1,-1),Ra(this.layoutVertexArray,Wt,fr,1,1),Ra(this.layoutVertexArray,Wt,fr,-1,1),this.indexArray.emplaceBack(wr,wr+1,wr+2),this.indexArray.emplaceBack(wr,wr+3,wr+2),_r.vertexLength+=4,_r.primitiveLength+=2}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,u,Wt,{},fr)}}function qa(u,Xe){for(let Wt=0;Wt<u.length;Wt++)if(Wa(Xe,u[Wt]))return!0;for(let Wt=0;Wt<Xe.length;Wt++)if(Wa(u,Xe[Wt]))return!0;return!!Ka(u,Xe)}function Na(u,Xe,Wt){return!!Wa(u,Xe)||!!Ha(Xe,u,Wt)}function Za(u,Xe){if(1===u.length)return Ja(Xe,u[0]);for(let Wt=0;Wt<Xe.length;Wt++){const fr=Xe[Wt];for(let Xe=0;Xe<fr.length;Xe++)if(Wa(u,fr[Xe]))return!0}for(let Wt=0;Wt<u.length;Wt++)if(Ja(Xe,u[Wt]))return!0;for(let Wt=0;Wt<Xe.length;Wt++)if(Ka(u,Xe[Wt]))return!0;return!1}function Ga(u,Xe,Wt){if(u.length>1){if(Ka(u,Xe))return!0;for(let fr=0;fr<Xe.length;fr++)if(Ha(Xe[fr],u,Wt))return!0}for(let fr=0;fr<u.length;fr++)if(Ha(u[fr],Xe,Wt))return!0;return!1}function Ka(u,Xe){if(0===u.length||0===Xe.length)return!1;for(let Wt=0;Wt<u.length-1;Wt++){const fr=u[Wt],_r=u[Wt+1];for(let u=0;u<Xe.length-1;u++)if(Xa(fr,_r,Xe[u],Xe[u+1]))return!0}return!1}function Xa(u,Xe,Wt,fr){return S(u,Wt,fr)!==S(Xe,Wt,fr)&&S(u,Xe,Wt)!==S(u,Xe,fr)}function Ha(u,Xe,Wt){const fr=Wt*Wt;if(1===Xe.length)return u.distSqr(Xe[0])<fr;for(let Wt=1;Wt<Xe.length;Wt++)if(Ya(u,Xe[Wt-1],Xe[Wt])<fr)return!0;return!1}function Ya(u,Xe,Wt){const fr=Xe.distSqr(Wt);if(0===fr)return u.distSqr(Xe);const _r=((u.x-Xe.x)*(Wt.x-Xe.x)+(u.y-Xe.y)*(Wt.y-Xe.y))/fr;return u.distSqr(_r<0?Xe:_r>1?Wt:Wt.sub(Xe)._mult(_r)._add(Xe))}function Ja(u,Xe){let Wt,fr,_r,wr=!1;for(let Ar=0;Ar<u.length;Ar++){Wt=u[Ar];for(let u=0,Ar=Wt.length-1;u<Wt.length;Ar=u++)fr=Wt[u],_r=Wt[Ar],fr.y>Xe.y!=_r.y>Xe.y&&Xe.x<(_r.x-fr.x)*(Xe.y-fr.y)/(_r.y-fr.y)+fr.x&&(wr=!wr)}return wr}function Wa(u,Xe){let Wt=!1;for(let fr=0,_r=u.length-1;fr<u.length;_r=fr++){const wr=u[fr],Ar=u[_r];wr.y>Xe.y!=Ar.y>Xe.y&&Xe.x<(Ar.x-wr.x)*(Xe.y-wr.y)/(Ar.y-wr.y)+wr.x&&(Wt=!Wt)}return Wt}function Qa(u,Xe,Wt){const fr=Wt[0],_r=Wt[2];if(u.x<fr.x&&Xe.x<fr.x||u.x>_r.x&&Xe.x>_r.x||u.y<fr.y&&Xe.y<fr.y||u.y>_r.y&&Xe.y>_r.y)return!1;const wr=S(u,Xe,Wt[0]);return wr!==S(u,Xe,Wt[1])||wr!==S(u,Xe,Wt[2])||wr!==S(u,Xe,Wt[3])}function to(u,Xe,Wt){const fr=Xe.paint.get(u).value;return"constant"===fr.kind?fr.value:Wt.programConfigurations.get(Xe.id).getMaxValue(u)}function eo(u){return Math.sqrt(u[0]*u[0]+u[1]*u[1])}function ro(u,Xe,fr,_r,wr){if(!Xe[0]&&!Xe[1])return u;const Ar=Wt.convert(Xe)._mult(wr);"viewport"===fr&&Ar._rotate(-_r);const Kr=[];for(let Xe=0;Xe<u.length;Xe++)Kr.push(u[Xe].sub(Ar));return Kr}let Id,Md;wi("CircleBucket",Ua,{omit:["layers"]});var Rd={get paint(){return Md=Md||new rs({"circle-radius":new Wi(xo.paint_circle["circle-radius"]),"circle-color":new Wi(xo.paint_circle["circle-color"]),"circle-blur":new Wi(xo.paint_circle["circle-blur"]),"circle-opacity":new Wi(xo.paint_circle["circle-opacity"]),"circle-translate":new Ji(xo.paint_circle["circle-translate"]),"circle-translate-anchor":new Ji(xo.paint_circle["circle-translate-anchor"]),"circle-pitch-scale":new Ji(xo.paint_circle["circle-pitch-scale"]),"circle-pitch-alignment":new Ji(xo.paint_circle["circle-pitch-alignment"]),"circle-stroke-width":new Wi(xo.paint_circle["circle-stroke-width"]),"circle-stroke-color":new Wi(xo.paint_circle["circle-stroke-color"]),"circle-stroke-opacity":new Wi(xo.paint_circle["circle-stroke-opacity"])})},get layout(){return Id=Id||new rs({"circle-sort-key":new Wi(xo.layout_circle["circle-sort-key"])})}},Od=1e-6,Ld="undefined"!=typeof Float32Array?Float32Array:Array;function lo(u){return u[0]=1,u[1]=0,u[2]=0,u[3]=0,u[4]=0,u[5]=1,u[6]=0,u[7]=0,u[8]=0,u[9]=0,u[10]=1,u[11]=0,u[12]=0,u[13]=0,u[14]=0,u[15]=1,u}function uo(u,Xe,Wt){var fr=Xe[0],_r=Xe[1],wr=Xe[2],Ar=Xe[3],Kr=Xe[4],In=Xe[5],no=Xe[6],io=Xe[7],oo=Xe[8],ao=Xe[9],so=Xe[10],co=Xe[11],ho=Xe[12],go=Xe[13],xo=Xe[14],ko=Xe[15],Co=Wt[0],Io=Wt[1],zo=Wt[2],Bo=Wt[3];return u[0]=Co*fr+Io*Kr+zo*oo+Bo*ho,u[1]=Co*_r+Io*In+zo*ao+Bo*go,u[2]=Co*wr+Io*no+zo*so+Bo*xo,u[3]=Co*Ar+Io*io+zo*co+Bo*ko,u[4]=(Co=Wt[4])*fr+(Io=Wt[5])*Kr+(zo=Wt[6])*oo+(Bo=Wt[7])*ho,u[5]=Co*_r+Io*In+zo*ao+Bo*go,u[6]=Co*wr+Io*no+zo*so+Bo*xo,u[7]=Co*Ar+Io*io+zo*co+Bo*ko,u[8]=(Co=Wt[8])*fr+(Io=Wt[9])*Kr+(zo=Wt[10])*oo+(Bo=Wt[11])*ho,u[9]=Co*_r+Io*In+zo*ao+Bo*go,u[10]=Co*wr+Io*no+zo*so+Bo*xo,u[11]=Co*Ar+Io*io+zo*co+Bo*ko,u[12]=(Co=Wt[12])*fr+(Io=Wt[13])*Kr+(zo=Wt[14])*oo+(Bo=Wt[15])*ho,u[13]=Co*_r+Io*In+zo*ao+Bo*go,u[14]=Co*wr+Io*no+zo*so+Bo*xo,u[15]=Co*Ar+Io*io+zo*co+Bo*ko,u}Math.hypot||(Math.hypot=function(){for(var u=0,Xe=arguments.length;Xe--;)u+=arguments[Xe]*arguments[Xe];return Math.sqrt(u)});var Dd,Fd=uo;function po(u,Xe,Wt){var fr=Xe[0],_r=Xe[1],wr=Xe[2],Ar=Xe[3];return u[0]=Wt[0]*fr+Wt[4]*_r+Wt[8]*wr+Wt[12]*Ar,u[1]=Wt[1]*fr+Wt[5]*_r+Wt[9]*wr+Wt[13]*Ar,u[2]=Wt[2]*fr+Wt[6]*_r+Wt[10]*wr+Wt[14]*Ar,u[3]=Wt[3]*fr+Wt[7]*_r+Wt[11]*wr+Wt[15]*Ar,u}Dd=new Ld(4),Ld!=Float32Array&&(Dd[0]=0,Dd[1]=0,Dd[2]=0,Dd[3]=0);class fo extends is{constructor(u){super(u,Rd)}createBucket(u){return new Ua(u)}queryRadius(u){const Xe=u;return to("circle-radius",this,Xe)+to("circle-stroke-width",this,Xe)+eo(this.paint.get("circle-translate"))}queryIntersectsFeature(u,Xe,Wt,fr,_r,wr,Ar,Kr){const In=ro(u,this.paint.get("circle-translate"),this.paint.get("circle-translate-anchor"),wr.angle,Ar),no=this.paint.get("circle-radius").evaluate(Xe,Wt)+this.paint.get("circle-stroke-width").evaluate(Xe,Wt),io="map"===this.paint.get("circle-pitch-alignment"),oo=io?In:function(u,Xe){return u.map((u=>yo(u,Xe)))}(In,Kr),ao=io?no*Ar:no;for(const u of fr)for(const Xe of u){const u=io?Xe:yo(Xe,Kr);let Wt=ao;const fr=po([],[Xe.x,Xe.y,0,1],Kr);if("viewport"===this.paint.get("circle-pitch-scale")&&"map"===this.paint.get("circle-pitch-alignment")?Wt*=fr[3]/wr.cameraToCenterDistance:"map"===this.paint.get("circle-pitch-scale")&&"viewport"===this.paint.get("circle-pitch-alignment")&&(Wt*=wr.cameraToCenterDistance/fr[3]),Na(oo,u,Wt))return!0}return!1}}function yo(u,Xe){const fr=po([],[u.x,u.y,0,1],Xe);return new Wt(fr[0]/fr[3],fr[1]/fr[3])}class mo extends Ua{}let Bd;wi("HeatmapBucket",mo,{omit:["layers"]});var Nd={get paint(){return Bd=Bd||new rs({"heatmap-radius":new Wi(xo.paint_heatmap["heatmap-radius"]),"heatmap-weight":new Wi(xo.paint_heatmap["heatmap-weight"]),"heatmap-intensity":new Ji(xo.paint_heatmap["heatmap-intensity"]),"heatmap-color":new es(xo.paint_heatmap["heatmap-color"]),"heatmap-opacity":new Ji(xo.paint_heatmap["heatmap-opacity"])})}};function vo(u,{width:Xe,height:Wt},fr,_r){if(_r){if(_r instanceof Uint8ClampedArray)_r=new Uint8Array(_r.buffer);else if(_r.length!==Xe*Wt*fr)throw new RangeError(`mismatched image size. expected: ${_r.length} but got: ${Xe*Wt*fr}`)}else _r=new Uint8Array(Xe*Wt*fr);return u.width=Xe,u.height=Wt,u.data=_r,u}function bo(u,{width:Xe,height:Wt},fr){if(Xe===u.width&&Wt===u.height)return;const _r=vo({},{width:Xe,height:Wt},fr);wo(u,_r,{x:0,y:0},{x:0,y:0},{width:Math.min(u.width,Xe),height:Math.min(u.height,Wt)},fr),u.width=Xe,u.height=Wt,u.data=_r.data}function wo(u,Xe,Wt,fr,_r,wr){if(0===_r.width||0===_r.height)return Xe;if(_r.width>u.width||_r.height>u.height||Wt.x>u.width-_r.width||Wt.y>u.height-_r.height)throw new RangeError("out of range source coordinates for image copy");if(_r.width>Xe.width||_r.height>Xe.height||fr.x>Xe.width-_r.width||fr.y>Xe.height-_r.height)throw new RangeError("out of range destination coordinates for image copy");const Ar=u.data,Kr=Xe.data;if(Ar===Kr)throw new Error("srcData equals dstData, so image is already copied");for(let In=0;In<_r.height;In++){const no=((Wt.y+In)*u.width+Wt.x)*wr,io=((fr.y+In)*Xe.width+fr.x)*wr;for(let u=0;u<_r.width*wr;u++)Kr[io+u]=Ar[no+u]}return Xe}class _o{constructor(u,Xe){vo(this,u,1,Xe)}resize(u){bo(this,u,1)}clone(){return new _o({width:this.width,height:this.height},new Uint8Array(this.data))}static copy(u,Xe,Wt,fr,_r){wo(u,Xe,Wt,fr,_r,1)}}class Ao{constructor(u,Xe){vo(this,u,4,Xe)}resize(u){bo(this,u,4)}replace(u,Xe){Xe?this.data.set(u):this.data=u instanceof Uint8ClampedArray?new Uint8Array(u.buffer):u}clone(){return new Ao({width:this.width,height:this.height},new Uint8Array(this.data))}static copy(u,Xe,Wt,fr,_r){wo(u,Xe,Wt,fr,_r,4)}}function So(u){const Xe={},Wt=u.resolution||256,fr=u.clips?u.clips.length:1,_r=u.image||new Ao({width:Wt,height:fr});if(Math.log(Wt)/Math.LN2%1!=0)throw new Error(`width is not a power of 2 - ${Wt}`);const s=(Wt,fr,wr)=>{Xe[u.evaluationKey]=wr;const Ar=u.expression.evaluate(Xe);_r.data[Wt+fr+0]=Math.floor(255*Ar.r/Ar.a),_r.data[Wt+fr+1]=Math.floor(255*Ar.g/Ar.a),_r.data[Wt+fr+2]=Math.floor(255*Ar.b/Ar.a),_r.data[Wt+fr+3]=Math.floor(255*Ar.a)};if(u.clips)for(let Xe=0,_r=0;Xe<fr;++Xe,_r+=4*Wt)for(let fr=0,wr=0;fr<Wt;fr++,wr+=4){const Ar=fr/(Wt-1),{start:Kr,end:In}=u.clips[Xe];s(_r,wr,Kr*(1-Ar)+In*Ar)}else for(let u=0,Xe=0;u<Wt;u++,Xe+=4)s(0,Xe,u/(Wt-1));return _r}wi("AlphaImage",_o),wi("RGBAImage",Ao);const Vd="big-fb";class Mo extends is{createBucket(u){return new mo(u)}constructor(u){super(u,Nd),this.heatmapFbos=new Map,this._updateColorRamp()}_handleSpecialPaintPropertyUpdate(u){"heatmap-color"===u&&this._updateColorRamp()}_updateColorRamp(){this.colorRamp=So({expression:this._transitionablePaint._values["heatmap-color"].value.expression,evaluationKey:"heatmapDensity",image:this.colorRamp}),this.colorRampTexture=null}resize(){this.heatmapFbos.has(Vd)&&this.heatmapFbos.delete(Vd)}queryRadius(){return 0}queryIntersectsFeature(){return!1}hasOffscreenPass(){return 0!==this.paint.get("heatmap-opacity")&&"none"!==this.visibility}}let Ud;var $d={get paint(){return Ud=Ud||new rs({"hillshade-illumination-direction":new Ji(xo.paint_hillshade["hillshade-illumination-direction"]),"hillshade-illumination-anchor":new Ji(xo.paint_hillshade["hillshade-illumination-anchor"]),"hillshade-exaggeration":new Ji(xo.paint_hillshade["hillshade-exaggeration"]),"hillshade-shadow-color":new Ji(xo.paint_hillshade["hillshade-shadow-color"]),"hillshade-highlight-color":new Ji(xo.paint_hillshade["hillshade-highlight-color"]),"hillshade-accent-color":new Ji(xo.paint_hillshade["hillshade-accent-color"])})}};class Po extends is{constructor(u){super(u,$d)}hasOffscreenPass(){return 0!==this.paint.get("hillshade-exaggeration")&&"none"!==this.visibility}}const Wd=ls([{name:"a_pos",components:2,type:"Int16"}],4),{members:Zd}=Wd;function Vo(u,Xe,Wt=2){const fr=Xe&&Xe.length,_r=fr?Xe[0]*Wt:u.length;let wr=Eo(u,0,_r,Wt,!0);const Ar=[];if(!wr||wr.next===wr.prev)return Ar;let Kr,In,no;if(fr&&(wr=function(u,Xe,Wt,fr){const _r=[];for(let Wt=0,wr=Xe.length;Wt<wr;Wt++){const Ar=Eo(u,Xe[Wt]*fr,Wt<wr-1?Xe[Wt+1]*fr:u.length,fr,!1);Ar===Ar.next&&(Ar.steiner=!0),_r.push(No(Ar))}_r.sort(jo);for(let u=0;u<_r.length;u++)Wt=Ro(_r[u],Wt);return Wt}(u,Xe,wr,Wt)),u.length>80*Wt){Kr=1/0,In=1/0;let Xe=-1/0,fr=-1/0;for(let wr=Wt;wr<_r;wr+=Wt){const Wt=u[wr],_r=u[wr+1];Wt<Kr&&(Kr=Wt),_r<In&&(In=_r),Wt>Xe&&(Xe=Wt),_r>fr&&(fr=_r)}no=Math.max(Xe-Kr,fr-In),no=0!==no?32767/no:0}return To(wr,Ar,Wt,Kr,In,no,0),Ar}function Eo(u,Xe,Wt,fr,_r){let wr;if(_r===function(u,Xe,Wt,fr){let _r=0;for(let wr=Xe,Ar=Wt-fr;wr<Wt;wr+=fr)_r+=(u[Ar]-u[wr])*(u[wr+1]+u[Ar+1]),Ar=wr;return _r}(u,Xe,Wt,fr)>0)for(let _r=Xe;_r<Wt;_r+=fr)wr=tl(_r/fr|0,u[_r],u[_r+1],wr);else for(let _r=Wt-fr;_r>=Xe;_r-=fr)wr=tl(_r/fr|0,u[_r],u[_r+1],wr);return wr&&Xo(wr,wr.next)&&(el(wr),wr=wr.next),wr}function Fo(u,Xe){if(!u)return u;Xe||(Xe=u);let Wt,fr=u;do{if(Wt=!1,fr.steiner||!Xo(fr,fr.next)&&0!==Ko(fr.prev,fr,fr.next))fr=fr.next;else{if(el(fr),fr=Xe=fr.prev,fr===fr.next)break;Wt=!0}}while(Wt||fr!==Xe);return Xe}function To(u,Xe,Wt,fr,_r,wr,Ar){if(!u)return;!Ar&&wr&&function(u,Xe,Wt,fr){let _r=u;do{0===_r.z&&(_r.z=qo(_r.x,_r.y,Xe,Wt,fr)),_r.prevZ=_r.prev,_r.nextZ=_r.next,_r=_r.next}while(_r!==u);_r.prevZ.nextZ=null,_r.prevZ=null,function(u){let Xe,Wt=1;do{let fr,_r=u;u=null;let wr=null;for(Xe=0;_r;){Xe++;let Ar=_r,Kr=0;for(let u=0;u<Wt&&(Kr++,Ar=Ar.nextZ,Ar);u++);let In=Wt;for(;Kr>0||In>0&&Ar;)0!==Kr&&(0===In||!Ar||_r.z<=Ar.z)?(fr=_r,_r=_r.nextZ,Kr--):(fr=Ar,Ar=Ar.nextZ,In--),wr?wr.nextZ=fr:u=fr,fr.prevZ=wr,wr=fr;_r=Ar}wr.nextZ=null,Wt*=2}while(Xe>1)}(_r)}(u,fr,_r,wr);let Kr=u;for(;u.prev!==u.next;){const In=u.prev,no=u.next;if(wr?Lo(u,fr,_r,wr):$o(u))Xe.push(In.i,u.i,no.i),el(u),u=no.next,Kr=no.next;else if((u=no)===Kr){Ar?1===Ar?To(u=Do(Fo(u),Xe),Xe,Wt,fr,_r,wr,2):2===Ar&&Oo(u,Xe,Wt,fr,_r,wr):To(Fo(u),Xe,Wt,fr,_r,wr,1);break}}}function $o(u){const Xe=u.prev,Wt=u,fr=u.next;if(Ko(Xe,Wt,fr)>=0)return!1;const _r=Xe.x,wr=Wt.x,Ar=fr.x,Kr=Xe.y,In=Wt.y,no=fr.y,io=_r<wr?_r<Ar?_r:Ar:wr<Ar?wr:Ar,oo=Kr<In?Kr<no?Kr:no:In<no?In:no,ao=_r>wr?_r>Ar?_r:Ar:wr>Ar?wr:Ar,so=Kr>In?Kr>no?Kr:no:In>no?In:no;let co=fr.next;for(;co!==Xe;){if(co.x>=io&&co.x<=ao&&co.y>=oo&&co.y<=so&&Zo(_r,Kr,wr,In,Ar,no,co.x,co.y)&&Ko(co.prev,co,co.next)>=0)return!1;co=co.next}return!0}function Lo(u,Xe,Wt,fr){const _r=u.prev,wr=u,Ar=u.next;if(Ko(_r,wr,Ar)>=0)return!1;const Kr=_r.x,In=wr.x,no=Ar.x,io=_r.y,oo=wr.y,ao=Ar.y,so=Kr<In?Kr<no?Kr:no:In<no?In:no,co=io<oo?io<ao?io:ao:oo<ao?oo:ao,ho=Kr>In?Kr>no?Kr:no:In>no?In:no,go=io>oo?io>ao?io:ao:oo>ao?oo:ao,xo=qo(so,co,Xe,Wt,fr),ko=qo(ho,go,Xe,Wt,fr);let Co=u.prevZ,Io=u.nextZ;for(;Co&&Co.z>=xo&&Io&&Io.z<=ko;){if(Co.x>=so&&Co.x<=ho&&Co.y>=co&&Co.y<=go&&Co!==_r&&Co!==Ar&&Zo(Kr,io,In,oo,no,ao,Co.x,Co.y)&&Ko(Co.prev,Co,Co.next)>=0)return!1;if(Co=Co.prevZ,Io.x>=so&&Io.x<=ho&&Io.y>=co&&Io.y<=go&&Io!==_r&&Io!==Ar&&Zo(Kr,io,In,oo,no,ao,Io.x,Io.y)&&Ko(Io.prev,Io,Io.next)>=0)return!1;Io=Io.nextZ}for(;Co&&Co.z>=xo;){if(Co.x>=so&&Co.x<=ho&&Co.y>=co&&Co.y<=go&&Co!==_r&&Co!==Ar&&Zo(Kr,io,In,oo,no,ao,Co.x,Co.y)&&Ko(Co.prev,Co,Co.next)>=0)return!1;Co=Co.prevZ}for(;Io&&Io.z<=ko;){if(Io.x>=so&&Io.x<=ho&&Io.y>=co&&Io.y<=go&&Io!==_r&&Io!==Ar&&Zo(Kr,io,In,oo,no,ao,Io.x,Io.y)&&Ko(Io.prev,Io,Io.next)>=0)return!1;Io=Io.nextZ}return!0}function Do(u,Xe){let Wt=u;do{const fr=Wt.prev,_r=Wt.next.next;!Xo(fr,_r)&&Ho(fr,Wt,Wt.next,_r)&&Wo(fr,_r)&&Wo(_r,fr)&&(Xe.push(fr.i,Wt.i,_r.i),el(Wt),el(Wt.next),Wt=u=_r),Wt=Wt.next}while(Wt!==u);return Fo(Wt)}function Oo(u,Xe,Wt,fr,_r,wr){let Ar=u;do{let u=Ar.next.next;for(;u!==Ar.prev;){if(Ar.i!==u.i&&Go(Ar,u)){let Kr=Qo(Ar,u);return Ar=Fo(Ar,Ar.next),Kr=Fo(Kr,Kr.next),To(Ar,Xe,Wt,fr,_r,wr,0),void To(Kr,Xe,Wt,fr,_r,wr,0)}u=u.next}Ar=Ar.next}while(Ar!==u)}function jo(u,Xe){return u.x-Xe.x}function Ro(u,Xe){const Wt=function(u,Xe){let Wt=Xe;const fr=u.x,_r=u.y;let wr,Ar=-1/0;do{if(_r<=Wt.y&&_r>=Wt.next.y&&Wt.next.y!==Wt.y){const u=Wt.x+(_r-Wt.y)*(Wt.next.x-Wt.x)/(Wt.next.y-Wt.y);if(u<=fr&&u>Ar&&(Ar=u,wr=Wt.x<Wt.next.x?Wt:Wt.next,u===fr))return wr}Wt=Wt.next}while(Wt!==Xe);if(!wr)return null;const Kr=wr,In=wr.x,no=wr.y;let io=1/0;Wt=wr;do{if(fr>=Wt.x&&Wt.x>=In&&fr!==Wt.x&&Zo(_r<no?fr:Ar,_r,In,no,_r<no?Ar:fr,_r,Wt.x,Wt.y)){const Xe=Math.abs(_r-Wt.y)/(fr-Wt.x);Wo(Wt,u)&&(Xe<io||Xe===io&&(Wt.x>wr.x||Wt.x===wr.x&&Uo(wr,Wt)))&&(wr=Wt,io=Xe)}Wt=Wt.next}while(Wt!==Kr);return wr}(u,Xe);if(!Wt)return Xe;const fr=Qo(Wt,u);return Fo(fr,fr.next),Fo(Wt,Wt.next)}function Uo(u,Xe){return Ko(u.prev,u,Xe.prev)<0&&Ko(Xe.next,u,u.next)<0}function qo(u,Xe,Wt,fr,_r){return(u=1431655765&((u=858993459&((u=252645135&((u=16711935&((u=(u-Wt)*_r|0)|u<<8))|u<<4))|u<<2))|u<<1))|(Xe=1431655765&((Xe=858993459&((Xe=252645135&((Xe=16711935&((Xe=(Xe-fr)*_r|0)|Xe<<8))|Xe<<4))|Xe<<2))|Xe<<1))<<1}function No(u){let Xe=u,Wt=u;do{(Xe.x<Wt.x||Xe.x===Wt.x&&Xe.y<Wt.y)&&(Wt=Xe),Xe=Xe.next}while(Xe!==u);return Wt}function Zo(u,Xe,Wt,fr,_r,wr,Ar,Kr){return(_r-Ar)*(Xe-Kr)>=(u-Ar)*(wr-Kr)&&(u-Ar)*(fr-Kr)>=(Wt-Ar)*(Xe-Kr)&&(Wt-Ar)*(wr-Kr)>=(_r-Ar)*(fr-Kr)}function Go(u,Xe){return u.next.i!==Xe.i&&u.prev.i!==Xe.i&&!function(u,Xe){let Wt=u;do{if(Wt.i!==u.i&&Wt.next.i!==u.i&&Wt.i!==Xe.i&&Wt.next.i!==Xe.i&&Ho(Wt,Wt.next,u,Xe))return!0;Wt=Wt.next}while(Wt!==u);return!1}(u,Xe)&&(Wo(u,Xe)&&Wo(Xe,u)&&function(u,Xe){let Wt=u,fr=!1;const _r=(u.x+Xe.x)/2,wr=(u.y+Xe.y)/2;do{Wt.y>wr!=Wt.next.y>wr&&Wt.next.y!==Wt.y&&_r<(Wt.next.x-Wt.x)*(wr-Wt.y)/(Wt.next.y-Wt.y)+Wt.x&&(fr=!fr),Wt=Wt.next}while(Wt!==u);return fr}(u,Xe)&&(Ko(u.prev,u,Xe.prev)||Ko(u,Xe.prev,Xe))||Xo(u,Xe)&&Ko(u.prev,u,u.next)>0&&Ko(Xe.prev,Xe,Xe.next)>0)}function Ko(u,Xe,Wt){return(Xe.y-u.y)*(Wt.x-Xe.x)-(Xe.x-u.x)*(Wt.y-Xe.y)}function Xo(u,Xe){return u.x===Xe.x&&u.y===Xe.y}function Ho(u,Xe,Wt,fr){const _r=Jo(Ko(u,Xe,Wt)),wr=Jo(Ko(u,Xe,fr)),Ar=Jo(Ko(Wt,fr,u)),Kr=Jo(Ko(Wt,fr,Xe));return _r!==wr&&Ar!==Kr||!(0!==_r||!Yo(u,Wt,Xe))||!(0!==wr||!Yo(u,fr,Xe))||!(0!==Ar||!Yo(Wt,u,fr))||!(0!==Kr||!Yo(Wt,Xe,fr))}function Yo(u,Xe,Wt){return Xe.x<=Math.max(u.x,Wt.x)&&Xe.x>=Math.min(u.x,Wt.x)&&Xe.y<=Math.max(u.y,Wt.y)&&Xe.y>=Math.min(u.y,Wt.y)}function Jo(u){return u>0?1:u<0?-1:0}function Wo(u,Xe){return Ko(u.prev,u,u.next)<0?Ko(u,Xe,u.next)>=0&&Ko(u,u.prev,Xe)>=0:Ko(u,Xe,u.prev)<0||Ko(u,u.next,Xe)<0}function Qo(u,Xe){const Wt=rl(u.i,u.x,u.y),fr=rl(Xe.i,Xe.x,Xe.y),_r=u.next,wr=Xe.prev;return u.next=Xe,Xe.prev=u,Wt.next=_r,_r.prev=Wt,fr.next=Wt,Wt.prev=fr,wr.next=fr,fr.prev=wr,fr}function tl(u,Xe,Wt,fr){const _r=rl(u,Xe,Wt);return fr?(_r.next=fr.next,_r.prev=fr,fr.next.prev=_r,fr.next=_r):(_r.prev=_r,_r.next=_r),_r}function el(u){u.next.prev=u.prev,u.prev.next=u.next,u.prevZ&&(u.prevZ.nextZ=u.nextZ),u.nextZ&&(u.nextZ.prevZ=u.prevZ)}function rl(u,Xe,Wt){return{i:u,x:Xe,y:Wt,prev:null,next:null,z:0,prevZ:null,nextZ:null,steiner:!1}}function nl(u,Xe,Wt){const fr=Wt.patternDependencies;let _r=!1;for(const Wt of Xe){const Xe=Wt.paint.get(`${u}-pattern`);Xe.isConstant()||(_r=!0);const wr=Xe.constantOr(null);wr&&(_r=!0,fr[wr.to]=!0,fr[wr.from]=!0)}return _r}function il(u,Xe,Wt,fr,_r){const wr=_r.patternDependencies;for(const Ar of Xe){const Xe=Ar.paint.get(`${u}-pattern`).value;if("constant"!==Xe.kind){let u=Xe.evaluate({zoom:fr-1},Wt,{},_r.availableImages),Kr=Xe.evaluate({zoom:fr},Wt,{},_r.availableImages),In=Xe.evaluate({zoom:fr+1},Wt,{},_r.availableImages);u=u&&u.name?u.name:u,Kr=Kr&&Kr.name?Kr.name:Kr,In=In&&In.name?In.name:In,wr[u]=!0,wr[Kr]=!0,wr[In]=!0,Wt.patterns[Ar.id]={min:u,mid:Kr,max:In}}}return Wt}class sl{constructor(u){this.zoom=u.zoom,this.overscaling=u.overscaling,this.layers=u.layers,this.layerIds=this.layers.map((u=>u.id)),this.index=u.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new Ks,this.indexArray=new na,this.indexArray2=new ia,this.programConfigurations=new Ea(u.layers,u.zoom),this.segments=new oa,this.segments2=new oa,this.stateDependentLayerIds=this.layers.filter((u=>u.isStateDependent())).map((u=>u.id))}populate(u,Xe,Wt){this.hasPattern=nl("fill",this.layers,Xe);const fr=this.layers[0].layout.get("fill-sort-key"),_r=!fr.isConstant(),wr=[];for(const{feature:Ar,id:Kr,index:In,sourceLayerIndex:no}of u){const u=this.layers[0]._featureFilter.needGeometry,io=ja(Ar,u);if(!this.layers[0]._featureFilter.filter(new Ui(this.zoom),io,Wt))continue;const oo=_r?fr.evaluate(io,{},Wt,Xe.availableImages):void 0,ao={id:Kr,properties:Ar.properties,type:Ar.type,sourceLayerIndex:no,index:In,geometry:u?io.geometry:Oa(Ar),patterns:{},sortKey:oo};wr.push(ao)}_r&&wr.sort(((u,Xe)=>u.sortKey-Xe.sortKey));for(const fr of wr){const{geometry:_r,index:wr,sourceLayerIndex:Ar}=fr;if(this.hasPattern){const u=il("fill",this.layers,fr,this.zoom,Xe);this.patternFeatures.push(u)}else this.addFeature(fr,_r,wr,Wt,{});Xe.featureIndex.insert(u[wr].feature,_r,wr,Ar,this.index)}}update(u,Xe,Wt){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(u,Xe,this.stateDependentLayers,Wt)}addFeatures(u,Xe,Wt){for(const u of this.patternFeatures)this.addFeature(u,u.geometry,u.index,Xe,Wt)}isEmpty(){return 0===this.layoutVertexArray.length}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(u){this.uploaded||(this.layoutVertexBuffer=u.createVertexBuffer(this.layoutVertexArray,Zd),this.indexBuffer=u.createIndexBuffer(this.indexArray),this.indexBuffer2=u.createIndexBuffer(this.indexArray2)),this.programConfigurations.upload(u),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(u,Xe,Wt,fr,_r){for(const u of xr(Xe,500)){let Xe=0;for(const Wt of u)Xe+=Wt.length;const Wt=this.segments.prepareSegment(Xe,this.layoutVertexArray,this.indexArray),fr=Wt.vertexLength,_r=[],wr=[];for(const Xe of u){if(0===Xe.length)continue;Xe!==u[0]&&wr.push(_r.length/2);const Wt=this.segments2.prepareSegment(Xe.length,this.layoutVertexArray,this.indexArray2),fr=Wt.vertexLength;this.layoutVertexArray.emplaceBack(Xe[0].x,Xe[0].y),this.indexArray2.emplaceBack(fr+Xe.length-1,fr),_r.push(Xe[0].x),_r.push(Xe[0].y);for(let u=1;u<Xe.length;u++)this.layoutVertexArray.emplaceBack(Xe[u].x,Xe[u].y),this.indexArray2.emplaceBack(fr+u-1,fr+u),_r.push(Xe[u].x),_r.push(Xe[u].y);Wt.vertexLength+=Xe.length,Wt.primitiveLength+=Xe.length}const Ar=Vo(_r,wr);for(let u=0;u<Ar.length;u+=3)this.indexArray.emplaceBack(fr+Ar[u],fr+Ar[u+1],fr+Ar[u+2]);Wt.vertexLength+=Xe,Wt.primitiveLength+=Ar.length/3}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,u,Wt,_r,fr)}}let Hd,Gd;wi("FillBucket",sl,{omit:["layers","patternFeatures"]});var Kd={get paint(){return Gd=Gd||new rs({"fill-antialias":new Ji(xo.paint_fill["fill-antialias"]),"fill-opacity":new Wi(xo.paint_fill["fill-opacity"]),"fill-color":new Wi(xo.paint_fill["fill-color"]),"fill-outline-color":new Wi(xo.paint_fill["fill-outline-color"]),"fill-translate":new Ji(xo.paint_fill["fill-translate"]),"fill-translate-anchor":new Ji(xo.paint_fill["fill-translate-anchor"]),"fill-pattern":new Qi(xo.paint_fill["fill-pattern"])})},get layout(){return Hd=Hd||new rs({"fill-sort-key":new Wi(xo.layout_fill["fill-sort-key"])})}};class ul extends is{constructor(u){super(u,Kd)}recalculate(u,Xe){super.recalculate(u,Xe);const Wt=this.paint._values["fill-outline-color"];"constant"===Wt.value.kind&&void 0===Wt.value.value&&(this.paint._values["fill-outline-color"]=this.paint._values["fill-color"])}createBucket(u){return new sl(u)}queryRadius(){return eo(this.paint.get("fill-translate"))}queryIntersectsFeature(u,Xe,Wt,fr,_r,wr,Ar){return Za(ro(u,this.paint.get("fill-translate"),this.paint.get("fill-translate-anchor"),wr.angle,Ar),fr)}isTileClipped(){return!0}}const Xd=ls([{name:"a_pos",components:2,type:"Int16"},{name:"a_normal_ed",components:4,type:"Int16"}],4),Yd=ls([{name:"a_centroid",components:2,type:"Int16"}],4),{members:Jd}=Xd;var Qd={},Rh=Xe,Oh=ml;function ml(u,Xe,Wt,fr,_r){this.properties={},this.extent=Wt,this.type=0,this._pbf=u,this._geometry=-1,this._keys=fr,this._values=_r,u.readFields(gl,this,Xe)}function gl(u,Xe,Wt){1==u?Xe.id=Wt.readVarint():2==u?function(u,Xe){for(var Wt=u.readVarint()+u.pos;u.pos<Wt;){var fr=Xe._keys[u.readVarint()],_r=Xe._values[u.readVarint()];Xe.properties[fr]=_r}}(Wt,Xe):3==u?Xe.type=Wt.readVarint():4==u&&(Xe._geometry=Wt.pos)}function xl(u){for(var Xe,Wt,fr=0,_r=0,wr=u.length,Ar=wr-1;_r<wr;Ar=_r++)fr+=((Wt=u[Ar]).x-(Xe=u[_r]).x)*(Xe.y+Wt.y);return fr}ml.types=["Unknown","Point","LineString","Polygon"],ml.prototype.loadGeometry=function(){var u=this._pbf;u.pos=this._geometry;for(var Xe,Wt=u.readVarint()+u.pos,fr=1,_r=0,wr=0,Ar=0,Kr=[];u.pos<Wt;){if(_r<=0){var In=u.readVarint();fr=7&In,_r=In>>3}if(_r--,1===fr||2===fr)wr+=u.readSVarint(),Ar+=u.readSVarint(),1===fr&&(Xe&&Kr.push(Xe),Xe=[]),Xe.push(new Rh(wr,Ar));else{if(7!==fr)throw new Error("unknown command "+fr);Xe&&Xe.push(Xe[0].clone())}}return Xe&&Kr.push(Xe),Kr},ml.prototype.bbox=function(){var u=this._pbf;u.pos=this._geometry;for(var Xe=u.readVarint()+u.pos,Wt=1,fr=0,_r=0,wr=0,Ar=1/0,Kr=-1/0,In=1/0,no=-1/0;u.pos<Xe;){if(fr<=0){var io=u.readVarint();Wt=7&io,fr=io>>3}if(fr--,1===Wt||2===Wt)(_r+=u.readSVarint())<Ar&&(Ar=_r),_r>Kr&&(Kr=_r),(wr+=u.readSVarint())<In&&(In=wr),wr>no&&(no=wr);else if(7!==Wt)throw new Error("unknown command "+Wt)}return[Ar,In,Kr,no]},ml.prototype.toGeoJSON=function(u,Xe,Wt){var fr,_r,wr=this.extent*Math.pow(2,Wt),Ar=this.extent*u,Kr=this.extent*Xe,In=this.loadGeometry(),no=ml.types[this.type];function c(u){for(var Xe=0;Xe<u.length;Xe++){var Wt=u[Xe];u[Xe]=[360*(Wt.x+Ar)/wr-180,360/Math.PI*Math.atan(Math.exp((180-360*(Wt.y+Kr)/wr)*Math.PI/180))-90]}}switch(this.type){case 1:var io=[];for(fr=0;fr<In.length;fr++)io[fr]=In[fr][0];c(In=io);break;case 2:for(fr=0;fr<In.length;fr++)c(In[fr]);break;case 3:for(In=function(u){var Xe=u.length;if(Xe<=1)return[u];for(var Wt,fr,_r=[],wr=0;wr<Xe;wr++){var Ar=xl(u[wr]);0!==Ar&&(void 0===fr&&(fr=Ar<0),fr===Ar<0?(Wt&&_r.push(Wt),Wt=[u[wr]]):Wt.push(u[wr]))}return Wt&&_r.push(Wt),_r}(In),fr=0;fr<In.length;fr++)for(_r=0;_r<In[fr].length;_r++)c(In[fr][_r])}1===In.length?In=In[0]:no="Multi"+no;var oo={type:"Feature",geometry:{type:no,coordinates:In},properties:this.properties};return"id"in this&&(oo.id=this.id),oo};var Lh=Oh,Dh=wl;function wl(u,Xe){this.version=1,this.name=null,this.extent=4096,this.length=0,this._pbf=u,this._keys=[],this._values=[],this._features=[],u.readFields(_l,this,Xe),this.length=this._features.length}function _l(u,Xe,Wt){15===u?Xe.version=Wt.readVarint():1===u?Xe.name=Wt.readString():5===u?Xe.extent=Wt.readVarint():2===u?Xe._features.push(Wt.pos):3===u?Xe._keys.push(Wt.readString()):4===u&&Xe._values.push(function(u){for(var Xe=null,Wt=u.readVarint()+u.pos;u.pos<Wt;){var fr=u.readVarint()>>3;Xe=1===fr?u.readString():2===fr?u.readFloat():3===fr?u.readDouble():4===fr?u.readVarint64():5===fr?u.readVarint():6===fr?u.readSVarint():7===fr?u.readBoolean():null}return Xe}(Wt))}wl.prototype.feature=function(u){if(u<0||u>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[u];var Xe=this._pbf.readVarint()+this._pbf.pos;return new Lh(this._pbf,Xe,this.extent,this._keys,this._values)};var Fh=Dh;function Sl(u,Xe,Wt){if(3===u){var fr=new Fh(Wt,Wt.readVarint()+Wt.pos);fr.length&&(Xe[fr.name]=fr)}}Qd.VectorTile=function(u,Xe){this.layers=u.readFields(Sl,{},Xe)},Qd.VectorTileFeature=Oh,Qd.VectorTileLayer=Dh;const jh=Qd.VectorTileFeature.types,Hh=Math.pow(2,13);function Il(u,Xe,Wt,fr,_r,wr,Ar,Kr){u.emplaceBack(Xe,Wt,2*Math.floor(fr*Hh)+Ar,_r*Hh*2,wr*Hh*2,Math.round(Kr))}class zl{constructor(u){this.zoom=u.zoom,this.overscaling=u.overscaling,this.layers=u.layers,this.layerIds=this.layers.map((u=>u.id)),this.index=u.index,this.hasPattern=!1,this.layoutVertexArray=new Xs,this.centroidVertexArray=new Zs,this.indexArray=new na,this.programConfigurations=new Ea(u.layers,u.zoom),this.segments=new oa,this.stateDependentLayerIds=this.layers.filter((u=>u.isStateDependent())).map((u=>u.id))}populate(u,Xe,Wt){this.features=[],this.hasPattern=nl("fill-extrusion",this.layers,Xe);for(const{feature:fr,id:_r,index:wr,sourceLayerIndex:Ar}of u){const u=this.layers[0]._featureFilter.needGeometry,Kr=ja(fr,u);if(!this.layers[0]._featureFilter.filter(new Ui(this.zoom),Kr,Wt))continue;const In={id:_r,sourceLayerIndex:Ar,index:wr,geometry:u?Kr.geometry:Oa(fr),properties:fr.properties,type:fr.type,patterns:{}};this.hasPattern?this.features.push(il("fill-extrusion",this.layers,In,this.zoom,Xe)):this.addFeature(In,In.geometry,wr,Wt,{}),Xe.featureIndex.insert(fr,In.geometry,wr,Ar,this.index,!0)}}addFeatures(u,Xe,Wt){for(const u of this.features){const{geometry:fr}=u;this.addFeature(u,fr,u.index,Xe,Wt)}}update(u,Xe,Wt){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(u,Xe,this.stateDependentLayers,Wt)}isEmpty(){return 0===this.layoutVertexArray.length&&0===this.centroidVertexArray.length}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(u){this.uploaded||(this.layoutVertexBuffer=u.createVertexBuffer(this.layoutVertexArray,Jd),this.centroidVertexBuffer=u.createVertexBuffer(this.centroidVertexArray,Yd.members,!0),this.indexBuffer=u.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(u),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.centroidVertexBuffer.destroy())}addFeature(u,Xe,Wt,fr,_r){for(const Wt of xr(Xe,500)){const Xe={x:0,y:0,vertexCount:0};let fr=0;for(const u of Wt)fr+=u.length;let _r=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray);for(const u of Wt){if(0===u.length)continue;if(Cl(u))continue;let Wt=0;for(let fr=0;fr<u.length;fr++){const wr=u[fr];if(fr>=1){const Ar=u[fr-1];if(!Pl(wr,Ar)){_r.vertexLength+4>oa.MAX_VERTEX_ARRAY_LENGTH&&(_r=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));const u=wr.sub(Ar)._perp()._unit(),fr=Ar.dist(wr);Wt+fr>32768&&(Wt=0),Il(this.layoutVertexArray,wr.x,wr.y,u.x,u.y,0,0,Wt),Il(this.layoutVertexArray,wr.x,wr.y,u.x,u.y,0,1,Wt),Xe.x+=2*wr.x,Xe.y+=2*wr.y,Xe.vertexCount+=2,Wt+=fr,Il(this.layoutVertexArray,Ar.x,Ar.y,u.x,u.y,0,0,Wt),Il(this.layoutVertexArray,Ar.x,Ar.y,u.x,u.y,0,1,Wt),Xe.x+=2*Ar.x,Xe.y+=2*Ar.y,Xe.vertexCount+=2;const Kr=_r.vertexLength;this.indexArray.emplaceBack(Kr,Kr+2,Kr+1),this.indexArray.emplaceBack(Kr+1,Kr+2,Kr+3),_r.vertexLength+=4,_r.primitiveLength+=2}}}}if(_r.vertexLength+fr>oa.MAX_VERTEX_ARRAY_LENGTH&&(_r=this.segments.prepareSegment(fr,this.layoutVertexArray,this.indexArray)),"Polygon"!==jh[u.type])continue;const wr=[],Ar=[],Kr=_r.vertexLength;for(const u of Wt)if(0!==u.length){u!==Wt[0]&&Ar.push(wr.length/2);for(let Wt=0;Wt<u.length;Wt++){const fr=u[Wt];Il(this.layoutVertexArray,fr.x,fr.y,0,0,1,1,0),Xe.x+=fr.x,Xe.y+=fr.y,Xe.vertexCount+=1,wr.push(fr.x),wr.push(fr.y)}}const In=Vo(wr,Ar);for(let u=0;u<In.length;u+=3)this.indexArray.emplaceBack(Kr+In[u],Kr+In[u+2],Kr+In[u+1]);_r.primitiveLength+=In.length/3,_r.vertexLength+=fr;for(let u=0;u<Xe.vertexCount;u++){const u=Math.floor(Xe.x/Xe.vertexCount),Wt=Math.floor(Xe.y/Xe.vertexCount);this.centroidVertexArray.emplaceBack(u,Wt)}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,u,Wt,_r,fr)}}function Pl(u,Xe){return u.x===Xe.x&&(u.x<0||u.x>Td)||u.y===Xe.y&&(u.y<0||u.y>Td)}function Cl(u){return u.every((u=>u.x<0))||u.every((u=>u.x>Td))||u.every((u=>u.y<0))||u.every((u=>u.y>Td))}let Gh;wi("FillExtrusionBucket",zl,{omit:["layers","features"]});var Kh={get paint(){return Gh=Gh||new rs({"fill-extrusion-opacity":new Ji(xo["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new Wi(xo["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new Ji(xo["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new Ji(xo["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new Qi(xo["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new Wi(xo["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new Wi(xo["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new Ji(xo["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])})}};class El extends is{constructor(u){super(u,Kh)}createBucket(u){return new zl(u)}queryRadius(){return eo(this.paint.get("fill-extrusion-translate"))}is3D(){return!0}queryIntersectsFeature(u,Xe,fr,_r,wr,Ar,Kr,In){const no=ro(u,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),Ar.angle,Kr),io=this.paint.get("fill-extrusion-height").evaluate(Xe,fr),oo=this.paint.get("fill-extrusion-base").evaluate(Xe,fr),ao=function(u,Xe){const fr=[];for(const _r of u){const u=[_r.x,_r.y,0,1];po(u,u,Xe),fr.push(new Wt(u[0]/u[3],u[1]/u[3]))}return fr}(no,In),so=function(u,Xe,fr,_r){const wr=[],Ar=[],Kr=_r[8]*Xe,In=_r[9]*Xe,no=_r[10]*Xe,io=_r[11]*Xe,oo=_r[8]*fr,ao=_r[9]*fr,so=_r[10]*fr,co=_r[11]*fr;for(const Xe of u){const u=[],fr=[];for(const wr of Xe){const Xe=wr.x,Ar=wr.y,ho=_r[0]*Xe+_r[4]*Ar+_r[12],go=_r[1]*Xe+_r[5]*Ar+_r[13],xo=_r[2]*Xe+_r[6]*Ar+_r[14],ko=_r[3]*Xe+_r[7]*Ar+_r[15],Co=xo+no,Io=ko+io,zo=ho+oo,Bo=go+ao,ca=xo+so,ua=ko+co,Da=new Wt((ho+Kr)/Io,(go+In)/Io);Da.z=Co/Io,u.push(Da);const ns=new Wt(zo/ua,Bo/ua);ns.z=ca/ua,fr.push(ns)}wr.push(u),Ar.push(fr)}return[wr,Ar]}(_r,oo,io,In);return function(u,Xe,Wt){let fr=1/0;Za(Wt,Xe)&&(fr=Tl(Wt,Xe[0]));for(let _r=0;_r<Xe.length;_r++){const wr=Xe[_r],Ar=u[_r];for(let u=0;u<wr.length-1;u++){const Xe=wr[u],_r=[Xe,wr[u+1],Ar[u+1],Ar[u],Xe];qa(Wt,_r)&&(fr=Math.min(fr,Tl(Wt,_r)))}}return fr!==1/0&&fr}(so[0],so[1],ao)}}function Fl(u,Xe){return u.x*Xe.x+u.y*Xe.y}function Tl(u,Xe){if(1===u.length){let Wt=0;const fr=Xe[Wt++];let _r;for(;!_r||fr.equals(_r);)if(_r=Xe[Wt++],!_r)return 1/0;for(;Wt<Xe.length;Wt++){const wr=Xe[Wt],Ar=u[0],Kr=_r.sub(fr),In=wr.sub(fr),no=Ar.sub(fr),io=Fl(Kr,Kr),oo=Fl(Kr,In),ao=Fl(In,In),so=Fl(no,Kr),co=Fl(no,In),ho=io*ao-oo*oo,go=(ao*so-oo*co)/ho,xo=(io*co-oo*so)/ho,ko=fr.z*(1-go-xo)+_r.z*go+wr.z*xo;if(isFinite(ko))return ko}return 1/0}{let u=1/0;for(const Wt of Xe)u=Math.min(u,Wt.z);return u}}const Jh=ls([{name:"a_pos_normal",components:2,type:"Int16"},{name:"a_data",components:4,type:"Uint8"}],4),{members:Qh}=Jh,ep=ls([{name:"a_uv_x",components:1,type:"Float32"},{name:"a_split_index",components:1,type:"Float32"}]),{members:tp}=ep,rp=Qd.VectorTileFeature.types,np=Math.cos(Math.PI/180*37.5),ip=Math.pow(2,14)/.5;class ql{constructor(u){this.zoom=u.zoom,this.overscaling=u.overscaling,this.layers=u.layers,this.layerIds=this.layers.map((u=>u.id)),this.index=u.index,this.hasPattern=!1,this.patternFeatures=[],this.lineClipsArray=[],this.gradients={},this.layers.forEach((u=>{this.gradients[u.id]={}})),this.layoutVertexArray=new Hs,this.layoutVertexArray2=new Ys,this.indexArray=new na,this.programConfigurations=new Ea(u.layers,u.zoom),this.segments=new oa,this.maxLineLength=0,this.stateDependentLayerIds=this.layers.filter((u=>u.isStateDependent())).map((u=>u.id))}populate(u,Xe,Wt){this.hasPattern=nl("line",this.layers,Xe);const fr=this.layers[0].layout.get("line-sort-key"),_r=!fr.isConstant(),wr=[];for(const{feature:Xe,id:Ar,index:Kr,sourceLayerIndex:In}of u){const u=this.layers[0]._featureFilter.needGeometry,no=ja(Xe,u);if(!this.layers[0]._featureFilter.filter(new Ui(this.zoom),no,Wt))continue;const io=_r?fr.evaluate(no,{},Wt):void 0,oo={id:Ar,properties:Xe.properties,type:Xe.type,sourceLayerIndex:In,index:Kr,geometry:u?no.geometry:Oa(Xe),patterns:{},sortKey:io};wr.push(oo)}_r&&wr.sort(((u,Xe)=>u.sortKey-Xe.sortKey));for(const fr of wr){const{geometry:_r,index:wr,sourceLayerIndex:Ar}=fr;if(this.hasPattern){const u=il("line",this.layers,fr,this.zoom,Xe);this.patternFeatures.push(u)}else this.addFeature(fr,_r,wr,Wt,{});Xe.featureIndex.insert(u[wr].feature,_r,wr,Ar,this.index)}}update(u,Xe,Wt){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(u,Xe,this.stateDependentLayers,Wt)}addFeatures(u,Xe,Wt){for(const u of this.patternFeatures)this.addFeature(u,u.geometry,u.index,Xe,Wt)}isEmpty(){return 0===this.layoutVertexArray.length}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(u){this.uploaded||(0!==this.layoutVertexArray2.length&&(this.layoutVertexBuffer2=u.createVertexBuffer(this.layoutVertexArray2,tp)),this.layoutVertexBuffer=u.createVertexBuffer(this.layoutVertexArray,Qh),this.indexBuffer=u.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(u),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}lineFeatureClips(u){if(u.properties&&Object.prototype.hasOwnProperty.call(u.properties,"mapbox_clip_start")&&Object.prototype.hasOwnProperty.call(u.properties,"mapbox_clip_end"))return{start:+u.properties.mapbox_clip_start,end:+u.properties.mapbox_clip_end}}addFeature(u,Xe,Wt,fr,_r){const wr=this.layers[0].layout,Ar=wr.get("line-join").evaluate(u,{}),Kr=wr.get("line-cap"),In=wr.get("line-miter-limit"),no=wr.get("line-round-limit");this.lineClips=this.lineFeatureClips(u);for(const Wt of Xe)this.addLine(Wt,u,Ar,Kr,In,no);this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,u,Wt,_r,fr)}addLine(u,Xe,Wt,fr,_r,wr){if(this.distance=0,this.scaledDistance=0,this.totalDistance=0,this.lineClips){this.lineClipsArray.push(this.lineClips);for(let Xe=0;Xe<u.length-1;Xe++)this.totalDistance+=u[Xe].dist(u[Xe+1]);this.updateScaledDistance(),this.maxLineLength=Math.max(this.maxLineLength,this.totalDistance)}const Ar="Polygon"===rp[Xe.type];let Kr=u.length;for(;Kr>=2&&u[Kr-1].equals(u[Kr-2]);)Kr--;let In=0;for(;In<Kr-1&&u[In].equals(u[In+1]);)In++;if(Kr<(Ar?3:2))return;"bevel"===Wt&&(_r=1.05);const no=this.overscaling<=16?15*Td/(512*this.overscaling):0,io=this.segments.prepareSegment(10*Kr,this.layoutVertexArray,this.indexArray);let oo,ao,so,co,ho;this.e1=this.e2=-1,Ar&&(oo=u[Kr-2],ho=u[In].sub(oo)._unit()._perp());for(let Xe=In;Xe<Kr;Xe++){if(so=Xe===Kr-1?Ar?u[In+1]:void 0:u[Xe+1],so&&u[Xe].equals(so))continue;ho&&(co=ho),oo&&(ao=oo),oo=u[Xe],ho=so?so.sub(oo)._unit()._perp():co,co=co||ho;let go=co.add(ho);0===go.x&&0===go.y||go._unit();const xo=co.x*ho.x+co.y*ho.y,ko=go.x*ho.x+go.y*ho.y,Co=0!==ko?1/ko:1/0,Io=2*Math.sqrt(2-2*ko),zo=ko<np&&ao&&so,Bo=co.x*ho.y-co.y*ho.x>0;if(zo&&Xe>In){const u=oo.dist(ao);if(u>2*no){const Xe=oo.sub(oo.sub(ao)._mult(no/u)._round());this.updateDistance(ao,Xe),this.addCurrentVertex(Xe,co,0,0,io),ao=Xe}}const ca=ao&&so;let ua=ca?Wt:Ar?"butt":fr;if(ca&&"round"===ua&&(Co<wr?ua="miter":Co<=2&&(ua="fakeround")),"miter"===ua&&Co>_r&&(ua="bevel"),"bevel"===ua&&(Co>2&&(ua="flipbevel"),Co<_r&&(ua="miter")),ao&&this.updateDistance(ao,oo),"miter"===ua)go._mult(Co),this.addCurrentVertex(oo,go,0,0,io);else if("flipbevel"===ua){if(Co>100)go=ho.mult(-1);else{const u=Co*co.add(ho).mag()/co.sub(ho).mag();go._perp()._mult(u*(Bo?-1:1))}this.addCurrentVertex(oo,go,0,0,io),this.addCurrentVertex(oo,go.mult(-1),0,0,io)}else if("bevel"===ua||"fakeround"===ua){const u=-Math.sqrt(Co*Co-1),Xe=Bo?u:0,Wt=Bo?0:u;if(ao&&this.addCurrentVertex(oo,co,Xe,Wt,io),"fakeround"===ua){const u=Math.round(180*Io/Math.PI/20);for(let Xe=1;Xe<u;Xe++){let Wt=Xe/u;if(.5!==Wt){const u=Wt-.5;Wt+=Wt*u*(Wt-1)*((1.0904+xo*(xo*(3.55645-1.43519*xo)-3.2452))*u*u+(.848013+xo*(.215638*xo-1.06021)))}const fr=ho.sub(co)._mult(Wt)._add(co)._unit()._mult(Bo?-1:1);this.addHalfVertex(oo,fr.x,fr.y,!1,Bo,0,io)}}so&&this.addCurrentVertex(oo,ho,-Xe,-Wt,io)}else if("butt"===ua)this.addCurrentVertex(oo,go,0,0,io);else if("square"===ua){const u=ao?1:-1;this.addCurrentVertex(oo,go,u,u,io)}else"round"===ua&&(ao&&(this.addCurrentVertex(oo,co,0,0,io),this.addCurrentVertex(oo,co,1,1,io,!0)),so&&(this.addCurrentVertex(oo,ho,-1,-1,io,!0),this.addCurrentVertex(oo,ho,0,0,io)));if(zo&&Xe<Kr-1){const u=oo.dist(so);if(u>2*no){const Xe=oo.add(so.sub(oo)._mult(no/u)._round());this.updateDistance(oo,Xe),this.addCurrentVertex(Xe,ho,0,0,io),oo=Xe}}}}addCurrentVertex(u,Xe,Wt,fr,_r,wr=!1){const Ar=Xe.y*fr-Xe.x,Kr=-Xe.y-Xe.x*fr;this.addHalfVertex(u,Xe.x+Xe.y*Wt,Xe.y-Xe.x*Wt,wr,!1,Wt,_r),this.addHalfVertex(u,Ar,Kr,wr,!0,-fr,_r),this.distance>ip/2&&0===this.totalDistance&&(this.distance=0,this.updateScaledDistance(),this.addCurrentVertex(u,Xe,Wt,fr,_r,wr))}addHalfVertex({x:u,y:Xe},Wt,fr,_r,wr,Ar,Kr){const In=.5*(this.lineClips?this.scaledDistance*(ip-1):this.scaledDistance);this.layoutVertexArray.emplaceBack((u<<1)+(_r?1:0),(Xe<<1)+(wr?1:0),Math.round(63*Wt)+128,Math.round(63*fr)+128,1+(0===Ar?0:Ar<0?-1:1)|(63&In)<<2,In>>6),this.lineClips&&this.layoutVertexArray2.emplaceBack((this.scaledDistance-this.lineClips.start)/(this.lineClips.end-this.lineClips.start),this.lineClipsArray.length);const no=Kr.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,no),Kr.primitiveLength++),wr?this.e2=no:this.e1=no}updateScaledDistance(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance}updateDistance(u,Xe){this.distance+=u.dist(Xe),this.updateScaledDistance()}}let op,ap;wi("LineBucket",ql,{omit:["layers","patternFeatures"]});var sp={get paint(){return ap=ap||new rs({"line-opacity":new Wi(xo.paint_line["line-opacity"]),"line-color":new Wi(xo.paint_line["line-color"]),"line-translate":new Ji(xo.paint_line["line-translate"]),"line-translate-anchor":new Ji(xo.paint_line["line-translate-anchor"]),"line-width":new Wi(xo.paint_line["line-width"]),"line-gap-width":new Wi(xo.paint_line["line-gap-width"]),"line-offset":new Wi(xo.paint_line["line-offset"]),"line-blur":new Wi(xo.paint_line["line-blur"]),"line-dasharray":new ts(xo.paint_line["line-dasharray"]),"line-pattern":new Qi(xo.paint_line["line-pattern"]),"line-gradient":new es(xo.paint_line["line-gradient"])})},get layout(){return op=op||new rs({"line-cap":new Ji(xo.layout_line["line-cap"]),"line-join":new Wi(xo.layout_line["line-join"]),"line-miter-limit":new Ji(xo.layout_line["line-miter-limit"]),"line-round-limit":new Ji(xo.layout_line["line-round-limit"]),"line-sort-key":new Wi(xo.layout_line["line-sort-key"])})}};class Kl extends Wi{possiblyEvaluate(u,Xe){return Xe=new Ui(Math.floor(Xe.zoom),{now:Xe.now,fadeDuration:Xe.fadeDuration,zoomHistory:Xe.zoomHistory,transition:Xe.transition}),super.possiblyEvaluate(u,Xe)}evaluate(u,Xe,Wt,fr){return Xe=g({},Xe,{zoom:Math.floor(Xe.zoom)}),super.evaluate(u,Xe,Wt,fr)}}let lp;class Hl extends is{constructor(u){super(u,sp),this.gradientVersion=0,lp||(lp=new Kl(sp.paint.properties["line-width"].specification),lp.useIntegerZoom=!0)}_handleSpecialPaintPropertyUpdate(u){if("line-gradient"===u){const u=this.gradientExpression();this.stepInterpolant=!!function(u){return void 0!==u._styleExpression}(u)&&u._styleExpression.expression instanceof Ae,this.gradientVersion=(this.gradientVersion+1)%Number.MAX_SAFE_INTEGER}}gradientExpression(){return this._transitionablePaint._values["line-gradient"].value.expression}recalculate(u,Xe){super.recalculate(u,Xe),this.paint._values["line-floorwidth"]=lp.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,u)}createBucket(u){return new ql(u)}queryRadius(u){const Xe=u,Wt=Yl(to("line-width",this,Xe),to("line-gap-width",this,Xe)),fr=to("line-offset",this,Xe);return Wt/2+Math.abs(fr)+eo(this.paint.get("line-translate"))}queryIntersectsFeature(u,Xe,fr,_r,wr,Ar,Kr){const In=ro(u,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),Ar.angle,Kr),no=Kr/2*Yl(this.paint.get("line-width").evaluate(Xe,fr),this.paint.get("line-gap-width").evaluate(Xe,fr)),io=this.paint.get("line-offset").evaluate(Xe,fr);return io&&(_r=function(u,Xe){const fr=[];for(let _r=0;_r<u.length;_r++){const wr=u[_r],Ar=[];for(let u=0;u<wr.length;u++){const fr=wr[u-1],_r=wr[u],Kr=wr[u+1],In=0===u?new Wt(0,0):_r.sub(fr)._unit()._perp(),no=u===wr.length-1?new Wt(0,0):Kr.sub(_r)._unit()._perp(),io=In._add(no)._unit(),oo=io.x*no.x+io.y*no.y;0!==oo&&io._mult(1/oo),Ar.push(io._mult(Xe)._add(_r))}fr.push(Ar)}return fr}(_r,io*Kr)),function(u,Xe,Wt){for(let fr=0;fr<Xe.length;fr++){const _r=Xe[fr];if(u.length>=3)for(let Xe=0;Xe<_r.length;Xe++)if(Wa(u,_r[Xe]))return!0;if(Ga(u,_r,Wt))return!0}return!1}(In,_r,no)}isTileClipped(){return!0}}function Yl(u,Xe){return Xe>0?Xe+2*u:u}const cp=ls([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),dp=ls([{name:"a_projected_pos",components:3,type:"Float32"}],4);ls([{name:"a_fade_opacity",components:1,type:"Uint32"}],4);const hp=ls([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"},{name:"a_box_real",components:2,type:"Int16"}]);ls([{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 pp=ls([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4),fp=ls([{name:"a_pos",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4);function ru(u,Xe,Wt){return u.sections.forEach((u=>{u.text=function(u,Xe,Wt){const fr=Xe.layout.get("text-transform").evaluate(Wt,{});return"uppercase"===fr?u=u.toLocaleUpperCase():"lowercase"===fr&&(u=u.toLocaleLowerCase()),ld.applyArabicShaping&&(u=ld.applyArabicShaping(u)),u}(u.text,Xe,Wt)})),u}ls([{name:"triangle",components:3,type:"Uint16"}]),ls([{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"}]),ls([{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"}]),ls([{type:"Float32",name:"offsetX"}]),ls([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]),ls([{type:"Uint16",name:"textAnchor"},{type:"Float32",components:2,name:"textOffset"}]);const mp={"!":"︕","#":"#",$:"$","%":"%","&":"&","(":"︵",")":"︶","*":"*","+":"+",",":"︐","-":"︲",".":"・","/":"/",":":"︓",";":"︔","<":"︿","=":"=",">":"﹀","?":"︖","@":"@","[":"﹇","\\":"\","]":"﹈","^":"^",_:"︳","`":"`","{":"︷","|":"―","}":"︸","~":"~","¢":"¢","£":"£","¥":"¥","¦":"¦","¬":"¬","¯":" ̄","–":"︲","—":"︱","‘":"﹃","’":"﹄","“":"﹁","”":"﹂","…":"︙","‧":"・","₩":"₩","、":"︑","。":"︒","〈":"︿","〉":"﹀","《":"︽","》":"︾","「":"﹁","」":"﹂","『":"﹃","』":"﹄","【":"︻","】":"︼","〔":"︹","〕":"︺","〖":"︗","〗":"︘","!":"︕","(":"︵",")":"︶",",":"︐","-":"︲",".":"・",":":"︓",";":"︔","<":"︿",">":"﹀","?":"︖","[":"﹇","]":"﹈","_":"︳","{":"︷","|":"―","}":"︸","⦅":"︵","⦆":"︶","。":"︒","「":"﹁","」":"﹂"};var gp=24,yp=lu,au=function(u,Xe,Wt,fr,_r){var wr,Ar,Kr=8*_r-fr-1,In=(1<<Kr)-1,no=In>>1,io=-7,oo=Wt?_r-1:0,ao=Wt?-1:1,so=u[Xe+oo];for(oo+=ao,wr=so&(1<<-io)-1,so>>=-io,io+=Kr;io>0;wr=256*wr+u[Xe+oo],oo+=ao,io-=8);for(Ar=wr&(1<<-io)-1,wr>>=-io,io+=fr;io>0;Ar=256*Ar+u[Xe+oo],oo+=ao,io-=8);if(0===wr)wr=1-no;else{if(wr===In)return Ar?NaN:1/0*(so?-1:1);Ar+=Math.pow(2,fr),wr-=no}return(so?-1:1)*Ar*Math.pow(2,wr-fr)},ou=function(u,Xe,Wt,fr,_r,wr){var Ar,Kr,In,no=8*wr-_r-1,io=(1<<no)-1,oo=io>>1,ao=23===_r?Math.pow(2,-24)-Math.pow(2,-77):0,so=fr?0:wr-1,co=fr?1:-1,ho=Xe<0||0===Xe&&1/Xe<0?1:0;for(Xe=Math.abs(Xe),isNaN(Xe)||Xe===1/0?(Kr=isNaN(Xe)?1:0,Ar=io):(Ar=Math.floor(Math.log(Xe)/Math.LN2),Xe*(In=Math.pow(2,-Ar))<1&&(Ar--,In*=2),(Xe+=Ar+oo>=1?ao/In:ao*Math.pow(2,1-oo))*In>=2&&(Ar++,In/=2),Ar+oo>=io?(Kr=0,Ar=io):Ar+oo>=1?(Kr=(Xe*In-1)*Math.pow(2,_r),Ar+=oo):(Kr=Xe*Math.pow(2,oo-1)*Math.pow(2,_r),Ar=0));_r>=8;u[Wt+so]=255&Kr,so+=co,Kr/=256,_r-=8);for(Ar=Ar<<_r|Kr,no+=_r;no>0;u[Wt+so]=255&Ar,so+=co,Ar/=256,no-=8);u[Wt+so-co]|=128*ho};function lu(u){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(u)?u:new Uint8Array(u||0),this.pos=0,this.type=0,this.length=this.buf.length}lu.Varint=0,lu.Fixed64=1,lu.Bytes=2,lu.Fixed32=5;var _p=4294967296,vp=1/_p,bp="undefined"==typeof TextDecoder?null:new TextDecoder("utf-8");function pu(u){return u.type===lu.Bytes?u.readVarint()+u.pos:u.pos+1}function fu(u,Xe,Wt){return Wt?4294967296*Xe+(u>>>0):4294967296*(Xe>>>0)+(u>>>0)}function du(u,Xe,Wt){var fr=Xe<=16383?1:Xe<=2097151?2:Xe<=268435455?3:Math.floor(Math.log(Xe)/(7*Math.LN2));Wt.realloc(fr);for(var _r=Wt.pos-1;_r>=u;_r--)Wt.buf[_r+fr]=Wt.buf[_r]}function yu(u,Xe){for(var Wt=0;Wt<u.length;Wt++)Xe.writeVarint(u[Wt])}function mu(u,Xe){for(var Wt=0;Wt<u.length;Wt++)Xe.writeSVarint(u[Wt])}function gu(u,Xe){for(var Wt=0;Wt<u.length;Wt++)Xe.writeFloat(u[Wt])}function xu(u,Xe){for(var Wt=0;Wt<u.length;Wt++)Xe.writeDouble(u[Wt])}function vu(u,Xe){for(var Wt=0;Wt<u.length;Wt++)Xe.writeBoolean(u[Wt])}function bu(u,Xe){for(var Wt=0;Wt<u.length;Wt++)Xe.writeFixed32(u[Wt])}function wu(u,Xe){for(var Wt=0;Wt<u.length;Wt++)Xe.writeSFixed32(u[Wt])}function _u(u,Xe){for(var Wt=0;Wt<u.length;Wt++)Xe.writeFixed64(u[Wt])}function Au(u,Xe){for(var Wt=0;Wt<u.length;Wt++)Xe.writeSFixed64(u[Wt])}function Su(u,Xe){return(u[Xe]|u[Xe+1]<<8|u[Xe+2]<<16)+16777216*u[Xe+3]}function ku(u,Xe,Wt){u[Wt]=Xe,u[Wt+1]=Xe>>>8,u[Wt+2]=Xe>>>16,u[Wt+3]=Xe>>>24}function Mu(u,Xe){return(u[Xe]|u[Xe+1]<<8|u[Xe+2]<<16)+(u[Xe+3]<<24)}lu.prototype={destroy:function(){this.buf=null},readFields:function(u,Xe,Wt){for(Wt=Wt||this.length;this.pos<Wt;){var fr=this.readVarint(),_r=fr>>3,wr=this.pos;this.type=7&fr,u(_r,Xe,this),this.pos===wr&&this.skip(fr)}return Xe},readMessage:function(u,Xe){return this.readFields(u,Xe,this.readVarint()+this.pos)},readFixed32:function(){var u=Su(this.buf,this.pos);return this.pos+=4,u},readSFixed32:function(){var u=Mu(this.buf,this.pos);return this.pos+=4,u},readFixed64:function(){var u=Su(this.buf,this.pos)+Su(this.buf,this.pos+4)*_p;return this.pos+=8,u},readSFixed64:function(){var u=Su(this.buf,this.pos)+Mu(this.buf,this.pos+4)*_p;return this.pos+=8,u},readFloat:function(){var u=au(this.buf,this.pos,!0,23,4);return this.pos+=4,u},readDouble:function(){var u=au(this.buf,this.pos,!0,52,8);return this.pos+=8,u},readVarint:function(u){var Xe,Wt,fr=this.buf;return Xe=127&(Wt=fr[this.pos++]),Wt<128?Xe:(Xe|=(127&(Wt=fr[this.pos++]))<<7,Wt<128?Xe:(Xe|=(127&(Wt=fr[this.pos++]))<<14,Wt<128?Xe:(Xe|=(127&(Wt=fr[this.pos++]))<<21,Wt<128?Xe:function(u,Xe,Wt){var fr,_r,wr=Wt.buf;if(fr=(112&(_r=wr[Wt.pos++]))>>4,_r<128)return fu(u,fr,Xe);if(fr|=(127&(_r=wr[Wt.pos++]))<<3,_r<128)return fu(u,fr,Xe);if(fr|=(127&(_r=wr[Wt.pos++]))<<10,_r<128)return fu(u,fr,Xe);if(fr|=(127&(_r=wr[Wt.pos++]))<<17,_r<128)return fu(u,fr,Xe);if(fr|=(127&(_r=wr[Wt.pos++]))<<24,_r<128)return fu(u,fr,Xe);if(fr|=(1&(_r=wr[Wt.pos++]))<<31,_r<128)return fu(u,fr,Xe);throw new Error("Expected varint not more than 10 bytes")}(Xe|=(15&(Wt=fr[this.pos]))<<28,u,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var u=this.readVarint();return u%2==1?(u+1)/-2:u/2},readBoolean:function(){return Boolean(this.readVarint())},readString:function(){var u=this.readVarint()+this.pos,Xe=this.pos;return this.pos=u,u-Xe>=12&&bp?function(u,Xe,Wt){return bp.decode(u.subarray(Xe,Wt))}(this.buf,Xe,u):function(u,Xe,Wt){for(var fr="",_r=Xe;_r<Wt;){var wr,Ar,Kr,In=u[_r],no=null,io=In>239?4:In>223?3:In>191?2:1;if(_r+io>Wt)break;1===io?In<128&&(no=In):2===io?128==(192&(wr=u[_r+1]))&&(no=(31&In)<<6|63&wr)<=127&&(no=null):3===io?(Ar=u[_r+2],128==(192&(wr=u[_r+1]))&&128==(192&Ar)&&((no=(15&In)<<12|(63&wr)<<6|63&Ar)<=2047||no>=55296&&no<=57343)&&(no=null)):4===io&&(Ar=u[_r+2],Kr=u[_r+3],128==(192&(wr=u[_r+1]))&&128==(192&Ar)&&128==(192&Kr)&&((no=(15&In)<<18|(63&wr)<<12|(63&Ar)<<6|63&Kr)<=65535||no>=1114112)&&(no=null)),null===no?(no=65533,io=1):no>65535&&(no-=65536,fr+=String.fromCharCode(no>>>10&1023|55296),no=56320|1023&no),fr+=String.fromCharCode(no),_r+=io}return fr}(this.buf,Xe,u)},readBytes:function(){var u=this.readVarint()+this.pos,Xe=this.buf.subarray(this.pos,u);return this.pos=u,Xe},readPackedVarint:function(u,Xe){if(this.type!==lu.Bytes)return u.push(this.readVarint(Xe));var Wt=pu(this);for(u=u||[];this.pos<Wt;)u.push(this.readVarint(Xe));return u},readPackedSVarint:function(u){if(this.type!==lu.Bytes)return u.push(this.readSVarint());var Xe=pu(this);for(u=u||[];this.pos<Xe;)u.push(this.readSVarint());return u},readPackedBoolean:function(u){if(this.type!==lu.Bytes)return u.push(this.readBoolean());var Xe=pu(this);for(u=u||[];this.pos<Xe;)u.push(this.readBoolean());return u},readPackedFloat:function(u){if(this.type!==lu.Bytes)return u.push(this.readFloat());var Xe=pu(this);for(u=u||[];this.pos<Xe;)u.push(this.readFloat());return u},readPackedDouble:function(u){if(this.type!==lu.Bytes)return u.push(this.readDouble());var Xe=pu(this);for(u=u||[];this.pos<Xe;)u.push(this.readDouble());return u},readPackedFixed32:function(u){if(this.type!==lu.Bytes)return u.push(this.readFixed32());var Xe=pu(this);for(u=u||[];this.pos<Xe;)u.push(this.readFixed32());return u},readPackedSFixed32:function(u){if(this.type!==lu.Bytes)return u.push(this.readSFixed32());var Xe=pu(this);for(u=u||[];this.pos<Xe;)u.push(this.readSFixed32());return u},readPackedFixed64:function(u){if(this.type!==lu.Bytes)return u.push(this.readFixed64());var Xe=pu(this);for(u=u||[];this.pos<Xe;)u.push(this.readFixed64());return u},readPackedSFixed64:function(u){if(this.type!==lu.Bytes)return u.push(this.readSFixed64());var Xe=pu(this);for(u=u||[];this.pos<Xe;)u.push(this.readSFixed64());return u},skip:function(u){var Xe=7&u;if(Xe===lu.Varint)for(;this.buf[this.pos++]>127;);else if(Xe===lu.Bytes)this.pos=this.readVarint()+this.pos;else if(Xe===lu.Fixed32)this.pos+=4;else{if(Xe!==lu.Fixed64)throw new Error("Unimplemented type: "+Xe);this.pos+=8}},writeTag:function(u,Xe){this.writeVarint(u<<3|Xe)},realloc:function(u){for(var Xe=this.length||16;Xe<this.pos+u;)Xe*=2;if(Xe!==this.length){var Wt=new Uint8Array(Xe);Wt.set(this.buf),this.buf=Wt,this.length=Xe}},finish:function(){return this.length=this.pos,this.pos=0,this.buf.subarray(0,this.length)},writeFixed32:function(u){this.realloc(4),ku(this.buf,u,this.pos),this.pos+=4},writeSFixed32:function(u){this.realloc(4),ku(this.buf,u,this.pos),this.pos+=4},writeFixed64:function(u){this.realloc(8),ku(this.buf,-1&u,this.pos),ku(this.buf,Math.floor(u*vp),this.pos+4),this.pos+=8},writeSFixed64:function(u){this.realloc(8),ku(this.buf,-1&u,this.pos),ku(this.buf,Math.floor(u*vp),this.pos+4),this.pos+=8},writeVarint:function(u){(u=+u||0)>268435455||u<0?function(u,Xe){var Wt,fr;if(u>=0?(Wt=u%4294967296|0,fr=u/4294967296|0):(fr=~(-u/4294967296),4294967295^(Wt=~(-u%4294967296))?Wt=Wt+1|0:(Wt=0,fr=fr+1|0)),u>=0x10000000000000000||u<-0x10000000000000000)throw new Error("Given varint doesn't fit into 10 bytes");Xe.realloc(10),function(u,Xe,Wt){Wt.buf[Wt.pos++]=127&u|128,u>>>=7,Wt.buf[Wt.pos++]=127&u|128,u>>>=7,Wt.buf[Wt.pos++]=127&u|128,u>>>=7,Wt.buf[Wt.pos++]=127&u|128,Wt.buf[Wt.pos]=127&(u>>>=7)}(Wt,0,Xe),function(u,Xe){var Wt=(7&u)<<4;Xe.buf[Xe.pos++]|=Wt|((u>>>=3)?128:0),u&&(Xe.buf[Xe.pos++]=127&u|((u>>>=7)?128:0),u&&(Xe.buf[Xe.pos++]=127&u|((u>>>=7)?128:0),u&&(Xe.buf[Xe.pos++]=127&u|((u>>>=7)?128:0),u&&(Xe.buf[Xe.pos++]=127&u|((u>>>=7)?128:0),u&&(Xe.buf[Xe.pos++]=127&u)))))}(fr,Xe)}(u,this):(this.realloc(4),this.buf[this.pos++]=127&u|(u>127?128:0),u<=127||(this.buf[this.pos++]=127&(u>>>=7)|(u>127?128:0),u<=127||(this.buf[this.pos++]=127&(u>>>=7)|(u>127?128:0),u<=127||(this.buf[this.pos++]=u>>>7&127))))},writeSVarint:function(u){this.writeVarint(u<0?2*-u-1:2*u)},writeBoolean:function(u){this.writeVarint(Boolean(u))},writeString:function(u){u=String(u),this.realloc(4*u.length),this.pos++;var Xe=this.pos;this.pos=function(u,Xe,Wt){for(var fr,_r,wr=0;wr<Xe.length;wr++){if((fr=Xe.charCodeAt(wr))>55295&&fr<57344){if(!_r){fr>56319||wr+1===Xe.length?(u[Wt++]=239,u[Wt++]=191,u[Wt++]=189):_r=fr;continue}if(fr<56320){u[Wt++]=239,u[Wt++]=191,u[Wt++]=189,_r=fr;continue}fr=_r-55296<<10|fr-56320|65536,_r=null}else _r&&(u[Wt++]=239,u[Wt++]=191,u[Wt++]=189,_r=null);fr<128?u[Wt++]=fr:(fr<2048?u[Wt++]=fr>>6|192:(fr<65536?u[Wt++]=fr>>12|224:(u[Wt++]=fr>>18|240,u[Wt++]=fr>>12&63|128),u[Wt++]=fr>>6&63|128),u[Wt++]=63&fr|128)}return Wt}(this.buf,u,this.pos);var Wt=this.pos-Xe;Wt>=128&&du(Xe,Wt,this),this.pos=Xe-1,this.writeVarint(Wt),this.pos+=Wt},writeFloat:function(u){this.realloc(4),ou(this.buf,u,this.pos,!0,23,4),this.pos+=4},writeDouble:function(u){this.realloc(8),ou(this.buf,u,this.pos,!0,52,8),this.pos+=8},writeBytes:function(u){var Xe=u.length;this.writeVarint(Xe),this.realloc(Xe);for(var Wt=0;Wt<Xe;Wt++)this.buf[this.pos++]=u[Wt]},writeRawMessage:function(u,Xe){this.pos++;var Wt=this.pos;u(Xe,this);var fr=this.pos-Wt;fr>=128&&du(Wt,fr,this),this.pos=Wt-1,this.writeVarint(fr),this.pos+=fr},writeMessage:function(u,Xe,Wt){this.writeTag(u,lu.Bytes),this.writeRawMessage(Xe,Wt)},writePackedVarint:function(u,Xe){Xe.length&&this.writeMessage(u,yu,Xe)},writePackedSVarint:function(u,Xe){Xe.length&&this.writeMessage(u,mu,Xe)},writePackedBoolean:function(u,Xe){Xe.length&&this.writeMessage(u,vu,Xe)},writePackedFloat:function(u,Xe){Xe.length&&this.writeMessage(u,gu,Xe)},writePackedDouble:function(u,Xe){Xe.length&&this.writeMessage(u,xu,Xe)},writePackedFixed32:function(u,Xe){Xe.length&&this.writeMessage(u,bu,Xe)},writePackedSFixed32:function(u,Xe){Xe.length&&this.writeMessage(u,wu,Xe)},writePackedFixed64:function(u,Xe){Xe.length&&this.writeMessage(u,_u,Xe)},writePackedSFixed64:function(u,Xe){Xe.length&&this.writeMessage(u,Au,Xe)},writeBytesField:function(u,Xe){this.writeTag(u,lu.Bytes),this.writeBytes(Xe)},writeFixed32Field:function(u,Xe){this.writeTag(u,lu.Fixed32),this.writeFixed32(Xe)},writeSFixed32Field:function(u,Xe){this.writeTag(u,lu.Fixed32),this.writeSFixed32(Xe)},writeFixed64Field:function(u,Xe){this.writeTag(u,lu.Fixed64),this.writeFixed64(Xe)},writeSFixed64Field:function(u,Xe){this.writeTag(u,lu.Fixed64),this.writeSFixed64(Xe)},writeVarintField:function(u,Xe){this.writeTag(u,lu.Varint),this.writeVarint(Xe)},writeSVarintField:function(u,Xe){this.writeTag(u,lu.Varint),this.writeSVarint(Xe)},writeStringField:function(u,Xe){this.writeTag(u,lu.Bytes),this.writeString(Xe)},writeFloatField:function(u,Xe){this.writeTag(u,lu.Fixed32),this.writeFloat(Xe)},writeDoubleField:function(u,Xe){this.writeTag(u,lu.Fixed64),this.writeDouble(Xe)},writeBooleanField:function(u,Xe){this.writeVarintField(u,Boolean(Xe))}};var xp=r(yp);const wp=3;function Pu(u,Xe,Wt){1===u&&Wt.readMessage(Cu,Xe)}function Cu(u,Xe,Wt){if(3===u){const{id:u,bitmap:fr,width:_r,height:wr,left:Ar,top:Kr,advance:In}=Wt.readMessage(Bu,{});Xe.push({id:u,bitmap:new _o({width:_r+2*wp,height:wr+2*wp},fr),metrics:{width:_r,height:wr,left:Ar,top:Kr,advance:In}})}}function Bu(u,Xe,Wt){1===u?Xe.id=Wt.readVarint():2===u?Xe.bitmap=Wt.readBytes():3===u?Xe.width=Wt.readVarint():4===u?Xe.height=Wt.readVarint():5===u?Xe.left=Wt.readSVarint():6===u?Xe.top=Wt.readSVarint():7===u&&(Xe.advance=Wt.readVarint())}const Sp=wp;function Eu(u){let Xe=0,Wt=0;for(const fr of u)Xe+=fr.w*fr.h,Wt=Math.max(Wt,fr.w);u.sort(((u,Xe)=>Xe.h-u.h));const fr=[{x:0,y:0,w:Math.max(Math.ceil(Math.sqrt(Xe/.95)),Wt),h:1/0}];let _r=0,wr=0;for(const Xe of u)for(let u=fr.length-1;u>=0;u--){const Wt=fr[u];if(!(Xe.w>Wt.w||Xe.h>Wt.h)){if(Xe.x=Wt.x,Xe.y=Wt.y,wr=Math.max(wr,Xe.y+Xe.h),_r=Math.max(_r,Xe.x+Xe.w),Xe.w===Wt.w&&Xe.h===Wt.h){const Xe=fr.pop();u<fr.length&&(fr[u]=Xe)}else Xe.h===Wt.h?(Wt.x+=Xe.w,Wt.w-=Xe.w):Xe.w===Wt.w?(Wt.y+=Xe.h,Wt.h-=Xe.h):(fr.push({x:Wt.x+Xe.w,y:Wt.y,w:Wt.w-Xe.w,h:Xe.h}),Wt.y+=Xe.h,Wt.h-=Xe.h);break}}return{w:_r,h:wr,fill:Xe/(_r*wr)||0}}const kp=1;class Tu{constructor(u,{pixelRatio:Xe,version:Wt,stretchX:fr,stretchY:_r,content:wr,textFitWidth:Ar,textFitHeight:Kr}){this.paddedRect=u,this.pixelRatio=Xe,this.stretchX=fr,this.stretchY=_r,this.content=wr,this.version=Wt,this.textFitWidth=Ar,this.textFitHeight=Kr}get tl(){return[this.paddedRect.x+kp,this.paddedRect.y+kp]}get br(){return[this.paddedRect.x+this.paddedRect.w-kp,this.paddedRect.y+this.paddedRect.h-kp]}get tlbr(){return this.tl.concat(this.br)}get displaySize(){return[(this.paddedRect.w-2*kp)/this.pixelRatio,(this.paddedRect.h-2*kp)/this.pixelRatio]}}class $u{constructor(u,Xe){const Wt={},fr={};this.haveRenderCallbacks=[];const _r=[];this.addImages(u,Wt,_r),this.addImages(Xe,fr,_r);const{w:wr,h:Ar}=Eu(_r),Kr=new Ao({width:wr||1,height:Ar||1});for(const Xe in u){const fr=u[Xe],_r=Wt[Xe].paddedRect;Ao.copy(fr.data,Kr,{x:0,y:0},{x:_r.x+kp,y:_r.y+kp},fr.data)}for(const u in Xe){const Wt=Xe[u],_r=fr[u].paddedRect,wr=_r.x+kp,Ar=_r.y+kp,In=Wt.data.width,no=Wt.data.height;Ao.copy(Wt.data,Kr,{x:0,y:0},{x:wr,y:Ar},Wt.data),Ao.copy(Wt.data,Kr,{x:0,y:no-1},{x:wr,y:Ar-1},{width:In,height:1}),Ao.copy(Wt.data,Kr,{x:0,y:0},{x:wr,y:Ar+no},{width:In,height:1}),Ao.copy(Wt.data,Kr,{x:In-1,y:0},{x:wr-1,y:Ar},{width:1,height:no}),Ao.copy(Wt.data,Kr,{x:0,y:0},{x:wr+In,y:Ar},{width:1,height:no})}this.image=Kr,this.iconPositions=Wt,this.patternPositions=fr}addImages(u,Xe,Wt){for(const fr in u){const _r=u[fr],wr={x:0,y:0,w:_r.data.width+2*kp,h:_r.data.height+2*kp};Wt.push(wr),Xe[fr]=new Tu(wr,_r),_r.hasRenderCallback&&this.haveRenderCallbacks.push(fr)}}patchUpdatedImages(u,Xe){u.dispatchRenderCallbacks(this.haveRenderCallbacks);for(const Wt in u.updatedImages)this.patchUpdatedImage(this.iconPositions[Wt],u.getImage(Wt),Xe),this.patchUpdatedImage(this.patternPositions[Wt],u.getImage(Wt),Xe)}patchUpdatedImage(u,Xe,Wt){if(!u||!Xe)return;if(u.version===Xe.version)return;u.version=Xe.version;const[fr,_r]=u.tl;Wt.update(Xe.data,void 0,{x:fr,y:_r})}}var Ap;wi("ImagePosition",Tu),wi("ImageAtlas",$u),u.ah=void 0,(Ap=u.ah||(u.ah={}))[Ap.none=0]="none",Ap[Ap.horizontal=1]="horizontal",Ap[Ap.vertical=2]="vertical",Ap[Ap.horizontalOnly=3]="horizontalOnly";const Tp=-17;class Ou{constructor(){this.scale=1,this.fontStack="",this.imageName=null}static forText(u,Xe){const Wt=new Ou;return Wt.scale=u||1,Wt.fontStack=Xe,Wt}static forImage(u){const Xe=new Ou;return Xe.imageName=u,Xe}}class ju{constructor(){this.text="",this.sectionIndex=[],this.sections=[],this.imageSectionID=null}static fromFeature(u,Xe){const Wt=new ju;for(let fr=0;fr<u.sections.length;fr++){const _r=u.sections[fr];_r.image?Wt.addImageSection(_r):Wt.addTextSection(_r,Xe)}return Wt}length(){return this.text.length}getSection(u){return this.sections[this.sectionIndex[u]]}getSectionIndex(u){return this.sectionIndex[u]}getCharCode(u){return this.text.charCodeAt(u)}verticalizePunctuation(){this.text=function(u){let Xe="";for(let Wt=0;Wt<u.length;Wt++){const fr=u.charCodeAt(Wt+1)||null,_r=u.charCodeAt(Wt-1)||null;Xe+=fr&&$i(fr)&&!mp[u[Wt+1]]||_r&&$i(_r)&&!mp[u[Wt-1]]||!mp[u[Wt]]?u[Wt]:mp[u[Wt]]}return Xe}(this.text)}trim(){let u=0;for(let Xe=0;Xe<this.text.length&&Ep[this.text.charCodeAt(Xe)];Xe++)u++;let Xe=this.text.length;for(let Wt=this.text.length-1;Wt>=0&&Wt>=u&&Ep[this.text.charCodeAt(Wt)];Wt--)Xe--;this.text=this.text.substring(u,Xe),this.sectionIndex=this.sectionIndex.slice(u,Xe)}substring(u,Xe){const Wt=new ju;return Wt.text=this.text.substring(u,Xe),Wt.sectionIndex=this.sectionIndex.slice(u,Xe),Wt.sections=this.sections,Wt}toString(){return this.text}getMaxScale(){return this.sectionIndex.reduce(((u,Xe)=>Math.max(u,this.sections[Xe].scale)),0)}addTextSection(u,Xe){this.text+=u.text,this.sections.push(Ou.forText(u.scale,u.fontStack||Xe));const Wt=this.sections.length-1;for(let Xe=0;Xe<u.text.length;++Xe)this.sectionIndex.push(Wt)}addImageSection(u){const Xe=u.image?u.image.name:"";if(0===Xe.length)return void A("Can't add FormattedSection with an empty image.");const Wt=this.getNextImageSectionCharCode();Wt?(this.text+=String.fromCharCode(Wt),this.sections.push(Ou.forImage(Xe)),this.sectionIndex.push(this.sections.length-1)):A("Reached maximum number of images 6401")}getNextImageSectionCharCode(){return this.imageSectionID?this.imageSectionID>=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)}}function Ru(Xe,Wt,fr,_r,wr,Ar,Kr,In,no,io,oo,ao,so,co,ho){const go=ju.fromFeature(Xe,wr);let xo;ao===u.ah.vertical&&go.verticalizePunctuation();const{processBidirectionalText:ko,processStyledBidirectionalText:Co}=ld;if(ko&&1===go.sections.length){xo=[];const u=ko(go.toString(),Yu(go,io,Ar,Wt,_r,co));for(const Xe of u){const u=new ju;u.text=Xe,u.sections=go.sections;for(let Wt=0;Wt<Xe.length;Wt++)u.sectionIndex.push(0);xo.push(u)}}else if(Co){xo=[];const u=Co(go.text,go.sectionIndex,Yu(go,io,Ar,Wt,_r,co));for(const Xe of u){const u=new ju;u.text=Xe[0],u.sectionIndex=Xe[1],u.sections=go.sections,xo.push(u)}}else xo=function(u,Xe){const Wt=[],fr=u.text;let _r=0;for(const fr of Xe)Wt.push(u.substring(_r,fr)),_r=fr;return _r<fr.length&&Wt.push(u.substring(_r,fr.length)),Wt}(go,Yu(go,io,Ar,Wt,_r,co));const Io=[],zo={positionedLines:Io,text:go.toString(),top:oo[1],bottom:oo[1],left:oo[0],right:oo[0],writingMode:ao,iconsInText:!1,verticalizable:!1};return function(Xe,Wt,fr,_r,wr,Ar,Kr,In,no,io,oo,ao){let so=0,co=Tp,ho=0,go=0;const xo="right"===In?1:"left"===In?0:.5;let ko=0;for(const Kr of wr){Kr.trim();const wr=Kr.getMaxScale(),In=(wr-1)*gp,Io={positionedGlyphs:[],lineOffset:0};Xe.positionedLines[ko]=Io;const zo=Io.positionedGlyphs;let Bo=0;if(!Kr.length()){co+=Ar,++ko;continue}for(let Ar=0;Ar<Kr.length();Ar++){const ho=Kr.getSection(Ar),go=Kr.getSectionIndex(Ar),xo=Kr.getCharCode(Ar);let ko=0,Io=null,ca=null,ua=null,Da=gp;const ns=!(no===u.ah.horizontal||!oo&&!Ti(xo)||oo&&(Ep[xo]||(Co=xo,/\p{sc=Arab}/u.test(String.fromCodePoint(Co)))));if(ho.imageName){const u=_r[ho.imageName];if(!u)continue;ua=ho.imageName,Xe.iconsInText=Xe.iconsInText||!0,ca=u.paddedRect;const Wt=u.displaySize;ho.scale=ho.scale*gp/ao,Io={width:Wt[0],height:Wt[1],left:kp,top:-Sp,advance:ns?Wt[1]:Wt[0]},ko=In+(gp-Wt[1]*ho.scale),Da=Io.advance;const fr=ns?Wt[0]*ho.scale-gp*wr:Wt[1]*ho.scale-gp*wr;fr>0&&fr>Bo&&(Bo=fr)}else{const u=fr[ho.fontStack],Xe=u&&u[xo];if(Xe&&Xe.rect)ca=Xe.rect,Io=Xe.metrics;else{const u=Wt[ho.fontStack],Xe=u&&u[xo];if(!Xe)continue;Io=Xe.metrics}ko=(wr-ho.scale)*gp}ns?(Xe.verticalizable=!0,zo.push({glyph:xo,imageName:ua,x:so,y:co+ko,vertical:ns,scale:ho.scale,fontStack:ho.fontStack,sectionIndex:go,metrics:Io,rect:ca}),so+=Da*ho.scale+io):(zo.push({glyph:xo,imageName:ua,x:so,y:co+ko,vertical:ns,scale:ho.scale,fontStack:ho.fontStack,sectionIndex:go,metrics:Io,rect:ca}),so+=Io.advance*ho.scale+io)}0!==zo.length&&(ho=Math.max(so-io,ho),Wu(zo,0,zo.length-1,xo,Bo)),so=0;const ca=Ar*wr+Bo;Io.lineOffset=Math.max(Bo,In),co+=ca,go=Math.max(ca,go),++ko}var Co;const Io=co-Tp,{horizontalAlign:zo,verticalAlign:Bo}=Ju(Kr);(function(u,Xe,Wt,fr,_r,wr,Ar,Kr,In){const no=(Xe-Wt)*_r;let io=0;io=wr!==Ar?-Kr*fr-Tp:(-fr*In+.5)*Ar;for(const Xe of u)for(const u of Xe.positionedGlyphs)u.x+=no,u.y+=io})(Xe.positionedLines,xo,zo,Bo,ho,go,Ar,Io,wr.length),Xe.top+=-Bo*Io,Xe.bottom=Xe.top+Io,Xe.left+=-zo*ho,Xe.right=Xe.left+ho}(zo,Wt,fr,_r,xo,Kr,In,no,ao,io,so,ho),!function(u){for(const Xe of u)if(0!==Xe.positionedGlyphs.length)return!1;return!0}(Io)&&zo}const Ep={9:!0,10:!0,11:!0,12:!0,13:!0,32:!0},Cp={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},Pp={40:!0};function Zu(u,Xe,Wt,fr,_r,wr){if(Xe.imageName){const u=fr[Xe.imageName];return u?u.displaySize[0]*Xe.scale*gp/wr+_r:0}{const fr=Wt[Xe.fontStack],wr=fr&&fr[u];return wr?wr.metrics.advance*Xe.scale+_r:0}}function Gu(u,Xe,Wt,fr){const _r=Math.pow(u-Xe,2);return fr?u<Xe?_r/2:2*_r:_r+Math.abs(Wt)*Wt}function Ku(u,Xe,Wt){let fr=0;return 10===u&&(fr-=1e4),Wt&&(fr+=150),40!==u&&65288!==u||(fr+=50),41!==Xe&&65289!==Xe||(fr+=50),fr}function Xu(u,Xe,Wt,fr,_r,wr){let Ar=null,Kr=Gu(Xe,Wt,_r,wr);for(const u of fr){const fr=Gu(Xe-u.x,Wt,_r,wr)+u.badness;fr<=Kr&&(Ar=u,Kr=fr)}return{index:u,x:Xe,priorBreak:Ar,badness:Kr}}function Hu(u){return u?Hu(u.priorBreak).concat(u.index):[]}function Yu(u,Xe,Wt,fr,_r,wr){if(!u)return[];const Ar=[],Kr=function(u,Xe,Wt,fr,_r,wr){let Ar=0;for(let Wt=0;Wt<u.length();Wt++){const Kr=u.getSection(Wt);Ar+=Zu(u.getCharCode(Wt),Kr,fr,_r,Xe,wr)}return Ar/Math.max(1,Math.ceil(Ar/Wt))}(u,Xe,Wt,fr,_r,wr),In=u.text.indexOf("​")>=0;let no=0;for(let Wt=0;Wt<u.length();Wt++){const oo=u.getSection(Wt),ao=u.getCharCode(Wt);if(Ep[ao]||(no+=Zu(ao,oo,fr,_r,Xe,wr)),Wt<u.length()-1){const Xe=!((io=ao)<11904)&&(!!qu["CJK Compatibility Forms"](io)||!!qu["CJK Compatibility"](io)||!!qu["CJK Strokes"](io)||!!qu["CJK Symbols and Punctuation"](io)||!!qu["Enclosed CJK Letters and Months"](io)||!!qu["Halfwidth and Fullwidth Forms"](io)||!!qu["Ideographic Description Characters"](io)||!!qu["Vertical Forms"](io)||id.test(String.fromCodePoint(io)));(Cp[ao]||Xe||oo.imageName||Wt!==u.length()-2&&Pp[u.getCharCode(Wt+1)])&&Ar.push(Xu(Wt+1,no,Kr,Ar,Ku(ao,u.getCharCode(Wt+1),Xe&&In),!1))}}var io;return Hu(Xu(u.length(),no,Kr,Ar,0,!0))}function Ju(u){let Xe=.5,Wt=.5;switch(u){case"right":case"top-right":case"bottom-right":Xe=1;break;case"left":case"top-left":case"bottom-left":Xe=0}switch(u){case"bottom":case"bottom-right":case"bottom-left":Wt=1;break;case"top":case"top-right":case"top-left":Wt=0}return{horizontalAlign:Xe,verticalAlign:Wt}}function Wu(u,Xe,Wt,fr,_r){if(!fr&&!_r)return;const wr=u[Wt],Ar=(u[Wt].x+wr.metrics.advance*wr.scale)*fr;for(let fr=Xe;fr<=Wt;fr++)u[fr].x-=Ar,u[fr].y+=_r}function Qu(u,Xe,Wt){const{horizontalAlign:fr,verticalAlign:_r}=Ju(Wt),wr=Xe[0]-u.displaySize[0]*fr,Ar=Xe[1]-u.displaySize[1]*_r;return{image:u,top:Ar,bottom:Ar+u.displaySize[1],left:wr,right:wr+u.displaySize[0]}}function tc(u){var Xe,Wt;let fr=u.left,_r=u.top,wr=u.right-fr,Ar=u.bottom-_r;const Kr=null!==(Xe=u.image.textFitWidth)&&void 0!==Xe?Xe:"stretchOrShrink",In=null!==(Wt=u.image.textFitHeight)&&void 0!==Wt?Wt:"stretchOrShrink",no=(u.image.content[2]-u.image.content[0])/(u.image.content[3]-u.image.content[1]);if("proportional"===In){if("stretchOnly"===Kr&&wr/Ar<no||"proportional"===Kr){const u=Math.ceil(Ar*no);fr*=u/wr,wr=u}}else if("proportional"===Kr&&"stretchOnly"===In&&0!==no&&wr/Ar>no){const u=Math.ceil(wr/no);_r*=u/Ar,Ar=u}return{x1:fr,y1:_r,x2:fr+wr,y2:_r+Ar}}function ec(u,Xe,Wt,fr,_r,wr){const Ar=u.image;let Kr;if(Ar.content){const u=Ar.content,Xe=Ar.pixelRatio||1;Kr=[u[0]/Xe,u[1]/Xe,Ar.displaySize[0]-u[2]/Xe,Ar.displaySize[1]-u[3]/Xe]}const In=Xe.left*wr,no=Xe.right*wr;let io,oo,ao,so;"width"===Wt||"both"===Wt?(so=_r[0]+In-fr[3],oo=_r[0]+no+fr[1]):(so=_r[0]+(In+no-Ar.displaySize[0])/2,oo=so+Ar.displaySize[0]);const co=Xe.top*wr,ho=Xe.bottom*wr;return"height"===Wt||"both"===Wt?(io=_r[1]+co-fr[0],ao=_r[1]+ho+fr[2]):(io=_r[1]+(co+ho-Ar.displaySize[1])/2,ao=io+Ar.displaySize[1]),{image:Ar,top:io,right:oo,bottom:ao,left:so,collisionPadding:Kr}}const Ip=255,Mp=128,Rp=Ip*Mp;function sc(u,Xe){const{expression:Wt}=Xe;if("constant"===Wt.kind)return{kind:"constant",layoutSize:Wt.evaluate(new Ui(u+1))};if("source"===Wt.kind)return{kind:"source"};{const{zoomStops:Xe,interpolationType:fr}=Wt;let _r=0;for(;_r<Xe.length&&Xe[_r]<=u;)_r++;_r=Math.max(0,_r-1);let wr=_r;for(;wr<Xe.length&&Xe[wr]<u+1;)wr++;wr=Math.min(Xe.length-1,wr);const Ar=Xe[_r],Kr=Xe[wr];return"composite"===Wt.kind?{kind:"composite",minZoom:Ar,maxZoom:Kr,interpolationType:fr}:{kind:"camera",minZoom:Ar,maxZoom:Kr,minSize:Wt.evaluate(new Ui(Ar)),maxSize:Wt.evaluate(new Ui(Kr)),interpolationType:fr}}}function ac(u,Xe,Wt){let fr="never";const _r=u.get(Xe);return _r?fr=_r:u.get(Wt)&&(fr="always"),fr}const zp=Qd.VectorTileFeature.types,Op=[{name:"a_fade_opacity",components:1,type:"Uint8",offset:0}];function uc(u,Xe,Wt,fr,_r,wr,Ar,Kr,In,no,io,oo,ao){const so=Kr?Math.min(Rp,Math.round(Kr[0])):0,co=Kr?Math.min(Rp,Math.round(Kr[1])):0;u.emplaceBack(Xe,Wt,Math.round(32*fr),Math.round(32*_r),wr,Ar,(so<<1)+(In?1:0),co,16*no,16*io,256*oo,256*ao)}function cc(u,Xe,Wt){u.emplaceBack(Xe.x,Xe.y,Wt),u.emplaceBack(Xe.x,Xe.y,Wt),u.emplaceBack(Xe.x,Xe.y,Wt),u.emplaceBack(Xe.x,Xe.y,Wt)}function hc(u){for(const Xe of u.sections)if(ji(Xe.text))return!0;return!1}class pc{constructor(u){this.layoutVertexArray=new Ws,this.indexArray=new na,this.programConfigurations=u,this.segments=new oa,this.dynamicLayoutVertexArray=new Qs,this.opacityVertexArray=new ta,this.hasVisibleVertices=!1,this.placedSymbolArray=new $s}isEmpty(){return 0===this.layoutVertexArray.length&&0===this.indexArray.length&&0===this.dynamicLayoutVertexArray.length&&0===this.opacityVertexArray.length}upload(u,Xe,Wt,fr){this.isEmpty()||(Wt&&(this.layoutVertexBuffer=u.createVertexBuffer(this.layoutVertexArray,cp.members),this.indexBuffer=u.createIndexBuffer(this.indexArray,Xe),this.dynamicLayoutVertexBuffer=u.createVertexBuffer(this.dynamicLayoutVertexArray,dp.members,!0),this.opacityVertexBuffer=u.createVertexBuffer(this.opacityVertexArray,Op,!0),this.opacityVertexBuffer.itemSize=1),(Wt||fr)&&this.programConfigurations.upload(u))}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.dynamicLayoutVertexBuffer.destroy(),this.opacityVertexBuffer.destroy())}}wi("SymbolBuffers",pc);class fc{constructor(u,Xe,Wt){this.layoutVertexArray=new u,this.layoutAttributes=Xe,this.indexArray=new Wt,this.segments=new oa,this.collisionVertexArray=new ra}upload(u){this.layoutVertexBuffer=u.createVertexBuffer(this.layoutVertexArray,this.layoutAttributes),this.indexBuffer=u.createIndexBuffer(this.indexArray),this.collisionVertexBuffer=u.createVertexBuffer(this.collisionVertexArray,hp.members,!0)}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.collisionVertexBuffer.destroy())}}wi("CollisionBuffers",fc);class dc{constructor(Xe){this.collisionBoxArray=Xe.collisionBoxArray,this.zoom=Xe.zoom,this.overscaling=Xe.overscaling,this.layers=Xe.layers,this.layerIds=this.layers.map((u=>u.id)),this.index=Xe.index,this.pixelRatio=Xe.pixelRatio,this.sourceLayerIndex=Xe.sourceLayerIndex,this.hasPattern=!1,this.hasRTLText=!1,this.sortKeyRanges=[],this.collisionCircleArray=[],this.placementInvProjMatrix=lo([]),this.placementViewportMatrix=lo([]);const Wt=this.layers[0]._unevaluatedLayout._values;this.textSizeData=sc(this.zoom,Wt["text-size"]),this.iconSizeData=sc(this.zoom,Wt["icon-size"]);const fr=this.layers[0].layout,_r=fr.get("symbol-sort-key"),wr=fr.get("symbol-z-order");this.canOverlap="never"!==ac(fr,"text-overlap","text-allow-overlap")||"never"!==ac(fr,"icon-overlap","icon-allow-overlap")||fr.get("text-ignore-placement")||fr.get("icon-ignore-placement"),this.sortFeaturesByKey="viewport-y"!==wr&&!_r.isConstant(),this.sortFeaturesByY=("viewport-y"===wr||"auto"===wr&&!this.sortFeaturesByKey)&&this.canOverlap,"point"===fr.get("symbol-placement")&&(this.writingModes=fr.get("text-writing-mode").map((Xe=>u.ah[Xe]))),this.stateDependentLayerIds=this.layers.filter((u=>u.isStateDependent())).map((u=>u.id)),this.sourceID=Xe.sourceID}createArrays(){this.text=new pc(new Ea(this.layers,this.zoom,(u=>/^text/.test(u)))),this.icon=new pc(new Ea(this.layers,this.zoom,(u=>/^icon/.test(u)))),this.glyphOffsetArray=new Os,this.lineVertexArray=new js,this.symbolInstances=new Ds,this.textAnchorOffsets=new Us}calculateGlyphDependencies(u,Xe,Wt,fr,_r){for(let wr=0;wr<u.length;wr++)if(Xe[u.charCodeAt(wr)]=!0,(Wt||fr)&&_r){const Wt=mp[u.charAt(wr)];Wt&&(Xe[Wt.charCodeAt(0)]=!0)}}populate(Xe,Wt,fr){const _r=this.layers[0],wr=_r.layout,Ar=wr.get("text-font"),Kr=wr.get("text-field"),In=wr.get("icon-image"),no=("constant"!==Kr.value.kind||Kr.value.value instanceof Yt&&!Kr.value.value.isEmpty()||Kr.value.value.toString().length>0)&&("constant"!==Ar.value.kind||Ar.value.value.length>0),io="constant"!==In.value.kind||!!In.value.value||Object.keys(In.parameters).length>0,oo=wr.get("symbol-sort-key");if(this.features=[],!no&&!io)return;const ao=Wt.iconDependencies,so=Wt.glyphDependencies,co=Wt.availableImages,ho=new Ui(this.zoom);for(const{feature:Wt,id:Kr,index:In,sourceLayerIndex:go}of Xe){const Xe=_r._featureFilter.needGeometry,xo=ja(Wt,Xe);if(!_r._featureFilter.filter(ho,xo,fr))continue;let ko,Co;if(Xe||(xo.geometry=Oa(Wt)),no){const u=_r.getValueAndResolveTokens("text-field",xo,fr,co),Xe=Yt.factory(u),Wt=this.hasRTLText=this.hasRTLText||hc(Xe);(!Wt||"unavailable"===ld.getRTLTextPluginStatus()||Wt&&ld.isParsed())&&(ko=ru(Xe,_r,xo))}if(io){const u=_r.getValueAndResolveTokens("icon-image",xo,fr,co);Co=u instanceof te?u:te.fromString(u)}if(!ko&&!Co)continue;const Io=this.sortFeaturesByKey?oo.evaluate(xo,{},fr):void 0;if(this.features.push({id:Kr,text:ko,icon:Co,index:In,sourceLayerIndex:go,geometry:xo.geometry,properties:Wt.properties,type:zp[Wt.type],sortKey:Io}),Co&&(ao[Co.name]=!0),ko){const Xe=Ar.evaluate(xo,{},fr).join(","),Wt="viewport"!==wr.get("text-rotation-alignment")&&"point"!==wr.get("symbol-placement");this.allowVerticalPlacement=this.writingModes&&this.writingModes.indexOf(u.ah.vertical)>=0;for(const u of ko.sections)if(u.image)ao[u.image.name]=!0;else{const fr=Pi(ko.toString()),_r=u.fontStack||Xe,wr=so[_r]=so[_r]||{};this.calculateGlyphDependencies(u.text,wr,Wt,this.allowVerticalPlacement,fr)}}}"line"===wr.get("symbol-placement")&&(this.features=function(u){const Xe={},Wt={},fr=[];let _r=0;function s(Xe){fr.push(u[Xe]),_r++}function a(u,Xe,_r){const wr=Wt[u];return delete Wt[u],Wt[Xe]=wr,fr[wr].geometry[0].pop(),fr[wr].geometry[0]=fr[wr].geometry[0].concat(_r[0]),wr}function o(u,Wt,_r){const wr=Xe[Wt];return delete Xe[Wt],Xe[u]=wr,fr[wr].geometry[0].shift(),fr[wr].geometry[0]=_r[0].concat(fr[wr].geometry[0]),wr}function l(u,Xe,Wt){const fr=Wt?Xe[0][Xe[0].length-1]:Xe[0][0];return`${u}:${fr.x}:${fr.y}`}for(let wr=0;wr<u.length;wr++){const Ar=u[wr],Kr=Ar.geometry,In=Ar.text?Ar.text.toString():null;if(!In){s(wr);continue}const no=l(In,Kr),io=l(In,Kr,!0);if(no in Wt&&io in Xe&&Wt[no]!==Xe[io]){const u=o(no,io,Kr),_r=a(no,io,fr[u].geometry);delete Xe[no],delete Wt[io],Wt[l(In,fr[_r].geometry,!0)]=_r,fr[u].geometry=null}else no in Wt?a(no,io,Kr):io in Xe?o(no,io,Kr):(s(wr),Xe[no]=_r-1,Wt[io]=_r-1)}return fr.filter((u=>u.geometry))}(this.features)),this.sortFeaturesByKey&&this.features.sort(((u,Xe)=>u.sortKey-Xe.sortKey))}update(u,Xe,Wt){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(u,Xe,this.layers,Wt),this.icon.programConfigurations.updatePaintArrays(u,Xe,this.layers,Wt))}isEmpty(){return 0===this.symbolInstances.length&&!this.hasRTLText}uploadPending(){return!this.uploaded||this.text.programConfigurations.needsUpload||this.icon.programConfigurations.needsUpload}upload(u){!this.uploaded&&this.hasDebugData()&&(this.textCollisionBox.upload(u),this.iconCollisionBox.upload(u)),this.text.upload(u,this.sortFeaturesByY,!this.uploaded,this.text.programConfigurations.needsUpload),this.icon.upload(u,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(u,Xe){const Wt=this.lineVertexArray.length;if(void 0!==u.segment){let Wt=u.dist(Xe[u.segment+1]),fr=u.dist(Xe[u.segment]);const _r={};for(let fr=u.segment+1;fr<Xe.length;fr++)_r[fr]={x:Xe[fr].x,y:Xe[fr].y,tileUnitDistanceFromAnchor:Wt},fr<Xe.length-1&&(Wt+=Xe[fr+1].dist(Xe[fr]));for(let Wt=u.segment||0;Wt>=0;Wt--)_r[Wt]={x:Xe[Wt].x,y:Xe[Wt].y,tileUnitDistanceFromAnchor:fr},Wt>0&&(fr+=Xe[Wt-1].dist(Xe[Wt]));for(let u=0;u<Xe.length;u++){const Xe=_r[u];this.lineVertexArray.emplaceBack(Xe.x,Xe.y,Xe.tileUnitDistanceFromAnchor)}}return{lineStartIndex:Wt,lineLength:this.lineVertexArray.length-Wt}}addSymbols(Xe,Wt,fr,_r,wr,Ar,Kr,In,no,io,oo,ao){const so=Xe.indexArray,co=Xe.layoutVertexArray,ho=Xe.segments.prepareSegment(4*Wt.length,co,so,this.canOverlap?Ar.sortKey:void 0),go=this.glyphOffsetArray.length,xo=ho.vertexLength,ko=this.allowVerticalPlacement&&Kr===u.ah.vertical?Math.PI/2:0,Co=Ar.text&&Ar.text.sections;for(let u=0;u<Wt.length;u++){const{tl:_r,tr:wr,bl:Kr,br:no,tex:io,pixelOffsetTL:oo,pixelOffsetBR:go,minFontScaleX:xo,minFontScaleY:Io,glyphOffset:zo,isSDF:Bo,sectionIndex:ca}=Wt[u],ua=ho.vertexLength,Da=zo[1];uc(co,In.x,In.y,_r.x,Da+_r.y,io.x,io.y,fr,Bo,oo.x,oo.y,xo,Io),uc(co,In.x,In.y,wr.x,Da+wr.y,io.x+io.w,io.y,fr,Bo,go.x,oo.y,xo,Io),uc(co,In.x,In.y,Kr.x,Da+Kr.y,io.x,io.y+io.h,fr,Bo,oo.x,go.y,xo,Io),uc(co,In.x,In.y,no.x,Da+no.y,io.x+io.w,io.y+io.h,fr,Bo,go.x,go.y,xo,Io),cc(Xe.dynamicLayoutVertexArray,In,ko),so.emplaceBack(ua,ua+1,ua+2),so.emplaceBack(ua+1,ua+2,ua+3),ho.vertexLength+=4,ho.primitiveLength+=2,this.glyphOffsetArray.emplaceBack(zo[0]),u!==Wt.length-1&&ca===Wt[u+1].sectionIndex||Xe.programConfigurations.populatePaintArrays(co.length,Ar,Ar.index,{},ao,Co&&Co[ca])}Xe.placedSymbolArray.emplaceBack(In.x,In.y,go,this.glyphOffsetArray.length-go,xo,no,io,In.segment,fr?fr[0]:0,fr?fr[1]:0,_r[0],_r[1],Kr,0,!1,0,oo)}_addCollisionDebugVertex(u,Xe,Wt,fr,_r,wr){return Xe.emplaceBack(0,0),u.emplaceBack(Wt.x,Wt.y,fr,_r,Math.round(wr.x),Math.round(wr.y))}addCollisionDebugVertices(u,Xe,fr,_r,wr,Ar,Kr){const In=wr.segments.prepareSegment(4,wr.layoutVertexArray,wr.indexArray),no=In.vertexLength,io=wr.layoutVertexArray,oo=wr.collisionVertexArray,ao=Kr.anchorX,so=Kr.anchorY;this._addCollisionDebugVertex(io,oo,Ar,ao,so,new Wt(u,Xe)),this._addCollisionDebugVertex(io,oo,Ar,ao,so,new Wt(fr,Xe)),this._addCollisionDebugVertex(io,oo,Ar,ao,so,new Wt(fr,_r)),this._addCollisionDebugVertex(io,oo,Ar,ao,so,new Wt(u,_r)),In.vertexLength+=4;const co=wr.indexArray;co.emplaceBack(no,no+1),co.emplaceBack(no+1,no+2),co.emplaceBack(no+2,no+3),co.emplaceBack(no+3,no),In.primitiveLength+=4}addDebugCollisionBoxes(u,Xe,Wt,fr){for(let _r=u;_r<Xe;_r++){const u=this.collisionBoxArray.get(_r);this.addCollisionDebugVertices(u.x1,u.y1,u.x2,u.y2,fr?this.textCollisionBox:this.iconCollisionBox,u.anchorPoint,Wt)}}generateCollisionDebugBuffers(){this.hasDebugData()&&this.destroyDebugData(),this.textCollisionBox=new fc(ea,pp.members,ia),this.iconCollisionBox=new fc(ea,pp.members,ia);for(let u=0;u<this.symbolInstances.length;u++){const Xe=this.symbolInstances.get(u);this.addDebugCollisionBoxes(Xe.textBoxStartIndex,Xe.textBoxEndIndex,Xe,!0),this.addDebugCollisionBoxes(Xe.verticalTextBoxStartIndex,Xe.verticalTextBoxEndIndex,Xe,!0),this.addDebugCollisionBoxes(Xe.iconBoxStartIndex,Xe.iconBoxEndIndex,Xe,!1),this.addDebugCollisionBoxes(Xe.verticalIconBoxStartIndex,Xe.verticalIconBoxEndIndex,Xe,!1)}}_deserializeCollisionBoxesForSymbol(u,Xe,Wt,fr,_r,wr,Ar,Kr,In){const no={};for(let fr=Xe;fr<Wt;fr++){const Xe=u.get(fr);no.textBox={x1:Xe.x1,y1:Xe.y1,x2:Xe.x2,y2:Xe.y2,anchorPointX:Xe.anchorPointX,anchorPointY:Xe.anchorPointY},no.textFeatureIndex=Xe.featureIndex;break}for(let Xe=fr;Xe<_r;Xe++){const Wt=u.get(Xe);no.verticalTextBox={x1:Wt.x1,y1:Wt.y1,x2:Wt.x2,y2:Wt.y2,anchorPointX:Wt.anchorPointX,anchorPointY:Wt.anchorPointY},no.verticalTextFeatureIndex=Wt.featureIndex;break}for(let Xe=wr;Xe<Ar;Xe++){const Wt=u.get(Xe);no.iconBox={x1:Wt.x1,y1:Wt.y1,x2:Wt.x2,y2:Wt.y2,anchorPointX:Wt.anchorPointX,anchorPointY:Wt.anchorPointY},no.iconFeatureIndex=Wt.featureIndex;break}for(let Xe=Kr;Xe<In;Xe++){const Wt=u.get(Xe);no.verticalIconBox={x1:Wt.x1,y1:Wt.y1,x2:Wt.x2,y2:Wt.y2,anchorPointX:Wt.anchorPointX,anchorPointY:Wt.anchorPointY},no.verticalIconFeatureIndex=Wt.featureIndex;break}return no}deserializeCollisionBoxes(u){this.collisionArrays=[];for(let Xe=0;Xe<this.symbolInstances.length;Xe++){const Wt=this.symbolInstances.get(Xe);this.collisionArrays.push(this._deserializeCollisionBoxesForSymbol(u,Wt.textBoxStartIndex,Wt.textBoxEndIndex,Wt.verticalTextBoxStartIndex,Wt.verticalTextBoxEndIndex,Wt.iconBoxStartIndex,Wt.iconBoxEndIndex,Wt.verticalIconBoxStartIndex,Wt.verticalIconBoxEndIndex))}}hasTextData(){return this.text.segments.get().length>0}hasIconData(){return this.icon.segments.get().length>0}hasDebugData(){return this.textCollisionBox&&this.iconCollisionBox}hasTextCollisionBoxData(){return this.hasDebugData()&&this.textCollisionBox.segments.get().length>0}hasIconCollisionBoxData(){return this.hasDebugData()&&this.iconCollisionBox.segments.get().length>0}addIndicesForPlacedSymbol(u,Xe){const Wt=u.placedSymbolArray.get(Xe),fr=Wt.vertexStartIndex+4*Wt.numGlyphs;for(let Xe=Wt.vertexStartIndex;Xe<fr;Xe+=4)u.indexArray.emplaceBack(Xe,Xe+1,Xe+2),u.indexArray.emplaceBack(Xe+1,Xe+2,Xe+3)}getSortedSymbolIndexes(u){if(this.sortedAngle===u&&void 0!==this.symbolInstanceIndexes)return this.symbolInstanceIndexes;const Xe=Math.sin(u),Wt=Math.cos(u),fr=[],_r=[],wr=[];for(let u=0;u<this.symbolInstances.length;++u){wr.push(u);const Ar=this.symbolInstances.get(u);fr.push(0|Math.round(Xe*Ar.anchorX+Wt*Ar.anchorY)),_r.push(Ar.featureIndex)}return wr.sort(((u,Xe)=>fr[u]-fr[Xe]||_r[Xe]-_r[u])),wr}addToSortKeyRanges(u,Xe){const Wt=this.sortKeyRanges[this.sortKeyRanges.length-1];Wt&&Wt.sortKey===Xe?Wt.symbolInstanceEnd=u+1:this.sortKeyRanges.push({sortKey:Xe,symbolInstanceStart:u,symbolInstanceEnd:u+1})}sortFeatures(u){if(this.sortFeaturesByY&&this.sortedAngle!==u&&!(this.text.segments.get().length>1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(u),this.sortedAngle=u,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(const u of this.symbolInstanceIndexes){const Xe=this.symbolInstances.get(u);this.featureSortOrder.push(Xe.featureIndex),[Xe.rightJustifiedTextSymbolIndex,Xe.centerJustifiedTextSymbolIndex,Xe.leftJustifiedTextSymbolIndex].forEach(((u,Xe,Wt)=>{u>=0&&Wt.indexOf(u)===Xe&&this.addIndicesForPlacedSymbol(this.text,u)})),Xe.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,Xe.verticalPlacedTextSymbolIndex),Xe.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,Xe.placedIconSymbolIndex),Xe.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,Xe.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}}}let Lp,Dp;wi("SymbolBucket",dc,{omit:["layers","collisionBoxArray","features","compareText"]}),dc.MAX_GLYPHS=65535,dc.addDynamicAttributes=cc;var Fp={get paint(){return Dp=Dp||new rs({"icon-opacity":new Wi(xo.paint_symbol["icon-opacity"]),"icon-color":new Wi(xo.paint_symbol["icon-color"]),"icon-halo-color":new Wi(xo.paint_symbol["icon-halo-color"]),"icon-halo-width":new Wi(xo.paint_symbol["icon-halo-width"]),"icon-halo-blur":new Wi(xo.paint_symbol["icon-halo-blur"]),"icon-translate":new Ji(xo.paint_symbol["icon-translate"]),"icon-translate-anchor":new Ji(xo.paint_symbol["icon-translate-anchor"]),"text-opacity":new Wi(xo.paint_symbol["text-opacity"]),"text-color":new Wi(xo.paint_symbol["text-color"],{runtimeType:ca,getOverride:u=>u.textColor,hasOverride:u=>!!u.textColor}),"text-halo-color":new Wi(xo.paint_symbol["text-halo-color"]),"text-halo-width":new Wi(xo.paint_symbol["text-halo-width"]),"text-halo-blur":new Wi(xo.paint_symbol["text-halo-blur"]),"text-translate":new Ji(xo.paint_symbol["text-translate"]),"text-translate-anchor":new Ji(xo.paint_symbol["text-translate-anchor"])})},get layout(){return Lp=Lp||new rs({"symbol-placement":new Ji(xo.layout_symbol["symbol-placement"]),"symbol-spacing":new Ji(xo.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new Ji(xo.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new Wi(xo.layout_symbol["symbol-sort-key"]),"symbol-z-order":new Ji(xo.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new Ji(xo.layout_symbol["icon-allow-overlap"]),"icon-overlap":new Ji(xo.layout_symbol["icon-overlap"]),"icon-ignore-placement":new Ji(xo.layout_symbol["icon-ignore-placement"]),"icon-optional":new Ji(xo.layout_symbol["icon-optional"]),"icon-rotation-alignment":new Ji(xo.layout_symbol["icon-rotation-alignment"]),"icon-size":new Wi(xo.layout_symbol["icon-size"]),"icon-text-fit":new Ji(xo.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new Ji(xo.layout_symbol["icon-text-fit-padding"]),"icon-image":new Wi(xo.layout_symbol["icon-image"]),"icon-rotate":new Wi(xo.layout_symbol["icon-rotate"]),"icon-padding":new Wi(xo.layout_symbol["icon-padding"]),"icon-keep-upright":new Ji(xo.layout_symbol["icon-keep-upright"]),"icon-offset":new Wi(xo.layout_symbol["icon-offset"]),"icon-anchor":new Wi(xo.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new Ji(xo.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new Ji(xo.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new Ji(xo.layout_symbol["text-rotation-alignment"]),"text-field":new Wi(xo.layout_symbol["text-field"]),"text-font":new Wi(xo.layout_symbol["text-font"]),"text-size":new Wi(xo.layout_symbol["text-size"]),"text-max-width":new Wi(xo.layout_symbol["text-max-width"]),"text-line-height":new Ji(xo.layout_symbol["text-line-height"]),"text-letter-spacing":new Wi(xo.layout_symbol["text-letter-spacing"]),"text-justify":new Wi(xo.layout_symbol["text-justify"]),"text-radial-offset":new Wi(xo.layout_symbol["text-radial-offset"]),"text-variable-anchor":new Ji(xo.layout_symbol["text-variable-anchor"]),"text-variable-anchor-offset":new Wi(xo.layout_symbol["text-variable-anchor-offset"]),"text-anchor":new Wi(xo.layout_symbol["text-anchor"]),"text-max-angle":new Ji(xo.layout_symbol["text-max-angle"]),"text-writing-mode":new Ji(xo.layout_symbol["text-writing-mode"]),"text-rotate":new Wi(xo.layout_symbol["text-rotate"]),"text-padding":new Ji(xo.layout_symbol["text-padding"]),"text-keep-upright":new Ji(xo.layout_symbol["text-keep-upright"]),"text-transform":new Wi(xo.layout_symbol["text-transform"]),"text-offset":new Wi(xo.layout_symbol["text-offset"]),"text-allow-overlap":new Ji(xo.layout_symbol["text-allow-overlap"]),"text-overlap":new Ji(xo.layout_symbol["text-overlap"]),"text-ignore-placement":new Ji(xo.layout_symbol["text-ignore-placement"]),"text-optional":new Ji(xo.layout_symbol["text-optional"])})}};class xc{constructor(u){if(void 0===u.property.overrides)throw new Error("overrides must be provided to instantiate FormatSectionOverride class");this.type=u.property.overrides?u.property.overrides.runtimeType:Co,this.defaultValue=u}evaluate(u){if(u.formattedSection){const Xe=this.defaultValue.property.overrides;if(Xe&&Xe.hasOverride(u.formattedSection))return Xe.getOverride(u.formattedSection)}return u.feature&&u.featureState?this.defaultValue.evaluate(u.feature,u.featureState):this.defaultValue.property.specification.default}eachChild(u){this.defaultValue.isConstant()||u(this.defaultValue.value._styleExpression.expression)}outputDefined(){return!1}serialize(){return null}}wi("FormatSectionOverride",xc,{omit:["defaultValue"]});class vc extends is{constructor(u){super(u,Fp)}recalculate(u,Xe){if(super.recalculate(u,Xe),"auto"===this.layout.get("icon-rotation-alignment")&&(this.layout._values["icon-rotation-alignment"]="point"!==this.layout.get("symbol-placement")?"map":"viewport"),"auto"===this.layout.get("text-rotation-alignment")&&(this.layout._values["text-rotation-alignment"]="point"!==this.layout.get("symbol-placement")?"map":"viewport"),"auto"===this.layout.get("text-pitch-alignment")&&(this.layout._values["text-pitch-alignment"]="map"===this.layout.get("text-rotation-alignment")?"map":"viewport"),"auto"===this.layout.get("icon-pitch-alignment")&&(this.layout._values["icon-pitch-alignment"]=this.layout.get("icon-rotation-alignment")),"point"===this.layout.get("symbol-placement")){const u=this.layout.get("text-writing-mode");if(u){const Xe=[];for(const Wt of u)Xe.indexOf(Wt)<0&&Xe.push(Wt);this.layout._values["text-writing-mode"]=Xe}else this.layout._values["text-writing-mode"]=["horizontal"]}this._setPaintOverrides()}getValueAndResolveTokens(u,Xe,Wt,fr){const _r=this.layout.get(u).evaluate(Xe,{},Wt,fr),wr=this._unevaluatedLayout._values[u];return wr.isDataDriven()||vn(wr.value)||!_r?_r:function(u,Xe){return Xe.replace(/{([^{}]+)}/g,((Xe,Wt)=>u&&Wt in u?String(u[Wt]):""))}(Xe.properties,_r)}createBucket(u){return new dc(u)}queryRadius(){return 0}queryIntersectsFeature(){throw new Error("Should take a different path in FeatureIndex")}_setPaintOverrides(){for(const u of Fp.paint.overridableProperties){if(!vc.hasPaintOverride(this.layout,u))continue;const Xe=this.paint.get(u),Wt=new xc(Xe),fr=new xn(Wt,Xe.property.specification);let _r=null;_r="constant"===Xe.value.kind||"source"===Xe.value.kind?new wn("source",fr):new _n("composite",fr,Xe.value.zoomStops),this.paint._values[u]=new Hi(Xe.property,_r,Xe.parameters)}}_handleOverridablePaintPropertyUpdate(u,Xe,Wt){return!(!this.layout||Xe.isDataDriven()||Wt.isDataDriven())&&vc.hasPaintOverride(this.layout,u)}static hasPaintOverride(u,Xe){const Wt=u.get("text-field"),fr=Fp.paint.properties[Xe];let _r=!1;const s=u=>{for(const Xe of u)if(fr.overrides&&fr.overrides.hasOverride(Xe))return void(_r=!0)};if("constant"===Wt.value.kind&&Wt.value.value instanceof Yt)s(Wt.value.value.sections);else if("source"===Wt.value.kind){const t=u=>{_r||(u instanceof se&&ne(u.value)===yl?s(u.value.sections):u instanceof Ze?s(u.sections):u.eachChild(t))},u=Wt.value;u._styleExpression&&t(u._styleExpression.expression)}return _r}}let jp;var Bp={get paint(){return jp=jp||new rs({"background-color":new Ji(xo.paint_background["background-color"]),"background-pattern":new ts(xo.paint_background["background-pattern"]),"background-opacity":new Ji(xo.paint_background["background-opacity"])})}};class _c extends is{constructor(u){super(u,Bp)}}let Np;var Vp={get paint(){return Np=Np||new rs({"raster-opacity":new Ji(xo.paint_raster["raster-opacity"]),"raster-hue-rotate":new Ji(xo.paint_raster["raster-hue-rotate"]),"raster-brightness-min":new Ji(xo.paint_raster["raster-brightness-min"]),"raster-brightness-max":new Ji(xo.paint_raster["raster-brightness-max"]),"raster-saturation":new Ji(xo.paint_raster["raster-saturation"]),"raster-contrast":new Ji(xo.paint_raster["raster-contrast"]),"raster-resampling":new Ji(xo.paint_raster["raster-resampling"]),"raster-fade-duration":new Ji(xo.paint_raster["raster-fade-duration"])})}};class kc extends is{constructor(u){super(u,Vp)}}class Mc extends is{constructor(u){super(u,{}),this.onAdd=u=>{this.implementation.onAdd&&this.implementation.onAdd(u,u.painter.context.gl)},this.onRemove=u=>{this.implementation.onRemove&&this.implementation.onRemove(u,u.painter.context.gl)},this.implementation=u}is3D(){return"3d"===this.implementation.renderingMode}hasOffscreenPass(){return void 0!==this.implementation.prerender}recalculate(){}updateTransitions(){}hasTransition(){return!1}serialize(){throw new Error("Custom layers cannot be serialized")}}class Ic{constructor(u){this._methodToThrottle=u,this._triggered=!1,"undefined"!=typeof MessageChannel&&(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 Up=6371008.8;class Pc{constructor(u,Xe){if(isNaN(u)||isNaN(Xe))throw new Error(`Invalid LngLat object: (${u}, ${Xe})`);if(this.lng=+u,this.lat=+Xe,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")}wrap(){return new Pc(m(this.lng,-180,180),this.lat)}toArray(){return[this.lng,this.lat]}toString(){return`LngLat(${this.lng}, ${this.lat})`}distanceTo(u){const Xe=Math.PI/180,Wt=this.lat*Xe,fr=u.lat*Xe,_r=Math.sin(Wt)*Math.sin(fr)+Math.cos(Wt)*Math.cos(fr)*Math.cos((u.lng-this.lng)*Xe);return Up*Math.acos(Math.min(_r,1))}static convert(u){if(u instanceof Pc)return u;if(Array.isArray(u)&&(2===u.length||3===u.length))return new Pc(Number(u[0]),Number(u[1]));if(!Array.isArray(u)&&"object"==typeof u&&null!==u)return new Pc(Number("lng"in u?u.lng:u.lon),Number(u.lat));throw new Error("`LngLatLike` argument must be specified as a LngLat instance, an object {lng: <lng>, lat: <lat>}, an object {lon: <lng>, lat: <lat>}, or an array of [<lng>, <lat>]")}}const $p=2*Math.PI*Up;function Bc(u){return $p*Math.cos(u*Math.PI/180)}function Vc(u){return(180+u)/360}function Ec(u){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+u*Math.PI/360)))/360}function Fc(u,Xe){return u/Bc(Xe)}function Tc(u){return 360/Math.PI*Math.atan(Math.exp((180-360*u)*Math.PI/180))-90}class $c{constructor(u,Xe,Wt=0){this.x=+u,this.y=+Xe,this.z=+Wt}static fromLngLat(u,Xe=0){const Wt=Pc.convert(u);return new $c(Vc(Wt.lng),Ec(Wt.lat),Fc(Xe,Wt.lat))}toLngLat(){return new Pc(360*this.x-180,Tc(this.y))}toAltitude(){return this.z*Bc(Tc(this.y))}meterInMercatorCoordinateUnits(){return 1/$p*(u=Tc(this.y),1/Math.cos(u*Math.PI/180));var u}}function Lc(u,Xe,Wt){var fr=2*Math.PI*6378137/256/Math.pow(2,Wt);return[u*fr-2*Math.PI*6378137/2,Xe*fr-2*Math.PI*6378137/2]}class Dc{constructor(u,Xe,Wt){if(!function(u,Xe,Wt){return!(u<0||u>25||Wt<0||Wt>=Math.pow(2,u)||Xe<0||Xe>=Math.pow(2,u))}(u,Xe,Wt))throw new Error(`x=${Xe}, y=${Wt}, z=${u} outside of bounds. 0<=x<${Math.pow(2,u)}, 0<=y<${Math.pow(2,u)} 0<=z<=25 `);this.z=u,this.x=Xe,this.y=Wt,this.key=Rc(0,u,u,Xe,Wt)}equals(u){return this.z===u.z&&this.x===u.x&&this.y===u.y}url(u,Xe,Wt){const fr=(wr=this.y,Ar=this.z,Kr=Lc(256*(_r=this.x),256*(wr=Math.pow(2,Ar)-wr-1),Ar),In=Lc(256*(_r+1),256*(wr+1),Ar),Kr[0]+","+Kr[1]+","+In[0]+","+In[1]);var _r,wr,Ar,Kr,In;const no=function(u,Xe,Wt){let fr,_r="";for(let wr=u;wr>0;wr--)fr=1<<wr-1,_r+=(Xe&fr?1:0)+(Wt&fr?2:0);return _r}(this.z,this.x,this.y);return u[(this.x+this.y)%u.length].replace(/{prefix}/g,(this.x%16).toString(16)+(this.y%16).toString(16)).replace(/{z}/g,String(this.z)).replace(/{x}/g,String(this.x)).replace(/{y}/g,String("tms"===Wt?Math.pow(2,this.z)-this.y-1:this.y)).replace(/{ratio}/g,Xe>1?"@2x":"").replace(/{quadkey}/g,no).replace(/{bbox-epsg-3857}/g,fr)}isChildOf(u){const Xe=this.z-u.z;return Xe>0&&u.x===this.x>>Xe&&u.y===this.y>>Xe}getTilePoint(u){const Xe=Math.pow(2,this.z);return new Wt((u.x*Xe-this.x)*Td,(u.y*Xe-this.y)*Td)}toString(){return`${this.z}/${this.x}/${this.y}`}}class Oc{constructor(u,Xe){this.wrap=u,this.canonical=Xe,this.key=Rc(u,Xe.z,Xe.z,Xe.x,Xe.y)}}class jc{constructor(u,Xe,Wt,fr,_r){if(u<Wt)throw new Error(`overscaledZ should be >= z; overscaledZ = ${u}; z = ${Wt}`);this.overscaledZ=u,this.wrap=Xe,this.canonical=new Dc(Wt,+fr,+_r),this.key=Rc(Xe,u,Wt,fr,_r)}clone(){return new jc(this.overscaledZ,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)}equals(u){return this.overscaledZ===u.overscaledZ&&this.wrap===u.wrap&&this.canonical.equals(u.canonical)}scaledTo(u){if(u>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${u}; overscaledZ = ${this.overscaledZ}`);const Xe=this.canonical.z-u;return u>this.canonical.z?new jc(u,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new jc(u,this.wrap,u,this.canonical.x>>Xe,this.canonical.y>>Xe)}calculateScaledKey(u,Xe){if(u>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${u}; overscaledZ = ${this.overscaledZ}`);const Wt=this.canonical.z-u;return u>this.canonical.z?Rc(this.wrap*+Xe,u,this.canonical.z,this.canonical.x,this.canonical.y):Rc(this.wrap*+Xe,u,u,this.canonical.x>>Wt,this.canonical.y>>Wt)}isChildOf(u){if(u.wrap!==this.wrap)return!1;const Xe=this.canonical.z-u.canonical.z;return 0===u.overscaledZ||u.overscaledZ<this.overscaledZ&&u.canonical.x===this.canonical.x>>Xe&&u.canonical.y===this.canonical.y>>Xe}children(u){if(this.overscaledZ>=u)return[new jc(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];const Xe=this.canonical.z+1,Wt=2*this.canonical.x,fr=2*this.canonical.y;return[new jc(Xe,this.wrap,Xe,Wt,fr),new jc(Xe,this.wrap,Xe,Wt+1,fr),new jc(Xe,this.wrap,Xe,Wt,fr+1),new jc(Xe,this.wrap,Xe,Wt+1,fr+1)]}isLessThan(u){return this.wrap<u.wrap||!(this.wrap>u.wrap)&&(this.overscaledZ<u.overscaledZ||!(this.overscaledZ>u.overscaledZ)&&(this.canonical.x<u.canonical.x||!(this.canonical.x>u.canonical.x)&&this.canonical.y<u.canonical.y))}wrapped(){return new jc(this.overscaledZ,0,this.canonical.z,this.canonical.x,this.canonical.y)}unwrapTo(u){return new jc(this.overscaledZ,u,this.canonical.z,this.canonical.x,this.canonical.y)}overscaleFactor(){return Math.pow(2,this.overscaledZ-this.canonical.z)}toUnwrapped(){return new Oc(this.wrap,this.canonical)}toString(){return`${this.overscaledZ}/${this.canonical.x}/${this.canonical.y}`}getTilePoint(u){return this.canonical.getTilePoint(new $c(u.x-this.wrap,u.y))}}function Rc(u,Xe,Wt,fr,_r){(u*=2)<0&&(u=-1*u-1);const wr=1<<Wt;return(wr*wr*u+wr*_r+fr).toString(36)+Wt.toString(36)+Xe.toString(36)}wi("CanonicalTileID",Dc),wi("OverscaledTileID",jc,{omit:["posMatrix"]});class Uc{constructor(u,Xe,Wt,fr=1,_r=1,wr=1,Ar=0){if(this.uid=u,Xe.height!==Xe.width)throw new RangeError("DEM tiles must be square");if(Wt&&!["mapbox","terrarium","custom"].includes(Wt))return void A(`"${Wt}" is not a valid encoding type. Valid types include "mapbox", "terrarium" and "custom".`);this.stride=Xe.height;const Kr=this.dim=Xe.height-2;switch(this.data=new Uint32Array(Xe.data.buffer),Wt){case"terrarium":this.redFactor=256,this.greenFactor=1,this.blueFactor=1/256,this.baseShift=32768;break;case"custom":this.redFactor=fr,this.greenFactor=_r,this.blueFactor=wr,this.baseShift=Ar;break;default:this.redFactor=6553.6,this.greenFactor=25.6,this.blueFactor=.1,this.baseShift=1e4}for(let u=0;u<Kr;u++)this.data[this._idx(-1,u)]=this.data[this._idx(0,u)],this.data[this._idx(Kr,u)]=this.data[this._idx(Kr-1,u)],this.data[this._idx(u,-1)]=this.data[this._idx(u,0)],this.data[this._idx(u,Kr)]=this.data[this._idx(u,Kr-1)];this.data[this._idx(-1,-1)]=this.data[this._idx(0,0)],this.data[this._idx(Kr,-1)]=this.data[this._idx(Kr-1,0)],this.data[this._idx(-1,Kr)]=this.data[this._idx(0,Kr-1)],this.data[this._idx(Kr,Kr)]=this.data[this._idx(Kr-1,Kr-1)],this.min=Number.MAX_SAFE_INTEGER,this.max=Number.MIN_SAFE_INTEGER;for(let u=0;u<Kr;u++)for(let Xe=0;Xe<Kr;Xe++){const Wt=this.get(u,Xe);Wt>this.max&&(this.max=Wt),Wt<this.min&&(this.min=Wt)}}get(u,Xe){const Wt=new Uint8Array(this.data.buffer),fr=4*this._idx(u,Xe);return this.unpack(Wt[fr],Wt[fr+1],Wt[fr+2])}getUnpackVector(){return[this.redFactor,this.greenFactor,this.blueFactor,this.baseShift]}_idx(u,Xe){if(u<-1||u>=this.dim+1||Xe<-1||Xe>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return(Xe+1)*this.stride+(u+1)}unpack(u,Xe,Wt){return u*this.redFactor+Xe*this.greenFactor+Wt*this.blueFactor-this.baseShift}getPixels(){return new Ao({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))}backfillBorder(u,Xe,Wt){if(this.dim!==u.dim)throw new Error("dem dimension mismatch");let fr=Xe*this.dim,_r=Xe*this.dim+this.dim,wr=Wt*this.dim,Ar=Wt*this.dim+this.dim;switch(Xe){case-1:fr=_r-1;break;case 1:_r=fr+1}switch(Wt){case-1:wr=Ar-1;break;case 1:Ar=wr+1}const Kr=-Xe*this.dim,In=-Wt*this.dim;for(let Xe=wr;Xe<Ar;Xe++)for(let Wt=fr;Wt<_r;Wt++)this.data[this._idx(Wt,Xe)]=u.data[this._idx(Wt+Kr,Xe+In)]}}wi("DEMData",Uc);class qc{constructor(u){this._stringToNumber={},this._numberToString=[];for(let Xe=0;Xe<u.length;Xe++){const Wt=u[Xe];this._stringToNumber[Wt]=Xe,this._numberToString[Xe]=Wt}}encode(u){return this._stringToNumber[u]}decode(u){if(u>=this._numberToString.length)throw new Error(`Out of bounds. Index requested n=${u} can't be >= this._numberToString.length ${this._numberToString.length}`);return this._numberToString[u]}}class Nc{constructor(u,Xe,Wt,fr,_r){this.type="Feature",this._vectorTileFeature=u,u._z=Xe,u._x=Wt,u._y=fr,this.properties=u.properties,this.id=_r}get geometry(){return void 0===this._geometry&&(this._geometry=this._vectorTileFeature.toGeoJSON(this._vectorTileFeature._x,this._vectorTileFeature._y,this._vectorTileFeature._z).geometry),this._geometry}set geometry(u){this._geometry=u}toJSON(){const u={geometry:this.geometry};for(const Xe in this)"_geometry"!==Xe&&"_vectorTileFeature"!==Xe&&(u[Xe]=this[Xe]);return u}}class Zc{constructor(u,Xe){this.tileID=u,this.x=u.canonical.x,this.y=u.canonical.y,this.z=u.canonical.z,this.grid=new vi(Td,16,0),this.grid3D=new vi(Td,16,0),this.featureIndexArray=new Ns,this.promoteId=Xe}insert(u,Xe,Wt,fr,_r,wr){const Ar=this.featureIndexArray.length;this.featureIndexArray.emplaceBack(Wt,fr,_r);const Kr=wr?this.grid3D:this.grid;for(let u=0;u<Xe.length;u++){const Wt=Xe[u],fr=[1/0,1/0,-1/0,-1/0];for(let u=0;u<Wt.length;u++){const Xe=Wt[u];fr[0]=Math.min(fr[0],Xe.x),fr[1]=Math.min(fr[1],Xe.y),fr[2]=Math.max(fr[2],Xe.x),fr[3]=Math.max(fr[3],Xe.y)}fr[0]<Td&&fr[1]<Td&&fr[2]>=0&&fr[3]>=0&&Kr.insert(Ar,fr[0],fr[1],fr[2],fr[3])}}loadVTLayers(){return this.vtLayers||(this.vtLayers=new Qd.VectorTile(new xp(this.rawTileData)).layers,this.sourceLayerCoder=new qc(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers}query(u,Xe,fr,_r){this.loadVTLayers();const wr=u.params||{},Ar=Td/u.tileSize/u.scale,Kr=zn(wr.filter),In=u.queryGeometry,no=u.queryPadding*Ar,io=Kc(In),oo=this.grid.query(io.minX-no,io.minY-no,io.maxX+no,io.maxY+no),ao=Kc(u.cameraQueryGeometry),so=this.grid3D.query(ao.minX-no,ao.minY-no,ao.maxX+no,ao.maxY+no,((Xe,fr,_r,wr)=>function(u,Xe,fr,_r,wr){for(const Wt of u)if(Xe<=Wt.x&&fr<=Wt.y&&_r>=Wt.x&&wr>=Wt.y)return!0;const Ar=[new Wt(Xe,fr),new Wt(Xe,wr),new Wt(_r,wr),new Wt(_r,fr)];if(u.length>2)for(const Xe of Ar)if(Wa(u,Xe))return!0;for(let Xe=0;Xe<u.length-1;Xe++)if(Qa(u[Xe],u[Xe+1],Ar))return!0;return!1}(u.cameraQueryGeometry,Xe-no,fr-no,_r+no,wr+no)));for(const u of so)oo.push(u);oo.sort(Xc);const co={};let ho;for(let Wt=0;Wt<oo.length;Wt++){const no=oo[Wt];if(no===ho)continue;ho=no;const io=this.featureIndexArray.get(no);let ao=null;this.loadMatchingFeature(co,io.bucketIndex,io.sourceLayerIndex,io.featureIndex,Kr,wr.layers,wr.availableImages,Xe,fr,_r,((Xe,Wt,fr)=>(ao||(ao=Oa(Xe)),Wt.queryIntersectsFeature(In,Xe,fr,ao,this.z,u.transform,Ar,u.pixelPosMatrix))))}return co}loadMatchingFeature(u,Xe,Wt,fr,_r,wr,Ar,Kr,In,no,io){const oo=this.bucketLayerIDs[Xe];if(wr&&!function(u,Xe){for(let Wt=0;Wt<u.length;Wt++)if(Xe.indexOf(u[Wt])>=0)return!0;return!1}(wr,oo))return;const ao=this.sourceLayerCoder.decode(Wt),so=this.vtLayers[ao].feature(fr);if(_r.needGeometry){const u=ja(so,!0);if(!_r.filter(new Ui(this.tileID.overscaledZ),u,this.tileID.canonical))return}else if(!_r.filter(new Ui(this.tileID.overscaledZ),so))return;const co=this.getId(so,ao);for(let Xe=0;Xe<oo.length;Xe++){const Wt=oo[Xe];if(wr&&wr.indexOf(Wt)<0)continue;const _r=Kr[Wt];if(!_r)continue;let ao={};co&&no&&(ao=no.getState(_r.sourceLayer||"_geojsonTileLayer",co));const ho=g({},In[Wt]);ho.paint=Gc(ho.paint,_r.paint,so,ao,Ar),ho.layout=Gc(ho.layout,_r.layout,so,ao,Ar);const go=!io||io(so,_r,ao);if(!go)continue;const xo=new Nc(so,this.z,this.x,this.y,co);xo.layer=ho;let ko=u[Wt];void 0===ko&&(ko=u[Wt]=[]),ko.push({featureIndex:fr,feature:xo,intersectionZ:go})}}lookupSymbolFeatures(u,Xe,Wt,fr,_r,wr,Ar,Kr){const In={};this.loadVTLayers();const no=zn(_r);for(const _r of u)this.loadMatchingFeature(In,Wt,fr,_r,no,wr,Ar,Kr,Xe);return In}hasLayer(u){for(const Xe of this.bucketLayerIDs)for(const Wt of Xe)if(u===Wt)return!0;return!1}getId(u,Xe){let Wt=u.id;return this.promoteId&&(Wt=u.properties["string"==typeof this.promoteId?this.promoteId:this.promoteId[Xe]],"boolean"==typeof Wt&&(Wt=Number(Wt))),Wt}}function Gc(u,Xe,Wt,fr,_r){return v(u,((u,wr)=>{const Ar=Xe instanceof Yi?Xe.get(wr):null;return Ar&&Ar.evaluate?Ar.evaluate(Wt,fr,_r):Ar}))}function Kc(u){let Xe=1/0,Wt=1/0,fr=-1/0,_r=-1/0;for(const wr of u)Xe=Math.min(Xe,wr.x),Wt=Math.min(Wt,wr.y),fr=Math.max(fr,wr.x),_r=Math.max(_r,wr.y);return{minX:Xe,minY:Wt,maxX:fr,maxY:_r}}function Xc(u,Xe){return Xe-u}function Hc(u,Xe,fr,_r,wr){const Ar=[];for(let Kr=0;Kr<u.length;Kr++){const In=u[Kr];let no;for(let u=0;u<In.length-1;u++){let Kr=In[u],io=In[u+1];Kr.x<Xe&&io.x<Xe||(Kr.x<Xe?Kr=new Wt(Xe,Kr.y+(Xe-Kr.x)/(io.x-Kr.x)*(io.y-Kr.y))._round():io.x<Xe&&(io=new Wt(Xe,Kr.y+(Xe-Kr.x)/(io.x-Kr.x)*(io.y-Kr.y))._round()),Kr.y<fr&&io.y<fr||(Kr.y<fr?Kr=new Wt(Kr.x+(fr-Kr.y)/(io.y-Kr.y)*(io.x-Kr.x),fr)._round():io.y<fr&&(io=new Wt(Kr.x+(fr-Kr.y)/(io.y-Kr.y)*(io.x-Kr.x),fr)._round()),Kr.x>=_r&&io.x>=_r||(Kr.x>=_r?Kr=new Wt(_r,Kr.y+(_r-Kr.x)/(io.x-Kr.x)*(io.y-Kr.y))._round():io.x>=_r&&(io=new Wt(_r,Kr.y+(_r-Kr.x)/(io.x-Kr.x)*(io.y-Kr.y))._round()),Kr.y>=wr&&io.y>=wr||(Kr.y>=wr?Kr=new Wt(Kr.x+(wr-Kr.y)/(io.y-Kr.y)*(io.x-Kr.x),wr)._round():io.y>=wr&&(io=new Wt(Kr.x+(wr-Kr.y)/(io.y-Kr.y)*(io.x-Kr.x),wr)._round()),no&&Kr.equals(no[no.length-1])||(no=[Kr],Ar.push(no)),no.push(io)))))}}return Ar}wi("FeatureIndex",Zc,{omit:["rawTileData","sourceLayerCoder"]});class Yc extends Wt{constructor(u,Xe,Wt,fr){super(u,Xe),this.angle=Wt,void 0!==fr&&(this.segment=fr)}clone(){return new Yc(this.x,this.y,this.angle,this.segment)}}function Jc(u,Xe,Wt,fr,_r){if(void 0===Xe.segment||0===Wt)return!0;let wr=Xe,Ar=Xe.segment+1,Kr=0;for(;Kr>-Wt/2;){if(Ar--,Ar<0)return!1;Kr-=u[Ar].dist(wr),wr=u[Ar]}Kr+=u[Ar].dist(u[Ar+1]),Ar++;const In=[];let no=0;for(;Kr<Wt/2;){const Xe=u[Ar],Wt=u[Ar+1];if(!Wt)return!1;let wr=u[Ar-1].angleTo(Xe)-Xe.angleTo(Wt);for(wr=Math.abs((wr+3*Math.PI)%(2*Math.PI)-Math.PI),In.push({distance:Kr,angleDelta:wr}),no+=wr;Kr-In[0].distance>fr;)no-=In.shift().angleDelta;if(no>_r)return!1;Ar++,Kr+=Xe.dist(Wt)}return!0}function Wc(u){let Xe=0;for(let Wt=0;Wt<u.length-1;Wt++)Xe+=u[Wt].dist(u[Wt+1]);return Xe}function Qc(u,Xe,Wt){return u?.6*Xe*Wt:0}function th(u,Xe){return Math.max(u?u.right-u.left:0,Xe?Xe.right-Xe.left:0)}function eh(u,Xe,Wt,fr,_r,wr){const Ar=Qc(Wt,_r,wr),Kr=th(Wt,fr)*wr;let In=0;const no=Wc(u)/2;for(let Wt=0;Wt<u.length-1;Wt++){const fr=u[Wt],_r=u[Wt+1],wr=fr.dist(_r);if(In+wr>no){const io=(no-In)/wr,oo=rc.number(fr.x,_r.x,io),ao=rc.number(fr.y,_r.y,io),so=new Yc(oo,ao,_r.angleTo(fr),Wt);return so._round(),!Ar||Jc(u,so,Kr,Ar,Xe)?so:void 0}In+=wr}}function rh(u,Xe,Wt,fr,_r,wr,Ar,Kr,In){const no=Qc(fr,wr,Ar),io=th(fr,_r),oo=io*Ar,ao=0===u[0].x||u[0].x===In||0===u[0].y||u[0].y===In;return Xe-oo<Xe/4&&(Xe=oo+Xe/4),nh(u,ao?Xe/2*Kr%Xe:(io/2+2*wr)*Ar*Kr%Xe,Xe,no,Wt,oo,ao,!1,In)}function nh(u,Xe,Wt,fr,_r,wr,Ar,Kr,In){const no=wr/2,io=Wc(u);let oo=0,ao=Xe-Wt,so=[];for(let Xe=0;Xe<u.length-1;Xe++){const Ar=u[Xe],Kr=u[Xe+1],co=Ar.dist(Kr),ho=Kr.angleTo(Ar);for(;ao+Wt<oo+co;){ao+=Wt;const go=(ao-oo)/co,xo=rc.number(Ar.x,Kr.x,go),ko=rc.number(Ar.y,Kr.y,go);if(xo>=0&&xo<In&&ko>=0&&ko<In&&ao-no>=0&&ao+no<=io){const Wt=new Yc(xo,ko,ho,Xe);Wt._round(),fr&&!Jc(u,Wt,wr,fr,_r)||so.push(Wt)}}oo+=co}return Kr||so.length||Ar||(so=nh(u,oo/2,Wt,fr,_r,wr,Ar,!0,In)),so}wi("Anchor",Yc);const Wp=kp;function sh(u,Xe,fr,_r){const wr=[],Ar=u.image,Kr=Ar.pixelRatio,In=Ar.paddedRect.w-2*Wp,no=Ar.paddedRect.h-2*Wp;let io={x1:u.left,y1:u.top,x2:u.right,y2:u.bottom};const oo=Ar.stretchX||[[0,In]],ao=Ar.stretchY||[[0,no]],f=(u,Xe)=>u+Xe[1]-Xe[0],so=oo.reduce(f,0),co=ao.reduce(f,0),ho=In-so,go=no-co;let xo=0,ko=so,Co=0,Io=co,zo=0,Bo=ho,ca=0,ua=go;if(Ar.content&&_r){const Xe=Ar.content,Wt=Xe[2]-Xe[0],fr=Xe[3]-Xe[1];(Ar.textFitWidth||Ar.textFitHeight)&&(io=tc(u)),xo=ah(oo,0,Xe[0]),Co=ah(ao,0,Xe[1]),ko=ah(oo,Xe[0],Xe[2]),Io=ah(ao,Xe[1],Xe[3]),zo=Xe[0]-xo,ca=Xe[1]-Co,Bo=Wt-ko,ua=fr-Io}const Da=io.x1,ns=io.y1,yl=io.x2-Da,vl=io.y2-ns,C=(u,_r,wr,In)=>{const no=lh(u.stretch-xo,ko,yl,Da),io=uh(u.fixed-zo,Bo,u.stretch,so),oo=lh(_r.stretch-Co,Io,vl,ns),ao=uh(_r.fixed-ca,ua,_r.stretch,co),ho=lh(wr.stretch-xo,ko,yl,Da),go=uh(wr.fixed-zo,Bo,wr.stretch,so),kl=lh(In.stretch-Co,Io,vl,ns),Al=uh(In.fixed-ca,ua,In.stretch,co),Ml=new Wt(no,oo),Rl=new Wt(ho,oo),Ol=new Wt(ho,kl),Ll=new Wt(no,kl),Dl=new Wt(io/Kr,ao/Kr),Bl=new Wt(go/Kr,Al/Kr),Nl=Xe*Math.PI/180;if(Nl){const u=Math.sin(Nl),Xe=Math.cos(Nl),Wt=[Xe,-u,u,Xe];Ml._matMult(Wt),Rl._matMult(Wt),Ll._matMult(Wt),Ol._matMult(Wt)}const Vl=u.stretch+u.fixed,Ul=_r.stretch+_r.fixed;return{tl:Ml,tr:Rl,bl:Ll,br:Ol,tex:{x:Ar.paddedRect.x+Wp+Vl,y:Ar.paddedRect.y+Wp+Ul,w:wr.stretch+wr.fixed-Vl,h:In.stretch+In.fixed-Ul},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:Dl,pixelOffsetBR:Bl,minFontScaleX:Bo/Kr/yl,minFontScaleY:ua/Kr/vl,isSDF:fr}};if(_r&&(Ar.stretchX||Ar.stretchY)){const u=oh(oo,ho,so),Xe=oh(ao,go,co);for(let Wt=0;Wt<u.length-1;Wt++){const fr=u[Wt],_r=u[Wt+1];for(let u=0;u<Xe.length-1;u++)wr.push(C(fr,Xe[u],_r,Xe[u+1]))}}else wr.push(C({fixed:0,stretch:-1},{fixed:0,stretch:-1},{fixed:0,stretch:In+1},{fixed:0,stretch:no+1}));return wr}function ah(u,Xe,Wt){let fr=0;for(const _r of u)fr+=Math.max(Xe,Math.min(Wt,_r[1]))-Math.max(Xe,Math.min(Wt,_r[0]));return fr}function oh(u,Xe,Wt){const fr=[{fixed:-Wp,stretch:0}];for(const[Xe,Wt]of u){const u=fr[fr.length-1];fr.push({fixed:Xe-u.stretch,stretch:u.stretch}),fr.push({fixed:Xe-u.stretch,stretch:u.stretch+(Wt-Xe)})}return fr.push({fixed:Xe+Wp,stretch:Wt}),fr}function lh(u,Xe,Wt,fr){return u/Xe*Wt+fr}function uh(u,Xe,Wt,fr){return u-Xe*Wt/fr}class ch{constructor(u,Xe,fr,_r,wr,Ar,Kr,In,no,io){var oo;if(this.boxStartIndex=u.length,no){let u=Ar.top,Xe=Ar.bottom;const Wt=Ar.collisionPadding;Wt&&(u-=Wt[1],Xe+=Wt[3]);let fr=Xe-u;fr>0&&(fr=Math.max(10,fr),this.circleDiameter=fr)}else{const no=(null===(oo=Ar.image)||void 0===oo?void 0:oo.content)&&(Ar.image.textFitWidth||Ar.image.textFitHeight)?tc(Ar):{x1:Ar.left,y1:Ar.top,x2:Ar.right,y2:Ar.bottom};no.y1=no.y1*Kr-In[0],no.y2=no.y2*Kr+In[2],no.x1=no.x1*Kr-In[3],no.x2=no.x2*Kr+In[1];const ao=Ar.collisionPadding;if(ao&&(no.x1-=ao[0]*Kr,no.y1-=ao[1]*Kr,no.x2+=ao[2]*Kr,no.y2+=ao[3]*Kr),io){const u=new Wt(no.x1,no.y1),Xe=new Wt(no.x2,no.y1),fr=new Wt(no.x1,no.y2),_r=new Wt(no.x2,no.y2),wr=io*Math.PI/180;u._rotate(wr),Xe._rotate(wr),fr._rotate(wr),_r._rotate(wr),no.x1=Math.min(u.x,Xe.x,fr.x,_r.x),no.x2=Math.max(u.x,Xe.x,fr.x,_r.x),no.y1=Math.min(u.y,Xe.y,fr.y,_r.y),no.y2=Math.max(u.y,Xe.y,fr.y,_r.y)}u.emplaceBack(Xe.x,Xe.y,no.x1,no.y1,no.x2,no.y2,fr,_r,wr)}this.boxEndIndex=u.length}}class hh{constructor(u=[],Xe=(u,Xe)=>u<Xe?-1:u>Xe?1:0){if(this.data=u,this.length=this.data.length,this.compare=Xe,this.length>0)for(let u=(this.length>>1)-1;u>=0;u--)this._down(u)}push(u){this.data.push(u),this._up(this.length++)}pop(){if(0===this.length)return;const u=this.data[0],Xe=this.data.pop();return--this.length>0&&(this.data[0]=Xe,this._down(0)),u}peek(){return this.data[0]}_up(u){const{data:Xe,compare:Wt}=this,fr=Xe[u];for(;u>0;){const _r=u-1>>1,wr=Xe[_r];if(Wt(fr,wr)>=0)break;Xe[u]=wr,u=_r}Xe[u]=fr}_down(u){const{data:Xe,compare:Wt}=this,fr=this.length>>1,_r=Xe[u];for(;u<fr;){let fr=1+(u<<1);const wr=fr+1;if(wr<this.length&&Wt(Xe[wr],Xe[fr])<0&&(fr=wr),Wt(Xe[fr],_r)>=0)break;Xe[u]=Xe[fr],u=fr}Xe[u]=_r}}function ph(u,Xe=1,fr=!1){let _r=1/0,wr=1/0,Ar=-1/0,Kr=-1/0;const In=u[0];for(let u=0;u<In.length;u++){const Xe=In[u];(!u||Xe.x<_r)&&(_r=Xe.x),(!u||Xe.y<wr)&&(wr=Xe.y),(!u||Xe.x>Ar)&&(Ar=Xe.x),(!u||Xe.y>Kr)&&(Kr=Xe.y)}const no=Math.min(Ar-_r,Kr-wr);let io=no/2;const oo=new hh([],fh);if(0===no)return new Wt(_r,wr);for(let Xe=_r;Xe<Ar;Xe+=no)for(let Wt=wr;Wt<Kr;Wt+=no)oo.push(new dh(Xe+io,Wt+io,io,u));let ao=function(u){let Xe=0,Wt=0,fr=0;const _r=u[0];for(let u=0,wr=_r.length,Ar=wr-1;u<wr;Ar=u++){const wr=_r[u],Kr=_r[Ar],In=wr.x*Kr.y-Kr.x*wr.y;Wt+=(wr.x+Kr.x)*In,fr+=(wr.y+Kr.y)*In,Xe+=3*In}return new dh(Wt/Xe,fr/Xe,0,u)}(u),so=oo.length;for(;oo.length;){const Wt=oo.pop();(Wt.d>ao.d||!ao.d)&&(ao=Wt,fr&&console.log("found best %d after %d probes",Math.round(1e4*Wt.d)/1e4,so)),Wt.max-ao.d<=Xe||(io=Wt.h/2,oo.push(new dh(Wt.p.x-io,Wt.p.y-io,io,u)),oo.push(new dh(Wt.p.x+io,Wt.p.y-io,io,u)),oo.push(new dh(Wt.p.x-io,Wt.p.y+io,io,u)),oo.push(new dh(Wt.p.x+io,Wt.p.y+io,io,u)),so+=4)}return fr&&(console.log(`num probes: ${so}`),console.log(`best distance: ${ao.d}`)),ao.p}function fh(u,Xe){return Xe.max-u.max}function dh(u,Xe,fr,_r){this.p=new Wt(u,Xe),this.h=fr,this.d=function(u,Xe){let Wt=!1,fr=1/0;for(let _r=0;_r<Xe.length;_r++){const wr=Xe[_r];for(let Xe=0,_r=wr.length,Ar=_r-1;Xe<_r;Ar=Xe++){const _r=wr[Xe],Kr=wr[Ar];_r.y>u.y!=Kr.y>u.y&&u.x<(Kr.x-_r.x)*(u.y-_r.y)/(Kr.y-_r.y)+_r.x&&(Wt=!Wt),fr=Math.min(fr,Ya(u,_r,Kr))}}return(Wt?1:-1)*Math.sqrt(fr)}(this.p,_r),this.max=this.d+this.h*Math.SQRT2}var qp;u.aq=void 0,(qp=u.aq||(u.aq={}))[qp.center=1]="center",qp[qp.left=2]="left",qp[qp.right=3]="right",qp[qp.top=4]="top",qp[qp.bottom=5]="bottom",qp[qp["top-left"]=6]="top-left",qp[qp["top-right"]=7]="top-right",qp[qp["bottom-left"]=8]="bottom-left",qp[qp["bottom-right"]=9]="bottom-right";const Zp=7,Hp=Number.POSITIVE_INFINITY;function xh(u,Xe){return Xe[1]!==Hp?function(u,Xe,Wt){let fr=0,_r=0;switch(Xe=Math.abs(Xe),Wt=Math.abs(Wt),u){case"top-right":case"top-left":case"top":_r=Wt-Zp;break;case"bottom-right":case"bottom-left":case"bottom":_r=-Wt+Zp}switch(u){case"top-right":case"bottom-right":case"right":fr=-Xe;break;case"top-left":case"bottom-left":case"left":fr=Xe}return[fr,_r]}(u,Xe[0],Xe[1]):function(u,Xe){let Wt=0,fr=0;Xe<0&&(Xe=0);const _r=Xe/Math.SQRT2;switch(u){case"top-right":case"top-left":fr=_r-Zp;break;case"bottom-right":case"bottom-left":fr=-_r+Zp;break;case"bottom":fr=-Xe+Zp;break;case"top":fr=Xe-Zp}switch(u){case"top-right":case"bottom-right":Wt=-_r;break;case"top-left":case"bottom-left":Wt=_r;break;case"left":Wt=Xe;break;case"right":Wt=-Xe}return[Wt,fr]}(u,Xe[0])}function vh(u,Xe,Wt){var fr;const _r=u.layout,wr=null===(fr=_r.get("text-variable-anchor-offset"))||void 0===fr?void 0:fr.evaluate(Xe,{},Wt);if(wr){const u=wr.values,Xe=[];for(let Wt=0;Wt<u.length;Wt+=2){const fr=Xe[Wt]=u[Wt],_r=u[Wt+1].map((u=>u*gp));fr.startsWith("top")?_r[1]-=Zp:fr.startsWith("bottom")&&(_r[1]+=Zp),Xe[Wt+1]=_r}return new Qt(Xe)}const Ar=_r.get("text-variable-anchor");if(Ar){let fr;fr=void 0!==u._unevaluatedLayout.getValue("text-radial-offset")?[_r.get("text-radial-offset").evaluate(Xe,{},Wt)*gp,Hp]:_r.get("text-offset").evaluate(Xe,{},Wt).map((u=>u*gp));const wr=[];for(const u of Ar)wr.push(u,xh(u,fr));return new Qt(wr)}return null}function bh(u){switch(u){case"right":case"top-right":case"bottom-right":return"right";case"left":case"top-left":case"bottom-left":return"left"}return"center"}function wh(Xe,Wt,fr,_r,wr,Ar,Kr,In,no,io,oo){let ao=Ar.textMaxSize.evaluate(Wt,{});void 0===ao&&(ao=Kr);const so=Xe.layers[0].layout,co=so.get("icon-offset").evaluate(Wt,{},oo),ho=Ah(fr.horizontal),go=Kr/24,xo=Xe.tilePixelRatio*go,ko=Xe.tilePixelRatio*ao/24,Co=Xe.tilePixelRatio*In,Io=Xe.tilePixelRatio*so.get("symbol-spacing"),zo=so.get("text-padding")*Xe.tilePixelRatio,Bo=function(u,Xe,Wt,fr=1){const _r=u.get("icon-padding").evaluate(Xe,{},Wt),wr=_r&&_r.values;return[wr[0]*fr,wr[1]*fr,wr[2]*fr,wr[3]*fr]}(so,Wt,oo,Xe.tilePixelRatio),ca=so.get("text-max-angle")/180*Math.PI,ua="viewport"!==so.get("text-rotation-alignment")&&"point"!==so.get("symbol-placement"),Da="map"===so.get("icon-rotation-alignment")&&"point"!==so.get("symbol-placement"),ns=so.get("symbol-placement"),yl=Io/2,vl=so.get("icon-text-fit");let kl;_r&&"none"!==vl&&(Xe.allowVerticalPlacement&&fr.vertical&&(kl=ec(_r,fr.vertical,vl,so.get("icon-text-fit-padding"),co,go)),ho&&(_r=ec(_r,ho,vl,so.get("icon-text-fit-padding"),co,go)));const B=(In,ao)=>{ao.x<0||ao.x>=Td||ao.y<0||ao.y>=Td||function(Xe,Wt,fr,_r,wr,Ar,Kr,In,no,io,oo,ao,so,co,ho,go,xo,ko,Co,Io,zo,Bo,ca,ua,Da){const ns=Xe.addToLineVertexArray(Wt,fr);let yl,vl,kl,Al,Ml=0,Rl=0,Ol=0,Ll=0,Dl=-1,Bl=-1;const Nl={};let Vl=kd("");if(Xe.allowVerticalPlacement&&_r.vertical){const u=In.layout.get("text-rotate").evaluate(zo,{},ua)+90;kl=new ch(no,Wt,io,oo,ao,_r.vertical,so,co,ho,u),Kr&&(Al=new ch(no,Wt,io,oo,ao,Kr,xo,ko,ho,u))}if(wr){const fr=In.layout.get("icon-rotate").evaluate(zo,{}),_r="none"!==In.layout.get("icon-text-fit"),Ar=sh(wr,fr,ca,_r),so=Kr?sh(Kr,fr,ca,_r):void 0;vl=new ch(no,Wt,io,oo,ao,wr,xo,ko,!1,fr),Ml=4*Ar.length;const co=Xe.iconSizeData;let ho=null;"source"===co.kind?(ho=[Mp*In.layout.get("icon-size").evaluate(zo,{})],ho[0]>Rp&&A(`${Xe.layerIds[0]}: Value for "icon-size" is >= ${Ip}. Reduce your "icon-size".`)):"composite"===co.kind&&(ho=[Mp*Bo.compositeIconSizes[0].evaluate(zo,{},ua),Mp*Bo.compositeIconSizes[1].evaluate(zo,{},ua)],(ho[0]>Rp||ho[1]>Rp)&&A(`${Xe.layerIds[0]}: Value for "icon-size" is >= ${Ip}. Reduce your "icon-size".`)),Xe.addSymbols(Xe.icon,Ar,ho,Io,Co,zo,u.ah.none,Wt,ns.lineStartIndex,ns.lineLength,-1,ua),Dl=Xe.icon.placedSymbolArray.length-1,so&&(Rl=4*so.length,Xe.addSymbols(Xe.icon,so,ho,Io,Co,zo,u.ah.vertical,Wt,ns.lineStartIndex,ns.lineLength,-1,ua),Bl=Xe.icon.placedSymbolArray.length-1)}const Ul=Object.keys(_r.horizontal);for(const fr of Ul){const wr=_r.horizontal[fr];if(!yl){Vl=kd(wr.text);const u=In.layout.get("text-rotate").evaluate(zo,{},ua);yl=new ch(no,Wt,io,oo,ao,wr,so,co,ho,u)}const Kr=1===wr.positionedLines.length;if(Ol+=_h(Xe,Wt,wr,Ar,In,ho,zo,go,ns,_r.vertical?u.ah.horizontal:u.ah.horizontalOnly,Kr?Ul:[fr],Nl,Dl,Bo,ua),Kr)break}_r.vertical&&(Ll+=_h(Xe,Wt,_r.vertical,Ar,In,ho,zo,go,ns,u.ah.vertical,["vertical"],Nl,Bl,Bo,ua));const $l=yl?yl.boxStartIndex:Xe.collisionBoxArray.length,Wl=yl?yl.boxEndIndex:Xe.collisionBoxArray.length,Zl=kl?kl.boxStartIndex:Xe.collisionBoxArray.length,Gl=kl?kl.boxEndIndex:Xe.collisionBoxArray.length,Xl=vl?vl.boxStartIndex:Xe.collisionBoxArray.length,Jl=vl?vl.boxEndIndex:Xe.collisionBoxArray.length,Ql=Al?Al.boxStartIndex:Xe.collisionBoxArray.length,rc=Al?Al.boxEndIndex:Xe.collisionBoxArray.length;let ic=-1;const Y=(u,Xe)=>u&&u.circleDiameter?Math.max(u.circleDiameter,Xe):Xe;ic=Y(yl,ic),ic=Y(kl,ic),ic=Y(vl,ic),ic=Y(Al,ic);const oc=ic>-1?1:0;oc&&(ic*=Da/gp),Xe.glyphOffsetArray.length>=dc.MAX_GLYPHS&&A("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),void 0!==zo.sortKey&&Xe.addToSortKeyRanges(Xe.symbolInstances.length,zo.sortKey);const lc=vh(In,zo,ua),[gc,bc]=function(Xe,Wt){const fr=Xe.length,_r=null==Wt?void 0:Wt.values;if((null==_r?void 0:_r.length)>0)for(let Wt=0;Wt<_r.length;Wt+=2){const fr=_r[Wt+1];Xe.emplaceBack(u.aq[_r[Wt]],fr[0],fr[1])}return[fr,Xe.length]}(Xe.textAnchorOffsets,lc);Xe.symbolInstances.emplaceBack(Wt.x,Wt.y,Nl.right>=0?Nl.right:-1,Nl.center>=0?Nl.center:-1,Nl.left>=0?Nl.left:-1,Nl.vertical||-1,Dl,Bl,Vl,$l,Wl,Zl,Gl,Xl,Jl,Ql,rc,io,Ol,Ll,Ml,Rl,oc,0,so,ic,gc,bc)}(Xe,ao,In,fr,_r,wr,kl,Xe.layers[0],Xe.collisionBoxArray,Wt.index,Wt.sourceLayerIndex,Xe.index,xo,[zo,zo,zo,zo],ua,no,Co,Bo,Da,co,Wt,Ar,io,oo,Kr)};if("line"===ns)for(const u of Hc(Wt.geometry,0,0,Td,Td)){const Wt=rh(u,Io,ca,fr.vertical||ho,_r,24,ko,Xe.overscaling,Td);for(const fr of Wt)ho&&Sh(Xe,ho.text,yl,fr)||B(u,fr)}else if("line-center"===ns){for(const u of Wt.geometry)if(u.length>1){const Xe=eh(u,ca,fr.vertical||ho,_r,24,ko);Xe&&B(u,Xe)}}else if("Polygon"===Wt.type)for(const u of xr(Wt.geometry,0)){const Xe=ph(u,16);B(u[0],new Yc(Xe.x,Xe.y,0))}else if("LineString"===Wt.type)for(const u of Wt.geometry)B(u,new Yc(u[0].x,u[0].y,0));else if("Point"===Wt.type)for(const u of Wt.geometry)for(const Xe of u)B([Xe],new Yc(Xe.x,Xe.y,0))}function _h(u,Xe,fr,_r,wr,Ar,Kr,In,no,io,oo,ao,so,co,ho){const go=function(u,Xe,fr,_r,wr,Ar,Kr,In){const no=_r.layout.get("text-rotate").evaluate(Ar,{})*Math.PI/180,io=[];for(const u of Xe.positionedLines)for(const _r of u.positionedGlyphs){if(!_r.rect)continue;const Ar=_r.rect||{};let oo=Sp+1,ao=!0,so=1,co=0;const ho=(wr||In)&&_r.vertical,go=_r.metrics.advance*_r.scale/2;if(In&&Xe.verticalizable&&(co=u.lineOffset/2-(_r.imageName?-(gp-_r.metrics.width*_r.scale)/2:(_r.scale-1)*gp)),_r.imageName){const u=Kr[_r.imageName];ao=u.sdf,so=u.pixelRatio,oo=kp/so}const xo=wr?[_r.x+go,_r.y]:[0,0];let ko=wr?[0,0]:[_r.x+go+fr[0],_r.y+fr[1]-co],Co=[0,0];ho&&(Co=ko,ko=[0,0]);const Io=_r.metrics.isDoubleResolution?2:1,zo=(_r.metrics.left-oo)*_r.scale-go+ko[0],Bo=(-_r.metrics.top-oo)*_r.scale+ko[1],ca=zo+Ar.w/Io*_r.scale/so,ua=Bo+Ar.h/Io*_r.scale/so,Da=new Wt(zo,Bo),ns=new Wt(ca,Bo),yl=new Wt(zo,ua),vl=new Wt(ca,ua);if(ho){const u=new Wt(-go,go-Tp),Xe=-Math.PI/2,fr=gp/2-go,wr=new Wt(5-Tp-fr,-(_r.imageName?fr:0)),Ar=new Wt(...Co);Da._rotateAround(Xe,u)._add(wr)._add(Ar),ns._rotateAround(Xe,u)._add(wr)._add(Ar),yl._rotateAround(Xe,u)._add(wr)._add(Ar),vl._rotateAround(Xe,u)._add(wr)._add(Ar)}if(no){const u=Math.sin(no),Xe=Math.cos(no),Wt=[Xe,-u,u,Xe];Da._matMult(Wt),ns._matMult(Wt),yl._matMult(Wt),vl._matMult(Wt)}const kl=new Wt(0,0),Al=new Wt(0,0);io.push({tl:Da,tr:ns,bl:yl,br:vl,tex:Ar,writingMode:Xe.writingMode,glyphOffset:xo,sectionIndex:_r.sectionIndex,isSDF:ao,pixelOffsetTL:kl,pixelOffsetBR:Al,minFontScaleX:0,minFontScaleY:0})}return io}(0,fr,In,wr,Ar,Kr,_r,u.allowVerticalPlacement),xo=u.textSizeData;let ko=null;"source"===xo.kind?(ko=[Mp*wr.layout.get("text-size").evaluate(Kr,{})],ko[0]>Rp&&A(`${u.layerIds[0]}: Value for "text-size" is >= ${Ip}. Reduce your "text-size".`)):"composite"===xo.kind&&(ko=[Mp*co.compositeTextSizes[0].evaluate(Kr,{},ho),Mp*co.compositeTextSizes[1].evaluate(Kr,{},ho)],(ko[0]>Rp||ko[1]>Rp)&&A(`${u.layerIds[0]}: Value for "text-size" is >= ${Ip}. Reduce your "text-size".`)),u.addSymbols(u.text,go,ko,In,Ar,Kr,io,Xe,no.lineStartIndex,no.lineLength,so,ho);for(const Xe of oo)ao[Xe]=u.text.placedSymbolArray.length-1;return 4*go.length}function Ah(u){for(const Xe in u)return u[Xe];return null}function Sh(u,Xe,Wt,fr){const _r=u.compareText;if(Xe in _r){const u=_r[Xe];for(let Xe=u.length-1;Xe>=0;Xe--)if(fr.dist(u[Xe])<Wt)return!0}else _r[Xe]=[];return _r[Xe].push(fr),!1}const Gp=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array];class Mh{static from(u){if(!(u instanceof ArrayBuffer))throw new Error("Data must be an instance of ArrayBuffer.");const[Xe,Wt]=new Uint8Array(u,0,2);if(219!==Xe)throw new Error("Data does not appear to be in a KDBush format.");const fr=Wt>>4;if(1!==fr)throw new Error(`Got v${fr} data when expected v1.`);const _r=Gp[15&Wt];if(!_r)throw new Error("Unrecognized array type.");const[wr]=new Uint16Array(u,2,1),[Ar]=new Uint32Array(u,4,1);return new Mh(Ar,wr,_r,u)}constructor(u,Xe=64,Wt=Float64Array,fr){if(isNaN(u)||u<0)throw new Error(`Unpexpected numItems value: ${u}.`);this.numItems=+u,this.nodeSize=Math.min(Math.max(+Xe,2),65535),this.ArrayType=Wt,this.IndexArrayType=u<65536?Uint16Array:Uint32Array;const _r=Gp.indexOf(this.ArrayType),wr=2*u*this.ArrayType.BYTES_PER_ELEMENT,Ar=u*this.IndexArrayType.BYTES_PER_ELEMENT,Kr=(8-Ar%8)%8;if(_r<0)throw new Error(`Unexpected typed array class: ${Wt}.`);fr&&fr instanceof ArrayBuffer?(this.data=fr,this.ids=new this.IndexArrayType(this.data,8,u),this.coords=new this.ArrayType(this.data,8+Ar+Kr,2*u),this._pos=2*u,this._finished=!0):(this.data=new ArrayBuffer(8+wr+Ar+Kr),this.ids=new this.IndexArrayType(this.data,8,u),this.coords=new this.ArrayType(this.data,8+Ar+Kr,2*u),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,16+_r]),new Uint16Array(this.data,2,1)[0]=Xe,new Uint32Array(this.data,4,1)[0]=u)}add(u,Xe){const Wt=this._pos>>1;return this.ids[Wt]=Wt,this.coords[this._pos++]=u,this.coords[this._pos++]=Xe,Wt}finish(){const u=this._pos>>1;if(u!==this.numItems)throw new Error(`Added ${u} items when expected ${this.numItems}.`);return Ih(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(u,Xe,Wt,fr){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:_r,coords:wr,nodeSize:Ar}=this,Kr=[0,_r.length-1,0],In=[];for(;Kr.length;){const no=Kr.pop()||0,io=Kr.pop()||0,oo=Kr.pop()||0;if(io-oo<=Ar){for(let Ar=oo;Ar<=io;Ar++){const Kr=wr[2*Ar],no=wr[2*Ar+1];Kr>=u&&Kr<=Wt&&no>=Xe&&no<=fr&&In.push(_r[Ar])}continue}const ao=oo+io>>1,so=wr[2*ao],co=wr[2*ao+1];so>=u&&so<=Wt&&co>=Xe&&co<=fr&&In.push(_r[ao]),(0===no?u<=so:Xe<=co)&&(Kr.push(oo),Kr.push(ao-1),Kr.push(1-no)),(0===no?Wt>=so:fr>=co)&&(Kr.push(ao+1),Kr.push(io),Kr.push(1-no))}return In}within(u,Xe,Wt){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:fr,coords:_r,nodeSize:wr}=this,Ar=[0,fr.length-1,0],Kr=[],In=Wt*Wt;for(;Ar.length;){const no=Ar.pop()||0,io=Ar.pop()||0,oo=Ar.pop()||0;if(io-oo<=wr){for(let Wt=oo;Wt<=io;Wt++)Bh(_r[2*Wt],_r[2*Wt+1],u,Xe)<=In&&Kr.push(fr[Wt]);continue}const ao=oo+io>>1,so=_r[2*ao],co=_r[2*ao+1];Bh(so,co,u,Xe)<=In&&Kr.push(fr[ao]),(0===no?u-Wt<=so:Xe-Wt<=co)&&(Ar.push(oo),Ar.push(ao-1),Ar.push(1-no)),(0===no?u+Wt>=so:Xe+Wt>=co)&&(Ar.push(ao+1),Ar.push(io),Ar.push(1-no))}return Kr}}function Ih(u,Xe,Wt,fr,_r,wr){if(_r-fr<=Wt)return;const Ar=fr+_r>>1;zh(u,Xe,Ar,fr,_r,wr),Ih(u,Xe,Wt,fr,Ar-1,1-wr),Ih(u,Xe,Wt,Ar+1,_r,1-wr)}function zh(u,Xe,Wt,fr,_r,wr){for(;_r>fr;){if(_r-fr>600){const Ar=_r-fr+1,Kr=Wt-fr+1,In=Math.log(Ar),no=.5*Math.exp(2*In/3),io=.5*Math.sqrt(In*no*(Ar-no)/Ar)*(Kr-Ar/2<0?-1:1);zh(u,Xe,Wt,Math.max(fr,Math.floor(Wt-Kr*no/Ar+io)),Math.min(_r,Math.floor(Wt+(Ar-Kr)*no/Ar+io)),wr)}const Ar=Xe[2*Wt+wr];let Kr=fr,In=_r;for(Ph(u,Xe,fr,Wt),Xe[2*_r+wr]>Ar&&Ph(u,Xe,fr,_r);Kr<In;){for(Ph(u,Xe,Kr,In),Kr++,In--;Xe[2*Kr+wr]<Ar;)Kr++;for(;Xe[2*In+wr]>Ar;)In--}Xe[2*fr+wr]===Ar?Ph(u,Xe,fr,In):(In++,Ph(u,Xe,In,_r)),In<=Wt&&(fr=In+1),Wt<=In&&(_r=In-1)}}function Ph(u,Xe,Wt,fr){Ch(u,Wt,fr),Ch(Xe,2*Wt,2*fr),Ch(Xe,2*Wt+1,2*fr+1)}function Ch(u,Xe,Wt){const fr=u[Xe];u[Xe]=u[Wt],u[Wt]=fr}function Bh(u,Xe,Wt,fr){const _r=u-Wt,wr=Xe-fr;return _r*_r+wr*wr}var Kp;u.bg=void 0,(Kp=u.bg||(u.bg={})).create="create",Kp.load="load",Kp.fullLoad="fullLoad";let Xp=null,Yp=[];const Jp=1e3/60,Qp="loadTime",ef="fullLoadTime",rf={mark(u){performance.mark(u)},frame(u){const Xe=u;null!=Xp&&Yp.push(Xe-Xp),Xp=Xe},clearMetrics(){Xp=null,Yp=[],performance.clearMeasures(Qp),performance.clearMeasures(ef);for(const Xe in u.bg)performance.clearMarks(u.bg[Xe])},getPerformanceMetrics(){performance.measure(Qp,u.bg.create,u.bg.load),performance.measure(ef,u.bg.create,u.bg.fullLoad);const Xe=performance.getEntriesByName(Qp)[0].duration,Wt=performance.getEntriesByName(ef)[0].duration,fr=Yp.length,_r=1/(Yp.reduce(((u,Xe)=>u+Xe),0)/fr/1e3),wr=Yp.filter((u=>u>Jp)).reduce(((u,Xe)=>u+(Xe-Jp)/Jp),0);return{loadTime:Xe,fullLoadTime:Wt,fps:_r,percentDroppedFrames:wr/(fr+wr)*100,totalFrames:fr}}};u.$=class extends ps{},u.A=Ld,u.B=Fu,u.C=function(u){if(null==io){const Xe=u.navigator?u.navigator.userAgent:null;io=!!u.safari||!(!Xe||!(/\b(iPad|iPhone|iPod)\b/.test(Xe)||Xe.match("Safari")&&!Xe.match("Chrome")))}return io},u.D=Ji,u.E=Z,u.F=class{constructor(u,Xe){this.target=u,this.mapId=Xe,this.resolveRejects={},this.tasks={},this.taskQueue=[],this.abortControllers={},this.messageHandlers={},this.invoker=new Ic((()=>this.process())),this.subscription=function(u,Xe,Wt){return u.addEventListener(Xe,Wt,!1),{unsubscribe:()=>{u.removeEventListener(Xe,Wt,!1)}}}(this.target,"message",(u=>this.receive(u))),this.globalScope=k(self)?u:window}registerMessageHandler(u,Xe){this.messageHandlers[u]=Xe}sendAsync(u,Xe){return new Promise(((Wt,fr)=>{const _r=Math.round(1e18*Math.random()).toString(36).substring(0,10);this.resolveRejects[_r]={resolve:Wt,reject:fr},Xe&&Xe.signal.addEventListener("abort",(()=>{delete this.resolveRejects[_r];const Xe={id:_r,type:"<cancel>",origin:location.origin,targetMapId:u.targetMapId,sourceMapId:this.mapId};this.target.postMessage(Xe)}),{once:!0});const wr=[],Ar=Object.assign(Object.assign({},u),{id:_r,sourceMapId:this.mapId,origin:location.origin,data:ki(u.data,wr)});this.target.postMessage(Ar,{transfer:wr})}))}receive(u){const Xe=u.data,Wt=Xe.id;if(!("file://"!==Xe.origin&&"file://"!==location.origin&&"resource://android"!==Xe.origin&&"resource://android"!==location.origin&&Xe.origin!==location.origin||Xe.targetMapId&&this.mapId!==Xe.targetMapId)){if("<cancel>"===Xe.type){delete this.tasks[Wt];const u=this.abortControllers[Wt];return delete this.abortControllers[Wt],void(u&&u.abort())}if(k(self)||Xe.mustQueue)return this.tasks[Wt]=Xe,this.taskQueue.push(Wt),void this.invoker.trigger();this.processTask(Wt,Xe)}}process(){if(0===this.taskQueue.length)return;const u=this.taskQueue.shift(),Xe=this.tasks[u];delete this.tasks[u],this.taskQueue.length>0&&this.invoker.trigger(),Xe&&this.processTask(u,Xe)}processTask(u,Xe){return e(this,void 0,void 0,(function*(){if("<response>"===Xe.type){const Wt=this.resolveRejects[u];if(delete this.resolveRejects[u],!Wt)return;return void(Xe.error?Wt.reject(Mi(Xe.error)):Wt.resolve(Mi(Xe.data)))}if(!this.messageHandlers[Xe.type])return void this.completeTask(u,new Error(`Could not find a registered handler for ${Xe.type}, map ID: ${this.mapId}, available handlers: ${Object.keys(this.messageHandlers).join(", ")}`));const Wt=Mi(Xe.data),fr=new AbortController;this.abortControllers[u]=fr;try{const _r=yield this.messageHandlers[Xe.type](Xe.sourceMapId,Wt,fr);this.completeTask(u,null,_r)}catch(Wt){this.completeTask(u,Wt)}}))}completeTask(u,Xe,Wt){const fr=[];delete this.abortControllers[u];const _r={id:u,type:"<response>",sourceMapId:this.mapId,origin:location.origin,error:Xe?ki(Xe):null,data:ki(Wt,fr)};this.target.postMessage(_r,{transfer:fr})}remove(){this.invoker.remove(),this.subscription.unsubscribe()}},u.G=go,u.H=function(){var u=new Ld(16);return Ld!=Float32Array&&(u[1]=0,u[2]=0,u[3]=0,u[4]=0,u[6]=0,u[7]=0,u[8]=0,u[9]=0,u[11]=0,u[12]=0,u[13]=0,u[14]=0),u[0]=1,u[5]=1,u[10]=1,u[15]=1,u},u.I=Tu,u.J=function(u,Xe,Wt){var fr,_r,wr,Ar,Kr,In,no,io,oo,ao,so,co,ho=Wt[0],go=Wt[1],xo=Wt[2];return Xe===u?(u[12]=Xe[0]*ho+Xe[4]*go+Xe[8]*xo+Xe[12],u[13]=Xe[1]*ho+Xe[5]*go+Xe[9]*xo+Xe[13],u[14]=Xe[2]*ho+Xe[6]*go+Xe[10]*xo+Xe[14],u[15]=Xe[3]*ho+Xe[7]*go+Xe[11]*xo+Xe[15]):(_r=Xe[1],wr=Xe[2],Ar=Xe[3],Kr=Xe[4],In=Xe[5],no=Xe[6],io=Xe[7],oo=Xe[8],ao=Xe[9],so=Xe[10],co=Xe[11],u[0]=fr=Xe[0],u[1]=_r,u[2]=wr,u[3]=Ar,u[4]=Kr,u[5]=In,u[6]=no,u[7]=io,u[8]=oo,u[9]=ao,u[10]=so,u[11]=co,u[12]=fr*ho+Kr*go+oo*xo+Xe[12],u[13]=_r*ho+In*go+ao*xo+Xe[13],u[14]=wr*ho+no*go+so*xo+Xe[14],u[15]=Ar*ho+io*go+co*xo+Xe[15]),u},u.K=function(u,Xe,Wt){var fr=Wt[0],_r=Wt[1],wr=Wt[2];return u[0]=Xe[0]*fr,u[1]=Xe[1]*fr,u[2]=Xe[2]*fr,u[3]=Xe[3]*fr,u[4]=Xe[4]*_r,u[5]=Xe[5]*_r,u[6]=Xe[6]*_r,u[7]=Xe[7]*_r,u[8]=Xe[8]*wr,u[9]=Xe[9]*wr,u[10]=Xe[10]*wr,u[11]=Xe[11]*wr,u[12]=Xe[12],u[13]=Xe[13],u[14]=Xe[14],u[15]=Xe[15],u},u.L=uo,u.M=function(u,Xe){const Wt={};for(let fr=0;fr<Xe.length;fr++){const _r=Xe[fr];_r in u&&(Wt[_r]=u[_r])}return Wt},u.N=Pc,u.O=Vc,u.P=Wt,u.Q=Ec,u.R=Ao,u.S=jc,u.T=Zi,u.U=h,u.V=p,u.W=P,u.X=Td,u.Y=ls,u.Z=$c,u._=e,u.a=ho,u.a$=function(u,Xe){var Wt=u[0],fr=u[1],_r=u[2],wr=u[3],Ar=u[4],Kr=u[5],In=u[6],no=u[7],io=u[8],oo=u[9],ao=u[10],so=u[11],co=u[12],ho=u[13],go=u[14],xo=u[15],ko=Xe[0],Co=Xe[1],Io=Xe[2],zo=Xe[3],Bo=Xe[4],ca=Xe[5],ua=Xe[6],Da=Xe[7],ns=Xe[8],yl=Xe[9],vl=Xe[10],kl=Xe[11],Al=Xe[12],Ml=Xe[13],Rl=Xe[14],Ol=Xe[15];return Math.abs(Wt-ko)<=Od*Math.max(1,Math.abs(Wt),Math.abs(ko))&&Math.abs(fr-Co)<=Od*Math.max(1,Math.abs(fr),Math.abs(Co))&&Math.abs(_r-Io)<=Od*Math.max(1,Math.abs(_r),Math.abs(Io))&&Math.abs(wr-zo)<=Od*Math.max(1,Math.abs(wr),Math.abs(zo))&&Math.abs(Ar-Bo)<=Od*Math.max(1,Math.abs(Ar),Math.abs(Bo))&&Math.abs(Kr-ca)<=Od*Math.max(1,Math.abs(Kr),Math.abs(ca))&&Math.abs(In-ua)<=Od*Math.max(1,Math.abs(In),Math.abs(ua))&&Math.abs(no-Da)<=Od*Math.max(1,Math.abs(no),Math.abs(Da))&&Math.abs(io-ns)<=Od*Math.max(1,Math.abs(io),Math.abs(ns))&&Math.abs(oo-yl)<=Od*Math.max(1,Math.abs(oo),Math.abs(yl))&&Math.abs(ao-vl)<=Od*Math.max(1,Math.abs(ao),Math.abs(vl))&&Math.abs(so-kl)<=Od*Math.max(1,Math.abs(so),Math.abs(kl))&&Math.abs(co-Al)<=Od*Math.max(1,Math.abs(co),Math.abs(Al))&&Math.abs(ho-Ml)<=Od*Math.max(1,Math.abs(ho),Math.abs(Ml))&&Math.abs(go-Rl)<=Od*Math.max(1,Math.abs(go),Math.abs(Rl))&&Math.abs(xo-Ol)<=Od*Math.max(1,Math.abs(xo),Math.abs(Ol))},u.a0=oa,u.a1=Dc,u.a2=it,u.a3=u=>{const Xe=window.document.createElement("video");return Xe.muted=!0,new Promise((Wt=>{Xe.onloadstart=()=>{Wt(Xe)};for(const Wt of u){const u=window.document.createElement("source");j(Wt)||(Xe.crossOrigin="Anonymous"),u.src=Wt,Xe.appendChild(u)}}))},u.a4=function(){return In++},u.a5=Fs,u.a6=dc,u.a7=zn,u.a8=ja,u.a9=Nc,u.aA=function(u){if("custom"===u.type)return new Mc(u);switch(u.type){case"background":return new _c(u);case"circle":return new fo(u);case"fill":return new ul(u);case"fill-extrusion":return new El(u);case"heatmap":return new Mo(u);case"hillshade":return new Po(u);case"line":return new Hl(u);case"raster":return new kc(u);case"symbol":return new vc(u)}},u.aB=w,u.aC=function(u,Xe){if(!u)return[{command:"setStyle",args:[Xe]}];let Wt=[];try{if(!H(u.version,Xe.version))return[{command:"setStyle",args:[Xe]}];H(u.center,Xe.center)||Wt.push({command:"setCenter",args:[Xe.center]}),H(u.zoom,Xe.zoom)||Wt.push({command:"setZoom",args:[Xe.zoom]}),H(u.bearing,Xe.bearing)||Wt.push({command:"setBearing",args:[Xe.bearing]}),H(u.pitch,Xe.pitch)||Wt.push({command:"setPitch",args:[Xe.pitch]}),H(u.sprite,Xe.sprite)||Wt.push({command:"setSprite",args:[Xe.sprite]}),H(u.glyphs,Xe.glyphs)||Wt.push({command:"setGlyphs",args:[Xe.glyphs]}),H(u.transition,Xe.transition)||Wt.push({command:"setTransition",args:[Xe.transition]}),H(u.light,Xe.light)||Wt.push({command:"setLight",args:[Xe.light]}),H(u.terrain,Xe.terrain)||Wt.push({command:"setTerrain",args:[Xe.terrain]}),H(u.sky,Xe.sky)||Wt.push({command:"setSky",args:[Xe.sky]}),H(u.projection,Xe.projection)||Wt.push({command:"setProjection",args:[Xe.projection]});const fr={},_r=[];!function(u,Xe,Wt,fr){let _r;for(_r in Xe=Xe||{},u=u||{})Object.prototype.hasOwnProperty.call(u,_r)&&(Object.prototype.hasOwnProperty.call(Xe,_r)||W(_r,Wt,fr));for(_r in Xe)Object.prototype.hasOwnProperty.call(Xe,_r)&&(Object.prototype.hasOwnProperty.call(u,_r)?H(u[_r],Xe[_r])||("geojson"===u[_r].type&&"geojson"===Xe[_r].type&&tt(u,Xe,_r)?Y(Wt,{command:"setGeoJSONSourceData",args:[_r,Xe[_r].data]}):Q(_r,Xe,Wt,fr)):J(_r,Xe,Wt))}(u.sources,Xe.sources,_r,fr);const wr=[];u.layers&&u.layers.forEach((u=>{"source"in u&&fr[u.source]?Wt.push({command:"removeLayer",args:[u.id]}):wr.push(u)})),Wt=Wt.concat(_r),function(u,Xe,Wt){Xe=Xe||[];const fr=(u=u||[]).map(rt),_r=Xe.map(rt),wr=u.reduce(nt,{}),Ar=Xe.reduce(nt,{}),Kr=fr.slice(),In=Object.create(null);let no,io,oo,ao,so;for(let u=0,Xe=0;u<fr.length;u++)no=fr[u],Object.prototype.hasOwnProperty.call(Ar,no)?Xe++:(Y(Wt,{command:"removeLayer",args:[no]}),Kr.splice(Kr.indexOf(no,Xe),1));for(let u=0,Xe=0;u<_r.length;u++)no=_r[_r.length-1-u],Kr[Kr.length-1-u]!==no&&(Object.prototype.hasOwnProperty.call(wr,no)?(Y(Wt,{command:"removeLayer",args:[no]}),Kr.splice(Kr.lastIndexOf(no,Kr.length-Xe),1)):Xe++,ao=Kr[Kr.length-u],Y(Wt,{command:"addLayer",args:[Ar[no],ao]}),Kr.splice(Kr.length-u,0,no),In[no]=!0);for(let u=0;u<_r.length;u++)if(no=_r[u],io=wr[no],oo=Ar[no],!In[no]&&!H(io,oo))if(H(io.source,oo.source)&&H(io["source-layer"],oo["source-layer"])&&H(io.type,oo.type)){for(so in et(io.layout,oo.layout,Wt,no,null,"setLayoutProperty"),et(io.paint,oo.paint,Wt,no,null,"setPaintProperty"),H(io.filter,oo.filter)||Y(Wt,{command:"setFilter",args:[no,oo.filter]}),H(io.minzoom,oo.minzoom)&&H(io.maxzoom,oo.maxzoom)||Y(Wt,{command:"setLayerZoomRange",args:[no,oo.minzoom,oo.maxzoom]}),io)Object.prototype.hasOwnProperty.call(io,so)&&"layout"!==so&&"paint"!==so&&"filter"!==so&&"metadata"!==so&&"minzoom"!==so&&"maxzoom"!==so&&(0===so.indexOf("paint.")?et(io[so],oo[so],Wt,no,so.slice(6),"setPaintProperty"):H(io[so],oo[so])||Y(Wt,{command:"setLayerProperty",args:[no,so,oo[so]]}));for(so in oo)Object.prototype.hasOwnProperty.call(oo,so)&&!Object.prototype.hasOwnProperty.call(io,so)&&"layout"!==so&&"paint"!==so&&"filter"!==so&&"metadata"!==so&&"minzoom"!==so&&"maxzoom"!==so&&(0===so.indexOf("paint.")?et(io[so],oo[so],Wt,no,so.slice(6),"setPaintProperty"):H(io[so],oo[so])||Y(Wt,{command:"setLayerProperty",args:[no,so,oo[so]]}))}else Y(Wt,{command:"removeLayer",args:[no]}),ao=Kr[Kr.lastIndexOf(no)+1],Y(Wt,{command:"addLayer",args:[oo,ao]})}(wr,Xe.layers,Wt)}catch(u){console.warn("Unable to compute style diff:",u),Wt=[{command:"setStyle",args:[Xe]}]}return Wt},u.aD=function(u){const Xe=[],Wt=u.id;return void 0===Wt&&Xe.push({message:`layers.${Wt}: missing required property "id"`}),void 0===u.render&&Xe.push({message:`layers.${Wt}: missing required method "render"`}),u.renderingMode&&"2d"!==u.renderingMode&&"3d"!==u.renderingMode&&Xe.push({message:`layers.${Wt}: property "renderingMode" must be either "2d" or "3d"`}),Xe},u.aE=function t(u,Xe){if(Array.isArray(u)){if(!Array.isArray(Xe)||u.length!==Xe.length)return!1;for(let Wt=0;Wt<u.length;Wt++)if(!t(u[Wt],Xe[Wt]))return!1;return!0}if("object"==typeof u&&null!==u&&null!==Xe){if("object"!=typeof Xe)return!1;if(Object.keys(u).length!==Object.keys(Xe).length)return!1;for(const Wt in u)if(!t(u[Wt],Xe[Wt]))return!1;return!0}return u===Xe},u.aF=v,u.aG=b,u.aH=class extends wa{constructor(u,Xe){super(u,Xe),this.current=0}set(u){this.current!==u&&(this.current=u,this.gl.uniform1i(this.location,u))}},u.aI=_a,u.aJ=class extends wa{constructor(u,Xe){super(u,Xe),this.current=Ad}set(u){if(u[12]!==this.current[12]||u[0]!==this.current[0])return this.current=u,void this.gl.uniformMatrix4fv(this.location,!1,u);for(let Xe=1;Xe<16;Xe++)if(u[Xe]!==this.current[Xe]){this.current=u,this.gl.uniformMatrix4fv(this.location,!1,u);break}}},u.aK=Aa,u.aL=Sa,u.aM=Kt,u.aN=class extends wa{constructor(u,Xe){super(u,Xe),this.current=[0,0,0]}set(u){u[0]===this.current[0]&&u[1]===this.current[1]&&u[2]===this.current[2]||(this.current=u,this.gl.uniform3f(this.location,u[0],u[1],u[2]))}},u.aO=class extends wa{constructor(u,Xe){super(u,Xe),this.current=[0,0]}set(u){u[0]===this.current[0]&&u[1]===this.current[1]||(this.current=u,this.gl.uniform2f(this.location,u[0],u[1]))}},u.aP=function(u,Xe,Wt,fr,_r,wr,Ar){var Kr=1/(Xe-Wt),In=1/(fr-_r),no=1/(wr-Ar);return u[0]=-2*Kr,u[1]=0,u[2]=0,u[3]=0,u[4]=0,u[5]=-2*In,u[6]=0,u[7]=0,u[8]=0,u[9]=0,u[10]=2*no,u[11]=0,u[12]=(Xe+Wt)*Kr,u[13]=(_r+fr)*In,u[14]=(Ar+wr)*no,u[15]=1,u},u.aQ=Fd,u.aR=class extends _s{},u.aS=fp,u.aT=class extends Ss{},u.aU=Vd,u.aV=function(u){return u<=1?1:Math.pow(2,Math.ceil(Math.log(u)/Math.LN2))},u.aW=So,u.aX=Zs,u.aY=na,u.aZ=class extends Bs{},u.a_=function(u,Xe){return u[0]===Xe[0]&&u[1]===Xe[1]&&u[2]===Xe[2]&&u[3]===Xe[3]&&u[4]===Xe[4]&&u[5]===Xe[5]&&u[6]===Xe[6]&&u[7]===Xe[7]&&u[8]===Xe[8]&&u[9]===Xe[9]&&u[10]===Xe[10]&&u[11]===Xe[11]&&u[12]===Xe[12]&&u[13]===Xe[13]&&u[14]===Xe[14]&&u[15]===Xe[15]},u.aa=function(u){const Xe={};if(u.replace(/(?:^|(?:\s*\,\s*))([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,((u,Wt,fr,_r)=>{const wr=fr||_r;return Xe[Wt]=!wr||wr.toLowerCase(),""})),Xe["max-age"]){const u=parseInt(Xe["max-age"],10);isNaN(u)?delete Xe["max-age"]:Xe["max-age"]=u}return Xe},u.ab=function(u,Xe){const Wt=[];for(const fr in u)fr in Xe||Wt.push(fr);return Wt},u.ac=y,u.ad=function(u,Xe,Wt){var fr=Math.sin(Wt),_r=Math.cos(Wt),wr=Xe[0],Ar=Xe[1],Kr=Xe[2],In=Xe[3],no=Xe[4],io=Xe[5],oo=Xe[6],ao=Xe[7];return Xe!==u&&(u[8]=Xe[8],u[9]=Xe[9],u[10]=Xe[10],u[11]=Xe[11],u[12]=Xe[12],u[13]=Xe[13],u[14]=Xe[14],u[15]=Xe[15]),u[0]=wr*_r+no*fr,u[1]=Ar*_r+io*fr,u[2]=Kr*_r+oo*fr,u[3]=In*_r+ao*fr,u[4]=no*_r-wr*fr,u[5]=io*_r-Ar*fr,u[6]=oo*_r-Kr*fr,u[7]=ao*_r-In*fr,u},u.ae=function(u){var Xe=new Ld(16);return Xe[0]=u[0],Xe[1]=u[1],Xe[2]=u[2],Xe[3]=u[3],Xe[4]=u[4],Xe[5]=u[5],Xe[6]=u[6],Xe[7]=u[7],Xe[8]=u[8],Xe[9]=u[9],Xe[10]=u[10],Xe[11]=u[11],Xe[12]=u[12],Xe[13]=u[13],Xe[14]=u[14],Xe[15]=u[15],Xe},u.af=po,u.ag=function(u,Xe){let Wt=0,fr=0;if("constant"===u.kind)fr=u.layoutSize;else if("source"!==u.kind){const{interpolationType:_r,minZoom:wr,maxZoom:Ar}=u,Kr=_r?y(Be.interpolationFactor(_r,Xe,wr,Ar),0,1):0;"camera"===u.kind?fr=rc.number(u.minSize,u.maxSize,Kr):Wt=Kr}return{uSizeT:Wt,uSize:fr}},u.ai=function(u,{uSize:Xe,uSizeT:Wt},{lowerSize:fr,upperSize:_r}){return"source"===u.kind?fr/Mp:"composite"===u.kind?rc.number(fr/Mp,_r/Mp,Wt):Xe},u.aj=cc,u.ak=function(u,Xe,fr,_r){const wr=Xe.y-u.y,Ar=Xe.x-u.x,Kr=_r.y-fr.y,In=_r.x-fr.x,no=Kr*Ar-In*wr;if(0===no)return null;const io=(In*(u.y-fr.y)-Kr*(u.x-fr.x))/no;return new Wt(u.x+io*Ar,u.y+io*wr)},u.al=Hc,u.am=qa,u.an=lo,u.ao=function(u){let Xe=1/0,Wt=1/0,fr=-1/0,_r=-1/0;for(const wr of u)Xe=Math.min(Xe,wr.x),Wt=Math.min(Wt,wr.y),fr=Math.max(fr,wr.x),_r=Math.max(_r,wr.y);return[Xe,Wt,fr,_r]},u.ap=gp,u.ar=ac,u.as=function(u,Xe){var Wt=Xe[0],fr=Xe[1],_r=Xe[2],wr=Xe[3],Ar=Xe[4],Kr=Xe[5],In=Xe[6],no=Xe[7],io=Xe[8],oo=Xe[9],ao=Xe[10],so=Xe[11],co=Xe[12],ho=Xe[13],go=Xe[14],xo=Xe[15],ko=Wt*Kr-fr*Ar,Co=Wt*In-_r*Ar,Io=Wt*no-wr*Ar,zo=fr*In-_r*Kr,Bo=fr*no-wr*Kr,ca=_r*no-wr*In,ua=io*ho-oo*co,Da=io*go-ao*co,ns=io*xo-so*co,yl=oo*go-ao*ho,vl=oo*xo-so*ho,kl=ao*xo-so*go,Al=ko*kl-Co*vl+Io*yl+zo*ns-Bo*Da+ca*ua;return Al?(u[0]=(Kr*kl-In*vl+no*yl)*(Al=1/Al),u[1]=(_r*vl-fr*kl-wr*yl)*Al,u[2]=(ho*ca-go*Bo+xo*zo)*Al,u[3]=(ao*Bo-oo*ca-so*zo)*Al,u[4]=(In*ns-Ar*kl-no*Da)*Al,u[5]=(Wt*kl-_r*ns+wr*Da)*Al,u[6]=(go*Io-co*ca-xo*Co)*Al,u[7]=(io*ca-ao*Io+so*Co)*Al,u[8]=(Ar*vl-Kr*ns+no*ua)*Al,u[9]=(fr*ns-Wt*vl-wr*ua)*Al,u[10]=(co*Bo-ho*Io+xo*ko)*Al,u[11]=(oo*Io-io*Bo-so*ko)*Al,u[12]=(Kr*Da-Ar*yl-In*ua)*Al,u[13]=(Wt*yl-fr*Da+_r*ua)*Al,u[14]=(ho*Co-co*zo-go*ko)*Al,u[15]=(io*zo-oo*Co+ao*ko)*Al,u):null},u.at=bh,u.au=Ju,u.av=Mh,u.aw=function(){const u={},Xe=xo.$version;for(const Wt in xo.$root){const fr=xo.$root[Wt];if(fr.required){let _r=null;_r="version"===Wt?Xe:"array"===fr.type?[]:{},null!=_r&&(u[Wt]=_r)}}return u},u.ax=Ii,u.ay=D,u.az=function(u){u=u.slice();const Xe=Object.create(null);for(let Wt=0;Wt<u.length;Wt++)Xe[u[Wt].id]=u[Wt];for(let Wt=0;Wt<u.length;Wt++)"ref"in u[Wt]&&(u[Wt]=X(u[Wt],Xe[u[Wt].ref]));return u},u.b=I,u.b0=function(u,Xe){return u[0]=Xe[0],u[1]=Xe[1],u[2]=Xe[2],u[3]=Xe[3],u[4]=Xe[4],u[5]=Xe[5],u[6]=Xe[6],u[7]=Xe[7],u[8]=Xe[8],u[9]=Xe[9],u[10]=Xe[10],u[11]=Xe[11],u[12]=Xe[12],u[13]=Xe[13],u[14]=Xe[14],u[15]=Xe[15],u},u.b1=function(u,Xe,Wt){return u[0]=Xe[0]*Wt[0],u[1]=Xe[1]*Wt[1],u[2]=Xe[2]*Wt[2],u[3]=Xe[3]*Wt[3],u},u.b2=function(u,Xe){return u[0]*Xe[0]+u[1]*Xe[1]+u[2]*Xe[2]+u[3]*Xe[3]},u.b3=m,u.b4=Oc,u.b5=Fc,u.b6=function(u,Xe,Wt,fr,_r){var wr,Ar=1/Math.tan(Xe/2);return u[0]=Ar/Wt,u[1]=0,u[2]=0,u[3]=0,u[4]=0,u[5]=Ar,u[6]=0,u[7]=0,u[8]=0,u[9]=0,u[11]=-1,u[12]=0,u[13]=0,u[15]=0,null!=_r&&_r!==1/0?(u[10]=(_r+fr)*(wr=1/(fr-_r)),u[14]=2*_r*fr*wr):(u[10]=-1,u[14]=-2*fr),u},u.b7=function(u,Xe,Wt){var fr=Math.sin(Wt),_r=Math.cos(Wt),wr=Xe[4],Ar=Xe[5],Kr=Xe[6],In=Xe[7],no=Xe[8],io=Xe[9],oo=Xe[10],ao=Xe[11];return Xe!==u&&(u[0]=Xe[0],u[1]=Xe[1],u[2]=Xe[2],u[3]=Xe[3],u[12]=Xe[12],u[13]=Xe[13],u[14]=Xe[14],u[15]=Xe[15]),u[4]=wr*_r+no*fr,u[5]=Ar*_r+io*fr,u[6]=Kr*_r+oo*fr,u[7]=In*_r+ao*fr,u[8]=no*_r-wr*fr,u[9]=io*_r-Ar*fr,u[10]=oo*_r-Kr*fr,u[11]=ao*_r-In*fr,u},u.b8=f,u.b9=Kr,u.bA=yp,u.bB=function(u){return u.message===co},u.bC=bn,u.bD=ld,u.ba=function(u){return u*Math.PI/180},u.bb=function(u,Xe){const{x:Wt,y:fr}=$c.fromLngLat(Xe);return!(u<0||u>25||fr<0||fr>=1||Wt<0||Wt>=1)},u.bc=function(u,Xe){return u[0]=Xe[0],u[1]=0,u[2]=0,u[3]=0,u[4]=0,u[5]=Xe[1],u[6]=0,u[7]=0,u[8]=0,u[9]=0,u[10]=Xe[2],u[11]=0,u[12]=0,u[13]=0,u[14]=0,u[15]=1,u},u.bd=class extends hs{},u.be=Up,u.bf=rf,u.bh=L,u.bi=function(u,Xe){ho.REGISTERED_PROTOCOLS[u]=Xe},u.bj=function(u){delete ho.REGISTERED_PROTOCOLS[u]},u.bk=function(u,Xe){const Wt={};for(let fr=0;fr<u.length;fr++){const _r=Xe&&Xe[u[fr].id]||Ln(u[fr]);Xe&&(Xe[u[fr].id]=_r);let wr=Wt[_r];wr||(wr=Wt[_r]=[]),wr.push(u[fr])}const fr=[];for(const u in Wt)fr.push(Wt[u]);return fr},u.bl=wi,u.bm=qc,u.bn=Zc,u.bo=$u,u.bp=function(Xe){Xe.bucket.createArrays(),Xe.bucket.tilePixelRatio=Td/(512*Xe.bucket.overscaling),Xe.bucket.compareText={},Xe.bucket.iconsNeedLinear=!1;const Wt=Xe.bucket.layers[0],fr=Wt.layout,_r=Wt._unevaluatedLayout._values,wr={layoutIconSize:_r["icon-size"].possiblyEvaluate(new Ui(Xe.bucket.zoom+1),Xe.canonical),layoutTextSize:_r["text-size"].possiblyEvaluate(new Ui(Xe.bucket.zoom+1),Xe.canonical),textMaxSize:_r["text-size"].possiblyEvaluate(new Ui(18))};if("composite"===Xe.bucket.textSizeData.kind){const{minZoom:u,maxZoom:Wt}=Xe.bucket.textSizeData;wr.compositeTextSizes=[_r["text-size"].possiblyEvaluate(new Ui(u),Xe.canonical),_r["text-size"].possiblyEvaluate(new Ui(Wt),Xe.canonical)]}if("composite"===Xe.bucket.iconSizeData.kind){const{minZoom:u,maxZoom:Wt}=Xe.bucket.iconSizeData;wr.compositeIconSizes=[_r["icon-size"].possiblyEvaluate(new Ui(u),Xe.canonical),_r["icon-size"].possiblyEvaluate(new Ui(Wt),Xe.canonical)]}const Ar=fr.get("text-line-height")*gp,Kr="viewport"!==fr.get("text-rotation-alignment")&&"point"!==fr.get("symbol-placement"),In=fr.get("text-keep-upright"),no=fr.get("text-size");for(const _r of Xe.bucket.features){const io=fr.get("text-font").evaluate(_r,{},Xe.canonical).join(","),oo=no.evaluate(_r,{},Xe.canonical),ao=wr.layoutTextSize.evaluate(_r,{},Xe.canonical),so=wr.layoutIconSize.evaluate(_r,{},Xe.canonical),co={horizontal:{},vertical:void 0},ho=_r.text;let go,xo=[0,0];if(ho){const wr=ho.toString(),no=fr.get("text-letter-spacing").evaluate(_r,{},Xe.canonical)*gp,so=Ci(wr)?no:0,go=fr.get("text-anchor").evaluate(_r,{},Xe.canonical),ko=vh(Wt,_r,Xe.canonical);if(!ko){const u=fr.get("text-radial-offset").evaluate(_r,{},Xe.canonical);xo=u?xh(go,[u*gp,Hp]):fr.get("text-offset").evaluate(_r,{},Xe.canonical).map((u=>u*gp))}let Co=Kr?"center":fr.get("text-justify").evaluate(_r,{},Xe.canonical);const Io="point"===fr.get("symbol-placement")?fr.get("text-max-width").evaluate(_r,{},Xe.canonical)*gp:1/0,w=()=>{Xe.bucket.allowVerticalPlacement&&Pi(wr)&&(co.vertical=Ru(ho,Xe.glyphMap,Xe.glyphPositions,Xe.imagePositions,io,Io,Ar,go,"left",so,xo,u.ah.vertical,!0,ao,oo))};if(!Kr&&ko){const Wt=new Set;if("auto"===Co)for(let u=0;u<ko.values.length;u+=2)Wt.add(bh(ko.values[u]));else Wt.add(Co);let fr=!1;for(const _r of Wt)if(!co.horizontal[_r])if(fr)co.horizontal[_r]=co.horizontal[0];else{const Wt=Ru(ho,Xe.glyphMap,Xe.glyphPositions,Xe.imagePositions,io,Io,Ar,"center",_r,so,xo,u.ah.horizontal,!1,ao,oo);Wt&&(co.horizontal[_r]=Wt,fr=1===Wt.positionedLines.length)}w()}else{"auto"===Co&&(Co=bh(go));const Wt=Ru(ho,Xe.glyphMap,Xe.glyphPositions,Xe.imagePositions,io,Io,Ar,go,Co,so,xo,u.ah.horizontal,!1,ao,oo);Wt&&(co.horizontal[Co]=Wt),w(),Pi(wr)&&Kr&&In&&(co.vertical=Ru(ho,Xe.glyphMap,Xe.glyphPositions,Xe.imagePositions,io,Io,Ar,go,Co,so,xo,u.ah.vertical,!1,ao,oo))}}let ko=!1;if(_r.icon&&_r.icon.name){const u=Xe.imageMap[_r.icon.name];u&&(go=Qu(Xe.imagePositions[_r.icon.name],fr.get("icon-offset").evaluate(_r,{},Xe.canonical),fr.get("icon-anchor").evaluate(_r,{},Xe.canonical)),ko=!!u.sdf,void 0===Xe.bucket.sdfIcons?Xe.bucket.sdfIcons=ko:Xe.bucket.sdfIcons!==ko&&A("Style sheet warning: Cannot mix SDF and non-SDF icons in one buffer"),(u.pixelRatio!==Xe.bucket.pixelRatio||0!==fr.get("icon-rotate").constantOr(1))&&(Xe.bucket.iconsNeedLinear=!0))}const Co=Ah(co.horizontal)||co.vertical;Xe.bucket.iconsInText=!!Co&&Co.iconsInText,(Co||go)&&wh(Xe.bucket,_r,co,go,Xe.imageMap,wr,ao,so,xo,ko,Xe.canonical)}Xe.showCollisionBoxes&&Xe.bucket.generateCollisionDebugBuffers()},u.bq=ql,u.br=sl,u.bs=zl,u.bt=Qd,u.bu=xp,u.bv=class{constructor(u){this._marks={start:[u.url,"start"].join("#"),end:[u.url,"end"].join("#"),measure:u.url.toString()},performance.mark(this._marks.start)}finish(){performance.mark(this._marks.end);let u=performance.getEntriesByName(this._marks.measure);return 0===u.length&&(performance.measure(this._marks.measure,this._marks.start,this._marks.end),u=performance.getEntriesByName(this._marks.measure),performance.clearMarks(this._marks.start),performance.clearMarks(this._marks.end),performance.clearMeasures(this._marks.measure)),u}},u.bw=function(u,Xe,Wt,fr,_r){return e(this,void 0,void 0,(function*(){if(p())try{return yield P(u,Xe,Wt,fr,_r)}catch(u){}return function(u,Xe,Wt,fr,_r){const wr=u.width,Ar=u.height;ao&&so||(ao=new OffscreenCanvas(wr,Ar),so=ao.getContext("2d",{willReadFrequently:!0})),ao.width=wr,ao.height=Ar,so.drawImage(u,0,0,wr,Ar);const Kr=so.getImageData(Xe,Wt,fr,_r);return so.clearRect(0,0,wr,Ar),Kr.data}(u,Xe,Wt,fr,_r)}))},u.bx=Uc,u.by=r,u.bz=Xe,u.c=E,u.d=u=>e(void 0,void 0,void 0,(function*(){if(0===u.byteLength)return createImageBitmap(new ImageData(1,1));const Xe=new Blob([new Uint8Array(u)],{type:"image/png"});try{return createImageBitmap(Xe)}catch(u){throw new Error(`Could not load image because of ${u.message}. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported.`)}})),u.e=g,u.f=u=>new Promise(((Xe,Wt)=>{const fr=new Image;fr.onload=()=>{Xe(fr),URL.revokeObjectURL(fr.src),fr.onload=null,window.requestAnimationFrame((()=>{fr.src=oo}))},fr.onerror=()=>Wt(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 _r=new Blob([new Uint8Array(u)],{type:"image/png"});fr.src=u.byteLength?URL.createObjectURL(_r):oo})),u.g=T,u.h=(u,Xe)=>O(g(u,{type:"json"}),Xe),u.i=k,u.j=N,u.k=q,u.l=(u,Xe)=>O(g(u,{type:"arrayBuffer"}),Xe),u.m=O,u.n=function(u){return new xp(u).readFields(Pu,[])},u.o=_o,u.p=Eu,u.q=rs,u.r=Du,u.s=j,u.t=xi,u.u=Lu,u.v=xo,u.w=A,u.x=function([u,Xe,Wt]){return Xe+=90,Xe*=Math.PI/180,Wt*=Math.PI/180,{x:u*Math.cos(Xe)*Math.sin(Wt),y:u*Math.sin(Xe)*Math.sin(Wt),z:u*Math.cos(Wt)}},u.y=rc,u.z=Ui})),define("worker",["./shared"],(function(u){class t{constructor(u){this.keyCache={},u&&this.replace(u)}replace(u){this._layerConfigs={},this._layers={},this.update(u,[])}update(Xe,Wt){for(const Wt of Xe){this._layerConfigs[Wt.id]=Wt;const Xe=this._layers[Wt.id]=u.aA(Wt);Xe._featureFilter=u.a7(Xe.filter),this.keyCache[Wt.id]&&delete this.keyCache[Wt.id]}for(const u of Wt)delete this.keyCache[u],delete this._layerConfigs[u],delete this._layers[u];this.familiesBySource={};const fr=u.bk(Object.values(this._layerConfigs),this.keyCache);for(const u of fr){const Xe=u.map((u=>this._layers[u.id])),Wt=Xe[0];if("none"===Wt.visibility)continue;const fr=Wt.source||"";let _r=this.familiesBySource[fr];_r||(_r=this.familiesBySource[fr]={});const wr=Wt.sourceLayer||"_geojsonTileLayer";let Ar=_r[wr];Ar||(Ar=_r[wr]=[]),Ar.push(Xe)}}}class o{constructor(Xe){const Wt={},fr=[];for(const u in Xe){const _r=Xe[u],wr=Wt[u]={};for(const u in _r){const Xe=_r[+u];if(!Xe||0===Xe.bitmap.width||0===Xe.bitmap.height)continue;const Wt={x:0,y:0,w:Xe.bitmap.width+2,h:Xe.bitmap.height+2};fr.push(Wt),wr[u]={rect:Wt,metrics:Xe.metrics}}}const{w:_r,h:wr}=u.p(fr),Ar=new u.o({width:_r||1,height:wr||1});for(const fr in Xe){const _r=Xe[fr];for(const Xe in _r){const wr=_r[+Xe];if(!wr||0===wr.bitmap.width||0===wr.bitmap.height)continue;const Kr=Wt[fr][Xe].rect;u.o.copy(wr.bitmap,Ar,{x:0,y:0},{x:Kr.x+1,y:Kr.y+1},wr.bitmap)}}this.image=Ar,this.positions=Wt}}u.bl("GlyphAtlas",o);class i{constructor(Xe){this.tileID=new u.S(Xe.tileID.overscaledZ,Xe.tileID.wrap,Xe.tileID.canonical.z,Xe.tileID.canonical.x,Xe.tileID.canonical.y),this.uid=Xe.uid,this.zoom=Xe.zoom,this.pixelRatio=Xe.pixelRatio,this.tileSize=Xe.tileSize,this.source=Xe.source,this.overscaling=this.tileID.overscaleFactor(),this.showCollisionBoxes=Xe.showCollisionBoxes,this.collectResourceTiming=!!Xe.collectResourceTiming,this.returnDependencies=!!Xe.returnDependencies,this.promoteId=Xe.promoteId,this.inFlightDependencies=[]}parse(Xe,Wt,fr,_r){return u._(this,void 0,void 0,(function*(){this.status="parsing",this.data=Xe,this.collisionBoxArray=new u.a5;const wr=new u.bm(Object.keys(Xe.layers).sort()),Ar=new u.bn(this.tileID,this.promoteId);Ar.bucketLayerIDs=[];const Kr={},In={featureIndex:Ar,iconDependencies:{},patternDependencies:{},glyphDependencies:{},availableImages:fr},no=Wt.familiesBySource[this.source];for(const Wt in no){const _r=Xe.layers[Wt];if(!_r)continue;1===_r.version&&u.w(`Vector tile source "${this.source}" layer "${Wt}" does not use vector tile spec v2 and therefore may have some rendering errors.`);const io=wr.encode(Wt),oo=[];for(let u=0;u<_r.length;u++){const Xe=_r.feature(u),fr=Ar.getId(Xe,Wt);oo.push({feature:Xe,id:fr,index:u,sourceLayerIndex:io})}for(const Xe of no[Wt]){const Wt=Xe[0];Wt.source!==this.source&&u.w(`layer.source = ${Wt.source} does not equal this.source = ${this.source}`),Wt.minzoom&&this.zoom<Math.floor(Wt.minzoom)||Wt.maxzoom&&this.zoom>=Wt.maxzoom||"none"!==Wt.visibility&&(s(Xe,this.zoom,fr),(Kr[Wt.id]=Wt.createBucket({index:Ar.bucketLayerIDs.length,layers:Xe,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:io,sourceID:this.source})).populate(oo,In,this.tileID.canonical),Ar.bucketLayerIDs.push(Xe.map((u=>u.id))))}}const io=u.aF(In.glyphDependencies,(u=>Object.keys(u).map(Number)));this.inFlightDependencies.forEach((u=>null==u?void 0:u.abort())),this.inFlightDependencies=[];let oo=Promise.resolve({});if(Object.keys(io).length){const u=new AbortController;this.inFlightDependencies.push(u),oo=_r.sendAsync({type:"GG",data:{stacks:io,source:this.source,tileID:this.tileID,type:"glyphs"}},u)}const ao=Object.keys(In.iconDependencies);let so=Promise.resolve({});if(ao.length){const u=new AbortController;this.inFlightDependencies.push(u),so=_r.sendAsync({type:"GI",data:{icons:ao,source:this.source,tileID:this.tileID,type:"icons"}},u)}const co=Object.keys(In.patternDependencies);let ho=Promise.resolve({});if(co.length){const u=new AbortController;this.inFlightDependencies.push(u),ho=_r.sendAsync({type:"GI",data:{icons:co,source:this.source,tileID:this.tileID,type:"patterns"}},u)}const[go,xo,ko]=yield Promise.all([oo,so,ho]),Co=new o(go),Io=new u.bo(xo,ko);for(const Xe in Kr){const Wt=Kr[Xe];Wt instanceof u.a6?(s(Wt.layers,this.zoom,fr),u.bp({bucket:Wt,glyphMap:go,glyphPositions:Co.positions,imageMap:xo,imagePositions:Io.iconPositions,showCollisionBoxes:this.showCollisionBoxes,canonical:this.tileID.canonical})):Wt.hasPattern&&(Wt instanceof u.bq||Wt instanceof u.br||Wt instanceof u.bs)&&(s(Wt.layers,this.zoom,fr),Wt.addFeatures(In,this.tileID.canonical,Io.patternPositions))}return this.status="done",{buckets:Object.values(Kr).filter((u=>!u.isEmpty())),featureIndex:Ar,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:Co.image,imageAtlas:Io,glyphMap:this.returnDependencies?go:null,iconMap:this.returnDependencies?xo:null,glyphPositions:this.returnDependencies?Co.positions:null}}))}}function s(Xe,Wt,fr){const _r=new u.z(Wt);for(const u of Xe)u.recalculate(_r,fr)}class r{constructor(u,Xe,Wt){this.actor=u,this.layerIndex=Xe,this.availableImages=Wt,this.fetching={},this.loading={},this.loaded={}}loadVectorTile(Xe,Wt){return u._(this,void 0,void 0,(function*(){const fr=yield u.l(Xe.request,Wt);try{return{vectorTile:new u.bt.VectorTile(new u.bu(fr.data)),rawData:fr.data,cacheControl:fr.cacheControl,expires:fr.expires}}catch(u){const Wt=new Uint8Array(fr.data);let _r=`Unable to parse the tile at ${Xe.request.url}, `;throw _r+=31===Wt[0]&&139===Wt[1]?"please make sure the data is not gzipped and that you have configured the relevant header in the server":`got error: ${u.message}`,new Error(_r)}}))}loadTile(Xe){return u._(this,void 0,void 0,(function*(){const Wt=Xe.uid,fr=!!(Xe&&Xe.request&&Xe.request.collectResourceTiming)&&new u.bv(Xe.request),_r=new i(Xe);this.loading[Wt]=_r;const wr=new AbortController;_r.abort=wr;try{const Ar=yield this.loadVectorTile(Xe,wr);if(delete this.loading[Wt],!Ar)return null;const Kr=Ar.rawData,In={};Ar.expires&&(In.expires=Ar.expires),Ar.cacheControl&&(In.cacheControl=Ar.cacheControl);const no={};if(fr){const u=fr.finish();u&&(no.resourceTiming=JSON.parse(JSON.stringify(u)))}_r.vectorTile=Ar.vectorTile;const io=_r.parse(Ar.vectorTile,this.layerIndex,this.availableImages,this.actor);this.loaded[Wt]=_r,this.fetching[Wt]={rawTileData:Kr,cacheControl:In,resourceTiming:no};try{const Xe=yield io;return u.e({rawTileData:Kr.slice(0)},Xe,In,no)}finally{delete this.fetching[Wt]}}catch(u){throw delete this.loading[Wt],_r.status="done",this.loaded[Wt]=_r,u}}))}reloadTile(Xe){return u._(this,void 0,void 0,(function*(){const Wt=Xe.uid;if(!this.loaded||!this.loaded[Wt])throw new Error("Should not be trying to reload a tile that was never loaded or has been removed");const fr=this.loaded[Wt];if(fr.showCollisionBoxes=Xe.showCollisionBoxes,"parsing"===fr.status){const Xe=yield fr.parse(fr.vectorTile,this.layerIndex,this.availableImages,this.actor);let _r;if(this.fetching[Wt]){const{rawTileData:fr,cacheControl:wr,resourceTiming:Ar}=this.fetching[Wt];delete this.fetching[Wt],_r=u.e({rawTileData:fr.slice(0)},Xe,wr,Ar)}else _r=Xe;return _r}if("done"===fr.status&&fr.vectorTile)return fr.parse(fr.vectorTile,this.layerIndex,this.availableImages,this.actor)}))}abortTile(Xe){return u._(this,void 0,void 0,(function*(){const u=this.loading,Wt=Xe.uid;u&&u[Wt]&&u[Wt].abort&&(u[Wt].abort.abort(),delete u[Wt])}))}removeTile(Xe){return u._(this,void 0,void 0,(function*(){this.loaded&&this.loaded[Xe.uid]&&delete this.loaded[Xe.uid]}))}}class n{constructor(){this.loaded={}}loadTile(Xe){return u._(this,void 0,void 0,(function*(){const{uid:Wt,encoding:fr,rawImageData:_r,redFactor:wr,greenFactor:Ar,blueFactor:Kr,baseShift:In}=Xe,no=_r.width+2,io=_r.height+2,oo=u.b(_r)?new u.R({width:no,height:io},yield u.bw(_r,-1,-1,no,io)):_r,ao=new u.bx(Wt,oo,fr,wr,Ar,Kr,In);return this.loaded=this.loaded||{},this.loaded[Wt]=ao,ao}))}removeTile(u){const Xe=this.loaded,Wt=u.uid;Xe&&Xe[Wt]&&delete Xe[Wt]}}function a(u,Xe){if(0!==u.length){l(u[0],Xe);for(var Wt=1;Wt<u.length;Wt++)l(u[Wt],!Xe)}}function l(u,Xe){for(var Wt=0,fr=0,_r=0,wr=u.length,Ar=wr-1;_r<wr;Ar=_r++){var Kr=(u[_r][0]-u[Ar][0])*(u[Ar][1]+u[_r][1]),In=Wt+Kr;fr+=Math.abs(Wt)>=Math.abs(Kr)?Wt-In+Kr:Kr-In+Wt,Wt=In}Wt+fr>=0!=!!Xe&&u.reverse()}var Xe=u.by((function e(u,Xe){var Wt,fr=u&&u.type;if("FeatureCollection"===fr)for(Wt=0;Wt<u.features.length;Wt++)e(u.features[Wt],Xe);else if("GeometryCollection"===fr)for(Wt=0;Wt<u.geometries.length;Wt++)e(u.geometries[Wt],Xe);else if("Feature"===fr)e(u.geometry,Xe);else if("Polygon"===fr)a(u.coordinates,Xe);else if("MultiPolygon"===fr)for(Wt=0;Wt<u.coordinates.length;Wt++)a(u.coordinates[Wt],Xe);return u}));const Wt=u.bt.VectorTileFeature.prototype.toGeoJSON;var fr={exports:{}},_r=u.bz,wr=u.bt.VectorTileFeature,Ar=p;function p(u,Xe){this.options=Xe||{},this.features=u,this.length=u.length}function m(u,Xe){this.id="number"==typeof u.id?u.id:void 0,this.type=u.type,this.rawGeometry=1===u.type?[u.geometry]:u.geometry,this.properties=u.tags,this.extent=Xe||4096}p.prototype.feature=function(u){return new m(this.features[u],this.options.extent)},m.prototype.loadGeometry=function(){var u=this.rawGeometry;this.geometry=[];for(var Xe=0;Xe<u.length;Xe++){for(var Wt=u[Xe],fr=[],wr=0;wr<Wt.length;wr++)fr.push(new _r(Wt[wr][0],Wt[wr][1]));this.geometry.push(fr)}return this.geometry},m.prototype.bbox=function(){this.geometry||this.loadGeometry();for(var u=this.geometry,Xe=1/0,Wt=-1/0,fr=1/0,_r=-1/0,wr=0;wr<u.length;wr++)for(var Ar=u[wr],Kr=0;Kr<Ar.length;Kr++){var In=Ar[Kr];Xe=Math.min(Xe,In.x),Wt=Math.max(Wt,In.x),fr=Math.min(fr,In.y),_r=Math.max(_r,In.y)}return[Xe,fr,Wt,_r]},m.prototype.toGeoJSON=wr.prototype.toGeoJSON;var Kr=u.bA,In=Ar;function w(u){var Xe=new Kr;return function(u,Xe){for(var Wt in u.layers)Xe.writeMessage(3,x,u.layers[Wt])}(u,Xe),Xe.finish()}function x(u,Xe){var Wt;Xe.writeVarintField(15,u.version||1),Xe.writeStringField(1,u.name||""),Xe.writeVarintField(5,u.extent||4096);var fr={keys:[],values:[],keycache:{},valuecache:{}};for(Wt=0;Wt<u.length;Wt++)fr.feature=u.feature(Wt),Xe.writeMessage(2,b,fr);var _r=fr.keys;for(Wt=0;Wt<_r.length;Wt++)Xe.writeStringField(3,_r[Wt]);var wr=fr.values;for(Wt=0;Wt<wr.length;Wt++)Xe.writeMessage(4,P,wr[Wt])}function b(u,Xe){var Wt=u.feature;void 0!==Wt.id&&Xe.writeVarintField(1,Wt.id),Xe.writeMessage(2,S,u),Xe.writeVarintField(3,Wt.type),Xe.writeMessage(4,I,Wt)}function S(u,Xe){var Wt=u.feature,fr=u.keys,_r=u.values,wr=u.keycache,Ar=u.valuecache;for(var Kr in Wt.properties){var In=Wt.properties[Kr],no=wr[Kr];if(null!==In){void 0===no&&(fr.push(Kr),wr[Kr]=no=fr.length-1),Xe.writeVarint(no);var io=typeof In;"string"!==io&&"boolean"!==io&&"number"!==io&&(In=JSON.stringify(In));var oo=io+":"+In,ao=Ar[oo];void 0===ao&&(_r.push(In),Ar[oo]=ao=_r.length-1),Xe.writeVarint(ao)}}}function _(u,Xe){return(Xe<<3)+(7&u)}function M(u){return u<<1^u>>31}function I(u,Xe){for(var Wt=u.loadGeometry(),fr=u.type,_r=0,wr=0,Ar=Wt.length,Kr=0;Kr<Ar;Kr++){var In=Wt[Kr],no=1;1===fr&&(no=In.length),Xe.writeVarint(_(1,no));for(var io=3===fr?In.length-1:In.length,oo=0;oo<io;oo++){1===oo&&1!==fr&&Xe.writeVarint(_(2,io-1));var ao=In[oo].x-_r,so=In[oo].y-wr;Xe.writeVarint(M(ao)),Xe.writeVarint(M(so)),_r+=ao,wr+=so}3===fr&&Xe.writeVarint(_(7,1))}}function P(u,Xe){var Wt=typeof u;"string"===Wt?Xe.writeStringField(1,u):"boolean"===Wt?Xe.writeBooleanField(7,u):"number"===Wt&&(u%1!=0?Xe.writeDoubleField(3,u):u<0?Xe.writeSVarintField(6,u):Xe.writeVarintField(5,u))}fr.exports=w,fr.exports.fromVectorTileJs=w,fr.exports.fromGeojsonVt=function(u,Xe){Xe=Xe||{};var Wt={};for(var fr in u)Wt[fr]=new In(u[fr].features,Xe),Wt[fr].name=fr,Wt[fr].version=Xe.version,Wt[fr].extent=Xe.extent;return w({layers:Wt})},fr.exports.GeoJSONWrapper=In;var no=u.by(fr.exports);const io={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:u=>u},oo=Math.fround||(ao=new Float32Array(1),u=>(ao[0]=+u,ao[0]));var ao;const so=3,co=5,ho=6;class z{constructor(u){this.options=Object.assign(Object.create(io),u),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(u){const{log:Xe,minZoom:Wt,maxZoom:fr}=this.options;Xe&&console.time("total time");const _r=`prepare ${u.length} points`;Xe&&console.time(_r),this.points=u;const wr=[];for(let Xe=0;Xe<u.length;Xe++){const Wt=u[Xe];if(!Wt.geometry)continue;const[fr,_r]=Wt.geometry.coordinates,Ar=oo(G(fr)),Kr=oo(j(_r));wr.push(Ar,Kr,1/0,Xe,-1,1),this.options.reduce&&wr.push(0)}let Ar=this.trees[fr+1]=this._createTree(wr);Xe&&console.timeEnd(_r);for(let u=fr;u>=Wt;u--){const Wt=+Date.now();Ar=this.trees[u]=this._createTree(this._cluster(Ar,u)),Xe&&console.log("z%d: %d clusters in %dms",u,Ar.numItems,+Date.now()-Wt)}return Xe&&console.timeEnd("total time"),this}getClusters(u,Xe){let Wt=((u[0]+180)%360+360)%360-180;const fr=Math.max(-90,Math.min(90,u[1]));let _r=180===u[2]?180:((u[2]+180)%360+360)%360-180;const wr=Math.max(-90,Math.min(90,u[3]));if(u[2]-u[0]>=360)Wt=-180,_r=180;else if(Wt>_r){const u=this.getClusters([Wt,fr,180,wr],Xe),Ar=this.getClusters([-180,fr,_r,wr],Xe);return u.concat(Ar)}const Ar=this.trees[this._limitZoom(Xe)],Kr=Ar.range(G(Wt),j(wr),G(_r),j(fr)),In=Ar.data,no=[];for(const u of Kr){const Xe=this.stride*u;no.push(In[Xe+co]>1?A(In,Xe,this.clusterProps):this.points[In[Xe+so]])}return no}getChildren(u){const Xe=this._getOriginId(u),Wt=this._getOriginZoom(u),fr="No cluster with the specified id.",_r=this.trees[Wt];if(!_r)throw new Error(fr);const wr=_r.data;if(Xe*this.stride>=wr.length)throw new Error(fr);const Ar=this.options.radius/(this.options.extent*Math.pow(2,Wt-1)),Kr=_r.within(wr[Xe*this.stride],wr[Xe*this.stride+1],Ar),In=[];for(const Xe of Kr){const Wt=Xe*this.stride;wr[Wt+4]===u&&In.push(wr[Wt+co]>1?A(wr,Wt,this.clusterProps):this.points[wr[Wt+so]])}if(0===In.length)throw new Error(fr);return In}getLeaves(u,Xe,Wt){const fr=[];return this._appendLeaves(fr,u,Xe=Xe||10,Wt=Wt||0,0),fr}getTile(u,Xe,Wt){const fr=this.trees[this._limitZoom(u)],_r=Math.pow(2,u),{extent:wr,radius:Ar}=this.options,Kr=Ar/wr,In=(Wt-Kr)/_r,no=(Wt+1+Kr)/_r,io={features:[]};return this._addTileFeatures(fr.range((Xe-Kr)/_r,In,(Xe+1+Kr)/_r,no),fr.data,Xe,Wt,_r,io),0===Xe&&this._addTileFeatures(fr.range(1-Kr/_r,In,1,no),fr.data,_r,Wt,_r,io),Xe===_r-1&&this._addTileFeatures(fr.range(0,In,Kr/_r,no),fr.data,-1,Wt,_r,io),io.features.length?io:null}getClusterExpansionZoom(u){let Xe=this._getOriginZoom(u)-1;for(;Xe<=this.options.maxZoom;){const Wt=this.getChildren(u);if(Xe++,1!==Wt.length)break;u=Wt[0].properties.cluster_id}return Xe}_appendLeaves(u,Xe,Wt,fr,_r){const wr=this.getChildren(Xe);for(const Xe of wr){const wr=Xe.properties;if(wr&&wr.cluster?_r+wr.point_count<=fr?_r+=wr.point_count:_r=this._appendLeaves(u,wr.cluster_id,Wt,fr,_r):_r<fr?_r++:u.push(Xe),u.length===Wt)break}return _r}_createTree(Xe){const Wt=new u.av(Xe.length/this.stride|0,this.options.nodeSize,Float32Array);for(let u=0;u<Xe.length;u+=this.stride)Wt.add(Xe[u],Xe[u+1]);return Wt.finish(),Wt.data=Xe,Wt}_addTileFeatures(u,Xe,Wt,fr,_r,wr){for(const Ar of u){const u=Ar*this.stride,Kr=Xe[u+co]>1;let In,no,io;if(Kr)In=E(Xe,u,this.clusterProps),no=Xe[u],io=Xe[u+1];else{const Wt=this.points[Xe[u+so]];In=Wt.properties;const[fr,_r]=Wt.geometry.coordinates;no=G(fr),io=j(_r)}const oo={type:1,geometry:[[Math.round(this.options.extent*(no*_r-Wt)),Math.round(this.options.extent*(io*_r-fr))]],tags:In};let ao;ao=Kr||this.options.generateId?Xe[u+so]:this.points[Xe[u+so]].id,void 0!==ao&&(oo.id=ao),wr.features.push(oo)}}_limitZoom(u){return Math.max(this.options.minZoom,Math.min(Math.floor(+u),this.options.maxZoom+1))}_cluster(u,Xe){const{radius:Wt,extent:fr,reduce:_r,minPoints:wr}=this.options,Ar=Wt/(fr*Math.pow(2,Xe)),Kr=u.data,In=[],no=this.stride;for(let Wt=0;Wt<Kr.length;Wt+=no){if(Kr[Wt+2]<=Xe)continue;Kr[Wt+2]=Xe;const fr=Kr[Wt],io=Kr[Wt+1],oo=u.within(Kr[Wt],Kr[Wt+1],Ar),ao=Kr[Wt+co];let so=ao;for(const u of oo){const Wt=u*no;Kr[Wt+2]>Xe&&(so+=Kr[Wt+co])}if(so>ao&&so>=wr){let u,wr=fr*ao,Ar=io*ao,ho=-1;const go=(Wt/no<<5)+(Xe+1)+this.points.length;for(const fr of oo){const In=fr*no;if(Kr[In+2]<=Xe)continue;Kr[In+2]=Xe;const io=Kr[In+co];wr+=Kr[In]*io,Ar+=Kr[In+1]*io,Kr[In+4]=go,_r&&(u||(u=this._map(Kr,Wt,!0),ho=this.clusterProps.length,this.clusterProps.push(u)),_r(u,this._map(Kr,In)))}Kr[Wt+4]=go,In.push(wr/so,Ar/so,1/0,go,-1,so),_r&&In.push(ho)}else{for(let u=0;u<no;u++)In.push(Kr[Wt+u]);if(so>1)for(const u of oo){const Wt=u*no;if(!(Kr[Wt+2]<=Xe)){Kr[Wt+2]=Xe;for(let u=0;u<no;u++)In.push(Kr[Wt+u])}}}}return In}_getOriginId(u){return u-this.points.length>>5}_getOriginZoom(u){return(u-this.points.length)%32}_map(u,Xe,Wt){if(u[Xe+co]>1){const fr=this.clusterProps[u[Xe+ho]];return Wt?Object.assign({},fr):fr}const fr=this.points[u[Xe+so]].properties,_r=this.options.map(fr);return Wt&&_r===fr?Object.assign({},_r):_r}}function A(u,Xe,Wt){return{type:"Feature",id:u[Xe+so],properties:E(u,Xe,Wt),geometry:{type:"Point",coordinates:[(fr=u[Xe],360*(fr-.5)),R(u[Xe+1])]}};var fr}function E(u,Xe,Wt){const fr=u[Xe+co],_r=fr>=1e4?`${Math.round(fr/1e3)}k`:fr>=1e3?Math.round(fr/100)/10+"k":fr,wr=u[Xe+ho],Ar=-1===wr?{}:Object.assign({},Wt[wr]);return Object.assign(Ar,{cluster:!0,cluster_id:u[Xe+so],point_count:fr,point_count_abbreviated:_r})}function G(u){return u/360+.5}function j(u){const Xe=Math.sin(u*Math.PI/180),Wt=.5-.25*Math.log((1+Xe)/(1-Xe))/Math.PI;return Wt<0?0:Wt>1?1:Wt}function R(u){const Xe=(180-360*u)*Math.PI/180;return 360*Math.atan(Math.exp(Xe))/Math.PI-90}function Z(u,Xe,Wt,fr){let _r=fr;const wr=Xe+(Wt-Xe>>1);let Ar,Kr=Wt-Xe;const In=u[Xe],no=u[Xe+1],io=u[Wt],oo=u[Wt+1];for(let fr=Xe+3;fr<Wt;fr+=3){const Xe=N(u[fr],u[fr+1],In,no,io,oo);if(Xe>_r)Ar=fr,_r=Xe;else if(Xe===_r){const u=Math.abs(fr-wr);u<Kr&&(Ar=fr,Kr=u)}}_r>fr&&(Ar-Xe>3&&Z(u,Xe,Ar,fr),u[Ar+2]=_r,Wt-Ar>3&&Z(u,Ar,Wt,fr))}function N(u,Xe,Wt,fr,_r,wr){let Ar=_r-Wt,Kr=wr-fr;if(0!==Ar||0!==Kr){const In=((u-Wt)*Ar+(Xe-fr)*Kr)/(Ar*Ar+Kr*Kr);In>1?(Wt=_r,fr=wr):In>0&&(Wt+=Ar*In,fr+=Kr*In)}return Ar=u-Wt,Kr=Xe-fr,Ar*Ar+Kr*Kr}function J(u,Xe,Wt,fr){const _r={id:null==u?null:u,type:Xe,geometry:Wt,tags:fr,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};if("Point"===Xe||"MultiPoint"===Xe||"LineString"===Xe)W(_r,Wt);else if("Polygon"===Xe)W(_r,Wt[0]);else if("MultiLineString"===Xe)for(const u of Wt)W(_r,u);else if("MultiPolygon"===Xe)for(const u of Wt)W(_r,u[0]);return _r}function W(u,Xe){for(let Wt=0;Wt<Xe.length;Wt+=3)u.minX=Math.min(u.minX,Xe[Wt]),u.minY=Math.min(u.minY,Xe[Wt+1]),u.maxX=Math.max(u.maxX,Xe[Wt]),u.maxY=Math.max(u.maxY,Xe[Wt+1])}function Y(u,Xe,Wt,fr){if(!Xe.geometry)return;const _r=Xe.geometry.coordinates;if(_r&&0===_r.length)return;const wr=Xe.geometry.type,Ar=Math.pow(Wt.tolerance/((1<<Wt.maxZoom)*Wt.extent),2);let Kr=[],In=Xe.id;if(Wt.promoteId?In=Xe.properties[Wt.promoteId]:Wt.generateId&&(In=fr||0),"Point"===wr)V(_r,Kr);else if("MultiPoint"===wr)for(const u of _r)V(u,Kr);else if("LineString"===wr)X(_r,Kr,Ar,!1);else if("MultiLineString"===wr){if(Wt.lineMetrics){for(const Wt of _r)Kr=[],X(Wt,Kr,Ar,!1),u.push(J(In,"LineString",Kr,Xe.properties));return}q(_r,Kr,Ar,!1)}else if("Polygon"===wr)q(_r,Kr,Ar,!0);else{if("MultiPolygon"!==wr){if("GeometryCollection"===wr){for(const _r of Xe.geometry.geometries)Y(u,{id:In,geometry:_r,properties:Xe.properties},Wt,fr);return}throw new Error("Input data is not a valid GeoJSON object.")}for(const u of _r){const Xe=[];q(u,Xe,Ar,!0),Kr.push(Xe)}}u.push(J(In,wr,Kr,Xe.properties))}function V(u,Xe){Xe.push(H(u[0]),B(u[1]),0)}function X(u,Xe,Wt,fr){let _r,wr,Ar=0;for(let Wt=0;Wt<u.length;Wt++){const Kr=H(u[Wt][0]),In=B(u[Wt][1]);Xe.push(Kr,In,0),Wt>0&&(Ar+=fr?(_r*In-Kr*wr)/2:Math.sqrt(Math.pow(Kr-_r,2)+Math.pow(In-wr,2))),_r=Kr,wr=In}const Kr=Xe.length-3;Xe[2]=1,Z(Xe,0,Kr,Wt),Xe[Kr+2]=1,Xe.size=Math.abs(Ar),Xe.start=0,Xe.end=Xe.size}function q(u,Xe,Wt,fr){for(let _r=0;_r<u.length;_r++){const wr=[];X(u[_r],wr,Wt,fr),Xe.push(wr)}}function H(u){return u/360+.5}function B(u){const Xe=Math.sin(u*Math.PI/180),Wt=.5-.25*Math.log((1+Xe)/(1-Xe))/Math.PI;return Wt<0?0:Wt>1?1:Wt}function U(u,Xe,Wt,fr,_r,wr,Ar,Kr){if(fr/=Xe,wr>=(Wt/=Xe)&&Ar<fr)return u;if(Ar<Wt||wr>=fr)return null;const In=[];for(const Xe of u){const u=Xe.geometry;let wr=Xe.type;const Ar=0===_r?Xe.minX:Xe.minY,no=0===_r?Xe.maxX:Xe.maxY;if(Ar>=Wt&&no<fr){In.push(Xe);continue}if(no<Wt||Ar>=fr)continue;let io=[];if("Point"===wr||"MultiPoint"===wr)$(u,io,Wt,fr,_r);else if("LineString"===wr)K(u,io,Wt,fr,_r,!1,Kr.lineMetrics);else if("MultiLineString"===wr)ee(u,io,Wt,fr,_r,!1);else if("Polygon"===wr)ee(u,io,Wt,fr,_r,!0);else if("MultiPolygon"===wr)for(const Xe of u){const u=[];ee(Xe,u,Wt,fr,_r,!0),u.length&&io.push(u)}if(io.length){if(Kr.lineMetrics&&"LineString"===wr){for(const u of io)In.push(J(Xe.id,wr,u,Xe.tags));continue}"LineString"!==wr&&"MultiLineString"!==wr||(1===io.length?(wr="LineString",io=io[0]):wr="MultiLineString"),"Point"!==wr&&"MultiPoint"!==wr||(wr=3===io.length?"Point":"MultiPoint"),In.push(J(Xe.id,wr,io,Xe.tags))}}return In.length?In:null}function $(u,Xe,Wt,fr,_r){for(let wr=0;wr<u.length;wr+=3){const Ar=u[wr+_r];Ar>=Wt&&Ar<=fr&&te(Xe,u[wr],u[wr+1],u[wr+2])}}function K(u,Xe,Wt,fr,_r,wr,Ar){let Kr=Q(u);const In=0===_r?oe:ie;let no,io,oo=u.start;for(let ao=0;ao<u.length-3;ao+=3){const so=u[ao],co=u[ao+1],ho=u[ao+2],go=u[ao+3],xo=u[ao+4],ko=0===_r?so:co,Co=0===_r?go:xo;let Io=!1;Ar&&(no=Math.sqrt(Math.pow(so-go,2)+Math.pow(co-xo,2))),ko<Wt?Co>Wt&&(io=In(Kr,so,co,go,xo,Wt),Ar&&(Kr.start=oo+no*io)):ko>fr?Co<fr&&(io=In(Kr,so,co,go,xo,fr),Ar&&(Kr.start=oo+no*io)):te(Kr,so,co,ho),Co<Wt&&ko>=Wt&&(io=In(Kr,so,co,go,xo,Wt),Io=!0),Co>fr&&ko<=fr&&(io=In(Kr,so,co,go,xo,fr),Io=!0),!wr&&Io&&(Ar&&(Kr.end=oo+no*io),Xe.push(Kr),Kr=Q(u)),Ar&&(oo+=no)}let ao=u.length-3;const so=u[ao],co=u[ao+1],ho=0===_r?so:co;ho>=Wt&&ho<=fr&&te(Kr,so,co,u[ao+2]),ao=Kr.length-3,wr&&ao>=3&&(Kr[ao]!==Kr[0]||Kr[ao+1]!==Kr[1])&&te(Kr,Kr[0],Kr[1],Kr[2]),Kr.length&&Xe.push(Kr)}function Q(u){const Xe=[];return Xe.size=u.size,Xe.start=u.start,Xe.end=u.end,Xe}function ee(u,Xe,Wt,fr,_r,wr){for(const Ar of u)K(Ar,Xe,Wt,fr,_r,wr,!1)}function te(u,Xe,Wt,fr){u.push(Xe,Wt,fr)}function oe(u,Xe,Wt,fr,_r,wr){const Ar=(wr-Xe)/(fr-Xe);return te(u,wr,Wt+(_r-Wt)*Ar,1),Ar}function ie(u,Xe,Wt,fr,_r,wr){const Ar=(wr-Wt)/(_r-Wt);return te(u,Xe+(fr-Xe)*Ar,wr,1),Ar}function se(u,Xe){const Wt=[];for(let fr=0;fr<u.length;fr++){const _r=u[fr],wr=_r.type;let Ar;if("Point"===wr||"MultiPoint"===wr||"LineString"===wr)Ar=re(_r.geometry,Xe);else if("MultiLineString"===wr||"Polygon"===wr){Ar=[];for(const u of _r.geometry)Ar.push(re(u,Xe))}else if("MultiPolygon"===wr){Ar=[];for(const u of _r.geometry){const Wt=[];for(const fr of u)Wt.push(re(fr,Xe));Ar.push(Wt)}}Wt.push(J(_r.id,wr,Ar,_r.tags))}return Wt}function re(u,Xe){const Wt=[];Wt.size=u.size,void 0!==u.start&&(Wt.start=u.start,Wt.end=u.end);for(let fr=0;fr<u.length;fr+=3)Wt.push(u[fr]+Xe,u[fr+1],u[fr+2]);return Wt}function ne(u,Xe){if(u.transformed)return u;const Wt=1<<u.z,fr=u.x,_r=u.y;for(const wr of u.features){const u=wr.geometry,Ar=wr.type;if(wr.geometry=[],1===Ar)for(let Ar=0;Ar<u.length;Ar+=2)wr.geometry.push(ae(u[Ar],u[Ar+1],Xe,Wt,fr,_r));else for(let Ar=0;Ar<u.length;Ar++){const Kr=[];for(let wr=0;wr<u[Ar].length;wr+=2)Kr.push(ae(u[Ar][wr],u[Ar][wr+1],Xe,Wt,fr,_r));wr.geometry.push(Kr)}}return u.transformed=!0,u}function ae(u,Xe,Wt,fr,_r,wr){return[Math.round(Wt*(u*fr-_r)),Math.round(Wt*(Xe*fr-wr))]}function le(u,Xe,Wt,fr,_r){const wr=Xe===_r.maxZoom?0:_r.tolerance/((1<<Xe)*_r.extent),Ar={features:[],numPoints:0,numSimplified:0,numFeatures:u.length,source:null,x:Wt,y:fr,z:Xe,transformed:!1,minX:2,minY:1,maxX:-1,maxY:0};for(const Xe of u)ce(Ar,Xe,wr,_r);return Ar}function ce(u,Xe,Wt,fr){const _r=Xe.geometry,wr=Xe.type,Ar=[];if(u.minX=Math.min(u.minX,Xe.minX),u.minY=Math.min(u.minY,Xe.minY),u.maxX=Math.max(u.maxX,Xe.maxX),u.maxY=Math.max(u.maxY,Xe.maxY),"Point"===wr||"MultiPoint"===wr)for(let Xe=0;Xe<_r.length;Xe+=3)Ar.push(_r[Xe],_r[Xe+1]),u.numPoints++,u.numSimplified++;else if("LineString"===wr)ue(Ar,_r,u,Wt,!1,!1);else if("MultiLineString"===wr||"Polygon"===wr)for(let Xe=0;Xe<_r.length;Xe++)ue(Ar,_r[Xe],u,Wt,"Polygon"===wr,0===Xe);else if("MultiPolygon"===wr)for(let Xe=0;Xe<_r.length;Xe++){const fr=_r[Xe];for(let Xe=0;Xe<fr.length;Xe++)ue(Ar,fr[Xe],u,Wt,!0,0===Xe)}if(Ar.length){let Wt=Xe.tags||null;if("LineString"===wr&&fr.lineMetrics){Wt={};for(const u in Xe.tags)Wt[u]=Xe.tags[u];Wt.mapbox_clip_start=_r.start/_r.size,Wt.mapbox_clip_end=_r.end/_r.size}const Kr={geometry:Ar,type:"Polygon"===wr||"MultiPolygon"===wr?3:"LineString"===wr||"MultiLineString"===wr?2:1,tags:Wt};null!==Xe.id&&(Kr.id=Xe.id),u.features.push(Kr)}}function ue(u,Xe,Wt,fr,_r,wr){const Ar=fr*fr;if(fr>0&&Xe.size<(_r?Ar:fr))return void(Wt.numPoints+=Xe.length/3);const Kr=[];for(let u=0;u<Xe.length;u+=3)(0===fr||Xe[u+2]>Ar)&&(Wt.numSimplified++,Kr.push(Xe[u],Xe[u+1])),Wt.numPoints++;_r&&function(u,Xe){let Wt=0;for(let Xe=0,fr=u.length,_r=fr-2;Xe<fr;_r=Xe,Xe+=2)Wt+=(u[Xe]-u[_r])*(u[Xe+1]+u[_r+1]);if(Wt>0===Xe)for(let Xe=0,Wt=u.length;Xe<Wt/2;Xe+=2){const fr=u[Xe],_r=u[Xe+1];u[Xe]=u[Wt-2-Xe],u[Xe+1]=u[Wt-1-Xe],u[Wt-2-Xe]=fr,u[Wt-1-Xe]=_r}}(Kr,wr),u.push(Kr)}const go={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,promoteId:null,generateId:!1,debug:0};class de{constructor(u,Xe){const Wt=(Xe=this.options=function(u,Xe){for(const Wt in Xe)u[Wt]=Xe[Wt];return u}(Object.create(go),Xe)).debug;if(Wt&&console.time("preprocess data"),Xe.maxZoom<0||Xe.maxZoom>24)throw new Error("maxZoom should be in the 0-24 range");if(Xe.promoteId&&Xe.generateId)throw new Error("promoteId and generateId cannot be used together.");let fr=function(u,Xe){const Wt=[];if("FeatureCollection"===u.type)for(let fr=0;fr<u.features.length;fr++)Y(Wt,u.features[fr],Xe,fr);else Y(Wt,"Feature"===u.type?u:{geometry:u},Xe);return Wt}(u,Xe);this.tiles={},this.tileCoords=[],Wt&&(console.timeEnd("preprocess data"),console.log("index: maxZoom: %d, maxPoints: %d",Xe.indexMaxZoom,Xe.indexMaxPoints),console.time("generate tiles"),this.stats={},this.total=0),fr=function(u,Xe){const Wt=Xe.buffer/Xe.extent;let fr=u;const _r=U(u,1,-1-Wt,Wt,0,-1,2,Xe),wr=U(u,1,1-Wt,2+Wt,0,-1,2,Xe);return(_r||wr)&&(fr=U(u,1,-Wt,1+Wt,0,-1,2,Xe)||[],_r&&(fr=se(_r,1).concat(fr)),wr&&(fr=fr.concat(se(wr,-1)))),fr}(fr,Xe),fr.length&&this.splitTile(fr,0,0,0),Wt&&(fr.length&&console.log("features: %d, points: %d",this.tiles[0].numFeatures,this.tiles[0].numPoints),console.timeEnd("generate tiles"),console.log("tiles generated:",this.total,JSON.stringify(this.stats)))}splitTile(u,Xe,Wt,fr,_r,wr,Ar){const Kr=[u,Xe,Wt,fr],In=this.options,no=In.debug;for(;Kr.length;){fr=Kr.pop(),Wt=Kr.pop(),Xe=Kr.pop(),u=Kr.pop();const io=1<<Xe,oo=fe(Xe,Wt,fr);let ao=this.tiles[oo];if(!ao&&(no>1&&console.time("creation"),ao=this.tiles[oo]=le(u,Xe,Wt,fr,In),this.tileCoords.push({z:Xe,x:Wt,y:fr}),no)){no>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",Xe,Wt,fr,ao.numFeatures,ao.numPoints,ao.numSimplified),console.timeEnd("creation"));const u=`z${Xe}`;this.stats[u]=(this.stats[u]||0)+1,this.total++}if(ao.source=u,null==_r){if(Xe===In.indexMaxZoom||ao.numPoints<=In.indexMaxPoints)continue}else{if(Xe===In.maxZoom||Xe===_r)continue;if(null!=_r){const u=_r-Xe;if(Wt!==wr>>u||fr!==Ar>>u)continue}}if(ao.source=null,0===u.length)continue;no>1&&console.time("clipping");const so=.5*In.buffer/In.extent,co=.5-so,ho=.5+so,go=1+so;let xo=null,ko=null,Co=null,Io=null,zo=U(u,io,Wt-so,Wt+ho,0,ao.minX,ao.maxX,In),Bo=U(u,io,Wt+co,Wt+go,0,ao.minX,ao.maxX,In);u=null,zo&&(xo=U(zo,io,fr-so,fr+ho,1,ao.minY,ao.maxY,In),ko=U(zo,io,fr+co,fr+go,1,ao.minY,ao.maxY,In),zo=null),Bo&&(Co=U(Bo,io,fr-so,fr+ho,1,ao.minY,ao.maxY,In),Io=U(Bo,io,fr+co,fr+go,1,ao.minY,ao.maxY,In),Bo=null),no>1&&console.timeEnd("clipping"),Kr.push(xo||[],Xe+1,2*Wt,2*fr),Kr.push(ko||[],Xe+1,2*Wt,2*fr+1),Kr.push(Co||[],Xe+1,2*Wt+1,2*fr),Kr.push(Io||[],Xe+1,2*Wt+1,2*fr+1)}}getTile(u,Xe,Wt){u=+u,Xe=+Xe,Wt=+Wt;const fr=this.options,{extent:_r,debug:wr}=fr;if(u<0||u>24)return null;const Ar=1<<u,Kr=fe(u,Xe=Xe+Ar&Ar-1,Wt);if(this.tiles[Kr])return ne(this.tiles[Kr],_r);wr>1&&console.log("drilling down to z%d-%d-%d",u,Xe,Wt);let In,no=u,io=Xe,oo=Wt;for(;!In&&no>0;)no--,io>>=1,oo>>=1,In=this.tiles[fe(no,io,oo)];return In&&In.source?(wr>1&&(console.log("found parent tile z%d-%d-%d",no,io,oo),console.time("drilling down")),this.splitTile(In.source,no,io,oo,u,Xe,Wt),wr>1&&console.timeEnd("drilling down"),this.tiles[Kr]?ne(this.tiles[Kr],_r):null):null}}function fe(u,Xe,Wt){return 32*((1<<u)*Wt+Xe)+u}function ge(u,Xe){return Xe?u.properties[Xe]:u.id}function pe(u,Xe){if(null==u)return!0;if("Feature"===u.type)return null!=ge(u,Xe);if("FeatureCollection"===u.type){const Wt=new Set;for(const fr of u.features){const u=ge(fr,Xe);if(null==u)return!1;if(Wt.has(u))return!1;Wt.add(u)}return!0}return!1}function me(u,Xe){const Wt=new Map;if(null==u);else if("Feature"===u.type)Wt.set(ge(u,Xe),u);else for(const fr of u.features)Wt.set(ge(fr,Xe),fr);return Wt}class ye extends r{constructor(){super(...arguments),this._dataUpdateable=new Map}loadVectorTile(Xe,fr){return u._(this,void 0,void 0,(function*(){const fr=Xe.tileID.canonical;if(!this._geoJSONIndex)throw new Error("Unable to parse the data into a cluster or geojson");const _r=this._geoJSONIndex.getTile(fr.z,fr.x,fr.y);if(!_r)return null;const wr=new class{constructor(Xe){this.layers={_geojsonTileLayer:this},this.name="_geojsonTileLayer",this.extent=u.X,this.length=Xe.length,this._features=Xe}feature(Xe){return new class{constructor(Xe){this._feature=Xe,this.extent=u.X,this.type=Xe.type,this.properties=Xe.tags,"id"in Xe&&!isNaN(Xe.id)&&(this.id=parseInt(Xe.id,10))}loadGeometry(){if(1===this._feature.type){const Xe=[];for(const Wt of this._feature.geometry)Xe.push([new u.P(Wt[0],Wt[1])]);return Xe}{const Xe=[];for(const Wt of this._feature.geometry){const fr=[];for(const Xe of Wt)fr.push(new u.P(Xe[0],Xe[1]));Xe.push(fr)}return Xe}}toGeoJSON(u,Xe,fr){return Wt.call(this,u,Xe,fr)}}(this._features[Xe])}}(_r.features);let Ar=no(wr);return 0===Ar.byteOffset&&Ar.byteLength===Ar.buffer.byteLength||(Ar=new Uint8Array(Ar)),{vectorTile:wr,rawData:Ar.buffer}}))}loadData(Xe){return u._(this,void 0,void 0,(function*(){var Wt;null===(Wt=this._pendingRequest)||void 0===Wt||Wt.abort();const fr=!!(Xe&&Xe.request&&Xe.request.collectResourceTiming)&&new u.bv(Xe.request);this._pendingRequest=new AbortController;try{this._pendingData=this.loadAndProcessGeoJSON(Xe,this._pendingRequest),this._geoJSONIndex=Xe.cluster?new z(function({superclusterOptions:Xe,clusterProperties:Wt}){if(!Wt||!Xe)return Xe;const fr={},_r={},wr={accumulated:null,zoom:0},Ar={properties:null},Kr=Object.keys(Wt);for(const Xe of Kr){const[wr,Ar]=Wt[Xe],Kr=u.bC(Ar),In=u.bC("string"==typeof wr?[wr,["accumulated"],["get",Xe]]:wr);fr[Xe]=Kr.value,_r[Xe]=In.value}return Xe.map=u=>{Ar.properties=u;const Xe={};for(const u of Kr)Xe[u]=fr[u].evaluate(wr,Ar);return Xe},Xe.reduce=(u,Xe)=>{Ar.properties=Xe;for(const Xe of Kr)wr.accumulated=u[Xe],u[Xe]=_r[Xe].evaluate(wr,Ar)},Xe}(Xe)).load((yield this._pendingData).features):(_r=yield this._pendingData,new de(_r,Xe.geojsonVtOptions)),this.loaded={};const Wt={};if(fr){const u=fr.finish();u&&(Wt.resourceTiming={},Wt.resourceTiming[Xe.source]=JSON.parse(JSON.stringify(u)))}return Wt}catch(Xe){if(delete this._pendingRequest,u.bB(Xe))return{abandoned:!0};throw Xe}var _r}))}getData(){return u._(this,void 0,void 0,(function*(){return this._pendingData}))}reloadTile(u){const Xe=this.loaded;return Xe&&Xe[u.uid]?super.reloadTile(u):this.loadTile(u)}loadAndProcessGeoJSON(Wt,fr){return u._(this,void 0,void 0,(function*(){let _r=yield this.loadGeoJSON(Wt,fr);if(delete this._pendingRequest,"object"!=typeof _r)throw new Error(`Input data given to '${Wt.source}' is not a valid GeoJSON object.`);if(Xe(_r,!0),Wt.filter){const Xe=u.bC(Wt.filter,{type:"boolean","property-type":"data-driven",overridable:!1,transition:!1});if("error"===Xe.result)throw new Error(Xe.value.map((u=>`${u.key}: ${u.message}`)).join(", "));const fr=_r.features.filter((u=>Xe.value.evaluate({zoom:0},u)));_r={type:"FeatureCollection",features:fr}}return _r}))}loadGeoJSON(Xe,Wt){return u._(this,void 0,void 0,(function*(){const{promoteId:fr}=Xe;if(Xe.request){const _r=yield u.h(Xe.request,Wt);return this._dataUpdateable=pe(_r.data,fr)?me(_r.data,fr):void 0,_r.data}if("string"==typeof Xe.data)try{const u=JSON.parse(Xe.data);return this._dataUpdateable=pe(u,fr)?me(u,fr):void 0,u}catch(u){throw new Error(`Input data given to '${Xe.source}' is not a valid GeoJSON object.`)}if(!Xe.dataDiff)throw new Error(`Input data given to '${Xe.source}' is not a valid GeoJSON object.`);if(!this._dataUpdateable)throw new Error(`Cannot update existing geojson data in ${Xe.source}`);return function(u,Xe,Wt){var fr,_r,wr,Ar;if(Xe.removeAll&&u.clear(),Xe.remove)for(const Wt of Xe.remove)u.delete(Wt);if(Xe.add)for(const fr of Xe.add){const Xe=ge(fr,Wt);null!=Xe&&u.set(Xe,fr)}if(Xe.update)for(const Wt of Xe.update){let Xe=u.get(Wt.id);if(null==Xe)continue;const Kr=!Wt.removeAllProperties&&((null===(fr=Wt.removeProperties)||void 0===fr?void 0:fr.length)>0||(null===(_r=Wt.addOrUpdateProperties)||void 0===_r?void 0:_r.length)>0);if((Wt.newGeometry||Wt.removeAllProperties||Kr)&&(Xe=Object.assign({},Xe),u.set(Wt.id,Xe),Kr&&(Xe.properties=Object.assign({},Xe.properties))),Wt.newGeometry&&(Xe.geometry=Wt.newGeometry),Wt.removeAllProperties)Xe.properties={};else if((null===(wr=Wt.removeProperties)||void 0===wr?void 0:wr.length)>0)for(const u of Wt.removeProperties)Object.prototype.hasOwnProperty.call(Xe.properties,u)&&delete Xe.properties[u];if((null===(Ar=Wt.addOrUpdateProperties)||void 0===Ar?void 0:Ar.length)>0)for(const{key:u,value:fr}of Wt.addOrUpdateProperties)Xe.properties[u]=fr}}(this._dataUpdateable,Xe.dataDiff,fr),{type:"FeatureCollection",features:Array.from(this._dataUpdateable.values())}}))}removeSource(Xe){return u._(this,void 0,void 0,(function*(){this._pendingRequest&&this._pendingRequest.abort()}))}getClusterExpansionZoom(u){return this._geoJSONIndex.getClusterExpansionZoom(u.clusterId)}getClusterChildren(u){return this._geoJSONIndex.getChildren(u.clusterId)}getClusterLeaves(u){return this._geoJSONIndex.getLeaves(u.clusterId,u.limit,u.offset)}}class ve{constructor(Xe){this.self=Xe,this.actor=new u.F(Xe),this.layerIndexes={},this.availableImages={},this.workerSources={},this.demWorkerSources={},this.externalWorkerSourceTypes={},this.self.registerWorkerSource=(u,Xe)=>{if(this.externalWorkerSourceTypes[u])throw new Error(`Worker source with name "${u}" already registered.`);this.externalWorkerSourceTypes[u]=Xe},this.self.addProtocol=u.bi,this.self.removeProtocol=u.bj,this.self.registerRTLTextPlugin=Xe=>{if(u.bD.isParsed())throw new Error("RTL text plugin already registered.");u.bD.setMethods(Xe)},this.actor.registerMessageHandler("LDT",((u,Xe)=>this._getDEMWorkerSource(u,Xe.source).loadTile(Xe))),this.actor.registerMessageHandler("RDT",((Xe,Wt)=>u._(this,void 0,void 0,(function*(){this._getDEMWorkerSource(Xe,Wt.source).removeTile(Wt)})))),this.actor.registerMessageHandler("GCEZ",((Xe,Wt)=>u._(this,void 0,void 0,(function*(){return this._getWorkerSource(Xe,Wt.type,Wt.source).getClusterExpansionZoom(Wt)})))),this.actor.registerMessageHandler("GCC",((Xe,Wt)=>u._(this,void 0,void 0,(function*(){return this._getWorkerSource(Xe,Wt.type,Wt.source).getClusterChildren(Wt)})))),this.actor.registerMessageHandler("GCL",((Xe,Wt)=>u._(this,void 0,void 0,(function*(){return this._getWorkerSource(Xe,Wt.type,Wt.source).getClusterLeaves(Wt)})))),this.actor.registerMessageHandler("LD",((u,Xe)=>this._getWorkerSource(u,Xe.type,Xe.source).loadData(Xe))),this.actor.registerMessageHandler("GD",((u,Xe)=>this._getWorkerSource(u,Xe.type,Xe.source).getData())),this.actor.registerMessageHandler("LT",((u,Xe)=>this._getWorkerSource(u,Xe.type,Xe.source).loadTile(Xe))),this.actor.registerMessageHandler("RT",((u,Xe)=>this._getWorkerSource(u,Xe.type,Xe.source).reloadTile(Xe))),this.actor.registerMessageHandler("AT",((u,Xe)=>this._getWorkerSource(u,Xe.type,Xe.source).abortTile(Xe))),this.actor.registerMessageHandler("RMT",((u,Xe)=>this._getWorkerSource(u,Xe.type,Xe.source).removeTile(Xe))),this.actor.registerMessageHandler("RS",((Xe,Wt)=>u._(this,void 0,void 0,(function*(){if(!this.workerSources[Xe]||!this.workerSources[Xe][Wt.type]||!this.workerSources[Xe][Wt.type][Wt.source])return;const u=this.workerSources[Xe][Wt.type][Wt.source];delete this.workerSources[Xe][Wt.type][Wt.source],void 0!==u.removeSource&&u.removeSource(Wt)})))),this.actor.registerMessageHandler("RM",(Xe=>u._(this,void 0,void 0,(function*(){delete this.layerIndexes[Xe],delete this.availableImages[Xe],delete this.workerSources[Xe],delete this.demWorkerSources[Xe]})))),this.actor.registerMessageHandler("SR",((Xe,Wt)=>u._(this,void 0,void 0,(function*(){this.referrer=Wt})))),this.actor.registerMessageHandler("SRPS",((u,Xe)=>this._syncRTLPluginState(u,Xe))),this.actor.registerMessageHandler("IS",((Xe,Wt)=>u._(this,void 0,void 0,(function*(){this.self.importScripts(Wt)})))),this.actor.registerMessageHandler("SI",((u,Xe)=>this._setImages(u,Xe))),this.actor.registerMessageHandler("UL",((Xe,Wt)=>u._(this,void 0,void 0,(function*(){this._getLayerIndex(Xe).update(Wt.layers,Wt.removedIds)})))),this.actor.registerMessageHandler("SL",((Xe,Wt)=>u._(this,void 0,void 0,(function*(){this._getLayerIndex(Xe).replace(Wt)}))))}_setImages(Xe,Wt){return u._(this,void 0,void 0,(function*(){this.availableImages[Xe]=Wt;for(const u in this.workerSources[Xe]){const fr=this.workerSources[Xe][u];for(const u in fr)fr[u].availableImages=Wt}}))}_syncRTLPluginState(Xe,Wt){return u._(this,void 0,void 0,(function*(){if(u.bD.isParsed())return u.bD.getState();if("loading"!==Wt.pluginStatus)return u.bD.setState(Wt),Wt;const Xe=Wt.pluginURL;if(this.self.importScripts(Xe),u.bD.isParsed()){const Wt={pluginStatus:"loaded",pluginURL:Xe};return u.bD.setState(Wt),Wt}throw u.bD.setState({pluginStatus:"error",pluginURL:""}),new Error(`RTL Text Plugin failed to import scripts from ${Xe}`)}))}_getAvailableImages(u){let Xe=this.availableImages[u];return Xe||(Xe=[]),Xe}_getLayerIndex(u){let Xe=this.layerIndexes[u];return Xe||(Xe=this.layerIndexes[u]=new t),Xe}_getWorkerSource(u,Xe,Wt){if(this.workerSources[u]||(this.workerSources[u]={}),this.workerSources[u][Xe]||(this.workerSources[u][Xe]={}),!this.workerSources[u][Xe][Wt]){const fr={sendAsync:(Xe,Wt)=>(Xe.targetMapId=u,this.actor.sendAsync(Xe,Wt))};switch(Xe){case"vector":this.workerSources[u][Xe][Wt]=new r(fr,this._getLayerIndex(u),this._getAvailableImages(u));break;case"geojson":this.workerSources[u][Xe][Wt]=new ye(fr,this._getLayerIndex(u),this._getAvailableImages(u));break;default:this.workerSources[u][Xe][Wt]=new this.externalWorkerSourceTypes[Xe](fr,this._getLayerIndex(u),this._getAvailableImages(u))}}return this.workerSources[u][Xe][Wt]}_getDEMWorkerSource(u,Xe){return this.demWorkerSources[u]||(this.demWorkerSources[u]={}),this.demWorkerSources[u][Xe]||(this.demWorkerSources[u][Xe]=new n),this.demWorkerSources[u][Xe]}}return u.i(self)&&(self.worker=new ve(self)),ve})),define("index",["exports","./shared"],(function(u,Xe){var Wt="4.7.1";let fr,_r;const wr={now:"undefined"!=typeof performance&&performance&&performance.now?performance.now.bind(performance):Date.now.bind(Date),frameAsync:u=>new Promise(((Wt,fr)=>{const _r=requestAnimationFrame(Wt);u.signal.addEventListener("abort",(()=>{cancelAnimationFrame(_r),fr(Xe.c())}))})),getImageData(u,Xe=0){return this.getImageCanvasContext(u).getImageData(-Xe,-Xe,u.width+2*Xe,u.height+2*Xe)},getImageCanvasContext(u){const Xe=window.document.createElement("canvas"),Wt=Xe.getContext("2d",{willReadFrequently:!0});if(!Wt)throw new Error("failed to create canvas 2d context");return Xe.width=u.width,Xe.height=u.height,Wt.drawImage(u,0,0,u.width,u.height),Wt},resolveURL:u=>(fr||(fr=document.createElement("a")),fr.href=u,fr.href),hardwareConcurrency:"undefined"!=typeof navigator&&navigator.hardwareConcurrency||4,get prefersReducedMotion(){return!!matchMedia&&(null==_r&&(_r=matchMedia("(prefers-reduced-motion: reduce)")),_r.matches)}};class r{static testProp(u){if(!r.docStyle)return u[0];for(let Xe=0;Xe<u.length;Xe++)if(u[Xe]in r.docStyle)return u[Xe];return u[0]}static create(u,Xe,Wt){const fr=window.document.createElement(u);return void 0!==Xe&&(fr.className=Xe),Wt&&Wt.appendChild(fr),fr}static createNS(u,Xe){return window.document.createElementNS(u,Xe)}static disableDrag(){r.docStyle&&r.selectProp&&(r.userSelect=r.docStyle[r.selectProp],r.docStyle[r.selectProp]="none")}static enableDrag(){r.docStyle&&r.selectProp&&(r.docStyle[r.selectProp]=r.userSelect)}static setTransform(u,Xe){u.style[r.transformProp]=Xe}static addEventListener(u,Xe,Wt,fr={}){u.addEventListener(Xe,Wt,"passive"in fr?fr:fr.capture)}static removeEventListener(u,Xe,Wt,fr={}){u.removeEventListener(Xe,Wt,"passive"in fr?fr:fr.capture)}static suppressClickInternal(u){u.preventDefault(),u.stopPropagation(),window.removeEventListener("click",r.suppressClickInternal,!0)}static suppressClick(){window.addEventListener("click",r.suppressClickInternal,!0),window.setTimeout((()=>{window.removeEventListener("click",r.suppressClickInternal,!0)}),0)}static getScale(u){const Xe=u.getBoundingClientRect();return{x:Xe.width/u.offsetWidth||1,y:Xe.height/u.offsetHeight||1,boundingClientRect:Xe}}static getPoint(u,Wt,fr){const _r=Wt.boundingClientRect;return new Xe.P((fr.clientX-_r.left)/Wt.x-u.clientLeft,(fr.clientY-_r.top)/Wt.y-u.clientTop)}static mousePos(u,Xe){const Wt=r.getScale(u);return r.getPoint(u,Wt,Xe)}static touchPos(u,Xe){const Wt=[],fr=r.getScale(u);for(let _r=0;_r<Xe.length;_r++)Wt.push(r.getPoint(u,fr,Xe[_r]));return Wt}static mouseButton(u){return u.button}static remove(u){u.parentNode&&u.parentNode.removeChild(u)}}r.docStyle="undefined"!=typeof window&&window.document&&window.document.documentElement.style,r.selectProp=r.testProp(["userSelect","MozUserSelect","WebkitUserSelect","msUserSelect"]),r.transformProp=r.testProp(["transform","WebkitTransform"]);const Ar={supported:!1,testSupport:function(u){!no&&In&&(io?d(u):Kr=u)}};let Kr,In,no=!1,io=!1;function d(u){const Xe=u.createTexture();u.bindTexture(u.TEXTURE_2D,Xe);try{if(u.texImage2D(u.TEXTURE_2D,0,u.RGBA,u.RGBA,u.UNSIGNED_BYTE,In),u.isContextLost())return;Ar.supported=!0}catch(u){}u.deleteTexture(Xe),no=!0}var oo;"undefined"!=typeof document&&(In=document.createElement("img"),In.onload=()=>{Kr&&d(Kr),Kr=null,io=!0},In.onerror=()=>{no=!0,Kr=null},In.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA="),function(u){let Wt,fr,_r,wr;u.resetRequestQueue=()=>{Wt=[],fr=0,_r=0,wr={}},u.addThrottleControl=u=>{const Xe=_r++;return wr[Xe]=u,Xe},u.removeThrottleControl=u=>{delete wr[u],l()},u.getImage=(u,fr,_r=!0)=>new Promise(((wr,Kr)=>{Ar.supported&&(u.headers||(u.headers={}),u.headers.accept="image/webp,*/*"),Xe.e(u,{type:"image"}),Wt.push({abortController:fr,requestParameters:u,supportImageRefresh:_r,state:"queued",onError:u=>{Kr(u)},onSuccess:u=>{wr(u)}}),l()}));const r=u=>Xe._(this,void 0,void 0,(function*(){u.state="running";const{requestParameters:Wt,supportImageRefresh:_r,onError:wr,onSuccess:Ar,abortController:Kr}=u,In=!1===_r&&!Xe.i(self)&&!Xe.g(Wt.url)&&(!Wt.headers||Object.keys(Wt.headers).reduce(((u,Xe)=>u&&"accept"===Xe),!0));fr++;const no=In?h(Wt,Kr):Xe.m(Wt,Kr);try{const Wt=yield no;delete u.abortController,u.state="completed",Wt.data instanceof HTMLImageElement||Xe.b(Wt.data)?Ar(Wt):Wt.data&&Ar({data:yield(io=Wt.data,"function"==typeof createImageBitmap?Xe.d(io):Xe.f(io)),cacheControl:Wt.cacheControl,expires:Wt.expires})}catch(Xe){delete u.abortController,wr(Xe)}finally{fr--,l()}var io})),l=()=>{const u=(()=>{for(const u of Object.keys(wr))if(wr[u]())return!0;return!1})()?Xe.a.MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:Xe.a.MAX_PARALLEL_IMAGE_REQUESTS;for(let Xe=fr;Xe<u&&Wt.length>0;Xe++){const u=Wt.shift();u.abortController.signal.aborted?Xe--:r(u)}},h=(u,Wt)=>new Promise(((fr,_r)=>{const wr=new Image,Ar=u.url,Kr=u.credentials;Kr&&"include"===Kr?wr.crossOrigin="use-credentials":(Kr&&"same-origin"===Kr||!Xe.s(Ar))&&(wr.crossOrigin="anonymous"),Wt.signal.addEventListener("abort",(()=>{wr.src="",_r(Xe.c())})),wr.fetchPriority="high",wr.onload=()=>{wr.onerror=wr.onload=null,fr({data:wr})},wr.onerror=()=>{wr.onerror=wr.onload=null,Wt.signal.aborted||_r(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."))},wr.src=Ar}))}(oo||(oo={})),oo.resetRequestQueue();class p{constructor(u){this._transformRequestFn=u}transformRequest(u,Xe){return this._transformRequestFn&&this._transformRequestFn(u,Xe)||{url:u}}setTransformRequest(u){this._transformRequestFn=u}}function m(u){var Wt=new Xe.A(3);return Wt[0]=u[0],Wt[1]=u[1],Wt[2]=u[2],Wt}var ao,g=function(u,Xe,Wt){return u[0]=Xe[0]-Wt[0],u[1]=Xe[1]-Wt[1],u[2]=Xe[2]-Wt[2],u};ao=new Xe.A(3),Xe.A!=Float32Array&&(ao[0]=0,ao[1]=0,ao[2]=0);var v=function(u){var Xe=u[0],Wt=u[1];return Xe*Xe+Wt*Wt};function x(u){const Xe=[];if("string"==typeof u)Xe.push({id:"default",url:u});else if(u&&u.length>0){const Wt=[];for(const{id:fr,url:_r}of u){const u=`${fr}${_r}`;-1===Wt.indexOf(u)&&(Wt.push(u),Xe.push({id:fr,url:_r}))}}return Xe}function y(u,Xe,Wt){const fr=u.split("?");return fr[0]+=`${Xe}${Wt}`,fr.join("?")}!function(){var u=new Xe.A(2);Xe.A!=Float32Array&&(u[0]=0,u[1]=0)}();class b{constructor(u,Xe,Wt,fr){this.context=u,this.format=Wt,this.texture=u.gl.createTexture(),this.update(Xe,fr)}update(u,Wt,fr){const{width:_r,height:wr}=u,Ar=!(this.size&&this.size[0]===_r&&this.size[1]===wr||fr),{context:Kr}=this,{gl:In}=Kr;if(this.useMipmap=Boolean(Wt&&Wt.useMipmap),In.bindTexture(In.TEXTURE_2D,this.texture),Kr.pixelStoreUnpackFlipY.set(!1),Kr.pixelStoreUnpack.set(1),Kr.pixelStoreUnpackPremultiplyAlpha.set(this.format===In.RGBA&&(!Wt||!1!==Wt.premultiply)),Ar)this.size=[_r,wr],u instanceof HTMLImageElement||u instanceof HTMLCanvasElement||u instanceof HTMLVideoElement||u instanceof ImageData||Xe.b(u)?In.texImage2D(In.TEXTURE_2D,0,this.format,this.format,In.UNSIGNED_BYTE,u):In.texImage2D(In.TEXTURE_2D,0,this.format,_r,wr,0,this.format,In.UNSIGNED_BYTE,u.data);else{const{x:Wt,y:Ar}=fr||{x:0,y:0};u instanceof HTMLImageElement||u instanceof HTMLCanvasElement||u instanceof HTMLVideoElement||u instanceof ImageData||Xe.b(u)?In.texSubImage2D(In.TEXTURE_2D,0,Wt,Ar,In.RGBA,In.UNSIGNED_BYTE,u):In.texSubImage2D(In.TEXTURE_2D,0,Wt,Ar,_r,wr,In.RGBA,In.UNSIGNED_BYTE,u.data)}this.useMipmap&&this.isSizePowerOfTwo()&&In.generateMipmap(In.TEXTURE_2D)}bind(u,Xe,Wt){const{context:fr}=this,{gl:_r}=fr;_r.bindTexture(_r.TEXTURE_2D,this.texture),Wt!==_r.LINEAR_MIPMAP_NEAREST||this.isSizePowerOfTwo()||(Wt=_r.LINEAR),u!==this.filter&&(_r.texParameteri(_r.TEXTURE_2D,_r.TEXTURE_MAG_FILTER,u),_r.texParameteri(_r.TEXTURE_2D,_r.TEXTURE_MIN_FILTER,Wt||u),this.filter=u),Xe!==this.wrap&&(_r.texParameteri(_r.TEXTURE_2D,_r.TEXTURE_WRAP_S,Xe),_r.texParameteri(_r.TEXTURE_2D,_r.TEXTURE_WRAP_T,Xe),this.wrap=Xe)}isSizePowerOfTwo(){return this.size[0]===this.size[1]&&Math.log(this.size[0])/Math.LN2%1==0}destroy(){const{gl:u}=this.context;u.deleteTexture(this.texture),this.texture=null}}function w(u){const{userImage:Xe}=u;return!!(Xe&&Xe.render&&Xe.render())&&(u.data.replace(new Uint8Array(Xe.data.buffer)),!0)}class T extends Xe.E{constructor(){super(),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new Xe.R({width:1,height:1}),this.dirty=!0}isLoaded(){return this.loaded}setLoaded(u){if(this.loaded!==u&&(this.loaded=u,u)){for(const{ids:u,promiseResolve:Xe}of this.requestors)Xe(this._getImagesForIds(u));this.requestors=[]}}getImage(u){const Wt=this.images[u];if(Wt&&!Wt.data&&Wt.spriteData){const u=Wt.spriteData;Wt.data=new Xe.R({width:u.width,height:u.height},u.context.getImageData(u.x,u.y,u.width,u.height).data),Wt.spriteData=null}return Wt}addImage(u,Xe){if(this.images[u])throw new Error(`Image id ${u} already exist, use updateImage instead`);this._validate(u,Xe)&&(this.images[u]=Xe)}_validate(u,Wt){let fr=!0;const _r=Wt.data||Wt.spriteData;return this._validateStretch(Wt.stretchX,_r&&_r.width)||(this.fire(new Xe.j(new Error(`Image "${u}" has invalid "stretchX" value`))),fr=!1),this._validateStretch(Wt.stretchY,_r&&_r.height)||(this.fire(new Xe.j(new Error(`Image "${u}" has invalid "stretchY" value`))),fr=!1),this._validateContent(Wt.content,Wt)||(this.fire(new Xe.j(new Error(`Image "${u}" has invalid "content" value`))),fr=!1),fr}_validateStretch(u,Xe){if(!u)return!0;let Wt=0;for(const fr of u){if(fr[0]<Wt||fr[1]<fr[0]||Xe<fr[1])return!1;Wt=fr[1]}return!0}_validateContent(u,Xe){if(!u)return!0;if(4!==u.length)return!1;const Wt=Xe.spriteData,fr=Wt&&Wt.width||Xe.data.width,_r=Wt&&Wt.height||Xe.data.height;return!(u[0]<0||fr<u[0]||u[1]<0||_r<u[1]||u[2]<0||fr<u[2]||u[3]<0||_r<u[3]||u[2]<u[0]||u[3]<u[1])}updateImage(u,Xe,Wt=!0){const fr=this.getImage(u);if(Wt&&(fr.data.width!==Xe.data.width||fr.data.height!==Xe.data.height))throw new Error(`size mismatch between old image (${fr.data.width}x${fr.data.height}) and new image (${Xe.data.width}x${Xe.data.height}).`);Xe.version=fr.version+1,this.images[u]=Xe,this.updatedImages[u]=!0}removeImage(u){const Xe=this.images[u];delete this.images[u],delete this.patterns[u],Xe.userImage&&Xe.userImage.onRemove&&Xe.userImage.onRemove()}listImages(){return Object.keys(this.images)}getImages(u){return new Promise(((Xe,Wt)=>{let fr=!0;if(!this.isLoaded())for(const Xe of u)this.images[Xe]||(fr=!1);this.isLoaded()||fr?Xe(this._getImagesForIds(u)):this.requestors.push({ids:u,promiseResolve:Xe})}))}_getImagesForIds(u){const Wt={};for(const fr of u){let u=this.getImage(fr);u||(this.fire(new Xe.k("styleimagemissing",{id:fr})),u=this.getImage(fr)),u?Wt[fr]={data:u.data.clone(),pixelRatio:u.pixelRatio,sdf:u.sdf,version:u.version,stretchX:u.stretchX,stretchY:u.stretchY,content:u.content,textFitWidth:u.textFitWidth,textFitHeight:u.textFitHeight,hasRenderCallback:Boolean(u.userImage&&u.userImage.render)}:Xe.w(`Image "${fr}" could not be loaded. Please make sure you have added the image with map.addImage() or a "sprite" property in your style. You can provide missing images by listening for the "styleimagemissing" map event.`)}return Wt}getPixelSize(){const{width:u,height:Xe}=this.atlasImage;return{width:u,height:Xe}}getPattern(u){const Wt=this.patterns[u],fr=this.getImage(u);if(!fr)return null;if(Wt&&Wt.position.version===fr.version)return Wt.position;if(Wt)Wt.position.version=fr.version;else{const Wt={w:fr.data.width+2,h:fr.data.height+2,x:0,y:0},_r=new Xe.I(Wt,fr);this.patterns[u]={bin:Wt,position:_r}}return this._updatePatternAtlas(),this.patterns[u].position}bind(u){const Xe=u.gl;this.atlasTexture?this.dirty&&(this.atlasTexture.update(this.atlasImage),this.dirty=!1):this.atlasTexture=new b(u,this.atlasImage,Xe.RGBA),this.atlasTexture.bind(Xe.LINEAR,Xe.CLAMP_TO_EDGE)}_updatePatternAtlas(){const u=[];for(const Xe in this.patterns)u.push(this.patterns[Xe].bin);const{w:Wt,h:fr}=Xe.p(u),_r=this.atlasImage;_r.resize({width:Wt||1,height:fr||1});for(const u in this.patterns){const{bin:Wt}=this.patterns[u],fr=Wt.x+1,wr=Wt.y+1,Ar=this.getImage(u).data,Kr=Ar.width,In=Ar.height;Xe.R.copy(Ar,_r,{x:0,y:0},{x:fr,y:wr},{width:Kr,height:In}),Xe.R.copy(Ar,_r,{x:0,y:In-1},{x:fr,y:wr-1},{width:Kr,height:1}),Xe.R.copy(Ar,_r,{x:0,y:0},{x:fr,y:wr+In},{width:Kr,height:1}),Xe.R.copy(Ar,_r,{x:Kr-1,y:0},{x:fr-1,y:wr},{width:1,height:In}),Xe.R.copy(Ar,_r,{x:0,y:0},{x:fr+Kr,y:wr},{width:1,height:In})}this.dirty=!0}beginFrame(){this.callbackDispatchedThisFrame={}}dispatchRenderCallbacks(u){for(const Wt of u){if(this.callbackDispatchedThisFrame[Wt])continue;this.callbackDispatchedThisFrame[Wt]=!0;const u=this.getImage(Wt);u||Xe.w(`Image with ID: "${Wt}" was not found`),w(u)&&this.updateImage(Wt,u)}}}const so=1e20;function E(u,Xe,Wt,fr,_r,wr,Ar,Kr,In){for(let no=Xe;no<Xe+fr;no++)P(u,Wt*wr+no,wr,_r,Ar,Kr,In);for(let no=Wt;no<Wt+_r;no++)P(u,no*wr+Xe,1,fr,Ar,Kr,In)}function P(u,Xe,Wt,fr,_r,wr,Ar){wr[0]=0,Ar[0]=-so,Ar[1]=so,_r[0]=u[Xe];for(let Kr=1,In=0,no=0;Kr<fr;Kr++){_r[Kr]=u[Xe+Kr*Wt];const fr=Kr*Kr;do{const u=wr[In];no=(_r[Kr]-_r[u]+fr-u*u)/(Kr-u)/2}while(no<=Ar[In]&&--In>-1);In++,wr[In]=Kr,Ar[In]=no,Ar[In+1]=so}for(let Kr=0,In=0;Kr<fr;Kr++){for(;Ar[In+1]<Kr;)In++;const fr=wr[In],no=Kr-fr;u[Xe+Kr*Wt]=_r[fr]+no*no}}class C{constructor(u,Xe){this.requestManager=u,this.localIdeographFontFamily=Xe,this.entries={}}setURL(u){this.url=u}getGlyphs(u){return Xe._(this,void 0,void 0,(function*(){const Xe=[];for(const Wt in u)for(const fr of u[Wt])Xe.push(this._getAndCacheGlyphsPromise(Wt,fr));const Wt=yield Promise.all(Xe),fr={};for(const{stack:u,id:Xe,glyph:_r}of Wt)fr[u]||(fr[u]={}),fr[u][Xe]=_r&&{id:_r.id,bitmap:_r.bitmap.clone(),metrics:_r.metrics};return fr}))}_getAndCacheGlyphsPromise(u,Wt){return Xe._(this,void 0,void 0,(function*(){let Xe=this.entries[u];Xe||(Xe=this.entries[u]={glyphs:{},requests:{},ranges:{}});let fr=Xe.glyphs[Wt];if(void 0!==fr)return{stack:u,id:Wt,glyph:fr};if(fr=this._tinySDF(Xe,u,Wt),fr)return Xe.glyphs[Wt]=fr,{stack:u,id:Wt,glyph:fr};const _r=Math.floor(Wt/256);if(256*_r>65535)throw new Error("glyphs > 65535 not supported");if(Xe.ranges[_r])return{stack:u,id:Wt,glyph:fr};if(!this.url)throw new Error("glyphsUrl is not set");if(!Xe.requests[_r]){const Wt=C.loadGlyphRange(u,_r,this.url,this.requestManager);Xe.requests[_r]=Wt}const wr=yield Xe.requests[_r];for(const u in wr)this._doesCharSupportLocalGlyph(+u)||(Xe.glyphs[+u]=wr[+u]);return Xe.ranges[_r]=!0,{stack:u,id:Wt,glyph:wr[Wt]||null}}))}_doesCharSupportLocalGlyph(u){return!!this.localIdeographFontFamily&&/\p{Ideo}|\p{sc=Hang}|\p{sc=Hira}|\p{sc=Kana}/u.test(String.fromCodePoint(u))}_tinySDF(u,Wt,fr){const _r=this.localIdeographFontFamily;if(!_r)return;if(!this._doesCharSupportLocalGlyph(fr))return;let wr=u.tinySDF;if(!wr){let Xe="400";/bold/i.test(Wt)?Xe="900":/medium/i.test(Wt)?Xe="500":/light/i.test(Wt)&&(Xe="200"),wr=u.tinySDF=new C.TinySDF({fontSize:48,buffer:6,radius:16,cutoff:.25,fontFamily:_r,fontWeight:Xe})}const Ar=wr.draw(String.fromCharCode(fr));return{id:fr,bitmap:new Xe.o({width:Ar.width||60,height:Ar.height||60},Ar.data),metrics:{width:Ar.glyphWidth/2||24,height:Ar.glyphHeight/2||24,left:Ar.glyphLeft/2+.5||0,top:Ar.glyphTop/2-27.5||-8,advance:Ar.glyphAdvance/2||24,isDoubleResolution:!0}}}}C.loadGlyphRange=function(u,Wt,fr,_r){return Xe._(this,void 0,void 0,(function*(){const wr=256*Wt,Ar=wr+255,Kr=_r.transformRequest(fr.replace("{fontstack}",u).replace("{range}",`${wr}-${Ar}`),"Glyphs"),In=yield Xe.l(Kr,new AbortController);if(!In||!In.data)throw new Error(`Could not load glyph range. range: ${Wt}, ${wr}-${Ar}`);const no={};for(const u of Xe.n(In.data))no[u.id]=u;return no}))},C.TinySDF=class{constructor({fontSize:u=24,buffer:Xe=3,radius:Wt=8,cutoff:fr=.25,fontFamily:_r="sans-serif",fontWeight:wr="normal",fontStyle:Ar="normal"}={}){this.buffer=Xe,this.cutoff=fr,this.radius=Wt;const Kr=this.size=u+4*Xe,In=this._createCanvas(Kr),no=this.ctx=In.getContext("2d",{willReadFrequently:!0});no.font=`${Ar} ${wr} ${u}px ${_r}`,no.textBaseline="alphabetic",no.textAlign="left",no.fillStyle="black",this.gridOuter=new Float64Array(Kr*Kr),this.gridInner=new Float64Array(Kr*Kr),this.f=new Float64Array(Kr),this.z=new Float64Array(Kr+1),this.v=new Uint16Array(Kr)}_createCanvas(u){const Xe=document.createElement("canvas");return Xe.width=Xe.height=u,Xe}draw(u){const{width:Xe,actualBoundingBoxAscent:Wt,actualBoundingBoxDescent:fr,actualBoundingBoxLeft:_r,actualBoundingBoxRight:wr}=this.ctx.measureText(u),Ar=Math.ceil(Wt),Kr=Math.max(0,Math.min(this.size-this.buffer,Math.ceil(wr-_r))),In=Math.min(this.size-this.buffer,Ar+Math.ceil(fr)),no=Kr+2*this.buffer,io=In+2*this.buffer,oo=Math.max(no*io,0),ao=new Uint8ClampedArray(oo),co={data:ao,width:no,height:io,glyphWidth:Kr,glyphHeight:In,glyphTop:Ar,glyphLeft:0,glyphAdvance:Xe};if(0===Kr||0===In)return co;const{ctx:ho,buffer:go,gridInner:xo,gridOuter:ko}=this;ho.clearRect(go,go,Kr,In),ho.fillText(u,go,go+Ar);const Co=ho.getImageData(go,go,Kr,In);ko.fill(so,0,oo),xo.fill(0,0,oo);for(let u=0;u<In;u++)for(let Xe=0;Xe<Kr;Xe++){const Wt=Co.data[4*(u*Kr+Xe)+3]/255;if(0===Wt)continue;const fr=(u+go)*no+Xe+go;if(1===Wt)ko[fr]=0,xo[fr]=so;else{const u=.5-Wt;ko[fr]=u>0?u*u:0,xo[fr]=u<0?u*u:0}}E(ko,0,0,no,io,no,this.f,this.v,this.z),E(xo,go,go,Kr,In,no,this.f,this.v,this.z);for(let u=0;u<oo;u++){const Xe=Math.sqrt(ko[u])-Math.sqrt(xo[u]);ao[u]=Math.round(255-255*(Xe/this.radius+this.cutoff))}return co}};class S{constructor(){this.specification=Xe.v.light.position}possiblyEvaluate(u,Wt){return Xe.x(u.expression.evaluate(Wt))}interpolate(u,Wt,fr){return{x:Xe.y.number(u.x,Wt.x,fr),y:Xe.y.number(u.y,Wt.y,fr),z:Xe.y.number(u.z,Wt.z,fr)}}}let co;class D extends Xe.E{constructor(u){super(),co=co||new Xe.q({anchor:new Xe.D(Xe.v.light.anchor),position:new S,color:new Xe.D(Xe.v.light.color),intensity:new Xe.D(Xe.v.light.intensity)}),this._transitionable=new Xe.T(co),this.setLight(u),this._transitioning=this._transitionable.untransitioned()}getLight(){return this._transitionable.serialize()}setLight(u,Wt={}){if(!this._validate(Xe.r,u,Wt))for(const Xe in u){const Wt=u[Xe];Xe.endsWith("-transition")?this._transitionable.setTransition(Xe.slice(0,-11),Wt):this._transitionable.setValue(Xe,Wt)}}updateTransitions(u){this._transitioning=this._transitionable.transitioned(u,this._transitioning)}hasTransition(){return this._transitioning.hasTransition()}recalculate(u){this.properties=this._transitioning.possiblyEvaluate(u)}_validate(u,Wt,fr){return(!fr||!1!==fr.validate)&&Xe.t(this,u.call(Xe.u,{value:Wt,style:{glyphs:!0,sprite:!0},styleSpec:Xe.v}))}}const ho=new Xe.q({"sky-color":new Xe.D(Xe.v.sky["sky-color"]),"horizon-color":new Xe.D(Xe.v.sky["horizon-color"]),"fog-color":new Xe.D(Xe.v.sky["fog-color"]),"fog-ground-blend":new Xe.D(Xe.v.sky["fog-ground-blend"]),"horizon-fog-blend":new Xe.D(Xe.v.sky["horizon-fog-blend"]),"sky-horizon-blend":new Xe.D(Xe.v.sky["sky-horizon-blend"]),"atmosphere-blend":new Xe.D(Xe.v.sky["atmosphere-blend"])});class A extends Xe.E{constructor(u){super(),this._transitionable=new Xe.T(ho),this.setSky(u),this._transitioning=this._transitionable.untransitioned(),this.recalculate(new Xe.z(0))}setSky(u,Wt={}){if(!this._validate(Xe.B,u,Wt)){u||(u={"sky-color":"transparent","horizon-color":"transparent","fog-color":"transparent","fog-ground-blend":1,"atmosphere-blend":0});for(const Xe in u){const Wt=u[Xe];Xe.endsWith("-transition")?this._transitionable.setTransition(Xe.slice(0,-11),Wt):this._transitionable.setValue(Xe,Wt)}}}getSky(){return this._transitionable.serialize()}updateTransitions(u){this._transitioning=this._transitionable.transitioned(u,this._transitioning)}hasTransition(){return this._transitioning.hasTransition()}recalculate(u){this.properties=this._transitioning.possiblyEvaluate(u)}_validate(u,Wt,fr={}){return!1!==(null==fr?void 0:fr.validate)&&Xe.t(this,u.call(Xe.u,Xe.e({value:Wt,style:{glyphs:!0,sprite:!0},styleSpec:Xe.v})))}calculateFogBlendOpacity(u){return u<60?0:u<70?(u-60)/10:1}}class R{constructor(u,Xe){this.width=u,this.height=Xe,this.nextRow=0,this.data=new Uint8Array(this.width*this.height),this.dashEntry={}}getDash(u,Xe){const Wt=u.join(",")+String(Xe);return this.dashEntry[Wt]||(this.dashEntry[Wt]=this.addDash(u,Xe)),this.dashEntry[Wt]}getDashRanges(u,Xe,Wt){const fr=[];let _r=u.length%2==1?-u[u.length-1]*Wt:0,wr=u[0]*Wt,Ar=!0;fr.push({left:_r,right:wr,isDash:Ar,zeroLength:0===u[0]});let Kr=u[0];for(let Xe=1;Xe<u.length;Xe++){Ar=!Ar;const In=u[Xe];_r=Kr*Wt,Kr+=In,wr=Kr*Wt,fr.push({left:_r,right:wr,isDash:Ar,zeroLength:0===In})}return fr}addRoundDash(u,Xe,Wt){const fr=Xe/2;for(let Xe=-Wt;Xe<=Wt;Xe++){const _r=this.width*(this.nextRow+Wt+Xe);let wr=0,Ar=u[wr];for(let Kr=0;Kr<this.width;Kr++){Kr/Ar.right>1&&(Ar=u[++wr]);const In=Math.abs(Kr-Ar.left),no=Math.abs(Kr-Ar.right),io=Math.min(In,no);let oo;const ao=Xe/Wt*(fr+1);if(Ar.isDash){const u=fr-Math.abs(ao);oo=Math.sqrt(io*io+u*u)}else oo=fr-Math.sqrt(io*io+ao*ao);this.data[_r+Kr]=Math.max(0,Math.min(255,oo+128))}}}addRegularDash(u){for(let Xe=u.length-1;Xe>=0;--Xe){const Wt=u[Xe],fr=u[Xe+1];Wt.zeroLength?u.splice(Xe,1):fr&&fr.isDash===Wt.isDash&&(fr.left=Wt.left,u.splice(Xe,1))}const Xe=u[0],Wt=u[u.length-1];Xe.isDash===Wt.isDash&&(Xe.left=Wt.left-this.width,Wt.right=Xe.right+this.width);const fr=this.width*this.nextRow;let _r=0,wr=u[_r];for(let Xe=0;Xe<this.width;Xe++){Xe/wr.right>1&&(wr=u[++_r]);const Wt=Math.abs(Xe-wr.left),Ar=Math.abs(Xe-wr.right),Kr=Math.min(Wt,Ar);this.data[fr+Xe]=Math.max(0,Math.min(255,(wr.isDash?Kr:-Kr)+128))}}addDash(u,Wt){const fr=Wt?7:0,_r=2*fr+1;if(this.nextRow+_r>this.height)return Xe.w("LineAtlas out of space"),null;let wr=0;for(let Xe=0;Xe<u.length;Xe++)wr+=u[Xe];if(0!==wr){const Xe=this.width/wr,_r=this.getDashRanges(u,this.width,Xe);Wt?this.addRoundDash(_r,Xe,fr):this.addRegularDash(_r)}const Ar={y:(this.nextRow+fr+.5)/this.height,height:2*fr/this.height,width:wr};return this.nextRow+=_r,this.dirty=!0,Ar}bind(u){const Xe=u.gl;this.texture?(Xe.bindTexture(Xe.TEXTURE_2D,this.texture),this.dirty&&(this.dirty=!1,Xe.texSubImage2D(Xe.TEXTURE_2D,0,0,0,this.width,this.height,Xe.ALPHA,Xe.UNSIGNED_BYTE,this.data))):(this.texture=Xe.createTexture(),Xe.bindTexture(Xe.TEXTURE_2D,this.texture),Xe.texParameteri(Xe.TEXTURE_2D,Xe.TEXTURE_WRAP_S,Xe.REPEAT),Xe.texParameteri(Xe.TEXTURE_2D,Xe.TEXTURE_WRAP_T,Xe.REPEAT),Xe.texParameteri(Xe.TEXTURE_2D,Xe.TEXTURE_MIN_FILTER,Xe.LINEAR),Xe.texParameteri(Xe.TEXTURE_2D,Xe.TEXTURE_MAG_FILTER,Xe.LINEAR),Xe.texImage2D(Xe.TEXTURE_2D,0,Xe.ALPHA,this.width,this.height,0,Xe.ALPHA,Xe.UNSIGNED_BYTE,this.data))}}const go="maplibre_preloaded_worker_pool";class L{constructor(){this.active={}}acquire(u){if(!this.workers)for(this.workers=[];this.workers.length<L.workerCount;)this.workers.push(new Worker(Xe.a.WORKER_URL));return this.active[u]=!0,this.workers.slice()}release(u){delete this.active[u],0===this.numActive()&&(this.workers.forEach((u=>{u.terminate()})),this.workers=null)}isPreloaded(){return!!this.active[go]}numActive(){return Object.keys(this.active).length}}const xo=Math.floor(wr.hardwareConcurrency/2);let ko,Co;function N(){return ko||(ko=new L),ko}L.workerCount=Xe.C(globalThis)?Math.max(Math.min(xo,3),1):1;class U{constructor(u,Wt){this.workerPool=u,this.actors=[],this.currentActor=0,this.id=Wt;const fr=this.workerPool.acquire(Wt);for(let u=0;u<fr.length;u++){const _r=new Xe.F(fr[u],Wt);_r.name=`Worker ${u}`,this.actors.push(_r)}if(!this.actors.length)throw new Error("No actors found")}broadcast(u,Xe){const Wt=[];for(const fr of this.actors)Wt.push(fr.sendAsync({type:u,data:Xe}));return Promise.all(Wt)}getActor(){return this.currentActor=(this.currentActor+1)%this.actors.length,this.actors[this.currentActor]}remove(u=!0){this.actors.forEach((u=>{u.remove()})),this.actors=[],u&&this.workerPool.release(this.id)}registerMessageHandler(u,Xe){for(const Wt of this.actors)Wt.registerMessageHandler(u,Xe)}}function j(){return Co||(Co=new U(N(),Xe.G),Co.registerMessageHandler("GR",((u,Wt,fr)=>Xe.m(Wt,fr)))),Co}function Z(u,Wt){const fr=Xe.H();return Xe.J(fr,fr,[1,1,0]),Xe.K(fr,fr,[.5*u.width,.5*u.height,1]),Xe.L(fr,fr,u.calculatePosMatrix(Wt.toUnwrapped()))}function q(u,Xe,Wt,fr,_r,wr){const Ar=function(u,Xe,Wt){if(u)for(const fr of u){const u=Xe[fr];if(u&&u.source===Wt&&"fill-extrusion"===u.type)return!0}else for(const u in Xe){const fr=Xe[u];if(fr.source===Wt&&"fill-extrusion"===fr.type)return!0}return!1}(_r&&_r.layers,Xe,u.id),Kr=wr.maxPitchScaleFactor(),In=u.tilesIn(fr,Kr,Ar);In.sort(V);const no=[];for(const fr of In)no.push({wrappedTileID:fr.tileID.wrapped().key,queryResults:fr.tile.queryRenderedFeatures(Xe,Wt,u._state,fr.queryGeometry,fr.cameraQueryGeometry,fr.scale,_r,wr,Kr,Z(u.transform,fr.tileID))});const io=function(u){const Xe={},Wt={};for(const fr of u){const u=fr.queryResults,_r=fr.wrappedTileID,wr=Wt[_r]=Wt[_r]||{};for(const Wt in u){const fr=u[Wt],_r=wr[Wt]=wr[Wt]||{},Ar=Xe[Wt]=Xe[Wt]||[];for(const u of fr)_r[u.featureIndex]||(_r[u.featureIndex]=!0,Ar.push(u))}}return Xe}(no);for(const Xe in io)io[Xe].forEach((Xe=>{const Wt=Xe.feature,fr=u.getFeatureState(Wt.layer["source-layer"],Wt.id);Wt.source=Wt.layer.source,Wt.layer["source-layer"]&&(Wt.sourceLayer=Wt.layer["source-layer"]),Wt.state=fr}));return io}function V(u,Xe){const Wt=u.tileID,fr=Xe.tileID;return Wt.overscaledZ-fr.overscaledZ||Wt.canonical.y-fr.canonical.y||Wt.wrap-fr.wrap||Wt.canonical.x-fr.canonical.x}function G(u,Wt,fr){return Xe._(this,void 0,void 0,(function*(){let _r=u;if(u.url?_r=(yield Xe.h(Wt.transformRequest(u.url,"Source"),fr)).data:yield wr.frameAsync(fr),!_r)return null;const Ar=Xe.M(Xe.e(_r,u),["tiles","minzoom","maxzoom","attribution","bounds","scheme","tileSize","encoding"]);return"vector_layers"in _r&&_r.vector_layers&&(Ar.vectorLayerIds=_r.vector_layers.map((u=>u.id))),Ar}))}class H{constructor(u,Xe){u&&(Xe?this.setSouthWest(u).setNorthEast(Xe):Array.isArray(u)&&(4===u.length?this.setSouthWest([u[0],u[1]]).setNorthEast([u[2],u[3]]):this.setSouthWest(u[0]).setNorthEast(u[1])))}setNorthEast(u){return this._ne=u instanceof Xe.N?new Xe.N(u.lng,u.lat):Xe.N.convert(u),this}setSouthWest(u){return this._sw=u instanceof Xe.N?new Xe.N(u.lng,u.lat):Xe.N.convert(u),this}extend(u){const Wt=this._sw,fr=this._ne;let _r,wr;if(u instanceof Xe.N)_r=u,wr=u;else{if(!(u instanceof H))return Array.isArray(u)?4===u.length||u.every(Array.isArray)?this.extend(H.convert(u)):this.extend(Xe.N.convert(u)):u&&("lng"in u||"lon"in u)&&"lat"in u?this.extend(Xe.N.convert(u)):this;if(_r=u._sw,wr=u._ne,!_r||!wr)return this}return Wt||fr?(Wt.lng=Math.min(_r.lng,Wt.lng),Wt.lat=Math.min(_r.lat,Wt.lat),fr.lng=Math.max(wr.lng,fr.lng),fr.lat=Math.max(wr.lat,fr.lat)):(this._sw=new Xe.N(_r.lng,_r.lat),this._ne=new Xe.N(wr.lng,wr.lat)),this}getCenter(){return new Xe.N((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)}getSouthWest(){return this._sw}getNorthEast(){return this._ne}getNorthWest(){return new Xe.N(this.getWest(),this.getNorth())}getSouthEast(){return new Xe.N(this.getEast(),this.getSouth())}getWest(){return this._sw.lng}getSouth(){return this._sw.lat}getEast(){return this._ne.lng}getNorth(){return this._ne.lat}toArray(){return[this._sw.toArray(),this._ne.toArray()]}toString(){return`LngLatBounds(${this._sw.toString()}, ${this._ne.toString()})`}isEmpty(){return!(this._sw&&this._ne)}contains(u){const{lng:Wt,lat:fr}=Xe.N.convert(u);let _r=this._sw.lng<=Wt&&Wt<=this._ne.lng;return this._sw.lng>this._ne.lng&&(_r=this._sw.lng>=Wt&&Wt>=this._ne.lng),this._sw.lat<=fr&&fr<=this._ne.lat&&_r}static convert(u){return u instanceof H?u:u?new H(u):u}static fromLngLat(u,Wt=0){const fr=360*Wt/40075017,_r=fr/Math.cos(Math.PI/180*u.lat);return new H(new Xe.N(u.lng-_r,u.lat-fr),new Xe.N(u.lng+_r,u.lat+fr))}adjustAntiMeridian(){const u=new Xe.N(this._sw.lng,this._sw.lat),Wt=new Xe.N(this._ne.lng,this._ne.lat);return new H(u,u.lng>Wt.lng?new Xe.N(Wt.lng+360,Wt.lat):Wt)}}class W{constructor(u,Xe,Wt){this.bounds=H.convert(this.validateBounds(u)),this.minzoom=Xe||0,this.maxzoom=Wt||24}validateBounds(u){return Array.isArray(u)&&4===u.length?[Math.max(-180,u[0]),Math.max(-90,u[1]),Math.min(180,u[2]),Math.min(90,u[3])]:[-180,-90,180,90]}contains(u){const Wt=Math.pow(2,u.z),fr=Math.floor(Xe.O(this.bounds.getWest())*Wt),_r=Math.floor(Xe.Q(this.bounds.getNorth())*Wt),wr=Math.ceil(Xe.O(this.bounds.getEast())*Wt),Ar=Math.ceil(Xe.Q(this.bounds.getSouth())*Wt);return u.x>=fr&&u.x<wr&&u.y>=_r&&u.y<Ar}}class $ extends Xe.E{constructor(u,Wt,fr,_r){if(super(),this.id=u,this.dispatcher=fr,this.type="vector",this.minzoom=0,this.maxzoom=22,this.scheme="xyz",this.tileSize=512,this.reparseOverscaled=!0,this.isTileClipped=!0,this._loaded=!1,Xe.e(this,Xe.M(Wt,["url","scheme","tileSize","promoteId"])),this._options=Xe.e({type:"vector"},Wt),this._collectResourceTiming=Wt.collectResourceTiming,512!==this.tileSize)throw new Error("vector tile sources must have a tileSize of 512");this.setEventedParent(_r)}load(){return Xe._(this,void 0,void 0,(function*(){this._loaded=!1,this.fire(new Xe.k("dataloading",{dataType:"source"})),this._tileJSONRequest=new AbortController;try{const u=yield G(this._options,this.map._requestManager,this._tileJSONRequest);this._tileJSONRequest=null,this._loaded=!0,this.map.style.sourceCaches[this.id].clearTiles(),u&&(Xe.e(this,u),u.bounds&&(this.tileBounds=new W(u.bounds,this.minzoom,this.maxzoom)),this.fire(new Xe.k("data",{dataType:"source",sourceDataType:"metadata"})),this.fire(new Xe.k("data",{dataType:"source",sourceDataType:"content"})))}catch(u){this._tileJSONRequest=null,this.fire(new Xe.j(u))}}))}loaded(){return this._loaded}hasTile(u){return!this.tileBounds||this.tileBounds.contains(u.canonical)}onAdd(u){this.map=u,this.load()}setSourceProperty(u){this._tileJSONRequest&&this._tileJSONRequest.abort(),u(),this.load()}setTiles(u){return this.setSourceProperty((()=>{this._options.tiles=u})),this}setUrl(u){return this.setSourceProperty((()=>{this.url=u,this._options.url=u})),this}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null)}serialize(){return Xe.e({},this._options)}loadTile(u){return Xe._(this,void 0,void 0,(function*(){const Xe=u.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),Wt={request:this.map._requestManager.transformRequest(Xe,"Tile"),uid:u.uid,tileID:u.tileID,zoom:u.tileID.overscaledZ,tileSize:this.tileSize*u.tileID.overscaleFactor(),type:this.type,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};Wt.request.collectResourceTiming=this._collectResourceTiming;let fr="RT";if(u.actor&&"expired"!==u.state){if("loading"===u.state)return new Promise(((Xe,Wt)=>{u.reloadPromise={resolve:Xe,reject:Wt}}))}else u.actor=this.dispatcher.getActor(),fr="LT";u.abortController=new AbortController;try{const Xe=yield u.actor.sendAsync({type:fr,data:Wt},u.abortController);if(delete u.abortController,u.aborted)return;this._afterTileLoadWorkerResponse(u,Xe)}catch(Xe){if(delete u.abortController,u.aborted)return;if(Xe&&404!==Xe.status)throw Xe;this._afterTileLoadWorkerResponse(u,null)}}))}_afterTileLoadWorkerResponse(u,Xe){if(Xe&&Xe.resourceTiming&&(u.resourceTiming=Xe.resourceTiming),Xe&&this.map._refreshExpiredTiles&&u.setExpiryData(Xe),u.loadVectorData(Xe,this.map.painter),u.reloadPromise){const Xe=u.reloadPromise;u.reloadPromise=null,this.loadTile(u).then(Xe.resolve).catch(Xe.reject)}}abortTile(u){return Xe._(this,void 0,void 0,(function*(){u.abortController&&(u.abortController.abort(),delete u.abortController),u.actor&&(yield u.actor.sendAsync({type:"AT",data:{uid:u.uid,type:this.type,source:this.id}}))}))}unloadTile(u){return Xe._(this,void 0,void 0,(function*(){u.unloadVectorData(),u.actor&&(yield u.actor.sendAsync({type:"RMT",data:{uid:u.uid,type:this.type,source:this.id}}))}))}hasTransition(){return!1}}class X extends Xe.E{constructor(u,Wt,fr,_r){super(),this.id=u,this.dispatcher=fr,this.setEventedParent(_r),this.type="raster",this.minzoom=0,this.maxzoom=22,this.roundZoom=!0,this.scheme="xyz",this.tileSize=512,this._loaded=!1,this._options=Xe.e({type:"raster"},Wt),Xe.e(this,Xe.M(Wt,["url","scheme","tileSize"]))}load(){return Xe._(this,void 0,void 0,(function*(){this._loaded=!1,this.fire(new Xe.k("dataloading",{dataType:"source"})),this._tileJSONRequest=new AbortController;try{const u=yield G(this._options,this.map._requestManager,this._tileJSONRequest);this._tileJSONRequest=null,this._loaded=!0,u&&(Xe.e(this,u),u.bounds&&(this.tileBounds=new W(u.bounds,this.minzoom,this.maxzoom)),this.fire(new Xe.k("data",{dataType:"source",sourceDataType:"metadata"})),this.fire(new Xe.k("data",{dataType:"source",sourceDataType:"content"})))}catch(u){this._tileJSONRequest=null,this.fire(new Xe.j(u))}}))}loaded(){return this._loaded}onAdd(u){this.map=u,this.load()}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null)}setSourceProperty(u){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null),u(),this.load()}setTiles(u){return this.setSourceProperty((()=>{this._options.tiles=u})),this}setUrl(u){return this.setSourceProperty((()=>{this.url=u,this._options.url=u})),this}serialize(){return Xe.e({},this._options)}hasTile(u){return!this.tileBounds||this.tileBounds.contains(u.canonical)}loadTile(u){return Xe._(this,void 0,void 0,(function*(){const Xe=u.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme);u.abortController=new AbortController;try{const Wt=yield oo.getImage(this.map._requestManager.transformRequest(Xe,"Tile"),u.abortController,this.map._refreshExpiredTiles);if(delete u.abortController,u.aborted)return void(u.state="unloaded");if(Wt&&Wt.data){this.map._refreshExpiredTiles&&Wt.cacheControl&&Wt.expires&&u.setExpiryData({cacheControl:Wt.cacheControl,expires:Wt.expires});const Xe=this.map.painter.context,fr=Xe.gl,_r=Wt.data;u.texture=this.map.painter.getTileTexture(_r.width),u.texture?u.texture.update(_r,{useMipmap:!0}):(u.texture=new b(Xe,_r,fr.RGBA,{useMipmap:!0}),u.texture.bind(fr.LINEAR,fr.CLAMP_TO_EDGE,fr.LINEAR_MIPMAP_NEAREST)),u.state="loaded"}}catch(Xe){if(delete u.abortController,u.aborted)u.state="unloaded";else if(Xe)throw u.state="errored",Xe}}))}abortTile(u){return Xe._(this,void 0,void 0,(function*(){u.abortController&&(u.abortController.abort(),delete u.abortController)}))}unloadTile(u){return Xe._(this,void 0,void 0,(function*(){u.texture&&this.map.painter.saveTileTexture(u.texture)}))}hasTransition(){return!1}}class K extends X{constructor(u,Wt,fr,_r){super(u,Wt,fr,_r),this.type="raster-dem",this.maxzoom=22,this._options=Xe.e({type:"raster-dem"},Wt),this.encoding=Wt.encoding||"mapbox",this.redFactor=Wt.redFactor,this.greenFactor=Wt.greenFactor,this.blueFactor=Wt.blueFactor,this.baseShift=Wt.baseShift}loadTile(u){return Xe._(this,void 0,void 0,(function*(){const Wt=u.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),fr=this.map._requestManager.transformRequest(Wt,"Tile");u.neighboringTiles=this._getNeighboringTiles(u.tileID),u.abortController=new AbortController;try{const Wt=yield oo.getImage(fr,u.abortController,this.map._refreshExpiredTiles);if(delete u.abortController,u.aborted)return void(u.state="unloaded");if(Wt&&Wt.data){const fr=Wt.data;this.map._refreshExpiredTiles&&Wt.cacheControl&&Wt.expires&&u.setExpiryData({cacheControl:Wt.cacheControl,expires:Wt.expires});const _r=Xe.b(fr)&&Xe.U()?fr:yield this.readImageNow(fr),wr={type:this.type,uid:u.uid,source:this.id,rawImageData:_r,encoding:this.encoding,redFactor:this.redFactor,greenFactor:this.greenFactor,blueFactor:this.blueFactor,baseShift:this.baseShift};if(!u.actor||"expired"===u.state){u.actor=this.dispatcher.getActor();const Xe=yield u.actor.sendAsync({type:"LDT",data:wr});u.dem=Xe,u.needsHillshadePrepare=!0,u.needsTerrainPrepare=!0,u.state="loaded"}}}catch(Xe){if(delete u.abortController,u.aborted)u.state="unloaded";else if(Xe)throw u.state="errored",Xe}}))}readImageNow(u){return Xe._(this,void 0,void 0,(function*(){if("undefined"!=typeof VideoFrame&&Xe.V()){const Wt=u.width+2,fr=u.height+2;try{return new Xe.R({width:Wt,height:fr},yield Xe.W(u,-1,-1,Wt,fr))}catch(u){}}return wr.getImageData(u,1)}))}_getNeighboringTiles(u){const Wt=u.canonical,fr=Math.pow(2,Wt.z),_r=(Wt.x-1+fr)%fr,wr=0===Wt.x?u.wrap-1:u.wrap,Ar=(Wt.x+1+fr)%fr,Kr=Wt.x+1===fr?u.wrap+1:u.wrap,In={};return In[new Xe.S(u.overscaledZ,wr,Wt.z,_r,Wt.y).key]={backfilled:!1},In[new Xe.S(u.overscaledZ,Kr,Wt.z,Ar,Wt.y).key]={backfilled:!1},Wt.y>0&&(In[new Xe.S(u.overscaledZ,wr,Wt.z,_r,Wt.y-1).key]={backfilled:!1},In[new Xe.S(u.overscaledZ,u.wrap,Wt.z,Wt.x,Wt.y-1).key]={backfilled:!1},In[new Xe.S(u.overscaledZ,Kr,Wt.z,Ar,Wt.y-1).key]={backfilled:!1}),Wt.y+1<fr&&(In[new Xe.S(u.overscaledZ,wr,Wt.z,_r,Wt.y+1).key]={backfilled:!1},In[new Xe.S(u.overscaledZ,u.wrap,Wt.z,Wt.x,Wt.y+1).key]={backfilled:!1},In[new Xe.S(u.overscaledZ,Kr,Wt.z,Ar,Wt.y+1).key]={backfilled:!1}),In}unloadTile(u){return Xe._(this,void 0,void 0,(function*(){u.demTexture&&this.map.painter.saveTileTexture(u.demTexture),u.fbo&&(u.fbo.destroy(),delete u.fbo),u.dem&&delete u.dem,delete u.neighboringTiles,u.state="unloaded",u.actor&&(yield u.actor.sendAsync({type:"RDT",data:{type:this.type,uid:u.uid,source:this.id}}))}))}}class J extends Xe.E{constructor(u,Wt,fr,_r){super(),this.id=u,this.type="geojson",this.minzoom=0,this.maxzoom=18,this.tileSize=512,this.isTileClipped=!0,this.reparseOverscaled=!0,this._removed=!1,this._pendingLoads=0,this.actor=fr.getActor(),this.setEventedParent(_r),this._data=Wt.data,this._options=Xe.e({},Wt),this._collectResourceTiming=Wt.collectResourceTiming,void 0!==Wt.maxzoom&&(this.maxzoom=Wt.maxzoom),Wt.type&&(this.type=Wt.type),Wt.attribution&&(this.attribution=Wt.attribution),this.promoteId=Wt.promoteId;const wr=Xe.X/this.tileSize;void 0!==Wt.clusterMaxZoom&&this.maxzoom<=Wt.clusterMaxZoom&&Xe.w(`The maxzoom value "${this.maxzoom}" is expected to be greater than the clusterMaxZoom value "${Wt.clusterMaxZoom}".`),this.workerOptions=Xe.e({source:this.id,cluster:Wt.cluster||!1,geojsonVtOptions:{buffer:(void 0!==Wt.buffer?Wt.buffer:128)*wr,tolerance:(void 0!==Wt.tolerance?Wt.tolerance:.375)*wr,extent:Xe.X,maxZoom:this.maxzoom,lineMetrics:Wt.lineMetrics||!1,generateId:Wt.generateId||!1},superclusterOptions:{maxZoom:void 0!==Wt.clusterMaxZoom?Wt.clusterMaxZoom:this.maxzoom-1,minPoints:Math.max(2,Wt.clusterMinPoints||2),extent:Xe.X,radius:(Wt.clusterRadius||50)*wr,log:!1,generateId:Wt.generateId||!1},clusterProperties:Wt.clusterProperties,filter:Wt.filter},Wt.workerOptions),"string"==typeof this.promoteId&&(this.workerOptions.promoteId=this.promoteId)}load(){return Xe._(this,void 0,void 0,(function*(){yield this._updateWorkerData()}))}onAdd(u){this.map=u,this.load()}setData(u){return this._data=u,this._updateWorkerData(),this}updateData(u){return this._updateWorkerData(u),this}getData(){return Xe._(this,void 0,void 0,(function*(){const u=Xe.e({type:this.type},this.workerOptions);return this.actor.sendAsync({type:"GD",data:u})}))}setClusterOptions(u){return this.workerOptions.cluster=u.cluster,u&&(void 0!==u.clusterRadius&&(this.workerOptions.superclusterOptions.radius=u.clusterRadius),void 0!==u.clusterMaxZoom&&(this.workerOptions.superclusterOptions.maxZoom=u.clusterMaxZoom)),this._updateWorkerData(),this}getClusterExpansionZoom(u){return this.actor.sendAsync({type:"GCEZ",data:{type:this.type,clusterId:u,source:this.id}})}getClusterChildren(u){return this.actor.sendAsync({type:"GCC",data:{type:this.type,clusterId:u,source:this.id}})}getClusterLeaves(u,Xe,Wt){return this.actor.sendAsync({type:"GCL",data:{type:this.type,source:this.id,clusterId:u,limit:Xe,offset:Wt}})}_updateWorkerData(u){return Xe._(this,void 0,void 0,(function*(){const Wt=Xe.e({type:this.type},this.workerOptions);u?Wt.dataDiff=u:"string"==typeof this._data?(Wt.request=this.map._requestManager.transformRequest(wr.resolveURL(this._data),"Source"),Wt.request.collectResourceTiming=this._collectResourceTiming):Wt.data=JSON.stringify(this._data),this._pendingLoads++,this.fire(new Xe.k("dataloading",{dataType:"source"}));try{const u=yield this.actor.sendAsync({type:"LD",data:Wt});if(this._pendingLoads--,this._removed||u.abandoned)return void this.fire(new Xe.k("dataabort",{dataType:"source"}));let fr=null;u.resourceTiming&&u.resourceTiming[this.id]&&(fr=u.resourceTiming[this.id].slice(0));const _r={dataType:"source"};this._collectResourceTiming&&fr&&fr.length>0&&Xe.e(_r,{resourceTiming:fr}),this.fire(new Xe.k("data",Object.assign(Object.assign({},_r),{sourceDataType:"metadata"}))),this.fire(new Xe.k("data",Object.assign(Object.assign({},_r),{sourceDataType:"content"})))}catch(u){if(this._pendingLoads--,this._removed)return void this.fire(new Xe.k("dataabort",{dataType:"source"}));this.fire(new Xe.j(u))}}))}loaded(){return 0===this._pendingLoads}loadTile(u){return Xe._(this,void 0,void 0,(function*(){const Xe=u.actor?"RT":"LT";u.actor=this.actor;const Wt={type:this.type,uid:u.uid,tileID:u.tileID,zoom:u.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};u.abortController=new AbortController;const fr=yield this.actor.sendAsync({type:Xe,data:Wt},u.abortController);delete u.abortController,u.unloadVectorData(),u.aborted||u.loadVectorData(fr,this.map.painter,"RT"===Xe)}))}abortTile(u){return Xe._(this,void 0,void 0,(function*(){u.abortController&&(u.abortController.abort(),delete u.abortController),u.aborted=!0}))}unloadTile(u){return Xe._(this,void 0,void 0,(function*(){u.unloadVectorData(),yield this.actor.sendAsync({type:"RMT",data:{uid:u.uid,type:this.type,source:this.id}})}))}onRemove(){this._removed=!0,this.actor.sendAsync({type:"RS",data:{type:this.type,source:this.id}})}serialize(){return Xe.e({},this._options,{type:this.type,data:this._data})}hasTransition(){return!1}}var Io=Xe.Y([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]);class Q extends Xe.E{constructor(u,Xe,Wt,fr){super(),this.id=u,this.dispatcher=Wt,this.coordinates=Xe.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(fr),this.options=Xe}load(u){return Xe._(this,void 0,void 0,(function*(){this._loaded=!1,this.fire(new Xe.k("dataloading",{dataType:"source"})),this.url=this.options.url,this._request=new AbortController;try{const Xe=yield oo.getImage(this.map._requestManager.transformRequest(this.url,"Image"),this._request);this._request=null,this._loaded=!0,Xe&&Xe.data&&(this.image=Xe.data,u&&(this.coordinates=u),this._finishLoading())}catch(u){this._request=null,this._loaded=!0,this.fire(new Xe.j(u))}}))}loaded(){return this._loaded}updateImage(u){return u.url?(this._request&&(this._request.abort(),this._request=null),this.options.url=u.url,this.load(u.coordinates).finally((()=>{this.texture=null})),this):this}_finishLoading(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new Xe.k("data",{dataType:"source",sourceDataType:"metadata"})))}onAdd(u){this.map=u,this.load()}onRemove(){this._request&&(this._request.abort(),this._request=null)}setCoordinates(u){this.coordinates=u;const Wt=u.map(Xe.Z.fromLngLat);this.tileID=function(u){let Wt=1/0,fr=1/0,_r=-1/0,wr=-1/0;for(const Xe of u)Wt=Math.min(Wt,Xe.x),fr=Math.min(fr,Xe.y),_r=Math.max(_r,Xe.x),wr=Math.max(wr,Xe.y);const Ar=Math.max(_r-Wt,wr-fr),Kr=Math.max(0,Math.floor(-Math.log(Ar)/Math.LN2)),In=Math.pow(2,Kr);return new Xe.a1(Kr,Math.floor((Wt+_r)/2*In),Math.floor((fr+wr)/2*In))}(Wt),this.minzoom=this.maxzoom=this.tileID.z;const fr=Wt.map((u=>this.tileID.getTilePoint(u)._round()));return this._boundsArray=new Xe.$,this._boundsArray.emplaceBack(fr[0].x,fr[0].y,0,0),this._boundsArray.emplaceBack(fr[1].x,fr[1].y,Xe.X,0),this._boundsArray.emplaceBack(fr[3].x,fr[3].y,0,Xe.X),this._boundsArray.emplaceBack(fr[2].x,fr[2].y,Xe.X,Xe.X),this.boundsBuffer&&(this.boundsBuffer.destroy(),delete this.boundsBuffer),this.fire(new Xe.k("data",{dataType:"source",sourceDataType:"content"})),this}prepare(){if(0===Object.keys(this.tiles).length||!this.image)return;const u=this.map.painter.context,Wt=u.gl;this.boundsBuffer||(this.boundsBuffer=u.createVertexBuffer(this._boundsArray,Io.members)),this.boundsSegments||(this.boundsSegments=Xe.a0.simpleSegment(0,0,4,2)),this.texture||(this.texture=new b(u,this.image,Wt.RGBA),this.texture.bind(Wt.LINEAR,Wt.CLAMP_TO_EDGE));let fr=!1;for(const u in this.tiles){const Xe=this.tiles[u];"loaded"!==Xe.state&&(Xe.state="loaded",Xe.texture=this.texture,fr=!0)}fr&&this.fire(new Xe.k("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}loadTile(u){return Xe._(this,void 0,void 0,(function*(){this.tileID&&this.tileID.equals(u.tileID.canonical)?(this.tiles[String(u.tileID.wrap)]=u,u.buckets={}):u.state="errored"}))}serialize(){return{type:"image",url:this.options.url,coordinates:this.coordinates}}hasTransition(){return!1}}class tt extends Q{constructor(u,Xe,Wt,fr){super(u,Xe,Wt,fr),this.roundZoom=!0,this.type="video",this.options=Xe}load(){return Xe._(this,void 0,void 0,(function*(){this._loaded=!1;const u=this.options;this.urls=[];for(const Xe of u.urls)this.urls.push(this.map._requestManager.transformRequest(Xe,"Source").url);try{const u=yield Xe.a3(this.urls);if(this._loaded=!0,!u)return;this.video=u,this.video.loop=!0,this.video.addEventListener("playing",(()=>{this.map.triggerRepaint()})),this.map&&this.video.play(),this._finishLoading()}catch(u){this.fire(new Xe.j(u))}}))}pause(){this.video&&this.video.pause()}play(){this.video&&this.video.play()}seek(u){if(this.video){const Wt=this.video.seekable;u<Wt.start(0)||u>Wt.end(0)?this.fire(new Xe.j(new Xe.a2(`sources.${this.id}`,null,`Playback for this video can be set only between the ${Wt.start(0)} and ${Wt.end(0)}-second mark.`))):this.video.currentTime=u}}getVideo(){return this.video}onAdd(u){this.map||(this.map=u,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))}prepare(){if(0===Object.keys(this.tiles).length||this.video.readyState<2)return;const u=this.map.painter.context,Wt=u.gl;this.boundsBuffer||(this.boundsBuffer=u.createVertexBuffer(this._boundsArray,Io.members)),this.boundsSegments||(this.boundsSegments=Xe.a0.simpleSegment(0,0,4,2)),this.texture?this.video.paused||(this.texture.bind(Wt.LINEAR,Wt.CLAMP_TO_EDGE),Wt.texSubImage2D(Wt.TEXTURE_2D,0,0,0,Wt.RGBA,Wt.UNSIGNED_BYTE,this.video)):(this.texture=new b(u,this.video,Wt.RGBA),this.texture.bind(Wt.LINEAR,Wt.CLAMP_TO_EDGE));let fr=!1;for(const u in this.tiles){const Xe=this.tiles[u];"loaded"!==Xe.state&&(Xe.state="loaded",Xe.texture=this.texture,fr=!0)}fr&&this.fire(new Xe.k("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}serialize(){return{type:"video",urls:this.urls,coordinates:this.coordinates}}hasTransition(){return this.video&&!this.video.paused}}class et extends Q{constructor(u,Wt,fr,_r){super(u,Wt,fr,_r),Wt.coordinates?Array.isArray(Wt.coordinates)&&4===Wt.coordinates.length&&!Wt.coordinates.some((u=>!Array.isArray(u)||2!==u.length||u.some((u=>"number"!=typeof u))))||this.fire(new Xe.j(new Xe.a2(`sources.${u}`,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new Xe.j(new Xe.a2(`sources.${u}`,null,'missing required property "coordinates"'))),Wt.animate&&"boolean"!=typeof Wt.animate&&this.fire(new Xe.j(new Xe.a2(`sources.${u}`,null,'optional "animate" property must be a boolean value'))),Wt.canvas?"string"==typeof Wt.canvas||Wt.canvas instanceof HTMLCanvasElement||this.fire(new Xe.j(new Xe.a2(`sources.${u}`,null,'"canvas" must be either a string representing the ID of the canvas element from which to read, or an HTMLCanvasElement instance'))):this.fire(new Xe.j(new Xe.a2(`sources.${u}`,null,'missing required property "canvas"'))),this.options=Wt,this.animate=void 0===Wt.animate||Wt.animate}load(){return Xe._(this,void 0,void 0,(function*(){this._loaded=!0,this.canvas||(this.canvas=this.options.canvas instanceof HTMLCanvasElement?this.options.canvas:document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()?this.fire(new Xe.j(new Error("Canvas dimensions cannot be less than or equal to zero."))):(this.play=function(){this._playing=!0,this.map.triggerRepaint()},this.pause=function(){this._playing&&(this.prepare(),this._playing=!1)},this._finishLoading())}))}getCanvas(){return this.canvas}onAdd(u){this.map=u,this.load(),this.canvas&&this.animate&&this.play()}onRemove(){this.pause()}prepare(){let u=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,u=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,u=!0),this._hasInvalidDimensions())return;if(0===Object.keys(this.tiles).length)return;const Wt=this.map.painter.context,fr=Wt.gl;this.boundsBuffer||(this.boundsBuffer=Wt.createVertexBuffer(this._boundsArray,Io.members)),this.boundsSegments||(this.boundsSegments=Xe.a0.simpleSegment(0,0,4,2)),this.texture?(u||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new b(Wt,this.canvas,fr.RGBA,{premultiply:!0});let _r=!1;for(const u in this.tiles){const Xe=this.tiles[u];"loaded"!==Xe.state&&(Xe.state="loaded",Xe.texture=this.texture,_r=!0)}_r&&this.fire(new Xe.k("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}serialize(){return{type:"canvas",coordinates:this.coordinates}}hasTransition(){return this._playing}_hasInvalidDimensions(){for(const u of[this.canvas.width,this.canvas.height])if(isNaN(u)||u<=0)return!0;return!1}}const zo={},at=u=>{switch(u){case"geojson":return J;case"image":return Q;case"raster":return X;case"raster-dem":return K;case"vector":return $;case"video":return tt;case"canvas":return et}return zo[u]},Bo="RTLPluginLoaded";class ot extends Xe.E{constructor(){super(...arguments),this.status="unavailable",this.url=null,this.dispatcher=j()}_syncState(u){return this.status=u,this.dispatcher.broadcast("SRPS",{pluginStatus:u,pluginURL:this.url}).catch((u=>{throw this.status="error",u}))}getRTLTextPluginStatus(){return this.status}clearRTLTextPlugin(){this.status="unavailable",this.url=null}setRTLTextPlugin(u){return Xe._(this,arguments,void 0,(function*(u,Xe=!1){if(this.url)throw new Error("setRTLTextPlugin cannot be called multiple times.");if(this.url=wr.resolveURL(u),!this.url)throw new Error(`requested url ${u} is invalid`);if("unavailable"===this.status){if(!Xe)return this._requestImport();this.status="deferred",this._syncState(this.status)}else if("requested"===this.status)return this._requestImport()}))}_requestImport(){return Xe._(this,void 0,void 0,(function*(){yield this._syncState("loading"),this.status="loaded",this.fire(new Xe.k(Bo))}))}lazyLoad(){"unavailable"===this.status?this.status="requested":"deferred"===this.status&&this._requestImport()}}let ca=null;function nt(){return ca||(ca=new ot),ca}class lt{constructor(u,Wt){this.timeAdded=0,this.fadeEndTime=0,this.tileID=u,this.uid=Xe.a4(),this.uses=0,this.tileSize=Wt,this.buckets={},this.expirationTime=null,this.queryPadding=0,this.hasSymbolBuckets=!1,this.hasRTLText=!1,this.dependencies={},this.rtt=[],this.rttCoords={},this.expiredRequestCount=0,this.state="loading"}registerFadeDuration(u){const Xe=u+this.timeAdded;Xe<this.fadeEndTime||(this.fadeEndTime=Xe)}wasRequested(){return"errored"===this.state||"loaded"===this.state||"reloading"===this.state}clearTextures(u){this.demTexture&&u.saveTileTexture(this.demTexture),this.demTexture=null}loadVectorData(u,Wt,fr){if(this.hasData()&&this.unloadVectorData(),this.state="loaded",u){u.featureIndex&&(this.latestFeatureIndex=u.featureIndex,u.rawTileData?(this.latestRawTileData=u.rawTileData,this.latestFeatureIndex.rawTileData=u.rawTileData):this.latestRawTileData&&(this.latestFeatureIndex.rawTileData=this.latestRawTileData)),this.collisionBoxArray=u.collisionBoxArray,this.buckets=function(u,Xe){const Wt={};if(!Xe)return Wt;for(const fr of u){const u=fr.layerIds.map((u=>Xe.getLayer(u))).filter(Boolean);if(0!==u.length){fr.layers=u,fr.stateDependentLayerIds&&(fr.stateDependentLayers=fr.stateDependentLayerIds.map((Xe=>u.filter((u=>u.id===Xe))[0])));for(const Xe of u)Wt[Xe.id]=fr}}return Wt}(u.buckets,Wt.style),this.hasSymbolBuckets=!1;for(const u in this.buckets){const Wt=this.buckets[u];if(Wt instanceof Xe.a6){if(this.hasSymbolBuckets=!0,!fr)break;Wt.justReloaded=!0}}if(this.hasRTLText=!1,this.hasSymbolBuckets)for(const u in this.buckets){const Wt=this.buckets[u];if(Wt instanceof Xe.a6&&Wt.hasRTLText){this.hasRTLText=!0,nt().lazyLoad();break}}this.queryPadding=0;for(const u in this.buckets){const Xe=this.buckets[u];this.queryPadding=Math.max(this.queryPadding,Wt.style.getLayer(u).queryRadius(Xe))}u.imageAtlas&&(this.imageAtlas=u.imageAtlas),u.glyphAtlasImage&&(this.glyphAtlasImage=u.glyphAtlasImage)}else this.collisionBoxArray=new Xe.a5}unloadVectorData(){for(const u in this.buckets)this.buckets[u].destroy();this.buckets={},this.imageAtlasTexture&&this.imageAtlasTexture.destroy(),this.imageAtlas&&(this.imageAtlas=null),this.glyphAtlasTexture&&this.glyphAtlasTexture.destroy(),this.latestFeatureIndex=null,this.state="unloaded"}getBucket(u){return this.buckets[u.id]}upload(u){for(const Xe in this.buckets){const Wt=this.buckets[Xe];Wt.uploadPending()&&Wt.upload(u)}const Xe=u.gl;this.imageAtlas&&!this.imageAtlas.uploaded&&(this.imageAtlasTexture=new b(u,this.imageAtlas.image,Xe.RGBA),this.imageAtlas.uploaded=!0),this.glyphAtlasImage&&(this.glyphAtlasTexture=new b(u,this.glyphAtlasImage,Xe.ALPHA),this.glyphAtlasImage=null)}prepare(u){this.imageAtlas&&this.imageAtlas.patchUpdatedImages(u,this.imageAtlasTexture)}queryRenderedFeatures(u,Xe,Wt,fr,_r,wr,Ar,Kr,In,no){return this.latestFeatureIndex&&this.latestFeatureIndex.rawTileData?this.latestFeatureIndex.query({queryGeometry:fr,cameraQueryGeometry:_r,scale:wr,tileSize:this.tileSize,pixelPosMatrix:no,transform:Kr,params:Ar,queryPadding:this.queryPadding*In},u,Xe,Wt):{}}querySourceFeatures(u,Wt){const fr=this.latestFeatureIndex;if(!fr||!fr.rawTileData)return;const _r=fr.loadVTLayers(),wr=Wt&&Wt.sourceLayer?Wt.sourceLayer:"",Ar=_r._geojsonTileLayer||_r[wr];if(!Ar)return;const Kr=Xe.a7(Wt&&Wt.filter),{z:In,x:no,y:io}=this.tileID.canonical,oo={z:In,x:no,y:io};for(let Wt=0;Wt<Ar.length;Wt++){const _r=Ar.feature(Wt);if(Kr.needGeometry){const u=Xe.a8(_r,!0);if(!Kr.filter(new Xe.z(this.tileID.overscaledZ),u,this.tileID.canonical))continue}else if(!Kr.filter(new Xe.z(this.tileID.overscaledZ),_r))continue;const ao=fr.getId(_r,wr),so=new Xe.a9(_r,In,no,io,ao);so.tile=oo,u.push(so)}}hasData(){return"loaded"===this.state||"reloading"===this.state||"expired"===this.state}patternsLoaded(){return this.imageAtlas&&!!Object.keys(this.imageAtlas.patternPositions).length}setExpiryData(u){const Wt=this.expirationTime;if(u.cacheControl){const Wt=Xe.aa(u.cacheControl);Wt["max-age"]&&(this.expirationTime=Date.now()+1e3*Wt["max-age"])}else u.expires&&(this.expirationTime=new Date(u.expires).getTime());if(this.expirationTime){const u=Date.now();let Xe=!1;if(this.expirationTime>u)Xe=!1;else if(Wt)if(this.expirationTime<Wt)Xe=!0;else{const fr=this.expirationTime-Wt;fr?this.expirationTime=u+Math.max(fr,3e4):Xe=!0}else Xe=!0;Xe?(this.expiredRequestCount++,this.state="expired"):this.expiredRequestCount=0}}getExpiryTimeout(){if(this.expirationTime)return this.expiredRequestCount?1e3*(1<<Math.min(this.expiredRequestCount-1,31)):Math.min(this.expirationTime-(new Date).getTime(),Math.pow(2,31)-1)}setFeatureState(u,Xe){if(!this.latestFeatureIndex||!this.latestFeatureIndex.rawTileData||0===Object.keys(u).length)return;const Wt=this.latestFeatureIndex.loadVTLayers();for(const fr in this.buckets){if(!Xe.style.hasLayer(fr))continue;const _r=this.buckets[fr],wr=_r.layers[0].sourceLayer||"_geojsonTileLayer",Ar=Wt[wr],Kr=u[wr];if(!Ar||!Kr||0===Object.keys(Kr).length)continue;_r.update(Kr,Ar,this.imageAtlas&&this.imageAtlas.patternPositions||{});const In=Xe&&Xe.style&&Xe.style.getLayer(fr);In&&(this.queryPadding=Math.max(this.queryPadding,In.queryRadius(_r)))}}holdingForFade(){return void 0!==this.symbolFadeHoldUntil}symbolFadeFinished(){return!this.symbolFadeHoldUntil||this.symbolFadeHoldUntil<wr.now()}clearFadeHold(){this.symbolFadeHoldUntil=void 0}setHoldDuration(u){this.symbolFadeHoldUntil=wr.now()+u}setDependencies(u,Xe){const Wt={};for(const u of Xe)Wt[u]=!0;this.dependencies[u]=Wt}hasDependency(u,Xe){for(const Wt of u){const u=this.dependencies[Wt];if(u)for(const Wt of Xe)if(u[Wt])return!0}return!1}}class ht{constructor(u,Xe){this.max=u,this.onRemove=Xe,this.reset()}reset(){for(const u in this.data)for(const Xe of this.data[u])Xe.timeout&&clearTimeout(Xe.timeout),this.onRemove(Xe.value);return this.data={},this.order=[],this}add(u,Xe,Wt){const fr=u.wrapped().key;void 0===this.data[fr]&&(this.data[fr]=[]);const _r={value:Xe,timeout:void 0};if(void 0!==Wt&&(_r.timeout=setTimeout((()=>{this.remove(u,_r)}),Wt)),this.data[fr].push(_r),this.order.push(fr),this.order.length>this.max){const u=this._getAndRemoveByKey(this.order[0]);u&&this.onRemove(u)}return this}has(u){return u.wrapped().key in this.data}getAndRemove(u){return this.has(u)?this._getAndRemoveByKey(u.wrapped().key):null}_getAndRemoveByKey(u){const Xe=this.data[u].shift();return Xe.timeout&&clearTimeout(Xe.timeout),0===this.data[u].length&&delete this.data[u],this.order.splice(this.order.indexOf(u),1),Xe.value}getByKey(u){const Xe=this.data[u];return Xe?Xe[0].value:null}get(u){return this.has(u)?this.data[u.wrapped().key][0].value:null}remove(u,Xe){if(!this.has(u))return this;const Wt=u.wrapped().key,fr=void 0===Xe?0:this.data[Wt].indexOf(Xe),_r=this.data[Wt][fr];return this.data[Wt].splice(fr,1),_r.timeout&&clearTimeout(_r.timeout),0===this.data[Wt].length&&delete this.data[Wt],this.onRemove(_r.value),this.order.splice(this.order.indexOf(Wt),1),this}setMaxSize(u){for(this.max=u;this.order.length>this.max;){const u=this._getAndRemoveByKey(this.order[0]);u&&this.onRemove(u)}return this}filter(u){const Xe=[];for(const Wt in this.data)for(const fr of this.data[Wt])u(fr.value)||Xe.push(fr);for(const u of Xe)this.remove(u.value.tileID,u)}}class ct{constructor(){this.state={},this.stateChanges={},this.deletedStates={}}updateState(u,Wt,fr){const _r=String(Wt);if(this.stateChanges[u]=this.stateChanges[u]||{},this.stateChanges[u][_r]=this.stateChanges[u][_r]||{},Xe.e(this.stateChanges[u][_r],fr),null===this.deletedStates[u]){this.deletedStates[u]={};for(const Xe in this.state[u])Xe!==_r&&(this.deletedStates[u][Xe]=null)}else if(this.deletedStates[u]&&null===this.deletedStates[u][_r]){this.deletedStates[u][_r]={};for(const Xe in this.state[u][_r])fr[Xe]||(this.deletedStates[u][_r][Xe]=null)}else for(const Xe in fr)this.deletedStates[u]&&this.deletedStates[u][_r]&&null===this.deletedStates[u][_r][Xe]&&delete this.deletedStates[u][_r][Xe]}removeFeatureState(u,Xe,Wt){if(null===this.deletedStates[u])return;const fr=String(Xe);if(this.deletedStates[u]=this.deletedStates[u]||{},Wt&&void 0!==Xe)null!==this.deletedStates[u][fr]&&(this.deletedStates[u][fr]=this.deletedStates[u][fr]||{},this.deletedStates[u][fr][Wt]=null);else if(void 0!==Xe)if(this.stateChanges[u]&&this.stateChanges[u][fr])for(Wt in this.deletedStates[u][fr]={},this.stateChanges[u][fr])this.deletedStates[u][fr][Wt]=null;else this.deletedStates[u][fr]=null;else this.deletedStates[u]=null}getState(u,Wt){const fr=String(Wt),_r=Xe.e({},(this.state[u]||{})[fr],(this.stateChanges[u]||{})[fr]);if(null===this.deletedStates[u])return{};if(this.deletedStates[u]){const Xe=this.deletedStates[u][Wt];if(null===Xe)return{};for(const u in Xe)delete _r[u]}return _r}initializeTileState(u,Xe){u.setFeatureState(this.state,Xe)}coalesceChanges(u,Wt){const fr={};for(const u in this.stateChanges){this.state[u]=this.state[u]||{};const Wt={};for(const fr in this.stateChanges[u])this.state[u][fr]||(this.state[u][fr]={}),Xe.e(this.state[u][fr],this.stateChanges[u][fr]),Wt[fr]=this.state[u][fr];fr[u]=Wt}for(const u in this.deletedStates){this.state[u]=this.state[u]||{};const Wt={};if(null===this.deletedStates[u])for(const Xe in this.state[u])Wt[Xe]={},this.state[u][Xe]={};else for(const Xe in this.deletedStates[u]){if(null===this.deletedStates[u][Xe])this.state[u][Xe]={};else for(const Wt of Object.keys(this.deletedStates[u][Xe]))delete this.state[u][Xe][Wt];Wt[Xe]=this.state[u][Xe]}fr[u]=fr[u]||{},Xe.e(fr[u],Wt)}if(this.stateChanges={},this.deletedStates={},0!==Object.keys(fr).length)for(const Xe in u)u[Xe].setFeatureState(fr,Wt)}}class ut extends Xe.E{constructor(u,Xe,Wt){super(),this.id=u,this.dispatcher=Wt,this.on("data",(u=>this._dataHandler(u))),this.on("dataloading",(()=>{this._sourceErrored=!1})),this.on("error",(()=>{this._sourceErrored=this._source.loaded()})),this._source=((u,Xe,Wt,fr)=>{const _r=new(at(Xe.type))(u,Xe,Wt,fr);if(_r.id!==u)throw new Error(`Expected Source id to be ${u} instead of ${_r.id}`);return _r})(u,Xe,Wt,this),this._tiles={},this._cache=new ht(0,(u=>this._unloadTile(u))),this._timers={},this._cacheTimers={},this._maxTileCacheSize=null,this._maxTileCacheZoomLevels=null,this._loadedParentTiles={},this._coveredTiles={},this._state=new ct,this._didEmitContent=!1,this._updated=!1}onAdd(u){this.map=u,this._maxTileCacheSize=u?u._maxTileCacheSize:null,this._maxTileCacheZoomLevels=u?u._maxTileCacheZoomLevels:null,this._source&&this._source.onAdd&&this._source.onAdd(u)}onRemove(u){this.clearTiles(),this._source&&this._source.onRemove&&this._source.onRemove(u)}loaded(){if(this._sourceErrored)return!0;if(!this._sourceLoaded)return!1;if(!this._source.loaded())return!1;if(!(void 0===this.used&&void 0===this.usedForTerrain||this.used||this.usedForTerrain))return!0;if(!this._updated)return!1;for(const u in this._tiles){const Xe=this._tiles[u];if("loaded"!==Xe.state&&"errored"!==Xe.state)return!1}return!0}getSource(){return this._source}pause(){this._paused=!0}resume(){if(!this._paused)return;const u=this._shouldReloadOnResume;this._paused=!1,this._shouldReloadOnResume=!1,u&&this.reload(),this.transform&&this.update(this.transform,this.terrain)}_loadTile(u,Wt,fr){return Xe._(this,void 0,void 0,(function*(){try{yield this._source.loadTile(u),this._tileLoaded(u,Wt,fr)}catch(Wt){u.state="errored",404!==Wt.status?this._source.fire(new Xe.j(Wt,{tile:u})):this.update(this.transform,this.terrain)}}))}_unloadTile(u){this._source.unloadTile&&this._source.unloadTile(u)}_abortTile(u){this._source.abortTile&&this._source.abortTile(u),this._source.fire(new Xe.k("dataabort",{tile:u,coord:u.tileID,dataType:"source"}))}serialize(){return this._source.serialize()}prepare(u){this._source.prepare&&this._source.prepare(),this._state.coalesceChanges(this._tiles,this.map?this.map.painter:null);for(const Xe in this._tiles){const Wt=this._tiles[Xe];Wt.upload(u),Wt.prepare(this.map.style.imageManager)}}getIds(){return Object.values(this._tiles).map((u=>u.tileID)).sort(dt).map((u=>u.key))}getRenderableIds(u){const Wt=[];for(const Xe in this._tiles)this._isIdRenderable(Xe,u)&&Wt.push(this._tiles[Xe]);return u?Wt.sort(((u,Wt)=>{const fr=u.tileID,_r=Wt.tileID,wr=new Xe.P(fr.canonical.x,fr.canonical.y)._rotate(this.transform.angle),Ar=new Xe.P(_r.canonical.x,_r.canonical.y)._rotate(this.transform.angle);return fr.overscaledZ-_r.overscaledZ||Ar.y-wr.y||Ar.x-wr.x})).map((u=>u.tileID.key)):Wt.map((u=>u.tileID)).sort(dt).map((u=>u.key))}hasRenderableParent(u){const Xe=this.findLoadedParent(u,0);return!!Xe&&this._isIdRenderable(Xe.tileID.key)}_isIdRenderable(u,Xe){return this._tiles[u]&&this._tiles[u].hasData()&&!this._coveredTiles[u]&&(Xe||!this._tiles[u].holdingForFade())}reload(){if(this._paused)this._shouldReloadOnResume=!0;else{this._cache.reset();for(const u in this._tiles)"errored"!==this._tiles[u].state&&this._reloadTile(u,"reloading")}}_reloadTile(u,Wt){return Xe._(this,void 0,void 0,(function*(){const Xe=this._tiles[u];Xe&&("loading"!==Xe.state&&(Xe.state=Wt),yield this._loadTile(Xe,u,Wt))}))}_tileLoaded(u,Wt,fr){u.timeAdded=wr.now(),"expired"===fr&&(u.refreshedUponExpiration=!0),this._setTileReloadTimer(Wt,u),"raster-dem"===this.getSource().type&&u.dem&&this._backfillDEM(u),this._state.initializeTileState(u,this.map?this.map.painter:null),u.aborted||this._source.fire(new Xe.k("data",{dataType:"source",tile:u,coord:u.tileID}))}_backfillDEM(u){const Xe=this.getRenderableIds();for(let Wt=0;Wt<Xe.length;Wt++){const fr=Xe[Wt];if(u.neighboringTiles&&u.neighboringTiles[fr]){const Xe=this.getTileByID(fr);i(u,Xe),i(Xe,u)}}function i(u,Xe){u.needsHillshadePrepare=!0,u.needsTerrainPrepare=!0;let Wt=Xe.tileID.canonical.x-u.tileID.canonical.x;const fr=Xe.tileID.canonical.y-u.tileID.canonical.y,_r=Math.pow(2,u.tileID.canonical.z),wr=Xe.tileID.key;0===Wt&&0===fr||Math.abs(fr)>1||(Math.abs(Wt)>1&&(1===Math.abs(Wt+_r)?Wt+=_r:1===Math.abs(Wt-_r)&&(Wt-=_r)),Xe.dem&&u.dem&&(u.dem.backfillBorder(Xe.dem,Wt,fr),u.neighboringTiles&&u.neighboringTiles[wr]&&(u.neighboringTiles[wr].backfilled=!0)))}}getTile(u){return this.getTileByID(u.key)}getTileByID(u){return this._tiles[u]}_retainLoadedChildren(u,Xe,Wt,fr){for(const _r in this._tiles){let wr=this._tiles[_r];if(fr[_r]||!wr.hasData()||wr.tileID.overscaledZ<=Xe||wr.tileID.overscaledZ>Wt)continue;let Ar=wr.tileID;for(;wr&&wr.tileID.overscaledZ>Xe+1;){const u=wr.tileID.scaledTo(wr.tileID.overscaledZ-1);wr=this._tiles[u.key],wr&&wr.hasData()&&(Ar=u)}let Kr=Ar;for(;Kr.overscaledZ>Xe;)if(Kr=Kr.scaledTo(Kr.overscaledZ-1),u[Kr.key]){fr[Ar.key]=Ar;break}}}findLoadedParent(u,Xe){if(u.key in this._loadedParentTiles){const Wt=this._loadedParentTiles[u.key];return Wt&&Wt.tileID.overscaledZ>=Xe?Wt:null}for(let Wt=u.overscaledZ-1;Wt>=Xe;Wt--){const Xe=u.scaledTo(Wt),fr=this._getLoadedTile(Xe);if(fr)return fr}}findLoadedSibling(u){return this._getLoadedTile(u)}_getLoadedTile(u){const Xe=this._tiles[u.key];return Xe&&Xe.hasData()?Xe:this._cache.getByKey(u.wrapped().key)}updateCacheSize(u){const Wt=Math.ceil(u.width/this._source.tileSize)+1,fr=Math.ceil(u.height/this._source.tileSize)+1,_r=Math.floor(Wt*fr*(null===this._maxTileCacheZoomLevels?Xe.a.MAX_TILE_CACHE_ZOOM_LEVELS:this._maxTileCacheZoomLevels)),wr="number"==typeof this._maxTileCacheSize?Math.min(this._maxTileCacheSize,_r):_r;this._cache.setMaxSize(wr)}handleWrapJump(u){const Xe=Math.round((u-(void 0===this._prevLng?u:this._prevLng))/360);if(this._prevLng=u,Xe){const u={};for(const Wt in this._tiles){const fr=this._tiles[Wt];fr.tileID=fr.tileID.unwrapTo(fr.tileID.wrap+Xe),u[fr.tileID.key]=fr}this._tiles=u;for(const u in this._timers)clearTimeout(this._timers[u]),delete this._timers[u];for(const u in this._tiles)this._setTileReloadTimer(u,this._tiles[u])}}_updateCoveredAndRetainedTiles(u,Xe,Wt,fr,_r,Ar){const Kr={},In={},no=Object.keys(u),io=wr.now();for(const Wt of no){const fr=u[Wt],_r=this._tiles[Wt];if(!_r||0!==_r.fadeEndTime&&_r.fadeEndTime<=io)continue;const wr=this.findLoadedParent(fr,Xe),Ar=this.findLoadedSibling(fr),no=wr||Ar||null;no&&(this._addTile(no.tileID),Kr[no.tileID.key]=no.tileID),In[Wt]=fr}this._retainLoadedChildren(In,fr,Wt,u);for(const Xe in Kr)u[Xe]||(this._coveredTiles[Xe]=!0,u[Xe]=Kr[Xe]);if(Ar){const Xe={},Wt={};for(const u of _r)this._tiles[u.key].hasData()?Xe[u.key]=u:Wt[u.key]=u;for(const fr in Wt){const _r=Wt[fr].children(this._source.maxzoom);this._tiles[_r[0].key]&&this._tiles[_r[1].key]&&this._tiles[_r[2].key]&&this._tiles[_r[3].key]&&(Xe[_r[0].key]=u[_r[0].key]=_r[0],Xe[_r[1].key]=u[_r[1].key]=_r[1],Xe[_r[2].key]=u[_r[2].key]=_r[2],Xe[_r[3].key]=u[_r[3].key]=_r[3],delete Wt[fr])}for(const fr in Wt){const _r=Wt[fr],wr=this.findLoadedParent(_r,this._source.minzoom),Ar=this.findLoadedSibling(_r),Kr=wr||Ar||null;if(Kr){Xe[Kr.tileID.key]=u[Kr.tileID.key]=Kr.tileID;for(const u in Xe)Xe[u].isChildOf(Kr.tileID)&&delete Xe[u]}}for(const u in this._tiles)Xe[u]||(this._coveredTiles[u]=!0)}}update(u,Wt){if(!this._sourceLoaded||this._paused)return;let fr;this.transform=u,this.terrain=Wt,this.updateCacheSize(u),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={},this.used||this.usedForTerrain?this._source.tileID?fr=u.getVisibleUnwrappedCoordinates(this._source.tileID).map((u=>new Xe.S(u.canonical.z,u.wrap,u.canonical.z,u.canonical.x,u.canonical.y))):(fr=u.coveringTiles({tileSize:this.usedForTerrain?this.tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:!this.usedForTerrain&&this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled,terrain:Wt}),this._source.hasTile&&(fr=fr.filter((u=>this._source.hasTile(u))))):fr=[];const _r=u.coveringZoomLevel(this._source),wr=Math.max(_r-ut.maxOverzooming,this._source.minzoom),Ar=Math.max(_r+ut.maxUnderzooming,this._source.minzoom);if(this.usedForTerrain){const u={};for(const Xe of fr)if(Xe.canonical.z>this._source.minzoom){const Wt=Xe.scaledTo(Xe.canonical.z-1);u[Wt.key]=Wt;const fr=Xe.scaledTo(Math.max(this._source.minzoom,Math.min(Xe.canonical.z,5)));u[fr.key]=fr}fr=fr.concat(Object.values(u))}const Kr=0===fr.length&&!this._updated&&this._didEmitContent;this._updated=!0,Kr&&this.fire(new Xe.k("data",{sourceDataType:"idle",dataType:"source",sourceId:this.id}));const In=this._updateRetainedTiles(fr,_r);_t(this._source.type)&&this._updateCoveredAndRetainedTiles(In,wr,Ar,_r,fr,Wt);for(const u in In)this._tiles[u].clearFadeHold();const no=Xe.ab(this._tiles,In);for(const u of no){const Xe=this._tiles[u];Xe.hasSymbolBuckets&&!Xe.holdingForFade()?Xe.setHoldDuration(this.map._fadeDuration):Xe.hasSymbolBuckets&&!Xe.symbolFadeFinished()||this._removeTile(u)}this._updateLoadedParentTileCache(),this._updateLoadedSiblingTileCache()}releaseSymbolFadeTiles(){for(const u in this._tiles)this._tiles[u].holdingForFade()&&this._removeTile(u)}_updateRetainedTiles(u,Xe){var Wt;const fr={},_r={},wr=Math.max(Xe-ut.maxOverzooming,this._source.minzoom),Ar=Math.max(Xe+ut.maxUnderzooming,this._source.minzoom),Kr={};for(const Wt of u){const u=this._addTile(Wt);fr[Wt.key]=Wt,u.hasData()||Xe<this._source.maxzoom&&(Kr[Wt.key]=Wt)}this._retainLoadedChildren(Kr,Xe,Ar,fr);for(const Ar of u){let u=this._tiles[Ar.key];if(u.hasData())continue;if(Xe+1>this._source.maxzoom){const u=Ar.children(this._source.maxzoom)[0],Xe=this.getTile(u);if(Xe&&Xe.hasData()){fr[u.key]=u;continue}}else{const u=Ar.children(this._source.maxzoom);if(fr[u[0].key]&&fr[u[1].key]&&fr[u[2].key]&&fr[u[3].key])continue}let Kr=u.wasRequested();for(let Xe=Ar.overscaledZ-1;Xe>=wr;--Xe){const wr=Ar.scaledTo(Xe);if(_r[wr.key])break;if(_r[wr.key]=!0,u=this.getTile(wr),!u&&Kr&&(u=this._addTile(wr)),u){const Xe=u.hasData();if((Xe||!(null===(Wt=this.map)||void 0===Wt?void 0:Wt.cancelPendingTileRequestsWhileZooming)||Kr)&&(fr[wr.key]=wr),Kr=u.wasRequested(),Xe)break}}}return fr}_updateLoadedParentTileCache(){this._loadedParentTiles={};for(const u in this._tiles){const Xe=[];let Wt,fr=this._tiles[u].tileID;for(;fr.overscaledZ>0;){if(fr.key in this._loadedParentTiles){Wt=this._loadedParentTiles[fr.key];break}Xe.push(fr.key);const u=fr.scaledTo(fr.overscaledZ-1);if(Wt=this._getLoadedTile(u),Wt)break;fr=u}for(const u of Xe)this._loadedParentTiles[u]=Wt}}_updateLoadedSiblingTileCache(){this._loadedSiblingTiles={};for(const u in this._tiles){const Xe=this._tiles[u].tileID,Wt=this._getLoadedTile(Xe);this._loadedSiblingTiles[Xe.key]=Wt}}_addTile(u){let Wt=this._tiles[u.key];if(Wt)return Wt;Wt=this._cache.getAndRemove(u),Wt&&(this._setTileReloadTimer(u.key,Wt),Wt.tileID=u,this._state.initializeTileState(Wt,this.map?this.map.painter:null),this._cacheTimers[u.key]&&(clearTimeout(this._cacheTimers[u.key]),delete this._cacheTimers[u.key],this._setTileReloadTimer(u.key,Wt)));const fr=Wt;return Wt||(Wt=new lt(u,this._source.tileSize*u.overscaleFactor()),this._loadTile(Wt,u.key,Wt.state)),Wt.uses++,this._tiles[u.key]=Wt,fr||this._source.fire(new Xe.k("dataloading",{tile:Wt,coord:Wt.tileID,dataType:"source"})),Wt}_setTileReloadTimer(u,Xe){u in this._timers&&(clearTimeout(this._timers[u]),delete this._timers[u]);const Wt=Xe.getExpiryTimeout();Wt&&(this._timers[u]=setTimeout((()=>{this._reloadTile(u,"expired"),delete this._timers[u]}),Wt))}_removeTile(u){const Xe=this._tiles[u];Xe&&(Xe.uses--,delete this._tiles[u],this._timers[u]&&(clearTimeout(this._timers[u]),delete this._timers[u]),Xe.uses>0||(Xe.hasData()&&"reloading"!==Xe.state?this._cache.add(Xe.tileID,Xe,Xe.getExpiryTimeout()):(Xe.aborted=!0,this._abortTile(Xe),this._unloadTile(Xe))))}_dataHandler(u){const Xe=u.sourceDataType;"source"===u.dataType&&"metadata"===Xe&&(this._sourceLoaded=!0),this._sourceLoaded&&!this._paused&&"source"===u.dataType&&"content"===Xe&&(this.reload(),this.transform&&this.update(this.transform,this.terrain),this._didEmitContent=!0)}clearTiles(){this._shouldReloadOnResume=!1,this._paused=!1;for(const u in this._tiles)this._removeTile(u);this._cache.reset()}tilesIn(u,Wt,fr){const _r=[],wr=this.transform;if(!wr)return _r;const Ar=fr?wr.getCameraQueryGeometry(u):u,Kr=u.map((u=>wr.pointCoordinate(u,this.terrain))),In=Ar.map((u=>wr.pointCoordinate(u,this.terrain))),no=this.getIds();let io=1/0,oo=1/0,ao=-1/0,so=-1/0;for(const u of In)io=Math.min(io,u.x),oo=Math.min(oo,u.y),ao=Math.max(ao,u.x),so=Math.max(so,u.y);for(let u=0;u<no.length;u++){const fr=this._tiles[no[u]];if(fr.holdingForFade())continue;const Ar=fr.tileID,co=Math.pow(2,wr.zoom-fr.tileID.overscaledZ),ho=Wt*fr.queryPadding*Xe.X/fr.tileSize/co,go=[Ar.getTilePoint(new Xe.Z(io,oo)),Ar.getTilePoint(new Xe.Z(ao,so))];if(go[0].x-ho<Xe.X&&go[0].y-ho<Xe.X&&go[1].x+ho>=0&&go[1].y+ho>=0){const u=Kr.map((u=>Ar.getTilePoint(u))),Xe=In.map((u=>Ar.getTilePoint(u)));_r.push({tile:fr,tileID:Ar,queryGeometry:u,cameraQueryGeometry:Xe,scale:co})}}return _r}getVisibleCoordinates(u){const Xe=this.getRenderableIds(u).map((u=>this._tiles[u].tileID));for(const u of Xe)u.posMatrix=this.transform.calculatePosMatrix(u.toUnwrapped());return Xe}hasTransition(){if(this._source.hasTransition())return!0;if(_t(this._source.type)){const u=wr.now();for(const Xe in this._tiles)if(this._tiles[Xe].fadeEndTime>=u)return!0}return!1}setFeatureState(u,Xe,Wt){this._state.updateState(u=u||"_geojsonTileLayer",Xe,Wt)}removeFeatureState(u,Xe,Wt){this._state.removeFeatureState(u=u||"_geojsonTileLayer",Xe,Wt)}getFeatureState(u,Xe){return this._state.getState(u=u||"_geojsonTileLayer",Xe)}setDependencies(u,Xe,Wt){const fr=this._tiles[u];fr&&fr.setDependencies(Xe,Wt)}reloadTilesForDependencies(u,Xe){for(const Wt in this._tiles)this._tiles[Wt].hasDependency(u,Xe)&&this._reloadTile(Wt,"reloading");this._cache.filter((Wt=>!Wt.hasDependency(u,Xe)))}}function dt(u,Xe){const Wt=Math.abs(2*u.wrap)-+(u.wrap<0),fr=Math.abs(2*Xe.wrap)-+(Xe.wrap<0);return u.overscaledZ-Xe.overscaledZ||fr-Wt||Xe.canonical.y-u.canonical.y||Xe.canonical.x-u.canonical.x}function _t(u){return"raster"===u||"image"===u||"video"===u}ut.maxOverzooming=10,ut.maxUnderzooming=3;class pt{constructor(u,Xe){this.reset(u,Xe)}reset(u,Xe){this.points=u||[],this._distances=[0];for(let u=1;u<this.points.length;u++)this._distances[u]=this._distances[u-1]+this.points[u].dist(this.points[u-1]);this.length=this._distances[this._distances.length-1],this.padding=Math.min(Xe||0,.5*this.length),this.paddedLength=this.length-2*this.padding}lerp(u){if(1===this.points.length)return this.points[0];u=Xe.ac(u,0,1);let Wt=1,fr=this._distances[Wt];const _r=u*this.paddedLength+this.padding;for(;fr<_r&&Wt<this._distances.length;)fr=this._distances[++Wt];const wr=Wt-1,Ar=this._distances[wr],Kr=fr-Ar,In=Kr>0?(_r-Ar)/Kr:0;return this.points[wr].mult(1-In).add(this.points[Wt].mult(In))}}function mt(u,Xe){let Wt=!0;return"always"===u||"never"!==u&&"never"!==Xe||(Wt=!1),Wt}class ft{constructor(u,Xe,Wt){const fr=this.boxCells=[],_r=this.circleCells=[];this.xCellCount=Math.ceil(u/Wt),this.yCellCount=Math.ceil(Xe/Wt);for(let u=0;u<this.xCellCount*this.yCellCount;u++)fr.push([]),_r.push([]);this.circleKeys=[],this.boxKeys=[],this.bboxes=[],this.circles=[],this.width=u,this.height=Xe,this.xScale=this.xCellCount/u,this.yScale=this.yCellCount/Xe,this.boxUid=0,this.circleUid=0}keysLength(){return this.boxKeys.length+this.circleKeys.length}insert(u,Xe,Wt,fr,_r){this._forEachCell(Xe,Wt,fr,_r,this._insertBoxCell,this.boxUid++),this.boxKeys.push(u),this.bboxes.push(Xe),this.bboxes.push(Wt),this.bboxes.push(fr),this.bboxes.push(_r)}insertCircle(u,Xe,Wt,fr){this._forEachCell(Xe-fr,Wt-fr,Xe+fr,Wt+fr,this._insertCircleCell,this.circleUid++),this.circleKeys.push(u),this.circles.push(Xe),this.circles.push(Wt),this.circles.push(fr)}_insertBoxCell(u,Xe,Wt,fr,_r,wr){this.boxCells[_r].push(wr)}_insertCircleCell(u,Xe,Wt,fr,_r,wr){this.circleCells[_r].push(wr)}_query(u,Xe,Wt,fr,_r,wr,Ar){if(Wt<0||u>this.width||fr<0||Xe>this.height)return[];const Kr=[];if(u<=0&&Xe<=0&&this.width<=Wt&&this.height<=fr){if(_r)return[{key:null,x1:u,y1:Xe,x2:Wt,y2:fr}];for(let u=0;u<this.boxKeys.length;u++)Kr.push({key:this.boxKeys[u],x1:this.bboxes[4*u],y1:this.bboxes[4*u+1],x2:this.bboxes[4*u+2],y2:this.bboxes[4*u+3]});for(let u=0;u<this.circleKeys.length;u++){const Xe=this.circles[3*u],Wt=this.circles[3*u+1],fr=this.circles[3*u+2];Kr.push({key:this.circleKeys[u],x1:Xe-fr,y1:Wt-fr,x2:Xe+fr,y2:Wt+fr})}}else this._forEachCell(u,Xe,Wt,fr,this._queryCell,Kr,{hitTest:_r,overlapMode:wr,seenUids:{box:{},circle:{}}},Ar);return Kr}query(u,Xe,Wt,fr){return this._query(u,Xe,Wt,fr,!1,null)}hitTest(u,Xe,Wt,fr,_r,wr){return this._query(u,Xe,Wt,fr,!0,_r,wr).length>0}hitTestCircle(u,Xe,Wt,fr,_r){const wr=u-Wt,Ar=u+Wt,Kr=Xe-Wt,In=Xe+Wt;if(Ar<0||wr>this.width||In<0||Kr>this.height)return!1;const no=[];return this._forEachCell(wr,Kr,Ar,In,this._queryCellCircle,no,{hitTest:!0,overlapMode:fr,circle:{x:u,y:Xe,radius:Wt},seenUids:{box:{},circle:{}}},_r),no.length>0}_queryCell(u,Xe,Wt,fr,_r,wr,Ar,Kr){const{seenUids:In,hitTest:no,overlapMode:io}=Ar,oo=this.boxCells[_r];if(null!==oo){const _r=this.bboxes;for(const Ar of oo)if(!In.box[Ar]){In.box[Ar]=!0;const oo=4*Ar,ao=this.boxKeys[Ar];if(u<=_r[oo+2]&&Xe<=_r[oo+3]&&Wt>=_r[oo+0]&&fr>=_r[oo+1]&&(!Kr||Kr(ao))&&(!no||!mt(io,ao.overlapMode))&&(wr.push({key:ao,x1:_r[oo],y1:_r[oo+1],x2:_r[oo+2],y2:_r[oo+3]}),no))return!0}}const ao=this.circleCells[_r];if(null!==ao){const _r=this.circles;for(const Ar of ao)if(!In.circle[Ar]){In.circle[Ar]=!0;const oo=3*Ar,ao=this.circleKeys[Ar];if(this._circleAndRectCollide(_r[oo],_r[oo+1],_r[oo+2],u,Xe,Wt,fr)&&(!Kr||Kr(ao))&&(!no||!mt(io,ao.overlapMode))){const u=_r[oo],Xe=_r[oo+1],Wt=_r[oo+2];if(wr.push({key:ao,x1:u-Wt,y1:Xe-Wt,x2:u+Wt,y2:Xe+Wt}),no)return!0}}}return!1}_queryCellCircle(u,Xe,Wt,fr,_r,wr,Ar,Kr){const{circle:In,seenUids:no,overlapMode:io}=Ar,oo=this.boxCells[_r];if(null!==oo){const u=this.bboxes;for(const Xe of oo)if(!no.box[Xe]){no.box[Xe]=!0;const Wt=4*Xe,fr=this.boxKeys[Xe];if(this._circleAndRectCollide(In.x,In.y,In.radius,u[Wt+0],u[Wt+1],u[Wt+2],u[Wt+3])&&(!Kr||Kr(fr))&&!mt(io,fr.overlapMode))return wr.push(!0),!0}}const ao=this.circleCells[_r];if(null!==ao){const u=this.circles;for(const Xe of ao)if(!no.circle[Xe]){no.circle[Xe]=!0;const Wt=3*Xe,fr=this.circleKeys[Xe];if(this._circlesCollide(u[Wt],u[Wt+1],u[Wt+2],In.x,In.y,In.radius)&&(!Kr||Kr(fr))&&!mt(io,fr.overlapMode))return wr.push(!0),!0}}}_forEachCell(u,Xe,Wt,fr,_r,wr,Ar,Kr){const In=this._convertToXCellCoord(u),no=this._convertToYCellCoord(Xe),io=this._convertToXCellCoord(Wt),oo=this._convertToYCellCoord(fr);for(let ao=In;ao<=io;ao++)for(let In=no;In<=oo;In++)if(_r.call(this,u,Xe,Wt,fr,this.xCellCount*In+ao,wr,Ar,Kr))return}_convertToXCellCoord(u){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(u*this.xScale)))}_convertToYCellCoord(u){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(u*this.yScale)))}_circlesCollide(u,Xe,Wt,fr,_r,wr){const Ar=fr-u,Kr=_r-Xe,In=Wt+wr;return In*In>Ar*Ar+Kr*Kr}_circleAndRectCollide(u,Xe,Wt,fr,_r,wr,Ar){const Kr=(wr-fr)/2,In=Math.abs(u-(fr+Kr));if(In>Kr+Wt)return!1;const no=(Ar-_r)/2,io=Math.abs(Xe-(_r+no));if(io>no+Wt)return!1;if(In<=Kr||io<=no)return!0;const oo=In-Kr,ao=io-no;return oo*oo+ao*ao<=Wt*Wt}}function gt(u,Wt,fr,_r,wr){const Ar=Xe.H();return Wt?(Xe.K(Ar,Ar,[1/wr,1/wr,1]),fr||Xe.ad(Ar,Ar,_r.angle)):Xe.L(Ar,_r.labelPlaneMatrix,u),Ar}function vt(u,Wt,fr,_r,wr){if(Wt){const Wt=Xe.ae(u);return Xe.K(Wt,Wt,[wr,wr,1]),fr||Xe.ad(Wt,Wt,-_r.angle),Wt}return _r.glCoordMatrix}function xt(u,Wt,fr,_r){let wr;_r?(wr=[u,Wt,_r(u,Wt),1],Xe.af(wr,wr,fr)):(wr=[u,Wt,0,1],kt(wr,wr,fr));const Ar=wr[3];return{point:new Xe.P(wr[0]/Ar,wr[1]/Ar),signedDistanceFromCamera:Ar,isOccluded:!1}}function yt(u,Xe){return.5+u/Xe*.5}function bt(u,Xe){return u.x>=-Xe[0]&&u.x<=Xe[0]&&u.y>=-Xe[1]&&u.y<=Xe[1]}function wt(u,Wt,fr,_r,wr,Ar,Kr,In,no,io,oo,ao,so,co,ho){const go=_r?u.textSizeData:u.iconSizeData,xo=Xe.ag(go,fr.transform.zoom),ko=[256/fr.width*2+1,256/fr.height*2+1],Co=_r?u.text.dynamicLayoutVertexArray:u.icon.dynamicLayoutVertexArray;Co.clear();const Io=u.lineVertexArray,zo=_r?u.text.placedSymbolArray:u.icon.placedSymbolArray,Bo=fr.transform.width/fr.transform.height;let ca=!1;for(let _r=0;_r<zo.length;_r++){const ua=zo.get(_r);if(ua.hidden||ua.writingMode===Xe.ah.vertical&&!ca){Rt(ua.numGlyphs,Co);continue}ca=!1;const Da=xt(ua.anchorX,ua.anchorY,Wt,ho);if(!bt(Da.point,ko)){Rt(ua.numGlyphs,Co);continue}const ns=yt(fr.transform.cameraToCenterDistance,Da.signedDistanceFromCamera),yl=Xe.ai(go,xo,ua),vl=Kr?yl/ns:yl*ns,kl={getElevation:ho,labelPlaneMatrix:wr,lineVertexArray:Io,pitchWithMap:Kr,projectionCache:{projections:{},offsets:{},cachedAnchorPoint:void 0,anyProjectionOccluded:!1},projection:io,tileAnchorPoint:new Xe.P(ua.anchorX,ua.anchorY),unwrappedTileID:oo,width:ao,height:so,translation:co},Al=Et(kl,ua,vl,!1,In,Wt,Ar,u.glyphOffsetArray,Co,Bo,no);ca=Al.useVertical,(Al.notEnoughRoom||ca||Al.needsFlipping&&Et(kl,ua,vl,!0,In,Wt,Ar,u.glyphOffsetArray,Co,Bo,no).notEnoughRoom)&&Rt(ua.numGlyphs,Co)}_r?u.text.dynamicLayoutVertexBuffer.updateData(Co):u.icon.dynamicLayoutVertexBuffer.updateData(Co)}function Tt(u,Xe,Wt,fr,_r,wr,Ar,Kr){const In=wr.glyphStartIndex+wr.numGlyphs,no=wr.lineStartIndex,io=wr.lineStartIndex+wr.lineLength,oo=Xe.getoffsetX(wr.glyphStartIndex),ao=Xe.getoffsetX(In-1),so=Mt(u*oo,Wt,fr,_r,wr.segment,no,io,Kr,Ar);if(!so)return null;const co=Mt(u*ao,Wt,fr,_r,wr.segment,no,io,Kr,Ar);return co?Kr.projectionCache.anyProjectionOccluded?null:{first:so,last:co}:null}function It(u,Wt,fr,_r){return u===Xe.ah.horizontal&&Math.abs(fr.y-Wt.y)>Math.abs(fr.x-Wt.x)*_r?{useVertical:!0}:(u===Xe.ah.vertical?Wt.y<fr.y:Wt.x>fr.x)?{needsFlipping:!0}:null}function Et(u,Wt,fr,_r,wr,Ar,Kr,In,no,io,oo){const ao=fr/24,so=Wt.lineOffsetX*ao,co=Wt.lineOffsetY*ao;let ho;if(Wt.numGlyphs>1){const Xe=Wt.glyphStartIndex+Wt.numGlyphs,fr=Wt.lineStartIndex,Ar=Wt.lineStartIndex+Wt.lineLength,no=Tt(ao,In,so,co,_r,Wt,oo,u);if(!no)return{notEnoughRoom:!0};const go=xt(no.first.point.x,no.first.point.y,Kr,u.getElevation).point,xo=xt(no.last.point.x,no.last.point.y,Kr,u.getElevation).point;if(wr&&!_r){const u=It(Wt.writingMode,go,xo,io);if(u)return u}ho=[no.first];for(let wr=Wt.glyphStartIndex+1;wr<Xe-1;wr++)ho.push(Mt(ao*In.getoffsetX(wr),so,co,_r,Wt.segment,fr,Ar,u,oo));ho.push(no.last)}else{if(wr&&!_r){const fr=xt(u.tileAnchorPoint.x,u.tileAnchorPoint.y,Ar,u.getElevation).point,_r=Wt.lineStartIndex+Wt.segment+1,wr=new Xe.P(u.lineVertexArray.getx(_r),u.lineVertexArray.gety(_r)),Kr=xt(wr.x,wr.y,Ar,u.getElevation),In=Kr.signedDistanceFromCamera>0?Kr.point:function(u,Xe,Wt,fr,_r,wr){return Pt(u,Xe,Wt,1,_r,wr)}(u.tileAnchorPoint,wr,fr,0,Ar,u),no=It(Wt.writingMode,fr,In,io);if(no)return no}const fr=Mt(ao*In.getoffsetX(Wt.glyphStartIndex),so,co,_r,Wt.segment,Wt.lineStartIndex,Wt.lineStartIndex+Wt.lineLength,u,oo);if(!fr||u.projectionCache.anyProjectionOccluded)return{notEnoughRoom:!0};ho=[fr]}for(const u of ho)Xe.aj(no,u.point,u.angle);return{}}function Pt(u,Xe,Wt,fr,_r,wr){const Ar=u.add(u.sub(Xe)._unit()),Kr=void 0!==_r?xt(Ar.x,Ar.y,_r,wr.getElevation).point:St(Ar.x,Ar.y,wr).point,In=Wt.sub(Kr);return Wt.add(In._mult(fr/In.mag()))}function Ct(u,Wt,fr){const _r=Wt.projectionCache;if(_r.projections[u])return _r.projections[u];const wr=new Xe.P(Wt.lineVertexArray.getx(u),Wt.lineVertexArray.gety(u)),Ar=St(wr.x,wr.y,Wt);if(Ar.signedDistanceFromCamera>0)return _r.projections[u]=Ar.point,_r.anyProjectionOccluded=_r.anyProjectionOccluded||Ar.isOccluded,Ar.point;const Kr=u-fr.direction;return function(u,Xe,Wt,fr,_r){return Pt(u,Xe,Wt,fr,void 0,_r)}(0===fr.distanceFromAnchor?Wt.tileAnchorPoint:new Xe.P(Wt.lineVertexArray.getx(Kr),Wt.lineVertexArray.gety(Kr)),wr,fr.previousVertex,fr.absOffsetX-fr.distanceFromAnchor+1,Wt)}function St(u,Xe,Wt){const fr=u+Wt.translation[0],_r=Xe+Wt.translation[1];let wr;return!Wt.pitchWithMap&&Wt.projection.useSpecialProjectionForSymbols?(wr=Wt.projection.projectTileCoordinates(fr,_r,Wt.unwrappedTileID,Wt.getElevation),wr.point.x=(.5*wr.point.x+.5)*Wt.width,wr.point.y=(.5*-wr.point.y+.5)*Wt.height):(wr=xt(fr,_r,Wt.labelPlaneMatrix,Wt.getElevation),wr.isOccluded=!1),wr}function zt(u,Xe,Wt){return u._unit()._perp()._mult(Xe*Wt)}function Dt(u,Wt,fr,_r,wr,Ar,Kr,In,no){if(In.projectionCache.offsets[u])return In.projectionCache.offsets[u];const io=fr.add(Wt);if(u+no.direction<_r||u+no.direction>=wr)return In.projectionCache.offsets[u]=io,io;const oo=Ct(u+no.direction,In,no),ao=zt(oo.sub(fr),Kr,no.direction),so=fr.add(ao),co=oo.add(ao);return In.projectionCache.offsets[u]=Xe.ak(Ar,io,so,co)||io,In.projectionCache.offsets[u]}function Mt(u,Xe,Wt,fr,_r,wr,Ar,Kr,In){const no=fr?u-Xe:u+Xe;let io=no>0?1:-1,oo=0;fr&&(io*=-1,oo=Math.PI),io<0&&(oo+=Math.PI);let ao,so=io>0?wr+_r:wr+_r+1;Kr.projectionCache.cachedAnchorPoint?ao=Kr.projectionCache.cachedAnchorPoint:(ao=St(Kr.tileAnchorPoint.x,Kr.tileAnchorPoint.y,Kr).point,Kr.projectionCache.cachedAnchorPoint=ao);let co,ho,go=ao,xo=ao,ko=0,Co=0;const Io=Math.abs(no),zo=[];let Bo;for(;ko+Co<=Io;){if(so+=io,so<wr||so>=Ar)return null;ko+=Co,xo=go,ho=co;const u={absOffsetX:Io,direction:io,distanceFromAnchor:ko,previousVertex:xo};if(go=Ct(so,Kr,u),0===Wt)zo.push(xo),Bo=go.sub(xo);else{let Xe;const fr=go.sub(xo);Xe=0===fr.mag()?zt(Ct(so+io,Kr,u).sub(go),Wt,io):zt(fr,Wt,io),ho||(ho=xo.add(Xe)),co=Dt(so,Xe,go,wr,Ar,ho,Wt,Kr,u),zo.push(ho),Bo=co.sub(ho)}Co=Bo.mag()}const ca=Bo._mult((Io-ko)/Co)._add(ho||xo),ua=oo+Math.atan2(go.y-xo.y,go.x-xo.x);return zo.push(ca),{point:ca,angle:In?ua:0,path:zo}}const ua=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function Rt(u,Xe){for(let Wt=0;Wt<u;Wt++){const u=Xe.length;Xe.resize(u+4),Xe.float32.set(ua,3*u)}}function kt(u,Xe,Wt){const fr=Xe[0],_r=Xe[1];return u[0]=Wt[0]*fr+Wt[4]*_r+Wt[12],u[1]=Wt[1]*fr+Wt[5]*_r+Wt[13],u[3]=Wt[3]*fr+Wt[7]*_r+Wt[15],u}const Da=100;class Ft{constructor(u,Xe,Wt=new ft(u.width+200,u.height+200,25),fr=new ft(u.width+200,u.height+200,25)){this.transform=u,this.mapProjection=Xe,this.grid=Wt,this.ignoredGrid=fr,this.pitchFactor=Math.cos(u._pitch)*u.cameraToCenterDistance,this.screenRightBoundary=u.width+Da,this.screenBottomBoundary=u.height+Da,this.gridRightBoundary=u.width+200,this.gridBottomBoundary=u.height+200,this.perspectiveRatioCutoff=.6}placeCollisionBox(u,Xe,Wt,fr,_r,wr,Ar,Kr,In,no,io){const oo=u.anchorPointX+Kr[0],ao=u.anchorPointY+Kr[1],so=this.projectAndGetPerspectiveRatio(fr,oo,ao,_r,no),co=Wt*so.perspectiveRatio;let ho;if(wr||Ar)ho=this._projectCollisionBox(u,co,fr,_r,wr,Ar,Kr,so,no,io);else{const Xe=so.point.x+(io?io.x*co:0),Wt=so.point.y+(io?io.y*co:0);ho={allPointsOccluded:!1,box:[Xe+u.x1*co,Wt+u.y1*co,Xe+u.x2*co,Wt+u.y2*co]}}const[go,xo,ko,Co]=ho.box;return this.mapProjection.useSpecialProjectionForSymbols&&(wr?ho.allPointsOccluded:this.mapProjection.isOccluded(oo,ao,_r))||so.perspectiveRatio<this.perspectiveRatioCutoff||!this.isInsideGrid(go,xo,ko,Co)||"always"!==Xe&&this.grid.hitTest(go,xo,ko,Co,Xe,In)?{box:[go,xo,ko,Co],placeable:!1,offscreen:!1}:{box:[go,xo,ko,Co],placeable:!0,offscreen:this.isOffscreen(go,xo,ko,Co)}}placeCollisionCircles(u,Wt,fr,_r,wr,Ar,Kr,In,no,io,oo,ao,so,co,ho,go){const xo=[],ko=new Xe.P(Wt.anchorX,Wt.anchorY),Co=this.getPerspectiveRatio(Ar,ko.x,ko.y,Kr,go),Io=(oo?wr/Co:wr*Co)/Xe.ap,zo={getElevation:go,labelPlaneMatrix:In,lineVertexArray:fr,pitchWithMap:oo,projectionCache:{projections:{},offsets:{},cachedAnchorPoint:void 0,anyProjectionOccluded:!1},projection:this.mapProjection,tileAnchorPoint:ko,unwrappedTileID:Kr,width:this.transform.width,height:this.transform.height,translation:ho},Bo=Tt(Io,_r,Wt.lineOffsetX*Io,Wt.lineOffsetY*Io,!1,Wt,!1,zo);let ca=!1,ua=!1,ns=!0;if(Bo){const Wt=.5*so*Co+co,fr=new Xe.P(-100,-100),_r=new Xe.P(this.screenRightBoundary,this.screenBottomBoundary),wr=new pt,Ar=Bo.first,Kr=Bo.last;let In=[];for(let u=Ar.path.length-1;u>=1;u--)In.push(Ar.path[u]);for(let u=1;u<Kr.path.length;u++)In.push(Kr.path[u]);const oo=2.5*Wt;if(no){const u=this.projectPathToScreenSpace(In,zo,no);In=u.some((u=>u.signedDistanceFromCamera<=0))?[]:u.map((u=>u.point))}let ho=[];if(In.length>0){const u=In[0].clone(),Wt=In[0].clone();for(let Xe=1;Xe<In.length;Xe++)u.x=Math.min(u.x,In[Xe].x),u.y=Math.min(u.y,In[Xe].y),Wt.x=Math.max(Wt.x,In[Xe].x),Wt.y=Math.max(Wt.y,In[Xe].y);ho=u.x>=fr.x&&Wt.x<=_r.x&&u.y>=fr.y&&Wt.y<=_r.y?[In]:Wt.x<fr.x||u.x>_r.x||Wt.y<fr.y||u.y>_r.y?[]:Xe.al([In],fr.x,fr.y,_r.x,_r.y)}for(const Xe of ho){wr.reset(Xe,.25*Wt);let fr=0;fr=wr.length<=.5*Wt?1:Math.ceil(wr.paddedLength/oo)+1;for(let Xe=0;Xe<fr;Xe++){const _r=Xe/Math.max(fr-1,1),Ar=wr.lerp(_r),Kr=Ar.x+Da,In=Ar.y+Da;xo.push(Kr,In,Wt,0);const no=Kr-Wt,oo=In-Wt,so=Kr+Wt,co=In+Wt;if(ns=ns&&this.isOffscreen(no,oo,so,co),ua=ua||this.isInsideGrid(no,oo,so,co),"always"!==u&&this.grid.hitTestCircle(Kr,In,Wt,u,ao)&&(ca=!0,!io))return{circles:[],offscreen:!1,collisionDetected:ca}}}}return{circles:!io&&ca||!ua||Co<this.perspectiveRatioCutoff?[]:xo,offscreen:ns,collisionDetected:ca}}projectPathToScreenSpace(u,Xe,Wt){return u.map((u=>xt(u.x,u.y,Wt,Xe.getElevation)))}queryRenderedSymbols(u){if(0===u.length||0===this.grid.keysLength()&&0===this.ignoredGrid.keysLength())return{};const Wt=[];let fr=1/0,_r=1/0,wr=-1/0,Ar=-1/0;for(const Kr of u){const u=new Xe.P(Kr.x+Da,Kr.y+Da);fr=Math.min(fr,u.x),_r=Math.min(_r,u.y),wr=Math.max(wr,u.x),Ar=Math.max(Ar,u.y),Wt.push(u)}const Kr=this.grid.query(fr,_r,wr,Ar).concat(this.ignoredGrid.query(fr,_r,wr,Ar)),In={},no={};for(const u of Kr){const fr=u.key;if(void 0===In[fr.bucketInstanceId]&&(In[fr.bucketInstanceId]={}),In[fr.bucketInstanceId][fr.featureIndex])continue;const _r=[new Xe.P(u.x1,u.y1),new Xe.P(u.x2,u.y1),new Xe.P(u.x2,u.y2),new Xe.P(u.x1,u.y2)];Xe.am(Wt,_r)&&(In[fr.bucketInstanceId][fr.featureIndex]=!0,void 0===no[fr.bucketInstanceId]&&(no[fr.bucketInstanceId]=[]),no[fr.bucketInstanceId].push(fr.featureIndex))}return no}insertCollisionBox(u,Xe,Wt,fr,_r,wr){(Wt?this.ignoredGrid:this.grid).insert({bucketInstanceId:fr,featureIndex:_r,collisionGroupID:wr,overlapMode:Xe},u[0],u[1],u[2],u[3])}insertCollisionCircles(u,Xe,Wt,fr,_r,wr){const Ar=Wt?this.ignoredGrid:this.grid,Kr={bucketInstanceId:fr,featureIndex:_r,collisionGroupID:wr,overlapMode:Xe};for(let Xe=0;Xe<u.length;Xe+=4)Ar.insertCircle(Kr,u[Xe],u[Xe+1],u[Xe+2])}projectAndGetPerspectiveRatio(u,Wt,fr,_r,wr){let Ar;wr?(Ar=[Wt,fr,wr(Wt,fr),1],Xe.af(Ar,Ar,u)):(Ar=[Wt,fr,0,1],kt(Ar,Ar,u));const Kr=Ar[3];return{point:new Xe.P((Ar[0]/Kr+1)/2*this.transform.width+Da,(-Ar[1]/Kr+1)/2*this.transform.height+Da),perspectiveRatio:.5+this.transform.cameraToCenterDistance/Kr*.5,isOccluded:!1,signedDistanceFromCamera:Kr}}getPerspectiveRatio(u,Xe,Wt,fr,_r){const wr=this.mapProjection.useSpecialProjectionForSymbols?this.mapProjection.projectTileCoordinates(Xe,Wt,fr,_r):xt(Xe,Wt,u,_r);return.5+this.transform.cameraToCenterDistance/wr.signedDistanceFromCamera*.5}isOffscreen(u,Xe,Wt,fr){return Wt<Da||u>=this.screenRightBoundary||fr<Da||Xe>this.screenBottomBoundary}isInsideGrid(u,Xe,Wt,fr){return Wt>=0&&u<this.gridRightBoundary&&fr>=0&&Xe<this.gridBottomBoundary}getViewportMatrix(){const u=Xe.an([]);return Xe.J(u,u,[-100,-100,0]),u}_projectCollisionBox(u,Wt,fr,_r,wr,Ar,Kr,In,no,io){let oo=new Xe.P(1,0),ao=new Xe.P(0,1);const so=new Xe.P(u.anchorPointX+Kr[0],u.anchorPointY+Kr[1]);if(Ar&&!wr){const u=this.projectAndGetPerspectiveRatio(fr,so.x+1,so.y,_r,no).point.sub(In.point).unit(),Wt=Math.atan(u.y/u.x)+(u.x<0?Math.PI:0),wr=Math.sin(Wt),Ar=Math.cos(Wt);oo=new Xe.P(Ar,wr),ao=new Xe.P(-wr,Ar)}else if(!Ar&&wr){const u=-this.transform.angle,Wt=Math.sin(u),fr=Math.cos(u);oo=new Xe.P(fr,Wt),ao=new Xe.P(-Wt,fr)}let co=In.point,ho=Wt;if(wr){co=so;const u=this.transform.zoom-Math.floor(this.transform.zoom);ho=Math.pow(2,-u),ho*=this.mapProjection.getPitchedTextCorrection(this.transform,so,_r),io||(ho*=Xe.ac(.5+In.signedDistanceFromCamera/this.transform.cameraToCenterDistance*.5,0,4))}io&&(co=co.add(oo.mult(io.x*ho)).add(ao.mult(io.y*ho)));const go=u.x1*ho,xo=u.x2*ho,ko=(go+xo)/2,Co=u.y1*ho,Io=u.y2*ho,zo=(Co+Io)/2,Bo=[{offsetX:go,offsetY:Co},{offsetX:ko,offsetY:Co},{offsetX:xo,offsetY:Co},{offsetX:xo,offsetY:zo},{offsetX:xo,offsetY:Io},{offsetX:ko,offsetY:Io},{offsetX:go,offsetY:Io},{offsetX:go,offsetY:zo}];let ca=[];for(const{offsetX:u,offsetY:Wt}of Bo)ca.push(new Xe.P(co.x+oo.x*u+ao.x*Wt,co.y+oo.y*u+ao.y*Wt));let ua=!1;if(wr){const u=ca.map((u=>this.projectAndGetPerspectiveRatio(fr,u.x,u.y,_r,no)));ua=u.some((u=>!u.isOccluded)),ca=u.map((u=>u.point))}else ua=!0;return{box:Xe.ao(ca),allPointsOccluded:!ua}}}function Bt(u,Wt,fr){return Wt*(Xe.X/(u.tileSize*Math.pow(2,fr-u.tileID.overscaledZ)))}class Ot{constructor(u,Xe,Wt,fr){this.opacity=u?Math.max(0,Math.min(1,u.opacity+(u.placed?Xe:-Xe))):fr&&Wt?1:0,this.placed=Wt}isHidden(){return 0===this.opacity&&!this.placed}}class Nt{constructor(u,Xe,Wt,fr,_r){this.text=new Ot(u?u.text:null,Xe,Wt,_r),this.icon=new Ot(u?u.icon:null,Xe,fr,_r)}isHidden(){return this.text.isHidden()&&this.icon.isHidden()}}class Ut{constructor(u,Xe,Wt){this.text=u,this.icon=Xe,this.skipFade=Wt}}class jt{constructor(){this.invProjMatrix=Xe.H(),this.viewportMatrix=Xe.H(),this.circles=[]}}class Zt{constructor(u,Xe,Wt,fr,_r){this.bucketInstanceId=u,this.featureIndex=Xe,this.sourceLayerIndex=Wt,this.bucketIndex=fr,this.tileID=_r}}class qt{constructor(u){this.crossSourceCollisions=u,this.maxGroupID=0,this.collisionGroups={}}get(u){if(this.crossSourceCollisions)return{ID:0,predicate:null};if(!this.collisionGroups[u]){const Xe=++this.maxGroupID;this.collisionGroups[u]={ID:Xe,predicate:u=>u.collisionGroupID===Xe}}return this.collisionGroups[u]}}function Vt(u,Wt,fr,_r,wr){const{horizontalAlign:Ar,verticalAlign:Kr}=Xe.au(u);return new Xe.P(-(Ar-.5)*Wt+_r[0]*wr,-(Kr-.5)*fr+_r[1]*wr)}class Gt{constructor(u,Xe,Wt,fr,_r,wr){this.transform=u.clone(),this.terrain=Wt,this.collisionIndex=new Ft(this.transform,Xe),this.placements={},this.opacities={},this.variableOffsets={},this.stale=!1,this.commitTime=0,this.fadeDuration=fr,this.retainedQueryData={},this.collisionGroups=new qt(_r),this.collisionCircleArrays={},this.collisionBoxArrays=new Map,this.prevPlacement=wr,wr&&(wr.prevPlacement=void 0),this.placedOrientations={}}_getTerrainElevationFunc(u){const Xe=this.terrain;return Xe?(Wt,fr)=>Xe.getElevation(u,Wt,fr):null}getBucketParts(u,Wt,fr,_r){const wr=fr.getBucket(Wt),Ar=fr.latestFeatureIndex;if(!wr||!Ar||Wt.id!==wr.layerIds[0])return;const Kr=fr.collisionBoxArray,In=wr.layers[0].layout,no=wr.layers[0].paint,io=Math.pow(2,this.transform.zoom-fr.tileID.overscaledZ),oo=fr.tileSize/Xe.X,ao=fr.tileID.toUnwrapped(),so=this.transform.calculatePosMatrix(ao),co="map"===In.get("text-pitch-alignment"),ho="map"===In.get("text-rotation-alignment"),go=Bt(fr,1,this.transform.zoom),xo=this.collisionIndex.mapProjection.translatePosition(this.transform,fr,no.get("text-translate"),no.get("text-translate-anchor")),ko=this.collisionIndex.mapProjection.translatePosition(this.transform,fr,no.get("icon-translate"),no.get("icon-translate-anchor")),Co=gt(so,co,ho,this.transform,go);let Io=null;if(co){const u=vt(so,co,ho,this.transform,go);Io=Xe.L([],this.transform.labelPlaneMatrix,u)}this.retainedQueryData[wr.bucketInstanceId]=new Zt(wr.bucketInstanceId,Ar,wr.sourceLayerIndex,wr.index,fr.tileID);const zo={bucket:wr,layout:In,translationText:xo,translationIcon:ko,posMatrix:so,unwrappedTileID:ao,textLabelPlaneMatrix:Co,labelToScreenMatrix:Io,scale:io,textPixelRatio:oo,holdingForFade:fr.holdingForFade(),collisionBoxArray:Kr,partiallyEvaluatedTextSize:Xe.ag(wr.textSizeData,this.transform.zoom),collisionGroup:this.collisionGroups.get(wr.sourceID)};if(_r)for(const Xe of wr.sortKeyRanges){const{sortKey:Wt,symbolInstanceStart:fr,symbolInstanceEnd:_r}=Xe;u.push({sortKey:Wt,symbolInstanceStart:fr,symbolInstanceEnd:_r,parameters:zo})}else u.push({symbolInstanceStart:0,symbolInstanceEnd:wr.symbolInstances.length,parameters:zo})}attemptAnchorPlacement(u,Wt,fr,_r,wr,Ar,Kr,In,no,io,oo,ao,so,co,ho,go,xo,ko,Co){const Io=Xe.aq[u.textAnchor],zo=[u.textOffset0,u.textOffset1],Bo=Vt(Io,fr,_r,zo,wr),ca=this.collisionIndex.placeCollisionBox(Wt,ao,In,no,io,Kr,Ar,go,oo.predicate,Co,Bo);if((!ko||this.collisionIndex.placeCollisionBox(ko,ao,In,no,io,Kr,Ar,xo,oo.predicate,Co,Bo).placeable)&&ca.placeable){let u;if(this.prevPlacement&&this.prevPlacement.variableOffsets[so.crossTileID]&&this.prevPlacement.placements[so.crossTileID]&&this.prevPlacement.placements[so.crossTileID].text&&(u=this.prevPlacement.variableOffsets[so.crossTileID].anchor),0===so.crossTileID)throw new Error("symbolInstance.crossTileID can't be 0");return this.variableOffsets[so.crossTileID]={textOffset:zo,width:fr,height:_r,anchor:Io,textBoxScale:wr,prevAnchor:u},this.markUsedJustification(co,Io,so,ho),co.allowVerticalPlacement&&(this.markUsedOrientation(co,ho,so),this.placedOrientations[so.crossTileID]=ho),{shift:Bo,placedGlyphBoxes:ca}}}placeLayerBucketPart(u,Wt,fr){const{bucket:_r,layout:wr,translationText:Ar,translationIcon:Kr,posMatrix:In,unwrappedTileID:no,textLabelPlaneMatrix:io,labelToScreenMatrix:oo,textPixelRatio:ao,holdingForFade:so,collisionBoxArray:co,partiallyEvaluatedTextSize:ho,collisionGroup:go}=u.parameters,xo=wr.get("text-optional"),ko=wr.get("icon-optional"),Co=Xe.ar(wr,"text-overlap","text-allow-overlap"),Io="always"===Co,zo=Xe.ar(wr,"icon-overlap","icon-allow-overlap"),Bo="always"===zo,ca="map"===wr.get("text-rotation-alignment"),ua="map"===wr.get("text-pitch-alignment"),Da="none"!==wr.get("icon-text-fit"),ns="viewport-y"===wr.get("symbol-z-order"),yl=Io&&(Bo||!_r.hasIconData()||ko),vl=Bo&&(Io||!_r.hasTextData()||xo);!_r.collisionArrays&&co&&_r.deserializeCollisionBoxes(co);const kl=this._getTerrainElevationFunc(this.retainedQueryData[_r.bucketInstanceId].tileID),D=(u,co,Bo)=>{var ns,Al;if(Wt[u.crossTileID])return;if(so)return void(this.placements[u.crossTileID]=new Ut(!1,!1,!1));let Ml=!1,Rl=!1,Ol=!0,Ll=null,Dl={box:null,placeable:!1,offscreen:null},Bl={box:null,placeable:!1,offscreen:null},Nl=null,Vl=null,Ul=null,$l=0,Wl=0,Zl=0;co.textFeatureIndex?$l=co.textFeatureIndex:u.useRuntimeCollisionCircles&&($l=u.featureIndex),co.verticalTextFeatureIndex&&(Wl=co.verticalTextFeatureIndex);const Gl=co.textBox;if(Gl){const i=Wt=>{let fr=Xe.ah.horizontal;if(_r.allowVerticalPlacement&&!Wt&&this.prevPlacement){const Xe=this.prevPlacement.placedOrientations[u.crossTileID];Xe&&(this.placedOrientations[u.crossTileID]=Xe,fr=Xe,this.markUsedOrientation(_r,fr,u))}return fr},o=(Wt,fr)=>{if(_r.allowVerticalPlacement&&u.numVerticalGlyphVertices>0&&co.verticalTextBox){for(const u of _r.writingModes)if(u===Xe.ah.vertical?(Dl=fr(),Bl=Dl):Dl=Wt(),Dl&&Dl.placeable)break}else Dl=Wt()},Wt=u.textAnchorOffsetStartIndex,wr=u.textAnchorOffsetEndIndex;if(wr===Wt){const a=(Xe,Wt)=>{const fr=this.collisionIndex.placeCollisionBox(Xe,Co,ao,In,no,ua,ca,Ar,go.predicate,kl);return fr&&fr.placeable&&(this.markUsedOrientation(_r,Wt,u),this.placedOrientations[u.crossTileID]=Wt),fr};o((()=>a(Gl,Xe.ah.horizontal)),(()=>{const Wt=co.verticalTextBox;return _r.allowVerticalPlacement&&u.numVerticalGlyphVertices>0&&Wt?a(Wt,Xe.ah.vertical):{box:null,offscreen:null}})),i(Dl&&Dl.placeable)}else{let io=Xe.aq[null===(Al=null===(ns=this.prevPlacement)||void 0===ns?void 0:ns.variableOffsets[u.crossTileID])||void 0===Al?void 0:Al.anchor];const m=(oo,so,co)=>{const ho=oo.x2-oo.x1,xo=oo.y2-oo.y1,ko=u.textBoxScale,Io=Da&&"never"===zo?so:null;let Bo=null,ns="never"===Co?1:2,yl="never";io&&ns++;for(let Xe=0;Xe<ns;Xe++){for(let Xe=Wt;Xe<wr;Xe++){const Wt=_r.textAnchorOffsets.get(Xe);if(io&&Wt.textAnchor!==io)continue;const fr=this.attemptAnchorPlacement(Wt,oo,ho,xo,ko,ca,ua,ao,In,no,go,yl,u,_r,co,Ar,Kr,Io,kl);if(fr&&(Bo=fr.placedGlyphBoxes,Bo&&Bo.placeable))return Ml=!0,Ll=fr.shift,Bo}io?io=null:yl=Co}return fr&&!Bo&&(Bo={box:this.collisionIndex.placeCollisionBox(Gl,"always",ao,In,no,ua,ca,Ar,go.predicate,kl,new Xe.P(0,0)).box,offscreen:!1,placeable:!1}),Bo};o((()=>m(Gl,co.iconBox,Xe.ah.horizontal)),(()=>{const Wt=co.verticalTextBox;return _r.allowVerticalPlacement&&(!Dl||!Dl.placeable)&&u.numVerticalGlyphVertices>0&&Wt?m(Wt,co.verticalIconBox,Xe.ah.vertical):{box:null,occluded:!0,offscreen:null}})),Dl&&(Ml=Dl.placeable,Ol=Dl.offscreen);const oo=i(Dl&&Dl.placeable);if(!Ml&&this.prevPlacement){const Xe=this.prevPlacement.variableOffsets[u.crossTileID];Xe&&(this.variableOffsets[u.crossTileID]=Xe,this.markUsedJustification(_r,Xe.anchor,u,oo))}}}if(Nl=Dl,Ml=Nl&&Nl.placeable,Ol=Nl&&Nl.offscreen,u.useRuntimeCollisionCircles){const Wt=_r.text.placedSymbolArray.get(u.centerJustifiedTextSymbolIndex),Kr=Xe.ai(_r.textSizeData,ho,Wt),ao=wr.get("text-padding");Vl=this.collisionIndex.placeCollisionCircles(Co,Wt,_r.lineVertexArray,_r.glyphOffsetArray,Kr,In,no,io,oo,fr,ua,go.predicate,u.collisionCircleDiameter,ao,Ar,kl),Vl.circles.length&&Vl.collisionDetected&&!fr&&Xe.w("Collisions detected, but collision boxes are not shown"),Ml=Io||Vl.circles.length>0&&!Vl.collisionDetected,Ol=Ol&&Vl.offscreen}if(co.iconFeatureIndex&&(Zl=co.iconFeatureIndex),co.iconBox){const t=u=>this.collisionIndex.placeCollisionBox(u,zo,ao,In,no,ua,ca,Kr,go.predicate,kl,Da&&Ll?Ll:void 0);Bl&&Bl.placeable&&co.verticalIconBox?(Ul=t(co.verticalIconBox),Rl=Ul.placeable):(Ul=t(co.iconBox),Rl=Ul.placeable),Ol=Ol&&Ul.offscreen}const Xl=xo||0===u.numHorizontalGlyphVertices&&0===u.numVerticalGlyphVertices,Jl=ko||0===u.numIconVertices;Xl||Jl?Jl?Xl||(Rl=Rl&&Ml):Ml=Rl&&Ml:Rl=Ml=Rl&&Ml;const Ql=Rl&&Ul.placeable;if(Ml&&Nl.placeable&&this.collisionIndex.insertCollisionBox(Nl.box,Co,wr.get("text-ignore-placement"),_r.bucketInstanceId,Bl&&Bl.placeable&&Wl?Wl:$l,go.ID),Ql&&this.collisionIndex.insertCollisionBox(Ul.box,zo,wr.get("icon-ignore-placement"),_r.bucketInstanceId,Zl,go.ID),Vl&&Ml&&this.collisionIndex.insertCollisionCircles(Vl.circles,Co,wr.get("text-ignore-placement"),_r.bucketInstanceId,$l,go.ID),fr&&this.storeCollisionData(_r.bucketInstanceId,Bo,co,Nl,Ul,Vl),0===u.crossTileID)throw new Error("symbolInstance.crossTileID can't be 0");if(0===_r.bucketInstanceId)throw new Error("bucket.bucketInstanceId can't be 0");this.placements[u.crossTileID]=new Ut(Ml||yl,Rl||vl,Ol||_r.justReloaded),Wt[u.crossTileID]=!0};if(ns){if(0!==u.symbolInstanceStart)throw new Error("bucket.bucketInstanceId should be 0");const Xe=_r.getSortedSymbolIndexes(this.transform.angle);for(let u=Xe.length-1;u>=0;--u){const Wt=Xe[u];D(_r.symbolInstances.get(Wt),_r.collisionArrays[Wt],Wt)}}else for(let Xe=u.symbolInstanceStart;Xe<u.symbolInstanceEnd;Xe++)D(_r.symbolInstances.get(Xe),_r.collisionArrays[Xe],Xe);if(fr&&_r.bucketInstanceId in this.collisionCircleArrays){const u=this.collisionCircleArrays[_r.bucketInstanceId];Xe.as(u.invProjMatrix,In),u.viewportMatrix=this.collisionIndex.getViewportMatrix()}_r.justReloaded=!1}storeCollisionData(u,Xe,Wt,fr,_r,wr){if(Wt.textBox||Wt.iconBox){let wr,Ar;this.collisionBoxArrays.has(u)?wr=this.collisionBoxArrays.get(u):(wr=new Map,this.collisionBoxArrays.set(u,wr)),wr.has(Xe)?Ar=wr.get(Xe):(Ar={text:null,icon:null},wr.set(Xe,Ar)),Wt.textBox&&(Ar.text=fr.box),Wt.iconBox&&(Ar.icon=_r.box)}if(wr){let Xe=this.collisionCircleArrays[u];void 0===Xe&&(Xe=this.collisionCircleArrays[u]=new jt);for(let u=0;u<wr.circles.length;u+=4)Xe.circles.push(wr.circles[u+0]),Xe.circles.push(wr.circles[u+1]),Xe.circles.push(wr.circles[u+2]),Xe.circles.push(wr.collisionDetected?1:0)}}markUsedJustification(u,Wt,fr,_r){let wr;wr=_r===Xe.ah.vertical?fr.verticalPlacedTextSymbolIndex:{left:fr.leftJustifiedTextSymbolIndex,center:fr.centerJustifiedTextSymbolIndex,right:fr.rightJustifiedTextSymbolIndex}[Xe.at(Wt)];const Ar=[fr.leftJustifiedTextSymbolIndex,fr.centerJustifiedTextSymbolIndex,fr.rightJustifiedTextSymbolIndex,fr.verticalPlacedTextSymbolIndex];for(const Xe of Ar)Xe>=0&&(u.text.placedSymbolArray.get(Xe).crossTileID=wr>=0&&Xe!==wr?0:fr.crossTileID)}markUsedOrientation(u,Wt,fr){const _r=Wt===Xe.ah.horizontal||Wt===Xe.ah.horizontalOnly?Wt:0,wr=Wt===Xe.ah.vertical?Wt:0,Ar=[fr.leftJustifiedTextSymbolIndex,fr.centerJustifiedTextSymbolIndex,fr.rightJustifiedTextSymbolIndex];for(const Xe of Ar)u.text.placedSymbolArray.get(Xe).placedOrientation=_r;fr.verticalPlacedTextSymbolIndex&&(u.text.placedSymbolArray.get(fr.verticalPlacedTextSymbolIndex).placedOrientation=wr)}commit(u){this.commitTime=u,this.zoomAtLastRecencyCheck=this.transform.zoom;const Xe=this.prevPlacement;let Wt=!1;this.prevZoomAdjustment=Xe?Xe.zoomAdjustment(this.transform.zoom):0;const fr=Xe?Xe.symbolFadeChange(u):1,_r=Xe?Xe.opacities:{},wr=Xe?Xe.variableOffsets:{},Ar=Xe?Xe.placedOrientations:{};for(const u in this.placements){const Xe=this.placements[u],wr=_r[u];wr?(this.opacities[u]=new Nt(wr,fr,Xe.text,Xe.icon),Wt=Wt||Xe.text!==wr.text.placed||Xe.icon!==wr.icon.placed):(this.opacities[u]=new Nt(null,fr,Xe.text,Xe.icon,Xe.skipFade),Wt=Wt||Xe.text||Xe.icon)}for(const u in _r){const Xe=_r[u];if(!this.opacities[u]){const _r=new Nt(Xe,fr,!1,!1);_r.isHidden()||(this.opacities[u]=_r,Wt=Wt||Xe.text.placed||Xe.icon.placed)}}for(const u in wr)this.variableOffsets[u]||!this.opacities[u]||this.opacities[u].isHidden()||(this.variableOffsets[u]=wr[u]);for(const u in Ar)this.placedOrientations[u]||!this.opacities[u]||this.opacities[u].isHidden()||(this.placedOrientations[u]=Ar[u]);if(Xe&&void 0===Xe.lastPlacementChangeTime)throw new Error("Last placement time for previous placement is not defined");Wt?this.lastPlacementChangeTime=u:"number"!=typeof this.lastPlacementChangeTime&&(this.lastPlacementChangeTime=Xe?Xe.lastPlacementChangeTime:u)}updateLayerOpacities(u,Xe){const Wt={};for(const fr of Xe){const Xe=fr.getBucket(u);Xe&&fr.latestFeatureIndex&&u.id===Xe.layerIds[0]&&this.updateBucketOpacities(Xe,fr.tileID,Wt,fr.collisionBoxArray)}}updateBucketOpacities(u,Wt,fr,_r){u.hasTextData()&&(u.text.opacityVertexArray.clear(),u.text.hasVisibleVertices=!1),u.hasIconData()&&(u.icon.opacityVertexArray.clear(),u.icon.hasVisibleVertices=!1),u.hasIconCollisionBoxData()&&u.iconCollisionBox.collisionVertexArray.clear(),u.hasTextCollisionBoxData()&&u.textCollisionBox.collisionVertexArray.clear();const wr=u.layers[0],Ar=wr.layout,Kr=new Nt(null,0,!1,!1,!0),In=Ar.get("text-allow-overlap"),no=Ar.get("icon-allow-overlap"),io=wr._unevaluatedLayout.hasValue("text-variable-anchor")||wr._unevaluatedLayout.hasValue("text-variable-anchor-offset"),oo="map"===Ar.get("text-rotation-alignment"),ao="map"===Ar.get("text-pitch-alignment"),so="none"!==Ar.get("icon-text-fit"),co=new Nt(null,0,In&&(no||!u.hasIconData()||Ar.get("icon-optional")),no&&(In||!u.hasTextData()||Ar.get("text-optional")),!0);!u.collisionArrays&&_r&&(u.hasIconCollisionBoxData()||u.hasTextCollisionBoxData())&&u.deserializeCollisionBoxes(_r);const m=(u,Xe,Wt)=>{for(let fr=0;fr<Xe/4;fr++)u.opacityVertexArray.emplaceBack(Wt);u.hasVisibleVertices=u.hasVisibleVertices||Wt!==Ol},ho=this.collisionBoxArrays.get(u.bucketInstanceId);for(let Wt=0;Wt<u.symbolInstances.length;Wt++){const _r=u.symbolInstances.get(Wt),{numHorizontalGlyphVertices:wr,numVerticalGlyphVertices:Ar,crossTileID:In}=_r;let no=this.opacities[In];fr[In]?no=Kr:no||(no=co,this.opacities[In]=no),fr[In]=!0;const go=_r.numIconVertices>0,xo=this.placedOrientations[_r.crossTileID],ko=xo===Xe.ah.vertical,Co=xo===Xe.ah.horizontal||xo===Xe.ah.horizontalOnly;if(wr>0||Ar>0){const Xe=te(no.text);m(u.text,wr,ko?Ol:Xe),m(u.text,Ar,Co?Ol:Xe);const Wt=no.text.isHidden();[_r.rightJustifiedTextSymbolIndex,_r.centerJustifiedTextSymbolIndex,_r.leftJustifiedTextSymbolIndex].forEach((Xe=>{Xe>=0&&(u.text.placedSymbolArray.get(Xe).hidden=Wt||ko?1:0)})),_r.verticalPlacedTextSymbolIndex>=0&&(u.text.placedSymbolArray.get(_r.verticalPlacedTextSymbolIndex).hidden=Wt||Co?1:0);const fr=this.variableOffsets[_r.crossTileID];fr&&this.markUsedJustification(u,fr.anchor,_r,xo);const Kr=this.placedOrientations[_r.crossTileID];Kr&&(this.markUsedJustification(u,"left",_r,Kr),this.markUsedOrientation(u,Kr,_r))}if(go){const Xe=te(no.icon),Wt=!(so&&_r.verticalPlacedIconSymbolIndex&&ko);_r.placedIconSymbolIndex>=0&&(m(u.icon,_r.numIconVertices,Wt?Xe:Ol),u.icon.placedSymbolArray.get(_r.placedIconSymbolIndex).hidden=no.icon.isHidden()),_r.verticalPlacedIconSymbolIndex>=0&&(m(u.icon,_r.numVerticalIconVertices,Wt?Ol:Xe),u.icon.placedSymbolArray.get(_r.verticalPlacedIconSymbolIndex).hidden=no.icon.isHidden())}const Io=ho&&ho.has(Wt)?ho.get(Wt):{text:null,icon:null};if(u.hasIconCollisionBoxData()||u.hasTextCollisionBoxData()){const fr=u.collisionArrays[Wt];if(fr){let Wt=new Xe.P(0,0);if(fr.textBox||fr.verticalTextBox){let Xe=!0;if(io){const u=this.variableOffsets[In];u?(Wt=Vt(u.anchor,u.width,u.height,u.textOffset,u.textBoxScale),oo&&Wt._rotate(ao?this.transform.angle:-this.transform.angle)):Xe=!1}if(fr.textBox||fr.verticalTextBox){let _r;fr.textBox&&(_r=ko),fr.verticalTextBox&&(_r=Co),Ht(u.textCollisionBox.collisionVertexArray,no.text.placed,!Xe||_r,Io.text,Wt.x,Wt.y)}}if(fr.iconBox||fr.verticalIconBox){const Xe=Boolean(!Co&&fr.verticalIconBox);let _r;fr.iconBox&&(_r=Xe),fr.verticalIconBox&&(_r=!Xe),Ht(u.iconCollisionBox.collisionVertexArray,no.icon.placed,_r,Io.icon,so?Wt.x:0,so?Wt.y:0)}}}}if(u.sortFeatures(this.transform.angle),this.retainedQueryData[u.bucketInstanceId]&&(this.retainedQueryData[u.bucketInstanceId].featureSortOrder=u.featureSortOrder),u.hasTextData()&&u.text.opacityVertexBuffer&&u.text.opacityVertexBuffer.updateData(u.text.opacityVertexArray),u.hasIconData()&&u.icon.opacityVertexBuffer&&u.icon.opacityVertexBuffer.updateData(u.icon.opacityVertexArray),u.hasIconCollisionBoxData()&&u.iconCollisionBox.collisionVertexBuffer&&u.iconCollisionBox.collisionVertexBuffer.updateData(u.iconCollisionBox.collisionVertexArray),u.hasTextCollisionBoxData()&&u.textCollisionBox.collisionVertexBuffer&&u.textCollisionBox.collisionVertexBuffer.updateData(u.textCollisionBox.collisionVertexArray),u.text.opacityVertexArray.length!==u.text.layoutVertexArray.length/4)throw new Error(`bucket.text.opacityVertexArray.length (= ${u.text.opacityVertexArray.length}) !== bucket.text.layoutVertexArray.length (= ${u.text.layoutVertexArray.length}) / 4`);if(u.icon.opacityVertexArray.length!==u.icon.layoutVertexArray.length/4)throw new Error(`bucket.icon.opacityVertexArray.length (= ${u.icon.opacityVertexArray.length}) !== bucket.icon.layoutVertexArray.length (= ${u.icon.layoutVertexArray.length}) / 4`);if(u.bucketInstanceId in this.collisionCircleArrays){const Xe=this.collisionCircleArrays[u.bucketInstanceId];u.placementInvProjMatrix=Xe.invProjMatrix,u.placementViewportMatrix=Xe.viewportMatrix,u.collisionCircleArray=Xe.circles,delete this.collisionCircleArrays[u.bucketInstanceId]}}symbolFadeChange(u){return 0===this.fadeDuration?1:(u-this.commitTime)/this.fadeDuration+this.prevZoomAdjustment}zoomAdjustment(u){return Math.max(0,(this.transform.zoom-u)/1.5)}hasTransitions(u){return this.stale||u-this.lastPlacementChangeTime<this.fadeDuration}stillRecent(u,Xe){const Wt=this.zoomAtLastRecencyCheck===Xe?1-this.zoomAdjustment(Xe):1;return this.zoomAtLastRecencyCheck=Xe,this.commitTime+this.fadeDuration*Wt>u}setStale(){this.stale=!0}}function Ht(u,Xe,Wt,fr,_r,wr){fr&&0!==fr.length||(fr=[0,0,0,0]);const Ar=fr[0]-Da,Kr=fr[1]-Da,In=fr[2]-Da,no=fr[3]-Da;u.emplaceBack(Xe?1:0,Wt?1:0,_r||0,wr||0,Ar,Kr),u.emplaceBack(Xe?1:0,Wt?1:0,_r||0,wr||0,In,Kr),u.emplaceBack(Xe?1:0,Wt?1:0,_r||0,wr||0,In,no),u.emplaceBack(Xe?1:0,Wt?1:0,_r||0,wr||0,Ar,no)}const ns=Math.pow(2,25),yl=Math.pow(2,24),vl=Math.pow(2,17),kl=Math.pow(2,16),Al=Math.pow(2,9),Ml=Math.pow(2,8),Rl=Math.pow(2,1);function te(u){if(0===u.opacity&&!u.placed)return 0;if(1===u.opacity&&u.placed)return 4294967295;const Xe=u.placed?1:0,Wt=Math.floor(127*u.opacity);return Wt*ns+Xe*yl+Wt*vl+Xe*kl+Wt*Al+Xe*Ml+Wt*Rl+Xe}const Ol=0;function ie(){return{isOccluded:(u,Xe,Wt)=>!1,getPitchedTextCorrection:(u,Xe,Wt)=>1,get useSpecialProjectionForSymbols(){return!1},projectTileCoordinates(u,Xe,Wt,fr){throw new Error("Not implemented.")},translatePosition:(u,Xe,Wt,fr)=>function(u,Xe,Wt,fr,_r=!1){if(!Wt[0]&&!Wt[1])return[0,0];const wr=_r?"map"===fr?u.angle:0:"viewport"===fr?-u.angle:0;if(wr){const u=Math.sin(wr),Xe=Math.cos(wr);Wt=[Wt[0]*Xe-Wt[1]*u,Wt[0]*u+Wt[1]*Xe]}return[_r?Wt[0]:Bt(Xe,Wt[0],u.zoom),_r?Wt[1]:Bt(Xe,Wt[1],u.zoom)]}(u,Xe,Wt,fr),getCircleRadiusCorrection:u=>1}}class ae{constructor(u){this._sortAcrossTiles="viewport-y"!==u.layout.get("symbol-z-order")&&!u.layout.get("symbol-sort-key").isConstant(),this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]}continuePlacement(u,Xe,Wt,fr,_r){const wr=this._bucketParts;for(;this._currentTileIndex<u.length;)if(Xe.getBucketParts(wr,fr,u[this._currentTileIndex],this._sortAcrossTiles),this._currentTileIndex++,_r())return!0;for(this._sortAcrossTiles&&(this._sortAcrossTiles=!1,wr.sort(((u,Xe)=>u.sortKey-Xe.sortKey)));this._currentPartIndex<wr.length;)if(Xe.placeLayerBucketPart(wr[this._currentPartIndex],this._seenCrossTileIDs,Wt),this._currentPartIndex++,_r())return!0;return!1}}class se{constructor(u,Xe,Wt,fr,_r,wr,Ar,Kr){this.placement=new Gt(u,ie(),Xe,wr,Ar,Kr),this._currentPlacementIndex=Wt.length-1,this._forceFullPlacement=fr,this._showCollisionBoxes=_r,this._done=!1}isDone(){return this._done}continuePlacement(u,Xe,Wt){const fr=wr.now(),s=()=>!this._forceFullPlacement&&wr.now()-fr>2;for(;this._currentPlacementIndex>=0;){const fr=Xe[u[this._currentPlacementIndex]],_r=this.placement.collisionIndex.transform.zoom;if("symbol"===fr.type&&(!fr.minzoom||fr.minzoom<=_r)&&(!fr.maxzoom||fr.maxzoom>_r)){if(this._inProgressLayer||(this._inProgressLayer=new ae(fr)),this._inProgressLayer.continuePlacement(Wt[fr.source],this.placement,this._showCollisionBoxes,fr,s))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0}commit(u){return this.placement.commit(u),this.placement}}const Ll=512/Xe.X/2;class re{constructor(u,Wt,fr){this.tileID=u,this.bucketInstanceId=fr,this._symbolsByKey={};const _r=new Map;for(let u=0;u<Wt.length;u++){const Xe=Wt.get(u),fr=Xe.key,wr=_r.get(fr);wr?wr.push(Xe):_r.set(fr,[Xe])}for(const[u,Wt]of _r){const fr={positions:Wt.map((u=>({x:Math.floor(u.anchorX*Ll),y:Math.floor(u.anchorY*Ll)}))),crossTileIDs:Wt.map((u=>u.crossTileID))};if(fr.positions.length>128){const u=new Xe.av(fr.positions.length,16,Uint16Array);for(const{x:Xe,y:Wt}of fr.positions)u.add(Xe,Wt);u.finish(),delete fr.positions,fr.index=u}this._symbolsByKey[u]=fr}}getScaledCoordinates(u,Wt){const{x:fr,y:_r,z:wr}=this.tileID.canonical,{x:Ar,y:Kr,z:In}=Wt.canonical,no=Ll/Math.pow(2,In-wr),io=(Kr*Xe.X+u.anchorY)*no,oo=_r*Xe.X*Ll;return{x:Math.floor((Ar*Xe.X+u.anchorX)*no-fr*Xe.X*Ll),y:Math.floor(io-oo)}}findMatches(u,Xe,Wt){const fr=this.tileID.canonical.z<Xe.canonical.z?1:Math.pow(2,this.tileID.canonical.z-Xe.canonical.z);for(let _r=0;_r<u.length;_r++){const wr=u.get(_r);if(wr.crossTileID)continue;const Ar=this._symbolsByKey[wr.key];if(!Ar)continue;const Kr=this.getScaledCoordinates(wr,Xe);if(Ar.index){const u=Ar.index.range(Kr.x-fr,Kr.y-fr,Kr.x+fr,Kr.y+fr).sort();for(const Xe of u){const u=Ar.crossTileIDs[Xe];if(!Wt[u]){Wt[u]=!0,wr.crossTileID=u;break}}}else if(Ar.positions)for(let u=0;u<Ar.positions.length;u++){const Xe=Ar.positions[u],_r=Ar.crossTileIDs[u];if(Math.abs(Xe.x-Kr.x)<=fr&&Math.abs(Xe.y-Kr.y)<=fr&&!Wt[_r]){Wt[_r]=!0,wr.crossTileID=_r;break}}}}getCrossTileIDsLists(){return Object.values(this._symbolsByKey).map((({crossTileIDs:u})=>u))}}class ne{constructor(){this.maxCrossTileID=0}generate(){return++this.maxCrossTileID}}class le{constructor(){this.indexes={},this.usedCrossTileIDs={},this.lng=0}handleWrapJump(u){const Xe=Math.round((u-this.lng)/360);if(0!==Xe)for(const u in this.indexes){const Wt=this.indexes[u],fr={};for(const u in Wt){const _r=Wt[u];_r.tileID=_r.tileID.unwrapTo(_r.tileID.wrap+Xe),fr[_r.tileID.key]=_r}this.indexes[u]=fr}this.lng=u}addBucket(u,Xe,Wt){if(this.indexes[u.overscaledZ]&&this.indexes[u.overscaledZ][u.key]){if(this.indexes[u.overscaledZ][u.key].bucketInstanceId===Xe.bucketInstanceId)return!1;this.removeBucketCrossTileIDs(u.overscaledZ,this.indexes[u.overscaledZ][u.key])}for(let u=0;u<Xe.symbolInstances.length;u++)Xe.symbolInstances.get(u).crossTileID=0;this.usedCrossTileIDs[u.overscaledZ]||(this.usedCrossTileIDs[u.overscaledZ]={});const fr=this.usedCrossTileIDs[u.overscaledZ];for(const Wt in this.indexes){const _r=this.indexes[Wt];if(Number(Wt)>u.overscaledZ)for(const Wt in _r){const wr=_r[Wt];wr.tileID.isChildOf(u)&&wr.findMatches(Xe.symbolInstances,u,fr)}else{const wr=_r[u.scaledTo(Number(Wt)).key];wr&&wr.findMatches(Xe.symbolInstances,u,fr)}}for(let u=0;u<Xe.symbolInstances.length;u++){const _r=Xe.symbolInstances.get(u);_r.crossTileID||(_r.crossTileID=Wt.generate(),fr[_r.crossTileID]=!0)}return void 0===this.indexes[u.overscaledZ]&&(this.indexes[u.overscaledZ]={}),this.indexes[u.overscaledZ][u.key]=new re(u,Xe.symbolInstances,Xe.bucketInstanceId),!0}removeBucketCrossTileIDs(u,Xe){for(const Wt of Xe.getCrossTileIDsLists())for(const Xe of Wt)delete this.usedCrossTileIDs[u][Xe]}removeStaleBuckets(u){let Xe=!1;for(const Wt in this.indexes){const fr=this.indexes[Wt];for(const _r in fr)u[fr[_r].bucketInstanceId]||(this.removeBucketCrossTileIDs(Wt,fr[_r]),delete fr[_r],Xe=!0)}return Xe}}class he{constructor(){this.layerIndexes={},this.crossTileIDs=new ne,this.maxBucketInstanceId=0,this.bucketsInCurrentPlacement={}}addLayer(u,Xe,Wt){let fr=this.layerIndexes[u.id];void 0===fr&&(fr=this.layerIndexes[u.id]=new le);let _r=!1;const wr={};fr.handleWrapJump(Wt);for(const Wt of Xe){const Xe=Wt.getBucket(u);Xe&&u.id===Xe.layerIds[0]&&(Xe.bucketInstanceId||(Xe.bucketInstanceId=++this.maxBucketInstanceId),fr.addBucket(Wt.tileID,Xe,this.crossTileIDs)&&(_r=!0),wr[Xe.bucketInstanceId]=!0)}return fr.removeStaleBuckets(wr)&&(_r=!0),_r}pruneUnusedLayers(u){const Xe={};u.forEach((u=>{Xe[u]=!0}));for(const u in this.layerIndexes)Xe[u]||delete this.layerIndexes[u]}}const ce=(u,Wt)=>Xe.t(u,Wt&&Wt.filter((u=>"source.canvas"!==u.identifier))),Dl=Xe.aw();class de extends Xe.E{constructor(u,Wt={}){super(),this._rtlPluginLoaded=()=>{for(const u in this.sourceCaches){const Xe=this.sourceCaches[u].getSource().type;"vector"!==Xe&&"geojson"!==Xe||this.sourceCaches[u].reload()}},this.map=u,this.dispatcher=new U(N(),u._getMapId()),this.dispatcher.registerMessageHandler("GG",((u,Xe)=>this.getGlyphs(u,Xe))),this.dispatcher.registerMessageHandler("GI",((u,Xe)=>this.getImages(u,Xe))),this.imageManager=new T,this.imageManager.setEventedParent(this),this.glyphManager=new C(u._requestManager,Wt.localIdeographFontFamily),this.lineAtlas=new R(256,512),this.crossTileSymbolIndex=new he,this._spritesImagesIds={},this._layers={},this._order=[],this.sourceCaches={},this.zoomHistory=new Xe.ax,this._loaded=!1,this._availableImages=[],this._resetUpdates(),this.dispatcher.broadcast("SR",Xe.ay()),nt().on(Bo,this._rtlPluginLoaded),this.on("data",(u=>{if("source"!==u.dataType||"metadata"!==u.sourceDataType)return;const Xe=this.sourceCaches[u.sourceId];if(!Xe)return;const Wt=Xe.getSource();if(Wt&&Wt.vectorLayerIds)for(const u in this._layers){const Xe=this._layers[u];Xe.source===Wt.id&&this._validateLayer(Xe)}}))}loadURL(u,Wt={},fr){this.fire(new Xe.k("dataloading",{dataType:"style"})),Wt.validate="boolean"!=typeof Wt.validate||Wt.validate;const _r=this.map._requestManager.transformRequest(u,"Style");this._loadStyleRequest=new AbortController;const wr=this._loadStyleRequest;Xe.h(_r,this._loadStyleRequest).then((u=>{this._loadStyleRequest=null,this._load(u.data,Wt,fr)})).catch((u=>{this._loadStyleRequest=null,u&&!wr.signal.aborted&&this.fire(new Xe.j(u))}))}loadJSON(u,Wt={},fr){this.fire(new Xe.k("dataloading",{dataType:"style"})),this._frameRequest=new AbortController,wr.frameAsync(this._frameRequest).then((()=>{this._frameRequest=null,Wt.validate=!1!==Wt.validate,this._load(u,Wt,fr)})).catch((()=>{}))}loadEmpty(){this.fire(new Xe.k("dataloading",{dataType:"style"})),this._load(Dl,{validate:!1})}_load(u,Wt,fr){var _r;const wr=Wt.transformStyle?Wt.transformStyle(fr,u):u;if(!Wt.validate||!ce(this,Xe.u(wr))){this._loaded=!0,this.stylesheet=wr;for(const u in wr.sources)this.addSource(u,wr.sources[u],{validate:!1});wr.sprite?this._loadSprite(wr.sprite):this.imageManager.setLoaded(!0),this.glyphManager.setURL(wr.glyphs),this._createLayers(),this.light=new D(this.stylesheet.light),this.sky=new A(this.stylesheet.sky),this.map.setTerrain(null!==(_r=this.stylesheet.terrain)&&void 0!==_r?_r:null),this.fire(new Xe.k("data",{dataType:"style"})),this.fire(new Xe.k("style.load"))}}_createLayers(){const u=Xe.az(this.stylesheet.layers);this.dispatcher.broadcast("SL",u),this._order=u.map((u=>u.id)),this._layers={},this._serializedLayers=null;for(const Wt of u){const u=Xe.aA(Wt);u.setEventedParent(this,{layer:{id:Wt.id}}),this._layers[Wt.id]=u}}_loadSprite(u,Wt=!1,fr=void 0){let _r;this.imageManager.setLoaded(!1),this._spriteRequest=new AbortController,function(u,Wt,fr,_r){return Xe._(this,void 0,void 0,(function*(){const Ar=x(u),Kr=fr>1?"@2x":"",In={},no={};for(const{id:u,url:fr}of Ar){const wr=Wt.transformRequest(y(fr,Kr,".json"),"SpriteJSON");In[u]=Xe.h(wr,_r);const Ar=Wt.transformRequest(y(fr,Kr,".png"),"SpriteImage");no[u]=oo.getImage(Ar,_r)}return yield Promise.all([...Object.values(In),...Object.values(no)]),function(u,Wt){return Xe._(this,void 0,void 0,(function*(){const Xe={};for(const fr in u){Xe[fr]={};const _r=wr.getImageCanvasContext((yield Wt[fr]).data),Ar=(yield u[fr]).data;for(const u in Ar){const{width:Wt,height:wr,x:Kr,y:In,sdf:no,pixelRatio:io,stretchX:oo,stretchY:ao,content:so,textFitWidth:co,textFitHeight:ho}=Ar[u];Xe[fr][u]={data:null,pixelRatio:io,sdf:no,stretchX:oo,stretchY:ao,content:so,textFitWidth:co,textFitHeight:ho,spriteData:{width:Wt,height:wr,x:Kr,y:In,context:_r}}}}return Xe}))}(In,no)}))}(u,this.map._requestManager,this.map.getPixelRatio(),this._spriteRequest).then((u=>{if(this._spriteRequest=null,u)for(const Xe in u){this._spritesImagesIds[Xe]=[];const fr=this._spritesImagesIds[Xe]?this._spritesImagesIds[Xe].filter((Xe=>!(Xe in u))):[];for(const u of fr)this.imageManager.removeImage(u),this._changedImages[u]=!0;for(const fr in u[Xe]){const _r="default"===Xe?fr:`${Xe}:${fr}`;this._spritesImagesIds[Xe].push(_r),_r in this.imageManager.images?this.imageManager.updateImage(_r,u[Xe][fr],!1):this.imageManager.addImage(_r,u[Xe][fr]),Wt&&(this._changedImages[_r]=!0)}}})).catch((u=>{this._spriteRequest=null,_r=u,this.fire(new Xe.j(_r))})).finally((()=>{this.imageManager.setLoaded(!0),this._availableImages=this.imageManager.listImages(),Wt&&(this._changed=!0),this.dispatcher.broadcast("SI",this._availableImages),this.fire(new Xe.k("data",{dataType:"style"})),fr&&fr(_r)}))}_unloadSprite(){for(const u of Object.values(this._spritesImagesIds).flat())this.imageManager.removeImage(u),this._changedImages[u]=!0;this._spritesImagesIds={},this._availableImages=this.imageManager.listImages(),this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new Xe.k("data",{dataType:"style"}))}_validateLayer(u){const Wt=this.sourceCaches[u.source];if(!Wt)return;const fr=u.sourceLayer;if(!fr)return;const _r=Wt.getSource();("geojson"===_r.type||_r.vectorLayerIds&&-1===_r.vectorLayerIds.indexOf(fr))&&this.fire(new Xe.j(new Error(`Source layer "${fr}" does not exist on source "${_r.id}" as specified by style layer "${u.id}".`)))}loaded(){if(!this._loaded)return!1;if(Object.keys(this._updatedSources).length)return!1;for(const u in this.sourceCaches)if(!this.sourceCaches[u].loaded())return!1;return!!this.imageManager.isLoaded()}_serializeByIds(u,Wt=!1){const fr=this._serializedAllLayers();if(!u||0===u.length)return Object.values(Wt?Xe.aB(fr):fr);const _r=[];for(const wr of u)if(fr[wr]){const u=Wt?Xe.aB(fr[wr]):fr[wr];_r.push(u)}return _r}_serializedAllLayers(){let u=this._serializedLayers;if(u)return u;u=this._serializedLayers={};const Xe=Object.keys(this._layers);for(const Wt of Xe){const Xe=this._layers[Wt];"custom"!==Xe.type&&(u[Wt]=Xe.serialize())}return u}hasTransitions(){if(this.light&&this.light.hasTransition())return!0;if(this.sky&&this.sky.hasTransition())return!0;for(const u in this.sourceCaches)if(this.sourceCaches[u].hasTransition())return!0;for(const u in this._layers)if(this._layers[u].hasTransition())return!0;return!1}_checkLoaded(){if(!this._loaded)throw new Error("Style is not done loading.")}update(u){if(!this._loaded)return;const Wt=this._changed;if(Wt){const Xe=Object.keys(this._updatedLayers),Wt=Object.keys(this._removedLayers);(Xe.length||Wt.length)&&this._updateWorkerLayers(Xe,Wt);for(const u in this._updatedSources){const Xe=this._updatedSources[u];if("reload"===Xe)this._reloadSource(u);else{if("clear"!==Xe)throw new Error(`Invalid action ${Xe}`);this._clearSource(u)}}this._updateTilesForChangedImages(),this._updateTilesForChangedGlyphs();for(const Xe in this._updatedPaintProps)this._layers[Xe].updateTransitions(u);this.light.updateTransitions(u),this.sky.updateTransitions(u),this._resetUpdates()}const fr={};for(const u in this.sourceCaches){const Xe=this.sourceCaches[u];fr[u]=Xe.used,Xe.used=!1}for(const Xe of this._order){const Wt=this._layers[Xe];Wt.recalculate(u,this._availableImages),!Wt.isHidden(u.zoom)&&Wt.source&&(this.sourceCaches[Wt.source].used=!0)}for(const u in fr){const Wt=this.sourceCaches[u];!!fr[u]!=!!Wt.used&&Wt.fire(new Xe.k("data",{sourceDataType:"visibility",dataType:"source",sourceId:u}))}this.light.recalculate(u),this.sky.recalculate(u),this.z=u.zoom,Wt&&this.fire(new Xe.k("data",{dataType:"style"}))}_updateTilesForChangedImages(){const u=Object.keys(this._changedImages);if(u.length){for(const Xe in this.sourceCaches)this.sourceCaches[Xe].reloadTilesForDependencies(["icons","patterns"],u);this._changedImages={}}}_updateTilesForChangedGlyphs(){if(this._glyphsDidChange){for(const u in this.sourceCaches)this.sourceCaches[u].reloadTilesForDependencies(["glyphs"],[""]);this._glyphsDidChange=!1}}_updateWorkerLayers(u,Xe){this.dispatcher.broadcast("UL",{layers:this._serializeByIds(u,!1),removedIds:Xe})}_resetUpdates(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSources={},this._updatedPaintProps={},this._changedImages={},this._glyphsDidChange=!1}setState(u,Wt={}){var fr;this._checkLoaded();const _r=this.serialize();if(u=Wt.transformStyle?Wt.transformStyle(_r,u):u,(null===(fr=Wt.validate)||void 0===fr||fr)&&ce(this,Xe.u(u)))return!1;(u=Xe.aB(u)).layers=Xe.az(u.layers);const wr=Xe.aC(_r,u),Ar=this._getOperationsToPerform(wr);if(Ar.unimplemented.length>0)throw new Error(`Unimplemented: ${Ar.unimplemented.join(", ")}.`);if(0===Ar.operations.length)return!1;for(const u of Ar.operations)u();return this.stylesheet=u,this._serializedLayers=null,!0}_getOperationsToPerform(u){const Xe=[],Wt=[];for(const fr of u)switch(fr.command){case"setCenter":case"setZoom":case"setBearing":case"setPitch":continue;case"addLayer":Xe.push((()=>this.addLayer.apply(this,fr.args)));break;case"removeLayer":Xe.push((()=>this.removeLayer.apply(this,fr.args)));break;case"setPaintProperty":Xe.push((()=>this.setPaintProperty.apply(this,fr.args)));break;case"setLayoutProperty":Xe.push((()=>this.setLayoutProperty.apply(this,fr.args)));break;case"setFilter":Xe.push((()=>this.setFilter.apply(this,fr.args)));break;case"addSource":Xe.push((()=>this.addSource.apply(this,fr.args)));break;case"removeSource":Xe.push((()=>this.removeSource.apply(this,fr.args)));break;case"setLayerZoomRange":Xe.push((()=>this.setLayerZoomRange.apply(this,fr.args)));break;case"setLight":Xe.push((()=>this.setLight.apply(this,fr.args)));break;case"setGeoJSONSourceData":Xe.push((()=>this.setGeoJSONSourceData.apply(this,fr.args)));break;case"setGlyphs":Xe.push((()=>this.setGlyphs.apply(this,fr.args)));break;case"setSprite":Xe.push((()=>this.setSprite.apply(this,fr.args)));break;case"setSky":Xe.push((()=>this.setSky.apply(this,fr.args)));break;case"setTerrain":Xe.push((()=>this.map.setTerrain.apply(this,fr.args)));break;case"setTransition":Xe.push((()=>{}));break;default:Wt.push(fr.command)}return{operations:Xe,unimplemented:Wt}}addImage(u,Wt){if(this.getImage(u))return this.fire(new Xe.j(new Error(`An image named "${u}" already exists.`)));this.imageManager.addImage(u,Wt),this._afterImageUpdated(u)}updateImage(u,Xe){this.imageManager.updateImage(u,Xe)}getImage(u){return this.imageManager.getImage(u)}removeImage(u){if(!this.getImage(u))return this.fire(new Xe.j(new Error(`An image named "${u}" does not exist.`)));this.imageManager.removeImage(u),this._afterImageUpdated(u)}_afterImageUpdated(u){this._availableImages=this.imageManager.listImages(),this._changedImages[u]=!0,this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new Xe.k("data",{dataType:"style"}))}listImages(){return this._checkLoaded(),this.imageManager.listImages()}addSource(u,Wt,fr={}){if(this._checkLoaded(),void 0!==this.sourceCaches[u])throw new Error(`Source "${u}" already exists.`);if(!Wt.type)throw new Error(`The type property must be defined, but only the following properties were given: ${Object.keys(Wt).join(", ")}.`);if(["vector","raster","geojson","video","image"].indexOf(Wt.type)>=0&&this._validate(Xe.u.source,`sources.${u}`,Wt,null,fr))return;this.map&&this.map._collectResourceTiming&&(Wt.collectResourceTiming=!0);const _r=this.sourceCaches[u]=new ut(u,Wt,this.dispatcher);_r.style=this,_r.setEventedParent(this,(()=>({isSourceLoaded:_r.loaded(),source:_r.serialize(),sourceId:u}))),_r.onAdd(this.map),this._changed=!0}removeSource(u){if(this._checkLoaded(),void 0===this.sourceCaches[u])throw new Error("There is no source with this ID");for(const Wt in this._layers)if(this._layers[Wt].source===u)return this.fire(new Xe.j(new Error(`Source "${u}" cannot be removed while layer "${Wt}" is using it.`)));const Wt=this.sourceCaches[u];delete this.sourceCaches[u],delete this._updatedSources[u],Wt.fire(new Xe.k("data",{sourceDataType:"metadata",dataType:"source",sourceId:u})),Wt.setEventedParent(null),Wt.onRemove(this.map),this._changed=!0}setGeoJSONSourceData(u,Xe){if(this._checkLoaded(),void 0===this.sourceCaches[u])throw new Error(`There is no source with this ID=${u}`);const Wt=this.sourceCaches[u].getSource();if("geojson"!==Wt.type)throw new Error(`geojsonSource.type is ${Wt.type}, which is !== 'geojson`);Wt.setData(Xe),this._changed=!0}getSource(u){return this.sourceCaches[u]&&this.sourceCaches[u].getSource()}addLayer(u,Wt,fr={}){this._checkLoaded();const _r=u.id;if(this.getLayer(_r))return void this.fire(new Xe.j(new Error(`Layer "${_r}" already exists on this map.`)));let wr;if("custom"===u.type){if(ce(this,Xe.aD(u)))return;wr=Xe.aA(u)}else{if("source"in u&&"object"==typeof u.source&&(this.addSource(_r,u.source),u=Xe.aB(u),u=Xe.e(u,{source:_r})),this._validate(Xe.u.layer,`layers.${_r}`,u,{arrayIndex:-1},fr))return;wr=Xe.aA(u),this._validateLayer(wr),wr.setEventedParent(this,{layer:{id:_r}})}const Ar=Wt?this._order.indexOf(Wt):this._order.length;if(Wt&&-1===Ar)this.fire(new Xe.j(new Error(`Cannot add layer "${_r}" before non-existing layer "${Wt}".`)));else{if(this._order.splice(Ar,0,_r),this._layerOrderChanged=!0,this._layers[_r]=wr,this._removedLayers[_r]&&wr.source&&"custom"!==wr.type){const u=this._removedLayers[_r];delete this._removedLayers[_r],u.type!==wr.type?this._updatedSources[wr.source]="clear":(this._updatedSources[wr.source]="reload",this.sourceCaches[wr.source].pause())}this._updateLayer(wr),wr.onAdd&&wr.onAdd(this.map)}}moveLayer(u,Wt){if(this._checkLoaded(),this._changed=!0,!this._layers[u])return void this.fire(new Xe.j(new Error(`The layer '${u}' does not exist in the map's style and cannot be moved.`)));if(u===Wt)return;const fr=this._order.indexOf(u);this._order.splice(fr,1);const _r=Wt?this._order.indexOf(Wt):this._order.length;Wt&&-1===_r?this.fire(new Xe.j(new Error(`Cannot move layer "${u}" before non-existing layer "${Wt}".`))):(this._order.splice(_r,0,u),this._layerOrderChanged=!0)}removeLayer(u){this._checkLoaded();const Wt=this._layers[u];if(!Wt)return void this.fire(new Xe.j(new Error(`Cannot remove non-existing layer "${u}".`)));Wt.setEventedParent(null);const fr=this._order.indexOf(u);this._order.splice(fr,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[u]=Wt,delete this._layers[u],this._serializedLayers&&delete this._serializedLayers[u],delete this._updatedLayers[u],delete this._updatedPaintProps[u],Wt.onRemove&&Wt.onRemove(this.map)}getLayer(u){return this._layers[u]}getLayersOrder(){return[...this._order]}hasLayer(u){return u in this._layers}setLayerZoomRange(u,Wt,fr){this._checkLoaded();const _r=this.getLayer(u);_r?_r.minzoom===Wt&&_r.maxzoom===fr||(null!=Wt&&(_r.minzoom=Wt),null!=fr&&(_r.maxzoom=fr),this._updateLayer(_r)):this.fire(new Xe.j(new Error(`Cannot set the zoom range of non-existing layer "${u}".`)))}setFilter(u,Wt,fr={}){this._checkLoaded();const _r=this.getLayer(u);if(_r){if(!Xe.aE(_r.filter,Wt))return null==Wt?(_r.filter=void 0,void this._updateLayer(_r)):void(this._validate(Xe.u.filter,`layers.${_r.id}.filter`,Wt,null,fr)||(_r.filter=Xe.aB(Wt),this._updateLayer(_r)))}else this.fire(new Xe.j(new Error(`Cannot filter non-existing layer "${u}".`)))}getFilter(u){return Xe.aB(this.getLayer(u).filter)}setLayoutProperty(u,Wt,fr,_r={}){this._checkLoaded();const wr=this.getLayer(u);wr?Xe.aE(wr.getLayoutProperty(Wt),fr)||(wr.setLayoutProperty(Wt,fr,_r),this._updateLayer(wr)):this.fire(new Xe.j(new Error(`Cannot style non-existing layer "${u}".`)))}getLayoutProperty(u,Wt){const fr=this.getLayer(u);if(fr)return fr.getLayoutProperty(Wt);this.fire(new Xe.j(new Error(`Cannot get style of non-existing layer "${u}".`)))}setPaintProperty(u,Wt,fr,_r={}){this._checkLoaded();const wr=this.getLayer(u);wr?Xe.aE(wr.getPaintProperty(Wt),fr)||(wr.setPaintProperty(Wt,fr,_r)&&this._updateLayer(wr),this._changed=!0,this._updatedPaintProps[u]=!0,this._serializedLayers=null):this.fire(new Xe.j(new Error(`Cannot style non-existing layer "${u}".`)))}getPaintProperty(u,Xe){return this.getLayer(u).getPaintProperty(Xe)}setFeatureState(u,Wt){this._checkLoaded();const fr=u.source,_r=u.sourceLayer,wr=this.sourceCaches[fr];if(void 0===wr)return void this.fire(new Xe.j(new Error(`The source '${fr}' does not exist in the map's style.`)));const Ar=wr.getSource().type;"geojson"===Ar&&_r?this.fire(new Xe.j(new Error("GeoJSON sources cannot have a sourceLayer parameter."))):"vector"!==Ar||_r?(void 0===u.id&&this.fire(new Xe.j(new Error("The feature id parameter must be provided."))),wr.setFeatureState(_r,u.id,Wt)):this.fire(new Xe.j(new Error("The sourceLayer parameter must be provided for vector source types.")))}removeFeatureState(u,Wt){this._checkLoaded();const fr=u.source,_r=this.sourceCaches[fr];if(void 0===_r)return void this.fire(new Xe.j(new Error(`The source '${fr}' does not exist in the map's style.`)));const wr=_r.getSource().type,Ar="vector"===wr?u.sourceLayer:void 0;"vector"!==wr||Ar?Wt&&"string"!=typeof u.id&&"number"!=typeof u.id?this.fire(new Xe.j(new Error("A feature id is required to remove its specific state property."))):_r.removeFeatureState(Ar,u.id,Wt):this.fire(new Xe.j(new Error("The sourceLayer parameter must be provided for vector source types.")))}getFeatureState(u){this._checkLoaded();const Wt=u.source,fr=u.sourceLayer,_r=this.sourceCaches[Wt];if(void 0!==_r)return"vector"!==_r.getSource().type||fr?(void 0===u.id&&this.fire(new Xe.j(new Error("The feature id parameter must be provided."))),_r.getFeatureState(fr,u.id)):void this.fire(new Xe.j(new Error("The sourceLayer parameter must be provided for vector source types.")));this.fire(new Xe.j(new Error(`The source '${Wt}' does not exist in the map's style.`)))}getTransition(){return Xe.e({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)}serialize(){if(!this._loaded)return;const u=Xe.aF(this.sourceCaches,(u=>u.serialize())),Wt=this._serializeByIds(this._order,!0),fr=this.map.getTerrain()||void 0,_r=this.stylesheet;return Xe.aG({version:_r.version,name:_r.name,metadata:_r.metadata,light:_r.light,sky:_r.sky,center:_r.center,zoom:_r.zoom,bearing:_r.bearing,pitch:_r.pitch,sprite:_r.sprite,glyphs:_r.glyphs,transition:_r.transition,sources:u,layers:Wt,terrain:fr},(u=>void 0!==u))}_updateLayer(u){this._updatedLayers[u.id]=!0,u.source&&!this._updatedSources[u.source]&&"raster"!==this.sourceCaches[u.source].getSource().type&&(this._updatedSources[u.source]="reload",this.sourceCaches[u.source].pause()),this._serializedLayers=null,this._changed=!0}_flattenAndSortRenderedFeatures(u){const e=u=>"fill-extrusion"===this._layers[u].type,Xe={},Wt=[];for(let fr=this._order.length-1;fr>=0;fr--){const _r=this._order[fr];if(e(_r)){Xe[_r]=fr;for(const Xe of u){const u=Xe[_r];if(u)for(const Xe of u)Wt.push(Xe)}}}Wt.sort(((u,Xe)=>Xe.intersectionZ-u.intersectionZ));const fr=[];for(let _r=this._order.length-1;_r>=0;_r--){const wr=this._order[_r];if(e(wr))for(let u=Wt.length-1;u>=0;u--){const wr=Wt[u].feature;if(Xe[wr.layer.id]<_r)break;fr.push(wr),Wt.pop()}else for(const Xe of u){const u=Xe[wr];if(u)for(const Xe of u)fr.push(Xe.feature)}}return fr}queryRenderedFeatures(u,Wt,fr){Wt&&Wt.filter&&this._validate(Xe.u.filter,"queryRenderedFeatures.filter",Wt.filter,null,Wt);const _r={};if(Wt&&Wt.layers){if(!Array.isArray(Wt.layers))return this.fire(new Xe.j(new Error("parameters.layers must be an Array."))),[];for(const u of Wt.layers){const Wt=this._layers[u];if(!Wt)return this.fire(new Xe.j(new Error(`The layer '${u}' does not exist in the map's style and cannot be queried for features.`))),[];_r[Wt.source]=!0}}const wr=[];Wt.availableImages=this._availableImages;const Ar=this._serializedAllLayers();for(const Xe in this.sourceCaches)Wt.layers&&!_r[Xe]||wr.push(q(this.sourceCaches[Xe],this._layers,Ar,u,Wt,fr));return this.placement&&wr.push(function(u,Xe,Wt,fr,_r,wr,Ar){const Kr={},In=wr.queryRenderedSymbols(fr),no=[];for(const u of Object.keys(In).map(Number))no.push(Ar[u]);no.sort(V);for(const Wt of no){const fr=Wt.featureIndex.lookupSymbolFeatures(In[Wt.bucketInstanceId],Xe,Wt.bucketIndex,Wt.sourceLayerIndex,_r.filter,_r.layers,_r.availableImages,u);for(const u in fr){const Xe=Kr[u]=Kr[u]||[],_r=fr[u];_r.sort(((u,Xe)=>{const fr=Wt.featureSortOrder;if(fr){const Wt=fr.indexOf(u.featureIndex);return fr.indexOf(Xe.featureIndex)-Wt}return Xe.featureIndex-u.featureIndex}));for(const u of _r)Xe.push(u)}}for(const Xe in Kr)Kr[Xe].forEach((fr=>{const _r=fr.feature,wr=Wt[u[Xe].source].getFeatureState(_r.layer["source-layer"],_r.id);_r.source=_r.layer.source,_r.layer["source-layer"]&&(_r.sourceLayer=_r.layer["source-layer"]),_r.state=wr}));return Kr}(this._layers,Ar,this.sourceCaches,u,Wt,this.placement.collisionIndex,this.placement.retainedQueryData)),this._flattenAndSortRenderedFeatures(wr)}querySourceFeatures(u,Wt){Wt&&Wt.filter&&this._validate(Xe.u.filter,"querySourceFeatures.filter",Wt.filter,null,Wt);const fr=this.sourceCaches[u];return fr?function(u,Xe){const Wt=u.getRenderableIds().map((Xe=>u.getTileByID(Xe))),fr=[],_r={};for(let u=0;u<Wt.length;u++){const wr=Wt[u],Ar=wr.tileID.canonical.key;_r[Ar]||(_r[Ar]=!0,wr.querySourceFeatures(fr,Xe))}return fr}(fr,Wt):[]}getLight(){return this.light.getLight()}setLight(u,Wt={}){this._checkLoaded();const fr=this.light.getLight();let _r=!1;for(const Wt in u)if(!Xe.aE(u[Wt],fr[Wt])){_r=!0;break}if(!_r)return;const Ar={now:wr.now(),transition:Xe.e({duration:300,delay:0},this.stylesheet.transition)};this.light.setLight(u,Wt),this.light.updateTransitions(Ar)}getSky(){var u;return null===(u=this.stylesheet)||void 0===u?void 0:u.sky}setSky(u,Wt={}){const fr=this.getSky();let _r=!1;if(!u&&!fr)return;if(u&&!fr)_r=!0;else if(!u&&fr)_r=!0;else for(const Wt in u)if(!Xe.aE(u[Wt],fr[Wt])){_r=!0;break}if(!_r)return;const Ar={now:wr.now(),transition:Xe.e({duration:300,delay:0},this.stylesheet.transition)};this.stylesheet.sky=u,this.sky.setSky(u,Wt),this.sky.updateTransitions(Ar)}_validate(u,Wt,fr,_r,wr={}){return(!wr||!1!==wr.validate)&&ce(this,u.call(Xe.u,Xe.e({key:Wt,style:this.serialize(),value:fr,styleSpec:Xe.v},_r)))}_remove(u=!0){this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._loadStyleRequest&&(this._loadStyleRequest.abort(),this._loadStyleRequest=null),this._spriteRequest&&(this._spriteRequest.abort(),this._spriteRequest=null),nt().off(Bo,this._rtlPluginLoaded);for(const u in this._layers)this._layers[u].setEventedParent(null);for(const u in this.sourceCaches){const Xe=this.sourceCaches[u];Xe.setEventedParent(null),Xe.onRemove(this.map)}this.imageManager.setEventedParent(null),this.setEventedParent(null),u&&this.dispatcher.broadcast("RM",void 0),this.dispatcher.remove(u)}_clearSource(u){this.sourceCaches[u].clearTiles()}_reloadSource(u){this.sourceCaches[u].resume(),this.sourceCaches[u].reload()}_updateSources(u){for(const Xe in this.sourceCaches)this.sourceCaches[Xe].update(u,this.map.terrain)}_generateCollisionBoxes(){for(const u in this.sourceCaches)this._reloadSource(u)}_updatePlacement(u,Xe,Wt,fr,_r=!1){let Ar=!1,Kr=!1;const In={};for(const Xe of this._order){const Wt=this._layers[Xe];if("symbol"!==Wt.type)continue;if(!In[Wt.source]){const u=this.sourceCaches[Wt.source];In[Wt.source]=u.getRenderableIds(!0).map((Xe=>u.getTileByID(Xe))).sort(((u,Xe)=>Xe.tileID.overscaledZ-u.tileID.overscaledZ||(u.tileID.isLessThan(Xe.tileID)?-1:1)))}const fr=this.crossTileSymbolIndex.addLayer(Wt,In[Wt.source],u.center.lng);Ar=Ar||fr}if(this.crossTileSymbolIndex.pruneUnusedLayers(this._order),((_r=_r||this._layerOrderChanged||0===Wt)||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(wr.now(),u.zoom))&&(this.pauseablePlacement=new se(u,this.map.terrain,this._order,_r,Xe,Wt,fr,this.placement),this._layerOrderChanged=!1),this.pauseablePlacement.isDone()?this.placement.setStale():(this.pauseablePlacement.continuePlacement(this._order,this._layers,In),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(wr.now()),Kr=!0),Ar&&this.pauseablePlacement.placement.setStale()),Kr||Ar)for(const u of this._order){const Xe=this._layers[u];"symbol"===Xe.type&&this.placement.updateLayerOpacities(Xe,In[Xe.source])}return!this.pauseablePlacement.isDone()||this.placement.hasTransitions(wr.now())}_releaseSymbolFadeTiles(){for(const u in this.sourceCaches)this.sourceCaches[u].releaseSymbolFadeTiles()}getImages(u,Wt){return Xe._(this,void 0,void 0,(function*(){const u=yield this.imageManager.getImages(Wt.icons);this._updateTilesForChangedImages();const Xe=this.sourceCaches[Wt.source];return Xe&&Xe.setDependencies(Wt.tileID.key,Wt.type,Wt.icons),u}))}getGlyphs(u,Wt){return Xe._(this,void 0,void 0,(function*(){const u=yield this.glyphManager.getGlyphs(Wt.stacks),Xe=this.sourceCaches[Wt.source];return Xe&&Xe.setDependencies(Wt.tileID.key,Wt.type,[""]),u}))}getGlyphsUrl(){return this.stylesheet.glyphs||null}setGlyphs(u,Wt={}){this._checkLoaded(),u&&this._validate(Xe.u.glyphs,"glyphs",u,null,Wt)||(this._glyphsDidChange=!0,this.stylesheet.glyphs=u,this.glyphManager.entries={},this.glyphManager.setURL(u))}addSprite(u,Wt,fr={},_r){this._checkLoaded();const wr=[{id:u,url:Wt}],Ar=[...x(this.stylesheet.sprite),...wr];this._validate(Xe.u.sprite,"sprite",Ar,null,fr)||(this.stylesheet.sprite=Ar,this._loadSprite(wr,!0,_r))}removeSprite(u){this._checkLoaded();const Wt=x(this.stylesheet.sprite);if(Wt.find((Xe=>Xe.id===u))){if(this._spritesImagesIds[u])for(const Xe of this._spritesImagesIds[u])this.imageManager.removeImage(Xe),this._changedImages[Xe]=!0;Wt.splice(Wt.findIndex((Xe=>Xe.id===u)),1),this.stylesheet.sprite=Wt.length>0?Wt:void 0,delete this._spritesImagesIds[u],this._availableImages=this.imageManager.listImages(),this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new Xe.k("data",{dataType:"style"}))}else this.fire(new Xe.j(new Error(`Sprite "${u}" doesn't exists on this map.`)))}getSprite(){return x(this.stylesheet.sprite)}setSprite(u,Wt={},fr){this._checkLoaded(),u&&this._validate(Xe.u.sprite,"sprite",u,null,Wt)||(this.stylesheet.sprite=u,u?this._loadSprite(u,!0,fr):(this._unloadSprite(),fr&&fr(null)))}}var Bl=Xe.Y([{name:"a_pos",type:"Int16",components:2}]);const Nl={prelude:me("#ifdef GL_ES\nprecision mediump float;\n#else\n#if !defined(lowp)\n#define lowp\n#endif\n#if !defined(mediump)\n#define mediump\n#endif\n#if !defined(highp)\n#define highp\n#endif\n#endif\n","#ifdef GL_ES\nprecision highp float;\n#else\n#if !defined(lowp)\n#define lowp\n#endif\n#if !defined(mediump)\n#define mediump\n#endif\n#if !defined(highp)\n#define highp\n#endif\n#endif\nvec2 unpack_float(const float packedValue) {int packedIntValue=int(packedValue);int v0=packedIntValue/256;return vec2(v0,packedIntValue-v0*256);}vec2 unpack_opacity(const float packedOpacity) {int intOpacity=int(packedOpacity)/2;return vec2(float(intOpacity)/127.0,mod(packedOpacity,2.0));}vec4 decode_color(const vec2 encodedColor) {return vec4(unpack_float(encodedColor[0])/255.0,unpack_float(encodedColor[1])/255.0\n);}float unpack_mix_vec2(const vec2 packedValue,const float t) {return mix(packedValue[0],packedValue[1],t);}vec4 unpack_mix_color(const vec4 packedColors,const float t) {vec4 minColor=decode_color(vec2(packedColors[0],packedColors[1]));vec4 maxColor=decode_color(vec2(packedColors[2],packedColors[3]));return mix(minColor,maxColor,t);}vec2 get_pattern_pos(const vec2 pixel_coord_upper,const vec2 pixel_coord_lower,const vec2 pattern_size,const float tile_units_to_pixels,const vec2 pos) {vec2 offset=mod(mod(mod(pixel_coord_upper,pattern_size)*256.0,pattern_size)*256.0+pixel_coord_lower,pattern_size);return (tile_units_to_pixels*pos+offset)/pattern_size;}\n#ifdef TERRAIN3D\nuniform sampler2D u_terrain;uniform float u_terrain_dim;uniform mat4 u_terrain_matrix;uniform vec4 u_terrain_unpack;uniform float u_terrain_exaggeration;uniform highp sampler2D u_depth;\n#endif\nconst highp vec4 bitSh=vec4(256.*256.*256.,256.*256.,256.,1.);const highp vec4 bitShifts=vec4(1.)/bitSh;highp float unpack(highp vec4 color) {return dot(color,bitShifts);}highp float depthOpacity(vec3 frag) {\n#ifdef TERRAIN3D\nhighp float d=unpack(texture2D(u_depth,frag.xy*0.5+0.5))+0.0001-frag.z;return 1.0-max(0.0,min(1.0,-d*500.0));\n#else\nreturn 1.0;\n#endif\n}float calculate_visibility(vec4 pos) {\n#ifdef TERRAIN3D\nvec3 frag=pos.xyz/pos.w;highp float d=depthOpacity(frag);if (d > 0.95) return 1.0;return (d+depthOpacity(frag+vec3(0.0,0.01,0.0)))/2.0;\n#else\nreturn 1.0;\n#endif\n}float ele(vec2 pos) {\n#ifdef TERRAIN3D\nvec4 rgb=(texture2D(u_terrain,pos)*255.0)*u_terrain_unpack;return rgb.r+rgb.g+rgb.b-u_terrain_unpack.a;\n#else\nreturn 0.0;\n#endif\n}float get_elevation(vec2 pos) {\n#ifdef TERRAIN3D\nvec2 coord=(u_terrain_matrix*vec4(pos,0.0,1.0)).xy*u_terrain_dim+1.0;vec2 f=fract(coord);vec2 c=(floor(coord)+0.5)/(u_terrain_dim+2.0);float d=1.0/(u_terrain_dim+2.0);float tl=ele(c);float tr=ele(c+vec2(d,0.0));float bl=ele(c+vec2(0.0,d));float br=ele(c+vec2(d,d));float elevation=mix(mix(tl,tr,f.x),mix(bl,br,f.x),f.y);return elevation*u_terrain_exaggeration;\n#else\nreturn 0.0;\n#endif\n}"),background:me("uniform vec4 u_color;uniform float u_opacity;void main() {gl_FragColor=u_color*u_opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}"),backgroundPattern:me("uniform vec2 u_pattern_tl_a;uniform vec2 u_pattern_br_a;uniform vec2 u_pattern_tl_b;uniform vec2 u_pattern_br_b;uniform vec2 u_texsize;uniform float u_mix;uniform float u_opacity;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;void main() {vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(u_pattern_tl_a/u_texsize,u_pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(u_pattern_tl_b/u_texsize,u_pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);gl_FragColor=mix(color1,color2,u_mix)*u_opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_pattern_size_a;uniform vec2 u_pattern_size_b;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_scale_a;uniform float u_scale_b;uniform float u_tile_units_to_pixels;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_a*u_pattern_size_a,u_tile_units_to_pixels,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_b*u_pattern_size_b,u_tile_units_to_pixels,a_pos);}"),circle:me("varying vec3 v_data;varying float v_visibility;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define mediump float radius\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define highp vec4 stroke_color\n#pragma mapbox: define mediump float stroke_width\n#pragma mapbox: define lowp float stroke_opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize mediump float radius\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize highp vec4 stroke_color\n#pragma mapbox: initialize mediump float stroke_width\n#pragma mapbox: initialize lowp float stroke_opacity\nvec2 extrude=v_data.xy;float extrude_length=length(extrude);float antialiased_blur=v_data.z;float opacity_t=smoothstep(0.0,antialiased_blur,extrude_length-1.0);float color_t=stroke_width < 0.01 ? 0.0 : smoothstep(antialiased_blur,0.0,extrude_length-radius/(radius+stroke_width));gl_FragColor=v_visibility*opacity_t*mix(color*opacity,stroke_color*stroke_opacity,color_t);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform bool u_scale_with_map;uniform bool u_pitch_with_map;uniform vec2 u_extrude_scale;uniform lowp float u_device_pixel_ratio;uniform highp float u_camera_to_center_distance;attribute vec2 a_pos;varying vec3 v_data;varying float v_visibility;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define mediump float radius\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define highp vec4 stroke_color\n#pragma mapbox: define mediump float stroke_width\n#pragma mapbox: define lowp float stroke_opacity\nvoid main(void) {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize mediump float radius\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize highp vec4 stroke_color\n#pragma mapbox: initialize mediump float stroke_width\n#pragma mapbox: initialize lowp float stroke_opacity\nvec2 extrude=vec2(mod(a_pos,2.0)*2.0-1.0);vec2 circle_center=floor(a_pos*0.5);float ele=get_elevation(circle_center);v_visibility=calculate_visibility(u_matrix*vec4(circle_center,ele,1.0));if (u_pitch_with_map) {vec2 corner_position=circle_center;if (u_scale_with_map) {corner_position+=extrude*(radius+stroke_width)*u_extrude_scale;} else {vec4 projected_center=u_matrix*vec4(circle_center,0,1);corner_position+=extrude*(radius+stroke_width)*u_extrude_scale*(projected_center.w/u_camera_to_center_distance);}gl_Position=u_matrix*vec4(corner_position,ele,1);} else {gl_Position=u_matrix*vec4(circle_center,ele,1);if (u_scale_with_map) {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*u_camera_to_center_distance;} else {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*gl_Position.w;}}float antialiasblur=-max(1.0/u_device_pixel_ratio/(radius+stroke_width),blur);v_data=vec3(extrude.x,extrude.y,antialiasblur);}"),clippingMask:me("void main() {gl_FragColor=vec4(1.0);}","attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}"),heatmap:me("uniform highp float u_intensity;varying vec2 v_extrude;\n#pragma mapbox: define highp float weight\n#define GAUSS_COEF 0.3989422804014327\nvoid main() {\n#pragma mapbox: initialize highp float weight\nfloat d=-0.5*3.0*3.0*dot(v_extrude,v_extrude);float val=weight*u_intensity*GAUSS_COEF*exp(d);gl_FragColor=vec4(val,1.0,1.0,1.0);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform float u_extrude_scale;uniform float u_opacity;uniform float u_intensity;attribute vec2 a_pos;varying vec2 v_extrude;\n#pragma mapbox: define highp float weight\n#pragma mapbox: define mediump float radius\nconst highp float ZERO=1.0/255.0/16.0;\n#define GAUSS_COEF 0.3989422804014327\nvoid main(void) {\n#pragma mapbox: initialize highp float weight\n#pragma mapbox: initialize mediump float radius\nvec2 unscaled_extrude=vec2(mod(a_pos,2.0)*2.0-1.0);float S=sqrt(-2.0*log(ZERO/weight/u_intensity/GAUSS_COEF))/3.0;v_extrude=S*unscaled_extrude;vec2 extrude=v_extrude*radius*u_extrude_scale;vec4 pos=vec4(floor(a_pos*0.5)+extrude,get_elevation(floor(a_pos*0.5)),1);gl_Position=u_matrix*pos;}"),heatmapTexture:me("uniform sampler2D u_image;uniform sampler2D u_color_ramp;uniform float u_opacity;varying vec2 v_pos;void main() {float t=texture2D(u_image,v_pos).r;vec4 color=texture2D(u_color_ramp,vec2(t,0.5));gl_FragColor=color*u_opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(0.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_world;attribute vec2 a_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos*u_world,0,1);v_pos.x=a_pos.x;v_pos.y=1.0-a_pos.y;}"),collisionBox:me("varying float v_placed;varying float v_notUsed;void main() {float alpha=0.5;gl_FragColor=vec4(1.0,0.0,0.0,1.0)*alpha;if (v_placed > 0.5) {gl_FragColor=vec4(0.0,0.0,1.0,0.5)*alpha;}if (v_notUsed > 0.5) {gl_FragColor*=.1;}}","attribute vec2 a_anchor_pos;attribute vec2 a_placed;attribute vec2 a_box_real;uniform mat4 u_matrix;uniform vec2 u_pixel_extrude_scale;varying float v_placed;varying float v_notUsed;vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return u_matrix*vec4(posInTile,elevation,1.0);}void main() {gl_Position=projectTileWithElevation(a_anchor_pos,get_elevation(a_anchor_pos));gl_Position.xy=((a_box_real+0.5)*u_pixel_extrude_scale*2.0-1.0)*vec2(1.0,-1.0)*gl_Position.w;if (gl_Position.z/gl_Position.w < 1.1) {gl_Position.z=0.5;}v_placed=a_placed.x;v_notUsed=a_placed.y;}"),collisionCircle:me("varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;void main() {float alpha=0.5*min(v_perspective_ratio,1.0);float stroke_radius=0.9*max(v_perspective_ratio,1.0);float distance_to_center=length(v_extrude);float distance_to_edge=abs(distance_to_center-v_radius);float opacity_t=smoothstep(-stroke_radius,0.0,-distance_to_edge);vec4 color=mix(vec4(0.0,0.0,1.0,0.5),vec4(1.0,0.0,0.0,1.0),v_collision);gl_FragColor=color*alpha*opacity_t;}","attribute vec2 a_pos;attribute float a_radius;attribute vec2 a_flags;uniform mat4 u_matrix;uniform mat4 u_inv_matrix;uniform vec2 u_viewport_size;uniform float u_camera_to_center_distance;varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;vec3 toTilePosition(vec2 screenPos) {vec4 rayStart=u_inv_matrix*vec4(screenPos,-1.0,1.0);vec4 rayEnd =u_inv_matrix*vec4(screenPos, 1.0,1.0);rayStart.xyz/=rayStart.w;rayEnd.xyz /=rayEnd.w;highp float t=(0.0-rayStart.z)/(rayEnd.z-rayStart.z);return mix(rayStart.xyz,rayEnd.xyz,t);}void main() {vec2 quadCenterPos=a_pos;float radius=a_radius;float collision=a_flags.x;float vertexIdx=a_flags.y;vec2 quadVertexOffset=vec2(mix(-1.0,1.0,float(vertexIdx >=2.0)),mix(-1.0,1.0,float(vertexIdx >=1.0 && vertexIdx <=2.0)));vec2 quadVertexExtent=quadVertexOffset*radius;vec3 tilePos=toTilePosition(quadCenterPos);vec4 clipPos=u_matrix*vec4(tilePos,1.0);highp float camera_to_anchor_distance=clipPos.w;highp float collision_perspective_ratio=clamp(0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,4.0);float padding_factor=1.2;v_radius=radius;v_extrude=quadVertexExtent*padding_factor;v_perspective_ratio=collision_perspective_ratio;v_collision=collision;gl_Position=vec4(clipPos.xyz/clipPos.w,1.0)+vec4(quadVertexExtent*padding_factor/u_viewport_size*2.0,0.0,0.0);}"),debug:me("uniform highp vec4 u_color;uniform sampler2D u_overlay;varying vec2 v_uv;void main() {vec4 overlay_color=texture2D(u_overlay,v_uv);gl_FragColor=mix(u_color,overlay_color,overlay_color.a);}","attribute vec2 a_pos;varying vec2 v_uv;uniform mat4 u_matrix;uniform float u_overlay_scale;void main() {v_uv=a_pos/8192.0;gl_Position=u_matrix*vec4(a_pos*u_overlay_scale,get_elevation(a_pos),1);}"),fill:me("#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float opacity\ngl_FragColor=color*opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","attribute vec2 a_pos;uniform mat4 u_matrix;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float opacity\ngl_Position=u_matrix*vec4(a_pos,0,1);}"),fillOutline:me("varying vec2 v_pos;\n#pragma mapbox: define highp vec4 outline_color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 outline_color\n#pragma mapbox: initialize lowp float opacity\nfloat dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=outline_color*(alpha*opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","attribute vec2 a_pos;uniform mat4 u_matrix;uniform vec2 u_world;varying vec2 v_pos;\n#pragma mapbox: define highp vec4 outline_color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 outline_color\n#pragma mapbox: initialize lowp float opacity\ngl_Position=u_matrix*vec4(a_pos,0,1);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}"),fillOutlinePattern:me("uniform vec2 u_texsize;uniform sampler2D u_image;uniform float u_fade;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=mix(color1,color2,u_fade)*alpha*opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_world;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;gl_Position=u_matrix*vec4(a_pos,0,1);vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,a_pos);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}"),fillPattern:me("#ifdef GL_ES\nprecision highp float;\n#endif\nuniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);gl_FragColor=mix(color1,color2,u_fade)*opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;gl_Position=u_matrix*vec4(a_pos,0,1);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileZoomRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileZoomRatio,a_pos);}"),fillExtrusion:me("varying vec4 v_color;void main() {gl_FragColor=v_color;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;uniform float u_vertical_gradient;uniform lowp float u_opacity;attribute vec2 a_pos;attribute vec4 a_normal_ed;\n#ifdef TERRAIN3D\nattribute vec2 a_centroid;\n#endif\nvarying vec4 v_color;\n#pragma mapbox: define highp float base\n#pragma mapbox: define highp float height\n#pragma mapbox: define highp vec4 color\nvoid main() {\n#pragma mapbox: initialize highp float base\n#pragma mapbox: initialize highp float height\n#pragma mapbox: initialize highp vec4 color\nvec3 normal=a_normal_ed.xyz;\n#ifdef TERRAIN3D\nfloat height_terrain3d_offset=get_elevation(a_centroid);float base_terrain3d_offset=height_terrain3d_offset-(base > 0.0 ? 0.0 : 10.0);\n#else\nfloat height_terrain3d_offset=0.0;float base_terrain3d_offset=0.0;\n#endif\nbase=max(0.0,base)+base_terrain3d_offset;height=max(0.0,height)+height_terrain3d_offset;float t=mod(normal.x,2.0);gl_Position=u_matrix*vec4(a_pos,t > 0.0 ? height : base,1);float colorvalue=color.r*0.2126+color.g*0.7152+color.b*0.0722;v_color=vec4(0.0,0.0,0.0,1.0);vec4 ambientlight=vec4(0.03,0.03,0.03,1.0);color+=ambientlight;float directional=clamp(dot(normal/16384.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((1.0-colorvalue+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_color.r+=clamp(color.r*directional*u_lightcolor.r,mix(0.0,0.3,1.0-u_lightcolor.r),1.0);v_color.g+=clamp(color.g*directional*u_lightcolor.g,mix(0.0,0.3,1.0-u_lightcolor.g),1.0);v_color.b+=clamp(color.b*directional*u_lightcolor.b,mix(0.0,0.3,1.0-u_lightcolor.b),1.0);v_color*=u_opacity;}"),fillExtrusionPattern:me("uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting;\n#pragma mapbox: define lowp float base\n#pragma mapbox: define lowp float height\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\nvoid main() {\n#pragma mapbox: initialize lowp float base\n#pragma mapbox: initialize lowp float height\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);vec4 mixedColor=mix(color1,color2,u_fade);gl_FragColor=mixedColor*v_lighting;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_height_factor;uniform vec3 u_scale;uniform float u_vertical_gradient;uniform lowp float u_opacity;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;attribute vec2 a_pos;attribute vec4 a_normal_ed;\n#ifdef TERRAIN3D\nattribute vec2 a_centroid;\n#endif\nvarying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting;\n#pragma mapbox: define lowp float base\n#pragma mapbox: define lowp float height\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\nvoid main() {\n#pragma mapbox: initialize lowp float base\n#pragma mapbox: initialize lowp float height\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec3 normal=a_normal_ed.xyz;float edgedistance=a_normal_ed.w;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;\n#ifdef TERRAIN3D\nfloat height_terrain3d_offset=get_elevation(a_centroid);float base_terrain3d_offset=height_terrain3d_offset-(base > 0.0 ? 0.0 : 10.0);\n#else\nfloat height_terrain3d_offset=0.0;float base_terrain3d_offset=0.0;\n#endif\nbase=max(0.0,base)+base_terrain3d_offset;height=max(0.0,height)+height_terrain3d_offset;float t=mod(normal.x,2.0);float z=t > 0.0 ? height : base;gl_Position=u_matrix*vec4(a_pos,z,1);vec2 pos=normal.x==1.0 && normal.y==0.0 && normal.z==16384.0\n? a_pos\n: vec2(edgedistance,z*u_height_factor);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,pos);v_lighting=vec4(0.0,0.0,0.0,1.0);float directional=clamp(dot(normal/16383.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((0.5+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_lighting.rgb+=clamp(directional*u_lightcolor,mix(vec3(0.0),vec3(0.3),1.0-u_lightcolor),vec3(1.0));v_lighting*=u_opacity;}"),hillshadePrepare:me("#ifdef GL_ES\nprecision highp float;\n#endif\nuniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_dimension;uniform float u_zoom;uniform vec4 u_unpack;float getElevation(vec2 coord,float bias) {vec4 data=texture2D(u_image,coord)*255.0;data.a=-1.0;return dot(data,u_unpack)/4.0;}void main() {vec2 epsilon=1.0/u_dimension;float a=getElevation(v_pos+vec2(-epsilon.x,-epsilon.y),0.0);float b=getElevation(v_pos+vec2(0,-epsilon.y),0.0);float c=getElevation(v_pos+vec2(epsilon.x,-epsilon.y),0.0);float d=getElevation(v_pos+vec2(-epsilon.x,0),0.0);float e=getElevation(v_pos,0.0);float f=getElevation(v_pos+vec2(epsilon.x,0),0.0);float g=getElevation(v_pos+vec2(-epsilon.x,epsilon.y),0.0);float h=getElevation(v_pos+vec2(0,epsilon.y),0.0);float i=getElevation(v_pos+vec2(epsilon.x,epsilon.y),0.0);float exaggerationFactor=u_zoom < 2.0 ? 0.4 : u_zoom < 4.5 ? 0.35 : 0.3;float exaggeration=u_zoom < 15.0 ? (u_zoom-15.0)*exaggerationFactor : 0.0;vec2 deriv=vec2((c+f+f+i)-(a+d+d+g),(g+h+h+i)-(a+b+b+c))/pow(2.0,exaggeration+(19.2562-u_zoom));gl_FragColor=clamp(vec4(deriv.x/2.0+0.5,deriv.y/2.0+0.5,1.0,1.0),0.0,1.0);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_dimension;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);highp vec2 epsilon=1.0/u_dimension;float scale=(u_dimension.x-2.0)/u_dimension.x;v_pos=(a_texture_pos/8192.0)*scale+epsilon;}"),hillshade:me("uniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_latrange;uniform vec2 u_light;uniform vec4 u_shadow;uniform vec4 u_highlight;uniform vec4 u_accent;\n#define PI 3.141592653589793\nvoid main() {vec4 pixel=texture2D(u_image,v_pos);vec2 deriv=((pixel.rg*2.0)-1.0);float scaleFactor=cos(radians((u_latrange[0]-u_latrange[1])*(1.0-v_pos.y)+u_latrange[1]));float slope=atan(1.25*length(deriv)/scaleFactor);float aspect=deriv.x !=0.0 ? atan(deriv.y,-deriv.x) : PI/2.0*(deriv.y > 0.0 ? 1.0 :-1.0);float intensity=u_light.x;float azimuth=u_light.y+PI;float base=1.875-intensity*1.75;float maxValue=0.5*PI;float scaledSlope=intensity !=0.5 ? ((pow(base,slope)-1.0)/(pow(base,maxValue)-1.0))*maxValue : slope;float accent=cos(scaledSlope);vec4 accent_color=(1.0-accent)*u_accent*clamp(intensity*2.0,0.0,1.0);float shade=abs(mod((aspect+azimuth)/PI+0.5,2.0)-1.0);vec4 shade_color=mix(u_shadow,u_highlight,shade)*sin(scaledSlope)*clamp(intensity*2.0,0.0,1.0);gl_FragColor=accent_color*(1.0-shade_color.a)+shade_color;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=a_texture_pos/8192.0;}"),line:me("uniform lowp float u_device_pixel_ratio;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\nfloat dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);gl_FragColor=color*(alpha*opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","\n#define scale 0.015873016\nattribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform vec2 u_units_to_pixels;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp float v_linesofar;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float width\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump float gapwidth\n#pragma mapbox: initialize lowp float offset\n#pragma mapbox: initialize mediump float width\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;v_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*2.0;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;\n#ifdef TERRAIN3D\nv_gamma_scale=1.0;\n#else\nfloat extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;\n#endif\nv_width2=vec2(outset,inset);}"),lineGradient:me("uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;varying highp vec2 v_uv;\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\nfloat dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);vec4 color=texture2D(u_image,v_uv);gl_FragColor=color*(alpha*opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","\n#define scale 0.015873016\nattribute vec2 a_pos_normal;attribute vec4 a_data;attribute float a_uv_x;attribute float a_split_index;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_units_to_pixels;uniform float u_image_height;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp vec2 v_uv;\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float width\nvoid main() {\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump float gapwidth\n#pragma mapbox: initialize lowp float offset\n#pragma mapbox: initialize mediump float width\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;highp float texel_height=1.0/u_image_height;highp float half_texel_height=0.5*texel_height;v_uv=vec2(a_uv_x,a_split_index*texel_height-half_texel_height);vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;\n#ifdef TERRAIN3D\nv_gamma_scale=1.0;\n#else\nfloat extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;\n#endif\nv_width2=vec2(outset,inset);}"),linePattern:me("#ifdef GL_ES\nprecision highp float;\n#endif\nuniform lowp float u_device_pixel_ratio;uniform vec2 u_texsize;uniform float u_fade;uniform mediump vec3 u_scale;uniform sampler2D u_image;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width;\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;vec2 pattern_size_a=vec2(display_size_a.x*fromScale/tileZoomRatio,display_size_a.y);vec2 pattern_size_b=vec2(display_size_b.x*toScale/tileZoomRatio,display_size_b.y);float aspect_a=display_size_a.y/v_width;float aspect_b=display_size_b.y/v_width;float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float x_a=mod(v_linesofar/pattern_size_a.x*aspect_a,1.0);float x_b=mod(v_linesofar/pattern_size_b.x*aspect_b,1.0);float y=0.5*v_normal.y+0.5;vec2 texel_size=1.0/u_texsize;vec2 pos_a=mix(pattern_tl_a*texel_size-texel_size,pattern_br_a*texel_size+texel_size,vec2(x_a,y));vec2 pos_b=mix(pattern_tl_b*texel_size-texel_size,pattern_br_b*texel_size+texel_size,vec2(x_b,y));vec4 color=mix(texture2D(u_image,pos_a),texture2D(u_image,pos_b),u_fade);gl_FragColor=color*alpha*opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","\n#define scale 0.015873016\n#define LINE_DISTANCE_SCALE 2.0\nattribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform vec2 u_units_to_pixels;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width;\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define mediump float width\n#pragma mapbox: define lowp float floorwidth\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\nvoid main() {\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float offset\n#pragma mapbox: initialize mediump float gapwidth\n#pragma mapbox: initialize mediump float width\n#pragma mapbox: initialize lowp float floorwidth\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;\n#ifdef TERRAIN3D\nv_gamma_scale=1.0;\n#else\nfloat extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;\n#endif\nv_linesofar=a_linesofar;v_width2=vec2(outset,inset);v_width=floorwidth;}"),lineSDF:me("uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;uniform float u_sdfgamma;uniform float u_mix;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float width\n#pragma mapbox: define lowp float floorwidth\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump float width\n#pragma mapbox: initialize lowp float floorwidth\nfloat dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float sdfdist_a=texture2D(u_image,v_tex_a).a;float sdfdist_b=texture2D(u_image,v_tex_b).a;float sdfdist=mix(sdfdist_a,sdfdist_b,u_mix);alpha*=smoothstep(0.5-u_sdfgamma/floorwidth,0.5+u_sdfgamma/floorwidth,sdfdist);gl_FragColor=color*(alpha*opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","\n#define scale 0.015873016\n#define LINE_DISTANCE_SCALE 2.0\nattribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_patternscale_a;uniform float u_tex_y_a;uniform vec2 u_patternscale_b;uniform float u_tex_y_b;uniform vec2 u_units_to_pixels;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float width\n#pragma mapbox: define lowp float floorwidth\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump float gapwidth\n#pragma mapbox: initialize lowp float offset\n#pragma mapbox: initialize mediump float width\n#pragma mapbox: initialize lowp float floorwidth\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;\n#ifdef TERRAIN3D\nv_gamma_scale=1.0;\n#else\nfloat extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;\n#endif\nv_tex_a=vec2(a_linesofar*u_patternscale_a.x/floorwidth,normal.y*u_patternscale_a.y+u_tex_y_a);v_tex_b=vec2(a_linesofar*u_patternscale_b.x/floorwidth,normal.y*u_patternscale_b.y+u_tex_y_b);v_width2=vec2(outset,inset);}"),raster:me("uniform float u_fade_t;uniform float u_opacity;uniform sampler2D u_image0;uniform sampler2D u_image1;varying vec2 v_pos0;varying vec2 v_pos1;uniform float u_brightness_low;uniform float u_brightness_high;uniform float u_saturation_factor;uniform float u_contrast_factor;uniform vec3 u_spin_weights;void main() {vec4 color0=texture2D(u_image0,v_pos0);vec4 color1=texture2D(u_image1,v_pos1);if (color0.a > 0.0) {color0.rgb=color0.rgb/color0.a;}if (color1.a > 0.0) {color1.rgb=color1.rgb/color1.a;}vec4 color=mix(color0,color1,u_fade_t);color.a*=u_opacity;vec3 rgb=color.rgb;rgb=vec3(dot(rgb,u_spin_weights.xyz),dot(rgb,u_spin_weights.zxy),dot(rgb,u_spin_weights.yzx));float average=(color.r+color.g+color.b)/3.0;rgb+=(average-rgb)*u_saturation_factor;rgb=(rgb-0.5)*u_contrast_factor+0.5;vec3 u_high_vec=vec3(u_brightness_low,u_brightness_low,u_brightness_low);vec3 u_low_vec=vec3(u_brightness_high,u_brightness_high,u_brightness_high);gl_FragColor=vec4(mix(u_high_vec,u_low_vec,rgb)*color.a,color.a);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_tl_parent;uniform float u_scale_parent;uniform float u_buffer_scale;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos0;varying vec2 v_pos1;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos0=(((a_texture_pos/8192.0)-0.5)/u_buffer_scale )+0.5;v_pos1=(v_pos0*u_scale_parent)+u_tl_parent;}"),symbolIcon:me("uniform sampler2D u_texture;varying vec2 v_tex;varying float v_fade_opacity;\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\nlowp float alpha=opacity*v_fade_opacity;gl_FragColor=texture2D(u_texture,v_tex)*alpha;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform highp float u_camera_to_center_distance;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform float u_fade_change;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform vec2 u_texsize;uniform bool u_is_along_line;uniform bool u_is_variable_anchor;uniform vec2 u_translation;uniform float u_pitched_scale;varying vec2 v_tex;varying float v_fade_opacity;vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return u_matrix*vec4(posInTile,elevation,1.0);}\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\nvec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;vec2 a_minFontScale=a_pixeloffset.zw/256.0;float ele=get_elevation(a_pos);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?\ncamera_to_anchor_distance/u_camera_to_center_distance :\nu_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0;vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*max(a_minFontScale,fontScale)+a_pxoffset/16.0)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}gl_Position=finalPos;v_tex=a_tex/u_texsize;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float visibility=calculate_visibility(projectedPoint);v_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));}"),symbolSDF:me("#define SDF_PX 8.0\nuniform bool u_is_halo;uniform sampler2D u_texture;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;uniform bool u_is_text;varying vec2 v_data0;varying vec3 v_data1;\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\nvoid main() {\n#pragma mapbox: initialize highp vec4 fill_color\n#pragma mapbox: initialize highp vec4 halo_color\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float halo_width\n#pragma mapbox: initialize lowp float halo_blur\nfloat EDGE_GAMMA=0.105/u_device_pixel_ratio;vec2 tex=v_data0.xy;float gamma_scale=v_data1.x;float size=v_data1.y;float fade_opacity=v_data1[2];float fontScale=u_is_text ? size/24.0 : size;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float inner_edge=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);inner_edge=inner_edge+gamma*gamma_scale;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(inner_edge-gamma_scaled,inner_edge+gamma_scaled,dist);if (u_is_halo) {lowp float halo_edge=(6.0-halo_width/fontScale)/SDF_PX;alpha=min(smoothstep(halo_edge-gamma_scaled,halo_edge+gamma_scaled,dist),1.0-alpha);}gl_FragColor=color*(alpha*opacity*fade_opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform bool u_is_along_line;uniform bool u_is_variable_anchor;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;uniform vec2 u_translation;uniform float u_pitched_scale;varying vec2 v_data0;varying vec3 v_data1;vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return u_matrix*vec4(posInTile,elevation,1.0);}\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\nvoid main() {\n#pragma mapbox: initialize highp vec4 fill_color\n#pragma mapbox: initialize highp vec4 halo_color\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float halo_width\n#pragma mapbox: initialize lowp float halo_blur\nvec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;float ele=get_elevation(a_pos);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?\ncamera_to_anchor_distance/u_camera_to_center_distance :\nu_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0;vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale+a_pxoffset)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}float gamma_scale=finalPos.w;gl_Position=finalPos;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float visibility=calculate_visibility(projectedPoint);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));v_data0=a_tex/u_texsize;v_data1=vec3(gamma_scale,size,interpolated_fade_opacity);}"),symbolTextAndIcon:me("#define SDF_PX 8.0\n#define SDF 1.0\n#define ICON 0.0\nuniform bool u_is_halo;uniform sampler2D u_texture;uniform sampler2D u_texture_icon;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;varying vec4 v_data0;varying vec4 v_data1;\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\nvoid main() {\n#pragma mapbox: initialize highp vec4 fill_color\n#pragma mapbox: initialize highp vec4 halo_color\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float halo_width\n#pragma mapbox: initialize lowp float halo_blur\nfloat fade_opacity=v_data1[2];if (v_data1.w==ICON) {vec2 tex_icon=v_data0.zw;lowp float alpha=opacity*fade_opacity;gl_FragColor=texture2D(u_texture_icon,tex_icon)*alpha;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\nreturn;}vec2 tex=v_data0.xy;float EDGE_GAMMA=0.105/u_device_pixel_ratio;float gamma_scale=v_data1.x;float size=v_data1.y;float fontScale=size/24.0;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);buff=(6.0-halo_width/fontScale)/SDF_PX;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);gl_FragColor=color*(alpha*opacity*fade_opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;uniform vec2 u_texsize_icon;uniform bool u_is_along_line;uniform bool u_is_variable_anchor;uniform vec2 u_translation;uniform float u_pitched_scale;varying vec4 v_data0;varying vec4 v_data1;vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return u_matrix*vec4(posInTile,elevation,1.0);}\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\nvoid main() {\n#pragma mapbox: initialize highp vec4 fill_color\n#pragma mapbox: initialize highp vec4 halo_color\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float halo_width\n#pragma mapbox: initialize lowp float halo_blur\nvec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);float is_sdf=a_size[0]-2.0*a_size_min;float ele=get_elevation(a_pos);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?\ncamera_to_anchor_distance/u_camera_to_center_distance :\nu_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=size/24.0;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0;vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}float gamma_scale=finalPos.w;gl_Position=finalPos;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float visibility=calculate_visibility(projectedPoint);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));v_data0.xy=a_tex/u_texsize;v_data0.zw=a_tex/u_texsize_icon;v_data1=vec4(gamma_scale,size,interpolated_fade_opacity,is_sdf);}"),terrain:me("uniform sampler2D u_texture;uniform vec4 u_fog_color;uniform vec4 u_horizon_color;uniform float u_fog_ground_blend;uniform float u_fog_ground_blend_opacity;uniform float u_horizon_fog_blend;varying vec2 v_texture_pos;varying float v_fog_depth;const float gamma=2.2;vec4 gammaToLinear(vec4 color) {return pow(color,vec4(gamma));}vec4 linearToGamma(vec4 color) {return pow(color,vec4(1.0/gamma));}void main() {vec4 surface_color=texture2D(u_texture,v_texture_pos);if (v_fog_depth > u_fog_ground_blend) {vec4 surface_color_linear=gammaToLinear(surface_color);float blend_color=smoothstep(0.0,1.0,max((v_fog_depth-u_horizon_fog_blend)/(1.0-u_horizon_fog_blend),0.0));vec4 fog_horizon_color_linear=mix(gammaToLinear(u_fog_color),gammaToLinear(u_horizon_color),blend_color);float factor_fog=max(v_fog_depth-u_fog_ground_blend,0.0)/(1.0-u_fog_ground_blend);gl_FragColor=linearToGamma(mix(surface_color_linear,fog_horizon_color_linear,pow(factor_fog,2.0)*u_fog_ground_blend_opacity));} else {gl_FragColor=surface_color;}}","attribute vec3 a_pos3d;uniform mat4 u_matrix;uniform mat4 u_fog_matrix;uniform float u_ele_delta;varying vec2 v_texture_pos;varying float v_fog_depth;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;v_texture_pos=a_pos3d.xy/8192.0;gl_Position=u_matrix*vec4(a_pos3d.xy,ele-ele_delta,1.0);vec4 pos=u_fog_matrix*vec4(a_pos3d.xy,ele,1.0);v_fog_depth=pos.z/pos.w*0.5+0.5;}"),terrainDepth:me("varying float v_depth;const highp vec4 bitSh=vec4(256.*256.*256.,256.*256.,256.,1.);const highp vec4 bitMsk=vec4(0.,vec3(1./256.0));highp vec4 pack(highp float value) {highp vec4 comp=fract(value*bitSh);comp-=comp.xxyz*bitMsk;return comp;}void main() {gl_FragColor=pack(v_depth);}","attribute vec3 a_pos3d;uniform mat4 u_matrix;uniform float u_ele_delta;varying float v_depth;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;gl_Position=u_matrix*vec4(a_pos3d.xy,ele-ele_delta,1.0);v_depth=gl_Position.z/gl_Position.w;}"),terrainCoords:me("precision mediump float;uniform sampler2D u_texture;uniform float u_terrain_coords_id;varying vec2 v_texture_pos;void main() {vec4 rgba=texture2D(u_texture,v_texture_pos);gl_FragColor=vec4(rgba.r,rgba.g,rgba.b,u_terrain_coords_id);}","attribute vec3 a_pos3d;uniform mat4 u_matrix;uniform float u_ele_delta;varying vec2 v_texture_pos;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;v_texture_pos=a_pos3d.xy/8192.0;gl_Position=u_matrix*vec4(a_pos3d.xy,ele-ele_delta,1.0);}"),sky:me("uniform vec4 u_sky_color;uniform vec4 u_horizon_color;uniform float u_horizon;uniform float u_sky_horizon_blend;void main() {float y=gl_FragCoord.y;if (y > u_horizon) {float blend=y-u_horizon;if (blend < u_sky_horizon_blend) {gl_FragColor=mix(u_sky_color,u_horizon_color,pow(1.0-blend/u_sky_horizon_blend,2.0));} else {gl_FragColor=u_sky_color;}}}","attribute vec2 a_pos;void main() {gl_Position=vec4(a_pos,1.0,1.0);}")};function me(u,Xe){const Wt=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,fr=Xe.match(/attribute ([\w]+) ([\w]+)/g),_r=u.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),wr=Xe.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),Ar=wr?wr.concat(_r):_r,Kr={};return{fragmentSource:u=u.replace(Wt,((u,Xe,Wt,fr,_r)=>(Kr[_r]=!0,"define"===Xe?`\n#ifndef HAS_UNIFORM_u_${_r}\nvarying ${Wt} ${fr} ${_r};\n#else\nuniform ${Wt} ${fr} u_${_r};\n#endif\n`:`\n#ifdef HAS_UNIFORM_u_${_r}\n ${Wt} ${fr} ${_r} = u_${_r};\n#endif\n`))),vertexSource:Xe=Xe.replace(Wt,((u,Xe,Wt,fr,_r)=>{const wr="float"===fr?"vec2":"vec4",Ar=_r.match(/color/)?"color":wr;return Kr[_r]?"define"===Xe?`\n#ifndef HAS_UNIFORM_u_${_r}\nuniform lowp float u_${_r}_t;\nattribute ${Wt} ${wr} a_${_r};\nvarying ${Wt} ${fr} ${_r};\n#else\nuniform ${Wt} ${fr} u_${_r};\n#endif\n`:"vec4"===Ar?`\n#ifndef HAS_UNIFORM_u_${_r}\n ${_r} = a_${_r};\n#else\n ${Wt} ${fr} ${_r} = u_${_r};\n#endif\n`:`\n#ifndef HAS_UNIFORM_u_${_r}\n ${_r} = unpack_mix_${Ar}(a_${_r}, u_${_r}_t);\n#else\n ${Wt} ${fr} ${_r} = u_${_r};\n#endif\n`:"define"===Xe?`\n#ifndef HAS_UNIFORM_u_${_r}\nuniform lowp float u_${_r}_t;\nattribute ${Wt} ${wr} a_${_r};\n#else\nuniform ${Wt} ${fr} u_${_r};\n#endif\n`:"vec4"===Ar?`\n#ifndef HAS_UNIFORM_u_${_r}\n ${Wt} ${fr} ${_r} = a_${_r};\n#else\n ${Wt} ${fr} ${_r} = u_${_r};\n#endif\n`:`\n#ifndef HAS_UNIFORM_u_${_r}\n ${Wt} ${fr} ${_r} = unpack_mix_${Ar}(a_${_r}, u_${_r}_t);\n#else\n ${Wt} ${fr} ${_r} = u_${_r};\n#endif\n`})),staticAttributes:fr,staticUniforms:Ar}}class fe{constructor(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null}bind(u,Xe,Wt,fr,_r,wr,Ar,Kr,In){this.context=u;let no=this.boundPaintVertexBuffers.length!==fr.length;for(let u=0;!no&&u<fr.length;u++)this.boundPaintVertexBuffers[u]!==fr[u]&&(no=!0);!this.vao||this.boundProgram!==Xe||this.boundLayoutVertexBuffer!==Wt||no||this.boundIndexBuffer!==_r||this.boundVertexOffset!==wr||this.boundDynamicVertexBuffer!==Ar||this.boundDynamicVertexBuffer2!==Kr||this.boundDynamicVertexBuffer3!==In?this.freshBind(Xe,Wt,fr,_r,wr,Ar,Kr,In):(u.bindVertexArray.set(this.vao),Ar&&Ar.bind(),_r&&_r.dynamicDraw&&_r.bind(),Kr&&Kr.bind(),In&&In.bind())}freshBind(u,Xe,Wt,fr,_r,wr,Ar,Kr){const In=u.numAttributes,no=this.context,io=no.gl;this.vao&&this.destroy(),this.vao=no.createVertexArray(),no.bindVertexArray.set(this.vao),this.boundProgram=u,this.boundLayoutVertexBuffer=Xe,this.boundPaintVertexBuffers=Wt,this.boundIndexBuffer=fr,this.boundVertexOffset=_r,this.boundDynamicVertexBuffer=wr,this.boundDynamicVertexBuffer2=Ar,this.boundDynamicVertexBuffer3=Kr,Xe.enableAttributes(io,u);for(const Xe of Wt)Xe.enableAttributes(io,u);wr&&wr.enableAttributes(io,u),Ar&&Ar.enableAttributes(io,u),Kr&&Kr.enableAttributes(io,u),Xe.bind(),Xe.setVertexAttribPointers(io,u,_r);for(const Xe of Wt)Xe.bind(),Xe.setVertexAttribPointers(io,u,_r);wr&&(wr.bind(),wr.setVertexAttribPointers(io,u,_r)),fr&&fr.bind(),Ar&&(Ar.bind(),Ar.setVertexAttribPointers(io,u,_r)),Kr&&(Kr.bind(),Kr.setVertexAttribPointers(io,u,_r)),no.currentNumAttributes=In}destroy(){this.vao&&(this.context.deleteVertexArray(this.vao),this.vao=null)}}const ge=(u,Wt,fr,_r,wr)=>({u_matrix:u,u_texture:0,u_ele_delta:Wt,u_fog_matrix:fr,u_fog_color:_r?_r.properties.get("fog-color"):Xe.aM.white,u_fog_ground_blend:_r?_r.properties.get("fog-ground-blend"):1,u_fog_ground_blend_opacity:_r?_r.calculateFogBlendOpacity(wr):0,u_horizon_color:_r?_r.properties.get("horizon-color"):Xe.aM.white,u_horizon_fog_blend:_r?_r.properties.get("horizon-fog-blend"):1});function ve(u){const Xe=[];for(let Wt=0;Wt<u.length;Wt++){if(null===u[Wt])continue;const fr=u[Wt].split(" ");Xe.push(fr.pop())}return Xe}class xe{constructor(u,Wt,fr,_r,wr,Ar){const Kr=u.gl;this.program=Kr.createProgram();const In=ve(Wt.staticAttributes),no=fr?fr.getBinderAttributes():[],io=In.concat(no),oo=Nl.prelude.staticUniforms?ve(Nl.prelude.staticUniforms):[],ao=Wt.staticUniforms?ve(Wt.staticUniforms):[],so=fr?fr.getBinderUniforms():[],co=oo.concat(ao).concat(so),ho=[];for(const u of co)ho.indexOf(u)<0&&ho.push(u);const go=fr?fr.defines():[];wr&&go.push("#define OVERDRAW_INSPECTOR;"),Ar&&go.push("#define TERRAIN3D;");const xo=go.concat(Nl.prelude.fragmentSource,Wt.fragmentSource).join("\n"),ko=go.concat(Nl.prelude.vertexSource,Wt.vertexSource).join("\n"),Co=Kr.createShader(Kr.FRAGMENT_SHADER);if(Kr.isContextLost())return void(this.failedToCreate=!0);if(Kr.shaderSource(Co,xo),Kr.compileShader(Co),!Kr.getShaderParameter(Co,Kr.COMPILE_STATUS))throw new Error(`Could not compile fragment shader: ${Kr.getShaderInfoLog(Co)}`);Kr.attachShader(this.program,Co);const Io=Kr.createShader(Kr.VERTEX_SHADER);if(Kr.isContextLost())return void(this.failedToCreate=!0);if(Kr.shaderSource(Io,ko),Kr.compileShader(Io),!Kr.getShaderParameter(Io,Kr.COMPILE_STATUS))throw new Error(`Could not compile vertex shader: ${Kr.getShaderInfoLog(Io)}`);Kr.attachShader(this.program,Io),this.attributes={};const zo={};this.numAttributes=io.length;for(let u=0;u<this.numAttributes;u++)io[u]&&(Kr.bindAttribLocation(this.program,u,io[u]),this.attributes[io[u]]=u);if(Kr.linkProgram(this.program),!Kr.getProgramParameter(this.program,Kr.LINK_STATUS))throw new Error(`Program failed to link: ${Kr.getProgramInfoLog(this.program)}`);Kr.deleteShader(Io),Kr.deleteShader(Co);for(let u=0;u<ho.length;u++){const Xe=ho[u];if(Xe&&!zo[Xe]){const u=Kr.getUniformLocation(this.program,Xe);u&&(zo[Xe]=u)}}this.fixedUniforms=_r(u,zo),this.terrainUniforms=((u,Wt)=>({u_depth:new Xe.aH(u,Wt.u_depth),u_terrain:new Xe.aH(u,Wt.u_terrain),u_terrain_dim:new Xe.aI(u,Wt.u_terrain_dim),u_terrain_matrix:new Xe.aJ(u,Wt.u_terrain_matrix),u_terrain_unpack:new Xe.aK(u,Wt.u_terrain_unpack),u_terrain_exaggeration:new Xe.aI(u,Wt.u_terrain_exaggeration)}))(u,zo),this.binderUniforms=fr?fr.getUniforms(u,zo):[]}draw(u,Xe,Wt,fr,_r,wr,Ar,Kr,In,no,io,oo,ao,so,co,ho,go,xo){const ko=u.gl;if(this.failedToCreate)return;if(u.program.set(this.program),u.setDepthMode(Wt),u.setStencilMode(fr),u.setColorMode(_r),u.setCullFace(wr),Kr){u.activeTexture.set(ko.TEXTURE2),ko.bindTexture(ko.TEXTURE_2D,Kr.depthTexture),u.activeTexture.set(ko.TEXTURE3),ko.bindTexture(ko.TEXTURE_2D,Kr.texture);for(const u in this.terrainUniforms)this.terrainUniforms[u].set(Kr[u])}for(const u in this.fixedUniforms)this.fixedUniforms[u].set(Ar[u]);co&&co.setUniforms(u,this.binderUniforms,ao,{zoom:so});let Co=0;switch(Xe){case ko.LINES:Co=2;break;case ko.TRIANGLES:Co=3;break;case ko.LINE_STRIP:Co=1}for(const Wt of oo.get()){const fr=Wt.vaos||(Wt.vaos={});(fr[In]||(fr[In]=new fe)).bind(u,this,no,co?co.getPaintVertexBuffers():[],io,Wt.vertexOffset,ho,go,xo),ko.drawElements(Xe,Wt.primitiveLength*Co,ko.UNSIGNED_SHORT,Wt.primitiveOffset*Co*2)}}}function ye(u,Xe,Wt){const fr=1/Bt(Wt,1,Xe.transform.tileZoom),_r=Math.pow(2,Wt.tileID.overscaledZ),wr=Wt.tileSize*Math.pow(2,Xe.transform.tileZoom)/_r,Ar=wr*(Wt.tileID.canonical.x+Wt.tileID.wrap*_r),Kr=wr*Wt.tileID.canonical.y;return{u_image:0,u_texsize:Wt.imageAtlasTexture.size,u_scale:[fr,u.fromScale,u.toScale],u_fade:u.t,u_pixel_coord_upper:[Ar>>16,Kr>>16],u_pixel_coord_lower:[65535&Ar,65535&Kr]}}const be=(u,Wt,fr,_r)=>{const wr=Wt.style.light,Ar=wr.properties.get("position"),Kr=[Ar.x,Ar.y,Ar.z],In=function(){var u=new Xe.A(9);return Xe.A!=Float32Array&&(u[1]=0,u[2]=0,u[3]=0,u[5]=0,u[6]=0,u[7]=0),u[0]=1,u[4]=1,u[8]=1,u}();"viewport"===wr.properties.get("anchor")&&function(u,Xe){var Wt=Math.sin(Xe),fr=Math.cos(Xe);u[0]=fr,u[1]=Wt,u[2]=0,u[3]=-Wt,u[4]=fr,u[5]=0,u[6]=0,u[7]=0,u[8]=1}(In,-Wt.transform.angle),function(u,Xe,Wt){var fr=Xe[0],_r=Xe[1],wr=Xe[2];u[0]=fr*Wt[0]+_r*Wt[3]+wr*Wt[6],u[1]=fr*Wt[1]+_r*Wt[4]+wr*Wt[7],u[2]=fr*Wt[2]+_r*Wt[5]+wr*Wt[8]}(Kr,Kr,In);const no=wr.properties.get("color");return{u_matrix:u,u_lightpos:Kr,u_lightintensity:wr.properties.get("intensity"),u_lightcolor:[no.r,no.g,no.b],u_vertical_gradient:+fr,u_opacity:_r}},we=(u,Wt,fr,_r,wr,Ar,Kr)=>Xe.e(be(u,Wt,fr,_r),ye(Ar,Wt,Kr),{u_height_factor:-Math.pow(2,wr.overscaledZ)/Kr.tileSize/8}),Te=u=>({u_matrix:u}),Ie=(u,Wt,fr,_r)=>Xe.e(Te(u),ye(fr,Wt,_r)),Ee=(u,Xe)=>({u_matrix:u,u_world:Xe}),Pe=(u,Wt,fr,_r,wr)=>Xe.e(Ie(u,Wt,fr,_r),{u_world:wr}),Ce=(u,Xe,Wt,fr)=>{const _r=u.transform;let wr,Ar;if("map"===fr.paint.get("circle-pitch-alignment")){const u=Bt(Wt,1,_r.zoom);wr=!0,Ar=[u,u]}else wr=!1,Ar=_r.pixelsToGLUnits;return{u_camera_to_center_distance:_r.cameraToCenterDistance,u_scale_with_map:+("map"===fr.paint.get("circle-pitch-scale")),u_matrix:u.translatePosMatrix(Xe.posMatrix,Wt,fr.paint.get("circle-translate"),fr.paint.get("circle-translate-anchor")),u_pitch_with_map:+wr,u_device_pixel_ratio:u.pixelRatio,u_extrude_scale:Ar}},Se=(u,Xe,Wt)=>({u_matrix:u,u_inv_matrix:Xe,u_camera_to_center_distance:Wt.cameraToCenterDistance,u_viewport_size:[Wt.width,Wt.height]}),ze=(u,Xe,Wt=1)=>({u_matrix:u,u_color:Xe,u_overlay:0,u_overlay_scale:Wt}),De=u=>({u_matrix:u}),Me=(u,Xe,Wt,fr)=>({u_matrix:u,u_extrude_scale:Bt(Xe,1,Wt),u_intensity:fr}),Ae=(u,Wt,fr,_r)=>{const wr=Xe.H();Xe.aP(wr,0,u.width,u.height,0,0,1);const Ar=u.context.gl;return{u_matrix:wr,u_world:[Ar.drawingBufferWidth,Ar.drawingBufferHeight],u_image:fr,u_color_ramp:_r,u_opacity:Wt.paint.get("heatmap-opacity")}};function Re(u,Wt){const fr=Math.pow(2,Wt.canonical.z),_r=Wt.canonical.y;return[new Xe.Z(0,_r/fr).toLngLat().lat,new Xe.Z(0,(_r+1)/fr).toLngLat().lat]}const ke=(u,Xe,Wt,fr)=>{const _r=u.transform;return{u_matrix:Ne(u,Xe,Wt,fr),u_ratio:1/Bt(Xe,1,_r.zoom),u_device_pixel_ratio:u.pixelRatio,u_units_to_pixels:[1/_r.pixelsToGLUnits[0],1/_r.pixelsToGLUnits[1]]}},Le=(u,Wt,fr,_r,wr)=>Xe.e(ke(u,Wt,fr,wr),{u_image:0,u_image_height:_r}),Fe=(u,Xe,Wt,fr,_r)=>{const wr=u.transform,Ar=Oe(Xe,wr);return{u_matrix:Ne(u,Xe,Wt,_r),u_texsize:Xe.imageAtlasTexture.size,u_ratio:1/Bt(Xe,1,wr.zoom),u_device_pixel_ratio:u.pixelRatio,u_image:0,u_scale:[Ar,fr.fromScale,fr.toScale],u_fade:fr.t,u_units_to_pixels:[1/wr.pixelsToGLUnits[0],1/wr.pixelsToGLUnits[1]]}},Be=(u,Wt,fr,_r,wr,Ar)=>{const Kr=u.lineAtlas,In=Oe(Wt,u.transform),no="round"===fr.layout.get("line-cap"),io=Kr.getDash(_r.from,no),oo=Kr.getDash(_r.to,no),ao=io.width*wr.fromScale,so=oo.width*wr.toScale;return Xe.e(ke(u,Wt,fr,Ar),{u_patternscale_a:[In/ao,-io.height/2],u_patternscale_b:[In/so,-oo.height/2],u_sdfgamma:Kr.width/(256*Math.min(ao,so)*u.pixelRatio)/2,u_image:0,u_tex_y_a:io.y,u_tex_y_b:oo.y,u_mix:wr.t})};function Oe(u,Xe){return 1/Bt(u,1,Xe.tileZoom)}function Ne(u,Xe,Wt,fr){return u.translatePosMatrix(fr?fr.posMatrix:Xe.tileID.posMatrix,Xe,Wt.paint.get("line-translate"),Wt.paint.get("line-translate-anchor"))}const Ue=(u,Xe,Wt,fr,_r)=>{return{u_matrix:u,u_tl_parent:Xe,u_scale_parent:Wt,u_buffer_scale:1,u_fade_t:fr.mix,u_opacity:fr.opacity*_r.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:_r.paint.get("raster-brightness-min"),u_brightness_high:_r.paint.get("raster-brightness-max"),u_saturation_factor:(Ar=_r.paint.get("raster-saturation"),Ar>0?1-1/(1.001-Ar):-Ar),u_contrast_factor:(wr=_r.paint.get("raster-contrast"),wr>0?1/(1-wr):1+wr),u_spin_weights:je(_r.paint.get("raster-hue-rotate"))};var wr,Ar};function je(u){u*=Math.PI/180;const Xe=Math.sin(u),Wt=Math.cos(u);return[(2*Wt+1)/3,(-Math.sqrt(3)*Xe-Wt+1)/3,(Math.sqrt(3)*Xe-Wt+1)/3]}const Ze=(u,Xe,Wt,fr,_r,wr,Ar,Kr,In,no,io,oo,ao,so)=>{const co=Ar.transform;return{u_is_size_zoom_constant:+("constant"===u||"source"===u),u_is_size_feature_constant:+("constant"===u||"camera"===u),u_size_t:Xe?Xe.uSizeT:0,u_size:Xe?Xe.uSize:0,u_camera_to_center_distance:co.cameraToCenterDistance,u_pitch:co.pitch/360*2*Math.PI,u_rotate_symbol:+Wt,u_aspect_ratio:co.width/co.height,u_fade_change:Ar.options.fadeDuration?Ar.symbolFadeChange:1,u_matrix:Kr,u_label_plane_matrix:In,u_coord_matrix:no,u_is_text:+oo,u_pitch_with_map:+fr,u_is_along_line:_r,u_is_variable_anchor:wr,u_texsize:ao,u_texture:0,u_translation:io,u_pitched_scale:so}},qe=(u,Wt,fr,_r,wr,Ar,Kr,In,no,io,oo,ao,so,co,ho)=>{const go=Kr.transform;return Xe.e(Ze(u,Wt,fr,_r,wr,Ar,Kr,In,no,io,oo,ao,so,ho),{u_gamma_scale:_r?Math.cos(go._pitch)*go.cameraToCenterDistance:1,u_device_pixel_ratio:Kr.pixelRatio,u_is_halo:+co})},Ve=(u,Wt,fr,_r,wr,Ar,Kr,In,no,io,oo,ao,so,co)=>Xe.e(qe(u,Wt,fr,_r,wr,Ar,Kr,In,no,io,oo,!0,ao,!0,co),{u_texsize_icon:so,u_texture_icon:1}),Ge=(u,Xe,Wt)=>({u_matrix:u,u_opacity:Xe,u_color:Wt}),He=(u,Wt,fr,_r,wr,Ar)=>Xe.e(function(u,Xe,Wt,fr){const _r=Wt.imageManager.getPattern(u.from.toString()),wr=Wt.imageManager.getPattern(u.to.toString()),{width:Ar,height:Kr}=Wt.imageManager.getPixelSize(),In=Math.pow(2,fr.tileID.overscaledZ),no=fr.tileSize*Math.pow(2,Wt.transform.tileZoom)/In,io=no*(fr.tileID.canonical.x+fr.tileID.wrap*In),oo=no*fr.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:_r.tl,u_pattern_br_a:_r.br,u_pattern_tl_b:wr.tl,u_pattern_br_b:wr.br,u_texsize:[Ar,Kr],u_mix:Xe.t,u_pattern_size_a:_r.displaySize,u_pattern_size_b:wr.displaySize,u_scale_a:Xe.fromScale,u_scale_b:Xe.toScale,u_tile_units_to_pixels:1/Bt(fr,1,Wt.transform.tileZoom),u_pixel_coord_upper:[io>>16,oo>>16],u_pixel_coord_lower:[65535&io,65535&oo]}}(_r,Ar,fr,wr),{u_matrix:u,u_opacity:Wt}),Vl={fillExtrusion:(u,Wt)=>({u_matrix:new Xe.aJ(u,Wt.u_matrix),u_lightpos:new Xe.aN(u,Wt.u_lightpos),u_lightintensity:new Xe.aI(u,Wt.u_lightintensity),u_lightcolor:new Xe.aN(u,Wt.u_lightcolor),u_vertical_gradient:new Xe.aI(u,Wt.u_vertical_gradient),u_opacity:new Xe.aI(u,Wt.u_opacity)}),fillExtrusionPattern:(u,Wt)=>({u_matrix:new Xe.aJ(u,Wt.u_matrix),u_lightpos:new Xe.aN(u,Wt.u_lightpos),u_lightintensity:new Xe.aI(u,Wt.u_lightintensity),u_lightcolor:new Xe.aN(u,Wt.u_lightcolor),u_vertical_gradient:new Xe.aI(u,Wt.u_vertical_gradient),u_height_factor:new Xe.aI(u,Wt.u_height_factor),u_image:new Xe.aH(u,Wt.u_image),u_texsize:new Xe.aO(u,Wt.u_texsize),u_pixel_coord_upper:new Xe.aO(u,Wt.u_pixel_coord_upper),u_pixel_coord_lower:new Xe.aO(u,Wt.u_pixel_coord_lower),u_scale:new Xe.aN(u,Wt.u_scale),u_fade:new Xe.aI(u,Wt.u_fade),u_opacity:new Xe.aI(u,Wt.u_opacity)}),fill:(u,Wt)=>({u_matrix:new Xe.aJ(u,Wt.u_matrix)}),fillPattern:(u,Wt)=>({u_matrix:new Xe.aJ(u,Wt.u_matrix),u_image:new Xe.aH(u,Wt.u_image),u_texsize:new Xe.aO(u,Wt.u_texsize),u_pixel_coord_upper:new Xe.aO(u,Wt.u_pixel_coord_upper),u_pixel_coord_lower:new Xe.aO(u,Wt.u_pixel_coord_lower),u_scale:new Xe.aN(u,Wt.u_scale),u_fade:new Xe.aI(u,Wt.u_fade)}),fillOutline:(u,Wt)=>({u_matrix:new Xe.aJ(u,Wt.u_matrix),u_world:new Xe.aO(u,Wt.u_world)}),fillOutlinePattern:(u,Wt)=>({u_matrix:new Xe.aJ(u,Wt.u_matrix),u_world:new Xe.aO(u,Wt.u_world),u_image:new Xe.aH(u,Wt.u_image),u_texsize:new Xe.aO(u,Wt.u_texsize),u_pixel_coord_upper:new Xe.aO(u,Wt.u_pixel_coord_upper),u_pixel_coord_lower:new Xe.aO(u,Wt.u_pixel_coord_lower),u_scale:new Xe.aN(u,Wt.u_scale),u_fade:new Xe.aI(u,Wt.u_fade)}),circle:(u,Wt)=>({u_camera_to_center_distance:new Xe.aI(u,Wt.u_camera_to_center_distance),u_scale_with_map:new Xe.aH(u,Wt.u_scale_with_map),u_pitch_with_map:new Xe.aH(u,Wt.u_pitch_with_map),u_extrude_scale:new Xe.aO(u,Wt.u_extrude_scale),u_device_pixel_ratio:new Xe.aI(u,Wt.u_device_pixel_ratio),u_matrix:new Xe.aJ(u,Wt.u_matrix)}),collisionBox:(u,Wt)=>({u_matrix:new Xe.aJ(u,Wt.u_matrix),u_pixel_extrude_scale:new Xe.aO(u,Wt.u_pixel_extrude_scale)}),collisionCircle:(u,Wt)=>({u_matrix:new Xe.aJ(u,Wt.u_matrix),u_inv_matrix:new Xe.aJ(u,Wt.u_inv_matrix),u_camera_to_center_distance:new Xe.aI(u,Wt.u_camera_to_center_distance),u_viewport_size:new Xe.aO(u,Wt.u_viewport_size)}),debug:(u,Wt)=>({u_color:new Xe.aL(u,Wt.u_color),u_matrix:new Xe.aJ(u,Wt.u_matrix),u_overlay:new Xe.aH(u,Wt.u_overlay),u_overlay_scale:new Xe.aI(u,Wt.u_overlay_scale)}),clippingMask:(u,Wt)=>({u_matrix:new Xe.aJ(u,Wt.u_matrix)}),heatmap:(u,Wt)=>({u_extrude_scale:new Xe.aI(u,Wt.u_extrude_scale),u_intensity:new Xe.aI(u,Wt.u_intensity),u_matrix:new Xe.aJ(u,Wt.u_matrix)}),heatmapTexture:(u,Wt)=>({u_matrix:new Xe.aJ(u,Wt.u_matrix),u_world:new Xe.aO(u,Wt.u_world),u_image:new Xe.aH(u,Wt.u_image),u_color_ramp:new Xe.aH(u,Wt.u_color_ramp),u_opacity:new Xe.aI(u,Wt.u_opacity)}),hillshade:(u,Wt)=>({u_matrix:new Xe.aJ(u,Wt.u_matrix),u_image:new Xe.aH(u,Wt.u_image),u_latrange:new Xe.aO(u,Wt.u_latrange),u_light:new Xe.aO(u,Wt.u_light),u_shadow:new Xe.aL(u,Wt.u_shadow),u_highlight:new Xe.aL(u,Wt.u_highlight),u_accent:new Xe.aL(u,Wt.u_accent)}),hillshadePrepare:(u,Wt)=>({u_matrix:new Xe.aJ(u,Wt.u_matrix),u_image:new Xe.aH(u,Wt.u_image),u_dimension:new Xe.aO(u,Wt.u_dimension),u_zoom:new Xe.aI(u,Wt.u_zoom),u_unpack:new Xe.aK(u,Wt.u_unpack)}),line:(u,Wt)=>({u_matrix:new Xe.aJ(u,Wt.u_matrix),u_ratio:new Xe.aI(u,Wt.u_ratio),u_device_pixel_ratio:new Xe.aI(u,Wt.u_device_pixel_ratio),u_units_to_pixels:new Xe.aO(u,Wt.u_units_to_pixels)}),lineGradient:(u,Wt)=>({u_matrix:new Xe.aJ(u,Wt.u_matrix),u_ratio:new Xe.aI(u,Wt.u_ratio),u_device_pixel_ratio:new Xe.aI(u,Wt.u_device_pixel_ratio),u_units_to_pixels:new Xe.aO(u,Wt.u_units_to_pixels),u_image:new Xe.aH(u,Wt.u_image),u_image_height:new Xe.aI(u,Wt.u_image_height)}),linePattern:(u,Wt)=>({u_matrix:new Xe.aJ(u,Wt.u_matrix),u_texsize:new Xe.aO(u,Wt.u_texsize),u_ratio:new Xe.aI(u,Wt.u_ratio),u_device_pixel_ratio:new Xe.aI(u,Wt.u_device_pixel_ratio),u_image:new Xe.aH(u,Wt.u_image),u_units_to_pixels:new Xe.aO(u,Wt.u_units_to_pixels),u_scale:new Xe.aN(u,Wt.u_scale),u_fade:new Xe.aI(u,Wt.u_fade)}),lineSDF:(u,Wt)=>({u_matrix:new Xe.aJ(u,Wt.u_matrix),u_ratio:new Xe.aI(u,Wt.u_ratio),u_device_pixel_ratio:new Xe.aI(u,Wt.u_device_pixel_ratio),u_units_to_pixels:new Xe.aO(u,Wt.u_units_to_pixels),u_patternscale_a:new Xe.aO(u,Wt.u_patternscale_a),u_patternscale_b:new Xe.aO(u,Wt.u_patternscale_b),u_sdfgamma:new Xe.aI(u,Wt.u_sdfgamma),u_image:new Xe.aH(u,Wt.u_image),u_tex_y_a:new Xe.aI(u,Wt.u_tex_y_a),u_tex_y_b:new Xe.aI(u,Wt.u_tex_y_b),u_mix:new Xe.aI(u,Wt.u_mix)}),raster:(u,Wt)=>({u_matrix:new Xe.aJ(u,Wt.u_matrix),u_tl_parent:new Xe.aO(u,Wt.u_tl_parent),u_scale_parent:new Xe.aI(u,Wt.u_scale_parent),u_buffer_scale:new Xe.aI(u,Wt.u_buffer_scale),u_fade_t:new Xe.aI(u,Wt.u_fade_t),u_opacity:new Xe.aI(u,Wt.u_opacity),u_image0:new Xe.aH(u,Wt.u_image0),u_image1:new Xe.aH(u,Wt.u_image1),u_brightness_low:new Xe.aI(u,Wt.u_brightness_low),u_brightness_high:new Xe.aI(u,Wt.u_brightness_high),u_saturation_factor:new Xe.aI(u,Wt.u_saturation_factor),u_contrast_factor:new Xe.aI(u,Wt.u_contrast_factor),u_spin_weights:new Xe.aN(u,Wt.u_spin_weights)}),symbolIcon:(u,Wt)=>({u_is_size_zoom_constant:new Xe.aH(u,Wt.u_is_size_zoom_constant),u_is_size_feature_constant:new Xe.aH(u,Wt.u_is_size_feature_constant),u_size_t:new Xe.aI(u,Wt.u_size_t),u_size:new Xe.aI(u,Wt.u_size),u_camera_to_center_distance:new Xe.aI(u,Wt.u_camera_to_center_distance),u_pitch:new Xe.aI(u,Wt.u_pitch),u_rotate_symbol:new Xe.aH(u,Wt.u_rotate_symbol),u_aspect_ratio:new Xe.aI(u,Wt.u_aspect_ratio),u_fade_change:new Xe.aI(u,Wt.u_fade_change),u_matrix:new Xe.aJ(u,Wt.u_matrix),u_label_plane_matrix:new Xe.aJ(u,Wt.u_label_plane_matrix),u_coord_matrix:new Xe.aJ(u,Wt.u_coord_matrix),u_is_text:new Xe.aH(u,Wt.u_is_text),u_pitch_with_map:new Xe.aH(u,Wt.u_pitch_with_map),u_is_along_line:new Xe.aH(u,Wt.u_is_along_line),u_is_variable_anchor:new Xe.aH(u,Wt.u_is_variable_anchor),u_texsize:new Xe.aO(u,Wt.u_texsize),u_texture:new Xe.aH(u,Wt.u_texture),u_translation:new Xe.aO(u,Wt.u_translation),u_pitched_scale:new Xe.aI(u,Wt.u_pitched_scale)}),symbolSDF:(u,Wt)=>({u_is_size_zoom_constant:new Xe.aH(u,Wt.u_is_size_zoom_constant),u_is_size_feature_constant:new Xe.aH(u,Wt.u_is_size_feature_constant),u_size_t:new Xe.aI(u,Wt.u_size_t),u_size:new Xe.aI(u,Wt.u_size),u_camera_to_center_distance:new Xe.aI(u,Wt.u_camera_to_center_distance),u_pitch:new Xe.aI(u,Wt.u_pitch),u_rotate_symbol:new Xe.aH(u,Wt.u_rotate_symbol),u_aspect_ratio:new Xe.aI(u,Wt.u_aspect_ratio),u_fade_change:new Xe.aI(u,Wt.u_fade_change),u_matrix:new Xe.aJ(u,Wt.u_matrix),u_label_plane_matrix:new Xe.aJ(u,Wt.u_label_plane_matrix),u_coord_matrix:new Xe.aJ(u,Wt.u_coord_matrix),u_is_text:new Xe.aH(u,Wt.u_is_text),u_pitch_with_map:new Xe.aH(u,Wt.u_pitch_with_map),u_is_along_line:new Xe.aH(u,Wt.u_is_along_line),u_is_variable_anchor:new Xe.aH(u,Wt.u_is_variable_anchor),u_texsize:new Xe.aO(u,Wt.u_texsize),u_texture:new Xe.aH(u,Wt.u_texture),u_gamma_scale:new Xe.aI(u,Wt.u_gamma_scale),u_device_pixel_ratio:new Xe.aI(u,Wt.u_device_pixel_ratio),u_is_halo:new Xe.aH(u,Wt.u_is_halo),u_translation:new Xe.aO(u,Wt.u_translation),u_pitched_scale:new Xe.aI(u,Wt.u_pitched_scale)}),symbolTextAndIcon:(u,Wt)=>({u_is_size_zoom_constant:new Xe.aH(u,Wt.u_is_size_zoom_constant),u_is_size_feature_constant:new Xe.aH(u,Wt.u_is_size_feature_constant),u_size_t:new Xe.aI(u,Wt.u_size_t),u_size:new Xe.aI(u,Wt.u_size),u_camera_to_center_distance:new Xe.aI(u,Wt.u_camera_to_center_distance),u_pitch:new Xe.aI(u,Wt.u_pitch),u_rotate_symbol:new Xe.aH(u,Wt.u_rotate_symbol),u_aspect_ratio:new Xe.aI(u,Wt.u_aspect_ratio),u_fade_change:new Xe.aI(u,Wt.u_fade_change),u_matrix:new Xe.aJ(u,Wt.u_matrix),u_label_plane_matrix:new Xe.aJ(u,Wt.u_label_plane_matrix),u_coord_matrix:new Xe.aJ(u,Wt.u_coord_matrix),u_is_text:new Xe.aH(u,Wt.u_is_text),u_pitch_with_map:new Xe.aH(u,Wt.u_pitch_with_map),u_is_along_line:new Xe.aH(u,Wt.u_is_along_line),u_is_variable_anchor:new Xe.aH(u,Wt.u_is_variable_anchor),u_texsize:new Xe.aO(u,Wt.u_texsize),u_texsize_icon:new Xe.aO(u,Wt.u_texsize_icon),u_texture:new Xe.aH(u,Wt.u_texture),u_texture_icon:new Xe.aH(u,Wt.u_texture_icon),u_gamma_scale:new Xe.aI(u,Wt.u_gamma_scale),u_device_pixel_ratio:new Xe.aI(u,Wt.u_device_pixel_ratio),u_is_halo:new Xe.aH(u,Wt.u_is_halo),u_translation:new Xe.aO(u,Wt.u_translation),u_pitched_scale:new Xe.aI(u,Wt.u_pitched_scale)}),background:(u,Wt)=>({u_matrix:new Xe.aJ(u,Wt.u_matrix),u_opacity:new Xe.aI(u,Wt.u_opacity),u_color:new Xe.aL(u,Wt.u_color)}),backgroundPattern:(u,Wt)=>({u_matrix:new Xe.aJ(u,Wt.u_matrix),u_opacity:new Xe.aI(u,Wt.u_opacity),u_image:new Xe.aH(u,Wt.u_image),u_pattern_tl_a:new Xe.aO(u,Wt.u_pattern_tl_a),u_pattern_br_a:new Xe.aO(u,Wt.u_pattern_br_a),u_pattern_tl_b:new Xe.aO(u,Wt.u_pattern_tl_b),u_pattern_br_b:new Xe.aO(u,Wt.u_pattern_br_b),u_texsize:new Xe.aO(u,Wt.u_texsize),u_mix:new Xe.aI(u,Wt.u_mix),u_pattern_size_a:new Xe.aO(u,Wt.u_pattern_size_a),u_pattern_size_b:new Xe.aO(u,Wt.u_pattern_size_b),u_scale_a:new Xe.aI(u,Wt.u_scale_a),u_scale_b:new Xe.aI(u,Wt.u_scale_b),u_pixel_coord_upper:new Xe.aO(u,Wt.u_pixel_coord_upper),u_pixel_coord_lower:new Xe.aO(u,Wt.u_pixel_coord_lower),u_tile_units_to_pixels:new Xe.aI(u,Wt.u_tile_units_to_pixels)}),terrain:(u,Wt)=>({u_matrix:new Xe.aJ(u,Wt.u_matrix),u_texture:new Xe.aH(u,Wt.u_texture),u_ele_delta:new Xe.aI(u,Wt.u_ele_delta),u_fog_matrix:new Xe.aJ(u,Wt.u_fog_matrix),u_fog_color:new Xe.aL(u,Wt.u_fog_color),u_fog_ground_blend:new Xe.aI(u,Wt.u_fog_ground_blend),u_fog_ground_blend_opacity:new Xe.aI(u,Wt.u_fog_ground_blend_opacity),u_horizon_color:new Xe.aL(u,Wt.u_horizon_color),u_horizon_fog_blend:new Xe.aI(u,Wt.u_horizon_fog_blend)}),terrainDepth:(u,Wt)=>({u_matrix:new Xe.aJ(u,Wt.u_matrix),u_ele_delta:new Xe.aI(u,Wt.u_ele_delta)}),terrainCoords:(u,Wt)=>({u_matrix:new Xe.aJ(u,Wt.u_matrix),u_texture:new Xe.aH(u,Wt.u_texture),u_terrain_coords_id:new Xe.aI(u,Wt.u_terrain_coords_id),u_ele_delta:new Xe.aI(u,Wt.u_ele_delta)}),sky:(u,Wt)=>({u_sky_color:new Xe.aL(u,Wt.u_sky_color),u_horizon_color:new Xe.aL(u,Wt.u_horizon_color),u_horizon:new Xe.aI(u,Wt.u_horizon),u_sky_horizon_blend:new Xe.aI(u,Wt.u_sky_horizon_blend)})};class $e{constructor(u,Xe,Wt){this.context=u;const fr=u.gl;this.buffer=fr.createBuffer(),this.dynamicDraw=Boolean(Wt),this.context.unbindVAO(),u.bindElementBuffer.set(this.buffer),fr.bufferData(fr.ELEMENT_ARRAY_BUFFER,Xe.arrayBuffer,this.dynamicDraw?fr.DYNAMIC_DRAW:fr.STATIC_DRAW),this.dynamicDraw||delete Xe.arrayBuffer}bind(){this.context.bindElementBuffer.set(this.buffer)}updateData(u){const Xe=this.context.gl;if(!this.dynamicDraw)throw new Error("Attempted to update data while not in dynamic mode.");this.context.unbindVAO(),this.bind(),Xe.bufferSubData(Xe.ELEMENT_ARRAY_BUFFER,0,u.arrayBuffer)}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}const Ul={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"};class Ke{constructor(u,Xe,Wt,fr){this.length=Xe.length,this.attributes=Wt,this.itemSize=Xe.bytesPerElement,this.dynamicDraw=fr,this.context=u;const _r=u.gl;this.buffer=_r.createBuffer(),u.bindVertexBuffer.set(this.buffer),_r.bufferData(_r.ARRAY_BUFFER,Xe.arrayBuffer,this.dynamicDraw?_r.DYNAMIC_DRAW:_r.STATIC_DRAW),this.dynamicDraw||delete Xe.arrayBuffer}bind(){this.context.bindVertexBuffer.set(this.buffer)}updateData(u){if(u.length!==this.length)throw new Error(`Length of new data is ${u.length}, which doesn't match current length of ${this.length}`);const Xe=this.context.gl;this.bind(),Xe.bufferSubData(Xe.ARRAY_BUFFER,0,u.arrayBuffer)}enableAttributes(u,Xe){for(let Wt=0;Wt<this.attributes.length;Wt++){const fr=Xe.attributes[this.attributes[Wt].name];void 0!==fr&&u.enableVertexAttribArray(fr)}}setVertexAttribPointers(u,Xe,Wt){for(let fr=0;fr<this.attributes.length;fr++){const _r=this.attributes[fr],wr=Xe.attributes[_r.name];void 0!==wr&&u.vertexAttribPointer(wr,_r.components,u[Ul[_r.type]],!1,this.itemSize,_r.offset+this.itemSize*(Wt||0))}}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}const $l=new WeakMap;function Ye(u){var Xe;if($l.has(u))return $l.get(u);{const Wt=null===(Xe=u.getParameter(u.VERSION))||void 0===Xe?void 0:Xe.startsWith("WebGL 2.0");return $l.set(u,Wt),Wt}}class Qe{constructor(u){this.gl=u.gl,this.default=this.getDefault(),this.current=this.default,this.dirty=!1}get(){return this.current}set(u){}getDefault(){return this.default}setDefault(){this.set(this.default)}}class ti extends Qe{getDefault(){return Xe.aM.transparent}set(u){const Xe=this.current;(u.r!==Xe.r||u.g!==Xe.g||u.b!==Xe.b||u.a!==Xe.a||this.dirty)&&(this.gl.clearColor(u.r,u.g,u.b,u.a),this.current=u,this.dirty=!1)}}class ei extends Qe{getDefault(){return 1}set(u){(u!==this.current||this.dirty)&&(this.gl.clearDepth(u),this.current=u,this.dirty=!1)}}class ii extends Qe{getDefault(){return 0}set(u){(u!==this.current||this.dirty)&&(this.gl.clearStencil(u),this.current=u,this.dirty=!1)}}class ai extends Qe{getDefault(){return[!0,!0,!0,!0]}set(u){const Xe=this.current;(u[0]!==Xe[0]||u[1]!==Xe[1]||u[2]!==Xe[2]||u[3]!==Xe[3]||this.dirty)&&(this.gl.colorMask(u[0],u[1],u[2],u[3]),this.current=u,this.dirty=!1)}}class si extends Qe{getDefault(){return!0}set(u){(u!==this.current||this.dirty)&&(this.gl.depthMask(u),this.current=u,this.dirty=!1)}}class oi extends Qe{getDefault(){return 255}set(u){(u!==this.current||this.dirty)&&(this.gl.stencilMask(u),this.current=u,this.dirty=!1)}}class ri extends Qe{getDefault(){return{func:this.gl.ALWAYS,ref:0,mask:255}}set(u){const Xe=this.current;(u.func!==Xe.func||u.ref!==Xe.ref||u.mask!==Xe.mask||this.dirty)&&(this.gl.stencilFunc(u.func,u.ref,u.mask),this.current=u,this.dirty=!1)}}class ni extends Qe{getDefault(){const u=this.gl;return[u.KEEP,u.KEEP,u.KEEP]}set(u){const Xe=this.current;(u[0]!==Xe[0]||u[1]!==Xe[1]||u[2]!==Xe[2]||this.dirty)&&(this.gl.stencilOp(u[0],u[1],u[2]),this.current=u,this.dirty=!1)}}class li extends Qe{getDefault(){return!1}set(u){if(u===this.current&&!this.dirty)return;const Xe=this.gl;u?Xe.enable(Xe.STENCIL_TEST):Xe.disable(Xe.STENCIL_TEST),this.current=u,this.dirty=!1}}class hi extends Qe{getDefault(){return[0,1]}set(u){const Xe=this.current;(u[0]!==Xe[0]||u[1]!==Xe[1]||this.dirty)&&(this.gl.depthRange(u[0],u[1]),this.current=u,this.dirty=!1)}}class ci extends Qe{getDefault(){return!1}set(u){if(u===this.current&&!this.dirty)return;const Xe=this.gl;u?Xe.enable(Xe.DEPTH_TEST):Xe.disable(Xe.DEPTH_TEST),this.current=u,this.dirty=!1}}class ui extends Qe{getDefault(){return this.gl.LESS}set(u){(u!==this.current||this.dirty)&&(this.gl.depthFunc(u),this.current=u,this.dirty=!1)}}class di extends Qe{getDefault(){return!1}set(u){if(u===this.current&&!this.dirty)return;const Xe=this.gl;u?Xe.enable(Xe.BLEND):Xe.disable(Xe.BLEND),this.current=u,this.dirty=!1}}class _i extends Qe{getDefault(){const u=this.gl;return[u.ONE,u.ZERO]}set(u){const Xe=this.current;(u[0]!==Xe[0]||u[1]!==Xe[1]||this.dirty)&&(this.gl.blendFunc(u[0],u[1]),this.current=u,this.dirty=!1)}}class pi extends Qe{getDefault(){return Xe.aM.transparent}set(u){const Xe=this.current;(u.r!==Xe.r||u.g!==Xe.g||u.b!==Xe.b||u.a!==Xe.a||this.dirty)&&(this.gl.blendColor(u.r,u.g,u.b,u.a),this.current=u,this.dirty=!1)}}class mi extends Qe{getDefault(){return this.gl.FUNC_ADD}set(u){(u!==this.current||this.dirty)&&(this.gl.blendEquation(u),this.current=u,this.dirty=!1)}}class fi extends Qe{getDefault(){return!1}set(u){if(u===this.current&&!this.dirty)return;const Xe=this.gl;u?Xe.enable(Xe.CULL_FACE):Xe.disable(Xe.CULL_FACE),this.current=u,this.dirty=!1}}class gi extends Qe{getDefault(){return this.gl.BACK}set(u){(u!==this.current||this.dirty)&&(this.gl.cullFace(u),this.current=u,this.dirty=!1)}}class vi extends Qe{getDefault(){return this.gl.CCW}set(u){(u!==this.current||this.dirty)&&(this.gl.frontFace(u),this.current=u,this.dirty=!1)}}class xi extends Qe{getDefault(){return null}set(u){(u!==this.current||this.dirty)&&(this.gl.useProgram(u),this.current=u,this.dirty=!1)}}class yi extends Qe{getDefault(){return this.gl.TEXTURE0}set(u){(u!==this.current||this.dirty)&&(this.gl.activeTexture(u),this.current=u,this.dirty=!1)}}class bi extends Qe{getDefault(){const u=this.gl;return[0,0,u.drawingBufferWidth,u.drawingBufferHeight]}set(u){const Xe=this.current;(u[0]!==Xe[0]||u[1]!==Xe[1]||u[2]!==Xe[2]||u[3]!==Xe[3]||this.dirty)&&(this.gl.viewport(u[0],u[1],u[2],u[3]),this.current=u,this.dirty=!1)}}class wi extends Qe{getDefault(){return null}set(u){if(u===this.current&&!this.dirty)return;const Xe=this.gl;Xe.bindFramebuffer(Xe.FRAMEBUFFER,u),this.current=u,this.dirty=!1}}class Ti extends Qe{getDefault(){return null}set(u){if(u===this.current&&!this.dirty)return;const Xe=this.gl;Xe.bindRenderbuffer(Xe.RENDERBUFFER,u),this.current=u,this.dirty=!1}}class Ii extends Qe{getDefault(){return null}set(u){if(u===this.current&&!this.dirty)return;const Xe=this.gl;Xe.bindTexture(Xe.TEXTURE_2D,u),this.current=u,this.dirty=!1}}class Ei extends Qe{getDefault(){return null}set(u){if(u===this.current&&!this.dirty)return;const Xe=this.gl;Xe.bindBuffer(Xe.ARRAY_BUFFER,u),this.current=u,this.dirty=!1}}class Pi extends Qe{getDefault(){return null}set(u){const Xe=this.gl;Xe.bindBuffer(Xe.ELEMENT_ARRAY_BUFFER,u),this.current=u,this.dirty=!1}}class Ci extends Qe{getDefault(){return null}set(u){var Xe;if(u===this.current&&!this.dirty)return;const Wt=this.gl;Ye(Wt)?Wt.bindVertexArray(u):null===(Xe=Wt.getExtension("OES_vertex_array_object"))||void 0===Xe||Xe.bindVertexArrayOES(u),this.current=u,this.dirty=!1}}class Si extends Qe{getDefault(){return 4}set(u){if(u===this.current&&!this.dirty)return;const Xe=this.gl;Xe.pixelStorei(Xe.UNPACK_ALIGNMENT,u),this.current=u,this.dirty=!1}}class zi extends Qe{getDefault(){return!1}set(u){if(u===this.current&&!this.dirty)return;const Xe=this.gl;Xe.pixelStorei(Xe.UNPACK_PREMULTIPLY_ALPHA_WEBGL,u),this.current=u,this.dirty=!1}}class Di extends Qe{getDefault(){return!1}set(u){if(u===this.current&&!this.dirty)return;const Xe=this.gl;Xe.pixelStorei(Xe.UNPACK_FLIP_Y_WEBGL,u),this.current=u,this.dirty=!1}}class Mi extends Qe{constructor(u,Xe){super(u),this.context=u,this.parent=Xe}getDefault(){return null}}class Ai extends Mi{setDirty(){this.dirty=!0}set(u){if(u===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);const Xe=this.gl;Xe.framebufferTexture2D(Xe.FRAMEBUFFER,Xe.COLOR_ATTACHMENT0,Xe.TEXTURE_2D,u,0),this.current=u,this.dirty=!1}}class Ri extends Mi{set(u){if(u===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);const Xe=this.gl;Xe.framebufferRenderbuffer(Xe.FRAMEBUFFER,Xe.DEPTH_ATTACHMENT,Xe.RENDERBUFFER,u),this.current=u,this.dirty=!1}}class ki extends Mi{set(u){if(u===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);const Xe=this.gl;Xe.framebufferRenderbuffer(Xe.FRAMEBUFFER,Xe.DEPTH_STENCIL_ATTACHMENT,Xe.RENDERBUFFER,u),this.current=u,this.dirty=!1}}class Li{constructor(u,Xe,Wt,fr,_r){this.context=u,this.width=Xe,this.height=Wt;const wr=u.gl,Ar=this.framebuffer=wr.createFramebuffer();if(this.colorAttachment=new Ai(u,Ar),fr)this.depthAttachment=_r?new ki(u,Ar):new Ri(u,Ar);else if(_r)throw new Error("Stencil cannot be set without depth");if(wr.checkFramebufferStatus(wr.FRAMEBUFFER)!==wr.FRAMEBUFFER_COMPLETE)throw new Error("Framebuffer is not complete")}destroy(){const u=this.context.gl,Xe=this.colorAttachment.get();if(Xe&&u.deleteTexture(Xe),this.depthAttachment){const Xe=this.depthAttachment.get();Xe&&u.deleteRenderbuffer(Xe)}u.deleteFramebuffer(this.framebuffer)}}class Fi{constructor(u,Xe,Wt){this.blendFunction=u,this.blendColor=Xe,this.mask=Wt}}Fi.Replace=[1,0],Fi.disabled=new Fi(Fi.Replace,Xe.aM.transparent,[!1,!1,!1,!1]),Fi.unblended=new Fi(Fi.Replace,Xe.aM.transparent,[!0,!0,!0,!0]),Fi.alphaBlended=new Fi([1,771],Xe.aM.transparent,[!0,!0,!0,!0]);class Bi{constructor(u){var Xe,Wt;if(this.gl=u,this.clearColor=new ti(this),this.clearDepth=new ei(this),this.clearStencil=new ii(this),this.colorMask=new ai(this),this.depthMask=new si(this),this.stencilMask=new oi(this),this.stencilFunc=new ri(this),this.stencilOp=new ni(this),this.stencilTest=new li(this),this.depthRange=new hi(this),this.depthTest=new ci(this),this.depthFunc=new ui(this),this.blend=new di(this),this.blendFunc=new _i(this),this.blendColor=new pi(this),this.blendEquation=new mi(this),this.cullFace=new fi(this),this.cullFaceSide=new gi(this),this.frontFace=new vi(this),this.program=new xi(this),this.activeTexture=new yi(this),this.viewport=new bi(this),this.bindFramebuffer=new wi(this),this.bindRenderbuffer=new Ti(this),this.bindTexture=new Ii(this),this.bindVertexBuffer=new Ei(this),this.bindElementBuffer=new Pi(this),this.bindVertexArray=new Ci(this),this.pixelStoreUnpack=new Si(this),this.pixelStoreUnpackPremultiplyAlpha=new zi(this),this.pixelStoreUnpackFlipY=new Di(this),this.extTextureFilterAnisotropic=u.getExtension("EXT_texture_filter_anisotropic")||u.getExtension("MOZ_EXT_texture_filter_anisotropic")||u.getExtension("WEBKIT_EXT_texture_filter_anisotropic"),this.extTextureFilterAnisotropic&&(this.extTextureFilterAnisotropicMax=u.getParameter(this.extTextureFilterAnisotropic.MAX_TEXTURE_MAX_ANISOTROPY_EXT)),this.maxTextureSize=u.getParameter(u.MAX_TEXTURE_SIZE),Ye(u)){this.HALF_FLOAT=u.HALF_FLOAT;const fr=u.getExtension("EXT_color_buffer_half_float");this.RGBA16F=null!==(Xe=u.RGBA16F)&&void 0!==Xe?Xe:null==fr?void 0:fr.RGBA16F_EXT,this.RGB16F=null!==(Wt=u.RGB16F)&&void 0!==Wt?Wt:null==fr?void 0:fr.RGB16F_EXT,u.getExtension("EXT_color_buffer_float")}else{u.getExtension("EXT_color_buffer_half_float"),u.getExtension("OES_texture_half_float_linear");const Xe=u.getExtension("OES_texture_half_float");this.HALF_FLOAT=null==Xe?void 0:Xe.HALF_FLOAT_OES}}setDefault(){this.unbindVAO(),this.clearColor.setDefault(),this.clearDepth.setDefault(),this.clearStencil.setDefault(),this.colorMask.setDefault(),this.depthMask.setDefault(),this.stencilMask.setDefault(),this.stencilFunc.setDefault(),this.stencilOp.setDefault(),this.stencilTest.setDefault(),this.depthRange.setDefault(),this.depthTest.setDefault(),this.depthFunc.setDefault(),this.blend.setDefault(),this.blendFunc.setDefault(),this.blendColor.setDefault(),this.blendEquation.setDefault(),this.cullFace.setDefault(),this.cullFaceSide.setDefault(),this.frontFace.setDefault(),this.program.setDefault(),this.activeTexture.setDefault(),this.bindFramebuffer.setDefault(),this.pixelStoreUnpack.setDefault(),this.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.pixelStoreUnpackFlipY.setDefault()}setDirty(){this.clearColor.dirty=!0,this.clearDepth.dirty=!0,this.clearStencil.dirty=!0,this.colorMask.dirty=!0,this.depthMask.dirty=!0,this.stencilMask.dirty=!0,this.stencilFunc.dirty=!0,this.stencilOp.dirty=!0,this.stencilTest.dirty=!0,this.depthRange.dirty=!0,this.depthTest.dirty=!0,this.depthFunc.dirty=!0,this.blend.dirty=!0,this.blendFunc.dirty=!0,this.blendColor.dirty=!0,this.blendEquation.dirty=!0,this.cullFace.dirty=!0,this.cullFaceSide.dirty=!0,this.frontFace.dirty=!0,this.program.dirty=!0,this.activeTexture.dirty=!0,this.viewport.dirty=!0,this.bindFramebuffer.dirty=!0,this.bindRenderbuffer.dirty=!0,this.bindTexture.dirty=!0,this.bindVertexBuffer.dirty=!0,this.bindElementBuffer.dirty=!0,this.bindVertexArray.dirty=!0,this.pixelStoreUnpack.dirty=!0,this.pixelStoreUnpackPremultiplyAlpha.dirty=!0,this.pixelStoreUnpackFlipY.dirty=!0}createIndexBuffer(u,Xe){return new $e(this,u,Xe)}createVertexBuffer(u,Xe,Wt){return new Ke(this,u,Xe,Wt)}createRenderbuffer(u,Xe,Wt){const fr=this.gl,_r=fr.createRenderbuffer();return this.bindRenderbuffer.set(_r),fr.renderbufferStorage(fr.RENDERBUFFER,u,Xe,Wt),this.bindRenderbuffer.set(null),_r}createFramebuffer(u,Xe,Wt,fr){return new Li(this,u,Xe,Wt,fr)}clear({color:u,depth:Xe,stencil:Wt}){const fr=this.gl;let _r=0;u&&(_r|=fr.COLOR_BUFFER_BIT,this.clearColor.set(u),this.colorMask.set([!0,!0,!0,!0])),void 0!==Xe&&(_r|=fr.DEPTH_BUFFER_BIT,this.depthRange.set([0,1]),this.clearDepth.set(Xe),this.depthMask.set(!0)),void 0!==Wt&&(_r|=fr.STENCIL_BUFFER_BIT,this.clearStencil.set(Wt),this.stencilMask.set(255)),fr.clear(_r)}setCullFace(u){!1===u.enable?this.cullFace.set(!1):(this.cullFace.set(!0),this.cullFaceSide.set(u.mode),this.frontFace.set(u.frontFace))}setDepthMode(u){u.func!==this.gl.ALWAYS||u.mask?(this.depthTest.set(!0),this.depthFunc.set(u.func),this.depthMask.set(u.mask),this.depthRange.set(u.range)):this.depthTest.set(!1)}setStencilMode(u){u.test.func!==this.gl.ALWAYS||u.mask?(this.stencilTest.set(!0),this.stencilMask.set(u.mask),this.stencilOp.set([u.fail,u.depthFail,u.pass]),this.stencilFunc.set({func:u.test.func,ref:u.ref,mask:u.test.mask})):this.stencilTest.set(!1)}setColorMode(u){Xe.aE(u.blendFunction,Fi.Replace)?this.blend.set(!1):(this.blend.set(!0),this.blendFunc.set(u.blendFunction),this.blendColor.set(u.blendColor)),this.colorMask.set(u.mask)}createVertexArray(){var u;return Ye(this.gl)?this.gl.createVertexArray():null===(u=this.gl.getExtension("OES_vertex_array_object"))||void 0===u?void 0:u.createVertexArrayOES()}deleteVertexArray(u){var Xe;return Ye(this.gl)?this.gl.deleteVertexArray(u):null===(Xe=this.gl.getExtension("OES_vertex_array_object"))||void 0===Xe?void 0:Xe.deleteVertexArrayOES(u)}unbindVAO(){this.bindVertexArray.set(null)}}class Oi{constructor(u,Xe,Wt){this.func=u,this.mask=Xe,this.range=Wt}}Oi.ReadOnly=!1,Oi.ReadWrite=!0,Oi.disabled=new Oi(519,Oi.ReadOnly,[0,1]);const Wl=7680;class Ui{constructor(u,Xe,Wt,fr,_r,wr){this.test=u,this.ref=Xe,this.mask=Wt,this.fail=fr,this.depthFail=_r,this.pass=wr}}Ui.disabled=new Ui({func:519,mask:0},0,0,Wl,Wl,Wl);class ji{constructor(u,Xe,Wt){this.enable=u,this.mode=Xe,this.frontFace=Wt}}let Zl;function qi(u,Wt,fr,_r,wr){const Ar=u.context,Kr=Ar.gl,In=u.useProgram("collisionBox"),no=[];let io=0,oo=0;for(let so=0;so<_r.length;so++){const co=_r[so],ho=Wt.getTile(co).getBucket(fr);if(!ho)continue;const go=wr?ho.textCollisionBox:ho.iconCollisionBox,xo=ho.collisionCircleArray;if(xo.length>0){const Wt=Xe.H();Xe.aQ(Wt,ho.placementInvProjMatrix,u.transform.glCoordMatrix),Xe.aQ(Wt,Wt,ho.placementViewportMatrix),no.push({circleArray:xo,circleOffset:oo,transform:co.posMatrix,invTransform:Wt,coord:co}),io+=xo.length/4,oo=io}go&&In.draw(Ar,Kr.LINES,Oi.disabled,Ui.disabled,u.colorModeForRenderPass(),ji.disabled,{u_matrix:co.posMatrix,u_pixel_extrude_scale:[1/(ao=u.transform).width,1/ao.height]},u.style.map.terrain&&u.style.map.terrain.getTerrainData(co),fr.id,go.layoutVertexBuffer,go.indexBuffer,go.segments,null,u.transform.zoom,null,null,go.collisionVertexBuffer)}var ao;if(!wr||!no.length)return;const so=u.useProgram("collisionCircle"),co=new Xe.aR;co.resize(4*io),co._trim();let ho=0;for(const u of no)for(let Xe=0;Xe<u.circleArray.length/4;Xe++){const Wt=4*Xe,fr=u.circleArray[Wt+0],_r=u.circleArray[Wt+1],wr=u.circleArray[Wt+2],Ar=u.circleArray[Wt+3];co.emplace(ho++,fr,_r,wr,Ar,0),co.emplace(ho++,fr,_r,wr,Ar,1),co.emplace(ho++,fr,_r,wr,Ar,2),co.emplace(ho++,fr,_r,wr,Ar,3)}(!Zl||Zl.length<2*io)&&(Zl=function(u){const Wt=2*u,fr=new Xe.aT;fr.resize(Wt),fr._trim();for(let u=0;u<Wt;u++){const Xe=6*u;fr.uint16[Xe+0]=4*u+0,fr.uint16[Xe+1]=4*u+1,fr.uint16[Xe+2]=4*u+2,fr.uint16[Xe+3]=4*u+2,fr.uint16[Xe+4]=4*u+3,fr.uint16[Xe+5]=4*u+0}return fr}(io));const go=Ar.createIndexBuffer(Zl,!0),xo=Ar.createVertexBuffer(co,Xe.aS.members,!0);for(const Wt of no){const _r=Se(Wt.transform,Wt.invTransform,u.transform);so.draw(Ar,Kr.TRIANGLES,Oi.disabled,Ui.disabled,u.colorModeForRenderPass(),ji.disabled,_r,u.style.map.terrain&&u.style.map.terrain.getTerrainData(Wt.coord),fr.id,xo,go,Xe.a0.simpleSegment(0,2*Wt.circleOffset,Wt.circleArray.length,Wt.circleArray.length/2),null,u.transform.zoom,null,null,null)}xo.destroy(),go.destroy()}ji.disabled=new ji(!1,1029,2305),ji.backCCW=new ji(!0,1029,2305);const Gl=Xe.an(new Float32Array(16));function Gi(u,Wt,fr,_r,wr,Ar){const{horizontalAlign:Kr,verticalAlign:In}=Xe.au(u);return new Xe.P((-(Kr-.5)*Wt/wr+_r[0])*Ar,(-(In-.5)*fr/wr+_r[1])*Ar)}function Hi(u,Wt,fr,_r,wr,Ar){const Kr=Wt.tileAnchorPoint.add(new Xe.P(Wt.translation[0],Wt.translation[1]));if(Wt.pitchWithMap){let u=_r.mult(Ar);fr||(u=u.rotate(-wr));const Xe=Kr.add(u);return xt(Xe.x,Xe.y,Wt.labelPlaneMatrix,Wt.getElevation).point}if(fr){const Xe=St(Wt.tileAnchorPoint.x+1,Wt.tileAnchorPoint.y,Wt).point.sub(u),fr=Math.atan(Xe.y/Xe.x)+(Xe.x<0?Math.PI:0);return u.add(_r.rotate(fr))}return u.add(_r)}function Wi(u,Wt,fr,_r,wr,Ar,Kr,In,no,io,oo,ao,so,co){const ho=u.text.placedSymbolArray,go=u.text.dynamicLayoutVertexArray,xo=u.icon.dynamicLayoutVertexArray,ko={};go.clear();for(let xo=0;xo<ho.length;xo++){const Co=ho.get(xo),Io=Co.hidden||!Co.crossTileID||u.allowVerticalPlacement&&!Co.placedOrientation?null:_r[Co.crossTileID];if(Io){const _r=new Xe.P(Co.anchorX,Co.anchorY),ho={getElevation:co,width:wr.width,height:wr.height,labelPlaneMatrix:Ar,lineVertexArray:null,pitchWithMap:fr,projection:oo,projectionCache:null,tileAnchorPoint:_r,translation:ao,unwrappedTileID:so},xo=fr?xt(_r.x,_r.y,Kr,co):St(_r.x,_r.y,ho),zo=yt(wr.cameraToCenterDistance,xo.signedDistanceFromCamera);let Bo=Xe.ai(u.textSizeData,no,Co)*zo/Xe.ap;fr&&(Bo*=u.tilePixelRatio/In);const{width:ca,height:ua,anchor:Da,textOffset:ns,textBoxScale:yl}=Io,vl=Gi(Da,ca,ua,ns,yl,Bo),kl=oo.getPitchedTextCorrection(wr,_r.add(new Xe.P(ao[0],ao[1])),so),Al=Hi(xo.point,ho,Wt,vl,wr.angle,kl),Ml=u.allowVerticalPlacement&&Co.placedOrientation===Xe.ah.vertical?Math.PI/2:0;for(let u=0;u<Co.numGlyphs;u++)Xe.aj(go,Al,Ml);io&&Co.associatedIconIndex>=0&&(ko[Co.associatedIconIndex]={shiftedAnchor:Al,angle:Ml})}else Rt(Co.numGlyphs,go)}if(io){xo.clear();const Wt=u.icon.placedSymbolArray;for(let u=0;u<Wt.length;u++){const fr=Wt.get(u);if(fr.hidden)Rt(fr.numGlyphs,xo);else{const Wt=ko[u];if(Wt)for(let u=0;u<fr.numGlyphs;u++)Xe.aj(xo,Wt.shiftedAnchor,Wt.angle);else Rt(fr.numGlyphs,xo)}}u.icon.dynamicLayoutVertexBuffer.updateData(xo)}u.text.dynamicLayoutVertexBuffer.updateData(go)}function $i(u,Xe,Wt){return Wt.iconsInText&&Xe?"symbolTextAndIcon":u?"symbolSDF":"symbolIcon"}function Xi(u,Wt,fr,_r,wr,Ar,Kr,In,no,io,oo,ao){const so=u.context,co=so.gl,ho=u.transform,go=ie(),xo="map"===In,ko="map"===no,Co="viewport"!==In&&"point"!==fr.layout.get("symbol-placement"),Io=xo&&!ko&&!Co,zo=!ko&&Co,Bo=!fr.layout.get("symbol-sort-key").isConstant();let ca=!1;const ua=u.depthModeForSublayer(0,Oi.ReadOnly),Da=fr._unevaluatedLayout.hasValue("text-variable-anchor")||fr._unevaluatedLayout.hasValue("text-variable-anchor-offset"),ns=[],yl=go.getCircleRadiusCorrection(ho);for(const In of _r){const _r=Wt.getTile(In),no=_r.getBucket(fr);if(!no)continue;const oo=wr?no.text:no.icon;if(!oo||!oo.segments.get().length||!oo.hasVisibleVertices)continue;const ao=oo.programConfigurations.get(fr.id),so=wr||no.sdfIcons,ua=wr?no.textSizeData:no.iconSizeData,vl=ko||0!==ho.pitch,kl=u.useProgram($i(so,wr,no),ao),Al=Xe.ag(ua,ho.zoom),Ml=u.style.map.terrain&&u.style.map.terrain.getTerrainData(In);let Rl,Ol,Ll,Dl,Bl=[0,0],Nl=null;if(wr)Ol=_r.glyphAtlasTexture,Ll=co.LINEAR,Rl=_r.glyphAtlasTexture.size,no.iconsInText&&(Bl=_r.imageAtlasTexture.size,Nl=_r.imageAtlasTexture,Dl=vl||u.options.rotating||u.options.zooming||"composite"===ua.kind||"camera"===ua.kind?co.LINEAR:co.NEAREST);else{const Xe=1!==fr.layout.get("icon-size").constantOr(0)||no.iconsNeedLinear;Ol=_r.imageAtlasTexture,Ll=so||u.options.rotating||u.options.zooming||Xe||vl?co.LINEAR:co.NEAREST,Rl=_r.imageAtlasTexture.size}const Vl=Bt(_r,1,u.transform.zoom),Ul=zo?In.posMatrix:Gl,$l=gt(Ul,ko,xo,u.transform,Vl),Wl=vt(Ul,ko,xo,u.transform,Vl),Zl=vt(In.posMatrix,ko,xo,u.transform,Vl),Xl=go.translatePosition(u.transform,_r,Ar,Kr),Jl=Da&&no.hasTextData(),Ql="none"!==fr.layout.get("icon-text-fit")&&Jl&&no.hasIconData();if(Co){const Xe=u.style.map.terrain?(Xe,Wt)=>u.style.map.terrain.getElevation(In,Xe,Wt):null,Wt="map"===fr.layout.get("text-rotation-alignment");wt(no,In.posMatrix,u,wr,$l,Zl,ko,io,Wt,go,In.toUnwrapped(),ho.width,ho.height,Xl,Xe)}const rc=In.posMatrix,ic=wr&&Da||Ql,oc=Co||ic?Gl:$l,lc=Wl,gc=so&&0!==fr.paint.get(wr?"text-halo-width":"icon-halo-width").constantOr(1);let bc;bc=so?no.iconsInText?Ve(ua.kind,Al,Io,ko,Co,ic,u,rc,oc,lc,Xl,Rl,Bl,yl):qe(ua.kind,Al,Io,ko,Co,ic,u,rc,oc,lc,Xl,wr,Rl,!0,yl):Ze(ua.kind,Al,Io,ko,Co,ic,u,rc,oc,lc,Xl,wr,Rl,yl);const eu={program:kl,buffers:oo,uniformValues:bc,atlasTexture:Ol,atlasTextureIcon:Nl,atlasInterpolation:Ll,atlasInterpolationIcon:Dl,isSDF:so,hasHalo:gc};if(Bo&&no.canOverlap){ca=!0;const u=oo.segments.get();for(const Wt of u)ns.push({segments:new Xe.a0([Wt]),sortKey:Wt.sortKey,state:eu,terrainData:Ml})}else ns.push({segments:oo.segments,sortKey:0,state:eu,terrainData:Ml})}ca&&ns.sort(((u,Xe)=>u.sortKey-Xe.sortKey));for(const Xe of ns){const Wt=Xe.state;if(so.activeTexture.set(co.TEXTURE0),Wt.atlasTexture.bind(Wt.atlasInterpolation,co.CLAMP_TO_EDGE),Wt.atlasTextureIcon&&(so.activeTexture.set(co.TEXTURE1),Wt.atlasTextureIcon&&Wt.atlasTextureIcon.bind(Wt.atlasInterpolationIcon,co.CLAMP_TO_EDGE)),Wt.isSDF){const _r=Wt.uniformValues;Wt.hasHalo&&(_r.u_is_halo=1,Ki(Wt.buffers,Xe.segments,fr,u,Wt.program,ua,oo,ao,_r,Xe.terrainData)),_r.u_is_halo=0}Ki(Wt.buffers,Xe.segments,fr,u,Wt.program,ua,oo,ao,Wt.uniformValues,Xe.terrainData)}}function Ki(u,Xe,Wt,fr,_r,wr,Ar,Kr,In,no){const io=fr.context;_r.draw(io,io.gl.TRIANGLES,wr,Ar,Kr,ji.disabled,In,no,Wt.id,u.layoutVertexBuffer,u.indexBuffer,Xe,Wt.paint,fr.transform.zoom,u.programConfigurations.get(Wt.id),u.dynamicLayoutVertexBuffer,u.opacityVertexBuffer)}function Ji(u,Wt,fr,_r){const wr=u.context,Ar=wr.gl,Kr=Ui.disabled,In=new Fi([Ar.ONE,Ar.ONE],Xe.aM.transparent,[!0,!0,!0,!0]),no=Wt.getBucket(fr);if(!no)return;const io=_r.key;let oo=fr.heatmapFbos.get(io);oo||(oo=Qi(wr,Wt.tileSize,Wt.tileSize),fr.heatmapFbos.set(io,oo)),wr.bindFramebuffer.set(oo.framebuffer),wr.viewport.set([0,0,Wt.tileSize,Wt.tileSize]),wr.clear({color:Xe.aM.transparent});const ao=no.programConfigurations.get(fr.id),so=u.useProgram("heatmap",ao),co=u.style.map.terrain.getTerrainData(_r);so.draw(wr,Ar.TRIANGLES,Oi.disabled,Kr,In,ji.disabled,Me(_r.posMatrix,Wt,u.transform.zoom,fr.paint.get("heatmap-intensity")),co,fr.id,no.layoutVertexBuffer,no.indexBuffer,no.segments,fr.paint,u.transform.zoom,ao)}function Yi(u,Xe,Wt){const fr=u.context,_r=fr.gl;fr.setColorMode(u.colorModeForRenderPass());const wr=ta(fr,Xe),Ar=Wt.key,Kr=Xe.heatmapFbos.get(Ar);Kr&&(fr.activeTexture.set(_r.TEXTURE0),_r.bindTexture(_r.TEXTURE_2D,Kr.colorAttachment.get()),fr.activeTexture.set(_r.TEXTURE1),wr.bind(_r.LINEAR,_r.CLAMP_TO_EDGE),u.useProgram("heatmapTexture").draw(fr,_r.TRIANGLES,Oi.disabled,Ui.disabled,u.colorModeForRenderPass(),ji.disabled,Ae(u,Xe,0,1),null,Xe.id,u.rasterBoundsBuffer,u.quadTriangleIndexBuffer,u.rasterBoundsSegments,Xe.paint,u.transform.zoom),Kr.destroy(),Xe.heatmapFbos.delete(Ar))}function Qi(u,Xe,Wt){var fr,_r;const wr=u.gl,Ar=wr.createTexture();wr.bindTexture(wr.TEXTURE_2D,Ar),wr.texParameteri(wr.TEXTURE_2D,wr.TEXTURE_WRAP_S,wr.CLAMP_TO_EDGE),wr.texParameteri(wr.TEXTURE_2D,wr.TEXTURE_WRAP_T,wr.CLAMP_TO_EDGE),wr.texParameteri(wr.TEXTURE_2D,wr.TEXTURE_MIN_FILTER,wr.LINEAR),wr.texParameteri(wr.TEXTURE_2D,wr.TEXTURE_MAG_FILTER,wr.LINEAR);const Kr=null!==(fr=u.HALF_FLOAT)&&void 0!==fr?fr:wr.UNSIGNED_BYTE,In=null!==(_r=u.RGBA16F)&&void 0!==_r?_r:wr.RGBA;wr.texImage2D(wr.TEXTURE_2D,0,In,Xe,Wt,0,wr.RGBA,Kr,null);const no=u.createFramebuffer(Xe,Wt,!1,!1);return no.colorAttachment.set(Ar),no}function ta(u,Xe){return Xe.colorRampTexture||(Xe.colorRampTexture=new b(u,Xe.colorRamp,u.gl.RGBA)),Xe.colorRampTexture}function ea(u,Xe,Wt,fr,_r){if(!Wt||!fr||!fr.imageAtlas)return;const wr=fr.imageAtlas.patternPositions;let Ar=wr[Wt.to.toString()],Kr=wr[Wt.from.toString()];if(!Ar&&Kr&&(Ar=Kr),!Kr&&Ar&&(Kr=Ar),!Ar||!Kr){const u=_r.getPaintProperty(Xe);Ar=wr[u],Kr=wr[u]}Ar&&Kr&&u.setConstantPatternPositions(Ar,Kr)}function ia(u,Xe,Wt,fr,_r,wr,Ar){const Kr=u.context.gl,In="fill-pattern",no=Wt.paint.get(In),io=no&&no.constantOr(1),oo=Wt.getCrossfadeParameters();let ao,so,co,ho,go;Ar?(so=io&&!Wt.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline",ao=Kr.LINES):(so=io?"fillPattern":"fill",ao=Kr.TRIANGLES);const xo=no.constantOr(null);for(const no of fr){const fr=Xe.getTile(no);if(io&&!fr.patternsLoaded())continue;const ko=fr.getBucket(Wt);if(!ko)continue;const Co=ko.programConfigurations.get(Wt.id),Io=u.useProgram(so,Co),zo=u.style.map.terrain&&u.style.map.terrain.getTerrainData(no);io&&(u.context.activeTexture.set(Kr.TEXTURE0),fr.imageAtlasTexture.bind(Kr.LINEAR,Kr.CLAMP_TO_EDGE),Co.updatePaintBuffers(oo)),ea(Co,In,xo,fr,Wt);const Bo=zo?no:null,ca=u.translatePosMatrix(Bo?Bo.posMatrix:no.posMatrix,fr,Wt.paint.get("fill-translate"),Wt.paint.get("fill-translate-anchor"));if(Ar){ho=ko.indexBuffer2,go=ko.segments2;const Xe=[Kr.drawingBufferWidth,Kr.drawingBufferHeight];co="fillOutlinePattern"===so&&io?Pe(ca,u,oo,fr,Xe):Ee(ca,Xe)}else ho=ko.indexBuffer,go=ko.segments,co=io?Ie(ca,u,oo,fr):Te(ca);Io.draw(u.context,ao,_r,u.stencilModeForClipping(no),wr,ji.disabled,co,zo,Wt.id,ko.layoutVertexBuffer,ho,go,Wt.paint,u.transform.zoom,Co)}}function aa(u,Xe,Wt,fr,_r,wr,Ar){const Kr=u.context,In=Kr.gl,no="fill-extrusion-pattern",io=Wt.paint.get(no),oo=io.constantOr(1),ao=Wt.getCrossfadeParameters(),so=Wt.paint.get("fill-extrusion-opacity"),co=io.constantOr(null);for(const io of fr){const fr=Xe.getTile(io),ho=fr.getBucket(Wt);if(!ho)continue;const go=u.style.map.terrain&&u.style.map.terrain.getTerrainData(io),xo=ho.programConfigurations.get(Wt.id),ko=u.useProgram(oo?"fillExtrusionPattern":"fillExtrusion",xo);oo&&(u.context.activeTexture.set(In.TEXTURE0),fr.imageAtlasTexture.bind(In.LINEAR,In.CLAMP_TO_EDGE),xo.updatePaintBuffers(ao)),ea(xo,no,co,fr,Wt);const Co=u.translatePosMatrix(io.posMatrix,fr,Wt.paint.get("fill-extrusion-translate"),Wt.paint.get("fill-extrusion-translate-anchor")),Io=Wt.paint.get("fill-extrusion-vertical-gradient"),zo=oo?we(Co,u,Io,so,io,ao,fr):be(Co,u,Io,so);ko.draw(Kr,Kr.gl.TRIANGLES,_r,wr,Ar,ji.backCCW,zo,go,Wt.id,ho.layoutVertexBuffer,ho.indexBuffer,ho.segments,Wt.paint,u.transform.zoom,xo,u.style.map.terrain&&ho.centroidVertexBuffer)}}function sa(u,Xe,Wt,fr,_r,wr,Ar){const Kr=u.context,In=Kr.gl,no=Wt.fbo;if(!no)return;const io=u.useProgram("hillshade"),oo=u.style.map.terrain&&u.style.map.terrain.getTerrainData(Xe);Kr.activeTexture.set(In.TEXTURE0),In.bindTexture(In.TEXTURE_2D,no.colorAttachment.get()),io.draw(Kr,In.TRIANGLES,_r,wr,Ar,ji.disabled,((u,Xe,Wt,fr)=>{const _r=Wt.paint.get("hillshade-shadow-color"),wr=Wt.paint.get("hillshade-highlight-color"),Ar=Wt.paint.get("hillshade-accent-color");let Kr=Wt.paint.get("hillshade-illumination-direction")*(Math.PI/180);"viewport"===Wt.paint.get("hillshade-illumination-anchor")&&(Kr-=u.transform.angle);const In=!u.options.moving;return{u_matrix:fr?fr.posMatrix:u.transform.calculatePosMatrix(Xe.tileID.toUnwrapped(),In),u_image:0,u_latrange:Re(0,Xe.tileID),u_light:[Wt.paint.get("hillshade-exaggeration"),Kr],u_shadow:_r,u_highlight:wr,u_accent:Ar}})(u,Wt,fr,oo?Xe:null),oo,fr.id,u.rasterBoundsBuffer,u.quadTriangleIndexBuffer,u.rasterBoundsSegments)}function oa(u,Wt,fr,_r,wr,Ar){const Kr=u.context,In=Kr.gl,no=Wt.dem;if(no&&no.data){const io=no.dim,oo=no.stride,ao=no.getPixels();if(Kr.activeTexture.set(In.TEXTURE1),Kr.pixelStoreUnpackPremultiplyAlpha.set(!1),Wt.demTexture=Wt.demTexture||u.getTileTexture(oo),Wt.demTexture){const u=Wt.demTexture;u.update(ao,{premultiply:!1}),u.bind(In.NEAREST,In.CLAMP_TO_EDGE)}else Wt.demTexture=new b(Kr,ao,In.RGBA,{premultiply:!1}),Wt.demTexture.bind(In.NEAREST,In.CLAMP_TO_EDGE);Kr.activeTexture.set(In.TEXTURE0);let so=Wt.fbo;if(!so){const u=new b(Kr,{width:io,height:io,data:null},In.RGBA);u.bind(In.LINEAR,In.CLAMP_TO_EDGE),so=Wt.fbo=Kr.createFramebuffer(io,io,!0,!1),so.colorAttachment.set(u.texture)}Kr.bindFramebuffer.set(so.framebuffer),Kr.viewport.set([0,0,io,io]),u.useProgram("hillshadePrepare").draw(Kr,In.TRIANGLES,_r,wr,Ar,ji.disabled,((u,Wt)=>{const fr=Wt.stride,_r=Xe.H();return Xe.aP(_r,0,Xe.X,-Xe.X,0,0,1),Xe.J(_r,_r,[0,-Xe.X,0]),{u_matrix:_r,u_image:1,u_dimension:[fr,fr],u_zoom:u.overscaledZ,u_unpack:Wt.getUnpackVector()}})(Wt.tileID,no),null,fr.id,u.rasterBoundsBuffer,u.quadTriangleIndexBuffer,u.rasterBoundsSegments),Wt.needsHillshadePrepare=!1}}function ra(u,Wt,fr,_r,Ar,Kr){const In=_r.paint.get("raster-fade-duration");if(!Kr&&In>0){const _r=wr.now(),Kr=(_r-u.timeAdded)/In,no=Wt?(_r-Wt.timeAdded)/In:-1,io=fr.getSource(),oo=Ar.coveringZoomLevel({tileSize:io.tileSize,roundZoom:io.roundZoom}),ao=!Wt||Math.abs(Wt.tileID.overscaledZ-oo)>Math.abs(u.tileID.overscaledZ-oo),so=ao&&u.refreshedUponExpiration?1:Xe.ac(ao?Kr:1-no,0,1);return u.refreshedUponExpiration&&Kr>=1&&(u.refreshedUponExpiration=!1),Wt?{opacity:1,mix:1-so}:{opacity:so,mix:0}}return{opacity:1,mix:0}}const Xl=new Xe.aM(1,0,0,1),Jl=new Xe.aM(0,1,0,1),Ql=new Xe.aM(0,0,1,1),rc=new Xe.aM(1,0,1,1),ic=new Xe.aM(0,1,1,1);function da(u,Xe,Wt,fr){pa(u,0,Xe+Wt/2,u.transform.width,Wt,fr)}function _a(u,Xe,Wt,fr){pa(u,Xe-Wt/2,0,Wt,u.transform.height,fr)}function pa(u,Xe,Wt,fr,_r,wr){const Ar=u.context,Kr=Ar.gl;Kr.enable(Kr.SCISSOR_TEST),Kr.scissor(Xe*u.pixelRatio,Wt*u.pixelRatio,fr*u.pixelRatio,_r*u.pixelRatio),Ar.clear({color:wr}),Kr.disable(Kr.SCISSOR_TEST)}function ma(u,Wt,fr){const _r=u.context,wr=_r.gl,Ar=fr.posMatrix,Kr=u.useProgram("debug"),In=Oi.disabled,no=Ui.disabled,io=u.colorModeForRenderPass(),oo="$debug",ao=u.style.map.terrain&&u.style.map.terrain.getTerrainData(fr);_r.activeTexture.set(wr.TEXTURE0);const so=Wt.getTileByID(fr.key).latestRawTileData,co=Math.floor((so&&so.byteLength||0)/1024),ho=Wt.getTile(fr).tileSize,go=512/Math.min(ho,512)*(fr.overscaledZ/u.transform.zoom)*.5;let xo=fr.canonical.toString();fr.overscaledZ!==fr.canonical.z&&(xo+=` => ${fr.overscaledZ}`),function(u,Xe){u.initDebugOverlayCanvas();const Wt=u.debugOverlayCanvas,fr=u.context.gl,_r=u.debugOverlayCanvas.getContext("2d");_r.clearRect(0,0,Wt.width,Wt.height),_r.shadowColor="white",_r.shadowBlur=2,_r.lineWidth=1.5,_r.strokeStyle="white",_r.textBaseline="top",_r.font="bold 36px Open Sans, sans-serif",_r.fillText(Xe,5,5),_r.strokeText(Xe,5,5),u.debugOverlayTexture.update(Wt),u.debugOverlayTexture.bind(fr.LINEAR,fr.CLAMP_TO_EDGE)}(u,`${xo} ${co}kB`),Kr.draw(_r,wr.TRIANGLES,In,no,Fi.alphaBlended,ji.disabled,ze(Ar,Xe.aM.transparent,go),null,oo,u.debugBuffer,u.quadTriangleIndexBuffer,u.debugSegments),Kr.draw(_r,wr.LINE_STRIP,In,no,io,ji.disabled,ze(Ar,Xe.aM.red),ao,oo,u.debugBuffer,u.tileBorderIndexBuffer,u.debugSegments)}function fa(u,Xe,Wt){const fr=u.context,_r=fr.gl,wr=u.colorModeForRenderPass(),Ar=new Oi(_r.LEQUAL,Oi.ReadWrite,u.depthRangeFor3D),Kr=u.useProgram("terrain"),In=Xe.getTerrainMesh();fr.bindFramebuffer.set(null),fr.viewport.set([0,0,u.width,u.height]);for(const no of Wt){const Wt=u.renderToTexture.getTexture(no),io=Xe.getTerrainData(no.tileID);fr.activeTexture.set(_r.TEXTURE0),_r.bindTexture(_r.TEXTURE_2D,Wt.texture);const oo=u.transform.calculatePosMatrix(no.tileID.toUnwrapped()),ao=Xe.getMeshFrameDelta(u.transform.zoom),so=u.transform.calculateFogMatrix(no.tileID.toUnwrapped()),co=ge(oo,ao,so,u.style.sky,u.transform.pitch);Kr.draw(fr,_r.TRIANGLES,Ar,Ui.disabled,wr,ji.backCCW,co,io,"terrain",In.vertexBuffer,In.indexBuffer,In.segments)}}class ga{constructor(u,Xe,Wt){this.vertexBuffer=u,this.indexBuffer=Xe,this.segments=Wt}destroy(){this.vertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.vertexBuffer=null,this.indexBuffer=null,this.segments=null}}class va{constructor(u,Wt){this.context=new Bi(u),this.transform=Wt,this._tileTextures={},this.terrainFacilitator={dirty:!0,matrix:Xe.an(new Float64Array(16)),renderTime:0},this.setup(),this.numSublayers=ut.maxUnderzooming+ut.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new he}resize(u,Xe,Wt){if(this.width=Math.floor(u*Wt),this.height=Math.floor(Xe*Wt),this.pixelRatio=Wt,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(const u of this.style._order)this.style._layers[u].resize()}setup(){const u=this.context,Wt=new Xe.aX;Wt.emplaceBack(0,0),Wt.emplaceBack(Xe.X,0),Wt.emplaceBack(0,Xe.X),Wt.emplaceBack(Xe.X,Xe.X),this.tileExtentBuffer=u.createVertexBuffer(Wt,Bl.members),this.tileExtentSegments=Xe.a0.simpleSegment(0,0,4,2);const fr=new Xe.aX;fr.emplaceBack(0,0),fr.emplaceBack(Xe.X,0),fr.emplaceBack(0,Xe.X),fr.emplaceBack(Xe.X,Xe.X),this.debugBuffer=u.createVertexBuffer(fr,Bl.members),this.debugSegments=Xe.a0.simpleSegment(0,0,4,5);const _r=new Xe.$;_r.emplaceBack(0,0,0,0),_r.emplaceBack(Xe.X,0,Xe.X,0),_r.emplaceBack(0,Xe.X,0,Xe.X),_r.emplaceBack(Xe.X,Xe.X,Xe.X,Xe.X),this.rasterBoundsBuffer=u.createVertexBuffer(_r,Io.members),this.rasterBoundsSegments=Xe.a0.simpleSegment(0,0,4,2);const wr=new Xe.aX;wr.emplaceBack(0,0),wr.emplaceBack(1,0),wr.emplaceBack(0,1),wr.emplaceBack(1,1),this.viewportBuffer=u.createVertexBuffer(wr,Bl.members),this.viewportSegments=Xe.a0.simpleSegment(0,0,4,2);const Ar=new Xe.aZ;Ar.emplaceBack(0),Ar.emplaceBack(1),Ar.emplaceBack(3),Ar.emplaceBack(2),Ar.emplaceBack(0),this.tileBorderIndexBuffer=u.createIndexBuffer(Ar);const Kr=new Xe.aY;Kr.emplaceBack(0,1,2),Kr.emplaceBack(2,1,3),this.quadTriangleIndexBuffer=u.createIndexBuffer(Kr);const In=this.context.gl;this.stencilClearMode=new Ui({func:In.ALWAYS,mask:0},0,255,In.ZERO,In.ZERO,In.ZERO)}clearStencil(){const u=this.context,Wt=u.gl;this.nextStencilID=1,this.currentStencilSource=void 0;const fr=Xe.H();Xe.aP(fr,0,this.width,this.height,0,0,1),Xe.K(fr,fr,[Wt.drawingBufferWidth,Wt.drawingBufferHeight,0]),this.useProgram("clippingMask").draw(u,Wt.TRIANGLES,Oi.disabled,this.stencilClearMode,Fi.disabled,ji.disabled,De(fr),null,"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)}_renderTileClippingMasks(u,Xe){if(this.currentStencilSource===u.source||!u.isTileClipped()||!Xe||!Xe.length)return;this.currentStencilSource=u.source;const Wt=this.context,fr=Wt.gl;this.nextStencilID+Xe.length>256&&this.clearStencil(),Wt.setColorMode(Fi.disabled),Wt.setDepthMode(Oi.disabled);const _r=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(const u of Xe){const Xe=this._tileClippingMaskIDs[u.key]=this.nextStencilID++,wr=this.style.map.terrain&&this.style.map.terrain.getTerrainData(u);_r.draw(Wt,fr.TRIANGLES,Oi.disabled,new Ui({func:fr.ALWAYS,mask:0},Xe,255,fr.KEEP,fr.KEEP,fr.REPLACE),Fi.disabled,ji.disabled,De(u.posMatrix),wr,"$clipping",this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}}stencilModeFor3D(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();const u=this.nextStencilID++,Xe=this.context.gl;return new Ui({func:Xe.NOTEQUAL,mask:255},u,255,Xe.KEEP,Xe.KEEP,Xe.REPLACE)}stencilModeForClipping(u){const Xe=this.context.gl;return new Ui({func:Xe.EQUAL,mask:255},this._tileClippingMaskIDs[u.key],0,Xe.KEEP,Xe.KEEP,Xe.REPLACE)}stencilConfigForOverlap(u){const Xe=this.context.gl,Wt=u.sort(((u,Xe)=>Xe.overscaledZ-u.overscaledZ)),fr=Wt[Wt.length-1].overscaledZ,_r=Wt[0].overscaledZ-fr+1;if(_r>1){this.currentStencilSource=void 0,this.nextStencilID+_r>256&&this.clearStencil();const u={};for(let Wt=0;Wt<_r;Wt++)u[Wt+fr]=new Ui({func:Xe.GEQUAL,mask:255},Wt+this.nextStencilID,255,Xe.KEEP,Xe.KEEP,Xe.REPLACE);return this.nextStencilID+=_r,[u,Wt]}return[{[fr]:Ui.disabled},Wt]}colorModeForRenderPass(){const u=this.context.gl;if(this._showOverdrawInspector){const Wt=1/8;return new Fi([u.CONSTANT_COLOR,u.ONE],new Xe.aM(Wt,Wt,Wt,0),[!0,!0,!0,!0])}return"opaque"===this.renderPass?Fi.unblended:Fi.alphaBlended}depthModeForSublayer(u,Xe,Wt){if(!this.opaquePassEnabledForLayer())return Oi.disabled;const fr=1-((1+this.currentLayer)*this.numSublayers+u)*this.depthEpsilon;return new Oi(Wt||this.context.gl.LEQUAL,Xe,[fr,fr])}opaquePassEnabledForLayer(){return this.currentLayer<this.opaquePassCutoff}render(u,Wt){this.style=u,this.options=Wt,this.lineAtlas=u.lineAtlas,this.imageManager=u.imageManager,this.glyphManager=u.glyphManager,this.symbolFadeChange=u.placement.symbolFadeChange(wr.now()),this.imageManager.beginFrame();const fr=this.style._order,_r=this.style.sourceCaches,Ar={},Kr={},In={};for(const u in _r){const Xe=_r[u];Xe.used&&Xe.prepare(this.context),Ar[u]=Xe.getVisibleCoordinates(),Kr[u]=Ar[u].slice().reverse(),In[u]=Xe.getVisibleCoordinates(!0).reverse()}this.opaquePassCutoff=1/0;for(let u=0;u<fr.length;u++)if(this.style._layers[fr[u]].is3D()){this.opaquePassCutoff=u;break}this.maybeDrawDepthAndCoords(!1),this.renderToTexture&&(this.renderToTexture.prepareForRender(this.style,this.transform.zoom),this.opaquePassCutoff=0),this.renderPass="offscreen";for(const u of fr){const Xe=this.style._layers[u];if(!Xe.hasOffscreenPass()||Xe.isHidden(this.transform.zoom))continue;const Wt=Kr[Xe.source];("custom"===Xe.type||Wt.length)&&this.renderLayer(this,_r[Xe.source],Xe,Wt)}if(this.context.bindFramebuffer.set(null),this.context.clear({color:Wt.showOverdrawInspector?Xe.aM.black:Xe.aM.transparent,depth:1}),this.clearStencil(),this.style.sky&&function(u,Wt){const fr=u.context,_r=fr.gl,wr=((u,Xe,Wt)=>({u_sky_color:u.properties.get("sky-color"),u_horizon_color:u.properties.get("horizon-color"),u_horizon:(Xe.height/2+Xe.getHorizon())*Wt,u_sky_horizon_blend:u.properties.get("sky-horizon-blend")*Xe.height/2*Wt}))(Wt,u.style.map.transform,u.pixelRatio),Ar=new Oi(_r.LEQUAL,Oi.ReadWrite,[0,1]),Kr=Ui.disabled,In=u.colorModeForRenderPass(),no=u.useProgram("sky");if(!Wt.mesh){const u=new Xe.aX;u.emplaceBack(-1,-1),u.emplaceBack(1,-1),u.emplaceBack(1,1),u.emplaceBack(-1,1);const _r=new Xe.aY;_r.emplaceBack(0,1,2),_r.emplaceBack(0,2,3),Wt.mesh=new ga(fr.createVertexBuffer(u,Bl.members),fr.createIndexBuffer(_r),Xe.a0.simpleSegment(0,0,u.length,_r.length))}no.draw(fr,_r.TRIANGLES,Ar,Kr,In,ji.disabled,wr,void 0,"sky",Wt.mesh.vertexBuffer,Wt.mesh.indexBuffer,Wt.mesh.segments)}(this,this.style.sky),this._showOverdrawInspector=Wt.showOverdrawInspector,this.depthRangeFor3D=[0,1-(u._order.length+2)*this.numSublayers*this.depthEpsilon],!this.renderToTexture)for(this.renderPass="opaque",this.currentLayer=fr.length-1;this.currentLayer>=0;this.currentLayer--){const u=this.style._layers[fr[this.currentLayer]],Xe=_r[u.source],Wt=Ar[u.source];this._renderTileClippingMasks(u,Wt),this.renderLayer(this,Xe,u,Wt)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayer<fr.length;this.currentLayer++){const u=this.style._layers[fr[this.currentLayer]],Xe=_r[u.source];if(this.renderToTexture&&this.renderToTexture.renderLayer(u))continue;const Wt=("symbol"===u.type?In:Kr)[u.source];this._renderTileClippingMasks(u,Ar[u.source]),this.renderLayer(this,Xe,u,Wt)}if(this.options.showTileBoundaries){const u=function(u,Xe){let Wt=null;const fr=Object.values(u._layers).flatMap((Wt=>Wt.source&&!Wt.isHidden(Xe)?[u.sourceCaches[Wt.source]]:[])),_r=fr.filter((u=>"vector"===u.getSource().type)),wr=fr.filter((u=>"vector"!==u.getSource().type)),r=u=>{(!Wt||Wt.getSource().maxzoom<u.getSource().maxzoom)&&(Wt=u)};return _r.forEach((u=>r(u))),Wt||wr.forEach((u=>r(u))),Wt}(this.style,this.transform.zoom);u&&function(u,Xe,Wt){for(let fr=0;fr<Wt.length;fr++)ma(u,Xe,Wt[fr])}(this,u,u.getVisibleCoordinates())}this.options.showPadding&&function(u){const Xe=u.transform.padding;da(u,u.transform.height-(Xe.top||0),3,Xl),da(u,Xe.bottom||0,3,Jl),_a(u,Xe.left||0,3,Ql),_a(u,u.transform.width-(Xe.right||0),3,rc);const Wt=u.transform.centerPoint;!function(u,Xe,Wt,fr){pa(u,Xe-1,Wt-10,2,20,fr),pa(u,Xe-10,Wt-1,20,2,fr)}(u,Wt.x,u.transform.height-Wt.y,ic)}(this),this.context.setDefault()}maybeDrawDepthAndCoords(u){if(!this.style||!this.style.map||!this.style.map.terrain)return;const Wt=this.terrainFacilitator.matrix,fr=this.transform.modelViewProjectionMatrix;let _r=this.terrainFacilitator.dirty;_r||(_r=u?!Xe.a_(Wt,fr):!Xe.a$(Wt,fr)),_r||(_r=this.style.map.terrain.sourceCache.tilesAfterTime(this.terrainFacilitator.renderTime).length>0),_r&&(Xe.b0(Wt,fr),this.terrainFacilitator.renderTime=Date.now(),this.terrainFacilitator.dirty=!1,function(u,Wt){const fr=u.context,_r=fr.gl,wr=Fi.unblended,Ar=new Oi(_r.LEQUAL,Oi.ReadWrite,[0,1]),Kr=Wt.getTerrainMesh(),In=Wt.sourceCache.getRenderableTiles(),no=u.useProgram("terrainDepth");fr.bindFramebuffer.set(Wt.getFramebuffer("depth").framebuffer),fr.viewport.set([0,0,u.width/devicePixelRatio,u.height/devicePixelRatio]),fr.clear({color:Xe.aM.transparent,depth:1});for(const Xe of In){const In=Wt.getTerrainData(Xe.tileID),io={u_matrix:u.transform.calculatePosMatrix(Xe.tileID.toUnwrapped()),u_ele_delta:Wt.getMeshFrameDelta(u.transform.zoom)};no.draw(fr,_r.TRIANGLES,Ar,Ui.disabled,wr,ji.backCCW,io,In,"terrain",Kr.vertexBuffer,Kr.indexBuffer,Kr.segments)}fr.bindFramebuffer.set(null),fr.viewport.set([0,0,u.width,u.height])}(this,this.style.map.terrain),function(u,Wt){const fr=u.context,_r=fr.gl,wr=Fi.unblended,Ar=new Oi(_r.LEQUAL,Oi.ReadWrite,[0,1]),Kr=Wt.getTerrainMesh(),In=Wt.getCoordsTexture(),no=Wt.sourceCache.getRenderableTiles(),io=u.useProgram("terrainCoords");fr.bindFramebuffer.set(Wt.getFramebuffer("coords").framebuffer),fr.viewport.set([0,0,u.width/devicePixelRatio,u.height/devicePixelRatio]),fr.clear({color:Xe.aM.transparent,depth:1}),Wt.coordsIndex=[];for(const Xe of no){const no=Wt.getTerrainData(Xe.tileID);fr.activeTexture.set(_r.TEXTURE0),_r.bindTexture(_r.TEXTURE_2D,In.texture);const oo={u_matrix:u.transform.calculatePosMatrix(Xe.tileID.toUnwrapped()),u_terrain_coords_id:(255-Wt.coordsIndex.length)/255,u_texture:0,u_ele_delta:Wt.getMeshFrameDelta(u.transform.zoom)};io.draw(fr,_r.TRIANGLES,Ar,Ui.disabled,wr,ji.backCCW,oo,no,"terrain",Kr.vertexBuffer,Kr.indexBuffer,Kr.segments),Wt.coordsIndex.push(Xe.tileID.key)}fr.bindFramebuffer.set(null),fr.viewport.set([0,0,u.width,u.height])}(this,this.style.map.terrain))}renderLayer(u,Wt,fr,_r){if(!fr.isHidden(this.transform.zoom)&&("background"===fr.type||"custom"===fr.type||(_r||[]).length))switch(this.id=fr.id,fr.type){case"symbol":!function(u,Wt,fr,_r,wr){if("translucent"!==u.renderPass)return;const Ar=Ui.disabled,Kr=u.colorModeForRenderPass();(fr._unevaluatedLayout.hasValue("text-variable-anchor")||fr._unevaluatedLayout.hasValue("text-variable-anchor-offset"))&&function(u,Wt,fr,_r,wr,Ar,Kr,In,no){const io=Wt.transform,oo=ie(),ao="map"===wr,so="map"===Ar;for(const wr of u){const u=_r.getTile(wr),Ar=u.getBucket(fr);if(!Ar||!Ar.text||!Ar.text.segments.get().length)continue;const co=Xe.ag(Ar.textSizeData,io.zoom),ho=Bt(u,1,Wt.transform.zoom),go=gt(wr.posMatrix,so,ao,Wt.transform,ho),xo="none"!==fr.layout.get("icon-text-fit")&&Ar.hasIconData();if(co){const Xe=Math.pow(2,io.zoom-u.tileID.overscaledZ),fr=Wt.style.map.terrain?(u,Xe)=>Wt.style.map.terrain.getElevation(wr,u,Xe):null,_r=oo.translatePosition(io,u,Kr,In);Wi(Ar,ao,so,no,io,go,wr.posMatrix,Xe,co,xo,oo,_r,wr.toUnwrapped(),fr)}}}(_r,u,fr,Wt,fr.layout.get("text-rotation-alignment"),fr.layout.get("text-pitch-alignment"),fr.paint.get("text-translate"),fr.paint.get("text-translate-anchor"),wr),0!==fr.paint.get("icon-opacity").constantOr(1)&&Xi(u,Wt,fr,_r,!1,fr.paint.get("icon-translate"),fr.paint.get("icon-translate-anchor"),fr.layout.get("icon-rotation-alignment"),fr.layout.get("icon-pitch-alignment"),fr.layout.get("icon-keep-upright"),Ar,Kr),0!==fr.paint.get("text-opacity").constantOr(1)&&Xi(u,Wt,fr,_r,!0,fr.paint.get("text-translate"),fr.paint.get("text-translate-anchor"),fr.layout.get("text-rotation-alignment"),fr.layout.get("text-pitch-alignment"),fr.layout.get("text-keep-upright"),Ar,Kr),Wt.map.showCollisionBoxes&&(qi(u,Wt,fr,_r,!0),qi(u,Wt,fr,_r,!1))}(u,Wt,fr,_r,this.style.placement.variableOffsets);break;case"circle":!function(u,Wt,fr,_r){if("translucent"!==u.renderPass)return;const wr=fr.paint.get("circle-opacity"),Ar=fr.paint.get("circle-stroke-width"),Kr=fr.paint.get("circle-stroke-opacity"),In=!fr.layout.get("circle-sort-key").isConstant();if(0===wr.constantOr(1)&&(0===Ar.constantOr(1)||0===Kr.constantOr(1)))return;const no=u.context,io=no.gl,oo=u.depthModeForSublayer(0,Oi.ReadOnly),ao=Ui.disabled,so=u.colorModeForRenderPass(),co=[];for(let wr=0;wr<_r.length;wr++){const Ar=_r[wr],Kr=Wt.getTile(Ar),no=Kr.getBucket(fr);if(!no)continue;const io=no.programConfigurations.get(fr.id),oo=u.useProgram("circle",io),ao=no.layoutVertexBuffer,so=no.indexBuffer,ho=u.style.map.terrain&&u.style.map.terrain.getTerrainData(Ar),go={programConfiguration:io,program:oo,layoutVertexBuffer:ao,indexBuffer:so,uniformValues:Ce(u,Ar,Kr,fr),terrainData:ho};if(In){const u=no.segments.get();for(const Wt of u)co.push({segments:new Xe.a0([Wt]),sortKey:Wt.sortKey,state:go})}else co.push({segments:no.segments,sortKey:0,state:go})}In&&co.sort(((u,Xe)=>u.sortKey-Xe.sortKey));for(const Xe of co){const{programConfiguration:Wt,program:_r,layoutVertexBuffer:wr,indexBuffer:Ar,uniformValues:Kr,terrainData:In}=Xe.state;_r.draw(no,io.TRIANGLES,oo,ao,so,ji.disabled,Kr,In,fr.id,wr,Ar,Xe.segments,fr.paint,u.transform.zoom,Wt)}}(u,Wt,fr,_r);break;case"heatmap":!function(u,Wt,fr,_r){if(0===fr.paint.get("heatmap-opacity"))return;const wr=u.context;if(u.style.map.terrain){for(const Xe of _r){const _r=Wt.getTile(Xe);Wt.hasRenderableParent(Xe)||("offscreen"===u.renderPass?Ji(u,_r,fr,Xe):"translucent"===u.renderPass&&Yi(u,fr,Xe))}wr.viewport.set([0,0,u.width,u.height])}else"offscreen"===u.renderPass?function(u,Wt,fr,_r){const wr=u.context,Ar=wr.gl,Kr=Ui.disabled,In=new Fi([Ar.ONE,Ar.ONE],Xe.aM.transparent,[!0,!0,!0,!0]);(function(u,Wt,fr){const _r=u.gl;u.activeTexture.set(_r.TEXTURE1),u.viewport.set([0,0,Wt.width/4,Wt.height/4]);let wr=fr.heatmapFbos.get(Xe.aU);wr?(_r.bindTexture(_r.TEXTURE_2D,wr.colorAttachment.get()),u.bindFramebuffer.set(wr.framebuffer)):(wr=Qi(u,Wt.width/4,Wt.height/4),fr.heatmapFbos.set(Xe.aU,wr))})(wr,u,fr),wr.clear({color:Xe.aM.transparent});for(let Xe=0;Xe<_r.length;Xe++){const no=_r[Xe];if(Wt.hasRenderableParent(no))continue;const io=Wt.getTile(no),oo=io.getBucket(fr);if(!oo)continue;const ao=oo.programConfigurations.get(fr.id),so=u.useProgram("heatmap",ao),{zoom:co}=u.transform;so.draw(wr,Ar.TRIANGLES,Oi.disabled,Kr,In,ji.disabled,Me(no.posMatrix,io,co,fr.paint.get("heatmap-intensity")),null,fr.id,oo.layoutVertexBuffer,oo.indexBuffer,oo.segments,fr.paint,u.transform.zoom,ao)}wr.viewport.set([0,0,u.width,u.height])}(u,Wt,fr,_r):"translucent"===u.renderPass&&function(u,Wt){const fr=u.context,_r=fr.gl;fr.setColorMode(u.colorModeForRenderPass());const wr=Wt.heatmapFbos.get(Xe.aU);wr&&(fr.activeTexture.set(_r.TEXTURE0),_r.bindTexture(_r.TEXTURE_2D,wr.colorAttachment.get()),fr.activeTexture.set(_r.TEXTURE1),ta(fr,Wt).bind(_r.LINEAR,_r.CLAMP_TO_EDGE),u.useProgram("heatmapTexture").draw(fr,_r.TRIANGLES,Oi.disabled,Ui.disabled,u.colorModeForRenderPass(),ji.disabled,Ae(u,Wt,0,1),null,Wt.id,u.viewportBuffer,u.quadTriangleIndexBuffer,u.viewportSegments,Wt.paint,u.transform.zoom))}(u,fr)}(u,Wt,fr,_r);break;case"line":!function(u,Wt,fr,_r){if("translucent"!==u.renderPass)return;const wr=fr.paint.get("line-opacity"),Ar=fr.paint.get("line-width");if(0===wr.constantOr(1)||0===Ar.constantOr(1))return;const Kr=u.depthModeForSublayer(0,Oi.ReadOnly),In=u.colorModeForRenderPass(),no=fr.paint.get("line-dasharray"),io=fr.paint.get("line-pattern"),oo=io.constantOr(1),ao=fr.paint.get("line-gradient"),so=fr.getCrossfadeParameters(),co=oo?"linePattern":no?"lineSDF":ao?"lineGradient":"line",ho=u.context,go=ho.gl;let xo=!0;for(const wr of _r){const _r=Wt.getTile(wr);if(oo&&!_r.patternsLoaded())continue;const Ar=_r.getBucket(fr);if(!Ar)continue;const ko=Ar.programConfigurations.get(fr.id),Co=u.context.program.get(),Io=u.useProgram(co,ko),zo=xo||Io.program!==Co,Bo=u.style.map.terrain&&u.style.map.terrain.getTerrainData(wr),ca=io.constantOr(null);if(ca&&_r.imageAtlas){const u=_r.imageAtlas,Xe=u.patternPositions[ca.to.toString()],Wt=u.patternPositions[ca.from.toString()];Xe&&Wt&&ko.setConstantPatternPositions(Xe,Wt)}const ua=Bo?wr:null,Da=oo?Fe(u,_r,fr,so,ua):no?Be(u,_r,fr,no,so,ua):ao?Le(u,_r,fr,Ar.lineClipsArray.length,ua):ke(u,_r,fr,ua);if(oo)ho.activeTexture.set(go.TEXTURE0),_r.imageAtlasTexture.bind(go.LINEAR,go.CLAMP_TO_EDGE),ko.updatePaintBuffers(so);else if(no&&(zo||u.lineAtlas.dirty))ho.activeTexture.set(go.TEXTURE0),u.lineAtlas.bind(ho);else if(ao){const _r=Ar.gradients[fr.id];let Kr=_r.texture;if(fr.gradientVersion!==_r.version){let In=256;if(fr.stepInterpolant){const fr=Wt.getSource().maxzoom,_r=wr.canonical.z===fr?Math.ceil(1<<u.transform.maxZoom-wr.canonical.z):1;In=Xe.ac(Xe.aV(Ar.maxLineLength/Xe.X*1024*_r),256,ho.maxTextureSize)}_r.gradient=Xe.aW({expression:fr.gradientExpression(),evaluationKey:"lineProgress",resolution:In,image:_r.gradient||void 0,clips:Ar.lineClipsArray}),_r.texture?_r.texture.update(_r.gradient):_r.texture=new b(ho,_r.gradient,go.RGBA),_r.version=fr.gradientVersion,Kr=_r.texture}ho.activeTexture.set(go.TEXTURE0),Kr.bind(fr.stepInterpolant?go.NEAREST:go.LINEAR,go.CLAMP_TO_EDGE)}Io.draw(ho,go.TRIANGLES,Kr,u.stencilModeForClipping(wr),In,ji.disabled,Da,Bo,fr.id,Ar.layoutVertexBuffer,Ar.indexBuffer,Ar.segments,fr.paint,u.transform.zoom,ko,Ar.layoutVertexBuffer2),xo=!1}}(u,Wt,fr,_r);break;case"fill":!function(u,Wt,fr,_r){const wr=fr.paint.get("fill-color"),Ar=fr.paint.get("fill-opacity");if(0===Ar.constantOr(1))return;const Kr=u.colorModeForRenderPass(),In=fr.paint.get("fill-pattern"),no=u.opaquePassEnabledForLayer()&&!In.constantOr(1)&&1===wr.constantOr(Xe.aM.transparent).a&&1===Ar.constantOr(0)?"opaque":"translucent";if(u.renderPass===no){const Xe=u.depthModeForSublayer(1,"opaque"===u.renderPass?Oi.ReadWrite:Oi.ReadOnly);ia(u,Wt,fr,_r,Xe,Kr,!1)}if("translucent"===u.renderPass&&fr.paint.get("fill-antialias")){const Xe=u.depthModeForSublayer(fr.getPaintProperty("fill-outline-color")?2:0,Oi.ReadOnly);ia(u,Wt,fr,_r,Xe,Kr,!0)}}(u,Wt,fr,_r);break;case"fill-extrusion":!function(u,Xe,Wt,fr){const _r=Wt.paint.get("fill-extrusion-opacity");if(0!==_r&&"translucent"===u.renderPass){const wr=new Oi(u.context.gl.LEQUAL,Oi.ReadWrite,u.depthRangeFor3D);if(1!==_r||Wt.paint.get("fill-extrusion-pattern").constantOr(1))aa(u,Xe,Wt,fr,wr,Ui.disabled,Fi.disabled),aa(u,Xe,Wt,fr,wr,u.stencilModeFor3D(),u.colorModeForRenderPass());else{const _r=u.colorModeForRenderPass();aa(u,Xe,Wt,fr,wr,Ui.disabled,_r)}}}(u,Wt,fr,_r);break;case"hillshade":!function(u,Xe,Wt,fr){if("offscreen"!==u.renderPass&&"translucent"!==u.renderPass)return;const _r=u.context,wr=u.depthModeForSublayer(0,Oi.ReadOnly),Ar=u.colorModeForRenderPass(),[Kr,In]="translucent"===u.renderPass?u.stencilConfigForOverlap(fr):[{},fr];for(const fr of In){const _r=Xe.getTile(fr);void 0!==_r.needsHillshadePrepare&&_r.needsHillshadePrepare&&"offscreen"===u.renderPass?oa(u,_r,Wt,wr,Ui.disabled,Ar):"translucent"===u.renderPass&&sa(u,fr,_r,Wt,wr,Kr[fr.overscaledZ],Ar)}_r.viewport.set([0,0,u.width,u.height])}(u,Wt,fr,_r);break;case"raster":!function(u,Xe,Wt,fr){if("translucent"!==u.renderPass)return;if(0===Wt.paint.get("raster-opacity"))return;if(!fr.length)return;const _r=u.context,wr=_r.gl,Ar=Xe.getSource(),Kr=u.useProgram("raster"),In=u.colorModeForRenderPass(),[no,io]=Ar instanceof Q?[{},fr]:u.stencilConfigForOverlap(fr),oo=io[io.length-1].overscaledZ,ao=!u.options.moving;for(const fr of io){const io=u.depthModeForSublayer(fr.overscaledZ-oo,1===Wt.paint.get("raster-opacity")?Oi.ReadWrite:Oi.ReadOnly,wr.LESS),so=Xe.getTile(fr);so.registerFadeDuration(Wt.paint.get("raster-fade-duration"));const co=Xe.findLoadedParent(fr,0),ho=Xe.findLoadedSibling(fr),go=ra(so,co||ho||null,Xe,Wt,u.transform,u.style.map.terrain);let xo,ko;const Co="nearest"===Wt.paint.get("raster-resampling")?wr.NEAREST:wr.LINEAR;_r.activeTexture.set(wr.TEXTURE0),so.texture.bind(Co,wr.CLAMP_TO_EDGE,wr.LINEAR_MIPMAP_NEAREST),_r.activeTexture.set(wr.TEXTURE1),co?(co.texture.bind(Co,wr.CLAMP_TO_EDGE,wr.LINEAR_MIPMAP_NEAREST),xo=Math.pow(2,co.tileID.overscaledZ-so.tileID.overscaledZ),ko=[so.tileID.canonical.x*xo%1,so.tileID.canonical.y*xo%1]):so.texture.bind(Co,wr.CLAMP_TO_EDGE,wr.LINEAR_MIPMAP_NEAREST),so.texture.useMipmap&&_r.extTextureFilterAnisotropic&&u.transform.pitch>20&&wr.texParameterf(wr.TEXTURE_2D,_r.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,_r.extTextureFilterAnisotropicMax);const Io=u.style.map.terrain&&u.style.map.terrain.getTerrainData(fr),zo=Io?fr:null,Bo=zo?zo.posMatrix:u.transform.calculatePosMatrix(fr.toUnwrapped(),ao),ca=Ue(Bo,ko||[0,0],xo||1,go,Wt);Ar instanceof Q?Kr.draw(_r,wr.TRIANGLES,io,Ui.disabled,In,ji.disabled,ca,Io,Wt.id,Ar.boundsBuffer,u.quadTriangleIndexBuffer,Ar.boundsSegments):Kr.draw(_r,wr.TRIANGLES,io,no[fr.overscaledZ],In,ji.disabled,ca,Io,Wt.id,u.rasterBoundsBuffer,u.quadTriangleIndexBuffer,u.rasterBoundsSegments)}}(u,Wt,fr,_r);break;case"background":!function(u,Xe,Wt,fr){const _r=Wt.paint.get("background-color"),wr=Wt.paint.get("background-opacity");if(0===wr)return;const Ar=u.context,Kr=Ar.gl,In=u.transform,no=In.tileSize,io=Wt.paint.get("background-pattern");if(u.isPatternMissing(io))return;const oo=!io&&1===_r.a&&1===wr&&u.opaquePassEnabledForLayer()?"opaque":"translucent";if(u.renderPass!==oo)return;const ao=Ui.disabled,so=u.depthModeForSublayer(0,"opaque"===oo?Oi.ReadWrite:Oi.ReadOnly),co=u.colorModeForRenderPass(),ho=u.useProgram(io?"backgroundPattern":"background"),go=fr||In.coveringTiles({tileSize:no,terrain:u.style.map.terrain});io&&(Ar.activeTexture.set(Kr.TEXTURE0),u.imageManager.bind(u.context));const xo=Wt.getCrossfadeParameters();for(const Xe of go){const In=fr?Xe.posMatrix:u.transform.calculatePosMatrix(Xe.toUnwrapped()),oo=io?He(In,wr,u,io,{tileID:Xe,tileSize:no},xo):Ge(In,wr,_r),go=u.style.map.terrain&&u.style.map.terrain.getTerrainData(Xe);ho.draw(Ar,Kr.TRIANGLES,so,ao,co,ji.disabled,oo,go,Wt.id,u.tileExtentBuffer,u.quadTriangleIndexBuffer,u.tileExtentSegments)}}(u,0,fr,_r);break;case"custom":!function(u,Xe,Wt){const fr=u.context,_r=Wt.implementation;if("offscreen"===u.renderPass){const Xe=_r.prerender;Xe&&(u.setCustomLayerDefaults(),fr.setColorMode(u.colorModeForRenderPass()),Xe.call(_r,fr.gl,u.transform.customLayerMatrix()),fr.setDirty(),u.setBaseState())}else if("translucent"===u.renderPass){u.setCustomLayerDefaults(),fr.setColorMode(u.colorModeForRenderPass()),fr.setStencilMode(Ui.disabled);const Xe="3d"===_r.renderingMode?new Oi(u.context.gl.LEQUAL,Oi.ReadWrite,u.depthRangeFor3D):u.depthModeForSublayer(0,Oi.ReadOnly);fr.setDepthMode(Xe),_r.render(fr.gl,u.transform.customLayerMatrix(),{farZ:u.transform.farZ,nearZ:u.transform.nearZ,fov:u.transform._fov,modelViewProjectionMatrix:u.transform.modelViewProjectionMatrix,projectionMatrix:u.transform.projectionMatrix}),fr.setDirty(),u.setBaseState(),fr.bindFramebuffer.set(null)}}(u,0,fr)}}translatePosMatrix(u,Wt,fr,_r,wr){if(!fr[0]&&!fr[1])return u;const Ar=wr?"map"===_r?this.transform.angle:0:"viewport"===_r?-this.transform.angle:0;if(Ar){const u=Math.sin(Ar),Xe=Math.cos(Ar);fr=[fr[0]*Xe-fr[1]*u,fr[0]*u+fr[1]*Xe]}const Kr=[wr?fr[0]:Bt(Wt,fr[0],this.transform.zoom),wr?fr[1]:Bt(Wt,fr[1],this.transform.zoom),0],In=new Float32Array(16);return Xe.J(In,u,Kr),In}saveTileTexture(u){const Xe=this._tileTextures[u.size[0]];Xe?Xe.push(u):this._tileTextures[u.size[0]]=[u]}getTileTexture(u){const Xe=this._tileTextures[u];return Xe&&Xe.length>0?Xe.pop():null}isPatternMissing(u){if(!u)return!1;if(!u.from||!u.to)return!0;const Xe=this.imageManager.getPattern(u.from.toString()),Wt=this.imageManager.getPattern(u.to.toString());return!Xe||!Wt}useProgram(u,Xe){this.cache=this.cache||{};const Wt=u+(Xe?Xe.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"")+(this.style.map.terrain?"/terrain":"");return this.cache[Wt]||(this.cache[Wt]=new xe(this.context,Nl[u],Xe,Vl[u],this._showOverdrawInspector,this.style.map.terrain)),this.cache[Wt]}setCustomLayerDefaults(){this.context.unbindVAO(),this.context.cullFace.setDefault(),this.context.activeTexture.setDefault(),this.context.pixelStoreUnpack.setDefault(),this.context.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.context.pixelStoreUnpackFlipY.setDefault()}setBaseState(){const u=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(u.FUNC_ADD)}initDebugOverlayCanvas(){null==this.debugOverlayCanvas&&(this.debugOverlayCanvas=document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512,this.debugOverlayTexture=new b(this.context,this.debugOverlayCanvas,this.context.gl.RGBA))}destroy(){this.debugOverlayTexture&&this.debugOverlayTexture.destroy()}overLimit(){const{drawingBufferWidth:u,drawingBufferHeight:Xe}=this.context.gl;return this.width!==u||this.height!==Xe}}class xa{constructor(u,Xe){this.points=u,this.planes=Xe}static fromInvProjectionMatrix(u,Wt,fr){const _r=Math.pow(2,fr),wr=[[-1,1,-1,1],[1,1,-1,1],[1,-1,-1,1],[-1,-1,-1,1],[-1,1,1,1],[1,1,1,1],[1,-1,1,1],[-1,-1,1,1]].map((fr=>{const wr=1/(fr=Xe.af([],fr,u))[3]/Wt*_r;return Xe.b1(fr,fr,[wr,wr,1/fr[3],wr])})),Ar=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]].map((u=>{const Xe=function(u,Xe){var Wt=Xe[0],fr=Xe[1],_r=Xe[2],wr=Wt*Wt+fr*fr+_r*_r;return wr>0&&(wr=1/Math.sqrt(wr)),u[0]=Xe[0]*wr,u[1]=Xe[1]*wr,u[2]=Xe[2]*wr,u}([],function(u,Xe,Wt){var fr=Xe[0],_r=Xe[1],wr=Xe[2],Ar=Wt[0],Kr=Wt[1],In=Wt[2];return u[0]=_r*In-wr*Kr,u[1]=wr*Ar-fr*In,u[2]=fr*Kr-_r*Ar,u}([],g([],wr[u[0]],wr[u[1]]),g([],wr[u[2]],wr[u[1]]))),Wt=-((fr=Xe)[0]*(_r=wr[u[1]])[0]+fr[1]*_r[1]+fr[2]*_r[2]);var fr,_r;return Xe.concat(Wt)}));return new xa(wr,Ar)}}class ya{constructor(u,Xe){this.min=u,this.max=Xe,this.center=function(u,Xe){return u[0]=.5*Xe[0],u[1]=.5*Xe[1],u[2]=.5*Xe[2],u}([],function(u,Xe,Wt){return u[0]=Xe[0]+Wt[0],u[1]=Xe[1]+Wt[1],u[2]=Xe[2]+Wt[2],u}([],this.min,this.max))}quadrant(u){const Xe=[u%2==0,u<2],Wt=m(this.min),fr=m(this.max);for(let u=0;u<Xe.length;u++)Wt[u]=Xe[u]?this.min[u]:this.center[u],fr[u]=Xe[u]?this.center[u]:this.max[u];return fr[2]=this.max[2],new ya(Wt,fr)}distanceX(u){return Math.max(Math.min(this.max[0],u[0]),this.min[0])-u[0]}distanceY(u){return Math.max(Math.min(this.max[1],u[1]),this.min[1])-u[1]}intersects(u){const Wt=[[this.min[0],this.min[1],this.min[2],1],[this.max[0],this.min[1],this.min[2],1],[this.max[0],this.max[1],this.min[2],1],[this.min[0],this.max[1],this.min[2],1],[this.min[0],this.min[1],this.max[2],1],[this.max[0],this.min[1],this.max[2],1],[this.max[0],this.max[1],this.max[2],1],[this.min[0],this.max[1],this.max[2],1]];let fr=!0;for(let _r=0;_r<u.planes.length;_r++){const wr=u.planes[_r];let Ar=0;for(let u=0;u<Wt.length;u++)Xe.b2(wr,Wt[u])>=0&&Ar++;if(0===Ar)return 0;Ar!==Wt.length&&(fr=!1)}if(fr)return 2;for(let Xe=0;Xe<3;Xe++){let Wt=Number.MAX_VALUE,fr=-Number.MAX_VALUE;for(let _r=0;_r<u.points.length;_r++){const wr=u.points[_r][Xe]-this.min[Xe];Wt=Math.min(Wt,wr),fr=Math.max(fr,wr)}if(fr<0||Wt>this.max[Xe]-this.min[Xe])return 0}return 1}}class ba{constructor(u=0,Xe=0,Wt=0,fr=0){if(isNaN(u)||u<0||isNaN(Xe)||Xe<0||isNaN(Wt)||Wt<0||isNaN(fr)||fr<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=u,this.bottom=Xe,this.left=Wt,this.right=fr}interpolate(u,Wt,fr){return null!=Wt.top&&null!=u.top&&(this.top=Xe.y.number(u.top,Wt.top,fr)),null!=Wt.bottom&&null!=u.bottom&&(this.bottom=Xe.y.number(u.bottom,Wt.bottom,fr)),null!=Wt.left&&null!=u.left&&(this.left=Xe.y.number(u.left,Wt.left,fr)),null!=Wt.right&&null!=u.right&&(this.right=Xe.y.number(u.right,Wt.right,fr)),this}getCenter(u,Wt){const fr=Xe.ac((this.left+u-this.right)/2,0,u),_r=Xe.ac((this.top+Wt-this.bottom)/2,0,Wt);return new Xe.P(fr,_r)}equals(u){return this.top===u.top&&this.bottom===u.bottom&&this.left===u.left&&this.right===u.right}clone(){return new ba(this.top,this.bottom,this.left,this.right)}toJSON(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}}}const oc=85.051129;class Ta{constructor(u,Wt,fr,_r,wr){this.tileSize=512,this._renderWorldCopies=void 0===wr||!!wr,this._minZoom=u||0,this._maxZoom=Wt||22,this._minPitch=null==fr?0:fr,this._maxPitch=null==_r?60:_r,this.setMaxBounds(),this.width=0,this.height=0,this._center=new Xe.N(0,0),this._elevation=0,this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._edgeInsets=new ba,this._posMatrixCache={},this._alignedPosMatrixCache={},this._fogMatrixCache={},this.minElevationForCurrentTile=0}clone(){const u=new Ta(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return u.apply(this),u}apply(u){this.tileSize=u.tileSize,this.latRange=u.latRange,this.lngRange=u.lngRange,this.width=u.width,this.height=u.height,this._center=u._center,this._elevation=u._elevation,this.minElevationForCurrentTile=u.minElevationForCurrentTile,this.zoom=u.zoom,this.angle=u.angle,this._fov=u._fov,this._pitch=u._pitch,this._unmodified=u._unmodified,this._edgeInsets=u._edgeInsets.clone(),this._calcMatrices()}get minZoom(){return this._minZoom}set minZoom(u){this._minZoom!==u&&(this._minZoom=u,this.zoom=Math.max(this.zoom,u))}get maxZoom(){return this._maxZoom}set maxZoom(u){this._maxZoom!==u&&(this._maxZoom=u,this.zoom=Math.min(this.zoom,u))}get minPitch(){return this._minPitch}set minPitch(u){this._minPitch!==u&&(this._minPitch=u,this.pitch=Math.max(this.pitch,u))}get maxPitch(){return this._maxPitch}set maxPitch(u){this._maxPitch!==u&&(this._maxPitch=u,this.pitch=Math.min(this.pitch,u))}get renderWorldCopies(){return this._renderWorldCopies}set renderWorldCopies(u){void 0===u?u=!0:null===u&&(u=!1),this._renderWorldCopies=u}get worldSize(){return this.tileSize*this.scale}get centerOffset(){return this.centerPoint._sub(this.size._div(2))}get size(){return new Xe.P(this.width,this.height)}get bearing(){return-this.angle/Math.PI*180}set bearing(u){const Wt=-Xe.b3(u,-180,180)*Math.PI/180;this.angle!==Wt&&(this._unmodified=!1,this.angle=Wt,this._calcMatrices(),this.rotationMatrix=function(){var u=new Xe.A(4);return Xe.A!=Float32Array&&(u[1]=0,u[2]=0),u[0]=1,u[3]=1,u}(),function(u,Xe,Wt){var fr=Xe[0],_r=Xe[1],wr=Xe[2],Ar=Xe[3],Kr=Math.sin(Wt),In=Math.cos(Wt);u[0]=fr*In+wr*Kr,u[1]=_r*In+Ar*Kr,u[2]=fr*-Kr+wr*In,u[3]=_r*-Kr+Ar*In}(this.rotationMatrix,this.rotationMatrix,this.angle))}get pitch(){return this._pitch/Math.PI*180}set pitch(u){const Wt=Xe.ac(u,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==Wt&&(this._unmodified=!1,this._pitch=Wt,this._calcMatrices())}get fov(){return this._fov/Math.PI*180}set fov(u){u=Math.max(.01,Math.min(60,u)),this._fov!==u&&(this._unmodified=!1,this._fov=u/180*Math.PI,this._calcMatrices())}get zoom(){return this._zoom}set zoom(u){const Xe=Math.min(Math.max(u,this.minZoom),this.maxZoom);this._zoom!==Xe&&(this._unmodified=!1,this._zoom=Xe,this.tileZoom=Math.max(0,Math.floor(Xe)),this.scale=this.zoomScale(Xe),this._constrain(),this._calcMatrices())}get center(){return this._center}set center(u){u.lat===this._center.lat&&u.lng===this._center.lng||(this._unmodified=!1,this._center=u,this._constrain(),this._calcMatrices())}get elevation(){return this._elevation}set elevation(u){u!==this._elevation&&(this._elevation=u,this._constrain(),this._calcMatrices())}get padding(){return this._edgeInsets.toJSON()}set padding(u){this._edgeInsets.equals(u)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,u,1),this._calcMatrices())}get centerPoint(){return this._edgeInsets.getCenter(this.width,this.height)}isPaddingEqual(u){return this._edgeInsets.equals(u)}interpolatePadding(u,Xe,Wt){this._unmodified=!1,this._edgeInsets.interpolate(u,Xe,Wt),this._constrain(),this._calcMatrices()}coveringZoomLevel(u){const Xe=(u.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/u.tileSize));return Math.max(0,Xe)}getVisibleUnwrappedCoordinates(u){const Wt=[new Xe.b4(0,u)];if(this._renderWorldCopies){const fr=this.pointCoordinate(new Xe.P(0,0)),_r=this.pointCoordinate(new Xe.P(this.width,0)),wr=this.pointCoordinate(new Xe.P(this.width,this.height)),Ar=this.pointCoordinate(new Xe.P(0,this.height)),Kr=Math.floor(Math.min(fr.x,_r.x,wr.x,Ar.x)),In=Math.floor(Math.max(fr.x,_r.x,wr.x,Ar.x)),no=1;for(let fr=Kr-no;fr<=In+no;fr++)0!==fr&&Wt.push(new Xe.b4(fr,u))}return Wt}coveringTiles(u){var Wt,fr;let _r=this.coveringZoomLevel(u);const wr=_r;if(void 0!==u.minzoom&&_r<u.minzoom)return[];void 0!==u.maxzoom&&_r>u.maxzoom&&(_r=u.maxzoom);const Ar=this.pointCoordinate(this.getCameraPoint()),Kr=Xe.Z.fromLngLat(this.center),In=Math.pow(2,_r),no=[In*Ar.x,In*Ar.y,0],io=[In*Kr.x,In*Kr.y,0],oo=xa.fromInvProjectionMatrix(this.invModelViewProjectionMatrix,this.worldSize,_r);let ao=u.minzoom||0;!u.terrain&&this.pitch<=60&&this._edgeInsets.top<.1&&(ao=_r);const so=u.terrain?2/Math.min(this.tileSize,u.tileSize)*this.tileSize:3,p=u=>({aabb:new ya([u*In,0,0],[(u+1)*In,In,0]),zoom:0,x:0,y:0,wrap:u,fullyVisible:!1}),co=[],ho=[],go=_r,xo=u.reparseOverscaled?wr:_r;if(this._renderWorldCopies)for(let u=1;u<=3;u++)co.push(p(-u)),co.push(p(u));for(co.push(p(0));co.length>0;){const _r=co.pop(),wr=_r.x,Ar=_r.y;let Kr=_r.fullyVisible;if(!Kr){const u=_r.aabb.intersects(oo);if(0===u)continue;Kr=2===u}const In=u.terrain?no:io,ko=_r.aabb.distanceX(In),Co=_r.aabb.distanceY(In),Io=Math.max(Math.abs(ko),Math.abs(Co));if(_r.zoom===go||Io>so+(1<<go-_r.zoom)-2&&_r.zoom>=ao){const u=go-_r.zoom,Wt=no[0]-.5-(wr<<u),fr=no[1]-.5-(Ar<<u);ho.push({tileID:new Xe.S(_r.zoom===go?xo:_r.zoom,_r.wrap,_r.zoom,wr,Ar),distanceSq:v([io[0]-.5-wr,io[1]-.5-Ar]),tileDistanceToCamera:Math.sqrt(Wt*Wt+fr*fr)})}else for(let In=0;In<4;In++){const no=(wr<<1)+In%2,io=(Ar<<1)+(In>>1),oo=_r.zoom+1;let ao=_r.aabb.quadrant(In);if(u.terrain){const wr=new Xe.S(oo,_r.wrap,oo,no,io),Ar=u.terrain.getMinMaxElevation(wr),Kr=null!==(Wt=Ar.minElevation)&&void 0!==Wt?Wt:this.elevation,In=null!==(fr=Ar.maxElevation)&&void 0!==fr?fr:this.elevation;ao=new ya([ao.min[0],ao.min[1],Kr],[ao.max[0],ao.max[1],In])}co.push({aabb:ao,zoom:oo,x:no,y:io,wrap:_r.wrap,fullyVisible:Kr})}}return ho.sort(((u,Xe)=>u.distanceSq-Xe.distanceSq)).map((u=>u.tileID))}resize(u,Xe){this.width=u,this.height=Xe,this.pixelsToGLUnits=[2/u,-2/Xe],this._constrain(),this._calcMatrices()}get unmodified(){return this._unmodified}zoomScale(u){return Math.pow(2,u)}scaleZoom(u){return Math.log(u)/Math.LN2}project(u){const Wt=Xe.ac(u.lat,-85.051129,oc);return new Xe.P(Xe.O(u.lng)*this.worldSize,Xe.Q(Wt)*this.worldSize)}unproject(u){return new Xe.Z(u.x/this.worldSize,u.y/this.worldSize).toLngLat()}get point(){return this.project(this.center)}getCameraPosition(){return{lngLat:this.pointLocation(this.getCameraPoint()),altitude:Math.cos(this._pitch)*this.cameraToCenterDistance/this._pixelPerMeter+this.elevation}}recalculateZoom(u){const Wt=this.elevation,fr=Math.cos(this._pitch)*this.cameraToCenterDistance/this._pixelPerMeter,_r=this.pointLocation(this.centerPoint,u),wr=u.getElevationForLngLatZoom(_r,this.tileZoom);if(!(this.elevation-wr))return;const Ar=fr+Wt-wr,Kr=Math.cos(this._pitch)*this.cameraToCenterDistance/Ar/Xe.b5(1,_r.lat),In=this.scaleZoom(Kr/this.tileSize);this._elevation=wr,this._center=_r,this.zoom=In}setLocationAtPoint(u,Wt){const fr=this.pointCoordinate(Wt),_r=this.pointCoordinate(this.centerPoint),wr=this.locationCoordinate(u),Ar=new Xe.Z(wr.x-(fr.x-_r.x),wr.y-(fr.y-_r.y));this.center=this.coordinateLocation(Ar),this._renderWorldCopies&&(this.center=this.center.wrap())}locationPoint(u,Xe){return Xe?this.coordinatePoint(this.locationCoordinate(u),Xe.getElevationForLngLatZoom(u,this.tileZoom),this.pixelMatrix3D):this.coordinatePoint(this.locationCoordinate(u))}pointLocation(u,Xe){return this.coordinateLocation(this.pointCoordinate(u,Xe))}locationCoordinate(u){return Xe.Z.fromLngLat(u)}coordinateLocation(u){return u&&u.toLngLat()}pointCoordinate(u,Wt){if(Wt){const Xe=Wt.pointCoordinate(u);if(null!=Xe)return Xe}const fr=[u.x,u.y,0,1],_r=[u.x,u.y,1,1];Xe.af(fr,fr,this.pixelMatrixInverse),Xe.af(_r,_r,this.pixelMatrixInverse);const wr=fr[3],Ar=_r[3],Kr=fr[1]/wr,In=_r[1]/Ar,no=fr[2]/wr,io=_r[2]/Ar,oo=no===io?0:(0-no)/(io-no);return new Xe.Z(Xe.y.number(fr[0]/wr,_r[0]/Ar,oo)/this.worldSize,Xe.y.number(Kr,In,oo)/this.worldSize)}coordinatePoint(u,Wt=0,fr=this.pixelMatrix){const _r=[u.x*this.worldSize,u.y*this.worldSize,Wt,1];return Xe.af(_r,_r,fr),new Xe.P(_r[0]/_r[3],_r[1]/_r[3])}getBounds(){const u=Math.max(0,this.height/2-this.getHorizon());return(new H).extend(this.pointLocation(new Xe.P(0,u))).extend(this.pointLocation(new Xe.P(this.width,u))).extend(this.pointLocation(new Xe.P(this.width,this.height))).extend(this.pointLocation(new Xe.P(0,this.height)))}getMaxBounds(){return this.latRange&&2===this.latRange.length&&this.lngRange&&2===this.lngRange.length?new H([this.lngRange[0],this.latRange[0]],[this.lngRange[1],this.latRange[1]]):null}getHorizon(){return Math.tan(Math.PI/2-this._pitch)*this.cameraToCenterDistance*.85}setMaxBounds(u){u?(this.lngRange=[u.getWest(),u.getEast()],this.latRange=[u.getSouth(),u.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-85.051129,oc])}calculateTileMatrix(u){const Wt=u.canonical,fr=this.worldSize/this.zoomScale(Wt.z),_r=Wt.x+Math.pow(2,Wt.z)*u.wrap,wr=Xe.an(new Float64Array(16));return Xe.J(wr,wr,[_r*fr,Wt.y*fr,0]),Xe.K(wr,wr,[fr/Xe.X,fr/Xe.X,1]),wr}calculatePosMatrix(u,Wt=!1){const fr=u.key,_r=Wt?this._alignedPosMatrixCache:this._posMatrixCache;if(_r[fr])return _r[fr];const wr=this.calculateTileMatrix(u);return Xe.L(wr,Wt?this.alignedModelViewProjectionMatrix:this.modelViewProjectionMatrix,wr),_r[fr]=new Float32Array(wr),_r[fr]}calculateFogMatrix(u){const Wt=u.key,fr=this._fogMatrixCache;if(fr[Wt])return fr[Wt];const _r=this.calculateTileMatrix(u);return Xe.L(_r,this.fogMatrix,_r),fr[Wt]=new Float32Array(_r),fr[Wt]}customLayerMatrix(){return this.mercatorMatrix.slice()}getConstrained(u,Wt){Wt=Xe.ac(+Wt,this.minZoom,this.maxZoom);const fr={center:new Xe.N(u.lng,u.lat),zoom:Wt};let _r=this.lngRange;if(!this._renderWorldCopies&&null===_r){const u=180-1e-10;_r=[-u,u]}const wr=this.tileSize*this.zoomScale(fr.zoom);let Ar=0,Kr=wr,In=0,no=wr,io=0,oo=0;const{x:ao,y:so}=this.size;if(this.latRange){const u=this.latRange;Ar=Xe.Q(u[1])*wr,Kr=Xe.Q(u[0])*wr,Kr-Ar<so&&(io=so/(Kr-Ar))}_r&&(In=Xe.b3(Xe.O(_r[0])*wr,0,wr),no=Xe.b3(Xe.O(_r[1])*wr,0,wr),no<In&&(no+=wr),no-In<ao&&(oo=ao/(no-In)));const{x:co,y:ho}=this.project.call({worldSize:wr},u);let go,xo;const ko=Math.max(oo||0,io||0);if(ko){const u=new Xe.P(oo?(no+In)/2:co,io?(Kr+Ar)/2:ho);return fr.center=this.unproject.call({worldSize:wr},u).wrap(),fr.zoom+=this.scaleZoom(ko),fr}if(this.latRange){const u=so/2;ho-u<Ar&&(xo=Ar+u),ho+u>Kr&&(xo=Kr-u)}if(_r){const u=(In+no)/2;let Wt=co;this._renderWorldCopies&&(Wt=Xe.b3(co,u-wr/2,u+wr/2));const fr=ao/2;Wt-fr<In&&(go=In+fr),Wt+fr>no&&(go=no-fr)}if(void 0!==go||void 0!==xo){const u=new Xe.P(null!=go?go:co,null!=xo?xo:ho);fr.center=this.unproject.call({worldSize:wr},u).wrap()}return fr}_constrain(){if(!this.center||!this.width||!this.height||this._constraining)return;this._constraining=!0;const u=this._unmodified,{center:Xe,zoom:Wt}=this.getConstrained(this.center,this.zoom);this.center=Xe,this.zoom=Wt,this._unmodified=u,this._constraining=!1}_calcMatrices(){if(!this.height)return;const u=this.centerOffset,Wt=this.point.x,fr=this.point.y;this.cameraToCenterDistance=.5/Math.tan(this._fov/2)*this.height,this._pixelPerMeter=Xe.b5(1,this.center.lat)*this.worldSize;let _r=Xe.an(new Float64Array(16));Xe.K(_r,_r,[this.width/2,-this.height/2,1]),Xe.J(_r,_r,[1,-1,0]),this.labelPlaneMatrix=_r,_r=Xe.an(new Float64Array(16)),Xe.K(_r,_r,[1,-1,1]),Xe.J(_r,_r,[-1,-1,0]),Xe.K(_r,_r,[2/this.width,2/this.height,1]),this.glCoordMatrix=_r;const wr=this.cameraToCenterDistance+this._elevation*this._pixelPerMeter/Math.cos(this._pitch),Ar=Math.min(this.elevation,this.minElevationForCurrentTile),Kr=wr-Ar*this._pixelPerMeter/Math.cos(this._pitch),In=Ar<0?Kr:wr,no=Math.PI/2+this._pitch,io=this._fov*(.5+u.y/this.height),oo=Math.sin(io)*In/Math.sin(Xe.ac(Math.PI-no-io,.01,Math.PI-.01)),ao=this.getHorizon(),so=2*Math.atan(ao/this.cameraToCenterDistance)*(.5+u.y/(2*ao)),co=Math.sin(so)*In/Math.sin(Xe.ac(Math.PI-no-so,.01,Math.PI-.01)),ho=Math.min(oo,co);this.farZ=1.01*(Math.cos(Math.PI/2-this._pitch)*ho+In),this.nearZ=this.height/50,_r=new Float64Array(16),Xe.b6(_r,this._fov,this.width/this.height,this.nearZ,this.farZ),_r[8]=2*-u.x/this.width,_r[9]=2*u.y/this.height,this.projectionMatrix=Xe.ae(_r),Xe.K(_r,_r,[1,-1,1]),Xe.J(_r,_r,[0,0,-this.cameraToCenterDistance]),Xe.b7(_r,_r,this._pitch),Xe.ad(_r,_r,this.angle),Xe.J(_r,_r,[-Wt,-fr,0]),this.mercatorMatrix=Xe.K([],_r,[this.worldSize,this.worldSize,this.worldSize]),Xe.K(_r,_r,[1,1,this._pixelPerMeter]),this.pixelMatrix=Xe.L(new Float64Array(16),this.labelPlaneMatrix,_r),Xe.J(_r,_r,[0,0,-this.elevation]),this.modelViewProjectionMatrix=_r,this.invModelViewProjectionMatrix=Xe.as([],_r),this.fogMatrix=new Float64Array(16),Xe.b6(this.fogMatrix,this._fov,this.width/this.height,wr,this.farZ),this.fogMatrix[8]=2*-u.x/this.width,this.fogMatrix[9]=2*u.y/this.height,Xe.K(this.fogMatrix,this.fogMatrix,[1,-1,1]),Xe.J(this.fogMatrix,this.fogMatrix,[0,0,-this.cameraToCenterDistance]),Xe.b7(this.fogMatrix,this.fogMatrix,this._pitch),Xe.ad(this.fogMatrix,this.fogMatrix,this.angle),Xe.J(this.fogMatrix,this.fogMatrix,[-Wt,-fr,0]),Xe.K(this.fogMatrix,this.fogMatrix,[1,1,this._pixelPerMeter]),Xe.J(this.fogMatrix,this.fogMatrix,[0,0,-this.elevation]),this.pixelMatrix3D=Xe.L(new Float64Array(16),this.labelPlaneMatrix,_r);const go=this.width%2/2,xo=this.height%2/2,ko=Math.cos(this.angle),Co=Math.sin(this.angle),Io=Wt-Math.round(Wt)+ko*go+Co*xo,zo=fr-Math.round(fr)+ko*xo+Co*go,Bo=new Float64Array(_r);if(Xe.J(Bo,Bo,[Io>.5?Io-1:Io,zo>.5?zo-1:zo,0]),this.alignedModelViewProjectionMatrix=Bo,_r=Xe.as(new Float64Array(16),this.pixelMatrix),!_r)throw new Error("failed to invert matrix");this.pixelMatrixInverse=_r,this._posMatrixCache={},this._alignedPosMatrixCache={},this._fogMatrixCache={}}maxPitchScaleFactor(){if(!this.pixelMatrixInverse)return 1;const u=this.pointCoordinate(new Xe.P(0,0)),Wt=[u.x*this.worldSize,u.y*this.worldSize,0,1];return Xe.af(Wt,Wt,this.pixelMatrix)[3]/this.cameraToCenterDistance}getCameraPoint(){const u=Math.tan(this._pitch)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new Xe.P(0,u))}getCameraQueryGeometry(u){const Wt=this.getCameraPoint();if(1===u.length)return[u[0],Wt];{let fr=Wt.x,_r=Wt.y,wr=Wt.x,Ar=Wt.y;for(const Xe of u)fr=Math.min(fr,Xe.x),_r=Math.min(_r,Xe.y),wr=Math.max(wr,Xe.x),Ar=Math.max(Ar,Xe.y);return[new Xe.P(fr,_r),new Xe.P(wr,_r),new Xe.P(wr,Ar),new Xe.P(fr,Ar),new Xe.P(fr,_r)]}}lngLatToCameraDepth(u,Wt){const fr=this.locationCoordinate(u),_r=[fr.x*this.worldSize,fr.y*this.worldSize,Wt,1];return Xe.af(_r,_r,this.modelViewProjectionMatrix),_r[2]/_r[3]}}function Ia(u,Xe){let Wt,fr=!1,_r=null,wr=null;const r=()=>{_r=null,fr&&(u.apply(wr,Wt),_r=setTimeout(r,Xe),fr=!1)};return(...u)=>(fr=!0,wr=this,Wt=u,_r||r(),_r)}class Ea{constructor(u){this._getCurrentHash=()=>{const u=window.location.hash.replace("#","");if(this._hashName){let Xe;return u.split("&").map((u=>u.split("="))).forEach((u=>{u[0]===this._hashName&&(Xe=u)})),(Xe&&Xe[1]||"").split("/")}return u.split("/")},this._onHashChange=()=>{const u=this._getCurrentHash();if(u.length>=3&&!u.some((u=>isNaN(u)))){const Xe=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(u[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+u[2],+u[1]],zoom:+u[0],bearing:Xe,pitch:+(u[4]||0)}),!0}return!1},this._updateHashUnthrottled=()=>{const u=window.location.href.replace(/(#.*)?$/,this.getHashString());window.history.replaceState(window.history.state,null,u)},this._removeHash=()=>{const u=this._getCurrentHash();if(0===u.length)return;const Xe=u.join("/");let Wt=Xe;Wt.split("&").length>0&&(Wt=Wt.split("&")[0]),this._hashName&&(Wt=`${this._hashName}=${Xe}`);let fr=window.location.hash.replace(Wt,"");fr.startsWith("#&")?fr=fr.slice(0,1)+fr.slice(2):"#"===fr&&(fr="");let _r=window.location.href.replace(/(#.+)?$/,fr);_r=_r.replace("&&","&"),window.history.replaceState(window.history.state,null,_r)},this._updateHash=Ia(this._updateHashUnthrottled,300),this._hashName=u&&encodeURIComponent(u)}addTo(u){return this._map=u,addEventListener("hashchange",this._onHashChange,!1),this._map.on("moveend",this._updateHash),this}remove(){return removeEventListener("hashchange",this._onHashChange,!1),this._map.off("moveend",this._updateHash),clearTimeout(this._updateHash()),this._removeHash(),delete this._map,this}getHashString(u){const Xe=this._map.getCenter(),Wt=Math.round(100*this._map.getZoom())/100,fr=Math.ceil((Wt*Math.LN2+Math.log(512/360/.5))/Math.LN10),_r=Math.pow(10,fr),wr=Math.round(Xe.lng*_r)/_r,Ar=Math.round(Xe.lat*_r)/_r,Kr=this._map.getBearing(),In=this._map.getPitch();let no="";if(no+=u?`/${wr}/${Ar}/${Wt}`:`${Wt}/${Ar}/${wr}`,(Kr||In)&&(no+="/"+Math.round(10*Kr)/10),In&&(no+=`/${Math.round(In)}`),this._hashName){const u=this._hashName;let Xe=!1;const Wt=window.location.hash.slice(1).split("&").map((Wt=>{const fr=Wt.split("=")[0];return fr===u?(Xe=!0,`${fr}=${no}`):Wt})).filter((u=>u));return Xe||Wt.push(`${u}=${no}`),`#${Wt.join("&")}`}return`#${no}`}}const lc={linearity:.3,easing:Xe.b8(0,0,.3,1)},gc=Xe.e({deceleration:2500,maxSpeed:1400},lc),bc=Xe.e({deceleration:20,maxSpeed:1400},lc),eu=Xe.e({deceleration:1e3,maxSpeed:360},lc),tu=Xe.e({deceleration:1e3,maxSpeed:90},lc);class Ma{constructor(u){this._map=u,this.clear()}clear(){this._inertiaBuffer=[]}record(u){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:wr.now(),settings:u})}_drainInertiaBuffer(){const u=this._inertiaBuffer,Xe=wr.now();for(;u.length>0&&Xe-u[0].time>160;)u.shift()}_onMoveEnd(u){if(this._drainInertiaBuffer(),this._inertiaBuffer.length<2)return;const Wt={zoom:0,bearing:0,pitch:0,pan:new Xe.P(0,0),pinchAround:void 0,around:void 0};for(const{settings:u}of this._inertiaBuffer)Wt.zoom+=u.zoomDelta||0,Wt.bearing+=u.bearingDelta||0,Wt.pitch+=u.pitchDelta||0,u.panDelta&&Wt.pan._add(u.panDelta),u.around&&(Wt.around=u.around),u.pinchAround&&(Wt.pinchAround=u.pinchAround);const fr=this._inertiaBuffer[this._inertiaBuffer.length-1].time-this._inertiaBuffer[0].time,_r={};if(Wt.pan.mag()){const wr=Ra(Wt.pan.mag(),fr,Xe.e({},gc,u||{}));_r.offset=Wt.pan.mult(wr.amount/Wt.pan.mag()),_r.center=this._map.transform.center,Aa(_r,wr)}if(Wt.zoom){const u=Ra(Wt.zoom,fr,bc);_r.zoom=this._map.transform.zoom+u.amount,Aa(_r,u)}if(Wt.bearing){const u=Ra(Wt.bearing,fr,eu);_r.bearing=this._map.transform.bearing+Xe.ac(u.amount,-179,179),Aa(_r,u)}if(Wt.pitch){const u=Ra(Wt.pitch,fr,tu);_r.pitch=this._map.transform.pitch+u.amount,Aa(_r,u)}if(_r.zoom||_r.bearing){const u=void 0===Wt.pinchAround?Wt.around:Wt.pinchAround;_r.around=u?this._map.unproject(u):this._map.getCenter()}return this.clear(),Xe.e(_r,{noMoveStart:!0})}}function Aa(u,Xe){(!u.duration||u.duration<Xe.duration)&&(u.duration=Xe.duration,u.easing=Xe.easing)}function Ra(u,Wt,fr){const{maxSpeed:_r,linearity:wr,deceleration:Ar}=fr,Kr=Xe.ac(u*wr/(Wt/1e3),-_r,_r),In=Math.abs(Kr)/(Ar*wr);return{easing:fr.easing,duration:1e3*In,amount:Kr*(In/2)}}class ka extends Xe.k{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(u,Wt,fr,_r={}){const wr=r.mousePos(Wt.getCanvas(),fr),Ar=Wt.unproject(wr);super(u,Xe.e({point:wr,lngLat:Ar,originalEvent:fr},_r)),this._defaultPrevented=!1,this.target=Wt}}class La extends Xe.k{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(u,Wt,fr){const _r="touchend"===u?fr.changedTouches:fr.touches,wr=r.touchPos(Wt.getCanvasContainer(),_r),Ar=wr.map((u=>Wt.unproject(u))),Kr=wr.reduce(((u,Xe,Wt,fr)=>u.add(Xe.div(fr.length))),new Xe.P(0,0));super(u,{points:wr,point:Kr,lngLats:Ar,lngLat:Wt.unproject(Kr),originalEvent:fr}),this._defaultPrevented=!1}}class Fa extends Xe.k{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(u,Xe,Wt){super(u,{originalEvent:Wt}),this._defaultPrevented=!1}}class Ba{constructor(u,Xe){this._map=u,this._clickTolerance=Xe.clickTolerance}reset(){delete this._mousedownPos}wheel(u){return this._firePreventable(new Fa(u.type,this._map,u))}mousedown(u,Xe){return this._mousedownPos=Xe,this._firePreventable(new ka(u.type,this._map,u))}mouseup(u){this._map.fire(new ka(u.type,this._map,u))}click(u,Xe){this._mousedownPos&&this._mousedownPos.dist(Xe)>=this._clickTolerance||this._map.fire(new ka(u.type,this._map,u))}dblclick(u){return this._firePreventable(new ka(u.type,this._map,u))}mouseover(u){this._map.fire(new ka(u.type,this._map,u))}mouseout(u){this._map.fire(new ka(u.type,this._map,u))}touchstart(u){return this._firePreventable(new La(u.type,this._map,u))}touchmove(u){this._map.fire(new La(u.type,this._map,u))}touchend(u){this._map.fire(new La(u.type,this._map,u))}touchcancel(u){this._map.fire(new La(u.type,this._map,u))}_firePreventable(u){if(this._map.fire(u),u.defaultPrevented)return{}}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class Oa{constructor(u){this._map=u}reset(){this._delayContextMenu=!1,this._ignoreContextMenu=!0,delete this._contextMenuEvent}mousemove(u){this._map.fire(new ka(u.type,this._map,u))}mousedown(){this._delayContextMenu=!0,this._ignoreContextMenu=!1}mouseup(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new ka("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)}contextmenu(u){this._delayContextMenu?this._contextMenuEvent=u:this._ignoreContextMenu||this._map.fire(new ka(u.type,this._map,u)),this._map.listens("contextmenu")&&u.preventDefault()}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class Na{constructor(u){this._map=u}get transform(){return this._map._requestedCameraState||this._map.transform}get center(){return{lng:this.transform.center.lng,lat:this.transform.center.lat}}get zoom(){return this.transform.zoom}get pitch(){return this.transform.pitch}get bearing(){return this.transform.bearing}unproject(u){return this.transform.pointLocation(Xe.P.convert(u),this._map.terrain)}}class Ua{constructor(u,Xe){this._map=u,this._tr=new Na(u),this._el=u.getCanvasContainer(),this._container=u.getContainer(),this._clickTolerance=Xe.clickTolerance||1}isEnabled(){return!!this._enabled}isActive(){return!!this._active}enable(){this.isEnabled()||(this._enabled=!0)}disable(){this.isEnabled()&&(this._enabled=!1)}mousedown(u,Xe){this.isEnabled()&&u.shiftKey&&0===u.button&&(r.disableDrag(),this._startPos=this._lastPos=Xe,this._active=!0)}mousemoveWindow(u,Xe){if(!this._active)return;const Wt=Xe;if(this._lastPos.equals(Wt)||!this._box&&Wt.dist(this._startPos)<this._clickTolerance)return;const fr=this._startPos;this._lastPos=Wt,this._box||(this._box=r.create("div","maplibregl-boxzoom",this._container),this._container.classList.add("maplibregl-crosshair"),this._fireEvent("boxzoomstart",u));const _r=Math.min(fr.x,Wt.x),wr=Math.max(fr.x,Wt.x),Ar=Math.min(fr.y,Wt.y),Kr=Math.max(fr.y,Wt.y);r.setTransform(this._box,`translate(${_r}px,${Ar}px)`),this._box.style.width=wr-_r+"px",this._box.style.height=Kr-Ar+"px"}mouseupWindow(u,Wt){if(!this._active)return;if(0!==u.button)return;const fr=this._startPos,_r=Wt;if(this.reset(),r.suppressClick(),fr.x!==_r.x||fr.y!==_r.y)return this._map.fire(new Xe.k("boxzoomend",{originalEvent:u})),{cameraAnimation:u=>u.fitScreenCoordinates(fr,_r,this._tr.bearing,{linear:!0})};this._fireEvent("boxzoomcancel",u)}keydown(u){this._active&&27===u.keyCode&&(this.reset(),this._fireEvent("boxzoomcancel",u))}reset(){this._active=!1,this._container.classList.remove("maplibregl-crosshair"),this._box&&(r.remove(this._box),this._box=null),r.enableDrag(),delete this._startPos,delete this._lastPos}_fireEvent(u,Wt){return this._map.fire(new Xe.k(u,{originalEvent:Wt}))}}function ja(u,Xe){if(u.length!==Xe.length)throw new Error(`The number of touches and points are not equal - touches ${u.length}, points ${Xe.length}`);const Wt={};for(let fr=0;fr<u.length;fr++)Wt[u[fr].identifier]=Xe[fr];return Wt}class Za{constructor(u){this.reset(),this.numTouches=u.numTouches}reset(){delete this.centroid,delete this.startTime,delete this.touches,this.aborted=!1}touchstart(u,Wt,fr){(this.centroid||fr.length>this.numTouches)&&(this.aborted=!0),this.aborted||(void 0===this.startTime&&(this.startTime=u.timeStamp),fr.length===this.numTouches&&(this.centroid=function(u){const Wt=new Xe.P(0,0);for(const Xe of u)Wt._add(Xe);return Wt.div(u.length)}(Wt),this.touches=ja(fr,Wt)))}touchmove(u,Xe,Wt){if(this.aborted||!this.centroid)return;const fr=ja(Wt,Xe);for(const u in this.touches){const Xe=fr[u];(!Xe||Xe.dist(this.touches[u])>30)&&(this.aborted=!0)}}touchend(u,Xe,Wt){if((!this.centroid||u.timeStamp-this.startTime>500)&&(this.aborted=!0),0===Wt.length){const u=!this.aborted&&this.centroid;if(this.reset(),u)return u}}}class qa{constructor(u){this.singleTap=new Za(u),this.numTaps=u.numTaps,this.reset()}reset(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()}touchstart(u,Xe,Wt){this.singleTap.touchstart(u,Xe,Wt)}touchmove(u,Xe,Wt){this.singleTap.touchmove(u,Xe,Wt)}touchend(u,Xe,Wt){const fr=this.singleTap.touchend(u,Xe,Wt);if(fr){const Xe=u.timeStamp-this.lastTime<500,Wt=!this.lastTap||this.lastTap.dist(fr)<30;if(Xe&&Wt||this.reset(),this.count++,this.lastTime=u.timeStamp,this.lastTap=fr,this.count===this.numTaps)return this.reset(),fr}}}class Va{constructor(u){this._tr=new Na(u),this._zoomIn=new qa({numTouches:1,numTaps:2}),this._zoomOut=new qa({numTouches:2,numTaps:1}),this.reset()}reset(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()}touchstart(u,Xe,Wt){this._zoomIn.touchstart(u,Xe,Wt),this._zoomOut.touchstart(u,Xe,Wt)}touchmove(u,Xe,Wt){this._zoomIn.touchmove(u,Xe,Wt),this._zoomOut.touchmove(u,Xe,Wt)}touchend(u,Xe,Wt){const fr=this._zoomIn.touchend(u,Xe,Wt),_r=this._zoomOut.touchend(u,Xe,Wt),wr=this._tr;return fr?(this._active=!0,u.preventDefault(),setTimeout((()=>this.reset()),0),{cameraAnimation:Xe=>Xe.easeTo({duration:300,zoom:wr.zoom+1,around:wr.unproject(fr)},{originalEvent:u})}):_r?(this._active=!0,u.preventDefault(),setTimeout((()=>this.reset()),0),{cameraAnimation:Xe=>Xe.easeTo({duration:300,zoom:wr.zoom-1,around:wr.unproject(_r)},{originalEvent:u})}):void 0}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Ga{constructor(u){this._enabled=!!u.enable,this._moveStateManager=u.moveStateManager,this._clickTolerance=u.clickTolerance||1,this._moveFunction=u.move,this._activateOnStart=!!u.activateOnStart,u.assignEvents(this),this.reset()}reset(u){this._active=!1,this._moved=!1,delete this._lastPoint,this._moveStateManager.endMove(u)}_move(...u){const Xe=this._moveFunction(...u);if(Xe.bearingDelta||Xe.pitchDelta||Xe.around||Xe.panDelta)return this._active=!0,Xe}dragStart(u,Xe){this.isEnabled()&&!this._lastPoint&&this._moveStateManager.isValidStartEvent(u)&&(this._moveStateManager.startMove(u),this._lastPoint=Xe.length?Xe[0]:Xe,this._activateOnStart&&this._lastPoint&&(this._active=!0))}dragMove(u,Xe){if(!this.isEnabled())return;const Wt=this._lastPoint;if(!Wt)return;if(u.preventDefault(),!this._moveStateManager.isValidMoveEvent(u))return void this.reset(u);const fr=Xe.length?Xe[0]:Xe;return!this._moved&&fr.dist(Wt)<this._clickTolerance?void 0:(this._moved=!0,this._lastPoint=fr,this._move(Wt,fr))}dragEnd(u){this.isEnabled()&&this._lastPoint&&this._moveStateManager.isValidEndEvent(u)&&(this._moved&&r.suppressClick(),this.reset(u))}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}getClickTolerance(){return this._clickTolerance}}const nu={0:1,2:2};class Wa{constructor(u){this._correctEvent=u.checkCorrectEvent}startMove(u){const Xe=r.mouseButton(u);this._eventButton=Xe}endMove(u){delete this._eventButton}isValidStartEvent(u){return this._correctEvent(u)}isValidMoveEvent(u){return!function(u,Xe){const Wt=nu[Xe];return void 0===u.buttons||(u.buttons&Wt)!==Wt}(u,this._eventButton)}isValidEndEvent(u){return r.mouseButton(u)===this._eventButton}}class $a{constructor(){this._firstTouch=void 0}_isOneFingerTouch(u){return 1===u.targetTouches.length}_isSameTouchEvent(u){return u.targetTouches[0].identifier===this._firstTouch}startMove(u){this._firstTouch=u.targetTouches[0].identifier}endMove(u){delete this._firstTouch}isValidStartEvent(u){return this._isOneFingerTouch(u)}isValidMoveEvent(u){return this._isOneFingerTouch(u)&&this._isSameTouchEvent(u)}isValidEndEvent(u){return this._isOneFingerTouch(u)&&this._isSameTouchEvent(u)}}const Xa=u=>{u.mousedown=u.dragStart,u.mousemoveWindow=u.dragMove,u.mouseup=u.dragEnd,u.contextmenu=u=>{u.preventDefault()}},Ka=({enable:u,clickTolerance:Xe,bearingDegreesPerPixelMoved:Wt=.8})=>{const fr=new Wa({checkCorrectEvent:u=>0===r.mouseButton(u)&&u.ctrlKey||2===r.mouseButton(u)});return new Ga({clickTolerance:Xe,move:(u,Xe)=>({bearingDelta:(Xe.x-u.x)*Wt}),moveStateManager:fr,enable:u,assignEvents:Xa})},Ja=({enable:u,clickTolerance:Xe,pitchDegreesPerPixelMoved:Wt=-.5})=>{const fr=new Wa({checkCorrectEvent:u=>0===r.mouseButton(u)&&u.ctrlKey||2===r.mouseButton(u)});return new Ga({clickTolerance:Xe,move:(u,Xe)=>({pitchDelta:(Xe.y-u.y)*Wt}),moveStateManager:fr,enable:u,assignEvents:Xa})};class Ya{constructor(u,Xe){this._clickTolerance=u.clickTolerance||1,this._map=Xe,this.reset()}reset(){this._active=!1,this._touches={},this._sum=new Xe.P(0,0)}_shouldBePrevented(u){return u<(this._map.cooperativeGestures.isEnabled()?2:1)}touchstart(u,Xe,Wt){return this._calculateTransform(u,Xe,Wt)}touchmove(u,Xe,Wt){if(this._active){if(!this._shouldBePrevented(Wt.length))return u.preventDefault(),this._calculateTransform(u,Xe,Wt);this._map.cooperativeGestures.notifyGestureBlocked("touch_pan",u)}}touchend(u,Xe,Wt){this._calculateTransform(u,Xe,Wt),this._active&&this._shouldBePrevented(Wt.length)&&this.reset()}touchcancel(){this.reset()}_calculateTransform(u,Wt,fr){fr.length>0&&(this._active=!0);const _r=ja(fr,Wt),wr=new Xe.P(0,0),Ar=new Xe.P(0,0);let Kr=0;for(const u in _r){const Xe=_r[u],Wt=this._touches[u];Wt&&(wr._add(Xe),Ar._add(Xe.sub(Wt)),Kr++,_r[u]=Xe)}if(this._touches=_r,this._shouldBePrevented(Kr)||!Ar.mag())return;const In=Ar.div(Kr);return this._sum._add(In),this._sum.mag()<this._clickTolerance?void 0:{around:wr.div(Kr),panDelta:In}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Qa{constructor(){this.reset()}reset(){this._active=!1,delete this._firstTwoTouches}touchstart(u,Xe,Wt){this._firstTwoTouches||Wt.length<2||(this._firstTwoTouches=[Wt[0].identifier,Wt[1].identifier],this._start([Xe[0],Xe[1]]))}touchmove(u,Xe,Wt){if(!this._firstTwoTouches)return;u.preventDefault();const[fr,_r]=this._firstTwoTouches,wr=ts(Wt,Xe,fr),Ar=ts(Wt,Xe,_r);if(!wr||!Ar)return;const Kr=this._aroundCenter?null:wr.add(Ar).div(2);return this._move([wr,Ar],Kr,u)}touchend(u,Xe,Wt){if(!this._firstTwoTouches)return;const[fr,_r]=this._firstTwoTouches,wr=ts(Wt,Xe,fr),Ar=ts(Wt,Xe,_r);wr&&Ar||(this._active&&r.suppressClick(),this.reset())}touchcancel(){this.reset()}enable(u){this._enabled=!0,this._aroundCenter=!!u&&"center"===u.around}disable(){this._enabled=!1,this.reset()}isEnabled(){return!!this._enabled}isActive(){return!!this._active}}function ts(u,Xe,Wt){for(let fr=0;fr<u.length;fr++)if(u[fr].identifier===Wt)return Xe[fr]}function es(u,Xe){return Math.log(u/Xe)/Math.LN2}class is extends Qa{reset(){super.reset(),delete this._distance,delete this._startDistance}_start(u){this._startDistance=this._distance=u[0].dist(u[1])}_move(u,Xe){const Wt=this._distance;if(this._distance=u[0].dist(u[1]),this._active||!(Math.abs(es(this._distance,this._startDistance))<.1))return this._active=!0,{zoomDelta:es(this._distance,Wt),pinchAround:Xe}}}function as(u,Xe){return 180*u.angleWith(Xe)/Math.PI}class ss extends Qa{reset(){super.reset(),delete this._minDiameter,delete this._startVector,delete this._vector}_start(u){this._startVector=this._vector=u[0].sub(u[1]),this._minDiameter=u[0].dist(u[1])}_move(u,Xe,Wt){const fr=this._vector;if(this._vector=u[0].sub(u[1]),this._active||!this._isBelowThreshold(this._vector))return this._active=!0,{bearingDelta:as(this._vector,fr),pinchAround:Xe}}_isBelowThreshold(u){this._minDiameter=Math.min(this._minDiameter,u.mag());const Xe=25/(Math.PI*this._minDiameter)*360,Wt=as(u,this._startVector);return Math.abs(Wt)<Xe}}function os(u){return Math.abs(u.y)>Math.abs(u.x)}class rs extends Qa{constructor(u){super(),this._currentTouchCount=0,this._map=u}reset(){super.reset(),this._valid=void 0,delete this._firstMove,delete this._lastPoints}touchstart(u,Xe,Wt){super.touchstart(u,Xe,Wt),this._currentTouchCount=Wt.length}_start(u){this._lastPoints=u,os(u[0].sub(u[1]))&&(this._valid=!1)}_move(u,Xe,Wt){if(this._map.cooperativeGestures.isEnabled()&&this._currentTouchCount<3)return;const fr=u[0].sub(this._lastPoints[0]),_r=u[1].sub(this._lastPoints[1]);return this._valid=this.gestureBeginsVertically(fr,_r,Wt.timeStamp),this._valid?(this._lastPoints=u,this._active=!0,{pitchDelta:(fr.y+_r.y)/2*-.5}):void 0}gestureBeginsVertically(u,Xe,Wt){if(void 0!==this._valid)return this._valid;const fr=u.mag()>=2,_r=Xe.mag()>=2;if(!fr&&!_r)return;if(!fr||!_r)return void 0===this._firstMove&&(this._firstMove=Wt),Wt-this._firstMove<100&&void 0;const wr=u.y>0==Xe.y>0;return os(u)&&os(Xe)&&wr}}const iu={panStep:100,bearingStep:15,pitchStep:10};class ls{constructor(u){this._tr=new Na(u);const Xe=iu;this._panStep=Xe.panStep,this._bearingStep=Xe.bearingStep,this._pitchStep=Xe.pitchStep,this._rotationDisabled=!1}reset(){this._active=!1}keydown(u){if(u.altKey||u.ctrlKey||u.metaKey)return;let Xe=0,Wt=0,fr=0,_r=0,wr=0;switch(u.keyCode){case 61:case 107:case 171:case 187:Xe=1;break;case 189:case 109:case 173:Xe=-1;break;case 37:u.shiftKey?Wt=-1:(u.preventDefault(),_r=-1);break;case 39:u.shiftKey?Wt=1:(u.preventDefault(),_r=1);break;case 38:u.shiftKey?fr=1:(u.preventDefault(),wr=-1);break;case 40:u.shiftKey?fr=-1:(u.preventDefault(),wr=1);break;default:return}return this._rotationDisabled&&(Wt=0,fr=0),{cameraAnimation:Ar=>{const Kr=this._tr;Ar.easeTo({duration:300,easeId:"keyboardHandler",easing:hs,zoom:Xe?Math.round(Kr.zoom)+Xe*(u.shiftKey?2:1):Kr.zoom,bearing:Kr.bearing+Wt*this._bearingStep,pitch:Kr.pitch+fr*this._pitchStep,offset:[-_r*this._panStep,-wr*this._panStep],center:Kr.center},{originalEvent:u})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}disableRotation(){this._rotationDisabled=!0}enableRotation(){this._rotationDisabled=!1}}function hs(u){return u*(2-u)}const su=4.000244140625;class us{constructor(u,Xe){this._onTimeout=u=>{this._type="wheel",this._delta-=this._lastValue,this._active||this._start(u)},this._map=u,this._tr=new Na(u),this._triggerRenderFrame=Xe,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=.0022222222222222222}setZoomRate(u){this._defaultZoomRate=u}setWheelZoomRate(u){this._wheelZoomRate=u}isEnabled(){return!!this._enabled}isActive(){return!!this._active||void 0!==this._finishTimeout}isZooming(){return!!this._zooming}enable(u){this.isEnabled()||(this._enabled=!0,this._aroundCenter=!!u&&"center"===u.around)}disable(){this.isEnabled()&&(this._enabled=!1)}_shouldBePrevented(u){return!!this._map.cooperativeGestures.isEnabled()&&!(u.ctrlKey||this._map.cooperativeGestures.isBypassed(u))}wheel(u){if(!this.isEnabled())return;if(this._shouldBePrevented(u))return void this._map.cooperativeGestures.notifyGestureBlocked("wheel_zoom",u);let Xe=u.deltaMode===WheelEvent.DOM_DELTA_LINE?40*u.deltaY:u.deltaY;const Wt=wr.now(),fr=Wt-(this._lastWheelEventTime||0);this._lastWheelEventTime=Wt,0!==Xe&&Xe%su==0?this._type="wheel":0!==Xe&&Math.abs(Xe)<4?this._type="trackpad":fr>400?(this._type=null,this._lastValue=Xe,this._timeout=setTimeout(this._onTimeout,40,u)):this._type||(this._type=Math.abs(fr*Xe)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,Xe+=this._lastValue)),u.shiftKey&&Xe&&(Xe/=4),this._type&&(this._lastWheelEvent=u,this._delta-=Xe,this._active||this._start(u)),u.preventDefault()}_start(u){if(!this._delta)return;this._frameId&&(this._frameId=null),this._active=!0,this.isZooming()||(this._zooming=!0),this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout);const Wt=r.mousePos(this._map.getCanvas(),u),fr=this._tr;this._around=Wt.y>fr.transform.height/2-fr.transform.getHorizon()?Xe.N.convert(this._aroundCenter?fr.center:fr.unproject(Wt)):Xe.N.convert(fr.center),this._aroundPoint=fr.transform.locationPoint(this._around),this._frameId||(this._frameId=!0,this._triggerRenderFrame())}renderFrame(){if(!this._frameId)return;if(this._frameId=null,!this.isActive())return;const u=this._tr.transform;if(0!==this._delta){const Xe="wheel"===this._type&&Math.abs(this._delta)>su?this._wheelZoomRate:this._defaultZoomRate;let Wt=2/(1+Math.exp(-Math.abs(this._delta*Xe)));this._delta<0&&0!==Wt&&(Wt=1/Wt);const fr="number"==typeof this._targetZoom?u.zoomScale(this._targetZoom):u.scale;this._targetZoom=Math.min(u.maxZoom,Math.max(u.minZoom,u.scaleZoom(fr*Wt))),"wheel"===this._type&&(this._startZoom=u.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}const Wt="number"==typeof this._targetZoom?this._targetZoom:u.zoom,fr=this._startZoom,_r=this._easing;let Ar,Kr=!1;const In=wr.now()-this._lastWheelEventTime;if("wheel"===this._type&&fr&&_r&&In){const u=Math.min(In/200,1),wr=_r(u);Ar=Xe.y.number(fr,Wt,wr),u<1?this._frameId||(this._frameId=!0):Kr=!0}else Ar=Wt,Kr=!0;return this._active=!0,Kr&&(this._active=!1,this._finishTimeout=setTimeout((()=>{this._zooming=!1,this._triggerRenderFrame(),delete this._targetZoom,delete this._finishTimeout}),200)),{noInertia:!0,needsRenderFrame:!Kr,zoomDelta:Ar-u.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}_smoothOutEasing(u){let Wt=Xe.b9;if(this._prevEase){const u=this._prevEase,fr=(wr.now()-u.start)/u.duration,_r=u.easing(fr+.01)-u.easing(fr),Ar=.27/Math.sqrt(_r*_r+1e-4)*.01,Kr=Math.sqrt(.0729-Ar*Ar);Wt=Xe.b8(Ar,Kr,.25,1)}return this._prevEase={start:wr.now(),duration:u,easing:Wt},Wt}reset(){this._active=!1,this._zooming=!1,delete this._targetZoom,this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout)}}class ds{constructor(u,Xe){this._clickZoom=u,this._tapZoom=Xe}enable(){this._clickZoom.enable(),this._tapZoom.enable()}disable(){this._clickZoom.disable(),this._tapZoom.disable()}isEnabled(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()}isActive(){return this._clickZoom.isActive()||this._tapZoom.isActive()}}class _s{constructor(u){this._tr=new Na(u),this.reset()}reset(){this._active=!1}dblclick(u,Xe){return u.preventDefault(),{cameraAnimation:Wt=>{Wt.easeTo({duration:300,zoom:this._tr.zoom+(u.shiftKey?-1:1),around:this._tr.unproject(Xe)},{originalEvent:u})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class ps{constructor(){this._tap=new qa({numTouches:1,numTaps:1}),this.reset()}reset(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,delete this._tapPoint,this._tap.reset()}touchstart(u,Xe,Wt){if(!this._swipePoint)if(this._tapTime){const fr=Xe[0],_r=u.timeStamp-this._tapTime<500,wr=this._tapPoint.dist(fr)<30;_r&&wr?Wt.length>0&&(this._swipePoint=fr,this._swipeTouch=Wt[0].identifier):this.reset()}else this._tap.touchstart(u,Xe,Wt)}touchmove(u,Xe,Wt){if(this._tapTime){if(this._swipePoint){if(Wt[0].identifier!==this._swipeTouch)return;const fr=Xe[0],_r=fr.y-this._swipePoint.y;return this._swipePoint=fr,u.preventDefault(),this._active=!0,{zoomDelta:_r/128}}}else this._tap.touchmove(u,Xe,Wt)}touchend(u,Xe,Wt){if(this._tapTime)this._swipePoint&&0===Wt.length&&this.reset();else{const fr=this._tap.touchend(u,Xe,Wt);fr&&(this._tapTime=u.timeStamp,this._tapPoint=fr)}}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class ms{constructor(u,Xe,Wt){this._el=u,this._mousePan=Xe,this._touchPan=Wt}enable(u){this._inertiaOptions=u||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("maplibregl-touch-drag-pan")}disable(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("maplibregl-touch-drag-pan")}isEnabled(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()}isActive(){return this._mousePan.isActive()||this._touchPan.isActive()}}class fs{constructor(u,Xe,Wt){this._pitchWithRotate=u.pitchWithRotate,this._mouseRotate=Xe,this._mousePitch=Wt}enable(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable()}disable(){this._mouseRotate.disable(),this._mousePitch.disable()}isEnabled(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())}isActive(){return this._mouseRotate.isActive()||this._mousePitch.isActive()}}class gs{constructor(u,Xe,Wt,fr){this._el=u,this._touchZoom=Xe,this._touchRotate=Wt,this._tapDragZoom=fr,this._rotationDisabled=!1,this._enabled=!0}enable(u){this._touchZoom.enable(u),this._rotationDisabled||this._touchRotate.enable(u),this._tapDragZoom.enable(),this._el.classList.add("maplibregl-touch-zoom-rotate")}disable(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("maplibregl-touch-zoom-rotate")}isEnabled(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()}isActive(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()}disableRotation(){this._rotationDisabled=!0,this._touchRotate.disable()}enableRotation(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()}}class vs{constructor(u,Xe){this._bypassKey=-1!==navigator.userAgent.indexOf("Mac")?"metaKey":"ctrlKey",this._map=u,this._options=Xe,this._enabled=!1}isActive(){return!1}reset(){}_setupUI(){if(this._container)return;const u=this._map.getCanvasContainer();u.classList.add("maplibregl-cooperative-gestures"),this._container=r.create("div","maplibregl-cooperative-gesture-screen",u);let Xe=this._map._getUIString("CooperativeGesturesHandler.WindowsHelpText");"metaKey"===this._bypassKey&&(Xe=this._map._getUIString("CooperativeGesturesHandler.MacHelpText"));const Wt=this._map._getUIString("CooperativeGesturesHandler.MobileHelpText"),fr=document.createElement("div");fr.className="maplibregl-desktop-message",fr.textContent=Xe,this._container.appendChild(fr);const _r=document.createElement("div");_r.className="maplibregl-mobile-message",_r.textContent=Wt,this._container.appendChild(_r),this._container.setAttribute("aria-hidden","true")}_destroyUI(){this._container&&(r.remove(this._container),this._map.getCanvasContainer().classList.remove("maplibregl-cooperative-gestures")),delete this._container}enable(){this._setupUI(),this._enabled=!0}disable(){this._enabled=!1,this._destroyUI()}isEnabled(){return this._enabled}isBypassed(u){return u[this._bypassKey]}notifyGestureBlocked(u,Wt){this._enabled&&(this._map.fire(new Xe.k("cooperativegestureprevented",{gestureType:u,originalEvent:Wt})),this._container.classList.add("maplibregl-show"),setTimeout((()=>{this._container.classList.remove("maplibregl-show")}),100))}}const xs=u=>u.zoom||u.drag||u.pitch||u.rotate;class ys extends Xe.k{}function bs(u){return u.panDelta&&u.panDelta.mag()||u.zoomDelta||u.bearingDelta||u.pitchDelta}class ws{constructor(u,Xe){this.handleWindowEvent=u=>{this.handleEvent(u,`${u.type}Window`)},this.handleEvent=(u,Xe)=>{if("blur"===u.type)return void this.stop(!0);this._updatingCamera=!0;const Wt="renderFrame"===u.type?void 0:u,fr={needsRenderFrame:!1},_r={},wr={},Ar=u.touches,Kr=Ar?this._getMapTouches(Ar):void 0,In=Kr?r.touchPos(this._map.getCanvas(),Kr):r.mousePos(this._map.getCanvas(),u);for(const{handlerName:Ar,handler:no,allowed:io}of this._handlers){if(!no.isEnabled())continue;let oo;this._blockedByActive(wr,io,Ar)?no.reset():no[Xe||u.type]&&(oo=no[Xe||u.type](u,In,Kr),this.mergeHandlerResult(fr,_r,oo,Ar,Wt),oo&&oo.needsRenderFrame&&this._triggerRenderFrame()),(oo||no.isActive())&&(wr[Ar]=no)}const no={};for(const u in this._previousActiveHandlers)wr[u]||(no[u]=Wt);this._previousActiveHandlers=wr,(Object.keys(no).length||bs(fr))&&(this._changes.push([fr,_r,no]),this._triggerRenderFrame()),(Object.keys(wr).length||bs(fr))&&this._map._stop(!0),this._updatingCamera=!1;const{cameraAnimation:io}=fr;io&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],io(this._map))},this._map=u,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new Ma(u),this._bearingSnap=Xe.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(Xe);const Wt=this._el;this._listeners=[[Wt,"touchstart",{passive:!0}],[Wt,"touchmove",{passive:!1}],[Wt,"touchend",void 0],[Wt,"touchcancel",void 0],[Wt,"mousedown",void 0],[Wt,"mousemove",void 0],[Wt,"mouseup",void 0],[document,"mousemove",{capture:!0}],[document,"mouseup",void 0],[Wt,"mouseover",void 0],[Wt,"mouseout",void 0],[Wt,"dblclick",void 0],[Wt,"click",void 0],[Wt,"keydown",{capture:!1}],[Wt,"keyup",void 0],[Wt,"wheel",{passive:!1}],[Wt,"contextmenu",void 0],[window,"blur",void 0]];for(const[u,Xe,Wt]of this._listeners)r.addEventListener(u,Xe,u===document?this.handleWindowEvent:this.handleEvent,Wt)}destroy(){for(const[u,Xe,Wt]of this._listeners)r.removeEventListener(u,Xe,u===document?this.handleWindowEvent:this.handleEvent,Wt)}_addDefaultHandlers(u){const Xe=this._map,Wt=Xe.getCanvasContainer();this._add("mapEvent",new Ba(Xe,u));const fr=Xe.boxZoom=new Ua(Xe,u);this._add("boxZoom",fr),u.interactive&&u.boxZoom&&fr.enable();const _r=Xe.cooperativeGestures=new vs(Xe,u.cooperativeGestures);this._add("cooperativeGestures",_r),u.cooperativeGestures&&_r.enable();const wr=new Va(Xe),Ar=new _s(Xe);Xe.doubleClickZoom=new ds(Ar,wr),this._add("tapZoom",wr),this._add("clickZoom",Ar),u.interactive&&u.doubleClickZoom&&Xe.doubleClickZoom.enable();const Kr=new ps;this._add("tapDragZoom",Kr);const In=Xe.touchPitch=new rs(Xe);this._add("touchPitch",In),u.interactive&&u.touchPitch&&Xe.touchPitch.enable(u.touchPitch);const no=Ka(u),io=Ja(u);Xe.dragRotate=new fs(u,no,io),this._add("mouseRotate",no,["mousePitch"]),this._add("mousePitch",io,["mouseRotate"]),u.interactive&&u.dragRotate&&Xe.dragRotate.enable();const oo=(({enable:u,clickTolerance:Xe})=>{const Wt=new Wa({checkCorrectEvent:u=>0===r.mouseButton(u)&&!u.ctrlKey});return new Ga({clickTolerance:Xe,move:(u,Xe)=>({around:Xe,panDelta:Xe.sub(u)}),activateOnStart:!0,moveStateManager:Wt,enable:u,assignEvents:Xa})})(u),ao=new Ya(u,Xe);Xe.dragPan=new ms(Wt,oo,ao),this._add("mousePan",oo),this._add("touchPan",ao,["touchZoom","touchRotate"]),u.interactive&&u.dragPan&&Xe.dragPan.enable(u.dragPan);const so=new ss,co=new is;Xe.touchZoomRotate=new gs(Wt,co,so,Kr),this._add("touchRotate",so,["touchPan","touchZoom"]),this._add("touchZoom",co,["touchPan","touchRotate"]),u.interactive&&u.touchZoomRotate&&Xe.touchZoomRotate.enable(u.touchZoomRotate);const ho=Xe.scrollZoom=new us(Xe,(()=>this._triggerRenderFrame()));this._add("scrollZoom",ho,["mousePan"]),u.interactive&&u.scrollZoom&&Xe.scrollZoom.enable(u.scrollZoom);const go=Xe.keyboard=new ls(Xe);this._add("keyboard",go),u.interactive&&u.keyboard&&Xe.keyboard.enable(),this._add("blockableMapEvent",new Oa(Xe))}_add(u,Xe,Wt){this._handlers.push({handlerName:u,handler:Xe,allowed:Wt}),this._handlersById[u]=Xe}stop(u){if(!this._updatingCamera){for(const{handler:u}of this._handlers)u.reset();this._inertia.clear(),this._fireEvents({},{},u),this._changes=[]}}isActive(){for(const{handler:u}of this._handlers)if(u.isActive())return!0;return!1}isZooming(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()}isRotating(){return!!this._eventsInProgress.rotate}isMoving(){return Boolean(xs(this._eventsInProgress))||this.isZooming()}_blockedByActive(u,Xe,Wt){for(const fr in u)if(fr!==Wt&&(!Xe||Xe.indexOf(fr)<0))return!0;return!1}_getMapTouches(u){const Xe=[];for(const Wt of u)this._el.contains(Wt.target)&&Xe.push(Wt);return Xe}mergeHandlerResult(u,Wt,fr,_r,wr){if(!fr)return;Xe.e(u,fr);const Ar={handlerName:_r,originalEvent:fr.originalEvent||wr};void 0!==fr.zoomDelta&&(Wt.zoom=Ar),void 0!==fr.panDelta&&(Wt.drag=Ar),void 0!==fr.pitchDelta&&(Wt.pitch=Ar),void 0!==fr.bearingDelta&&(Wt.rotate=Ar)}_applyChanges(){const u={},Wt={},fr={};for(const[_r,wr,Ar]of this._changes)_r.panDelta&&(u.panDelta=(u.panDelta||new Xe.P(0,0))._add(_r.panDelta)),_r.zoomDelta&&(u.zoomDelta=(u.zoomDelta||0)+_r.zoomDelta),_r.bearingDelta&&(u.bearingDelta=(u.bearingDelta||0)+_r.bearingDelta),_r.pitchDelta&&(u.pitchDelta=(u.pitchDelta||0)+_r.pitchDelta),void 0!==_r.around&&(u.around=_r.around),void 0!==_r.pinchAround&&(u.pinchAround=_r.pinchAround),_r.noInertia&&(u.noInertia=_r.noInertia),Xe.e(Wt,wr),Xe.e(fr,Ar);this._updateMapTransform(u,Wt,fr),this._changes=[]}_updateMapTransform(u,Xe,Wt){const fr=this._map,_r=fr._getTransformForUpdate(),wr=fr.terrain;if(!(bs(u)||wr&&this._terrainMovement))return this._fireEvents(Xe,Wt,!0);let{panDelta:Ar,zoomDelta:Kr,bearingDelta:In,pitchDelta:no,around:io,pinchAround:oo}=u;void 0!==oo&&(io=oo),fr._stop(!0),io=io||fr.transform.centerPoint;const ao=_r.pointLocation(Ar?io.sub(Ar):io);In&&(_r.bearing+=In),no&&(_r.pitch+=no),Kr&&(_r.zoom+=Kr),wr?this._terrainMovement||!Xe.drag&&!Xe.zoom?Xe.drag&&this._terrainMovement?_r.center=_r.pointLocation(_r.centerPoint.sub(Ar)):_r.setLocationAtPoint(ao,io):(this._terrainMovement=!0,this._map._elevationFreeze=!0,_r.setLocationAtPoint(ao,io)):_r.setLocationAtPoint(ao,io),fr._applyUpdatedTransform(_r),this._map._update(),u.noInertia||this._inertia.record(u),this._fireEvents(Xe,Wt,!0)}_fireEvents(u,Wt,fr){const _r=xs(this._eventsInProgress),Ar=xs(u),Kr={};for(const Xe in u){const{originalEvent:Wt}=u[Xe];this._eventsInProgress[Xe]||(Kr[`${Xe}start`]=Wt),this._eventsInProgress[Xe]=u[Xe]}!_r&&Ar&&this._fireEvent("movestart",Ar.originalEvent);for(const u in Kr)this._fireEvent(u,Kr[u]);Ar&&this._fireEvent("move",Ar.originalEvent);for(const Xe in u){const{originalEvent:Wt}=u[Xe];this._fireEvent(Xe,Wt)}const In={};let no;for(const u in this._eventsInProgress){const{handlerName:Xe,originalEvent:fr}=this._eventsInProgress[u];this._handlersById[Xe].isActive()||(delete this._eventsInProgress[u],no=Wt[Xe]||fr,In[`${u}end`]=no)}for(const u in In)this._fireEvent(u,In[u]);const io=xs(this._eventsInProgress),oo=(_r||Ar)&&!io;if(oo&&this._terrainMovement){this._map._elevationFreeze=!1,this._terrainMovement=!1;const u=this._map._getTransformForUpdate();u.recalculateZoom(this._map.terrain),this._map._applyUpdatedTransform(u)}if(fr&&oo){this._updatingCamera=!0;const u=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),i=u=>0!==u&&-this._bearingSnap<u&&u<this._bearingSnap;!u||!u.essential&&wr.prefersReducedMotion?(this._map.fire(new Xe.k("moveend",{originalEvent:no})),i(this._map.getBearing())&&this._map.resetNorth()):(i(u.bearing||this._map.getBearing())&&(u.bearing=0),u.freezeElevation=!0,this._map.easeTo(u,{originalEvent:no})),this._updatingCamera=!1}}_fireEvent(u,Wt){this._map.fire(new Xe.k(u,Wt?{originalEvent:Wt}:{}))}_requestFrame(){return this._map.triggerRepaint(),this._map._renderTaskQueue.add((u=>{delete this._frameId,this.handleEvent(new ys("renderFrame",{timeStamp:u})),this._applyChanges()}))}_triggerRenderFrame(){void 0===this._frameId&&(this._frameId=this._requestFrame())}}class Ts extends Xe.E{constructor(u,Xe){super(),this._renderFrameCallback=()=>{const u=Math.min((wr.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(u)),u<1&&this._easeFrameId?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},this._moving=!1,this._zooming=!1,this.transform=u,this._bearingSnap=Xe.bearingSnap,this.on("moveend",(()=>{delete this._requestedCameraState}))}getCenter(){return new Xe.N(this.transform.center.lng,this.transform.center.lat)}setCenter(u,Xe){return this.jumpTo({center:u},Xe)}panBy(u,Wt,fr){return u=Xe.P.convert(u).mult(-1),this.panTo(this.transform.center,Xe.e({offset:u},Wt),fr)}panTo(u,Wt,fr){return this.easeTo(Xe.e({center:u},Wt),fr)}getZoom(){return this.transform.zoom}setZoom(u,Xe){return this.jumpTo({zoom:u},Xe),this}zoomTo(u,Wt,fr){return this.easeTo(Xe.e({zoom:u},Wt),fr)}zoomIn(u,Xe){return this.zoomTo(this.getZoom()+1,u,Xe),this}zoomOut(u,Xe){return this.zoomTo(this.getZoom()-1,u,Xe),this}getBearing(){return this.transform.bearing}setBearing(u,Xe){return this.jumpTo({bearing:u},Xe),this}getPadding(){return this.transform.padding}setPadding(u,Xe){return this.jumpTo({padding:u},Xe),this}rotateTo(u,Wt,fr){return this.easeTo(Xe.e({bearing:u},Wt),fr)}resetNorth(u,Wt){return this.rotateTo(0,Xe.e({duration:1e3},u),Wt),this}resetNorthPitch(u,Wt){return this.easeTo(Xe.e({bearing:0,pitch:0,duration:1e3},u),Wt),this}snapToNorth(u,Xe){return Math.abs(this.getBearing())<this._bearingSnap?this.resetNorth(u,Xe):this}getPitch(){return this.transform.pitch}setPitch(u,Xe){return this.jumpTo({pitch:u},Xe),this}cameraForBounds(u,Xe){u=H.convert(u).adjustAntiMeridian();const Wt=Xe&&Xe.bearing||0;return this._cameraForBoxAndBearing(u.getNorthWest(),u.getSouthEast(),Wt,Xe)}_cameraForBoxAndBearing(u,Wt,fr,_r){const wr={top:0,bottom:0,right:0,left:0};if("number"==typeof(_r=Xe.e({padding:wr,offset:[0,0],maxZoom:this.transform.maxZoom},_r)).padding){const u=_r.padding;_r.padding={top:u,bottom:u,right:u,left:u}}_r.padding=Xe.e(wr,_r.padding);const Ar=this.transform,Kr=Ar.padding,In=new H(u,Wt),no=Ar.project(In.getNorthWest()),io=Ar.project(In.getNorthEast()),oo=Ar.project(In.getSouthEast()),ao=Ar.project(In.getSouthWest()),so=Xe.ba(-fr),co=no.rotate(so),ho=io.rotate(so),go=oo.rotate(so),xo=ao.rotate(so),ko=new Xe.P(Math.max(co.x,ho.x,xo.x,go.x),Math.max(co.y,ho.y,xo.y,go.y)),Co=new Xe.P(Math.min(co.x,ho.x,xo.x,go.x),Math.min(co.y,ho.y,xo.y,go.y)),Io=ko.sub(Co),zo=(Ar.width-(Kr.left+Kr.right+_r.padding.left+_r.padding.right))/Io.x,Bo=(Ar.height-(Kr.top+Kr.bottom+_r.padding.top+_r.padding.bottom))/Io.y;if(Bo<0||zo<0)return void Xe.w("Map cannot fit within canvas with the given bounds, padding, and/or offset.");const ca=Math.min(Ar.scaleZoom(Ar.scale*Math.min(zo,Bo)),_r.maxZoom),ua=Xe.P.convert(_r.offset),Da=new Xe.P((_r.padding.left-_r.padding.right)/2,(_r.padding.top-_r.padding.bottom)/2).rotate(Xe.ba(fr)),ns=ua.add(Da).mult(Ar.scale/Ar.zoomScale(ca));return{center:Ar.unproject(no.add(oo).div(2).sub(ns)),zoom:ca,bearing:fr}}fitBounds(u,Xe,Wt){return this._fitInternal(this.cameraForBounds(u,Xe),Xe,Wt)}fitScreenCoordinates(u,Wt,fr,_r,wr){return this._fitInternal(this._cameraForBoxAndBearing(this.transform.pointLocation(Xe.P.convert(u)),this.transform.pointLocation(Xe.P.convert(Wt)),fr,_r),_r,wr)}_fitInternal(u,Wt,fr){return u?(delete(Wt=Xe.e(u,Wt)).padding,Wt.linear?this.easeTo(Wt,fr):this.flyTo(Wt,fr)):this}jumpTo(u,Wt){this.stop();const fr=this._getTransformForUpdate();let _r=!1,wr=!1,Ar=!1;return"zoom"in u&&fr.zoom!==+u.zoom&&(_r=!0,fr.zoom=+u.zoom),void 0!==u.center&&(fr.center=Xe.N.convert(u.center)),"bearing"in u&&fr.bearing!==+u.bearing&&(wr=!0,fr.bearing=+u.bearing),"pitch"in u&&fr.pitch!==+u.pitch&&(Ar=!0,fr.pitch=+u.pitch),null==u.padding||fr.isPaddingEqual(u.padding)||(fr.padding=u.padding),this._applyUpdatedTransform(fr),this.fire(new Xe.k("movestart",Wt)).fire(new Xe.k("move",Wt)),_r&&this.fire(new Xe.k("zoomstart",Wt)).fire(new Xe.k("zoom",Wt)).fire(new Xe.k("zoomend",Wt)),wr&&this.fire(new Xe.k("rotatestart",Wt)).fire(new Xe.k("rotate",Wt)).fire(new Xe.k("rotateend",Wt)),Ar&&this.fire(new Xe.k("pitchstart",Wt)).fire(new Xe.k("pitch",Wt)).fire(new Xe.k("pitchend",Wt)),this.fire(new Xe.k("moveend",Wt))}calculateCameraOptionsFromTo(u,Wt,fr,_r=0){const wr=Xe.Z.fromLngLat(u,Wt),Ar=Xe.Z.fromLngLat(fr,_r),Kr=Ar.x-wr.x,In=Ar.y-wr.y,no=Ar.z-wr.z,io=Math.hypot(Kr,In,no);if(0===io)throw new Error("Can't calculate camera options with same From and To");const oo=Math.hypot(Kr,In),ao=this.transform.scaleZoom(this.transform.cameraToCenterDistance/io/this.transform.tileSize),so=180*Math.atan2(Kr,-In)/Math.PI;let co=180*Math.acos(oo/io)/Math.PI;return co=no<0?90-co:90+co,{center:Ar.toLngLat(),zoom:ao,pitch:co,bearing:so}}easeTo(u,Wt){var fr;this._stop(!1,u.easeId),(!1===(u=Xe.e({offset:[0,0],duration:500,easing:Xe.b9},u)).animate||!u.essential&&wr.prefersReducedMotion)&&(u.duration=0);const _r=this._getTransformForUpdate(),Ar=_r.zoom,Kr=_r.bearing,In=_r.pitch,no=_r.padding,io="bearing"in u?this._normalizeBearing(u.bearing,Kr):Kr,oo="pitch"in u?+u.pitch:In,ao="padding"in u?u.padding:_r.padding,so=Xe.P.convert(u.offset);let co=_r.centerPoint.add(so);const ho=_r.pointLocation(co),{center:go,zoom:xo}=_r.getConstrained(Xe.N.convert(u.center||ho),null!==(fr=u.zoom)&&void 0!==fr?fr:Ar);this._normalizeCenter(go,_r);const ko=_r.project(ho),Co=_r.project(go).sub(ko),Io=_r.zoomScale(xo-Ar);let zo,Bo;u.around&&(zo=Xe.N.convert(u.around),Bo=_r.locationPoint(zo));const ca={moving:this._moving,zooming:this._zooming,rotating:this._rotating,pitching:this._pitching};return this._zooming=this._zooming||xo!==Ar,this._rotating=this._rotating||Kr!==io,this._pitching=this._pitching||oo!==In,this._padding=!_r.isPaddingEqual(ao),this._easeId=u.easeId,this._prepareEase(Wt,u.noMoveStart,ca),this.terrain&&this._prepareElevation(go),this._ease((fr=>{if(this._zooming&&(_r.zoom=Xe.y.number(Ar,xo,fr)),this._rotating&&(_r.bearing=Xe.y.number(Kr,io,fr)),this._pitching&&(_r.pitch=Xe.y.number(In,oo,fr)),this._padding&&(_r.interpolatePadding(no,ao,fr),co=_r.centerPoint.add(so)),this.terrain&&!u.freezeElevation&&this._updateElevation(fr),zo)_r.setLocationAtPoint(zo,Bo);else{const u=_r.zoomScale(_r.zoom-Ar),Xe=xo>Ar?Math.min(2,Io):Math.max(.5,Io),Wt=Math.pow(Xe,1-fr),wr=_r.unproject(ko.add(Co.mult(fr*Wt)).mult(u));_r.setLocationAtPoint(_r.renderWorldCopies?wr.wrap():wr,co)}this._applyUpdatedTransform(_r),this._fireMoveEvents(Wt)}),(Xe=>{this.terrain&&u.freezeElevation&&this._finalizeElevation(),this._afterEase(Wt,Xe)}),u),this}_prepareEase(u,Wt,fr={}){this._moving=!0,Wt||fr.moving||this.fire(new Xe.k("movestart",u)),this._zooming&&!fr.zooming&&this.fire(new Xe.k("zoomstart",u)),this._rotating&&!fr.rotating&&this.fire(new Xe.k("rotatestart",u)),this._pitching&&!fr.pitching&&this.fire(new Xe.k("pitchstart",u))}_prepareElevation(u){this._elevationCenter=u,this._elevationStart=this.transform.elevation,this._elevationTarget=this.terrain.getElevationForLngLatZoom(u,this.transform.tileZoom),this._elevationFreeze=!0}_updateElevation(u){this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);const Wt=this.terrain.getElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);if(u<1&&Wt!==this._elevationTarget){const Xe=this._elevationTarget-this._elevationStart;this._elevationStart+=u*(Xe-(Wt-(Xe*u+this._elevationStart))/(1-u)),this._elevationTarget=Wt}this.transform.elevation=Xe.y.number(this._elevationStart,this._elevationTarget,u)}_finalizeElevation(){this._elevationFreeze=!1,this.transform.recalculateZoom(this.terrain)}_getTransformForUpdate(){return this.transformCameraUpdate||this.terrain?(this._requestedCameraState||(this._requestedCameraState=this.transform.clone()),this._requestedCameraState):this.transform}_elevateCameraIfInsideTerrain(u){const Xe=u.getCameraPosition(),Wt=this.terrain.getElevationForLngLatZoom(Xe.lngLat,u.zoom);if(Xe.altitude<Wt){const fr=this.calculateCameraOptionsFromTo(Xe.lngLat,Wt,u.center,u.elevation);return{pitch:fr.pitch,zoom:fr.zoom}}return{}}_applyUpdatedTransform(u){const Xe=[];if(this.terrain&&Xe.push((u=>this._elevateCameraIfInsideTerrain(u))),this.transformCameraUpdate&&Xe.push((u=>this.transformCameraUpdate(u))),!Xe.length)return;const Wt=u.clone();for(const u of Xe){const Xe=Wt.clone(),{center:fr,zoom:_r,pitch:wr,bearing:Ar,elevation:Kr}=u(Xe);fr&&(Xe.center=fr),void 0!==_r&&(Xe.zoom=_r),void 0!==wr&&(Xe.pitch=wr),void 0!==Ar&&(Xe.bearing=Ar),void 0!==Kr&&(Xe.elevation=Kr),Wt.apply(Xe)}this.transform.apply(Wt)}_fireMoveEvents(u){this.fire(new Xe.k("move",u)),this._zooming&&this.fire(new Xe.k("zoom",u)),this._rotating&&this.fire(new Xe.k("rotate",u)),this._pitching&&this.fire(new Xe.k("pitch",u))}_afterEase(u,Wt){if(this._easeId&&Wt&&this._easeId===Wt)return;delete this._easeId;const fr=this._zooming,_r=this._rotating,wr=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,fr&&this.fire(new Xe.k("zoomend",u)),_r&&this.fire(new Xe.k("rotateend",u)),wr&&this.fire(new Xe.k("pitchend",u)),this.fire(new Xe.k("moveend",u))}flyTo(u,Wt){var fr;if(!u.essential&&wr.prefersReducedMotion){const fr=Xe.M(u,["center","zoom","bearing","pitch","around"]);return this.jumpTo(fr,Wt)}this.stop(),u=Xe.e({offset:[0,0],speed:1.2,curve:1.42,easing:Xe.b9},u);const _r=this._getTransformForUpdate(),Ar=_r.zoom,Kr=_r.bearing,In=_r.pitch,no=_r.padding,io="bearing"in u?this._normalizeBearing(u.bearing,Kr):Kr,oo="pitch"in u?+u.pitch:In,ao="padding"in u?u.padding:_r.padding,so=Xe.P.convert(u.offset);let co=_r.centerPoint.add(so);const ho=_r.pointLocation(co),{center:go,zoom:xo}=_r.getConstrained(Xe.N.convert(u.center||ho),null!==(fr=u.zoom)&&void 0!==fr?fr:Ar);this._normalizeCenter(go,_r);const ko=_r.zoomScale(xo-Ar),Co=_r.project(ho),Io=_r.project(go).sub(Co);let zo=u.curve;const Bo=Math.max(_r.width,_r.height),ca=Bo/ko,ua=Io.mag();if("minZoom"in u){const Wt=Xe.ac(Math.min(u.minZoom,Ar,xo),_r.minZoom,_r.maxZoom),fr=Bo/_r.zoomScale(Wt-Ar);zo=Math.sqrt(fr/ua*2)}const Da=zo*zo;function P(u){const Xe=(ca*ca-Bo*Bo+(u?-1:1)*Da*Da*ua*ua)/(2*(u?ca:Bo)*Da*ua);return Math.log(Math.sqrt(Xe*Xe+1)-Xe)}function C(u){return(Math.exp(u)-Math.exp(-u))/2}function S(u){return(Math.exp(u)+Math.exp(-u))/2}const ns=P(!1);let D=function(u){return S(ns)/S(ns+zo*u)},M=function(u){return Bo*((S(ns)*(C(Xe=ns+zo*u)/S(Xe))-C(ns))/Da)/ua;var Xe},yl=(P(!0)-ns)/zo;if(Math.abs(ua)<1e-6||!isFinite(yl)){if(Math.abs(Bo-ca)<1e-6)return this.easeTo(u,Wt);const Xe=ca<Bo?-1:1;yl=Math.abs(Math.log(ca/Bo))/zo,M=()=>0,D=u=>Math.exp(Xe*zo*u)}return u.duration="duration"in u?+u.duration:1e3*yl/("screenSpeed"in u?+u.screenSpeed/zo:+u.speed),u.maxDuration&&u.duration>u.maxDuration&&(u.duration=0),this._zooming=!0,this._rotating=Kr!==io,this._pitching=oo!==In,this._padding=!_r.isPaddingEqual(ao),this._prepareEase(Wt,!1),this.terrain&&this._prepareElevation(go),this._ease((fr=>{const wr=fr*yl,ho=1/D(wr);_r.zoom=1===fr?xo:Ar+_r.scaleZoom(ho),this._rotating&&(_r.bearing=Xe.y.number(Kr,io,fr)),this._pitching&&(_r.pitch=Xe.y.number(In,oo,fr)),this._padding&&(_r.interpolatePadding(no,ao,fr),co=_r.centerPoint.add(so)),this.terrain&&!u.freezeElevation&&this._updateElevation(fr);const ko=1===fr?go:_r.unproject(Co.add(Io.mult(M(wr))).mult(ho));_r.setLocationAtPoint(_r.renderWorldCopies?ko.wrap():ko,co),this._applyUpdatedTransform(_r),this._fireMoveEvents(Wt)}),(()=>{this.terrain&&u.freezeElevation&&this._finalizeElevation(),this._afterEase(Wt)}),u),this}isEasing(){return!!this._easeFrameId}stop(){return this._stop()}_stop(u,Xe){var Wt;if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){const u=this._onEaseEnd;delete this._onEaseEnd,u.call(this,Xe)}return u||null===(Wt=this.handlers)||void 0===Wt||Wt.stop(!1),this}_ease(u,Xe,Wt){!1===Wt.animate||0===Wt.duration?(u(1),Xe()):(this._easeStart=wr.now(),this._easeOptions=Wt,this._onEaseFrame=u,this._onEaseEnd=Xe,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))}_normalizeBearing(u,Wt){u=Xe.b3(u,-180,180);const fr=Math.abs(u-Wt);return Math.abs(u-360-Wt)<fr&&(u-=360),Math.abs(u+360-Wt)<fr&&(u+=360),u}_normalizeCenter(u,Xe){if(!Xe.renderWorldCopies||Xe.lngRange)return;const Wt=u.lng-Xe.center.lng;u.lng+=Wt>180?-360:Wt<-180?360:0}queryTerrainElevation(u){return this.terrain?this.terrain.getElevationForLngLatZoom(Xe.N.convert(u),this.transform.tileZoom)-this.transform.elevation:null}}const cu={compact:!0,customAttribution:'<a href="https://maplibre.org/" target="_blank">MapLibre</a>'};class Es{constructor(u=cu){this._toggleAttribution=()=>{this._container.classList.contains("maplibregl-compact")&&(this._container.classList.contains("maplibregl-compact-show")?(this._container.setAttribute("open",""),this._container.classList.remove("maplibregl-compact-show")):(this._container.classList.add("maplibregl-compact-show"),this._container.removeAttribute("open")))},this._updateData=u=>{!u||"metadata"!==u.sourceDataType&&"visibility"!==u.sourceDataType&&"style"!==u.dataType&&"terrain"!==u.type||this._updateAttributions()},this._updateCompact=()=>{this._map.getCanvasContainer().offsetWidth<=640||this._compact?!1===this._compact?this._container.setAttribute("open",""):this._container.classList.contains("maplibregl-compact")||this._container.classList.contains("maplibregl-attrib-empty")||(this._container.setAttribute("open",""),this._container.classList.add("maplibregl-compact","maplibregl-compact-show")):(this._container.setAttribute("open",""),this._container.classList.contains("maplibregl-compact")&&this._container.classList.remove("maplibregl-compact","maplibregl-compact-show"))},this._updateCompactMinimize=()=>{this._container.classList.contains("maplibregl-compact")&&this._container.classList.contains("maplibregl-compact-show")&&this._container.classList.remove("maplibregl-compact-show")},this.options=u}getDefaultPosition(){return"bottom-right"}onAdd(u){return this._map=u,this._compact=this.options.compact,this._container=r.create("details","maplibregl-ctrl maplibregl-ctrl-attrib"),this._compactButton=r.create("summary","maplibregl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=r.create("div","maplibregl-ctrl-attrib-inner",this._container),this._updateAttributions(),this._updateCompact(),this._map.on("styledata",this._updateData),this._map.on("sourcedata",this._updateData),this._map.on("terrain",this._updateData),this._map.on("resize",this._updateCompact),this._map.on("drag",this._updateCompactMinimize),this._container}onRemove(){r.remove(this._container),this._map.off("styledata",this._updateData),this._map.off("sourcedata",this._updateData),this._map.off("terrain",this._updateData),this._map.off("resize",this._updateCompact),this._map.off("drag",this._updateCompactMinimize),this._map=void 0,this._compact=void 0,this._attribHTML=void 0}_setElementTitle(u,Xe){const Wt=this._map._getUIString(`AttributionControl.${Xe}`);u.title=Wt,u.setAttribute("aria-label",Wt)}_updateAttributions(){if(!this._map.style)return;let u=[];if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?u=u.concat(this.options.customAttribution.map((u=>"string"!=typeof u?"":u))):"string"==typeof this.options.customAttribution&&u.push(this.options.customAttribution)),this._map.style.stylesheet){const u=this._map.style.stylesheet;this.styleOwner=u.owner,this.styleId=u.id}const Xe=this._map.style.sourceCaches;for(const Wt in Xe){const fr=Xe[Wt];if(fr.used||fr.usedForTerrain){const Xe=fr.getSource();Xe.attribution&&u.indexOf(Xe.attribution)<0&&u.push(Xe.attribution)}}u=u.filter((u=>String(u).trim())),u.sort(((u,Xe)=>u.length-Xe.length)),u=u.filter(((Xe,Wt)=>{for(let fr=Wt+1;fr<u.length;fr++)if(u[fr].indexOf(Xe)>=0)return!1;return!0}));const Wt=u.join(" | ");Wt!==this._attribHTML&&(this._attribHTML=Wt,u.length?(this._innerContainer.innerHTML=Wt,this._container.classList.remove("maplibregl-attrib-empty")):this._container.classList.add("maplibregl-attrib-empty"),this._updateCompact(),this._editLink=null)}}class Ps{constructor(u={}){this._updateCompact=()=>{const u=this._container.children;if(u.length){const Xe=u[0];this._map.getCanvasContainer().offsetWidth<=640||this._compact?!1!==this._compact&&Xe.classList.add("maplibregl-compact"):Xe.classList.remove("maplibregl-compact")}},this.options=u}getDefaultPosition(){return"bottom-left"}onAdd(u){this._map=u,this._compact=this.options&&this.options.compact,this._container=r.create("div","maplibregl-ctrl");const Xe=r.create("a","maplibregl-ctrl-logo");return Xe.target="_blank",Xe.rel="noopener nofollow",Xe.href="https://maplibre.org/",Xe.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),Xe.setAttribute("rel","noopener nofollow"),this._container.appendChild(Xe),this._container.style.display="block",this._map.on("resize",this._updateCompact),this._updateCompact(),this._container}onRemove(){r.remove(this._container),this._map.off("resize",this._updateCompact),this._map=void 0,this._compact=void 0}}class Cs{constructor(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1}add(u){const Xe=++this._id;return this._queue.push({callback:u,id:Xe,cancelled:!1}),Xe}remove(u){const Xe=this._currentlyRunning,Wt=Xe?this._queue.concat(Xe):this._queue;for(const Xe of Wt)if(Xe.id===u)return void(Xe.cancelled=!0)}run(u=0){if(this._currentlyRunning)throw new Error("Attempting to run(), but is already running.");const Xe=this._currentlyRunning=this._queue;this._queue=[];for(const Wt of Xe)if(!Wt.cancelled&&(Wt.callback(u),this._cleared))break;this._cleared=!1,this._currentlyRunning=!1}clear(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]}}var uu=Xe.Y([{name:"a_pos3d",type:"Int16",components:3}]);class zs extends Xe.E{constructor(u){super(),this.sourceCache=u,this._tiles={},this._renderableTilesKeys=[],this._sourceTileCache={},this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.deltaZoom=1,u.usedForTerrain=!0,u.tileSize=this.tileSize*2**this.deltaZoom}destruct(){this.sourceCache.usedForTerrain=!1,this.sourceCache.tileSize=null}update(u,Wt){this.sourceCache.update(u,Wt),this._renderableTilesKeys=[];const fr={};for(const _r of u.coveringTiles({tileSize:this.tileSize,minzoom:this.minzoom,maxzoom:this.maxzoom,reparseOverscaled:!1,terrain:Wt}))fr[_r.key]=!0,this._renderableTilesKeys.push(_r.key),this._tiles[_r.key]||(_r.posMatrix=new Float64Array(16),Xe.aP(_r.posMatrix,0,Xe.X,0,Xe.X,0,1),this._tiles[_r.key]=new lt(_r,this.tileSize));for(const u in this._tiles)fr[u]||delete this._tiles[u]}freeRtt(u){for(const Xe in this._tiles){const Wt=this._tiles[Xe];(!u||Wt.tileID.equals(u)||Wt.tileID.isChildOf(u)||u.isChildOf(Wt.tileID))&&(Wt.rtt=[])}}getRenderableTiles(){return this._renderableTilesKeys.map((u=>this.getTileByID(u)))}getTileByID(u){return this._tiles[u]}getTerrainCoords(u){const Wt={};for(const fr of this._renderableTilesKeys){const _r=this._tiles[fr].tileID;if(_r.canonical.equals(u.canonical)){const _r=u.clone();_r.posMatrix=new Float64Array(16),Xe.aP(_r.posMatrix,0,Xe.X,0,Xe.X,0,1),Wt[fr]=_r}else if(_r.canonical.isChildOf(u.canonical)){const wr=u.clone();wr.posMatrix=new Float64Array(16);const Ar=_r.canonical.z-u.canonical.z,Kr=_r.canonical.x-(_r.canonical.x>>Ar<<Ar),In=_r.canonical.y-(_r.canonical.y>>Ar<<Ar),no=Xe.X>>Ar;Xe.aP(wr.posMatrix,0,no,0,no,0,1),Xe.J(wr.posMatrix,wr.posMatrix,[-Kr*no,-In*no,0]),Wt[fr]=wr}else if(u.canonical.isChildOf(_r.canonical)){const wr=u.clone();wr.posMatrix=new Float64Array(16);const Ar=u.canonical.z-_r.canonical.z,Kr=u.canonical.x-(u.canonical.x>>Ar<<Ar),In=u.canonical.y-(u.canonical.y>>Ar<<Ar),no=Xe.X>>Ar;Xe.aP(wr.posMatrix,0,Xe.X,0,Xe.X,0,1),Xe.J(wr.posMatrix,wr.posMatrix,[Kr*no,In*no,0]),Xe.K(wr.posMatrix,wr.posMatrix,[1/2**Ar,1/2**Ar,0]),Wt[fr]=wr}}return Wt}getSourceTile(u,Xe){const Wt=this.sourceCache._source;let fr=u.overscaledZ-this.deltaZoom;if(fr>Wt.maxzoom&&(fr=Wt.maxzoom),fr<Wt.minzoom)return null;this._sourceTileCache[u.key]||(this._sourceTileCache[u.key]=u.scaledTo(fr).key);let _r=this.sourceCache.getTileByID(this._sourceTileCache[u.key]);if((!_r||!_r.dem)&&Xe)for(;fr>=Wt.minzoom&&(!_r||!_r.dem);)_r=this.sourceCache.getTileByID(u.scaledTo(fr--).key);return _r}tilesAfterTime(u=Date.now()){return Object.values(this._tiles).filter((Xe=>Xe.timeAdded>=u))}}class Ds{constructor(u,Xe,Wt){this.painter=u,this.sourceCache=new zs(Xe),this.options=Wt,this.exaggeration="number"==typeof Wt.exaggeration?Wt.exaggeration:1,this.qualityFactor=2,this.meshSize=128,this._demMatrixCache={},this.coordsIndex=[],this._coordsTextureSize=1024}getDEMElevation(u,Wt,fr,_r=Xe.X){var wr;if(!(Wt>=0&&Wt<_r&&fr>=0&&fr<_r))return 0;const Ar=this.getTerrainData(u),Kr=null===(wr=Ar.tile)||void 0===wr?void 0:wr.dem;if(!Kr)return 0;const In=function(u,Xe,Wt){var fr=Xe[0],_r=Xe[1];return u[0]=Wt[0]*fr+Wt[4]*_r+Wt[12],u[1]=Wt[1]*fr+Wt[5]*_r+Wt[13],u}([],[Wt/_r*Xe.X,fr/_r*Xe.X],Ar.u_terrain_matrix),no=[In[0]*Kr.dim,In[1]*Kr.dim],io=Math.floor(no[0]),oo=Math.floor(no[1]),ao=no[0]-io,so=no[1]-oo;return Kr.get(io,oo)*(1-ao)*(1-so)+Kr.get(io+1,oo)*ao*(1-so)+Kr.get(io,oo+1)*(1-ao)*so+Kr.get(io+1,oo+1)*ao*so}getElevationForLngLatZoom(u,Wt){if(!Xe.bb(Wt,u.wrap()))return 0;const{tileID:fr,mercatorX:_r,mercatorY:wr}=this._getOverscaledTileIDFromLngLatZoom(u,Wt);return this.getElevation(fr,_r%Xe.X,wr%Xe.X,Xe.X)}getElevation(u,Wt,fr,_r=Xe.X){return this.getDEMElevation(u,Wt,fr,_r)*this.exaggeration}getTerrainData(u){if(!this._emptyDemTexture){const u=this.painter.context,Wt=new Xe.R({width:1,height:1},new Uint8Array(4));this._emptyDepthTexture=new b(u,Wt,u.gl.RGBA,{premultiply:!1}),this._emptyDemUnpack=[0,0,0,0],this._emptyDemTexture=new b(u,new Xe.R({width:1,height:1}),u.gl.RGBA,{premultiply:!1}),this._emptyDemTexture.bind(u.gl.NEAREST,u.gl.CLAMP_TO_EDGE),this._emptyDemMatrix=Xe.an([])}const Wt=this.sourceCache.getSourceTile(u,!0);if(Wt&&Wt.dem&&(!Wt.demTexture||Wt.needsTerrainPrepare)){const u=this.painter.context;Wt.demTexture=this.painter.getTileTexture(Wt.dem.stride),Wt.demTexture?Wt.demTexture.update(Wt.dem.getPixels(),{premultiply:!1}):Wt.demTexture=new b(u,Wt.dem.getPixels(),u.gl.RGBA,{premultiply:!1}),Wt.demTexture.bind(u.gl.NEAREST,u.gl.CLAMP_TO_EDGE),Wt.needsTerrainPrepare=!1}const fr=Wt&&Wt+Wt.tileID.key+u.key;if(fr&&!this._demMatrixCache[fr]){const fr=this.sourceCache.sourceCache._source.maxzoom;let _r=u.canonical.z-Wt.tileID.canonical.z;u.overscaledZ>u.canonical.z&&(u.canonical.z>=fr?_r=u.canonical.z-fr:Xe.w("cannot calculate elevation if elevation maxzoom > source.maxzoom"));const wr=u.canonical.x-(u.canonical.x>>_r<<_r),Ar=u.canonical.y-(u.canonical.y>>_r<<_r),Kr=Xe.bc(new Float64Array(16),[1/(Xe.X<<_r),1/(Xe.X<<_r),0]);Xe.J(Kr,Kr,[wr*Xe.X,Ar*Xe.X,0]),this._demMatrixCache[u.key]={matrix:Kr,coord:u}}return{u_depth:2,u_terrain:3,u_terrain_dim:Wt&&Wt.dem&&Wt.dem.dim||1,u_terrain_matrix:fr?this._demMatrixCache[u.key].matrix:this._emptyDemMatrix,u_terrain_unpack:Wt&&Wt.dem&&Wt.dem.getUnpackVector()||this._emptyDemUnpack,u_terrain_exaggeration:this.exaggeration,texture:(Wt&&Wt.demTexture||this._emptyDemTexture).texture,depthTexture:(this._fboDepthTexture||this._emptyDepthTexture).texture,tile:Wt}}getFramebuffer(u){const Xe=this.painter,Wt=Xe.width/devicePixelRatio,fr=Xe.height/devicePixelRatio;return!this._fbo||this._fbo.width===Wt&&this._fbo.height===fr||(this._fbo.destroy(),this._fboCoordsTexture.destroy(),this._fboDepthTexture.destroy(),delete this._fbo,delete this._fboDepthTexture,delete this._fboCoordsTexture),this._fboCoordsTexture||(this._fboCoordsTexture=new b(Xe.context,{width:Wt,height:fr,data:null},Xe.context.gl.RGBA,{premultiply:!1}),this._fboCoordsTexture.bind(Xe.context.gl.NEAREST,Xe.context.gl.CLAMP_TO_EDGE)),this._fboDepthTexture||(this._fboDepthTexture=new b(Xe.context,{width:Wt,height:fr,data:null},Xe.context.gl.RGBA,{premultiply:!1}),this._fboDepthTexture.bind(Xe.context.gl.NEAREST,Xe.context.gl.CLAMP_TO_EDGE)),this._fbo||(this._fbo=Xe.context.createFramebuffer(Wt,fr,!0,!1),this._fbo.depthAttachment.set(Xe.context.createRenderbuffer(Xe.context.gl.DEPTH_COMPONENT16,Wt,fr))),this._fbo.colorAttachment.set("coords"===u?this._fboCoordsTexture.texture:this._fboDepthTexture.texture),this._fbo}getCoordsTexture(){const u=this.painter.context;if(this._coordsTexture)return this._coordsTexture;const Wt=new Uint8Array(this._coordsTextureSize*this._coordsTextureSize*4);for(let u=0,Xe=0;u<this._coordsTextureSize;u++)for(let fr=0;fr<this._coordsTextureSize;fr++,Xe+=4)Wt[Xe+0]=255&fr,Wt[Xe+1]=255&u,Wt[Xe+2]=fr>>8<<4|u>>8,Wt[Xe+3]=0;const fr=new Xe.R({width:this._coordsTextureSize,height:this._coordsTextureSize},new Uint8Array(Wt.buffer)),_r=new b(u,fr,u.gl.RGBA,{premultiply:!1});return _r.bind(u.gl.NEAREST,u.gl.CLAMP_TO_EDGE),this._coordsTexture=_r,_r}pointCoordinate(u){this.painter.maybeDrawDepthAndCoords(!0);const Wt=new Uint8Array(4),fr=this.painter.context,_r=fr.gl,wr=Math.round(u.x*this.painter.pixelRatio/devicePixelRatio),Ar=Math.round(u.y*this.painter.pixelRatio/devicePixelRatio),Kr=Math.round(this.painter.height/devicePixelRatio);fr.bindFramebuffer.set(this.getFramebuffer("coords").framebuffer),_r.readPixels(wr,Kr-Ar-1,1,1,_r.RGBA,_r.UNSIGNED_BYTE,Wt),fr.bindFramebuffer.set(null);const In=Wt[0]+(Wt[2]>>4<<8),no=Wt[1]+((15&Wt[2])<<8),io=this.coordsIndex[255-Wt[3]],oo=io&&this.sourceCache.getTileByID(io);if(!oo)return null;const ao=this._coordsTextureSize,so=(1<<oo.tileID.canonical.z)*ao;return new Xe.Z((oo.tileID.canonical.x*ao+In)/so+oo.tileID.wrap,(oo.tileID.canonical.y*ao+no)/so,this.getElevation(oo.tileID,In,no,ao))}depthAtPoint(u){const Xe=new Uint8Array(4),Wt=this.painter.context,fr=Wt.gl;return Wt.bindFramebuffer.set(this.getFramebuffer("depth").framebuffer),fr.readPixels(u.x,this.painter.height/devicePixelRatio-u.y-1,1,1,fr.RGBA,fr.UNSIGNED_BYTE,Xe),Wt.bindFramebuffer.set(null),(Xe[0]/16777216+Xe[1]/65536+Xe[2]/256+Xe[3])/256}getTerrainMesh(){if(this._mesh)return this._mesh;const u=this.painter.context,Wt=new Xe.bd,fr=new Xe.aY,_r=this.meshSize,wr=Xe.X/_r,Ar=_r*_r;for(let u=0;u<=_r;u++)for(let Xe=0;Xe<=_r;Xe++)Wt.emplaceBack(Xe*wr,u*wr,0);for(let u=0;u<Ar;u+=_r+1)for(let Xe=0;Xe<_r;Xe++)fr.emplaceBack(Xe+u,_r+Xe+u+1,_r+Xe+u+2),fr.emplaceBack(Xe+u,_r+Xe+u+2,Xe+u+1);const Kr=Wt.length,In=Kr+2*(_r+1);for(const u of[0,1])for(let fr=0;fr<=_r;fr++)for(const _r of[0,1])Wt.emplaceBack(fr*wr,u*Xe.X,_r);for(let u=0;u<2*_r;u+=2)fr.emplaceBack(In+u,In+u+1,In+u+3),fr.emplaceBack(In+u,In+u+3,In+u+2),fr.emplaceBack(Kr+u,Kr+u+3,Kr+u+1),fr.emplaceBack(Kr+u,Kr+u+2,Kr+u+3);const no=Wt.length,io=no+2*(_r+1);for(const u of[0,1])for(let fr=0;fr<=_r;fr++)for(const _r of[0,1])Wt.emplaceBack(u*Xe.X,fr*wr,_r);for(let u=0;u<2*_r;u+=2)fr.emplaceBack(no+u,no+u+1,no+u+3),fr.emplaceBack(no+u,no+u+3,no+u+2),fr.emplaceBack(io+u,io+u+3,io+u+1),fr.emplaceBack(io+u,io+u+2,io+u+3);return this._mesh=new ga(u.createVertexBuffer(Wt,uu.members),u.createIndexBuffer(fr),Xe.a0.simpleSegment(0,0,Wt.length,fr.length)),this._mesh}getMeshFrameDelta(u){return 2*Math.PI*Xe.be/Math.pow(2,u)/5}getMinTileElevationForLngLatZoom(u,Xe){var Wt;const{tileID:fr}=this._getOverscaledTileIDFromLngLatZoom(u,Xe);return null!==(Wt=this.getMinMaxElevation(fr).minElevation)&&void 0!==Wt?Wt:0}getMinMaxElevation(u){const Xe=this.getTerrainData(u).tile,Wt={minElevation:null,maxElevation:null};return Xe&&Xe.dem&&(Wt.minElevation=Xe.dem.min*this.exaggeration,Wt.maxElevation=Xe.dem.max*this.exaggeration),Wt}_getOverscaledTileIDFromLngLatZoom(u,Wt){const fr=Xe.Z.fromLngLat(u.wrap()),_r=(1<<Wt)*Xe.X,wr=fr.x*_r,Ar=fr.y*_r,Kr=Math.floor(wr/Xe.X),In=Math.floor(Ar/Xe.X);return{tileID:new Xe.S(Wt,0,Wt,Kr,In),mercatorX:wr,mercatorY:Ar}}}class Ms{constructor(u,Xe,Wt){this._context=u,this._size=Xe,this._tileSize=Wt,this._objects=[],this._recentlyUsed=[],this._stamp=0}destruct(){for(const u of this._objects)u.texture.destroy(),u.fbo.destroy()}_createObject(u){const Xe=this._context.createFramebuffer(this._tileSize,this._tileSize,!0,!0),Wt=new b(this._context,{width:this._tileSize,height:this._tileSize,data:null},this._context.gl.RGBA);return Wt.bind(this._context.gl.LINEAR,this._context.gl.CLAMP_TO_EDGE),Xe.depthAttachment.set(this._context.createRenderbuffer(this._context.gl.DEPTH_STENCIL,this._tileSize,this._tileSize)),Xe.colorAttachment.set(Wt.texture),{id:u,fbo:Xe,texture:Wt,stamp:-1,inUse:!1}}getObjectForId(u){return this._objects[u]}useObject(u){u.inUse=!0,this._recentlyUsed=this._recentlyUsed.filter((Xe=>u.id!==Xe)),this._recentlyUsed.push(u.id)}stampObject(u){u.stamp=++this._stamp}getOrCreateFreeObject(){for(const u of this._recentlyUsed)if(!this._objects[u].inUse)return this._objects[u];if(this._objects.length>=this._size)throw new Error("No free RenderPool available, call freeAllObjects() required!");const u=this._createObject(this._objects.length);return this._objects.push(u),u}freeObject(u){u.inUse=!1}freeAllObjects(){for(const u of this._objects)this.freeObject(u)}isFull(){return!(this._objects.length<this._size)&&!1===this._objects.some((u=>!u.inUse))}}const hu={background:!0,fill:!0,line:!0,raster:!0,hillshade:!0};class Rs{constructor(u,Xe){this.painter=u,this.terrain=Xe,this.pool=new Ms(u.context,30,Xe.sourceCache.tileSize*Xe.qualityFactor)}destruct(){this.pool.destruct()}getTexture(u){return this.pool.getObjectForId(u.rtt[this._stacks.length-1].id).texture}prepareForRender(u,Xe){this._stacks=[],this._prevType=null,this._rttTiles=[],this._renderableTiles=this.terrain.sourceCache.getRenderableTiles(),this._renderableLayerIds=u._order.filter((Wt=>!u._layers[Wt].isHidden(Xe))),this._coordsDescendingInv={};for(const Xe in u.sourceCaches){this._coordsDescendingInv[Xe]={};const Wt=u.sourceCaches[Xe].getVisibleCoordinates();for(const u of Wt){const Wt=this.terrain.sourceCache.getTerrainCoords(u);for(const u in Wt)this._coordsDescendingInv[Xe][u]||(this._coordsDescendingInv[Xe][u]=[]),this._coordsDescendingInv[Xe][u].push(Wt[u])}}this._coordsDescendingInvStr={};for(const Xe of u._order){const Wt=u._layers[Xe],fr=Wt.source;if(hu[Wt.type]&&!this._coordsDescendingInvStr[fr]){this._coordsDescendingInvStr[fr]={};for(const u in this._coordsDescendingInv[fr])this._coordsDescendingInvStr[fr][u]=this._coordsDescendingInv[fr][u].map((u=>u.key)).sort().join()}}for(const u of this._renderableTiles)for(const Xe in this._coordsDescendingInvStr){const Wt=this._coordsDescendingInvStr[Xe][u.tileID.key];Wt&&Wt!==u.rttCoords[Xe]&&(u.rtt=[])}}renderLayer(u){if(u.isHidden(this.painter.transform.zoom))return!1;const Wt=u.type,fr=this.painter,_r=this._renderableLayerIds[this._renderableLayerIds.length-1]===u.id;if(hu[Wt]&&(this._prevType&&hu[this._prevType]||this._stacks.push([]),this._prevType=Wt,this._stacks[this._stacks.length-1].push(u.id),!_r))return!0;if(hu[this._prevType]||hu[Wt]&&_r){this._prevType=Wt;const u=this._stacks.length-1,_r=this._stacks[u]||[];for(const Wt of this._renderableTiles){if(this.pool.isFull()&&(fa(this.painter,this.terrain,this._rttTiles),this._rttTiles=[],this.pool.freeAllObjects()),this._rttTiles.push(Wt),Wt.rtt[u]){const Xe=this.pool.getObjectForId(Wt.rtt[u].id);if(Xe.stamp===Wt.rtt[u].stamp){this.pool.useObject(Xe);continue}}const wr=this.pool.getOrCreateFreeObject();this.pool.useObject(wr),this.pool.stampObject(wr),Wt.rtt[u]={id:wr.id,stamp:wr.stamp},fr.context.bindFramebuffer.set(wr.fbo.framebuffer),fr.context.clear({color:Xe.aM.transparent,stencil:0}),fr.currentStencilSource=void 0;for(let u=0;u<_r.length;u++){const Xe=fr.style._layers[_r[u]],Ar=Xe.source?this._coordsDescendingInv[Xe.source][Wt.tileID.key]:[Wt.tileID];fr.context.viewport.set([0,0,wr.fbo.width,wr.fbo.height]),fr._renderTileClippingMasks(Xe,Ar),fr.renderLayer(fr,fr.style.sourceCaches[Xe.source],Xe,Ar),Xe.source&&(Wt.rttCoords[Xe.source]=this._coordsDescendingInvStr[Xe.source][Wt.tileID.key])}}return fa(this.painter,this.terrain,this._rttTiles),this._rttTiles=[],this.pool.freeAllObjects(),hu[Wt]}return!1}}const Iu={"AttributionControl.ToggleAttribution":"Toggle attribution","AttributionControl.MapFeedback":"Map feedback","FullscreenControl.Enter":"Enter fullscreen","FullscreenControl.Exit":"Exit fullscreen","GeolocateControl.FindMyLocation":"Find my location","GeolocateControl.LocationNotAvailable":"Location not available","LogoControl.Title":"MapLibre logo","Map.Title":"Map","Marker.Title":"Map marker","NavigationControl.ResetBearing":"Reset bearing to north","NavigationControl.ZoomIn":"Zoom in","NavigationControl.ZoomOut":"Zoom out","Popup.Close":"Close popup","ScaleControl.Feet":"ft","ScaleControl.Meters":"m","ScaleControl.Kilometers":"km","ScaleControl.Miles":"mi","ScaleControl.NauticalMiles":"nm","TerrainControl.Enable":"Enable terrain","TerrainControl.Disable":"Disable terrain","CooperativeGesturesHandler.WindowsHelpText":"Use Ctrl + scroll to zoom the map","CooperativeGesturesHandler.MacHelpText":"Use ⌘ + scroll to zoom the map","CooperativeGesturesHandler.MobileHelpText":"Use two fingers to move the map"},zu=Wt,Lu={hash:!1,interactive:!0,bearingSnap:7,attributionControl:cu,maplibreLogo:!1,failIfMajorPerformanceCaveat:!1,preserveDrawingBuffer:!1,refreshExpiredTiles:!0,scrollZoom:!0,minZoom:-2,maxZoom:22,minPitch:0,maxPitch:60,boxZoom:!0,dragRotate:!0,dragPan:!0,keyboard:!0,doubleClickZoom:!0,touchZoomRotate:!0,touchPitch:!0,cooperativeGestures:!1,trackResize:!0,center:[0,0],zoom:0,bearing:0,pitch:0,renderWorldCopies:!0,maxTileCacheSize:null,maxTileCacheZoomLevels:Xe.a.MAX_TILE_CACHE_ZOOM_LEVELS,transformRequest:null,transformCameraUpdate:null,fadeDuration:300,crossSourceCollisions:!0,clickTolerance:3,localIdeographFontFamily:"sans-serif",pitchWithRotate:!0,validateStyle:!0,maxCanvasSize:[4096,4096],cancelPendingTileRequestsWhileZooming:!0},Bs=u=>{u.touchstart=u.dragStart,u.touchmoveWindow=u.dragMove,u.touchend=u.dragEnd},Du={showCompass:!0,showZoom:!0,visualizePitch:!1};class Ns{constructor(u,Wt,fr=!1){this.mousedown=u=>{this.startMouse(Xe.e({},u,{ctrlKey:!0,preventDefault:()=>u.preventDefault()}),r.mousePos(this.element,u)),r.addEventListener(window,"mousemove",this.mousemove),r.addEventListener(window,"mouseup",this.mouseup)},this.mousemove=u=>{this.moveMouse(u,r.mousePos(this.element,u))},this.mouseup=u=>{this.mouseRotate.dragEnd(u),this.mousePitch&&this.mousePitch.dragEnd(u),this.offTemp()},this.touchstart=u=>{1!==u.targetTouches.length?this.reset():(this._startPos=this._lastPos=r.touchPos(this.element,u.targetTouches)[0],this.startTouch(u,this._startPos),r.addEventListener(window,"touchmove",this.touchmove,{passive:!1}),r.addEventListener(window,"touchend",this.touchend))},this.touchmove=u=>{1!==u.targetTouches.length?this.reset():(this._lastPos=r.touchPos(this.element,u.targetTouches)[0],this.moveTouch(u,this._lastPos))},this.touchend=u=>{0===u.targetTouches.length&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos)<this._clickTolerance&&this.element.click(),delete this._startPos,delete this._lastPos,this.offTemp()},this.reset=()=>{this.mouseRotate.reset(),this.mousePitch&&this.mousePitch.reset(),this.touchRotate.reset(),this.touchPitch&&this.touchPitch.reset(),delete this._startPos,delete this._lastPos,this.offTemp()},this._clickTolerance=10;const _r=u.dragRotate._mouseRotate.getClickTolerance(),wr=u.dragRotate._mousePitch.getClickTolerance();this.element=Wt,this.mouseRotate=Ka({clickTolerance:_r,enable:!0}),this.touchRotate=(({enable:u,clickTolerance:Xe,bearingDegreesPerPixelMoved:Wt=.8})=>{const fr=new $a;return new Ga({clickTolerance:Xe,move:(u,Xe)=>({bearingDelta:(Xe.x-u.x)*Wt}),moveStateManager:fr,enable:u,assignEvents:Bs})})({clickTolerance:_r,enable:!0}),this.map=u,fr&&(this.mousePitch=Ja({clickTolerance:wr,enable:!0}),this.touchPitch=(({enable:u,clickTolerance:Xe,pitchDegreesPerPixelMoved:Wt=-.5})=>{const fr=new $a;return new Ga({clickTolerance:Xe,move:(u,Xe)=>({pitchDelta:(Xe.y-u.y)*Wt}),moveStateManager:fr,enable:u,assignEvents:Bs})})({clickTolerance:wr,enable:!0})),r.addEventListener(Wt,"mousedown",this.mousedown),r.addEventListener(Wt,"touchstart",this.touchstart,{passive:!1}),r.addEventListener(Wt,"touchcancel",this.reset)}startMouse(u,Xe){this.mouseRotate.dragStart(u,Xe),this.mousePitch&&this.mousePitch.dragStart(u,Xe),r.disableDrag()}startTouch(u,Xe){this.touchRotate.dragStart(u,Xe),this.touchPitch&&this.touchPitch.dragStart(u,Xe),r.disableDrag()}moveMouse(u,Xe){const Wt=this.map,{bearingDelta:fr}=this.mouseRotate.dragMove(u,Xe)||{};if(fr&&Wt.setBearing(Wt.getBearing()+fr),this.mousePitch){const{pitchDelta:fr}=this.mousePitch.dragMove(u,Xe)||{};fr&&Wt.setPitch(Wt.getPitch()+fr)}}moveTouch(u,Xe){const Wt=this.map,{bearingDelta:fr}=this.touchRotate.dragMove(u,Xe)||{};if(fr&&Wt.setBearing(Wt.getBearing()+fr),this.touchPitch){const{pitchDelta:fr}=this.touchPitch.dragMove(u,Xe)||{};fr&&Wt.setPitch(Wt.getPitch()+fr)}}off(){const u=this.element;r.removeEventListener(u,"mousedown",this.mousedown),r.removeEventListener(u,"touchstart",this.touchstart,{passive:!1}),r.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),r.removeEventListener(window,"touchend",this.touchend),r.removeEventListener(u,"touchcancel",this.reset),this.offTemp()}offTemp(){r.enableDrag(),r.removeEventListener(window,"mousemove",this.mousemove),r.removeEventListener(window,"mouseup",this.mouseup),r.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),r.removeEventListener(window,"touchend",this.touchend)}}let Fu;function js(u,Wt,fr){const _r=new Xe.N(u.lng,u.lat);if(u=new Xe.N(u.lng,u.lat),Wt){const _r=new Xe.N(u.lng-360,u.lat),wr=new Xe.N(u.lng+360,u.lat),Ar=fr.locationPoint(u).distSqr(Wt);fr.locationPoint(_r).distSqr(Wt)<Ar?u=_r:fr.locationPoint(wr).distSqr(Wt)<Ar&&(u=wr)}for(;Math.abs(u.lng-fr.center.lng)>180;){const Xe=fr.locationPoint(u);if(Xe.x>=0&&Xe.y>=0&&Xe.x<=fr.width&&Xe.y<=fr.height)break;u.lng>fr.center.lng?u.lng-=360:u.lng+=360}return u.lng!==_r.lng&&fr.locationPoint(u).y>fr.height/2-fr.getHorizon()?u:_r}const Nu={center:"translate(-50%,-50%)",top:"translate(-50%,0)","top-left":"translate(0,0)","top-right":"translate(-100%,0)",bottom:"translate(-50%,-100%)","bottom-left":"translate(0,-100%)","bottom-right":"translate(-100%,-100%)",left:"translate(0,-50%)",right:"translate(-100%,-50%)"};function qs(u,Xe,Wt){const fr=u.classList;for(const u in Nu)fr.remove(`maplibregl-${Wt}-anchor-${u}`);fr.add(`maplibregl-${Wt}-anchor-${Xe}`)}class Vs extends Xe.E{constructor(u){if(super(),this._onKeyPress=u=>{const Xe=u.code,Wt=u.charCode||u.keyCode;"Space"!==Xe&&"Enter"!==Xe&&32!==Wt&&13!==Wt||this.togglePopup()},this._onMapClick=u=>{const Xe=u.originalEvent.target,Wt=this._element;this._popup&&(Xe===Wt||Wt.contains(Xe))&&this.togglePopup()},this._update=u=>{var Xe;if(!this._map)return;const Wt=this._map.loaded()&&!this._map.isMoving();("terrain"===(null==u?void 0:u.type)||"render"===(null==u?void 0:u.type)&&!Wt)&&this._map.once("render",this._update),this._lngLat=this._map.transform.renderWorldCopies?js(this._lngLat,this._flatPos,this._map.transform):null===(Xe=this._lngLat)||void 0===Xe?void 0:Xe.wrap(),this._flatPos=this._pos=this._map.project(this._lngLat)._add(this._offset),this._map.terrain&&(this._flatPos=this._map.transform.locationPoint(this._lngLat)._add(this._offset));let fr="";"viewport"===this._rotationAlignment||"auto"===this._rotationAlignment?fr=`rotateZ(${this._rotation}deg)`:"map"===this._rotationAlignment&&(fr=`rotateZ(${this._rotation-this._map.getBearing()}deg)`);let _r="";"viewport"===this._pitchAlignment||"auto"===this._pitchAlignment?_r="rotateX(0deg)":"map"===this._pitchAlignment&&(_r=`rotateX(${this._map.getPitch()}deg)`),this._subpixelPositioning||u&&"moveend"!==u.type||(this._pos=this._pos.round()),r.setTransform(this._element,`${Nu[this._anchor]} translate(${this._pos.x}px, ${this._pos.y}px) ${_r} ${fr}`),wr.frameAsync(new AbortController).then((()=>{this._updateOpacity(u&&"moveend"===u.type)})).catch((()=>{}))},this._onMove=u=>{if(!this._isDragging){const Xe=this._clickTolerance||this._map._clickTolerance;this._isDragging=u.point.dist(this._pointerdownPos)>=Xe}this._isDragging&&(this._pos=u.point.sub(this._positionDelta),this._lngLat=this._map.unproject(this._pos),this.setLngLat(this._lngLat),this._element.style.pointerEvents="none","pending"===this._state&&(this._state="active",this.fire(new Xe.k("dragstart"))),this.fire(new Xe.k("drag")))},this._onUp=()=>{this._element.style.pointerEvents="auto",this._positionDelta=null,this._pointerdownPos=null,this._isDragging=!1,this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),"active"===this._state&&this.fire(new Xe.k("dragend")),this._state="inactive"},this._addDragHandler=u=>{this._element.contains(u.originalEvent.target)&&(u.preventDefault(),this._positionDelta=u.point.sub(this._pos).add(this._offset),this._pointerdownPos=u.point,this._state="pending",this._map.on("mousemove",this._onMove),this._map.on("touchmove",this._onMove),this._map.once("mouseup",this._onUp),this._map.once("touchend",this._onUp))},this._anchor=u&&u.anchor||"center",this._color=u&&u.color||"#3FB1CE",this._scale=u&&u.scale||1,this._draggable=u&&u.draggable||!1,this._clickTolerance=u&&u.clickTolerance||0,this._subpixelPositioning=u&&u.subpixelPositioning||!1,this._isDragging=!1,this._state="inactive",this._rotation=u&&u.rotation||0,this._rotationAlignment=u&&u.rotationAlignment||"auto",this._pitchAlignment=u&&u.pitchAlignment&&"auto"!==u.pitchAlignment?u.pitchAlignment:this._rotationAlignment,this.setOpacity(),this.setOpacity(null==u?void 0:u.opacity,null==u?void 0:u.opacityWhenCovered),u&&u.element)this._element=u.element,this._offset=Xe.P.convert(u&&u.offset||[0,0]);else{this._defaultMarker=!0,this._element=r.create("div");const Wt=r.createNS("http://www.w3.org/2000/svg","svg"),fr=41,_r=27;Wt.setAttributeNS(null,"display","block"),Wt.setAttributeNS(null,"height",`${fr}px`),Wt.setAttributeNS(null,"width",`${_r}px`),Wt.setAttributeNS(null,"viewBox",`0 0 ${_r} ${fr}`);const wr=r.createNS("http://www.w3.org/2000/svg","g");wr.setAttributeNS(null,"stroke","none"),wr.setAttributeNS(null,"stroke-width","1"),wr.setAttributeNS(null,"fill","none"),wr.setAttributeNS(null,"fill-rule","evenodd");const Ar=r.createNS("http://www.w3.org/2000/svg","g");Ar.setAttributeNS(null,"fill-rule","nonzero");const Kr=r.createNS("http://www.w3.org/2000/svg","g");Kr.setAttributeNS(null,"transform","translate(3.0, 29.0)"),Kr.setAttributeNS(null,"fill","#000000");const In=[{rx:"10.5",ry:"5.25002273"},{rx:"10.5",ry:"5.25002273"},{rx:"9.5",ry:"4.77275007"},{rx:"8.5",ry:"4.29549936"},{rx:"7.5",ry:"3.81822308"},{rx:"6.5",ry:"3.34094679"},{rx:"5.5",ry:"2.86367051"},{rx:"4.5",ry:"2.38636864"}];for(const u of In){const Xe=r.createNS("http://www.w3.org/2000/svg","ellipse");Xe.setAttributeNS(null,"opacity","0.04"),Xe.setAttributeNS(null,"cx","10.5"),Xe.setAttributeNS(null,"cy","5.80029008"),Xe.setAttributeNS(null,"rx",u.rx),Xe.setAttributeNS(null,"ry",u.ry),Kr.appendChild(Xe)}const no=r.createNS("http://www.w3.org/2000/svg","g");no.setAttributeNS(null,"fill",this._color);const io=r.createNS("http://www.w3.org/2000/svg","path");io.setAttributeNS(null,"d","M27,13.5 C27,19.074644 20.250001,27.000002 14.75,34.500002 C14.016665,35.500004 12.983335,35.500004 12.25,34.500002 C6.7499993,27.000002 0,19.222562 0,13.5 C0,6.0441559 6.0441559,0 13.5,0 C20.955844,0 27,6.0441559 27,13.5 Z"),no.appendChild(io);const oo=r.createNS("http://www.w3.org/2000/svg","g");oo.setAttributeNS(null,"opacity","0.25"),oo.setAttributeNS(null,"fill","#000000");const ao=r.createNS("http://www.w3.org/2000/svg","path");ao.setAttributeNS(null,"d","M13.5,0 C6.0441559,0 0,6.0441559 0,13.5 C0,19.222562 6.7499993,27 12.25,34.5 C13,35.522727 14.016664,35.500004 14.75,34.5 C20.250001,27 27,19.074644 27,13.5 C27,6.0441559 20.955844,0 13.5,0 Z M13.5,1 C20.415404,1 26,6.584596 26,13.5 C26,15.898657 24.495584,19.181431 22.220703,22.738281 C19.945823,26.295132 16.705119,30.142167 13.943359,33.908203 C13.743445,34.180814 13.612715,34.322738 13.5,34.441406 C13.387285,34.322738 13.256555,34.180814 13.056641,33.908203 C10.284481,30.127985 7.4148684,26.314159 5.015625,22.773438 C2.6163816,19.232715 1,15.953538 1,13.5 C1,6.584596 6.584596,1 13.5,1 Z"),oo.appendChild(ao);const so=r.createNS("http://www.w3.org/2000/svg","g");so.setAttributeNS(null,"transform","translate(6.0, 7.0)"),so.setAttributeNS(null,"fill","#FFFFFF");const co=r.createNS("http://www.w3.org/2000/svg","g");co.setAttributeNS(null,"transform","translate(8.0, 8.0)");const ho=r.createNS("http://www.w3.org/2000/svg","circle");ho.setAttributeNS(null,"fill","#000000"),ho.setAttributeNS(null,"opacity","0.25"),ho.setAttributeNS(null,"cx","5.5"),ho.setAttributeNS(null,"cy","5.5"),ho.setAttributeNS(null,"r","5.4999962");const go=r.createNS("http://www.w3.org/2000/svg","circle");go.setAttributeNS(null,"fill","#FFFFFF"),go.setAttributeNS(null,"cx","5.5"),go.setAttributeNS(null,"cy","5.5"),go.setAttributeNS(null,"r","5.4999962"),co.appendChild(ho),co.appendChild(go),Ar.appendChild(Kr),Ar.appendChild(no),Ar.appendChild(oo),Ar.appendChild(so),Ar.appendChild(co),Wt.appendChild(Ar),Wt.setAttributeNS(null,"height",fr*this._scale+"px"),Wt.setAttributeNS(null,"width",_r*this._scale+"px"),this._element.appendChild(Wt),this._offset=Xe.P.convert(u&&u.offset||[0,-14])}if(this._element.classList.add("maplibregl-marker"),this._element.addEventListener("dragstart",(u=>{u.preventDefault()})),this._element.addEventListener("mousedown",(u=>{u.preventDefault()})),qs(this._element,this._anchor,"marker"),u&&u.className)for(const Xe of u.className.split(" "))this._element.classList.add(Xe);this._popup=null}addTo(u){return this.remove(),this._map=u,this._element.setAttribute("aria-label",u._getUIString("Marker.Title")),u.getCanvasContainer().appendChild(this._element),u.on("move",this._update),u.on("moveend",this._update),u.on("terrain",this._update),this.setDraggable(this._draggable),this._update(),this._map.on("click",this._onMapClick),this}remove(){return this._opacityTimeout&&(clearTimeout(this._opacityTimeout),delete this._opacityTimeout),this._map&&(this._map.off("click",this._onMapClick),this._map.off("move",this._update),this._map.off("moveend",this._update),this._map.off("terrain",this._update),this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler),this._map.off("mouseup",this._onUp),this._map.off("touchend",this._onUp),this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),delete this._map),r.remove(this._element),this._popup&&this._popup.remove(),this}getLngLat(){return this._lngLat}setLngLat(u){return this._lngLat=Xe.N.convert(u),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this}getElement(){return this._element}setPopup(u){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeEventListener("keypress",this._onKeyPress),this._originalTabIndex||this._element.removeAttribute("tabindex")),u){if(!("offset"in u.options)){const Xe=38.1,Wt=13.5,fr=Math.abs(Wt)/Math.SQRT2;u.options.offset=this._defaultMarker?{top:[0,0],"top-left":[0,0],"top-right":[0,0],bottom:[0,-Xe],"bottom-left":[fr,-1*(Xe-Wt+fr)],"bottom-right":[-fr,-1*(Xe-Wt+fr)],left:[Wt,-1*(Xe-Wt)],right:[-Wt,-1*(Xe-Wt)]}:this._offset}this._popup=u,this._originalTabIndex=this._element.getAttribute("tabindex"),this._originalTabIndex||this._element.setAttribute("tabindex","0"),this._element.addEventListener("keypress",this._onKeyPress)}return this}setSubpixelPositioning(u){return this._subpixelPositioning=u,this}getPopup(){return this._popup}togglePopup(){const u=this._popup;return this._element.style.opacity===this._opacityWhenCovered?this:u?(u.isOpen()?u.remove():(u.setLngLat(this._lngLat),u.addTo(this._map)),this):this}_updateOpacity(u=!1){var Wt,fr;if(!(null===(Wt=this._map)||void 0===Wt?void 0:Wt.terrain))return void(this._element.style.opacity!==this._opacity&&(this._element.style.opacity=this._opacity));if(u)this._opacityTimeout=null;else{if(this._opacityTimeout)return;this._opacityTimeout=setTimeout((()=>{this._opacityTimeout=null}),100)}const _r=this._map,wr=_r.terrain.depthAtPoint(this._pos),Ar=_r.terrain.getElevationForLngLatZoom(this._lngLat,_r.transform.tileZoom);if(_r.transform.lngLatToCameraDepth(this._lngLat,Ar)-wr<.006)return void(this._element.style.opacity=this._opacity);const Kr=-this._offset.y/_r.transform._pixelPerMeter,In=Math.sin(_r.getPitch()*Math.PI/180)*Kr,no=_r.terrain.depthAtPoint(new Xe.P(this._pos.x,this._pos.y-this._offset.y)),io=_r.transform.lngLatToCameraDepth(this._lngLat,Ar+In)-no>.006;(null===(fr=this._popup)||void 0===fr?void 0:fr.isOpen())&&io&&this._popup.remove(),this._element.style.opacity=io?this._opacityWhenCovered:this._opacity}getOffset(){return this._offset}setOffset(u){return this._offset=Xe.P.convert(u),this._update(),this}addClassName(u){this._element.classList.add(u)}removeClassName(u){this._element.classList.remove(u)}toggleClassName(u){return this._element.classList.toggle(u)}setDraggable(u){return this._draggable=!!u,this._map&&(u?(this._map.on("mousedown",this._addDragHandler),this._map.on("touchstart",this._addDragHandler)):(this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler))),this}isDraggable(){return this._draggable}setRotation(u){return this._rotation=u||0,this._update(),this}getRotation(){return this._rotation}setRotationAlignment(u){return this._rotationAlignment=u||"auto",this._update(),this}getRotationAlignment(){return this._rotationAlignment}setPitchAlignment(u){return this._pitchAlignment=u&&"auto"!==u?u:this._rotationAlignment,this._update(),this}getPitchAlignment(){return this._pitchAlignment}setOpacity(u,Xe){return void 0===u&&void 0===Xe&&(this._opacity="1",this._opacityWhenCovered="0.2"),void 0!==u&&(this._opacity=u),void 0!==Xe&&(this._opacityWhenCovered=Xe),this._map&&this._updateOpacity(!0),this}}const Vu={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0};let Uu=0,qu=!1;const td={maxWidth:100,unit:"metric"};function Xs(u,Xe,Wt){const fr=Wt&&Wt.maxWidth||100,_r=u._container.clientHeight/2,wr=u.unproject([0,_r]),Ar=u.unproject([fr,_r]),Kr=wr.distanceTo(Ar);if(Wt&&"imperial"===Wt.unit){const Wt=3.2808*Kr;Wt>5280?Ks(Xe,fr,Wt/5280,u._getUIString("ScaleControl.Miles")):Ks(Xe,fr,Wt,u._getUIString("ScaleControl.Feet"))}else Wt&&"nautical"===Wt.unit?Ks(Xe,fr,Kr/1852,u._getUIString("ScaleControl.NauticalMiles")):Kr>=1e3?Ks(Xe,fr,Kr/1e3,u._getUIString("ScaleControl.Kilometers")):Ks(Xe,fr,Kr,u._getUIString("ScaleControl.Meters"))}function Ks(u,Xe,Wt,fr){const _r=function(u){const Xe=Math.pow(10,`${Math.floor(u)}`.length-1);let Wt=u/Xe;return Wt=Wt>=10?10:Wt>=5?5:Wt>=3?3:Wt>=2?2:Wt>=1?1:function(u){const Xe=Math.pow(10,Math.ceil(-Math.log(u)/Math.LN10));return Math.round(u*Xe)/Xe}(Wt),Xe*Wt}(Wt);u.style.width=Xe*(_r/Wt)+"px",u.innerHTML=`${_r}&nbsp;${fr}`}const id={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px",subpixelPositioning:!1},sd=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", ");function Qs(u){if(u){if("number"==typeof u){const Wt=Math.round(Math.abs(u)/Math.SQRT2);return{center:new Xe.P(0,0),top:new Xe.P(0,u),"top-left":new Xe.P(Wt,Wt),"top-right":new Xe.P(-Wt,Wt),bottom:new Xe.P(0,-u),"bottom-left":new Xe.P(Wt,-Wt),"bottom-right":new Xe.P(-Wt,-Wt),left:new Xe.P(u,0),right:new Xe.P(-u,0)}}if(u instanceof Xe.P||Array.isArray(u)){const Wt=Xe.P.convert(u);return{center:Wt,top:Wt,"top-left":Wt,"top-right":Wt,bottom:Wt,"bottom-left":Wt,"bottom-right":Wt,left:Wt,right:Wt}}return{center:Xe.P.convert(u.center||[0,0]),top:Xe.P.convert(u.top||[0,0]),"top-left":Xe.P.convert(u["top-left"]||[0,0]),"top-right":Xe.P.convert(u["top-right"]||[0,0]),bottom:Xe.P.convert(u.bottom||[0,0]),"bottom-left":Xe.P.convert(u["bottom-left"]||[0,0]),"bottom-right":Xe.P.convert(u["bottom-right"]||[0,0]),left:Xe.P.convert(u.left||[0,0]),right:Xe.P.convert(u.right||[0,0])}}return Qs(new Xe.P(0,0))}const ld=Wt;u.AJAXError=Xe.bh,u.Evented=Xe.E,u.LngLat=Xe.N,u.MercatorCoordinate=Xe.Z,u.Point=Xe.P,u.addProtocol=Xe.bi,u.config=Xe.a,u.removeProtocol=Xe.bj,u.AttributionControl=Es,u.BoxZoomHandler=Ua,u.CanvasSource=et,u.CooperativeGesturesHandler=vs,u.DoubleClickZoomHandler=ds,u.DragPanHandler=ms,u.DragRotateHandler=fs,u.EdgeInsets=ba,u.FullscreenControl=class extends Xe.E{constructor(u={}){super(),this._onFullscreenChange=()=>{var u;let Xe=window.document.fullscreenElement||window.document.mozFullScreenElement||window.document.webkitFullscreenElement||window.document.msFullscreenElement;for(;null===(u=null==Xe?void 0:Xe.shadowRoot)||void 0===u?void 0:u.fullscreenElement;)Xe=Xe.shadowRoot.fullscreenElement;Xe===this._container!==this._fullscreen&&this._handleFullscreenChange()},this._onClickFullscreen=()=>{this._isFullscreen()?this._exitFullscreen():this._requestFullscreen()},this._fullscreen=!1,u&&u.container&&(u.container instanceof HTMLElement?this._container=u.container:Xe.w("Full screen control 'container' must be a DOM element.")),"onfullscreenchange"in document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in document&&(this._fullscreenchange="MSFullscreenChange")}onAdd(u){return this._map=u,this._container||(this._container=this._map.getContainer()),this._controlContainer=r.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),this._controlContainer}onRemove(){r.remove(this._controlContainer),this._map=null,window.document.removeEventListener(this._fullscreenchange,this._onFullscreenChange)}_setupUI(){const u=this._fullscreenButton=r.create("button","maplibregl-ctrl-fullscreen",this._controlContainer);r.create("span","maplibregl-ctrl-icon",u).setAttribute("aria-hidden","true"),u.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),window.document.addEventListener(this._fullscreenchange,this._onFullscreenChange)}_updateTitle(){const u=this._getTitle();this._fullscreenButton.setAttribute("aria-label",u),this._fullscreenButton.title=u}_getTitle(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")}_isFullscreen(){return this._fullscreen}_handleFullscreenChange(){this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("maplibregl-ctrl-shrink"),this._fullscreenButton.classList.toggle("maplibregl-ctrl-fullscreen"),this._updateTitle(),this._fullscreen?(this.fire(new Xe.k("fullscreenstart")),this._prevCooperativeGesturesEnabled=this._map.cooperativeGestures.isEnabled(),this._map.cooperativeGestures.disable()):(this.fire(new Xe.k("fullscreenend")),this._prevCooperativeGesturesEnabled&&this._map.cooperativeGestures.enable())}_exitFullscreen(){window.document.exitFullscreen?window.document.exitFullscreen():window.document.mozCancelFullScreen?window.document.mozCancelFullScreen():window.document.msExitFullscreen?window.document.msExitFullscreen():window.document.webkitCancelFullScreen?window.document.webkitCancelFullScreen():this._togglePseudoFullScreen()}_requestFullscreen(){this._container.requestFullscreen?this._container.requestFullscreen():this._container.mozRequestFullScreen?this._container.mozRequestFullScreen():this._container.msRequestFullscreen?this._container.msRequestFullscreen():this._container.webkitRequestFullscreen?this._container.webkitRequestFullscreen():this._togglePseudoFullScreen()}_togglePseudoFullScreen(){this._container.classList.toggle("maplibregl-pseudo-fullscreen"),this._handleFullscreenChange(),this._map.resize()}},u.GeoJSONSource=J,u.GeolocateControl=class extends Xe.E{constructor(u){super(),this._onSuccess=u=>{if(this._map){if(this._isOutOfMapMaxBounds(u))return this._setErrorState(),this.fire(new Xe.k("outofmaxbounds",u)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=u,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"BACKGROUND":case"BACKGROUND_ERROR":this._watchState="BACKGROUND",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background");break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}this.options.showUserLocation&&"OFF"!==this._watchState&&this._updateMarker(u),this.options.trackUserLocation&&"ACTIVE_LOCK"!==this._watchState||this._updateCamera(u),this.options.showUserLocation&&this._dotElement.classList.remove("maplibregl-user-location-dot-stale"),this.fire(new Xe.k("geolocate",u)),this._finish()}},this._updateCamera=u=>{const Wt=new Xe.N(u.coords.longitude,u.coords.latitude),fr=u.coords.accuracy,_r=this._map.getBearing(),wr=Xe.e({bearing:_r},this.options.fitBoundsOptions),Ar=H.fromLngLat(Wt,fr);this._map.fitBounds(Ar,wr,{geolocateSource:!0})},this._updateMarker=u=>{if(u){const Wt=new Xe.N(u.coords.longitude,u.coords.latitude);this._accuracyCircleMarker.setLngLat(Wt).addTo(this._map),this._userLocationDotMarker.setLngLat(Wt).addTo(this._map),this._accuracy=u.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},this._onZoom=()=>{this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()},this._onError=u=>{if(this._map){if(this.options.trackUserLocation)if(1===u.code){this._watchState="OFF",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.disabled=!0;const u=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=u,this._geolocateButton.setAttribute("aria-label",u),void 0!==this._geolocationWatchID&&this._clearWatch()}else{if(3===u.code&&qu)return;this._setErrorState()}"OFF"!==this._watchState&&this.options.showUserLocation&&this._dotElement.classList.add("maplibregl-user-location-dot-stale"),this.fire(new Xe.k("error",u)),this._finish()}},this._finish=()=>{this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},this._setupUI=()=>{this._map&&(this._container.addEventListener("contextmenu",(u=>u.preventDefault())),this._geolocateButton=r.create("button","maplibregl-ctrl-geolocate",this._container),r.create("span","maplibregl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden","true"),this._geolocateButton.type="button",this._geolocateButton.disabled=!0)},this._finishSetupUI=u=>{if(this._map){if(!1===u){Xe.w("Geolocation support is not available so the GeolocateControl will be disabled.");const u=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=u,this._geolocateButton.setAttribute("aria-label",u)}else{const u=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.disabled=!1,this._geolocateButton.title=u,this._geolocateButton.setAttribute("aria-label",u)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=r.create("div","maplibregl-user-location-dot"),this._userLocationDotMarker=new Vs({element:this._dotElement}),this._circleElement=r.create("div","maplibregl-user-location-accuracy-circle"),this._accuracyCircleMarker=new Vs({element:this._circleElement,pitchAlignment:"map"}),this.options.trackUserLocation&&(this._watchState="OFF"),this._map.on("zoom",this._onZoom)),this._geolocateButton.addEventListener("click",(()=>this.trigger())),this._setup=!0,this.options.trackUserLocation&&this._map.on("movestart",(u=>{u.geolocateSource||"ACTIVE_LOCK"!==this._watchState||u.originalEvent&&"resize"===u.originalEvent.type||(this._watchState="BACKGROUND",this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this.fire(new Xe.k("trackuserlocationend")),this.fire(new Xe.k("userlocationlostfocus")))}))}},this.options=Xe.e({},Vu,u)}onAdd(u){return this._map=u,this._container=r.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),function(){return Xe._(this,arguments,void 0,(function*(u=!1){if(void 0!==Fu&&!u)return Fu;if(void 0===window.navigator.permissions)return Fu=!!window.navigator.geolocation,Fu;try{const u=yield window.navigator.permissions.query({name:"geolocation"});Fu="denied"!==u.state}catch(u){Fu=!!window.navigator.geolocation}return Fu}))}().then((u=>this._finishSetupUI(u))),this._container}onRemove(){void 0!==this._geolocationWatchID&&(window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0),this.options.showUserLocation&&this._userLocationDotMarker&&this._userLocationDotMarker.remove(),this.options.showAccuracyCircle&&this._accuracyCircleMarker&&this._accuracyCircleMarker.remove(),r.remove(this._container),this._map.off("zoom",this._onZoom),this._map=void 0,Uu=0,qu=!1}_isOutOfMapMaxBounds(u){const Xe=this._map.getMaxBounds(),Wt=u.coords;return Xe&&(Wt.longitude<Xe.getWest()||Wt.longitude>Xe.getEast()||Wt.latitude<Xe.getSouth()||Wt.latitude>Xe.getNorth())}_setErrorState(){switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error");break;case"ACTIVE_LOCK":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting");break;case"BACKGROUND":this._watchState="BACKGROUND_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting");break;case"ACTIVE_ERROR":break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}}_updateCircleRadius(){const u=this._map.getBounds(),Xe=u.getSouthEast(),Wt=u.getNorthEast(),fr=Xe.distanceTo(Wt),_r=Math.ceil(this._accuracy/(fr/this._map._container.clientHeight)*2);this._circleElement.style.width=`${_r}px`,this._circleElement.style.height=`${_r}px`}trigger(){if(!this._setup)return Xe.w("Geolocate control triggered before added to a map"),!1;if(this.options.trackUserLocation){switch(this._watchState){case"OFF":this._watchState="WAITING_ACTIVE",this.fire(new Xe.k("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":Uu--,qu=!1,this._watchState="OFF",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this.fire(new Xe.k("trackuserlocationend"));break;case"BACKGROUND":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._lastKnownPosition&&this._updateCamera(this._lastKnownPosition),this.fire(new Xe.k("trackuserlocationstart")),this.fire(new Xe.k("userlocationfocus"));break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}switch(this._watchState){case"WAITING_ACTIVE":this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"ACTIVE_LOCK":this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"OFF":break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}if("OFF"===this._watchState&&void 0!==this._geolocationWatchID)this._clearWatch();else if(void 0===this._geolocationWatchID){let u;this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),Uu++,Uu>1?(u={maximumAge:6e5,timeout:0},qu=!0):(u=this.options.positionOptions,qu=!1),this._geolocationWatchID=window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,u)}}else window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0}_clearWatch(){window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0,this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","false"),this.options.showUserLocation&&this._updateMarker(null)}},u.Hash=Ea,u.ImageSource=Q,u.KeyboardHandler=ls,u.LngLatBounds=H,u.LogoControl=Ps,u.Map=class extends Ts{constructor(u){Xe.bf.mark(Xe.bg.create);const Wt=Object.assign(Object.assign({},Lu),u);if(null!=Wt.minZoom&&null!=Wt.maxZoom&&Wt.minZoom>Wt.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(null!=Wt.minPitch&&null!=Wt.maxPitch&&Wt.minPitch>Wt.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(null!=Wt.minPitch&&Wt.minPitch<0)throw new Error("minPitch must be greater than or equal to 0");if(null!=Wt.maxPitch&&Wt.maxPitch>85)throw new Error("maxPitch must be less than or equal to 85");if(super(new Ta(Wt.minZoom,Wt.maxZoom,Wt.minPitch,Wt.maxPitch,Wt.renderWorldCopies),{bearingSnap:Wt.bearingSnap}),this._idleTriggered=!1,this._crossFadingFactor=1,this._renderTaskQueue=new Cs,this._controls=[],this._mapId=Xe.a4(),this._contextLost=u=>{u.preventDefault(),this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this.fire(new Xe.k("webglcontextlost",{originalEvent:u}))},this._contextRestored=u=>{this._setupPainter(),this.resize(),this._update(),this.fire(new Xe.k("webglcontextrestored",{originalEvent:u}))},this._onMapScroll=u=>{if(u.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1},this._onWindowOnline=()=>{this._update()},this._interactive=Wt.interactive,this._maxTileCacheSize=Wt.maxTileCacheSize,this._maxTileCacheZoomLevels=Wt.maxTileCacheZoomLevels,this._failIfMajorPerformanceCaveat=!0===Wt.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=!0===Wt.preserveDrawingBuffer,this._antialias=!0===Wt.antialias,this._trackResize=!0===Wt.trackResize,this._bearingSnap=Wt.bearingSnap,this._refreshExpiredTiles=!0===Wt.refreshExpiredTiles,this._fadeDuration=Wt.fadeDuration,this._crossSourceCollisions=!0===Wt.crossSourceCollisions,this._collectResourceTiming=!0===Wt.collectResourceTiming,this._locale=Object.assign(Object.assign({},Iu),Wt.locale),this._clickTolerance=Wt.clickTolerance,this._overridePixelRatio=Wt.pixelRatio,this._maxCanvasSize=Wt.maxCanvasSize,this.transformCameraUpdate=Wt.transformCameraUpdate,this.cancelPendingTileRequestsWhileZooming=!0===Wt.cancelPendingTileRequestsWhileZooming,this._imageQueueHandle=oo.addThrottleControl((()=>this.isMoving())),this._requestManager=new p(Wt.transformRequest),"string"==typeof Wt.container){if(this._container=document.getElementById(Wt.container),!this._container)throw new Error(`Container '${Wt.container}' not found.`)}else{if(!(Wt.container instanceof HTMLElement))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=Wt.container}if(Wt.maxBounds&&this.setMaxBounds(Wt.maxBounds),this._setupContainer(),this._setupPainter(),this.on("move",(()=>this._update(!1))).on("moveend",(()=>this._update(!1))).on("zoom",(()=>this._update(!0))).on("terrain",(()=>{this.painter.terrainFacilitator.dirty=!0,this._update(!0)})).once("idle",(()=>{this._idleTriggered=!0})),"undefined"!=typeof window){addEventListener("online",this._onWindowOnline,!1);let u=!1;const Xe=Ia((u=>{this._trackResize&&!this._removed&&(this.resize(u),this.redraw())}),50);this._resizeObserver=new ResizeObserver((Wt=>{u?Xe(Wt):u=!0})),this._resizeObserver.observe(this._container)}this.handlers=new ws(this,Wt),this._hash=Wt.hash&&new Ea("string"==typeof Wt.hash&&Wt.hash||void 0).addTo(this),this._hash&&this._hash._onHashChange()||(this.jumpTo({center:Wt.center,zoom:Wt.zoom,bearing:Wt.bearing,pitch:Wt.pitch}),Wt.bounds&&(this.resize(),this.fitBounds(Wt.bounds,Xe.e({},Wt.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=Wt.localIdeographFontFamily,this._validateStyle=Wt.validateStyle,Wt.style&&this.setStyle(Wt.style,{localIdeographFontFamily:Wt.localIdeographFontFamily}),Wt.attributionControl&&this.addControl(new Es("boolean"==typeof Wt.attributionControl?void 0:Wt.attributionControl)),Wt.maplibreLogo&&this.addControl(new Ps,Wt.logoPosition),this.on("style.load",(()=>{this.transform.unmodified&&this.jumpTo(this.style.stylesheet)})),this.on("data",(u=>{this._update("style"===u.dataType),this.fire(new Xe.k(`${u.dataType}data`,u))})),this.on("dataloading",(u=>{this.fire(new Xe.k(`${u.dataType}dataloading`,u))})),this.on("dataabort",(u=>{this.fire(new Xe.k("sourcedataabort",u))}))}_getMapId(){return this._mapId}addControl(u,Wt){if(void 0===Wt&&(Wt=u.getDefaultPosition?u.getDefaultPosition():"top-right"),!u||!u.onAdd)return this.fire(new Xe.j(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));const fr=u.onAdd(this);this._controls.push(u);const _r=this._controlPositions[Wt];return-1!==Wt.indexOf("bottom")?_r.insertBefore(fr,_r.firstChild):_r.appendChild(fr),this}removeControl(u){if(!u||!u.onRemove)return this.fire(new Xe.j(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));const Wt=this._controls.indexOf(u);return Wt>-1&&this._controls.splice(Wt,1),u.onRemove(this),this}hasControl(u){return this._controls.indexOf(u)>-1}calculateCameraOptionsFromTo(u,Xe,Wt,fr){return null==fr&&this.terrain&&(fr=this.terrain.getElevationForLngLatZoom(Wt,this.transform.tileZoom)),super.calculateCameraOptionsFromTo(u,Xe,Wt,fr)}resize(u){var Wt;const fr=this._containerDimensions(),_r=fr[0],wr=fr[1],Ar=this._getClampedPixelRatio(_r,wr);if(this._resizeCanvas(_r,wr,Ar),this.painter.resize(_r,wr,Ar),this.painter.overLimit()){const u=this.painter.context.gl;this._maxCanvasSize=[u.drawingBufferWidth,u.drawingBufferHeight];const Xe=this._getClampedPixelRatio(_r,wr);this._resizeCanvas(_r,wr,Xe),this.painter.resize(_r,wr,Xe)}this.transform.resize(_r,wr),null===(Wt=this._requestedCameraState)||void 0===Wt||Wt.resize(_r,wr);const Kr=!this._moving;return Kr&&(this.stop(),this.fire(new Xe.k("movestart",u)).fire(new Xe.k("move",u))),this.fire(new Xe.k("resize",u)),Kr&&this.fire(new Xe.k("moveend",u)),this}_getClampedPixelRatio(u,Xe){const{0:Wt,1:fr}=this._maxCanvasSize,_r=this.getPixelRatio(),wr=u*_r,Ar=Xe*_r;return Math.min(wr>Wt?Wt/wr:1,Ar>fr?fr/Ar:1)*_r}getPixelRatio(){var u;return null!==(u=this._overridePixelRatio)&&void 0!==u?u:devicePixelRatio}setPixelRatio(u){this._overridePixelRatio=u,this.resize()}getBounds(){return this.transform.getBounds()}getMaxBounds(){return this.transform.getMaxBounds()}setMaxBounds(u){return this.transform.setMaxBounds(H.convert(u)),this._update()}setMinZoom(u){if((u=null==u?-2:u)>=-2&&u<=this.transform.maxZoom)return this.transform.minZoom=u,this._update(),this.getZoom()<u&&this.setZoom(u),this;throw new Error("minZoom must be between -2 and the current maxZoom, inclusive")}getMinZoom(){return this.transform.minZoom}setMaxZoom(u){if((u=null==u?22:u)>=this.transform.minZoom)return this.transform.maxZoom=u,this._update(),this.getZoom()>u&&this.setZoom(u),this;throw new Error("maxZoom must be greater than the current minZoom")}getMaxZoom(){return this.transform.maxZoom}setMinPitch(u){if((u=null==u?0:u)<0)throw new Error("minPitch must be greater than or equal to 0");if(u>=0&&u<=this.transform.maxPitch)return this.transform.minPitch=u,this._update(),this.getPitch()<u&&this.setPitch(u),this;throw new Error("minPitch must be between 0 and the current maxPitch, inclusive")}getMinPitch(){return this.transform.minPitch}setMaxPitch(u){if((u=null==u?60:u)>85)throw new Error("maxPitch must be less than or equal to 85");if(u>=this.transform.minPitch)return this.transform.maxPitch=u,this._update(),this.getPitch()>u&&this.setPitch(u),this;throw new Error("maxPitch must be greater than the current minPitch")}getMaxPitch(){return this.transform.maxPitch}getRenderWorldCopies(){return this.transform.renderWorldCopies}setRenderWorldCopies(u){return this.transform.renderWorldCopies=u,this._update()}project(u){return this.transform.locationPoint(Xe.N.convert(u),this.style&&this.terrain)}unproject(u){return this.transform.pointLocation(Xe.P.convert(u),this.terrain)}isMoving(){var u;return this._moving||(null===(u=this.handlers)||void 0===u?void 0:u.isMoving())}isZooming(){var u;return this._zooming||(null===(u=this.handlers)||void 0===u?void 0:u.isZooming())}isRotating(){var u;return this._rotating||(null===(u=this.handlers)||void 0===u?void 0:u.isRotating())}_createDelegatedListener(u,Xe,Wt){if("mouseenter"===u||"mouseover"===u){let fr=!1;const s=_r=>{const wr=Xe.filter((u=>this.getLayer(u))),Ar=0!==wr.length?this.queryRenderedFeatures(_r.point,{layers:wr}):[];Ar.length?fr||(fr=!0,Wt.call(this,new ka(u,this,_r.originalEvent,{features:Ar}))):fr=!1};return{layers:Xe,listener:Wt,delegates:{mousemove:s,mouseout:()=>{fr=!1}}}}if("mouseleave"===u||"mouseout"===u){let fr=!1;const s=_r=>{const wr=Xe.filter((u=>this.getLayer(u)));(0!==wr.length?this.queryRenderedFeatures(_r.point,{layers:wr}):[]).length?fr=!0:fr&&(fr=!1,Wt.call(this,new ka(u,this,_r.originalEvent)))},o=Xe=>{fr&&(fr=!1,Wt.call(this,new ka(u,this,Xe.originalEvent)))};return{layers:Xe,listener:Wt,delegates:{mousemove:s,mouseout:o}}}{const a=u=>{const fr=Xe.filter((u=>this.getLayer(u))),_r=0!==fr.length?this.queryRenderedFeatures(u.point,{layers:fr}):[];_r.length&&(u.features=_r,Wt.call(this,u),delete u.features)};return{layers:Xe,listener:Wt,delegates:{[u]:a}}}}_saveDelegatedListener(u,Xe){this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[u]=this._delegatedListeners[u]||[],this._delegatedListeners[u].push(Xe)}_removeDelegatedListener(u,Xe,Wt){if(!this._delegatedListeners||!this._delegatedListeners[u])return;const fr=this._delegatedListeners[u];for(let u=0;u<fr.length;u++){const _r=fr[u];if(_r.listener===Wt&&_r.layers.length===Xe.length&&_r.layers.every((u=>Xe.includes(u)))){for(const u in _r.delegates)this.off(u,_r.delegates[u]);return void fr.splice(u,1)}}}on(u,Xe,Wt){if(void 0===Wt)return super.on(u,Xe);const fr=this._createDelegatedListener(u,"string"==typeof Xe?[Xe]:Xe,Wt);this._saveDelegatedListener(u,fr);for(const u in fr.delegates)this.on(u,fr.delegates[u]);return this}once(u,Xe,Wt){if(void 0===Wt)return super.once(u,Xe);const fr="string"==typeof Xe?[Xe]:Xe,_r=this._createDelegatedListener(u,fr,Wt);for(const Xe in _r.delegates){const wr=_r.delegates[Xe];_r.delegates[Xe]=(...Xe)=>{this._removeDelegatedListener(u,fr,Wt),wr(...Xe)}}this._saveDelegatedListener(u,_r);for(const u in _r.delegates)this.once(u,_r.delegates[u]);return this}off(u,Xe,Wt){return void 0===Wt?super.off(u,Xe):(this._removeDelegatedListener(u,"string"==typeof Xe?[Xe]:Xe,Wt),this)}queryRenderedFeatures(u,Wt){if(!this.style)return[];let fr;const _r=u instanceof Xe.P||Array.isArray(u),wr=_r?u:[[0,0],[this.transform.width,this.transform.height]];if(Wt=Wt||(_r?{}:u)||{},wr instanceof Xe.P||"number"==typeof wr[0])fr=[Xe.P.convert(wr)];else{const u=Xe.P.convert(wr[0]),Wt=Xe.P.convert(wr[1]);fr=[u,new Xe.P(Wt.x,u.y),Wt,new Xe.P(u.x,Wt.y),u]}return this.style.queryRenderedFeatures(fr,Wt,this.transform)}querySourceFeatures(u,Xe){return this.style.querySourceFeatures(u,Xe)}setStyle(u,Wt){return!1!==(Wt=Xe.e({},{localIdeographFontFamily:this._localIdeographFontFamily,validate:this._validateStyle},Wt)).diff&&Wt.localIdeographFontFamily===this._localIdeographFontFamily&&this.style&&u?(this._diffStyle(u,Wt),this):(this._localIdeographFontFamily=Wt.localIdeographFontFamily,this._updateStyle(u,Wt))}setTransformRequest(u){return this._requestManager.setTransformRequest(u),this}_getUIString(u){const Xe=this._locale[u];if(null==Xe)throw new Error(`Missing UI string '${u}'`);return Xe}_updateStyle(u,Xe){if(Xe.transformStyle&&this.style&&!this.style._loaded)return void this.style.once("style.load",(()=>this._updateStyle(u,Xe)));const Wt=this.style&&Xe.transformStyle?this.style.serialize():void 0;return this.style&&(this.style.setEventedParent(null),this.style._remove(!u)),u?(this.style=new de(this,Xe||{}),this.style.setEventedParent(this,{style:this.style}),"string"==typeof u?this.style.loadURL(u,Xe,Wt):this.style.loadJSON(u,Xe,Wt),this):(delete this.style,this)}_lazyInitEmptyStyle(){this.style||(this.style=new de(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())}_diffStyle(u,Wt){if("string"==typeof u){const fr=this._requestManager.transformRequest(u,"Style");Xe.h(fr,new AbortController).then((u=>{this._updateDiff(u.data,Wt)})).catch((u=>{u&&this.fire(new Xe.j(u))}))}else"object"==typeof u&&this._updateDiff(u,Wt)}_updateDiff(u,Wt){try{this.style.setState(u,Wt)&&this._update(!0)}catch(fr){Xe.w(`Unable to perform style diff: ${fr.message||fr.error||fr}. Rebuilding the style from scratch.`),this._updateStyle(u,Wt)}}getStyle(){if(this.style)return this.style.serialize()}isStyleLoaded(){return this.style?this.style.loaded():Xe.w("There is no style added to the map.")}addSource(u,Xe){return this._lazyInitEmptyStyle(),this.style.addSource(u,Xe),this._update(!0)}isSourceLoaded(u){const Wt=this.style&&this.style.sourceCaches[u];if(void 0!==Wt)return Wt.loaded();this.fire(new Xe.j(new Error(`There is no source with ID '${u}'`)))}setTerrain(u){if(this.style._checkLoaded(),this._terrainDataCallback&&this.style.off("data",this._terrainDataCallback),u){const Wt=this.style.sourceCaches[u.source];if(!Wt)throw new Error(`cannot load terrain, because there exists no source with ID: ${u.source}`);null===this.terrain&&Wt.reload();for(const Wt in this.style._layers){const fr=this.style._layers[Wt];"hillshade"===fr.type&&fr.source===u.source&&Xe.w("You are using the same source for a hillshade layer and for 3D terrain. Please consider using two separate sources to improve rendering quality.")}this.terrain=new Ds(this.painter,Wt,u),this.painter.renderToTexture=new Rs(this.painter,this.terrain),this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this.transform.elevation=this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this._terrainDataCallback=Xe=>{"style"===Xe.dataType?this.terrain.sourceCache.freeRtt():"source"===Xe.dataType&&Xe.tile&&(Xe.sourceId!==u.source||this._elevationFreeze||(this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this.transform.elevation=this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),this.terrain.sourceCache.freeRtt(Xe.tile.tileID))},this.style.on("data",this._terrainDataCallback)}else this.terrain&&this.terrain.sourceCache.destruct(),this.terrain=null,this.painter.renderToTexture&&this.painter.renderToTexture.destruct(),this.painter.renderToTexture=null,this.transform.minElevationForCurrentTile=0,this.transform.elevation=0;return this.fire(new Xe.k("terrain",{terrain:u})),this}getTerrain(){var u,Xe;return null!==(Xe=null===(u=this.terrain)||void 0===u?void 0:u.options)&&void 0!==Xe?Xe:null}areTilesLoaded(){const u=this.style&&this.style.sourceCaches;for(const Xe in u){const Wt=u[Xe]._tiles;for(const u in Wt){const Xe=Wt[u];if("loaded"!==Xe.state&&"errored"!==Xe.state)return!1}}return!0}removeSource(u){return this.style.removeSource(u),this._update(!0)}getSource(u){return this.style.getSource(u)}addImage(u,Wt,fr={}){const{pixelRatio:_r=1,sdf:Ar=!1,stretchX:Kr,stretchY:In,content:no,textFitWidth:io,textFitHeight:oo}=fr;if(this._lazyInitEmptyStyle(),!(Wt instanceof HTMLImageElement||Xe.b(Wt))){if(void 0===Wt.width||void 0===Wt.height)return this.fire(new Xe.j(new Error("Invalid arguments to map.addImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));{const{width:fr,height:wr,data:ao}=Wt,so=Wt;return this.style.addImage(u,{data:new Xe.R({width:fr,height:wr},new Uint8Array(ao)),pixelRatio:_r,stretchX:Kr,stretchY:In,content:no,textFitWidth:io,textFitHeight:oo,sdf:Ar,version:0,userImage:so}),so.onAdd&&so.onAdd(this,u),this}}{const{width:fr,height:ao,data:so}=wr.getImageData(Wt);this.style.addImage(u,{data:new Xe.R({width:fr,height:ao},so),pixelRatio:_r,stretchX:Kr,stretchY:In,content:no,textFitWidth:io,textFitHeight:oo,sdf:Ar,version:0})}}updateImage(u,Wt){const fr=this.style.getImage(u);if(!fr)return this.fire(new Xe.j(new Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));const _r=Wt instanceof HTMLImageElement||Xe.b(Wt)?wr.getImageData(Wt):Wt,{width:Ar,height:Kr,data:In}=_r;if(void 0===Ar||void 0===Kr)return this.fire(new Xe.j(new Error("Invalid arguments to map.updateImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));if(Ar!==fr.data.width||Kr!==fr.data.height)return this.fire(new Xe.j(new Error("The width and height of the updated image must be that same as the previous version of the image")));const no=!(Wt instanceof HTMLImageElement||Xe.b(Wt));return fr.data.replace(In,no),this.style.updateImage(u,fr),this}getImage(u){return this.style.getImage(u)}hasImage(u){return u?!!this.style.getImage(u):(this.fire(new Xe.j(new Error("Missing required image id"))),!1)}removeImage(u){this.style.removeImage(u)}loadImage(u){return oo.getImage(this._requestManager.transformRequest(u,"Image"),new AbortController)}listImages(){return this.style.listImages()}addLayer(u,Xe){return this._lazyInitEmptyStyle(),this.style.addLayer(u,Xe),this._update(!0)}moveLayer(u,Xe){return this.style.moveLayer(u,Xe),this._update(!0)}removeLayer(u){return this.style.removeLayer(u),this._update(!0)}getLayer(u){return this.style.getLayer(u)}getLayersOrder(){return this.style.getLayersOrder()}setLayerZoomRange(u,Xe,Wt){return this.style.setLayerZoomRange(u,Xe,Wt),this._update(!0)}setFilter(u,Xe,Wt={}){return this.style.setFilter(u,Xe,Wt),this._update(!0)}getFilter(u){return this.style.getFilter(u)}setPaintProperty(u,Xe,Wt,fr={}){return this.style.setPaintProperty(u,Xe,Wt,fr),this._update(!0)}getPaintProperty(u,Xe){return this.style.getPaintProperty(u,Xe)}setLayoutProperty(u,Xe,Wt,fr={}){return this.style.setLayoutProperty(u,Xe,Wt,fr),this._update(!0)}getLayoutProperty(u,Xe){return this.style.getLayoutProperty(u,Xe)}setGlyphs(u,Xe={}){return this._lazyInitEmptyStyle(),this.style.setGlyphs(u,Xe),this._update(!0)}getGlyphs(){return this.style.getGlyphsUrl()}addSprite(u,Xe,Wt={}){return this._lazyInitEmptyStyle(),this.style.addSprite(u,Xe,Wt,(u=>{u||this._update(!0)})),this}removeSprite(u){return this._lazyInitEmptyStyle(),this.style.removeSprite(u),this._update(!0)}getSprite(){return this.style.getSprite()}setSprite(u,Xe={}){return this._lazyInitEmptyStyle(),this.style.setSprite(u,Xe,(u=>{u||this._update(!0)})),this}setLight(u,Xe={}){return this._lazyInitEmptyStyle(),this.style.setLight(u,Xe),this._update(!0)}getLight(){return this.style.getLight()}setSky(u){return this._lazyInitEmptyStyle(),this.style.setSky(u),this._update(!0)}getSky(){return this.style.getSky()}setFeatureState(u,Xe){return this.style.setFeatureState(u,Xe),this._update()}removeFeatureState(u,Xe){return this.style.removeFeatureState(u,Xe),this._update()}getFeatureState(u){return this.style.getFeatureState(u)}getContainer(){return this._container}getCanvasContainer(){return this._canvasContainer}getCanvas(){return this._canvas}_containerDimensions(){let u=0,Xe=0;return this._container&&(u=this._container.clientWidth||400,Xe=this._container.clientHeight||300),[u,Xe]}_setupContainer(){const u=this._container;u.classList.add("maplibregl-map");const Xe=this._canvasContainer=r.create("div","maplibregl-canvas-container",u);this._interactive&&Xe.classList.add("maplibregl-interactive"),this._canvas=r.create("canvas","maplibregl-canvas",Xe),this._canvas.addEventListener("webglcontextlost",this._contextLost,!1),this._canvas.addEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.setAttribute("tabindex",this._interactive?"0":"-1"),this._canvas.setAttribute("aria-label",this._getUIString("Map.Title")),this._canvas.setAttribute("role","region");const Wt=this._containerDimensions(),fr=this._getClampedPixelRatio(Wt[0],Wt[1]);this._resizeCanvas(Wt[0],Wt[1],fr);const _r=this._controlContainer=r.create("div","maplibregl-control-container",u),wr=this._controlPositions={};["top-left","top-right","bottom-left","bottom-right"].forEach((u=>{wr[u]=r.create("div",`maplibregl-ctrl-${u} `,_r)})),this._container.addEventListener("scroll",this._onMapScroll,!1)}_resizeCanvas(u,Xe,Wt){this._canvas.width=Math.floor(Wt*u),this._canvas.height=Math.floor(Wt*Xe),this._canvas.style.width=`${u}px`,this._canvas.style.height=`${Xe}px`}_setupPainter(){const u={alpha:!0,stencil:!0,depth:!0,failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer,antialias:this._antialias||!1};let Xe=null;this._canvas.addEventListener("webglcontextcreationerror",(Wt=>{Xe={requestedAttributes:u},Wt&&(Xe.statusMessage=Wt.statusMessage,Xe.type=Wt.type)}),{once:!0});const Wt=this._canvas.getContext("webgl2",u)||this._canvas.getContext("webgl",u);if(!Wt){const u="Failed to initialize WebGL";throw Xe?(Xe.message=u,new Error(JSON.stringify(Xe))):new Error(u)}this.painter=new va(Wt,this.transform),Ar.testSupport(Wt)}loaded(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()}_update(u){return this.style&&this.style._loaded?(this._styleDirty=this._styleDirty||u,this._sourcesDirty=!0,this.triggerRepaint(),this):this}_requestRenderFrame(u){return this._update(),this._renderTaskQueue.add(u)}_cancelRenderFrame(u){this._renderTaskQueue.remove(u)}_render(u){const Wt=this._idleTriggered?this._fadeDuration:0;if(this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(u),this._removed)return;let fr=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;const u=this.transform.zoom,_r=wr.now();this.style.zoomHistory.update(u,_r);const Ar=new Xe.z(u,{now:_r,fadeDuration:Wt,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),Kr=Ar.crossFadingFactor();1===Kr&&Kr===this._crossFadingFactor||(fr=!0,this._crossFadingFactor=Kr),this.style.update(Ar)}this.style&&this._sourcesDirty&&(this._sourcesDirty=!1,this.style._updateSources(this.transform)),this.terrain?(this.terrain.sourceCache.update(this.transform,this.terrain),this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this._elevationFreeze||(this.transform.elevation=this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom))):(this.transform.minElevationForCurrentTile=0,this.transform.elevation=0),this._placementDirty=this.style&&this.style._updatePlacement(this.painter.transform,this.showCollisionBoxes,Wt,this._crossSourceCollisions),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:Wt,showPadding:this.showPadding}),this.fire(new Xe.k("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,Xe.bf.mark(Xe.bg.load),this.fire(new Xe.k("load"))),this.style&&(this.style.hasTransitions()||fr)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles();const _r=this._sourcesDirty||this._styleDirty||this._placementDirty;return _r||this._repaint?this.triggerRepaint():!this.isMoving()&&this.loaded()&&this.fire(new Xe.k("idle")),!this._loaded||this._fullyLoaded||_r||(this._fullyLoaded=!0,Xe.bf.mark(Xe.bg.fullLoad)),this}redraw(){return this.style&&(this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._render(0)),this}remove(){var u;this._hash&&this._hash.remove();for(const u of this._controls)u.onRemove(this);this._controls=[],this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._renderTaskQueue.clear(),this.painter.destroy(),this.handlers.destroy(),delete this.handlers,this.setStyle(null),"undefined"!=typeof window&&removeEventListener("online",this._onWindowOnline,!1),oo.removeThrottleControl(this._imageQueueHandle),null===(u=this._resizeObserver)||void 0===u||u.disconnect();const Wt=this.painter.context.gl.getExtension("WEBGL_lose_context");(null==Wt?void 0:Wt.loseContext)&&Wt.loseContext(),this._canvas.removeEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.removeEventListener("webglcontextlost",this._contextLost,!1),r.remove(this._canvasContainer),r.remove(this._controlContainer),this._container.classList.remove("maplibregl-map"),Xe.bf.clearMetrics(),this._removed=!0,this.fire(new Xe.k("remove"))}triggerRepaint(){this.style&&!this._frameRequest&&(this._frameRequest=new AbortController,wr.frameAsync(this._frameRequest).then((u=>{Xe.bf.frame(u),this._frameRequest=null,this._render(u)})).catch((()=>{})))}get showTileBoundaries(){return!!this._showTileBoundaries}set showTileBoundaries(u){this._showTileBoundaries!==u&&(this._showTileBoundaries=u,this._update())}get showPadding(){return!!this._showPadding}set showPadding(u){this._showPadding!==u&&(this._showPadding=u,this._update())}get showCollisionBoxes(){return!!this._showCollisionBoxes}set showCollisionBoxes(u){this._showCollisionBoxes!==u&&(this._showCollisionBoxes=u,u?this.style._generateCollisionBoxes():this._update())}get showOverdrawInspector(){return!!this._showOverdrawInspector}set showOverdrawInspector(u){this._showOverdrawInspector!==u&&(this._showOverdrawInspector=u,this._update())}get repaint(){return!!this._repaint}set repaint(u){this._repaint!==u&&(this._repaint=u,this.triggerRepaint())}get vertices(){return!!this._vertices}set vertices(u){this._vertices=u,this._update()}get version(){return zu}getCameraTargetElevation(){return this.transform.elevation}},u.MapMouseEvent=ka,u.MapTouchEvent=La,u.MapWheelEvent=Fa,u.Marker=Vs,u.NavigationControl=class{constructor(u){this._updateZoomButtons=()=>{const u=this._map.getZoom(),Xe=u===this._map.getMaxZoom(),Wt=u===this._map.getMinZoom();this._zoomInButton.disabled=Xe,this._zoomOutButton.disabled=Wt,this._zoomInButton.setAttribute("aria-disabled",Xe.toString()),this._zoomOutButton.setAttribute("aria-disabled",Wt.toString())},this._rotateCompassArrow=()=>{const u=this.options.visualizePitch?`scale(${1/Math.pow(Math.cos(this._map.transform.pitch*(Math.PI/180)),.5)}) rotateX(${this._map.transform.pitch}deg) rotateZ(${this._map.transform.angle*(180/Math.PI)}deg)`:`rotate(${this._map.transform.angle*(180/Math.PI)}deg)`;this._compassIcon.style.transform=u},this._setButtonTitle=(u,Xe)=>{const Wt=this._map._getUIString(`NavigationControl.${Xe}`);u.title=Wt,u.setAttribute("aria-label",Wt)},this.options=Xe.e({},Du,u),this._container=r.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._container.addEventListener("contextmenu",(u=>u.preventDefault())),this.options.showZoom&&(this._zoomInButton=this._createButton("maplibregl-ctrl-zoom-in",(u=>this._map.zoomIn({},{originalEvent:u}))),r.create("span","maplibregl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden","true"),this._zoomOutButton=this._createButton("maplibregl-ctrl-zoom-out",(u=>this._map.zoomOut({},{originalEvent:u}))),r.create("span","maplibregl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden","true")),this.options.showCompass&&(this._compass=this._createButton("maplibregl-ctrl-compass",(u=>{this.options.visualizePitch?this._map.resetNorthPitch({},{originalEvent:u}):this._map.resetNorth({},{originalEvent:u})})),this._compassIcon=r.create("span","maplibregl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden","true"))}onAdd(u){return this._map=u,this.options.showZoom&&(this._setButtonTitle(this._zoomInButton,"ZoomIn"),this._setButtonTitle(this._zoomOutButton,"ZoomOut"),this._map.on("zoom",this._updateZoomButtons),this._updateZoomButtons()),this.options.showCompass&&(this._setButtonTitle(this._compass,"ResetBearing"),this.options.visualizePitch&&this._map.on("pitch",this._rotateCompassArrow),this._map.on("rotate",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new Ns(this._map,this._compass,this.options.visualizePitch)),this._container}onRemove(){r.remove(this._container),this.options.showZoom&&this._map.off("zoom",this._updateZoomButtons),this.options.showCompass&&(this.options.visualizePitch&&this._map.off("pitch",this._rotateCompassArrow),this._map.off("rotate",this._rotateCompassArrow),this._handler.off(),delete this._handler),delete this._map}_createButton(u,Xe){const Wt=r.create("button",u,this._container);return Wt.type="button",Wt.addEventListener("click",Xe),Wt}},u.Popup=class extends Xe.E{constructor(u){super(),this.remove=()=>(this._content&&r.remove(this._content),this._container&&(r.remove(this._container),delete this._container),this._map&&(this._map.off("move",this._update),this._map.off("move",this._onClose),this._map.off("click",this._onClose),this._map.off("remove",this.remove),this._map.off("mousemove",this._onMouseMove),this._map.off("mouseup",this._onMouseUp),this._map.off("drag",this._onDrag),this._map._canvasContainer.classList.remove("maplibregl-track-pointer"),delete this._map,this.fire(new Xe.k("close"))),this),this._onMouseUp=u=>{this._update(u.point)},this._onMouseMove=u=>{this._update(u.point)},this._onDrag=u=>{this._update(u.point)},this._update=u=>{var Xe;if(!this._map||!this._lngLat&&!this._trackPointer||!this._content)return;if(!this._container){if(this._container=r.create("div","maplibregl-popup",this._map.getContainer()),this._tip=r.create("div","maplibregl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className)for(const u of this.options.className.split(" "))this._container.classList.add(u);this._closeButton&&this._closeButton.setAttribute("aria-label",this._map._getUIString("Popup.Close")),this._trackPointer&&this._container.classList.add("maplibregl-popup-track-pointer")}if(this.options.maxWidth&&this._container.style.maxWidth!==this.options.maxWidth&&(this._container.style.maxWidth=this.options.maxWidth),this._lngLat=this._map.transform.renderWorldCopies&&!this._trackPointer?js(this._lngLat,this._flatPos,this._map.transform):null===(Xe=this._lngLat)||void 0===Xe?void 0:Xe.wrap(),this._trackPointer&&!u)return;const Wt=this._flatPos=this._pos=this._trackPointer&&u?u:this._map.project(this._lngLat);this._map.terrain&&(this._flatPos=this._trackPointer&&u?u:this._map.transform.locationPoint(this._lngLat));let fr=this.options.anchor;const _r=Qs(this.options.offset);if(!fr){const u=this._container.offsetWidth,Xe=this._container.offsetHeight;let wr;wr=Wt.y+_r.bottom.y<Xe?["top"]:Wt.y>this._map.transform.height-Xe?["bottom"]:[],Wt.x<u/2?wr.push("left"):Wt.x>this._map.transform.width-u/2&&wr.push("right"),fr=0===wr.length?"bottom":wr.join("-")}let wr=Wt.add(_r[fr]);this.options.subpixelPositioning||(wr=wr.round()),r.setTransform(this._container,`${Nu[fr]} translate(${wr.x}px,${wr.y}px)`),qs(this._container,fr,"popup")},this._onClose=()=>{this.remove()},this.options=Xe.e(Object.create(id),u)}addTo(u){return this._map&&this.remove(),this._map=u,this.options.closeOnClick&&this._map.on("click",this._onClose),this.options.closeOnMove&&this._map.on("move",this._onClose),this._map.on("remove",this.remove),this._update(),this._focusFirstElement(),this._trackPointer?(this._map.on("mousemove",this._onMouseMove),this._map.on("mouseup",this._onMouseUp),this._container&&this._container.classList.add("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.add("maplibregl-track-pointer")):this._map.on("move",this._update),this.fire(new Xe.k("open")),this}isOpen(){return!!this._map}getLngLat(){return this._lngLat}setLngLat(u){return this._lngLat=Xe.N.convert(u),this._pos=null,this._flatPos=null,this._trackPointer=!1,this._update(),this._map&&(this._map.on("move",this._update),this._map.off("mousemove",this._onMouseMove),this._container&&this._container.classList.remove("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.remove("maplibregl-track-pointer")),this}trackPointer(){return this._trackPointer=!0,this._pos=null,this._flatPos=null,this._update(),this._map&&(this._map.off("move",this._update),this._map.on("mousemove",this._onMouseMove),this._map.on("drag",this._onDrag),this._container&&this._container.classList.add("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.add("maplibregl-track-pointer")),this}getElement(){return this._container}setText(u){return this.setDOMContent(document.createTextNode(u))}setHTML(u){const Xe=document.createDocumentFragment(),Wt=document.createElement("body");let fr;for(Wt.innerHTML=u;fr=Wt.firstChild,fr;)Xe.appendChild(fr);return this.setDOMContent(Xe)}getMaxWidth(){var u;return null===(u=this._container)||void 0===u?void 0:u.style.maxWidth}setMaxWidth(u){return this.options.maxWidth=u,this._update(),this}setDOMContent(u){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=r.create("div","maplibregl-popup-content",this._container);return this._content.appendChild(u),this._createCloseButton(),this._update(),this._focusFirstElement(),this}addClassName(u){return this._container&&this._container.classList.add(u),this}removeClassName(u){return this._container&&this._container.classList.remove(u),this}setOffset(u){return this.options.offset=u,this._update(),this}toggleClassName(u){if(this._container)return this._container.classList.toggle(u)}setSubpixelPositioning(u){this.options.subpixelPositioning=u}_createCloseButton(){this.options.closeButton&&(this._closeButton=r.create("button","maplibregl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.innerHTML="&#215;",this._closeButton.addEventListener("click",this._onClose))}_focusFirstElement(){if(!this.options.focusAfterOpen||!this._container)return;const u=this._container.querySelector(sd);u&&u.focus()}},u.RasterDEMTileSource=K,u.RasterTileSource=X,u.ScaleControl=class{constructor(u){this._onMove=()=>{Xs(this._map,this._container,this.options)},this.setUnit=u=>{this.options.unit=u,Xs(this._map,this._container,this.options)},this.options=Object.assign(Object.assign({},td),u)}getDefaultPosition(){return"bottom-left"}onAdd(u){return this._map=u,this._container=r.create("div","maplibregl-ctrl maplibregl-ctrl-scale",u.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container}onRemove(){r.remove(this._container),this._map.off("move",this._onMove),this._map=void 0}},u.ScrollZoomHandler=us,u.Style=de,u.TerrainControl=class{constructor(u){this._toggleTerrain=()=>{this._map.getTerrain()?this._map.setTerrain(null):this._map.setTerrain(this.options),this._updateTerrainIcon()},this._updateTerrainIcon=()=>{this._terrainButton.classList.remove("maplibregl-ctrl-terrain"),this._terrainButton.classList.remove("maplibregl-ctrl-terrain-enabled"),this._map.terrain?(this._terrainButton.classList.add("maplibregl-ctrl-terrain-enabled"),this._terrainButton.title=this._map._getUIString("TerrainControl.Disable")):(this._terrainButton.classList.add("maplibregl-ctrl-terrain"),this._terrainButton.title=this._map._getUIString("TerrainControl.Enable"))},this.options=u}onAdd(u){return this._map=u,this._container=r.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._terrainButton=r.create("button","maplibregl-ctrl-terrain",this._container),r.create("span","maplibregl-ctrl-icon",this._terrainButton).setAttribute("aria-hidden","true"),this._terrainButton.type="button",this._terrainButton.addEventListener("click",this._toggleTerrain),this._updateTerrainIcon(),this._map.on("terrain",this._updateTerrainIcon),this._container}onRemove(){r.remove(this._container),this._map.off("terrain",this._updateTerrainIcon),this._map=void 0}},u.TwoFingersTouchPitchHandler=rs,u.TwoFingersTouchRotateHandler=ss,u.TwoFingersTouchZoomHandler=is,u.TwoFingersTouchZoomRotateHandler=gs,u.VectorTileSource=$,u.VideoSource=tt,u.addSourceType=(u,Wt)=>Xe._(void 0,void 0,void 0,(function*(){if(at(u))throw new Error(`A source type called "${u}" already exists.`);((u,Xe)=>{zo[u]=Xe})(u,Wt)})),u.clearPrewarmedResources=function(){const u=ko;u&&(u.isPreloaded()&&1===u.numActive()?(u.release(go),ko=null):console.warn("Could not clear WebWorkers since there are active Map instances that still reference it. The pre-warmed WebWorker pool can only be cleared when all map instances have been removed with map.remove()"))},u.getMaxParallelImageRequests=function(){return Xe.a.MAX_PARALLEL_IMAGE_REQUESTS},u.getRTLTextPluginStatus=function(){return nt().getRTLTextPluginStatus()},u.getVersion=function(){return ld},u.getWorkerCount=function(){return L.workerCount},u.getWorkerUrl=function(){return Xe.a.WORKER_URL},u.importScriptInWorkers=function(u){return j().broadcast("IS",u)},u.prewarm=function(){N().acquire(go)},u.setMaxParallelImageRequests=function(u){Xe.a.MAX_PARALLEL_IMAGE_REQUESTS=u},u.setRTLTextPlugin=function(u,Xe){return nt().setRTLTextPlugin(u,Xe)},u.setWorkerCount=function(u){L.workerCount=u},u.setWorkerUrl=function(u){Xe.a.WORKER_URL=u}})),u}()},8168:function(u,Xe,Wt){"use strict";function _extends(){return _extends=Object.assign?Object.assign.bind():function(u){for(var Xe=1;Xe<arguments.length;Xe++){var Wt=arguments[Xe];for(var fr in Wt)({}).hasOwnProperty.call(Wt,fr)&&(u[fr]=Wt[fr])}return u},_extends.apply(null,arguments)}Wt.d(Xe,{A:function(){return _extends}})},8587:function(u,Xe,Wt){"use strict";function _objectWithoutPropertiesLoose(u,Xe){if(null==u)return{};var Wt={};for(var fr in u)if({}.hasOwnProperty.call(u,fr)){if(Xe.includes(fr))continue;Wt[fr]=u[fr]}return Wt}Wt.d(Xe,{A:function(){return _objectWithoutPropertiesLoose}})},4164:function(u,Xe,Wt){"use strict";function r(u){var Xe,Wt,fr="";if("string"==typeof u||"number"==typeof u)fr+=u;else if("object"==typeof u)if(Array.isArray(u)){var _r=u.length;for(Xe=0;Xe<_r;Xe++)u[Xe]&&(Wt=r(u[Xe]))&&(fr&&(fr+=" "),fr+=Wt)}else for(Wt in u)u[Wt]&&(fr&&(fr+=" "),fr+=Wt);return fr}Xe.A=function clsx(){for(var u,Xe,Wt=0,fr="",_r=arguments.length;Wt<_r;Wt++)(u=arguments[Wt])&&(Xe=r(u))&&(fr&&(fr+=" "),fr+=Xe);return fr}}},fr={};function __webpack_require__(u){var Xe=fr[u];if(void 0!==Xe)return Xe.exports;var _r=fr[u]={exports:{}};return Wt[u].call(_r.exports,_r,_r.exports,__webpack_require__),_r.exports}__webpack_require__.n=function(u){var Xe=u&&u.__esModule?function(){return u.default}:function(){return u};return __webpack_require__.d(Xe,{a:Xe}),Xe},Xe=Object.getPrototypeOf?function(u){return Object.getPrototypeOf(u)}:function(u){return u.__proto__},__webpack_require__.t=function(Wt,fr){if(1&fr&&(Wt=this(Wt)),8&fr)return Wt;if("object"==typeof Wt&&Wt){if(4&fr&&Wt.__esModule)return Wt;if(16&fr&&"function"==typeof Wt.then)return Wt}var _r=Object.create(null);__webpack_require__.r(_r);var wr={};u=u||[null,Xe({}),Xe([]),Xe(Xe)];for(var Ar=2&fr&&Wt;"object"==typeof Ar&&!~u.indexOf(Ar);Ar=Xe(Ar))Object.getOwnPropertyNames(Ar).forEach((function(u){wr[u]=function(){return Wt[u]}}));return wr.default=function(){return Wt},__webpack_require__.d(_r,wr),_r},__webpack_require__.d=function(u,Xe){for(var Wt in Xe)__webpack_require__.o(Xe,Wt)&&!__webpack_require__.o(u,Wt)&&Object.defineProperty(u,Wt,{enumerable:!0,get:Xe[Wt]})},__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(u){if("object"==typeof window)return window}}(),__webpack_require__.o=function(u,Xe){return Object.prototype.hasOwnProperty.call(u,Xe)},__webpack_require__.r=function(u){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(u,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(u,"__esModule",{value:!0})},__webpack_require__.p="https://cdn.jsdelivr.net/npm/jmapcloud-jakartowns@2.1.2/public/",function(){"use strict";var u={};function _newArrowCheck(u,Xe){if(u!==Xe)throw new TypeError("Cannot instantiate an arrow function")}__webpack_require__.r(u),__webpack_require__.d(u,{hasBrowserEnv:function(){return k_},hasStandardBrowserEnv:function(){return T_},hasStandardBrowserWebWorkerEnv:function(){return E_},navigator:function(){return A_},origin:function(){return C_}});var Xe=__webpack_require__(9898);const Wt="https://account.jakarto.com",fr="https://maps.jakarto.com",_r="Jakarto";var wr;!function(u){u.JAKARTO_MAP_DESTROY_UI="JAKARTO-MAP-DESTROY-UI",u.JAKARTO_MAP_ZOOM_CHANGE="JAKARTO-MAP-ZOOM-CHANGE"}(wr||(wr={}));const Ar="jakartowns-spheres-layer",Kr="jakartowns-spheres-source",In="https://maps.jakarto.com/tiles/data/spheres.json",no="spheres",io="https://tiles.jakarto.com/v1/wmts";var oo;!function(u){u.ALL="ALL",u.YEAR_2019="2019",u.YEAR_2020="2020",u.YEAR_2021="2021",u.YEAR_2022="2022"}(oo||(oo={}));const ao=[oo.ALL,oo.YEAR_2022,oo.YEAR_2021,oo.YEAR_2020,oo.YEAR_2019];function getAllWMTSYearVariables(){return ao.slice()}var so;!function(u){u.DEFAULT="Style de base",u.INTENSITE_MAX="Intensite maximale",u.PTS_BAS="Points les plus bas",u.INTENSITE_MAX_PTS_BAS="Intensite maximale des points bas",u.VERTICALITY="Verticalite"}(so||(so={}));const co=[so.DEFAULT,so.INTENSITE_MAX,so.PTS_BAS,so.INTENSITE_MAX_PTS_BAS,so.VERTICALITY];function getAllWMTSStyleVariables(){return co.slice()}function getDefaultLayerState(){return{isVectorLayerVisible:!0,allWMTSByYear:{[oo.YEAR_2019]:{isVisible:!1,isStyleExpanded:!1,selectedStyle:so.DEFAULT},[oo.YEAR_2020]:{isVisible:!1,isStyleExpanded:!1,selectedStyle:so.DEFAULT},[oo.YEAR_2021]:{isVisible:!1,isStyleExpanded:!1,selectedStyle:so.DEFAULT},[oo.YEAR_2022]:{isVisible:!1,isStyleExpanded:!1,selectedStyle:so.DEFAULT},[oo.ALL]:{isVisible:!0,isStyleExpanded:!1,selectedStyle:so.DEFAULT}},zoomLevel:-1}}function getDefaultViewerState(){return{parameters:{location:window.JMAP_OPTIONS?.map?.center||{x:0,y:0}},isInteractorActive:!1,isVisible:!0,isLoading:!0,isAuthenticated:!1}}var ho;!function(u){u.JAKARTO_RESET_STATE="JAKARTO_RESET_STATE",u.JAKARTO_ENABLE_STATE_EXTENSION="JAKARTO_ENABLE_STATE_EXTENSION",u.JAKARTO_VIEWER_SET_IS_INTERACTOR_ACTIVE="JAKARTO_VIEWER_SET_IS_INTERACTOR_ACTIVE",u.JAKARTO_VIEWER_SET_IS_VISIBLE="JAKARTO_VIEWER_SET_IS_VISIBLE",u.JAKARTO_VIEWER_SET_PARAMETERS="JAKARTO_VIEWER_SET_PARAMETERS",u.JAKARTO_VIEWER_SET_IS_LOADING="JAKARTO_VIEWER_SET_IS_LOADING",u.JAKARTO_VIEWER_SET_IS_AUTH="JAKARTO_VIEWER_SET_IS_AUTH",u.JAKARTO_LAYER_SET_IS_VECTOR_LAYER_VISIBLE="JAKARTO_LAYER_SET_IS_VECTOR_LAYER_VISIBLE",u.JAKARTO_LAYER_SET_WMTS_LAYER_VISIBILITY="JAKARTO_LAYER_SET_WMTS_LAYER_VISIBILITY",u.JAKARTO_LAYER_SET_WMTS_LAYER_EXPANSION="JAKARTO_LAYER_SET_WMTS_LAYER_EXPANSION",u.JAKARTO_LAYER_SELECT_WMTS_LAYER_STYLE="JAKARTO_LAYER_SELECT_WMTS_LAYER_STYLE",u.JAKARTO_LAYER_SET_ZOOM_LEVEL="JAKARTO_LAYER_SET_ZOOM_LEVEL"}(ho||(ho={}));const actions_extensionActionCreator_enableStateExtension=function(u){return{type:ho.JAKARTO_ENABLE_STATE_EXTENSION,isExtensionEnabled:u}};function store_getStore(){return JMap.getDataStore()}function getAppState(u){return u||(u=store_getStore().getState()),u.external.jmap_app}function getExtensionState(u){return u||(u=store_getStore().getState()),u.external[_r]}function getDefaultExtensionState(){return{main:{serverExtensionVersion:"unknown",isExtensionEnabled:!1},viewer:getDefaultViewerState(),layer:getDefaultLayerState()}}var go=__webpack_require__(4865),xo=__webpack_require__(7312);const noop=()=>{};let ko={},Co={},Io=null,zo={mark:noop,measure:noop};try{"undefined"!=typeof window&&(ko=window),"undefined"!=typeof document&&(Co=document),"undefined"!=typeof MutationObserver&&(Io=MutationObserver),"undefined"!=typeof performance&&(zo=performance)}catch(u){}const{userAgent:Bo=""}=ko.navigator||{},ca=ko,ua=Co,Da=Io,ns=zo,yl=(ca.document,!!ua.documentElement&&!!ua.head&&"function"==typeof ua.addEventListener&&"function"==typeof ua.createElement),vl=~Bo.indexOf("MSIE")||~Bo.indexOf("Trident/");var kl="classic",Al="duotone",Ml="sharp",Rl="sharp-duotone",Ol=[kl,Al,Ml,Rl],Ll={fak:"kit","fa-kit":"kit"},Dl={fakd:"kit-duotone","fa-kit-duotone":"kit-duotone"},Bl={classic:{fa:"solid",fas:"solid","fa-solid":"solid",far:"regular","fa-regular":"regular",fal:"light","fa-light":"light",fat:"thin","fa-thin":"thin",fad:"duotone","fa-duotone":"duotone",fab:"brands","fa-brands":"brands"},sharp:{fa:"solid",fass:"solid","fa-solid":"solid",fasr:"regular","fa-regular":"regular",fasl:"light","fa-light":"light",fast:"thin","fa-thin":"thin"},"sharp-duotone":{fa:"solid",fasds:"solid","fa-solid":"solid"}},Nl=[1,2,3,4,5,6,7,8,9,10],Vl=Nl.concat([11,12,13,14,15,16,17,18,19,20]),Ul={GROUP:"duotone-group",SWAP_OPACITY:"swap-opacity",PRIMARY:"primary",SECONDARY:"secondary"},$l=[...Object.keys({classic:["fas","far","fal","fat"],sharp:["fass","fasr","fasl","fast"],"sharp-duotone":["fasds"]}),"solid","regular","light","thin","duotone","brands","2xs","xs","sm","lg","xl","2xl","beat","border","fade","beat-fade","bounce","flip-both","flip-horizontal","flip-vertical","flip","fw","inverse","layers-counter","layers-text","layers","li","pull-left","pull-right","pulse","rotate-180","rotate-270","rotate-90","rotate-by","shake","spin-pulse","spin-reverse","spin","stack-1x","stack-2x","stack","ul",Ul.GROUP,Ul.SWAP_OPACITY,Ul.PRIMARY,Ul.SECONDARY].concat(Nl.map((u=>"".concat(u,"x")))).concat(Vl.map((u=>"w-".concat(u)))),Wl={kit:"fak"},Zl={"kit-duotone":"fakd"};const Gl="___FONT_AWESOME___",Xl=16,Jl="svg-inline--fa",Ql="data-fa-i2svg",rc="data-fa-pseudo-element",ic="data-prefix",oc="data-icon",lc="fontawesome-i2svg",gc=["HTML","HEAD","STYLE","SCRIPT"],bc=(()=>{try{return!0}catch(u){return!1}})(),eu=[kl,Ml,Rl];function familyProxy(u){return new Proxy(u,{get:(u,Xe)=>Xe in u?u[Xe]:u[kl]})}const tu={...Bl};tu[kl]={...Bl[kl],...Ll,...Dl};const nu=familyProxy(tu),iu={classic:{solid:"fas",regular:"far",light:"fal",thin:"fat",duotone:"fad",brands:"fab"},sharp:{solid:"fass",regular:"fasr",light:"fasl",thin:"fast"},"sharp-duotone":{solid:"fasds"}};iu[kl]={...iu[kl],...Wl,...Zl};const su=familyProxy(iu),cu={classic:{fab:"fa-brands",fad:"fa-duotone",fal:"fa-light",far:"fa-regular",fas:"fa-solid",fat:"fa-thin"},sharp:{fass:"fa-solid",fasr:"fa-regular",fasl:"fa-light",fast:"fa-thin"},"sharp-duotone":{fasds:"fa-solid"}};cu[kl]={...cu[kl],fak:"fa-kit"};const uu=familyProxy(cu),hu={classic:{"fa-brands":"fab","fa-duotone":"fad","fa-light":"fal","fa-regular":"far","fa-solid":"fas","fa-thin":"fat"},sharp:{"fa-solid":"fass","fa-regular":"fasr","fa-light":"fasl","fa-thin":"fast"},"sharp-duotone":{"fa-solid":"fasds"}};hu[kl]={...hu[kl],"fa-kit":"fak"};const Iu=familyProxy(hu),zu=/fa(s|r|l|t|d|b|k|kd|ss|sr|sl|st|sds)?[\-\ ]/,Lu="fa-layers-text",Du=/Font ?Awesome ?([56 ]*)(Solid|Regular|Light|Thin|Duotone|Brands|Free|Pro|Sharp Duotone|Sharp|Kit)?.*/i,Fu=(familyProxy({classic:{900:"fas",400:"far",normal:"far",300:"fal",100:"fat"},sharp:{900:"fass",400:"fasr",300:"fasl",100:"fast"},"sharp-duotone":{900:"fasds"}}),["class","data-prefix","data-icon","data-fa-transform","data-fa-mask"]),Nu=Ul,Vu=new Set;Object.keys(su[kl]).map(Vu.add.bind(Vu)),Object.keys(su[Ml]).map(Vu.add.bind(Vu)),Object.keys(su[Rl]).map(Vu.add.bind(Vu));const Uu=["kit",...$l],qu=ca.FontAwesomeConfig||{};if(ua&&"function"==typeof ua.querySelector){[["data-family-prefix","familyPrefix"],["data-css-prefix","cssPrefix"],["data-family-default","familyDefault"],["data-style-default","styleDefault"],["data-replacement-class","replacementClass"],["data-auto-replace-svg","autoReplaceSvg"],["data-auto-add-css","autoAddCss"],["data-auto-a11y","autoA11y"],["data-search-pseudo-elements","searchPseudoElements"],["data-observe-mutations","observeMutations"],["data-mutate-approach","mutateApproach"],["data-keep-original-source","keepOriginalSource"],["data-measure-performance","measurePerformance"],["data-show-missing-icons","showMissingIcons"]].forEach((u=>{let[Xe,Wt]=u;const fr=function coerce(u){return""===u||"false"!==u&&("true"===u||u)}(function getAttrConfig(u){var Xe=ua.querySelector("script["+u+"]");if(Xe)return Xe.getAttribute(u)}(Xe));null!=fr&&(qu[Wt]=fr)}))}const td={styleDefault:"solid",familyDefault:"classic",cssPrefix:"fa",replacementClass:Jl,autoReplaceSvg:!0,autoAddCss:!0,autoA11y:!0,searchPseudoElements:!1,observeMutations:!0,mutateApproach:"async",keepOriginalSource:!0,measurePerformance:!1,showMissingIcons:!0};qu.familyPrefix&&(qu.cssPrefix=qu.familyPrefix);const id={...td,...qu};id.autoReplaceSvg||(id.observeMutations=!1);const sd={};Object.keys(td).forEach((u=>{Object.defineProperty(sd,u,{enumerable:!0,set:function(Xe){id[u]=Xe,ld.forEach((u=>u(sd)))},get:function(){return id[u]}})})),Object.defineProperty(sd,"familyPrefix",{enumerable:!0,set:function(u){id.cssPrefix=u,ld.forEach((u=>u(sd)))},get:function(){return id.cssPrefix}}),ca.FontAwesomeConfig=sd;const ld=[];const cd=Xl,ud={size:16,x:0,y:0,rotate:0,flipX:!1,flipY:!1};function nextUniqueId(){let u=12,Xe="";for(;u-- >0;)Xe+="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"[62*Math.random()|0];return Xe}function toArray(u){const Xe=[];for(let Wt=(u||[]).length>>>0;Wt--;)Xe[Wt]=u[Wt];return Xe}function classArray(u){return u.classList?toArray(u.classList):(u.getAttribute("class")||"").split(" ").filter((u=>u))}function htmlEscape(u){return"".concat(u).replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&#39;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function joinStyles(u){return Object.keys(u||{}).reduce(((Xe,Wt)=>Xe+"".concat(Wt,": ").concat(u[Wt].trim(),";")),"")}function transformIsMeaningful(u){return u.size!==ud.size||u.x!==ud.x||u.y!==ud.y||u.rotate!==ud.rotate||u.flipX||u.flipY}function css(){const u="fa",Xe=Jl,Wt=sd.cssPrefix,fr=sd.replacementClass;let _r=':root, :host {\n --fa-font-solid: normal 900 1em/1 "Font Awesome 6 Free";\n --fa-font-regular: normal 400 1em/1 "Font Awesome 6 Free";\n --fa-font-light: normal 300 1em/1 "Font Awesome 6 Pro";\n --fa-font-thin: normal 100 1em/1 "Font Awesome 6 Pro";\n --fa-font-duotone: normal 900 1em/1 "Font Awesome 6 Duotone";\n --fa-font-brands: normal 400 1em/1 "Font Awesome 6 Brands";\n --fa-font-sharp-solid: normal 900 1em/1 "Font Awesome 6 Sharp";\n --fa-font-sharp-regular: normal 400 1em/1 "Font Awesome 6 Sharp";\n --fa-font-sharp-light: normal 300 1em/1 "Font Awesome 6 Sharp";\n --fa-font-sharp-thin: normal 100 1em/1 "Font Awesome 6 Sharp";\n --fa-font-sharp-duotone-solid: normal 900 1em/1 "Font Awesome 6 Sharp Duotone";\n}\n\nsvg:not(:root).svg-inline--fa, svg:not(:host).svg-inline--fa {\n overflow: visible;\n box-sizing: content-box;\n}\n\n.svg-inline--fa {\n display: var(--fa-display, inline-block);\n height: 1em;\n overflow: visible;\n vertical-align: -0.125em;\n}\n.svg-inline--fa.fa-2xs {\n vertical-align: 0.1em;\n}\n.svg-inline--fa.fa-xs {\n vertical-align: 0em;\n}\n.svg-inline--fa.fa-sm {\n vertical-align: -0.0714285705em;\n}\n.svg-inline--fa.fa-lg {\n vertical-align: -0.2em;\n}\n.svg-inline--fa.fa-xl {\n vertical-align: -0.25em;\n}\n.svg-inline--fa.fa-2xl {\n vertical-align: -0.3125em;\n}\n.svg-inline--fa.fa-pull-left {\n margin-right: var(--fa-pull-margin, 0.3em);\n width: auto;\n}\n.svg-inline--fa.fa-pull-right {\n margin-left: var(--fa-pull-margin, 0.3em);\n width: auto;\n}\n.svg-inline--fa.fa-li {\n width: var(--fa-li-width, 2em);\n top: 0.25em;\n}\n.svg-inline--fa.fa-fw {\n width: var(--fa-fw-width, 1.25em);\n}\n\n.fa-layers svg.svg-inline--fa {\n bottom: 0;\n left: 0;\n margin: auto;\n position: absolute;\n right: 0;\n top: 0;\n}\n\n.fa-layers-counter, .fa-layers-text {\n display: inline-block;\n position: absolute;\n text-align: center;\n}\n\n.fa-layers {\n display: inline-block;\n height: 1em;\n position: relative;\n text-align: center;\n vertical-align: -0.125em;\n width: 1em;\n}\n.fa-layers svg.svg-inline--fa {\n transform-origin: center center;\n}\n\n.fa-layers-text {\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n transform-origin: center center;\n}\n\n.fa-layers-counter {\n background-color: var(--fa-counter-background-color, #ff253a);\n border-radius: var(--fa-counter-border-radius, 1em);\n box-sizing: border-box;\n color: var(--fa-inverse, #fff);\n line-height: var(--fa-counter-line-height, 1);\n max-width: var(--fa-counter-max-width, 5em);\n min-width: var(--fa-counter-min-width, 1.5em);\n overflow: hidden;\n padding: var(--fa-counter-padding, 0.25em 0.5em);\n right: var(--fa-right, 0);\n text-overflow: ellipsis;\n top: var(--fa-top, 0);\n transform: scale(var(--fa-counter-scale, 0.25));\n transform-origin: top right;\n}\n\n.fa-layers-bottom-right {\n bottom: var(--fa-bottom, 0);\n right: var(--fa-right, 0);\n top: auto;\n transform: scale(var(--fa-layers-scale, 0.25));\n transform-origin: bottom right;\n}\n\n.fa-layers-bottom-left {\n bottom: var(--fa-bottom, 0);\n left: var(--fa-left, 0);\n right: auto;\n top: auto;\n transform: scale(var(--fa-layers-scale, 0.25));\n transform-origin: bottom left;\n}\n\n.fa-layers-top-right {\n top: var(--fa-top, 0);\n right: var(--fa-right, 0);\n transform: scale(var(--fa-layers-scale, 0.25));\n transform-origin: top right;\n}\n\n.fa-layers-top-left {\n left: var(--fa-left, 0);\n right: auto;\n top: var(--fa-top, 0);\n transform: scale(var(--fa-layers-scale, 0.25));\n transform-origin: top left;\n}\n\n.fa-1x {\n font-size: 1em;\n}\n\n.fa-2x {\n font-size: 2em;\n}\n\n.fa-3x {\n font-size: 3em;\n}\n\n.fa-4x {\n font-size: 4em;\n}\n\n.fa-5x {\n font-size: 5em;\n}\n\n.fa-6x {\n font-size: 6em;\n}\n\n.fa-7x {\n font-size: 7em;\n}\n\n.fa-8x {\n font-size: 8em;\n}\n\n.fa-9x {\n font-size: 9em;\n}\n\n.fa-10x {\n font-size: 10em;\n}\n\n.fa-2xs {\n font-size: 0.625em;\n line-height: 0.1em;\n vertical-align: 0.225em;\n}\n\n.fa-xs {\n font-size: 0.75em;\n line-height: 0.0833333337em;\n vertical-align: 0.125em;\n}\n\n.fa-sm {\n font-size: 0.875em;\n line-height: 0.0714285718em;\n vertical-align: 0.0535714295em;\n}\n\n.fa-lg {\n font-size: 1.25em;\n line-height: 0.05em;\n vertical-align: -0.075em;\n}\n\n.fa-xl {\n font-size: 1.5em;\n line-height: 0.0416666682em;\n vertical-align: -0.125em;\n}\n\n.fa-2xl {\n font-size: 2em;\n line-height: 0.03125em;\n vertical-align: -0.1875em;\n}\n\n.fa-fw {\n text-align: center;\n width: 1.25em;\n}\n\n.fa-ul {\n list-style-type: none;\n margin-left: var(--fa-li-margin, 2.5em);\n padding-left: 0;\n}\n.fa-ul > li {\n position: relative;\n}\n\n.fa-li {\n left: calc(-1 * var(--fa-li-width, 2em));\n position: absolute;\n text-align: center;\n width: var(--fa-li-width, 2em);\n line-height: inherit;\n}\n\n.fa-border {\n border-color: var(--fa-border-color, #eee);\n border-radius: var(--fa-border-radius, 0.1em);\n border-style: var(--fa-border-style, solid);\n border-width: var(--fa-border-width, 0.08em);\n padding: var(--fa-border-padding, 0.2em 0.25em 0.15em);\n}\n\n.fa-pull-left {\n float: left;\n margin-right: var(--fa-pull-margin, 0.3em);\n}\n\n.fa-pull-right {\n float: right;\n margin-left: var(--fa-pull-margin, 0.3em);\n}\n\n.fa-beat {\n animation-name: fa-beat;\n animation-delay: var(--fa-animation-delay, 0s);\n animation-direction: var(--fa-animation-direction, normal);\n animation-duration: var(--fa-animation-duration, 1s);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-timing-function: var(--fa-animation-timing, ease-in-out);\n}\n\n.fa-bounce {\n animation-name: fa-bounce;\n animation-delay: var(--fa-animation-delay, 0s);\n animation-direction: var(--fa-animation-direction, normal);\n animation-duration: var(--fa-animation-duration, 1s);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.28, 0.84, 0.42, 1));\n}\n\n.fa-fade {\n animation-name: fa-fade;\n animation-delay: var(--fa-animation-delay, 0s);\n animation-direction: var(--fa-animation-direction, normal);\n animation-duration: var(--fa-animation-duration, 1s);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1));\n}\n\n.fa-beat-fade {\n animation-name: fa-beat-fade;\n animation-delay: var(--fa-animation-delay, 0s);\n animation-direction: var(--fa-animation-direction, normal);\n animation-duration: var(--fa-animation-duration, 1s);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1));\n}\n\n.fa-flip {\n animation-name: fa-flip;\n animation-delay: var(--fa-animation-delay, 0s);\n animation-direction: var(--fa-animation-direction, normal);\n animation-duration: var(--fa-animation-duration, 1s);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-timing-function: var(--fa-animation-timing, ease-in-out);\n}\n\n.fa-shake {\n animation-name: fa-shake;\n animation-delay: var(--fa-animation-delay, 0s);\n animation-direction: var(--fa-animation-direction, normal);\n animation-duration: var(--fa-animation-duration, 1s);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-timing-function: var(--fa-animation-timing, linear);\n}\n\n.fa-spin {\n animation-name: fa-spin;\n animation-delay: var(--fa-animation-delay, 0s);\n animation-direction: var(--fa-animation-direction, normal);\n animation-duration: var(--fa-animation-duration, 2s);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-timing-function: var(--fa-animation-timing, linear);\n}\n\n.fa-spin-reverse {\n --fa-animation-direction: reverse;\n}\n\n.fa-pulse,\n.fa-spin-pulse {\n animation-name: fa-spin;\n animation-direction: var(--fa-animation-direction, normal);\n animation-duration: var(--fa-animation-duration, 1s);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-timing-function: var(--fa-animation-timing, steps(8));\n}\n\n@media (prefers-reduced-motion: reduce) {\n .fa-beat,\n.fa-bounce,\n.fa-fade,\n.fa-beat-fade,\n.fa-flip,\n.fa-pulse,\n.fa-shake,\n.fa-spin,\n.fa-spin-pulse {\n animation-delay: -1ms;\n animation-duration: 1ms;\n animation-iteration-count: 1;\n transition-delay: 0s;\n transition-duration: 0s;\n }\n}\n@keyframes fa-beat {\n 0%, 90% {\n transform: scale(1);\n }\n 45% {\n transform: scale(var(--fa-beat-scale, 1.25));\n }\n}\n@keyframes fa-bounce {\n 0% {\n transform: scale(1, 1) translateY(0);\n }\n 10% {\n transform: scale(var(--fa-bounce-start-scale-x, 1.1), var(--fa-bounce-start-scale-y, 0.9)) translateY(0);\n }\n 30% {\n transform: scale(var(--fa-bounce-jump-scale-x, 0.9), var(--fa-bounce-jump-scale-y, 1.1)) translateY(var(--fa-bounce-height, -0.5em));\n }\n 50% {\n transform: scale(var(--fa-bounce-land-scale-x, 1.05), var(--fa-bounce-land-scale-y, 0.95)) translateY(0);\n }\n 57% {\n transform: scale(1, 1) translateY(var(--fa-bounce-rebound, -0.125em));\n }\n 64% {\n transform: scale(1, 1) translateY(0);\n }\n 100% {\n transform: scale(1, 1) translateY(0);\n }\n}\n@keyframes fa-fade {\n 50% {\n opacity: var(--fa-fade-opacity, 0.4);\n }\n}\n@keyframes fa-beat-fade {\n 0%, 100% {\n opacity: var(--fa-beat-fade-opacity, 0.4);\n transform: scale(1);\n }\n 50% {\n opacity: 1;\n transform: scale(var(--fa-beat-fade-scale, 1.125));\n }\n}\n@keyframes fa-flip {\n 50% {\n transform: rotate3d(var(--fa-flip-x, 0), var(--fa-flip-y, 1), var(--fa-flip-z, 0), var(--fa-flip-angle, -180deg));\n }\n}\n@keyframes fa-shake {\n 0% {\n transform: rotate(-15deg);\n }\n 4% {\n transform: rotate(15deg);\n }\n 8%, 24% {\n transform: rotate(-18deg);\n }\n 12%, 28% {\n transform: rotate(18deg);\n }\n 16% {\n transform: rotate(-22deg);\n }\n 20% {\n transform: rotate(22deg);\n }\n 32% {\n transform: rotate(-12deg);\n }\n 36% {\n transform: rotate(12deg);\n }\n 40%, 100% {\n transform: rotate(0deg);\n }\n}\n@keyframes fa-spin {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n}\n.fa-rotate-90 {\n transform: rotate(90deg);\n}\n\n.fa-rotate-180 {\n transform: rotate(180deg);\n}\n\n.fa-rotate-270 {\n transform: rotate(270deg);\n}\n\n.fa-flip-horizontal {\n transform: scale(-1, 1);\n}\n\n.fa-flip-vertical {\n transform: scale(1, -1);\n}\n\n.fa-flip-both,\n.fa-flip-horizontal.fa-flip-vertical {\n transform: scale(-1, -1);\n}\n\n.fa-rotate-by {\n transform: rotate(var(--fa-rotate-angle, 0));\n}\n\n.fa-stack {\n display: inline-block;\n vertical-align: middle;\n height: 2em;\n position: relative;\n width: 2.5em;\n}\n\n.fa-stack-1x,\n.fa-stack-2x {\n bottom: 0;\n left: 0;\n margin: auto;\n position: absolute;\n right: 0;\n top: 0;\n z-index: var(--fa-stack-z-index, auto);\n}\n\n.svg-inline--fa.fa-stack-1x {\n height: 1em;\n width: 1.25em;\n}\n.svg-inline--fa.fa-stack-2x {\n height: 2em;\n width: 2.5em;\n}\n\n.fa-inverse {\n color: var(--fa-inverse, #fff);\n}\n\n.sr-only,\n.fa-sr-only {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border-width: 0;\n}\n\n.sr-only-focusable:not(:focus),\n.fa-sr-only-focusable:not(:focus) {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border-width: 0;\n}\n\n.svg-inline--fa .fa-primary {\n fill: var(--fa-primary-color, currentColor);\n opacity: var(--fa-primary-opacity, 1);\n}\n\n.svg-inline--fa .fa-secondary {\n fill: var(--fa-secondary-color, currentColor);\n opacity: var(--fa-secondary-opacity, 0.4);\n}\n\n.svg-inline--fa.fa-swap-opacity .fa-primary {\n opacity: var(--fa-secondary-opacity, 0.4);\n}\n\n.svg-inline--fa.fa-swap-opacity .fa-secondary {\n opacity: var(--fa-primary-opacity, 1);\n}\n\n.svg-inline--fa mask .fa-primary,\n.svg-inline--fa mask .fa-secondary {\n fill: black;\n}\n\n.fad.fa-inverse,\n.fa-duotone.fa-inverse {\n color: var(--fa-inverse, #fff);\n}';if(Wt!==u||fr!==Xe){const wr=new RegExp("\\.".concat(u,"\\-"),"g"),Ar=new RegExp("\\--".concat(u,"\\-"),"g"),Kr=new RegExp("\\.".concat(Xe),"g");_r=_r.replace(wr,".".concat(Wt,"-")).replace(Ar,"--".concat(Wt,"-")).replace(Kr,".".concat(fr))}return _r}let dd=!1;function ensureCss(){sd.autoAddCss&&!dd&&(!function insertCss(u){if(!u||!yl)return;const Xe=ua.createElement("style");Xe.setAttribute("type","text/css"),Xe.innerHTML=u;const Wt=ua.head.childNodes;let fr=null;for(let u=Wt.length-1;u>-1;u--){const Xe=Wt[u],_r=(Xe.tagName||"").toUpperCase();["STYLE","LINK"].indexOf(_r)>-1&&(fr=Xe)}return ua.head.insertBefore(Xe,fr),u}(css()),dd=!0)}var md={mixout:()=>({dom:{css,insertCss:ensureCss}}),hooks:()=>({beforeDOMElementCreation(){ensureCss()},beforeI2svg(){ensureCss()}})};const yd=ca||{};yd[Gl]||(yd[Gl]={}),yd[Gl].styles||(yd[Gl].styles={}),yd[Gl].hooks||(yd[Gl].hooks={}),yd[Gl].shims||(yd[Gl].shims=[]);var _d=yd[Gl];const vd=[],listener=function(){ua.removeEventListener("DOMContentLoaded",listener),xd=1,vd.map((u=>u()))};let xd=!1;function toHtml(u){const{tag:Xe,attributes:Wt={},children:fr=[]}=u;return"string"==typeof u?htmlEscape(u):"<".concat(Xe," ").concat(function joinAttributes(u){return Object.keys(u||{}).reduce(((Xe,Wt)=>Xe+"".concat(Wt,'="').concat(htmlEscape(u[Wt]),'" ')),"").trim()}(Wt),">").concat(fr.map(toHtml).join(""),"</").concat(Xe,">")}function iconFromMapping(u,Xe,Wt){if(u&&u[Xe]&&u[Xe][Wt])return{prefix:Xe,iconName:Wt,icon:u[Xe][Wt]}}yl&&(xd=(ua.documentElement.doScroll?/^loaded|^c/:/^loaded|^i|^c/).test(ua.readyState),xd||ua.addEventListener("DOMContentLoaded",listener));var wd=function fastReduceObject(u,Xe,Wt,fr){var _r,wr,Ar,Kr=Object.keys(u),In=Kr.length,no=void 0!==fr?function bindInternal4(u,Xe){return function(Wt,fr,_r,wr){return u.call(Xe,Wt,fr,_r,wr)}}(Xe,fr):Xe;for(void 0===Wt?(_r=1,Ar=u[Kr[0]]):(_r=0,Ar=Wt);_r<In;_r++)Ar=no(Ar,u[wr=Kr[_r]],wr,u);return Ar};function toHex(u){const Xe=function ucs2decode(u){const Xe=[];let Wt=0;const fr=u.length;for(;Wt<fr;){const _r=u.charCodeAt(Wt++);if(_r>=55296&&_r<=56319&&Wt<fr){const fr=u.charCodeAt(Wt++);56320==(64512&fr)?Xe.push(((1023&_r)<<10)+(1023&fr)+65536):(Xe.push(_r),Wt--)}else Xe.push(_r)}return Xe}(u);return 1===Xe.length?Xe[0].toString(16):null}function normalizeIcons(u){return Object.keys(u).reduce(((Xe,Wt)=>{const fr=u[Wt];return!!fr.icon?Xe[fr.iconName]=fr.icon:Xe[Wt]=fr,Xe}),{})}function defineIcons(u,Xe){let Wt=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{skipHooks:fr=!1}=Wt,_r=normalizeIcons(Xe);"function"!=typeof _d.hooks.addPack||fr?_d.styles[u]={..._d.styles[u]||{},..._r}:_d.hooks.addPack(u,normalizeIcons(Xe)),"fas"===u&&defineIcons("fa",Xe)}const{styles:Sd,shims:kd}=_d,Ad={[kl]:Object.values(uu[kl]),[Ml]:Object.values(uu[Ml]),[Rl]:Object.values(uu[Rl])};let Td=null,Ed={},Cd={},Id={},Md={},Rd={};const Od={[kl]:Object.keys(nu[kl]),[Ml]:Object.keys(nu[Ml]),[Rl]:Object.keys(nu[Rl])};function getIconName(u,Xe){const Wt=Xe.split("-"),fr=Wt[0],_r=Wt.slice(1).join("-");return fr!==u||""===_r||function isReserved(u){return~Uu.indexOf(u)}(_r)?null:_r}const build=()=>{const lookup=u=>wd(Sd,((Xe,Wt,fr)=>(Xe[fr]=wd(Wt,u,{}),Xe)),{});Ed=lookup(((u,Xe,Wt)=>{if(Xe[3]&&(u[Xe[3]]=Wt),Xe[2]){Xe[2].filter((u=>"number"==typeof u)).forEach((Xe=>{u[Xe.toString(16)]=Wt}))}return u})),Cd=lookup(((u,Xe,Wt)=>{if(u[Wt]=Wt,Xe[2]){Xe[2].filter((u=>"string"==typeof u)).forEach((Xe=>{u[Xe]=Wt}))}return u})),Rd=lookup(((u,Xe,Wt)=>{const fr=Xe[2];return u[Wt]=Wt,fr.forEach((Xe=>{u[Xe]=Wt})),u}));const u="far"in Sd||sd.autoFetchSvg,Xe=wd(kd,((Xe,Wt)=>{const fr=Wt[0];let _r=Wt[1];const wr=Wt[2];return"far"!==_r||u||(_r="fas"),"string"==typeof fr&&(Xe.names[fr]={prefix:_r,iconName:wr}),"number"==typeof fr&&(Xe.unicodes[fr.toString(16)]={prefix:_r,iconName:wr}),Xe}),{names:{},unicodes:{}});Id=Xe.names,Md=Xe.unicodes,Td=getCanonicalPrefix(sd.styleDefault,{family:sd.familyDefault})};function byUnicode(u,Xe){return(Ed[u]||{})[Xe]}function byAlias(u,Xe){return(Rd[u]||{})[Xe]}function byOldName(u){return Id[u]||{prefix:null,iconName:null}}function getDefaultUsablePrefix(){return Td}!function onChange(u){return ld.push(u),()=>{ld.splice(ld.indexOf(u),1)}}((u=>{Td=getCanonicalPrefix(u.styleDefault,{family:sd.familyDefault})})),build();function getCanonicalPrefix(u){let Xe=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{family:Wt=kl}=Xe,fr=nu[Wt][u],_r=su[Wt][u]||su[Wt][fr],wr=u in _d.styles?u:null;return _r||wr||null}const Ld={[kl]:Object.keys(uu[kl]),[Ml]:Object.keys(uu[Ml]),[Rl]:Object.keys(uu[Rl])};function getCanonicalIcon(u){let Xe=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{skipLookups:Wt=!1}=Xe,fr={[kl]:"".concat(sd.cssPrefix,"-").concat(kl),[Ml]:"".concat(sd.cssPrefix,"-").concat(Ml),[Rl]:"".concat(sd.cssPrefix,"-").concat(Rl)};let _r=null,wr=kl;const Ar=Ol.filter((u=>u!==Al));Ar.forEach((Xe=>{(u.includes(fr[Xe])||u.some((u=>Ld[Xe].includes(u))))&&(wr=Xe)}));const Kr=u.reduce(((u,Xe)=>{const Kr=getIconName(sd.cssPrefix,Xe);if(Sd[Xe]?(Xe=Ad[wr].includes(Xe)?Iu[wr][Xe]:Xe,_r=Xe,u.prefix=Xe):Od[wr].indexOf(Xe)>-1?(_r=Xe,u.prefix=getCanonicalPrefix(Xe,{family:wr})):Kr?u.iconName=Kr:Xe===sd.replacementClass||Ar.some((u=>Xe===fr[u]))||u.rest.push(Xe),!Wt&&u.prefix&&u.iconName){const Xe="fa"===_r?byOldName(u.iconName):{},Wt=byAlias(u.prefix,u.iconName);Xe.prefix&&(_r=null),u.iconName=Xe.iconName||Wt||u.iconName,u.prefix=Xe.prefix||u.prefix,"far"!==u.prefix||Sd.far||!Sd.fas||sd.autoFetchSvg||(u.prefix="fas")}return u}),{prefix:null,iconName:null,rest:[]});return(u.includes("fa-brands")||u.includes("fab"))&&(Kr.prefix="fab"),(u.includes("fa-duotone")||u.includes("fad"))&&(Kr.prefix="fad"),Kr.prefix||wr!==Ml||!Sd.fass&&!sd.autoFetchSvg||(Kr.prefix="fass",Kr.iconName=byAlias(Kr.prefix,Kr.iconName)||Kr.iconName),Kr.prefix||wr!==Rl||!Sd.fasds&&!sd.autoFetchSvg||(Kr.prefix="fasds",Kr.iconName=byAlias(Kr.prefix,Kr.iconName)||Kr.iconName),"fa"!==Kr.prefix&&"fa"!==_r||(Kr.prefix=getDefaultUsablePrefix()||"fas"),Kr}let Dd=[],Fd={};const Bd={},Nd=Object.keys(Bd);function chainHooks(u,Xe){for(var Wt=arguments.length,fr=new Array(Wt>2?Wt-2:0),_r=2;_r<Wt;_r++)fr[_r-2]=arguments[_r];return(Fd[u]||[]).forEach((u=>{Xe=u.apply(null,[Xe,...fr])})),Xe}function callHooks(u){for(var Xe=arguments.length,Wt=new Array(Xe>1?Xe-1:0),fr=1;fr<Xe;fr++)Wt[fr-1]=arguments[fr];(Fd[u]||[]).forEach((u=>{u.apply(null,Wt)}))}function callProvided(){const u=arguments[0],Xe=Array.prototype.slice.call(arguments,1);return Bd[u]?Bd[u].apply(null,Xe):void 0}function findIconDefinition(u){"fa"===u.prefix&&(u.prefix="fas");let{iconName:Xe}=u;const Wt=u.prefix||getDefaultUsablePrefix();if(Xe)return Xe=byAlias(Wt,Xe)||Xe,iconFromMapping(Vd.definitions,Wt,Xe)||iconFromMapping(_d.styles,Wt,Xe)}const Vd=new class Library{constructor(){this.definitions={}}add(){for(var u=arguments.length,Xe=new Array(u),Wt=0;Wt<u;Wt++)Xe[Wt]=arguments[Wt];const fr=Xe.reduce(this._pullDefinitions,{});Object.keys(fr).forEach((u=>{this.definitions[u]={...this.definitions[u]||{},...fr[u]},defineIcons(u,fr[u]);const Xe=uu[kl][u];Xe&&defineIcons(Xe,fr[u]),build()}))}reset(){this.definitions={}}_pullDefinitions(u,Xe){const Wt=Xe.prefix&&Xe.iconName&&Xe.icon?{0:Xe}:Xe;return Object.keys(Wt).map((Xe=>{const{prefix:fr,iconName:_r,icon:wr}=Wt[Xe],Ar=wr[2];u[fr]||(u[fr]={}),Ar.length>0&&Ar.forEach((Xe=>{"string"==typeof Xe&&(u[fr][Xe]=wr)})),u[fr][_r]=wr})),u}},Ud={i2svg:function(){let u=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return yl?(callHooks("beforeI2svg",u),callProvided("pseudoElements2svg",u),callProvided("i2svg",u)):Promise.reject(new Error("Operation requires a DOM of some kind."))},watch:function(){let u=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{autoReplaceSvgRoot:Xe}=u;!1===sd.autoReplaceSvg&&(sd.autoReplaceSvg=!0),sd.observeMutations=!0,function domready(u){yl&&(xd?setTimeout(u,0):vd.push(u))}((()=>{autoReplace({autoReplaceSvgRoot:Xe}),callHooks("watch",u)}))}},$d={icon:u=>{if(null===u)return null;if("object"==typeof u&&u.prefix&&u.iconName)return{prefix:u.prefix,iconName:byAlias(u.prefix,u.iconName)||u.iconName};if(Array.isArray(u)&&2===u.length){const Xe=0===u[1].indexOf("fa-")?u[1].slice(3):u[1],Wt=getCanonicalPrefix(u[0]);return{prefix:Wt,iconName:byAlias(Wt,Xe)||Xe}}if("string"==typeof u&&(u.indexOf("".concat(sd.cssPrefix,"-"))>-1||u.match(zu))){const Xe=getCanonicalIcon(u.split(" "),{skipLookups:!0});return{prefix:Xe.prefix||getDefaultUsablePrefix(),iconName:byAlias(Xe.prefix,Xe.iconName)||Xe.iconName}}if("string"==typeof u){const Xe=getDefaultUsablePrefix();return{prefix:Xe,iconName:byAlias(Xe,u)||u}}}},Wd={noAuto:()=>{sd.autoReplaceSvg=!1,sd.observeMutations=!1,callHooks("noAuto")},config:sd,dom:Ud,parse:$d,library:Vd,findIconDefinition,toHtml},autoReplace=function(){let u=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{autoReplaceSvgRoot:Xe=ua}=u;(Object.keys(_d.styles).length>0||sd.autoFetchSvg)&&yl&&sd.autoReplaceSvg&&Wd.dom.i2svg({node:Xe})};function domVariants(u,Xe){return Object.defineProperty(u,"abstract",{get:Xe}),Object.defineProperty(u,"html",{get:function(){return u.abstract.map((u=>toHtml(u)))}}),Object.defineProperty(u,"node",{get:function(){if(!yl)return;const Xe=ua.createElement("div");return Xe.innerHTML=u.html,Xe.children}}),u}function makeInlineSvgAbstract(u){const{icons:{main:Xe,mask:Wt},prefix:fr,iconName:_r,transform:wr,symbol:Ar,title:Kr,maskId:In,titleId:no,extra:io,watchable:oo=!1}=u,{width:ao,height:so}=Wt.found?Wt:Xe,co="fak"===fr,ho=[sd.replacementClass,_r?"".concat(sd.cssPrefix,"-").concat(_r):""].filter((u=>-1===io.classes.indexOf(u))).filter((u=>""!==u||!!u)).concat(io.classes).join(" ");let go={children:[],attributes:{...io.attributes,"data-prefix":fr,"data-icon":_r,class:ho,role:io.attributes.role||"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 ".concat(ao," ").concat(so)}};const xo=co&&!~io.classes.indexOf("fa-fw")?{width:"".concat(ao/so*16*.0625,"em")}:{};oo&&(go.attributes[Ql]=""),Kr&&(go.children.push({tag:"title",attributes:{id:go.attributes["aria-labelledby"]||"title-".concat(no||nextUniqueId())},children:[Kr]}),delete go.attributes.title);const ko={...go,prefix:fr,iconName:_r,main:Xe,mask:Wt,maskId:In,transform:wr,symbol:Ar,styles:{...xo,...io.styles}},{children:Co,attributes:Io}=Wt.found&&Xe.found?callProvided("generateAbstractMask",ko)||{children:[],attributes:{}}:callProvided("generateAbstractIcon",ko)||{children:[],attributes:{}};return ko.children=Co,ko.attributes=Io,Ar?function asSymbol(u){let{prefix:Xe,iconName:Wt,children:fr,attributes:_r,symbol:wr}=u;return[{tag:"svg",attributes:{style:"display: none;"},children:[{tag:"symbol",attributes:{..._r,id:!0===wr?"".concat(Xe,"-").concat(sd.cssPrefix,"-").concat(Wt):wr},children:fr}]}]}(ko):function asIcon(u){let{children:Xe,main:Wt,mask:fr,attributes:_r,styles:wr,transform:Ar}=u;if(transformIsMeaningful(Ar)&&Wt.found&&!fr.found){const{width:u,height:Xe}=Wt,fr={x:u/Xe/2,y:.5};_r.style=joinStyles({...wr,"transform-origin":"".concat(fr.x+Ar.x/16,"em ").concat(fr.y+Ar.y/16,"em")})}return[{tag:"svg",attributes:_r,children:Xe}]}(ko)}function makeLayersTextAbstract(u){const{content:Xe,width:Wt,height:fr,transform:_r,title:wr,extra:Ar,watchable:Kr=!1}=u,In={...Ar.attributes,...wr?{title:wr}:{},class:Ar.classes.join(" ")};Kr&&(In[Ql]="");const no={...Ar.styles};transformIsMeaningful(_r)&&(no.transform=function transformForCss(u){let{transform:Xe,width:Wt=Xl,height:fr=Xl,startCentered:_r=!1}=u,wr="";return wr+=_r&&vl?"translate(".concat(Xe.x/cd-Wt/2,"em, ").concat(Xe.y/cd-fr/2,"em) "):_r?"translate(calc(-50% + ".concat(Xe.x/cd,"em), calc(-50% + ").concat(Xe.y/cd,"em)) "):"translate(".concat(Xe.x/cd,"em, ").concat(Xe.y/cd,"em) "),wr+="scale(".concat(Xe.size/cd*(Xe.flipX?-1:1),", ").concat(Xe.size/cd*(Xe.flipY?-1:1),") "),wr+="rotate(".concat(Xe.rotate,"deg) "),wr}({transform:_r,startCentered:!0,width:Wt,height:fr}),no["-webkit-transform"]=no.transform);const io=joinStyles(no);io.length>0&&(In.style=io);const oo=[];return oo.push({tag:"span",attributes:In,children:[Xe]}),wr&&oo.push({tag:"span",attributes:{class:"sr-only"},children:[wr]}),oo}const{styles:Zd}=_d;function asFoundIcon(u){const Xe=u[0],Wt=u[1],[fr]=u.slice(4);let _r=null;return _r=Array.isArray(fr)?{tag:"g",attributes:{class:"".concat(sd.cssPrefix,"-").concat(Nu.GROUP)},children:[{tag:"path",attributes:{class:"".concat(sd.cssPrefix,"-").concat(Nu.SECONDARY),fill:"currentColor",d:fr[0]}},{tag:"path",attributes:{class:"".concat(sd.cssPrefix,"-").concat(Nu.PRIMARY),fill:"currentColor",d:fr[1]}}]}:{tag:"path",attributes:{fill:"currentColor",d:fr}},{found:!0,width:Xe,height:Wt,icon:_r}}const Hd={found:!1,width:512,height:512};function findIcon(u,Xe){let Wt=Xe;return"fa"===Xe&&null!==sd.styleDefault&&(Xe=getDefaultUsablePrefix()),new Promise(((fr,_r)=>{if("fa"===Wt){const Wt=byOldName(u)||{};u=Wt.iconName||u,Xe=Wt.prefix||Xe}if(u&&Xe&&Zd[Xe]&&Zd[Xe][u]){return fr(asFoundIcon(Zd[Xe][u]))}!function maybeNotifyMissing(u,Xe){bc||sd.showMissingIcons||!u||console.error('Icon with name "'.concat(u,'" and prefix "').concat(Xe,'" is missing.'))}(u,Xe),fr({...Hd,icon:sd.showMissingIcons&&u&&callProvided("missingIconAbstract")||{}})}))}const noop$1=()=>{},Gd=sd.measurePerformance&&ns&&ns.mark&&ns.measure?ns:{mark:noop$1,measure:noop$1},Kd='FA "6.6.0"',end=u=>{Gd.mark("".concat(Kd," ").concat(u," ends")),Gd.measure("".concat(Kd," ").concat(u),"".concat(Kd," ").concat(u," begins"),"".concat(Kd," ").concat(u," ends"))};var perf_begin=u=>(Gd.mark("".concat(Kd," ").concat(u," begins")),()=>end(u));const noop$2=()=>{};function isWatched(u){return"string"==typeof(u.getAttribute?u.getAttribute(Ql):null)}function createElementNS(u){return ua.createElementNS("http://www.w3.org/2000/svg",u)}function createElement(u){return ua.createElement(u)}function convertSVG(u){let Xe=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{ceFn:Wt=("svg"===u.tag?createElementNS:createElement)}=Xe;if("string"==typeof u)return ua.createTextNode(u);const fr=Wt(u.tag);Object.keys(u.attributes||[]).forEach((function(Xe){fr.setAttribute(Xe,u.attributes[Xe])}));return(u.children||[]).forEach((function(u){fr.appendChild(convertSVG(u,{ceFn:Wt}))})),fr}const Xd={replace:function(u){const Xe=u[0];if(Xe.parentNode)if(u[1].forEach((u=>{Xe.parentNode.insertBefore(convertSVG(u),Xe)})),null===Xe.getAttribute(Ql)&&sd.keepOriginalSource){let u=ua.createComment(function nodeAsComment(u){let Xe=" ".concat(u.outerHTML," ");return Xe="".concat(Xe,"Font Awesome fontawesome.com "),Xe}(Xe));Xe.parentNode.replaceChild(u,Xe)}else Xe.remove()},nest:function(u){const Xe=u[0],Wt=u[1];if(~classArray(Xe).indexOf(sd.replacementClass))return Xd.replace(u);const fr=new RegExp("".concat(sd.cssPrefix,"-.*"));if(delete Wt[0].attributes.id,Wt[0].attributes.class){const u=Wt[0].attributes.class.split(" ").reduce(((u,Xe)=>(Xe===sd.replacementClass||Xe.match(fr)?u.toSvg.push(Xe):u.toNode.push(Xe),u)),{toNode:[],toSvg:[]});Wt[0].attributes.class=u.toSvg.join(" "),0===u.toNode.length?Xe.removeAttribute("class"):Xe.setAttribute("class",u.toNode.join(" "))}const _r=Wt.map((u=>toHtml(u))).join("\n");Xe.setAttribute(Ql,""),Xe.innerHTML=_r}};function performOperationSync(u){u()}function perform(u,Xe){const Wt="function"==typeof Xe?Xe:noop$2;if(0===u.length)Wt();else{let Xe=performOperationSync;"async"===sd.mutateApproach&&(Xe=ca.requestAnimationFrame||performOperationSync),Xe((()=>{const Xe=function getMutator(){return!0===sd.autoReplaceSvg?Xd.replace:Xd[sd.autoReplaceSvg]||Xd.replace}(),fr=perf_begin("mutate");u.map(Xe),fr(),Wt()}))}}let Yd=!1;function disableObservation(){Yd=!0}function enableObservation(){Yd=!1}let Jd=null;function observe(u){if(!Da)return;if(!sd.observeMutations)return;const{treeCallback:Xe=noop$2,nodeCallback:Wt=noop$2,pseudoElementsCallback:fr=noop$2,observeMutationsRoot:_r=ua}=u;Jd=new Da((u=>{if(Yd)return;const _r=getDefaultUsablePrefix();toArray(u).forEach((u=>{if("childList"===u.type&&u.addedNodes.length>0&&!isWatched(u.addedNodes[0])&&(sd.searchPseudoElements&&fr(u.target),Xe(u.target)),"attributes"===u.type&&u.target.parentNode&&sd.searchPseudoElements&&fr(u.target.parentNode),"attributes"===u.type&&isWatched(u.target)&&~Fu.indexOf(u.attributeName))if("class"===u.attributeName&&function hasPrefixAndIcon(u){const Xe=u.getAttribute?u.getAttribute(ic):null,Wt=u.getAttribute?u.getAttribute(oc):null;return Xe&&Wt}(u.target)){const{prefix:Xe,iconName:Wt}=getCanonicalIcon(classArray(u.target));u.target.setAttribute(ic,Xe||_r),Wt&&u.target.setAttribute(oc,Wt)}else(function hasBeenReplaced(u){return u&&u.classList&&u.classList.contains&&u.classList.contains(sd.replacementClass)})(u.target)&&Wt(u.target)}))})),yl&&Jd.observe(_r,{childList:!0,attributes:!0,characterData:!0,subtree:!0})}function classParser(u){const Xe=u.getAttribute("data-prefix"),Wt=u.getAttribute("data-icon"),fr=void 0!==u.innerText?u.innerText.trim():"";let _r=getCanonicalIcon(classArray(u));return _r.prefix||(_r.prefix=getDefaultUsablePrefix()),Xe&&Wt&&(_r.prefix=Xe,_r.iconName=Wt),_r.iconName&&_r.prefix||(_r.prefix&&fr.length>0&&(_r.iconName=function byLigature(u,Xe){return(Cd[u]||{})[Xe]}(_r.prefix,u.innerText)||byUnicode(_r.prefix,toHex(u.innerText))),!_r.iconName&&sd.autoFetchSvg&&u.firstChild&&u.firstChild.nodeType===Node.TEXT_NODE&&(_r.iconName=u.firstChild.data)),_r}function parseMeta(u){let Xe=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{styleParser:!0};const{iconName:Wt,prefix:fr,rest:_r}=classParser(u),wr=function attributesParser(u){const Xe=toArray(u.attributes).reduce(((u,Xe)=>("class"!==u.name&&"style"!==u.name&&(u[Xe.name]=Xe.value),u)),{}),Wt=u.getAttribute("title"),fr=u.getAttribute("data-fa-title-id");return sd.autoA11y&&(Wt?Xe["aria-labelledby"]="".concat(sd.replacementClass,"-title-").concat(fr||nextUniqueId()):(Xe["aria-hidden"]="true",Xe.focusable="false")),Xe}(u),Ar=chainHooks("parseNodeAttributes",{},u);let Kr=Xe.styleParser?function styleParser(u){const Xe=u.getAttribute("style");let Wt=[];return Xe&&(Wt=Xe.split(";").reduce(((u,Xe)=>{const Wt=Xe.split(":"),fr=Wt[0],_r=Wt.slice(1);return fr&&_r.length>0&&(u[fr]=_r.join(":").trim()),u}),{})),Wt}(u):[];return{iconName:Wt,title:u.getAttribute("title"),titleId:u.getAttribute("data-fa-title-id"),prefix:fr,transform:ud,mask:{iconName:null,prefix:null,rest:[]},maskId:null,symbol:!1,extra:{classes:_r,styles:Kr,attributes:wr},...Ar}}const{styles:Qd}=_d;function generateMutation(u){const Xe="nest"===sd.autoReplaceSvg?parseMeta(u,{styleParser:!1}):parseMeta(u);return~Xe.extra.classes.indexOf(Lu)?callProvided("generateLayersText",u,Xe):callProvided("generateSvgReplacementMutation",u,Xe)}let Rh=new Set;function onTree(u){let Xe=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!yl)return Promise.resolve();const Wt=ua.documentElement.classList,hclAdd=u=>Wt.add("".concat(lc,"-").concat(u)),hclRemove=u=>Wt.remove("".concat(lc,"-").concat(u)),fr=sd.autoFetchSvg?Rh:eu.map((u=>"fa-".concat(u))).concat(Object.keys(Qd));fr.includes("fa")||fr.push("fa");const _r=[".".concat(Lu,":not([").concat(Ql,"])")].concat(fr.map((u=>".".concat(u,":not([").concat(Ql,"])")))).join(", ");if(0===_r.length)return Promise.resolve();let wr=[];try{wr=toArray(u.querySelectorAll(_r))}catch(u){}if(!(wr.length>0))return Promise.resolve();hclAdd("pending"),hclRemove("complete");const Ar=perf_begin("onTree"),Kr=wr.reduce(((u,Xe)=>{try{const Wt=generateMutation(Xe);Wt&&u.push(Wt)}catch(u){bc||"MissingIcon"===u.name&&console.error(u)}return u}),[]);return new Promise(((u,Wt)=>{Promise.all(Kr).then((Wt=>{perform(Wt,(()=>{hclAdd("active"),hclAdd("complete"),hclRemove("pending"),"function"==typeof Xe&&Xe(),Ar(),u()}))})).catch((u=>{Ar(),Wt(u)}))}))}function onNode(u){let Xe=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;generateMutation(u).then((u=>{u&&perform([u],Xe)}))}eu.map((u=>{Rh.add("fa-".concat(u))})),Object.keys(nu[kl]).map(Rh.add.bind(Rh)),Object.keys(nu[Ml]).map(Rh.add.bind(Rh)),Object.keys(nu[Rl]).map(Rh.add.bind(Rh)),Rh=[...Rh];const render=function(u){let Xe=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{transform:Wt=ud,symbol:fr=!1,mask:_r=null,maskId:wr=null,title:Ar=null,titleId:Kr=null,classes:In=[],attributes:no={},styles:io={}}=Xe;if(!u)return;const{prefix:oo,iconName:ao,icon:so}=u;return domVariants({type:"icon",...u},(()=>(callHooks("beforeDOMElementCreation",{iconDefinition:u,params:Xe}),sd.autoA11y&&(Ar?no["aria-labelledby"]="".concat(sd.replacementClass,"-title-").concat(Kr||nextUniqueId()):(no["aria-hidden"]="true",no.focusable="false")),makeInlineSvgAbstract({icons:{main:asFoundIcon(so),mask:_r?asFoundIcon(_r.icon):{found:!1,width:null,height:null,icon:{}}},prefix:oo,iconName:ao,transform:{...ud,...Wt},symbol:fr,title:Ar,maskId:wr,titleId:Kr,extra:{attributes:no,styles:io,classes:In}}))))};var Oh={mixout(){return{icon:(u=render,function(Xe){let Wt=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const fr=(Xe||{}).icon?Xe:findIconDefinition(Xe||{});let{mask:_r}=Wt;return _r&&(_r=(_r||{}).icon?_r:findIconDefinition(_r||{})),u(fr,{...Wt,mask:_r})})};var u},hooks:()=>({mutationObserverCallbacks:u=>(u.treeCallback=onTree,u.nodeCallback=onNode,u)}),provides(u){u.i2svg=function(u){const{node:Xe=ua,callback:Wt=()=>{}}=u;return onTree(Xe,Wt)},u.generateSvgReplacementMutation=function(u,Xe){const{iconName:Wt,title:fr,titleId:_r,prefix:wr,transform:Ar,symbol:Kr,mask:In,maskId:no,extra:io}=Xe;return new Promise(((Xe,oo)=>{Promise.all([findIcon(Wt,wr),In.iconName?findIcon(In.iconName,In.prefix):Promise.resolve({found:!1,width:512,height:512,icon:{}})]).then((In=>{let[oo,ao]=In;Xe([u,makeInlineSvgAbstract({icons:{main:oo,mask:ao},prefix:wr,iconName:Wt,transform:Ar,symbol:Kr,maskId:no,title:fr,titleId:_r,extra:io,watchable:!0})])})).catch(oo)}))},u.generateAbstractIcon=function(u){let{children:Xe,attributes:Wt,main:fr,transform:_r,styles:wr}=u;const Ar=joinStyles(wr);let Kr;return Ar.length>0&&(Wt.style=Ar),transformIsMeaningful(_r)&&(Kr=callProvided("generateAbstractTransformGrouping",{main:fr,transform:_r,containerWidth:fr.width,iconWidth:fr.width})),Xe.push(Kr||fr.icon),{children:Xe,attributes:Wt}}}},Lh={mixout:()=>({layer(u){let Xe=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{classes:Wt=[]}=Xe;return domVariants({type:"layer"},(()=>{callHooks("beforeDOMElementCreation",{assembler:u,params:Xe});let fr=[];return u((u=>{Array.isArray(u)?u.map((u=>{fr=fr.concat(u.abstract)})):fr=fr.concat(u.abstract)})),[{tag:"span",attributes:{class:["".concat(sd.cssPrefix,"-layers"),...Wt].join(" ")},children:fr}]}))}})},Dh={mixout:()=>({counter(u){let Xe=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{title:Wt=null,classes:fr=[],attributes:_r={},styles:wr={}}=Xe;return domVariants({type:"counter",content:u},(()=>(callHooks("beforeDOMElementCreation",{content:u,params:Xe}),function makeLayersCounterAbstract(u){const{content:Xe,title:Wt,extra:fr}=u,_r={...fr.attributes,...Wt?{title:Wt}:{},class:fr.classes.join(" ")},wr=joinStyles(fr.styles);wr.length>0&&(_r.style=wr);const Ar=[];return Ar.push({tag:"span",attributes:_r,children:[Xe]}),Wt&&Ar.push({tag:"span",attributes:{class:"sr-only"},children:[Wt]}),Ar}({content:u.toString(),title:Wt,extra:{attributes:_r,styles:wr,classes:["".concat(sd.cssPrefix,"-layers-counter"),...fr]}}))))}})},Fh={mixout:()=>({text(u){let Xe=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{transform:Wt=ud,title:fr=null,classes:_r=[],attributes:wr={},styles:Ar={}}=Xe;return domVariants({type:"text",content:u},(()=>(callHooks("beforeDOMElementCreation",{content:u,params:Xe}),makeLayersTextAbstract({content:u,transform:{...ud,...Wt},title:fr,extra:{attributes:wr,styles:Ar,classes:["".concat(sd.cssPrefix,"-layers-text"),..._r]}}))))}}),provides(u){u.generateLayersText=function(u,Xe){const{title:Wt,transform:fr,extra:_r}=Xe;let wr=null,Ar=null;if(vl){const Xe=parseInt(getComputedStyle(u).fontSize,10),Wt=u.getBoundingClientRect();wr=Wt.width/Xe,Ar=Wt.height/Xe}return sd.autoA11y&&!Wt&&(_r.attributes["aria-hidden"]="true"),Promise.resolve([u,makeLayersTextAbstract({content:u.innerHTML,width:wr,height:Ar,transform:fr,title:Wt,extra:_r,watchable:!0})])}}};const jh=new RegExp('"',"ug"),Hh=[1105920,1112319],Gh={FontAwesome:{normal:"fas",400:"fas"},"Font Awesome 6 Free":{900:"fas",400:"far"},"Font Awesome 6 Pro":{900:"fas",400:"far",normal:"far",300:"fal",100:"fat"},"Font Awesome 6 Brands":{400:"fab",normal:"fab"},"Font Awesome 6 Duotone":{900:"fad"},"Font Awesome 6 Sharp":{900:"fass",400:"fasr",normal:"fasr",300:"fasl",100:"fast"},"Font Awesome 6 Sharp Duotone":{900:"fasds"},"Font Awesome 5 Free":{900:"fas",400:"far"},"Font Awesome 5 Pro":{900:"fas",400:"far",normal:"far",300:"fal"},"Font Awesome 5 Brands":{400:"fab",normal:"fab"},"Font Awesome 5 Duotone":{900:"fad"},"Font Awesome Kit":{400:"fak",normal:"fak"},"Font Awesome Kit Duotone":{400:"fakd",normal:"fakd"}},Kh=Object.keys(Gh).reduce(((u,Xe)=>(u[Xe.toLowerCase()]=Gh[Xe],u)),{}),Jh=Object.keys(Kh).reduce(((u,Xe)=>{const Wt=Kh[Xe];return u[Xe]=Wt[900]||[...Object.entries(Wt)][0][1],u}),{});function replaceForPosition(u,Xe){const Wt="".concat("data-fa-pseudo-element-pending").concat(Xe.replace(":","-"));return new Promise(((fr,_r)=>{if(null!==u.getAttribute(Wt))return fr();const wr=toArray(u.children).filter((u=>u.getAttribute(rc)===Xe))[0],Ar=ca.getComputedStyle(u,Xe),Kr=Ar.getPropertyValue("font-family"),In=Kr.match(Du),no=Ar.getPropertyValue("font-weight"),io=Ar.getPropertyValue("content");if(wr&&!In)return u.removeChild(wr),fr();if(In&&"none"!==io&&""!==io){const io=Ar.getPropertyValue("content");let oo=function getPrefix(u,Xe){const Wt=u.replace(/^['"]|['"]$/g,"").toLowerCase(),fr=parseInt(Xe),_r=isNaN(fr)?"normal":fr;return(Kh[Wt]||{})[_r]||Jh[Wt]}(Kr,no);const{value:ao,isSecondary:so}=function hexValueFromContent(u){const Xe=u.replace(jh,""),Wt=function codePointAt(u,Xe){const Wt=u.length;let fr,_r=u.charCodeAt(Xe);return _r>=55296&&_r<=56319&&Wt>Xe+1&&(fr=u.charCodeAt(Xe+1),fr>=56320&&fr<=57343)?1024*(_r-55296)+fr-56320+65536:_r}(Xe,0),fr=Wt>=Hh[0]&&Wt<=Hh[1],_r=2===Xe.length&&Xe[0]===Xe[1];return{value:toHex(_r?Xe[0]:Xe),isSecondary:fr||_r}}(io),co=In[0].startsWith("FontAwesome");let ho=byUnicode(oo,ao),go=ho;if(co){const u=function byOldUnicode(u){const Xe=Md[u],Wt=byUnicode("fas",u);return Xe||(Wt?{prefix:"fas",iconName:Wt}:null)||{prefix:null,iconName:null}}(ao);u.iconName&&u.prefix&&(ho=u.iconName,oo=u.prefix)}if(!ho||so||wr&&wr.getAttribute(ic)===oo&&wr.getAttribute(oc)===go)fr();else{u.setAttribute(Wt,go),wr&&u.removeChild(wr);const Ar=function blankMeta(){return{iconName:null,title:null,titleId:null,prefix:null,transform:ud,symbol:!1,mask:{iconName:null,prefix:null,rest:[]},maskId:null,extra:{classes:[],styles:{},attributes:{}}}}(),{extra:Kr}=Ar;Kr.attributes[rc]=Xe,findIcon(ho,oo).then((_r=>{const wr=makeInlineSvgAbstract({...Ar,icons:{main:_r,mask:{prefix:null,iconName:null,rest:[]}},prefix:oo,iconName:go,extra:Kr,watchable:!0}),In=ua.createElementNS("http://www.w3.org/2000/svg","svg");"::before"===Xe?u.insertBefore(In,u.firstChild):u.appendChild(In),In.outerHTML=wr.map((u=>toHtml(u))).join("\n"),u.removeAttribute(Wt),fr()})).catch(_r)}}else fr()}))}function extension_replace(u){return Promise.all([replaceForPosition(u,"::before"),replaceForPosition(u,"::after")])}function processable(u){return!(u.parentNode===document.head||~gc.indexOf(u.tagName.toUpperCase())||u.getAttribute(rc)||u.parentNode&&"svg"===u.parentNode.tagName)}function searchPseudoElements(u){if(yl)return new Promise(((Xe,Wt)=>{const fr=toArray(u.querySelectorAll("*")).filter(processable).map(extension_replace),_r=perf_begin("searchPseudoElements");disableObservation(),Promise.all(fr).then((()=>{_r(),enableObservation(),Xe()})).catch((()=>{_r(),enableObservation(),Wt()}))}))}var Qh={hooks:()=>({mutationObserverCallbacks:u=>(u.pseudoElementsCallback=searchPseudoElements,u)}),provides(u){u.pseudoElements2svg=function(u){const{node:Xe=ua}=u;sd.searchPseudoElements&&searchPseudoElements(Xe)}}};let ep=!1;var tp={mixout:()=>({dom:{unwatch(){disableObservation(),ep=!0}}}),hooks:()=>({bootstrap(){observe(chainHooks("mutationObserverCallbacks",{}))},noAuto(){!function disconnect(){Jd&&Jd.disconnect()}()},watch(u){const{observeMutationsRoot:Xe}=u;ep?enableObservation():observe(chainHooks("mutationObserverCallbacks",{observeMutationsRoot:Xe}))}})};const parseTransformString=u=>u.toLowerCase().split(" ").reduce(((u,Xe)=>{const Wt=Xe.toLowerCase().split("-"),fr=Wt[0];let _r=Wt.slice(1).join("-");if(fr&&"h"===_r)return u.flipX=!0,u;if(fr&&"v"===_r)return u.flipY=!0,u;if(_r=parseFloat(_r),isNaN(_r))return u;switch(fr){case"grow":u.size=u.size+_r;break;case"shrink":u.size=u.size-_r;break;case"left":u.x=u.x-_r;break;case"right":u.x=u.x+_r;break;case"up":u.y=u.y-_r;break;case"down":u.y=u.y+_r;break;case"rotate":u.rotate=u.rotate+_r}return u}),{size:16,x:0,y:0,flipX:!1,flipY:!1,rotate:0});var rp={mixout:()=>({parse:{transform:u=>parseTransformString(u)}}),hooks:()=>({parseNodeAttributes(u,Xe){const Wt=Xe.getAttribute("data-fa-transform");return Wt&&(u.transform=parseTransformString(Wt)),u}}),provides(u){u.generateAbstractTransformGrouping=function(u){let{main:Xe,transform:Wt,containerWidth:fr,iconWidth:_r}=u;const wr={transform:"translate(".concat(fr/2," 256)")},Ar="translate(".concat(32*Wt.x,", ").concat(32*Wt.y,") "),Kr="scale(".concat(Wt.size/16*(Wt.flipX?-1:1),", ").concat(Wt.size/16*(Wt.flipY?-1:1),") "),In="rotate(".concat(Wt.rotate," 0 0)"),no={transform:"".concat(Ar," ").concat(Kr," ").concat(In)},io={transform:"translate(".concat(_r/2*-1," -256)")};return{tag:"g",attributes:{...wr},children:[{tag:"g",attributes:{...no},children:[{tag:Xe.icon.tag,children:Xe.icon.children,attributes:{...Xe.icon.attributes,...io}}]}]}}}};const np={x:0,y:0,width:"100%",height:"100%"};function fillBlack(u){let Xe=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return u.attributes&&(u.attributes.fill||Xe)&&(u.attributes.fill="black"),u}var ip={hooks:()=>({parseNodeAttributes(u,Xe){const Wt=Xe.getAttribute("data-fa-mask"),fr=Wt?getCanonicalIcon(Wt.split(" ").map((u=>u.trim()))):{prefix:null,iconName:null,rest:[]};return fr.prefix||(fr.prefix=getDefaultUsablePrefix()),u.mask=fr,u.maskId=Xe.getAttribute("data-fa-mask-id"),u}}),provides(u){u.generateAbstractMask=function(u){let{children:Xe,attributes:Wt,main:fr,mask:_r,maskId:wr,transform:Ar}=u;const{width:Kr,icon:In}=fr,{width:no,icon:io}=_r,oo=function transformForSvg(u){let{transform:Xe,containerWidth:Wt,iconWidth:fr}=u;const _r={transform:"translate(".concat(Wt/2," 256)")},wr="translate(".concat(32*Xe.x,", ").concat(32*Xe.y,") "),Ar="scale(".concat(Xe.size/16*(Xe.flipX?-1:1),", ").concat(Xe.size/16*(Xe.flipY?-1:1),") "),Kr="rotate(".concat(Xe.rotate," 0 0)");return{outer:_r,inner:{transform:"".concat(wr," ").concat(Ar," ").concat(Kr)},path:{transform:"translate(".concat(fr/2*-1," -256)")}}}({transform:Ar,containerWidth:no,iconWidth:Kr}),ao={tag:"rect",attributes:{...np,fill:"white"}},so=In.children?{children:In.children.map(fillBlack)}:{},co={tag:"g",attributes:{...oo.inner},children:[fillBlack({tag:In.tag,attributes:{...In.attributes,...oo.path},...so})]},ho={tag:"g",attributes:{...oo.outer},children:[co]},go="mask-".concat(wr||nextUniqueId()),xo="clip-".concat(wr||nextUniqueId()),ko={tag:"mask",attributes:{...np,id:go,maskUnits:"userSpaceOnUse",maskContentUnits:"userSpaceOnUse"},children:[ao,ho]},Co={tag:"defs",children:[{tag:"clipPath",attributes:{id:xo},children:(Io=io,"g"===Io.tag?Io.children:[Io])},ko]};var Io;return Xe.push(Co,{tag:"rect",attributes:{fill:"currentColor","clip-path":"url(#".concat(xo,")"),mask:"url(#".concat(go,")"),...np}}),{children:Xe,attributes:Wt}}}},op={provides(u){let Xe=!1;ca.matchMedia&&(Xe=ca.matchMedia("(prefers-reduced-motion: reduce)").matches),u.missingIconAbstract=function(){const u=[],Wt={fill:"currentColor"},fr={attributeType:"XML",repeatCount:"indefinite",dur:"2s"};u.push({tag:"path",attributes:{...Wt,d:"M156.5,447.7l-12.6,29.5c-18.7-9.5-35.9-21.2-51.5-34.9l22.7-22.7C127.6,430.5,141.5,440,156.5,447.7z M40.6,272H8.5 c1.4,21.2,5.4,41.7,11.7,61.1L50,321.2C45.1,305.5,41.8,289,40.6,272z M40.6,240c1.4-18.8,5.2-37,11.1-54.1l-29.5-12.6 C14.7,194.3,10,216.7,8.5,240H40.6z M64.3,156.5c7.8-14.9,17.2-28.8,28.1-41.5L69.7,92.3c-13.7,15.6-25.5,32.8-34.9,51.5 L64.3,156.5z M397,419.6c-13.9,12-29.4,22.3-46.1,30.4l11.9,29.8c20.7-9.9,39.8-22.6,56.9-37.6L397,419.6z M115,92.4 c13.9-12,29.4-22.3,46.1-30.4l-11.9-29.8c-20.7,9.9-39.8,22.6-56.8,37.6L115,92.4z M447.7,355.5c-7.8,14.9-17.2,28.8-28.1,41.5 l22.7,22.7c13.7-15.6,25.5-32.9,34.9-51.5L447.7,355.5z M471.4,272c-1.4,18.8-5.2,37-11.1,54.1l29.5,12.6 c7.5-21.1,12.2-43.5,13.6-66.8H471.4z M321.2,462c-15.7,5-32.2,8.2-49.2,9.4v32.1c21.2-1.4,41.7-5.4,61.1-11.7L321.2,462z M240,471.4c-18.8-1.4-37-5.2-54.1-11.1l-12.6,29.5c21.1,7.5,43.5,12.2,66.8,13.6V471.4z M462,190.8c5,15.7,8.2,32.2,9.4,49.2h32.1 c-1.4-21.2-5.4-41.7-11.7-61.1L462,190.8z M92.4,397c-12-13.9-22.3-29.4-30.4-46.1l-29.8,11.9c9.9,20.7,22.6,39.8,37.6,56.9 L92.4,397z M272,40.6c18.8,1.4,36.9,5.2,54.1,11.1l12.6-29.5C317.7,14.7,295.3,10,272,8.5V40.6z M190.8,50 c15.7-5,32.2-8.2,49.2-9.4V8.5c-21.2,1.4-41.7,5.4-61.1,11.7L190.8,50z M442.3,92.3L419.6,115c12,13.9,22.3,29.4,30.5,46.1 l29.8-11.9C470,128.5,457.3,109.4,442.3,92.3z M397,92.4l22.7-22.7c-15.6-13.7-32.8-25.5-51.5-34.9l-12.6,29.5 C370.4,72.1,384.4,81.5,397,92.4z"}});const _r={...fr,attributeName:"opacity"},wr={tag:"circle",attributes:{...Wt,cx:"256",cy:"364",r:"28"},children:[]};return Xe||wr.children.push({tag:"animate",attributes:{...fr,attributeName:"r",values:"28;14;28;28;14;28;"}},{tag:"animate",attributes:{..._r,values:"1;0;1;1;0;1;"}}),u.push(wr),u.push({tag:"path",attributes:{...Wt,opacity:"1",d:"M263.7,312h-16c-6.6,0-12-5.4-12-12c0-71,77.4-63.9,77.4-107.8c0-20-17.8-40.2-57.4-40.2c-29.1,0-44.3,9.6-59.2,28.7 c-3.9,5-11.1,6-16.2,2.4l-13.1-9.2c-5.6-3.9-6.9-11.8-2.6-17.2c21.2-27.2,46.4-44.7,91.2-44.7c52.3,0,97.4,29.8,97.4,80.2 c0,67.6-77.4,63.5-77.4,107.8C275.7,306.6,270.3,312,263.7,312z"},children:Xe?[]:[{tag:"animate",attributes:{..._r,values:"1;0;0;0;0;1;"}}]}),Xe||u.push({tag:"path",attributes:{...Wt,opacity:"0",d:"M232.5,134.5l7,168c0.3,6.4,5.6,11.5,12,11.5h9c6.4,0,11.7-5.1,12-11.5l7-168c0.3-6.8-5.2-12.5-12-12.5h-23 C237.7,122,232.2,127.7,232.5,134.5z"},children:[{tag:"animate",attributes:{..._r,values:"0;0;1;1;0;0;"}}]}),{tag:"g",attributes:{class:"missing"},children:u}}}};!function registerPlugins(u,Xe){let{mixoutsTo:Wt}=Xe;return Dd=u,Fd={},Object.keys(Bd).forEach((u=>{-1===Nd.indexOf(u)&&delete Bd[u]})),Dd.forEach((u=>{const Xe=u.mixout?u.mixout():{};if(Object.keys(Xe).forEach((u=>{"function"==typeof Xe[u]&&(Wt[u]=Xe[u]),"object"==typeof Xe[u]&&Object.keys(Xe[u]).forEach((fr=>{Wt[u]||(Wt[u]={}),Wt[u][fr]=Xe[u][fr]}))})),u.hooks){const Xe=u.hooks();Object.keys(Xe).forEach((u=>{Fd[u]||(Fd[u]=[]),Fd[u].push(Xe[u])}))}u.provides&&u.provides(Bd)})),Wt}([md,Oh,Lh,Dh,Fh,Qh,tp,rp,ip,op,{hooks:()=>({parseNodeAttributes(u,Xe){const Wt=Xe.getAttribute("data-fa-symbol"),fr=null!==Wt&&(""===Wt||Wt);return u.symbol=fr,u}})}],{mixoutsTo:Wd});const ap=Wd.parse,sp=Wd.icon;var lp=__webpack_require__(5556),cp=__webpack_require__.n(lp),dp=__webpack_require__(6540);function ownKeys(u,Xe){var Wt=Object.keys(u);if(Object.getOwnPropertySymbols){var fr=Object.getOwnPropertySymbols(u);Xe&&(fr=fr.filter((function(Xe){return Object.getOwnPropertyDescriptor(u,Xe).enumerable}))),Wt.push.apply(Wt,fr)}return Wt}function _objectSpread2(u){for(var Xe=1;Xe<arguments.length;Xe++){var Wt=null!=arguments[Xe]?arguments[Xe]:{};Xe%2?ownKeys(Object(Wt),!0).forEach((function(Xe){_defineProperty(u,Xe,Wt[Xe])})):Object.getOwnPropertyDescriptors?Object.defineProperties(u,Object.getOwnPropertyDescriptors(Wt)):ownKeys(Object(Wt)).forEach((function(Xe){Object.defineProperty(u,Xe,Object.getOwnPropertyDescriptor(Wt,Xe))}))}return u}function _typeof(u){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(u){return typeof u}:function(u){return u&&"function"==typeof Symbol&&u.constructor===Symbol&&u!==Symbol.prototype?"symbol":typeof u},_typeof(u)}function _defineProperty(u,Xe,Wt){return Xe in u?Object.defineProperty(u,Xe,{value:Wt,enumerable:!0,configurable:!0,writable:!0}):u[Xe]=Wt,u}function _objectWithoutProperties(u,Xe){if(null==u)return{};var Wt,fr,_r=function index_es_objectWithoutPropertiesLoose(u,Xe){if(null==u)return{};var Wt,fr,_r={},wr=Object.keys(u);for(fr=0;fr<wr.length;fr++)Wt=wr[fr],Xe.indexOf(Wt)>=0||(_r[Wt]=u[Wt]);return _r}(u,Xe);if(Object.getOwnPropertySymbols){var wr=Object.getOwnPropertySymbols(u);for(fr=0;fr<wr.length;fr++)Wt=wr[fr],Xe.indexOf(Wt)>=0||Object.prototype.propertyIsEnumerable.call(u,Wt)&&(_r[Wt]=u[Wt])}return _r}function _toConsumableArray(u){return function _arrayWithoutHoles(u){if(Array.isArray(u))return _arrayLikeToArray(u)}(u)||function _iterableToArray(u){if("undefined"!=typeof Symbol&&null!=u[Symbol.iterator]||null!=u["@@iterator"])return Array.from(u)}(u)||function _unsupportedIterableToArray(u,Xe){if(!u)return;if("string"==typeof u)return _arrayLikeToArray(u,Xe);var Wt=Object.prototype.toString.call(u).slice(8,-1);"Object"===Wt&&u.constructor&&(Wt=u.constructor.name);if("Map"===Wt||"Set"===Wt)return Array.from(u);if("Arguments"===Wt||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Wt))return _arrayLikeToArray(u,Xe)}(u)||function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _arrayLikeToArray(u,Xe){(null==Xe||Xe>u.length)&&(Xe=u.length);for(var Wt=0,fr=new Array(Xe);Wt<Xe;Wt++)fr[Wt]=u[Wt];return fr}function camelize(u){return function _isNumerical(u){return(u-=0)==u}(u)?u:(u=u.replace(/[\-_\s]+(.)?/g,(function(u,Xe){return Xe?Xe.toUpperCase():""}))).substr(0,1).toLowerCase()+u.substr(1)}var hp=["style"];var pp=!1;try{pp=!0}catch(u){}function normalizeIconArgs(u){return u&&"object"===_typeof(u)&&u.prefix&&u.iconName&&u.icon?u:ap.icon?ap.icon(u):null===u?null:u&&"object"===_typeof(u)&&u.prefix&&u.iconName?u:Array.isArray(u)&&2===u.length?{prefix:u[0],iconName:u[1]}:"string"==typeof u?{prefix:"fas",iconName:u}:void 0}function objectWithKey(u,Xe){return Array.isArray(Xe)&&Xe.length>0||!Array.isArray(Xe)&&Xe?_defineProperty({},u,Xe):{}}var fp={border:!1,className:"",mask:null,maskId:null,fixedWidth:!1,inverse:!1,flip:!1,icon:null,listItem:!1,pull:null,pulse:!1,rotation:null,size:null,spin:!1,spinPulse:!1,spinReverse:!1,beat:!1,fade:!1,beatFade:!1,bounce:!1,shake:!1,symbol:!1,title:"",titleId:null,transform:null,swapOpacity:!1},mp=dp.forwardRef((function(u,Xe){var Wt=_objectSpread2(_objectSpread2({},fp),u),fr=Wt.icon,_r=Wt.mask,wr=Wt.symbol,Ar=Wt.className,Kr=Wt.title,In=Wt.titleId,no=Wt.maskId,io=normalizeIconArgs(fr),oo=objectWithKey("classes",[].concat(_toConsumableArray(function classList(u){var Xe,Wt=u.beat,fr=u.fade,_r=u.beatFade,wr=u.bounce,Ar=u.shake,Kr=u.flash,In=u.spin,no=u.spinPulse,io=u.spinReverse,oo=u.pulse,ao=u.fixedWidth,so=u.inverse,co=u.border,ho=u.listItem,go=u.flip,xo=u.size,ko=u.rotation,Co=u.pull,Io=(_defineProperty(Xe={"fa-beat":Wt,"fa-fade":fr,"fa-beat-fade":_r,"fa-bounce":wr,"fa-shake":Ar,"fa-flash":Kr,"fa-spin":In,"fa-spin-reverse":io,"fa-spin-pulse":no,"fa-pulse":oo,"fa-fw":ao,"fa-inverse":so,"fa-border":co,"fa-li":ho,"fa-flip":!0===go,"fa-flip-horizontal":"horizontal"===go||"both"===go,"fa-flip-vertical":"vertical"===go||"both"===go},"fa-".concat(xo),null!=xo),_defineProperty(Xe,"fa-rotate-".concat(ko),null!=ko&&0!==ko),_defineProperty(Xe,"fa-pull-".concat(Co),null!=Co),_defineProperty(Xe,"fa-swap-opacity",u.swapOpacity),Xe);return Object.keys(Io).map((function(u){return Io[u]?u:null})).filter((function(u){return u}))}(Wt)),_toConsumableArray((Ar||"").split(" ")))),ao=objectWithKey("transform","string"==typeof Wt.transform?ap.transform(Wt.transform):Wt.transform),so=objectWithKey("mask",normalizeIconArgs(_r)),co=sp(io,_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({},oo),ao),so),{},{symbol:wr,title:Kr,titleId:In,maskId:no}));if(!co)return function log(){var u;!pp&&console&&"function"==typeof console.error&&(u=console).error.apply(u,arguments)}("Could not find icon",io),null;var ho=co.abstract,go={ref:Xe};return Object.keys(Wt).forEach((function(u){fp.hasOwnProperty(u)||(go[u]=Wt[u])})),gp(ho[0],go)}));mp.displayName="FontAwesomeIcon",mp.propTypes={beat:cp().bool,border:cp().bool,beatFade:cp().bool,bounce:cp().bool,className:cp().string,fade:cp().bool,flash:cp().bool,mask:cp().oneOfType([cp().object,cp().array,cp().string]),maskId:cp().string,fixedWidth:cp().bool,inverse:cp().bool,flip:cp().oneOf([!0,!1,"horizontal","vertical","both"]),icon:cp().oneOfType([cp().object,cp().array,cp().string]),listItem:cp().bool,pull:cp().oneOf(["right","left"]),pulse:cp().bool,rotation:cp().oneOf([0,90,180,270]),shake:cp().bool,size:cp().oneOf(["2xs","xs","sm","lg","xl","2xl","1x","2x","3x","4x","5x","6x","7x","8x","9x","10x"]),spin:cp().bool,spinPulse:cp().bool,spinReverse:cp().bool,symbol:cp().oneOfType([cp().bool,cp().string]),title:cp().string,titleId:cp().string,transform:cp().oneOfType([cp().string,cp().object]),swapOpacity:cp().bool};var gp=function convert(u,Xe){var Wt=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if("string"==typeof Xe)return Xe;var fr=(Xe.children||[]).map((function(Xe){return convert(u,Xe)})),_r=Object.keys(Xe.attributes||{}).reduce((function(u,Wt){var fr=Xe.attributes[Wt];switch(Wt){case"class":u.attrs.className=fr,delete Xe.attributes.class;break;case"style":u.attrs.style=function styleToObject(u){return u.split(";").map((function(u){return u.trim()})).filter((function(u){return u})).reduce((function(u,Xe){var Wt=Xe.indexOf(":"),fr=camelize(Xe.slice(0,Wt)),_r=Xe.slice(Wt+1).trim();return fr.startsWith("webkit")?u[function capitalize(u){return u.charAt(0).toUpperCase()+u.slice(1)}(fr)]=_r:u[fr]=_r,u}),{})}(fr);break;default:0===Wt.indexOf("aria-")||0===Wt.indexOf("data-")?u.attrs[Wt.toLowerCase()]=fr:u.attrs[camelize(Wt)]=fr}return u}),{attrs:{}}),wr=Wt.style,Ar=void 0===wr?{}:wr,Kr=_objectWithoutProperties(Wt,hp);return _r.attrs.style=_objectSpread2(_objectSpread2({},_r.attrs.style),Ar),u.apply(void 0,[Xe.tag,_objectSpread2(_objectSpread2({},_r.attrs),Kr)].concat(_toConsumableArray(fr)))}.bind(null,dp.createElement),yp=__webpack_require__(8587),_p=__webpack_require__(8168),vp=__webpack_require__(4164),bp=__webpack_require__(1609),xp=__webpack_require__(5659),wp=__webpack_require__(3967),Sp=__webpack_require__(7379);var kp=__webpack_require__(8749);var Ap=function useTheme(u=null){const Wt=dp.useContext(Xe.T);return!Wt||function isObjectEmpty(u){return 0===Object.keys(u).length}(Wt)?u:Wt};const Tp=(0,kp.A)();var Ep=function useTheme_useTheme(u=Tp){return Ap(u)};function useThemeProps({props:u,name:Xe,defaultTheme:Wt,themeId:fr}){let _r=Ep(Wt);fr&&(_r=_r[fr]||_r);const wr=function getThemeProps(u){const{theme:Xe,name:Wt,props:fr}=u;return Xe&&Xe.components&&Xe.components[Wt]&&Xe.components[Wt].defaultProps?(0,Sp.A)(Xe.components[Wt].defaultProps,fr):fr}({theme:_r,name:Xe,props:u});return wr}var Cp=__webpack_require__(2532),Pp=__webpack_require__(1317),Ip=__webpack_require__(3571);const Mp=["ownerState"],Rp=["variants"],zp=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function shouldForwardProp(u){return"ownerState"!==u&&"theme"!==u&&"sx"!==u&&"as"!==u}const Op=(0,kp.A)(),lowercaseFirstLetter=u=>u?u.charAt(0).toLowerCase()+u.slice(1):u;function resolveTheme({defaultTheme:u,theme:Xe,themeId:Wt}){return function isEmpty(u){return 0===Object.keys(u).length}(Xe)?u:Xe[Wt]||Xe}function defaultOverridesResolver(u){return u?(Xe,Wt)=>Wt[u]:null}function processStyleArg(u,Xe){let{ownerState:Wt}=Xe,fr=(0,yp.A)(Xe,Mp);const _r="function"==typeof u?u((0,_p.A)({ownerState:Wt},fr)):u;if(Array.isArray(_r))return _r.flatMap((u=>processStyleArg(u,(0,_p.A)({ownerState:Wt},fr))));if(_r&&"object"==typeof _r&&Array.isArray(_r.variants)){const{variants:u=[]}=_r;let Xe=(0,yp.A)(_r,Rp);return u.forEach((u=>{let _r=!0;"function"==typeof u.props?_r=u.props((0,_p.A)({ownerState:Wt},fr,Wt)):Object.keys(u.props).forEach((Xe=>{(null==Wt?void 0:Wt[Xe])!==u.props[Xe]&&fr[Xe]!==u.props[Xe]&&(_r=!1)})),_r&&(Array.isArray(Xe)||(Xe=[Xe]),Xe.push("function"==typeof u.style?u.style((0,_p.A)({ownerState:Wt},fr,Wt)):u.style))})),Xe}return _r}const Lp=function createStyled(u={}){const{themeId:Xe,defaultTheme:Wt=Op,rootShouldForwardProp:fr=shouldForwardProp,slotShouldForwardProp:_r=shouldForwardProp}=u,systemSx=u=>(0,Ip.A)((0,_p.A)({},u,{theme:resolveTheme((0,_p.A)({},u,{defaultTheme:Wt,themeId:Xe}))}));return systemSx.__mui_systemSx=!0,(u,wr={})=>{(0,Cp.internal_processStyles)(u,(u=>u.filter((u=>!(null!=u&&u.__mui_systemSx)))));const{name:Ar,slot:Kr,skipVariantsResolver:In,skipSx:no,overridesResolver:io=defaultOverridesResolver(lowercaseFirstLetter(Kr))}=wr,oo=(0,yp.A)(wr,zp),ao=void 0!==In?In:Kr&&"Root"!==Kr&&"root"!==Kr||!1,so=no||!1;let co=shouldForwardProp;"Root"===Kr||"root"===Kr?co=fr:Kr?co=_r:function isStringTag(u){return"string"==typeof u&&u.charCodeAt(0)>96}(u)&&(co=void 0);const ho=(0,Cp.default)(u,(0,_p.A)({shouldForwardProp:co,label:undefined},oo)),transformStyleArg=u=>"function"==typeof u&&u.__emotion_real!==u||(0,Pp.Q)(u)?fr=>processStyleArg(u,(0,_p.A)({},fr,{theme:resolveTheme({theme:fr.theme,defaultTheme:Wt,themeId:Xe})})):u,muiStyledResolver=(fr,..._r)=>{let wr=transformStyleArg(fr);const Kr=_r?_r.map(transformStyleArg):[];Ar&&io&&Kr.push((u=>{const fr=resolveTheme((0,_p.A)({},u,{defaultTheme:Wt,themeId:Xe}));if(!fr.components||!fr.components[Ar]||!fr.components[Ar].styleOverrides)return null;const _r=fr.components[Ar].styleOverrides,wr={};return Object.entries(_r).forEach((([Xe,Wt])=>{wr[Xe]=processStyleArg(Wt,(0,_p.A)({},u,{theme:fr}))})),io(u,wr)})),Ar&&!ao&&Kr.push((u=>{var fr;const _r=resolveTheme((0,_p.A)({},u,{defaultTheme:Wt,themeId:Xe}));return processStyleArg({variants:null==_r||null==(fr=_r.components)||null==(fr=fr[Ar])?void 0:fr.variants},(0,_p.A)({},u,{theme:_r}))})),so||Kr.push(systemSx);const In=Kr.length-_r.length;if(Array.isArray(fr)&&In>0){const u=new Array(In).fill("");wr=[...fr,...u],wr.raw=[...fr.raw,...u]}const no=ho(wr,...Kr);return u.muiName&&(no.muiName=u.muiName),no};return ho.withConfig&&(muiStyledResolver.withConfig=ho.withConfig),muiStyledResolver}}();var Dp=Lp,Fp=__webpack_require__(4848);const jp=["className","component","disableGutters","fixed","maxWidth","classes"],Bp=(0,kp.A)(),Np=Dp("div",{name:"MuiContainer",slot:"Root",overridesResolver:(u,Xe)=>{const{ownerState:Wt}=u;return[Xe.root,Xe[`maxWidth${(0,wp.A)(String(Wt.maxWidth))}`],Wt.fixed&&Xe.fixed,Wt.disableGutters&&Xe.disableGutters]}}),useThemePropsDefault=u=>useThemeProps({props:u,name:"MuiContainer",defaultTheme:Bp});var Vp=__webpack_require__(8466),Up=__webpack_require__(1848),$p=__webpack_require__(5607);const Wp=function createContainer(u={}){const{createStyledComponent:Xe=Np,useThemeProps:Wt=useThemePropsDefault,componentName:fr="MuiContainer"}=u,_r=Xe((({theme:u,ownerState:Xe})=>(0,_p.A)({width:"100%",marginLeft:"auto",boxSizing:"border-box",marginRight:"auto",display:"block"},!Xe.disableGutters&&{paddingLeft:u.spacing(2),paddingRight:u.spacing(2),[u.breakpoints.up("sm")]:{paddingLeft:u.spacing(3),paddingRight:u.spacing(3)}})),(({theme:u,ownerState:Xe})=>Xe.fixed&&Object.keys(u.breakpoints.values).reduce(((Xe,Wt)=>{const fr=Wt,_r=u.breakpoints.values[fr];return 0!==_r&&(Xe[u.breakpoints.up(fr)]={maxWidth:`${_r}${u.breakpoints.unit}`}),Xe}),{})),(({theme:u,ownerState:Xe})=>(0,_p.A)({},"xs"===Xe.maxWidth&&{[u.breakpoints.up("xs")]:{maxWidth:Math.max(u.breakpoints.values.xs,444)}},Xe.maxWidth&&"xs"!==Xe.maxWidth&&{[u.breakpoints.up(Xe.maxWidth)]:{maxWidth:`${u.breakpoints.values[Xe.maxWidth]}${u.breakpoints.unit}`}}))),wr=dp.forwardRef((function Container(u,Xe){const wr=Wt(u),{className:Ar,component:Kr="div",disableGutters:In=!1,fixed:no=!1,maxWidth:io="lg"}=wr,oo=(0,yp.A)(wr,jp),ao=(0,_p.A)({},wr,{component:Kr,disableGutters:In,fixed:no,maxWidth:io}),so=((u,Xe)=>{const{classes:Wt,fixed:fr,disableGutters:_r,maxWidth:wr}=u,Ar={root:["root",wr&&`maxWidth${(0,wp.A)(String(wr))}`,fr&&"fixed",_r&&"disableGutters"]};return(0,xp.A)(Ar,(u=>(0,bp.Ay)(Xe,u)),Wt)})(ao,fr);return(0,Fp.jsx)(_r,(0,_p.A)({as:Kr,ownerState:ao,className:(0,vp.A)(so.root,Ar),ref:Xe},oo))}));return wr}({createStyledComponent:(0,Up.Ay)("div",{name:"MuiContainer",slot:"Root",overridesResolver:(u,Xe)=>{const{ownerState:Wt}=u;return[Xe.root,Xe[`maxWidth${(0,Vp.A)(String(Wt.maxWidth))}`],Wt.fixed&&Xe.fixed,Wt.disableGutters&&Xe.disableGutters]}}),useThemeProps:u=>(0,$p.b)({props:u,name:"MuiContainer"})});var qp=Wp,Zp=__webpack_require__(771),Hp=__webpack_require__(9770),Gp=__webpack_require__(1381);var Kp=dp.createContext(void 0);function useFormControl(){return dp.useContext(Kp)}var Xp=__webpack_require__(6852),Yp=__webpack_require__(3034),Jp=__webpack_require__(1984);function _setPrototypeOf(u,Xe){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(u,Xe){return u.__proto__=Xe,u},_setPrototypeOf(u,Xe)}function _inheritsLoose(u,Xe){u.prototype=Object.create(Xe.prototype),u.prototype.constructor=u,_setPrototypeOf(u,Xe)}var Qp=dp.createContext(null);function getChildMapping(u,Xe){var Wt=Object.create(null);return u&&dp.Children.map(u,(function(u){return u})).forEach((function(u){Wt[u.key]=function mapper(u){return Xe&&(0,dp.isValidElement)(u)?Xe(u):u}(u)})),Wt}function getProp(u,Xe,Wt){return null!=Wt[Xe]?Wt[Xe]:u.props[Xe]}function getNextChildMapping(u,Xe,Wt){var fr=getChildMapping(u.children),_r=function mergeChildMappings(u,Xe){function getValueForKey(Wt){return Wt in Xe?Xe[Wt]:u[Wt]}u=u||{},Xe=Xe||{};var Wt,fr=Object.create(null),_r=[];for(var wr in u)wr in Xe?_r.length&&(fr[wr]=_r,_r=[]):_r.push(wr);var Ar={};for(var Kr in Xe){if(fr[Kr])for(Wt=0;Wt<fr[Kr].length;Wt++){var In=fr[Kr][Wt];Ar[fr[Kr][Wt]]=getValueForKey(In)}Ar[Kr]=getValueForKey(Kr)}for(Wt=0;Wt<_r.length;Wt++)Ar[_r[Wt]]=getValueForKey(_r[Wt]);return Ar}(Xe,fr);return Object.keys(_r).forEach((function(wr){var Ar=_r[wr];if((0,dp.isValidElement)(Ar)){var Kr=wr in Xe,In=wr in fr,no=Xe[wr],io=(0,dp.isValidElement)(no)&&!no.props.in;!In||Kr&&!io?In||!Kr||io?In&&Kr&&(0,dp.isValidElement)(no)&&(_r[wr]=(0,dp.cloneElement)(Ar,{onExited:Wt.bind(null,Ar),in:no.props.in,exit:getProp(Ar,"exit",u),enter:getProp(Ar,"enter",u)})):_r[wr]=(0,dp.cloneElement)(Ar,{in:!1}):_r[wr]=(0,dp.cloneElement)(Ar,{onExited:Wt.bind(null,Ar),in:!0,exit:getProp(Ar,"exit",u),enter:getProp(Ar,"enter",u)})}})),_r}var ef=Object.values||function(u){return Object.keys(u).map((function(Xe){return u[Xe]}))},rf=function(u){function TransitionGroup(Xe,Wt){var fr,_r=(fr=u.call(this,Xe,Wt)||this).handleExited.bind(function _assertThisInitialized(u){if(void 0===u)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return u}(fr));return fr.state={contextValue:{isMounting:!0},handleExited:_r,firstRender:!0},fr}_inheritsLoose(TransitionGroup,u);var Xe=TransitionGroup.prototype;return Xe.componentDidMount=function componentDidMount(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},Xe.componentWillUnmount=function componentWillUnmount(){this.mounted=!1},TransitionGroup.getDerivedStateFromProps=function getDerivedStateFromProps(u,Xe){var Wt,fr,_r=Xe.children,wr=Xe.handleExited;return{children:Xe.firstRender?(Wt=u,fr=wr,getChildMapping(Wt.children,(function(u){return(0,dp.cloneElement)(u,{onExited:fr.bind(null,u),in:!0,appear:getProp(u,"appear",Wt),enter:getProp(u,"enter",Wt),exit:getProp(u,"exit",Wt)})}))):getNextChildMapping(u,_r,wr),firstRender:!1}},Xe.handleExited=function handleExited(u,Xe){var Wt=getChildMapping(this.props.children);u.key in Wt||(u.props.onExited&&u.props.onExited(Xe),this.mounted&&this.setState((function(Xe){var Wt=(0,_p.A)({},Xe.children);return delete Wt[u.key],{children:Wt}})))},Xe.render=function render(){var u=this.props,Xe=u.component,Wt=u.childFactory,fr=(0,yp.A)(u,["component","childFactory"]),_r=this.state.contextValue,wr=ef(this.state.children).map(Wt);return delete fr.appear,delete fr.enter,delete fr.exit,null===Xe?dp.createElement(Qp.Provider,{value:_r},wr):dp.createElement(Qp.Provider,{value:_r},dp.createElement(Xe,fr,wr))},TransitionGroup}(dp.Component);rf.propTypes={},rf.defaultProps={component:"div",childFactory:function childFactory(u){return u}};var of=rf,af=__webpack_require__(7437),lf=__webpack_require__(3068);var cf=function Ripple(u){const{className:Xe,classes:Wt,pulsate:fr=!1,rippleX:_r,rippleY:wr,rippleSize:Ar,in:Kr,onExited:In,timeout:no}=u,[io,oo]=dp.useState(!1),ao=(0,vp.A)(Xe,Wt.ripple,Wt.rippleVisible,fr&&Wt.ripplePulsate),so={width:Ar,height:Ar,top:-Ar/2+wr,left:-Ar/2+_r},co=(0,vp.A)(Wt.child,io&&Wt.childLeaving,fr&&Wt.childPulsate);return Kr||io||oo(!0),dp.useEffect((()=>{if(!Kr&&null!=In){const u=setTimeout(In,no);return()=>{clearTimeout(u)}}}),[In,Kr,no]),(0,Fp.jsx)("span",{className:ao,style:so,children:(0,Fp.jsx)("span",{className:co})})},uf=__webpack_require__(8413);var df=(0,uf.A)("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]);const hf=["center","classes","className"];let mf,gf,yf,_f,_=u=>u;const bf=(0,af.i7)(mf||(mf=_`
2
+ 0% {
3
+ transform: scale(0);
4
+ opacity: 0.1;
5
+ }
6
+
7
+ 100% {
8
+ transform: scale(1);
9
+ opacity: 0.3;
10
+ }
11
+ `)),xf=(0,af.i7)(gf||(gf=_`
12
+ 0% {
13
+ opacity: 1;
14
+ }
15
+
16
+ 100% {
17
+ opacity: 0;
18
+ }
19
+ `)),Sf=(0,af.i7)(yf||(yf=_`
20
+ 0% {
21
+ transform: scale(1);
22
+ }
23
+
24
+ 50% {
25
+ transform: scale(0.92);
26
+ }
27
+
28
+ 100% {
29
+ transform: scale(1);
30
+ }
31
+ `)),kf=(0,Up.Ay)("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),Tf=(0,Up.Ay)(cf,{name:"MuiTouchRipple",slot:"Ripple"})(_f||(_f=_`
32
+ opacity: 0;
33
+ position: absolute;
34
+
35
+ &.${0} {
36
+ opacity: 0.3;
37
+ transform: scale(1);
38
+ animation-name: ${0};
39
+ animation-duration: ${0}ms;
40
+ animation-timing-function: ${0};
41
+ }
42
+
43
+ &.${0} {
44
+ animation-duration: ${0}ms;
45
+ }
46
+
47
+ & .${0} {
48
+ opacity: 1;
49
+ display: block;
50
+ width: 100%;
51
+ height: 100%;
52
+ border-radius: 50%;
53
+ background-color: currentColor;
54
+ }
55
+
56
+ & .${0} {
57
+ opacity: 0;
58
+ animation-name: ${0};
59
+ animation-duration: ${0}ms;
60
+ animation-timing-function: ${0};
61
+ }
62
+
63
+ & .${0} {
64
+ position: absolute;
65
+ /* @noflip */
66
+ left: 0px;
67
+ top: 0;
68
+ animation-name: ${0};
69
+ animation-duration: 2500ms;
70
+ animation-timing-function: ${0};
71
+ animation-iteration-count: infinite;
72
+ animation-delay: 200ms;
73
+ }
74
+ `),df.rippleVisible,bf,550,(({theme:u})=>u.transitions.easing.easeInOut),df.ripplePulsate,(({theme:u})=>u.transitions.duration.shorter),df.child,df.childLeaving,xf,550,(({theme:u})=>u.transitions.easing.easeInOut),df.childPulsate,Sf,(({theme:u})=>u.transitions.easing.easeInOut)),Cf=dp.forwardRef((function TouchRipple(u,Xe){const Wt=(0,$p.b)({props:u,name:"MuiTouchRipple"}),{center:fr=!1,classes:_r={},className:wr}=Wt,Ar=(0,yp.A)(Wt,hf),[Kr,In]=dp.useState([]),no=dp.useRef(0),io=dp.useRef(null);dp.useEffect((()=>{io.current&&(io.current(),io.current=null)}),[Kr]);const oo=dp.useRef(!1),ao=(0,lf.A)(),so=dp.useRef(null),co=dp.useRef(null),ho=dp.useCallback((u=>{const{pulsate:Xe,rippleX:Wt,rippleY:fr,rippleSize:wr,cb:Ar}=u;In((u=>[...u,(0,Fp.jsx)(Tf,{classes:{ripple:(0,vp.A)(_r.ripple,df.ripple),rippleVisible:(0,vp.A)(_r.rippleVisible,df.rippleVisible),ripplePulsate:(0,vp.A)(_r.ripplePulsate,df.ripplePulsate),child:(0,vp.A)(_r.child,df.child),childLeaving:(0,vp.A)(_r.childLeaving,df.childLeaving),childPulsate:(0,vp.A)(_r.childPulsate,df.childPulsate)},timeout:550,pulsate:Xe,rippleX:Wt,rippleY:fr,rippleSize:wr},no.current)])),no.current+=1,io.current=Ar}),[_r]),go=dp.useCallback(((u={},Xe={},Wt=()=>{})=>{const{pulsate:_r=!1,center:wr=fr||Xe.pulsate,fakeElement:Ar=!1}=Xe;if("mousedown"===(null==u?void 0:u.type)&&oo.current)return void(oo.current=!1);"touchstart"===(null==u?void 0:u.type)&&(oo.current=!0);const Kr=Ar?null:co.current,In=Kr?Kr.getBoundingClientRect():{width:0,height:0,left:0,top:0};let no,io,go;if(wr||void 0===u||0===u.clientX&&0===u.clientY||!u.clientX&&!u.touches)no=Math.round(In.width/2),io=Math.round(In.height/2);else{const{clientX:Xe,clientY:Wt}=u.touches&&u.touches.length>0?u.touches[0]:u;no=Math.round(Xe-In.left),io=Math.round(Wt-In.top)}if(wr)go=Math.sqrt((2*In.width**2+In.height**2)/3),go%2==0&&(go+=1);else{const u=2*Math.max(Math.abs((Kr?Kr.clientWidth:0)-no),no)+2,Xe=2*Math.max(Math.abs((Kr?Kr.clientHeight:0)-io),io)+2;go=Math.sqrt(u**2+Xe**2)}null!=u&&u.touches?null===so.current&&(so.current=()=>{ho({pulsate:_r,rippleX:no,rippleY:io,rippleSize:go,cb:Wt})},ao.start(80,(()=>{so.current&&(so.current(),so.current=null)}))):ho({pulsate:_r,rippleX:no,rippleY:io,rippleSize:go,cb:Wt})}),[fr,ho,ao]),xo=dp.useCallback((()=>{go({},{pulsate:!0})}),[go]),ko=dp.useCallback(((u,Xe)=>{if(ao.clear(),"touchend"===(null==u?void 0:u.type)&&so.current)return so.current(),so.current=null,void ao.start(0,(()=>{ko(u,Xe)}));so.current=null,In((u=>u.length>0?u.slice(1):u)),io.current=Xe}),[ao]);return dp.useImperativeHandle(Xe,(()=>({pulsate:xo,start:go,stop:ko})),[xo,go,ko]),(0,Fp.jsx)(kf,(0,_p.A)({className:(0,vp.A)(df.root,_r.root,wr),ref:co},Ar,{children:(0,Fp.jsx)(of,{component:null,exit:!0,children:Kr})}))}));var Pf=Cf;function getButtonBaseUtilityClass(u){return(0,bp.Ay)("MuiButtonBase",u)}var Rf=(0,uf.A)("MuiButtonBase",["root","disabled","focusVisible"]);const Of=["action","centerRipple","children","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","LinkComponent","onBlur","onClick","onContextMenu","onDragLeave","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","tabIndex","TouchRippleProps","touchRippleRef","type"],Df=(0,Up.Ay)("button",{name:"MuiButtonBase",slot:"Root",overridesResolver:(u,Xe)=>Xe.root})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${Rf.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),Ff=dp.forwardRef((function ButtonBase(u,Xe){const Wt=(0,$p.b)({props:u,name:"MuiButtonBase"}),{action:fr,centerRipple:_r=!1,children:wr,className:Ar,component:Kr="button",disabled:In=!1,disableRipple:no=!1,disableTouchRipple:io=!1,focusRipple:oo=!1,LinkComponent:ao="a",onBlur:so,onClick:co,onContextMenu:ho,onDragLeave:go,onFocus:xo,onFocusVisible:ko,onKeyDown:Co,onKeyUp:Io,onMouseDown:zo,onMouseLeave:Bo,onMouseUp:ca,onTouchEnd:ua,onTouchMove:Da,onTouchStart:ns,tabIndex:yl=0,TouchRippleProps:vl,touchRippleRef:kl,type:Al}=Wt,Ml=(0,yp.A)(Wt,Of),Rl=dp.useRef(null),Ol=dp.useRef(null),Ll=(0,Xp.A)(Ol,kl),{isFocusVisibleRef:Dl,onFocus:Bl,onBlur:Nl,ref:Vl}=(0,Jp.A)(),[Ul,$l]=dp.useState(!1);In&&Ul&&$l(!1),dp.useImperativeHandle(fr,(()=>({focusVisible:()=>{$l(!0),Rl.current.focus()}})),[]);const[Wl,Zl]=dp.useState(!1);dp.useEffect((()=>{Zl(!0)}),[]);const Gl=Wl&&!no&&!In;function useRippleHandler(u,Xe,Wt=io){return(0,Yp.A)((fr=>{Xe&&Xe(fr);return!Wt&&Ol.current&&Ol.current[u](fr),!0}))}dp.useEffect((()=>{Ul&&oo&&!no&&Wl&&Ol.current.pulsate()}),[no,oo,Ul,Wl]);const Xl=useRippleHandler("start",zo),Jl=useRippleHandler("stop",ho),Ql=useRippleHandler("stop",go),rc=useRippleHandler("stop",ca),ic=useRippleHandler("stop",(u=>{Ul&&u.preventDefault(),Bo&&Bo(u)})),oc=useRippleHandler("start",ns),lc=useRippleHandler("stop",ua),gc=useRippleHandler("stop",Da),bc=useRippleHandler("stop",(u=>{Nl(u),!1===Dl.current&&$l(!1),so&&so(u)}),!1),eu=(0,Yp.A)((u=>{Rl.current||(Rl.current=u.currentTarget),Bl(u),!0===Dl.current&&($l(!0),ko&&ko(u)),xo&&xo(u)})),isNonNativeButton=()=>{const u=Rl.current;return Kr&&"button"!==Kr&&!("A"===u.tagName&&u.href)},tu=dp.useRef(!1),nu=(0,Yp.A)((u=>{oo&&!tu.current&&Ul&&Ol.current&&" "===u.key&&(tu.current=!0,Ol.current.stop(u,(()=>{Ol.current.start(u)}))),u.target===u.currentTarget&&isNonNativeButton()&&" "===u.key&&u.preventDefault(),Co&&Co(u),u.target===u.currentTarget&&isNonNativeButton()&&"Enter"===u.key&&!In&&(u.preventDefault(),co&&co(u))})),iu=(0,Yp.A)((u=>{oo&&" "===u.key&&Ol.current&&Ul&&!u.defaultPrevented&&(tu.current=!1,Ol.current.stop(u,(()=>{Ol.current.pulsate(u)}))),Io&&Io(u),co&&u.target===u.currentTarget&&isNonNativeButton()&&" "===u.key&&!u.defaultPrevented&&co(u)}));let su=Kr;"button"===su&&(Ml.href||Ml.to)&&(su=ao);const cu={};"button"===su?(cu.type=void 0===Al?"button":Al,cu.disabled=In):(Ml.href||Ml.to||(cu.role="button"),In&&(cu["aria-disabled"]=In));const uu=(0,Xp.A)(Xe,Vl,Rl);const hu=(0,_p.A)({},Wt,{centerRipple:_r,component:Kr,disabled:In,disableRipple:no,disableTouchRipple:io,focusRipple:oo,tabIndex:yl,focusVisible:Ul}),Iu=(u=>{const{disabled:Xe,focusVisible:Wt,focusVisibleClassName:fr,classes:_r}=u,wr={root:["root",Xe&&"disabled",Wt&&"focusVisible"]},Ar=(0,xp.A)(wr,getButtonBaseUtilityClass,_r);return Wt&&fr&&(Ar.root+=` ${fr}`),Ar})(hu);return(0,Fp.jsxs)(Df,(0,_p.A)({as:su,className:(0,vp.A)(Iu.root,Ar),ownerState:hu,onBlur:bc,onClick:co,onContextMenu:Jl,onFocus:eu,onKeyDown:nu,onKeyUp:iu,onMouseDown:Xl,onMouseLeave:ic,onMouseUp:rc,onDragLeave:Ql,onTouchEnd:lc,onTouchMove:gc,onTouchStart:oc,ref:uu,tabIndex:In?-1:yl,type:Al},cu,Ml,{children:[wr,Gl?(0,Fp.jsx)(Pf,(0,_p.A)({ref:Ll,center:_r},vl)):null]}))}));var jf=Ff;function getSwitchBaseUtilityClass(u){return(0,bp.Ay)("PrivateSwitchBase",u)}(0,uf.A)("PrivateSwitchBase",["root","checked","disabled","input","edgeStart","edgeEnd"]);const Nf=["autoFocus","checked","checkedIcon","className","defaultChecked","disabled","disableFocusRipple","edge","icon","id","inputProps","inputRef","name","onBlur","onChange","onFocus","readOnly","required","tabIndex","type","value"],Vf=(0,Up.Ay)(jf)((({ownerState:u})=>(0,_p.A)({padding:9,borderRadius:"50%"},"start"===u.edge&&{marginLeft:"small"===u.size?-3:-12},"end"===u.edge&&{marginRight:"small"===u.size?-3:-12}))),Wf=(0,Up.Ay)("input",{shouldForwardProp:Hp.A})({cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}),Hf=dp.forwardRef((function SwitchBase(u,Xe){const{autoFocus:Wt,checked:fr,checkedIcon:_r,className:wr,defaultChecked:Ar,disabled:Kr,disableFocusRipple:In=!1,edge:no=!1,icon:io,id:oo,inputProps:ao,inputRef:so,name:co,onBlur:ho,onChange:go,onFocus:xo,readOnly:ko,required:Co=!1,tabIndex:Io,type:zo,value:Bo}=u,ca=(0,yp.A)(u,Nf),[ua,Da]=(0,Gp.A)({controlled:fr,default:Boolean(Ar),name:"SwitchBase",state:"checked"}),ns=useFormControl();let yl=Kr;ns&&void 0===yl&&(yl=ns.disabled);const vl="checkbox"===zo||"radio"===zo,kl=(0,_p.A)({},u,{checked:ua,disabled:yl,disableFocusRipple:In,edge:no}),Al=(u=>{const{classes:Xe,checked:Wt,disabled:fr,edge:_r}=u,wr={root:["root",Wt&&"checked",fr&&"disabled",_r&&`edge${(0,Vp.A)(_r)}`],input:["input"]};return(0,xp.A)(wr,getSwitchBaseUtilityClass,Xe)})(kl);return(0,Fp.jsxs)(Vf,(0,_p.A)({component:"span",className:(0,vp.A)(Al.root,wr),centerRipple:!0,focusRipple:!In,disabled:yl,tabIndex:null,role:void 0,onFocus:u=>{xo&&xo(u),ns&&ns.onFocus&&ns.onFocus(u)},onBlur:u=>{ho&&ho(u),ns&&ns.onBlur&&ns.onBlur(u)},ownerState:kl,ref:Xe},ca,{children:[(0,Fp.jsx)(Wf,(0,_p.A)({autoFocus:Wt,checked:fr,defaultChecked:Ar,className:Al.input,disabled:yl,id:vl?oo:void 0,name:co,onChange:u=>{if(u.nativeEvent.defaultPrevented)return;const Xe=u.target.checked;Da(Xe),go&&go(u,Xe)},readOnly:ko,ref:so,required:Co,ownerState:kl,tabIndex:Io,type:zo},"checkbox"===zo&&void 0===Bo?{}:{value:Bo},ao)),ua?_r:io]}))}));var Gf=Hf;function getSwitchUtilityClass(u){return(0,bp.Ay)("MuiSwitch",u)}var Xf=(0,uf.A)("MuiSwitch",["root","edgeStart","edgeEnd","switchBase","colorPrimary","colorSecondary","sizeSmall","sizeMedium","checked","disabled","input","thumb","track"]);const Jf=["className","color","edge","size","sx"],Qf=(0,Up.Ay)("span",{name:"MuiSwitch",slot:"Root",overridesResolver:(u,Xe)=>{const{ownerState:Wt}=u;return[Xe.root,Wt.edge&&Xe[`edge${(0,Vp.A)(Wt.edge)}`],Xe[`size${(0,Vp.A)(Wt.size)}`]]}})({display:"inline-flex",width:58,height:38,overflow:"hidden",padding:12,boxSizing:"border-box",position:"relative",flexShrink:0,zIndex:0,verticalAlign:"middle","@media print":{colorAdjust:"exact"},variants:[{props:{edge:"start"},style:{marginLeft:-8}},{props:{edge:"end"},style:{marginRight:-8}},{props:{size:"small"},style:{width:40,height:24,padding:7,[`& .${Xf.thumb}`]:{width:16,height:16},[`& .${Xf.switchBase}`]:{padding:4,[`&.${Xf.checked}`]:{transform:"translateX(16px)"}}}}]}),em=(0,Up.Ay)(Gf,{name:"MuiSwitch",slot:"SwitchBase",overridesResolver:(u,Xe)=>{const{ownerState:Wt}=u;return[Xe.switchBase,{[`& .${Xf.input}`]:Xe.input},"default"!==Wt.color&&Xe[`color${(0,Vp.A)(Wt.color)}`]]}})((({theme:u})=>({position:"absolute",top:0,left:0,zIndex:1,color:u.vars?u.vars.palette.Switch.defaultColor:`${"light"===u.palette.mode?u.palette.common.white:u.palette.grey[300]}`,transition:u.transitions.create(["left","transform"],{duration:u.transitions.duration.shortest}),[`&.${Xf.checked}`]:{transform:"translateX(20px)"},[`&.${Xf.disabled}`]:{color:u.vars?u.vars.palette.Switch.defaultDisabledColor:`${"light"===u.palette.mode?u.palette.grey[100]:u.palette.grey[600]}`},[`&.${Xf.checked} + .${Xf.track}`]:{opacity:.5},[`&.${Xf.disabled} + .${Xf.track}`]:{opacity:u.vars?u.vars.opacity.switchTrackDisabled:""+("light"===u.palette.mode?.12:.2)},[`& .${Xf.input}`]:{left:"-100%",width:"300%"}})),(({theme:u})=>({"&:hover":{backgroundColor:u.vars?`rgba(${u.vars.palette.action.activeChannel} / ${u.vars.palette.action.hoverOpacity})`:(0,Zp.X4)(u.palette.action.active,u.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},variants:[...Object.entries(u.palette).filter((([,u])=>u.main&&u.light)).map((([Xe])=>({props:{color:Xe},style:{[`&.${Xf.checked}`]:{color:(u.vars||u).palette[Xe].main,"&:hover":{backgroundColor:u.vars?`rgba(${u.vars.palette[Xe].mainChannel} / ${u.vars.palette.action.hoverOpacity})`:(0,Zp.X4)(u.palette[Xe].main,u.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${Xf.disabled}`]:{color:u.vars?u.vars.palette.Switch[`${Xe}DisabledColor`]:`${"light"===u.palette.mode?(0,Zp.a)(u.palette[Xe].main,.62):(0,Zp.e$)(u.palette[Xe].main,.55)}`}},[`&.${Xf.checked} + .${Xf.track}`]:{backgroundColor:(u.vars||u).palette[Xe].main}}})))]}))),tm=(0,Up.Ay)("span",{name:"MuiSwitch",slot:"Track",overridesResolver:(u,Xe)=>Xe.track})((({theme:u})=>({height:"100%",width:"100%",borderRadius:7,zIndex:-1,transition:u.transitions.create(["opacity","background-color"],{duration:u.transitions.duration.shortest}),backgroundColor:u.vars?u.vars.palette.common.onBackground:`${"light"===u.palette.mode?u.palette.common.black:u.palette.common.white}`,opacity:u.vars?u.vars.opacity.switchTrack:""+("light"===u.palette.mode?.38:.3)}))),rm=(0,Up.Ay)("span",{name:"MuiSwitch",slot:"Thumb",overridesResolver:(u,Xe)=>Xe.thumb})((({theme:u})=>({boxShadow:(u.vars||u).shadows[1],backgroundColor:"currentColor",width:20,height:20,borderRadius:"50%"}))),nm=dp.forwardRef((function Switch(u,Xe){const Wt=(0,$p.b)({props:u,name:"MuiSwitch"}),{className:fr,color:_r="primary",edge:wr=!1,size:Ar="medium",sx:Kr}=Wt,In=(0,yp.A)(Wt,Jf),no=(0,_p.A)({},Wt,{color:_r,edge:wr,size:Ar}),io=(u=>{const{classes:Xe,edge:Wt,size:fr,color:_r,checked:wr,disabled:Ar}=u,Kr={root:["root",Wt&&`edge${(0,Vp.A)(Wt)}`,`size${(0,Vp.A)(fr)}`],switchBase:["switchBase",`color${(0,Vp.A)(_r)}`,wr&&"checked",Ar&&"disabled"],thumb:["thumb"],track:["track"],input:["input"]},In=(0,xp.A)(Kr,getSwitchUtilityClass,Xe);return(0,_p.A)({},Xe,In)})(no),oo=(0,Fp.jsx)(rm,{className:io.thumb,ownerState:no});return(0,Fp.jsxs)(Qf,{className:(0,vp.A)(io.root,fr),sx:Kr,ownerState:no,children:[(0,Fp.jsx)(em,(0,_p.A)({type:"checkbox",icon:oo,checkedIcon:oo,ref:Xe,ownerState:no},In,{classes:(0,_p.A)({},io,{root:io.switchBase})})),(0,Fp.jsx)(tm,{className:io.track,ownerState:no})]})}));var im=nm;const om=dp.createContext();const useRtl=()=>{const u=dp.useContext(om);return null!=u&&u};var am=function isHostComponent(u){return"string"==typeof u};var sm=function appendOwnerState(u,Xe,Wt){return void 0===u||am(u)?Xe:(0,_p.A)({},Xe,{ownerState:(0,_p.A)({},Xe.ownerState,Wt)})},lm=__webpack_require__(2765),cm=__webpack_require__(8312);function styles_useTheme_useTheme(){const u=Ep(lm.A);return u[cm.A]||u}var um=__webpack_require__(961),dm=!1,hm="unmounted",pm="exited",fm="entering",mm="entered",gm="exiting",ym=function(u){function Transition(Xe,Wt){var fr;fr=u.call(this,Xe,Wt)||this;var _r,wr=Wt&&!Wt.isMounting?Xe.enter:Xe.appear;return fr.appearStatus=null,Xe.in?wr?(_r=pm,fr.appearStatus=fm):_r=mm:_r=Xe.unmountOnExit||Xe.mountOnEnter?hm:pm,fr.state={status:_r},fr.nextCallback=null,fr}_inheritsLoose(Transition,u),Transition.getDerivedStateFromProps=function getDerivedStateFromProps(u,Xe){return u.in&&Xe.status===hm?{status:pm}:null};var Xe=Transition.prototype;return Xe.componentDidMount=function componentDidMount(){this.updateStatus(!0,this.appearStatus)},Xe.componentDidUpdate=function componentDidUpdate(u){var Xe=null;if(u!==this.props){var Wt=this.state.status;this.props.in?Wt!==fm&&Wt!==mm&&(Xe=fm):Wt!==fm&&Wt!==mm||(Xe=gm)}this.updateStatus(!1,Xe)},Xe.componentWillUnmount=function componentWillUnmount(){this.cancelNextCallback()},Xe.getTimeouts=function getTimeouts(){var u,Xe,Wt,fr=this.props.timeout;return u=Xe=Wt=fr,null!=fr&&"number"!=typeof fr&&(u=fr.exit,Xe=fr.enter,Wt=void 0!==fr.appear?fr.appear:Xe),{exit:u,enter:Xe,appear:Wt}},Xe.updateStatus=function updateStatus(u,Xe){if(void 0===u&&(u=!1),null!==Xe)if(this.cancelNextCallback(),Xe===fm){if(this.props.unmountOnExit||this.props.mountOnEnter){var Wt=this.props.nodeRef?this.props.nodeRef.current:um.findDOMNode(this);Wt&&function forceReflow(u){u.scrollTop}(Wt)}this.performEnter(u)}else this.performExit();else this.props.unmountOnExit&&this.state.status===pm&&this.setState({status:hm})},Xe.performEnter=function performEnter(u){var Xe=this,Wt=this.props.enter,fr=this.context?this.context.isMounting:u,_r=this.props.nodeRef?[fr]:[um.findDOMNode(this),fr],wr=_r[0],Ar=_r[1],Kr=this.getTimeouts(),In=fr?Kr.appear:Kr.enter;!u&&!Wt||dm?this.safeSetState({status:mm},(function(){Xe.props.onEntered(wr)})):(this.props.onEnter(wr,Ar),this.safeSetState({status:fm},(function(){Xe.props.onEntering(wr,Ar),Xe.onTransitionEnd(In,(function(){Xe.safeSetState({status:mm},(function(){Xe.props.onEntered(wr,Ar)}))}))})))},Xe.performExit=function performExit(){var u=this,Xe=this.props.exit,Wt=this.getTimeouts(),fr=this.props.nodeRef?void 0:um.findDOMNode(this);Xe&&!dm?(this.props.onExit(fr),this.safeSetState({status:gm},(function(){u.props.onExiting(fr),u.onTransitionEnd(Wt.exit,(function(){u.safeSetState({status:pm},(function(){u.props.onExited(fr)}))}))}))):this.safeSetState({status:pm},(function(){u.props.onExited(fr)}))},Xe.cancelNextCallback=function cancelNextCallback(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},Xe.safeSetState=function safeSetState(u,Xe){Xe=this.setNextCallback(Xe),this.setState(u,Xe)},Xe.setNextCallback=function setNextCallback(u){var Xe=this,Wt=!0;return this.nextCallback=function(fr){Wt&&(Wt=!1,Xe.nextCallback=null,u(fr))},this.nextCallback.cancel=function(){Wt=!1},this.nextCallback},Xe.onTransitionEnd=function onTransitionEnd(u,Xe){this.setNextCallback(Xe);var Wt=this.props.nodeRef?this.props.nodeRef.current:um.findDOMNode(this),fr=null==u&&!this.props.addEndListener;if(Wt&&!fr){if(this.props.addEndListener){var _r=this.props.nodeRef?[this.nextCallback]:[Wt,this.nextCallback],wr=_r[0],Ar=_r[1];this.props.addEndListener(wr,Ar)}null!=u&&setTimeout(this.nextCallback,u)}else setTimeout(this.nextCallback,0)},Xe.render=function render(){var u=this.state.status;if(u===hm)return null;var Xe=this.props,Wt=Xe.children,fr=(Xe.in,Xe.mountOnEnter,Xe.unmountOnExit,Xe.appear,Xe.enter,Xe.exit,Xe.timeout,Xe.addEndListener,Xe.onEnter,Xe.onEntering,Xe.onEntered,Xe.onExit,Xe.onExiting,Xe.onExited,Xe.nodeRef,(0,yp.A)(Xe,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]));return dp.createElement(Qp.Provider,{value:null},"function"==typeof Wt?Wt(u,fr):dp.cloneElement(dp.Children.only(Wt),fr))},Transition}(dp.Component);function Transition_noop(){}ym.contextType=Qp,ym.propTypes={},ym.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Transition_noop,onEntering:Transition_noop,onEntered:Transition_noop,onExit:Transition_noop,onExiting:Transition_noop,onExited:Transition_noop},ym.UNMOUNTED=hm,ym.EXITED=pm,ym.ENTERING=fm,ym.ENTERED=mm,ym.EXITING=gm;var _m=ym;const reflow=u=>u.scrollTop;function getTransitionProps(u,Xe){var Wt,fr;const{timeout:_r,easing:wr,style:Ar={}}=u;return{duration:null!=(Wt=Ar.transitionDuration)?Wt:"number"==typeof _r?_r:_r[Xe.mode]||0,easing:null!=(fr=Ar.transitionTimingFunction)?fr:"object"==typeof wr?wr[Xe.mode]:wr,delay:Ar.transitionDelay}}const vm=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function getScale(u){return`scale(${u}, ${u**2})`}const bm={entering:{opacity:1,transform:getScale(1)},entered:{opacity:1,transform:"none"}},xm="undefined"!=typeof navigator&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),wm=dp.forwardRef((function Grow(u,Xe){const{addEndListener:Wt,appear:fr=!0,children:_r,easing:wr,in:Ar,onEnter:Kr,onEntered:In,onEntering:no,onExit:io,onExited:oo,onExiting:ao,style:so,timeout:co="auto",TransitionComponent:ho=_m}=u,go=(0,yp.A)(u,vm),xo=(0,lf.A)(),ko=dp.useRef(),Co=styles_useTheme_useTheme(),Io=dp.useRef(null),zo=(0,Xp.A)(Io,_r.ref,Xe),normalizedTransitionCallback=u=>Xe=>{if(u){const Wt=Io.current;void 0===Xe?u(Wt):u(Wt,Xe)}},Bo=normalizedTransitionCallback(no),ca=normalizedTransitionCallback(((u,Xe)=>{reflow(u);const{duration:Wt,delay:fr,easing:_r}=getTransitionProps({style:so,timeout:co,easing:wr},{mode:"enter"});let Ar;"auto"===co?(Ar=Co.transitions.getAutoHeightDuration(u.clientHeight),ko.current=Ar):Ar=Wt,u.style.transition=[Co.transitions.create("opacity",{duration:Ar,delay:fr}),Co.transitions.create("transform",{duration:xm?Ar:.666*Ar,delay:fr,easing:_r})].join(","),Kr&&Kr(u,Xe)})),ua=normalizedTransitionCallback(In),Da=normalizedTransitionCallback(ao),ns=normalizedTransitionCallback((u=>{const{duration:Xe,delay:Wt,easing:fr}=getTransitionProps({style:so,timeout:co,easing:wr},{mode:"exit"});let _r;"auto"===co?(_r=Co.transitions.getAutoHeightDuration(u.clientHeight),ko.current=_r):_r=Xe,u.style.transition=[Co.transitions.create("opacity",{duration:_r,delay:Wt}),Co.transitions.create("transform",{duration:xm?_r:.666*_r,delay:xm?Wt:Wt||.333*_r,easing:fr})].join(","),u.style.opacity=0,u.style.transform=getScale(.75),io&&io(u)})),yl=normalizedTransitionCallback(oo);return(0,Fp.jsx)(ho,(0,_p.A)({appear:fr,in:Ar,nodeRef:Io,onEnter:ca,onEntered:ua,onEntering:Bo,onExit:ns,onExited:yl,onExiting:Da,addEndListener:u=>{"auto"===co&&xo.start(ko.current||0,u),Wt&&Wt(Io.current,u)},timeout:"auto"===co?null:co},go,{children:(u,Xe)=>dp.cloneElement(_r,(0,_p.A)({style:(0,_p.A)({opacity:0,transform:getScale(.75),visibility:"exited"!==u||Ar?void 0:"hidden"},bm[u],so,_r.props.style),ref:zo},Xe))}))}));wm.muiSupportAuto=!0;var Sm=wm,km=__webpack_require__(2923),Am=__webpack_require__(1523),Tm=__webpack_require__(1529),Em=__webpack_require__(2325);function getWindow(u){if(null==u)return window;if("[object Window]"!==u.toString()){var Xe=u.ownerDocument;return Xe&&Xe.defaultView||window}return u}function isElement(u){return u instanceof getWindow(u).Element||u instanceof Element}function isHTMLElement(u){return u instanceof getWindow(u).HTMLElement||u instanceof HTMLElement}function isShadowRoot(u){return"undefined"!=typeof ShadowRoot&&(u instanceof getWindow(u).ShadowRoot||u instanceof ShadowRoot)}var Cm=Math.max,Pm=Math.min,Im=Math.round;function getUAString(){var u=navigator.userAgentData;return null!=u&&u.brands&&Array.isArray(u.brands)?u.brands.map((function(u){return u.brand+"/"+u.version})).join(" "):navigator.userAgent}function isLayoutViewport(){return!/^((?!chrome|android).)*safari/i.test(getUAString())}function getBoundingClientRect(u,Xe,Wt){void 0===Xe&&(Xe=!1),void 0===Wt&&(Wt=!1);var fr=u.getBoundingClientRect(),_r=1,wr=1;Xe&&isHTMLElement(u)&&(_r=u.offsetWidth>0&&Im(fr.width)/u.offsetWidth||1,wr=u.offsetHeight>0&&Im(fr.height)/u.offsetHeight||1);var Ar=(isElement(u)?getWindow(u):window).visualViewport,Kr=!isLayoutViewport()&&Wt,In=(fr.left+(Kr&&Ar?Ar.offsetLeft:0))/_r,no=(fr.top+(Kr&&Ar?Ar.offsetTop:0))/wr,io=fr.width/_r,oo=fr.height/wr;return{width:io,height:oo,top:no,right:In+io,bottom:no+oo,left:In,x:In,y:no}}function getWindowScroll(u){var Xe=getWindow(u);return{scrollLeft:Xe.pageXOffset,scrollTop:Xe.pageYOffset}}function getNodeName(u){return u?(u.nodeName||"").toLowerCase():null}function getDocumentElement(u){return((isElement(u)?u.ownerDocument:u.document)||window.document).documentElement}function getWindowScrollBarX(u){return getBoundingClientRect(getDocumentElement(u)).left+getWindowScroll(u).scrollLeft}function getComputedStyle_getComputedStyle(u){return getWindow(u).getComputedStyle(u)}function isScrollParent(u){var Xe=getComputedStyle_getComputedStyle(u),Wt=Xe.overflow,fr=Xe.overflowX,_r=Xe.overflowY;return/auto|scroll|overlay|hidden/.test(Wt+_r+fr)}function getCompositeRect(u,Xe,Wt){void 0===Wt&&(Wt=!1);var fr=isHTMLElement(Xe),_r=isHTMLElement(Xe)&&function isElementScaled(u){var Xe=u.getBoundingClientRect(),Wt=Im(Xe.width)/u.offsetWidth||1,fr=Im(Xe.height)/u.offsetHeight||1;return 1!==Wt||1!==fr}(Xe),wr=getDocumentElement(Xe),Ar=getBoundingClientRect(u,_r,Wt),Kr={scrollLeft:0,scrollTop:0},In={x:0,y:0};return(fr||!fr&&!Wt)&&(("body"!==getNodeName(Xe)||isScrollParent(wr))&&(Kr=function getNodeScroll(u){return u!==getWindow(u)&&isHTMLElement(u)?function getHTMLElementScroll(u){return{scrollLeft:u.scrollLeft,scrollTop:u.scrollTop}}(u):getWindowScroll(u)}(Xe)),isHTMLElement(Xe)?((In=getBoundingClientRect(Xe,!0)).x+=Xe.clientLeft,In.y+=Xe.clientTop):wr&&(In.x=getWindowScrollBarX(wr))),{x:Ar.left+Kr.scrollLeft-In.x,y:Ar.top+Kr.scrollTop-In.y,width:Ar.width,height:Ar.height}}function getLayoutRect(u){var Xe=getBoundingClientRect(u),Wt=u.offsetWidth,fr=u.offsetHeight;return Math.abs(Xe.width-Wt)<=1&&(Wt=Xe.width),Math.abs(Xe.height-fr)<=1&&(fr=Xe.height),{x:u.offsetLeft,y:u.offsetTop,width:Wt,height:fr}}function getParentNode(u){return"html"===getNodeName(u)?u:u.assignedSlot||u.parentNode||(isShadowRoot(u)?u.host:null)||getDocumentElement(u)}function getScrollParent(u){return["html","body","#document"].indexOf(getNodeName(u))>=0?u.ownerDocument.body:isHTMLElement(u)&&isScrollParent(u)?u:getScrollParent(getParentNode(u))}function listScrollParents(u,Xe){var Wt;void 0===Xe&&(Xe=[]);var fr=getScrollParent(u),_r=fr===(null==(Wt=u.ownerDocument)?void 0:Wt.body),wr=getWindow(fr),Ar=_r?[wr].concat(wr.visualViewport||[],isScrollParent(fr)?fr:[]):fr,Kr=Xe.concat(Ar);return _r?Kr:Kr.concat(listScrollParents(getParentNode(Ar)))}function isTableElement(u){return["table","td","th"].indexOf(getNodeName(u))>=0}function getTrueOffsetParent(u){return isHTMLElement(u)&&"fixed"!==getComputedStyle_getComputedStyle(u).position?u.offsetParent:null}function getOffsetParent(u){for(var Xe=getWindow(u),Wt=getTrueOffsetParent(u);Wt&&isTableElement(Wt)&&"static"===getComputedStyle_getComputedStyle(Wt).position;)Wt=getTrueOffsetParent(Wt);return Wt&&("html"===getNodeName(Wt)||"body"===getNodeName(Wt)&&"static"===getComputedStyle_getComputedStyle(Wt).position)?Xe:Wt||function getContainingBlock(u){var Xe=/firefox/i.test(getUAString());if(/Trident/i.test(getUAString())&&isHTMLElement(u)&&"fixed"===getComputedStyle_getComputedStyle(u).position)return null;var Wt=getParentNode(u);for(isShadowRoot(Wt)&&(Wt=Wt.host);isHTMLElement(Wt)&&["html","body"].indexOf(getNodeName(Wt))<0;){var fr=getComputedStyle_getComputedStyle(Wt);if("none"!==fr.transform||"none"!==fr.perspective||"paint"===fr.contain||-1!==["transform","perspective"].indexOf(fr.willChange)||Xe&&"filter"===fr.willChange||Xe&&fr.filter&&"none"!==fr.filter)return Wt;Wt=Wt.parentNode}return null}(u)||Xe}var Mm="top",Rm="bottom",zm="right",Om="left",Lm="auto",Dm=[Mm,Rm,zm,Om],Fm="start",jm="end",Bm="viewport",Nm="popper",Vm=Dm.reduce((function(u,Xe){return u.concat([Xe+"-"+Fm,Xe+"-"+jm])}),[]),Um=[].concat(Dm,[Lm]).reduce((function(u,Xe){return u.concat([Xe,Xe+"-"+Fm,Xe+"-"+jm])}),[]),$m=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function order(u){var Xe=new Map,Wt=new Set,fr=[];function sort(u){Wt.add(u.name),[].concat(u.requires||[],u.requiresIfExists||[]).forEach((function(u){if(!Wt.has(u)){var fr=Xe.get(u);fr&&sort(fr)}})),fr.push(u)}return u.forEach((function(u){Xe.set(u.name,u)})),u.forEach((function(u){Wt.has(u.name)||sort(u)})),fr}var Wm={placement:"bottom",modifiers:[],strategy:"absolute"};function areValidElements(){for(var u=arguments.length,Xe=new Array(u),Wt=0;Wt<u;Wt++)Xe[Wt]=arguments[Wt];return!Xe.some((function(u){return!(u&&"function"==typeof u.getBoundingClientRect)}))}function popperGenerator(u){void 0===u&&(u={});var Xe=u,Wt=Xe.defaultModifiers,fr=void 0===Wt?[]:Wt,_r=Xe.defaultOptions,wr=void 0===_r?Wm:_r;return function createPopper(u,Xe,Wt){void 0===Wt&&(Wt=wr);var _r,Ar,Kr={placement:"bottom",orderedModifiers:[],options:Object.assign({},Wm,wr),modifiersData:{},elements:{reference:u,popper:Xe},attributes:{},styles:{}},In=[],no=!1,io={state:Kr,setOptions:function setOptions(Wt){var _r="function"==typeof Wt?Wt(Kr.options):Wt;cleanupModifierEffects(),Kr.options=Object.assign({},wr,Kr.options,_r),Kr.scrollParents={reference:isElement(u)?listScrollParents(u):u.contextElement?listScrollParents(u.contextElement):[],popper:listScrollParents(Xe)};var Ar=function orderModifiers(u){var Xe=order(u);return $m.reduce((function(u,Wt){return u.concat(Xe.filter((function(u){return u.phase===Wt})))}),[])}(function mergeByName(u){var Xe=u.reduce((function(u,Xe){var Wt=u[Xe.name];return u[Xe.name]=Wt?Object.assign({},Wt,Xe,{options:Object.assign({},Wt.options,Xe.options),data:Object.assign({},Wt.data,Xe.data)}):Xe,u}),{});return Object.keys(Xe).map((function(u){return Xe[u]}))}([].concat(fr,Kr.options.modifiers)));return Kr.orderedModifiers=Ar.filter((function(u){return u.enabled})),function runModifierEffects(){Kr.orderedModifiers.forEach((function(u){var Xe=u.name,Wt=u.options,fr=void 0===Wt?{}:Wt,_r=u.effect;if("function"==typeof _r){var wr=_r({state:Kr,name:Xe,instance:io,options:fr}),Ar=function noopFn(){};In.push(wr||Ar)}}))}(),io.update()},forceUpdate:function forceUpdate(){if(!no){var u=Kr.elements,Xe=u.reference,Wt=u.popper;if(areValidElements(Xe,Wt)){Kr.rects={reference:getCompositeRect(Xe,getOffsetParent(Wt),"fixed"===Kr.options.strategy),popper:getLayoutRect(Wt)},Kr.reset=!1,Kr.placement=Kr.options.placement,Kr.orderedModifiers.forEach((function(u){return Kr.modifiersData[u.name]=Object.assign({},u.data)}));for(var fr=0;fr<Kr.orderedModifiers.length;fr++)if(!0!==Kr.reset){var _r=Kr.orderedModifiers[fr],wr=_r.fn,Ar=_r.options,In=void 0===Ar?{}:Ar,oo=_r.name;"function"==typeof wr&&(Kr=wr({state:Kr,options:In,name:oo,instance:io})||Kr)}else Kr.reset=!1,fr=-1}}},update:(_r=function(){return new Promise((function(u){io.forceUpdate(),u(Kr)}))},function(){return Ar||(Ar=new Promise((function(u){Promise.resolve().then((function(){Ar=void 0,u(_r())}))}))),Ar}),destroy:function destroy(){cleanupModifierEffects(),no=!0}};if(!areValidElements(u,Xe))return io;function cleanupModifierEffects(){In.forEach((function(u){return u()})),In=[]}return io.setOptions(Wt).then((function(u){!no&&Wt.onFirstUpdate&&Wt.onFirstUpdate(u)})),io}}var qm={passive:!0};function getBasePlacement(u){return u.split("-")[0]}function getVariation(u){return u.split("-")[1]}function getMainAxisFromPlacement(u){return["top","bottom"].indexOf(u)>=0?"x":"y"}function computeOffsets(u){var Xe,Wt=u.reference,fr=u.element,_r=u.placement,wr=_r?getBasePlacement(_r):null,Ar=_r?getVariation(_r):null,Kr=Wt.x+Wt.width/2-fr.width/2,In=Wt.y+Wt.height/2-fr.height/2;switch(wr){case Mm:Xe={x:Kr,y:Wt.y-fr.height};break;case Rm:Xe={x:Kr,y:Wt.y+Wt.height};break;case zm:Xe={x:Wt.x+Wt.width,y:In};break;case Om:Xe={x:Wt.x-fr.width,y:In};break;default:Xe={x:Wt.x,y:Wt.y}}var no=wr?getMainAxisFromPlacement(wr):null;if(null!=no){var io="y"===no?"height":"width";switch(Ar){case Fm:Xe[no]=Xe[no]-(Wt[io]/2-fr[io]/2);break;case jm:Xe[no]=Xe[no]+(Wt[io]/2-fr[io]/2)}}return Xe}var Zm={top:"auto",right:"auto",bottom:"auto",left:"auto"};function mapToStyles(u){var Xe,Wt=u.popper,fr=u.popperRect,_r=u.placement,wr=u.variation,Ar=u.offsets,Kr=u.position,In=u.gpuAcceleration,no=u.adaptive,io=u.roundOffsets,oo=u.isFixed,ao=Ar.x,so=void 0===ao?0:ao,co=Ar.y,ho=void 0===co?0:co,go="function"==typeof io?io({x:so,y:ho}):{x:so,y:ho};so=go.x,ho=go.y;var xo=Ar.hasOwnProperty("x"),ko=Ar.hasOwnProperty("y"),Co=Om,Io=Mm,zo=window;if(no){var Bo=getOffsetParent(Wt),ca="clientHeight",ua="clientWidth";if(Bo===getWindow(Wt)&&"static"!==getComputedStyle_getComputedStyle(Bo=getDocumentElement(Wt)).position&&"absolute"===Kr&&(ca="scrollHeight",ua="scrollWidth"),_r===Mm||(_r===Om||_r===zm)&&wr===jm)Io=Rm,ho-=(oo&&Bo===zo&&zo.visualViewport?zo.visualViewport.height:Bo[ca])-fr.height,ho*=In?1:-1;if(_r===Om||(_r===Mm||_r===Rm)&&wr===jm)Co=zm,so-=(oo&&Bo===zo&&zo.visualViewport?zo.visualViewport.width:Bo[ua])-fr.width,so*=In?1:-1}var Da,ns=Object.assign({position:Kr},no&&Zm),yl=!0===io?function roundOffsetsByDPR(u,Xe){var Wt=u.x,fr=u.y,_r=Xe.devicePixelRatio||1;return{x:Im(Wt*_r)/_r||0,y:Im(fr*_r)/_r||0}}({x:so,y:ho},getWindow(Wt)):{x:so,y:ho};return so=yl.x,ho=yl.y,In?Object.assign({},ns,((Da={})[Io]=ko?"0":"",Da[Co]=xo?"0":"",Da.transform=(zo.devicePixelRatio||1)<=1?"translate("+so+"px, "+ho+"px)":"translate3d("+so+"px, "+ho+"px, 0)",Da)):Object.assign({},ns,((Xe={})[Io]=ko?ho+"px":"",Xe[Co]=xo?so+"px":"",Xe.transform="",Xe))}var Hm={name:"applyStyles",enabled:!0,phase:"write",fn:function applyStyles(u){var Xe=u.state;Object.keys(Xe.elements).forEach((function(u){var Wt=Xe.styles[u]||{},fr=Xe.attributes[u]||{},_r=Xe.elements[u];isHTMLElement(_r)&&getNodeName(_r)&&(Object.assign(_r.style,Wt),Object.keys(fr).forEach((function(u){var Xe=fr[u];!1===Xe?_r.removeAttribute(u):_r.setAttribute(u,!0===Xe?"":Xe)})))}))},effect:function applyStyles_effect(u){var Xe=u.state,Wt={popper:{position:Xe.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(Xe.elements.popper.style,Wt.popper),Xe.styles=Wt,Xe.elements.arrow&&Object.assign(Xe.elements.arrow.style,Wt.arrow),function(){Object.keys(Xe.elements).forEach((function(u){var fr=Xe.elements[u],_r=Xe.attributes[u]||{},wr=Object.keys(Xe.styles.hasOwnProperty(u)?Xe.styles[u]:Wt[u]).reduce((function(u,Xe){return u[Xe]="",u}),{});isHTMLElement(fr)&&getNodeName(fr)&&(Object.assign(fr.style,wr),Object.keys(_r).forEach((function(u){fr.removeAttribute(u)})))}))}},requires:["computeStyles"]};var Gm={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function offset(u){var Xe=u.state,Wt=u.options,fr=u.name,_r=Wt.offset,wr=void 0===_r?[0,0]:_r,Ar=Um.reduce((function(u,Wt){return u[Wt]=function distanceAndSkiddingToXY(u,Xe,Wt){var fr=getBasePlacement(u),_r=[Om,Mm].indexOf(fr)>=0?-1:1,wr="function"==typeof Wt?Wt(Object.assign({},Xe,{placement:u})):Wt,Ar=wr[0],Kr=wr[1];return Ar=Ar||0,Kr=(Kr||0)*_r,[Om,zm].indexOf(fr)>=0?{x:Kr,y:Ar}:{x:Ar,y:Kr}}(Wt,Xe.rects,wr),u}),{}),Kr=Ar[Xe.placement],In=Kr.x,no=Kr.y;null!=Xe.modifiersData.popperOffsets&&(Xe.modifiersData.popperOffsets.x+=In,Xe.modifiersData.popperOffsets.y+=no),Xe.modifiersData[fr]=Ar}},Km={left:"right",right:"left",bottom:"top",top:"bottom"};function getOppositePlacement(u){return u.replace(/left|right|bottom|top/g,(function(u){return Km[u]}))}var Xm={start:"end",end:"start"};function getOppositeVariationPlacement(u){return u.replace(/start|end/g,(function(u){return Xm[u]}))}function contains(u,Xe){var Wt=Xe.getRootNode&&Xe.getRootNode();if(u.contains(Xe))return!0;if(Wt&&isShadowRoot(Wt)){var fr=Xe;do{if(fr&&u.isSameNode(fr))return!0;fr=fr.parentNode||fr.host}while(fr)}return!1}function rectToClientRect(u){return Object.assign({},u,{left:u.x,top:u.y,right:u.x+u.width,bottom:u.y+u.height})}function getClientRectFromMixedType(u,Xe,Wt){return Xe===Bm?rectToClientRect(function getViewportRect(u,Xe){var Wt=getWindow(u),fr=getDocumentElement(u),_r=Wt.visualViewport,wr=fr.clientWidth,Ar=fr.clientHeight,Kr=0,In=0;if(_r){wr=_r.width,Ar=_r.height;var no=isLayoutViewport();(no||!no&&"fixed"===Xe)&&(Kr=_r.offsetLeft,In=_r.offsetTop)}return{width:wr,height:Ar,x:Kr+getWindowScrollBarX(u),y:In}}(u,Wt)):isElement(Xe)?function getInnerBoundingClientRect(u,Xe){var Wt=getBoundingClientRect(u,!1,"fixed"===Xe);return Wt.top=Wt.top+u.clientTop,Wt.left=Wt.left+u.clientLeft,Wt.bottom=Wt.top+u.clientHeight,Wt.right=Wt.left+u.clientWidth,Wt.width=u.clientWidth,Wt.height=u.clientHeight,Wt.x=Wt.left,Wt.y=Wt.top,Wt}(Xe,Wt):rectToClientRect(function getDocumentRect(u){var Xe,Wt=getDocumentElement(u),fr=getWindowScroll(u),_r=null==(Xe=u.ownerDocument)?void 0:Xe.body,wr=Cm(Wt.scrollWidth,Wt.clientWidth,_r?_r.scrollWidth:0,_r?_r.clientWidth:0),Ar=Cm(Wt.scrollHeight,Wt.clientHeight,_r?_r.scrollHeight:0,_r?_r.clientHeight:0),Kr=-fr.scrollLeft+getWindowScrollBarX(u),In=-fr.scrollTop;return"rtl"===getComputedStyle_getComputedStyle(_r||Wt).direction&&(Kr+=Cm(Wt.clientWidth,_r?_r.clientWidth:0)-wr),{width:wr,height:Ar,x:Kr,y:In}}(getDocumentElement(u)))}function getClippingRect(u,Xe,Wt,fr){var _r="clippingParents"===Xe?function getClippingParents(u){var Xe=listScrollParents(getParentNode(u)),Wt=["absolute","fixed"].indexOf(getComputedStyle_getComputedStyle(u).position)>=0&&isHTMLElement(u)?getOffsetParent(u):u;return isElement(Wt)?Xe.filter((function(u){return isElement(u)&&contains(u,Wt)&&"body"!==getNodeName(u)})):[]}(u):[].concat(Xe),wr=[].concat(_r,[Wt]),Ar=wr[0],Kr=wr.reduce((function(Xe,Wt){var _r=getClientRectFromMixedType(u,Wt,fr);return Xe.top=Cm(_r.top,Xe.top),Xe.right=Pm(_r.right,Xe.right),Xe.bottom=Pm(_r.bottom,Xe.bottom),Xe.left=Cm(_r.left,Xe.left),Xe}),getClientRectFromMixedType(u,Ar,fr));return Kr.width=Kr.right-Kr.left,Kr.height=Kr.bottom-Kr.top,Kr.x=Kr.left,Kr.y=Kr.top,Kr}function mergePaddingObject(u){return Object.assign({},{top:0,right:0,bottom:0,left:0},u)}function expandToHashMap(u,Xe){return Xe.reduce((function(Xe,Wt){return Xe[Wt]=u,Xe}),{})}function detectOverflow(u,Xe){void 0===Xe&&(Xe={});var Wt=Xe,fr=Wt.placement,_r=void 0===fr?u.placement:fr,wr=Wt.strategy,Ar=void 0===wr?u.strategy:wr,Kr=Wt.boundary,In=void 0===Kr?"clippingParents":Kr,no=Wt.rootBoundary,io=void 0===no?Bm:no,oo=Wt.elementContext,ao=void 0===oo?Nm:oo,so=Wt.altBoundary,co=void 0!==so&&so,ho=Wt.padding,go=void 0===ho?0:ho,xo=mergePaddingObject("number"!=typeof go?go:expandToHashMap(go,Dm)),ko=ao===Nm?"reference":Nm,Co=u.rects.popper,Io=u.elements[co?ko:ao],zo=getClippingRect(isElement(Io)?Io:Io.contextElement||getDocumentElement(u.elements.popper),In,io,Ar),Bo=getBoundingClientRect(u.elements.reference),ca=computeOffsets({reference:Bo,element:Co,strategy:"absolute",placement:_r}),ua=rectToClientRect(Object.assign({},Co,ca)),Da=ao===Nm?ua:Bo,ns={top:zo.top-Da.top+xo.top,bottom:Da.bottom-zo.bottom+xo.bottom,left:zo.left-Da.left+xo.left,right:Da.right-zo.right+xo.right},yl=u.modifiersData.offset;if(ao===Nm&&yl){var vl=yl[_r];Object.keys(ns).forEach((function(u){var Xe=[zm,Rm].indexOf(u)>=0?1:-1,Wt=[Mm,Rm].indexOf(u)>=0?"y":"x";ns[u]+=vl[Wt]*Xe}))}return ns}var Ym={name:"flip",enabled:!0,phase:"main",fn:function flip(u){var Xe=u.state,Wt=u.options,fr=u.name;if(!Xe.modifiersData[fr]._skip){for(var _r=Wt.mainAxis,wr=void 0===_r||_r,Ar=Wt.altAxis,Kr=void 0===Ar||Ar,In=Wt.fallbackPlacements,no=Wt.padding,io=Wt.boundary,oo=Wt.rootBoundary,ao=Wt.altBoundary,so=Wt.flipVariations,co=void 0===so||so,ho=Wt.allowedAutoPlacements,go=Xe.options.placement,xo=getBasePlacement(go),ko=In||(xo===go||!co?[getOppositePlacement(go)]:function getExpandedFallbackPlacements(u){if(getBasePlacement(u)===Lm)return[];var Xe=getOppositePlacement(u);return[getOppositeVariationPlacement(u),Xe,getOppositeVariationPlacement(Xe)]}(go)),Co=[go].concat(ko).reduce((function(u,Wt){return u.concat(getBasePlacement(Wt)===Lm?function computeAutoPlacement(u,Xe){void 0===Xe&&(Xe={});var Wt=Xe,fr=Wt.placement,_r=Wt.boundary,wr=Wt.rootBoundary,Ar=Wt.padding,Kr=Wt.flipVariations,In=Wt.allowedAutoPlacements,no=void 0===In?Um:In,io=getVariation(fr),oo=io?Kr?Vm:Vm.filter((function(u){return getVariation(u)===io})):Dm,ao=oo.filter((function(u){return no.indexOf(u)>=0}));0===ao.length&&(ao=oo);var so=ao.reduce((function(Xe,Wt){return Xe[Wt]=detectOverflow(u,{placement:Wt,boundary:_r,rootBoundary:wr,padding:Ar})[getBasePlacement(Wt)],Xe}),{});return Object.keys(so).sort((function(u,Xe){return so[u]-so[Xe]}))}(Xe,{placement:Wt,boundary:io,rootBoundary:oo,padding:no,flipVariations:co,allowedAutoPlacements:ho}):Wt)}),[]),Io=Xe.rects.reference,zo=Xe.rects.popper,Bo=new Map,ca=!0,ua=Co[0],Da=0;Da<Co.length;Da++){var ns=Co[Da],yl=getBasePlacement(ns),vl=getVariation(ns)===Fm,kl=[Mm,Rm].indexOf(yl)>=0,Al=kl?"width":"height",Ml=detectOverflow(Xe,{placement:ns,boundary:io,rootBoundary:oo,altBoundary:ao,padding:no}),Rl=kl?vl?zm:Om:vl?Rm:Mm;Io[Al]>zo[Al]&&(Rl=getOppositePlacement(Rl));var Ol=getOppositePlacement(Rl),Ll=[];if(wr&&Ll.push(Ml[yl]<=0),Kr&&Ll.push(Ml[Rl]<=0,Ml[Ol]<=0),Ll.every((function(u){return u}))){ua=ns,ca=!1;break}Bo.set(ns,Ll)}if(ca)for(var Dl=function _loop(u){var Xe=Co.find((function(Xe){var Wt=Bo.get(Xe);if(Wt)return Wt.slice(0,u).every((function(u){return u}))}));if(Xe)return ua=Xe,"break"},Bl=co?3:1;Bl>0;Bl--){if("break"===Dl(Bl))break}Xe.placement!==ua&&(Xe.modifiersData[fr]._skip=!0,Xe.placement=ua,Xe.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function within(u,Xe,Wt){return Cm(u,Pm(Xe,Wt))}var Jm={name:"preventOverflow",enabled:!0,phase:"main",fn:function preventOverflow(u){var Xe=u.state,Wt=u.options,fr=u.name,_r=Wt.mainAxis,wr=void 0===_r||_r,Ar=Wt.altAxis,Kr=void 0!==Ar&&Ar,In=Wt.boundary,no=Wt.rootBoundary,io=Wt.altBoundary,oo=Wt.padding,ao=Wt.tether,so=void 0===ao||ao,co=Wt.tetherOffset,ho=void 0===co?0:co,go=detectOverflow(Xe,{boundary:In,rootBoundary:no,padding:oo,altBoundary:io}),xo=getBasePlacement(Xe.placement),ko=getVariation(Xe.placement),Co=!ko,Io=getMainAxisFromPlacement(xo),zo=function getAltAxis(u){return"x"===u?"y":"x"}(Io),Bo=Xe.modifiersData.popperOffsets,ca=Xe.rects.reference,ua=Xe.rects.popper,Da="function"==typeof ho?ho(Object.assign({},Xe.rects,{placement:Xe.placement})):ho,ns="number"==typeof Da?{mainAxis:Da,altAxis:Da}:Object.assign({mainAxis:0,altAxis:0},Da),yl=Xe.modifiersData.offset?Xe.modifiersData.offset[Xe.placement]:null,vl={x:0,y:0};if(Bo){if(wr){var kl,Al="y"===Io?Mm:Om,Ml="y"===Io?Rm:zm,Rl="y"===Io?"height":"width",Ol=Bo[Io],Ll=Ol+go[Al],Dl=Ol-go[Ml],Bl=so?-ua[Rl]/2:0,Nl=ko===Fm?ca[Rl]:ua[Rl],Vl=ko===Fm?-ua[Rl]:-ca[Rl],Ul=Xe.elements.arrow,$l=so&&Ul?getLayoutRect(Ul):{width:0,height:0},Wl=Xe.modifiersData["arrow#persistent"]?Xe.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},Zl=Wl[Al],Gl=Wl[Ml],Xl=within(0,ca[Rl],$l[Rl]),Jl=Co?ca[Rl]/2-Bl-Xl-Zl-ns.mainAxis:Nl-Xl-Zl-ns.mainAxis,Ql=Co?-ca[Rl]/2+Bl+Xl+Gl+ns.mainAxis:Vl+Xl+Gl+ns.mainAxis,rc=Xe.elements.arrow&&getOffsetParent(Xe.elements.arrow),ic=rc?"y"===Io?rc.clientTop||0:rc.clientLeft||0:0,oc=null!=(kl=null==yl?void 0:yl[Io])?kl:0,lc=Ol+Ql-oc,gc=within(so?Pm(Ll,Ol+Jl-oc-ic):Ll,Ol,so?Cm(Dl,lc):Dl);Bo[Io]=gc,vl[Io]=gc-Ol}if(Kr){var bc,eu="x"===Io?Mm:Om,tu="x"===Io?Rm:zm,nu=Bo[zo],iu="y"===zo?"height":"width",su=nu+go[eu],cu=nu-go[tu],uu=-1!==[Mm,Om].indexOf(xo),hu=null!=(bc=null==yl?void 0:yl[zo])?bc:0,Iu=uu?su:nu-ca[iu]-ua[iu]-hu+ns.altAxis,zu=uu?nu+ca[iu]+ua[iu]-hu-ns.altAxis:cu,Lu=so&&uu?function withinMaxClamp(u,Xe,Wt){var fr=within(u,Xe,Wt);return fr>Wt?Wt:fr}(Iu,nu,zu):within(so?Iu:su,nu,so?zu:cu);Bo[zo]=Lu,vl[zo]=Lu-nu}Xe.modifiersData[fr]=vl}},requiresIfExists:["offset"]};var Qm={name:"arrow",enabled:!0,phase:"main",fn:function arrow(u){var Xe,Wt=u.state,fr=u.name,_r=u.options,wr=Wt.elements.arrow,Ar=Wt.modifiersData.popperOffsets,Kr=getBasePlacement(Wt.placement),In=getMainAxisFromPlacement(Kr),no=[Om,zm].indexOf(Kr)>=0?"height":"width";if(wr&&Ar){var io=function toPaddingObject(u,Xe){return mergePaddingObject("number"!=typeof(u="function"==typeof u?u(Object.assign({},Xe.rects,{placement:Xe.placement})):u)?u:expandToHashMap(u,Dm))}(_r.padding,Wt),oo=getLayoutRect(wr),ao="y"===In?Mm:Om,so="y"===In?Rm:zm,co=Wt.rects.reference[no]+Wt.rects.reference[In]-Ar[In]-Wt.rects.popper[no],ho=Ar[In]-Wt.rects.reference[In],go=getOffsetParent(wr),xo=go?"y"===In?go.clientHeight||0:go.clientWidth||0:0,ko=co/2-ho/2,Co=io[ao],Io=xo-oo[no]-io[so],zo=xo/2-oo[no]/2+ko,Bo=within(Co,zo,Io),ca=In;Wt.modifiersData[fr]=((Xe={})[ca]=Bo,Xe.centerOffset=Bo-zo,Xe)}},effect:function arrow_effect(u){var Xe=u.state,Wt=u.options.element,fr=void 0===Wt?"[data-popper-arrow]":Wt;null!=fr&&("string"!=typeof fr||(fr=Xe.elements.popper.querySelector(fr)))&&contains(Xe.elements.popper,fr)&&(Xe.elements.arrow=fr)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function getSideOffsets(u,Xe,Wt){return void 0===Wt&&(Wt={x:0,y:0}),{top:u.top-Xe.height-Wt.y,right:u.right-Xe.width+Wt.x,bottom:u.bottom-Xe.height+Wt.y,left:u.left-Xe.width-Wt.x}}function isAnySideFullyClipped(u){return[Mm,zm,Rm,Om].some((function(Xe){return u[Xe]>=0}))}var eg=popperGenerator({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function fn(){},effect:function effect(u){var Xe=u.state,Wt=u.instance,fr=u.options,_r=fr.scroll,wr=void 0===_r||_r,Ar=fr.resize,Kr=void 0===Ar||Ar,In=getWindow(Xe.elements.popper),no=[].concat(Xe.scrollParents.reference,Xe.scrollParents.popper);return wr&&no.forEach((function(u){u.addEventListener("scroll",Wt.update,qm)})),Kr&&In.addEventListener("resize",Wt.update,qm),function(){wr&&no.forEach((function(u){u.removeEventListener("scroll",Wt.update,qm)})),Kr&&In.removeEventListener("resize",Wt.update,qm)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function popperOffsets(u){var Xe=u.state,Wt=u.name;Xe.modifiersData[Wt]=computeOffsets({reference:Xe.rects.reference,element:Xe.rects.popper,strategy:"absolute",placement:Xe.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function computeStyles(u){var Xe=u.state,Wt=u.options,fr=Wt.gpuAcceleration,_r=void 0===fr||fr,wr=Wt.adaptive,Ar=void 0===wr||wr,Kr=Wt.roundOffsets,In=void 0===Kr||Kr,no={placement:getBasePlacement(Xe.placement),variation:getVariation(Xe.placement),popper:Xe.elements.popper,popperRect:Xe.rects.popper,gpuAcceleration:_r,isFixed:"fixed"===Xe.options.strategy};null!=Xe.modifiersData.popperOffsets&&(Xe.styles.popper=Object.assign({},Xe.styles.popper,mapToStyles(Object.assign({},no,{offsets:Xe.modifiersData.popperOffsets,position:Xe.options.strategy,adaptive:Ar,roundOffsets:In})))),null!=Xe.modifiersData.arrow&&(Xe.styles.arrow=Object.assign({},Xe.styles.arrow,mapToStyles(Object.assign({},no,{offsets:Xe.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:In})))),Xe.attributes.popper=Object.assign({},Xe.attributes.popper,{"data-popper-placement":Xe.placement})},data:{}},Hm,Gm,Ym,Jm,Qm,{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function hide(u){var Xe=u.state,Wt=u.name,fr=Xe.rects.reference,_r=Xe.rects.popper,wr=Xe.modifiersData.preventOverflow,Ar=detectOverflow(Xe,{elementContext:"reference"}),Kr=detectOverflow(Xe,{altBoundary:!0}),In=getSideOffsets(Ar,fr),no=getSideOffsets(Kr,_r,wr),io=isAnySideFullyClipped(In),oo=isAnySideFullyClipped(no);Xe.modifiersData[Wt]={referenceClippingOffsets:In,popperEscapeOffsets:no,isReferenceHidden:io,hasPopperEscaped:oo},Xe.attributes.popper=Object.assign({},Xe.attributes.popper,{"data-popper-reference-hidden":io,"data-popper-escaped":oo})}}]});var rg=function extractEventHandlers(u,Xe=[]){if(void 0===u)return{};const Wt={};return Object.keys(u).filter((Wt=>Wt.match(/^on[A-Z]/)&&"function"==typeof u[Wt]&&!Xe.includes(Wt))).forEach((Xe=>{Wt[Xe]=u[Xe]})),Wt};var ng=function omitEventHandlers(u){if(void 0===u)return{};const Xe={};return Object.keys(u).filter((Xe=>!(Xe.match(/^on[A-Z]/)&&"function"==typeof u[Xe]))).forEach((Wt=>{Xe[Wt]=u[Wt]})),Xe};var og=function mergeSlotProps(u){const{getSlotProps:Xe,additionalProps:Wt,externalSlotProps:fr,externalForwardedProps:_r,className:wr}=u;if(!Xe){const u=(0,vp.A)(null==Wt?void 0:Wt.className,wr,null==_r?void 0:_r.className,null==fr?void 0:fr.className),Xe=(0,_p.A)({},null==Wt?void 0:Wt.style,null==_r?void 0:_r.style,null==fr?void 0:fr.style),Ar=(0,_p.A)({},Wt,_r,fr);return u.length>0&&(Ar.className=u),Object.keys(Xe).length>0&&(Ar.style=Xe),{props:Ar,internalRef:void 0}}const Ar=rg((0,_p.A)({},_r,fr)),Kr=ng(fr),In=ng(_r),no=Xe(Ar),io=(0,vp.A)(null==no?void 0:no.className,null==Wt?void 0:Wt.className,wr,null==_r?void 0:_r.className,null==fr?void 0:fr.className),oo=(0,_p.A)({},null==no?void 0:no.style,null==Wt?void 0:Wt.style,null==_r?void 0:_r.style,null==fr?void 0:fr.style),ao=(0,_p.A)({},no,Wt,In,Kr);return io.length>0&&(ao.className=io),Object.keys(oo).length>0&&(ao.style=oo),{props:ao,internalRef:no.ref}};var sg=function resolveComponentProps(u,Xe,Wt){return"function"==typeof u?u(Xe,Wt):u};const lg=["elementType","externalSlotProps","ownerState","skipResolvingSlotProps"];var pg=function useSlotProps(u){var Xe;const{elementType:Wt,externalSlotProps:fr,ownerState:_r,skipResolvingSlotProps:wr=!1}=u,Ar=(0,yp.A)(u,lg),Kr=wr?{}:sg(fr,_r),{props:In,internalRef:no}=og((0,_p.A)({},Ar,{externalSlotProps:Kr})),io=(0,Am.A)(no,null==Kr?void 0:Kr.ref,null==(Xe=u.additionalProps)?void 0:Xe.ref);return sm(Wt,(0,_p.A)({},In,{ref:io}),_r)},fg=__webpack_require__(7365);var mg=dp.forwardRef((function Portal(u,Xe){const{children:Wt,container:fr,disablePortal:_r=!1}=u,[wr,Ar]=dp.useState(null),Kr=(0,Am.A)(dp.isValidElement(Wt)?Wt.ref:null,Xe);if((0,Tm.A)((()=>{_r||Ar(function getContainer(u){return"function"==typeof u?u():u}(fr)||document.body)}),[fr,_r]),(0,Tm.A)((()=>{if(wr&&!_r)return(0,fg.A)(Xe,wr),()=>{(0,fg.A)(Xe,null)}}),[Xe,wr,_r]),_r){if(dp.isValidElement(Wt)){const u={ref:Kr};return dp.cloneElement(Wt,u)}return(0,Fp.jsx)(dp.Fragment,{children:Wt})}return(0,Fp.jsx)(dp.Fragment,{children:wr?um.createPortal(Wt,wr):wr})}));function getPopperUtilityClass(u){return(0,bp.Ay)("MuiPopper",u)}(0,uf.A)("MuiPopper",["root"]);const gg=["anchorEl","children","direction","disablePortal","modifiers","open","placement","popperOptions","popperRef","slotProps","slots","TransitionProps","ownerState"],yg=["anchorEl","children","container","direction","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","style","transition","slotProps","slots"];function resolveAnchorEl(u){return"function"==typeof u?u():u}function BasePopper_isHTMLElement(u){return void 0!==u.nodeType}const _g={},xg=dp.forwardRef((function PopperTooltip(u,Xe){var Wt;const{anchorEl:fr,children:_r,direction:wr,disablePortal:Ar,modifiers:Kr,open:In,placement:no,popperOptions:io,popperRef:oo,slotProps:ao={},slots:so={},TransitionProps:co}=u,ho=(0,yp.A)(u,gg),go=dp.useRef(null),xo=(0,Am.A)(go,Xe),ko=dp.useRef(null),Co=(0,Am.A)(ko,oo),Io=dp.useRef(Co);(0,Tm.A)((()=>{Io.current=Co}),[Co]),dp.useImperativeHandle(oo,(()=>ko.current),[]);const zo=function flipPlacement(u,Xe){if("ltr"===Xe)return u;switch(u){case"bottom-end":return"bottom-start";case"bottom-start":return"bottom-end";case"top-end":return"top-start";case"top-start":return"top-end";default:return u}}(no,wr),[Bo,ca]=dp.useState(zo),[ua,Da]=dp.useState(resolveAnchorEl(fr));dp.useEffect((()=>{ko.current&&ko.current.forceUpdate()})),dp.useEffect((()=>{fr&&Da(resolveAnchorEl(fr))}),[fr]),(0,Tm.A)((()=>{if(!ua||!In)return;let u=[{name:"preventOverflow",options:{altBoundary:Ar}},{name:"flip",options:{altBoundary:Ar}},{name:"onUpdate",enabled:!0,phase:"afterWrite",fn:({state:u})=>{ca(u.placement)}}];null!=Kr&&(u=u.concat(Kr)),io&&null!=io.modifiers&&(u=u.concat(io.modifiers));const Xe=eg(ua,go.current,(0,_p.A)({placement:zo},io,{modifiers:u}));return Io.current(Xe),()=>{Xe.destroy(),Io.current(null)}}),[ua,Ar,Kr,In,io,zo]);const ns={placement:Bo};null!==co&&(ns.TransitionProps=co);const yl=(u=>{const{classes:Xe}=u;return(0,xp.A)({root:["root"]},getPopperUtilityClass,Xe)})(u),vl=null!=(Wt=so.root)?Wt:"div",kl=pg({elementType:vl,externalSlotProps:ao.root,externalForwardedProps:ho,additionalProps:{role:"tooltip",ref:xo},ownerState:u,className:yl.root});return(0,Fp.jsx)(vl,(0,_p.A)({},kl,{children:"function"==typeof _r?_r(ns):_r}))})),kg=dp.forwardRef((function Popper(u,Xe){const{anchorEl:Wt,children:fr,container:_r,direction:wr="ltr",disablePortal:Ar=!1,keepMounted:Kr=!1,modifiers:In,open:no,placement:io="bottom",popperOptions:oo=_g,popperRef:ao,style:so,transition:co=!1,slotProps:ho={},slots:go={}}=u,xo=(0,yp.A)(u,yg),[ko,Co]=dp.useState(!0);if(!Kr&&!no&&(!co||ko))return null;let Io;if(_r)Io=_r;else if(Wt){const u=resolveAnchorEl(Wt);Io=u&&BasePopper_isHTMLElement(u)?(0,Em.A)(u).body:(0,Em.A)(null).body}const zo=no||!Kr||co&&!ko?void 0:"none",Bo=co?{in:no,onEnter:()=>{Co(!1)},onExited:()=>{Co(!0)}}:void 0;return(0,Fp.jsx)(mg,{disablePortal:Ar,container:Io,children:(0,Fp.jsx)(xg,(0,_p.A)({anchorEl:Wt,direction:wr,disablePortal:Ar,modifiers:In,ref:Xe,open:co?!ko:no,placement:io,popperOptions:oo,popperRef:ao,slotProps:ho,slots:go},xo,{style:(0,_p.A)({position:"fixed",top:0,left:0,display:zo},so),TransitionProps:Bo,children:fr}))})}));var zg=kg;const Vg=["anchorEl","component","components","componentsProps","container","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","transition","slots","slotProps"],Ug=(0,Up.Ay)(zg,{name:"MuiPopper",slot:"Root",overridesResolver:(u,Xe)=>Xe.root})({});var Wg=dp.forwardRef((function Popper(u,Xe){var Wt;const fr=(0,km.A)(),_r=(0,$p.b)({props:u,name:"MuiPopper"}),{anchorEl:wr,component:Ar,components:Kr,componentsProps:In,container:no,disablePortal:io,keepMounted:oo,modifiers:ao,open:so,placement:co,popperOptions:ho,popperRef:go,transition:xo,slots:ko,slotProps:Co}=_r,Io=(0,yp.A)(_r,Vg),zo=null!=(Wt=null==ko?void 0:ko.root)?Wt:null==Kr?void 0:Kr.Root,Bo=(0,_p.A)({anchorEl:wr,container:no,disablePortal:io,keepMounted:oo,modifiers:ao,open:so,placement:co,popperOptions:ho,popperRef:go,transition:xo},Io);return(0,Fp.jsx)(Ug,(0,_p.A)({as:Ar,direction:null==fr?void 0:fr.direction,slots:{root:zo},slotProps:null!=Co?Co:In},Bo,{ref:Xe}))})),qg=__webpack_require__(1668);function getTooltipUtilityClass(u){return(0,bp.Ay)("MuiTooltip",u)}var Zg=(0,uf.A)("MuiTooltip",["popper","popperInteractive","popperArrow","popperClose","tooltip","tooltipArrow","touch","tooltipPlacementLeft","tooltipPlacementRight","tooltipPlacementTop","tooltipPlacementBottom","arrow"]);const Kg=["arrow","children","classes","components","componentsProps","describeChild","disableFocusListener","disableHoverListener","disableInteractive","disableTouchListener","enterDelay","enterNextDelay","enterTouchDelay","followCursor","id","leaveDelay","leaveTouchDelay","onClose","onOpen","open","placement","PopperComponent","PopperProps","slotProps","slots","title","TransitionComponent","TransitionProps"];const Xg=(0,Up.Ay)(Wg,{name:"MuiTooltip",slot:"Popper",overridesResolver:(u,Xe)=>{const{ownerState:Wt}=u;return[Xe.popper,!Wt.disableInteractive&&Xe.popperInteractive,Wt.arrow&&Xe.popperArrow,!Wt.open&&Xe.popperClose]}})((({theme:u,ownerState:Xe,open:Wt})=>(0,_p.A)({zIndex:(u.vars||u).zIndex.tooltip,pointerEvents:"none"},!Xe.disableInteractive&&{pointerEvents:"auto"},!Wt&&{pointerEvents:"none"},Xe.arrow&&{[`&[data-popper-placement*="bottom"] .${Zg.arrow}`]:{top:0,marginTop:"-0.71em","&::before":{transformOrigin:"0 100%"}},[`&[data-popper-placement*="top"] .${Zg.arrow}`]:{bottom:0,marginBottom:"-0.71em","&::before":{transformOrigin:"100% 0"}},[`&[data-popper-placement*="right"] .${Zg.arrow}`]:(0,_p.A)({},Xe.isRtl?{right:0,marginRight:"-0.71em"}:{left:0,marginLeft:"-0.71em"},{height:"1em",width:"0.71em","&::before":{transformOrigin:"100% 100%"}}),[`&[data-popper-placement*="left"] .${Zg.arrow}`]:(0,_p.A)({},Xe.isRtl?{left:0,marginLeft:"-0.71em"}:{right:0,marginRight:"-0.71em"},{height:"1em",width:"0.71em","&::before":{transformOrigin:"0 0"}})}))),Yg=(0,Up.Ay)("div",{name:"MuiTooltip",slot:"Tooltip",overridesResolver:(u,Xe)=>{const{ownerState:Wt}=u;return[Xe.tooltip,Wt.touch&&Xe.touch,Wt.arrow&&Xe.tooltipArrow,Xe[`tooltipPlacement${(0,Vp.A)(Wt.placement.split("-")[0])}`]]}})((({theme:u,ownerState:Xe})=>{return(0,_p.A)({backgroundColor:u.vars?u.vars.palette.Tooltip.bg:(0,Zp.X4)(u.palette.grey[700],.92),borderRadius:(u.vars||u).shape.borderRadius,color:(u.vars||u).palette.common.white,fontFamily:u.typography.fontFamily,padding:"4px 8px",fontSize:u.typography.pxToRem(11),maxWidth:300,margin:2,wordWrap:"break-word",fontWeight:u.typography.fontWeightMedium},Xe.arrow&&{position:"relative",margin:0},Xe.touch&&{padding:"8px 16px",fontSize:u.typography.pxToRem(14),lineHeight:(Wt=16/14,Math.round(1e5*Wt)/1e5)+"em",fontWeight:u.typography.fontWeightRegular},{[`.${Zg.popper}[data-popper-placement*="left"] &`]:(0,_p.A)({transformOrigin:"right center"},Xe.isRtl?(0,_p.A)({marginLeft:"14px"},Xe.touch&&{marginLeft:"24px"}):(0,_p.A)({marginRight:"14px"},Xe.touch&&{marginRight:"24px"})),[`.${Zg.popper}[data-popper-placement*="right"] &`]:(0,_p.A)({transformOrigin:"left center"},Xe.isRtl?(0,_p.A)({marginRight:"14px"},Xe.touch&&{marginRight:"24px"}):(0,_p.A)({marginLeft:"14px"},Xe.touch&&{marginLeft:"24px"})),[`.${Zg.popper}[data-popper-placement*="top"] &`]:(0,_p.A)({transformOrigin:"center bottom",marginBottom:"14px"},Xe.touch&&{marginBottom:"24px"}),[`.${Zg.popper}[data-popper-placement*="bottom"] &`]:(0,_p.A)({transformOrigin:"center top",marginTop:"14px"},Xe.touch&&{marginTop:"24px"})});var Wt})),ey=(0,Up.Ay)("span",{name:"MuiTooltip",slot:"Arrow",overridesResolver:(u,Xe)=>Xe.arrow})((({theme:u})=>({overflow:"hidden",position:"absolute",width:"1em",height:"0.71em",boxSizing:"border-box",color:u.vars?u.vars.palette.Tooltip.bg:(0,Zp.X4)(u.palette.grey[700],.9),"&::before":{content:'""',margin:"auto",display:"block",width:"100%",height:"100%",backgroundColor:"currentColor",transform:"rotate(45deg)"}})));let ty=!1;const ry=new lf.E;let ny={x:0,y:0};function composeEventHandler(u,Xe){return(Wt,...fr)=>{Xe&&Xe(Wt,...fr),u(Wt,...fr)}}const iy=dp.forwardRef((function Tooltip(u,Xe){var Wt,fr,_r,wr,Ar,Kr,In,no,io,oo,ao,so,co,ho,go,xo,ko,Co,Io;const zo=(0,$p.b)({props:u,name:"MuiTooltip"}),{arrow:Bo=!1,children:ca,components:ua={},componentsProps:Da={},describeChild:ns=!1,disableFocusListener:yl=!1,disableHoverListener:vl=!1,disableInteractive:kl=!1,disableTouchListener:Al=!1,enterDelay:Ml=100,enterNextDelay:Rl=0,enterTouchDelay:Ol=700,followCursor:Ll=!1,id:Dl,leaveDelay:Bl=0,leaveTouchDelay:Nl=1500,onClose:Vl,onOpen:Ul,open:$l,placement:Wl="bottom",PopperComponent:Zl,PopperProps:Gl={},slotProps:Xl={},slots:Jl={},title:Ql,TransitionComponent:rc=Sm,TransitionProps:ic}=zo,oc=(0,yp.A)(zo,Kg),lc=dp.isValidElement(ca)?ca:(0,Fp.jsx)("span",{children:ca}),gc=styles_useTheme_useTheme(),bc=useRtl(),[eu,tu]=dp.useState(),[nu,iu]=dp.useState(null),su=dp.useRef(!1),cu=kl||Ll,uu=(0,lf.A)(),hu=(0,lf.A)(),Iu=(0,lf.A)(),zu=(0,lf.A)(),[Lu,Du]=(0,Gp.A)({controlled:$l,default:!1,name:"Tooltip",state:"open"});let Fu=Lu;const Nu=(0,qg.A)(Dl),Vu=dp.useRef(),Uu=(0,Yp.A)((()=>{void 0!==Vu.current&&(document.body.style.WebkitUserSelect=Vu.current,Vu.current=void 0),zu.clear()}));dp.useEffect((()=>Uu),[Uu]);const handleOpen=u=>{ry.clear(),ty=!0,Du(!0),Ul&&!Fu&&Ul(u)},qu=(0,Yp.A)((u=>{ry.start(800+Bl,(()=>{ty=!1})),Du(!1),Vl&&Fu&&Vl(u),uu.start(gc.transitions.duration.shortest,(()=>{su.current=!1}))})),handleMouseOver=u=>{su.current&&"touchstart"!==u.type||(eu&&eu.removeAttribute("title"),hu.clear(),Iu.clear(),Ml||ty&&Rl?hu.start(ty?Rl:Ml,(()=>{handleOpen(u)})):handleOpen(u))},handleMouseLeave=u=>{hu.clear(),Iu.start(Bl,(()=>{qu(u)}))},{isFocusVisibleRef:td,onBlur:id,onFocus:sd,ref:ld}=(0,Jp.A)(),[,cd]=dp.useState(!1),handleBlur=u=>{id(u),!1===td.current&&(cd(!1),handleMouseLeave(u))},handleFocus=u=>{eu||tu(u.currentTarget),sd(u),!0===td.current&&(cd(!0),handleMouseOver(u))},detectTouchStart=u=>{su.current=!0;const Xe=lc.props;Xe.onTouchStart&&Xe.onTouchStart(u)},handleTouchStart=u=>{detectTouchStart(u),Iu.clear(),uu.clear(),Uu(),Vu.current=document.body.style.WebkitUserSelect,document.body.style.WebkitUserSelect="none",zu.start(Ol,(()=>{document.body.style.WebkitUserSelect=Vu.current,handleMouseOver(u)}))},handleTouchEnd=u=>{lc.props.onTouchEnd&&lc.props.onTouchEnd(u),Uu(),Iu.start(Nl,(()=>{qu(u)}))};dp.useEffect((()=>{if(Fu)return document.addEventListener("keydown",handleKeyDown),()=>{document.removeEventListener("keydown",handleKeyDown)};function handleKeyDown(u){"Escape"!==u.key&&"Esc"!==u.key||qu(u)}}),[qu,Fu]);const ud=(0,Xp.A)(lc.ref,ld,tu,Xe);Ql||0===Ql||(Fu=!1);const dd=dp.useRef(),md={},yd="string"==typeof Ql;ns?(md.title=Fu||!yd||vl?null:Ql,md["aria-describedby"]=Fu?Nu:null):(md["aria-label"]=yd?Ql:null,md["aria-labelledby"]=Fu&&!yd?Nu:null);const _d=(0,_p.A)({},md,oc,lc.props,{className:(0,vp.A)(oc.className,lc.props.className),onTouchStart:detectTouchStart,ref:ud},Ll?{onMouseMove:u=>{const Xe=lc.props;Xe.onMouseMove&&Xe.onMouseMove(u),ny={x:u.clientX,y:u.clientY},dd.current&&dd.current.update()}}:{});const vd={};Al||(_d.onTouchStart=handleTouchStart,_d.onTouchEnd=handleTouchEnd),vl||(_d.onMouseOver=composeEventHandler(handleMouseOver,_d.onMouseOver),_d.onMouseLeave=composeEventHandler(handleMouseLeave,_d.onMouseLeave),cu||(vd.onMouseOver=handleMouseOver,vd.onMouseLeave=handleMouseLeave)),yl||(_d.onFocus=composeEventHandler(handleFocus,_d.onFocus),_d.onBlur=composeEventHandler(handleBlur,_d.onBlur),cu||(vd.onFocus=handleFocus,vd.onBlur=handleBlur));const xd=dp.useMemo((()=>{var u;let Xe=[{name:"arrow",enabled:Boolean(nu),options:{element:nu,padding:4}}];return null!=(u=Gl.popperOptions)&&u.modifiers&&(Xe=Xe.concat(Gl.popperOptions.modifiers)),(0,_p.A)({},Gl.popperOptions,{modifiers:Xe})}),[nu,Gl]),wd=(0,_p.A)({},zo,{isRtl:bc,arrow:Bo,disableInteractive:cu,placement:Wl,PopperComponentProp:Zl,touch:su.current}),Sd=(u=>{const{classes:Xe,disableInteractive:Wt,arrow:fr,touch:_r,placement:wr}=u,Ar={popper:["popper",!Wt&&"popperInteractive",fr&&"popperArrow"],tooltip:["tooltip",fr&&"tooltipArrow",_r&&"touch",`tooltipPlacement${(0,Vp.A)(wr.split("-")[0])}`],arrow:["arrow"]};return(0,xp.A)(Ar,getTooltipUtilityClass,Xe)})(wd),kd=null!=(Wt=null!=(fr=Jl.popper)?fr:ua.Popper)?Wt:Xg,Ad=null!=(_r=null!=(wr=null!=(Ar=Jl.transition)?Ar:ua.Transition)?wr:rc)?_r:Sm,Td=null!=(Kr=null!=(In=Jl.tooltip)?In:ua.Tooltip)?Kr:Yg,Ed=null!=(no=null!=(io=Jl.arrow)?io:ua.Arrow)?no:ey,Cd=sm(kd,(0,_p.A)({},Gl,null!=(oo=Xl.popper)?oo:Da.popper,{className:(0,vp.A)(Sd.popper,null==Gl?void 0:Gl.className,null==(ao=null!=(so=Xl.popper)?so:Da.popper)?void 0:ao.className)}),wd),Id=sm(Ad,(0,_p.A)({},ic,null!=(co=Xl.transition)?co:Da.transition),wd),Md=sm(Td,(0,_p.A)({},null!=(ho=Xl.tooltip)?ho:Da.tooltip,{className:(0,vp.A)(Sd.tooltip,null==(go=null!=(xo=Xl.tooltip)?xo:Da.tooltip)?void 0:go.className)}),wd),Rd=sm(Ed,(0,_p.A)({},null!=(ko=Xl.arrow)?ko:Da.arrow,{className:(0,vp.A)(Sd.arrow,null==(Co=null!=(Io=Xl.arrow)?Io:Da.arrow)?void 0:Co.className)}),wd);return(0,Fp.jsxs)(dp.Fragment,{children:[dp.cloneElement(lc,_d),(0,Fp.jsx)(kd,(0,_p.A)({as:null!=Zl?Zl:Wg,placement:Wl,anchorEl:Ll?{getBoundingClientRect:()=>({top:ny.y,left:ny.x,right:ny.x,bottom:ny.y,width:0,height:0})}:eu,popperRef:dd,open:!!eu&&Fu,id:Nu,transition:!0},vd,Cd,{popperOptions:xd,children:({TransitionProps:u})=>(0,Fp.jsx)(Ad,(0,_p.A)({timeout:gc.transitions.duration.shorter},u,Id,{children:(0,Fp.jsxs)(Td,(0,_p.A)({},Md,{children:[Ql,Bo?(0,Fp.jsx)(Ed,(0,_p.A)({},Rd,{ref:iu})):null]}))}))}))]})}));var oy=iy;function getButtonUtilityClass(u){return(0,bp.Ay)("MuiButton",u)}var ay=(0,uf.A)("MuiButton",["root","text","textInherit","textPrimary","textSecondary","textSuccess","textError","textInfo","textWarning","outlined","outlinedInherit","outlinedPrimary","outlinedSecondary","outlinedSuccess","outlinedError","outlinedInfo","outlinedWarning","contained","containedInherit","containedPrimary","containedSecondary","containedSuccess","containedError","containedInfo","containedWarning","disableElevation","focusVisible","disabled","colorInherit","colorPrimary","colorSecondary","colorSuccess","colorError","colorInfo","colorWarning","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","icon","iconSizeSmall","iconSizeMedium","iconSizeLarge"]);var sy=dp.createContext({});var ly=dp.createContext(void 0);const cy=["children","color","component","className","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"],commonIconStyles=u=>(0,_p.A)({},"small"===u.size&&{"& > *:nth-of-type(1)":{fontSize:18}},"medium"===u.size&&{"& > *:nth-of-type(1)":{fontSize:20}},"large"===u.size&&{"& > *:nth-of-type(1)":{fontSize:22}}),uy=(0,Up.Ay)(jf,{shouldForwardProp:u=>(0,Hp.A)(u)||"classes"===u,name:"MuiButton",slot:"Root",overridesResolver:(u,Xe)=>{const{ownerState:Wt}=u;return[Xe.root,Xe[Wt.variant],Xe[`${Wt.variant}${(0,Vp.A)(Wt.color)}`],Xe[`size${(0,Vp.A)(Wt.size)}`],Xe[`${Wt.variant}Size${(0,Vp.A)(Wt.size)}`],"inherit"===Wt.color&&Xe.colorInherit,Wt.disableElevation&&Xe.disableElevation,Wt.fullWidth&&Xe.fullWidth]}})((({theme:u,ownerState:Xe})=>{var Wt,fr;const _r="light"===u.palette.mode?u.palette.grey[300]:u.palette.grey[800],wr="light"===u.palette.mode?u.palette.grey.A100:u.palette.grey[700];return(0,_p.A)({},u.typography.button,{minWidth:64,padding:"6px 16px",borderRadius:(u.vars||u).shape.borderRadius,transition:u.transitions.create(["background-color","box-shadow","border-color","color"],{duration:u.transitions.duration.short}),"&:hover":(0,_p.A)({textDecoration:"none",backgroundColor:u.vars?`rgba(${u.vars.palette.text.primaryChannel} / ${u.vars.palette.action.hoverOpacity})`:(0,Zp.X4)(u.palette.text.primary,u.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"text"===Xe.variant&&"inherit"!==Xe.color&&{backgroundColor:u.vars?`rgba(${u.vars.palette[Xe.color].mainChannel} / ${u.vars.palette.action.hoverOpacity})`:(0,Zp.X4)(u.palette[Xe.color].main,u.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"outlined"===Xe.variant&&"inherit"!==Xe.color&&{border:`1px solid ${(u.vars||u).palette[Xe.color].main}`,backgroundColor:u.vars?`rgba(${u.vars.palette[Xe.color].mainChannel} / ${u.vars.palette.action.hoverOpacity})`:(0,Zp.X4)(u.palette[Xe.color].main,u.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"contained"===Xe.variant&&{backgroundColor:u.vars?u.vars.palette.Button.inheritContainedHoverBg:wr,boxShadow:(u.vars||u).shadows[4],"@media (hover: none)":{boxShadow:(u.vars||u).shadows[2],backgroundColor:(u.vars||u).palette.grey[300]}},"contained"===Xe.variant&&"inherit"!==Xe.color&&{backgroundColor:(u.vars||u).palette[Xe.color].dark,"@media (hover: none)":{backgroundColor:(u.vars||u).palette[Xe.color].main}}),"&:active":(0,_p.A)({},"contained"===Xe.variant&&{boxShadow:(u.vars||u).shadows[8]}),[`&.${ay.focusVisible}`]:(0,_p.A)({},"contained"===Xe.variant&&{boxShadow:(u.vars||u).shadows[6]}),[`&.${ay.disabled}`]:(0,_p.A)({color:(u.vars||u).palette.action.disabled},"outlined"===Xe.variant&&{border:`1px solid ${(u.vars||u).palette.action.disabledBackground}`},"contained"===Xe.variant&&{color:(u.vars||u).palette.action.disabled,boxShadow:(u.vars||u).shadows[0],backgroundColor:(u.vars||u).palette.action.disabledBackground})},"text"===Xe.variant&&{padding:"6px 8px"},"text"===Xe.variant&&"inherit"!==Xe.color&&{color:(u.vars||u).palette[Xe.color].main},"outlined"===Xe.variant&&{padding:"5px 15px",border:"1px solid currentColor"},"outlined"===Xe.variant&&"inherit"!==Xe.color&&{color:(u.vars||u).palette[Xe.color].main,border:u.vars?`1px solid rgba(${u.vars.palette[Xe.color].mainChannel} / 0.5)`:`1px solid ${(0,Zp.X4)(u.palette[Xe.color].main,.5)}`},"contained"===Xe.variant&&{color:u.vars?u.vars.palette.text.primary:null==(Wt=(fr=u.palette).getContrastText)?void 0:Wt.call(fr,u.palette.grey[300]),backgroundColor:u.vars?u.vars.palette.Button.inheritContainedBg:_r,boxShadow:(u.vars||u).shadows[2]},"contained"===Xe.variant&&"inherit"!==Xe.color&&{color:(u.vars||u).palette[Xe.color].contrastText,backgroundColor:(u.vars||u).palette[Xe.color].main},"inherit"===Xe.color&&{color:"inherit",borderColor:"currentColor"},"small"===Xe.size&&"text"===Xe.variant&&{padding:"4px 5px",fontSize:u.typography.pxToRem(13)},"large"===Xe.size&&"text"===Xe.variant&&{padding:"8px 11px",fontSize:u.typography.pxToRem(15)},"small"===Xe.size&&"outlined"===Xe.variant&&{padding:"3px 9px",fontSize:u.typography.pxToRem(13)},"large"===Xe.size&&"outlined"===Xe.variant&&{padding:"7px 21px",fontSize:u.typography.pxToRem(15)},"small"===Xe.size&&"contained"===Xe.variant&&{padding:"4px 10px",fontSize:u.typography.pxToRem(13)},"large"===Xe.size&&"contained"===Xe.variant&&{padding:"8px 22px",fontSize:u.typography.pxToRem(15)},Xe.fullWidth&&{width:"100%"})}),(({ownerState:u})=>u.disableElevation&&{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${ay.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${ay.disabled}`]:{boxShadow:"none"}})),dy=(0,Up.Ay)("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(u,Xe)=>{const{ownerState:Wt}=u;return[Xe.startIcon,Xe[`iconSize${(0,Vp.A)(Wt.size)}`]]}})((({ownerState:u})=>(0,_p.A)({display:"inherit",marginRight:8,marginLeft:-4},"small"===u.size&&{marginLeft:-2},commonIconStyles(u)))),hy=(0,Up.Ay)("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(u,Xe)=>{const{ownerState:Wt}=u;return[Xe.endIcon,Xe[`iconSize${(0,Vp.A)(Wt.size)}`]]}})((({ownerState:u})=>(0,_p.A)({display:"inherit",marginRight:-4,marginLeft:8},"small"===u.size&&{marginRight:-2},commonIconStyles(u)))),py=dp.forwardRef((function Button(u,Xe){const Wt=dp.useContext(sy),fr=dp.useContext(ly),_r=(0,Sp.A)(Wt,u),wr=(0,$p.b)({props:_r,name:"MuiButton"}),{children:Ar,color:Kr="primary",component:In="button",className:no,disabled:io=!1,disableElevation:oo=!1,disableFocusRipple:ao=!1,endIcon:so,focusVisibleClassName:co,fullWidth:ho=!1,size:go="medium",startIcon:xo,type:ko,variant:Co="text"}=wr,Io=(0,yp.A)(wr,cy),zo=(0,_p.A)({},wr,{color:Kr,component:In,disabled:io,disableElevation:oo,disableFocusRipple:ao,fullWidth:ho,size:go,type:ko,variant:Co}),Bo=(u=>{const{color:Xe,disableElevation:Wt,fullWidth:fr,size:_r,variant:wr,classes:Ar}=u,Kr={root:["root",wr,`${wr}${(0,Vp.A)(Xe)}`,`size${(0,Vp.A)(_r)}`,`${wr}Size${(0,Vp.A)(_r)}`,`color${(0,Vp.A)(Xe)}`,Wt&&"disableElevation",fr&&"fullWidth"],label:["label"],startIcon:["icon","startIcon",`iconSize${(0,Vp.A)(_r)}`],endIcon:["icon","endIcon",`iconSize${(0,Vp.A)(_r)}`]},In=(0,xp.A)(Kr,getButtonUtilityClass,Ar);return(0,_p.A)({},Ar,In)})(zo),ca=xo&&(0,Fp.jsx)(dy,{className:Bo.startIcon,ownerState:zo,children:xo}),ua=so&&(0,Fp.jsx)(hy,{className:Bo.endIcon,ownerState:zo,children:so}),Da=fr||"";return(0,Fp.jsxs)(uy,(0,_p.A)({ownerState:zo,className:(0,vp.A)(Wt.className,Bo.root,no,Da),component:In,disabled:io,focusRipple:!ao,focusVisibleClassName:(0,vp.A)(Bo.focusVisible,co),ref:Xe,type:ko},Io,{classes:Bo,children:[ca,Ar,ua]}))}));var fy=py;function getDividerUtilityClass(u){return(0,bp.Ay)("MuiDivider",u)}(0,uf.A)("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]);const my=["absolute","children","className","component","flexItem","light","orientation","role","textAlign","variant"],gy=(0,Up.Ay)("div",{name:"MuiDivider",slot:"Root",overridesResolver:(u,Xe)=>{const{ownerState:Wt}=u;return[Xe.root,Wt.absolute&&Xe.absolute,Xe[Wt.variant],Wt.light&&Xe.light,"vertical"===Wt.orientation&&Xe.vertical,Wt.flexItem&&Xe.flexItem,Wt.children&&Xe.withChildren,Wt.children&&"vertical"===Wt.orientation&&Xe.withChildrenVertical,"right"===Wt.textAlign&&"vertical"!==Wt.orientation&&Xe.textAlignRight,"left"===Wt.textAlign&&"vertical"!==Wt.orientation&&Xe.textAlignLeft]}})((({theme:u,ownerState:Xe})=>(0,_p.A)({margin:0,flexShrink:0,borderWidth:0,borderStyle:"solid",borderColor:(u.vars||u).palette.divider,borderBottomWidth:"thin"},Xe.absolute&&{position:"absolute",bottom:0,left:0,width:"100%"},Xe.light&&{borderColor:u.vars?`rgba(${u.vars.palette.dividerChannel} / 0.08)`:(0,Zp.X4)(u.palette.divider,.08)},"inset"===Xe.variant&&{marginLeft:72},"middle"===Xe.variant&&"horizontal"===Xe.orientation&&{marginLeft:u.spacing(2),marginRight:u.spacing(2)},"middle"===Xe.variant&&"vertical"===Xe.orientation&&{marginTop:u.spacing(1),marginBottom:u.spacing(1)},"vertical"===Xe.orientation&&{height:"100%",borderBottomWidth:0,borderRightWidth:"thin"},Xe.flexItem&&{alignSelf:"stretch",height:"auto"})),(({ownerState:u})=>(0,_p.A)({},u.children&&{display:"flex",whiteSpace:"nowrap",textAlign:"center",border:0,borderTopStyle:"solid",borderLeftStyle:"solid","&::before, &::after":{content:'""',alignSelf:"center"}})),(({theme:u,ownerState:Xe})=>(0,_p.A)({},Xe.children&&"vertical"!==Xe.orientation&&{"&::before, &::after":{width:"100%",borderTop:`thin solid ${(u.vars||u).palette.divider}`,borderTopStyle:"inherit"}})),(({theme:u,ownerState:Xe})=>(0,_p.A)({},Xe.children&&"vertical"===Xe.orientation&&{flexDirection:"column","&::before, &::after":{height:"100%",borderLeft:`thin solid ${(u.vars||u).palette.divider}`,borderLeftStyle:"inherit"}})),(({ownerState:u})=>(0,_p.A)({},"right"===u.textAlign&&"vertical"!==u.orientation&&{"&::before":{width:"90%"},"&::after":{width:"10%"}},"left"===u.textAlign&&"vertical"!==u.orientation&&{"&::before":{width:"10%"},"&::after":{width:"90%"}}))),yy=(0,Up.Ay)("span",{name:"MuiDivider",slot:"Wrapper",overridesResolver:(u,Xe)=>{const{ownerState:Wt}=u;return[Xe.wrapper,"vertical"===Wt.orientation&&Xe.wrapperVertical]}})((({theme:u,ownerState:Xe})=>(0,_p.A)({display:"inline-block",paddingLeft:`calc(${u.spacing(1)} * 1.2)`,paddingRight:`calc(${u.spacing(1)} * 1.2)`},"vertical"===Xe.orientation&&{paddingTop:`calc(${u.spacing(1)} * 1.2)`,paddingBottom:`calc(${u.spacing(1)} * 1.2)`}))),_y=dp.forwardRef((function Divider(u,Xe){const Wt=(0,$p.b)({props:u,name:"MuiDivider"}),{absolute:fr=!1,children:_r,className:wr,component:Ar=(_r?"div":"hr"),flexItem:Kr=!1,light:In=!1,orientation:no="horizontal",role:io=("hr"!==Ar?"separator":void 0),textAlign:oo="center",variant:ao="fullWidth"}=Wt,so=(0,yp.A)(Wt,my),co=(0,_p.A)({},Wt,{absolute:fr,component:Ar,flexItem:Kr,light:In,orientation:no,role:io,textAlign:oo,variant:ao}),ho=(u=>{const{absolute:Xe,children:Wt,classes:fr,flexItem:_r,light:wr,orientation:Ar,textAlign:Kr,variant:In}=u,no={root:["root",Xe&&"absolute",In,wr&&"light","vertical"===Ar&&"vertical",_r&&"flexItem",Wt&&"withChildren",Wt&&"vertical"===Ar&&"withChildrenVertical","right"===Kr&&"vertical"!==Ar&&"textAlignRight","left"===Kr&&"vertical"!==Ar&&"textAlignLeft"],wrapper:["wrapper","vertical"===Ar&&"wrapperVertical"]};return(0,xp.A)(no,getDividerUtilityClass,fr)})(co);return(0,Fp.jsx)(gy,(0,_p.A)({as:Ar,className:(0,vp.A)(ho.root,wr),role:io,ref:Xe,ownerState:co},so,{children:_r?(0,Fp.jsx)(yy,{className:ho.wrapper,ownerState:co,children:_r}):null}))}));_y.muiSkipListHighlight=!0;var vy=_y;const layerActionCreator_setIsVectorLayerVisible=function(u){return{type:ho.JAKARTO_LAYER_SET_IS_VECTOR_LAYER_VISIBLE,isVectorLayerVisible:u}},layerActionCreator_setWMTSLayerVisibilityByYear=function(u,Xe){return{type:ho.JAKARTO_LAYER_SET_WMTS_LAYER_VISIBILITY,year:u,isVisible:Xe}},layerActionCreator_setWMTSLayerStyleExpansionByYear=function(u,Xe){return{type:ho.JAKARTO_LAYER_SET_WMTS_LAYER_EXPANSION,year:u,isStyleExpanded:Xe}},layerActionCreator_selectWMTSLayerStyleByYear=function(u,Xe){return{type:ho.JAKARTO_LAYER_SELECT_WMTS_LAYER_STYLE,year:u,selectedStyle:Xe}},layerActionCreator_setCurrentZoomLevel=function(u){return{type:ho.JAKARTO_LAYER_SET_ZOOM_LEVEL,zoomLevel:u}};function getEncodedStyle(u){return u.replace(" ","%20")}function getTranslationKeyForStyle(u){const Xe="jakarto.layer.raster.style";switch(u){case so.DEFAULT:return`${Xe}.default`;case so.INTENSITE_MAX:return`${Xe}.intensite.max`;case so.INTENSITE_MAX_PTS_BAS:return`${Xe}.intensite.max.pts.bas`;case so.PTS_BAS:return`${Xe}.pts.bas`;case so.VERTICALITY:return`${Xe}.verticality`;default:return""}}function addCoverageLayers(){var u=this;getAllWMTSYearVariables().forEach(function(Xe){_newArrowCheck(this,u),function addWMTSLayer(u){const Xe=JMap.Map.getMap(),Wt=getEncodedStyle(getExtensionState().layer.allWMTSByYear[u].selectedStyle),fr=Xe.getStyle().layers,_r=fr?getFirstNoneRasterMaplibreLayerId(fr):void 0;Xe.addSource(getWMTSLayerSourceFromYear(u),{type:"raster",tiles:[`${io}?REQUEST=GetTile&SERVICE=WMTS&VERSION=1.0.0&LAYER=${u}&STYLE=${Wt}&TILEMATRIX=EPSG:3857:{z}&TILEMATRIXSET=EPSG:3857&FORMAT=image/png&TILECOL={x}&TILEROW={y}`],tileSize:256}),Xe.addLayer({id:getWMTSLayerIdFromYear(u),type:"raster",source:getWMTSLayerSourceFromYear(u)},_r);const wr=getExtensionState().layer.allWMTSByYear[u].isVisible;wr||toggleLayerVisibilityById(getWMTSLayerIdFromYear(u))}(Xe)}.bind(this)),function addVectorLayer(){var u=this;const Xe=JMap.Map.getMap();Xe.addSource(Kr,{type:"vector",url:In}),Xe.addLayer({id:Ar,type:"circle",source:Kr,"source-layer":no,paint:{"circle-radius":["interpolate",["linear"],["zoom"],8,1,11,2,16,3],"circle-color":"#191970"}}),Xe.on("click",Ar,function(Xe){_newArrowCheck(this,u);const Wt=Xe.features?Xe.features[0]:void 0,fr={longitude:Xe.lngLat.lng,latitude:Xe.lngLat.lat};Wt&&jakartowns&&jakartowns.app.jakartowns_instance&&jakartowns.app.jakartowns_instance.setPosition(fr)}.bind(this))}()}function getFirstNoneRasterMaplibreLayerId(u){var Xe=this;if(0!==u.length){if(0===(u=u.filter(function(u){return _newArrowCheck(this,Xe),"jmap-basemap"!==u.id&&"jmap-background"!==u.id}.bind(this))).filter(function(u){return _newArrowCheck(this,Xe),"raster"===u.type}.bind(this)).length)return u[0].id;for(let Xe=u.length-1;Xe>=0;Xe--)if("raster"===u[Xe].type)return Xe===u.length-1?void 0:u[Xe+1].id}}function getWMTSLayerIdFromYear(u){return`jakartowns-wmts-layer-${u}`}function getWMTSLayerSourceFromYear(u){return`jakartowns-wmts-source-${u}`}function toggleLayerVisibilityById(u,Xe){if(!u)return;const Wt=JMap.Map.getMap(),fr=Wt.getLayoutProperty(u,"visibility");Wt.setLayoutProperty(u,"visibility","none"===fr?"visible":"none")}function checkWMTSYear(u){if("string"!=typeof u)throw Error("Parameter 'year' must be a string");if(!getAllWMTSYearVariables().includes(u))throw Error(`Not a valid WMTS year. Possible values are ${getAllWMTSYearVariables().join(", ")}.`)}const by={toggleVectorLayerVisibility:function(){store_getStore().dispatch(layerActionCreator_setIsVectorLayerVisible(!getExtensionState().layer.isVectorLayerVisible)),toggleLayerVisibilityById(Ar)},toggleWMTSLayerVisibility:function(u){checkWMTSYear(u);const Xe=getExtensionState().layer.allWMTSByYear[u].isVisible;store_getStore().dispatch(layerActionCreator_setWMTSLayerVisibilityByYear(u,!Xe)),toggleLayerVisibilityById(getWMTSLayerIdFromYear(u))},toggleWMTSLayerStyleExpansion:function(u){checkWMTSYear(u);const Xe=getExtensionState().layer.allWMTSByYear[u].isStyleExpanded;store_getStore().dispatch(layerActionCreator_setWMTSLayerStyleExpansionByYear(u,!Xe))},selectWMTSLayerStyleForYear:function(u,Xe){checkWMTSYear(u),function checkWMTSStyle(u){if("string"!=typeof u)throw Error("Parameter 'style' must be a string");if(!getAllWMTSStyleVariables().includes(u))throw Error(`Not a valid WMTS style. Possible values are ${getAllWMTSStyleVariables().join(", ")}.`)}(Xe);if(getExtensionState().layer.allWMTSByYear[u].selectedStyle===Xe)throw Error(`Style '${Xe}' is already selected.`);store_getStore().dispatch(layerActionCreator_selectWMTSLayerStyleByYear(u,Xe)),function updateLayerStyle(u,Xe){const Wt=getEncodedStyle(Xe),fr=JMap.Map.getMap(),_r=getWMTSLayerIdFromYear(u),wr=getWMTSLayerSourceFromYear(u);fr.getLayer(_r)&&fr.removeLayer(_r),fr.getSource(wr)&&fr.removeSource(wr);const Ar=fr.getStyle().layers,Kr=Ar?getFirstNoneRasterMaplibreLayerId(Ar):void 0;fr.addSource(getWMTSLayerSourceFromYear(u),{type:"raster",tiles:[`${io}?REQUEST=GetTile&SERVICE=WMTS&VERSION=1.0.0&LAYER=${u}&STYLE=${Wt}&TILEMATRIX=EPSG:3857:{z}&TILEMATRIXSET=EPSG:3857&FORMAT=image/png&TILECOL={x}&TILEROW={y}`],tileSize:256}),fr.addLayer({id:getWMTSLayerIdFromYear(u),type:"raster",source:getWMTSLayerSourceFromYear(u)},Kr),getExtensionState().layer.allWMTSByYear[u].isVisible||toggleLayerVisibilityById(getWMTSLayerIdFromYear(u))}(u,Xe)},setZoomLevel:function(u){store_getStore().dispatch(layerActionCreator_setCurrentZoomLevel(u));const Xe=getAllWMTSYearVariables();for(const Wt of Xe){getExtensionState().layer.allWMTSByYear[Wt].selectedStyle===so.VERTICALITY&&u<21&&this.selectWMTSLayerStyleForYear(Wt,so.DEFAULT)}}},xy="viewerDiv",wy="2rem",Sy="jmap-jakarto-floating-panel-container",ky="jmap-jakarto-floating-panel-content",Ay="position",Ty="rotation",Ey="tilt",viewerActionCreator_setIsInteractorActive=function(u){return{type:ho.JAKARTO_VIEWER_SET_IS_INTERACTOR_ACTIVE,isInteractorActive:u}},viewerActionCreator_setIsVisible=function(u){return{type:ho.JAKARTO_VIEWER_SET_IS_VISIBLE,isVisible:u}},viewerActionCreator_setParameters=function(u){return{type:ho.JAKARTO_VIEWER_SET_PARAMETERS,parameters:u}},viewerActionCreator_setIsLoading=function(u){return{type:ho.JAKARTO_VIEWER_SET_IS_LOADING,isLoading:u}},viewerActionCreator_setIsAuthenticated=function(u){return{type:ho.JAKARTO_VIEWER_SET_IS_AUTH,isAuthenticated:u}};var Cy=__webpack_require__(6443),Py=__webpack_require__.p+"408439996b62240a50e7.png";let Iy;function setMarkerLngLat(u){Iy&&Iy.setLngLat([u.x,u.y])}function onDragEnd(){if(Iy){const u=Iy.getLngLat(),Xe=getExtensionState().viewer.parameters;store_getStore().dispatch(viewerActionCreator_setParameters({...Xe,location:{x:u.lng,y:u.lat}})),jakartowns&&jakartowns.app.jakartowns_instance&&jakartowns.app.jakartowns_instance.setPosition({latitude:u.lat,longitude:u.lng})}}function handlePositionChange(u){const{detail:Xe}=u,{parameters:Wt}=getExtensionState().viewer,fr={x:Xe.longitude,y:Xe.latitude};store_getStore().dispatch(viewerActionCreator_setParameters({...Wt,location:fr})),setMarkerLngLat(fr);const _r=function getDateForPanoId(u){if(!JMap.Map.isMapLoaded())return;let Xe;const Wt=JMap.Map.getMap().querySourceFeatures(Kr,{sourceLayer:no,filter:["==",["get","image_id"],u]});return Wt.length>0&&(Xe=Wt[0].properties?.date),Xe}(Xe.uid);store_getStore().dispatch(viewerActionCreator_setParameters({...getExtensionState().viewer.parameters,date:_r}))}function handleRotationChange(u){const{detail:Xe}=u,{parameters:Wt}=getExtensionState().viewer;store_getStore().dispatch(viewerActionCreator_setParameters({...Wt,pan:Xe})),function setMarkerRotation(u){Iy&&Iy.setRotation(u||0)}(function radToDeg(u){return 180*(u||0)/Math.PI}(2*Math.PI-Xe))}function handleTiltChange(u){const{detail:Xe}=u,{parameters:Wt}=getExtensionState().viewer;store_getStore().dispatch(viewerActionCreator_setParameters({...Wt,tilt:Xe}))}function handleFovChange(u){const{detail:Xe}=u,{parameters:Wt}=getExtensionState().viewer;store_getStore().dispatch(viewerActionCreator_setParameters({...Wt,fov:Xe}))}__webpack_require__(4603),__webpack_require__(7566),__webpack_require__(8721);function bind(u,Xe){return function wrap(){return u.apply(Xe,arguments)}}const{toString:My}=Object.prototype,{getPrototypeOf:Ry}=Object,zy=(Oy=Object.create(null),u=>{const Xe=My.call(u);return Oy[Xe]||(Oy[Xe]=Xe.slice(8,-1).toLowerCase())});var Oy;const kindOfTest=u=>(u=u.toLowerCase(),Xe=>zy(Xe)===u),typeOfTest=u=>Xe=>typeof Xe===u,{isArray:Ly}=Array,Dy=typeOfTest("undefined");const Fy=kindOfTest("ArrayBuffer");const jy=typeOfTest("string"),By=typeOfTest("function"),Ny=typeOfTest("number"),isObject=u=>null!==u&&"object"==typeof u,isPlainObject=u=>{if("object"!==zy(u))return!1;const Xe=Ry(u);return!(null!==Xe&&Xe!==Object.prototype&&null!==Object.getPrototypeOf(Xe)||Symbol.toStringTag in u||Symbol.iterator in u)},Vy=kindOfTest("Date"),Uy=kindOfTest("File"),$y=kindOfTest("Blob"),Wy=kindOfTest("FileList"),qy=kindOfTest("URLSearchParams"),[Zy,Hy,Gy,Ky]=["ReadableStream","Request","Response","Headers"].map(kindOfTest);function forEach(u,Xe,{allOwnKeys:Wt=!1}={}){if(null==u)return;let fr,_r;if("object"!=typeof u&&(u=[u]),Ly(u))for(fr=0,_r=u.length;fr<_r;fr++)Xe.call(null,u[fr],fr,u);else{const _r=Wt?Object.getOwnPropertyNames(u):Object.keys(u),wr=_r.length;let Ar;for(fr=0;fr<wr;fr++)Ar=_r[fr],Xe.call(null,u[Ar],Ar,u)}}function findKey(u,Xe){Xe=Xe.toLowerCase();const Wt=Object.keys(u);let fr,_r=Wt.length;for(;_r-- >0;)if(fr=Wt[_r],Xe===fr.toLowerCase())return fr;return null}const Xy="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,isContextDefined=u=>!Dy(u)&&u!==Xy;const Yy=(Jy="undefined"!=typeof Uint8Array&&Ry(Uint8Array),u=>Jy&&u instanceof Jy);var Jy;const Qy=kindOfTest("HTMLFormElement"),e_=(({hasOwnProperty:u})=>(Xe,Wt)=>u.call(Xe,Wt))(Object.prototype),t_=kindOfTest("RegExp"),reduceDescriptors=(u,Xe)=>{const Wt=Object.getOwnPropertyDescriptors(u),fr={};forEach(Wt,((Wt,_r)=>{let wr;!1!==(wr=Xe(Wt,_r,u))&&(fr[_r]=wr||Wt)})),Object.defineProperties(u,fr)},r_="abcdefghijklmnopqrstuvwxyz",n_="0123456789",i_={DIGIT:n_,ALPHA:r_,ALPHA_DIGIT:r_+r_.toUpperCase()+n_};const o_=kindOfTest("AsyncFunction"),a_=(s_="function"==typeof setImmediate,l_=By(Xy.postMessage),s_?setImmediate:l_?(c_=`axios@${Math.random()}`,u_=[],Xy.addEventListener("message",(({source:u,data:Xe})=>{u===Xy&&Xe===c_&&u_.length&&u_.shift()()}),!1),u=>{u_.push(u),Xy.postMessage(c_,"*")}):u=>setTimeout(u));var s_,l_,c_,u_;const d_="undefined"!=typeof queueMicrotask?queueMicrotask.bind(Xy):"undefined"!=typeof process&&process.nextTick||a_;var h_={isArray:Ly,isArrayBuffer:Fy,isBuffer:function isBuffer(u){return null!==u&&!Dy(u)&&null!==u.constructor&&!Dy(u.constructor)&&By(u.constructor.isBuffer)&&u.constructor.isBuffer(u)},isFormData:u=>{let Xe;return u&&("function"==typeof FormData&&u instanceof FormData||By(u.append)&&("formdata"===(Xe=zy(u))||"object"===Xe&&By(u.toString)&&"[object FormData]"===u.toString()))},isArrayBufferView:function isArrayBufferView(u){let Xe;return Xe="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(u):u&&u.buffer&&Fy(u.buffer),Xe},isString:jy,isNumber:Ny,isBoolean:u=>!0===u||!1===u,isObject,isPlainObject,isReadableStream:Zy,isRequest:Hy,isResponse:Gy,isHeaders:Ky,isUndefined:Dy,isDate:Vy,isFile:Uy,isBlob:$y,isRegExp:t_,isFunction:By,isStream:u=>isObject(u)&&By(u.pipe),isURLSearchParams:qy,isTypedArray:Yy,isFileList:Wy,forEach,merge:function extension_merge(){const{caseless:u}=isContextDefined(this)&&this||{},Xe={},assignValue=(Wt,fr)=>{const _r=u&&findKey(Xe,fr)||fr;isPlainObject(Xe[_r])&&isPlainObject(Wt)?Xe[_r]=extension_merge(Xe[_r],Wt):isPlainObject(Wt)?Xe[_r]=extension_merge({},Wt):Ly(Wt)?Xe[_r]=Wt.slice():Xe[_r]=Wt};for(let u=0,Xe=arguments.length;u<Xe;u++)arguments[u]&&forEach(arguments[u],assignValue);return Xe},extend:(u,Xe,Wt,{allOwnKeys:fr}={})=>(forEach(Xe,((Xe,fr)=>{Wt&&By(Xe)?u[fr]=bind(Xe,Wt):u[fr]=Xe}),{allOwnKeys:fr}),u),trim:u=>u.trim?u.trim():u.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:u=>(65279===u.charCodeAt(0)&&(u=u.slice(1)),u),inherits:(u,Xe,Wt,fr)=>{u.prototype=Object.create(Xe.prototype,fr),u.prototype.constructor=u,Object.defineProperty(u,"super",{value:Xe.prototype}),Wt&&Object.assign(u.prototype,Wt)},toFlatObject:(u,Xe,Wt,fr)=>{let _r,wr,Ar;const Kr={};if(Xe=Xe||{},null==u)return Xe;do{for(_r=Object.getOwnPropertyNames(u),wr=_r.length;wr-- >0;)Ar=_r[wr],fr&&!fr(Ar,u,Xe)||Kr[Ar]||(Xe[Ar]=u[Ar],Kr[Ar]=!0);u=!1!==Wt&&Ry(u)}while(u&&(!Wt||Wt(u,Xe))&&u!==Object.prototype);return Xe},kindOf:zy,kindOfTest,endsWith:(u,Xe,Wt)=>{u=String(u),(void 0===Wt||Wt>u.length)&&(Wt=u.length),Wt-=Xe.length;const fr=u.indexOf(Xe,Wt);return-1!==fr&&fr===Wt},toArray:u=>{if(!u)return null;if(Ly(u))return u;let Xe=u.length;if(!Ny(Xe))return null;const Wt=new Array(Xe);for(;Xe-- >0;)Wt[Xe]=u[Xe];return Wt},forEachEntry:(u,Xe)=>{const Wt=(u&&u[Symbol.iterator]).call(u);let fr;for(;(fr=Wt.next())&&!fr.done;){const Wt=fr.value;Xe.call(u,Wt[0],Wt[1])}},matchAll:(u,Xe)=>{let Wt;const fr=[];for(;null!==(Wt=u.exec(Xe));)fr.push(Wt);return fr},isHTMLForm:Qy,hasOwnProperty:e_,hasOwnProp:e_,reduceDescriptors,freezeMethods:u=>{reduceDescriptors(u,((Xe,Wt)=>{if(By(u)&&-1!==["arguments","caller","callee"].indexOf(Wt))return!1;const fr=u[Wt];By(fr)&&(Xe.enumerable=!1,"writable"in Xe?Xe.writable=!1:Xe.set||(Xe.set=()=>{throw Error("Can not rewrite read-only method '"+Wt+"'")}))}))},toObjectSet:(u,Xe)=>{const Wt={},define=u=>{u.forEach((u=>{Wt[u]=!0}))};return Ly(u)?define(u):define(String(u).split(Xe)),Wt},toCamelCase:u=>u.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function replacer(u,Xe,Wt){return Xe.toUpperCase()+Wt})),noop:()=>{},toFiniteNumber:(u,Xe)=>null!=u&&Number.isFinite(u=+u)?u:Xe,findKey,global:Xy,isContextDefined,ALPHABET:i_,generateString:(u=16,Xe=i_.ALPHA_DIGIT)=>{let Wt="";const{length:fr}=Xe;for(;u--;)Wt+=Xe[Math.random()*fr|0];return Wt},isSpecCompliantForm:function isSpecCompliantForm(u){return!!(u&&By(u.append)&&"FormData"===u[Symbol.toStringTag]&&u[Symbol.iterator])},toJSONObject:u=>{const Xe=new Array(10),visit=(u,Wt)=>{if(isObject(u)){if(Xe.indexOf(u)>=0)return;if(!("toJSON"in u)){Xe[Wt]=u;const fr=Ly(u)?[]:{};return forEach(u,((u,Xe)=>{const _r=visit(u,Wt+1);!Dy(_r)&&(fr[Xe]=_r)})),Xe[Wt]=void 0,fr}}return u};return visit(u,0)},isAsyncFn:o_,isThenable:u=>u&&(isObject(u)||By(u))&&By(u.then)&&By(u.catch),setImmediate:a_,asap:d_};function AxiosError(u,Xe,Wt,fr,_r){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=u,this.name="AxiosError",Xe&&(this.code=Xe),Wt&&(this.config=Wt),fr&&(this.request=fr),_r&&(this.response=_r,this.status=_r.status?_r.status:null)}h_.inherits(AxiosError,Error,{toJSON:function toJSON(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:h_.toJSONObject(this.config),code:this.code,status:this.status}}});const p_=AxiosError.prototype,f_={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((u=>{f_[u]={value:u}})),Object.defineProperties(AxiosError,f_),Object.defineProperty(p_,"isAxiosError",{value:!0}),AxiosError.from=(u,Xe,Wt,fr,_r,wr)=>{const Ar=Object.create(p_);return h_.toFlatObject(u,Ar,(function filter(u){return u!==Error.prototype}),(u=>"isAxiosError"!==u)),AxiosError.call(Ar,u.message,Xe,Wt,fr,_r),Ar.cause=u,Ar.name=u.name,wr&&Object.assign(Ar,wr),Ar};var m_=AxiosError;function isVisitable(u){return h_.isPlainObject(u)||h_.isArray(u)}function removeBrackets(u){return h_.endsWith(u,"[]")?u.slice(0,-2):u}function renderKey(u,Xe,Wt){return u?u.concat(Xe).map((function each(u,Xe){return u=removeBrackets(u),!Wt&&Xe?"["+u+"]":u})).join(Wt?".":""):Xe}const g_=h_.toFlatObject(h_,{},null,(function filter(u){return/^is[A-Z]/.test(u)}));var y_=function toFormData(u,Xe,Wt){if(!h_.isObject(u))throw new TypeError("target must be an object");Xe=Xe||new FormData;const fr=(Wt=h_.toFlatObject(Wt,{metaTokens:!0,dots:!1,indexes:!1},!1,(function defined(u,Xe){return!h_.isUndefined(Xe[u])}))).metaTokens,_r=Wt.visitor||defaultVisitor,wr=Wt.dots,Ar=Wt.indexes,Kr=(Wt.Blob||"undefined"!=typeof Blob&&Blob)&&h_.isSpecCompliantForm(Xe);if(!h_.isFunction(_r))throw new TypeError("visitor must be a function");function convertValue(u){if(null===u)return"";if(h_.isDate(u))return u.toISOString();if(!Kr&&h_.isBlob(u))throw new m_("Blob is not supported. Use a Buffer instead.");return h_.isArrayBuffer(u)||h_.isTypedArray(u)?Kr&&"function"==typeof Blob?new Blob([u]):Buffer.from(u):u}function defaultVisitor(u,Wt,_r){let Kr=u;if(u&&!_r&&"object"==typeof u)if(h_.endsWith(Wt,"{}"))Wt=fr?Wt:Wt.slice(0,-2),u=JSON.stringify(u);else if(h_.isArray(u)&&function isFlatArray(u){return h_.isArray(u)&&!u.some(isVisitable)}(u)||(h_.isFileList(u)||h_.endsWith(Wt,"[]"))&&(Kr=h_.toArray(u)))return Wt=removeBrackets(Wt),Kr.forEach((function each(u,fr){!h_.isUndefined(u)&&null!==u&&Xe.append(!0===Ar?renderKey([Wt],fr,wr):null===Ar?Wt:Wt+"[]",convertValue(u))})),!1;return!!isVisitable(u)||(Xe.append(renderKey(_r,Wt,wr),convertValue(u)),!1)}const In=[],no=Object.assign(g_,{defaultVisitor,convertValue,isVisitable});if(!h_.isObject(u))throw new TypeError("data must be an object");return function build(u,Wt){if(!h_.isUndefined(u)){if(-1!==In.indexOf(u))throw Error("Circular reference detected in "+Wt.join("."));In.push(u),h_.forEach(u,(function each(u,fr){!0===(!(h_.isUndefined(u)||null===u)&&_r.call(Xe,u,h_.isString(fr)?fr.trim():fr,Wt,no))&&build(u,Wt?Wt.concat(fr):[fr])})),In.pop()}}(u),Xe};function encode(u){const Xe={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(u).replace(/[!'()~]|%20|%00/g,(function replacer(u){return Xe[u]}))}function AxiosURLSearchParams(u,Xe){this._pairs=[],u&&y_(u,this,Xe)}const v_=AxiosURLSearchParams.prototype;v_.append=function append(u,Xe){this._pairs.push([u,Xe])},v_.toString=function toString(u){const Xe=u?function(Xe){return u.call(this,Xe,encode)}:encode;return this._pairs.map((function each(u){return Xe(u[0])+"="+Xe(u[1])}),"").join("&")};var b_=AxiosURLSearchParams;function buildURL_encode(u){return encodeURIComponent(u).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function buildURL(u,Xe,Wt){if(!Xe)return u;const fr=Wt&&Wt.encode||buildURL_encode,_r=Wt&&Wt.serialize;let wr;if(wr=_r?_r(Xe,Wt):h_.isURLSearchParams(Xe)?Xe.toString():new b_(Xe,Wt).toString(fr),wr){const Xe=u.indexOf("#");-1!==Xe&&(u=u.slice(0,Xe)),u+=(-1===u.indexOf("?")?"?":"&")+wr}return u}var x_=class InterceptorManager{constructor(){this.handlers=[]}use(u,Xe,Wt){return this.handlers.push({fulfilled:u,rejected:Xe,synchronous:!!Wt&&Wt.synchronous,runWhen:Wt?Wt.runWhen:null}),this.handlers.length-1}eject(u){this.handlers[u]&&(this.handlers[u]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(u){h_.forEach(this.handlers,(function forEachHandler(Xe){null!==Xe&&u(Xe)}))}},w_={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},S_={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:b_,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]};const k_="undefined"!=typeof window&&"undefined"!=typeof document,A_="object"==typeof navigator&&navigator||void 0,T_=k_&&(!A_||["ReactNative","NativeScript","NS"].indexOf(A_.product)<0),E_="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,C_=k_&&window.location.href||"http://localhost";var P_={...u,...S_};var I_=function formDataToJSON(u){function buildPath(u,Xe,Wt,fr){let _r=u[fr++];if("__proto__"===_r)return!0;const wr=Number.isFinite(+_r),Ar=fr>=u.length;if(_r=!_r&&h_.isArray(Wt)?Wt.length:_r,Ar)return h_.hasOwnProp(Wt,_r)?Wt[_r]=[Wt[_r],Xe]:Wt[_r]=Xe,!wr;Wt[_r]&&h_.isObject(Wt[_r])||(Wt[_r]=[]);return buildPath(u,Xe,Wt[_r],fr)&&h_.isArray(Wt[_r])&&(Wt[_r]=function arrayToObject(u){const Xe={},Wt=Object.keys(u);let fr;const _r=Wt.length;let wr;for(fr=0;fr<_r;fr++)wr=Wt[fr],Xe[wr]=u[wr];return Xe}(Wt[_r])),!wr}if(h_.isFormData(u)&&h_.isFunction(u.entries)){const Xe={};return h_.forEachEntry(u,((u,Wt)=>{buildPath(function parsePropPath(u){return h_.matchAll(/\w+|\[(\w*)]/g,u).map((u=>"[]"===u[0]?"":u[1]||u[0]))}(u),Wt,Xe,0)})),Xe}return null};const M_={transitional:w_,adapter:["xhr","http","fetch"],transformRequest:[function transformRequest(u,Xe){const Wt=Xe.getContentType()||"",fr=Wt.indexOf("application/json")>-1,_r=h_.isObject(u);_r&&h_.isHTMLForm(u)&&(u=new FormData(u));if(h_.isFormData(u))return fr?JSON.stringify(I_(u)):u;if(h_.isArrayBuffer(u)||h_.isBuffer(u)||h_.isStream(u)||h_.isFile(u)||h_.isBlob(u)||h_.isReadableStream(u))return u;if(h_.isArrayBufferView(u))return u.buffer;if(h_.isURLSearchParams(u))return Xe.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),u.toString();let wr;if(_r){if(Wt.indexOf("application/x-www-form-urlencoded")>-1)return function toURLEncodedForm(u,Xe){return y_(u,new P_.classes.URLSearchParams,Object.assign({visitor:function(u,Xe,Wt,fr){return P_.isNode&&h_.isBuffer(u)?(this.append(Xe,u.toString("base64")),!1):fr.defaultVisitor.apply(this,arguments)}},Xe))}(u,this.formSerializer).toString();if((wr=h_.isFileList(u))||Wt.indexOf("multipart/form-data")>-1){const Xe=this.env&&this.env.FormData;return y_(wr?{"files[]":u}:u,Xe&&new Xe,this.formSerializer)}}return _r||fr?(Xe.setContentType("application/json",!1),function stringifySafely(u,Xe,Wt){if(h_.isString(u))try{return(Xe||JSON.parse)(u),h_.trim(u)}catch(u){if("SyntaxError"!==u.name)throw u}return(Wt||JSON.stringify)(u)}(u)):u}],transformResponse:[function transformResponse(u){const Xe=this.transitional||M_.transitional,Wt=Xe&&Xe.forcedJSONParsing,fr="json"===this.responseType;if(h_.isResponse(u)||h_.isReadableStream(u))return u;if(u&&h_.isString(u)&&(Wt&&!this.responseType||fr)){const Wt=!(Xe&&Xe.silentJSONParsing)&&fr;try{return JSON.parse(u)}catch(u){if(Wt){if("SyntaxError"===u.name)throw m_.from(u,m_.ERR_BAD_RESPONSE,this,null,this.response);throw u}}}return u}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:P_.classes.FormData,Blob:P_.classes.Blob},validateStatus:function validateStatus(u){return u>=200&&u<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};h_.forEach(["delete","get","head","post","put","patch"],(u=>{M_.headers[u]={}}));var R_=M_;const z_=h_.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]);const O_=Symbol("internals");function normalizeHeader(u){return u&&String(u).trim().toLowerCase()}function normalizeValue(u){return!1===u||null==u?u:h_.isArray(u)?u.map(normalizeValue):String(u)}function matchHeaderValue(u,Xe,Wt,fr,_r){return h_.isFunction(fr)?fr.call(this,Xe,Wt):(_r&&(Xe=Wt),h_.isString(Xe)?h_.isString(fr)?-1!==Xe.indexOf(fr):h_.isRegExp(fr)?fr.test(Xe):void 0:void 0)}class AxiosHeaders{constructor(u){u&&this.set(u)}set(u,Xe,Wt){const fr=this;function setHeader(u,Xe,Wt){const _r=normalizeHeader(Xe);if(!_r)throw new Error("header name must be a non-empty string");const wr=h_.findKey(fr,_r);(!wr||void 0===fr[wr]||!0===Wt||void 0===Wt&&!1!==fr[wr])&&(fr[wr||Xe]=normalizeValue(u))}const setHeaders=(u,Xe)=>h_.forEach(u,((u,Wt)=>setHeader(u,Wt,Xe)));if(h_.isPlainObject(u)||u instanceof this.constructor)setHeaders(u,Xe);else if(h_.isString(u)&&(u=u.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(u.trim()))setHeaders((u=>{const Xe={};let Wt,fr,_r;return u&&u.split("\n").forEach((function parser(u){_r=u.indexOf(":"),Wt=u.substring(0,_r).trim().toLowerCase(),fr=u.substring(_r+1).trim(),!Wt||Xe[Wt]&&z_[Wt]||("set-cookie"===Wt?Xe[Wt]?Xe[Wt].push(fr):Xe[Wt]=[fr]:Xe[Wt]=Xe[Wt]?Xe[Wt]+", "+fr:fr)})),Xe})(u),Xe);else if(h_.isHeaders(u))for(const[Xe,fr]of u.entries())setHeader(fr,Xe,Wt);else null!=u&&setHeader(Xe,u,Wt);return this}get(u,Xe){if(u=normalizeHeader(u)){const Wt=h_.findKey(this,u);if(Wt){const u=this[Wt];if(!Xe)return u;if(!0===Xe)return function parseTokens(u){const Xe=Object.create(null),Wt=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let fr;for(;fr=Wt.exec(u);)Xe[fr[1]]=fr[2];return Xe}(u);if(h_.isFunction(Xe))return Xe.call(this,u,Wt);if(h_.isRegExp(Xe))return Xe.exec(u);throw new TypeError("parser must be boolean|regexp|function")}}}has(u,Xe){if(u=normalizeHeader(u)){const Wt=h_.findKey(this,u);return!(!Wt||void 0===this[Wt]||Xe&&!matchHeaderValue(0,this[Wt],Wt,Xe))}return!1}delete(u,Xe){const Wt=this;let fr=!1;function deleteHeader(u){if(u=normalizeHeader(u)){const _r=h_.findKey(Wt,u);!_r||Xe&&!matchHeaderValue(0,Wt[_r],_r,Xe)||(delete Wt[_r],fr=!0)}}return h_.isArray(u)?u.forEach(deleteHeader):deleteHeader(u),fr}clear(u){const Xe=Object.keys(this);let Wt=Xe.length,fr=!1;for(;Wt--;){const _r=Xe[Wt];u&&!matchHeaderValue(0,this[_r],_r,u,!0)||(delete this[_r],fr=!0)}return fr}normalize(u){const Xe=this,Wt={};return h_.forEach(this,((fr,_r)=>{const wr=h_.findKey(Wt,_r);if(wr)return Xe[wr]=normalizeValue(fr),void delete Xe[_r];const Ar=u?function formatHeader(u){return u.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((u,Xe,Wt)=>Xe.toUpperCase()+Wt))}(_r):String(_r).trim();Ar!==_r&&delete Xe[_r],Xe[Ar]=normalizeValue(fr),Wt[Ar]=!0})),this}concat(...u){return this.constructor.concat(this,...u)}toJSON(u){const Xe=Object.create(null);return h_.forEach(this,((Wt,fr)=>{null!=Wt&&!1!==Wt&&(Xe[fr]=u&&h_.isArray(Wt)?Wt.join(", "):Wt)})),Xe}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([u,Xe])=>u+": "+Xe)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(u){return u instanceof this?u:new this(u)}static concat(u,...Xe){const Wt=new this(u);return Xe.forEach((u=>Wt.set(u))),Wt}static accessor(u){const Xe=(this[O_]=this[O_]={accessors:{}}).accessors,Wt=this.prototype;function defineAccessor(u){const fr=normalizeHeader(u);Xe[fr]||(!function buildAccessors(u,Xe){const Wt=h_.toCamelCase(" "+Xe);["get","set","has"].forEach((fr=>{Object.defineProperty(u,fr+Wt,{value:function(u,Wt,_r){return this[fr].call(this,Xe,u,Wt,_r)},configurable:!0})}))}(Wt,u),Xe[fr]=!0)}return h_.isArray(u)?u.forEach(defineAccessor):defineAccessor(u),this}}AxiosHeaders.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),h_.reduceDescriptors(AxiosHeaders.prototype,(({value:u},Xe)=>{let Wt=Xe[0].toUpperCase()+Xe.slice(1);return{get:()=>u,set(u){this[Wt]=u}}})),h_.freezeMethods(AxiosHeaders);var L_=AxiosHeaders;function transformData(u,Xe){const Wt=this||R_,fr=Xe||Wt,_r=L_.from(fr.headers);let wr=fr.data;return h_.forEach(u,(function transform(u){wr=u.call(Wt,wr,_r.normalize(),Xe?Xe.status:void 0)})),_r.normalize(),wr}function isCancel(u){return!(!u||!u.__CANCEL__)}function CanceledError(u,Xe,Wt){m_.call(this,null==u?"canceled":u,m_.ERR_CANCELED,Xe,Wt),this.name="CanceledError"}h_.inherits(CanceledError,m_,{__CANCEL__:!0});var D_=CanceledError;function settle(u,Xe,Wt){const fr=Wt.config.validateStatus;Wt.status&&fr&&!fr(Wt.status)?Xe(new m_("Request failed with status code "+Wt.status,[m_.ERR_BAD_REQUEST,m_.ERR_BAD_RESPONSE][Math.floor(Wt.status/100)-4],Wt.config,Wt.request,Wt)):u(Wt)}var F_=function speedometer(u,Xe){u=u||10;const Wt=new Array(u),fr=new Array(u);let _r,wr=0,Ar=0;return Xe=void 0!==Xe?Xe:1e3,function push(Kr){const In=Date.now(),no=fr[Ar];_r||(_r=In),Wt[wr]=Kr,fr[wr]=In;let io=Ar,oo=0;for(;io!==wr;)oo+=Wt[io++],io%=u;if(wr=(wr+1)%u,wr===Ar&&(Ar=(Ar+1)%u),In-_r<Xe)return;const ao=no&&In-no;return ao?Math.round(1e3*oo/ao):void 0}};var j_=function throttle(u,Xe){let Wt,fr,_r=0,wr=1e3/Xe;const invoke=(Xe,wr=Date.now())=>{_r=wr,Wt=null,fr&&(clearTimeout(fr),fr=null),u.apply(null,Xe)};return[(...u)=>{const Xe=Date.now(),Ar=Xe-_r;Ar>=wr?invoke(u,Xe):(Wt=u,fr||(fr=setTimeout((()=>{fr=null,invoke(Wt)}),wr-Ar)))},()=>Wt&&invoke(Wt)]};const progressEventReducer=(u,Xe,Wt=3)=>{let fr=0;const _r=F_(50,250);return j_((Wt=>{const wr=Wt.loaded,Ar=Wt.lengthComputable?Wt.total:void 0,Kr=wr-fr,In=_r(Kr);fr=wr;u({loaded:wr,total:Ar,progress:Ar?wr/Ar:void 0,bytes:Kr,rate:In||void 0,estimated:In&&Ar&&wr<=Ar?(Ar-wr)/In:void 0,event:Wt,lengthComputable:null!=Ar,[Xe?"download":"upload"]:!0})}),Wt)},progressEventDecorator=(u,Xe)=>{const Wt=null!=u;return[fr=>Xe[0]({lengthComputable:Wt,total:u,loaded:fr}),Xe[1]]},asyncDecorator=u=>(...Xe)=>h_.asap((()=>u(...Xe)));var B_=P_.hasStandardBrowserEnv?function standardBrowserEnv(){const u=P_.navigator&&/(msie|trident)/i.test(P_.navigator.userAgent),Xe=document.createElement("a");let Wt;function resolveURL(Wt){let fr=Wt;return u&&(Xe.setAttribute("href",fr),fr=Xe.href),Xe.setAttribute("href",fr),{href:Xe.href,protocol:Xe.protocol?Xe.protocol.replace(/:$/,""):"",host:Xe.host,search:Xe.search?Xe.search.replace(/^\?/,""):"",hash:Xe.hash?Xe.hash.replace(/^#/,""):"",hostname:Xe.hostname,port:Xe.port,pathname:"/"===Xe.pathname.charAt(0)?Xe.pathname:"/"+Xe.pathname}}return Wt=resolveURL(window.location.href),function isURLSameOrigin(u){const Xe=h_.isString(u)?resolveURL(u):u;return Xe.protocol===Wt.protocol&&Xe.host===Wt.host}}():function isURLSameOrigin(){return!0},N_=P_.hasStandardBrowserEnv?{write(u,Xe,Wt,fr,_r,wr){const Ar=[u+"="+encodeURIComponent(Xe)];h_.isNumber(Wt)&&Ar.push("expires="+new Date(Wt).toGMTString()),h_.isString(fr)&&Ar.push("path="+fr),h_.isString(_r)&&Ar.push("domain="+_r),!0===wr&&Ar.push("secure"),document.cookie=Ar.join("; ")},read(u){const Xe=document.cookie.match(new RegExp("(^|;\\s*)("+u+")=([^;]*)"));return Xe?decodeURIComponent(Xe[3]):null},remove(u){this.write(u,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function buildFullPath(u,Xe){return u&&!function isAbsoluteURL(u){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(u)}(Xe)?function combineURLs(u,Xe){return Xe?u.replace(/\/?\/$/,"")+"/"+Xe.replace(/^\/+/,""):u}(u,Xe):Xe}const headersToObject=u=>u instanceof L_?{...u}:u;function mergeConfig(u,Xe){Xe=Xe||{};const Wt={};function getMergedValue(u,Xe,Wt){return h_.isPlainObject(u)&&h_.isPlainObject(Xe)?h_.merge.call({caseless:Wt},u,Xe):h_.isPlainObject(Xe)?h_.merge({},Xe):h_.isArray(Xe)?Xe.slice():Xe}function mergeDeepProperties(u,Xe,Wt){return h_.isUndefined(Xe)?h_.isUndefined(u)?void 0:getMergedValue(void 0,u,Wt):getMergedValue(u,Xe,Wt)}function valueFromConfig2(u,Xe){if(!h_.isUndefined(Xe))return getMergedValue(void 0,Xe)}function defaultToConfig2(u,Xe){return h_.isUndefined(Xe)?h_.isUndefined(u)?void 0:getMergedValue(void 0,u):getMergedValue(void 0,Xe)}function mergeDirectKeys(Wt,fr,_r){return _r in Xe?getMergedValue(Wt,fr):_r in u?getMergedValue(void 0,Wt):void 0}const fr={url:valueFromConfig2,method:valueFromConfig2,data:valueFromConfig2,baseURL:defaultToConfig2,transformRequest:defaultToConfig2,transformResponse:defaultToConfig2,paramsSerializer:defaultToConfig2,timeout:defaultToConfig2,timeoutMessage:defaultToConfig2,withCredentials:defaultToConfig2,withXSRFToken:defaultToConfig2,adapter:defaultToConfig2,responseType:defaultToConfig2,xsrfCookieName:defaultToConfig2,xsrfHeaderName:defaultToConfig2,onUploadProgress:defaultToConfig2,onDownloadProgress:defaultToConfig2,decompress:defaultToConfig2,maxContentLength:defaultToConfig2,maxBodyLength:defaultToConfig2,beforeRedirect:defaultToConfig2,transport:defaultToConfig2,httpAgent:defaultToConfig2,httpsAgent:defaultToConfig2,cancelToken:defaultToConfig2,socketPath:defaultToConfig2,responseEncoding:defaultToConfig2,validateStatus:mergeDirectKeys,headers:(u,Xe)=>mergeDeepProperties(headersToObject(u),headersToObject(Xe),!0)};return h_.forEach(Object.keys(Object.assign({},u,Xe)),(function computeConfigValue(_r){const wr=fr[_r]||mergeDeepProperties,Ar=wr(u[_r],Xe[_r],_r);h_.isUndefined(Ar)&&wr!==mergeDirectKeys||(Wt[_r]=Ar)})),Wt}var resolveConfig=u=>{const Xe=mergeConfig({},u);let Wt,{data:fr,withXSRFToken:_r,xsrfHeaderName:wr,xsrfCookieName:Ar,headers:Kr,auth:In}=Xe;if(Xe.headers=Kr=L_.from(Kr),Xe.url=buildURL(buildFullPath(Xe.baseURL,Xe.url),u.params,u.paramsSerializer),In&&Kr.set("Authorization","Basic "+btoa((In.username||"")+":"+(In.password?unescape(encodeURIComponent(In.password)):""))),h_.isFormData(fr))if(P_.hasStandardBrowserEnv||P_.hasStandardBrowserWebWorkerEnv)Kr.setContentType(void 0);else if(!1!==(Wt=Kr.getContentType())){const[u,...Xe]=Wt?Wt.split(";").map((u=>u.trim())).filter(Boolean):[];Kr.setContentType([u||"multipart/form-data",...Xe].join("; "))}if(P_.hasStandardBrowserEnv&&(_r&&h_.isFunction(_r)&&(_r=_r(Xe)),_r||!1!==_r&&B_(Xe.url))){const u=wr&&Ar&&N_.read(Ar);u&&Kr.set(wr,u)}return Xe};var V_="undefined"!=typeof XMLHttpRequest&&function(u){return new Promise((function dispatchXhrRequest(Xe,Wt){const fr=resolveConfig(u);let _r=fr.data;const wr=L_.from(fr.headers).normalize();let Ar,Kr,In,no,io,{responseType:oo,onUploadProgress:ao,onDownloadProgress:so}=fr;function done(){no&&no(),io&&io(),fr.cancelToken&&fr.cancelToken.unsubscribe(Ar),fr.signal&&fr.signal.removeEventListener("abort",Ar)}let co=new XMLHttpRequest;function onloadend(){if(!co)return;const fr=L_.from("getAllResponseHeaders"in co&&co.getAllResponseHeaders());settle((function _resolve(u){Xe(u),done()}),(function _reject(u){Wt(u),done()}),{data:oo&&"text"!==oo&&"json"!==oo?co.response:co.responseText,status:co.status,statusText:co.statusText,headers:fr,config:u,request:co}),co=null}co.open(fr.method.toUpperCase(),fr.url,!0),co.timeout=fr.timeout,"onloadend"in co?co.onloadend=onloadend:co.onreadystatechange=function handleLoad(){co&&4===co.readyState&&(0!==co.status||co.responseURL&&0===co.responseURL.indexOf("file:"))&&setTimeout(onloadend)},co.onabort=function handleAbort(){co&&(Wt(new m_("Request aborted",m_.ECONNABORTED,u,co)),co=null)},co.onerror=function handleError(){Wt(new m_("Network Error",m_.ERR_NETWORK,u,co)),co=null},co.ontimeout=function handleTimeout(){let Xe=fr.timeout?"timeout of "+fr.timeout+"ms exceeded":"timeout exceeded";const _r=fr.transitional||w_;fr.timeoutErrorMessage&&(Xe=fr.timeoutErrorMessage),Wt(new m_(Xe,_r.clarifyTimeoutError?m_.ETIMEDOUT:m_.ECONNABORTED,u,co)),co=null},void 0===_r&&wr.setContentType(null),"setRequestHeader"in co&&h_.forEach(wr.toJSON(),(function setRequestHeader(u,Xe){co.setRequestHeader(Xe,u)})),h_.isUndefined(fr.withCredentials)||(co.withCredentials=!!fr.withCredentials),oo&&"json"!==oo&&(co.responseType=fr.responseType),so&&([In,io]=progressEventReducer(so,!0),co.addEventListener("progress",In)),ao&&co.upload&&([Kr,no]=progressEventReducer(ao),co.upload.addEventListener("progress",Kr),co.upload.addEventListener("loadend",no)),(fr.cancelToken||fr.signal)&&(Ar=Xe=>{co&&(Wt(!Xe||Xe.type?new D_(null,u,co):Xe),co.abort(),co=null)},fr.cancelToken&&fr.cancelToken.subscribe(Ar),fr.signal&&(fr.signal.aborted?Ar():fr.signal.addEventListener("abort",Ar)));const ho=function parseProtocol(u){const Xe=/^([-+\w]{1,25})(:?\/\/|:)/.exec(u);return Xe&&Xe[1]||""}(fr.url);ho&&-1===P_.protocols.indexOf(ho)?Wt(new m_("Unsupported protocol "+ho+":",m_.ERR_BAD_REQUEST,u)):co.send(_r||null)}))};var helpers_composeSignals=(u,Xe)=>{const{length:Wt}=u=u?u.filter(Boolean):[];if(Xe||Wt){let Wt,fr=new AbortController;const onabort=function(u){if(!Wt){Wt=!0,unsubscribe();const Xe=u instanceof Error?u:this.reason;fr.abort(Xe instanceof m_?Xe:new D_(Xe instanceof Error?Xe.message:Xe))}};let _r=Xe&&setTimeout((()=>{_r=null,onabort(new m_(`timeout ${Xe} of ms exceeded`,m_.ETIMEDOUT))}),Xe);const unsubscribe=()=>{u&&(_r&&clearTimeout(_r),_r=null,u.forEach((u=>{u.unsubscribe?u.unsubscribe(onabort):u.removeEventListener("abort",onabort)})),u=null)};u.forEach((u=>u.addEventListener("abort",onabort)));const{signal:wr}=fr;return wr.unsubscribe=()=>h_.asap(unsubscribe),wr}};const streamChunk=function*(u,Xe){let Wt=u.byteLength;if(!Xe||Wt<Xe)return void(yield u);let fr,_r=0;for(;_r<Wt;)fr=_r+Xe,yield u.slice(_r,fr),_r=fr},readStream=async function*(u){if(u[Symbol.asyncIterator])return void(yield*u);const Xe=u.getReader();try{for(;;){const{done:u,value:Wt}=await Xe.read();if(u)break;yield Wt}}finally{await Xe.cancel()}},trackStream=(u,Xe,Wt,fr)=>{const _r=async function*(u,Xe){for await(const Wt of readStream(u))yield*streamChunk(Wt,Xe)}(u,Xe);let wr,Ar=0,_onFinish=u=>{wr||(wr=!0,fr&&fr(u))};return new ReadableStream({async pull(u){try{const{done:Xe,value:fr}=await _r.next();if(Xe)return _onFinish(),void u.close();let wr=fr.byteLength;if(Wt){let u=Ar+=wr;Wt(u)}u.enqueue(new Uint8Array(fr))}catch(u){throw _onFinish(u),u}},cancel:u=>(_onFinish(u),_r.return())},{highWaterMark:2})},U_="function"==typeof fetch&&"function"==typeof Request&&"function"==typeof Response,$_=U_&&"function"==typeof ReadableStream,W_=U_&&("function"==typeof TextEncoder?(q_=new TextEncoder,u=>q_.encode(u)):async u=>new Uint8Array(await new Response(u).arrayBuffer()));var q_;const test=(u,...Xe)=>{try{return!!u(...Xe)}catch(u){return!1}},Z_=$_&&test((()=>{let u=!1;const Xe=new Request(P_.origin,{body:new ReadableStream,method:"POST",get duplex(){return u=!0,"half"}}).headers.has("Content-Type");return u&&!Xe})),H_=$_&&test((()=>h_.isReadableStream(new Response("").body))),G_={stream:H_&&(u=>u.body)};var K_;U_&&(K_=new Response,["text","arrayBuffer","blob","formData","stream"].forEach((u=>{!G_[u]&&(G_[u]=h_.isFunction(K_[u])?Xe=>Xe[u]():(Xe,Wt)=>{throw new m_(`Response type '${u}' is not supported`,m_.ERR_NOT_SUPPORT,Wt)})})));const resolveBodyLength=async(u,Xe)=>{const Wt=h_.toFiniteNumber(u.getContentLength());return null==Wt?(async u=>{if(null==u)return 0;if(h_.isBlob(u))return u.size;if(h_.isSpecCompliantForm(u)){const Xe=new Request(P_.origin,{method:"POST",body:u});return(await Xe.arrayBuffer()).byteLength}return h_.isArrayBufferView(u)||h_.isArrayBuffer(u)?u.byteLength:(h_.isURLSearchParams(u)&&(u+=""),h_.isString(u)?(await W_(u)).byteLength:void 0)})(Xe):Wt};var X_=U_&&(async u=>{let{url:Xe,method:Wt,data:fr,signal:_r,cancelToken:wr,timeout:Ar,onDownloadProgress:Kr,onUploadProgress:In,responseType:no,headers:io,withCredentials:oo="same-origin",fetchOptions:ao}=resolveConfig(u);no=no?(no+"").toLowerCase():"text";let so,co=helpers_composeSignals([_r,wr&&wr.toAbortSignal()],Ar);const ho=co&&co.unsubscribe&&(()=>{co.unsubscribe()});let go;try{if(In&&Z_&&"get"!==Wt&&"head"!==Wt&&0!==(go=await resolveBodyLength(io,fr))){let u,Wt=new Request(Xe,{method:"POST",body:fr,duplex:"half"});if(h_.isFormData(fr)&&(u=Wt.headers.get("content-type"))&&io.setContentType(u),Wt.body){const[u,Xe]=progressEventDecorator(go,progressEventReducer(asyncDecorator(In)));fr=trackStream(Wt.body,65536,u,Xe)}}h_.isString(oo)||(oo=oo?"include":"omit");const _r="credentials"in Request.prototype;so=new Request(Xe,{...ao,signal:co,method:Wt.toUpperCase(),headers:io.normalize().toJSON(),body:fr,duplex:"half",credentials:_r?oo:void 0});let wr=await fetch(so);const Ar=H_&&("stream"===no||"response"===no);if(H_&&(Kr||Ar&&ho)){const u={};["status","statusText","headers"].forEach((Xe=>{u[Xe]=wr[Xe]}));const Xe=h_.toFiniteNumber(wr.headers.get("content-length")),[Wt,fr]=Kr&&progressEventDecorator(Xe,progressEventReducer(asyncDecorator(Kr),!0))||[];wr=new Response(trackStream(wr.body,65536,Wt,(()=>{fr&&fr(),ho&&ho()})),u)}no=no||"text";let xo=await G_[h_.findKey(G_,no)||"text"](wr,u);return!Ar&&ho&&ho(),await new Promise(((Xe,Wt)=>{settle(Xe,Wt,{data:xo,headers:L_.from(wr.headers),status:wr.status,statusText:wr.statusText,config:u,request:so})}))}catch(Xe){if(ho&&ho(),Xe&&"TypeError"===Xe.name&&/fetch/i.test(Xe.message))throw Object.assign(new m_("Network Error",m_.ERR_NETWORK,u,so),{cause:Xe.cause||Xe});throw m_.from(Xe,Xe&&Xe.code,u,so)}});const Y_={http:null,xhr:V_,fetch:X_};h_.forEach(Y_,((u,Xe)=>{if(u){try{Object.defineProperty(u,"name",{value:Xe})}catch(u){}Object.defineProperty(u,"adapterName",{value:Xe})}}));const renderReason=u=>`- ${u}`,isResolvedHandle=u=>h_.isFunction(u)||null===u||!1===u;var adapters_getAdapter=u=>{u=h_.isArray(u)?u:[u];const{length:Xe}=u;let Wt,fr;const _r={};for(let wr=0;wr<Xe;wr++){let Xe;if(Wt=u[wr],fr=Wt,!isResolvedHandle(Wt)&&(fr=Y_[(Xe=String(Wt)).toLowerCase()],void 0===fr))throw new m_(`Unknown adapter '${Xe}'`);if(fr)break;_r[Xe||"#"+wr]=fr}if(!fr){const u=Object.entries(_r).map((([u,Xe])=>`adapter ${u} `+(!1===Xe?"is not supported by the environment":"is not available in the build")));let Wt=Xe?u.length>1?"since :\n"+u.map(renderReason).join("\n"):" "+renderReason(u[0]):"as no adapter specified";throw new m_("There is no suitable adapter to dispatch the request "+Wt,"ERR_NOT_SUPPORT")}return fr};function throwIfCancellationRequested(u){if(u.cancelToken&&u.cancelToken.throwIfRequested(),u.signal&&u.signal.aborted)throw new D_(null,u)}function dispatchRequest(u){throwIfCancellationRequested(u),u.headers=L_.from(u.headers),u.data=transformData.call(u,u.transformRequest),-1!==["post","put","patch"].indexOf(u.method)&&u.headers.setContentType("application/x-www-form-urlencoded",!1);return adapters_getAdapter(u.adapter||R_.adapter)(u).then((function onAdapterResolution(Xe){return throwIfCancellationRequested(u),Xe.data=transformData.call(u,u.transformResponse,Xe),Xe.headers=L_.from(Xe.headers),Xe}),(function onAdapterRejection(Xe){return isCancel(Xe)||(throwIfCancellationRequested(u),Xe&&Xe.response&&(Xe.response.data=transformData.call(u,u.transformResponse,Xe.response),Xe.response.headers=L_.from(Xe.response.headers))),Promise.reject(Xe)}))}const J_="1.7.7",Q_={};["object","boolean","number","function","string","symbol"].forEach(((u,Xe)=>{Q_[u]=function validator(Wt){return typeof Wt===u||"a"+(Xe<1?"n ":" ")+u}}));const ev={};Q_.transitional=function transitional(u,Xe,Wt){function formatMessage(u,Xe){return"[Axios v1.7.7] Transitional option '"+u+"'"+Xe+(Wt?". "+Wt:"")}return(Wt,fr,_r)=>{if(!1===u)throw new m_(formatMessage(fr," has been removed"+(Xe?" in "+Xe:"")),m_.ERR_DEPRECATED);return Xe&&!ev[fr]&&(ev[fr]=!0,console.warn(formatMessage(fr," has been deprecated since v"+Xe+" and will be removed in the near future"))),!u||u(Wt,fr,_r)}};var tv={assertOptions:function assertOptions(u,Xe,Wt){if("object"!=typeof u)throw new m_("options must be an object",m_.ERR_BAD_OPTION_VALUE);const fr=Object.keys(u);let _r=fr.length;for(;_r-- >0;){const wr=fr[_r],Ar=Xe[wr];if(Ar){const Xe=u[wr],Wt=void 0===Xe||Ar(Xe,wr,u);if(!0!==Wt)throw new m_("option "+wr+" must be "+Wt,m_.ERR_BAD_OPTION_VALUE)}else if(!0!==Wt)throw new m_("Unknown option "+wr,m_.ERR_BAD_OPTION)}},validators:Q_};const rv=tv.validators;class Axios{constructor(u){this.defaults=u,this.interceptors={request:new x_,response:new x_}}async request(u,Xe){try{return await this._request(u,Xe)}catch(u){if(u instanceof Error){let Xe;Error.captureStackTrace?Error.captureStackTrace(Xe={}):Xe=new Error;const Wt=Xe.stack?Xe.stack.replace(/^.+\n/,""):"";try{u.stack?Wt&&!String(u.stack).endsWith(Wt.replace(/^.+\n.+\n/,""))&&(u.stack+="\n"+Wt):u.stack=Wt}catch(u){}}throw u}}_request(u,Xe){"string"==typeof u?(Xe=Xe||{}).url=u:Xe=u||{},Xe=mergeConfig(this.defaults,Xe);const{transitional:Wt,paramsSerializer:fr,headers:_r}=Xe;void 0!==Wt&&tv.assertOptions(Wt,{silentJSONParsing:rv.transitional(rv.boolean),forcedJSONParsing:rv.transitional(rv.boolean),clarifyTimeoutError:rv.transitional(rv.boolean)},!1),null!=fr&&(h_.isFunction(fr)?Xe.paramsSerializer={serialize:fr}:tv.assertOptions(fr,{encode:rv.function,serialize:rv.function},!0)),Xe.method=(Xe.method||this.defaults.method||"get").toLowerCase();let wr=_r&&h_.merge(_r.common,_r[Xe.method]);_r&&h_.forEach(["delete","get","head","post","put","patch","common"],(u=>{delete _r[u]})),Xe.headers=L_.concat(wr,_r);const Ar=[];let Kr=!0;this.interceptors.request.forEach((function unshiftRequestInterceptors(u){"function"==typeof u.runWhen&&!1===u.runWhen(Xe)||(Kr=Kr&&u.synchronous,Ar.unshift(u.fulfilled,u.rejected))}));const In=[];let no;this.interceptors.response.forEach((function pushResponseInterceptors(u){In.push(u.fulfilled,u.rejected)}));let io,oo=0;if(!Kr){const u=[dispatchRequest.bind(this),void 0];for(u.unshift.apply(u,Ar),u.push.apply(u,In),io=u.length,no=Promise.resolve(Xe);oo<io;)no=no.then(u[oo++],u[oo++]);return no}io=Ar.length;let ao=Xe;for(oo=0;oo<io;){const u=Ar[oo++],Xe=Ar[oo++];try{ao=u(ao)}catch(u){Xe.call(this,u);break}}try{no=dispatchRequest.call(this,ao)}catch(u){return Promise.reject(u)}for(oo=0,io=In.length;oo<io;)no=no.then(In[oo++],In[oo++]);return no}getUri(u){return buildURL(buildFullPath((u=mergeConfig(this.defaults,u)).baseURL,u.url),u.params,u.paramsSerializer)}}h_.forEach(["delete","get","head","options"],(function forEachMethodNoData(u){Axios.prototype[u]=function(Xe,Wt){return this.request(mergeConfig(Wt||{},{method:u,url:Xe,data:(Wt||{}).data}))}})),h_.forEach(["post","put","patch"],(function forEachMethodWithData(u){function generateHTTPMethod(Xe){return function httpMethod(Wt,fr,_r){return this.request(mergeConfig(_r||{},{method:u,headers:Xe?{"Content-Type":"multipart/form-data"}:{},url:Wt,data:fr}))}}Axios.prototype[u]=generateHTTPMethod(),Axios.prototype[u+"Form"]=generateHTTPMethod(!0)}));var nv=Axios;class CancelToken{constructor(u){if("function"!=typeof u)throw new TypeError("executor must be a function.");let Xe;this.promise=new Promise((function promiseExecutor(u){Xe=u}));const Wt=this;this.promise.then((u=>{if(!Wt._listeners)return;let Xe=Wt._listeners.length;for(;Xe-- >0;)Wt._listeners[Xe](u);Wt._listeners=null})),this.promise.then=u=>{let Xe;const fr=new Promise((u=>{Wt.subscribe(u),Xe=u})).then(u);return fr.cancel=function reject(){Wt.unsubscribe(Xe)},fr},u((function cancel(u,fr,_r){Wt.reason||(Wt.reason=new D_(u,fr,_r),Xe(Wt.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(u){this.reason?u(this.reason):this._listeners?this._listeners.push(u):this._listeners=[u]}unsubscribe(u){if(!this._listeners)return;const Xe=this._listeners.indexOf(u);-1!==Xe&&this._listeners.splice(Xe,1)}toAbortSignal(){const u=new AbortController,abort=Xe=>{u.abort(Xe)};return this.subscribe(abort),u.signal.unsubscribe=()=>this.unsubscribe(abort),u.signal}static source(){let u;const Xe=new CancelToken((function executor(Xe){u=Xe}));return{token:Xe,cancel:u}}}var iv=CancelToken;const ov={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(ov).forEach((([u,Xe])=>{ov[Xe]=u}));var av=ov;const sv=function createInstance(u){const Xe=new nv(u),Wt=bind(nv.prototype.request,Xe);return h_.extend(Wt,nv.prototype,Xe,{allOwnKeys:!0}),h_.extend(Wt,Xe,null,{allOwnKeys:!0}),Wt.create=function create(Xe){return createInstance(mergeConfig(u,Xe))},Wt}(R_);sv.Axios=nv,sv.CanceledError=D_,sv.CancelToken=iv,sv.isCancel=isCancel,sv.VERSION=J_,sv.toFormData=y_,sv.AxiosError=m_,sv.Cancel=sv.CanceledError,sv.all=function all(u){return Promise.all(u)},sv.spread=function spread(u){return function wrap(Xe){return u.apply(null,Xe)}},sv.isAxiosError=function isAxiosError(u){return h_.isObject(u)&&!0===u.isAxiosError},sv.mergeConfig=mergeConfig,sv.AxiosHeaders=L_,sv.formToJSON=u=>I_(h_.isHTMLForm(u)?new FormData(u):u),sv.getAdapter=adapters_getAdapter,sv.HttpStatusCode=av,sv.default=sv;var lv=sv;const cv={isAuthenticated:function(){var u=this;return new Promise(function(Xe,fr){var _r=this;_newArrowCheck(this,u),lv.get(`${Wt}/auth`,{withCredentials:!0}).then(function(u){_newArrowCheck(this,_r),Xe(200===u.status)}.bind(this)).catch(function(u){_newArrowCheck(this,_r),console.warn("User is not logged into Jakarto\n",u),Xe(!1)}.bind(this))}.bind(this))},login:function(u,Xe){var fr=this;return new Promise(function(_r,wr){var Ar=this;_newArrowCheck(this,fr);const Kr=new URLSearchParams;Kr.append("email",u),Kr.append("password",Xe),fetch(`${Wt}/users/login`,{headers:{"content-type":"application/x-www-form-urlencoded"},body:Kr,method:"POST",mode:"cors",credentials:"include",redirect:"manual"}).then(function(){_newArrowCheck(this,Ar),_r()}.bind(this)).catch(function(u){_newArrowCheck(this,Ar),console.error(u),wr()}.bind(this))}.bind(this))}};var uv,dv;!function(u){u.assertEqual=u=>u,u.assertIs=function assertIs(u){},u.assertNever=function assertNever(u){throw new Error},u.arrayToEnum=u=>{const Xe={};for(const Wt of u)Xe[Wt]=Wt;return Xe},u.getValidEnumValues=Xe=>{const Wt=u.objectKeys(Xe).filter((u=>"number"!=typeof Xe[Xe[u]])),fr={};for(const u of Wt)fr[u]=Xe[u];return u.objectValues(fr)},u.objectValues=Xe=>u.objectKeys(Xe).map((function(u){return Xe[u]})),u.objectKeys="function"==typeof Object.keys?u=>Object.keys(u):u=>{const Xe=[];for(const Wt in u)Object.prototype.hasOwnProperty.call(u,Wt)&&Xe.push(Wt);return Xe},u.find=(u,Xe)=>{for(const Wt of u)if(Xe(Wt))return Wt},u.isInteger="function"==typeof Number.isInteger?u=>Number.isInteger(u):u=>"number"==typeof u&&isFinite(u)&&Math.floor(u)===u,u.joinValues=function joinValues(u,Xe=" | "){return u.map((u=>"string"==typeof u?`'${u}'`:u)).join(Xe)},u.jsonStringifyReplacer=(u,Xe)=>"bigint"==typeof Xe?Xe.toString():Xe}(uv||(uv={})),function(u){u.mergeShapes=(u,Xe)=>({...u,...Xe})}(dv||(dv={}));const hv=uv.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),getParsedType=u=>{switch(typeof u){case"undefined":return hv.undefined;case"string":return hv.string;case"number":return isNaN(u)?hv.nan:hv.number;case"boolean":return hv.boolean;case"function":return hv.function;case"bigint":return hv.bigint;case"symbol":return hv.symbol;case"object":return Array.isArray(u)?hv.array:null===u?hv.null:u.then&&"function"==typeof u.then&&u.catch&&"function"==typeof u.catch?hv.promise:"undefined"!=typeof Map&&u instanceof Map?hv.map:"undefined"!=typeof Set&&u instanceof Set?hv.set:"undefined"!=typeof Date&&u instanceof Date?hv.date:hv.object;default:return hv.unknown}},pv=uv.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class ZodError extends Error{constructor(u){super(),this.issues=[],this.addIssue=u=>{this.issues=[...this.issues,u]},this.addIssues=(u=[])=>{this.issues=[...this.issues,...u]};const Xe=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,Xe):this.__proto__=Xe,this.name="ZodError",this.issues=u}get errors(){return this.issues}format(u){const Xe=u||function(u){return u.message},Wt={_errors:[]},processError=u=>{for(const fr of u.issues)if("invalid_union"===fr.code)fr.unionErrors.map(processError);else if("invalid_return_type"===fr.code)processError(fr.returnTypeError);else if("invalid_arguments"===fr.code)processError(fr.argumentsError);else if(0===fr.path.length)Wt._errors.push(Xe(fr));else{let u=Wt,_r=0;for(;_r<fr.path.length;){const Wt=fr.path[_r];_r===fr.path.length-1?(u[Wt]=u[Wt]||{_errors:[]},u[Wt]._errors.push(Xe(fr))):u[Wt]=u[Wt]||{_errors:[]},u=u[Wt],_r++}}};return processError(this),Wt}static assert(u){if(!(u instanceof ZodError))throw new Error(`Not a ZodError: ${u}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,uv.jsonStringifyReplacer,2)}get isEmpty(){return 0===this.issues.length}flatten(u=u=>u.message){const Xe={},Wt=[];for(const fr of this.issues)fr.path.length>0?(Xe[fr.path[0]]=Xe[fr.path[0]]||[],Xe[fr.path[0]].push(u(fr))):Wt.push(u(fr));return{formErrors:Wt,fieldErrors:Xe}}get formErrors(){return this.flatten()}}ZodError.create=u=>new ZodError(u);const errorMap=(u,Xe)=>{let Wt;switch(u.code){case pv.invalid_type:Wt=u.received===hv.undefined?"Required":`Expected ${u.expected}, received ${u.received}`;break;case pv.invalid_literal:Wt=`Invalid literal value, expected ${JSON.stringify(u.expected,uv.jsonStringifyReplacer)}`;break;case pv.unrecognized_keys:Wt=`Unrecognized key(s) in object: ${uv.joinValues(u.keys,", ")}`;break;case pv.invalid_union:Wt="Invalid input";break;case pv.invalid_union_discriminator:Wt=`Invalid discriminator value. Expected ${uv.joinValues(u.options)}`;break;case pv.invalid_enum_value:Wt=`Invalid enum value. Expected ${uv.joinValues(u.options)}, received '${u.received}'`;break;case pv.invalid_arguments:Wt="Invalid function arguments";break;case pv.invalid_return_type:Wt="Invalid function return type";break;case pv.invalid_date:Wt="Invalid date";break;case pv.invalid_string:"object"==typeof u.validation?"includes"in u.validation?(Wt=`Invalid input: must include "${u.validation.includes}"`,"number"==typeof u.validation.position&&(Wt=`${Wt} at one or more positions greater than or equal to ${u.validation.position}`)):"startsWith"in u.validation?Wt=`Invalid input: must start with "${u.validation.startsWith}"`:"endsWith"in u.validation?Wt=`Invalid input: must end with "${u.validation.endsWith}"`:uv.assertNever(u.validation):Wt="regex"!==u.validation?`Invalid ${u.validation}`:"Invalid";break;case pv.too_small:Wt="array"===u.type?`Array must contain ${u.exact?"exactly":u.inclusive?"at least":"more than"} ${u.minimum} element(s)`:"string"===u.type?`String must contain ${u.exact?"exactly":u.inclusive?"at least":"over"} ${u.minimum} character(s)`:"number"===u.type?`Number must be ${u.exact?"exactly equal to ":u.inclusive?"greater than or equal to ":"greater than "}${u.minimum}`:"date"===u.type?`Date must be ${u.exact?"exactly equal to ":u.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(u.minimum))}`:"Invalid input";break;case pv.too_big:Wt="array"===u.type?`Array must contain ${u.exact?"exactly":u.inclusive?"at most":"less than"} ${u.maximum} element(s)`:"string"===u.type?`String must contain ${u.exact?"exactly":u.inclusive?"at most":"under"} ${u.maximum} character(s)`:"number"===u.type?`Number must be ${u.exact?"exactly":u.inclusive?"less than or equal to":"less than"} ${u.maximum}`:"bigint"===u.type?`BigInt must be ${u.exact?"exactly":u.inclusive?"less than or equal to":"less than"} ${u.maximum}`:"date"===u.type?`Date must be ${u.exact?"exactly":u.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(u.maximum))}`:"Invalid input";break;case pv.custom:Wt="Invalid input";break;case pv.invalid_intersection_types:Wt="Intersection results could not be merged";break;case pv.not_multiple_of:Wt=`Number must be a multiple of ${u.multipleOf}`;break;case pv.not_finite:Wt="Number must be finite";break;default:Wt=Xe.defaultError,uv.assertNever(u)}return{message:Wt}};let fv=errorMap;function getErrorMap(){return fv}const makeIssue=u=>{const{data:Xe,path:Wt,errorMaps:fr,issueData:_r}=u,wr=[...Wt,..._r.path||[]],Ar={..._r,path:wr};if(void 0!==_r.message)return{..._r,path:wr,message:_r.message};let Kr="";const In=fr.filter((u=>!!u)).slice().reverse();for(const u of In)Kr=u(Ar,{data:Xe,defaultError:Kr}).message;return{..._r,path:wr,message:Kr}};function addIssueToContext(u,Xe){const Wt=getErrorMap(),fr=makeIssue({issueData:Xe,data:u.data,path:u.path,errorMaps:[u.common.contextualErrorMap,u.schemaErrorMap,Wt,Wt===errorMap?void 0:errorMap].filter((u=>!!u))});u.common.issues.push(fr)}class ParseStatus{constructor(){this.value="valid"}dirty(){"valid"===this.value&&(this.value="dirty")}abort(){"aborted"!==this.value&&(this.value="aborted")}static mergeArray(u,Xe){const Wt=[];for(const fr of Xe){if("aborted"===fr.status)return mv;"dirty"===fr.status&&u.dirty(),Wt.push(fr.value)}return{status:u.value,value:Wt}}static async mergeObjectAsync(u,Xe){const Wt=[];for(const u of Xe){const Xe=await u.key,fr=await u.value;Wt.push({key:Xe,value:fr})}return ParseStatus.mergeObjectSync(u,Wt)}static mergeObjectSync(u,Xe){const Wt={};for(const fr of Xe){const{key:Xe,value:_r}=fr;if("aborted"===Xe.status)return mv;if("aborted"===_r.status)return mv;"dirty"===Xe.status&&u.dirty(),"dirty"===_r.status&&u.dirty(),"__proto__"===Xe.value||void 0===_r.value&&!fr.alwaysSet||(Wt[Xe.value]=_r.value)}return{status:u.value,value:Wt}}}const mv=Object.freeze({status:"aborted"}),DIRTY=u=>({status:"dirty",value:u}),OK=u=>({status:"valid",value:u}),isAborted=u=>"aborted"===u.status,isDirty=u=>"dirty"===u.status,isValid=u=>"valid"===u.status,isAsync=u=>"undefined"!=typeof Promise&&u instanceof Promise;function __classPrivateFieldGet(u,Xe,Wt,fr){if("a"===Wt&&!fr)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof Xe?u!==Xe||!fr:!Xe.has(u))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===Wt?fr:"a"===Wt?fr.call(u):fr?fr.value:Xe.get(u)}function __classPrivateFieldSet(u,Xe,Wt,fr,_r){if("m"===fr)throw new TypeError("Private method is not writable");if("a"===fr&&!_r)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof Xe?u!==Xe||!_r:!Xe.has(u))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===fr?_r.call(u,Wt):_r?_r.value=Wt:Xe.set(u,Wt),Wt}var gv,yv,_v;"function"==typeof SuppressedError&&SuppressedError,function(u){u.errToObj=u=>"string"==typeof u?{message:u}:u||{},u.toString=u=>"string"==typeof u?u:null==u?void 0:u.message}(gv||(gv={}));class ParseInputLazyPath{constructor(u,Xe,Wt,fr){this._cachedPath=[],this.parent=u,this.data=Xe,this._path=Wt,this._key=fr}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const handleResult=(u,Xe)=>{if(isValid(Xe))return{success:!0,data:Xe.value};if(!u.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const Xe=new ZodError(u.common.issues);return this._error=Xe,this._error}}};function processCreateParams(u){if(!u)return{};const{errorMap:Xe,invalid_type_error:Wt,required_error:fr,description:_r}=u;if(Xe&&(Wt||fr))throw new Error('Can\'t use "invalid_type_error" or "required_error" in conjunction with custom error map.');if(Xe)return{errorMap:Xe,description:_r};return{errorMap:(Xe,_r)=>{var wr,Ar;const{message:Kr}=u;return"invalid_enum_value"===Xe.code?{message:null!=Kr?Kr:_r.defaultError}:void 0===_r.data?{message:null!==(wr=null!=Kr?Kr:fr)&&void 0!==wr?wr:_r.defaultError}:"invalid_type"!==Xe.code?{message:_r.defaultError}:{message:null!==(Ar=null!=Kr?Kr:Wt)&&void 0!==Ar?Ar:_r.defaultError}},description:_r}}class ZodType{constructor(u){this.spa=this.safeParseAsync,this._def=u,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(u){return getParsedType(u.data)}_getOrReturnCtx(u,Xe){return Xe||{common:u.parent.common,data:u.data,parsedType:getParsedType(u.data),schemaErrorMap:this._def.errorMap,path:u.path,parent:u.parent}}_processInputParams(u){return{status:new ParseStatus,ctx:{common:u.parent.common,data:u.data,parsedType:getParsedType(u.data),schemaErrorMap:this._def.errorMap,path:u.path,parent:u.parent}}}_parseSync(u){const Xe=this._parse(u);if(isAsync(Xe))throw new Error("Synchronous parse encountered promise.");return Xe}_parseAsync(u){const Xe=this._parse(u);return Promise.resolve(Xe)}parse(u,Xe){const Wt=this.safeParse(u,Xe);if(Wt.success)return Wt.data;throw Wt.error}safeParse(u,Xe){var Wt;const fr={common:{issues:[],async:null!==(Wt=null==Xe?void 0:Xe.async)&&void 0!==Wt&&Wt,contextualErrorMap:null==Xe?void 0:Xe.errorMap},path:(null==Xe?void 0:Xe.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:u,parsedType:getParsedType(u)},_r=this._parseSync({data:u,path:fr.path,parent:fr});return handleResult(fr,_r)}async parseAsync(u,Xe){const Wt=await this.safeParseAsync(u,Xe);if(Wt.success)return Wt.data;throw Wt.error}async safeParseAsync(u,Xe){const Wt={common:{issues:[],contextualErrorMap:null==Xe?void 0:Xe.errorMap,async:!0},path:(null==Xe?void 0:Xe.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:u,parsedType:getParsedType(u)},fr=this._parse({data:u,path:Wt.path,parent:Wt}),_r=await(isAsync(fr)?fr:Promise.resolve(fr));return handleResult(Wt,_r)}refine(u,Xe){const getIssueProperties=u=>"string"==typeof Xe||void 0===Xe?{message:Xe}:"function"==typeof Xe?Xe(u):Xe;return this._refinement(((Xe,Wt)=>{const fr=u(Xe),setError=()=>Wt.addIssue({code:pv.custom,...getIssueProperties(Xe)});return"undefined"!=typeof Promise&&fr instanceof Promise?fr.then((u=>!!u||(setError(),!1))):!!fr||(setError(),!1)}))}refinement(u,Xe){return this._refinement(((Wt,fr)=>!!u(Wt)||(fr.addIssue("function"==typeof Xe?Xe(Wt,fr):Xe),!1)))}_refinement(u){return new ZodEffects({schema:this,typeName:Rv.ZodEffects,effect:{type:"refinement",refinement:u}})}superRefine(u){return this._refinement(u)}optional(){return ZodOptional.create(this,this._def)}nullable(){return ZodNullable.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return ZodArray.create(this,this._def)}promise(){return ZodPromise.create(this,this._def)}or(u){return ZodUnion.create([this,u],this._def)}and(u){return ZodIntersection.create(this,u,this._def)}transform(u){return new ZodEffects({...processCreateParams(this._def),schema:this,typeName:Rv.ZodEffects,effect:{type:"transform",transform:u}})}default(u){const Xe="function"==typeof u?u:()=>u;return new ZodDefault({...processCreateParams(this._def),innerType:this,defaultValue:Xe,typeName:Rv.ZodDefault})}brand(){return new ZodBranded({typeName:Rv.ZodBranded,type:this,...processCreateParams(this._def)})}catch(u){const Xe="function"==typeof u?u:()=>u;return new ZodCatch({...processCreateParams(this._def),innerType:this,catchValue:Xe,typeName:Rv.ZodCatch})}describe(u){return new(0,this.constructor)({...this._def,description:u})}pipe(u){return ZodPipeline.create(this,u)}readonly(){return ZodReadonly.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const vv=/^c[^\s-]{8,}$/i,bv=/^[0-9a-z]+$/,xv=/^[0-9A-HJKMNP-TV-Z]{26}$/,wv=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,Sv=/^[a-z0-9_-]{21}$/i,kv=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,Av=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i;let Tv;const Ev=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Cv=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,Pv=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Iv="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",Mv=new RegExp(`^${Iv}$`);function timeRegexSource(u){let Xe="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return u.precision?Xe=`${Xe}\\.\\d{${u.precision}}`:null==u.precision&&(Xe=`${Xe}(\\.\\d+)?`),Xe}function datetimeRegex(u){let Xe=`${Iv}T${timeRegexSource(u)}`;const Wt=[];return Wt.push(u.local?"Z?":"Z"),u.offset&&Wt.push("([+-]\\d{2}:?\\d{2})"),Xe=`${Xe}(${Wt.join("|")})`,new RegExp(`^${Xe}$`)}class ZodString extends ZodType{_parse(u){this._def.coerce&&(u.data=String(u.data));if(this._getType(u)!==hv.string){const Xe=this._getOrReturnCtx(u);return addIssueToContext(Xe,{code:pv.invalid_type,expected:hv.string,received:Xe.parsedType}),mv}const Xe=new ParseStatus;let Wt;for(const wr of this._def.checks)if("min"===wr.kind)u.data.length<wr.value&&(Wt=this._getOrReturnCtx(u,Wt),addIssueToContext(Wt,{code:pv.too_small,minimum:wr.value,type:"string",inclusive:!0,exact:!1,message:wr.message}),Xe.dirty());else if("max"===wr.kind)u.data.length>wr.value&&(Wt=this._getOrReturnCtx(u,Wt),addIssueToContext(Wt,{code:pv.too_big,maximum:wr.value,type:"string",inclusive:!0,exact:!1,message:wr.message}),Xe.dirty());else if("length"===wr.kind){const fr=u.data.length>wr.value,_r=u.data.length<wr.value;(fr||_r)&&(Wt=this._getOrReturnCtx(u,Wt),fr?addIssueToContext(Wt,{code:pv.too_big,maximum:wr.value,type:"string",inclusive:!0,exact:!0,message:wr.message}):_r&&addIssueToContext(Wt,{code:pv.too_small,minimum:wr.value,type:"string",inclusive:!0,exact:!0,message:wr.message}),Xe.dirty())}else if("email"===wr.kind)Av.test(u.data)||(Wt=this._getOrReturnCtx(u,Wt),addIssueToContext(Wt,{validation:"email",code:pv.invalid_string,message:wr.message}),Xe.dirty());else if("emoji"===wr.kind)Tv||(Tv=new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),Tv.test(u.data)||(Wt=this._getOrReturnCtx(u,Wt),addIssueToContext(Wt,{validation:"emoji",code:pv.invalid_string,message:wr.message}),Xe.dirty());else if("uuid"===wr.kind)wv.test(u.data)||(Wt=this._getOrReturnCtx(u,Wt),addIssueToContext(Wt,{validation:"uuid",code:pv.invalid_string,message:wr.message}),Xe.dirty());else if("nanoid"===wr.kind)Sv.test(u.data)||(Wt=this._getOrReturnCtx(u,Wt),addIssueToContext(Wt,{validation:"nanoid",code:pv.invalid_string,message:wr.message}),Xe.dirty());else if("cuid"===wr.kind)vv.test(u.data)||(Wt=this._getOrReturnCtx(u,Wt),addIssueToContext(Wt,{validation:"cuid",code:pv.invalid_string,message:wr.message}),Xe.dirty());else if("cuid2"===wr.kind)bv.test(u.data)||(Wt=this._getOrReturnCtx(u,Wt),addIssueToContext(Wt,{validation:"cuid2",code:pv.invalid_string,message:wr.message}),Xe.dirty());else if("ulid"===wr.kind)xv.test(u.data)||(Wt=this._getOrReturnCtx(u,Wt),addIssueToContext(Wt,{validation:"ulid",code:pv.invalid_string,message:wr.message}),Xe.dirty());else if("url"===wr.kind)try{new URL(u.data)}catch(fr){Wt=this._getOrReturnCtx(u,Wt),addIssueToContext(Wt,{validation:"url",code:pv.invalid_string,message:wr.message}),Xe.dirty()}else if("regex"===wr.kind){wr.regex.lastIndex=0;wr.regex.test(u.data)||(Wt=this._getOrReturnCtx(u,Wt),addIssueToContext(Wt,{validation:"regex",code:pv.invalid_string,message:wr.message}),Xe.dirty())}else if("trim"===wr.kind)u.data=u.data.trim();else if("includes"===wr.kind)u.data.includes(wr.value,wr.position)||(Wt=this._getOrReturnCtx(u,Wt),addIssueToContext(Wt,{code:pv.invalid_string,validation:{includes:wr.value,position:wr.position},message:wr.message}),Xe.dirty());else if("toLowerCase"===wr.kind)u.data=u.data.toLowerCase();else if("toUpperCase"===wr.kind)u.data=u.data.toUpperCase();else if("startsWith"===wr.kind)u.data.startsWith(wr.value)||(Wt=this._getOrReturnCtx(u,Wt),addIssueToContext(Wt,{code:pv.invalid_string,validation:{startsWith:wr.value},message:wr.message}),Xe.dirty());else if("endsWith"===wr.kind)u.data.endsWith(wr.value)||(Wt=this._getOrReturnCtx(u,Wt),addIssueToContext(Wt,{code:pv.invalid_string,validation:{endsWith:wr.value},message:wr.message}),Xe.dirty());else if("datetime"===wr.kind){datetimeRegex(wr).test(u.data)||(Wt=this._getOrReturnCtx(u,Wt),addIssueToContext(Wt,{code:pv.invalid_string,validation:"datetime",message:wr.message}),Xe.dirty())}else if("date"===wr.kind){Mv.test(u.data)||(Wt=this._getOrReturnCtx(u,Wt),addIssueToContext(Wt,{code:pv.invalid_string,validation:"date",message:wr.message}),Xe.dirty())}else if("time"===wr.kind){new RegExp(`^${timeRegexSource(wr)}$`).test(u.data)||(Wt=this._getOrReturnCtx(u,Wt),addIssueToContext(Wt,{code:pv.invalid_string,validation:"time",message:wr.message}),Xe.dirty())}else"duration"===wr.kind?kv.test(u.data)||(Wt=this._getOrReturnCtx(u,Wt),addIssueToContext(Wt,{validation:"duration",code:pv.invalid_string,message:wr.message}),Xe.dirty()):"ip"===wr.kind?(fr=u.data,("v4"!==(_r=wr.version)&&_r||!Ev.test(fr))&&("v6"!==_r&&_r||!Cv.test(fr))&&(Wt=this._getOrReturnCtx(u,Wt),addIssueToContext(Wt,{validation:"ip",code:pv.invalid_string,message:wr.message}),Xe.dirty())):"base64"===wr.kind?Pv.test(u.data)||(Wt=this._getOrReturnCtx(u,Wt),addIssueToContext(Wt,{validation:"base64",code:pv.invalid_string,message:wr.message}),Xe.dirty()):uv.assertNever(wr);var fr,_r;return{status:Xe.value,value:u.data}}_regex(u,Xe,Wt){return this.refinement((Xe=>u.test(Xe)),{validation:Xe,code:pv.invalid_string,...gv.errToObj(Wt)})}_addCheck(u){return new ZodString({...this._def,checks:[...this._def.checks,u]})}email(u){return this._addCheck({kind:"email",...gv.errToObj(u)})}url(u){return this._addCheck({kind:"url",...gv.errToObj(u)})}emoji(u){return this._addCheck({kind:"emoji",...gv.errToObj(u)})}uuid(u){return this._addCheck({kind:"uuid",...gv.errToObj(u)})}nanoid(u){return this._addCheck({kind:"nanoid",...gv.errToObj(u)})}cuid(u){return this._addCheck({kind:"cuid",...gv.errToObj(u)})}cuid2(u){return this._addCheck({kind:"cuid2",...gv.errToObj(u)})}ulid(u){return this._addCheck({kind:"ulid",...gv.errToObj(u)})}base64(u){return this._addCheck({kind:"base64",...gv.errToObj(u)})}ip(u){return this._addCheck({kind:"ip",...gv.errToObj(u)})}datetime(u){var Xe,Wt;return"string"==typeof u?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:u}):this._addCheck({kind:"datetime",precision:void 0===(null==u?void 0:u.precision)?null:null==u?void 0:u.precision,offset:null!==(Xe=null==u?void 0:u.offset)&&void 0!==Xe&&Xe,local:null!==(Wt=null==u?void 0:u.local)&&void 0!==Wt&&Wt,...gv.errToObj(null==u?void 0:u.message)})}date(u){return this._addCheck({kind:"date",message:u})}time(u){return"string"==typeof u?this._addCheck({kind:"time",precision:null,message:u}):this._addCheck({kind:"time",precision:void 0===(null==u?void 0:u.precision)?null:null==u?void 0:u.precision,...gv.errToObj(null==u?void 0:u.message)})}duration(u){return this._addCheck({kind:"duration",...gv.errToObj(u)})}regex(u,Xe){return this._addCheck({kind:"regex",regex:u,...gv.errToObj(Xe)})}includes(u,Xe){return this._addCheck({kind:"includes",value:u,position:null==Xe?void 0:Xe.position,...gv.errToObj(null==Xe?void 0:Xe.message)})}startsWith(u,Xe){return this._addCheck({kind:"startsWith",value:u,...gv.errToObj(Xe)})}endsWith(u,Xe){return this._addCheck({kind:"endsWith",value:u,...gv.errToObj(Xe)})}min(u,Xe){return this._addCheck({kind:"min",value:u,...gv.errToObj(Xe)})}max(u,Xe){return this._addCheck({kind:"max",value:u,...gv.errToObj(Xe)})}length(u,Xe){return this._addCheck({kind:"length",value:u,...gv.errToObj(Xe)})}nonempty(u){return this.min(1,gv.errToObj(u))}trim(){return new ZodString({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new ZodString({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new ZodString({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find((u=>"datetime"===u.kind))}get isDate(){return!!this._def.checks.find((u=>"date"===u.kind))}get isTime(){return!!this._def.checks.find((u=>"time"===u.kind))}get isDuration(){return!!this._def.checks.find((u=>"duration"===u.kind))}get isEmail(){return!!this._def.checks.find((u=>"email"===u.kind))}get isURL(){return!!this._def.checks.find((u=>"url"===u.kind))}get isEmoji(){return!!this._def.checks.find((u=>"emoji"===u.kind))}get isUUID(){return!!this._def.checks.find((u=>"uuid"===u.kind))}get isNANOID(){return!!this._def.checks.find((u=>"nanoid"===u.kind))}get isCUID(){return!!this._def.checks.find((u=>"cuid"===u.kind))}get isCUID2(){return!!this._def.checks.find((u=>"cuid2"===u.kind))}get isULID(){return!!this._def.checks.find((u=>"ulid"===u.kind))}get isIP(){return!!this._def.checks.find((u=>"ip"===u.kind))}get isBase64(){return!!this._def.checks.find((u=>"base64"===u.kind))}get minLength(){let u=null;for(const Xe of this._def.checks)"min"===Xe.kind&&(null===u||Xe.value>u)&&(u=Xe.value);return u}get maxLength(){let u=null;for(const Xe of this._def.checks)"max"===Xe.kind&&(null===u||Xe.value<u)&&(u=Xe.value);return u}}function floatSafeRemainder(u,Xe){const Wt=(u.toString().split(".")[1]||"").length,fr=(Xe.toString().split(".")[1]||"").length,_r=Wt>fr?Wt:fr;return parseInt(u.toFixed(_r).replace(".",""))%parseInt(Xe.toFixed(_r).replace(".",""))/Math.pow(10,_r)}ZodString.create=u=>{var Xe;return new ZodString({checks:[],typeName:Rv.ZodString,coerce:null!==(Xe=null==u?void 0:u.coerce)&&void 0!==Xe&&Xe,...processCreateParams(u)})};class ZodNumber extends ZodType{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(u){this._def.coerce&&(u.data=Number(u.data));if(this._getType(u)!==hv.number){const Xe=this._getOrReturnCtx(u);return addIssueToContext(Xe,{code:pv.invalid_type,expected:hv.number,received:Xe.parsedType}),mv}let Xe;const Wt=new ParseStatus;for(const fr of this._def.checks)if("int"===fr.kind)uv.isInteger(u.data)||(Xe=this._getOrReturnCtx(u,Xe),addIssueToContext(Xe,{code:pv.invalid_type,expected:"integer",received:"float",message:fr.message}),Wt.dirty());else if("min"===fr.kind){(fr.inclusive?u.data<fr.value:u.data<=fr.value)&&(Xe=this._getOrReturnCtx(u,Xe),addIssueToContext(Xe,{code:pv.too_small,minimum:fr.value,type:"number",inclusive:fr.inclusive,exact:!1,message:fr.message}),Wt.dirty())}else if("max"===fr.kind){(fr.inclusive?u.data>fr.value:u.data>=fr.value)&&(Xe=this._getOrReturnCtx(u,Xe),addIssueToContext(Xe,{code:pv.too_big,maximum:fr.value,type:"number",inclusive:fr.inclusive,exact:!1,message:fr.message}),Wt.dirty())}else"multipleOf"===fr.kind?0!==floatSafeRemainder(u.data,fr.value)&&(Xe=this._getOrReturnCtx(u,Xe),addIssueToContext(Xe,{code:pv.not_multiple_of,multipleOf:fr.value,message:fr.message}),Wt.dirty()):"finite"===fr.kind?Number.isFinite(u.data)||(Xe=this._getOrReturnCtx(u,Xe),addIssueToContext(Xe,{code:pv.not_finite,message:fr.message}),Wt.dirty()):uv.assertNever(fr);return{status:Wt.value,value:u.data}}gte(u,Xe){return this.setLimit("min",u,!0,gv.toString(Xe))}gt(u,Xe){return this.setLimit("min",u,!1,gv.toString(Xe))}lte(u,Xe){return this.setLimit("max",u,!0,gv.toString(Xe))}lt(u,Xe){return this.setLimit("max",u,!1,gv.toString(Xe))}setLimit(u,Xe,Wt,fr){return new ZodNumber({...this._def,checks:[...this._def.checks,{kind:u,value:Xe,inclusive:Wt,message:gv.toString(fr)}]})}_addCheck(u){return new ZodNumber({...this._def,checks:[...this._def.checks,u]})}int(u){return this._addCheck({kind:"int",message:gv.toString(u)})}positive(u){return this._addCheck({kind:"min",value:0,inclusive:!1,message:gv.toString(u)})}negative(u){return this._addCheck({kind:"max",value:0,inclusive:!1,message:gv.toString(u)})}nonpositive(u){return this._addCheck({kind:"max",value:0,inclusive:!0,message:gv.toString(u)})}nonnegative(u){return this._addCheck({kind:"min",value:0,inclusive:!0,message:gv.toString(u)})}multipleOf(u,Xe){return this._addCheck({kind:"multipleOf",value:u,message:gv.toString(Xe)})}finite(u){return this._addCheck({kind:"finite",message:gv.toString(u)})}safe(u){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:gv.toString(u)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:gv.toString(u)})}get minValue(){let u=null;for(const Xe of this._def.checks)"min"===Xe.kind&&(null===u||Xe.value>u)&&(u=Xe.value);return u}get maxValue(){let u=null;for(const Xe of this._def.checks)"max"===Xe.kind&&(null===u||Xe.value<u)&&(u=Xe.value);return u}get isInt(){return!!this._def.checks.find((u=>"int"===u.kind||"multipleOf"===u.kind&&uv.isInteger(u.value)))}get isFinite(){let u=null,Xe=null;for(const Wt of this._def.checks){if("finite"===Wt.kind||"int"===Wt.kind||"multipleOf"===Wt.kind)return!0;"min"===Wt.kind?(null===Xe||Wt.value>Xe)&&(Xe=Wt.value):"max"===Wt.kind&&(null===u||Wt.value<u)&&(u=Wt.value)}return Number.isFinite(Xe)&&Number.isFinite(u)}}ZodNumber.create=u=>new ZodNumber({checks:[],typeName:Rv.ZodNumber,coerce:(null==u?void 0:u.coerce)||!1,...processCreateParams(u)});class ZodBigInt extends ZodType{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(u){this._def.coerce&&(u.data=BigInt(u.data));if(this._getType(u)!==hv.bigint){const Xe=this._getOrReturnCtx(u);return addIssueToContext(Xe,{code:pv.invalid_type,expected:hv.bigint,received:Xe.parsedType}),mv}let Xe;const Wt=new ParseStatus;for(const fr of this._def.checks)if("min"===fr.kind){(fr.inclusive?u.data<fr.value:u.data<=fr.value)&&(Xe=this._getOrReturnCtx(u,Xe),addIssueToContext(Xe,{code:pv.too_small,type:"bigint",minimum:fr.value,inclusive:fr.inclusive,message:fr.message}),Wt.dirty())}else if("max"===fr.kind){(fr.inclusive?u.data>fr.value:u.data>=fr.value)&&(Xe=this._getOrReturnCtx(u,Xe),addIssueToContext(Xe,{code:pv.too_big,type:"bigint",maximum:fr.value,inclusive:fr.inclusive,message:fr.message}),Wt.dirty())}else"multipleOf"===fr.kind?u.data%fr.value!==BigInt(0)&&(Xe=this._getOrReturnCtx(u,Xe),addIssueToContext(Xe,{code:pv.not_multiple_of,multipleOf:fr.value,message:fr.message}),Wt.dirty()):uv.assertNever(fr);return{status:Wt.value,value:u.data}}gte(u,Xe){return this.setLimit("min",u,!0,gv.toString(Xe))}gt(u,Xe){return this.setLimit("min",u,!1,gv.toString(Xe))}lte(u,Xe){return this.setLimit("max",u,!0,gv.toString(Xe))}lt(u,Xe){return this.setLimit("max",u,!1,gv.toString(Xe))}setLimit(u,Xe,Wt,fr){return new ZodBigInt({...this._def,checks:[...this._def.checks,{kind:u,value:Xe,inclusive:Wt,message:gv.toString(fr)}]})}_addCheck(u){return new ZodBigInt({...this._def,checks:[...this._def.checks,u]})}positive(u){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:gv.toString(u)})}negative(u){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:gv.toString(u)})}nonpositive(u){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:gv.toString(u)})}nonnegative(u){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:gv.toString(u)})}multipleOf(u,Xe){return this._addCheck({kind:"multipleOf",value:u,message:gv.toString(Xe)})}get minValue(){let u=null;for(const Xe of this._def.checks)"min"===Xe.kind&&(null===u||Xe.value>u)&&(u=Xe.value);return u}get maxValue(){let u=null;for(const Xe of this._def.checks)"max"===Xe.kind&&(null===u||Xe.value<u)&&(u=Xe.value);return u}}ZodBigInt.create=u=>{var Xe;return new ZodBigInt({checks:[],typeName:Rv.ZodBigInt,coerce:null!==(Xe=null==u?void 0:u.coerce)&&void 0!==Xe&&Xe,...processCreateParams(u)})};class ZodBoolean extends ZodType{_parse(u){this._def.coerce&&(u.data=Boolean(u.data));if(this._getType(u)!==hv.boolean){const Xe=this._getOrReturnCtx(u);return addIssueToContext(Xe,{code:pv.invalid_type,expected:hv.boolean,received:Xe.parsedType}),mv}return OK(u.data)}}ZodBoolean.create=u=>new ZodBoolean({typeName:Rv.ZodBoolean,coerce:(null==u?void 0:u.coerce)||!1,...processCreateParams(u)});class ZodDate extends ZodType{_parse(u){this._def.coerce&&(u.data=new Date(u.data));if(this._getType(u)!==hv.date){const Xe=this._getOrReturnCtx(u);return addIssueToContext(Xe,{code:pv.invalid_type,expected:hv.date,received:Xe.parsedType}),mv}if(isNaN(u.data.getTime())){return addIssueToContext(this._getOrReturnCtx(u),{code:pv.invalid_date}),mv}const Xe=new ParseStatus;let Wt;for(const fr of this._def.checks)"min"===fr.kind?u.data.getTime()<fr.value&&(Wt=this._getOrReturnCtx(u,Wt),addIssueToContext(Wt,{code:pv.too_small,message:fr.message,inclusive:!0,exact:!1,minimum:fr.value,type:"date"}),Xe.dirty()):"max"===fr.kind?u.data.getTime()>fr.value&&(Wt=this._getOrReturnCtx(u,Wt),addIssueToContext(Wt,{code:pv.too_big,message:fr.message,inclusive:!0,exact:!1,maximum:fr.value,type:"date"}),Xe.dirty()):uv.assertNever(fr);return{status:Xe.value,value:new Date(u.data.getTime())}}_addCheck(u){return new ZodDate({...this._def,checks:[...this._def.checks,u]})}min(u,Xe){return this._addCheck({kind:"min",value:u.getTime(),message:gv.toString(Xe)})}max(u,Xe){return this._addCheck({kind:"max",value:u.getTime(),message:gv.toString(Xe)})}get minDate(){let u=null;for(const Xe of this._def.checks)"min"===Xe.kind&&(null===u||Xe.value>u)&&(u=Xe.value);return null!=u?new Date(u):null}get maxDate(){let u=null;for(const Xe of this._def.checks)"max"===Xe.kind&&(null===u||Xe.value<u)&&(u=Xe.value);return null!=u?new Date(u):null}}ZodDate.create=u=>new ZodDate({checks:[],coerce:(null==u?void 0:u.coerce)||!1,typeName:Rv.ZodDate,...processCreateParams(u)});class ZodSymbol extends ZodType{_parse(u){if(this._getType(u)!==hv.symbol){const Xe=this._getOrReturnCtx(u);return addIssueToContext(Xe,{code:pv.invalid_type,expected:hv.symbol,received:Xe.parsedType}),mv}return OK(u.data)}}ZodSymbol.create=u=>new ZodSymbol({typeName:Rv.ZodSymbol,...processCreateParams(u)});class ZodUndefined extends ZodType{_parse(u){if(this._getType(u)!==hv.undefined){const Xe=this._getOrReturnCtx(u);return addIssueToContext(Xe,{code:pv.invalid_type,expected:hv.undefined,received:Xe.parsedType}),mv}return OK(u.data)}}ZodUndefined.create=u=>new ZodUndefined({typeName:Rv.ZodUndefined,...processCreateParams(u)});class ZodNull extends ZodType{_parse(u){if(this._getType(u)!==hv.null){const Xe=this._getOrReturnCtx(u);return addIssueToContext(Xe,{code:pv.invalid_type,expected:hv.null,received:Xe.parsedType}),mv}return OK(u.data)}}ZodNull.create=u=>new ZodNull({typeName:Rv.ZodNull,...processCreateParams(u)});class ZodAny extends ZodType{constructor(){super(...arguments),this._any=!0}_parse(u){return OK(u.data)}}ZodAny.create=u=>new ZodAny({typeName:Rv.ZodAny,...processCreateParams(u)});class ZodUnknown extends ZodType{constructor(){super(...arguments),this._unknown=!0}_parse(u){return OK(u.data)}}ZodUnknown.create=u=>new ZodUnknown({typeName:Rv.ZodUnknown,...processCreateParams(u)});class ZodNever extends ZodType{_parse(u){const Xe=this._getOrReturnCtx(u);return addIssueToContext(Xe,{code:pv.invalid_type,expected:hv.never,received:Xe.parsedType}),mv}}ZodNever.create=u=>new ZodNever({typeName:Rv.ZodNever,...processCreateParams(u)});class ZodVoid extends ZodType{_parse(u){if(this._getType(u)!==hv.undefined){const Xe=this._getOrReturnCtx(u);return addIssueToContext(Xe,{code:pv.invalid_type,expected:hv.void,received:Xe.parsedType}),mv}return OK(u.data)}}ZodVoid.create=u=>new ZodVoid({typeName:Rv.ZodVoid,...processCreateParams(u)});class ZodArray extends ZodType{_parse(u){const{ctx:Xe,status:Wt}=this._processInputParams(u),fr=this._def;if(Xe.parsedType!==hv.array)return addIssueToContext(Xe,{code:pv.invalid_type,expected:hv.array,received:Xe.parsedType}),mv;if(null!==fr.exactLength){const u=Xe.data.length>fr.exactLength.value,_r=Xe.data.length<fr.exactLength.value;(u||_r)&&(addIssueToContext(Xe,{code:u?pv.too_big:pv.too_small,minimum:_r?fr.exactLength.value:void 0,maximum:u?fr.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:fr.exactLength.message}),Wt.dirty())}if(null!==fr.minLength&&Xe.data.length<fr.minLength.value&&(addIssueToContext(Xe,{code:pv.too_small,minimum:fr.minLength.value,type:"array",inclusive:!0,exact:!1,message:fr.minLength.message}),Wt.dirty()),null!==fr.maxLength&&Xe.data.length>fr.maxLength.value&&(addIssueToContext(Xe,{code:pv.too_big,maximum:fr.maxLength.value,type:"array",inclusive:!0,exact:!1,message:fr.maxLength.message}),Wt.dirty()),Xe.common.async)return Promise.all([...Xe.data].map(((u,Wt)=>fr.type._parseAsync(new ParseInputLazyPath(Xe,u,Xe.path,Wt))))).then((u=>ParseStatus.mergeArray(Wt,u)));const _r=[...Xe.data].map(((u,Wt)=>fr.type._parseSync(new ParseInputLazyPath(Xe,u,Xe.path,Wt))));return ParseStatus.mergeArray(Wt,_r)}get element(){return this._def.type}min(u,Xe){return new ZodArray({...this._def,minLength:{value:u,message:gv.toString(Xe)}})}max(u,Xe){return new ZodArray({...this._def,maxLength:{value:u,message:gv.toString(Xe)}})}length(u,Xe){return new ZodArray({...this._def,exactLength:{value:u,message:gv.toString(Xe)}})}nonempty(u){return this.min(1,u)}}function deepPartialify(u){if(u instanceof ZodObject){const Xe={};for(const Wt in u.shape){const fr=u.shape[Wt];Xe[Wt]=ZodOptional.create(deepPartialify(fr))}return new ZodObject({...u._def,shape:()=>Xe})}return u instanceof ZodArray?new ZodArray({...u._def,type:deepPartialify(u.element)}):u instanceof ZodOptional?ZodOptional.create(deepPartialify(u.unwrap())):u instanceof ZodNullable?ZodNullable.create(deepPartialify(u.unwrap())):u instanceof ZodTuple?ZodTuple.create(u.items.map((u=>deepPartialify(u)))):u}ZodArray.create=(u,Xe)=>new ZodArray({type:u,minLength:null,maxLength:null,exactLength:null,typeName:Rv.ZodArray,...processCreateParams(Xe)});class ZodObject extends ZodType{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(null!==this._cached)return this._cached;const u=this._def.shape(),Xe=uv.objectKeys(u);return this._cached={shape:u,keys:Xe}}_parse(u){if(this._getType(u)!==hv.object){const Xe=this._getOrReturnCtx(u);return addIssueToContext(Xe,{code:pv.invalid_type,expected:hv.object,received:Xe.parsedType}),mv}const{status:Xe,ctx:Wt}=this._processInputParams(u),{shape:fr,keys:_r}=this._getCached(),wr=[];if(!(this._def.catchall instanceof ZodNever&&"strip"===this._def.unknownKeys))for(const u in Wt.data)_r.includes(u)||wr.push(u);const Ar=[];for(const u of _r){const Xe=fr[u],_r=Wt.data[u];Ar.push({key:{status:"valid",value:u},value:Xe._parse(new ParseInputLazyPath(Wt,_r,Wt.path,u)),alwaysSet:u in Wt.data})}if(this._def.catchall instanceof ZodNever){const u=this._def.unknownKeys;if("passthrough"===u)for(const u of wr)Ar.push({key:{status:"valid",value:u},value:{status:"valid",value:Wt.data[u]}});else if("strict"===u)wr.length>0&&(addIssueToContext(Wt,{code:pv.unrecognized_keys,keys:wr}),Xe.dirty());else if("strip"!==u)throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const u=this._def.catchall;for(const Xe of wr){const fr=Wt.data[Xe];Ar.push({key:{status:"valid",value:Xe},value:u._parse(new ParseInputLazyPath(Wt,fr,Wt.path,Xe)),alwaysSet:Xe in Wt.data})}}return Wt.common.async?Promise.resolve().then((async()=>{const u=[];for(const Xe of Ar){const Wt=await Xe.key,fr=await Xe.value;u.push({key:Wt,value:fr,alwaysSet:Xe.alwaysSet})}return u})).then((u=>ParseStatus.mergeObjectSync(Xe,u))):ParseStatus.mergeObjectSync(Xe,Ar)}get shape(){return this._def.shape()}strict(u){return gv.errToObj,new ZodObject({...this._def,unknownKeys:"strict",...void 0!==u?{errorMap:(Xe,Wt)=>{var fr,_r,wr,Ar;const Kr=null!==(wr=null===(_r=(fr=this._def).errorMap)||void 0===_r?void 0:_r.call(fr,Xe,Wt).message)&&void 0!==wr?wr:Wt.defaultError;return"unrecognized_keys"===Xe.code?{message:null!==(Ar=gv.errToObj(u).message)&&void 0!==Ar?Ar:Kr}:{message:Kr}}}:{}})}strip(){return new ZodObject({...this._def,unknownKeys:"strip"})}passthrough(){return new ZodObject({...this._def,unknownKeys:"passthrough"})}extend(u){return new ZodObject({...this._def,shape:()=>({...this._def.shape(),...u})})}merge(u){return new ZodObject({unknownKeys:u._def.unknownKeys,catchall:u._def.catchall,shape:()=>({...this._def.shape(),...u._def.shape()}),typeName:Rv.ZodObject})}setKey(u,Xe){return this.augment({[u]:Xe})}catchall(u){return new ZodObject({...this._def,catchall:u})}pick(u){const Xe={};return uv.objectKeys(u).forEach((Wt=>{u[Wt]&&this.shape[Wt]&&(Xe[Wt]=this.shape[Wt])})),new ZodObject({...this._def,shape:()=>Xe})}omit(u){const Xe={};return uv.objectKeys(this.shape).forEach((Wt=>{u[Wt]||(Xe[Wt]=this.shape[Wt])})),new ZodObject({...this._def,shape:()=>Xe})}deepPartial(){return deepPartialify(this)}partial(u){const Xe={};return uv.objectKeys(this.shape).forEach((Wt=>{const fr=this.shape[Wt];u&&!u[Wt]?Xe[Wt]=fr:Xe[Wt]=fr.optional()})),new ZodObject({...this._def,shape:()=>Xe})}required(u){const Xe={};return uv.objectKeys(this.shape).forEach((Wt=>{if(u&&!u[Wt])Xe[Wt]=this.shape[Wt];else{let u=this.shape[Wt];for(;u instanceof ZodOptional;)u=u._def.innerType;Xe[Wt]=u}})),new ZodObject({...this._def,shape:()=>Xe})}keyof(){return createZodEnum(uv.objectKeys(this.shape))}}ZodObject.create=(u,Xe)=>new ZodObject({shape:()=>u,unknownKeys:"strip",catchall:ZodNever.create(),typeName:Rv.ZodObject,...processCreateParams(Xe)}),ZodObject.strictCreate=(u,Xe)=>new ZodObject({shape:()=>u,unknownKeys:"strict",catchall:ZodNever.create(),typeName:Rv.ZodObject,...processCreateParams(Xe)}),ZodObject.lazycreate=(u,Xe)=>new ZodObject({shape:u,unknownKeys:"strip",catchall:ZodNever.create(),typeName:Rv.ZodObject,...processCreateParams(Xe)});class ZodUnion extends ZodType{_parse(u){const{ctx:Xe}=this._processInputParams(u),Wt=this._def.options;if(Xe.common.async)return Promise.all(Wt.map((async u=>{const Wt={...Xe,common:{...Xe.common,issues:[]},parent:null};return{result:await u._parseAsync({data:Xe.data,path:Xe.path,parent:Wt}),ctx:Wt}}))).then((function handleResults(u){for(const Xe of u)if("valid"===Xe.result.status)return Xe.result;for(const Wt of u)if("dirty"===Wt.result.status)return Xe.common.issues.push(...Wt.ctx.common.issues),Wt.result;const Wt=u.map((u=>new ZodError(u.ctx.common.issues)));return addIssueToContext(Xe,{code:pv.invalid_union,unionErrors:Wt}),mv}));{let u;const fr=[];for(const _r of Wt){const Wt={...Xe,common:{...Xe.common,issues:[]},parent:null},wr=_r._parseSync({data:Xe.data,path:Xe.path,parent:Wt});if("valid"===wr.status)return wr;"dirty"!==wr.status||u||(u={result:wr,ctx:Wt}),Wt.common.issues.length&&fr.push(Wt.common.issues)}if(u)return Xe.common.issues.push(...u.ctx.common.issues),u.result;const _r=fr.map((u=>new ZodError(u)));return addIssueToContext(Xe,{code:pv.invalid_union,unionErrors:_r}),mv}}get options(){return this._def.options}}ZodUnion.create=(u,Xe)=>new ZodUnion({options:u,typeName:Rv.ZodUnion,...processCreateParams(Xe)});function mergeValues(u,Xe){const Wt=getParsedType(u),fr=getParsedType(Xe);if(u===Xe)return{valid:!0,data:u};if(Wt===hv.object&&fr===hv.object){const Wt=uv.objectKeys(Xe),fr=uv.objectKeys(u).filter((u=>-1!==Wt.indexOf(u))),_r={...u,...Xe};for(const Wt of fr){const fr=mergeValues(u[Wt],Xe[Wt]);if(!fr.valid)return{valid:!1};_r[Wt]=fr.data}return{valid:!0,data:_r}}if(Wt===hv.array&&fr===hv.array){if(u.length!==Xe.length)return{valid:!1};const Wt=[];for(let fr=0;fr<u.length;fr++){const _r=mergeValues(u[fr],Xe[fr]);if(!_r.valid)return{valid:!1};Wt.push(_r.data)}return{valid:!0,data:Wt}}return Wt===hv.date&&fr===hv.date&&+u==+Xe?{valid:!0,data:u}:{valid:!1}}class ZodIntersection extends ZodType{_parse(u){const{status:Xe,ctx:Wt}=this._processInputParams(u),handleParsed=(u,fr)=>{if(isAborted(u)||isAborted(fr))return mv;const _r=mergeValues(u.value,fr.value);return _r.valid?((isDirty(u)||isDirty(fr))&&Xe.dirty(),{status:Xe.value,value:_r.data}):(addIssueToContext(Wt,{code:pv.invalid_intersection_types}),mv)};return Wt.common.async?Promise.all([this._def.left._parseAsync({data:Wt.data,path:Wt.path,parent:Wt}),this._def.right._parseAsync({data:Wt.data,path:Wt.path,parent:Wt})]).then((([u,Xe])=>handleParsed(u,Xe))):handleParsed(this._def.left._parseSync({data:Wt.data,path:Wt.path,parent:Wt}),this._def.right._parseSync({data:Wt.data,path:Wt.path,parent:Wt}))}}ZodIntersection.create=(u,Xe,Wt)=>new ZodIntersection({left:u,right:Xe,typeName:Rv.ZodIntersection,...processCreateParams(Wt)});class ZodTuple extends ZodType{_parse(u){const{status:Xe,ctx:Wt}=this._processInputParams(u);if(Wt.parsedType!==hv.array)return addIssueToContext(Wt,{code:pv.invalid_type,expected:hv.array,received:Wt.parsedType}),mv;if(Wt.data.length<this._def.items.length)return addIssueToContext(Wt,{code:pv.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),mv;!this._def.rest&&Wt.data.length>this._def.items.length&&(addIssueToContext(Wt,{code:pv.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Xe.dirty());const fr=[...Wt.data].map(((u,Xe)=>{const fr=this._def.items[Xe]||this._def.rest;return fr?fr._parse(new ParseInputLazyPath(Wt,u,Wt.path,Xe)):null})).filter((u=>!!u));return Wt.common.async?Promise.all(fr).then((u=>ParseStatus.mergeArray(Xe,u))):ParseStatus.mergeArray(Xe,fr)}get items(){return this._def.items}rest(u){return new ZodTuple({...this._def,rest:u})}}ZodTuple.create=(u,Xe)=>{if(!Array.isArray(u))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new ZodTuple({items:u,typeName:Rv.ZodTuple,rest:null,...processCreateParams(Xe)})};class ZodMap extends ZodType{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(u){const{status:Xe,ctx:Wt}=this._processInputParams(u);if(Wt.parsedType!==hv.map)return addIssueToContext(Wt,{code:pv.invalid_type,expected:hv.map,received:Wt.parsedType}),mv;const fr=this._def.keyType,_r=this._def.valueType,wr=[...Wt.data.entries()].map((([u,Xe],wr)=>({key:fr._parse(new ParseInputLazyPath(Wt,u,Wt.path,[wr,"key"])),value:_r._parse(new ParseInputLazyPath(Wt,Xe,Wt.path,[wr,"value"]))})));if(Wt.common.async){const u=new Map;return Promise.resolve().then((async()=>{for(const Wt of wr){const fr=await Wt.key,_r=await Wt.value;if("aborted"===fr.status||"aborted"===_r.status)return mv;"dirty"!==fr.status&&"dirty"!==_r.status||Xe.dirty(),u.set(fr.value,_r.value)}return{status:Xe.value,value:u}}))}{const u=new Map;for(const Wt of wr){const fr=Wt.key,_r=Wt.value;if("aborted"===fr.status||"aborted"===_r.status)return mv;"dirty"!==fr.status&&"dirty"!==_r.status||Xe.dirty(),u.set(fr.value,_r.value)}return{status:Xe.value,value:u}}}}ZodMap.create=(u,Xe,Wt)=>new ZodMap({valueType:Xe,keyType:u,typeName:Rv.ZodMap,...processCreateParams(Wt)});class ZodSet extends ZodType{_parse(u){const{status:Xe,ctx:Wt}=this._processInputParams(u);if(Wt.parsedType!==hv.set)return addIssueToContext(Wt,{code:pv.invalid_type,expected:hv.set,received:Wt.parsedType}),mv;const fr=this._def;null!==fr.minSize&&Wt.data.size<fr.minSize.value&&(addIssueToContext(Wt,{code:pv.too_small,minimum:fr.minSize.value,type:"set",inclusive:!0,exact:!1,message:fr.minSize.message}),Xe.dirty()),null!==fr.maxSize&&Wt.data.size>fr.maxSize.value&&(addIssueToContext(Wt,{code:pv.too_big,maximum:fr.maxSize.value,type:"set",inclusive:!0,exact:!1,message:fr.maxSize.message}),Xe.dirty());const _r=this._def.valueType;function finalizeSet(u){const Wt=new Set;for(const fr of u){if("aborted"===fr.status)return mv;"dirty"===fr.status&&Xe.dirty(),Wt.add(fr.value)}return{status:Xe.value,value:Wt}}const wr=[...Wt.data.values()].map(((u,Xe)=>_r._parse(new ParseInputLazyPath(Wt,u,Wt.path,Xe))));return Wt.common.async?Promise.all(wr).then((u=>finalizeSet(u))):finalizeSet(wr)}min(u,Xe){return new ZodSet({...this._def,minSize:{value:u,message:gv.toString(Xe)}})}max(u,Xe){return new ZodSet({...this._def,maxSize:{value:u,message:gv.toString(Xe)}})}size(u,Xe){return this.min(u,Xe).max(u,Xe)}nonempty(u){return this.min(1,u)}}ZodSet.create=(u,Xe)=>new ZodSet({valueType:u,minSize:null,maxSize:null,typeName:Rv.ZodSet,...processCreateParams(Xe)});class ZodLazy extends ZodType{get schema(){return this._def.getter()}_parse(u){const{ctx:Xe}=this._processInputParams(u);return this._def.getter()._parse({data:Xe.data,path:Xe.path,parent:Xe})}}ZodLazy.create=(u,Xe)=>new ZodLazy({getter:u,typeName:Rv.ZodLazy,...processCreateParams(Xe)});class ZodLiteral extends ZodType{_parse(u){if(u.data!==this._def.value){const Xe=this._getOrReturnCtx(u);return addIssueToContext(Xe,{received:Xe.data,code:pv.invalid_literal,expected:this._def.value}),mv}return{status:"valid",value:u.data}}get value(){return this._def.value}}function createZodEnum(u,Xe){return new ZodEnum({values:u,typeName:Rv.ZodEnum,...processCreateParams(Xe)})}ZodLiteral.create=(u,Xe)=>new ZodLiteral({value:u,typeName:Rv.ZodLiteral,...processCreateParams(Xe)});class ZodEnum extends ZodType{constructor(){super(...arguments),yv.set(this,void 0)}_parse(u){if("string"!=typeof u.data){const Xe=this._getOrReturnCtx(u),Wt=this._def.values;return addIssueToContext(Xe,{expected:uv.joinValues(Wt),received:Xe.parsedType,code:pv.invalid_type}),mv}if(__classPrivateFieldGet(this,yv,"f")||__classPrivateFieldSet(this,yv,new Set(this._def.values),"f"),!__classPrivateFieldGet(this,yv,"f").has(u.data)){const Xe=this._getOrReturnCtx(u),Wt=this._def.values;return addIssueToContext(Xe,{received:Xe.data,code:pv.invalid_enum_value,options:Wt}),mv}return OK(u.data)}get options(){return this._def.values}get enum(){const u={};for(const Xe of this._def.values)u[Xe]=Xe;return u}get Values(){const u={};for(const Xe of this._def.values)u[Xe]=Xe;return u}get Enum(){const u={};for(const Xe of this._def.values)u[Xe]=Xe;return u}extract(u,Xe=this._def){return ZodEnum.create(u,{...this._def,...Xe})}exclude(u,Xe=this._def){return ZodEnum.create(this.options.filter((Xe=>!u.includes(Xe))),{...this._def,...Xe})}}yv=new WeakMap,ZodEnum.create=createZodEnum;class ZodNativeEnum extends ZodType{constructor(){super(...arguments),_v.set(this,void 0)}_parse(u){const Xe=uv.getValidEnumValues(this._def.values),Wt=this._getOrReturnCtx(u);if(Wt.parsedType!==hv.string&&Wt.parsedType!==hv.number){const u=uv.objectValues(Xe);return addIssueToContext(Wt,{expected:uv.joinValues(u),received:Wt.parsedType,code:pv.invalid_type}),mv}if(__classPrivateFieldGet(this,_v,"f")||__classPrivateFieldSet(this,_v,new Set(uv.getValidEnumValues(this._def.values)),"f"),!__classPrivateFieldGet(this,_v,"f").has(u.data)){const u=uv.objectValues(Xe);return addIssueToContext(Wt,{received:Wt.data,code:pv.invalid_enum_value,options:u}),mv}return OK(u.data)}get enum(){return this._def.values}}_v=new WeakMap,ZodNativeEnum.create=(u,Xe)=>new ZodNativeEnum({values:u,typeName:Rv.ZodNativeEnum,...processCreateParams(Xe)});class ZodPromise extends ZodType{unwrap(){return this._def.type}_parse(u){const{ctx:Xe}=this._processInputParams(u);if(Xe.parsedType!==hv.promise&&!1===Xe.common.async)return addIssueToContext(Xe,{code:pv.invalid_type,expected:hv.promise,received:Xe.parsedType}),mv;const Wt=Xe.parsedType===hv.promise?Xe.data:Promise.resolve(Xe.data);return OK(Wt.then((u=>this._def.type.parseAsync(u,{path:Xe.path,errorMap:Xe.common.contextualErrorMap}))))}}ZodPromise.create=(u,Xe)=>new ZodPromise({type:u,typeName:Rv.ZodPromise,...processCreateParams(Xe)});class ZodEffects extends ZodType{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Rv.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(u){const{status:Xe,ctx:Wt}=this._processInputParams(u),fr=this._def.effect||null,_r={addIssue:u=>{addIssueToContext(Wt,u),u.fatal?Xe.abort():Xe.dirty()},get path(){return Wt.path}};if(_r.addIssue=_r.addIssue.bind(_r),"preprocess"===fr.type){const u=fr.transform(Wt.data,_r);if(Wt.common.async)return Promise.resolve(u).then((async u=>{if("aborted"===Xe.value)return mv;const fr=await this._def.schema._parseAsync({data:u,path:Wt.path,parent:Wt});return"aborted"===fr.status?mv:"dirty"===fr.status||"dirty"===Xe.value?DIRTY(fr.value):fr}));{if("aborted"===Xe.value)return mv;const fr=this._def.schema._parseSync({data:u,path:Wt.path,parent:Wt});return"aborted"===fr.status?mv:"dirty"===fr.status||"dirty"===Xe.value?DIRTY(fr.value):fr}}if("refinement"===fr.type){const executeRefinement=u=>{const Xe=fr.refinement(u,_r);if(Wt.common.async)return Promise.resolve(Xe);if(Xe instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return u};if(!1===Wt.common.async){const u=this._def.schema._parseSync({data:Wt.data,path:Wt.path,parent:Wt});return"aborted"===u.status?mv:("dirty"===u.status&&Xe.dirty(),executeRefinement(u.value),{status:Xe.value,value:u.value})}return this._def.schema._parseAsync({data:Wt.data,path:Wt.path,parent:Wt}).then((u=>"aborted"===u.status?mv:("dirty"===u.status&&Xe.dirty(),executeRefinement(u.value).then((()=>({status:Xe.value,value:u.value}))))))}if("transform"===fr.type){if(!1===Wt.common.async){const u=this._def.schema._parseSync({data:Wt.data,path:Wt.path,parent:Wt});if(!isValid(u))return u;const wr=fr.transform(u.value,_r);if(wr instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:Xe.value,value:wr}}return this._def.schema._parseAsync({data:Wt.data,path:Wt.path,parent:Wt}).then((u=>isValid(u)?Promise.resolve(fr.transform(u.value,_r)).then((u=>({status:Xe.value,value:u}))):u))}uv.assertNever(fr)}}ZodEffects.create=(u,Xe,Wt)=>new ZodEffects({schema:u,typeName:Rv.ZodEffects,effect:Xe,...processCreateParams(Wt)}),ZodEffects.createWithPreprocess=(u,Xe,Wt)=>new ZodEffects({schema:Xe,effect:{type:"preprocess",transform:u},typeName:Rv.ZodEffects,...processCreateParams(Wt)});class ZodOptional extends ZodType{_parse(u){return this._getType(u)===hv.undefined?OK(void 0):this._def.innerType._parse(u)}unwrap(){return this._def.innerType}}ZodOptional.create=(u,Xe)=>new ZodOptional({innerType:u,typeName:Rv.ZodOptional,...processCreateParams(Xe)});class ZodNullable extends ZodType{_parse(u){return this._getType(u)===hv.null?OK(null):this._def.innerType._parse(u)}unwrap(){return this._def.innerType}}ZodNullable.create=(u,Xe)=>new ZodNullable({innerType:u,typeName:Rv.ZodNullable,...processCreateParams(Xe)});class ZodDefault extends ZodType{_parse(u){const{ctx:Xe}=this._processInputParams(u);let Wt=Xe.data;return Xe.parsedType===hv.undefined&&(Wt=this._def.defaultValue()),this._def.innerType._parse({data:Wt,path:Xe.path,parent:Xe})}removeDefault(){return this._def.innerType}}ZodDefault.create=(u,Xe)=>new ZodDefault({innerType:u,typeName:Rv.ZodDefault,defaultValue:"function"==typeof Xe.default?Xe.default:()=>Xe.default,...processCreateParams(Xe)});class ZodCatch extends ZodType{_parse(u){const{ctx:Xe}=this._processInputParams(u),Wt={...Xe,common:{...Xe.common,issues:[]}},fr=this._def.innerType._parse({data:Wt.data,path:Wt.path,parent:{...Wt}});return isAsync(fr)?fr.then((u=>({status:"valid",value:"valid"===u.status?u.value:this._def.catchValue({get error(){return new ZodError(Wt.common.issues)},input:Wt.data})}))):{status:"valid",value:"valid"===fr.status?fr.value:this._def.catchValue({get error(){return new ZodError(Wt.common.issues)},input:Wt.data})}}removeCatch(){return this._def.innerType}}ZodCatch.create=(u,Xe)=>new ZodCatch({innerType:u,typeName:Rv.ZodCatch,catchValue:"function"==typeof Xe.catch?Xe.catch:()=>Xe.catch,...processCreateParams(Xe)});class ZodNaN extends ZodType{_parse(u){if(this._getType(u)!==hv.nan){const Xe=this._getOrReturnCtx(u);return addIssueToContext(Xe,{code:pv.invalid_type,expected:hv.nan,received:Xe.parsedType}),mv}return{status:"valid",value:u.data}}}ZodNaN.create=u=>new ZodNaN({typeName:Rv.ZodNaN,...processCreateParams(u)});Symbol("zod_brand");class ZodBranded extends ZodType{_parse(u){const{ctx:Xe}=this._processInputParams(u),Wt=Xe.data;return this._def.type._parse({data:Wt,path:Xe.path,parent:Xe})}unwrap(){return this._def.type}}class ZodPipeline extends ZodType{_parse(u){const{status:Xe,ctx:Wt}=this._processInputParams(u);if(Wt.common.async){return(async()=>{const u=await this._def.in._parseAsync({data:Wt.data,path:Wt.path,parent:Wt});return"aborted"===u.status?mv:"dirty"===u.status?(Xe.dirty(),DIRTY(u.value)):this._def.out._parseAsync({data:u.value,path:Wt.path,parent:Wt})})()}{const u=this._def.in._parseSync({data:Wt.data,path:Wt.path,parent:Wt});return"aborted"===u.status?mv:"dirty"===u.status?(Xe.dirty(),{status:"dirty",value:u.value}):this._def.out._parseSync({data:u.value,path:Wt.path,parent:Wt})}}static create(u,Xe){return new ZodPipeline({in:u,out:Xe,typeName:Rv.ZodPipeline})}}class ZodReadonly extends ZodType{_parse(u){const Xe=this._def.innerType._parse(u),freeze=u=>(isValid(u)&&(u.value=Object.freeze(u.value)),u);return isAsync(Xe)?Xe.then((u=>freeze(u))):freeze(Xe)}unwrap(){return this._def.innerType}}ZodReadonly.create=(u,Xe)=>new ZodReadonly({innerType:u,typeName:Rv.ZodReadonly,...processCreateParams(Xe)});ZodObject.lazycreate;var Rv;!function(u){u.ZodString="ZodString",u.ZodNumber="ZodNumber",u.ZodNaN="ZodNaN",u.ZodBigInt="ZodBigInt",u.ZodBoolean="ZodBoolean",u.ZodDate="ZodDate",u.ZodSymbol="ZodSymbol",u.ZodUndefined="ZodUndefined",u.ZodNull="ZodNull",u.ZodAny="ZodAny",u.ZodUnknown="ZodUnknown",u.ZodNever="ZodNever",u.ZodVoid="ZodVoid",u.ZodArray="ZodArray",u.ZodObject="ZodObject",u.ZodUnion="ZodUnion",u.ZodDiscriminatedUnion="ZodDiscriminatedUnion",u.ZodIntersection="ZodIntersection",u.ZodTuple="ZodTuple",u.ZodRecord="ZodRecord",u.ZodMap="ZodMap",u.ZodSet="ZodSet",u.ZodFunction="ZodFunction",u.ZodLazy="ZodLazy",u.ZodLiteral="ZodLiteral",u.ZodEnum="ZodEnum",u.ZodEffects="ZodEffects",u.ZodNativeEnum="ZodNativeEnum",u.ZodOptional="ZodOptional",u.ZodNullable="ZodNullable",u.ZodDefault="ZodDefault",u.ZodCatch="ZodCatch",u.ZodPromise="ZodPromise",u.ZodBranded="ZodBranded",u.ZodPipeline="ZodPipeline",u.ZodReadonly="ZodReadonly"}(Rv||(Rv={}));const zv=ZodString.create,Ov=(ZodNumber.create,ZodNaN.create,ZodBigInt.create,ZodBoolean.create,ZodDate.create,ZodSymbol.create,ZodUndefined.create,ZodNull.create,ZodAny.create,ZodUnknown.create,ZodNever.create,ZodVoid.create,ZodArray.create,ZodObject.create);ZodObject.strictCreate,ZodUnion.create,ZodIntersection.create,ZodTuple.create,ZodMap.create,ZodSet.create,ZodLazy.create,ZodLiteral.create,ZodEnum.create,ZodNativeEnum.create,ZodPromise.create,ZodEffects.create,ZodOptional.create,ZodNullable.create,ZodEffects.createWithPreprocess,ZodPipeline.create;function getAdjustedLocation(u){let{x:Xe,y:Wt}=u;return Xe=0!==Xe?Xe:1e-10,Wt=0!==Wt?Wt:1e-10,{x:Xe,y:Wt}}const Lv=Ov({email:zv().min(1,"jakarto.login.email.min.error").email("jakarto.login.email.format.error"),password:zv().min(1,"jakarto.login.pass.min.error")});var Dv=__webpack_require__(8418),Fv=dp,jv=Symbol.for("react-redux-context"),Bv="undefined"!=typeof globalThis?globalThis:{};function getContext(){if(!Fv.createContext)return{};const u=Bv[jv]??(Bv[jv]=new Map);let Xe=u.get(Fv.createContext);return Xe||(Xe=Fv.createContext(null),u.set(Fv.createContext,Xe)),Xe}var Nv=getContext(),notInitialized=()=>{throw new Error("uSES not initialized!")};var Vv=Symbol.for("react.element"),Uv=Symbol.for("react.portal"),$v=Symbol.for("react.fragment"),Wv=Symbol.for("react.strict_mode"),qv=Symbol.for("react.profiler"),Zv=Symbol.for("react.provider"),Hv=Symbol.for("react.context"),Gv=Symbol.for("react.server_context"),Kv=Symbol.for("react.forward_ref"),Xv=Symbol.for("react.suspense"),Yv=Symbol.for("react.suspense_list"),Jv=Symbol.for("react.memo"),Qv=Symbol.for("react.lazy"),eb=(Symbol.for("react.offscreen"),Symbol.for("react.client.reference"),Kv),tb=Jv;function typeOf(u){if("object"==typeof u&&null!==u){const Xe=u.$$typeof;switch(Xe){case Vv:{const Wt=u.type;switch(Wt){case $v:case qv:case Wv:case Xv:case Yv:return Wt;default:{const u=Wt&&Wt.$$typeof;switch(u){case Gv:case Hv:case Kv:case Qv:case Jv:case Zv:return u;default:return Xe}}}}case Uv:return Xe}}}function pureFinalPropsSelectorFactory(u,Xe,Wt,fr,{areStatesEqual:_r,areOwnPropsEqual:wr,areStatePropsEqual:Ar}){let Kr,In,no,io,oo,ao=!1;function handleSubsequentCalls(ao,so){const co=!wr(so,In),ho=!_r(ao,Kr,so,In);return Kr=ao,In=so,co&&ho?function handleNewPropsAndNewState(){return no=u(Kr,In),Xe.dependsOnOwnProps&&(io=Xe(fr,In)),oo=Wt(no,io,In),oo}():co?function handleNewProps(){return u.dependsOnOwnProps&&(no=u(Kr,In)),Xe.dependsOnOwnProps&&(io=Xe(fr,In)),oo=Wt(no,io,In),oo}():ho?function handleNewState(){const Xe=u(Kr,In),fr=!Ar(Xe,no);return no=Xe,fr&&(oo=Wt(no,io,In)),oo}():oo}return function pureFinalPropsSelector(_r,wr){return ao?handleSubsequentCalls(_r,wr):function handleFirstCall(_r,wr){return Kr=_r,In=wr,no=u(Kr,In),io=Xe(fr,In),oo=Wt(no,io,In),ao=!0,oo}(_r,wr)}}function wrapMapToPropsConstant(u){return function initConstantSelector(Xe){const Wt=u(Xe);function constantSelector(){return Wt}return constantSelector.dependsOnOwnProps=!1,constantSelector}}function getDependsOnOwnProps(u){return u.dependsOnOwnProps?Boolean(u.dependsOnOwnProps):1!==u.length}function wrapMapToPropsFunc(u,Xe){return function initProxySelector(Xe,{displayName:Wt}){const fr=function mapToPropsProxy(u,Xe){return fr.dependsOnOwnProps?fr.mapToProps(u,Xe):fr.mapToProps(u,void 0)};return fr.dependsOnOwnProps=!0,fr.mapToProps=function detectFactoryAndVerify(Xe,Wt){fr.mapToProps=u,fr.dependsOnOwnProps=getDependsOnOwnProps(u);let _r=fr(Xe,Wt);return"function"==typeof _r&&(fr.mapToProps=_r,fr.dependsOnOwnProps=getDependsOnOwnProps(_r),_r=fr(Xe,Wt)),_r},fr}}function createInvalidArgFactory(u,Xe){return(Wt,fr)=>{throw new Error(`Invalid value of type ${typeof u} for ${Xe} argument when connecting component ${fr.wrappedComponentName}.`)}}function defaultMergeProps(u,Xe,Wt){return{...Wt,...u,...Xe}}function defaultNoopBatch(u){u()}var nb={notify(){},get:()=>[]};function createSubscription(u,Xe){let Wt,fr=nb,_r=0,wr=!1;function handleChangeWrapper(){Ar.onStateChange&&Ar.onStateChange()}function trySubscribe(){_r++,Wt||(Wt=Xe?Xe.addNestedSub(handleChangeWrapper):u.subscribe(handleChangeWrapper),fr=function createListenerCollection(){let u=null,Xe=null;return{clear(){u=null,Xe=null},notify(){defaultNoopBatch((()=>{let Xe=u;for(;Xe;)Xe.callback(),Xe=Xe.next}))},get(){const Xe=[];let Wt=u;for(;Wt;)Xe.push(Wt),Wt=Wt.next;return Xe},subscribe(Wt){let fr=!0;const _r=Xe={callback:Wt,next:null,prev:Xe};return _r.prev?_r.prev.next=_r:u=_r,function unsubscribe(){fr&&null!==u&&(fr=!1,_r.next?_r.next.prev=_r.prev:Xe=_r.prev,_r.prev?_r.prev.next=_r.next:u=_r.next)}}}}())}function tryUnsubscribe(){_r--,Wt&&0===_r&&(Wt(),Wt=void 0,fr.clear(),fr=nb)}const Ar={addNestedSub:function addNestedSub(u){trySubscribe();const Xe=fr.subscribe(u);let Wt=!1;return()=>{Wt||(Wt=!0,Xe(),tryUnsubscribe())}},notifyNestedSubs:function notifyNestedSubs(){fr.notify()},handleChangeWrapper,isSubscribed:function isSubscribed(){return wr},trySubscribe:function trySubscribeSelf(){wr||(wr=!0,trySubscribe())},tryUnsubscribe:function tryUnsubscribeSelf(){wr&&(wr=!1,tryUnsubscribe())},getListeners:()=>fr};return Ar}var pb=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),mb="undefined"!=typeof navigator&&"ReactNative"===navigator.product,yb=pb||mb?Fv.useLayoutEffect:Fv.useEffect;function is(u,Xe){return u===Xe?0!==u||0!==Xe||1/u==1/Xe:u!=u&&Xe!=Xe}function shallowEqual(u,Xe){if(is(u,Xe))return!0;if("object"!=typeof u||null===u||"object"!=typeof Xe||null===Xe)return!1;const Wt=Object.keys(u),fr=Object.keys(Xe);if(Wt.length!==fr.length)return!1;for(let fr=0;fr<Wt.length;fr++)if(!Object.prototype.hasOwnProperty.call(Xe,Wt[fr])||!is(u[Wt[fr]],Xe[Wt[fr]]))return!1;return!0}var _b={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},wb={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},Sb={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Ab={[eb]:{$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},[tb]:Sb};function getStatics(u){return function isMemo(u){return typeOf(u)===Jv}(u)?Sb:Ab[u.$$typeof]||_b}var Pb=Object.defineProperty,Ib=Object.getOwnPropertyNames,Mb=Object.getOwnPropertySymbols,Rb=Object.getOwnPropertyDescriptor,zb=Object.getPrototypeOf,Ob=Object.prototype;function extension_hoistNonReactStatics(u,Xe){if("string"!=typeof Xe){if(Ob){const Wt=zb(Xe);Wt&&Wt!==Ob&&extension_hoistNonReactStatics(u,Wt)}let Wt=Ib(Xe);Mb&&(Wt=Wt.concat(Mb(Xe)));const fr=getStatics(u),_r=getStatics(Xe);for(let wr=0;wr<Wt.length;++wr){const Ar=Wt[wr];if(!(wb[Ar]||_r&&_r[Ar]||fr&&fr[Ar])){const Wt=Rb(Xe,Ar);try{Pb(u,Ar,Wt)}catch(u){}}}}return u}var Lb=notInitialized,qb=[null,null];function captureWrapperProps(u,Xe,Wt,fr,_r,wr){u.current=fr,Wt.current=!1,_r.current&&(_r.current=null,wr())}function strictEqual(u,Xe){return u===Xe}var Qb=function connect(u,Xe,Wt,{pure:fr,areStatesEqual:_r=strictEqual,areOwnPropsEqual:wr=shallowEqual,areStatePropsEqual:Ar=shallowEqual,areMergedPropsEqual:Kr=shallowEqual,forwardRef:In=!1,context:no=Nv}={}){const io=no,oo=function mapStateToPropsFactory(u){return u?"function"==typeof u?wrapMapToPropsFunc(u):createInvalidArgFactory(u,"mapStateToProps"):wrapMapToPropsConstant((()=>({})))}(u),ao=function mapDispatchToPropsFactory(u){return u&&"object"==typeof u?wrapMapToPropsConstant((Xe=>function bindActionCreators(u,Xe){const Wt={};for(const fr in u){const _r=u[fr];"function"==typeof _r&&(Wt[fr]=(...u)=>Xe(_r(...u)))}return Wt}(u,Xe))):u?"function"==typeof u?wrapMapToPropsFunc(u):createInvalidArgFactory(u,"mapDispatchToProps"):wrapMapToPropsConstant((u=>({dispatch:u})))}(Xe),so=function mergePropsFactory(u){return u?"function"==typeof u?function wrapMergePropsFunc(u){return function initMergePropsProxy(Xe,{displayName:Wt,areMergedPropsEqual:fr}){let _r,wr=!1;return function mergePropsProxy(Xe,Wt,Ar){const Kr=u(Xe,Wt,Ar);return wr?fr(Kr,_r)||(_r=Kr):(wr=!0,_r=Kr),_r}}}(u):createInvalidArgFactory(u,"mergeProps"):()=>defaultMergeProps}(Wt),co=Boolean(u);return u=>{const Xe=u.displayName||u.name||"Component",Wt=`Connect(${Xe})`,fr={shouldHandleStateChanges:co,displayName:Wt,wrappedComponentName:Xe,WrappedComponent:u,initMapStateToProps:oo,initMapDispatchToProps:ao,initMergeProps:so,areStatesEqual:_r,areStatePropsEqual:Ar,areOwnPropsEqual:wr,areMergedPropsEqual:Kr};function ConnectFunction(Xe){const[Wt,_r,wr]=Fv.useMemo((()=>{const{reactReduxForwardedRef:u,...Wt}=Xe;return[Xe.context,u,Wt]}),[Xe]),Ar=Fv.useMemo((()=>io),[Wt,io]),Kr=Fv.useContext(Ar),In=Boolean(Xe.store)&&Boolean(Xe.store.getState)&&Boolean(Xe.store.dispatch),no=Boolean(Kr)&&Boolean(Kr.store);const oo=In?Xe.store:Kr.store,ao=no?Kr.getServerState:oo.getState,so=Fv.useMemo((()=>function finalPropsSelectorFactory(u,{initMapStateToProps:Xe,initMapDispatchToProps:Wt,initMergeProps:fr,..._r}){return pureFinalPropsSelectorFactory(Xe(u,_r),Wt(u,_r),fr(u,_r),u,_r)}(oo.dispatch,fr)),[oo]),[ho,go]=Fv.useMemo((()=>{if(!co)return qb;const u=createSubscription(oo,In?void 0:Kr.subscription),Xe=u.notifyNestedSubs.bind(u);return[u,Xe]}),[oo,In,Kr]),xo=Fv.useMemo((()=>In?Kr:{...Kr,subscription:ho}),[In,Kr,ho]),ko=Fv.useRef(void 0),Co=Fv.useRef(wr),Io=Fv.useRef(void 0),zo=Fv.useRef(!1),Bo=Fv.useRef(!1),ca=Fv.useRef(void 0);yb((()=>(Bo.current=!0,()=>{Bo.current=!1})),[]);const ua=Fv.useMemo((()=>()=>Io.current&&wr===Co.current?Io.current:so(oo.getState(),wr)),[oo,wr]),Da=Fv.useMemo((()=>u=>ho?function subscribeUpdates(u,Xe,Wt,fr,_r,wr,Ar,Kr,In,no,io){if(!u)return()=>{};let oo=!1,ao=null;const checkForUpdates=()=>{if(oo||!Kr.current)return;const u=Xe.getState();let Wt,so;try{Wt=fr(u,_r.current)}catch(u){so=u,ao=u}so||(ao=null),Wt===wr.current?Ar.current||no():(wr.current=Wt,In.current=Wt,Ar.current=!0,io())};return Wt.onStateChange=checkForUpdates,Wt.trySubscribe(),checkForUpdates(),()=>{if(oo=!0,Wt.tryUnsubscribe(),Wt.onStateChange=null,ao)throw ao}}(co,oo,ho,so,Co,ko,zo,Bo,Io,go,u):()=>{}),[ho]);let ns;!function useIsomorphicLayoutEffectWithArgs(u,Xe,Wt){yb((()=>u(...Xe)),Wt)}(captureWrapperProps,[Co,ko,zo,wr,Io,go]);try{ns=Lb(Da,ua,ao?()=>so(ao(),wr):ua)}catch(u){throw ca.current&&(u.message+=`\nThe error may be correlated with this previous error:\n${ca.current.stack}\n\n`),u}yb((()=>{ca.current=void 0,Io.current=void 0,ko.current=ns}));const yl=Fv.useMemo((()=>Fv.createElement(u,{...ns,ref:_r})),[_r,u,ns]);return Fv.useMemo((()=>co?Fv.createElement(Ar.Provider,{value:xo},yl):yl),[Ar,yl,xo])}const no=Fv.memo(ConnectFunction);if(no.WrappedComponent=u,no.displayName=ConnectFunction.displayName=Wt,In){const Xe=Fv.forwardRef((function forwardConnectRef(u,Xe){return Fv.createElement(no,{...u,reactReduxForwardedRef:Xe})}));return Xe.displayName=Wt,Xe.WrappedComponent=u,extension_hoistNonReactStatics(Xe,u)}return extension_hoistNonReactStatics(no,u)}};var ex=function Provider({store:u,context:Xe,children:Wt,serverState:fr,stabilityCheck:_r="once",identityFunctionCheck:wr="once"}){const Ar=Fv.useMemo((()=>{const Xe=createSubscription(u);return{store:u,subscription:Xe,getServerState:fr?()=>fr:void 0,stabilityCheck:_r,identityFunctionCheck:wr}}),[u,fr,_r,wr]),Kr=Fv.useMemo((()=>u.getState()),[u]);yb((()=>{const{subscription:Xe}=Ar;return Xe.onStateChange=Xe.notifyNestedSubs,Xe.trySubscribe(),Kr!==u.getState()&&Xe.notifyNestedSubs(),()=>{Xe.tryUnsubscribe(),Xe.onStateChange=void 0}}),[Ar,Kr]);const In=Xe||Nv;return Fv.createElement(In.Provider,{value:Ar},Wt)};var tx;tx=Dv.useSyncExternalStoreWithSelector,(u=>{Lb=u})(dp.useSyncExternalStore);var rx=__webpack_require__(9781),nx=__webpack_require__(6434);var styles_getOverlayAlpha=u=>{let Xe;return Xe=u<1?5.11916*u**2:4.5*Math.log(u+1)+2,(Xe/100).toFixed(2)};function getPaperUtilityClass(u){return(0,bp.Ay)("MuiPaper",u)}(0,uf.A)("MuiPaper",["root","rounded","outlined","elevation","elevation0","elevation1","elevation2","elevation3","elevation4","elevation5","elevation6","elevation7","elevation8","elevation9","elevation10","elevation11","elevation12","elevation13","elevation14","elevation15","elevation16","elevation17","elevation18","elevation19","elevation20","elevation21","elevation22","elevation23","elevation24"]);const ix=["className","component","elevation","square","variant"],ox=(0,Up.Ay)("div",{name:"MuiPaper",slot:"Root",overridesResolver:(u,Xe)=>{const{ownerState:Wt}=u;return[Xe.root,Xe[Wt.variant],!Wt.square&&Xe.rounded,"elevation"===Wt.variant&&Xe[`elevation${Wt.elevation}`]]}})((({theme:u,ownerState:Xe})=>{var Wt;return(0,_p.A)({backgroundColor:(u.vars||u).palette.background.paper,color:(u.vars||u).palette.text.primary,transition:u.transitions.create("box-shadow")},!Xe.square&&{borderRadius:u.shape.borderRadius},"outlined"===Xe.variant&&{border:`1px solid ${(u.vars||u).palette.divider}`},"elevation"===Xe.variant&&(0,_p.A)({boxShadow:(u.vars||u).shadows[Xe.elevation]},!u.vars&&"dark"===u.palette.mode&&{backgroundImage:`linear-gradient(${(0,Zp.X4)("#fff",styles_getOverlayAlpha(Xe.elevation))}, ${(0,Zp.X4)("#fff",styles_getOverlayAlpha(Xe.elevation))})`},u.vars&&{backgroundImage:null==(Wt=u.vars.overlays)?void 0:Wt[Xe.elevation]}))}));var ax=dp.forwardRef((function Paper(u,Xe){const Wt=(0,$p.b)({props:u,name:"MuiPaper"}),{className:fr,component:_r="div",elevation:wr=1,square:Ar=!1,variant:Kr="elevation"}=Wt,In=(0,yp.A)(Wt,ix),no=(0,_p.A)({},Wt,{component:_r,elevation:wr,square:Ar,variant:Kr}),io=(u=>{const{square:Xe,elevation:Wt,variant:fr,classes:_r}=u,wr={root:["root",fr,!Xe&&"rounded","elevation"===fr&&`elevation${Wt}`]};return(0,xp.A)(wr,getPaperUtilityClass,_r)})(no);return(0,Fp.jsx)(ox,(0,_p.A)({as:_r,ownerState:no,className:(0,vp.A)(io.root,fr),ref:Xe},In))}));function getCardUtilityClass(u){return(0,bp.Ay)("MuiCard",u)}(0,uf.A)("MuiCard",["root"]);const lx=["className","raised"],cx=(0,Up.Ay)(ax,{name:"MuiCard",slot:"Root",overridesResolver:(u,Xe)=>Xe.root})((()=>({overflow:"hidden"})));var ux=dp.forwardRef((function Card(u,Xe){const Wt=(0,$p.b)({props:u,name:"MuiCard"}),{className:fr,raised:_r=!1}=Wt,wr=(0,yp.A)(Wt,lx),Ar=(0,_p.A)({},Wt,{raised:_r}),Kr=(u=>{const{classes:Xe}=u;return(0,xp.A)({root:["root"]},getCardUtilityClass,Xe)})(Ar);return(0,Fp.jsx)(cx,(0,_p.A)({className:(0,vp.A)(Kr.root,fr),elevation:_r?8:void 0,ref:Xe,ownerState:Ar},wr))})),dx=__webpack_require__(9599);function getTypographyUtilityClass(u){return(0,bp.Ay)("MuiTypography",u)}(0,uf.A)("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const hx=["align","className","component","gutterBottom","noWrap","paragraph","variant","variantMapping"],px=(0,Up.Ay)("span",{name:"MuiTypography",slot:"Root",overridesResolver:(u,Xe)=>{const{ownerState:Wt}=u;return[Xe.root,Wt.variant&&Xe[Wt.variant],"inherit"!==Wt.align&&Xe[`align${(0,Vp.A)(Wt.align)}`],Wt.noWrap&&Xe.noWrap,Wt.gutterBottom&&Xe.gutterBottom,Wt.paragraph&&Xe.paragraph]}})((({theme:u,ownerState:Xe})=>(0,_p.A)({margin:0},"inherit"===Xe.variant&&{font:"inherit"},"inherit"!==Xe.variant&&u.typography[Xe.variant],"inherit"!==Xe.align&&{textAlign:Xe.align},Xe.noWrap&&{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},Xe.gutterBottom&&{marginBottom:"0.35em"},Xe.paragraph&&{marginBottom:16}))),fx={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},mx={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"};var gx=dp.forwardRef((function Typography(u,Xe){const Wt=(0,$p.b)({props:u,name:"MuiTypography"}),fr=(u=>mx[u]||u)(Wt.color),_r=(0,dx.A)((0,_p.A)({},Wt,{color:fr})),{align:wr="inherit",className:Ar,component:Kr,gutterBottom:In=!1,noWrap:no=!1,paragraph:io=!1,variant:oo="body1",variantMapping:ao=fx}=_r,so=(0,yp.A)(_r,hx),co=(0,_p.A)({},_r,{align:wr,color:fr,className:Ar,component:Kr,gutterBottom:In,noWrap:no,paragraph:io,variant:oo,variantMapping:ao}),ho=Kr||(io?"p":ao[oo]||fx[oo])||"span",go=(u=>{const{align:Xe,gutterBottom:Wt,noWrap:fr,paragraph:_r,variant:wr,classes:Ar}=u,Kr={root:["root",wr,"inherit"!==u.align&&`align${(0,Vp.A)(Xe)}`,Wt&&"gutterBottom",fr&&"noWrap",_r&&"paragraph"]};return(0,xp.A)(Kr,getTypographyUtilityClass,Ar)})(co);return(0,Fp.jsx)(px,(0,_p.A)({as:ho,ref:Xe,ownerState:co,className:(0,vp.A)(go.root,Ar)},so))}));function getCardHeaderUtilityClass(u){return(0,bp.Ay)("MuiCardHeader",u)}var yx=(0,uf.A)("MuiCardHeader",["root","avatar","action","content","title","subheader"]);const _x=["action","avatar","className","component","disableTypography","subheader","subheaderTypographyProps","title","titleTypographyProps"],vx=(0,Up.Ay)("div",{name:"MuiCardHeader",slot:"Root",overridesResolver:(u,Xe)=>(0,_p.A)({[`& .${yx.title}`]:Xe.title,[`& .${yx.subheader}`]:Xe.subheader},Xe.root)})({display:"flex",alignItems:"center",padding:16}),bx=(0,Up.Ay)("div",{name:"MuiCardHeader",slot:"Avatar",overridesResolver:(u,Xe)=>Xe.avatar})({display:"flex",flex:"0 0 auto",marginRight:16}),xx=(0,Up.Ay)("div",{name:"MuiCardHeader",slot:"Action",overridesResolver:(u,Xe)=>Xe.action})({flex:"0 0 auto",alignSelf:"flex-start",marginTop:-4,marginRight:-8,marginBottom:-4}),wx=(0,Up.Ay)("div",{name:"MuiCardHeader",slot:"Content",overridesResolver:(u,Xe)=>Xe.content})({flex:"1 1 auto"});var Sx=dp.forwardRef((function CardHeader(u,Xe){const Wt=(0,$p.b)({props:u,name:"MuiCardHeader"}),{action:fr,avatar:_r,className:wr,component:Ar="div",disableTypography:Kr=!1,subheader:In,subheaderTypographyProps:no,title:io,titleTypographyProps:oo}=Wt,ao=(0,yp.A)(Wt,_x),so=(0,_p.A)({},Wt,{component:Ar,disableTypography:Kr}),co=(u=>{const{classes:Xe}=u;return(0,xp.A)({root:["root"],avatar:["avatar"],action:["action"],content:["content"],title:["title"],subheader:["subheader"]},getCardHeaderUtilityClass,Xe)})(so);let ho=io;null==ho||ho.type===gx||Kr||(ho=(0,Fp.jsx)(gx,(0,_p.A)({variant:_r?"body2":"h5",className:co.title,component:"span",display:"block"},oo,{children:ho})));let go=In;return null==go||go.type===gx||Kr||(go=(0,Fp.jsx)(gx,(0,_p.A)({variant:_r?"body2":"body1",className:co.subheader,color:"text.secondary",component:"span",display:"block"},no,{children:go}))),(0,Fp.jsxs)(vx,(0,_p.A)({className:(0,vp.A)(co.root,wr),as:Ar,ref:Xe,ownerState:so},ao,{children:[_r&&(0,Fp.jsx)(bx,{className:co.avatar,ownerState:so,children:_r}),(0,Fp.jsxs)(wx,{className:co.content,ownerState:so,children:[ho,go]}),fr&&(0,Fp.jsx)(xx,{className:co.action,ownerState:so,children:fr})]}))}));function getCardMediaUtilityClass(u){return(0,bp.Ay)("MuiCardMedia",u)}(0,uf.A)("MuiCardMedia",["root","media","img"]);const kx=["children","className","component","image","src","style"],Ax=(0,Up.Ay)("div",{name:"MuiCardMedia",slot:"Root",overridesResolver:(u,Xe)=>{const{ownerState:Wt}=u,{isMediaComponent:fr,isImageComponent:_r}=Wt;return[Xe.root,fr&&Xe.media,_r&&Xe.img]}})((({ownerState:u})=>(0,_p.A)({display:"block",backgroundSize:"cover",backgroundRepeat:"no-repeat",backgroundPosition:"center"},u.isMediaComponent&&{width:"100%"},u.isImageComponent&&{objectFit:"cover"}))),Tx=["video","audio","picture","iframe","img"],Ex=["picture","img"],Cx=dp.forwardRef((function CardMedia(u,Xe){const Wt=(0,$p.b)({props:u,name:"MuiCardMedia"}),{children:fr,className:_r,component:wr="div",image:Ar,src:Kr,style:In}=Wt,no=(0,yp.A)(Wt,kx),io=-1!==Tx.indexOf(wr),oo=!io&&Ar?(0,_p.A)({backgroundImage:`url("${Ar}")`},In):In,ao=(0,_p.A)({},Wt,{component:wr,isMediaComponent:io,isImageComponent:-1!==Ex.indexOf(wr)}),so=(u=>{const{classes:Xe,isMediaComponent:Wt,isImageComponent:fr}=u,_r={root:["root",Wt&&"media",fr&&"img"]};return(0,xp.A)(_r,getCardMediaUtilityClass,Xe)})(ao);return(0,Fp.jsx)(Ax,(0,_p.A)({className:(0,vp.A)(so.root,_r),as:wr,role:!io&&Ar?"img":void 0,ref:Xe,style:oo,ownerState:ao,src:io?Ar||Kr:void 0},no,{children:fr}))}));var Px=Cx,Ix=__webpack_require__(9452),Mx=__webpack_require__(8248);const Rx=["component","direction","spacing","divider","children","className","useFlexGap"],zx=(0,kp.A)(),Ox=Dp("div",{name:"MuiStack",slot:"Root",overridesResolver:(u,Xe)=>Xe.root});function createStack_useThemePropsDefault(u){return useThemeProps({props:u,name:"MuiStack",defaultTheme:zx})}function joinChildren(u,Xe){const Wt=dp.Children.toArray(u).filter(Boolean);return Wt.reduce(((u,fr,_r)=>(u.push(fr),_r<Wt.length-1&&u.push(dp.cloneElement(Xe,{key:`separator-${_r}`})),u)),[])}const style=({ownerState:u,theme:Xe})=>{let Wt=(0,_p.A)({display:"flex",flexDirection:"column"},(0,Ix.NI)({theme:Xe},(0,Ix.kW)({values:u.direction,breakpoints:Xe.breakpoints.values}),(u=>({flexDirection:u}))));if(u.spacing){const fr=(0,Mx.LX)(Xe),_r=Object.keys(Xe.breakpoints.values).reduce(((Xe,Wt)=>(("object"==typeof u.spacing&&null!=u.spacing[Wt]||"object"==typeof u.direction&&null!=u.direction[Wt])&&(Xe[Wt]=!0),Xe)),{}),wr=(0,Ix.kW)({values:u.direction,base:_r}),Ar=(0,Ix.kW)({values:u.spacing,base:_r});"object"==typeof wr&&Object.keys(wr).forEach(((u,Xe,Wt)=>{if(!wr[u]){const fr=Xe>0?wr[Wt[Xe-1]]:"column";wr[u]=fr}}));const styleFromPropValue=(Xe,Wt)=>{return u.useFlexGap?{gap:(0,Mx._W)(fr,Xe)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${_r=Wt?wr[Wt]:u.direction,{row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"}[_r]}`]:(0,Mx._W)(fr,Xe)}};var _r};Wt=(0,Pp.A)(Wt,(0,Ix.NI)({theme:Xe},Ar,styleFromPropValue))}return Wt=(0,Ix.iZ)(Xe.breakpoints,Wt),Wt};const Lx=function createStack(u={}){const{createStyledComponent:Xe=Ox,useThemeProps:Wt=createStack_useThemePropsDefault,componentName:fr="MuiStack"}=u,_r=Xe(style),wr=dp.forwardRef((function Grid(u,Xe){const wr=Wt(u),Ar=(0,dx.A)(wr),{component:Kr="div",direction:In="column",spacing:no=0,divider:io,children:oo,className:ao,useFlexGap:so=!1}=Ar,co=(0,yp.A)(Ar,Rx),ho={direction:In,spacing:no,useFlexGap:so},go=(0,xp.A)({root:["root"]},(u=>(0,bp.Ay)(fr,u)),{});return(0,Fp.jsx)(_r,(0,_p.A)({as:Kr,ownerState:ho,ref:Xe,className:(0,vp.A)(go.root,ao)},co,{children:io?joinChildren(oo,io):oo}))}));return wr}({createStyledComponent:(0,Up.Ay)("div",{name:"MuiStack",slot:"Root",overridesResolver:(u,Xe)=>Xe.root}),useThemeProps:u=>(0,$p.b)({props:u,name:"MuiStack"})});var Dx=Lx;function getCardContentUtilityClass(u){return(0,bp.Ay)("MuiCardContent",u)}(0,uf.A)("MuiCardContent",["root"]);const Fx=["className","component"],jx=(0,Up.Ay)("div",{name:"MuiCardContent",slot:"Root",overridesResolver:(u,Xe)=>Xe.root})((()=>({padding:16,"&:last-child":{paddingBottom:24}})));var Bx=dp.forwardRef((function CardContent(u,Xe){const Wt=(0,$p.b)({props:u,name:"MuiCardContent"}),{className:fr,component:_r="div"}=Wt,wr=(0,yp.A)(Wt,Fx),Ar=(0,_p.A)({},Wt,{component:_r}),Kr=(u=>{const{classes:Xe}=u;return(0,xp.A)({root:["root"]},getCardContentUtilityClass,Xe)})(Ar);return(0,Fp.jsx)(jx,(0,_p.A)({as:_r,className:(0,vp.A)(Kr.root,fr),ownerState:Ar,ref:Xe},wr))}));const Nx=["className","component"];var Vx=__webpack_require__(9071),Ux=__webpack_require__(6544);var $x=(0,uf.A)("MuiBox",["root"]);const Wx=(0,Ux.A)(),qx=function createBox(u={}){const{themeId:Xe,defaultTheme:Wt,defaultClassName:fr="MuiBox-root",generateClassName:_r}=u,wr=(0,Cp.default)("div",{shouldForwardProp:u=>"theme"!==u&&"sx"!==u&&"as"!==u})(Ip.A);return dp.forwardRef((function Box(u,Ar){const Kr=Ep(Wt),In=(0,dx.A)(u),{className:no,component:io="div"}=In,oo=(0,yp.A)(In,Nx);return(0,Fp.jsx)(wr,(0,_p.A)({as:io,ref:Ar,className:(0,vp.A)(no,_r?_r(fr):fr),theme:Xe&&Kr[Xe]||Kr},oo))}))}({themeId:cm.A,defaultTheme:Wx,defaultClassName:$x.root,generateClassName:Vx.A.generate});var Zx=qx,Hx=void 0;const Gx=function translate(u,Xe,Wt){return _newArrowCheck(this,Hx),JMap.Language.translate({bundleId:_r,key:u,params:Xe,locale:Wt})}.bind(void 0);(function getLocale(){return _newArrowCheck(this,Hx),JMap.Language.getLocale()}).bind(void 0);var Kx=__webpack_require__(5794),Xx=__webpack_require__.n(Kx),Yx=function(){var extendStatics=function(u,Xe){return extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,Xe){u.__proto__=Xe}||function(u,Xe){for(var Wt in Xe)Object.prototype.hasOwnProperty.call(Xe,Wt)&&(u[Wt]=Xe[Wt])},extendStatics(u,Xe)};return function(u,Xe){function __(){this.constructor=u}extendStatics(u,Xe),u.prototype=null===Xe?Object.create(Xe):(__.prototype=Xe.prototype,new __)}}(),__assign=function(){return __assign=Object.assign||function(u){for(var Xe,Wt=1,fr=arguments.length;Wt<fr;Wt++)for(var _r in Xe=arguments[Wt])Object.prototype.hasOwnProperty.call(Xe,_r)&&(u[_r]=Xe[_r]);return u},__assign.apply(this,arguments)},Jx={width:"100%",height:"10px",top:"0px",left:"0px",cursor:"row-resize"},Qx={width:"10px",height:"100%",top:"0px",left:"0px",cursor:"col-resize"},ew={width:"20px",height:"20px",position:"absolute"},tw={top:__assign(__assign({},Jx),{top:"-5px"}),right:__assign(__assign({},Qx),{left:void 0,right:"-5px"}),bottom:__assign(__assign({},Jx),{top:void 0,bottom:"-5px"}),left:__assign(__assign({},Qx),{left:"-5px"}),topRight:__assign(__assign({},ew),{right:"-10px",top:"-10px",cursor:"ne-resize"}),bottomRight:__assign(__assign({},ew),{right:"-10px",bottom:"-10px",cursor:"se-resize"}),bottomLeft:__assign(__assign({},ew),{left:"-10px",bottom:"-10px",cursor:"sw-resize"}),topLeft:__assign(__assign({},ew),{left:"-10px",top:"-10px",cursor:"nw-resize"})},rw=function(u){function Resizer(){var Xe=null!==u&&u.apply(this,arguments)||this;return Xe.onMouseDown=function(u){Xe.props.onResizeStart(u,Xe.props.direction)},Xe.onTouchStart=function(u){Xe.props.onResizeStart(u,Xe.props.direction)},Xe}return Yx(Resizer,u),Resizer.prototype.render=function(){return dp.createElement("div",{className:this.props.className||"",style:__assign(__assign({position:"absolute",userSelect:"none"},tw[this.props.direction]),this.props.replaceStyles||{}),onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart},this.props.children)},Resizer}(dp.PureComponent),nw=function(){var extendStatics=function(u,Xe){return extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,Xe){u.__proto__=Xe}||function(u,Xe){for(var Wt in Xe)Object.prototype.hasOwnProperty.call(Xe,Wt)&&(u[Wt]=Xe[Wt])},extendStatics(u,Xe)};return function(u,Xe){function __(){this.constructor=u}extendStatics(u,Xe),u.prototype=null===Xe?Object.create(Xe):(__.prototype=Xe.prototype,new __)}}(),lib_assign=function(){return lib_assign=Object.assign||function(u){for(var Xe,Wt=1,fr=arguments.length;Wt<fr;Wt++)for(var _r in Xe=arguments[Wt])Object.prototype.hasOwnProperty.call(Xe,_r)&&(u[_r]=Xe[_r]);return u},lib_assign.apply(this,arguments)},iw={width:"auto",height:"auto"},clamp=function(u,Xe,Wt){return Math.max(Math.min(u,Wt),Xe)},snap=function(u,Xe,Wt){var fr=Math.round(u/Xe);return fr*Xe+Wt*(fr-1)},hasDirection=function(u,Xe){return new RegExp(u,"i").test(Xe)},isTouchEvent=function(u){return Boolean(u.touches&&u.touches.length)},findClosestSnap=function(u,Xe,Wt){void 0===Wt&&(Wt=0);var fr=Xe.reduce((function(Wt,fr,_r){return Math.abs(fr-u)<Math.abs(Xe[Wt]-u)?_r:Wt}),0),_r=Math.abs(Xe[fr]-u);return 0===Wt||_r<Wt?Xe[fr]:u},getStringSize=function(u){return"auto"===(u=u.toString())||u.endsWith("px")||u.endsWith("%")||u.endsWith("vh")||u.endsWith("vw")||u.endsWith("vmax")||u.endsWith("vmin")?u:u+"px"},getPixelSize=function(u,Xe,Wt,fr){if(u&&"string"==typeof u){if(u.endsWith("px"))return Number(u.replace("px",""));if(u.endsWith("%"))return Xe*(Number(u.replace("%",""))/100);if(u.endsWith("vw"))return Wt*(Number(u.replace("vw",""))/100);if(u.endsWith("vh"))return fr*(Number(u.replace("vh",""))/100)}return u},ow=["as","ref","style","className","grid","gridGap","snap","bounds","boundsByDirection","size","defaultSize","minWidth","minHeight","maxWidth","maxHeight","lockAspectRatio","lockAspectRatioExtraWidth","lockAspectRatioExtraHeight","enable","handleStyles","handleClasses","handleWrapperStyle","handleWrapperClass","children","onResizeStart","onResize","onResizeStop","handleComponent","scale","resizeRatio","snapGap"],aw="__resizable_base__",sw=function(u){function Resizable(Xe){var Wt,fr,_r,wr,Ar=u.call(this,Xe)||this;return Ar.ratio=1,Ar.resizable=null,Ar.parentLeft=0,Ar.parentTop=0,Ar.resizableLeft=0,Ar.resizableRight=0,Ar.resizableTop=0,Ar.resizableBottom=0,Ar.targetLeft=0,Ar.targetTop=0,Ar.appendBase=function(){if(!Ar.resizable||!Ar.window)return null;var u=Ar.parentNode;if(!u)return null;var Xe=Ar.window.document.createElement("div");return Xe.style.width="100%",Xe.style.height="100%",Xe.style.position="absolute",Xe.style.transform="scale(0, 0)",Xe.style.left="0",Xe.style.flex="0 0 100%",Xe.classList?Xe.classList.add(aw):Xe.className+=aw,u.appendChild(Xe),Xe},Ar.removeBase=function(u){var Xe=Ar.parentNode;Xe&&Xe.removeChild(u)},Ar.state={isResizing:!1,width:null!==(fr=null===(Wt=Ar.propsSize)||void 0===Wt?void 0:Wt.width)&&void 0!==fr?fr:"auto",height:null!==(wr=null===(_r=Ar.propsSize)||void 0===_r?void 0:_r.height)&&void 0!==wr?wr:"auto",direction:"right",original:{x:0,y:0,width:0,height:0},backgroundStyle:{height:"100%",width:"100%",backgroundColor:"rgba(0,0,0,0)",cursor:"auto",opacity:0,position:"fixed",zIndex:9999,top:"0",left:"0",bottom:"0",right:"0"},flexBasis:void 0},Ar.onResizeStart=Ar.onResizeStart.bind(Ar),Ar.onMouseMove=Ar.onMouseMove.bind(Ar),Ar.onMouseUp=Ar.onMouseUp.bind(Ar),Ar}return nw(Resizable,u),Object.defineProperty(Resizable.prototype,"parentNode",{get:function(){return this.resizable?this.resizable.parentNode:null},enumerable:!1,configurable:!0}),Object.defineProperty(Resizable.prototype,"window",{get:function(){return this.resizable&&this.resizable.ownerDocument?this.resizable.ownerDocument.defaultView:null},enumerable:!1,configurable:!0}),Object.defineProperty(Resizable.prototype,"propsSize",{get:function(){return this.props.size||this.props.defaultSize||iw},enumerable:!1,configurable:!0}),Object.defineProperty(Resizable.prototype,"size",{get:function(){var u=0,Xe=0;if(this.resizable&&this.window){var Wt=this.resizable.offsetWidth,fr=this.resizable.offsetHeight,_r=this.resizable.style.position;"relative"!==_r&&(this.resizable.style.position="relative"),u="auto"!==this.resizable.style.width?this.resizable.offsetWidth:Wt,Xe="auto"!==this.resizable.style.height?this.resizable.offsetHeight:fr,this.resizable.style.position=_r}return{width:u,height:Xe}},enumerable:!1,configurable:!0}),Object.defineProperty(Resizable.prototype,"sizeStyle",{get:function(){var u=this,Xe=this.props.size,getSize=function(Xe){var Wt;if(void 0===u.state[Xe]||"auto"===u.state[Xe])return"auto";if(u.propsSize&&u.propsSize[Xe]&&(null===(Wt=u.propsSize[Xe])||void 0===Wt?void 0:Wt.toString().endsWith("%"))){if(u.state[Xe].toString().endsWith("%"))return u.state[Xe].toString();var fr=u.getParentSize();return Number(u.state[Xe].toString().replace("px",""))/fr[Xe]*100+"%"}return getStringSize(u.state[Xe])};return{width:Xe&&void 0!==Xe.width&&!this.state.isResizing?getStringSize(Xe.width):getSize("width"),height:Xe&&void 0!==Xe.height&&!this.state.isResizing?getStringSize(Xe.height):getSize("height")}},enumerable:!1,configurable:!0}),Resizable.prototype.getParentSize=function(){if(!this.parentNode)return this.window?{width:this.window.innerWidth,height:this.window.innerHeight}:{width:0,height:0};var u=this.appendBase();if(!u)return{width:0,height:0};var Xe=!1,Wt=this.parentNode.style.flexWrap;"wrap"!==Wt&&(Xe=!0,this.parentNode.style.flexWrap="wrap"),u.style.position="relative",u.style.minWidth="100%",u.style.minHeight="100%";var fr={width:u.offsetWidth,height:u.offsetHeight};return Xe&&(this.parentNode.style.flexWrap=Wt),this.removeBase(u),fr},Resizable.prototype.bindEvents=function(){this.window&&(this.window.addEventListener("mouseup",this.onMouseUp),this.window.addEventListener("mousemove",this.onMouseMove),this.window.addEventListener("mouseleave",this.onMouseUp),this.window.addEventListener("touchmove",this.onMouseMove,{capture:!0,passive:!1}),this.window.addEventListener("touchend",this.onMouseUp))},Resizable.prototype.unbindEvents=function(){this.window&&(this.window.removeEventListener("mouseup",this.onMouseUp),this.window.removeEventListener("mousemove",this.onMouseMove),this.window.removeEventListener("mouseleave",this.onMouseUp),this.window.removeEventListener("touchmove",this.onMouseMove,!0),this.window.removeEventListener("touchend",this.onMouseUp))},Resizable.prototype.componentDidMount=function(){if(this.resizable&&this.window){var u=this.window.getComputedStyle(this.resizable);this.setState({width:this.state.width||this.size.width,height:this.state.height||this.size.height,flexBasis:"auto"!==u.flexBasis?u.flexBasis:void 0})}},Resizable.prototype.componentWillUnmount=function(){this.window&&this.unbindEvents()},Resizable.prototype.createSizeForCssProperty=function(u,Xe){var Wt=this.propsSize&&this.propsSize[Xe];return"auto"!==this.state[Xe]||this.state.original[Xe]!==u||void 0!==Wt&&"auto"!==Wt?u:"auto"},Resizable.prototype.calculateNewMaxFromBoundary=function(u,Xe){var Wt,fr,_r=this.props.boundsByDirection,wr=this.state.direction,Ar=_r&&hasDirection("left",wr),Kr=_r&&hasDirection("top",wr);if("parent"===this.props.bounds){var In=this.parentNode;In&&(Wt=Ar?this.resizableRight-this.parentLeft:In.offsetWidth+(this.parentLeft-this.resizableLeft),fr=Kr?this.resizableBottom-this.parentTop:In.offsetHeight+(this.parentTop-this.resizableTop))}else"window"===this.props.bounds?this.window&&(Wt=Ar?this.resizableRight:this.window.innerWidth-this.resizableLeft,fr=Kr?this.resizableBottom:this.window.innerHeight-this.resizableTop):this.props.bounds&&(Wt=Ar?this.resizableRight-this.targetLeft:this.props.bounds.offsetWidth+(this.targetLeft-this.resizableLeft),fr=Kr?this.resizableBottom-this.targetTop:this.props.bounds.offsetHeight+(this.targetTop-this.resizableTop));return Wt&&Number.isFinite(Wt)&&(u=u&&u<Wt?u:Wt),fr&&Number.isFinite(fr)&&(Xe=Xe&&Xe<fr?Xe:fr),{maxWidth:u,maxHeight:Xe}},Resizable.prototype.calculateNewSizeFromDirection=function(u,Xe){var Wt,fr=this.props.scale||1,_r=(Wt=this.props.resizeRatio||1,Array.isArray(Wt)?Wt:[Wt,Wt]),wr=_r[0],Ar=_r[1],Kr=this.state,In=Kr.direction,no=Kr.original,io=this.props,oo=io.lockAspectRatio,ao=io.lockAspectRatioExtraHeight,so=io.lockAspectRatioExtraWidth,co=no.width,ho=no.height,go=ao||0,xo=so||0;return hasDirection("right",In)&&(co=no.width+(u-no.x)*wr/fr,oo&&(ho=(co-xo)/this.ratio+go)),hasDirection("left",In)&&(co=no.width-(u-no.x)*wr/fr,oo&&(ho=(co-xo)/this.ratio+go)),hasDirection("bottom",In)&&(ho=no.height+(Xe-no.y)*Ar/fr,oo&&(co=(ho-go)*this.ratio+xo)),hasDirection("top",In)&&(ho=no.height-(Xe-no.y)*Ar/fr,oo&&(co=(ho-go)*this.ratio+xo)),{newWidth:co,newHeight:ho}},Resizable.prototype.calculateNewSizeFromAspectRatio=function(u,Xe,Wt,fr){var _r=this.props,wr=_r.lockAspectRatio,Ar=_r.lockAspectRatioExtraHeight,Kr=_r.lockAspectRatioExtraWidth,In=void 0===fr.width?10:fr.width,no=void 0===Wt.width||Wt.width<0?u:Wt.width,io=void 0===fr.height?10:fr.height,oo=void 0===Wt.height||Wt.height<0?Xe:Wt.height,ao=Ar||0,so=Kr||0;if(wr){var co=(io-ao)*this.ratio+so,ho=(oo-ao)*this.ratio+so,go=(In-so)/this.ratio+ao,xo=(no-so)/this.ratio+ao,ko=Math.max(In,co),Co=Math.min(no,ho),Io=Math.max(io,go),zo=Math.min(oo,xo);u=clamp(u,ko,Co),Xe=clamp(Xe,Io,zo)}else u=clamp(u,In,no),Xe=clamp(Xe,io,oo);return{newWidth:u,newHeight:Xe}},Resizable.prototype.setBoundingClientRect=function(){var u=1/(this.props.scale||1);if("parent"===this.props.bounds){var Xe=this.parentNode;if(Xe){var Wt=Xe.getBoundingClientRect();this.parentLeft=Wt.left*u,this.parentTop=Wt.top*u}}if(this.props.bounds&&"string"!=typeof this.props.bounds){var fr=this.props.bounds.getBoundingClientRect();this.targetLeft=fr.left*u,this.targetTop=fr.top*u}if(this.resizable){var _r=this.resizable.getBoundingClientRect(),wr=_r.left,Ar=_r.top,Kr=_r.right,In=_r.bottom;this.resizableLeft=wr*u,this.resizableRight=Kr*u,this.resizableTop=Ar*u,this.resizableBottom=In*u}},Resizable.prototype.onResizeStart=function(u,Xe){if(this.resizable&&this.window){var Wt,fr=0,_r=0;if(u.nativeEvent&&function(u){return Boolean((u.clientX||0===u.clientX)&&(u.clientY||0===u.clientY))}(u.nativeEvent)?(fr=u.nativeEvent.clientX,_r=u.nativeEvent.clientY):u.nativeEvent&&isTouchEvent(u.nativeEvent)&&(fr=u.nativeEvent.touches[0].clientX,_r=u.nativeEvent.touches[0].clientY),this.props.onResizeStart)if(this.resizable)if(!1===this.props.onResizeStart(u,Xe,this.resizable))return;this.props.size&&(void 0!==this.props.size.height&&this.props.size.height!==this.state.height&&this.setState({height:this.props.size.height}),void 0!==this.props.size.width&&this.props.size.width!==this.state.width&&this.setState({width:this.props.size.width})),this.ratio="number"==typeof this.props.lockAspectRatio?this.props.lockAspectRatio:this.size.width/this.size.height;var wr=this.window.getComputedStyle(this.resizable);if("auto"!==wr.flexBasis){var Ar=this.parentNode;if(Ar){var Kr=this.window.getComputedStyle(Ar).flexDirection;this.flexDir=Kr.startsWith("row")?"row":"column",Wt=wr.flexBasis}}this.setBoundingClientRect(),this.bindEvents();var In={original:{x:fr,y:_r,width:this.size.width,height:this.size.height},isResizing:!0,backgroundStyle:lib_assign(lib_assign({},this.state.backgroundStyle),{cursor:this.window.getComputedStyle(u.target).cursor||"auto"}),direction:Xe,flexBasis:Wt};this.setState(In)}},Resizable.prototype.onMouseMove=function(u){var Xe=this;if(this.state.isResizing&&this.resizable&&this.window){if(this.window.TouchEvent&&isTouchEvent(u))try{u.preventDefault(),u.stopPropagation()}catch(u){}var Wt=this.props,fr=Wt.maxWidth,_r=Wt.maxHeight,wr=Wt.minWidth,Ar=Wt.minHeight,Kr=isTouchEvent(u)?u.touches[0].clientX:u.clientX,In=isTouchEvent(u)?u.touches[0].clientY:u.clientY,no=this.state,io=no.direction,oo=no.original,ao=no.width,so=no.height,co=this.getParentSize(),ho=function(u,Xe,Wt,fr,_r,wr,Ar){return fr=getPixelSize(fr,u.width,Xe,Wt),_r=getPixelSize(_r,u.height,Xe,Wt),wr=getPixelSize(wr,u.width,Xe,Wt),Ar=getPixelSize(Ar,u.height,Xe,Wt),{maxWidth:void 0===fr?void 0:Number(fr),maxHeight:void 0===_r?void 0:Number(_r),minWidth:void 0===wr?void 0:Number(wr),minHeight:void 0===Ar?void 0:Number(Ar)}}(co,this.window.innerWidth,this.window.innerHeight,fr,_r,wr,Ar);fr=ho.maxWidth,_r=ho.maxHeight,wr=ho.minWidth,Ar=ho.minHeight;var go=this.calculateNewSizeFromDirection(Kr,In),xo=go.newHeight,ko=go.newWidth,Co=this.calculateNewMaxFromBoundary(fr,_r);this.props.snap&&this.props.snap.x&&(ko=findClosestSnap(ko,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(xo=findClosestSnap(xo,this.props.snap.y,this.props.snapGap));var Io=this.calculateNewSizeFromAspectRatio(ko,xo,{width:Co.maxWidth,height:Co.maxHeight},{width:wr,height:Ar});if(ko=Io.newWidth,xo=Io.newHeight,this.props.grid){var zo=snap(ko,this.props.grid[0],this.props.gridGap?this.props.gridGap[0]:0),Bo=snap(xo,this.props.grid[1],this.props.gridGap?this.props.gridGap[1]:0),ca=this.props.snapGap||0;ko=0===ca||Math.abs(zo-ko)<=ca?zo:ko,xo=0===ca||Math.abs(Bo-xo)<=ca?Bo:xo}var ua={width:ko-oo.width,height:xo-oo.height};if(ao&&"string"==typeof ao)if(ao.endsWith("%"))ko=ko/co.width*100+"%";else if(ao.endsWith("vw")){ko=ko/this.window.innerWidth*100+"vw"}else if(ao.endsWith("vh")){ko=ko/this.window.innerHeight*100+"vh"}if(so&&"string"==typeof so)if(so.endsWith("%"))xo=xo/co.height*100+"%";else if(so.endsWith("vw")){xo=xo/this.window.innerWidth*100+"vw"}else if(so.endsWith("vh")){xo=xo/this.window.innerHeight*100+"vh"}var Da={width:this.createSizeForCssProperty(ko,"width"),height:this.createSizeForCssProperty(xo,"height")};"row"===this.flexDir?Da.flexBasis=Da.width:"column"===this.flexDir&&(Da.flexBasis=Da.height);var ns=this.state.width!==Da.width,yl=this.state.height!==Da.height,vl=this.state.flexBasis!==Da.flexBasis,kl=ns||yl||vl;kl&&(0,um.flushSync)((function(){Xe.setState(Da)})),this.props.onResize&&kl&&this.props.onResize(u,io,this.resizable,ua)}},Resizable.prototype.onMouseUp=function(u){var Xe,Wt,fr=this.state,_r=fr.isResizing,wr=fr.direction,Ar=fr.original;if(_r&&this.resizable){var Kr={width:this.size.width-Ar.width,height:this.size.height-Ar.height};this.props.onResizeStop&&this.props.onResizeStop(u,wr,this.resizable,Kr),this.props.size&&this.setState({width:null!==(Xe=this.props.size.width)&&void 0!==Xe?Xe:"auto",height:null!==(Wt=this.props.size.height)&&void 0!==Wt?Wt:"auto"}),this.unbindEvents(),this.setState({isResizing:!1,backgroundStyle:lib_assign(lib_assign({},this.state.backgroundStyle),{cursor:"auto"})})}},Resizable.prototype.updateSize=function(u){var Xe,Wt;this.setState({width:null!==(Xe=u.width)&&void 0!==Xe?Xe:"auto",height:null!==(Wt=u.height)&&void 0!==Wt?Wt:"auto"})},Resizable.prototype.renderResizer=function(u){var Xe=this,Wt=this.props,fr=Wt.enable,_r=Wt.handleStyles,wr=Wt.handleClasses,Ar=Wt.handleWrapperStyle,Kr=Wt.handleWrapperClass,In=Wt.handleComponent;if(!fr)return null;var no=u.filter((function(u){return!1!==fr[u]})).map((function(u){return!1!==fr[u]?dp.createElement(rw,{key:u,direction:u,onResizeStart:Xe.onResizeStart,replaceStyles:_r&&_r[u],className:wr&&wr[u]},In&&In[u]?In[u]:null):null}));return dp.createElement("div",{className:Kr,style:Ar},no)},Resizable.prototype.render=function(){var u=this,Xe=Object.keys(this.props).reduce((function(Xe,Wt){return-1!==ow.indexOf(Wt)||(Xe[Wt]=u.props[Wt]),Xe}),{}),Wt=lib_assign(lib_assign(lib_assign({position:"relative",userSelect:this.state.isResizing?"none":"auto"},this.props.style),this.sizeStyle),{maxWidth:this.props.maxWidth,maxHeight:this.props.maxHeight,minWidth:this.props.minWidth,minHeight:this.props.minHeight,boxSizing:"border-box",flexShrink:0});this.state.flexBasis&&(Wt.flexBasis=this.state.flexBasis);var fr=this.props.as||"div";return dp.createElement(fr,lib_assign({style:Wt,className:this.props.className},Xe,{ref:function(Xe){Xe&&(u.resizable=Xe)}}),this.state.isResizing&&dp.createElement("div",{style:this.state.backgroundStyle}),this.renderResizer(["topLeft","top","topRight","left"]),this.props.children,this.renderResizer(["right","bottomLeft","bottom","bottomRight"]))},Resizable.defaultProps={as:"div",onResizeStart:function(){},onResize:function(){},onResizeStop:function(){},enable:{top:!0,right:!0,bottom:!0,left:!0,topRight:!0,bottomRight:!0,bottomLeft:!0,topLeft:!0},style:{},grid:[1,1],gridGap:[0,0],lockAspectRatio:!1,lockAspectRatioExtraWidth:0,lockAspectRatioExtraHeight:0,scale:1,resizeRatio:1,snapGap:0},Resizable}(dp.PureComponent),extendStatics=function(u,Xe){return extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,Xe){u.__proto__=Xe}||function(u,Xe){for(var Wt in Xe)Xe.hasOwnProperty(Wt)&&(u[Wt]=Xe[Wt])},extendStatics(u,Xe)};var react_rnd_lib_assign=function(){return react_rnd_lib_assign=Object.assign||function __assign(u){for(var Xe,Wt=1,fr=arguments.length;Wt<fr;Wt++)for(var _r in Xe=arguments[Wt])Object.prototype.hasOwnProperty.call(Xe,_r)&&(u[_r]=Xe[_r]);return u},react_rnd_lib_assign.apply(this,arguments)};var lw={width:"auto",height:"auto",display:"inline-block",position:"absolute",top:0,left:0},cw=function(u){function Rnd(Xe){var Wt=u.call(this,Xe)||this;return Wt.resizingPosition={x:0,y:0},Wt.offsetFromParent={left:0,top:0},Wt.resizableElement={current:null},Wt.originalPosition={x:0,y:0},Wt.state={resizing:!1,bounds:{top:0,right:0,bottom:0,left:0},maxWidth:Xe.maxWidth,maxHeight:Xe.maxHeight},Wt.onResizeStart=Wt.onResizeStart.bind(Wt),Wt.onResize=Wt.onResize.bind(Wt),Wt.onResizeStop=Wt.onResizeStop.bind(Wt),Wt.onDragStart=Wt.onDragStart.bind(Wt),Wt.onDrag=Wt.onDrag.bind(Wt),Wt.onDragStop=Wt.onDragStop.bind(Wt),Wt.getMaxSizesFromProps=Wt.getMaxSizesFromProps.bind(Wt),Wt}return function react_rnd_lib_extends(u,Xe){function __(){this.constructor=u}extendStatics(u,Xe),u.prototype=null===Xe?Object.create(Xe):(__.prototype=Xe.prototype,new __)}(Rnd,u),Rnd.prototype.componentDidMount=function(){this.updateOffsetFromParent();var u=this.offsetFromParent,Xe=u.left,Wt=u.top,fr=this.getDraggablePosition(),_r=fr.x,wr=fr.y;this.draggable.setState({x:_r-Xe,y:wr-Wt}),this.forceUpdate()},Rnd.prototype.getDraggablePosition=function(){var u=this.draggable.state;return{x:u.x,y:u.y}},Rnd.prototype.getParent=function(){return this.resizable&&this.resizable.parentNode},Rnd.prototype.getParentSize=function(){return this.resizable.getParentSize()},Rnd.prototype.getMaxSizesFromProps=function(){return{maxWidth:void 0===this.props.maxWidth?Number.MAX_SAFE_INTEGER:this.props.maxWidth,maxHeight:void 0===this.props.maxHeight?Number.MAX_SAFE_INTEGER:this.props.maxHeight}},Rnd.prototype.getSelfElement=function(){return this.resizable&&this.resizable.resizable},Rnd.prototype.getOffsetHeight=function(u){var Xe=this.props.scale;switch(this.props.bounds){case"window":return window.innerHeight/Xe;case"body":return document.body.offsetHeight/Xe;default:return u.offsetHeight}},Rnd.prototype.getOffsetWidth=function(u){var Xe=this.props.scale;switch(this.props.bounds){case"window":return window.innerWidth/Xe;case"body":return document.body.offsetWidth/Xe;default:return u.offsetWidth}},Rnd.prototype.onDragStart=function(u,Xe){this.props.onDragStart&&this.props.onDragStart(u,Xe);var Wt=this.getDraggablePosition();if(this.originalPosition=Wt,this.props.bounds){var fr,_r=this.getParent(),wr=this.props.scale;if("parent"===this.props.bounds)fr=_r;else{if("body"===this.props.bounds){var Ar=_r.getBoundingClientRect(),Kr=Ar.left,In=Ar.top,no=document.body.getBoundingClientRect(),io=-(Kr-_r.offsetLeft*wr-no.left)/wr,oo=-(In-_r.offsetTop*wr-no.top)/wr,ao=(document.body.offsetWidth-this.resizable.size.width*wr)/wr+io,so=(document.body.offsetHeight-this.resizable.size.height*wr)/wr+oo;return this.setState({bounds:{top:oo,right:ao,bottom:so,left:io}})}if("window"===this.props.bounds){if(!this.resizable)return;var co=_r.getBoundingClientRect(),ho=co.left,go=co.top,xo=-(ho-_r.offsetLeft*wr)/wr,ko=-(go-_r.offsetTop*wr)/wr;ao=(window.innerWidth-this.resizable.size.width*wr)/wr+xo,so=(window.innerHeight-this.resizable.size.height*wr)/wr+ko;return this.setState({bounds:{top:ko,right:ao,bottom:so,left:xo}})}"string"==typeof this.props.bounds?fr=document.querySelector(this.props.bounds):this.props.bounds instanceof HTMLElement&&(fr=this.props.bounds)}if(fr instanceof HTMLElement&&_r instanceof HTMLElement){var Co=fr.getBoundingClientRect(),Io=Co.left,zo=Co.top,Bo=_r.getBoundingClientRect(),ca=(Io-Bo.left)/wr,ua=zo-Bo.top;if(this.resizable){this.updateOffsetFromParent();var Da=this.offsetFromParent;this.setState({bounds:{top:ua-Da.top,right:ca+(fr.offsetWidth-this.resizable.size.width)-Da.left/wr,bottom:ua+(fr.offsetHeight-this.resizable.size.height)-Da.top,left:ca-Da.left/wr}})}}}},Rnd.prototype.onDrag=function(u,Xe){if(this.props.onDrag){var Wt=this.offsetFromParent,fr=Wt.left,_r=Wt.top;return this.props.dragAxis&&"both"!==this.props.dragAxis?"x"===this.props.dragAxis?this.props.onDrag(u,react_rnd_lib_assign(react_rnd_lib_assign({},Xe),{x:Xe.x+fr,y:this.originalPosition.y+_r,deltaY:0})):"y"===this.props.dragAxis?this.props.onDrag(u,react_rnd_lib_assign(react_rnd_lib_assign({},Xe),{x:this.originalPosition.x+fr,y:Xe.y+_r,deltaX:0})):void 0:this.props.onDrag(u,react_rnd_lib_assign(react_rnd_lib_assign({},Xe),{x:Xe.x+fr,y:Xe.y+_r}))}},Rnd.prototype.onDragStop=function(u,Xe){if(this.props.onDragStop){var Wt=this.offsetFromParent,fr=Wt.left,_r=Wt.top;return this.props.dragAxis&&"both"!==this.props.dragAxis?"x"===this.props.dragAxis?this.props.onDragStop(u,react_rnd_lib_assign(react_rnd_lib_assign({},Xe),{x:Xe.x+fr,y:this.originalPosition.y+_r,deltaY:0})):"y"===this.props.dragAxis?this.props.onDragStop(u,react_rnd_lib_assign(react_rnd_lib_assign({},Xe),{x:this.originalPosition.x+fr,y:Xe.y+_r,deltaX:0})):void 0:this.props.onDragStop(u,react_rnd_lib_assign(react_rnd_lib_assign({},Xe),{x:Xe.x+fr,y:Xe.y+_r}))}},Rnd.prototype.onResizeStart=function(u,Xe,Wt){u.stopPropagation(),this.setState({resizing:!0});var fr=this.props.scale,_r=this.offsetFromParent,wr=this.getDraggablePosition();if(this.resizingPosition={x:wr.x+_r.left,y:wr.y+_r.top},this.originalPosition=wr,this.props.bounds){var Ar=this.getParent(),Kr=void 0;"parent"===this.props.bounds?Kr=Ar:"body"===this.props.bounds?Kr=document.body:"window"===this.props.bounds?Kr=window:"string"==typeof this.props.bounds?Kr=document.querySelector(this.props.bounds):this.props.bounds instanceof HTMLElement&&(Kr=this.props.bounds);var In=this.getSelfElement();if(In instanceof Element&&(Kr instanceof HTMLElement||Kr===window)&&Ar instanceof HTMLElement){var no=this.getMaxSizesFromProps(),io=no.maxWidth,oo=no.maxHeight,ao=this.getParentSize();if(io&&"string"==typeof io)if(io.endsWith("%")){var so=Number(io.replace("%",""))/100;io=ao.width*so}else io.endsWith("px")&&(io=Number(io.replace("px","")));if(oo&&"string"==typeof oo)if(oo.endsWith("%")){so=Number(oo.replace("%",""))/100;oo=ao.height*so}else oo.endsWith("px")&&(oo=Number(oo.replace("px","")));var co=In.getBoundingClientRect(),ho=co.left,go=co.top,xo="window"===this.props.bounds?{left:0,top:0}:Kr.getBoundingClientRect(),ko=xo.left,Co=xo.top,Io=this.getOffsetWidth(Kr),zo=this.getOffsetHeight(Kr),Bo=Xe.toLowerCase().endsWith("left"),ca=Xe.toLowerCase().endsWith("right"),ua=Xe.startsWith("top"),Da=Xe.startsWith("bottom");if((Bo||ua)&&this.resizable){var ns=(ho-ko)/fr+this.resizable.size.width;this.setState({maxWidth:ns>Number(io)?io:ns})}if(ca||this.props.lockAspectRatio&&!Bo&&!ua){ns=Io+(ko-ho)/fr;this.setState({maxWidth:ns>Number(io)?io:ns})}if((ua||Bo)&&this.resizable){ns=(go-Co)/fr+this.resizable.size.height;this.setState({maxHeight:ns>Number(oo)?oo:ns})}if(Da||this.props.lockAspectRatio&&!ua&&!Bo){ns=zo+(Co-go)/fr;this.setState({maxHeight:ns>Number(oo)?oo:ns})}}}else this.setState({maxWidth:this.props.maxWidth,maxHeight:this.props.maxHeight});this.props.onResizeStart&&this.props.onResizeStart(u,Xe,Wt)},Rnd.prototype.onResize=function(u,Xe,Wt,fr){var _r=this,wr={x:this.originalPosition.x,y:this.originalPosition.y},Ar=-fr.width,Kr=-fr.height;["top","left","topLeft","bottomLeft","topRight"].includes(Xe)&&("bottomLeft"===Xe?wr.x+=Ar:("topRight"===Xe||(wr.x+=Ar),wr.y+=Kr));var In=this.draggable.state;wr.x===In.x&&wr.y===In.y||(0,um.flushSync)((function(){_r.draggable.setState(wr)})),this.updateOffsetFromParent();var no=this.offsetFromParent,io=this.getDraggablePosition().x+no.left,oo=this.getDraggablePosition().y+no.top;this.resizingPosition={x:io,y:oo},this.props.onResize&&this.props.onResize(u,Xe,Wt,fr,{x:io,y:oo})},Rnd.prototype.onResizeStop=function(u,Xe,Wt,fr){this.setState({resizing:!1});var _r=this.getMaxSizesFromProps(),wr=_r.maxWidth,Ar=_r.maxHeight;this.setState({maxWidth:wr,maxHeight:Ar}),this.props.onResizeStop&&this.props.onResizeStop(u,Xe,Wt,fr,this.resizingPosition)},Rnd.prototype.updateSize=function(u){this.resizable&&this.resizable.updateSize({width:u.width,height:u.height})},Rnd.prototype.updatePosition=function(u){this.draggable.setState(u)},Rnd.prototype.updateOffsetFromParent=function(){var u=this.props.scale,Xe=this.getParent(),Wt=this.getSelfElement();if(!Xe||null===Wt)return{top:0,left:0};var fr=Xe.getBoundingClientRect(),_r=fr.left,wr=fr.top,Ar=Wt.getBoundingClientRect(),Kr=this.getDraggablePosition(),In=Xe.scrollLeft,no=Xe.scrollTop;this.offsetFromParent={left:Ar.left-_r+In-Kr.x*u,top:Ar.top-wr+no-Kr.y*u}},Rnd.prototype.render=function(){var u=this,Xe=this.props,Wt=Xe.disableDragging,fr=Xe.style,_r=Xe.dragHandleClassName,wr=Xe.position,Ar=Xe.onMouseDown,Kr=Xe.onMouseUp,In=Xe.dragAxis,no=Xe.dragGrid,io=Xe.bounds,oo=Xe.enableUserSelectHack,ao=Xe.cancel,so=Xe.children,co=(Xe.onResizeStart,Xe.onResize,Xe.onResizeStop,Xe.onDragStart,Xe.onDrag,Xe.onDragStop,Xe.resizeHandleStyles),ho=Xe.resizeHandleClasses,go=Xe.resizeHandleComponent,xo=Xe.enableResizing,ko=Xe.resizeGrid,Co=Xe.resizeHandleWrapperClass,Io=Xe.resizeHandleWrapperStyle,zo=Xe.scale,Bo=Xe.allowAnyClick,ca=function __rest(u,Xe){var Wt={};for(var fr in u)Object.prototype.hasOwnProperty.call(u,fr)&&Xe.indexOf(fr)<0&&(Wt[fr]=u[fr]);if(null!=u&&"function"==typeof Object.getOwnPropertySymbols){var _r=0;for(fr=Object.getOwnPropertySymbols(u);_r<fr.length;_r++)Xe.indexOf(fr[_r])<0&&Object.prototype.propertyIsEnumerable.call(u,fr[_r])&&(Wt[fr[_r]]=u[fr[_r]])}return Wt}(Xe,["disableDragging","style","dragHandleClassName","position","onMouseDown","onMouseUp","dragAxis","dragGrid","bounds","enableUserSelectHack","cancel","children","onResizeStart","onResize","onResizeStop","onDragStart","onDrag","onDragStop","resizeHandleStyles","resizeHandleClasses","resizeHandleComponent","enableResizing","resizeGrid","resizeHandleWrapperClass","resizeHandleWrapperStyle","scale","allowAnyClick"]),ua=this.props.default?react_rnd_lib_assign({},this.props.default):void 0;delete ca.default;var Da,ns=Wt||_r?{cursor:"auto"}:{cursor:"move"},yl=react_rnd_lib_assign(react_rnd_lib_assign(react_rnd_lib_assign({},lw),ns),fr),vl=this.offsetFromParent,kl=vl.left,Al=vl.top;wr&&(Da={x:wr.x-kl,y:wr.y-Al});var Ml,Rl=this.state.resizing?void 0:Da,Ol=this.state.resizing?"both":In;return(0,dp.createElement)(Xx(),{ref:function(Xe){Xe&&(u.draggable=Xe)},handle:_r?".".concat(_r):void 0,defaultPosition:ua,onMouseDown:Ar,onMouseUp:Kr,onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop,axis:Ol,disabled:Wt,grid:no,bounds:io?this.state.bounds:void 0,position:Rl,enableUserSelectHack:oo,cancel:ao,scale:zo,allowAnyClick:Bo,nodeRef:this.resizableElement},(0,dp.createElement)(sw,react_rnd_lib_assign({},ca,{ref:function(Xe){Xe&&(u.resizable=Xe,u.resizableElement.current=Xe.resizable)},defaultSize:ua,size:this.props.size,enable:"boolean"==typeof xo?(Ml=xo,{bottom:Ml,bottomLeft:Ml,bottomRight:Ml,left:Ml,right:Ml,top:Ml,topLeft:Ml,topRight:Ml}):xo,onResizeStart:this.onResizeStart,onResize:this.onResize,onResizeStop:this.onResizeStop,style:yl,minWidth:this.props.minWidth,minHeight:this.props.minHeight,maxWidth:this.state.resizing?this.state.maxWidth:this.props.maxWidth,maxHeight:this.state.resizing?this.state.maxHeight:this.props.maxHeight,grid:ko,handleWrapperClass:Co,handleWrapperStyle:Io,lockAspectRatio:this.props.lockAspectRatio,lockAspectRatioExtraWidth:this.props.lockAspectRatioExtraWidth,lockAspectRatioExtraHeight:this.props.lockAspectRatioExtraHeight,handleStyles:co,handleClasses:ho,handleComponent:go,scale:this.props.scale}),so))},Rnd.defaultProps={maxWidth:Number.MAX_SAFE_INTEGER,maxHeight:Number.MAX_SAFE_INTEGER,scale:1,onResizeStart:function(){},onResize:function(){},onResizeStop:function(){},onDragStart:function(){},onDrag:function(){},onDragStop:function(){}},Rnd}(dp.PureComponent);class ErrorBoundary extends dp.Component{constructor(u){super(u),this.state={hasError:!1}}componentDidCatch(u,Xe){this.setState({hasError:!0}),console.error(u,Xe)}render(){return this.state.hasError?dp.createElement(gx,{color:"error"},Gx("error.unexpected")):this.props.children}}var uw=__webpack_require__.p+"706ae30aa9b6377185e2.png";function getIconButtonUtilityClass(u){return(0,bp.Ay)("MuiIconButton",u)}var dw=(0,uf.A)("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge"]);const hw=["edge","children","className","color","disabled","disableFocusRipple","size"],pw=(0,Up.Ay)(jf,{name:"MuiIconButton",slot:"Root",overridesResolver:(u,Xe)=>{const{ownerState:Wt}=u;return[Xe.root,"default"!==Wt.color&&Xe[`color${(0,Vp.A)(Wt.color)}`],Wt.edge&&Xe[`edge${(0,Vp.A)(Wt.edge)}`],Xe[`size${(0,Vp.A)(Wt.size)}`]]}})((({theme:u,ownerState:Xe})=>(0,_p.A)({textAlign:"center",flex:"0 0 auto",fontSize:u.typography.pxToRem(24),padding:8,borderRadius:"50%",overflow:"visible",color:(u.vars||u).palette.action.active,transition:u.transitions.create("background-color",{duration:u.transitions.duration.shortest})},!Xe.disableRipple&&{"&:hover":{backgroundColor:u.vars?`rgba(${u.vars.palette.action.activeChannel} / ${u.vars.palette.action.hoverOpacity})`:(0,Zp.X4)(u.palette.action.active,u.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"start"===Xe.edge&&{marginLeft:"small"===Xe.size?-3:-12},"end"===Xe.edge&&{marginRight:"small"===Xe.size?-3:-12})),(({theme:u,ownerState:Xe})=>{var Wt;const fr=null==(Wt=(u.vars||u).palette)?void 0:Wt[Xe.color];return(0,_p.A)({},"inherit"===Xe.color&&{color:"inherit"},"inherit"!==Xe.color&&"default"!==Xe.color&&(0,_p.A)({color:null==fr?void 0:fr.main},!Xe.disableRipple&&{"&:hover":(0,_p.A)({},fr&&{backgroundColor:u.vars?`rgba(${fr.mainChannel} / ${u.vars.palette.action.hoverOpacity})`:(0,Zp.X4)(fr.main,u.palette.action.hoverOpacity)},{"@media (hover: none)":{backgroundColor:"transparent"}})}),"small"===Xe.size&&{padding:5,fontSize:u.typography.pxToRem(18)},"large"===Xe.size&&{padding:12,fontSize:u.typography.pxToRem(28)},{[`&.${dw.disabled}`]:{backgroundColor:"transparent",color:(u.vars||u).palette.action.disabled}})})),fw=dp.forwardRef((function IconButton(u,Xe){const Wt=(0,$p.b)({props:u,name:"MuiIconButton"}),{edge:fr=!1,children:_r,className:wr,color:Ar="default",disabled:Kr=!1,disableFocusRipple:In=!1,size:no="medium"}=Wt,io=(0,yp.A)(Wt,hw),oo=(0,_p.A)({},Wt,{edge:fr,color:Ar,disabled:Kr,disableFocusRipple:In,size:no}),ao=(u=>{const{classes:Xe,disabled:Wt,color:fr,edge:_r,size:wr}=u,Ar={root:["root",Wt&&"disabled","default"!==fr&&`color${(0,Vp.A)(fr)}`,_r&&`edge${(0,Vp.A)(_r)}`,`size${(0,Vp.A)(wr)}`]};return(0,xp.A)(Ar,getIconButtonUtilityClass,Xe)})(oo);return(0,Fp.jsx)(pw,(0,_p.A)({className:(0,vp.A)(ao.root,wr),centerRipple:!0,focusRipple:!In,disabled:Kr,ref:Xe},io,{ownerState:oo,children:_r}))}));var mw=fw;function ViewerButton(u){var Xe=this;const{isLoading:Wt,onClick:fr,tooltipId:_r,tooltip:wr,icon:Ar}=u;return dp.createElement(oy,{id:_r,title:wr,placement:"left",arrow:!0},dp.createElement("span",null,dp.createElement(mw,{size:"small",disabled:Wt,onClick:function onClick(){_newArrowCheck(this,Xe),Wt||fr()}.bind(this)},Ar)))}var gw=void 0;const yw=function JakartoViewerFn(u){var Xe=this;_newArrowCheck(this,gw);const{isVisible:Wt,isLoading:fr,globalTheme:_r}=u,wr=JMap.Application.UI.SidePanel.getWidthOpenInPixel()-JMap.Application.UI.SidePanel.getWidthCloseInPixel(),Ar=Math.floor(10*wr/16),[Kr,In]=(0,dp.useState)(!1),[no,io]=(0,dp.useState)(`${Ar}px`),[oo,ao]=(0,dp.useState)(`${wr}px`),[so,co]=(0,dp.useState)({x:0,y:window.innerHeight/2});return dp.createElement(ErrorBoundary,null,dp.createElement(cw,{size:{width:oo,height:no},position:so,disableDragging:Kr,bounds:"window",minWidth:"225px",minHeight:"150px",style:{display:Wt?"inline-block":"none",backgroundColor:_r.palette.background.paper,borderTopLeftRadius:"0.1875rem",borderTopRightRadius:"0.1875rem"},onDragStop:function onDragStop(u,Wt){_newArrowCheck(this,Xe);const fr={x:Wt.x,y:Wt.y};co(fr)}.bind(this),onResizeStop:function onResizeStop(u,Wt,fr,_r,wr){_newArrowCheck(this,Xe);const Ar=document.getElementById(xy)?.getElementsByTagName("canvas")[0].getContext("webgl");!Ar||Ar.canvas.width===Ar.canvas.clientWidth&&Ar.canvas.height===Ar.canvas.clientHeight||(Ar.canvas.width=Ar.canvas.clientWidth,Ar.canvas.height=Ar.canvas.clientHeight,Ar.viewport(0,0,Ar.drawingBufferWidth,Ar.drawingBufferHeight),window.dispatchEvent(new Event("resize")))}.bind(this),onResize:function onResize(u,Wt,fr,_r,wr){_newArrowCheck(this,Xe);const Ar=document.getElementById(xy)?.getElementsByTagName("canvas");co(wr),Ar&&Ar.length>0&&(fr.style.width!==oo&&(ao(fr.style.width),Ar[0].style.width=fr.style.width),fr.style.height!==no&&(io(fr.style.height),Ar[0].style.height=`calc(${fr.style.height} - ${wy})`))}.bind(this)},dp.createElement(ux,null,dp.createElement(Sx,{sx:{backgroundColor:function backgroundColor(u){return _newArrowCheck(this,Xe),u.palette.primary.main}.bind(this)},avatar:dp.createElement(Px,{component:"img",src:uw,alt:"Jakarto Logo",sx:{marginLeft:"0.25rem",maxHeight:`calc(${wy} - 0.25rem)`,height:"auto",width:"auto",pointerEvents:"none",imageRendering:"crisp-edges"}}),action:dp.createElement(Dx,{direction:"row"},Wt?dp.createElement(ViewerButton,{isLoading:fr,onClick:function onClick(){_newArrowCheck(this,Xe),Ew.openJakartoWindowAtViewerPosition()}.bind(this),tooltip:Gx("jakarto.viewer.button.external.tooltip"),tooltipId:"open-jakartowns-button",icon:dp.createElement(nx.A,{sx:{background:function background(u){return _newArrowCheck(this,Xe),u.palette.background.default}.bind(this),borderRadius:".3rem"}})}):null,Wt?dp.createElement(ViewerButton,{isLoading:fr,onClick:function onClick(){_newArrowCheck(this,Xe),Ew.toggleIsVisible()}.bind(this),tooltip:Gx("jakarto.viewer.button.close.tooltip"),tooltipId:"hide-viewer-button",icon:dp.createElement(rx.A,{sx:{background:function background(u){return _newArrowCheck(this,Xe),u.palette.background.default}.bind(this),borderRadius:".3rem"}})}):null)}),dp.createElement(Bx,{id:"jmap-jakarto-viewer-container",onMouseEnter:function onMouseEnter(){return _newArrowCheck(this,Xe),In(!0)}.bind(this),onMouseLeave:function onMouseLeave(){return _newArrowCheck(this,Xe),In(!1)}.bind(this),sx:{height:`calc(100% - ${wy})`,width:"100%",padding:0,"&:last-child":{paddingBottom:0}}},dp.createElement(Zx,{id:ky})))))}.bind(void 0),_w=Qb(function(u){return _newArrowCheck(this,gw),{isVisible:getExtensionState(u).viewer.isVisible,isLoading:getExtensionState(u).viewer.isLoading,globalTheme:getAppState(u).ui.theme}}.bind(void 0))(yw);var vw=void 0;const bw=function FloatingPanelFn(u){return _newArrowCheck(this,vw),dp.createElement(Xe.a,{theme:u.theme},dp.createElement(_w,null))}.bind(void 0),xw=Qb(function(u){return _newArrowCheck(this,vw),{theme:getAppState(u).ui.theme}}.bind(void 0))(bw),ww=function FloatingPanel(){return _newArrowCheck(this,vw),dp.createElement(ex,{store:store_getStore()},dp.createElement(xw,null))}.bind(void 0);var Sw=__webpack_require__(5338);let kw;function mountJakartownsApp(){var u=this;return new Promise(function(Xe,Wt){var fr=this;_newArrowCheck(this,u),jakartowns&&jakartowns.app.create_jakartowns(`#${ky}`,{},function(u){var _r=this;_newArrowCheck(this,fr),jakartowns&&(jakartowns.app.jakartowns_instance=u);const wr=document.getElementsByTagName("nav");0!==wr.length&&wr[0].remove();const Ar=getExtensionState().viewer.parameters.location,Kr=0!==Ar.x&&0!==Ar.y?Ar:JMap.Map.getCenter();if(jakartowns&&jakartowns.app.jakartowns_instance){const u=getAdjustedLocation(Kr);jakartowns.app.jakartowns_instance.setPosition({longitude:u.x,latitude:u.y}).then(function(u){_newArrowCheck(this,_r),Xe(u)}.bind(this)).catch(function(u){_newArrowCheck(this,_r),console.error(u),Wt(u)}.bind(this))}}.bind(this))}.bind(this))}let Aw=null,Tw="";const Ew={toggleIsVisible:function(){if(getExtensionState().viewer.isLoading)throw Error("Can't change Jakarto visibility while it is loading");store_getStore().dispatch(viewerActionCreator_setIsVisible(!getExtensionState().viewer.isVisible))},toggleIsInteractorActive:function(){store_getStore().dispatch(viewerActionCreator_setIsInteractorActive(!getExtensionState().viewer.isInteractorActive))},setParameters:function(u){!function checkParams(u){if(!u)throw new Error("Can't set empty parameters. To clear them, use clearParameters.");if(void 0!==u.fov&&(u.fov<10||u.fov>100))throw new Error("Invalid fov value. Values must be between 10 and 100.");JMap.Geometry.checkLocation(u.location)}(u);const Xe=getAdjustedLocation(u.location);store_getStore().dispatch(viewerActionCreator_setParameters({...u,location:Xe}))},isAuthenticated:function(){var u=this;return new Promise(function(Xe,Wt){var fr=this;_newArrowCheck(this,u),cv.isAuthenticated().then(function(u){_newArrowCheck(this,fr),Xe(u)}.bind(this)).catch(function(u){_newArrowCheck(this,fr),console.error(u),Wt()}.bind(this))}.bind(this))},openJakartoWindowAtViewerPosition:function(){const u=function getJakartoWindowLocation(u){let Xe=`${fr}/?lat=${u.location.y}&lng=${u.location.x}`;return void 0!==u.pan&&(Xe=Xe.concat(`&pan=${u.pan}`)),void 0!==u.tilt&&(Xe=Xe.concat(`&tilt=${u.tilt}`)),void 0!==u.fov&&(Xe=Xe.concat(`&fov=${u.fov}`)),Xe}(getExtensionState().viewer.parameters);null===Aw||Aw.closed?(Aw=window.open(u,"jakarto-panorama-external"),Tw=u):Tw!==u&&(Aw.location.replace(u),null!==Aw&&Aw.focus())}},Cw={getJSVersion:function(){return"2.1.2"},setExtensionEnableState:function(u,Xe){store_getStore().dispatch(actions_extensionActionCreator_enableStateExtension(u)),Xe?destroyJakartownsUI():u?function initializeJakartowns(){var u=this;(function createJakartownsUI(){var u=this;try{store_getStore().dispatch(viewerActionCreator_setIsLoading(!0)),function createFloatingPanelInBody(){let u=document.getElementById(Sy);const Xe=document.getElementsByClassName("jmapcloud-ng-layout")[0];!u&&Xe&&(u=document.createElement("div"),u.id=Sy,u.className=Sy,u.style.position="absolute",u.style.top="0",u.style.left="0",u.style.zIndex="1",Xe.appendChild(u)),kw=Sw.H(u),kw.render(dp.createElement(ww,null))}(),function createJakartownsInstance(){var u=this;return new Promise(function(Xe,Wt){var fr=this;_newArrowCheck(this,u),window.hasOwnProperty("jakartowns")?mountJakartownsApp().then(function(u){return _newArrowCheck(this,fr),Xe(u)}.bind(this)).catch(function(u){_newArrowCheck(this,fr),console.error(u),Wt(u)}.bind(this)):JMap.Util.loadJSFile("https://maps.jakarto.com/api/v1.js").then(function(){var u=this;_newArrowCheck(this,fr),mountJakartownsApp().then(function(Wt){return _newArrowCheck(this,u),Xe(Wt)}.bind(this)).catch(function(Xe){_newArrowCheck(this,u),console.error(Xe),Wt(Xe)}.bind(this))}.bind(this))}.bind(this))}().then(function(Xe){_newArrowCheck(this,u),function createViewerLocationMarker(){var u=this;const Xe=JMap.Map.getMap(),Wt="marker",fr=new Image(65,65);Xe.loadImage(Py).then(function(_r){_newArrowCheck(this,u),Xe.hasImage(Wt)&&Xe.removeImage(Wt),Xe.addImage(Wt,_r.data),fr.src=Py,Iy=new Cy.Marker({element:fr,draggable:!0,rotationAlignment:"map",pitchAlignment:"map"}),setMarkerLngLat(getExtensionState().viewer.parameters.location),Iy.addTo(Xe),Iy.on("dragend",onDragEnd)}.bind(this)).catch(function(Xe){_newArrowCheck(this,u),console.error("An error occurred while loading the marker image",Xe)}.bind(this))}(),JMap.Application.Message.info(`Nearest panorama is ${Xe.distance.toFixed(3)} km away from initial position`),store_getStore().dispatch(viewerActionCreator_setIsLoading(!1))}.bind(this)).catch(function(Xe){_newArrowCheck(this,u),console.error(Xe),store_getStore().dispatch(viewerActionCreator_setIsLoading(!1))}.bind(this))}catch(u){console.error(u),store_getStore().dispatch(viewerActionCreator_setIsLoading(!1))}})(),function startViewerListeners(){window.addEventListener(Ay,handlePositionChange),window.addEventListener(Ty,handleRotationChange),window.addEventListener(Ey,handleTiltChange),window.addEventListener("fov",handleFovChange)}(),addCoverageLayers(),JMap.Event.Map.on.mapDestroy(wr.JAKARTO_MAP_DESTROY_UI,function(){_newArrowCheck(this,u),Cw.setExtensionEnableState(!1,!0)}.bind(this)),JMap.Event.Map.on.zoom(wr.JAKARTO_MAP_ZOOM_CHANGE,function(Xe){return _newArrowCheck(this,u),by.setZoomLevel(Xe.zoom)}.bind(this))}():function cleanupJakartowns(){destroyJakartownsUI(),function removeViewerListeners(){window.removeEventListener(Ay,handlePositionChange),window.removeEventListener(Ty,handleRotationChange),window.removeEventListener(Ey,handleTiltChange),window.removeEventListener("fov",handleFovChange)}(),function removeCoverageLayers(){var u=this;const Xe=JMap.Map.getMap();getAllWMTSYearVariables().forEach(function(Wt){_newArrowCheck(this,u),Xe.removeLayer(getWMTSLayerIdFromYear(Wt)),Xe.removeSource(getWMTSLayerSourceFromYear(Wt))}.bind(this)),Xe.removeLayer(Ar),Xe.removeSource(Kr)}(),JMap.Event.Map.remove(wr.JAKARTO_MAP_DESTROY_UI),JMap.Event.Map.remove(wr.JAKARTO_MAP_ZOOM_CHANGE)}()}},Pw={...Cw,Viewer:Ew,Layer:by};function destroyJakartownsUI(){!function destroyFloatingPanelInBody(){kw&&(kw.unmount(),kw=void 0)}(),function destroyJakartownsInstance(){jakartowns&&jakartowns.app.jakartowns_instance&&(jakartowns.app.jakartowns_instance.unmount(),jakartowns.app.jakartowns_instance=void 0)}(),function destroyViewerLocationMarker(){Iy&&Iy.remove()}()}var Iw=__webpack_require__(838),Mw=__webpack_require__(1656),Rw=__webpack_require__(2048),zw=__webpack_require__(5003),Ow=(0,zw.A)((0,Fp.jsx)("path",{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"}),"CheckBoxOutlineBlank"),Lw=(0,zw.A)((0,Fp.jsx)("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckBox"),Dw=(0,zw.A)((0,Fp.jsx)("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z"}),"IndeterminateCheckBox");function getCheckboxUtilityClass(u){return(0,bp.Ay)("MuiCheckbox",u)}var Fw=(0,uf.A)("MuiCheckbox",["root","checked","disabled","indeterminate","colorPrimary","colorSecondary","sizeSmall","sizeMedium"]);const jw=["checkedIcon","color","icon","indeterminate","indeterminateIcon","inputProps","size","className"],Bw=(0,Up.Ay)(Gf,{shouldForwardProp:u=>(0,Hp.A)(u)||"classes"===u,name:"MuiCheckbox",slot:"Root",overridesResolver:(u,Xe)=>{const{ownerState:Wt}=u;return[Xe.root,Wt.indeterminate&&Xe.indeterminate,Xe[`size${(0,Vp.A)(Wt.size)}`],"default"!==Wt.color&&Xe[`color${(0,Vp.A)(Wt.color)}`]]}})((({theme:u,ownerState:Xe})=>(0,_p.A)({color:(u.vars||u).palette.text.secondary},!Xe.disableRipple&&{"&:hover":{backgroundColor:u.vars?`rgba(${"default"===Xe.color?u.vars.palette.action.activeChannel:u.vars.palette[Xe.color].mainChannel} / ${u.vars.palette.action.hoverOpacity})`:(0,Zp.X4)("default"===Xe.color?u.palette.action.active:u.palette[Xe.color].main,u.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"default"!==Xe.color&&{[`&.${Fw.checked}, &.${Fw.indeterminate}`]:{color:(u.vars||u).palette[Xe.color].main},[`&.${Fw.disabled}`]:{color:(u.vars||u).palette.action.disabled}}))),Nw=(0,Fp.jsx)(Lw,{}),Vw=(0,Fp.jsx)(Ow,{}),Uw=(0,Fp.jsx)(Dw,{}),$w=dp.forwardRef((function Checkbox(u,Xe){var Wt,fr;const _r=(0,$p.b)({props:u,name:"MuiCheckbox"}),{checkedIcon:wr=Nw,color:Ar="primary",icon:Kr=Vw,indeterminate:In=!1,indeterminateIcon:no=Uw,inputProps:io,size:oo="medium",className:ao}=_r,so=(0,yp.A)(_r,jw),co=In?no:Kr,ho=In?no:wr,go=(0,_p.A)({},_r,{color:Ar,indeterminate:In,size:oo}),xo=(u=>{const{classes:Xe,indeterminate:Wt,color:fr,size:_r}=u,wr={root:["root",Wt&&"indeterminate",`color${(0,Vp.A)(fr)}`,`size${(0,Vp.A)(_r)}`]},Ar=(0,xp.A)(wr,getCheckboxUtilityClass,Xe);return(0,_p.A)({},Xe,Ar)})(go);return(0,Fp.jsx)(Bw,(0,_p.A)({type:"checkbox",inputProps:(0,_p.A)({"data-indeterminate":In},io),icon:dp.cloneElement(co,{fontSize:null!=(Wt=co.props.fontSize)?Wt:oo}),checkedIcon:dp.cloneElement(ho,{fontSize:null!=(fr=ho.props.fontSize)?fr:oo}),ownerState:go,ref:Xe,className:(0,vp.A)(xo.root,ao)},so,{classes:xo}))}));var Ww=$w,qw=__webpack_require__(7091);function getCollapseUtilityClass(u){return(0,bp.Ay)("MuiCollapse",u)}(0,uf.A)("MuiCollapse",["root","horizontal","vertical","entered","hidden","wrapper","wrapperInner"]);const Zw=["addEndListener","children","className","collapsedSize","component","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","orientation","style","timeout","TransitionComponent"],Hw=(0,Up.Ay)("div",{name:"MuiCollapse",slot:"Root",overridesResolver:(u,Xe)=>{const{ownerState:Wt}=u;return[Xe.root,Xe[Wt.orientation],"entered"===Wt.state&&Xe.entered,"exited"===Wt.state&&!Wt.in&&"0px"===Wt.collapsedSize&&Xe.hidden]}})((({theme:u,ownerState:Xe})=>(0,_p.A)({height:0,overflow:"hidden",transition:u.transitions.create("height")},"horizontal"===Xe.orientation&&{height:"auto",width:0,transition:u.transitions.create("width")},"entered"===Xe.state&&(0,_p.A)({height:"auto",overflow:"visible"},"horizontal"===Xe.orientation&&{width:"auto"}),"exited"===Xe.state&&!Xe.in&&"0px"===Xe.collapsedSize&&{visibility:"hidden"}))),Gw=(0,Up.Ay)("div",{name:"MuiCollapse",slot:"Wrapper",overridesResolver:(u,Xe)=>Xe.wrapper})((({ownerState:u})=>(0,_p.A)({display:"flex",width:"100%"},"horizontal"===u.orientation&&{width:"auto",height:"100%"}))),Kw=(0,Up.Ay)("div",{name:"MuiCollapse",slot:"WrapperInner",overridesResolver:(u,Xe)=>Xe.wrapperInner})((({ownerState:u})=>(0,_p.A)({width:"100%"},"horizontal"===u.orientation&&{width:"auto",height:"100%"}))),Xw=dp.forwardRef((function Collapse(u,Xe){const Wt=(0,$p.b)({props:u,name:"MuiCollapse"}),{addEndListener:fr,children:_r,className:wr,collapsedSize:Ar="0px",component:Kr,easing:In,in:no,onEnter:io,onEntered:oo,onEntering:ao,onExit:so,onExited:co,onExiting:ho,orientation:go="vertical",style:xo,timeout:ko=qw.p0.standard,TransitionComponent:Co=_m}=Wt,Io=(0,yp.A)(Wt,Zw),zo=(0,_p.A)({},Wt,{orientation:go,collapsedSize:Ar}),Bo=(u=>{const{orientation:Xe,classes:Wt}=u,fr={root:["root",`${Xe}`],entered:["entered"],hidden:["hidden"],wrapper:["wrapper",`${Xe}`],wrapperInner:["wrapperInner",`${Xe}`]};return(0,xp.A)(fr,getCollapseUtilityClass,Wt)})(zo),ca=styles_useTheme_useTheme(),ua=(0,lf.A)(),Da=dp.useRef(null),ns=dp.useRef(),yl="number"==typeof Ar?`${Ar}px`:Ar,vl="horizontal"===go,kl=vl?"width":"height",Al=dp.useRef(null),Ml=(0,Xp.A)(Xe,Al),normalizedTransitionCallback=u=>Xe=>{if(u){const Wt=Al.current;void 0===Xe?u(Wt):u(Wt,Xe)}},getWrapperSize=()=>Da.current?Da.current[vl?"clientWidth":"clientHeight"]:0,Rl=normalizedTransitionCallback(((u,Xe)=>{Da.current&&vl&&(Da.current.style.position="absolute"),u.style[kl]=yl,io&&io(u,Xe)})),Ol=normalizedTransitionCallback(((u,Xe)=>{const Wt=getWrapperSize();Da.current&&vl&&(Da.current.style.position="");const{duration:fr,easing:_r}=getTransitionProps({style:xo,timeout:ko,easing:In},{mode:"enter"});if("auto"===ko){const Xe=ca.transitions.getAutoHeightDuration(Wt);u.style.transitionDuration=`${Xe}ms`,ns.current=Xe}else u.style.transitionDuration="string"==typeof fr?fr:`${fr}ms`;u.style[kl]=`${Wt}px`,u.style.transitionTimingFunction=_r,ao&&ao(u,Xe)})),Ll=normalizedTransitionCallback(((u,Xe)=>{u.style[kl]="auto",oo&&oo(u,Xe)})),Dl=normalizedTransitionCallback((u=>{u.style[kl]=`${getWrapperSize()}px`,so&&so(u)})),Bl=normalizedTransitionCallback(co),Nl=normalizedTransitionCallback((u=>{const Xe=getWrapperSize(),{duration:Wt,easing:fr}=getTransitionProps({style:xo,timeout:ko,easing:In},{mode:"exit"});if("auto"===ko){const Wt=ca.transitions.getAutoHeightDuration(Xe);u.style.transitionDuration=`${Wt}ms`,ns.current=Wt}else u.style.transitionDuration="string"==typeof Wt?Wt:`${Wt}ms`;u.style[kl]=yl,u.style.transitionTimingFunction=fr,ho&&ho(u)}));return(0,Fp.jsx)(Co,(0,_p.A)({in:no,onEnter:Rl,onEntered:Ll,onEntering:Ol,onExit:Dl,onExited:Bl,onExiting:Nl,addEndListener:u=>{"auto"===ko&&ua.start(ns.current||0,u),fr&&fr(Al.current,u)},nodeRef:Al,timeout:"auto"===ko?null:ko},Io,{children:(u,Xe)=>(0,Fp.jsx)(Hw,(0,_p.A)({as:Kr,className:(0,vp.A)(Bo.root,wr,{entered:Bo.entered,exited:!no&&"0px"===yl&&Bo.hidden}[u]),style:(0,_p.A)({[vl?"minWidth":"minHeight"]:yl},xo),ref:Ml},Xe,{ownerState:(0,_p.A)({},zo,{state:u}),children:(0,Fp.jsx)(Gw,{ownerState:(0,_p.A)({},zo,{state:u}),className:Bo.wrapper,ref:Da,children:(0,Fp.jsx)(Kw,{ownerState:(0,_p.A)({},zo,{state:u}),className:Bo.wrapperInner,children:_r})})}))}))}));Xw.muiSupportAuto=!0;var Yw=Xw,Jw=__webpack_require__(5673),Qw=__webpack_require__(6768);function LayerItem(u){var Xe=this;const{isVisible:Wt,id:fr}=u,_r={maxWidth:"1.25rem",width:"1.25rem"},wr=Wt?dp.createElement(Jw.A,{sx:_r}):dp.createElement(Qw.A,{sx:_r});return dp.createElement(Zx,{id:fr,sx:{height:"2.25rem",minHeight:"2.25rem",maxHeight:"2.25rem",display:"flex",justifyContent:"flex-start",alignItems:"center",width:"100%",minWidth:"100%",paddingTop:function paddingTop(u){return _newArrowCheck(this,Xe),u.spacing(.5)}.bind(this),paddingBottom:function paddingBottom(u){return _newArrowCheck(this,Xe),u.spacing(.5)}.bind(this),borderBottom:function borderBottom(u){return _newArrowCheck(this,Xe),`0.0625rem solid ${u.palette.divider}`}.bind(this),"& > #jakarto-layer-visibility-button":{display:function display(Wt){return _newArrowCheck(this,Xe),u.isVisible?"none":"block"}.bind(this)},"&:hover > #jakarto-layer-visibility-button":{display:"block"}},fontWeight:"fontWeightMedium"},dp.createElement("img",{style:{maxWidth:"1rem",width:"1rem",marginLeft:"0.5rem",filter:u.isVisible?"":"grayscale(100%)"},src:u.src}),dp.createElement(gx,{variant:"body2",noWrap:!0,color:"textPrimary",sx:{paddingLeft:0,flexGrow:1,userSelect:"none",marginLeft:"0.5rem"}},u.layerName),dp.createElement(mw,{id:"jakarto-layer-visibility-button",color:"secondary",size:"small",onClick:u.onClick},wr))}function hasValue(u){return null!=u&&!(Array.isArray(u)&&0===u.length)}function isFilled(u,Xe=!1){return u&&(hasValue(u.value)&&""!==u.value||Xe&&hasValue(u.defaultValue)&&""!==u.defaultValue)}var eS=__webpack_require__(8593);function getFormControlUtilityClasses(u){return(0,bp.Ay)("MuiFormControl",u)}(0,uf.A)("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"]);const tS=["children","className","color","component","disabled","error","focused","fullWidth","hiddenLabel","margin","required","size","variant"],rS=(0,Up.Ay)("div",{name:"MuiFormControl",slot:"Root",overridesResolver:({ownerState:u},Xe)=>(0,_p.A)({},Xe.root,Xe[`margin${(0,Vp.A)(u.margin)}`],u.fullWidth&&Xe.fullWidth)})((({ownerState:u})=>(0,_p.A)({display:"inline-flex",flexDirection:"column",position:"relative",minWidth:0,padding:0,margin:0,border:0,verticalAlign:"top"},"normal"===u.margin&&{marginTop:16,marginBottom:8},"dense"===u.margin&&{marginTop:8,marginBottom:4},u.fullWidth&&{width:"100%"}))),nS=dp.forwardRef((function FormControl(u,Xe){const Wt=(0,$p.b)({props:u,name:"MuiFormControl"}),{children:fr,className:_r,color:wr="primary",component:Ar="div",disabled:Kr=!1,error:In=!1,focused:no,fullWidth:io=!1,hiddenLabel:oo=!1,margin:ao="none",required:so=!1,size:co="medium",variant:ho="outlined"}=Wt,go=(0,yp.A)(Wt,tS),xo=(0,_p.A)({},Wt,{color:wr,component:Ar,disabled:Kr,error:In,fullWidth:io,hiddenLabel:oo,margin:ao,required:so,size:co,variant:ho}),ko=(u=>{const{classes:Xe,margin:Wt,fullWidth:fr}=u,_r={root:["root","none"!==Wt&&`margin${(0,Vp.A)(Wt)}`,fr&&"fullWidth"]};return(0,xp.A)(_r,getFormControlUtilityClasses,Xe)})(xo),[Co,Io]=dp.useState((()=>{let u=!1;return fr&&dp.Children.forEach(fr,(Xe=>{if(!(0,eS.A)(Xe,["Input","Select"]))return;const Wt=(0,eS.A)(Xe,["Select"])?Xe.props.input:Xe;Wt&&function isAdornedStart(u){return u.startAdornment}(Wt.props)&&(u=!0)})),u})),[zo,Bo]=dp.useState((()=>{let u=!1;return fr&&dp.Children.forEach(fr,(Xe=>{(0,eS.A)(Xe,["Input","Select"])&&(isFilled(Xe.props,!0)||isFilled(Xe.props.inputProps,!0))&&(u=!0)})),u})),[ca,ua]=dp.useState(!1);Kr&&ca&&ua(!1);const Da=void 0===no||Kr?ca:no;let ns;const yl=dp.useMemo((()=>({adornedStart:Co,setAdornedStart:Io,color:wr,disabled:Kr,error:In,filled:zo,focused:Da,fullWidth:io,hiddenLabel:oo,size:co,onBlur:()=>{ua(!1)},onEmpty:()=>{Bo(!1)},onFilled:()=>{Bo(!0)},onFocus:()=>{ua(!0)},registerEffect:ns,required:so,variant:ho})),[Co,wr,Kr,In,zo,Da,io,oo,ns,so,co,ho]);return(0,Fp.jsx)(Kp.Provider,{value:yl,children:(0,Fp.jsx)(rS,(0,_p.A)({as:Ar,ownerState:xo,className:(0,vp.A)(ko.root,_r),ref:Xe},go,{children:fr}))})}));var iS=nS;function formControlState({props:u,states:Xe,muiFormControl:Wt}){return Xe.reduce(((Xe,fr)=>(Xe[fr]=u[fr],Wt&&void 0===u[fr]&&(Xe[fr]=Wt[fr]),Xe)),{})}function getFormLabelUtilityClasses(u){return(0,bp.Ay)("MuiFormLabel",u)}var oS=(0,uf.A)("MuiFormLabel",["root","colorSecondary","focused","disabled","error","filled","required","asterisk"]);const aS=["children","className","color","component","disabled","error","filled","focused","required"],sS=(0,Up.Ay)("label",{name:"MuiFormLabel",slot:"Root",overridesResolver:({ownerState:u},Xe)=>(0,_p.A)({},Xe.root,"secondary"===u.color&&Xe.colorSecondary,u.filled&&Xe.filled)})((({theme:u,ownerState:Xe})=>(0,_p.A)({color:(u.vars||u).palette.text.secondary},u.typography.body1,{lineHeight:"1.4375em",padding:0,position:"relative",[`&.${oS.focused}`]:{color:(u.vars||u).palette[Xe.color].main},[`&.${oS.disabled}`]:{color:(u.vars||u).palette.text.disabled},[`&.${oS.error}`]:{color:(u.vars||u).palette.error.main}}))),lS=(0,Up.Ay)("span",{name:"MuiFormLabel",slot:"Asterisk",overridesResolver:(u,Xe)=>Xe.asterisk})((({theme:u})=>({[`&.${oS.error}`]:{color:(u.vars||u).palette.error.main}}))),cS=dp.forwardRef((function FormLabel(u,Xe){const Wt=(0,$p.b)({props:u,name:"MuiFormLabel"}),{children:fr,className:_r,component:wr="label"}=Wt,Ar=(0,yp.A)(Wt,aS),Kr=formControlState({props:Wt,muiFormControl:useFormControl(),states:["color","required","focused","disabled","error","filled"]}),In=(0,_p.A)({},Wt,{color:Kr.color||"primary",component:wr,disabled:Kr.disabled,error:Kr.error,filled:Kr.filled,focused:Kr.focused,required:Kr.required}),no=(u=>{const{classes:Xe,color:Wt,focused:fr,disabled:_r,error:wr,filled:Ar,required:Kr}=u,In={root:["root",`color${(0,Vp.A)(Wt)}`,_r&&"disabled",wr&&"error",Ar&&"filled",fr&&"focused",Kr&&"required"],asterisk:["asterisk",wr&&"error"]};return(0,xp.A)(In,getFormLabelUtilityClasses,Xe)})(In);return(0,Fp.jsxs)(sS,(0,_p.A)({as:wr,ownerState:In,className:(0,vp.A)(no.root,_r),ref:Xe},Ar,{children:[fr,Kr.required&&(0,Fp.jsxs)(lS,{ownerState:In,"aria-hidden":!0,className:no.asterisk,children:[" ","*"]})]}))}));var uS=cS;function getFormGroupUtilityClass(u){return(0,bp.Ay)("MuiFormGroup",u)}(0,uf.A)("MuiFormGroup",["root","row","error"]);const dS=["className","row"],hS=(0,Up.Ay)("div",{name:"MuiFormGroup",slot:"Root",overridesResolver:(u,Xe)=>{const{ownerState:Wt}=u;return[Xe.root,Wt.row&&Xe.row]}})((({ownerState:u})=>(0,_p.A)({display:"flex",flexDirection:"column",flexWrap:"wrap"},u.row&&{flexDirection:"row"})));var pS=dp.forwardRef((function FormGroup(u,Xe){const Wt=(0,$p.b)({props:u,name:"MuiFormGroup"}),{className:fr,row:_r=!1}=Wt,wr=(0,yp.A)(Wt,dS),Ar=formControlState({props:Wt,muiFormControl:useFormControl(),states:["error"]}),Kr=(0,_p.A)({},Wt,{row:_r,error:Ar.error}),In=(u=>{const{classes:Xe,row:Wt,error:fr}=u,_r={root:["root",Wt&&"row",fr&&"error"]};return(0,xp.A)(_r,getFormGroupUtilityClass,Xe)})(Kr);return(0,Fp.jsx)(hS,(0,_p.A)({className:(0,vp.A)(In.root,fr),ownerState:Kr,ref:Xe},wr))}));function getRadioGroupUtilityClass(u){return(0,bp.Ay)("MuiRadioGroup",u)}(0,uf.A)("MuiRadioGroup",["root","row","error"]);var fS=dp.createContext(void 0);const mS=["actions","children","className","defaultValue","name","onChange","value"],gS=dp.forwardRef((function RadioGroup(u,Xe){const{actions:Wt,children:fr,className:_r,defaultValue:wr,name:Ar,onChange:Kr,value:In}=u,no=(0,yp.A)(u,mS),io=dp.useRef(null),oo=(u=>{const{classes:Xe,row:Wt,error:fr}=u,_r={root:["root",Wt&&"row",fr&&"error"]};return(0,xp.A)(_r,getRadioGroupUtilityClass,Xe)})(u),[ao,so]=(0,Gp.A)({controlled:In,default:wr,name:"RadioGroup"});dp.useImperativeHandle(Wt,(()=>({focus:()=>{let u=io.current.querySelector("input:not(:disabled):checked");u||(u=io.current.querySelector("input:not(:disabled)")),u&&u.focus()}})),[]);const co=(0,Xp.A)(Xe,io),ho=(0,qg.A)(Ar),go=dp.useMemo((()=>({name:ho,onChange(u){so(u.target.value),Kr&&Kr(u,u.target.value)},value:ao})),[ho,Kr,so,ao]);return(0,Fp.jsx)(fS.Provider,{value:go,children:(0,Fp.jsx)(pS,(0,_p.A)({role:"radiogroup",ref:co,className:(0,vp.A)(oo.root,_r)},no,{children:fr}))})}));var yS=gS;function getFormControlLabelUtilityClasses(u){return(0,bp.Ay)("MuiFormControlLabel",u)}var _S=(0,uf.A)("MuiFormControlLabel",["root","labelPlacementStart","labelPlacementTop","labelPlacementBottom","disabled","label","error","required","asterisk"]);const vS=["checked","className","componentsProps","control","disabled","disableTypography","inputRef","label","labelPlacement","name","onChange","required","slotProps","value"],bS=(0,Up.Ay)("label",{name:"MuiFormControlLabel",slot:"Root",overridesResolver:(u,Xe)=>{const{ownerState:Wt}=u;return[{[`& .${_S.label}`]:Xe.label},Xe.root,Xe[`labelPlacement${(0,Vp.A)(Wt.labelPlacement)}`]]}})((({theme:u,ownerState:Xe})=>(0,_p.A)({display:"inline-flex",alignItems:"center",cursor:"pointer",verticalAlign:"middle",WebkitTapHighlightColor:"transparent",marginLeft:-11,marginRight:16,[`&.${_S.disabled}`]:{cursor:"default"}},"start"===Xe.labelPlacement&&{flexDirection:"row-reverse",marginLeft:16,marginRight:-11},"top"===Xe.labelPlacement&&{flexDirection:"column-reverse",marginLeft:16},"bottom"===Xe.labelPlacement&&{flexDirection:"column",marginLeft:16},{[`& .${_S.label}`]:{[`&.${_S.disabled}`]:{color:(u.vars||u).palette.text.disabled}}}))),xS=(0,Up.Ay)("span",{name:"MuiFormControlLabel",slot:"Asterisk",overridesResolver:(u,Xe)=>Xe.asterisk})((({theme:u})=>({[`&.${_S.error}`]:{color:(u.vars||u).palette.error.main}}))),wS=dp.forwardRef((function FormControlLabel(u,Xe){var Wt,fr;const _r=(0,$p.b)({props:u,name:"MuiFormControlLabel"}),{className:wr,componentsProps:Ar={},control:Kr,disabled:In,disableTypography:no,label:io,labelPlacement:oo="end",required:ao,slotProps:so={}}=_r,co=(0,yp.A)(_r,vS),ho=useFormControl(),go=null!=(Wt=null!=In?In:Kr.props.disabled)?Wt:null==ho?void 0:ho.disabled,xo=null!=ao?ao:Kr.props.required,ko={disabled:go,required:xo};["checked","name","onChange","value","inputRef"].forEach((u=>{void 0===Kr.props[u]&&void 0!==_r[u]&&(ko[u]=_r[u])}));const Co=formControlState({props:_r,muiFormControl:ho,states:["error"]}),Io=(0,_p.A)({},_r,{disabled:go,labelPlacement:oo,required:xo,error:Co.error}),zo=(u=>{const{classes:Xe,disabled:Wt,labelPlacement:fr,error:_r,required:wr}=u,Ar={root:["root",Wt&&"disabled",`labelPlacement${(0,Vp.A)(fr)}`,_r&&"error",wr&&"required"],label:["label",Wt&&"disabled"],asterisk:["asterisk",_r&&"error"]};return(0,xp.A)(Ar,getFormControlLabelUtilityClasses,Xe)})(Io),Bo=null!=(fr=so.typography)?fr:Ar.typography;let ca=io;return null==ca||ca.type===gx||no||(ca=(0,Fp.jsx)(gx,(0,_p.A)({component:"span"},Bo,{className:(0,vp.A)(zo.label,null==Bo?void 0:Bo.className),children:ca}))),(0,Fp.jsxs)(bS,(0,_p.A)({className:(0,vp.A)(zo.root,wr),ownerState:Io,ref:Xe},co,{children:[dp.cloneElement(Kr,ko),xo?(0,Fp.jsxs)(Dx,{display:"block",children:[ca,(0,Fp.jsxs)(xS,{ownerState:Io,"aria-hidden":!0,className:zo.asterisk,children:[" ","*"]})]}):ca]}))}));var SS=wS,kS=(0,zw.A)((0,Fp.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),"RadioButtonUnchecked"),AS=(0,zw.A)((0,Fp.jsx)("path",{d:"M8.465 8.465C9.37 7.56 10.62 7 12 7C14.76 7 17 9.24 17 12C17 13.38 16.44 14.63 15.535 15.535C14.63 16.44 13.38 17 12 17C9.24 17 7 14.76 7 12C7 10.62 7.56 9.37 8.465 8.465Z"}),"RadioButtonChecked");const TS=(0,Up.Ay)("span",{shouldForwardProp:Hp.A})({position:"relative",display:"flex"}),ES=(0,Up.Ay)(kS)({transform:"scale(1)"}),CS=(0,Up.Ay)(AS)((({theme:u,ownerState:Xe})=>(0,_p.A)({left:0,position:"absolute",transform:"scale(0)",transition:u.transitions.create("transform",{easing:u.transitions.easing.easeIn,duration:u.transitions.duration.shortest})},Xe.checked&&{transform:"scale(1)",transition:u.transitions.create("transform",{easing:u.transitions.easing.easeOut,duration:u.transitions.duration.shortest})})));var PS=function RadioButtonIcon(u){const{checked:Xe=!1,classes:Wt={},fontSize:fr}=u,_r=(0,_p.A)({},u,{checked:Xe});return(0,Fp.jsxs)(TS,{className:Wt.root,ownerState:_r,children:[(0,Fp.jsx)(ES,{fontSize:fr,className:Wt.background,ownerState:_r}),(0,Fp.jsx)(CS,{fontSize:fr,className:Wt.dot,ownerState:_r})]})},IS=__webpack_require__(862);function getRadioUtilityClass(u){return(0,bp.Ay)("MuiRadio",u)}var MS=(0,uf.A)("MuiRadio",["root","checked","disabled","colorPrimary","colorSecondary","sizeSmall"]);const RS=["checked","checkedIcon","color","icon","name","onChange","size","className"],zS=(0,Up.Ay)(Gf,{shouldForwardProp:u=>(0,Hp.A)(u)||"classes"===u,name:"MuiRadio",slot:"Root",overridesResolver:(u,Xe)=>{const{ownerState:Wt}=u;return[Xe.root,"medium"!==Wt.size&&Xe[`size${(0,Vp.A)(Wt.size)}`],Xe[`color${(0,Vp.A)(Wt.color)}`]]}})((({theme:u,ownerState:Xe})=>(0,_p.A)({color:(u.vars||u).palette.text.secondary},!Xe.disableRipple&&{"&:hover":{backgroundColor:u.vars?`rgba(${"default"===Xe.color?u.vars.palette.action.activeChannel:u.vars.palette[Xe.color].mainChannel} / ${u.vars.palette.action.hoverOpacity})`:(0,Zp.X4)("default"===Xe.color?u.palette.action.active:u.palette[Xe.color].main,u.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"default"!==Xe.color&&{[`&.${MS.checked}`]:{color:(u.vars||u).palette[Xe.color].main}},{[`&.${MS.disabled}`]:{color:(u.vars||u).palette.action.disabled}})));const OS=(0,Fp.jsx)(PS,{checked:!0}),LS=(0,Fp.jsx)(PS,{}),DS=dp.forwardRef((function Radio(u,Xe){var Wt,fr;const _r=(0,$p.b)({props:u,name:"MuiRadio"}),{checked:wr,checkedIcon:Ar=OS,color:Kr="primary",icon:In=LS,name:no,onChange:io,size:oo="medium",className:ao}=_r,so=(0,yp.A)(_r,RS),co=(0,_p.A)({},_r,{color:Kr,size:oo}),ho=(u=>{const{classes:Xe,color:Wt,size:fr}=u,_r={root:["root",`color${(0,Vp.A)(Wt)}`,"medium"!==fr&&`size${(0,Vp.A)(fr)}`]};return(0,_p.A)({},Xe,(0,xp.A)(_r,getRadioUtilityClass,Xe))})(co),go=function useRadioGroup(){return dp.useContext(fS)}();let xo=wr;const ko=(0,IS.A)(io,go&&go.onChange);let Co=no;return go&&(void 0===xo&&(xo=function areEqualValues(u,Xe){return"object"==typeof Xe&&null!==Xe?u===Xe:String(u)===String(Xe)}(go.value,_r.value)),void 0===Co&&(Co=go.name)),(0,Fp.jsx)(zS,(0,_p.A)({type:"radio",icon:dp.cloneElement(In,{fontSize:null!=(Wt=LS.props.fontSize)?Wt:oo}),checkedIcon:dp.cloneElement(Ar,{fontSize:null!=(fr=OS.props.fontSize)?fr:oo}),ownerState:co,classes:ho,name:Co,checked:xo,onChange:ko,ref:Xe,className:(0,vp.A)(ho.root,ao)},so))}));var FS=DS;function LayerItemStyleSelection(u){var Xe=this;const{year:Wt,onClick:fr,treeElement:{isVisible:_r,isStyleExpanded:wr,selectedStyle:Ar},zoomLevel:Kr}=u,In={color:function color(u){return _newArrowCheck(this,Xe),u.palette.text.primary}.bind(this),fontSize:function fontSize(u){return _newArrowCheck(this,Xe),u.typography.body2.fontSize}.bind(this),fontFamily:function fontFamily(u){return _newArrowCheck(this,Xe),u.typography.body2.fontFamily}.bind(this),fontWeight:function fontWeight(u){return _newArrowCheck(this,Xe),u.typography.body2.fontWeight}.bind(this),lineHeight:function lineHeight(u){return _newArrowCheck(this,Xe),u.typography.body2.lineHeight}.bind(this),margin:0},no={maxWidth:"1.25rem",width:"1.25rem"},io=_r?dp.createElement(Jw.A,{sx:no}):dp.createElement(Qw.A,{sx:no}),ao=getWMTSLayerIdFromYear(Wt),co=Wt===oo.ALL?Gx("jakarto.layer.raster.all.title"):Gx("jakarto.layer.raster.title",Wt);return dp.createElement(Zx,{id:ao,fontWeight:"fontWeightMedium"},dp.createElement(Zx,{sx:{display:"flex",justifyContent:"space-between",borderBottom:function borderBottom(u){return _newArrowCheck(this,Xe),`0.0625rem solid ${u.palette.divider}`}.bind(this),"& > #jakarto-layer-visibility-button":{display:function display(Wt){return _newArrowCheck(this,Xe),u.treeElement.isVisible?"none":"block"}.bind(this)},"&:hover > #jakarto-layer-visibility-button":{display:"block"}}},dp.createElement(Zx,{onClick:function onClick(){_newArrowCheck(this,Xe),by.toggleWMTSLayerStyleExpansion(Wt)}.bind(this),sx:{height:"2.25rem",minHeight:"2.25rem",maxHeight:"2.25rem",width:"100%",paddingTop:function paddingTop(u){return _newArrowCheck(this,Xe),u.spacing(.5)}.bind(this),paddingBottom:function paddingBottom(u){return _newArrowCheck(this,Xe),u.spacing(.5)}.bind(this),display:"flex",alignItems:"center",cursor:"pointer"}},dp.createElement("img",{style:{maxWidth:"1rem",width:"1rem",marginLeft:"0.5rem",filter:u.treeElement.isVisible?void 0:"grayscale(100%)"},src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAADIklEQVR42t2WW08TURSF+WfGxGhIDCkBBEGCSNOEq2ANlEIR6Ng0QEFhoFJKL460FNpCpdpSAYlcVAgpYGK8BE3UJ3kw/oJt1yZnrHYAfaXJyjkzk1nf3vvsc6Z5eWfml39DovOlbXShopNqOl108GGPDr/sU8Bxnfz2YnL0V5LHUUkvZjppLdrLo9CScvu3Au20OW8jTQDMAbls6KPJYIx+Hh7Qx3SSHvVXkHS3nBRXA78MCeMn7gYexbWA5gCEuciirmeCvn1+Qz++f6Jk2EbdUgmFlVbaivdzBhCihWCY8DbzvYjfwsFoAgQEI7JYXd/gLLbXFC7R+KiBNhcG2AiRO+0VJEvF1G0qpGajjtpMRWRp05HdlH88QOhStZV8swn6+naFTVEmn62Ix8hwFUVGqllRVx2Xbipg5gBwHVeM2gCYZkNuWZ30bneRX0B53O4jM2XqaEFFqR5n1iQas1FoxsIgzE/NAKXSGay0tZmkpZRMqfgAG8Acmp9uVzsHAYj7UDjS828AjP7ALO28DjFk6dkDjtDrb2KjVKhD7R4EgMhhjnY+FQCdKzOTNOTmRRYvoxwi0hF7nZpFcl7i5wsZ0LClIBeA+ou9kC1Dxyilt55SInmP1wASpUJn9d3RMwBr09V7hVtU7tLlAtCWAEAXq3rYHPNyo0y728tcIkSYDYHkgRo1i8CongKeFu0MAMiWgJU0DdHGyhxtPHdTIGRWOwVzAAHG5hMQ7A+P9B8AqKzeSk6XS+0kSMCg2JSZjVP+mxRz6mnaUXo8INsYpRJjY0emS8LyH60qhHs4Iha9jbwJ4y69NqCgdlBVNgwNAMBcROGSaAEgZIGdrgkobJQpWyVGF48ChEU3Sm5Kv4xy7bNLhH2BhedjJHN8YC00AUUtThWAuRCuC+rv8wm7/ypKq8sy9zv2BAC+hw0MDY7VMgCZ5ABghKhP0rV2LynBAHl8E9Q7OEYm+zgFQ5MUjk7S3s4CN0Eyc2zjCM8B/G12tdVD5SafJgjZiKYQGTuVeXqfTqjfCE0ATE/KQDznkqEZMiCM4vn6aoIPPnwjzs6fiV8ZsgyQLKAQ+wAAAABJRU5ErkJggg=="}),dp.createElement(oy,{placement:"bottom",title:co,enterTouchDelay:1e3,enterNextDelay:1e3,enterDelay:1e3},dp.createElement(gx,{variant:"body2",noWrap:!0,color:"textPrimary",sx:{paddingLeft:0,flexGrow:1,userSelect:"none",marginLeft:"0.5rem"}},co))),dp.createElement(mw,{id:"jakarto-layer-visibility-button",color:"secondary",size:"small",onClick:fr},io)),dp.createElement(Yw,{sx:{width:"100%",minWidth:"100%"},in:wr},dp.createElement(iS,{component:"fieldset",sx:{marginLeft:"1rem"},focused:!1},dp.createElement(uS,{color:"secondary",sx:{...In,marginBottom:function marginBottom(u){return _newArrowCheck(this,Xe),u.spacing(1)}.bind(this),paddingTop:function paddingTop(u){return _newArrowCheck(this,Xe),u.spacing(1)}.bind(this)},component:"legend"},Gx("jakarto.layer.raster.legend.title")),dp.createElement(yS,{value:Ar},getAllWMTSStyleVariables().map(function(u,fr){var _r=this;return _newArrowCheck(this,Xe),dp.createElement(SS,{sx:In,value:u,key:fr,control:dp.createElement(FS,{size:"small",color:"primary",sx:{padding:function padding(u){return _newArrowCheck(this,_r),u.spacing(.5)}.bind(this)}}),label:Gx(getTranslationKeyForStyle(u)),disabled:u===so.VERTICALITY&&Kr<21,onChange:function onChange(){_newArrowCheck(this,_r),Ar!==u&&by.selectWMTSLayerStyleForYear(Wt,u)}.bind(this)})}.bind(this))))),wr&&dp.createElement(vy,null))}const jS=Qb(function(u){return _newArrowCheck(this,undefined),{isVectorCoverageVisible:getExtensionState().layer.isVectorLayerVisible,allWmtsByYear:getExtensionState().layer.allWMTSByYear,currentZoomLevel:getExtensionState().layer.zoomLevel,globalTheme:getAppState(u).ui.theme}}.bind(void 0))((function LayerCardFn(u){var Xe=this;const[Wt,fr]=dp.useState(!1);return dp.createElement(ux,{sx:{marginTop:0}},dp.createElement(Sx,{title:Gx("jakarto.layer.content.header.title"),titleTypographyProps:{noWrap:!0,textTransform:"uppercase",cursor:"pointer"},onClick:function onClick(){_newArrowCheck(this,Xe),fr(!Wt)}.bind(this),avatar:dp.createElement(mp,{icon:Iw.qI,style:{color:u.globalTheme.palette.primary.main,cursor:"cursor"}}),action:dp.createElement(Ww,{size:"small",checked:Wt,onClick:function onClick(){return _newArrowCheck(this,Xe),fr(!Wt)}.bind(this),checkedIcon:dp.createElement(Mw.A,{color:"disabled"}),icon:dp.createElement(Rw.A,{color:"disabled"})})}),dp.createElement(Yw,{in:Wt},dp.createElement(Bx,{sx:{height:"100%",minHeight:"100%",maxHeight:"100%",marginLeft:"0.5625rem",marginRight:"0.5625rem",paddingTop:0}},dp.createElement(LayerItem,{id:Ar,layerName:Gx("jakarto.layer.vector.title"),isVisible:u.isVectorCoverageVisible,src:"data:image/png;base64, iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAABIElEQVR42mNgGAWjYHgAf/9JLitXnrp08uS9z8+evf/9+PG7D3fvvprw//9/DooNLy9fNQdo4L9Zsw78Dw2d9t/MrOl/bOys/6tWnfzz/v23Z0BLdMg2PCRkiv/Ll5/+BwdP+S8pWYCBc3MX//r5889dsn2yadP5lz0927EaDsOHDt24CbSgnCwLvnz58d/RsROvBenpC0A+2EyWBUCNeA0HYVPTJlA8PCbLgqdP3323tGwh5IPjQAuuk2XB7dsvD9bWrsNnwe87d16tAFrQTW4QKXz48P2brW0bVgtASRio5j4QC5CdVIGaw3/8+PW+o2PrM2hwvffxmXD8woVH84Fyz4HYgeLMBvIJEK8G4u//IeAyEE8HYpHRcm4U0B4AAKMuCd7q0lsIAAAAAElFTkSuQmCC",onClick:function onClick(){_newArrowCheck(this,Xe),by.toggleVectorLayerVisibility()}.bind(this)}),getAllWMTSYearVariables().map(function(Wt,fr){var _r=this;return _newArrowCheck(this,Xe),dp.createElement(LayerItemStyleSelection,{key:fr,year:Wt,treeElement:u.allWmtsByYear[Wt],zoomLevel:u.currentZoomLevel,onClick:function onClick(){_newArrowCheck(this,_r),by.toggleWMTSLayerVisibility(Wt)}.bind(this)})}.bind(this)))))}));var BS=__webpack_require__.p+"37d0e4cd5ff1173c86ce.png",NS=__webpack_require__.p+"d8ca01d5a711b142103f.png",VS=__webpack_require__.p+"8e1a93455ac3516582e8.png",US=__webpack_require__.p+"a814ae79e0ef3997b449.png";function getLinearProgressUtilityClass(u){return(0,bp.Ay)("MuiLinearProgress",u)}(0,uf.A)("MuiLinearProgress",["root","colorPrimary","colorSecondary","determinate","indeterminate","buffer","query","dashed","dashedColorPrimary","dashedColorSecondary","bar","barColorPrimary","barColorSecondary","bar1Indeterminate","bar1Determinate","bar1Buffer","bar2Indeterminate","bar2Buffer"]);const $S=["className","color","value","valueBuffer","variant"];let WS,qS,ZS,HS,GS,KS,LinearProgress_=u=>u;const XS=(0,af.i7)(WS||(WS=LinearProgress_`
75
+ 0% {
76
+ left: -35%;
77
+ right: 100%;
78
+ }
79
+
80
+ 60% {
81
+ left: 100%;
82
+ right: -90%;
83
+ }
84
+
85
+ 100% {
86
+ left: 100%;
87
+ right: -90%;
88
+ }
89
+ `)),YS=(0,af.i7)(qS||(qS=LinearProgress_`
90
+ 0% {
91
+ left: -200%;
92
+ right: 100%;
93
+ }
94
+
95
+ 60% {
96
+ left: 107%;
97
+ right: -8%;
98
+ }
99
+
100
+ 100% {
101
+ left: 107%;
102
+ right: -8%;
103
+ }
104
+ `)),JS=(0,af.i7)(ZS||(ZS=LinearProgress_`
105
+ 0% {
106
+ opacity: 1;
107
+ background-position: 0 -23px;
108
+ }
109
+
110
+ 60% {
111
+ opacity: 0;
112
+ background-position: 0 -23px;
113
+ }
114
+
115
+ 100% {
116
+ opacity: 1;
117
+ background-position: -200px -23px;
118
+ }
119
+ `)),getColorShade=(u,Xe)=>"inherit"===Xe?"currentColor":u.vars?u.vars.palette.LinearProgress[`${Xe}Bg`]:"light"===u.palette.mode?(0,Zp.a)(u.palette[Xe].main,.62):(0,Zp.e$)(u.palette[Xe].main,.5),QS=(0,Up.Ay)("span",{name:"MuiLinearProgress",slot:"Root",overridesResolver:(u,Xe)=>{const{ownerState:Wt}=u;return[Xe.root,Xe[`color${(0,Vp.A)(Wt.color)}`],Xe[Wt.variant]]}})((({ownerState:u,theme:Xe})=>(0,_p.A)({position:"relative",overflow:"hidden",display:"block",height:4,zIndex:0,"@media print":{colorAdjust:"exact"},backgroundColor:getColorShade(Xe,u.color)},"inherit"===u.color&&"buffer"!==u.variant&&{backgroundColor:"none","&::before":{content:'""',position:"absolute",left:0,top:0,right:0,bottom:0,backgroundColor:"currentColor",opacity:.3}},"buffer"===u.variant&&{backgroundColor:"transparent"},"query"===u.variant&&{transform:"rotate(180deg)"}))),tk=(0,Up.Ay)("span",{name:"MuiLinearProgress",slot:"Dashed",overridesResolver:(u,Xe)=>{const{ownerState:Wt}=u;return[Xe.dashed,Xe[`dashedColor${(0,Vp.A)(Wt.color)}`]]}})((({ownerState:u,theme:Xe})=>{const Wt=getColorShade(Xe,u.color);return(0,_p.A)({position:"absolute",marginTop:0,height:"100%",width:"100%"},"inherit"===u.color&&{opacity:.3},{backgroundImage:`radial-gradient(${Wt} 0%, ${Wt} 16%, transparent 42%)`,backgroundSize:"10px 10px",backgroundPosition:"0 -23px"})}),(0,af.AH)(HS||(HS=LinearProgress_`
120
+ animation: ${0} 3s infinite linear;
121
+ `),JS)),rk=(0,Up.Ay)("span",{name:"MuiLinearProgress",slot:"Bar1",overridesResolver:(u,Xe)=>{const{ownerState:Wt}=u;return[Xe.bar,Xe[`barColor${(0,Vp.A)(Wt.color)}`],("indeterminate"===Wt.variant||"query"===Wt.variant)&&Xe.bar1Indeterminate,"determinate"===Wt.variant&&Xe.bar1Determinate,"buffer"===Wt.variant&&Xe.bar1Buffer]}})((({ownerState:u,theme:Xe})=>(0,_p.A)({width:"100%",position:"absolute",left:0,bottom:0,top:0,transition:"transform 0.2s linear",transformOrigin:"left",backgroundColor:"inherit"===u.color?"currentColor":(Xe.vars||Xe).palette[u.color].main},"determinate"===u.variant&&{transition:"transform .4s linear"},"buffer"===u.variant&&{zIndex:1,transition:"transform .4s linear"})),(({ownerState:u})=>("indeterminate"===u.variant||"query"===u.variant)&&(0,af.AH)(GS||(GS=LinearProgress_`
122
+ width: auto;
123
+ animation: ${0} 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite;
124
+ `),XS))),nk=(0,Up.Ay)("span",{name:"MuiLinearProgress",slot:"Bar2",overridesResolver:(u,Xe)=>{const{ownerState:Wt}=u;return[Xe.bar,Xe[`barColor${(0,Vp.A)(Wt.color)}`],("indeterminate"===Wt.variant||"query"===Wt.variant)&&Xe.bar2Indeterminate,"buffer"===Wt.variant&&Xe.bar2Buffer]}})((({ownerState:u,theme:Xe})=>(0,_p.A)({width:"100%",position:"absolute",left:0,bottom:0,top:0,transition:"transform 0.2s linear",transformOrigin:"left"},"buffer"!==u.variant&&{backgroundColor:"inherit"===u.color?"currentColor":(Xe.vars||Xe).palette[u.color].main},"inherit"===u.color&&{opacity:.3},"buffer"===u.variant&&{backgroundColor:getColorShade(Xe,u.color),transition:"transform .4s linear"})),(({ownerState:u})=>("indeterminate"===u.variant||"query"===u.variant)&&(0,af.AH)(KS||(KS=LinearProgress_`
125
+ width: auto;
126
+ animation: ${0} 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) 1.15s infinite;
127
+ `),YS)));var ok=dp.forwardRef((function LinearProgress(u,Xe){const Wt=(0,$p.b)({props:u,name:"MuiLinearProgress"}),{className:fr,color:_r="primary",value:wr,valueBuffer:Ar,variant:Kr="indeterminate"}=Wt,In=(0,yp.A)(Wt,$S),no=(0,_p.A)({},Wt,{color:_r,variant:Kr}),io=(u=>{const{classes:Xe,variant:Wt,color:fr}=u,_r={root:["root",`color${(0,Vp.A)(fr)}`,Wt],dashed:["dashed",`dashedColor${(0,Vp.A)(fr)}`],bar1:["bar",`barColor${(0,Vp.A)(fr)}`,("indeterminate"===Wt||"query"===Wt)&&"bar1Indeterminate","determinate"===Wt&&"bar1Determinate","buffer"===Wt&&"bar1Buffer"],bar2:["bar","buffer"!==Wt&&`barColor${(0,Vp.A)(fr)}`,"buffer"===Wt&&`color${(0,Vp.A)(fr)}`,("indeterminate"===Wt||"query"===Wt)&&"bar2Indeterminate","buffer"===Wt&&"bar2Buffer"]};return(0,xp.A)(_r,getLinearProgressUtilityClass,Xe)})(no),oo=useRtl(),ao={},so={bar1:{},bar2:{}};if("determinate"===Kr||"buffer"===Kr)if(void 0!==wr){ao["aria-valuenow"]=Math.round(wr),ao["aria-valuemin"]=0,ao["aria-valuemax"]=100;let u=wr-100;oo&&(u=-u),so.bar1.transform=`translateX(${u}%)`}else 0;if("buffer"===Kr)if(void 0!==Ar){let u=(Ar||0)-100;oo&&(u=-u),so.bar2.transform=`translateX(${u}%)`}else 0;return(0,Fp.jsxs)(QS,(0,_p.A)({className:(0,vp.A)(io.root,fr),ownerState:no,role:"progressbar"},ao,{ref:Xe},In,{children:["buffer"===Kr?(0,Fp.jsx)(tk,{className:io.dashed,ownerState:no}):null,(0,Fp.jsx)(rk,{className:io.bar1,ownerState:no,style:so.bar1}),"determinate"===Kr?null:(0,Fp.jsx)(nk,{className:io.bar2,ownerState:no,style:so.bar2})]}))}));const sk=function LinearLoader(u){return _newArrowCheck(this,undefined),dp.createElement(Dx,{direction:"column",alignItems:"center",justifyContent:"center",width:"100%",sx:{margin:"1rem"}},dp.createElement(gx,{color:"primary"},u.text),dp.createElement(ok,{color:"secondary"}))}.bind(void 0);var lk=dp.createContext();function getGridUtilityClass(u){return(0,bp.Ay)("MuiGrid",u)}const uk=["auto",!0,1,2,3,4,5,6,7,8,9,10,11,12],pk=(0,uf.A)("MuiGrid",["root","container","item","zeroMinWidth",...[0,1,2,3,4,5,6,7,8,9,10].map((u=>`spacing-xs-${u}`)),...["column-reverse","column","row-reverse","row"].map((u=>`direction-xs-${u}`)),...["nowrap","wrap-reverse","wrap"].map((u=>`wrap-xs-${u}`)),...uk.map((u=>`grid-xs-${u}`)),...uk.map((u=>`grid-sm-${u}`)),...uk.map((u=>`grid-md-${u}`)),...uk.map((u=>`grid-lg-${u}`)),...uk.map((u=>`grid-xl-${u}`))]);var fk=pk;const mk=["className","columns","columnSpacing","component","container","direction","item","rowSpacing","spacing","wrap","zeroMinWidth"];function getOffset(u){const Xe=parseFloat(u);return`${Xe}${String(u).replace(String(Xe),"")||"px"}`}function extractZeroValueBreakpointKeys({breakpoints:u,values:Xe}){let Wt="";Object.keys(Xe).forEach((u=>{""===Wt&&0!==Xe[u]&&(Wt=u)}));const fr=Object.keys(u).sort(((Xe,Wt)=>u[Xe]-u[Wt]));return fr.slice(0,fr.indexOf(Wt))}const yk=(0,Up.Ay)("div",{name:"MuiGrid",slot:"Root",overridesResolver:(u,Xe)=>{const{ownerState:Wt}=u,{container:fr,direction:_r,item:wr,spacing:Ar,wrap:Kr,zeroMinWidth:In,breakpoints:no}=Wt;let io=[];fr&&(io=function resolveSpacingStyles(u,Xe,Wt={}){if(!u||u<=0)return[];if("string"==typeof u&&!Number.isNaN(Number(u))||"number"==typeof u)return[Wt[`spacing-xs-${String(u)}`]];const fr=[];return Xe.forEach((Xe=>{const _r=u[Xe];Number(_r)>0&&fr.push(Wt[`spacing-${Xe}-${String(_r)}`])})),fr}(Ar,no,Xe));const oo=[];return no.forEach((u=>{const fr=Wt[u];fr&&oo.push(Xe[`grid-${u}-${String(fr)}`])})),[Xe.root,fr&&Xe.container,wr&&Xe.item,In&&Xe.zeroMinWidth,...io,"row"!==_r&&Xe[`direction-xs-${String(_r)}`],"wrap"!==Kr&&Xe[`wrap-xs-${String(Kr)}`],...oo]}})((({ownerState:u})=>(0,_p.A)({boxSizing:"border-box"},u.container&&{display:"flex",flexWrap:"wrap",width:"100%"},u.item&&{margin:0},u.zeroMinWidth&&{minWidth:0},"wrap"!==u.wrap&&{flexWrap:u.wrap})),(function generateDirection({theme:u,ownerState:Xe}){const Wt=(0,Ix.kW)({values:Xe.direction,breakpoints:u.breakpoints.values});return(0,Ix.NI)({theme:u},Wt,(u=>{const Xe={flexDirection:u};return 0===u.indexOf("column")&&(Xe[`& > .${fk.item}`]={maxWidth:"none"}),Xe}))}),(function generateRowGap({theme:u,ownerState:Xe}){const{container:Wt,rowSpacing:fr}=Xe;let _r={};if(Wt&&0!==fr){const Xe=(0,Ix.kW)({values:fr,breakpoints:u.breakpoints.values});let Wt;"object"==typeof Xe&&(Wt=extractZeroValueBreakpointKeys({breakpoints:u.breakpoints.values,values:Xe})),_r=(0,Ix.NI)({theme:u},Xe,((Xe,fr)=>{var _r;const wr=u.spacing(Xe);return"0px"!==wr?{marginTop:`-${getOffset(wr)}`,[`& > .${fk.item}`]:{paddingTop:getOffset(wr)}}:null!=(_r=Wt)&&_r.includes(fr)?{}:{marginTop:0,[`& > .${fk.item}`]:{paddingTop:0}}}))}return _r}),(function generateColumnGap({theme:u,ownerState:Xe}){const{container:Wt,columnSpacing:fr}=Xe;let _r={};if(Wt&&0!==fr){const Xe=(0,Ix.kW)({values:fr,breakpoints:u.breakpoints.values});let Wt;"object"==typeof Xe&&(Wt=extractZeroValueBreakpointKeys({breakpoints:u.breakpoints.values,values:Xe})),_r=(0,Ix.NI)({theme:u},Xe,((Xe,fr)=>{var _r;const wr=u.spacing(Xe);return"0px"!==wr?{width:`calc(100% + ${getOffset(wr)})`,marginLeft:`-${getOffset(wr)}`,[`& > .${fk.item}`]:{paddingLeft:getOffset(wr)}}:null!=(_r=Wt)&&_r.includes(fr)?{}:{width:"100%",marginLeft:0,[`& > .${fk.item}`]:{paddingLeft:0}}}))}return _r}),(function generateGrid({theme:u,ownerState:Xe}){let Wt;return u.breakpoints.keys.reduce(((fr,_r)=>{let wr={};if(Xe[_r]&&(Wt=Xe[_r]),!Wt)return fr;if(!0===Wt)wr={flexBasis:0,flexGrow:1,maxWidth:"100%"};else if("auto"===Wt)wr={flexBasis:"auto",flexGrow:0,flexShrink:0,maxWidth:"none",width:"auto"};else{const Ar=(0,Ix.kW)({values:Xe.columns,breakpoints:u.breakpoints.values}),Kr="object"==typeof Ar?Ar[_r]:Ar;if(null==Kr)return fr;const In=Math.round(Wt/Kr*1e8)/1e6+"%";let no={};if(Xe.container&&Xe.item&&0!==Xe.columnSpacing){const Wt=u.spacing(Xe.columnSpacing);if("0px"!==Wt){const u=`calc(${In} + ${getOffset(Wt)})`;no={flexBasis:u,maxWidth:u}}}wr=(0,_p.A)({flexBasis:In,flexGrow:0,maxWidth:In},no)}return 0===u.breakpoints.values[_r]?Object.assign(fr,wr):fr[u.breakpoints.up(_r)]=wr,fr}),{})}));const Grid_useUtilityClasses=u=>{const{classes:Xe,container:Wt,direction:fr,item:_r,spacing:wr,wrap:Ar,zeroMinWidth:Kr,breakpoints:In}=u;let no=[];Wt&&(no=function resolveSpacingClasses(u,Xe){if(!u||u<=0)return[];if("string"==typeof u&&!Number.isNaN(Number(u))||"number"==typeof u)return[`spacing-xs-${String(u)}`];const Wt=[];return Xe.forEach((Xe=>{const fr=u[Xe];if(Number(fr)>0){const u=`spacing-${Xe}-${String(fr)}`;Wt.push(u)}})),Wt}(wr,In));const io=[];In.forEach((Xe=>{const Wt=u[Xe];Wt&&io.push(`grid-${Xe}-${String(Wt)}`)}));const oo={root:["root",Wt&&"container",_r&&"item",Kr&&"zeroMinWidth",...no,"row"!==fr&&`direction-xs-${String(fr)}`,"wrap"!==Ar&&`wrap-xs-${String(Ar)}`,...io]};return(0,xp.A)(oo,getGridUtilityClass,Xe)},_k=dp.forwardRef((function Grid(u,Xe){const Wt=(0,$p.b)({props:u,name:"MuiGrid"}),{breakpoints:fr}=styles_useTheme_useTheme(),_r=(0,dx.A)(Wt),{className:wr,columns:Ar,columnSpacing:Kr,component:In="div",container:no=!1,direction:io="row",item:oo=!1,rowSpacing:ao,spacing:so=0,wrap:co="wrap",zeroMinWidth:ho=!1}=_r,go=(0,yp.A)(_r,mk),xo=ao||so,ko=Kr||so,Co=dp.useContext(lk),Io=no?Ar||12:Co,zo={},Bo=(0,_p.A)({},go);fr.keys.forEach((u=>{null!=go[u]&&(zo[u]=go[u],delete Bo[u])}));const ca=(0,_p.A)({},_r,{columns:Io,container:no,direction:io,item:oo,rowSpacing:xo,columnSpacing:ko,wrap:co,zeroMinWidth:ho,spacing:so},zo,{breakpoints:fr.keys}),ua=Grid_useUtilityClasses(ca);return(0,Fp.jsx)(lk.Provider,{value:Io,children:(0,Fp.jsx)(yk,(0,_p.A)({ownerState:ca,className:(0,vp.A)(ua.root,wr),as:In,ref:Xe},Bo))})}));var vk=_k;const xk=function JakartoInformation(u){_newArrowCheck(this,undefined);const{location:Xe,tilt:Wt,fov:fr,pan:_r,date:wr}=u.parameters;return dp.createElement(vk,{container:!0},dp.createElement(vk,{item:!0,xs:6},dp.createElement(gx,{color:"textPrimary"},Gx("jakarto.panel.info.longitude"))),dp.createElement(vk,{item:!0,xs:6},dp.createElement(gx,{color:"textSecondary"},Xe.x.toFixed(6))),dp.createElement(vk,{item:!0,xs:6},dp.createElement(gx,{color:"textPrimary"},Gx("jakarto.panel.info.latitude"))),dp.createElement(vk,{item:!0,xs:6},dp.createElement(gx,{color:"textSecondary"},Xe.y.toFixed(6))),dp.createElement(vk,{item:!0,xs:6},dp.createElement(gx,{color:"textPrimary"},Gx("jakarto.panel.info.tilt"))),dp.createElement(vk,{item:!0,xs:6},dp.createElement(gx,{color:"textSecondary"},Wt?Wt.toFixed(6):"0")),dp.createElement(vk,{item:!0,xs:6},dp.createElement(gx,{color:"textPrimary"},Gx("jakarto.panel.info.fov"))),dp.createElement(vk,{item:!0,xs:6},dp.createElement(gx,{color:"textSecondary"},fr||"0")),dp.createElement(vk,{item:!0,xs:6},dp.createElement(gx,{color:"textPrimary"},Gx("jakarto.panel.info.rotation"))),dp.createElement(vk,{item:!0,xs:6},dp.createElement(gx,{color:"textSecondary"},_r?_r.toFixed(6):"0")),dp.createElement(vk,{item:!0,xs:6},dp.createElement(gx,{color:"textPrimary"},Gx("jakarto.panel.info.date"))),dp.createElement(vk,{item:!0,xs:6},dp.createElement(gx,{color:"textSecondary"},wr?JMap.Util.Date.format(wr,{displayTime:!0}):"")))}.bind(void 0);var isCheckBoxInput=u=>"checkbox"===u.type,isDateObject=u=>u instanceof Date,isNullOrUndefined=u=>null==u;const isObjectType=u=>"object"==typeof u;var index_esm_isObject=u=>!isNullOrUndefined(u)&&!Array.isArray(u)&&isObjectType(u)&&!isDateObject(u),getEventValue=u=>index_esm_isObject(u)&&u.target?isCheckBoxInput(u.target)?u.target.checked:u.target.value:u,isNameInFieldArray=(u,Xe)=>u.has((u=>u.substring(0,u.search(/\.\d+(\.|$)/))||u)(Xe)),wk="undefined"!=typeof window&&void 0!==window.HTMLElement&&"undefined"!=typeof document;function cloneObject(u){let Xe;const Wt=Array.isArray(u);if(u instanceof Date)Xe=new Date(u);else if(u instanceof Set)Xe=new Set(u);else{if(wk&&(u instanceof Blob||u instanceof FileList)||!Wt&&!index_esm_isObject(u))return u;if(Xe=Wt?[]:{},Wt||(u=>{const Xe=u.constructor&&u.constructor.prototype;return index_esm_isObject(Xe)&&Xe.hasOwnProperty("isPrototypeOf")})(u))for(const Wt in u)u.hasOwnProperty(Wt)&&(Xe[Wt]=cloneObject(u[Wt]));else Xe=u}return Xe}var compact=u=>Array.isArray(u)?u.filter(Boolean):[],index_esm_isUndefined=u=>void 0===u,get=(u,Xe,Wt)=>{if(!Xe||!index_esm_isObject(u))return Wt;const fr=compact(Xe.split(/[,[\].]+?/)).reduce(((u,Xe)=>isNullOrUndefined(u)?u:u[Xe]),u);return index_esm_isUndefined(fr)||fr===u?index_esm_isUndefined(u[Xe])?Wt:u[Xe]:fr},index_esm_isBoolean=u=>"boolean"==typeof u,isKey=u=>/^\w*$/.test(u),stringToPath=u=>compact(u.replace(/["|']|\]/g,"").split(/\.|\[/)),set=(u,Xe,Wt)=>{let fr=-1;const _r=isKey(Xe)?[Xe]:stringToPath(Xe),wr=_r.length,Ar=wr-1;for(;++fr<wr;){const Xe=_r[fr];let wr=Wt;if(fr!==Ar){const Wt=u[Xe];wr=index_esm_isObject(Wt)||Array.isArray(Wt)?Wt:isNaN(+_r[fr+1])?{}:[]}if("__proto__"===Xe)return;u[Xe]=wr,u=u[Xe]}return u};const Ak="blur",zk="focusout",Bk="onBlur",Vk="onChange",qk="onSubmit",eA="onTouched",tA="all",rA="max",nA="min",iA="maxLength",oA="minLength",aA="pattern",sA="required",lA="validate";dp.createContext(null);var getProxyFormState=(u,Xe,Wt,fr=!0)=>{const _r={defaultValues:Xe._defaultValues};for(const wr in u)Object.defineProperty(_r,wr,{get:()=>{const _r=wr;return Xe._proxyFormState[_r]!==tA&&(Xe._proxyFormState[_r]=!fr||tA),Wt&&(Wt[_r]=!0),u[_r]}});return _r},isEmptyObject=u=>index_esm_isObject(u)&&!Object.keys(u).length,shouldRenderFormState=(u,Xe,Wt,fr)=>{Wt(u);const{name:_r,...wr}=u;return isEmptyObject(wr)||Object.keys(wr).length>=Object.keys(Xe).length||Object.keys(wr).find((u=>Xe[u]===(!fr||tA)))},convertToArrayPayload=u=>Array.isArray(u)?u:[u];function useSubscribe(u){const Xe=dp.useRef(u);Xe.current=u,dp.useEffect((()=>{const Wt=!u.disabled&&Xe.current.subject&&Xe.current.subject.subscribe({next:Xe.current.next});return()=>{Wt&&Wt.unsubscribe()}}),[u.disabled])}var index_esm_isString=u=>"string"==typeof u,generateWatchOutput=(u,Xe,Wt,fr,_r)=>index_esm_isString(u)?(fr&&Xe.watch.add(u),get(Wt,u,_r)):Array.isArray(u)?u.map((u=>(fr&&Xe.watch.add(u),get(Wt,u)))):(fr&&(Xe.watchAll=!0),Wt);var appendErrors=(u,Xe,Wt,fr,_r)=>Xe?{...Wt[u],types:{...Wt[u]&&Wt[u].types?Wt[u].types:{},[fr]:_r||!0}}:{},getValidationModes=u=>({isOnSubmit:!u||u===qk,isOnBlur:u===Bk,isOnChange:u===Vk,isOnAll:u===tA,isOnTouch:u===eA}),index_esm_isWatched=(u,Xe,Wt)=>!Wt&&(Xe.watchAll||Xe.watch.has(u)||[...Xe.watch].some((Xe=>u.startsWith(Xe)&&/^\.\w+/.test(u.slice(Xe.length)))));const iterateFieldsByAction=(u,Xe,Wt,fr)=>{for(const _r of Wt||Object.keys(u)){const Wt=get(u,_r);if(Wt){const{_f:u,...wr}=Wt;if(u){if(u.refs&&u.refs[0]&&Xe(u.refs[0],_r)&&!fr)return!0;if(u.ref&&Xe(u.ref,u.name)&&!fr)return!0;if(iterateFieldsByAction(wr,Xe))break}else if(index_esm_isObject(wr)&&iterateFieldsByAction(wr,Xe))break}}};var updateFieldArrayRootError=(u,Xe,Wt)=>{const fr=convertToArrayPayload(get(u,Wt));return set(fr,"root",Xe[Wt]),set(u,Wt,fr),u},isFileInput=u=>"file"===u.type,index_esm_isFunction=u=>"function"==typeof u,index_esm_isHTMLElement=u=>{if(!wk)return!1;const Xe=u?u.ownerDocument:0;return u instanceof(Xe&&Xe.defaultView?Xe.defaultView.HTMLElement:HTMLElement)},isMessage=u=>index_esm_isString(u),isRadioInput=u=>"radio"===u.type,isRegex=u=>u instanceof RegExp;const cA={value:!1,isValid:!1},uA={value:!0,isValid:!0};var getCheckboxValue=u=>{if(Array.isArray(u)){if(u.length>1){const Xe=u.filter((u=>u&&u.checked&&!u.disabled)).map((u=>u.value));return{value:Xe,isValid:!!Xe.length}}return u[0].checked&&!u[0].disabled?u[0].attributes&&!index_esm_isUndefined(u[0].attributes.value)?index_esm_isUndefined(u[0].value)||""===u[0].value?uA:{value:u[0].value,isValid:!0}:uA:cA}return cA};const dA={isValid:!1,value:null};var getRadioValue=u=>Array.isArray(u)?u.reduce(((u,Xe)=>Xe&&Xe.checked&&!Xe.disabled?{isValid:!0,value:Xe.value}:u),dA):dA;function getValidateError(u,Xe,Wt="validate"){if(isMessage(u)||Array.isArray(u)&&u.every(isMessage)||index_esm_isBoolean(u)&&!u)return{type:Wt,message:isMessage(u)?u:"",ref:Xe}}var getValueAndMessage=u=>index_esm_isObject(u)&&!isRegex(u)?u:{value:u,message:""},validateField=async(u,Xe,Wt,fr,_r)=>{const{ref:wr,refs:Ar,required:Kr,maxLength:In,minLength:no,min:io,max:oo,pattern:ao,validate:so,name:co,valueAsNumber:ho,mount:go,disabled:xo}=u._f,ko=get(Xe,co);if(!go||xo)return{};const Co=Ar?Ar[0]:wr,setCustomValidity=u=>{fr&&Co.reportValidity&&(Co.setCustomValidity(index_esm_isBoolean(u)?"":u||""),Co.reportValidity())},Io={},zo=isRadioInput(wr),Bo=isCheckBoxInput(wr),ca=zo||Bo,ua=(ho||isFileInput(wr))&&index_esm_isUndefined(wr.value)&&index_esm_isUndefined(ko)||index_esm_isHTMLElement(wr)&&""===wr.value||""===ko||Array.isArray(ko)&&!ko.length,Da=appendErrors.bind(null,co,Wt,Io),getMinMaxMessage=(u,Xe,Wt,fr=iA,_r=oA)=>{const Ar=u?Xe:Wt;Io[co]={type:u?fr:_r,message:Ar,ref:wr,...Da(u?fr:_r,Ar)}};if(_r?!Array.isArray(ko)||!ko.length:Kr&&(!ca&&(ua||isNullOrUndefined(ko))||index_esm_isBoolean(ko)&&!ko||Bo&&!getCheckboxValue(Ar).isValid||zo&&!getRadioValue(Ar).isValid)){const{value:u,message:Xe}=isMessage(Kr)?{value:!!Kr,message:Kr}:getValueAndMessage(Kr);if(u&&(Io[co]={type:sA,message:Xe,ref:Co,...Da(sA,Xe)},!Wt))return setCustomValidity(Xe),Io}if(!(ua||isNullOrUndefined(io)&&isNullOrUndefined(oo))){let u,Xe;const fr=getValueAndMessage(oo),_r=getValueAndMessage(io);if(isNullOrUndefined(ko)||isNaN(ko)){const Wt=wr.valueAsDate||new Date(ko),convertTimeToDate=u=>new Date((new Date).toDateString()+" "+u),Ar="time"==wr.type,Kr="week"==wr.type;index_esm_isString(fr.value)&&ko&&(u=Ar?convertTimeToDate(ko)>convertTimeToDate(fr.value):Kr?ko>fr.value:Wt>new Date(fr.value)),index_esm_isString(_r.value)&&ko&&(Xe=Ar?convertTimeToDate(ko)<convertTimeToDate(_r.value):Kr?ko<_r.value:Wt<new Date(_r.value))}else{const Wt=wr.valueAsNumber||(ko?+ko:ko);isNullOrUndefined(fr.value)||(u=Wt>fr.value),isNullOrUndefined(_r.value)||(Xe=Wt<_r.value)}if((u||Xe)&&(getMinMaxMessage(!!u,fr.message,_r.message,rA,nA),!Wt))return setCustomValidity(Io[co].message),Io}if((In||no)&&!ua&&(index_esm_isString(ko)||_r&&Array.isArray(ko))){const u=getValueAndMessage(In),Xe=getValueAndMessage(no),fr=!isNullOrUndefined(u.value)&&ko.length>+u.value,_r=!isNullOrUndefined(Xe.value)&&ko.length<+Xe.value;if((fr||_r)&&(getMinMaxMessage(fr,u.message,Xe.message),!Wt))return setCustomValidity(Io[co].message),Io}if(ao&&!ua&&index_esm_isString(ko)){const{value:u,message:Xe}=getValueAndMessage(ao);if(isRegex(u)&&!ko.match(u)&&(Io[co]={type:aA,message:Xe,ref:wr,...Da(aA,Xe)},!Wt))return setCustomValidity(Xe),Io}if(so)if(index_esm_isFunction(so)){const u=getValidateError(await so(ko,Xe),Co);if(u&&(Io[co]={...u,...Da(lA,u.message)},!Wt))return setCustomValidity(u.message),Io}else if(index_esm_isObject(so)){let u={};for(const fr in so){if(!isEmptyObject(u)&&!Wt)break;const _r=getValidateError(await so[fr](ko,Xe),Co,fr);_r&&(u={..._r,...Da(fr,_r.message)},setCustomValidity(_r.message),Wt&&(Io[co]=u))}if(!isEmptyObject(u)&&(Io[co]={ref:Co,...u},!Wt))return Io}return setCustomValidity(!0),Io};function unset(u,Xe){const Wt=Array.isArray(Xe)?Xe:isKey(Xe)?[Xe]:stringToPath(Xe),fr=1===Wt.length?u:function baseGet(u,Xe){const Wt=Xe.slice(0,-1).length;let fr=0;for(;fr<Wt;)u=index_esm_isUndefined(u)?fr++:u[Xe[fr++]];return u}(u,Wt),_r=Wt.length-1,wr=Wt[_r];return fr&&delete fr[wr],0!==_r&&(index_esm_isObject(fr)&&isEmptyObject(fr)||Array.isArray(fr)&&function isEmptyArray(u){for(const Xe in u)if(u.hasOwnProperty(Xe)&&!index_esm_isUndefined(u[Xe]))return!1;return!0}(fr))&&unset(u,Wt.slice(0,-1)),u}var createSubject=()=>{let u=[];return{get observers(){return u},next:Xe=>{for(const Wt of u)Wt.next&&Wt.next(Xe)},subscribe:Xe=>(u.push(Xe),{unsubscribe:()=>{u=u.filter((u=>u!==Xe))}}),unsubscribe:()=>{u=[]}}},isPrimitive=u=>isNullOrUndefined(u)||!isObjectType(u);function deepEqual(u,Xe){if(isPrimitive(u)||isPrimitive(Xe))return u===Xe;if(isDateObject(u)&&isDateObject(Xe))return u.getTime()===Xe.getTime();const Wt=Object.keys(u),fr=Object.keys(Xe);if(Wt.length!==fr.length)return!1;for(const _r of Wt){const Wt=u[_r];if(!fr.includes(_r))return!1;if("ref"!==_r){const u=Xe[_r];if(isDateObject(Wt)&&isDateObject(u)||index_esm_isObject(Wt)&&index_esm_isObject(u)||Array.isArray(Wt)&&Array.isArray(u)?!deepEqual(Wt,u):Wt!==u)return!1}}return!0}var isMultipleSelect=u=>"select-multiple"===u.type,live=u=>index_esm_isHTMLElement(u)&&u.isConnected,objectHasFunction=u=>{for(const Xe in u)if(index_esm_isFunction(u[Xe]))return!0;return!1};function markFieldsDirty(u,Xe={}){const Wt=Array.isArray(u);if(index_esm_isObject(u)||Wt)for(const Wt in u)Array.isArray(u[Wt])||index_esm_isObject(u[Wt])&&!objectHasFunction(u[Wt])?(Xe[Wt]=Array.isArray(u[Wt])?[]:{},markFieldsDirty(u[Wt],Xe[Wt])):isNullOrUndefined(u[Wt])||(Xe[Wt]=!0);return Xe}function getDirtyFieldsFromDefaultValues(u,Xe,Wt){const fr=Array.isArray(u);if(index_esm_isObject(u)||fr)for(const fr in u)Array.isArray(u[fr])||index_esm_isObject(u[fr])&&!objectHasFunction(u[fr])?index_esm_isUndefined(Xe)||isPrimitive(Wt[fr])?Wt[fr]=Array.isArray(u[fr])?markFieldsDirty(u[fr],[]):{...markFieldsDirty(u[fr])}:getDirtyFieldsFromDefaultValues(u[fr],isNullOrUndefined(Xe)?{}:Xe[fr],Wt[fr]):Wt[fr]=!deepEqual(u[fr],Xe[fr]);return Wt}var getDirtyFields=(u,Xe)=>getDirtyFieldsFromDefaultValues(u,Xe,markFieldsDirty(Xe)),getFieldValueAs=(u,{valueAsNumber:Xe,valueAsDate:Wt,setValueAs:fr})=>index_esm_isUndefined(u)?u:Xe?""===u?NaN:u?+u:u:Wt&&index_esm_isString(u)?new Date(u):fr?fr(u):u;function getFieldValue(u){const Xe=u.ref;if(!(u.refs?u.refs.every((u=>u.disabled)):Xe.disabled))return isFileInput(Xe)?Xe.files:isRadioInput(Xe)?getRadioValue(u.refs).value:isMultipleSelect(Xe)?[...Xe.selectedOptions].map((({value:u})=>u)):isCheckBoxInput(Xe)?getCheckboxValue(u.refs).value:getFieldValueAs(index_esm_isUndefined(Xe.value)?u.ref.value:Xe.value,u)}var getRuleValue=u=>index_esm_isUndefined(u)?u:isRegex(u)?u.source:index_esm_isObject(u)?isRegex(u.value)?u.value.source:u.value:u;const hA="AsyncFunction";function schemaErrorLookup(u,Xe,Wt){const fr=get(u,Wt);if(fr||isKey(Wt))return{error:fr,name:Wt};const _r=Wt.split(".");for(;_r.length;){const fr=_r.join("."),wr=get(Xe,fr),Ar=get(u,fr);if(wr&&!Array.isArray(wr)&&Wt!==fr)return{name:Wt};if(Ar&&Ar.type)return{name:fr,error:Ar};_r.pop()}return{name:Wt}}const pA={mode:qk,reValidateMode:Vk,shouldFocusError:!0};function createFormControl(u={}){let Xe,Wt={...pA,...u},fr={submitCount:0,isDirty:!1,isLoading:index_esm_isFunction(Wt.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:Wt.errors||{},disabled:Wt.disabled||!1},_r={},wr=(index_esm_isObject(Wt.defaultValues)||index_esm_isObject(Wt.values))&&cloneObject(Wt.defaultValues||Wt.values)||{},Ar=Wt.shouldUnregister?{}:cloneObject(wr),Kr={action:!1,mount:!1,watch:!1},In={mount:new Set,unMount:new Set,array:new Set,watch:new Set},no=0;const io={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},oo={values:createSubject(),array:createSubject(),state:createSubject()},ao=getValidationModes(Wt.mode),so=getValidationModes(Wt.reValidateMode),co=Wt.criteriaMode===tA,_updateValid=async u=>{if(io.isValid||u){const u=Wt.resolver?isEmptyObject((await _executeSchema()).errors):await executeBuiltInValidation(_r,!0);u!==fr.isValid&&oo.state.next({isValid:u})}},_updateIsValidating=(u,Xe)=>{(io.isValidating||io.validatingFields)&&((u||Array.from(In.mount)).forEach((u=>{u&&(Xe?set(fr.validatingFields,u,Xe):unset(fr.validatingFields,u))})),oo.state.next({validatingFields:fr.validatingFields,isValidating:!isEmptyObject(fr.validatingFields)}))},updateValidAndValue=(u,Xe,Wt,fr)=>{const In=get(_r,u);if(In){const _r=get(Ar,u,index_esm_isUndefined(Wt)?get(wr,u):Wt);index_esm_isUndefined(_r)||fr&&fr.defaultChecked||Xe?set(Ar,u,Xe?_r:getFieldValue(In._f)):setFieldValue(u,_r),Kr.mount&&_updateValid()}},updateTouchAndDirty=(u,Xe,Wt,Ar,Kr)=>{let In=!1,no=!1;const ao={name:u},so=!!(get(_r,u)&&get(_r,u)._f&&get(_r,u)._f.disabled);if(!Wt||Ar){io.isDirty&&(no=fr.isDirty,fr.isDirty=ao.isDirty=_getDirty(),In=no!==ao.isDirty);const Wt=so||deepEqual(get(wr,u),Xe);no=!(so||!get(fr.dirtyFields,u)),Wt||so?unset(fr.dirtyFields,u):set(fr.dirtyFields,u,!0),ao.dirtyFields=fr.dirtyFields,In=In||io.dirtyFields&&no!==!Wt}if(Wt){const Xe=get(fr.touchedFields,u);Xe||(set(fr.touchedFields,u,Wt),ao.touchedFields=fr.touchedFields,In=In||io.touchedFields&&Xe!==Wt)}return In&&Kr&&oo.state.next(ao),In?ao:{}},shouldRenderByError=(Wt,_r,wr,Ar)=>{const Kr=get(fr.errors,Wt),In=io.isValid&&index_esm_isBoolean(_r)&&fr.isValid!==_r;var ao;if(u.delayError&&wr?(ao=()=>((u,Xe)=>{set(fr.errors,u,Xe),oo.state.next({errors:fr.errors})})(Wt,wr),Xe=u=>{clearTimeout(no),no=setTimeout(ao,u)},Xe(u.delayError)):(clearTimeout(no),Xe=null,wr?set(fr.errors,Wt,wr):unset(fr.errors,Wt)),(wr?!deepEqual(Kr,wr):Kr)||!isEmptyObject(Ar)||In){const u={...Ar,...In&&index_esm_isBoolean(_r)?{isValid:_r}:{},errors:fr.errors,name:Wt};fr={...fr,...u},oo.state.next(u)}},_executeSchema=async u=>{_updateIsValidating(u,!0);const Xe=await Wt.resolver(Ar,Wt.context,((u,Xe,Wt,fr)=>{const _r={};for(const Wt of u){const u=get(Xe,Wt);u&&set(_r,Wt,u._f)}return{criteriaMode:Wt,names:[...u],fields:_r,shouldUseNativeValidation:fr}})(u||In.mount,_r,Wt.criteriaMode,Wt.shouldUseNativeValidation));return _updateIsValidating(u),Xe},executeBuiltInValidation=async(u,Xe,_r={valid:!0})=>{for(const Kr in u){const no=u[Kr];if(no){const{_f:u,...oo}=no;if(u){const oo=In.array.has(u.name),ao=no._f&&!((wr=no._f)&&wr.validate||!(index_esm_isFunction(wr.validate)&&wr.validate.constructor.name===hA||index_esm_isObject(wr.validate)&&Object.values(wr.validate).find((u=>u.constructor.name===hA))));ao&&io.validatingFields&&_updateIsValidating([Kr],!0);const so=await validateField(no,Ar,co,Wt.shouldUseNativeValidation&&!Xe,oo);if(ao&&io.validatingFields&&_updateIsValidating([Kr]),so[u.name]&&(_r.valid=!1,Xe))break;!Xe&&(get(so,u.name)?oo?updateFieldArrayRootError(fr.errors,so,u.name):set(fr.errors,u.name,so[u.name]):unset(fr.errors,u.name))}!isEmptyObject(oo)&&await executeBuiltInValidation(oo,Xe,_r)}}var wr;return _r.valid},_getDirty=(u,Xe)=>(u&&Xe&&set(Ar,u,Xe),!deepEqual(getValues(),wr)),_getWatch=(u,Xe,Wt)=>generateWatchOutput(u,In,{...Kr.mount?Ar:index_esm_isUndefined(Xe)?wr:index_esm_isString(u)?{[u]:Xe}:Xe},Wt,Xe),setFieldValue=(u,Xe,Wt={})=>{const fr=get(_r,u);let wr=Xe;if(fr){const Wt=fr._f;Wt&&(!Wt.disabled&&set(Ar,u,getFieldValueAs(Xe,Wt)),wr=index_esm_isHTMLElement(Wt.ref)&&isNullOrUndefined(Xe)?"":Xe,isMultipleSelect(Wt.ref)?[...Wt.ref.options].forEach((u=>u.selected=wr.includes(u.value))):Wt.refs?isCheckBoxInput(Wt.ref)?Wt.refs.length>1?Wt.refs.forEach((u=>(!u.defaultChecked||!u.disabled)&&(u.checked=Array.isArray(wr)?!!wr.find((Xe=>Xe===u.value)):wr===u.value))):Wt.refs[0]&&(Wt.refs[0].checked=!!wr):Wt.refs.forEach((u=>u.checked=u.value===wr)):isFileInput(Wt.ref)?Wt.ref.value="":(Wt.ref.value=wr,Wt.ref.type||oo.values.next({name:u,values:{...Ar}})))}(Wt.shouldDirty||Wt.shouldTouch)&&updateTouchAndDirty(u,wr,Wt.shouldTouch,Wt.shouldDirty,!0),Wt.shouldValidate&&trigger(u)},setValues=(u,Xe,Wt)=>{for(const fr in Xe){const wr=Xe[fr],Ar=`${u}.${fr}`,Kr=get(_r,Ar);!In.array.has(u)&&isPrimitive(wr)&&(!Kr||Kr._f)||isDateObject(wr)?setFieldValue(Ar,wr,Wt):setValues(Ar,wr,Wt)}},setValue=(u,Xe,Wt={})=>{const no=get(_r,u),ao=In.array.has(u),so=cloneObject(Xe);set(Ar,u,so),ao?(oo.array.next({name:u,values:{...Ar}}),(io.isDirty||io.dirtyFields)&&Wt.shouldDirty&&oo.state.next({name:u,dirtyFields:getDirtyFields(wr,Ar),isDirty:_getDirty(u,so)})):!no||no._f||isNullOrUndefined(so)?setFieldValue(u,so,Wt):setValues(u,so,Wt),index_esm_isWatched(u,In)&&oo.state.next({...fr}),oo.values.next({name:Kr.mount?u:void 0,values:{...Ar}})},onChange=async wr=>{Kr.mount=!0;const no=wr.target;let ho=no.name,go=!0;const xo=get(_r,ho),_updateIsFieldValueUpdated=u=>{go=Number.isNaN(u)||deepEqual(u,get(Ar,ho,u))};if(xo){let Kr,Co;const Io=no.type?getFieldValue(xo._f):getEventValue(wr),zo=wr.type===Ak||wr.type===zk,Bo=!((ko=xo._f).mount&&(ko.required||ko.min||ko.max||ko.maxLength||ko.minLength||ko.pattern||ko.validate)||Wt.resolver||get(fr.errors,ho)||xo._f.deps)||((u,Xe,Wt,fr,_r)=>!_r.isOnAll&&(!Wt&&_r.isOnTouch?!(Xe||u):(Wt?fr.isOnBlur:_r.isOnBlur)?!u:!(Wt?fr.isOnChange:_r.isOnChange)||u))(zo,get(fr.touchedFields,ho),fr.isSubmitted,so,ao),ca=index_esm_isWatched(ho,In,zo);set(Ar,ho,Io),zo?(xo._f.onBlur&&xo._f.onBlur(wr),Xe&&Xe(0)):xo._f.onChange&&xo._f.onChange(wr);const ua=updateTouchAndDirty(ho,Io,zo,!1),Da=!isEmptyObject(ua)||ca;if(!zo&&oo.values.next({name:ho,type:wr.type,values:{...Ar}}),Bo)return io.isValid&&("onBlur"===u.mode?zo&&_updateValid():_updateValid()),Da&&oo.state.next({name:ho,...ca?{}:ua});if(!zo&&ca&&oo.state.next({...fr}),Wt.resolver){const{errors:u}=await _executeSchema([ho]);if(_updateIsFieldValueUpdated(Io),go){const Xe=schemaErrorLookup(fr.errors,_r,ho),Wt=schemaErrorLookup(u,_r,Xe.name||ho);Kr=Wt.error,ho=Wt.name,Co=isEmptyObject(u)}}else _updateIsValidating([ho],!0),Kr=(await validateField(xo,Ar,co,Wt.shouldUseNativeValidation))[ho],_updateIsValidating([ho]),_updateIsFieldValueUpdated(Io),go&&(Kr?Co=!1:io.isValid&&(Co=await executeBuiltInValidation(_r,!0)));go&&(xo._f.deps&&trigger(xo._f.deps),shouldRenderByError(ho,Co,Kr,ua))}var ko},_focusInput=(u,Xe)=>{if(get(fr.errors,Xe)&&u.focus)return u.focus(),1},trigger=async(u,Xe={})=>{let wr,Ar;const Kr=convertToArrayPayload(u);if(Wt.resolver){const Xe=await(async u=>{const{errors:Xe}=await _executeSchema(u);if(u)for(const Wt of u){const u=get(Xe,Wt);u?set(fr.errors,Wt,u):unset(fr.errors,Wt)}else fr.errors=Xe;return Xe})(index_esm_isUndefined(u)?u:Kr);wr=isEmptyObject(Xe),Ar=u?!Kr.some((u=>get(Xe,u))):wr}else u?(Ar=(await Promise.all(Kr.map((async u=>{const Xe=get(_r,u);return await executeBuiltInValidation(Xe&&Xe._f?{[u]:Xe}:Xe)})))).every(Boolean),(Ar||fr.isValid)&&_updateValid()):Ar=wr=await executeBuiltInValidation(_r);return oo.state.next({...!index_esm_isString(u)||io.isValid&&wr!==fr.isValid?{}:{name:u},...Wt.resolver||!u?{isValid:wr}:{},errors:fr.errors}),Xe.shouldFocus&&!Ar&&iterateFieldsByAction(_r,_focusInput,u?Kr:In.mount),Ar},getValues=u=>{const Xe={...Kr.mount?Ar:wr};return index_esm_isUndefined(u)?Xe:index_esm_isString(u)?get(Xe,u):u.map((u=>get(Xe,u)))},getFieldState=(u,Xe)=>({invalid:!!get((Xe||fr).errors,u),isDirty:!!get((Xe||fr).dirtyFields,u),error:get((Xe||fr).errors,u),isValidating:!!get(fr.validatingFields,u),isTouched:!!get((Xe||fr).touchedFields,u)}),setError=(u,Xe,Wt)=>{const wr=(get(_r,u,{_f:{}})._f||{}).ref,Ar=get(fr.errors,u)||{},{ref:Kr,message:In,type:no,...io}=Ar;set(fr.errors,u,{...io,...Xe,ref:wr}),oo.state.next({name:u,errors:fr.errors,isValid:!1}),Wt&&Wt.shouldFocus&&wr&&wr.focus&&wr.focus()},unregister=(u,Xe={})=>{for(const Kr of u?convertToArrayPayload(u):In.mount)In.mount.delete(Kr),In.array.delete(Kr),Xe.keepValue||(unset(_r,Kr),unset(Ar,Kr)),!Xe.keepError&&unset(fr.errors,Kr),!Xe.keepDirty&&unset(fr.dirtyFields,Kr),!Xe.keepTouched&&unset(fr.touchedFields,Kr),!Xe.keepIsValidating&&unset(fr.validatingFields,Kr),!Wt.shouldUnregister&&!Xe.keepDefaultValue&&unset(wr,Kr);oo.values.next({values:{...Ar}}),oo.state.next({...fr,...Xe.keepDirty?{isDirty:_getDirty()}:{}}),!Xe.keepIsValid&&_updateValid()},_updateDisabledField=({disabled:u,name:Xe,field:Wt,fields:fr,value:_r})=>{if(index_esm_isBoolean(u)&&Kr.mount||u){const wr=u?void 0:index_esm_isUndefined(_r)?getFieldValue(Wt?Wt._f:get(fr,Xe)._f):_r;set(Ar,Xe,wr),updateTouchAndDirty(Xe,wr,!1,!1,!0)}},register=(Xe,fr={})=>{let Ar=get(_r,Xe);const no=index_esm_isBoolean(fr.disabled)||index_esm_isBoolean(u.disabled);return set(_r,Xe,{...Ar||{},_f:{...Ar&&Ar._f?Ar._f:{ref:{name:Xe}},name:Xe,mount:!0,...fr}}),In.mount.add(Xe),Ar?_updateDisabledField({field:Ar,disabled:index_esm_isBoolean(fr.disabled)?fr.disabled:u.disabled,name:Xe,value:fr.value}):updateValidAndValue(Xe,!0,fr.value),{...no?{disabled:fr.disabled||u.disabled}:{},...Wt.progressive?{required:!!fr.required,min:getRuleValue(fr.min),max:getRuleValue(fr.max),minLength:getRuleValue(fr.minLength),maxLength:getRuleValue(fr.maxLength),pattern:getRuleValue(fr.pattern)}:{},name:Xe,onChange,onBlur:onChange,ref:u=>{if(u){register(Xe,fr),Ar=get(_r,Xe);const Wt=index_esm_isUndefined(u.value)&&u.querySelectorAll&&u.querySelectorAll("input,select,textarea")[0]||u,Kr=(u=>isRadioInput(u)||isCheckBoxInput(u))(Wt),In=Ar._f.refs||[];if(Kr?In.find((u=>u===Wt)):Wt===Ar._f.ref)return;set(_r,Xe,{_f:{...Ar._f,...Kr?{refs:[...In.filter(live),Wt,...Array.isArray(get(wr,Xe))?[{}]:[]],ref:{type:Wt.type,name:Xe}}:{ref:Wt}}}),updateValidAndValue(Xe,!1,void 0,Wt)}else Ar=get(_r,Xe,{}),Ar._f&&(Ar._f.mount=!1),(Wt.shouldUnregister||fr.shouldUnregister)&&(!isNameInFieldArray(In.array,Xe)||!Kr.action)&&In.unMount.add(Xe)}}},_focusError=()=>Wt.shouldFocusError&&iterateFieldsByAction(_r,_focusInput,In.mount),handleSubmit=(u,Xe)=>async wr=>{let Kr;wr&&(wr.preventDefault&&wr.preventDefault(),wr.persist&&wr.persist());let In=cloneObject(Ar);if(oo.state.next({isSubmitting:!0}),Wt.resolver){const{errors:u,values:Xe}=await _executeSchema();fr.errors=u,In=Xe}else await executeBuiltInValidation(_r);if(unset(fr.errors,"root"),isEmptyObject(fr.errors)){oo.state.next({errors:{}});try{await u(In,wr)}catch(u){Kr=u}}else Xe&&await Xe({...fr.errors},wr),_focusError(),setTimeout(_focusError);if(oo.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:isEmptyObject(fr.errors)&&!Kr,submitCount:fr.submitCount+1,errors:fr.errors}),Kr)throw Kr},_reset=(Xe,Wt={})=>{const no=Xe?cloneObject(Xe):wr,ao=cloneObject(no),so=isEmptyObject(Xe),co=so?wr:ao;if(Wt.keepDefaultValues||(wr=no),!Wt.keepValues){if(Wt.keepDirtyValues)for(const u of In.mount)get(fr.dirtyFields,u)?set(co,u,get(Ar,u)):setValue(u,get(co,u));else{if(wk&&index_esm_isUndefined(Xe))for(const u of In.mount){const Xe=get(_r,u);if(Xe&&Xe._f){const u=Array.isArray(Xe._f.refs)?Xe._f.refs[0]:Xe._f.ref;if(index_esm_isHTMLElement(u)){const Xe=u.closest("form");if(Xe){Xe.reset();break}}}}_r={}}Ar=u.shouldUnregister?Wt.keepDefaultValues?cloneObject(wr):{}:cloneObject(co),oo.array.next({values:{...co}}),oo.values.next({values:{...co}})}In={mount:Wt.keepDirtyValues?In.mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},Kr.mount=!io.isValid||!!Wt.keepIsValid||!!Wt.keepDirtyValues,Kr.watch=!!u.shouldUnregister,oo.state.next({submitCount:Wt.keepSubmitCount?fr.submitCount:0,isDirty:!so&&(Wt.keepDirty?fr.isDirty:!(!Wt.keepDefaultValues||deepEqual(Xe,wr))),isSubmitted:!!Wt.keepIsSubmitted&&fr.isSubmitted,dirtyFields:so?{}:Wt.keepDirtyValues?Wt.keepDefaultValues&&Ar?getDirtyFields(wr,Ar):fr.dirtyFields:Wt.keepDefaultValues&&Xe?getDirtyFields(wr,Xe):Wt.keepDirty?fr.dirtyFields:{},touchedFields:Wt.keepTouched?fr.touchedFields:{},errors:Wt.keepErrors?fr.errors:{},isSubmitSuccessful:!!Wt.keepIsSubmitSuccessful&&fr.isSubmitSuccessful,isSubmitting:!1})},reset=(u,Xe)=>_reset(index_esm_isFunction(u)?u(Ar):u,Xe);return{control:{register,unregister,getFieldState,handleSubmit,setError,_executeSchema,_getWatch,_getDirty,_updateValid,_removeUnmounted:()=>{for(const u of In.unMount){const Xe=get(_r,u);Xe&&(Xe._f.refs?Xe._f.refs.every((u=>!live(u))):!live(Xe._f.ref))&&unregister(u)}In.unMount=new Set},_updateFieldArray:(u,Xe=[],Wt,In,no=!0,ao=!0)=>{if(In&&Wt){if(Kr.action=!0,ao&&Array.isArray(get(_r,u))){const Xe=Wt(get(_r,u),In.argA,In.argB);no&&set(_r,u,Xe)}if(ao&&Array.isArray(get(fr.errors,u))){const Xe=Wt(get(fr.errors,u),In.argA,In.argB);no&&set(fr.errors,u,Xe),((u,Xe)=>{!compact(get(u,Xe)).length&&unset(u,Xe)})(fr.errors,u)}if(io.touchedFields&&ao&&Array.isArray(get(fr.touchedFields,u))){const Xe=Wt(get(fr.touchedFields,u),In.argA,In.argB);no&&set(fr.touchedFields,u,Xe)}io.dirtyFields&&(fr.dirtyFields=getDirtyFields(wr,Ar)),oo.state.next({name:u,isDirty:_getDirty(u,Xe),dirtyFields:fr.dirtyFields,errors:fr.errors,isValid:fr.isValid})}else set(Ar,u,Xe)},_updateDisabledField,_getFieldArray:Xe=>compact(get(Kr.mount?Ar:wr,Xe,u.shouldUnregister?get(wr,Xe,[]):[])),_reset,_resetDefaultValues:()=>index_esm_isFunction(Wt.defaultValues)&&Wt.defaultValues().then((u=>{reset(u,Wt.resetOptions),oo.state.next({isLoading:!1})})),_updateFormState:u=>{fr={...fr,...u}},_disableForm:u=>{index_esm_isBoolean(u)&&(oo.state.next({disabled:u}),iterateFieldsByAction(_r,((Xe,Wt)=>{const fr=get(_r,Wt);fr&&(Xe.disabled=fr._f.disabled||u,Array.isArray(fr._f.refs)&&fr._f.refs.forEach((Xe=>{Xe.disabled=fr._f.disabled||u})))}),0,!1))},_subjects:oo,_proxyFormState:io,_setErrors:u=>{fr.errors=u,oo.state.next({errors:fr.errors,isValid:!1})},get _fields(){return _r},get _formValues(){return Ar},get _state(){return Kr},set _state(u){Kr=u},get _defaultValues(){return wr},get _names(){return In},set _names(u){In=u},get _formState(){return fr},set _formState(u){fr=u},get _options(){return Wt},set _options(u){Wt={...Wt,...u}}},trigger,register,handleSubmit,watch:(u,Xe)=>index_esm_isFunction(u)?oo.values.subscribe({next:Wt=>u(_getWatch(void 0,Xe),Wt)}):_getWatch(u,Xe,!0),setValue,getValues,reset,resetField:(u,Xe={})=>{get(_r,u)&&(index_esm_isUndefined(Xe.defaultValue)?setValue(u,cloneObject(get(wr,u))):(setValue(u,Xe.defaultValue),set(wr,u,cloneObject(Xe.defaultValue))),Xe.keepTouched||unset(fr.touchedFields,u),Xe.keepDirty||(unset(fr.dirtyFields,u),fr.isDirty=Xe.defaultValue?_getDirty(u,cloneObject(get(wr,u))):_getDirty()),Xe.keepError||(unset(fr.errors,u),io.isValid&&_updateValid()),oo.state.next({...fr}))},clearErrors:u=>{u&&convertToArrayPayload(u).forEach((u=>unset(fr.errors,u))),oo.state.next({errors:u?fr.errors:{}})},unregister,setError,setFocus:(u,Xe={})=>{const Wt=get(_r,u),fr=Wt&&Wt._f;if(fr){const u=fr.refs?fr.refs[0]:fr.ref;u.focus&&(u.focus(),Xe.shouldSelect&&u.select())}},getFieldState}}const s=(u,Xe,Wt)=>{if(u&&"reportValidity"in u){const fr=get(Wt,Xe);u.setCustomValidity(fr&&fr.message||""),u.reportValidity()}},resolvers_o=(u,Xe)=>{for(const Wt in Xe.fields){const fr=Xe.fields[Wt];fr&&fr.ref&&"reportValidity"in fr.ref?s(fr.ref,Wt,u):fr.refs&&fr.refs.forEach((Xe=>s(Xe,Wt,u)))}},resolvers_r=(u,Xe)=>{Xe.shouldUseNativeValidation&&resolvers_o(u,Xe);const Wt={};for(const fr in u){const _r=get(Xe.fields,fr),wr=Object.assign(u[fr]||{},{ref:_r&&_r.ref});if(i(Xe.names||Object.keys(u),fr)){const u=Object.assign({},get(Wt,fr));set(u,"root",wr),set(Wt,fr,u)}else set(Wt,fr,wr)}return Wt},i=(u,Xe)=>u.some((u=>u.startsWith(Xe+".")));var n=function(u,Xe){for(var Wt={};u.length;){var fr=u[0],_r=fr.code,wr=fr.message,Ar=fr.path.join(".");if(!Wt[Ar])if("unionErrors"in fr){var Kr=fr.unionErrors[0].errors[0];Wt[Ar]={message:Kr.message,type:Kr.code}}else Wt[Ar]={message:wr,type:_r};if("unionErrors"in fr&&fr.unionErrors.forEach((function(Xe){return Xe.errors.forEach((function(Xe){return u.push(Xe)}))})),Xe){var In=Wt[Ar].types,no=In&&In[fr.code];Wt[Ar]=appendErrors(Ar,Xe,Wt,_r,no?[].concat(no,fr.message):fr.message)}u.shift()}return Wt},zod_t=function(u,Xe,Wt){return void 0===Wt&&(Wt={}),function(fr,_r,wr){try{return Promise.resolve(function(_r,Ar){try{var Kr=Promise.resolve(u["sync"===Wt.mode?"parse":"parseAsync"](fr,Xe)).then((function(u){return wr.shouldUseNativeValidation&&resolvers_o({},wr),{errors:{},values:Wt.raw?fr:u}}))}catch(u){return Ar(u)}return Kr&&Kr.then?Kr.then(void 0,Ar):Kr}(0,(function(u){if(function(u){return Array.isArray(null==u?void 0:u.errors)}(u))return{values:{},errors:resolvers_r(n(u.errors,!wr.shouldUseNativeValidation&&"all"===wr.criteriaMode),wr)};throw u})))}catch(u){return Promise.reject(u)}}},fA=__webpack_require__(4661),mA=__webpack_require__(9453),gA=__webpack_require__(4877),yA=__webpack_require__(4705);const _A=["onChange","maxRows","minRows","style","value"];function getStyleValue(u){return parseInt(u,10)||0}const vA={visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"};const bA=dp.forwardRef((function TextareaAutosize(u,Xe){const{onChange:Wt,maxRows:fr,minRows:_r=1,style:wr,value:Ar}=u,Kr=(0,yp.A)(u,_A),{current:In}=dp.useRef(null!=Ar),no=dp.useRef(null),io=(0,Am.A)(Xe,no),oo=dp.useRef(null),ao=dp.useRef(null),so=dp.useCallback((()=>{const Xe=no.current,Wt=(0,gA.A)(Xe).getComputedStyle(Xe);if("0px"===Wt.width)return{outerHeightStyle:0,overflowing:!1};const wr=ao.current;wr.style.width=Wt.width,wr.value=Xe.value||u.placeholder||"x","\n"===wr.value.slice(-1)&&(wr.value+=" ");const Ar=Wt.boxSizing,Kr=getStyleValue(Wt.paddingBottom)+getStyleValue(Wt.paddingTop),In=getStyleValue(Wt.borderBottomWidth)+getStyleValue(Wt.borderTopWidth),io=wr.scrollHeight;wr.value="x";const oo=wr.scrollHeight;let so=io;_r&&(so=Math.max(Number(_r)*oo,so)),fr&&(so=Math.min(Number(fr)*oo,so)),so=Math.max(so,oo);return{outerHeightStyle:so+("border-box"===Ar?Kr+In:0),overflowing:Math.abs(so-io)<=1}}),[fr,_r,u.placeholder]),co=dp.useCallback((()=>{const u=so();if(function TextareaAutosize_isEmpty(u){return null==u||0===Object.keys(u).length||0===u.outerHeightStyle&&!u.overflowing}(u))return;const Xe=u.outerHeightStyle,Wt=no.current;oo.current!==Xe&&(oo.current=Xe,Wt.style.height=`${Xe}px`),Wt.style.overflow=u.overflowing?"hidden":""}),[so]);(0,Tm.A)((()=>{const handleResize=()=>{co()};let u;const Xe=(0,yA.A)(handleResize),Wt=no.current,fr=(0,gA.A)(Wt);let _r;return fr.addEventListener("resize",Xe),"undefined"!=typeof ResizeObserver&&(_r=new ResizeObserver(handleResize),_r.observe(Wt)),()=>{Xe.clear(),cancelAnimationFrame(u),fr.removeEventListener("resize",Xe),_r&&_r.disconnect()}}),[so,co]),(0,Tm.A)((()=>{co()}));return(0,Fp.jsxs)(dp.Fragment,{children:[(0,Fp.jsx)("textarea",(0,_p.A)({value:Ar,onChange:u=>{In||co(),Wt&&Wt(u)},ref:io,rows:_r,style:wr},Kr)),(0,Fp.jsx)("textarea",{"aria-hidden":!0,className:u.className,readOnly:!0,ref:ao,tabIndex:-1,style:(0,_p.A)({},vA,wr,{paddingTop:0,paddingBottom:0})})]})}));var xA=bA,wA=__webpack_require__(2778),SA=__webpack_require__(9940);var kA=function GlobalStyles_GlobalStyles({styles:u,themeId:Xe,defaultTheme:Wt={}}){const fr=Ep(Wt),_r="function"==typeof u?u(Xe&&fr[Xe]||fr):u;return(0,Fp.jsx)(SA.A,{styles:_r})};var AA=function GlobalStyles_GlobalStyles_GlobalStyles(u){return(0,Fp.jsx)(kA,(0,_p.A)({},u,{defaultTheme:lm.A,themeId:cm.A}))};function getInputBaseUtilityClass(u){return(0,bp.Ay)("MuiInputBase",u)}var TA=(0,uf.A)("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"]);const EA=["aria-describedby","autoComplete","autoFocus","className","color","components","componentsProps","defaultValue","disabled","disableInjectingGlobalStyles","endAdornment","error","fullWidth","id","inputComponent","inputProps","inputRef","margin","maxRows","minRows","multiline","name","onBlur","onChange","onClick","onFocus","onKeyDown","onKeyUp","placeholder","readOnly","renderSuffix","rows","size","slotProps","slots","startAdornment","type","value"],rootOverridesResolver=(u,Xe)=>{const{ownerState:Wt}=u;return[Xe.root,Wt.formControl&&Xe.formControl,Wt.startAdornment&&Xe.adornedStart,Wt.endAdornment&&Xe.adornedEnd,Wt.error&&Xe.error,"small"===Wt.size&&Xe.sizeSmall,Wt.multiline&&Xe.multiline,Wt.color&&Xe[`color${(0,Vp.A)(Wt.color)}`],Wt.fullWidth&&Xe.fullWidth,Wt.hiddenLabel&&Xe.hiddenLabel]},inputOverridesResolver=(u,Xe)=>{const{ownerState:Wt}=u;return[Xe.input,"small"===Wt.size&&Xe.inputSizeSmall,Wt.multiline&&Xe.inputMultiline,"search"===Wt.type&&Xe.inputTypeSearch,Wt.startAdornment&&Xe.inputAdornedStart,Wt.endAdornment&&Xe.inputAdornedEnd,Wt.hiddenLabel&&Xe.inputHiddenLabel]},CA=(0,Up.Ay)("div",{name:"MuiInputBase",slot:"Root",overridesResolver:rootOverridesResolver})((({theme:u,ownerState:Xe})=>(0,_p.A)({},u.typography.body1,{color:(u.vars||u).palette.text.primary,lineHeight:"1.4375em",boxSizing:"border-box",position:"relative",cursor:"text",display:"inline-flex",alignItems:"center",[`&.${TA.disabled}`]:{color:(u.vars||u).palette.text.disabled,cursor:"default"}},Xe.multiline&&(0,_p.A)({padding:"4px 0 5px"},"small"===Xe.size&&{paddingTop:1}),Xe.fullWidth&&{width:"100%"}))),PA=(0,Up.Ay)("input",{name:"MuiInputBase",slot:"Input",overridesResolver:inputOverridesResolver})((({theme:u,ownerState:Xe})=>{const Wt="light"===u.palette.mode,fr=(0,_p.A)({color:"currentColor"},u.vars?{opacity:u.vars.opacity.inputPlaceholder}:{opacity:Wt?.42:.5},{transition:u.transitions.create("opacity",{duration:u.transitions.duration.shorter})}),_r={opacity:"0 !important"},wr=u.vars?{opacity:u.vars.opacity.inputPlaceholder}:{opacity:Wt?.42:.5};return(0,_p.A)({font:"inherit",letterSpacing:"inherit",color:"currentColor",padding:"4px 0 5px",border:0,boxSizing:"content-box",background:"none",height:"1.4375em",margin:0,WebkitTapHighlightColor:"transparent",display:"block",minWidth:0,width:"100%",animationName:"mui-auto-fill-cancel",animationDuration:"10ms","&::-webkit-input-placeholder":fr,"&::-moz-placeholder":fr,"&:-ms-input-placeholder":fr,"&::-ms-input-placeholder":fr,"&:focus":{outline:0},"&:invalid":{boxShadow:"none"},"&::-webkit-search-decoration":{WebkitAppearance:"none"},[`label[data-shrink=false] + .${TA.formControl} &`]:{"&::-webkit-input-placeholder":_r,"&::-moz-placeholder":_r,"&:-ms-input-placeholder":_r,"&::-ms-input-placeholder":_r,"&:focus::-webkit-input-placeholder":wr,"&:focus::-moz-placeholder":wr,"&:focus:-ms-input-placeholder":wr,"&:focus::-ms-input-placeholder":wr},[`&.${TA.disabled}`]:{opacity:1,WebkitTextFillColor:(u.vars||u).palette.text.disabled},"&:-webkit-autofill":{animationDuration:"5000s",animationName:"mui-auto-fill"}},"small"===Xe.size&&{paddingTop:1},Xe.multiline&&{height:"auto",resize:"none",padding:0,paddingTop:0},"search"===Xe.type&&{MozAppearance:"textfield"})})),IA=(0,Fp.jsx)(AA,{styles:{"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}}),MA=dp.forwardRef((function InputBase(u,Xe){var Wt;const fr=(0,$p.b)({props:u,name:"MuiInputBase"}),{"aria-describedby":_r,autoComplete:wr,autoFocus:Ar,className:Kr,components:In={},componentsProps:no={},defaultValue:io,disabled:oo,disableInjectingGlobalStyles:ao,endAdornment:so,fullWidth:co=!1,id:ho,inputComponent:go="input",inputProps:xo={},inputRef:ko,maxRows:Co,minRows:Io,multiline:zo=!1,name:Bo,onBlur:ca,onChange:ua,onClick:Da,onFocus:ns,onKeyDown:yl,onKeyUp:vl,placeholder:kl,readOnly:Al,renderSuffix:Ml,rows:Rl,slotProps:Ol={},slots:Ll={},startAdornment:Dl,type:Bl="text",value:Nl}=fr,Vl=(0,yp.A)(fr,EA),Ul=null!=xo.value?xo.value:Nl,{current:$l}=dp.useRef(null!=Ul),Wl=dp.useRef(),Zl=dp.useCallback((u=>{0}),[]),Gl=(0,Xp.A)(Wl,ko,xo.ref,Zl),[Xl,Jl]=dp.useState(!1),Ql=useFormControl();const rc=formControlState({props:fr,muiFormControl:Ql,states:["color","disabled","error","hiddenLabel","size","required","filled"]});rc.focused=Ql?Ql.focused:Xl,dp.useEffect((()=>{!Ql&&oo&&Xl&&(Jl(!1),ca&&ca())}),[Ql,oo,Xl,ca]);const ic=Ql&&Ql.onFilled,oc=Ql&&Ql.onEmpty,lc=dp.useCallback((u=>{isFilled(u)?ic&&ic():oc&&oc()}),[ic,oc]);(0,wA.A)((()=>{$l&&lc({value:Ul})}),[Ul,lc,$l]);dp.useEffect((()=>{lc(Wl.current)}),[]);let gc=go,bc=xo;zo&&"input"===gc&&(bc=Rl?(0,_p.A)({type:void 0,minRows:Rl,maxRows:Rl},bc):(0,_p.A)({type:void 0,maxRows:Co,minRows:Io},bc),gc=xA);dp.useEffect((()=>{Ql&&Ql.setAdornedStart(Boolean(Dl))}),[Ql,Dl]);const eu=(0,_p.A)({},fr,{color:rc.color||"primary",disabled:rc.disabled,endAdornment:so,error:rc.error,focused:rc.focused,formControl:Ql,fullWidth:co,hiddenLabel:rc.hiddenLabel,multiline:zo,size:rc.size,startAdornment:Dl,type:Bl}),tu=(u=>{const{classes:Xe,color:Wt,disabled:fr,error:_r,endAdornment:wr,focused:Ar,formControl:Kr,fullWidth:In,hiddenLabel:no,multiline:io,readOnly:oo,size:ao,startAdornment:so,type:co}=u,ho={root:["root",`color${(0,Vp.A)(Wt)}`,fr&&"disabled",_r&&"error",In&&"fullWidth",Ar&&"focused",Kr&&"formControl",ao&&"medium"!==ao&&`size${(0,Vp.A)(ao)}`,io&&"multiline",so&&"adornedStart",wr&&"adornedEnd",no&&"hiddenLabel",oo&&"readOnly"],input:["input",fr&&"disabled","search"===co&&"inputTypeSearch",io&&"inputMultiline","small"===ao&&"inputSizeSmall",no&&"inputHiddenLabel",so&&"inputAdornedStart",wr&&"inputAdornedEnd",oo&&"readOnly"]};return(0,xp.A)(ho,getInputBaseUtilityClass,Xe)})(eu),nu=Ll.root||In.Root||CA,iu=Ol.root||no.root||{},su=Ll.input||In.Input||PA;return bc=(0,_p.A)({},bc,null!=(Wt=Ol.input)?Wt:no.input),(0,Fp.jsxs)(dp.Fragment,{children:[!ao&&IA,(0,Fp.jsxs)(nu,(0,_p.A)({},iu,!am(nu)&&{ownerState:(0,_p.A)({},eu,iu.ownerState)},{ref:Xe,onClick:u=>{Wl.current&&u.currentTarget===u.target&&Wl.current.focus(),Da&&Da(u)}},Vl,{className:(0,vp.A)(tu.root,iu.className,Kr,Al&&"MuiInputBase-readOnly"),children:[Dl,(0,Fp.jsx)(Kp.Provider,{value:null,children:(0,Fp.jsx)(su,(0,_p.A)({ownerState:eu,"aria-invalid":rc.error,"aria-describedby":_r,autoComplete:wr,autoFocus:Ar,defaultValue:io,disabled:rc.disabled,id:ho,onAnimationStart:u=>{lc("mui-auto-fill-cancel"===u.animationName?Wl.current:{value:"x"})},name:Bo,placeholder:kl,readOnly:Al,required:rc.required,rows:Rl,value:Ul,onKeyDown:yl,onKeyUp:vl,type:Bl},bc,!am(su)&&{as:gc,ownerState:(0,_p.A)({},eu,bc.ownerState)},{ref:Gl,className:(0,vp.A)(tu.input,bc.className,Al&&"MuiInputBase-readOnly"),onBlur:u=>{ca&&ca(u),xo.onBlur&&xo.onBlur(u),Ql&&Ql.onBlur?Ql.onBlur(u):Jl(!1)},onChange:(u,...Xe)=>{if(!$l){const Xe=u.target||Wl.current;if(null==Xe)throw new Error((0,mA.A)(1));lc({value:Xe.value})}xo.onChange&&xo.onChange(u,...Xe),ua&&ua(u,...Xe)},onFocus:u=>{rc.disabled?u.stopPropagation():(ns&&ns(u),xo.onFocus&&xo.onFocus(u),Ql&&Ql.onFocus?Ql.onFocus(u):Jl(!0))}}))}),so,Ml?Ml((0,_p.A)({},rc,{startAdornment:Dl})):null]}))]})}));var RA=MA;function getInputUtilityClass(u){return(0,bp.Ay)("MuiInput",u)}var zA=(0,_p.A)({},TA,(0,uf.A)("MuiInput",["root","underline","input"]));const OA=["disableUnderline","components","componentsProps","fullWidth","inputComponent","multiline","slotProps","slots","type"],LA=(0,Up.Ay)(CA,{shouldForwardProp:u=>(0,Hp.A)(u)||"classes"===u,name:"MuiInput",slot:"Root",overridesResolver:(u,Xe)=>{const{ownerState:Wt}=u;return[...rootOverridesResolver(u,Xe),!Wt.disableUnderline&&Xe.underline]}})((({theme:u,ownerState:Xe})=>{let Wt="light"===u.palette.mode?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return u.vars&&(Wt=`rgba(${u.vars.palette.common.onBackgroundChannel} / ${u.vars.opacity.inputUnderline})`),(0,_p.A)({position:"relative"},Xe.formControl&&{"label + &":{marginTop:16}},!Xe.disableUnderline&&{"&::after":{borderBottom:`2px solid ${(u.vars||u).palette[Xe.color].main}`,left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:u.transitions.create("transform",{duration:u.transitions.duration.shorter,easing:u.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${zA.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${zA.error}`]:{"&::before, &::after":{borderBottomColor:(u.vars||u).palette.error.main}},"&::before":{borderBottom:`1px solid ${Wt}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:u.transitions.create("border-bottom-color",{duration:u.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${zA.disabled}, .${zA.error}):before`]:{borderBottom:`2px solid ${(u.vars||u).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${Wt}`}},[`&.${zA.disabled}:before`]:{borderBottomStyle:"dotted"}})})),DA=(0,Up.Ay)(PA,{name:"MuiInput",slot:"Input",overridesResolver:inputOverridesResolver})({}),FA=dp.forwardRef((function Input(u,Xe){var Wt,fr,_r,wr;const Ar=(0,$p.b)({props:u,name:"MuiInput"}),{disableUnderline:Kr,components:In={},componentsProps:no,fullWidth:io=!1,inputComponent:oo="input",multiline:ao=!1,slotProps:so,slots:co={},type:ho="text"}=Ar,go=(0,yp.A)(Ar,OA),xo=(u=>{const{classes:Xe,disableUnderline:Wt}=u,fr={root:["root",!Wt&&"underline"],input:["input"]},_r=(0,xp.A)(fr,getInputUtilityClass,Xe);return(0,_p.A)({},Xe,_r)})(Ar),ko={root:{ownerState:{disableUnderline:Kr}}},Co=(null!=so?so:no)?(0,Pp.A)(null!=so?so:no,ko):ko,Io=null!=(Wt=null!=(fr=co.root)?fr:In.Root)?Wt:LA,zo=null!=(_r=null!=(wr=co.input)?wr:In.Input)?_r:DA;return(0,Fp.jsx)(RA,(0,_p.A)({slots:{root:Io,input:zo},slotProps:Co,fullWidth:io,inputComponent:oo,multiline:ao,ref:Xe,type:ho},go,{classes:xo}))}));FA.muiName="Input";var jA=FA;function getFilledInputUtilityClass(u){return(0,bp.Ay)("MuiFilledInput",u)}var BA=(0,_p.A)({},TA,(0,uf.A)("MuiFilledInput",["root","underline","input"]));const NA=["disableUnderline","components","componentsProps","fullWidth","hiddenLabel","inputComponent","multiline","slotProps","slots","type"],VA=(0,Up.Ay)(CA,{shouldForwardProp:u=>(0,Hp.A)(u)||"classes"===u,name:"MuiFilledInput",slot:"Root",overridesResolver:(u,Xe)=>{const{ownerState:Wt}=u;return[...rootOverridesResolver(u,Xe),!Wt.disableUnderline&&Xe.underline]}})((({theme:u,ownerState:Xe})=>{var Wt;const fr="light"===u.palette.mode,_r=fr?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",wr=fr?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",Ar=fr?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)",Kr=fr?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)";return(0,_p.A)({position:"relative",backgroundColor:u.vars?u.vars.palette.FilledInput.bg:wr,borderTopLeftRadius:(u.vars||u).shape.borderRadius,borderTopRightRadius:(u.vars||u).shape.borderRadius,transition:u.transitions.create("background-color",{duration:u.transitions.duration.shorter,easing:u.transitions.easing.easeOut}),"&:hover":{backgroundColor:u.vars?u.vars.palette.FilledInput.hoverBg:Ar,"@media (hover: none)":{backgroundColor:u.vars?u.vars.palette.FilledInput.bg:wr}},[`&.${BA.focused}`]:{backgroundColor:u.vars?u.vars.palette.FilledInput.bg:wr},[`&.${BA.disabled}`]:{backgroundColor:u.vars?u.vars.palette.FilledInput.disabledBg:Kr}},!Xe.disableUnderline&&{"&::after":{borderBottom:`2px solid ${null==(Wt=(u.vars||u).palette[Xe.color||"primary"])?void 0:Wt.main}`,left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:u.transitions.create("transform",{duration:u.transitions.duration.shorter,easing:u.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${BA.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${BA.error}`]:{"&::before, &::after":{borderBottomColor:(u.vars||u).palette.error.main}},"&::before":{borderBottom:`1px solid ${u.vars?`rgba(${u.vars.palette.common.onBackgroundChannel} / ${u.vars.opacity.inputUnderline})`:_r}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:u.transitions.create("border-bottom-color",{duration:u.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${BA.disabled}, .${BA.error}):before`]:{borderBottom:`1px solid ${(u.vars||u).palette.text.primary}`},[`&.${BA.disabled}:before`]:{borderBottomStyle:"dotted"}},Xe.startAdornment&&{paddingLeft:12},Xe.endAdornment&&{paddingRight:12},Xe.multiline&&(0,_p.A)({padding:"25px 12px 8px"},"small"===Xe.size&&{paddingTop:21,paddingBottom:4},Xe.hiddenLabel&&{paddingTop:16,paddingBottom:17},Xe.hiddenLabel&&"small"===Xe.size&&{paddingTop:8,paddingBottom:9}))})),UA=(0,Up.Ay)(PA,{name:"MuiFilledInput",slot:"Input",overridesResolver:inputOverridesResolver})((({theme:u,ownerState:Xe})=>(0,_p.A)({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12},!u.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:"light"===u.palette.mode?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:"light"===u.palette.mode?null:"#fff",caretColor:"light"===u.palette.mode?null:"#fff",borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"}},u.vars&&{"&:-webkit-autofill":{borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"},[u.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},"small"===Xe.size&&{paddingTop:21,paddingBottom:4},Xe.hiddenLabel&&{paddingTop:16,paddingBottom:17},Xe.startAdornment&&{paddingLeft:0},Xe.endAdornment&&{paddingRight:0},Xe.hiddenLabel&&"small"===Xe.size&&{paddingTop:8,paddingBottom:9},Xe.multiline&&{paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0}))),$A=dp.forwardRef((function FilledInput(u,Xe){var Wt,fr,_r,wr;const Ar=(0,$p.b)({props:u,name:"MuiFilledInput"}),{components:Kr={},componentsProps:In,fullWidth:no=!1,inputComponent:io="input",multiline:oo=!1,slotProps:ao,slots:so={},type:co="text"}=Ar,ho=(0,yp.A)(Ar,NA),go=(0,_p.A)({},Ar,{fullWidth:no,inputComponent:io,multiline:oo,type:co}),xo=(u=>{const{classes:Xe,disableUnderline:Wt}=u,fr={root:["root",!Wt&&"underline"],input:["input"]},_r=(0,xp.A)(fr,getFilledInputUtilityClass,Xe);return(0,_p.A)({},Xe,_r)})(Ar),ko={root:{ownerState:go},input:{ownerState:go}},Co=(null!=ao?ao:In)?(0,Pp.A)(ko,null!=ao?ao:In):ko,Io=null!=(Wt=null!=(fr=so.root)?fr:Kr.Root)?Wt:VA,zo=null!=(_r=null!=(wr=so.input)?wr:Kr.Input)?_r:UA;return(0,Fp.jsx)(RA,(0,_p.A)({slots:{root:Io,input:zo},componentsProps:Co,fullWidth:no,inputComponent:io,multiline:oo,ref:Xe,type:co},ho,{classes:xo}))}));$A.muiName="Input";var WA,qA=$A;const ZA=["children","classes","className","label","notched"],HA=(0,Up.Ay)("fieldset",{shouldForwardProp:Hp.A})({textAlign:"left",position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:"0 8px",pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,overflow:"hidden",minWidth:"0%"}),GA=(0,Up.Ay)("legend",{shouldForwardProp:Hp.A})((({ownerState:u,theme:Xe})=>(0,_p.A)({float:"unset",width:"auto",overflow:"hidden"},!u.withLabel&&{padding:0,lineHeight:"11px",transition:Xe.transitions.create("width",{duration:150,easing:Xe.transitions.easing.easeOut})},u.withLabel&&(0,_p.A)({display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:Xe.transitions.create("max-width",{duration:50,easing:Xe.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}},u.notched&&{maxWidth:"100%",transition:Xe.transitions.create("max-width",{duration:100,easing:Xe.transitions.easing.easeOut,delay:50})}))));function getOutlinedInputUtilityClass(u){return(0,bp.Ay)("MuiOutlinedInput",u)}var KA=(0,_p.A)({},TA,(0,uf.A)("MuiOutlinedInput",["root","notchedOutline","input"]));const XA=["components","fullWidth","inputComponent","label","multiline","notched","slots","type"],YA=(0,Up.Ay)(CA,{shouldForwardProp:u=>(0,Hp.A)(u)||"classes"===u,name:"MuiOutlinedInput",slot:"Root",overridesResolver:rootOverridesResolver})((({theme:u,ownerState:Xe})=>{const Wt="light"===u.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return(0,_p.A)({position:"relative",borderRadius:(u.vars||u).shape.borderRadius,[`&:hover .${KA.notchedOutline}`]:{borderColor:(u.vars||u).palette.text.primary},"@media (hover: none)":{[`&:hover .${KA.notchedOutline}`]:{borderColor:u.vars?`rgba(${u.vars.palette.common.onBackgroundChannel} / 0.23)`:Wt}},[`&.${KA.focused} .${KA.notchedOutline}`]:{borderColor:(u.vars||u).palette[Xe.color].main,borderWidth:2},[`&.${KA.error} .${KA.notchedOutline}`]:{borderColor:(u.vars||u).palette.error.main},[`&.${KA.disabled} .${KA.notchedOutline}`]:{borderColor:(u.vars||u).palette.action.disabled}},Xe.startAdornment&&{paddingLeft:14},Xe.endAdornment&&{paddingRight:14},Xe.multiline&&(0,_p.A)({padding:"16.5px 14px"},"small"===Xe.size&&{padding:"8.5px 14px"}))})),JA=(0,Up.Ay)((function NotchedOutline(u){const{className:Xe,label:Wt,notched:fr}=u,_r=(0,yp.A)(u,ZA),wr=null!=Wt&&""!==Wt,Ar=(0,_p.A)({},u,{notched:fr,withLabel:wr});return(0,Fp.jsx)(HA,(0,_p.A)({"aria-hidden":!0,className:Xe,ownerState:Ar},_r,{children:(0,Fp.jsx)(GA,{ownerState:Ar,children:wr?(0,Fp.jsx)("span",{children:Wt}):WA||(WA=(0,Fp.jsx)("span",{className:"notranslate",children:"​"}))})}))}),{name:"MuiOutlinedInput",slot:"NotchedOutline",overridesResolver:(u,Xe)=>Xe.notchedOutline})((({theme:u})=>{const Xe="light"===u.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{borderColor:u.vars?`rgba(${u.vars.palette.common.onBackgroundChannel} / 0.23)`:Xe}})),QA=(0,Up.Ay)(PA,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:inputOverridesResolver})((({theme:u,ownerState:Xe})=>(0,_p.A)({padding:"16.5px 14px"},!u.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:"light"===u.palette.mode?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:"light"===u.palette.mode?null:"#fff",caretColor:"light"===u.palette.mode?null:"#fff",borderRadius:"inherit"}},u.vars&&{"&:-webkit-autofill":{borderRadius:"inherit"},[u.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},"small"===Xe.size&&{padding:"8.5px 14px"},Xe.multiline&&{padding:0},Xe.startAdornment&&{paddingLeft:0},Xe.endAdornment&&{paddingRight:0}))),eT=dp.forwardRef((function OutlinedInput(u,Xe){var Wt,fr,_r,wr,Ar;const Kr=(0,$p.b)({props:u,name:"MuiOutlinedInput"}),{components:In={},fullWidth:no=!1,inputComponent:io="input",label:oo,multiline:ao=!1,notched:so,slots:co={},type:ho="text"}=Kr,go=(0,yp.A)(Kr,XA),xo=(u=>{const{classes:Xe}=u,Wt=(0,xp.A)({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},getOutlinedInputUtilityClass,Xe);return(0,_p.A)({},Xe,Wt)})(Kr),ko=useFormControl(),Co=formControlState({props:Kr,muiFormControl:ko,states:["color","disabled","error","focused","hiddenLabel","size","required"]}),Io=(0,_p.A)({},Kr,{color:Co.color||"primary",disabled:Co.disabled,error:Co.error,focused:Co.focused,formControl:ko,fullWidth:no,hiddenLabel:Co.hiddenLabel,multiline:ao,size:Co.size,type:ho}),zo=null!=(Wt=null!=(fr=co.root)?fr:In.Root)?Wt:YA,Bo=null!=(_r=null!=(wr=co.input)?wr:In.Input)?_r:QA;return(0,Fp.jsx)(RA,(0,_p.A)({slots:{root:zo,input:Bo},renderSuffix:u=>(0,Fp.jsx)(JA,{ownerState:Io,className:xo.notchedOutline,label:null!=oo&&""!==oo&&Co.required?Ar||(Ar=(0,Fp.jsxs)(dp.Fragment,{children:[oo," ","*"]})):oo,notched:void 0!==so?so:Boolean(u.startAdornment||u.filled||u.focused)}),fullWidth:no,inputComponent:io,multiline:ao,ref:Xe,type:ho},go,{classes:(0,_p.A)({},xo,{notchedOutline:null})}))}));eT.muiName="Input";var tT=eT;function getInputLabelUtilityClasses(u){return(0,bp.Ay)("MuiInputLabel",u)}(0,uf.A)("MuiInputLabel",["root","focused","disabled","error","required","asterisk","formControl","sizeSmall","shrink","animated","standard","filled","outlined"]);const rT=["disableAnimation","margin","shrink","variant","className"],nT=(0,Up.Ay)(uS,{shouldForwardProp:u=>(0,Hp.A)(u)||"classes"===u,name:"MuiInputLabel",slot:"Root",overridesResolver:(u,Xe)=>{const{ownerState:Wt}=u;return[{[`& .${oS.asterisk}`]:Xe.asterisk},Xe.root,Wt.formControl&&Xe.formControl,"small"===Wt.size&&Xe.sizeSmall,Wt.shrink&&Xe.shrink,!Wt.disableAnimation&&Xe.animated,Wt.focused&&Xe.focused,Xe[Wt.variant]]}})((({theme:u,ownerState:Xe})=>(0,_p.A)({display:"block",transformOrigin:"top left",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"100%"},Xe.formControl&&{position:"absolute",left:0,top:0,transform:"translate(0, 20px) scale(1)"},"small"===Xe.size&&{transform:"translate(0, 17px) scale(1)"},Xe.shrink&&{transform:"translate(0, -1.5px) scale(0.75)",transformOrigin:"top left",maxWidth:"133%"},!Xe.disableAnimation&&{transition:u.transitions.create(["color","transform","max-width"],{duration:u.transitions.duration.shorter,easing:u.transitions.easing.easeOut})},"filled"===Xe.variant&&(0,_p.A)({zIndex:1,pointerEvents:"none",transform:"translate(12px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"},"small"===Xe.size&&{transform:"translate(12px, 13px) scale(1)"},Xe.shrink&&(0,_p.A)({userSelect:"none",pointerEvents:"auto",transform:"translate(12px, 7px) scale(0.75)",maxWidth:"calc(133% - 24px)"},"small"===Xe.size&&{transform:"translate(12px, 4px) scale(0.75)"})),"outlined"===Xe.variant&&(0,_p.A)({zIndex:1,pointerEvents:"none",transform:"translate(14px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"},"small"===Xe.size&&{transform:"translate(14px, 9px) scale(1)"},Xe.shrink&&{userSelect:"none",pointerEvents:"auto",maxWidth:"calc(133% - 32px)",transform:"translate(14px, -9px) scale(0.75)"}))));var iT=dp.forwardRef((function InputLabel(u,Xe){const Wt=(0,$p.b)({name:"MuiInputLabel",props:u}),{disableAnimation:fr=!1,shrink:_r,className:wr}=Wt,Ar=(0,yp.A)(Wt,rT),Kr=useFormControl();let In=_r;void 0===In&&Kr&&(In=Kr.filled||Kr.focused||Kr.adornedStart);const no=formControlState({props:Wt,muiFormControl:Kr,states:["size","variant","required","focused"]}),io=(0,_p.A)({},Wt,{disableAnimation:fr,formControl:Kr,shrink:In,size:no.size,variant:no.variant,required:no.required,focused:no.focused}),oo=(u=>{const{classes:Xe,formControl:Wt,size:fr,shrink:_r,disableAnimation:wr,variant:Ar,required:Kr}=u,In={root:["root",Wt&&"formControl",!wr&&"animated",_r&&"shrink",fr&&"normal"!==fr&&`size${(0,Vp.A)(fr)}`,Ar],asterisk:[Kr&&"asterisk"]},no=(0,xp.A)(In,getInputLabelUtilityClasses,Xe);return(0,_p.A)({},Xe,no)})(io);return(0,Fp.jsx)(nT,(0,_p.A)({"data-shrink":In,ownerState:io,ref:Xe,className:(0,vp.A)(oo.root,wr)},Ar,{classes:oo}))}));function getFormHelperTextUtilityClasses(u){return(0,bp.Ay)("MuiFormHelperText",u)}var oT,aT=(0,uf.A)("MuiFormHelperText",["root","error","disabled","sizeSmall","sizeMedium","contained","focused","filled","required"]);const sT=["children","className","component","disabled","error","filled","focused","margin","required","variant"],lT=(0,Up.Ay)("p",{name:"MuiFormHelperText",slot:"Root",overridesResolver:(u,Xe)=>{const{ownerState:Wt}=u;return[Xe.root,Wt.size&&Xe[`size${(0,Vp.A)(Wt.size)}`],Wt.contained&&Xe.contained,Wt.filled&&Xe.filled]}})((({theme:u,ownerState:Xe})=>(0,_p.A)({color:(u.vars||u).palette.text.secondary},u.typography.caption,{textAlign:"left",marginTop:3,marginRight:0,marginBottom:0,marginLeft:0,[`&.${aT.disabled}`]:{color:(u.vars||u).palette.text.disabled},[`&.${aT.error}`]:{color:(u.vars||u).palette.error.main}},"small"===Xe.size&&{marginTop:4},Xe.contained&&{marginLeft:14,marginRight:14}))),cT=dp.forwardRef((function FormHelperText(u,Xe){const Wt=(0,$p.b)({props:u,name:"MuiFormHelperText"}),{children:fr,className:_r,component:wr="p"}=Wt,Ar=(0,yp.A)(Wt,sT),Kr=formControlState({props:Wt,muiFormControl:useFormControl(),states:["variant","size","disabled","error","filled","focused","required"]}),In=(0,_p.A)({},Wt,{component:wr,contained:"filled"===Kr.variant||"outlined"===Kr.variant,variant:Kr.variant,size:Kr.size,disabled:Kr.disabled,error:Kr.error,filled:Kr.filled,focused:Kr.focused,required:Kr.required}),no=(u=>{const{classes:Xe,contained:Wt,size:fr,disabled:_r,error:wr,filled:Ar,focused:Kr,required:In}=u,no={root:["root",_r&&"disabled",wr&&"error",fr&&`size${(0,Vp.A)(fr)}`,Wt&&"contained",Kr&&"focused",Ar&&"filled",In&&"required"]};return(0,xp.A)(no,getFormHelperTextUtilityClasses,Xe)})(In);return(0,Fp.jsx)(lT,(0,_p.A)({as:wr,ownerState:In,className:(0,vp.A)(no.root,_r),ref:Xe},Ar,{children:" "===fr?oT||(oT=(0,Fp.jsx)("span",{className:"notranslate",children:"​"})):fr}))}));var uT=cT,dT=(__webpack_require__(4363),__webpack_require__(6248));var hT=dp.createContext({});function getListUtilityClass(u){return(0,bp.Ay)("MuiList",u)}(0,uf.A)("MuiList",["root","padding","dense","subheader"]);const pT=["children","className","component","dense","disablePadding","subheader"],fT=(0,Up.Ay)("ul",{name:"MuiList",slot:"Root",overridesResolver:(u,Xe)=>{const{ownerState:Wt}=u;return[Xe.root,!Wt.disablePadding&&Xe.padding,Wt.dense&&Xe.dense,Wt.subheader&&Xe.subheader]}})((({ownerState:u})=>(0,_p.A)({listStyle:"none",margin:0,padding:0,position:"relative"},!u.disablePadding&&{paddingTop:8,paddingBottom:8},u.subheader&&{paddingTop:0})));var mT=dp.forwardRef((function List(u,Xe){const Wt=(0,$p.b)({props:u,name:"MuiList"}),{children:fr,className:_r,component:wr="ul",dense:Ar=!1,disablePadding:Kr=!1,subheader:In}=Wt,no=(0,yp.A)(Wt,pT),io=dp.useMemo((()=>({dense:Ar})),[Ar]),oo=(0,_p.A)({},Wt,{component:wr,dense:Ar,disablePadding:Kr}),ao=(u=>{const{classes:Xe,disablePadding:Wt,dense:fr,subheader:_r}=u,wr={root:["root",!Wt&&"padding",fr&&"dense",_r&&"subheader"]};return(0,xp.A)(wr,getListUtilityClass,Xe)})(oo);return(0,Fp.jsx)(hT.Provider,{value:io,children:(0,Fp.jsxs)(fT,(0,_p.A)({as:wr,className:(0,vp.A)(ao.root,_r),ref:Xe,ownerState:oo},no,{children:[In,fr]}))})}));function getScrollbarSize(u){const Xe=u.documentElement.clientWidth;return Math.abs(window.innerWidth-Xe)}var gT=getScrollbarSize;const yT=["actions","autoFocus","autoFocusItem","children","className","disabledItemsFocusable","disableListWrap","onKeyDown","variant"];function nextItem(u,Xe,Wt){return u===Xe?u.firstChild:Xe&&Xe.nextElementSibling?Xe.nextElementSibling:Wt?null:u.firstChild}function previousItem(u,Xe,Wt){return u===Xe?Wt?u.firstChild:u.lastChild:Xe&&Xe.previousElementSibling?Xe.previousElementSibling:Wt?null:u.lastChild}function textCriteriaMatches(u,Xe){if(void 0===Xe)return!0;let Wt=u.innerText;return void 0===Wt&&(Wt=u.textContent),Wt=Wt.trim().toLowerCase(),0!==Wt.length&&(Xe.repeating?Wt[0]===Xe.keys[0]:0===Wt.indexOf(Xe.keys.join("")))}function moveFocus(u,Xe,Wt,fr,_r,wr){let Ar=!1,Kr=_r(u,Xe,!!Xe&&Wt);for(;Kr;){if(Kr===u.firstChild){if(Ar)return!1;Ar=!0}const Xe=!fr&&(Kr.disabled||"true"===Kr.getAttribute("aria-disabled"));if(Kr.hasAttribute("tabindex")&&textCriteriaMatches(Kr,wr)&&!Xe)return Kr.focus(),!0;Kr=_r(u,Kr,Wt)}return!1}var _T=dp.forwardRef((function MenuList(u,Xe){const{actions:Wt,autoFocus:fr=!1,autoFocusItem:_r=!1,children:wr,className:Ar,disabledItemsFocusable:Kr=!1,disableListWrap:In=!1,onKeyDown:no,variant:io="selectedMenu"}=u,oo=(0,yp.A)(u,yT),ao=dp.useRef(null),so=dp.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});(0,wA.A)((()=>{fr&&ao.current.focus()}),[fr]),dp.useImperativeHandle(Wt,(()=>({adjustStyleForScrollbar:(u,{direction:Xe})=>{const Wt=!ao.current.style.width;if(u.clientHeight<ao.current.clientHeight&&Wt){const Wt=`${gT((0,dT.A)(u))}px`;ao.current.style["rtl"===Xe?"paddingLeft":"paddingRight"]=Wt,ao.current.style.width=`calc(100% + ${Wt})`}return ao.current}})),[]);const co=(0,Xp.A)(ao,Xe);let ho=-1;dp.Children.forEach(wr,((u,Xe)=>{dp.isValidElement(u)?(u.props.disabled||("selectedMenu"===io&&u.props.selected||-1===ho)&&(ho=Xe),ho===Xe&&(u.props.disabled||u.props.muiSkipListHighlight||u.type.muiSkipListHighlight)&&(ho+=1,ho>=wr.length&&(ho=-1))):ho===Xe&&(ho+=1,ho>=wr.length&&(ho=-1))}));const go=dp.Children.map(wr,((u,Xe)=>{if(Xe===ho){const Xe={};return _r&&(Xe.autoFocus=!0),void 0===u.props.tabIndex&&"selectedMenu"===io&&(Xe.tabIndex=0),dp.cloneElement(u,Xe)}return u}));return(0,Fp.jsx)(mT,(0,_p.A)({role:"menu",ref:co,className:Ar,onKeyDown:u=>{const Xe=ao.current,Wt=u.key,fr=(0,dT.A)(Xe).activeElement;if("ArrowDown"===Wt)u.preventDefault(),moveFocus(Xe,fr,In,Kr,nextItem);else if("ArrowUp"===Wt)u.preventDefault(),moveFocus(Xe,fr,In,Kr,previousItem);else if("Home"===Wt)u.preventDefault(),moveFocus(Xe,null,In,Kr,nextItem);else if("End"===Wt)u.preventDefault(),moveFocus(Xe,null,In,Kr,previousItem);else if(1===Wt.length){const _r=so.current,wr=Wt.toLowerCase(),Ar=performance.now();_r.keys.length>0&&(Ar-_r.lastTime>500?(_r.keys=[],_r.repeating=!0,_r.previousKeyMatched=!0):_r.repeating&&wr!==_r.keys[0]&&(_r.repeating=!1)),_r.lastTime=Ar,_r.keys.push(wr);const In=fr&&!_r.repeating&&textCriteriaMatches(fr,_r);_r.previousKeyMatched&&(In||moveFocus(Xe,fr,!1,Kr,nextItem,_r))?u.preventDefault():_r.previousKeyMatched=!1}no&&no(u)},tabIndex:fr?0:-1},oo,{children:go}))})),vT=__webpack_require__(1935),bT=__webpack_require__(3749);const xT=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function defaultGetTabbable(u){const Xe=[],Wt=[];return Array.from(u.querySelectorAll(xT)).forEach(((u,fr)=>{const _r=function getTabIndex(u){const Xe=parseInt(u.getAttribute("tabindex")||"",10);return Number.isNaN(Xe)?"true"===u.contentEditable||("AUDIO"===u.nodeName||"VIDEO"===u.nodeName||"DETAILS"===u.nodeName)&&null===u.getAttribute("tabindex")?0:u.tabIndex:Xe}(u);-1!==_r&&function isNodeMatchingSelectorFocusable(u){return!(u.disabled||"INPUT"===u.tagName&&"hidden"===u.type||function isNonTabbableRadio(u){if("INPUT"!==u.tagName||"radio"!==u.type)return!1;if(!u.name)return!1;const getRadio=Xe=>u.ownerDocument.querySelector(`input[type="radio"]${Xe}`);let Xe=getRadio(`[name="${u.name}"]:checked`);return Xe||(Xe=getRadio(`[name="${u.name}"]`)),Xe!==u}(u))}(u)&&(0===_r?Xe.push(u):Wt.push({documentOrder:fr,tabIndex:_r,node:u}))})),Wt.sort(((u,Xe)=>u.tabIndex===Xe.tabIndex?u.documentOrder-Xe.documentOrder:u.tabIndex-Xe.tabIndex)).map((u=>u.node)).concat(Xe)}function defaultIsEnabled(){return!0}var wT=function FocusTrap(u){const{children:Xe,disableAutoFocus:Wt=!1,disableEnforceFocus:fr=!1,disableRestoreFocus:_r=!1,getTabbable:wr=defaultGetTabbable,isEnabled:Ar=defaultIsEnabled,open:Kr}=u,In=dp.useRef(!1),no=dp.useRef(null),io=dp.useRef(null),oo=dp.useRef(null),ao=dp.useRef(null),so=dp.useRef(!1),co=dp.useRef(null),ho=(0,Am.A)(Xe.ref,co),go=dp.useRef(null);dp.useEffect((()=>{Kr&&co.current&&(so.current=!Wt)}),[Wt,Kr]),dp.useEffect((()=>{if(!Kr||!co.current)return;const u=(0,Em.A)(co.current);return co.current.contains(u.activeElement)||(co.current.hasAttribute("tabIndex")||co.current.setAttribute("tabIndex","-1"),so.current&&co.current.focus()),()=>{_r||(oo.current&&oo.current.focus&&(In.current=!0,oo.current.focus()),oo.current=null)}}),[Kr]),dp.useEffect((()=>{if(!Kr||!co.current)return;const u=(0,Em.A)(co.current),loopFocus=Xe=>{go.current=Xe,!fr&&Ar()&&"Tab"===Xe.key&&u.activeElement===co.current&&Xe.shiftKey&&(In.current=!0,io.current&&io.current.focus())},contain=()=>{const Xe=co.current;if(null===Xe)return;if(!u.hasFocus()||!Ar()||In.current)return void(In.current=!1);if(Xe.contains(u.activeElement))return;if(fr&&u.activeElement!==no.current&&u.activeElement!==io.current)return;if(u.activeElement!==ao.current)ao.current=null;else if(null!==ao.current)return;if(!so.current)return;let Wt=[];if(u.activeElement!==no.current&&u.activeElement!==io.current||(Wt=wr(co.current)),Wt.length>0){var _r,Kr;const u=Boolean((null==(_r=go.current)?void 0:_r.shiftKey)&&"Tab"===(null==(Kr=go.current)?void 0:Kr.key)),Xe=Wt[0],fr=Wt[Wt.length-1];"string"!=typeof Xe&&"string"!=typeof fr&&(u?fr.focus():Xe.focus())}else Xe.focus()};u.addEventListener("focusin",contain),u.addEventListener("keydown",loopFocus,!0);const Xe=setInterval((()=>{u.activeElement&&"BODY"===u.activeElement.tagName&&contain()}),50);return()=>{clearInterval(Xe),u.removeEventListener("focusin",contain),u.removeEventListener("keydown",loopFocus,!0)}}),[Wt,fr,_r,Ar,Kr,wr]);const handleFocusSentinel=u=>{null===oo.current&&(oo.current=u.relatedTarget),so.current=!0};return(0,Fp.jsxs)(dp.Fragment,{children:[(0,Fp.jsx)("div",{tabIndex:Kr?0:-1,onFocus:handleFocusSentinel,ref:no,"data-testid":"sentinelStart"}),dp.cloneElement(Xe,{ref:ho,onFocus:u=>{null===oo.current&&(oo.current=u.relatedTarget),so.current=!0,ao.current=u.target;const Wt=Xe.props.onFocus;Wt&&Wt(u)}}),(0,Fp.jsx)("div",{tabIndex:Kr?0:-1,onFocus:handleFocusSentinel,ref:io,"data-testid":"sentinelEnd"})]})};const ST=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"],kT={entering:{opacity:1},entered:{opacity:1}},AT=dp.forwardRef((function Fade(u,Xe){const Wt=styles_useTheme_useTheme(),fr={enter:Wt.transitions.duration.enteringScreen,exit:Wt.transitions.duration.leavingScreen},{addEndListener:_r,appear:wr=!0,children:Ar,easing:Kr,in:In,onEnter:no,onEntered:io,onEntering:oo,onExit:ao,onExited:so,onExiting:co,style:ho,timeout:go=fr,TransitionComponent:xo=_m}=u,ko=(0,yp.A)(u,ST),Co=dp.useRef(null),Io=(0,Xp.A)(Co,Ar.ref,Xe),normalizedTransitionCallback=u=>Xe=>{if(u){const Wt=Co.current;void 0===Xe?u(Wt):u(Wt,Xe)}},zo=normalizedTransitionCallback(oo),Bo=normalizedTransitionCallback(((u,Xe)=>{reflow(u);const fr=getTransitionProps({style:ho,timeout:go,easing:Kr},{mode:"enter"});u.style.webkitTransition=Wt.transitions.create("opacity",fr),u.style.transition=Wt.transitions.create("opacity",fr),no&&no(u,Xe)})),ca=normalizedTransitionCallback(io),ua=normalizedTransitionCallback(co),Da=normalizedTransitionCallback((u=>{const Xe=getTransitionProps({style:ho,timeout:go,easing:Kr},{mode:"exit"});u.style.webkitTransition=Wt.transitions.create("opacity",Xe),u.style.transition=Wt.transitions.create("opacity",Xe),ao&&ao(u)})),ns=normalizedTransitionCallback(so);return(0,Fp.jsx)(xo,(0,_p.A)({appear:wr,in:In,nodeRef:Co,onEnter:Bo,onEntered:ca,onEntering:zo,onExit:Da,onExited:ns,onExiting:ua,addEndListener:u=>{_r&&_r(Co.current,u)},timeout:go},ko,{children:(u,Xe)=>dp.cloneElement(Ar,(0,_p.A)({style:(0,_p.A)({opacity:0,visibility:"exited"!==u||In?void 0:"hidden"},kT[u],ho,Ar.props.style),ref:Io},Xe))}))}));var TT=AT;function getBackdropUtilityClass(u){return(0,bp.Ay)("MuiBackdrop",u)}(0,uf.A)("MuiBackdrop",["root","invisible"]);const ET=["children","className","component","components","componentsProps","invisible","open","slotProps","slots","TransitionComponent","transitionDuration"],CT=(0,Up.Ay)("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(u,Xe)=>{const{ownerState:Wt}=u;return[Xe.root,Wt.invisible&&Xe.invisible]}})((({ownerState:u})=>(0,_p.A)({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent"},u.invisible&&{backgroundColor:"transparent"})));var PT=dp.forwardRef((function Backdrop(u,Xe){var Wt,fr,_r;const wr=(0,$p.b)({props:u,name:"MuiBackdrop"}),{children:Ar,className:Kr,component:In="div",components:no={},componentsProps:io={},invisible:oo=!1,open:ao,slotProps:so={},slots:co={},TransitionComponent:ho=TT,transitionDuration:go}=wr,xo=(0,yp.A)(wr,ET),ko=(0,_p.A)({},wr,{component:In,invisible:oo}),Co=(u=>{const{classes:Xe,invisible:Wt}=u,fr={root:["root",Wt&&"invisible"]};return(0,xp.A)(fr,getBackdropUtilityClass,Xe)})(ko),Io=null!=(Wt=so.root)?Wt:io.root;return(0,Fp.jsx)(ho,(0,_p.A)({in:ao,timeout:go},xo,{children:(0,Fp.jsx)(CT,(0,_p.A)({"aria-hidden":!0},Io,{as:null!=(fr=null!=(_r=co.root)?_r:no.Root)?fr:In,className:(0,vp.A)(Co.root,Kr,null==Io?void 0:Io.className),ownerState:(0,_p.A)({},ko,null==Io?void 0:Io.ownerState),classes:Co,ref:Xe,children:Ar}))}))})),IT=__webpack_require__(1547),MT=__webpack_require__(6673);function ariaHidden(u,Xe){Xe?u.setAttribute("aria-hidden","true"):u.removeAttribute("aria-hidden")}function getPaddingRight(u){return parseInt((0,gA.A)(u).getComputedStyle(u).paddingRight,10)||0}function ariaHiddenSiblings(u,Xe,Wt,fr,_r){const wr=[Xe,Wt,...fr];[].forEach.call(u.children,(u=>{const Xe=-1===wr.indexOf(u),Wt=!function isAriaHiddenForbiddenOnElement(u){const Xe=-1!==["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].indexOf(u.tagName),Wt="INPUT"===u.tagName&&"hidden"===u.getAttribute("type");return Xe||Wt}(u);Xe&&Wt&&ariaHidden(u,_r)}))}function findIndexOf(u,Xe){let Wt=-1;return u.some(((u,fr)=>!!Xe(u)&&(Wt=fr,!0))),Wt}function handleContainer(u,Xe){const Wt=[],fr=u.container;if(!Xe.disableScrollLock){if(function isOverflowing(u){const Xe=(0,Em.A)(u);return Xe.body===u?(0,gA.A)(u).innerWidth>Xe.documentElement.clientWidth:u.scrollHeight>u.clientHeight}(fr)){const u=getScrollbarSize((0,Em.A)(fr));Wt.push({value:fr.style.paddingRight,property:"padding-right",el:fr}),fr.style.paddingRight=`${getPaddingRight(fr)+u}px`;const Xe=(0,Em.A)(fr).querySelectorAll(".mui-fixed");[].forEach.call(Xe,(Xe=>{Wt.push({value:Xe.style.paddingRight,property:"padding-right",el:Xe}),Xe.style.paddingRight=`${getPaddingRight(Xe)+u}px`}))}let u;if(fr.parentNode instanceof DocumentFragment)u=(0,Em.A)(fr).body;else{const Xe=fr.parentElement,Wt=(0,gA.A)(fr);u="HTML"===(null==Xe?void 0:Xe.nodeName)&&"scroll"===Wt.getComputedStyle(Xe).overflowY?Xe:fr}Wt.push({value:u.style.overflow,property:"overflow",el:u},{value:u.style.overflowX,property:"overflow-x",el:u},{value:u.style.overflowY,property:"overflow-y",el:u}),u.style.overflow="hidden"}return()=>{Wt.forEach((({value:u,el:Xe,property:Wt})=>{u?Xe.style.setProperty(Wt,u):Xe.style.removeProperty(Wt)}))}}const RT=new class ModalManager{constructor(){this.containers=void 0,this.modals=void 0,this.modals=[],this.containers=[]}add(u,Xe){let Wt=this.modals.indexOf(u);if(-1!==Wt)return Wt;Wt=this.modals.length,this.modals.push(u),u.modalRef&&ariaHidden(u.modalRef,!1);const fr=function getHiddenSiblings(u){const Xe=[];return[].forEach.call(u.children,(u=>{"true"===u.getAttribute("aria-hidden")&&Xe.push(u)})),Xe}(Xe);ariaHiddenSiblings(Xe,u.mount,u.modalRef,fr,!0);const _r=findIndexOf(this.containers,(u=>u.container===Xe));return-1!==_r?(this.containers[_r].modals.push(u),Wt):(this.containers.push({modals:[u],container:Xe,restore:null,hiddenSiblings:fr}),Wt)}mount(u,Xe){const Wt=findIndexOf(this.containers,(Xe=>-1!==Xe.modals.indexOf(u))),fr=this.containers[Wt];fr.restore||(fr.restore=handleContainer(fr,Xe))}remove(u,Xe=!0){const Wt=this.modals.indexOf(u);if(-1===Wt)return Wt;const fr=findIndexOf(this.containers,(Xe=>-1!==Xe.modals.indexOf(u))),_r=this.containers[fr];if(_r.modals.splice(_r.modals.indexOf(u),1),this.modals.splice(Wt,1),0===_r.modals.length)_r.restore&&_r.restore(),u.modalRef&&ariaHidden(u.modalRef,Xe),ariaHiddenSiblings(_r.container,u.mount,u.modalRef,_r.hiddenSiblings,!1),this.containers.splice(fr,1);else{const u=_r.modals[_r.modals.length-1];u.modalRef&&ariaHidden(u.modalRef,!1)}return Wt}isTopModal(u){return this.modals.length>0&&this.modals[this.modals.length-1]===u}};var zT=function useModal(u){const{container:Xe,disableEscapeKeyDown:Wt=!1,disableScrollLock:fr=!1,manager:_r=RT,closeAfterTransition:wr=!1,onTransitionEnter:Ar,onTransitionExited:Kr,children:In,onClose:no,open:io,rootRef:oo}=u,ao=dp.useRef({}),so=dp.useRef(null),co=dp.useRef(null),ho=(0,Am.A)(co,oo),[go,xo]=dp.useState(!io),ko=function getHasTransition(u){return!!u&&u.props.hasOwnProperty("in")}(In);let Co=!0;"false"!==u["aria-hidden"]&&!1!==u["aria-hidden"]||(Co=!1);const getModal=()=>(ao.current.modalRef=co.current,ao.current.mount=so.current,ao.current),handleMounted=()=>{_r.mount(getModal(),{disableScrollLock:fr}),co.current&&(co.current.scrollTop=0)},Io=(0,IT.A)((()=>{const u=function useModal_getContainer(u){return"function"==typeof u?u():u}(Xe)||(0,Em.A)(so.current).body;_r.add(getModal(),u),co.current&&handleMounted()})),zo=dp.useCallback((()=>_r.isTopModal(getModal())),[_r]),Bo=(0,IT.A)((u=>{so.current=u,u&&(io&&zo()?handleMounted():co.current&&ariaHidden(co.current,Co))})),ca=dp.useCallback((()=>{_r.remove(getModal(),Co)}),[Co,_r]);dp.useEffect((()=>()=>{ca()}),[ca]),dp.useEffect((()=>{io?Io():ko&&wr||ca()}),[io,ca,ko,wr,Io]);const createHandleKeyDown=u=>Xe=>{var fr;null==(fr=u.onKeyDown)||fr.call(u,Xe),"Escape"===Xe.key&&229!==Xe.which&&zo()&&(Wt||(Xe.stopPropagation(),no&&no(Xe,"escapeKeyDown")))},createHandleBackdropClick=u=>Xe=>{var Wt;null==(Wt=u.onClick)||Wt.call(u,Xe),Xe.target===Xe.currentTarget&&no&&no(Xe,"backdropClick")};return{getRootProps:(Xe={})=>{const Wt=rg(u);delete Wt.onTransitionEnter,delete Wt.onTransitionExited;const fr=(0,_p.A)({},Wt,Xe);return(0,_p.A)({role:"presentation"},fr,{onKeyDown:createHandleKeyDown(fr),ref:ho})},getBackdropProps:(u={})=>{const Xe=u;return(0,_p.A)({"aria-hidden":!0},Xe,{onClick:createHandleBackdropClick(Xe),open:io})},getTransitionProps:()=>({onEnter:(0,MT.A)((()=>{xo(!1),Ar&&Ar()}),null==In?void 0:In.props.onEnter),onExited:(0,MT.A)((()=>{xo(!0),Kr&&Kr(),wr&&ca()}),null==In?void 0:In.props.onExited)}),rootRef:ho,portalRef:Bo,isTopModal:zo,exited:go,hasTransition:ko}};function getModalUtilityClass(u){return(0,bp.Ay)("MuiModal",u)}(0,uf.A)("MuiModal",["root","hidden","backdrop"]);const OT=["BackdropComponent","BackdropProps","classes","className","closeAfterTransition","children","container","component","components","componentsProps","disableAutoFocus","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","onBackdropClick","onClose","onTransitionEnter","onTransitionExited","open","slotProps","slots","theme"],LT=(0,Up.Ay)("div",{name:"MuiModal",slot:"Root",overridesResolver:(u,Xe)=>{const{ownerState:Wt}=u;return[Xe.root,!Wt.open&&Wt.exited&&Xe.hidden]}})((({theme:u,ownerState:Xe})=>(0,_p.A)({position:"fixed",zIndex:(u.vars||u).zIndex.modal,right:0,bottom:0,top:0,left:0},!Xe.open&&Xe.exited&&{visibility:"hidden"}))),DT=(0,Up.Ay)(PT,{name:"MuiModal",slot:"Backdrop",overridesResolver:(u,Xe)=>Xe.backdrop})({zIndex:-1}),FT=dp.forwardRef((function Modal(u,Xe){var Wt,fr,_r,wr,Ar,Kr;const In=(0,$p.b)({name:"MuiModal",props:u}),{BackdropComponent:no=DT,BackdropProps:io,className:oo,closeAfterTransition:ao=!1,children:so,container:co,component:ho,components:go={},componentsProps:xo={},disableAutoFocus:ko=!1,disableEnforceFocus:Co=!1,disableEscapeKeyDown:Io=!1,disablePortal:zo=!1,disableRestoreFocus:Bo=!1,disableScrollLock:ca=!1,hideBackdrop:ua=!1,keepMounted:Da=!1,onBackdropClick:ns,open:yl,slotProps:vl,slots:kl}=In,Al=(0,yp.A)(In,OT),Ml=(0,_p.A)({},In,{closeAfterTransition:ao,disableAutoFocus:ko,disableEnforceFocus:Co,disableEscapeKeyDown:Io,disablePortal:zo,disableRestoreFocus:Bo,disableScrollLock:ca,hideBackdrop:ua,keepMounted:Da}),{getRootProps:Rl,getBackdropProps:Ol,getTransitionProps:Ll,portalRef:Dl,isTopModal:Bl,exited:Nl,hasTransition:Vl}=zT((0,_p.A)({},Ml,{rootRef:Xe})),Ul=(0,_p.A)({},Ml,{exited:Nl}),$l=(u=>{const{open:Xe,exited:Wt,classes:fr}=u,_r={root:["root",!Xe&&Wt&&"hidden"],backdrop:["backdrop"]};return(0,xp.A)(_r,getModalUtilityClass,fr)})(Ul),Wl={};if(void 0===so.props.tabIndex&&(Wl.tabIndex="-1"),Vl){const{onEnter:u,onExited:Xe}=Ll();Wl.onEnter=u,Wl.onExited=Xe}const Zl=null!=(Wt=null!=(fr=null==kl?void 0:kl.root)?fr:go.Root)?Wt:LT,Gl=null!=(_r=null!=(wr=null==kl?void 0:kl.backdrop)?wr:go.Backdrop)?_r:no,Xl=null!=(Ar=null==vl?void 0:vl.root)?Ar:xo.root,Jl=null!=(Kr=null==vl?void 0:vl.backdrop)?Kr:xo.backdrop,Ql=pg({elementType:Zl,externalSlotProps:Xl,externalForwardedProps:Al,getSlotProps:Rl,additionalProps:{ref:Xe,as:ho},ownerState:Ul,className:(0,vp.A)(oo,null==Xl?void 0:Xl.className,null==$l?void 0:$l.root,!Ul.open&&Ul.exited&&(null==$l?void 0:$l.hidden))}),rc=pg({elementType:Gl,externalSlotProps:Jl,additionalProps:io,getSlotProps:u=>Ol((0,_p.A)({},u,{onClick:Xe=>{ns&&ns(Xe),null!=u&&u.onClick&&u.onClick(Xe)}})),className:(0,vp.A)(null==Jl?void 0:Jl.className,null==io?void 0:io.className,null==$l?void 0:$l.backdrop),ownerState:Ul});return Da||yl||Vl&&!Nl?(0,Fp.jsx)(mg,{ref:Dl,container:co,disablePortal:zo,children:(0,Fp.jsxs)(Zl,(0,_p.A)({},Ql,{children:[!ua&&no?(0,Fp.jsx)(Gl,(0,_p.A)({},rc)):null,(0,Fp.jsx)(wT,{disableEnforceFocus:Co,disableAutoFocus:ko,disableRestoreFocus:Bo,isEnabled:Bl,open:yl,children:dp.cloneElement(so,Wl)})]}))}):null}));var jT=FT;function getPopoverUtilityClass(u){return(0,bp.Ay)("MuiPopover",u)}(0,uf.A)("MuiPopover",["root","paper"]);const BT=["onEntering"],NT=["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","className","container","elevation","marginThreshold","open","PaperProps","slots","slotProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps","disableScrollLock"],VT=["slotProps"];function getOffsetTop(u,Xe){let Wt=0;return"number"==typeof Xe?Wt=Xe:"center"===Xe?Wt=u.height/2:"bottom"===Xe&&(Wt=u.height),Wt}function getOffsetLeft(u,Xe){let Wt=0;return"number"==typeof Xe?Wt=Xe:"center"===Xe?Wt=u.width/2:"right"===Xe&&(Wt=u.width),Wt}function getTransformOriginValue(u){return[u.horizontal,u.vertical].map((u=>"number"==typeof u?`${u}px`:u)).join(" ")}function Popover_resolveAnchorEl(u){return"function"==typeof u?u():u}const UT=(0,Up.Ay)(jT,{name:"MuiPopover",slot:"Root",overridesResolver:(u,Xe)=>Xe.root})({}),$T=(0,Up.Ay)(ax,{name:"MuiPopover",slot:"Paper",overridesResolver:(u,Xe)=>Xe.paper})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}),WT=dp.forwardRef((function Popover(u,Xe){var Wt,fr,_r;const wr=(0,$p.b)({props:u,name:"MuiPopover"}),{action:Ar,anchorEl:Kr,anchorOrigin:In={vertical:"top",horizontal:"left"},anchorPosition:no,anchorReference:io="anchorEl",children:oo,className:ao,container:so,elevation:co=8,marginThreshold:ho=16,open:go,PaperProps:xo={},slots:ko,slotProps:Co,transformOrigin:Io={vertical:"top",horizontal:"left"},TransitionComponent:zo=Sm,transitionDuration:Bo="auto",TransitionProps:{onEntering:ca}={},disableScrollLock:ua=!1}=wr,Da=(0,yp.A)(wr.TransitionProps,BT),ns=(0,yp.A)(wr,NT),yl=null!=(Wt=null==Co?void 0:Co.paper)?Wt:xo,vl=dp.useRef(),kl=(0,Xp.A)(vl,yl.ref),Al=(0,_p.A)({},wr,{anchorOrigin:In,anchorReference:io,elevation:co,marginThreshold:ho,externalPaperSlotProps:yl,transformOrigin:Io,TransitionComponent:zo,transitionDuration:Bo,TransitionProps:Da}),Ml=(u=>{const{classes:Xe}=u;return(0,xp.A)({root:["root"],paper:["paper"]},getPopoverUtilityClass,Xe)})(Al),Rl=dp.useCallback((()=>{if("anchorPosition"===io)return no;const u=Popover_resolveAnchorEl(Kr),Xe=(u&&1===u.nodeType?u:(0,dT.A)(vl.current).body).getBoundingClientRect();return{top:Xe.top+getOffsetTop(Xe,In.vertical),left:Xe.left+getOffsetLeft(Xe,In.horizontal)}}),[Kr,In.horizontal,In.vertical,no,io]),Ol=dp.useCallback((u=>({vertical:getOffsetTop(u,Io.vertical),horizontal:getOffsetLeft(u,Io.horizontal)})),[Io.horizontal,Io.vertical]),Ll=dp.useCallback((u=>{const Xe={width:u.offsetWidth,height:u.offsetHeight},Wt=Ol(Xe);if("none"===io)return{top:null,left:null,transformOrigin:getTransformOriginValue(Wt)};const fr=Rl();let _r=fr.top-Wt.vertical,wr=fr.left-Wt.horizontal;const Ar=_r+Xe.height,In=wr+Xe.width,no=(0,bT.A)(Popover_resolveAnchorEl(Kr)),oo=no.innerHeight-ho,ao=no.innerWidth-ho;if(null!==ho&&_r<ho){const u=_r-ho;_r-=u,Wt.vertical+=u}else if(null!==ho&&Ar>oo){const u=Ar-oo;_r-=u,Wt.vertical+=u}if(null!==ho&&wr<ho){const u=wr-ho;wr-=u,Wt.horizontal+=u}else if(In>ao){const u=In-ao;wr-=u,Wt.horizontal+=u}return{top:`${Math.round(_r)}px`,left:`${Math.round(wr)}px`,transformOrigin:getTransformOriginValue(Wt)}}),[Kr,io,Rl,Ol,ho]),[Dl,Bl]=dp.useState(go),Nl=dp.useCallback((()=>{const u=vl.current;if(!u)return;const Xe=Ll(u);null!==Xe.top&&(u.style.top=Xe.top),null!==Xe.left&&(u.style.left=Xe.left),u.style.transformOrigin=Xe.transformOrigin,Bl(!0)}),[Ll]);dp.useEffect((()=>(ua&&window.addEventListener("scroll",Nl),()=>window.removeEventListener("scroll",Nl))),[Kr,ua,Nl]);dp.useEffect((()=>{go&&Nl()})),dp.useImperativeHandle(Ar,(()=>go?{updatePosition:()=>{Nl()}}:null),[go,Nl]),dp.useEffect((()=>{if(!go)return;const u=(0,vT.A)((()=>{Nl()})),Xe=(0,bT.A)(Kr);return Xe.addEventListener("resize",u),()=>{u.clear(),Xe.removeEventListener("resize",u)}}),[Kr,go,Nl]);let Vl=Bo;"auto"!==Bo||zo.muiSupportAuto||(Vl=void 0);const Ul=so||(Kr?(0,dT.A)(Popover_resolveAnchorEl(Kr)).body:void 0),$l=null!=(fr=null==ko?void 0:ko.root)?fr:UT,Wl=null!=(_r=null==ko?void 0:ko.paper)?_r:$T,Zl=pg({elementType:Wl,externalSlotProps:(0,_p.A)({},yl,{style:Dl?yl.style:(0,_p.A)({},yl.style,{opacity:0})}),additionalProps:{elevation:co,ref:kl},ownerState:Al,className:(0,vp.A)(Ml.paper,null==yl?void 0:yl.className)}),Gl=pg({elementType:$l,externalSlotProps:(null==Co?void 0:Co.root)||{},externalForwardedProps:ns,additionalProps:{ref:Xe,slotProps:{backdrop:{invisible:!0}},container:Ul,open:go},ownerState:Al,className:(0,vp.A)(Ml.root,ao)}),{slotProps:Xl}=Gl,Jl=(0,yp.A)(Gl,VT);return(0,Fp.jsx)($l,(0,_p.A)({},Jl,!am($l)&&{slotProps:Xl,disableScrollLock:ua},{children:(0,Fp.jsx)(zo,(0,_p.A)({appear:!0,in:go,onEntering:(u,Xe)=>{ca&&ca(u,Xe),Nl()},onExited:()=>{Bl(!1)},timeout:Vl},Da,{children:(0,Fp.jsx)(Wl,(0,_p.A)({},Zl,{children:oo}))}))}))}));var qT=WT;function getMenuUtilityClass(u){return(0,bp.Ay)("MuiMenu",u)}(0,uf.A)("MuiMenu",["root","paper","list"]);const ZT=["onEntering"],HT=["autoFocus","children","className","disableAutoFocusItem","MenuListProps","onClose","open","PaperProps","PopoverClasses","transitionDuration","TransitionProps","variant","slots","slotProps"],GT={vertical:"top",horizontal:"right"},KT={vertical:"top",horizontal:"left"},XT=(0,Up.Ay)(qT,{shouldForwardProp:u=>(0,Hp.A)(u)||"classes"===u,name:"MuiMenu",slot:"Root",overridesResolver:(u,Xe)=>Xe.root})({}),YT=(0,Up.Ay)($T,{name:"MuiMenu",slot:"Paper",overridesResolver:(u,Xe)=>Xe.paper})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),JT=(0,Up.Ay)(_T,{name:"MuiMenu",slot:"List",overridesResolver:(u,Xe)=>Xe.list})({outline:0});var QT=dp.forwardRef((function Menu(u,Xe){var Wt,fr;const _r=(0,$p.b)({props:u,name:"MuiMenu"}),{autoFocus:wr=!0,children:Ar,className:Kr,disableAutoFocusItem:In=!1,MenuListProps:no={},onClose:io,open:oo,PaperProps:ao={},PopoverClasses:so,transitionDuration:co="auto",TransitionProps:{onEntering:ho}={},variant:go="selectedMenu",slots:xo={},slotProps:ko={}}=_r,Co=(0,yp.A)(_r.TransitionProps,ZT),Io=(0,yp.A)(_r,HT),zo=useRtl(),Bo=(0,_p.A)({},_r,{autoFocus:wr,disableAutoFocusItem:In,MenuListProps:no,onEntering:ho,PaperProps:ao,transitionDuration:co,TransitionProps:Co,variant:go}),ca=(u=>{const{classes:Xe}=u;return(0,xp.A)({root:["root"],paper:["paper"],list:["list"]},getMenuUtilityClass,Xe)})(Bo),ua=wr&&!In&&oo,Da=dp.useRef(null);let ns=-1;dp.Children.map(Ar,((u,Xe)=>{dp.isValidElement(u)&&(u.props.disabled||("selectedMenu"===go&&u.props.selected||-1===ns)&&(ns=Xe))}));const yl=null!=(Wt=xo.paper)?Wt:YT,vl=null!=(fr=ko.paper)?fr:ao,kl=pg({elementType:xo.root,externalSlotProps:ko.root,ownerState:Bo,className:[ca.root,Kr]}),Al=pg({elementType:yl,externalSlotProps:vl,ownerState:Bo,className:ca.paper});return(0,Fp.jsx)(XT,(0,_p.A)({onClose:io,anchorOrigin:{vertical:"bottom",horizontal:zo?"right":"left"},transformOrigin:zo?GT:KT,slots:{paper:yl,root:xo.root},slotProps:{root:kl,paper:Al},open:oo,ref:Xe,transitionDuration:co,TransitionProps:(0,_p.A)({onEntering:(u,Xe)=>{Da.current&&Da.current.adjustStyleForScrollbar(u,{direction:zo?"rtl":"ltr"}),ho&&ho(u,Xe)}},Co),ownerState:Bo},Io,{classes:so,children:(0,Fp.jsx)(JT,(0,_p.A)({onKeyDown:u=>{"Tab"===u.key&&(u.preventDefault(),io&&io(u,"tabKeyDown"))},actions:Da,autoFocus:wr&&(-1===ns||In),autoFocusItem:ua,variant:go},no,{className:(0,vp.A)(ca.list,no.className),children:Ar}))}))}));function getNativeSelectUtilityClasses(u){return(0,bp.Ay)("MuiNativeSelect",u)}var eE=(0,uf.A)("MuiNativeSelect",["root","select","multiple","filled","outlined","standard","disabled","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]);const tE=["className","disabled","error","IconComponent","inputRef","variant"],nativeSelectSelectStyles=({ownerState:u,theme:Xe})=>(0,_p.A)({MozAppearance:"none",WebkitAppearance:"none",userSelect:"none",borderRadius:0,cursor:"pointer","&:focus":(0,_p.A)({},Xe.vars?{backgroundColor:`rgba(${Xe.vars.palette.common.onBackgroundChannel} / 0.05)`}:{backgroundColor:"light"===Xe.palette.mode?"rgba(0, 0, 0, 0.05)":"rgba(255, 255, 255, 0.05)"},{borderRadius:0}),"&::-ms-expand":{display:"none"},[`&.${eE.disabled}`]:{cursor:"default"},"&[multiple]":{height:"auto"},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:(Xe.vars||Xe).palette.background.paper},"&&&":{paddingRight:24,minWidth:16}},"filled"===u.variant&&{"&&&":{paddingRight:32}},"outlined"===u.variant&&{borderRadius:(Xe.vars||Xe).shape.borderRadius,"&:focus":{borderRadius:(Xe.vars||Xe).shape.borderRadius},"&&&":{paddingRight:32}}),rE=(0,Up.Ay)("select",{name:"MuiNativeSelect",slot:"Select",shouldForwardProp:Hp.A,overridesResolver:(u,Xe)=>{const{ownerState:Wt}=u;return[Xe.select,Xe[Wt.variant],Wt.error&&Xe.error,{[`&.${eE.multiple}`]:Xe.multiple}]}})(nativeSelectSelectStyles),nativeSelectIconStyles=({ownerState:u,theme:Xe})=>(0,_p.A)({position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:(Xe.vars||Xe).palette.action.active,[`&.${eE.disabled}`]:{color:(Xe.vars||Xe).palette.action.disabled}},u.open&&{transform:"rotate(180deg)"},"filled"===u.variant&&{right:7},"outlined"===u.variant&&{right:7}),nE=(0,Up.Ay)("svg",{name:"MuiNativeSelect",slot:"Icon",overridesResolver:(u,Xe)=>{const{ownerState:Wt}=u;return[Xe.icon,Wt.variant&&Xe[`icon${(0,Vp.A)(Wt.variant)}`],Wt.open&&Xe.iconOpen]}})(nativeSelectIconStyles),iE=dp.forwardRef((function NativeSelectInput(u,Xe){const{className:Wt,disabled:fr,error:_r,IconComponent:wr,inputRef:Ar,variant:Kr="standard"}=u,In=(0,yp.A)(u,tE),no=(0,_p.A)({},u,{disabled:fr,variant:Kr,error:_r}),io=(u=>{const{classes:Xe,variant:Wt,disabled:fr,multiple:_r,open:wr,error:Ar}=u,Kr={select:["select",Wt,fr&&"disabled",_r&&"multiple",Ar&&"error"],icon:["icon",`icon${(0,Vp.A)(Wt)}`,wr&&"iconOpen",fr&&"disabled"]};return(0,xp.A)(Kr,getNativeSelectUtilityClasses,Xe)})(no);return(0,Fp.jsxs)(dp.Fragment,{children:[(0,Fp.jsx)(rE,(0,_p.A)({ownerState:no,className:(0,vp.A)(io.select,Wt),disabled:fr,ref:Ar||Xe},In)),u.multiple?null:(0,Fp.jsx)(nE,{as:wr,ownerState:no,className:io.icon})]})}));var oE=iE,aE=__webpack_require__(4438);function getSelectUtilityClasses(u){return(0,bp.Ay)("MuiSelect",u)}var sE,lE=(0,uf.A)("MuiSelect",["root","select","multiple","filled","outlined","standard","disabled","focused","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]);const cE=["aria-describedby","aria-label","autoFocus","autoWidth","children","className","defaultOpen","defaultValue","disabled","displayEmpty","error","IconComponent","inputRef","labelId","MenuProps","multiple","name","onBlur","onChange","onClose","onFocus","onOpen","open","readOnly","renderValue","SelectDisplayProps","tabIndex","type","value","variant"],uE=(0,Up.Ay)("div",{name:"MuiSelect",slot:"Select",overridesResolver:(u,Xe)=>{const{ownerState:Wt}=u;return[{[`&.${lE.select}`]:Xe.select},{[`&.${lE.select}`]:Xe[Wt.variant]},{[`&.${lE.error}`]:Xe.error},{[`&.${lE.multiple}`]:Xe.multiple}]}})(nativeSelectSelectStyles,{[`&.${lE.select}`]:{height:"auto",minHeight:"1.4375em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}}),dE=(0,Up.Ay)("svg",{name:"MuiSelect",slot:"Icon",overridesResolver:(u,Xe)=>{const{ownerState:Wt}=u;return[Xe.icon,Wt.variant&&Xe[`icon${(0,Vp.A)(Wt.variant)}`],Wt.open&&Xe.iconOpen]}})(nativeSelectIconStyles),hE=(0,Up.Ay)("input",{shouldForwardProp:u=>(0,aE.A)(u)&&"classes"!==u,name:"MuiSelect",slot:"NativeInput",overridesResolver:(u,Xe)=>Xe.nativeInput})({bottom:0,left:0,position:"absolute",opacity:0,pointerEvents:"none",width:"100%",boxSizing:"border-box"});function SelectInput_areEqualValues(u,Xe){return"object"==typeof Xe&&null!==Xe?u===Xe:String(u)===String(Xe)}function SelectInput_isEmpty(u){return null==u||"string"==typeof u&&!u.trim()}const pE=dp.forwardRef((function SelectInput(u,Xe){var Wt;const{"aria-describedby":fr,"aria-label":_r,autoFocus:wr,autoWidth:Ar,children:Kr,className:In,defaultOpen:no,defaultValue:io,disabled:oo,displayEmpty:ao,error:so=!1,IconComponent:co,inputRef:ho,labelId:go,MenuProps:xo={},multiple:ko,name:Co,onBlur:Io,onChange:zo,onClose:Bo,onFocus:ca,onOpen:ua,open:Da,readOnly:ns,renderValue:yl,SelectDisplayProps:vl={},tabIndex:kl,value:Al,variant:Ml="standard"}=u,Rl=(0,yp.A)(u,cE),[Ol,Ll]=(0,Gp.A)({controlled:Al,default:io,name:"Select"}),[Dl,Bl]=(0,Gp.A)({controlled:Da,default:no,name:"Select"}),Nl=dp.useRef(null),Vl=dp.useRef(null),[Ul,$l]=dp.useState(null),{current:Wl}=dp.useRef(null!=Da),[Zl,Gl]=dp.useState(),Xl=(0,Xp.A)(Xe,ho),Jl=dp.useCallback((u=>{Vl.current=u,u&&$l(u)}),[]),Ql=null==Ul?void 0:Ul.parentNode;dp.useImperativeHandle(Xl,(()=>({focus:()=>{Vl.current.focus()},node:Nl.current,value:Ol})),[Ol]),dp.useEffect((()=>{no&&Dl&&Ul&&!Wl&&(Gl(Ar?null:Ql.clientWidth),Vl.current.focus())}),[Ul,Ar]),dp.useEffect((()=>{wr&&Vl.current.focus()}),[wr]),dp.useEffect((()=>{if(!go)return;const u=(0,dT.A)(Vl.current).getElementById(go);if(u){const handler=()=>{getSelection().isCollapsed&&Vl.current.focus()};return u.addEventListener("click",handler),()=>{u.removeEventListener("click",handler)}}}),[go]);const update=(u,Xe)=>{u?ua&&ua(Xe):Bo&&Bo(Xe),Wl||(Gl(Ar?null:Ql.clientWidth),Bl(u))},rc=dp.Children.toArray(Kr),handleItemClick=u=>Xe=>{let Wt;if(Xe.currentTarget.hasAttribute("tabindex")){if(ko){Wt=Array.isArray(Ol)?Ol.slice():[];const Xe=Ol.indexOf(u.props.value);-1===Xe?Wt.push(u.props.value):Wt.splice(Xe,1)}else Wt=u.props.value;if(u.props.onClick&&u.props.onClick(Xe),Ol!==Wt&&(Ll(Wt),zo)){const fr=Xe.nativeEvent||Xe,_r=new fr.constructor(fr.type,fr);Object.defineProperty(_r,"target",{writable:!0,value:{value:Wt,name:Co}}),zo(_r,u)}ko||update(!1,Xe)}},ic=null!==Ul&&Dl;let oc,lc;delete Rl["aria-invalid"];const gc=[];let bc=!1,eu=!1;(isFilled({value:Ol})||ao)&&(yl?oc=yl(Ol):bc=!0);const tu=rc.map((u=>{if(!dp.isValidElement(u))return null;let Xe;if(ko){if(!Array.isArray(Ol))throw new Error((0,mA.A)(2));Xe=Ol.some((Xe=>SelectInput_areEqualValues(Xe,u.props.value))),Xe&&bc&&gc.push(u.props.children)}else Xe=SelectInput_areEqualValues(Ol,u.props.value),Xe&&bc&&(lc=u.props.children);return Xe&&(eu=!0),dp.cloneElement(u,{"aria-selected":Xe?"true":"false",onClick:handleItemClick(u),onKeyUp:Xe=>{" "===Xe.key&&Xe.preventDefault(),u.props.onKeyUp&&u.props.onKeyUp(Xe)},role:"option",selected:Xe,value:void 0,"data-value":u.props.value})}));bc&&(oc=ko?0===gc.length?null:gc.reduce(((u,Xe,Wt)=>(u.push(Xe),Wt<gc.length-1&&u.push(", "),u)),[]):lc);let nu,iu=Zl;!Ar&&Wl&&Ul&&(iu=Ql.clientWidth),nu=void 0!==kl?kl:oo?null:0;const su=vl.id||(Co?`mui-component-select-${Co}`:void 0),cu=(0,_p.A)({},u,{variant:Ml,value:Ol,open:ic,error:so}),uu=(u=>{const{classes:Xe,variant:Wt,disabled:fr,multiple:_r,open:wr,error:Ar}=u,Kr={select:["select",Wt,fr&&"disabled",_r&&"multiple",Ar&&"error"],icon:["icon",`icon${(0,Vp.A)(Wt)}`,wr&&"iconOpen",fr&&"disabled"],nativeInput:["nativeInput"]};return(0,xp.A)(Kr,getSelectUtilityClasses,Xe)})(cu),hu=(0,_p.A)({},xo.PaperProps,null==(Wt=xo.slotProps)?void 0:Wt.paper),Iu=(0,fA.A)();return(0,Fp.jsxs)(dp.Fragment,{children:[(0,Fp.jsx)(uE,(0,_p.A)({ref:Jl,tabIndex:nu,role:"combobox","aria-controls":Iu,"aria-disabled":oo?"true":void 0,"aria-expanded":ic?"true":"false","aria-haspopup":"listbox","aria-label":_r,"aria-labelledby":[go,su].filter(Boolean).join(" ")||void 0,"aria-describedby":fr,onKeyDown:u=>{if(!ns){-1!==[" ","ArrowUp","ArrowDown","Enter"].indexOf(u.key)&&(u.preventDefault(),update(!0,u))}},onMouseDown:oo||ns?null:u=>{0===u.button&&(u.preventDefault(),Vl.current.focus(),update(!0,u))},onBlur:u=>{!ic&&Io&&(Object.defineProperty(u,"target",{writable:!0,value:{value:Ol,name:Co}}),Io(u))},onFocus:ca},vl,{ownerState:cu,className:(0,vp.A)(vl.className,uu.select,In),id:su,children:SelectInput_isEmpty(oc)?sE||(sE=(0,Fp.jsx)("span",{className:"notranslate",children:"​"})):oc})),(0,Fp.jsx)(hE,(0,_p.A)({"aria-invalid":so,value:Array.isArray(Ol)?Ol.join(","):Ol,name:Co,ref:Nl,"aria-hidden":!0,onChange:u=>{const Xe=rc.find((Xe=>Xe.props.value===u.target.value));void 0!==Xe&&(Ll(Xe.props.value),zo&&zo(u,Xe))},tabIndex:-1,disabled:oo,className:uu.nativeInput,autoFocus:wr,ownerState:cu},Rl)),(0,Fp.jsx)(dE,{as:co,className:uu.icon,ownerState:cu}),(0,Fp.jsx)(QT,(0,_p.A)({id:`menu-${Co||""}`,anchorEl:Ql,open:ic,onClose:u=>{update(!1,u)},anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"}},xo,{MenuListProps:(0,_p.A)({"aria-labelledby":go,role:"listbox","aria-multiselectable":ko?"true":void 0,disableListWrap:!0,id:Iu},xo.MenuListProps),slotProps:(0,_p.A)({},xo.slotProps,{paper:(0,_p.A)({},hu,{style:(0,_p.A)({minWidth:iu},null!=hu?hu.style:null)})}),children:tu}))]})}));var fE=pE,mE=(0,zw.A)((0,Fp.jsx)("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown");const gE=["autoWidth","children","classes","className","defaultOpen","displayEmpty","IconComponent","id","input","inputProps","label","labelId","MenuProps","multiple","native","onClose","onOpen","open","renderValue","SelectDisplayProps","variant"],yE=["root"],_E={name:"MuiSelect",overridesResolver:(u,Xe)=>Xe.root,shouldForwardProp:u=>(0,Hp.A)(u)&&"variant"!==u,slot:"Root"},vE=(0,Up.Ay)(jA,_E)(""),bE=(0,Up.Ay)(tT,_E)(""),xE=(0,Up.Ay)(qA,_E)(""),wE=dp.forwardRef((function Select(u,Xe){const Wt=(0,$p.b)({name:"MuiSelect",props:u}),{autoWidth:fr=!1,children:_r,classes:wr={},className:Ar,defaultOpen:Kr=!1,displayEmpty:In=!1,IconComponent:no=mE,id:io,input:oo,inputProps:ao,label:so,labelId:co,MenuProps:ho,multiple:go=!1,native:xo=!1,onClose:ko,onOpen:Co,open:Io,renderValue:zo,SelectDisplayProps:Bo,variant:ca="outlined"}=Wt,ua=(0,yp.A)(Wt,gE),Da=xo?oE:fE,ns=formControlState({props:Wt,muiFormControl:useFormControl(),states:["variant","error"]}),yl=ns.variant||ca,vl=(0,_p.A)({},Wt,{variant:yl,classes:wr}),kl=(u=>{const{classes:Xe}=u;return Xe})(vl),Al=(0,yp.A)(kl,yE),Ml=oo||{standard:(0,Fp.jsx)(vE,{ownerState:vl}),outlined:(0,Fp.jsx)(bE,{label:so,ownerState:vl}),filled:(0,Fp.jsx)(xE,{ownerState:vl})}[yl],Rl=(0,Xp.A)(Xe,Ml.ref);return(0,Fp.jsx)(dp.Fragment,{children:dp.cloneElement(Ml,(0,_p.A)({inputComponent:Da,inputProps:(0,_p.A)({children:_r,error:ns.error,IconComponent:no,variant:yl,type:void 0,multiple:go},xo?{id:io}:{autoWidth:fr,defaultOpen:Kr,displayEmpty:In,labelId:co,MenuProps:ho,onClose:ko,onOpen:Co,open:Io,renderValue:zo,SelectDisplayProps:(0,_p.A)({id:io},Bo)},ao,{classes:ao?(0,Pp.A)(Al,ao.classes):Al},oo?oo.props.inputProps:{})},(go&&xo||In)&&"outlined"===yl?{notched:!0}:{},{ref:Rl,className:(0,vp.A)(Ml.props.className,Ar,kl.root)},!oo&&{variant:yl},ua))})}));wE.muiName="Select";var SE=wE;function getTextFieldUtilityClass(u){return(0,bp.Ay)("MuiTextField",u)}(0,uf.A)("MuiTextField",["root"]);const kE=["autoComplete","autoFocus","children","className","color","defaultValue","disabled","error","FormHelperTextProps","fullWidth","helperText","id","InputLabelProps","inputProps","InputProps","inputRef","label","maxRows","minRows","multiline","name","onBlur","onChange","onFocus","placeholder","required","rows","select","SelectProps","type","value","variant"],AE={standard:jA,filled:qA,outlined:tT},TE=(0,Up.Ay)(iS,{name:"MuiTextField",slot:"Root",overridesResolver:(u,Xe)=>Xe.root})({}),EE=dp.forwardRef((function TextField(u,Xe){const Wt=(0,$p.b)({props:u,name:"MuiTextField"}),{autoComplete:fr,autoFocus:_r=!1,children:wr,className:Ar,color:Kr="primary",defaultValue:In,disabled:no=!1,error:io=!1,FormHelperTextProps:oo,fullWidth:ao=!1,helperText:so,id:co,InputLabelProps:ho,inputProps:go,InputProps:xo,inputRef:ko,label:Co,maxRows:Io,minRows:zo,multiline:Bo=!1,name:ca,onBlur:ua,onChange:Da,onFocus:ns,placeholder:yl,required:vl=!1,rows:kl,select:Al=!1,SelectProps:Ml,type:Rl,value:Ol,variant:Ll="outlined"}=Wt,Dl=(0,yp.A)(Wt,kE),Bl=(0,_p.A)({},Wt,{autoFocus:_r,color:Kr,disabled:no,error:io,fullWidth:ao,multiline:Bo,required:vl,select:Al,variant:Ll}),Nl=(u=>{const{classes:Xe}=u;return(0,xp.A)({root:["root"]},getTextFieldUtilityClass,Xe)})(Bl);const Vl={};"outlined"===Ll&&(ho&&void 0!==ho.shrink&&(Vl.notched=ho.shrink),Vl.label=Co),Al&&(Ml&&Ml.native||(Vl.id=void 0),Vl["aria-describedby"]=void 0);const Ul=(0,fA.A)(co),$l=so&&Ul?`${Ul}-helper-text`:void 0,Wl=Co&&Ul?`${Ul}-label`:void 0,Zl=AE[Ll],Gl=(0,Fp.jsx)(Zl,(0,_p.A)({"aria-describedby":$l,autoComplete:fr,autoFocus:_r,defaultValue:In,fullWidth:ao,multiline:Bo,name:ca,rows:kl,maxRows:Io,minRows:zo,type:Rl,value:Ol,id:Ul,inputRef:ko,onBlur:ua,onChange:Da,onFocus:ns,placeholder:yl,inputProps:go},Vl,xo));return(0,Fp.jsxs)(TE,(0,_p.A)({className:(0,vp.A)(Nl.root,Ar),disabled:no,error:io,fullWidth:ao,ref:Xe,required:vl,color:Kr,variant:Ll,ownerState:Bl},Dl,{children:[null!=Co&&""!==Co&&(0,Fp.jsx)(iT,(0,_p.A)({htmlFor:Ul,id:Wl},ho,{children:Co})),Al?(0,Fp.jsx)(SE,(0,_p.A)({"aria-describedby":$l,id:Ul,labelId:Wl,value:Ol,input:Gl},Ml,{children:wr})):Gl,so&&(0,Fp.jsx)(uT,(0,_p.A)({id:$l},oo,{children:so}))]}))}));var CE=EE;function getCircularProgressUtilityClass(u){return(0,bp.Ay)("MuiCircularProgress",u)}(0,uf.A)("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);const PE=["className","color","disableShrink","size","style","thickness","value","variant"];let IE,ME,RE,zE,CircularProgress_=u=>u;const OE=44,LE=(0,af.i7)(IE||(IE=CircularProgress_`
128
+ 0% {
129
+ transform: rotate(0deg);
130
+ }
131
+
132
+ 100% {
133
+ transform: rotate(360deg);
134
+ }
135
+ `)),DE=(0,af.i7)(ME||(ME=CircularProgress_`
136
+ 0% {
137
+ stroke-dasharray: 1px, 200px;
138
+ stroke-dashoffset: 0;
139
+ }
140
+
141
+ 50% {
142
+ stroke-dasharray: 100px, 200px;
143
+ stroke-dashoffset: -15px;
144
+ }
145
+
146
+ 100% {
147
+ stroke-dasharray: 100px, 200px;
148
+ stroke-dashoffset: -125px;
149
+ }
150
+ `)),FE=(0,Up.Ay)("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(u,Xe)=>{const{ownerState:Wt}=u;return[Xe.root,Xe[Wt.variant],Xe[`color${(0,Vp.A)(Wt.color)}`]]}})((({ownerState:u,theme:Xe})=>(0,_p.A)({display:"inline-block"},"determinate"===u.variant&&{transition:Xe.transitions.create("transform")},"inherit"!==u.color&&{color:(Xe.vars||Xe).palette[u.color].main})),(({ownerState:u})=>"indeterminate"===u.variant&&(0,af.AH)(RE||(RE=CircularProgress_`
151
+ animation: ${0} 1.4s linear infinite;
152
+ `),LE))),jE=(0,Up.Ay)("svg",{name:"MuiCircularProgress",slot:"Svg",overridesResolver:(u,Xe)=>Xe.svg})({display:"block"}),BE=(0,Up.Ay)("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(u,Xe)=>{const{ownerState:Wt}=u;return[Xe.circle,Xe[`circle${(0,Vp.A)(Wt.variant)}`],Wt.disableShrink&&Xe.circleDisableShrink]}})((({ownerState:u,theme:Xe})=>(0,_p.A)({stroke:"currentColor"},"determinate"===u.variant&&{transition:Xe.transitions.create("stroke-dashoffset")},"indeterminate"===u.variant&&{strokeDasharray:"80px, 200px",strokeDashoffset:0})),(({ownerState:u})=>"indeterminate"===u.variant&&!u.disableShrink&&(0,af.AH)(zE||(zE=CircularProgress_`
153
+ animation: ${0} 1.4s ease-in-out infinite;
154
+ `),DE))),NE=dp.forwardRef((function CircularProgress(u,Xe){const Wt=(0,$p.b)({props:u,name:"MuiCircularProgress"}),{className:fr,color:_r="primary",disableShrink:wr=!1,size:Ar=40,style:Kr,thickness:In=3.6,value:no=0,variant:io="indeterminate"}=Wt,oo=(0,yp.A)(Wt,PE),ao=(0,_p.A)({},Wt,{color:_r,disableShrink:wr,size:Ar,thickness:In,value:no,variant:io}),so=(u=>{const{classes:Xe,variant:Wt,color:fr,disableShrink:_r}=u,wr={root:["root",Wt,`color${(0,Vp.A)(fr)}`],svg:["svg"],circle:["circle",`circle${(0,Vp.A)(Wt)}`,_r&&"circleDisableShrink"]};return(0,xp.A)(wr,getCircularProgressUtilityClass,Xe)})(ao),co={},ho={},go={};if("determinate"===io){const u=2*Math.PI*((OE-In)/2);co.strokeDasharray=u.toFixed(3),go["aria-valuenow"]=Math.round(no),co.strokeDashoffset=`${((100-no)/100*u).toFixed(3)}px`,ho.transform="rotate(-90deg)"}return(0,Fp.jsx)(FE,(0,_p.A)({className:(0,vp.A)(so.root,fr),style:(0,_p.A)({width:Ar,height:Ar},ho,Kr),ownerState:ao,ref:Xe,role:"progressbar"},go,oo,{children:(0,Fp.jsx)(jE,{className:so.svg,ownerState:ao,viewBox:"22 22 44 44",children:(0,Fp.jsx)(BE,{className:so.circle,style:co,ownerState:ao,cx:OE,cy:OE,r:(OE-In)/2,fill:"none",strokeWidth:In})})}))}));var VE=NE;const UE=function JakartoLoginForm(){var u=this;_newArrowCheck(this,undefined);const[Xe,Wt]=(0,dp.useState)(!1),[fr,_r]=(0,dp.useState)(""),wr=function useIsMounted(){var u=this;const Xe=(0,dp.useRef)(!1);return(0,dp.useEffect)(function(){var Wt=this;return _newArrowCheck(this,u),Xe.current=!0,function(){_newArrowCheck(this,Wt),Xe.current=!1}.bind(this)}.bind(this)),Xe}(),{register:Ar,formState:{errors:Kr},handleSubmit:In}=function useForm(u={}){const Xe=dp.useRef(),Wt=dp.useRef(),[fr,_r]=dp.useState({isDirty:!1,isValidating:!1,isLoading:index_esm_isFunction(u.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:u.errors||{},disabled:u.disabled||!1,defaultValues:index_esm_isFunction(u.defaultValues)?void 0:u.defaultValues});Xe.current||(Xe.current={...createFormControl(u),formState:fr});const wr=Xe.current.control;return wr._options=u,useSubscribe({subject:wr._subjects.state,next:u=>{shouldRenderFormState(u,wr._proxyFormState,wr._updateFormState,!0)&&_r({...wr._formState})}}),dp.useEffect((()=>wr._disableForm(u.disabled)),[wr,u.disabled]),dp.useEffect((()=>{if(wr._proxyFormState.isDirty){const u=wr._getDirty();u!==fr.isDirty&&wr._subjects.state.next({isDirty:u})}}),[wr,fr.isDirty]),dp.useEffect((()=>{u.values&&!deepEqual(u.values,Wt.current)?(wr._reset(u.values,wr._options.resetOptions),Wt.current=u.values,_r((u=>({...u})))):wr._resetDefaultValues()}),[u.values,wr]),dp.useEffect((()=>{u.errors&&wr._setErrors(u.errors)}),[u.errors,wr]),dp.useEffect((()=>{wr._state.mount||(wr._updateValid(),wr._state.mount=!0),wr._state.watch&&(wr._state.watch=!1,wr._subjects.state.next({...wr._formState})),wr._removeUnmounted()})),dp.useEffect((()=>{u.shouldUnregister&&wr._subjects.values.next({values:wr._getWatch()})}),[u.shouldUnregister,wr]),Xe.current.formState=getProxyFormState(fr,wr),Xe.current}({resolver:zod_t(Lv),mode:"onTouched"}),no=function onSubmitHandler(Xe){var fr=this;_newArrowCheck(this,u),wr.current&&(Wt(!0),_r("")),cv.login(Xe.email,Xe.password).then(function(){var u=this;_newArrowCheck(this,fr),Ew.isAuthenticated().then(function(Xe){_newArrowCheck(this,u),store_getStore().dispatch(viewerActionCreator_setIsAuthenticated(Xe)),wr.current&&(_r(Xe?"":Gx("jakarto.panel.login.error")),Wt(!1))}.bind(this)).catch(function(Xe){_newArrowCheck(this,u),console.error(Xe),wr.current&&(_r(Gx("jakarto.panel.login.error")),Wt(!1))}.bind(this))}.bind(this))}.bind(this);return dp.createElement(Dx,{component:"form",sx:{margin:"1rem"},direction:"column",spacing:2,onSubmit:In(no)},dp.createElement(gx,{color:"secondary"},Gx("jakarto.panel.login.title")),dp.createElement(CE,{label:Gx("jakarto.panel.login.user"),variant:"outlined",fullWidth:!0,error:!!Kr.email,helperText:Kr.email&&Kr.email.message?Gx(Kr.email.message):"",...Ar("email")}),dp.createElement(CE,{label:Gx("jakarto.panel.login.pass"),variant:"outlined",type:"password",fullWidth:!0,error:!!Kr.password,helperText:Kr.password&&Kr.password.message?Gx(Kr.password.message):"",...Ar("password")}),dp.createElement(fy,{color:"primary",variant:"contained",fullWidth:!0,type:"submit",disabled:Xe},Xe&&dp.createElement(VE,{sx:{marginRight:"1rem"},size:25}),Gx("jakarto.panel.login.confirm")),""!==fr&&dp.createElement(uT,{error:!0},fr))}.bind(void 0);var $E=void 0;const WE=function JakartoPanelFn(u){var Xe=this;_newArrowCheck(this,$E);const{isViewerVisible:Wt,isLoading:fr,isAuthenticated:_r,isExtensionEnabled:wr}=u,Ar=Wt?"active":"inactive",Kr=Wt?go.pS:xo.k6,In=function handleSwitchChange(u){_newArrowCheck(this,Xe),Cw.setExtensionEnableState(u.target.checked)}.bind(this);return fr?dp.createElement(sk,{text:Gx("jakarto.panel.loading.message")}):_r?dp.createElement(dp.Fragment,null,dp.createElement(qp,{sx:{marginTop:"1rem",marginBottom:"1rem",display:"flex",justifyContent:"space-between",alignItems:"center"}},dp.createElement("img",{src:"en"===JMap.Language.getLocale()?JMap.Application.UI.Theme.isDark()?BS:NS:JMap.Application.UI.Theme.isDark()?VS:US,width:"60%",height:"60%"}),dp.createElement(im,{onChange:In,checked:wr})),wr?dp.createElement(dp.Fragment,null,dp.createElement(qp,{sx:{paddingLeft:0,paddingRight:0,display:"flex",flexShrink:1,justifyContent:"flex-end"}},dp.createElement(oy,{title:Gx(`jakarto.panel.display.tooltip.${Ar}`)},dp.createElement("span",null,dp.createElement(fy,{id:"jakarto-viewer-display-button",sx:{cursor:"pointer",height:"1.875rem",marginRight:"1rem",marginBottom:"1rem",whiteSpace:"nowrap","& > span":{fontSize:"0.75rem"},"& svg":{height:"0.8175rem"}},color:Wt?"primary":"secondary",variant:"contained",onClick:function onClick(){_newArrowCheck(this,Xe),fr||Ew.toggleIsVisible()}.bind(this),startIcon:dp.createElement(mp,{size:"1x",icon:Kr})},Gx(`jakarto.panel.display.button.${Ar}`))))),dp.createElement(qp,{sx:{paddingLeft:"1rem",paddingRight:"1rem",display:"flex",flexDirection:"column",justifyContent:"flex-start","& > p":{fontSize:"1rem",fontWeight:function fontWeight(u){return _newArrowCheck(this,Xe),u.typography.fontWeightRegular}.bind(this),lineHeight:1.5,color:function color(u){return _newArrowCheck(this,Xe),u.palette.text.primary}.bind(this)}}},dp.createElement(jS,null),dp.createElement(vy,{sx:{marginTop:"0.875rem",marginBottom:"1rem"}}),dp.createElement(xk,{parameters:u.parameters}),dp.createElement(vy,{sx:{marginTop:"0.875rem",marginBottom:"1rem"}}))):null):dp.createElement(UE,null)}.bind(void 0),qE=Qb(function(u){return _newArrowCheck(this,$E),{parameters:getExtensionState(u).viewer.parameters,isViewerVisible:getExtensionState(u).viewer.isVisible,isLoading:getExtensionState(u).viewer.isLoading,isAuthenticated:getExtensionState(u).viewer.isAuthenticated,isExtensionEnabled:getExtensionState(u).main.isExtensionEnabled}}.bind(void 0))(WE);var ZE=void 0;const HE=function ExtensionFn(u){return _newArrowCheck(this,ZE),dp.createElement(Xe.a,{theme:u.theme},dp.createElement(qE,null))}.bind(void 0),GE=Qb(function(u){return _newArrowCheck(this,ZE),{theme:getAppState().ui.theme}}.bind(void 0))(HE),KE=function Extension(){return _newArrowCheck(this,ZE),dp.createElement(ex,{store:store_getStore()},dp.createElement(GE,null))}.bind(void 0);const XE=function layerReducer(u,Xe){switch(_newArrowCheck(this,undefined),u||(u=getDefaultLayerState()),Xe.type){case ho.JAKARTO_LAYER_SET_IS_VECTOR_LAYER_VISIBLE:{const{isVectorLayerVisible:Wt}=Xe;return{...u,isVectorLayerVisible:Wt}}case ho.JAKARTO_LAYER_SET_WMTS_LAYER_VISIBILITY:{const{year:Wt,isVisible:fr}=Xe,_r=u.allWMTSByYear[Wt];return{...u,allWMTSByYear:{...u.allWMTSByYear,[Wt]:{..._r,isVisible:fr}}}}case ho.JAKARTO_LAYER_SET_WMTS_LAYER_EXPANSION:{const{year:Wt,isStyleExpanded:fr}=Xe,_r=u.allWMTSByYear[Wt];return{...u,allWMTSByYear:{...u.allWMTSByYear,[Wt]:{..._r,isStyleExpanded:fr}}}}case ho.JAKARTO_LAYER_SELECT_WMTS_LAYER_STYLE:{const{year:Wt,selectedStyle:fr}=Xe,_r=u.allWMTSByYear[Wt];return{...u,allWMTSByYear:{...u.allWMTSByYear,[Wt]:{..._r,selectedStyle:fr}}}}case ho.JAKARTO_LAYER_SET_ZOOM_LEVEL:{const{zoomLevel:Wt}=Xe;return{...u,zoomLevel:Wt}}default:return u}}.bind(void 0);const YE=function viewerReducer(u,Xe){switch(_newArrowCheck(this,undefined),u||(u=getDefaultViewerState()),Xe.type){case ho.JAKARTO_VIEWER_SET_IS_INTERACTOR_ACTIVE:{const{isInteractorActive:Wt}=Xe;return{...u,isInteractorActive:Wt}}case ho.JAKARTO_VIEWER_SET_IS_VISIBLE:{const{isVisible:Wt}=Xe;return{...u,isVisible:Wt}}case ho.JAKARTO_VIEWER_SET_PARAMETERS:{const{parameters:Wt}=Xe;return{...u,parameters:Wt}}case ho.JAKARTO_VIEWER_SET_IS_LOADING:{const{isLoading:Wt}=Xe;return{...u,isLoading:Wt}}case ho.JAKARTO_VIEWER_SET_IS_AUTH:{const{isAuthenticated:Wt}=Xe;return{...u,isAuthenticated:Wt}}default:return u}}.bind(void 0);const JE=function extensionReducer(u,Xe){switch(_newArrowCheck(this,undefined),u||(u=getDefaultExtensionState()),Xe.type){case ho.JAKARTO_RESET_STATE:return getDefaultExtensionState();case ho.JAKARTO_ENABLE_STATE_EXTENSION:{const{isExtensionEnabled:Wt}=Xe;return{...u,main:{...u.main,isExtensionEnabled:Wt}}}default:{const Wt={...u};return Wt.viewer=YE(u.viewer,Xe),Wt.layer=XE(u.layer,Xe),Wt}}}.bind(void 0);var QE=JSON.parse('{"jakarto.title":"Jakartowns","jakarto.icon.tooltip":"Jakartowns","jakarto.activate.tooltip":"Show Jakartowns viewer","jakarto.deactivate.tooltip":"Hide Jakartowns viewer","jakarto.panel.info.longitude":"Longitude","jakarto.panel.info.latitude":"Latitude","jakarto.panel.info.tilt":"Tilt","jakarto.panel.info.fov":"Field of View","jakarto.panel.info.rotation":"Rotation","jakarto.panel.display.tooltip.inactive":"Show Jakarto viewer","jakarto.panel.display.tooltip.active":"Hide Jakarto viewer","jakarto.panel.display.button.inactive":"Show","jakarto.panel.display.button.active":"Hide","jakarto.panel.loading.message":"Loading Jakartowns data","jakarto.panel.login.title":"Login to Jakartowns","jakarto.panel.login.user":"Email","jakarto.panel.login.pass":"Password","jakarto.panel.login.confirm":"Login","jakarto.panel.login.error":"Can\'t login to Jakartowns","jakarto.login.email.min.error":"Email is required","jakarto.login.email.format.error":"Invalid email","jakarto.login.pass.min.error":"Password is required","jakarto.layer.content.header.title":"Jakartowns Layers","jakarto.layer.vector.title":"Coverage","jakarto.layer.raster.title":"Photo ({0})","jakarto.layer.raster.legend.title":"Styles","jakarto.layer.raster.style.default":"Base Style","jakarto.layer.raster.style.intensite.max":"Maximum Intensity","jakarto.layer.raster.style.intensite.max.pts.bas":"Lowest Points\' Maximum Intensity","jakarto.layer.raster.style.pts.bas":"Lowest Points","jakarto.layer.raster.style.verticality":"Verticality","jakarto.layer.raster.all.title":"Photo (most recent)","jakarto.panel.info.date":"Date","jakarto.viewer.button.external.tooltip":"Display current panorama in Jakartowns","jakarto.viewer.button.close.tooltip":"Hide viewer"}'),eC=__webpack_require__.t(QE,2),tC=JSON.parse('{"jakarto.title":"Jakartowns","jakarto.icon.tooltip":"Jakartowns","jakarto.activate.tooltip":"Afficher le visualiseur Jakartowns","jakarto.deactivate.tooltip":"Cacher le visualiseur Jakartowns","jakarto.panel.info.longitude":"Longitude","jakarto.panel.info.latitude":"Latitude","jakarto.panel.info.tilt":"Inclinaison","jakarto.panel.info.fov":"Champ de vision","jakarto.panel.info.rotation":"Rotation","jakarto.panel.display.tooltip.inactive":"Afficher l\'outil Jakarto","jakarto.panel.display.tooltip.active":"Cacher l\'outil Jakarto","jakarto.panel.display.button.inactive":"Afficher","jakarto.panel.display.button.active":"Cacher","jakarto.panel.loading.message":"Chargement des données Jakartowns","jakarto.panel.login.title":"Connexion à Jakartowns","jakarto.panel.login.user":"Courriel","jakarto.panel.login.pass":"Mot de passe","jakarto.panel.login.confirm":"Connexion","jakarto.panel.login.error":"Impossible d\'effectuer la connexion à Jakartowns","jakarto.login.email.min.error":"Courriel requis","jakarto.login.email.format.error":"Courriel invalide","jakarto.login.pass.min.error":"Mot de passe requis","jakarto.layer.content.header.title":"Couches Jakartowns","jakarto.layer.vector.title":"Couverture","jakarto.layer.raster.title":"Photo ({0})","jakarto.layer.raster.legend.title":"Styles","jakarto.layer.raster.style.default":"Style de base","jakarto.layer.raster.style.intensite.max":"Intensité maximale","jakarto.layer.raster.style.intensite.max.pts.bas":"Intensité maximale des points bas","jakarto.layer.raster.style.verticality":"Verticalité","jakarto.layer.raster.style.pts.bas":"Points les plus bas","jakarto.layer.raster.all.title":"Photo (plus récentes)","jakarto.panel.info.date":"Date","jakarto.viewer.button.external.tooltip":"Ouvrir cet emplacement dans Jakartowns","jakarto.viewer.button.close.tooltip":"Cacher le visualiseur"}'),rC=__webpack_require__.t(tC,2);let nC;const iC=function getAppExtension(){var u=this;return{id:_r,serviceToExpose:Pw,startBeforeMapIsReady:!0,isProjectExtension:!0,jmapCloudExtensionUrn:"bf36161f-bd11-4d31-ab7e-38f7d0368d61",storeReducer:JE,translationBundle:{id:_r,translationsByLocale:{en:eC,fr:rC}},panelIcon:'\n <svg version="1.0" xmlns="http://www.w3.org/2000/svg" width="192.000000pt" height="192.000000pt" viewBox="0 0 192.000000 192.000000" preserveAspectRatio="xMidYMid meet">\n <metadata>\n Logo of Jakarto\n </metadata>\n <g transform="translate(0.000000,192.000000) scale(0.100000,-0.100000)"\n stroke="none">\n <path d="M 960 20\n A 940 940 0 1 0 960 1900\n A 940 940 0 1 0 960 20\n Z\n M 960 380\n A 580 580 0 1 1 960 1540\n A 580 580 0 1 1 960 380\n Z" />\n <circle cx="960" cy="960" r="260" />\n </g>\n </svg>',panelTooltip:{bundleId:_r,key:"jakarto.icon.tooltip"},initFn:function initFn(Xe){var Wt=this;_newArrowCheck(this,u),store_getStore().dispatch(viewerActionCreator_setIsLoading(!0)),Ew.isAuthenticated().then(function(u){_newArrowCheck(this,Wt),store_getStore().dispatch(viewerActionCreator_setIsAuthenticated(u)),store_getStore().dispatch(viewerActionCreator_setIsLoading(!1))}.bind(this)).catch(function(u){return _newArrowCheck(this,Wt),console.error(u)}.bind(this))}.bind(this),destroyFn:function destroyFn(){_newArrowCheck(this,u),Cw.setExtensionEnableState(!1,!0)}.bind(this),onPanelCreation:function onPanelCreation(Xe){_newArrowCheck(this,u);const Wt=document.getElementById(Xe);Wt&&(nC=Sw.H(Wt),nC.render(dp.createElement(KE,null)))}.bind(this),onPanelDestroy:function onPanelDestroy(Xe){_newArrowCheck(this,u),nC&&(nC.unmount(),nC=void 0)}.bind(this),injectMapRequestParameters:function injectMapRequestParameters(Xe,Wt){return _newArrowCheck(this,u),Xe.indexOf(fr)>-1||Xe.indexOf(io)>-1?{url:Xe,credentials:"include"}:{url:Xe}}.bind(this)}}(),oC=function register(){var u=this;_newArrowCheck(this,undefined),"object"==typeof JMap&&"object"==typeof JMap.Application?JMap.Application.Extension.isRegistered(iC.id)||JMap.Application.Extension.register(iC):setTimeout(function(){return _newArrowCheck(this,u),oC()}.bind(this),500)}.bind(void 0);oC()}()}();