(self.webpackChunkmytopo=self.webpackChunkmytopo||[]).push([[179],{6089:(Gt,Bt,Je)=>{"use strict";var it=Je(7494),tt=Je(4703),h="\n ",$={};function me(St){var le=Array.isArray(St);return function(Ne){var xe=Re($.plainArray,Ne);if(xe)return xe;if(le&&Ne.length!==St.length)return"an array with "+St.length+" items";for(var ht=0;htxe.length?ht:xe})}},$.equal=function(le){return function(Ee){if(Ee!==le)return JSON.stringify(le)}},$.oneOf=function(){var le=Array.isArray(arguments[0])?arguments[0]:Array.prototype.slice.call(arguments),Xe=le.map(function(Ee){return $.equal(Ee)});return $.oneOfType.apply(this,Xe)},$.range=function(le){var Xe=le[0],Ee=le[1];return function(xe){if(Re($.number,xe)||xeEe)return"number between "+Xe+" & "+Ee+" (inclusive)"}},$.any=function(){},$.boolean=function(le){if("boolean"!=typeof le)return"boolean"},$.number=function(le){if("number"!=typeof le)return"number"},$.plainArray=function(le){if(!Array.isArray(le))return"array"},$.plainObject=function(le){if(!it(le))return"object"},$.string=function(le){if("string"!=typeof le)return"string"},$.func=function(le){if("function"!=typeof le)return"function"},$.validate=Re,$.processMessage=De,Gt.exports=$},2564:(Gt,Bt,Je)=>{"use strict";var it=Je(9652).x0;function tt(Pe){this.origin=Pe.origin||"https://api.mapbox.com",this.endpoint="events/v2",this.access_token=Pe.accessToken,this.version="0.2.0",this.sessionID=this.generateSessionID(),this.userAgent=this.getUserAgent(),this.options=Pe,this.send=this.send.bind(this),this.countries=Pe.countries?Pe.countries.split(","):null,this.types=Pe.types?Pe.types.split(","):null,this.bbox=Pe.bbox?Pe.bbox:null,this.language=Pe.language?Pe.language.split(","):null,this.limit=Pe.limit?+Pe.limit:null,this.locale=navigator.language||null,this.enableEventLogging=this.shouldEnableLogging(Pe),this.eventQueue=new Array,this.flushInterval=Pe.flushInterval||1e3,this.maxQueueSize=Pe.maxQueueSize||100,this.timer=this.flushInterval?setTimeout(this.flush.bind(this),this.flushInterval):null,this.lastSentInput="",this.lastSentIndex=0}tt.prototype={select:function(Pe,h){var $=this.getSelectedIndex(Pe,h),me=this.getEventPayload("search.select",h);if(me.resultIndex=$,me.resultPlaceName=Pe.place_name,me.resultId=Pe.id,($!==this.lastSentIndex||me.queryString!==this.lastSentInput)&&-1!=$&&(this.lastSentIndex=$,this.lastSentInput=me.queryString,me.queryString))return this.push(me)},start:function(Pe){var h=this.getEventPayload("search.start",Pe);if(h.queryString)return this.push(h)},keyevent:function(Pe,h){if(Pe.key&&!Pe.metaKey&&-1===[9,27,37,39,13,38,40].indexOf(Pe.keyCode)){var $=this.getEventPayload("search.keystroke",h);if($.lastAction=Pe.key,$.queryString)return this.push($)}},send:function(Pe,h){if(!this.enableEventLogging)return h?h():void 0;var $=this.getRequestOptions(Pe);this.request($,function(me){return me?this.handleError(me,h):h?h():void 0}.bind(this))},getRequestOptions:function(Pe){return Array.isArray(Pe)||(Pe=[Pe]),{method:"POST",host:this.origin,path:this.endpoint+"?access_token="+this.access_token,headers:{"Content-Type":"application/json"},body:JSON.stringify(Pe)}},getEventPayload:function(Pe,h){var $;$=h.options.proximity?"object"==typeof h.options.proximity?[h.options.proximity.longitude,h.options.proximity.latitude]:"ip"===h.options.proximity?[999,999]:h.options.proximity:null;var me=h._map?h._map.getZoom():void 0,Re={event:Pe,created:+new Date,sessionIdentifier:this.sessionID,country:this.countries,userAgent:this.userAgent,language:this.language,bbox:this.bbox,types:this.types,endpoint:"mapbox.places",autocomplete:h.options.autocomplete,fuzzyMatch:h.options.fuzzyMatch,proximity:$,limit:h.options.limit,routing:h.options.routing,worldview:h.options.worldview,mapZoom:me,keyboardLocale:this.locale};return Re.queryString="search.select"===Pe?h.inputString:"search.select"!=Pe&&h._inputEl?h._inputEl.value:h.inputString,Re},request:function(Pe,h){var $=new XMLHttpRequest;for(var me in $.onreadystatechange=function(){if(4==this.readyState)return h(204==this.status?null:this.statusText)},$.open(Pe.method,Pe.host+"/"+Pe.path,!0),Pe.headers)$.setRequestHeader(me,Pe.headers[me]);$.send(Pe.body)},handleError:function(Pe,h){if(h)return h(Pe)},generateSessionID:function(){return it()},getUserAgent:function(){return"mapbox-gl-geocoder."+this.version+"."+navigator.userAgent},getSelectedIndex:function(Pe,h){if(h._typeahead){var me=Pe.id;return h._typeahead.data.map(function(Ie){return Ie.id}).indexOf(me)}},shouldEnableLogging:function(Pe){return!(!1===Pe.enableEventLogging||Pe.origin&&"https://api.mapbox.com"!==Pe.origin||Pe.localGeocoder||Pe.filter)},flush:function(){this.eventQueue.length>0&&(this.send(this.eventQueue),this.eventQueue=new Array),this.timer&&clearTimeout(this.timer),this.flushInterval&&(this.timer=setTimeout(this.flush.bind(this),this.flushInterval))},push:function(Pe,h){this.eventQueue.push(Pe),(this.eventQueue.length>=this.maxQueueSize||h)&&this.flush()},remove:function(){this.flush()}},Gt.exports=tt},3424:Gt=>{Gt.exports={fr:{name:"France",bbox:[[-4.59235,41.380007],[9.560016,51.148506]]},us:{name:"United States",bbox:[[-171.791111,18.91619],[-66.96466,71.357764]]},ru:{name:"Russia",bbox:[[19.66064,41.151416],[190.10042,81.2504]]},ca:{name:"Canada",bbox:[[-140.99778,41.675105],[-52.648099,83.23324]]}}},3569:Gt=>{function Bt(){}Bt.prototype={isSupport:function(){return Boolean(window.navigator.geolocation)},getCurrentPosition:function(){const Je={enableHighAccuracy:!0};return new Promise(function(it,tt){window.navigator.geolocation.getCurrentPosition(it,tt,Je)})}},Gt.exports=Bt},8545:(Gt,Bt,Je)=>{"use strict";var it=Je(5562),tt=Je(3082),Pe=Je(4703),h=Je(9069).EventEmitter,$=Je(3424),me=Je(9471),Re=Je(7075),De=Je(2564),Ie=Je(1753),ct=Je(6775),zt=Je(3569),Ot=Je(2777);function St(le){this._eventEmitter=new h,this.options=Pe({},this.options,le),this.inputString="",this.fresh=!0,this.lastSelected=null,this.geolocation=new zt}St.prototype={options:{zoom:16,flyTo:!0,trackProximity:!0,minLength:2,reverseGeocode:!1,flipCoordinates:!1,limit:5,origin:"https://api.mapbox.com",enableEventLogging:!0,marker:!0,mapboxgl:null,collapsed:!1,clearAndBlurOnEsc:!1,clearOnBlur:!1,enableGeolocation:!1,addressAccuracy:"street",getItemValue:function(le){return le.place_name},render:function(le){var Xe=le.place_name.split(",");return'
'+Xe[0]+'
'+Xe.splice(1,Xe.length).join(",")+"
"}},addTo:function(le){function Xe(Ee,Ne){if(!document.body.contains(Ne))throw new Error("Element provided to #addTo() exists, but is not in the DOM");const xe=Ee.onAdd();Ne.appendChild(xe)}if(le._controlContainer)le.addControl(this);else if(le instanceof HTMLElement)Xe(this,le);else{if("string"!=typeof le)throw new Error("Error: addTo must be a mapbox-gl-js map, an html element, or a CSS selector query for a single html element");{const Ee=document.querySelectorAll(le);if(0===Ee.length)throw new Error("Element ",le,"not found.");if(Ee.length>1)throw new Error("Geocoder can only be added to a single html element");Xe(this,Ee[0])}}},onAdd:function(le){if(le&&"string"!=typeof le&&(this._map=le),this.setLanguage(),this.options.localGeocoderOnly||(this.geocoderService=Re(me({accessToken:this.options.accessToken,origin:this.options.origin}))),this.options.localGeocoderOnly&&!this.options.localGeocoder)throw new Error("A localGeocoder function must be specified to use localGeocoderOnly mode");this.eventManager=new De(this.options),this._onChange=this._onChange.bind(this),this._onKeyDown=this._onKeyDown.bind(this),this._onPaste=this._onPaste.bind(this),this._onBlur=this._onBlur.bind(this),this._showButton=this._showButton.bind(this),this._hideButton=this._hideButton.bind(this),this._onQueryResult=this._onQueryResult.bind(this),this.clear=this.clear.bind(this),this._updateProximity=this._updateProximity.bind(this),this._collapse=this._collapse.bind(this),this._unCollapse=this._unCollapse.bind(this),this._clear=this._clear.bind(this),this._clearOnBlur=this._clearOnBlur.bind(this),this._geolocateUser=this._geolocateUser.bind(this);var Xe=this.container=document.createElement("div");Xe.className="mapboxgl-ctrl-geocoder mapboxgl-ctrl";var Ee=this.createIcon("search",'');this._inputEl=document.createElement("input"),this._inputEl.type="text",this._inputEl.className="mapboxgl-ctrl-geocoder--input",this.setPlaceholder(),this.options.collapsed&&(this._collapse(),this.container.addEventListener("mouseenter",this._unCollapse),this.container.addEventListener("mouseleave",this._collapse),this._inputEl.addEventListener("focus",this._unCollapse)),(this.options.collapsed||this.options.clearOnBlur)&&this._inputEl.addEventListener("blur",this._onBlur),this._inputEl.addEventListener("keydown",tt(this._onKeyDown,200)),this._inputEl.addEventListener("paste",this._onPaste),this._inputEl.addEventListener("change",this._onChange),this.container.addEventListener("mouseenter",this._showButton),this.container.addEventListener("mouseleave",this._hideButton),this._inputEl.addEventListener("keyup",function(yn){this.eventManager.keyevent(yn,this)}.bind(this));var Ne=document.createElement("div");Ne.classList.add("mapboxgl-ctrl-geocoder--pin-right"),this._clearEl=document.createElement("button"),this._clearEl.setAttribute("aria-label","Clear"),this._clearEl.addEventListener("click",this.clear),this._clearEl.className="mapboxgl-ctrl-geocoder--button";var xe=this.createIcon("close",'');if(this._clearEl.appendChild(xe),this._loadingEl=this.createIcon("loading",''),Ne.appendChild(this._clearEl),Ne.appendChild(this._loadingEl),Xe.appendChild(Ee),Xe.appendChild(this._inputEl),Xe.appendChild(Ne),this.options.enableGeolocation&&this.geolocation.isSupport()){this._geolocateEl=document.createElement("button"),this._geolocateEl.setAttribute("aria-label","Geolocate"),this._geolocateEl.addEventListener("click",this._geolocateUser),this._geolocateEl.className="mapboxgl-ctrl-geocoder--button";var ht=this.createIcon("geolocate",'');this._geolocateEl.appendChild(ht),Ne.appendChild(this._geolocateEl),this._showGeolocateButton()}var ot=this._typeahead=new it(this._inputEl,[],{filter:!1,minLength:this.options.minLength,limit:this.options.limit});this.setRenderFunction(this.options.render),ot.getItemValue=this.options.getItemValue;var ft=ot.list.draw,Lt=this._footerNode=function At(){var le=document.createElement("div");return le.className="mapboxgl-ctrl-geocoder--powered-by",le.innerHTML='Powered by Mapbox',le}();return ot.list.draw=function(){ft.call(this),Lt.addEventListener("mousedown",function(){this.selectingListItem=!0}.bind(this)),Lt.addEventListener("mouseup",function(){this.selectingListItem=!1}.bind(this)),this.element.appendChild(Lt)},this.mapMarker=null,this._handleMarker=this._handleMarker.bind(this),this._map&&(this.options.trackProximity&&(this._updateProximity(),this._map.on("moveend",this._updateProximity)),this._mapboxgl=this.options.mapboxgl,!this._mapboxgl&&this.options.marker&&(console.error("No mapboxgl detected in options. Map markers are disabled. Please set options.mapboxgl."),this.options.marker=!1)),Xe},_geolocateUser:function(){this._hideGeolocateButton(),this._showLoadingIcon(),this.geolocation.getCurrentPosition().then(function(le){this._hideLoadingIcon();const Xe={geometry:{type:"Point",coordinates:[le.coords.longitude,le.coords.latitude]}};this._handleMarker(Xe),this._fly(Xe),this._typeahead.clear(),this._typeahead.selected=!0,this.lastSelected=JSON.stringify(Xe),this._showClearButton(),this.fresh=!1;const Ee={limit:1,language:[this.options.language],query:Xe.geometry.coordinates,types:["address"]};this.options.localGeocoderOnly?(this._setInputValue(Xe.geometry.coordinates[0]+","+Xe.geometry.coordinates[1]),this._eventEmitter.emit("result",{result:Xe})):this.geocoderService.reverseGeocode(Ee).send().then(function(Ne){const xe=Ne.body.features[0];if(xe){const ht=Ot.transformFeatureToGeolocationText(xe,this.options.addressAccuracy);this._setInputValue(ht),xe.user_coordinates=Xe.geometry.coordinates,this._eventEmitter.emit("result",{result:xe})}else this._eventEmitter.emit("result",{result:{user_coordinates:Xe.geometry.coordinates}})}.bind(this))}.bind(this)).catch(function(le){1===le.code?this._renderUserDeniedGeolocationError():this._renderLocationError(),this._hideLoadingIcon(),this._showGeolocateButton(),this._hideAttribution()}.bind(this))},createIcon:function(le,Xe){var Ee=document.createElementNS("http://www.w3.org/2000/svg","svg");return Ee.setAttribute("class","mapboxgl-ctrl-geocoder--icon mapboxgl-ctrl-geocoder--icon-"+le),Ee.setAttribute("viewBox","0 0 18 18"),Ee.setAttribute("xml:space","preserve"),Ee.setAttribute("width",18),Ee.setAttribute("height",18),Ee.innerHTML=Xe,Ee},onRemove:function(){return this.container.parentNode.removeChild(this.container),this.options.trackProximity&&this._map&&this._map.off("moveend",this._updateProximity),this._removeMarker(),this._map=null,this},_setInputValue:function(le){this._inputEl.value=le,setTimeout(function(){this._inputEl.focus(),this._inputEl.scrollLeft=0,this._inputEl.setSelectionRange(0,0)}.bind(this),1)},_onPaste:function(le){var Xe=(le.clipboardData||window.clipboardData).getData("text");Xe.length>=this.options.minLength&&this._geocode(Xe)},_onKeyDown:function(le){var Xe=27,Ee=9;if(le.keyCode===Xe&&this.options.clearAndBlurOnEsc)return this._clear(le),this._inputEl.blur();var Ne=le.target&&le.target.shadowRoot?le.target.shadowRoot.activeElement:le.target;if(!Ne||!Ne.value)return this.fresh=!0,le.keyCode!==Ee&&this.clear(le),this._showGeolocateButton(),this._hideClearButton();this._hideGeolocateButton(),!le.metaKey&&-1===[Ee,Xe,37,39,13,38,40].indexOf(le.keyCode)&&Ne.value.length>=this.options.minLength&&this._geocode(Ne.value)},_showButton:function(){this._typeahead.selected&&this._showClearButton()},_hideButton:function(){this._typeahead.selected&&this._hideClearButton()},_showClearButton:function(){this._clearEl.style.display="block"},_hideClearButton:function(){this._clearEl.style.display="none"},_showGeolocateButton:function(){this._geolocateEl&&this.geolocation.isSupport()&&(this._geolocateEl.style.display="block")},_hideGeolocateButton:function(){this._geolocateEl&&(this._geolocateEl.style.display="none")},_showLoadingIcon:function(){this._loadingEl.style.display="block"},_hideLoadingIcon:function(){this._loadingEl.style.display="none"},_showAttribution:function(){this._footerNode.style.display="block"},_hideAttribution:function(){this._footerNode.style.display="none"},_onBlur:function(le){this.options.clearOnBlur&&this._clearOnBlur(le),this.options.collapsed&&this._collapse()},_onChange:function(){var le=this._typeahead.selected;le&&JSON.stringify(le)!==this.lastSelected&&(this._hideClearButton(),this.options.flyTo&&this._fly(le),this.options.marker&&this._mapboxgl&&this._handleMarker(le),this._inputEl.focus(),this._inputEl.scrollLeft=0,this._inputEl.setSelectionRange(0,0),this.lastSelected=JSON.stringify(le),this._eventEmitter.emit("result",{result:le}),this.eventManager.select(le,this))},_fly:function(le){var Xe;if(le.properties&&$[le.properties.short_code])Xe=Pe({},this.options.flyTo),this._map&&this._map.fitBounds($[le.properties.short_code].bbox,Xe);else if(le.bbox){var Ee=le.bbox;Xe=Pe({},this.options.flyTo),this._map&&this._map.fitBounds([[Ee[0],Ee[1]],[Ee[2],Ee[3]]],Xe)}else Xe=Pe({},{zoom:this.options.zoom},this.options.flyTo),le.center?Xe.center=le.center:le.geometry&&le.geometry.type&&"Point"===le.geometry.type&&le.geometry.coordinates&&(Xe.center=le.geometry.coordinates),this._map&&this._map.flyTo(Xe)},_requestType:function(le,Xe){return le.localGeocoderOnly?1:le.reverseGeocode&&Ot.REVERSE_GEOCODE_COORD_RGX.test(Xe)?2:0},_setupConfig:function(le,Xe){const Ne=/[\s,]+/;var xe=this,ht=["bbox","limit","proximity","countries","types","language","reverseMode","mode","autocomplete","fuzzyMatch","routing","worldview"].reduce(function(ft,Lt){return null==xe.options[Lt]||(ft[Lt]=["countries","types","language"].indexOf(Lt)>-1?xe.options[Lt].split(Ne):xe.options[Lt],"proximity"===Lt&&"number"==typeof xe.options[Lt].longitude&&"number"==typeof xe.options[Lt].latitude&&(ft[Lt]=[xe.options[Lt].longitude,xe.options[Lt].latitude])),ft},{});switch(le){case 2:var ot=Xe.split(Ne).map(function(ft){return parseFloat(ft,10)});xe.options.flipCoordinates||ot.reverse(),ht=Pe(ht,{query:ot,limit:1}),["proximity","autocomplete","fuzzyMatch","bbox"].forEach(function(ft){ft in ht&&delete ht[ft]});break;case 0:{const ft=Xe.trim();/^(-?\d{1,3}(\.\d{0,256})?)[, ]+(-?\d{1,3}(\.\d{0,256})?)?$/.test(ft)&&(Xe=Xe.replace(/,/g," ")),ht=Pe(ht,{query:Xe})}}return ht},_geocode:function(le){this.inputString=le,this._showLoadingIcon(),this._eventEmitter.emit("loading",{query:le});const Xe=this._requestType(this.options,le),Ee=this._setupConfig(Xe,le);var Ne;switch(Xe){case 1:Ne=Promise.resolve();break;case 0:Ne=this.geocoderService.forwardGeocode(Ee).send();break;case 2:Ne=this.geocoderService.reverseGeocode(Ee).send()}var xe=this.options.localGeocoder&&this.options.localGeocoder(le)||[],ht=[],ot=null;return Ne.catch(function(ft){ot=ft}.bind(this)).then(function(ft){this._hideLoadingIcon();var Lt={};return ft?"200"==ft.statusCode&&((Lt=ft.body).request=ft.request,Lt.headers=ft.headers):Lt={type:"FeatureCollection",features:[]},Lt.config=Ee,this.fresh&&(this.eventManager.start(this),this.fresh=!1),Lt.features=Lt.features?xe.concat(Lt.features):xe,this.options.externalGeocoder?(ht=this.options.externalGeocoder(le,Lt.features)||Promise.resolve([])).then(function(yn){return Lt.features=Lt.features?yn.concat(Lt.features):yn,Lt},function(){return Lt}):Lt}.bind(this)).then(function(ft){if(ot)throw ot;this.options.filter&&ft.features.length&&(ft.features=ft.features.filter(this.options.filter)),ft.features.length?(this._showClearButton(),this._hideGeolocateButton(),this._showAttribution(),this._eventEmitter.emit("results",ft),this._typeahead.update(ft.features)):(this._hideClearButton(),this._hideAttribution(),this._typeahead.selected=null,this._renderNoResults(),this._eventEmitter.emit("results",ft))}.bind(this)).catch(function(ft){this._hideLoadingIcon(),this._hideAttribution(),xe.length&&this.options.localGeocoder||ht.length&&this.options.externalGeocoder?(this._showClearButton(),this._hideGeolocateButton(),this._typeahead.update(xe)):(this._hideClearButton(),this._typeahead.selected=null,this._renderError()),this._eventEmitter.emit("results",{features:xe}),this._eventEmitter.emit("error",{error:ft})}.bind(this)),Ne},_clear:function(le){le&&le.preventDefault(),this._inputEl.value="",this._typeahead.selected=null,this._typeahead.clear(),this._onChange(),this._hideClearButton(),this._showGeolocateButton(),this._removeMarker(),this.lastSelected=null,this._eventEmitter.emit("clear"),this.fresh=!0},clear:function(le){this._clear(le),this._inputEl.focus()},_clearOnBlur:function(le){le.relatedTarget&&this._clear(le)},_onQueryResult:function(le){var Xe=le.body;if(Xe.features.length){var Ee=Xe.features[0];this._typeahead.selected=Ee,this._inputEl.value=Ee.place_name,this._onChange()}},_updateProximity:function(){if(this._map&&this.options.trackProximity)if(this._map.getZoom()>9){var le=this._map.getCenter().wrap();this.setProximity({longitude:le.lng,latitude:le.lat},!1)}else this.setProximity(null,!1)},_collapse:function(){!this._inputEl.value&&this._inputEl!==document.activeElement&&this.container.classList.add("mapboxgl-ctrl-geocoder--collapsed")},_unCollapse:function(){this.container.classList.remove("mapboxgl-ctrl-geocoder--collapsed")},query:function(le){return this._geocode(le).then(this._onQueryResult),this},_renderError:function(){this._renderMessage("
There was an error reaching the server
")},_renderLocationError:function(){this._renderMessage("
A location error has occurred
")},_renderNoResults:function(){this._renderMessage("
No results found
")},_renderUserDeniedGeolocationError:function(){this._renderMessage("
Geolocation permission denied
")},_renderMessage:function(le){this._typeahead.update([]),this._typeahead.selected=null,this._typeahead.clear(),this._typeahead.renderError(le)},_getPlaceholderText:function(){if(this.options.placeholder)return this.options.placeholder;if(this.options.language){var le=this.options.language.split(",")[0],Xe=ct.language(le),Ee=Ie.placeholder[Xe];if(Ee)return Ee}return"Search"},setInput:function(le){return this._inputEl.value=le,this._typeahead.selected=null,this._typeahead.clear(),le.length>=this.options.minLength&&this._geocode(le),this},setProximity:function(le,Xe=!0){return this.options.proximity=le,Xe&&(this.options.trackProximity=!1),this},getProximity:function(){return this.options.proximity},setRenderFunction:function(le){return le&&"function"==typeof le&&(this._typeahead.render=le),this},getRenderFunction:function(){return this._typeahead.render},setLanguage:function(le){var Xe=navigator.language||navigator.userLanguage||navigator.browserLanguage;return this.options.language=le||this.options.language||Xe,this},getLanguage:function(){return this.options.language},getZoom:function(){return this.options.zoom},setZoom:function(le){return this.options.zoom=le,this},getFlyTo:function(){return this.options.flyTo},setFlyTo:function(le){return this.options.flyTo=le,this},getPlaceholder:function(){return this.options.placeholder},setPlaceholder:function(le){return this.placeholder=le||this._getPlaceholderText(),this._inputEl.placeholder=this.placeholder,this._inputEl.setAttribute("aria-label",this.placeholder),this},getBbox:function(){return this.options.bbox},setBbox:function(le){return this.options.bbox=le,this},getCountries:function(){return this.options.countries},setCountries:function(le){return this.options.countries=le,this},getTypes:function(){return this.options.types},setTypes:function(le){return this.options.types=le,this},getMinLength:function(){return this.options.minLength},setMinLength:function(le){return this.options.minLength=le,this._typeahead&&(this._typeahead.options.minLength=le),this},getLimit:function(){return this.options.limit},setLimit:function(le){return this.options.limit=le,this._typeahead&&(this._typeahead.options.limit=le),this},getFilter:function(){return this.options.filter},setFilter:function(le){return this.options.filter=le,this},setOrigin:function(le){return this.options.origin=le,this.geocoderService=Re(me({accessToken:this.options.accessToken,origin:this.options.origin})),this},getOrigin:function(){return this.options.origin},setAccessToken:function(le){return this.options.accessToken=le,this.geocoderService=Re(me({accessToken:this.options.accessToken,origin:this.options.origin})),this},setAutocomplete:function(le){return this.options.autocomplete=le,this},getAutocomplete:function(){return this.options.autocomplete},setFuzzyMatch:function(le){return this.options.fuzzyMatch=le,this},getFuzzyMatch:function(){return this.options.fuzzyMatch},setRouting:function(le){return this.options.routing=le,this},getRouting:function(){return this.options.routing},setWorldview:function(le){return this.options.worldview=le,this},getWorldview:function(){return this.options.worldview},_handleMarker:function(le){if(this._map){this._removeMarker();var Ee=Pe({},{color:"#4668F2"},this.options.marker);return this.mapMarker=new this._mapboxgl.Marker(Ee),le.center?this.mapMarker.setLngLat(le.center).addTo(this._map):le.geometry&&le.geometry.type&&"Point"===le.geometry.type&&le.geometry.coordinates&&this.mapMarker.setLngLat(le.geometry.coordinates).addTo(this._map),this}},_removeMarker:function(){this.mapMarker&&(this.mapMarker.remove(),this.mapMarker=null)},on:function(le,Xe){return this._eventEmitter.on(le,Xe),this},off:function(le,Xe){return this._eventEmitter.removeListener(le,Xe),this.eventManager.remove(),this}},Gt.exports=St},1753:Gt=>{"use strict";Gt.exports={placeholder:{de:"Suche",it:"Ricerca",en:"Search",nl:"Zoeken",fr:"Chercher",ca:"Cerca",he:"\u05dc\u05d7\u05e4\u05e9",ja:"\u30b5\u30fc\u30c1",lv:"Mekl\u0113t",pt:"Procurar",sr:"\u041f\u0440\u0435\u0442\u0440\u0430\u0433\u0430",zh:"\u641c\u7d22",cs:"Vyhled\xe1v\xe1n\xed",hu:"Keres\xe9s",ka:"\u10eb\u10d8\u10d4\u10d1\u10d0",nb:"S\xf8ke",sk:"Vyh\u013ead\xe1vanie",th:"\u0e04\u0e49\u0e19\u0e2b\u0e32",fi:"Hae",is:"Leita",ko:"\uc218\uc0c9",pl:"Szukaj",sl:"Iskanje",fa:"\u062c\u0633\u062a\u062c\u0648",ru:"\u041f\u043e\u0438\u0441\u043a"}}},2777:Gt=>{function Je(tt){const Pe=tt.address||"",h=tt.text||"",$=tt.place_name||"",Re={address:$.split(",")[0],houseNumber:Pe,street:h,placeName:$};return tt.context.forEach(function(De){const Ie=De.id.split(".")[0];Re[Ie]=De.text}),Re}Gt.exports={transformFeatureToGeolocationText:function Bt(tt,Pe){const h=Je(tt),$=["address","street","place","country"];if("function"==typeof Pe)return Pe(h);const Re=$.indexOf(Pe);return(-1===Re?$:$.slice(Re)).reduce(function(De,Ie){return h[Ie]?(""!==De&&(De+=", "),De+h[Ie]):De},"")},getAddressInfo:Je,REVERSE_GEOCODE_COORD_RGX:/^[ ]*(-?\d{1,3}(\.\d{0,256})?)[, ]+(-?\d{1,3}(\.\d{0,256})?)[ ]*$/}},9471:(Gt,Bt,Je)=>{"use strict";var it=Je(7454);Gt.exports=it},7454:(Gt,Bt,Je)=>{"use strict";var it=Je(753),tt=Je(4176);function Pe($){tt.call(this,$)}(Pe.prototype=Object.create(tt.prototype)).constructor=Pe,Pe.prototype.sendRequest=it.browserSend,Pe.prototype.abortRequest=it.browserAbort,Gt.exports=function h($){return new Pe($)}},753:(Gt,Bt,Je)=>{"use strict";var it=Je(4332),tt=Je(6158),Pe=Je(9719),h=Je(8829),$={};function De(Ot){var Ut=Ot.total,At=Ot.loaded;return{total:Ut,transferred:At,percent:100*At/Ut}}function Ie(Ot,Ut){return new Promise(function(At,St){Ut.onprogress=function(Ee){Ot.emitter.emit(Pe.EVENT_PROGRESS_DOWNLOAD,De(Ee))};var le=Ot.file;le&&(Ut.upload.onprogress=function(Ee){Ot.emitter.emit(Pe.EVENT_PROGRESS_UPLOAD,De(Ee))}),Ut.onerror=function(Ee){St(Ee)},Ut.onabort=function(){var Ee=new tt({request:Ot,type:Pe.ERROR_REQUEST_ABORTED});St(Ee)},Ut.onload=function(){if(delete $[Ot.id],Ut.status<200||Ut.status>=400){var Ee=new tt({request:Ot,body:Ut.response,statusCode:Ut.status});St(Ee)}else At(Ut)};var Xe=Ot.body;"string"==typeof Xe?Ut.send(Xe):Xe?Ut.send(JSON.stringify(Xe)):le?Ut.send(le):Ut.send(),$[Ot.id]=Ut}).then(function(At){return function Re(Ot,Ut){return new it(Ot,{body:Ut.response,headers:h(Ut.getAllResponseHeaders()),statusCode:Ut.status})}(Ot,At)})}function ct(Ot,Ut){var At=Ot.url(Ut),St=new window.XMLHttpRequest;return St.open(Ot.method,At),Object.keys(Ot.headers).forEach(function(le){St.setRequestHeader(le,Ot.headers[le])}),St}Gt.exports={browserAbort:function me(Ot){var Ut=$[Ot.id];Ut&&(Ut.abort(),delete $[Ot.id])},sendRequestXhr:Ie,browserSend:function zt(Ot){return Promise.resolve().then(function(){var Ut=ct(Ot,Ot.client.accessToken);return Ie(Ot,Ut)})},createRequestXhr:ct}},4176:(Gt,Bt,Je)=>{"use strict";var it=Je(8129),tt=Je(4538),Pe=Je(9719);function h($){if(!$||!$.accessToken)throw new Error("Cannot create a client without an access token");it($.accessToken),this.accessToken=$.accessToken,this.origin=$.origin||Pe.API_ORIGIN}h.prototype.createRequest=function(me){return new tt(this,me)},Gt.exports=h},6158:(Gt,Bt,Je)=>{"use strict";var it=Je(9719);Gt.exports=function tt(Pe){var $,h=Pe.type||it.ERROR_HTTP;if(Pe.body)try{$=JSON.parse(Pe.body)}catch{$=Pe.body}else $=null;var me=Pe.message||null;me||("string"==typeof $?me=$:$&&"string"==typeof $.message?me=$.message:h===it.ERROR_REQUEST_ABORTED&&(me="Request aborted")),this.message=me,this.type=h,this.statusCode=Pe.statusCode||null,this.request=Pe.request,this.body=$}},4538:(Gt,Bt,Je)=>{"use strict";var it=Je(8129),tt=Je(4703),Pe=Je(6661),h=Je(3449),$=Je(9719),me=1;function Re(De,Ie){if(!De)throw new Error("MapiRequest requires a client");if(!Ie||!Ie.path||!Ie.method)throw new Error("MapiRequest requires an options object with path and method properties");var ct={};Ie.body&&(ct["content-type"]="application/json");var zt=tt(ct,Ie.headers),Ot=Object.keys(zt).reduce(function(Ut,At){return Ut[At.toLowerCase()]=zt[At],Ut},{});this.id=me++,this._options=Ie,this.emitter=new Pe,this.client=De,this.response=null,this.error=null,this.sent=!1,this.aborted=!1,this.path=Ie.path,this.method=Ie.method,this.origin=Ie.origin||De.origin,this.query=Ie.query||{},this.params=Ie.params||{},this.body=Ie.body||null,this.file=Ie.file||null,this.encoding=Ie.encoding||"utf8",this.sendFileAs=Ie.sendFileAs||null,this.headers=Ot}Re.prototype.url=function(Ie){var ct=h.prependOrigin(this.path,this.origin);ct=h.appendQueryObject(ct,this.query);var zt=this.params,Ot=Ie??this.client.accessToken;if(Ot){ct=h.appendQueryParam(ct,"access_token",Ot);var Ut=it(Ot).user;zt=tt({ownerId:Ut},zt)}return h.interpolateRouteParams(ct,zt)},Re.prototype.send=function(){var Ie=this;if(Ie.sent)throw new Error("This request has already been sent. Check the response and error properties. Create a new request with clone().");return Ie.sent=!0,Ie.client.sendRequest(Ie).then(function(ct){return Ie.response=ct,Ie.emitter.emit($.EVENT_RESPONSE,ct),ct},function(ct){throw Ie.error=ct,Ie.emitter.emit($.EVENT_ERROR,ct),ct})},Re.prototype.abort=function(){this._nextPageRequest&&(this._nextPageRequest.abort(),delete this._nextPageRequest),!(this.response||this.error||this.aborted)&&(this.aborted=!0,this.client.abortRequest(this))},Re.prototype.eachPage=function(Ie){var ct=this;function zt(At){Ie(null,At,function St(){delete ct._nextPageRequest;var le=At.nextPage();le&&(ct._nextPageRequest=le,Ut(le))})}function Ot(At){Ie(At,null,function(){})}function Ut(At){At.send().then(zt,Ot)}Ut(this)},Re.prototype.clone=function(){return this._extend()},Re.prototype._extend=function(Ie){var ct=tt(this._options,Ie);return new Re(this.client,ct)},Gt.exports=Re},4332:(Gt,Bt,Je)=>{"use strict";var it=Je(5699);function tt(Pe,h){this.request=Pe,this.headers=h.headers,this.rawBody=h.body,this.statusCode=h.statusCode;try{this.body=JSON.parse(h.body||"{}")}catch{this.body=h.body}this.links=it(this.headers.link)}tt.prototype.hasNextPage=function(){return!!this.links.next},tt.prototype.nextPage=function(){return this.hasNextPage()?this.request._extend({path:this.links.next.url}):null},Gt.exports=tt},9719:Gt=>{"use strict";Gt.exports={API_ORIGIN:"https://api.mapbox.com",EVENT_PROGRESS_DOWNLOAD:"downloadProgress",EVENT_PROGRESS_UPLOAD:"uploadProgress",EVENT_ERROR:"error",EVENT_RESPONSE:"response",ERROR_HTTP:"HttpError",ERROR_REQUEST_ABORTED:"RequestAbortedError"}},8829:Gt=>{"use strict";Gt.exports=function Je(it){var tt={};return it&&it.trim().split(/[\r|\n]+/).forEach(function(Pe){var h=function Bt(it){var tt=it.indexOf(":");return{name:it.substring(0,tt).trim().toLowerCase(),value:it.substring(tt+1).trim()}}(Pe);tt[h.name]=h.value}),tt}},5699:Gt=>{"use strict";Gt.exports=function it(tt){return tt?tt.split(/,\s*]*)>(.*)/);if(!Pe)return null;var h=Pe[1],$=Pe[2].split(";"),me=null,Re=$.reduce(function(De,Ie){var ct=function Bt(tt){var Pe=tt.match(/\s*(.+)\s*=\s*"?([^"]+)"?/);return Pe?{key:Pe[1],value:Pe[2]}:null}(Ie);return ct?"rel"===ct.key?(me||(me=ct.value),De):(De[ct.key]=ct.value,De):De},{});return me?{url:h,rel:me,params:Re}:null}(h);return $?($.rel.split(/\s+/).forEach(function(Re){Pe[Re]||(Pe[Re]={url:$.url,params:$.params})}),Pe):Pe},{}):{}}},3449:Gt=>{"use strict";function Je($){return Array.isArray($)?function Bt($){return $.map(encodeURIComponent).join(",")}($):encodeURIComponent(String($))}function it($,me,Re){if(!1===Re||null===Re)return $;var De=/\?/.test($)?"&":"?",Ie=encodeURIComponent(me);return void 0!==Re&&""!==Re&&!0!==Re&&(Ie+="="+Je(Re)),""+$+De+Ie}Gt.exports={appendQueryObject:function tt($,me){if(!me)return $;var Re=$;return Object.keys(me).forEach(function(De){var Ie=me[De];void 0!==Ie&&(Array.isArray(Ie)&&(Ie=Ie.filter(function(ct){return null!=ct}).join(",")),Re=it(Re,De,Ie))}),Re},appendQueryParam:it,prependOrigin:function Pe($,me){if(!me||"http"===$.slice(0,4))return $;var Re="/"===$[0]?"":"/";return""+me.replace(/\/$/,"")+Re+$},interpolateRouteParams:function h($,me){return me?$.replace(/\/:([a-zA-Z0-9]+)/g,function(Re,De){var Ie=me[De];if(void 0===Ie)throw new Error("Unspecified route parameter "+De);return"/"+Je(Ie)}):$}}},6661:Gt=>{"use strict";var Bt=Object.prototype.hasOwnProperty,Je="~";function it(){}function tt(me,Re,De){this.fn=me,this.context=Re,this.once=De||!1}function Pe(me,Re,De,Ie,ct){if("function"!=typeof De)throw new TypeError("The listener must be a function");var zt=new tt(De,Ie||me,ct),Ot=Je?Je+Re:Re;return me._events[Ot]?me._events[Ot].fn?me._events[Ot]=[me._events[Ot],zt]:me._events[Ot].push(zt):(me._events[Ot]=zt,me._eventsCount++),me}function h(me,Re){0==--me._eventsCount?me._events=new it:delete me._events[Re]}function $(){this._events=new it,this._eventsCount=0}Object.create&&(it.prototype=Object.create(null),(new it).__proto__||(Je=!1)),$.prototype.eventNames=function(){var De,Ie,Re=[];if(0===this._eventsCount)return Re;for(Ie in De=this._events)Bt.call(De,Ie)&&Re.push(Je?Ie.slice(1):Ie);return Object.getOwnPropertySymbols?Re.concat(Object.getOwnPropertySymbols(De)):Re},$.prototype.listeners=function(Re){var Ie=this._events[Je?Je+Re:Re];if(!Ie)return[];if(Ie.fn)return[Ie.fn];for(var ct=0,zt=Ie.length,Ot=new Array(zt);ct{"use strict";var it=Je(4703),tt=Je(9801),Pe=Je(4313),h=Je(1836),$=Je(497),me={},Re=["country","region","postcode","district","place","locality","neighborhood","address","poi","poi.landmark"];me.forwardGeocode=function(De){tt.assertShape({query:tt.required(tt.string),mode:tt.oneOf("mapbox.places","mapbox.places-permanent"),countries:tt.arrayOf(tt.string),proximity:tt.oneOf(tt.coordinates,"ip"),types:tt.arrayOf(tt.oneOf(Re)),autocomplete:tt.boolean,bbox:tt.arrayOf(tt.number),limit:tt.number,language:tt.arrayOf(tt.string),routing:tt.boolean,fuzzyMatch:tt.boolean,worldview:tt.string})(De),De.mode=De.mode||"mapbox.places";var Ie=h(it({country:De.countries},Pe(De,["proximity","types","autocomplete","bbox","limit","language","routing","fuzzyMatch","worldview"])));return this.client.createRequest({method:"GET",path:"/geocoding/v5/:mode/:query.json",params:Pe(De,["mode","query"]),query:Ie})},me.reverseGeocode=function(De){tt.assertShape({query:tt.required(tt.coordinates),mode:tt.oneOf("mapbox.places","mapbox.places-permanent"),countries:tt.arrayOf(tt.string),types:tt.arrayOf(tt.oneOf(Re)),bbox:tt.arrayOf(tt.number),limit:tt.number,language:tt.arrayOf(tt.string),reverseMode:tt.oneOf("distance","score"),routing:tt.boolean,worldview:tt.string})(De),De.mode=De.mode||"mapbox.places";var Ie=h(it({country:De.countries},Pe(De,["country","types","bbox","limit","language","reverseMode","routing","worldview"])));return this.client.createRequest({method:"GET",path:"/geocoding/v5/:mode/:query.json",params:Pe(De,["mode","query"]),query:Ie})},Gt.exports=$(me)},497:(Gt,Bt,Je)=>{"use strict";var it=Je(4176),tt=Je(7454);Gt.exports=function Pe(h){return function($){var me;me=it.prototype.isPrototypeOf($)?$:tt($);var Re=Object.create(h);return Re.client=me,Re}}},5621:Gt=>{"use strict";Gt.exports=function Bt(Je,it){return Object.keys(Je).reduce(function(tt,Pe){return tt[Pe]=it(Pe,Je[Pe]),tt},{})}},4313:Gt=>{"use strict";Gt.exports=function Bt(Je,it){var tt=function(Pe,h){return-1!==it.indexOf(Pe)&&void 0!==h};return"function"==typeof it&&(tt=it),Object.keys(Je).filter(function(Pe){return tt(Pe,Je[Pe])}).reduce(function(Pe,h){return Pe[h]=Je[h],Pe},{})}},1836:(Gt,Bt,Je)=>{"use strict";var it=Je(5621);Gt.exports=function tt(Pe){return it(Pe,function(h,$){return"boolean"==typeof $?JSON.stringify($):$})}},9801:(Gt,Bt,Je)=>{"use strict";var it=Je(4703),tt=Je(6089);Gt.exports=it(tt,{file:function Pe(Re){return typeof window<"u"?Re instanceof global.Blob||Re instanceof global.ArrayBuffer?void 0:"Blob or ArrayBuffer":"string"!=typeof Re&&void 0===Re.pipe?"Filename or Readable stream":void 0},date:function $(Re){var De="date";if("boolean"==typeof Re)return De;try{var Ie=new Date(Re);if(Ie.getTime&&isNaN(Ie.getTime()))return De}catch{return De}},coordinates:function me(Re){return tt.tuple(tt.number,tt.number)(Re)},assertShape:function h(Re,De){return tt.assert(tt.strictShape(Re),De)}})},8129:(Gt,Bt,Je)=>{"use strict";var it=Je(2049),tt={};function $(me,Re){return Object.prototype.hasOwnProperty.call(me,Re)}Gt.exports=function Pe(me){if(tt[me])return tt[me];var Re=me.split("."),De=Re[0],Ie=Re[1];if(!Ie)throw new Error("Invalid token");var ct=function h(me){try{return JSON.parse(it.decode(me))}catch{throw new Error("Invalid token")}}(Ie),zt={usage:De,user:ct.u};return $(ct,"a")&&(zt.authorization=ct.a),$(ct,"exp")&&(zt.expires=1e3*ct.exp),$(ct,"iat")&&(zt.created=1e3*ct.iat),$(ct,"scopes")&&(zt.scopes=ct.scopes),$(ct,"client")&&(zt.client=ct.client),$(ct,"ll")&&(zt.lastLogin=ct.ll),$(ct,"iu")&&(zt.impersonator=ct.iu),tt[me]=zt,zt}},9848:(Gt,Bt,Je)=>{"use strict";function it(t){return"function"==typeof t}function tt(t){const e=t(i=>{Error.call(i),i.stack=(new Error).stack});return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e}const Pe=tt(t=>function(e){t(this),this.message=e?`${e.length} errors occurred during unsubscription:\n${e.map((i,r)=>`${r+1}) ${i.toString()}`).join("\n ")}`:"",this.name="UnsubscriptionError",this.errors=e});function h(t,n){if(t){const e=t.indexOf(n);0<=e&&t.splice(e,1)}}class ${constructor(n){this.initialTeardown=n,this.closed=!1,this._parentage=null,this._finalizers=null}unsubscribe(){let n;if(!this.closed){this.closed=!0;const{_parentage:e}=this;if(e)if(this._parentage=null,Array.isArray(e))for(const s of e)s.remove(this);else e.remove(this);const{initialTeardown:i}=this;if(it(i))try{i()}catch(s){n=s instanceof Pe?s.errors:[s]}const{_finalizers:r}=this;if(r){this._finalizers=null;for(const s of r)try{De(s)}catch(d){n=n??[],d instanceof Pe?n=[...n,...d.errors]:n.push(d)}}if(n)throw new Pe(n)}}add(n){var e;if(n&&n!==this)if(this.closed)De(n);else{if(n instanceof $){if(n.closed||n._hasParent(this))return;n._addParent(this)}(this._finalizers=null!==(e=this._finalizers)&&void 0!==e?e:[]).push(n)}}_hasParent(n){const{_parentage:e}=this;return e===n||Array.isArray(e)&&e.includes(n)}_addParent(n){const{_parentage:e}=this;this._parentage=Array.isArray(e)?(e.push(n),e):e?[e,n]:n}_removeParent(n){const{_parentage:e}=this;e===n?this._parentage=null:Array.isArray(e)&&h(e,n)}remove(n){const{_finalizers:e}=this;e&&h(e,n),n instanceof $&&n._removeParent(this)}}$.EMPTY=(()=>{const t=new $;return t.closed=!0,t})();const me=$.EMPTY;function Re(t){return t instanceof $||t&&"closed"in t&&it(t.remove)&&it(t.add)&&it(t.unsubscribe)}function De(t){it(t)?t():t.unsubscribe()}const Ie={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},ct={setTimeout(t,n,...e){const{delegate:i}=ct;return i?.setTimeout?i.setTimeout(t,n,...e):setTimeout(t,n,...e)},clearTimeout(t){const{delegate:n}=ct;return(n?.clearTimeout||clearTimeout)(t)},delegate:void 0};function zt(t){ct.setTimeout(()=>{const{onUnhandledError:n}=Ie;if(!n)throw t;n(t)})}function Ot(){}const Ut=le("C",void 0,void 0);function le(t,n,e){return{kind:t,value:n,error:e}}let Xe=null;function Ee(t){if(Ie.useDeprecatedSynchronousErrorHandling){const n=!Xe;if(n&&(Xe={errorThrown:!1,error:null}),t(),n){const{errorThrown:e,error:i}=Xe;if(Xe=null,e)throw i}}else t()}class xe extends ${constructor(n){super(),this.isStopped=!1,n?(this.destination=n,Re(n)&&n.add(this)):this.destination=vn}static create(n,e,i){return new Lt(n,e,i)}next(n){this.isStopped?Mi(function St(t){return le("N",t,void 0)}(n),this):this._next(n)}error(n){this.isStopped?Mi(function At(t){return le("E",void 0,t)}(n),this):(this.isStopped=!0,this._error(n))}complete(){this.isStopped?Mi(Ut,this):(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe(),this.destination=null)}_next(n){this.destination.next(n)}_error(n){try{this.destination.error(n)}finally{this.unsubscribe()}}_complete(){try{this.destination.complete()}finally{this.unsubscribe()}}}const ht=Function.prototype.bind;function ot(t,n){return ht.call(t,n)}class ft{constructor(n){this.partialObserver=n}next(n){const{partialObserver:e}=this;if(e.next)try{e.next(n)}catch(i){yn(i)}}error(n){const{partialObserver:e}=this;if(e.error)try{e.error(n)}catch(i){yn(i)}else yn(n)}complete(){const{partialObserver:n}=this;if(n.complete)try{n.complete()}catch(e){yn(e)}}}class Lt extends xe{constructor(n,e,i){let r;if(super(),it(n)||!n)r={next:n??void 0,error:e??void 0,complete:i??void 0};else{let s;this&&Ie.useDeprecatedNextContext?(s=Object.create(n),s.unsubscribe=()=>this.unsubscribe(),r={next:n.next&&ot(n.next,s),error:n.error&&ot(n.error,s),complete:n.complete&&ot(n.complete,s)}):r=n}this.destination=new ft(r)}}function yn(t){Ie.useDeprecatedSynchronousErrorHandling?function Ne(t){Ie.useDeprecatedSynchronousErrorHandling&&Xe&&(Xe.errorThrown=!0,Xe.error=t)}(t):zt(t)}function Mi(t,n){const{onStoppedNotification:e}=Ie;e&&ct.setTimeout(()=>e(t,n))}const vn={closed:!0,next:Ot,error:function On(t){throw t},complete:Ot},co="function"==typeof Symbol&&Symbol.observable||"@@observable";function Nr(t){return t}function Ms(t){return 0===t.length?Nr:1===t.length?t[0]:function(e){return t.reduce((i,r)=>r(i),e)}}let xn=(()=>{class t{constructor(e){e&&(this._subscribe=e)}lift(e){const i=new t;return i.source=this,i.operator=e,i}subscribe(e,i,r){const s=function Ss(t){return t&&t instanceof xe||function Nl(t){return t&&it(t.next)&&it(t.error)&&it(t.complete)}(t)&&Re(t)}(e)?e:new Lt(e,i,r);return Ee(()=>{const{operator:d,source:_}=this;s.add(d?d.call(s,_):_?this._subscribe(s):this._trySubscribe(s))}),s}_trySubscribe(e){try{return this._subscribe(e)}catch(i){e.error(i)}}forEach(e,i){return new(i=Pa(i))((r,s)=>{const d=new Lt({next:_=>{try{e(_)}catch(w){s(w),d.unsubscribe()}},error:s,complete:r});this.subscribe(d)})}_subscribe(e){var i;return null===(i=this.source)||void 0===i?void 0:i.subscribe(e)}[co](){return this}pipe(...e){return Ms(e)(this)}toPromise(e){return new(e=Pa(e))((i,r)=>{let s;this.subscribe(d=>s=d,d=>r(d),()=>i(s))})}}return t.create=n=>new t(n),t})();function Pa(t){var n;return null!==(n=t??Ie.Promise)&&void 0!==n?n:Promise}const Bo=tt(t=>function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"});let Zt=(()=>{class t extends xn{constructor(){super(),this.closed=!1,this.currentObservers=null,this.observers=[],this.isStopped=!1,this.hasError=!1,this.thrownError=null}lift(e){const i=new ca(this,this);return i.operator=e,i}_throwIfClosed(){if(this.closed)throw new Bo}next(e){Ee(()=>{if(this._throwIfClosed(),!this.isStopped){this.currentObservers||(this.currentObservers=Array.from(this.observers));for(const i of this.currentObservers)i.next(e)}})}error(e){Ee(()=>{if(this._throwIfClosed(),!this.isStopped){this.hasError=this.isStopped=!0,this.thrownError=e;const{observers:i}=this;for(;i.length;)i.shift().error(e)}})}complete(){Ee(()=>{if(this._throwIfClosed(),!this.isStopped){this.isStopped=!0;const{observers:e}=this;for(;e.length;)e.shift().complete()}})}unsubscribe(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null}get observed(){var e;return(null===(e=this.observers)||void 0===e?void 0:e.length)>0}_trySubscribe(e){return this._throwIfClosed(),super._trySubscribe(e)}_subscribe(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)}_innerSubscribe(e){const{hasError:i,isStopped:r,observers:s}=this;return i||r?me:(this.currentObservers=null,s.push(e),new $(()=>{this.currentObservers=null,h(s,e)}))}_checkFinalizedStatuses(e){const{hasError:i,thrownError:r,isStopped:s}=this;i?e.error(r):s&&e.complete()}asObservable(){const e=new xn;return e.source=this,e}}return t.create=(n,e)=>new ca(n,e),t})();class ca extends Zt{constructor(n,e){super(),this.destination=n,this.source=e}next(n){var e,i;null===(i=null===(e=this.destination)||void 0===e?void 0:e.next)||void 0===i||i.call(e,n)}error(n){var e,i;null===(i=null===(e=this.destination)||void 0===e?void 0:e.error)||void 0===i||i.call(e,n)}complete(){var n,e;null===(e=null===(n=this.destination)||void 0===n?void 0:n.complete)||void 0===e||e.call(n)}_subscribe(n){var e,i;return null!==(i=null===(e=this.source)||void 0===e?void 0:e.subscribe(n))&&void 0!==i?i:me}}function Mo(t){return it(t?.lift)}function bi(t){return n=>{if(Mo(n))return n.lift(function(e){try{return t(e,this)}catch(i){this.error(i)}});throw new TypeError("Unable to lift unknown Observable type")}}function Nn(t,n,e,i,r){return new Cr(t,n,e,i,r)}class Cr extends xe{constructor(n,e,i,r,s,d){super(n),this.onFinalize=s,this.shouldUnsubscribe=d,this._next=e?function(_){try{e(_)}catch(w){n.error(w)}}:super._next,this._error=r?function(_){try{r(_)}catch(w){n.error(w)}finally{this.unsubscribe()}}:super._error,this._complete=i?function(){try{i()}catch(_){n.error(_)}finally{this.unsubscribe()}}:super._complete}unsubscribe(){var n;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){const{closed:e}=this;super.unsubscribe(),!e&&(null===(n=this.onFinalize)||void 0===n||n.call(this))}}}function Jt(t,n){return bi((e,i)=>{let r=0;e.subscribe(Nn(i,s=>{i.next(t.call(n,s,r++))}))})}function Es(t){return this instanceof Es?(this.v=t,this):new Es(t)}function rl(t,n,e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,i=e.apply(t,n||[]),s=[];return r={},d("next"),d("throw"),d("return"),r[Symbol.asyncIterator]=function(){return this},r;function d(H){i[H]&&(r[H]=function(Y){return new Promise(function(ae,ve){s.push([H,Y,ae,ve])>1||_(H,Y)})})}function _(H,Y){try{!function w(H){H.value instanceof Es?Promise.resolve(H.value.v).then(S,I):L(s[0][2],H)}(i[H](Y))}catch(ae){L(s[0][3],ae)}}function S(H){_("next",H)}function I(H){_("throw",H)}function L(H,Y){H(Y),s.shift(),s.length&&_(s[0][0],s[0][1])}}function Du(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e,n=t[Symbol.asyncIterator];return n?n.call(t):(t=function Oa(t){var n="function"==typeof Symbol&&Symbol.iterator,e=n&&t[n],i=0;if(e)return e.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&i>=t.length&&(t=void 0),{value:t&&t[i++],done:!t}}};throw new TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")}(t),e={},i("next"),i("throw"),i("return"),e[Symbol.asyncIterator]=function(){return this},e);function i(s){e[s]=t[s]&&function(d){return new Promise(function(_,w){!function r(s,d,_,w){Promise.resolve(w).then(function(S){s({value:S,done:_})},d)}(_,w,(d=t[s](d)).done,d.value)})}}}const Tc=t=>t&&"number"==typeof t.length&&"function"!=typeof t;function Ul(t){return it(t?.then)}function ol(t){return it(t[co])}function jl(t){return Symbol.asyncIterator&&it(t?.[Symbol.asyncIterator])}function Ts(t){return new TypeError(`You provided ${null!==t&&"object"==typeof t?"an invalid object":`'${t}'`} where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.`)}const Ac=function sl(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}();function ie(t){return it(t?.[Ac])}function V(t){return rl(this,arguments,function*(){const e=t.getReader();try{for(;;){const{value:i,done:r}=yield Es(e.read());if(r)return yield Es(void 0);yield yield Es(i)}}finally{e.releaseLock()}})}function j(t){return it(t?.getReader)}function J(t){if(t instanceof xn)return t;if(null!=t){if(ol(t))return function de(t){return new xn(n=>{const e=t[co]();if(it(e.subscribe))return e.subscribe(n);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}(t);if(Tc(t))return function be(t){return new xn(n=>{for(let e=0;e{t.then(e=>{n.closed||(n.next(e),n.complete())},e=>n.error(e)).then(null,zt)})}(t);if(jl(t))return Ce(t);if(ie(t))return function Oe(t){return new xn(n=>{for(const e of t)if(n.next(e),n.closed)return;n.complete()})}(t);if(j(t))return function Ve(t){return Ce(V(t))}(t)}throw Ts(t)}function Ce(t){return new xn(n=>{(function yt(t,n){var e,i,r,s;return function il(t,n,e,i){return new(e||(e=Promise))(function(s,d){function _(I){try{S(i.next(I))}catch(L){d(L)}}function w(I){try{S(i.throw(I))}catch(L){d(L)}}function S(I){I.done?s(I.value):function r(s){return s instanceof e?s:new e(function(d){d(s)})}(I.value).then(_,w)}S((i=i.apply(t,n||[])).next())})}(this,void 0,void 0,function*(){try{for(e=Du(t);!(i=yield e.next()).done;)if(n.next(i.value),n.closed)return}catch(d){r={error:d}}finally{try{i&&!i.done&&(s=e.return)&&(yield s.call(e))}finally{if(r)throw r.error}}n.complete()})})(t,n).catch(e=>n.error(e))})}function Pt(t,n,e,i=0,r=!1){const s=n.schedule(function(){e(),r?t.add(this.schedule(null,i)):this.unsubscribe()},i);if(t.add(s),!r)return s}function Yt(t,n,e=1/0){return it(n)?Yt((i,r)=>Jt((s,d)=>n(i,s,r,d))(J(t(i,r))),e):("number"==typeof n&&(e=n),bi((i,r)=>function wt(t,n,e,i,r,s,d,_){const w=[];let S=0,I=0,L=!1;const H=()=>{L&&!w.length&&!S&&n.complete()},Y=ve=>S{s&&n.next(ve),S++;let Be=!1;J(e(ve,I++)).subscribe(Nn(n,$e=>{r?.($e),s?Y($e):n.next($e)},()=>{Be=!0},void 0,()=>{if(Be)try{for(S--;w.length&&Sae($e)):ae($e)}H()}catch($e){n.error($e)}}))};return t.subscribe(Nn(n,Y,()=>{L=!0,H()})),()=>{_?.()}}(i,r,t,e)))}function rn(t=1/0){return Yt(Nr,t)}const Kt=new xn(t=>t.complete());function vi(t){return t&&it(t.schedule)}function an(t){return t[t.length-1]}function Ni(t){return it(an(t))?t.pop():void 0}function Ii(t){return vi(an(t))?t.pop():void 0}function Fa(t,n=0){return bi((e,i)=>{e.subscribe(Nn(i,r=>Pt(i,t,()=>i.next(r),n),()=>Pt(i,t,()=>i.complete(),n),r=>Pt(i,t,()=>i.error(r),n)))})}function cs(t,n=0){return bi((e,i)=>{i.add(t.schedule(()=>e.subscribe(i),n))})}function lm(t,n){if(!t)throw new Error("Iterable cannot be null");return new xn(e=>{Pt(e,n,()=>{const i=t[Symbol.asyncIterator]();Pt(e,n,()=>{i.next().then(r=>{r.done?e.complete():e.next(r.value)})},0,!0)})})}function Mr(t,n){return n?function jd(t,n){if(null!=t){if(ol(t))return function at(t,n){return J(t).pipe(cs(n),Fa(n))}(t,n);if(Tc(t))return function Pr(t,n){return new xn(e=>{let i=0;return n.schedule(function(){i===t.length?e.complete():(e.next(t[i++]),e.closed||this.schedule())})})}(t,n);if(Ul(t))return function La(t,n){return J(t).pipe(cs(n),Fa(n))}(t,n);if(jl(t))return lm(t,n);if(ie(t))return function Ba(t,n){return new xn(e=>{let i;return Pt(e,n,()=>{i=t[Ac](),Pt(e,n,()=>{let r,s;try{({value:r,done:s}=i.next())}catch(d){return void e.error(d)}s?e.complete():e.next(r)},0,!0)}),()=>it(i?.return)&&i.return()})}(t,n);if(j(t))return function us(t,n){return lm(V(t),n)}(t,n)}throw Ts(t)}(t,n):J(t)}function mr(...t){const n=Ii(t),e=function pa(t,n){return"number"==typeof an(t)?t.pop():n}(t,1/0),i=t;return i.length?1===i.length?J(i[0]):rn(e)(Mr(i,n)):Kt}function Vt(t={}){const{connector:n=(()=>new Zt),resetOnError:e=!0,resetOnComplete:i=!0,resetOnRefCountZero:r=!0}=t;return s=>{let d,_,w,S=0,I=!1,L=!1;const H=()=>{_?.unsubscribe(),_=void 0},Y=()=>{H(),d=w=void 0,I=L=!1},ae=()=>{const ve=d;Y(),ve?.unsubscribe()};return bi((ve,Be)=>{S++,!L&&!I&&H();const $e=w=w??n();Be.add(()=>{S--,0===S&&!L&&!I&&(_=ti(ae,r))}),$e.subscribe(Be),!d&&S>0&&(d=new Lt({next:It=>$e.next(It),error:It=>{L=!0,H(),_=ti(Y,e,It),$e.error(It)},complete:()=>{I=!0,H(),_=ti(Y,i),$e.complete()}}),J(ve).subscribe(d))})(s)}}function ti(t,n,...e){if(!0===n)return void t();if(!1===n)return;const i=new Lt({next:()=>{i.unsubscribe(),t()}});return J(n(...e)).subscribe(i)}function on(t){for(let n in t)if(t[n]===on)return n;throw Error("Could not find renamed property on target object.")}function ds(t,n){for(const e in n)n.hasOwnProperty(e)&&!t.hasOwnProperty(e)&&(t[e]=n[e])}function ki(t){if("string"==typeof t)return t;if(Array.isArray(t))return"["+t.map(ki).join(", ")+"]";if(null==t)return""+t;if(t.overriddenName)return`${t.overriddenName}`;if(t.name)return`${t.name}`;const n=t.toString();if(null==n)return""+n;const e=n.indexOf("\n");return-1===e?n:n.substring(0,e)}function Zn(t,n){return null==t||""===t?null===n?"":n:null==n||""===n?t:t+" "+n}const Iu=on({__forward_ref__:on});function ni(t){return t.__forward_ref__=ni,t.toString=function(){return ki(this())},t}function Mn(t){return zr(t)?t():t}function zr(t){return"function"==typeof t&&t.hasOwnProperty(Iu)&&t.__forward_ref__===ni}function lr(t){return t&&!!t.\u0275providers}const al="https://g.co/ng/security#xss";class mt extends Error{constructor(n,e){super(function ll(t,n){return`NG0${Math.abs(t)}${n?": "+n.trim():""}`}(n,e)),this.code=n}}function Gn(t){return"string"==typeof t?t:null==t?"":String(t)}function Ic(t,n){throw new mt(-201,!1)}function ho(t,n){null==t&&function Pi(t,n,e,i){throw new Error(`ASSERTION ERROR: ${t}`+(null==i?"":` [Expected=> ${e} ${i} ${n} <=Actual]`))}(n,t,null,"!=")}function rt(t){return{token:t.token,providedIn:t.providedIn||null,factory:t.factory,value:void 0}}function nn(t){return{providers:t.providers||[],imports:t.imports||[]}}function Hl(t){return $l(t,Wl)||$l(t,mp)}function $l(t,n){return t.hasOwnProperty(n)?t[n]:null}function Kr(t){return t&&(t.hasOwnProperty(ql)||t.hasOwnProperty(pm))?t[ql]:null}const Wl=on({\u0275prov:on}),ql=on({\u0275inj:on}),mp=on({ngInjectableDef:on}),pm=on({ngInjectorDef:on});var Tn=(()=>((Tn=Tn||{})[Tn.Default=0]="Default",Tn[Tn.Host=1]="Host",Tn[Tn.Self=2]="Self",Tn[Tn.SkipSelf=4]="SkipSelf",Tn[Tn.Optional=8]="Optional",Tn))();let Zd;function So(t){const n=Zd;return Zd=t,n}function Yd(t,n,e){const i=Hl(t);return i&&"root"==i.providedIn?void 0===i.value?i.value=i.factory():i.value:e&Tn.Optional?null:void 0!==n?n:void Ic(ki(t))}const ji=(()=>typeof globalThis<"u"&&globalThis||typeof global<"u"&&global||typeof window<"u"&&window||typeof self<"u"&&typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&self)(),Rc={},Zl="__NG_DI_FLAG__",Pc="ngTempTokenPath",Kd=/\n/gm,Fu="__source";let Xl;function za(t){const n=Xl;return Xl=t,n}function Yl(t,n=Tn.Default){if(void 0===Xl)throw new mt(-203,!1);return null===Xl?Yd(t,void 0,n):Xl.get(t,n&Tn.Optional?null:void 0,n)}function we(t,n=Tn.Default){return(function Xd(){return Zd}()||Yl)(Mn(t),n)}function Fn(t,n=Tn.Default){return we(t,Kl(n))}function Kl(t){return typeof t>"u"||"number"==typeof t?t:0|(t.optional&&8)|(t.host&&1)|(t.self&&2)|(t.skipSelf&&4)}function ci(t){const n=[];for(let e=0;e((As=As||{})[As.OnPush=0]="OnPush",As[As.Default=1]="Default",As))(),Qo=(()=>{return(t=Qo||(Qo={}))[t.Emulated=0]="Emulated",t[t.None=2]="None",t[t.ShadowDom=3]="ShadowDom",Qo;var t})();const Is={},Di=[],Fc=on({\u0275cmp:on}),Qd=on({\u0275dir:on}),Jd=on({\u0275pipe:on}),gm=on({\u0275mod:on}),hs=on({\u0275fac:on}),fa=on({__NG_ELEMENT_ID__:on});let _m=0;function Rn(t){return Hs(()=>{const e=!0===t.standalone,i={},r={type:t.type,providersResolver:null,decls:t.decls,vars:t.vars,factory:null,template:t.template||null,consts:t.consts||null,ngContentSelectors:t.ngContentSelectors,hostBindings:t.hostBindings||null,hostVars:t.hostVars||0,hostAttrs:t.hostAttrs||null,contentQueries:t.contentQueries||null,declaredInputs:i,inputs:null,outputs:null,exportAs:t.exportAs||null,onPush:t.changeDetection===As.OnPush,directiveDefs:null,pipeDefs:null,standalone:e,dependencies:e&&t.dependencies||null,getStandaloneInjector:null,selectors:t.selectors||Di,viewQuery:t.viewQuery||null,features:t.features||null,data:t.data||{},encapsulation:t.encapsulation||Qo.Emulated,id:"c"+_m++,styles:t.styles||Di,_:null,setInput:null,schemas:t.schemas||null,tView:null,findHostDirectiveDefs:null,hostDirectives:null},s=t.dependencies,d=t.features;return r.inputs=vp(t.inputs,i),r.outputs=vp(t.outputs),d&&d.forEach(_=>_(r)),r.directiveDefs=s?()=>("function"==typeof s?s():s).map($s).filter(Bu):null,r.pipeDefs=s?()=>("function"==typeof s?s():s).map(Qr).filter(Bu):null,r})}function $s(t){return Ei(t)||po(t)}function Bu(t){return null!==t}function cn(t){return Hs(()=>({type:t.type,bootstrap:t.bootstrap||Di,declarations:t.declarations||Di,imports:t.imports||Di,exports:t.exports||Di,transitiveCompileScopes:null,schemas:t.schemas||null,id:t.id||null}))}function vp(t,n){if(null==t)return Is;const e={};for(const i in t)if(t.hasOwnProperty(i)){let r=t[i],s=r;Array.isArray(r)&&(s=r[1],r=r[0]),e[r]=i,n&&(n[r]=s)}return e}const Ge=Rn;function No(t){return{type:t.type,name:t.name,factory:null,pure:!1!==t.pure,standalone:!0===t.standalone,onDestroy:t.type.prototype.ngOnDestroy||null}}function Ei(t){return t[Fc]||null}function po(t){return t[Qd]||null}function Qr(t){return t[Jd]||null}function zo(t,n){const e=t[gm]||null;if(!e&&!0===n)throw new Error(`Type ${ki(t)} does not have '\u0275mod' property.`);return e}function Jr(t){return Array.isArray(t)&&"object"==typeof t[1]}function fs(t){return Array.isArray(t)&&!0===t[1]}function nh(t){return 0!=(4&t.flags)}function Ql(t){return t.componentOffset>-1}function Gc(t){return 1==(1&t.flags)}function es(t){return null!==t.template}function Vu(t){return 0!=(256&t[2])}function ec(t,n){return t.hasOwnProperty(hs)?t[hs]:null}class vm{constructor(n,e,i){this.previousValue=n,this.currentValue=e,this.firstChange=i}isFirstChange(){return this.firstChange}}function Hi(){return ah}function ah(t){return t.type.prototype.ngOnChanges&&(t.setInput=bm),lh}function lh(){const t=Uc(this),n=t?.current;if(n){const e=t.previous;if(e===Is)t.previous=n;else for(let i in n)e[i]=n[i];t.current=null,this.ngOnChanges(n)}}function bm(t,n,e,i){const r=this.declaredInputs[e],s=Uc(t)||function xm(t,n){return t[$u]=n}(t,{previous:Is,current:null}),d=s.current||(s.current={}),_=s.previous,w=_[r];d[r]=new vm(w&&w.currentValue,n,_===Is),t[i]=n}Hi.ngInherit=!0;const $u="__ngSimpleChanges__";function Uc(t){return t[$u]||null}function Gr(t){for(;Array.isArray(t);)t=t[0];return t}function Zu(t,n){return Gr(n[t])}function ts(t,n){return Gr(n[t.index])}function Mp(t,n){return t.data[n]}function tc(t,n){return t[n]}function or(t,n){const e=n[t];return Jr(e)?e:e[0]}function jc(t){return 64==(64&t[2])}function vl(t,n){return null==n?null:t[n]}function _a(t){t[18]=0}function uh(t,n){t[5]+=n;let e=t,i=t[3];for(;null!==i&&(1===n&&1===e[5]||-1===n&&0===e[5]);)i[5]+=n,e=i,i=i[3]}const zn={lFrame:O(null),bindingsEnabled:!0};function Ua(){return zn.bindingsEnabled}function Dt(){return zn.lFrame.lView}function mi(){return zn.lFrame.tView}function Wn(t){return zn.lFrame.contextLView=t,t[8]}function qn(t){return zn.lFrame.contextLView=null,t}function Ur(){let t=nc();for(;null!==t&&64===t.type;)t=t.parent;return t}function nc(){return zn.lFrame.currentTNode}function gs(t,n){const e=zn.lFrame;e.currentTNode=t,e.isParent=n}function dh(){return zn.lFrame.isParent}function Yu(){zn.lFrame.isParent=!1}function Do(){const t=zn.lFrame;let n=t.bindingRootIndex;return-1===n&&(n=t.bindingRootIndex=t.tView.bindingStartIndex),n}function ic(){return zn.lFrame.bindingIndex++}function va(t){const n=zn.lFrame,e=n.bindingIndex;return n.bindingIndex=n.bindingIndex+t,e}function m(t,n){const e=zn.lFrame;e.bindingIndex=e.bindingRootIndex=t,p(n)}function p(t){zn.lFrame.currentDirectiveIndex=t}function y(t){const n=zn.lFrame.currentDirectiveIndex;return-1===n?null:t[n]}function b(){return zn.lFrame.currentQueryIndex}function C(t){zn.lFrame.currentQueryIndex=t}function E(t){const n=t[1];return 2===n.type?n.declTNode:1===n.type?t[6]:null}function T(t,n,e){if(e&Tn.SkipSelf){let r=n,s=t;for(;!(r=r.parent,null!==r||e&Tn.Host||(r=E(s),null===r||(s=s[15],10&r.type))););if(null===r)return!1;n=r,t=s}const i=zn.lFrame=F();return i.currentTNode=n,i.lView=t,!0}function k(t){const n=F(),e=t[1];zn.lFrame=n,n.currentTNode=e.firstChild,n.lView=t,n.tView=e,n.contextLView=t,n.bindingIndex=e.bindingStartIndex,n.inI18n=!1}function F(){const t=zn.lFrame,n=null===t?null:t.child;return null===n?O(t):n}function O(t){const n={currentTNode:null,isParent:!0,lView:null,tView:null,selectedIndex:-1,contextLView:null,elementDepthCount:0,currentNamespace:null,currentDirectiveIndex:-1,bindingRootIndex:-1,bindingIndex:-1,currentQueryIndex:0,parent:t,child:null,inI18n:!1};return null!==t&&(t.child=n),n}function G(){const t=zn.lFrame;return zn.lFrame=t.parent,t.currentTNode=null,t.lView=null,t}const W=G;function Q(){const t=G();t.isParent=!0,t.tView=null,t.selectedIndex=-1,t.contextLView=null,t.elementDepthCount=0,t.currentDirectiveIndex=-1,t.currentNamespace=null,t.bindingRootIndex=-1,t.bindingIndex=-1,t.currentQueryIndex=0}function q(){return zn.lFrame.selectedIndex}function X(t){zn.lFrame.selectedIndex=t}function ee(){const t=zn.lFrame;return Mp(t.tView,t.selectedIndex)}function te(){zn.lFrame.currentNamespace="svg"}function _e(){!function ge(){zn.lFrame.currentNamespace=null}()}function ze(t,n){for(let e=n.directiveStart,i=n.directiveEnd;e=i)break}else n[w]<0&&(t[18]+=65536),(_>11>16&&(3&t[2])===n){t[2]+=2048;try{s.call(_)}finally{}}}else try{s.call(_)}finally{}}class Ke{constructor(n,e,i){this.factory=n,this.resolving=!1,this.canSeeViewProviders=e,this.injectImpl=i}}function Un(t,n,e){let i=0;for(;in){d=s-1;break}}}for(;s>16}(t),i=n;for(;e>0;)i=i[15],e--;return i}let go=!0;function _s(t){const n=go;return go=t,n}let Er=0;const gr={};function eo(t,n){const e=ba(t,n);if(-1!==e)return e;const i=n[1];i.firstCreatePass&&(t.injectorIndex=n.length,rc(i.data,t),rc(n,null),rc(i.blueprint,null));const r=to(t,n),s=t.injectorIndex;if(zi(r)){const d=xi(r),_=Eo(r,n),w=_[1].data;for(let S=0;S<8;S++)n[s+S]=_[d+S]|w[d+S]}return n[s+8]=r,s}function rc(t,n){t.push(0,0,0,0,0,0,0,0,n)}function ba(t,n){return-1===t.injectorIndex||t.parent&&t.parent.injectorIndex===t.injectorIndex||null===n[t.injectorIndex+8]?-1:t.injectorIndex}function to(t,n){if(t.parent&&-1!==t.parent.injectorIndex)return t.parent.injectorIndex;let e=0,i=null,r=n;for(;null!==r;){if(i=X_(r),null===i)return-1;if(e++,r=r[15],-1!==i.injectorIndex)return i.injectorIndex|e<<16}return-1}function is(t,n,e){!function er(t,n,e){let i;"string"==typeof e?i=e.charCodeAt(0)||0:e.hasOwnProperty(fa)&&(i=e[fa]),null==i&&(i=e[fa]=Er++);const r=255&i;n.data[t+(r>>5)]|=1<=0?255&n:H0:n}(e);if("function"==typeof s){if(!T(n,t,i))return i&Tn.Host?Xs(r,0,i):$c(n,e,i,r);try{const d=s(i);if(null!=d||i&Tn.Optional)return d;Ic()}finally{W()}}else if("number"==typeof s){let d=null,_=ba(t,n),w=-1,S=i&Tn.Host?n[16][6]:null;for((-1===_||i&Tn.SkipSelf)&&(w=-1===_?to(t,n):n[_+8],-1!==w&&Z_(i,!1)?(d=n[1],_=xi(w),n=Eo(w,n)):_=-1);-1!==_;){const I=n[1];if(q_(s,_,I.data)){const L=Ap(_,n,e,d,i,S);if(L!==gr)return L}w=n[_+8],-1!==w&&Z_(i,n[1].data[_+8]===S)&&q_(s,_,n)?(d=I,_=xi(w),n=Eo(w,n)):_=-1}}return r}function Ap(t,n,e,i,r,s){const d=n[1],_=d.data[t+8],I=Ku(_,d,e,null==i?Ql(_)&&go:i!=d&&0!=(3&_.type),r&Tn.Host&&s===_);return null!==I?Wc(n,d,I,_):gr}function Ku(t,n,e,i,r){const s=t.providerIndexes,d=n.data,_=1048575&s,w=t.directiveStart,I=s>>20,H=r?_+I:t.directiveEnd;for(let Y=i?_:_+I;Y=w&&ae.type===e)return Y}if(r){const Y=d[w];if(Y&&es(Y)&&Y.type===e)return w}return null}function Wc(t,n,e,i){let r=t[e];const s=n.data;if(function gt(t){return t instanceof Ke}(r)){const d=r;d.resolving&&function cl(t,n){const e=n?`. Dependency path: ${n.join(" > ")} > ${t}`:"";throw new mt(-200,`Circular dependency in DI detected for ${t}${e}`)}(function Ri(t){return"function"==typeof t?t.name||t.toString():"object"==typeof t&&null!=t&&"function"==typeof t.type?t.type.name||t.type.toString():Gn(t)}(s[e]));const _=_s(d.canSeeViewProviders);d.resolving=!0;const w=d.injectImpl?So(d.injectImpl):null;T(t,i,Tn.Default);try{r=t[e]=d.factory(void 0,s,t,i),n.firstCreatePass&&e>=i.directiveStart&&function We(t,n,e){const{ngOnChanges:i,ngOnInit:r,ngDoCheck:s}=n.type.prototype;if(i){const d=ah(n);(e.preOrderHooks||(e.preOrderHooks=[])).push(t,d),(e.preOrderCheckHooks||(e.preOrderCheckHooks=[])).push(t,d)}r&&(e.preOrderHooks||(e.preOrderHooks=[])).push(0-t,r),s&&((e.preOrderHooks||(e.preOrderHooks=[])).push(t,s),(e.preOrderCheckHooks||(e.preOrderCheckHooks=[])).push(t,s))}(e,s[e],n)}finally{null!==w&&So(w),_s(_),d.resolving=!1,W()}}return r}function q_(t,n,e){return!!(e[n+(t>>5)]&1<{const n=t.prototype.constructor,e=n[hs]||Dm(n),i=Object.prototype;let r=Object.getPrototypeOf(t.prototype).constructor;for(;r&&r!==i;){const s=r[hs]||Dm(r);if(s&&s!==e)return s;r=Object.getPrototypeOf(r)}return s=>new s})}function Dm(t){return zr(t)?()=>{const n=Dm(Mn(t));return n&&n()}:ec(t)}function X_(t){const n=t[1],e=n.type;return 2===e?n.declTNode:1===e?t[6]:null}function wa(t){return function xa(t,n){if("class"===n)return t.classes;if("style"===n)return t.styles;const e=t.attrs;if(e){const i=e.length;let r=0;for(;r{const i=function Em(t){return function(...e){if(t){const i=t(...e);for(const r in i)this[r]=i[r]}}}(n);function r(...s){if(this instanceof r)return i.apply(this,s),this;const d=new r(...s);return _.annotation=d,_;function _(w,S,I){const L=w.hasOwnProperty(fh)?w[fh]:Object.defineProperty(w,fh,{value:[]})[fh];for(;L.length<=I;)L.push(null);return(L[I]=L[I]||[]).push(d),w}}return e&&(r.prototype=Object.create(e.prototype)),r.prototype.ngMetadataName=t,r.annotationCls=r,r})}class vt{constructor(n,e){this._desc=n,this.ngMetadataName="InjectionToken",this.\u0275prov=void 0,"number"==typeof e?this.__NG_ELEMENT_ID__=e:void 0!==e&&(this.\u0275prov=rt({token:this,providedIn:e.providedIn||"root",factory:e.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}}function Ps(t,n){t.forEach(e=>Array.isArray(e)?Ps(e,n):n(e))}function Xc(t,n,e){n>=t.length?t.push(e):t.splice(n,0,e)}function Am(t,n){return n>=t.length-1?t.pop():t.splice(n,1)[0]}function kp(t,n){const e=[];for(let i=0;i=0?t[1|i]=e:(i=~i,function Z0(t,n,e,i){let r=t.length;if(r==n)t.push(e,i);else if(1===r)t.push(i,t[0]),t[0]=e;else{for(r--,t.push(t[r-1],t[r]);r>n;)t[r]=t[r-2],r--;t[n]=e,t[n+1]=i}}(t,i,n,e)),i}function ey(t,n){const e=mh(t,n);if(e>=0)return t[1|e]}function mh(t,n){return function wn(t,n,e){let i=0,r=t.length>>e;for(;r!==i;){const s=i+(r-i>>1),d=t[s<n?r=s:i=s+1}return~(r<({token:t})),-1),$i=hl(Ju("Optional"),8),Hr=hl(Ju("SkipSelf"),4);var rs=(()=>((rs=rs||{})[rs.Important=1]="Important",rs[rs.DashCase=2]="DashCase",rs))();const Lp=new Map;let ob=0;const rd="__ngContext__";function tr(t,n){Jr(n)?(t[rd]=n[20],function vh(t){Lp.set(t[20],t)}(n)):t[rd]=n}function Vm(t,n){return undefined(t,n)}function xh(t){const n=t[3];return fs(n)?n[3]:n}function Np(t){return Uo(t[13])}function zp(t){return Uo(t[4])}function Uo(t){for(;null!==t&&!fs(t);)t=t[4];return t}function sd(t,n,e,i,r){if(null!=i){let s,d=!1;fs(i)?s=i:Jr(i)&&(d=!0,i=i[0]);const _=Gr(i);0===t&&null!==e?null==r?wh(n,e,_):Js(n,e,_,r||null,!0):1===t&&null!==e?Js(n,e,_,r||null,!0):2===t?function Ch(t,n,e){const i=Gm(t,n);i&&function S1(t,n,e,i){t.removeChild(n,e,i)}(t,i,n,e)}(n,_,d):3===t&&n.destroyNode(_),null!=s&&function Hp(t,n,e,i,r){const s=e[7];s!==Gr(e)&&sd(n,t,i,s,r);for(let _=10;_0&&(t[e-1][4]=i[4]);const s=Am(t,10+n);!function db(t,n){lc(t,n,n[11],2,null,null),n[0]=null,n[6]=null}(i[1],i);const d=s[19];null!==d&&d.detachView(s[1]),i[3]=null,i[4]=null,i[2]&=-65}return i}function mb(t,n){if(!(128&n[2])){const e=n[11];e.destroyNode&&lc(t,n,e,3,null,null),function py(t){let n=t[13];if(!n)return fy(t[1],t);for(;n;){let e=null;if(Jr(n))e=n[13];else{const i=n[10];i&&(e=i)}if(!e){for(;n&&!n[4]&&n!==t;)Jr(n)&&fy(n[1],n),n=n[3];null===n&&(n=t),Jr(n)&&fy(n[1],n),e=n&&n[4]}n=e}}(n)}}function fy(t,n){if(!(128&n[2])){n[2]&=-65,n[2]|=128,function Gp(t,n){let e;if(null!=t&&null!=(e=t.destroyHooks))for(let i=0;i=0?i[r=d]():i[r=-d].unsubscribe(),s+=2}else{const d=i[r=e[s+1]];e[s].call(d)}if(null!==i){for(let s=r+1;s-1){const{encapsulation:s}=t.data[i.directiveStart+r];if(s===Qo.None||s===Qo.Emulated)return null}return ts(i,e)}}(t,n.parent,e)}function Js(t,n,e,i,r){t.insertBefore(n,e,i,r)}function wh(t,n,e){t.appendChild(n,e)}function gb(t,n,e,i,r){null!==i?Js(t,n,e,i,r):wh(t,n,e)}function Gm(t,n){return t.parentNode(n)}function _b(t,n,e){return Um(t,n,e)}let eu,Cy,Wm,Um=function yb(t,n,e){return 40&t.type?ts(t,e):null};function jm(t,n,e,i){const r=Up(t,i,n),s=n[11],_=_b(i.parent||n[6],i,n);if(null!=r)if(Array.isArray(e))for(let w=0;wt,createScript:t=>t,createScriptURL:t=>t})}catch{}return eu}()?.createHTML(t)||t}function My(){if(void 0===Wm&&(Wm=null,ji.trustedTypes))try{Wm=ji.trustedTypes.createPolicy("angular#unsafe-bypass",{createHTML:t=>t,createScript:t=>t,createScriptURL:t=>t})}catch{}return Wm}function Cb(t){return My()?.createHTML(t)||t}function Mb(t){return My()?.createScriptURL(t)||t}class tu{constructor(n){this.changingThisBreaksApplicationSecurity=n}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see ${al})`}}class Sh extends tu{getTypeName(){return"HTML"}}class A1 extends tu{getTypeName(){return"Style"}}class I1 extends tu{getTypeName(){return"Script"}}class k1 extends tu{getTypeName(){return"URL"}}class Sb extends tu{getTypeName(){return"ResourceURL"}}function Ls(t){return t instanceof tu?t.changingThisBreaksApplicationSecurity:t}function wl(t,n){const e=function R1(t){return t instanceof tu&&t.getTypeName()||null}(t);if(null!=e&&e!==n){if("ResourceURL"===e&&"URL"===n)return!0;throw new Error(`Required a safe ${n}, got a ${e} (see ${al})`)}return e===n}class Wp{constructor(n){this.inertDocumentHelper=n}getInertBodyElement(n){n=""+n;try{const e=(new window.DOMParser).parseFromString(cc(n),"text/html").body;return null===e?this.inertDocumentHelper.getInertBodyElement(n):(e.removeChild(e.firstChild),e)}catch{return null}}}class qp{constructor(n){if(this.defaultDoc=n,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert"),null==this.inertDocument.body){const e=this.inertDocument.createElement("html");this.inertDocument.appendChild(e);const i=this.inertDocument.createElement("body");e.appendChild(i)}}getInertBodyElement(n){const e=this.inertDocument.createElement("template");if("content"in e)return e.innerHTML=cc(n),e;const i=this.inertDocument.createElement("body");return i.innerHTML=cc(n),this.defaultDoc.documentMode&&this.stripCustomNsAttrs(i),i}stripCustomNsAttrs(n){const e=n.attributes;for(let r=e.length-1;0"),!0}endElement(n){const e=n.nodeName.toLowerCase();Ay.hasOwnProperty(e)&&!Dy.hasOwnProperty(e)&&(this.buf.push(""))}chars(n){this.buf.push(ky(n))}checkClobberedElement(n,e){if(e&&(n.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_CONTAINED_BY)===Node.DOCUMENT_POSITION_CONTAINED_BY)throw new Error(`Failed to sanitize html because the element is clobbered: ${n.outerHTML}`);return e}}const Kp=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Tb=/([^\#-~ |!])/g;function ky(t){return t.replace(/&/g,"&").replace(Kp,function(n){return"&#"+(1024*(n.charCodeAt(0)-55296)+(n.charCodeAt(1)-56320)+65536)+";"}).replace(Tb,function(n){return"&#"+n.charCodeAt(0)+";"}).replace(//g,">")}let Ym;function Ab(t,n){let e=null;try{Ym=Ym||function Db(t){const n=new qp(t);return function Eb(){try{return!!(new window.DOMParser).parseFromString(cc(""),"text/html")}catch{return!1}}()?new Wp(n):n}(t);let i=n?String(n):"";e=Ym.getInertBodyElement(i);let r=5,s=i;do{if(0===r)throw new Error("Failed to sanitize html because the input is unstable");r--,i=s,s=e.innerHTML,e=Ym.getInertBodyElement(i)}while(i!==s);return cc((new Eh).sanitizeChildren(Ry(e)||e))}finally{if(e){const i=Ry(e)||e;for(;i.firstChild;)i.removeChild(i.firstChild)}}}function Ry(t){return"content"in t&&function N1(t){return t.nodeType===Node.ELEMENT_NODE&&"TEMPLATE"===t.nodeName}(t)?t.content:null}var Wi=(()=>((Wi=Wi||{})[Wi.NONE=0]="NONE",Wi[Wi.HTML=1]="HTML",Wi[Wi.STYLE=2]="STYLE",Wi[Wi.SCRIPT=3]="SCRIPT",Wi[Wi.URL=4]="URL",Wi[Wi.RESOURCE_URL=5]="RESOURCE_URL",Wi))();function Qp(t){const n=Ah();return n?Cb(n.sanitize(Wi.HTML,t)||""):wl(t,"HTML")?Cb(Ls(t)):Ab(function wb(){return void 0!==Cy?Cy:typeof document<"u"?document:void 0}(),Gn(t))}function Th(t){const n=Ah();return n?n.sanitize(Wi.URL,t)||"":wl(t,"URL")?Ls(t):Xp(Gn(t))}function Py(t){const n=Ah();if(n)return Mb(n.sanitize(Wi.RESOURCE_URL,t)||"");if(wl(t,"ResourceURL"))return Mb(Ls(t));throw new mt(904,!1)}function Ah(){const t=Dt();return t&&t[12]}const Qm=new vt("ENVIRONMENT_INITIALIZER"),yo=new vt("INJECTOR",-1),qa=new vt("INJECTOR_DEF_TYPES");class Jm{get(n,e=Rc){if(e===Rc){const i=new Error(`NullInjectorError: No provider for ${ki(n)}!`);throw i.name="NullInjectorError",i}return e}}function Ih(...t){return{\u0275providers:Pb(0,t),\u0275fromNgModule:!0}}function Pb(t,...n){const e=[],i=new Set;let r;return Ps(n,s=>{const d=s;ld(d,e,[],i)&&(r||(r=[]),r.push(d))}),void 0!==r&&Ob(r,e),e}function Ob(t,n){for(let e=0;e{n.push(s)})}}function ld(t,n,e,i){if(!(t=Mn(t)))return!1;let r=null,s=Kr(t);const d=!s&&Ei(t);if(s||d){if(d&&!d.standalone)return!1;r=t}else{const w=t.ngModule;if(s=Kr(w),!s)return!1;r=w}const _=i.has(r);if(d){if(_)return!1;if(i.add(r),d.dependencies){const w="function"==typeof d.dependencies?d.dependencies():d.dependencies;for(const S of w)ld(S,n,e,i)}}else{if(!s)return!1;{if(null!=s.imports&&!_){let S;i.add(r);try{Ps(s.imports,I=>{ld(I,n,e,i)&&(S||(S=[]),S.push(I))})}finally{}void 0!==S&&Ob(S,n)}if(!_){const S=ec(r)||(()=>new r);n.push({provide:r,useFactory:S,deps:Di},{provide:qa,useValue:r,multi:!0},{provide:Qm,useValue:()=>we(r),multi:!0})}const w=s.providers;null==w||_||Oy(w,I=>{n.push(I)})}}return r!==t&&void 0!==t.providers}function Oy(t,n){for(let e of t)lr(e)&&(e=e.\u0275providers),Array.isArray(e)?Oy(e,n):n(e)}const Jp=on({provide:String,useValue:on});function tg(t){return null!==t&&"object"==typeof t&&Jp in t}function dc(t){return"function"==typeof t}const ng=new vt("Set Injector scope."),Sa={},kh={};let ig;function rg(){return void 0===ig&&(ig=new Jm),ig}class Cl{}class Lb extends Cl{get destroyed(){return this._destroyed}constructor(n,e,i,r){super(),this.parent=e,this.source=i,this.scopes=r,this.records=new Map,this._ngOnDestroyHooks=new Set,this._onDestroyHooks=[],this._destroyed=!1,sg(n,d=>this.processProvider(d)),this.records.set(yo,Rh(void 0,this)),r.has("environment")&&this.records.set(Cl,Rh(void 0,this));const s=this.records.get(ng);null!=s&&"string"==typeof s.value&&this.scopes.add(s.value),this.injectorDefTypes=new Set(this.get(qa.multi,Di,Tn.Self))}destroy(){this.assertNotDestroyed(),this._destroyed=!0;try{for(const n of this._ngOnDestroyHooks)n.ngOnDestroy();for(const n of this._onDestroyHooks)n()}finally{this.records.clear(),this._ngOnDestroyHooks.clear(),this.injectorDefTypes.clear(),this._onDestroyHooks.length=0}}onDestroy(n){this._onDestroyHooks.push(n)}runInContext(n){this.assertNotDestroyed();const e=za(this),i=So(void 0);try{return n()}finally{za(e),So(i)}}get(n,e=Rc,i=Tn.Default){this.assertNotDestroyed(),i=Kl(i);const r=za(this),s=So(void 0);try{if(!(i&Tn.SkipSelf)){let _=this.records.get(n);if(void 0===_){const w=function Ph(t){return"function"==typeof t||"object"==typeof t&&t instanceof vt}(n)&&Hl(n);_=w&&this.injectableDefInScope(w)?Rh(Ly(n),Sa):null,this.records.set(n,_)}if(null!=_)return this.hydrate(n,_)}return(i&Tn.Self?rg():this.parent).get(n,e=i&Tn.Optional&&e===Rc?null:e)}catch(d){if("NullInjectorError"===d.name){if((d[Pc]=d[Pc]||[]).unshift(ki(n)),r)throw d;return function mm(t,n,e,i){const r=t[Pc];throw n[Fu]&&r.unshift(n[Fu]),t.message=function _p(t,n,e,i=null){t=t&&"\n"===t.charAt(0)&&"\u0275"==t.charAt(1)?t.slice(2):t;let r=ki(n);if(Array.isArray(n))r=n.map(ki).join(" -> ");else if("object"==typeof n){let s=[];for(let d in n)if(n.hasOwnProperty(d)){let _=n[d];s.push(d+":"+("string"==typeof _?JSON.stringify(_):ki(_)))}r=`{${s.join(", ")}}`}return`${e}${i?"("+i+")":""}[${r}]: ${t.replace(Kd,"\n ")}`}("\n"+t.message,r,e,i),t.ngTokenPath=r,t[Pc]=null,t}(d,n,"R3InjectorError",this.source)}throw d}finally{So(s),za(r)}}resolveInjectorInitializers(){const n=za(this),e=So(void 0);try{const i=this.get(Qm.multi,Di,Tn.Self);for(const r of i)r()}finally{za(n),So(e)}}toString(){const n=[],e=this.records;for(const i of e.keys())n.push(ki(i));return`R3Injector[${n.join(", ")}]`}assertNotDestroyed(){if(this._destroyed)throw new mt(205,!1)}processProvider(n){let e=dc(n=Mn(n))?n:Mn(n&&n.provide);const i=function U1(t){return tg(t)?Rh(void 0,t.useValue):Rh(Bb(t),Sa)}(n);if(dc(n)||!0!==n.multi)this.records.get(e);else{let r=this.records.get(e);r||(r=Rh(void 0,Sa,!0),r.factory=()=>ci(r.multi),this.records.set(e,r)),e=n,r.multi.push(n)}this.records.set(e,i)}hydrate(n,e){return e.value===Sa&&(e.value=kh,e.value=e.factory()),"object"==typeof e.value&&e.value&&function og(t){return null!==t&&"object"==typeof t&&"function"==typeof t.ngOnDestroy}(e.value)&&this._ngOnDestroyHooks.add(e.value),e.value}injectableDefInScope(n){if(!n.providedIn)return!1;const e=Mn(n.providedIn);return"string"==typeof e?"any"===e||this.scopes.has(e):this.injectorDefTypes.has(e)}}function Ly(t){const n=Hl(t),e=null!==n?n.factory:ec(t);if(null!==e)return e;if(t instanceof vt)throw new mt(204,!1);if(t instanceof Function)return function G1(t){const n=t.length;if(n>0)throw kp(n,"?"),new mt(204,!1);const e=function dl(t){const n=t&&(t[Wl]||t[mp]);if(n){const e=function qd(t){if(t.hasOwnProperty("name"))return t.name;const n=(""+t).match(/^function\s*([^\s(]+)/);return null===n?"":n[1]}(t);return console.warn(`DEPRECATED: DI is instantiating a token "${e}" that inherits its @Injectable decorator but does not provide one itself.\nThis will become an error in a future version of Angular. Please add @Injectable() to the "${e}" class.`),n}return null}(t);return null!==e?()=>e.factory(t):()=>new t}(t);throw new mt(204,!1)}function Bb(t,n,e){let i;if(dc(t)){const r=Mn(t);return ec(r)||Ly(r)}if(tg(t))i=()=>Mn(t.useValue);else if(function qi(t){return!(!t||!t.useFactory)}(t))i=()=>t.useFactory(...ci(t.deps||[]));else if(function Fy(t){return!(!t||!t.useExisting)}(t))i=()=>we(Mn(t.useExisting));else{const r=Mn(t&&(t.useClass||t.provide));if(!function j1(t){return!!t.deps}(t))return ec(r)||Ly(r);i=()=>new r(...ci(t.deps))}return i}function Rh(t,n,e=!1){return{factory:t,value:n,multi:e?[]:void 0}}function sg(t,n){for(const e of t)Array.isArray(e)?sg(e,n):e&&lr(e)?sg(e.\u0275providers,n):n(e)}class H1{}class Nb{}class Vb{resolveComponentFactory(n){throw function $1(t){const n=Error(`No component factory found for ${ki(t)}. Did you add it to @NgModule.entryComponents?`);return n.ngComponent=t,n}(n)}}let $r=(()=>{class t{}return t.NULL=new Vb,t})();function ef(){return Za(Ur(),Dt())}function Za(t,n){return new $t(ts(t,n))}let $t=(()=>{class t{constructor(e){this.nativeElement=e}}return t.__NG_ELEMENT_ID__=ef,t})();function lg(t){return t instanceof $t?t.nativeElement:t}class tf{}let Da=(()=>{class t{}return t.__NG_ELEMENT_ID__=()=>function Gb(){const t=Dt(),e=or(Ur().index,t);return(Jr(e)?e:t)[11]}(),t})(),W1=(()=>{class t{}return t.\u0275prov=rt({token:t,providedIn:"root",factory:()=>null}),t})();class hc{constructor(n){this.full=n,this.major=n.split(".")[0],this.minor=n.split(".")[1],this.patch=n.split(".").slice(2).join(".")}}const Ub=new hc("15.1.5"),nf={};function ug(t){return t.ngOriginalError}class Ho{constructor(){this._console=console}handleError(n){const e=this._findOriginalError(n);this._console.error("ERROR",n),e&&this._console.error("ORIGINAL ERROR",e)}_findOriginalError(n){let e=n&&ug(n);for(;e&&ug(e);)e=ug(e);return e||null}}function By(t){return t.ownerDocument.defaultView}function ea(t){return t instanceof Function?t():t}function Vy(t,n,e){let i=t.length;for(;;){const r=t.indexOf(n,e);if(-1===r)return r;if(0===r||t.charCodeAt(r-1)<=32){const s=n.length;if(r+s===i||t.charCodeAt(r+s)<=32)return r}e=r+1}}const sf="ng-template";function dg(t,n,e){let i=0;for(;is?"":r[L+1].toLowerCase();const Y=8&i?H:null;if(Y&&-1!==Vy(Y,S,0)||2&i&&S!==H){if(Xa(i))return!1;d=!0}}}}else{if(!d&&!Xa(i)&&!Xa(w))return!1;if(d&&Xa(w))continue;d=!1,i=w|1&i}}return Xa(i)||d}function Xa(t){return 0==(1&t)}function K1(t,n,e,i){if(null===n)return-1;let r=0;if(i||!e){let s=!1;for(;r-1)for(e++;e0?'="'+_+'"':"")+"]"}else 8&i?r+="."+d:4&i&&(r+=" "+d);else""!==r&&!Xa(d)&&(n+=hg(s,r),r=""),i=d,s=s||!Xa(i);e++}return""!==r&&(n+=hg(s,r)),n}const Qn={};function Se(t){pg(mi(),Dt(),q()+t,!1)}function pg(t,n,e,i){if(!i)if(3==(3&n[2])){const s=t.preOrderCheckHooks;null!==s&&Te(n,s,e)}else{const s=t.preOrderHooks;null!==s&&Ct(n,s,0,e)}X(e)}function ta(t,n=null,e=null,i){const r=na(t,n,e,i);return r.resolveInjectorInitializers(),r}function na(t,n=null,e=null,i,r=new Set){const s=[e||Di,Ih(t)];return i=i||("object"==typeof t?void 0:ki(t)),new Lb(s,n||rg(),i||null,r)}let Or=(()=>{class t{static create(e,i){if(Array.isArray(e))return ta({name:""},i,e,"");{const r=e.name??"";return ta({name:r},e.parent,e.providers,r)}}}return t.THROW_IF_NOT_FOUND=Rc,t.NULL=new Jm,t.\u0275prov=rt({token:t,providedIn:"any",factory:()=>we(yo)}),t.__NG_ELEMENT_ID__=-1,t})();function z(t,n=Tn.Default){const e=Dt();return null===e?we(t,n):oc(Ur(),e,Mn(t),n)}function Bs(){throw new Error("invalid")}function lx(t,n){const e=t.contentQueries;if(null!==e)for(let i=0;i22&&pg(t,n,22,!1),e(i,r)}finally{X(s)}}function yg(t,n,e){if(nh(n)){const r=n.directiveEnd;for(let s=n.directiveStart;s0;){const e=t[--n];if("number"==typeof e&&e<0)return e}return 0})(d)!=_&&d.push(_),d.push(e,i,s)}}(t,n,i,Vh(t,e,r.hostVars,Qn),r)}function vo(t,n,e,i,r,s){const d=ts(t,n);!function Tl(t,n,e,i,r,s,d){if(null==s)t.removeAttribute(n,r,e);else{const _=null==d?Gn(s):d(s,i||"",r);t.setAttribute(n,r,_,e)}}(n[11],d,s,t.value,e,i,r)}function Dg(t,n,e,i,r,s){const d=s[n];if(null!==d){const _=i.setInput;for(let w=0;w0&&Eg(e)}}function Eg(t){for(let i=Np(t);null!==i;i=zp(i))for(let r=10;r0&&Eg(s)}const e=t[1].components;if(null!==e)for(let i=0;i0&&Eg(r)}}function mx(t,n){const e=or(n,t),i=e[1];(function gx(t,n){for(let e=n.length;e-1&&(Vp(n,i),Am(e,i))}this._attachedToViewContainer=!1}mb(this._lView[1],this._lView)}onDestroy(n){_f(this._lView[1],this._lView,null,n)}markForCheck(){Tg(this._cdRefInjectingView||this._lView)}detach(){this._lView[2]&=-65}reattach(){this._lView[2]|=64}detectChanges(){vf(this._lView[1],this._lView,this.context)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new mt(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null,function pb(t,n){lc(t,n,n[11],2,null,null)}(this._lView[1],this._lView)}attachToAppRef(n){if(this._attachedToViewContainer)throw new mt(902,!1);this._appRef=n}}class fd extends bs{constructor(n){super(n),this._view=n}detectChanges(){const n=this._view;vf(n[1],n,n[8],!1)}checkNoChanges(){}get context(){return null}}class iv extends $r{constructor(n){super(),this.ngModule=n}resolveComponentFactory(n){const e=Ei(n);return new Hh(e,this.ngModule)}}function rv(t){const n=[];for(let e in t)t.hasOwnProperty(e)&&n.push({propName:t[e],templateName:e});return n}class Ig{constructor(n,e){this.injector=n,this.parentInjector=e}get(n,e,i){i=Kl(i);const r=this.injector.get(n,nf,i);return r!==nf||e===nf?r:this.parentInjector.get(n,e,i)}}class Hh extends Nb{get inputs(){return rv(this.componentDef.inputs)}get outputs(){return rv(this.componentDef.outputs)}constructor(n,e){super(),this.componentDef=n,this.ngModule=e,this.componentType=n.type,this.selector=function nu(t){return t.map(eM).join(",")}(n.selectors),this.ngContentSelectors=n.ngContentSelectors?n.ngContentSelectors:[],this.isBoundToModule=!!e}create(n,e,i,r){let s=(r=r||this.ngModule)instanceof Cl?r:r?.injector;s&&null!==this.componentDef.getStandaloneInjector&&(s=this.componentDef.getStandaloneInjector(s)||s);const d=s?new Ig(n,s):n,_=d.get(tf,null);if(null===_)throw new mt(407,!1);const w=d.get(W1,null),S=_.createRenderer(null,this.componentDef),I=this.componentDef.selectors[0][0]||"div",L=i?function xg(t,n,e){return t.selectRootElement(n,e===Qo.ShadowDom)}(S,i,this.componentDef.encapsulation):hy(S,I,function wf(t){const n=t.toLowerCase();return"svg"===n?"svg":"math"===n?"math":null}(I)),H=this.componentDef.onPush?288:272,Y=Ky(0,null,null,1,0,null,null,null,null,null),ae=hd(null,Y,null,H,null,null,_,S,w,d,null);let ve,Be;k(ae);try{const $e=this.componentDef;let It,_t=null;$e.findHostDirectiveDefs?(It=[],_t=new Map,$e.findHostDirectiveDefs($e,It,_t),It.push($e)):It=[$e];const dn=function vx(t,n){const e=t[1];return t[22]=n,zh(e,22,2,"#host",null)}(ae,L),Qi=function bx(t,n,e,i,r,s,d,_){const w=r[1];!function _M(t,n,e,i){for(const r of t)n.mergedAttrs=gi(n.mergedAttrs,r.hostAttrs);null!==n.mergedAttrs&&(Uh(n,n.mergedAttrs,!0),null!==e&&by(i,e,n))}(i,t,n,d);const S=s.createRenderer(n,e),I=hd(r,ux(e),null,e.onPush?32:16,r[t.index],t,s,S,_||null,null,null);return w.firstCreatePass&&Sg(w,t,i.length-1),yf(r,I),r[t.index]=I}(dn,L,$e,It,ae,_,S);Be=Mp(Y,22),L&&function xx(t,n,e,i){if(i)Un(t,e,["ng-version",Ub.full]);else{const{attrs:r,classes:s}=function Jb(t){const n=[],e=[];let i=1,r=2;for(;i0&&bb(t,e,s.join(" "))}}(S,$e,L,i),void 0!==e&&function wx(t,n,e){const i=t.projection=[];for(let r=0;r=0;i--){const r=t[i];r.hostVars=n+=r.hostVars,r.hostAttrs=gi(r.hostAttrs,e=gi(e,r.hostAttrs))}}(i)}function f(t){return t===Is?{}:t===Di?[]:t}function g(t,n){const e=t.viewQuery;t.viewQuery=e?(i,r)=>{n(i,r),e(i,r)}:n}function v(t,n){const e=t.contentQueries;t.contentQueries=e?(i,r,s)=>{n(i,r,s),e(i,r,s)}:n}function x(t,n){const e=t.hostBindings;t.hostBindings=e?(i,r)=>{n(i,r),e(i,r)}:n}let re=null;function pe(){if(!re){const t=ji.Symbol;if(t&&t.iterator)re=t.iterator;else{const n=Object.getOwnPropertyNames(Map.prototype);for(let e=0;ed(Gr(dn[i.index])):i.index;let _t=null;if(!d&&_&&(_t=function Cx(t,n,e,i){const r=t.cleanup;if(null!=r)for(let s=0;sw?_[w]:null}"string"==typeof d&&(s+=2)}return null}(t,n,r,i.index)),null!==_t)(_t.__ngLastListenerFn__||_t).__ngNextListenerFn__=s,_t.__ngLastListenerFn__=s,H=!1;else{s=Rg(i,n,I,s,!1);const dn=e.listen(Be,r,s);L.push(s,dn),S&&S.push(r,It,$e,$e+1)}}else s=Rg(i,n,I,s,!1);const Y=i.outputs;let ae;if(H&&null!==Y&&(ae=Y[r])){const ve=ae.length;if(ve)for(let Be=0;Be-1?or(t.index,n):n);let w=kg(n,0,i,d),S=s.__ngNextListenerFn__;for(;S;)w=kg(n,0,S,d)&&w,S=S.__ngNextListenerFn__;return r&&!1===w&&(d.preventDefault(),d.returnValue=!1),w}}function Et(t=1){return function K(t){return(zn.lFrame.contextLView=function ne(t,n){for(;t>0;)n=n[15],t--;return n}(t,zn.lFrame.contextLView))[8]}(t)}function Mx(t,n){let e=null;const i=function Gy(t){const n=t.attrs;if(null!=n){const e=n.indexOf(5);if(!(1&e))return n[e+1]}return null}(t);for(let r=0;r>17&32767}function yM(t){return 2|t}function Mf(t){return(131068&t)>>2}function vM(t,n){return-131069&t|n<<2}function bM(t){return 1|t}function OT(t,n,e,i,r){const s=t[e+1],d=null===n;let _=i?Wh(s):Mf(s),w=!1;for(;0!==_&&(!1===w||d);){const I=t[_+1];eN(t[_],n)&&(w=!0,t[_+1]=i?bM(I):yM(I)),_=i?Wh(I):Mf(I)}w&&(t[e+1]=i?yM(s):bM(s))}function eN(t,n){return null===t||null==n||(Array.isArray(t)?t[1]:t)===n||!(!Array.isArray(t)||"string"!=typeof n)&&mh(t,n)>=0}const Wo={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function FT(t){return t.substring(Wo.key,Wo.keyEnd)}function LT(t,n){const e=Wo.textEnd;return e===n?-1:(n=Wo.keyEnd=function rN(t,n,e){for(;n32;)n++;return n}(t,Wo.key=n,e),Fg(t,n,e))}function Fg(t,n,e){for(;n=0;e=LT(n,e))kr(t,FT(n),!0)}function fc(t,n,e,i){const r=Dt(),s=mi(),d=va(2);s.firstUpdatePass&&UT(s,t,d,i),n!==Qn&&Ue(r,d,n)&&HT(s,s.data[q()],r,r[11],t,r[d+1]=function mN(t,n){return null==t||("string"==typeof n?t+=n:"object"==typeof t&&(t=ki(Ls(t)))),t}(n,e),i,d)}function mc(t,n,e,i){const r=mi(),s=va(2);r.firstUpdatePass&&UT(r,null,s,i);const d=Dt();if(e!==Qn&&Ue(d,s,e)){const _=r.data[q()];if(WT(_,i)&&!GT(r,s)){let w=i?_.classesWithoutHost:_.stylesWithoutHost;null!==w&&(e=Zn(w,e||"")),ui(r,_,d,e,i)}else!function fN(t,n,e,i,r,s,d,_){r===Qn&&(r=Di);let w=0,S=0,I=0=t.expandoStartIndex}function UT(t,n,e,i){const r=t.data;if(null===r[e+1]){const s=r[q()],d=GT(t,e);WT(s,i)&&null===n&&!d&&(n=!1),n=function cN(t,n,e,i){const r=y(t);let s=i?n.residualClasses:n.residualStyles;if(null===r)0===(i?n.classBindings:n.styleBindings)&&(e=lv(e=xM(null,t,n,e,i),n.attrs,i),s=null);else{const d=n.directiveStylingLast;if(-1===d||t[d]!==r)if(e=xM(r,t,n,e,i),null===s){let w=function uN(t,n,e){const i=e?n.classBindings:n.styleBindings;if(0!==Mf(i))return t[Wh(i)]}(t,n,i);void 0!==w&&Array.isArray(w)&&(w=xM(null,t,n,w[1],i),w=lv(w,n.attrs,i),function dN(t,n,e,i){t[Wh(e?n.classBindings:n.styleBindings)]=i}(t,n,i,w))}else s=function hN(t,n,e){let i;const r=n.directiveEnd;for(let s=1+n.directiveStylingLast;s0)&&(S=!0)):I=e,r)if(0!==w){const H=Wh(t[_+1]);t[i+1]=Dx(H,_),0!==H&&(t[H+1]=vM(t[H+1],i)),t[_+1]=function YB(t,n){return 131071&t|n<<17}(t[_+1],i)}else t[i+1]=Dx(_,0),0!==_&&(t[_+1]=vM(t[_+1],i)),_=i;else t[i+1]=Dx(w,0),0===_?_=i:t[w+1]=vM(t[w+1],i),w=i;S&&(t[i+1]=yM(t[i+1])),OT(t,I,i,!0),OT(t,I,i,!1),function JB(t,n,e,i,r){const s=r?t.residualClasses:t.residualStyles;null!=s&&"string"==typeof n&&mh(s,n)>=0&&(e[i+1]=bM(e[i+1]))}(n,I,t,i,s),d=Dx(_,w),s?n.classBindings=d:n.styleBindings=d}(r,s,n,e,d,i)}}function xM(t,n,e,i,r){let s=null;const d=e.directiveEnd;let _=e.directiveStylingLast;for(-1===_?_=e.directiveStart:_++;_0;){const w=t[r],S=Array.isArray(w),I=S?w[1]:w,L=null===I;let H=e[r+1];H===Qn&&(H=L?Di:void 0);let Y=L?ey(H,i):I===i?H:void 0;if(S&&!Ex(Y)&&(Y=ey(w,i)),Ex(Y)&&(_=Y,d))return _;const ae=t[r+1];r=d?Wh(ae):Mf(ae)}if(null!==n){let w=s?n.residualClasses:n.residualStyles;null!=w&&(_=ey(w,i))}return _}function Ex(t){return void 0!==t}function WT(t,n){return 0!=(t.flags&(n?8:16))}function Ze(t,n=""){const e=Dt(),i=mi(),r=t+22,s=i.firstCreatePass?zh(i,r,1,n,null):i.data[r],d=e[r]=function uy(t,n){return t.createText(n)}(e[11],n);jm(i,e,d,s),gs(s,!1)}function Wr(t){return no("",t,""),Wr}function no(t,n,e){const i=Dt(),r=kt(i,t,n,e);return r!==Qn&&Io(i,q(),r),no}function Tx(t,n,e,i,r){const s=Dt(),d=ln(s,t,n,e,i,r);return d!==Qn&&Io(s,q(),d),Tx}function wM(t,n,e){mc(kr,lu,kt(Dt(),t,n,e),!0)}function gc(t,n,e){const i=Dt();return Ue(i,ic(),n)&&vs(mi(),ee(),i,t,n,i[11],e,!0),gc}function Ax(t,n,e){const i=Dt();if(Ue(i,ic(),n)){const s=mi(),d=ee();vs(s,d,i,t,n,pd(y(s.data),d,i),e,!0)}return Ax}const Sf=void 0;var PN=["en",[["a","p"],["AM","PM"],Sf],[["AM","PM"],Sf,Sf],[["S","M","T","W","T","F","S"],["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],["Su","Mo","Tu","We","Th","Fr","Sa"]],Sf,[["J","F","M","A","M","J","J","A","S","O","N","D"],["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],["January","February","March","April","May","June","July","August","September","October","November","December"]],Sf,[["B","A"],["BC","AD"],["Before Christ","Anno Domini"]],0,[6,0],["M/d/yy","MMM d, y","MMMM d, y","EEEE, MMMM d, y"],["h:mm a","h:mm:ss a","h:mm:ss a z","h:mm:ss a zzzz"],["{1}, {0}",Sf,"{1} 'at' {0}",Sf],[".",",",";","%","+","-","E","\xd7","\u2030","\u221e","NaN",":"],["#,##0.###","#,##0%","\xa4#,##0.00","#E0"],"USD","$","US Dollar",{},"ltr",function RN(t){const e=Math.floor(Math.abs(t)),i=t.toString().replace(/^[^.]*\.?/,"").length;return 1===e&&0===i?1:5}];let Lg={};function ra(t){const n=function ON(t){return t.toLowerCase().replace(/_/g,"-")}(t);let e=dA(n);if(e)return e;const i=n.split("-")[0];if(e=dA(i),e)return e;if("en"===i)return PN;throw new mt(701,!1)}function dA(t){return t in Lg||(Lg[t]=ji.ng&&ji.ng.common&&ji.ng.common.locales&&ji.ng.common.locales[t]),Lg[t]}var sn=(()=>((sn=sn||{})[sn.LocaleId=0]="LocaleId",sn[sn.DayPeriodsFormat=1]="DayPeriodsFormat",sn[sn.DayPeriodsStandalone=2]="DayPeriodsStandalone",sn[sn.DaysFormat=3]="DaysFormat",sn[sn.DaysStandalone=4]="DaysStandalone",sn[sn.MonthsFormat=5]="MonthsFormat",sn[sn.MonthsStandalone=6]="MonthsStandalone",sn[sn.Eras=7]="Eras",sn[sn.FirstDayOfWeek=8]="FirstDayOfWeek",sn[sn.WeekendRange=9]="WeekendRange",sn[sn.DateFormat=10]="DateFormat",sn[sn.TimeFormat=11]="TimeFormat",sn[sn.DateTimeFormat=12]="DateTimeFormat",sn[sn.NumberSymbols=13]="NumberSymbols",sn[sn.NumberFormats=14]="NumberFormats",sn[sn.CurrencyCode=15]="CurrencyCode",sn[sn.CurrencySymbol=16]="CurrencySymbol",sn[sn.CurrencyName=17]="CurrencyName",sn[sn.Currencies=18]="Currencies",sn[sn.Directionality=19]="Directionality",sn[sn.PluralCase=20]="PluralCase",sn[sn.ExtraData=21]="ExtraData",sn))();const Bg="en-US";let hA=Bg;function SM(t,n,e,i,r){if(t=Mn(t),Array.isArray(t))for(let s=0;s>20;if(dc(t)||!t.multi){const Y=new Ke(w,r,z),ae=EM(_,n,r?I:I+H,L);-1===ae?(is(eo(S,d),s,_),DM(s,t,n.length),n.push(_),S.directiveStart++,S.directiveEnd++,r&&(S.providerIndexes+=1048576),e.push(Y),d.push(Y)):(e[ae]=Y,d[ae]=Y)}else{const Y=EM(_,n,I+H,L),ae=EM(_,n,I,I+H),Be=ae>=0&&e[ae];if(r&&!Be||!r&&!(Y>=0&&e[Y])){is(eo(S,d),s,_);const $e=function R3(t,n,e,i,r){const s=new Ke(t,e,z);return s.multi=[],s.index=n,s.componentProviders=0,BA(s,r,i&&!e),s}(r?k3:I3,e.length,r,i,w);!r&&Be&&(e[ae].providerFactory=$e),DM(s,t,n.length,0),n.push(_),S.directiveStart++,S.directiveEnd++,r&&(S.providerIndexes+=1048576),e.push($e),d.push($e)}else DM(s,t,Y>-1?Y:ae,BA(e[r?ae:Y],w,!r&&i));!r&&i&&Be&&e[ae].componentProviders++}}}function DM(t,n,e,i){const r=dc(n),s=function Fb(t){return!!t.useClass}(n);if(r||s){const w=(s?Mn(n.useClass):n).prototype.ngOnDestroy;if(w){const S=t.destroyHooks||(t.destroyHooks=[]);if(!r&&n.multi){const I=S.indexOf(e);-1===I?S.push(e,[i,w]):S[I+1].push(i,w)}else S.push(e,w)}}}function BA(t,n,e){return e&&t.componentProviders++,t.multi.push(n)-1}function EM(t,n,e,i){for(let r=e;r{e.providersResolver=(i,r)=>function A3(t,n,e){const i=mi();if(i.firstCreatePass){const r=es(t);SM(e,i.data,i.blueprint,r,!0),SM(n,i.data,i.blueprint,r,!1)}}(i,r?r(t):t,n)}}class Ng{}class NA{}class zA extends Ng{constructor(n,e){super(),this._parent=e,this._bootstrapComponents=[],this.destroyCbs=[],this.componentFactoryResolver=new iv(this);const i=zo(n);this._bootstrapComponents=ea(i.bootstrap),this._r3Injector=na(n,e,[{provide:Ng,useValue:this},{provide:$r,useValue:this.componentFactoryResolver}],ki(n),new Set(["environment"])),this._r3Injector.resolveInjectorInitializers(),this.instance=this._r3Injector.get(n)}get injector(){return this._r3Injector}destroy(){const n=this._r3Injector;!n.destroyed&&n.destroy(),this.destroyCbs.forEach(e=>e()),this.destroyCbs=null}onDestroy(n){this.destroyCbs.push(n)}}class AM extends NA{constructor(n){super(),this.moduleType=n}create(n){return new zA(this.moduleType,n)}}class O3 extends Ng{constructor(n,e,i){super(),this.componentFactoryResolver=new iv(this),this.instance=null;const r=new Lb([...n,{provide:Ng,useValue:this},{provide:$r,useValue:this.componentFactoryResolver}],e||rg(),i,new Set(["environment"]));this.injector=r,r.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(n){this.injector.onDestroy(n)}}function Ox(t,n,e=null){return new O3(t,n,e).injector}let F3=(()=>{class t{constructor(e){this._injector=e,this.cachedInjectors=new Map}getOrCreateStandaloneInjector(e){if(!e.standalone)return null;if(!this.cachedInjectors.has(e.id)){const i=Pb(0,e.type),r=i.length>0?Ox([i],this._injector,`Standalone[${e.type.name}]`):null;this.cachedInjectors.set(e.id,r)}return this.cachedInjectors.get(e.id)}ngOnDestroy(){try{for(const e of this.cachedInjectors.values())null!==e&&e.destroy()}finally{this.cachedInjectors.clear()}}}return t.\u0275prov=rt({token:t,providedIn:"environment",factory:()=>new t(we(Cl))}),t})();function IM(t){t.getStandaloneInjector=n=>n.get(F3).getOrCreateStandaloneInjector(t)}function RM(t,n,e){const i=Do()+t,r=Dt();return r[i]===Qn?nt(r,i,e?n.call(e):n()):function xt(t,n){return t[n]}(r,i)}function Ns(t,n,e,i){return WA(Dt(),Do(),t,n,e,i)}function fv(t,n,e,i,r){return qA(Dt(),Do(),t,n,e,i,r)}function mv(t,n){const e=t[n];return e===Qn?void 0:e}function WA(t,n,e,i,r,s){const d=n+e;return Ue(t,d,r)?nt(t,d+1,s?i.call(s,r):i(r)):mv(t,d+1)}function qA(t,n,e,i,r,s,d){const _=n+e;return lt(t,_,r,s)?nt(t,_+2,d?i.call(d,r,s):i(r,s)):mv(t,_+2)}function Df(t,n){const e=mi();let i;const r=t+22;e.firstCreatePass?(i=function K3(t,n){if(n)for(let e=n.length-1;e>=0;e--){const i=n[e];if(t===i.name)return i}}(n,e.pipeRegistry),e.data[r]=i,i.onDestroy&&(e.destroyHooks||(e.destroyHooks=[])).push(r,i.onDestroy)):i=e.data[r];const s=i.factory||(i.factory=ec(i.type)),d=So(z);try{const _=_s(!1),w=s();return _s(_),function Fi(t,n,e,i){e>=t.data.length&&(t.data[e]=null,t.blueprint[e]=null),n[e]=i}(e,Dt(),r,w),w}finally{So(d)}}function zg(t,n,e,i){const r=t+22,s=Dt(),d=tc(s,r);return gv(s,r)?qA(s,Do(),n,d.transform,e,i,d):d.transform(e,i)}function gv(t,n){return t[1].data[n].pure}function PM(t){return n=>{setTimeout(t,void 0,n)}}const In=class tz extends Zt{constructor(n=!1){super(),this.__isAsync=n}emit(n){super.next(n)}subscribe(n,e,i){let r=n,s=e||(()=>null),d=i;if(n&&"object"==typeof n){const w=n;r=w.next?.bind(w),s=w.error?.bind(w),d=w.complete?.bind(w)}this.__isAsync&&(s=PM(s),r&&(r=PM(r)),d&&(d=PM(d)));const _=super.subscribe({next:r,error:s,complete:d});return n instanceof $&&n.add(_),_}};function nz(){return this._results[pe()]()}class qh{get changes(){return this._changes||(this._changes=new In)}constructor(n=!1){this._emitDistinctChangesOnly=n,this.dirty=!0,this._results=[],this._changesDetected=!1,this._changes=null,this.length=0,this.first=void 0,this.last=void 0;const e=pe(),i=qh.prototype;i[e]||(i[e]=nz)}get(n){return this._results[n]}map(n){return this._results.map(n)}filter(n){return this._results.filter(n)}find(n){return this._results.find(n)}reduce(n,e){return this._results.reduce(n,e)}forEach(n){this._results.forEach(n)}some(n){return this._results.some(n)}toArray(){return this._results.slice()}toString(){return this._results.toString()}reset(n,e){const i=this;i.dirty=!1;const r=function _o(t){return t.flat(Number.POSITIVE_INFINITY)}(n);(this._changesDetected=!function $a(t,n,e){if(t.length!==n.length)return!1;for(let i=0;i{class t{}return t.__NG_ELEMENT_ID__=oz,t})();const iz=Fr,rz=class extends iz{constructor(n,e,i){super(),this._declarationLView=n,this._declarationTContainer=e,this.elementRef=i}createEmbeddedView(n,e){const i=this._declarationTContainer.tViews,r=hd(this._declarationLView,i,n,16,null,i.declTNode,null,null,null,null,e||null);r[17]=this._declarationLView[this._declarationTContainer.index];const d=this._declarationLView[19];return null!==d&&(r[19]=d.createEmbeddedView(i)),Xy(i,r,n),new bs(r)}};function oz(){return Fx(Ur(),Dt())}function Fx(t,n){return 4&t.type?new rz(n,t,Za(t,n)):null}let ro=(()=>{class t{}return t.__NG_ELEMENT_ID__=sz,t})();function sz(){return eI(Ur(),Dt())}const az=ro,QA=class extends az{constructor(n,e,i){super(),this._lContainer=n,this._hostTNode=e,this._hostLView=i}get element(){return Za(this._hostTNode,this._hostLView)}get injector(){return new Qu(this._hostTNode,this._hostLView)}get parentInjector(){const n=to(this._hostTNode,this._hostLView);if(zi(n)){const e=Eo(n,this._hostLView),i=xi(n);return new Qu(e[1].data[i+8],e)}return new Qu(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(n){const e=JA(this._lContainer);return null!==e&&e[n]||null}get length(){return this._lContainer.length-10}createEmbeddedView(n,e,i){let r,s;"number"==typeof i?r=i:null!=i&&(r=i.index,s=i.injector);const d=n.createEmbeddedView(e||{},s);return this.insert(d,r),d}createComponent(n,e,i,r,s){const d=n&&!function Ks(t){return"function"==typeof t}(n);let _;if(d)_=e;else{const L=e||{};_=L.index,i=L.injector,r=L.projectableNodes,s=L.environmentInjector||L.ngModuleRef}const w=d?n:new Hh(Ei(n)),S=i||this.parentInjector;if(!s&&null==w.ngModule){const H=(d?S:this.parentInjector).get(Cl,null);H&&(s=H)}const I=w.create(S,r,void 0,s);return this.insert(I.hostView,_),I}insert(n,e){const i=n._lView,r=i[1];if(function H_(t){return fs(t[3])}(i)){const I=this.indexOf(n);if(-1!==I)this.detach(I);else{const L=i[3],H=new QA(L,L[6],L[3]);H.detach(H.indexOf(n))}}const s=this._adjustIndex(e),d=this._lContainer;!function ac(t,n,e,i){const r=10+i,s=e.length;i>0&&(e[r-1][4]=n),i0)i.push(d[_/2]);else{const S=s[_+1],I=n[-w];for(let L=10;L{class t{constructor(e){this.appInits=e,this.resolve=Bx,this.reject=Bx,this.initialized=!1,this.done=!1,this.donePromise=new Promise((i,r)=>{this.resolve=i,this.reject=r})}runInitializers(){if(this.initialized)return;const e=[],i=()=>{this.done=!0,this.resolve()};if(this.appInits)for(let r=0;r{s.subscribe({complete:_,error:w})});e.push(d)}}Promise.all(e).then(()=>{i()}).catch(r=>{this.reject(r)}),0===e.length&&i(),this.initialized=!0}}return t.\u0275fac=function(e){return new(e||t)(we(Nx,8))},t.\u0275prov=rt({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();const Ug=new vt("AppId",{providedIn:"root",factory:function SI(){return`${HM()}${HM()}${HM()}`}});function HM(){return String.fromCharCode(97+Math.floor(25*Math.random()))}const DI=new vt("Platform Initializer"),zs=new vt("Platform ID",{providedIn:"platform",factory:()=>"unknown"}),$M=new vt("appBootstrapListener"),Ta=new vt("AnimationModuleType");let Pz=(()=>{class t{log(e){console.log(e)}warn(e){console.warn(e)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=rt({token:t,factory:t.\u0275fac,providedIn:"platform"}),t})();const cu=new vt("LocaleId",{providedIn:"root",factory:()=>Fn(cu,Tn.Optional|Tn.SkipSelf)||function Oz(){return typeof $localize<"u"&&$localize.locale||Bg}()});class Lz{constructor(n,e){this.ngModuleFactory=n,this.componentFactories=e}}let EI=(()=>{class t{compileModuleSync(e){return new AM(e)}compileModuleAsync(e){return Promise.resolve(this.compileModuleSync(e))}compileModuleAndAllComponentsSync(e){const i=this.compileModuleSync(e),s=ea(zo(e).declarations).reduce((d,_)=>{const w=Ei(_);return w&&d.push(new Hh(w)),d},[]);return new Lz(i,s)}compileModuleAndAllComponentsAsync(e){return Promise.resolve(this.compileModuleAndAllComponentsSync(e))}clearCache(){}clearCacheFor(e){}getModuleId(e){}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=rt({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();const zz=(()=>Promise.resolve(0))();function WM(t){typeof Zone>"u"?zz.then(()=>{t&&t.apply(null,null)}):Zone.current.scheduleMicroTask("scheduleMicrotask",t)}class Ln{constructor({enableLongStackTrace:n=!1,shouldCoalesceEventChangeDetection:e=!1,shouldCoalesceRunChangeDetection:i=!1}){if(this.hasPendingMacrotasks=!1,this.hasPendingMicrotasks=!1,this.isStable=!0,this.onUnstable=new In(!1),this.onMicrotaskEmpty=new In(!1),this.onStable=new In(!1),this.onError=new In(!1),typeof Zone>"u")throw new mt(908,!1);Zone.assertZonePatched();const r=this;r._nesting=0,r._outer=r._inner=Zone.current,Zone.TaskTrackingZoneSpec&&(r._inner=r._inner.fork(new Zone.TaskTrackingZoneSpec)),n&&Zone.longStackTraceZoneSpec&&(r._inner=r._inner.fork(Zone.longStackTraceZoneSpec)),r.shouldCoalesceEventChangeDetection=!i&&e,r.shouldCoalesceRunChangeDetection=i,r.lastRequestAnimationFrameId=-1,r.nativeRequestAnimationFrame=function Vz(){let t=ji.requestAnimationFrame,n=ji.cancelAnimationFrame;if(typeof Zone<"u"&&t&&n){const e=t[Zone.__symbol__("OriginalDelegate")];e&&(t=e);const i=n[Zone.__symbol__("OriginalDelegate")];i&&(n=i)}return{nativeRequestAnimationFrame:t,nativeCancelAnimationFrame:n}}().nativeRequestAnimationFrame,function jz(t){const n=()=>{!function Uz(t){t.isCheckStableRunning||-1!==t.lastRequestAnimationFrameId||(t.lastRequestAnimationFrameId=t.nativeRequestAnimationFrame.call(ji,()=>{t.fakeTopEventTask||(t.fakeTopEventTask=Zone.root.scheduleEventTask("fakeTopEventTask",()=>{t.lastRequestAnimationFrameId=-1,ZM(t),t.isCheckStableRunning=!0,qM(t),t.isCheckStableRunning=!1},void 0,()=>{},()=>{})),t.fakeTopEventTask.invoke()}),ZM(t))}(t)};t._inner=t._inner.fork({name:"angular",properties:{isAngularZone:!0},onInvokeTask:(e,i,r,s,d,_)=>{try{return II(t),e.invokeTask(r,s,d,_)}finally{(t.shouldCoalesceEventChangeDetection&&"eventTask"===s.type||t.shouldCoalesceRunChangeDetection)&&n(),kI(t)}},onInvoke:(e,i,r,s,d,_,w)=>{try{return II(t),e.invoke(r,s,d,_,w)}finally{t.shouldCoalesceRunChangeDetection&&n(),kI(t)}},onHasTask:(e,i,r,s)=>{e.hasTask(r,s),i===r&&("microTask"==s.change?(t._hasPendingMicrotasks=s.microTask,ZM(t),qM(t)):"macroTask"==s.change&&(t.hasPendingMacrotasks=s.macroTask))},onHandleError:(e,i,r,s)=>(e.handleError(r,s),t.runOutsideAngular(()=>t.onError.emit(s)),!1)})}(r)}static isInAngularZone(){return typeof Zone<"u"&&!0===Zone.current.get("isAngularZone")}static assertInAngularZone(){if(!Ln.isInAngularZone())throw new mt(909,!1)}static assertNotInAngularZone(){if(Ln.isInAngularZone())throw new mt(909,!1)}run(n,e,i){return this._inner.run(n,e,i)}runTask(n,e,i,r){const s=this._inner,d=s.scheduleEventTask("NgZoneEvent: "+r,n,Gz,Bx,Bx);try{return s.runTask(d,e,i)}finally{s.cancelTask(d)}}runGuarded(n,e,i){return this._inner.runGuarded(n,e,i)}runOutsideAngular(n){return this._outer.run(n)}}const Gz={};function qM(t){if(0==t._nesting&&!t.hasPendingMicrotasks&&!t.isStable)try{t._nesting++,t.onMicrotaskEmpty.emit(null)}finally{if(t._nesting--,!t.hasPendingMicrotasks)try{t.runOutsideAngular(()=>t.onStable.emit(null))}finally{t.isStable=!0}}}function ZM(t){t.hasPendingMicrotasks=!!(t._hasPendingMicrotasks||(t.shouldCoalesceEventChangeDetection||t.shouldCoalesceRunChangeDetection)&&-1!==t.lastRequestAnimationFrameId)}function II(t){t._nesting++,t.isStable&&(t.isStable=!1,t.onUnstable.emit(null))}function kI(t){t._nesting--,qM(t)}class Hz{constructor(){this.hasPendingMicrotasks=!1,this.hasPendingMacrotasks=!1,this.isStable=!0,this.onUnstable=new In,this.onMicrotaskEmpty=new In,this.onStable=new In,this.onError=new In}run(n,e,i){return n.apply(e,i)}runGuarded(n,e,i){return n.apply(e,i)}runOutsideAngular(n){return n()}runTask(n,e,i,r){return n.apply(e,i)}}const RI=new vt(""),Vx=new vt("");let KM,XM=(()=>{class t{constructor(e,i,r){this._ngZone=e,this.registry=i,this._pendingCount=0,this._isZoneStable=!0,this._didWork=!1,this._callbacks=[],this.taskTrackingZone=null,KM||(function $z(t){KM=t}(r),r.addToWindow(i)),this._watchAngularEvents(),e.run(()=>{this.taskTrackingZone=typeof Zone>"u"?null:Zone.current.get("TaskTrackingZone")})}_watchAngularEvents(){this._ngZone.onUnstable.subscribe({next:()=>{this._didWork=!0,this._isZoneStable=!1}}),this._ngZone.runOutsideAngular(()=>{this._ngZone.onStable.subscribe({next:()=>{Ln.assertNotInAngularZone(),WM(()=>{this._isZoneStable=!0,this._runCallbacksIfReady()})}})})}increasePendingRequestCount(){return this._pendingCount+=1,this._didWork=!0,this._pendingCount}decreasePendingRequestCount(){if(this._pendingCount-=1,this._pendingCount<0)throw new Error("pending async requests below zero");return this._runCallbacksIfReady(),this._pendingCount}isStable(){return this._isZoneStable&&0===this._pendingCount&&!this._ngZone.hasPendingMacrotasks}_runCallbacksIfReady(){if(this.isStable())WM(()=>{for(;0!==this._callbacks.length;){let e=this._callbacks.pop();clearTimeout(e.timeoutId),e.doneCb(this._didWork)}this._didWork=!1});else{let e=this.getPendingTasks();this._callbacks=this._callbacks.filter(i=>!i.updateCb||!i.updateCb(e)||(clearTimeout(i.timeoutId),!1)),this._didWork=!0}}getPendingTasks(){return this.taskTrackingZone?this.taskTrackingZone.macroTasks.map(e=>({source:e.source,creationLocation:e.creationLocation,data:e.data})):[]}addCallback(e,i,r){let s=-1;i&&i>0&&(s=setTimeout(()=>{this._callbacks=this._callbacks.filter(d=>d.timeoutId!==s),e(this._didWork,this.getPendingTasks())},i)),this._callbacks.push({doneCb:e,timeoutId:s,updateCb:r})}whenStable(e,i,r){if(r&&!this.taskTrackingZone)throw new Error('Task tracking zone is required when passing an update callback to whenStable(). Is "zone.js/plugins/task-tracking" loaded?');this.addCallback(e,i,r),this._runCallbacksIfReady()}getPendingRequestCount(){return this._pendingCount}registerApplication(e){this.registry.registerApplication(e,this)}unregisterApplication(e){this.registry.unregisterApplication(e)}findProviders(e,i,r){return[]}}return t.\u0275fac=function(e){return new(e||t)(we(Ln),we(YM),we(Vx))},t.\u0275prov=rt({token:t,factory:t.\u0275fac}),t})(),YM=(()=>{class t{constructor(){this._applications=new Map}registerApplication(e,i){this._applications.set(e,i)}unregisterApplication(e){this._applications.delete(e)}unregisterAllApplications(){this._applications.clear()}getTestability(e){return this._applications.get(e)||null}getAllTestabilities(){return Array.from(this._applications.values())}getAllRootElements(){return Array.from(this._applications.keys())}findTestabilityInTree(e,i=!0){return KM?.findTestabilityInTree(this,e,i)??null}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=rt({token:t,factory:t.\u0275fac,providedIn:"platform"}),t})(),Zh=null;const PI=new vt("AllowMultipleToken"),QM=new vt("PlatformDestroyListeners");class OI{constructor(n,e){this.name=n,this.token=e}}function LI(t,n,e=[]){const i=`Platform: ${n}`,r=new vt(i);return(s=[])=>{let d=JM();if(!d||d.injector.get(PI,!1)){const _=[...e,...s,{provide:r,useValue:!0}];t?t(_):function Zz(t){if(Zh&&!Zh.get(PI,!1))throw new mt(400,!1);Zh=t;const n=t.get(NI);(function FI(t){const n=t.get(DI,null);n&&n.forEach(e=>e())})(t)}(function BI(t=[],n){return Or.create({name:n,providers:[{provide:ng,useValue:"platform"},{provide:QM,useValue:new Set([()=>Zh=null])},...t]})}(_,i))}return function Yz(t){const n=JM();if(!n)throw new mt(401,!1);return n}()}}function JM(){return Zh?.get(NI)??null}let NI=(()=>{class t{constructor(e){this._injector=e,this._modules=[],this._destroyListeners=[],this._destroyed=!1}bootstrapModuleFactory(e,i){const r=function VI(t,n){let e;return e="noop"===t?new Hz:("zone.js"===t?void 0:t)||new Ln(n),e}(i?.ngZone,function zI(t){return{enableLongStackTrace:!1,shouldCoalesceEventChangeDetection:!(!t||!t.ngZoneEventCoalescing)||!1,shouldCoalesceRunChangeDetection:!(!t||!t.ngZoneRunCoalescing)||!1}}(i)),s=[{provide:Ln,useValue:r}];return r.run(()=>{const d=Or.create({providers:s,parent:this.injector,name:e.moduleType.name}),_=e.create(d),w=_.injector.get(Ho,null);if(!w)throw new mt(402,!1);return r.runOutsideAngular(()=>{const S=r.onError.subscribe({next:I=>{w.handleError(I)}});_.onDestroy(()=>{Gx(this._modules,_),S.unsubscribe()})}),function GI(t,n,e){try{const i=e();return ia(i)?i.catch(r=>{throw n.runOutsideAngular(()=>t.handleError(r)),r}):i}catch(i){throw n.runOutsideAngular(()=>t.handleError(i)),i}}(w,r,()=>{const S=_.injector.get(zx);return S.runInitializers(),S.donePromise.then(()=>(function pA(t){ho(t,"Expected localeId to be defined"),"string"==typeof t&&(hA=t.toLowerCase().replace(/_/g,"-"))}(_.injector.get(cu,Bg)||Bg),this._moduleDoBootstrap(_),_))})})}bootstrapModule(e,i=[]){const r=UI({},i);return function Wz(t,n,e){const i=new AM(e);return Promise.resolve(i)}(0,0,e).then(s=>this.bootstrapModuleFactory(s,r))}_moduleDoBootstrap(e){const i=e.injector.get(jg);if(e._bootstrapComponents.length>0)e._bootstrapComponents.forEach(r=>i.bootstrap(r));else{if(!e.instance.ngDoBootstrap)throw new mt(-403,!1);e.instance.ngDoBootstrap(i)}this._modules.push(e)}onDestroy(e){this._destroyListeners.push(e)}get injector(){return this._injector}destroy(){if(this._destroyed)throw new mt(404,!1);this._modules.slice().forEach(i=>i.destroy()),this._destroyListeners.forEach(i=>i());const e=this._injector.get(QM,null);e&&(e.forEach(i=>i()),e.clear()),this._destroyed=!0}get destroyed(){return this._destroyed}}return t.\u0275fac=function(e){return new(e||t)(we(Or))},t.\u0275prov=rt({token:t,factory:t.\u0275fac,providedIn:"platform"}),t})();function UI(t,n){return Array.isArray(n)?n.reduce(UI,t):{...t,...n}}let jg=(()=>{class t{get destroyed(){return this._destroyed}get injector(){return this._injector}constructor(e,i,r){this._zone=e,this._injector=i,this._exceptionHandler=r,this._bootstrapListeners=[],this._views=[],this._runningTick=!1,this._stable=!0,this._destroyed=!1,this._destroyListeners=[],this.componentTypes=[],this.components=[],this._onMicrotaskEmptySubscription=this._zone.onMicrotaskEmpty.subscribe({next:()=>{this._zone.run(()=>{this.tick()})}});const s=new xn(_=>{this._stable=this._zone.isStable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks,this._zone.runOutsideAngular(()=>{_.next(this._stable),_.complete()})}),d=new xn(_=>{let w;this._zone.runOutsideAngular(()=>{w=this._zone.onStable.subscribe(()=>{Ln.assertNotInAngularZone(),WM(()=>{!this._stable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks&&(this._stable=!0,_.next(!0))})})});const S=this._zone.onUnstable.subscribe(()=>{Ln.assertInAngularZone(),this._stable&&(this._stable=!1,this._zone.runOutsideAngular(()=>{_.next(!1)}))});return()=>{w.unsubscribe(),S.unsubscribe()}});this.isStable=mr(s,d.pipe(Vt()))}bootstrap(e,i){const r=e instanceof Nb;if(!this._injector.get(zx).done)throw!r&&function Lc(t){const n=Ei(t)||po(t)||Qr(t);return null!==n&&n.standalone}(e),new mt(405,false);let d;d=r?e:this._injector.get($r).resolveComponentFactory(e),this.componentTypes.push(d.componentType);const _=function qz(t){return t.isBoundToModule}(d)?void 0:this._injector.get(Ng),S=d.create(Or.NULL,[],i||d.selector,_),I=S.location.nativeElement,L=S.injector.get(RI,null);return L?.registerApplication(I),S.onDestroy(()=>{this.detachView(S.hostView),Gx(this.components,S),L?.unregisterApplication(I)}),this._loadComponent(S),S}tick(){if(this._runningTick)throw new mt(101,!1);try{this._runningTick=!0;for(let e of this._views)e.detectChanges()}catch(e){this._zone.runOutsideAngular(()=>this._exceptionHandler.handleError(e))}finally{this._runningTick=!1}}attachView(e){const i=e;this._views.push(i),i.attachToAppRef(this)}detachView(e){const i=e;Gx(this._views,i),i.detachFromAppRef()}_loadComponent(e){this.attachView(e.hostView),this.tick(),this.components.push(e);const i=this._injector.get($M,[]);i.push(...this._bootstrapListeners),i.forEach(r=>r(e))}ngOnDestroy(){if(!this._destroyed)try{this._destroyListeners.forEach(e=>e()),this._views.slice().forEach(e=>e.destroy()),this._onMicrotaskEmptySubscription.unsubscribe()}finally{this._destroyed=!0,this._views=[],this._bootstrapListeners=[],this._destroyListeners=[]}}onDestroy(e){return this._destroyListeners.push(e),()=>Gx(this._destroyListeners,e)}destroy(){if(this._destroyed)throw new mt(406,!1);const e=this._injector;e.destroy&&!e.destroyed&&e.destroy()}get viewCount(){return this._views.length}warnIfDestroyed(){}}return t.\u0275fac=function(e){return new(e||t)(we(Ln),we(Cl),we(Ho))},t.\u0275prov=rt({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();function Gx(t,n){const e=t.indexOf(n);e>-1&&t.splice(e,1)}let Lr=(()=>{class t{}return t.__NG_ELEMENT_ID__=Qz,t})();function Qz(t){return function Jz(t,n,e){if(Ql(t)&&!e){const i=or(t.index,n);return new bs(i,i)}return 47&t.type?new bs(n[16],n):null}(Ur(),Dt(),16==(16&t))}class qI{constructor(){}supports(n){return ue(n)}create(n){return new oV(n)}}const rV=(t,n)=>n;class oV{constructor(n){this.length=0,this._linkedRecords=null,this._unlinkedRecords=null,this._previousItHead=null,this._itHead=null,this._itTail=null,this._additionsHead=null,this._additionsTail=null,this._movesHead=null,this._movesTail=null,this._removalsHead=null,this._removalsTail=null,this._identityChangesHead=null,this._identityChangesTail=null,this._trackByFn=n||rV}forEachItem(n){let e;for(e=this._itHead;null!==e;e=e._next)n(e)}forEachOperation(n){let e=this._itHead,i=this._removalsHead,r=0,s=null;for(;e||i;){const d=!i||e&&e.currentIndex{d=this._trackByFn(r,_),null!==e&&Object.is(e.trackById,d)?(i&&(e=this._verifyReinsertion(e,_,d,r)),Object.is(e.item,_)||this._addIdentityChange(e,_)):(e=this._mismatch(e,_,d,r),i=!0),e=e._next,r++}),this.length=r;return this._truncate(e),this.collection=n,this.isDirty}get isDirty(){return null!==this._additionsHead||null!==this._movesHead||null!==this._removalsHead||null!==this._identityChangesHead}_reset(){if(this.isDirty){let n;for(n=this._previousItHead=this._itHead;null!==n;n=n._next)n._nextPrevious=n._next;for(n=this._additionsHead;null!==n;n=n._nextAdded)n.previousIndex=n.currentIndex;for(this._additionsHead=this._additionsTail=null,n=this._movesHead;null!==n;n=n._nextMoved)n.previousIndex=n.currentIndex;this._movesHead=this._movesTail=null,this._removalsHead=this._removalsTail=null,this._identityChangesHead=this._identityChangesTail=null}}_mismatch(n,e,i,r){let s;return null===n?s=this._itTail:(s=n._prev,this._remove(n)),null!==(n=null===this._unlinkedRecords?null:this._unlinkedRecords.get(i,null))?(Object.is(n.item,e)||this._addIdentityChange(n,e),this._reinsertAfter(n,s,r)):null!==(n=null===this._linkedRecords?null:this._linkedRecords.get(i,r))?(Object.is(n.item,e)||this._addIdentityChange(n,e),this._moveAfter(n,s,r)):n=this._addAfter(new sV(e,i),s,r),n}_verifyReinsertion(n,e,i,r){let s=null===this._unlinkedRecords?null:this._unlinkedRecords.get(i,null);return null!==s?n=this._reinsertAfter(s,n._prev,r):n.currentIndex!=r&&(n.currentIndex=r,this._addToMoves(n,r)),n}_truncate(n){for(;null!==n;){const e=n._next;this._addToRemovals(this._unlink(n)),n=e}null!==this._unlinkedRecords&&this._unlinkedRecords.clear(),null!==this._additionsTail&&(this._additionsTail._nextAdded=null),null!==this._movesTail&&(this._movesTail._nextMoved=null),null!==this._itTail&&(this._itTail._next=null),null!==this._removalsTail&&(this._removalsTail._nextRemoved=null),null!==this._identityChangesTail&&(this._identityChangesTail._nextIdentityChange=null)}_reinsertAfter(n,e,i){null!==this._unlinkedRecords&&this._unlinkedRecords.remove(n);const r=n._prevRemoved,s=n._nextRemoved;return null===r?this._removalsHead=s:r._nextRemoved=s,null===s?this._removalsTail=r:s._prevRemoved=r,this._insertAfter(n,e,i),this._addToMoves(n,i),n}_moveAfter(n,e,i){return this._unlink(n),this._insertAfter(n,e,i),this._addToMoves(n,i),n}_addAfter(n,e,i){return this._insertAfter(n,e,i),this._additionsTail=null===this._additionsTail?this._additionsHead=n:this._additionsTail._nextAdded=n,n}_insertAfter(n,e,i){const r=null===e?this._itHead:e._next;return n._next=r,n._prev=e,null===r?this._itTail=n:r._prev=n,null===e?this._itHead=n:e._next=n,null===this._linkedRecords&&(this._linkedRecords=new ZI),this._linkedRecords.put(n),n.currentIndex=i,n}_remove(n){return this._addToRemovals(this._unlink(n))}_unlink(n){null!==this._linkedRecords&&this._linkedRecords.remove(n);const e=n._prev,i=n._next;return null===e?this._itHead=i:e._next=i,null===i?this._itTail=e:i._prev=e,n}_addToMoves(n,e){return n.previousIndex===e||(this._movesTail=null===this._movesTail?this._movesHead=n:this._movesTail._nextMoved=n),n}_addToRemovals(n){return null===this._unlinkedRecords&&(this._unlinkedRecords=new ZI),this._unlinkedRecords.put(n),n.currentIndex=null,n._nextRemoved=null,null===this._removalsTail?(this._removalsTail=this._removalsHead=n,n._prevRemoved=null):(n._prevRemoved=this._removalsTail,this._removalsTail=this._removalsTail._nextRemoved=n),n}_addIdentityChange(n,e){return n.item=e,this._identityChangesTail=null===this._identityChangesTail?this._identityChangesHead=n:this._identityChangesTail._nextIdentityChange=n,n}}class sV{constructor(n,e){this.item=n,this.trackById=e,this.currentIndex=null,this.previousIndex=null,this._nextPrevious=null,this._prev=null,this._next=null,this._prevDup=null,this._nextDup=null,this._prevRemoved=null,this._nextRemoved=null,this._nextAdded=null,this._nextMoved=null,this._nextIdentityChange=null}}class aV{constructor(){this._head=null,this._tail=null}add(n){null===this._head?(this._head=this._tail=n,n._nextDup=null,n._prevDup=null):(this._tail._nextDup=n,n._prevDup=this._tail,n._nextDup=null,this._tail=n)}get(n,e){let i;for(i=this._head;null!==i;i=i._nextDup)if((null===e||e<=i.currentIndex)&&Object.is(i.trackById,n))return i;return null}remove(n){const e=n._prevDup,i=n._nextDup;return null===e?this._head=i:e._nextDup=i,null===i?this._tail=e:i._prevDup=e,null===this._head}}class ZI{constructor(){this.map=new Map}put(n){const e=n.trackById;let i=this.map.get(e);i||(i=new aV,this.map.set(e,i)),i.add(n)}get(n,e){const r=this.map.get(n);return r?r.get(n,e):null}remove(n){const e=n.trackById;return this.map.get(e).remove(n)&&this.map.delete(e),n}get isEmpty(){return 0===this.map.size}clear(){this.map.clear()}}function XI(t,n,e){const i=t.previousIndex;if(null===i)return i;let r=0;return e&&i{if(e&&e.key===r)this._maybeAddToChanges(e,i),this._appendAfter=e,e=e._next;else{const s=this._getOrCreateRecordForKey(r,i);e=this._insertBeforeOrAppend(e,s)}}),e){e._prev&&(e._prev._next=null),this._removalsHead=e;for(let i=e;null!==i;i=i._nextRemoved)i===this._mapHead&&(this._mapHead=null),this._records.delete(i.key),i._nextRemoved=i._next,i.previousValue=i.currentValue,i.currentValue=null,i._prev=null,i._next=null}return this._changesTail&&(this._changesTail._nextChanged=null),this._additionsTail&&(this._additionsTail._nextAdded=null),this.isDirty}_insertBeforeOrAppend(n,e){if(n){const i=n._prev;return e._next=n,e._prev=i,n._prev=e,i&&(i._next=e),n===this._mapHead&&(this._mapHead=e),this._appendAfter=n,n}return this._appendAfter?(this._appendAfter._next=e,e._prev=this._appendAfter):this._mapHead=e,this._appendAfter=e,null}_getOrCreateRecordForKey(n,e){if(this._records.has(n)){const r=this._records.get(n);this._maybeAddToChanges(r,e);const s=r._prev,d=r._next;return s&&(s._next=d),d&&(d._prev=s),r._next=null,r._prev=null,r}const i=new cV(n);return this._records.set(n,i),i.currentValue=e,this._addToAdditions(i),i}_reset(){if(this.isDirty){let n;for(this._previousMapHead=this._mapHead,n=this._previousMapHead;null!==n;n=n._next)n._nextPrevious=n._next;for(n=this._changesHead;null!==n;n=n._nextChanged)n.previousValue=n.currentValue;for(n=this._additionsHead;null!=n;n=n._nextAdded)n.previousValue=n.currentValue;this._changesHead=this._changesTail=null,this._additionsHead=this._additionsTail=null,this._removalsHead=null}}_maybeAddToChanges(n,e){Object.is(e,n.currentValue)||(n.previousValue=n.currentValue,n.currentValue=e,this._addToChanges(n))}_addToAdditions(n){null===this._additionsHead?this._additionsHead=this._additionsTail=n:(this._additionsTail._nextAdded=n,this._additionsTail=n)}_addToChanges(n){null===this._changesHead?this._changesHead=this._changesTail=n:(this._changesTail._nextChanged=n,this._changesTail=n)}_forEach(n,e){n instanceof Map?n.forEach(e):Object.keys(n).forEach(i=>e(n[i],i))}}class cV{constructor(n){this.key=n,this.previousValue=null,this.currentValue=null,this._nextPrevious=null,this._next=null,this._prev=null,this._nextAdded=null,this._nextRemoved=null,this._nextChanged=null}}function KI(){return new uu([new qI])}let uu=(()=>{class t{constructor(e){this.factories=e}static create(e,i){if(null!=i){const r=i.factories.slice();e=e.concat(r)}return new t(e)}static extend(e){return{provide:t,useFactory:i=>t.create(e,i||KI()),deps:[[t,new Hr,new $i]]}}find(e){const i=this.factories.find(r=>r.supports(e));if(null!=i)return i;throw new mt(901,!1)}}return t.\u0275prov=rt({token:t,providedIn:"root",factory:KI}),t})();function QI(){return new Tf([new YI])}let Tf=(()=>{class t{constructor(e){this.factories=e}static create(e,i){if(i){const r=i.factories.slice();e=e.concat(r)}return new t(e)}static extend(e){return{provide:t,useFactory:i=>t.create(e,i||QI()),deps:[[t,new Hr,new $i]]}}find(e){const i=this.factories.find(r=>r.supports(e));if(i)return i;throw new mt(901,!1)}}return t.\u0275prov=rt({token:t,providedIn:"root",factory:QI}),t})();const hV=LI(null,"core",[]);let pV=(()=>{class t{constructor(e){}}return t.\u0275fac=function(e){return new(e||t)(we(jg))},t.\u0275mod=cn({type:t}),t.\u0275inj=nn({}),t})();function Hg(t){return"boolean"==typeof t?t:null!=t&&"false"!==t}let rS=null;function du(){return rS}class gV{}const Bn=new vt("DocumentToken");let oS=(()=>{class t{historyGo(e){throw new Error("Not implemented")}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=rt({token:t,factory:function(){return function _V(){return we(JI)}()},providedIn:"platform"}),t})();const yV=new vt("Location Initialized");let JI=(()=>{class t extends oS{constructor(e){super(),this._doc=e,this._location=window.location,this._history=window.history}getBaseHrefFromDOM(){return du().getBaseHref(this._doc)}onPopState(e){const i=du().getGlobalEventTarget(this._doc,"window");return i.addEventListener("popstate",e,!1),()=>i.removeEventListener("popstate",e)}onHashChange(e){const i=du().getGlobalEventTarget(this._doc,"window");return i.addEventListener("hashchange",e,!1),()=>i.removeEventListener("hashchange",e)}get href(){return this._location.href}get protocol(){return this._location.protocol}get hostname(){return this._location.hostname}get port(){return this._location.port}get pathname(){return this._location.pathname}get search(){return this._location.search}get hash(){return this._location.hash}set pathname(e){this._location.pathname=e}pushState(e,i,r){ek()?this._history.pushState(e,i,r):this._location.hash=r}replaceState(e,i,r){ek()?this._history.replaceState(e,i,r):this._location.hash=r}forward(){this._history.forward()}back(){this._history.back()}historyGo(e=0){this._history.go(e)}getState(){return this._history.state}}return t.\u0275fac=function(e){return new(e||t)(we(Bn))},t.\u0275prov=rt({token:t,factory:function(){return function vV(){return new JI(we(Bn))}()},providedIn:"platform"}),t})();function ek(){return!!window.history.pushState}function sS(t,n){if(0==t.length)return n;if(0==n.length)return t;let e=0;return t.endsWith("/")&&e++,n.startsWith("/")&&e++,2==e?t+n.substring(1):1==e?t+n:t+"/"+n}function tk(t){const n=t.match(/#|\?|$/),e=n&&n.index||t.length;return t.slice(0,e-("/"===t[e-1]?1:0))+t.slice(e)}function vd(t){return t&&"?"!==t[0]?"?"+t:t}let Af=(()=>{class t{historyGo(e){throw new Error("Not implemented")}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=rt({token:t,factory:function(){return Fn(ik)},providedIn:"root"}),t})();const nk=new vt("appBaseHref");let ik=(()=>{class t extends Af{constructor(e,i){super(),this._platformLocation=e,this._removeListenerFns=[],this._baseHref=i??this._platformLocation.getBaseHrefFromDOM()??Fn(Bn).location?.origin??""}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(e){this._removeListenerFns.push(this._platformLocation.onPopState(e),this._platformLocation.onHashChange(e))}getBaseHref(){return this._baseHref}prepareExternalUrl(e){return sS(this._baseHref,e)}path(e=!1){const i=this._platformLocation.pathname+vd(this._platformLocation.search),r=this._platformLocation.hash;return r&&e?`${i}${r}`:i}pushState(e,i,r,s){const d=this.prepareExternalUrl(r+vd(s));this._platformLocation.pushState(e,i,d)}replaceState(e,i,r,s){const d=this.prepareExternalUrl(r+vd(s));this._platformLocation.replaceState(e,i,d)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(e=0){this._platformLocation.historyGo?.(e)}}return t.\u0275fac=function(e){return new(e||t)(we(oS),we(nk,8))},t.\u0275prov=rt({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),bV=(()=>{class t extends Af{constructor(e,i){super(),this._platformLocation=e,this._baseHref="",this._removeListenerFns=[],null!=i&&(this._baseHref=i)}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(e){this._removeListenerFns.push(this._platformLocation.onPopState(e),this._platformLocation.onHashChange(e))}getBaseHref(){return this._baseHref}path(e=!1){let i=this._platformLocation.hash;return null==i&&(i="#"),i.length>0?i.substring(1):i}prepareExternalUrl(e){const i=sS(this._baseHref,e);return i.length>0?"#"+i:i}pushState(e,i,r,s){let d=this.prepareExternalUrl(r+vd(s));0==d.length&&(d=this._platformLocation.pathname),this._platformLocation.pushState(e,i,d)}replaceState(e,i,r,s){let d=this.prepareExternalUrl(r+vd(s));0==d.length&&(d=this._platformLocation.pathname),this._platformLocation.replaceState(e,i,d)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(e=0){this._platformLocation.historyGo?.(e)}}return t.\u0275fac=function(e){return new(e||t)(we(oS),we(nk,8))},t.\u0275prov=rt({token:t,factory:t.\u0275fac}),t})(),yv=(()=>{class t{constructor(e){this._subject=new In,this._urlChangeListeners=[],this._urlChangeSubscription=null,this._locationStrategy=e;const i=this._locationStrategy.getBaseHref();this._basePath=function CV(t){if(new RegExp("^(https?:)?//").test(t)){const[,e]=t.split(/\/\/[^\/]+/);return e}return t}(tk(rk(i))),this._locationStrategy.onPopState(r=>{this._subject.emit({url:this.path(!0),pop:!0,state:r.state,type:r.type})})}ngOnDestroy(){this._urlChangeSubscription?.unsubscribe(),this._urlChangeListeners=[]}path(e=!1){return this.normalize(this._locationStrategy.path(e))}getState(){return this._locationStrategy.getState()}isCurrentPathEqualTo(e,i=""){return this.path()==this.normalize(e+vd(i))}normalize(e){return t.stripTrailingSlash(function wV(t,n){return t&&new RegExp(`^${t}([/;?#]|$)`).test(n)?n.substring(t.length):n}(this._basePath,rk(e)))}prepareExternalUrl(e){return e&&"/"!==e[0]&&(e="/"+e),this._locationStrategy.prepareExternalUrl(e)}go(e,i="",r=null){this._locationStrategy.pushState(r,"",e,i),this._notifyUrlChangeListeners(this.prepareExternalUrl(e+vd(i)),r)}replaceState(e,i="",r=null){this._locationStrategy.replaceState(r,"",e,i),this._notifyUrlChangeListeners(this.prepareExternalUrl(e+vd(i)),r)}forward(){this._locationStrategy.forward()}back(){this._locationStrategy.back()}historyGo(e=0){this._locationStrategy.historyGo?.(e)}onUrlChange(e){return this._urlChangeListeners.push(e),this._urlChangeSubscription||(this._urlChangeSubscription=this.subscribe(i=>{this._notifyUrlChangeListeners(i.url,i.state)})),()=>{const i=this._urlChangeListeners.indexOf(e);this._urlChangeListeners.splice(i,1),0===this._urlChangeListeners.length&&(this._urlChangeSubscription?.unsubscribe(),this._urlChangeSubscription=null)}}_notifyUrlChangeListeners(e="",i){this._urlChangeListeners.forEach(r=>r(e,i))}subscribe(e,i,r){return this._subject.subscribe({next:e,error:i,complete:r})}}return t.normalizeQueryParams=vd,t.joinWithSlash=sS,t.stripTrailingSlash=tk,t.\u0275fac=function(e){return new(e||t)(we(Af))},t.\u0275prov=rt({token:t,factory:function(){return function xV(){return new yv(we(Af))}()},providedIn:"root"}),t})();function rk(t){return t.replace(/\/index.html$/,"")}var Aa=(()=>((Aa=Aa||{})[Aa.Decimal=0]="Decimal",Aa[Aa.Percent=1]="Percent",Aa[Aa.Currency=2]="Currency",Aa[Aa.Scientific=3]="Scientific",Aa))(),$n=(()=>(($n=$n||{})[$n.Decimal=0]="Decimal",$n[$n.Group=1]="Group",$n[$n.List=2]="List",$n[$n.PercentSign=3]="PercentSign",$n[$n.PlusSign=4]="PlusSign",$n[$n.MinusSign=5]="MinusSign",$n[$n.Exponential=6]="Exponential",$n[$n.SuperscriptingExponent=7]="SuperscriptingExponent",$n[$n.PerMille=8]="PerMille",$n[$n.Infinity=9]="Infinity",$n[$n.NaN=10]="NaN",$n[$n.TimeSeparator=11]="TimeSeparator",$n[$n.CurrencyDecimal=12]="CurrencyDecimal",$n[$n.CurrencyGroup=13]="CurrencyGroup",$n))();function kl(t,n){const e=ra(t),i=e[sn.NumberSymbols][n];if(typeof i>"u"){if(n===$n.CurrencyDecimal)return e[sn.NumberSymbols][$n.Decimal];if(n===$n.CurrencyGroup)return e[sn.NumberSymbols][$n.Group]}return i}const XV=/^(\d+)?\.((\d+)(-(\d+))?)?$/;function fS(t){const n=parseInt(t);if(isNaN(n))throw new Error("Invalid integer literal when parsing "+t);return n}function pk(t,n){n=encodeURIComponent(n);for(const e of t.split(";")){const i=e.indexOf("="),[r,s]=-1==i?[e,""]:[e.slice(0,i),e.slice(i+1)];if(r.trim()===n)return decodeURIComponent(s)}return null}const gS=/\s+/,fk=[];let If=(()=>{class t{constructor(e,i,r,s){this._iterableDiffers=e,this._keyValueDiffers=i,this._ngEl=r,this._renderer=s,this.initialClasses=fk,this.stateMap=new Map}set klass(e){this.initialClasses=null!=e?e.trim().split(gS):fk}set ngClass(e){this.rawClass="string"==typeof e?e.trim().split(gS):e}ngDoCheck(){for(const i of this.initialClasses)this._updateState(i,!0);const e=this.rawClass;if(Array.isArray(e)||e instanceof Set)for(const i of e)this._updateState(i,!0);else if(null!=e)for(const i of Object.keys(e))this._updateState(i,Boolean(e[i]));this._applyStateDiff()}_updateState(e,i){const r=this.stateMap.get(e);void 0!==r?(r.enabled!==i&&(r.changed=!0,r.enabled=i),r.touched=!0):this.stateMap.set(e,{enabled:i,changed:!0,touched:!0})}_applyStateDiff(){for(const e of this.stateMap){const i=e[0],r=e[1];r.changed?(this._toggleClass(i,r.enabled),r.changed=!1):r.touched||(r.enabled&&this._toggleClass(i,!1),this.stateMap.delete(i)),r.touched=!1}}_toggleClass(e,i){(e=e.trim()).length>0&&e.split(gS).forEach(r=>{i?this._renderer.addClass(this._ngEl.nativeElement,r):this._renderer.removeClass(this._ngEl.nativeElement,r)})}}return t.\u0275fac=function(e){return new(e||t)(z(uu),z(Tf),z($t),z(Da))},t.\u0275dir=Ge({type:t,selectors:[["","ngClass",""]],inputs:{klass:["class","klass"],ngClass:"ngClass"},standalone:!0}),t})();class l5{constructor(n,e,i,r){this.$implicit=n,this.ngForOf=e,this.index=i,this.count=r}get first(){return 0===this.index}get last(){return this.index===this.count-1}get even(){return this.index%2==0}get odd(){return!this.even}}let $g=(()=>{class t{set ngForOf(e){this._ngForOf=e,this._ngForOfDirty=!0}set ngForTrackBy(e){this._trackByFn=e}get ngForTrackBy(){return this._trackByFn}constructor(e,i,r){this._viewContainer=e,this._template=i,this._differs=r,this._ngForOf=null,this._ngForOfDirty=!0,this._differ=null}set ngForTemplate(e){e&&(this._template=e)}ngDoCheck(){if(this._ngForOfDirty){this._ngForOfDirty=!1;const e=this._ngForOf;!this._differ&&e&&(this._differ=this._differs.find(e).create(this.ngForTrackBy))}if(this._differ){const e=this._differ.diff(this._ngForOf);e&&this._applyChanges(e)}}_applyChanges(e){const i=this._viewContainer;e.forEachOperation((r,s,d)=>{if(null==r.previousIndex)i.createEmbeddedView(this._template,new l5(r.item,this._ngForOf,-1,-1),null===d?void 0:d);else if(null==d)i.remove(null===s?void 0:s);else if(null!==s){const _=i.get(s);i.move(_,d),_k(_,r)}});for(let r=0,s=i.length;r{_k(i.get(r.currentIndex),r)})}static ngTemplateContextGuard(e,i){return!0}}return t.\u0275fac=function(e){return new(e||t)(z(ro),z(Fr),z(uu))},t.\u0275dir=Ge({type:t,selectors:[["","ngFor","","ngForOf",""]],inputs:{ngForOf:"ngForOf",ngForTrackBy:"ngForTrackBy",ngForTemplate:"ngForTemplate"},standalone:!0}),t})();function _k(t,n){t.context.$implicit=n.item}let Ya=(()=>{class t{constructor(e,i){this._viewContainer=e,this._context=new u5,this._thenTemplateRef=null,this._elseTemplateRef=null,this._thenViewRef=null,this._elseViewRef=null,this._thenTemplateRef=i}set ngIf(e){this._context.$implicit=this._context.ngIf=e,this._updateView()}set ngIfThen(e){yk("ngIfThen",e),this._thenTemplateRef=e,this._thenViewRef=null,this._updateView()}set ngIfElse(e){yk("ngIfElse",e),this._elseTemplateRef=e,this._elseViewRef=null,this._updateView()}_updateView(){this._context.$implicit?this._thenViewRef||(this._viewContainer.clear(),this._elseViewRef=null,this._thenTemplateRef&&(this._thenViewRef=this._viewContainer.createEmbeddedView(this._thenTemplateRef,this._context))):this._elseViewRef||(this._viewContainer.clear(),this._thenViewRef=null,this._elseTemplateRef&&(this._elseViewRef=this._viewContainer.createEmbeddedView(this._elseTemplateRef,this._context)))}static ngTemplateContextGuard(e,i){return!0}}return t.\u0275fac=function(e){return new(e||t)(z(ro),z(Fr))},t.\u0275dir=Ge({type:t,selectors:[["","ngIf",""]],inputs:{ngIf:"ngIf",ngIfThen:"ngIfThen",ngIfElse:"ngIfElse"},standalone:!0}),t})();class u5{constructor(){this.$implicit=null,this.ngIf=null}}function yk(t,n){if(n&&!n.createEmbeddedView)throw new Error(`${t} must be a TemplateRef, but received '${ki(n)}'.`)}class _S{constructor(n,e){this._viewContainerRef=n,this._templateRef=e,this._created=!1}create(){this._created=!0,this._viewContainerRef.createEmbeddedView(this._templateRef)}destroy(){this._created=!1,this._viewContainerRef.clear()}enforceState(n){n&&!this._created?this.create():!n&&this._created&&this.destroy()}}let kf=(()=>{class t{constructor(){this._defaultViews=[],this._defaultUsed=!1,this._caseCount=0,this._lastCaseCheckIndex=0,this._lastCasesMatched=!1}set ngSwitch(e){this._ngSwitch=e,0===this._caseCount&&this._updateDefaultCases(!0)}_addCase(){return this._caseCount++}_addDefault(e){this._defaultViews.push(e)}_matchCase(e){const i=e==this._ngSwitch;return this._lastCasesMatched=this._lastCasesMatched||i,this._lastCaseCheckIndex++,this._lastCaseCheckIndex===this._caseCount&&(this._updateDefaultCases(!this._lastCasesMatched),this._lastCaseCheckIndex=0,this._lastCasesMatched=!1),i}_updateDefaultCases(e){if(this._defaultViews.length>0&&e!==this._defaultUsed){this._defaultUsed=e;for(const i of this._defaultViews)i.enforceState(e)}}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=Ge({type:t,selectors:[["","ngSwitch",""]],inputs:{ngSwitch:"ngSwitch"},standalone:!0}),t})(),xv=(()=>{class t{constructor(e,i,r){this.ngSwitch=r,r._addCase(),this._view=new _S(e,i)}ngDoCheck(){this._view.enforceState(this.ngSwitch._matchCase(this.ngSwitchCase))}}return t.\u0275fac=function(e){return new(e||t)(z(ro),z(Fr),z(kf,9))},t.\u0275dir=Ge({type:t,selectors:[["","ngSwitchCase",""]],inputs:{ngSwitchCase:"ngSwitchCase"},standalone:!0}),t})(),yS=(()=>{class t{constructor(e,i,r){r._addDefault(new _S(e,i))}}return t.\u0275fac=function(e){return new(e||t)(z(ro),z(Fr),z(kf,9))},t.\u0275dir=Ge({type:t,selectors:[["","ngSwitchDefault",""]],standalone:!0}),t})(),bS=(()=>{class t{constructor(e){this._viewContainerRef=e,this._viewRef=null,this.ngTemplateOutletContext=null,this.ngTemplateOutlet=null,this.ngTemplateOutletInjector=null}ngOnChanges(e){if(e.ngTemplateOutlet||e.ngTemplateOutletInjector){const i=this._viewContainerRef;if(this._viewRef&&i.remove(i.indexOf(this._viewRef)),this.ngTemplateOutlet){const{ngTemplateOutlet:r,ngTemplateOutletContext:s,ngTemplateOutletInjector:d}=this;this._viewRef=i.createEmbeddedView(r,s,d?{injector:d}:void 0)}else this._viewRef=null}else this._viewRef&&e.ngTemplateOutletContext&&this.ngTemplateOutletContext&&(this._viewRef.context=this.ngTemplateOutletContext)}}return t.\u0275fac=function(e){return new(e||t)(z(ro))},t.\u0275dir=Ge({type:t,selectors:[["","ngTemplateOutlet",""]],inputs:{ngTemplateOutletContext:"ngTemplateOutletContext",ngTemplateOutlet:"ngTemplateOutlet",ngTemplateOutletInjector:"ngTemplateOutletInjector"},standalone:!0,features:[Hi]}),t})();function vc(t,n){return new mt(2100,!1)}class h5{createSubscription(n,e){return n.subscribe({next:e,error:i=>{throw i}})}dispose(n){n.unsubscribe()}}class p5{createSubscription(n,e){return n.then(e,i=>{throw i})}dispose(n){}}const f5=new p5,m5=new h5;let bk=(()=>{class t{constructor(e){this._latestValue=null,this._subscription=null,this._obj=null,this._strategy=null,this._ref=e}ngOnDestroy(){this._subscription&&this._dispose(),this._ref=null}transform(e){return this._obj?e!==this._obj?(this._dispose(),this.transform(e)):this._latestValue:(e&&this._subscribe(e),this._latestValue)}_subscribe(e){this._obj=e,this._strategy=this._selectStrategy(e),this._subscription=this._strategy.createSubscription(e,i=>this._updateLatestValue(e,i))}_selectStrategy(e){if(ia(e))return f5;if(md(e))return m5;throw vc()}_dispose(){this._strategy.dispose(this._subscription),this._latestValue=null,this._subscription=null,this._obj=null}_updateLatestValue(e,i){e===this._obj&&(this._latestValue=i,this._ref.markForCheck())}}return t.\u0275fac=function(e){return new(e||t)(z(Lr,16))},t.\u0275pipe=No({name:"async",type:t,pure:!1,standalone:!0}),t})(),wk=(()=>{class t{constructor(e){this._locale=e}transform(e,i,r){if(!function xS(t){return!(null==t||""===t||t!=t)}(e))return null;r=r||this._locale;try{return function t5(t,n,e){return function hS(t,n,e,i,r,s,d=!1){let _="",w=!1;if(isFinite(t)){let S=function r5(t){let i,r,s,d,_,n=Math.abs(t)+"",e=0;for((r=n.indexOf("."))>-1&&(n=n.replace(".","")),(s=n.search(/e/i))>0?(r<0&&(r=s),r+=+n.slice(s+1),n=n.substring(0,s)):r<0&&(r=n.length),s=0;"0"===n.charAt(s);s++);if(s===(_=n.length))i=[0],r=1;else{for(_--;"0"===n.charAt(_);)_--;for(r-=s,i=[],d=0;s<=_;s++,d++)i[d]=Number(n.charAt(s))}return r>22&&(i=i.splice(0,21),e=r-1,r=1),{digits:i,exponent:e,integerLen:r}}(t);d&&(S=function n5(t){if(0===t.digits[0])return t;const n=t.digits.length-t.integerLen;return t.exponent?t.exponent+=2:(0===n?t.digits.push(0,0):1===n&&t.digits.push(0),t.integerLen+=2),t}(S));let I=n.minInt,L=n.minFrac,H=n.maxFrac;if(s){const It=s.match(XV);if(null===It)throw new Error(`${s} is not a valid digit info`);const _t=It[1],dn=It[3],Qi=It[5];null!=_t&&(I=fS(_t)),null!=dn&&(L=fS(dn)),null!=Qi?H=fS(Qi):null!=dn&&L>H&&(H=L)}!function o5(t,n,e){if(n>e)throw new Error(`The minimum number of digits after fraction (${n}) is higher than the maximum (${e}).`);let i=t.digits,r=i.length-t.integerLen;const s=Math.min(Math.max(n,r),e);let d=s+t.integerLen,_=i[d];if(d>0){i.splice(Math.max(t.integerLen,d));for(let L=d;L=5)if(d-1<0){for(let L=0;L>d;L--)i.unshift(0),t.integerLen++;i.unshift(1),t.integerLen++}else i[d-1]++;for(;r=S?ae.pop():w=!1),H>=10?1:0},0);I&&(i.unshift(I),t.integerLen++)}(S,L,H);let Y=S.digits,ae=S.integerLen;const ve=S.exponent;let Be=[];for(w=Y.every(It=>!It);ae0?Be=Y.splice(ae,Y.length):(Be=Y,Y=[0]);const $e=[];for(Y.length>=n.lgSize&&$e.unshift(Y.splice(-n.lgSize,Y.length).join(""));Y.length>n.gSize;)$e.unshift(Y.splice(-n.gSize,Y.length).join(""));Y.length&&$e.unshift(Y.join("")),_=$e.join(kl(e,i)),Be.length&&(_+=kl(e,r)+Be.join("")),ve&&(_+=kl(e,$n.Exponential)+"+"+ve)}else _=kl(e,$n.Infinity);return _=t<0&&!w?n.negPre+_+n.negSuf:n.posPre+_+n.posSuf,_}(t,function pS(t,n="-"){const e={minInt:1,minFrac:0,maxFrac:0,posPre:"",posSuf:"",negPre:"",negSuf:"",gSize:0,lgSize:0},i=t.split(";"),r=i[0],s=i[1],d=-1!==r.indexOf(".")?r.split("."):[r.substring(0,r.lastIndexOf("0")+1),r.substring(r.lastIndexOf("0")+1)],_=d[0],w=d[1]||"";e.posPre=_.substring(0,_.indexOf("#"));for(let I=0;I{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=cn({type:t}),t.\u0275inj=nn({}),t})();const Ck="browser";function bc(t){return t===Ck}function Rf(t){return"server"===t}let F5=(()=>{class t{}return t.\u0275prov=rt({token:t,providedIn:"root",factory:()=>new L5(we(Bn),window)}),t})();class L5{constructor(n,e){this.document=n,this.window=e,this.offset=()=>[0,0]}setOffset(n){this.offset=Array.isArray(n)?()=>n:n}getScrollPosition(){return this.supportsScrolling()?[this.window.pageXOffset,this.window.pageYOffset]:[0,0]}scrollToPosition(n){this.supportsScrolling()&&this.window.scrollTo(n[0],n[1])}scrollToAnchor(n){if(!this.supportsScrolling())return;const e=function B5(t,n){const e=t.getElementById(n)||t.getElementsByName(n)[0];if(e)return e;if("function"==typeof t.createTreeWalker&&t.body&&(t.body.createShadowRoot||t.body.attachShadow)){const i=t.createTreeWalker(t.body,NodeFilter.SHOW_ELEMENT);let r=i.currentNode;for(;r;){const s=r.shadowRoot;if(s){const d=s.getElementById(n)||s.querySelector(`[name="${n}"]`);if(d)return d}r=i.nextNode()}}return null}(this.document,n);e&&(this.scrollToElement(e),e.focus())}setHistoryScrollRestoration(n){if(this.supportScrollRestoration()){const e=this.window.history;e&&e.scrollRestoration&&(e.scrollRestoration=n)}}scrollToElement(n){const e=n.getBoundingClientRect(),i=e.left+this.window.pageXOffset,r=e.top+this.window.pageYOffset,s=this.offset();this.window.scrollTo(i-s[0],r-s[1])}supportScrollRestoration(){try{if(!this.supportsScrolling())return!1;const n=Mk(this.window.history)||Mk(Object.getPrototypeOf(this.window.history));return!(!n||!n.writable&&!n.set)}catch{return!1}}supportsScrolling(){try{return!!this.window&&!!this.window.scrollTo&&"pageXOffset"in this.window}catch{return!1}}}function Mk(t){return Object.getOwnPropertyDescriptor(t,"scrollRestoration")}class Sk{}class d4 extends gV{constructor(){super(...arguments),this.supportsDOMEvents=!0}}class DS extends d4{static makeCurrent(){!function mV(t){rS||(rS=t)}(new DS)}onAndCancel(n,e,i){return n.addEventListener(e,i,!1),()=>{n.removeEventListener(e,i,!1)}}dispatchEvent(n,e){n.dispatchEvent(e)}remove(n){n.parentNode&&n.parentNode.removeChild(n)}createElement(n,e){return(e=e||this.getDefaultDocument()).createElement(n)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(n){return n.nodeType===Node.ELEMENT_NODE}isShadowRoot(n){return n instanceof DocumentFragment}getGlobalEventTarget(n,e){return"window"===e?window:"document"===e?n:"body"===e?n.body:null}getBaseHref(n){const e=function h4(){return Cv=Cv||document.querySelector("base"),Cv?Cv.getAttribute("href"):null}();return null==e?null:function p4(t){ew=ew||document.createElement("a"),ew.setAttribute("href",t);const n=ew.pathname;return"/"===n.charAt(0)?n:`/${n}`}(e)}resetBaseElement(){Cv=null}getUserAgent(){return window.navigator.userAgent}getCookie(n){return pk(document.cookie,n)}}let ew,Cv=null;const Ik=new vt("TRANSITION_ID"),m4=[{provide:Nx,useFactory:function f4(t,n,e){return()=>{e.get(zx).donePromise.then(()=>{const i=du(),r=n.querySelectorAll(`style[ng-transition="${t}"]`);for(let s=0;s{class t{build(){return new XMLHttpRequest}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=rt({token:t,factory:t.\u0275fac}),t})();const tw=new vt("EventManagerPlugins");let nw=(()=>{class t{constructor(e,i){this._zone=i,this._eventNameToPlugin=new Map,e.forEach(r=>r.manager=this),this._plugins=e.slice().reverse()}addEventListener(e,i,r){return this._findPluginFor(i).addEventListener(e,i,r)}addGlobalEventListener(e,i,r){return this._findPluginFor(i).addGlobalEventListener(e,i,r)}getZone(){return this._zone}_findPluginFor(e){const i=this._eventNameToPlugin.get(e);if(i)return i;const r=this._plugins;for(let s=0;s{class t{constructor(){this._stylesSet=new Set}addStyles(e){const i=new Set;e.forEach(r=>{this._stylesSet.has(r)||(this._stylesSet.add(r),i.add(r))}),this.onStylesAdded(i)}onStylesAdded(e){}getAllStyles(){return Array.from(this._stylesSet)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=rt({token:t,factory:t.\u0275fac}),t})(),Mv=(()=>{class t extends Rk{constructor(e){super(),this._doc=e,this._hostNodes=new Map,this._hostNodes.set(e.head,[])}_addStylesToHost(e,i,r){e.forEach(s=>{const d=this._doc.createElement("style");d.textContent=s,r.push(i.appendChild(d))})}addHost(e){const i=[];this._addStylesToHost(this._stylesSet,e,i),this._hostNodes.set(e,i)}removeHost(e){const i=this._hostNodes.get(e);i&&i.forEach(Pk),this._hostNodes.delete(e)}onStylesAdded(e){this._hostNodes.forEach((i,r)=>{this._addStylesToHost(e,r,i)})}ngOnDestroy(){this._hostNodes.forEach(e=>e.forEach(Pk))}}return t.\u0275fac=function(e){return new(e||t)(we(Bn))},t.\u0275prov=rt({token:t,factory:t.\u0275fac}),t})();function Pk(t){du().remove(t)}const ES={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/",math:"http://www.w3.org/1998/MathML/"},TS=/%COMP%/g;function AS(t,n){return n.flat(100).map(e=>e.replace(TS,t))}function Lk(t){return n=>{if("__ngUnwrap__"===n)return t;!1===t(n)&&(n.preventDefault(),n.returnValue=!1)}}let iw=(()=>{class t{constructor(e,i,r){this.eventManager=e,this.sharedStylesHost=i,this.appId=r,this.rendererByCompId=new Map,this.defaultRenderer=new IS(e)}createRenderer(e,i){if(!e||!i)return this.defaultRenderer;switch(i.encapsulation){case Qo.Emulated:{let r=this.rendererByCompId.get(i.id);return r||(r=new C4(this.eventManager,this.sharedStylesHost,i,this.appId),this.rendererByCompId.set(i.id,r)),r.applyToHost(e),r}case Qo.ShadowDom:return new M4(this.eventManager,this.sharedStylesHost,e,i);default:if(!this.rendererByCompId.has(i.id)){const r=AS(i.id,i.styles);this.sharedStylesHost.addStyles(r),this.rendererByCompId.set(i.id,this.defaultRenderer)}return this.defaultRenderer}}begin(){}end(){}}return t.\u0275fac=function(e){return new(e||t)(we(nw),we(Mv),we(Ug))},t.\u0275prov=rt({token:t,factory:t.\u0275fac}),t})();class IS{constructor(n){this.eventManager=n,this.data=Object.create(null),this.destroyNode=null}destroy(){}createElement(n,e){return e?document.createElementNS(ES[e]||e,n):document.createElement(n)}createComment(n){return document.createComment(n)}createText(n){return document.createTextNode(n)}appendChild(n,e){(Nk(n)?n.content:n).appendChild(e)}insertBefore(n,e,i){n&&(Nk(n)?n.content:n).insertBefore(e,i)}removeChild(n,e){n&&n.removeChild(e)}selectRootElement(n,e){let i="string"==typeof n?document.querySelector(n):n;if(!i)throw new Error(`The selector "${n}" did not match any elements`);return e||(i.textContent=""),i}parentNode(n){return n.parentNode}nextSibling(n){return n.nextSibling}setAttribute(n,e,i,r){if(r){e=r+":"+e;const s=ES[r];s?n.setAttributeNS(s,e,i):n.setAttribute(e,i)}else n.setAttribute(e,i)}removeAttribute(n,e,i){if(i){const r=ES[i];r?n.removeAttributeNS(r,e):n.removeAttribute(`${i}:${e}`)}else n.removeAttribute(e)}addClass(n,e){n.classList.add(e)}removeClass(n,e){n.classList.remove(e)}setStyle(n,e,i,r){r&(rs.DashCase|rs.Important)?n.style.setProperty(e,i,r&rs.Important?"important":""):n.style[e]=i}removeStyle(n,e,i){i&rs.DashCase?n.style.removeProperty(e):n.style[e]=""}setProperty(n,e,i){n[e]=i}setValue(n,e){n.nodeValue=e}listen(n,e,i){return"string"==typeof n?this.eventManager.addGlobalEventListener(n,e,Lk(i)):this.eventManager.addEventListener(n,e,Lk(i))}}function Nk(t){return"TEMPLATE"===t.tagName&&void 0!==t.content}class C4 extends IS{constructor(n,e,i,r){super(n),this.component=i;const s=AS(r+"-"+i.id,i.styles);e.addStyles(s),this.contentAttr=function b4(t){return"_ngcontent-%COMP%".replace(TS,t)}(r+"-"+i.id),this.hostAttr=function x4(t){return"_nghost-%COMP%".replace(TS,t)}(r+"-"+i.id)}applyToHost(n){super.setAttribute(n,this.hostAttr,"")}createElement(n,e){const i=super.createElement(n,e);return super.setAttribute(i,this.contentAttr,""),i}}class M4 extends IS{constructor(n,e,i,r){super(n),this.sharedStylesHost=e,this.hostEl=i,this.shadowRoot=i.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);const s=AS(r.id,r.styles);for(let d=0;d{class t extends kk{constructor(e){super(e)}supports(e){return!0}addEventListener(e,i,r){return e.addEventListener(i,r,!1),()=>this.removeEventListener(e,i,r)}removeEventListener(e,i,r){return e.removeEventListener(i,r)}}return t.\u0275fac=function(e){return new(e||t)(we(Bn))},t.\u0275prov=rt({token:t,factory:t.\u0275fac}),t})();const zk=["alt","control","meta","shift"],D4={"\b":"Backspace","\t":"Tab","\x7f":"Delete","\x1b":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},E4={alt:t=>t.altKey,control:t=>t.ctrlKey,meta:t=>t.metaKey,shift:t=>t.shiftKey};let T4=(()=>{class t extends kk{constructor(e){super(e)}supports(e){return null!=t.parseEventName(e)}addEventListener(e,i,r){const s=t.parseEventName(i),d=t.eventCallback(s.fullKey,r,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>du().onAndCancel(e,s.domEventName,d))}static parseEventName(e){const i=e.toLowerCase().split("."),r=i.shift();if(0===i.length||"keydown"!==r&&"keyup"!==r)return null;const s=t._normalizeKey(i.pop());let d="",_=i.indexOf("code");if(_>-1&&(i.splice(_,1),d="code."),zk.forEach(S=>{const I=i.indexOf(S);I>-1&&(i.splice(I,1),d+=S+".")}),d+=s,0!=i.length||0===s.length)return null;const w={};return w.domEventName=r,w.fullKey=d,w}static matchEventFullKeyCode(e,i){let r=D4[e.key]||e.key,s="";return i.indexOf("code.")>-1&&(r=e.code,s="code."),!(null==r||!r)&&(r=r.toLowerCase()," "===r?r="space":"."===r&&(r="dot"),zk.forEach(d=>{d!==r&&(0,E4[d])(e)&&(s+=d+".")}),s+=r,s===i)}static eventCallback(e,i,r){return s=>{t.matchEventFullKeyCode(s,e)&&r.runGuarded(()=>i(s))}}static _normalizeKey(e){return"esc"===e?"escape":e}}return t.\u0275fac=function(e){return new(e||t)(we(Bn))},t.\u0275prov=rt({token:t,factory:t.\u0275fac}),t})();const R4=LI(hV,"browser",[{provide:zs,useValue:Ck},{provide:DI,useValue:function A4(){DS.makeCurrent()},multi:!0},{provide:Bn,useFactory:function k4(){return function T1(t){Cy=t}(document),document},deps:[]}]),Uk=new vt(""),jk=[{provide:Vx,useClass:class g4{addToWindow(n){ji.getAngularTestability=(i,r=!0)=>{const s=n.findTestabilityInTree(i,r);if(null==s)throw new Error("Could not find testability for element.");return s},ji.getAllAngularTestabilities=()=>n.getAllTestabilities(),ji.getAllAngularRootElements=()=>n.getAllRootElements(),ji.frameworkStabilizers||(ji.frameworkStabilizers=[]),ji.frameworkStabilizers.push(i=>{const r=ji.getAllAngularTestabilities();let s=r.length,d=!1;const _=function(w){d=d||w,s--,0==s&&i(d)};r.forEach(function(w){w.whenStable(_)})})}findTestabilityInTree(n,e,i){return null==e?null:n.getTestability(e)??(i?du().isShadowRoot(e)?this.findTestabilityInTree(n,e.host,!0):this.findTestabilityInTree(n,e.parentElement,!0):null)}},deps:[]},{provide:RI,useClass:XM,deps:[Ln,YM,Vx]},{provide:XM,useClass:XM,deps:[Ln,YM,Vx]}],Hk=[{provide:ng,useValue:"root"},{provide:Ho,useFactory:function I4(){return new Ho},deps:[]},{provide:tw,useClass:S4,multi:!0,deps:[Bn,Ln,zs]},{provide:tw,useClass:T4,multi:!0,deps:[Bn]},{provide:iw,useClass:iw,deps:[nw,Mv,Ug]},{provide:tf,useExisting:iw},{provide:Rk,useExisting:Mv},{provide:Mv,useClass:Mv,deps:[Bn]},{provide:nw,useClass:nw,deps:[tw,Ln]},{provide:Sk,useClass:_4,deps:[]},[]];let $k=(()=>{class t{constructor(e){}static withServerTransition(e){return{ngModule:t,providers:[{provide:Ug,useValue:e.appId},{provide:Ik,useExisting:Ug},m4]}}}return t.\u0275fac=function(e){return new(e||t)(we(Uk,12))},t.\u0275mod=cn({type:t}),t.\u0275inj=nn({providers:[...Hk,...jk],imports:[Ia,pV]}),t})(),Wk=(()=>{class t{constructor(e){this._doc=e}getTitle(){return this._doc.title}setTitle(e){this._doc.title=e||""}}return t.\u0275fac=function(e){return new(e||t)(we(Bn))},t.\u0275prov=rt({token:t,factory:function(e){let i=null;return i=e?new e:function O4(){return new Wk(we(Bn))}(),i},providedIn:"root"}),t})();typeof window<"u"&&window;let Sv=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=rt({token:t,factory:function(e){let i=null;return i=e?new(e||t):we(Xk),i},providedIn:"root"}),t})(),Xk=(()=>{class t extends Sv{constructor(e){super(),this._doc=e}sanitize(e,i){if(null==i)return null;switch(e){case Wi.NONE:return i;case Wi.HTML:return wl(i,"HTML")?Ls(i):Ab(this._doc,String(i)).toString();case Wi.STYLE:return wl(i,"Style")?Ls(i):i;case Wi.SCRIPT:if(wl(i,"Script"))return Ls(i);throw new Error("unsafe value used in a script context");case Wi.URL:return wl(i,"URL")?Ls(i):Xp(String(i));case Wi.RESOURCE_URL:if(wl(i,"ResourceURL"))return Ls(i);throw new Error(`unsafe value used in a resource URL context (see ${al})`);default:throw new Error(`Unexpected SecurityContext ${e} (see ${al})`)}}bypassSecurityTrustHtml(e){return function P1(t){return new Sh(t)}(e)}bypassSecurityTrustStyle(e){return function Sy(t){return new A1(t)}(e)}bypassSecurityTrustScript(e){return function qm(t){return new I1(t)}(e)}bypassSecurityTrustUrl(e){return function Zm(t){return new k1(t)}(e)}bypassSecurityTrustResourceUrl(e){return function O1(t){return new Sb(t)}(e)}}return t.\u0275fac=function(e){return new(e||t)(we(Bn))},t.\u0275prov=rt({token:t,factory:function(e){let i=null;return i=e?new e:function G4(t){return new Xk(t.get(Bn))}(we(Or)),i},providedIn:"root"}),t})();function _n(...t){return Mr(t,Ii(t))}function Yh(t,n){return it(n)?Yt(t,n,1):Yt(t,1)}function Zr(t,n){return bi((e,i)=>{let r=0;e.subscribe(Nn(i,s=>t.call(n,s,r++)&&i.next(s)))})}class rw{}class PS{}class oo{constructor(n){this.normalizedNames=new Map,this.lazyUpdate=null,n?this.lazyInit="string"==typeof n?()=>{this.headers=new Map,n.split("\n").forEach(e=>{const i=e.indexOf(":");if(i>0){const r=e.slice(0,i),s=r.toLowerCase(),d=e.slice(i+1).trim();this.maybeSetNormalizedName(r,s),this.headers.has(s)?this.headers.get(s).push(d):this.headers.set(s,[d])}})}:()=>{this.headers=new Map,Object.keys(n).forEach(e=>{let i=n[e];const r=e.toLowerCase();"string"==typeof i&&(i=[i]),i.length>0&&(this.headers.set(r,i),this.maybeSetNormalizedName(e,r))})}:this.headers=new Map}has(n){return this.init(),this.headers.has(n.toLowerCase())}get(n){this.init();const e=this.headers.get(n.toLowerCase());return e&&e.length>0?e[0]:null}keys(){return this.init(),Array.from(this.normalizedNames.values())}getAll(n){return this.init(),this.headers.get(n.toLowerCase())||null}append(n,e){return this.clone({name:n,value:e,op:"a"})}set(n,e){return this.clone({name:n,value:e,op:"s"})}delete(n,e){return this.clone({name:n,value:e,op:"d"})}maybeSetNormalizedName(n,e){this.normalizedNames.has(e)||this.normalizedNames.set(e,n)}init(){this.lazyInit&&(this.lazyInit instanceof oo?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(n=>this.applyUpdate(n)),this.lazyUpdate=null))}copyFrom(n){n.init(),Array.from(n.headers.keys()).forEach(e=>{this.headers.set(e,n.headers.get(e)),this.normalizedNames.set(e,n.normalizedNames.get(e))})}clone(n){const e=new oo;return e.lazyInit=this.lazyInit&&this.lazyInit instanceof oo?this.lazyInit:this,e.lazyUpdate=(this.lazyUpdate||[]).concat([n]),e}applyUpdate(n){const e=n.name.toLowerCase();switch(n.op){case"a":case"s":let i=n.value;if("string"==typeof i&&(i=[i]),0===i.length)return;this.maybeSetNormalizedName(n.name,e);const r=("a"===n.op?this.headers.get(e):void 0)||[];r.push(...i),this.headers.set(e,r);break;case"d":const s=n.value;if(s){let d=this.headers.get(e);if(!d)return;d=d.filter(_=>-1===s.indexOf(_)),0===d.length?(this.headers.delete(e),this.normalizedNames.delete(e)):this.headers.set(e,d)}else this.headers.delete(e),this.normalizedNames.delete(e)}}forEach(n){this.init(),Array.from(this.normalizedNames.keys()).forEach(e=>n(this.normalizedNames.get(e),this.headers.get(e)))}}class U4{encodeKey(n){return Yk(n)}encodeValue(n){return Yk(n)}decodeKey(n){return decodeURIComponent(n)}decodeValue(n){return decodeURIComponent(n)}}const H4=/%(\d[a-f0-9])/gi,$4={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function Yk(t){return encodeURIComponent(t).replace(H4,(n,e)=>$4[e]??n)}function ow(t){return`${t}`}class Kh{constructor(n={}){if(this.updates=null,this.cloneFrom=null,this.encoder=n.encoder||new U4,n.fromString){if(n.fromObject)throw new Error("Cannot specify both fromString and fromObject.");this.map=function j4(t,n){const e=new Map;return t.length>0&&t.replace(/^\?/,"").split("&").forEach(r=>{const s=r.indexOf("="),[d,_]=-1==s?[n.decodeKey(r),""]:[n.decodeKey(r.slice(0,s)),n.decodeValue(r.slice(s+1))],w=e.get(d)||[];w.push(_),e.set(d,w)}),e}(n.fromString,this.encoder)}else n.fromObject?(this.map=new Map,Object.keys(n.fromObject).forEach(e=>{const i=n.fromObject[e],r=Array.isArray(i)?i.map(ow):[ow(i)];this.map.set(e,r)})):this.map=null}has(n){return this.init(),this.map.has(n)}get(n){this.init();const e=this.map.get(n);return e?e[0]:null}getAll(n){return this.init(),this.map.get(n)||null}keys(){return this.init(),Array.from(this.map.keys())}append(n,e){return this.clone({param:n,value:e,op:"a"})}appendAll(n){const e=[];return Object.keys(n).forEach(i=>{const r=n[i];Array.isArray(r)?r.forEach(s=>{e.push({param:i,value:s,op:"a"})}):e.push({param:i,value:r,op:"a"})}),this.clone(e)}set(n,e){return this.clone({param:n,value:e,op:"s"})}delete(n,e){return this.clone({param:n,value:e,op:"d"})}toString(){return this.init(),this.keys().map(n=>{const e=this.encoder.encodeKey(n);return this.map.get(n).map(i=>e+"="+this.encoder.encodeValue(i)).join("&")}).filter(n=>""!==n).join("&")}clone(n){const e=new Kh({encoder:this.encoder});return e.cloneFrom=this.cloneFrom||this,e.updates=(this.updates||[]).concat(n),e}init(){null===this.map&&(this.map=new Map),null!==this.cloneFrom&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach(n=>this.map.set(n,this.cloneFrom.map.get(n))),this.updates.forEach(n=>{switch(n.op){case"a":case"s":const e=("a"===n.op?this.map.get(n.param):void 0)||[];e.push(ow(n.value)),this.map.set(n.param,e);break;case"d":if(void 0===n.value){this.map.delete(n.param);break}{let i=this.map.get(n.param)||[];const r=i.indexOf(ow(n.value));-1!==r&&i.splice(r,1),i.length>0?this.map.set(n.param,i):this.map.delete(n.param)}}}),this.cloneFrom=this.updates=null)}}class W4{constructor(){this.map=new Map}set(n,e){return this.map.set(n,e),this}get(n){return this.map.has(n)||this.map.set(n,n.defaultValue()),this.map.get(n)}delete(n){return this.map.delete(n),this}has(n){return this.map.has(n)}keys(){return this.map.keys()}}function Kk(t){return typeof ArrayBuffer<"u"&&t instanceof ArrayBuffer}function Qk(t){return typeof Blob<"u"&&t instanceof Blob}function Jk(t){return typeof FormData<"u"&&t instanceof FormData}class Dv{constructor(n,e,i,r){let s;if(this.url=e,this.body=null,this.reportProgress=!1,this.withCredentials=!1,this.responseType="json",this.method=n.toUpperCase(),function q4(t){switch(t){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}(this.method)||r?(this.body=void 0!==i?i:null,s=r):s=i,s&&(this.reportProgress=!!s.reportProgress,this.withCredentials=!!s.withCredentials,s.responseType&&(this.responseType=s.responseType),s.headers&&(this.headers=s.headers),s.context&&(this.context=s.context),s.params&&(this.params=s.params)),this.headers||(this.headers=new oo),this.context||(this.context=new W4),this.params){const d=this.params.toString();if(0===d.length)this.urlWithParams=e;else{const _=e.indexOf("?");this.urlWithParams=e+(-1===_?"?":_L.set(H,n.setHeaders[H]),w)),n.setParams&&(S=Object.keys(n.setParams).reduce((L,H)=>L.set(H,n.setParams[H]),S)),new Dv(e,i,s,{params:S,headers:w,context:I,reportProgress:_,responseType:r,withCredentials:d})}}var Oo=(()=>((Oo=Oo||{})[Oo.Sent=0]="Sent",Oo[Oo.UploadProgress=1]="UploadProgress",Oo[Oo.ResponseHeader=2]="ResponseHeader",Oo[Oo.DownloadProgress=3]="DownloadProgress",Oo[Oo.Response=4]="Response",Oo[Oo.User=5]="User",Oo))();class OS{constructor(n,e=200,i="OK"){this.headers=n.headers||new oo,this.status=void 0!==n.status?n.status:e,this.statusText=n.statusText||i,this.url=n.url||null,this.ok=this.status>=200&&this.status<300}}class FS extends OS{constructor(n={}){super(n),this.type=Oo.ResponseHeader}clone(n={}){return new FS({headers:n.headers||this.headers,status:void 0!==n.status?n.status:this.status,statusText:n.statusText||this.statusText,url:n.url||this.url||void 0})}}class sw extends OS{constructor(n={}){super(n),this.type=Oo.Response,this.body=void 0!==n.body?n.body:null}clone(n={}){return new sw({body:void 0!==n.body?n.body:this.body,headers:n.headers||this.headers,status:void 0!==n.status?n.status:this.status,statusText:n.statusText||this.statusText,url:n.url||this.url||void 0})}}class eR extends OS{constructor(n){super(n,0,"Unknown Error"),this.name="HttpErrorResponse",this.ok=!1,this.message=this.status>=200&&this.status<300?`Http failure during parsing for ${n.url||"(unknown url)"}`:`Http failure response for ${n.url||"(unknown url)"}: ${n.status} ${n.statusText}`,this.error=n.error||null}}function LS(t,n){return{body:n,headers:t.headers,context:t.context,observe:t.observe,params:t.params,reportProgress:t.reportProgress,responseType:t.responseType,withCredentials:t.withCredentials}}let Ka=(()=>{class t{constructor(e){this.handler=e}request(e,i,r={}){let s;if(e instanceof Dv)s=e;else{let w,S;w=r.headers instanceof oo?r.headers:new oo(r.headers),r.params&&(S=r.params instanceof Kh?r.params:new Kh({fromObject:r.params})),s=new Dv(e,i,void 0!==r.body?r.body:null,{headers:w,context:r.context,params:S,reportProgress:r.reportProgress,responseType:r.responseType||"json",withCredentials:r.withCredentials})}const d=_n(s).pipe(Yh(w=>this.handler.handle(w)));if(e instanceof Dv||"events"===r.observe)return d;const _=d.pipe(Zr(w=>w instanceof sw));switch(r.observe||"body"){case"body":switch(s.responseType){case"arraybuffer":return _.pipe(Jt(w=>{if(null!==w.body&&!(w.body instanceof ArrayBuffer))throw new Error("Response is not an ArrayBuffer.");return w.body}));case"blob":return _.pipe(Jt(w=>{if(null!==w.body&&!(w.body instanceof Blob))throw new Error("Response is not a Blob.");return w.body}));case"text":return _.pipe(Jt(w=>{if(null!==w.body&&"string"!=typeof w.body)throw new Error("Response is not a string.");return w.body}));default:return _.pipe(Jt(w=>w.body))}case"response":return _;default:throw new Error(`Unreachable: unhandled observe type ${r.observe}}`)}}delete(e,i={}){return this.request("DELETE",e,i)}get(e,i={}){return this.request("GET",e,i)}head(e,i={}){return this.request("HEAD",e,i)}jsonp(e,i){return this.request("JSONP",e,{params:(new Kh).append(i,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}options(e,i={}){return this.request("OPTIONS",e,i)}patch(e,i,r={}){return this.request("PATCH",e,LS(r,i))}post(e,i,r={}){return this.request("POST",e,LS(r,i))}put(e,i,r={}){return this.request("PUT",e,LS(r,i))}}return t.\u0275fac=function(e){return new(e||t)(we(rw))},t.\u0275prov=rt({token:t,factory:t.\u0275fac}),t})();function tR(t,n){return n(t)}function X4(t,n){return(e,i)=>n.intercept(e,{handle:r=>t(r,i)})}const K4=new vt("HTTP_INTERCEPTORS"),Ev=new vt("HTTP_INTERCEPTOR_FNS");function Q4(){let t=null;return(n,e)=>(null===t&&(t=(Fn(K4,{optional:!0})??[]).reduceRight(X4,tR)),t(n,e))}let nR=(()=>{class t extends rw{constructor(e,i){super(),this.backend=e,this.injector=i,this.chain=null}handle(e){if(null===this.chain){const i=Array.from(new Set(this.injector.get(Ev)));this.chain=i.reduceRight((r,s)=>function Y4(t,n,e){return(i,r)=>e.runInContext(()=>n(i,s=>t(s,r)))}(r,s,this.injector),tR)}return this.chain(e,i=>this.backend.handle(i))}}return t.\u0275fac=function(e){return new(e||t)(we(PS),we(Cl))},t.\u0275prov=rt({token:t,factory:t.\u0275fac}),t})();const nG=/^\)\]\}',?\n/;let rR=(()=>{class t{constructor(e){this.xhrFactory=e}handle(e){if("JSONP"===e.method)throw new Error("Attempted to construct Jsonp request without HttpClientJsonpModule installed.");return new xn(i=>{const r=this.xhrFactory.build();if(r.open(e.method,e.urlWithParams),e.withCredentials&&(r.withCredentials=!0),e.headers.forEach((Y,ae)=>r.setRequestHeader(Y,ae.join(","))),e.headers.has("Accept")||r.setRequestHeader("Accept","application/json, text/plain, */*"),!e.headers.has("Content-Type")){const Y=e.detectContentTypeHeader();null!==Y&&r.setRequestHeader("Content-Type",Y)}if(e.responseType){const Y=e.responseType.toLowerCase();r.responseType="json"!==Y?Y:"text"}const s=e.serializeBody();let d=null;const _=()=>{if(null!==d)return d;const Y=r.statusText||"OK",ae=new oo(r.getAllResponseHeaders()),ve=function iG(t){return"responseURL"in t&&t.responseURL?t.responseURL:/^X-Request-URL:/m.test(t.getAllResponseHeaders())?t.getResponseHeader("X-Request-URL"):null}(r)||e.url;return d=new FS({headers:ae,status:r.status,statusText:Y,url:ve}),d},w=()=>{let{headers:Y,status:ae,statusText:ve,url:Be}=_(),$e=null;204!==ae&&($e=typeof r.response>"u"?r.responseText:r.response),0===ae&&(ae=$e?200:0);let It=ae>=200&&ae<300;if("json"===e.responseType&&"string"==typeof $e){const _t=$e;$e=$e.replace(nG,"");try{$e=""!==$e?JSON.parse($e):null}catch(dn){$e=_t,It&&(It=!1,$e={error:dn,text:$e})}}It?(i.next(new sw({body:$e,headers:Y,status:ae,statusText:ve,url:Be||void 0})),i.complete()):i.error(new eR({error:$e,headers:Y,status:ae,statusText:ve,url:Be||void 0}))},S=Y=>{const{url:ae}=_(),ve=new eR({error:Y,status:r.status||0,statusText:r.statusText||"Unknown Error",url:ae||void 0});i.error(ve)};let I=!1;const L=Y=>{I||(i.next(_()),I=!0);let ae={type:Oo.DownloadProgress,loaded:Y.loaded};Y.lengthComputable&&(ae.total=Y.total),"text"===e.responseType&&r.responseText&&(ae.partialText=r.responseText),i.next(ae)},H=Y=>{let ae={type:Oo.UploadProgress,loaded:Y.loaded};Y.lengthComputable&&(ae.total=Y.total),i.next(ae)};return r.addEventListener("load",w),r.addEventListener("error",S),r.addEventListener("timeout",S),r.addEventListener("abort",S),e.reportProgress&&(r.addEventListener("progress",L),null!==s&&r.upload&&r.upload.addEventListener("progress",H)),r.send(s),i.next({type:Oo.Sent}),()=>{r.removeEventListener("error",S),r.removeEventListener("abort",S),r.removeEventListener("load",w),r.removeEventListener("timeout",S),e.reportProgress&&(r.removeEventListener("progress",L),null!==s&&r.upload&&r.upload.removeEventListener("progress",H)),r.readyState!==r.DONE&&r.abort()}})}}return t.\u0275fac=function(e){return new(e||t)(we(Sk))},t.\u0275prov=rt({token:t,factory:t.\u0275fac}),t})();const BS=new vt("XSRF_ENABLED"),oR="XSRF-TOKEN",sR=new vt("XSRF_COOKIE_NAME",{providedIn:"root",factory:()=>oR}),aR="X-XSRF-TOKEN",lR=new vt("XSRF_HEADER_NAME",{providedIn:"root",factory:()=>aR});class cR{}let rG=(()=>{class t{constructor(e,i,r){this.doc=e,this.platform=i,this.cookieName=r,this.lastCookieString="",this.lastToken=null,this.parseCount=0}getToken(){if("server"===this.platform)return null;const e=this.doc.cookie||"";return e!==this.lastCookieString&&(this.parseCount++,this.lastToken=pk(e,this.cookieName),this.lastCookieString=e),this.lastToken}}return t.\u0275fac=function(e){return new(e||t)(we(Bn),we(zs),we(sR))},t.\u0275prov=rt({token:t,factory:t.\u0275fac}),t})();function oG(t,n){const e=t.url.toLowerCase();if(!Fn(BS)||"GET"===t.method||"HEAD"===t.method||e.startsWith("http://")||e.startsWith("https://"))return n(t);const i=Fn(cR).getToken(),r=Fn(lR);return null!=i&&!t.headers.has(r)&&(t=t.clone({headers:t.headers.set(r,i)})),n(t)}var xo=(()=>((xo=xo||{})[xo.Interceptors=0]="Interceptors",xo[xo.LegacyInterceptors=1]="LegacyInterceptors",xo[xo.CustomXsrfConfiguration=2]="CustomXsrfConfiguration",xo[xo.NoXsrfProtection=3]="NoXsrfProtection",xo[xo.JsonpSupport=4]="JsonpSupport",xo[xo.RequestsMadeViaParent=5]="RequestsMadeViaParent",xo))();function Wg(t,n){return{\u0275kind:t,\u0275providers:n}}function sG(...t){const n=[Ka,rR,nR,{provide:rw,useExisting:nR},{provide:PS,useExisting:rR},{provide:Ev,useValue:oG,multi:!0},{provide:BS,useValue:!0},{provide:cR,useClass:rG}];for(const e of t)n.push(...e.\u0275providers);return function eg(t){return{\u0275providers:t}}(n)}const uR=new vt("LEGACY_INTERCEPTOR_FN");function lG({cookieName:t,headerName:n}){const e=[];return void 0!==t&&e.push({provide:sR,useValue:t}),void 0!==n&&e.push({provide:lR,useValue:n}),Wg(xo.CustomXsrfConfiguration,e)}let cG=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=cn({type:t}),t.\u0275inj=nn({providers:[sG(Wg(xo.LegacyInterceptors,[{provide:uR,useFactory:Q4},{provide:Ev,useExisting:uR,multi:!0}]),lG({cookieName:oR,headerName:aR}))]}),t})();class ss extends Zt{constructor(n){super(),this._value=n}get value(){return this.getValue()}_subscribe(n){const e=super._subscribe(n);return!e.closed&&n.next(this._value),e}getValue(){const{hasError:n,thrownError:e,_value:i}=this;if(n)throw e;return this._throwIfClosed(),i}next(n){super.next(this._value=n)}}const Tv=tt(t=>function(){t(this),this.name="EmptyError",this.message="no elements in sequence"}),{isArray:uG}=Array,{getPrototypeOf:dG,prototype:hG,keys:pG}=Object;function dR(t){if(1===t.length){const n=t[0];if(uG(n))return{args:n,keys:null};if(function fG(t){return t&&"object"==typeof t&&dG(t)===hG}(n)){const e=pG(n);return{args:e.map(i=>n[i]),keys:e}}}return{args:t,keys:null}}const{isArray:mG}=Array;function NS(t){return Jt(n=>function gG(t,n){return mG(n)?t(...n):t(n)}(t,n))}function hR(t,n){return t.reduce((e,i,r)=>(e[i]=n[r],e),{})}function qg(...t){const n=Ii(t),e=Ni(t),{args:i,keys:r}=dR(t);if(0===i.length)return Mr([],n);const s=new xn(function _G(t,n,e=Nr){return i=>{pR(n,()=>{const{length:r}=t,s=new Array(r);let d=r,_=r;for(let w=0;w{const S=Mr(t[w],n);let I=!1;S.subscribe(Nn(i,L=>{s[w]=L,I||(I=!0,_--),_||i.next(e(s.slice()))},()=>{--d||i.complete()}))},i)},i)}}(i,n,r?d=>hR(r,d):Nr));return e?s.pipe(NS(e)):s}function pR(t,n,e){t?Pt(e,t,n):n()}function aw(...t){return function yG(){return rn(1)}()(Mr(t,Ii(t)))}function Av(t){return new xn(n=>{J(t()).subscribe(n)})}function Zg(t,n){const e=it(t)?t:()=>t,i=r=>r.error(e());return new xn(n?r=>n.schedule(i,0,r):i)}function zS(){return bi((t,n)=>{let e=null;t._refCount++;const i=Nn(n,void 0,void 0,void 0,()=>{if(!t||t._refCount<=0||0<--t._refCount)return void(e=null);const r=t._connection,s=e;e=null,r&&(!s||r===s)&&r.unsubscribe(),n.unsubscribe()});t.subscribe(i),i.closed||(e=t.connect())})}class VS extends xn{constructor(n,e){super(),this.source=n,this.subjectFactory=e,this._subject=null,this._refCount=0,this._connection=null,Mo(n)&&(this.lift=n.lift)}_subscribe(n){return this.getSubject().subscribe(n)}getSubject(){const n=this._subject;return(!n||n.isStopped)&&(this._subject=this.subjectFactory()),this._subject}_teardown(){this._refCount=0;const{_connection:n}=this;this._subject=this._connection=null,n?.unsubscribe()}connect(){let n=this._connection;if(!n){n=this._connection=new $;const e=this.getSubject();n.add(this.source.subscribe(Nn(e,void 0,()=>{this._teardown(),e.complete()},i=>{this._teardown(),e.error(i)},()=>this._teardown()))),n.closed&&(this._connection=null,n=$.EMPTY)}return n}refCount(){return zS()(this)}}function Qa(t,n){return bi((e,i)=>{let r=null,s=0,d=!1;const _=()=>d&&!r&&i.complete();e.subscribe(Nn(i,w=>{r?.unsubscribe();let S=0;const I=s++;J(t(w,I)).subscribe(r=Nn(i,L=>i.next(n?n(w,L,I,S++):L),()=>{r=null,_()}))},()=>{d=!0,_()}))})}function Fo(t){return t<=0?()=>Kt:bi((n,e)=>{let i=0;n.subscribe(Nn(e,r=>{++i<=t&&(e.next(r),t<=i&&e.complete())}))})}function Vs(...t){const n=Ii(t);return bi((e,i)=>{(n?aw(t,e,n):aw(t,e)).subscribe(i)})}function lw(t){return bi((n,e)=>{let i=!1;n.subscribe(Nn(e,r=>{i=!0,e.next(r)},()=>{i||e.next(t),e.complete()}))})}function fR(t=vG){return bi((n,e)=>{let i=!1;n.subscribe(Nn(e,r=>{i=!0,e.next(r)},()=>i?e.complete():e.error(t())))})}function vG(){return new Tv}function xd(t,n){const e=arguments.length>=2;return i=>i.pipe(t?Zr((r,s)=>t(r,s,i)):Nr,Fo(1),e?lw(n):fR(()=>new Tv))}function wo(t,n,e){const i=it(t)||n||e?{next:t,error:n,complete:e}:t;return i?bi((r,s)=>{var d;null===(d=i.subscribe)||void 0===d||d.call(i);let _=!0;r.subscribe(Nn(s,w=>{var S;null===(S=i.next)||void 0===S||S.call(i,w),s.next(w)},()=>{var w;_=!1,null===(w=i.complete)||void 0===w||w.call(i),s.complete()},w=>{var S;_=!1,null===(S=i.error)||void 0===S||S.call(i,w),s.error(w)},()=>{var w,S;_&&(null===(w=i.unsubscribe)||void 0===w||w.call(i)),null===(S=i.finalize)||void 0===S||S.call(i)}))}):Nr}function wd(t){return bi((n,e)=>{let s,i=null,r=!1;i=n.subscribe(Nn(e,void 0,void 0,d=>{s=J(t(d,wd(t)(n))),i?(i.unsubscribe(),i=null,s.subscribe(e)):r=!0})),r&&(i.unsubscribe(),i=null,s.subscribe(e))})}function bG(t,n,e,i,r){return(s,d)=>{let _=e,w=n,S=0;s.subscribe(Nn(d,I=>{const L=S++;w=_?t(w,I,L):(_=!0,I),i&&d.next(w)},r&&(()=>{_&&d.next(w),d.complete()})))}}function mR(t,n){return bi(bG(t,n,arguments.length>=2,!0))}function GS(t){return t<=0?()=>Kt:bi((n,e)=>{let i=[];n.subscribe(Nn(e,r=>{i.push(r),t{for(const r of i)e.next(r);e.complete()},void 0,()=>{i=null}))})}function gR(t,n){const e=arguments.length>=2;return i=>i.pipe(t?Zr((r,s)=>t(r,s,i)):Nr,GS(1),e?lw(n):fR(()=>new Tv))}function _R(t,n=!1){return bi((e,i)=>{let r=0;e.subscribe(Nn(i,s=>{const d=t(s,r++);(d||n)&&i.next(s),!d&&i.complete()}))})}function cw(t){return bi((n,e)=>{try{n.subscribe(e)}finally{e.add(t)}})}const ai="primary",Iv=Symbol("RouteTitle");class wG{constructor(n){this.params=n||{}}has(n){return Object.prototype.hasOwnProperty.call(this.params,n)}get(n){if(this.has(n)){const e=this.params[n];return Array.isArray(e)?e[0]:e}return null}getAll(n){if(this.has(n)){const e=this.params[n];return Array.isArray(e)?e:[e]}return[]}get keys(){return Object.keys(this.params)}}function Xg(t){return new wG(t)}function CG(t,n,e){const i=e.path.split("/");if(i.length>t.length||"full"===e.pathMatch&&(n.hasChildren()||i.lengthi[s]===r)}return t===n}function vR(t){return Array.prototype.concat.apply([],t)}function bR(t){return t.length>0?t[t.length-1]:null}function Cs(t,n){for(const e in t)t.hasOwnProperty(e)&&n(t[e],e)}function Qh(t){return gd(t)?t:ia(t)?Mr(Promise.resolve(t)):_n(t)}const uw=!1,SG={exact:function CR(t,n,e){if(!Of(t.segments,n.segments)||!dw(t.segments,n.segments,e)||t.numberOfChildren!==n.numberOfChildren)return!1;for(const i in n.children)if(!t.children[i]||!CR(t.children[i],n.children[i],e))return!1;return!0},subset:MR},xR={exact:function DG(t,n){return hu(t,n)},subset:function EG(t,n){return Object.keys(n).length<=Object.keys(t).length&&Object.keys(n).every(e=>yR(t[e],n[e]))},ignored:()=>!0};function wR(t,n,e){return SG[e.paths](t.root,n.root,e.matrixParams)&&xR[e.queryParams](t.queryParams,n.queryParams)&&!("exact"===e.fragment&&t.fragment!==n.fragment)}function MR(t,n,e){return SR(t,n,n.segments,e)}function SR(t,n,e,i){if(t.segments.length>e.length){const r=t.segments.slice(0,e.length);return!(!Of(r,e)||n.hasChildren()||!dw(r,e,i))}if(t.segments.length===e.length){if(!Of(t.segments,e)||!dw(t.segments,e,i))return!1;for(const r in n.children)if(!t.children[r]||!MR(t.children[r],n.children[r],i))return!1;return!0}{const r=e.slice(0,t.segments.length),s=e.slice(t.segments.length);return!!(Of(t.segments,r)&&dw(t.segments,r,i)&&t.children[ai])&&SR(t.children[ai],n,s,i)}}function dw(t,n,e){return n.every((i,r)=>xR[e](t[r].parameters,i.parameters))}class Pf{constructor(n=new Ci([],{}),e={},i=null){this.root=n,this.queryParams=e,this.fragment=i}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=Xg(this.queryParams)),this._queryParamMap}toString(){return IG.serialize(this)}}class Ci{constructor(n,e){this.segments=n,this.children=e,this.parent=null,Cs(e,(i,r)=>i.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return hw(this)}}class kv{constructor(n,e){this.path=n,this.parameters=e}get parameterMap(){return this._parameterMap||(this._parameterMap=Xg(this.parameters)),this._parameterMap}toString(){return TR(this)}}function Of(t,n){return t.length===n.length&&t.every((e,i)=>e.path===n[i].path)}let Rv=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=rt({token:t,factory:function(){return new US},providedIn:"root"}),t})();class US{parse(n){const e=new zG(n);return new Pf(e.parseRootSegment(),e.parseQueryParams(),e.parseFragment())}serialize(n){const e=`/${Pv(n.root,!0)}`,i=function PG(t){const n=Object.keys(t).map(e=>{const i=t[e];return Array.isArray(i)?i.map(r=>`${pw(e)}=${pw(r)}`).join("&"):`${pw(e)}=${pw(i)}`}).filter(e=>!!e);return n.length?`?${n.join("&")}`:""}(n.queryParams);return`${e}${i}${"string"==typeof n.fragment?`#${function kG(t){return encodeURI(t)}(n.fragment)}`:""}`}}const IG=new US;function hw(t){return t.segments.map(n=>TR(n)).join("/")}function Pv(t,n){if(!t.hasChildren())return hw(t);if(n){const e=t.children[ai]?Pv(t.children[ai],!1):"",i=[];return Cs(t.children,(r,s)=>{s!==ai&&i.push(`${s}:${Pv(r,!1)}`)}),i.length>0?`${e}(${i.join("//")})`:e}{const e=function AG(t,n){let e=[];return Cs(t.children,(i,r)=>{r===ai&&(e=e.concat(n(i,r)))}),Cs(t.children,(i,r)=>{r!==ai&&(e=e.concat(n(i,r)))}),e}(t,(i,r)=>r===ai?[Pv(t.children[ai],!1)]:[`${r}:${Pv(i,!1)}`]);return 1===Object.keys(t.children).length&&null!=t.children[ai]?`${hw(t)}/${e[0]}`:`${hw(t)}/(${e.join("//")})`}}function DR(t){return encodeURIComponent(t).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function pw(t){return DR(t).replace(/%3B/gi,";")}function jS(t){return DR(t).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function fw(t){return decodeURIComponent(t)}function ER(t){return fw(t.replace(/\+/g,"%20"))}function TR(t){return`${jS(t.path)}${function RG(t){return Object.keys(t).map(n=>`;${jS(n)}=${jS(t[n])}`).join("")}(t.parameters)}`}const OG=/^[^\/()?;=#]+/;function mw(t){const n=t.match(OG);return n?n[0]:""}const FG=/^[^=?&#]+/,BG=/^[^&#]+/;class zG{constructor(n){this.url=n,this.remaining=n}parseRootSegment(){return this.consumeOptional("/"),""===this.remaining||this.peekStartsWith("?")||this.peekStartsWith("#")?new Ci([],{}):new Ci([],this.parseChildren())}parseQueryParams(){const n={};if(this.consumeOptional("?"))do{this.parseQueryParam(n)}while(this.consumeOptional("&"));return n}parseFragment(){return this.consumeOptional("#")?decodeURIComponent(this.remaining):null}parseChildren(){if(""===this.remaining)return{};this.consumeOptional("/");const n=[];for(this.peekStartsWith("(")||n.push(this.parseSegment());this.peekStartsWith("/")&&!this.peekStartsWith("//")&&!this.peekStartsWith("/(");)this.capture("/"),n.push(this.parseSegment());let e={};this.peekStartsWith("/(")&&(this.capture("/"),e=this.parseParens(!0));let i={};return this.peekStartsWith("(")&&(i=this.parseParens(!1)),(n.length>0||Object.keys(e).length>0)&&(i[ai]=new Ci(n,e)),i}parseSegment(){const n=mw(this.remaining);if(""===n&&this.peekStartsWith(";"))throw new mt(4009,uw);return this.capture(n),new kv(fw(n),this.parseMatrixParams())}parseMatrixParams(){const n={};for(;this.consumeOptional(";");)this.parseParam(n);return n}parseParam(n){const e=mw(this.remaining);if(!e)return;this.capture(e);let i="";if(this.consumeOptional("=")){const r=mw(this.remaining);r&&(i=r,this.capture(i))}n[fw(e)]=fw(i)}parseQueryParam(n){const e=function LG(t){const n=t.match(FG);return n?n[0]:""}(this.remaining);if(!e)return;this.capture(e);let i="";if(this.consumeOptional("=")){const d=function NG(t){const n=t.match(BG);return n?n[0]:""}(this.remaining);d&&(i=d,this.capture(i))}const r=ER(e),s=ER(i);if(n.hasOwnProperty(r)){let d=n[r];Array.isArray(d)||(d=[d],n[r]=d),d.push(s)}else n[r]=s}parseParens(n){const e={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){const i=mw(this.remaining),r=this.remaining[i.length];if("/"!==r&&")"!==r&&";"!==r)throw new mt(4010,uw);let s;i.indexOf(":")>-1?(s=i.slice(0,i.indexOf(":")),this.capture(s),this.capture(":")):n&&(s=ai);const d=this.parseChildren();e[s]=1===Object.keys(d).length?d[ai]:new Ci([],d),this.consumeOptional("//")}return e}peekStartsWith(n){return this.remaining.startsWith(n)}consumeOptional(n){return!!this.peekStartsWith(n)&&(this.remaining=this.remaining.substring(n.length),!0)}capture(n){if(!this.consumeOptional(n))throw new mt(4011,uw)}}function HS(t){return t.segments.length>0?new Ci([],{[ai]:t}):t}function gw(t){const n={};for(const i of Object.keys(t.children)){const s=gw(t.children[i]);(s.segments.length>0||s.hasChildren())&&(n[i]=s)}return function VG(t){if(1===t.numberOfChildren&&t.children[ai]){const n=t.children[ai];return new Ci(t.segments.concat(n.segments),n.children)}return t}(new Ci(t.segments,n))}function Ff(t){return t instanceof Pf}function jG(t,n,e,i,r){if(0===e.length)return Yg(n.root,n.root,n.root,i,r);const s=function kR(t){if("string"==typeof t[0]&&1===t.length&&"/"===t[0])return new IR(!0,0,t);let n=0,e=!1;const i=t.reduce((r,s,d)=>{if("object"==typeof s&&null!=s){if(s.outlets){const _={};return Cs(s.outlets,(w,S)=>{_[S]="string"==typeof w?w.split("/"):w}),[...r,{outlets:_}]}if(s.segmentPath)return[...r,s.segmentPath]}return"string"!=typeof s?[...r,s]:0===d?(s.split("/").forEach((_,w)=>{0==w&&"."===_||(0==w&&""===_?e=!0:".."===_?n++:""!=_&&r.push(_))}),r):[...r,s]},[]);return new IR(e,n,i)}(e);return s.toRoot()?Yg(n.root,n.root,new Ci([],{}),i,r):function d(w){const S=function $G(t,n,e,i){if(t.isAbsolute)return new Kg(n.root,!0,0);if(-1===i)return new Kg(e,e===n.root,0);return function RR(t,n,e){let i=t,r=n,s=e;for(;s>r;){if(s-=r,i=i.parent,!i)throw new mt(4005,!1);r=i.segments.length}return new Kg(i,!1,r-s)}(e,i+(Ov(t.commands[0])?0:1),t.numberOfDoubleDots)}(s,n,t.snapshot?._urlSegment,w),I=S.processChildren?Qg(S.segmentGroup,S.index,s.commands):WS(S.segmentGroup,S.index,s.commands);return Yg(n.root,S.segmentGroup,I,i,r)}(t.snapshot?._lastPathIndex)}function Ov(t){return"object"==typeof t&&null!=t&&!t.outlets&&!t.segmentPath}function Fv(t){return"object"==typeof t&&null!=t&&t.outlets}function Yg(t,n,e,i,r){let d,s={};i&&Cs(i,(w,S)=>{s[S]=Array.isArray(w)?w.map(I=>`${I}`):`${w}`}),d=t===n?e:AR(t,n,e);const _=HS(gw(d));return new Pf(_,s,r)}function AR(t,n,e){const i={};return Cs(t.children,(r,s)=>{i[s]=r===n?e:AR(r,n,e)}),new Ci(t.segments,i)}class IR{constructor(n,e,i){if(this.isAbsolute=n,this.numberOfDoubleDots=e,this.commands=i,n&&i.length>0&&Ov(i[0]))throw new mt(4003,!1);const r=i.find(Fv);if(r&&r!==bR(i))throw new mt(4004,!1)}toRoot(){return this.isAbsolute&&1===this.commands.length&&"/"==this.commands[0]}}class Kg{constructor(n,e,i){this.segmentGroup=n,this.processChildren=e,this.index=i}}function WS(t,n,e){if(t||(t=new Ci([],{})),0===t.segments.length&&t.hasChildren())return Qg(t,n,e);const i=function qG(t,n,e){let i=0,r=n;const s={match:!1,pathIndex:0,commandIndex:0};for(;r=e.length)return s;const d=t.segments[r],_=e[i];if(Fv(_))break;const w=`${_}`,S=i0&&void 0===w)break;if(w&&S&&"object"==typeof S&&void 0===S.outlets){if(!OR(w,S,d))return s;i+=2}else{if(!OR(w,{},d))return s;i++}r++}return{match:!0,pathIndex:r,commandIndex:i}}(t,n,e),r=e.slice(i.commandIndex);if(i.match&&i.pathIndex{"string"==typeof s&&(s=[s]),null!==s&&(r[d]=WS(t.children[d],n,s))}),Cs(t.children,(s,d)=>{void 0===i[d]&&(r[d]=s)}),new Ci(t.segments,r))}}function qS(t,n,e){const i=t.segments.slice(0,n);let r=0;for(;r{"string"==typeof e&&(e=[e]),null!==e&&(n[i]=qS(new Ci([],{}),0,e))}),n}function PR(t){const n={};return Cs(t,(e,i)=>n[i]=`${e}`),n}function OR(t,n,e){return t==e.path&&hu(n,e.parameters)}const Lv="imperative";class pu{constructor(n,e){this.id=n,this.url=e}}class _w extends pu{constructor(n,e,i="imperative",r=null){super(n,e),this.type=0,this.navigationTrigger=i,this.restoredState=r}toString(){return`NavigationStart(id: ${this.id}, url: '${this.url}')`}}class Cd extends pu{constructor(n,e,i){super(n,e),this.urlAfterRedirects=i,this.type=1}toString(){return`NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}')`}}class yw extends pu{constructor(n,e,i,r){super(n,e),this.reason=i,this.code=r,this.type=2}toString(){return`NavigationCancel(id: ${this.id}, url: '${this.url}')`}}class FR extends pu{constructor(n,e,i,r){super(n,e),this.reason=i,this.code=r,this.type=16}}class LR extends pu{constructor(n,e,i,r){super(n,e),this.error=i,this.target=r,this.type=3}toString(){return`NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`}}class XG extends pu{constructor(n,e,i,r){super(n,e),this.urlAfterRedirects=i,this.state=r,this.type=4}toString(){return`RoutesRecognized(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class YG extends pu{constructor(n,e,i,r){super(n,e),this.urlAfterRedirects=i,this.state=r,this.type=7}toString(){return`GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class KG extends pu{constructor(n,e,i,r,s){super(n,e),this.urlAfterRedirects=i,this.state=r,this.shouldActivate=s,this.type=8}toString(){return`GuardsCheckEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state}, shouldActivate: ${this.shouldActivate})`}}class QG extends pu{constructor(n,e,i,r){super(n,e),this.urlAfterRedirects=i,this.state=r,this.type=5}toString(){return`ResolveStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class JG extends pu{constructor(n,e,i,r){super(n,e),this.urlAfterRedirects=i,this.state=r,this.type=6}toString(){return`ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class eU{constructor(n){this.route=n,this.type=9}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}}class tU{constructor(n){this.route=n,this.type=10}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}}class nU{constructor(n){this.snapshot=n,this.type=11}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class iU{constructor(n){this.snapshot=n,this.type=12}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class rU{constructor(n){this.snapshot=n,this.type=13}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class oU{constructor(n){this.snapshot=n,this.type=14}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class BR{constructor(n,e,i){this.routerEvent=n,this.position=e,this.anchor=i,this.type=15}toString(){return`Scroll(anchor: '${this.anchor}', position: '${this.position?`${this.position[0]}, ${this.position[1]}`:null}')`}}let aU=(()=>{class t{createUrlTree(e,i,r,s,d,_){return jG(e||i.root,r,s,d,_)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=rt({token:t,factory:t.\u0275fac}),t})(),lU=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=rt({token:t,factory:function(n){return aU.\u0275fac(n)},providedIn:"root"}),t})();class NR{constructor(n){this._root=n}get root(){return this._root.value}parent(n){const e=this.pathFromRoot(n);return e.length>1?e[e.length-2]:null}children(n){const e=ZS(n,this._root);return e?e.children.map(i=>i.value):[]}firstChild(n){const e=ZS(n,this._root);return e&&e.children.length>0?e.children[0].value:null}siblings(n){const e=XS(n,this._root);return e.length<2?[]:e[e.length-2].children.map(r=>r.value).filter(r=>r!==n)}pathFromRoot(n){return XS(n,this._root).map(e=>e.value)}}function ZS(t,n){if(t===n.value)return n;for(const e of n.children){const i=ZS(t,e);if(i)return i}return null}function XS(t,n){if(t===n.value)return[n];for(const e of n.children){const i=XS(t,e);if(i.length)return i.unshift(n),i}return[]}class Md{constructor(n,e){this.value=n,this.children=e}toString(){return`TreeNode(${this.value})`}}function Jg(t){const n={};return t&&t.children.forEach(e=>n[e.value.outlet]=e),n}class zR extends NR{constructor(n,e){super(n),this.snapshot=e,YS(this,n)}toString(){return this.snapshot.toString()}}function VR(t,n){const e=function cU(t,n){const d=new vw([],{},{},"",{},ai,n,null,t.root,-1,{});return new UR("",new Md(d,[]))}(t,n),i=new ss([new kv("",{})]),r=new ss({}),s=new ss({}),d=new ss({}),_=new ss(""),w=new Jh(i,r,d,_,s,ai,n,e.root);return w.snapshot=e.root,new zR(new Md(w,[]),e)}class Jh{constructor(n,e,i,r,s,d,_,w){this.url=n,this.params=e,this.queryParams=i,this.fragment=r,this.data=s,this.outlet=d,this.component=_,this.title=this.data?.pipe(Jt(S=>S[Iv]))??_n(void 0),this._futureSnapshot=w}get routeConfig(){return this._futureSnapshot.routeConfig}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap||(this._paramMap=this.params.pipe(Jt(n=>Xg(n)))),this._paramMap}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=this.queryParams.pipe(Jt(n=>Xg(n)))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}}function GR(t,n="emptyOnly"){const e=t.pathFromRoot;let i=0;if("always"!==n)for(i=e.length-1;i>=1;){const r=e[i],s=e[i-1];if(r.routeConfig&&""===r.routeConfig.path)i--;else{if(s.component)break;i--}}return function uU(t){return t.reduce((n,e)=>({params:{...n.params,...e.params},data:{...n.data,...e.data},resolve:{...e.data,...n.resolve,...e.routeConfig?.data,...e._resolvedData}}),{params:{},data:{},resolve:{}})}(e.slice(i))}class vw{get title(){return this.data?.[Iv]}constructor(n,e,i,r,s,d,_,w,S,I,L){this.url=n,this.params=e,this.queryParams=i,this.fragment=r,this.data=s,this.outlet=d,this.component=_,this.routeConfig=w,this._urlSegment=S,this._lastPathIndex=I,this._resolve=L}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap||(this._paramMap=Xg(this.params)),this._paramMap}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=Xg(this.queryParams)),this._queryParamMap}toString(){return`Route(url:'${this.url.map(i=>i.toString()).join("/")}', path:'${this.routeConfig?this.routeConfig.path:""}')`}}class UR extends NR{constructor(n,e){super(e),this.url=n,YS(this,e)}toString(){return jR(this._root)}}function YS(t,n){n.value._routerState=t,n.children.forEach(e=>YS(t,e))}function jR(t){const n=t.children.length>0?` { ${t.children.map(jR).join(", ")} } `:"";return`${t.value}${n}`}function KS(t){if(t.snapshot){const n=t.snapshot,e=t._futureSnapshot;t.snapshot=e,hu(n.queryParams,e.queryParams)||t.queryParams.next(e.queryParams),n.fragment!==e.fragment&&t.fragment.next(e.fragment),hu(n.params,e.params)||t.params.next(e.params),function MG(t,n){if(t.length!==n.length)return!1;for(let e=0;ehu(e.parameters,n[i].parameters))}(t.url,n.url);return e&&!(!t.parent!=!n.parent)&&(!t.parent||QS(t.parent,n.parent))}function Bv(t,n,e){if(e&&t.shouldReuseRoute(n.value,e.value.snapshot)){const i=e.value;i._futureSnapshot=n.value;const r=function hU(t,n,e){return n.children.map(i=>{for(const r of e.children)if(t.shouldReuseRoute(i.value,r.value.snapshot))return Bv(t,i,r);return Bv(t,i)})}(t,n,e);return new Md(i,r)}{if(t.shouldAttach(n.value)){const s=t.retrieve(n.value);if(null!==s){const d=s.route;return d.value._futureSnapshot=n.value,d.children=n.children.map(_=>Bv(t,_)),d}}const i=function pU(t){return new Jh(new ss(t.url),new ss(t.params),new ss(t.queryParams),new ss(t.fragment),new ss(t.data),t.outlet,t.component,t)}(n.value),r=n.children.map(s=>Bv(t,s));return new Md(i,r)}}const JS="ngNavigationCancelingError";function HR(t,n){const{redirectTo:e,navigationBehaviorOptions:i}=Ff(n)?{redirectTo:n,navigationBehaviorOptions:void 0}:n,r=$R(!1,0,n);return r.url=e,r.navigationBehaviorOptions=i,r}function $R(t,n,e){const i=new Error("NavigationCancelingError: "+(t||""));return i[JS]=!0,i.cancellationCode=n,e&&(i.url=e),i}function WR(t){return qR(t)&&Ff(t.url)}function qR(t){return t&&t[JS]}class fU{constructor(){this.outlet=null,this.route=null,this.resolver=null,this.injector=null,this.children=new Nv,this.attachRef=null}}let Nv=(()=>{class t{constructor(){this.contexts=new Map}onChildOutletCreated(e,i){const r=this.getOrCreateContext(e);r.outlet=i,this.contexts.set(e,r)}onChildOutletDestroyed(e){const i=this.getContext(e);i&&(i.outlet=null,i.attachRef=null)}onOutletDeactivated(){const e=this.contexts;return this.contexts=new Map,e}onOutletReAttached(e){this.contexts=e}getOrCreateContext(e){let i=this.getContext(e);return i||(i=new fU,this.contexts.set(e,i)),i}getContext(e){return this.contexts.get(e)||null}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=rt({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();const bw=!1;let xw=(()=>{class t{constructor(){this.activated=null,this._activatedRoute=null,this.name=ai,this.activateEvents=new In,this.deactivateEvents=new In,this.attachEvents=new In,this.detachEvents=new In,this.parentContexts=Fn(Nv),this.location=Fn(ro),this.changeDetector=Fn(Lr),this.environmentInjector=Fn(Cl)}ngOnChanges(e){if(e.name){const{firstChange:i,previousValue:r}=e.name;if(i)return;this.isTrackedInParentContexts(r)&&(this.deactivate(),this.parentContexts.onChildOutletDestroyed(r)),this.initializeOutletWithName()}}ngOnDestroy(){this.isTrackedInParentContexts(this.name)&&this.parentContexts.onChildOutletDestroyed(this.name)}isTrackedInParentContexts(e){return this.parentContexts.getContext(e)?.outlet===this}ngOnInit(){this.initializeOutletWithName()}initializeOutletWithName(){if(this.parentContexts.onChildOutletCreated(this.name,this),this.activated)return;const e=this.parentContexts.getContext(this.name);e?.route&&(e.attachRef?this.attach(e.attachRef,e.route):this.activateWith(e.route,e.injector))}get isActivated(){return!!this.activated}get component(){if(!this.activated)throw new mt(4012,bw);return this.activated.instance}get activatedRoute(){if(!this.activated)throw new mt(4012,bw);return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new mt(4012,bw);this.location.detach();const e=this.activated;return this.activated=null,this._activatedRoute=null,this.detachEvents.emit(e.instance),e}attach(e,i){this.activated=e,this._activatedRoute=i,this.location.insert(e.hostView),this.attachEvents.emit(e.instance)}deactivate(){if(this.activated){const e=this.component;this.activated.destroy(),this.activated=null,this._activatedRoute=null,this.deactivateEvents.emit(e)}}activateWith(e,i){if(this.isActivated)throw new mt(4013,bw);this._activatedRoute=e;const r=this.location,d=e.snapshot.component,_=this.parentContexts.getOrCreateContext(this.name).children,w=new mU(e,_,r.injector);if(i&&function gU(t){return!!t.resolveComponentFactory}(i)){const S=i.resolveComponentFactory(d);this.activated=r.createComponent(S,r.length,w)}else this.activated=r.createComponent(d,{index:r.length,injector:w,environmentInjector:i??this.environmentInjector});this.changeDetector.markForCheck(),this.activateEvents.emit(this.activated.instance)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=Ge({type:t,selectors:[["router-outlet"]],inputs:{name:"name"},outputs:{activateEvents:"activate",deactivateEvents:"deactivate",attachEvents:"attach",detachEvents:"detach"},exportAs:["outlet"],standalone:!0,features:[Hi]}),t})();class mU{constructor(n,e,i){this.route=n,this.childContexts=e,this.parent=i}get(n,e){return n===Jh?this.route:n===Nv?this.childContexts:this.parent.get(n,e)}}let eD=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=Rn({type:t,selectors:[["ng-component"]],standalone:!0,features:[IM],decls:1,vars:0,template:function(e,i){1&e&&ut(0,"router-outlet")},dependencies:[xw],encapsulation:2}),t})();function ZR(t,n){return t.providers&&!t._injector&&(t._injector=Ox(t.providers,n,`Route: ${t.path}`)),t._injector??n}function nD(t){const n=t.children&&t.children.map(nD),e=n?{...t,children:n}:{...t};return!e.component&&!e.loadComponent&&(n||e.loadChildren)&&e.outlet&&e.outlet!==ai&&(e.component=eD),e}function Pl(t){return t.outlet||ai}function XR(t,n){const e=t.filter(i=>Pl(i)===n);return e.push(...t.filter(i=>Pl(i)!==n)),e}function zv(t){if(!t)return null;if(t.routeConfig?._injector)return t.routeConfig._injector;for(let n=t.parent;n;n=n.parent){const e=n.routeConfig;if(e?._loadedInjector)return e._loadedInjector;if(e?._injector)return e._injector}return null}class xU{constructor(n,e,i,r){this.routeReuseStrategy=n,this.futureState=e,this.currState=i,this.forwardEvent=r}activate(n){const e=this.futureState._root,i=this.currState?this.currState._root:null;this.deactivateChildRoutes(e,i,n),KS(this.futureState.root),this.activateChildRoutes(e,i,n)}deactivateChildRoutes(n,e,i){const r=Jg(e);n.children.forEach(s=>{const d=s.value.outlet;this.deactivateRoutes(s,r[d],i),delete r[d]}),Cs(r,(s,d)=>{this.deactivateRouteAndItsChildren(s,i)})}deactivateRoutes(n,e,i){const r=n.value,s=e?e.value:null;if(r===s)if(r.component){const d=i.getContext(r.outlet);d&&this.deactivateChildRoutes(n,e,d.children)}else this.deactivateChildRoutes(n,e,i);else s&&this.deactivateRouteAndItsChildren(e,i)}deactivateRouteAndItsChildren(n,e){n.value.component&&this.routeReuseStrategy.shouldDetach(n.value.snapshot)?this.detachAndStoreRouteSubtree(n,e):this.deactivateRouteAndOutlet(n,e)}detachAndStoreRouteSubtree(n,e){const i=e.getContext(n.value.outlet),r=i&&n.value.component?i.children:e,s=Jg(n);for(const d of Object.keys(s))this.deactivateRouteAndItsChildren(s[d],r);if(i&&i.outlet){const d=i.outlet.detach(),_=i.children.onOutletDeactivated();this.routeReuseStrategy.store(n.value.snapshot,{componentRef:d,route:n,contexts:_})}}deactivateRouteAndOutlet(n,e){const i=e.getContext(n.value.outlet),r=i&&n.value.component?i.children:e,s=Jg(n);for(const d of Object.keys(s))this.deactivateRouteAndItsChildren(s[d],r);i&&i.outlet&&(i.outlet.deactivate(),i.children.onOutletDeactivated(),i.attachRef=null,i.resolver=null,i.route=null)}activateChildRoutes(n,e,i){const r=Jg(e);n.children.forEach(s=>{this.activateRoutes(s,r[s.value.outlet],i),this.forwardEvent(new oU(s.value.snapshot))}),n.children.length&&this.forwardEvent(new iU(n.value.snapshot))}activateRoutes(n,e,i){const r=n.value,s=e?e.value:null;if(KS(r),r===s)if(r.component){const d=i.getOrCreateContext(r.outlet);this.activateChildRoutes(n,e,d.children)}else this.activateChildRoutes(n,e,i);else if(r.component){const d=i.getOrCreateContext(r.outlet);if(this.routeReuseStrategy.shouldAttach(r.snapshot)){const _=this.routeReuseStrategy.retrieve(r.snapshot);this.routeReuseStrategy.store(r.snapshot,null),d.children.onOutletReAttached(_.contexts),d.attachRef=_.componentRef,d.route=_.route.value,d.outlet&&d.outlet.attach(_.componentRef,_.route.value),KS(_.route.value),this.activateChildRoutes(n,null,d.children)}else{const _=zv(r.snapshot),w=_?.get($r)??null;d.attachRef=null,d.route=r,d.resolver=w,d.injector=_,d.outlet&&d.outlet.activateWith(r,d.injector),this.activateChildRoutes(n,null,d.children)}}else this.activateChildRoutes(n,null,i)}}class YR{constructor(n){this.path=n,this.route=this.path[this.path.length-1]}}class ww{constructor(n,e){this.component=n,this.route=e}}function wU(t,n,e){const i=t._root;return Vv(i,n?n._root:null,e,[i.value])}function e_(t,n){const e=Symbol(),i=n.get(t,e);return i===e?"function"!=typeof t||function hm(t){return null!==Hl(t)}(t)?n.get(t):t:i}function Vv(t,n,e,i,r={canDeactivateChecks:[],canActivateChecks:[]}){const s=Jg(n);return t.children.forEach(d=>{(function MU(t,n,e,i,r={canDeactivateChecks:[],canActivateChecks:[]}){const s=t.value,d=n?n.value:null,_=e?e.getContext(t.value.outlet):null;if(d&&s.routeConfig===d.routeConfig){const w=function SU(t,n,e){if("function"==typeof e)return e(t,n);switch(e){case"pathParamsChange":return!Of(t.url,n.url);case"pathParamsOrQueryParamsChange":return!Of(t.url,n.url)||!hu(t.queryParams,n.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!QS(t,n)||!hu(t.queryParams,n.queryParams);default:return!QS(t,n)}}(d,s,s.routeConfig.runGuardsAndResolvers);w?r.canActivateChecks.push(new YR(i)):(s.data=d.data,s._resolvedData=d._resolvedData),Vv(t,n,s.component?_?_.children:null:e,i,r),w&&_&&_.outlet&&_.outlet.isActivated&&r.canDeactivateChecks.push(new ww(_.outlet.component,d))}else d&&Gv(n,_,r),r.canActivateChecks.push(new YR(i)),Vv(t,null,s.component?_?_.children:null:e,i,r)})(d,s[d.value.outlet],e,i.concat([d.value]),r),delete s[d.value.outlet]}),Cs(s,(d,_)=>Gv(d,e.getContext(_),r)),r}function Gv(t,n,e){const i=Jg(t),r=t.value;Cs(i,(s,d)=>{Gv(s,r.component?n?n.children.getContext(d):null:n,e)}),e.canDeactivateChecks.push(new ww(r.component&&n&&n.outlet&&n.outlet.isActivated?n.outlet.component:null,r))}function Uv(t){return"function"==typeof t}function iD(t){return t instanceof Tv||"EmptyError"===t?.name}const Cw=Symbol("INITIAL_VALUE");function t_(){return Qa(t=>qg(t.map(n=>n.pipe(Fo(1),Vs(Cw)))).pipe(Jt(n=>{for(const e of n)if(!0!==e){if(e===Cw)return Cw;if(!1===e||e instanceof Pf)return e}return!0}),Zr(n=>n!==Cw),Fo(1)))}function KR(t){return function Yo(...t){return Ms(t)}(wo(n=>{if(Ff(n))throw HR(0,n)}),Jt(n=>!0===n))}const rD={matched:!1,consumedSegments:[],remainingSegments:[],parameters:{},positionalParamSegments:{}};function QR(t,n,e,i,r){const s=oD(t,n,e);return s.matched?function UU(t,n,e,i){const r=n.canMatch;return r&&0!==r.length?_n(r.map(d=>{const _=e_(d,t);return Qh(function kU(t){return t&&Uv(t.canMatch)}(_)?_.canMatch(n,e):t.runInContext(()=>_(n,e)))})).pipe(t_(),KR()):_n(!0)}(i=ZR(n,i),n,e).pipe(Jt(d=>!0===d?s:{...rD})):_n(s)}function oD(t,n,e){if(""===n.path)return"full"===n.pathMatch&&(t.hasChildren()||e.length>0)?{...rD}:{matched:!0,consumedSegments:[],remainingSegments:e,parameters:{},positionalParamSegments:{}};const r=(n.matcher||CG)(e,t,n);if(!r)return{...rD};const s={};Cs(r.posParams,(_,w)=>{s[w]=_.path});const d=r.consumed.length>0?{...s,...r.consumed[r.consumed.length-1].parameters}:s;return{matched:!0,consumedSegments:r.consumed,remainingSegments:e.slice(r.consumed.length),parameters:d,positionalParamSegments:r.posParams??{}}}function Mw(t,n,e,i){if(e.length>0&&function $U(t,n,e){return e.some(i=>Sw(t,n,i)&&Pl(i)!==ai)}(t,e,i)){const s=new Ci(n,function HU(t,n,e,i){const r={};r[ai]=i,i._sourceSegment=t,i._segmentIndexShift=n.length;for(const s of e)if(""===s.path&&Pl(s)!==ai){const d=new Ci([],{});d._sourceSegment=t,d._segmentIndexShift=n.length,r[Pl(s)]=d}return r}(t,n,i,new Ci(e,t.children)));return s._sourceSegment=t,s._segmentIndexShift=n.length,{segmentGroup:s,slicedSegments:[]}}if(0===e.length&&function WU(t,n,e){return e.some(i=>Sw(t,n,i))}(t,e,i)){const s=new Ci(t.segments,function jU(t,n,e,i,r){const s={};for(const d of i)if(Sw(t,e,d)&&!r[Pl(d)]){const _=new Ci([],{});_._sourceSegment=t,_._segmentIndexShift=n.length,s[Pl(d)]=_}return{...r,...s}}(t,n,e,i,t.children));return s._sourceSegment=t,s._segmentIndexShift=n.length,{segmentGroup:s,slicedSegments:e}}const r=new Ci(t.segments,t.children);return r._sourceSegment=t,r._segmentIndexShift=n.length,{segmentGroup:r,slicedSegments:e}}function Sw(t,n,e){return(!(t.hasChildren()||n.length>0)||"full"!==e.pathMatch)&&""===e.path}function JR(t,n,e,i){return!!(Pl(t)===i||i!==ai&&Sw(n,e,t))&&("**"===t.path||oD(n,t,e).matched)}function eP(t,n,e){return 0===n.length&&!t.children[e]}const Dw=!1;class Ew{constructor(n){this.segmentGroup=n||null}}class tP{constructor(n){this.urlTree=n}}function jv(t){return Zg(new Ew(t))}function nP(t){return Zg(new tP(t))}class YU{constructor(n,e,i,r,s){this.injector=n,this.configLoader=e,this.urlSerializer=i,this.urlTree=r,this.config=s,this.allowRedirects=!0}apply(){const n=Mw(this.urlTree.root,[],[],this.config).segmentGroup,e=new Ci(n.segments,n.children);return this.expandSegmentGroup(this.injector,this.config,e,ai).pipe(Jt(s=>this.createUrlTree(gw(s),this.urlTree.queryParams,this.urlTree.fragment))).pipe(wd(s=>{if(s instanceof tP)return this.allowRedirects=!1,this.match(s.urlTree);throw s instanceof Ew?this.noMatchError(s):s}))}match(n){return this.expandSegmentGroup(this.injector,this.config,n.root,ai).pipe(Jt(r=>this.createUrlTree(gw(r),n.queryParams,n.fragment))).pipe(wd(r=>{throw r instanceof Ew?this.noMatchError(r):r}))}noMatchError(n){return new mt(4002,Dw)}createUrlTree(n,e,i){const r=HS(n);return new Pf(r,e,i)}expandSegmentGroup(n,e,i,r){return 0===i.segments.length&&i.hasChildren()?this.expandChildren(n,e,i).pipe(Jt(s=>new Ci([],s))):this.expandSegment(n,i,e,i.segments,r,!0)}expandChildren(n,e,i){const r=[];for(const s of Object.keys(i.children))"primary"===s?r.unshift(s):r.push(s);return Mr(r).pipe(Yh(s=>{const d=i.children[s],_=XR(e,s);return this.expandSegmentGroup(n,_,d,s).pipe(Jt(w=>({segment:w,outlet:s})))}),mR((s,d)=>(s[d.outlet]=d.segment,s),{}),gR())}expandSegment(n,e,i,r,s,d){return Mr(i).pipe(Yh(_=>this.expandSegmentAgainstRoute(n,e,i,_,r,s,d).pipe(wd(S=>{if(S instanceof Ew)return _n(null);throw S}))),xd(_=>!!_),wd((_,w)=>{if(iD(_))return eP(e,r,s)?_n(new Ci([],{})):jv(e);throw _}))}expandSegmentAgainstRoute(n,e,i,r,s,d,_){return JR(r,e,s,d)?void 0===r.redirectTo?this.matchSegmentAgainstRoute(n,e,r,s,d):_&&this.allowRedirects?this.expandSegmentAgainstRouteUsingRedirect(n,e,i,r,s,d):jv(e):jv(e)}expandSegmentAgainstRouteUsingRedirect(n,e,i,r,s,d){return"**"===r.path?this.expandWildCardWithParamsAgainstRouteUsingRedirect(n,i,r,d):this.expandRegularSegmentAgainstRouteUsingRedirect(n,e,i,r,s,d)}expandWildCardWithParamsAgainstRouteUsingRedirect(n,e,i,r){const s=this.applyRedirectCommands([],i.redirectTo,{});return i.redirectTo.startsWith("/")?nP(s):this.lineralizeSegments(i,s).pipe(Yt(d=>{const _=new Ci(d,{});return this.expandSegment(n,_,e,d,r,!1)}))}expandRegularSegmentAgainstRouteUsingRedirect(n,e,i,r,s,d){const{matched:_,consumedSegments:w,remainingSegments:S,positionalParamSegments:I}=oD(e,r,s);if(!_)return jv(e);const L=this.applyRedirectCommands(w,r.redirectTo,I);return r.redirectTo.startsWith("/")?nP(L):this.lineralizeSegments(r,L).pipe(Yt(H=>this.expandSegment(n,e,i,H.concat(S),d,!1)))}matchSegmentAgainstRoute(n,e,i,r,s){return"**"===i.path?(n=ZR(i,n),i.loadChildren?(i._loadedRoutes?_n({routes:i._loadedRoutes,injector:i._loadedInjector}):this.configLoader.loadChildren(n,i)).pipe(Jt(_=>(i._loadedRoutes=_.routes,i._loadedInjector=_.injector,new Ci(r,{})))):_n(new Ci(r,{}))):QR(e,i,r,n).pipe(Qa(({matched:d,consumedSegments:_,remainingSegments:w})=>d?this.getChildConfig(n=i._injector??n,i,r).pipe(Yt(I=>{const L=I.injector??n,H=I.routes,{segmentGroup:Y,slicedSegments:ae}=Mw(e,_,w,H),ve=new Ci(Y.segments,Y.children);if(0===ae.length&&ve.hasChildren())return this.expandChildren(L,H,ve).pipe(Jt(_t=>new Ci(_,_t)));if(0===H.length&&0===ae.length)return _n(new Ci(_,{}));const Be=Pl(i)===s;return this.expandSegment(L,ve,H,ae,Be?ai:s,!0).pipe(Jt(It=>new Ci(_.concat(It.segments),It.children)))})):jv(e)))}getChildConfig(n,e,i){return e.children?_n({routes:e.children,injector:n}):e.loadChildren?void 0!==e._loadedRoutes?_n({routes:e._loadedRoutes,injector:e._loadedInjector}):function GU(t,n,e,i){const r=n.canLoad;return void 0===r||0===r.length?_n(!0):_n(r.map(d=>{const _=e_(d,t);return Qh(function EU(t){return t&&Uv(t.canLoad)}(_)?_.canLoad(n,e):t.runInContext(()=>_(n,e)))})).pipe(t_(),KR())}(n,e,i).pipe(Yt(r=>r?this.configLoader.loadChildren(n,e).pipe(wo(s=>{e._loadedRoutes=s.routes,e._loadedInjector=s.injector})):function ZU(t){return Zg($R(Dw,3))}())):_n({routes:[],injector:n})}lineralizeSegments(n,e){let i=[],r=e.root;for(;;){if(i=i.concat(r.segments),0===r.numberOfChildren)return _n(i);if(r.numberOfChildren>1||!r.children[ai])return Zg(new mt(4e3,Dw));r=r.children[ai]}}applyRedirectCommands(n,e,i){return this.applyRedirectCreateUrlTree(e,this.urlSerializer.parse(e),n,i)}applyRedirectCreateUrlTree(n,e,i,r){const s=this.createSegmentGroup(n,e.root,i,r);return new Pf(s,this.createQueryParams(e.queryParams,this.urlTree.queryParams),e.fragment)}createQueryParams(n,e){const i={};return Cs(n,(r,s)=>{if("string"==typeof r&&r.startsWith(":")){const _=r.substring(1);i[s]=e[_]}else i[s]=r}),i}createSegmentGroup(n,e,i,r){const s=this.createSegments(n,e.segments,i,r);let d={};return Cs(e.children,(_,w)=>{d[w]=this.createSegmentGroup(n,_,i,r)}),new Ci(s,d)}createSegments(n,e,i,r){return e.map(s=>s.path.startsWith(":")?this.findPosParam(n,s,r):this.findOrReturn(s,i))}findPosParam(n,e,i){const r=i[e.path.substring(1)];if(!r)throw new mt(4001,Dw);return r}findOrReturn(n,e){let i=0;for(const r of e){if(r.path===n.path)return e.splice(i),r;i++}return n}}class QU{}class tj{constructor(n,e,i,r,s,d,_){this.injector=n,this.rootComponentType=e,this.config=i,this.urlTree=r,this.url=s,this.paramsInheritanceStrategy=d,this.urlSerializer=_}recognize(){const n=Mw(this.urlTree.root,[],[],this.config.filter(e=>void 0===e.redirectTo)).segmentGroup;return this.processSegmentGroup(this.injector,this.config,n,ai).pipe(Jt(e=>{if(null===e)return null;const i=new vw([],Object.freeze({}),Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,{},ai,this.rootComponentType,null,this.urlTree.root,-1,{}),r=new Md(i,e),s=new UR(this.url,r);return this.inheritParamsAndData(s._root),s}))}inheritParamsAndData(n){const e=n.value,i=GR(e,this.paramsInheritanceStrategy);e.params=Object.freeze(i.params),e.data=Object.freeze(i.data),n.children.forEach(r=>this.inheritParamsAndData(r))}processSegmentGroup(n,e,i,r){return 0===i.segments.length&&i.hasChildren()?this.processChildren(n,e,i):this.processSegment(n,e,i,i.segments,r)}processChildren(n,e,i){return Mr(Object.keys(i.children)).pipe(Yh(r=>{const s=i.children[r],d=XR(e,r);return this.processSegmentGroup(n,d,s,r)}),mR((r,s)=>r&&s?(r.push(...s),r):null),_R(r=>null!==r),lw(null),gR(),Jt(r=>{if(null===r)return null;const s=rP(r);return function nj(t){t.sort((n,e)=>n.value.outlet===ai?-1:e.value.outlet===ai?1:n.value.outlet.localeCompare(e.value.outlet))}(s),s}))}processSegment(n,e,i,r,s){return Mr(e).pipe(Yh(d=>this.processSegmentAgainstRoute(d._injector??n,d,i,r,s)),xd(d=>!!d),wd(d=>{if(iD(d))return eP(i,r,s)?_n([]):_n(null);throw d}))}processSegmentAgainstRoute(n,e,i,r,s){if(e.redirectTo||!JR(e,i,r,s))return _n(null);let d;if("**"===e.path){const _=r.length>0?bR(r).parameters:{},w=sP(i)+r.length;d=_n({snapshot:new vw(r,_,Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,aP(e),Pl(e),e.component??e._loadedComponent??null,e,oP(i),w,lP(e)),consumedSegments:[],remainingSegments:[]})}else d=QR(i,e,r,n).pipe(Jt(({matched:_,consumedSegments:w,remainingSegments:S,parameters:I})=>{if(!_)return null;const L=sP(i)+w.length;return{snapshot:new vw(w,I,Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,aP(e),Pl(e),e.component??e._loadedComponent??null,e,oP(i),L,lP(e)),consumedSegments:w,remainingSegments:S}}));return d.pipe(Qa(_=>{if(null===_)return _n(null);const{snapshot:w,consumedSegments:S,remainingSegments:I}=_;n=e._injector??n;const L=e._loadedInjector??n,H=function ij(t){return t.children?t.children:t.loadChildren?t._loadedRoutes:[]}(e),{segmentGroup:Y,slicedSegments:ae}=Mw(i,S,I,H.filter(Be=>void 0===Be.redirectTo));if(0===ae.length&&Y.hasChildren())return this.processChildren(L,H,Y).pipe(Jt(Be=>null===Be?null:[new Md(w,Be)]));if(0===H.length&&0===ae.length)return _n([new Md(w,[])]);const ve=Pl(e)===s;return this.processSegment(L,H,Y,ae,ve?ai:s).pipe(Jt(Be=>null===Be?null:[new Md(w,Be)]))}))}}function rj(t){const n=t.value.routeConfig;return n&&""===n.path&&void 0===n.redirectTo}function rP(t){const n=[],e=new Set;for(const i of t){if(!rj(i)){n.push(i);continue}const r=n.find(s=>i.value.routeConfig===s.value.routeConfig);void 0!==r?(r.children.push(...i.children),e.add(r)):n.push(i)}for(const i of e){const r=rP(i.children);n.push(new Md(i.value,r))}return n.filter(i=>!e.has(i))}function oP(t){let n=t;for(;n._sourceSegment;)n=n._sourceSegment;return n}function sP(t){let n=t,e=n._segmentIndexShift??0;for(;n._sourceSegment;)n=n._sourceSegment,e+=n._segmentIndexShift??0;return e-1}function aP(t){return t.data||{}}function lP(t){return t.resolve||{}}function cP(t){return"string"==typeof t.title||null===t.title}function sD(t){return Qa(n=>{const e=t(n);return e?Mr(e).pipe(Jt(()=>n)):_n(n)})}const n_=new vt("ROUTES");let aD=(()=>{class t{constructor(e,i){this.injector=e,this.compiler=i,this.componentLoaders=new WeakMap,this.childrenLoaders=new WeakMap}loadComponent(e){if(this.componentLoaders.get(e))return this.componentLoaders.get(e);if(e._loadedComponent)return _n(e._loadedComponent);this.onLoadStartListener&&this.onLoadStartListener(e);const i=Qh(e.loadComponent()).pipe(Jt(dP),wo(s=>{this.onLoadEndListener&&this.onLoadEndListener(e),e._loadedComponent=s}),cw(()=>{this.componentLoaders.delete(e)})),r=new VS(i,()=>new Zt).pipe(zS());return this.componentLoaders.set(e,r),r}loadChildren(e,i){if(this.childrenLoaders.get(i))return this.childrenLoaders.get(i);if(i._loadedRoutes)return _n({routes:i._loadedRoutes,injector:i._loadedInjector});this.onLoadStartListener&&this.onLoadStartListener(i);const s=this.loadModuleFactoryOrRoutes(i.loadChildren).pipe(Jt(_=>{this.onLoadEndListener&&this.onLoadEndListener(i);let w,S,I=!1;Array.isArray(_)?S=_:(w=_.create(e).injector,S=vR(w.get(n_,[],Tn.Self|Tn.Optional)));return{routes:S.map(nD),injector:w}}),cw(()=>{this.childrenLoaders.delete(i)})),d=new VS(s,()=>new Zt).pipe(zS());return this.childrenLoaders.set(i,d),d}loadModuleFactoryOrRoutes(e){return Qh(e()).pipe(Jt(dP),Yt(r=>r instanceof NA||Array.isArray(r)?_n(r):Mr(this.compiler.compileModuleAsync(r))))}}return t.\u0275fac=function(e){return new(e||t)(we(Or),we(EI))},t.\u0275prov=rt({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();function dP(t){return function pj(t){return t&&"object"==typeof t&&"default"in t}(t)?t.default:t}let Aw=(()=>{class t{get hasRequestedNavigation(){return 0!==this.navigationId}constructor(){this.currentNavigation=null,this.lastSuccessfulNavigation=null,this.events=new Zt,this.configLoader=Fn(aD),this.environmentInjector=Fn(Cl),this.urlSerializer=Fn(Rv),this.rootContexts=Fn(Nv),this.navigationId=0,this.afterPreactivation=()=>_n(void 0),this.rootComponentType=null,this.configLoader.onLoadEndListener=r=>this.events.next(new tU(r)),this.configLoader.onLoadStartListener=r=>this.events.next(new eU(r))}complete(){this.transitions?.complete()}handleNavigationRequest(e){const i=++this.navigationId;this.transitions?.next({...this.transitions.value,...e,id:i})}setupNavigations(e){return this.transitions=new ss({id:0,targetPageId:0,currentUrlTree:e.currentUrlTree,currentRawUrl:e.currentUrlTree,extractedUrl:e.urlHandlingStrategy.extract(e.currentUrlTree),urlAfterRedirects:e.urlHandlingStrategy.extract(e.currentUrlTree),rawUrl:e.currentUrlTree,extras:{},resolve:null,reject:null,promise:Promise.resolve(!0),source:Lv,restoredState:null,currentSnapshot:e.routerState.snapshot,targetSnapshot:null,currentRouterState:e.routerState,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null}),this.transitions.pipe(Zr(i=>0!==i.id),Jt(i=>({...i,extractedUrl:e.urlHandlingStrategy.extract(i.rawUrl)})),Qa(i=>{let r=!1,s=!1;return _n(i).pipe(wo(d=>{this.currentNavigation={id:d.id,initialUrl:d.rawUrl,extractedUrl:d.extractedUrl,trigger:d.source,extras:d.extras,previousNavigation:this.lastSuccessfulNavigation?{...this.lastSuccessfulNavigation,previousNavigation:null}:null}}),Qa(d=>{const _=e.browserUrlTree.toString(),w=!e.navigated||d.extractedUrl.toString()!==_||_!==e.currentUrlTree.toString();if(!w&&"reload"!==(d.extras.onSameUrlNavigation??e.onSameUrlNavigation)){const I="";return this.events.next(new FR(d.id,e.serializeUrl(i.rawUrl),I,0)),e.rawUrlTree=d.rawUrl,d.resolve(null),Kt}if(e.urlHandlingStrategy.shouldProcessUrl(d.rawUrl))return hP(d.source)&&(e.browserUrlTree=d.extractedUrl),_n(d).pipe(Qa(I=>{const L=this.transitions?.getValue();return this.events.next(new _w(I.id,this.urlSerializer.serialize(I.extractedUrl),I.source,I.restoredState)),L!==this.transitions?.getValue()?Kt:Promise.resolve(I)}),function KU(t,n,e,i){return Qa(r=>function XU(t,n,e,i,r){return new YU(t,n,e,i,r).apply()}(t,n,e,r.extractedUrl,i).pipe(Jt(s=>({...r,urlAfterRedirects:s}))))}(this.environmentInjector,this.configLoader,this.urlSerializer,e.config),wo(I=>{this.currentNavigation={...this.currentNavigation,finalUrl:I.urlAfterRedirects},i.urlAfterRedirects=I.urlAfterRedirects}),function sj(t,n,e,i,r){return Yt(s=>function ej(t,n,e,i,r,s,d="emptyOnly"){return new tj(t,n,e,i,r,d,s).recognize().pipe(Qa(_=>null===_?function JU(t){return new xn(n=>n.error(t))}(new QU):_n(_)))}(t,n,e,s.urlAfterRedirects,i.serialize(s.urlAfterRedirects),i,r).pipe(Jt(d=>({...s,targetSnapshot:d}))))}(this.environmentInjector,this.rootComponentType,e.config,this.urlSerializer,e.paramsInheritanceStrategy),wo(I=>{if(i.targetSnapshot=I.targetSnapshot,"eager"===e.urlUpdateStrategy){if(!I.extras.skipLocationChange){const H=e.urlHandlingStrategy.merge(I.urlAfterRedirects,I.rawUrl);e.setBrowserUrl(H,I)}e.browserUrlTree=I.urlAfterRedirects}const L=new XG(I.id,this.urlSerializer.serialize(I.extractedUrl),this.urlSerializer.serialize(I.urlAfterRedirects),I.targetSnapshot);this.events.next(L)}));if(w&&e.urlHandlingStrategy.shouldProcessUrl(e.rawUrlTree)){const{id:I,extractedUrl:L,source:H,restoredState:Y,extras:ae}=d,ve=new _w(I,this.urlSerializer.serialize(L),H,Y);this.events.next(ve);const Be=VR(L,this.rootComponentType).snapshot;return _n(i={...d,targetSnapshot:Be,urlAfterRedirects:L,extras:{...ae,skipLocationChange:!1,replaceUrl:!1}})}{const I="";return this.events.next(new FR(d.id,e.serializeUrl(i.extractedUrl),I,1)),e.rawUrlTree=d.rawUrl,d.resolve(null),Kt}}),wo(d=>{const _=new YG(d.id,this.urlSerializer.serialize(d.extractedUrl),this.urlSerializer.serialize(d.urlAfterRedirects),d.targetSnapshot);this.events.next(_)}),Jt(d=>i={...d,guards:wU(d.targetSnapshot,d.currentSnapshot,this.rootContexts)}),function PU(t,n){return Yt(e=>{const{targetSnapshot:i,currentSnapshot:r,guards:{canActivateChecks:s,canDeactivateChecks:d}}=e;return 0===d.length&&0===s.length?_n({...e,guardsResult:!0}):function OU(t,n,e,i){return Mr(t).pipe(Yt(r=>function VU(t,n,e,i,r){const s=n&&n.routeConfig?n.routeConfig.canDeactivate:null;return s&&0!==s.length?_n(s.map(_=>{const w=zv(n)??r,S=e_(_,w);return Qh(function IU(t){return t&&Uv(t.canDeactivate)}(S)?S.canDeactivate(t,n,e,i):w.runInContext(()=>S(t,n,e,i))).pipe(xd())})).pipe(t_()):_n(!0)}(r.component,r.route,e,n,i)),xd(r=>!0!==r,!0))}(d,i,r,t).pipe(Yt(_=>_&&function DU(t){return"boolean"==typeof t}(_)?function FU(t,n,e,i){return Mr(n).pipe(Yh(r=>aw(function BU(t,n){return null!==t&&n&&n(new nU(t)),_n(!0)}(r.route.parent,i),function LU(t,n){return null!==t&&n&&n(new rU(t)),_n(!0)}(r.route,i),function zU(t,n,e){const i=n[n.length-1],s=n.slice(0,n.length-1).reverse().map(d=>function CU(t){const n=t.routeConfig?t.routeConfig.canActivateChild:null;return n&&0!==n.length?{node:t,guards:n}:null}(d)).filter(d=>null!==d).map(d=>Av(()=>_n(d.guards.map(w=>{const S=zv(d.node)??e,I=e_(w,S);return Qh(function AU(t){return t&&Uv(t.canActivateChild)}(I)?I.canActivateChild(i,t):S.runInContext(()=>I(i,t))).pipe(xd())})).pipe(t_())));return _n(s).pipe(t_())}(t,r.path,e),function NU(t,n,e){const i=n.routeConfig?n.routeConfig.canActivate:null;if(!i||0===i.length)return _n(!0);const r=i.map(s=>Av(()=>{const d=zv(n)??e,_=e_(s,d);return Qh(function TU(t){return t&&Uv(t.canActivate)}(_)?_.canActivate(n,t):d.runInContext(()=>_(n,t))).pipe(xd())}));return _n(r).pipe(t_())}(t,r.route,e))),xd(r=>!0!==r,!0))}(i,s,t,n):_n(_)),Jt(_=>({...e,guardsResult:_})))})}(this.environmentInjector,d=>this.events.next(d)),wo(d=>{if(i.guardsResult=d.guardsResult,Ff(d.guardsResult))throw HR(0,d.guardsResult);const _=new KG(d.id,this.urlSerializer.serialize(d.extractedUrl),this.urlSerializer.serialize(d.urlAfterRedirects),d.targetSnapshot,!!d.guardsResult);this.events.next(_)}),Zr(d=>!!d.guardsResult||(e.restoreHistory(d),this.cancelNavigationTransition(d,"",3),!1)),sD(d=>{if(d.guards.canActivateChecks.length)return _n(d).pipe(wo(_=>{const w=new QG(_.id,this.urlSerializer.serialize(_.extractedUrl),this.urlSerializer.serialize(_.urlAfterRedirects),_.targetSnapshot);this.events.next(w)}),Qa(_=>{let w=!1;return _n(_).pipe(function aj(t,n){return Yt(e=>{const{targetSnapshot:i,guards:{canActivateChecks:r}}=e;if(!r.length)return _n(e);let s=0;return Mr(r).pipe(Yh(d=>function lj(t,n,e,i){const r=t.routeConfig,s=t._resolve;return void 0!==r?.title&&!cP(r)&&(s[Iv]=r.title),function cj(t,n,e,i){const r=function uj(t){return[...Object.keys(t),...Object.getOwnPropertySymbols(t)]}(t);if(0===r.length)return _n({});const s={};return Mr(r).pipe(Yt(d=>function dj(t,n,e,i){const r=zv(n)??i,s=e_(t,r);return Qh(s.resolve?s.resolve(n,e):r.runInContext(()=>s(n,e)))}(t[d],n,e,i).pipe(xd(),wo(_=>{s[d]=_}))),GS(1),function xG(t){return Jt(()=>t)}(s),wd(d=>iD(d)?Kt:Zg(d)))}(s,t,n,i).pipe(Jt(d=>(t._resolvedData=d,t.data=GR(t,e).resolve,r&&cP(r)&&(t.data[Iv]=r.title),null)))}(d.route,i,t,n)),wo(()=>s++),GS(1),Yt(d=>s===r.length?_n(e):Kt))})}(e.paramsInheritanceStrategy,this.environmentInjector),wo({next:()=>w=!0,complete:()=>{w||(e.restoreHistory(_),this.cancelNavigationTransition(_,"",2))}}))}),wo(_=>{const w=new JG(_.id,this.urlSerializer.serialize(_.extractedUrl),this.urlSerializer.serialize(_.urlAfterRedirects),_.targetSnapshot);this.events.next(w)}))}),sD(d=>{const _=w=>{const S=[];w.routeConfig?.loadComponent&&!w.routeConfig._loadedComponent&&S.push(this.configLoader.loadComponent(w.routeConfig).pipe(wo(I=>{w.component=I}),Jt(()=>{})));for(const I of w.children)S.push(..._(I));return S};return qg(_(d.targetSnapshot.root)).pipe(lw(),Fo(1))}),sD(()=>this.afterPreactivation()),Jt(d=>{const _=function dU(t,n,e){const i=Bv(t,n._root,e?e._root:void 0);return new zR(i,n)}(e.routeReuseStrategy,d.targetSnapshot,d.currentRouterState);return i={...d,targetRouterState:_}}),wo(d=>{e.currentUrlTree=d.urlAfterRedirects,e.rawUrlTree=e.urlHandlingStrategy.merge(d.urlAfterRedirects,d.rawUrl),e.routerState=d.targetRouterState,"deferred"===e.urlUpdateStrategy&&(d.extras.skipLocationChange||e.setBrowserUrl(e.rawUrlTree,d),e.browserUrlTree=d.urlAfterRedirects)}),((t,n,e)=>Jt(i=>(new xU(n,i.targetRouterState,i.currentRouterState,e).activate(t),i)))(this.rootContexts,e.routeReuseStrategy,d=>this.events.next(d)),wo({next:d=>{r=!0,this.lastSuccessfulNavigation=this.currentNavigation,e.navigated=!0,this.events.next(new Cd(d.id,this.urlSerializer.serialize(d.extractedUrl),this.urlSerializer.serialize(e.currentUrlTree))),e.titleStrategy?.updateTitle(d.targetRouterState.snapshot),d.resolve(!0)},complete:()=>{r=!0}}),cw(()=>{r||s||this.cancelNavigationTransition(i,"",1),this.currentNavigation?.id===i.id&&(this.currentNavigation=null)}),wd(d=>{if(s=!0,qR(d)){WR(d)||(e.navigated=!0,e.restoreHistory(i,!0));const _=new yw(i.id,this.urlSerializer.serialize(i.extractedUrl),d.message,d.cancellationCode);if(this.events.next(_),WR(d)){const w=e.urlHandlingStrategy.merge(d.url,e.rawUrlTree),S={skipLocationChange:i.extras.skipLocationChange,replaceUrl:"eager"===e.urlUpdateStrategy||hP(i.source)};e.scheduleNavigation(w,Lv,null,S,{resolve:i.resolve,reject:i.reject,promise:i.promise})}else i.resolve(!1)}else{e.restoreHistory(i,!0);const _=new LR(i.id,this.urlSerializer.serialize(i.extractedUrl),d,i.targetSnapshot??void 0);this.events.next(_);try{i.resolve(e.errorHandler(d))}catch(w){i.reject(w)}}return Kt}))}))}cancelNavigationTransition(e,i,r){const s=new yw(e.id,this.urlSerializer.serialize(e.extractedUrl),i,r);this.events.next(s),e.resolve(!1)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=rt({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();function hP(t){return t!==Lv}let pP=(()=>{class t{buildTitle(e){let i,r=e.root;for(;void 0!==r;)i=this.getResolvedTitleForRoute(r)??i,r=r.children.find(s=>s.outlet===ai);return i}getResolvedTitleForRoute(e){return e.data[Iv]}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=rt({token:t,factory:function(){return Fn(fj)},providedIn:"root"}),t})(),fj=(()=>{class t extends pP{constructor(e){super(),this.title=e}updateTitle(e){const i=this.buildTitle(e);void 0!==i&&this.title.setTitle(i)}}return t.\u0275fac=function(e){return new(e||t)(we(Wk))},t.\u0275prov=rt({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),mj=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=rt({token:t,factory:function(){return Fn(_j)},providedIn:"root"}),t})();class gj{shouldDetach(n){return!1}store(n,e){}shouldAttach(n){return!1}retrieve(n){return null}shouldReuseRoute(n,e){return n.routeConfig===e.routeConfig}}let _j=(()=>{class t extends gj{}return t.\u0275fac=function(){let n;return function(i){return(n||(n=qt(t)))(i||t)}}(),t.\u0275prov=rt({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();const Iw=new vt("",{providedIn:"root",factory:()=>({})});let vj=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=rt({token:t,factory:function(){return Fn(bj)},providedIn:"root"}),t})(),bj=(()=>{class t{shouldProcessUrl(e){return!0}extract(e){return e}merge(e,i){return e}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=rt({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();function xj(t){throw t}function wj(t,n,e){return n.parse("/")}const Cj={paths:"exact",fragment:"ignored",matrixParams:"ignored",queryParams:"exact"},Mj={paths:"subset",fragment:"ignored",matrixParams:"ignored",queryParams:"subset"};let as=(()=>{class t{get navigationId(){return this.navigationTransitions.navigationId}get browserPageId(){return this.location.getState()?.\u0275routerPageId}get events(){return this.navigationTransitions.events}constructor(){this.disposed=!1,this.currentPageId=0,this.console=Fn(Pz),this.isNgZoneEnabled=!1,this.options=Fn(Iw,{optional:!0})||{},this.errorHandler=this.options.errorHandler||xj,this.malformedUriErrorHandler=this.options.malformedUriErrorHandler||wj,this.navigated=!1,this.lastSuccessfulId=-1,this.urlHandlingStrategy=Fn(vj),this.routeReuseStrategy=Fn(mj),this.urlCreationStrategy=Fn(lU),this.titleStrategy=Fn(pP),this.onSameUrlNavigation=this.options.onSameUrlNavigation||"ignore",this.paramsInheritanceStrategy=this.options.paramsInheritanceStrategy||"emptyOnly",this.urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred",this.canceledNavigationResolution=this.options.canceledNavigationResolution||"replace",this.config=vR(Fn(n_,{optional:!0})??[]),this.navigationTransitions=Fn(Aw),this.urlSerializer=Fn(Rv),this.location=Fn(yv),this.isNgZoneEnabled=Fn(Ln)instanceof Ln&&Ln.isInAngularZone(),this.resetConfig(this.config),this.currentUrlTree=new Pf,this.rawUrlTree=this.currentUrlTree,this.browserUrlTree=this.currentUrlTree,this.routerState=VR(this.currentUrlTree,null),this.navigationTransitions.setupNavigations(this).subscribe(e=>{this.lastSuccessfulId=e.id,this.currentPageId=e.targetPageId},e=>{this.console.warn(`Unhandled Navigation Error: ${e}`)})}resetRootComponentType(e){this.routerState.root.component=e,this.navigationTransitions.rootComponentType=e}initialNavigation(){if(this.setUpLocationChangeListener(),!this.navigationTransitions.hasRequestedNavigation){const e=this.location.getState();this.navigateToSyncWithBrowser(this.location.path(!0),Lv,e)}}setUpLocationChangeListener(){this.locationSubscription||(this.locationSubscription=this.location.subscribe(e=>{const i="popstate"===e.type?"popstate":"hashchange";"popstate"===i&&setTimeout(()=>{this.navigateToSyncWithBrowser(e.url,i,e.state)},0)}))}navigateToSyncWithBrowser(e,i,r){const s={replaceUrl:!0},d=r?.navigationId?r:null;if(r){const w={...r};delete w.navigationId,delete w.\u0275routerPageId,0!==Object.keys(w).length&&(s.state=w)}const _=this.parseUrl(e);this.scheduleNavigation(_,i,d,s)}get url(){return this.serializeUrl(this.currentUrlTree)}getCurrentNavigation(){return this.navigationTransitions.currentNavigation}resetConfig(e){this.config=e.map(nD),this.navigated=!1,this.lastSuccessfulId=-1}ngOnDestroy(){this.dispose()}dispose(){this.navigationTransitions.complete(),this.locationSubscription&&(this.locationSubscription.unsubscribe(),this.locationSubscription=void 0),this.disposed=!0}createUrlTree(e,i={}){const{relativeTo:r,queryParams:s,fragment:d,queryParamsHandling:_,preserveFragment:w}=i,S=w?this.currentUrlTree.fragment:d;let I=null;switch(_){case"merge":I={...this.currentUrlTree.queryParams,...s};break;case"preserve":I=this.currentUrlTree.queryParams;break;default:I=s||null}return null!==I&&(I=this.removeEmptyProps(I)),this.urlCreationStrategy.createUrlTree(r,this.routerState,this.currentUrlTree,e,I,S??null)}navigateByUrl(e,i={skipLocationChange:!1}){const r=Ff(e)?e:this.parseUrl(e),s=this.urlHandlingStrategy.merge(r,this.rawUrlTree);return this.scheduleNavigation(s,Lv,null,i)}navigate(e,i={skipLocationChange:!1}){return function Sj(t){for(let n=0;n{const s=e[r];return null!=s&&(i[r]=s),i},{})}scheduleNavigation(e,i,r,s,d){if(this.disposed)return Promise.resolve(!1);let _,w,S,I;return d?(_=d.resolve,w=d.reject,S=d.promise):S=new Promise((L,H)=>{_=L,w=H}),I="computed"===this.canceledNavigationResolution?r&&r.\u0275routerPageId?r.\u0275routerPageId:s.replaceUrl||s.skipLocationChange?this.browserPageId??0:(this.browserPageId??0)+1:0,this.navigationTransitions.handleNavigationRequest({targetPageId:I,source:i,restoredState:r,currentUrlTree:this.currentUrlTree,currentRawUrl:this.currentUrlTree,rawUrl:e,extras:s,resolve:_,reject:w,promise:S,currentSnapshot:this.routerState.snapshot,currentRouterState:this.routerState}),S.catch(L=>Promise.reject(L))}setBrowserUrl(e,i){const r=this.urlSerializer.serialize(e),s={...i.extras.state,...this.generateNgRouterState(i.id,i.targetPageId)};this.location.isCurrentPathEqualTo(r)||i.extras.replaceUrl?this.location.replaceState(r,"",s):this.location.go(r,"",s)}restoreHistory(e,i=!1){if("computed"===this.canceledNavigationResolution){const r=this.currentPageId-e.targetPageId;"popstate"!==e.source&&"eager"!==this.urlUpdateStrategy&&this.currentUrlTree!==this.getCurrentNavigation()?.finalUrl||0===r?this.currentUrlTree===this.getCurrentNavigation()?.finalUrl&&0===r&&(this.resetState(e),this.browserUrlTree=e.currentUrlTree,this.resetUrlToCurrentUrlTree()):this.location.historyGo(r)}else"replace"===this.canceledNavigationResolution&&(i&&this.resetState(e),this.resetUrlToCurrentUrlTree())}resetState(e){this.routerState=e.currentRouterState,this.currentUrlTree=e.currentUrlTree,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,e.rawUrl)}resetUrlToCurrentUrlTree(){this.location.replaceState(this.urlSerializer.serialize(this.rawUrlTree),"",this.generateNgRouterState(this.lastSuccessfulId,this.currentPageId))}generateNgRouterState(e,i){return"computed"===this.canceledNavigationResolution?{navigationId:e,\u0275routerPageId:i}:{navigationId:e}}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=rt({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),kw=(()=>{class t{constructor(e,i,r,s,d,_){this.router=e,this.route=i,this.tabIndexAttribute=r,this.renderer=s,this.el=d,this.locationStrategy=_,this._preserveFragment=!1,this._skipLocationChange=!1,this._replaceUrl=!1,this.href=null,this.commands=null,this.onChanges=new Zt;const w=d.nativeElement.tagName?.toLowerCase();this.isAnchorElement="a"===w||"area"===w,this.isAnchorElement?this.subscription=e.events.subscribe(S=>{S instanceof Cd&&this.updateHref()}):this.setTabIndexIfNotOnNativeEl("0")}set preserveFragment(e){this._preserveFragment=Hg(e)}get preserveFragment(){return this._preserveFragment}set skipLocationChange(e){this._skipLocationChange=Hg(e)}get skipLocationChange(){return this._skipLocationChange}set replaceUrl(e){this._replaceUrl=Hg(e)}get replaceUrl(){return this._replaceUrl}setTabIndexIfNotOnNativeEl(e){null!=this.tabIndexAttribute||this.isAnchorElement||this.applyAttributeValue("tabindex",e)}ngOnChanges(e){this.isAnchorElement&&this.updateHref(),this.onChanges.next(this)}set routerLink(e){null!=e?(this.commands=Array.isArray(e)?e:[e],this.setTabIndexIfNotOnNativeEl("0")):(this.commands=null,this.setTabIndexIfNotOnNativeEl(null))}onClick(e,i,r,s,d){return!!(null===this.urlTree||this.isAnchorElement&&(0!==e||i||r||s||d||"string"==typeof this.target&&"_self"!=this.target))||(this.router.navigateByUrl(this.urlTree,{skipLocationChange:this.skipLocationChange,replaceUrl:this.replaceUrl,state:this.state}),!this.isAnchorElement)}ngOnDestroy(){this.subscription?.unsubscribe()}updateHref(){this.href=null!==this.urlTree&&this.locationStrategy?this.locationStrategy?.prepareExternalUrl(this.router.serializeUrl(this.urlTree)):null;const e=null===this.href?null:function Rb(t,n,e){return function V1(t,n){return"src"===n&&("embed"===t||"frame"===t||"iframe"===t||"media"===t||"script"===t)||"href"===n&&("base"===t||"link"===t)?Py:Th}(n,e)(t)}(this.href,this.el.nativeElement.tagName.toLowerCase(),"href");this.applyAttributeValue("href",e)}applyAttributeValue(e,i){const r=this.renderer,s=this.el.nativeElement;null!==i?r.setAttribute(s,e,i):r.removeAttribute(s,e)}get urlTree(){return null===this.commands?null:this.router.createUrlTree(this.commands,{relativeTo:void 0!==this.relativeTo?this.relativeTo:this.route,queryParams:this.queryParams,fragment:this.fragment,queryParamsHandling:this.queryParamsHandling,preserveFragment:this.preserveFragment})}}return t.\u0275fac=function(e){return new(e||t)(z(as),z(Jh),wa("tabindex"),z(Da),z($t),z(Af))},t.\u0275dir=Ge({type:t,selectors:[["","routerLink",""]],hostVars:1,hostBindings:function(e,i){1&e&&Nt("click",function(s){return i.onClick(s.button,s.ctrlKey,s.shiftKey,s.altKey,s.metaKey)}),2&e&&et("target",i.target)},inputs:{target:"target",queryParams:"queryParams",fragment:"fragment",queryParamsHandling:"queryParamsHandling",state:"state",relativeTo:"relativeTo",preserveFragment:"preserveFragment",skipLocationChange:"skipLocationChange",replaceUrl:"replaceUrl",routerLink:"routerLink"},standalone:!0,features:[Hi]}),t})();class mP{}let Tj=(()=>{class t{constructor(e,i,r,s,d){this.router=e,this.injector=r,this.preloadingStrategy=s,this.loader=d}setUpPreloading(){this.subscription=this.router.events.pipe(Zr(e=>e instanceof Cd),Yh(()=>this.preload())).subscribe(()=>{})}preload(){return this.processRoutes(this.injector,this.router.config)}ngOnDestroy(){this.subscription&&this.subscription.unsubscribe()}processRoutes(e,i){const r=[];for(const s of i){s.providers&&!s._injector&&(s._injector=Ox(s.providers,e,`Route: ${s.path}`));const d=s._injector??e,_=s._loadedInjector??d;s.loadChildren&&!s._loadedRoutes&&void 0===s.canLoad||s.loadComponent&&!s._loadedComponent?r.push(this.preloadConfig(d,s)):(s.children||s._loadedRoutes)&&r.push(this.processRoutes(_,s.children??s._loadedRoutes))}return Mr(r).pipe(rn())}preloadConfig(e,i){return this.preloadingStrategy.preload(i,()=>{let r;r=i.loadChildren&&void 0===i.canLoad?this.loader.loadChildren(e,i):_n(null);const s=r.pipe(Yt(d=>null===d?_n(void 0):(i._loadedRoutes=d.routes,i._loadedInjector=d.injector,this.processRoutes(d.injector??e,d.routes))));return i.loadComponent&&!i._loadedComponent?Mr([s,this.loader.loadComponent(i)]).pipe(rn()):s})}}return t.\u0275fac=function(e){return new(e||t)(we(as),we(EI),we(Cl),we(mP),we(aD))},t.\u0275prov=rt({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();const lD=new vt("");let gP=(()=>{class t{constructor(e,i,r,s,d={}){this.urlSerializer=e,this.transitions=i,this.viewportScroller=r,this.zone=s,this.options=d,this.lastId=0,this.lastSource="imperative",this.restoredId=0,this.store={},d.scrollPositionRestoration=d.scrollPositionRestoration||"disabled",d.anchorScrolling=d.anchorScrolling||"disabled"}init(){"disabled"!==this.options.scrollPositionRestoration&&this.viewportScroller.setHistoryScrollRestoration("manual"),this.routerEventsSubscription=this.createScrollEvents(),this.scrollEventsSubscription=this.consumeScrollEvents()}createScrollEvents(){return this.transitions.events.subscribe(e=>{e instanceof _w?(this.store[this.lastId]=this.viewportScroller.getScrollPosition(),this.lastSource=e.navigationTrigger,this.restoredId=e.restoredState?e.restoredState.navigationId:0):e instanceof Cd&&(this.lastId=e.id,this.scheduleScrollEvent(e,this.urlSerializer.parse(e.urlAfterRedirects).fragment))})}consumeScrollEvents(){return this.transitions.events.subscribe(e=>{e instanceof BR&&(e.position?"top"===this.options.scrollPositionRestoration?this.viewportScroller.scrollToPosition([0,0]):"enabled"===this.options.scrollPositionRestoration&&this.viewportScroller.scrollToPosition(e.position):e.anchor&&"enabled"===this.options.anchorScrolling?this.viewportScroller.scrollToAnchor(e.anchor):"disabled"!==this.options.scrollPositionRestoration&&this.viewportScroller.scrollToPosition([0,0]))})}scheduleScrollEvent(e,i){this.zone.runOutsideAngular(()=>{setTimeout(()=>{this.zone.run(()=>{this.transitions.events.next(new BR(e,"popstate"===this.lastSource?this.store[this.restoredId]:null,i))})},0)})}ngOnDestroy(){this.routerEventsSubscription?.unsubscribe(),this.scrollEventsSubscription?.unsubscribe()}}return t.\u0275fac=function(e){Bs()},t.\u0275prov=rt({token:t,factory:t.\u0275fac}),t})();function Lf(t,n){return{\u0275kind:t,\u0275providers:n}}function yP(){const t=Fn(Or);return n=>{const e=t.get(jg);if(n!==e.components[0])return;const i=t.get(as),r=t.get(vP);1===t.get(uD)&&i.initialNavigation(),t.get(bP,null,Tn.Optional)?.setUpPreloading(),t.get(lD,null,Tn.Optional)?.init(),i.resetRootComponentType(e.componentTypes[0]),r.closed||(r.next(),r.unsubscribe())}}const vP=new vt("",{factory:()=>new Zt}),uD=new vt("",{providedIn:"root",factory:()=>1});const bP=new vt("");function Pj(t){return Lf(0,[{provide:bP,useExisting:Tj},{provide:mP,useExisting:t}])}const xP=new vt("ROUTER_FORROOT_GUARD"),Oj=[yv,{provide:Rv,useClass:US},as,Nv,{provide:Jh,useFactory:function _P(t){return t.routerState.root},deps:[as]},aD,[]];function Fj(){return new OI("Router",as)}let Rw=(()=>{class t{constructor(e){}static forRoot(e,i){return{ngModule:t,providers:[Oj,[],{provide:n_,multi:!0,useValue:e},{provide:xP,useFactory:zj,deps:[[as,new $i,new Hr]]},{provide:Iw,useValue:i||{}},i?.useHash?{provide:Af,useClass:bV}:{provide:Af,useClass:ik},{provide:lD,useFactory:()=>{const t=Fn(F5),n=Fn(Ln),e=Fn(Iw),i=Fn(Aw),r=Fn(Rv);return e.scrollOffset&&t.setOffset(e.scrollOffset),new gP(r,i,t,n,e)}},i?.preloadingStrategy?Pj(i.preloadingStrategy).\u0275providers:[],{provide:OI,multi:!0,useFactory:Fj},i?.initialNavigation?Vj(i):[],[{provide:wP,useFactory:yP},{provide:$M,multi:!0,useExisting:wP}]]}}static forChild(e){return{ngModule:t,providers:[{provide:n_,multi:!0,useValue:e}]}}}return t.\u0275fac=function(e){return new(e||t)(we(xP,8))},t.\u0275mod=cn({type:t}),t.\u0275inj=nn({imports:[eD]}),t})();function zj(t){return"guarded"}function Vj(t){return["disabled"===t.initialNavigation?Lf(3,[{provide:Nx,multi:!0,useFactory:()=>{const n=Fn(as);return()=>{n.setUpLocationChangeListener()}}},{provide:uD,useValue:2}]).\u0275providers:[],"enabledBlocking"===t.initialNavigation?Lf(2,[{provide:uD,useValue:0},{provide:Nx,multi:!0,deps:[Or],useFactory:n=>{const e=n.get(yV,Promise.resolve());return()=>e.then(()=>new Promise(r=>{const s=n.get(as),d=n.get(vP);(function i(r){n.get(as).events.pipe(Zr(d=>d instanceof Cd||d instanceof yw||d instanceof LR),Jt(d=>d instanceof Cd||d instanceof yw&&(0===d.code||1===d.code)&&null),Zr(d=>null!==d),Fo(1)).subscribe(()=>{r()})})(()=>{r(!0)}),n.get(Aw).afterPreactivation=()=>(r(!0),d.closed?_n(void 0):d),s.initialNavigation()}))}}]).\u0275providers:[]]}const wP=new vt("");class r_{}r_.\u0275fac=function(n){return new(n||r_)},r_.\u0275mod=cn({type:r_}),r_.\u0275inj=nn({imports:[Rw.forRoot([{path:"",redirectTo:"/findamap",pathMatch:"full"}]),Rw]});let dD,jj=!1;class $v{constructor(n){this.router=n,this.title="mytopo",this.router.events.subscribe(e=>{e instanceof Cd&&(window.ga("set","page",e.urlAfterRedirects),window.ga("send","pageview"))}),this.router.events.pipe(Zr(e=>e instanceof Cd)).subscribe(e=>{1===e.id&&e.url===e.urlAfterRedirects&&(jj=!0)})}ngOnDestroy(){this.subscription.unsubscribe()}}$v.\u0275fac=function(n){return new(n||$v)(z(as))},$v.\u0275cmp=Rn({type:$v,selectors:[["app-root"]],decls:1,vars:0,template:function(n,e){1&n&&ut(0,"router-outlet")},dependencies:[xw],styles:[".match-parent[_ngcontent-%COMP%]{width:100%;height:100%} .link-button{font-size:12px!important} .link-button a, input[_ngcontent-%COMP%], p[_ngcontent-%COMP%], button[_ngcontent-%COMP%]{font-size:12px!important} .logo a{font-size:12px!important}.red[_ngcontent-%COMP%]{color:red}"]});try{dD=typeof Intl<"u"&&Intl.v8BreakIterator}catch{dD=!1}let o_,Co=(()=>{class t{constructor(e){this._platformId=e,this.isBrowser=this._platformId?bc(this._platformId):"object"==typeof document&&!!document,this.EDGE=this.isBrowser&&/(edge)/i.test(navigator.userAgent),this.TRIDENT=this.isBrowser&&/(msie|trident)/i.test(navigator.userAgent),this.BLINK=this.isBrowser&&!(!window.chrome&&!dD)&&typeof CSS<"u"&&!this.EDGE&&!this.TRIDENT,this.WEBKIT=this.isBrowser&&/AppleWebKit/i.test(navigator.userAgent)&&!this.BLINK&&!this.EDGE&&!this.TRIDENT,this.IOS=this.isBrowser&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!("MSStream"in window),this.FIREFOX=this.isBrowser&&/(firefox|minefield)/i.test(navigator.userAgent),this.ANDROID=this.isBrowser&&/android/i.test(navigator.userAgent)&&!this.TRIDENT,this.SAFARI=this.isBrowser&&/safari/i.test(navigator.userAgent)&&this.WEBKIT}}return t.\u0275fac=function(e){return new(e||t)(we(zs))},t.\u0275prov=rt({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();const CP=["color","button","checkbox","date","datetime-local","email","file","hidden","image","month","number","password","radio","range","reset","search","submit","tel","text","time","url","week"];function MP(){if(o_)return o_;if("object"!=typeof document||!document)return o_=new Set(CP),o_;let t=document.createElement("input");return o_=new Set(CP.filter(n=>(t.setAttribute("type",n),t.type===n))),o_}let Wv,Pw,Bf,hD;function s_(t){return function Hj(){if(null==Wv&&typeof window<"u")try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>Wv=!0}))}finally{Wv=Wv||!1}return Wv}()?t:!!t.capture}function SP(){if(null==Bf){if("object"!=typeof document||!document||"function"!=typeof Element||!Element)return Bf=!1,Bf;if("scrollBehavior"in document.documentElement.style)Bf=!0;else{const t=Element.prototype.scrollTo;Bf=!!t&&!/\{\s*\[native code\]\s*\}/.test(t.toString())}}return Bf}function qv(){if("object"!=typeof document||!document)return 0;if(null==Pw){const t=document.createElement("div"),n=t.style;t.dir="rtl",n.width="1px",n.overflow="auto",n.visibility="hidden",n.pointerEvents="none",n.position="absolute";const e=document.createElement("div"),i=e.style;i.width="2px",i.height="1px",t.appendChild(e),document.body.appendChild(t),Pw=0,0===t.scrollLeft&&(t.scrollLeft=1,Pw=0===t.scrollLeft?1:2),t.remove()}return Pw}function Ow(){let t=typeof document<"u"&&document?document.activeElement:null;for(;t&&t.shadowRoot;){const n=t.shadowRoot.activeElement;if(n===t)break;t=n}return t}function Nf(t){return t.composedPath?t.composedPath()[0]:t.target}function pD(){return typeof __karma__<"u"&&!!__karma__||typeof jasmine<"u"&&!!jasmine||typeof jest<"u"&&!!jest||typeof Mocha<"u"&&!!Mocha}function xc(t,...n){return n.length?n.some(e=>t[e]):t.altKey||t.shiftKey||t.ctrlKey||t.metaKey}class sH extends ${constructor(n,e){super()}schedule(n,e=0){return this}}const Bw={setInterval(t,n,...e){const{delegate:i}=Bw;return i?.setInterval?i.setInterval(t,n,...e):setInterval(t,n,...e)},clearInterval(t){const{delegate:n}=Bw;return(n?.clearInterval||clearInterval)(t)},delegate:void 0};class mD extends sH{constructor(n,e){super(n,e),this.scheduler=n,this.work=e,this.pending=!1}schedule(n,e=0){var i;if(this.closed)return this;this.state=n;const r=this.id,s=this.scheduler;return null!=r&&(this.id=this.recycleAsyncId(s,r,e)),this.pending=!0,this.delay=e,this.id=null!==(i=this.id)&&void 0!==i?i:this.requestAsyncId(s,this.id,e),this}requestAsyncId(n,e,i=0){return Bw.setInterval(n.flush.bind(n,this),i)}recycleAsyncId(n,e,i=0){if(null!=i&&this.delay===i&&!1===this.pending)return e;null!=e&&Bw.clearInterval(e)}execute(n,e){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;const i=this._execute(n,e);if(i)return i;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))}_execute(n,e){let r,i=!1;try{this.work(n)}catch(s){i=!0,r=s||new Error("Scheduled action threw falsy error")}if(i)return this.unsubscribe(),r}unsubscribe(){if(!this.closed){const{id:n,scheduler:e}=this,{actions:i}=e;this.work=this.state=this.scheduler=null,this.pending=!1,h(i,this),null!=n&&(this.id=this.recycleAsyncId(e,n,null)),this.delay=null,super.unsubscribe()}}}const TP={now:()=>(TP.delegate||Date).now(),delegate:void 0};class Kv{constructor(n,e=Kv.now){this.schedulerActionCtor=n,this.now=e}schedule(n,e=0,i){return new this.schedulerActionCtor(this,n).schedule(i,e)}}Kv.now=TP.now;class gD extends Kv{constructor(n,e=Kv.now){super(n,e),this.actions=[],this._active=!1}flush(n){const{actions:e}=this;if(this._active)return void e.push(n);let i;this._active=!0;do{if(i=n.execute(n.state,n.delay))break}while(n=e.shift());if(this._active=!1,i){for(;n=e.shift();)n.unsubscribe();throw i}}}const Qv=new gD(mD),aH=Qv;function _D(t,n=Qv){return bi((e,i)=>{let r=null,s=null,d=null;const _=()=>{if(r){r.unsubscribe(),r=null;const S=s;s=null,i.next(S)}};function w(){const S=d+t,I=n.now();if(I{s=S,d=n.now(),r||(r=n.schedule(w,t),i.add(r))},()=>{_(),i.complete()},void 0,()=>{s=r=null}))})}function AP(t){return Zr((n,e)=>t<=e)}function yD(t,n=Nr){return t=t??lH,bi((e,i)=>{let r,s=!0;e.subscribe(Nn(i,d=>{const _=n(d);(s||!t(r,_))&&(s=!1,r=_,i.next(d))}))})}function lH(t,n){return t===n}function ri(t){return bi((n,e)=>{J(t).subscribe(Nn(e,()=>e.complete(),Ot)),!e.closed&&n.subscribe(e)})}function kn(t){return null!=t&&"false"!=`${t}`}function wc(t,n=0){return IP(t)?Number(t):n}function IP(t){return!isNaN(parseFloat(t))&&!isNaN(Number(t))}function Nw(t){return Array.isArray(t)?t:[t]}function Lo(t){return null==t?"":"string"==typeof t?t:`${t}px`}function Sd(t){return t instanceof $t?t.nativeElement:t}let kP=(()=>{class t{create(e){return typeof MutationObserver>"u"?null:new MutationObserver(e)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=rt({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),cH=(()=>{class t{constructor(e){this._mutationObserverFactory=e,this._observedElements=new Map}ngOnDestroy(){this._observedElements.forEach((e,i)=>this._cleanupObserver(i))}observe(e){const i=Sd(e);return new xn(r=>{const d=this._observeElement(i).subscribe(r);return()=>{d.unsubscribe(),this._unobserveElement(i)}})}_observeElement(e){if(this._observedElements.has(e))this._observedElements.get(e).count++;else{const i=new Zt,r=this._mutationObserverFactory.create(s=>i.next(s));r&&r.observe(e,{characterData:!0,childList:!0,subtree:!0}),this._observedElements.set(e,{observer:r,stream:i,count:1})}return this._observedElements.get(e).stream}_unobserveElement(e){this._observedElements.has(e)&&(this._observedElements.get(e).count--,this._observedElements.get(e).count||this._cleanupObserver(e))}_cleanupObserver(e){if(this._observedElements.has(e)){const{observer:i,stream:r}=this._observedElements.get(e);i&&i.disconnect(),r.complete(),this._observedElements.delete(e)}}}return t.\u0275fac=function(e){return new(e||t)(we(kP))},t.\u0275prov=rt({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),vD=(()=>{class t{get disabled(){return this._disabled}set disabled(e){this._disabled=kn(e),this._disabled?this._unsubscribe():this._subscribe()}get debounce(){return this._debounce}set debounce(e){this._debounce=wc(e),this._subscribe()}constructor(e,i,r){this._contentObserver=e,this._elementRef=i,this._ngZone=r,this.event=new In,this._disabled=!1,this._currentSubscription=null}ngAfterContentInit(){!this._currentSubscription&&!this.disabled&&this._subscribe()}ngOnDestroy(){this._unsubscribe()}_subscribe(){this._unsubscribe();const e=this._contentObserver.observe(this._elementRef);this._ngZone.runOutsideAngular(()=>{this._currentSubscription=(this.debounce?e.pipe(_D(this.debounce)):e).subscribe(this.event)})}_unsubscribe(){this._currentSubscription?.unsubscribe()}}return t.\u0275fac=function(e){return new(e||t)(z(cH),z($t),z(Ln))},t.\u0275dir=Ge({type:t,selectors:[["","cdkObserveContent",""]],inputs:{disabled:["cdkObserveContentDisabled","disabled"],debounce:"debounce"},outputs:{event:"cdkObserveContent"},exportAs:["cdkObserveContent"]}),t})(),zw=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=cn({type:t}),t.\u0275inj=nn({providers:[kP]}),t})();const RP=new Set;let a_,uH=(()=>{class t{constructor(e){this._platform=e,this._matchMedia=this._platform.isBrowser&&window.matchMedia?window.matchMedia.bind(window):hH}matchMedia(e){return(this._platform.WEBKIT||this._platform.BLINK)&&function dH(t){if(!RP.has(t))try{a_||(a_=document.createElement("style"),a_.setAttribute("type","text/css"),document.head.appendChild(a_)),a_.sheet&&(a_.sheet.insertRule(`@media ${t} {body{ }}`,0),RP.add(t))}catch(n){console.error(n)}}(e),this._matchMedia(e)}}return t.\u0275fac=function(e){return new(e||t)(we(Co))},t.\u0275prov=rt({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();function hH(t){return{matches:"all"===t||""===t,media:t,addListener:()=>{},removeListener:()=>{}}}let Vw=(()=>{class t{constructor(e,i){this._mediaMatcher=e,this._zone=i,this._queries=new Map,this._destroySubject=new Zt}ngOnDestroy(){this._destroySubject.next(),this._destroySubject.complete()}isMatched(e){return PP(Nw(e)).some(r=>this._registerQuery(r).mql.matches)}observe(e){let s=qg(PP(Nw(e)).map(d=>this._registerQuery(d).observable));return s=aw(s.pipe(Fo(1)),s.pipe(AP(1),_D(0))),s.pipe(Jt(d=>{const _={matches:!1,breakpoints:{}};return d.forEach(({matches:w,query:S})=>{_.matches=_.matches||w,_.breakpoints[S]=w}),_}))}_registerQuery(e){if(this._queries.has(e))return this._queries.get(e);const i=this._mediaMatcher.matchMedia(e),s={observable:new xn(d=>{const _=w=>this._zone.run(()=>d.next(w));return i.addListener(_),()=>{i.removeListener(_)}}).pipe(Vs(i),Jt(({matches:d})=>({query:e,matches:d})),ri(this._destroySubject)),mql:i};return this._queries.set(e,s),s}}return t.\u0275fac=function(e){return new(e||t)(we(uH),we(Ln))},t.\u0275prov=rt({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();function PP(t){return t.map(n=>n.split(",")).reduce((n,e)=>n.concat(e)).map(n=>n.trim())}function Gw(t,n){return(t.getAttribute(n)||"").match(/\S+/g)||[]}const LP="cdk-describedby-message",Uw="cdk-describedby-host";let bD=0,mH=(()=>{class t{constructor(e,i){this._platform=i,this._messageRegistry=new Map,this._messagesContainer=null,this._id=""+bD++,this._document=e,this._id=Fn(Ug)+"-"+bD++}describe(e,i,r){if(!this._canBeDescribed(e,i))return;const s=xD(i,r);"string"!=typeof i?(BP(i,this._id),this._messageRegistry.set(s,{messageElement:i,referenceCount:0})):this._messageRegistry.has(s)||this._createMessageElement(i,r),this._isElementDescribedByMessage(e,s)||this._addMessageReference(e,s)}removeDescription(e,i,r){if(!i||!this._isElementNode(e))return;const s=xD(i,r);if(this._isElementDescribedByMessage(e,s)&&this._removeMessageReference(e,s),"string"==typeof i){const d=this._messageRegistry.get(s);d&&0===d.referenceCount&&this._deleteMessageElement(s)}0===this._messagesContainer?.childNodes.length&&(this._messagesContainer.remove(),this._messagesContainer=null)}ngOnDestroy(){const e=this._document.querySelectorAll(`[${Uw}="${this._id}"]`);for(let i=0;i0!=r.indexOf(LP));e.setAttribute("aria-describedby",i.join(" "))}_addMessageReference(e,i){const r=this._messageRegistry.get(i);(function pH(t,n,e){const i=Gw(t,n);i.some(r=>r.trim()==e.trim())||(i.push(e.trim()),t.setAttribute(n,i.join(" ")))})(e,"aria-describedby",r.messageElement.id),e.setAttribute(Uw,this._id),r.referenceCount++}_removeMessageReference(e,i){const r=this._messageRegistry.get(i);r.referenceCount--,function fH(t,n,e){const r=Gw(t,n).filter(s=>s!=e.trim());r.length?t.setAttribute(n,r.join(" ")):t.removeAttribute(n)}(e,"aria-describedby",r.messageElement.id),e.removeAttribute(Uw)}_isElementDescribedByMessage(e,i){const r=Gw(e,"aria-describedby"),s=this._messageRegistry.get(i),d=s&&s.messageElement.id;return!!d&&-1!=r.indexOf(d)}_canBeDescribed(e,i){if(!this._isElementNode(e))return!1;if(i&&"object"==typeof i)return!0;const r=null==i?"":`${i}`.trim(),s=e.getAttribute("aria-label");return!(!r||s&&s.trim()===r)}_isElementNode(e){return e.nodeType===this._document.ELEMENT_NODE}}return t.\u0275fac=function(e){return new(e||t)(we(Bn),we(Co))},t.\u0275prov=rt({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();function xD(t,n){return"string"==typeof t?`${n||""}/${t}`:t}function BP(t,n){t.id||(t.id=`${LP}-${n}-${bD++}`)}class NP{constructor(n){this._items=n,this._activeItemIndex=-1,this._activeItem=null,this._wrap=!1,this._letterKeyStream=new Zt,this._typeaheadSubscription=$.EMPTY,this._vertical=!0,this._allowedModifierKeys=[],this._homeAndEnd=!1,this._pageUpAndDown={enabled:!1,delta:10},this._skipPredicateFn=e=>e.disabled,this._pressedLetters=[],this.tabOut=new Zt,this.change=new Zt,n instanceof qh&&(this._itemChangesSubscription=n.changes.subscribe(e=>{if(this._activeItem){const r=e.toArray().indexOf(this._activeItem);r>-1&&r!==this._activeItemIndex&&(this._activeItemIndex=r)}}))}skipPredicate(n){return this._skipPredicateFn=n,this}withWrap(n=!0){return this._wrap=n,this}withVerticalOrientation(n=!0){return this._vertical=n,this}withHorizontalOrientation(n){return this._horizontal=n,this}withAllowedModifierKeys(n){return this._allowedModifierKeys=n,this}withTypeAhead(n=200){return this._typeaheadSubscription.unsubscribe(),this._typeaheadSubscription=this._letterKeyStream.pipe(wo(e=>this._pressedLetters.push(e)),_D(n),Zr(()=>this._pressedLetters.length>0),Jt(()=>this._pressedLetters.join(""))).subscribe(e=>{const i=this._getItemsArray();for(let r=1;r!n[s]||this._allowedModifierKeys.indexOf(s)>-1);switch(e){case 9:return void this.tabOut.next();case 40:if(this._vertical&&r){this.setNextItemActive();break}return;case 38:if(this._vertical&&r){this.setPreviousItemActive();break}return;case 39:if(this._horizontal&&r){"rtl"===this._horizontal?this.setPreviousItemActive():this.setNextItemActive();break}return;case 37:if(this._horizontal&&r){"rtl"===this._horizontal?this.setNextItemActive():this.setPreviousItemActive();break}return;case 36:if(this._homeAndEnd&&r){this.setFirstItemActive();break}return;case 35:if(this._homeAndEnd&&r){this.setLastItemActive();break}return;case 33:if(this._pageUpAndDown.enabled&&r){const s=this._activeItemIndex-this._pageUpAndDown.delta;this._setActiveItemByIndex(s>0?s:0,1);break}return;case 34:if(this._pageUpAndDown.enabled&&r){const s=this._activeItemIndex+this._pageUpAndDown.delta,d=this._getItemsArray().length;this._setActiveItemByIndex(s=65&&e<=90||e>=48&&e<=57)&&this._letterKeyStream.next(String.fromCharCode(e))))}this._pressedLetters=[],n.preventDefault()}get activeItemIndex(){return this._activeItemIndex}get activeItem(){return this._activeItem}isTyping(){return this._pressedLetters.length>0}setFirstItemActive(){this._setActiveItemByIndex(0,1)}setLastItemActive(){this._setActiveItemByIndex(this._items.length-1,-1)}setNextItemActive(){this._activeItemIndex<0?this.setFirstItemActive():this._setActiveItemByDelta(1)}setPreviousItemActive(){this._activeItemIndex<0&&this._wrap?this.setLastItemActive():this._setActiveItemByDelta(-1)}updateActiveItem(n){const e=this._getItemsArray(),i="number"==typeof n?n:e.indexOf(n);this._activeItem=e[i]??null,this._activeItemIndex=i}destroy(){this._typeaheadSubscription.unsubscribe(),this._itemChangesSubscription?.unsubscribe(),this._letterKeyStream.complete(),this.tabOut.complete(),this.change.complete(),this._pressedLetters=[]}_setActiveItemByDelta(n){this._wrap?this._setActiveInWrapMode(n):this._setActiveInDefaultMode(n)}_setActiveInWrapMode(n){const e=this._getItemsArray();for(let i=1;i<=e.length;i++){const r=(this._activeItemIndex+n*i+e.length)%e.length;if(!this._skipPredicateFn(e[r]))return void this.setActiveItem(r)}}_setActiveInDefaultMode(n){this._setActiveItemByIndex(this._activeItemIndex+n,n)}_setActiveItemByIndex(n,e){const i=this._getItemsArray();if(i[n]){for(;this._skipPredicateFn(i[n]);)if(!i[n+=e])return;this.setActiveItem(n)}}_getItemsArray(){return this._items instanceof qh?this._items.toArray():this._items}}class gH extends NP{setActiveItem(n){this.activeItem&&this.activeItem.setInactiveStyles(),super.setActiveItem(n),this.activeItem&&this.activeItem.setActiveStyles()}}class zP extends NP{constructor(){super(...arguments),this._origin="program"}setFocusOrigin(n){return this._origin=n,this}setActiveItem(n){super.setActiveItem(n),this.activeItem&&this.activeItem.focus(this._origin)}}let jw=(()=>{class t{constructor(e){this._platform=e}isDisabled(e){return e.hasAttribute("disabled")}isVisible(e){return function yH(t){return!!(t.offsetWidth||t.offsetHeight||"function"==typeof t.getClientRects&&t.getClientRects().length)}(e)&&"visible"===getComputedStyle(e).visibility}isTabbable(e){if(!this._platform.isBrowser)return!1;const i=function _H(t){try{return t.frameElement}catch{return null}}(function DH(t){return t.ownerDocument&&t.ownerDocument.defaultView||window}(e));if(i&&(-1===GP(i)||!this.isVisible(i)))return!1;let r=e.nodeName.toLowerCase(),s=GP(e);return e.hasAttribute("contenteditable")?-1!==s:!("iframe"===r||"object"===r||this._platform.WEBKIT&&this._platform.IOS&&!function MH(t){let n=t.nodeName.toLowerCase(),e="input"===n&&t.type;return"text"===e||"password"===e||"select"===n||"textarea"===n}(e))&&("audio"===r?!!e.hasAttribute("controls")&&-1!==s:"video"===r?-1!==s&&(null!==s||this._platform.FIREFOX||e.hasAttribute("controls")):e.tabIndex>=0)}isFocusable(e,i){return function SH(t){return!function bH(t){return function wH(t){return"input"==t.nodeName.toLowerCase()}(t)&&"hidden"==t.type}(t)&&(function vH(t){let n=t.nodeName.toLowerCase();return"input"===n||"select"===n||"button"===n||"textarea"===n}(t)||function xH(t){return function CH(t){return"a"==t.nodeName.toLowerCase()}(t)&&t.hasAttribute("href")}(t)||t.hasAttribute("contenteditable")||VP(t))}(e)&&!this.isDisabled(e)&&(i?.ignoreVisibility||this.isVisible(e))}}return t.\u0275fac=function(e){return new(e||t)(we(Co))},t.\u0275prov=rt({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();function VP(t){if(!t.hasAttribute("tabindex")||void 0===t.tabIndex)return!1;let n=t.getAttribute("tabindex");return!(!n||isNaN(parseInt(n,10)))}function GP(t){if(!VP(t))return null;const n=parseInt(t.getAttribute("tabindex")||"",10);return isNaN(n)?-1:n}class EH{get enabled(){return this._enabled}set enabled(n){this._enabled=n,this._startAnchor&&this._endAnchor&&(this._toggleAnchorTabIndex(n,this._startAnchor),this._toggleAnchorTabIndex(n,this._endAnchor))}constructor(n,e,i,r,s=!1){this._element=n,this._checker=e,this._ngZone=i,this._document=r,this._hasAttached=!1,this.startAnchorListener=()=>this.focusLastTabbableElement(),this.endAnchorListener=()=>this.focusFirstTabbableElement(),this._enabled=!0,s||this.attachAnchors()}destroy(){const n=this._startAnchor,e=this._endAnchor;n&&(n.removeEventListener("focus",this.startAnchorListener),n.remove()),e&&(e.removeEventListener("focus",this.endAnchorListener),e.remove()),this._startAnchor=this._endAnchor=null,this._hasAttached=!1}attachAnchors(){return!!this._hasAttached||(this._ngZone.runOutsideAngular(()=>{this._startAnchor||(this._startAnchor=this._createAnchor(),this._startAnchor.addEventListener("focus",this.startAnchorListener)),this._endAnchor||(this._endAnchor=this._createAnchor(),this._endAnchor.addEventListener("focus",this.endAnchorListener))}),this._element.parentNode&&(this._element.parentNode.insertBefore(this._startAnchor,this._element),this._element.parentNode.insertBefore(this._endAnchor,this._element.nextSibling),this._hasAttached=!0),this._hasAttached)}focusInitialElementWhenReady(n){return new Promise(e=>{this._executeOnStable(()=>e(this.focusInitialElement(n)))})}focusFirstTabbableElementWhenReady(n){return new Promise(e=>{this._executeOnStable(()=>e(this.focusFirstTabbableElement(n)))})}focusLastTabbableElementWhenReady(n){return new Promise(e=>{this._executeOnStable(()=>e(this.focusLastTabbableElement(n)))})}_getRegionBoundary(n){const e=this._element.querySelectorAll(`[cdk-focus-region-${n}], [cdkFocusRegion${n}], [cdk-focus-${n}]`);return"start"==n?e.length?e[0]:this._getFirstTabbableElement(this._element):e.length?e[e.length-1]:this._getLastTabbableElement(this._element)}focusInitialElement(n){const e=this._element.querySelector("[cdk-focus-initial], [cdkFocusInitial]");if(e){if(!this._checker.isFocusable(e)){const i=this._getFirstTabbableElement(e);return i?.focus(n),!!i}return e.focus(n),!0}return this.focusFirstTabbableElement(n)}focusFirstTabbableElement(n){const e=this._getRegionBoundary("start");return e&&e.focus(n),!!e}focusLastTabbableElement(n){const e=this._getRegionBoundary("end");return e&&e.focus(n),!!e}hasAttached(){return this._hasAttached}_getFirstTabbableElement(n){if(this._checker.isFocusable(n)&&this._checker.isTabbable(n))return n;const e=n.children;for(let i=0;i=0;i--){const r=e[i].nodeType===this._document.ELEMENT_NODE?this._getLastTabbableElement(e[i]):null;if(r)return r}return null}_createAnchor(){const n=this._document.createElement("div");return this._toggleAnchorTabIndex(this._enabled,n),n.classList.add("cdk-visually-hidden"),n.classList.add("cdk-focus-trap-anchor"),n.setAttribute("aria-hidden","true"),n}_toggleAnchorTabIndex(n,e){n?e.setAttribute("tabindex","0"):e.removeAttribute("tabindex")}toggleAnchors(n){this._startAnchor&&this._endAnchor&&(this._toggleAnchorTabIndex(n,this._startAnchor),this._toggleAnchorTabIndex(n,this._endAnchor))}_executeOnStable(n){this._ngZone.isStable?n():this._ngZone.onStable.pipe(Fo(1)).subscribe(n)}}let wD=(()=>{class t{constructor(e,i,r){this._checker=e,this._ngZone=i,this._document=r}create(e,i=!1){return new EH(e,this._checker,this._ngZone,this._document,i)}}return t.\u0275fac=function(e){return new(e||t)(we(jw),we(Ln),we(Bn))},t.\u0275prov=rt({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();function UP(t){return 0===t.buttons||0===t.offsetX&&0===t.offsetY}function jP(t){const n=t.touches&&t.touches[0]||t.changedTouches&&t.changedTouches[0];return!(!n||-1!==n.identifier||null!=n.radiusX&&1!==n.radiusX||null!=n.radiusY&&1!==n.radiusY)}const TH=new vt("cdk-input-modality-detector-options"),AH={ignoreKeys:[18,17,224,91,16]},l_=s_({passive:!0,capture:!0});let IH=(()=>{class t{get mostRecentModality(){return this._modality.value}constructor(e,i,r,s){this._platform=e,this._mostRecentTarget=null,this._modality=new ss(null),this._lastTouchMs=0,this._onKeydown=d=>{this._options?.ignoreKeys?.some(_=>_===d.keyCode)||(this._modality.next("keyboard"),this._mostRecentTarget=Nf(d))},this._onMousedown=d=>{Date.now()-this._lastTouchMs<650||(this._modality.next(UP(d)?"keyboard":"mouse"),this._mostRecentTarget=Nf(d))},this._onTouchstart=d=>{jP(d)?this._modality.next("keyboard"):(this._lastTouchMs=Date.now(),this._modality.next("touch"),this._mostRecentTarget=Nf(d))},this._options={...AH,...s},this.modalityDetected=this._modality.pipe(AP(1)),this.modalityChanged=this.modalityDetected.pipe(yD()),e.isBrowser&&i.runOutsideAngular(()=>{r.addEventListener("keydown",this._onKeydown,l_),r.addEventListener("mousedown",this._onMousedown,l_),r.addEventListener("touchstart",this._onTouchstart,l_)})}ngOnDestroy(){this._modality.complete(),this._platform.isBrowser&&(document.removeEventListener("keydown",this._onKeydown,l_),document.removeEventListener("mousedown",this._onMousedown,l_),document.removeEventListener("touchstart",this._onTouchstart,l_))}}return t.\u0275fac=function(e){return new(e||t)(we(Co),we(Ln),we(Bn),we(TH,8))},t.\u0275prov=rt({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();const kH=new vt("liveAnnouncerElement",{providedIn:"root",factory:function RH(){return null}}),PH=new vt("LIVE_ANNOUNCER_DEFAULT_OPTIONS");let OH=0,CD=(()=>{class t{constructor(e,i,r,s){this._ngZone=i,this._defaultOptions=s,this._document=r,this._liveElement=e||this._createLiveElement()}announce(e,...i){const r=this._defaultOptions;let s,d;return 1===i.length&&"number"==typeof i[0]?d=i[0]:[s,d]=i,this.clear(),clearTimeout(this._previousTimeout),s||(s=r&&r.politeness?r.politeness:"polite"),null==d&&r&&(d=r.duration),this._liveElement.setAttribute("aria-live",s),this._liveElement.id&&this._exposeAnnouncerToModals(this._liveElement.id),this._ngZone.runOutsideAngular(()=>(this._currentPromise||(this._currentPromise=new Promise(_=>this._currentResolve=_)),clearTimeout(this._previousTimeout),this._previousTimeout=setTimeout(()=>{this._liveElement.textContent=e,"number"==typeof d&&(this._previousTimeout=setTimeout(()=>this.clear(),d)),this._currentResolve(),this._currentPromise=this._currentResolve=void 0},100),this._currentPromise))}clear(){this._liveElement&&(this._liveElement.textContent="")}ngOnDestroy(){clearTimeout(this._previousTimeout),this._liveElement?.remove(),this._liveElement=null,this._currentResolve?.(),this._currentPromise=this._currentResolve=void 0}_createLiveElement(){const e="cdk-live-announcer-element",i=this._document.getElementsByClassName(e),r=this._document.createElement("div");for(let s=0;s .cdk-overlay-container [aria-modal="true"]');for(let r=0;r{class t{constructor(e,i,r,s,d){this._ngZone=e,this._platform=i,this._inputModalityDetector=r,this._origin=null,this._windowFocused=!1,this._originFromTouchInteraction=!1,this._elementInfo=new Map,this._monitoredElementCount=0,this._rootNodeFocusListenerCount=new Map,this._windowFocusListener=()=>{this._windowFocused=!0,this._windowFocusTimeoutId=window.setTimeout(()=>this._windowFocused=!1)},this._stopInputModalityDetector=new Zt,this._rootNodeFocusAndBlurListener=_=>{for(let S=Nf(_);S;S=S.parentElement)"focus"===_.type?this._onFocus(_,S):this._onBlur(_,S)},this._document=s,this._detectionMode=d?.detectionMode||0}monitor(e,i=!1){const r=Sd(e);if(!this._platform.isBrowser||1!==r.nodeType)return _n(null);const s=function Wj(t){if(function $j(){if(null==hD){const t=typeof document<"u"?document.head:null;hD=!(!t||!t.createShadowRoot&&!t.attachShadow)}return hD}()){const n=t.getRootNode?t.getRootNode():null;if(typeof ShadowRoot<"u"&&ShadowRoot&&n instanceof ShadowRoot)return n}return null}(r)||this._getDocument(),d=this._elementInfo.get(r);if(d)return i&&(d.checkChildren=!0),d.subject;const _={checkChildren:i,subject:new Zt,rootNode:s};return this._elementInfo.set(r,_),this._registerGlobalListeners(_),_.subject}stopMonitoring(e){const i=Sd(e),r=this._elementInfo.get(i);r&&(r.subject.complete(),this._setClasses(i),this._elementInfo.delete(i),this._removeGlobalListeners(r))}focusVia(e,i,r){const s=Sd(e);s===this._getDocument().activeElement?this._getClosestElementsInfo(s).forEach(([_,w])=>this._originChanged(_,i,w)):(this._setOrigin(i),"function"==typeof s.focus&&s.focus(r))}ngOnDestroy(){this._elementInfo.forEach((e,i)=>this.stopMonitoring(i))}_getDocument(){return this._document||document}_getWindow(){return this._getDocument().defaultView||window}_getFocusOrigin(e){return this._origin?this._originFromTouchInteraction?this._shouldBeAttributedToTouch(e)?"touch":"program":this._origin:this._windowFocused&&this._lastFocusOrigin?this._lastFocusOrigin:e&&this._isLastInteractionFromInputLabel(e)?"mouse":"program"}_shouldBeAttributedToTouch(e){return 1===this._detectionMode||!!e?.contains(this._inputModalityDetector._mostRecentTarget)}_setClasses(e,i){e.classList.toggle("cdk-focused",!!i),e.classList.toggle("cdk-touch-focused","touch"===i),e.classList.toggle("cdk-keyboard-focused","keyboard"===i),e.classList.toggle("cdk-mouse-focused","mouse"===i),e.classList.toggle("cdk-program-focused","program"===i)}_setOrigin(e,i=!1){this._ngZone.runOutsideAngular(()=>{this._origin=e,this._originFromTouchInteraction="touch"===e&&i,0===this._detectionMode&&(clearTimeout(this._originTimeoutId),this._originTimeoutId=setTimeout(()=>this._origin=null,this._originFromTouchInteraction?650:1))})}_onFocus(e,i){const r=this._elementInfo.get(i),s=Nf(e);!r||!r.checkChildren&&i!==s||this._originChanged(i,this._getFocusOrigin(s),r)}_onBlur(e,i){const r=this._elementInfo.get(i);!r||r.checkChildren&&e.relatedTarget instanceof Node&&i.contains(e.relatedTarget)||(this._setClasses(i),this._emitOrigin(r,null))}_emitOrigin(e,i){e.subject.observers.length&&this._ngZone.run(()=>e.subject.next(i))}_registerGlobalListeners(e){if(!this._platform.isBrowser)return;const i=e.rootNode,r=this._rootNodeFocusListenerCount.get(i)||0;r||this._ngZone.runOutsideAngular(()=>{i.addEventListener("focus",this._rootNodeFocusAndBlurListener,Hw),i.addEventListener("blur",this._rootNodeFocusAndBlurListener,Hw)}),this._rootNodeFocusListenerCount.set(i,r+1),1==++this._monitoredElementCount&&(this._ngZone.runOutsideAngular(()=>{this._getWindow().addEventListener("focus",this._windowFocusListener)}),this._inputModalityDetector.modalityDetected.pipe(ri(this._stopInputModalityDetector)).subscribe(s=>{this._setOrigin(s,!0)}))}_removeGlobalListeners(e){const i=e.rootNode;if(this._rootNodeFocusListenerCount.has(i)){const r=this._rootNodeFocusListenerCount.get(i);r>1?this._rootNodeFocusListenerCount.set(i,r-1):(i.removeEventListener("focus",this._rootNodeFocusAndBlurListener,Hw),i.removeEventListener("blur",this._rootNodeFocusAndBlurListener,Hw),this._rootNodeFocusListenerCount.delete(i))}--this._monitoredElementCount||(this._getWindow().removeEventListener("focus",this._windowFocusListener),this._stopInputModalityDetector.next(),clearTimeout(this._windowFocusTimeoutId),clearTimeout(this._originTimeoutId))}_originChanged(e,i,r){this._setClasses(e,i),this._emitOrigin(r,i),this._lastFocusOrigin=i}_getClosestElementsInfo(e){const i=[];return this._elementInfo.forEach((r,s)=>{(s===e||r.checkChildren&&s.contains(e))&&i.push([s,r])}),i}_isLastInteractionFromInputLabel(e){const{_mostRecentTarget:i,mostRecentModality:r}=this._inputModalityDetector;if("mouse"!==r||!i||i===e||"INPUT"!==e.nodeName&&"TEXTAREA"!==e.nodeName||e.disabled)return!1;const s=e.labels;if(s)for(let d=0;d{class t{constructor(e,i){this._platform=e,this._document=i,this._breakpointSubscription=Fn(Vw).observe("(forced-colors: active)").subscribe(()=>{this._hasCheckedHighContrastMode&&(this._hasCheckedHighContrastMode=!1,this._applyBodyHighContrastModeCssClasses())})}getHighContrastMode(){if(!this._platform.isBrowser)return 0;const e=this._document.createElement("div");e.style.backgroundColor="rgb(1,2,3)",e.style.position="absolute",this._document.body.appendChild(e);const i=this._document.defaultView||window,r=i&&i.getComputedStyle?i.getComputedStyle(e):null,s=(r&&r.backgroundColor||"").replace(/ /g,"");switch(e.remove(),s){case"rgb(0,0,0)":case"rgb(45,50,54)":case"rgb(32,32,32)":return 2;case"rgb(255,255,255)":case"rgb(255,250,239)":return 1}return 0}ngOnDestroy(){this._breakpointSubscription.unsubscribe()}_applyBodyHighContrastModeCssClasses(){if(!this._hasCheckedHighContrastMode&&this._platform.isBrowser&&this._document.body){const e=this._document.body.classList;e.remove(MD,$P,WP),this._hasCheckedHighContrastMode=!0;const i=this.getHighContrastMode();1===i?e.add(MD,$P):2===i&&e.add(MD,WP)}}}return t.\u0275fac=function(e){return new(e||t)(we(Co),we(Bn))},t.\u0275prov=rt({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),SD=(()=>{class t{constructor(e){e._applyBodyHighContrastModeCssClasses()}}return t.\u0275fac=function(e){return new(e||t)(we(qP))},t.\u0275mod=cn({type:t}),t.\u0275inj=nn({imports:[zw]}),t})();const LH=new vt("cdk-dir-doc",{providedIn:"root",factory:function BH(){return Fn(Bn)}}),NH=/^(ar|ckb|dv|he|iw|fa|nqo|ps|sd|ug|ur|yi|.*[-_](Adlm|Arab|Hebr|Nkoo|Rohg|Thaa))(?!.*[-_](Latn|Cyrl)($|-|_))($|-|_)/i;let sa=(()=>{class t{constructor(e){this.value="ltr",this.change=new In,e&&(this.value=function zH(t){const n=t?.toLowerCase()||"";return"auto"===n&&typeof navigator<"u"&&navigator?.language?NH.test(navigator.language)?"rtl":"ltr":"rtl"===n?"rtl":"ltr"}((e.body?e.body.dir:null)||(e.documentElement?e.documentElement.dir:null)||"ltr"))}ngOnDestroy(){this.change.complete()}}return t.\u0275fac=function(e){return new(e||t)(we(LH,8))},t.\u0275prov=rt({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),zf=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=cn({type:t}),t.\u0275inj=nn({}),t})();function VH(t,n){if(1&t&&ut(0,"mat-pseudo-checkbox",4),2&t){const e=Et();Ae("state",e.selected?"checked":"unchecked")("disabled",e.disabled)}}function GH(t,n){if(1&t&&(se(0,"span",5),Ze(1),he()),2&t){const e=Et();Se(1),no("(",e.group.label,")")}}const UH=["*"],WH=new vt("mat-sanity-checks",{providedIn:"root",factory:function $H(){return!0}});let oi=(()=>{class t{constructor(e,i,r){this._sanityChecks=i,this._document=r,this._hasDoneGlobalChecks=!1,e._applyBodyHighContrastModeCssClasses(),this._hasDoneGlobalChecks||(this._hasDoneGlobalChecks=!0)}_checkIsEnabled(e){return!pD()&&("boolean"==typeof this._sanityChecks?this._sanityChecks:!!this._sanityChecks[e])}}return t.\u0275fac=function(e){return new(e||t)(we(qP),we(WH,8),we(Bn))},t.\u0275mod=cn({type:t}),t.\u0275inj=nn({imports:[zf,zf]}),t})();function c_(t){return class extends t{constructor(...n){super(...n),this._disabled=!1}get disabled(){return this._disabled}set disabled(n){this._disabled=kn(n)}}}function Vf(t,n){return class extends t{constructor(...e){super(...e),this.defaultColor=n,this.color=n}get color(){return this._color}set color(e){const i=e||this.defaultColor;i!==this._color&&(this._color&&this._elementRef.nativeElement.classList.remove(`mat-${this._color}`),i&&this._elementRef.nativeElement.classList.add(`mat-${i}`),this._color=i)}}}function Gf(t){return class extends t{constructor(...n){super(...n),this._disableRipple=!1}get disableRipple(){return this._disableRipple}set disableRipple(n){this._disableRipple=kn(n)}}}function $w(t,n=0){return class extends t{constructor(...e){super(...e),this._tabIndex=n,this.defaultTabIndex=n}get tabIndex(){return this.disabled?-1:this._tabIndex}set tabIndex(e){this._tabIndex=null!=e?wc(e):this.defaultTabIndex}}}function YP(t){return class extends t{constructor(...n){super(...n),this.errorState=!1}updateErrorState(){const n=this.errorState,s=(this.errorStateMatcher||this._defaultErrorStateMatcher).isErrorState(this.ngControl?this.ngControl.control:null,this._parentFormGroup||this._parentForm);s!==n&&(this.errorState=s,this.stateChanges.next())}}}function KP(t){return class extends t{constructor(...n){super(...n),this._isInitialized=!1,this._pendingSubscribers=[],this.initialized=new xn(e=>{this._isInitialized?this._notifySubscriber(e):this._pendingSubscribers.push(e)})}_markInitialized(){this._isInitialized=!0,this._pendingSubscribers.forEach(this._notifySubscriber),this._pendingSubscribers=null}_notifySubscriber(n){n.next(),n.complete()}}}const qH=new vt("MAT_DATE_LOCALE",{providedIn:"root",factory:function ZH(){return Fn(cu)}});class fu{constructor(){this._localeChanges=new Zt,this.localeChanges=this._localeChanges}getValidDateOrNull(n){return this.isDateInstance(n)&&this.isValid(n)?n:null}deserialize(n){return null==n||this.isDateInstance(n)&&this.isValid(n)?n:this.invalid()}setLocale(n){this.locale=n,this._localeChanges.next()}compareDate(n,e){return this.getYear(n)-this.getYear(e)||this.getMonth(n)-this.getMonth(e)||this.getDate(n)-this.getDate(e)}sameDate(n,e){if(n&&e){let i=this.isValid(n),r=this.isValid(e);return i&&r?!this.compareDate(n,e):i==r}return n==e}clampDate(n,e,i){return e&&this.compareDate(n,e)<0?e:i&&this.compareDate(n,i)>0?i:n}}const DD=new vt("mat-date-formats"),XH=/^\d{4}-\d{2}-\d{2}(?:T\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|(?:(?:\+|-)\d{2}:\d{2}))?)?$/;function ED(t,n){const e=Array(t);for(let i=0;i{class t extends fu{constructor(e,i){super(),this.useUtcForDisplay=!1,super.setLocale(e)}getYear(e){return e.getFullYear()}getMonth(e){return e.getMonth()}getDate(e){return e.getDate()}getDayOfWeek(e){return e.getDay()}getMonthNames(e){const i=new Intl.DateTimeFormat(this.locale,{month:e,timeZone:"utc"});return ED(12,r=>this._format(i,new Date(2017,r,1)))}getDateNames(){const e=new Intl.DateTimeFormat(this.locale,{day:"numeric",timeZone:"utc"});return ED(31,i=>this._format(e,new Date(2017,0,i+1)))}getDayOfWeekNames(e){const i=new Intl.DateTimeFormat(this.locale,{weekday:e,timeZone:"utc"});return ED(7,r=>this._format(i,new Date(2017,0,r+1)))}getYearName(e){const i=new Intl.DateTimeFormat(this.locale,{year:"numeric",timeZone:"utc"});return this._format(i,e)}getFirstDayOfWeek(){return 0}getNumDaysInMonth(e){return this.getDate(this._createDateWithOverflow(this.getYear(e),this.getMonth(e)+1,0))}clone(e){return new Date(e.getTime())}createDate(e,i,r){let s=this._createDateWithOverflow(e,i,r);return s.getMonth(),s}today(){return new Date}parse(e,i){return"number"==typeof e?new Date(e):e?new Date(Date.parse(e)):null}format(e,i){if(!this.isValid(e))throw Error("NativeDateAdapter: Cannot format invalid date.");const r=new Intl.DateTimeFormat(this.locale,{...i,timeZone:"utc"});return this._format(r,e)}addCalendarYears(e,i){return this.addCalendarMonths(e,12*i)}addCalendarMonths(e,i){let r=this._createDateWithOverflow(this.getYear(e),this.getMonth(e)+i,this.getDate(e));return this.getMonth(r)!=((this.getMonth(e)+i)%12+12)%12&&(r=this._createDateWithOverflow(this.getYear(r),this.getMonth(r),0)),r}addCalendarDays(e,i){return this._createDateWithOverflow(this.getYear(e),this.getMonth(e),this.getDate(e)+i)}toIso8601(e){return[e.getUTCFullYear(),this._2digit(e.getUTCMonth()+1),this._2digit(e.getUTCDate())].join("-")}deserialize(e){if("string"==typeof e){if(!e)return null;if(XH.test(e)){let i=new Date(e);if(this.isValid(i))return i}}return super.deserialize(e)}isDateInstance(e){return e instanceof Date}isValid(e){return!isNaN(e.getTime())}invalid(){return new Date(NaN)}_createDateWithOverflow(e,i,r){const s=new Date;return s.setFullYear(e,i,r),s.setHours(0,0,0,0),s}_2digit(e){return("00"+e).slice(-2)}_format(e,i){const r=new Date;return r.setUTCFullYear(i.getFullYear(),i.getMonth(),i.getDate()),r.setUTCHours(i.getHours(),i.getMinutes(),i.getSeconds(),i.getMilliseconds()),e.format(r)}}return t.\u0275fac=function(e){return new(e||t)(we(qH,8),we(Co))},t.\u0275prov=rt({token:t,factory:t.\u0275fac}),t})();const KH={parse:{dateInput:null},display:{dateInput:{year:"numeric",month:"numeric",day:"numeric"},monthYearLabel:{year:"numeric",month:"short"},dateA11yLabel:{year:"numeric",month:"long",day:"numeric"},monthYearA11yLabel:{year:"numeric",month:"long"}}};let QH=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=cn({type:t}),t.\u0275inj=nn({providers:[{provide:fu,useClass:YH}]}),t})(),JH=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=cn({type:t}),t.\u0275inj=nn({providers:[{provide:DD,useValue:KH}],imports:[QH]}),t})(),u_=(()=>{class t{isErrorState(e,i){return!!(e&&e.invalid&&(e.touched||i&&i.submitted))}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=rt({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),QP=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=cn({type:t}),t.\u0275inj=nn({imports:[oi,oi]}),t})();class n6{constructor(n,e,i,r=!1){this._renderer=n,this.element=e,this.config=i,this._animationForciblyDisabledThroughCss=r,this.state=3}fadeOut(){this._renderer.fadeOutRipple(this)}}const JP={enterDuration:225,exitDuration:150},TD=s_({passive:!0}),eO=["mousedown","touchstart"],tO=["mouseup","mouseleave","touchend","touchcancel"];class o6{constructor(n,e,i,r){this._target=n,this._ngZone=e,this._isPointerDown=!1,this._activeRipples=new Map,this._pointerUpEventsRegistered=!1,r.isBrowser&&(this._containerElement=Sd(i))}fadeInRipple(n,e,i={}){const r=this._containerRect=this._containerRect||this._containerElement.getBoundingClientRect(),s={...JP,...i.animation};i.centered&&(n=r.left+r.width/2,e=r.top+r.height/2);const d=i.radius||function s6(t,n,e){const i=Math.max(Math.abs(t-e.left),Math.abs(t-e.right)),r=Math.max(Math.abs(n-e.top),Math.abs(n-e.bottom));return Math.sqrt(i*i+r*r)}(n,e,r),_=n-r.left,w=e-r.top,S=s.enterDuration,I=document.createElement("div");I.classList.add("mat-ripple-element"),I.style.left=_-d+"px",I.style.top=w-d+"px",I.style.height=2*d+"px",I.style.width=2*d+"px",null!=i.color&&(I.style.backgroundColor=i.color),I.style.transitionDuration=`${S}ms`,this._containerElement.appendChild(I);const L=window.getComputedStyle(I),Y=L.transitionDuration,ae="none"===L.transitionProperty||"0s"===Y||"0s, 0s"===Y,ve=new n6(this,I,i,ae);I.style.transform="scale3d(1, 1, 1)",ve.state=0,i.persistent||(this._mostRecentTransientRipple=ve);let Be=null;return!ae&&(S||s.exitDuration)&&this._ngZone.runOutsideAngular(()=>{const $e=()=>this._finishRippleTransition(ve),It=()=>this._destroyRipple(ve);I.addEventListener("transitionend",$e),I.addEventListener("transitioncancel",It),Be={onTransitionEnd:$e,onTransitionCancel:It}}),this._activeRipples.set(ve,Be),(ae||!S)&&this._finishRippleTransition(ve),ve}fadeOutRipple(n){if(2===n.state||3===n.state)return;const e=n.element,i={...JP,...n.config.animation};e.style.transitionDuration=`${i.exitDuration}ms`,e.style.opacity="0",n.state=2,(n._animationForciblyDisabledThroughCss||!i.exitDuration)&&this._finishRippleTransition(n)}fadeOutAll(){this._getActiveRipples().forEach(n=>n.fadeOut())}fadeOutAllNonPersistent(){this._getActiveRipples().forEach(n=>{n.config.persistent||n.fadeOut()})}setupTriggerEvents(n){const e=Sd(n);!e||e===this._triggerElement||(this._removeTriggerEvents(),this._triggerElement=e,this._registerEvents(eO))}handleEvent(n){"mousedown"===n.type?this._onMousedown(n):"touchstart"===n.type?this._onTouchStart(n):this._onPointerUp(),this._pointerUpEventsRegistered||(this._registerEvents(tO),this._pointerUpEventsRegistered=!0)}_finishRippleTransition(n){0===n.state?this._startFadeOutTransition(n):2===n.state&&this._destroyRipple(n)}_startFadeOutTransition(n){const e=n===this._mostRecentTransientRipple,{persistent:i}=n.config;n.state=1,!i&&(!e||!this._isPointerDown)&&n.fadeOut()}_destroyRipple(n){const e=this._activeRipples.get(n)??null;this._activeRipples.delete(n),this._activeRipples.size||(this._containerRect=null),n===this._mostRecentTransientRipple&&(this._mostRecentTransientRipple=null),n.state=3,null!==e&&(n.element.removeEventListener("transitionend",e.onTransitionEnd),n.element.removeEventListener("transitioncancel",e.onTransitionCancel)),n.element.remove()}_onMousedown(n){const e=UP(n),i=this._lastTouchStartEvent&&Date.now(){!n.config.persistent&&(1===n.state||n.config.terminateOnPointerUp&&0===n.state)&&n.fadeOut()}))}_registerEvents(n){this._ngZone.runOutsideAngular(()=>{n.forEach(e=>{this._triggerElement.addEventListener(e,this,TD)})})}_getActiveRipples(){return Array.from(this._activeRipples.keys())}_removeTriggerEvents(){this._triggerElement&&(eO.forEach(n=>{this._triggerElement.removeEventListener(n,this,TD)}),this._pointerUpEventsRegistered&&tO.forEach(n=>{this._triggerElement.removeEventListener(n,this,TD)}))}}const a6=new vt("mat-ripple-global-options");let mu=(()=>{class t{constructor(e,i,r,s,d){this._elementRef=e,this._animationMode=d,this.radius=0,this._disabled=!1,this._isInitialized=!1,this._globalOptions=s||{},this._rippleRenderer=new o6(this,i,e,r)}get disabled(){return this._disabled}set disabled(e){e&&this.fadeOutAllNonPersistent(),this._disabled=e,this._setupTriggerEventsIfEnabled()}get trigger(){return this._trigger||this._elementRef.nativeElement}set trigger(e){this._trigger=e,this._setupTriggerEventsIfEnabled()}ngOnInit(){this._isInitialized=!0,this._setupTriggerEventsIfEnabled()}ngOnDestroy(){this._rippleRenderer._removeTriggerEvents()}fadeOutAll(){this._rippleRenderer.fadeOutAll()}fadeOutAllNonPersistent(){this._rippleRenderer.fadeOutAllNonPersistent()}get rippleConfig(){return{centered:this.centered,radius:this.radius,color:this.color,animation:{...this._globalOptions.animation,..."NoopAnimations"===this._animationMode?{enterDuration:0,exitDuration:0}:{},...this.animation},terminateOnPointerUp:this._globalOptions.terminateOnPointerUp}}get rippleDisabled(){return this.disabled||!!this._globalOptions.disabled}_setupTriggerEventsIfEnabled(){!this.disabled&&this._isInitialized&&this._rippleRenderer.setupTriggerEvents(this.trigger)}launch(e,i=0,r){return"number"==typeof e?this._rippleRenderer.fadeInRipple(e,i,{...this.rippleConfig,...r}):this._rippleRenderer.fadeInRipple(0,0,{...this.rippleConfig,...e})}}return t.\u0275fac=function(e){return new(e||t)(z($t),z(Ln),z(Co),z(a6,8),z(Ta,8))},t.\u0275dir=Ge({type:t,selectors:[["","mat-ripple",""],["","matRipple",""]],hostAttrs:[1,"mat-ripple"],hostVars:2,hostBindings:function(e,i){2&e&&yi("mat-ripple-unbounded",i.unbounded)},inputs:{color:["matRippleColor","color"],unbounded:["matRippleUnbounded","unbounded"],centered:["matRippleCentered","centered"],radius:["matRippleRadius","radius"],animation:["matRippleAnimation","animation"],disabled:["matRippleDisabled","disabled"],trigger:["matRippleTrigger","trigger"]},exportAs:["matRipple"]}),t})(),ep=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=cn({type:t}),t.\u0275inj=nn({imports:[oi,oi]}),t})(),nO=(()=>{class t{constructor(e){this._animationMode=e,this.state="unchecked",this.disabled=!1}}return t.\u0275fac=function(e){return new(e||t)(z(Ta,8))},t.\u0275cmp=Rn({type:t,selectors:[["mat-pseudo-checkbox"]],hostAttrs:[1,"mat-pseudo-checkbox"],hostVars:8,hostBindings:function(e,i){2&e&&yi("mat-pseudo-checkbox-indeterminate","indeterminate"===i.state)("mat-pseudo-checkbox-checked","checked"===i.state)("mat-pseudo-checkbox-disabled",i.disabled)("_mat-animation-noopable","NoopAnimations"===i._animationMode)},inputs:{state:"state",disabled:"disabled"},decls:0,vars:0,template:function(e,i){},styles:['.mat-pseudo-checkbox{width:16px;height:16px;border:2px solid;border-radius:2px;cursor:pointer;display:inline-block;vertical-align:middle;box-sizing:border-box;position:relative;flex-shrink:0;transition:border-color 90ms cubic-bezier(0, 0, 0.2, 0.1),background-color 90ms cubic-bezier(0, 0, 0.2, 0.1)}.mat-pseudo-checkbox::after{position:absolute;opacity:0;content:"";border-bottom:2px solid currentColor;transition:opacity 90ms cubic-bezier(0, 0, 0.2, 0.1)}.mat-pseudo-checkbox.mat-pseudo-checkbox-checked,.mat-pseudo-checkbox.mat-pseudo-checkbox-indeterminate{border-color:rgba(0,0,0,0)}.mat-pseudo-checkbox._mat-animation-noopable{transition:none !important;animation:none !important}.mat-pseudo-checkbox._mat-animation-noopable::after{transition:none}.mat-pseudo-checkbox-disabled{cursor:default}.mat-pseudo-checkbox-indeterminate::after{top:5px;left:1px;width:10px;opacity:1;border-radius:2px}.mat-pseudo-checkbox-checked::after{top:2.4px;left:1px;width:8px;height:3px;border-left:2px solid currentColor;transform:rotate(-45deg);opacity:1;box-sizing:content-box}'],encapsulation:2,changeDetection:0}),t})(),AD=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=cn({type:t}),t.\u0275inj=nn({imports:[oi]}),t})();const iO=new vt("MAT_OPTION_PARENT_COMPONENT"),rO=new vt("MatOptgroup");let l6=0;class c6{constructor(n,e=!1){this.source=n,this.isUserInput=e}}let u6=(()=>{class t{constructor(e,i,r,s){this._element=e,this._changeDetectorRef=i,this._parent=r,this.group=s,this._selected=!1,this._active=!1,this._disabled=!1,this._mostRecentViewValue="",this.id="mat-option-"+l6++,this.onSelectionChange=new In,this._stateChanges=new Zt}get multiple(){return this._parent&&this._parent.multiple}get selected(){return this._selected}get disabled(){return this.group&&this.group.disabled||this._disabled}set disabled(e){this._disabled=kn(e)}get disableRipple(){return!(!this._parent||!this._parent.disableRipple)}get active(){return this._active}get viewValue(){return(this._getHostElement().textContent||"").trim()}select(){this._selected||(this._selected=!0,this._changeDetectorRef.markForCheck(),this._emitSelectionChangeEvent())}deselect(){this._selected&&(this._selected=!1,this._changeDetectorRef.markForCheck(),this._emitSelectionChangeEvent())}focus(e,i){const r=this._getHostElement();"function"==typeof r.focus&&r.focus(i)}setActiveStyles(){this._active||(this._active=!0,this._changeDetectorRef.markForCheck())}setInactiveStyles(){this._active&&(this._active=!1,this._changeDetectorRef.markForCheck())}getLabel(){return this.viewValue}_handleKeydown(e){(13===e.keyCode||32===e.keyCode)&&!xc(e)&&(this._selectViaInteraction(),e.preventDefault())}_selectViaInteraction(){this.disabled||(this._selected=!this.multiple||!this._selected,this._changeDetectorRef.markForCheck(),this._emitSelectionChangeEvent(!0))}_getAriaSelected(){return this.selected||!this.multiple&&null}_getTabIndex(){return this.disabled?"-1":"0"}_getHostElement(){return this._element.nativeElement}ngAfterViewChecked(){if(this._selected){const e=this.viewValue;e!==this._mostRecentViewValue&&(this._mostRecentViewValue=e,this._stateChanges.next())}}ngOnDestroy(){this._stateChanges.complete()}_emitSelectionChangeEvent(e=!1){this.onSelectionChange.emit(new c6(this,e))}}return t.\u0275fac=function(e){Bs()},t.\u0275dir=Ge({type:t,inputs:{value:"value",id:"id",disabled:"disabled"},outputs:{onSelectionChange:"onSelectionChange"}}),t})(),ID=(()=>{class t extends u6{constructor(e,i,r,s){super(e,i,r,s)}}return t.\u0275fac=function(e){return new(e||t)(z($t),z(Lr),z(iO,8),z(rO,8))},t.\u0275cmp=Rn({type:t,selectors:[["mat-option"]],hostAttrs:["role","option",1,"mat-option","mat-focus-indicator"],hostVars:12,hostBindings:function(e,i){1&e&&Nt("click",function(){return i._selectViaInteraction()})("keydown",function(s){return i._handleKeydown(s)}),2&e&&(gc("id",i.id),et("tabindex",i._getTabIndex())("aria-selected",i._getAriaSelected())("aria-disabled",i.disabled.toString()),yi("mat-selected",i.selected)("mat-option-multiple",i.multiple)("mat-active",i.active)("mat-option-disabled",i.disabled))},exportAs:["matOption"],features:[a],ngContentSelectors:UH,decls:5,vars:4,consts:[["class","mat-option-pseudo-checkbox",3,"state","disabled",4,"ngIf"],[1,"mat-option-text"],["class","cdk-visually-hidden",4,"ngIf"],["mat-ripple","",1,"mat-option-ripple",3,"matRippleTrigger","matRippleDisabled"],[1,"mat-option-pseudo-checkbox",3,"state","disabled"],[1,"cdk-visually-hidden"]],template:function(e,i){1&e&&(Tr(),Mt(0,VH,1,2,"mat-pseudo-checkbox",0),se(1,"span",1),Xi(2),he(),Mt(3,GH,2,1,"span",2),ut(4,"div",3)),2&e&&(Ae("ngIf",i.multiple),Se(3),Ae("ngIf",i.group&&i.group._inert),Se(1),Ae("matRippleTrigger",i._getHostElement())("matRippleDisabled",i.disabled||i.disableRipple))},dependencies:[mu,Ya,nO],styles:['.mat-option{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;line-height:48px;height:48px;padding:0 16px;text-align:left;text-decoration:none;max-width:100%;position:relative;cursor:pointer;outline:none;display:flex;flex-direction:row;max-width:100%;box-sizing:border-box;align-items:center;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-option[disabled]{cursor:default}[dir=rtl] .mat-option{text-align:right}.mat-option .mat-icon{margin-right:16px;vertical-align:middle}.mat-option .mat-icon svg{vertical-align:top}[dir=rtl] .mat-option .mat-icon{margin-left:16px;margin-right:0}.mat-option[aria-disabled=true]{-webkit-user-select:none;user-select:none;cursor:default}.mat-optgroup .mat-option:not(.mat-option-multiple){padding-left:32px}[dir=rtl] .mat-optgroup .mat-option:not(.mat-option-multiple){padding-left:16px;padding-right:32px}.mat-option.mat-active::before{content:""}.cdk-high-contrast-active .mat-option[aria-disabled=true]{opacity:.5}.cdk-high-contrast-active .mat-option.mat-selected:not(.mat-option-multiple)::after{content:"";position:absolute;top:50%;right:16px;transform:translateY(-50%);width:10px;height:0;border-bottom:solid 10px;border-radius:10px}[dir=rtl] .cdk-high-contrast-active .mat-option.mat-selected:not(.mat-option-multiple)::after{right:auto;left:16px}.mat-option-text{display:inline-block;flex-grow:1;overflow:hidden;text-overflow:ellipsis}.mat-option .mat-option-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}.mat-option-pseudo-checkbox{margin-right:8px}[dir=rtl] .mat-option-pseudo-checkbox{margin-left:8px;margin-right:0}'],encapsulation:2,changeDetection:0}),t})();function oO(t,n,e){if(e.length){let i=n.toArray(),r=e.toArray(),s=0;for(let d=0;d{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=cn({type:t}),t.\u0275inj=nn({imports:[ep,Ia,oi,AD]}),t})();class h6{}function kD(t){return t&&"function"==typeof t.connect&&!(t instanceof VS)}class aO{applyChanges(n,e,i,r,s){n.forEachOperation((d,_,w)=>{let S,I;if(null==d.previousIndex){const L=i(d,_,w);S=e.createEmbeddedView(L.templateRef,L.context,L.index),I=1}else null==w?(e.remove(_),I=3):(S=e.get(_),e.move(S,w),I=2);s&&s({context:S?.context,operation:I,record:d})})}detach(){}}class RD{get selected(){return this._selected||(this._selected=Array.from(this._selection.values())),this._selected}constructor(n=!1,e,i=!0,r){this._multiple=n,this._emitChanges=i,this.compareWith=r,this._selection=new Set,this._deselectedToEmit=[],this._selectedToEmit=[],this.changed=new Zt,e&&e.length&&(n?e.forEach(s=>this._markSelected(s)):this._markSelected(e[0]),this._selectedToEmit.length=0)}select(...n){this._verifyValueAssignment(n),n.forEach(i=>this._markSelected(i));const e=this._hasQueuedChanges();return this._emitChangeEvent(),e}deselect(...n){this._verifyValueAssignment(n),n.forEach(i=>this._unmarkSelected(i));const e=this._hasQueuedChanges();return this._emitChangeEvent(),e}setSelection(...n){this._verifyValueAssignment(n);const e=this.selected,i=new Set(n);n.forEach(s=>this._markSelected(s)),e.filter(s=>!i.has(s)).forEach(s=>this._unmarkSelected(s));const r=this._hasQueuedChanges();return this._emitChangeEvent(),r}toggle(n){return this.isSelected(n)?this.deselect(n):this.select(n)}clear(n=!0){this._unmarkAll();const e=this._hasQueuedChanges();return n&&this._emitChangeEvent(),e}isSelected(n){return this._selection.has(this._getConcreteValue(n))}isEmpty(){return 0===this._selection.size}hasValue(){return!this.isEmpty()}sort(n){this._multiple&&this.selected&&this._selected.sort(n)}isMultipleSelection(){return this._multiple}_emitChangeEvent(){this._selected=null,(this._selectedToEmit.length||this._deselectedToEmit.length)&&(this.changed.next({source:this,added:this._selectedToEmit,removed:this._deselectedToEmit}),this._deselectedToEmit=[],this._selectedToEmit=[])}_markSelected(n){n=this._getConcreteValue(n),this.isSelected(n)||(this._multiple||this._unmarkAll(),this.isSelected(n)||this._selection.add(n),this._emitChanges&&this._selectedToEmit.push(n))}_unmarkSelected(n){n=this._getConcreteValue(n),this.isSelected(n)&&(this._selection.delete(n),this._emitChanges&&this._deselectedToEmit.push(n))}_unmarkAll(){this.isEmpty()||this._selection.forEach(n=>this._unmarkSelected(n))}_verifyValueAssignment(n){}_hasQueuedChanges(){return!(!this._deselectedToEmit.length&&!this._selectedToEmit.length)}_getConcreteValue(n){if(this.compareWith){for(let e of this._selection)if(this.compareWith(n,e))return e;return n}return n}}let p6=(()=>{class t{constructor(){this._listeners=[]}notify(e,i){for(let r of this._listeners)r(e,i)}listen(e){return this._listeners.push(e),()=>{this._listeners=this._listeners.filter(i=>e!==i)}}ngOnDestroy(){this._listeners=[]}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=rt({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();const e0=new vt("_ViewRepeater");function cO(...t){const n=Ni(t),{args:e,keys:i}=dR(t),r=new xn(s=>{const{length:d}=e;if(!d)return void s.complete();const _=new Array(d);let w=d,S=d;for(let I=0;I{L||(L=!0,S--),_[I]=H},()=>w--,void 0,()=>{(!w||!L)&&(S||s.next(i?hR(i,_):_),s.complete())}))}});return n?r.pipe(NS(n)):r}let uO=(()=>{class t{constructor(e,i){this._renderer=e,this._elementRef=i,this.onChange=r=>{},this.onTouched=()=>{}}setProperty(e,i){this._renderer.setProperty(this._elementRef.nativeElement,e,i)}registerOnTouched(e){this.onTouched=e}registerOnChange(e){this.onChange=e}setDisabledState(e){this.setProperty("disabled",e)}}return t.\u0275fac=function(e){return new(e||t)(z(Da),z($t))},t.\u0275dir=Ge({type:t}),t})(),Uf=(()=>{class t extends uO{}return t.\u0275fac=function(){let n;return function(i){return(n||(n=qt(t)))(i||t)}}(),t.\u0275dir=Ge({type:t,features:[a]}),t})();const aa=new vt("NgValueAccessor"),m6={provide:aa,useExisting:ni(()=>d_),multi:!0},_6=new vt("CompositionEventMode");let d_=(()=>{class t extends uO{constructor(e,i,r){super(e,i),this._compositionMode=r,this._composing=!1,null==this._compositionMode&&(this._compositionMode=!function g6(){const t=du()?du().getUserAgent():"";return/android (\d+)/.test(t.toLowerCase())}())}writeValue(e){this.setProperty("value",e??"")}_handleInput(e){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(e)}_compositionStart(){this._composing=!0}_compositionEnd(e){this._composing=!1,this._compositionMode&&this.onChange(e)}}return t.\u0275fac=function(e){return new(e||t)(z(Da),z($t),z(_6,8))},t.\u0275dir=Ge({type:t,selectors:[["input","formControlName","",3,"type","checkbox"],["textarea","formControlName",""],["input","formControl","",3,"type","checkbox"],["textarea","formControl",""],["input","ngModel","",3,"type","checkbox"],["textarea","ngModel",""],["","ngDefaultControl",""]],hostBindings:function(e,i){1&e&&Nt("input",function(s){return i._handleInput(s.target.value)})("blur",function(){return i.onTouched()})("compositionstart",function(){return i._compositionStart()})("compositionend",function(s){return i._compositionEnd(s.target.value)})},features:[Pn([m6]),a]}),t})();function tp(t){return null==t||("string"==typeof t||Array.isArray(t))&&0===t.length}function hO(t){return null!=t&&"number"==typeof t.length}const Zo=new vt("NgValidators"),np=new vt("NgAsyncValidators"),v6=/^(?=.{1,254}$)(?=.{1,64}@)[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;class so{static min(n){return function pO(t){return n=>{if(tp(n.value)||tp(t))return null;const e=parseFloat(n.value);return!isNaN(e)&&e{if(tp(n.value)||tp(t))return null;const e=parseFloat(n.value);return!isNaN(e)&&e>t?{max:{max:t,actual:n.value}}:null}}(n)}static required(n){return mO(n)}static requiredTrue(n){return function gO(t){return!0===t.value?null:{required:!0}}(n)}static email(n){return function _O(t){return tp(t.value)||v6.test(t.value)?null:{email:!0}}(n)}static minLength(n){return function yO(t){return n=>tp(n.value)||!hO(n.value)?null:n.value.length{if(tp(i.value))return null;const r=i.value;return n.test(r)?null:{pattern:{requiredPattern:e,actualValue:r}}}}(n)}static nullValidator(n){return null}static compose(n){return DO(n)}static composeAsync(n){return EO(n)}}function mO(t){return tp(t.value)?{required:!0}:null}function vO(t){return n=>hO(n.value)&&n.value.length>t?{maxlength:{requiredLength:t,actualLength:n.value.length}}:null}function Ww(t){return null}function xO(t){return null!=t}function wO(t){return ia(t)?Mr(t):t}function CO(t){let n={};return t.forEach(e=>{n=null!=e?{...n,...e}:n}),0===Object.keys(n).length?null:n}function MO(t,n){return n.map(e=>e(t))}function SO(t){return t.map(n=>function b6(t){return!t.validate}(n)?n:e=>n.validate(e))}function DO(t){if(!t)return null;const n=t.filter(xO);return 0==n.length?null:function(e){return CO(MO(e,n))}}function PD(t){return null!=t?DO(SO(t)):null}function EO(t){if(!t)return null;const n=t.filter(xO);return 0==n.length?null:function(e){return cO(MO(e,n).map(wO)).pipe(Jt(CO))}}function OD(t){return null!=t?EO(SO(t)):null}function TO(t,n){return null===t?[n]:Array.isArray(t)?[...t,n]:[t,n]}function AO(t){return t._rawValidators}function IO(t){return t._rawAsyncValidators}function FD(t){return t?Array.isArray(t)?t:[t]:[]}function qw(t,n){return Array.isArray(t)?t.includes(n):t===n}function kO(t,n){const e=FD(n);return FD(t).forEach(r=>{qw(e,r)||e.push(r)}),e}function RO(t,n){return FD(n).filter(e=>!qw(t,e))}class PO{constructor(){this._rawValidators=[],this._rawAsyncValidators=[],this._onDestroyCallbacks=[]}get value(){return this.control?this.control.value:null}get valid(){return this.control?this.control.valid:null}get invalid(){return this.control?this.control.invalid:null}get pending(){return this.control?this.control.pending:null}get disabled(){return this.control?this.control.disabled:null}get enabled(){return this.control?this.control.enabled:null}get errors(){return this.control?this.control.errors:null}get pristine(){return this.control?this.control.pristine:null}get dirty(){return this.control?this.control.dirty:null}get touched(){return this.control?this.control.touched:null}get status(){return this.control?this.control.status:null}get untouched(){return this.control?this.control.untouched:null}get statusChanges(){return this.control?this.control.statusChanges:null}get valueChanges(){return this.control?this.control.valueChanges:null}get path(){return null}_setValidators(n){this._rawValidators=n||[],this._composedValidatorFn=PD(this._rawValidators)}_setAsyncValidators(n){this._rawAsyncValidators=n||[],this._composedAsyncValidatorFn=OD(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_registerOnDestroy(n){this._onDestroyCallbacks.push(n)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(n=>n()),this._onDestroyCallbacks=[]}reset(n){this.control&&this.control.reset(n)}hasError(n,e){return!!this.control&&this.control.hasError(n,e)}getError(n,e){return this.control?this.control.getError(n,e):null}}class la extends PO{get formDirective(){return null}get path(){return null}}class gu extends PO{constructor(){super(...arguments),this._parent=null,this.name=null,this.valueAccessor=null}}class OO{constructor(n){this._cd=n}get isTouched(){return!!this._cd?.control?.touched}get isUntouched(){return!!this._cd?.control?.untouched}get isPristine(){return!!this._cd?.control?.pristine}get isDirty(){return!!this._cd?.control?.dirty}get isValid(){return!!this._cd?.control?.valid}get isInvalid(){return!!this._cd?.control?.invalid}get isPending(){return!!this._cd?.control?.pending}get isSubmitted(){return!!this._cd?.submitted}}let t0=(()=>{class t extends OO{constructor(e){super(e)}}return t.\u0275fac=function(e){return new(e||t)(z(gu,2))},t.\u0275dir=Ge({type:t,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(e,i){2&e&&yi("ng-untouched",i.isUntouched)("ng-touched",i.isTouched)("ng-pristine",i.isPristine)("ng-dirty",i.isDirty)("ng-valid",i.isValid)("ng-invalid",i.isInvalid)("ng-pending",i.isPending)},features:[a]}),t})(),LD=(()=>{class t extends OO{constructor(e){super(e)}}return t.\u0275fac=function(e){return new(e||t)(z(la,10))},t.\u0275dir=Ge({type:t,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(e,i){2&e&&yi("ng-untouched",i.isUntouched)("ng-touched",i.isTouched)("ng-pristine",i.isPristine)("ng-dirty",i.isDirty)("ng-valid",i.isValid)("ng-invalid",i.isInvalid)("ng-pending",i.isPending)("ng-submitted",i.isSubmitted)},features:[a]}),t})();const n0="VALID",Xw="INVALID",h_="PENDING",r0="DISABLED";function VD(t){return(Yw(t)?t.validators:t)||null}function GD(t,n){return(Yw(n)?n.asyncValidators:t)||null}function Yw(t){return null!=t&&!Array.isArray(t)&&"object"==typeof t}function LO(t,n,e){const i=t.controls;if(!(n?Object.keys(i):i).length)throw new mt(1e3,"");if(!i[e])throw new mt(1001,"")}function BO(t,n,e){t._forEachChild((i,r)=>{if(void 0===e[r])throw new mt(1002,"")})}class Kw{constructor(n,e){this._pendingDirty=!1,this._hasOwnPendingAsyncValidator=!1,this._pendingTouched=!1,this._onCollectionChange=()=>{},this._parent=null,this.pristine=!0,this.touched=!1,this._onDisabledChange=[],this._assignValidators(n),this._assignAsyncValidators(e)}get validator(){return this._composedValidatorFn}set validator(n){this._rawValidators=this._composedValidatorFn=n}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(n){this._rawAsyncValidators=this._composedAsyncValidatorFn=n}get parent(){return this._parent}get valid(){return this.status===n0}get invalid(){return this.status===Xw}get pending(){return this.status==h_}get disabled(){return this.status===r0}get enabled(){return this.status!==r0}get dirty(){return!this.pristine}get untouched(){return!this.touched}get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(n){this._assignValidators(n)}setAsyncValidators(n){this._assignAsyncValidators(n)}addValidators(n){this.setValidators(kO(n,this._rawValidators))}addAsyncValidators(n){this.setAsyncValidators(kO(n,this._rawAsyncValidators))}removeValidators(n){this.setValidators(RO(n,this._rawValidators))}removeAsyncValidators(n){this.setAsyncValidators(RO(n,this._rawAsyncValidators))}hasValidator(n){return qw(this._rawValidators,n)}hasAsyncValidator(n){return qw(this._rawAsyncValidators,n)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(n={}){this.touched=!0,this._parent&&!n.onlySelf&&this._parent.markAsTouched(n)}markAllAsTouched(){this.markAsTouched({onlySelf:!0}),this._forEachChild(n=>n.markAllAsTouched())}markAsUntouched(n={}){this.touched=!1,this._pendingTouched=!1,this._forEachChild(e=>{e.markAsUntouched({onlySelf:!0})}),this._parent&&!n.onlySelf&&this._parent._updateTouched(n)}markAsDirty(n={}){this.pristine=!1,this._parent&&!n.onlySelf&&this._parent.markAsDirty(n)}markAsPristine(n={}){this.pristine=!0,this._pendingDirty=!1,this._forEachChild(e=>{e.markAsPristine({onlySelf:!0})}),this._parent&&!n.onlySelf&&this._parent._updatePristine(n)}markAsPending(n={}){this.status=h_,!1!==n.emitEvent&&this.statusChanges.emit(this.status),this._parent&&!n.onlySelf&&this._parent.markAsPending(n)}disable(n={}){const e=this._parentMarkedDirty(n.onlySelf);this.status=r0,this.errors=null,this._forEachChild(i=>{i.disable({...n,onlySelf:!0})}),this._updateValue(),!1!==n.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors({...n,skipPristineCheck:e}),this._onDisabledChange.forEach(i=>i(!0))}enable(n={}){const e=this._parentMarkedDirty(n.onlySelf);this.status=n0,this._forEachChild(i=>{i.enable({...n,onlySelf:!0})}),this.updateValueAndValidity({onlySelf:!0,emitEvent:n.emitEvent}),this._updateAncestors({...n,skipPristineCheck:e}),this._onDisabledChange.forEach(i=>i(!1))}_updateAncestors(n){this._parent&&!n.onlySelf&&(this._parent.updateValueAndValidity(n),n.skipPristineCheck||this._parent._updatePristine(),this._parent._updateTouched())}setParent(n){this._parent=n}getRawValue(){return this.value}updateValueAndValidity(n={}){this._setInitialStatus(),this._updateValue(),this.enabled&&(this._cancelExistingSubscription(),this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===n0||this.status===h_)&&this._runAsyncValidator(n.emitEvent)),!1!==n.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!n.onlySelf&&this._parent.updateValueAndValidity(n)}_updateTreeValidity(n={emitEvent:!0}){this._forEachChild(e=>e._updateTreeValidity(n)),this.updateValueAndValidity({onlySelf:!0,emitEvent:n.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?r0:n0}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(n){if(this.asyncValidator){this.status=h_,this._hasOwnPendingAsyncValidator=!0;const e=wO(this.asyncValidator(this));this._asyncValidationSubscription=e.subscribe(i=>{this._hasOwnPendingAsyncValidator=!1,this.setErrors(i,{emitEvent:n})})}}_cancelExistingSubscription(){this._asyncValidationSubscription&&(this._asyncValidationSubscription.unsubscribe(),this._hasOwnPendingAsyncValidator=!1)}setErrors(n,e={}){this.errors=n,this._updateControlsErrors(!1!==e.emitEvent)}get(n){let e=n;return null==e||(Array.isArray(e)||(e=e.split(".")),0===e.length)?null:e.reduce((i,r)=>i&&i._find(r),this)}getError(n,e){const i=e?this.get(e):this;return i&&i.errors?i.errors[n]:null}hasError(n,e){return!!this.getError(n,e)}get root(){let n=this;for(;n._parent;)n=n._parent;return n}_updateControlsErrors(n){this.status=this._calculateStatus(),n&&this.statusChanges.emit(this.status),this._parent&&this._parent._updateControlsErrors(n)}_initObservables(){this.valueChanges=new In,this.statusChanges=new In}_calculateStatus(){return this._allControlsDisabled()?r0:this.errors?Xw:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(h_)?h_:this._anyControlsHaveStatus(Xw)?Xw:n0}_anyControlsHaveStatus(n){return this._anyControls(e=>e.status===n)}_anyControlsDirty(){return this._anyControls(n=>n.dirty)}_anyControlsTouched(){return this._anyControls(n=>n.touched)}_updatePristine(n={}){this.pristine=!this._anyControlsDirty(),this._parent&&!n.onlySelf&&this._parent._updatePristine(n)}_updateTouched(n={}){this.touched=this._anyControlsTouched(),this._parent&&!n.onlySelf&&this._parent._updateTouched(n)}_registerOnCollectionChange(n){this._onCollectionChange=n}_setUpdateStrategy(n){Yw(n)&&null!=n.updateOn&&(this._updateOn=n.updateOn)}_parentMarkedDirty(n){return!n&&!(!this._parent||!this._parent.dirty)&&!this._parent._anyControlsDirty()}_find(n){return null}_assignValidators(n){this._rawValidators=Array.isArray(n)?n.slice():n,this._composedValidatorFn=function E6(t){return Array.isArray(t)?PD(t):t||null}(this._rawValidators)}_assignAsyncValidators(n){this._rawAsyncValidators=Array.isArray(n)?n.slice():n,this._composedAsyncValidatorFn=function T6(t){return Array.isArray(t)?OD(t):t||null}(this._rawAsyncValidators)}}class o0 extends Kw{constructor(n,e,i){super(VD(e),GD(i,e)),this.controls=n,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}registerControl(n,e){return this.controls[n]?this.controls[n]:(this.controls[n]=e,e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange),e)}addControl(n,e,i={}){this.registerControl(n,e),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}removeControl(n,e={}){this.controls[n]&&this.controls[n]._registerOnCollectionChange(()=>{}),delete this.controls[n],this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange()}setControl(n,e,i={}){this.controls[n]&&this.controls[n]._registerOnCollectionChange(()=>{}),delete this.controls[n],e&&this.registerControl(n,e),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}contains(n){return this.controls.hasOwnProperty(n)&&this.controls[n].enabled}setValue(n,e={}){BO(this,0,n),Object.keys(n).forEach(i=>{LO(this,!0,i),this.controls[i].setValue(n[i],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(n,e={}){null!=n&&(Object.keys(n).forEach(i=>{const r=this.controls[i];r&&r.patchValue(n[i],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(n={},e={}){this._forEachChild((i,r)=>{i.reset(n[r],{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e),this._updateTouched(e),this.updateValueAndValidity(e)}getRawValue(){return this._reduceChildren({},(n,e,i)=>(n[i]=e.getRawValue(),n))}_syncPendingControls(){let n=this._reduceChildren(!1,(e,i)=>!!i._syncPendingControls()||e);return n&&this.updateValueAndValidity({onlySelf:!0}),n}_forEachChild(n){Object.keys(this.controls).forEach(e=>{const i=this.controls[e];i&&n(i,e)})}_setUpControls(){this._forEachChild(n=>{n.setParent(this),n._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(n){for(const[e,i]of Object.entries(this.controls))if(this.contains(e)&&n(i))return!0;return!1}_reduceValue(){return this._reduceChildren({},(e,i,r)=>((i.enabled||this.disabled)&&(e[r]=i.value),e))}_reduceChildren(n,e){let i=n;return this._forEachChild((r,s)=>{i=e(i,r,s)}),i}_allControlsDisabled(){for(const n of Object.keys(this.controls))if(this.controls[n].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}_find(n){return this.controls.hasOwnProperty(n)?this.controls[n]:null}}class NO extends o0{}const jf=new vt("CallSetDisabledState",{providedIn:"root",factory:()=>s0}),s0="always";function Qw(t,n){return[...n.path,t]}function a0(t,n,e=s0){UD(t,n),n.valueAccessor.writeValue(t.value),(t.disabled||"always"===e)&&n.valueAccessor.setDisabledState?.(t.disabled),function I6(t,n){n.valueAccessor.registerOnChange(e=>{t._pendingValue=e,t._pendingChange=!0,t._pendingDirty=!0,"change"===t.updateOn&&zO(t,n)})}(t,n),function R6(t,n){const e=(i,r)=>{n.valueAccessor.writeValue(i),r&&n.viewToModelUpdate(i)};t.registerOnChange(e),n._registerOnDestroy(()=>{t._unregisterOnChange(e)})}(t,n),function k6(t,n){n.valueAccessor.registerOnTouched(()=>{t._pendingTouched=!0,"blur"===t.updateOn&&t._pendingChange&&zO(t,n),"submit"!==t.updateOn&&t.markAsTouched()})}(t,n),function A6(t,n){if(n.valueAccessor.setDisabledState){const e=i=>{n.valueAccessor.setDisabledState(i)};t.registerOnDisabledChange(e),n._registerOnDestroy(()=>{t._unregisterOnDisabledChange(e)})}}(t,n)}function Jw(t,n,e=!0){const i=()=>{};n.valueAccessor&&(n.valueAccessor.registerOnChange(i),n.valueAccessor.registerOnTouched(i)),tC(t,n),t&&(n._invokeOnDestroyCallbacks(),t._registerOnCollectionChange(()=>{}))}function eC(t,n){t.forEach(e=>{e.registerOnValidatorChange&&e.registerOnValidatorChange(n)})}function UD(t,n){const e=AO(t);null!==n.validator?t.setValidators(TO(e,n.validator)):"function"==typeof e&&t.setValidators([e]);const i=IO(t);null!==n.asyncValidator?t.setAsyncValidators(TO(i,n.asyncValidator)):"function"==typeof i&&t.setAsyncValidators([i]);const r=()=>t.updateValueAndValidity();eC(n._rawValidators,r),eC(n._rawAsyncValidators,r)}function tC(t,n){let e=!1;if(null!==t){if(null!==n.validator){const r=AO(t);if(Array.isArray(r)&&r.length>0){const s=r.filter(d=>d!==n.validator);s.length!==r.length&&(e=!0,t.setValidators(s))}}if(null!==n.asyncValidator){const r=IO(t);if(Array.isArray(r)&&r.length>0){const s=r.filter(d=>d!==n.asyncValidator);s.length!==r.length&&(e=!0,t.setAsyncValidators(s))}}}const i=()=>{};return eC(n._rawValidators,i),eC(n._rawAsyncValidators,i),e}function zO(t,n){t._pendingDirty&&t.markAsDirty(),t.setValue(t._pendingValue,{emitModelToViewChange:!1}),n.viewToModelUpdate(t._pendingValue),t._pendingChange=!1}function VO(t,n){UD(t,n)}function HD(t,n){if(!t.hasOwnProperty("model"))return!1;const e=t.model;return!!e.isFirstChange()||!Object.is(n,e.currentValue)}function GO(t,n){t._syncPendingControls(),n.forEach(e=>{const i=e.control;"submit"===i.updateOn&&i._pendingChange&&(e.viewToModelUpdate(i._pendingValue),i._pendingChange=!1)})}function $D(t,n){if(!n)return null;let e,i,r;return Array.isArray(n),n.forEach(s=>{s.constructor===d_?e=s:function F6(t){return Object.getPrototypeOf(t.constructor)===Uf}(s)?i=s:r=s}),r||i||e||null}const B6={provide:la,useExisting:ni(()=>c0)},l0=(()=>Promise.resolve())();let c0=(()=>{class t extends la{constructor(e,i,r){super(),this.callSetDisabledState=r,this.submitted=!1,this._directives=new Set,this.ngSubmit=new In,this.form=new o0({},PD(e),OD(i))}ngAfterViewInit(){this._setUpdateStrategy()}get formDirective(){return this}get control(){return this.form}get path(){return[]}get controls(){return this.form.controls}addControl(e){l0.then(()=>{const i=this._findContainer(e.path);e.control=i.registerControl(e.name,e.control),a0(e.control,e,this.callSetDisabledState),e.control.updateValueAndValidity({emitEvent:!1}),this._directives.add(e)})}getControl(e){return this.form.get(e.path)}removeControl(e){l0.then(()=>{const i=this._findContainer(e.path);i&&i.removeControl(e.name),this._directives.delete(e)})}addFormGroup(e){l0.then(()=>{const i=this._findContainer(e.path),r=new o0({});VO(r,e),i.registerControl(e.name,r),r.updateValueAndValidity({emitEvent:!1})})}removeFormGroup(e){l0.then(()=>{const i=this._findContainer(e.path);i&&i.removeControl(e.name)})}getFormGroup(e){return this.form.get(e.path)}updateModel(e,i){l0.then(()=>{this.form.get(e.path).setValue(i)})}setValue(e){this.control.setValue(e)}onSubmit(e){return this.submitted=!0,GO(this.form,this._directives),this.ngSubmit.emit(e),"dialog"===e?.target?.method}onReset(){this.resetForm()}resetForm(e){this.form.reset(e),this.submitted=!1}_setUpdateStrategy(){this.options&&null!=this.options.updateOn&&(this.form._updateOn=this.options.updateOn)}_findContainer(e){return e.pop(),e.length?this.form.get(e):this.form}}return t.\u0275fac=function(e){return new(e||t)(z(Zo,10),z(np,10),z(jf,8))},t.\u0275dir=Ge({type:t,selectors:[["form",3,"ngNoForm","",3,"formGroup",""],["ng-form"],["","ngForm",""]],hostBindings:function(e,i){1&e&&Nt("submit",function(s){return i.onSubmit(s)})("reset",function(){return i.onReset()})},inputs:{options:["ngFormOptions","options"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[Pn([B6]),a]}),t})();function UO(t,n){const e=t.indexOf(n);e>-1&&t.splice(e,1)}function jO(t){return"object"==typeof t&&null!==t&&2===Object.keys(t).length&&"value"in t&&"disabled"in t}const p_=class extends Kw{constructor(n=null,e,i){super(VD(e),GD(i,e)),this.defaultValue=null,this._onChange=[],this._pendingChange=!1,this._applyFormState(n),this._setUpdateStrategy(e),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),Yw(e)&&(e.nonNullable||e.initialValueIsDefault)&&(this.defaultValue=jO(n)?n.value:n)}setValue(n,e={}){this.value=this._pendingValue=n,this._onChange.length&&!1!==e.emitModelToViewChange&&this._onChange.forEach(i=>i(this.value,!1!==e.emitViewToModelChange)),this.updateValueAndValidity(e)}patchValue(n,e={}){this.setValue(n,e)}reset(n=this.defaultValue,e={}){this._applyFormState(n),this.markAsPristine(e),this.markAsUntouched(e),this.setValue(this.value,e),this._pendingChange=!1}_updateValue(){}_anyControls(n){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(n){this._onChange.push(n)}_unregisterOnChange(n){UO(this._onChange,n)}registerOnDisabledChange(n){this._onDisabledChange.push(n)}_unregisterOnDisabledChange(n){UO(this._onDisabledChange,n)}_forEachChild(n){}_syncPendingControls(){return!("submit"!==this.updateOn||(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),!this._pendingChange)||(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),0))}_applyFormState(n){jO(n)?(this.value=this._pendingValue=n.value,n.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=n}},HO=p_,V6={provide:gu,useExisting:ni(()=>nC)},qO=(()=>Promise.resolve())();let nC=(()=>{class t extends gu{constructor(e,i,r,s,d,_){super(),this._changeDetectorRef=d,this.callSetDisabledState=_,this.control=new p_,this._registered=!1,this.update=new In,this._parent=e,this._setValidators(i),this._setAsyncValidators(r),this.valueAccessor=$D(0,s)}ngOnChanges(e){if(this._checkForErrors(),!this._registered||"name"in e){if(this._registered&&(this._checkName(),this.formDirective)){const i=e.name.previousValue;this.formDirective.removeControl({name:i,path:this._getPath(i)})}this._setUpControl()}"isDisabled"in e&&this._updateDisabled(e),HD(e,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}get path(){return this._getPath(this.name)}get formDirective(){return this._parent?this._parent.formDirective:null}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}_setUpControl(){this._setUpdateStrategy(),this._isStandalone()?this._setUpStandalone():this.formDirective.addControl(this),this._registered=!0}_setUpdateStrategy(){this.options&&null!=this.options.updateOn&&(this.control._updateOn=this.options.updateOn)}_isStandalone(){return!this._parent||!(!this.options||!this.options.standalone)}_setUpStandalone(){a0(this.control,this,this.callSetDisabledState),this.control.updateValueAndValidity({emitEvent:!1})}_checkForErrors(){this._isStandalone()||this._checkParentType(),this._checkName()}_checkParentType(){}_checkName(){this.options&&this.options.name&&(this.name=this.options.name),this._isStandalone()}_updateValue(e){qO.then(()=>{this.control.setValue(e,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(e){const i=e.isDisabled.currentValue,r=0!==i&&Hg(i);qO.then(()=>{r&&!this.control.disabled?this.control.disable():!r&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(e){return this._parent?Qw(e,this._parent):[e]}}return t.\u0275fac=function(e){return new(e||t)(z(la,9),z(Zo,10),z(np,10),z(aa,10),z(Lr,8),z(jf,8))},t.\u0275dir=Ge({type:t,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:["disabled","isDisabled"],model:["ngModel","model"],options:["ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],features:[Pn([V6]),a,Hi]}),t})(),WD=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=Ge({type:t,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""]}),t})(),XO=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=cn({type:t}),t.\u0275inj=nn({}),t})();const qD=new vt("NgModelWithFormControlWarning"),W6={provide:la,useExisting:ni(()=>Hf)};let Hf=(()=>{class t extends la{constructor(e,i,r){super(),this.callSetDisabledState=r,this.submitted=!1,this._onCollectionChange=()=>this._updateDomValue(),this.directives=[],this.form=null,this.ngSubmit=new In,this._setValidators(e),this._setAsyncValidators(i)}ngOnChanges(e){this._checkFormPresent(),e.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations(),this._oldForm=this.form)}ngOnDestroy(){this.form&&(tC(this.form,this),this.form._onCollectionChange===this._onCollectionChange&&this.form._registerOnCollectionChange(()=>{}))}get formDirective(){return this}get control(){return this.form}get path(){return[]}addControl(e){const i=this.form.get(e.path);return a0(i,e,this.callSetDisabledState),i.updateValueAndValidity({emitEvent:!1}),this.directives.push(e),i}getControl(e){return this.form.get(e.path)}removeControl(e){Jw(e.control||null,e,!1),function L6(t,n){const e=t.indexOf(n);e>-1&&t.splice(e,1)}(this.directives,e)}addFormGroup(e){this._setUpFormContainer(e)}removeFormGroup(e){this._cleanUpFormContainer(e)}getFormGroup(e){return this.form.get(e.path)}addFormArray(e){this._setUpFormContainer(e)}removeFormArray(e){this._cleanUpFormContainer(e)}getFormArray(e){return this.form.get(e.path)}updateModel(e,i){this.form.get(e.path).setValue(i)}onSubmit(e){return this.submitted=!0,GO(this.form,this.directives),this.ngSubmit.emit(e),"dialog"===e?.target?.method}onReset(){this.resetForm()}resetForm(e){this.form.reset(e),this.submitted=!1}_updateDomValue(){this.directives.forEach(e=>{const i=e.control,r=this.form.get(e.path);i!==r&&(Jw(i||null,e),(t=>t instanceof p_)(r)&&(a0(r,e,this.callSetDisabledState),e.control=r))}),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(e){const i=this.form.get(e.path);VO(i,e),i.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(e){if(this.form){const i=this.form.get(e.path);i&&function P6(t,n){return tC(t,n)}(i,e)&&i.updateValueAndValidity({emitEvent:!1})}}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{})}_updateValidators(){UD(this.form,this),this._oldForm&&tC(this._oldForm,this)}_checkFormPresent(){}}return t.\u0275fac=function(e){return new(e||t)(z(Zo,10),z(np,10),z(jf,8))},t.\u0275dir=Ge({type:t,selectors:[["","formGroup",""]],hostBindings:function(e,i){1&e&&Nt("submit",function(s){return i.onSubmit(s)})("reset",function(){return i.onReset()})},inputs:{form:["formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[Pn([W6]),a,Hi]}),t})();const X6={provide:gu,useExisting:ni(()=>iC)};let iC=(()=>{class t extends gu{set isDisabled(e){}constructor(e,i,r,s,d){super(),this._ngModelWarningConfig=d,this._added=!1,this.update=new In,this._ngModelWarningSent=!1,this._parent=e,this._setValidators(i),this._setAsyncValidators(r),this.valueAccessor=$D(0,s)}ngOnChanges(e){this._added||this._setUpControl(),HD(e,this.viewModel)&&(this.viewModel=this.model,this.formDirective.updateModel(this,this.model))}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}get path(){return Qw(null==this.name?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}_checkParentType(){}_setUpControl(){this._checkParentType(),this.control=this.formDirective.addControl(this),this._added=!0}}return t._ngModelWarningSentOnce=!1,t.\u0275fac=function(e){return new(e||t)(z(la,13),z(Zo,10),z(np,10),z(aa,10),z(qD,8))},t.\u0275dir=Ge({type:t,selectors:[["","formControlName",""]],inputs:{name:["formControlName","name"],isDisabled:["disabled","isDisabled"],model:["ngModel","model"]},outputs:{update:"ngModelChange"},features:[Pn([X6]),a,Hi]}),t})();let $f=(()=>{class t{constructor(){this._validator=Ww}ngOnChanges(e){if(this.inputName in e){const i=this.normalizeInput(e[this.inputName].currentValue);this._enabled=this.enabled(i),this._validator=this._enabled?this.createValidator(i):Ww,this._onChange&&this._onChange()}}validate(e){return this._validator(e)}registerOnValidatorChange(e){this._onChange=e}enabled(e){return null!=e}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=Ge({type:t,features:[Hi]}),t})();const r8={provide:Zo,useExisting:ni(()=>rC),multi:!0};let rC=(()=>{class t extends $f{constructor(){super(...arguments),this.inputName="required",this.normalizeInput=Hg,this.createValidator=e=>mO}enabled(e){return e}}return t.\u0275fac=function(){let n;return function(i){return(n||(n=qt(t)))(i||t)}}(),t.\u0275dir=Ge({type:t,selectors:[["","required","","formControlName","",3,"type","checkbox"],["","required","","formControl","",3,"type","checkbox"],["","required","","ngModel","",3,"type","checkbox"]],hostVars:1,hostBindings:function(e,i){2&e&&et("required",i._enabled?"":null)},inputs:{required:"required"},features:[Pn([r8]),a]}),t})();const l8={provide:Zo,useExisting:ni(()=>QD),multi:!0};let QD=(()=>{class t extends $f{constructor(){super(...arguments),this.inputName="maxlength",this.normalizeInput=e=>function n2(t){return"number"==typeof t?t:parseInt(t,10)}(e),this.createValidator=e=>vO(e)}}return t.\u0275fac=function(){let n;return function(i){return(n||(n=qt(t)))(i||t)}}(),t.\u0275dir=Ge({type:t,selectors:[["","maxlength","","formControlName",""],["","maxlength","","formControl",""],["","maxlength","","ngModel",""]],hostVars:1,hostBindings:function(e,i){2&e&&et("maxlength",i._enabled?i.maxlength:null)},inputs:{maxlength:"maxlength"},features:[Pn([l8]),a]}),t})(),u2=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=cn({type:t}),t.\u0275inj=nn({imports:[XO]}),t})();class d2 extends Kw{constructor(n,e,i){super(VD(e),GD(i,e)),this.controls=n,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}at(n){return this.controls[this._adjustIndex(n)]}push(n,e={}){this.controls.push(n),this._registerControl(n),this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange()}insert(n,e,i={}){this.controls.splice(n,0,e),this._registerControl(e),this.updateValueAndValidity({emitEvent:i.emitEvent})}removeAt(n,e={}){let i=this._adjustIndex(n);i<0&&(i=0),this.controls[i]&&this.controls[i]._registerOnCollectionChange(()=>{}),this.controls.splice(i,1),this.updateValueAndValidity({emitEvent:e.emitEvent})}setControl(n,e,i={}){let r=this._adjustIndex(n);r<0&&(r=0),this.controls[r]&&this.controls[r]._registerOnCollectionChange(()=>{}),this.controls.splice(r,1),e&&(this.controls.splice(r,0,e),this._registerControl(e)),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}get length(){return this.controls.length}setValue(n,e={}){BO(this,0,n),n.forEach((i,r)=>{LO(this,!1,r),this.at(r).setValue(i,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(n,e={}){null!=n&&(n.forEach((i,r)=>{this.at(r)&&this.at(r).patchValue(i,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(n=[],e={}){this._forEachChild((i,r)=>{i.reset(n[r],{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e),this._updateTouched(e),this.updateValueAndValidity(e)}getRawValue(){return this.controls.map(n=>n.getRawValue())}clear(n={}){this.controls.length<1||(this._forEachChild(e=>e._registerOnCollectionChange(()=>{})),this.controls.splice(0),this.updateValueAndValidity({emitEvent:n.emitEvent}))}_adjustIndex(n){return n<0?n+this.length:n}_syncPendingControls(){let n=this.controls.reduce((e,i)=>!!i._syncPendingControls()||e,!1);return n&&this.updateValueAndValidity({onlySelf:!0}),n}_forEachChild(n){this.controls.forEach((e,i)=>{n(e,i)})}_updateValue(){this.value=this.controls.filter(n=>n.enabled||this.disabled).map(n=>n.value)}_anyControls(n){return this.controls.some(e=>e.enabled&&n(e))}_setUpControls(){this._forEachChild(n=>this._registerControl(n))}_allControlsDisabled(){for(const n of this.controls)if(n.enabled)return!1;return this.controls.length>0||this.disabled}_registerControl(n){n.setParent(this),n._registerOnCollectionChange(this._onCollectionChange)}_find(n){return this.at(n)??null}}function h2(t){return!!t&&(void 0!==t.asyncValidators||void 0!==t.validators||void 0!==t.updateOn)}let u8=(()=>{class t{constructor(){this.useNonNullable=!1}get nonNullable(){const e=new t;return e.useNonNullable=!0,e}group(e,i=null){const r=this._reduceControls(e);let s={};return h2(i)?s=i:null!==i&&(s.validators=i.validator,s.asyncValidators=i.asyncValidator),new o0(r,s)}record(e,i=null){const r=this._reduceControls(e);return new NO(r,i)}control(e,i,r){let s={};return this.useNonNullable?(h2(i)?s=i:(s.validators=i,s.asyncValidators=r),new p_(e,{...s,nonNullable:!0})):new p_(e,i,r)}array(e,i,r){const s=e.map(d=>this._createControl(d));return new d2(s,i,r)}_reduceControls(e){const i={};return Object.keys(e).forEach(r=>{i[r]=this._createControl(e[r])}),i}_createControl(e){return e instanceof p_||e instanceof Kw?e:Array.isArray(e)?this.control(e[0],e.length>1?e[1]:null,e.length>2?e[2]:null):this.control(e)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=rt({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),p2=(()=>{class t extends u8{group(e,i=null){return super.group(e,i)}control(e,i,r){return super.control(e,i,r)}array(e,i,r){return super.array(e,i,r)}}return t.\u0275fac=function(){let n;return function(i){return(n||(n=qt(t)))(i||t)}}(),t.\u0275prov=rt({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),d8=(()=>{class t{static withConfig(e){return{ngModule:t,providers:[{provide:jf,useValue:e.callSetDisabledState??s0}]}}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=cn({type:t}),t.\u0275inj=nn({imports:[u2]}),t})(),h8=(()=>{class t{static withConfig(e){return{ngModule:t,providers:[{provide:qD,useValue:e.warnOnNgModelWithFormControl??"always"},{provide:jf,useValue:e.callSetDisabledState??s0}]}}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=cn({type:t}),t.\u0275inj=nn({imports:[u2]}),t})();const p8=["input"],f8=function(t){return{enterDuration:t}},m8=["*"],g8=new vt("mat-radio-default-options",{providedIn:"root",factory:function _8(){return{color:"accent"}}});let f2=0;const y8={provide:aa,useExisting:ni(()=>_2),multi:!0};class m2{constructor(n,e){this.source=n,this.value=e}}const g2=new vt("MatRadioGroup");let v8=(()=>{class t{constructor(e){this._changeDetector=e,this._value=null,this._name="mat-radio-group-"+f2++,this._selected=null,this._isInitialized=!1,this._labelPosition="after",this._disabled=!1,this._required=!1,this._controlValueAccessorChangeFn=()=>{},this.onTouched=()=>{},this.change=new In}get name(){return this._name}set name(e){this._name=e,this._updateRadioButtonNames()}get labelPosition(){return this._labelPosition}set labelPosition(e){this._labelPosition="before"===e?"before":"after",this._markRadiosForCheck()}get value(){return this._value}set value(e){this._value!==e&&(this._value=e,this._updateSelectedRadioFromValue(),this._checkSelectedRadioButton())}_checkSelectedRadioButton(){this._selected&&!this._selected.checked&&(this._selected.checked=!0)}get selected(){return this._selected}set selected(e){this._selected=e,this.value=e?e.value:null,this._checkSelectedRadioButton()}get disabled(){return this._disabled}set disabled(e){this._disabled=kn(e),this._markRadiosForCheck()}get required(){return this._required}set required(e){this._required=kn(e),this._markRadiosForCheck()}ngAfterContentInit(){this._isInitialized=!0}_touch(){this.onTouched&&this.onTouched()}_updateRadioButtonNames(){this._radios&&this._radios.forEach(e=>{e.name=this.name,e._markForCheck()})}_updateSelectedRadioFromValue(){this._radios&&(null===this._selected||this._selected.value!==this._value)&&(this._selected=null,this._radios.forEach(i=>{i.checked=this.value===i.value,i.checked&&(this._selected=i)}))}_emitChangeEvent(){this._isInitialized&&this.change.emit(new m2(this._selected,this._value))}_markRadiosForCheck(){this._radios&&this._radios.forEach(e=>e._markForCheck())}writeValue(e){this.value=e,this._changeDetector.markForCheck()}registerOnChange(e){this._controlValueAccessorChangeFn=e}registerOnTouched(e){this.onTouched=e}setDisabledState(e){this.disabled=e,this._changeDetector.markForCheck()}}return t.\u0275fac=function(e){return new(e||t)(z(Lr))},t.\u0275dir=Ge({type:t,inputs:{color:"color",name:"name",labelPosition:"labelPosition",value:"value",selected:"selected",disabled:"disabled",required:"required"},outputs:{change:"change"}}),t})(),_2=(()=>{class t extends v8{}return t.\u0275fac=function(){let n;return function(i){return(n||(n=qt(t)))(i||t)}}(),t.\u0275dir=Ge({type:t,selectors:[["mat-radio-group"]],contentQueries:function(e,i,r){if(1&e&&Ui(r,y2,5),2&e){let s;fn(s=mn())&&(i._radios=s)}},hostAttrs:["role","radiogroup",1,"mat-radio-group"],exportAs:["matRadioGroup"],features:[Pn([y8,{provide:g2,useExisting:t}]),a]}),t})();class b8{constructor(n){this._elementRef=n}}const x8=Gf($w(b8));let w8=(()=>{class t extends x8{constructor(e,i,r,s,d,_,w,S){super(i),this._changeDetector=r,this._focusMonitor=s,this._radioDispatcher=d,this._providerOverride=w,this._uniqueId="mat-radio-"+ ++f2,this.id=this._uniqueId,this.change=new In,this._checked=!1,this._value=null,this._removeUniqueSelectionListener=()=>{},this.radioGroup=e,this._noopAnimations="NoopAnimations"===_,S&&(this.tabIndex=wc(S,0)),this._removeUniqueSelectionListener=d.listen((I,L)=>{I!==this.id&&L===this.name&&(this.checked=!1)})}get checked(){return this._checked}set checked(e){const i=kn(e);this._checked!==i&&(this._checked=i,i&&this.radioGroup&&this.radioGroup.value!==this.value?this.radioGroup.selected=this:!i&&this.radioGroup&&this.radioGroup.value===this.value&&(this.radioGroup.selected=null),i&&this._radioDispatcher.notify(this.id,this.name),this._changeDetector.markForCheck())}get value(){return this._value}set value(e){this._value!==e&&(this._value=e,null!==this.radioGroup&&(this.checked||(this.checked=this.radioGroup.value===e),this.checked&&(this.radioGroup.selected=this)))}get labelPosition(){return this._labelPosition||this.radioGroup&&this.radioGroup.labelPosition||"after"}set labelPosition(e){this._labelPosition=e}get disabled(){return this._disabled||null!==this.radioGroup&&this.radioGroup.disabled}set disabled(e){this._setDisabled(kn(e))}get required(){return this._required||this.radioGroup&&this.radioGroup.required}set required(e){this._required=kn(e)}get color(){return this._color||this.radioGroup&&this.radioGroup.color||this._providerOverride&&this._providerOverride.color||"accent"}set color(e){this._color=e}get inputId(){return`${this.id||this._uniqueId}-input`}focus(e,i){i?this._focusMonitor.focusVia(this._inputElement,i,e):this._inputElement.nativeElement.focus(e)}_markForCheck(){this._changeDetector.markForCheck()}ngOnInit(){this.radioGroup&&(this.checked=this.radioGroup.value===this._value,this.checked&&(this.radioGroup.selected=this),this.name=this.radioGroup.name)}ngDoCheck(){this._updateTabIndex()}ngAfterViewInit(){this._updateTabIndex(),this._focusMonitor.monitor(this._elementRef,!0).subscribe(e=>{!e&&this.radioGroup&&this.radioGroup._touch()})}ngOnDestroy(){this._focusMonitor.stopMonitoring(this._elementRef),this._removeUniqueSelectionListener()}_emitChangeEvent(){this.change.emit(new m2(this,this._value))}_isRippleDisabled(){return this.disableRipple||this.disabled}_onInputClick(e){e.stopPropagation()}_onInputInteraction(e){if(e.stopPropagation(),!this.checked&&!this.disabled){const i=this.radioGroup&&this.value!==this.radioGroup.value;this.checked=!0,this._emitChangeEvent(),this.radioGroup&&(this.radioGroup._controlValueAccessorChangeFn(this.value),i&&this.radioGroup._emitChangeEvent())}}_setDisabled(e){this._disabled!==e&&(this._disabled=e,this._changeDetector.markForCheck())}_updateTabIndex(){const e=this.radioGroup;let i;if(i=e&&e.selected&&!this.disabled?e.selected===this?this.tabIndex:-1:this.tabIndex,i!==this._previousTabIndex){const r=this._inputElement?.nativeElement;r&&(r.setAttribute("tabindex",i+""),this._previousTabIndex=i)}}}return t.\u0275fac=function(e){Bs()},t.\u0275dir=Ge({type:t,viewQuery:function(e,i){if(1&e&&Yi(p8,5),2&e){let r;fn(r=mn())&&(i._inputElement=r.first)}},inputs:{id:"id",name:"name",ariaLabel:["aria-label","ariaLabel"],ariaLabelledby:["aria-labelledby","ariaLabelledby"],ariaDescribedby:["aria-describedby","ariaDescribedby"],checked:"checked",value:"value",labelPosition:"labelPosition",disabled:"disabled",required:"required",color:"color"},outputs:{change:"change"},features:[a]}),t})(),y2=(()=>{class t extends w8{constructor(e,i,r,s,d,_,w,S){super(e,i,r,s,d,_,w,S)}}return t.\u0275fac=function(e){return new(e||t)(z(g2,8),z($t),z(Lr),z(Cc),z(p6),z(Ta,8),z(g8,8),wa("tabindex"))},t.\u0275cmp=Rn({type:t,selectors:[["mat-radio-button"]],hostAttrs:[1,"mat-radio-button"],hostVars:17,hostBindings:function(e,i){1&e&&Nt("focus",function(){return i._inputElement.nativeElement.focus()}),2&e&&(et("tabindex",null)("id",i.id)("aria-label",null)("aria-labelledby",null)("aria-describedby",null),yi("mat-radio-checked",i.checked)("mat-radio-disabled",i.disabled)("_mat-animation-noopable",i._noopAnimations)("mat-primary","primary"===i.color)("mat-accent","accent"===i.color)("mat-warn","warn"===i.color))},inputs:{disableRipple:"disableRipple",tabIndex:"tabIndex"},exportAs:["matRadioButton"],features:[a],ngContentSelectors:m8,decls:13,vars:19,consts:[[1,"mat-radio-label"],["label",""],[1,"mat-radio-container"],[1,"mat-radio-outer-circle"],[1,"mat-radio-inner-circle"],["type","radio",1,"mat-radio-input",3,"id","checked","disabled","required","change","click"],["input",""],["mat-ripple","",1,"mat-radio-ripple","mat-focus-indicator",3,"matRippleTrigger","matRippleDisabled","matRippleCentered","matRippleRadius","matRippleAnimation"],[1,"mat-ripple-element","mat-radio-persistent-ripple"],[1,"mat-radio-label-content"],[2,"display","none"]],template:function(e,i){if(1&e&&(Tr(),se(0,"label",0,1)(2,"span",2),ut(3,"span",3)(4,"span",4),se(5,"input",5,6),Nt("change",function(s){return i._onInputInteraction(s)})("click",function(s){return i._onInputClick(s)}),he(),se(7,"span",7),ut(8,"span",8),he()(),se(9,"span",9)(10,"span",10),Ze(11,"\xa0"),he(),Xi(12),he()()),2&e){const r=sr(1);et("for",i.inputId),Se(5),Ae("id",i.inputId)("checked",i.checked)("disabled",i.disabled)("required",i.required),et("name",i.name)("value",i.value)("aria-label",i.ariaLabel)("aria-labelledby",i.ariaLabelledby)("aria-describedby",i.ariaDescribedby),Se(2),Ae("matRippleTrigger",r)("matRippleDisabled",i._isRippleDisabled())("matRippleCentered",!0)("matRippleRadius",20)("matRippleAnimation",Ns(17,f8,i._noopAnimations?0:150)),Se(2),yi("mat-radio-label-before","before"==i.labelPosition)}},dependencies:[mu],styles:['.mat-radio-button{display:inline-block;-webkit-tap-highlight-color:rgba(0,0,0,0);outline:0}.mat-radio-label{-webkit-user-select:none;user-select:none;cursor:pointer;display:inline-flex;align-items:center;white-space:nowrap;vertical-align:middle;width:100%}.mat-radio-container{box-sizing:border-box;display:inline-block;position:relative;width:20px;height:20px;flex-shrink:0}.mat-radio-outer-circle{box-sizing:border-box;display:block;height:20px;left:0;position:absolute;top:0;transition:border-color ease 280ms;width:20px;border-width:2px;border-style:solid;border-radius:50%}._mat-animation-noopable .mat-radio-outer-circle{transition:none}.mat-radio-inner-circle{border-radius:50%;box-sizing:border-box;display:block;height:20px;left:0;position:absolute;top:0;opacity:0;transition:transform ease 280ms,background-color ease 280ms,opacity linear 1ms 280ms;width:20px;transform:scale(0.001);-webkit-print-color-adjust:exact;color-adjust:exact}.mat-radio-checked .mat-radio-inner-circle{transform:scale(0.5);opacity:1;transition:transform ease 280ms,background-color ease 280ms}.cdk-high-contrast-active .mat-radio-checked .mat-radio-inner-circle{border:solid 10px}._mat-animation-noopable .mat-radio-inner-circle{transition:none}.mat-radio-label-content{-webkit-user-select:auto;user-select:auto;display:inline-block;order:0;line-height:inherit;padding-left:8px;padding-right:0}[dir=rtl] .mat-radio-label-content{padding-right:8px;padding-left:0}.mat-radio-label-content.mat-radio-label-before{order:-1;padding-left:0;padding-right:8px}[dir=rtl] .mat-radio-label-content.mat-radio-label-before{padding-right:0;padding-left:8px}.mat-radio-disabled,.mat-radio-disabled .mat-radio-label{cursor:default}.mat-radio-button .mat-radio-ripple{position:absolute;left:calc(50% - 20px);top:calc(50% - 20px);height:40px;width:40px;z-index:1;pointer-events:none}.mat-radio-button .mat-radio-ripple .mat-ripple-element:not(.mat-radio-persistent-ripple){opacity:.16}.mat-radio-persistent-ripple{width:100%;height:100%;transform:none;top:0;left:0}.mat-radio-container:hover .mat-radio-persistent-ripple{opacity:.04}.mat-radio-button:not(.mat-radio-disabled).cdk-keyboard-focused .mat-radio-persistent-ripple,.mat-radio-button:not(.mat-radio-disabled).cdk-program-focused .mat-radio-persistent-ripple{opacity:.12}.mat-radio-persistent-ripple,.mat-radio-disabled .mat-radio-container:hover .mat-radio-persistent-ripple{opacity:0}@media(hover: none){.mat-radio-container:hover .mat-radio-persistent-ripple{display:none}}.mat-radio-input{opacity:0;position:absolute;top:0;left:0;margin:0;width:100%;height:100%;cursor:inherit;z-index:-1}.mat-radio-input:focus~.mat-focus-indicator::before{content:""}.cdk-high-contrast-active .mat-radio-disabled{opacity:.5}'],encapsulation:2,changeDetection:0}),t})(),C8=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=cn({type:t}),t.\u0275inj=nn({imports:[ep,oi,oi]}),t})();var sC=Je(9898),aC=Je.n(sC);const T8=new vt("MapboxApiKey");let A8=(()=>{class t{static withConfig(e){return{ngModule:t,providers:[{provide:T8,useValue:e.accessToken}]}}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=cn({type:t}),t.\u0275inj=nn({imports:[Ia]}),t})();const ao_mapbox_accessToken="pk.eyJ1IjoidHJpbWJsZSIsImEiOiJjazlqbDBmZHEwNTVrM2VwY3I1YmJkY3A4In0.qDXf_TfO4aKbqetxYULsuA",ao_mapbox_reverseGeocoderUrl="https://api.mapbox.com/geocoding/v5/mapbox.places/";class b2{}class I8{}const Dd="*";function Xo(t,n){return{type:7,name:t,definitions:n,options:{}}}function yr(t,n=null){return{type:4,styles:n,timings:t}}function x2(t,n=null){return{type:3,steps:t,options:n}}function w2(t,n=null){return{type:2,steps:t,options:n}}function Dn(t){return{type:6,styles:t,offset:null}}function Ki(t,n,e){return{type:0,name:t,styles:n,options:e}}function dr(t,n,e=null){return{type:1,expr:t,animation:n,options:e}}function lC(t=null){return{type:9,options:t}}function cC(t,n,e=null){return{type:11,selector:t,animation:n,options:e}}function C2(t){Promise.resolve().then(t)}class u0{constructor(n=0,e=0){this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._originalOnDoneFns=[],this._originalOnStartFns=[],this._started=!1,this._destroyed=!1,this._finished=!1,this._position=0,this.parentPlayer=null,this.totalTime=n+e}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(n=>n()),this._onDoneFns=[])}onStart(n){this._originalOnStartFns.push(n),this._onStartFns.push(n)}onDone(n){this._originalOnDoneFns.push(n),this._onDoneFns.push(n)}onDestroy(n){this._onDestroyFns.push(n)}hasStarted(){return this._started}init(){}play(){this.hasStarted()||(this._onStart(),this.triggerMicrotask()),this._started=!0}triggerMicrotask(){C2(()=>this._onFinish())}_onStart(){this._onStartFns.forEach(n=>n()),this._onStartFns=[]}pause(){}restart(){}finish(){this._onFinish()}destroy(){this._destroyed||(this._destroyed=!0,this.hasStarted()||this._onStart(),this.finish(),this._onDestroyFns.forEach(n=>n()),this._onDestroyFns=[])}reset(){this._started=!1,this._finished=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}setPosition(n){this._position=this.totalTime?n*this.totalTime:1}getPosition(){return this.totalTime?this._position/this.totalTime:1}triggerCallback(n){const e="start"==n?this._onStartFns:this._onDoneFns;e.forEach(i=>i()),e.length=0}}class M2{constructor(n){this._onDoneFns=[],this._onStartFns=[],this._finished=!1,this._started=!1,this._destroyed=!1,this._onDestroyFns=[],this.parentPlayer=null,this.totalTime=0,this.players=n;let e=0,i=0,r=0;const s=this.players.length;0==s?C2(()=>this._onFinish()):this.players.forEach(d=>{d.onDone(()=>{++e==s&&this._onFinish()}),d.onDestroy(()=>{++i==s&&this._onDestroy()}),d.onStart(()=>{++r==s&&this._onStart()})}),this.totalTime=this.players.reduce((d,_)=>Math.max(d,_.totalTime),0)}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(n=>n()),this._onDoneFns=[])}init(){this.players.forEach(n=>n.init())}onStart(n){this._onStartFns.push(n)}_onStart(){this.hasStarted()||(this._started=!0,this._onStartFns.forEach(n=>n()),this._onStartFns=[])}onDone(n){this._onDoneFns.push(n)}onDestroy(n){this._onDestroyFns.push(n)}hasStarted(){return this._started}play(){this.parentPlayer||this.init(),this._onStart(),this.players.forEach(n=>n.play())}pause(){this.players.forEach(n=>n.pause())}restart(){this.players.forEach(n=>n.restart())}finish(){this._onFinish(),this.players.forEach(n=>n.finish())}destroy(){this._onDestroy()}_onDestroy(){this._destroyed||(this._destroyed=!0,this._onFinish(),this.players.forEach(n=>n.destroy()),this._onDestroyFns.forEach(n=>n()),this._onDestroyFns=[])}reset(){this.players.forEach(n=>n.reset()),this._destroyed=!1,this._finished=!1,this._started=!1}setPosition(n){const e=n*this.totalTime;this.players.forEach(i=>{const r=i.totalTime?Math.min(1,e/i.totalTime):1;i.setPosition(r)})}getPosition(){const n=this.players.reduce((e,i)=>null===e||i.totalTime>e.totalTime?i:e,null);return null!=n?n.getPosition():0}beforeDestroy(){this.players.forEach(n=>{n.beforeDestroy&&n.beforeDestroy()})}triggerCallback(n){const e="start"==n?this._onStartFns:this._onDoneFns;e.forEach(i=>i()),e.length=0}}const k8=["addListener","removeListener"],R8=["addEventListener","removeEventListener"],P8=["on","off"];function d0(t,n,e,i){if(it(e)&&(i=e,e=void 0),i)return d0(t,n,e).pipe(NS(i));const[r,s]=function L8(t){return it(t.addEventListener)&&it(t.removeEventListener)}(t)?R8.map(d=>_=>t[d](n,_,e)):function O8(t){return it(t.addListener)&&it(t.removeListener)}(t)?k8.map(S2(t,n)):function F8(t){return it(t.on)&&it(t.off)}(t)?P8.map(S2(t,n)):[];if(!r&&Tc(t))return Yt(d=>d0(d,n,e))(J(t));if(!r)throw new TypeError("Invalid event target");return new xn(d=>{const _=(...w)=>d.next(1s(_)})}function S2(t,n){return e=>i=>t[e](n,i)}const h0={schedule(t){let n=requestAnimationFrame,e=cancelAnimationFrame;const{delegate:i}=h0;i&&(n=i.requestAnimationFrame,e=i.cancelAnimationFrame);const r=n(s=>{e=void 0,t(s)});return new $(()=>e?.(r))},requestAnimationFrame(...t){const{delegate:n}=h0;return(n?.requestAnimationFrame||requestAnimationFrame)(...t)},cancelAnimationFrame(...t){const{delegate:n}=h0;return(n?.cancelAnimationFrame||cancelAnimationFrame)(...t)},delegate:void 0},z8=new class N8 extends gD{flush(n){this._active=!0;const e=this._scheduled;this._scheduled=void 0;const{actions:i}=this;let r;n=n||i.shift();do{if(r=n.execute(n.state,n.delay))break}while((n=i[0])&&n.id===e&&i.shift());if(this._active=!1,r){for(;(n=i[0])&&n.id===e&&i.shift();)n.unsubscribe();throw r}}}(class B8 extends mD{constructor(n,e){super(n,e),this.scheduler=n,this.work=e}requestAsyncId(n,e,i=0){return null!==i&&i>0?super.requestAsyncId(n,e,i):(n.actions.push(this),n._scheduled||(n._scheduled=h0.requestAnimationFrame(()=>n.flush(void 0))))}recycleAsyncId(n,e,i=0){var r;if(null!=i?i>0:this.delay>0)return super.recycleAsyncId(n,e,i);const{actions:s}=n;null!=e&&(null===(r=s[s.length-1])||void 0===r?void 0:r.id)!==e&&(h0.cancelAnimationFrame(e),n._scheduled=void 0)}});let eE,V8=1;const uC={};function D2(t){return t in uC&&(delete uC[t],!0)}const G8={setImmediate(t){const n=V8++;return uC[n]=!0,eE||(eE=Promise.resolve()),eE.then(()=>D2(n)&&t()),n},clearImmediate(t){D2(t)}},{setImmediate:U8,clearImmediate:j8}=G8,dC={setImmediate(...t){const{delegate:n}=dC;return(n?.setImmediate||U8)(...t)},clearImmediate(t){const{delegate:n}=dC;return(n?.clearImmediate||j8)(t)},delegate:void 0},W8=new class $8 extends gD{flush(n){this._active=!0;const e=this._scheduled;this._scheduled=void 0;const{actions:i}=this;let r;n=n||i.shift();do{if(r=n.execute(n.state,n.delay))break}while((n=i[0])&&n.id===e&&i.shift());if(this._active=!1,r){for(;(n=i[0])&&n.id===e&&i.shift();)n.unsubscribe();throw r}}}(class H8 extends mD{constructor(n,e){super(n,e),this.scheduler=n,this.work=e}requestAsyncId(n,e,i=0){return null!==i&&i>0?super.requestAsyncId(n,e,i):(n.actions.push(this),n._scheduled||(n._scheduled=dC.setImmediate(n.flush.bind(n,void 0))))}recycleAsyncId(n,e,i=0){var r;if(null!=i?i>0:this.delay>0)return super.recycleAsyncId(n,e,i);const{actions:s}=n;null!=e&&(null===(r=s[s.length-1])||void 0===r?void 0:r.id)!==e&&(dC.clearImmediate(e),n._scheduled=void 0)}});function E2(t){return t instanceof Date&&!isNaN(t)}function T2(t=0,n,e=aH){let i=-1;return null!=n&&(vi(n)?e=n:i=n),new xn(r=>{let s=E2(t)?+t-e.now():t;s<0&&(s=0);let d=0;return e.schedule(function(){r.closed||(r.next(d++),0<=i?this.schedule(void 0,i):r.complete())},s)})}function tE(t,n=Qv){return function q8(t){return bi((n,e)=>{let i=!1,r=null,s=null,d=!1;const _=()=>{if(s?.unsubscribe(),s=null,i){i=!1;const S=r;r=null,e.next(S)}d&&e.complete()},w=()=>{s=null,d&&e.complete()};n.subscribe(Nn(e,S=>{i=!0,r=S,s||J(t(S)).subscribe(s=Nn(e,_,w))},()=>{d=!0,(!i||!s||s.closed)&&e.complete()}))})}(()=>T2(t,n))}const Z8=["contentWrapper"],X8=["*"],Y8=new vt("VIRTUAL_SCROLL_STRATEGY");let p0=(()=>{class t{constructor(e,i,r){this._ngZone=e,this._platform=i,this._scrolled=new Zt,this._globalSubscription=null,this._scrolledCount=0,this.scrollContainers=new Map,this._document=r}register(e){this.scrollContainers.has(e)||this.scrollContainers.set(e,e.elementScrolled().subscribe(()=>this._scrolled.next(e)))}deregister(e){const i=this.scrollContainers.get(e);i&&(i.unsubscribe(),this.scrollContainers.delete(e))}scrolled(e=20){return this._platform.isBrowser?new xn(i=>{this._globalSubscription||this._addGlobalListener();const r=e>0?this._scrolled.pipe(tE(e)).subscribe(i):this._scrolled.subscribe(i);return this._scrolledCount++,()=>{r.unsubscribe(),this._scrolledCount--,this._scrolledCount||this._removeGlobalListener()}}):_n()}ngOnDestroy(){this._removeGlobalListener(),this.scrollContainers.forEach((e,i)=>this.deregister(i)),this._scrolled.complete()}ancestorScrolled(e,i){const r=this.getAncestorScrollContainers(e);return this.scrolled(i).pipe(Zr(s=>!s||r.indexOf(s)>-1))}getAncestorScrollContainers(e){const i=[];return this.scrollContainers.forEach((r,s)=>{this._scrollableContainsElement(s,e)&&i.push(s)}),i}_getWindow(){return this._document.defaultView||window}_scrollableContainsElement(e,i){let r=Sd(i),s=e.getElementRef().nativeElement;do{if(r==s)return!0}while(r=r.parentElement);return!1}_addGlobalListener(){this._globalSubscription=this._ngZone.runOutsideAngular(()=>d0(this._getWindow().document,"scroll").subscribe(()=>this._scrolled.next()))}_removeGlobalListener(){this._globalSubscription&&(this._globalSubscription.unsubscribe(),this._globalSubscription=null)}}return t.\u0275fac=function(e){return new(e||t)(we(Ln),we(Co),we(Bn,8))},t.\u0275prov=rt({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),A2=(()=>{class t{constructor(e,i,r,s){this.elementRef=e,this.scrollDispatcher=i,this.ngZone=r,this.dir=s,this._destroyed=new Zt,this._elementScrolled=new xn(d=>this.ngZone.runOutsideAngular(()=>d0(this.elementRef.nativeElement,"scroll").pipe(ri(this._destroyed)).subscribe(d)))}ngOnInit(){this.scrollDispatcher.register(this)}ngOnDestroy(){this.scrollDispatcher.deregister(this),this._destroyed.next(),this._destroyed.complete()}elementScrolled(){return this._elementScrolled}getElementRef(){return this.elementRef}scrollTo(e){const i=this.elementRef.nativeElement,r=this.dir&&"rtl"==this.dir.value;null==e.left&&(e.left=r?e.end:e.start),null==e.right&&(e.right=r?e.start:e.end),null!=e.bottom&&(e.top=i.scrollHeight-i.clientHeight-e.bottom),r&&0!=qv()?(null!=e.left&&(e.right=i.scrollWidth-i.clientWidth-e.left),2==qv()?e.left=e.right:1==qv()&&(e.left=e.right?-e.right:e.right)):null!=e.right&&(e.left=i.scrollWidth-i.clientWidth-e.right),this._applyScrollToOptions(e)}_applyScrollToOptions(e){const i=this.elementRef.nativeElement;SP()?i.scrollTo(e):(null!=e.top&&(i.scrollTop=e.top),null!=e.left&&(i.scrollLeft=e.left))}measureScrollOffset(e){const i="left",r="right",s=this.elementRef.nativeElement;if("top"==e)return s.scrollTop;if("bottom"==e)return s.scrollHeight-s.clientHeight-s.scrollTop;const d=this.dir&&"rtl"==this.dir.value;return"start"==e?e=d?r:i:"end"==e&&(e=d?i:r),d&&2==qv()?e==i?s.scrollWidth-s.clientWidth-s.scrollLeft:s.scrollLeft:d&&1==qv()?e==i?s.scrollLeft+s.scrollWidth-s.clientWidth:-s.scrollLeft:e==i?s.scrollLeft:s.scrollWidth-s.clientWidth-s.scrollLeft}}return t.\u0275fac=function(e){return new(e||t)(z($t),z(p0),z(Ln),z(sa,8))},t.\u0275dir=Ge({type:t,selectors:[["","cdk-scrollable",""],["","cdkScrollable",""]],standalone:!0}),t})(),f0=(()=>{class t{constructor(e,i,r){this._platform=e,this._change=new Zt,this._changeListener=s=>{this._change.next(s)},this._document=r,i.runOutsideAngular(()=>{if(e.isBrowser){const s=this._getWindow();s.addEventListener("resize",this._changeListener),s.addEventListener("orientationchange",this._changeListener)}this.change().subscribe(()=>this._viewportSize=null)})}ngOnDestroy(){if(this._platform.isBrowser){const e=this._getWindow();e.removeEventListener("resize",this._changeListener),e.removeEventListener("orientationchange",this._changeListener)}this._change.complete()}getViewportSize(){this._viewportSize||this._updateViewportSize();const e={width:this._viewportSize.width,height:this._viewportSize.height};return this._platform.isBrowser||(this._viewportSize=null),e}getViewportRect(){const e=this.getViewportScrollPosition(),{width:i,height:r}=this.getViewportSize();return{top:e.top,left:e.left,bottom:e.top+r,right:e.left+i,height:r,width:i}}getViewportScrollPosition(){if(!this._platform.isBrowser)return{top:0,left:0};const e=this._document,i=this._getWindow(),r=e.documentElement,s=r.getBoundingClientRect();return{top:-s.top||e.body.scrollTop||i.scrollY||r.scrollTop||0,left:-s.left||e.body.scrollLeft||i.scrollX||r.scrollLeft||0}}change(e=20){return e>0?this._change.pipe(tE(e)):this._change}_getWindow(){return this._document.defaultView||window}_updateViewportSize(){const e=this._getWindow();this._viewportSize=this._platform.isBrowser?{width:e.innerWidth,height:e.innerHeight}:{width:0,height:0}}}return t.\u0275fac=function(e){return new(e||t)(we(Co),we(Ln),we(Bn,8))},t.\u0275prov=rt({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();const I2=new vt("VIRTUAL_SCROLLABLE");let J8=(()=>{class t extends A2{constructor(e,i,r,s){super(e,i,r,s)}measureViewportSize(e){const i=this.elementRef.nativeElement;return"horizontal"===e?i.clientWidth:i.clientHeight}}return t.\u0275fac=function(e){return new(e||t)(z($t),z(p0),z(Ln),z(sa,8))},t.\u0275dir=Ge({type:t,features:[a]}),t})();const t7=typeof requestAnimationFrame<"u"?z8:W8;let n7=(()=>{class t extends J8{get orientation(){return this._orientation}set orientation(e){this._orientation!==e&&(this._orientation=e,this._calculateSpacerSize())}get appendOnly(){return this._appendOnly}set appendOnly(e){this._appendOnly=kn(e)}constructor(e,i,r,s,d,_,w,S){super(e,_,r,d),this.elementRef=e,this._changeDetectorRef=i,this._scrollStrategy=s,this.scrollable=S,this._platform=Fn(Co),this._detachedSubject=new Zt,this._renderedRangeSubject=new Zt,this._orientation="vertical",this._appendOnly=!1,this.scrolledIndexChange=new xn(I=>this._scrollStrategy.scrolledIndexChange.subscribe(L=>Promise.resolve().then(()=>this.ngZone.run(()=>I.next(L))))),this.renderedRangeStream=this._renderedRangeSubject,this._totalContentSize=0,this._totalContentWidth="",this._totalContentHeight="",this._renderedRange={start:0,end:0},this._dataLength=0,this._viewportSize=0,this._renderedContentOffset=0,this._renderedContentOffsetNeedsRewrite=!1,this._isChangeDetectionPending=!1,this._runAfterChangeDetection=[],this._viewportChanges=$.EMPTY,this._viewportChanges=w.change().subscribe(()=>{this.checkViewportSize()}),this.scrollable||(this.elementRef.nativeElement.classList.add("cdk-virtual-scrollable"),this.scrollable=this)}ngOnInit(){this._platform.isBrowser&&(this.scrollable===this&&super.ngOnInit(),this.ngZone.runOutsideAngular(()=>Promise.resolve().then(()=>{this._measureViewportSize(),this._scrollStrategy.attach(this),this.scrollable.elementScrolled().pipe(Vs(null),tE(0,t7)).subscribe(()=>this._scrollStrategy.onContentScrolled()),this._markChangeDetectionNeeded()})))}ngOnDestroy(){this.detach(),this._scrollStrategy.detach(),this._renderedRangeSubject.complete(),this._detachedSubject.complete(),this._viewportChanges.unsubscribe(),super.ngOnDestroy()}attach(e){this.ngZone.runOutsideAngular(()=>{this._forOf=e,this._forOf.dataStream.pipe(ri(this._detachedSubject)).subscribe(i=>{const r=i.length;r!==this._dataLength&&(this._dataLength=r,this._scrollStrategy.onDataLengthChanged()),this._doChangeDetection()})})}detach(){this._forOf=null,this._detachedSubject.next()}getDataLength(){return this._dataLength}getViewportSize(){return this._viewportSize}getRenderedRange(){return this._renderedRange}measureBoundingClientRectWithScrollOffset(e){return this.getElementRef().nativeElement.getBoundingClientRect()[e]}setTotalContentSize(e){this._totalContentSize!==e&&(this._totalContentSize=e,this._calculateSpacerSize(),this._markChangeDetectionNeeded())}setRenderedRange(e){(function e7(t,n){return t.start==n.start&&t.end==n.end})(this._renderedRange,e)||(this.appendOnly&&(e={start:0,end:Math.max(this._renderedRange.end,e.end)}),this._renderedRangeSubject.next(this._renderedRange=e),this._markChangeDetectionNeeded(()=>this._scrollStrategy.onContentRendered()))}getOffsetToRenderedContentStart(){return this._renderedContentOffsetNeedsRewrite?null:this._renderedContentOffset}setRenderedContentOffset(e,i="to-start"){e=this.appendOnly&&"to-start"===i?0:e;const s="horizontal"==this.orientation,d=s?"X":"Y";let w=`translate${d}(${Number((s&&this.dir&&"rtl"==this.dir.value?-1:1)*e)}px)`;this._renderedContentOffset=e,"to-end"===i&&(w+=` translate${d}(-100%)`,this._renderedContentOffsetNeedsRewrite=!0),this._renderedContentTransform!=w&&(this._renderedContentTransform=w,this._markChangeDetectionNeeded(()=>{this._renderedContentOffsetNeedsRewrite?(this._renderedContentOffset-=this.measureRenderedContentSize(),this._renderedContentOffsetNeedsRewrite=!1,this.setRenderedContentOffset(this._renderedContentOffset)):this._scrollStrategy.onRenderedOffsetChanged()}))}scrollToOffset(e,i="auto"){const r={behavior:i};"horizontal"===this.orientation?r.start=e:r.top=e,this.scrollable.scrollTo(r)}scrollToIndex(e,i="auto"){this._scrollStrategy.scrollToIndex(e,i)}measureScrollOffset(e){let i;return i=this.scrollable==this?r=>super.measureScrollOffset(r):r=>this.scrollable.measureScrollOffset(r),Math.max(0,i(e??("horizontal"===this.orientation?"start":"top"))-this.measureViewportOffset())}measureViewportOffset(e){let i;const r="left",s="right",d="rtl"==this.dir?.value;i="start"==e?d?s:r:"end"==e?d?r:s:e||("horizontal"===this.orientation?"left":"top");const _=this.scrollable.measureBoundingClientRectWithScrollOffset(i);return this.elementRef.nativeElement.getBoundingClientRect()[i]-_}measureRenderedContentSize(){const e=this._contentWrapper.nativeElement;return"horizontal"===this.orientation?e.offsetWidth:e.offsetHeight}measureRangeSize(e){return this._forOf?this._forOf.measureRangeSize(e,this.orientation):0}checkViewportSize(){this._measureViewportSize(),this._scrollStrategy.onDataLengthChanged()}_measureViewportSize(){this._viewportSize=this.scrollable.measureViewportSize(this.orientation)}_markChangeDetectionNeeded(e){e&&this._runAfterChangeDetection.push(e),this._isChangeDetectionPending||(this._isChangeDetectionPending=!0,this.ngZone.runOutsideAngular(()=>Promise.resolve().then(()=>{this._doChangeDetection()})))}_doChangeDetection(){this._isChangeDetectionPending=!1,this._contentWrapper.nativeElement.style.transform=this._renderedContentTransform,this.ngZone.run(()=>this._changeDetectorRef.markForCheck());const e=this._runAfterChangeDetection;this._runAfterChangeDetection=[];for(const i of e)i()}_calculateSpacerSize(){this._totalContentHeight="horizontal"===this.orientation?"":`${this._totalContentSize}px`,this._totalContentWidth="horizontal"===this.orientation?`${this._totalContentSize}px`:""}}return t.\u0275fac=function(e){return new(e||t)(z($t),z(Lr),z(Ln),z(Y8,8),z(sa,8),z(p0),z(f0),z(I2,8))},t.\u0275cmp=Rn({type:t,selectors:[["cdk-virtual-scroll-viewport"]],viewQuery:function(e,i){if(1&e&&Yi(Z8,7),2&e){let r;fn(r=mn())&&(i._contentWrapper=r.first)}},hostAttrs:[1,"cdk-virtual-scroll-viewport"],hostVars:4,hostBindings:function(e,i){2&e&&yi("cdk-virtual-scroll-orientation-horizontal","horizontal"===i.orientation)("cdk-virtual-scroll-orientation-vertical","horizontal"!==i.orientation)},inputs:{orientation:"orientation",appendOnly:"appendOnly"},outputs:{scrolledIndexChange:"scrolledIndexChange"},standalone:!0,features:[Pn([{provide:A2,useFactory:(n,e)=>n||e,deps:[[new $i,new To(I2)],t]}]),a,IM],ngContentSelectors:X8,decls:4,vars:4,consts:[[1,"cdk-virtual-scroll-content-wrapper"],["contentWrapper",""],[1,"cdk-virtual-scroll-spacer"]],template:function(e,i){1&e&&(Tr(),se(0,"div",0,1),Xi(2),he(),ut(3,"div",2)),2&e&&(Se(3),pc("width",i._totalContentWidth)("height",i._totalContentHeight))},styles:["cdk-virtual-scroll-viewport{display:block;position:relative;transform:translateZ(0)}.cdk-virtual-scrollable{overflow:auto;will-change:scroll-position;contain:strict;-webkit-overflow-scrolling:touch}.cdk-virtual-scroll-content-wrapper{position:absolute;top:0;left:0;contain:content}[dir=rtl] .cdk-virtual-scroll-content-wrapper{right:0;left:auto}.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper{min-height:100%}.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>dl:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>ol:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>table:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>ul:not([cdkVirtualFor]){padding-left:0;padding-right:0;margin-left:0;margin-right:0;border-left-width:0;border-right-width:0;outline:none}.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper{min-width:100%}.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>dl:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>ol:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>table:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>ul:not([cdkVirtualFor]){padding-top:0;padding-bottom:0;margin-top:0;margin-bottom:0;border-top-width:0;border-bottom-width:0;outline:none}.cdk-virtual-scroll-spacer{height:1px;transform-origin:0 0;flex:0 0 auto}[dir=rtl] .cdk-virtual-scroll-spacer{transform-origin:100% 0}"],encapsulation:2,changeDetection:0}),t})(),ip=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=cn({type:t}),t.\u0275inj=nn({}),t})(),nE=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=cn({type:t}),t.\u0275inj=nn({imports:[zf,ip,n7,zf,ip]}),t})();class iE{attach(n){return this._attachedHost=n,n.attach(this)}detach(){let n=this._attachedHost;null!=n&&(this._attachedHost=null,n.detach())}get isAttached(){return null!=this._attachedHost}setAttachedHost(n){this._attachedHost=n}}class f_ extends iE{constructor(n,e,i,r,s){super(),this.component=n,this.viewContainerRef=e,this.injector=i,this.componentFactoryResolver=r,this.projectableNodes=s}}class m0 extends iE{constructor(n,e,i,r){super(),this.templateRef=n,this.viewContainerRef=e,this.context=i,this.injector=r}get origin(){return this.templateRef.elementRef}attach(n,e=this.context){return this.context=e,super.attach(n)}detach(){return this.context=void 0,super.detach()}}class i7 extends iE{constructor(n){super(),this.element=n instanceof $t?n.nativeElement:n}}class hC{constructor(){this._isDisposed=!1,this.attachDomPortal=null}hasAttached(){return!!this._attachedPortal}attach(n){return n instanceof f_?(this._attachedPortal=n,this.attachComponentPortal(n)):n instanceof m0?(this._attachedPortal=n,this.attachTemplatePortal(n)):this.attachDomPortal&&n instanceof i7?(this._attachedPortal=n,this.attachDomPortal(n)):void 0}detach(){this._attachedPortal&&(this._attachedPortal.setAttachedHost(null),this._attachedPortal=null),this._invokeDisposeFn()}dispose(){this.hasAttached()&&this.detach(),this._invokeDisposeFn(),this._isDisposed=!0}setDisposeFn(n){this._disposeFn=n}_invokeDisposeFn(){this._disposeFn&&(this._disposeFn(),this._disposeFn=null)}}class r7 extends hC{constructor(n,e,i,r,s){super(),this.outletElement=n,this._componentFactoryResolver=e,this._appRef=i,this._defaultInjector=r,this.attachDomPortal=d=>{const _=d.element,w=this._document.createComment("dom-portal");_.parentNode.insertBefore(w,_),this.outletElement.appendChild(_),this._attachedPortal=d,super.setDisposeFn(()=>{w.parentNode&&w.parentNode.replaceChild(_,w)})},this._document=s}attachComponentPortal(n){const i=(n.componentFactoryResolver||this._componentFactoryResolver).resolveComponentFactory(n.component);let r;return n.viewContainerRef?(r=n.viewContainerRef.createComponent(i,n.viewContainerRef.length,n.injector||n.viewContainerRef.injector,n.projectableNodes||void 0),this.setDisposeFn(()=>r.destroy())):(r=i.create(n.injector||this._defaultInjector||Or.NULL),this._appRef.attachView(r.hostView),this.setDisposeFn(()=>{this._appRef.viewCount>0&&this._appRef.detachView(r.hostView),r.destroy()})),this.outletElement.appendChild(this._getComponentRootNode(r)),this._attachedPortal=n,r}attachTemplatePortal(n){let e=n.viewContainerRef,i=e.createEmbeddedView(n.templateRef,n.context,{injector:n.injector});return i.rootNodes.forEach(r=>this.outletElement.appendChild(r)),i.detectChanges(),this.setDisposeFn(()=>{let r=e.indexOf(i);-1!==r&&e.remove(r)}),this._attachedPortal=n,i}dispose(){super.dispose(),this.outletElement.remove()}_getComponentRootNode(n){return n.hostView.rootNodes[0]}}let m_=(()=>{class t extends hC{constructor(e,i,r){super(),this._componentFactoryResolver=e,this._viewContainerRef=i,this._isInitialized=!1,this.attached=new In,this.attachDomPortal=s=>{const d=s.element,_=this._document.createComment("dom-portal");s.setAttachedHost(this),d.parentNode.insertBefore(_,d),this._getRootNode().appendChild(d),this._attachedPortal=s,super.setDisposeFn(()=>{_.parentNode&&_.parentNode.replaceChild(d,_)})},this._document=r}get portal(){return this._attachedPortal}set portal(e){this.hasAttached()&&!e&&!this._isInitialized||(this.hasAttached()&&super.detach(),e&&super.attach(e),this._attachedPortal=e||null)}get attachedRef(){return this._attachedRef}ngOnInit(){this._isInitialized=!0}ngOnDestroy(){super.dispose(),this._attachedRef=this._attachedPortal=null}attachComponentPortal(e){e.setAttachedHost(this);const i=null!=e.viewContainerRef?e.viewContainerRef:this._viewContainerRef,s=(e.componentFactoryResolver||this._componentFactoryResolver).resolveComponentFactory(e.component),d=i.createComponent(s,i.length,e.injector||i.injector,e.projectableNodes||void 0);return i!==this._viewContainerRef&&this._getRootNode().appendChild(d.hostView.rootNodes[0]),super.setDisposeFn(()=>d.destroy()),this._attachedPortal=e,this._attachedRef=d,this.attached.emit(d),d}attachTemplatePortal(e){e.setAttachedHost(this);const i=this._viewContainerRef.createEmbeddedView(e.templateRef,e.context,{injector:e.injector});return super.setDisposeFn(()=>this._viewContainerRef.clear()),this._attachedPortal=e,this._attachedRef=i,this.attached.emit(i),i}_getRootNode(){const e=this._viewContainerRef.element.nativeElement;return e.nodeType===e.ELEMENT_NODE?e:e.parentNode}}return t.\u0275fac=function(e){return new(e||t)(z($r),z(ro),z(Bn))},t.\u0275dir=Ge({type:t,selectors:[["","cdkPortalOutlet",""]],inputs:{portal:["cdkPortalOutlet","portal"]},outputs:{attached:"attached"},exportAs:["cdkPortalOutlet"],features:[a]}),t})(),qf=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=cn({type:t}),t.\u0275inj=nn({}),t})();const k2=SP();class o7{constructor(n,e){this._viewportRuler=n,this._previousHTMLStyles={top:"",left:""},this._isEnabled=!1,this._document=e}attach(){}enable(){if(this._canBeEnabled()){const n=this._document.documentElement;this._previousScrollPosition=this._viewportRuler.getViewportScrollPosition(),this._previousHTMLStyles.left=n.style.left||"",this._previousHTMLStyles.top=n.style.top||"",n.style.left=Lo(-this._previousScrollPosition.left),n.style.top=Lo(-this._previousScrollPosition.top),n.classList.add("cdk-global-scrollblock"),this._isEnabled=!0}}disable(){if(this._isEnabled){const n=this._document.documentElement,i=n.style,r=this._document.body.style,s=i.scrollBehavior||"",d=r.scrollBehavior||"";this._isEnabled=!1,i.left=this._previousHTMLStyles.left,i.top=this._previousHTMLStyles.top,n.classList.remove("cdk-global-scrollblock"),k2&&(i.scrollBehavior=r.scrollBehavior="auto"),window.scroll(this._previousScrollPosition.left,this._previousScrollPosition.top),k2&&(i.scrollBehavior=s,r.scrollBehavior=d)}}_canBeEnabled(){if(this._document.documentElement.classList.contains("cdk-global-scrollblock")||this._isEnabled)return!1;const e=this._document.body,i=this._viewportRuler.getViewportSize();return e.scrollHeight>i.height||e.scrollWidth>i.width}}class s7{constructor(n,e,i,r){this._scrollDispatcher=n,this._ngZone=e,this._viewportRuler=i,this._config=r,this._scrollSubscription=null,this._detach=()=>{this.disable(),this._overlayRef.hasAttached()&&this._ngZone.run(()=>this._overlayRef.detach())}}attach(n){this._overlayRef=n}enable(){if(this._scrollSubscription)return;const n=this._scrollDispatcher.scrolled(0);this._config&&this._config.threshold&&this._config.threshold>1?(this._initialScrollPosition=this._viewportRuler.getViewportScrollPosition().top,this._scrollSubscription=n.subscribe(()=>{const e=this._viewportRuler.getViewportScrollPosition().top;Math.abs(e-this._initialScrollPosition)>this._config.threshold?this._detach():this._overlayRef.updatePosition()})):this._scrollSubscription=n.subscribe(this._detach)}disable(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)}detach(){this.disable(),this._overlayRef=null}}class R2{enable(){}disable(){}attach(){}}function rE(t,n){return n.some(e=>t.bottome.bottom||t.righte.right)}function P2(t,n){return n.some(e=>t.tope.bottom||t.lefte.right)}class a7{constructor(n,e,i,r){this._scrollDispatcher=n,this._viewportRuler=e,this._ngZone=i,this._config=r,this._scrollSubscription=null}attach(n){this._overlayRef=n}enable(){this._scrollSubscription||(this._scrollSubscription=this._scrollDispatcher.scrolled(this._config?this._config.scrollThrottle:0).subscribe(()=>{if(this._overlayRef.updatePosition(),this._config&&this._config.autoClose){const e=this._overlayRef.overlayElement.getBoundingClientRect(),{width:i,height:r}=this._viewportRuler.getViewportSize();rE(e,[{width:i,height:r,bottom:r,right:i,top:0,left:0}])&&(this.disable(),this._ngZone.run(()=>this._overlayRef.detach()))}}))}disable(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)}detach(){this.disable(),this._overlayRef=null}}let l7=(()=>{class t{constructor(e,i,r,s){this._scrollDispatcher=e,this._viewportRuler=i,this._ngZone=r,this.noop=()=>new R2,this.close=d=>new s7(this._scrollDispatcher,this._ngZone,this._viewportRuler,d),this.block=()=>new o7(this._viewportRuler,this._document),this.reposition=d=>new a7(this._scrollDispatcher,this._viewportRuler,this._ngZone,d),this._document=s}}return t.\u0275fac=function(e){return new(e||t)(we(p0),we(f0),we(Ln),we(Bn))},t.\u0275prov=rt({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();class pC{constructor(n){if(this.scrollStrategy=new R2,this.panelClass="",this.hasBackdrop=!1,this.backdropClass="cdk-overlay-dark-backdrop",this.disposeOnNavigation=!1,n){const e=Object.keys(n);for(const i of e)void 0!==n[i]&&(this[i]=n[i])}}}class c7{constructor(n,e){this.connectionPair=n,this.scrollableViewProperties=e}}let O2=(()=>{class t{constructor(e){this._attachedOverlays=[],this._document=e}ngOnDestroy(){this.detach()}add(e){this.remove(e),this._attachedOverlays.push(e)}remove(e){const i=this._attachedOverlays.indexOf(e);i>-1&&this._attachedOverlays.splice(i,1),0===this._attachedOverlays.length&&this.detach()}}return t.\u0275fac=function(e){return new(e||t)(we(Bn))},t.\u0275prov=rt({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),u7=(()=>{class t extends O2{constructor(e,i){super(e),this._ngZone=i,this._keydownListener=r=>{const s=this._attachedOverlays;for(let d=s.length-1;d>-1;d--)if(s[d]._keydownEvents.observers.length>0){const _=s[d]._keydownEvents;this._ngZone?this._ngZone.run(()=>_.next(r)):_.next(r);break}}}add(e){super.add(e),this._isAttached||(this._ngZone?this._ngZone.runOutsideAngular(()=>this._document.body.addEventListener("keydown",this._keydownListener)):this._document.body.addEventListener("keydown",this._keydownListener),this._isAttached=!0)}detach(){this._isAttached&&(this._document.body.removeEventListener("keydown",this._keydownListener),this._isAttached=!1)}}return t.\u0275fac=function(e){return new(e||t)(we(Bn),we(Ln,8))},t.\u0275prov=rt({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),d7=(()=>{class t extends O2{constructor(e,i,r){super(e),this._platform=i,this._ngZone=r,this._cursorStyleIsSet=!1,this._pointerDownListener=s=>{this._pointerDownEventTarget=Nf(s)},this._clickListener=s=>{const d=Nf(s),_="click"===s.type&&this._pointerDownEventTarget?this._pointerDownEventTarget:d;this._pointerDownEventTarget=null;const w=this._attachedOverlays.slice();for(let S=w.length-1;S>-1;S--){const I=w[S];if(I._outsidePointerEvents.observers.length<1||!I.hasAttached())continue;if(I.overlayElement.contains(d)||I.overlayElement.contains(_))break;const L=I._outsidePointerEvents;this._ngZone?this._ngZone.run(()=>L.next(s)):L.next(s)}}}add(e){if(super.add(e),!this._isAttached){const i=this._document.body;this._ngZone?this._ngZone.runOutsideAngular(()=>this._addEventListeners(i)):this._addEventListeners(i),this._platform.IOS&&!this._cursorStyleIsSet&&(this._cursorOriginalValue=i.style.cursor,i.style.cursor="pointer",this._cursorStyleIsSet=!0),this._isAttached=!0}}detach(){if(this._isAttached){const e=this._document.body;e.removeEventListener("pointerdown",this._pointerDownListener,!0),e.removeEventListener("click",this._clickListener,!0),e.removeEventListener("auxclick",this._clickListener,!0),e.removeEventListener("contextmenu",this._clickListener,!0),this._platform.IOS&&this._cursorStyleIsSet&&(e.style.cursor=this._cursorOriginalValue,this._cursorStyleIsSet=!1),this._isAttached=!1}}_addEventListeners(e){e.addEventListener("pointerdown",this._pointerDownListener,!0),e.addEventListener("click",this._clickListener,!0),e.addEventListener("auxclick",this._clickListener,!0),e.addEventListener("contextmenu",this._clickListener,!0)}}return t.\u0275fac=function(e){return new(e||t)(we(Bn),we(Co),we(Ln,8))},t.\u0275prov=rt({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),fC=(()=>{class t{constructor(e,i){this._platform=i,this._document=e}ngOnDestroy(){this._containerElement?.remove()}getContainerElement(){return this._containerElement||this._createContainer(),this._containerElement}_createContainer(){const e="cdk-overlay-container";if(this._platform.isBrowser||pD()){const r=this._document.querySelectorAll(`.${e}[platform="server"], .${e}[platform="test"]`);for(let s=0;sthis._backdropClick.next(L),this._backdropTransitionendHandler=L=>{this._disposeBackdrop(L.target)},this._keydownEvents=new Zt,this._outsidePointerEvents=new Zt,r.scrollStrategy&&(this._scrollStrategy=r.scrollStrategy,this._scrollStrategy.attach(this)),this._positionStrategy=r.positionStrategy}get overlayElement(){return this._pane}get backdropElement(){return this._backdropElement}get hostElement(){return this._host}attach(n){!this._host.parentElement&&this._previousHostParent&&this._previousHostParent.appendChild(this._host);const e=this._portalOutlet.attach(n);return this._positionStrategy&&this._positionStrategy.attach(this),this._updateStackingOrder(),this._updateElementSize(),this._updateElementDirection(),this._scrollStrategy&&this._scrollStrategy.enable(),this._ngZone.onStable.pipe(Fo(1)).subscribe(()=>{this.hasAttached()&&this.updatePosition()}),this._togglePointerEvents(!0),this._config.hasBackdrop&&this._attachBackdrop(),this._config.panelClass&&this._toggleClasses(this._pane,this._config.panelClass,!0),this._attachments.next(),this._keyboardDispatcher.add(this),this._config.disposeOnNavigation&&(this._locationChanges=this._location.subscribe(()=>this.dispose())),this._outsideClickDispatcher.add(this),"function"==typeof e?.onDestroy&&e.onDestroy(()=>{this.hasAttached()&&this._ngZone.runOutsideAngular(()=>Promise.resolve().then(()=>this.detach()))}),e}detach(){if(!this.hasAttached())return;this.detachBackdrop(),this._togglePointerEvents(!1),this._positionStrategy&&this._positionStrategy.detach&&this._positionStrategy.detach(),this._scrollStrategy&&this._scrollStrategy.disable();const n=this._portalOutlet.detach();return this._detachments.next(),this._keyboardDispatcher.remove(this),this._detachContentWhenStable(),this._locationChanges.unsubscribe(),this._outsideClickDispatcher.remove(this),n}dispose(){const n=this.hasAttached();this._positionStrategy&&this._positionStrategy.dispose(),this._disposeScrollStrategy(),this._disposeBackdrop(this._backdropElement),this._locationChanges.unsubscribe(),this._keyboardDispatcher.remove(this),this._portalOutlet.dispose(),this._attachments.complete(),this._backdropClick.complete(),this._keydownEvents.complete(),this._outsidePointerEvents.complete(),this._outsideClickDispatcher.remove(this),this._host?.remove(),this._previousHostParent=this._pane=this._host=null,n&&this._detachments.next(),this._detachments.complete()}hasAttached(){return this._portalOutlet.hasAttached()}backdropClick(){return this._backdropClick}attachments(){return this._attachments}detachments(){return this._detachments}keydownEvents(){return this._keydownEvents}outsidePointerEvents(){return this._outsidePointerEvents}getConfig(){return this._config}updatePosition(){this._positionStrategy&&this._positionStrategy.apply()}updatePositionStrategy(n){n!==this._positionStrategy&&(this._positionStrategy&&this._positionStrategy.dispose(),this._positionStrategy=n,this.hasAttached()&&(n.attach(this),this.updatePosition()))}updateSize(n){this._config={...this._config,...n},this._updateElementSize()}setDirection(n){this._config={...this._config,direction:n},this._updateElementDirection()}addPanelClass(n){this._pane&&this._toggleClasses(this._pane,n,!0)}removePanelClass(n){this._pane&&this._toggleClasses(this._pane,n,!1)}getDirection(){const n=this._config.direction;return n?"string"==typeof n?n:n.value:"ltr"}updateScrollStrategy(n){n!==this._scrollStrategy&&(this._disposeScrollStrategy(),this._scrollStrategy=n,this.hasAttached()&&(n.attach(this),n.enable()))}_updateElementDirection(){this._host.setAttribute("dir",this.getDirection())}_updateElementSize(){if(!this._pane)return;const n=this._pane.style;n.width=Lo(this._config.width),n.height=Lo(this._config.height),n.minWidth=Lo(this._config.minWidth),n.minHeight=Lo(this._config.minHeight),n.maxWidth=Lo(this._config.maxWidth),n.maxHeight=Lo(this._config.maxHeight)}_togglePointerEvents(n){this._pane.style.pointerEvents=n?"":"none"}_attachBackdrop(){const n="cdk-overlay-backdrop-showing";this._backdropElement=this._document.createElement("div"),this._backdropElement.classList.add("cdk-overlay-backdrop"),this._animationsDisabled&&this._backdropElement.classList.add("cdk-overlay-backdrop-noop-animation"),this._config.backdropClass&&this._toggleClasses(this._backdropElement,this._config.backdropClass,!0),this._host.parentElement.insertBefore(this._backdropElement,this._host),this._backdropElement.addEventListener("click",this._backdropClickHandler),!this._animationsDisabled&&typeof requestAnimationFrame<"u"?this._ngZone.runOutsideAngular(()=>{requestAnimationFrame(()=>{this._backdropElement&&this._backdropElement.classList.add(n)})}):this._backdropElement.classList.add(n)}_updateStackingOrder(){this._host.nextSibling&&this._host.parentNode.appendChild(this._host)}detachBackdrop(){const n=this._backdropElement;if(n){if(this._animationsDisabled)return void this._disposeBackdrop(n);n.classList.remove("cdk-overlay-backdrop-showing"),this._ngZone.runOutsideAngular(()=>{n.addEventListener("transitionend",this._backdropTransitionendHandler)}),n.style.pointerEvents="none",this._backdropTimeout=this._ngZone.runOutsideAngular(()=>setTimeout(()=>{this._disposeBackdrop(n)},500))}}_toggleClasses(n,e,i){const r=Nw(e||[]).filter(s=>!!s);r.length&&(i?n.classList.add(...r):n.classList.remove(...r))}_detachContentWhenStable(){this._ngZone.runOutsideAngular(()=>{const n=this._ngZone.onStable.pipe(ri(mr(this._attachments,this._detachments))).subscribe(()=>{(!this._pane||!this._host||0===this._pane.children.length)&&(this._pane&&this._config.panelClass&&this._toggleClasses(this._pane,this._config.panelClass,!1),this._host&&this._host.parentElement&&(this._previousHostParent=this._host.parentElement,this._host.remove()),n.unsubscribe())})})}_disposeScrollStrategy(){const n=this._scrollStrategy;n&&(n.disable(),n.detach&&n.detach())}_disposeBackdrop(n){n&&(n.removeEventListener("click",this._backdropClickHandler),n.removeEventListener("transitionend",this._backdropTransitionendHandler),n.remove(),this._backdropElement===n&&(this._backdropElement=null)),this._backdropTimeout&&(clearTimeout(this._backdropTimeout),this._backdropTimeout=void 0)}}const F2="cdk-overlay-connected-position-bounding-box",h7=/([A-Za-z%]+)$/;class p7{get positions(){return this._preferredPositions}constructor(n,e,i,r,s){this._viewportRuler=e,this._document=i,this._platform=r,this._overlayContainer=s,this._lastBoundingBoxSize={width:0,height:0},this._isPushed=!1,this._canPush=!0,this._growAfterOpen=!1,this._hasFlexibleDimensions=!0,this._positionLocked=!1,this._viewportMargin=0,this._scrollables=[],this._preferredPositions=[],this._positionChanges=new Zt,this._resizeSubscription=$.EMPTY,this._offsetX=0,this._offsetY=0,this._appliedPanelClasses=[],this.positionChanges=this._positionChanges,this.setOrigin(n)}attach(n){this._validatePositions(),n.hostElement.classList.add(F2),this._overlayRef=n,this._boundingBox=n.hostElement,this._pane=n.overlayElement,this._isDisposed=!1,this._isInitialRender=!0,this._lastPosition=null,this._resizeSubscription.unsubscribe(),this._resizeSubscription=this._viewportRuler.change().subscribe(()=>{this._isInitialRender=!0,this.apply()})}apply(){if(this._isDisposed||!this._platform.isBrowser)return;if(!this._isInitialRender&&this._positionLocked&&this._lastPosition)return void this.reapplyLastPosition();this._clearPanelClasses(),this._resetOverlayElementStyles(),this._resetBoundingBoxStyles(),this._viewportRect=this._getNarrowedViewportRect(),this._originRect=this._getOriginRect(),this._overlayRect=this._pane.getBoundingClientRect(),this._containerRect=this._overlayContainer.getContainerElement().getBoundingClientRect();const n=this._originRect,e=this._overlayRect,i=this._viewportRect,r=this._containerRect,s=[];let d;for(let _ of this._preferredPositions){let w=this._getOriginPoint(n,r,_),S=this._getOverlayPoint(w,e,_),I=this._getOverlayFit(S,e,i,_);if(I.isCompletelyWithinViewport)return this._isPushed=!1,void this._applyPosition(_,w);this._canFitWithFlexibleDimensions(I,S,i)?s.push({position:_,origin:w,overlayRect:e,boundingBoxRect:this._calculateBoundingBoxRect(w,_)}):(!d||d.overlayFit.visibleAreaw&&(w=I,_=S)}return this._isPushed=!1,void this._applyPosition(_.position,_.origin)}if(this._canPush)return this._isPushed=!0,void this._applyPosition(d.position,d.originPoint);this._applyPosition(d.position,d.originPoint)}detach(){this._clearPanelClasses(),this._lastPosition=null,this._previousPushAmount=null,this._resizeSubscription.unsubscribe()}dispose(){this._isDisposed||(this._boundingBox&&Zf(this._boundingBox.style,{top:"",left:"",right:"",bottom:"",height:"",width:"",alignItems:"",justifyContent:""}),this._pane&&this._resetOverlayElementStyles(),this._overlayRef&&this._overlayRef.hostElement.classList.remove(F2),this.detach(),this._positionChanges.complete(),this._overlayRef=this._boundingBox=null,this._isDisposed=!0)}reapplyLastPosition(){if(this._isDisposed||!this._platform.isBrowser)return;const n=this._lastPosition;if(n){this._originRect=this._getOriginRect(),this._overlayRect=this._pane.getBoundingClientRect(),this._viewportRect=this._getNarrowedViewportRect(),this._containerRect=this._overlayContainer.getContainerElement().getBoundingClientRect();const e=this._getOriginPoint(this._originRect,this._containerRect,n);this._applyPosition(n,e)}else this.apply()}withScrollableContainers(n){return this._scrollables=n,this}withPositions(n){return this._preferredPositions=n,-1===n.indexOf(this._lastPosition)&&(this._lastPosition=null),this._validatePositions(),this}withViewportMargin(n){return this._viewportMargin=n,this}withFlexibleDimensions(n=!0){return this._hasFlexibleDimensions=n,this}withGrowAfterOpen(n=!0){return this._growAfterOpen=n,this}withPush(n=!0){return this._canPush=n,this}withLockedPosition(n=!0){return this._positionLocked=n,this}setOrigin(n){return this._origin=n,this}withDefaultOffsetX(n){return this._offsetX=n,this}withDefaultOffsetY(n){return this._offsetY=n,this}withTransformOriginOn(n){return this._transformOriginSelector=n,this}_getOriginPoint(n,e,i){let r,s;if("center"==i.originX)r=n.left+n.width/2;else{const d=this._isRtl()?n.right:n.left,_=this._isRtl()?n.left:n.right;r="start"==i.originX?d:_}return e.left<0&&(r-=e.left),s="center"==i.originY?n.top+n.height/2:"top"==i.originY?n.top:n.bottom,e.top<0&&(s-=e.top),{x:r,y:s}}_getOverlayPoint(n,e,i){let r,s;return r="center"==i.overlayX?-e.width/2:"start"===i.overlayX?this._isRtl()?-e.width:0:this._isRtl()?0:-e.width,s="center"==i.overlayY?-e.height/2:"top"==i.overlayY?0:-e.height,{x:n.x+r,y:n.y+s}}_getOverlayFit(n,e,i,r){const s=B2(e);let{x:d,y:_}=n,w=this._getOffset(r,"x"),S=this._getOffset(r,"y");w&&(d+=w),S&&(_+=S);let H=0-_,Y=_+s.height-i.height,ae=this._subtractOverflows(s.width,0-d,d+s.width-i.width),ve=this._subtractOverflows(s.height,H,Y),Be=ae*ve;return{visibleArea:Be,isCompletelyWithinViewport:s.width*s.height===Be,fitsInViewportVertically:ve===s.height,fitsInViewportHorizontally:ae==s.width}}_canFitWithFlexibleDimensions(n,e,i){if(this._hasFlexibleDimensions){const r=i.bottom-e.y,s=i.right-e.x,d=L2(this._overlayRef.getConfig().minHeight),_=L2(this._overlayRef.getConfig().minWidth);return(n.fitsInViewportVertically||null!=d&&d<=r)&&(n.fitsInViewportHorizontally||null!=_&&_<=s)}return!1}_pushOverlayOnScreen(n,e,i){if(this._previousPushAmount&&this._positionLocked)return{x:n.x+this._previousPushAmount.x,y:n.y+this._previousPushAmount.y};const r=B2(e),s=this._viewportRect,d=Math.max(n.x+r.width-s.width,0),_=Math.max(n.y+r.height-s.height,0),w=Math.max(s.top-i.top-n.y,0),S=Math.max(s.left-i.left-n.x,0);let I=0,L=0;return I=r.width<=s.width?S||-d:n.xae&&!this._isInitialRender&&!this._growAfterOpen&&(d=n.y-ae/2)}if("end"===e.overlayX&&!r||"start"===e.overlayX&&r)H=i.width-n.x+this._viewportMargin,I=n.x-this._viewportMargin;else if("start"===e.overlayX&&!r||"end"===e.overlayX&&r)L=n.x,I=i.right-n.x;else{const Y=Math.min(i.right-n.x+i.left,n.x),ae=this._lastBoundingBoxSize.width;I=2*Y,L=n.x-Y,I>ae&&!this._isInitialRender&&!this._growAfterOpen&&(L=n.x-ae/2)}return{top:d,left:L,bottom:_,right:H,width:I,height:s}}_setBoundingBoxStyles(n,e){const i=this._calculateBoundingBoxRect(n,e);!this._isInitialRender&&!this._growAfterOpen&&(i.height=Math.min(i.height,this._lastBoundingBoxSize.height),i.width=Math.min(i.width,this._lastBoundingBoxSize.width));const r={};if(this._hasExactPosition())r.top=r.left="0",r.bottom=r.right=r.maxHeight=r.maxWidth="",r.width=r.height="100%";else{const s=this._overlayRef.getConfig().maxHeight,d=this._overlayRef.getConfig().maxWidth;r.height=Lo(i.height),r.top=Lo(i.top),r.bottom=Lo(i.bottom),r.width=Lo(i.width),r.left=Lo(i.left),r.right=Lo(i.right),r.alignItems="center"===e.overlayX?"center":"end"===e.overlayX?"flex-end":"flex-start",r.justifyContent="center"===e.overlayY?"center":"bottom"===e.overlayY?"flex-end":"flex-start",s&&(r.maxHeight=Lo(s)),d&&(r.maxWidth=Lo(d))}this._lastBoundingBoxSize=i,Zf(this._boundingBox.style,r)}_resetBoundingBoxStyles(){Zf(this._boundingBox.style,{top:"0",left:"0",right:"0",bottom:"0",height:"",width:"",alignItems:"",justifyContent:""})}_resetOverlayElementStyles(){Zf(this._pane.style,{top:"",left:"",bottom:"",right:"",position:"",transform:""})}_setOverlayElementStyles(n,e){const i={},r=this._hasExactPosition(),s=this._hasFlexibleDimensions,d=this._overlayRef.getConfig();if(r){const I=this._viewportRuler.getViewportScrollPosition();Zf(i,this._getExactOverlayY(e,n,I)),Zf(i,this._getExactOverlayX(e,n,I))}else i.position="static";let _="",w=this._getOffset(e,"x"),S=this._getOffset(e,"y");w&&(_+=`translateX(${w}px) `),S&&(_+=`translateY(${S}px)`),i.transform=_.trim(),d.maxHeight&&(r?i.maxHeight=Lo(d.maxHeight):s&&(i.maxHeight="")),d.maxWidth&&(r?i.maxWidth=Lo(d.maxWidth):s&&(i.maxWidth="")),Zf(this._pane.style,i)}_getExactOverlayY(n,e,i){let r={top:"",bottom:""},s=this._getOverlayPoint(e,this._overlayRect,n);return this._isPushed&&(s=this._pushOverlayOnScreen(s,this._overlayRect,i)),"bottom"===n.overlayY?r.bottom=this._document.documentElement.clientHeight-(s.y+this._overlayRect.height)+"px":r.top=Lo(s.y),r}_getExactOverlayX(n,e,i){let d,r={left:"",right:""},s=this._getOverlayPoint(e,this._overlayRect,n);return this._isPushed&&(s=this._pushOverlayOnScreen(s,this._overlayRect,i)),d=this._isRtl()?"end"===n.overlayX?"left":"right":"end"===n.overlayX?"right":"left","right"===d?r.right=this._document.documentElement.clientWidth-(s.x+this._overlayRect.width)+"px":r.left=Lo(s.x),r}_getScrollVisibility(){const n=this._getOriginRect(),e=this._pane.getBoundingClientRect(),i=this._scrollables.map(r=>r.getElementRef().nativeElement.getBoundingClientRect());return{isOriginClipped:P2(n,i),isOriginOutsideView:rE(n,i),isOverlayClipped:P2(e,i),isOverlayOutsideView:rE(e,i)}}_subtractOverflows(n,...e){return e.reduce((i,r)=>i-Math.max(r,0),n)}_getNarrowedViewportRect(){const n=this._document.documentElement.clientWidth,e=this._document.documentElement.clientHeight,i=this._viewportRuler.getViewportScrollPosition();return{top:i.top+this._viewportMargin,left:i.left+this._viewportMargin,right:i.left+n-this._viewportMargin,bottom:i.top+e-this._viewportMargin,width:n-2*this._viewportMargin,height:e-2*this._viewportMargin}}_isRtl(){return"rtl"===this._overlayRef.getDirection()}_hasExactPosition(){return!this._hasFlexibleDimensions||this._isPushed}_getOffset(n,e){return"x"===e?null==n.offsetX?this._offsetX:n.offsetX:null==n.offsetY?this._offsetY:n.offsetY}_validatePositions(){}_addPanelClasses(n){this._pane&&Nw(n).forEach(e=>{""!==e&&-1===this._appliedPanelClasses.indexOf(e)&&(this._appliedPanelClasses.push(e),this._pane.classList.add(e))})}_clearPanelClasses(){this._pane&&(this._appliedPanelClasses.forEach(n=>{this._pane.classList.remove(n)}),this._appliedPanelClasses=[])}_getOriginRect(){const n=this._origin;if(n instanceof $t)return n.nativeElement.getBoundingClientRect();if(n instanceof Element)return n.getBoundingClientRect();const e=n.width||0,i=n.height||0;return{top:n.y,bottom:n.y+i,left:n.x,right:n.x+e,height:i,width:e}}}function Zf(t,n){for(let e in n)n.hasOwnProperty(e)&&(t[e]=n[e]);return t}function L2(t){if("number"!=typeof t&&null!=t){const[n,e]=t.split(h7);return e&&"px"!==e?null:parseFloat(n)}return t||null}function B2(t){return{top:Math.floor(t.top),right:Math.floor(t.right),bottom:Math.floor(t.bottom),left:Math.floor(t.left),width:Math.floor(t.width),height:Math.floor(t.height)}}const N2="cdk-global-overlay-wrapper";class f7{constructor(){this._cssPosition="static",this._topOffset="",this._bottomOffset="",this._alignItems="",this._xPosition="",this._xOffset="",this._width="",this._height="",this._isDisposed=!1}attach(n){const e=n.getConfig();this._overlayRef=n,this._width&&!e.width&&n.updateSize({width:this._width}),this._height&&!e.height&&n.updateSize({height:this._height}),n.hostElement.classList.add(N2),this._isDisposed=!1}top(n=""){return this._bottomOffset="",this._topOffset=n,this._alignItems="flex-start",this}left(n=""){return this._xOffset=n,this._xPosition="left",this}bottom(n=""){return this._topOffset="",this._bottomOffset=n,this._alignItems="flex-end",this}right(n=""){return this._xOffset=n,this._xPosition="right",this}start(n=""){return this._xOffset=n,this._xPosition="start",this}end(n=""){return this._xOffset=n,this._xPosition="end",this}width(n=""){return this._overlayRef?this._overlayRef.updateSize({width:n}):this._width=n,this}height(n=""){return this._overlayRef?this._overlayRef.updateSize({height:n}):this._height=n,this}centerHorizontally(n=""){return this.left(n),this._xPosition="center",this}centerVertically(n=""){return this.top(n),this._alignItems="center",this}apply(){if(!this._overlayRef||!this._overlayRef.hasAttached())return;const n=this._overlayRef.overlayElement.style,e=this._overlayRef.hostElement.style,i=this._overlayRef.getConfig(),{width:r,height:s,maxWidth:d,maxHeight:_}=i,w=!("100%"!==r&&"100vw"!==r||d&&"100%"!==d&&"100vw"!==d),S=!("100%"!==s&&"100vh"!==s||_&&"100%"!==_&&"100vh"!==_),I=this._xPosition,L=this._xOffset,H="rtl"===this._overlayRef.getConfig().direction;let Y="",ae="",ve="";w?ve="flex-start":"center"===I?(ve="center",H?ae=L:Y=L):H?"left"===I||"end"===I?(ve="flex-end",Y=L):("right"===I||"start"===I)&&(ve="flex-start",ae=L):"left"===I||"start"===I?(ve="flex-start",Y=L):("right"===I||"end"===I)&&(ve="flex-end",ae=L),n.position=this._cssPosition,n.marginLeft=w?"0":Y,n.marginTop=S?"0":this._topOffset,n.marginBottom=this._bottomOffset,n.marginRight=w?"0":ae,e.justifyContent=ve,e.alignItems=S?"flex-start":this._alignItems}dispose(){if(this._isDisposed||!this._overlayRef)return;const n=this._overlayRef.overlayElement.style,e=this._overlayRef.hostElement,i=e.style;e.classList.remove(N2),i.justifyContent=i.alignItems=n.marginTop=n.marginBottom=n.marginLeft=n.marginRight=n.position="",this._overlayRef=null,this._isDisposed=!0}}let m7=(()=>{class t{constructor(e,i,r,s){this._viewportRuler=e,this._document=i,this._platform=r,this._overlayContainer=s}global(){return new f7}flexibleConnectedTo(e){return new p7(e,this._viewportRuler,this._document,this._platform,this._overlayContainer)}}return t.\u0275fac=function(e){return new(e||t)(we(f0),we(Bn),we(Co),we(fC))},t.\u0275prov=rt({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),g7=0,ka=(()=>{class t{constructor(e,i,r,s,d,_,w,S,I,L,H,Y){this.scrollStrategies=e,this._overlayContainer=i,this._componentFactoryResolver=r,this._positionBuilder=s,this._keyboardDispatcher=d,this._injector=_,this._ngZone=w,this._document=S,this._directionality=I,this._location=L,this._outsideClickDispatcher=H,this._animationsModuleType=Y}create(e){const i=this._createHostElement(),r=this._createPaneElement(i),s=this._createPortalOutlet(r),d=new pC(e);return d.direction=d.direction||this._directionality.value,new g0(s,i,r,d,this._ngZone,this._keyboardDispatcher,this._document,this._location,this._outsideClickDispatcher,"NoopAnimations"===this._animationsModuleType)}position(){return this._positionBuilder}_createPaneElement(e){const i=this._document.createElement("div");return i.id="cdk-overlay-"+g7++,i.classList.add("cdk-overlay-pane"),e.appendChild(i),i}_createHostElement(){const e=this._document.createElement("div");return this._overlayContainer.getContainerElement().appendChild(e),e}_createPortalOutlet(e){return this._appRef||(this._appRef=this._injector.get(jg)),new r7(e,this._componentFactoryResolver,this._appRef,this._injector,this._document)}}return t.\u0275fac=function(e){return new(e||t)(we(l7),we(fC),we($r),we(m7),we(u7),we(Or),we(Ln),we(Bn),we(sa),we(yv),we(d7),we(Ta,8))},t.\u0275prov=rt({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();const _7=[{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom"},{originX:"end",originY:"top",overlayX:"end",overlayY:"bottom"},{originX:"end",originY:"bottom",overlayX:"end",overlayY:"top"}],z2=new vt("cdk-connected-overlay-scroll-strategy");let V2=(()=>{class t{constructor(e){this.elementRef=e}}return t.\u0275fac=function(e){return new(e||t)(z($t))},t.\u0275dir=Ge({type:t,selectors:[["","cdk-overlay-origin",""],["","overlay-origin",""],["","cdkOverlayOrigin",""]],exportAs:["cdkOverlayOrigin"],standalone:!0}),t})(),G2=(()=>{class t{get offsetX(){return this._offsetX}set offsetX(e){this._offsetX=e,this._position&&this._updatePositionStrategy(this._position)}get offsetY(){return this._offsetY}set offsetY(e){this._offsetY=e,this._position&&this._updatePositionStrategy(this._position)}get hasBackdrop(){return this._hasBackdrop}set hasBackdrop(e){this._hasBackdrop=kn(e)}get lockPosition(){return this._lockPosition}set lockPosition(e){this._lockPosition=kn(e)}get flexibleDimensions(){return this._flexibleDimensions}set flexibleDimensions(e){this._flexibleDimensions=kn(e)}get growAfterOpen(){return this._growAfterOpen}set growAfterOpen(e){this._growAfterOpen=kn(e)}get push(){return this._push}set push(e){this._push=kn(e)}constructor(e,i,r,s,d){this._overlay=e,this._dir=d,this._hasBackdrop=!1,this._lockPosition=!1,this._growAfterOpen=!1,this._flexibleDimensions=!1,this._push=!1,this._backdropSubscription=$.EMPTY,this._attachSubscription=$.EMPTY,this._detachSubscription=$.EMPTY,this._positionSubscription=$.EMPTY,this.viewportMargin=0,this.open=!1,this.disableClose=!1,this.backdropClick=new In,this.positionChange=new In,this.attach=new In,this.detach=new In,this.overlayKeydown=new In,this.overlayOutsideClick=new In,this._templatePortal=new m0(i,r),this._scrollStrategyFactory=s,this.scrollStrategy=this._scrollStrategyFactory()}get overlayRef(){return this._overlayRef}get dir(){return this._dir?this._dir.value:"ltr"}ngOnDestroy(){this._attachSubscription.unsubscribe(),this._detachSubscription.unsubscribe(),this._backdropSubscription.unsubscribe(),this._positionSubscription.unsubscribe(),this._overlayRef&&this._overlayRef.dispose()}ngOnChanges(e){this._position&&(this._updatePositionStrategy(this._position),this._overlayRef.updateSize({width:this.width,minWidth:this.minWidth,height:this.height,minHeight:this.minHeight}),e.origin&&this.open&&this._position.apply()),e.open&&(this.open?this._attachOverlay():this._detachOverlay())}_createOverlay(){(!this.positions||!this.positions.length)&&(this.positions=_7);const e=this._overlayRef=this._overlay.create(this._buildConfig());this._attachSubscription=e.attachments().subscribe(()=>this.attach.emit()),this._detachSubscription=e.detachments().subscribe(()=>this.detach.emit()),e.keydownEvents().subscribe(i=>{this.overlayKeydown.next(i),27===i.keyCode&&!this.disableClose&&!xc(i)&&(i.preventDefault(),this._detachOverlay())}),this._overlayRef.outsidePointerEvents().subscribe(i=>{this.overlayOutsideClick.next(i)})}_buildConfig(){const e=this._position=this.positionStrategy||this._createPositionStrategy(),i=new pC({direction:this._dir,positionStrategy:e,scrollStrategy:this.scrollStrategy,hasBackdrop:this.hasBackdrop});return(this.width||0===this.width)&&(i.width=this.width),(this.height||0===this.height)&&(i.height=this.height),(this.minWidth||0===this.minWidth)&&(i.minWidth=this.minWidth),(this.minHeight||0===this.minHeight)&&(i.minHeight=this.minHeight),this.backdropClass&&(i.backdropClass=this.backdropClass),this.panelClass&&(i.panelClass=this.panelClass),i}_updatePositionStrategy(e){const i=this.positions.map(r=>({originX:r.originX,originY:r.originY,overlayX:r.overlayX,overlayY:r.overlayY,offsetX:r.offsetX||this.offsetX,offsetY:r.offsetY||this.offsetY,panelClass:r.panelClass||void 0}));return e.setOrigin(this._getFlexibleConnectedPositionStrategyOrigin()).withPositions(i).withFlexibleDimensions(this.flexibleDimensions).withPush(this.push).withGrowAfterOpen(this.growAfterOpen).withViewportMargin(this.viewportMargin).withLockedPosition(this.lockPosition).withTransformOriginOn(this.transformOriginSelector)}_createPositionStrategy(){const e=this._overlay.position().flexibleConnectedTo(this._getFlexibleConnectedPositionStrategyOrigin());return this._updatePositionStrategy(e),e}_getFlexibleConnectedPositionStrategyOrigin(){return this.origin instanceof V2?this.origin.elementRef:this.origin}_attachOverlay(){this._overlayRef?this._overlayRef.getConfig().hasBackdrop=this.hasBackdrop:this._createOverlay(),this._overlayRef.hasAttached()||this._overlayRef.attach(this._templatePortal),this.hasBackdrop?this._backdropSubscription=this._overlayRef.backdropClick().subscribe(e=>{this.backdropClick.emit(e)}):this._backdropSubscription.unsubscribe(),this._positionSubscription.unsubscribe(),this.positionChange.observers.length>0&&(this._positionSubscription=this._position.positionChanges.pipe(_R(()=>this.positionChange.observers.length>0)).subscribe(e=>{this.positionChange.emit(e),0===this.positionChange.observers.length&&this._positionSubscription.unsubscribe()}))}_detachOverlay(){this._overlayRef&&this._overlayRef.detach(),this._backdropSubscription.unsubscribe(),this._positionSubscription.unsubscribe()}}return t.\u0275fac=function(e){return new(e||t)(z(ka),z(Fr),z(ro),z(z2),z(sa,8))},t.\u0275dir=Ge({type:t,selectors:[["","cdk-connected-overlay",""],["","connected-overlay",""],["","cdkConnectedOverlay",""]],inputs:{origin:["cdkConnectedOverlayOrigin","origin"],positions:["cdkConnectedOverlayPositions","positions"],positionStrategy:["cdkConnectedOverlayPositionStrategy","positionStrategy"],offsetX:["cdkConnectedOverlayOffsetX","offsetX"],offsetY:["cdkConnectedOverlayOffsetY","offsetY"],width:["cdkConnectedOverlayWidth","width"],height:["cdkConnectedOverlayHeight","height"],minWidth:["cdkConnectedOverlayMinWidth","minWidth"],minHeight:["cdkConnectedOverlayMinHeight","minHeight"],backdropClass:["cdkConnectedOverlayBackdropClass","backdropClass"],panelClass:["cdkConnectedOverlayPanelClass","panelClass"],viewportMargin:["cdkConnectedOverlayViewportMargin","viewportMargin"],scrollStrategy:["cdkConnectedOverlayScrollStrategy","scrollStrategy"],open:["cdkConnectedOverlayOpen","open"],disableClose:["cdkConnectedOverlayDisableClose","disableClose"],transformOriginSelector:["cdkConnectedOverlayTransformOriginOn","transformOriginSelector"],hasBackdrop:["cdkConnectedOverlayHasBackdrop","hasBackdrop"],lockPosition:["cdkConnectedOverlayLockPosition","lockPosition"],flexibleDimensions:["cdkConnectedOverlayFlexibleDimensions","flexibleDimensions"],growAfterOpen:["cdkConnectedOverlayGrowAfterOpen","growAfterOpen"],push:["cdkConnectedOverlayPush","push"]},outputs:{backdropClick:"backdropClick",positionChange:"positionChange",attach:"attach",detach:"detach",overlayKeydown:"overlayKeydown",overlayOutsideClick:"overlayOutsideClick"},exportAs:["cdkConnectedOverlay"],standalone:!0,features:[Hi]}),t})();const v7={provide:z2,deps:[ka],useFactory:function y7(t){return()=>t.scrollStrategies.reposition()}};let Xf=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=cn({type:t}),t.\u0275inj=nn({providers:[ka,v7],imports:[zf,qf,nE,nE]}),t})();const C7={provide:new vt("mat-menu-scroll-strategy"),deps:[ka],useFactory:function w7(t){return()=>t.scrollStrategies.reposition()}};let M7=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=cn({type:t}),t.\u0275inj=nn({providers:[C7],imports:[Ia,oi,ep,Xf,ip,oi]}),t})();function j2(t){return new mt(3e3,!1)}function o$(){return typeof window<"u"&&typeof window.document<"u"}function oE(){return typeof process<"u"&&"[object process]"==={}.toString.call(process)}function rp(t){switch(t.length){case 0:return new u0;case 1:return t[0];default:return new M2(t)}}function H2(t,n,e,i,r=new Map,s=new Map){const d=[],_=[];let w=-1,S=null;if(i.forEach(I=>{const L=I.get("offset"),H=L==w,Y=H&&S||new Map;I.forEach((ae,ve)=>{let Be=ve,$e=ae;if("offset"!==ve)switch(Be=n.normalizePropertyName(Be,d),$e){case"!":$e=r.get(ve);break;case Dd:$e=s.get(ve);break;default:$e=n.normalizeStyleValue(ve,Be,$e,d)}Y.set(Be,$e)}),H||_.push(Y),S=Y,w=L}),d.length)throw function q7(t){return new mt(3502,!1)}();return _}function sE(t,n,e,i){switch(n){case"start":t.onStart(()=>i(e&&aE(e,"start",t)));break;case"done":t.onDone(()=>i(e&&aE(e,"done",t)));break;case"destroy":t.onDestroy(()=>i(e&&aE(e,"destroy",t)))}}function aE(t,n,e){const s=lE(t.element,t.triggerName,t.fromState,t.toState,n||t.phaseName,e.totalTime??t.totalTime,!!e.disabled),d=t._data;return null!=d&&(s._data=d),s}function lE(t,n,e,i,r="",s=0,d){return{element:t,triggerName:n,fromState:e,toState:i,phaseName:r,totalTime:s,disabled:!!d}}function Ja(t,n,e){let i=t.get(n);return i||t.set(n,i=e),i}function $2(t){const n=t.indexOf(":");return[t.substring(1,n),t.slice(n+1)]}let cE=(t,n)=>!1,W2=(t,n,e)=>[],q2=null;function uE(t){const n=t.parentNode||t.host;return n===q2?null:n}(oE()||typeof Element<"u")&&(o$()?(q2=(()=>document.documentElement)(),cE=(t,n)=>{for(;n;){if(n===t)return!0;n=uE(n)}return!1}):cE=(t,n)=>t.contains(n),W2=(t,n,e)=>{if(e)return Array.from(t.querySelectorAll(n));const i=t.querySelector(n);return i?[i]:[]});let Yf=null,Z2=!1;const X2=cE,Y2=W2;let K2=(()=>{class t{validateStyleProperty(e){return function a$(t){Yf||(Yf=function l$(){return typeof document<"u"?document.body:null}()||{},Z2=!!Yf.style&&"WebkitAppearance"in Yf.style);let n=!0;return Yf.style&&!function s$(t){return"ebkit"==t.substring(1,6)}(t)&&(n=t in Yf.style,!n&&Z2&&(n="Webkit"+t.charAt(0).toUpperCase()+t.slice(1)in Yf.style)),n}(e)}matchesElement(e,i){return!1}containsElement(e,i){return X2(e,i)}getParentElement(e){return uE(e)}query(e,i,r){return Y2(e,i,r)}computeStyle(e,i,r){return r||""}animate(e,i,r,s,d,_=[],w){return new u0(r,s)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=rt({token:t,factory:t.\u0275fac}),t})(),dE=(()=>{class t{}return t.NOOP=new K2,t})();const hE="ng-enter",mC="ng-leave",gC="ng-trigger",_C=".ng-trigger",J2="ng-animating",pE=".ng-animating";function Ed(t){if("number"==typeof t)return t;const n=t.match(/^(-?[\.\d]+)(m?s)/);return!n||n.length<2?0:fE(parseFloat(n[1]),n[2])}function fE(t,n){return"s"===n?1e3*t:t}function yC(t,n,e){return t.hasOwnProperty("duration")?t:function d$(t,n,e){let r,s=0,d="";if("string"==typeof t){const _=t.match(/^(-?[\.\d]+)(m?s)(?:\s+(-?[\.\d]+)(m?s))?(?:\s+([-a-z]+(?:\(.+?\))?))?$/i);if(null===_)return n.push(j2()),{duration:0,delay:0,easing:""};r=fE(parseFloat(_[1]),_[2]);const w=_[3];null!=w&&(s=fE(parseFloat(w),_[4]));const S=_[5];S&&(d=S)}else r=t;if(!e){let _=!1,w=n.length;r<0&&(n.push(function S7(){return new mt(3100,!1)}()),_=!0),s<0&&(n.push(function D7(){return new mt(3101,!1)}()),_=!0),_&&n.splice(w,0,j2())}return{duration:r,delay:s,easing:d}}(t,n,e)}function _0(t,n={}){return Object.keys(t).forEach(e=>{n[e]=t[e]}),n}function eF(t){const n=new Map;return Object.keys(t).forEach(e=>{n.set(e,t[e])}),n}function op(t,n=new Map,e){if(e)for(let[i,r]of e)n.set(i,r);for(let[i,r]of t)n.set(i,r);return n}function nF(t,n,e){return e?n+":"+e+";":""}function iF(t){let n="";for(let e=0;e{const s=gE(r);e&&!e.has(r)&&e.set(r,t.style[s]),t.style[s]=i}),oE()&&iF(t))}function Kf(t,n){t.style&&(n.forEach((e,i)=>{const r=gE(i);t.style[r]=""}),oE()&&iF(t))}function y0(t){return Array.isArray(t)?1==t.length?t[0]:w2(t):t}const mE=new RegExp("{{\\s*(.+?)\\s*}}","g");function rF(t){let n=[];if("string"==typeof t){let e;for(;e=mE.exec(t);)n.push(e[1]);mE.lastIndex=0}return n}function v0(t,n,e){const i=t.toString(),r=i.replace(mE,(s,d)=>{let _=n[d];return null==_&&(e.push(function T7(t){return new mt(3003,!1)}()),_=""),_.toString()});return r==i?t:r}function vC(t){const n=[];let e=t.next();for(;!e.done;)n.push(e.value),e=t.next();return n}const f$=/-+([a-z0-9])/g;function gE(t){return t.replace(f$,(...n)=>n[1].toUpperCase())}function m$(t){return t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function el(t,n,e){switch(n.type){case 7:return t.visitTrigger(n,e);case 0:return t.visitState(n,e);case 1:return t.visitTransition(n,e);case 2:return t.visitSequence(n,e);case 3:return t.visitGroup(n,e);case 4:return t.visitAnimate(n,e);case 5:return t.visitKeyframes(n,e);case 6:return t.visitStyle(n,e);case 8:return t.visitReference(n,e);case 9:return t.visitAnimateChild(n,e);case 10:return t.visitAnimateRef(n,e);case 11:return t.visitQuery(n,e);case 12:return t.visitStagger(n,e);default:throw function A7(t){return new mt(3004,!1)}()}}function oF(t,n){return window.getComputedStyle(t)[n]}function x$(t,n){const e=[];return"string"==typeof t?t.split(/\s*,\s*/).forEach(i=>function w$(t,n,e){if(":"==t[0]){const w=function C$(t,n){switch(t){case":enter":return"void => *";case":leave":return"* => void";case":increment":return(e,i)=>parseFloat(i)>parseFloat(e);case":decrement":return(e,i)=>parseFloat(i) *"}}(t,e);if("function"==typeof w)return void n.push(w);t=w}const i=t.match(/^(\*|[-\w]+)\s*()\s*(\*|[-\w]+)$/);if(null==i||i.length<4)return e.push(function U7(t){return new mt(3015,!1)}()),n;const r=i[1],s=i[2],d=i[3];n.push(sF(r,d));"<"==s[0]&&!("*"==r&&"*"==d)&&n.push(sF(d,r))}(i,e,n)):e.push(t),e}const CC=new Set(["true","1"]),MC=new Set(["false","0"]);function sF(t,n){const e=CC.has(t)||MC.has(t),i=CC.has(n)||MC.has(n);return(r,s)=>{let d="*"==t||t==r,_="*"==n||n==s;return!d&&e&&"boolean"==typeof r&&(d=r?CC.has(t):MC.has(t)),!_&&i&&"boolean"==typeof s&&(_=s?CC.has(n):MC.has(n)),d&&_}}const M$=new RegExp("s*:selfs*,?","g");function _E(t,n,e,i){return new S$(t).build(n,e,i)}class S${constructor(n){this._driver=n}build(n,e,i){const r=new T$(e);return this._resetContextStyleTimingState(r),el(this,y0(n),r)}_resetContextStyleTimingState(n){n.currentQuerySelector="",n.collectedStyles=new Map,n.collectedStyles.set("",new Map),n.currentTime=0}visitTrigger(n,e){let i=e.queryCount=0,r=e.depCount=0;const s=[],d=[];return"@"==n.name.charAt(0)&&e.errors.push(function k7(){return new mt(3006,!1)}()),n.definitions.forEach(_=>{if(this._resetContextStyleTimingState(e),0==_.type){const w=_,S=w.name;S.toString().split(/\s*,\s*/).forEach(I=>{w.name=I,s.push(this.visitState(w,e))}),w.name=S}else if(1==_.type){const w=this.visitTransition(_,e);i+=w.queryCount,r+=w.depCount,d.push(w)}else e.errors.push(function R7(){return new mt(3007,!1)}())}),{type:7,name:n.name,states:s,transitions:d,queryCount:i,depCount:r,options:null}}visitState(n,e){const i=this.visitStyle(n.styles,e),r=n.options&&n.options.params||null;if(i.containsDynamicStyles){const s=new Set,d=r||{};i.styles.forEach(_=>{_ instanceof Map&&_.forEach(w=>{rF(w).forEach(S=>{d.hasOwnProperty(S)||s.add(S)})})}),s.size&&(vC(s.values()),e.errors.push(function P7(t,n){return new mt(3008,!1)}()))}return{type:0,name:n.name,style:i,options:r?{params:r}:null}}visitTransition(n,e){e.queryCount=0,e.depCount=0;const i=el(this,y0(n.animation),e);return{type:1,matchers:x$(n.expr,e.errors),animation:i,queryCount:e.queryCount,depCount:e.depCount,options:Qf(n.options)}}visitSequence(n,e){return{type:2,steps:n.steps.map(i=>el(this,i,e)),options:Qf(n.options)}}visitGroup(n,e){const i=e.currentTime;let r=0;const s=n.steps.map(d=>{e.currentTime=i;const _=el(this,d,e);return r=Math.max(r,e.currentTime),_});return e.currentTime=r,{type:3,steps:s,options:Qf(n.options)}}visitAnimate(n,e){const i=function I$(t,n){if(t.hasOwnProperty("duration"))return t;if("number"==typeof t)return yE(yC(t,n).duration,0,"");const e=t;if(e.split(/\s+/).some(s=>"{"==s.charAt(0)&&"{"==s.charAt(1))){const s=yE(0,0,"");return s.dynamic=!0,s.strValue=e,s}const r=yC(e,n);return yE(r.duration,r.delay,r.easing)}(n.timings,e.errors);e.currentAnimateTimings=i;let r,s=n.styles?n.styles:Dn({});if(5==s.type)r=this.visitKeyframes(s,e);else{let d=n.styles,_=!1;if(!d){_=!0;const S={};i.easing&&(S.easing=i.easing),d=Dn(S)}e.currentTime+=i.duration+i.delay;const w=this.visitStyle(d,e);w.isEmptyStep=_,r=w}return e.currentAnimateTimings=null,{type:4,timings:i,style:r,options:null}}visitStyle(n,e){const i=this._makeStyleAst(n,e);return this._validateStyleAst(i,e),i}_makeStyleAst(n,e){const i=[],r=Array.isArray(n.styles)?n.styles:[n.styles];for(let _ of r)"string"==typeof _?_===Dd?i.push(_):e.errors.push(new mt(3002,!1)):i.push(eF(_));let s=!1,d=null;return i.forEach(_=>{if(_ instanceof Map&&(_.has("easing")&&(d=_.get("easing"),_.delete("easing")),!s))for(let w of _.values())if(w.toString().indexOf("{{")>=0){s=!0;break}}),{type:6,styles:i,easing:d,offset:n.offset,containsDynamicStyles:s,options:null}}_validateStyleAst(n,e){const i=e.currentAnimateTimings;let r=e.currentTime,s=e.currentTime;i&&s>0&&(s-=i.duration+i.delay),n.styles.forEach(d=>{"string"!=typeof d&&d.forEach((_,w)=>{const S=e.collectedStyles.get(e.currentQuerySelector),I=S.get(w);let L=!0;I&&(s!=r&&s>=I.startTime&&r<=I.endTime&&(e.errors.push(function F7(t,n,e,i,r){return new mt(3010,!1)}()),L=!1),s=I.startTime),L&&S.set(w,{startTime:s,endTime:r}),e.options&&function p$(t,n,e){const i=n.params||{},r=rF(t);r.length&&r.forEach(s=>{i.hasOwnProperty(s)||e.push(function E7(t){return new mt(3001,!1)}())})}(_,e.options,e.errors)})})}visitKeyframes(n,e){const i={type:5,styles:[],options:null};if(!e.currentAnimateTimings)return e.errors.push(function L7(){return new mt(3011,!1)}()),i;let s=0;const d=[];let _=!1,w=!1,S=0;const I=n.steps.map($e=>{const It=this._makeStyleAst($e,e);let _t=null!=It.offset?It.offset:function A$(t){if("string"==typeof t)return null;let n=null;if(Array.isArray(t))t.forEach(e=>{if(e instanceof Map&&e.has("offset")){const i=e;n=parseFloat(i.get("offset")),i.delete("offset")}});else if(t instanceof Map&&t.has("offset")){const e=t;n=parseFloat(e.get("offset")),e.delete("offset")}return n}(It.styles),dn=0;return null!=_t&&(s++,dn=It.offset=_t),w=w||dn<0||dn>1,_=_||dn0&&s{const _t=H>0?It==Y?1:H*It:d[It],dn=_t*Be;e.currentTime=ae+ve.delay+dn,ve.duration=dn,this._validateStyleAst($e,e),$e.offset=_t,i.styles.push($e)}),i}visitReference(n,e){return{type:8,animation:el(this,y0(n.animation),e),options:Qf(n.options)}}visitAnimateChild(n,e){return e.depCount++,{type:9,options:Qf(n.options)}}visitAnimateRef(n,e){return{type:10,animation:this.visitReference(n.animation,e),options:Qf(n.options)}}visitQuery(n,e){const i=e.currentQuerySelector,r=n.options||{};e.queryCount++,e.currentQuery=n;const[s,d]=function D$(t){const n=!!t.split(/\s*,\s*/).find(e=>":self"==e);return n&&(t=t.replace(M$,"")),t=t.replace(/@\*/g,_C).replace(/@\w+/g,e=>_C+"-"+e.slice(1)).replace(/:animating/g,pE),[t,n]}(n.selector);e.currentQuerySelector=i.length?i+" "+s:s,Ja(e.collectedStyles,e.currentQuerySelector,new Map);const _=el(this,y0(n.animation),e);return e.currentQuery=null,e.currentQuerySelector=i,{type:11,selector:s,limit:r.limit||0,optional:!!r.optional,includeSelf:d,animation:_,originalSelector:n.selector,options:Qf(n.options)}}visitStagger(n,e){e.currentQuery||e.errors.push(function V7(){return new mt(3013,!1)}());const i="full"===n.timings?{duration:0,delay:0,easing:"full"}:yC(n.timings,e.errors,!0);return{type:12,animation:el(this,y0(n.animation),e),timings:i,options:null}}}class T${constructor(n){this.errors=n,this.queryCount=0,this.depCount=0,this.currentTransition=null,this.currentQuery=null,this.currentQuerySelector=null,this.currentAnimateTimings=null,this.currentTime=0,this.collectedStyles=new Map,this.options=null,this.unsupportedCSSPropertiesFound=new Set}}function Qf(t){return t?(t=_0(t)).params&&(t.params=function E$(t){return t?_0(t):null}(t.params)):t={},t}function yE(t,n,e){return{duration:t,delay:n,easing:e}}function vE(t,n,e,i,r,s,d=null,_=!1){return{type:1,element:t,keyframes:n,preStyleProps:e,postStyleProps:i,duration:r,delay:s,totalTime:r+s,easing:d,subTimeline:_}}class SC{constructor(){this._map=new Map}get(n){return this._map.get(n)||[]}append(n,e){let i=this._map.get(n);i||this._map.set(n,i=[]),i.push(...e)}has(n){return this._map.has(n)}clear(){this._map.clear()}}const P$=new RegExp(":enter","g"),F$=new RegExp(":leave","g");function bE(t,n,e,i,r,s=new Map,d=new Map,_,w,S=[]){return(new L$).buildKeyframes(t,n,e,i,r,s,d,_,w,S)}class L${buildKeyframes(n,e,i,r,s,d,_,w,S,I=[]){S=S||new SC;const L=new xE(n,e,S,r,s,I,[]);L.options=w;const H=w.delay?Ed(w.delay):0;L.currentTimeline.delayNextStep(H),L.currentTimeline.setStyles([d],null,L.errors,w),el(this,i,L);const Y=L.timelines.filter(ae=>ae.containsAnimation());if(Y.length&&_.size){let ae;for(let ve=Y.length-1;ve>=0;ve--){const Be=Y[ve];if(Be.element===e){ae=Be;break}}ae&&!ae.allowOnlyTimelineStyles()&&ae.setStyles([_],null,L.errors,w)}return Y.length?Y.map(ae=>ae.buildKeyframes()):[vE(e,[],[],[],0,H,"",!1)]}visitTrigger(n,e){}visitState(n,e){}visitTransition(n,e){}visitAnimateChild(n,e){const i=e.subInstructions.get(e.element);if(i){const r=e.createSubContext(n.options),s=e.currentTimeline.currentTime,d=this._visitSubInstructions(i,r,r.options);s!=d&&e.transformIntoNewTimeline(d)}e.previousNode=n}visitAnimateRef(n,e){const i=e.createSubContext(n.options);i.transformIntoNewTimeline(),this._applyAnimationRefDelays([n.options,n.animation.options],e,i),this.visitReference(n.animation,i),e.transformIntoNewTimeline(i.currentTimeline.currentTime),e.previousNode=n}_applyAnimationRefDelays(n,e,i){for(const r of n){const s=r?.delay;if(s){const d="number"==typeof s?s:Ed(v0(s,r?.params??{},e.errors));i.delayNextStep(d)}}}_visitSubInstructions(n,e,i){let s=e.currentTimeline.currentTime;const d=null!=i.duration?Ed(i.duration):null,_=null!=i.delay?Ed(i.delay):null;return 0!==d&&n.forEach(w=>{const S=e.appendInstructionToTimeline(w,d,_);s=Math.max(s,S.duration+S.delay)}),s}visitReference(n,e){e.updateOptions(n.options,!0),el(this,n.animation,e),e.previousNode=n}visitSequence(n,e){const i=e.subContextCount;let r=e;const s=n.options;if(s&&(s.params||s.delay)&&(r=e.createSubContext(s),r.transformIntoNewTimeline(),null!=s.delay)){6==r.previousNode.type&&(r.currentTimeline.snapshotCurrentStyles(),r.previousNode=DC);const d=Ed(s.delay);r.delayNextStep(d)}n.steps.length&&(n.steps.forEach(d=>el(this,d,r)),r.currentTimeline.applyStylesToKeyframe(),r.subContextCount>i&&r.transformIntoNewTimeline()),e.previousNode=n}visitGroup(n,e){const i=[];let r=e.currentTimeline.currentTime;const s=n.options&&n.options.delay?Ed(n.options.delay):0;n.steps.forEach(d=>{const _=e.createSubContext(n.options);s&&_.delayNextStep(s),el(this,d,_),r=Math.max(r,_.currentTimeline.currentTime),i.push(_.currentTimeline)}),i.forEach(d=>e.currentTimeline.mergeTimelineCollectedStyles(d)),e.transformIntoNewTimeline(r),e.previousNode=n}_visitTiming(n,e){if(n.dynamic){const i=n.strValue;return yC(e.params?v0(i,e.params,e.errors):i,e.errors)}return{duration:n.duration,delay:n.delay,easing:n.easing}}visitAnimate(n,e){const i=e.currentAnimateTimings=this._visitTiming(n.timings,e),r=e.currentTimeline;i.delay&&(e.incrementTime(i.delay),r.snapshotCurrentStyles());const s=n.style;5==s.type?this.visitKeyframes(s,e):(e.incrementTime(i.duration),this.visitStyle(s,e),r.applyStylesToKeyframe()),e.currentAnimateTimings=null,e.previousNode=n}visitStyle(n,e){const i=e.currentTimeline,r=e.currentAnimateTimings;!r&&i.hasCurrentStyleProperties()&&i.forwardFrame();const s=r&&r.easing||n.easing;n.isEmptyStep?i.applyEmptyStep(s):i.setStyles(n.styles,s,e.errors,e.options),e.previousNode=n}visitKeyframes(n,e){const i=e.currentAnimateTimings,r=e.currentTimeline.duration,s=i.duration,_=e.createSubContext().currentTimeline;_.easing=i.easing,n.styles.forEach(w=>{_.forwardTime((w.offset||0)*s),_.setStyles(w.styles,w.easing,e.errors,e.options),_.applyStylesToKeyframe()}),e.currentTimeline.mergeTimelineCollectedStyles(_),e.transformIntoNewTimeline(r+s),e.previousNode=n}visitQuery(n,e){const i=e.currentTimeline.currentTime,r=n.options||{},s=r.delay?Ed(r.delay):0;s&&(6===e.previousNode.type||0==i&&e.currentTimeline.hasCurrentStyleProperties())&&(e.currentTimeline.snapshotCurrentStyles(),e.previousNode=DC);let d=i;const _=e.invokeQuery(n.selector,n.originalSelector,n.limit,n.includeSelf,!!r.optional,e.errors);e.currentQueryTotal=_.length;let w=null;_.forEach((S,I)=>{e.currentQueryIndex=I;const L=e.createSubContext(n.options,S);s&&L.delayNextStep(s),S===e.element&&(w=L.currentTimeline),el(this,n.animation,L),L.currentTimeline.applyStylesToKeyframe(),d=Math.max(d,L.currentTimeline.currentTime)}),e.currentQueryIndex=0,e.currentQueryTotal=0,e.transformIntoNewTimeline(d),w&&(e.currentTimeline.mergeTimelineCollectedStyles(w),e.currentTimeline.snapshotCurrentStyles()),e.previousNode=n}visitStagger(n,e){const i=e.parentContext,r=e.currentTimeline,s=n.timings,d=Math.abs(s.duration),_=d*(e.currentQueryTotal-1);let w=d*e.currentQueryIndex;switch(s.duration<0?"reverse":s.easing){case"reverse":w=_-w;break;case"full":w=i.currentStaggerTime}const I=e.currentTimeline;w&&I.delayNextStep(w);const L=I.currentTime;el(this,n.animation,e),e.previousNode=n,i.currentStaggerTime=r.currentTime-L+(r.startTime-i.currentTimeline.startTime)}}const DC={};class xE{constructor(n,e,i,r,s,d,_,w){this._driver=n,this.element=e,this.subInstructions=i,this._enterClassName=r,this._leaveClassName=s,this.errors=d,this.timelines=_,this.parentContext=null,this.currentAnimateTimings=null,this.previousNode=DC,this.subContextCount=0,this.options={},this.currentQueryIndex=0,this.currentQueryTotal=0,this.currentStaggerTime=0,this.currentTimeline=w||new EC(this._driver,e,0),_.push(this.currentTimeline)}get params(){return this.options.params}updateOptions(n,e){if(!n)return;const i=n;let r=this.options;null!=i.duration&&(r.duration=Ed(i.duration)),null!=i.delay&&(r.delay=Ed(i.delay));const s=i.params;if(s){let d=r.params;d||(d=this.options.params={}),Object.keys(s).forEach(_=>{(!e||!d.hasOwnProperty(_))&&(d[_]=v0(s[_],d,this.errors))})}}_copyOptions(){const n={};if(this.options){const e=this.options.params;if(e){const i=n.params={};Object.keys(e).forEach(r=>{i[r]=e[r]})}}return n}createSubContext(n=null,e,i){const r=e||this.element,s=new xE(this._driver,r,this.subInstructions,this._enterClassName,this._leaveClassName,this.errors,this.timelines,this.currentTimeline.fork(r,i||0));return s.previousNode=this.previousNode,s.currentAnimateTimings=this.currentAnimateTimings,s.options=this._copyOptions(),s.updateOptions(n),s.currentQueryIndex=this.currentQueryIndex,s.currentQueryTotal=this.currentQueryTotal,s.parentContext=this,this.subContextCount++,s}transformIntoNewTimeline(n){return this.previousNode=DC,this.currentTimeline=this.currentTimeline.fork(this.element,n),this.timelines.push(this.currentTimeline),this.currentTimeline}appendInstructionToTimeline(n,e,i){const r={duration:e??n.duration,delay:this.currentTimeline.currentTime+(i??0)+n.delay,easing:""},s=new B$(this._driver,n.element,n.keyframes,n.preStyleProps,n.postStyleProps,r,n.stretchStartingKeyframe);return this.timelines.push(s),r}incrementTime(n){this.currentTimeline.forwardTime(this.currentTimeline.duration+n)}delayNextStep(n){n>0&&this.currentTimeline.delayNextStep(n)}invokeQuery(n,e,i,r,s,d){let _=[];if(r&&_.push(this.element),n.length>0){n=(n=n.replace(P$,"."+this._enterClassName)).replace(F$,"."+this._leaveClassName);let S=this._driver.query(this.element,n,1!=i);0!==i&&(S=i<0?S.slice(S.length+i,S.length):S.slice(0,i)),_.push(...S)}return!s&&0==_.length&&d.push(function G7(t){return new mt(3014,!1)}()),_}}class EC{constructor(n,e,i,r){this._driver=n,this.element=e,this.startTime=i,this._elementTimelineStylesLookup=r,this.duration=0,this._previousKeyframe=new Map,this._currentKeyframe=new Map,this._keyframes=new Map,this._styleSummary=new Map,this._localTimelineStyles=new Map,this._pendingStyles=new Map,this._backFill=new Map,this._currentEmptyStepKeyframe=null,this._elementTimelineStylesLookup||(this._elementTimelineStylesLookup=new Map),this._globalTimelineStyles=this._elementTimelineStylesLookup.get(e),this._globalTimelineStyles||(this._globalTimelineStyles=this._localTimelineStyles,this._elementTimelineStylesLookup.set(e,this._localTimelineStyles)),this._loadKeyframe()}containsAnimation(){switch(this._keyframes.size){case 0:return!1;case 1:return this.hasCurrentStyleProperties();default:return!0}}hasCurrentStyleProperties(){return this._currentKeyframe.size>0}get currentTime(){return this.startTime+this.duration}delayNextStep(n){const e=1===this._keyframes.size&&this._pendingStyles.size;this.duration||e?(this.forwardTime(this.currentTime+n),e&&this.snapshotCurrentStyles()):this.startTime+=n}fork(n,e){return this.applyStylesToKeyframe(),new EC(this._driver,n,e||this.currentTime,this._elementTimelineStylesLookup)}_loadKeyframe(){this._currentKeyframe&&(this._previousKeyframe=this._currentKeyframe),this._currentKeyframe=this._keyframes.get(this.duration),this._currentKeyframe||(this._currentKeyframe=new Map,this._keyframes.set(this.duration,this._currentKeyframe))}forwardFrame(){this.duration+=1,this._loadKeyframe()}forwardTime(n){this.applyStylesToKeyframe(),this.duration=n,this._loadKeyframe()}_updateStyle(n,e){this._localTimelineStyles.set(n,e),this._globalTimelineStyles.set(n,e),this._styleSummary.set(n,{time:this.currentTime,value:e})}allowOnlyTimelineStyles(){return this._currentEmptyStepKeyframe!==this._currentKeyframe}applyEmptyStep(n){n&&this._previousKeyframe.set("easing",n);for(let[e,i]of this._globalTimelineStyles)this._backFill.set(e,i||Dd),this._currentKeyframe.set(e,Dd);this._currentEmptyStepKeyframe=this._currentKeyframe}setStyles(n,e,i,r){e&&this._previousKeyframe.set("easing",e);const s=r&&r.params||{},d=function N$(t,n){const e=new Map;let i;return t.forEach(r=>{if("*"===r){i=i||n.keys();for(let s of i)e.set(s,Dd)}else op(r,e)}),e}(n,this._globalTimelineStyles);for(let[_,w]of d){const S=v0(w,s,i);this._pendingStyles.set(_,S),this._localTimelineStyles.has(_)||this._backFill.set(_,this._globalTimelineStyles.get(_)??Dd),this._updateStyle(_,S)}}applyStylesToKeyframe(){0!=this._pendingStyles.size&&(this._pendingStyles.forEach((n,e)=>{this._currentKeyframe.set(e,n)}),this._pendingStyles.clear(),this._localTimelineStyles.forEach((n,e)=>{this._currentKeyframe.has(e)||this._currentKeyframe.set(e,n)}))}snapshotCurrentStyles(){for(let[n,e]of this._localTimelineStyles)this._pendingStyles.set(n,e),this._updateStyle(n,e)}getFinalKeyframe(){return this._keyframes.get(this.duration)}get properties(){const n=[];for(let e in this._currentKeyframe)n.push(e);return n}mergeTimelineCollectedStyles(n){n._styleSummary.forEach((e,i)=>{const r=this._styleSummary.get(i);(!r||e.time>r.time)&&this._updateStyle(i,e.value)})}buildKeyframes(){this.applyStylesToKeyframe();const n=new Set,e=new Set,i=1===this._keyframes.size&&0===this.duration;let r=[];this._keyframes.forEach((_,w)=>{const S=op(_,new Map,this._backFill);S.forEach((I,L)=>{"!"===I?n.add(L):I===Dd&&e.add(L)}),i||S.set("offset",w/this.duration),r.push(S)});const s=n.size?vC(n.values()):[],d=e.size?vC(e.values()):[];if(i){const _=r[0],w=new Map(_);_.set("offset",0),w.set("offset",1),r=[_,w]}return vE(this.element,r,s,d,this.duration,this.startTime,this.easing,!1)}}class B$ extends EC{constructor(n,e,i,r,s,d,_=!1){super(n,e,d.delay),this.keyframes=i,this.preStyleProps=r,this.postStyleProps=s,this._stretchStartingKeyframe=_,this.timings={duration:d.duration,delay:d.delay,easing:d.easing}}containsAnimation(){return this.keyframes.length>1}buildKeyframes(){let n=this.keyframes,{delay:e,duration:i,easing:r}=this.timings;if(this._stretchStartingKeyframe&&e){const s=[],d=i+e,_=e/d,w=op(n[0]);w.set("offset",0),s.push(w);const S=op(n[0]);S.set("offset",cF(_)),s.push(S);const I=n.length-1;for(let L=1;L<=I;L++){let H=op(n[L]);const Y=H.get("offset");H.set("offset",cF((e+Y*i)/d)),s.push(H)}i=d,e=0,r="",n=s}return vE(this.element,n,this.preStyleProps,this.postStyleProps,i,e,r,!0)}}function cF(t,n=3){const e=Math.pow(10,n-1);return Math.round(t*e)/e}class wE{}const z$=new Set(["width","height","minWidth","minHeight","maxWidth","maxHeight","left","top","bottom","right","fontSize","outlineWidth","outlineOffset","paddingTop","paddingLeft","paddingBottom","paddingRight","marginTop","marginLeft","marginBottom","marginRight","borderRadius","borderWidth","borderTopWidth","borderLeftWidth","borderRightWidth","borderBottomWidth","textIndent","perspective"]);class V$ extends wE{normalizePropertyName(n,e){return gE(n)}normalizeStyleValue(n,e,i,r){let s="";const d=i.toString().trim();if(z$.has(e)&&0!==i&&"0"!==i)if("number"==typeof i)s="px";else{const _=i.match(/^[+-]?[\d\.]+([a-z]*)$/);_&&0==_[1].length&&r.push(function I7(t,n){return new mt(3005,!1)}())}return d+s}}function uF(t,n,e,i,r,s,d,_,w,S,I,L,H){return{type:0,element:t,triggerName:n,isRemovalTransition:r,fromState:e,fromStyles:s,toState:i,toStyles:d,timelines:_,queriedElements:w,preStyleProps:S,postStyleProps:I,totalTime:L,errors:H}}const CE={};class dF{constructor(n,e,i){this._triggerName=n,this.ast=e,this._stateStyles=i}match(n,e,i,r){return function G$(t,n,e,i,r){return t.some(s=>s(n,e,i,r))}(this.ast.matchers,n,e,i,r)}buildStyles(n,e,i){let r=this._stateStyles.get("*");return void 0!==n&&(r=this._stateStyles.get(n?.toString())||r),r?r.buildStyles(e,i):new Map}build(n,e,i,r,s,d,_,w,S,I){const L=[],H=this.ast.options&&this.ast.options.params||CE,ae=this.buildStyles(i,_&&_.params||CE,L),ve=w&&w.params||CE,Be=this.buildStyles(r,ve,L),$e=new Set,It=new Map,_t=new Map,dn="void"===r,Qi={params:U$(ve,H),delay:this.ast.options?.delay},ar=I?[]:bE(n,e,this.ast.animation,s,d,ae,Be,Qi,S,L);let Gs=0;if(ar.forEach(Nd=>{Gs=Math.max(Nd.duration+Nd.delay,Gs)}),L.length)return uF(e,this._triggerName,i,r,dn,ae,Be,[],[],It,_t,Gs,L);ar.forEach(Nd=>{const zd=Nd.element,HB=Ja(It,zd,new Set);Nd.preStyleProps.forEach(sm=>HB.add(sm));const G0=Ja(_t,zd,new Set);Nd.postStyleProps.forEach(sm=>G0.add(sm)),zd!==e&&$e.add(zd)});const Bd=vC($e.values());return uF(e,this._triggerName,i,r,dn,ae,Be,ar,Bd,It,_t,Gs)}}function U$(t,n){const e=_0(n);for(const i in t)t.hasOwnProperty(i)&&null!=t[i]&&(e[i]=t[i]);return e}class j${constructor(n,e,i){this.styles=n,this.defaultParams=e,this.normalizer=i}buildStyles(n,e){const i=new Map,r=_0(this.defaultParams);return Object.keys(n).forEach(s=>{const d=n[s];null!==d&&(r[s]=d)}),this.styles.styles.forEach(s=>{"string"!=typeof s&&s.forEach((d,_)=>{d&&(d=v0(d,r,e));const w=this.normalizer.normalizePropertyName(_,e);d=this.normalizer.normalizeStyleValue(_,w,d,e),i.set(_,d)})}),i}}class $${constructor(n,e,i){this.name=n,this.ast=e,this._normalizer=i,this.transitionFactories=[],this.states=new Map,e.states.forEach(r=>{this.states.set(r.name,new j$(r.style,r.options&&r.options.params||{},i))}),hF(this.states,"true","1"),hF(this.states,"false","0"),e.transitions.forEach(r=>{this.transitionFactories.push(new dF(n,r,this.states))}),this.fallbackTransition=function W$(t,n,e){return new dF(t,{type:1,animation:{type:2,steps:[],options:null},matchers:[(d,_)=>!0],options:null,queryCount:0,depCount:0},n)}(n,this.states)}get containsQueries(){return this.ast.queryCount>0}matchTransition(n,e,i,r){return this.transitionFactories.find(d=>d.match(n,e,i,r))||null}matchStyles(n,e,i){return this.fallbackTransition.buildStyles(n,e,i)}}function hF(t,n,e){t.has(n)?t.has(e)||t.set(e,t.get(n)):t.has(e)&&t.set(n,t.get(e))}const q$=new SC;class Z${constructor(n,e,i){this.bodyNode=n,this._driver=e,this._normalizer=i,this._animations=new Map,this._playersById=new Map,this.players=[]}register(n,e){const i=[],s=_E(this._driver,e,i,[]);if(i.length)throw function Z7(t){return new mt(3503,!1)}();this._animations.set(n,s)}_buildPlayer(n,e,i){const r=n.element,s=H2(0,this._normalizer,0,n.keyframes,e,i);return this._driver.animate(r,s,n.duration,n.delay,n.easing,[],!0)}create(n,e,i={}){const r=[],s=this._animations.get(n);let d;const _=new Map;if(s?(d=bE(this._driver,e,s,hE,mC,new Map,new Map,i,q$,r),d.forEach(I=>{const L=Ja(_,I.element,new Map);I.postStyleProps.forEach(H=>L.set(H,null))})):(r.push(function X7(){return new mt(3300,!1)}()),d=[]),r.length)throw function Y7(t){return new mt(3504,!1)}();_.forEach((I,L)=>{I.forEach((H,Y)=>{I.set(Y,this._driver.computeStyle(L,Y,Dd))})});const S=rp(d.map(I=>{const L=_.get(I.element);return this._buildPlayer(I,new Map,L)}));return this._playersById.set(n,S),S.onDestroy(()=>this.destroy(n)),this.players.push(S),S}destroy(n){const e=this._getPlayer(n);e.destroy(),this._playersById.delete(n);const i=this.players.indexOf(e);i>=0&&this.players.splice(i,1)}_getPlayer(n){const e=this._playersById.get(n);if(!e)throw function K7(t){return new mt(3301,!1)}();return e}listen(n,e,i,r){const s=lE(e,"","","");return sE(this._getPlayer(n),i,s,r),()=>{}}command(n,e,i,r){if("register"==i)return void this.register(n,r[0]);if("create"==i)return void this.create(n,e,r[0]||{});const s=this._getPlayer(n);switch(i){case"play":s.play();break;case"pause":s.pause();break;case"reset":s.reset();break;case"restart":s.restart();break;case"finish":s.finish();break;case"init":s.init();break;case"setPosition":s.setPosition(parseFloat(r[0]));break;case"destroy":this.destroy(n)}}}const pF="ng-animate-queued",ME="ng-animate-disabled",J$=[],fF={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},e9={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0},Ol="__ng_removed";class SE{get params(){return this.options.params}constructor(n,e=""){this.namespaceId=e;const i=n&&n.hasOwnProperty("value");if(this.value=function o9(t){return t??null}(i?n.value:n),i){const s=_0(n);delete s.value,this.options=s}else this.options={};this.options.params||(this.options.params={})}absorbOptions(n){const e=n.params;if(e){const i=this.options.params;Object.keys(e).forEach(r=>{null==i[r]&&(i[r]=e[r])})}}}const b0="void",DE=new SE(b0);class t9{constructor(n,e,i){this.id=n,this.hostElement=e,this._engine=i,this.players=[],this._triggers=new Map,this._queue=[],this._elementListeners=new Map,this._hostClassName="ng-tns-"+n,Fl(e,this._hostClassName)}listen(n,e,i,r){if(!this._triggers.has(e))throw function Q7(t,n){return new mt(3302,!1)}();if(null==i||0==i.length)throw function J7(t){return new mt(3303,!1)}();if(!function s9(t){return"start"==t||"done"==t}(i))throw function e$(t,n){return new mt(3400,!1)}();const s=Ja(this._elementListeners,n,[]),d={name:e,phase:i,callback:r};s.push(d);const _=Ja(this._engine.statesByElement,n,new Map);return _.has(e)||(Fl(n,gC),Fl(n,gC+"-"+e),_.set(e,DE)),()=>{this._engine.afterFlush(()=>{const w=s.indexOf(d);w>=0&&s.splice(w,1),this._triggers.has(e)||_.delete(e)})}}register(n,e){return!this._triggers.has(n)&&(this._triggers.set(n,e),!0)}_getTrigger(n){const e=this._triggers.get(n);if(!e)throw function t$(t){return new mt(3401,!1)}();return e}trigger(n,e,i,r=!0){const s=this._getTrigger(e),d=new EE(this.id,e,n);let _=this._engine.statesByElement.get(n);_||(Fl(n,gC),Fl(n,gC+"-"+e),this._engine.statesByElement.set(n,_=new Map));let w=_.get(e);const S=new SE(i,this.id);if(!(i&&i.hasOwnProperty("value"))&&w&&S.absorbOptions(w.options),_.set(e,S),w||(w=DE),S.value!==b0&&w.value===S.value){if(!function c9(t,n){const e=Object.keys(t),i=Object.keys(n);if(e.length!=i.length)return!1;for(let r=0;r{Kf(n,Be),_u(n,$e)})}return}const H=Ja(this._engine.playersByElement,n,[]);H.forEach(ve=>{ve.namespaceId==this.id&&ve.triggerName==e&&ve.queued&&ve.destroy()});let Y=s.matchTransition(w.value,S.value,n,S.params),ae=!1;if(!Y){if(!r)return;Y=s.fallbackTransition,ae=!0}return this._engine.totalQueuedPlayers++,this._queue.push({element:n,triggerName:e,transition:Y,fromState:w,toState:S,player:d,isFallbackTransition:ae}),ae||(Fl(n,pF),d.onStart(()=>{g_(n,pF)})),d.onDone(()=>{let ve=this.players.indexOf(d);ve>=0&&this.players.splice(ve,1);const Be=this._engine.playersByElement.get(n);if(Be){let $e=Be.indexOf(d);$e>=0&&Be.splice($e,1)}}),this.players.push(d),H.push(d),d}deregister(n){this._triggers.delete(n),this._engine.statesByElement.forEach(e=>e.delete(n)),this._elementListeners.forEach((e,i)=>{this._elementListeners.set(i,e.filter(r=>r.name!=n))})}clearElementCache(n){this._engine.statesByElement.delete(n),this._elementListeners.delete(n);const e=this._engine.playersByElement.get(n);e&&(e.forEach(i=>i.destroy()),this._engine.playersByElement.delete(n))}_signalRemovalForInnerTriggers(n,e){const i=this._engine.driver.query(n,_C,!0);i.forEach(r=>{if(r[Ol])return;const s=this._engine.fetchNamespacesByElement(r);s.size?s.forEach(d=>d.triggerLeaveAnimation(r,e,!1,!0)):this.clearElementCache(r)}),this._engine.afterFlushAnimationsDone(()=>i.forEach(r=>this.clearElementCache(r)))}triggerLeaveAnimation(n,e,i,r){const s=this._engine.statesByElement.get(n),d=new Map;if(s){const _=[];if(s.forEach((w,S)=>{if(d.set(S,w.value),this._triggers.has(S)){const I=this.trigger(n,S,b0,r);I&&_.push(I)}}),_.length)return this._engine.markElementAsRemoved(this.id,n,!0,e,d),i&&rp(_).onDone(()=>this._engine.processLeaveNode(n)),!0}return!1}prepareLeaveAnimationListeners(n){const e=this._elementListeners.get(n),i=this._engine.statesByElement.get(n);if(e&&i){const r=new Set;e.forEach(s=>{const d=s.name;if(r.has(d))return;r.add(d);const w=this._triggers.get(d).fallbackTransition,S=i.get(d)||DE,I=new SE(b0),L=new EE(this.id,d,n);this._engine.totalQueuedPlayers++,this._queue.push({element:n,triggerName:d,transition:w,fromState:S,toState:I,player:L,isFallbackTransition:!0})})}}removeNode(n,e){const i=this._engine;if(n.childElementCount&&this._signalRemovalForInnerTriggers(n,e),this.triggerLeaveAnimation(n,e,!0))return;let r=!1;if(i.totalAnimations){const s=i.players.length?i.playersByQueriedElement.get(n):[];if(s&&s.length)r=!0;else{let d=n;for(;d=d.parentNode;)if(i.statesByElement.get(d)){r=!0;break}}}if(this.prepareLeaveAnimationListeners(n),r)i.markElementAsRemoved(this.id,n,!1,e);else{const s=n[Ol];(!s||s===fF)&&(i.afterFlush(()=>this.clearElementCache(n)),i.destroyInnerAnimations(n),i._onRemovalComplete(n,e))}}insertNode(n,e){Fl(n,this._hostClassName)}drainQueuedTransitions(n){const e=[];return this._queue.forEach(i=>{const r=i.player;if(r.destroyed)return;const s=i.element,d=this._elementListeners.get(s);d&&d.forEach(_=>{if(_.name==i.triggerName){const w=lE(s,i.triggerName,i.fromState.value,i.toState.value);w._data=n,sE(i.player,_.phase,w,_.callback)}}),r.markedForDestroy?this._engine.afterFlush(()=>{r.destroy()}):e.push(i)}),this._queue=[],e.sort((i,r)=>{const s=i.transition.ast.depCount,d=r.transition.ast.depCount;return 0==s||0==d?s-d:this._engine.driver.containsElement(i.element,r.element)?1:-1})}destroy(n){this.players.forEach(e=>e.destroy()),this._signalRemovalForInnerTriggers(this.hostElement,n)}elementContainsData(n){let e=!1;return this._elementListeners.has(n)&&(e=!0),e=!!this._queue.find(i=>i.element===n)||e,e}}class n9{_onRemovalComplete(n,e){this.onRemovalComplete(n,e)}constructor(n,e,i){this.bodyNode=n,this.driver=e,this._normalizer=i,this.players=[],this.newHostElements=new Map,this.playersByElement=new Map,this.playersByQueriedElement=new Map,this.statesByElement=new Map,this.disabledNodes=new Set,this.totalAnimations=0,this.totalQueuedPlayers=0,this._namespaceLookup={},this._namespaceList=[],this._flushFns=[],this._whenQuietFns=[],this.namespacesByHostElement=new Map,this.collectedEnterElements=[],this.collectedLeaveElements=[],this.onRemovalComplete=(r,s)=>{}}get queuedPlayers(){const n=[];return this._namespaceList.forEach(e=>{e.players.forEach(i=>{i.queued&&n.push(i)})}),n}createNamespace(n,e){const i=new t9(n,e,this);return this.bodyNode&&this.driver.containsElement(this.bodyNode,e)?this._balanceNamespaceList(i,e):(this.newHostElements.set(e,i),this.collectEnterElement(e)),this._namespaceLookup[n]=i}_balanceNamespaceList(n,e){const i=this._namespaceList,r=this.namespacesByHostElement;if(i.length-1>=0){let d=!1,_=this.driver.getParentElement(e);for(;_;){const w=r.get(_);if(w){const S=i.indexOf(w);i.splice(S+1,0,n),d=!0;break}_=this.driver.getParentElement(_)}d||i.unshift(n)}else i.push(n);return r.set(e,n),n}register(n,e){let i=this._namespaceLookup[n];return i||(i=this.createNamespace(n,e)),i}registerTrigger(n,e,i){let r=this._namespaceLookup[n];r&&r.register(e,i)&&this.totalAnimations++}destroy(n,e){if(!n)return;const i=this._fetchNamespace(n);this.afterFlush(()=>{this.namespacesByHostElement.delete(i.hostElement),delete this._namespaceLookup[n];const r=this._namespaceList.indexOf(i);r>=0&&this._namespaceList.splice(r,1)}),this.afterFlushAnimationsDone(()=>i.destroy(e))}_fetchNamespace(n){return this._namespaceLookup[n]}fetchNamespacesByElement(n){const e=new Set,i=this.statesByElement.get(n);if(i)for(let r of i.values())if(r.namespaceId){const s=this._fetchNamespace(r.namespaceId);s&&e.add(s)}return e}trigger(n,e,i,r){if(TC(e)){const s=this._fetchNamespace(n);if(s)return s.trigger(e,i,r),!0}return!1}insertNode(n,e,i,r){if(!TC(e))return;const s=e[Ol];if(s&&s.setForRemoval){s.setForRemoval=!1,s.setForMove=!0;const d=this.collectedLeaveElements.indexOf(e);d>=0&&this.collectedLeaveElements.splice(d,1)}if(n){const d=this._fetchNamespace(n);d&&d.insertNode(e,i)}r&&this.collectEnterElement(e)}collectEnterElement(n){this.collectedEnterElements.push(n)}markElementAsDisabled(n,e){e?this.disabledNodes.has(n)||(this.disabledNodes.add(n),Fl(n,ME)):this.disabledNodes.has(n)&&(this.disabledNodes.delete(n),g_(n,ME))}removeNode(n,e,i,r){if(TC(e)){const s=n?this._fetchNamespace(n):null;if(s?s.removeNode(e,r):this.markElementAsRemoved(n,e,!1,r),i){const d=this.namespacesByHostElement.get(e);d&&d.id!==n&&d.removeNode(e,r)}}else this._onRemovalComplete(e,r)}markElementAsRemoved(n,e,i,r,s){this.collectedLeaveElements.push(e),e[Ol]={namespaceId:n,setForRemoval:r,hasAnimation:i,removedBeforeQueried:!1,previousTriggersValues:s}}listen(n,e,i,r,s){return TC(e)?this._fetchNamespace(n).listen(e,i,r,s):()=>{}}_buildInstruction(n,e,i,r,s){return n.transition.build(this.driver,n.element,n.fromState.value,n.toState.value,i,r,n.fromState.options,n.toState.options,e,s)}destroyInnerAnimations(n){let e=this.driver.query(n,_C,!0);e.forEach(i=>this.destroyActiveAnimationsForElement(i)),0!=this.playersByQueriedElement.size&&(e=this.driver.query(n,pE,!0),e.forEach(i=>this.finishActiveQueriedAnimationOnElement(i)))}destroyActiveAnimationsForElement(n){const e=this.playersByElement.get(n);e&&e.forEach(i=>{i.queued?i.markedForDestroy=!0:i.destroy()})}finishActiveQueriedAnimationOnElement(n){const e=this.playersByQueriedElement.get(n);e&&e.forEach(i=>i.finish())}whenRenderingDone(){return new Promise(n=>{if(this.players.length)return rp(this.players).onDone(()=>n());n()})}processLeaveNode(n){const e=n[Ol];if(e&&e.setForRemoval){if(n[Ol]=fF,e.namespaceId){this.destroyInnerAnimations(n);const i=this._fetchNamespace(e.namespaceId);i&&i.clearElementCache(n)}this._onRemovalComplete(n,e.setForRemoval)}n.classList?.contains(ME)&&this.markElementAsDisabled(n,!1),this.driver.query(n,".ng-animate-disabled",!0).forEach(i=>{this.markElementAsDisabled(i,!1)})}flush(n=-1){let e=[];if(this.newHostElements.size&&(this.newHostElements.forEach((i,r)=>this._balanceNamespaceList(i,r)),this.newHostElements.clear()),this.totalAnimations&&this.collectedEnterElements.length)for(let i=0;ii()),this._flushFns=[],this._whenQuietFns.length){const i=this._whenQuietFns;this._whenQuietFns=[],e.length?rp(e).onDone(()=>{i.forEach(r=>r())}):i.forEach(r=>r())}}reportError(n){throw function n$(t){return new mt(3402,!1)}()}_flushAnimations(n,e){const i=new SC,r=[],s=new Map,d=[],_=new Map,w=new Map,S=new Map,I=new Set;this.disabledNodes.forEach(Cn=>{I.add(Cn);const Vn=this.driver.query(Cn,".ng-animate-queued",!0);for(let Kn=0;Kn{const Kn=hE+ve++;ae.set(Vn,Kn),Cn.forEach(rr=>Fl(rr,Kn))});const Be=[],$e=new Set,It=new Set;for(let Cn=0;Cn$e.add(rr)):It.add(Vn))}const _t=new Map,dn=_F(H,Array.from($e));dn.forEach((Cn,Vn)=>{const Kn=mC+ve++;_t.set(Vn,Kn),Cn.forEach(rr=>Fl(rr,Kn))}),n.push(()=>{Y.forEach((Cn,Vn)=>{const Kn=ae.get(Vn);Cn.forEach(rr=>g_(rr,Kn))}),dn.forEach((Cn,Vn)=>{const Kn=_t.get(Vn);Cn.forEach(rr=>g_(rr,Kn))}),Be.forEach(Cn=>{this.processLeaveNode(Cn)})});const Qi=[],ar=[];for(let Cn=this._namespaceList.length-1;Cn>=0;Cn--)this._namespaceList[Cn].drainQueuedTransitions(e).forEach(Kn=>{const rr=Kn.player,ls=Kn.element;if(Qi.push(rr),this.collectedEnterElements.length){const Us=ls[Ol];if(Us&&Us.setForMove){if(Us.previousTriggersValues&&Us.previousTriggersValues.has(Kn.triggerName)){const am=Us.previousTriggersValues.get(Kn.triggerName),Bl=this.statesByElement.get(Kn.element);if(Bl&&Bl.has(Kn.triggerName)){const u1=Bl.get(Kn.triggerName);u1.value=am,Bl.set(Kn.triggerName,u1)}}return void rr.destroy()}}const bu=!L||!this.driver.containsElement(L,ls),tl=_t.get(ls),up=ae.get(ls),Yr=this._buildInstruction(Kn,i,up,tl,bu);if(Yr.errors&&Yr.errors.length)return void ar.push(Yr);if(bu)return rr.onStart(()=>Kf(ls,Yr.fromStyles)),rr.onDestroy(()=>_u(ls,Yr.toStyles)),void r.push(rr);if(Kn.isFallbackTransition)return rr.onStart(()=>Kf(ls,Yr.fromStyles)),rr.onDestroy(()=>_u(ls,Yr.toStyles)),void r.push(rr);const qB=[];Yr.timelines.forEach(Us=>{Us.stretchStartingKeyframe=!0,this.disabledNodes.has(Us.element)||qB.push(Us)}),Yr.timelines=qB,i.append(ls,Yr.timelines),d.push({instruction:Yr,player:rr,element:ls}),Yr.queriedElements.forEach(Us=>Ja(_,Us,[]).push(rr)),Yr.preStyleProps.forEach((Us,am)=>{if(Us.size){let Bl=w.get(am);Bl||w.set(am,Bl=new Set),Us.forEach((u1,bT)=>Bl.add(bT))}}),Yr.postStyleProps.forEach((Us,am)=>{let Bl=S.get(am);Bl||S.set(am,Bl=new Set),Us.forEach((u1,bT)=>Bl.add(bT))})});if(ar.length){const Cn=[];ar.forEach(Vn=>{Cn.push(function i$(t,n){return new mt(3505,!1)}())}),Qi.forEach(Vn=>Vn.destroy()),this.reportError(Cn)}const Gs=new Map,Bd=new Map;d.forEach(Cn=>{const Vn=Cn.element;i.has(Vn)&&(Bd.set(Vn,Vn),this._beforeAnimationBuild(Cn.player.namespaceId,Cn.instruction,Gs))}),r.forEach(Cn=>{const Vn=Cn.element;this._getPreviousPlayers(Vn,!1,Cn.namespaceId,Cn.triggerName,null).forEach(rr=>{Ja(Gs,Vn,[]).push(rr),rr.destroy()})});const Nd=Be.filter(Cn=>vF(Cn,w,S)),zd=new Map;gF(zd,this.driver,It,S,Dd).forEach(Cn=>{vF(Cn,w,S)&&Nd.push(Cn)});const G0=new Map;Y.forEach((Cn,Vn)=>{gF(G0,this.driver,new Set(Cn),w,"!")}),Nd.forEach(Cn=>{const Vn=zd.get(Cn),Kn=G0.get(Cn);zd.set(Cn,new Map([...Array.from(Vn?.entries()??[]),...Array.from(Kn?.entries()??[])]))});const sm=[],$B=[],WB={};d.forEach(Cn=>{const{element:Vn,player:Kn,instruction:rr}=Cn;if(i.has(Vn)){if(I.has(Vn))return Kn.onDestroy(()=>_u(Vn,rr.toStyles)),Kn.disabled=!0,Kn.overrideTotalTime(rr.totalTime),void r.push(Kn);let ls=WB;if(Bd.size>1){let tl=Vn;const up=[];for(;tl=tl.parentNode;){const Yr=Bd.get(tl);if(Yr){ls=Yr;break}up.push(tl)}up.forEach(Yr=>Bd.set(Yr,ls))}const bu=this._buildAnimation(Kn.namespaceId,rr,Gs,s,G0,zd);if(Kn.setRealPlayer(bu),ls===WB)sm.push(Kn);else{const tl=this.playersByElement.get(ls);tl&&tl.length&&(Kn.parentPlayer=rp(tl)),r.push(Kn)}}else Kf(Vn,rr.fromStyles),Kn.onDestroy(()=>_u(Vn,rr.toStyles)),$B.push(Kn),I.has(Vn)&&r.push(Kn)}),$B.forEach(Cn=>{const Vn=s.get(Cn.element);if(Vn&&Vn.length){const Kn=rp(Vn);Cn.setRealPlayer(Kn)}}),r.forEach(Cn=>{Cn.parentPlayer?Cn.syncPlayerEvents(Cn.parentPlayer):Cn.destroy()});for(let Cn=0;Cn!bu.destroyed);ls.length?a9(this,Vn,ls):this.processLeaveNode(Vn)}return Be.length=0,sm.forEach(Cn=>{this.players.push(Cn),Cn.onDone(()=>{Cn.destroy();const Vn=this.players.indexOf(Cn);this.players.splice(Vn,1)}),Cn.play()}),sm}elementContainsData(n,e){let i=!1;const r=e[Ol];return r&&r.setForRemoval&&(i=!0),this.playersByElement.has(e)&&(i=!0),this.playersByQueriedElement.has(e)&&(i=!0),this.statesByElement.has(e)&&(i=!0),this._fetchNamespace(n).elementContainsData(e)||i}afterFlush(n){this._flushFns.push(n)}afterFlushAnimationsDone(n){this._whenQuietFns.push(n)}_getPreviousPlayers(n,e,i,r,s){let d=[];if(e){const _=this.playersByQueriedElement.get(n);_&&(d=_)}else{const _=this.playersByElement.get(n);if(_){const w=!s||s==b0;_.forEach(S=>{S.queued||!w&&S.triggerName!=r||d.push(S)})}}return(i||r)&&(d=d.filter(_=>!(i&&i!=_.namespaceId||r&&r!=_.triggerName))),d}_beforeAnimationBuild(n,e,i){const s=e.element,d=e.isRemovalTransition?void 0:n,_=e.isRemovalTransition?void 0:e.triggerName;for(const w of e.timelines){const S=w.element,I=S!==s,L=Ja(i,S,[]);this._getPreviousPlayers(S,I,d,_,e.toState).forEach(Y=>{const ae=Y.getRealPlayer();ae.beforeDestroy&&ae.beforeDestroy(),Y.destroy(),L.push(Y)})}Kf(s,e.fromStyles)}_buildAnimation(n,e,i,r,s,d){const _=e.triggerName,w=e.element,S=[],I=new Set,L=new Set,H=e.timelines.map(ae=>{const ve=ae.element;I.add(ve);const Be=ve[Ol];if(Be&&Be.removedBeforeQueried)return new u0(ae.duration,ae.delay);const $e=ve!==w,It=function l9(t){const n=[];return yF(t,n),n}((i.get(ve)||J$).map(Gs=>Gs.getRealPlayer())).filter(Gs=>!!Gs.element&&Gs.element===ve),_t=s.get(ve),dn=d.get(ve),Qi=H2(0,this._normalizer,0,ae.keyframes,_t,dn),ar=this._buildPlayer(ae,Qi,It);if(ae.subTimeline&&r&&L.add(ve),$e){const Gs=new EE(n,_,ve);Gs.setRealPlayer(ar),S.push(Gs)}return ar});S.forEach(ae=>{Ja(this.playersByQueriedElement,ae.element,[]).push(ae),ae.onDone(()=>function r9(t,n,e){let i=t.get(n);if(i){if(i.length){const r=i.indexOf(e);i.splice(r,1)}0==i.length&&t.delete(n)}return i}(this.playersByQueriedElement,ae.element,ae))}),I.forEach(ae=>Fl(ae,J2));const Y=rp(H);return Y.onDestroy(()=>{I.forEach(ae=>g_(ae,J2)),_u(w,e.toStyles)}),L.forEach(ae=>{Ja(r,ae,[]).push(Y)}),Y}_buildPlayer(n,e,i){return e.length>0?this.driver.animate(n.element,e,n.duration,n.delay,n.easing,i):new u0(n.duration,n.delay)}}class EE{constructor(n,e,i){this.namespaceId=n,this.triggerName=e,this.element=i,this._player=new u0,this._containsRealPlayer=!1,this._queuedCallbacks=new Map,this.destroyed=!1,this.markedForDestroy=!1,this.disabled=!1,this.queued=!0,this.totalTime=0}setRealPlayer(n){this._containsRealPlayer||(this._player=n,this._queuedCallbacks.forEach((e,i)=>{e.forEach(r=>sE(n,i,void 0,r))}),this._queuedCallbacks.clear(),this._containsRealPlayer=!0,this.overrideTotalTime(n.totalTime),this.queued=!1)}getRealPlayer(){return this._player}overrideTotalTime(n){this.totalTime=n}syncPlayerEvents(n){const e=this._player;e.triggerCallback&&n.onStart(()=>e.triggerCallback("start")),n.onDone(()=>this.finish()),n.onDestroy(()=>this.destroy())}_queueEvent(n,e){Ja(this._queuedCallbacks,n,[]).push(e)}onDone(n){this.queued&&this._queueEvent("done",n),this._player.onDone(n)}onStart(n){this.queued&&this._queueEvent("start",n),this._player.onStart(n)}onDestroy(n){this.queued&&this._queueEvent("destroy",n),this._player.onDestroy(n)}init(){this._player.init()}hasStarted(){return!this.queued&&this._player.hasStarted()}play(){!this.queued&&this._player.play()}pause(){!this.queued&&this._player.pause()}restart(){!this.queued&&this._player.restart()}finish(){this._player.finish()}destroy(){this.destroyed=!0,this._player.destroy()}reset(){!this.queued&&this._player.reset()}setPosition(n){this.queued||this._player.setPosition(n)}getPosition(){return this.queued?0:this._player.getPosition()}triggerCallback(n){const e=this._player;e.triggerCallback&&e.triggerCallback(n)}}function TC(t){return t&&1===t.nodeType}function mF(t,n){const e=t.style.display;return t.style.display=n??"none",e}function gF(t,n,e,i,r){const s=[];e.forEach(w=>s.push(mF(w)));const d=[];i.forEach((w,S)=>{const I=new Map;w.forEach(L=>{const H=n.computeStyle(S,L,r);I.set(L,H),(!H||0==H.length)&&(S[Ol]=e9,d.push(S))}),t.set(S,I)});let _=0;return e.forEach(w=>mF(w,s[_++])),d}function _F(t,n){const e=new Map;if(t.forEach(_=>e.set(_,[])),0==n.length)return e;const r=new Set(n),s=new Map;function d(_){if(!_)return 1;let w=s.get(_);if(w)return w;const S=_.parentNode;return w=e.has(S)?S:r.has(S)?1:d(S),s.set(_,w),w}return n.forEach(_=>{const w=d(_);1!==w&&e.get(w).push(_)}),e}function Fl(t,n){t.classList?.add(n)}function g_(t,n){t.classList?.remove(n)}function a9(t,n,e){rp(e).onDone(()=>t.processLeaveNode(n))}function yF(t,n){for(let e=0;er.add(s)):n.set(t,i),e.delete(t),!0}class AC{constructor(n,e,i){this.bodyNode=n,this._driver=e,this._normalizer=i,this._triggerCache={},this.onRemovalComplete=(r,s)=>{},this._transitionEngine=new n9(n,e,i),this._timelineEngine=new Z$(n,e,i),this._transitionEngine.onRemovalComplete=(r,s)=>this.onRemovalComplete(r,s)}registerTrigger(n,e,i,r,s){const d=n+"-"+r;let _=this._triggerCache[d];if(!_){const w=[],I=_E(this._driver,s,w,[]);if(w.length)throw function W7(t,n){return new mt(3404,!1)}();_=function H$(t,n,e){return new $$(t,n,e)}(r,I,this._normalizer),this._triggerCache[d]=_}this._transitionEngine.registerTrigger(e,r,_)}register(n,e){this._transitionEngine.register(n,e)}destroy(n,e){this._transitionEngine.destroy(n,e)}onInsert(n,e,i,r){this._transitionEngine.insertNode(n,e,i,r)}onRemove(n,e,i,r){this._transitionEngine.removeNode(n,e,r||!1,i)}disableAnimations(n,e){this._transitionEngine.markElementAsDisabled(n,e)}process(n,e,i,r){if("@"==i.charAt(0)){const[s,d]=$2(i);this._timelineEngine.command(s,e,d,r)}else this._transitionEngine.trigger(n,e,i,r)}listen(n,e,i,r,s){if("@"==i.charAt(0)){const[d,_]=$2(i);return this._timelineEngine.listen(d,e,_,s)}return this._transitionEngine.listen(n,e,i,r,s)}flush(n=-1){this._transitionEngine.flush(n)}get players(){return this._transitionEngine.players.concat(this._timelineEngine.players)}whenRenderingDone(){return this._transitionEngine.whenRenderingDone()}}let d9=(()=>{class t{constructor(e,i,r){this._element=e,this._startStyles=i,this._endStyles=r,this._state=0;let s=t.initialStylesByElement.get(e);s||t.initialStylesByElement.set(e,s=new Map),this._initialStyles=s}start(){this._state<1&&(this._startStyles&&_u(this._element,this._startStyles,this._initialStyles),this._state=1)}finish(){this.start(),this._state<2&&(_u(this._element,this._initialStyles),this._endStyles&&(_u(this._element,this._endStyles),this._endStyles=null),this._state=1)}destroy(){this.finish(),this._state<3&&(t.initialStylesByElement.delete(this._element),this._startStyles&&(Kf(this._element,this._startStyles),this._endStyles=null),this._endStyles&&(Kf(this._element,this._endStyles),this._endStyles=null),_u(this._element,this._initialStyles),this._state=3)}}return t.initialStylesByElement=new WeakMap,t})();function TE(t){let n=null;return t.forEach((e,i)=>{(function h9(t){return"display"===t||"position"===t})(i)&&(n=n||new Map,n.set(i,e))}),n}class bF{constructor(n,e,i,r){this.element=n,this.keyframes=e,this.options=i,this._specialStyles=r,this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._initialized=!1,this._finished=!1,this._started=!1,this._destroyed=!1,this._originalOnDoneFns=[],this._originalOnStartFns=[],this.time=0,this.parentPlayer=null,this.currentSnapshot=new Map,this._duration=i.duration,this._delay=i.delay||0,this.time=this._duration+this._delay}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(n=>n()),this._onDoneFns=[])}init(){this._buildPlayer(),this._preparePlayerBeforeStart()}_buildPlayer(){if(this._initialized)return;this._initialized=!0;const n=this.keyframes;this.domPlayer=this._triggerWebAnimation(this.element,n,this.options),this._finalKeyframe=n.length?n[n.length-1]:new Map,this.domPlayer.addEventListener("finish",()=>this._onFinish())}_preparePlayerBeforeStart(){this._delay?this._resetDomPlayerState():this.domPlayer.pause()}_convertKeyframesToObject(n){const e=[];return n.forEach(i=>{e.push(Object.fromEntries(i))}),e}_triggerWebAnimation(n,e,i){return n.animate(this._convertKeyframesToObject(e),i)}onStart(n){this._originalOnStartFns.push(n),this._onStartFns.push(n)}onDone(n){this._originalOnDoneFns.push(n),this._onDoneFns.push(n)}onDestroy(n){this._onDestroyFns.push(n)}play(){this._buildPlayer(),this.hasStarted()||(this._onStartFns.forEach(n=>n()),this._onStartFns=[],this._started=!0,this._specialStyles&&this._specialStyles.start()),this.domPlayer.play()}pause(){this.init(),this.domPlayer.pause()}finish(){this.init(),this._specialStyles&&this._specialStyles.finish(),this._onFinish(),this.domPlayer.finish()}reset(){this._resetDomPlayerState(),this._destroyed=!1,this._finished=!1,this._started=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}_resetDomPlayerState(){this.domPlayer&&this.domPlayer.cancel()}restart(){this.reset(),this.play()}hasStarted(){return this._started}destroy(){this._destroyed||(this._destroyed=!0,this._resetDomPlayerState(),this._onFinish(),this._specialStyles&&this._specialStyles.destroy(),this._onDestroyFns.forEach(n=>n()),this._onDestroyFns=[])}setPosition(n){void 0===this.domPlayer&&this.init(),this.domPlayer.currentTime=n*this.time}getPosition(){return this.domPlayer.currentTime/this.time}get totalTime(){return this._delay+this._duration}beforeDestroy(){const n=new Map;this.hasStarted()&&this._finalKeyframe.forEach((i,r)=>{"offset"!==r&&n.set(r,this._finished?i:oF(this.element,r))}),this.currentSnapshot=n}triggerCallback(n){const e="start"===n?this._onStartFns:this._onDoneFns;e.forEach(i=>i()),e.length=0}}class p9{validateStyleProperty(n){return!0}validateAnimatableStyleProperty(n){return!0}matchesElement(n,e){return!1}containsElement(n,e){return X2(n,e)}getParentElement(n){return uE(n)}query(n,e,i){return Y2(n,e,i)}computeStyle(n,e,i){return window.getComputedStyle(n)[e]}animate(n,e,i,r,s,d=[]){const w={duration:i,delay:r,fill:0==r?"both":"forwards"};s&&(w.easing=s);const S=new Map,I=d.filter(Y=>Y instanceof bF);(function g$(t,n){return 0===t||0===n})(i,r)&&I.forEach(Y=>{Y.currentSnapshot.forEach((ae,ve)=>S.set(ve,ae))});let L=function h$(t){return t.length?t[0]instanceof Map?t:t.map(n=>eF(n)):[]}(e).map(Y=>op(Y));L=function _$(t,n,e){if(e.size&&n.length){let i=n[0],r=[];if(e.forEach((s,d)=>{i.has(d)||r.push(d),i.set(d,s)}),r.length)for(let s=1;sd.set(_,oF(t,_)))}}return n}(n,L,S);const H=function u9(t,n){let e=null,i=null;return Array.isArray(n)&&n.length?(e=TE(n[0]),n.length>1&&(i=TE(n[n.length-1]))):n instanceof Map&&(e=TE(n)),e||i?new d9(t,e,i):null}(n,L);return new bF(n,L,w,H)}}let f9=(()=>{class t extends b2{constructor(e,i){super(),this._nextAnimationId=0,this._renderer=e.createRenderer(i.body,{id:"0",encapsulation:Qo.None,styles:[],data:{animation:[]}})}build(e){const i=this._nextAnimationId.toString();this._nextAnimationId++;const r=Array.isArray(e)?w2(e):e;return xF(this._renderer,null,i,"register",[r]),new m9(i,this._renderer)}}return t.\u0275fac=function(e){return new(e||t)(we(tf),we(Bn))},t.\u0275prov=rt({token:t,factory:t.\u0275fac}),t})();class m9 extends I8{constructor(n,e){super(),this._id=n,this._renderer=e}create(n,e){return new g9(this._id,n,e||{},this._renderer)}}class g9{constructor(n,e,i,r){this.id=n,this.element=e,this._renderer=r,this.parentPlayer=null,this._started=!1,this.totalTime=0,this._command("create",i)}_listen(n,e){return this._renderer.listen(this.element,`@@${this.id}:${n}`,e)}_command(n,...e){return xF(this._renderer,this.element,this.id,n,e)}onDone(n){this._listen("done",n)}onStart(n){this._listen("start",n)}onDestroy(n){this._listen("destroy",n)}init(){this._command("init")}hasStarted(){return this._started}play(){this._command("play"),this._started=!0}pause(){this._command("pause")}restart(){this._command("restart")}finish(){this._command("finish")}destroy(){this._command("destroy")}reset(){this._command("reset"),this._started=!1}setPosition(n){this._command("setPosition",n)}getPosition(){return this._renderer.engine.players[+this.id]?.getPosition()??0}}function xF(t,n,e,i,r){return t.setProperty(n,`@@${e}:${i}`,r)}const wF="@.disabled";let _9=(()=>{class t{constructor(e,i,r){this.delegate=e,this.engine=i,this._zone=r,this._currentId=0,this._microtaskId=1,this._animationCallbacksBuffer=[],this._rendererCache=new Map,this._cdRecurDepth=0,this.promise=Promise.resolve(0),i.onRemovalComplete=(s,d)=>{const _=d?.parentNode(s);_&&d.removeChild(_,s)}}createRenderer(e,i){const s=this.delegate.createRenderer(e,i);if(!(e&&i&&i.data&&i.data.animation)){let I=this._rendererCache.get(s);return I||(I=new CF("",s,this.engine,()=>this._rendererCache.delete(s)),this._rendererCache.set(s,I)),I}const d=i.id,_=i.id+"-"+this._currentId;this._currentId++,this.engine.register(_,e);const w=I=>{Array.isArray(I)?I.forEach(w):this.engine.registerTrigger(d,_,e,I.name,I)};return i.data.animation.forEach(w),new y9(this,_,s,this.engine)}begin(){this._cdRecurDepth++,this.delegate.begin&&this.delegate.begin()}_scheduleCountTask(){this.promise.then(()=>{this._microtaskId++})}scheduleListenerCallback(e,i,r){e>=0&&ei(r)):(0==this._animationCallbacksBuffer.length&&Promise.resolve(null).then(()=>{this._zone.run(()=>{this._animationCallbacksBuffer.forEach(s=>{const[d,_]=s;d(_)}),this._animationCallbacksBuffer=[]})}),this._animationCallbacksBuffer.push([i,r]))}end(){this._cdRecurDepth--,0==this._cdRecurDepth&&this._zone.runOutsideAngular(()=>{this._scheduleCountTask(),this.engine.flush(this._microtaskId)}),this.delegate.end&&this.delegate.end()}whenRenderingDone(){return this.engine.whenRenderingDone()}}return t.\u0275fac=function(e){return new(e||t)(we(tf),we(AC),we(Ln))},t.\u0275prov=rt({token:t,factory:t.\u0275fac}),t})();class CF{constructor(n,e,i,r){this.namespaceId=n,this.delegate=e,this.engine=i,this._onDestroy=r,this.destroyNode=this.delegate.destroyNode?s=>e.destroyNode(s):null}get data(){return this.delegate.data}destroy(){this.engine.destroy(this.namespaceId,this.delegate),this.delegate.destroy(),this._onDestroy?.()}createElement(n,e){return this.delegate.createElement(n,e)}createComment(n){return this.delegate.createComment(n)}createText(n){return this.delegate.createText(n)}appendChild(n,e){this.delegate.appendChild(n,e),this.engine.onInsert(this.namespaceId,e,n,!1)}insertBefore(n,e,i,r=!0){this.delegate.insertBefore(n,e,i),this.engine.onInsert(this.namespaceId,e,n,r)}removeChild(n,e,i){this.engine.onRemove(this.namespaceId,e,this.delegate,i)}selectRootElement(n,e){return this.delegate.selectRootElement(n,e)}parentNode(n){return this.delegate.parentNode(n)}nextSibling(n){return this.delegate.nextSibling(n)}setAttribute(n,e,i,r){this.delegate.setAttribute(n,e,i,r)}removeAttribute(n,e,i){this.delegate.removeAttribute(n,e,i)}addClass(n,e){this.delegate.addClass(n,e)}removeClass(n,e){this.delegate.removeClass(n,e)}setStyle(n,e,i,r){this.delegate.setStyle(n,e,i,r)}removeStyle(n,e,i){this.delegate.removeStyle(n,e,i)}setProperty(n,e,i){"@"==e.charAt(0)&&e==wF?this.disableAnimations(n,!!i):this.delegate.setProperty(n,e,i)}setValue(n,e){this.delegate.setValue(n,e)}listen(n,e,i){return this.delegate.listen(n,e,i)}disableAnimations(n,e){this.engine.disableAnimations(n,e)}}class y9 extends CF{constructor(n,e,i,r,s){super(e,i,r,s),this.factory=n,this.namespaceId=e}setProperty(n,e,i){"@"==e.charAt(0)?"."==e.charAt(1)&&e==wF?this.disableAnimations(n,i=void 0===i||!!i):this.engine.process(this.namespaceId,n,e.slice(1),i):this.delegate.setProperty(n,e,i)}listen(n,e,i){if("@"==e.charAt(0)){const r=function v9(t){switch(t){case"body":return document.body;case"document":return document;case"window":return window;default:return t}}(n);let s=e.slice(1),d="";return"@"!=s.charAt(0)&&([s,d]=function b9(t){const n=t.indexOf(".");return[t.substring(0,n),t.slice(n+1)]}(s)),this.engine.listen(this.namespaceId,r,s,d,_=>{this.factory.scheduleListenerCallback(_._data||-1,i,_)})}return this.delegate.listen(n,e,i)}}const MF=[{provide:b2,useClass:f9},{provide:wE,useFactory:function w9(){return new V$}},{provide:AC,useClass:(()=>{class t extends AC{constructor(e,i,r,s){super(e.body,i,r)}ngOnDestroy(){this.flush()}}return t.\u0275fac=function(e){return new(e||t)(we(Bn),we(dE),we(wE),we(jg))},t.\u0275prov=rt({token:t,factory:t.\u0275fac}),t})()},{provide:tf,useFactory:function C9(t,n,e){return new _9(t,n,e)},deps:[iw,AC,Ln]}],AE=[{provide:dE,useFactory:()=>new p9},{provide:Ta,useValue:"BrowserAnimations"},...MF],SF=[{provide:dE,useClass:K2},{provide:Ta,useValue:"NoopAnimations"},...MF];let M9=(()=>{class t{static withConfig(e){return{ngModule:t,providers:e.disableAnimations?SF:AE}}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=cn({type:t}),t.\u0275inj=nn({providers:AE,imports:[$k]}),t})();const S9=["*"];let kC;function x0(t){return function D9(){if(void 0===kC&&(kC=null,typeof window<"u")){const t=window;void 0!==t.trustedTypes&&(kC=t.trustedTypes.createPolicy("angular#components",{createHTML:n=>n}))}return kC}()?.createHTML(t)||t}function DF(t){return Error(`Unable to find icon with the name "${t}"`)}function EF(t){return Error(`The URL provided to MatIconRegistry was not trusted as a resource URL via Angular's DomSanitizer. Attempted URL was "${t}".`)}function TF(t){return Error(`The literal provided to MatIconRegistry was not trusted as safe HTML by Angular's DomSanitizer. Attempted literal was "${t}".`)}class Jf{constructor(n,e,i){this.url=n,this.svgText=e,this.options=i}}let RC=(()=>{class t{constructor(e,i,r,s){this._httpClient=e,this._sanitizer=i,this._errorHandler=s,this._svgIconConfigs=new Map,this._iconSetConfigs=new Map,this._cachedIconsByUrl=new Map,this._inProgressUrlFetches=new Map,this._fontCssClassesByAlias=new Map,this._resolvers=[],this._defaultFontSetClass=["material-icons","mat-ligature-font"],this._document=r}addSvgIcon(e,i,r){return this.addSvgIconInNamespace("",e,i,r)}addSvgIconLiteral(e,i,r){return this.addSvgIconLiteralInNamespace("",e,i,r)}addSvgIconInNamespace(e,i,r,s){return this._addSvgIconConfig(e,i,new Jf(r,null,s))}addSvgIconResolver(e){return this._resolvers.push(e),this}addSvgIconLiteralInNamespace(e,i,r,s){const d=this._sanitizer.sanitize(Wi.HTML,r);if(!d)throw TF(r);const _=x0(d);return this._addSvgIconConfig(e,i,new Jf("",_,s))}addSvgIconSet(e,i){return this.addSvgIconSetInNamespace("",e,i)}addSvgIconSetLiteral(e,i){return this.addSvgIconSetLiteralInNamespace("",e,i)}addSvgIconSetInNamespace(e,i,r){return this._addSvgIconSetConfig(e,new Jf(i,null,r))}addSvgIconSetLiteralInNamespace(e,i,r){const s=this._sanitizer.sanitize(Wi.HTML,i);if(!s)throw TF(i);const d=x0(s);return this._addSvgIconSetConfig(e,new Jf("",d,r))}registerFontClassAlias(e,i=e){return this._fontCssClassesByAlias.set(e,i),this}classNameForFontAlias(e){return this._fontCssClassesByAlias.get(e)||e}setDefaultFontSetClass(...e){return this._defaultFontSetClass=e,this}getDefaultFontSetClass(){return this._defaultFontSetClass}getSvgIconFromUrl(e){const i=this._sanitizer.sanitize(Wi.RESOURCE_URL,e);if(!i)throw EF(e);const r=this._cachedIconsByUrl.get(i);return r?_n(PC(r)):this._loadSvgIconFromConfig(new Jf(e,null)).pipe(wo(s=>this._cachedIconsByUrl.set(i,s)),Jt(s=>PC(s)))}getNamedSvgIcon(e,i=""){const r=AF(i,e);let s=this._svgIconConfigs.get(r);if(s)return this._getSvgFromConfig(s);if(s=this._getIconConfigFromResolvers(i,e),s)return this._svgIconConfigs.set(r,s),this._getSvgFromConfig(s);const d=this._iconSetConfigs.get(i);return d?this._getSvgFromIconSetConfigs(e,d):Zg(DF(r))}ngOnDestroy(){this._resolvers=[],this._svgIconConfigs.clear(),this._iconSetConfigs.clear(),this._cachedIconsByUrl.clear()}_getSvgFromConfig(e){return e.svgText?_n(PC(this._svgElementFromConfig(e))):this._loadSvgIconFromConfig(e).pipe(Jt(i=>PC(i)))}_getSvgFromIconSetConfigs(e,i){const r=this._extractIconWithNameFromAnySet(e,i);return r?_n(r):cO(i.filter(d=>!d.svgText).map(d=>this._loadSvgIconSetFromConfig(d).pipe(wd(_=>{const S=`Loading icon set URL: ${this._sanitizer.sanitize(Wi.RESOURCE_URL,d.url)} failed: ${_.message}`;return this._errorHandler.handleError(new Error(S)),_n(null)})))).pipe(Jt(()=>{const d=this._extractIconWithNameFromAnySet(e,i);if(!d)throw DF(e);return d}))}_extractIconWithNameFromAnySet(e,i){for(let r=i.length-1;r>=0;r--){const s=i[r];if(s.svgText&&s.svgText.toString().indexOf(e)>-1){const d=this._svgElementFromConfig(s),_=this._extractSvgIconFromSet(d,e,s.options);if(_)return _}}return null}_loadSvgIconFromConfig(e){return this._fetchIcon(e).pipe(wo(i=>e.svgText=i),Jt(()=>this._svgElementFromConfig(e)))}_loadSvgIconSetFromConfig(e){return e.svgText?_n(null):this._fetchIcon(e).pipe(wo(i=>e.svgText=i))}_extractSvgIconFromSet(e,i,r){const s=e.querySelector(`[id="${i}"]`);if(!s)return null;const d=s.cloneNode(!0);if(d.removeAttribute("id"),"svg"===d.nodeName.toLowerCase())return this._setSvgAttributes(d,r);if("symbol"===d.nodeName.toLowerCase())return this._setSvgAttributes(this._toSvgElement(d),r);const _=this._svgElementFromString(x0(""));return _.appendChild(d),this._setSvgAttributes(_,r)}_svgElementFromString(e){const i=this._document.createElement("DIV");i.innerHTML=e;const r=i.querySelector("svg");if(!r)throw Error(" tag not found");return r}_toSvgElement(e){const i=this._svgElementFromString(x0("")),r=e.attributes;for(let s=0;sx0(S)),cw(()=>this._inProgressUrlFetches.delete(d)),Vt());return this._inProgressUrlFetches.set(d,w),w}_addSvgIconConfig(e,i,r){return this._svgIconConfigs.set(AF(e,i),r),this}_addSvgIconSetConfig(e,i){const r=this._iconSetConfigs.get(e);return r?r.push(i):this._iconSetConfigs.set(e,[i]),this}_svgElementFromConfig(e){if(!e.svgElement){const i=this._svgElementFromString(e.svgText);this._setSvgAttributes(i,e.options),e.svgElement=i}return e.svgElement}_getIconConfigFromResolvers(e,i){for(let r=0;rn?n.pathname+n.search:""}}}),IF=["clip-path","color-profile","src","cursor","fill","filter","marker","marker-start","marker-mid","marker-end","mask","stroke"],O9=IF.map(t=>`[${t}]`).join(", "),F9=/^url\(['"]?#(.*?)['"]?\)$/;let em=(()=>{class t extends I9{constructor(e,i,r,s,d,_){super(e),this._iconRegistry=i,this._location=s,this._errorHandler=d,this._inline=!1,this._previousFontSetClass=[],this._currentIconFetch=$.EMPTY,_&&(_.color&&(this.color=this.defaultColor=_.color),_.fontSet&&(this.fontSet=_.fontSet)),r||e.nativeElement.setAttribute("aria-hidden","true")}get inline(){return this._inline}set inline(e){this._inline=kn(e)}get svgIcon(){return this._svgIcon}set svgIcon(e){e!==this._svgIcon&&(e?this._updateSvgIcon(e):this._svgIcon&&this._clearSvgElement(),this._svgIcon=e)}get fontSet(){return this._fontSet}set fontSet(e){const i=this._cleanupFontValue(e);i!==this._fontSet&&(this._fontSet=i,this._updateFontIconClasses())}get fontIcon(){return this._fontIcon}set fontIcon(e){const i=this._cleanupFontValue(e);i!==this._fontIcon&&(this._fontIcon=i,this._updateFontIconClasses())}_splitIconName(e){if(!e)return["",""];const i=e.split(":");switch(i.length){case 1:return["",i[0]];case 2:return i;default:throw Error(`Invalid icon name: "${e}"`)}}ngOnInit(){this._updateFontIconClasses()}ngAfterViewChecked(){const e=this._elementsWithExternalReferences;if(e&&e.size){const i=this._location.getPathname();i!==this._previousPath&&(this._previousPath=i,this._prependPathToReferences(i))}}ngOnDestroy(){this._currentIconFetch.unsubscribe(),this._elementsWithExternalReferences&&this._elementsWithExternalReferences.clear()}_usingFontIcon(){return!this.svgIcon}_setSvgElement(e){this._clearSvgElement();const i=this._location.getPathname();this._previousPath=i,this._cacheChildrenWithExternalReferences(e),this._prependPathToReferences(i),this._elementRef.nativeElement.appendChild(e)}_clearSvgElement(){const e=this._elementRef.nativeElement;let i=e.childNodes.length;for(this._elementsWithExternalReferences&&this._elementsWithExternalReferences.clear();i--;){const r=e.childNodes[i];(1!==r.nodeType||"svg"===r.nodeName.toLowerCase())&&r.remove()}}_updateFontIconClasses(){if(!this._usingFontIcon())return;const e=this._elementRef.nativeElement,i=(this.fontSet?this._iconRegistry.classNameForFontAlias(this.fontSet).split(/ +/):this._iconRegistry.getDefaultFontSetClass()).filter(r=>r.length>0);this._previousFontSetClass.forEach(r=>e.classList.remove(r)),i.forEach(r=>e.classList.add(r)),this._previousFontSetClass=i,this.fontIcon!==this._previousFontIconClass&&!i.includes("mat-ligature-font")&&(this._previousFontIconClass&&e.classList.remove(this._previousFontIconClass),this.fontIcon&&e.classList.add(this.fontIcon),this._previousFontIconClass=this.fontIcon)}_cleanupFontValue(e){return"string"==typeof e?e.trim().split(" ")[0]:e}_prependPathToReferences(e){const i=this._elementsWithExternalReferences;i&&i.forEach((r,s)=>{r.forEach(d=>{s.setAttribute(d.name,`url('${e}#${d.value}')`)})})}_cacheChildrenWithExternalReferences(e){const i=e.querySelectorAll(O9),r=this._elementsWithExternalReferences=this._elementsWithExternalReferences||new Map;for(let s=0;s{const _=i[s],w=_.getAttribute(d),S=w?w.match(F9):null;if(S){let I=r.get(_);I||(I=[],r.set(_,I)),I.push({name:d,value:S[1]})}})}_updateSvgIcon(e){if(this._svgNamespace=null,this._svgName=null,this._currentIconFetch.unsubscribe(),e){const[i,r]=this._splitIconName(e);i&&(this._svgNamespace=i),r&&(this._svgName=r),this._currentIconFetch=this._iconRegistry.getNamedSvgIcon(r,i).pipe(Fo(1)).subscribe(s=>this._setSvgElement(s),s=>{this._errorHandler.handleError(new Error(`Error retrieving icon ${i}:${r}! ${s.message}`))})}}}return t.\u0275fac=function(e){return new(e||t)(z($t),z(RC),wa("aria-hidden"),z(R9),z(Ho),z(k9,8))},t.\u0275cmp=Rn({type:t,selectors:[["mat-icon"]],hostAttrs:["role","img",1,"mat-icon","notranslate"],hostVars:8,hostBindings:function(e,i){2&e&&(et("data-mat-icon-type",i._usingFontIcon()?"font":"svg")("data-mat-icon-name",i._svgName||i.fontIcon)("data-mat-icon-namespace",i._svgNamespace||i.fontSet)("fontIcon",i._usingFontIcon()?i.fontIcon:null),yi("mat-icon-inline",i.inline)("mat-icon-no-color","primary"!==i.color&&"accent"!==i.color&&"warn"!==i.color))},inputs:{color:"color",inline:"inline",svgIcon:"svgIcon",fontSet:"fontSet",fontIcon:"fontIcon"},exportAs:["matIcon"],features:[a],ngContentSelectors:S9,decls:1,vars:0,template:function(e,i){1&e&&(Tr(),Xi(0))},styles:[".mat-icon{-webkit-user-select:none;user-select:none;background-repeat:no-repeat;display:inline-block;fill:currentColor;height:24px;width:24px;overflow:hidden}.mat-icon.mat-icon-inline{font-size:inherit;height:inherit;line-height:inherit;width:inherit}.mat-icon.mat-ligature-font[fontIcon]::before{content:attr(fontIcon)}[dir=rtl] .mat-icon-rtl-mirror{transform:scale(-1, 1)}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon{display:block}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon-button .mat-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon-button .mat-icon{margin:auto}"],encapsulation:2,changeDetection:0}),t})(),kF=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=cn({type:t}),t.\u0275inj=nn({imports:[oi,oi]}),t})();const L9=["*",[["mat-toolbar-row"]]],B9=["*","mat-toolbar-row"],N9=Vf(class{constructor(t){this._elementRef=t}});let RF=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=Ge({type:t,selectors:[["mat-toolbar-row"]],hostAttrs:[1,"mat-toolbar-row"],exportAs:["matToolbarRow"]}),t})(),IE=(()=>{class t extends N9{constructor(e,i,r){super(e),this._platform=i,this._document=r}ngAfterViewInit(){this._platform.isBrowser&&(this._checkToolbarMixedModes(),this._toolbarRows.changes.subscribe(()=>this._checkToolbarMixedModes()))}_checkToolbarMixedModes(){}}return t.\u0275fac=function(e){return new(e||t)(z($t),z(Co),z(Bn))},t.\u0275cmp=Rn({type:t,selectors:[["mat-toolbar"]],contentQueries:function(e,i,r){if(1&e&&Ui(r,RF,5),2&e){let s;fn(s=mn())&&(i._toolbarRows=s)}},hostAttrs:[1,"mat-toolbar"],hostVars:4,hostBindings:function(e,i){2&e&&yi("mat-toolbar-multiple-rows",i._toolbarRows.length>0)("mat-toolbar-single-row",0===i._toolbarRows.length)},inputs:{color:"color"},exportAs:["matToolbar"],features:[a],ngContentSelectors:B9,decls:2,vars:0,template:function(e,i){1&e&&(Tr(L9),Xi(0),Xi(1,1))},styles:[".cdk-high-contrast-active .mat-toolbar{outline:solid 1px}.mat-toolbar-row,.mat-toolbar-single-row{display:flex;box-sizing:border-box;padding:0 16px;width:100%;flex-direction:row;align-items:center;white-space:nowrap}.mat-toolbar-multiple-rows{display:flex;box-sizing:border-box;flex-direction:column;width:100%}"],encapsulation:2,changeDetection:0}),t})(),z9=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=cn({type:t}),t.\u0275inj=nn({imports:[oi,oi]}),t})();const PF=["mat-button",""],OF=["*"],U9=["mat-button","mat-flat-button","mat-icon-button","mat-raised-button","mat-stroked-button","mat-mini-fab","mat-fab"],j9=Vf(c_(Gf(class{constructor(t){this._elementRef=t}})));let Td=(()=>{class t extends j9{constructor(e,i,r){super(e),this._focusMonitor=i,this._animationMode=r,this.isRoundButton=this._hasHostAttributes("mat-fab","mat-mini-fab"),this.isIconButton=this._hasHostAttributes("mat-icon-button");for(const s of U9)this._hasHostAttributes(s)&&this._getHostElement().classList.add(s);e.nativeElement.classList.add("mat-button-base"),this.isRoundButton&&(this.color="accent")}ngAfterViewInit(){this._focusMonitor.monitor(this._elementRef,!0)}ngOnDestroy(){this._focusMonitor.stopMonitoring(this._elementRef)}focus(e,i){e?this._focusMonitor.focusVia(this._getHostElement(),e,i):this._getHostElement().focus(i)}_getHostElement(){return this._elementRef.nativeElement}_isRippleDisabled(){return this.disableRipple||this.disabled}_hasHostAttributes(...e){return e.some(i=>this._getHostElement().hasAttribute(i))}}return t.\u0275fac=function(e){return new(e||t)(z($t),z(Cc),z(Ta,8))},t.\u0275cmp=Rn({type:t,selectors:[["button","mat-button",""],["button","mat-raised-button",""],["button","mat-icon-button",""],["button","mat-fab",""],["button","mat-mini-fab",""],["button","mat-stroked-button",""],["button","mat-flat-button",""]],viewQuery:function(e,i){if(1&e&&Yi(mu,5),2&e){let r;fn(r=mn())&&(i.ripple=r.first)}},hostAttrs:[1,"mat-focus-indicator"],hostVars:5,hostBindings:function(e,i){2&e&&(et("disabled",i.disabled||null),yi("_mat-animation-noopable","NoopAnimations"===i._animationMode)("mat-button-disabled",i.disabled))},inputs:{disabled:"disabled",disableRipple:"disableRipple",color:"color"},exportAs:["matButton"],features:[a],attrs:PF,ngContentSelectors:OF,decls:4,vars:5,consts:[[1,"mat-button-wrapper"],["matRipple","",1,"mat-button-ripple",3,"matRippleDisabled","matRippleCentered","matRippleTrigger"],[1,"mat-button-focus-overlay"]],template:function(e,i){1&e&&(Tr(),se(0,"span",0),Xi(1),he(),ut(2,"span",1)(3,"span",2)),2&e&&(Se(2),yi("mat-button-ripple-round",i.isRoundButton||i.isIconButton),Ae("matRippleDisabled",i._isRippleDisabled())("matRippleCentered",i.isIconButton)("matRippleTrigger",i._getHostElement()))},dependencies:[mu],styles:[".mat-button .mat-button-focus-overlay,.mat-icon-button .mat-button-focus-overlay{opacity:0}.mat-button:hover:not(.mat-button-disabled) .mat-button-focus-overlay,.mat-stroked-button:hover:not(.mat-button-disabled) .mat-button-focus-overlay{opacity:.04}@media(hover: none){.mat-button:hover:not(.mat-button-disabled) .mat-button-focus-overlay,.mat-stroked-button:hover:not(.mat-button-disabled) .mat-button-focus-overlay{opacity:0}}.mat-button,.mat-icon-button,.mat-stroked-button,.mat-flat-button{box-sizing:border-box;position:relative;-webkit-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:rgba(0,0,0,0);display:inline-block;white-space:nowrap;text-decoration:none;vertical-align:baseline;text-align:center;margin:0;min-width:64px;line-height:36px;padding:0 16px;border-radius:4px;overflow:visible}.mat-button::-moz-focus-inner,.mat-icon-button::-moz-focus-inner,.mat-stroked-button::-moz-focus-inner,.mat-flat-button::-moz-focus-inner{border:0}.mat-button.mat-button-disabled,.mat-icon-button.mat-button-disabled,.mat-stroked-button.mat-button-disabled,.mat-flat-button.mat-button-disabled{cursor:default}.mat-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-button.cdk-program-focused .mat-button-focus-overlay,.mat-icon-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-icon-button.cdk-program-focused .mat-button-focus-overlay,.mat-stroked-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-stroked-button.cdk-program-focused .mat-button-focus-overlay,.mat-flat-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-flat-button.cdk-program-focused .mat-button-focus-overlay{opacity:.12}.mat-button::-moz-focus-inner,.mat-icon-button::-moz-focus-inner,.mat-stroked-button::-moz-focus-inner,.mat-flat-button::-moz-focus-inner{border:0}.mat-raised-button{box-sizing:border-box;position:relative;-webkit-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:rgba(0,0,0,0);display:inline-block;white-space:nowrap;text-decoration:none;vertical-align:baseline;text-align:center;margin:0;min-width:64px;line-height:36px;padding:0 16px;border-radius:4px;overflow:visible;transform:translate3d(0, 0, 0);transition:background 400ms cubic-bezier(0.25, 0.8, 0.25, 1),box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-raised-button::-moz-focus-inner{border:0}.mat-raised-button.mat-button-disabled{cursor:default}.mat-raised-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-raised-button.cdk-program-focused .mat-button-focus-overlay{opacity:.12}.mat-raised-button::-moz-focus-inner{border:0}.mat-raised-button._mat-animation-noopable{transition:none !important;animation:none !important}.mat-stroked-button{border:1px solid currentColor;padding:0 15px;line-height:34px}.mat-stroked-button .mat-button-ripple.mat-ripple,.mat-stroked-button .mat-button-focus-overlay{top:-1px;left:-1px;right:-1px;bottom:-1px}.mat-fab{box-sizing:border-box;position:relative;-webkit-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:rgba(0,0,0,0);display:inline-block;white-space:nowrap;text-decoration:none;vertical-align:baseline;text-align:center;margin:0;min-width:64px;line-height:36px;padding:0 16px;border-radius:4px;overflow:visible;transform:translate3d(0, 0, 0);transition:background 400ms cubic-bezier(0.25, 0.8, 0.25, 1),box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);min-width:0;border-radius:50%;width:56px;height:56px;padding:0;flex-shrink:0}.mat-fab::-moz-focus-inner{border:0}.mat-fab.mat-button-disabled{cursor:default}.mat-fab.cdk-keyboard-focused .mat-button-focus-overlay,.mat-fab.cdk-program-focused .mat-button-focus-overlay{opacity:.12}.mat-fab::-moz-focus-inner{border:0}.mat-fab._mat-animation-noopable{transition:none !important;animation:none !important}.mat-fab .mat-button-wrapper{padding:16px 0;display:inline-block;line-height:24px}.mat-mini-fab{box-sizing:border-box;position:relative;-webkit-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:rgba(0,0,0,0);display:inline-block;white-space:nowrap;text-decoration:none;vertical-align:baseline;text-align:center;margin:0;min-width:64px;line-height:36px;padding:0 16px;border-radius:4px;overflow:visible;transform:translate3d(0, 0, 0);transition:background 400ms cubic-bezier(0.25, 0.8, 0.25, 1),box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);min-width:0;border-radius:50%;width:40px;height:40px;padding:0;flex-shrink:0}.mat-mini-fab::-moz-focus-inner{border:0}.mat-mini-fab.mat-button-disabled{cursor:default}.mat-mini-fab.cdk-keyboard-focused .mat-button-focus-overlay,.mat-mini-fab.cdk-program-focused .mat-button-focus-overlay{opacity:.12}.mat-mini-fab::-moz-focus-inner{border:0}.mat-mini-fab._mat-animation-noopable{transition:none !important;animation:none !important}.mat-mini-fab .mat-button-wrapper{padding:8px 0;display:inline-block;line-height:24px}.mat-icon-button{padding:0;min-width:0;width:40px;height:40px;flex-shrink:0;line-height:40px;border-radius:50%}.mat-icon-button i,.mat-icon-button .mat-icon{line-height:24px}.mat-button-ripple.mat-ripple,.mat-button-focus-overlay{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:inherit}.mat-button-ripple.mat-ripple:not(:empty){transform:translateZ(0)}.mat-button-focus-overlay{opacity:0;transition:opacity 200ms cubic-bezier(0.35, 0, 0.25, 1),background-color 200ms cubic-bezier(0.35, 0, 0.25, 1)}._mat-animation-noopable .mat-button-focus-overlay{transition:none}.mat-button-ripple-round{border-radius:50%;z-index:1}.mat-button .mat-button-wrapper>*,.mat-flat-button .mat-button-wrapper>*,.mat-stroked-button .mat-button-wrapper>*,.mat-raised-button .mat-button-wrapper>*,.mat-icon-button .mat-button-wrapper>*,.mat-fab .mat-button-wrapper>*,.mat-mini-fab .mat-button-wrapper>*{vertical-align:middle}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon-button,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon-button{display:inline-flex;justify-content:center;align-items:center;font-size:inherit;width:2.5em;height:2.5em}.mat-flat-button::before,.mat-raised-button::before,.mat-fab::before,.mat-mini-fab::before{margin:calc(calc(var(--mat-focus-indicator-border-width, 3px) + 2px) * -1)}.mat-stroked-button::before{margin:calc(calc(var(--mat-focus-indicator-border-width, 3px) + 3px) * -1)}.cdk-high-contrast-active .mat-button,.cdk-high-contrast-active .mat-flat-button,.cdk-high-contrast-active .mat-raised-button,.cdk-high-contrast-active .mat-icon-button,.cdk-high-contrast-active .mat-fab,.cdk-high-contrast-active .mat-mini-fab{outline:solid 1px}"],encapsulation:2,changeDetection:0}),t})(),H9=(()=>{class t extends Td{constructor(e,i,r,s){super(i,e,r),this._ngZone=s,this._haltDisabledEvents=d=>{this.disabled&&(d.preventDefault(),d.stopImmediatePropagation())}}ngAfterViewInit(){super.ngAfterViewInit(),this._ngZone?this._ngZone.runOutsideAngular(()=>{this._elementRef.nativeElement.addEventListener("click",this._haltDisabledEvents)}):this._elementRef.nativeElement.addEventListener("click",this._haltDisabledEvents)}ngOnDestroy(){super.ngOnDestroy(),this._elementRef.nativeElement.removeEventListener("click",this._haltDisabledEvents)}}return t.\u0275fac=function(e){return new(e||t)(z(Cc),z($t),z(Ta,8),z(Ln,8))},t.\u0275cmp=Rn({type:t,selectors:[["a","mat-button",""],["a","mat-raised-button",""],["a","mat-icon-button",""],["a","mat-fab",""],["a","mat-mini-fab",""],["a","mat-stroked-button",""],["a","mat-flat-button",""]],hostAttrs:[1,"mat-focus-indicator"],hostVars:7,hostBindings:function(e,i){2&e&&(et("tabindex",i.disabled?-1:i.tabIndex)("disabled",i.disabled||null)("aria-disabled",i.disabled.toString()),yi("_mat-animation-noopable","NoopAnimations"===i._animationMode)("mat-button-disabled",i.disabled))},inputs:{disabled:"disabled",disableRipple:"disableRipple",color:"color",tabIndex:"tabIndex"},exportAs:["matButton","matAnchor"],features:[a],attrs:PF,ngContentSelectors:OF,decls:4,vars:5,consts:[[1,"mat-button-wrapper"],["matRipple","",1,"mat-button-ripple",3,"matRippleDisabled","matRippleCentered","matRippleTrigger"],[1,"mat-button-focus-overlay"]],template:function(e,i){1&e&&(Tr(),se(0,"span",0),Xi(1),he(),ut(2,"span",1)(3,"span",2)),2&e&&(Se(2),yi("mat-button-ripple-round",i.isRoundButton||i.isIconButton),Ae("matRippleDisabled",i._isRippleDisabled())("matRippleCentered",i.isIconButton)("matRippleTrigger",i._getHostElement()))},dependencies:[mu],styles:[".mat-button .mat-button-focus-overlay,.mat-icon-button .mat-button-focus-overlay{opacity:0}.mat-button:hover:not(.mat-button-disabled) .mat-button-focus-overlay,.mat-stroked-button:hover:not(.mat-button-disabled) .mat-button-focus-overlay{opacity:.04}@media(hover: none){.mat-button:hover:not(.mat-button-disabled) .mat-button-focus-overlay,.mat-stroked-button:hover:not(.mat-button-disabled) .mat-button-focus-overlay{opacity:0}}.mat-button,.mat-icon-button,.mat-stroked-button,.mat-flat-button{box-sizing:border-box;position:relative;-webkit-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:rgba(0,0,0,0);display:inline-block;white-space:nowrap;text-decoration:none;vertical-align:baseline;text-align:center;margin:0;min-width:64px;line-height:36px;padding:0 16px;border-radius:4px;overflow:visible}.mat-button::-moz-focus-inner,.mat-icon-button::-moz-focus-inner,.mat-stroked-button::-moz-focus-inner,.mat-flat-button::-moz-focus-inner{border:0}.mat-button.mat-button-disabled,.mat-icon-button.mat-button-disabled,.mat-stroked-button.mat-button-disabled,.mat-flat-button.mat-button-disabled{cursor:default}.mat-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-button.cdk-program-focused .mat-button-focus-overlay,.mat-icon-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-icon-button.cdk-program-focused .mat-button-focus-overlay,.mat-stroked-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-stroked-button.cdk-program-focused .mat-button-focus-overlay,.mat-flat-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-flat-button.cdk-program-focused .mat-button-focus-overlay{opacity:.12}.mat-button::-moz-focus-inner,.mat-icon-button::-moz-focus-inner,.mat-stroked-button::-moz-focus-inner,.mat-flat-button::-moz-focus-inner{border:0}.mat-raised-button{box-sizing:border-box;position:relative;-webkit-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:rgba(0,0,0,0);display:inline-block;white-space:nowrap;text-decoration:none;vertical-align:baseline;text-align:center;margin:0;min-width:64px;line-height:36px;padding:0 16px;border-radius:4px;overflow:visible;transform:translate3d(0, 0, 0);transition:background 400ms cubic-bezier(0.25, 0.8, 0.25, 1),box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-raised-button::-moz-focus-inner{border:0}.mat-raised-button.mat-button-disabled{cursor:default}.mat-raised-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-raised-button.cdk-program-focused .mat-button-focus-overlay{opacity:.12}.mat-raised-button::-moz-focus-inner{border:0}.mat-raised-button._mat-animation-noopable{transition:none !important;animation:none !important}.mat-stroked-button{border:1px solid currentColor;padding:0 15px;line-height:34px}.mat-stroked-button .mat-button-ripple.mat-ripple,.mat-stroked-button .mat-button-focus-overlay{top:-1px;left:-1px;right:-1px;bottom:-1px}.mat-fab{box-sizing:border-box;position:relative;-webkit-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:rgba(0,0,0,0);display:inline-block;white-space:nowrap;text-decoration:none;vertical-align:baseline;text-align:center;margin:0;min-width:64px;line-height:36px;padding:0 16px;border-radius:4px;overflow:visible;transform:translate3d(0, 0, 0);transition:background 400ms cubic-bezier(0.25, 0.8, 0.25, 1),box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);min-width:0;border-radius:50%;width:56px;height:56px;padding:0;flex-shrink:0}.mat-fab::-moz-focus-inner{border:0}.mat-fab.mat-button-disabled{cursor:default}.mat-fab.cdk-keyboard-focused .mat-button-focus-overlay,.mat-fab.cdk-program-focused .mat-button-focus-overlay{opacity:.12}.mat-fab::-moz-focus-inner{border:0}.mat-fab._mat-animation-noopable{transition:none !important;animation:none !important}.mat-fab .mat-button-wrapper{padding:16px 0;display:inline-block;line-height:24px}.mat-mini-fab{box-sizing:border-box;position:relative;-webkit-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:rgba(0,0,0,0);display:inline-block;white-space:nowrap;text-decoration:none;vertical-align:baseline;text-align:center;margin:0;min-width:64px;line-height:36px;padding:0 16px;border-radius:4px;overflow:visible;transform:translate3d(0, 0, 0);transition:background 400ms cubic-bezier(0.25, 0.8, 0.25, 1),box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);min-width:0;border-radius:50%;width:40px;height:40px;padding:0;flex-shrink:0}.mat-mini-fab::-moz-focus-inner{border:0}.mat-mini-fab.mat-button-disabled{cursor:default}.mat-mini-fab.cdk-keyboard-focused .mat-button-focus-overlay,.mat-mini-fab.cdk-program-focused .mat-button-focus-overlay{opacity:.12}.mat-mini-fab::-moz-focus-inner{border:0}.mat-mini-fab._mat-animation-noopable{transition:none !important;animation:none !important}.mat-mini-fab .mat-button-wrapper{padding:8px 0;display:inline-block;line-height:24px}.mat-icon-button{padding:0;min-width:0;width:40px;height:40px;flex-shrink:0;line-height:40px;border-radius:50%}.mat-icon-button i,.mat-icon-button .mat-icon{line-height:24px}.mat-button-ripple.mat-ripple,.mat-button-focus-overlay{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:inherit}.mat-button-ripple.mat-ripple:not(:empty){transform:translateZ(0)}.mat-button-focus-overlay{opacity:0;transition:opacity 200ms cubic-bezier(0.35, 0, 0.25, 1),background-color 200ms cubic-bezier(0.35, 0, 0.25, 1)}._mat-animation-noopable .mat-button-focus-overlay{transition:none}.mat-button-ripple-round{border-radius:50%;z-index:1}.mat-button .mat-button-wrapper>*,.mat-flat-button .mat-button-wrapper>*,.mat-stroked-button .mat-button-wrapper>*,.mat-raised-button .mat-button-wrapper>*,.mat-icon-button .mat-button-wrapper>*,.mat-fab .mat-button-wrapper>*,.mat-mini-fab .mat-button-wrapper>*{vertical-align:middle}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon-button,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon-button{display:inline-flex;justify-content:center;align-items:center;font-size:inherit;width:2.5em;height:2.5em}.mat-flat-button::before,.mat-raised-button::before,.mat-fab::before,.mat-mini-fab::before{margin:calc(calc(var(--mat-focus-indicator-border-width, 3px) + 2px) * -1)}.mat-stroked-button::before{margin:calc(calc(var(--mat-focus-indicator-border-width, 3px) + 3px) * -1)}.cdk-high-contrast-active .mat-button,.cdk-high-contrast-active .mat-flat-button,.cdk-high-contrast-active .mat-raised-button,.cdk-high-contrast-active .mat-icon-button,.cdk-high-contrast-active .mat-fab,.cdk-high-contrast-active .mat-mini-fab{outline:solid 1px}"],encapsulation:2,changeDetection:0}),t})(),w0=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=cn({type:t}),t.\u0275inj=nn({imports:[ep,oi,oi]}),t})(),$9=(()=>{class t{constructor(){this._vertical=!1,this._inset=!1}get vertical(){return this._vertical}set vertical(e){this._vertical=kn(e)}get inset(){return this._inset}set inset(e){this._inset=kn(e)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=Rn({type:t,selectors:[["mat-divider"]],hostAttrs:["role","separator",1,"mat-divider"],hostVars:7,hostBindings:function(e,i){2&e&&(et("aria-orientation",i.vertical?"vertical":"horizontal"),yi("mat-divider-vertical",i.vertical)("mat-divider-horizontal",!i.vertical)("mat-divider-inset",i.inset))},inputs:{vertical:"vertical",inset:"inset"},decls:0,vars:0,template:function(e,i){},styles:[".mat-divider{display:block;margin:0;border-top-width:1px;border-top-style:solid}.mat-divider.mat-divider-vertical{border-top:0;border-right-width:1px;border-right-style:solid}.mat-divider.mat-divider-inset{margin-left:80px}[dir=rtl] .mat-divider.mat-divider-inset{margin-left:auto;margin-right:80px}"],encapsulation:2,changeDetection:0}),t})(),W9=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=cn({type:t}),t.\u0275inj=nn({imports:[oi,oi]}),t})(),sW=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=cn({type:t}),t.\u0275inj=nn({imports:[QP,ep,oi,AD,Ia,QP,oi,AD,W9]}),t})(),aW=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=cn({type:t}),t.\u0275inj=nn({imports:[oi,oi]}),t})(),cW=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=cn({type:t}),t.\u0275inj=nn({imports:[Ia,oi,ip,ip,oi]}),t})();function LF(t){for(let n in t){let e=t[n]??"";switch(n){case"display":t.display="flex"===e?["-webkit-flex","flex"]:"inline-flex"===e?["-webkit-inline-flex","inline-flex"]:e;break;case"align-items":case"align-self":case"align-content":case"flex":case"flex-basis":case"flex-flow":case"flex-grow":case"flex-shrink":case"flex-wrap":case"justify-content":t["-webkit-"+n]=e;break;case"flex-direction":t["-webkit-flex-direction"]=e,t["flex-direction"]=e;break;case"order":t.order=t["-webkit-"+n]=isNaN(+e)?"0":e}}return t}const kE="inline",OC=["row","column","row-reverse","column-reverse"];function NF(t){t=t?.toLowerCase()??"";let[n,e,i]=t.split(" ");return OC.find(r=>r===n)||(n=OC[0]),e===kE&&(e=i!==kE?i:"",i=kE),[n,uW(e),!!i]}function C0(t){let[n]=NF(t);return n.indexOf("row")>-1}function uW(t){if(t)switch(t.toLowerCase()){case"reverse":case"wrap-reverse":case"reverse-wrap":t="wrap-reverse";break;case"no":case"none":case"nowrap":t="nowrap";break;default:t="wrap"}return t}function Ad(t,...n){if(null==t)throw TypeError("Cannot convert undefined or null to object");for(let e of n)if(null!=e)for(let i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);return t}const pW={provide:$M,useFactory:function hW(t,n){return()=>{if(bc(n)){const e=Array.from(t.querySelectorAll(`[class*=${zF}]`)),i=/\bflex-layout-.+?\b/g;e.forEach(r=>{r.classList.contains(`${zF}ssr`)&&r.parentNode?r.parentNode.removeChild(r):r.className.replace(i,"")})}}},deps:[Bn,zs],multi:!0},zF="flex-layout-";let RE=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=cn({type:t}),t.\u0275inj=nn({providers:[pW]}),t})();class tm{constructor(n=!1,e="all",i="",r="",s=0){this.matches=n,this.mediaQuery=e,this.mqAlias=i,this.suffix=r,this.priority=s,this.property=""}clone(){return new tm(this.matches,this.mediaQuery,this.mqAlias,this.suffix)}}let fW=(()=>{class t{constructor(){this.stylesheet=new Map}addStyleToElement(e,i,r){const s=this.stylesheet.get(e);s?s.set(i,r):this.stylesheet.set(e,new Map([[i,r]]))}clearStyles(){this.stylesheet.clear()}getStyleForElement(e,i){const r=this.stylesheet.get(e);let s="";if(r){const d=r.get(i);("number"==typeof d||"string"==typeof d)&&(s=d+"")}return s}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=rt({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();const PE={addFlexToParent:!0,addOrientationBps:!1,disableDefaultBps:!1,disableVendorPrefixes:!1,serverLoaded:!1,useColumnBasisZero:!0,printWithBreakpoints:[],mediaTriggerAutoRestore:!0,ssrObserveBreakpoints:[],multiplier:void 0,defaultUnit:"px",detectLayoutDisplay:!1},Mc=new vt("Flex Layout token, config options for the library",{providedIn:"root",factory:()=>PE}),__=new vt("FlexLayoutServerLoaded",{providedIn:"root",factory:()=>!1}),OE=new vt("Flex Layout token, collect all breakpoints into one provider",{providedIn:"root",factory:()=>null});function VF(t,n){return t=t?.clone()??new tm,n&&(t.mqAlias=n.alias,t.mediaQuery=n.mediaQuery,t.suffix=n.suffix,t.priority=n.priority),t}class lo{constructor(){this.shouldCache=!0}sideEffect(n,e,i){}}let Rr=(()=>{class t{constructor(e,i,r,s){this._serverStylesheet=e,this._serverModuleLoaded=i,this._platformId=r,this.layoutConfig=s}applyStyleToElement(e,i,r=null){let s={};"string"==typeof i&&(s[i]=r,i=s),s=this.layoutConfig.disableVendorPrefixes?i:LF(i),this._applyMultiValueStyleToElement(s,e)}applyStyleToElements(e,i=[]){const r=this.layoutConfig.disableVendorPrefixes?e:LF(e);i.forEach(s=>{this._applyMultiValueStyleToElement(r,s)})}getFlowDirection(e){const i="flex-direction";let r=this.lookupStyle(e,i);return[r||"row",this.lookupInlineStyle(e,i)||Rf(this._platformId)&&this._serverModuleLoaded?r:""]}hasWrap(e){return"wrap"===this.lookupStyle(e,"flex-wrap")}lookupAttributeValue(e,i){return e.getAttribute(i)??""}lookupInlineStyle(e,i){return bc(this._platformId)?e.style.getPropertyValue(i):function mW(t,n){return GF(t)[n]??""}(e,i)}lookupStyle(e,i,r=!1){let s="";return e&&((s=this.lookupInlineStyle(e,i))||(bc(this._platformId)?r||(s=getComputedStyle(e).getPropertyValue(i)):this._serverModuleLoaded&&(s=this._serverStylesheet.getStyleForElement(e,i)))),s?s.trim():""}_applyMultiValueStyleToElement(e,i){Object.keys(e).sort().forEach(r=>{const s=e[r],d=Array.isArray(s)?s:[s];d.sort();for(let _ of d)_=_?_+"":"",bc(this._platformId)||!this._serverModuleLoaded?bc(this._platformId)?i.style.setProperty(r,_):gW(i,r,_):this._serverStylesheet.addStyleToElement(i,r,_)})}}return t.\u0275fac=function(e){return new(e||t)(we(fW),we(__),we(zs),we(Mc))},t.\u0275prov=rt({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();function gW(t,n,e){n=n.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();const i=GF(t);i[n]=e??"",function _W(t,n){let e="";for(const i in n)n[i]&&(e+=`${i}:${n[i]};`);t.setAttribute("style",e)}(t,i)}function GF(t){const n={},e=t.getAttribute("style");if(e){const i=e.split(/;+/g);for(let r=0;r0){const d=s.indexOf(":");if(-1===d)throw new Error(`Invalid CSS style: ${s}`);n[s.substr(0,d).trim()]=s.substr(d+1).trim()}}}return n}function M0(t,n){return(n&&n.priority||0)-(t&&t.priority||0)}function yW(t,n){return(t.priority||0)-(n.priority||0)}let FE=(()=>{class t{constructor(e,i,r){this._zone=e,this._platformId=i,this._document=r,this.source=new ss(new tm(!0)),this.registry=new Map,this.pendingRemoveListenerFns=[],this._observable$=this.source.asObservable()}get activations(){const e=[];return this.registry.forEach((i,r)=>{i.matches&&e.push(r)}),e}isActive(e){return this.registry.get(e)?.matches??this.registerQuery(e).some(r=>r.matches)}observe(e,i=!1){if(e&&e.length){const r=this._observable$.pipe(Zr(d=>!i||e.indexOf(d.mediaQuery)>-1));return mr(new xn(d=>{const _=this.registerQuery(e);if(_.length){const w=_.pop();_.forEach(S=>{d.next(S)}),this.source.next(w)}d.complete()}),r)}return this._observable$}registerQuery(e){const i=Array.isArray(e)?e:[e],r=[];return function vW(t,n){const e=t.filter(i=>!UF[i]);if(e.length>0){const i=e.join(", ");try{const r=n.createElement("style");r.setAttribute("type","text/css"),r.styleSheet||r.appendChild(n.createTextNode(`\n/*\n @angular/flex-layout - workaround for possible browser quirk with mediaQuery listeners\n see http://bit.ly/2sd4HMP\n*/\n@media ${i} {.fx-query-test{ }}\n`)),n.head.appendChild(r),e.forEach(s=>UF[s]=r)}catch(r){console.error(r)}}}(i,this._document),i.forEach(s=>{const d=w=>{this._zone.run(()=>this.source.next(new tm(w.matches,s)))};let _=this.registry.get(s);_||(_=this.buildMQL(s),_.addListener(d),this.pendingRemoveListenerFns.push(()=>_.removeListener(d)),this.registry.set(s,_)),_.matches&&r.push(new tm(!0,s))}),r}ngOnDestroy(){let e;for(;e=this.pendingRemoveListenerFns.pop();)e()}buildMQL(e){return function xW(t,n){return n&&window.matchMedia("all").addListener?window.matchMedia(t):function bW(t){const n=new EventTarget;return n.matches="all"===t||""===t,n.media=t,n.addListener=()=>{},n.removeListener=()=>{},n.addEventListener=()=>{},n.dispatchEvent=()=>!1,n.onchange=null,n}(t)}(e,bc(this._platformId))}}return t.\u0275fac=function(e){return new(e||t)(we(Ln),we(zs),we(Bn))},t.\u0275prov=rt({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();const UF={},wW=[{alias:"xs",mediaQuery:"screen and (min-width: 0px) and (max-width: 599.98px)",priority:1e3},{alias:"sm",mediaQuery:"screen and (min-width: 600px) and (max-width: 959.98px)",priority:900},{alias:"md",mediaQuery:"screen and (min-width: 960px) and (max-width: 1279.98px)",priority:800},{alias:"lg",mediaQuery:"screen and (min-width: 1280px) and (max-width: 1919.98px)",priority:700},{alias:"xl",mediaQuery:"screen and (min-width: 1920px) and (max-width: 4999.98px)",priority:600},{alias:"lt-sm",overlapping:!0,mediaQuery:"screen and (max-width: 599.98px)",priority:950},{alias:"lt-md",overlapping:!0,mediaQuery:"screen and (max-width: 959.98px)",priority:850},{alias:"lt-lg",overlapping:!0,mediaQuery:"screen and (max-width: 1279.98px)",priority:750},{alias:"lt-xl",overlapping:!0,priority:650,mediaQuery:"screen and (max-width: 1919.98px)"},{alias:"gt-xs",overlapping:!0,mediaQuery:"screen and (min-width: 600px)",priority:-950},{alias:"gt-sm",overlapping:!0,mediaQuery:"screen and (min-width: 960px)",priority:-850},{alias:"gt-md",overlapping:!0,mediaQuery:"screen and (min-width: 1280px)",priority:-750},{alias:"gt-lg",overlapping:!0,mediaQuery:"screen and (min-width: 1920px)",priority:-650}],jF="(orientation: portrait) and (max-width: 599.98px)",HF="(orientation: landscape) and (max-width: 959.98px)",$F="(orientation: portrait) and (min-width: 600px) and (max-width: 839.98px)",WF="(orientation: landscape) and (min-width: 960px) and (max-width: 1279.98px)",qF="(orientation: portrait) and (min-width: 840px)",ZF="(orientation: landscape) and (min-width: 1280px)",Id={HANDSET:`${jF}, ${HF}`,TABLET:`${$F} , ${WF}`,WEB:`${qF}, ${ZF} `,HANDSET_PORTRAIT:`${jF}`,TABLET_PORTRAIT:`${$F} `,WEB_PORTRAIT:`${qF}`,HANDSET_LANDSCAPE:`${HF}`,TABLET_LANDSCAPE:`${WF}`,WEB_LANDSCAPE:`${ZF}`},CW=[{alias:"handset",priority:2e3,mediaQuery:Id.HANDSET},{alias:"handset.landscape",priority:2e3,mediaQuery:Id.HANDSET_LANDSCAPE},{alias:"handset.portrait",priority:2e3,mediaQuery:Id.HANDSET_PORTRAIT},{alias:"tablet",priority:2100,mediaQuery:Id.TABLET},{alias:"tablet.landscape",priority:2100,mediaQuery:Id.TABLET_LANDSCAPE},{alias:"tablet.portrait",priority:2100,mediaQuery:Id.TABLET_PORTRAIT},{alias:"web",priority:2200,mediaQuery:Id.WEB,overlapping:!0},{alias:"web.landscape",priority:2200,mediaQuery:Id.WEB_LANDSCAPE,overlapping:!0},{alias:"web.portrait",priority:2200,mediaQuery:Id.WEB_PORTRAIT,overlapping:!0}],MW=/(\.|-|_)/g;function SW(t){let n=t.length>0?t.charAt(0):"",e=t.length>1?t.slice(1):"";return n.toUpperCase()+e}const AW=new vt("Token (@angular/flex-layout) Breakpoints",{providedIn:"root",factory:()=>{const t=Fn(OE),n=Fn(Mc),e=[].concat.apply([],(t||[]).map(r=>Array.isArray(r)?r:[r]));return function TW(t,n=[]){const e={};return t.forEach(i=>{e[i.alias]=i}),n.forEach(i=>{e[i.alias]?Ad(e[i.alias],i):e[i.alias]=i}),function EW(t){return t.forEach(n=>{n.suffix||(n.suffix=function DW(t){return t.replace(MW,"|").split("|").map(SW).join("")}(n.alias),n.overlapping=!!n.overlapping)}),t}(Object.keys(e).map(i=>e[i]))}((n.disableDefaultBps?[]:wW).concat(n.addOrientationBps?CW:[]),e)}});let LE=(()=>{class t{constructor(e){this.findByMap=new Map,this.items=[...e].sort(yW)}findByAlias(e){return e?this.findWithPredicate(e,i=>i.alias===e):null}findByQuery(e){return this.findWithPredicate(e,i=>i.mediaQuery===e)}get overlappings(){return this.items.filter(e=>e.overlapping)}get aliases(){return this.items.map(e=>e.alias)}get suffixes(){return this.items.map(e=>e?.suffix??"")}findWithPredicate(e,i){let r=this.findByMap.get(e);return r||(r=this.items.find(i)??null,this.findByMap.set(e,r)),r??null}}return t.\u0275fac=function(e){return new(e||t)(we(AW))},t.\u0275prov=rt({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();const y_="print",IW={alias:y_,mediaQuery:y_,priority:1e3};let kW=(()=>{class t{constructor(e,i,r){this.breakpoints=e,this.layoutConfig=i,this._document=r,this.registeredBeforeAfterPrintHooks=!1,this.isPrintingBeforeAfterEvent=!1,this.beforePrintEventListeners=[],this.afterPrintEventListeners=[],this.formerActivations=null,this.isPrinting=!1,this.queue=new RW,this.deactivations=[]}withPrintQuery(e){return[...e,y_]}isPrintEvent(e){return e.mediaQuery.startsWith(y_)}get printAlias(){return[...this.layoutConfig.printWithBreakpoints??[]]}get printBreakPoints(){return this.printAlias.map(e=>this.breakpoints.findByAlias(e)).filter(e=>null!==e)}getEventBreakpoints({mediaQuery:e}){const i=this.breakpoints.findByQuery(e);return(i?[...this.printBreakPoints,i]:this.printBreakPoints).sort(M0)}updateEvent(e){let i=this.breakpoints.findByQuery(e.mediaQuery);return this.isPrintEvent(e)&&(i=this.getEventBreakpoints(e)[0],e.mediaQuery=i?.mediaQuery??""),VF(e,i)}registerBeforeAfterPrintHooks(e){if(!this._document.defaultView||this.registeredBeforeAfterPrintHooks)return;this.registeredBeforeAfterPrintHooks=!0;const i=()=>{this.isPrinting||(this.isPrintingBeforeAfterEvent=!0,this.startPrinting(e,this.getEventBreakpoints(new tm(!0,y_))),e.updateStyles())},r=()=>{this.isPrintingBeforeAfterEvent=!1,this.isPrinting&&(this.stopPrinting(e),e.updateStyles())};this._document.defaultView.addEventListener("beforeprint",i),this._document.defaultView.addEventListener("afterprint",r),this.beforePrintEventListeners.push(i),this.afterPrintEventListeners.push(r)}interceptEvents(e){return i=>{this.isPrintEvent(i)?i.matches&&!this.isPrinting?(this.startPrinting(e,this.getEventBreakpoints(i)),e.updateStyles()):!i.matches&&this.isPrinting&&!this.isPrintingBeforeAfterEvent&&(this.stopPrinting(e),e.updateStyles()):this.collectActivations(e,i)}}blockPropagation(){return e=>!(this.isPrinting||this.isPrintEvent(e))}startPrinting(e,i){this.isPrinting=!0,this.formerActivations=e.activatedBreakpoints,e.activatedBreakpoints=this.queue.addPrintBreakpoints(i)}stopPrinting(e){e.activatedBreakpoints=this.deactivations,this.deactivations=[],this.formerActivations=null,this.queue.clear(),this.isPrinting=!1}collectActivations(e,i){if(!this.isPrinting||this.isPrintingBeforeAfterEvent){if(!this.isPrintingBeforeAfterEvent)return void(this.deactivations=[]);if(!i.matches){const r=this.breakpoints.findByQuery(i.mediaQuery);if(r){const s=this.formerActivations&&this.formerActivations.includes(r),d=!this.formerActivations&&e.activatedBreakpoints.includes(r);(s||d)&&(this.deactivations.push(r),this.deactivations.sort(M0))}}}}ngOnDestroy(){this._document.defaultView&&(this.beforePrintEventListeners.forEach(e=>this._document.defaultView.removeEventListener("beforeprint",e)),this.afterPrintEventListeners.forEach(e=>this._document.defaultView.removeEventListener("afterprint",e)))}}return t.\u0275fac=function(e){return new(e||t)(we(LE),we(Mc),we(Bn))},t.\u0275prov=rt({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();class RW{constructor(){this.printBreakpoints=[]}addPrintBreakpoints(n){return n.push(IW),n.sort(M0),n.forEach(e=>this.addBreakpoint(e)),this.printBreakpoints}addBreakpoint(n){n&&void 0===this.printBreakpoints.find(i=>i.mediaQuery===n.mediaQuery)&&(this.printBreakpoints=function PW(t){return t?.mediaQuery.startsWith(y_)??!1}(n)?[n,...this.printBreakpoints]:[...this.printBreakpoints,n])}clear(){this.printBreakpoints=[]}}let Br=(()=>{class t{constructor(e,i,r){this.matchMedia=e,this.breakpoints=i,this.hook=r,this._useFallbacks=!0,this._activatedBreakpoints=[],this.elementMap=new Map,this.elementKeyMap=new WeakMap,this.watcherMap=new WeakMap,this.updateMap=new WeakMap,this.clearMap=new WeakMap,this.subject=new Zt,this.observeActivations()}get activatedAlias(){return this.activatedBreakpoints[0]?.alias??""}set activatedBreakpoints(e){this._activatedBreakpoints=[...e]}get activatedBreakpoints(){return[...this._activatedBreakpoints]}set useFallbacks(e){this._useFallbacks=e}onMediaChange(e){const i=this.findByQuery(e.mediaQuery);if(i){e=VF(e,i);const r=this.activatedBreakpoints.indexOf(i);e.matches&&-1===r?(this._activatedBreakpoints.push(i),this._activatedBreakpoints.sort(M0),this.updateStyles()):!e.matches&&-1!==r&&(this._activatedBreakpoints.splice(r,1),this._activatedBreakpoints.sort(M0),this.updateStyles())}}init(e,i,r,s,d=[]){XF(this.updateMap,e,i,r),XF(this.clearMap,e,i,s),this.buildElementKeyMap(e,i),this.watchExtraTriggers(e,i,d)}getValue(e,i,r){const s=this.elementMap.get(e);if(s){const d=void 0!==r?s.get(r):this.getActivatedValues(s,i);if(d)return d.get(i)}}hasValue(e,i){const r=this.elementMap.get(e);if(r){const s=this.getActivatedValues(r,i);if(s)return void 0!==s.get(i)||!1}return!1}setValue(e,i,r,s){let d=this.elementMap.get(e);if(d){const w=(d.get(s)??new Map).set(i,r);d.set(s,w),this.elementMap.set(e,d)}else d=(new Map).set(s,(new Map).set(i,r)),this.elementMap.set(e,d);const _=this.getValue(e,i);void 0!==_&&this.updateElement(e,i,_)}trackValue(e,i){return this.subject.asObservable().pipe(Zr(r=>r.element===e&&r.key===i))}updateStyles(){this.elementMap.forEach((e,i)=>{const r=new Set(this.elementKeyMap.get(i));let s=this.getActivatedValues(e);s&&s.forEach((d,_)=>{this.updateElement(i,_,d),r.delete(_)}),r.forEach(d=>{if(s=this.getActivatedValues(e,d),s){const _=s.get(d);this.updateElement(i,d,_)}else this.clearElement(i,d)})})}clearElement(e,i){const r=this.clearMap.get(e);if(r){const s=r.get(i);s&&(s(),this.subject.next({element:e,key:i,value:""}))}}updateElement(e,i,r){const s=this.updateMap.get(e);if(s){const d=s.get(i);d&&(d(r),this.subject.next({element:e,key:i,value:r}))}}releaseElement(e){const i=this.watcherMap.get(e);i&&(i.forEach(s=>s.unsubscribe()),this.watcherMap.delete(e));const r=this.elementMap.get(e);r&&(r.forEach((s,d)=>r.delete(d)),this.elementMap.delete(e))}triggerUpdate(e,i){const r=this.elementMap.get(e);if(r){const s=this.getActivatedValues(r,i);s&&(i?this.updateElement(e,i,s.get(i)):s.forEach((d,_)=>this.updateElement(e,_,d)))}}buildElementKeyMap(e,i){let r=this.elementKeyMap.get(e);r||(r=new Set,this.elementKeyMap.set(e,r)),r.add(i)}watchExtraTriggers(e,i,r){if(r&&r.length){let s=this.watcherMap.get(e);if(s||(s=new Map,this.watcherMap.set(e,s)),!s.get(i)){const _=mr(...r).subscribe(()=>{const w=this.getValue(e,i);this.updateElement(e,i,w)});s.set(i,_)}}}findByQuery(e){return this.breakpoints.findByQuery(e)}getActivatedValues(e,i){for(let s=0;si.mediaQuery);this.hook.registerBeforeAfterPrintHooks(this),this.matchMedia.observe(this.hook.withPrintQuery(e)).pipe(wo(this.hook.interceptEvents(this)),Zr(this.hook.blockPropagation())).subscribe(this.onMediaChange.bind(this))}}return t.\u0275fac=function(e){return new(e||t)(we(FE),we(LE),we(kW))},t.\u0275prov=rt({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();function XF(t,n,e,i){if(void 0!==i){const r=t.get(n)??new Map;r.set(e,i),t.set(n,r)}}let Xr=(()=>{class t{constructor(e,i,r,s){this.elementRef=e,this.styleBuilder=i,this.styler=r,this.marshal=s,this.DIRECTIVE_KEY="",this.inputs=[],this.mru={},this.destroySubject=new Zt,this.styleCache=new Map}get parentElement(){return this.elementRef.nativeElement.parentElement}get nativeElement(){return this.elementRef.nativeElement}get activatedValue(){return this.marshal.getValue(this.nativeElement,this.DIRECTIVE_KEY)}set activatedValue(e){this.marshal.setValue(this.nativeElement,this.DIRECTIVE_KEY,e,this.marshal.activatedAlias)}ngOnChanges(e){Object.keys(e).forEach(i=>{if(-1!==this.inputs.indexOf(i)){const r=i.split(".").slice(1).join(".");this.setValue(e[i].currentValue,r)}})}ngOnDestroy(){this.destroySubject.next(),this.destroySubject.complete(),this.marshal.releaseElement(this.nativeElement)}init(e=[]){this.marshal.init(this.elementRef.nativeElement,this.DIRECTIVE_KEY,this.updateWithValue.bind(this),this.clearStyles.bind(this),e)}addStyles(e,i){const r=this.styleBuilder,s=r.shouldCache;let d=this.styleCache.get(e);(!d||!s)&&(d=r.buildStyles(e,i),s&&this.styleCache.set(e,d)),this.mru={...d},this.applyStyleToElement(d),r.sideEffect(e,d,i)}clearStyles(){Object.keys(this.mru).forEach(e=>{this.mru[e]=""}),this.applyStyleToElement(this.mru),this.mru={},this.currentValue=void 0}triggerUpdate(){this.marshal.triggerUpdate(this.nativeElement,this.DIRECTIVE_KEY)}getFlexFlowDirection(e,i=!1){if(e){const[r,s]=this.styler.getFlowDirection(e);if(!s&&i){const d=function BF(t){let[n,e,i]=NF(t);return function dW(t,n=null,e=!1){return{display:e?"inline-flex":"flex","box-sizing":"border-box","flex-direction":t,"flex-wrap":n||null}}(n,e,i)}(r);this.styler.applyStyleToElements(d,[e])}return r.trim()}return"row"}hasWrap(e){return this.styler.hasWrap(e)}applyStyleToElement(e,i,r=this.nativeElement){this.styler.applyStyleToElement(r,e,i)}setValue(e,i){this.marshal.setValue(this.nativeElement,this.DIRECTIVE_KEY,e,i)}updateWithValue(e){this.currentValue!==e&&(this.addStyles(e),this.currentValue=e)}}return t.\u0275fac=function(e){return new(e||t)(z($t),z(lo),z(Rr),z(Br))},t.\u0275dir=Ge({type:t,features:[Hi]}),t})();class FW extends EventTarget{constructor(n){super(),this._mediaQuery=n,this._isActive=!1,this._listeners=[],this.onchange=null}get matches(){return this._isActive}get media(){return this._mediaQuery}destroy(){this.deactivate(),this._listeners=[]}activate(){return this._isActive||(this._isActive=!0,this._listeners.forEach(n=>{n.call(this,{matches:this.matches,media:this.media})})),this}deactivate(){return this._isActive&&(this._isActive=!1,this._listeners.forEach(n=>{n.call(this,{matches:this.matches,media:this.media})})),this}addListener(n){-1===this._listeners.indexOf(n)&&this._listeners.push(n),this._isActive&&n.call(this,{matches:this.matches,media:this.media})}removeListener(n){}dispatchEvent(n){return!1}}function YF(t,n="1",e="1"){let i=[n,e,t],r=t.indexOf("calc");if(r>0){i[2]=KF(t.substring(r).trim());let s=t.substr(0,r).trim().split(" ");2==s.length&&(i[0]=s[0],i[1]=s[1])}else if(0==r)i[2]=KF(t.trim());else{let s=t.split(" ");i=3===s.length?s:[n,e,t]}return i}function KF(t){return t.replace(/[\s]/g,"").replace(/[\/\*\+\-]/g," $& ")}let GW=(()=>{class t extends Xr{constructor(e,i,r,s,d,_,w){super(e,null,i,r),this.ngClassInstance=w,this.DIRECTIVE_KEY="ngClass",this.ngClassInstance||(this.ngClassInstance=new If(s,d,e,_)),this.init(),this.setValue("","")}set klass(e){this.ngClassInstance.klass=e,this.setValue(e,"")}updateWithValue(e){this.ngClassInstance.ngClass=e,this.ngClassInstance.ngDoCheck()}ngDoCheck(){this.ngClassInstance.ngDoCheck()}}return t.\u0275fac=function(e){return new(e||t)(z($t),z(Rr),z(Br),z(uu),z(Tf),z(Da),z(If,10))},t.\u0275dir=Ge({type:t,inputs:{klass:["class","klass"]},features:[a]}),t})();const UW=["ngClass","ngClass.xs","ngClass.sm","ngClass.md","ngClass.lg","ngClass.xl","ngClass.lt-sm","ngClass.lt-md","ngClass.lt-lg","ngClass.lt-xl","ngClass.gt-xs","ngClass.gt-sm","ngClass.gt-md","ngClass.gt-lg"];let BE=(()=>{class t extends GW{constructor(){super(...arguments),this.inputs=UW}}return t.\u0275fac=function(){let n;return function(i){return(n||(n=qt(t)))(i||t)}}(),t.\u0275dir=Ge({type:t,selectors:[["","ngClass",""],["","ngClass.xs",""],["","ngClass.sm",""],["","ngClass.md",""],["","ngClass.lg",""],["","ngClass.xl",""],["","ngClass.lt-sm",""],["","ngClass.lt-md",""],["","ngClass.lt-lg",""],["","ngClass.lt-xl",""],["","ngClass.gt-xs",""],["","ngClass.gt-sm",""],["","ngClass.gt-md",""],["","ngClass.gt-lg",""]],inputs:{ngClass:"ngClass","ngClass.xs":"ngClass.xs","ngClass.sm":"ngClass.sm","ngClass.md":"ngClass.md","ngClass.lg":"ngClass.lg","ngClass.xl":"ngClass.xl","ngClass.lt-sm":"ngClass.lt-sm","ngClass.lt-md":"ngClass.lt-md","ngClass.lt-lg":"ngClass.lt-lg","ngClass.lt-xl":"ngClass.lt-xl","ngClass.gt-xs":"ngClass.gt-xs","ngClass.gt-sm":"ngClass.gt-sm","ngClass.gt-md":"ngClass.gt-md","ngClass.gt-lg":"ngClass.gt-lg"},features:[a]}),t})(),jW=(()=>{class t extends lo{buildStyles(e,i){return{display:"true"===e?i.display||(i.isServer?"initial":""):"none"}}}return t.\u0275fac=function(){let n;return function(i){return(n||(n=qt(t)))(i||t)}}(),t.\u0275prov=rt({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),HW=(()=>{class t extends Xr{constructor(e,i,r,s,d,_,w){super(e,i,r,s),this.layoutConfig=d,this.platformId=_,this.serverModuleLoaded=w,this.DIRECTIVE_KEY="show-hide",this.display="",this.hasLayout=!1,this.hasFlexChild=!1}ngAfterViewInit(){this.trackExtraTriggers();const e=Array.from(this.nativeElement.children);for(let r=0;r{if(-1!==this.inputs.indexOf(i)){const r=i.split("."),s=r.slice(1).join("."),d=e[i].currentValue;let _=""===d||0!==d&&kn(d);"fxHide"===r[0]&&(_=!_),this.setValue(_,s)}})}trackExtraTriggers(){this.hasLayout=this.marshal.hasValue(this.nativeElement,"layout"),["layout","layout-align"].forEach(e=>{this.marshal.trackValue(this.nativeElement,e).pipe(ri(this.destroySubject)).subscribe(this.triggerUpdate.bind(this))})}getDisplayStyle(){return this.hasLayout||this.hasFlexChild&&this.layoutConfig.addFlexToParent?"flex":this.styler.lookupStyle(this.nativeElement,"display",!0)}updateWithValue(e=!0){if(""===e)return;const i=Rf(this.platformId);this.addStyles(e?"true":"false",{display:this.display,isServer:i}),i&&this.serverModuleLoaded&&this.nativeElement.style.setProperty("display",""),this.marshal.triggerUpdate(this.parentElement,"layout-gap")}}return t.\u0275fac=function(e){return new(e||t)(z($t),z(jW),z(Rr),z(Br),z(Mc),z(zs),z(__))},t.\u0275dir=Ge({type:t,features:[a,Hi]}),t})();const NE=new WeakMap,$W=["fxShow","fxShow.print","fxShow.xs","fxShow.sm","fxShow.md","fxShow.lg","fxShow.xl","fxShow.lt-sm","fxShow.lt-md","fxShow.lt-lg","fxShow.lt-xl","fxShow.gt-xs","fxShow.gt-sm","fxShow.gt-md","fxShow.gt-lg","fxHide","fxHide.print","fxHide.xs","fxHide.sm","fxHide.md","fxHide.lg","fxHide.xl","fxHide.lt-sm","fxHide.lt-md","fxHide.lt-lg","fxHide.lt-xl","fxHide.gt-xs","fxHide.gt-sm","fxHide.gt-md","fxHide.gt-lg"];let zE=(()=>{class t extends HW{constructor(){super(...arguments),this.inputs=$W}}return t.\u0275fac=function(){let n;return function(i){return(n||(n=qt(t)))(i||t)}}(),t.\u0275dir=Ge({type:t,selectors:[["","fxShow",""],["","fxShow.print",""],["","fxShow.xs",""],["","fxShow.sm",""],["","fxShow.md",""],["","fxShow.lg",""],["","fxShow.xl",""],["","fxShow.lt-sm",""],["","fxShow.lt-md",""],["","fxShow.lt-lg",""],["","fxShow.lt-xl",""],["","fxShow.gt-xs",""],["","fxShow.gt-sm",""],["","fxShow.gt-md",""],["","fxShow.gt-lg",""],["","fxHide",""],["","fxHide.print",""],["","fxHide.xs",""],["","fxHide.sm",""],["","fxHide.md",""],["","fxHide.lg",""],["","fxHide.xl",""],["","fxHide.lt-sm",""],["","fxHide.lt-md",""],["","fxHide.lt-lg",""],["","fxHide.lt-xl",""],["","fxHide.gt-xs",""],["","fxHide.gt-sm",""],["","fxHide.gt-md",""],["","fxHide.gt-lg",""]],inputs:{fxShow:"fxShow","fxShow.print":"fxShow.print","fxShow.xs":"fxShow.xs","fxShow.sm":"fxShow.sm","fxShow.md":"fxShow.md","fxShow.lg":"fxShow.lg","fxShow.xl":"fxShow.xl","fxShow.lt-sm":"fxShow.lt-sm","fxShow.lt-md":"fxShow.lt-md","fxShow.lt-lg":"fxShow.lt-lg","fxShow.lt-xl":"fxShow.lt-xl","fxShow.gt-xs":"fxShow.gt-xs","fxShow.gt-sm":"fxShow.gt-sm","fxShow.gt-md":"fxShow.gt-md","fxShow.gt-lg":"fxShow.gt-lg",fxHide:"fxHide","fxHide.print":"fxHide.print","fxHide.xs":"fxHide.xs","fxHide.sm":"fxHide.sm","fxHide.md":"fxHide.md","fxHide.lg":"fxHide.lg","fxHide.xl":"fxHide.xl","fxHide.lt-sm":"fxHide.lt-sm","fxHide.lt-md":"fxHide.lt-md","fxHide.lt-lg":"fxHide.lt-lg","fxHide.lt-xl":"fxHide.lt-xl","fxHide.gt-xs":"fxHide.gt-xs","fxHide.gt-sm":"fxHide.gt-sm","fxHide.gt-md":"fxHide.gt-md","fxHide.gt-lg":"fxHide.gt-lg"},features:[a]}),t})(),rL=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=cn({type:t}),t.\u0275inj=nn({imports:[RE]}),t})(),pq=(()=>{class t extends lo{constructor(e){super(),this.layoutConfig=e}buildStyles(e,i){let[r,s,...d]=e.split(" "),_=d.join(" ");const w=i.direction.indexOf("column")>-1?"column":"row",S=C0(w)?"max-width":"max-height",I=C0(w)?"min-width":"min-height",L=String(_).indexOf("calc")>-1,H=L||"auto"===_,Y=String(_).indexOf("%")>-1&&!L,ae=String(_).indexOf("px")>-1||String(_).indexOf("rem")>-1||String(_).indexOf("em")>-1||String(_).indexOf("vw")>-1||String(_).indexOf("vh")>-1;let ve=L||ae;r="0"==r?0:r,s="0"==s?0:s;const Be=!r&&!s;let $e={};const It={"max-width":null,"max-height":null,"min-width":null,"min-height":null};switch(_||""){case"":_="row"===w?"0%":!1!==this.layoutConfig.useColumnBasisZero?"0.000000001px":"auto";break;case"initial":case"nogrow":r=0,_="auto";break;case"grow":_="100%";break;case"noshrink":s=0,_="auto";break;case"auto":break;case"none":r=0,s=0,_="auto";break;default:!ve&&!Y&&!isNaN(_)&&(_+="%"),"0%"===_&&(ve=!0),"0px"===_&&(_="0%"),$e=Ad(It,L?{"flex-grow":r,"flex-shrink":s,"flex-basis":ve?_:"100%"}:{flex:`${r} ${s} ${ve?_:"100%"}`})}return $e.flex||$e["flex-grow"]||($e=Ad(It,L?{"flex-grow":r,"flex-shrink":s,"flex-basis":_}:{flex:`${r} ${s} ${_}`})),"0%"!==_&&"0px"!==_&&"0.000000001px"!==_&&"auto"!==_&&($e[I]=Be||ve&&r?_:null,$e[S]=Be||!H&&s?_:null),$e[I]||$e[S]?i.hasWrap&&($e[L?"flex-basis":"flex"]=$e[S]?L?$e[S]:`${r} ${s} ${$e[S]}`:L?$e[I]:`${r} ${s} ${$e[I]}`):$e=Ad(It,L?{"flex-grow":r,"flex-shrink":s,"flex-basis":_}:{flex:`${r} ${s} ${_}`}),Ad($e,{"box-sizing":"border-box"})}}return t.\u0275fac=function(e){return new(e||t)(we(Mc))},t.\u0275prov=rt({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();const fq=["fxFlex","fxFlex.xs","fxFlex.sm","fxFlex.md","fxFlex.lg","fxFlex.xl","fxFlex.lt-sm","fxFlex.lt-md","fxFlex.lt-lg","fxFlex.lt-xl","fxFlex.gt-xs","fxFlex.gt-sm","fxFlex.gt-md","fxFlex.gt-lg"];let mq=(()=>{class t extends Xr{constructor(e,i,r,s,d){super(e,s,i,d),this.layoutConfig=r,this.marshal=d,this.DIRECTIVE_KEY="flex",this.direction=void 0,this.wrap=void 0,this.flexGrow="1",this.flexShrink="1",this.init()}get shrink(){return this.flexShrink}set shrink(e){this.flexShrink=e||"1",this.triggerReflow()}get grow(){return this.flexGrow}set grow(e){this.flexGrow=e||"1",this.triggerReflow()}ngOnInit(){this.parentElement&&(this.marshal.trackValue(this.parentElement,"layout").pipe(ri(this.destroySubject)).subscribe(this.onLayoutChange.bind(this)),this.marshal.trackValue(this.nativeElement,"layout-align").pipe(ri(this.destroySubject)).subscribe(this.triggerReflow.bind(this)))}onLayoutChange(e){const r=e.value.split(" ");this.direction=r[0],this.wrap=void 0!==r[1]&&"wrap"===r[1],this.triggerUpdate()}updateWithValue(e){void 0===this.direction&&(this.direction=this.getFlexFlowDirection(this.parentElement,!1!==this.layoutConfig.addFlexToParent)),void 0===this.wrap&&(this.wrap=this.hasWrap(this.parentElement));const r=this.direction,s=r.startsWith("row"),d=this.wrap;s&&d?this.styleCache=yq:s&&!d?this.styleCache=gq:!s&&d?this.styleCache=vq:!s&&!d&&(this.styleCache=_q);const w=YF(String(e).replace(";",""),this.flexGrow,this.flexShrink);this.addStyles(w.join(" "),{direction:r,hasWrap:d})}triggerReflow(){const e=this.activatedValue;if(void 0!==e){const i=YF(e+"",this.flexGrow,this.flexShrink);this.marshal.updateElement(this.nativeElement,this.DIRECTIVE_KEY,i.join(" "))}}}return t.\u0275fac=function(e){return new(e||t)(z($t),z(Rr),z(Mc),z(pq),z(Br))},t.\u0275dir=Ge({type:t,inputs:{shrink:["fxShrink","shrink"],grow:["fxGrow","grow"]},features:[a]}),t})(),lL=(()=>{class t extends mq{constructor(){super(...arguments),this.inputs=fq}}return t.\u0275fac=function(){let n;return function(i){return(n||(n=qt(t)))(i||t)}}(),t.\u0275dir=Ge({type:t,selectors:[["","fxFlex",""],["","fxFlex.xs",""],["","fxFlex.sm",""],["","fxFlex.md",""],["","fxFlex.lg",""],["","fxFlex.xl",""],["","fxFlex.lt-sm",""],["","fxFlex.lt-md",""],["","fxFlex.lt-lg",""],["","fxFlex.lt-xl",""],["","fxFlex.gt-xs",""],["","fxFlex.gt-sm",""],["","fxFlex.gt-md",""],["","fxFlex.gt-lg",""]],inputs:{fxFlex:"fxFlex","fxFlex.xs":"fxFlex.xs","fxFlex.sm":"fxFlex.sm","fxFlex.md":"fxFlex.md","fxFlex.lg":"fxFlex.lg","fxFlex.xl":"fxFlex.xl","fxFlex.lt-sm":"fxFlex.lt-sm","fxFlex.lt-md":"fxFlex.lt-md","fxFlex.lt-lg":"fxFlex.lt-lg","fxFlex.lt-xl":"fxFlex.lt-xl","fxFlex.gt-xs":"fxFlex.gt-xs","fxFlex.gt-sm":"fxFlex.gt-sm","fxFlex.gt-md":"fxFlex.gt-md","fxFlex.gt-lg":"fxFlex.gt-lg"},features:[a]}),t})();const gq=new Map,_q=new Map,yq=new Map,vq=new Map;let cL=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=cn({type:t}),t.\u0275inj=nn({imports:[RE,zf]}),t})(),_L=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=cn({type:t}),t.\u0275inj=nn({imports:[RE]}),t})(),xX=(()=>{class t{constructor(e,i){Rf(i)&&!e&&console.warn("Warning: Flex Layout loaded on the server without FlexLayoutServerModule")}static withConfig(e,i=[]){return{ngModule:t,providers:e.serverLoaded?[{provide:Mc,useValue:{...PE,...e}},{provide:OE,useValue:i,multi:!0},{provide:__,useValue:!0}]:[{provide:Mc,useValue:{...PE,...e}},{provide:OE,useValue:i,multi:!0}]}}}return t.\u0275fac=function(e){return new(e||t)(we(__),we(zs))},t.\u0275mod=cn({type:t}),t.\u0275inj=nn({imports:[cL,rL,_L,cL,rL,_L]}),t})();class sp{}function yL(t){return Boolean(t.parentElement&&"picture"===t.parentElement.nodeName.toLowerCase())}function S0(t){return"img"===t.nodeName.toLowerCase()}function vL(t,n,e){return S0(t)?e&&"srcset"in t?t.srcset=n:t.src=n:t.style.backgroundImage=`url('${n}')`,t}function VE(t){return n=>{const e=n.parentElement.getElementsByTagName("source");for(let i=0;i{S0(n)&&yL(n)&&t(n),e&&vL(n,e,i)}}const SX=GE(CX),DX=GE(bL),EX=GE(MX);class TX{constructor(){this.navigator=function wX(){return typeof window<"u"?window.navigator:void 0}()}setPlatformId(n){this.platformId=n}onDestroy(n){}onAttributeChange(n){}}function xL(t,n){t.className=t.className.replace(n,"")}function UE(t,n){t.className.includes(n)||(t.className+=` ${n}`)}class IX extends TX{setup(n){SX(n.element,n.defaultImagePath,n.useSrcset),n.imagePath&&UE(n.element,"ng-lazyloading"),function AX(t,n){return t.className&&t.className.includes(n)}(n.element,"ng-lazyloaded")&&xL(n.element,"ng-lazyloaded")}finally(n){UE(n.element,"ng-lazyloaded"),xL(n.element,"ng-lazyloading")}loadImage(n){if(this.skipLazyLoading(n))return[n.imagePath];const{element:e,useSrcset:i,imagePath:r,decode:s}=n;let d;return S0(e)&&yL(e)?(d=e.parentNode.cloneNode(!0).getElementsByTagName("img")[0],bL(d),vL(d,r,i)):(d=new Image,S0(e)&&e.referrerPolicy&&(d.referrerPolicy=e.referrerPolicy),S0(e)&&e.sizes&&(d.sizes=e.sizes),i&&"srcset"in d?d.srcset=r:d.src=r),s&&d.decode?d.decode().then(()=>r):new Promise((_,w)=>{d.onload=()=>_(r),d.onerror=()=>w(null)})}setErrorImage(n,e){const{element:i,useSrcset:r,errorImagePath:s}=e;EX(i,s,r),UE(i,"ng-failed-lazyloaded")}setLoadedImage(n,e){const{element:i,useSrcset:r}=e;DX(i,n,r)}isDisabled(){return Rf(this.platformId)&&!this.isBot()}skipLazyLoading(n){return this.isBot(n)}isBot(n){return!!this.navigator?.userAgent&&/googlebot|bingbot|yandex|baiduspider|facebookexternalhit|twitterbot|rogerbot|linkedinbot|embedly|quora\ link\ preview|showyoubot|outbrain|pinterest\/0\.|pinterestbot|slackbot|vkShare|W3C_Validator|whatsapp|duckduckbot|prerender/i.test(this.navigator.userAgent)}}class kX extends IX{constructor(){super(...arguments),this.observers=new WeakMap,this.intersectionSubject=new Zt,this.uniqKey={}}getObservable(n){if(this.skipLazyLoading(n))return _n({isIntersecting:!0});if(n.customObservable)return n.customObservable;const e=n.scrollContainer||this.uniqKey,i={root:n.scrollContainer||null};n.offset&&(i.rootMargin=`${n.offset}px`);let r=this.observers.get(e);return r||(r=new IntersectionObserver(s=>this.loadingCallback(s),i),this.observers.set(e,r)),r.observe(n.element),xn.create(s=>{const d=this.intersectionSubject.pipe(Zr(_=>_.target===n.element)).subscribe(s);return()=>{d.unsubscribe(),r.unobserve(n.element)}})}isVisible(n){return n.isIntersecting}loadingCallback(n){n.forEach(e=>this.intersectionSubject.next(e))}}const RX=new vt("LazyLoadImageHooks");let wL=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=cn({type:t}),t.\u0275inj=nn({providers:[{provide:RX,useClass:kX}]}),t})();class Ll{constructor(n,e,i,r){this.left=n,this.top=e,this.right=i,this.bottom=r}static fromElement(n){const{left:e,top:i,right:r,bottom:s}=n.getBoundingClientRect();return 0===e&&0===i&&0===r&&0===s?Ll.empty:new Ll(e,i,r,s)}static fromWindow(n){return new Ll(0,0,n.innerWidth,n.innerHeight)}inflate(n){this.left-=n,this.top-=n,this.right+=n,this.bottom+=n}intersectsWith(n){return n.left=e&&s>=i?new Ll(e,i,r,s):Ll.empty}}Ll.empty=new Ll(0,0,0,0);const PX=["connectionContainer"],OX=["inputContainer"],FX=["label"];function LX(t,n){1&t&&(Li(0),se(1,"div",14),ut(2,"div",15)(3,"div",16)(4,"div",17),he(),se(5,"div",18),ut(6,"div",15)(7,"div",16)(8,"div",17),he(),Bi())}function BX(t,n){if(1&t){const e=wi();se(0,"div",19),Nt("cdkObserveContent",function(){return Wn(e),qn(Et().updateOutlineGap())}),Xi(1,1),he()}2&t&&Ae("cdkObserveContentDisabled","outline"!=Et().appearance)}function NX(t,n){if(1&t&&(Li(0),Xi(1,2),se(2,"span"),Ze(3),he(),Bi()),2&t){const e=Et(2);Se(3),Wr(e._control.placeholder)}}function zX(t,n){1&t&&Xi(0,3,["*ngSwitchCase","true"])}function VX(t,n){1&t&&(se(0,"span",23),Ze(1," *"),he())}function GX(t,n){if(1&t){const e=wi();se(0,"label",20,21),Nt("cdkObserveContent",function(){return Wn(e),qn(Et().updateOutlineGap())}),Mt(2,NX,4,1,"ng-container",12),Mt(3,zX,1,0,"ng-content",12),Mt(4,VX,2,0,"span",22),he()}if(2&t){const e=Et();yi("mat-empty",e._control.empty&&!e._shouldAlwaysFloat())("mat-form-field-empty",e._control.empty&&!e._shouldAlwaysFloat())("mat-accent","accent"==e.color)("mat-warn","warn"==e.color),Ae("cdkObserveContentDisabled","outline"!=e.appearance)("id",e._labelId)("ngSwitch",e._hasLabel()),et("for",e._control.id)("aria-owns",e._control.id),Se(2),Ae("ngSwitchCase",!1),Se(1),Ae("ngSwitchCase",!0),Se(1),Ae("ngIf",!e.hideRequiredMarker&&e._control.required&&!e._control.disabled)}}function UX(t,n){1&t&&(se(0,"div",24),Xi(1,4),he())}function jX(t,n){if(1&t&&(se(0,"div",25),ut(1,"span",26),he()),2&t){const e=Et();Se(1),yi("mat-accent","accent"==e.color)("mat-warn","warn"==e.color)}}function HX(t,n){1&t&&(se(0,"div"),Xi(1,5),he()),2&t&&Ae("@transitionMessages",Et()._subscriptAnimationState)}function $X(t,n){if(1&t&&(se(0,"div",30),Ze(1),he()),2&t){const e=Et(2);Ae("id",e._hintLabelId),Se(1),Wr(e.hintLabel)}}function WX(t,n){if(1&t&&(se(0,"div",27),Mt(1,$X,2,2,"div",28),Xi(2,6),ut(3,"div",29),Xi(4,7),he()),2&t){const e=Et();Ae("@transitionMessages",e._subscriptAnimationState),Se(1),Ae("ngIf",e.hintLabel)}}const qX=["*",[["","matPrefix",""]],[["mat-placeholder"]],[["mat-label"]],[["","matSuffix",""]],[["mat-error"]],[["mat-hint",3,"align","end"]],[["mat-hint","align","end"]]],ZX=["*","[matPrefix]","mat-placeholder","mat-label","[matSuffix]","mat-error","mat-hint:not([align='end'])","mat-hint[align='end']"];let XX=0;const CL=new vt("MatError");let YX=(()=>{class t{constructor(e,i){this.id="mat-error-"+XX++,e||i.nativeElement.setAttribute("aria-live","polite")}}return t.\u0275fac=function(e){return new(e||t)(wa("aria-live"),z($t))},t.\u0275dir=Ge({type:t,selectors:[["mat-error"]],hostAttrs:["aria-atomic","true",1,"mat-error"],hostVars:1,hostBindings:function(e,i){2&e&&et("id",i.id)},inputs:{id:"id"},features:[Pn([{provide:CL,useExisting:t}])]}),t})();const KX={transitionMessages:Xo("transitionMessages",[Ki("enter",Dn({opacity:1,transform:"translateY(0%)"})),dr("void => enter",[Dn({opacity:0,transform:"translateY(-5px)"}),yr("300ms cubic-bezier(0.55, 0, 0.55, 0.2)")])])};let BC=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=Ge({type:t}),t})(),QX=0;const ML=new vt("MatHint");let JX=(()=>{class t{constructor(){this.align="start",this.id="mat-hint-"+QX++}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=Ge({type:t,selectors:[["mat-hint"]],hostAttrs:[1,"mat-hint"],hostVars:4,hostBindings:function(e,i){2&e&&(et("id",i.id)("align",null),yi("mat-form-field-hint-end","end"===i.align))},inputs:{align:"align",id:"id"},features:[Pn([{provide:ML,useExisting:t}])]}),t})(),NC=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=Ge({type:t,selectors:[["mat-label"]]}),t})(),eY=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=Ge({type:t,selectors:[["mat-placeholder"]]}),t})();const tY=new vt("MatPrefix"),SL=new vt("MatSuffix");let nY=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=Ge({type:t,selectors:[["","matSuffix",""]],features:[Pn([{provide:SL,useExisting:t}])]}),t})(),DL=0;const rY=Vf(class{constructor(t){this._elementRef=t}},"primary"),oY=new vt("MAT_FORM_FIELD_DEFAULT_OPTIONS"),zC=new vt("MatFormField");let jE=(()=>{class t extends rY{constructor(e,i,r,s,d,_,w){super(e),this._changeDetectorRef=i,this._dir=r,this._defaults=s,this._platform=d,this._ngZone=_,this._outlineGapCalculationNeededImmediately=!1,this._outlineGapCalculationNeededOnStable=!1,this._destroyed=new Zt,this._hideRequiredMarker=!1,this._showAlwaysAnimate=!1,this._subscriptAnimationState="",this._hintLabel="",this._hintLabelId="mat-hint-"+DL++,this._labelId="mat-form-field-label-"+DL++,this.floatLabel=this._getDefaultFloatLabelState(),this._animationsEnabled="NoopAnimations"!==w,this.appearance=s?.appearance||"legacy",s&&(this._hideRequiredMarker=Boolean(s.hideRequiredMarker),s.color&&(this.color=this.defaultColor=s.color))}get appearance(){return this._appearance}set appearance(e){const i=this._appearance;this._appearance=e||this._defaults?.appearance||"legacy","outline"===this._appearance&&i!==e&&(this._outlineGapCalculationNeededOnStable=!0)}get hideRequiredMarker(){return this._hideRequiredMarker}set hideRequiredMarker(e){this._hideRequiredMarker=kn(e)}_shouldAlwaysFloat(){return"always"===this.floatLabel&&!this._showAlwaysAnimate}_canLabelFloat(){return"never"!==this.floatLabel}get hintLabel(){return this._hintLabel}set hintLabel(e){this._hintLabel=e,this._processHints()}get floatLabel(){return"legacy"!==this.appearance&&"never"===this._floatLabel?"auto":this._floatLabel}set floatLabel(e){e!==this._floatLabel&&(this._floatLabel=e||this._getDefaultFloatLabelState(),this._changeDetectorRef.markForCheck())}get _control(){return this._explicitFormFieldControl||this._controlNonStatic||this._controlStatic}set _control(e){this._explicitFormFieldControl=e}getLabelId(){return this._hasFloatingLabel()?this._labelId:null}getConnectedOverlayOrigin(){return this._connectionContainerRef||this._elementRef}ngAfterContentInit(){this._validateControlChild();const e=this._control;e.controlType&&this._elementRef.nativeElement.classList.add(`mat-form-field-type-${e.controlType}`),e.stateChanges.pipe(Vs(null)).subscribe(()=>{this._validatePlaceholders(),this._syncDescribedByIds(),this._changeDetectorRef.markForCheck()}),e.ngControl&&e.ngControl.valueChanges&&e.ngControl.valueChanges.pipe(ri(this._destroyed)).subscribe(()=>this._changeDetectorRef.markForCheck()),this._ngZone.runOutsideAngular(()=>{this._ngZone.onStable.pipe(ri(this._destroyed)).subscribe(()=>{this._outlineGapCalculationNeededOnStable&&this.updateOutlineGap()})}),mr(this._prefixChildren.changes,this._suffixChildren.changes).subscribe(()=>{this._outlineGapCalculationNeededOnStable=!0,this._changeDetectorRef.markForCheck()}),this._hintChildren.changes.pipe(Vs(null)).subscribe(()=>{this._processHints(),this._changeDetectorRef.markForCheck()}),this._errorChildren.changes.pipe(Vs(null)).subscribe(()=>{this._syncDescribedByIds(),this._changeDetectorRef.markForCheck()}),this._dir&&this._dir.change.pipe(ri(this._destroyed)).subscribe(()=>{"function"==typeof requestAnimationFrame?this._ngZone.runOutsideAngular(()=>{requestAnimationFrame(()=>this.updateOutlineGap())}):this.updateOutlineGap()})}ngAfterContentChecked(){this._validateControlChild(),this._outlineGapCalculationNeededImmediately&&this.updateOutlineGap()}ngAfterViewInit(){this._subscriptAnimationState="enter",this._changeDetectorRef.detectChanges()}ngOnDestroy(){this._destroyed.next(),this._destroyed.complete()}_shouldForward(e){const i=this._control?this._control.ngControl:null;return i&&i[e]}_hasPlaceholder(){return!!(this._control&&this._control.placeholder||this._placeholderChild)}_hasLabel(){return!(!this._labelChildNonStatic&&!this._labelChildStatic)}_shouldLabelFloat(){return this._canLabelFloat()&&(this._control&&this._control.shouldLabelFloat||this._shouldAlwaysFloat())}_hideControlPlaceholder(){return"legacy"===this.appearance&&!this._hasLabel()||this._hasLabel()&&!this._shouldLabelFloat()}_hasFloatingLabel(){return this._hasLabel()||"legacy"===this.appearance&&this._hasPlaceholder()}_getDisplayedMessages(){return this._errorChildren&&this._errorChildren.length>0&&this._control.errorState?"error":"hint"}_animateAndLockLabel(){this._hasFloatingLabel()&&this._canLabelFloat()&&(this._animationsEnabled&&this._label&&(this._showAlwaysAnimate=!0,d0(this._label.nativeElement,"transitionend").pipe(Fo(1)).subscribe(()=>{this._showAlwaysAnimate=!1})),this.floatLabel="always",this._changeDetectorRef.markForCheck())}_validatePlaceholders(){}_processHints(){this._validateHints(),this._syncDescribedByIds()}_validateHints(){}_getDefaultFloatLabelState(){return this._defaults&&this._defaults.floatLabel||"auto"}_syncDescribedByIds(){if(this._control){let e=[];if(this._control.userAriaDescribedBy&&"string"==typeof this._control.userAriaDescribedBy&&e.push(...this._control.userAriaDescribedBy.split(" ")),"hint"===this._getDisplayedMessages()){const i=this._hintChildren?this._hintChildren.find(s=>"start"===s.align):null,r=this._hintChildren?this._hintChildren.find(s=>"end"===s.align):null;i?e.push(i.id):this._hintLabel&&e.push(this._hintLabelId),r&&e.push(r.id)}else this._errorChildren&&e.push(...this._errorChildren.map(i=>i.id));this._control.setDescribedByIds(e)}}_validateControlChild(){}updateOutlineGap(){const e=this._label?this._label.nativeElement:null,i=this._connectionContainerRef.nativeElement,r=".mat-form-field-outline-start",s=".mat-form-field-outline-gap";if("outline"!==this.appearance||!this._platform.isBrowser)return;if(!e||!e.children.length||!e.textContent.trim()){const I=i.querySelectorAll(`${r}, ${s}`);for(let L=0;L0?.75*ae+10:0}for(let I=0;I{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=cn({type:t}),t.\u0275inj=nn({imports:[Ia,oi,zw,oi]}),t})();const sY=["trigger"],aY=["panel"];function lY(t,n){if(1&t&&(se(0,"span",8),Ze(1),he()),2&t){const e=Et();Se(1),Wr(e.placeholder)}}function cY(t,n){if(1&t&&(se(0,"span",12),Ze(1),he()),2&t){const e=Et(2);Se(1),Wr(e.triggerValue)}}function uY(t,n){1&t&&Xi(0,0,["*ngSwitchCase","true"])}function dY(t,n){1&t&&(se(0,"span",9),Mt(1,cY,2,1,"span",10),Mt(2,uY,1,0,"ng-content",11),he()),2&t&&(Ae("ngSwitch",!!Et().customTrigger),Se(2),Ae("ngSwitchCase",!0))}function hY(t,n){if(1&t){const e=wi();se(0,"div",13)(1,"div",14,15),Nt("@transformPanel.done",function(r){return Wn(e),qn(Et()._panelDoneAnimatingStream.next(r.toState))})("keydown",function(r){return Wn(e),qn(Et()._handleKeydown(r))}),Xi(3,1),he()()}if(2&t){const e=Et();Ae("@transformPanelWrap",void 0),Se(1),wM("mat-select-panel ",e._getPanelTheme(),""),pc("transform-origin",e._transformOrigin)("font-size",e._triggerFontSize,"px"),Ae("ngClass",e.panelClass)("@transformPanel",e.multiple?"showing-multiple":"showing"),et("id",e.id+"-panel")("aria-multiselectable",e.multiple)("aria-label",e.ariaLabel||null)("aria-labelledby",e._getPanelAriaLabelledby())}}const pY=[[["mat-select-trigger"]],"*"],fY=["mat-select-trigger","*"],TL={transformPanelWrap:Xo("transformPanelWrap",[dr("* => void",cC("@transformPanel",[lC()],{optional:!0}))]),transformPanel:Xo("transformPanel",[Ki("void",Dn({transform:"scaleY(0.8)",minWidth:"100%",opacity:0})),Ki("showing",Dn({opacity:1,minWidth:"calc(100% + 32px)",transform:"scaleY(1)"})),Ki("showing-multiple",Dn({opacity:1,minWidth:"calc(100% + 64px)",transform:"scaleY(1)"})),dr("void => *",yr("120ms cubic-bezier(0, 0, 0.2, 1)")),dr("* => void",yr("100ms 25ms linear",Dn({opacity:0})))])};let AL=0;const kL=new vt("mat-select-scroll-strategy"),yY=new vt("MAT_SELECT_CONFIG"),vY={provide:kL,deps:[ka],useFactory:function _Y(t){return()=>t.scrollStrategies.reposition()}};class bY{constructor(n,e){this.source=n,this.value=e}}const xY=Gf($w(c_(YP(class{constructor(t,n,e,i,r){this._elementRef=t,this._defaultErrorStateMatcher=n,this._parentForm=e,this._parentFormGroup=i,this.ngControl=r,this.stateChanges=new Zt}})))),wY=new vt("MatSelectTrigger");let CY=(()=>{class t extends xY{constructor(e,i,r,s,d,_,w,S,I,L,H,Y,ae,ve){super(d,s,w,S,L),this._viewportRuler=e,this._changeDetectorRef=i,this._ngZone=r,this._dir=_,this._parentFormField=I,this._liveAnnouncer=ae,this._defaultOptions=ve,this._panelOpen=!1,this._compareWith=(Be,$e)=>Be===$e,this._uid="mat-select-"+AL++,this._triggerAriaLabelledBy=null,this._destroy=new Zt,this._onChange=()=>{},this._onTouched=()=>{},this._valueId="mat-select-value-"+AL++,this._panelDoneAnimatingStream=new Zt,this._overlayPanelClass=this._defaultOptions?.overlayPanelClass||"",this._focused=!1,this.controlType="mat-select",this._multiple=!1,this._disableOptionCentering=this._defaultOptions?.disableOptionCentering??!1,this.ariaLabel="",this.optionSelectionChanges=Av(()=>{const Be=this.options;return Be?Be.changes.pipe(Vs(Be),Qa(()=>mr(...Be.map($e=>$e.onSelectionChange)))):this._ngZone.onStable.pipe(Fo(1),Qa(()=>this.optionSelectionChanges))}),this.openedChange=new In,this._openedStream=this.openedChange.pipe(Zr(Be=>Be),Jt(()=>{})),this._closedStream=this.openedChange.pipe(Zr(Be=>!Be),Jt(()=>{})),this.selectionChange=new In,this.valueChange=new In,this.ngControl&&(this.ngControl.valueAccessor=this),null!=ve?.typeaheadDebounceInterval&&(this._typeaheadDebounceInterval=ve.typeaheadDebounceInterval),this._scrollStrategyFactory=Y,this._scrollStrategy=this._scrollStrategyFactory(),this.tabIndex=parseInt(H)||0,this.id=this.id}get focused(){return this._focused||this._panelOpen}get placeholder(){return this._placeholder}set placeholder(e){this._placeholder=e,this.stateChanges.next()}get required(){return this._required??this.ngControl?.control?.hasValidator(so.required)??!1}set required(e){this._required=kn(e),this.stateChanges.next()}get multiple(){return this._multiple}set multiple(e){this._multiple=kn(e)}get disableOptionCentering(){return this._disableOptionCentering}set disableOptionCentering(e){this._disableOptionCentering=kn(e)}get compareWith(){return this._compareWith}set compareWith(e){this._compareWith=e,this._selectionModel&&this._initializeSelection()}get value(){return this._value}set value(e){this._assignValue(e)&&this._onChange(e)}get typeaheadDebounceInterval(){return this._typeaheadDebounceInterval}set typeaheadDebounceInterval(e){this._typeaheadDebounceInterval=wc(e)}get id(){return this._id}set id(e){this._id=e||this._uid,this.stateChanges.next()}ngOnInit(){this._selectionModel=new RD(this.multiple),this.stateChanges.next(),this._panelDoneAnimatingStream.pipe(yD(),ri(this._destroy)).subscribe(()=>this._panelDoneAnimating(this.panelOpen))}ngAfterContentInit(){this._initKeyManager(),this._selectionModel.changed.pipe(ri(this._destroy)).subscribe(e=>{e.added.forEach(i=>i.select()),e.removed.forEach(i=>i.deselect())}),this.options.changes.pipe(Vs(null),ri(this._destroy)).subscribe(()=>{this._resetOptions(),this._initializeSelection()})}ngDoCheck(){const e=this._getTriggerAriaLabelledby(),i=this.ngControl;if(e!==this._triggerAriaLabelledBy){const r=this._elementRef.nativeElement;this._triggerAriaLabelledBy=e,e?r.setAttribute("aria-labelledby",e):r.removeAttribute("aria-labelledby")}i&&(this._previousControl!==i.control&&(void 0!==this._previousControl&&null!==i.disabled&&i.disabled!==this.disabled&&(this.disabled=i.disabled),this._previousControl=i.control),this.updateErrorState())}ngOnChanges(e){(e.disabled||e.userAriaDescribedBy)&&this.stateChanges.next(),e.typeaheadDebounceInterval&&this._keyManager&&this._keyManager.withTypeAhead(this._typeaheadDebounceInterval)}ngOnDestroy(){this._destroy.next(),this._destroy.complete(),this.stateChanges.complete()}toggle(){this.panelOpen?this.close():this.open()}open(){this._canOpen()&&(this._panelOpen=!0,this._keyManager.withHorizontalOrientation(null),this._highlightCorrectOption(),this._changeDetectorRef.markForCheck())}close(){this._panelOpen&&(this._panelOpen=!1,this._keyManager.withHorizontalOrientation(this._isRtl()?"rtl":"ltr"),this._changeDetectorRef.markForCheck(),this._onTouched())}writeValue(e){this._assignValue(e)}registerOnChange(e){this._onChange=e}registerOnTouched(e){this._onTouched=e}setDisabledState(e){this.disabled=e,this._changeDetectorRef.markForCheck(),this.stateChanges.next()}get panelOpen(){return this._panelOpen}get selected(){return this.multiple?this._selectionModel?.selected||[]:this._selectionModel?.selected[0]}get triggerValue(){if(this.empty)return"";if(this._multiple){const e=this._selectionModel.selected.map(i=>i.viewValue);return this._isRtl()&&e.reverse(),e.join(", ")}return this._selectionModel.selected[0].viewValue}_isRtl(){return!!this._dir&&"rtl"===this._dir.value}_handleKeydown(e){this.disabled||(this.panelOpen?this._handleOpenKeydown(e):this._handleClosedKeydown(e))}_handleClosedKeydown(e){const i=e.keyCode,r=40===i||38===i||37===i||39===i,s=13===i||32===i,d=this._keyManager;if(!d.isTyping()&&s&&!xc(e)||(this.multiple||e.altKey)&&r)e.preventDefault(),this.open();else if(!this.multiple){const _=this.selected;d.onKeydown(e);const w=this.selected;w&&_!==w&&this._liveAnnouncer.announce(w.viewValue,1e4)}}_handleOpenKeydown(e){const i=this._keyManager,r=e.keyCode,s=40===r||38===r,d=i.isTyping();if(s&&e.altKey)e.preventDefault(),this.close();else if(d||13!==r&&32!==r||!i.activeItem||xc(e))if(!d&&this._multiple&&65===r&&e.ctrlKey){e.preventDefault();const _=this.options.some(w=>!w.disabled&&!w.selected);this.options.forEach(w=>{w.disabled||(_?w.select():w.deselect())})}else{const _=i.activeItemIndex;i.onKeydown(e),this._multiple&&s&&e.shiftKey&&i.activeItem&&i.activeItemIndex!==_&&i.activeItem._selectViaInteraction()}else e.preventDefault(),i.activeItem._selectViaInteraction()}_onFocus(){this.disabled||(this._focused=!0,this.stateChanges.next())}_onBlur(){this._focused=!1,!this.disabled&&!this.panelOpen&&(this._onTouched(),this._changeDetectorRef.markForCheck(),this.stateChanges.next())}_onAttached(){this._overlayDir.positionChange.pipe(Fo(1)).subscribe(()=>{this._changeDetectorRef.detectChanges(),this._positioningSettled()})}_getPanelTheme(){return this._parentFormField?`mat-${this._parentFormField.color}`:""}get empty(){return!this._selectionModel||this._selectionModel.isEmpty()}_initializeSelection(){Promise.resolve().then(()=>{this.ngControl&&(this._value=this.ngControl.value),this._setSelectionByValue(this._value),this.stateChanges.next()})}_setSelectionByValue(e){if(this._selectionModel.selected.forEach(i=>i.setInactiveStyles()),this._selectionModel.clear(),this.multiple&&e)Array.isArray(e),e.forEach(i=>this._selectOptionByValue(i)),this._sortValues();else{const i=this._selectOptionByValue(e);i?this._keyManager.updateActiveItem(i):this.panelOpen||this._keyManager.updateActiveItem(-1)}this._changeDetectorRef.markForCheck()}_selectOptionByValue(e){const i=this.options.find(r=>{if(this._selectionModel.isSelected(r))return!1;try{return null!=r.value&&this._compareWith(r.value,e)}catch{return!1}});return i&&this._selectionModel.select(i),i}_assignValue(e){return!!(e!==this._value||this._multiple&&Array.isArray(e))&&(this.options&&this._setSelectionByValue(e),this._value=e,!0)}_initKeyManager(){this._keyManager=new gH(this.options).withTypeAhead(this._typeaheadDebounceInterval).withVerticalOrientation().withHorizontalOrientation(this._isRtl()?"rtl":"ltr").withHomeAndEnd().withAllowedModifierKeys(["shiftKey"]),this._keyManager.tabOut.pipe(ri(this._destroy)).subscribe(()=>{this.panelOpen&&(!this.multiple&&this._keyManager.activeItem&&this._keyManager.activeItem._selectViaInteraction(),this.focus(),this.close())}),this._keyManager.change.pipe(ri(this._destroy)).subscribe(()=>{this._panelOpen&&this.panel?this._scrollOptionIntoView(this._keyManager.activeItemIndex||0):!this._panelOpen&&!this.multiple&&this._keyManager.activeItem&&this._keyManager.activeItem._selectViaInteraction()})}_resetOptions(){const e=mr(this.options.changes,this._destroy);this.optionSelectionChanges.pipe(ri(e)).subscribe(i=>{this._onSelect(i.source,i.isUserInput),i.isUserInput&&!this.multiple&&this._panelOpen&&(this.close(),this.focus())}),mr(...this.options.map(i=>i._stateChanges)).pipe(ri(e)).subscribe(()=>{this._changeDetectorRef.markForCheck(),this.stateChanges.next()})}_onSelect(e,i){const r=this._selectionModel.isSelected(e);null!=e.value||this._multiple?(r!==e.selected&&(e.selected?this._selectionModel.select(e):this._selectionModel.deselect(e)),i&&this._keyManager.setActiveItem(e),this.multiple&&(this._sortValues(),i&&this.focus())):(e.deselect(),this._selectionModel.clear(),null!=this.value&&this._propagateChanges(e.value)),r!==this._selectionModel.isSelected(e)&&this._propagateChanges(),this.stateChanges.next()}_sortValues(){if(this.multiple){const e=this.options.toArray();this._selectionModel.sort((i,r)=>this.sortComparator?this.sortComparator(i,r,e):e.indexOf(i)-e.indexOf(r)),this.stateChanges.next()}}_propagateChanges(e){let i=null;i=this.multiple?this.selected.map(r=>r.value):this.selected?this.selected.value:e,this._value=i,this.valueChange.emit(i),this._onChange(i),this.selectionChange.emit(this._getChangeEvent(i)),this._changeDetectorRef.markForCheck()}_highlightCorrectOption(){this._keyManager&&(this.empty?this._keyManager.setFirstItemActive():this._keyManager.setActiveItem(this._selectionModel.selected[0]))}_canOpen(){return!this._panelOpen&&!this.disabled&&this.options?.length>0}focus(e){this._elementRef.nativeElement.focus(e)}_getPanelAriaLabelledby(){if(this.ariaLabel)return null;const e=this._parentFormField?.getLabelId();return this.ariaLabelledby?(e?e+" ":"")+this.ariaLabelledby:e}_getAriaActiveDescendant(){return this.panelOpen&&this._keyManager&&this._keyManager.activeItem?this._keyManager.activeItem.id:null}_getTriggerAriaLabelledby(){if(this.ariaLabel)return null;const e=this._parentFormField?.getLabelId();let i=(e?e+" ":"")+this._valueId;return this.ariaLabelledby&&(i+=" "+this.ariaLabelledby),i}_panelDoneAnimating(e){this.openedChange.emit(e)}setDescribedByIds(e){e.length?this._elementRef.nativeElement.setAttribute("aria-describedby",e.join(" ")):this._elementRef.nativeElement.removeAttribute("aria-describedby")}onContainerClick(){this.focus(),this.open()}get shouldLabelFloat(){return this._panelOpen||!this.empty||this._focused&&!!this._placeholder}}return t.\u0275fac=function(e){return new(e||t)(z(f0),z(Lr),z(Ln),z(u_),z($t),z(sa,8),z(c0,8),z(Hf,8),z(zC,8),z(gu,10),wa("tabindex"),z(kL),z(CD),z(yY,8))},t.\u0275dir=Ge({type:t,viewQuery:function(e,i){if(1&e&&(Yi(sY,5),Yi(aY,5),Yi(G2,5)),2&e){let r;fn(r=mn())&&(i.trigger=r.first),fn(r=mn())&&(i.panel=r.first),fn(r=mn())&&(i._overlayDir=r.first)}},inputs:{userAriaDescribedBy:["aria-describedby","userAriaDescribedBy"],panelClass:"panelClass",placeholder:"placeholder",required:"required",multiple:"multiple",disableOptionCentering:"disableOptionCentering",compareWith:"compareWith",value:"value",ariaLabel:["aria-label","ariaLabel"],ariaLabelledby:["aria-labelledby","ariaLabelledby"],errorStateMatcher:"errorStateMatcher",typeaheadDebounceInterval:"typeaheadDebounceInterval",sortComparator:"sortComparator",id:"id"},outputs:{openedChange:"openedChange",_openedStream:"opened",_closedStream:"closed",selectionChange:"selectionChange",valueChange:"valueChange"},features:[a,Hi]}),t})(),RL=(()=>{class t extends CY{constructor(){super(...arguments),this._scrollTop=0,this._triggerFontSize=0,this._transformOrigin="top",this._offsetY=0,this._positions=[{originX:"start",originY:"top",overlayX:"start",overlayY:"top"},{originX:"start",originY:"bottom",overlayX:"start",overlayY:"bottom"}]}_calculateOverlayScroll(e,i,r){const s=this._getItemHeight();return Math.min(Math.max(0,s*e-i+s/2),r)}ngOnInit(){super.ngOnInit(),this._viewportRuler.change().pipe(ri(this._destroy)).subscribe(()=>{this.panelOpen&&(this._triggerRect=this.trigger.nativeElement.getBoundingClientRect(),this._changeDetectorRef.markForCheck())})}open(){super._canOpen()&&(super.open(),this._triggerRect=this.trigger.nativeElement.getBoundingClientRect(),this._triggerFontSize=parseInt(getComputedStyle(this.trigger.nativeElement).fontSize||"0"),this._calculateOverlayPosition(),this._ngZone.onStable.pipe(Fo(1)).subscribe(()=>{this._triggerFontSize&&this._overlayDir.overlayRef&&this._overlayDir.overlayRef.overlayElement&&(this._overlayDir.overlayRef.overlayElement.style.fontSize=`${this._triggerFontSize}px`)}))}_scrollOptionIntoView(e){const i=oO(e,this.options,this.optionGroups),r=this._getItemHeight();this.panel.nativeElement.scrollTop=0===e&&1===i?0:function d6(t,n,e,i){return te+i?Math.max(0,t-i+n):e}((e+i)*r,r,this.panel.nativeElement.scrollTop,256)}_positioningSettled(){this._calculateOverlayOffsetX(),this.panel.nativeElement.scrollTop=this._scrollTop}_panelDoneAnimating(e){this.panelOpen?this._scrollTop=0:(this._overlayDir.offsetX=0,this._changeDetectorRef.markForCheck()),super._panelDoneAnimating(e)}_getChangeEvent(e){return new bY(this,e)}_calculateOverlayOffsetX(){const e=this._overlayDir.overlayRef.overlayElement.getBoundingClientRect(),i=this._viewportRuler.getViewportSize(),r=this._isRtl(),s=this.multiple?56:32;let d;if(this.multiple)d=40;else if(this.disableOptionCentering)d=16;else{let S=this._selectionModel.selected[0]||this.options.first;d=S&&S.group?32:16}r||(d*=-1);const _=0-(e.left+d-(r?s:0)),w=e.right+d-i.width+(r?0:s);_>0?d+=_+8:w>0&&(d-=w+8),this._overlayDir.offsetX=Math.round(d),this._overlayDir.overlayRef.updatePosition()}_calculateOverlayOffsetY(e,i,r){const s=this._getItemHeight(),d=(s-this._triggerRect.height)/2,_=Math.floor(256/s);let w;return this.disableOptionCentering?0:(w=0===this._scrollTop?e*s:this._scrollTop===r?(e-(this._getItemCount()-_))*s+(s-(this._getItemCount()*s-256)%s):i-s/2,Math.round(-1*w-d))}_checkOverlayWithinViewport(e){const i=this._getItemHeight(),r=this._viewportRuler.getViewportSize(),s=this._triggerRect.top-8,d=r.height-this._triggerRect.bottom-8,_=Math.abs(this._offsetY),S=Math.min(this._getItemCount()*i,256)-_-this._triggerRect.height;S>d?this._adjustPanelUp(S,d):_>s?this._adjustPanelDown(_,s,e):this._transformOrigin=this._getOriginBasedOnOption()}_adjustPanelUp(e,i){const r=Math.round(e-i);this._scrollTop-=r,this._offsetY-=r,this._transformOrigin=this._getOriginBasedOnOption(),this._scrollTop<=0&&(this._scrollTop=0,this._offsetY=0,this._transformOrigin="50% bottom 0px")}_adjustPanelDown(e,i,r){const s=Math.round(e-i);if(this._scrollTop+=s,this._offsetY+=s,this._transformOrigin=this._getOriginBasedOnOption(),this._scrollTop>=r)return this._scrollTop=r,this._offsetY=0,void(this._transformOrigin="50% top 0px")}_calculateOverlayPosition(){const e=this._getItemHeight(),i=this._getItemCount(),r=Math.min(i*e,256),d=i*e-r;let _;_=this.empty?0:Math.max(this.options.toArray().indexOf(this._selectionModel.selected[0]),0),_+=oO(_,this.options,this.optionGroups);const w=r/2;this._scrollTop=this._calculateOverlayScroll(_,w,d),this._offsetY=this._calculateOverlayOffsetY(_,w,d),this._checkOverlayWithinViewport(d)}_getOriginBasedOnOption(){const e=this._getItemHeight(),i=(e-this._triggerRect.height)/2;return`50% ${Math.abs(this._offsetY)-i+e/2}px 0px`}_getItemHeight(){return 3*this._triggerFontSize}_getItemCount(){return this.options.length+this.optionGroups.length}}return t.\u0275fac=function(){let n;return function(i){return(n||(n=qt(t)))(i||t)}}(),t.\u0275cmp=Rn({type:t,selectors:[["mat-select"]],contentQueries:function(e,i,r){if(1&e&&(Ui(r,wY,5),Ui(r,ID,5),Ui(r,rO,5)),2&e){let s;fn(s=mn())&&(i.customTrigger=s.first),fn(s=mn())&&(i.options=s),fn(s=mn())&&(i.optionGroups=s)}},hostAttrs:["role","combobox","aria-autocomplete","none","aria-haspopup","true",1,"mat-select"],hostVars:19,hostBindings:function(e,i){1&e&&Nt("keydown",function(s){return i._handleKeydown(s)})("focus",function(){return i._onFocus()})("blur",function(){return i._onBlur()}),2&e&&(et("id",i.id)("tabindex",i.tabIndex)("aria-controls",i.panelOpen?i.id+"-panel":null)("aria-expanded",i.panelOpen)("aria-label",i.ariaLabel||null)("aria-required",i.required.toString())("aria-disabled",i.disabled.toString())("aria-invalid",i.errorState)("aria-activedescendant",i._getAriaActiveDescendant()),yi("mat-select-disabled",i.disabled)("mat-select-invalid",i.errorState)("mat-select-required",i.required)("mat-select-empty",i.empty)("mat-select-multiple",i.multiple))},inputs:{disabled:"disabled",disableRipple:"disableRipple",tabIndex:"tabIndex"},exportAs:["matSelect"],features:[Pn([{provide:BC,useExisting:t},{provide:iO,useExisting:t}]),a],ngContentSelectors:fY,decls:9,vars:12,consts:[["cdk-overlay-origin","",1,"mat-select-trigger",3,"click"],["origin","cdkOverlayOrigin","trigger",""],[1,"mat-select-value",3,"ngSwitch"],["class","mat-select-placeholder mat-select-min-line",4,"ngSwitchCase"],["class","mat-select-value-text",3,"ngSwitch",4,"ngSwitchCase"],[1,"mat-select-arrow-wrapper"],[1,"mat-select-arrow"],["cdk-connected-overlay","","cdkConnectedOverlayLockPosition","","cdkConnectedOverlayHasBackdrop","","cdkConnectedOverlayBackdropClass","cdk-overlay-transparent-backdrop",3,"cdkConnectedOverlayPanelClass","cdkConnectedOverlayScrollStrategy","cdkConnectedOverlayOrigin","cdkConnectedOverlayOpen","cdkConnectedOverlayPositions","cdkConnectedOverlayMinWidth","cdkConnectedOverlayOffsetY","backdropClick","attach","detach"],[1,"mat-select-placeholder","mat-select-min-line"],[1,"mat-select-value-text",3,"ngSwitch"],["class","mat-select-min-line",4,"ngSwitchDefault"],[4,"ngSwitchCase"],[1,"mat-select-min-line"],[1,"mat-select-panel-wrap"],["role","listbox","tabindex","-1",3,"ngClass","keydown"],["panel",""]],template:function(e,i){if(1&e&&(Tr(pY),se(0,"div",0,1),Nt("click",function(){return i.toggle()}),se(3,"div",2),Mt(4,lY,2,1,"span",3),Mt(5,dY,3,2,"span",4),he(),se(6,"div",5),ut(7,"div",6),he()(),Mt(8,hY,4,14,"ng-template",7),Nt("backdropClick",function(){return i.close()})("attach",function(){return i._onAttached()})("detach",function(){return i.close()})),2&e){const r=sr(1);et("aria-owns",i.panelOpen?i.id+"-panel":null),Se(3),Ae("ngSwitch",i.empty),et("id",i._valueId),Se(1),Ae("ngSwitchCase",!0),Se(1),Ae("ngSwitchCase",!1),Se(3),Ae("cdkConnectedOverlayPanelClass",i._overlayPanelClass)("cdkConnectedOverlayScrollStrategy",i._scrollStrategy)("cdkConnectedOverlayOrigin",r)("cdkConnectedOverlayOpen",i.panelOpen)("cdkConnectedOverlayPositions",i._positions)("cdkConnectedOverlayMinWidth",null==i._triggerRect?null:i._triggerRect.width)("cdkConnectedOverlayOffsetY",i._offsetY)}},dependencies:[If,kf,xv,yS,G2,V2],styles:['.mat-select{display:inline-block;width:100%;outline:none}.mat-select-trigger{display:inline-flex;align-items:center;cursor:pointer;position:relative;box-sizing:border-box;width:100%}.mat-select-disabled .mat-select-trigger{-webkit-user-select:none;user-select:none;cursor:default}.mat-select-value{width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mat-select-value-text{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mat-select-arrow-wrapper{height:16px;flex-shrink:0;display:inline-flex;align-items:center}.mat-form-field-appearance-fill .mat-select-arrow-wrapper{transform:translateY(-50%)}.mat-form-field-appearance-outline .mat-select-arrow-wrapper{transform:translateY(-25%)}.mat-form-field-appearance-standard.mat-form-field-has-label .mat-select:not(.mat-select-empty) .mat-select-arrow-wrapper{transform:translateY(-50%)}.mat-form-field-appearance-standard .mat-select.mat-select-empty .mat-select-arrow-wrapper{transition:transform 400ms cubic-bezier(0.25, 0.8, 0.25, 1)}._mat-animation-noopable.mat-form-field-appearance-standard .mat-select.mat-select-empty .mat-select-arrow-wrapper{transition:none}.mat-select-arrow{width:0;height:0;border-left:5px solid rgba(0,0,0,0);border-right:5px solid rgba(0,0,0,0);border-top:5px solid;margin:0 4px}.mat-form-field.mat-focused .mat-select-arrow{transform:translateX(0)}.mat-select-panel-wrap{flex-basis:100%}.mat-select-panel{min-width:112px;max-width:280px;overflow:auto;-webkit-overflow-scrolling:touch;padding-top:0;padding-bottom:0;max-height:256px;min-width:100%;border-radius:4px;outline:0}.cdk-high-contrast-active .mat-select-panel{outline:solid 1px}.mat-select-panel .mat-optgroup-label,.mat-select-panel .mat-option{font-size:inherit;line-height:3em;height:3em}.mat-form-field-type-mat-select:not(.mat-form-field-disabled) .mat-form-field-flex{cursor:pointer}.mat-form-field-type-mat-select .mat-form-field-label{width:calc(100% - 18px)}.mat-select-placeholder{transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}._mat-animation-noopable .mat-select-placeholder{transition:none}.mat-form-field-hide-placeholder .mat-select-placeholder{color:rgba(0,0,0,0);-webkit-text-fill-color:rgba(0,0,0,0);transition:none;display:block}.mat-select-min-line:empty::before{content:" ";white-space:pre;width:1px;display:inline-block;visibility:hidden}'],encapsulation:2,data:{animation:[TL.transformPanelWrap,TL.transformPanel]},changeDetection:0}),t})(),PL=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=cn({type:t}),t.\u0275inj=nn({providers:[vY],imports:[Ia,Xf,sO,oi,ip,VC,sO,oi]}),t})();const OL=s_({passive:!0});let MY=(()=>{class t{constructor(e,i){this._platform=e,this._ngZone=i,this._monitoredElements=new Map}monitor(e){if(!this._platform.isBrowser)return Kt;const i=Sd(e),r=this._monitoredElements.get(i);if(r)return r.subject;const s=new Zt,d="cdk-text-field-autofilled",_=w=>{"cdk-text-field-autofill-start"!==w.animationName||i.classList.contains(d)?"cdk-text-field-autofill-end"===w.animationName&&i.classList.contains(d)&&(i.classList.remove(d),this._ngZone.run(()=>s.next({target:w.target,isAutofilled:!1}))):(i.classList.add(d),this._ngZone.run(()=>s.next({target:w.target,isAutofilled:!0})))};return this._ngZone.runOutsideAngular(()=>{i.addEventListener("animationstart",_,OL),i.classList.add("cdk-text-field-autofill-monitored")}),this._monitoredElements.set(i,{subject:s,unlisten:()=>{i.removeEventListener("animationstart",_,OL)}}),s}stopMonitoring(e){const i=Sd(e),r=this._monitoredElements.get(i);r&&(r.unlisten(),r.subject.complete(),i.classList.remove("cdk-text-field-autofill-monitored"),i.classList.remove("cdk-text-field-autofilled"),this._monitoredElements.delete(i))}ngOnDestroy(){this._monitoredElements.forEach((e,i)=>this.stopMonitoring(i))}}return t.\u0275fac=function(e){return new(e||t)(we(Co),we(Ln))},t.\u0275prov=rt({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),FL=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=cn({type:t}),t.\u0275inj=nn({}),t})();const LL=new vt("MAT_INPUT_VALUE_ACCESSOR"),SY=["button","checkbox","file","hidden","image","radio","range","reset","submit"];let DY=0;const EY=YP(class{constructor(t,n,e,i){this._defaultErrorStateMatcher=t,this._parentForm=n,this._parentFormGroup=e,this.ngControl=i,this.stateChanges=new Zt}});let BL=(()=>{class t extends EY{constructor(e,i,r,s,d,_,w,S,I,L){super(_,s,d,r),this._elementRef=e,this._platform=i,this._autofillMonitor=S,this._formField=L,this._uid="mat-input-"+DY++,this.focused=!1,this.stateChanges=new Zt,this.controlType="mat-input",this.autofilled=!1,this._disabled=!1,this._type="text",this._readonly=!1,this._neverEmptyInputTypes=["date","datetime","datetime-local","month","time","week"].filter(ae=>MP().has(ae)),this._iOSKeyupListener=ae=>{const ve=ae.target;!ve.value&&0===ve.selectionStart&&0===ve.selectionEnd&&(ve.setSelectionRange(1,1),ve.setSelectionRange(0,0))};const H=this._elementRef.nativeElement,Y=H.nodeName.toLowerCase();this._inputValueAccessor=w||H,this._previousNativeValue=this.value,this.id=this.id,i.IOS&&I.runOutsideAngular(()=>{e.nativeElement.addEventListener("keyup",this._iOSKeyupListener)}),this._isServer=!this._platform.isBrowser,this._isNativeSelect="select"===Y,this._isTextarea="textarea"===Y,this._isInFormField=!!L,this._isNativeSelect&&(this.controlType=H.multiple?"mat-native-select-multiple":"mat-native-select")}get disabled(){return this.ngControl&&null!==this.ngControl.disabled?this.ngControl.disabled:this._disabled}set disabled(e){this._disabled=kn(e),this.focused&&(this.focused=!1,this.stateChanges.next())}get id(){return this._id}set id(e){this._id=e||this._uid}get required(){return this._required??this.ngControl?.control?.hasValidator(so.required)??!1}set required(e){this._required=kn(e)}get type(){return this._type}set type(e){this._type=e||"text",this._validateType(),!this._isTextarea&&MP().has(this._type)&&(this._elementRef.nativeElement.type=this._type)}get value(){return this._inputValueAccessor.value}set value(e){e!==this.value&&(this._inputValueAccessor.value=e,this.stateChanges.next())}get readonly(){return this._readonly}set readonly(e){this._readonly=kn(e)}ngAfterViewInit(){this._platform.isBrowser&&this._autofillMonitor.monitor(this._elementRef.nativeElement).subscribe(e=>{this.autofilled=e.isAutofilled,this.stateChanges.next()})}ngOnChanges(){this.stateChanges.next()}ngOnDestroy(){this.stateChanges.complete(),this._platform.isBrowser&&this._autofillMonitor.stopMonitoring(this._elementRef.nativeElement),this._platform.IOS&&this._elementRef.nativeElement.removeEventListener("keyup",this._iOSKeyupListener)}ngDoCheck(){this.ngControl&&this.updateErrorState(),this._dirtyCheckNativeValue(),this._dirtyCheckPlaceholder()}focus(e){this._elementRef.nativeElement.focus(e)}_focusChanged(e){e!==this.focused&&(this.focused=e,this.stateChanges.next())}_onInput(){}_dirtyCheckPlaceholder(){const e=this._formField,i=e&&"legacy"===e.appearance&&!e._hasLabel?.()?null:this.placeholder;if(i!==this._previousPlaceholder){const r=this._elementRef.nativeElement;this._previousPlaceholder=i,i?r.setAttribute("placeholder",i):r.removeAttribute("placeholder")}}_dirtyCheckNativeValue(){const e=this._elementRef.nativeElement.value;this._previousNativeValue!==e&&(this._previousNativeValue=e,this.stateChanges.next())}_validateType(){SY.indexOf(this._type)}_isNeverEmpty(){return this._neverEmptyInputTypes.indexOf(this._type)>-1}_isBadInput(){let e=this._elementRef.nativeElement.validity;return e&&e.badInput}get empty(){return!(this._isNeverEmpty()||this._elementRef.nativeElement.value||this._isBadInput()||this.autofilled)}get shouldLabelFloat(){if(this._isNativeSelect){const e=this._elementRef.nativeElement,i=e.options[0];return this.focused||e.multiple||!this.empty||!!(e.selectedIndex>-1&&i&&i.label)}return this.focused||!this.empty}setDescribedByIds(e){e.length?this._elementRef.nativeElement.setAttribute("aria-describedby",e.join(" ")):this._elementRef.nativeElement.removeAttribute("aria-describedby")}onContainerClick(){this.focused||this.focus()}_isInlineSelect(){const e=this._elementRef.nativeElement;return this._isNativeSelect&&(e.multiple||e.size>1)}}return t.\u0275fac=function(e){return new(e||t)(z($t),z(Co),z(gu,10),z(c0,8),z(Hf,8),z(u_),z(LL,10),z(MY),z(Ln),z(zC,8))},t.\u0275dir=Ge({type:t,selectors:[["input","matInput",""],["textarea","matInput",""],["select","matNativeControl",""],["input","matNativeControl",""],["textarea","matNativeControl",""]],hostAttrs:[1,"mat-input-element","mat-form-field-autofill-control"],hostVars:12,hostBindings:function(e,i){1&e&&Nt("focus",function(){return i._focusChanged(!0)})("blur",function(){return i._focusChanged(!1)})("input",function(){return i._onInput()}),2&e&&(gc("disabled",i.disabled)("required",i.required),et("id",i.id)("data-placeholder",i.placeholder)("name",i.name||null)("readonly",i.readonly&&!i._isNativeSelect||null)("aria-invalid",i.empty&&i.required?null:i.errorState)("aria-required",i.required),yi("mat-input-server",i._isServer)("mat-native-select-inline",i._isInlineSelect()))},inputs:{disabled:"disabled",id:"id",placeholder:"placeholder",name:"name",required:"required",type:"type",errorStateMatcher:"errorStateMatcher",userAriaDescribedBy:["aria-describedby","userAriaDescribedBy"],value:"value",readonly:"readonly"},exportAs:["matInput"],features:[Pn([{provide:BC,useExisting:t}]),a,Hi]}),t})(),TY=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=cn({type:t}),t.\u0275inj=nn({providers:[u_],imports:[FL,VC,oi,FL,VC]}),t})();const AY=["input"],IY=function(t){return{enterDuration:t}},kY=["*"],RY=new vt("mat-slide-toggle-default-options",{providedIn:"root",factory:()=>({disableToggleValue:!1})});let PY=0;const OY={provide:aa,useExisting:ni(()=>HE),multi:!0};class FY{constructor(n,e){this.source=n,this.checked=e}}const LY=$w(Vf(Gf(c_(class{constructor(t){this._elementRef=t}}))));let BY=(()=>{class t extends LY{constructor(e,i,r,s,d,_,w){super(e),this._focusMonitor=i,this._changeDetectorRef=r,this.defaults=d,this._onChange=S=>{},this._onTouched=()=>{},this._required=!1,this._checked=!1,this.name=null,this.labelPosition="after",this.ariaLabel=null,this.ariaLabelledby=null,this.change=new In,this.toggleChange=new In,this.tabIndex=parseInt(s)||0,this.color=this.defaultColor=d.color||"accent",this._noopAnimations="NoopAnimations"===_,this.id=this._uniqueId=`${w}${++PY}`}get required(){return this._required}set required(e){this._required=kn(e)}get checked(){return this._checked}set checked(e){this._checked=kn(e),this._changeDetectorRef.markForCheck()}get inputId(){return`${this.id||this._uniqueId}-input`}ngAfterContentInit(){this._focusMonitor.monitor(this._elementRef,!0).subscribe(e=>{"keyboard"===e||"program"===e?this._focused=!0:e||Promise.resolve().then(()=>{this._focused=!1,this._onTouched(),this._changeDetectorRef.markForCheck()})})}ngOnDestroy(){this._focusMonitor.stopMonitoring(this._elementRef)}writeValue(e){this.checked=!!e}registerOnChange(e){this._onChange=e}registerOnTouched(e){this._onTouched=e}setDisabledState(e){this.disabled=e,this._changeDetectorRef.markForCheck()}toggle(){this.checked=!this.checked,this._onChange(this.checked)}_emitChangeEvent(){this._onChange(this.checked),this.change.emit(this._createChangeEvent(this.checked))}}return t.\u0275fac=function(e){Bs()},t.\u0275dir=Ge({type:t,inputs:{name:"name",id:"id",labelPosition:"labelPosition",ariaLabel:["aria-label","ariaLabel"],ariaLabelledby:["aria-labelledby","ariaLabelledby"],ariaDescribedby:["aria-describedby","ariaDescribedby"],required:"required",checked:"checked"},outputs:{change:"change",toggleChange:"toggleChange"},features:[a]}),t})(),HE=(()=>{class t extends BY{constructor(e,i,r,s,d,_){super(e,i,r,s,d,_,"mat-slide-toggle-")}_createChangeEvent(e){return new FY(this,e)}_onChangeEvent(e){e.stopPropagation(),this.toggleChange.emit(),this.defaults.disableToggleValue?this._inputElement.nativeElement.checked=this.checked:(this.checked=this._inputElement.nativeElement.checked,this._emitChangeEvent())}_onInputClick(e){e.stopPropagation()}focus(e,i){i?this._focusMonitor.focusVia(this._inputElement,i,e):this._inputElement.nativeElement.focus(e)}_onLabelTextChange(){this._changeDetectorRef.detectChanges()}}return t.\u0275fac=function(e){return new(e||t)(z($t),z(Cc),z(Lr),wa("tabindex"),z(RY),z(Ta,8))},t.\u0275cmp=Rn({type:t,selectors:[["mat-slide-toggle"]],viewQuery:function(e,i){if(1&e&&Yi(AY,5),2&e){let r;fn(r=mn())&&(i._inputElement=r.first)}},hostAttrs:[1,"mat-slide-toggle"],hostVars:13,hostBindings:function(e,i){2&e&&(gc("id",i.id),et("tabindex",null)("aria-label",null)("aria-labelledby",null)("name",null),yi("mat-checked",i.checked)("mat-disabled",i.disabled)("mat-slide-toggle-label-before","before"==i.labelPosition)("_mat-animation-noopable",i._noopAnimations))},inputs:{disabled:"disabled",disableRipple:"disableRipple",color:"color",tabIndex:"tabIndex"},exportAs:["matSlideToggle"],features:[Pn([OY]),a],ngContentSelectors:kY,decls:14,vars:20,consts:[[1,"mat-slide-toggle-label"],["label",""],[1,"mat-slide-toggle-bar"],["type","checkbox","role","switch",1,"mat-slide-toggle-input","cdk-visually-hidden",3,"id","required","tabIndex","checked","disabled","change","click"],["input",""],[1,"mat-slide-toggle-thumb-container"],[1,"mat-slide-toggle-thumb"],["mat-ripple","",1,"mat-slide-toggle-ripple","mat-focus-indicator",3,"matRippleTrigger","matRippleDisabled","matRippleCentered","matRippleRadius","matRippleAnimation"],[1,"mat-ripple-element","mat-slide-toggle-persistent-ripple"],[1,"mat-slide-toggle-content",3,"cdkObserveContent"],["labelContent",""],[2,"display","none"]],template:function(e,i){if(1&e&&(Tr(),se(0,"label",0,1)(2,"span",2)(3,"input",3,4),Nt("change",function(s){return i._onChangeEvent(s)})("click",function(s){return i._onInputClick(s)}),he(),se(5,"span",5),ut(6,"span",6),se(7,"span",7),ut(8,"span",8),he()()(),se(9,"span",9,10),Nt("cdkObserveContent",function(){return i._onLabelTextChange()}),se(11,"span",11),Ze(12,"\xa0"),he(),Xi(13),he()()),2&e){const r=sr(1),s=sr(10);et("for",i.inputId),Se(2),yi("mat-slide-toggle-bar-no-side-margin",!s.textContent||!s.textContent.trim()),Se(1),Ae("id",i.inputId)("required",i.required)("tabIndex",i.tabIndex)("checked",i.checked)("disabled",i.disabled),et("name",i.name)("aria-checked",i.checked)("aria-label",i.ariaLabel)("aria-labelledby",i.ariaLabelledby)("aria-describedby",i.ariaDescribedby),Se(4),Ae("matRippleTrigger",r)("matRippleDisabled",i.disableRipple||i.disabled)("matRippleCentered",!0)("matRippleRadius",20)("matRippleAnimation",Ns(18,IY,i._noopAnimations?0:150))}},dependencies:[mu,vD],styles:['.mat-slide-toggle{display:inline-block;height:24px;max-width:100%;line-height:24px;white-space:nowrap;outline:none;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-slide-toggle.mat-checked .mat-slide-toggle-thumb-container{transform:translate3d(16px, 0, 0)}[dir=rtl] .mat-slide-toggle.mat-checked .mat-slide-toggle-thumb-container{transform:translate3d(-16px, 0, 0)}.mat-slide-toggle.mat-disabled{opacity:.38}.mat-slide-toggle.mat-disabled .mat-slide-toggle-label,.mat-slide-toggle.mat-disabled .mat-slide-toggle-thumb-container{cursor:default}.mat-slide-toggle-label{-webkit-user-select:none;user-select:none;display:flex;flex:1;flex-direction:row;align-items:center;height:inherit;cursor:pointer}.mat-slide-toggle-content{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mat-slide-toggle-label-before .mat-slide-toggle-label{order:1}.mat-slide-toggle-label-before .mat-slide-toggle-bar{order:2}[dir=rtl] .mat-slide-toggle-label-before .mat-slide-toggle-bar,.mat-slide-toggle-bar{margin-right:8px;margin-left:0}[dir=rtl] .mat-slide-toggle-bar,.mat-slide-toggle-label-before .mat-slide-toggle-bar{margin-left:8px;margin-right:0}.mat-slide-toggle-bar-no-side-margin{margin-left:0;margin-right:0}.mat-slide-toggle-thumb-container{position:absolute;z-index:1;width:20px;height:20px;top:-3px;left:0;transform:translate3d(0, 0, 0);transition:all 80ms linear;transition-property:transform}._mat-animation-noopable .mat-slide-toggle-thumb-container{transition:none}[dir=rtl] .mat-slide-toggle-thumb-container{left:auto;right:0}.mat-slide-toggle-thumb{height:20px;width:20px;border-radius:50%;display:block}.mat-slide-toggle-bar{position:relative;width:36px;height:14px;flex-shrink:0;border-radius:8px}.mat-slide-toggle-input{bottom:0;left:10px}[dir=rtl] .mat-slide-toggle-input{left:auto;right:10px}.mat-slide-toggle-bar,.mat-slide-toggle-thumb{transition:all 80ms linear;transition-property:background-color;transition-delay:50ms}._mat-animation-noopable .mat-slide-toggle-bar,._mat-animation-noopable .mat-slide-toggle-thumb{transition:none}.mat-slide-toggle .mat-slide-toggle-ripple{position:absolute;top:calc(50% - 20px);left:calc(50% - 20px);height:40px;width:40px;z-index:1;pointer-events:none}.mat-slide-toggle .mat-slide-toggle-ripple .mat-ripple-element:not(.mat-slide-toggle-persistent-ripple){opacity:.12}.mat-slide-toggle-persistent-ripple{width:100%;height:100%;transform:none}.mat-slide-toggle-bar:hover .mat-slide-toggle-persistent-ripple{opacity:.04}.mat-slide-toggle:not(.mat-disabled).cdk-keyboard-focused .mat-slide-toggle-persistent-ripple{opacity:.12}.mat-slide-toggle-persistent-ripple,.mat-slide-toggle.mat-disabled .mat-slide-toggle-bar:hover .mat-slide-toggle-persistent-ripple{opacity:0}@media(hover: none){.mat-slide-toggle-bar:hover .mat-slide-toggle-persistent-ripple{display:none}}.mat-slide-toggle-input:focus~.mat-slide-toggle-thumb-container .mat-focus-indicator::before{content:""}.cdk-high-contrast-active .mat-slide-toggle-thumb,.cdk-high-contrast-active .mat-slide-toggle-bar{border:1px solid}'],encapsulation:2,changeDetection:0}),t})(),NL=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=cn({type:t}),t.\u0275inj=nn({}),t})(),VY=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=cn({type:t}),t.\u0275inj=nn({imports:[NL,ep,oi,zw,NL,oi]}),t})();function GY(t,n){}class UC{constructor(){this.role="dialog",this.panelClass="",this.hasBackdrop=!0,this.backdropClass="",this.disableClose=!1,this.width="",this.height="",this.data=null,this.ariaDescribedBy=null,this.ariaLabelledBy=null,this.ariaLabel=null,this.ariaModal=!0,this.autoFocus="first-tabbable",this.restoreFocus=!0,this.closeOnNavigation=!0,this.closeOnDestroy=!0}}let zL=(()=>{class t extends hC{constructor(e,i,r,s,d,_,w,S){super(),this._elementRef=e,this._focusTrapFactory=i,this._config=s,this._interactivityChecker=d,this._ngZone=_,this._overlayRef=w,this._focusMonitor=S,this._elementFocusedBeforeDialogWasOpened=null,this._closeInteractionType=null,this.attachDomPortal=I=>{this._portalOutlet.hasAttached();const L=this._portalOutlet.attachDomPortal(I);return this._contentAttached(),L},this._ariaLabelledBy=this._config.ariaLabelledBy||null,this._document=r}_contentAttached(){this._initializeFocusTrap(),this._handleBackdropClicks(),this._captureInitialFocus()}_captureInitialFocus(){this._trapFocus()}ngOnDestroy(){this._restoreFocus()}attachComponentPortal(e){this._portalOutlet.hasAttached();const i=this._portalOutlet.attachComponentPortal(e);return this._contentAttached(),i}attachTemplatePortal(e){this._portalOutlet.hasAttached();const i=this._portalOutlet.attachTemplatePortal(e);return this._contentAttached(),i}_recaptureFocus(){this._containsFocus()||this._trapFocus()}_forceFocus(e,i){this._interactivityChecker.isFocusable(e)||(e.tabIndex=-1,this._ngZone.runOutsideAngular(()=>{const r=()=>{e.removeEventListener("blur",r),e.removeEventListener("mousedown",r),e.removeAttribute("tabindex")};e.addEventListener("blur",r),e.addEventListener("mousedown",r)})),e.focus(i)}_focusByCssSelector(e,i){let r=this._elementRef.nativeElement.querySelector(e);r&&this._forceFocus(r,i)}_trapFocus(){const e=this._elementRef.nativeElement;switch(this._config.autoFocus){case!1:case"dialog":this._containsFocus()||e.focus();break;case!0:case"first-tabbable":this._focusTrap.focusInitialElementWhenReady().then(i=>{i||this._focusDialogContainer()});break;case"first-heading":this._focusByCssSelector('h1, h2, h3, h4, h5, h6, [role="heading"]');break;default:this._focusByCssSelector(this._config.autoFocus)}}_restoreFocus(){const e=this._config.restoreFocus;let i=null;if("string"==typeof e?i=this._document.querySelector(e):"boolean"==typeof e?i=e?this._elementFocusedBeforeDialogWasOpened:null:e&&(i=e),this._config.restoreFocus&&i&&"function"==typeof i.focus){const r=Ow(),s=this._elementRef.nativeElement;(!r||r===this._document.body||r===s||s.contains(r))&&(this._focusMonitor?(this._focusMonitor.focusVia(i,this._closeInteractionType),this._closeInteractionType=null):i.focus())}this._focusTrap&&this._focusTrap.destroy()}_focusDialogContainer(){this._elementRef.nativeElement.focus&&this._elementRef.nativeElement.focus()}_containsFocus(){const e=this._elementRef.nativeElement,i=Ow();return e===i||e.contains(i)}_initializeFocusTrap(){this._focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement),this._document&&(this._elementFocusedBeforeDialogWasOpened=Ow())}_handleBackdropClicks(){this._overlayRef.backdropClick().subscribe(()=>{this._config.disableClose&&this._recaptureFocus()})}}return t.\u0275fac=function(e){return new(e||t)(z($t),z(wD),z(Bn,8),z(UC),z(jw),z(Ln),z(g0),z(Cc))},t.\u0275cmp=Rn({type:t,selectors:[["cdk-dialog-container"]],viewQuery:function(e,i){if(1&e&&Yi(m_,7),2&e){let r;fn(r=mn())&&(i._portalOutlet=r.first)}},hostAttrs:["tabindex","-1",1,"cdk-dialog-container"],hostVars:6,hostBindings:function(e,i){2&e&&et("id",i._config.id||null)("role",i._config.role)("aria-modal",i._config.ariaModal)("aria-labelledby",i._config.ariaLabel?null:i._ariaLabelledBy)("aria-label",i._config.ariaLabel)("aria-describedby",i._config.ariaDescribedBy||null)},features:[a],decls:1,vars:0,consts:[["cdkPortalOutlet",""]],template:function(e,i){1&e&&Mt(0,GY,0,0,"ng-template",0)},dependencies:[m_],styles:[".cdk-dialog-container{display:block;width:100%;height:100%;min-height:inherit;max-height:inherit}"],encapsulation:2}),t})();class $E{constructor(n,e){this.overlayRef=n,this.config=e,this.closed=new Zt,this.disableClose=e.disableClose,this.backdropClick=n.backdropClick(),this.keydownEvents=n.keydownEvents(),this.outsidePointerEvents=n.outsidePointerEvents(),this.id=e.id,this.keydownEvents.subscribe(i=>{27===i.keyCode&&!this.disableClose&&!xc(i)&&(i.preventDefault(),this.close(void 0,{focusOrigin:"keyboard"}))}),this.backdropClick.subscribe(()=>{this.disableClose||this.close(void 0,{focusOrigin:"mouse"})})}close(n,e){if(this.containerInstance){const i=this.closed;this.containerInstance._closeInteractionType=e?.focusOrigin||"program",this.overlayRef.dispose(),i.next(n),i.complete(),this.componentInstance=this.containerInstance=null}}updatePosition(){return this.overlayRef.updatePosition(),this}updateSize(n="",e=""){return this.overlayRef.updateSize({width:n,height:e}),this}addPanelClass(n){return this.overlayRef.addPanelClass(n),this}removePanelClass(n){return this.overlayRef.removePanelClass(n),this}}const VL=new vt("DialogScrollStrategy"),UY=new vt("DialogData"),jY=new vt("DefaultDialogConfig"),$Y={provide:VL,deps:[ka],useFactory:function HY(t){return()=>t.scrollStrategies.block()}};let WY=0,GL=(()=>{class t{get openDialogs(){return this._parentDialog?this._parentDialog.openDialogs:this._openDialogsAtThisLevel}get afterOpened(){return this._parentDialog?this._parentDialog.afterOpened:this._afterOpenedAtThisLevel}constructor(e,i,r,s,d,_){this._overlay=e,this._injector=i,this._defaultOptions=r,this._parentDialog=s,this._overlayContainer=d,this._openDialogsAtThisLevel=[],this._afterAllClosedAtThisLevel=new Zt,this._afterOpenedAtThisLevel=new Zt,this._ariaHiddenElements=new Map,this.afterAllClosed=Av(()=>this.openDialogs.length?this._getAfterAllClosed():this._getAfterAllClosed().pipe(Vs(void 0))),this._scrollStrategy=_}open(e,i){(i={...this._defaultOptions||new UC,...i}).id=i.id||"cdk-dialog-"+WY++,i.id&&this.getDialogById(i.id);const s=this._getOverlayConfig(i),d=this._overlay.create(s),_=new $E(d,i),w=this._attachContainer(d,_,i);return _.containerInstance=w,this._attachDialogContent(e,_,w,i),this.openDialogs.length||this._hideNonDialogContentFromAssistiveTechnology(),this.openDialogs.push(_),_.closed.subscribe(()=>this._removeOpenDialog(_,!0)),this.afterOpened.next(_),_}closeAll(){WE(this.openDialogs,e=>e.close())}getDialogById(e){return this.openDialogs.find(i=>i.id===e)}ngOnDestroy(){WE(this._openDialogsAtThisLevel,e=>{!1===e.config.closeOnDestroy&&this._removeOpenDialog(e,!1)}),WE(this._openDialogsAtThisLevel,e=>e.close()),this._afterAllClosedAtThisLevel.complete(),this._afterOpenedAtThisLevel.complete(),this._openDialogsAtThisLevel=[]}_getOverlayConfig(e){const i=new pC({positionStrategy:e.positionStrategy||this._overlay.position().global().centerHorizontally().centerVertically(),scrollStrategy:e.scrollStrategy||this._scrollStrategy(),panelClass:e.panelClass,hasBackdrop:e.hasBackdrop,direction:e.direction,minWidth:e.minWidth,minHeight:e.minHeight,maxWidth:e.maxWidth,maxHeight:e.maxHeight,width:e.width,height:e.height,disposeOnNavigation:e.closeOnNavigation});return e.backdropClass&&(i.backdropClass=e.backdropClass),i}_attachContainer(e,i,r){const s=r.injector||r.viewContainerRef?.injector,d=[{provide:UC,useValue:r},{provide:$E,useValue:i},{provide:g0,useValue:e}];let _;r.container?"function"==typeof r.container?_=r.container:(_=r.container.type,d.push(...r.container.providers(r))):_=zL;const w=new f_(_,r.viewContainerRef,Or.create({parent:s||this._injector,providers:d}),r.componentFactoryResolver);return e.attach(w).instance}_attachDialogContent(e,i,r,s){if(e instanceof Fr){const d=this._createInjector(s,i,r,void 0);let _={$implicit:s.data,dialogRef:i};s.templateContext&&(_={..._,..."function"==typeof s.templateContext?s.templateContext():s.templateContext}),r.attachTemplatePortal(new m0(e,null,_,d))}else{const d=this._createInjector(s,i,r,this._injector),_=r.attachComponentPortal(new f_(e,s.viewContainerRef,d,s.componentFactoryResolver));i.componentInstance=_.instance}}_createInjector(e,i,r,s){const d=e.injector||e.viewContainerRef?.injector,_=[{provide:UY,useValue:e.data},{provide:$E,useValue:i}];return e.providers&&("function"==typeof e.providers?_.push(...e.providers(i,e,r)):_.push(...e.providers)),e.direction&&(!d||!d.get(sa,null,{optional:!0}))&&_.push({provide:sa,useValue:{value:e.direction,change:_n()}}),Or.create({parent:d||s,providers:_})}_removeOpenDialog(e,i){const r=this.openDialogs.indexOf(e);r>-1&&(this.openDialogs.splice(r,1),this.openDialogs.length||(this._ariaHiddenElements.forEach((s,d)=>{s?d.setAttribute("aria-hidden",s):d.removeAttribute("aria-hidden")}),this._ariaHiddenElements.clear(),i&&this._getAfterAllClosed().next()))}_hideNonDialogContentFromAssistiveTechnology(){const e=this._overlayContainer.getContainerElement();if(e.parentElement){const i=e.parentElement.children;for(let r=i.length-1;r>-1;r--){const s=i[r];s!==e&&"SCRIPT"!==s.nodeName&&"STYLE"!==s.nodeName&&!s.hasAttribute("aria-live")&&(this._ariaHiddenElements.set(s,s.getAttribute("aria-hidden")),s.setAttribute("aria-hidden","true"))}}}_getAfterAllClosed(){const e=this._parentDialog;return e?e._getAfterAllClosed():this._afterAllClosedAtThisLevel}}return t.\u0275fac=function(e){return new(e||t)(we(ka),we(Or),we(jY,8),we(t,12),we(fC),we(VL))},t.\u0275prov=rt({token:t,factory:t.\u0275fac}),t})();function WE(t,n){let e=t.length;for(;e--;)n(t[e])}let qY=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=cn({type:t}),t.\u0275inj=nn({providers:[GL,$Y],imports:[Xf,qf,SD,qf]}),t})();function ZY(t,n){}const x_={params:{enterAnimationDuration:"150ms",exitAnimationDuration:"75ms"}},XY={dialogContainer:Xo("dialogContainer",[Ki("void, exit",Dn({opacity:0,transform:"scale(0.7)"})),Ki("enter",Dn({transform:"none"})),dr("* => enter",x2([yr("{{enterAnimationDuration}} cubic-bezier(0, 0, 0.2, 1)",Dn({transform:"none",opacity:1})),cC("@*",lC(),{optional:!0})]),x_),dr("* => void, * => exit",x2([yr("{{exitAnimationDuration}} cubic-bezier(0.4, 0.0, 0.2, 1)",Dn({opacity:0})),cC("@*",lC(),{optional:!0})]),x_)])};class E0{constructor(){this.role="dialog",this.panelClass="",this.hasBackdrop=!0,this.backdropClass="",this.disableClose=!1,this.width="",this.height="",this.maxWidth="80vw",this.data=null,this.ariaDescribedBy=null,this.ariaLabelledBy=null,this.ariaLabel=null,this.ariaModal=!0,this.autoFocus="first-tabbable",this.restoreFocus=!0,this.delayFocusTrap=!0,this.closeOnNavigation=!0,this.enterAnimationDuration=x_.params.enterAnimationDuration,this.exitAnimationDuration=x_.params.exitAnimationDuration}}let YY=(()=>{class t extends zL{constructor(e,i,r,s,d,_,w,S){super(e,i,r,s,d,_,w,S),this._animationStateChanged=new In}_captureInitialFocus(){this._config.delayFocusTrap||this._trapFocus()}_openAnimationDone(e){this._config.delayFocusTrap&&this._trapFocus(),this._animationStateChanged.next({state:"opened",totalTime:e})}}return t.\u0275fac=function(e){return new(e||t)(z($t),z(wD),z(Bn,8),z(E0),z(jw),z(Ln),z(g0),z(Cc))},t.\u0275cmp=Rn({type:t,selectors:[["ng-component"]],features:[a],decls:0,vars:0,template:function(e,i){},encapsulation:2}),t})(),KY=(()=>{class t extends YY{constructor(e,i,r,s,d,_,w,S,I){super(e,i,r,s,d,_,w,I),this._changeDetectorRef=S,this._state="enter"}_onAnimationDone({toState:e,totalTime:i}){"enter"===e?this._openAnimationDone(i):"exit"===e&&this._animationStateChanged.next({state:"closed",totalTime:i})}_onAnimationStart({toState:e,totalTime:i}){"enter"===e?this._animationStateChanged.next({state:"opening",totalTime:i}):("exit"===e||"void"===e)&&this._animationStateChanged.next({state:"closing",totalTime:i})}_startExitAnimation(){this._state="exit",this._changeDetectorRef.markForCheck()}_getAnimationState(){return{value:this._state,params:{enterAnimationDuration:this._config.enterAnimationDuration||x_.params.enterAnimationDuration,exitAnimationDuration:this._config.exitAnimationDuration||x_.params.exitAnimationDuration}}}}return t.\u0275fac=function(e){return new(e||t)(z($t),z(wD),z(Bn,8),z(E0),z(jw),z(Ln),z(g0),z(Lr),z(Cc))},t.\u0275cmp=Rn({type:t,selectors:[["mat-dialog-container"]],hostAttrs:["tabindex","-1",1,"mat-dialog-container"],hostVars:7,hostBindings:function(e,i){1&e&&Cf("@dialogContainer.start",function(s){return i._onAnimationStart(s)})("@dialogContainer.done",function(s){return i._onAnimationDone(s)}),2&e&&(gc("id",i._config.id),et("aria-modal",i._config.ariaModal)("role",i._config.role)("aria-labelledby",i._config.ariaLabel?null:i._ariaLabelledBy)("aria-label",i._config.ariaLabel)("aria-describedby",i._config.ariaDescribedBy||null),Ax("@dialogContainer",i._getAnimationState()))},features:[a],decls:1,vars:0,consts:[["cdkPortalOutlet",""]],template:function(e,i){1&e&&Mt(0,ZY,0,0,"ng-template",0)},dependencies:[m_],styles:[".mat-dialog-container{display:block;padding:24px;border-radius:4px;box-sizing:border-box;overflow:auto;outline:0;width:100%;height:100%;min-height:inherit;max-height:inherit}.cdk-high-contrast-active .mat-dialog-container{outline:solid 1px}.mat-dialog-content{display:block;margin:0 -24px;padding:0 24px;max-height:65vh;overflow:auto;-webkit-overflow-scrolling:touch}.mat-dialog-title{margin:0 0 20px;display:block}.mat-dialog-actions{padding:8px 0;display:flex;flex-wrap:wrap;min-height:52px;align-items:center;box-sizing:content-box;margin-bottom:-24px}.mat-dialog-actions.mat-dialog-actions-align-center,.mat-dialog-actions[align=center]{justify-content:center}.mat-dialog-actions.mat-dialog-actions-align-end,.mat-dialog-actions[align=end]{justify-content:flex-end}.mat-dialog-actions .mat-button-base+.mat-button-base,.mat-dialog-actions .mat-mdc-button-base+.mat-mdc-button-base{margin-left:8px}[dir=rtl] .mat-dialog-actions .mat-button-base+.mat-button-base,[dir=rtl] .mat-dialog-actions .mat-mdc-button-base+.mat-mdc-button-base{margin-left:0;margin-right:8px}"],encapsulation:2,data:{animation:[XY.dialogContainer]}}),t})();class T0{constructor(n,e,i){this._ref=n,this._containerInstance=i,this._afterOpened=new Zt,this._beforeClosed=new Zt,this._state=0,this.disableClose=e.disableClose,this.id=n.id,i._animationStateChanged.pipe(Zr(r=>"opened"===r.state),Fo(1)).subscribe(()=>{this._afterOpened.next(),this._afterOpened.complete()}),i._animationStateChanged.pipe(Zr(r=>"closed"===r.state),Fo(1)).subscribe(()=>{clearTimeout(this._closeFallbackTimeout),this._finishDialogClose()}),n.overlayRef.detachments().subscribe(()=>{this._beforeClosed.next(this._result),this._beforeClosed.complete(),this._finishDialogClose()}),mr(this.backdropClick(),this.keydownEvents().pipe(Zr(r=>27===r.keyCode&&!this.disableClose&&!xc(r)))).subscribe(r=>{this.disableClose||(r.preventDefault(),UL(this,"keydown"===r.type?"keyboard":"mouse"))})}close(n){this._result=n,this._containerInstance._animationStateChanged.pipe(Zr(e=>"closing"===e.state),Fo(1)).subscribe(e=>{this._beforeClosed.next(n),this._beforeClosed.complete(),this._ref.overlayRef.detachBackdrop(),this._closeFallbackTimeout=setTimeout(()=>this._finishDialogClose(),e.totalTime+100)}),this._state=1,this._containerInstance._startExitAnimation()}afterOpened(){return this._afterOpened}afterClosed(){return this._ref.closed}beforeClosed(){return this._beforeClosed}backdropClick(){return this._ref.backdropClick}keydownEvents(){return this._ref.keydownEvents}updatePosition(n){let e=this._ref.config.positionStrategy;return n&&(n.left||n.right)?n.left?e.left(n.left):e.right(n.right):e.centerHorizontally(),n&&(n.top||n.bottom)?n.top?e.top(n.top):e.bottom(n.bottom):e.centerVertically(),this._ref.updatePosition(),this}updateSize(n="",e=""){return this._ref.updateSize(n,e),this}addPanelClass(n){return this._ref.addPanelClass(n),this}removePanelClass(n){return this._ref.removePanelClass(n),this}getState(){return this._state}_finishDialogClose(){this._state=2,this._ref.close(this._result,{focusOrigin:this._closeInteractionType}),this.componentInstance=null}}function UL(t,n,e){return t._closeInteractionType=n,t.close(e)}const qE=new vt("MatDialogData"),QY=new vt("mat-dialog-default-options"),jL=new vt("mat-dialog-scroll-strategy"),eK={provide:jL,deps:[ka],useFactory:function JY(t){return()=>t.scrollStrategies.block()}};let tK=0,nK=(()=>{class t{constructor(e,i,r,s,d,_,w,S,I,L){this._overlay=e,this._defaultOptions=r,this._parentDialog=s,this._dialogRefConstructor=w,this._dialogContainerType=S,this._dialogDataToken=I,this._openDialogsAtThisLevel=[],this._afterAllClosedAtThisLevel=new Zt,this._afterOpenedAtThisLevel=new Zt,this._idPrefix="mat-dialog-",this.afterAllClosed=Av(()=>this.openDialogs.length?this._getAfterAllClosed():this._getAfterAllClosed().pipe(Vs(void 0))),this._scrollStrategy=_,this._dialog=i.get(GL)}get openDialogs(){return this._parentDialog?this._parentDialog.openDialogs:this._openDialogsAtThisLevel}get afterOpened(){return this._parentDialog?this._parentDialog.afterOpened:this._afterOpenedAtThisLevel}_getAfterAllClosed(){const e=this._parentDialog;return e?e._getAfterAllClosed():this._afterAllClosedAtThisLevel}open(e,i){let r;(i={...this._defaultOptions||new E0,...i}).id=i.id||`${this._idPrefix}${tK++}`,i.scrollStrategy=i.scrollStrategy||this._scrollStrategy();const s=this._dialog.open(e,{...i,positionStrategy:this._overlay.position().global().centerHorizontally().centerVertically(),disableClose:!0,closeOnDestroy:!1,container:{type:this._dialogContainerType,providers:()=>[{provide:E0,useValue:i},{provide:UC,useValue:i}]},templateContext:()=>({dialogRef:r}),providers:(d,_,w)=>(r=new this._dialogRefConstructor(d,i,w),r.updatePosition(i?.position),[{provide:this._dialogContainerType,useValue:w},{provide:this._dialogDataToken,useValue:_.data},{provide:this._dialogRefConstructor,useValue:r}])});return r.componentInstance=s.componentInstance,this.openDialogs.push(r),this.afterOpened.next(r),r.afterClosed().subscribe(()=>{const d=this.openDialogs.indexOf(r);d>-1&&(this.openDialogs.splice(d,1),this.openDialogs.length||this._getAfterAllClosed().next())}),r}closeAll(){this._closeDialogs(this.openDialogs)}getDialogById(e){return this.openDialogs.find(i=>i.id===e)}ngOnDestroy(){this._closeDialogs(this._openDialogsAtThisLevel),this._afterAllClosedAtThisLevel.complete(),this._afterOpenedAtThisLevel.complete()}_closeDialogs(e){let i=e.length;for(;i--;)e[i].close()}}return t.\u0275fac=function(e){Bs()},t.\u0275prov=rt({token:t,factory:t.\u0275fac}),t})(),nm=(()=>{class t extends nK{constructor(e,i,r,s,d,_,w,S){super(e,i,s,_,w,d,T0,KY,qE,S)}}return t.\u0275fac=function(e){return new(e||t)(we(ka),we(Or),we(yv,8),we(QY,8),we(jL),we(t,12),we(fC),we(Ta,8))},t.\u0275prov=rt({token:t,factory:t.\u0275fac}),t})(),iK=0,ZE=(()=>{class t{constructor(e,i,r){this.dialogRef=e,this._elementRef=i,this._dialog=r,this.type="button"}ngOnInit(){this.dialogRef||(this.dialogRef=$L(this._elementRef,this._dialog.openDialogs))}ngOnChanges(e){const i=e._matDialogClose||e._matDialogCloseResult;i&&(this.dialogResult=i.currentValue)}_onButtonClick(e){UL(this.dialogRef,0===e.screenX&&0===e.screenY?"keyboard":"mouse",this.dialogResult)}}return t.\u0275fac=function(e){return new(e||t)(z(T0,8),z($t),z(nm))},t.\u0275dir=Ge({type:t,selectors:[["","mat-dialog-close",""],["","matDialogClose",""]],hostVars:2,hostBindings:function(e,i){1&e&&Nt("click",function(s){return i._onButtonClick(s)}),2&e&&et("aria-label",i.ariaLabel||null)("type",i.type)},inputs:{ariaLabel:["aria-label","ariaLabel"],type:"type",dialogResult:["mat-dialog-close","dialogResult"],_matDialogClose:["matDialogClose","_matDialogClose"]},exportAs:["matDialogClose"],features:[Hi]}),t})(),HL=(()=>{class t{constructor(e,i,r){this._dialogRef=e,this._elementRef=i,this._dialog=r,this.id="mat-dialog-title-"+iK++}ngOnInit(){this._dialogRef||(this._dialogRef=$L(this._elementRef,this._dialog.openDialogs)),this._dialogRef&&Promise.resolve().then(()=>{const e=this._dialogRef._containerInstance;e&&!e._ariaLabelledBy&&(e._ariaLabelledBy=this.id)})}}return t.\u0275fac=function(e){return new(e||t)(z(T0,8),z($t),z(nm))},t.\u0275dir=Ge({type:t,selectors:[["","mat-dialog-title",""],["","matDialogTitle",""]],hostAttrs:[1,"mat-dialog-title"],hostVars:1,hostBindings:function(e,i){2&e&&gc("id",i.id)},inputs:{id:"id"},exportAs:["matDialogTitle"]}),t})(),XE=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=Ge({type:t,selectors:[["","mat-dialog-content",""],["mat-dialog-content"],["","matDialogContent",""]],hostAttrs:[1,"mat-dialog-content"]}),t})(),rK=(()=>{class t{constructor(){this.align="start"}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=Ge({type:t,selectors:[["","mat-dialog-actions",""],["mat-dialog-actions"],["","matDialogActions",""]],hostAttrs:[1,"mat-dialog-actions"],hostVars:4,hostBindings:function(e,i){2&e&&yi("mat-dialog-actions-align-center","center"===i.align)("mat-dialog-actions-align-end","end"===i.align)},inputs:{align:"align"}}),t})();function $L(t,n){let e=t.nativeElement.parentElement;for(;e&&!e.classList.contains("mat-dialog-container");)e=e.parentElement;return e?n.find(i=>i.id===e.id):null}let oK=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=cn({type:t}),t.\u0275inj=nn({providers:[nm,eK],imports:[qY,Xf,qf,oi,oi]}),t})();const aK=[[["caption"]],[["colgroup"],["col"]]],lK=["caption","colgroup, col"];function YE(t){return class extends t{get sticky(){return this._sticky}set sticky(n){const e=this._sticky;this._sticky=kn(n),this._hasStickyChanged=e!==this._sticky}hasStickyChanged(){const n=this._hasStickyChanged;return this._hasStickyChanged=!1,n}resetStickyChanged(){this._hasStickyChanged=!1}constructor(...n){super(...n),this._sticky=!1,this._hasStickyChanged=!1}}}const w_=new vt("CDK_TABLE");let C_=(()=>{class t{constructor(e){this.template=e}}return t.\u0275fac=function(e){return new(e||t)(z(Fr))},t.\u0275dir=Ge({type:t,selectors:[["","cdkCellDef",""]]}),t})(),M_=(()=>{class t{constructor(e){this.template=e}}return t.\u0275fac=function(e){return new(e||t)(z(Fr))},t.\u0275dir=Ge({type:t,selectors:[["","cdkHeaderCellDef",""]]}),t})(),jC=(()=>{class t{constructor(e){this.template=e}}return t.\u0275fac=function(e){return new(e||t)(z(Fr))},t.\u0275dir=Ge({type:t,selectors:[["","cdkFooterCellDef",""]]}),t})();class hK{}const pK=YE(hK);let kd=(()=>{class t extends pK{get name(){return this._name}set name(e){this._setNameInput(e)}get stickyEnd(){return this._stickyEnd}set stickyEnd(e){const i=this._stickyEnd;this._stickyEnd=kn(e),this._hasStickyChanged=i!==this._stickyEnd}constructor(e){super(),this._table=e,this._stickyEnd=!1}_updateColumnCssClassName(){this._columnCssClassName=[`cdk-column-${this.cssClassFriendlyName}`]}_setNameInput(e){e&&(this._name=e,this.cssClassFriendlyName=e.replace(/[^a-z0-9_-]/gi,"-"),this._updateColumnCssClassName())}}return t.\u0275fac=function(e){return new(e||t)(z(w_,8))},t.\u0275dir=Ge({type:t,selectors:[["","cdkColumnDef",""]],contentQueries:function(e,i,r){if(1&e&&(Ui(r,C_,5),Ui(r,M_,5),Ui(r,jC,5)),2&e){let s;fn(s=mn())&&(i.cell=s.first),fn(s=mn())&&(i.headerCell=s.first),fn(s=mn())&&(i.footerCell=s.first)}},inputs:{sticky:"sticky",name:["cdkColumnDef","name"],stickyEnd:"stickyEnd"},features:[Pn([{provide:"MAT_SORT_HEADER_COLUMN_DEF",useExisting:t}]),a]}),t})();class KE{constructor(n,e){e.nativeElement.classList.add(...n._columnCssClassName)}}let QE=(()=>{class t extends KE{constructor(e,i){super(e,i)}}return t.\u0275fac=function(e){return new(e||t)(z(kd),z($t))},t.\u0275dir=Ge({type:t,selectors:[["cdk-header-cell"],["th","cdk-header-cell",""]],hostAttrs:["role","columnheader",1,"cdk-header-cell"],features:[a]}),t})(),JE=(()=>{class t extends KE{constructor(e,i){if(super(e,i),1===e._table?._elementRef.nativeElement.nodeType){const r=e._table._elementRef.nativeElement.getAttribute("role");i.nativeElement.setAttribute("role","grid"===r||"treegrid"===r?"gridcell":"cell")}}}return t.\u0275fac=function(e){return new(e||t)(z(kd),z($t))},t.\u0275dir=Ge({type:t,selectors:[["cdk-cell"],["td","cdk-cell",""]],hostAttrs:[1,"cdk-cell"],features:[a]}),t})();class qL{constructor(){this.tasks=[],this.endTasks=[]}}const eT=new vt("_COALESCED_STYLE_SCHEDULER");let ZL=(()=>{class t{constructor(e){this._ngZone=e,this._currentSchedule=null,this._destroyed=new Zt}schedule(e){this._createScheduleIfNeeded(),this._currentSchedule.tasks.push(e)}scheduleEnd(e){this._createScheduleIfNeeded(),this._currentSchedule.endTasks.push(e)}ngOnDestroy(){this._destroyed.next(),this._destroyed.complete()}_createScheduleIfNeeded(){this._currentSchedule||(this._currentSchedule=new qL,this._getScheduleObservable().pipe(ri(this._destroyed)).subscribe(()=>{for(;this._currentSchedule.tasks.length||this._currentSchedule.endTasks.length;){const e=this._currentSchedule;this._currentSchedule=new qL;for(const i of e.tasks)i();for(const i of e.endTasks)i()}this._currentSchedule=null}))}_getScheduleObservable(){return this._ngZone.isStable?Mr(Promise.resolve(void 0)):this._ngZone.onStable.pipe(Fo(1))}}return t.\u0275fac=function(e){return new(e||t)(we(Ln))},t.\u0275prov=rt({token:t,factory:t.\u0275fac}),t})(),tT=(()=>{class t{constructor(e,i){this.template=e,this._differs=i}ngOnChanges(e){if(!this._columnsDiffer){const i=e.columns&&e.columns.currentValue||[];this._columnsDiffer=this._differs.find(i).create(),this._columnsDiffer.diff(i)}}getColumnsDiff(){return this._columnsDiffer.diff(this.columns)}extractCellTemplate(e){return this instanceof A0?e.headerCell.template:this instanceof I0?e.footerCell.template:e.cell.template}}return t.\u0275fac=function(e){return new(e||t)(z(Fr),z(uu))},t.\u0275dir=Ge({type:t,features:[Hi]}),t})();class fK extends tT{}const mK=YE(fK);let A0=(()=>{class t extends mK{constructor(e,i,r){super(e,i),this._table=r}ngOnChanges(e){super.ngOnChanges(e)}}return t.\u0275fac=function(e){return new(e||t)(z(Fr),z(uu),z(w_,8))},t.\u0275dir=Ge({type:t,selectors:[["","cdkHeaderRowDef",""]],inputs:{columns:["cdkHeaderRowDef","columns"],sticky:["cdkHeaderRowDefSticky","sticky"]},features:[a,Hi]}),t})();class gK extends tT{}const _K=YE(gK);let I0=(()=>{class t extends _K{constructor(e,i,r){super(e,i),this._table=r}ngOnChanges(e){super.ngOnChanges(e)}}return t.\u0275fac=function(e){return new(e||t)(z(Fr),z(uu),z(w_,8))},t.\u0275dir=Ge({type:t,selectors:[["","cdkFooterRowDef",""]],inputs:{columns:["cdkFooterRowDef","columns"],sticky:["cdkFooterRowDefSticky","sticky"]},features:[a,Hi]}),t})(),HC=(()=>{class t extends tT{constructor(e,i,r){super(e,i),this._table=r}}return t.\u0275fac=function(e){return new(e||t)(z(Fr),z(uu),z(w_,8))},t.\u0275dir=Ge({type:t,selectors:[["","cdkRowDef",""]],inputs:{columns:["cdkRowDefColumns","columns"],when:["cdkRowDefWhen","when"]},features:[a]}),t})(),Rd=(()=>{class t{constructor(e){this._viewContainer=e,t.mostRecentCellOutlet=this}ngOnDestroy(){t.mostRecentCellOutlet===this&&(t.mostRecentCellOutlet=null)}}return t.mostRecentCellOutlet=null,t.\u0275fac=function(e){return new(e||t)(z(ro))},t.\u0275dir=Ge({type:t,selectors:[["","cdkCellOutlet",""]]}),t})(),nT=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=Rn({type:t,selectors:[["cdk-header-row"],["tr","cdk-header-row",""]],hostAttrs:["role","row",1,"cdk-header-row"],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(e,i){1&e&&Gi(0,0)},dependencies:[Rd],encapsulation:2}),t})(),rT=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=Rn({type:t,selectors:[["cdk-row"],["tr","cdk-row",""]],hostAttrs:["role","row",1,"cdk-row"],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(e,i){1&e&&Gi(0,0)},dependencies:[Rd],encapsulation:2}),t})(),$C=(()=>{class t{constructor(e){this.templateRef=e,this._contentClassName="cdk-no-data-row"}}return t.\u0275fac=function(e){return new(e||t)(z(Fr))},t.\u0275dir=Ge({type:t,selectors:[["ng-template","cdkNoDataRow",""]]}),t})();const XL=["top","bottom","left","right"];class yK{constructor(n,e,i,r,s=!0,d=!0,_){this._isNativeHtmlTable=n,this._stickCellCss=e,this.direction=i,this._coalescedStyleScheduler=r,this._isBrowser=s,this._needsPositionStickyOnElement=d,this._positionListener=_,this._cachedCellWidths=[],this._borderCellCss={top:`${e}-border-elem-top`,bottom:`${e}-border-elem-bottom`,left:`${e}-border-elem-left`,right:`${e}-border-elem-right`}}clearStickyPositioning(n,e){const i=[];for(const r of n)if(r.nodeType===r.ELEMENT_NODE){i.push(r);for(let s=0;s{for(const r of i)this._removeStickyStyle(r,e)})}updateStickyColumns(n,e,i,r=!0){if(!n.length||!this._isBrowser||!e.some(H=>H)&&!i.some(H=>H))return void(this._positionListener&&(this._positionListener.stickyColumnsUpdated({sizes:[]}),this._positionListener.stickyEndColumnsUpdated({sizes:[]})));const s=n[0],d=s.children.length,_=this._getCellWidths(s,r),w=this._getStickyStartColumnPositions(_,e),S=this._getStickyEndColumnPositions(_,i),I=e.lastIndexOf(!0),L=i.indexOf(!0);this._coalescedStyleScheduler.schedule(()=>{const H="rtl"===this.direction,Y=H?"right":"left",ae=H?"left":"right";for(const ve of n)for(let Be=0;Bee[Be]?ve:null)}),this._positionListener.stickyEndColumnsUpdated({sizes:-1===L?[]:_.slice(L).map((ve,Be)=>i[Be+L]?ve:null).reverse()}))})}stickRows(n,e,i){if(!this._isBrowser)return;const r="bottom"===i?n.slice().reverse():n,s="bottom"===i?e.slice().reverse():e,d=[],_=[],w=[];for(let I=0,L=0;I{for(let I=0;I{e.some(r=>!r)?this._removeStickyStyle(i,["bottom"]):this._addStickyStyle(i,"bottom",0,!1)})}_removeStickyStyle(n,e){for(const r of e)n.style[r]="",n.classList.remove(this._borderCellCss[r]);XL.some(r=>-1===e.indexOf(r)&&n.style[r])?n.style.zIndex=this._getCalculatedZIndex(n):(n.style.zIndex="",this._needsPositionStickyOnElement&&(n.style.position=""),n.classList.remove(this._stickCellCss))}_addStickyStyle(n,e,i,r){n.classList.add(this._stickCellCss),r&&n.classList.add(this._borderCellCss[e]),n.style[e]=`${i}px`,n.style.zIndex=this._getCalculatedZIndex(n),this._needsPositionStickyOnElement&&(n.style.cssText+="position: -webkit-sticky; position: sticky; ")}_getCalculatedZIndex(n){const e={top:100,bottom:10,left:1,right:1};let i=0;for(const r of XL)n.style[r]&&(i+=e[r]);return i?`${i}`:""}_getCellWidths(n,e=!0){if(!e&&this._cachedCellWidths.length)return this._cachedCellWidths;const i=[],r=n.children;for(let s=0;s0;s--)e[s]&&(i[s]=r,r+=n[s]);return i}}const oT=new vt("CDK_SPL");let WC=(()=>{class t{constructor(e,i){this.viewContainer=e,this.elementRef=i}}return t.\u0275fac=function(e){return new(e||t)(z(ro),z($t))},t.\u0275dir=Ge({type:t,selectors:[["","rowOutlet",""]]}),t})(),qC=(()=>{class t{constructor(e,i){this.viewContainer=e,this.elementRef=i}}return t.\u0275fac=function(e){return new(e||t)(z(ro),z($t))},t.\u0275dir=Ge({type:t,selectors:[["","headerRowOutlet",""]]}),t})(),ZC=(()=>{class t{constructor(e,i){this.viewContainer=e,this.elementRef=i}}return t.\u0275fac=function(e){return new(e||t)(z(ro),z($t))},t.\u0275dir=Ge({type:t,selectors:[["","footerRowOutlet",""]]}),t})(),XC=(()=>{class t{constructor(e,i){this.viewContainer=e,this.elementRef=i}}return t.\u0275fac=function(e){return new(e||t)(z(ro),z($t))},t.\u0275dir=Ge({type:t,selectors:[["","noDataRowOutlet",""]]}),t})(),YC=(()=>{class t{get trackBy(){return this._trackByFn}set trackBy(e){this._trackByFn=e}get dataSource(){return this._dataSource}set dataSource(e){this._dataSource!==e&&this._switchDataSource(e)}get multiTemplateDataRows(){return this._multiTemplateDataRows}set multiTemplateDataRows(e){this._multiTemplateDataRows=kn(e),this._rowOutlet&&this._rowOutlet.viewContainer.length&&(this._forceRenderDataRows(),this.updateStickyColumnStyles())}get fixedLayout(){return this._fixedLayout}set fixedLayout(e){this._fixedLayout=kn(e),this._forceRecalculateCellWidths=!0,this._stickyColumnStylesNeedReset=!0}constructor(e,i,r,s,d,_,w,S,I,L,H,Y){this._differs=e,this._changeDetectorRef=i,this._elementRef=r,this._dir=d,this._platform=w,this._viewRepeater=S,this._coalescedStyleScheduler=I,this._viewportRuler=L,this._stickyPositioningListener=H,this._ngZone=Y,this._onDestroy=new Zt,this._columnDefsByName=new Map,this._customColumnDefs=new Set,this._customRowDefs=new Set,this._customHeaderRowDefs=new Set,this._customFooterRowDefs=new Set,this._headerRowDefChanged=!0,this._footerRowDefChanged=!0,this._stickyColumnStylesNeedReset=!0,this._forceRecalculateCellWidths=!0,this._cachedRenderRowsMap=new Map,this.stickyCssClass="cdk-table-sticky",this.needsPositionStickyOnElement=!0,this._isShowingNoDataRow=!1,this._multiTemplateDataRows=!1,this._fixedLayout=!1,this.contentChanged=new In,this.viewChange=new ss({start:0,end:Number.MAX_VALUE}),s||this._elementRef.nativeElement.setAttribute("role","table"),this._document=_,this._isNativeHtmlTable="TABLE"===this._elementRef.nativeElement.nodeName}ngOnInit(){this._setupStickyStyler(),this._isNativeHtmlTable&&this._applyNativeTableSections(),this._dataDiffer=this._differs.find([]).create((e,i)=>this.trackBy?this.trackBy(i.dataIndex,i.data):i),this._viewportRuler.change().pipe(ri(this._onDestroy)).subscribe(()=>{this._forceRecalculateCellWidths=!0})}ngAfterContentChecked(){this._cacheRowDefs(),this._cacheColumnDefs();const i=this._renderUpdatedColumns()||this._headerRowDefChanged||this._footerRowDefChanged;this._stickyColumnStylesNeedReset=this._stickyColumnStylesNeedReset||i,this._forceRecalculateCellWidths=i,this._headerRowDefChanged&&(this._forceRenderHeaderRows(),this._headerRowDefChanged=!1),this._footerRowDefChanged&&(this._forceRenderFooterRows(),this._footerRowDefChanged=!1),this.dataSource&&this._rowDefs.length>0&&!this._renderChangeSubscription?this._observeRenderChanges():this._stickyColumnStylesNeedReset&&this.updateStickyColumnStyles(),this._checkStickyStates()}ngOnDestroy(){[this._rowOutlet.viewContainer,this._headerRowOutlet.viewContainer,this._footerRowOutlet.viewContainer,this._cachedRenderRowsMap,this._customColumnDefs,this._customRowDefs,this._customHeaderRowDefs,this._customFooterRowDefs,this._columnDefsByName].forEach(e=>{e.clear()}),this._headerRowDefs=[],this._footerRowDefs=[],this._defaultRowDef=null,this._onDestroy.next(),this._onDestroy.complete(),kD(this.dataSource)&&this.dataSource.disconnect(this)}renderRows(){this._renderRows=this._getAllRenderRows();const e=this._dataDiffer.diff(this._renderRows);if(!e)return this._updateNoDataRow(),void this.contentChanged.next();const i=this._rowOutlet.viewContainer;this._viewRepeater.applyChanges(e,i,(r,s,d)=>this._getEmbeddedViewArgs(r.item,d),r=>r.item.data,r=>{1===r.operation&&r.context&&this._renderCellTemplateForItem(r.record.item.rowDef,r.context)}),this._updateRowIndexContext(),e.forEachIdentityChange(r=>{i.get(r.currentIndex).context.$implicit=r.item.data}),this._updateNoDataRow(),this._ngZone&&Ln.isInAngularZone()?this._ngZone.onStable.pipe(Fo(1),ri(this._onDestroy)).subscribe(()=>{this.updateStickyColumnStyles()}):this.updateStickyColumnStyles(),this.contentChanged.next()}addColumnDef(e){this._customColumnDefs.add(e)}removeColumnDef(e){this._customColumnDefs.delete(e)}addRowDef(e){this._customRowDefs.add(e)}removeRowDef(e){this._customRowDefs.delete(e)}addHeaderRowDef(e){this._customHeaderRowDefs.add(e),this._headerRowDefChanged=!0}removeHeaderRowDef(e){this._customHeaderRowDefs.delete(e),this._headerRowDefChanged=!0}addFooterRowDef(e){this._customFooterRowDefs.add(e),this._footerRowDefChanged=!0}removeFooterRowDef(e){this._customFooterRowDefs.delete(e),this._footerRowDefChanged=!0}setNoDataRow(e){this._customNoDataRow=e}updateStickyHeaderRowStyles(){const e=this._getRenderedRows(this._headerRowOutlet),r=this._elementRef.nativeElement.querySelector("thead");r&&(r.style.display=e.length?"":"none");const s=this._headerRowDefs.map(d=>d.sticky);this._stickyStyler.clearStickyPositioning(e,["top"]),this._stickyStyler.stickRows(e,s,"top"),this._headerRowDefs.forEach(d=>d.resetStickyChanged())}updateStickyFooterRowStyles(){const e=this._getRenderedRows(this._footerRowOutlet),r=this._elementRef.nativeElement.querySelector("tfoot");r&&(r.style.display=e.length?"":"none");const s=this._footerRowDefs.map(d=>d.sticky);this._stickyStyler.clearStickyPositioning(e,["bottom"]),this._stickyStyler.stickRows(e,s,"bottom"),this._stickyStyler.updateStickyFooterContainer(this._elementRef.nativeElement,s),this._footerRowDefs.forEach(d=>d.resetStickyChanged())}updateStickyColumnStyles(){const e=this._getRenderedRows(this._headerRowOutlet),i=this._getRenderedRows(this._rowOutlet),r=this._getRenderedRows(this._footerRowOutlet);(this._isNativeHtmlTable&&!this._fixedLayout||this._stickyColumnStylesNeedReset)&&(this._stickyStyler.clearStickyPositioning([...e,...i,...r],["left","right"]),this._stickyColumnStylesNeedReset=!1),e.forEach((s,d)=>{this._addStickyColumnStyles([s],this._headerRowDefs[d])}),this._rowDefs.forEach(s=>{const d=[];for(let _=0;_{this._addStickyColumnStyles([s],this._footerRowDefs[d])}),Array.from(this._columnDefsByName.values()).forEach(s=>s.resetStickyChanged())}_getAllRenderRows(){const e=[],i=this._cachedRenderRowsMap;this._cachedRenderRowsMap=new Map;for(let r=0;r{const _=r&&r.has(d)?r.get(d):[];if(_.length){const w=_.shift();return w.dataIndex=i,w}return{data:e,rowDef:d,dataIndex:i}})}_cacheColumnDefs(){this._columnDefsByName.clear(),KC(this._getOwnDefs(this._contentColumnDefs),this._customColumnDefs).forEach(i=>{this._columnDefsByName.has(i.name),this._columnDefsByName.set(i.name,i)})}_cacheRowDefs(){this._headerRowDefs=KC(this._getOwnDefs(this._contentHeaderRowDefs),this._customHeaderRowDefs),this._footerRowDefs=KC(this._getOwnDefs(this._contentFooterRowDefs),this._customFooterRowDefs),this._rowDefs=KC(this._getOwnDefs(this._contentRowDefs),this._customRowDefs);const e=this._rowDefs.filter(i=>!i.when);this._defaultRowDef=e[0]}_renderUpdatedColumns(){const e=(d,_)=>d||!!_.getColumnsDiff(),i=this._rowDefs.reduce(e,!1);i&&this._forceRenderDataRows();const r=this._headerRowDefs.reduce(e,!1);r&&this._forceRenderHeaderRows();const s=this._footerRowDefs.reduce(e,!1);return s&&this._forceRenderFooterRows(),i||r||s}_switchDataSource(e){this._data=[],kD(this.dataSource)&&this.dataSource.disconnect(this),this._renderChangeSubscription&&(this._renderChangeSubscription.unsubscribe(),this._renderChangeSubscription=null),e||(this._dataDiffer&&this._dataDiffer.diff([]),this._rowOutlet.viewContainer.clear()),this._dataSource=e}_observeRenderChanges(){if(!this.dataSource)return;let e;kD(this.dataSource)?e=this.dataSource.connect(this):function sK(t){return!!t&&(t instanceof xn||it(t.lift)&&it(t.subscribe))}(this.dataSource)?e=this.dataSource:Array.isArray(this.dataSource)&&(e=_n(this.dataSource)),this._renderChangeSubscription=e.pipe(ri(this._onDestroy)).subscribe(i=>{this._data=i||[],this.renderRows()})}_forceRenderHeaderRows(){this._headerRowOutlet.viewContainer.length>0&&this._headerRowOutlet.viewContainer.clear(),this._headerRowDefs.forEach((e,i)=>this._renderRow(this._headerRowOutlet,e,i)),this.updateStickyHeaderRowStyles()}_forceRenderFooterRows(){this._footerRowOutlet.viewContainer.length>0&&this._footerRowOutlet.viewContainer.clear(),this._footerRowDefs.forEach((e,i)=>this._renderRow(this._footerRowOutlet,e,i)),this.updateStickyFooterRowStyles()}_addStickyColumnStyles(e,i){const r=Array.from(i.columns||[]).map(_=>this._columnDefsByName.get(_)),s=r.map(_=>_.sticky),d=r.map(_=>_.stickyEnd);this._stickyStyler.updateStickyColumns(e,s,d,!this._fixedLayout||this._forceRecalculateCellWidths)}_getRenderedRows(e){const i=[];for(let r=0;r!s.when||s.when(i,e));else{let s=this._rowDefs.find(d=>d.when&&d.when(i,e))||this._defaultRowDef;s&&r.push(s)}return r}_getEmbeddedViewArgs(e,i){return{templateRef:e.rowDef.template,context:{$implicit:e.data},index:i}}_renderRow(e,i,r,s={}){const d=e.viewContainer.createEmbeddedView(i.template,s,r);return this._renderCellTemplateForItem(i,s),d}_renderCellTemplateForItem(e,i){for(let r of this._getCellTemplates(e))Rd.mostRecentCellOutlet&&Rd.mostRecentCellOutlet._viewContainer.createEmbeddedView(r,i);this._changeDetectorRef.markForCheck()}_updateRowIndexContext(){const e=this._rowOutlet.viewContainer;for(let i=0,r=e.length;i{const r=this._columnDefsByName.get(i);return e.extractCellTemplate(r)}):[]}_applyNativeTableSections(){const e=this._document.createDocumentFragment(),i=[{tag:"thead",outlets:[this._headerRowOutlet]},{tag:"tbody",outlets:[this._rowOutlet,this._noDataRowOutlet]},{tag:"tfoot",outlets:[this._footerRowOutlet]}];for(const r of i){const s=this._document.createElement(r.tag);s.setAttribute("role","rowgroup");for(const d of r.outlets)s.appendChild(d.elementRef.nativeElement);e.appendChild(s)}this._elementRef.nativeElement.appendChild(e)}_forceRenderDataRows(){this._dataDiffer.diff([]),this._rowOutlet.viewContainer.clear(),this.renderRows()}_checkStickyStates(){const e=(i,r)=>i||r.hasStickyChanged();this._headerRowDefs.reduce(e,!1)&&this.updateStickyHeaderRowStyles(),this._footerRowDefs.reduce(e,!1)&&this.updateStickyFooterRowStyles(),Array.from(this._columnDefsByName.values()).reduce(e,!1)&&(this._stickyColumnStylesNeedReset=!0,this.updateStickyColumnStyles())}_setupStickyStyler(){this._stickyStyler=new yK(this._isNativeHtmlTable,this.stickyCssClass,this._dir?this._dir.value:"ltr",this._coalescedStyleScheduler,this._platform.isBrowser,this.needsPositionStickyOnElement,this._stickyPositioningListener),(this._dir?this._dir.change:_n()).pipe(ri(this._onDestroy)).subscribe(i=>{this._stickyStyler.direction=i,this.updateStickyColumnStyles()})}_getOwnDefs(e){return e.filter(i=>!i._table||i._table===this)}_updateNoDataRow(){const e=this._customNoDataRow||this._noDataRow;if(!e)return;const i=0===this._rowOutlet.viewContainer.length;if(i===this._isShowingNoDataRow)return;const r=this._noDataRowOutlet.viewContainer;if(i){const s=r.createEmbeddedView(e.templateRef),d=s.rootNodes[0];1===s.rootNodes.length&&d?.nodeType===this._document.ELEMENT_NODE&&(d.setAttribute("role","row"),d.classList.add(e._contentClassName))}else r.clear();this._isShowingNoDataRow=i}}return t.\u0275fac=function(e){return new(e||t)(z(uu),z(Lr),z($t),wa("role"),z(sa,8),z(Bn),z(Co),z(e0),z(eT),z(f0),z(oT,12),z(Ln,8))},t.\u0275cmp=Rn({type:t,selectors:[["cdk-table"],["table","cdk-table",""]],contentQueries:function(e,i,r){if(1&e&&(Ui(r,$C,5),Ui(r,kd,5),Ui(r,HC,5),Ui(r,A0,5),Ui(r,I0,5)),2&e){let s;fn(s=mn())&&(i._noDataRow=s.first),fn(s=mn())&&(i._contentColumnDefs=s),fn(s=mn())&&(i._contentRowDefs=s),fn(s=mn())&&(i._contentHeaderRowDefs=s),fn(s=mn())&&(i._contentFooterRowDefs=s)}},viewQuery:function(e,i){if(1&e&&(Yi(WC,7),Yi(qC,7),Yi(ZC,7),Yi(XC,7)),2&e){let r;fn(r=mn())&&(i._rowOutlet=r.first),fn(r=mn())&&(i._headerRowOutlet=r.first),fn(r=mn())&&(i._footerRowOutlet=r.first),fn(r=mn())&&(i._noDataRowOutlet=r.first)}},hostAttrs:[1,"cdk-table"],hostVars:2,hostBindings:function(e,i){2&e&&yi("cdk-table-fixed-layout",i.fixedLayout)},inputs:{trackBy:"trackBy",dataSource:"dataSource",multiTemplateDataRows:"multiTemplateDataRows",fixedLayout:"fixedLayout"},outputs:{contentChanged:"contentChanged"},exportAs:["cdkTable"],features:[Pn([{provide:w_,useExisting:t},{provide:e0,useClass:aO},{provide:eT,useClass:ZL},{provide:oT,useValue:null}])],ngContentSelectors:lK,decls:6,vars:0,consts:[["headerRowOutlet",""],["rowOutlet",""],["noDataRowOutlet",""],["footerRowOutlet",""]],template:function(e,i){1&e&&(Tr(aK),Xi(0),Xi(1,1),Gi(2,0)(3,1)(4,2)(5,3))},dependencies:[WC,qC,ZC,XC],styles:[".cdk-table-fixed-layout{table-layout:fixed}"],encapsulation:2}),t})();function KC(t,n){return t.concat(Array.from(n))}let bK=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=cn({type:t}),t.\u0275inj=nn({imports:[nE]}),t})();const xK=[[["caption"]],[["colgroup"],["col"]]],wK=["caption","colgroup, col"];let KL=(()=>{class t extends YC{constructor(){super(...arguments),this.stickyCssClass="mat-table-sticky",this.needsPositionStickyOnElement=!1}}return t.\u0275fac=function(){let n;return function(i){return(n||(n=qt(t)))(i||t)}}(),t.\u0275cmp=Rn({type:t,selectors:[["mat-table"],["table","mat-table",""]],hostAttrs:[1,"mat-table"],hostVars:2,hostBindings:function(e,i){2&e&&yi("mat-table-fixed-layout",i.fixedLayout)},exportAs:["matTable"],features:[Pn([{provide:e0,useClass:aO},{provide:YC,useExisting:t},{provide:w_,useExisting:t},{provide:eT,useClass:ZL},{provide:oT,useValue:null}]),a],ngContentSelectors:wK,decls:6,vars:0,consts:[["headerRowOutlet",""],["rowOutlet",""],["noDataRowOutlet",""],["footerRowOutlet",""]],template:function(e,i){1&e&&(Tr(xK),Xi(0),Xi(1,1),Gi(2,0)(3,1)(4,2)(5,3))},dependencies:[WC,qC,ZC,XC],styles:["mat-table{display:block}mat-header-row{min-height:56px}mat-row,mat-footer-row{min-height:48px}mat-row,mat-header-row,mat-footer-row{display:flex;border-width:0;border-bottom-width:1px;border-style:solid;align-items:center;box-sizing:border-box}mat-cell:first-of-type,mat-header-cell:first-of-type,mat-footer-cell:first-of-type{padding-left:24px}[dir=rtl] mat-cell:first-of-type:not(:only-of-type),[dir=rtl] mat-header-cell:first-of-type:not(:only-of-type),[dir=rtl] mat-footer-cell:first-of-type:not(:only-of-type){padding-left:0;padding-right:24px}mat-cell:last-of-type,mat-header-cell:last-of-type,mat-footer-cell:last-of-type{padding-right:24px}[dir=rtl] mat-cell:last-of-type:not(:only-of-type),[dir=rtl] mat-header-cell:last-of-type:not(:only-of-type),[dir=rtl] mat-footer-cell:last-of-type:not(:only-of-type){padding-right:0;padding-left:24px}mat-cell,mat-header-cell,mat-footer-cell{flex:1;display:flex;align-items:center;overflow:hidden;word-wrap:break-word;min-height:inherit}table.mat-table{border-spacing:0}tr.mat-header-row{height:56px}tr.mat-row,tr.mat-footer-row{height:48px}th.mat-header-cell{text-align:left}[dir=rtl] th.mat-header-cell{text-align:right}th.mat-header-cell,td.mat-cell,td.mat-footer-cell{padding:0;border-bottom-width:1px;border-bottom-style:solid}th.mat-header-cell:first-of-type,td.mat-cell:first-of-type,td.mat-footer-cell:first-of-type{padding-left:24px}[dir=rtl] th.mat-header-cell:first-of-type:not(:only-of-type),[dir=rtl] td.mat-cell:first-of-type:not(:only-of-type),[dir=rtl] td.mat-footer-cell:first-of-type:not(:only-of-type){padding-left:0;padding-right:24px}th.mat-header-cell:last-of-type,td.mat-cell:last-of-type,td.mat-footer-cell:last-of-type{padding-right:24px}[dir=rtl] th.mat-header-cell:last-of-type:not(:only-of-type),[dir=rtl] td.mat-cell:last-of-type:not(:only-of-type),[dir=rtl] td.mat-footer-cell:last-of-type:not(:only-of-type){padding-right:0;padding-left:24px}.mat-table-sticky{position:sticky !important}.mat-table-fixed-layout{table-layout:fixed}"],encapsulation:2}),t})(),sT=(()=>{class t extends C_{}return t.\u0275fac=function(){let n;return function(i){return(n||(n=qt(t)))(i||t)}}(),t.\u0275dir=Ge({type:t,selectors:[["","matCellDef",""]],features:[Pn([{provide:C_,useExisting:t}]),a]}),t})(),aT=(()=>{class t extends M_{}return t.\u0275fac=function(){let n;return function(i){return(n||(n=qt(t)))(i||t)}}(),t.\u0275dir=Ge({type:t,selectors:[["","matHeaderCellDef",""]],features:[Pn([{provide:M_,useExisting:t}]),a]}),t})(),lT=(()=>{class t extends kd{get name(){return this._name}set name(e){this._setNameInput(e)}_updateColumnCssClassName(){super._updateColumnCssClassName(),this._columnCssClassName.push(`mat-column-${this.cssClassFriendlyName}`)}}return t.\u0275fac=function(){let n;return function(i){return(n||(n=qt(t)))(i||t)}}(),t.\u0275dir=Ge({type:t,selectors:[["","matColumnDef",""]],inputs:{sticky:"sticky",name:["matColumnDef","name"]},features:[Pn([{provide:kd,useExisting:t},{provide:"MAT_SORT_HEADER_COLUMN_DEF",useExisting:t}]),a]}),t})(),cT=(()=>{class t extends QE{}return t.\u0275fac=function(){let n;return function(i){return(n||(n=qt(t)))(i||t)}}(),t.\u0275dir=Ge({type:t,selectors:[["mat-header-cell"],["th","mat-header-cell",""]],hostAttrs:["role","columnheader",1,"mat-header-cell"],features:[a]}),t})(),uT=(()=>{class t extends JE{}return t.\u0275fac=function(){let n;return function(i){return(n||(n=qt(t)))(i||t)}}(),t.\u0275dir=Ge({type:t,selectors:[["mat-cell"],["td","mat-cell",""]],hostAttrs:["role","gridcell",1,"mat-cell"],features:[a]}),t})(),QL=(()=>{class t extends A0{}return t.\u0275fac=function(){let n;return function(i){return(n||(n=qt(t)))(i||t)}}(),t.\u0275dir=Ge({type:t,selectors:[["","matHeaderRowDef",""]],inputs:{columns:["matHeaderRowDef","columns"],sticky:["matHeaderRowDefSticky","sticky"]},features:[Pn([{provide:A0,useExisting:t}]),a]}),t})(),JL=(()=>{class t extends HC{}return t.\u0275fac=function(){let n;return function(i){return(n||(n=qt(t)))(i||t)}}(),t.\u0275dir=Ge({type:t,selectors:[["","matRowDef",""]],inputs:{columns:["matRowDefColumns","columns"],when:["matRowDefWhen","when"]},features:[Pn([{provide:HC,useExisting:t}]),a]}),t})(),eB=(()=>{class t extends nT{}return t.\u0275fac=function(){let n;return function(i){return(n||(n=qt(t)))(i||t)}}(),t.\u0275cmp=Rn({type:t,selectors:[["mat-header-row"],["tr","mat-header-row",""]],hostAttrs:["role","row",1,"mat-header-row"],exportAs:["matHeaderRow"],features:[Pn([{provide:nT,useExisting:t}]),a],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(e,i){1&e&&Gi(0,0)},dependencies:[Rd],encapsulation:2}),t})(),tB=(()=>{class t extends rT{}return t.\u0275fac=function(){let n;return function(i){return(n||(n=qt(t)))(i||t)}}(),t.\u0275cmp=Rn({type:t,selectors:[["mat-row"],["tr","mat-row",""]],hostAttrs:["role","row",1,"mat-row"],exportAs:["matRow"],features:[Pn([{provide:rT,useExisting:t}]),a],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(e,i){1&e&&Gi(0,0)},dependencies:[Rd],encapsulation:2}),t})(),RK=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=cn({type:t}),t.\u0275inj=nn({imports:[bK,oi,oi]}),t})();class OK extends h6{constructor(n=[]){super(),this._renderData=new ss([]),this._filter=new ss(""),this._internalPageChanges=new Zt,this._renderChangesSubscription=null,this.sortingDataAccessor=(e,i)=>{const r=e[i];if(IP(r)){const s=Number(r);return s<9007199254740991?s:r}return r},this.sortData=(e,i)=>{const r=i.active,s=i.direction;return r&&""!=s?e.sort((d,_)=>{let w=this.sortingDataAccessor(d,r),S=this.sortingDataAccessor(_,r);const I=typeof w,L=typeof S;I!==L&&("number"===I&&(w+=""),"number"===L&&(S+=""));let H=0;return null!=w&&null!=S?w>S?H=1:w{const r=Object.keys(e).reduce((d,_)=>d+e[_]+"\u25ec","").toLowerCase(),s=i.trim().toLowerCase();return-1!=r.indexOf(s)},this._data=new ss(n),this._updateChangeSubscription()}get data(){return this._data.value}set data(n){n=Array.isArray(n)?n:[],this._data.next(n),this._renderChangesSubscription||this._filterData(n)}get filter(){return this._filter.value}set filter(n){this._filter.next(n),this._renderChangesSubscription||this._filterData(this.data)}get sort(){return this._sort}set sort(n){this._sort=n,this._updateChangeSubscription()}get paginator(){return this._paginator}set paginator(n){this._paginator=n,this._updateChangeSubscription()}_updateChangeSubscription(){const n=this._sort?mr(this._sort.sortChange,this._sort.initialized):_n(null),e=this._paginator?mr(this._paginator.page,this._internalPageChanges,this._paginator.initialized):_n(null),r=qg([this._data,this._filter]).pipe(Jt(([_])=>this._filterData(_))),s=qg([r,n]).pipe(Jt(([_])=>this._orderData(_))),d=qg([s,e]).pipe(Jt(([_])=>this._pageData(_)));this._renderChangesSubscription?.unsubscribe(),this._renderChangesSubscription=d.subscribe(_=>this._renderData.next(_))}_filterData(n){return this.filteredData=null==this.filter||""===this.filter?n:n.filter(e=>this.filterPredicate(e,this.filter)),this.paginator&&this._updatePaginator(this.filteredData.length),this.filteredData}_orderData(n){return this.sort?this.sortData(n.slice(),this.sort):n}_pageData(n){if(!this.paginator)return n;const e=this.paginator.pageIndex*this.paginator.pageSize;return n.slice(e,e+this.paginator.pageSize)}_updatePaginator(n){Promise.resolve().then(()=>{const e=this.paginator;if(e&&(e.length=n,e.pageIndex>0)){const i=Math.ceil(e.length/e.pageSize)-1||0,r=Math.min(e.pageIndex,i);r!==e.pageIndex&&(e.pageIndex=r,this._internalPageChanges.next())}})}connect(){return this._renderChangesSubscription||this._updateChangeSubscription(),this._renderData}disconnect(){this._renderChangesSubscription?.unsubscribe(),this._renderChangesSubscription=null}}class FK extends OK{}const LK=["tooltip"],nB="tooltip-panel",iB=s_({passive:!0}),rB=new vt("mat-tooltip-scroll-strategy"),VK={provide:rB,deps:[ka],useFactory:function zK(t){return()=>t.scrollStrategies.reposition({scrollThrottle:20})}},GK=new vt("mat-tooltip-default-options",{providedIn:"root",factory:function UK(){return{showDelay:0,hideDelay:0,touchendHideDelay:1500}}});let jK=(()=>{class t{constructor(e,i,r,s,d,_,w,S,I,L,H,Y){this._overlay=e,this._elementRef=i,this._scrollDispatcher=r,this._viewContainerRef=s,this._ngZone=d,this._platform=_,this._ariaDescriber=w,this._focusMonitor=S,this._dir=L,this._defaultOptions=H,this._position="below",this._disabled=!1,this._viewInitialized=!1,this._pointerExitEventsInitialized=!1,this._viewportMargin=8,this._cssClassPrefix="mat",this._showDelay=this._defaultOptions.showDelay,this._hideDelay=this._defaultOptions.hideDelay,this.touchGestures="auto",this._message="",this._passiveListeners=[],this._destroyed=new Zt,this._scrollStrategy=I,this._document=Y,H&&(H.position&&(this.position=H.position),H.touchGestures&&(this.touchGestures=H.touchGestures)),L.change.pipe(ri(this._destroyed)).subscribe(()=>{this._overlayRef&&this._updatePosition(this._overlayRef)})}get position(){return this._position}set position(e){e!==this._position&&(this._position=e,this._overlayRef&&(this._updatePosition(this._overlayRef),this._tooltipInstance?.show(0),this._overlayRef.updatePosition()))}get disabled(){return this._disabled}set disabled(e){this._disabled=kn(e),this._disabled?this.hide(0):this._setupPointerEnterEventsIfNeeded()}get showDelay(){return this._showDelay}set showDelay(e){this._showDelay=wc(e)}get hideDelay(){return this._hideDelay}set hideDelay(e){this._hideDelay=wc(e),this._tooltipInstance&&(this._tooltipInstance._mouseLeaveHideDelay=this._hideDelay)}get message(){return this._message}set message(e){this._ariaDescriber.removeDescription(this._elementRef.nativeElement,this._message,"tooltip"),this._message=null!=e?String(e).trim():"",!this._message&&this._isTooltipVisible()?this.hide(0):(this._setupPointerEnterEventsIfNeeded(),this._updateTooltipMessage(),this._ngZone.runOutsideAngular(()=>{Promise.resolve().then(()=>{this._ariaDescriber.describe(this._elementRef.nativeElement,this.message,"tooltip")})}))}get tooltipClass(){return this._tooltipClass}set tooltipClass(e){this._tooltipClass=e,this._tooltipInstance&&this._setTooltipClass(this._tooltipClass)}ngAfterViewInit(){this._viewInitialized=!0,this._setupPointerEnterEventsIfNeeded(),this._focusMonitor.monitor(this._elementRef).pipe(ri(this._destroyed)).subscribe(e=>{e?"keyboard"===e&&this._ngZone.run(()=>this.show()):this._ngZone.run(()=>this.hide(0))})}ngOnDestroy(){const e=this._elementRef.nativeElement;clearTimeout(this._touchstartTimeout),this._overlayRef&&(this._overlayRef.dispose(),this._tooltipInstance=null),this._passiveListeners.forEach(([i,r])=>{e.removeEventListener(i,r,iB)}),this._passiveListeners.length=0,this._destroyed.next(),this._destroyed.complete(),this._ariaDescriber.removeDescription(e,this.message,"tooltip"),this._focusMonitor.stopMonitoring(e)}show(e=this.showDelay){if(this.disabled||!this.message||this._isTooltipVisible())return void this._tooltipInstance?._cancelPendingAnimations();const i=this._createOverlay();this._detach(),this._portal=this._portal||new f_(this._tooltipComponent,this._viewContainerRef);const r=this._tooltipInstance=i.attach(this._portal).instance;r._triggerElement=this._elementRef.nativeElement,r._mouseLeaveHideDelay=this._hideDelay,r.afterHidden().pipe(ri(this._destroyed)).subscribe(()=>this._detach()),this._setTooltipClass(this._tooltipClass),this._updateTooltipMessage(),r.show(e)}hide(e=this.hideDelay){const i=this._tooltipInstance;i&&(i.isVisible()?i.hide(e):(i._cancelPendingAnimations(),this._detach()))}toggle(){this._isTooltipVisible()?this.hide():this.show()}_isTooltipVisible(){return!!this._tooltipInstance&&this._tooltipInstance.isVisible()}_createOverlay(){if(this._overlayRef)return this._overlayRef;const e=this._scrollDispatcher.getAncestorScrollContainers(this._elementRef),i=this._overlay.position().flexibleConnectedTo(this._elementRef).withTransformOriginOn(`.${this._cssClassPrefix}-tooltip`).withFlexibleDimensions(!1).withViewportMargin(this._viewportMargin).withScrollableContainers(e);return i.positionChanges.pipe(ri(this._destroyed)).subscribe(r=>{this._updateCurrentPositionClass(r.connectionPair),this._tooltipInstance&&r.scrollableViewProperties.isOverlayClipped&&this._tooltipInstance.isVisible()&&this._ngZone.run(()=>this.hide(0))}),this._overlayRef=this._overlay.create({direction:this._dir,positionStrategy:i,panelClass:`${this._cssClassPrefix}-${nB}`,scrollStrategy:this._scrollStrategy()}),this._updatePosition(this._overlayRef),this._overlayRef.detachments().pipe(ri(this._destroyed)).subscribe(()=>this._detach()),this._overlayRef.outsidePointerEvents().pipe(ri(this._destroyed)).subscribe(()=>this._tooltipInstance?._handleBodyInteraction()),this._overlayRef.keydownEvents().pipe(ri(this._destroyed)).subscribe(r=>{this._isTooltipVisible()&&27===r.keyCode&&!xc(r)&&(r.preventDefault(),r.stopPropagation(),this._ngZone.run(()=>this.hide(0)))}),this._defaultOptions?.disableTooltipInteractivity&&this._overlayRef.addPanelClass(`${this._cssClassPrefix}-tooltip-panel-non-interactive`),this._overlayRef}_detach(){this._overlayRef&&this._overlayRef.hasAttached()&&this._overlayRef.detach(),this._tooltipInstance=null}_updatePosition(e){const i=e.getConfig().positionStrategy,r=this._getOrigin(),s=this._getOverlayPosition();i.withPositions([this._addOffset({...r.main,...s.main}),this._addOffset({...r.fallback,...s.fallback})])}_addOffset(e){return e}_getOrigin(){const e=!this._dir||"ltr"==this._dir.value,i=this.position;let r;"above"==i||"below"==i?r={originX:"center",originY:"above"==i?"top":"bottom"}:"before"==i||"left"==i&&e||"right"==i&&!e?r={originX:"start",originY:"center"}:("after"==i||"right"==i&&e||"left"==i&&!e)&&(r={originX:"end",originY:"center"});const{x:s,y:d}=this._invertPosition(r.originX,r.originY);return{main:r,fallback:{originX:s,originY:d}}}_getOverlayPosition(){const e=!this._dir||"ltr"==this._dir.value,i=this.position;let r;"above"==i?r={overlayX:"center",overlayY:"bottom"}:"below"==i?r={overlayX:"center",overlayY:"top"}:"before"==i||"left"==i&&e||"right"==i&&!e?r={overlayX:"end",overlayY:"center"}:("after"==i||"right"==i&&e||"left"==i&&!e)&&(r={overlayX:"start",overlayY:"center"});const{x:s,y:d}=this._invertPosition(r.overlayX,r.overlayY);return{main:r,fallback:{overlayX:s,overlayY:d}}}_updateTooltipMessage(){this._tooltipInstance&&(this._tooltipInstance.message=this.message,this._tooltipInstance._markForCheck(),this._ngZone.onMicrotaskEmpty.pipe(Fo(1),ri(this._destroyed)).subscribe(()=>{this._tooltipInstance&&this._overlayRef.updatePosition()}))}_setTooltipClass(e){this._tooltipInstance&&(this._tooltipInstance.tooltipClass=e,this._tooltipInstance._markForCheck())}_invertPosition(e,i){return"above"===this.position||"below"===this.position?"top"===i?i="bottom":"bottom"===i&&(i="top"):"end"===e?e="start":"start"===e&&(e="end"),{x:e,y:i}}_updateCurrentPositionClass(e){const{overlayY:i,originX:r,originY:s}=e;let d;if(d="center"===i?this._dir&&"rtl"===this._dir.value?"end"===r?"left":"right":"start"===r?"left":"right":"bottom"===i&&"top"===s?"above":"below",d!==this._currentPosition){const _=this._overlayRef;if(_){const w=`${this._cssClassPrefix}-${nB}-`;_.removePanelClass(w+this._currentPosition),_.addPanelClass(w+d)}this._currentPosition=d}}_setupPointerEnterEventsIfNeeded(){this._disabled||!this.message||!this._viewInitialized||this._passiveListeners.length||(this._platformSupportsMouseEvents()?this._passiveListeners.push(["mouseenter",()=>{this._setupPointerExitEventsIfNeeded(),this.show()}]):"off"!==this.touchGestures&&(this._disableNativeGesturesIfNecessary(),this._passiveListeners.push(["touchstart",()=>{this._setupPointerExitEventsIfNeeded(),clearTimeout(this._touchstartTimeout),this._touchstartTimeout=setTimeout(()=>this.show(),500)}])),this._addListeners(this._passiveListeners))}_setupPointerExitEventsIfNeeded(){if(this._pointerExitEventsInitialized)return;this._pointerExitEventsInitialized=!0;const e=[];if(this._platformSupportsMouseEvents())e.push(["mouseleave",i=>{const r=i.relatedTarget;(!r||!this._overlayRef?.overlayElement.contains(r))&&this.hide()}],["wheel",i=>this._wheelListener(i)]);else if("off"!==this.touchGestures){this._disableNativeGesturesIfNecessary();const i=()=>{clearTimeout(this._touchstartTimeout),this.hide(this._defaultOptions.touchendHideDelay)};e.push(["touchend",i],["touchcancel",i])}this._addListeners(e),this._passiveListeners.push(...e)}_addListeners(e){e.forEach(([i,r])=>{this._elementRef.nativeElement.addEventListener(i,r,iB)})}_platformSupportsMouseEvents(){return!this._platform.IOS&&!this._platform.ANDROID}_wheelListener(e){if(this._isTooltipVisible()){const i=this._document.elementFromPoint(e.clientX,e.clientY),r=this._elementRef.nativeElement;i!==r&&!r.contains(i)&&this.hide()}}_disableNativeGesturesIfNecessary(){const e=this.touchGestures;if("off"!==e){const i=this._elementRef.nativeElement,r=i.style;("on"===e||"INPUT"!==i.nodeName&&"TEXTAREA"!==i.nodeName)&&(r.userSelect=r.msUserSelect=r.webkitUserSelect=r.MozUserSelect="none"),("on"===e||!i.draggable)&&(r.webkitUserDrag="none"),r.touchAction="none",r.webkitTapHighlightColor="transparent"}}}return t.\u0275fac=function(e){Bs()},t.\u0275dir=Ge({type:t,inputs:{position:["matTooltipPosition","position"],disabled:["matTooltipDisabled","disabled"],showDelay:["matTooltipShowDelay","showDelay"],hideDelay:["matTooltipHideDelay","hideDelay"],touchGestures:["matTooltipTouchGestures","touchGestures"],message:["matTooltip","message"],tooltipClass:["matTooltipClass","tooltipClass"]}}),t})(),oB=(()=>{class t extends jK{constructor(e,i,r,s,d,_,w,S,I,L,H,Y){super(e,i,r,s,d,_,w,S,I,L,H,Y),this._tooltipComponent=$K}}return t.\u0275fac=function(e){return new(e||t)(z(ka),z($t),z(p0),z(ro),z(Ln),z(Co),z(mH),z(Cc),z(rB),z(sa,8),z(GK,8),z(Bn))},t.\u0275dir=Ge({type:t,selectors:[["","matTooltip",""]],hostAttrs:[1,"mat-tooltip-trigger"],exportAs:["matTooltip"],features:[a]}),t})(),HK=(()=>{class t{constructor(e,i){this._changeDetectorRef=e,this._closeOnInteraction=!1,this._isVisible=!1,this._onHide=new Zt,this._animationsDisabled="NoopAnimations"===i}show(e){clearTimeout(this._hideTimeoutId),this._showTimeoutId=setTimeout(()=>{this._toggleVisibility(!0),this._showTimeoutId=void 0},e)}hide(e){clearTimeout(this._showTimeoutId),this._hideTimeoutId=setTimeout(()=>{this._toggleVisibility(!1),this._hideTimeoutId=void 0},e)}afterHidden(){return this._onHide}isVisible(){return this._isVisible}ngOnDestroy(){this._cancelPendingAnimations(),this._onHide.complete(),this._triggerElement=null}_handleBodyInteraction(){this._closeOnInteraction&&this.hide(0)}_markForCheck(){this._changeDetectorRef.markForCheck()}_handleMouseLeave({relatedTarget:e}){(!e||!this._triggerElement.contains(e))&&(this.isVisible()?this.hide(this._mouseLeaveHideDelay):this._finalizeAnimation(!1))}_onShow(){}_handleAnimationEnd({animationName:e}){(e===this._showAnimation||e===this._hideAnimation)&&this._finalizeAnimation(e===this._showAnimation)}_cancelPendingAnimations(){clearTimeout(this._showTimeoutId),clearTimeout(this._hideTimeoutId),this._showTimeoutId=this._hideTimeoutId=void 0}_finalizeAnimation(e){e?this._closeOnInteraction=!0:this.isVisible()||this._onHide.next()}_toggleVisibility(e){const i=this._tooltip.nativeElement,r=this._showAnimation,s=this._hideAnimation;if(i.classList.remove(e?s:r),i.classList.add(e?r:s),this._isVisible=e,e&&!this._animationsDisabled&&"function"==typeof getComputedStyle){const d=getComputedStyle(i);("0s"===d.getPropertyValue("animation-duration")||"none"===d.getPropertyValue("animation-name"))&&(this._animationsDisabled=!0)}e&&this._onShow(),this._animationsDisabled&&(i.classList.add("_mat-animation-noopable"),this._finalizeAnimation(e))}}return t.\u0275fac=function(e){return new(e||t)(z(Lr),z(Ta,8))},t.\u0275dir=Ge({type:t}),t})(),$K=(()=>{class t extends HK{constructor(e,i,r){super(e,r),this._breakpointObserver=i,this._isHandset=this._breakpointObserver.observe("(max-width: 599.98px) and (orientation: portrait), (max-width: 959.98px) and (orientation: landscape)"),this._showAnimation="mat-tooltip-show",this._hideAnimation="mat-tooltip-hide"}}return t.\u0275fac=function(e){return new(e||t)(z(Lr),z(Vw),z(Ta,8))},t.\u0275cmp=Rn({type:t,selectors:[["mat-tooltip-component"]],viewQuery:function(e,i){if(1&e&&Yi(LK,7),2&e){let r;fn(r=mn())&&(i._tooltip=r.first)}},hostAttrs:["aria-hidden","true"],hostVars:2,hostBindings:function(e,i){1&e&&Nt("mouseleave",function(s){return i._handleMouseLeave(s)}),2&e&&pc("zoom",i.isVisible()?1:null)},features:[a],decls:4,vars:6,consts:[[1,"mat-tooltip",3,"ngClass","animationend"],["tooltip",""]],template:function(e,i){if(1&e&&(se(0,"div",0,1),Nt("animationend",function(s){return i._handleAnimationEnd(s)}),Df(2,"async"),Ze(3),he()),2&e){let r;yi("mat-tooltip-handset",null==(r=function KA(t,n,e){const i=t+22,r=Dt(),s=tc(r,i);return gv(r,i)?WA(r,Do(),n,s.transform,e,s):s.transform(e)}(2,4,i._isHandset))?null:r.matches),Ae("ngClass",i.tooltipClass),Se(3),Wr(i.message)}},dependencies:[If,bk],styles:[".mat-tooltip{color:#fff;border-radius:4px;margin:14px;max-width:250px;padding-left:8px;padding-right:8px;overflow:hidden;text-overflow:ellipsis;transform:scale(0)}.mat-tooltip._mat-animation-noopable{animation:none;transform:scale(1)}.cdk-high-contrast-active .mat-tooltip{outline:solid 1px}.mat-tooltip-handset{margin:24px;padding-left:16px;padding-right:16px}.mat-tooltip-panel-non-interactive{pointer-events:none}@keyframes mat-tooltip-show{0%{opacity:0;transform:scale(0)}50%{opacity:.5;transform:scale(0.99)}100%{opacity:1;transform:scale(1)}}@keyframes mat-tooltip-hide{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(1)}}.mat-tooltip-show{animation:mat-tooltip-show 200ms cubic-bezier(0, 0, 0.2, 1) forwards}.mat-tooltip-hide{animation:mat-tooltip-hide 100ms cubic-bezier(0, 0, 0.2, 1) forwards}"],encapsulation:2,changeDetection:0}),t})(),sB=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=cn({type:t}),t.\u0275inj=nn({providers:[VK],imports:[SD,Ia,Xf,oi,oi,ip]}),t})();function WK(t,n){1&t&&Xi(0)}const qK=["*"];let aB=(()=>{class t{constructor(e){this._elementRef=e}focus(){this._elementRef.nativeElement.focus()}}return t.\u0275fac=function(e){return new(e||t)(z($t))},t.\u0275dir=Ge({type:t,selectors:[["","cdkStepHeader",""]],hostAttrs:["role","tab"]}),t})(),lB=(()=>{class t{constructor(e){this.template=e}}return t.\u0275fac=function(e){return new(e||t)(z(Fr))},t.\u0275dir=Ge({type:t,selectors:[["","cdkStepLabel",""]]}),t})(),ZK=0;const cB=new vt("STEPPER_GLOBAL_OPTIONS");let dT=(()=>{class t{get editable(){return this._editable}set editable(e){this._editable=kn(e)}get optional(){return this._optional}set optional(e){this._optional=kn(e)}get completed(){return null==this._completedOverride?this._getDefaultCompleted():this._completedOverride}set completed(e){this._completedOverride=kn(e)}_getDefaultCompleted(){return this.stepControl?this.stepControl.valid&&this.interacted:this.interacted}get hasError(){return null==this._customError?this._getDefaultError():this._customError}set hasError(e){this._customError=kn(e)}_getDefaultError(){return this.stepControl&&this.stepControl.invalid&&this.interacted}constructor(e,i){this._stepper=e,this.interacted=!1,this.interactedStream=new In,this._editable=!0,this._optional=!1,this._completedOverride=null,this._customError=null,this._stepperOptions=i||{},this._displayDefaultIndicatorType=!1!==this._stepperOptions.displayDefaultIndicatorType}select(){this._stepper.selected=this}reset(){this.interacted=!1,null!=this._completedOverride&&(this._completedOverride=!1),null!=this._customError&&(this._customError=!1),this.stepControl&&this.stepControl.reset()}ngOnChanges(){this._stepper._stateChanged()}_markAsInteracted(){this.interacted||(this.interacted=!0,this.interactedStream.emit(this))}_showError(){return this._stepperOptions.showError??null!=this._customError}}return t.\u0275fac=function(e){return new(e||t)(z(ni(()=>QC)),z(cB,8))},t.\u0275cmp=Rn({type:t,selectors:[["cdk-step"]],contentQueries:function(e,i,r){if(1&e&&Ui(r,lB,5),2&e){let s;fn(s=mn())&&(i.stepLabel=s.first)}},viewQuery:function(e,i){if(1&e&&Yi(Fr,7),2&e){let r;fn(r=mn())&&(i.content=r.first)}},inputs:{stepControl:"stepControl",label:"label",errorMessage:"errorMessage",ariaLabel:["aria-label","ariaLabel"],ariaLabelledby:["aria-labelledby","ariaLabelledby"],state:"state",editable:"editable",optional:"optional",completed:"completed",hasError:"hasError"},outputs:{interactedStream:"interacted"},exportAs:["cdkStep"],features:[Hi],ngContentSelectors:qK,decls:1,vars:0,template:function(e,i){1&e&&(Tr(),Mt(0,WK,1,0,"ng-template"))},encapsulation:2,changeDetection:0}),t})(),QC=(()=>{class t{get linear(){return this._linear}set linear(e){this._linear=kn(e)}get selectedIndex(){return this._selectedIndex}set selectedIndex(e){const i=wc(e);this.steps&&this._steps?(this._isValidIndex(i),this.selected?._markAsInteracted(),this._selectedIndex!==i&&!this._anyControlsInvalidOrPending(i)&&(i>=this._selectedIndex||this.steps.toArray()[i].editable)&&this._updateSelectedItemIndex(i)):this._selectedIndex=i}get selected(){return this.steps?this.steps.toArray()[this.selectedIndex]:void 0}set selected(e){this.selectedIndex=e&&this.steps?this.steps.toArray().indexOf(e):-1}get orientation(){return this._orientation}set orientation(e){this._orientation=e,this._keyManager&&this._keyManager.withVerticalOrientation("vertical"===e)}constructor(e,i,r){this._dir=e,this._changeDetectorRef=i,this._elementRef=r,this._destroyed=new Zt,this.steps=new qh,this._sortedHeaders=new qh,this._linear=!1,this._selectedIndex=0,this.selectionChange=new In,this._orientation="horizontal",this._groupId=ZK++}ngAfterContentInit(){this._steps.changes.pipe(Vs(this._steps),ri(this._destroyed)).subscribe(e=>{this.steps.reset(e.filter(i=>i._stepper===this)),this.steps.notifyOnChanges()})}ngAfterViewInit(){this._stepHeader.changes.pipe(Vs(this._stepHeader),ri(this._destroyed)).subscribe(e=>{this._sortedHeaders.reset(e.toArray().sort((i,r)=>i._elementRef.nativeElement.compareDocumentPosition(r._elementRef.nativeElement)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1)),this._sortedHeaders.notifyOnChanges()}),this._keyManager=new zP(this._sortedHeaders).withWrap().withHomeAndEnd().withVerticalOrientation("vertical"===this._orientation),(this._dir?this._dir.change:_n()).pipe(Vs(this._layoutDirection()),ri(this._destroyed)).subscribe(e=>this._keyManager.withHorizontalOrientation(e)),this._keyManager.updateActiveItem(this._selectedIndex),this.steps.changes.subscribe(()=>{this.selected||(this._selectedIndex=Math.max(this._selectedIndex-1,0))}),this._isValidIndex(this._selectedIndex)||(this._selectedIndex=0)}ngOnDestroy(){this._keyManager?.destroy(),this.steps.destroy(),this._sortedHeaders.destroy(),this._destroyed.next(),this._destroyed.complete()}next(){this.selectedIndex=Math.min(this._selectedIndex+1,this.steps.length-1)}previous(){this.selectedIndex=Math.max(this._selectedIndex-1,0)}reset(){this._updateSelectedItemIndex(0),this.steps.forEach(e=>e.reset()),this._stateChanged()}_getStepLabelId(e){return`cdk-step-label-${this._groupId}-${e}`}_getStepContentId(e){return`cdk-step-content-${this._groupId}-${e}`}_stateChanged(){this._changeDetectorRef.markForCheck()}_getAnimationDirection(e){const i=e-this._selectedIndex;return i<0?"rtl"===this._layoutDirection()?"next":"previous":i>0?"rtl"===this._layoutDirection()?"previous":"next":"current"}_getIndicatorType(e,i="number"){const r=this.steps.toArray()[e],s=this._isCurrentStep(e);return r._displayDefaultIndicatorType?this._getDefaultIndicatorLogic(r,s):this._getGuidelineLogic(r,s,i)}_getDefaultIndicatorLogic(e,i){return e._showError()&&e.hasError&&!i?"error":!e.completed||i?"number":e.editable?"edit":"done"}_getGuidelineLogic(e,i,r="number"){return e._showError()&&e.hasError&&!i?"error":e.completed&&!i?"done":e.completed&&i?r:e.editable&&i?"edit":r}_isCurrentStep(e){return this._selectedIndex===e}_getFocusIndex(){return this._keyManager?this._keyManager.activeItemIndex:this._selectedIndex}_updateSelectedItemIndex(e){const i=this.steps.toArray();this.selectionChange.emit({selectedIndex:e,previouslySelectedIndex:this._selectedIndex,selectedStep:i[e],previouslySelectedStep:i[this._selectedIndex]}),this._containsFocus()?this._keyManager.setActiveItem(e):this._keyManager.updateActiveItem(e),this._selectedIndex=e,this._stateChanged()}_onKeydown(e){const i=xc(e),r=e.keyCode,s=this._keyManager;null==s.activeItemIndex||i||32!==r&&13!==r?s.setFocusOrigin("keyboard").onKeydown(e):(this.selectedIndex=s.activeItemIndex,e.preventDefault())}_anyControlsInvalidOrPending(e){return!!(this._linear&&e>=0)&&this.steps.toArray().slice(0,e).some(i=>{const r=i.stepControl;return(r?r.invalid||r.pending||!i.interacted:!i.completed)&&!i.optional&&!i._completedOverride})}_layoutDirection(){return this._dir&&"rtl"===this._dir.value?"rtl":"ltr"}_containsFocus(){const e=this._elementRef.nativeElement,i=Ow();return e===i||e.contains(i)}_isValidIndex(e){return e>-1&&(!this.steps||e{class t{constructor(e){this._stepper=e,this.type="submit"}}return t.\u0275fac=function(e){return new(e||t)(z(QC))},t.\u0275dir=Ge({type:t,selectors:[["button","cdkStepperNext",""]],hostVars:1,hostBindings:function(e,i){1&e&&Nt("click",function(){return i._stepper.next()}),2&e&&gc("type",i.type)},inputs:{type:"type"}}),t})(),YK=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=cn({type:t}),t.\u0275inj=nn({imports:[zf]}),t})();function KK(t,n){if(1&t&&Gi(0,8),2&t){const e=Et();Ae("ngTemplateOutlet",e.iconOverrides[e.state])("ngTemplateOutletContext",e._getIconContext())}}function QK(t,n){if(1&t&&(se(0,"span",13),Ze(1),he()),2&t){const e=Et(2);Se(1),Wr(e._getDefaultTextForState(e.state))}}function JK(t,n){if(1&t&&(se(0,"span",14),Ze(1),he()),2&t){const e=Et(2);Se(1),Wr(e._intl.completedLabel)}}function eQ(t,n){if(1&t&&(se(0,"span",14),Ze(1),he()),2&t){const e=Et(2);Se(1),Wr(e._intl.editableLabel)}}function tQ(t,n){if(1&t&&(se(0,"mat-icon",13),Ze(1),he()),2&t){const e=Et(2);Se(1),Wr(e._getDefaultTextForState(e.state))}}function nQ(t,n){if(1&t&&(Li(0,9),Mt(1,QK,2,1,"span",10),Mt(2,JK,2,1,"span",11),Mt(3,eQ,2,1,"span",11),Mt(4,tQ,2,1,"mat-icon",12),Bi()),2&t){const e=Et();Ae("ngSwitch",e.state),Se(1),Ae("ngSwitchCase","number"),Se(1),Ae("ngIf","done"===e.state),Se(1),Ae("ngIf","edit"===e.state)}}function iQ(t,n){if(1&t&&(se(0,"div",15),Gi(1,16),he()),2&t){const e=Et();Se(1),Ae("ngTemplateOutlet",e._templateLabel().template)}}function rQ(t,n){if(1&t&&(se(0,"div",15),Ze(1),he()),2&t){const e=Et();Se(1),Wr(e.label)}}function oQ(t,n){if(1&t&&(se(0,"div",17),Ze(1),he()),2&t){const e=Et();Se(1),Wr(e._intl.optionalLabel)}}function sQ(t,n){if(1&t&&(se(0,"div",18),Ze(1),he()),2&t){const e=Et();Se(1),Wr(e.errorMessage)}}function aQ(t,n){}function lQ(t,n){if(1&t&&(Xi(0),Mt(1,aQ,0,0,"ng-template",0)),2&t){const e=Et();Se(1),Ae("cdkPortalOutlet",e._portal)}}const cQ=["*"];function uQ(t,n){1&t&&ut(0,"div",11)}const uB=function(t,n){return{step:t,i:n}};function dQ(t,n){if(1&t&&(Li(0),Gi(1,9),Mt(2,uQ,1,0,"div",10),Bi()),2&t){const e=n.$implicit,i=n.index,r=n.last;Et(2);const s=sr(4);Se(1),Ae("ngTemplateOutlet",s)("ngTemplateOutletContext",fv(3,uB,e,i)),Se(1),Ae("ngIf",!r)}}const dB=function(t){return{animationDuration:t}},hB=function(t,n){return{value:t,params:n}};function hQ(t,n){if(1&t){const e=wi();se(0,"div",12),Nt("@horizontalStepTransition.done",function(r){return Wn(e),qn(Et(2)._animationDone.next(r))}),Gi(1,13),he()}if(2&t){const e=n.$implicit,i=n.index,r=Et(2);yi("mat-horizontal-stepper-content-inactive",r.selectedIndex!==i),Ae("@horizontalStepTransition",fv(8,hB,r._getAnimationDirection(i),Ns(6,dB,r._getAnimationDuration())))("id",r._getStepContentId(i)),et("aria-labelledby",r._getStepLabelId(i)),Se(1),Ae("ngTemplateOutlet",e.content)}}function pQ(t,n){if(1&t&&(se(0,"div",4)(1,"div",5),Mt(2,dQ,3,6,"ng-container",6),he(),se(3,"div",7),Mt(4,hQ,2,11,"div",8),he()()),2&t){const e=Et();Se(2),Ae("ngForOf",e.steps),Se(2),Ae("ngForOf",e.steps)}}function fQ(t,n){if(1&t){const e=wi();se(0,"div",15),Gi(1,9),se(2,"div",16)(3,"div",17),Nt("@verticalStepTransition.done",function(r){return Wn(e),qn(Et(2)._animationDone.next(r))}),se(4,"div",18),Gi(5,13),he()()()()}if(2&t){const e=n.$implicit,i=n.index,r=n.last,s=Et(2),d=sr(4);Se(1),Ae("ngTemplateOutlet",d)("ngTemplateOutletContext",fv(10,uB,e,i)),Se(1),yi("mat-stepper-vertical-line",!r),Se(1),yi("mat-vertical-stepper-content-inactive",s.selectedIndex!==i),Ae("@verticalStepTransition",fv(15,hB,s._getAnimationDirection(i),Ns(13,dB,s._getAnimationDuration())))("id",s._getStepContentId(i)),et("aria-labelledby",s._getStepLabelId(i)),Se(2),Ae("ngTemplateOutlet",e.content)}}function mQ(t,n){if(1&t&&(Li(0),Mt(1,fQ,6,18,"div",14),Bi()),2&t){const e=Et();Se(1),Ae("ngForOf",e.steps)}}function gQ(t,n){if(1&t){const e=wi();se(0,"mat-step-header",19),Nt("click",function(){return qn(Wn(e).step.select())})("keydown",function(r){return Wn(e),qn(Et()._onKeydown(r))}),he()}if(2&t){const e=n.step,i=n.i,r=Et();yi("mat-horizontal-stepper-header","horizontal"===r.orientation)("mat-vertical-stepper-header","vertical"===r.orientation),Ae("tabIndex",r._getFocusIndex()===i?0:-1)("id",r._getStepLabelId(i))("index",i)("state",r._getIndicatorType(i,e.state))("label",e.stepLabel||e.label)("selected",r.selectedIndex===i)("active",r._stepIsNavigable(i,e))("optional",e.optional)("errorMessage",e.errorMessage)("iconOverrides",r._iconOverrides)("disableRipple",r.disableRipple||!r._stepIsNavigable(i,e))("color",e.color||r.color),et("aria-posinset",i+1)("aria-setsize",r.steps.length)("aria-controls",r._getStepContentId(i))("aria-selected",r.selectedIndex==i)("aria-label",e.ariaLabel||null)("aria-labelledby",!e.ariaLabel&&e.ariaLabelledby?e.ariaLabelledby:null)("aria-disabled",!r._stepIsNavigable(i,e)||null)}}let JC=(()=>{class t extends lB{}return t.\u0275fac=function(){let n;return function(i){return(n||(n=qt(t)))(i||t)}}(),t.\u0275dir=Ge({type:t,selectors:[["","matStepLabel",""]],features:[a]}),t})(),e1=(()=>{class t{constructor(){this.changes=new Zt,this.optionalLabel="Optional",this.completedLabel="Completed",this.editableLabel="Editable"}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=rt({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();const yQ={provide:e1,deps:[[new $i,new Hr,e1]],useFactory:function _Q(t){return t||new e1}},vQ=Vf(class extends aB{constructor(n){super(n)}},"primary");let pB=(()=>{class t extends vQ{constructor(e,i,r,s){super(r),this._intl=e,this._focusMonitor=i,this._intlSubscription=e.changes.subscribe(()=>s.markForCheck())}ngAfterViewInit(){this._focusMonitor.monitor(this._elementRef,!0)}ngOnDestroy(){this._intlSubscription.unsubscribe(),this._focusMonitor.stopMonitoring(this._elementRef)}focus(e,i){e?this._focusMonitor.focusVia(this._elementRef,e,i):this._elementRef.nativeElement.focus(i)}_stringLabel(){return this.label instanceof JC?null:this.label}_templateLabel(){return this.label instanceof JC?this.label:null}_getHostElement(){return this._elementRef.nativeElement}_getIconContext(){return{index:this.index,active:this.active,optional:this.optional}}_getDefaultTextForState(e){return"number"==e?`${this.index+1}`:"edit"==e?"create":"error"==e?"warning":e}}return t.\u0275fac=function(e){return new(e||t)(z(e1),z(Cc),z($t),z(Lr))},t.\u0275cmp=Rn({type:t,selectors:[["mat-step-header"]],hostAttrs:["role","tab",1,"mat-step-header"],inputs:{color:"color",state:"state",label:"label",errorMessage:"errorMessage",iconOverrides:"iconOverrides",index:"index",selected:"selected",active:"active",optional:"optional",disableRipple:"disableRipple"},features:[a],decls:10,vars:19,consts:[["matRipple","",1,"mat-step-header-ripple","mat-focus-indicator",3,"matRippleTrigger","matRippleDisabled"],[1,"mat-step-icon-content",3,"ngSwitch"],[3,"ngTemplateOutlet","ngTemplateOutletContext",4,"ngSwitchCase"],[3,"ngSwitch",4,"ngSwitchDefault"],[1,"mat-step-label"],["class","mat-step-text-label",4,"ngIf"],["class","mat-step-optional",4,"ngIf"],["class","mat-step-sub-label-error",4,"ngIf"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],[3,"ngSwitch"],["aria-hidden","true",4,"ngSwitchCase"],["class","cdk-visually-hidden",4,"ngIf"],["aria-hidden","true",4,"ngSwitchDefault"],["aria-hidden","true"],[1,"cdk-visually-hidden"],[1,"mat-step-text-label"],[3,"ngTemplateOutlet"],[1,"mat-step-optional"],[1,"mat-step-sub-label-error"]],template:function(e,i){1&e&&(ut(0,"div",0),se(1,"div")(2,"div",1),Mt(3,KK,1,2,"ng-container",2),Mt(4,nQ,5,4,"ng-container",3),he()(),se(5,"div",4),Mt(6,iQ,2,1,"div",5),Mt(7,rQ,2,1,"div",5),Mt(8,oQ,2,1,"div",6),Mt(9,sQ,2,1,"div",7),he()),2&e&&(Ae("matRippleTrigger",i._getHostElement())("matRippleDisabled",i.disableRipple),Se(1),wM("mat-step-icon-state-",i.state," mat-step-icon"),yi("mat-step-icon-selected",i.selected),Se(1),Ae("ngSwitch",!(!i.iconOverrides||!i.iconOverrides[i.state])),Se(1),Ae("ngSwitchCase",!0),Se(2),yi("mat-step-label-active",i.active)("mat-step-label-selected",i.selected)("mat-step-label-error","error"==i.state),Se(1),Ae("ngIf",i._templateLabel()),Se(1),Ae("ngIf",i._stringLabel()),Se(1),Ae("ngIf",i.optional&&"error"!=i.state),Se(1),Ae("ngIf","error"==i.state))},dependencies:[Ya,bS,kf,xv,yS,em,mu],styles:['.mat-step-header{overflow:hidden;outline:none;cursor:pointer;position:relative;box-sizing:content-box;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-step-header:focus .mat-focus-indicator::before{content:""}.cdk-high-contrast-active .mat-step-header{outline:solid 1px}.cdk-high-contrast-active .mat-step-header[aria-selected=true] .mat-step-label{text-decoration:underline}.cdk-high-contrast-active .mat-step-header[aria-disabled=true]{outline-color:GrayText}.cdk-high-contrast-active .mat-step-header[aria-disabled=true] .mat-step-label,.cdk-high-contrast-active .mat-step-header[aria-disabled=true] .mat-step-icon,.cdk-high-contrast-active .mat-step-header[aria-disabled=true] .mat-step-optional{color:GrayText}.mat-step-optional,.mat-step-sub-label-error{font-size:12px}.mat-step-icon{border-radius:50%;height:24px;width:24px;flex-shrink:0;position:relative}.mat-step-icon-content{position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);display:flex}.mat-step-icon .mat-icon{font-size:16px;height:16px;width:16px}.mat-step-icon-state-error .mat-icon{font-size:24px;height:24px;width:24px}.mat-step-label{display:inline-block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:50px;vertical-align:middle}.mat-step-text-label{text-overflow:ellipsis;overflow:hidden}.mat-step-header .mat-step-header-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}'],encapsulation:2,changeDetection:0}),t})();const gB={horizontalStepTransition:Xo("horizontalStepTransition",[Ki("previous",Dn({transform:"translate3d(-100%, 0, 0)",visibility:"hidden"})),Ki("current",Dn({transform:"none",visibility:"inherit"})),Ki("next",Dn({transform:"translate3d(100%, 0, 0)",visibility:"hidden"})),dr("* => *",yr("{{animationDuration}} cubic-bezier(0.35, 0, 0.25, 1)"),{params:{animationDuration:"500ms"}})]),verticalStepTransition:Xo("verticalStepTransition",[Ki("previous",Dn({height:"0px",visibility:"hidden"})),Ki("next",Dn({height:"0px",visibility:"hidden"})),Ki("current",Dn({height:"*",visibility:"inherit"})),dr("* <=> current",yr("{{animationDuration}} cubic-bezier(0.4, 0.0, 0.2, 1)"),{params:{animationDuration:"225ms"}})])};let bQ=(()=>{class t{constructor(e){this.templateRef=e}}return t.\u0275fac=function(e){return new(e||t)(z(Fr))},t.\u0275dir=Ge({type:t,selectors:[["ng-template","matStepperIcon",""]],inputs:{name:["matStepperIcon","name"]}}),t})(),xQ=(()=>{class t{constructor(e){this._template=e}}return t.\u0275fac=function(e){return new(e||t)(z(Fr))},t.\u0275dir=Ge({type:t,selectors:[["ng-template","matStepContent",""]]}),t})(),_B=(()=>{class t extends dT{constructor(e,i,r,s){super(e,s),this._errorStateMatcher=i,this._viewContainerRef=r,this._isSelected=$.EMPTY}ngAfterContentInit(){this._isSelected=this._stepper.steps.changes.pipe(Qa(()=>this._stepper.selectionChange.pipe(Jt(e=>e.selectedStep===this),Vs(this._stepper.selected===this)))).subscribe(e=>{e&&this._lazyContent&&!this._portal&&(this._portal=new m0(this._lazyContent._template,this._viewContainerRef))})}ngOnDestroy(){this._isSelected.unsubscribe()}isErrorState(e,i){return this._errorStateMatcher.isErrorState(e,i)||!!(e&&e.invalid&&this.interacted)}}return t.\u0275fac=function(e){return new(e||t)(z(ni(()=>yB)),z(u_,4),z(ro),z(cB,8))},t.\u0275cmp=Rn({type:t,selectors:[["mat-step"]],contentQueries:function(e,i,r){if(1&e&&(Ui(r,JC,5),Ui(r,xQ,5)),2&e){let s;fn(s=mn())&&(i.stepLabel=s.first),fn(s=mn())&&(i._lazyContent=s.first)}},inputs:{color:"color"},exportAs:["matStep"],features:[Pn([{provide:u_,useExisting:t},{provide:dT,useExisting:t}]),a],ngContentSelectors:cQ,decls:1,vars:0,consts:[[3,"cdkPortalOutlet"]],template:function(e,i){1&e&&(Tr(),Mt(0,lQ,2,1,"ng-template"))},dependencies:[m_],encapsulation:2,changeDetection:0}),t})(),yB=(()=>{class t extends QC{constructor(e,i,r){super(e,i,r),this.steps=new qh,this.animationDone=new In,this.labelPosition="end",this.headerPosition="top",this._iconOverrides={},this._animationDone=new Zt,this._animationDuration="";const s=r.nativeElement.nodeName.toLowerCase();this.orientation="mat-vertical-stepper"===s?"vertical":"horizontal"}get animationDuration(){return this._animationDuration}set animationDuration(e){this._animationDuration=/^\d+$/.test(e)?e+"ms":e}ngAfterContentInit(){super.ngAfterContentInit(),this._icons.forEach(({name:e,templateRef:i})=>this._iconOverrides[e]=i),this.steps.changes.pipe(ri(this._destroyed)).subscribe(()=>{this._stateChanged()}),this._animationDone.pipe(yD((e,i)=>e.fromState===i.fromState&&e.toState===i.toState),ri(this._destroyed)).subscribe(e=>{"current"===e.toState&&this.animationDone.emit()})}_stepIsNavigable(e,i){return i.completed||this.selectedIndex===e||!this.linear}_getAnimationDuration(){return this.animationDuration?this.animationDuration:"horizontal"===this.orientation?"500ms":"225ms"}}return t.\u0275fac=function(e){return new(e||t)(z(sa,8),z(Lr),z($t))},t.\u0275cmp=Rn({type:t,selectors:[["mat-stepper"],["mat-vertical-stepper"],["mat-horizontal-stepper"],["","matStepper",""]],contentQueries:function(e,i,r){if(1&e&&(Ui(r,_B,5),Ui(r,bQ,5)),2&e){let s;fn(s=mn())&&(i._steps=s),fn(s=mn())&&(i._icons=s)}},viewQuery:function(e,i){if(1&e&&Yi(pB,5),2&e){let r;fn(r=mn())&&(i._stepHeader=r)}},hostAttrs:["role","tablist"],hostVars:11,hostBindings:function(e,i){2&e&&(et("aria-orientation",i.orientation),yi("mat-stepper-horizontal","horizontal"===i.orientation)("mat-stepper-vertical","vertical"===i.orientation)("mat-stepper-label-position-end","horizontal"===i.orientation&&"end"==i.labelPosition)("mat-stepper-label-position-bottom","horizontal"===i.orientation&&"bottom"==i.labelPosition)("mat-stepper-header-position-bottom","bottom"===i.headerPosition))},inputs:{selectedIndex:"selectedIndex",disableRipple:"disableRipple",color:"color",labelPosition:"labelPosition",headerPosition:"headerPosition",animationDuration:"animationDuration"},outputs:{animationDone:"animationDone"},exportAs:["matStepper","matVerticalStepper","matHorizontalStepper"],features:[Pn([{provide:QC,useExisting:t}]),a],decls:5,vars:3,consts:[[3,"ngSwitch"],["class","mat-horizontal-stepper-wrapper",4,"ngSwitchCase"],[4,"ngSwitchCase"],["stepTemplate",""],[1,"mat-horizontal-stepper-wrapper"],[1,"mat-horizontal-stepper-header-container"],[4,"ngFor","ngForOf"],[1,"mat-horizontal-content-container"],["class","mat-horizontal-stepper-content","role","tabpanel",3,"id","mat-horizontal-stepper-content-inactive",4,"ngFor","ngForOf"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],["class","mat-stepper-horizontal-line",4,"ngIf"],[1,"mat-stepper-horizontal-line"],["role","tabpanel",1,"mat-horizontal-stepper-content",3,"id"],[3,"ngTemplateOutlet"],["class","mat-step",4,"ngFor","ngForOf"],[1,"mat-step"],[1,"mat-vertical-content-container"],["role","tabpanel",1,"mat-vertical-stepper-content",3,"id"],[1,"mat-vertical-content"],[3,"tabIndex","id","index","state","label","selected","active","optional","errorMessage","iconOverrides","disableRipple","color","click","keydown"]],template:function(e,i){1&e&&(Li(0,0),Mt(1,pQ,5,2,"div",1),Mt(2,mQ,2,1,"ng-container",2),Bi(),Mt(3,gQ,1,23,"ng-template",null,3,sI)),2&e&&(Ae("ngSwitch",i.orientation),Se(1),Ae("ngSwitchCase","horizontal"),Se(1),Ae("ngSwitchCase","vertical"))},dependencies:[$g,Ya,bS,kf,xv,pB],styles:['.mat-stepper-vertical,.mat-stepper-horizontal{display:block}.mat-horizontal-stepper-header-container{white-space:nowrap;display:flex;align-items:center}.mat-stepper-label-position-bottom .mat-horizontal-stepper-header-container{align-items:flex-start}.mat-stepper-header-position-bottom .mat-horizontal-stepper-header-container{order:1}.mat-stepper-horizontal-line{border-top-width:1px;border-top-style:solid;flex:auto;height:0;margin:0 -16px;min-width:32px}.mat-stepper-label-position-bottom .mat-stepper-horizontal-line{margin:0;min-width:0;position:relative}.mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:first-child)::before,[dir=rtl] .mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:last-child)::before,.mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:last-child)::after,[dir=rtl] .mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:first-child)::after{border-top-width:1px;border-top-style:solid;content:"";display:inline-block;height:0;position:absolute;width:calc(50% - 20px)}.mat-horizontal-stepper-header{display:flex;height:72px;overflow:hidden;align-items:center;padding:0 24px}.mat-horizontal-stepper-header .mat-step-icon{margin-right:8px;flex:none}[dir=rtl] .mat-horizontal-stepper-header .mat-step-icon{margin-right:0;margin-left:8px}.mat-stepper-label-position-bottom .mat-horizontal-stepper-header{box-sizing:border-box;flex-direction:column;height:auto}.mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:last-child)::after,[dir=rtl] .mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:first-child)::after{right:0}.mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:first-child)::before,[dir=rtl] .mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:last-child)::before{left:0}[dir=rtl] .mat-stepper-label-position-bottom .mat-horizontal-stepper-header:last-child::before,[dir=rtl] .mat-stepper-label-position-bottom .mat-horizontal-stepper-header:first-child::after{display:none}.mat-stepper-label-position-bottom .mat-horizontal-stepper-header .mat-step-icon{margin-right:0;margin-left:0}.mat-stepper-label-position-bottom .mat-horizontal-stepper-header .mat-step-label{padding:16px 0 0 0;text-align:center;width:100%}.mat-vertical-stepper-header{display:flex;align-items:center;height:24px}.mat-vertical-stepper-header .mat-step-icon{margin-right:12px}[dir=rtl] .mat-vertical-stepper-header .mat-step-icon{margin-right:0;margin-left:12px}.mat-horizontal-stepper-wrapper{display:flex;flex-direction:column}.mat-horizontal-stepper-content{outline:0}.mat-horizontal-stepper-content.mat-horizontal-stepper-content-inactive{height:0;overflow:hidden}.mat-horizontal-stepper-content:not(.mat-horizontal-stepper-content-inactive){visibility:inherit !important}.mat-horizontal-content-container{overflow:hidden;padding:0 24px 24px 24px}.cdk-high-contrast-active .mat-horizontal-content-container{outline:solid 1px}.mat-stepper-header-position-bottom .mat-horizontal-content-container{padding:24px 24px 0 24px}.mat-vertical-content-container{margin-left:36px;border:0;position:relative}.cdk-high-contrast-active .mat-vertical-content-container{outline:solid 1px}[dir=rtl] .mat-vertical-content-container{margin-left:0;margin-right:36px}.mat-stepper-vertical-line::before{content:"";position:absolute;left:0;border-left-width:1px;border-left-style:solid}[dir=rtl] .mat-stepper-vertical-line::before{left:auto;right:0}.mat-vertical-stepper-content{overflow:hidden;outline:0}.mat-vertical-stepper-content:not(.mat-vertical-stepper-content-inactive){visibility:inherit !important}.mat-vertical-content{padding:0 24px 24px 24px}.mat-step:last-child .mat-vertical-content-container{border:none}'],encapsulation:2,data:{animation:[gB.horizontalStepTransition,gB.verticalStepTransition]},changeDetection:0}),t})(),wQ=(()=>{class t extends XK{}return t.\u0275fac=function(){let n;return function(i){return(n||(n=qt(t)))(i||t)}}(),t.\u0275dir=Ge({type:t,selectors:[["button","matStepperNext",""]],hostAttrs:[1,"mat-stepper-next"],hostVars:1,hostBindings:function(e,i){2&e&&gc("type",i.type)},inputs:{type:"type"},features:[a]}),t})(),CQ=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=cn({type:t}),t.\u0275inj=nn({providers:[yQ,u_],imports:[oi,Ia,qf,w0,YK,kF,ep,oi]}),t})(),DQ=(()=>{class t{constructor(){this.changes=new Zt,this.calendarLabel="Calendar",this.openCalendarLabel="Open calendar",this.closeCalendarLabel="Close calendar",this.prevMonthLabel="Previous month",this.nextMonthLabel="Next month",this.prevYearLabel="Previous year",this.nextYearLabel="Next year",this.prevMultiYearLabel="Previous 24 years",this.nextMultiYearLabel="Next 24 years",this.switchToMonthViewLabel="Choose date",this.switchToMultiYearViewLabel="Choose month and year",this.startDateLabel="Start date",this.endDateLabel="End date"}formatYearRange(e,i){return`${e} \u2013 ${i}`}formatYearRangeLabel(e,i){return`${e} to ${i}`}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=rt({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();const LQ={provide:new vt("mat-datepicker-scroll-strategy"),deps:[ka],useFactory:function FQ(t){return()=>t.scrollStrategies.reposition()}};let GQ=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=cn({type:t}),t.\u0275inj=nn({providers:[DQ,LQ],imports:[Ia,w0,Xf,SD,qf,oi,ip]}),t})();class Od{EncodeParam(n){return n.replace(/[:]/g,"%3A").replace(/[$]/g,"%24").replace(/[,]/g,"%2C").replace(/[;]/g,"%3B").replace(/[+]/g,"%2B").replace(/[=]/g,"%3D").replace(/[?]/g,"%3F").replace(/[#]/g,"%23").replace(/["]/g,"%22").replace(/[[]/g,"%5B").replace(/[%]/g,"%25").replace(/]/g,"%5D")}DecodeParam(n){return n.replace("%3A",":").replace("%2C",",").replace("%3D","=").replace("%3F","?")}}function UQ(t,n){if(1&t&&(se(0,"mat-option",19),Ze(1),he()),2&t){const e=n.$implicit;Ae("value",e),Se(1),no(" ",e," ")}}function jQ(t,n){if(1&t){const e=wi();se(0,"mat-form-field",16)(1,"mat-select",17),Nt("selectionChange",function(r){return Wn(e),qn(Et(2)._changePageSize(r.value))}),Mt(2,UQ,2,2,"mat-option",18),he()()}if(2&t){const e=Et(2);Ae("appearance",e._formFieldAppearance)("color",e.color),Se(1),Ae("value",e.pageSize)("disabled",e.disabled)("panelClass",e.selectConfig.panelClass||"")("disableOptionCentering",e.selectConfig.disableOptionCentering)("aria-label",e._intl.itemsPerPageLabel),Se(1),Ae("ngForOf",e._displayedPageSizeOptions)}}function HQ(t,n){if(1&t&&(se(0,"div",20),Ze(1),he()),2&t){const e=Et(2);Se(1),Wr(e.pageSize)}}function $Q(t,n){if(1&t&&(se(0,"div",12)(1,"div",13),Ze(2),he(),Mt(3,jQ,3,8,"mat-form-field",14),Mt(4,HQ,2,1,"div",15),he()),2&t){const e=Et();Se(2),no(" ",e._intl.itemsPerPageLabel," "),Se(1),Ae("ngIf",e._displayedPageSizeOptions.length>1),Se(1),Ae("ngIf",e._displayedPageSizeOptions.length<=1)}}function WQ(t,n){if(1&t){const e=wi();se(0,"button",21),Nt("click",function(){return Wn(e),qn(Et().firstPage())}),te(),se(1,"svg",7),ut(2,"path",22),he()()}if(2&t){const e=Et();Ae("matTooltip",e._intl.firstPageLabel)("matTooltipDisabled",e._previousButtonsDisabled())("matTooltipPosition","above")("disabled",e._previousButtonsDisabled()),et("aria-label",e._intl.firstPageLabel)}}function qQ(t,n){if(1&t){const e=wi();te(),_e(),se(0,"button",23),Nt("click",function(){return Wn(e),qn(Et().lastPage())}),te(),se(1,"svg",7),ut(2,"path",24),he()()}if(2&t){const e=Et();Ae("matTooltip",e._intl.lastPageLabel)("matTooltipDisabled",e._nextButtonsDisabled())("matTooltipPosition","above")("disabled",e._nextButtonsDisabled()),et("aria-label",e._intl.lastPageLabel)}}Od.\u0275fac=function(n){return new(n||Od)},Od.\u0275prov=rt({token:Od,factory:Od.\u0275fac});let o1=(()=>{class t{constructor(){this.changes=new Zt,this.itemsPerPageLabel="Items per page:",this.nextPageLabel="Next page",this.previousPageLabel="Previous page",this.firstPageLabel="First page",this.lastPageLabel="Last page",this.getRangeLabel=(e,i,r)=>{if(0==r||0==i)return`0 of ${r}`;const s=e*i;return`${s+1} \u2013 ${s<(r=Math.max(r,0))?Math.min(s+i,r):s+i} of ${r}`}}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=rt({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();const XQ={provide:o1,deps:[[new $i,new Hr,o1]],useFactory:function ZQ(t){return t||new o1}},KQ=new vt("MAT_PAGINATOR_DEFAULT_OPTIONS"),QQ=c_(KP(class{}));let JQ=(()=>{class t extends QQ{constructor(e,i,r){if(super(),this._intl=e,this._changeDetectorRef=i,this._pageIndex=0,this._length=0,this._pageSizeOptions=[],this._hidePageSize=!1,this._showFirstLastButtons=!1,this.selectConfig={},this.page=new In,this._intlChanges=e.changes.subscribe(()=>this._changeDetectorRef.markForCheck()),r){const{pageSize:s,pageSizeOptions:d,hidePageSize:_,showFirstLastButtons:w}=r;null!=s&&(this._pageSize=s),null!=d&&(this._pageSizeOptions=d),null!=_&&(this._hidePageSize=_),null!=w&&(this._showFirstLastButtons=w)}}get pageIndex(){return this._pageIndex}set pageIndex(e){this._pageIndex=Math.max(wc(e),0),this._changeDetectorRef.markForCheck()}get length(){return this._length}set length(e){this._length=wc(e),this._changeDetectorRef.markForCheck()}get pageSize(){return this._pageSize}set pageSize(e){this._pageSize=Math.max(wc(e),0),this._updateDisplayedPageSizeOptions()}get pageSizeOptions(){return this._pageSizeOptions}set pageSizeOptions(e){this._pageSizeOptions=(e||[]).map(i=>wc(i)),this._updateDisplayedPageSizeOptions()}get hidePageSize(){return this._hidePageSize}set hidePageSize(e){this._hidePageSize=kn(e)}get showFirstLastButtons(){return this._showFirstLastButtons}set showFirstLastButtons(e){this._showFirstLastButtons=kn(e)}ngOnInit(){this._initialized=!0,this._updateDisplayedPageSizeOptions(),this._markInitialized()}ngOnDestroy(){this._intlChanges.unsubscribe()}nextPage(){if(!this.hasNextPage())return;const e=this.pageIndex;this.pageIndex=this.pageIndex+1,this._emitPageEvent(e)}previousPage(){if(!this.hasPreviousPage())return;const e=this.pageIndex;this.pageIndex=this.pageIndex-1,this._emitPageEvent(e)}firstPage(){if(!this.hasPreviousPage())return;const e=this.pageIndex;this.pageIndex=0,this._emitPageEvent(e)}lastPage(){if(!this.hasNextPage())return;const e=this.pageIndex;this.pageIndex=this.getNumberOfPages()-1,this._emitPageEvent(e)}hasPreviousPage(){return this.pageIndex>=1&&0!=this.pageSize}hasNextPage(){const e=this.getNumberOfPages()-1;return this.pageIndexe-i),this._changeDetectorRef.markForCheck())}_emitPageEvent(e){this.page.emit({previousPageIndex:e,pageIndex:this.pageIndex,pageSize:this.pageSize,length:this.length})}}return t.\u0275fac=function(e){Bs()},t.\u0275dir=Ge({type:t,inputs:{color:"color",pageIndex:"pageIndex",length:"length",pageSize:"pageSize",pageSizeOptions:"pageSizeOptions",hidePageSize:"hidePageSize",showFirstLastButtons:"showFirstLastButtons",selectConfig:"selectConfig"},outputs:{page:"page"},features:[a]}),t})(),wB=(()=>{class t extends JQ{constructor(e,i,r){super(e,i,r),r&&null!=r.formFieldAppearance&&(this._formFieldAppearance=r.formFieldAppearance)}}return t.\u0275fac=function(e){return new(e||t)(z(o1),z(Lr),z(KQ,8))},t.\u0275cmp=Rn({type:t,selectors:[["mat-paginator"]],hostAttrs:["role","group",1,"mat-paginator"],inputs:{disabled:"disabled"},exportAs:["matPaginator"],features:[a],decls:14,vars:14,consts:[[1,"mat-paginator-outer-container"],[1,"mat-paginator-container"],["class","mat-paginator-page-size",4,"ngIf"],[1,"mat-paginator-range-actions"],[1,"mat-paginator-range-label"],["mat-icon-button","","type","button","class","mat-paginator-navigation-first",3,"matTooltip","matTooltipDisabled","matTooltipPosition","disabled","click",4,"ngIf"],["mat-icon-button","","type","button",1,"mat-paginator-navigation-previous",3,"matTooltip","matTooltipDisabled","matTooltipPosition","disabled","click"],["viewBox","0 0 24 24","focusable","false",1,"mat-paginator-icon"],["d","M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"],["mat-icon-button","","type","button",1,"mat-paginator-navigation-next",3,"matTooltip","matTooltipDisabled","matTooltipPosition","disabled","click"],["d","M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"],["mat-icon-button","","type","button","class","mat-paginator-navigation-last",3,"matTooltip","matTooltipDisabled","matTooltipPosition","disabled","click",4,"ngIf"],[1,"mat-paginator-page-size"],[1,"mat-paginator-page-size-label"],["class","mat-paginator-page-size-select",3,"appearance","color",4,"ngIf"],["class","mat-paginator-page-size-value",4,"ngIf"],[1,"mat-paginator-page-size-select",3,"appearance","color"],[3,"value","disabled","panelClass","disableOptionCentering","aria-label","selectionChange"],[3,"value",4,"ngFor","ngForOf"],[3,"value"],[1,"mat-paginator-page-size-value"],["mat-icon-button","","type","button",1,"mat-paginator-navigation-first",3,"matTooltip","matTooltipDisabled","matTooltipPosition","disabled","click"],["d","M18.41 16.59L13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z"],["mat-icon-button","","type","button",1,"mat-paginator-navigation-last",3,"matTooltip","matTooltipDisabled","matTooltipPosition","disabled","click"],["d","M5.59 7.41L10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z"]],template:function(e,i){1&e&&(se(0,"div",0)(1,"div",1),Mt(2,$Q,5,3,"div",2),se(3,"div",3)(4,"div",4),Ze(5),he(),Mt(6,WQ,3,5,"button",5),se(7,"button",6),Nt("click",function(){return i.previousPage()}),te(),se(8,"svg",7),ut(9,"path",8),he()(),_e(),se(10,"button",9),Nt("click",function(){return i.nextPage()}),te(),se(11,"svg",7),ut(12,"path",10),he()(),Mt(13,qQ,3,5,"button",11),he()()()),2&e&&(Se(2),Ae("ngIf",!i.hidePageSize),Se(3),no(" ",i._intl.getRangeLabel(i.pageIndex,i.pageSize,i.length)," "),Se(1),Ae("ngIf",i.showFirstLastButtons),Se(1),Ae("matTooltip",i._intl.previousPageLabel)("matTooltipDisabled",i._previousButtonsDisabled())("matTooltipPosition","above")("disabled",i._previousButtonsDisabled()),et("aria-label",i._intl.previousPageLabel),Se(3),Ae("matTooltip",i._intl.nextPageLabel)("matTooltipDisabled",i._nextButtonsDisabled())("matTooltipPosition","above")("disabled",i._nextButtonsDisabled()),et("aria-label",i._intl.nextPageLabel),Se(3),Ae("ngIf",i.showFirstLastButtons))},dependencies:[$g,Ya,Td,jE,RL,ID,oB],styles:[".mat-paginator{display:block}.mat-paginator-outer-container{display:flex}.mat-paginator-container{display:flex;align-items:center;justify-content:flex-end;padding:0 8px;flex-wrap:wrap-reverse;width:100%}.mat-paginator-page-size{display:flex;align-items:baseline;margin-right:8px}[dir=rtl] .mat-paginator-page-size{margin-right:0;margin-left:8px}.mat-paginator-page-size-label{margin:0 4px}.mat-paginator-page-size-select{margin:6px 4px 0 4px;width:56px}.mat-paginator-page-size-select.mat-form-field-appearance-outline{width:64px}.mat-paginator-page-size-select.mat-form-field-appearance-fill{width:64px}.mat-paginator-range-label{margin:0 32px 0 24px}.mat-paginator-range-actions{display:flex;align-items:center}.mat-paginator-icon{display:inline-block;width:28px;fill:currentColor}[dir=rtl] .mat-paginator-icon{transform:rotate(180deg)}.cdk-high-contrast-active .mat-paginator-icon{fill:CanvasText}"],encapsulation:2,changeDetection:0}),t})(),eJ=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=cn({type:t}),t.\u0275inj=nn({providers:[XQ],imports:[Ia,w0,PL,sB,oi]}),t})();const tJ=["input"],nJ=["label"],iJ=function(t){return{enterDuration:t}},rJ=["*"],oJ=new vt("mat-checkbox-default-options",{providedIn:"root",factory:CB});function CB(){return{color:"accent",clickAction:"check-indeterminate"}}let sJ=0;const MB=CB(),aJ={provide:aa,useExisting:ni(()=>SB),multi:!0};class lJ{}const cJ=$w(Vf(Gf(c_(class{constructor(t){this._elementRef=t}}))));let uJ=(()=>{class t extends cJ{constructor(e,i,r,s,d,_,w){super(i),this._changeDetectorRef=r,this._ngZone=s,this._animationMode=_,this._options=w,this.ariaLabel="",this.ariaLabelledby=null,this.labelPosition="after",this.name=null,this.change=new In,this.indeterminateChange=new In,this._onTouched=()=>{},this._currentAnimationClass="",this._currentCheckState=0,this._controlValueAccessorChangeFn=()=>{},this._checked=!1,this._disabled=!1,this._indeterminate=!1,this._options=this._options||MB,this.color=this.defaultColor=this._options.color||MB.color,this.tabIndex=parseInt(d)||0,this.id=this._uniqueId=`${e}${++sJ}`}get inputId(){return`${this.id||this._uniqueId}-input`}get required(){return this._required}set required(e){this._required=kn(e)}ngAfterViewInit(){this._syncIndeterminate(this._indeterminate)}get checked(){return this._checked}set checked(e){const i=kn(e);i!=this.checked&&(this._checked=i,this._changeDetectorRef.markForCheck())}get disabled(){return this._disabled}set disabled(e){const i=kn(e);i!==this.disabled&&(this._disabled=i,this._changeDetectorRef.markForCheck())}get indeterminate(){return this._indeterminate}set indeterminate(e){const i=e!=this._indeterminate;this._indeterminate=kn(e),i&&(this._transitionCheckState(this._indeterminate?3:this.checked?1:2),this.indeterminateChange.emit(this._indeterminate)),this._syncIndeterminate(this._indeterminate)}_isRippleDisabled(){return this.disableRipple||this.disabled}_onLabelTextChange(){this._changeDetectorRef.detectChanges()}writeValue(e){this.checked=!!e}registerOnChange(e){this._controlValueAccessorChangeFn=e}registerOnTouched(e){this._onTouched=e}setDisabledState(e){this.disabled=e}_getAriaChecked(){return this.checked?"true":this.indeterminate?"mixed":"false"}_transitionCheckState(e){let i=this._currentCheckState,r=this._getAnimationTargetElement();if(i!==e&&r&&(this._currentAnimationClass&&r.classList.remove(this._currentAnimationClass),this._currentAnimationClass=this._getAnimationClassForCheckStateTransition(i,e),this._currentCheckState=e,this._currentAnimationClass.length>0)){r.classList.add(this._currentAnimationClass);const s=this._currentAnimationClass;this._ngZone.runOutsideAngular(()=>{setTimeout(()=>{r.classList.remove(s)},1e3)})}}_emitChangeEvent(){this._controlValueAccessorChangeFn(this.checked),this.change.emit(this._createChangeEvent(this.checked)),this._inputElement&&(this._inputElement.nativeElement.checked=this.checked)}toggle(){this.checked=!this.checked,this._controlValueAccessorChangeFn(this.checked)}_handleInputClick(){const e=this._options?.clickAction;this.disabled||"noop"===e?!this.disabled&&"noop"===e&&(this._inputElement.nativeElement.checked=this.checked,this._inputElement.nativeElement.indeterminate=this.indeterminate):(this.indeterminate&&"check"!==e&&Promise.resolve().then(()=>{this._indeterminate=!1,this.indeterminateChange.emit(this._indeterminate)}),this._checked=!this._checked,this._transitionCheckState(this._checked?1:2),this._emitChangeEvent())}_onInteractionEvent(e){e.stopPropagation()}_onBlur(){Promise.resolve().then(()=>{this._onTouched(),this._changeDetectorRef.markForCheck()})}_getAnimationClassForCheckStateTransition(e,i){if("NoopAnimations"===this._animationMode)return"";switch(e){case 0:if(1===i)return this._animationClasses.uncheckedToChecked;if(3==i)return this._checked?this._animationClasses.checkedToIndeterminate:this._animationClasses.uncheckedToIndeterminate;break;case 2:return 1===i?this._animationClasses.uncheckedToChecked:this._animationClasses.uncheckedToIndeterminate;case 1:return 2===i?this._animationClasses.checkedToUnchecked:this._animationClasses.checkedToIndeterminate;case 3:return 1===i?this._animationClasses.indeterminateToChecked:this._animationClasses.indeterminateToUnchecked}return""}_syncIndeterminate(e){const i=this._inputElement;i&&(i.nativeElement.indeterminate=e)}}return t.\u0275fac=function(e){Bs()},t.\u0275dir=Ge({type:t,viewQuery:function(e,i){if(1&e&&(Yi(tJ,5),Yi(nJ,5),Yi(mu,5)),2&e){let r;fn(r=mn())&&(i._inputElement=r.first),fn(r=mn())&&(i._labelElement=r.first),fn(r=mn())&&(i.ripple=r.first)}},inputs:{ariaLabel:["aria-label","ariaLabel"],ariaLabelledby:["aria-labelledby","ariaLabelledby"],ariaDescribedby:["aria-describedby","ariaDescribedby"],id:"id",required:"required",labelPosition:"labelPosition",name:"name",value:"value",checked:"checked",disabled:"disabled",indeterminate:"indeterminate"},outputs:{change:"change",indeterminateChange:"indeterminateChange"},features:[a]}),t})(),SB=(()=>{class t extends uJ{constructor(e,i,r,s,d,_,w){super("mat-checkbox-",e,i,s,d,_,w),this._focusMonitor=r,this._animationClasses={uncheckedToChecked:"mat-checkbox-anim-unchecked-checked",uncheckedToIndeterminate:"mat-checkbox-anim-unchecked-indeterminate",checkedToUnchecked:"mat-checkbox-anim-checked-unchecked",checkedToIndeterminate:"mat-checkbox-anim-checked-indeterminate",indeterminateToChecked:"mat-checkbox-anim-indeterminate-checked",indeterminateToUnchecked:"mat-checkbox-anim-indeterminate-unchecked"}}_createChangeEvent(e){const i=new lJ;return i.source=this,i.checked=e,i}_getAnimationTargetElement(){return this._elementRef.nativeElement}ngAfterViewInit(){super.ngAfterViewInit(),this._focusMonitor.monitor(this._elementRef,!0).subscribe(e=>{e||this._onBlur()})}ngOnDestroy(){this._focusMonitor.stopMonitoring(this._elementRef)}_onInputClick(e){e.stopPropagation(),super._handleInputClick()}focus(e,i){e?this._focusMonitor.focusVia(this._inputElement,e,i):this._inputElement.nativeElement.focus(i)}}return t.\u0275fac=function(e){return new(e||t)(z($t),z(Lr),z(Cc),z(Ln),wa("tabindex"),z(Ta,8),z(oJ,8))},t.\u0275cmp=Rn({type:t,selectors:[["mat-checkbox"]],hostAttrs:[1,"mat-checkbox"],hostVars:14,hostBindings:function(e,i){2&e&&(gc("id",i.id),et("tabindex",null)("aria-label",null)("aria-labelledby",null),yi("mat-checkbox-indeterminate",i.indeterminate)("mat-checkbox-checked",i.checked)("mat-checkbox-disabled",i.disabled)("mat-checkbox-label-before","before"==i.labelPosition)("_mat-animation-noopable","NoopAnimations"===i._animationMode))},inputs:{disableRipple:"disableRipple",color:"color",tabIndex:"tabIndex"},exportAs:["matCheckbox"],features:[Pn([aJ]),a],ngContentSelectors:rJ,decls:17,vars:21,consts:[[1,"mat-checkbox-layout"],["label",""],[1,"mat-checkbox-inner-container"],["type","checkbox",1,"mat-checkbox-input","cdk-visually-hidden",3,"id","required","checked","disabled","tabIndex","change","click"],["input",""],["matRipple","",1,"mat-checkbox-ripple","mat-focus-indicator",3,"matRippleTrigger","matRippleDisabled","matRippleRadius","matRippleCentered","matRippleAnimation"],[1,"mat-ripple-element","mat-checkbox-persistent-ripple"],[1,"mat-checkbox-frame"],[1,"mat-checkbox-background"],["version","1.1","focusable","false","viewBox","0 0 24 24","aria-hidden","true",1,"mat-checkbox-checkmark"],["fill","none","stroke","white","d","M4.1,12.7 9,17.6 20.3,6.3",1,"mat-checkbox-checkmark-path"],[1,"mat-checkbox-mixedmark"],[1,"mat-checkbox-label",3,"cdkObserveContent"],["checkboxLabel",""],[2,"display","none"]],template:function(e,i){if(1&e&&(Tr(),se(0,"label",0,1)(2,"span",2)(3,"input",3,4),Nt("change",function(s){return i._onInteractionEvent(s)})("click",function(s){return i._onInputClick(s)}),he(),se(5,"span",5),ut(6,"span",6),he(),ut(7,"span",7),se(8,"span",8),te(),se(9,"svg",9),ut(10,"path",10),he(),_e(),ut(11,"span",11),he()(),se(12,"span",12,13),Nt("cdkObserveContent",function(){return i._onLabelTextChange()}),se(14,"span",14),Ze(15,"\xa0"),he(),Xi(16),he()()),2&e){const r=sr(1),s=sr(13);et("for",i.inputId),Se(2),yi("mat-checkbox-inner-container-no-side-margin",!s.textContent||!s.textContent.trim()),Se(1),Ae("id",i.inputId)("required",i.required)("checked",i.checked)("disabled",i.disabled)("tabIndex",i.tabIndex),et("value",i.value)("name",i.name)("aria-label",i.ariaLabel||null)("aria-labelledby",i.ariaLabelledby)("aria-checked",i._getAriaChecked())("aria-describedby",i.ariaDescribedby),Se(2),Ae("matRippleTrigger",r)("matRippleDisabled",i._isRippleDisabled())("matRippleRadius",20)("matRippleCentered",!0)("matRippleAnimation",Ns(19,iJ,"NoopAnimations"===i._animationMode?0:150))}},dependencies:[mu,vD],styles:['@keyframes mat-checkbox-fade-in-background{0%{opacity:0}50%{opacity:1}}@keyframes mat-checkbox-fade-out-background{0%,50%{opacity:1}100%{opacity:0}}@keyframes mat-checkbox-unchecked-checked-checkmark-path{0%,50%{stroke-dashoffset:22.910259}50%{animation-timing-function:cubic-bezier(0, 0, 0.2, 0.1)}100%{stroke-dashoffset:0}}@keyframes mat-checkbox-unchecked-indeterminate-mixedmark{0%,68.2%{transform:scaleX(0)}68.2%{animation-timing-function:cubic-bezier(0, 0, 0, 1)}100%{transform:scaleX(1)}}@keyframes mat-checkbox-checked-unchecked-checkmark-path{from{animation-timing-function:cubic-bezier(0.4, 0, 1, 1);stroke-dashoffset:0}to{stroke-dashoffset:-22.910259}}@keyframes mat-checkbox-checked-indeterminate-checkmark{from{animation-timing-function:cubic-bezier(0, 0, 0.2, 0.1);opacity:1;transform:rotate(0deg)}to{opacity:0;transform:rotate(45deg)}}@keyframes mat-checkbox-indeterminate-checked-checkmark{from{animation-timing-function:cubic-bezier(0.14, 0, 0, 1);opacity:0;transform:rotate(45deg)}to{opacity:1;transform:rotate(360deg)}}@keyframes mat-checkbox-checked-indeterminate-mixedmark{from{animation-timing-function:cubic-bezier(0, 0, 0.2, 0.1);opacity:0;transform:rotate(-45deg)}to{opacity:1;transform:rotate(0deg)}}@keyframes mat-checkbox-indeterminate-checked-mixedmark{from{animation-timing-function:cubic-bezier(0.14, 0, 0, 1);opacity:1;transform:rotate(0deg)}to{opacity:0;transform:rotate(315deg)}}@keyframes mat-checkbox-indeterminate-unchecked-mixedmark{0%{animation-timing-function:linear;opacity:1;transform:scaleX(1)}32.8%,100%{opacity:0;transform:scaleX(0)}}.mat-checkbox-background,.mat-checkbox-frame{top:0;left:0;right:0;bottom:0;position:absolute;border-radius:2px;box-sizing:border-box;pointer-events:none}.mat-checkbox{display:inline-block;transition:background 400ms cubic-bezier(0.25, 0.8, 0.25, 1),box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);cursor:pointer;-webkit-tap-highlight-color:rgba(0,0,0,0);position:relative}.mat-checkbox._mat-animation-noopable{transition:none !important;animation:none !important}.mat-checkbox .mat-ripple-element:not(.mat-checkbox-persistent-ripple){opacity:.16}.mat-checkbox .mat-checkbox-ripple{position:absolute;left:calc(50% - 20px);top:calc(50% - 20px);height:40px;width:40px;z-index:1;pointer-events:none}.mat-checkbox-layout{-webkit-user-select:none;user-select:none;cursor:inherit;align-items:baseline;vertical-align:middle;display:inline-flex;white-space:nowrap}.mat-checkbox-label{-webkit-user-select:auto;user-select:auto}.mat-checkbox-inner-container{display:inline-block;height:16px;line-height:0;margin:auto;margin-right:8px;order:0;position:relative;vertical-align:middle;white-space:nowrap;width:16px;flex-shrink:0}[dir=rtl] .mat-checkbox-inner-container{margin-left:8px;margin-right:auto}.mat-checkbox-inner-container-no-side-margin{margin-left:0;margin-right:0}.mat-checkbox-frame{background-color:rgba(0,0,0,0);transition:border-color 90ms cubic-bezier(0, 0, 0.2, 0.1);border-width:2px;border-style:solid}._mat-animation-noopable .mat-checkbox-frame{transition:none}.mat-checkbox-background{align-items:center;display:inline-flex;justify-content:center;transition:background-color 90ms cubic-bezier(0, 0, 0.2, 0.1),opacity 90ms cubic-bezier(0, 0, 0.2, 0.1);-webkit-print-color-adjust:exact;color-adjust:exact}._mat-animation-noopable .mat-checkbox-background{transition:none}.cdk-high-contrast-active .mat-checkbox .mat-checkbox-background{background:none}.mat-checkbox-persistent-ripple{display:block;width:100%;height:100%;transform:none}.mat-checkbox-inner-container:hover .mat-checkbox-persistent-ripple{opacity:.04}.mat-checkbox.cdk-keyboard-focused .mat-checkbox-persistent-ripple{opacity:.12}.mat-checkbox-persistent-ripple,.mat-checkbox.mat-checkbox-disabled .mat-checkbox-inner-container:hover .mat-checkbox-persistent-ripple{opacity:0}@media(hover: none){.mat-checkbox-inner-container:hover .mat-checkbox-persistent-ripple{display:none}}.mat-checkbox-checkmark{top:0;left:0;right:0;bottom:0;position:absolute;width:100%}.mat-checkbox-checkmark-path{stroke-dashoffset:22.910259;stroke-dasharray:22.910259;stroke-width:2.1333333333px}.cdk-high-contrast-black-on-white .mat-checkbox-checkmark-path{stroke:#000 !important}.mat-checkbox-mixedmark{width:calc(100% - 6px);height:2px;opacity:0;transform:scaleX(0) rotate(0deg);border-radius:2px}.cdk-high-contrast-active .mat-checkbox-mixedmark{height:0;border-top:solid 2px;margin-top:2px}.mat-checkbox-label-before .mat-checkbox-inner-container{order:1;margin-left:8px;margin-right:auto}[dir=rtl] .mat-checkbox-label-before .mat-checkbox-inner-container{margin-left:auto;margin-right:8px}.mat-checkbox-checked .mat-checkbox-checkmark{opacity:1}.mat-checkbox-checked .mat-checkbox-checkmark-path{stroke-dashoffset:0}.mat-checkbox-checked .mat-checkbox-mixedmark{transform:scaleX(1) rotate(-45deg)}.mat-checkbox-indeterminate .mat-checkbox-checkmark{opacity:0;transform:rotate(45deg)}.mat-checkbox-indeterminate .mat-checkbox-checkmark-path{stroke-dashoffset:0}.mat-checkbox-indeterminate .mat-checkbox-mixedmark{opacity:1;transform:scaleX(1) rotate(0deg)}.mat-checkbox-unchecked .mat-checkbox-background{background-color:rgba(0,0,0,0)}.mat-checkbox-disabled{cursor:default}.cdk-high-contrast-active .mat-checkbox-disabled{opacity:.5}.mat-checkbox-anim-unchecked-checked .mat-checkbox-background{animation:180ms linear 0ms mat-checkbox-fade-in-background}.mat-checkbox-anim-unchecked-checked .mat-checkbox-checkmark-path{animation:180ms linear 0ms mat-checkbox-unchecked-checked-checkmark-path}.mat-checkbox-anim-unchecked-indeterminate .mat-checkbox-background{animation:180ms linear 0ms mat-checkbox-fade-in-background}.mat-checkbox-anim-unchecked-indeterminate .mat-checkbox-mixedmark{animation:90ms linear 0ms mat-checkbox-unchecked-indeterminate-mixedmark}.mat-checkbox-anim-checked-unchecked .mat-checkbox-background{animation:180ms linear 0ms mat-checkbox-fade-out-background}.mat-checkbox-anim-checked-unchecked .mat-checkbox-checkmark-path{animation:90ms linear 0ms mat-checkbox-checked-unchecked-checkmark-path}.mat-checkbox-anim-checked-indeterminate .mat-checkbox-checkmark{animation:90ms linear 0ms mat-checkbox-checked-indeterminate-checkmark}.mat-checkbox-anim-checked-indeterminate .mat-checkbox-mixedmark{animation:90ms linear 0ms mat-checkbox-checked-indeterminate-mixedmark}.mat-checkbox-anim-indeterminate-checked .mat-checkbox-checkmark{animation:500ms linear 0ms mat-checkbox-indeterminate-checked-checkmark}.mat-checkbox-anim-indeterminate-checked .mat-checkbox-mixedmark{animation:500ms linear 0ms mat-checkbox-indeterminate-checked-mixedmark}.mat-checkbox-anim-indeterminate-unchecked .mat-checkbox-background{animation:180ms linear 0ms mat-checkbox-fade-out-background}.mat-checkbox-anim-indeterminate-unchecked .mat-checkbox-mixedmark{animation:300ms linear 0ms mat-checkbox-indeterminate-unchecked-mixedmark}.mat-checkbox-input{bottom:0;left:50%}.mat-checkbox-input:focus~.mat-focus-indicator::before{content:""}'],encapsulation:2,changeDetection:0}),t})(),DB=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=cn({type:t}),t.\u0275inj=nn({}),t})(),pJ=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=cn({type:t}),t.\u0275inj=nn({imports:[ep,oi,zw,DB,oi,DB]}),t})();function fJ(t,n){if(1&t){const e=wi();se(0,"div",2)(1,"button",3),Nt("click",function(){return Wn(e),qn(Et().action())}),Ze(2),he()()}if(2&t){const e=Et();Se(2),Wr(e.data.action)}}function mJ(t,n){}const EB=new vt("MatSnackBarData");class s1{constructor(){this.politeness="assertive",this.announcementMessage="",this.duration=0,this.data=null,this.horizontalPosition="center",this.verticalPosition="bottom"}}const gJ=Math.pow(2,31)-1;class hT{constructor(n,e){this._overlayRef=e,this._afterDismissed=new Zt,this._afterOpened=new Zt,this._onAction=new Zt,this._dismissedByAction=!1,this.containerInstance=n,n._onExit.subscribe(()=>this._finishDismiss())}dismiss(){this._afterDismissed.closed||this.containerInstance.exit(),clearTimeout(this._durationTimeoutId)}dismissWithAction(){this._onAction.closed||(this._dismissedByAction=!0,this._onAction.next(),this._onAction.complete(),this.dismiss()),clearTimeout(this._durationTimeoutId)}closeWithAction(){this.dismissWithAction()}_dismissAfter(n){this._durationTimeoutId=setTimeout(()=>this.dismiss(),Math.min(n,gJ))}_open(){this._afterOpened.closed||(this._afterOpened.next(),this._afterOpened.complete())}_finishDismiss(){this._overlayRef.dispose(),this._onAction.closed||this._onAction.complete(),this._afterDismissed.next({dismissedByAction:this._dismissedByAction}),this._afterDismissed.complete(),this._dismissedByAction=!1}afterDismissed(){return this._afterDismissed}afterOpened(){return this.containerInstance._onEnter}onAction(){return this._onAction}}let _J=(()=>{class t{constructor(e,i){this.snackBarRef=e,this.data=i}action(){this.snackBarRef.dismissWithAction()}get hasAction(){return!!this.data.action}}return t.\u0275fac=function(e){return new(e||t)(z(hT),z(EB))},t.\u0275cmp=Rn({type:t,selectors:[["simple-snack-bar"]],hostAttrs:[1,"mat-simple-snackbar"],decls:3,vars:2,consts:[[1,"mat-simple-snack-bar-content"],["class","mat-simple-snackbar-action",4,"ngIf"],[1,"mat-simple-snackbar-action"],["mat-button","",3,"click"]],template:function(e,i){1&e&&(se(0,"span",0),Ze(1),he(),Mt(2,fJ,3,1,"div",1)),2&e&&(Se(1),Wr(i.data.message),Se(1),Ae("ngIf",i.hasAction))},dependencies:[Ya,Td],styles:[".mat-simple-snackbar{display:flex;justify-content:space-between;align-items:center;line-height:20px;opacity:1}.mat-simple-snackbar-action{flex-shrink:0;margin:-8px -8px -8px 8px}.mat-simple-snackbar-action button{max-height:36px;min-width:0}[dir=rtl] .mat-simple-snackbar-action{margin-left:-8px;margin-right:8px}.mat-simple-snack-bar-content{overflow:hidden;text-overflow:ellipsis}"],encapsulation:2,changeDetection:0}),t})();const yJ={snackBarState:Xo("state",[Ki("void, hidden",Dn({transform:"scale(0.8)",opacity:0})),Ki("visible",Dn({transform:"scale(1)",opacity:1})),dr("* => visible",yr("150ms cubic-bezier(0, 0, 0.2, 1)")),dr("* => void, * => hidden",yr("75ms cubic-bezier(0.4, 0.0, 1, 1)",Dn({opacity:0})))])};let vJ=(()=>{class t extends hC{constructor(e,i,r,s,d){super(),this._ngZone=e,this._elementRef=i,this._changeDetectorRef=r,this._platform=s,this.snackBarConfig=d,this._announceDelay=150,this._destroyed=!1,this._onAnnounce=new Zt,this._onExit=new Zt,this._onEnter=new Zt,this._animationState="void",this.attachDomPortal=_=>{this._assertNotAttached();const w=this._portalOutlet.attachDomPortal(_);return this._afterPortalAttached(),w},this._live="assertive"!==d.politeness||d.announcementMessage?"off"===d.politeness?"off":"polite":"assertive",this._platform.FIREFOX&&("polite"===this._live&&(this._role="status"),"assertive"===this._live&&(this._role="alert"))}attachComponentPortal(e){this._assertNotAttached();const i=this._portalOutlet.attachComponentPortal(e);return this._afterPortalAttached(),i}attachTemplatePortal(e){this._assertNotAttached();const i=this._portalOutlet.attachTemplatePortal(e);return this._afterPortalAttached(),i}onAnimationEnd(e){const{fromState:i,toState:r}=e;if(("void"===r&&"void"!==i||"hidden"===r)&&this._completeExit(),"visible"===r){const s=this._onEnter;this._ngZone.run(()=>{s.next(),s.complete()})}}enter(){this._destroyed||(this._animationState="visible",this._changeDetectorRef.detectChanges(),this._screenReaderAnnounce())}exit(){return this._ngZone.run(()=>{this._animationState="hidden",this._elementRef.nativeElement.setAttribute("mat-exit",""),clearTimeout(this._announceTimeoutId)}),this._onExit}ngOnDestroy(){this._destroyed=!0,this._completeExit()}_completeExit(){this._ngZone.onMicrotaskEmpty.pipe(Fo(1)).subscribe(()=>{this._ngZone.run(()=>{this._onExit.next(),this._onExit.complete()})})}_afterPortalAttached(){const e=this._elementRef.nativeElement,i=this.snackBarConfig.panelClass;i&&(Array.isArray(i)?i.forEach(r=>e.classList.add(r)):e.classList.add(i))}_assertNotAttached(){this._portalOutlet.hasAttached()}_screenReaderAnnounce(){this._announceTimeoutId||this._ngZone.runOutsideAngular(()=>{this._announceTimeoutId=setTimeout(()=>{const e=this._elementRef.nativeElement.querySelector("[aria-hidden]"),i=this._elementRef.nativeElement.querySelector("[aria-live]");if(e&&i){let r=null;this._platform.isBrowser&&document.activeElement instanceof HTMLElement&&e.contains(document.activeElement)&&(r=document.activeElement),e.removeAttribute("aria-hidden"),i.appendChild(e),r?.focus(),this._onAnnounce.next(),this._onAnnounce.complete()}},this._announceDelay)})}}return t.\u0275fac=function(e){return new(e||t)(z(Ln),z($t),z(Lr),z(Co),z(s1))},t.\u0275dir=Ge({type:t,viewQuery:function(e,i){if(1&e&&Yi(m_,7),2&e){let r;fn(r=mn())&&(i._portalOutlet=r.first)}},features:[a]}),t})(),bJ=(()=>{class t extends vJ{_afterPortalAttached(){super._afterPortalAttached(),"center"===this.snackBarConfig.horizontalPosition&&this._elementRef.nativeElement.classList.add("mat-snack-bar-center"),"top"===this.snackBarConfig.verticalPosition&&this._elementRef.nativeElement.classList.add("mat-snack-bar-top")}}return t.\u0275fac=function(){let n;return function(i){return(n||(n=qt(t)))(i||t)}}(),t.\u0275cmp=Rn({type:t,selectors:[["snack-bar-container"]],hostAttrs:[1,"mat-snack-bar-container"],hostVars:1,hostBindings:function(e,i){1&e&&Cf("@state.done",function(s){return i.onAnimationEnd(s)}),2&e&&Ax("@state",i._animationState)},features:[a],decls:3,vars:2,consts:[["aria-hidden","true"],["cdkPortalOutlet",""]],template:function(e,i){1&e&&(se(0,"div",0),Mt(1,mJ,0,0,"ng-template",1),he(),ut(2,"div")),2&e&&(Se(2),et("aria-live",i._live)("role",i._role))},dependencies:[m_],styles:[".mat-snack-bar-container{border-radius:4px;box-sizing:border-box;display:block;margin:24px;max-width:33vw;min-width:344px;padding:14px 16px;min-height:48px;transform-origin:center}.cdk-high-contrast-active .mat-snack-bar-container{border:solid 1px}.mat-snack-bar-handset{width:100%}.mat-snack-bar-handset .mat-snack-bar-container{margin:8px;max-width:100%;min-width:0;width:100%}"],encapsulation:2,data:{animation:[yJ.snackBarState]}}),t})(),TB=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=cn({type:t}),t.\u0275inj=nn({imports:[Xf,qf,Ia,w0,oi,oi]}),t})();const AB=new vt("mat-snack-bar-default-options",{providedIn:"root",factory:function xJ(){return new s1}});let wJ=(()=>{class t{constructor(e,i,r,s,d,_){this._overlay=e,this._live=i,this._injector=r,this._breakpointObserver=s,this._parentSnackBar=d,this._defaultConfig=_,this._snackBarRefAtThisLevel=null}get _openedSnackBarRef(){const e=this._parentSnackBar;return e?e._openedSnackBarRef:this._snackBarRefAtThisLevel}set _openedSnackBarRef(e){this._parentSnackBar?this._parentSnackBar._openedSnackBarRef=e:this._snackBarRefAtThisLevel=e}openFromComponent(e,i){return this._attach(e,i)}openFromTemplate(e,i){return this._attach(e,i)}open(e,i="",r){const s={...this._defaultConfig,...r};return s.data={message:e,action:i},s.announcementMessage===e&&(s.announcementMessage=void 0),this.openFromComponent(this.simpleSnackBarComponent,s)}dismiss(){this._openedSnackBarRef&&this._openedSnackBarRef.dismiss()}ngOnDestroy(){this._snackBarRefAtThisLevel&&this._snackBarRefAtThisLevel.dismiss()}_attachSnackBarContainer(e,i){const s=Or.create({parent:i&&i.viewContainerRef&&i.viewContainerRef.injector||this._injector,providers:[{provide:s1,useValue:i}]}),d=new f_(this.snackBarContainerComponent,i.viewContainerRef,s),_=e.attach(d);return _.instance.snackBarConfig=i,_.instance}_attach(e,i){const r={...new s1,...this._defaultConfig,...i},s=this._createOverlay(r),d=this._attachSnackBarContainer(s,r),_=new hT(d,s);if(e instanceof Fr){const w=new m0(e,null,{$implicit:r.data,snackBarRef:_});_.instance=d.attachTemplatePortal(w)}else{const w=this._createInjector(r,_),S=new f_(e,void 0,w),I=d.attachComponentPortal(S);_.instance=I.instance}return this._breakpointObserver.observe("(max-width: 599.98px) and (orientation: portrait)").pipe(ri(s.detachments())).subscribe(w=>{s.overlayElement.classList.toggle(this.handsetCssClass,w.matches)}),r.announcementMessage&&d._onAnnounce.subscribe(()=>{this._live.announce(r.announcementMessage,r.politeness)}),this._animateSnackBar(_,r),this._openedSnackBarRef=_,this._openedSnackBarRef}_animateSnackBar(e,i){e.afterDismissed().subscribe(()=>{this._openedSnackBarRef==e&&(this._openedSnackBarRef=null),i.announcementMessage&&this._live.clear()}),this._openedSnackBarRef?(this._openedSnackBarRef.afterDismissed().subscribe(()=>{e.containerInstance.enter()}),this._openedSnackBarRef.dismiss()):e.containerInstance.enter(),i.duration&&i.duration>0&&e.afterOpened().subscribe(()=>e._dismissAfter(i.duration))}_createOverlay(e){const i=new pC;i.direction=e.direction;let r=this._overlay.position().global();const s="rtl"===e.direction,d="left"===e.horizontalPosition||"start"===e.horizontalPosition&&!s||"end"===e.horizontalPosition&&s,_=!d&&"center"!==e.horizontalPosition;return d?r.left("0"):_?r.right("0"):r.centerHorizontally(),"top"===e.verticalPosition?r.top("0"):r.bottom("0"),i.positionStrategy=r,this._overlay.create(i)}_createInjector(e,i){return Or.create({parent:e&&e.viewContainerRef&&e.viewContainerRef.injector||this._injector,providers:[{provide:hT,useValue:i},{provide:EB,useValue:e.data}]})}}return t.\u0275fac=function(e){return new(e||t)(we(ka),we(CD),we(Or),we(Vw),we(t,12),we(AB))},t.\u0275prov=rt({token:t,factory:t.\u0275fac}),t})(),IB=(()=>{class t extends wJ{constructor(e,i,r,s,d,_){super(e,i,r,s,d,_),this.simpleSnackBarComponent=_J,this.snackBarContainerComponent=bJ,this.handsetCssClass="mat-snack-bar-handset"}}return t.\u0275fac=function(e){return new(e||t)(we(ka),we(CD),we(Or),we(Vw),we(t,12),we(AB))},t.\u0275prov=rt({token:t,factory:t.\u0275fac,providedIn:TB}),t})();function kB(t,n,e,i,r,s,d){try{var _=t[s](d),w=_.value}catch(S){return void e(S)}_.done?n(w):Promise.resolve(w).then(i,r)}function RB(t){return function(){var n=this,e=arguments;return new Promise(function(i,r){var s=t.apply(n,e);function d(w){kB(s,i,r,d,_,"next",w)}function _(w){kB(s,i,r,d,_,"throw",w)}d(void 0)})}}class D_{}D_.\u0275fac=function(n){return new(n||D_)},D_.\u0275mod=cn({type:D_}),D_.\u0275inj=nn({imports:[Ia]});var a1=(()=>{return(t=a1||(a1={})).Alabama="AL",t.Alaska="AK",t.Arizona="AZ",t.Arkansas="AR",t.California="CA",t.Colorado="CO",t.Connecticut="CT",t.Delaware="DE",t.Florida="FL",t.Georgia="GA",t.Hawaii="HI",t.Idaho="ID",t.Illinois="IL",t.Indiana="IN",t.Iowa="IA",t.Kansas="KS",t.Kentucky="KY",t.Louisiana="LA",t.Maine="ME",t.Maryland="MD",t.Massachusetts="MA",t.Michigan="MI",t.Minnesota="MN",t.Mississippi="MS",t.Missouri="MO",t.Montana="MT",t.Nebraska="NE",t.Nevada="NV",t.NewHampshire="NH",t.NewJersey="NJ",t.NewMexico="NM",t.NewYork="NY",t.NorthCarolina="NC",t.NorthDakota="ND",t.Ohio="OH",t.Oklahoma="OK",t.Oregon="OR",t.Pennsylvania="PA",t.RhodeIsland="RI",t.SouthCarolina="SC",t.SouthDakota="SD",t.Tennessee="TN",t.Texas="TX",t.Utah="UT",t.Vermont="VT",t.Virginia="VA",t.Washington="WA",t.WestVirginia="WV",t.Wisconsin="WI",t.Wyoming="WY",a1;var t})();const PB=tt(t=>function(e=null){t(this),this.message="Timeout has occurred",this.name="TimeoutError",this.info=e});function pT(t,n){const{first:e,each:i,with:r=CJ,scheduler:s=n??Qv,meta:d=null}=E2(t)?{first:t}:"number"==typeof t?{each:t}:t;if(null==e&&null==i)throw new TypeError("No timeout provided.");return bi((_,w)=>{let S,I,L=null,H=0;const Y=ae=>{I=Pt(w,s,()=>{try{S.unsubscribe(),J(r({meta:d,lastValue:L,seen:H})).subscribe(w)}catch(ve){w.error(ve)}},ae)};S=_.subscribe(Nn(w,ae=>{I?.unsubscribe(),H++,w.next(L=ae),i>0&&Y(i)},void 0,void 0,()=>{I?.closed||I?.unsubscribe(),L=null})),!H&&Y(null!=e?"number"==typeof e?e:+e-s.now():i)})}function CJ(t){throw new PB(t)}function Ra(t,n){const e="object"==typeof n;return new Promise((i,r)=>{const s=new Lt({next:d=>{i(d),s.unsubscribe()},error:r,complete:()=>{e?i(n.defaultValue):r(new Tv)}});t.subscribe(s)})}class k0{constructor(n,e){this.dialogRef=n,this.message=e}onNoClick(){this.dialogRef.close()}}k0.\u0275fac=function(n){return new(n||k0)(z(T0),z(qE))},k0.\u0275cmp=Rn({type:k0,selectors:[["app-confirmation-dialog"]],decls:17,vars:2,consts:[["mat-dialog-title","",1,"matToolBar"],[1,"spacer"],["mat-icon-button","","matTooltip","Close",1,"close-button",3,"mat-dialog-close"],["color","warn",1,"close-icon"],[2,"padding-bottom","15px"],[3,"innerHtml"],["align","end"],["mat-raised-button","",2,"width","auto","background","lightgray",3,"click"],["mat-raised-button","","cdkFocusInitial","",2,"width","auto","background","#349C44",3,"mat-dialog-close"]],template:function(n,e){1&n&&(se(0,"mat-toolbar",0),Ze(1," Custom Map Summary "),ut(2,"span",1),se(3,"button",2)(4,"mat-icon",3),Ze(5,"close"),he()()(),se(6,"mat-dialog-content",4),ut(7,"div",5),he(),ut(8,"mat-divider"),se(9,"mat-dialog-actions",6)(10,"button",7),Nt("click",function(){return e.onNoClick()}),Ze(11,"No, Return to Preview"),he(),se(12,"button",8),Ze(13,"Yes, Proceed with this Order "),se(14,"mat-icon"),Ze(15," arrow_forward_ios"),he()(),Ze(16," \xa0\xa0\xa0 "),he()),2&n&&(Se(7),Ae("innerHtml",e.message,Qp),Se(5),Ae("mat-dialog-close",!0))},dependencies:[IE,Td,em,$9,ZE,HL,XE,rK,oB],styles:[".confirmationDialog[_ngcontent-%COMP%] .mat-dialog-content[_ngcontent-%COMP%]{margin:0!important}.confirmationDialog[_ngcontent-%COMP%] .mat-dialog-container[_ngcontent-%COMP%]{padding:0!important;border-radius:1px!important}.mat-dialog-title[_ngcontent-%COMP%]{display:inline-block;padding:16px 0 0 16px;margin:20px 0}.close-button[_ngcontent-%COMP%]{float:right;top:-55px;right:-15px}.close-icon[_ngcontent-%COMP%]{transition:1s ease-in-out;color:#000}.close-icon[_ngcontent-%COMP%]:hover{transform:rotate(180deg)} .icon-outside .close-button{float:right;top:-52px;right:-52px}#visor-video[_ngcontent-%COMP%]{height:500px}iframe[_ngcontent-%COMP%]{width:100%;height:100%}"]});class R0{constructor(n){this.sanitizer=n,this.displayURL=n.bypassSecurityTrustResourceUrl("https://www.youtube.com/embed/sr3SM9ALOzA")}ngOnInit(){}}R0.\u0275fac=function(n){return new(n||R0)(z(Sv))},R0.\u0275cmp=Rn({type:R0,selectors:[["app-instructions-dialog"]],decls:36,vars:1,consts:[[1,"container-fluid"],["mat-icon-button","",1,"close-button",3,"mat-dialog-close"],["color","warn",1,"close-icon"],[1,"spacer"],["mat-dialog-title","",1,"matToolBar"],[1,"notMobile"],[1,"mat-typography","disable-scrollbars"],["id","demo-video","width","auto","src","https://www.youtube.com/embed/3xXhaYtkrf4"]],template:function(n,e){1&n&&(se(0,"div",0)(1,"button",1)(2,"mat-icon",2),Ze(3,"close"),he()(),ut(4,"span",3),se(5,"mat-toolbar",4)(6,"b"),Ze(7," Welcome to MyTopo\u2019s Printed Map Service. "),ut(8,"br"),se(9,"span",5),Ze(10,"We look forward to helping you find or create your perfect map."),he()()(),se(11,"mat-dialog-content",6)(12,"p")(13,"b"),Ze(14,"Find a map centered any place in the US or Canada: "),he()(),se(15,"p"),Ze(16,"To find (or create) your map, establish its "),se(17,"b"),Ze(18,"general vicinity"),he(),Ze(19," by searching for the nearest geographic feature (mountain, lake, town, etc., such as: Acadia National Park, ME) or street address (such as: 97 Cross Road, Alna, Maine). Use a comma and state to further refine the results. If the desired area does not appear, try a nearby location; then recenter the map by dragging it."),ut(20,"br"),he(),ut(21,"iframe",7)(22,"br"),se(23,"p")(24,"b"),Ze(25,"Not finding what you need? Make your own Custom Map!"),he()(),se(26,"p"),Ze(27,"First find your spot using the search abilities described above. Once the general vicinity (center) of the map is established by searching and panning the map, select Custom Map at the top of the list of maps available at that location. Next, you will fill out a few (optional) details before being forwarded to our e-commerce system to add your map to the cart and finalize the purchase."),he(),se(28,"p"),Ze(29,"Alternatively, mapmaking appointments are available to confirm your map\u2019s location and style, to add any special options, and to collect payment."),he(),ut(30,"br"),se(31,"p"),Ze(32,"TIP: To ensure your custom map will be centered on the desired location, use the Toggle Between Map Types button to switch between different map styles. Feel free to use any map type available to verify that your map will be centered correctly; the printed map type is determined in the next step."),he(),se(33,"p")(34,"i"),Ze(35,"Maps print and ship within 24 hours. No matter where you are going, we've got you covered."),he()()()()),2&n&&(Se(1),Ae("mat-dialog-close",!0))},dependencies:[IE,Td,em,ZE,HL,XE],styles:["button[_ngcontent-%COMP%]:focus, button[_ngcontent-%COMP%]:active:focus, button.active[_ngcontent-%COMP%]:focus{outline:none!important;outline-style:none!important} .mat-dialog-content{padding:2%;background-color:#fff;border-radius:5px;color:#005f9e}.mat-toolbar-row[_ngcontent-%COMP%], .mat-toolbar-single-row[_ngcontent-%COMP%]{box-sizing:border-box;padding:0 16px;width:100%;flex-direction:row;align-items:center;white-space:pre-line;height:auto;text-align:center}.disable-scrollbars[_ngcontent-%COMP%]{scrollbar-width:none;-ms-overflow-style:none}.disable-scrollbars[_ngcontent-%COMP%]::-webkit-scrollbar{width:0px;background:transparent}.close-button[_ngcontent-%COMP%]{float:right;top:-24px;right:-24px}.close-icon[_ngcontent-%COMP%]{transition:1s ease-in-out;color:#000}.close-icon[_ngcontent-%COMP%]:hover{transform:rotate(180deg)} .icon-outside .close-button{float:right;top:-52px;right:-52px}#visor-video[_ngcontent-%COMP%]{height:500px}iframe[_ngcontent-%COMP%]{width:100%;height:100%}#demo-video[_ngcontent-%COMP%]{width:60%;min-width:400px;min-height:400px;display:block;margin:auto}@media only screen and (max-width: 960px){.onlyMobile[_ngcontent-%COMP%]{display:block}.notMobile[_ngcontent-%COMP%]{display:none!important}.matToolBar[_ngcontent-%COMP%]{font-size:1.1rem;text-align:left;min-height:60px;padding:18px;color:#005f9e;background-color:#cfe1ee;margin-bottom:10px} .mat-dialog-container{padding:0} .mat-dialog-content{max-height:100%;margin:0;padding:0 18px} .cdk-overlay-pane{max-width:100vw!important;height:100vh!important} .container-fluid{max-width:100vw!important;height:100vh!important;margin:0!important;padding:0!important} iframe{width:auto!important;min-width:100%!important} #demo-video{width:auto!important;min-width:100%!important;min-height:200px!important;margin:0!important} .close-button{right:12px!important;top:12px!important}}"]});class Sc{constructor(n,e){this.globals=n,this.dialog=e,this.redirectUrl=new In,this.searchGeoUrl=new In,this.postIsPrinted=new In}setSidenav(n){this.globals.sidenav=n}setBlinkArrow(n){this.globals.blinkArrow=n}setPickMapSection(n){this.globals.PickMapSection=n}toggleSideNav(){this.globals.sidenav.toggle()}hideDivElement(){this.globals.blinkArrow.style.display="none",this.globals.PickMapSection.style.display="none"}isIE(){const n=navigator.userAgent;return n.indexOf("MSIE ")>-1||n.indexOf("Trident/")>-1}scrollToTop(){var n=this;!function e(){var i=document.documentElement.scrollTop||document.body.scrollTop;i>0&&(window.requestAnimationFrame(e),n.isIE()?document.getElementById("IEMsg").scrollIntoView(!1):window.scrollTo(0,i-i/8))}()}emitRedirectUrl(n){this.redirectUrl.emit(n)}emitSearchGeoUrl(n){this.searchGeoUrl.emit(n)}emitIsPrinted(n){this.postIsPrinted.emit(n)}openDialog(){this.dialog.open(R0).afterClosed()}}Sc.\u0275fac=function(n){return new(n||Sc)(we(sp),we(nm))},Sc.\u0275prov=rt({token:Sc,factory:Sc.\u0275fac,providedIn:"root"});class yu{constructor(n){this.http=n,this.COGNITO_SERVER_URL="https://mytopo.auth.us-west-2.amazoncognito.com/oauth2/token",this.REQUEST_BODY="grant_type=client_credentials&scope=mytopo-resource-server/UIClient&client_id=2ue8nsn4r68u4i9ptktuf7pbmi&client_secret=7h45mjnsr6tdv25jvbckqrecqptfmtd8ltdt6urvrtt0qa2u5fv"}getAuthToken(){const n={headers:new oo({"Content-Type":"application/x-www-form-urlencoded"})};return this.http.post(this.COGNITO_SERVER_URL,this.REQUEST_BODY,n).pipe(Jt(e=>e))}}yu.\u0275fac=function(n){return new(n||yu)(we(Ka))},yu.\u0275prov=rt({token:yu,factory:yu.\u0275fac,providedIn:"root"});class im{constructor(n){this.http=n,this.PREVIEWS_API_URL="https://previews-api.mytopo.com/api/previews/"}triggerPreviewGeneration(n,e){const i={headers:new oo({Authorization:"Bearer "+e})};return this.http.get(this.PREVIEWS_API_URL+"GeneratePreview?previewId="+n,i).pipe(Jt(r=>r))}postPreviewData(n,e){const i={headers:new oo({Authorization:"Bearer "+e,"Content-Type":"application/json"})};return this.http.post(this.PREVIEWS_API_URL+"Post/",n,i).pipe(Jt(r=>r))}getPreviewStatus(n,e){const i={headers:new oo({Authorization:"Bearer "+e})};return this.http.get(this.PREVIEWS_API_URL+"Get?previewId="+n,i).pipe(Jt(r=>r))}}im.\u0275fac=function(n){return new(n||im)(we(Ka))},im.\u0275prov=rt({token:im,factory:im.\u0275fac,providedIn:"root"});const E_={UKNOWN:"Unknown"},fT={CHROME:"Chrome",FIREFOX:"Firefox",SAFARI:"Safari",OPERA:"Opera",IE:"IE",MS_EDGE:"MS-Edge",MS_EDGE_CHROMIUM:"MS-Edge-Chromium",FB_MESSANGER:"FB-Messanger",SAMSUNG:"Samsung",UCBROWSER:"UC-Browser",UNKNOWN:E_.UKNOWN},l1={HTC:/HTC|HTC.*(Sensation|Evo|Vision|Explorer|6800|8100|8900|A7272|S510e|C110e|Legend|Desire|T8282)|APX515CKT|Qtek9090|APA9292KT|HD_mini|Sensation.*Z710e|PG86100|Z715e|Desire.*(A8181|HD)|ADR6200|ADR6400L|ADR6425|001HT|Inspire 4G|Android.*\bEVO\b|T-Mobile G1|Z520m|Android [0-9.]+; Pixel/,NEXUS_PHONE:/Nexus One|Nexus S|Galaxy.*Nexus|Android.*Nexus.*Mobile|Nexus 4|Nexus 5|Nexus 6/,DELL:/Dell[;]? (Streak|Aero|Venue|Venue Pro|Flash|Smoke|Mini 3iX)|XCD28|XCD35|\b001DL\b|\b101DL\b|\bGS01\b/,MOTOROLA:new RegExp("Motorola|DROIDX|DROID BIONIC|\\bDroid\\b.*Build|Android.*Xoom|HRI39|MOT-|A1260|A1680|A555|A853|\n A855|A953|A955|A956|Motorola.*ELECTRIFY|Motorola.*i1|i867|i940|MB200|MB300|MB501|MB502|MB508|MB511|\n MB520|MB525|MB526|MB611|MB612|MB632|MB810|MB855|MB860|MB861|MB865|MB870|ME501|ME502|ME511|ME525|ME600|\n ME632|ME722|ME811|ME860|ME863|ME865|MT620|MT710|MT716|MT720|MT810|MT870|MT917|Motorola.*TITANIUM|WX435|\n WX445|XT300|XT301|XT311|XT316|XT317|XT319|XT320|XT390|XT502|XT530|XT531|XT532|XT535|XT603|XT610|XT611|\n XT615|XT681|XT701|XT702|XT711|XT720|XT800|XT806|XT860|XT862|XT875|XT882|XT883|XT894|XT901|XT907|XT909|\n XT910|XT912|XT928|XT926|XT915|XT919|XT925|XT1021|\\bMoto E\\b|XT1068|XT1092|XT1052"),SAMSUNG:new RegExp("\\bSamsung\\b|SM-G950F|SM-G955F|SM-G9250|GT-19300|SGH-I337|BGT-S5230|GT-B2100|GT-B2700|GT-B2710|\n GT-B3210|GT-B3310|GT-B3410|GT-B3730|GT-B3740|GT-B5510|GT-B5512|GT-B5722|GT-B6520|GT-B7300|GT-B7320|\n GT-B7330|GT-B7350|GT-B7510|GT-B7722|GT-B7800|GT-C3010|GT-C3011|GT-C3060|GT-C3200|GT-C3212|GT-C3212I|\n GT-C3262|GT-C3222|GT-C3300|GT-C3300K|GT-C3303|GT-C3303K|GT-C3310|GT-C3322|GT-C3330|GT-C3350|GT-C3500|\n GT-C3510|GT-C3530|GT-C3630|GT-C3780|GT-C5010|GT-C5212|GT-C6620|GT-C6625|GT-C6712|GT-E1050|GT-E1070|\n GT-E1075|GT-E1080|GT-E1081|GT-E1085|GT-E1087|GT-E1100|GT-E1107|GT-E1110|GT-E1120|GT-E1125|GT-E1130|\n GT-E1160|GT-E1170|GT-E1175|GT-E1180|GT-E1182|GT-E1200|GT-E1210|GT-E1225|GT-E1230|GT-E1390|GT-E2100|\n GT-E2120|GT-E2121|GT-E2152|GT-E2220|GT-E2222|GT-E2230|GT-E2232|GT-E2250|GT-E2370|GT-E2550|GT-E2652|\n GT-E3210|GT-E3213|GT-I5500|GT-I5503|GT-I5700|GT-I5800|GT-I5801|GT-I6410|GT-I6420|GT-I7110|GT-I7410|\n GT-I7500|GT-I8000|GT-I8150|GT-I8160|GT-I8190|GT-I8320|GT-I8330|GT-I8350|GT-I8530|GT-I8700|GT-I8703|\n GT-I8910|GT-I9000|GT-I9001|GT-I9003|GT-I9010|GT-I9020|GT-I9023|GT-I9070|GT-I9082|GT-I9100|GT-I9103|\n GT-I9220|GT-I9250|GT-I9300|GT-I9305|GT-I9500|GT-I9505|GT-M3510|GT-M5650|GT-M7500|GT-M7600|GT-M7603|\n GT-M8800|GT-M8910|GT-N7000|GT-S3110|GT-S3310|GT-S3350|GT-S3353|GT-S3370|GT-S3650|GT-S3653|GT-S3770|\n GT-S3850|GT-S5210|GT-S5220|GT-S5229|GT-S5230|GT-S5233|GT-S5250|GT-S5253|GT-S5260|GT-S5263|GT-S5270|\n GT-S5300|GT-S5330|GT-S5350|GT-S5360|GT-S5363|GT-S5369|GT-S5380|GT-S5380D|GT-S5560|GT-S5570|GT-S5600|\n GT-S5603|GT-S5610|GT-S5620|GT-S5660|GT-S5670|GT-S5690|GT-S5750|GT-S5780|GT-S5830|GT-S5839|GT-S6102|\n GT-S6500|GT-S7070|GT-S7200|GT-S7220|GT-S7230|GT-S7233|GT-S7250|GT-S7500|GT-S7530|GT-S7550|GT-S7562|\n GT-S7710|GT-S8000|GT-S8003|GT-S8500|GT-S8530|GT-S8600|SCH-A310|SCH-A530|SCH-A570|SCH-A610|SCH-A630|\n SCH-A650|SCH-A790|SCH-A795|SCH-A850|SCH-A870|SCH-A890|SCH-A930|SCH-A950|SCH-A970|SCH-A990|SCH-I100|\n SCH-I110|SCH-I400|SCH-I405|SCH-I500|SCH-I510|SCH-I515|SCH-I600|SCH-I730|SCH-I760|SCH-I770|SCH-I830|\n SCH-I910|SCH-I920|SCH-I959|SCH-LC11|SCH-N150|SCH-N300|SCH-R100|SCH-R300|SCH-R351|SCH-R400|SCH-R410|\n SCH-T300|SCH-U310|SCH-U320|SCH-U350|SCH-U360|SCH-U365|SCH-U370|SCH-U380|SCH-U410|SCH-U430|SCH-U450|\n SCH-U460|SCH-U470|SCH-U490|SCH-U540|SCH-U550|SCH-U620|SCH-U640|SCH-U650|SCH-U660|SCH-U700|SCH-U740|\n SCH-U750|SCH-U810|SCH-U820|SCH-U900|SCH-U940|SCH-U960|SCS-26UC|SGH-A107|SGH-A117|SGH-A127|SGH-A137|\n SGH-A157|SGH-A167|SGH-A177|SGH-A187|SGH-A197|SGH-A227|SGH-A237|SGH-A257|SGH-A437|SGH-A517|SGH-A597|\n SGH-A637|SGH-A657|SGH-A667|SGH-A687|SGH-A697|SGH-A707|SGH-A717|SGH-A727|SGH-A737|SGH-A747|SGH-A767|\n SGH-A777|SGH-A797|SGH-A817|SGH-A827|SGH-A837|SGH-A847|SGH-A867|SGH-A877|SGH-A887|SGH-A897|SGH-A927|\n SGH-B100|SGH-B130|SGH-B200|SGH-B220|SGH-C100|SGH-C110|SGH-C120|SGH-C130|SGH-C140|SGH-C160|SGH-C170|\n SGH-C180|SGH-C200|SGH-C207|SGH-C210|SGH-C225|SGH-C230|SGH-C417|SGH-C450|SGH-D307|SGH-D347|SGH-D357|\n SGH-D407|SGH-D415|SGH-D780|SGH-D807|SGH-D980|SGH-E105|SGH-E200|SGH-E315|SGH-E316|SGH-E317|SGH-E335|\n SGH-E590|SGH-E635|SGH-E715|SGH-E890|SGH-F300|SGH-F480|SGH-I200|SGH-I300|SGH-I320|SGH-I550|SGH-I577|\n SGH-I600|SGH-I607|SGH-I617|SGH-I627|SGH-I637|SGH-I677|SGH-I700|SGH-I717|SGH-I727|SGH-i747M|SGH-I777|\n SGH-I780|SGH-I827|SGH-I847|SGH-I857|SGH-I896|SGH-I897|SGH-I900|SGH-I907|SGH-I917|SGH-I927|SGH-I937|\n SGH-I997|SGH-J150|SGH-J200|SGH-L170|SGH-L700|SGH-M110|SGH-M150|SGH-M200|SGH-N105|SGH-N500|SGH-N600|\n SGH-N620|SGH-N625|SGH-N700|SGH-N710|SGH-P107|SGH-P207|SGH-P300|SGH-P310|SGH-P520|SGH-P735|SGH-P777|\n SGH-Q105|SGH-R210|SGH-R220|SGH-R225|SGH-S105|SGH-S307|SGH-T109|SGH-T119|SGH-T139|SGH-T209|SGH-T219|\n SGH-T229|SGH-T239|SGH-T249|SGH-T259|SGH-T309|SGH-T319|SGH-T329|SGH-T339|SGH-T349|SGH-T359|SGH-T369|\n SGH-T379|SGH-T409|SGH-T429|SGH-T439|SGH-T459|SGH-T469|SGH-T479|SGH-T499|SGH-T509|SGH-T519|SGH-T539|\n SGH-T559|SGH-T589|SGH-T609|SGH-T619|SGH-T629|SGH-T639|SGH-T659|SGH-T669|SGH-T679|SGH-T709|SGH-T719|\n SGH-T729|SGH-T739|SGH-T746|SGH-T749|SGH-T759|SGH-T769|SGH-T809|SGH-T819|SGH-T839|SGH-T919|SGH-T929|\n SGH-T939|SGH-T959|SGH-T989|SGH-U100|SGH-U200|SGH-U800|SGH-V205|SGH-V206|SGH-X100|SGH-X105|SGH-X120|\n SGH-X140|SGH-X426|SGH-X427|SGH-X475|SGH-X495|SGH-X497|SGH-X507|SGH-X600|SGH-X610|SGH-X620|SGH-X630|\n SGH-X700|SGH-X820|SGH-X890|SGH-Z130|SGH-Z150|SGH-Z170|SGH-ZX10|SGH-ZX20|SHW-M110|SPH-A120|SPH-A400|\n SPH-A420|SPH-A460|SPH-A500|SPH-A560|SPH-A600|SPH-A620|SPH-A660|SPH-A700|SPH-A740|SPH-A760|SPH-A790|\n SPH-A800|SPH-A820|SPH-A840|SPH-A880|SPH-A900|SPH-A940|SPH-A960|SPH-D600|SPH-D700|SPH-D710|SPH-D720|\n SPH-I300|SPH-I325|SPH-I330|SPH-I350|SPH-I500|SPH-I600|SPH-I700|SPH-L700|SPH-M100|SPH-M220|SPH-M240|\n SPH-M300|SPH-M305|SPH-M320|SPH-M330|SPH-M350|SPH-M360|SPH-M370|SPH-M380|SPH-M510|SPH-M540|SPH-M550|\n SPH-M560|SPH-M570|SPH-M580|SPH-M610|SPH-M620|SPH-M630|SPH-M800|SPH-M810|SPH-M850|SPH-M900|SPH-M910|\n SPH-M920|SPH-M930|SPH-N100|SPH-N200|SPH-N240|SPH-N300|SPH-N400|SPH-Z400|SWC-E100|SCH-i909|GT-N7100|\n GT-N7105|SCH-I535|SM-N900A|SM-N900T|SGH-I317|SGH-T999L|GT-S5360B|GT-I8262|GT-S6802|GT-S6312|GT-S6310|GT-S5312|\n GT-S5310|GT-I9105|GT-I8510|GT-S6790N|SM-G7105|SM-N9005|GT-S5301|GT-I9295|GT-I9195|SM-C101|GT-S7392|GT-S7560|\n GT-B7610|GT-I5510|GT-S7582|GT-S7530E|GT-I8750|SM-G9006V|SM-G9008V|SM-G9009D|SM-G900A|SM-G900D|SM-G900F|\n SM-G900H|SM-G900I|SM-G900J|SM-G900K|SM-G900L|SM-G900M|SM-G900P|SM-G900R4|SM-G900S|SM-G900T|SM-G900V|\n SM-G900W8|SHV-E160K|SCH-P709|SCH-P729|SM-T2558|GT-I9205|SM-G9350|SM-J120F|SM-G920F|SM-G920V|SM-G930F|\n SM-N910C|SM-A310F|GT-I9190|SM-J500FN|SM-G903F|SM-J330F"),LG:new RegExp("\\bLG\\b;|LG[- ]?(C800|C900|E400|E610|E900|E-900|F160|F180K|F180L|F180S|730|855|L160|LS740|LS840|LS970|\n LU6200|MS690|MS695|MS770|MS840|MS870|MS910|P500|P700|P705|VM696|AS680|AS695|AX840|C729|E970|GS505|272|\n C395|E739BK|E960|L55C|L75C|LS696|LS860|P769BK|P350|P500|P509|P870|UN272|US730|VS840|VS950|LN272|LN510|\n LS670|LS855|LW690|MN270|MN510|P509|P769|P930|UN200|UN270|UN510|UN610|US670|US740|US760|UX265|UX840|VN271|\n VN530|VS660|VS700|VS740|VS750|VS910|VS920|VS930|VX9200|VX11000|AX840A|LW770|P506|P925|P999|E612|D955|D802|\n MS323|M257)"),SONY:/SonyST|SonyLT|SonyEricsson|SonyEricssonLT15iv|LT18i|E10i|LT28h|LT26w|SonyEricssonMT27i|C5303|C6902|C6903|C6906|C6943|D2533/,ASUS:/Asus.*Galaxy|PadFone.*Mobile/,NOKIA_LUMIA:/Lumia [0-9]{3,4}/,MICROMAX:/Micromax.*\b(A210|A92|A88|A72|A111|A110Q|A115|A116|A110|A90S|A26|A51|A35|A54|A25|A27|A89|A68|A65|A57|A90)\b/,PALM:/PalmSource|Palm/,VERTU:/Vertu|Vertu.*Ltd|Vertu.*Ascent|Vertu.*Ayxta|Vertu.*Constellation(F|Quest)?|Vertu.*Monika|Vertu.*Signature/,PANTECH:new RegExp("PANTECH|IM-A850S|IM-A840S|IM-A830L|IM-A830K|IM-A830S|IM-A820L|IM-A810K|IM-A810S|IM-A800S|IM-T100K|\n IM-A725L|IM-A780L|IM-A775C|IM-A770K|IM-A760S|IM-A750K|IM-A740S|IM-A730S|IM-A720L|IM-A710K|IM-A690L|\n IM-A690S|IM-A650S|IM-A630K|IM-A600S|VEGA PTL21|PT003|P8010|ADR910L|P6030|P6020|P9070|P4100|P9060|P5000|\n CDM8992|TXT8045|ADR8995|IS11PT|P2030|P6010|P8000|PT002|IS06|CDM8999|P9050|PT001|TXT8040|P2020|P9020|\n P2000|P7040|P7000|C790"),FLY:/IQ230|IQ444|IQ450|IQ440|IQ442|IQ441|IQ245|IQ256|IQ236|IQ255|IQ235|IQ245|IQ275|IQ240|IQ285|IQ280|IQ270|IQ260|IQ250/,WIKO:new RegExp("KITE 4G|HIGHWAY|GETAWAY|STAIRWAY|DARKSIDE|DARKFULL|DARKNIGHT|DARKMOON|SLIDE|WAX 4G|RAINBOW|BLOOM|\n SUNSET|GOA(?!nna)|LENNY|BARRY|IGGY|OZZY|CINK FIVE|CINK PEAX|CINK PEAX 2|CINK SLIM|CINK SLIM 2|CINK +|\n CINK KING|CINK PEAX|CINK SLIM|SUBLIM"),I_MOBILE:/i-mobile (IQ|i-STYLE|idea|ZAA|Hitz)/,SIMVALLEY:/\b(SP-80|XT-930|SX-340|XT-930|SX-310|SP-360|SP60|SPT-800|SP-120|SPT-800|SP-140|SPX-5|SPX-8|SP-100|SPX-8|SPX-12)\b/,WOLFGANG:/AT-B24D|AT-AS50HD|AT-AS40W|AT-AS55HD|AT-AS45q2|AT-B26D|AT-AS50Q/,ALCATEL:/Alcatel|Mobile; rv:49.0|Mobile; ALCATEL 4052R; rv:48.0/,NINTENDO:/Nintendo (3DS|Switch)/,AMOI:/Amoi/,INQ:/INQ/,VITA:/\bVita\b/,BLACKBERRY:/\bBlackBerry\b|\bBB10\b|rim[0-9]+/,FIREFOX_OS:/\bFirefox-OS\b/,IPHONE:/\biPhone\b/,iPod:/\biPod\b/,ANDROID:/\bAndroid\b/,WINDOWS_PHONE:/\bWindows-Phone\b/,GENERIC_PHONE:new RegExp("Tapatalk|PDA;|SAGEM|\\bmmp\\b|pocket|\\bpsp\\b|symbian|Smartphone|smartfon|treo|up.browser|\n up.link|vodafone|\\bwap\\b|nokia|Nokia|Series40|Series60|S60|SonyEricsson|N900|MAUI.*WAP.*Browser")},T_={iPad:/iPad|iPad.*Mobile/,NexusTablet:/Android.*Nexus[\s]+(7|9|10)/,GoogleTablet:/Android.*Pixel C/,SamsungTablet:new RegExp("SAMSUNG.*Tablet|Galaxy.*Tab|SC-01C|GT-P1000|GT-P1003|GT-P1010|GT-P3105|GT-P6210|\n GT-P6800|GT-P6810|GT-P7100|GT-P7300|GT-P7310|GT-P7500|GT-P7510|SCH-I800|SCH-I815|SCH-I905|\n SGH-I957|SGH-I987|SGH-T849|SGH-T859|SGH-T869|SPH-P100|GT-P3100|GT-P3108|GT-P3110|GT-P5100|\n GT-P5110|GT-P6200|GT-P7320|GT-P7511|GT-N8000|GT-P8510|SGH-I497|SPH-P500|SGH-T779|SCH-I705|\n SCH-I915|GT-N8013|GT-P3113|GT-P5113|GT-P8110|GT-N8010|GT-N8005|GT-N8020|GT-P1013|GT-P6201|\n GT-P7501|GT-N5100|GT-N5105|GT-N5110|SHV-E140K|SHV-E140L|SHV-E140S|SHV-E150S|SHV-E230K|SHV-E230L|\n SHV-E230S|SHW-M180K|SHW-M180L|SM-T865|SM-T290|SHW-M180S|SHW-M180W|SHW-M300W|SHW-M305W|SHW-M380K|SHW-M380S|SHW-M380W|\n SHW-M430W|SHW-M480K|SHW-M480S|SHW-M480W|SHW-M485W|SHW-M486W|SHW-M500W|GT-I9228|SCH-P739|SCH-I925|\n GT-I9200|GT-P5200|GT-P5210|GT-P5210X|SM-T385M|SM-P585M|SM-T311|SM-T310|SM-T310X|SM-T210|SM-T210R|SM-T211|SM-P600|\n SM-P601|SM-P605|SM-P615|SM-P900|SM-P901|SM-T217|SM-T217A|SM-T217S|SM-P6000|SM-T3100|SGH-I467|XE500|SM-T110|\n GT-P5220|GT-I9200X|GT-N5110X|GT-N5120|SM-P905|SM-T111|SM-T2105|SM-T315|SM-T320|SM-T320X|SM-T321|\n SM-T510|SM-T520|SM-T525|SM-T530NU|SM-T230NU|SM-T330NU|SM-T900|XE500T1C|SM-P605V|SM-P905V|SM-T337V|SM-T537V|\n SM-T707V|SM-T807V|SM-P600X|SM-P900X|SM-T210X|SM-T230|SM-T230X|SM-T325|GT-P7503|SM-T531|SM-T500|SM-T330|\n SM-T530|SM-T705|SM-T705C|SM-T535|SM-T331|SM-T800|SM-T700|SM-T537|SM-T807|SM-P907A|SM-T337A|SM-T537A|\n SM-T707A|SM-T807A|SM-T237|SM-T807P|SM-P607T|SM-T217T|SM-T337T|SM-T807T|SM-T116NQ|SM-T116BU|SM-P550|\n SM-T350|SM-T550|SM-T9000|SM-P9000|SM-T705Y|SM-T805|GT-P3113|SM-T710|SM-T810|SM-T815|SM-T360|SM-T533|\n SM-T113|SM-T335|SM-T715|SM-T560|SM-T670|SM-T677|SM-T377|SM-T567|SM-T357T|SM-T555|SM-T561|SM-T713|\n SM-T719|SM-T725|SM-T813|SM-T819|SM-T580|SM-T590|SM-T355Y?|SM-T280|SM-T817A|SM-T820|SM-W700|SM-P580|SM-T587|SM-P350|\n SM-P555M|SM-P355M|SM-T113NU|SM-T815Y|SM-T585|SM-T285|SM-T825|SM-W708|SM-T835|SM-P585Y|SM-X200"),Kindle:new RegExp("Kindle|Silk.*Accelerated|Android.*\\b(KFOT|KFTT|KFJWI|KFJWA|KFOTE|KFSOWI|KFTHWI|KFTHWA|KFAPWI|\n KFAPWA|WFJWAE|KFSAWA|KFSAWI|KFASWI|KFARWI|KFFOWI|KFGIWI|KFMEWI)\\b|Android.*Silk/[0-9.]+ like Chrome /[0-9.]+ (?!Mobile)"),SurfaceTablet:/Windows NT [0-9.]+; ARM;.*(Tablet|ARMBJS)/,HPTablet:/HP Slate (7|8|10)|HP ElitePad 900|hp-tablet|EliteBook.*Touch|HP 8|Slate 21|HP SlateBook 10/,AsusTablet:new RegExp("^.*PadFone((?!Mobile).)*$|Transformer|TF101|TF101G|TF300T|TF300TG|TF300TL|TF700T|TF700KL|\n TF701T|TF810C|ME171|ME301T|ME302C|ME371MG|ME370T|ME372MG|ME172V|ME173X|ME400C|\n Slider SL101|\\bK00F\\b|\\bK00C\\b|\\bK00E\\b|\\bK00L\\b|TX201LA|ME176C|ME102A|\\bM80TA\\b|ME372CL|\n ME560CG|ME372CG|ME302KL| K010 | K011 | K017 | K01E |ME572C|ME103K|ME170C|ME171C|\\bME70C\\b|ME581C|\n ME581CL|ME8510C|ME181C|P01Y|PO1MA|P01Z|\\bP027\\b|\\bP024\\b|\\bP00C\\b"),BlackBerryTablet:/PlayBook|RIM Tablet/,HTCtablet:/HTC_Flyer_P512|HTC Flyer|HTC Jetstream|HTC-P715a|HTC EVO View 4G|PG41200|PG09410/,MotorolaTablet:/xoom|sholest|MZ615|MZ605|MZ505|MZ601|MZ602|MZ603|MZ604|MZ606|MZ607|MZ608|MZ609|MZ615|MZ616|MZ617/,NookTablet:/Android.*Nook|NookColor|nook browser|BNRV200|BNRV200A|BNTV250|BNTV250A|BNTV400|BNTV600|LogicPD Zoom2/,AcerTablet:new RegExp("Android.*; \\b(A100|A101|A110|A200|A210|A211|A500|A501|A510|A511|A700|A701|W500|W500P|W501|\n W501P|W510|W511|W700|G100|G100W|B1-A71|B1-710|B1-711|A1-810|A1-811|A1-830)\\b|W3-810|\\bA3-A10\\b|\\bA3-A11\\b|\n \\bA3-A20\\b|\\bA3-A30"),ToshibaTablet:/Android.*(AT100|AT105|AT200|AT205|AT270|AT275|AT300|AT305|AT1S5|AT500|AT570|AT700|AT830)|TOSHIBA.*FOLIO/,LGTablet:/\bL-06C|LG-V909|LG-V900|LG-V700|LG-V510|LG-V500|LG-V410|LG-V400|LG-VK810\b/,FujitsuTablet:/Android.*\b(F-01D|F-02F|F-05E|F-10D|M532|Q572)\b/,PrestigioTablet:new RegExp("PMP3170B|PMP3270B|PMP3470B|PMP7170B|PMP3370B|PMP3570C|PMP5870C|PMP3670B|PMP5570C|\n PMP5770D|PMP3970B|PMP3870C|PMP5580C|PMP5880D|PMP5780D|PMP5588C|PMP7280C|PMP7280C3G|PMP7280|PMP7880D|\n PMP5597D|PMP5597|PMP7100D|PER3464|PER3274|PER3574|PER3884|PER5274|PER5474|PMP5097CPRO|PMP5097|PMP7380D|\n PMP5297C|PMP5297C_QUAD|PMP812E|PMP812E3G|PMP812F|PMP810E|PMP880TD|PMT3017|PMT3037|PMT3047|PMT3057|PMT7008|\n PMT5887|PMT5001|PMT5002"),LenovoTablet:new RegExp("Lenovo TAB|Idea(Tab|Pad)( A1|A10| K1|)|ThinkPad([ ]+)?Tablet|YT3-850M|YT3-X90L|YT3-X90F|\n YT3-X90X|Lenovo.*(S2109|S2110|S5000|S6000|K3011|A3000|A3500|A1000|A2107|A2109|A1107|A5500|A7600|B6000|\n B8000|B8080)(-|)(FL|F|HV|H|)|TB-X606F|TB-X103F|TB-X304F|TB-X304L|TB-X704F|TB-8703F|Tab2A7-10F|TB2-X30L|TB-8504F"),DellTablet:/Venue 11|Venue 8|Venue 7|Dell Streak 10|Dell Streak 7/,YarvikTablet:new RegExp("Android.*\\b(TAB210|TAB211|TAB224|TAB250|TAB260|TAB264|TAB310|TAB360|TAB364|TAB410|TAB411|\n TAB420|TAB424|TAB450|TAB460|TAB461|TAB464|TAB465|TAB467|TAB468|TAB07-100|TAB07-101|TAB07-150|TAB07-151|\n TAB07-152|TAB07-200|TAB07-201-3G|TAB07-210|TAB07-211|TAB07-212|TAB07-214|TAB07-220|TAB07-400|TAB07-485|\n TAB08-150|TAB08-200|TAB08-201-3G|TAB08-201-30|TAB09-100|TAB09-211|TAB09-410|TAB10-150|TAB10-201|TAB10-211|\n TAB10-400|TAB10-410|TAB13-201|TAB274EUK|TAB275EUK|TAB374EUK|TAB462EUK|TAB474EUK|TAB9-200)\\b"),MedionTablet:/Android.*\bOYO\b|LIFE.*(P9212|P9514|P9516|S9512)|LIFETAB/,ArnovaTablet:/97G4|AN10G2|AN7bG3|AN7fG3|AN8G3|AN8cG3|AN7G3|AN9G3|AN7dG3|AN7dG3ST|AN7dG3ChildPad|AN10bG3|AN10bG3DT|AN9G2/,IntensoTablet:/INM8002KP|INM1010FP|INM805ND|Intenso Tab|TAB1004/,IRUTablet:/M702pro/,MegafonTablet:/MegaFon V9|\bZTE V9\b|Android.*\bMT7A\b/,EbodaTablet:/E-Boda (Supreme|Impresspeed|Izzycomm|Essential)/,AllViewTablet:/Allview.*(Viva|Alldro|City|Speed|All TV|Frenzy|Quasar|Shine|TX1|AX1|AX2)/,ArchosTablet:new RegExp("\\b(101G9|80G9|A101IT)\\b|Qilive 97R|Archos5|\\bARCHOS (70|79|80|90|97|101|FAMILYPAD|)(b|c|)(G10|\n Cobalt| TITANIUM(HD|)| Xenon| Neon|XSK| 2| XS 2| PLATINUM| CARBON|GAMEPAD)\\b"),AinolTablet:/NOVO7|NOVO8|NOVO10|Novo7Aurora|Novo7Basic|NOVO7PALADIN|novo9-Spark/,NokiaLumiaTablet:/Lumia 2520/,SonyTablet:new RegExp("Sony.*Tablet|Xperia Tablet|Sony Tablet S|SO-03E|SGPT12|SGPT13|SGPT114|SGPT121|SGPT122|SGPT123|\n SGPT111|SGPT112|SGPT113|SGPT131|SGPT132|SGPT133|SGPT211|SGPT212|SGPT213|SGP311|SGP312|SGP321|EBRD1101|\n EBRD1102|EBRD1201|SGP351|SGP341|SGP511|SGP512|SGP521|SGP541|SGP551|SGP621|SGP641|SGP612|SOT31|SGP771|SGP611|\n SGP612|SGP712"),PhilipsTablet:/\b(PI2010|PI3000|PI3100|PI3105|PI3110|PI3205|PI3210|PI3900|PI4010|PI7000|PI7100)\b/,CubeTablet:/Android.*(K8GT|U9GT|U10GT|U16GT|U17GT|U18GT|U19GT|U20GT|U23GT|U30GT)|CUBE U8GT/,CobyTablet:new RegExp("MID1042|MID1045|MID1125|MID1126|MID7012|MID7014|MID7015|MID7034|MID7035|MID7036|MID7042|MID7048|\n MID7127|MID8042|MID8048|MID8127|MID9042|MID9740|MID9742|MID7022|MID7010"),MIDTablet:new RegExp("M9701|M9000|M9100|M806|M1052|M806|T703|MID701|MID713|MID710|MID727|MID760|MID830|MID728|MID933|\n MID125|MID810|MID732|MID120|MID930|MID800|MID731|MID900|MID100|MID820|MID735|MID980|MID130|MID833|MID737|\n MID960|MID135|MID860|MID736|MID140|MID930|MID835|MID733|MID4X10"),MSITablet:new RegExp("MSI \\b(Primo 73K|Primo 73L|Primo 81L|Primo 77|Primo 93|Primo 75|Primo 76|Primo 73|Primo 81|\n Primo 91|Primo 90|Enjoy 71|Enjoy 7|Enjoy 10)\\b"),SMiTTablet:/Android.*(\bMID\b|MID-560|MTV-T1200|MTV-PND531|MTV-P1101|MTV-PND530)/,RockChipTablet:/Android.*(RK2818|RK2808A|RK2918|RK3066)|RK2738|RK2808A/,FlyTablet:/IQ310|Fly Vision/,bqTablet:new RegExp("Android.*(bq)?.*(Elcano|Curie|Edison|Maxwell|Kepler|Pascal|Tesla|Hypatia|Platon|Newton|\n Livingstone|Cervantes|Avant|Aquaris ([E|M]10|M8))|Maxwell.*Lite|Maxwell.*Plus"),HuaweiTablet:new RegExp("MediaPad|MediaPad 7 Youth|MediaPad T3 10|IDEOS S7|S7-201c|S7-202u|S7-101|S7-103|S7-104|S7-105|S7-106|\n S7-201|S7-Slim|M2-A01L|BAH-L09|BAH-W09|AGS-W09"),NecTablet:/\bN-06D|\bN-08D/,PantechTablet:/Pantech.*P4100/,BronchoTablet:/Broncho.*(N701|N708|N802|a710)/,VersusTablet:/TOUCHPAD.*[78910]|\bTOUCHTAB\b/,ZyncTablet:/z1000|Z99 2G|z99|z930|z999|z990|z909|Z919|z900/,PositivoTablet:/TB07STA|TB10STA|TB07FTA|TB10FTA/,NabiTablet:/Android.*\bNabi/,KoboTablet:/Kobo Touch|\bK080\b|\bVox\b Build|\bArc\b Build/,DanewTablet:/DSlide.*\b(700|701R|702|703R|704|802|970|971|972|973|974|1010|1012)\b/,TexetTablet:new RegExp("NaviPad|TB-772A|TM-7045|TM-7055|TM-9750|TM-7016|TM-7024|TM-7026|TM-7041|TM-7043|TM-7047|\n TM-8041|TM-9741|TM-9747|TM-9748|TM-9751|TM-7022|TM-7021|TM-7020|TM-7011|TM-7010|TM-7023|TM-7025|\n TM-7037W|TM-7038W|TM-7027W|TM-9720|TM-9725|TM-9737W|TM-1020|TM-9738W|TM-9740|TM-9743W|TB-807A|TB-771A|\n TB-727A|TB-725A|TB-719A|TB-823A|TB-805A|TB-723A|TB-715A|TB-707A|TB-705A|TB-709A|TB-711A|TB-890HD|\n TB-880HD|TB-790HD|TB-780HD|TB-770HD|TB-721HD|TB-710HD|TB-434HD|TB-860HD|TB-840HD|TB-760HD|TB-750HD|\n TB-740HD|TB-730HD|TB-722HD|TB-720HD|TB-700HD|TB-500HD|TB-470HD|TB-431HD|TB-430HD|TB-506|TB-504|TB-446|\n TB-436|TB-416|TB-146SE|TB-126SE"),PlaystationTablet:/Playstation.*(Portable|Vita)/,TrekstorTablet:/ST10416-1|VT10416-1|ST70408-1|ST702xx-1|ST702xx-2|ST80208|ST97216|ST70104-2|VT10416-2|ST10216-2A|SurfTab/,PyleAudioTablet:/\b(PTBL10CEU|PTBL10C|PTBL72BC|PTBL72BCEU|PTBL7CEU|PTBL7C|PTBL92BC|PTBL92BCEU|PTBL9CEU|PTBL9CUK|PTBL9C)\b/,AdvanTablet:new RegExp("Android.* \\b(E3A|T3X|T5C|T5B|T3E|T3C|T3B|T1J|T1F|T2A|T1H|T1i|E1C|T1-E|T5-A|T4|E1-B|T2Ci|\n T1-B|T1-D|O1-A|E1-A|T1-A|T3A|T4i)\\b"),DanyTechTablet:"Genius Tab G3|Genius Tab S2|Genius Tab Q3|Genius Tab G4|Genius Tab Q4|Genius Tab G-II|\n Genius TAB GII|Genius TAB GIII|Genius Tab S1",GalapadTablet:/Android.*\bG1\b(?!\))/,MicromaxTablet:/Funbook|Micromax.*\b(P250|P560|P360|P362|P600|P300|P350|P500|P275)\b/,KarbonnTablet:/Android.*\b(A39|A37|A34|ST8|ST10|ST7|Smart Tab3|Smart Tab2)\b/,AllFineTablet:/Fine7 Genius|Fine7 Shine|Fine7 Air|Fine8 Style|Fine9 More|Fine10 Joy|Fine11 Wide/,PROSCANTablet:new RegExp("\\b(PEM63|PLT1023G|PLT1041|PLT1044|PLT1044G|PLT1091|PLT4311|PLT4311PL|PLT4315|PLT7030|\n PLT7033|PLT7033D|PLT7035|PLT7035D|PLT7044K|PLT7045K|PLT7045KB|PLT7071KG|PLT7072|PLT7223G|PLT7225G|\n PLT7777G|PLT7810K|PLT7849G|PLT7851G|PLT7852G|PLT8015|PLT8031|PLT8034|PLT8036|PLT8080K|PLT8082|PLT8088|\n PLT8223G|PLT8234G|PLT8235G|PLT8816K|PLT9011|PLT9045K|PLT9233G|PLT9735|PLT9760G|PLT9770G)\\b"),YONESTablet:/BQ1078|BC1003|BC1077|RK9702|BC9730|BC9001|IT9001|BC7008|BC7010|BC708|BC728|BC7012|BC7030|BC7027|BC7026/,ChangJiaTablet:new RegExp("TPC7102|TPC7103|TPC7105|TPC7106|TPC7107|TPC7201|TPC7203|TPC7205|TPC7210|TPC7708|TPC7709|\n TPC7712|TPC7110|TPC8101|TPC8103|TPC8105|TPC8106|TPC8203|TPC8205|TPC8503|TPC9106|TPC9701|TPC97101|TPC97103|\n TPC97105|TPC97106|TPC97111|TPC97113|TPC97203|TPC97603|TPC97809|TPC97205|TPC10101|TPC10103|TPC10106|\n TPC10111|TPC10203|TPC10205|TPC10503"),GUTablet:/TX-A1301|TX-M9002|Q702|kf026/,PointOfViewTablet:new RegExp("TAB-P506|TAB-navi-7-3G-M|TAB-P517|TAB-P-527|TAB-P701|TAB-P703|TAB-P721|TAB-P731N|\n TAB-P741|TAB-P825|TAB-P905|TAB-P925|TAB-PR945|TAB-PL1015|TAB-P1025|TAB-PI1045|TAB-P1325|TAB-PROTAB[0-9]+|\n TAB-PROTAB25|TAB-PROTAB26|TAB-PROTAB27|TAB-PROTAB26XL|TAB-PROTAB2-IPS9|TAB-PROTAB30-IPS9|TAB-PROTAB25XXL|\n TAB-PROTAB26-IPS10|TAB-PROTAB30-IPS10"),OvermaxTablet:new RegExp("OV-(SteelCore|NewBase|Basecore|Baseone|Exellen|Quattor|EduTab|Solution|ACTION|BasicTab|TeddyTab|\n MagicTab|Stream|TB-08|TB-09)|Qualcore 1027"),HCLTablet:/HCL.*Tablet|Connect-3G-2.0|Connect-2G-2.0|ME Tablet U1|ME Tablet U2|ME Tablet G1|ME Tablet X1|ME Tablet Y2|ME Tablet Sync/,DPSTablet:/DPS Dream 9|DPS Dual 7/,VistureTablet:/V97 HD|i75 3G|Visture V4( HD)?|Visture V5( HD)?|Visture V10/,CrestaTablet:/CTP(-)?810|CTP(-)?818|CTP(-)?828|CTP(-)?838|CTP(-)?888|CTP(-)?978|CTP(-)?980|CTP(-)?987|CTP(-)?988|CTP(-)?989/,MediatekTablet:/\bMT8125|MT8389|MT8135|MT8377\b/,ConcordeTablet:/Concorde([ ]+)?Tab|ConCorde ReadMan/,GoCleverTablet:new RegExp("GOCLEVER TAB|A7GOCLEVER|M1042|M7841|M742|R1042BK|R1041|TAB A975|TAB A7842|TAB A741|TAB A741L|TAB M723G|\n TAB M721|TAB A1021|TAB I921|TAB R721|TAB I720|TAB T76|TAB R70|TAB R76.2|TAB R106|TAB R83.2|TAB M813G|TAB I721|\n GCTA722|TAB I70|TAB I71|TAB S73|TAB R73|TAB R74|TAB R93|TAB R75|TAB R76.1|TAB A73|TAB A93|TAB A93.2|TAB T72|\n TAB R83|TAB R974|TAB R973|TAB A101|TAB A103|TAB A104|TAB A104.2|R105BK|M713G|A972BK|TAB A971|TAB R974.2|\n TAB R104|TAB R83.3|TAB A1042"),ModecomTablet:new RegExp("FreeTAB 9000|FreeTAB 7.4|FreeTAB 7004|FreeTAB 7800|FreeTAB 2096|FreeTAB 7.5|FreeTAB 1014|\n FreeTAB 1001 |FreeTAB 8001|FreeTAB 9706|FreeTAB 9702|FreeTAB 7003|FreeTAB 7002|FreeTAB 1002|FreeTAB 7801|\n FreeTAB 1331|FreeTAB 1004|FreeTAB 8002|FreeTAB 8014|FreeTAB 9704|FreeTAB 1003"),VoninoTablet:new RegExp("\\b(Argus[ _]?S|Diamond[ _]?79HD|Emerald[ _]?78E|Luna[ _]?70C|Onyx[ _]?S|Onyx[ _]?Z|\n Orin[ _]?HD|Orin[ _]?S|Otis[ _]?S|SpeedStar[ _]?S|Magnet[ _]?M9|Primus[ _]?94[ _]?3G|Primus[ _]?94HD|\n Primus[ _]?QS|Android.*\\bQ8\\b|Sirius[ _]?EVO[ _]?QS|Sirius[ _]?QS|Spirit[ _]?S)\\b"),ECSTablet:/V07OT2|TM105A|S10OT1|TR10CS1/,StorexTablet:/eZee[_']?(Tab|Go)[0-9]+|TabLC7|Looney Tunes Tab/,VodafoneTablet:/SmartTab([ ]+)?[0-9]+|SmartTabII10|SmartTabII7|VF-1497/,EssentielBTablet:/Smart[ ']?TAB[ ]+?[0-9]+|Family[ ']?TAB2/,RossMoorTablet:/RM-790|RM-997|RMD-878G|RMD-974R|RMT-705A|RMT-701|RME-601|RMT-501|RMT-711/,iMobileTablet:/i-mobile i-note/,TolinoTablet:/tolino tab [0-9.]+|tolino shine/,AudioSonicTablet:/\bC-22Q|T7-QC|T-17B|T-17P\b/,AMPETablet:/Android.* A78 /,SkkTablet:/Android.* (SKYPAD|PHOENIX|CYCLOPS)/,TecnoTablet:/TECNO P9|TECNO DP8D/,JXDTablet:new RegExp("Android.* \\b(F3000|A3300|JXD5000|JXD3000|JXD2000|JXD300B|JXD300|S5800|S7800|S602b|S5110b|S7300|\n S5300|S602|S603|S5100|S5110|S601|S7100a|P3000F|P3000s|P101|P200s|P1000m|P200m|P9100|P1000s|S6600b|S908|\n P1000|P300|S18|S6600|S9100)\\b"),iJoyTablet:new RegExp("Tablet (Spirit 7|Essentia|Galatea|Fusion|Onix 7|Landa|Titan|Scooby|Deox|Stella|Themis|Argon|\n Unique 7|Sygnus|Hexen|Finity 7|Cream|Cream X2|Jade|Neon 7|Neron 7|Kandy|Scape|Saphyr 7|Rebel|Biox|Rebel|\n Rebel 8GB|Myst|Draco 7|Myst|Tab7-004|Myst|Tadeo Jones|Tablet Boing|Arrow|Draco Dual Cam|Aurix|Mint|Amity|\n Revolution|Finity 9|Neon 9|T9w|Amity 4GB Dual Cam|Stone 4GB|Stone 8GB|Andromeda|Silken|X2|Andromeda II|\n Halley|Flame|Saphyr 9,7|Touch 8|Planet|Triton|Unique 10|Hexen 10|Memphis 4GB|Memphis 8GB|Onix 10)"),FX2Tablet:/FX2 PAD7|FX2 PAD10/,XoroTablet:new RegExp("KidsPAD 701|PAD[ ]?712|PAD[ ]?714|PAD[ ]?716|PAD[ ]?717|PAD[ ]?718|PAD[ ]?720|PAD[ ]?721|\n PAD[ ]?722|PAD[ ]?790|PAD[ ]?792|PAD[ ]?900|PAD[ ]?9715D|PAD[ ]?9716DR|PAD[ ]?9718DR|PAD[ ]?9719QR|\n PAD[ ]?9720QR|TelePAD1030|Telepad1032|TelePAD730|TelePAD731|TelePAD732|TelePAD735Q|TelePAD830|TelePAD9730|\n TelePAD795|MegaPAD 1331|MegaPAD 1851|MegaPAD 2151"),ViewsonicTablet:/ViewPad 10pi|ViewPad 10e|ViewPad 10s|ViewPad E72|ViewPad7|ViewPad E100|ViewPad 7e|ViewSonic VB733|VB100a/,VerizonTablet:/QTAQZ3|QTAIR7|QTAQTZ3|QTASUN1|QTASUN2|QTAXIA1/,OdysTablet:/LOOX|XENO10|ODYS[ -](Space|EVO|Xpress|NOON)|\bXELIO\b|Xelio10Pro|XELIO7PHONETAB|XELIO10EXTREME|XELIOPT2|NEO_QUAD10/,CaptivaTablet:/CAPTIVA PAD/,IconbitTablet:new RegExp("NetTAB|NT-3702|NT-3702S|NT-3702S|NT-3603P|NT-3603P|NT-0704S|NT-0704S|NT-3805C|NT-3805C|\n NT-0806C|NT-0806C|NT-0909T|NT-0909T|NT-0907S|NT-0907S|NT-0902S|NT-0902S"),TeclastTablet:new RegExp("T98 4G|\\bP80\\b|\\bX90HD\\b|X98 Air|X98 Air 3G|\\bX89\\b|P80 3G|\\bX80h\\b|P98 Air|\n \\bX89HD\\b|P98 3G|\\bP90HD\\b|P89 3G|X98 3G|\\bP70h\\b|P79HD 3G|G18d 3G|\\bP79HD\\b|\\bP89s\\b|\\bA88\\b|\n \\bP10HD\\b|\\bP19HD\\b|G18 3G|\\bP78HD\\b|\\bA78\\b|\\bP75\\b|G17s 3G|G17h 3G|\\bP85t\\b|\\bP90\\b|\n \\bP11\\b|\\bP98t\\b|\\bP98HD\\b|\\bG18d\\b|\\bP85s\\b|\\bP11HD\\b|\\bP88s\\b|\\bA80HD\\b|\\bA80se\\b|\n \\bA10h\\b|\\bP89\\b|\\bP78s\\b|\\bG18\\b|\\bP85\\b|\\bA70h\\b|\\bA70\\b|\\bG17\\b|\\bP18\\b|\\bA80s\\b|\n \\bA11s\\b|\\bP88HD\\b|\\bA80h\\b|\\bP76s\\b|\\bP76h\\b|\\bP98\\b|\\bA10HD\\b|\\bP78\\b|\\bP88\\b|\\bA11\\b|\n \\bA10t\\b|\\bP76a\\b|\\bP76t\\b|\\bP76e\\b|\\bP85HD\\b|\\bP85a\\b|\\bP86\\b|\\bP75HD\\b|\\bP76v\\b|\\bA12\\b|\n \\bP75a\\b|\\bA15\\b|\\bP76Ti\\b|\\bP81HD\\b|\\bA10\\b|\\bT760VE\\b|\\bT720HD\\b|\\bP76\\b|\\bP73\\b|\\bP71\\b|\n \\bP72\\b|\\bT720SE\\b|\\bC520Ti\\b|\\bT760\\b|\\bT720VE\\b|T720-3GE|T720-WiFi"),OndaTablet:new RegExp("\\b(V975i|Vi30|VX530|V701|Vi60|V701s|Vi50|V801s|V719|Vx610w|VX610W|V819i|Vi10|VX580W|Vi10|\n V711s|V813|V811|V820w|V820|Vi20|V711|VI30W|V712|V891w|V972|V819w|V820w|Vi60|V820w|V711|V813s|V801|V819|\n V975s|V801|V819|V819|V818|V811|V712|V975m|V101w|V961w|V812|V818|V971|V971s|V919|V989|V116w|V102w|V973|\n Vi40)\\b[s]+|V10 \\b4G\\b"),JaytechTablet:/TPC-PA762/,BlaupunktTablet:/Endeavour 800NG|Endeavour 1010/,DigmaTablet:/\b(iDx10|iDx9|iDx8|iDx7|iDxD7|iDxD8|iDsQ8|iDsQ7|iDsQ8|iDsD10|iDnD7|3TS804H|iDsQ11|iDj7|iDs10)\b/,EvolioTablet:/ARIA_Mini_wifi|Aria[ _]Mini|Evolio X10|Evolio X7|Evolio X8|\bEvotab\b|\bNeura\b/,LavaTablet:/QPAD E704|\bIvoryS\b|E-TAB IVORY|\bE-TAB\b/,AocTablet:/MW0811|MW0812|MW0922|MTK8382|MW1031|MW0831|MW0821|MW0931|MW0712/,MpmanTablet:new RegExp("MP11 OCTA|MP10 OCTA|MPQC1114|MPQC1004|MPQC994|MPQC974|MPQC973|MPQC804|MPQC784|MPQC780|\n \\bMPG7\\b|MPDCG75|MPDCG71|MPDC1006|MP101DC|MPDC9000|MPDC905|MPDC706HD|MPDC706|MPDC705|MPDC110|\n MPDC100|MPDC99|MPDC97|MPDC88|MPDC8|MPDC77|MP709|MID701|MID711|MID170|MPDC703|MPQC1010"),CelkonTablet:/CT695|CT888|CT[\s]?910|CT7 Tab|CT9 Tab|CT3 Tab|CT2 Tab|CT1 Tab|C820|C720|\bCT-1\b/,WolderTablet:new RegExp("miTab \\b(DIAMOND|SPACE|BROOKLYN|NEO|FLY|MANHATTAN|FUNK|EVOLUTION|SKY|GOCAR|IRON|GENIUS|\n POP|MINT|EPSILON|BROADWAY|JUMP|HOP|LEGEND|NEW AGE|LINE|ADVANCE|FEEL|FOLLOW|LIKE|LINK|LIVE|THINK|\n FREEDOM|CHICAGO|CLEVELAND|BALTIMORE-GH|IOWA|BOSTON|SEATTLE|PHOENIX|DALLAS|IN 101|MasterChef)\\b"),MediacomTablet:"M-MPI10C3G|M-SP10EG|M-SP10EGP|M-SP10HXAH|M-SP7HXAH|M-SP10HXBH|M-SP8HXAH|M-SP8MXA",MiTablet:/\bMI PAD\b|\bHM NOTE 1W\b/,NibiruTablet:/Nibiru M1|Nibiru Jupiter One/,NexoTablet:/NEXO NOVA|NEXO 10|NEXO AVIO|NEXO FREE|NEXO GO|NEXO EVO|NEXO 3G|NEXO SMART|NEXO KIDDO|NEXO MOBI/,LeaderTablet:new RegExp("TBLT10Q|TBLT10I|TBL-10WDKB|TBL-10WDKBO2013|TBL-W230V2|TBL-W450|TBL-W500|SV572|TBLT7I|\n TBA-AC7-8G|TBLT79|TBL-8W16|TBL-10W32|TBL-10WKB|TBL-W100"),UbislateTablet:/UbiSlate[\s]?7C/,PocketBookTablet:/Pocketbook/,KocasoTablet:/\b(TB-1207)\b/,HisenseTablet:/\b(F5281|E2371)\b/,Hudl:/Hudl HT7S3|Hudl 2/,TelstraTablet:/T-Hub2/,Honeywell:/RT10A/,GenericTablet:new RegExp("Android.*\\b97D\\b|Tablet(?!.*PC)|BNTV250A|MID-WCDMA|LogicPD Zoom2|\\bA7EB\\b|CatNova8|\n A1_07|CT704|CT1002|\\bM721\\b|rk30sdk|\\bEVOTAB\\b|M758A|ET904|ALUMIUM10|Smartfren Tab|Endeavour 1010|\n Tablet-PC-4|Tagi Tab|\\bM6pro\\b|CT1020W|arc 10HD|\\bTP750\\b|\\bQTAQZ3\\b|WVT101|TM1088|KT107")},ap={BLACKBERRY:"Blackberry",FIREFOX_OS:"Firefox-OS",CHROME_BOOK:"Chrome-Book",WINDOWS_PHONE:"Windows-Phone",VITA:"Vita",PS4:"PS4",MAC:"Macintosh",CHROMECAST:"Chromecast",APPLE_TV:"Apple-TV",GOOGLE_TV:"Google-TV",ANDROID:"Android",Tesla:"Tesla",iPad:"iPad",IPHONE:"iPhone",iPod:"iPod",UNKNOWN:E_.UKNOWN,HTC:"HTC",NEXUS_PHONE:"Nexus Phone",NexusTablet:"Nexus Tablet",DELL:"Dell",MOTOROLA:"Motorola",SAMSUNG:"Samsung",LG:"LG",SONY:"Sony",ASUS:"Asus",NOKIA_LUMIA:"Nokia Lumia",MICROMAX:"Micromax",PALM:"Palm",VERTU:"Vertu",PANTECH:"PANTECH",FLY:"Fly",WIKO:"WIKO",I_MOBILE:"i-mobile",SIMVALLEY:"Simvalley",WOLFGANG:"Wolfgang",ALCATEL:"Alcatel",HONEYWELL:"Honeywell",NINTENDO:"Nintendo",AMOI:"Amoi",INQ:"INQ",GENERIC_PHONE:"Generic Phone",MI_SE_9:"Mi SE 9"},OB=[ap.PS4,ap.CHROME_BOOK,ap.MAC,ap.DELL,ap.ASUS,ap.UNKNOWN],MJ={WINDOWS:"Windows",MAC:"Mac",IOS:"iOS",ANDROID:"Android",LINUX:"Linux",UNIX:"Unix",FIREFOX_OS:"Firefox-OS",CHROME_OS:"Chrome-OS",WINDOWS_PHONE:"Windows-Phone",UNKNOWN:E_.UKNOWN},SJ={WINDOWS_3_11:"windows-3-11",WINDOWS_95:"windows-95",WINDOWS_ME:"windows-me",WINDOWS_98:"windows-98",WINDOWS_CE:"windows-ce",WINDOWS_2000:"windows-2000",WINDOWS_XP:"windows-xp",WINDOWS_SERVER_2003:"windows-server-2003",WINDOWS_VISTA:"windows-vista",WINDOWS_7:"windows-7",WINDOWS_8_1:"windows-8-1",WINDOWS_8:"windows-8",WINDOWS_10:"windows-10",WINDOWS_PHONE_7_5:"windows-phone-7-5",WINDOWS_PHONE_8_1:"windows-phone-8-1",WINDOWS_PHONE_10:"windows-phone-10",WINDOWS_NT_4_0:"windows-nt-4-0",MACOSX_11_0:"mac-os-x-11-0",MACOSX_16:"mac-os-x-16",MACOSX_15:"mac-os-x-15",MACOSX_14:"mac-os-x-14",MACOSX_13:"mac-os-x-13",MACOSX_12:"mac-os-x-12",MACOSX_11:"mac-os-x-11",MACOSX_10:"mac-os-x-10",MACOSX_9:"mac-os-x-9",MACOSX_8:"mac-os-x-8",MACOSX_7:"mac-os-x-7",MACOSX_6:"mac-os-x-6",MACOSX_5:"mac-os-x-5",MACOSX_4:"mac-os-x-4",MACOSX_3:"mac-os-x-3",MACOSX_2:"mac-os-x-2",MACOSX:"mac-os-x",iOS:"iOS",ANDROID_9:"android-9",UNKNOWN:E_.UKNOWN.toLowerCase()},FB={WINDOWS:{and:[{or:[/\bWindows|(Win\d\d)\b/,/\bWin 9x\b/]},{not:/\bWindows Phone\b/}]},MAC:{and:[/\bMac OS\b/,{not:{or:[/\biPhone\b/,/\biPad\b/,/\biPod\b/,/\bWindows Phone\b/]}}]},IOS:{and:[{or:[/\biPad\b/,/\biPhone\b/,/\biPod\b/]},{not:/\bWindows Phone\b/}]},ANDROID:{and:[/\bAndroid\b/,{not:/\bWindows Phone\b/}]},LINUX:/\bLinux\b/,UNIX:/\bUNIX\b/,FIREFOX_OS:{and:[/\bFirefox\b/,/Mobile\b/]},CHROME_OS:/\bCrOS\b/,WINDOWS_PHONE:{or:[/\bIEMobile\b/,/\bWindows Phone\b/]},PS4:/\bMozilla\/5.0 \(PlayStation 4\b/,VITA:/\bMozilla\/5.0 \(Play(S|s)tation Vita\b/},EJ={...l1,...T_,...FB,FIREFOX_OS:{and:[/\bFirefox\b/,/\bMobile\b/]},CHROME_BOOK:/\bCrOS\b/,PS4:/\bMozilla\/5.0 \(PlayStation 4\b/,CHROMECAST:/\bCrKey\b/,APPLE_TV:/^iTunes-AppleTV\/4.1$/,GOOGLE_TV:/\bGoogleTV\b/,Tesla:/Tesla\/([0-9]{4}.[0-9]{1,2}.?[0-9]{0,2}.?[0-9]{0,2})-(.{7})/,MI_SE_9:/\bXiaomi\b/,MAC:{and:[/\bMac OS\b/,{not:{or:[/\biPhone\b/,/\biPad\b/,/\biPod\b/,/\bWindows Phone\b/]}}]}},mT={WINDOWS_3_11:/Win16/,WINDOWS_95:/(Windows 95|Win95|Windows_95)/,WINDOWS_ME:/(Win 9x 4.90|Windows ME)/,WINDOWS_98:/(Windows 98|Win98)/,WINDOWS_CE:/Windows CE/,WINDOWS_2000:/(Windows NT 5.0|Windows 2000)/,WINDOWS_XP:/(Windows NT 5.1|Windows XP)/,WINDOWS_SERVER_2003:/Windows NT 5.2/,WINDOWS_VISTA:/Windows NT 6.0/,WINDOWS_7:/(Windows 7|Windows NT 6.1)/,WINDOWS_8_1:/(Windows 8.1|Windows NT 6.3)/,WINDOWS_8:/(Windows 8|Windows NT 6.2)/,WINDOWS_10:/(Windows NT 10.0)/,WINDOWS_PHONE_7_5:/(Windows Phone OS 7.5)/,WINDOWS_PHONE_8_1:/(Windows Phone 8.1)/,WINDOWS_PHONE_10:/(Windows Phone 10)/,WINDOWS_NT_4_0:{and:[/(Windows NT 4.0|WinNT4.0|WinNT|Windows NT)/,{not:/Windows NT 10.0/}]},MACOSX:/(MAC OS X\s*[^ 0-9])/,MACOSX_3:/(Darwin 10.3|Mac OS X 10.3)/,MACOSX_4:/(Darwin 10.4|Mac OS X 10.4)/,MACOSX_5:/(Mac OS X 10.5)/,MACOSX_6:/(Mac OS X 10.6)/,MACOSX_7:/(Mac OS X 10.7)/,MACOSX_8:/(Mac OS X 10.8)/,MACOSX_9:/(Mac OS X 10.9)/,MACOSX_10:/(Mac OS X 10.10)/,MACOSX_11:/(Mac OS X 10.11)/,MACOSX_12:/(Mac OS X 10.12)/,MACOSX_13:/(Mac OS X 10.13)/,MACOSX_14:/(Mac OS X 10.14)/,MACOSX_15:/(Mac OS X 10.15)/,MACOSX_16:/(Mac OS X 10.16)/,MACOSX_11_0:{or:[/11_0 like Mac OS X/,/Mac OS X 11/]},iOS:/(iPhone OS\s*[0-9_]+)/,ANDROID_9:/(Android 9)/},gT={CHROME:[/\bChrome\/([\d\.]+)\b/,/\bCriOS\/([\d\.]+)\b/,/\bHeadlessChrome\/([\d\.]+)\b/],FIREFOX:[/\bFirefox\/([\d\.]+)\b/,/\bFxiOS\/([\d\.]+)\b/],SAFARI:[/\bVersion\/([\d\.]+)\b/,/\bSafari\/([\d\.]+)\b/],OPERA:[/\bVersion\/([\d\.]+)\b/,/\bOPR\/([\d\.]+)\b/],IE:[/\bMSIE ([\d\.]+\w?)\b/,/\brv:([\d\.]+\w?)\b/],MS_EDGE:/\bEdg(?:e|A|iOS)\/([\d\.]+)\b/,MS_EDGE_CHROMIUM:/\bEdg\/([\d\.]+)\b/,SAMSUNG:/\bSamsungBrowser\/([\d\.]+)\b/,UCBROWSER:/\bUCBrowser\/([\d\.]+)\b/},TJ=Object.keys(mT).reduce((t,n)=>(t[n]=mT[n],t),{}),LB=Object.keys(gT).reduce((t,n)=>(t[fT[n]]=gT[n],t),{});var vu=Object.freeze({__proto__:null,GENERAL:E_,BROWSERS:fT,MOBILES_RE:l1,TABLETS_RE:T_,DEVICES:ap,DESKTOP_DEVICES:OB,OS:MJ,OS_VERSIONS:SJ,OS_RE:FB,BROWSERS_RE:{CHROME:{and:[{or:[/\bChrome\b/,/\bCriOS\b/,/\bHeadlessChrome\b/]},{not:{or:[/\bOPR\b/,/\bEdg(e|A|iOS)\b/,/\bEdg\/\b/,/\bSamsungBrowser\b/,/\bUCBrowser\b/]}}]},FIREFOX:{or:[/\bFirefox\b/,/\bFxiOS\b/]},SAFARI:{and:[/^((?!CriOS).)*\Safari\b.*$/,{not:{or:[/\bOPR\b/,/\bEdg(e|A|iOS)\b/,/\bEdg\/\b/,/\bWindows Phone\b/,/\bSamsungBrowser\b/,/\bUCBrowser\b/]}}]},OPERA:{or:[/Opera\b/,/\bOPR\b/]},IE:{or:[/\bMSIE\b/,/\bTrident\b/,/^Mozilla\/5\.0 \(Windows NT 10\.0; Win64; x64\)$/]},MS_EDGE:{or:[/\bEdg(e|A|iOS)\b/]},MS_EDGE_CHROMIUM:/\bEdg\/\b/,PS4:/\bMozilla\/5.0 \(PlayStation 4\b/,VITA:/\bMozilla\/5.0 \(Play(S|s)tation Vita\b/,FB_MESSANGER:/\bFBAN\/MessengerForiOS\b/,SAMSUNG:/\bSamsungBrowser\b/,UCBROWSER:/\bUCBrowser\b/},DEVICES_RE:EJ,OS_VERSIONS_RE_MAP:mT,BROWSER_VERSIONS_RE_MAP:gT,OS_VERSIONS_RE:TJ,BROWSER_VERSIONS_RE:LB});class AJ{constructor(){}test(n,e){return"string"==typeof e&&(e=new RegExp(e)),e instanceof RegExp?e.test(n):e&&Array.isArray(e.and)?e.and.every(i=>this.test(n,i)):e&&Array.isArray(e.or)?e.or.some(i=>this.test(n,i)):!(!e||!e.not||this.test(n,e.not))}exec(n,e){return"string"==typeof e&&(e=new RegExp(e)),e instanceof RegExp?e.exec(n):e&&Array.isArray(e)?e.reduce((i,r)=>i||this.exec(n,r),null):null}}var rm=(()=>{return(t=rm||(rm={})).Mobile="mobile",t.Tablet="tablet",t.Desktop="desktop",t.Unknown="unknown",rm;var t})(),P0=(()=>{return(t=P0||(P0={})).Portrait="portrait",t.Landscape="landscape",P0;var t})();const _T="iPad";let BB=(()=>{class t{constructor(e){this.platformId=e,this.ua="",this.userAgent="",this.os="",this.browser="",this.device="",this.os_version="",this.browser_version="",this.reTree=new AJ,this.deviceType="",this.orientation="",bc(this.platformId)&&typeof window<"u"&&(this.userAgent=window.navigator.userAgent),this.setDeviceInfo(this.userAgent)}setDeviceInfo(e=this.userAgent){e!==this.userAgent&&(this.userAgent=e);const i=[{const:"OS",prop:"os"},{const:"BROWSERS",prop:"browser"},{const:"DEVICES",prop:"device"},{const:"OS_VERSIONS",prop:"os_version"}];if(i.forEach(r=>{this[r.prop]=Object.keys(vu[r.const]).reduce((s,d)=>"device"===vu[r.const][d]&&bc(this.platformId)&&(this.reTree.test(this.userAgent,T_[_T])||"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1)?(s[vu[r.const][d]]=_T,Object):(s[vu[r.const][d]]=this.reTree.test(e,vu[`${r.const}_RE`][d]),s),{})}),i.forEach(r=>{this[r.prop]=Object.keys(vu[r.const]).map(s=>vu[r.const][s]).reduce((s,d)=>"device"===r.prop&&s===vu[r.const].ANDROID?this[r.prop][d]?d:s:s===vu[r.const].UNKNOWN&&this[r.prop][d]?d:s,vu[r.const].UNKNOWN)}),this.browser_version="0",this.browser!==fT.UNKNOWN){const s=this.reTree.exec(e,LB[this.browser]);s&&(this.browser_version=s[1])}this.orientation=typeof window<"u"&&window.matchMedia?window.matchMedia("(orientation: landscape)").matches?P0.Landscape:P0.Portrait:E_.UKNOWN,this.deviceType=this.isTablet()?rm.Tablet:this.isMobile(this.userAgent)?rm.Mobile:this.isDesktop(this.userAgent)?rm.Desktop:rm.Unknown}getDeviceInfo(){return{userAgent:this.userAgent,os:this.os,browser:this.browser,device:this.device,os_version:this.os_version,browser_version:this.browser_version,deviceType:this.deviceType,orientation:this.orientation}}isMobile(e=this.userAgent){return!this.isTablet(e)&&!!Object.keys(l1).find(r=>this.reTree.test(e,l1[r]))}isTablet(e=this.userAgent){return!(!bc(this.platformId)||!(this.reTree.test(this.userAgent,T_[_T])||typeof navigator<"u"&&"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1))||!!Object.keys(T_).find(r=>!!this.reTree.test(e,T_[r]))}isDesktop(e=this.userAgent){return(this.device!==ap.UNKNOWN||!this.isMobile(e)&&!this.isTablet(e))&&OB.indexOf(this.device)>-1}}return t.\u0275fac=function(e){return new(e||t)(we(zs))},t.\u0275prov=rt({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();class lp{constructor(n,e){this.http=n,this.wrappers=e,this.CUSTOM_MAP_URL="https://custommap-api.mytopo.com/api/CustomMapDetails/"}postCustomMapDetails(n,e){const i=new oo({Authorization:"Bearer "+e,"Content-Type":"application/json"});return this.http.post(this.CUSTOM_MAP_URL+"Post",n,{headers:i}).pipe(Jt(()=>!0))}getCustomMapDetails(n,e,i,r,s){const d={headers:new oo({Authorization:"Bearer "+s})};return this.http.get(this.CUSTOM_MAP_URL+"Get?query="+this.wrappers.EncodeParam(n.toString())+"&index="+e+"&size="+i+"&printed="+r,d).pipe(Jt(_=>_))}getTotalCustomMap(n,e,i){const r={headers:new oo({Authorization:"Bearer "+i})};return this.http.get(this.CUSTOM_MAP_URL+"GetTotalCustomMap?query="+n+"&printed="+e,r).pipe(Jt(s=>s))}putCustomMapDetails(n,e){const i=new oo({Authorization:"Bearer "+e,"Content-Type":"application/json"});return this.http.put(this.CUSTOM_MAP_URL+"Update",n,{headers:i}).pipe(Jt(()=>!0))}}lp.\u0275fac=function(n){return new(n||lp)(we(Ka),we(Od))},lp.\u0275prov=rt({token:lp,factory:lp.\u0275fac,providedIn:"root"});class om{constructor(n,e){this.http=n,this.wrappers=e}mapbox(n,e){return this.http.get(ao_mapbox_reverseGeocoderUrl+n+","+e+".json?access_token="+ao_mapbox_accessToken).pipe(Jt(r=>r))}}om.\u0275fac=function(n){return new(n||om)(we(Ka),we(Od))},om.\u0275prov=rt({token:om,factory:om.\u0275fac,providedIn:"root"});const IJ=["stepper"];function kJ(t,n){if(1&t&&(se(0,"div",8)(1,"div",9)(2,"div",10)(3,"div",11)(4,"span",12),Ze(5,"Loading..."),he()()(),se(6,"div",13)(7,"strong"),Ze(8),he()()()()),2&t){const e=Et();Se(8),Wr(e.loadingMsg)}}function RJ(t,n){1&t&&(se(0,"mat-label",52)(1,"b"),Ze(2,"We encountered an error creating your preview. Please try your preview again. If you continue to encounter this error please email support@mytopo.com and we'll do our best to get the problem fixed."),he()())}function PJ(t,n){1&t&&Ze(0,"Map Title, Type and Scale")}function OJ(t,n){1&t&&(se(0,"mat-error")(1,"b"),Ze(2,"Please enter a name for your map that can be used to identify its contents."),he()())}function FJ(t,n){1&t&&(se(0,"mat-radio-button",53)(1,"div",26),ut(2,"img",54),se(3,"span"),Ze(4,"Standard Aerial Photo"),he()()())}function LJ(t,n){if(1&t&&(se(0,"span"),Ze(1),he()),2&t){const e=Et(4);Se(1),no('(most popular scale: 1" of map = ',e.mapScaleDefaultTxt," ft.)")}}function BJ(t,n){if(1&t&&(se(0,"mat-option",56),Ze(1),Mt(2,LJ,2,1,"span",22),he()),2&t){const e=Et().$implicit;Ae("value",e.value),Se(1),no(" ",e.text," "),Se(1),Ae("ngIf",e.isDefault)}}function NJ(t,n){if(1&t&&(Li(0),Mt(1,BJ,3,3,"mat-option",55),Bi()),2&t){const e=n.$implicit;Se(1),Ae("ngIf",!e.hide)}}function zJ(t,n){1&t&&Ze(0,"Map Grids")}function VJ(t,n){1&t&&Ze(0,"Paper Size, Format and Special Instructions")}function GJ(t,n){if(1&t){const e=wi();se(0,"mat-radio-button",57),Nt("change",function(){const s=Wn(e).$implicit;return qn(Et(2).paperSizeSelected(s.value))}),Ze(1),he()}if(2&t){const e=n.$implicit;Ae("value",e.value),Se(1),Tx(" ",e.text,"$",e.price," ")}}function UJ(t,n){if(1&t){const e=wi();se(0,"section",14),Mt(1,RJ,3,0,"mat-label",15),se(2,"h3"),Ze(3,"Please provide the following details to create your custom map. "),he(),se(4,"mat-vertical-stepper",16,17)(6,"mat-step",18)(7,"form",19),Mt(8,PJ,1,0,"ng-template",20),se(9,"mat-form-field")(10,"mat-label"),Ze(11,"Title"),he(),se(12,"input",21),Nt("blur",function(r){return Wn(e),qn(Et().onBlurInput(r))})("ngModelChange",function(r){return Wn(e),qn(Et().customMapInfoObj.title=r)}),he(),se(13,"mat-hint"),Ze(14,"Special characters & and + are not allowed."),he(),Mt(15,OJ,3,0,"mat-error",22),he(),ut(16,"br"),se(17,"mat-form-field")(18,"mat-label"),Ze(19,"Owner's Name"),he(),se(20,"input",23),Nt("ngModelChange",function(r){return Wn(e),qn(Et().customMapInfoObj.owner_name=r)})("blur",function(r){return Wn(e),qn(Et().onBlurInput(r))}),he(),se(21,"mat-hint"),Ze(22,"Special characters & and + are not allowed."),he()(),ut(23,"br")(24,"br"),se(25,"mat-label")(26,"b"),Ze(27,"Map Type"),he()(),ut(28,"br"),se(29,"mat-radio-group",24),Nt("ngModelChange",function(r){return Wn(e),qn(Et().customMapInfoObj.map_type=r)})("change",function(r){return Wn(e),qn(Et().mapTypeselected(r))}),se(30,"mat-radio-button",25)(31,"div",26),ut(32,"img",27),se(33,"span"),Ze(34,"USGS Topographic"),he()()(),ut(35,"br"),se(36,"mat-radio-button",28)(37,"div",26),ut(38,"img",29),Ze(39," USGS Topographic with Enhanced Relief Shading "),he()(),ut(40,"br"),Mt(41,FJ,5,0,"mat-radio-button",30),ut(42,"br"),he(),ut(43,"br"),se(44,"mat-form-field")(45,"mat-label"),Ze(46,"Scale"),he(),se(47,"mat-select",31),Nt("ngModelChange",function(r){return Wn(e),qn(Et().customMapInfoObj.map_scale=r)}),Mt(48,NJ,2,1,"ng-container",32),he()(),ut(49,"br"),se(50,"mat-form-field")(51,"mat-label"),Ze(52,"Latitude"),he(),se(53,"input",33),Nt("ngModelChange",function(r){return Wn(e),qn(Et().customMapInfoObj.latitude=r)}),he()(),ut(54,"br"),se(55,"mat-form-field")(56,"mat-label"),Ze(57,"Longitude"),he(),se(58,"input",34),Nt("ngModelChange",function(r){return Wn(e),qn(Et().customMapInfoObj.longitude=r)}),he()(),ut(59,"br"),se(60,"div")(61,"button",35),Ze(62,"Next"),he()()()(),se(63,"mat-step",18)(64,"form",19),Mt(65,zJ,1,0,"ng-template",20),se(66,"mat-label"),Ze(67,"Latitude/Longitude Coordinate Grid"),he(),ut(68,"br"),se(69,"mat-radio-group",36),Nt("ngModelChange",function(r){return Wn(e),qn(Et().customMapInfoObj.ll_coordinate_grid=r)}),se(70,"mat-radio-button",37),Ze(71,"No Grid"),he(),ut(72,"br"),se(73,"mat-radio-button",38),Ze(74,"Place lat/lon tic marks at regular intervals along the map edge "),he(),ut(75,"br"),se(76,"mat-radio-button",39),Ze(77,"Place full lat/lon grid lines over the map area"),he(),ut(78,"br"),he(),ut(79,"br"),se(80,"mat-label"),Ze(81,"Include a UTM / MGRS (Military Grid) / USNG (US National Grid)?"),he(),ut(82,"br"),se(83,"mat-radio-group",40),Nt("ngModelChange",function(r){return Wn(e),qn(Et().customMapInfoObj.other_coordinate_grid=r)}),se(84,"mat-radio-button",37),Ze(85,"No Grid"),he(),ut(86,"br"),se(87,"mat-radio-button",38),Ze(88,"Place UTM/MGRS/USNG tic marks at regular intervals along the map edge "),he(),ut(89,"br"),se(90,"mat-radio-button",39),Ze(91,"Place full UTM/MGRS/USNG grid lines over the map area"),he(),ut(92,"br"),he(),ut(93,"br"),se(94,"div")(95,"button",35),Ze(96,"Next"),he()()()(),se(97,"mat-step",18)(98,"form",19),Mt(99,VJ,1,0,"ng-template",20),se(100,"mat-label"),Ze(101,"We use waterproof tear-resistant paper on all maps."),ut(102,"br"),Ze(103," What paper orientation do you want? "),ut(104,"br"),he(),ut(105,"br"),se(106,"mat-radio-group",41),Nt("ngModelChange",function(r){return Wn(e),qn(Et().customMapInfoObj.orientation=r)}),se(107,"mat-radio-button",42),Ze(108,"Portrait"),he(),se(109,"mat-radio-button",43),Ze(110,"Landscape"),he()(),ut(111,"br"),se(112,"mat-label"),Ze(113,"What size paper do you want your map printed on? "),se(114,"h6",44)(115,"i"),Ze(116,"Prices shown are for topographic maps; aerial orthophotos are more expensive."),he()()(),ut(117,"br"),se(118,"mat-radio-group",45),Nt("ngModelChange",function(r){return Wn(e),qn(Et().customMapInfoObj.paper_size=r)}),Mt(119,GJ,2,3,"mat-radio-button",46),ut(120,"br"),he(),ut(121,"br"),se(122,"mat-label"),Ze(123,"How would you like your map formatted?"),ut(124,"br"),he(),ut(125,"br"),se(126,"mat-radio-group",47),Nt("ngModelChange",function(r){return Wn(e),qn(Et().customMapInfoObj.map_format=r)}),se(127,"mat-radio-button",48),Ze(128,"Rolled - No additional charge"),he(),ut(129,"br"),se(130,"mat-radio-button",49),Ze(131,"Folded - No additional charge"),he(),ut(132,"br"),se(133,"mat-radio-button",43),Ze(134),se(135,"h6",44)(136,"i"),Ze(137,"Lamination is necessary for using a dry-erase marker or grease pen for annotating maps."),he()()()(),ut(138,"br")(139,"br"),se(140,"div")(141,"button",50),Nt("click",function(){return Wn(e),qn(Et().reset())}),Ze(142,"Reset"),he(),se(143,"button",51),Nt("click",function(){return Wn(e),qn(Et().generate_preview())}),Ze(144,"Preview"),he()()()()()()}if(2&t){const e=Et();Se(1),Ae("ngIf",e.previewError),Se(3),Ae("linear",e.isLinear),Se(2),Ae("stepControl",e.firstFormGroup),Se(1),Ae("formGroup",e.firstFormGroup),Se(5),Ae("ngModel",e.customMapInfoObj.title),Se(3),Ae("ngIf",e.firstFormGroup.get("title").hasError("required")),Se(5),Ae("ngModel",e.customMapInfoObj.owner_name),Se(9),Ae("ngModel",e.customMapInfoObj.map_type),Se(12),Ae("ngIf",e.show_Aerial_MapTypeOption),Se(6),Ae("ngModel",e.customMapInfoObj.map_scale),Se(1),Ae("ngForOf",e.scaleMapList),Se(5),Ae("ngModel",e.customMapInfoObj.latitude),Se(5),Ae("ngModel",e.customMapInfoObj.longitude),Se(5),Ae("stepControl",e.secondFormGroup),Se(1),Ae("formGroup",e.secondFormGroup),Se(5),Ae("ngModel",e.customMapInfoObj.ll_coordinate_grid),Se(14),Ae("ngModel",e.customMapInfoObj.other_coordinate_grid),Se(14),Ae("stepControl",e.thirdFormGroup),Se(1),Ae("formGroup",e.thirdFormGroup),Se(8),Ae("ngModel",e.customMapInfoObj.orientation),Se(12),Ae("ngModel",e.customMapInfoObj.paper_size),Se(1),Ae("ngForOf",e.paperSizeList),Se(7),Ae("ngModel",e.customMapInfoObj.map_format),Se(8),no("Rolled and Laminated - ",e.paperFormatPricing," additional charge ")}}function jJ(t,n){if(1&t){const e=wi();se(0,"div",70),Nt("click",function(){return Wn(e),qn(Et(2).showBigImg(!1))}),se(1,"div",71)(2,"button",72),Nt("click",function(){return Wn(e),qn(Et(2).showBigImg(!1))}),se(3,"mat-icon",73),Ze(4,"close"),he()(),ut(5,"img",74),he()()}if(2&t){const e=Et(2);Se(5),Ae("src",e.previewsURL,Th)}}function HJ(t,n){1&t&&Ze(0,"Contact Information")}function $J(t,n){if(1&t&&(se(0,"div",75)(1,"div",9),ut(2,"div",11),se(3,"div",13)(4,"strong"),Ze(5),he()()()()),2&t){const e=Et(2);Se(5),Wr(e.loadingMsg)}}const WJ=function(){return[]};function qJ(t,n){if(1&t){const e=wi();se(0,"div",58)(1,"div",59)(2,"div")(3,"table",60)(4,"tr")(5,"td")(6,"b"),Ze(7,"Map Scale:"),he()(),se(8,"td"),Ze(9),Df(10,"number"),he()(),se(11,"tr")(12,"td")(13,"b"),Ze(14,"Area:"),he()(),se(15,"td"),Ze(16),Df(17,"number"),Df(18,"number"),he()(),se(19,"tr")(20,"td")(21,"b"),Ze(22,"Area Width:"),he()(),se(23,"td"),Ze(24),Df(25,"number"),he()(),se(26,"tr")(27,"td")(28,"b"),Ze(29,"Area Height:"),he()(),se(30,"td"),Ze(31),Df(32,"number"),he()()()(),Mt(33,jJ,6,1,"div",61),se(34,"a",62),Nt("click",function(){return Wn(e),qn(Et().showBigImg(!0))}),ut(35,"img",63),he()(),se(36,"form",19),Mt(37,HJ,1,0,"ng-template"),se(38,"mat-form-field")(39,"mat-label"),Ze(40,"Name"),he(),se(41,"input",64),Nt("ngModelChange",function(r){return Wn(e),qn(Et().customMapInfoObj.name=r)}),he()(),ut(42,"br"),se(43,"mat-form-field")(44,"mat-label"),Ze(45,"Email"),he(),se(46,"input",65),Nt("ngModelChange",function(r){return Wn(e),qn(Et().customMapInfoObj.email_id=r)}),he()(),ut(47,"br"),se(48,"mat-form-field")(49,"mat-label"),Ze(50,"Phone Number"),he(),se(51,"input",66),Nt("ngModelChange",function(r){return Wn(e),qn(Et().customMapInfoObj.contact_number=r)})("input",function(r){return Wn(e),qn(Et().addHyphen(r.target.value))}),he()()(),se(52,"footer",67)(53,"mat-label")(54,"b"),Ze(55,"Are you ready to purchase?"),he(),ut(56,"br"),Ze(57," Press Purchase Map to place your order. We'll print your map exactly as it appears here, and ship it to you quickly (usually within 24 hours). "),ut(58,"br"),se(59,"b"),Ze(60,"Want to make changes?"),he(),ut(61,"br"),Ze(62,"Press Revise Map to adjust the scale to show more or less area. If a new center point is desired, press Cancel, reposition the map, then select Custom Map to restart the preview process. "),ut(63,"br"),se(64,"b"),Ze(65,"Questions or unsure?"),he(),ut(66,"br"),Ze(67," Press Consult with Mapmaker to schedule an online map session with one of our specialists. We'll take the work you've done and revise it with you to be sure you get the perfect map! "),ut(68,"br")(69,"br"),he(),se(70,"button",51),Nt("click",function(){return Wn(e),qn(Et().showFormSection())}),Ze(71,"Revise Map"),he(),se(72,"button",51),Nt("click",function(){return Wn(e),qn(Et().closeModal())}),Ze(73,"Cancel"),he(),se(74,"button",51),Nt("click",function(){return Wn(e),qn(Et().submit())}),Ze(75,"Consult with Mapmaker "),se(76,"mat-icon"),Ze(77," arrow_forward_ios"),he()(),se(78,"button",68),Nt("click",function(){return Wn(e),qn(Et().purchaseCustomMap())}),Ze(79,"Purchase Map "),se(80,"mat-icon"),Ze(81," arrow_forward_ios"),he()()(),Mt(82,$J,6,1,"div",69),he()}if(2&t){const e=Et();Se(9),no("1 inch = ",zg(10,17,e.reportMapScale,"1.0-1")," feet"),Se(7),Tx("",zg(17,20,e.reportMapSqMiles,"1.0-1")," sq mi (",zg(18,23,e.reportMapAcres,"1.0-1")," acres)"),Se(8),no("",zg(25,26,e.reportMapWidth,"1.0-1")," Miles"),Se(7),no("",zg(32,29,e.reportMapHeight,"2.0-1")," Miles"),Se(2),Ae("ngIf",e.previewBigImg),Se(1),Ae("routerLink",RM(32,WJ)),Se(1),function eA(t,n,e,i,r){mc(kr,lu,ln(Dt(),t,n,e,i,r),!0)}("imgPreviewOrientation",e.customMapInfoObj.orientation,"",e.isMobileDevice?"Mobile":"",""),Ae("src",e.previewsURL,Th),Se(1),Ae("formGroup",e.fourthFormGroup),Se(5),Ae("ngModel",e.customMapInfoObj.name),Se(5),Ae("ngModel",e.customMapInfoObj.email_id),Se(5),Ae("ngModel",e.customMapInfoObj.contact_number),Se(31),Ae("ngIf",e.showSpinner)}}var XJ=new(Je(3740));class A_{constructor(n,e,i,r,s,d,_,w,S,I,L,H){this._formBuilder=n,this._snackBar=e,this.httpClient=i,this.sharedService=r,this.getAuthTokenService=s,this.previewService=d,this.deviceService=_,this.customMapService=w,this.mapboxService=S,this.dialogRef=I,this.dialog=L,this.mapDetails=H,this.isLinear=!0,this.show_Aerial_MapTypeOption=!0,this.inputValueChange=new In,this.paperFormatPricing="$15",this.isLoading=!1,this.showSpinner=!1,this.loadingMsg="Processing map preview. Please be patient.",this.pattern="^\\+?\\(?([0-9]{3})\\)?[-. ]?([0-9]{3})[-. ]?([0-9]{4})$",this.previewsURL="",this.previewError=!1,this.showPreview=!1,this.showPreviewForm=!0,this.previewBigImg=!1,this.isMobileDevice=!1,this.purchase_custom_map_link=".",this.title="Set up MyTopo Custom Map",this.mapScaleDefaultTxt="2000",this.assign_defaults()}assign_defaults(){this.customMapInfoObj={name:"",email_id:"",contact_number:"",latitude:this.mapDetails.lat,longitude:this.mapDetails.lng,title:"",owner_name:"",map_type:"topo",map_scale:"24",ll_coordinate_grid:"1",other_coordinate_grid:"0",orientation:"P",paper_size:"M",map_format:"R",isPrinted:!1}}ngOnInit(){this.isMobileDevice=this.deviceService.isMobile(),this.scaleMapList=[{value:"10",text:"1:10,000",hide:!1,isDefault:!1},{value:"12.5",text:"1:12,500",hide:!1,isDefault:!1},{value:"15",text:"1:15,000",hide:!1,isDefault:!1},{value:"20",text:"1:20,000",hide:!1,isDefault:!1},{value:"24",text:"1:24,000",hide:!1,isDefault:!0},{value:"25",text:"1:25,000",hide:!1,isDefault:!1},{value:"30",text:"1:30,000",hide:!1,isDefault:!1},{value:"35",text:"1:35,000",hide:!1,isDefault:!1},{value:"50",text:"1:50,000",hide:!1,isDefault:!1}],this.mapScaleFilter(this.customMapInfoObj.map_type),this.paperSizeList=[{value:"S",text:'18" x 24" - ',price:"22.95"},{value:"M",text:'24" x 36" - ',price:"26.95"},{value:"L",text:'36" x 48" - ',price:"39.95"}],"satellite"==this.mapDetails.maptype&&(this.customMapInfoObj.map_type="Aerial"),this.fourthFormGroup=this._formBuilder.group({name:["",so.required],email:["",[so.required,so.email]],phonenumber:["",[so.required,so.pattern(this.pattern)]]}),this.firstFormGroup=this._formBuilder.group({latitude:new HO({value:this.mapDetails.lat,disabled:!0},so.required),longitude:new HO({value:this.mapDetails.lng,disabled:!0},so.required),title:["",so.required],ownersname:["",so.nullValidator],mapscale:["",so.required],maptype:["",so.required]}),this.secondFormGroup=this._formBuilder.group({llcoordinates:["",so.required],othercoordinates:["",so.required]}),this.thirdFormGroup=this._formBuilder.group({orientation:["",so.required],papersize:["",so.required],paperformat:["",so.required],instructions:["",so.nullValidator]})}mapScaleFilter(n){this.show_Aerial_MapTypeOption=!0,Ra(this.mapboxService.mapbox(this.customMapInfoObj.longitude,this.customMapInfoObj.latitude)).then(e=>{0!=e.features.length&&(this.customMapInfoObj.title=""!=this.customMapInfoObj.title?this.customMapInfoObj.title:e.features[0].text,e.features.forEach(i=>{i.id.includes("region")&&(i.place_name.toLowerCase().includes("united states")?i.place_name.toLowerCase().includes("alaska")?(this.show_Aerial_MapTypeOption=!1,("topo"==n||"topohs"==n)&&(this.scaleMapList.forEach(r=>{"50"==r.value?(r.isDefault=!0,this.mapScaleDefaultTxt="4166"):r.isDefault=!1,r.hide="35"!=r.value&&"50"!=r.value}),this.customMapInfoObj.map_scale="50")):(this.show_Aerial_MapTypeOption=!0,"topo"==n||"topohs"==n?(this.scaleMapList.forEach(r=>{"24"==r.value?(r.isDefault=!0,this.mapScaleDefaultTxt="2000"):r.isDefault=!1}),this.customMapInfoObj.map_scale="24"):(this.scaleMapList.forEach(r=>{"10"==r.value?(r.isDefault=!0,this.mapScaleDefaultTxt="833"):r.isDefault=!1,r.hide="10"!=r.value&&"12.5"!=r.value&&"15"!=r.value&&"20"!=r.value&&"24"!=r.value&&"25"!=r.value}),this.customMapInfoObj.map_scale="10")):i.place_name.toLowerCase().includes("canada")&&(this.show_Aerial_MapTypeOption=!1,("topo"==n||"topohs"==n)&&(this.scaleMapList.forEach(r=>{"50"==r.value?(r.isDefault=!0,this.mapScaleDefaultTxt="4166"):r.isDefault=!1,r.hide="35"!=r.value&&"50"!=r.value}),this.customMapInfoObj.map_scale="50")))}))})}paperSizeSelected(n){this.paperFormatPricing="S"==n?"$10":"M"==n?"$15":"$20"}mapTypeselected(n){this.paperSizeList.forEach("Aerial"==n.value?e=>{e.price="S"==e.value?"32.95":"M"==e.value?"42.95":"62.95"}:e=>{e.price="S"==e.value?"22.95":"M"==e.value?"26.95":"39.95"}),this.mapScaleFilter(n.value)}showFormSection(){this.showPreview=!1,this.isLoading=!1,this.showPreviewForm=!0,this.title="Set up MyTopo Custom Map"}reset(){this.assign_defaults(),this.stepper.selectedIndex=0}submit(){this.insertCustomMapDetails("https://mapstore.mytopo.com/products/schedule-appointment")}purchaseCustomMap(){if("VALID"==this.firstFormGroup.status&&"VALID"==this.secondFormGroup.status&&"VALID"==this.thirdFormGroup.status&&"VALID"==this.fourthFormGroup.status){this.scaleMapList.forEach(w=>{w.value==this.customMapInfoObj.map_scale&&(this.scaleVal=w.text.substring(0,8))}),this.paperSizeList.forEach(w=>{w.value==this.customMapInfoObj.paper_size&&(this.PaperSizeVal=w.text.toString())});var n=this.customMapInfoObj.map_type,e=this.customMapInfoObj.ll_coordinate_grid,i=this.customMapInfoObj.other_coordinate_grid,r=this.customMapInfoObj.orientation,s=this.customMapInfoObj.map_format,d="
Please confirm that you wish to order one or more copies of the following MyTopo Custom Map:
";d=(d=(d=(d=(d=(d=(d=(d=(d=d+"Title: "+this.customMapInfoObj.title.replace(/[&+]/gi," "))+"
Owner: "+this.customMapInfoObj.owner_name)+"
Map Scale: "+this.scaleVal)+"
Map Type: "+("topo"==n?"USGS Topographic":"naip"==n?"Standard Aerial Photo":"USGS Topographic with Enhanced Relief Shading"))+"
Lat/Lon Grids: "+("0"==e?"No Grid":"1"==e?"Tic Marks":"Full Gridlines"))+"
UTM/MGRS/USNG Grids: "+("0"==i?"No Grid":"1"==i?"Tic Marks":"Full Gridlines"))+"
Paper Size: "+this.PaperSizeVal.replace(/[-]/gi," "))+"
Orientation: "+("L"==r?"Landscape":"Potrait"))+"
Format: "+("L"==s?"Rolled and Laminated":"R"==s?"Rolled":"Folded"),this.dialog.open(k0,{width:"550px",panelClass:["confirmationDialog"],data:d+="

The exact map you will receive was shown in the Preview.
This Preview will no longer appear once the map is ready to be placed in your shopping cart. If you are unsure, press Return to Preview to verify this map will meet your expectations before finalizing your order on the MyTopo Map Store.

This map is NOT in your Shopping Cart.
Add the map to your shopping cart on the next page. You may elect to order multiple copies of this map on the next page.

Need additional maps?
Proceed with the order, place this map in your shopping cart, then return to the Find Your Map search page to create another map. If you do not add this map to the shopping cart, it will be discarded. Custom maps can also be combined with our selection of pre-made maps in the same order.

Are you sure you wish to order this map and agree to add at least one copy of this map your shopping cart on the following page?"}).afterClosed().subscribe(w=>{w&&this.insertCustomMapDetails(this.purchase_custom_map_link)})}else this.openSnackBar("ERROR: Please provide your contact information.","Close")}openSnackBar(n,e){this._snackBar.open(n,e,{duration:2e3})}onBlurInput(n){n.target.value=n.target.value.replace(/[&+]/gi," ")}insertCustomMapDetails(n){"VALID"==this.firstFormGroup.status&&"VALID"==this.secondFormGroup.status&&"VALID"==this.thirdFormGroup.status&&"VALID"==this.fourthFormGroup.status?(this.loadingMsg="Preparing to process your map order. Please be patient.",this.showSpinner=!0,Ra(this.getAuthTokenService.getAuthToken()).then(e=>{null!=e&&(this.latest_token=e.access_token.toString(),this.customMapInfoObj.title=this.customMapInfoObj.title.replace(/[&+]/gi," "),this.customMapInfoObj.owner_name=this.customMapInfoObj.owner_name.replace(/[&+]/gi," "),Ra(this.customMapService.postCustomMapDetails(this.customMapInfoObj,this.latest_token)).then(i=>{null!=i&&1==i?window.location.href=n:this.openSnackBar("ERROR: Please provide your contact information.","Close")}))})):this.openSnackBar("ERROR: Please provide your contact information.","Close")}closeModal(){this.dialogRef.close()}showBigImg(n){this.previewBigImg=!!n}getPreviewObj(){var n=XJ.convertLatLngToUtm(this.mapDetails.lat,this.mapDetails.lng,0);this.previewsObj={CFID:"",CreateTime:"",PreviewType:"R",Email:"",MapSource:this.customMapInfoObj.map_type,MapType:"E",MapSize:this.customMapInfoObj.paper_size,Orientation:this.customMapInfoObj.orientation,PrintScale:this.customMapInfoObj.map_scale,SourceScale:"24",Datum:"NAD83",Zone:n.ZoneNumber.toString(),Easting:n.Easting.toString(),Northing:n.Northing.toString(),Title:this.customMapInfoObj.title.replace(/&/gi,"+"),Subtitle:null,Owner:this.customMapInfoObj.owner_name.replace(/&/gi,"+"),LatLon:this.customMapInfoObj.ll_coordinate_grid,UTM:this.customMapInfoObj.other_coordinate_grid,Mgrs:"2"==this.customMapInfoObj.other_coordinate_grid?"2":"0",Partner:null,anno_id:null,Status:"PROCESSING",System:"1"},this.checkIsAlaska(n)}checkIsAlaska(n){n.ZoneNumber<10&&n.Northing>5e6&&(this.previewsObj.SourceScale="63")}buildCustomMapUrl(){var n="L"==this.customMapInfoObj.map_format?"R_L":"F"==this.customMapInfoObj.map_format?"F_E":"R_E",e=this.previewsObj.MapSource+"_";e+=this.previewsObj.PrintScale.replace("12.5","12-5"),this.purchase_custom_map_link="https://mapstore.mytopo.com/products/"+(e=(e=(e=(e=(e=e+"_"+this.previewsObj.LatLon)+"_"+this.previewsObj.UTM)+"_"+this.previewsObj.Orientation)+"_"+this.previewsObj.MapSize)+"_"+n)}generate_preview(){this.showPreviewForm=!1,this.isLoading=!0,this.previewError=!1,this.getPreviewObj(),Ra(this.getAuthTokenService.getAuthToken().pipe(pT(5e3))).then(n=>{null!=n&&(this.latest_token=n.access_token.toString(),this.previewService.postPreviewData(this.previewsObj,this.latest_token).pipe(pT(3e4)).subscribe({next:e=>{null!=e&&(this.previewsObj.PreviewID=e,this.previewService.triggerPreviewGeneration(this.previewsObj.PreviewID,this.latest_token).subscribe({next:i=>{if(200!=i)this.showPreviewError();else{var r=!1;const s=setInterval(()=>{r?clearInterval(s):Ra(this.previewService.getPreviewStatus(this.previewsObj.PreviewID,this.latest_token).pipe(pT(5e3))).then(d=>{null!=d&&"COMPLETE"==d.Status.toUpperCase()?(this.previewsObj.Status=d.Status,this.previewsURL="https://previews.mytopo.com/output/"+this.previewsObj.PreviewID+".jpg",this.httpClient.get("assets/Previews/Previews.json").subscribe(_=>{"P"==this.previewsObj.Orientation?(this.reportMapWidth=_[this.previewsObj.MapSize].mapWidth,this.reportMapHeight=_[this.previewsObj.MapSize].mapHeight):(this.reportMapWidth=_[this.previewsObj.MapSize].mapHeight,this.reportMapHeight=_[this.previewsObj.MapSize].mapWidth),this.reportMapWidth=this.reportMapWidth*Number(this.previewsObj.PrintScale)*1e3/63360,this.reportMapHeight=this.reportMapHeight*Number(this.previewsObj.PrintScale)*1e3/63360,this.reportMapSqMiles=this.reportMapWidth*this.reportMapHeight,this.reportMapAcres=640*this.reportMapSqMiles,this.reportMapScale=1e3*Number(this.previewsObj.PrintScale)/12}),this.showPreview=!0,this.title="Preview of your custom map",this.isLoading=!1,r=!0,this.buildCustomMapUrl(),this.sharedService.scrollToTop()):null!=d&&"ERROR"==d.Status.toUpperCase()&&(clearInterval(s),this.showPreviewError())})},3e3)}},error:i=>{this.showPreviewError()}}))},error:e=>{e instanceof PB?(this.showPreviewError(),console.log("timed out")):console.log(e)}}))})}showPreviewError(){this.previewError=!0,this.isLoading=!1,this.previewsURL="",this.showPreview=!1,this.showPreviewForm=!0}addHyphen(n){n=n.replace(/^(\d{3})(\d{3})(\d{4})/,"$1-$2-$3"),this.customMapInfoObj.contact_number=n}}function zB(t,n){return function(e,i){n(e,i,t)}}A_.\u0275fac=function(n){return new(n||A_)(z(p2),z(IB),z(Ka),z(Sc),z(yu),z(im),z(BB),z(lp),z(om),z(T0),z(nm),z(qE))},A_.\u0275cmp=Rn({type:A_,selectors:[["app-custom-map-dialog"]],viewQuery:function(n,e){if(1&n&&Yi(IJ,5),2&n){let i;fn(i=mn())&&(e.stepper=i.first)}},decls:10,vars:5,consts:[["id","modal-content-wrapper",1,"customMapDialog"],["mat-icon-button","","id","x",1,"close-button",3,"mat-dialog-close","click"],["color","warn",1,"close-icon"],["id","modal-header"],["id","modal-title"],["id","backdrop","class","popup-content",4,"ngIf"],["id","modal-body","class","popup-content",4,"ngIf"],["id","previewWindow","class","popup-content",4,"ngIf"],["id","backdrop",1,"popup-content"],[1,"spinner-div"],[1,""],["role","status",1,"spinner-border"],[1,"sr-only"],[1,"",2,"text-align","center","margin-top","10px"],["id","modal-body",1,"popup-content"],["id","previewErr",4,"ngIf"],[3,"linear"],["stepper",""],[3,"stepControl"],[3,"formGroup"],["matStepLabel",""],["matInput","","placeholder","Please enter a title for your map","formControlName","title","maxlength","25","onkeypress","return String.fromCharCode(event.charCode).match(/[&+]/g) === null",3,"ngModel","blur","ngModelChange"],[4,"ngIf"],["matInput","","placeholder","Owner's Name","formControlName","ownersname","maxlength","25","onkeypress","return String.fromCharCode(event.charCode).match(/[&+]/g) === null",3,"ngModel","ngModelChange","blur"],["aria-label","Select an option","formControlName","maptype",3,"ngModel","ngModelChange","change"],["value","topo"],[1,"mapTypeOption"],["alt","USGSTopo","src","../../../assets/Layers/USGS_Topo.png",1,"MapTypeImg"],["value","topohs"],["alt","USGSTopoEnhanced","src","../../../assets/Layers/Shaded_USGS_Topo.png",1,"MapTypeImg"],["value","naip",4,"ngIf"],["formControlName","mapscale","required","",3,"ngModel","ngModelChange"],[4,"ngFor","ngForOf"],["matInput","","placeholder","Latitude","formControlName","latitude","readonly","",3,"ngModel","ngModelChange"],["matInput","","placeholder","Longitude","formControlName","longitude","readonly","",3,"ngModel","ngModelChange"],["mat-button","","matStepperNext",""],["aria-label","Select an option","formControlName","llcoordinates",3,"ngModel","ngModelChange"],["value","0"],["value","1"],["value","2"],["aria-label","Select an option","formControlName","othercoordinates",3,"ngModel","ngModelChange"],["aria-label","Select an option","formControlName","orientation",1,"radio-group",3,"ngModel","ngModelChange"],["value","P"],["value","L"],[2,"margin","0px","line-height","10px"],["aria-label","Select an option","formControlName","papersize",1,"radio-group",3,"ngModel","ngModelChange"],[3,"value","change",4,"ngFor","ngForOf"],["aria-label","Select an option","formControlName","paperformat",3,"ngModel","ngModelChange"],["value","R"],["value","F"],["mat-button","",3,"click"],["mat-raised-button","","id","modal-preview-button",3,"click"],["id","previewErr"],["value","naip"],["alt","Aerial","src","../../../assets/Layers/Aerial_Ortho.png",1,"MapTypeImg"],[3,"value",4,"ngIf"],[3,"value"],[3,"value","change"],["id","previewWindow",1,"popup-content"],[2,"text-align","center"],[2,"width","auto","text-align","left"],["id","overlay",3,"click",4,"ngIf"],[3,"routerLink","click"],["id","PreviewImg","alt","PreviewImg",3,"src"],["matInput","","placeholder","Name","formControlName","name","maxlength","25","required","",3,"ngModel","ngModelChange"],["matInput","","placeholder","Email","formControlName","email","maxlength","50","required","",3,"ngModel","ngModelChange"],["matInput","","placeholder","Phone Number","formControlName","phonenumber","maxlength","25","required","",3,"ngModel","ngModelChange","input"],["id","modal-footer"],["mat-raised-button","","id","modal-action-button",3,"click"],["class","whiteout",4,"ngIf"],["id","overlay",3,"click"],["id","overlayContent"],["mat-icon-button","",1,"close-preview-button",3,"click"],[1,"close-preview-icon"],["id","imgBig","alt","PreviewBigImg",3,"src"],[1,"whiteout"]],template:function(n,e){1&n&&(se(0,"div",0)(1,"button",1),Nt("click",function(){return e.closeModal()}),se(2,"mat-icon",2),Ze(3,"close"),he()(),se(4,"header",3)(5,"h1",4),Ze(6),he()(),Mt(7,kJ,9,1,"div",5),Mt(8,UJ,145,24,"section",6),Mt(9,qJ,83,33,"div",7),he()),2&n&&(Se(1),Ae("mat-dialog-close",!0),Se(5),Wr(e.title),Se(1),Ae("ngIf",e.isLoading),Se(1),Ae("ngIf",e.showPreviewForm),Se(1),Ae("ngIf",e.showPreview))},dependencies:[$g,Ya,kw,_2,y2,WD,d_,t0,LD,rC,QD,Td,em,Hf,iC,YX,jE,JX,NC,RL,ID,BL,ZE,_B,JC,yB,wQ,wk],styles:["#modal-content-wrapper[_ngcontent-%COMP%]{width:100%;height:100%;position:relative}#PreviewImg[_ngcontent-%COMP%]{width:auto;height:auto;object-fit:fill}#modal-title[_ngcontent-%COMP%]{font-size:22px}#modal-footer[_ngcontent-%COMP%]{justify-self:center;align-self:center}#modal-action-button[_ngcontent-%COMP%]{background:#349C44;margin:12px}#previewErr[_ngcontent-%COMP%]{color:red}#modal-cancel-button[_ngcontent-%COMP%], #modal-preview-button[_ngcontent-%COMP%]{background-color:#4e4e4e;margin:12px} .mat-step-header .mat-step-icon{background-color:gray} #modal-content-wrapper .mat-button-wrapper{color:#fff!important} .customMapDialog .mat-button{background:grey!important;margin:12px}.MapTypeImg[_ngcontent-%COMP%]{width:30px;height:30px;object-fit:fill}.radio-group[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin:15px 0}.spinner-border[_ngcontent-%COMP%]{border:16px solid #f3f3f3;border-top:16px solid #3498db;width:120px;height:120px;margin:0;animation:_ngcontent-%COMP%_spin 2s linear infinite!important}@keyframes _ngcontent-%COMP%_spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.spinner-div[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-content:center;align-items:center;height:60vh;justify-content:center;position:absolute;height:200px;width:400px;margin:-100px 0 0 -200px;top:50%;left:50%}#backdrop[_ngcontent-%COMP%]{position:absolute;z-index:999;background-color:#d3d3d3}.disable-scrollbars[_ngcontent-%COMP%]{scrollbar-width:none;-ms-overflow-style:none}.disable-scrollbars[_ngcontent-%COMP%]::-webkit-scrollbar{width:0px;background:transparent}@media only screen and (max-width: 600px){mat-radio-button[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:60px}}#overlay[_ngcontent-%COMP%]{position:fixed;width:100%;height:100%;top:0;left:0;background-color:#00000080;filter:alpha(opacity=70)!important;display:block;z-index:100;overflow:scroll;padding:5%}#overlayContent[_ngcontent-%COMP%]{position:relative;text-align:center;display:block;z-index:100}#overlayContent[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{display:block;width:auto;height:auto;margin:auto}#modal-header[_ngcontent-%COMP%]{width:100%;height:50px}.customMapDialog[_ngcontent-%COMP%] .popup-content[_ngcontent-%COMP%]{width:100%;height:calc(100% - 50px);overflow:auto} .mat-step{margin:0 0 8px} .mat-vertical-content{padding:0 0 24px 24px} .mat-radio-label-content{white-space:normal} .mat-vertical-stepper-header{margin-bottom:8px;background-color:#d8e8e9} .mat-stepper-vertical-line:before{top:-8px!important;bottom:-8px!important} .mat-form-field{max-width:450px}.mapTypeOption[_ngcontent-%COMP%]{width:100%;display:flex;flex-wrap:nowrap;flex-direction:row;align-items:center}.mapTypeOption[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:30px;height:30px;margin-right:10px}.imgPreviewOrientationL[_ngcontent-%COMP%]{width:50vw!important}.imgPreviewOrientationP[_ngcontent-%COMP%]{width:50vh!important}.imgPreviewOrientationLMobile[_ngcontent-%COMP%], .imgPreviewOrientationPMobile[_ngcontent-%COMP%]{width:75vw!important}.whiteout[_ngcontent-%COMP%]{display:block;position:fixed;left:0;top:0;width:100%;height:100%;background-color:#ffffffe6}.radio-group[_ngcontent-%COMP%]{margin:0!important}.close-button[_ngcontent-%COMP%]{float:right;top:-24px;right:-24px}.close-preview-button[_ngcontent-%COMP%]{background-color:#4e4e4e}.close-icon[_ngcontent-%COMP%]{transition:1s ease-in-out;color:#000}close-preview-icon[_ngcontent-%COMP%]{transition:1s ease-in-out;color:#fff}.close-icon[_ngcontent-%COMP%]:hover{transform:rotate(180deg)} .icon-outside .close-button{float:right;top:-52px;right:-52px}#visor-video[_ngcontent-%COMP%]{height:500px}iframe[_ngcontent-%COMP%]{width:100%;height:100%}"]});let QJ=(()=>{let t=class{constructor(e,i){this.document=e,this.platformId=i,this.documentIsAccessible=bc(this.platformId)}check(e){return!!this.documentIsAccessible&&(e=encodeURIComponent(e),this.getCookieRegExp(e).test(this.document.cookie))}get(e){if(this.documentIsAccessible&&this.check(e)){e=encodeURIComponent(e);const r=this.getCookieRegExp(e).exec(this.document.cookie);return this.safeDecodeURIComponent(r[1])}return""}getAll(){if(!this.documentIsAccessible)return{};const e={},i=this.document;return i.cookie&&""!==i.cookie&&i.cookie.split(";").forEach(r=>{const[s,d]=r.split("=");e[this.safeDecodeURIComponent(s.replace(/^ /,""))]=this.safeDecodeURIComponent(d)}),e}set(e,i,r,s,d,_,w="Lax"){if(!this.documentIsAccessible)return;let S=encodeURIComponent(e)+"="+encodeURIComponent(i)+";";r&&(S+="number"==typeof r?"expires="+new Date((new Date).getTime()+1e3*r*60*60*24).toUTCString()+";":"expires="+r.toUTCString()+";"),s&&(S+="path="+s+";"),d&&(S+="domain="+d+";"),!1===_&&"None"===w&&(_=!0,console.warn(`[ngx-cookie-service] Cookie ${e} was forced with secure flag because sameSite=None.More details : https://github.com/stevermeister/ngx-cookie-service/issues/86#issuecomment-597720130`)),_&&(S+="secure;"),S+="sameSite="+w+";",this.document.cookie=S}delete(e,i,r,s,d="Lax"){this.documentIsAccessible&&this.set(e,"",new Date("Thu, 01 Jan 1970 00:00:01 GMT"),i,r,s,d)}deleteAll(e,i,r,s="Lax"){if(!this.documentIsAccessible)return;const d=this.getAll();for(const _ in d)d.hasOwnProperty(_)&&this.delete(_,e,i,r,s)}getCookieRegExp(e){const i=e.replace(/([\[\]\{\}\(\)\|\=\;\+\?\,\.\*\^\$])/gi,"\\$1");return new RegExp("(?:^"+i+"|;\\s*"+i+")=(.*?)(?:;|$)","g")}safeDecodeURIComponent(e){try{return decodeURIComponent(e)}catch{return e}}};return t.\u0275fac=function(e){return new(e||t)(we(Bn),we(zs))},t.\u0275prov=rt({factory:function(){return new t(we(Bn),we(zs))},token:t,providedIn:"root"}),t=function YJ(t,n,e,i){var d,r=arguments.length,s=r<3?n:null===i?i=Object.getOwnPropertyDescriptor(n,e):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,n,e,i);else for(var _=t.length-1;_>=0;_--)(d=t[_])&&(s=(r<3?d(s):r>3?d(n,e,s):d(n,e))||s);return r>3&&s&&Object.defineProperty(n,e,s),s}([zB(0,To(Bn)),zB(1,To(zs))],t),t})();class I_{constructor(n){this.http=n,this.GNIS_SERVER_URL="https://search-api.mytopo.com/api/gnis/gnisdetails/",this.NO_DATA_SERVER_URL="https://search-api.mytopo.com/api/AddNoRecordsFound/"}sendGetRequest(n,e){const i={headers:new oo({Authorization:"Bearer "+e})};return this.http.get(this.GNIS_SERVER_URL+n,i)}logNoDataRequest(n,e){const i={headers:new oo({Authorization:"Bearer "+e})};return this.http.post(this.NO_DATA_SERVER_URL+n,i)}}I_.\u0275fac=function(n){return new(n||I_)(we(Ka))},I_.\u0275prov=rt({token:I_,factory:I_.\u0275fac,providedIn:"root"});class k_{constructor(n){this.http=n,this.QUADSHEET_SERVICE_URL="https://quadsheet-api.mytopo.com/api/quadsheets/"}getQuadSheetRes(n,e,i){const r={headers:new oo({"Content-Type":"application/x-www-form-urlencoded",Authorization:"Bearer "+i})};return this.http.get(this.QUADSHEET_SERVICE_URL+n+"/"+e,r)}}k_.\u0275fac=function(n){return new(n||k_)(we(Ka))},k_.\u0275prov=rt({token:k_,factory:k_.\u0275fac,providedIn:"root"});class R_{constructor(n){this.http=n,this.SHOPIFY_LOOKUP_URL="https://shopifylookup-api.mytopo.com/api/GetShopifyURL/"}getShopifyLookupUrllist(n,e,i,r){const s={headers:new oo({Authorization:"Bearer "+r})};return this.http.get(this.SHOPIFY_LOOKUP_URL+n+"/"+e+"/"+i,s)}}R_.\u0275fac=function(n){return new(n||R_)(we(Ka))},R_.\u0275prov=rt({token:R_,factory:R_.\u0275fac,providedIn:"root"});const JJ=["mapElement"],eee=["geocoder"],tee=["coordinates"],nee=["SwitchMapTypes"];function iee(t,n){1&t&&(se(0,"div",46),Ze(1," No results found; please enter address, state (example: Acadia National Park, Maine)."),ut(2,"br"),Ze(3," If your address is missing from the search results, position the map window on the desired location; or call 877-587-9004 and we\u2019ll be happy to help. "),he())}function ree(t,n){1&t&&(se(0,"div"),ut(1,"div",2),he())}const GB=function(t){return{hidden:t}};function oee(t,n){if(1&t&&(se(0,"div",47),ut(1,"span",48),he()),2&t){const e=Et();Ae("ngClass",Ns(1,GB,!e.isMobilepanelOpen))}}function see(t,n){if(1&t&&(se(0,"span"),ut(1,"br"),Ze(2),he()),2&t){const e=Et().$implicit;Se(2),no("Map Date: ",e.year,"")}}function aee(t,n){if(1&t){const e=wi();se(0,"div",49)(1,"div",50)(2,"a",51),Nt("click",function(){const s=Wn(e).$implicit;return qn(Et().openModal(s.shopifY_URL))}),ut(3,"img",52),se(4,"p")(5,"b"),ut(6,"span",53),he(),Mt(7,see,3,1,"span",22),ut(8,"br")(9,"span",54)(10,"br")(11,"span",54),he()()()()}if(2&t){const e=n.$implicit,i=Et();Se(3),_d("alt",e.title),Ae("src",e.thumbnail,Th),Se(3),Ae("innerHTML",e.title,Qp),Se(1),Ae("ngIf",e.year),Se(2),_d("innerHTML",i.shopifyMapTypes[e.type].caption,Qp),Se(2),_d("innerHTML",i.shopifyMapTypes[e.type].description,Qp)}}const lee=function(t){return{bgDiv:!0,hideBgDiv:t}},cee=function(t){return{"mat-subheading-2 row justify-content-md-center":!0,hidden:t}},uee=function(t){return{rotateIcon:t,sidePanelToggle:!0,onlyMobile:!0}},dee=function(t){return{mapBoundary:!0,fullPage:t}},hee=function(t){return{"help-scrollTop":t}};let gn,pee=Je(8545);class Fd{constructor(n,e,i,r,s,d,_,w,S,I,L,H,Y,ae,ve,Be,$e){this.route=n,this.cookieService=e,this.geocoderServiceService=i,this.getAuthTokenService=r,this.GetQuadSheetResultService=s,this.PreviewService=d,this.ShopifyLookupService=_,this.elementRef=w,this.deviceService=S,this.cdr=I,this.globals=L,this.sharedService=H,this.mapboxService=Y,this.dialog=ae,this.matDialog=ve,this.document=Be,this.http=$e,this.linkBtnObj=new D_,this.searchLat="37.067163",this.searchLng="-95.637531",this.scrollCheck=0,this.load_map_collections=!1,this.timeout=null,this.timeout_panMap=null,this.inputValueChange=new In,this.showNoDataFoundText=!1,this.isFullScreen=!1,this.showMapLbl="Show Map",this.showMap=!1,this.shopifyMapTypes=[],this.showLoader=!1,this.isHideBgDiv=!1,this.isMobilepanelOpen=!1,this.isTouchEnabled=!1,this.dom=this.elementRef.nativeElement,this._jsonURL="assets/MapTypes/Shopify-map-types.json",gn=this,this.Maps_linkButtons=[],this.http.get(this._jsonURL).subscribe(It=>{this.shopifyMapTypes=It}),this.mapLayers={"usgs topo":{id:"mytopo",nextlayer:"Satellite"},satellite:{id:"satellite-v9",nextlayer:"Outdoor"},outdoor:{id:"outdoors-v11",nextlayer:"Street"},street:{id:"streets-v11",nextlayer:"USGS Topo"}},this._maptype="usgs topo",this.nextLayer=this.mapLayers["usgs topo"]}ngAfterViewInit(){this.load_map_collections=!0,this._mapRef=new sC.Map({container:this.mapElement.nativeElement,style:"mapbox://styles/mapbox/streets-v11",center:[-74.5,40],zoom:9}),this._mapRef.setCenter(new sC.LngLat(Number(this.searchLng),Number(this.searchLat))),this._mapRef.on("load",function(n){gn.loadMap()}),this.cdr.detectChanges()}ngOnInit(){this.route.queryParams.subscribe(n=>{const e={};for(const i in n)e[i.toLowerCase()]=n[i];""!=e.pid&&null!=e.pid&&(this.cookieService.set("pid",e.pid,1,"/",".mytopo.com",!1,"Lax"),this.queryParam_pid=e.pid),""!=e.maptype&&null!=e.maptype&&(gn.mapLayers.hasOwnProperty(e.maptype.toLowerCase())?(this.nextLayer=this.mapLayers[e.maptype.toLowerCase()],this._maptype=e.maptype.toLowerCase()):this._maptype="usgs topo"),""!=e.lat&&null!=e.lat&&""!=e.lon&&null!=e.lon&&(this.searchLat=e.lat,this.searchLng=e.lon,this.showMap=!0)}),this.queryParam_pid=this.queryParam_pid?"&pid="+this.queryParam_pid:"",(!localStorage.getItem("page-refresh")||"1"!=localStorage.getItem("page-refresh"))&&(this.sharedService.openDialog(),localStorage.setItem("page-refresh","1")),aC().accessToken=ao_mapbox_accessToken,window.matchMedia("(pointer: coarse)").matches&&(this.isTouchEnabled=!0)}openHelpDialog(){this.sharedService.openDialog()}loadMap(){this._mapRef.setCenter(new sC.LngLat(Number(this.searchLng),Number(this.searchLat))),this.switchMapStyle(this._maptype),this.loadSidePanelLinks(this.searchLat,this.searchLng),this._geoCoder=new pee({zoom:12,flyTo:!0,accessToken:ao_mapbox_accessToken,countries:"US,CA",limit:20,minLength:3,marker:!1,localGeocoder:this.search}),this.geocoderElement.nativeElement.appendChild(this._geoCoder.onAdd(this._mapRef)),this._mapRef.addControl(new mee(this._mapRef,this.coordinatesElement),"bottom-left"),this._mapRef.addControl(new(aC().FullscreenControl),"top-left"),this._mapRef.addControl(new(aC().NavigationControl),"top-left"),this._mapRef.addControl(new(aC().ScaleControl),"bottom-left"),this._mapRef.addControl(new fee(this._mapRef,this.switchMapTypesElement),"bottom-left"),this._geoCoder.on("result",n=>{if(null!=n){setTimeout(()=>{this._mapRef.flyTo({center:n.result.center,zoom:14,speed:6})},300);let i=n.result.place_name.replace("
",",");this._container.getElementsByTagName("input")[0].value=i;let r=i.split(",");if("united states"==r[r.length-1].trim().toLowerCase()){let d=r[r.length-2].trim().replace(/\s/g,"");/\d/.test(d)&&(d=d.replace(/[0-9]/g,"").trim()),this.searchStateId=a1[d]}this.deviceService.isMobile()&&document.getElementById("paraDisplay").scrollIntoView(!0),this.searchLat=n.result.center[1],this.searchLng=n.result.center[0],this.showHideBgDiv(),this.toggleMap(!0),this.loadSidePanelLinks(n.result.center[1],n.result.center[0]),this.openNav(),this.setSideBarPosition()}}),this._mapRef.resize(),this._geoCoder.on("results",n=>{var e=n.features.length,i=n.config.query;n.features.forEach(r=>{r.place_name=r.place_name.replace(",","
")}),0==e&&(gn.logNoData(i),gn.showNoDataFoundText=!0,gn.hideNoDataText())}),this.initiateCustomProcess(),this.addOverlayOnScroll(),this.deviceService.isDesktop()?(this._mapRef.scrollZoom.enable(),this.mapElement.nativeElement.querySelector("#map-overlay").innerHTML="Use ctrl + scroll to zoom the map"):(document.getElementById("mobileMsg").style.display="block",this._mapRef.touchZoomRotate.enable(),this._mapRef.touchZoomRotate.disableRotation(),this._mapRef.scrollZoom.disable(),this._mapRef.dragPan.disable(),this.mapElement.nativeElement.querySelector("#map-overlay").innerHTML="Use two fingers to move the map"),this.scrollZoomOverlayHandler(),this._mapRef.on("mousemove",function(n){gn.getCoordinateOnMouseOver(n.lngLat.lat,n.lngLat.lng)}),this._mapRef.on("mouseout",function(){gn.getCoordinateOnMouseOver(gn._mapRef.getCenter().lat,gn._mapRef.getCenter().lng)}),this.updateZoomButtons(),this._mapRef.on("resize",n=>{setTimeout(()=>{let e=document.getElementsByClassName("mapboxgl-ctrl-top-left")[0].getElementsByTagName("button")[0];if("Exit fullscreen"==e.title)gn.fullScrGeocoder=new gee(gn._mapRef),this._mapRef.addControl(gn.fullScrGeocoder,"top-right"),this.isFullScreen=!0;else if("Enter fullscreen"==e.title&&this.isFullScreen){var i=document.querySelector("#customInput").value;this._mapRef.removeControl(gn.fullScrGeocoder);var r=document.getElementById("geocoder");r.parentNode.removeChild(r),document.querySelector("#geocoderDiv").insertAdjacentHTML("beforeend",'
'),document.getElementById("geocoder").appendChild(gn._geoCoder.onAdd(gn._mapRef)),gn.initiateCustomProcess(),gn._container.getElementsByTagName("input")[0].style.display="none",document.querySelector("#customInput").value=i,gn.duplicateCheck="",gn.isFullScreen=!1}},0),"visible"==document.getElementById("mySidepanel").style.visibility&&gn.openNav()})}loadSidePanelLinks(n,e){this.showLoader=!0,0!=this.Maps_linkButtons.length&&this.Maps_linkButtons.splice(0,this.Maps_linkButtons.length),this.getAuthTokenService.getAuthToken().subscribe(i=>{null!=i?(this.latest_token=i.access_token.toString(),Ra(this.mapboxService.mapbox(n,e)).then(r=>{}),Ra(this.ShopifyLookupService.getShopifyLookupUrllist(n,e,this.searchStateId,this.latest_token)).then(r=>{0!=this.Maps_linkButtons.length&&this.Maps_linkButtons.splice(0,this.Maps_linkButtons.length),this.linkBtnObj.shopifY_URL="CustomMap",this.linkBtnObj.type="CustomMap",this.linkBtnObj.title="Custom Map",this.linkBtnObj.thumbnail="../../../../assets/Img/Custom_Map.png",this.linkBtnObj.stateid="",this.linkBtnObj.year=null,this.Maps_linkButtons.push(this.linkBtnObj),r?.forEach(s=>{this.Maps_linkButtons.push(s)}),this.showLoader=!1})):this.showLoader=!1}),this.getCoordinateOnMouseOver(n,e)}toggleMap(n){let e=document.getElementById("map");""!=gn._container.getElementsByTagName("input")[0].value&&this.openNav(),n?(document.getElementsByClassName("spaceWrapper")[0].style.display="none",document.getElementsByClassName("spaceWrapper")[1].style.display="none",e.style.display="block",this.showMapLbl="Hide Map",this.showMap=!0,this._mapRef.resize()):(this.deviceService.isDesktop()&&(document.getElementsByClassName("spaceWrapper")[0].style.display="block",document.getElementsByClassName("spaceWrapper")[1].style.display="block"),e.style.display="none",this.showMapLbl="Show Map",this.showMap=!1,"visible"==document.getElementById("mySidepanel").style.visibility&&this.closeNav())}openNav(){var n=this;return RB(function*(){gn.isFullScreen&&(document.querySelector(".mapboxgl-ctrl-shrink").click(),yield gn.sleep(100));let e=document.getElementById("mySidepanel");e.style.visibility="visible";let i=window.document.getElementsByClassName("captions onlyMobile").item(0);"block"!=window.getComputedStyle(i).display&&(e.style.height=window.getComputedStyle(document.getElementsByClassName("mapboxgl-map")[0]).getPropertyValue("height")),"block"==window.getComputedStyle(i).display?document.getElementById("mySidepanel").style.width="auto":document.getElementById("mySidepanel").style.width="520px",yield gn.sleep(100),n._mapRef.resize()})()}searchGeo(n){let e;e="satellite"==this._maptype.toLowerCase()?"https://www.mytopo.com/searchgeo.cfm?mapsource=naip&printscale=10&lat="+n.lat.toString()+"&lon="+n.lng.toString():"https://www.mytopo.com/searchgeo.cfm?mapsource=topo&printscale=24&lat="+n.lat.toString()+"&lon="+n.lng.toString(),window.location.href=e}closeNav(){document.getElementById("mySidepanel").style.width="0",document.getElementById("mySidepanel").style.height="0",document.getElementById("mySidepanel").style.visibility="hidden"}updateZoomButtons(){if(this.sharedService.isIE()){const n=this._mapRef.getZoom();document.getElementsByClassName("mapboxgl-ctrl-zoom-out")[0].classList.remove("mapboxgl-ctrl-icon-disabled"),document.getElementsByClassName("mapboxgl-ctrl-zoom-in")[0].classList.remove("mapboxgl-ctrl-icon-disabled"),n==this._mapRef.getMaxZoom()?document.getElementsByClassName("mapboxgl-ctrl-zoom-in")[0].classList.add("mapboxgl-ctrl-icon-disabled"):n==this._mapRef.getMinZoom()&&document.getElementsByClassName("mapboxgl-ctrl-zoom-out")[0].classList.add("mapboxgl-ctrl-icon-disabled")}}scrollZoomOverlayHandler(){let n,e=!1;this._mapRef.on("dragend",s=>{clearTimeout(this.timeout_panMap),this.deviceService.isMobile()||(this.timeout_panMap=setTimeout(function(){gn.searchLat=gn._mapRef.getCenter().lat.toString(),gn.searchLng=gn._mapRef.getCenter().lng.toString(),gn.loadSidePanelLinks(gn.searchLat,gn.searchLng)},500))}),this._mapRef.on("moveend",s=>{const d=()=>{this._mapRef.loaded()||setTimeout(d,200)};d()});let i="touchstart";this.deviceService.isDesktop()&&(i="click");let r=0;this._mapRef.on(i,s=>{clearTimeout(this.timeout_panMap),r++,1==r&&(this.timeout_panMap=setTimeout(function(){r>1&&(gn._mapRef.setCenter(s.lngLat),gn.openNav(),gn.loadSidePanelLinks(s.lngLat.lat,s.lngLat.lng)),r=0},500));try{1===s.originalEvent.touches.length&&(s.originalEvent.preventDefault(),n={x:s.originalEvent.touches[0].clientX,y:s.originalEvent.touches[0].clientY})}catch(d){console.log(d)}}),this._mapRef.on("touchmove",s=>{try{if(s.originalEvent.preventDefault(),1===s.originalEvent.touches.length){e=!0;let d={x:s.originalEvent.touches[0].clientX,y:s.originalEvent.touches[0].clientY};this._mapRef.panBy([n.x-d.x,n.y-d.y])}}catch(d){console.log(d)}}),this._mapRef.on("touchend",s=>{try{1==e&&(e=!1,clearTimeout(this.timeout_panMap),this.timeout_panMap=setTimeout(function(){gn.searchLat=gn._mapRef.getCenter().lat.toString(),gn.searchLng=gn._mapRef.getCenter().lng.toString(),gn.loadSidePanelLinks(gn.searchLat,gn.searchLng)},500))}catch(d){console.log(d)}}),this._mapRef.on("wheel",s=>{s.originalEvent.ctrlKey||this.isFullScreen||(this.showOverlay(),s.preventDefault())}),this.mapElement.nativeElement.querySelector("#map-overlay").ontouchstart=this.showOverlay,this.mapElement.nativeElement.querySelector("#map-overlay").ontouchend=this.hideOverlay,this.mapElement.nativeElement.querySelector("#map-overlay").addEventListener("mousewheel",function(s){1==s.ctrlKey&&(clearTimeout(gn.OverlayTimeOut),this.mapElement.nativeElement.querySelector("#map-overlay").style.visibility="hidden",document.getElementsByClassName("mapboxgl-map")[0].focus(),s.preventDefault())})}getCoordinateOnMouseOver(n,e){this.showMap&&null!=n&&null!=e&&(this.LatOnMouseOver=Number(n).toFixed(6).toString(),this.LngOnMouseOver=Number(e).toFixed(6).toString())}clickforwardingNew(){var n=gn._container.getElementsByTagName("input")[0].value;n.indexOf(",")>0&&(n=n.split(",")[0]),document.querySelector("#customInput").value=n,gn._container.getElementsByTagName("input")[0].style.display="none",document.querySelector("#customInput").style.display="block",document.querySelector("#customInput").focus(),gn.forwardGeocoder(n)}initiateCustomProcess(){const n=this.dom.querySelector(".mapboxgl-ctrl-geocoder");this._container=this.geocoderElement.nativeElement,n.insertAdjacentHTML("beforeend",''),n.insertAdjacentHTML("beforeend",''),this._container.getElementsByTagName("input")[0].style.display="none",this.dom.querySelector("#customInput").addEventListener("keyup",this.newInputField.bind(this)),this._container.getElementsByTagName("input")[0].onfocus=this.clickforwardingNew,this._container.getElementsByClassName("suggestions")[0].onmouseup=this.suggestionsClick,this._container.getElementsByClassName("mapboxgl-ctrl-geocoder--icon-close")[0].onclick=this.closeBtnclickforwarding,this._container.querySelector("#customInput").onclick=this.displaySuggestions,this._container.getElementsByTagName("input")[0].onclick=function(r){r.stopPropagation()}}addOverlayOnScroll(){this.elementRef.nativeElement.querySelector(".mapboxgl-control-container").insertAdjacentHTML("beforeend",'')}newInputField(n){this.windowScrolled=!0;var e=this,i=n.target.value;clearTimeout(this.timeout),38==n.keyCode||40==n.keyCode||13==n.keyCode?e.keypress(n):this.timeout=setTimeout(function(){e.forwardGeocoder(i)},1e3)}suggestionsClick(n){gn._container.querySelector("#customInput").style.display="none",gn._container.getElementsByTagName("input")[0].style.display="block"}displaySuggestions(n){this.windowScrolled=!0,n.target.value.length>3&&(0==document.getElementsByClassName("suggestions")[0].childNodes.length?gn._container.getElementsByTagName("input")[1].dispatchEvent(new Event("keyup")):document.getElementsByClassName("suggestions")[0].style.display="block",n.stopPropagation())}defaultInputField(n){this.forwardGeocoder(n.target.value)}switchMapStyle(n){switch(n.toLowerCase()){case"satellite":case"outdoor":case"street":this.nextLayer=this.mapLayers[n.toLowerCase()],this._mapRef.setStyle("mapbox://styles/mapbox/"+this.nextLayer.id),this.setMinMaxMapZoom(0,22);break;default:this._mapRef.setStyle({version:8,sources:{"raster-tile":{type:"raster",tiles:["https://tileserver.trimbleoutdoors.com/SecureTile/TileHandler.ashx?mapType=Topo&x={x}&y={y}&z={z}"],tileSize:256}},layers:[{id:"simple-tiles",type:"raster",source:"raster-tile",minzoom:9,maxzoom:16}]}),this.nextLayer=this.mapLayers[n.toLowerCase()],this.setMinMaxMapZoom(9,15)}this._maptype=n}sleep(n){return new Promise(e=>setTimeout(e,n))}move_to_next_section(n){var e=this;return RB(function*(){gn.isFullScreen&&(document.querySelector(".mapboxgl-ctrl-shrink").click(),yield e.sleep(100)),"custom"==n?document.getElementById("customMaps").scrollIntoView(!1):document.getElementById("coordinates").scrollIntoView(!0)})()}setMinMaxMapZoom(n,e){this._mapRef.setMinZoom(n),this._mapRef.setMaxZoom(e)}search(){return Fd._localres}forwardGeocoder(n){document.querySelector("#customInput"),null!=n&&""!=n?2==n.length||1==n.length?(Fd._localres=[],this._container.getElementsByTagName("input")[0].value=n,this._container.getElementsByTagName("input")[0].dispatchEvent(new Event("keydown")),document.getElementsByClassName("suggestions")[0].style.display="none"):(this.duplicateCheck=n,document.querySelector(".mapboxgl-ctrl-geocoder--pin-right").style.display="block",this.getAuthTokenService.getAuthToken().subscribe(i=>{if(null!=i){this.latest_token=i.access_token.toString();let r=n.replace(/[^0-9a-zA-Z-', ]/g,"");r=r.replace(/[']/g,"''"),Ra(this.geocoderServiceService.sendGetRequest(r,this.latest_token)).then(s=>{if(null!=s){Fd._localres=s;var d=document.querySelector("#customInput");n.length==d.value.length&&(gn._container.getElementsByTagName("input")[0].value=n,gn._container.getElementsByTagName("input")[0].dispatchEvent(new Event("keydown")),document.getElementsByClassName("suggestions")[0].style.display="")}})}})):(this._container.getElementsByTagName("input")[0].value=n,document.getElementsByClassName("mapboxgl-ctrl-geocoder--icon-close")[0].click(),this._container.getElementsByTagName("input")[0].focus())}hideNoDataText(){setTimeout(function(){gn.showNoDataFoundText=!1},1e4)}logNoData(n){this.geocoderServiceService.logNoDataRequest(n,this.latest_token).subscribe(e=>{})}searchfocus(){document.querySelector("#customInput").value.length>=3&&(document.getElementsByClassName("suggestions")[0].style.display="")}clickforwarding(n){document.querySelector("#customInput").style.display="",document.querySelector("#customInput").focus()}changeforwarding(n){document.querySelector("#customInput").style.display="none",document.querySelector("#customInput").value=this._container.getElementsByTagName("input")[0].value,document.querySelector("#customInput").focus()}closeBtnclickforwarding(n){gn._container.getElementsByTagName("input")[0].style.display="none",gn._container.getElementsByTagName("input")[0].value="",document.querySelector("#customInput").style.display="block",document.querySelector("#customInput").focus(),document.getElementsByClassName("suggestions")[0].style.display="none",document.querySelector("#customInput").value=""}suggestionsfocusout(){document.getElementsByClassName("suggestions")[0].style.display="none"}keypress(n){let i=document.getElementsByClassName("suggestions-wrapper")[0].getElementsByTagName("li");0==i.length&&gn._container.getElementsByTagName("input")[1].dispatchEvent(new Event("keyup"));for(var r=0;r{null!=i&&(this.latest_token=i.access_token.toString(),Ra(gn.GetQuadSheetResultService.getQuadSheetRes(n,e,this.latest_token)).then(r=>{null!=r&&r.length>0&&(null!=r[0].state_name&&""!=r[0].state_name&&(gn._queryString.state=r[0].state_name),null!=r[0].mapname&&""!=r[0].mapname&&(gn._queryString.mapName=r[0].mapname),null!=r[0].code&&""!=r[0].code&&(gn._queryString.quadCode=r[0].code),null!=r[0].quad_mapdate&&(gn._queryString.quad_mapDate=r[0].quad_mapdate),null!=r[0].ustopo_mapdate&&(gn._queryString.ustopo_mapDate=r[0].ustopo_mapdate)),gn.sharedService.emitRedirectUrl(gn._queryString)}))}):gn.sharedService.emitRedirectUrl(gn._queryString)}openModal(n){if("CustomMap"==n){const e=new E0;e.disableClose=!0,e.id="modal-component",gn.deviceService.isMobile()?(e.height="100%",e.maxWidth="90vw !important"):(e.height="90vh",e.width="1600px"),e.data={lat:this.searchLat.toString(),lng:this.searchLng.toString(),maptype:this._maptype},this.matDialog.open(A_,e)}else window.location.href=n}onResize(n){this.resizeSidePanelMobile()}onOrientationChange(n){this.resizeSidePanelMobile()}resizeSidePanelMobile(){let n=window.document.getElementsByClassName("captions onlyMobile").item(0),e=window.document.getElementsByClassName("sidepanel").item(0),r=(window.document.getElementsByClassName("shopify-mat-toolbar").item(0),window.document.getElementsByClassName("fixTitle").item(0)),s=window.document.getElementsByClassName("sidePanelContent").item(0),d="block"==window.getComputedStyle(n).display,_="visible"==document.getElementById("mySidepanel").style.visibility,S=window.innerHeight;if(d)_&&(this.isHideBgDiv=!0,this.isMobilepanelOpen?(e.style.top=(S-.7*S).toString()+"px",e.style.height=(.7*S).toString()+"px",r.style.top=e.style.top,s.style.top=(S-.7*S+r.offsetHeight).toString()+"px",s.style.height=(.7*S-r.offsetHeight).toString()+"px",r.style.opacity="1"):(e.style.top=(S-r.offsetHeight).toString()+"px",e.style.height=r.offsetHeight.toString()+"px",r.style.top=e.style.top,s.style.top=e.style.bottom,s.style.height="0px",r.style.opacity="0.7"));else if(_){let I=window.document.getElementsByClassName("mapBoundary").item(0);e.style.top=I.style.top}}showHideBgDiv(){try{let n=window.document.getElementsByClassName("captions onlyMobile").item(0);this.isHideBgDiv="block"==window.getComputedStyle(n).display}catch(n){console.log(n)}}toggleSideBar(){let n=window.document.getElementsByClassName("captions onlyMobile").item(0);if("block"==window.getComputedStyle(n).display){let i=window.document.getElementsByClassName("sidepanel").item(0),s=(window.document.getElementsByClassName("shopify-mat-toolbar").item(0),window.document.getElementsByClassName("fixTitle").item(0)),d=window.document.getElementsByClassName("sidePanelContent").item(0),w=window.innerHeight;this.isMobilepanelOpen?(i.style.top=(w-s.offsetHeight).toString()+"px",i.style.height=s.offsetHeight.toString()+"px",s.style.top=i.style.top,d.style.top=i.style.bottom,d.style.height="0px",this.isMobilepanelOpen=!1,s.style.opacity="0.7"):(i.style.top=(w-.7*w).toString()+"px",i.style.height=(.7*w).toString()+"px",s.style.top=i.style.top,d.style.top=(w-.7*w+s.offsetHeight).toString()+"px",d.style.height=(.7*w-s.offsetHeight).toString()+"px",this.isMobilepanelOpen=!0,s.style.opacity="1")}}setSideBarPosition(){try{let n=window.document.getElementsByClassName("captions onlyMobile").item(0),e=window.document.getElementsByClassName("sidepanel").item(0),r=(window.document.getElementsByClassName("shopify-mat-toolbar").item(0),window.document.getElementsByClassName("fixTitle").item(0)),s=window.document.getElementsByClassName("sidePanelContent").item(0);setTimeout(function(){window.document.getElementsByClassName("mapboxgl-ctrl-logo").item(0).parentElement.className="mapboxgl-ctrl notMobile"},500);let d=window.innerHeight,_="block"==window.getComputedStyle(n).display,w="top 0.5s, height 0.5s, opacity 0.5s";if(e.style.transition=w,r.style.transition=w,s.style.transition=w,_){let S=d;e.style.top=(S-.7*S).toString()+"px",e.style.height=(.7*S).toString()+"px",r.style.top=e.style.top,s.style.top=(S-.7*S+r.offsetHeight).toString()+"px",s.style.height=(.7*S-r.offsetHeight).toString()+"px",this.isMobilepanelOpen=!0,r.style.opacity="1"}else e.style.top="auto",this.isMobilepanelOpen=!1}catch(n){console.log(n)}}}Fd.\u0275fac=function(n){return new(n||Fd)(z(Jh),z(QJ),z(I_),z(yu),z(k_),z(im),z(R_),z($t),z(BB),z(Lr),z(sp),z(Sc),z(om),z(nm),z(nm),z(Bn),z(Ka))},Fd.\u0275cmp=Rn({type:Fd,selectors:[["app-find-a-map"]],viewQuery:function(n,e){if(1&n&&(Yi(JJ,5),Yi(eee,5),Yi(tee,5),Yi(nee,5)),2&n){let i;fn(i=mn())&&(e.mapElement=i.first),fn(i=mn())&&(e.geocoderElement=i.first),fn(i=mn())&&(e.coordinatesElement=i.first),fn(i=mn())&&(e.switchMapTypesElement=i.first)}},hostBindings:function(n,e){1&n&&Nt("resize",function(r){return e.onResize(r)},0,By)("orientationchange",function(r){return e.onOrientationChange(r)},!1,By)},decls:89,vars:32,consts:[[1,"contentWrapper"],["height","0%",3,"ngClass"],["fxShow","true","fxHide.lt-md","",1,"spaceWrapper"],[1,"captions","notMobile"],[1,"mat-headline"],[1,"notMobile"],[1,"mat-subheading-2"],["id","paraDisplay"],["id","mobileMsg",1,"notMobile",2,"color","white","display","none"],["id","coordinatesDiv"],["class","col-md-12 offset-md-0 col-lg-8 offset-lg-2 col-xl-8 offset-xl-2 col-sm-12 offset-sm-0 no-record-found-text notMobile",4,"ngIf"],[1,"container-fluid"],[1,"onlyMobile",2,"height","20px"],[1,"row","justify-content-md-center"],["id","geocoderDiv",1,"align-self-center","col-xs-12","col-sm-12","col-md-12","col-lg-6","col-xl-6"],["id","geocoder",1,"geocoder"],["geocoder",""],[1,"align-self-center","col","col-md-auto","d-none","d-sm-inline-block","captions","notMobile"],[3,"ngModel","change","ngModelChange"],[3,"ngClass"],[1,"captions","onlyMobile"],[1,"captions","mat-subheading-2","row","justify-content-md-center"],[4,"ngIf"],[1,"notMobile",2,"height","20px"],["id","mySidepanel",1,"sidepanel"],[1,"fixTitle",3,"click"],["mat-icon-button","",3,"ngClass"],[1,"sidePanelTitle"],["class","spinner-border","role","status",3,"ngClass",4,"ngIf"],[1,"sidePanelContent"],[1,"container"],["class","row",4,"ngFor","ngForOf"],["data-tap-disabled","true",3,"ngClass"],["id","map",3,"load"],["mapElement",""],["id","coordinates","title","GPS Coordinates (Lat/Lon Decimal Degrees)"],["coordinates",""],["id","latitudeID"],["id","longitudeID"],["title","Toggle between Map Types",1,"box",2,"visibility","hidden"],["SwitchMapTypes",""],[3,"click"],["alt","nextLayer.nextlayer","defaultImage","",3,"src"],[1,"text"],[1,"scroll-to-help",3,"ngClass"],["mat-icon-button","","aria-label","Open Instuctions Dialog","title","Help",1,"notMobile",3,"click"],[1,"col-md-12","offset-md-0","col-lg-8","offset-lg-2","col-xl-8","offset-xl-2","col-sm-12","offset-sm-0","no-record-found-text","notMobile"],["role","status",1,"spinner-border",3,"ngClass"],["id","loading",1,"sr-only"],[1,"row"],[1,"col-auto","flex-grow-1"],[1,"stockLink",3,"click"],["defaultImage","",3,"alt","src"],[2,"text-transform","uppercase",3,"innerHTML"],[3,"innerHTML"]],template:function(n,e){1&n&&(se(0,"div",0)(1,"div",1),ut(2,"div",2),se(3,"section",3)(4,"p",4),Ze(5,"START HERE TO SEE MAPS AVAILABLE IN YOUR AREA"),se(6,"span",5),Ze(7,"; FIND CENTER POINT FOR YOUR MAP"),he()(),se(8,"h3",6)(9,"i"),Ze(10," Available map types include topos, aerials/satellite images, private land boundary maps, Game Management Unit/Wildlife Management Area maps and "),ut(11,"span",7),Ze(12,"more. "),ut(13,"br"),he()(),se(14,"p",8)(15,"span")(16,"b"),Ze(17,"Note: "),he(),Ze(18,"Use two fingers to zoom or pan the map"),he()()(),se(19,"div",9),Mt(20,iee,4,0,"div",10),se(21,"div",11),ut(22,"div",12),se(23,"div",13)(24,"div",14),ut(25,"div",15,16),he(),se(27,"div",17)(28,"mat-slide-toggle",18),Nt("change",function(r){return e.toggleMap(r.checked)})("ngModelChange",function(r){return e.showMap=r}),Ze(29),he()(),se(30,"div",19)(31,"section",20)(32,"p",4),Ze(33,"START HERE TO SEE MAPS AVAILABLE IN YOUR AREA"),se(34,"span",5),Ze(35,"; FIND CENTER POINT FOR YOUR MAP"),he()(),se(36,"h3",6)(37,"i"),Ze(38," Available map types include topos, aerials/satellite images, private land boundary maps, Game Management Unit/Wildlife Management Area maps and "),ut(39,"span",7),Ze(40,"more. "),ut(41,"br"),he()(),se(42,"div",19)(43,"p"),ut(44,"br"),he(),se(45,"p")(46,"span")(47,"i")(48,"b"),Ze(49,"Tip: "),he(),Ze(50,"Use two fingers to zoom the map"),he()()()()(),se(51,"div",21)(52,"p")(53,"i"),Ze(54,"All MyTopo Maps are waterproof and ship within 24 hours."),he()()()()()()(),Mt(55,ree,2,0,"div",22),he(),ut(56,"div",23),se(57,"div",24)(58,"div",25),Nt("click",function(){return e.toggleSideBar()}),se(59,"button",26)(60,"mat-icon"),Ze(61,"expand_circle_down"),he()(),se(62,"h2",27),Ze(63,"Next: Choose Your Map "),he()(),Mt(64,oee,2,3,"div",28),se(65,"div",29)(66,"div",30),Mt(67,aee,12,6,"div",31),he()()(),se(68,"div",32)(69,"div",33,34),Nt("load",function(){return e.loadMap()}),se(71,"div",35,36),Ze(73," \xa0 Lat:\xa0"),se(74,"span",37),Ze(75),he(),Ze(76," Lon:\xa0"),se(77,"span",38),Ze(78),he()()()(),se(79,"div",39,40)(81,"a",41),Nt("click",function(){return e.switchMapStyle(e.nextLayer.nextlayer)}),ut(82,"img",42),se(83,"div",43),Ze(84),he()()(),se(85,"div",44)(86,"button",45),Nt("click",function(){return e.openHelpDialog()}),se(87,"mat-icon"),Ze(88,"help"),he()()()()),2&n&&(Se(1),Ae("ngClass",Ns(20,lee,e.isHideBgDiv)),Se(14),pc("display",e.showMap?"block":"none"),Se(5),Ae("ngIf",e.showNoDataFoundText),Se(8),Ae("ngModel",e.showMap),Se(1),no("",e.showMapLbl," "),Se(1),Ae("ngClass",Ns(22,GB,e.isHideBgDiv)),Se(12),Ae("ngClass",Ns(24,cee,!e.isTouchEnabled)),Se(9),pc("display",e.showMap?"none":"block"),Se(4),Ae("ngIf",e.load_map_collections),Se(4),Ae("ngClass",Ns(26,uee,!e.isMobilepanelOpen)),Se(5),Ae("ngIf",e.showLoader),Se(3),Ae("ngForOf",e.Maps_linkButtons),Se(1),Ae("ngClass",Ns(28,dee,e.isHideBgDiv)),Se(7),Wr(e.LatOnMouseOver),Se(3),Wr(e.LngOnMouseOver),Se(4),Ae("src","../../../../assets/Layers/"+e.nextLayer.nextlayer+".png",Th),Se(2),no(" ",e.nextLayer.nextlayer," "),Se(1),Ae("ngClass",Ns(30,hee,e.windowScrolled)))},dependencies:[If,$g,Ya,t0,nC,Td,em,zE,BE,HE],styles:['@import"https://fonts.googleapis.com/icon?family=Material+Icons";*[_ngcontent-%COMP%]:focus{outline:0} mgl-map{height:70vh;width:98vw;padding:0 5%} .mapboxgl-map{height:70vh;display:none} .mapboxgl-canvas{height:100%!important;width:100%!important;margin-left:12px} .mapboxgl-ctrl-geocoder{width:100%!important;max-width:100%!important;margin-bottom:8px} .mapboxgl-ctrl-top-left{padding-left:12px} .mapboxgl-ctrl-bottom-left{padding-left:12px} .mapboxgl-ctrl-top-right{width:80%!important;margin-right:10%} .mapboxgl-ctrl-geocoder input[type=text]{font-size:16px} .mapboxgl-ctrl-top-left, .mapboxgl-ctrl-top-right[_ngcontent-%COMP%], .mapboxgl-ctrl-bottom-left[_ngcontent-%COMP%], .mapboxgl-ctrl-bottom-right[_ngcontent-%COMP%]{z-index:0} .mapboxgl-marker-anchor-center:hover{opacity:1;cursor:pointer} .mapboxgl-marker-anchor-center{padding:10px;opacity:.6}.contentWrapper[_ngcontent-%COMP%]{width:100%}.bgDiv[_ngcontent-%COMP%]{background:rgba(0,0,0,.6);background-image:linear-gradient(rgba(0,0,0,.5),rgba(0,0,0,.5)),url(/assets/Img/mytopo-printed-maps.jpg);background-size:cover}#geocoder-wrapper[_ngcontent-%COMP%]{display:flex}#wrapper3geocoder-wrapper[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{flex:1;margin:auto}.mapboxgl-custom-ctrl-coordinates[_ngcontent-%COMP%]{background-color:#ffffffbf;font-size:10px;border-width:medium 2px 2px;border-style:solid;border-color:#333;padding:0 5px;color:#333;box-sizing:border-box;font-weight:700}#menu[_ngcontent-%COMP%]{position:float;background:#d8e8e9;padding:10px;font-family:Open Sans,sans-serif}.maptypes-option[_ngcontent-%COMP%]{margin-left:10px;margin-bottom:10px}.mat-layer-icon[_ngcontent-%COMP%]{line-height:35px;width:30px;height:30px;display:block;padding:0;outline:none;border:0;box-sizing:border-box;background-color:#fff;cursor:pointer;border:2px solid lightgrey;border-radius:5px;position:absolute}.mat-icon[_ngcontent-%COMP%]{padding-top:3px}ul[_ngcontent-%COMP%], li[_ngcontent-%COMP%]{margin:0;padding:0;list-style:none}.box[_ngcontent-%COMP%]{position:relative;display:inline-block}.box[_ngcontent-%COMP%]:hover{cursor:pointer}.box[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:75px;width:75px;border-radius:10px;border-style:solid;border-color:#fff}.box[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{position:absolute;z-index:999;left:0;right:0;text-align:left;vertical-align:bottom;top:70%;background:rgb(0,0,0);background:linear-gradient(0deg,rgba(0,0,0,.8524452017) 0%,rgba(0,0,0,.5030894594) 50%,rgba(0,0,0,0) 100%);font-family:Arial,sans-serif;font-size:12px;color:#fff;width:auto;height:auto;padding:0 2px;margin:0 2px;border-radius:5px}.captions[_ngcontent-%COMP%]{text-align:center;padding:0 5%;color:#fff}.captions[_ngcontent-%COMP%] .mat-headline[_ngcontent-%COMP%]{color:#ff0;font-family:Open Sans,sans-serif;display:block;margin-block-end:.25em;padding-block-start:.75em;font-weight:700}.captions[_ngcontent-%COMP%] .mat-subheading-2[_ngcontent-%COMP%]{font-family:Open Sans,sans-serif;color:#fff;font-weight:400;line-height:1.5}.link-button[_ngcontent-%COMP%]{vertical-align:middle;margin:10px 12px}.link-button[_ngcontent-%COMP%] a[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{border-color:#ffbe00;border-style:solid;vertical-align:top;height:70px;width:70px;object-fit:cover}.link-button[_ngcontent-%COMP%] a[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{border-color:#ffbe00;font-family:Open Sans,sans-serif;display:inline-block;color:#005f9e;text-decoration:none;padding:0 5px;font-size:12px}.link-button[_ngcontent-%COMP%] a[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{font-family:Open Sans,sans-serif;display:inline-block;color:#005f9e;font-size:12px;text-decoration:none}.link-button-title[_ngcontent-%COMP%]{font-size:larger;font-weight:700}.link-button[_ngcontent-%COMP%] a[_ngcontent-%COMP%] .fa-chevron-right[_ngcontent-%COMP%]{color:#ffbe00;margin-left:5px;position:relative;top:-1px;width:8px;height:12px;font-size:larger;vertical-align:text-bottom}.link-button[_ngcontent-%COMP%] a[_ngcontent-%COMP%] p[_ngcontent-%COMP%]:hover > .fa-chevron-right[_ngcontent-%COMP%]{color:#005f9e}.link-button[_ngcontent-%COMP%] .mat-raised-button[_ngcontent-%COMP%]{border-radius:0;background:#FFBE00;font-size:12px;width:25px;height:25px;vertical-align:middle;font-family:Open Sans,sans-serif}.row[_ngcontent-%COMP%]{margin:0}.link-button[_ngcontent-%COMP%] .mat-flat-button[_ngcontent-%COMP%]{background-color:#005f9e;border-radius:0;width:20px;height:20px;line-height:20px;min-height:20px;vertical-align:top;font-size:12px;padding:0;margin-left:2px;margin-top:5px}.link-button[_ngcontent-%COMP%] input[type][_ngcontent-%COMP%]{width:200px;height:25px}@media (max-width: 480px){.link-button[_ngcontent-%COMP%]{text-align:center}}.mat-menu-item[_ngcontent-%COMP%]{background:white;color:#000;outline:none}.mat-menu-item[_ngcontent-%COMP%]:hover{background:whitesmoke} .mat-menu-content{padding-top:8px;padding-bottom:8px;background:white} .mapboxgl-ctrl-compass{display:none!important}#step-2-button[_ngcontent-%COMP%]{display:none}.arrow[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{color:#ffbe00;text-decoration:none}.arrow[_ngcontent-%COMP%], .arrow[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{text-align:center;cursor:pointer}.bounce[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_bounce 2s infinite}@keyframes _ngcontent-%COMP%_bounce{0%,20%,50%,80%,to{transform:translateY(0)}40%{transform:translateY(-30px)}60%{transform:translateY(-15px)}} #geocoderDiv{z-index:8} .suggestions{height:200px!important;overflow:auto!important}.step2Txt[_ngcontent-%COMP%]{color:#005f9e;padding:0 5%;font-family:Open Sans,sans-serif} .mapboxgl-ctrl-geocoder ul>li>a{overflow:unset!important}.matselect-placeholder[_ngcontent-%COMP%]::mat-select-placeholder{color:#000;opacity:1} .mat-select-panel, .mat-option-text{background-color:#fff;color:#000} .mat-select-value{color:#000} .mat-form-field-appearance-outline .mat-form-field-infix{padding:.5em 0} .mat-form-field-wrapper{padding-bottom:0}input.mat-input-element[_ngcontent-%COMP%], .mat-form-field{width:100%;padding:0}input.mat-input-element[_ngcontent-%COMP%] .mat-input-element[_ngcontent-%COMP%], .mat-form-field .mat-input-element{color:#000}input.mat-input-element[_ngcontent-%COMP%] .mat-form-field-label[_ngcontent-%COMP%], .mat-form-field .mat-form-field-label{color:#000;font-weight:700}input.mat-input-element[_ngcontent-%COMP%] .mat-form-field-underline[_ngcontent-%COMP%], .mat-form-field .mat-form-field-underline{background-color:#005f9e}input.mat-input-element[_ngcontent-%COMP%] .mat-form-field-outline[_ngcontent-%COMP%], .mat-form-field .mat-form-field-outline{color:#d3d3d3;padding:0}input.mat-input-element[_ngcontent-%COMP%] .mat-form-field-ripple[_ngcontent-%COMP%], .mat-form-field .mat-form-field-ripple{background-color:#708090}input.mat-input-element[_ngcontent-%COMP%] .mat-form-field-required-marker[_ngcontent-%COMP%], .mat-form-field .mat-form-field-required-marker{color:#000}input.mat-input-element[_ngcontent-%COMP%] .mat-select-arrow[_ngcontent-%COMP%], .mat-form-field .mat-select-arrow{color:#005f9e!important}input.mat-input-element[_ngcontent-%COMP%] .mat-select-disabled[_ngcontent-%COMP%], .mat-form-field .mat-select-disabled{background-color:gray!important} .mat-select-disabled{background-color:gray!important}.no-record-found-text[_ngcontent-%COMP%]{font-size:14px;color:red;align-items:center;transition-duration:.8s;opacity:1;transition:opacity .7s,visibility .7s}.scrollBottomBounce[_ngcontent-%COMP%]{position:fixed;bottom:3px;width:100%;text-align:center;transition:all .2s ease-in-out;z-index:1000;display:none;height:50px}.scrollBottomBounce[_ngcontent-%COMP%] .mat-raised-button[_ngcontent-%COMP%]{background:rgb(52,154,216);background:linear-gradient(90deg,rgb(0,95,158) 0%,rgba(0,95,158,.8972631289) 20%,rgba(52,154,216,.9196720925) 100%);border-radius:20px;font-weight:700}.scrollBottomBounce[_ngcontent-%COMP%] .mat-raised-button[_ngcontent-%COMP%]:hover{color:#ffbe00cb}.hide-scrollBottomBounce[_ngcontent-%COMP%]{opacity:0;transition:all .2s ease-in-out;visibility:hidden}.disable-scrollbars[_ngcontent-%COMP%]{scrollbar-width:none;-ms-overflow-style:none}.disable-scrollbars[_ngcontent-%COMP%]::-webkit-scrollbar{width:0px;background:transparent}.sidepanelWrapper[_ngcontent-%COMP%]{text-align:center;width:100%}.sidepanel[_ngcontent-%COMP%]{z-index:7;position:absolute;height:0px;right:0;top:auto;overflow-x:hidden;width:0;border:1px solid #818181;background:linear-gradient(90deg,rgba(245,245,245,.5779353978) 0%,rgba(245,245,245,.8496440813) 50%,rgb(245,245,245) 100%);margin:0;padding:0}.sidepanel[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{color:#fff;margin:0}.sidepanel[_ngcontent-%COMP%] .sidePanelTitle[_ngcontent-%COMP%]{background:linear-gradient(90deg,rgb(0,95,158) 20%,rgba(0,95,158,.8972631289) 40%,rgba(52,154,216,.9196720925) 100%);width:inherit;height:50px;padding:10px;position:sticky;top:0;z-index:1000}.sidepanel[_ngcontent-%COMP%] .container[_ngcontent-%COMP%]{padding:0}.sidepanel[_ngcontent-%COMP%] .link-button[_ngcontent-%COMP%]{margin:0}.sidepanel[_ngcontent-%COMP%] .row[_ngcontent-%COMP%]{background:white;margin:8px;border-bottom:2px solid;border-right:2px solid;border-right-color:#d3d3d3;border-bottom-color:#d3d3d3}.sidepanel[_ngcontent-%COMP%] a[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font-family:Open Sans,sans-serif;color:#000;text-decoration:none;padding:0 5px;font-size:12px;vertical-align:top;text-align:left;display:table;margin:0}.sidepanel[_ngcontent-%COMP%] a[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{float:left;min-width:100px;max-width:100px;min-height:100px;max-height:100px;object-fit:cover}.sidepanel[_ngcontent-%COMP%] .link-button-title[_ngcontent-%COMP%]{color:#005f9e;font-weight:400}.sidepanel[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{cursor:pointer;color:#000}.sidepanel[_ngcontent-%COMP%] .col-auto[_ngcontent-%COMP%]{padding:8px}.sidepanel[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{text-decoration:none;font-size:25px;color:#fff;display:block;transition:.3s}.sidepanel[_ngcontent-%COMP%] .closebtn[_ngcontent-%COMP%]{position:absolute;top:10px;right:25px;font-size:36px} .openbtn{font-size:14px;cursor:pointer;background-color:#349ad8;color:#fff;font-family:Open Sans,sans-serif;padding:5px;border:none;margin:3px;width:180px} .openbtn:hover{background-color:#005f9e} .mapboxgl-popup{z-index:2;top:-20px} .mapboxgl-popup-content{width:195px;padding:10px 5px 5px} .mapboxgl-popup-close-button{cursor:pointer;color:red;font-size:16px;font-weight:700;top:-6px;right:-2px;padding-top:4px} .mapboxgl-popup-close-button:hover{border-radius:20px} .mat-slide-toggle.mat-checked .mat-slide-toggle-bar{background-color:#349ad8eb} .mat-slide-toggle.mat-checked .mat-slide-toggle-thumb{background-color:#349ad8eb} .mat-slide-toggle-bar{background-color:#d3d3d3}.spaceWrapper[_ngcontent-%COMP%]{height:200px}.spinner-border[_ngcontent-%COMP%]{position:absolute;left:50%;top:50%;z-index:1;width:150px;height:150px;margin:-75px 0 0 -75px;border:16px solid #f3f3f3;border-radius:50%;border-top:16px solid #3498db;width:120px;height:120px;animation:_ngcontent-%COMP%_spin 2s linear infinite}@keyframes _ngcontent-%COMP%_spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.scroll-to-help[_ngcontent-%COMP%]{position:fixed;bottom:15px;right:30px;transition:all .2s ease-in-out;z-index:1000;text-decoration:none;color:#ffbe00}.scroll-to-help[_ngcontent-%COMP%] .mat-icon[_ngcontent-%COMP%]{font-size:xx-large;height:40px;width:40px}.scroll-to-help[_ngcontent-%COMP%] .mat-icon[_ngcontent-%COMP%]:hover{background-color:transparent!important}.help-scrollTop[_ngcontent-%COMP%]{bottom:55px;transition:all .2s ease-in-out}.onlyMobile[_ngcontent-%COMP%]{display:none}@media only screen and (max-width: 960px){.onlyMobile[_ngcontent-%COMP%]{display:block}.notMobile[_ngcontent-%COMP%]{display:none!important}.contentWrapper[_ngcontent-%COMP%]{width:100%;height:100%}.bgDiv[_ngcontent-%COMP%]{background:rgba(0,0,0,.6);background-image:linear-gradient(rgba(0,0,0,.5),rgba(0,0,0,.5)),url(/assets/Img/mytopo-printed-maps.jpg);background-size:cover;height:100%;background-position:center}.captions[_ngcontent-%COMP%]{text-align:center;padding:0 5%;color:#fff}.captions[_ngcontent-%COMP%] .mat-headline[_ngcontent-%COMP%]{color:#ff0;font-family:Open Sans,sans-serif;display:block;margin-block-end:.25em;padding-block-start:.75em;font-weight:400;font-size:1.2rem!important}.captions[_ngcontent-%COMP%] .mat-subheading-2[_ngcontent-%COMP%], .captions.mat-subheading-2[_ngcontent-%COMP%]{font-family:Open Sans,sans-serif!important;color:#fff;font-weight:400;line-height:1.5;font-size:.9rem!important}#geocoderDiv[_ngcontent-%COMP%]{position:relative!important;z-index:4!important}.sidepanel[_ngcontent-%COMP%]{border:0px}.hideBgDiv[_ngcontent-%COMP%]{height:0%!important} .fullPage .mapboxgl-canvas{margin:0!important}.fullPage[_ngcontent-%COMP%] .mapboxgl-map[_ngcontent-%COMP%], .fullPage.mapBoundary[_ngcontent-%COMP%]{height:100vh!important} .fullPage #map-overlay{height:100vh!important;margin:0!important;width:100vw!important;padding-top:25%!important} .mapboxgl-ctrl-top-left{top:10%!important} .mapboxgl-ctrl-bottom-left{bottom:10%!important}.sidepanel[_ngcontent-%COMP%]{position:fixed;width:100%;height:0px;top:110%;left:0;right:0;overflow:hidden}.fixTitle[_ngcontent-%COMP%]{position:fixed;width:100%;top:110%}.sidePanelContent[_ngcontent-%COMP%]{position:fixed;overflow-y:scroll;width:100%;top:110%}.sidePanelContent[_ngcontent-%COMP%] .container[_ngcontent-%COMP%]{position:relative} .hidden{visibility:hidden}.sidePanelToggle[_ngcontent-%COMP%]{position:absolute;top:5px;right:15px;transform:scale(1.5);align-self:flex-end;z-index:1001;color:#fff;transition:transform .5s}.sidePanelToggle[_ngcontent-%COMP%] .mat-icon[_ngcontent-%COMP%]{padding:0}.rotateIcon[_ngcontent-%COMP%]{transform:rotate(180deg) scale(1.5);transition:transform .5s}}']});class fee{constructor(n,e){this._mapRef=n,this._btn=e.nativeElement}onAdd(n){return this._mapRef=n,this._btn.style.visibility="visible",this._btn.className="mapboxgl-ctrl box",this._btn["aria-label"]="Layers",this._btn}onRemove(n){}}class mee{constructor(n,e){this._mapRef=n,this._display=e.nativeElement}onAdd(n){return this._mapRef=n,this._display.className="mapboxgl-ctrl mapboxgl-custom-ctrl-coordinates",this._display["aria-label"]="Coordinates",this._display}onRemove(n){}}class gee{constructor(n){this._mapRef=n}onAdd(n){return this._mapRef=n,this._display=document.querySelector("#geocoder"),this._display["aria-label"]="geocoder",this._display}onRemove(n){}}class Ld{constructor(n,e){this.http=n,this.router=e,this.currentUserSubject=new ss(JSON.parse(localStorage.getItem("currentUser"))),this.currentUser=this.currentUserSubject.asObservable()}get currentUserValue(){return this.currentUserSubject.value}login(n,e,i){const r={headers:new oo({Authorization:"Bearer "+i})};return this.http.get("https://custommap-api.mytopo.com/api/CustomMapDetails/ValidateLoginUser?userinfo="+btoa(JSON.stringify({user:n,password:e})),r).pipe(Jt(d=>(d&&(localStorage.setItem("currentUser",JSON.stringify(n)),this.currentUserSubject.next(d)),d)))}logout(){localStorage.removeItem("currentUser"),this.currentUserSubject.next(null),this.router.navigate(["/login"])}}function _ee(t,n){if(1&t){const e=wi();se(0,"a",11),Nt("click",function(){return Wn(e),qn(Et().logout())}),Ze(1,"Logout"),he()}}Ld.\u0275fac=function(n){return new(n||Ld)(we(Ka),we(as))},Ld.\u0275prov=rt({token:Ld,factory:Ld.\u0275fac,providedIn:"root"});class O0{constructor(n,e){this.authenticationService=n,this.sharedService=e,this.isUserLoggedIn=!1}ngOnInit(){this.authenticationService.currentUserValue&&(this.isUserLoggedIn=!0)}openHelpDialog(){this.sharedService.openDialog()}logout(){this.authenticationService.logout()}}O0.\u0275fac=function(n){return new(n||O0)(z(Ld),z(Sc))},O0.\u0275cmp=Rn({type:O0,selectors:[["app-shopify-header"]],decls:17,vars:3,consts:[["color","primary",1,"shopify-mat-toolbar"],["href","https://www.mytopo.com",1,"stockLink",2,"padding","7.5px","margin","0px 0px 0px -7.5px"],["alt","MyTopo","defaultImage","","src","../../../../assets/Logo/MyTopo_Logo.png"],[1,"example-spacer"],["fxShow","true","fxFlex.lg","","fxHide.lt-md","",2,"width","100vw","padding-left","10px"],["href","https://www.mytopo.com","mat-button","",3,"disableRipple"],["href","#","mat-button","",2,"color","#252A2E","text-decoration","underline",3,"disableRipple"],["class","p-1 justify-content-end","href","#",3,"click",4,"ngIf"],["fxShow","true","fxHide.gt-md","",2,"width","100vw","padding-left","10px","display","flex","flex-direction","column","align-content","end"],["mat-icon-button","","aria-label","Open Instuctions Dialog","title","Help",1,"onlyMobile","newHelpIcon",3,"click"],[1,"notMobile","bottomPadding"],["href","#",1,"p-1","justify-content-end",3,"click"]],template:function(n,e){1&n&&(se(0,"mat-toolbar",0)(1,"mat-toolbar-row")(2,"a",1),ut(3,"img",2),he(),ut(4,"span",3),se(5,"div",4)(6,"a",5),Ze(7,"Home"),he(),se(8,"a",6),Ze(9,"Find Your Map"),he(),Mt(10,_ee,2,0,"a",7),he(),se(11,"div",8)(12,"button",9),Nt("click",function(){return e.openHelpDialog()}),se(13,"mat-icon"),Ze(14,"help"),he()()()()(),ut(15,"router-outlet")(16,"div",10)),2&n&&(Se(6),Ae("disableRipple",!0),Se(2),Ae("disableRipple",!0),Se(2),Ae("ngIf",e.isUserLoggedIn))},dependencies:[Ya,xw,IE,RF,Td,H9,em,lL,zE],styles:[".shopify-mat-toolbar[_ngcontent-%COMP%]{background-color:#fff;padding:20px 50px;font-size:16px;font-family:Open Sans,sans-serif;max-height:109px;min-height:10%}.mat-button[_ngcontent-%COMP%]{color:#252a2ebf;font-family:Open Sans,sans-serif;letter-spacing:.8px;font-size:14px;padding:12px}.mat-toolbar-row[_ngcontent-%COMP%]{padding:0!important}.mat-toolbar-row[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:Hover{color:#252a2e}[_ngcontent-%COMP%]:ng-deep .d-flex[_ngcontent-%COMP%]{align-items:baseline}.bottomPadding[_ngcontent-%COMP%]{padding-bottom:2%}.onlyMobile[_ngcontent-%COMP%]{display:none}@media only screen and (max-width: 960px){.onlyMobile[_ngcontent-%COMP%]{display:block} .notMobile{display:none!important} .bottomPadding{padding-bottom:0%}.newHelpIcon[_ngcontent-%COMP%]{transform:scale(1.5);align-self:flex-end;color:#0063a3}}"]});class F0{constructor(n,e,i){this.sharedService=n,this.getAuthTokenService=e,this.customMapService=i}updateOption(n,e){this.sharedService.emitIsPrinted({id:e,isprinted:n.checked})}}F0.\u0275fac=function(n){return new(n||F0)(z(Sc),z(yu),z(lp))},F0.\u0275cmp=Rn({type:F0,selectors:[["link-cell"]],inputs:{is_printed:"is_printed",id:"id"},decls:1,vars:1,consts:[[3,"checked","checkedChange","change"]],template:function(n,e){1&n&&(se(0,"mat-checkbox",0),Nt("checkedChange",function(r){return e.is_printed=r})("change",function(r){return e.updateOption(r,e.id)}),he()),2&n&&Ae("checked",e.is_printed)},dependencies:[SB],encapsulation:2});class L0{constructor(n){this.sharedService=n}redirectToSeachGeo(n){this.sharedService.emitSearchGeoUrl(n)}}L0.\u0275fac=function(n){return new(n||L0)(z(Sc))},L0.\u0275cmp=Rn({type:L0,selectors:[["link-cell"]],inputs:{data:"data"},decls:2,vars:1,consts:[[2,"cursor","pointer","text-decoration","underline","color","blue",3,"click"]],template:function(n,e){1&n&&(se(0,"a",0),Nt("click",function(){return e.redirectToSeachGeo(e.data.value)}),Ze(1),he()),2&n&&(Se(1),Wr(e.data.value.id))},encapsulation:2});const vee=new vt("MAT_SORT_DEFAULT_OPTIONS"),bee=KP(c_(class{}));let xee=(()=>{class t extends bee{constructor(e){super(),this._defaultOptions=e,this.sortables=new Map,this._stateChanges=new Zt,this.start="asc",this._direction="",this.sortChange=new In}get direction(){return this._direction}set direction(e){this._direction=e}get disableClear(){return this._disableClear}set disableClear(e){this._disableClear=kn(e)}register(e){this.sortables.set(e.id,e)}deregister(e){this.sortables.delete(e.id)}sort(e){this.active!=e.id?(this.active=e.id,this.direction=e.start?e.start:this.start):this.direction=this.getNextSortDirection(e),this.sortChange.emit({active:this.active,direction:this.direction})}getNextSortDirection(e){if(!e)return"";let r=function wee(t,n){let e=["asc","desc"];return"desc"==t&&e.reverse(),n||e.push(""),e}(e.start||this.start,e?.disableClear??this.disableClear??!!this._defaultOptions?.disableClear),s=r.indexOf(this.direction)+1;return s>=r.length&&(s=0),r[s]}ngOnInit(){this._markInitialized()}ngOnChanges(){this._stateChanges.next()}ngOnDestroy(){this._stateChanges.complete()}}return t.\u0275fac=function(e){return new(e||t)(z(vee,8))},t.\u0275dir=Ge({type:t,selectors:[["","matSort",""]],hostAttrs:[1,"mat-sort"],inputs:{disabled:["matSortDisabled","disabled"],active:["matSortActive","active"],start:["matSortStart","start"],direction:["matSortDirection","direction"],disableClear:["matSortDisableClear","disableClear"]},outputs:{sortChange:"matSortChange"},exportAs:["matSort"],features:[a,Hi]}),t})();class B0{constructor(n,e){this.cfr=n,this.vc=e}ngOnInit(){const n=this.cfr.resolveComponentFactory(this.component),e=this.vc.createComponent(n);this.inputs&&(e.instance.data=this.inputs)}}B0.\u0275fac=function(n){return new(n||B0)(z($r),z(ro))},B0.\u0275dir=Ge({type:B0,selectors:[["","dynamicCell",""]],inputs:{component:"component",inputs:"inputs"}});class N0{constructor(n,e){this.cfr=n,this.vc=e}ngOnInit(){const n=this.cfr.resolveComponentFactory(this.component),e=this.vc.createComponent(n);this.inputs&&Object.keys(this.inputs).forEach(i=>{e.instance[i]=this.inputs[i]})}}function Mee(t,n){if(1&t){const e=wi();se(0,"button",17),Nt("click",function(){return Wn(e),qn(Et().reset())}),se(1,"mat-icon"),Ze(2,"close"),he()()}}function See(t,n){if(1&t&&(se(0,"th",26),Ze(1),he()),2&t){const e=Et().$implicit;Se(1),no(" ",e.id," ")}}function Dee(t,n){if(1&t&&(se(0,"td",28),Ze(1),he()),2&t){const e=n.$implicit,i=Et(2).$implicit;Se(1),no(" ",e[i.id]," ")}}function Eee(t,n){1&t&&(Li(0),Mt(1,Dee,2,1,"td",27),Bi())}N0.\u0275fac=function(n){return new(n||N0)(z($r),z(ro))},N0.\u0275dir=Ge({type:N0,selectors:[["","dynamicCheckbox",""]],inputs:{component:"component",inputs:"inputs"}});const Tee=function(t){return{value:t}};function Aee(t,n){if(1&t&&(se(0,"td",28),Gi(1,29),he()),2&t){const e=n.$implicit,i=Et(2).$implicit;Se(1),Ae("component",i.dynamicCellComponent)("inputs",Ns(2,Tee,e))}}function Iee(t,n){1&t&&(Li(0),Mt(1,Aee,2,4,"td",27),Bi())}function kee(t,n){if(1&t&&(se(0,"td",28),Gi(1,30),he()),2&t){const e=n.$implicit,i=Et(2).$implicit;Se(1),Ae("component",i.dynamicCheckboxComponent)("inputs",e[i.id])}}function Ree(t,n){1&t&&(Li(0),Mt(1,kee,2,2,"td",27),Bi())}function Pee(t,n){if(1&t&&(Li(0)(1,23),Mt(2,See,2,1,"th",24),Mt(3,Eee,2,0,"ng-container",25),Mt(4,Iee,2,0,"ng-container",25),Mt(5,Ree,2,0,"ng-container",25),Bi()()),2&t){const e=n.$implicit;Se(1),Ae("matColumnDef",e.id),Se(2),Ae("ngIf",!e.dynamicCheckboxComponent&&!e.dynamicCellComponent),Se(1),Ae("ngIf",e.dynamicCellComponent),Se(1),Ae("ngIf",e.dynamicCheckboxComponent)}}function Oee(t,n){1&t&&ut(0,"tr",31)}function Fee(t,n){1&t&&ut(0,"tr",32)}function Lee(t,n){if(1&t&&(se(0,"div",18)(1,"mat-table",19),Mt(2,Pee,6,4,"ng-container",20),Mt(3,Oee,1,0,"tr",21),Mt(4,Fee,1,0,"tr",22),he()()),2&t){const e=Et();Se(1),Ae("dataSource",e.dataSource),Se(1),Ae("ngForOf",e.columnsDef),Se(1),Ae("matHeaderRowDef",e.displayedColumns)("matHeaderRowDefSticky",!0),Se(1),Ae("matRowDefColumns",e.displayedColumns)}}function Bee(t,n){1&t&&(se(0,"div",18)(1,"h3"),Ze(2,"No Records Found"),he()())}function Nee(t,n){1&t&&(se(0,"div",33)(1,"div",34)(2,"div",35),ut(3,"span",36),he(),se(4,"div",37)(5,"strong"),Ze(6,"Loading.."),he()()()())}const zee=function(){return[10,25,100]};class z0{constructor(n,e,i,r,s,d){this.getAuthTokenService=n,this.wrappers=e,this._snackBar=i,this.customMapService=r,this.authenticationService=s,this.sharedService=d,this.columnsDef=[],this.isShow=!1,this.isDisabled=!0,this.isTrimmed=!0,this.floatEnable="never",this.showSpinner=!1,this.selection=[],this.searchText="",this.pageSize=10,this.currentPage=0,this.totalSize=0,this.showPrintedData=!1,this.timeout_txtsearch=null,this.me=this,this.users=[],this.currentUserSubscription=this.authenticationService.currentUser.subscribe(_=>{this.currentUser=_})}ngOnInit(){this.getDetails(),this.sharedService.searchGeoUrl.subscribe(n=>{var e="lat="+n.latitude;e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=e+"&lon="+n.longitude)+"&mapsource="+n.map_type)+"&producttype="+("L"==n.map_format?"L":"E"))+"&mapsize="+n.paper_size)+"&orientation="+n.orientation)+"&printscale="+n.map_scale)+"&title="+this.wrappers.EncodeParam(n.title))+"&owner="+this.wrappers.EncodeParam(n.owner_name))+"&latlon="+n.ll_coordinate_grid)+"&utm="+n.other_coordinate_grid)+"&ship="+("F"==n.map_format?"F":"R"),window.open("https://www.mytopo.com/searchgeo.cfm?"+e,"_blank"),this.subscription=function yee(t=0,n=Qv){return t<0&&(t=0),T2(t,t,n)}(3e5).subscribe(i=>{this.getDetails()})}),this.sharedService.postIsPrinted.subscribe(n=>{this.selection.push(n)})}reset(){this.searchText="",this.getDetails()}applyFilter(n){("Enter"===n.key||13===n.keyCode)&&(this.currentPage=0,this.getDetails())}handlePage(n){this.currentPage=n.pageIndex,this.pageSize=n.pageSize,this.iterator(),this.getDetails()}iterator(){const i=this.array.slice(this.currentPage*this.pageSize,(this.currentPage+1)*this.pageSize);this.dataSource=i}save(){this.selection.length>0?(this.showSpinner=!0,this.getAuthTokenService.getAuthToken().subscribe(n=>{null!=n&&(this.latest_token=n.access_token.toString(),Ra(this.customMapService.putCustomMapDetails(this.selection,this.latest_token)).then(e=>{this.showSpinner=!1,e&&(this.getDetails(),this.selection.length=0,this.openSnackBar("Data Successfully Saved","Close"))}).catch(e=>{this.openSnackBar(e.message.toString(),"Close")}))})):this.openSnackBar("ERROR: Please select a record.","Close")}page(){null==this.dataSource?setTimeout(()=>{this.page()},1e3):this.dataSource.sort=this.sort}ngOnDestroy(){this.currentUserSubscription.unsubscribe(),this.subscription.unsubscribe()}getDetails(){this.showSpinner=!0,this.getAuthTokenService.getAuthToken().subscribe(n=>{null!=n&&(this.latest_token=n.access_token.toString(),Ra(this.customMapService.getCustomMapDetails(this.searchText,this.pageSize*this.currentPage,this.pageSize,this.showPrintedData,this.latest_token)).then(e=>{if(e.length>0){Ra(this.customMapService.getTotalCustomMap(this.searchText,this.showPrintedData,this.latest_token)).then(r=>{this.totalItems=r}),this.dataSource=new FK(e),this.array=e;const i=[];Object.keys(this.dataSource.filteredData[0]).forEach(function(r){"id"==r.toLowerCase()?i.push({id:r,dynamicCellComponent:L0}):"isprinted"==r.toLowerCase()?i.push({id:r,dynamicCheckboxComponent:F0}):i.push({id:r})}),this.columnsDef=i,this.displayedColumns=this.columnsDef.map(r=>r.id),this.isShow=!0,this.showSpinner=!1}else this.isShow=!1,this.showSpinner=!1}))})}isSticky(n){return"ischanged"===n.toLowerCase()}openSnackBar(n,e){this._snackBar.open(n,e,{duration:2e3})}}z0.\u0275fac=function(n){return new(n||z0)(z(yu),z(Od),z(IB),z(lp),z(Ld),z(Sc))},z0.\u0275cmp=Rn({type:z0,selectors:[["app-custom-map-details"]],viewQuery:function(n,e){if(1&n&&(Yi(wB,5),Yi(xee,5)),2&n){let i;fn(i=mn())&&(e.paginator=i.first),fn(i=mn())&&(e.sort=i.first)}},decls:26,vars:11,consts:[[1,"container-fluid"],[1,"row","align-items-center"],[1,"col-4"],[1,"mat-typography"],["appearance","outline",2,"width","100%"],["matInput","","placeholder","Type the Search text and press Enter",3,"ngModel","ngModelChange","keyup"],["searchtxt",""],["mat-icon-button","","matSuffix","","aria-label","Clear",3,"click",4,"ngIf"],["justify-content-end","",1,"col",2,"text-align","end"],[3,"ngModel","change","ngModelChange"],["mat-icon-button","","aria-label","Save","title","save",1,"float-right",3,"click"],[1,"col-5"],["showFirstLastButtons","",1,"float-left",3,"length","pageSize","pageSizeOptions","pageIndex","page"],["paginator",""],[1,"row"],["class","displayBillDetails disable-scrollbars justify-content-center",4,"ngIf"],["class","whiteout",4,"ngIf"],["mat-icon-button","","matSuffix","","aria-label","Clear",3,"click"],[1,"displayBillDetails","disable-scrollbars","justify-content-center"],["mat-table","","matsort","",1,"mat-elevation-z8",3,"dataSource"],[4,"ngFor","ngForOf"],["mat-header-row","",4,"matHeaderRowDef","matHeaderRowDefSticky"],["mat-row","",4,"matRowDef","matRowDefColumns"],[3,"matColumnDef"],["mat-header-cell","",4,"matHeaderCellDef"],[4,"ngIf"],["mat-header-cell",""],["mat-cell","",4,"matCellDef"],["mat-cell",""],["dynamicCell","",3,"component","inputs"],["dynamicCheckbox","",3,"component","inputs"],["mat-header-row",""],["mat-row",""],[1,"whiteout"],[1,"spinner-div"],["role","status",1,"spinner-border"],["id","loading",1,"sr-only"],[1,"",2,"text-align","center","margin-top","10px"]],template:function(n,e){1&n&&(ut(0,"hr"),se(1,"div",0)(2,"div",1)(3,"div",2)(4,"mat-dialog-content",3)(5,"mat-form-field",4)(6,"mat-label"),Ze(7,"Quick Filter"),he(),se(8,"input",5,6),Nt("ngModelChange",function(r){return e.searchText=r})("keyup",function(r){return e.applyFilter(r)}),he(),Mt(10,Mee,3,0,"button",7),he()()(),se(11,"div",8)(12,"mat-slide-toggle",9),Nt("change",function(){return e.getDetails()})("ngModelChange",function(r){return e.showPrintedData=r}),Ze(13,"Show Printed Maps "),he()(),se(14,"div",8)(15,"button",10),Nt("click",function(){return e.save()}),se(16,"mat-icon"),Ze(17,"save"),he()()(),Ze(18," | "),se(19,"div",11)(20,"mat-paginator",12,13),Nt("page",function(r){return e.handlePage(r)}),he()()(),se(22,"div",14),Mt(23,Lee,5,5,"div",15),he()(),Mt(24,Bee,3,0,"div",15),Mt(25,Nee,7,0,"div",16)),2&n&&(Se(8),Ae("ngModel",e.searchText),Se(2),Ae("ngIf",e.searchText),Se(2),Ae("ngModel",e.showPrintedData),Se(8),Ae("length",e.totalItems)("pageSize",e.pageSize)("pageSizeOptions",RM(10,zee))("pageIndex",e.currentPage),Se(3),Ae("ngIf",e.isShow),Se(1),Ae("ngIf",!e.isShow),Se(1),Ae("ngIf",e.showSpinner))},dependencies:[$g,Ya,d_,t0,nC,Td,em,jE,NC,nY,BL,HE,XE,KL,aT,QL,lT,sT,JL,cT,uT,eB,tB,wB,B0,N0],styles:['@import"https://fonts.googleapis.com/icon?family=Material+Icons";.disable-scrollbars[_ngcontent-%COMP%]{-ms-overflow-style:none}.disable-scrollbars[_ngcontent-%COMP%]::-webkit-scrollbar{width:0;height:10px}.disable-scrollbars[_ngcontent-%COMP%] [_ngcontent-%COMP%]::-webkit-scrollbar-track{box-shadow:inset 0 0 5px gray;border-radius:15px}.disable-scrollbars[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{background:rgb(52,154,216);border-radius:5px}.disable-scrollbars[_ngcontent-%COMP%]::-webkit-scrollbar-thumb:hover{background:#005f9e;transform:scale(1.5)} .mat-radio-checked .mat-radio-outer-circle{border-color:#ffbe00!important} .mat-radio-button.mat-accent .mat-radio-inner-circle{background-color:#ffbe00}.mat-select-panel[_ngcontent-%COMP%]{background-color:#005f9e}.mat-select-panel[_ngcontent-%COMP%] .mat-option.mat-selected[_ngcontent-%COMP%]:not(.mat-option-multiple){background:linear-gradient(-180deg,rgba(52,154,217,.5) 0%,rgba(52,154,216,.8) 6%,rgba(52,154,216,.9) 10%)}.mat-primary[_ngcontent-%COMP%] .mat-option.mat-selected[_ngcontent-%COMP%]:not(.mat-option-disabled){font-weight:700;color:#fff} .mat-form-field.mat-focused.mat-primary .mat-select-arrow{color:#ffbe00!important} .mat-form-field.mat-focused .mat-form-field-required-marker{color:#ffbe00}.btn-link[_ngcontent-%COMP%]{padding:0;margin:0;height:12px}.bgDiv[_ngcontent-%COMP%]{width:100vw;color:#005f9e;margin:0}.mat-form-field[_ngcontent-%COMP%]{padding-right:12px;color:#fff} input.mat-input-element, .mat-icon-button[_ngcontent-%COMP%]{color:#000} tr.mat-header-row{min-height:25px!important;height:0!important;vertical-align:middle} tr.mat-row, tr.mat-footer-row[_ngcontent-%COMP%]{height:25px!important} th.mat-header-cell, td.mat-cell[_ngcontent-%COMP%], td.mat-footer-cell[_ngcontent-%COMP%]{padding:9px!important;border-bottom-width:1px!important;border-bottom-style:solid!important;height:0!important} tr.mat-row, tr.mat-footer-row[_ngcontent-%COMP%]{min-height:25px!important} .mat-focused .mat-form-field-label{color:#ffbe00!important} .mat-table{padding:0!important;display:table} .mat-form-field-ripple, .mat-form-field-underline{background-color:#ffbe00!important} .mat-form-field-appearance-legacy .mat-form-field-infix{font-size:larger} .mat-raised-button{background:rgb(52,154,216);font-size:medium;color:#f3f3f3;margin:2px} th .mat-header-cell{text-align:center!important;font-weight:700;font-style:"Open Sans",sans-serif;background-color:#005f9e;border:1px solid gray;text-transform:capitalize;color:#fff}.displayBillDetails[_ngcontent-%COMP%]{overflow:auto;border-bottom:solid 1px black;padding:5px;color:brown}.mat-column-title[_ngcontent-%COMP%]{white-space:normal;word-wrap:break-word;max-width:200px}.mat-column-ll_coordinate_grid[_ngcontent-%COMP%], .mat-column-other_coordinate_grid[_ngcontent-%COMP%], .mat-column-paper_size[_ngcontent-%COMP%], .mat-column-map_format[_ngcontent-%COMP%], .mat-column-map_type[_ngcontent-%COMP%], .mat-column-map-scale[_ngcontent-%COMP%]{white-space:normal;word-wrap:break-word;max-width:90px}.mat-column-id[_ngcontent-%COMP%], .mat-column-isprinted[_ngcontent-%COMP%]{text-align:center!important} .mat-table{color:#000;background-color:transparent;padding-top:5px}.mat-table-sticky[_ngcontent-%COMP%]{border-bottom:2px solid white} td .mat-cell{border:1px solid lightgray;color:#000;white-space:nowrap;word-wrap:break-word}.trimmed-radio-div[_ngcontent-%COMP%]{display:inline-block;padding-right:.5rem}.trimmed-radio-div[_ngcontent-%COMP%] .mat-radio-button[_ngcontent-%COMP%]{margin:5px}.trimmed-radio-div[_ngcontent-%COMP%] .trimmed-radio-group[_ngcontent-%COMP%]{display:block;flex-direction:column;margin:0}.trimmed-radio-div[_ngcontent-%COMP%] .trimmed-label[_ngcontent-%COMP%]{margin:0;color:#d3d3d3;font-weight:100;line-height:1.125;font-family:Roboto,Helvetica Neue,sans-serif;letter-spacing:normal} .mat-input-element:disabled .mat-form-field-underline{background:grey} .mat-form-field-disabled .mat-form-field-underline{background-image:linear-gradient(to right,rgb(0,0,0) 0,rgba(0,0,0,.42) 33%,#c2c7cc 0)!important;background-size:1px 100%!important;background-repeat:repeat-x!important}.whiteout[_ngcontent-%COMP%]{display:block;position:fixed;left:0;top:0;width:100%;height:100%;background-color:#ffffffe6;z-index:1000}.spinner-border[_ngcontent-%COMP%]{border:16px solid #f3f3f3;border-top:16px solid #3498db;width:120px;height:120px;margin:0;animation:_ngcontent-%COMP%_spin 2s linear infinite}@keyframes _ngcontent-%COMP%_spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.spinner-div[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-content:center;align-items:center;height:60vh;justify-content:center;position:absolute;height:200px;width:400px;margin:-100px 0 0 -200px;top:50%;left:50%} .mat-form-field-underline{background-color:#000!important}']});class P_{constructor(n,e){this.router=n,this.authenticationService=e}canActivate(n,e){return!!this.authenticationService.currentUserValue||(this.router.navigate(["/login"],{queryParams:{returnUrl:e.url}}),!1)}}P_.\u0275fac=function(n){return new(n||P_)(we(as),we(Ld))},P_.\u0275prov=rt({token:P_,factory:P_.\u0275fac,providedIn:"root"});class O_{constructor(n){this.router=n,this.subject=new Zt,this.keepAfterRouteChange=!1,this.router.events.subscribe(e=>{e instanceof _w&&(this.keepAfterRouteChange?this.keepAfterRouteChange=!1:this.clear())})}getAlert(){return this.subject.asObservable()}success(n,e=!1){this.keepAfterRouteChange=e,this.subject.next({type:"success",text:n})}error(n,e=!1){this.keepAfterRouteChange=e,this.subject.next({type:"error",text:n})}clear(){this.subject.next({})}}function Vee(t,n){1&t&&(se(0,"div"),Ze(1,"Username is required"),he())}function Gee(t,n){if(1&t&&(se(0,"div",10),Mt(1,Vee,2,0,"div",11),he()),2&t){const e=Et();Se(1),Ae("ngIf",e.f.username.errors.required)}}function Uee(t,n){1&t&&(se(0,"div"),Ze(1,"Password is required"),he())}function jee(t,n){if(1&t&&(se(0,"div",10),Mt(1,Uee,2,0,"div",11),he()),2&t){const e=Et();Se(1),Ae("ngIf",e.f.password.errors.required)}}function Hee(t,n){1&t&&(se(0,"div",12)(1,"h3"),Ze(2,"Invalid Username or Password!"),he()())}function $ee(t,n){1&t&&ut(0,"span",13)}O_.\u0275fac=function(n){return new(n||O_)(we(as))},O_.\u0275prov=rt({token:O_,factory:O_.\u0275fac,providedIn:"root"});const jB=function(t){return{"is-invalid":t}};class V0{constructor(n,e,i,r,s,d){this.formBuilder=n,this.route=e,this.router=i,this.authenticationService=r,this.alertService=s,this.getAuthTokenService=d,this.loading=!1,this.submitted=!1,this.errShow=!1,this.authenticationService.currentUserValue&&this.router.navigate(["/"])}ngOnInit(){this.loginForm=this.formBuilder.group({username:["",so.required],password:["",so.required]}),this.returnUrl=this.route.snapshot.queryParams.returnUrl||"/"}get f(){return this.loginForm.controls}onSubmit(){this.errShow&&(this.errShow=!1),this.submitted=!0,!this.loginForm.invalid&&(this.loading=!0,Ra(this.getAuthTokenService.getAuthToken()).then(n=>{null!=n&&this.authenticationService.login(this.f.username.value,this.f.password.value,n.access_token.toString()).pipe(xd()).subscribe(e=>{e?this.router.navigate([this.returnUrl]):(this.loading=!1,this.errShow=!0)},e=>{this.alertService.error(e),this.loading=!1})}))}}V0.\u0275fac=function(n){return new(n||V0)(z(p2),z(Jh),z(as),z(Ld),z(O_),z(yu))},V0.\u0275cmp=Rn({type:V0,selectors:[["ng-component"]],decls:18,vars:12,consts:[[3,"formGroup","ngSubmit"],[1,"form-group"],["for","username"],["type","text","formControlName","username",1,"form-control",3,"ngClass"],["class","invalid-feedback",4,"ngIf"],["for","password"],["type","password","formControlName","password",1,"form-control",3,"ngClass"],["class","red",4,"ngIf"],[1,"btn","btn-primary",3,"disabled"],["class","spinner-border spinner-border-sm mr-1",4,"ngIf"],[1,"invalid-feedback"],[4,"ngIf"],[1,"red"],[1,"spinner-border","spinner-border-sm","mr-1"]],template:function(n,e){1&n&&(se(0,"h2"),Ze(1,"Login"),he(),se(2,"form",0),Nt("ngSubmit",function(){return e.onSubmit()}),se(3,"div",1)(4,"label",2),Ze(5,"Username"),he(),ut(6,"input",3),Mt(7,Gee,2,1,"div",4),he(),se(8,"div",1)(9,"label",5),Ze(10,"Password"),he(),ut(11,"input",6),Mt(12,jee,2,1,"div",4),he(),Mt(13,Hee,3,0,"div",7),se(14,"div",1)(15,"button",8),Mt(16,$ee,1,0,"span",9),Ze(17," Login "),he()()()),2&n&&(Se(2),Ae("formGroup",e.loginForm),Se(4),Ae("ngClass",Ns(8,jB,e.submitted&&e.f.username.errors)),Se(1),Ae("ngIf",e.submitted&&e.f.username.errors),Se(4),Ae("ngClass",Ns(10,jB,e.submitted&&e.f.password.errors)),Se(1),Ae("ngIf",e.submitted&&e.f.password.errors),Se(1),Ae("ngIf",e.errShow),Se(2),Ae("disabled",e.loading),Se(1),Ae("ngIf",e.loading))},dependencies:[If,Ya,WD,d_,t0,LD,Hf,iC,BE],encapsulation:2});const Wee=[{path:"",component:O0,children:[{path:"findamap",component:Fd},{path:"login",component:V0},{path:"custommapdetails",component:z0,canActivate:[P_]},{path:"custommap",component:A_}]}];class F_{}F_.\u0275fac=function(n){return new(n||F_)},F_.\u0275mod=cn({type:F_}),F_.\u0275inj=nn({imports:[Rw.forChild(Wee),wL,Rw]});class L_{}L_.\u0275fac=function(n){return new(n||L_)},L_.\u0275mod=cn({type:L_,bootstrap:[$v]}),L_.\u0275inj=nn({providers:[sp,Od],imports:[$k,r_,cG,C8,d8,A8.withConfig({accessToken:ao_mapbox_accessToken}),M7,M9,z9,w0,kF,sW,aW,h8,cW,xX,wL,PL,VC,TY,VY,oK,RK,sB,CQ,GQ,JH,TB,eJ,pJ,F_]}),R4().bootstrapModule(L_).catch(t=>console.error(t))},2049:function(Gt,Bt,Je){var it;Gt=Je.nmd(Gt),function(tt){"object"==typeof global&&global;var me=function(At){this.message=At};(me.prototype=new Error).name="InvalidCharacterError";var Re=function(At){throw new me(At)},De="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ie=/[\t\n\f\r ]/g,Ot={encode:function(At){At=String(At),/[^\0-\xFF]/.test(At)&&Re("The string to be encoded contains characters outside of the Latin1 range.");for(var Ee,Ne,xe,ot,St=At.length%3,le="",Xe=-1,ft=At.length-St;++Xe>18&63)+De.charAt(ot>>12&63)+De.charAt(ot>>6&63)+De.charAt(63&ot);return 2==St?(Ee=At.charCodeAt(Xe)<<8,Ne=At.charCodeAt(++Xe),le+=De.charAt((ot=Ee+Ne)>>10)+De.charAt(ot>>4&63)+De.charAt(ot<<2&63)+"="):1==St&&(ot=At.charCodeAt(Xe),le+=De.charAt(ot>>2)+De.charAt(ot<<4&63)+"=="),le},decode:function(At){var St=(At=String(At).replace(Ie,"")).length;St%4==0&&(St=(At=At.replace(/==?$/,"")).length),(St%4==1||/[^+a-zA-Z0-9/]/.test(At))&&Re("Invalid character: the string to be decoded is not correctly encoded.");for(var Xe,Ee,le=0,Ne="",xe=-1;++xe>(-2*le&6)));return Ne},version:"0.1.0"};void 0!==(it=function(){return Ot}.call(Bt,Je,Bt,Gt))&&(Gt.exports=it)}()},9069:Gt=>{"use strict";var it,Bt="object"==typeof Reflect?Reflect:null,Je=Bt&&"function"==typeof Bt.apply?Bt.apply:function(xe,ht,ot){return Function.prototype.apply.call(xe,ht,ot)};it=Bt&&"function"==typeof Bt.ownKeys?Bt.ownKeys:Object.getOwnPropertySymbols?function(xe){return Object.getOwnPropertyNames(xe).concat(Object.getOwnPropertySymbols(xe))}:function(xe){return Object.getOwnPropertyNames(xe)};var Pe=Number.isNaN||function(xe){return xe!=xe};function h(){h.init.call(this)}Gt.exports=h,Gt.exports.once=function le(Ne,xe){return new Promise(function(ht,ot){function ft(yn){Ne.removeListener(xe,Lt),ot(yn)}function Lt(){"function"==typeof Ne.removeListener&&Ne.removeListener("error",ft),ht([].slice.call(arguments))}Ee(Ne,xe,Lt,{once:!0}),"error"!==xe&&function Xe(Ne,xe,ht){"function"==typeof Ne.on&&Ee(Ne,"error",xe,ht)}(Ne,ft,{once:!0})})},h.EventEmitter=h,h.prototype._events=void 0,h.prototype._eventsCount=0,h.prototype._maxListeners=void 0;var $=10;function me(Ne){if("function"!=typeof Ne)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof Ne)}function Re(Ne){return void 0===Ne._maxListeners?h.defaultMaxListeners:Ne._maxListeners}function De(Ne,xe,ht,ot){var ft,Lt,yn;if(me(ht),void 0===(Lt=Ne._events)?(Lt=Ne._events=Object.create(null),Ne._eventsCount=0):(void 0!==Lt.newListener&&(Ne.emit("newListener",xe,ht.listener?ht.listener:ht),Lt=Ne._events),yn=Lt[xe]),void 0===yn)yn=Lt[xe]=ht,++Ne._eventsCount;else if("function"==typeof yn?yn=Lt[xe]=ot?[ht,yn]:[yn,ht]:ot?yn.unshift(ht):yn.push(ht),(ft=Re(Ne))>0&&yn.length>ft&&!yn.warned){yn.warned=!0;var On=new Error("Possible EventEmitter memory leak detected. "+yn.length+" "+String(xe)+" listeners added. Use emitter.setMaxListeners() to increase limit");On.name="MaxListenersExceededWarning",On.emitter=Ne,On.type=xe,On.count=yn.length,function tt(Ne){console&&console.warn&&console.warn(Ne)}(On)}return Ne}function Ie(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function ct(Ne,xe,ht){var ot={fired:!1,wrapFn:void 0,target:Ne,type:xe,listener:ht},ft=Ie.bind(ot);return ft.listener=ht,ot.wrapFn=ft,ft}function zt(Ne,xe,ht){var ot=Ne._events;if(void 0===ot)return[];var ft=ot[xe];return void 0===ft?[]:"function"==typeof ft?ht?[ft.listener||ft]:[ft]:ht?function St(Ne){for(var xe=new Array(Ne.length),ht=0;ht0&&(yn=ht[0]),yn instanceof Error)throw yn;var On=new Error("Unhandled error."+(yn?" ("+yn.message+")":""));throw On.context=yn,On}var Mi=Lt[xe];if(void 0===Mi)return!1;if("function"==typeof Mi)Je(Mi,this,ht);else{var vn=Mi.length,co=Ut(Mi,vn);for(ot=0;ot=0;yn--)if(ot[yn]===ht||ot[yn].listener===ht){On=ot[yn].listener,Lt=yn;break}if(Lt<0)return this;0===Lt?ot.shift():function At(Ne,xe){for(;xe+1=0;ft--)this.removeListener(xe,ht[ft]);return this},h.prototype.listeners=function(xe){return zt(this,xe,!0)},h.prototype.rawListeners=function(xe){return zt(this,xe,!1)},h.listenerCount=function(Ne,xe){return"function"==typeof Ne.listenerCount?Ne.listenerCount(xe):Ot.call(Ne,xe)},h.prototype.listenerCount=Ot,h.prototype.eventNames=function(){return this._eventsCount>0?it(this._events):[]}},5780:Gt=>{var Je;Gt.exports=Je={},Je.simpleFilter=function(it,tt){return tt.filter(function(Pe){return Je.test(it,Pe)})},Je.test=function(it,tt){return null!==Je.match(it,tt)},Je.match=function(it,tt,Pe){var Ot,h=0,$=[],me=tt.length,Re=0,De=0,Ie=(Pe=Pe||{}).pre||"",ct=Pe.post||"",zt=Pe.caseSensitive&&tt||tt.toLowerCase();it=Pe.caseSensitive&&it||it.toLowerCase();for(var Ut=0;Ut{"use strict";var Bt=Object.prototype.toString;Gt.exports=function(Je){var it;return"[object Object]"===Bt.call(Je)&&(null===(it=Object.getPrototypeOf(Je))||it===Object.getPrototypeOf({}))}},3082:Gt=>{var tt=/^\s+|\s+$/g,Pe=/^[-+]0x[0-9a-f]+$/i,h=/^0b[01]+$/i,$=/^0o[0-7]+$/i,me=parseInt,Re="object"==typeof global&&global&&global.Object===Object&&global,De="object"==typeof self&&self&&self.Object===Object&&self,Ie=Re||De||Function("return this")(),zt=Object.prototype.toString,Ot=Math.max,Ut=Math.min,At=function(){return Ie.Date.now()};function le(xe){var ht=typeof xe;return!!xe&&("object"==ht||"function"==ht)}function Ne(xe){if("number"==typeof xe)return xe;if(function Ee(xe){return"symbol"==typeof xe||function Xe(xe){return!!xe&&"object"==typeof xe}(xe)&&"[object Symbol]"==zt.call(xe)}(xe))return NaN;if(le(xe)){var ht="function"==typeof xe.valueOf?xe.valueOf():xe;xe=le(ht)?ht+"":ht}if("string"!=typeof xe)return 0===xe?xe:+xe;xe=xe.replace(tt,"");var ot=h.test(xe);return ot||$.test(xe)?me(xe.slice(2),ot?2:8):Pe.test(xe)?NaN:+xe}Gt.exports=function St(xe,ht,ot){var ft,Lt,yn,On,Mi,vn,co=0,Nr=!1,Yo=!1,Ms=!0;if("function"!=typeof xe)throw new TypeError("Expected a function");function xn(Nn){var Cr=ft,Jt=Lt;return ft=Lt=void 0,co=Nn,On=xe.apply(Jt,Cr)}function Pa(Nn){return co=Nn,Mi=setTimeout(Bo,ht),Nr?xn(Nn):On}function Ss(Nn){var Cr=Nn-vn;return void 0===vn||Cr>=ht||Cr<0||Yo&&Nn-co>=yn}function Bo(){var Nn=At();if(Ss(Nn))return Zt(Nn);Mi=setTimeout(Bo,function Nl(Nn){var Ji=ht-(Nn-vn);return Yo?Ut(Ji,yn-(Nn-co)):Ji}(Nn))}function Zt(Nn){return Mi=void 0,Ms&&ft?xn(Nn):(ft=Lt=void 0,On)}function bi(){var Nn=At(),Cr=Ss(Nn);if(ft=arguments,Lt=this,vn=Nn,Cr){if(void 0===Mi)return Pa(vn);if(Yo)return Mi=setTimeout(Bo,ht),xn(vn)}return void 0===Mi&&(Mi=setTimeout(Bo,ht)),On}return ht=Ne(ht)||0,le(ot)&&(Nr=!!ot.leading,yn=(Yo="maxWait"in ot)?Ot(Ne(ot.maxWait)||0,ht):yn,Ms="trailing"in ot?!!ot.trailing:Ms),bi.cancel=function ca(){void 0!==Mi&&clearTimeout(Mi),co=0,ft=vn=Lt=Mi=void 0},bi.flush=function Mo(){return void 0===Mi?On:Zt(At())},bi}},9898:function(Gt){Gt.exports=function(){"use strict";var Bt,Je,it;function tt(h,$){if(Bt)if(Je){var me="self.onerror = function() { console.error('An error occurred while parsing the WebWorker bundle. This is most likely due to improper transpilation by Babel; please see https://docs.mapbox.com/mapbox-gl-js/guides/install/#transpiling'); }; var sharedChunk = {}; ("+Bt+")(sharedChunk); ("+Je+")(sharedChunk); self.onerror = null;",Re={};Bt(Re),it=$(Re),typeof window<"u"&&window&&window.URL&&window.URL.createObjectURL&&(it.workerUrl=window.URL.createObjectURL(new Blob([me],{type:"text/javascript"})))}else Je=$;else Bt=$}return tt(0,function(h){var $=typeof self<"u"?self:{},me="2.12.1";let Re;const De={API_URL:"https://api.mapbox.com",get API_URL_REGEX(){if(null==Re){const l=/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/|\?|$)/i;try{Re=null!=process.env.API_URL_REGEX?new RegExp(process.env.API_URL_REGEX):l}catch{Re=l}}return Re},get API_TILEJSON_REGEX(){return/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/v[0-9]*\/.*\.json.*$)/i},get API_SPRITE_REGEX(){return/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/styles\/v[0-9]*\/)(.*\/sprite.*\..*$)/i},get API_FONTS_REGEX(){return/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/fonts\/v[0-9]*\/)(.*\.pbf.*$)/i},get API_STYLE_REGEX(){return/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/styles\/v[0-9]*\/)(.*$)/i},get API_CDN_URL_REGEX(){return/^((https?:)?\/\/)?api\.mapbox\.c(n|om)(\/mapbox-gl-js\/)(.*$)/i},get EVENTS_URL(){return this.API_URL?0===this.API_URL.indexOf("https://api.mapbox.cn")?"https://events.mapbox.cn/events/v2":0===this.API_URL.indexOf("https://api.mapbox.com")?"https://events.mapbox.com/events/v2":null:null},SESSION_PATH:"/map-sessions/v1",FEEDBACK_URL:"https://apps.mapbox.com/feedback",TILE_URL_VERSION:"v4",RASTER_URL_PREFIX:"raster/v1",REQUIRE_ACCESS_TOKEN:!0,ACCESS_TOKEN:null,MAX_PARALLEL_IMAGE_REQUESTS:16},Ie={supported:!1,testSupport:function(l){!Ot&&zt&&(Ut?At(l):ct=l)}};let ct,zt,Ot=!1,Ut=!1;function At(l){const o=l.createTexture();l.bindTexture(l.TEXTURE_2D,o);try{if(l.texImage2D(l.TEXTURE_2D,0,l.RGBA,l.RGBA,l.UNSIGNED_BYTE,zt),l.isContextLost())return;Ie.supported=!0}catch{}l.deleteTexture(o),Ot=!0}$.document&&(zt=$.document.createElement("img"),zt.onload=function(){ct&&At(ct),ct=null,Ut=!0},zt.onerror=function(){Ot=!0,ct=null},zt.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=");const St="01";var le=Xe;function Xe(l,o,a,u){this.cx=3*l,this.bx=3*(a-l)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*o,this.by=3*(u-o)-this.cy,this.ay=1-this.cy-this.by,this.p1x=l,this.p1y=o,this.p2x=a,this.p2y=u}Xe.prototype={sampleCurveX:function(l){return((this.ax*l+this.bx)*l+this.cx)*l},sampleCurveY:function(l){return((this.ay*l+this.by)*l+this.cy)*l},sampleCurveDerivativeX:function(l){return(3*this.ax*l+2*this.bx)*l+this.cx},solveCurveX:function(l,o){if(void 0===o&&(o=1e-6),l<0)return 0;if(l>1)return 1;for(var a=l,u=0;u<8;u++){var f=this.sampleCurveX(a)-l;if(Math.abs(f)f?v=a:x=a,a=.5*(x-v)+v;return a},solve:function(l,o){return this.sampleCurveY(this.solveCurveX(l,o))}};var Ee=Ne;function Ne(l,o){this.x=l,this.y=o}Ne.prototype={clone:function(){return new Ne(this.x,this.y)},add:function(l){return this.clone()._add(l)},sub:function(l){return this.clone()._sub(l)},multByPoint:function(l){return this.clone()._multByPoint(l)},divByPoint:function(l){return this.clone()._divByPoint(l)},mult:function(l){return this.clone()._mult(l)},div:function(l){return this.clone()._div(l)},rotate:function(l){return this.clone()._rotate(l)},rotateAround:function(l,o){return this.clone()._rotateAround(l,o)},matMult:function(l){return this.clone()._matMult(l)},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(l){return this.x===l.x&&this.y===l.y},dist:function(l){return Math.sqrt(this.distSqr(l))},distSqr:function(l){var o=l.x-this.x,a=l.y-this.y;return o*o+a*a},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(l){return Math.atan2(this.y-l.y,this.x-l.x)},angleWith:function(l){return this.angleWithSep(l.x,l.y)},angleWithSep:function(l,o){return Math.atan2(this.x*o-this.y*l,this.x*l+this.y*o)},_matMult:function(l){var o=l[2]*this.x+l[3]*this.y;return this.x=l[0]*this.x+l[1]*this.y,this.y=o,this},_add:function(l){return this.x+=l.x,this.y+=l.y,this},_sub:function(l){return this.x-=l.x,this.y-=l.y,this},_mult:function(l){return this.x*=l,this.y*=l,this},_div:function(l){return this.x/=l,this.y/=l,this},_multByPoint:function(l){return this.x*=l.x,this.y*=l.y,this},_divByPoint:function(l){return this.x/=l.x,this.y/=l.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var l=this.y;return this.y=this.x,this.x=-l,this},_rotate:function(l){var o=Math.cos(l),a=Math.sin(l),u=a*this.x+o*this.y;return this.x=o*this.x-a*this.y,this.y=u,this},_rotateAround:function(l,o){var a=Math.cos(l),u=Math.sin(l),f=o.y+u*(this.x-o.x)+a*(this.y-o.y);return this.x=o.x+a*(this.x-o.x)-u*(this.y-o.y),this.y=f,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},Ne.convert=function(l){return l instanceof Ne?l:Array.isArray(l)?new Ne(l[0],l[1]):l};const xe=Math.PI/180,ht=180/Math.PI;function ot(l){return l*xe}function ft(l){return l*ht}const Lt=[[0,0],[1,0],[1,1],[0,1]];function yn(l){if(l<=0)return 0;if(l>=1)return 1;const o=l*l,a=o*l;return 4*(l<.5?a:3*(l-o)+a-.75)}function On(l,o,a,u){const f=new le(l,o,a,u);return function(g){return f.solve(g)}}const Mi=On(.25,.1,.25,1);function vn(l,o,a){return Math.min(a,Math.max(o,l))}function co(l,o,a){return(a=vn((a-l)/(o-l),0,1))*a*(3-2*a)}function Nr(l,o,a){const u=a-o,f=((l-o)%u+u)%u+o;return f===o?a:f}function Yo(l,o,a){if(!l.length)return a(null,[]);let u=l.length;const f=new Array(l.length);let g=null;l.forEach((v,x)=>{o(v,(M,D)=>{M&&(g=M),f[x]=D,0==--u&&a(g,f)})})}function Ms(l){const o=[];for(const a in l)o.push(l[a]);return o}function xn(l,...o){for(const a of o)for(const u in a)l[u]=a[u];return l}let Pa=1;function Nl(){return Pa++}function Ss(){return function l(o){return o?(o^Math.random()*(16>>o/4)).toString(16):([1e7]+-[1e3]+-4e3+-8e3+-1e11).replace(/[018]/g,l)}()}function Bo(l){return l<=1?1:Math.pow(2,Math.ceil(Math.log(l)/Math.LN2))}function Zt(l){return!!l&&/^[0-9a-f]{8}-[0-9a-f]{4}-[4][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(l)}function ca(l,o){l.forEach(a=>{o[a]&&(o[a]=o[a].bind(o))})}function Mo(l,o){return-1!==l.indexOf(o,l.length-o.length)}function bi(l,o,a){const u={};for(const f in l)u[f]=o.call(a||this,l[f],f,l);return u}function Nn(l,o,a){const u={};for(const f in l)o.call(a||this,l[f],f,l)&&(u[f]=l[f]);return u}function Cr(l){return Array.isArray(l)?l.map(Cr):"object"==typeof l&&l?bi(l,Cr):l}const Jt={};function Ji(l){Jt[l]||(typeof console<"u"&&console.warn(l),Jt[l]=!0)}function ua(l,o,a){return(a.y-l.y)*(o.x-l.x)>(o.y-l.y)*(a.x-l.x)}function li(l){let o=0;for(let a,u,f=0,g=l.length,v=g-1;f@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,(a,u,f,g)=>{const v=f||g;return o[u]=!v||v.toLowerCase(),""}),o["max-age"]){const a=parseInt(o["max-age"],10);isNaN(a)?delete o["max-age"]:o["max-age"]=a}return o}let nl=null;function xu(l){if(null==nl){const o=l.navigator?l.navigator.userAgent:null;nl=!!l.safari||!(!o||!(/\b(iPad|iPhone|iPod)\b/.test(o)||o.match("Safari")&&!o.match("Chrome")))}return nl}function Gd(l){try{const o=$[l];return o.setItem("_mapbox_test_",1),o.removeItem("_mapbox_test_"),!0}catch{return!1}}function zl(l,o){return[l[4*o],l[4*o+1],l[4*o+2],l[4*o+3]]}const dp="mapbox-tiles";let Ko,il,wu=500,Dc=50;function Cu(){try{return $.caches}catch{}}function Oa(){Cu()&&!Ko&&(Ko=$.caches.open(dp))}function Mu(l){const o=l.indexOf("?");if(o<0)return l;const u=function(f){const g=f.indexOf("?");return g>0?f.slice(g+1).split("&"):[]}(l).filter(f=>{const g=f.split("=");return"language"===g[0]||"worldview"===g[0]});return u.length?`${l.slice(0,o)}?${u.join("&")}`:l.slice(0,o)}let Su=1/0;const Ds={Unknown:"Unknown",Style:"Style",Source:"Source",Tile:"Tile",Glyphs:"Glyphs",SpriteImage:"SpriteImage",SpriteJSON:"SpriteJSON",Image:"Image"};"function"==typeof Object.freeze&&Object.freeze(Ds);class Ud extends Error{constructor(o,a,u){401===a&&Au(u)&&(o+=": you may have provided an invalid Mapbox access token. See https://docs.mapbox.com/api/overview/#access-tokens-and-token-scopes"),super(o),this.status=a,this.url=u}toString(){return`${this.name}: ${this.message} (${this.status}): ${this.url}`}}const Es=da()?()=>self.worker&&self.worker.referrer:()=>("blob:"===$.location.protocol?$.parent:$).location.href,rl=function(l,o){if(!(/^file:/.test(a=l.url)||/^file:/.test(Es())&&!/^\w+:/.test(a))){if($.fetch&&$.Request&&$.AbortController&&$.Request.prototype.hasOwnProperty("signal"))return function(u,f){const g=new $.AbortController,v=new $.Request(u.url,{method:u.method||"GET",body:u.body,credentials:u.credentials,headers:u.headers,referrer:Es(),signal:g.signal});let x=!1,M=!1;const D=(A=v.url).indexOf("sku=")>0&&Au(A);var A;"json"===u.type&&v.headers.set("Accept","application/json");const R=(B,N,U)=>{if(M)return;if(B&&"SecurityError"!==B.message&&Ji(B),N&&U)return P(N);const Z=Date.now();$.fetch(v).then(re=>{if(re.ok){const pe=D?re.clone():null;return P(re,pe,Z)}return f(new Ud(re.statusText,re.status,u.url))}).catch(re=>{20!==re.code&&f(new Error(re.message))})},P=(B,N,U)=>{("arrayBuffer"===u.type?B.arrayBuffer():"json"===u.type?B.json():B.text()).then(Z=>{M||(N&&U&&function(re,pe,oe){if(Oa(),!Ko)return;const ue={status:pe.status,statusText:pe.statusText,headers:new $.Headers};pe.headers.forEach((He,je)=>ue.headers.set(je,He));const ye=Vd(pe.headers.get("Cache-Control")||"");if(ye["no-store"])return;ye["max-age"]&&ue.headers.set("Expires",new Date(oe+1e3*ye["max-age"]).toUTCString());const fe=ue.headers.get("Expires");fe&&(new Date(fe).getTime()-oe<42e4||function(He,je){if(void 0===il)try{new Response(new ReadableStream),il=!0}catch{il=!1}il?je(He.body):He.blob().then(je)}(pe,He=>{const je=new $.Response(He,ue);Oa(),Ko&&Ko.then(nt=>nt.put(Mu(re.url),je)).catch(nt=>Ji(nt.message))}))}(v,N,U),x=!0,f(null,Z,B.headers.get("Cache-Control"),B.headers.get("Expires")))}).catch(Z=>{M||f(new Error(Z.message))})};return D?function(B,N){if(Oa(),!Ko)return N(null);const U=Mu(B.url);Ko.then(Z=>{Z.match(U).then(re=>{const pe=function(oe){if(!oe)return!1;const ue=new Date(oe.headers.get("Expires")||0),ye=Vd(oe.headers.get("Cache-Control")||"");return ue>Date.now()&&!ye["no-cache"]}(re);Z.delete(U),pe&&Z.put(U,re.clone()),N(null,re,pe)}).catch(N)}).catch(N)}(v,R):R(null,null),{cancel:()=>{M=!0,x||g.abort()}}}(l,o);if(da()&&self.worker&&self.worker.actor)return self.worker.actor.send("getResource",l,o,void 0,!0)}var a;return function(u,f){const g=new $.XMLHttpRequest;g.open(u.method||"GET",u.url,!0),"arrayBuffer"===u.type&&(g.responseType="arraybuffer");for(const v in u.headers)g.setRequestHeader(v,u.headers[v]);return"json"===u.type&&(g.responseType="text",g.setRequestHeader("Accept","application/json")),g.withCredentials="include"===u.credentials,g.onerror=()=>{f(new Error(g.statusText))},g.onload=()=>{if((g.status>=200&&g.status<300||0===g.status)&&null!==g.response){let v=g.response;if("json"===u.type)try{v=JSON.parse(g.response)}catch(x){return f(x)}f(null,v,g.getResponseHeader("Cache-Control"),g.getResponseHeader("Expires"))}else f(new Ud(g.statusText,g.status,u.url))},g.send(u.body),{cancel:()=>g.abort()}}(l,o)},Vl=function(l,o){return rl(xn(l,{type:"arrayBuffer"}),o)};function Du(l){const o=$.document.createElement("a");return o.href=l,o.protocol===$.document.location.protocol&&o.host===$.document.location.host}const hp="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";let Ec,Gl;Ec=[],Gl=0;const Eu=function(l,o){if(Ie.supported&&(l.headers||(l.headers={}),l.headers.accept="image/webp,*/*"),Gl>=De.MAX_PARALLEL_IMAGE_REQUESTS){const g={requestParameters:l,callback:o,cancelled:!1,cancel(){this.cancelled=!0}};return Ec.push(g),g}Gl++;let a=!1;const u=()=>{if(!a)for(a=!0,Gl--;Ec.length&&Gl{u(),g?o(g):v&&($.createImageBitmap?function(D,A){const R=new $.Blob([new Uint8Array(D)],{type:"image/png"});$.createImageBitmap(R).then(P=>{A(null,P)}).catch(P=>{A(new Error(`Could not load image because of ${P.message}. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported.`))})}(v,(D,A)=>o(D,A,x,M)):function(D,A){const R=new $.Image,P=$.URL;R.onload=()=>{A(null,R),P.revokeObjectURL(R.src),R.onload=null,$.requestAnimationFrame(()=>{R.src=hp})},R.onerror=()=>A(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 B=new $.Blob([new Uint8Array(D)],{type:"image/png"});R.src=D.byteLength?P.createObjectURL(B):hp}(v,(D,A)=>o(D,A,x,M)))});return{cancel:()=>{f.cancel(),u()}}},Tu="NO_ACCESS_TOKEN";function ha(l){return 0===l.indexOf("mapbox:")}function Au(l){return De.API_URL_REGEX.test(l)}function Tc(l){return De.API_CDN_URL_REGEX.test(l)}function Ul(l){return De.API_STYLE_REGEX.test(l)&&!ol(l)}function ol(l){return De.API_SPRITE_REGEX.test(l)}const jl=/^(\w+):\/\/([^/?]*)(\/[^?]+)?\??(.+)?/;function Ts(l){const o=l.match(jl);if(!o)throw new Error("Unable to parse URL object");return{protocol:o[1],authority:o[2],path:o[3]||"/",params:o[4]?o[4].split("&"):[]}}function sl(l){const o=l.params.length?`?${l.params.join("&")}`:"";return`${l.protocol}://${l.authority}${l.path}${o}`}function Ac(l){if(!l)return null;const o=l.split(".");if(!o||3!==o.length)return null;try{return JSON.parse(decodeURIComponent($.atob(o[1]).split("").map(a=>"%"+("00"+a.charCodeAt(0).toString(16)).slice(-2)).join("")))}catch{return null}}class ie{constructor(o){this.type=o,this.anonId=null,this.eventData={},this.queue=[],this.pendingRequest=null}getStorageKey(o){const a=Ac(De.ACCESS_TOKEN);let u="";return u=a&&a.u?$.btoa(encodeURIComponent(a.u).replace(/%([0-9A-F]{2})/g,(f,g)=>String.fromCharCode(Number("0x"+g)))):De.ACCESS_TOKEN||"",o?`mapbox.eventData.${o}:${u}`:`mapbox.eventData:${u}`}fetchEventData(){const o=Gd("localStorage"),a=this.getStorageKey(),u=this.getStorageKey("uuid");if(o)try{const f=$.localStorage.getItem(a);f&&(this.eventData=JSON.parse(f));const g=$.localStorage.getItem(u);g&&(this.anonId=g)}catch{Ji("Unable to read from LocalStorage")}}saveEventData(){const o=Gd("localStorage"),a=this.getStorageKey(),u=this.getStorageKey("uuid");if(o)try{$.localStorage.setItem(u,this.anonId),Object.keys(this.eventData).length>=1&&$.localStorage.setItem(a,JSON.stringify(this.eventData))}catch{Ji("Unable to write to LocalStorage")}}processRequests(o){}postEvent(o,a,u,f){if(!De.EVENTS_URL)return;const g=Ts(De.EVENTS_URL);g.params.push(`access_token=${f||De.ACCESS_TOKEN||""}`);const v={event:this.type,created:new Date(o).toISOString()},x=a?xn(v,a):v,M={url:sl(g),headers:{"Content-Type":"text/plain"},body:JSON.stringify([x])};var A;this.pendingRequest=(A=D=>{this.pendingRequest=null,u(D),this.saveEventData(),this.processRequests(f)},rl(xn(M,{method:"POST"}),A))}queueRequest(o,a){this.queue.push(o),this.processRequests(a)}}const V=new class extends ie{constructor(l){super("appUserTurnstile"),this._customAccessToken=l}postTurnstileEvent(l,o){De.EVENTS_URL&&De.ACCESS_TOKEN&&Array.isArray(l)&&l.some(a=>ha(a)||Au(a))&&this.queueRequest(Date.now(),o)}processRequests(l){if(this.pendingRequest||0===this.queue.length)return;this.anonId&&this.eventData.lastSuccess&&this.eventData.tokenU||this.fetchEventData();const o=Ac(De.ACCESS_TOKEN),a=o?o.u:De.ACCESS_TOKEN;let u=a!==this.eventData.tokenU;Zt(this.anonId)||(this.anonId=Ss(),u=!0);const f=this.queue.shift();if(this.eventData.lastSuccess){const g=new Date(this.eventData.lastSuccess),v=new Date(f),x=(f-this.eventData.lastSuccess)/864e5;u=u||x>=1||x<-1||g.getDate()!==v.getDate()}else u=!0;u?this.postEvent(f,{sdkIdentifier:"mapbox-gl-js",sdkVersion:me,skuId:St,"enabled.telemetry":!1,userId:this.anonId},g=>{g||(this.eventData.lastSuccess=f,this.eventData.tokenU=a)},l):this.processRequests()}},j=V.postTurnstileEvent.bind(V),J=new class extends ie{constructor(){super("map.load"),this.success={},this.skuToken=""}postMapLoadEvent(l,o,a,u){this.skuToken=o,this.errorCb=u,De.EVENTS_URL&&(a||De.ACCESS_TOKEN?this.queueRequest({id:l,timestamp:Date.now()},a):this.errorCb(new Error(Tu)))}processRequests(l){if(this.pendingRequest||0===this.queue.length)return;const{id:o,timestamp:a}=this.queue.shift();o&&this.success[o]||(this.anonId||this.fetchEventData(),Zt(this.anonId)||(this.anonId=Ss()),this.postEvent(a,{sdkIdentifier:"mapbox-gl-js",sdkVersion:me,skuId:St,skuToken:this.skuToken,userId:this.anonId},u=>{u?this.errorCb(u):o&&(this.success[o]=!0)},l))}},de=J.postMapLoadEvent.bind(J),be=new class extends ie{constructor(){super("gljs.performance")}postPerformanceEvent(l,o){De.EVENTS_URL&&(l||De.ACCESS_TOKEN)&&this.queueRequest({timestamp:Date.now(),performanceData:o},l)}processRequests(l){if(this.pendingRequest||0===this.queue.length)return;const{timestamp:o,performanceData:a}=this.queue.shift(),u=function(f){const g=$.performance.getEntriesByType("resource"),v=$.performance.getEntriesByType("mark"),x=function(P){const B={};if(P)for(const N in P)if("other"!==N)for(const U of P[N]){const Z=`${N}ResolveRangeMin`,re=`${N}ResolveRangeMax`,pe=`${N}RequestCount`,oe=`${N}RequestCachedCount`;B[Z]=Math.min(B[Z]||1/0,U.startTime),B[re]=Math.max(B[re]||-1/0,U.responseEnd);const ue=ye=>{void 0===B[ye]&&(B[ye]=0),++B[ye]};void 0!==U.transferSize&&0===U.transferSize&&ue(oe),ue(pe)}return B}(function(P,B){const N={};if(P)for(const U of P){const Z=B(U);void 0===N[Z]&&(N[Z]=[]),N[Z].push(U)}return N}(g,wt)),M=$.devicePixelRatio,D=$.navigator.connection||$.navigator.mozConnection||$.navigator.webkitConnection,A={counters:[],metadata:[],attributes:[]},R=(P,B,N)=>{null!=N&&P.push({name:B,value:N.toString()})};for(const P in x)R(A.counters,P,x[P]);if(f.interactionRange[0]!==1/0&&f.interactionRange[1]!==-1/0&&(R(A.counters,"interactionRangeMin",f.interactionRange[0]),R(A.counters,"interactionRangeMax",f.interactionRange[1])),v)for(const P of Object.keys(yt)){const B=yt[P],N=v.find(U=>U.name===B);N&&R(A.counters,B,N.startTime)}return R(A.counters,"visibilityHidden",f.visibilityHidden),R(A.attributes,"style",function(P){if(P)for(const B of P){const N=B.name.split("?")[0];if(Ul(N)){const U=N.split("/").slice(-2);if(2===U.length)return`mapbox://styles/${U[0]}/${U[1]}`}}}(g)),R(A.attributes,"terrainEnabled",f.terrainEnabled?"true":"false"),R(A.attributes,"fogEnabled",f.fogEnabled?"true":"false"),R(A.attributes,"projection",f.projection),R(A.attributes,"zoom",f.zoom),R(A.metadata,"devicePixelRatio",M),R(A.metadata,"connectionEffectiveType",D?D.effectiveType:void 0),R(A.metadata,"navigatorUserAgent",$.navigator.userAgent),R(A.metadata,"screenWidth",$.screen.width),R(A.metadata,"screenHeight",$.screen.height),R(A.metadata,"windowWidth",$.innerWidth),R(A.metadata,"windowHeight",$.innerHeight),R(A.metadata,"mapWidth",f.width/M),R(A.metadata,"mapHeight",f.height/M),R(A.metadata,"webglRenderer",f.renderer),R(A.metadata,"webglVendor",f.vendor),R(A.metadata,"sdkVersion",me),R(A.metadata,"sdkIdentifier","mapbox-gl-js"),A}(a);for(const f of u.metadata);for(const f of u.counters);for(const f of u.attributes);this.postEvent(o,u,()=>{},l)}},Fe=be.postPerformanceEvent.bind(be),Oe=new class extends ie{constructor(){super("map.auth"),this.success={},this.skuToken=""}getSession(l,o,a,u){if(!De.API_URL||!De.SESSION_PATH)return;const f=Ts(De.API_URL+De.SESSION_PATH);f.params.push(`sku=${o||""}`),f.params.push(`access_token=${u||De.ACCESS_TOKEN||""}`);const g={url:sl(f),headers:{"Content-Type":"text/plain"}};var x;this.pendingRequest=(x=v=>{this.pendingRequest=null,a(v),this.saveEventData(),this.processRequests(u)},rl(xn(g,{method:"GET"}),x))}getSessionAPI(l,o,a,u){this.skuToken=o,this.errorCb=u,De.SESSION_PATH&&De.API_URL&&(a||De.ACCESS_TOKEN?this.queueRequest({id:l,timestamp:Date.now()},a):this.errorCb(new Error(Tu)))}processRequests(l){if(this.pendingRequest||0===this.queue.length)return;const{id:o,timestamp:a}=this.queue.shift();o&&this.success[o]||this.getSession(a,this.skuToken,u=>{u?this.errorCb(u):o&&(this.success[o]=!0)},l)}},Ce=Oe.getSessionAPI.bind(Oe),Ve=new Set,yt={create:"create",load:"load",fullLoad:"fullLoad"},Pt={mark(l){$.performance.mark(l)},measure(l,o,a){$.performance.measure(l,o,a)}};function wt(l){const o=l.name.split("?")[0];return Tc(o)&&o.includes("mapbox-gl.js")?"javascript":Tc(o)&&o.includes("mapbox-gl.css")?"css":De.API_FONTS_REGEX.test(o)?"fontRange":ol(o)?"sprite":Ul(o)?"style":De.API_TILEJSON_REGEX.test(o)?"tilejson":"other"}const Yt=$.performance;function rn(l){const o=l?l.url.toString():void 0;return Yt.getEntriesByName(o)}let Kt,En,ei,vi;const an={now:()=>void 0!==ei?ei:$.performance.now(),setNow(l){ei=l},restoreNow(){ei=void 0},frame(l){const o=$.requestAnimationFrame(l);return{cancel:()=>$.cancelAnimationFrame(o)}},getImageData(l,o=0){const{width:a,height:u}=l;vi||(vi=$.document.createElement("canvas"));const f=vi.getContext("2d",{willReadFrequently:!0});if(!f)throw new Error("failed to create canvas 2d context");return(a>vi.width||u>vi.height)&&(vi.width=a,vi.height=u),f.clearRect(-o,-o,a+2*o,u+2*o),f.drawImage(l,0,0,a,u),f.getImageData(-o,-o,a+2*o,u+2*o)},resolveURL:l=>(Kt||(Kt=$.document.createElement("a")),Kt.href=l,Kt.href),get devicePixelRatio(){return $.devicePixelRatio},get prefersReducedMotion(){return!!$.matchMedia&&(null==En&&(En=$.matchMedia("(prefers-reduced-motion: reduce)")),En.matches)}};function Ni(l,o,a){a[l]&&-1!==a[l].indexOf(o)||(a[l]=a[l]||[],a[l].push(o))}function Ii(l,o,a){if(a&&a[l]){const u=a[l].indexOf(o);-1!==u&&a[l].splice(u,1)}}class pa{constructor(o,a={}){xn(this,a),this.type=o}}class Fa extends pa{constructor(o,a={}){super("error",xn({error:o},a))}}class cs{on(o,a){return this._listeners=this._listeners||{},Ni(o,a,this._listeners),this}off(o,a){return Ii(o,a,this._listeners),Ii(o,a,this._oneTimeListeners),this}once(o,a){return a?(this._oneTimeListeners=this._oneTimeListeners||{},Ni(o,a,this._oneTimeListeners),this):new Promise(u=>this.once(o,u))}fire(o,a){"string"==typeof o&&(o=new pa(o,a||{}));const u=o.type;if(this.listens(u)){o.target=this;const f=this._listeners&&this._listeners[u]?this._listeners[u].slice():[];for(const x of f)x.call(this,o);const g=this._oneTimeListeners&&this._oneTimeListeners[u]?this._oneTimeListeners[u].slice():[];for(const x of g)Ii(u,x,this._oneTimeListeners),x.call(this,o);const v=this._eventedParent;v&&(xn(o,"function"==typeof this._eventedParentData?this._eventedParentData():this._eventedParentData),v.fire(o))}else o instanceof Fa&&console.error(o.error);return this}listens(o){return!!(this._listeners&&this._listeners[o]&&this._listeners[o].length>0||this._oneTimeListeners&&this._oneTimeListeners[o]&&this._oneTimeListeners[o].length>0||this._eventedParent&&this._eventedParent.listens(o))}setEventedParent(o,a){return this._eventedParent=o,this._eventedParentData=a,this}}var at=JSON.parse('{"$version":8,"$root":{"version":{"required":true,"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"},"terrain":{"type":"terrain"},"fog":{"type":"fog"},"sources":{"required":true,"type":"sources"},"sprite":{"type":"string"},"glyphs":{"type":"string"},"transition":{"type":"transition"},"projection":{"type":"projection"},"layers":{"required":true,"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":true,"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":false},"*":{"type":"*"}},"source_raster":{"type":{"required":true,"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":false},"*":{"type":"*"}},"source_raster_dem":{"type":{"required":true,"type":"enum","values":{"raster-dem":{}}},"url":{"type":"string"},"tiles":{"type":"array","value":"string"},"bounds":{"type":"array","value":"number","length":4,"default":[-180,-85.051129,180,85.051129]},"minzoom":{"type":"number","default":0},"maxzoom":{"type":"number","default":22},"tileSize":{"type":"number","default":512,"units":"pixels"},"attribution":{"type":"string"},"encoding":{"type":"enum","values":{"terrarium":{},"mapbox":{}},"default":"mapbox"},"volatile":{"type":"boolean","default":false},"*":{"type":"*"}},"source_geojson":{"type":{"required":true,"type":"enum","values":{"geojson":{}}},"data":{"type":"*"},"maxzoom":{"type":"number","default":18},"attribution":{"type":"string"},"buffer":{"type":"number","default":128,"maximum":512,"minimum":0},"filter":{"type":"*"},"tolerance":{"type":"number","default":0.375},"cluster":{"type":"boolean","default":false},"clusterRadius":{"type":"number","default":50,"minimum":0},"clusterMaxZoom":{"type":"number"},"clusterMinPoints":{"type":"number"},"clusterProperties":{"type":"*"},"lineMetrics":{"type":"boolean","default":false},"generateId":{"type":"boolean","default":false},"promoteId":{"type":"promoteId"}},"source_video":{"type":{"required":true,"type":"enum","values":{"video":{}}},"urls":{"required":true,"type":"array","value":"string"},"coordinates":{"required":true,"type":"array","length":4,"value":{"type":"array","length":2,"value":"number"}}},"source_image":{"type":{"required":true,"type":"enum","values":{"image":{}}},"url":{"required":true,"type":"string"},"coordinates":{"required":true,"type":"array","length":4,"value":{"type":"array","length":2,"value":"number"}}},"layer":{"id":{"type":"string","required":true},"type":{"type":"enum","values":{"fill":{},"line":{},"symbol":{},"circle":{},"heatmap":{},"fill-extrusion":{},"raster":{},"hillshade":{},"background":{},"sky":{}},"required":true},"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_sky"],"layout_background":{"visibility":{"type":"enum","values":{"visible":{},"none":{}},"default":"visible","property-type":"constant"}},"layout_sky":{"visibility":{"type":"enum","values":{"visible":{},"none":{}},"default":"visible","property-type":"constant"}},"layout_fill":{"fill-sort-key":{"type":"number","expression":{"interpolated":false,"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":false,"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"},"fill-extrusion-edge-radius":{"type":"number","private":true,"default":0,"minimum":0,"maximum":1,"property-type":"constant"}},"layout_line":{"line-cap":{"type":"enum","values":{"butt":{},"round":{},"square":{}},"default":"butt","expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"line-join":{"type":"enum","values":{"bevel":{},"round":{},"miter":{}},"default":"miter","expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{"type":"number","default":2,"requires":[{"line-join":"miter"}],"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"line-round-limit":{"type":"number","default":1.05,"requires":[{"line-join":"round"}],"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"line-sort-key":{"type":"number","expression":{"interpolated":false,"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":false,"parameters":["zoom"]},"property-type":"data-constant"},"symbol-spacing":{"type":"number","default":250,"minimum":1,"units":"pixels","requires":[{"symbol-placement":"line"}],"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{"type":"boolean","default":false,"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{"type":"number","expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{"type":"enum","values":{"auto":{},"viewport-y":{},"source":{}},"default":"auto","expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{"type":"boolean","default":false,"requires":["icon-image"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{"type":"boolean","default":false,"requires":["icon-image"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"icon-optional":{"type":"boolean","default":false,"requires":["icon-image","text-field"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{"type":"enum","values":{"map":{},"viewport":{},"auto":{}},"default":"auto","requires":["icon-image"],"expression":{"interpolated":false,"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":true,"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":false,"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":true,"parameters":["zoom"]},"property-type":"data-constant"},"icon-image":{"type":"resolvedImage","tokens":true,"expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{"type":"number","default":0,"period":360,"units":"degrees","requires":["icon-image"],"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{"type":"number","default":2,"minimum":0,"units":"pixels","requires":["icon-image"],"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"icon-keep-upright":{"type":"boolean","default":false,"requires":["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"icon-offset":{"type":"array","value":"number","length":2,"default":[0,0],"requires":["icon-image"],"expression":{"interpolated":true,"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":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{"type":"enum","values":{"map":{},"viewport":{},"auto":{}},"default":"auto","requires":["icon-image"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{"type":"enum","values":{"map":{},"viewport":{},"auto":{}},"default":"auto","requires":["text-field"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{"type":"enum","values":{"map":{},"viewport":{},"auto":{}},"default":"auto","requires":["text-field"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"text-field":{"type":"formatted","default":"","tokens":true,"expression":{"interpolated":false,"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":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-size":{"type":"number","default":16,"minimum":0,"units":"pixels","requires":["text-field"],"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{"type":"number","default":10,"minimum":0,"units":"ems","requires":["text-field",{"symbol-placement":["point"]}],"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{"type":"number","default":1.2,"units":"ems","requires":["text-field"],"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-letter-spacing":{"type":"number","default":0,"units":"ems","requires":["text-field"],"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-justify":{"type":"enum","values":{"auto":{},"left":{},"center":{},"right":{}},"default":"center","requires":["text-field"],"expression":{"interpolated":false,"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":true,"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":false,"parameters":["zoom"]},"property-type":"data-constant"},"text-anchor":{"type":"enum","values":{"center":{},"left":{},"right":{},"top":{},"bottom":{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},"default":"center","requires":["text-field",{"!":"text-variable-anchor"}],"expression":{"interpolated":false,"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":true,"parameters":["zoom"]},"property-type":"data-constant"},"text-writing-mode":{"type":"array","value":"enum","values":{"horizontal":{},"vertical":{}},"requires":["text-field"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"text-rotate":{"type":"number","default":0,"period":360,"units":"degrees","requires":["text-field"],"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-padding":{"type":"number","default":2,"minimum":0,"units":"pixels","requires":["text-field"],"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"text-keep-upright":{"type":"boolean","default":true,"requires":["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"text-transform":{"type":"enum","values":{"none":{},"uppercase":{},"lowercase":{}},"default":"none","requires":["text-field"],"expression":{"interpolated":false,"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":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{"type":"boolean","default":false,"requires":["text-field"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{"type":"boolean","default":false,"requires":["text-field"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"text-optional":{"type":"boolean","default":false,"requires":["text-field","icon-image"],"expression":{"interpolated":false,"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_symbol":{"type":"boolean","default":false,"transition":false,"property-type":"data-driven","expression":{"interpolated":false,"parameters":["zoom","feature","pitch","distance-from-center"]}},"filter_fill":{"type":"boolean","default":false,"transition":false,"property-type":"data-driven","expression":{"interpolated":false,"parameters":["zoom","feature"]}},"filter_line":{"type":"boolean","default":false,"transition":false,"property-type":"data-driven","expression":{"interpolated":false,"parameters":["zoom","feature"]}},"filter_circle":{"type":"boolean","default":false,"transition":false,"property-type":"data-driven","expression":{"interpolated":false,"parameters":["zoom","feature"]}},"filter_fill-extrusion":{"type":"boolean","default":false,"transition":false,"property-type":"data-driven","expression":{"interpolated":false,"parameters":["zoom","feature"]}},"filter_heatmap":{"type":"boolean","default":false,"transition":false,"property-type":"data-driven","expression":{"interpolated":false,"parameters":["zoom","feature"]}},"filter_operator":{"type":"enum","values":{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},"in":{},"!in":{},"all":{},"any":{},"none":{},"has":{},"!has":{},"within":{}}},"geometry_type":{"type":"enum","values":{"Point":{},"LineString":{},"Polygon":{}}},"function":{"expression":{"type":"expression"},"stops":{"type":"array","value":"function_stop"},"base":{"type":"number","default":1,"minimum":0},"property":{"type":"string","default":"$zoom"},"type":{"type":"enum","values":{"identity":{},"exponential":{},"interval":{},"categorical":{}},"default":"exponential"},"colorSpace":{"type":"enum","values":{"rgb":{},"lab":{},"hcl":{}},"default":"rgb"},"default":{"type":"*","required":false}},"function_stop":{"type":"array","minimum":0,"maximum":24,"value":["number","color"],"length":2},"expression":{"type":"array","value":"*","minimum":1},"fog":{"range":{"type":"array","default":[0.5,10],"minimum":-20,"maximum":20,"length":2,"value":"number","property-type":"data-constant","transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"color":{"type":"color","property-type":"data-constant","default":"#ffffff","expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"high-color":{"type":"color","property-type":"data-constant","default":"#245cdf","expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"space-color":{"type":"color","property-type":"data-constant","default":["interpolate",["linear"],["zoom"],4,"#010b19",7,"#367ab9"],"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"horizon-blend":{"type":"number","property-type":"data-constant","default":["interpolate",["linear"],["zoom"],4,0.2,7,0.1],"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"star-intensity":{"type":"number","property-type":"data-constant","default":["interpolate",["linear"],["zoom"],5,0.35,6,0],"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true}},"light":{"anchor":{"type":"enum","default":"viewport","values":{"map":{},"viewport":{}},"property-type":"data-constant","transition":false,"expression":{"interpolated":false,"parameters":["zoom"]}},"position":{"type":"array","default":[1.15,210,30],"length":3,"value":"number","property-type":"data-constant","transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"color":{"type":"color","property-type":"data-constant","default":"#ffffff","expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"intensity":{"type":"number","property-type":"data-constant","default":0.5,"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true}},"projection":{"name":{"type":"enum","values":{"albers":{},"equalEarth":{},"equirectangular":{},"lambertConformalConic":{},"mercator":{},"naturalEarth":{},"winkelTripel":{},"globe":{}},"default":"mercator","required":true},"center":{"type":"array","length":2,"value":"number","property-type":"data-constant","minimum":[-180,-90],"maximum":[180,90],"transition":false,"requires":[{"name":["albers","lambertConformalConic"]}]},"parallels":{"type":"array","length":2,"value":"number","property-type":"data-constant","minimum":[-90,-90],"maximum":[90,90],"transition":false,"requires":[{"name":["albers","lambertConformalConic"]}]}},"terrain":{"source":{"type":"string","required":true},"exaggeration":{"type":"number","property-type":"data-constant","default":1,"minimum":0,"maximum":1000,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true,"requires":["source"]}},"paint":["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background","paint_sky"],"paint_fill":{"fill-antialias":{"type":"boolean","default":true,"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"fill-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{"type":"color","default":"#000000","transition":true,"requires":[{"!":"fill-pattern"}],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{"type":"color","transition":true,"requires":[{"!":"fill-pattern"},{"fill-antialias":true}],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{"type":"array","value":"number","length":2,"default":[0,0],"transition":true,"units":"pixels","expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{"type":"enum","values":{"map":{},"viewport":{}},"default":"map","requires":["fill-translate"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"fill-pattern":{"type":"resolvedImage","transition":false,"expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"}},"paint_fill-extrusion":{"fill-extrusion-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{"type":"color","default":"#000000","transition":true,"requires":[{"!":"fill-extrusion-pattern"}],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{"type":"array","value":"number","length":2,"default":[0,0],"transition":true,"units":"pixels","expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{"type":"enum","values":{"map":{},"viewport":{}},"default":"map","requires":["fill-extrusion-translate"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{"type":"resolvedImage","transition":false,"expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"fill-extrusion-height":{"type":"number","default":0,"minimum":0,"units":"meters","transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{"type":"number","default":0,"minimum":0,"units":"meters","transition":true,"requires":["fill-extrusion-height"],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{"type":"boolean","default":true,"transition":false,"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"fill-extrusion-ambient-occlusion-intensity":{"property-type":"data-constant","type":"number","private":true,"default":0,"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"fill-extrusion-ambient-occlusion-radius":{"property-type":"data-constant","type":"number","private":true,"default":3,"minimum":0,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true,"requires":["fill-extrusion-edge-radius"]}},"paint_line":{"line-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{"type":"color","default":"#000000","transition":true,"requires":[{"!":"line-pattern"}],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{"type":"array","value":"number","length":2,"default":[0,0],"transition":true,"units":"pixels","expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{"type":"enum","values":{"map":{},"viewport":{}},"default":"map","requires":["line-translate"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"line-width":{"type":"number","default":1,"minimum":0,"transition":true,"units":"pixels","expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{"type":"number","default":0,"minimum":0,"transition":true,"units":"pixels","expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{"type":"number","default":0,"transition":true,"units":"pixels","expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{"type":"number","default":0,"minimum":0,"transition":true,"units":"pixels","expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{"type":"array","value":"number","minimum":0,"transition":false,"units":"line widths","requires":[{"!":"line-pattern"}],"expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"line-pattern":{"type":"resolvedImage","transition":false,"expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"line-gradient":{"type":"color","transition":false,"requires":[{"!":"line-pattern"},{"source":"geojson","has":{"lineMetrics":true}}],"expression":{"interpolated":true,"parameters":["line-progress"]},"property-type":"color-ramp"},"line-trim-offset":{"type":"array","value":"number","length":2,"default":[0,0],"minimum":[0,0],"maximum":[1,1],"transition":false,"requires":[{"source":"geojson","has":{"lineMetrics":true}}],"property-type":"constant"}},"paint_circle":{"circle-radius":{"type":"number","default":5,"minimum":0,"transition":true,"units":"pixels","expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{"type":"color","default":"#000000","transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{"type":"number","default":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{"type":"array","value":"number","length":2,"default":[0,0],"transition":true,"units":"pixels","expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{"type":"enum","values":{"map":{},"viewport":{}},"default":"map","requires":["circle-translate"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{"type":"enum","values":{"map":{},"viewport":{}},"default":"map","expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{"type":"enum","values":{"map":{},"viewport":{}},"default":"viewport","expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{"type":"number","default":0,"minimum":0,"transition":true,"units":"pixels","expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{"type":"color","default":"#000000","transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"}},"paint_heatmap":{"heatmap-radius":{"type":"number","default":30,"minimum":1,"transition":true,"units":"pixels","expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{"type":"number","default":1,"minimum":0,"transition":false,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{"type":"number","default":1,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"heatmap-color":{"type":"color","default":["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",0.1,"royalblue",0.3,"cyan",0.5,"lime",0.7,"yellow",1,"red"],"transition":false,"expression":{"interpolated":true,"parameters":["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"}},"paint_symbol":{"icon-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"requires":["icon-image"],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{"type":"color","default":"#000000","transition":true,"requires":["icon-image"],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{"type":"color","default":"rgba(0, 0, 0, 0)","transition":true,"requires":["icon-image"],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{"type":"number","default":0,"minimum":0,"transition":true,"units":"pixels","requires":["icon-image"],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{"type":"number","default":0,"minimum":0,"transition":true,"units":"pixels","requires":["icon-image"],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{"type":"array","value":"number","length":2,"default":[0,0],"transition":true,"units":"pixels","requires":["icon-image"],"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{"type":"enum","values":{"map":{},"viewport":{}},"default":"map","requires":["icon-image","icon-translate"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"text-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"requires":["text-field"],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{"type":"color","default":"#000000","transition":true,"overridable":true,"requires":["text-field"],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{"type":"color","default":"rgba(0, 0, 0, 0)","transition":true,"requires":["text-field"],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{"type":"number","default":0,"minimum":0,"transition":true,"units":"pixels","requires":["text-field"],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-blur":{"type":"number","default":0,"minimum":0,"transition":true,"units":"pixels","requires":["text-field"],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{"type":"array","value":"number","length":2,"default":[0,0],"transition":true,"units":"pixels","requires":["text-field"],"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{"type":"enum","values":{"map":{},"viewport":{}},"default":"map","requires":["text-field","text-translate"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"}},"paint_raster":{"raster-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{"type":"number","default":0,"period":360,"transition":true,"units":"degrees","expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{"type":"number","default":0,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"raster-saturation":{"type":"number","default":0,"minimum":-1,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"raster-contrast":{"type":"number","default":0,"minimum":-1,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"raster-resampling":{"type":"enum","values":{"linear":{},"nearest":{}},"default":"linear","expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{"type":"number","default":300,"minimum":0,"transition":false,"units":"milliseconds","expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"}},"paint_hillshade":{"hillshade-illumination-direction":{"type":"number","default":335,"minimum":0,"maximum":359,"transition":false,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{"type":"enum","values":{"map":{},"viewport":{}},"default":"viewport","expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{"type":"number","default":0.5,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{"type":"color","default":"#000000","transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{"type":"color","default":"#FFFFFF","transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{"type":"color","default":"#000000","transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"}},"paint_background":{"background-color":{"type":"color","default":"#000000","transition":true,"requires":[{"!":"background-pattern"}],"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"background-pattern":{"type":"resolvedImage","transition":false,"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"background-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"}},"paint_sky":{"sky-type":{"type":"enum","values":{"gradient":{},"atmosphere":{}},"default":"atmosphere","expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"sky-atmosphere-sun":{"type":"array","value":"number","length":2,"units":"degrees","minimum":[0,0],"maximum":[360,180],"transition":false,"requires":[{"sky-type":"atmosphere"}],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"sky-atmosphere-sun-intensity":{"type":"number","requires":[{"sky-type":"atmosphere"}],"default":10,"minimum":0,"maximum":100,"transition":false,"property-type":"data-constant"},"sky-gradient-center":{"type":"array","requires":[{"sky-type":"gradient"}],"value":"number","default":[0,0],"length":2,"units":"degrees","minimum":[0,0],"maximum":[360,180],"transition":false,"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"sky-gradient-radius":{"type":"number","requires":[{"sky-type":"gradient"}],"default":90,"minimum":0,"maximum":180,"transition":false,"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"sky-gradient":{"type":"color","default":["interpolate",["linear"],["sky-radial-progress"],0.8,"#87ceeb",1,"white"],"transition":false,"requires":[{"sky-type":"gradient"}],"expression":{"interpolated":true,"parameters":["sky-radial-progress"]},"property-type":"color-ramp"},"sky-atmosphere-halo-color":{"type":"color","default":"white","transition":false,"requires":[{"sky-type":"atmosphere"}],"property-type":"data-constant"},"sky-atmosphere-color":{"type":"color","default":"white","transition":false,"requires":[{"sky-type":"atmosphere"}],"property-type":"data-constant"},"sky-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"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"},"color-ramp":{"type":"property-type"},"data-constant":{"type":"property-type"},"constant":{"type":"property-type"}},"promoteId":{"*":{"type":"string"}}}');function La(l,...o){for(const a of o)for(const u in a)l[u]=a[u];return l}function Pr(l){return l instanceof Number||l instanceof String||l instanceof Boolean?l.valueOf():l}function Ba(l){if(Array.isArray(l))return l.map(Ba);if(l instanceof Object&&!(l instanceof Number||l instanceof String||l instanceof Boolean)){const o={};for(const a in l)o[a]=Ba(l[a]);return o}return Pr(l)}class lm extends Error{constructor(o,a){super(a),this.message=a,this.key=o}}var us=lm;class jd{constructor(o,a=[]){this.parent=o,this.bindings={};for(const[u,f]of a)this.bindings[u]=f}concat(o){return new jd(this,o)}get(o){if(this.bindings[o])return this.bindings[o];if(this.parent)return this.parent.get(o);throw new Error(`${o} not found in scope.`)}has(o){return!!this.bindings[o]||!!this.parent&&this.parent.has(o)}}var Mr=jd;const mr={kind:"null"},Vt={kind:"number"},ti={kind:"string"},on={kind:"boolean"},ds={kind:"color"},ki={kind:"object"},Zn={kind:"value"},Iu={kind:"collator"},ni={kind:"formatted"},Mn={kind:"resolvedImage"};function zr(l,o){return{kind:"array",itemType:l,N:o}}function lr(l){if("array"===l.kind){const o=lr(l.itemType);return"number"==typeof l.N?`array<${o}, ${l.N}>`:"value"===l.itemType.kind?"array":`array<${o}>`}return l.kind}const Na=[mr,Vt,ti,on,ds,ni,ki,zr(Zn),Mn];function al(l,o){if("error"===o.kind)return null;if("array"===l.kind){if("array"===o.kind&&(0===o.N&&"value"===o.itemType.kind||!al(l.itemType,o.itemType))&&("number"!=typeof l.N||l.N===o.N))return null}else{if(l.kind===o.kind)return null;if("value"===l.kind)for(const a of Na)if(!al(a,o))return null}return`Expected ${lr(l)} but found ${lr(o)} instead.`}function mt(l,o){return o.some(a=>a.kind===l.kind)}function ll(l,o){return o.some(a=>"null"===a?null===l:"array"===a?Array.isArray(l):"object"===a?l&&!Array.isArray(l)&&"object"==typeof l:a===typeof l)}var Gn,Ri={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],rebeccapurple:[102,51,153,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function cl(l){return(l=Math.round(l))<0?0:l>255?255:l}function Hd(l){return cl("%"===l[l.length-1]?parseFloat(l)/100*255:parseInt(l))}function $d(l){return(o="%"===l[l.length-1]?parseFloat(l)/100:parseFloat(l))<0?0:o>1?1:o;var o}function Ic(l,o,a){return a<0?a+=1:a>1&&(a-=1),6*a<1?l+(o-l)*a*6:2*a<1?o:3*a<2?l+(o-l)*(2/3-a)*6:l}try{Gn={}.parseCSSColor=function(l){var o,a=l.replace(/ /g,"").toLowerCase();if(a in Ri)return Ri[a].slice();if("#"===a[0])return 4===a.length?(o=parseInt(a.substr(1),16))>=0&&o<=4095?[(3840&o)>>4|(3840&o)>>8,240&o|(240&o)>>4,15&o|(15&o)<<4,1]:null:7===a.length&&(o=parseInt(a.substr(1),16))>=0&&o<=16777215?[(16711680&o)>>16,(65280&o)>>8,255&o,1]:null;var u=a.indexOf("("),f=a.indexOf(")");if(-1!==u&&f+1===a.length){var g=a.substr(0,u),v=a.substr(u+1,f-(u+1)).split(","),x=1;switch(g){case"rgba":if(4!==v.length)return null;x=$d(v.pop());case"rgb":return 3!==v.length?null:[Hd(v[0]),Hd(v[1]),Hd(v[2]),x];case"hsla":if(4!==v.length)return null;x=$d(v.pop());case"hsl":if(3!==v.length)return null;var M=(parseFloat(v[0])%360+360)%360/360,D=$d(v[1]),A=$d(v[2]),R=A<=.5?A*(D+1):A+D-A*D,P=2*A-R;return[cl(255*Ic(P,R,M+1/3)),cl(255*Ic(P,R,M)),cl(255*Ic(P,R,M-1/3)),x];default:return null}}return null}}catch{}class hr{constructor(o,a,u,f=1){this.r=o,this.g=a,this.b=u,this.a=f}static parse(o){if(!o)return;if(o instanceof hr)return o;if("string"!=typeof o)return;const a=Gn(o);return a?new hr(a[0]/255*a[3],a[1]/255*a[3],a[2]/255*a[3],a[3]):void 0}toString(){const[o,a,u,f]=this.toArray();return`rgba(${Math.round(o)},${Math.round(a)},${Math.round(u)},${f})`}toArray(){const{r:o,g:a,b:u,a:f}=this;return 0===f?[0,0,0,0]:[255*o/f,255*a/f,255*u/f,f]}toArray01(){const{r:o,g:a,b:u,a:f}=this;return 0===f?[0,0,0,0]:[o/f,a/f,u/f,f]}toArray01PremultipliedAlpha(){const{r:o,g:a,b:u,a:f}=this;return[o,a,u,f]}}hr.black=new hr(0,0,0,1),hr.white=new hr(1,1,1,1),hr.transparent=new hr(0,0,0,0),hr.red=new hr(1,0,0,1),hr.blue=new hr(0,0,1,1);var Sr=hr;class ku{constructor(o,a,u){this.sensitivity=o?a?"variant":"case":a?"accent":"base",this.locale=u,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}compare(o,a){return this.collator.compare(o,a)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}}class cm{constructor(o,a,u,f,g){this.text=o.normalize?o.normalize():o,this.image=a,this.scale=u,this.fontStack=f,this.textColor=g}}class vr{constructor(o){this.sections=o}static fromString(o){return new vr([new cm(o,null,null,null,null)])}isEmpty(){return 0===this.sections.length||!this.sections.some(o=>0!==o.text.length||o.image&&0!==o.image.name.length)}static factory(o){return o instanceof vr?o:vr.fromString(o)}toString(){return 0===this.sections.length?"":this.sections.map(o=>o.text).join("")}serialize(){const o=["format"];for(const a of this.sections){if(a.image){o.push(["image",a.image.name]);continue}o.push(a.text);const u={};a.fontStack&&(u["text-font"]=["literal",a.fontStack.split(",")]),a.scale&&(u["font-scale"]=a.scale),a.textColor&&(u["text-color"]=["rgba"].concat(a.textColor.toArray())),o.push(u)}return o}}class js{constructor(o){this.name=o.name,this.available=o.available}toString(){return this.name}static fromString(o){return o?new js({name:o,available:!1}):null}serialize(){return["image",this.name]}}function B_(l,o,a,u){return"number"==typeof l&&l>=0&&l<=255&&"number"==typeof o&&o>=0&&o<=255&&"number"==typeof a&&a>=0&&a<=255?void 0===u||"number"==typeof u&&u>=0&&u<=1?null:`Invalid rgba value [${[l,o,a,u].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${("number"==typeof u?[l,o,a,u]:[l,o,a]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function pp(l){if(null===l||"string"==typeof l||"boolean"==typeof l||"number"==typeof l||l instanceof Sr||l instanceof ku||l instanceof vr||l instanceof js)return!0;if(Array.isArray(l)){for(const o of l)if(!pp(o))return!1;return!0}if("object"==typeof l){for(const o in l)if(!pp(l[o]))return!1;return!0}return!1}function Vr(l){if(null===l)return mr;if("string"==typeof l)return ti;if("boolean"==typeof l)return on;if("number"==typeof l)return Vt;if(l instanceof Sr)return ds;if(l instanceof ku)return Iu;if(l instanceof vr)return ni;if(l instanceof js)return Mn;if(Array.isArray(l)){const o=l.length;let a;for(const u of l){const f=Vr(u);if(a){if(a===f)continue;a=Zn;break}a=f}return zr(a||Zn,o)}return ki}function Ru(l){const o=typeof l;return null===l?"":"string"===o||"number"===o||"boolean"===o?String(l):l instanceof Sr||l instanceof vr||l instanceof js?l.toString():JSON.stringify(l)}class um{constructor(o,a){this.type=o,this.value=a}static parse(o,a){if(2!==o.length)return a.error(`'literal' expression requires exactly one argument, but found ${o.length-1} instead.`);if(!pp(o[1]))return a.error("invalid value");const u=o[1];let f=Vr(u);const g=a.expectedType;return"array"!==f.kind||0!==f.N||!g||"array"!==g.kind||"number"==typeof g.N&&0!==g.N||(f=g),new um(f,u)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}serialize(){return"array"===this.type.kind||"object"===this.type.kind?["literal",this.value]:this.value instanceof Sr?["rgba"].concat(this.value.toArray()):this.value instanceof vr?this.value.serialize():this.value}}var Pu=um,uo=class{constructor(l){this.name="ExpressionEvaluationError",this.message=l}toJSON(){return this.message}};const ho={string:ti,number:Vt,boolean:on,object:ki};class Pi{constructor(o,a){this.type=o,this.args=a}static parse(o,a){if(o.length<2)return a.error("Expected at least one argument.");let u,f=1;const g=o[0];if("array"===g){let x,M;if(o.length>2){const D=o[1];if("string"!=typeof D||!(D in ho)||"object"===D)return a.error('The item type argument of "array" must be one of string, number, boolean',1);x=ho[D],f++}else x=Zn;if(o.length>3){if(null!==o[2]&&("number"!=typeof o[2]||o[2]<0||o[2]!==Math.floor(o[2])))return a.error('The length argument to "array" must be a positive integer literal',2);M=o[2],f++}u=zr(x,M)}else u=ho[g];const v=[];for(;fo.outputDefined())}serialize(){const o=this.type,a=[o.kind];if("array"===o.kind){const u=o.itemType;if("string"===u.kind||"number"===u.kind||"boolean"===u.kind){a.push(u.kind);const f=o.N;("number"==typeof f||this.args.length>1)&&a.push(f)}}return a.concat(this.args.map(u=>u.serialize()))}}var ul=Pi;class Wd{constructor(o){this.type=ni,this.sections=o}static parse(o,a){if(o.length<2)return a.error("Expected at least one argument.");const u=o[1];if(!Array.isArray(u)&&"object"==typeof u)return a.error("First argument must be an image or text section.");const f=[];let g=!1;for(let v=1;v<=o.length-1;++v){const x=o[v];if(g&&"object"==typeof x&&!Array.isArray(x)){g=!1;let M=null;if(x["font-scale"]&&(M=a.parse(x["font-scale"],1,Vt),!M))return null;let D=null;if(x["text-font"]&&(D=a.parse(x["text-font"],1,zr(ti)),!D))return null;let A=null;if(x["text-color"]&&(A=a.parse(x["text-color"],1,ds),!A))return null;const R=f[f.length-1];R.scale=M,R.font=D,R.textColor=A}else{const M=a.parse(o[v],1,Zn);if(!M)return null;const D=M.type.kind;if("string"!==D&&"value"!==D&&"null"!==D&&"resolvedImage"!==D)return a.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");g=!0,f.push({content:M,scale:null,font:null,textColor:null})}}return new Wd(f)}evaluate(o){return new vr(this.sections.map(a=>{const u=a.content.evaluate(o);return Vr(u)===Mn?new cm("",u,null,null,null):new cm(Ru(u),null,a.scale?a.scale.evaluate(o):null,a.font?a.font.evaluate(o).join(","):null,a.textColor?a.textColor.evaluate(o):null)}))}eachChild(o){for(const a of this.sections)o(a.content),a.scale&&o(a.scale),a.font&&o(a.font),a.textColor&&o(a.textColor)}outputDefined(){return!1}serialize(){const o=["format"];for(const a of this.sections){o.push(a.content.serialize());const u={};a.scale&&(u["font-scale"]=a.scale.serialize()),a.font&&(u["text-font"]=a.font.serialize()),a.textColor&&(u["text-color"]=a.textColor.serialize()),o.push(u)}return o}}class fp{constructor(o){this.type=Mn,this.input=o}static parse(o,a){if(2!==o.length)return a.error("Expected two arguments.");const u=a.parse(o[1],1,ti);return u?new fp(u):a.error("No image name provided.")}evaluate(o){const a=this.input.evaluate(o),u=js.fromString(a);return u&&o.availableImages&&(u.available=o.availableImages.indexOf(a)>-1),u}eachChild(o){o(this.input)}outputDefined(){return!1}serialize(){return["image",this.input.serialize()]}}const rt={"to-boolean":on,"to-color":ds,"to-number":Vt,"to-string":ti};class dm{constructor(o,a){this.type=o,this.args=a}static parse(o,a){if(o.length<2)return a.error("Expected at least one argument.");const u=o[0];if(("to-boolean"===u||"to-string"===u)&&2!==o.length)return a.error("Expected one argument.");const f=rt[u],g=[];for(let v=1;v4?`Invalid rbga value ${JSON.stringify(a)}: expected an array containing either three or four numeric values.`:B_(a[0],a[1],a[2],a[3]),!u))return new Sr(a[0]/255,a[1]/255,a[2]/255,a[3])}throw new uo(u||`Could not parse color from value '${"string"==typeof a?a:String(JSON.stringify(a))}'`)}if("number"===this.type.kind){let a=null;for(const u of this.args){if(a=u.evaluate(o),null===a)return 0;const f=Number(a);if(!isNaN(f))return f}throw new uo(`Could not convert ${JSON.stringify(a)} to number.`)}return"formatted"===this.type.kind?vr.fromString(Ru(this.args[0].evaluate(o))):"resolvedImage"===this.type.kind?js.fromString(Ru(this.args[0].evaluate(o))):Ru(this.args[0].evaluate(o))}eachChild(o){this.args.forEach(o)}outputDefined(){return this.args.every(o=>o.outputDefined())}serialize(){if("formatted"===this.type.kind)return new Wd([{content:this.args[0],scale:null,font:null,textColor:null}]).serialize();if("resolvedImage"===this.type.kind)return new fp(this.args[0]).serialize();const o=[`to-${this.type.kind}`];return this.eachChild(a=>{o.push(a.serialize())}),o}}var nn=dm;const Hl=["Unknown","Point","LineString","Polygon"];var hm=class{constructor(){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache={},this.availableImages=null,this.canonical=null,this.featureTileCoord=null,this.featureDistanceData=null}id(){return this.feature&&void 0!==this.feature.id?this.feature.id:null}geometryType(){return this.feature?"number"==typeof this.feature.type?Hl[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||{}}distanceFromCenter(){if(this.featureTileCoord&&this.featureDistanceData){const l=this.featureDistanceData.center,o=this.featureDistanceData.scale,{x:a,y:u}=this.featureTileCoord;return this.featureDistanceData.bearing[0]*(a*o-l[0])+this.featureDistanceData.bearing[1]*(u*o-l[1])}return 0}parseColor(l){let o=this._parseColorCache[l];return o||(o=this._parseColorCache[l]=Sr.parse(l)),o}};class $l{constructor(o,a,u,f){this.name=o,this.type=a,this._evaluate=u,this.args=f}evaluate(o){return this._evaluate(o,this.args)}eachChild(o){this.args.forEach(o)}outputDefined(){return!1}serialize(){return[this.name].concat(this.args.map(o=>o.serialize()))}static parse(o,a){const u=o[0],f=$l.definitions[u];if(!f)return a.error(`Unknown expression "${u}". If you wanted a literal array, use ["literal", [...]].`,0);const g=Array.isArray(f)?f[0]:f.type,v=Array.isArray(f)?[[f[1],f[2]]]:f.overloads,x=v.filter(([D])=>!Array.isArray(D)||D.length===o.length-1);let M=null;for(const[D,A]of x){M=new Yl(a.registry,a.path,null,a.scope);const R=[];let P=!1;for(let B=1;B{return P=R,Array.isArray(P)?`(${P.map(lr).join(", ")})`:`(${lr(P.type)}...)`;var P}).join(" | "),A=[];for(let R=1;R=o[2]||l[1]<=o[1]||l[3]>=o[3])}function mp(l,o){const a=(180+l[0])/360,u=(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+l[1]*Math.PI/360)))/360,f=Math.pow(2,o.z);return[Math.round(a*f*Kr),Math.round(u*f*Kr)]}function pm(l,o,a){const u=l[0]-o[0],f=l[1]-o[1],g=l[0]-a[0],v=l[1]-a[1];return u*v-g*f==0&&u*g<=0&&f*v<=0}function Tn(l,o){let a=!1;for(let v=0,x=o.length;v(u=l)[1]!=(g=M[D+1])[1]>u[1]&&u[0]<(g[0]-f[0])*(u[1]-f[1])/(g[1]-f[1])+f[0]&&(a=!a)}}var u,f,g;return a}function Zd(l,o){for(let a=0;a0&&x<0||v<0&&x>0}function So(l,o,a){for(const D of a)for(let A=0;Aa[2]){const f=.5*u;let g=l[0]-a[0]>f?-u:a[0]-l[0]>f?u:0;0===g&&(g=l[0]-a[2]>f?-u:a[2]-l[0]>f?u:0),l[0]+=g}Wl(o,l)}function Si(l,o,a,u){const f=Math.pow(2,u.z)*Kr,g=[u.x*Kr,u.y*Kr],v=[];if(!l)return v;for(const x of l)for(const M of x){const D=[M.x+g[0],M.y+g[1]];kc(D,o,a,f),v.push(D)}return v}function Rc(l,o,a,u){const f=Math.pow(2,u.z)*Kr,g=[u.x*Kr,u.y*Kr],v=[];if(!l)return v;for(const M of l){const D=[];for(const A of M){const R=[A.x+g[0],A.y+g[1]];Wl(o,R),D.push(R)}v.push(D)}if(o[2]-o[0]<=f/2){(x=o)[0]=x[1]=1/0,x[2]=x[3]=-1/0;for(const M of v)for(const D of M)kc(D,o,a,f)}var x;return v}class Zl{constructor(o,a){this.type=on,this.geojson=o,this.geometries=a}static parse(o,a){if(2!==o.length)return a.error(`'within' expression requires exactly one argument, but found ${o.length-1} instead.`);if(pp(o[1])){const u=o[1];if("FeatureCollection"===u.type)for(let f=0;f{o&&!Oc(a)&&(o=!1)}),o}function Kd(l){if(l instanceof dl&&"feature-state"===l.name)return!1;let o=!0;return l.eachChild(a=>{o&&!Kd(a)&&(o=!1)}),o}function Ou(l,o){if(l instanceof dl&&o.indexOf(l.name)>=0)return!1;let a=!0;return l.eachChild(u=>{a&&!Ou(u,o)&&(a=!1)}),a}class Fu{constructor(o,a){this.type=a.type,this.name=o,this.boundExpression=a}static parse(o,a){if(2!==o.length||"string"!=typeof o[1])return a.error("'var' expression requires exactly one string literal argument.");const u=o[1];return a.scope.has(u)?new Fu(u,a.scope.get(u)):a.error(`Unknown variable "${u}". Make sure "${u}" has been bound in an enclosing "let" expression before using it.`,1)}evaluate(o){return this.boundExpression.evaluate(o)}eachChild(){}outputDefined(){return!1}serialize(){return["var",this.name]}}var Xl=Fu;class za{constructor(o,a=[],u,f=new Mr,g=[]){this.registry=o,this.path=a,this.key=a.map(v=>`[${v}]`).join(""),this.scope=f,this.errors=g,this.expectedType=u}parse(o,a,u,f,g={}){return a?this.concat(a,u,f)._parse(o,g):this._parse(o,g)}_parse(o,a){function u(f,g,v){return"assert"===v?new ul(g,[f]):"coerce"===v?new nn(g,[f]):f}if(null!==o&&"string"!=typeof o&&"boolean"!=typeof o&&"number"!=typeof o||(o=["literal",o]),Array.isArray(o)){if(0===o.length)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');const f=o[0];if("string"!=typeof f)return this.error(`Expression name must be a string, but found ${typeof f} instead. If you wanted a literal array, use ["literal", [...]].`,0),null;const g=this.registry[f];if(g){let v=g.parse(o,this);if(!v)return null;if(this.expectedType){const x=this.expectedType,M=v.type;if("string"!==x.kind&&"number"!==x.kind&&"boolean"!==x.kind&&"object"!==x.kind&&"array"!==x.kind||"value"!==M.kind)if("color"!==x.kind&&"formatted"!==x.kind&&"resolvedImage"!==x.kind||"value"!==M.kind&&"string"!==M.kind){if(this.checkSubtype(x,M))return null}else v=u(v,x,a.typeAnnotation||"coerce");else v=u(v,x,a.typeAnnotation||"assert")}if(!(v instanceof Pu)&&"resolvedImage"!==v.type.kind&&we(v)){const x=new hm;try{v=new Pu(v.type,v.evaluate(x))}catch(M){return this.error(M.message),null}}return v}return this.error(`Unknown expression "${f}". If you wanted a literal array, use ["literal", [...]].`,0)}return this.error(void 0===o?"'undefined' value invalid. Use null instead.":"object"==typeof o?'Bare objects invalid. Use ["literal", {...}] instead.':`Expected an array, but found ${typeof o} instead.`)}concat(o,a,u){const f="number"==typeof o?this.path.concat(o):this.path,g=u?this.scope.concat(u):this.scope;return new za(this.registry,f,a||null,g,this.errors)}error(o,...a){const u=`${this.key}${a.map(f=>`[${f}]`).join("")}`;this.errors.push(new us(u,o))}checkSubtype(o,a){const u=al(o,a);return u&&this.error(u),u}}var Yl=za;function we(l){if(l instanceof Xl)return we(l.boundExpression);if(l instanceof dl&&"error"===l.name||l instanceof qd||l instanceof Pc)return!1;const o=l instanceof nn||l instanceof ul;let a=!0;return l.eachChild(u=>{a=o?a&&we(u):a&&u instanceof Pu}),!!a&&Oc(l)&&Ou(l,["zoom","heatmap-density","line-progress","sky-radial-progress","accumulated","is-supported-script","pitch","distance-from-center"])}function Lu(l,o){const a=l.length-1;let u,f,g=0,v=a,x=0;for(;g<=v;)if(x=Math.floor((g+v)/2),u=l[x],f=l[x+1],u<=o){if(x===a||oo))throw new uo("Input is not a number.");v=x-1}return 0}class Fn{constructor(o,a,u){this.type=o,this.input=a,this.labels=[],this.outputs=[];for(const[f,g]of u)this.labels.push(f),this.outputs.push(g)}static parse(o,a){if(o.length-1<4)return a.error(`Expected at least 4 arguments, but found only ${o.length-1}.`);if((o.length-1)%2!=0)return a.error("Expected an even number of arguments.");const u=a.parse(o[1],1,Vt);if(!u)return null;const f=[];let g=null;a.expectedType&&"value"!==a.expectedType.kind&&(g=a.expectedType);for(let v=1;v=x)return a.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',D);const R=a.parse(M,A,g);if(!R)return null;g=g||R.type,f.push([x,R])}return new Fn(g,u,f)}evaluate(o){const a=this.labels,u=this.outputs;if(1===a.length)return u[0].evaluate(o);const f=this.input.evaluate(o);if(f<=a[0])return u[0].evaluate(o);const g=a.length;return f>=a[g-1]?u[g-1].evaluate(o):u[Lu(a,f)].evaluate(o)}eachChild(o){o(this.input);for(const a of this.outputs)o(a)}outputDefined(){return this.outputs.every(o=>o.outputDefined())}serialize(){const o=["step",this.input.serialize()];for(let a=0;a0&&o.push(this.labels[a]),o.push(this.outputs[a].serialize());return o}}var Kl=Fn;function ci(l,o,a){return l*(1-a)+o*a}var hl=Object.freeze({__proto__:null,number:ci,color:function(l,o,a){return new Sr(ci(l.r,o.r,a),ci(l.g,o.g,a),ci(l.b,o.b,a),ci(l.a,o.a,a))},array:function(l,o,a){return l.map((u,f)=>ci(u,o[f],a))}});const _p=4/29,Hs=6/29,As=3*Hs*Hs,z_=Math.PI/180,U0=180/Math.PI;function Qo(l){return l>.008856451679035631?Math.pow(l,1/3):l/As+_p}function Is(l){return l>Hs?l*l*l:As*(l-_p)}function Di(l){return 255*(l<=.0031308?12.92*l:1.055*Math.pow(l,1/2.4)-.055)}function Fc(l){return(l/=255)<=.04045?l/12.92:Math.pow((l+.055)/1.055,2.4)}function Qd(l){const o=Fc(l.r),a=Fc(l.g),u=Fc(l.b),f=Qo((.4124564*o+.3575761*a+.1804375*u)/.95047),g=Qo((.2126729*o+.7151522*a+.072175*u)/1);return{l:116*g-16,a:500*(f-g),b:200*(g-Qo((.0193339*o+.119192*a+.9503041*u)/1.08883)),alpha:l.a}}function Jd(l){let o=(l.l+16)/116,a=isNaN(l.a)?o:o+l.a/500,u=isNaN(l.b)?o:o-l.b/200;return o=1*Is(o),a=.95047*Is(a),u=1.08883*Is(u),new Sr(Di(3.2404542*a-1.5371385*o-.4985314*u),Di(-.969266*a+1.8760108*o+.041556*u),Di(.0556434*a-.2040259*o+1.0572252*u),l.alpha)}function gm(l,o,a){const u=o-l;return l+a*(u>180||u<-180?u-360*Math.round(u/360):u)}const hs={forward:Qd,reverse:Jd,interpolate:function(l,o,a){return{l:ci(l.l,o.l,a),a:ci(l.a,o.a,a),b:ci(l.b,o.b,a),alpha:ci(l.alpha,o.alpha,a)}}},fa={forward:function(l){const{l:o,a,b:u}=Qd(l),f=Math.atan2(u,a)*U0;return{h:f<0?f+360:f,c:Math.sqrt(a*a+u*u),l:o,alpha:l.a}},reverse:function(l){const o=l.h*z_,a=l.c;return Jd({l:l.l,a:Math.cos(o)*a,b:Math.sin(o)*a,alpha:l.alpha})},interpolate:function(l,o,a){return{h:gm(l.h,o.h,a),c:ci(l.c,o.c,a),l:ci(l.l,o.l,a),alpha:ci(l.alpha,o.alpha,a)}}};var _m=Object.freeze({__proto__:null,lab:hs,hcl:fa});class Rn{constructor(o,a,u,f,g){this.type=o,this.operator=a,this.interpolation=u,this.input=f,this.labels=[],this.outputs=[];for(const[v,x]of g)this.labels.push(v),this.outputs.push(x)}static interpolationFactor(o,a,u,f){let g=0;if("exponential"===o.name)g=yp(a,o.base,u,f);else if("linear"===o.name)g=yp(a,1,u,f);else if("cubic-bezier"===o.name){const v=o.controlPoints;g=new le(v[0],v[1],v[2],v[3]).solve(yp(a,1,u,f))}return g}static parse(o,a){let[u,f,g,...v]=o;if(!Array.isArray(f)||0===f.length)return a.error("Expected an interpolation type expression.",1);if("linear"===f[0])f={name:"linear"};else if("exponential"===f[0]){const D=f[1];if("number"!=typeof D)return a.error("Exponential interpolation requires a numeric base.",1,1);f={name:"exponential",base:D}}else{if("cubic-bezier"!==f[0])return a.error(`Unknown interpolation type ${String(f[0])}`,1,0);{const D=f.slice(1);if(4!==D.length||D.some(A=>"number"!=typeof A||A<0||A>1))return a.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);f={name:"cubic-bezier",controlPoints:D}}}if(o.length-1<4)return a.error(`Expected at least 4 arguments, but found only ${o.length-1}.`);if((o.length-1)%2!=0)return a.error("Expected an even number of arguments.");if(g=a.parse(g,2,Vt),!g)return null;const x=[];let M=null;"interpolate-hcl"===u||"interpolate-lab"===u?M=ds:a.expectedType&&"value"!==a.expectedType.kind&&(M=a.expectedType);for(let D=0;D=A)return a.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',P);const N=a.parse(R,B,M);if(!N)return null;M=M||N.type,x.push([A,N])}return"number"===M.kind||"color"===M.kind||"array"===M.kind&&"number"===M.itemType.kind&&"number"==typeof M.N?new Rn(M,u,f,g,x):a.error(`Type ${lr(M)} is not interpolatable.`)}evaluate(o){const a=this.labels,u=this.outputs;if(1===a.length)return u[0].evaluate(o);const f=this.input.evaluate(o);if(f<=a[0])return u[0].evaluate(o);const g=a.length;if(f>=a[g-1])return u[g-1].evaluate(o);const v=Lu(a,f),x=Rn.interpolationFactor(this.interpolation,f,a[v],a[v+1]),M=u[v].evaluate(o),D=u[v+1].evaluate(o);return"interpolate"===this.operator?hl[this.type.kind.toLowerCase()](M,D,x):"interpolate-hcl"===this.operator?fa.reverse(fa.interpolate(fa.forward(M),fa.forward(D),x)):hs.reverse(hs.interpolate(hs.forward(M),hs.forward(D),x))}eachChild(o){o(this.input);for(const a of this.outputs)o(a)}outputDefined(){return this.outputs.every(o=>o.outputDefined())}serialize(){let o;o="linear"===this.interpolation.name?["linear"]:"exponential"===this.interpolation.name?1===this.interpolation.base?["linear"]:["exponential",this.interpolation.base]:["cubic-bezier"].concat(this.interpolation.controlPoints);const a=[this.operator,o,this.input.serialize()];for(let u=0;ual(f,x.type));return new Bu(v?Zn:u,g)}evaluate(o){let a,u=null,f=0;for(const g of this.args){if(f++,u=g.evaluate(o),u&&u instanceof js&&!u.available&&(a||(a=u),u=null,f===this.args.length))return a;if(null!==u)break}return u}eachChild(o){this.args.forEach(o)}outputDefined(){return this.args.every(o=>o.outputDefined())}serialize(){const o=["coalesce"];return this.eachChild(a=>{o.push(a.serialize())}),o}}var cn=Bu;class eh{constructor(o,a){this.type=a.type,this.bindings=[].concat(o),this.result=a}evaluate(o){return this.result.evaluate(o)}eachChild(o){for(const a of this.bindings)o(a[1]);o(this.result)}static parse(o,a){if(o.length<4)return a.error(`Expected at least 3 arguments, but found ${o.length-1} instead.`);const u=[];for(let g=1;g=u.length)throw new uo(`Array index out of bounds: ${a} > ${u.length-1}.`);if(a!==Math.floor(a))throw new uo(`Array index must be an integer, but found ${a} instead.`);return u[a]}eachChild(o){o(this.index),o(this.input)}outputDefined(){return!1}serialize(){return["at",this.index.serialize(),this.input.serialize()]}}var No=Ge;class Ei{constructor(o,a){this.type=on,this.needle=o,this.haystack=a}static parse(o,a){if(3!==o.length)return a.error(`Expected 2 arguments, but found ${o.length-1} instead.`);const u=a.parse(o[1],1,Zn),f=a.parse(o[2],2,Zn);return u&&f?mt(u.type,[on,ti,Vt,mr,Zn])?new Ei(u,f):a.error(`Expected first argument to be of type boolean, string, number or null, but found ${lr(u.type)} instead`):null}evaluate(o){const a=this.needle.evaluate(o),u=this.haystack.evaluate(o);if(null==u)return!1;if(!ll(a,["boolean","string","number","null"]))throw new uo(`Expected first argument to be of type boolean, string, number or null, but found ${lr(Vr(a))} instead.`);if(!ll(u,["string","array"]))throw new uo(`Expected second argument to be of type array or string, but found ${lr(Vr(u))} instead.`);return u.indexOf(a)>=0}eachChild(o){o(this.needle),o(this.haystack)}outputDefined(){return!0}serialize(){return["in",this.needle.serialize(),this.haystack.serialize()]}}var po=Ei;class Qr{constructor(o,a,u){this.type=Vt,this.needle=o,this.haystack=a,this.fromIndex=u}static parse(o,a){if(o.length<=2||o.length>=5)return a.error(`Expected 3 or 4 arguments, but found ${o.length-1} instead.`);const u=a.parse(o[1],1,Zn),f=a.parse(o[2],2,Zn);if(!u||!f)return null;if(!mt(u.type,[on,ti,Vt,mr,Zn]))return a.error(`Expected first argument to be of type boolean, string, number or null, but found ${lr(u.type)} instead`);if(4===o.length){const g=a.parse(o[3],3,Vt);return g?new Qr(u,f,g):null}return new Qr(u,f)}evaluate(o){const a=this.needle.evaluate(o),u=this.haystack.evaluate(o);if(!ll(a,["boolean","string","number","null"]))throw new uo(`Expected first argument to be of type boolean, string, number or null, but found ${lr(Vr(a))} instead.`);if(!ll(u,["string","array"]))throw new uo(`Expected second argument to be of type array or string, but found ${lr(Vr(u))} instead.`);if(this.fromIndex){const f=this.fromIndex.evaluate(o);return u.indexOf(a,f)}return u.indexOf(a)}eachChild(o){o(this.needle),o(this.haystack),this.fromIndex&&o(this.fromIndex)}outputDefined(){return!1}serialize(){if(null!=this.fromIndex&&void 0!==this.fromIndex){const o=this.fromIndex.serialize();return["index-of",this.needle.serialize(),this.haystack.serialize(),o]}return["index-of",this.needle.serialize(),this.haystack.serialize()]}}var Lc=Qr;class zo{constructor(o,a,u,f,g,v){this.inputType=o,this.type=a,this.input=u,this.cases=f,this.outputs=g,this.otherwise=v}static parse(o,a){if(o.length<5)return a.error(`Expected at least 4 arguments, but found only ${o.length-1}.`);if(o.length%2!=1)return a.error("Expected an even number of arguments.");let u,f;a.expectedType&&"value"!==a.expectedType.kind&&(f=a.expectedType);const g={},v=[];for(let D=2;DNumber.MAX_SAFE_INTEGER)return P.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);if("number"==typeof N&&Math.floor(N)!==N)return P.error("Numeric branch labels must be integer values.");if(u){if(P.checkSubtype(u,Vr(N)))return null}else u=Vr(N);if(void 0!==g[String(N)])return P.error("Branch labels must be unique.");g[String(N)]=v.length}const B=a.parse(R,D,f);if(!B)return null;f=f||B.type,v.push(B)}const x=a.parse(o[1],1,Zn);if(!x)return null;const M=a.parse(o[o.length-1],o.length-1,f);return M?"value"!==x.type.kind&&a.concat(1).checkSubtype(u,x.type)?null:new zo(u,f,x,g,v,M):null}evaluate(o){const a=this.input.evaluate(o);return(Vr(a)===this.inputType&&this.outputs[this.cases[a]]||this.otherwise).evaluate(o)}eachChild(o){o(this.input),this.outputs.forEach(o),o(this.otherwise)}outputDefined(){return this.outputs.every(o=>o.outputDefined())&&this.otherwise.outputDefined()}serialize(){const o=["match",this.input.serialize()],a=Object.keys(this.cases).sort(),u=[],f={};for(const v of a){const x=f[this.cases[v]];void 0===x?(f[this.cases[v]]=u.length,u.push([this.cases[v],[v]])):u[x][1].push(v)}const g=v=>"number"===this.inputType.kind?Number(v):v;for(const[v,x]of u)o.push(1===x.length?g(x[0]):x.map(g)),o.push(this.outputs[v].serialize());return o.push(this.otherwise.serialize()),o}}var Va=zo;class en{constructor(o,a,u){this.type=o,this.branches=a,this.otherwise=u}static parse(o,a){if(o.length<4)return a.error(`Expected at least 3 arguments, but found only ${o.length-1}.`);if(o.length%2!=0)return a.error("Expected an odd number of arguments.");let u;a.expectedType&&"value"!==a.expectedType.kind&&(u=a.expectedType);const f=[];for(let v=1;va.outputDefined())&&this.otherwise.outputDefined()}serialize(){const o=["case"];return this.eachChild(a=>{o.push(a.serialize())}),o}}var ii=en;class pr{constructor(o,a,u,f){this.type=o,this.input=a,this.beginIndex=u,this.endIndex=f}static parse(o,a){if(o.length<=2||o.length>=5)return a.error(`Expected 3 or 4 arguments, but found ${o.length-1} instead.`);const u=a.parse(o[1],1,Zn),f=a.parse(o[2],2,Vt);if(!u||!f)return null;if(!mt(u.type,[zr(Zn),ti,Zn]))return a.error(`Expected first argument to be of type array or string, but found ${lr(u.type)} instead`);if(4===o.length){const g=a.parse(o[3],3,Vt);return g?new pr(u.type,u,f,g):null}return new pr(u.type,u,f)}evaluate(o){const a=this.input.evaluate(o),u=this.beginIndex.evaluate(o);if(!ll(a,["string","array"]))throw new uo(`Expected first argument to be of type array or string, but found ${lr(Vr(a))} instead.`);if(this.endIndex){const f=this.endIndex.evaluate(o);return a.slice(u,f)}return a.slice(u)}eachChild(o){o(this.input),o(this.beginIndex),this.endIndex&&o(this.endIndex)}outputDefined(){return!1}serialize(){if(null!=this.endIndex&&void 0!==this.endIndex){const o=this.endIndex.serialize();return["slice",this.input.serialize(),this.beginIndex.serialize(),o]}return["slice",this.input.serialize(),this.beginIndex.serialize()]}}var Ws=pr;function pl(l,o){return"=="===l||"!="===l?"boolean"===o.kind||"string"===o.kind||"number"===o.kind||"null"===o.kind||"value"===o.kind:"string"===o.kind||"number"===o.kind||"value"===o.kind}function fo(l,o,a,u){return 0===u.compare(o,a)}function ks(l,o,a){const u="=="!==l&&"!="!==l;return class ZB{constructor(g,v,x){this.type=on,this.lhs=g,this.rhs=v,this.collator=x,this.hasUntypedArgument="value"===g.type.kind||"value"===v.type.kind}static parse(g,v){if(3!==g.length&&4!==g.length)return v.error("Expected two or three arguments.");const x=g[0];let M=v.parse(g[1],1,Zn);if(!M)return null;if(!pl(x,M.type))return v.concat(1).error(`"${x}" comparisons are not supported for type '${lr(M.type)}'.`);let D=v.parse(g[2],2,Zn);if(!D)return null;if(!pl(x,D.type))return v.concat(2).error(`"${x}" comparisons are not supported for type '${lr(D.type)}'.`);if(M.type.kind!==D.type.kind&&"value"!==M.type.kind&&"value"!==D.type.kind)return v.error(`Cannot compare types '${lr(M.type)}' and '${lr(D.type)}'.`);u&&("value"===M.type.kind&&"value"!==D.type.kind?M=new ul(D.type,[M]):"value"!==M.type.kind&&"value"===D.type.kind&&(D=new ul(M.type,[D])));let A=null;if(4===g.length){if("string"!==M.type.kind&&"string"!==D.type.kind&&"value"!==M.type.kind&&"value"!==D.type.kind)return v.error("Cannot use collator to compare non-string types.");if(A=v.parse(g[3],3,Iu),!A)return null}return new ZB(M,D,A)}evaluate(g){const v=this.lhs.evaluate(g),x=this.rhs.evaluate(g);if(u&&this.hasUntypedArgument){const M=Vr(v),D=Vr(x);if(M.kind!==D.kind||"string"!==M.kind&&"number"!==M.kind)throw new uo(`Expected arguments for "${l}" to be (string, string) or (number, number), but found (${M.kind}, ${D.kind}) instead.`)}if(this.collator&&!u&&this.hasUntypedArgument){const M=Vr(v),D=Vr(x);if("string"!==M.kind||"string"!==D.kind)return o(g,v,x)}return this.collator?a(g,v,x,this.collator.evaluate(g)):o(g,v,x)}eachChild(g){g(this.lhs),g(this.rhs),this.collator&&g(this.collator)}outputDefined(){return!0}serialize(){const g=[l];return this.eachChild(v=>{g.push(v.serialize())}),g}}}const Dr=ks("==",function(l,o,a){return o===a},fo),Nu=ks("!=",function(l,o,a){return o!==a},function(l,o,a,u){return!fo(0,o,a,u)}),Bc=ks("<",function(l,o,a){return o",function(l,o,a){return o>a},function(l,o,a,u){return u.compare(o,a)>0}),bp=ks("<=",function(l,o,a){return o<=a},function(l,o,a,u){return u.compare(o,a)<=0}),zu=ks(">=",function(l,o,a){return o>=a},function(l,o,a,u){return u.compare(o,a)>=0});class th{constructor(o,a,u,f,g,v){this.type=ti,this.number=o,this.locale=a,this.currency=u,this.unit=f,this.minFractionDigits=g,this.maxFractionDigits=v}static parse(o,a){if(3!==o.length)return a.error("Expected two arguments.");const u=a.parse(o[1],1,Vt);if(!u)return null;const f=o[2];if("object"!=typeof f||Array.isArray(f))return a.error("NumberFormat options argument must be an object.");let g=null;if(f.locale&&(g=a.parse(f.locale,1,ti),!g))return null;let v=null;if(f.currency&&(v=a.parse(f.currency,1,ti),!v))return null;let x=null;if(f.unit&&(x=a.parse(f.unit,1,ti),!x))return null;let M=null;if(f["min-fraction-digits"]&&(M=a.parse(f["min-fraction-digits"],1,Vt),!M))return null;let D=null;return f["max-fraction-digits"]&&(D=a.parse(f["max-fraction-digits"],1,Vt),!D)?null:new th(u,g,v,x,M,D)}evaluate(o){return new Intl.NumberFormat(this.locale?this.locale.evaluate(o):[],{style:(this.currency?"currency":this.unit&&"unit")||"decimal",currency:this.currency?this.currency.evaluate(o):void 0,unit:this.unit?this.unit.evaluate(o):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(o):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(o):void 0}).format(this.number.evaluate(o))}eachChild(o){o(this.number),this.locale&&o(this.locale),this.currency&&o(this.currency),this.unit&&o(this.unit),this.minFractionDigits&&o(this.minFractionDigits),this.maxFractionDigits&&o(this.maxFractionDigits)}outputDefined(){return!1}serialize(){const o={};return this.locale&&(o.locale=this.locale.serialize()),this.currency&&(o.currency=this.currency.serialize()),this.unit&&(o.unit=this.unit.serialize()),this.minFractionDigits&&(o["min-fraction-digits"]=this.minFractionDigits.serialize()),this.maxFractionDigits&&(o["max-fraction-digits"]=this.maxFractionDigits.serialize()),["number-format",this.number.serialize(),o]}}class fl{constructor(o){this.type=Vt,this.input=o}static parse(o,a){if(2!==o.length)return a.error(`Expected 1 argument, but found ${o.length-1} instead.`);const u=a.parse(o[1],1);return u?"array"!==u.type.kind&&"string"!==u.type.kind&&"value"!==u.type.kind?a.error(`Expected argument of type string or array, but found ${lr(u.type)} instead.`):new fl(u):null}evaluate(o){const a=this.input.evaluate(o);if("string"==typeof a||Array.isArray(a))return a.length;throw new uo(`Expected value to be of type string or array, but found ${lr(Vr(a))} instead.`)}eachChild(o){o(this.input)}outputDefined(){return!1}serialize(){const o=["length"];return this.eachChild(a=>{o.push(a.serialize())}),o}}const mo={"==":Dr,"!=":Nu,">":si,"<":Bc,">=":zu,"<=":bp,array:ul,at:No,boolean:ul,case:ii,coalesce:cn,collator:qd,format:Wd,image:fp,in:po,"index-of":Lc,interpolate:$s,"interpolate-hcl":$s,"interpolate-lab":$s,length:fl,let:vp,literal:Pu,match:Va,number:ul,"number-format":th,object:ul,slice:Ws,step:Kl,string:ul,"to-boolean":nn,"to-color":nn,"to-number":nn,"to-string":nn,var:Xl,within:Pc};function Nc(l,[o,a,u,f]){o=o.evaluate(l),a=a.evaluate(l),u=u.evaluate(l);const g=f?f.evaluate(l):1,v=B_(o,a,u,g);if(v)throw new uo(v);return new Sr(o/255*g,a/255*g,u/255*g,g)}function ml(l,o){return l in o}function ps(l,o){const a=o[l];return void 0===a?null:a}function Jo(l){return{type:l}}dl.register(mo,{error:[{kind:"error"},[ti],(l,[o])=>{throw new uo(o.evaluate(l))}],typeof:[ti,[Zn],(l,[o])=>lr(Vr(o.evaluate(l)))],"to-rgba":[zr(Vt,4),[ds],(l,[o])=>o.evaluate(l).toArray()],rgb:[ds,[Vt,Vt,Vt],Nc],rgba:[ds,[Vt,Vt,Vt,Vt],Nc],has:{type:on,overloads:[[[ti],(l,[o])=>ml(o.evaluate(l),l.properties())],[[ti,ki],(l,[o,a])=>ml(o.evaluate(l),a.evaluate(l))]]},get:{type:Zn,overloads:[[[ti],(l,[o])=>ps(o.evaluate(l),l.properties())],[[ti,ki],(l,[o,a])=>ps(o.evaluate(l),a.evaluate(l))]]},"feature-state":[Zn,[ti],(l,[o])=>ps(o.evaluate(l),l.featureState||{})],properties:[ki,[],l=>l.properties()],"geometry-type":[ti,[],l=>l.geometryType()],id:[Zn,[],l=>l.id()],zoom:[Vt,[],l=>l.globals.zoom],pitch:[Vt,[],l=>l.globals.pitch||0],"distance-from-center":[Vt,[],l=>l.distanceFromCenter()],"heatmap-density":[Vt,[],l=>l.globals.heatmapDensity||0],"line-progress":[Vt,[],l=>l.globals.lineProgress||0],"sky-radial-progress":[Vt,[],l=>l.globals.skyRadialProgress||0],accumulated:[Zn,[],l=>void 0===l.globals.accumulated?null:l.globals.accumulated],"+":[Vt,Jo(Vt),(l,o)=>{let a=0;for(const u of o)a+=u.evaluate(l);return a}],"*":[Vt,Jo(Vt),(l,o)=>{let a=1;for(const u of o)a*=u.evaluate(l);return a}],"-":{type:Vt,overloads:[[[Vt,Vt],(l,[o,a])=>o.evaluate(l)-a.evaluate(l)],[[Vt],(l,[o])=>-o.evaluate(l)]]},"/":[Vt,[Vt,Vt],(l,[o,a])=>o.evaluate(l)/a.evaluate(l)],"%":[Vt,[Vt,Vt],(l,[o,a])=>o.evaluate(l)%a.evaluate(l)],ln2:[Vt,[],()=>Math.LN2],pi:[Vt,[],()=>Math.PI],e:[Vt,[],()=>Math.E],"^":[Vt,[Vt,Vt],(l,[o,a])=>Math.pow(o.evaluate(l),a.evaluate(l))],sqrt:[Vt,[Vt],(l,[o])=>Math.sqrt(o.evaluate(l))],log10:[Vt,[Vt],(l,[o])=>Math.log(o.evaluate(l))/Math.LN10],ln:[Vt,[Vt],(l,[o])=>Math.log(o.evaluate(l))],log2:[Vt,[Vt],(l,[o])=>Math.log(o.evaluate(l))/Math.LN2],sin:[Vt,[Vt],(l,[o])=>Math.sin(o.evaluate(l))],cos:[Vt,[Vt],(l,[o])=>Math.cos(o.evaluate(l))],tan:[Vt,[Vt],(l,[o])=>Math.tan(o.evaluate(l))],asin:[Vt,[Vt],(l,[o])=>Math.asin(o.evaluate(l))],acos:[Vt,[Vt],(l,[o])=>Math.acos(o.evaluate(l))],atan:[Vt,[Vt],(l,[o])=>Math.atan(o.evaluate(l))],min:[Vt,Jo(Vt),(l,o)=>Math.min(...o.map(a=>a.evaluate(l)))],max:[Vt,Jo(Vt),(l,o)=>Math.max(...o.map(a=>a.evaluate(l)))],abs:[Vt,[Vt],(l,[o])=>Math.abs(o.evaluate(l))],round:[Vt,[Vt],(l,[o])=>{const a=o.evaluate(l);return a<0?-Math.round(-a):Math.round(a)}],floor:[Vt,[Vt],(l,[o])=>Math.floor(o.evaluate(l))],ceil:[Vt,[Vt],(l,[o])=>Math.ceil(o.evaluate(l))],"filter-==":[on,[ti,Zn],(l,[o,a])=>l.properties()[o.value]===a.value],"filter-id-==":[on,[Zn],(l,[o])=>l.id()===o.value],"filter-type-==":[on,[ti],(l,[o])=>l.geometryType()===o.value],"filter-<":[on,[ti,Zn],(l,[o,a])=>{const u=l.properties()[o.value],f=a.value;return typeof u==typeof f&&u{const a=l.id(),u=o.value;return typeof a==typeof u&&a":[on,[ti,Zn],(l,[o,a])=>{const u=l.properties()[o.value],f=a.value;return typeof u==typeof f&&u>f}],"filter-id->":[on,[Zn],(l,[o])=>{const a=l.id(),u=o.value;return typeof a==typeof u&&a>u}],"filter-<=":[on,[ti,Zn],(l,[o,a])=>{const u=l.properties()[o.value],f=a.value;return typeof u==typeof f&&u<=f}],"filter-id-<=":[on,[Zn],(l,[o])=>{const a=l.id(),u=o.value;return typeof a==typeof u&&a<=u}],"filter->=":[on,[ti,Zn],(l,[o,a])=>{const u=l.properties()[o.value],f=a.value;return typeof u==typeof f&&u>=f}],"filter-id->=":[on,[Zn],(l,[o])=>{const a=l.id(),u=o.value;return typeof a==typeof u&&a>=u}],"filter-has":[on,[Zn],(l,[o])=>o.value in l.properties()],"filter-has-id":[on,[],l=>null!==l.id()&&void 0!==l.id()],"filter-type-in":[on,[zr(ti)],(l,[o])=>o.value.indexOf(l.geometryType())>=0],"filter-id-in":[on,[zr(Zn)],(l,[o])=>o.value.indexOf(l.id())>=0],"filter-in-small":[on,[ti,zr(Zn)],(l,[o,a])=>a.value.indexOf(l.properties()[o.value])>=0],"filter-in-large":[on,[ti,zr(Zn)],(l,[o,a])=>function(u,f,g,v){for(;g<=v;){const x=g+v>>1;if(f[x]===u)return!0;f[x]>u?v=x-1:g=x+1}return!1}(l.properties()[o.value],a.value,0,a.value.length-1)],all:{type:on,overloads:[[[on,on],(l,[o,a])=>o.evaluate(l)&&a.evaluate(l)],[Jo(on),(l,o)=>{for(const a of o)if(!a.evaluate(l))return!1;return!0}]]},any:{type:on,overloads:[[[on,on],(l,[o,a])=>o.evaluate(l)||a.evaluate(l)],[Jo(on),(l,o)=>{for(const a of o)if(a.evaluate(l))return!0;return!1}]]},"!":[on,[on],(l,[o])=>!o.evaluate(l)],"is-supported-script":[on,[ti],(l,[o])=>{const a=l.globals&&l.globals.isSupportedScript;return!a||a(o.evaluate(l))}],upcase:[ti,[ti],(l,[o])=>o.evaluate(l).toUpperCase()],downcase:[ti,[ti],(l,[o])=>o.evaluate(l).toLowerCase()],concat:[ti,Jo(Zn),(l,o)=>o.map(a=>Ru(a.evaluate(l))).join("")],"resolved-locale":[ti,[Iu],(l,[o])=>o.evaluate(l).resolvedLocale()]});var zc=mo;function fr(l){return{result:"success",value:l}}function Rs(l){return{result:"error",value:l}}function Ga(l){return"data-driven"===l["property-type"]}function gl(l){return!!l.expression&&l.expression.parameters.indexOf("zoom")>-1}function Vc(l){return!!l.expression&&l.expression.interpolated}function di(l){return l instanceof Number?"number":l instanceof String?"string":l instanceof Boolean?"boolean":Array.isArray(l)?"array":null===l?"null":typeof l}function ma(l){return"object"==typeof l&&null!==l&&!Array.isArray(l)}function Vo(l){return l}function xp(l,o){const a="color"===o.type,u=l.stops&&"object"==typeof l.stops[0][0],f=u||!(u||void 0!==l.property),g=l.type||(Vc(o)?"exponential":"interval");if(a&&((l=La({},l)).stops&&(l.stops=l.stops.map(D=>[D[0],Sr.parse(D[1])])),l.default=Sr.parse(l.default?l.default:o.default)),l.colorSpace&&"rgb"!==l.colorSpace&&!_m[l.colorSpace])throw new Error(`Unknown color space: ${l.colorSpace}`);let v,x,M;if("exponential"===g)v=Ql;else if("interval"===g)v=nh;else if("categorical"===g){v=fs,x=Object.create(null);for(const D of l.stops)x[D[0]]=D[1];M=typeof l.stops[0][0]}else{if("identity"!==g)throw new Error(`Unknown function type "${g}"`);v=Gc}if(u){const D={},A=[];for(let B=0;BB[0]),evaluate:({zoom:B},N)=>Ql({stops:R,base:l.base},o,B).evaluate(B,N)}}if(f){const D="exponential"===g?{name:"exponential",base:void 0!==l.base?l.base:1}:null;return{kind:"camera",interpolationType:D,interpolationFactor:$s.interpolationFactor.bind(void 0,D),zoomStops:l.stops.map(A=>A[0]),evaluate:({zoom:A})=>v(l,o,A,x,M)}}return{kind:"source",evaluate(D,A){const R=A&&A.properties?A.properties[l.property]:void 0;return void 0===R?Jr(l.default,o.default):v(l,o,R,x,M)}}}function Jr(l,o,a){return void 0!==l?l:void 0!==o?o:void 0!==a?a:void 0}function fs(l,o,a,u,f){return Jr(typeof a===f?u[a]:void 0,l.default,o.default)}function nh(l,o,a){if("number"!==di(a))return Jr(l.default,o.default);const u=l.stops.length;if(1===u||a<=l.stops[0][0])return l.stops[0][1];if(a>=l.stops[u-1][0])return l.stops[u-1][1];const f=Lu(l.stops.map(g=>g[0]),a);return l.stops[f][1]}function Ql(l,o,a){const u=void 0!==l.base?l.base:1;if("number"!==di(a))return Jr(l.default,o.default);const f=l.stops.length;if(1===f||a<=l.stops[0][0])return l.stops[0][1];if(a>=l.stops[f-1][0])return l.stops[f-1][1];const g=Lu(l.stops.map(A=>A[0]),a),v=function(A,R,P,B){const N=B-P,U=A-P;return 0===N?0:1===R?U/N:(Math.pow(R,U)-1)/(Math.pow(R,N)-1)}(a,u,l.stops[g][0],l.stops[g+1][0]),x=l.stops[g][1],M=l.stops[g+1][1];let D=hl[o.type]||Vo;if(l.colorSpace&&"rgb"!==l.colorSpace){const A=_m[l.colorSpace];D=(R,P)=>A.reverse(A.interpolate(A.forward(R),A.forward(P),v))}return"function"==typeof x.evaluate?{evaluate(...A){const R=x.evaluate.apply(void 0,A),P=M.evaluate.apply(void 0,A);if(void 0!==R&&void 0!==P)return D(R,P,v)}}:D(x,M,v)}function Gc(l,o,a){return"color"===o.type?a=Sr.parse(a):"formatted"===o.type?a=vr.fromString(a.toString()):"resolvedImage"===o.type?a=js.fromString(a.toString()):di(a)===o.type||"enum"===o.type&&o.values[a]||(a=void 0),Jr(a,l.default,o.default)}class es{constructor(o,a){var u;this.expression=o,this._warningHistory={},this._evaluator=new hm,this._defaultValue=a?"color"===(u=a).type&&(ma(u.default)||Array.isArray(u.default))?new Sr(0,0,0,0):"color"===u.type?Sr.parse(u.default)||null:void 0===u.default?null:u.default:null,this._enumValues=a&&"enum"===a.type?a.values:null}evaluateWithoutErrorHandling(o,a,u,f,g,v,x,M){return this._evaluator.globals=o,this._evaluator.feature=a,this._evaluator.featureState=u,this._evaluator.canonical=f||null,this._evaluator.availableImages=g||null,this._evaluator.formattedSection=v,this._evaluator.featureTileCoord=x||null,this._evaluator.featureDistanceData=M||null,this.expression.evaluate(this._evaluator)}evaluate(o,a,u,f,g,v,x,M){this._evaluator.globals=o,this._evaluator.feature=a||null,this._evaluator.featureState=u||null,this._evaluator.canonical=f||null,this._evaluator.availableImages=g||null,this._evaluator.formattedSection=v||null,this._evaluator.featureTileCoord=x||null,this._evaluator.featureDistanceData=M||null;try{const D=this.expression.evaluate(this._evaluator);if(null==D||"number"==typeof D&&D!=D)return this._defaultValue;if(this._enumValues&&!(D in this._enumValues))throw new uo(`Expected value to be one of ${Object.keys(this._enumValues).map(A=>JSON.stringify(A)).join(", ")}, but found ${JSON.stringify(D)} instead.`);return D}catch(D){return this._warningHistory[D.message]||(this._warningHistory[D.message]=!0,typeof console<"u"&&console.warn(D.message)),this._defaultValue}}}function Vu(l){return Array.isArray(l)&&l.length>0&&"string"==typeof l[0]&&l[0]in zc}function Jl(l,o){const a=new Yl(zc,[],o?function(f){const g={color:ds,string:ti,number:Vt,enum:ti,boolean:on,formatted:ni,resolvedImage:Mn};return"array"===f.type?zr(g[f.value]||Zn,f.length):g[f.type]}(o):void 0),u=a.parse(l,void 0,void 0,void 0,o&&"string"===o.type?{typeAnnotation:"coerce"}:void 0);return u?fr(new es(u,o)):Rs(a.errors)}class _l{constructor(o,a){this.kind=o,this._styleExpression=a,this.isStateDependent="constant"!==o&&!Kd(a.expression)}evaluateWithoutErrorHandling(o,a,u,f,g,v){return this._styleExpression.evaluateWithoutErrorHandling(o,a,u,f,g,v)}evaluate(o,a,u,f,g,v){return this._styleExpression.evaluate(o,a,u,f,g,v)}}class ih{constructor(o,a,u,f){this.kind=o,this.zoomStops=u,this._styleExpression=a,this.isStateDependent="camera"!==o&&!Kd(a.expression),this.interpolationType=f}evaluateWithoutErrorHandling(o,a,u,f,g,v){return this._styleExpression.evaluateWithoutErrorHandling(o,a,u,f,g,v)}evaluate(o,a,u,f,g,v){return this._styleExpression.evaluate(o,a,u,f,g,v)}interpolationFactor(o,a,u){return this.interpolationType?$s.interpolationFactor(this.interpolationType,o,a,u):0}}function ym(l,o){if("error"===(l=Jl(l,o)).result)return l;const a=l.value.expression,u=Oc(a);if(!u&&!Ga(o))return Rs([new us("","data expressions not supported")]);const f=Ou(a,["zoom","pitch","distance-from-center"]);if(!f&&!gl(o))return Rs([new us("","zoom expressions not supported")]);const g=rh(a);return g||f?g instanceof us?Rs([g]):g instanceof $s&&!Vc(o)?Rs([new us("",'"interpolate" expressions cannot be used with this property')]):fr(g?new ih(u?"camera":"composite",l.value,g.labels,g instanceof $s?g.interpolation:void 0):new _l(u?"constant":"source",l.value)):Rs([new us("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')])}class Gu{constructor(o,a){this._parameters=o,this._specification=a,La(this,xp(this._parameters,this._specification))}static deserialize(o){return new Gu(o._parameters,o._specification)}static serialize(o){return{_parameters:o._parameters,_specification:o._specification}}}function rh(l){let o=null;if(l instanceof vp)o=rh(l.result);else if(l instanceof cn){for(const a of l.args)if(o=rh(a),o)break}else(l instanceof Kl||l instanceof $s)&&l.input instanceof dl&&"zoom"===l.input.name&&(o=l);return o instanceof us||l.eachChild(a=>{const u=rh(a);u instanceof us?o=u:!o&&u?o=new us("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):o&&u&&o!==u&&(o=new us("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),o}class jt{constructor(o,a,u,f){this.message=(o?`${o}: `:"")+u,f&&(this.identifier=f),null!=a&&a.__line__&&(this.line=a.__line__)}}function qs(l){const o=l.key,a=l.value,u=l.valueSpec||{},f=l.objectElementValidators||{},g=l.style,v=l.styleSpec;let x=[];const M=di(a);if("object"!==M)return[new jt(o,a,`object expected, ${M} found`)];for(const D in a){const A=D.split(".")[0];let P;f[A]?P=f[A]:u[A]?P=or:f["*"]?P=f["*"]:u["*"]&&(P=or),P?x=x.concat(P({key:(o&&`${o}.`)+D,value:a[D],valueSpec:u[A]||u["*"],style:g,styleSpec:v,object:a,objectKey:D},a)):x.push(new jt(o,a[D],`unknown property "${D}"`))}for(const D in u)f[D]||u[D].required&&void 0===u[D].default&&void 0===a[D]&&x.push(new jt(o,a,`missing required property "${D}"`));return x}function oh(l){const o=l.value,a=l.valueSpec,u=l.style,f=l.styleSpec,g=l.key,v=l.arrayElementValidator||or;if("array"!==di(o))return[new jt(g,o,`array expected, ${di(o)} found`)];if(a.length&&o.length!==a.length)return[new jt(g,o,`array length ${a.length} expected, length ${o.length} found`)];if(a["min-length"]&&o.lengthg)return[new jt(o,a,`${a} is greater than the maximum value ${g}`)]}return[]}function G_(l){const o=l.valueSpec,a=Pr(l.value.type);let u,f,g,v={};const x="categorical"!==a&&void 0===l.value.property,M=!x,D="array"===di(l.value.stops)&&"array"===di(l.value.stops[0])&&"object"===di(l.value.stops[0][0]),A=qs({key:l.key,value:l.value,valueSpec:l.styleSpec.function,style:l.style,styleSpec:l.styleSpec,objectElementValidators:{stops:function(B){if("identity"===a)return[new jt(B.key,B.value,'identity function may not have a "stops" property')];let N=[];const U=B.value;return N=N.concat(oh({key:B.key,value:U,valueSpec:B.valueSpec,style:B.style,styleSpec:B.styleSpec,arrayElementValidator:R})),"array"===di(U)&&0===U.length&&N.push(new jt(B.key,U,"array must have at least one stop")),N},default:function(B){return or({key:B.key,value:B.value,valueSpec:o,style:B.style,styleSpec:B.styleSpec})}}});return"identity"===a&&x&&A.push(new jt(l.key,l.value,'missing required property "property"')),"identity"===a||l.value.stops||A.push(new jt(l.key,l.value,'missing required property "stops"')),"exponential"===a&&l.valueSpec.expression&&!Vc(l.valueSpec)&&A.push(new jt(l.key,l.value,"exponential functions not supported")),l.styleSpec.$version>=8&&(M&&!Ga(l.valueSpec)?A.push(new jt(l.key,l.value,"property functions not supported")):x&&!gl(l.valueSpec)&&A.push(new jt(l.key,l.value,"zoom functions not supported"))),"categorical"!==a&&!D||void 0!==l.value.property||A.push(new jt(l.key,l.value,'"property" property is required')),A;function R(B){let N=[];const U=B.value,Z=B.key;if("array"!==di(U))return[new jt(Z,U,`array expected, ${di(U)} found`)];if(2!==U.length)return[new jt(Z,U,`array length 2 expected, length ${U.length} found`)];if(D){if("object"!==di(U[0]))return[new jt(Z,U,`object expected, ${di(U[0])} found`)];if(void 0===U[0].zoom)return[new jt(Z,U,"object stop key must have zoom")];if(void 0===U[0].value)return[new jt(Z,U,"object stop key must have value")];const re=Pr(U[0].zoom);if("number"!=typeof re)return[new jt(Z,U[0].zoom,"stop zoom values must be numbers")];if(g&&g>re)return[new jt(Z,U[0].zoom,"stop zoom values must appear in ascending order")];re!==g&&(g=re,f=void 0,v={}),N=N.concat(qs({key:`${Z}[0]`,value:U[0],valueSpec:{zoom:{}},style:B.style,styleSpec:B.styleSpec,objectElementValidators:{zoom:V_,value:P}}))}else N=N.concat(P({key:`${Z}[0]`,value:U[0],valueSpec:{},style:B.style,styleSpec:B.styleSpec},U));return Vu(Ba(U[1]))?N.concat([new jt(`${Z}[1]`,U[1],"expressions are not allowed in function stops.")]):N.concat(or({key:`${Z}[1]`,value:U[1],valueSpec:o,style:B.style,styleSpec:B.styleSpec}))}function P(B,N){const U=di(B.value),Z=Pr(B.value),re=null!==B.value?B.value:N;if(u){if(U!==u)return[new jt(B.key,re,`${U} stop domain type must match previous stop domain type ${u}`)]}else u=U;if("number"!==U&&"string"!==U&&"boolean"!==U&&"number"!=typeof Z&&"string"!=typeof Z&&"boolean"!=typeof Z)return[new jt(B.key,re,"stop domain value must be a number, string, or boolean")];if("number"!==U&&"categorical"!==a){let pe=`number expected, ${U} found`;return Ga(o)&&void 0===a&&(pe+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new jt(B.key,re,pe)]}return"categorical"!==a||"number"!==U||"number"==typeof Z&&isFinite(Z)&&Math.floor(Z)===Z?"categorical"!==a&&"number"===U&&"number"==typeof Z&&"number"==typeof f&&void 0!==f&&Znew jt(`${l.key}${u.key}`,l.value,u.message));const a=o.value.expression||o.value._styleExpression.expression;if("property"===l.expressionContext&&"text-font"===l.propertyKey&&!a.outputDefined())return[new jt(l.key,l.value,`Invalid data expression for "${l.propertyKey}". Output values must be contained as literals within the expression.`)];if("property"===l.expressionContext&&"layout"===l.propertyType&&!Kd(a))return[new jt(l.key,l.value,'"feature-state" data expressions are not supported with layout properties.')];if("filter"===l.expressionContext)return U_(a,l);if(l.expressionContext&&0===l.expressionContext.indexOf("cluster")){if(!Ou(a,["zoom","feature-state"]))return[new jt(l.key,l.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if("cluster-initial"===l.expressionContext&&!Oc(a))return[new jt(l.key,l.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function U_(l,o){const a=new Set(["zoom","feature-state","pitch","distance-from-center"]);if(o.valueSpec&&o.valueSpec.expression)for(const f of o.valueSpec.expression.parameters)a.delete(f);if(0===a.size)return[];const u=[];return l instanceof dl&&a.has(l.name)?[new jt(o.key,o.value,`["${l.name}"] expression is not supported in a filter for a ${o.object.type} layer with id: ${o.object.id}`)]:(l.eachChild(f=>{u.push(...U_(f,o))}),u)}function wp(l){const o=l.key,a=l.value,u=l.valueSpec,f=[];return Array.isArray(u.values)?-1===u.values.indexOf(Pr(a))&&f.push(new jt(o,a,`expected one of [${u.values.join(", ")}], ${JSON.stringify(a)} found`)):-1===Object.keys(u.values).indexOf(Pr(a))&&f.push(new jt(o,a,`expected one of [${Object.keys(u.values).join(", ")}], ${JSON.stringify(a)} found`)),f}function ju(l){if(!0===l||!1===l)return!0;if(!Array.isArray(l)||0===l.length)return!1;switch(l[0]){case"has":return l.length>=2&&"$id"!==l[1]&&"$type"!==l[1];case"in":return l.length>=3&&("string"!=typeof l[1]||Array.isArray(l[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return 3!==l.length||Array.isArray(l[1])||Array.isArray(l[2]);case"any":case"all":for(const o of l.slice(1))if(!ju(o)&&"boolean"!=typeof o)return!1;return!0;default:return!0}}function yl(l,o="fill"){if(null==l)return{filter:()=>!0,needGeometry:!1,needFeature:!1};ju(l)||(l=Hi(l));const a=l;let u=!0;try{u=function(D){if(!Hu(D))return D;let A=Ba(D);return sh(A),A=Go(A),A}(a)}catch{console.warn(`Failed to extract static filter. Filter will continue working, but at higher memory usage and slower framerate.\nThis is most likely a bug, please report this via https://github.com/mapbox/mapbox-gl-js/issues/new?assignees=&labels=&template=Bug_report.md\nand paste the contents of this message in the report.\nThank you!\nFilter Expression:\n${JSON.stringify(a,null,2)}\n `)}const f=at[`filter_${o}`],g=Jl(u,f);let v=null;if("error"===g.result)throw new Error(g.value.map(D=>`${D.key}: ${D.message}`).join(", "));v=(D,A,R)=>g.value.evaluate(D,A,{},R);let x=null,M=null;if(u!==a){const D=Jl(a,f);if("error"===D.result)throw new Error(D.value.map(A=>`${A.key}: ${A.message}`).join(", "));x=(A,R,P,B,N)=>D.value.evaluate(A,R,{},P,void 0,void 0,B,N),M=!Oc(D.value.expression)}return{filter:v,dynamicFilter:x||void 0,needGeometry:vm(u),needFeature:!!M}}function Go(l){if(!Array.isArray(l))return l;const o=function(a){if(j0.has(a[0]))for(let u=1;uGo(a))}function sh(l){let o=!1;const a=[];if("case"===l[0]){for(let u=1;u",">=","<","<=","to-boolean"]);function ec(l,o){return lo?1:0}function vm(l){if(!Array.isArray(l))return!1;if("within"===l[0])return!0;for(let o=1;o"===o||"<="===o||">="===o?ah(l[1],l[2],o):"any"===o?(a=l.slice(1),["any"].concat(a.map(Hi))):"all"===o?["all"].concat(l.slice(1).map(Hi)):"none"===o?["all"].concat(l.slice(1).map(Hi).map($u)):"in"===o?lh(l[1],l.slice(2)):"!in"===o?$u(lh(l[1],l.slice(2))):"has"===o?bm(l[1]):"!has"===o?$u(bm(l[1])):"within"!==o||l;var a}function ah(l,o,a){switch(l){case"$type":return[`filter-type-${a}`,o];case"$id":return[`filter-id-${a}`,o];default:return[`filter-${a}`,l,o]}}function lh(l,o){if(0===o.length)return!1;switch(l){case"$type":return["filter-type-in",["literal",o]];case"$id":return["filter-id-in",["literal",o]];default:return o.length>200&&!o.some(a=>typeof a!=typeof o[0])?["filter-in-large",l,["literal",o.sort(ec)]]:["filter-in-small",l,["literal",o]]}}function bm(l){switch(l){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",l]}}function $u(l){return["!",l]}function Uc(l){return ju(Ba(l.value))?Uu(La({},l,{expressionContext:"filter",valueSpec:l.styleSpec[`filter_${l.layerType||"fill"}`]})):xm(l)}function xm(l){const o=l.value,a=l.key;if("array"!==di(o))return[new jt(a,o,`array expected, ${di(o)} found`)];const u=l.styleSpec;let f,g=[];if(o.length<1)return[new jt(a,o,"filter array must have at least 1 element")];switch(g=g.concat(wp({key:`${a}[0]`,value:o[0],valueSpec:u.filter_operator,style:l.style,styleSpec:l.styleSpec})),Pr(o[0])){case"<":case"<=":case">":case">=":o.length>=2&&"$type"===Pr(o[1])&&g.push(new jt(a,o,`"$type" cannot be use with operator "${o[0]}"`));case"==":case"!=":3!==o.length&&g.push(new jt(a,o,`filter array for operator "${o[0]}" must have 3 elements`));case"in":case"!in":o.length>=2&&(f=di(o[1]),"string"!==f&&g.push(new jt(`${a}[1]`,o[1],`string expected, ${f} found`)));for(let v=2;v{D in a&&o.push(new jt(u,a[D],`"${D}" is prohibited for ref layers`))}),f.layers.forEach(D=>{Pr(D.id)===x&&(M=D)}),M?M.ref?o.push(new jt(u,a.ref,"ref cannot reference another ref layer")):v=Pr(M.type):"string"==typeof x&&o.push(new jt(u,a.ref,`ref layer "${x}" not found`))}else if("background"!==v&&"sky"!==v)if(a.source){const M=f.sources&&f.sources[a.source],D=M&&Pr(M.type);M?"vector"===D&&"raster"===v?o.push(new jt(u,a.source,`layer "${a.id}" requires a raster source`)):"raster"===D&&"raster"!==v?o.push(new jt(u,a.source,`layer "${a.id}" requires a vector source`)):"vector"!==D||a["source-layer"]?"raster-dem"===D&&"hillshade"!==v?o.push(new jt(u,a.source,"raster-dem source can only be used with layer type 'hillshade'.")):"line"!==v||!a.paint||!a.paint["line-gradient"]&&!a.paint["line-trim-offset"]||"geojson"===D&&M.lineMetrics||o.push(new jt(u,a,`layer "${a.id}" specifies a line-gradient, which requires a GeoJSON source with \`lineMetrics\` enabled.`)):o.push(new jt(u,a,`layer "${a.id}" must specify a "source-layer"`)):o.push(new jt(u,a.source,`source "${a.source}" not found`))}else o.push(new jt(u,a,'missing required property "source"'));return o=o.concat(qs({key:u,value:a,valueSpec:g.layer,style:l.style,styleSpec:l.styleSpec,objectElementValidators:{"*":()=>[],type:()=>or({key:`${u}.type`,value:a.type,valueSpec:g.layer.type,style:l.style,styleSpec:l.styleSpec,object:a,objectKey:"type"}),filter:M=>Uc(La({layerType:v},M)),layout:M=>qs({layer:a,key:M.key,value:M.value,valueSpec:{},style:M.style,styleSpec:M.styleSpec,objectElementValidators:{"*":D=>ms(La({layerType:v},D))}}),paint:M=>qs({layer:a,key:M.key,value:M.value,valueSpec:{},style:M.style,styleSpec:M.styleSpec,objectElementValidators:{"*":D=>Cp(La({layerType:v},D))}})}})),o}function ga(l){const o=l.value,a=l.key,u=di(o);return"string"!==u?[new jt(a,o,`string expected, ${u} found`)]:[]}const Gr={promoteId:function({key:l,value:o}){if("string"===di(o))return ga({key:l,value:o});{const a=[];for(const u in o)a.push(...ga({key:`${l}.${u}`,value:o[u]}));return a}}};function wm(l){const o=l.value,a=l.key,u=l.styleSpec,f=l.style;if(!o.type)return[new jt(a,o,'"type" is required')];const g=Pr(o.type);let v;switch(g){case"vector":case"raster":case"raster-dem":return v=qs({key:a,value:o,valueSpec:u[`source_${g.replace("-","_")}`],style:l.style,styleSpec:u,objectElementValidators:Gr}),v;case"geojson":if(v=qs({key:a,value:o,valueSpec:u.source_geojson,style:f,styleSpec:u,objectElementValidators:Gr}),o.cluster)for(const x in o.clusterProperties){const[M,D]=o.clusterProperties[x],A="string"==typeof M?[M,["accumulated"],["get",x]]:M;v.push(...Uu({key:`${a}.${x}.map`,value:D,expressionContext:"cluster-map"})),v.push(...Uu({key:`${a}.${x}.reduce`,value:A,expressionContext:"cluster-reduce"}))}return v;case"video":return qs({key:a,value:o,valueSpec:u.source_video,style:f,styleSpec:u});case"image":return qs({key:a,value:o,valueSpec:u.source_image,style:f,styleSpec:u});case"canvas":return[new jt(a,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return wp({key:`${a}.type`,value:o.type,valueSpec:{values:Zu(u)},style:f,styleSpec:u})}}function Zu(l){return l.source.reduce((o,a)=>{const u=l[a];return"enum"===u.type.type&&(o=o.concat(Object.keys(u.type.values))),o},[])}function ts(l){const o=l.value,a=l.styleSpec,u=a.light,f=l.style;let g=[];const v=di(o);if(void 0===o)return g;if("object"!==v)return g=g.concat([new jt("light",o,`object expected, ${v} found`)]),g;for(const x in o){const M=x.match(/^(.*)-transition$/);g=g.concat(M&&u[M[1]]&&u[M[1]].transition?or({key:x,value:o[x],valueSpec:a.transition,style:f,styleSpec:a}):u[x]?or({key:x,value:o[x],valueSpec:u[x],style:f,styleSpec:a}):[new jt(x,o[x],`unknown property "${x}"`)])}return g}function ch(l){const o=l.value,a=l.key,u=l.style,f=l.styleSpec,g=f.terrain;let v=[];const x=di(o);if(void 0===o)return v;if("object"!==x)return v=v.concat([new jt("terrain",o,`object expected, ${x} found`)]),v;for(const M in o){const D=M.match(/^(.*)-transition$/);v=v.concat(D&&g[D[1]]&&g[D[1]].transition?or({key:M,value:o[M],valueSpec:f.transition,style:u,styleSpec:f}):g[M]?or({key:M,value:o[M],valueSpec:g[M],style:u,styleSpec:f}):[new jt(M,o[M],`unknown property "${M}"`)])}if(o.source){const M=u.sources&&u.sources[o.source],D=M&&Pr(M.type);M?"raster-dem"!==D&&v.push(new jt(a,o.source,`terrain cannot be used with a source of type ${String(D)}, it only be used with a "raster-dem" source type`)):v.push(new jt(a,o.source,`source "${o.source}" not found`))}else v.push(new jt(a,o,'terrain is missing required property "source"'));return v}function Mp(l){const o=l.value,a=l.style,u=l.styleSpec,f=u.fog;let g=[];const v=di(o);if(void 0===o)return g;if("object"!==v)return g=g.concat([new jt("fog",o,`object expected, ${v} found`)]),g;for(const x in o){const M=x.match(/^(.*)-transition$/);g=g.concat(M&&f[M[1]]&&f[M[1]].transition?or({key:x,value:o[x],valueSpec:u.transition,style:a,styleSpec:u}):f[x]?or({key:x,value:o[x],valueSpec:f[x],style:a,styleSpec:u}):[new jt(x,o[x],`unknown property "${x}"`)])}return g}const tc={"*":()=>[],array:oh,boolean:function(l){const o=l.value,a=l.key,u=di(o);return"boolean"!==u?[new jt(a,o,`boolean expected, ${u} found`)]:[]},number:V_,color:function(l){const o=l.key,a=l.value,u=di(a);return"string"!==u?[new jt(o,a,`color expected, ${u} found`)]:null===Gn(a)?[new jt(o,a,`color expected, "${a}" found`)]:[]},enum:wp,filter:Uc,function:G_,layer:qu,object:qs,source:wm,light:ts,terrain:ch,fog:Mp,string:ga,formatted:function(l){return 0===ga(l).length?[]:Uu(l)},resolvedImage:function(l){return 0===ga(l).length?[]:Uu(l)},projection:function(l){const o=l.value,a=l.styleSpec,u=a.projection,f=l.style;let g=[];const v=di(o);if("object"===v)for(const x in o)g=g.concat(or({key:x,value:o[x],valueSpec:u[x],style:f,styleSpec:a}));else"string"!==v&&(g=g.concat([new jt("projection",o,`object or string expected, ${v} found`)]));return g}};function or(l){const o=l.value,a=l.valueSpec,u=l.styleSpec;return a.expression&&ma(Pr(o))?G_(l):a.expression&&Vu(Ba(o))?Uu(l):a.type&&tc[a.type]?tc[a.type](l):qs(La({},l,{valueSpec:a.type?u[a.type]:a}))}function j_(l){const o=l.value,a=l.key,u=ga(l);return u.length||(-1===o.indexOf("{fontstack}")&&u.push(new jt(a,o,'"glyphs" url must include a "{fontstack}" token')),-1===o.indexOf("{range}")&&u.push(new jt(a,o,'"glyphs" url must include a "{range}" token'))),u}function jc(l,o=at){return _a(or({key:"",value:l,valueSpec:o.$root,styleSpec:o,style:l,objectElementValidators:{glyphs:j_,"*":()=>[]}}))}const H_=l=>_a(Cp(l)),vl=l=>_a(ms(l));function _a(l){return l.slice().sort((o,a)=>o.line&&a.line?o.line-a.line:0)}function uh(l,o){let a=!1;if(o&&o.length)for(const u of o)l.fire(new Fa(new Error(u.message))),a=!0;return a}var zn=Zs;function Zs(l,o,a){var u=this.cells=[];if(l instanceof ArrayBuffer){this.arrayBuffer=l;var f=new Int32Array(this.arrayBuffer);l=f[0],this.d=(o=f[1])+2*(a=f[2]);for(var g=0;g=A[B+0]&&u>=A[B+1])?(v[P]=!0,g.push(D[P])):v[P]=!1}}},Zs.prototype._forEachCell=function(l,o,a,u,f,g,v,x){for(var M=this._convertToCellCoord(l),D=this._convertToCellCoord(o),A=this._convertToCellCoord(a),R=this._convertToCellCoord(u),P=M;P<=A;P++)for(var B=D;B<=R;B++){var N=this.d*B+P;if((!x||x(this._convertFromCellCoord(P),this._convertFromCellCoord(B),this._convertFromCellCoord(P+1),this._convertFromCellCoord(B+1)))&&f.call(this,l,o,a,u,N,g,v,x))return}},Zs.prototype._convertFromCellCoord=function(l){return(l-this.padding)/this.scale},Zs.prototype._convertToCellCoord=function(l){return Math.max(0,Math.min(this.d-1,Math.floor(l*this.scale)+this.padding))},Zs.prototype.toArrayBuffer=function(){if(this.arrayBuffer)return this.arrayBuffer;for(var l=this.cells,o=3+this.cells.length+1+1,a=0,u=0;u=0||(f[g]=Ua(l[g],o)));l instanceof Error&&(f.message=l.message)}if(f.$name)throw new Error("$name property is reserved for worker serialization logic.");return"Object"!==u&&(f.$name=u),f}throw new Error("can't serialize object of type "+typeof l)}function Xu(l){if(null==l||"boolean"==typeof l||"number"==typeof l||"string"==typeof l||l instanceof Boolean||l instanceof Number||l instanceof String||l instanceof Date||l instanceof RegExp||Cm(l)||Mm(l)||ArrayBuffer.isView(l)||l instanceof $.ImageData)return l;if(Array.isArray(l))return l.map(Xu);if("object"==typeof l){const o=l.$name||"Object",{klass:a}=Sp[o];if(!a)throw new Error(`can't deserialize unregistered class ${o}`);if(a.deserialize)return a.deserialize(l);const u=Object.create(a.prototype);for(const f of Object.keys(l))"$name"!==f&&(u[f]=Xu(l[f]));return u}throw new Error("can't deserialize object of type "+typeof l)}const Dp=l=>l>=1536&&l<=1791,Dt=l=>l>=1872&&l<=1919,mi=l=>l>=2208&&l<=2303,Wn=l=>l>=11904&&l<=12031,qn=l=>l>=12032&&l<=12255,Ur=l=>l>=12272&&l<=12287,nc=l=>l>=12288&&l<=12351,ja=l=>l>=12352&&l<=12447,gs=l=>l>=12448&&l<=12543,dh=l=>l>=12544&&l<=12591,Yu=l=>l>=12704&&l<=12735,Sm=l=>l>=12736&&l<=12783,$_=l=>l>=12784&&l<=12799,Ep=l=>l>=12800&&l<=13055,Do=l=>l>=13056&&l<=13311,ya=l=>l>=13312&&l<=19903,hh=l=>l>=19968&&l<=40959,ic=l=>l>=40960&&l<=42127,va=l=>l>=42128&&l<=42191,Tp=l=>l>=44032&&l<=55215,Hc=l=>l>=63744&&l<=64255,m=l=>l>=64336&&l<=65023,c=l=>l>=65040&&l<=65055,p=l=>l>=65072&&l<=65103,y=l=>l>=65104&&l<=65135,b=l=>l>=65136&&l<=65279,C=l=>l>=65280&&l<=65519;function E(l){for(const o of l)if(F(o.charCodeAt(0)))return!0;return!1}function T(l){for(const o of l)if(!k(o.charCodeAt(0)))return!1;return!0}function k(l){return!(Dp(l)||Dt(l)||mi(l)||m(l)||b(l))}function F(l){return!(746!==l&&747!==l&&(l<4352||!(Yu(l)||dh(l)||p(l)&&!(l>=65097&&l<=65103)||Hc(l)||Do(l)||Wn(l)||Sm(l)||!(!nc(l)||l>=12296&&l<=12305||l>=12308&&l<=12319||12336===l)||ya(l)||hh(l)||Ep(l)||(o=l,o>=12592&&o<=12687)||(o=>o>=43360&&o<=43391)(l)||(o=>o>=55216&&o<=55295)(l)||(o=>o>=4352&&o<=4607)(l)||Tp(l)||ja(l)||Ur(l)||(o=>o>=12688&&o<=12703)(l)||qn(l)||$_(l)||gs(l)&&12540!==l||!(!C(l)||65288===l||65289===l||65293===l||l>=65306&&l<=65310||65339===l||65341===l||65343===l||l>=65371&&l<=65503||65507===l||l>=65512&&l<=65519)||!(!y(l)||l>=65112&&l<=65118||l>=65123&&l<=65126)||(o=>o>=5120&&o<=5759)(l)||(o=>o>=6320&&o<=6399)(l)||c(l)||(o=>o>=19904&&o<=19967)(l)||ic(l)||va(l))));var o}function O(l){return!(F(l)||(o=l,(a=o)>=128&&a<=255&&(167===o||169===o||174===o||177===o||188===o||189===o||190===o||215===o||247===o)||(a=>a>=8192&&a<=8303)(o)&&(8214===o||8224===o||8225===o||8240===o||8241===o||8251===o||8252===o||8258===o||8263===o||8264===o||8265===o||8273===o)||(a=>a>=8448&&a<=8527)(o)||(a=>a>=8528&&a<=8591)(o)||(a=>a>=8960&&a<=9215)(o)&&(o>=8960&&o<=8967||o>=8972&&o<=8991||o>=8996&&o<=9e3||9003===o||o>=9085&&o<=9114||o>=9150&&o<=9165||9167===o||o>=9169&&o<=9179||o>=9186&&o<=9215)||(a=>a>=9216&&a<=9279)(o)&&9251!==o||(a=>a>=9280&&a<=9311)(o)||(a=>a>=9312&&a<=9471)(o)||(a=>a>=9632&&a<=9727)(o)||(a=>a>=9728&&a<=9983)(o)&&!(o>=9754&&o<=9759)||(a=>a>=11008&&a<=11263)(o)&&(o>=11026&&o<=11055||o>=11088&&o<=11097||o>=11192&&o<=11243)||nc(o)||gs(o)||(a=>a>=57344&&a<=63743)(o)||p(o)||y(o)||C(o)||8734===o||8756===o||8757===o||o>=9984&&o<=10087||o>=10102&&o<=10131||65532===o||65533===o));var o,a}function G(l){return l>=1424&&l<=2303||m(l)||b(l)}function W(l,o){return!(!o&&G(l)||l>=2304&&l<=3583||l>=3840&&l<=4255||(a=l,a>=6016&&a<=6143));var a}function Q(l){for(const o of l)if(G(o.charCodeAt(0)))return!0;return!1}const K="deferred",ne="loading",q="loaded";let X=null,ee="unavailable",te=null;const ce=function(l){l&&"string"==typeof l&&l.indexOf("NetworkError")>-1&&(ee="error"),X&&X(l)};function _e(){ge.fire(new pa("pluginStateChange",{pluginStatus:ee,pluginURL:te}))}const ge=new cs,Me=function(){return ee},We=function(){if(ee!==K||!te)throw new Error("rtl-text-plugin cannot be downloaded unless a pluginURL is specified");ee=ne,_e(),te&&Vl({url:te},l=>{l?ce(l):(ee=q,_e())})},ze={applyArabicShaping:null,processBidirectionalText:null,processStyledBidirectionalText:null,isLoaded:()=>ee===q||null!=ze.applyArabicShaping,isLoading:()=>ee===ne,setState(l){ee=l.pluginStatus,te=l.pluginURL},isParsed:()=>null!=ze.applyArabicShaping&&null!=ze.processBidirectionalText&&null!=ze.processStyledBidirectionalText,getPluginURL:()=>te};class Te{constructor(o,a){this.zoom=o,a?(this.now=a.now,this.fadeDuration=a.fadeDuration,this.transition=a.transition,this.pitch=a.pitch):(this.now=0,this.fadeDuration=0,this.transition={},this.pitch=0)}isSupportedScript(o){return function(a,u){for(const f of a)if(!W(f.charCodeAt(0),u))return!1;return!0}(o,ze.isLoaded())}}class Ct{constructor(o,a){this.property=o,this.value=a,this.expression=function(u,f){if(ma(u))return new Gu(u,f);if(Vu(u)){const g=ym(u,f);if("error"===g.result)throw new Error(g.value.map(v=>`${v.key}: ${v.message}`).join(", "));return g.value}{let g=u;return"string"==typeof u&&"color"===f.type&&(g=Sr.parse(u)),{kind:"constant",evaluate:()=>g}}}(void 0===a?o.specification.default:a,o.specification)}isDataDriven(){return"source"===this.expression.kind||"composite"===this.expression.kind}possiblyEvaluate(o,a,u){return this.property.possiblyEvaluate(this,o,a,u)}}class Le{constructor(o){this.property=o,this.value=new Ct(o,void 0)}transitioned(o,a){return new Ye(this.property,this.value,a,xn({},o.transition,this.transition),o.now)}untransitioned(){return new Ye(this.property,this.value,null,{},0)}}class st{constructor(o){this._properties=o,this._values=Object.create(o.defaultTransitionablePropertyValues)}getValue(o){return Cr(this._values[o].value.value)}setValue(o,a){this._values.hasOwnProperty(o)||(this._values[o]=new Le(this._values[o].property)),this._values[o].value=new Ct(this._values[o].property,null===a?void 0:Cr(a))}getTransition(o){return Cr(this._values[o].transition)}setTransition(o,a){this._values.hasOwnProperty(o)||(this._values[o]=new Le(this._values[o].property)),this._values[o].transition=Cr(a)||void 0}serialize(){const o={};for(const a of Object.keys(this._values)){const u=this.getValue(a);void 0!==u&&(o[a]=u);const f=this.getTransition(a);void 0!==f&&(o[`${a}-transition`]=f)}return o}transitioned(o,a){const u=new bt(this._properties);for(const f of Object.keys(this._values))u._values[f]=this._values[f].transitioned(o,a._values[f]);return u}untransitioned(){const o=new bt(this._properties);for(const a of Object.keys(this._values))o._values[a]=this._values[a].untransitioned();return o}}class Ye{constructor(o,a,u,f,g){const v=f.delay||0,x=f.duration||0;g=g||0,this.property=o,this.value=a,this.begin=g+v,this.end=this.begin+x,o.specification.transition&&(f.delay||f.duration)&&(this.prior=u)}possiblyEvaluate(o,a,u){const f=o.now||0,g=this.value.possiblyEvaluate(o,a,u),v=this.prior;if(v){if(f>this.end)return this.prior=null,g;if(this.value.isDataDriven())return this.prior=null,g;if(fthis.capacity){this.capacity=Math.max(o,Math.floor(5*this.capacity),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);const a=this.uint8;this._refreshViews(),a&&this.uint8.set(a)}}_refreshViews(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")}destroy(){this.int8=this.uint8=this.int16=this.uint16=this.int32=this.uint32=this.float32=null,this.arrayBuffer=null}}function Ht(l,o=1){let a=0,u=0;return{members:l.map(f=>{const g=Sn[f.type].BYTES_PER_ELEMENT,v=a=gi(a,Math.max(o,g)),x=f.components||1;return u=Math.max(u,g),a+=g*x,{name:f.name,type:f.type,components:x,offset:v}}),size:gi(a,Math.max(u,o)),alignment:o}}function gi(l,o){return Math.ceil(l/o)*o}class _i extends un{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(o,a){const u=this.length;return this.resize(u+1),this.emplace(u,o,a)}emplace(o,a,u){const f=2*o;return this.int16[f+0]=a,this.int16[f+1]=u,o}}_i.prototype.bytesPerElement=4,Wt(_i,"StructArrayLayout2i4");class zi extends un{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(o,a,u){const f=this.length;return this.resize(f+1),this.emplace(f,o,a,u)}emplace(o,a,u,f){const g=3*o;return this.int16[g+0]=a,this.int16[g+1]=u,this.int16[g+2]=f,o}}zi.prototype.bytesPerElement=6,Wt(zi,"StructArrayLayout3i6");class xi extends un{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(o,a,u,f){const g=this.length;return this.resize(g+1),this.emplace(g,o,a,u,f)}emplace(o,a,u,f,g){const v=4*o;return this.int16[v+0]=a,this.int16[v+1]=u,this.int16[v+2]=f,this.int16[v+3]=g,o}}xi.prototype.bytesPerElement=8,Wt(xi,"StructArrayLayout4i8");class ns extends un{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(o,a,u,f,g,v,x){const M=this.length;return this.resize(M+1),this.emplace(M,o,a,u,f,g,v,x)}emplace(o,a,u,f,g,v,x,M){const D=6*o,A=12*o,R=3*o;return this.int16[D+0]=a,this.int16[D+1]=u,this.uint8[A+4]=f,this.uint8[A+5]=g,this.uint8[A+6]=v,this.uint8[A+7]=x,this.float32[R+2]=M,o}}ns.prototype.bytesPerElement=12,Wt(ns,"StructArrayLayout2i4ub1f12");class Eo extends un{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(o,a,u,f){const g=this.length;return this.resize(g+1),this.emplace(g,o,a,u,f)}emplace(o,a,u,f,g){const v=4*o;return this.float32[v+0]=a,this.float32[v+1]=u,this.float32[v+2]=f,this.float32[v+3]=g,o}}Eo.prototype.bytesPerElement=16,Wt(Eo,"StructArrayLayout4f16");class go extends un{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(o,a,u,f,g){const v=this.length;return this.resize(v+1),this.emplace(v,o,a,u,f,g)}emplace(o,a,u,f,g,v){const x=6*o,M=3*o;return this.uint16[x+0]=a,this.uint16[x+1]=u,this.uint16[x+2]=f,this.uint16[x+3]=g,this.float32[M+2]=v,o}}go.prototype.bytesPerElement=12,Wt(go,"StructArrayLayout4ui1f12");class _s extends un{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(o,a,u,f){const g=this.length;return this.resize(g+1),this.emplace(g,o,a,u,f)}emplace(o,a,u,f,g){const v=4*o;return this.uint16[v+0]=a,this.uint16[v+1]=u,this.uint16[v+2]=f,this.uint16[v+3]=g,o}}_s.prototype.bytesPerElement=8,Wt(_s,"StructArrayLayout4ui8");class cr extends un{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(o,a,u,f,g,v){const x=this.length;return this.resize(x+1),this.emplace(x,o,a,u,f,g,v)}emplace(o,a,u,f,g,v,x){const M=6*o;return this.int16[M+0]=a,this.int16[M+1]=u,this.int16[M+2]=f,this.int16[M+3]=g,this.int16[M+4]=v,this.int16[M+5]=x,o}}cr.prototype.bytesPerElement=12,Wt(cr,"StructArrayLayout6i12");class Vi extends un{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(o,a,u,f,g,v,x,M,D,A,R,P){const B=this.length;return this.resize(B+1),this.emplace(B,o,a,u,f,g,v,x,M,D,A,R,P)}emplace(o,a,u,f,g,v,x,M,D,A,R,P,B){const N=12*o;return this.int16[N+0]=a,this.int16[N+1]=u,this.int16[N+2]=f,this.int16[N+3]=g,this.uint16[N+4]=v,this.uint16[N+5]=x,this.uint16[N+6]=M,this.uint16[N+7]=D,this.int16[N+8]=A,this.int16[N+9]=R,this.int16[N+10]=P,this.int16[N+11]=B,o}}Vi.prototype.bytesPerElement=24,Wt(Vi,"StructArrayLayout4i4ui4i24");class hi extends un{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(o,a,u,f,g,v){const x=this.length;return this.resize(x+1),this.emplace(x,o,a,u,f,g,v)}emplace(o,a,u,f,g,v,x){const M=10*o,D=5*o;return this.int16[M+0]=a,this.int16[M+1]=u,this.int16[M+2]=f,this.float32[D+2]=g,this.float32[D+3]=v,this.float32[D+4]=x,o}}hi.prototype.bytesPerElement=20,Wt(hi,"StructArrayLayout3i3f20");class Er extends un{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)}emplaceBack(o){const a=this.length;return this.resize(a+1),this.emplace(a,o)}emplace(o,a){return this.uint32[1*o+0]=a,o}}Er.prototype.bytesPerElement=4,Wt(Er,"StructArrayLayout1ul4");class gr extends un{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(o,a,u,f,g,v,x,M,D,A,R,P,B){const N=this.length;return this.resize(N+1),this.emplace(N,o,a,u,f,g,v,x,M,D,A,R,P,B)}emplace(o,a,u,f,g,v,x,M,D,A,R,P,B,N){const U=20*o,Z=10*o;return this.int16[U+0]=a,this.int16[U+1]=u,this.int16[U+2]=f,this.int16[U+3]=g,this.int16[U+4]=v,this.float32[Z+3]=x,this.float32[Z+4]=M,this.float32[Z+5]=D,this.float32[Z+6]=A,this.int16[U+14]=R,this.uint32[Z+8]=P,this.uint16[U+18]=B,this.uint16[U+19]=N,o}}gr.prototype.bytesPerElement=40,Wt(gr,"StructArrayLayout5i4f1i1ul2ui40");class er extends un{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(o,a,u,f,g,v,x){const M=this.length;return this.resize(M+1),this.emplace(M,o,a,u,f,g,v,x)}emplace(o,a,u,f,g,v,x,M){const D=8*o;return this.int16[D+0]=a,this.int16[D+1]=u,this.int16[D+2]=f,this.int16[D+4]=g,this.int16[D+5]=v,this.int16[D+6]=x,this.int16[D+7]=M,o}}er.prototype.bytesPerElement=16,Wt(er,"StructArrayLayout3i2i2i16");class eo extends un{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(o,a,u,f,g){const v=this.length;return this.resize(v+1),this.emplace(v,o,a,u,f,g)}emplace(o,a,u,f,g,v){const x=4*o,M=8*o;return this.float32[x+0]=a,this.float32[x+1]=u,this.float32[x+2]=f,this.int16[M+6]=g,this.int16[M+7]=v,o}}eo.prototype.bytesPerElement=16,Wt(eo,"StructArrayLayout2f1f2i16");class rc extends un{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(o,a,u,f){const g=this.length;return this.resize(g+1),this.emplace(g,o,a,u,f)}emplace(o,a,u,f,g){const v=12*o,x=3*o;return this.uint8[v+0]=a,this.uint8[v+1]=u,this.float32[x+1]=f,this.float32[x+2]=g,o}}rc.prototype.bytesPerElement=12,Wt(rc,"StructArrayLayout2ub2f12");class ba extends un{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(o,a,u){const f=this.length;return this.resize(f+1),this.emplace(f,o,a,u)}emplace(o,a,u,f){const g=3*o;return this.float32[g+0]=a,this.float32[g+1]=u,this.float32[g+2]=f,o}}ba.prototype.bytesPerElement=12,Wt(ba,"StructArrayLayout3f12");class to extends un{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(o,a,u){const f=this.length;return this.resize(f+1),this.emplace(f,o,a,u)}emplace(o,a,u,f){const g=3*o;return this.uint16[g+0]=a,this.uint16[g+1]=u,this.uint16[g+2]=f,o}}to.prototype.bytesPerElement=6,Wt(to,"StructArrayLayout3ui6");class is extends un{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)}emplaceBack(o,a,u,f,g,v,x,M,D,A,R,P,B,N,U,Z,re,pe,oe,ue,ye){const fe=this.length;return this.resize(fe+1),this.emplace(fe,o,a,u,f,g,v,x,M,D,A,R,P,B,N,U,Z,re,pe,oe,ue,ye)}emplace(o,a,u,f,g,v,x,M,D,A,R,P,B,N,U,Z,re,pe,oe,ue,ye,fe){const He=30*o,je=15*o,nt=60*o;return this.int16[He+0]=a,this.int16[He+1]=u,this.int16[He+2]=f,this.float32[je+2]=g,this.float32[je+3]=v,this.uint16[He+8]=x,this.uint16[He+9]=M,this.uint32[je+5]=D,this.uint32[je+6]=A,this.uint32[je+7]=R,this.uint16[He+16]=P,this.uint16[He+17]=B,this.uint16[He+18]=N,this.float32[je+10]=U,this.float32[je+11]=Z,this.uint8[nt+48]=re,this.uint8[nt+49]=pe,this.uint8[nt+50]=oe,this.uint32[je+13]=ue,this.int16[He+28]=ye,this.uint8[nt+58]=fe,o}}is.prototype.bytesPerElement=60,Wt(is,"StructArrayLayout3i2f2ui3ul3ui2f3ub1ul1i1ub60");class xa extends un{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)}emplaceBack(o,a,u,f,g,v,x,M,D,A,R,P,B,N,U,Z,re,pe,oe,ue,ye,fe,He,je,nt,xt,Ue,lt,dt,pt){const et=this.length;return this.resize(et+1),this.emplace(et,o,a,u,f,g,v,x,M,D,A,R,P,B,N,U,Z,re,pe,oe,ue,ye,fe,He,je,nt,xt,Ue,lt,dt,pt)}emplace(o,a,u,f,g,v,x,M,D,A,R,P,B,N,U,Z,re,pe,oe,ue,ye,fe,He,je,nt,xt,Ue,lt,dt,pt,et){const qe=38*o,kt=19*o;return this.int16[qe+0]=a,this.int16[qe+1]=u,this.int16[qe+2]=f,this.float32[kt+2]=g,this.float32[kt+3]=v,this.int16[qe+8]=x,this.int16[qe+9]=M,this.int16[qe+10]=D,this.int16[qe+11]=A,this.int16[qe+12]=R,this.int16[qe+13]=P,this.uint16[qe+14]=B,this.uint16[qe+15]=N,this.uint16[qe+16]=U,this.uint16[qe+17]=Z,this.uint16[qe+18]=re,this.uint16[qe+19]=pe,this.uint16[qe+20]=oe,this.uint16[qe+21]=ue,this.uint16[qe+22]=ye,this.uint16[qe+23]=fe,this.uint16[qe+24]=He,this.uint16[qe+25]=je,this.uint16[qe+26]=nt,this.uint16[qe+27]=xt,this.uint16[qe+28]=Ue,this.uint32[kt+15]=lt,this.float32[kt+16]=dt,this.float32[kt+17]=pt,this.float32[kt+18]=et,o}}xa.prototype.bytesPerElement=76,Wt(xa,"StructArrayLayout3i2f6i15ui1ul3f76");class Xs extends un{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(o){const a=this.length;return this.resize(a+1),this.emplace(a,o)}emplace(o,a){return this.float32[1*o+0]=a,o}}Xs.prototype.bytesPerElement=4,Wt(Xs,"StructArrayLayout1f4");class $c extends un{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(o,a,u,f,g){const v=this.length;return this.resize(v+1),this.emplace(v,o,a,u,f,g)}emplace(o,a,u,f,g,v){const x=5*o;return this.float32[x+0]=a,this.float32[x+1]=u,this.float32[x+2]=f,this.float32[x+3]=g,this.float32[x+4]=v,o}}$c.prototype.bytesPerElement=20,Wt($c,"StructArrayLayout5f20");class oc extends un{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(o,a,u,f){const g=this.length;return this.resize(g+1),this.emplace(g,o,a,u,f)}emplace(o,a,u,f,g){const v=6*o;return this.uint32[3*o+0]=a,this.uint16[v+2]=u,this.uint16[v+3]=f,this.uint16[v+4]=g,o}}oc.prototype.bytesPerElement=12,Wt(oc,"StructArrayLayout1ul3ui12");class Ys extends un{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(o,a){const u=this.length;return this.resize(u+1),this.emplace(u,o,a)}emplace(o,a,u){const f=2*o;return this.uint16[f+0]=a,this.uint16[f+1]=u,o}}Ys.prototype.bytesPerElement=4,Wt(Ys,"StructArrayLayout2ui4");class Ap extends un{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(o){const a=this.length;return this.resize(a+1),this.emplace(a,o)}emplace(o,a){return this.uint16[1*o+0]=a,o}}Ap.prototype.bytesPerElement=2,Wt(Ap,"StructArrayLayout1ui2");class Ku extends un{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(o,a){const u=this.length;return this.resize(u+1),this.emplace(u,o,a)}emplace(o,a,u){const f=2*o;return this.float32[f+0]=a,this.float32[f+1]=u,o}}Ku.prototype.bytesPerElement=8,Wt(Ku,"StructArrayLayout2f8");class Wc extends Un{get projectedAnchorX(){return this._structArray.int16[this._pos2+0]}get projectedAnchorY(){return this._structArray.int16[this._pos2+1]}get projectedAnchorZ(){return this._structArray.int16[this._pos2+2]}get tileAnchorX(){return this._structArray.int16[this._pos2+3]}get tileAnchorY(){return this._structArray.int16[this._pos2+4]}get x1(){return this._structArray.float32[this._pos4+3]}get y1(){return this._structArray.float32[this._pos4+4]}get x2(){return this._structArray.float32[this._pos4+5]}get y2(){return this._structArray.float32[this._pos4+6]}get padding(){return this._structArray.int16[this._pos2+14]}get featureIndex(){return this._structArray.uint32[this._pos4+8]}get sourceLayerIndex(){return this._structArray.uint16[this._pos2+18]}get bucketIndex(){return this._structArray.uint16[this._pos2+19]}}Wc.prototype.size=40;class W_ extends gr{get(o){return new Wc(this,o)}}Wt(W_,"CollisionBoxArray");class q_ extends Un{get projectedAnchorX(){return this._structArray.int16[this._pos2+0]}get projectedAnchorY(){return this._structArray.int16[this._pos2+1]}get projectedAnchorZ(){return this._structArray.int16[this._pos2+2]}get tileAnchorX(){return this._structArray.float32[this._pos4+2]}get tileAnchorY(){return this._structArray.float32[this._pos4+3]}get glyphStartIndex(){return this._structArray.uint16[this._pos2+8]}get numGlyphs(){return this._structArray.uint16[this._pos2+9]}get vertexStartIndex(){return this._structArray.uint32[this._pos4+5]}get lineStartIndex(){return this._structArray.uint32[this._pos4+6]}get lineLength(){return this._structArray.uint32[this._pos4+7]}get segment(){return this._structArray.uint16[this._pos2+16]}get lowerSize(){return this._structArray.uint16[this._pos2+17]}get upperSize(){return this._structArray.uint16[this._pos2+18]}get lineOffsetX(){return this._structArray.float32[this._pos4+10]}get lineOffsetY(){return this._structArray.float32[this._pos4+11]}get writingMode(){return this._structArray.uint8[this._pos1+48]}get placedOrientation(){return this._structArray.uint8[this._pos1+49]}set placedOrientation(o){this._structArray.uint8[this._pos1+49]=o}get hidden(){return this._structArray.uint8[this._pos1+50]}set hidden(o){this._structArray.uint8[this._pos1+50]=o}get crossTileID(){return this._structArray.uint32[this._pos4+13]}set crossTileID(o){this._structArray.uint32[this._pos4+13]=o}get associatedIconIndex(){return this._structArray.int16[this._pos2+28]}get flipState(){return this._structArray.uint8[this._pos1+58]}set flipState(o){this._structArray.uint8[this._pos1+58]=o}}q_.prototype.size=60;class Z_ extends is{get(o){return new q_(this,o)}}Wt(Z_,"PlacedSymbolArray");class Qu extends Un{get projectedAnchorX(){return this._structArray.int16[this._pos2+0]}get projectedAnchorY(){return this._structArray.int16[this._pos2+1]}get projectedAnchorZ(){return this._structArray.int16[this._pos2+2]}get tileAnchorX(){return this._structArray.float32[this._pos4+2]}get tileAnchorY(){return this._structArray.float32[this._pos4+3]}get rightJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+8]}get centerJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+9]}get leftJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+10]}get verticalPlacedTextSymbolIndex(){return this._structArray.int16[this._pos2+11]}get placedIconSymbolIndex(){return this._structArray.int16[this._pos2+12]}get verticalPlacedIconSymbolIndex(){return this._structArray.int16[this._pos2+13]}get key(){return this._structArray.uint16[this._pos2+14]}get textBoxStartIndex(){return this._structArray.uint16[this._pos2+15]}get textBoxEndIndex(){return this._structArray.uint16[this._pos2+16]}get verticalTextBoxStartIndex(){return this._structArray.uint16[this._pos2+17]}get verticalTextBoxEndIndex(){return this._structArray.uint16[this._pos2+18]}get iconBoxStartIndex(){return this._structArray.uint16[this._pos2+19]}get iconBoxEndIndex(){return this._structArray.uint16[this._pos2+20]}get verticalIconBoxStartIndex(){return this._structArray.uint16[this._pos2+21]}get verticalIconBoxEndIndex(){return this._structArray.uint16[this._pos2+22]}get featureIndex(){return this._structArray.uint16[this._pos2+23]}get numHorizontalGlyphVertices(){return this._structArray.uint16[this._pos2+24]}get numVerticalGlyphVertices(){return this._structArray.uint16[this._pos2+25]}get numIconVertices(){return this._structArray.uint16[this._pos2+26]}get numVerticalIconVertices(){return this._structArray.uint16[this._pos2+27]}get useRuntimeCollisionCircles(){return this._structArray.uint16[this._pos2+28]}get crossTileID(){return this._structArray.uint32[this._pos4+15]}set crossTileID(o){this._structArray.uint32[this._pos4+15]=o}get textOffset0(){return this._structArray.float32[this._pos4+16]}get textOffset1(){return this._structArray.float32[this._pos4+17]}get collisionCircleDiameter(){return this._structArray.float32[this._pos4+18]}}Qu.prototype.size=76;class H0 extends xa{get(o){return new Qu(this,o)}}Wt(H0,"SymbolInstanceArray");class qt extends Xs{getoffsetX(o){return this.float32[1*o+0]}}Wt(qt,"GlyphOffsetArray");class Dm extends _i{getx(o){return this.int16[2*o+0]}gety(o){return this.int16[2*o+1]}}Wt(Dm,"SymbolLineVertexArray");class $0 extends Un{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]}get layoutVertexArrayOffset(){return this._structArray.uint16[this._pos2+4]}}$0.prototype.size=12;class X_ extends oc{get(o){return new $0(this,o)}}Wt(X_,"FeatureIndexArray");class wa extends Ys{geta_centroid_pos0(o){return this.uint16[2*o+0]}geta_centroid_pos1(o){return this.uint16[2*o+1]}}Wt(wa,"FillExtrusionCentroidArray");const ph=Ht([{name:"a_pattern",components:4,type:"Uint16"},{name:"a_pixel_ratio",components:1,type:"Float32"}]),fh=Ht([{name:"a_dash",components:4,type:"Uint16"}]);var Ha={exports:{}},Ju=function(l,o){var a,u,f,g,v,x,M,D;for(u=l.length-(a=3&l.length),f=o,v=3432918353,x=461845907,D=0;D>>16)*v&65535)<<16)&4294967295)<<15|M>>>17))*x+(((M>>>16)*x&65535)<<16)&4294967295)<<13|f>>>19))+((5*(f>>>16)&65535)<<16)&4294967295))+((58964+(g>>>16)&65535)<<16);switch(M=0,a){case 3:M^=(255&l.charCodeAt(D+2))<<16;case 2:M^=(255&l.charCodeAt(D+1))<<8;case 1:f^=M=(65535&(M=(M=(65535&(M^=255&l.charCodeAt(D)))*v+(((M>>>16)*v&65535)<<16)&4294967295)<<15|M>>>17))*x+(((M>>>16)*x&65535)<<16)&4294967295}return f^=l.length,f=2246822507*(65535&(f^=f>>>16))+((2246822507*(f>>>16)&65535)<<16)&4294967295,f=3266489909*(65535&(f^=f>>>13))+((3266489909*(f>>>16)&65535)<<16)&4294967295,(f^=f>>>16)>>>0},xT=function(l,o){for(var a,u=l.length,f=o^u,g=0;u>=4;)a=1540483477*(65535&(a=255&l.charCodeAt(g)|(255&l.charCodeAt(++g))<<8|(255&l.charCodeAt(++g))<<16|(255&l.charCodeAt(++g))<<24))+((1540483477*(a>>>16)&65535)<<16),f=1540483477*(65535&f)+((1540483477*(f>>>16)&65535)<<16)^(a=1540483477*(65535&(a^=a>>>24))+((1540483477*(a>>>16)&65535)<<16)),u-=4,++g;switch(u){case 3:f^=(255&l.charCodeAt(g+2))<<16;case 2:f^=(255&l.charCodeAt(g+1))<<8;case 1:f=1540483477*(65535&(f^=255&l.charCodeAt(g)))+((1540483477*(f>>>16)&65535)<<16)}return f=1540483477*(65535&(f^=f>>>13))+((1540483477*(f>>>16)&65535)<<16),(f^=f>>>15)>>>0};Ha.exports=Ju,Ha.exports.murmur3=Ju,Ha.exports.murmur2=xT;class Tm{constructor(){this.ids=[],this.positions=[],this.indexed=!1}add(o,a,u,f){this.ids.push(vt(o)),this.positions.push(a,u,f)}getPositions(o){const a=vt(o);let u=0,f=this.ids.length-1;for(;u>1;this.ids[v]>=a?f=v:u=v+1}const g=[];for(;this.ids[u]===a;)g.push({index:this.positions[3*u],start:this.positions[3*u+1],end:this.positions[3*u+2]}),u++;return g}static serialize(o,a){const u=new Float64Array(o.ids),f=new Uint32Array(o.positions);return W0(u,f,0,u.length-1),a&&a.push(u.buffer,f.buffer),{ids:u,positions:f}}static deserialize(o){const a=new Tm;return a.ids=o.ids,a.positions=o.positions,a.indexed=!0,a}}function vt(l){const o=+l;return!isNaN(o)&&Number.MIN_SAFE_INTEGER<=o&&o<=Number.MAX_SAFE_INTEGER?o:Ha.exports(String(l))}function W0(l,o,a,u){for(;a>1];let g=a-1,v=u+1;for(;;){do{g++}while(l[g]f);if(g>=v)break;K_(l,g,v),K_(o,3*g,3*v),K_(o,3*g+1,3*v+1),K_(o,3*g+2,3*v+2)}v-a`u_${f}`),this.type=u}setUniform(o,a,u,f,g){a.set(o,g,f.constantOr(this.value))}getBinding(o,a){return"color"===this.type?new h1(o):new Q_(o)}}class Zc{constructor(o,a){this.uniformNames=a.map(u=>`u_${u}`),this.pattern=null,this.pixelRatio=1}setConstantPatternPositions(o){this.pixelRatio=o.pixelRatio||1,this.pattern=o.tl.concat(o.br)}setUniform(o,a,u,f,g){const v="u_pattern"===g||"u_dash"===g?this.pattern:"u_pixel_ratio"===g?this.pixelRatio:null;v&&a.set(o,g,v)}getBinding(o,a){return"u_pattern"===a||"u_dash"===a?new d1(o):new Q_(o)}}class Ks{constructor(o,a,u,f){this.expression=o,this.type=u,this.maxValue=0,this.paintVertexAttributes=a.map(g=>({name:`a_${g}`,type:"Float32",components:"color"===u?2:1,offset:0})),this.paintVertexArray=new f}populatePaintArray(o,a,u,f,g,v){const x=this.paintVertexArray.length,M=this.expression.evaluate(new Te(0),a,{},g,f,v);this.paintVertexArray.resize(o),this._setPaintValue(x,o,M)}updatePaintArray(o,a,u,f,g){const v=this.expression.evaluate({zoom:0},u,f,void 0,g);this._setPaintValue(o,a,v)}_setPaintValue(o,a,u){if("color"===this.type){const f=q0(u);for(let g=o;g`u_${x}_t`),this.type=u,this.useIntegerZoom=f,this.zoom=g,this.maxValue=0,this.paintVertexAttributes=a.map(x=>({name:`a_${x}`,type:"Float32",components:"color"===u?4:2,offset:0})),this.paintVertexArray=new v}populatePaintArray(o,a,u,f,g,v){const x=this.expression.evaluate(new Te(this.zoom),a,{},g,f,v),M=this.expression.evaluate(new Te(this.zoom+1),a,{},g,f,v),D=this.paintVertexArray.length;this.paintVertexArray.resize(o),this._setPaintValue(D,o,x,M)}updatePaintArray(o,a,u,f,g){const v=this.expression.evaluate({zoom:this.zoom},u,f,void 0,g),x=this.expression.evaluate({zoom:this.zoom+1},u,f,void 0,g);this._setPaintValue(o,a,v,x)}_setPaintValue(o,a,u,f){if("color"===this.type){const g=q0(u),v=q0(f);for(let x=o;x!0)){this.binders={},this._buffers=[];const f=[];for(const g in o.paint._values){if(!u(g))continue;const v=o.paint.get(g);if(!(v instanceof gt&&Ga(v.property.specification)))continue;const x=kp(g,o.type),M=v.value,D=v.property.specification.type,A=v.property.useIntegerZoom,R="line-dasharray"===g||g.endsWith("pattern"),P="line-dasharray"===g&&"constant"!==o.layout.get("line-cap").value.kind;if("constant"!==M.kind||P)if("source"===M.kind||P||R){const B=Z0(g,D,"source");this.binders[g]=R?new _o(M,x,D,B,o.id):new Ks(M,x,D,B),f.push(`/a_${g}`)}else{const B=Z0(g,D,"composite");this.binders[g]=new $a(M,x,D,A,a,B),f.push(`/z_${g}`)}else this.binders[g]=R?new Zc(M.value,x):new Ir(M.value,x,D),f.push(`/u_${g}`)}this.cacheKey=f.sort().join("")}getMaxValue(o){const a=this.binders[o];return a instanceof Ks||a instanceof $a?a.maxValue:0}populatePaintArrays(o,a,u,f,g,v){for(const x in this.binders){const M=this.binders[x];(M instanceof Ks||M instanceof $a||M instanceof _o)&&M.populatePaintArray(o,a,u,f,g,v)}}setConstantPatternPositions(o){for(const a in this.binders){const u=this.binders[a];u instanceof Zc&&u.setConstantPatternPositions(o)}}updatePaintArrays(o,a,u,f,g,v){let x=!1;for(const M in o){const D=a.getPositions(M);for(const A of D){const R=u.feature(A.index);for(const P in this.binders){const B=this.binders[P];if((B instanceof Ks||B instanceof $a||B instanceof _o)&&!0===B.expression.isStateDependent){const N=f.paint.get(P);B.expression=N.value,B.updatePaintArray(A.start,A.end,R,o[M],g,v),x=!0}}}}return x}defines(){const o=[];for(const a in this.binders){const u=this.binders[a];(u instanceof Ir||u instanceof Zc)&&o.push(...u.uniformNames.map(f=>`#define HAS_UNIFORM_${f}`))}return o}getBinderAttributes(){const o=[];for(const a in this.binders){const u=this.binders[a];if(u instanceof Ks||u instanceof $a||u instanceof _o)for(let f=0;f!0)){this.programConfigurations={};for(const f of o)this.programConfigurations[f.id]=new Ps(f,a,u);this.needsUpload=!1,this._featureMap=new Tm,this._bufferOffset=0}populatePaintArrays(o,a,u,f,g,v,x){for(const M in this.programConfigurations)this.programConfigurations[M].populatePaintArrays(o,a,f,g,v,x);void 0!==a.id&&this._featureMap.add(a.id,u,this._bufferOffset,o),this._bufferOffset=o,this.needsUpload=!0}updatePaintArrays(o,a,u,f,g){for(const v of u)this.needsUpload=this.programConfigurations[v.id].updatePaintArrays(o,this._featureMap,a,v,f,g)||this.needsUpload}get(o){return this.programConfigurations[o]}upload(o){if(this.needsUpload){for(const a in this.programConfigurations)this.programConfigurations[a].upload(o);this.needsUpload=!1}}destroy(){for(const o in this.programConfigurations)this.programConfigurations[o].destroy()}}const Am={"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","pixel_ratio"],"fill-pattern":["pattern","pixel_ratio"],"fill-extrusion-pattern":["pattern","pixel_ratio"],"line-dasharray":["dash"]};function kp(l,o){return Am[l]||[l.replace(`${o}-`,"").replace(/-/g,"_")]}const p1={"line-pattern":{source:go,composite:go},"fill-pattern":{source:go,composite:go},"fill-extrusion-pattern":{source:go,composite:go},"line-dasharray":{source:_s,composite:_s}},MT={color:{source:Ku,composite:Eo},number:{source:Xs,composite:Ku}};function Z0(l,o,a){const u=p1[l];return u&&u[a]||MT[o][a]}Wt(Ir,"ConstantBinder"),Wt(Zc,"PatternConstantBinder"),Wt(Ks,"SourceExpressionBinder"),Wt(_o,"PatternCompositeBinder"),Wt($a,"CompositeExpressionBinder"),Wt(Ps,"ProgramConfiguration",{omit:["_buffers"]}),Wt(Xc,"ProgramConfigurationSet");const J_="-transition";class kr extends cs{constructor(o,a){if(super(),this.id=o.id,this.type=o.type,this._featureFilter={filter:()=>!0,needGeometry:!1,needFeature:!1},this._filterCompiled=!1,"custom"!==o.type&&(this.metadata=o.metadata,this.minzoom=o.minzoom,this.maxzoom=o.maxzoom,"background"!==o.type&&"sky"!==o.type&&(this.source=o.source,this.sourceLayer=o["source-layer"],this.filter=o.filter),a.layout&&(this._unevaluatedLayout=new Ke(a.layout)),a.paint)){this._transitionablePaint=new st(a.paint);for(const u in o.paint)this.setPaintProperty(u,o.paint[u],{validate:!1});for(const u in o.layout)this.setLayoutProperty(u,o.layout[u],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new Tt(a.paint)}}getLayoutProperty(o){return"visibility"===o?this.visibility:this._unevaluatedLayout.getValue(o)}setLayoutProperty(o,a,u={}){null!=a&&this._validate(vl,`layers.${this.id}.layout.${o}`,o,a,u)||("visibility"!==o?this._unevaluatedLayout.setValue(o,a):this.visibility=a)}getPaintProperty(o){return Mo(o,J_)?this._transitionablePaint.getTransition(o.slice(0,-J_.length)):this._transitionablePaint.getValue(o)}setPaintProperty(o,a,u={}){if(null!=a&&this._validate(H_,`layers.${this.id}.paint.${o}`,o,a,u))return!1;if(Mo(o,J_))return this._transitionablePaint.setTransition(o.slice(0,-J_.length),a||void 0),!1;{const f=this._transitionablePaint._values[o],g=f.value.isDataDriven(),v=f.value;this._transitionablePaint.setValue(o,a),this._handleSpecialPaintPropertyUpdate(o);const x=this._transitionablePaint._values[o].value,M=x.isDataDriven(),D=Mo(o,"pattern")||"line-dasharray"===o;return M||g||D||this._handleOverridablePaintPropertyUpdate(o,v,x)}}_handleSpecialPaintPropertyUpdate(o){}getProgramIds(){return null}getProgramConfiguration(o){return null}_handleOverridablePaintPropertyUpdate(o,a,u){return!1}isHidden(o){return!!(this.minzoom&&o=this.maxzoom)||"none"===this.visibility}updateTransitions(o){this._transitioningPaint=this._transitionablePaint.transitioned(o,this._transitioningPaint)}hasTransition(){return this._transitioningPaint.hasTransition()}recalculate(o,a){this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(o,void 0,a)),this.paint=this._transitioningPaint.possiblyEvaluate(o,void 0,a)}serialize(){const o={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&&(o.layout=o.layout||{},o.layout.visibility=this.visibility),Nn(o,(a,u)=>!(void 0===a||"layout"===u&&!Object.keys(a).length||"paint"===u&&!Object.keys(a).length))}_validate(o,a,u,f,g={}){return(!g||!1!==g.validate)&&uh(this,o.call(jc,{key:a,layerType:this.type,objectKey:u,value:f,styleSpec:at,style:{glyphs:!0,sprite:!0}}))}is3D(){return!1}isSky(){return!1}isTileClipped(){return!1}hasOffscreenPass(){return!1}resize(){}isStateDependent(){for(const o in this.paint._values){const a=this.paint.get(o);if(a instanceof gt&&Ga(a.property.specification)&&("source"===a.value.kind||"composite"===a.value.kind)&&a.value.isStateDependent)return!0}return!1}compileFilter(){this._filterCompiled||(this._featureFilter=yl(this.filter),this._filterCompiled=!0)}invalidateCompiledFilter(){this._filterCompiled=!1}dynamicFilter(){return this._featureFilter.dynamicFilter}dynamicFilterNeedsFeature(){return this._featureFilter.needFeature}}const ey=Ht([{name:"a_pos",components:2,type:"Int16"}],4),mh=Ht([{name:"a_pos_3",components:3,type:"Int16"},{name:"a_pos_normal_3",components:3,type:"Int16"}]);class jr{constructor(o=[]){this.segments=o}prepareSegment(o,a,u,f){let g=this.segments[this.segments.length-1];return o>jr.MAX_VERTEX_ARRAY_LENGTH&&Ji(`Max vertices per segment is ${jr.MAX_VERTEX_ARRAY_LENGTH}: bucket requested ${o}`),(!g||g.vertexLength+o>jr.MAX_VERTEX_ARRAY_LENGTH||g.sortKey!==f)&&(g={vertexOffset:a.length,primitiveOffset:u.length,vertexLength:0,primitiveLength:0},void 0!==f&&(g.sortKey=f),this.segments.push(g)),g}get(){return this.segments}destroy(){for(const o of this.segments)for(const a in o.vaos)o.vaos[a].destroy()}static simpleSegment(o,a,u,f){return new jr([{vertexOffset:o,primitiveOffset:a,vertexLength:u,primitiveLength:f,vaos:{},sortKey:0}])}}jr.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,Wt(jr,"SegmentVector");var wn=8192;class Yc{constructor(o,a){o&&(a?this.setSouthWest(o).setNorthEast(a):4===o.length?this.setSouthWest([o[0],o[1]]).setNorthEast([o[2],o[3]]):this.setSouthWest(o[0]).setNorthEast(o[1]))}setNorthEast(o){return this._ne=o instanceof pi?new pi(o.lng,o.lat):pi.convert(o),this}setSouthWest(o){return this._sw=o instanceof pi?new pi(o.lng,o.lat):pi.convert(o),this}extend(o){const a=this._sw,u=this._ne;let f,g;if(o instanceof pi)f=o,g=o;else{if(!(o instanceof Yc))return Array.isArray(o)?4===o.length||o.every(Array.isArray)?this.extend(Yc.convert(o)):this.extend(pi.convert(o)):"object"==typeof o&&null!==o&&o.hasOwnProperty("lat")&&o.hasOwnProperty("lon")?this.extend(pi.convert(o)):this;if(f=o._sw,g=o._ne,!f||!g)return this}return a||u?(a.lng=Math.min(f.lng,a.lng),a.lat=Math.min(f.lat,a.lat),u.lng=Math.max(g.lng,u.lng),u.lat=Math.max(g.lat,u.lat)):(this._sw=new pi(f.lng,f.lat),this._ne=new pi(g.lng,g.lat)),this}getCenter(){return new pi((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 pi(this.getWest(),this.getNorth())}getSouthEast(){return new pi(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(o){const{lng:a,lat:u}=pi.convert(o);let f=this._sw.lng<=a&&a<=this._ne.lng;return this._sw.lng>this._ne.lng&&(f=this._sw.lng>=a&&a>=this._ne.lng),this._sw.lat<=u&&u<=this._ne.lat&&f}static convert(o){return!o||o instanceof Yc?o:new Yc(o)}}const Im=6371008.8;class pi{constructor(o,a){if(isNaN(o)||isNaN(a))throw new Error(`Invalid LngLat object: (${o}, ${a})`);if(this.lng=+o,this.lat=+a,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")}wrap(){return new pi(Nr(this.lng,-180,180),this.lat)}toArray(){return[this.lng,this.lat]}toString(){return`LngLat(${this.lng}, ${this.lat})`}distanceTo(o){const a=Math.PI/180,u=this.lat*a,f=o.lat*a,g=Math.sin(u)*Math.sin(f)+Math.cos(u)*Math.cos(f)*Math.cos((o.lng-this.lng)*a);return Im*Math.acos(Math.min(g,1))}toBounds(o=0){const a=360*o/40075017,u=a/Math.cos(Math.PI/180*this.lat);return new Yc(new pi(this.lng-u,this.lat-a),new pi(this.lng+u,this.lat+a))}static convert(o){if(o instanceof pi)return o;if(Array.isArray(o)&&(2===o.length||3===o.length))return new pi(Number(o[0]),Number(o[1]));if(!Array.isArray(o)&&"object"==typeof o&&null!==o)return new pi(Number("lng"in o?o.lng:o.lon),Number(o.lat));throw new Error("`LngLatLike` argument must be specified as a LngLat instance, an object {lng: , lat: }, an object {lon: , lat: }, or an array of [, ]")}}const X0=2*Math.PI*Im;function ty(l){return X0*Math.cos(l*Math.PI/180)}function bl(l){return(180+l)/360}function Ca(l){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+l*Math.PI/360)))/360}function ys(l,o){return l/ty(o)}function To(l){return 360*l-180}function $i(l){return 360/Math.PI*Math.atan(Math.exp((180-360*l)*Math.PI/180))-90}function ny(l,o){return l*ty($i(o))}const Hr=85.051129;function Y0(l){return 1/Math.cos(l*Math.PI/180)}class ed{constructor(o,a,u=0){this.x=+o,this.y=+a,this.z=+u}static fromLngLat(o,a=0){const u=pi.convert(o);return new ed(bl(u.lng),Ca(u.lat),ys(a,u.lat))}toLngLat(){return new pi(To(this.x),$i(this.y))}toAltitude(){return ny(this.z,this.y)}meterInMercatorCoordinateUnits(){return 1/X0*Y0($i(this.y))}}function td(l,o,a,u,f,g,v,x,M){const D=(o+u)/2,A=(a+f)/2,R=new Ee(D,A);x(R),function(P,B,N,U,Z,re){const pe=N-Z,oe=U-re;return Math.abs((U-B)*pe-(N-P)*oe)/Math.hypot(pe,oe)}(R.x,R.y,g.x,g.y,v.x,v.y)>=M?(td(l,o,a,D,A,g,R,x,M),td(l,D,A,u,f,R,v,x,M)):l.push(v)}function Rp(l,o,a){let u=l[0],f=u.x,g=u.y;o(u);const v=[u];for(let x=1;xl.x+1||ul.y+1)&&Ji("Geometry exceeds allowed extent, reduce your vector tile buffer size"),l}function sc(l,o,a){const u=l.loadGeometry(),f=l.extent,g=wn/f;if(o&&a&&a.projection.isReprojectedInTileSpace){const v=1<{const B=To((o.x+P.x/f)/v),N=$i((o.y+P.y/f)/v),U=A.project(B,N);P.x=(U.x*x-M)*f,P.y=(U.y*x-D)*f};for(let P=0;P=f||N.y<0||N.y>=f||(R(N),B.push(N));u[P]=B}}for(const v of u)for(const x of v)Pp(x,g);return u}function gh(l,o){return{type:l.type,id:l.id,properties:l.properties,geometry:o?sc(l):[]}}function Op(l,o,a,u,f){l.emplaceBack(2*o+(u+1)/2,2*a+(f+1)/2)}function Rm(l,o,a){l.emplaceBack(o.x,o.y,o.z,16384*a[0],16384*a[1],16384*a[2])}class K0{constructor(o){this.zoom=o.zoom,this.overscaling=o.overscaling,this.layers=o.layers,this.layerIds=this.layers.map(a=>a.id),this.index=o.index,this.hasPattern=!1,this.projection=o.projection,this.layoutVertexArray=new _i,this.indexArray=new to,this.segments=new jr,this.programConfigurations=new Xc(o.layers,o.zoom),this.stateDependentLayerIds=this.layers.filter(a=>a.isStateDependent()).map(a=>a.id)}populate(o,a,u,f){const g=this.layers[0],v=[];let x=null;"circle"===g.type&&(x=g.layout.get("circle-sort-key"));for(const{feature:D,id:A,index:R,sourceLayerIndex:P}of o){const B=this.layers[0]._featureFilter.needGeometry,N=gh(D,B);if(!this.layers[0]._featureFilter.filter(new Te(this.zoom),N,u))continue;const U=x?x.evaluate(N,{},u):void 0,Z={id:A,properties:D.properties,type:D.type,sourceLayerIndex:P,index:R,geometry:B?N.geometry:sc(D,u,f),patterns:{},sortKey:U};v.push(Z)}x&&v.sort((D,A)=>D.sortKey-A.sortKey);let M=null;"globe"===f.projection.name&&(this.globeExtVertexArray=new cr,M=f.projection);for(const D of v){const{geometry:A,index:R,sourceLayerIndex:P}=D,B=o[R].feature;this.addFeature(D,A,R,a.availableImages,u,M),a.featureIndex.insert(B,A,R,P,this.index)}}update(o,a,u,f){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(o,a,this.stateDependentLayers,u,f)}isEmpty(){return 0===this.layoutVertexArray.length}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(o){this.uploaded||(this.layoutVertexBuffer=o.createVertexBuffer(this.layoutVertexArray,ey.members),this.indexBuffer=o.createIndexBuffer(this.indexArray),this.globeExtVertexArray&&(this.globeExtVertexBuffer=o.createVertexBuffer(this.globeExtVertexArray,mh.members))),this.programConfigurations.upload(o),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.globeExtVertexBuffer&&this.globeExtVertexBuffer.destroy())}addFeature(o,a,u,f,g,v){for(const x of a)for(const M of x){const D=M.x,A=M.y;if(D<0||D>=wn||A<0||A>=wn)continue;if(v){const B=v.projectTilePoint(D,A,g),N=v.upVector(g,D,A),U=this.globeExtVertexArray;Rm(U,B,N),Rm(U,B,N),Rm(U,B,N),Rm(U,B,N)}const R=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,o.sortKey),P=R.vertexLength;Op(this.layoutVertexArray,D,A,-1,-1),Op(this.layoutVertexArray,D,A,1,-1),Op(this.layoutVertexArray,D,A,1,1),Op(this.layoutVertexArray,D,A,-1,1),this.indexArray.emplaceBack(P,P+1,P+2),this.indexArray.emplaceBack(P,P+2,P+3),R.vertexLength+=4,R.primitiveLength+=2}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,o,u,{},f,g)}}function Q0(l,o){for(let a=0;a1){if(Om(l,o))return!0;for(let u=0;u1?a:a.sub(o)._mult(f)._add(o))}function ry(l,o){let a,u,f,g=!1;for(let v=0;vo.y!=f.y>o.y&&o.x<(f.x-u.x)*(o.y-u.y)/(f.y-u.y)+u.x&&(g=!g)}return g}function _h(l,o){let a=!1;for(let u=0,f=l.length-1;uo.y!=v.y>o.y&&o.x<(v.x-g.x)*(o.y-g.y)/(v.y-g.y)+g.x&&(a=!a)}return a}function eb(l,o,a,u,f){for(const v of l)if(o<=v.x&&a<=v.y&&u>=v.x&&f>=v.y)return!0;const g=[new Ee(o,a),new Ee(o,f),new Ee(u,f),new Ee(u,a)];if(l.length>2)for(const v of g)if(_h(l,v))return!0;for(let v=0;vf.x&&o.x>f.x||l.yf.y&&o.y>f.y)return!1;const g=ua(l,o,a[0]);return g!==ua(l,o,a[1])||g!==ua(l,o,a[2])||g!==ua(l,o,a[3])}function Kc(l,o,a){const u=o.paint.get(l).value;return"constant"===u.kind?u.value:a.programConfigurations.get(o.id).getMaxValue(l)}function oy(l){return Math.sqrt(l[0]*l[0]+l[1]*l[1])}function v1(l,o,a,u,f){if(!o[0]&&!o[1])return l;const g=Ee.convert(o)._mult(f);"viewport"===a&&g._rotate(-u);const v=[];for(let x=0;x0&&(g=1/Math.sqrt(g)),l[0]=o[0]*g,l[1]=o[1]*g,l[2]=o[2]*g,l}function os(l,o){return l[0]*o[0]+l[1]*o[1]+l[2]*o[2]}function Nm(l,o,a){var u=o[0],f=o[1],g=o[2],v=a[0],x=a[1],M=a[2];return l[0]=f*M-g*x,l[1]=g*v-u*M,l[2]=u*x-f*v,l}function xr(l,o,a){var u=o[0],f=o[1],g=o[2],v=a[3]*u+a[7]*f+a[11]*g+a[15];return l[0]=(a[0]*u+a[4]*f+a[8]*g+a[12])/(v=v||1),l[1]=(a[1]*u+a[5]*f+a[9]*g+a[13])/v,l[2]=(a[2]*u+a[6]*f+a[10]*g+a[14])/v,l}function ab(l,o,a){var u=a[0],f=a[1],g=a[2],v=o[0],x=o[1],M=o[2],D=f*M-g*x,A=g*v-u*M,R=u*x-f*v,P=f*R-g*A,B=g*D-u*R,N=u*A-f*D,U=2*a[3];return A*=U,R*=U,B*=2,N*=2,l[0]=v+(D*=U)+(P*=2),l[1]=x+A+B,l[2]=M+R+N,l}var bh,Wa=ay,lb=sb,x1=Bp;function ly(l,o,a){return l[0]=o[0]*a,l[1]=o[1]*a,l[2]=o[2]*a,l[3]=o[3]*a,l}function cb(l,o){var a=o[0],u=o[1],f=o[2],g=o[3],v=a*a+u*u+f*f+g*g;return v>0&&(v=1/Math.sqrt(v)),l[0]=a*v,l[1]=u*v,l[2]=f*v,l[3]=g*v,l}function od(l,o,a){var u=o[0],f=o[1],g=o[2],v=o[3];return l[0]=a[0]*u+a[4]*f+a[8]*g+a[12]*v,l[1]=a[1]*u+a[5]*f+a[9]*g+a[13]*v,l[2]=a[2]*u+a[6]*f+a[10]*g+a[14]*v,l[3]=a[3]*u+a[7]*f+a[11]*g+a[15]*v,l}function zm(){var l=new Qs(4);return Qs!=Float32Array&&(l[0]=0,l[1]=0,l[2]=0),l[3]=1,l}function Vm(l){return l[0]=0,l[1]=0,l[2]=0,l[3]=1,l}function ub(l,o,a){a*=.5;var u=o[0],f=o[1],g=o[2],v=o[3],x=Math.sin(a),M=Math.cos(a);return l[0]=u*M+v*x,l[1]=f*M+g*x,l[2]=g*M-f*x,l[3]=v*M-u*x,l}function xh(l,o,a){a*=.5;var u=o[0],f=o[1],g=o[2],v=o[3],x=Math.sin(a),M=Math.cos(a);return l[0]=u*M-g*x,l[1]=f*M+v*x,l[2]=g*M+u*x,l[3]=v*M-f*x,l}Lp(),bh=new Qs(4),Qs!=Float32Array&&(bh[0]=0,bh[1]=0,bh[2]=0,bh[3]=0);var w1=cb;Lp(),vh(1,0,0),vh(0,1,0),zm(),zm(),b1();class cy{constructor(o,a){this.pos=o,this.dir=a}intersectsPlane(o,a,u){const f=os(a,this.dir);if(Math.abs(f)<1e-6)return!1;const g=((o[0]-this.pos[0])*a[0]+(o[1]-this.pos[1])*a[1]+(o[2]-this.pos[2])*a[2])/f;return u[0]=this.pos[0]+this.dir[0]*g,u[1]=this.pos[1]+this.dir[1]*g,u[2]=this.pos[2]+this.dir[2]*g,!0}closestPointOnSphere(o,a,u){if(U=(B=this.pos)[0],Z=B[1],re=B[2],pe=(N=o)[0],oe=N[1],ue=N[2],Math.abs(U-pe)<=sy*Math.max(1,Math.abs(U),Math.abs(pe))&&Math.abs(Z-oe)<=sy*Math.max(1,Math.abs(Z),Math.abs(oe))&&Math.abs(re-ue)<=sy*Math.max(1,Math.abs(re),Math.abs(ue))||0===a)return u[0]=u[1]=u[2]=0,!1;var B,N,U,Z,re,pe,oe,ue;const[f,g,v]=this.dir,x=this.pos[0]-o[0],M=this.pos[1]-o[1],D=this.pos[2]-o[2],A=f*f+g*g+v*v,R=2*(x*f+M*g+D*v),P=R*R-4*A*(x*x+M*M+D*D-a*a);if(P<0){const B=Math.max(-R/2,0),N=x+f*B,U=M+g*B,Z=D+v*B,re=Math.hypot(N,U,Z);return u[0]=N*a/re,u[1]=U*a/re,u[2]=Z*a/re,!1}{const B=(-R-Math.sqrt(P))/(2*A);if(B<0){const N=Math.hypot(x,M,D);return u[0]=x*a/N,u[1]=M*a/N,u[2]=D*a/N,!1}return u[0]=x+f*B,u[1]=M+g*B,u[2]=D+v*B,!0}}}class Np{constructor(o,a,u,f,g){this.TL=o,this.TR=a,this.BR=u,this.BL=f,this.horizon=g}static fromInvProjectionMatrix(o,a,u){const f=[-1,1,1],g=[1,1,1],v=[1,-1,1],x=[-1,-1,1],M=xr(f,f,o),D=xr(g,g,o),A=xr(v,v,o),R=xr(x,x,o);return new Np(M,D,A,R,a/u)}}class zp{constructor(o,a){this.points=o,this.planes=a}static fromInvProjectionMatrix(o,a,u,f){const g=Math.pow(2,u),v=[[-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(M=>{const D=od([],M,o),A=1/D[3]/a*g;return(R=D)[0]=(P=D)[0]*(B=[A,A,f?1/D[3]:A,A])[0],R[1]=P[1]*B[1],R[2]=P[2]*B[2],R[3]=P[3]*B[3],R;var R,P,B}),x=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]].map(M=>{const D=tr([],Nm([],Wa([],v[M[0]],v[M[1]]),Wa([],v[M[2]],v[M[1]]))),A=-os(D,v[M[1]]);return D.concat(A)});return new zp(v,x)}}class Uo{static fromPoints(o){const a=[1/0,1/0,1/0],u=[-1/0,-1/0,-1/0];for(const f of o)Ao(a,a,f),id(u,u,f);return new Uo(a,u)}static applyTransform(o,a){const u=o.getCorners();for(let f=0;f=0;if(0===v)return 0;v!==a.length&&(u=!1)}if(u)return 2;for(let f=0;f<3;f++){let g=Number.MAX_VALUE,v=-Number.MAX_VALUE;for(let x=0;xthis.max[f]-this.min[f])return 0}return 1}}function sd(l,o,a,u,f,g,v,x,M){if(g&&l.queryGeometry.isAboveHorizon)return!1;g&&(M*=l.pixelToTileUnitsFactor);const D=l.tileID.canonical,A=a.projection.upVectorScale(D,a.center.lat,a.worldSize).metersToTile;for(const R of o)for(const P of R){const B=P.add(x),N=f&&a.elevation?a.elevation.exaggeration()*f.getElevationAt(B.x,B.y,!0):0,U=a.projection.projectTilePoint(B.x,B.y,D);if(N>0){const oe=a.projection.upVector(D,B.x,B.y);U.x+=oe[0]*A*N,U.y+=oe[1]*A*N,U.z+=oe[2]*A*N}const Z=g?B:uy(U.x,U.y,U.z,u),re=g?l.tilespaceRays.map(oe=>hy(oe,N)):l.queryGeometry.screenGeometry,pe=od([],[U.x,U.y,U.z,1],u);if(!v&&g?M*=pe[3]/a.cameraToCenterDistance:v&&!g&&(M*=a.cameraToCenterDistance/pe[3]),g){const oe=$i((P.y/wn+D.y)/(1<l.width||f.height>l.height||a.x>l.width-f.width||a.y>l.height-f.height)throw new RangeError("out of range source coordinates for image copy");if(f.width>o.width||f.height>o.height||u.x>o.width-f.width||u.y>o.height-f.height)throw new RangeError("out of range destination coordinates for image copy");const v=l.data,x=o.data;for(let M=0;M{o[l.evaluationKey]=M;const D=l.expression.evaluate(o);f.data[v+x+0]=Math.floor(255*D.r/D.a),f.data[v+x+1]=Math.floor(255*D.g/D.a),f.data[v+x+2]=Math.floor(255*D.b/D.a),f.data[v+x+3]=Math.floor(255*D.a)};if(l.clips)for(let v=0,x=0;v80*a){u=g=l[0],f=v=l[1];for(var N=a;Ng&&(g=x),M>v&&(v=M);D=0!==(D=Math.max(g-u,v-f))?32767/D:0}return wh(P,B,a,u,f,D,0),B}function my(l,o,a,u,f){var g,v;if(f===vy(l,o,a,u)>0)for(g=o;g=o;g-=u)v=_y(g,l[g],l[g+1],v);return v&&jp(v,v.next)&&(Hp(v),v=v.next),v}function Js(l,o){if(!l)return l;o||(o=l);var a,u=l;do{if(a=!1,u.steiner||!jp(u,u.next)&&0!==br(u.prev,u,u.next))u=u.next;else{if(Hp(u),(u=o=u.prev)===u.next)break;a=!0}}while(a||u!==o);return o}function wh(l,o,a,u,f,g,v){if(l){!v&&g&&function(A,R,P,B){var N=A;do{0===N.z&&(N.z=Um(N.x,N.y,R,P,B)),N.prevZ=N.prev,N.nextZ=N.next,N=N.next}while(N!==A);N.prevZ.nextZ=null,N.prevZ=null,function(U){var Z,re,pe,oe,ue,ye,fe,He,je=1;do{for(re=U,U=null,ue=null,ye=0;re;){for(ye++,pe=re,fe=0,Z=0;Z0||He>0&&pe;)0!==fe&&(0===He||!pe||re.z<=pe.z)?(oe=re,re=re.nextZ,fe--):(oe=pe,pe=pe.nextZ,He--),ue?ue.nextZ=oe:U=oe,oe.prevZ=ue,ue=oe;re=pe}ue.nextZ=null,je*=2}while(ye>1)}(N)}(l,u,f,g);for(var x,M,D=l;l.prev!==l.next;)if(x=l.prev,M=l.next,g?S1(l,u,f,g):gb(l))o.push(x.i/a|0),o.push(l.i/a|0),o.push(M.i/a|0),Hp(l),l=M.next,D=M.next;else if((l=M)===D){v?1===v?wh(l=ET(Js(l),o,a),o,a,u,f,g,2):2===v&&Gm(l,o,a,u,f,g):wh(Js(l),o,a,u,f,g,1);break}}}function gb(l){var o=l.prev,a=l,u=l.next;if(br(o,a,u)>=0)return!1;for(var f=o.x,g=a.x,v=u.x,x=o.y,M=a.y,D=u.y,A=fg?f>v?f:v:g>v?g:v,B=x>M?x>D?x:D:M>D?M:D,N=u.next;N!==o;){if(N.x>=A&&N.x<=P&&N.y>=R&&N.y<=B&&ad(f,x,g,M,v,D,N.x,N.y)&&br(N.prev,N,N.next)>=0)return!1;N=N.next}return!0}function S1(l,o,a,u){var f=l.prev,g=l,v=l.next;if(br(f,g,v)>=0)return!1;for(var x=f.x,M=g.x,D=v.x,A=f.y,R=g.y,P=v.y,B=xM?x>D?x:D:M>D?M:D,Z=A>R?A>P?A:P:R>P?R:P,re=Um(B,N,o,a,u),pe=Um(U,Z,o,a,u),oe=l.prevZ,ue=l.nextZ;oe&&oe.z>=re&&ue&&ue.z<=pe;){if(oe.x>=B&&oe.x<=U&&oe.y>=N&&oe.y<=Z&&oe!==f&&oe!==v&&ad(x,A,M,R,D,P,oe.x,oe.y)&&br(oe.prev,oe,oe.next)>=0||(oe=oe.prevZ,ue.x>=B&&ue.x<=U&&ue.y>=N&&ue.y<=Z&&ue!==f&&ue!==v&&ad(x,A,M,R,D,P,ue.x,ue.y)&&br(ue.prev,ue,ue.next)>=0))return!1;ue=ue.nextZ}for(;oe&&oe.z>=re;){if(oe.x>=B&&oe.x<=U&&oe.y>=N&&oe.y<=Z&&oe!==f&&oe!==v&&ad(x,A,M,R,D,P,oe.x,oe.y)&&br(oe.prev,oe,oe.next)>=0)return!1;oe=oe.prevZ}for(;ue&&ue.z<=pe;){if(ue.x>=B&&ue.x<=U&&ue.y>=N&&ue.y<=Z&&ue!==f&&ue!==v&&ad(x,A,M,R,D,P,ue.x,ue.y)&&br(ue.prev,ue,ue.next)>=0)return!1;ue=ue.nextZ}return!0}function ET(l,o,a){var u=l;do{var f=u.prev,g=u.next.next;!jp(f,g)&&Hm(f,u,u.next,g)&&lc(f,g)&&lc(g,f)&&(o.push(f.i/a|0),o.push(u.i/a|0),o.push(g.i/a|0),Hp(u),Hp(u.next),u=l=g),u=u.next}while(u!==l);return Js(u)}function Gm(l,o,a,u,f,g){var v=l;do{for(var x=v.next.next;x!==v.prev;){if(v.i!==x.i&&jm(v,x)){var M=vb(v,x);return v=Js(v,v.next),M=Js(M,M.next),wh(v,o,a,u,f,g,0),void wh(M,o,a,u,f,g,0)}x=x.next}v=v.next}while(v!==l)}function D1(l,o){return l.x-o.x}function _b(l,o){var a=function(f,g){var v,x=g,M=f.x,D=f.y,A=-1/0;do{if(D<=x.y&&D>=x.next.y&&x.next.y!==x.y){var R=x.x+(D-x.y)*(x.next.x-x.x)/(x.next.y-x.y);if(R<=M&&R>A&&(A=R,v=x.x=x.x&&x.x>=N&&M!==x.x&&ad(Dv.x||x.x===v.x&&yb(v,x)))&&(v=x,Z=P)),x=x.next}while(x!==B);return v}(l,o);if(!a)return o;var u=vb(a,l);return Js(u,u.next),Js(a,a.next)}function yb(l,o){return br(l.prev,l,o.prev)<0&&br(o.next,l,l.next)<0}function Um(l,o,a,u,f){return(l=1431655765&((l=858993459&((l=252645135&((l=16711935&((l=(l-a)*f|0)|l<<8))|l<<4))|l<<2))|l<<1))|(o=1431655765&((o=858993459&((o=252645135&((o=16711935&((o=(o-u)*f|0)|o<<8))|o<<4))|o<<2))|o<<1))<<1}function gy(l){var o=l,a=l;do{(o.x=(l-v)*(g-x)&&(l-v)*(u-x)>=(a-v)*(o-x)&&(a-v)*(g-x)>=(f-v)*(u-x)}function jm(l,o){return l.next.i!==o.i&&l.prev.i!==o.i&&!function(a,u){var f=a;do{if(f.i!==a.i&&f.next.i!==a.i&&f.i!==u.i&&f.next.i!==u.i&&Hm(f,f.next,a,u))return!0;f=f.next}while(f!==a);return!1}(l,o)&&(lc(l,o)&&lc(o,l)&&function(a,u){var f=a,g=!1,v=(a.x+u.x)/2,x=(a.y+u.y)/2;do{f.y>x!=f.next.y>x&&f.next.y!==f.y&&v<(f.next.x-f.x)*(x-f.y)/(f.next.y-f.y)+f.x&&(g=!g),f=f.next}while(f!==a);return g}(l,o)&&(br(l.prev,l,o.prev)||br(l,o.prev,o))||jp(l,o)&&br(l.prev,l,l.next)>0&&br(o.prev,o,o.next)>0)}function br(l,o,a){return(o.y-l.y)*(a.x-o.x)-(o.x-l.x)*(a.y-o.y)}function jp(l,o){return l.x===o.x&&l.y===o.y}function Hm(l,o,a,u){var f=Mh(br(l,o,a)),g=Mh(br(l,o,u)),v=Mh(br(a,u,l)),x=Mh(br(a,u,o));return f!==g&&v!==x||!(0!==f||!Ch(l,a,o))||!(0!==g||!Ch(l,u,o))||!(0!==v||!Ch(a,l,u))||!(0!==x||!Ch(a,o,u))}function Ch(l,o,a){return o.x<=Math.max(l.x,a.x)&&o.x>=Math.min(l.x,a.x)&&o.y<=Math.max(l.y,a.y)&&o.y>=Math.min(l.y,a.y)}function Mh(l){return l>0?1:l<0?-1:0}function lc(l,o){return br(l.prev,l,l.next)<0?br(l,o,l.next)>=0&&br(l,l.prev,o)>=0:br(l,o,l.prev)<0||br(l,l.next,o)<0}function vb(l,o){var a=new yy(l.i,l.x,l.y),u=new yy(o.i,o.x,o.y),f=l.next,g=o.prev;return l.next=o,o.prev=l,a.next=f,f.prev=a,u.next=a,a.prev=u,g.next=u,u.prev=g,u}function _y(l,o,a,u){var f=new yy(l,o,a);return u?(f.next=u.next,f.prev=u,u.next.prev=f,u.next=f):(f.prev=f,f.next=f),f}function Hp(l){l.next.prev=l.prev,l.prev.next=l.next,l.prevZ&&(l.prevZ.nextZ=l.nextZ),l.nextZ&&(l.nextZ.prevZ=l.prevZ)}function yy(l,o,a){this.i=l,this.x=o,this.y=a,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}function vy(l,o,a,u){for(var f=0,g=o,v=a-u;ga;){if(u-a>600){var g=u-a+1,v=o-a+1,x=Math.log(g),M=.5*Math.exp(2*x/3),D=.5*Math.sqrt(x*M*(g-M)/g)*(v-g/2<0?-1:1);by(l,o,Math.max(a,Math.floor(o-v*M/g+D)),Math.min(u,Math.floor(o+(g-v)*M/g+D)),f)}var A=l[o],R=a,P=u;for(eu(l,a,o),f(l[u],A)>0&&eu(l,a,u);R0;)P--}0===f(l[a],A)?eu(l,a,P):eu(l,++P,u),P<=o&&(a=P+1),o<=P&&(u=P-1)}}function eu(l,o,a){var u=l[o];l[o]=l[a],l[a]=u}function xy(l,o){return lo?1:0}function cc(l,o){const a=l.length;if(a<=1)return[l];const u=[];let f,g;for(let v=0;v1)for(let v=0;v0&&a.holes.push(u+=l[f-1].length)}return a};class $m{constructor(o){this.zoom=o.zoom,this.overscaling=o.overscaling,this.layers=o.layers,this.layerIds=this.layers.map(a=>a.id),this.index=o.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new _i,this.indexArray=new to,this.indexArray2=new Ys,this.programConfigurations=new Xc(o.layers,o.zoom),this.segments=new jr,this.segments2=new jr,this.stateDependentLayerIds=this.layers.filter(a=>a.isStateDependent()).map(a=>a.id),this.projection=o.projection}populate(o,a,u,f){this.hasPattern=wy("fill",this.layers,a);const g=this.layers[0].layout.get("fill-sort-key"),v=[];for(const{feature:x,id:M,index:D,sourceLayerIndex:A}of o){const R=this.layers[0]._featureFilter.needGeometry,P=gh(x,R);if(!this.layers[0]._featureFilter.filter(new Te(this.zoom),P,u))continue;const B=g?g.evaluate(P,{},u,a.availableImages):void 0,N={id:M,properties:x.properties,type:x.type,sourceLayerIndex:A,index:D,geometry:R?P.geometry:sc(x,u,f),patterns:{},sortKey:B};v.push(N)}g&&v.sort((x,M)=>x.sortKey-M.sortKey);for(const x of v){const{geometry:M,index:D,sourceLayerIndex:A}=x;if(this.hasPattern){const R=xb("fill",this.layers,x,this.zoom,a);this.patternFeatures.push(R)}else this.addFeature(x,M,D,u,{},a.availableImages);a.featureIndex.insert(o[D].feature,M,D,A,this.index)}}update(o,a,u,f){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(o,a,this.stateDependentLayers,u,f)}addFeatures(o,a,u,f,g){for(const v of this.patternFeatures)this.addFeature(v,v.geometry,v.index,a,u,f)}isEmpty(){return 0===this.layoutVertexArray.length}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(o){this.uploaded||(this.layoutVertexBuffer=o.createVertexBuffer(this.layoutVertexArray,M1),this.indexBuffer=o.createIndexBuffer(this.indexArray),this.indexBuffer2=o.createIndexBuffer(this.indexArray2)),this.programConfigurations.upload(o),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(o,a,u,f,g,v=[]){for(const x of cc(a,500)){let M=0;for(const N of x)M+=N.length;const D=this.segments.prepareSegment(M,this.layoutVertexArray,this.indexArray),A=D.vertexLength,R=[],P=[];for(const N of x){if(0===N.length)continue;N!==x[0]&&P.push(R.length/2);const U=this.segments2.prepareSegment(N.length,this.layoutVertexArray,this.indexArray2),Z=U.vertexLength;this.layoutVertexArray.emplaceBack(N[0].x,N[0].y),this.indexArray2.emplaceBack(Z+N.length-1,Z),R.push(N[0].x),R.push(N[0].y);for(let re=1;re>3}if(f--,1===u||2===u)g+=l.readSVarint(),v+=l.readSVarint(),1===u&&(o&&x.push(o),o=[]),o.push(new Mb(g,v));else{if(7!==u)throw new Error("unknown command "+u);o&&o.push(o[0].clone())}}return o&&x.push(o),x},Sh.prototype.bbox=function(){var l=this._pbf;l.pos=this._geometry;for(var o=l.readVarint()+l.pos,a=1,u=0,f=0,g=0,v=1/0,x=-1/0,M=1/0,D=-1/0;l.pos>3}if(u--,1===a||2===a)(f+=l.readSVarint())x&&(x=f),(g+=l.readSVarint())D&&(D=g);else if(7!==a)throw new Error("unknown command "+a)}return[v,M,x,D]},Sh.prototype.toGeoJSON=function(l,o,a){var u,f,g=this.extent*Math.pow(2,a),v=this.extent*l,x=this.extent*o,M=this.loadGeometry(),D=Sh.types[this.type];function A(B){for(var N=0;N>3;f=1===v?u.readString():2===v?u.readFloat():3===v?u.readDouble():4===v?u.readVarint64():5===v?u.readVarint():6===v?u.readSVarint():7===v?u.readBoolean():null}return f}(a))}Ls.prototype.feature=function(l){if(l<0||l>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[l];var o=this._pbf.readVarint()+this._pbf.pos;return new k1(this._pbf,o,this.extent,this._keys,this._values)};var R1=Sb;function P1(l,o,a){if(3===l){var u=new R1(a,a.readVarint()+a.pos);u.length&&(o[u.name]=u)}}var Sy=$p.VectorTile=function(l,o){this.layers=l.readFields(P1,{},o)},qm=$p.VectorTileFeature=tu;function Zm(l,o,a,u){const f=[],g=0===u?(v,x,M,D,A,R)=>{v.push(new Ee(R,M+(R-x)/(D-x)*(A-M)))}:(v,x,M,D,A,R)=>{v.push(new Ee(x+(R-M)/(A-M)*(D-x),R))};for(const v of l){const x=[];for(const M of v){if(M.length<=2)continue;const D=[];for(let P=0;Po&&g(D,B,N,U,Z,o):re>a?pe=o&&g(D,B,N,U,Z,o),pe>a&&re<=a&&g(D,B,N,U,Z,a)}let A=M[M.length-1];const R=0===u?A.x:A.y;R>=o&&R<=a&&D.push(A),D.length&&(A=D[D.length-1],D[0].x===A.x&&D[0].y===A.y||D.push(D[0]),x.push(D))}x.length&&f.push(x)}return f}$p.VectorTileLayer=Sb;const O1=qm.types,Db=Math.pow(2,13);function Wp(l,o,a,u,f,g,v,x){l.emplaceBack((o<<1)+v,(a<<1)+g,(Math.floor(u*Db)<<1)+f,Math.round(x))}function qp(l,o,a){l.emplaceBack(o.x,o.y,o.z,16384*a[0],16384*a[1],16384*a[2])}class Eb{constructor(){this.acc=new Ee(0,0),this.polyCount=[]}startRing(o){this.currentPolyCount={edges:0,top:0},this.polyCount.push(this.currentPolyCount),this.min||(this.min=new Ee(o.x,o.y),this.max=new Ee(o.x,o.y))}append(o,a){this.currentPolyCount.edges++,this.acc._add(o);const u=this.min,f=this.max;o.xf.x&&(f.x=o.x),o.yf.y&&(f.y=o.y),((0===o.x||o.x===wn)&&o.x===a.x)!=((0===o.y||o.y===wn)&&o.y===a.y)&&this.processBorderOverlap(o,a),a.x<0!=o.x<0&&this.addBorderIntersection(0,ci(a.y,o.y,(0-a.x)/(o.x-a.x))),a.x>wn!=o.x>wn&&this.addBorderIntersection(1,ci(a.y,o.y,(wn-a.x)/(o.x-a.x))),a.y<0!=o.y<0&&this.addBorderIntersection(2,ci(a.x,o.x,(0-a.y)/(o.y-a.y))),a.y>wn!=o.y>wn&&this.addBorderIntersection(3,ci(a.x,o.x,(wn-a.y)/(o.y-a.y)))}addBorderIntersection(o,a){this.borders||(this.borders=[[Number.MAX_VALUE,-Number.MAX_VALUE],[Number.MAX_VALUE,-Number.MAX_VALUE],[Number.MAX_VALUE,-Number.MAX_VALUE],[Number.MAX_VALUE,-Number.MAX_VALUE]]);const u=this.borders[o];au[1]&&(u[1]=a)}processBorderOverlap(o,a){if(o.x===a.x){if(o.y===a.y)return;const u=0===o.x?0:1;this.addBorderIntersection(u,a.y),this.addBorderIntersection(u,o.y)}else{const u=0===o.y?2:3;this.addBorderIntersection(u,a.x),this.addBorderIntersection(u,o.x)}}centroid(){const o=this.polyCount.reduce((a,u)=>a+u.edges,0);return 0!==o?this.acc.div(o)._round():new Ee(0,0)}span(){return new Ee(this.max.x-this.min.x,this.max.y-this.min.y)}intersectsCount(){return this.borders.reduce((o,a)=>o+ +(a[0]!==Number.MAX_VALUE),0)}}class Zp{constructor(o){this.zoom=o.zoom,this.canonical=o.canonical,this.overscaling=o.overscaling,this.layers=o.layers,this.layerIds=this.layers.map(a=>a.id),this.index=o.index,this.hasPattern=!1,this.edgeRadius=0,this.projection=o.projection,this.layoutVertexArray=new xi,this.centroidVertexArray=new wa,this.indexArray=new to,this.programConfigurations=new Xc(o.layers,o.zoom),this.segments=new jr,this.stateDependentLayerIds=this.layers.filter(a=>a.isStateDependent()).map(a=>a.id),this.enableTerrain=o.enableTerrain}populate(o,a,u,f){this.features=[],this.hasPattern=wy("fill-extrusion",this.layers,a),this.featuresOnBorder=[],this.borders=[[],[],[],[]],this.borderDoneWithNeighborZ=[-1,-1,-1,-1],this.tileToMeter=function(g){const v=Math.exp(Math.PI*(1-g.y/(1<=0;re--){const pe=B[re];(0===pe.length||(N=pe[0]).every(oe=>oe.x<=0)||N.every(oe=>oe.x>=wn)||N.every(oe=>oe.y<=0)||N.every(oe=>oe.y>=wn))&&B.splice(re,1)}var N;let U;if(A)U=L1(B,M,f);else{U=[];for(const re of B)U.push({polygon:re,bounds:M})}const Z=P?this.edgeRadius:0;for(const{polygon:re,bounds:pe}of U){let oe=0,ue=0;for(const fe of re)P&&!fe[0].equals(fe[fe.length-1])&&fe.push(fe[0]),ue+=P?fe.length-1:fe.length;const ye=this.segments.prepareSegment((P?5:4)*ue,this.layoutVertexArray,this.indexArray);if(P){const fe=[],He=[];oe=ye.vertexLength;for(const nt of re){let xt,Ue;nt.length&&nt!==re[0]&&He.push(fe.length/2),xt=nt[1].sub(nt[0])._perp()._unit();for(let lt=1;lt4&&Ey(fe[fe.length-2],fe[0],fe[1]),Ue=Z?uc(fe[fe.length-2],fe[0],fe[1],Z):0;je=fe[1].sub(fe[0])._perp()._unit();let lt=!0;for(let dt=1,pt=0;dt0?1:0,Rt=et.dist(qe);if(pt+Rt>32768&&(pt=0),Z){nt=kt.sub(qe)._perp()._unit();let Xn=Dh(et,qe,kt,Xp(je,nt),Z);isNaN(Xn)&&(Xn=0);const bn=qe.sub(et)._unit();et=et.add(bn.mult(Ue))._round(),qe=qe.add(bn.mult(-Xn))._round(),Ue=Xn,je=nt}const pn=ye.vertexLength,Hn=fe.length>4&&Ey(et,qe,kt);let jn=Ty(pt,xt,lt);if(Wp(this.layoutVertexArray,et.x,et.y,Ft,Xt,0,0,jn),Wp(this.layoutVertexArray,et.x,et.y,Ft,Xt,0,1,jn),pt+=Rt,jn=Ty(pt,Hn,!lt),xt=Hn,Wp(this.layoutVertexArray,qe.x,qe.y,Ft,Xt,0,0,jn),Wp(this.layoutVertexArray,qe.x,qe.y,Ft,Xt,0,1,jn),ye.vertexLength+=4,this.indexArray.emplaceBack(pn+0,pn+1,pn+2),this.indexArray.emplaceBack(pn+1,pn+3,pn+2),ye.primitiveLength+=2,Z){const Xn=oe+(1===dt?fe.length-2:dt-2),bn=1===dt?oe:Xn+1;if(this.indexArray.emplaceBack(pn+1,Xn,pn+3),this.indexArray.emplaceBack(Xn,bn,pn+3),ye.primitiveLength+=2,void 0===He&&(He=pn),!Dy(kt,fe[dt],pe)){const Ti=dt===fe.length-1?He:ye.vertexLength;this.indexArray.emplaceBack(pn+2,pn+3,Ti),this.indexArray.emplaceBack(pn+3,Ti+1,Ti),this.indexArray.emplaceBack(pn+3,bn,Ti+1),ye.primitiveLength+=3}lt=!lt}if(A){const Xn=this.layoutVertexExtArray,bn=D.projectTilePoint(et.x,et.y,f),Ti=D.projectTilePoint(qe.x,qe.y,f),An=D.upVector(f,et.x,et.y),Jn=D.upVector(f,qe.x,qe.y);qp(Xn,bn,An),qp(Xn,bn,An),qp(Xn,Ti,Jn),qp(Xn,Ti,Jn)}}P&&(oe+=fe.length-1)}}if(R&&R.polyCount.length>0){if(R.borders){R.vertexArrayOffset=this.centroidVertexArray.length;const re=R.borders,pe=this.featuresOnBorder.push(R)-1;for(let oe=0;oe<4;oe++)re[oe][0]!==Number.MAX_VALUE&&this.borders[oe].push(pe)}this.encodeCentroid(R.borders?void 0:R.centroid(),R)}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,o,u,g,v,f)}sortBorders(){for(let o=0;o<4;o++)this.borders[o].sort((a,u)=>this.featuresOnBorder[a].borders[o][0]-this.featuresOnBorder[u].borders[o][0])}encodeCentroid(o,a,u=!0){let f,g;if(o)if(0!==o.y){const x=a.span()._mult(this.tileToMeter);f=(Math.max(o.x,1)<<3)+Math.min(7,Math.round(x.x/10)),g=(Math.max(o.y,1)<<3)+Math.min(7,Math.round(x.y/10))}else f=Math.ceil(7*(o.x+450)),g=0;else f=0,g=+u;let v=u?this.centroidVertexArray.length:a.vertexArrayOffset;for(const x of a.polyCount){u&&this.centroidVertexArray.resize(this.centroidVertexArray.length+4*x.edges+x.top);for(let M=0;Ma[1].x&&o.x>a[1].x||l.ya[1].y&&o.y>a[1].y}function Ey(l,o,a){if(l.x<0||l.x>=wn||o.x<0||o.x>=wn||a.x<0||a.x>=wn)return!1;const u=a.sub(o),f=u.perp(),g=l.sub(o);return(u.x*g.x+u.y*g.y)/Math.sqrt((u.x*u.x+u.y*u.y)*(g.x*g.x+g.y*g.y))>-.866&&f.x*g.x+f.y*g.y<0}function Ty(l,o,a){const u=o?2|l:-3&l;return a?1|u:-2&u}function F1(){const l=Math.PI/32,o=Math.tan(l),a=Im;return a*Math.sqrt(1+2*o*o)-a}function L1(l,o,a){const u=1<{for(const je of fe)N.push({polygon:je,bounds:He})},Z=Math.ceil(Math.log2(A)),re=Math.ceil(Math.log2(R)),pe=Z-re,oe=[];for(let fe=0;fe0?0:1);for(let fe=0;feHe+1?ye.push({polygons:pt,bounds:qe,depth:He+1}):U(pt,qe)}if(et.length){const qe=[new Ee(0===je?dt:nt.x,1===je?dt:nt.y),xt];oe.length>He+1?ye.push({polygons:et,bounds:qe,depth:He+1}):U(et,qe)}}return N}(l,o,Math.ceil((g-f)/11.25),Math.ceil((v-x)/11.25),1,(M,D,A)=>{if(0===M)return.5*(D+A);{const R=$i((a.y+D/wn)/u);return(Ca(.5*($i((a.y+A/wn)/u)+R))*u-a.y)*wn}})}Wt(Zp,"FillExtrusionBucket",{omit:["layers","features"]}),Wt(Eb,"PartMetadata");const TT=new hn({"fill-extrusion-edge-radius":new ke(at["layout_fill-extrusion"]["fill-extrusion-edge-radius"])});var Ay={paint:new hn({"fill-extrusion-opacity":new ke(at["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new Qe(at["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new ke(at["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new ke(at["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new Qe(at["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new Qe(at["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new Qe(at["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new ke(at["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"]),"fill-extrusion-ambient-occlusion-intensity":new ke(at["paint_fill-extrusion"]["fill-extrusion-ambient-occlusion-intensity"]),"fill-extrusion-ambient-occlusion-radius":new ke(at["paint_fill-extrusion"]["fill-extrusion-ambient-occlusion-radius"])}),layout:TT};function Xm(l,o,a){var u=2*Math.PI*6378137/256/Math.pow(2,a);return[l*u-2*Math.PI*6378137/2,o*u-2*Math.PI*6378137/2]}class Iy{constructor(o,a,u){this.z=o,this.x=a,this.y=u,this.key=Yp(0,o,o,a,u)}equals(o){return this.z===o.z&&this.x===o.x&&this.y===o.y}url(o,a){const u=(v=this.y,x=this.z,M=Xm(256*(g=this.x),256*(v=Math.pow(2,x)-v-1),x),D=Xm(256*(g+1),256*(v+1),x),M[0]+","+M[1]+","+D[0]+","+D[1]),f=function(g,v,x){let M,D="";for(let A=g;A>0;A--)M=1<this.canonical.z?new jo(o,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new jo(o,this.wrap,o,this.canonical.x>>a,this.canonical.y>>a)}calculateScaledKey(o,a=!0){if(this.overscaledZ===o&&a)return this.key;if(o>this.canonical.z)return Yp(this.wrap*+a,o,this.canonical.z,this.canonical.x,this.canonical.y);{const u=this.canonical.z-o;return Yp(this.wrap*+a,o,o,this.canonical.x>>u,this.canonical.y>>u)}}isChildOf(o){if(o.wrap!==this.wrap)return!1;const a=this.canonical.z-o.canonical.z;return 0===o.overscaledZ||o.overscaledZ>a&&o.canonical.y===this.canonical.y>>a}children(o){if(this.overscaledZ>=o)return[new jo(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];const a=this.canonical.z+1,u=2*this.canonical.x,f=2*this.canonical.y;return[new jo(a,this.wrap,a,u,f),new jo(a,this.wrap,a,u+1,f),new jo(a,this.wrap,a,u,f+1),new jo(a,this.wrap,a,u+1,f+1)]}isLessThan(o){return this.wrapo.wrap)&&(this.overscaledZo.overscaledZ)&&(this.canonical.xo.canonical.x)&&this.canonical.ya.id),this.index=o.index,this.projection=o.projection,this.hasPattern=!1,this.patternFeatures=[],this.lineClipsArray=[],this.gradients={},this.layers.forEach(a=>{this.gradients[a.id]={}}),this.layoutVertexArray=new ns,this.layoutVertexArray2=new Eo,this.indexArray=new to,this.programConfigurations=new Xc(o.layers,o.zoom),this.segments=new jr,this.maxLineLength=0,this.stateDependentLayerIds=this.layers.filter(a=>a.isStateDependent()).map(a=>a.id)}populate(o,a,u,f){this.hasPattern=wy("line",this.layers,a);const g=this.layers[0].layout.get("line-sort-key"),v=[];for(const{feature:A,id:R,index:P,sourceLayerIndex:B}of o){const N=this.layers[0]._featureFilter.needGeometry,U=gh(A,N);if(!this.layers[0]._featureFilter.filter(new Te(this.zoom),U,u))continue;const Z=g?g.evaluate(U,{},u):void 0,re={id:R,properties:A.properties,type:A.type,sourceLayerIndex:B,index:P,geometry:N?U.geometry:sc(A,u,f),patterns:{},sortKey:Z};v.push(re)}g&&v.sort((A,R)=>A.sortKey-R.sortKey);const{lineAtlas:x,featureIndex:M}=a,D=this.addConstantDashes(x);for(const A of v){const{geometry:R,index:P,sourceLayerIndex:B}=A;if(D&&this.addFeatureDashes(A,x),this.hasPattern){const N=xb("line",this.layers,A,this.zoom,a);this.patternFeatures.push(N)}else this.addFeature(A,R,P,u,x.positions,a.availableImages);M.insert(o[P].feature,R,P,B,this.index)}}addConstantDashes(o){let a=!1;for(const u of this.layers){const f=u.paint.get("line-dasharray").value,g=u.layout.get("line-cap").value;if("constant"!==f.kind||"constant"!==g.kind)a=!0;else{const v=g.value,x=f.value;if(!x)continue;o.addDash(x,v)}}return a}addFeatureDashes(o,a){const u=this.zoom;for(const f of this.layers){const g=f.paint.get("line-dasharray").value,v=f.layout.get("line-cap").value;if("constant"===g.kind&&"constant"===v.kind)continue;let x,M;if("constant"===g.kind){if(x=g.value,!x)continue}else x=g.evaluate({zoom:u},o);M="constant"===v.kind?v.value:v.evaluate({zoom:u},o),a.addDash(x,M),o.patterns[f.id]=a.getKey(x,M)}}update(o,a,u,f){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(o,a,this.stateDependentLayers,u,f)}addFeatures(o,a,u,f,g){for(const v of this.patternFeatures)this.addFeature(v,v.geometry,v.index,a,u,f)}isEmpty(){return 0===this.layoutVertexArray.length}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(o){this.uploaded||(0!==this.layoutVertexArray2.length&&(this.layoutVertexBuffer2=o.createVertexBuffer(this.layoutVertexArray2,N1)),this.layoutVertexBuffer=o.createVertexBuffer(this.layoutVertexArray,Ab),this.indexBuffer=o.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(o),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}lineFeatureClips(o){if(o.properties&&o.properties.hasOwnProperty("mapbox_clip_start")&&o.properties.hasOwnProperty("mapbox_clip_end"))return{start:+o.properties.mapbox_clip_start,end:+o.properties.mapbox_clip_end}}addFeature(o,a,u,f,g,v){const x=this.layers[0].layout,M=x.get("line-join").evaluate(o,{}),D=x.get("line-cap").evaluate(o,{}),A=x.get("line-miter-limit"),R=x.get("line-round-limit");this.lineClips=this.lineFeatureClips(o);for(const P of a)this.addLine(P,o,M,D,A,R);this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,o,u,g,v,f)}addLine(o,a,u,f,g,v){if(this.distance=0,this.scaledDistance=0,this.totalDistance=0,this.lineSoFar=0,this.lineClips){this.lineClipsArray.push(this.lineClips);for(let re=0;re=2&&o[M-1].equals(o[M-2]);)M--;let D=0;for(;D0;if(He&&re>D){const Ue=P.dist(B);if(Ue>2*A){const lt=P.sub(P.sub(B)._mult(A/Ue)._round());this.updateDistance(B,lt),this.addCurrentVertex(lt,U,0,0,R),B=lt}}const nt=B&&N;let xt=nt?u:x?"butt":f;if(nt&&"round"===xt&&(yeg&&(xt="bevel"),"bevel"===xt&&(ye>2&&(xt="flipbevel"),ye100)pe=Z.mult(-1);else{const Ue=ye*U.add(Z).mag()/U.sub(Z).mag();pe._perp()._mult(Ue*(je?-1:1))}this.addCurrentVertex(P,pe,0,0,R),this.addCurrentVertex(P,pe.mult(-1),0,0,R)}else if("bevel"===xt||"fakeround"===xt){const Ue=-Math.sqrt(ye*ye-1),lt=je?Ue:0,dt=je?0:Ue;if(B&&this.addCurrentVertex(P,U,lt,dt,R),"fakeround"===xt){const pt=Math.round(180*fe/Math.PI/20);for(let et=1;et2*A){const lt=P.add(N.sub(P)._mult(A/Ue)._round());this.updateDistance(P,lt),this.addCurrentVertex(lt,Z,0,0,R),P=lt}}}}addCurrentVertex(o,a,u,f,g,v=!1){const x=a.y*f-a.x,M=-a.y-a.x*f;this.addHalfVertex(o,a.x+a.y*u,a.y-a.x*u,v,!1,u,g),this.addHalfVertex(o,x,M,v,!0,-f,g)}addHalfVertex({x:o,y:a},u,f,g,v,x,M){this.layoutVertexArray.emplaceBack((o<<1)+(g?1:0),(a<<1)+(v?1:0),Math.round(63*u)+128,Math.round(63*f)+128,1+(0===x?0:x<0?-1:1),0,this.lineSoFar),this.lineClips&&this.layoutVertexArray2.emplaceBack(this.scaledDistance,this.lineClipsArray.length,this.lineClips.start,this.lineClips.end);const D=M.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,D),M.primitiveLength++),v?this.e2=D:this.e1=D}updateScaledDistance(){if(this.lineClips){const o=this.totalDistance/(this.lineClips.end-this.lineClips.start);this.scaledDistance=this.distance/this.totalDistance,this.lineSoFar=o*this.lineClips.start+this.distance}else this.lineSoFar=this.distance}updateDistance(o,a){this.distance+=o.dist(a),this.updateScaledDistance()}}Wt(Km,"LineBucket",{omit:["layers","patternFeatures"]});const Th=new hn({"line-cap":new Qe(at.layout_line["line-cap"]),"line-join":new Qe(at.layout_line["line-join"]),"line-miter-limit":new ke(at.layout_line["line-miter-limit"]),"line-round-limit":new ke(at.layout_line["line-round-limit"]),"line-sort-key":new Qe(at.layout_line["line-sort-key"])});var Py={paint:new hn({"line-opacity":new Qe(at.paint_line["line-opacity"]),"line-color":new Qe(at.paint_line["line-color"]),"line-translate":new ke(at.paint_line["line-translate"]),"line-translate-anchor":new ke(at.paint_line["line-translate-anchor"]),"line-width":new Qe(at.paint_line["line-width"]),"line-gap-width":new Qe(at.paint_line["line-gap-width"]),"line-offset":new Qe(at.paint_line["line-offset"]),"line-blur":new Qe(at.paint_line["line-blur"]),"line-dasharray":new Qe(at.paint_line["line-dasharray"]),"line-pattern":new Qe(at.paint_line["line-pattern"]),"line-gradient":new Qt(at.paint_line["line-gradient"]),"line-trim-offset":new ke(at.paint_line["line-trim-offset"])}),layout:Th};const Ib=new class extends Qe{possiblyEvaluate(l,o){return o=new Te(Math.floor(o.zoom),{now:o.now,fadeDuration:o.fadeDuration,transition:o.transition}),super.possiblyEvaluate(l,o)}evaluate(l,o,a,u){return o=xn({},o,{zoom:Math.floor(o.zoom)}),super.evaluate(l,o,a,u)}}(Py.paint.properties["line-width"].specification);function kb(l,o){return o>0?o+2*l:l}Ib.useIntegerZoom=!0;const z1=Ht([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_tex_size",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),V1=Ht([{name:"a_globe_anchor",components:3,type:"Int16"},{name:"a_globe_normal",components:3,type:"Float32"}],4),Rb=Ht([{name:"a_projected_pos",components:4,type:"Float32"}],4);Ht([{name:"a_fade_opacity",components:1,type:"Uint32"}],4);const AT=Ht([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"}]),IT=Ht([{name:"a_size_scale",components:1,type:"Float32"},{name:"a_padding",components:2,type:"Float32"}]);Ht([{type:"Int16",name:"projectedAnchorX"},{type:"Int16",name:"projectedAnchorY"},{type:"Int16",name:"projectedAnchorZ"},{type:"Int16",name:"tileAnchorX"},{type:"Int16",name:"tileAnchorY"},{type:"Float32",name:"x1"},{type:"Float32",name:"y1"},{type:"Float32",name:"x2"},{type:"Float32",name:"y2"},{type:"Int16",name:"padding"},{type:"Uint32",name:"featureIndex"},{type:"Uint16",name:"sourceLayerIndex"},{type:"Uint16",name:"bucketIndex"}]);const Ah=Ht([{name:"a_pos",components:3,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4),Qm=Ht([{name:"a_pos_2f",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4);Ht([{name:"triangle",components:3,type:"Uint16"}]),Ht([{type:"Int16",name:"projectedAnchorX"},{type:"Int16",name:"projectedAnchorY"},{type:"Int16",name:"projectedAnchorZ"},{type:"Float32",name:"tileAnchorX"},{type:"Float32",name:"tileAnchorY"},{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"},{type:"Uint8",name:"flipState"}]),Ht([{type:"Int16",name:"projectedAnchorX"},{type:"Int16",name:"projectedAnchorY"},{type:"Int16",name:"projectedAnchorZ"},{type:"Float32",name:"tileAnchorX"},{type:"Float32",name:"tileAnchorY"},{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",components:2,name:"textOffset"},{type:"Float32",name:"collisionCircleDiameter"}]),Ht([{type:"Float32",name:"offsetX"}]),Ht([{type:"Int16",name:"x"},{type:"Int16",name:"y"}]);const qa=128;function Jm(l,o){const{expression:a}=o;if("constant"===a.kind)return{kind:"constant",layoutSize:a.evaluate(new Te(l+1))};if("source"===a.kind)return{kind:"source"};{const{zoomStops:u,interpolationType:f}=a;let g=0;for(;g{u.text=function(f,g,v){const x=g.layout.get("text-transform").evaluate(v,{});return"uppercase"===x?f=f.toLocaleUpperCase():"lowercase"===x&&(f=f.toLocaleLowerCase()),ze.applyArabicShaping&&(f=ze.applyArabicShaping(f)),f}(u.text,o,a)}),l}const ld={"!":"\ufe15","#":"\uff03",$:"\uff04","%":"\uff05","&":"\uff06","(":"\ufe35",")":"\ufe36","*":"\uff0a","+":"\uff0b",",":"\ufe10","-":"\ufe32",".":"\u30fb","/":"\uff0f",":":"\ufe13",";":"\ufe14","<":"\ufe3f","=":"\uff1d",">":"\ufe40","?":"\ufe16","@":"\uff20","[":"\ufe47","\\":"\uff3c","]":"\ufe48","^":"\uff3e",_:"\ufe33","`":"\uff40","{":"\ufe37","|":"\u2015","}":"\ufe38","~":"\uff5e","\xa2":"\uffe0","\xa3":"\uffe1","\xa5":"\uffe5","\xa6":"\uffe4","\xac":"\uffe2","\xaf":"\uffe3","\u2013":"\ufe32","\u2014":"\ufe31","\u2018":"\ufe43","\u2019":"\ufe44","\u201c":"\ufe41","\u201d":"\ufe42","\u2026":"\ufe19","\u2027":"\u30fb","\u20a9":"\uffe6","\u3001":"\ufe11","\u3002":"\ufe12","\u3008":"\ufe3f","\u3009":"\ufe40","\u300a":"\ufe3d","\u300b":"\ufe3e","\u300c":"\ufe41","\u300d":"\ufe42","\u300e":"\ufe43","\u300f":"\ufe44","\u3010":"\ufe3b","\u3011":"\ufe3c","\u3014":"\ufe39","\u3015":"\ufe3a","\u3016":"\ufe17","\u3017":"\ufe18","\uff01":"\ufe15","\uff08":"\ufe35","\uff09":"\ufe36","\uff0c":"\ufe10","\uff0d":"\ufe32","\uff0e":"\u30fb","\uff1a":"\ufe13","\uff1b":"\ufe14","\uff1c":"\ufe3f","\uff1e":"\ufe40","\uff1f":"\ufe16","\uff3b":"\ufe47","\uff3d":"\ufe48","\uff3f":"\ufe33","\uff5b":"\ufe37","\uff5c":"\u2015","\uff5d":"\ufe38","\uff5f":"\ufe35","\uff60":"\ufe36","\uff61":"\ufe12","\uff62":"\ufe41","\uff63":"\ufe42"};function kT(l){return"\ufe36"===l||"\ufe48"===l||"\ufe38"===l||"\ufe44"===l||"\ufe42"===l||"\ufe3e"===l||"\ufe3c"===l||"\ufe3a"===l||"\ufe18"===l||"\ufe40"===l||"\ufe10"===l||"\ufe13"===l||"\ufe14"===l||"\uff40"===l||"\uffe3"===l||"\ufe11"===l||"\ufe12"===l}function Oy(l){return"\ufe35"===l||"\ufe47"===l||"\ufe37"===l||"\ufe43"===l||"\ufe41"===l||"\ufe3d"===l||"\ufe3b"===l||"\ufe39"===l||"\ufe17"===l||"\ufe3f"===l}var Jp=qi,tg=function(l,o,a,u,f){var g,v,x=8*f-u-1,M=(1<>1,A=-7,R=a?f-1:0,P=a?-1:1,B=l[o+R];for(R+=P,g=B&(1<<-A)-1,B>>=-A,A+=x;A>0;g=256*g+l[o+R],R+=P,A-=8);for(v=g&(1<<-A)-1,g>>=-A,A+=u;A>0;v=256*v+l[o+R],R+=P,A-=8);if(0===g)g=1-D;else{if(g===M)return v?NaN:1/0*(B?-1:1);v+=Math.pow(2,u),g-=D}return(B?-1:1)*v*Math.pow(2,g-u)},Fy=function(l,o,a,u,f,g){var v,x,M,D=8*g-f-1,A=(1<>1,P=23===f?Math.pow(2,-24)-Math.pow(2,-77):0,B=u?0:g-1,N=u?1:-1,U=o<0||0===o&&1/o<0?1:0;for(o=Math.abs(o),isNaN(o)||o===1/0?(x=isNaN(o)?1:0,v=A):(v=Math.floor(Math.log(o)/Math.LN2),o*(M=Math.pow(2,-v))<1&&(v--,M*=2),(o+=v+R>=1?P/M:P*Math.pow(2,1-R))*M>=2&&(v++,M/=2),v+R>=A?(x=0,v=A):v+R>=1?(x=(o*M-1)*Math.pow(2,f),v+=R):(x=o*Math.pow(2,R-1)*Math.pow(2,f),v=0));f>=8;l[a+B]=255&x,B+=N,x/=256,f-=8);for(v=v<0;l[a+B]=255&v,B+=N,v/=256,D-=8);l[a+B-N]|=128*U};function qi(l){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(l)?l:new Uint8Array(l||0),this.pos=0,this.type=0,this.length=this.buf.length}qi.Varint=0,qi.Fixed64=1,qi.Bytes=2,qi.Fixed32=5;var dc=4294967296,Fb=1/dc,ng=typeof TextDecoder>"u"?null:new TextDecoder("utf8");function Sa(l){return l.type===qi.Bytes?l.readVarint()+l.pos:l.pos+1}function ig(l,o,a){var u=o<=16383?1:o<=2097151?2:o<=268435455?3:Math.floor(Math.log(o)/(7*Math.LN2));a.realloc(u);for(var f=a.pos-1;f>=l;f--)a.buf[f+u]=a.buf[f]}function rg(l,o){for(var a=0;a>>8,l[a+2]=o>>>16,l[a+3]=o>>>24}function sg(l,o){return(l[o]|l[o+1]<<8|l[o+2]<<16)+(l[o+3]<<24)}function H1(l,o,a){o.glyphs=[],1===l&&a.readMessage(Nb,o)}function Nb(l,o,a){if(3===l){const{id:u,bitmap:f,width:g,height:v,left:x,top:M,advance:D}=a.readMessage($1,{});o.glyphs.push({id:u,bitmap:new ac({width:g+6,height:v+6},f),metrics:{width:g,height:v,left:x,top:M,advance:D}})}else 4===l?o.ascender=a.readSVarint():5===l&&(o.descender=a.readSVarint())}function $1(l,o,a){1===l?o.id=a.readVarint():2===l?o.bitmap=a.readBytes():3===l?o.width=a.readVarint():4===l?o.height=a.readVarint():5===l?o.left=a.readSVarint():6===l?o.top=a.readSVarint():7===l&&(o.advance=a.readVarint())}function ag(l){let o=0,a=0;for(const v of l)o+=v.w*v.h,a=Math.max(a,v.w);l.sort((v,x)=>x.h-v.h);const u=[{x:0,y:0,w:Math.max(Math.ceil(Math.sqrt(o/.95)),a),h:1/0}];let f=0,g=0;for(const v of l)for(let x=u.length-1;x>=0;x--){const M=u[x];if(!(v.w>M.w||v.h>M.h)){if(v.x=M.x,v.y=M.y,g=Math.max(g,v.y+v.h),f=Math.max(f,v.x+v.w),v.w===M.w&&v.h===M.h){const D=u.pop();x>3,g=this.pos;this.type=7&u,l(f,o,this),this.pos===g&&this.skip(u)}return o},readMessage:function(l,o){return this.readFields(l,o,this.readVarint()+this.pos)},readFixed32:function(){var l=og(this.buf,this.pos);return this.pos+=4,l},readSFixed32:function(){var l=sg(this.buf,this.pos);return this.pos+=4,l},readFixed64:function(){var l=og(this.buf,this.pos)+og(this.buf,this.pos+4)*dc;return this.pos+=8,l},readSFixed64:function(){var l=og(this.buf,this.pos)+sg(this.buf,this.pos+4)*dc;return this.pos+=8,l},readFloat:function(){var l=tg(this.buf,this.pos,!0,23,4);return this.pos+=4,l},readDouble:function(){var l=tg(this.buf,this.pos,!0,52,8);return this.pos+=8,l},readVarint:function(l){var o,a,u=this.buf;return o=127&(a=u[this.pos++]),a<128?o:(o|=(127&(a=u[this.pos++]))<<7,a<128?o:(o|=(127&(a=u[this.pos++]))<<14,a<128?o:(o|=(127&(a=u[this.pos++]))<<21,a<128?o:function(f,g,v){var x,M,D=v.buf;if(x=(112&(M=D[v.pos++]))>>4,M<128||(x|=(127&(M=D[v.pos++]))<<3,M<128)||(x|=(127&(M=D[v.pos++]))<<10,M<128)||(x|=(127&(M=D[v.pos++]))<<17,M<128)||(x|=(127&(M=D[v.pos++]))<<24,M<128)||(x|=(1&(M=D[v.pos++]))<<31,M<128))return function kh(l,o,a){return a?4294967296*o+(l>>>0):4294967296*(o>>>0)+(l>>>0)}(f,x,g);throw new Error("Expected varint not more than 10 bytes")}(o|=(15&(a=u[this.pos]))<<28,l,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var l=this.readVarint();return l%2==1?(l+1)/-2:l/2},readBoolean:function(){return Boolean(this.readVarint())},readString:function(){var l=this.readVarint()+this.pos,o=this.pos;return this.pos=l,l-o>=12&&ng?ng.decode(this.buf.subarray(o,l)):function(a,u,f){for(var g="",v=u;v239?4:A>223?3:A>191?2:1;if(v+P>f)break;1===P?A<128&&(R=A):2===P?128==(192&(x=a[v+1]))&&(R=(31&A)<<6|63&x)<=127&&(R=null):3===P?(M=a[v+2],128==(192&(x=a[v+1]))&&128==(192&M)&&((R=(15&A)<<12|(63&x)<<6|63&M)<=2047||R>=55296&&R<=57343)&&(R=null)):4===P&&(M=a[v+2],D=a[v+3],128==(192&(x=a[v+1]))&&128==(192&M)&&128==(192&D)&&((R=(15&A)<<18|(63&x)<<12|(63&M)<<6|63&D)<=65535||R>=1114112)&&(R=null)),null===R?(R=65533,P=1):R>65535&&(R-=65536,g+=String.fromCharCode(R>>>10&1023|55296),R=56320|1023&R),g+=String.fromCharCode(R),v+=P}return g}(this.buf,o,l)},readBytes:function(){var l=this.readVarint()+this.pos,o=this.buf.subarray(this.pos,l);return this.pos=l,o},readPackedVarint:function(l,o){if(this.type!==qi.Bytes)return l.push(this.readVarint(o));var a=Sa(this);for(l=l||[];this.pos127;);else if(o===qi.Bytes)this.pos=this.readVarint()+this.pos;else if(o===qi.Fixed32)this.pos+=4;else{if(o!==qi.Fixed64)throw new Error("Unimplemented type: "+o);this.pos+=8}},writeTag:function(l,o){this.writeVarint(l<<3|o)},realloc:function(l){for(var o=this.length||16;o268435455||l<0?function(o,a){var u,f,g,x;if(o>=0?(u=o%4294967296|0,f=o/4294967296|0):(f=~(-o/4294967296),4294967295^(u=~(-o%4294967296))?u=u+1|0:(u=0,f=f+1|0)),o>=0x10000000000000000||o<-0x10000000000000000)throw new Error("Given varint doesn't fit into 10 bytes");a.realloc(10),g=u,(x=a).buf[x.pos++]=127&g|128,g>>>=7,x.buf[x.pos++]=127&g|128,g>>>=7,x.buf[x.pos++]=127&g|128,g>>>=7,x.buf[x.pos++]=127&g|128,x.buf[x.pos]=127&(g>>>=7),function(g,v){var x=(7&g)<<4;v.buf[v.pos++]|=x|((g>>>=3)?128:0),g&&(v.buf[v.pos++]=127&g|((g>>>=7)?128:0),g&&(v.buf[v.pos++]=127&g|((g>>>=7)?128:0),g&&(v.buf[v.pos++]=127&g|((g>>>=7)?128:0),g&&(v.buf[v.pos++]=127&g|((g>>>=7)?128:0),g&&(v.buf[v.pos++]=127&g)))))}(f,a)}(l,this):(this.realloc(4),this.buf[this.pos++]=127&l|(l>127?128:0),l<=127||(this.buf[this.pos++]=127&(l>>>=7)|(l>127?128:0),l<=127||(this.buf[this.pos++]=127&(l>>>=7)|(l>127?128:0),l<=127||(this.buf[this.pos++]=l>>>7&127))))},writeSVarint:function(l){this.writeVarint(l<0?2*-l-1:2*l)},writeBoolean:function(l){this.writeVarint(Boolean(l))},writeString:function(l){l=String(l),this.realloc(4*l.length),this.pos++;var o=this.pos;this.pos=function(u,f,g){for(var v,x,M=0;M55295&&v<57344){if(!x){v>56319||M+1===f.length?(u[g++]=239,u[g++]=191,u[g++]=189):x=v;continue}if(v<56320){u[g++]=239,u[g++]=191,u[g++]=189,x=v;continue}v=x-55296<<10|v-56320|65536,x=null}else x&&(u[g++]=239,u[g++]=191,u[g++]=189,x=null);v<128?u[g++]=v:(v<2048?u[g++]=v>>6|192:(v<65536?u[g++]=v>>12|224:(u[g++]=v>>18|240,u[g++]=v>>12&63|128),u[g++]=v>>6&63|128),u[g++]=63&v|128)}return g}(this.buf,l,this.pos);var a=this.pos-o;a>=128&&ig(o,a,this),this.pos=o-1,this.writeVarint(a),this.pos+=a},writeFloat:function(l){this.realloc(4),Fy(this.buf,l,this.pos,!0,23,4),this.pos+=4},writeDouble:function(l){this.realloc(8),Fy(this.buf,l,this.pos,!0,52,8),this.pos+=8},writeBytes:function(l){var o=l.length;this.writeVarint(o),this.realloc(o);for(var a=0;a=128&&ig(a,u,this),this.pos=a-1,this.writeVarint(u),this.pos+=u},writeMessage:function(l,o,a){this.writeTag(l,qi.Bytes),this.writeRawMessage(o,a)},writePackedVarint:function(l,o){o.length&&this.writeMessage(l,rg,o)},writePackedSVarint:function(l,o){o.length&&this.writeMessage(l,Cl,o)},writePackedBoolean:function(l,o){o.length&&this.writeMessage(l,G1,o)},writePackedFloat:function(l,o){o.length&&this.writeMessage(l,Lb,o)},writePackedDouble:function(l,o){o.length&&this.writeMessage(l,Ly,o)},writePackedFixed32:function(l,o){o.length&&this.writeMessage(l,U1,o)},writePackedSFixed32:function(l,o){o.length&&this.writeMessage(l,Bb,o)},writePackedFixed64:function(l,o){o.length&&this.writeMessage(l,Rh,o)},writePackedSFixed64:function(l,o){o.length&&this.writeMessage(l,j1,o)},writeBytesField:function(l,o){this.writeTag(l,qi.Bytes),this.writeBytes(o)},writeFixed32Field:function(l,o){this.writeTag(l,qi.Fixed32),this.writeFixed32(o)},writeSFixed32Field:function(l,o){this.writeTag(l,qi.Fixed32),this.writeSFixed32(o)},writeFixed64Field:function(l,o){this.writeTag(l,qi.Fixed64),this.writeFixed64(o)},writeSFixed64Field:function(l,o){this.writeTag(l,qi.Fixed64),this.writeSFixed64(o)},writeVarintField:function(l,o){this.writeTag(l,qi.Varint),this.writeVarint(o)},writeSVarintField:function(l,o){this.writeTag(l,qi.Varint),this.writeSVarint(o)},writeStringField:function(l,o){this.writeTag(l,qi.Bytes),this.writeString(o)},writeFloatField:function(l,o){this.writeTag(l,qi.Fixed32),this.writeFloat(o)},writeDoubleField:function(l,o){this.writeTag(l,qi.Fixed64),this.writeDouble(o)},writeBooleanField:function(l,o){this.writeVarintField(l,Boolean(o))}};class zb{constructor(o,{pixelRatio:a,version:u,stretchX:f,stretchY:g,content:v}){this.paddedRect=o,this.pixelRatio=a,this.stretchX=f,this.stretchY=g,this.content=v,this.version=u}get tl(){return[this.paddedRect.x+1,this.paddedRect.y+1]}get br(){return[this.paddedRect.x+this.paddedRect.w-1,this.paddedRect.y+this.paddedRect.h-1]}get displaySize(){return[(this.paddedRect.w-2)/this.pixelRatio,(this.paddedRect.h-2)/this.pixelRatio]}}class Vb{constructor(o,a){const u={},f={};this.haveRenderCallbacks=[];const g=[];this.addImages(o,u,g),this.addImages(a,f,g);const{w:v,h:x}=ag(g),M=new Fs({width:v||1,height:x||1});for(const D in o){const A=o[D],R=u[D].paddedRect;Fs.copy(A.data,M,{x:0,y:0},{x:R.x+1,y:R.y+1},A.data)}for(const D in a){const A=a[D],R=f[D].paddedRect,P=R.x+1,B=R.y+1,N=A.data.width,U=A.data.height;Fs.copy(A.data,M,{x:0,y:0},{x:P,y:B},A.data),Fs.copy(A.data,M,{x:0,y:U-1},{x:P,y:B-1},{width:N,height:1}),Fs.copy(A.data,M,{x:0,y:0},{x:P,y:B+U},{width:N,height:1}),Fs.copy(A.data,M,{x:N-1,y:0},{x:P-1,y:B},{width:1,height:U}),Fs.copy(A.data,M,{x:0,y:0},{x:P+N,y:B},{width:1,height:U})}this.image=M,this.iconPositions=u,this.patternPositions=f}addImages(o,a,u){for(const f in o){const g=o[f],v={x:0,y:0,w:g.data.width+2,h:g.data.height+2};u.push(v),a[f]=new zb(v,g),g.hasRenderCallback&&this.haveRenderCallbacks.push(f)}}patchUpdatedImages(o,a){this.haveRenderCallbacks=this.haveRenderCallbacks.filter(u=>o.hasImage(u)),o.dispatchRenderCallbacks(this.haveRenderCallbacks);for(const u in o.updatedImages)this.patchUpdatedImage(this.iconPositions[u],o.getImage(u),a),this.patchUpdatedImage(this.patternPositions[u],o.getImage(u),a)}patchUpdatedImage(o,a,u){if(!o||!a||o.version===a.version)return;o.version=a.version;const[f,g]=o.tl;u.update(a.data,void 0,{x:f,y:g})}}Wt(zb,"ImagePosition"),Wt(Vb,"ImageAtlas");const $r={horizontal:1,vertical:2,horizontalOnly:3};class ef{constructor(){this.scale=1,this.fontStack="",this.imageName=null}static forText(o,a){const u=new ef;return u.scale=o||1,u.fontStack=a,u}static forImage(o){const a=new ef;return a.imageName=o,a}}class Za{constructor(){this.text="",this.sectionIndex=[],this.sections=[],this.imageSectionID=null}static fromFeature(o,a){const u=new Za;for(let f=0;f=0&&u>=o&&lg[this.text.charCodeAt(u)];u--)a--;this.text=this.text.substring(o,a),this.sectionIndex=this.sectionIndex.slice(o,a)}substring(o,a){const u=new Za;return u.text=this.text.substring(o,a),u.sectionIndex=this.sectionIndex.slice(o,a),u.sections=this.sections,u}toString(){return this.text}getMaxScale(){return this.sectionIndex.reduce((o,a)=>Math.max(o,this.sections[a].scale),0)}addTextSection(o,a){this.text+=o.text,this.sections.push(ef.forText(o.scale,o.fontStack||a));const u=this.sections.length-1;for(let f=0;f=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)}}function $t(l,o,a,u,f,g,v,x,M,D,A,R,P,B,N){const U=Za.fromFeature(l,f);R===$r.vertical&&U.verticalizePunctuation(P);let Z=[];const re=function(fe,He,je,nt,xt,Ue){if(!fe)return[];const lt=[],dt=function(kt,ln,Ft,Xt,Rt,pn){let Hn=0;for(let jn=0;jn=0;let et=0;for(let kt=0;kt0&&ia>ir&&(ir=ia)}else{const Gi=je[sr.fontStack];if(!Gi)continue;Gi[ui]&&(he=Gi[ui]);const wi=He[sr.fontStack];if(!wi)continue;const ia=wi.glyphs[ui];if(!ia)continue;if(se=ia.metrics,$o=8203!==ui?24:0,pn){const md=void 0!==wi.ascender?Math.abs(wi.ascender):0,gd=void 0!==wi.descender?Math.abs(wi.descender):0,Nt=(md+gd)*_r;ur-a/2;){if(v--,v<0)return!1;x-=l[v].dist(g),g=l[v]}x+=l[v].dist(l[v+1]),v++;const M=[];let D=0;for(;xu;)D-=M.shift().angleDelta;if(D>f)return!1;v++,x+=A.dist(R)}return!0}function Hb(l){let o=0;for(let a=0;aD){const N=(D-M)/B,U=ci(R.x,P.x,N),Z=ci(R.y,P.y,N),re=new Ho(U,Z,0,P.angleTo(R),A);return!v||jb(l,re,x,v,o)?re:void 0}M+=B}}function Z1(l,o,a,u,f,g,v,x,M){const D=$b(u,g,v),A=Wb(u,f),R=A*v,P=0===l[0].x||l[0].x===M||0===l[0].y||l[0].y===M;return o-R=0&&ue=0&&ye=0&&P+D<=A){const fe=new Ho(ue,ye,0,pe,N);fe._round(),u&&!jb(l,fe,g,u,f)||B.push(fe)}}R+=re}return x||B.length||v||(B=qb(l,R/2,a,u,f,g,v,!0,M)),B}function cd(l,o,a,u,f){const g=[];for(let v=0;v=u&&R.x>=u||(A.x>=u?A=new Ee(u,A.y+(u-A.x)/(R.x-A.x)*(R.y-A.y))._round():R.x>=u&&(R=new Ee(u,A.y+(u-A.x)/(R.x-A.x)*(R.y-A.y))._round()),A.y>=f&&R.y>=f||(A.y>=f?A=new Ee(A.x+(f-A.y)/(R.y-A.y)*(R.x-A.x),f)._round():R.y>=f&&(R=new Ee(A.x+(f-A.y)/(R.y-A.y)*(R.x-A.x),f)._round()),M&&A.equals(M[M.length-1])||(M=[A],g.push(M)),M.push(R)))))}}return g}Wt(Ho,"Anchor");const ea=1e20;function Zb(l,o,a,u,f,g,v,x,M){for(let D=o;D-1);M++,g[M]=x,v[M]=D,v[M+1]=ea}for(let x=0,M=0;x{let x=this.entries[f];x||(x=this.entries[f]={glyphs:{},requests:{},ranges:{},ascender:void 0,descender:void 0});let M=x.glyphs[g];if(void 0!==M)return void v(null,{stack:f,id:g,glyph:M});if(M=this._tinySDF(x,f,g),M)return x.glyphs[g]=M,void v(null,{stack:f,id:g,glyph:M});const D=Math.floor(g/256);if(256*D>65535)return void v(new Error("glyphs > 65535 not supported"));if(x.ranges[D])return void v(null,{stack:f,id:g,glyph:M});let A=x.requests[D];A||(A=x.requests[D]=[],rf.loadGlyphRange(f,D,this.url,this.requestManager,(R,P)=>{if(P){x.ascender=P.ascender,x.descender=P.descender;for(const B in P.glyphs)this._doesCharSupportLocalGlyph(+B)||(x.glyphs[+B]=P.glyphs[+B]);x.ranges[D]=!0}for(const B of A)B(R,P);delete x.requests[D]})),A.push((R,P)=>{R?v(R):P&&v(null,{stack:f,id:g,glyph:P.glyphs[g]||null})})},(f,g)=>{if(f)a(f);else if(g){const v={};for(const{stack:x,id:M,glyph:D}of g)void 0===v[x]&&(v[x]={}),void 0===v[x].glyphs&&(v[x].glyphs={}),v[x].glyphs[M]=D&&{id:D.id,bitmap:D.bitmap.clone(),metrics:D.metrics},v[x].ascender=this.entries[x].ascender,v[x].descender=this.entries[x].descender;a(null,v)}})}_doesCharSupportLocalGlyph(o){return this.localGlyphMode!==Yb.none&&(this.localGlyphMode===Yb.all?!!this.localFontFamily:!!this.localFontFamily&&(hh(o)||Tp(o)||ja(o)||gs(o)||nc(o)))}_tinySDF(o,a,u){const f=this.localFontFamily;if(!f||!this._doesCharSupportLocalGlyph(u))return;let g=o.tinySDF;if(!g){let U="400";/bold/i.test(a)?U="900":/medium/i.test(a)?U="500":/light/i.test(a)&&(U="200"),g=o.tinySDF=new rf.TinySDF({fontFamily:f,fontWeight:U,fontSize:48,buffer:6,radius:16}),g.fontWeight=U}if(this.localGlyphs[g.fontWeight][u])return this.localGlyphs[g.fontWeight][u];const v=String.fromCharCode(u),{data:x,width:M,height:D,glyphWidth:A,glyphHeight:R,glyphLeft:P,glyphTop:B,glyphAdvance:N}=g.draw(v);return this.localGlyphs[g.fontWeight][u]={id:u,bitmap:new ac({width:M,height:D},x),metrics:{width:A/2,height:R/2,left:P/2,top:B/2-27,advance:N/2,localGlyph:!0}}}}function Ny(l,o,a,u){const f=[],g=l.image,v=g.pixelRatio,x=g.paddedRect.w-2,M=g.paddedRect.h-2,D=l.right-l.left,A=l.bottom-l.top,R=g.stretchX||[[0,x]],P=g.stretchY||[[0,M]],B=(Ue,lt)=>Ue+lt[1]-lt[0],N=R.reduce(B,0),U=P.reduce(B,0),Z=x-N,re=M-U;let pe=0,oe=N,ue=0,ye=U,fe=0,He=Z,je=0,nt=re;if(g.content&&u){const Ue=g.content;pe=zy(R,0,Ue[0]),ue=zy(P,0,Ue[1]),oe=zy(R,Ue[0],Ue[2]),ye=zy(P,Ue[1],Ue[3]),fe=Ue[0]-pe,je=Ue[1]-ue,He=Ue[2]-Ue[0]-oe,nt=Ue[3]-Ue[1]-ye}const xt=(Ue,lt,dt,pt)=>{const et=sf(Ue.stretch-pe,oe,D,l.left),qe=dg(Ue.fixed-fe,He,Ue.stretch,N),kt=sf(lt.stretch-ue,ye,A,l.top),ln=dg(lt.fixed-je,nt,lt.stretch,U),Ft=sf(dt.stretch-pe,oe,D,l.left),Xt=dg(dt.fixed-fe,He,dt.stretch,N),Rt=sf(pt.stretch-ue,ye,A,l.top),pn=dg(pt.fixed-je,nt,pt.stretch,U),Hn=new Ee(et,kt),jn=new Ee(Ft,kt),Xn=new Ee(Ft,Rt),bn=new Ee(et,Rt),Ti=new Ee(qe/v,ln/v),An=new Ee(Xt/v,pn/v),Jn=o*Math.PI/180;if(Jn){const Zi=Math.sin(Jn),ir=Math.cos(Jn),ur=[ir,-Zi,Zi,ir];Hn._matMult(ur),jn._matMult(ur),bn._matMult(ur),Xn._matMult(ur)}const Oi=Ue.stretch+Ue.fixed,nr=lt.stretch+lt.fixed;return{tl:Hn,tr:jn,bl:bn,br:Xn,tex:{x:g.paddedRect.x+1+Oi,y:g.paddedRect.y+1+nr,w:dt.stretch+dt.fixed-Oi,h:pt.stretch+pt.fixed-nr},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:Ti,pixelOffsetBR:An,minFontScaleX:He/v/D,minFontScaleY:nt/v/A,isSDF:a}};if(u&&(g.stretchX||g.stretchY)){const Ue=Vy(R,Z,N),lt=Vy(P,re,U);for(let dt=0;dt{if(M)f(M);else if(D){const A={},R=new Jp(D).readFields(H1,{});for(const P of R.glyphs)A[P.id]=P;f(null,{glyphs:A,ascender:R.ascender,descender:R.descender})}})},rf.TinySDF=class{constructor({fontSize:l=24,buffer:o=3,radius:a=8,cutoff:u=.25,fontFamily:f="sans-serif",fontWeight:g="normal",fontStyle:v="normal"}={}){this.buffer=o,this.cutoff=u,this.radius=a;const x=this.size=l+4*o,M=this._createCanvas(x),D=this.ctx=M.getContext("2d",{willReadFrequently:!0});D.font=`${v} ${g} ${l}px ${f}`,D.textBaseline="alphabetic",D.textAlign="left",D.fillStyle="black",this.gridOuter=new Float64Array(x*x),this.gridInner=new Float64Array(x*x),this.f=new Float64Array(x),this.z=new Float64Array(x+1),this.v=new Uint16Array(x)}_createCanvas(l){const o=document.createElement("canvas");return o.width=o.height=l,o}draw(l){const{width:o,actualBoundingBoxAscent:a,actualBoundingBoxDescent:u,actualBoundingBoxLeft:f,actualBoundingBoxRight:g}=this.ctx.measureText(l),v=Math.ceil(a),x=Math.max(0,Math.min(this.size-this.buffer,Math.ceil(g-f))),M=Math.min(this.size-this.buffer,v+Math.ceil(u)),D=x+2*this.buffer,A=M+2*this.buffer,R=Math.max(D*A,0),P=new Uint8ClampedArray(R),B={data:P,width:D,height:A,glyphWidth:x,glyphHeight:M,glyphTop:v,glyphLeft:0,glyphAdvance:o};if(0===x||0===M)return B;const{ctx:N,buffer:U,gridInner:Z,gridOuter:re}=this;N.clearRect(U,U,x,M),N.fillText(l,U,U+v);const pe=N.getImageData(U,U,x,M);re.fill(ea,0,R),Z.fill(0,0,R);for(let oe=0;oe0?He*He:0,Z[fe]=He<0?He*He:0}}Zb(re,0,0,D,A,D,this.f,this.v,this.z),Zb(Z,U,U,x,M,D,this.f,this.v,this.z);for(let oe=0;oe0)for(let u=(this.length>>1)-1;u>=0;u--)this._down(u)}push(o){this.data.push(o),this.length++,this._up(this.length-1)}pop(){if(0===this.length)return;const o=this.data[0],a=this.data.pop();return this.length--,this.length>0&&(this.data[0]=a,this._down(0)),o}peek(){return this.data[0]}_up(o){const{data:a,compare:u}=this,f=a[o];for(;o>0;){const g=o-1>>1,v=a[g];if(u(f,v)>=0)break;a[o]=v,o=g}a[o]=f}_down(o){const{data:a,compare:u}=this,f=this.length>>1,g=a[o];for(;o=0)break;a[o]=x,o=v}a[o]=g}}function Y1(l,o){return lo?1:0}function Xa(l,o=1,a=!1){let u=1/0,f=1/0,g=-1/0,v=-1/0;const x=l[0];for(let B=0;Bg)&&(g=N.x),(!B||N.y>v)&&(v=N.y)}const M=Math.min(g-u,v-f);let D=M/2;const A=new X1([],K1);if(0===M)return new Ee(u,f);for(let B=u;BR.d||!R.d)&&(R=B,a&&console.log("found best %d after %d probes",Math.round(1e4*B.d)/1e4,P)),B.max-R.d<=o||(D=B.h/2,A.push(new ud(B.p.x-D,B.p.y-D,D,l)),A.push(new ud(B.p.x+D,B.p.y-D,D,l)),A.push(new ud(B.p.x-D,B.p.y+D,D,l)),A.push(new ud(B.p.x+D,B.p.y+D,D,l)),P+=4)}return a&&(console.log(`num probes: ${P}`),console.log(`best distance: ${R.d}`)),R.p}function K1(l,o){return o.max-l.max}function ud(l,o,a,u){this.p=new Ee(l,o),this.h=a,this.d=function(f,g){let v=!1,x=1/0;for(let M=0;Mf.y!=N.y>f.y&&f.x<(N.x-B.x)*(f.y-B.y)/(N.y-B.y)+B.x&&(v=!v),x=Math.min(x,_1(f,B,N))}}return(v?1:-1)*Math.sqrt(x)}(this.p,u),this.max=this.d+this.h*Math.SQRT2}const Gy=Number.POSITIVE_INFINITY,Q1=Math.sqrt(2);function Qb(l,[o,a]){let u=0,f=0;if(a===Gy){o<0&&(o=0);const g=o/Q1;switch(l){case"top-right":case"top-left":f=g-7;break;case"bottom-right":case"bottom-left":f=7-g;break;case"bottom":f=7-o;break;case"top":f=o-7}switch(l){case"top-right":case"bottom-right":u=-g;break;case"top-left":case"bottom-left":u=g;break;case"left":u=o;break;case"right":u=-o}}else{switch(o=Math.abs(o),a=Math.abs(a),l){case"top-right":case"top-left":case"top":f=a-7;break;case"bottom-right":case"bottom-left":case"bottom":f=7-a}switch(l){case"top-right":case"bottom-right":case"right":u=-o;break;case"top-left":case"bottom-left":case"left":u=o}}return[u,f]}function J1(l,o,a,u,f,g,v,x,M,D){l.createArrays(),l.tilePixelRatio=wn/(512*l.overscaling),l.compareText={},l.iconsNeedLinear=!1;const A=l.layers[0].layout,R=l.layers[0]._unevaluatedLayout._values,P={};if("composite"===l.textSizeData.kind){const{minZoom:U,maxZoom:Z}=l.textSizeData;P.compositeTextSizes=[R["text-size"].possiblyEvaluate(new Te(U),x),R["text-size"].possiblyEvaluate(new Te(Z),x)]}if("composite"===l.iconSizeData.kind){const{minZoom:U,maxZoom:Z}=l.iconSizeData;P.compositeIconSizes=[R["icon-size"].possiblyEvaluate(new Te(U),x),R["icon-size"].possiblyEvaluate(new Te(Z),x)]}P.layoutTextSize=R["text-size"].possiblyEvaluate(new Te(M+1),x),P.layoutIconSize=R["icon-size"].possiblyEvaluate(new Te(M+1),x),P.textMaxSize=R["text-size"].possiblyEvaluate(new Te(18),x);const B="map"===A.get("text-rotation-alignment")&&"point"!==A.get("symbol-placement"),N=A.get("text-size");for(const U of l.features){const Z=A.get("text-font").evaluate(U,{},x).join(","),re=N.evaluate(U,{},x),pe=P.layoutTextSize.evaluate(U,{},x),oe=(P.layoutIconSize.evaluate(U,{},x),{horizontal:{},vertical:void 0}),ue=U.text;let ye,fe=[0,0];if(ue){const nt=ue.toString(),xt=24*A.get("text-letter-spacing").evaluate(U,{},x),Ue=24*A.get("text-line-height").evaluate(U,{},x),lt=T(nt)?xt:0,dt=A.get("text-anchor").evaluate(U,{},x),pt=A.get("text-variable-anchor");if(!pt){const Ft=A.get("text-radial-offset").evaluate(U,{},x);fe=Ft?Qb(dt,[24*Ft,Gy]):A.get("text-offset").evaluate(U,{},x).map(Xt=>24*Xt)}let et=B?"center":A.get("text-justify").evaluate(U,{},x);const qe="point"===A.get("symbol-placement"),kt=qe?24*A.get("text-max-width").evaluate(U,{},x):1/0,ln=Ft=>{l.allowVerticalPlacement&&E(nt)&&(oe.vertical=$t(ue,o,a,f,Z,kt,Ue,dt,Ft,lt,fe,$r.vertical,!0,pe,re))};if(!B&&pt){const Ft="auto"===et?pt.map(Rt=>hg(Rt)):[et];let Xt=!1;for(let Rt=0;Rt=0||!E(nt)){const Ft=$t(ue,o,a,f,Z,kt,Ue,dt,et,lt,fe,$r.horizontal,!1,pe,re);Ft&&(oe.horizontal[et]=Ft)}ln(qe?"left":et)}}let He=!1;if(U.icon&&U.icon.name){const nt=u[U.icon.name];nt&&(ye=q1(f[U.icon.name],A.get("icon-offset").evaluate(U,{},x),A.get("icon-anchor").evaluate(U,{},x)),He=nt.sdf,void 0===l.sdfIcons?l.sdfIcons=nt.sdf:l.sdfIcons!==nt.sdf&&Ji("Style sheet warning: Cannot mix SDF and non-SDF icons in one buffer"),(nt.pixelRatio!==l.pixelRatio||0!==A.get("icon-rotate").constantOr(1))&&(l.iconsNeedLinear=!0))}const je=Qn(oe.horizontal)||oe.vertical;l.iconsInText||(l.iconsInText=!!je&&je.iconsInText),(je||ye)&&eM(l,U,oe,ye,u,P,pe,0,fe,He,v,x,D)}g&&l.generateCollisionDebugBuffers(M,l.collisionBoxArray)}function hg(l){switch(l){case"right":case"top-right":case"bottom-right":return"right";case"left":case"top-left":case"bottom-left":return"left"}return"center"}function eM(l,o,a,u,f,g,v,x,M,D,A,R,P){let B=g.textMaxSize.evaluate(o,{},R);void 0===B&&(B=v);const N=l.layers[0].layout,U=N.get("icon-offset").evaluate(o,{},R),Z=Qn(a.horizontal)||a.vertical,re="globe"===P.name,pe=v/24,oe=l.tilePixelRatio*B/24,ue=(lt=l.overscaling,l.zoom>18&<>2&&(lt>>=1),Math.max(wn/(512*lt),1)*N.get("symbol-spacing")),ye=N.get("text-padding")*l.tilePixelRatio,fe=N.get("icon-padding")*l.tilePixelRatio,He=ot(N.get("text-max-angle")),je="map"===N.get("text-rotation-alignment")&&"point"!==N.get("symbol-placement"),nt="map"===N.get("icon-rotation-alignment")&&"point"!==N.get("symbol-placement"),xt=N.get("symbol-placement"),Ue=ue/2;var lt;const dt=N.get("icon-text-fit");let pt;u&&"none"!==dt&&(l.allowVerticalPlacement&&a.vertical&&(pt=ug(u,a.vertical,dt,N.get("icon-text-fit-padding"),U,pe)),Z&&(u=ug(u,Z,dt,N.get("icon-text-fit-padding"),U,pe)));const et=(qe,kt,ln)=>{if(kt.x<0||kt.x>=wn||kt.y<0||kt.y>=wn)return;let Ft=null;if(re){const{x:Xt,y:Rt,z:pn}=P.projectTilePoint(kt.x,kt.y,ln);Ft={anchor:new Ho(Xt,Rt,pn,0,void 0),up:P.upVector(ln,kt.x,kt.y)}}!function(Xt,Rt,pn,Hn,jn,Xn,bn,Ti,An,Jn,Oi,nr,Zi,ir,ur,wr,Mt,Fi,sr,Ae,ui,_r,se,he,ut){const $o=Xt.addToLineVertexArray(Rt,Hn);let Li,Bi,Gi,wi,ia,md,gd,Nt=0,Cf=0,Cx=0,sv=0,kg=-1,Rg=-1;const Et={};let Mx=Ha.exports("");const Tr=pn?pn.anchor:Rt;let Xi=0,_d=0;if(void 0===An._unevaluatedLayout.getValue("text-radial-offset")?[Xi,_d]=An.layout.get("text-offset").evaluate(ui,{},ut).map(xs=>24*xs):(Xi=24*An.layout.get("text-radial-offset").evaluate(ui,{},ut),_d=Gy),Xt.allowVerticalPlacement&&jn.vertical){const xs=jn.vertical;if(ur)md=pg(xs),Ti&&(gd=pg(Ti));else{const ws=An.layout.get("text-rotate").evaluate(ui,{},ut)+90;Gi=Se(Jn,Tr,Rt,Oi,nr,Zi,xs,ir,ws,wr),Ti&&(wi=Se(Jn,Tr,Rt,Oi,nr,Zi,Ti,Fi,ws))}}if(Xn){const xs=An.layout.get("icon-rotate").evaluate(ui,{},ut),ws="none"!==An.layout.get("icon-text-fit"),$h=Ny(Xn,xs,se,ws),Og=Ti?Ny(Ti,xs,se,ws):void 0;Bi=Se(Jn,Tr,Rt,Oi,nr,Zi,Xn,Fi,xs),Nt=4*$h.length;const av=Xt.iconSizeData;let su=null;"source"===av.kind?(su=[qa*An.layout.get("icon-size").evaluate(ui,{},ut)],su[0]>nu&&Ji(`${Xt.layerIds[0]}: Value for "icon-size" is >= 255. Reduce your "icon-size".`)):"composite"===av.kind&&(su=[qa*_r.compositeIconSizes[0].evaluate(ui,{},ut),qa*_r.compositeIconSizes[1].evaluate(ui,{},ut)],(su[0]>nu||su[1]>nu)&&Ji(`${Xt.layerIds[0]}: Value for "icon-size" is >= 255. Reduce your "icon-size".`)),Xt.addSymbols(Xt.icon,$h,su,Ae,sr,ui,!1,pn,Rt,$o.lineStartIndex,$o.lineLength,-1,he,ut),kg=Xt.icon.placedSymbolArray.length-1,Og&&(Cf=4*Og.length,Xt.addSymbols(Xt.icon,Og,su,Ae,sr,ui,$r.vertical,pn,Rt,$o.lineStartIndex,$o.lineLength,-1,he,ut),Rg=Xt.icon.placedSymbolArray.length-1)}for(const xs in jn.horizontal){const ws=jn.horizontal[xs];Li||(Mx=Ha.exports(ws.text),ur?ia=pg(ws):Li=Se(Jn,Tr,Rt,Oi,nr,Zi,ws,ir,An.layout.get("text-rotate").evaluate(ui,{},ut),wr));const $h=1===ws.positionedLines.length;if(Cx+=Jb(Xt,pn,Rt,ws,bn,An,ur,ui,wr,$o,jn.vertical?$r.horizontal:$r.horizontalOnly,$h?Object.keys(jn.horizontal):[xs],Et,kg,_r,he,ut),$h)break}jn.vertical&&(sv+=Jb(Xt,pn,Rt,jn.vertical,bn,An,ur,ui,wr,$o,$r.vertical,["vertical"],Et,Rg,_r,he,ut));let Il=-1;const Pg=(xs,ws)=>xs?Math.max(xs,ws):ws;Il=Pg(ia,Il),Il=Pg(md,Il),Il=Pg(gd,Il);const Sx=Il>-1?1:0;Xt.glyphOffsetArray.length>=ru.MAX_GLYPHS&&Ji("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),void 0!==ui.sortKey&&Xt.addToSortKeyRanges(Xt.symbolInstances.length,ui.sortKey),Xt.symbolInstances.emplaceBack(Tr.x,Tr.y,Tr.z,Rt.x,Rt.y,Et.right>=0?Et.right:-1,Et.center>=0?Et.center:-1,Et.left>=0?Et.left:-1,Et.vertical>=0?Et.vertical:-1,kg,Rg,Mx,void 0!==Li?Li:Xt.collisionBoxArray.length,void 0!==Li?Li+1:Xt.collisionBoxArray.length,void 0!==Gi?Gi:Xt.collisionBoxArray.length,void 0!==Gi?Gi+1:Xt.collisionBoxArray.length,void 0!==Bi?Bi:Xt.collisionBoxArray.length,void 0!==Bi?Bi+1:Xt.collisionBoxArray.length,wi||Xt.collisionBoxArray.length,wi?wi+1:Xt.collisionBoxArray.length,Oi,Cx,sv,Nt,Cf,Sx,0,Xi,_d,Il)}(l,kt,Ft,qe,a,u,f,pt,l.layers[0],l.collisionBoxArray,o.index,o.sourceLayerIndex,l.index,ye,je,M,0,fe,nt,U,o,g,D,A,R)};if("line"===xt)for(const qe of cd(o.geometry,0,0,wn,wn)){const kt=Z1(qe,ue,He,a.vertical||Z,u,24,oe,l.overscaling,wn);for(const ln of kt)Z&&ex(l,Z.text,Ue,ln)||et(qe,ln,R)}else if("line-center"===xt){for(const qe of o.geometry)if(qe.length>1){const kt=By(qe,He,a.vertical||Z,u,24,oe);kt&&et(qe,kt,R)}}else if("Polygon"===o.type)for(const qe of cc(o.geometry,0)){const kt=Xa(qe,16);et(qe[0],new Ho(kt.x,kt.y,0,0,void 0),R)}else if("LineString"===o.type)for(const qe of o.geometry)et(qe,new Ho(qe[0].x,qe[0].y,0,0,void 0),R);else if("Point"===o.type)for(const qe of o.geometry)for(const kt of qe)et([kt],new Ho(kt.x,kt.y,0,0,void 0),R)}const nu=32640;function Jb(l,o,a,u,f,g,v,x,M,D,A,R,P,B,N,U,Z){const re=function(ue,ye,fe,He,je,nt,xt,Ue){const lt=[];if(0===ye.positionedLines.length)return lt;const dt=He.layout.get("text-rotate").evaluate(nt,{})*Math.PI/180,pt=function(Ft){const Xt=Ft[0],Rt=Ft[1],pn=Xt*Rt;return pn>0?[Xt,-Rt]:pn<0?[-Xt,Rt]:0===Xt?[Rt,Xt]:[Rt,-Xt]}(fe);let et=Math.abs(ye.top-ye.bottom);for(const Ft of ye.positionedLines)et-=Ft.lineOffset;const qe=ye.positionedLines.length,kt=et/qe;let ln=ye.top-fe[1];for(let Ft=0;Ftnu&&Ji(`${l.layerIds[0]}: Value for "text-size" is >= 255. Reduce your "text-size".`)):"composite"===pe.kind&&(oe=[qa*N.compositeTextSizes[0].evaluate(x,{},Z),qa*N.compositeTextSizes[1].evaluate(x,{},Z)],(oe[0]>nu||oe[1]>nu)&&Ji(`${l.layerIds[0]}: Value for "text-size" is >= 255. Reduce your "text-size".`)),l.addSymbols(l.text,re,oe,M,v,x,A,o,a,D.lineStartIndex,D.lineLength,B,U,Z);for(const ue of R)P[ue]=l.text.placedSymbolArray.length-1;return 4*re.length}function Qn(l){for(const o in l)return l[o];return null}function Se(l,o,a,u,f,g,v,x,M,D){let A=v.top,R=v.bottom,P=v.left,B=v.right;const N=v.collisionPadding;if(N&&(P-=N[0],A-=N[1],B+=N[2],R+=N[3]),M){const U=new Ee(P,A),Z=new Ee(B,A),re=new Ee(P,R),pe=new Ee(B,R),oe=ot(M);let ue=new Ee(0,0);D&&(ue=new Ee(D[0],D[1])),U._rotateAround(oe,ue),Z._rotateAround(oe,ue),re._rotateAround(oe,ue),pe._rotateAround(oe,ue),P=Math.min(U.x,Z.x,re.x,pe.x),B=Math.max(U.x,Z.x,re.x,pe.x),A=Math.min(U.y,Z.y,re.y,pe.y),R=Math.max(U.y,Z.y,re.y,pe.y)}return l.emplaceBack(o.x,o.y,o.z,a.x,a.y,P,A,B,R,x,u,f,g),l.length-1}function pg(l){l.collisionPadding&&(l.top-=l.collisionPadding[1],l.bottom+=l.collisionPadding[3]);const o=l.bottom-l.top;return o>0?Math.max(10,o):null}function ex(l,o,a,u){const f=l.compareText;if(o in f){const g=f[o];for(let v=g.length-1;v>=0;v--)if(u.dist(g[v])1?null:function(u,f,g,v){const x=Math.sin(g);return u*(Math.sin((1-v)*g)/x)+f*(Math.sin(v*g)/x)}(l.a[o],l.b[o],l.angle,vn(a,0,1))+l.center[o]}function Sl(l){if(l.z<=1)return Or[l.z+2*l.y+l.x];const o=ix(uf(l));return Uo.fromPoints(o)}function Fh(l,o,a){return Os(l,l,1-a),rd(l,l,o,a)}function nM(l,o){const a=Bh(o.zoom);if(0===a)return Sl(l);const u=uf(l),f=ix(u),g=bl(u.getWest())*o.worldSize,v=bl(u.getEast())*o.worldSize,x=Ca(u.getNorth())*o.worldSize,M=Ca(u.getSouth())*o.worldSize,D=[g,x,0],A=[v,x,0],R=[g,M,0],P=[v,M,0],B=Fp([],o.globeMatrix);return xr(D,D,B),xr(A,A,B),xr(R,R,B),xr(P,P,B),f[0]=Fh(f[0],R,a),f[1]=Fh(f[1],P,a),f[2]=Fh(f[2],A,a),f[3]=Fh(f[3],D,a),Uo.fromPoints(f)}function iM(l,o,a){for(const u of l)xr(u,u,o),Os(u,u,a)}function uf({x:l,y:o,z:a}){const u=1/(1<Math.PI/2*1.01}const sx=ot(85),ax=Math.cos(sx),oM=Math.sin(sx);function Wy(l,o){const a=l.fovAboveCenter,u=l.elevation?l.elevation.getMinElevationBelowMSL()*o:0,f=(l._camera.position[2]*l.worldSize-u)/Math.cos(l._pitch),g=Math.sin(a)*f/Math.sin(Math.max(Math.PI/2-l._pitch-a,.01)),v=Math.sin(l._pitch)*g+f;return Math.min(1.01*v,f*(1/l._horizonShift))}function iu(l,o){if(!o.isReprojectedInTileSpace)return{scale:1<oe&&(ue(fe,pt,je,nt,lt,dt),ue(pt,He,lt,dt,xt,Ue))}ue(R,P,u,g,f,g),ue(P,B,f,g,f,v),ue(B,N,f,v,u,v),ue(N,R,u,v,u,g),U-=oe,Z-=oe,re+=oe,pe+=oe;const ye=1/Math.max(re-U,pe-Z);return{scale:ye,x:U*ye,y:Z*ye,x2:re*ye,y2:pe*ye,projection:o}}const qy=Ma(new Float32Array(16));class dd{constructor(o){this.spec=o,this.name=o.name,this.wrap=!1,this.requiresDraping=!1,this.supportsWorldCopies=!1,this.supportsTerrain=!1,this.supportsFog=!1,this.supportsFreeCamera=!1,this.zAxisUnit="meters",this.isReprojectedInTileSpace=!0,this.unsupportedLayers=["custom"],this.center=[0,0],this.range=[3.5,7]}project(o,a){return{x:0,y:0,z:0}}unproject(o,a){return new pi(0,0)}projectTilePoint(o,a,u){return{x:o,y:a,z:0}}locationPoint(o,a,u=!0){return o._coordinatePoint(o.locationCoordinate(a),u)}pixelsPerMeter(o,a){return ys(1,o)*a}pixelSpaceConversion(o,a,u){return 1}farthestPixelDistance(o){return Wy(o,o.pixelsPerMeter)}pointCoordinate(o,a,u,f){const g=o.horizonLineFromTop(!1),v=new Ee(a,Math.max(g,u));return o.rayIntersectionCoordinate(o.pointRayIntersection(v,f))}pointCoordinate3D(o,a,u){const f=new Ee(a,u);if(o.elevation)return o.elevation.pointCoordinate(f);{const g=this.pointCoordinate(o,f.x,f.y,0);return[g.x,g.y,g.z]}}isPointAboveHorizon(o,a){if(o.elevation)return!this.pointCoordinate3D(o,a.x,a.y);const u=o.horizonLineFromTop();return a.y0?a<-Nh+u&&(a=-Nh+u):a>Nh-u&&(a=Nh-u);const v=g/Math.pow(hd(a),f);let x=v*Math.sin(f*o),M=g-v*Math.cos(f*o);return x=.5*(x/Math.PI+.5),M=.5*(M/Math.PI+.5),{x,y:this.southernCenter?M:1-M,z:0}}unproject(o,a){o=(2*o-.5)*Math.PI,this.southernCenter&&(a=1-a),a=(2*(1-a)-.5)*Math.PI;const{n:u,f}=this,g=f-a,v=Math.sign(g),x=Math.sign(u)*Math.sqrt(o*o+g*g);let M=Math.atan2(o,Math.abs(g))*v;g*u<0&&(M-=Math.PI*Math.sign(o)*v);const D=vn(ft(M/u)+this.center[0],-180,180),A=vn(ft(2*Math.atan(Math.pow(f/x,1/u))-Nh),-85.051129,Hr);return new pi(D,this.southernCenter?-A:A)}}class _g extends dd{constructor(o){super(o),this.wrap=!0,this.supportsWorldCopies=!0,this.supportsTerrain=!0,this.supportsFog=!0,this.supportsFreeCamera=!0,this.isReprojectedInTileSpace=!1,this.unsupportedLayers=[],this.range=null}project(o,a){return{x:bl(o),y:Ca(a),z:0}}unproject(o,a){const u=To(o),f=$i(a);return new pi(u,f)}}const Vh=ot(Hr);class Xy extends dd{project(o,a){const u=(a=ot(a))*a,f=u*u;return{x:.5*((o=ot(o))*(.8707-.131979*u+f*(f*(.003971*u-.001529*f)-.013791))/Math.PI+.5),y:1-.5*(a*(1.007226+u*(.015085+f*(.028874*u-.044475-.005916*f)))/Math.PI+1),z:0}}unproject(o,a){o=(2*o-.5)*Math.PI;let u=a=(2*(1-a)-1)*Math.PI,f=25,g=0,v=u*u;do{v=u*u;const D=v*v;g=(u*(1.007226+v*(.015085+D*(.028874*v-.044475-.005916*D)))-a)/(1.007226+v*(.045255+D*(.259866*v-.311325-.005916*11*D))),u=vn(u-g,-Vh,Vh)}while(Math.abs(g)>1e-6&&--f>0);v=u*u;const x=vn(ft(o/(.8707+v*(v*(v*v*v*(.003971-.001529*v)-.013791)-.131979))),-180,180),M=ft(u);return new pi(x,M)}}const gf=ot(Hr);class cx extends dd{project(o,a){a=ot(a),o=ot(o);const u=Math.cos(a),f=2/Math.PI,g=Math.acos(u*Math.cos(o/2)),v=Math.sin(g)/g,x=.5*(o*f+2*u*Math.sin(o/2)/v)||0,M=.5*(a+Math.sin(a)/v)||0;return{x:.5*(x/Math.PI+.5),y:1-.5*(M/Math.PI+1),z:0}}unproject(o,a){let u=o=(2*o-.5)*Math.PI,f=a=(2*(1-a)-1)*Math.PI,g=25;const v=1e-6;let x=0,M=0;do{const D=Math.cos(f),A=Math.sin(f),R=2*A*D,P=A*A,B=D*D,N=Math.cos(u/2),U=Math.sin(u/2),Z=2*N*U,re=U*U,pe=1-B*N*N,oe=pe?1/pe:0,ue=pe?Math.acos(D*N)*Math.sqrt(1/pe):0,ye=.5*(2*ue*D*U+2*u/Math.PI)-o,fe=.5*(ue*A+f)-a,He=.5*oe*(B*re+ue*D*N*P)+1/Math.PI,je=oe*(Z*R/4-ue*A*U),nt=.125*oe*(R*U-ue*A*B*Z),xt=.5*oe*(P*N+ue*re*D)+.5,Ue=je*nt-xt*He;x=(fe*je-ye*xt)/Ue,M=(ye*nt-fe*He)/Ue,u=vn(u-x,-Math.PI,Math.PI),f=vn(f-M,-gf,gf)}while((Math.abs(x)>v||Math.abs(M)>v)&&--g>0);return new pi(ft(u),ft(f))}}class yg extends dd{constructor(o){super(o),this.center=o.center||[0,0],this.parallels=o.parallels||[0,0],this.cosPhi=Math.max(.01,Math.cos(ot(this.parallels[0]))),this.scale=1/(2*Math.max(Math.PI*this.cosPhi,1/this.cosPhi)),this.wrap=!0,this.supportsWorldCopies=!0}project(o,a){const{scale:u,cosPhi:f}=this;return{x:ot(o)*f*u+.5,y:-Math.sin(ot(a))/f*u+.5,z:0}}unproject(o,a){const{scale:u,cosPhi:f}=this,g=-(a-.5)/u,v=vn(ft((o-.5)/u)/f,-180,180),x=Math.asin(vn(g*f,-1,1)),M=vn(ft(x),-85.051129,Hr);return new pi(v,M)}}class Yy extends _g{constructor(o){super(o),this.requiresDraping=!0,this.supportsWorldCopies=!1,this.supportsFog=!0,this.zAxisUnit="pixels",this.unsupportedLayers=["debug","custom"],this.range=[3,5]}projectTilePoint(o,a,u){const f=df(o,a,u);return xr(f,f,ff(Sl(u))),{x:f[0],y:f[1],z:f[2]}}locationPoint(o,a){const u=Dl(a.lat,a.lng),f=tr([],u),g=o.elevation?o.elevation.getAtPointOrZero(o.locationCoordinate(a),o._centerAltitude):o._centerAltitude;rd(u,u,f,ys(1,0)*wn*g);const v=Ma(new Float64Array(16));return Qc(v,o.pixelMatrix,o.globeMatrix),xr(u,u,v),new Ee(u[0],u[1])}pixelsPerMeter(o,a){return ys(1,0)*a}pixelSpaceConversion(o,a,u){const f=ys(1,o)*a,g=ci(ys(1,45)*a,f,u);return this.pixelsPerMeter(o,a)/g}createTileMatrix(o,a,u){const f=fg(Sl(u.canonical));return Qc(new Float64Array(16),o.globeMatrix,f)}createInversionMatrix(o,a){const{center:u}=o,f=ff(Sl(a));return Bm(f,f,ot(u.lng)),rs(f,f,ot(u.lat)),Jc(f,f,[o._pixelsPerMercatorPixel,o._pixelsPerMercatorPixel,1]),Float32Array.from(f)}pointCoordinate(o,a,u,f){return nx(o,a,u,!0)||new ed(0,0)}pointCoordinate3D(o,a,u){const f=this.pointCoordinate(o,a,u,0);return[f.x,f.y,f.z]}isPointAboveHorizon(o,a){return!nx(o,a.x,a.y,!1)}farthestPixelDistance(o){const a=function(f,g){const v=f.cameraToCenterDistance,x=f._centerAltitude*g,M=f._camera,D=f._camera.forward(),A=xl([],Os([],D,-v),[0,0,x]),R=f.worldSize/(2*Math.PI),P=[0,0,-R],B=f.width/f.height,N=Math.tan(f.fovAboveCenter),U=Os([],M.up(),N),Z=Os([],M.right(),N*B),re=tr([],xl([],xl([],D,U),Z)),pe=[];let oe;if(new cy(A,re).closestPointOnSphere(P,R,pe)){const ue=xl([],pe,P),ye=Wa([],ue,A);oe=Math.cos(f.fovAboveCenter)*Bp(ye)}else{const ue=Wa([],A,P),ye=Wa([],P,A);tr(ye,ye);const fe=Bp(ue)-R;oe=Math.sqrt(fe*(fe+2*R));const He=Math.acos(oe/(R+fe))-Math.acos(os(D,ye));oe*=Math.cos(He)}return 1.01*oe}(o,this.pixelsPerMeter(o.center.lat,o.worldSize)),u=Bh(o.zoom);if(u>0){const f=Wy(o,ys(1,o.center.lat)*o.worldSize),g=o.worldSize/(2*Math.PI),v=Math.max(o.width,o.height)/o.worldSize*Math.PI;return ci(a,f+g*(1-Math.cos(v)),Math.pow(u,10))}return a}upVector(o,a,u){return df(a,u,o,1)}upVectorScale(o){return{metersToTile:jy*hf(Sl(o))}}}function vg(l){const o=l.parallels,a=!!o&&Math.abs(o[0]+o[1])<.01;switch(l.name){case"mercator":return new _g(l);case"equirectangular":return new sM(l);case"naturalEarth":return new Xy(l);case"equalEarth":return new lx(l);case"winkelTripel":return new cx(l);case"albers":return a?new yg(l):new Zy(l);case"lambertConformalConic":return a?new yg(l):new zh(l);case"globe":return new Yy(l)}throw new Error(`Invalid projection name: ${l.name}`)}const ux=qm.types,Ky=[{name:"a_fade_opacity",components:1,type:"Uint8",offset:0}];function bg(l,o,a,u,f,g,v,x,M,D,A,R,P){const B=x?Math.min(nu,Math.round(x[0])):0,N=x?Math.min(nu,Math.round(x[1])):0;l.emplaceBack(o,a,Math.round(32*u),Math.round(32*f),g,v,(B<<1)+(M?1:0),N,16*D,16*A,256*R,256*P)}function xg(l,o,a,u,f,g,v){l.emplaceBack(o,a,u,f,g,v)}function _f(l,o,a,u,f){l.emplaceBack(o,a,u,f),l.emplaceBack(o,a,u,f),l.emplaceBack(o,a,u,f),l.emplaceBack(o,a,u,f)}function aM(l){for(const o of l.sections)if(Q(o.text))return!0;return!1}class wg{constructor(o){this.layoutVertexArray=new Vi,this.indexArray=new to,this.programConfigurations=o,this.segments=new jr,this.dynamicLayoutVertexArray=new Eo,this.opacityVertexArray=new Er,this.placedSymbolArray=new Z_,this.globeExtVertexArray=new hi}isEmpty(){return 0===this.layoutVertexArray.length&&0===this.indexArray.length&&0===this.dynamicLayoutVertexArray.length&&0===this.opacityVertexArray.length}upload(o,a,u,f){this.isEmpty()||(u&&(this.layoutVertexBuffer=o.createVertexBuffer(this.layoutVertexArray,z1.members),this.indexBuffer=o.createIndexBuffer(this.indexArray,a),this.dynamicLayoutVertexBuffer=o.createVertexBuffer(this.dynamicLayoutVertexArray,Rb.members,!0),this.opacityVertexBuffer=o.createVertexBuffer(this.opacityVertexArray,Ky,!0),this.globeExtVertexArray.length>0&&(this.globeExtVertexBuffer=o.createVertexBuffer(this.globeExtVertexArray,V1.members,!0)),this.opacityVertexBuffer.itemSize=1),(u||f)&&this.programConfigurations.upload(o))}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.dynamicLayoutVertexBuffer.destroy(),this.opacityVertexBuffer.destroy(),this.globeExtVertexBuffer&&this.globeExtVertexBuffer.destroy())}}Wt(wg,"SymbolBuffers");class Cg{constructor(o,a,u){this.layoutVertexArray=new o,this.layoutAttributes=a,this.indexArray=new u,this.segments=new jr,this.collisionVertexArray=new rc,this.collisionVertexArrayExt=new ba}upload(o){this.layoutVertexBuffer=o.createVertexBuffer(this.layoutVertexArray,this.layoutAttributes),this.indexBuffer=o.createIndexBuffer(this.indexArray),this.collisionVertexBuffer=o.createVertexBuffer(this.collisionVertexArray,AT.members,!0),this.collisionVertexBufferExt=o.createVertexBuffer(this.collisionVertexArrayExt,IT.members,!0)}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.collisionVertexBuffer.destroy(),this.collisionVertexBufferExt.destroy())}}Wt(Cg,"CollisionBuffers");class ru{constructor(o){this.collisionBoxArray=o.collisionBoxArray,this.zoom=o.zoom,this.overscaling=o.overscaling,this.layers=o.layers,this.layerIds=this.layers.map(v=>v.id),this.index=o.index,this.pixelRatio=o.pixelRatio,this.sourceLayerIndex=o.sourceLayerIndex,this.hasPattern=!1,this.hasRTLText=!1,this.fullyClipped=!1,this.sortKeyRanges=[],this.collisionCircleArray=[],this.placementInvProjMatrix=Ma([]),this.placementViewportMatrix=Ma([]);const a=this.layers[0]._unevaluatedLayout._values;this.textSizeData=Jm(this.zoom,a["text-size"]),this.iconSizeData=Jm(this.zoom,a["icon-size"]);const u=this.layers[0].layout,f=u.get("symbol-sort-key"),g=u.get("symbol-z-order");this.canOverlap=u.get("text-allow-overlap")||u.get("icon-allow-overlap")||u.get("text-ignore-placement")||u.get("icon-ignore-placement"),this.sortFeaturesByKey="viewport-y"!==g&&void 0!==f.constantOr(1),this.sortFeaturesByY=("viewport-y"===g||"auto"===g&&!this.sortFeaturesByKey)&&this.canOverlap,this.writingModes=u.get("text-writing-mode").map(v=>$r[v]),this.stateDependentLayerIds=this.layers.filter(v=>v.isStateDependent()).map(v=>v.id),this.sourceID=o.sourceID,this.projection=o.projection}createArrays(){this.text=new wg(new Xc(this.layers,this.zoom,o=>/^text/.test(o))),this.icon=new wg(new Xc(this.layers,this.zoom,o=>/^icon/.test(o))),this.glyphOffsetArray=new qt,this.lineVertexArray=new Dm,this.symbolInstances=new H0}calculateGlyphDependencies(o,a,u,f,g){for(let v=0;v0)&&("constant"!==M.value.kind||M.value.value.length>0),P="constant"!==A.value.kind||!!A.value.value||Object.keys(A.parameters).length>0,B=v.get("symbol-sort-key");if(this.features=[],!R&&!P)return;const N=a.iconDependencies,U=a.glyphDependencies,Z=a.availableImages,re=new Te(this.zoom);for(const{feature:pe,id:oe,index:ue,sourceLayerIndex:ye}of o){const fe=g._featureFilter.needGeometry,He=gh(pe,fe);if(!g._featureFilter.filter(re,He,u))continue;if(fe||(He.geometry=sc(pe,u,f)),x&&1!==pe.type&&u.z<=5){const Ue=He.geometry,lt=.98078528056,dt=(pt,et)=>os(df(pt.x,pt.y,u,1),df(et.x,et.y,u,1))=0;for(const dt of je.sections)if(dt.image)N[dt.image.name]=!0;else{const pt=E(je.toString()),et=dt.fontStack||Ue,qe=U[et]=U[et]||{};this.calculateGlyphDependencies(dt.text,qe,lt,this.allowVerticalPlacement,pt)}}}"line"===v.get("symbol-placement")&&(this.features=function(pe){const oe={},ue={},ye=[];let fe=0;function He(Ue){ye.push(pe[Ue]),fe++}function je(Ue,lt,dt){const pt=ue[Ue];return delete ue[Ue],ue[lt]=pt,ye[pt].geometry[0].pop(),ye[pt].geometry[0]=ye[pt].geometry[0].concat(dt[0]),pt}function nt(Ue,lt,dt){const pt=oe[lt];return delete oe[lt],oe[Ue]=pt,ye[pt].geometry[0].shift(),ye[pt].geometry[0]=dt[0].concat(ye[pt].geometry[0]),pt}function xt(Ue,lt,dt){const pt=dt?lt[0][lt[0].length-1]:lt[0][0];return`${Ue}:${pt.x}:${pt.y}`}for(let Ue=0;UeUe.geometry)}(this.features)),this.sortFeaturesByKey&&this.features.sort((pe,oe)=>pe.sortKey-oe.sortKey)}update(o,a,u,f){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(o,a,this.layers,u,f),this.icon.programConfigurations.updatePaintArrays(o,a,this.layers,u,f))}isEmpty(){return 0===this.symbolInstances.length&&!this.hasRTLText}uploadPending(){return!this.uploaded||this.text.programConfigurations.needsUpload||this.icon.programConfigurations.needsUpload}upload(o){!this.uploaded&&this.hasDebugData()&&(this.textCollisionBox.upload(o),this.iconCollisionBox.upload(o)),this.text.upload(o,this.sortFeaturesByY,!this.uploaded,this.text.programConfigurations.needsUpload),this.icon.upload(o,this.sortFeaturesByY,!this.uploaded,this.icon.programConfigurations.needsUpload),this.uploaded=!0}destroyDebugData(){this.textCollisionBox.destroy(),this.iconCollisionBox.destroy()}getProjection(){return this.projectionInstance||(this.projectionInstance=vg(this.projection)),this.projectionInstance}destroy(){this.text.destroy(),this.icon.destroy(),this.hasDebugData()&&this.destroyDebugData()}addToLineVertexArray(o,a){const u=this.lineVertexArray.length;if(void 0!==o.segment)for(const{x:f,y:g}of a)this.lineVertexArray.emplaceBack(f,g);return{lineStartIndex:u,lineLength:this.lineVertexArray.length-u}}addSymbols(o,a,u,f,g,v,x,M,D,A,R,P,B,N){const U=o.indexArray,Z=o.layoutVertexArray,re=o.globeExtVertexArray,pe=o.segments.prepareSegment(4*a.length,Z,U,this.canOverlap?v.sortKey:void 0),oe=this.glyphOffsetArray.length,ue=pe.vertexLength,ye=this.allowVerticalPlacement&&x===$r.vertical?Math.PI/2:0,fe=v.text&&v.text.sections;for(let je=0;je=0?a.rightJustifiedTextSymbolIndex:a.centerJustifiedTextSymbolIndex>=0?a.centerJustifiedTextSymbolIndex:a.leftJustifiedTextSymbolIndex>=0?a.leftJustifiedTextSymbolIndex:a.verticalPlacedTextSymbolIndex>=0?a.verticalPlacedTextSymbolIndex:f),v=eg(this.textSizeData,o,g)/24;return this.tilePixelRatio*v}getSymbolInstanceIconSize(o,a,u){const f=this.icon.placedSymbolArray.get(u),g=eg(this.iconSizeData,o,f);return this.tilePixelRatio*g}_commitDebugCollisionVertexUpdate(o,a,u){o.emplaceBack(a,-u,-u),o.emplaceBack(a,u,-u),o.emplaceBack(a,u,u),o.emplaceBack(a,-u,u)}_updateTextDebugCollisionBoxes(o,a,u,f,g,v){for(let x=f;x0}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(o,a){const u=o.placedSymbolArray.get(a),f=u.vertexStartIndex+4*u.numGlyphs;for(let g=u.vertexStartIndex;gf[x]-f[M]||g[M]-g[x]),v}addToSortKeyRanges(o,a){const u=this.sortKeyRanges[this.sortKeyRanges.length-1];u&&u.sortKey===a?u.symbolInstanceEnd=o+1:this.sortKeyRanges.push({sortKey:a,symbolInstanceStart:o,symbolInstanceEnd:o+1})}sortFeatures(o){if(this.sortFeaturesByY&&this.sortedAngle!==o&&!(this.text.segments.get().length>1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(o),this.sortedAngle=o,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(const a of this.symbolInstanceIndexes){const u=this.symbolInstances.get(a);this.featureSortOrder.push(u.featureIndex);const{rightJustifiedTextSymbolIndex:f,centerJustifiedTextSymbolIndex:g,leftJustifiedTextSymbolIndex:v,verticalPlacedTextSymbolIndex:x,placedIconSymbolIndex:M,verticalPlacedIconSymbolIndex:D}=u;f>=0&&this.addIndicesForPlacedSymbol(this.text,f),g>=0&&g!==f&&this.addIndicesForPlacedSymbol(this.text,g),v>=0&&v!==g&&v!==f&&this.addIndicesForPlacedSymbol(this.text,v),x>=0&&this.addIndicesForPlacedSymbol(this.text,x),M>=0&&this.addIndicesForPlacedSymbol(this.icon,M),D>=0&&this.addIndicesForPlacedSymbol(this.icon,D)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}}}Wt(ru,"SymbolBucket",{omit:["layers","collisionBoxArray","features","compareText"]}),ru.MAX_GLYPHS=65535,ru.addDynamicAttributes=_f;const lM=new hn({"symbol-placement":new ke(at.layout_symbol["symbol-placement"]),"symbol-spacing":new ke(at.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new ke(at.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new Qe(at.layout_symbol["symbol-sort-key"]),"symbol-z-order":new ke(at.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new ke(at.layout_symbol["icon-allow-overlap"]),"icon-ignore-placement":new ke(at.layout_symbol["icon-ignore-placement"]),"icon-optional":new ke(at.layout_symbol["icon-optional"]),"icon-rotation-alignment":new ke(at.layout_symbol["icon-rotation-alignment"]),"icon-size":new Qe(at.layout_symbol["icon-size"]),"icon-text-fit":new ke(at.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new ke(at.layout_symbol["icon-text-fit-padding"]),"icon-image":new Qe(at.layout_symbol["icon-image"]),"icon-rotate":new Qe(at.layout_symbol["icon-rotate"]),"icon-padding":new ke(at.layout_symbol["icon-padding"]),"icon-keep-upright":new ke(at.layout_symbol["icon-keep-upright"]),"icon-offset":new Qe(at.layout_symbol["icon-offset"]),"icon-anchor":new Qe(at.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new ke(at.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new ke(at.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new ke(at.layout_symbol["text-rotation-alignment"]),"text-field":new Qe(at.layout_symbol["text-field"]),"text-font":new Qe(at.layout_symbol["text-font"]),"text-size":new Qe(at.layout_symbol["text-size"]),"text-max-width":new Qe(at.layout_symbol["text-max-width"]),"text-line-height":new Qe(at.layout_symbol["text-line-height"]),"text-letter-spacing":new Qe(at.layout_symbol["text-letter-spacing"]),"text-justify":new Qe(at.layout_symbol["text-justify"]),"text-radial-offset":new Qe(at.layout_symbol["text-radial-offset"]),"text-variable-anchor":new ke(at.layout_symbol["text-variable-anchor"]),"text-anchor":new Qe(at.layout_symbol["text-anchor"]),"text-max-angle":new ke(at.layout_symbol["text-max-angle"]),"text-writing-mode":new ke(at.layout_symbol["text-writing-mode"]),"text-rotate":new Qe(at.layout_symbol["text-rotate"]),"text-padding":new ke(at.layout_symbol["text-padding"]),"text-keep-upright":new ke(at.layout_symbol["text-keep-upright"]),"text-transform":new Qe(at.layout_symbol["text-transform"]),"text-offset":new Qe(at.layout_symbol["text-offset"]),"text-allow-overlap":new ke(at.layout_symbol["text-allow-overlap"]),"text-ignore-placement":new ke(at.layout_symbol["text-ignore-placement"]),"text-optional":new ke(at.layout_symbol["text-optional"])});var vs={paint:new hn({"icon-opacity":new Qe(at.paint_symbol["icon-opacity"]),"icon-color":new Qe(at.paint_symbol["icon-color"]),"icon-halo-color":new Qe(at.paint_symbol["icon-halo-color"]),"icon-halo-width":new Qe(at.paint_symbol["icon-halo-width"]),"icon-halo-blur":new Qe(at.paint_symbol["icon-halo-blur"]),"icon-translate":new ke(at.paint_symbol["icon-translate"]),"icon-translate-anchor":new ke(at.paint_symbol["icon-translate-anchor"]),"text-opacity":new Qe(at.paint_symbol["text-opacity"]),"text-color":new Qe(at.paint_symbol["text-color"],{runtimeType:ds,getOverride:l=>l.textColor,hasOverride:l=>!!l.textColor}),"text-halo-color":new Qe(at.paint_symbol["text-halo-color"]),"text-halo-width":new Qe(at.paint_symbol["text-halo-width"]),"text-halo-blur":new Qe(at.paint_symbol["text-halo-blur"]),"text-translate":new ke(at.paint_symbol["text-translate"]),"text-translate-anchor":new ke(at.paint_symbol["text-translate-anchor"])}),layout:lM};class Qy{constructor(o){this.type=o.property.overrides?o.property.overrides.runtimeType:mr,this.defaultValue=o}evaluate(o){if(o.formattedSection){const a=this.defaultValue.property.overrides;if(a&&a.hasOverride(o.formattedSection))return a.getOverride(o.formattedSection)}return o.feature&&o.featureState?this.defaultValue.evaluate(o.feature,o.featureState):this.defaultValue.property.specification.default}eachChild(o){this.defaultValue.isConstant()||o(this.defaultValue.value._styleExpression.expression)}outputDefined(){return!1}serialize(){return null}}Wt(Qy,"FormatSectionOverride",{omit:["defaultValue"]});class Mg extends kr{constructor(o){super(o,vs)}recalculate(o,a){super.recalculate(o,a),"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"]=this.layout.get("text-rotation-alignment")),"auto"===this.layout.get("icon-pitch-alignment")&&(this.layout._values["icon-pitch-alignment"]=this.layout.get("icon-rotation-alignment"));const u=this.layout.get("text-writing-mode");if(u){const f=[];for(const g of u)f.indexOf(g)<0&&f.push(g);this.layout._values["text-writing-mode"]=f}else this.layout._values["text-writing-mode"]="point"===this.layout.get("symbol-placement")?["horizontal"]:["horizontal","vertical"];this._setPaintOverrides()}getValueAndResolveTokens(o,a,u,f){const g=this.layout.get(o).evaluate(a,{},u,f),v=this._unevaluatedLayout._values[o];return v.isDataDriven()||Vu(v.value)||!g?g:(x=a.properties,g.replace(/{([^{}]+)}/g,(D,A)=>A in x?String(x[A]):""));var x}createBucket(o){return new ru(o)}queryRadius(){return 0}queryIntersectsFeature(){return!1}_setPaintOverrides(){for(const o of vs.paint.overridableProperties){if(!Mg.hasPaintOverride(this.layout,o))continue;const a=this.paint.get(o),u=new Qy(a),f=new es(u,a.property.specification);let g=null;g="constant"===a.value.kind||"source"===a.value.kind?new _l("source",f):new ih("composite",f,a.value.zoomStops,a.value._interpolationType),this.paint._values[o]=new gt(a.property,g,a.parameters)}}_handleOverridablePaintPropertyUpdate(o,a,u){return!(!this.layout||a.isDataDriven()||u.isDataDriven())&&Mg.hasPaintOverride(this.layout,o)}static hasPaintOverride(o,a){const u=o.get("text-field"),f=vs.paint.properties[a];let g=!1;const v=x=>{for(const M of x)if(f.overrides&&f.overrides.hasOverride(M))return void(g=!0)};if("constant"===u.value.kind&&u.value.value instanceof vr)v(u.value.value.sections);else if("source"===u.value.kind){const x=D=>{g||(D instanceof Pu&&Vr(D.value)===ni?v(D.value.sections):D instanceof Wd?v(D.sections):D.eachChild(x))},M=u.value;M._styleExpression&&x(M._styleExpression.expression)}return g}getProgramConfiguration(o){return new Ps(this,o)}}var RT={paint:new hn({"background-color":new ke(at.paint_background["background-color"]),"background-pattern":new ke(at.paint_background["background-pattern"]),"background-opacity":new ke(at.paint_background["background-opacity"])})},Jy={paint:new hn({"raster-opacity":new ke(at.paint_raster["raster-opacity"]),"raster-hue-rotate":new ke(at.paint_raster["raster-hue-rotate"]),"raster-brightness-min":new ke(at.paint_raster["raster-brightness-min"]),"raster-brightness-max":new ke(at.paint_raster["raster-brightness-max"]),"raster-saturation":new ke(at.paint_raster["raster-saturation"]),"raster-contrast":new ke(at.paint_raster["raster-contrast"]),"raster-resampling":new ke(at.paint_raster["raster-resampling"]),"raster-fade-duration":new ke(at.paint_raster["raster-fade-duration"])})};class dx extends kr{constructor(o){super(o,{}),this.implementation=o}is3D(){return"3d"===this.implementation.renderingMode}hasOffscreenPass(){return void 0!==this.implementation.prerender}recalculate(){}updateTransitions(){}hasTransition(){return!1}serialize(){}onAdd(o){this.implementation.onAdd&&this.implementation.onAdd(o,o.painter.context.gl)}onRemove(o){this.implementation.onRemove&&this.implementation.onRemove(o,o.painter.context.gl)}}var cM={paint:new hn({"sky-type":new ke(at.paint_sky["sky-type"]),"sky-atmosphere-sun":new ke(at.paint_sky["sky-atmosphere-sun"]),"sky-atmosphere-sun-intensity":new ke(at.paint_sky["sky-atmosphere-sun-intensity"]),"sky-gradient-center":new ke(at.paint_sky["sky-gradient-center"]),"sky-gradient-radius":new ke(at.paint_sky["sky-gradient-radius"]),"sky-gradient":new Qt(at.paint_sky["sky-gradient"]),"sky-atmosphere-halo-color":new ke(at.paint_sky["sky-atmosphere-halo-color"]),"sky-atmosphere-color":new ke(at.paint_sky["sky-atmosphere-color"]),"sky-opacity":new ke(at.paint_sky["sky-opacity"])})};function ev(l,o,a){const u=[0,0,1],f=Vm([]);return xh(f,f,a?-ot(l)+Math.PI:ot(l)),ub(f,f,-ot(o)),ab(u,u,f),tr(u,u)}const uM={circle:class extends kr{constructor(l){super(l,DT)}createBucket(l){return new K0(l)}queryRadius(l){const o=l;return Kc("circle-radius",this,o)+Kc("circle-stroke-width",this,o)+oy(this.paint.get("circle-translate"))}queryIntersectsFeature(l,o,a,u,f,g,v,x){const M=Lm(this.paint.get("circle-translate"),this.paint.get("circle-translate-anchor"),g.angle,l.pixelToTileUnitsFactor),D=this.paint.get("circle-radius").evaluate(o,a)+this.paint.get("circle-stroke-width").evaluate(o,a);return sd(l,u,g,v,x,"map"===this.paint.get("circle-pitch-alignment"),"map"===this.paint.get("circle-pitch-scale"),M,D)}getProgramIds(){return["circle"]}getProgramConfiguration(l){return new Ps(this,l)}},heatmap:class extends kr{createBucket(l){return new db(l)}constructor(l){super(l,fb),this._updateColorRamp()}_handleSpecialPaintPropertyUpdate(l){"heatmap-color"===l&&this._updateColorRamp()}_updateColorRamp(){this.colorRamp=Vp({expression:this._transitionablePaint._values["heatmap-color"].value.expression,evaluationKey:"heatmapDensity",image:this.colorRamp}),this.colorRampTexture=null}resize(){this.heatmapFbo&&(this.heatmapFbo.destroy(),this.heatmapFbo=null)}queryRadius(l){return Kc("heatmap-radius",this,l)}queryIntersectsFeature(l,o,a,u,f,g,v,x){const M=this.paint.get("heatmap-radius").evaluate(o,a);return sd(l,u,g,v,x,!0,!0,new Ee(0,0),M)}hasOffscreenPass(){return 0!==this.paint.get("heatmap-opacity")&&"none"!==this.visibility}getProgramIds(){return["heatmap","heatmapTexture"]}getProgramConfiguration(l){return new Ps(this,l)}},hillshade:class extends kr{constructor(l){super(l,mb)}hasOffscreenPass(){return 0!==this.paint.get("hillshade-exaggeration")&&"none"!==this.visibility}getProgramIds(){return["hillshade","hillshadePrepare"]}},fill:class extends kr{constructor(l){super(l,T1)}getProgramIds(){const l=this.paint.get("fill-pattern"),o=l&&l.constantOr(1),a=[o?"fillPattern":"fill"];return this.paint.get("fill-antialias")&&a.push(o&&!this.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline"),a}getProgramConfiguration(l){return new Ps(this,l)}recalculate(l,o){super.recalculate(l,o);const a=this.paint._values["fill-outline-color"];"constant"===a.value.kind&&void 0===a.value.value&&(this.paint._values["fill-outline-color"]=this.paint._values["fill-color"])}createBucket(l){return new $m(l)}queryRadius(){return oy(this.paint.get("fill-translate"))}queryIntersectsFeature(l,o,a,u,f,g){return!l.queryGeometry.isAboveHorizon&&J0(v1(l.tilespaceGeometry,this.paint.get("fill-translate"),this.paint.get("fill-translate-anchor"),g.angle,l.pixelToTileUnitsFactor),u)}isTileClipped(){return!0}},"fill-extrusion":class extends kr{constructor(l){super(l,Ay)}createBucket(l){return new Zp(l)}queryRadius(){return oy(this.paint.get("fill-extrusion-translate"))}is3D(){return!0}getProgramIds(){return[this.paint.get("fill-extrusion-pattern").constantOr(1)?"fillExtrusionPattern":"fillExtrusion"]}getProgramConfiguration(l){return new Ps(this,l)}queryIntersectsFeature(l,o,a,u,f,g,v,x,M){const D=Lm(this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),g.angle,l.pixelToTileUnitsFactor),A=this.paint.get("fill-extrusion-height").evaluate(o,a),R=this.paint.get("fill-extrusion-base").evaluate(o,a),P=[0,0],B=x&&g.elevation,N=g.elevation?g.elevation.exaggeration():1,U=l.tile.getBucket(this);if(B&&U instanceof Zp){const ue=U.centroidVertexArray,ye=M+1;yeue.polygon).flat());const Z=B?x:null,[re,pe]=(ye=u,fe=R,He=A,je=D,nt=v,xt=Z,Ue=P,lt=N,dt=g.center.lat,"globe"===(ue=g).projection.name?function(et,qe,kt,ln,Ft,Xt,Rt,pn,Hn,jn,Xn){const bn=[],Ti=[],An=et.projection.upVectorScale(Xn,et.center.lat,et.worldSize).metersToTile,Jn=[0,0,0,1],Oi=[0,0,0,1],nr=(ir,ur,wr,Mt)=>{ir[0]=ur,ir[1]=wr,ir[2]=Mt,ir[3]=1},Zi=F1();kt>0&&(kt+=Zi),ln+=Zi;for(const ir of qe){const ur=[],wr=[];for(const Mt of ir){const Fi=Mt.x+Ft.x,sr=Mt.y+Ft.y,Ae=et.projection.projectTilePoint(Fi,sr,Xn),ui=et.projection.upVector(Xn,Mt.x,Mt.y);let _r=kt,se=ln;if(Rt){const he=ky(Fi,sr,kt,ln,Rt,pn,Hn,jn);_r+=he.base,se+=he.top}0!==kt?nr(Jn,Ae.x+ui[0]*An*_r,Ae.y+ui[1]*An*_r,Ae.z+ui[2]*An*_r):nr(Jn,Ae.x,Ae.y,Ae.z),nr(Oi,Ae.x+ui[0]*An*se,Ae.y+ui[1]*An*se,Ae.z+ui[2]*An*se),xr(Jn,Jn,Xt),xr(Oi,Oi,Xt),ur.push(new Eh(Jn[0],Jn[1],Jn[2])),wr.push(new Eh(Oi[0],Oi[1],Oi[2]))}bn.push(ur),Ti.push(wr)}return[bn,Ti]}(ue,ye,fe,He,je,nt,xt,Ue,lt,dt,l.tileID.canonical):xt?function(et,qe,kt,ln,Ft,Xt,Rt,pn,Hn){const jn=[],Xn=[],bn=[0,0,0,1];for(const Ti of et){const An=[],Jn=[];for(const Oi of Ti){const nr=Oi.x+ln.x,Zi=Oi.y+ln.y,ir=ky(nr,Zi,qe,kt,Xt,Rt,pn,Hn);bn[0]=nr,bn[1]=Zi,bn[2]=ir.base,bn[3]=1,od(bn,bn,Ft),bn[3]=Math.max(bn[3],1e-5);const ur=new Eh(bn[0]/bn[3],bn[1]/bn[3],bn[2]/bn[3]);bn[0]=nr,bn[1]=Zi,bn[2]=ir.top,bn[3]=1,od(bn,bn,Ft),bn[3]=Math.max(bn[3],1e-5);const wr=new Eh(bn[0]/bn[3],bn[1]/bn[3],bn[2]/bn[3]);An.push(ur),Jn.push(wr)}jn.push(An),Xn.push(Jn)}return[jn,Xn]}(ye,fe,He,je,nt,xt,Ue,lt,dt):function(et,qe,kt,ln,Ft){const Xt=[],Rt=[],pn=Ft[8]*qe,Hn=Ft[9]*qe,jn=Ft[10]*qe,Xn=Ft[11]*qe,bn=Ft[8]*kt,Ti=Ft[9]*kt,An=Ft[10]*kt,Jn=Ft[11]*kt;for(const Oi of et){const nr=[],Zi=[];for(const ir of Oi){const ur=ir.x+ln.x,wr=ir.y+ln.y,Mt=Ft[0]*ur+Ft[4]*wr+Ft[12],Fi=Ft[1]*ur+Ft[5]*wr+Ft[13],sr=Ft[2]*ur+Ft[6]*wr+Ft[14],Ae=Ft[3]*ur+Ft[7]*wr+Ft[15],ui=Mt+pn,_r=Fi+Hn,se=sr+jn,he=Math.max(Ae+Xn,1e-5),ut=Mt+bn,$o=Fi+Ti,Li=sr+An,Bi=Math.max(Ae+Jn,1e-5);nr.push(new Eh(ui/he,_r/he,se/he)),Zi.push(new Eh(ut/Bi,$o/Bi,Li/Bi))}Xt.push(nr),Rt.push(Zi)}return[Xt,Rt]}(ye,fe,He,je,nt)),oe=l.queryGeometry;var ue,ye,fe,He,je,nt,xt,Ue,lt,dt;return function(ue,ye,fe){let He=1/0;J0(fe,ye)&&(He=Tb(fe,ye[0]));for(let je=0;je=3)for(let N=0;N{this._triggered=!1,this._callback()})}trigger(){this._triggered||(this._triggered=!0,this._channel?this._channel.port1.postMessage(!0):setTimeout(()=>{this._triggered=!1,this._callback()},0))}remove(){this._channel=void 0,this._callback=()=>{}}}class hM{constructor(){this.tasks={},this.taskQueue=[],ca(["process"],this),this.invoker=new dM(this.process),this.nextId=0}add(o,a){const u=this.nextId++,f=function({type:g,isSymbolTile:v,zoom:x}){return x=x||0,"message"===g?0:"maybePrepare"!==g||v?"parseTile"!==g||v?"parseTile"===g&&v?300-x:"maybePrepare"===g&&v?400-x:500:200-x:100-x}(a);if(0===f){da();try{o()}finally{}return{cancel:()=>{}}}return this.tasks[u]={fn:o,metadata:a,priority:f,id:u},this.taskQueue.push(u),this.invoker.trigger(),{cancel:()=>{delete this.tasks[u]}}}process(){da();try{if(this.taskQueue=this.taskQueue.filter(u=>!!this.tasks[u]),!this.taskQueue.length)return;const o=this.pick();if(null===o)return;const a=this.tasks[o];if(delete this.tasks[o],this.taskQueue.length&&this.invoker.trigger(),!a)return;a.fn()}finally{}}pick(){let o=null,a=1/0;for(let f=0;f>=1)>1;){const D=a+f>>1,A=u+g>>1;1&o?(f=a,g=u,a=v,u=x):(a=f,u=g,f=v,g=x),v=D,x=A}const M=4*l;ou[M+0]=a,ou[M+1]=u,ou[M+2]=f,ou[M+3]=g}const vo=new Uint16Array(2178),Tl=new Uint8Array(1089),Dg=new Uint16Array(1089);function px(l){return 0===l?-.03125:32===l?.03125:0}var tv=Ht([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]);const fx={type:2,extent:wn,loadGeometry:()=>[[new Ee(0,0),new Ee(8193,0),new Ee(8193,8193),new Ee(0,8193),new Ee(0,0)]]};class nv{constructor(o,a,u,f,g){this.tileID=o,this.uid=Nl(),this.uses=0,this.tileSize=a,this.tileZoom=u,this.buckets={},this.expirationTime=null,this.queryPadding=0,this.hasSymbolBuckets=!1,this.hasRTLText=!1,this.dependencies={},this.isRaster=g,this.expiredRequestCount=0,this.state="loading",f&&f.transform&&(this.projection=f.transform.projection)}registerFadeDuration(o){const a=o+this.timeAdded;ag.getLayer(D)).filter(Boolean);if(0!==M.length){x.layers=M,x.stateDependentLayerIds&&(x.stateDependentLayers=x.stateDependentLayerIds.map(D=>M.filter(A=>A.id===D)[0]));for(const D of M)v[D.id]=x}}return v}(o.buckets,a.style),this.hasSymbolBuckets=!1;for(const f in this.buckets){const g=this.buckets[f];if(g instanceof ru){if(this.hasSymbolBuckets=!0,!u)break;g.justReloaded=!0}}if(this.hasRTLText=!1,this.hasSymbolBuckets)for(const f in this.buckets){const g=this.buckets[f];if(g instanceof ru&&g.hasRTLText){this.hasRTLText=!0,ze.isLoading()||ze.isLoaded()||"deferred"!==Me()||We();break}}this.queryPadding=0;for(const f in this.buckets){const g=this.buckets[f];this.queryPadding=Math.max(this.queryPadding,a.style.getLayer(f).queryRadius(g))}o.imageAtlas&&(this.imageAtlas=o.imageAtlas),o.glyphAtlasImage&&(this.glyphAtlasImage=o.glyphAtlasImage),o.lineAtlas&&(this.lineAtlas=o.lineAtlas)}else this.collisionBoxArray=new W_}unloadVectorData(){if(this.hasData()){for(const o in this.buckets)this.buckets[o].destroy();this.buckets={},this.imageAtlas&&(this.imageAtlas=null),this.lineAtlas&&(this.lineAtlas=null),this.imageAtlasTexture&&this.imageAtlasTexture.destroy(),this.glyphAtlasTexture&&this.glyphAtlasTexture.destroy(),this.lineAtlasTexture&&this.lineAtlasTexture.destroy(),this._tileBoundsBuffer&&(this._tileBoundsBuffer.destroy(),this._tileBoundsIndexBuffer.destroy(),this._tileBoundsSegments.destroy(),this._tileBoundsBuffer=null),this._tileDebugBuffer&&(this._tileDebugBuffer.destroy(),this._tileDebugSegments.destroy(),this._tileDebugBuffer=null),this._tileDebugIndexBuffer&&(this._tileDebugIndexBuffer.destroy(),this._tileDebugIndexBuffer=null),this._globeTileDebugBorderBuffer&&(this._globeTileDebugBorderBuffer.destroy(),this._globeTileDebugBorderBuffer=null),this._tileDebugTextBuffer&&(this._tileDebugTextBuffer.destroy(),this._tileDebugTextSegments.destroy(),this._tileDebugTextIndexBuffer.destroy(),this._tileDebugTextBuffer=null),this._globeTileDebugTextBuffer&&(this._globeTileDebugTextBuffer.destroy(),this._globeTileDebugTextBuffer=null),this.latestFeatureIndex=null,this.state="unloaded"}}getBucket(o){return this.buckets[o.id]}upload(o){for(const u in this.buckets){const f=this.buckets[u];f.uploadPending()&&f.upload(o)}const a=o.gl;this.imageAtlas&&!this.imageAtlas.uploaded&&(this.imageAtlasTexture=new Gh(o,this.imageAtlas.image,a.RGBA),this.imageAtlas.uploaded=!0),this.glyphAtlasImage&&(this.glyphAtlasTexture=new Gh(o,this.glyphAtlasImage,a.ALPHA),this.glyphAtlasImage=null),this.lineAtlas&&!this.lineAtlas.uploaded&&(this.lineAtlasTexture=new Gh(o,this.lineAtlas.image,a.ALPHA),this.lineAtlas.uploaded=!0)}prepare(o){this.imageAtlas&&this.imageAtlas.patchUpdatedImages(o,this.imageAtlasTexture)}queryRenderedFeatures(o,a,u,f,g,v,x,M){return this.latestFeatureIndex&&this.latestFeatureIndex.rawTileData?this.latestFeatureIndex.query({tileResult:f,pixelPosMatrix:x,transform:v,params:g,tileTransform:this.tileTransform},o,a,u):{}}querySourceFeatures(o,a){const u=this.latestFeatureIndex;if(!u||!u.rawTileData)return;const f=u.loadVTLayers(),g=a?a.sourceLayer:"",v=f._geojsonTileLayer||f[g];if(!v)return;const x=yl(a&&a.filter),{z:M,x:D,y:A}=this.tileID.canonical,R={z:M,x:D,y:A};for(let P=0;Pu)f=!1;else if(a)if(this.expirationTime=0;Z--){const re=4*Z,pe=ou[re+0],oe=ou[re+1],ue=ou[re+2],ye=ou[re+3],fe=pe+ue>>1,He=oe+ye>>1,je=fe+He-oe,nt=He+pe-fe,xt=33*oe+pe,Ue=33*ye+ue,lt=33*He+fe,dt=Math.hypot((vo[2*xt+0]+vo[2*Ue+0])/2-vo[2*lt+0],(vo[2*xt+1]+vo[2*Ue+1])/2-vo[2*lt+1])>=16;Tl[lt]=Tl[lt]||(dt?1:0),Z<1022&&(Tl[lt]=Tl[lt]||Tl[33*(oe+nt>>1)+(pe+je>>1)]||Tl[33*(ye+nt>>1)+(ue+je>>1)])}const R=new xi,P=new to;let B=0;function N(Z,re){const pe=33*re+Z;return 0===Dg[pe]&&(R.emplaceBack(vo[2*pe+0],vo[2*pe+1],Z*wn/32,re*wn/32),Dg[pe]=++B),Dg[pe]-1}function U(Z,re,pe,oe,ue,ye){const fe=Z+pe>>1,He=re+oe>>1;if(Math.abs(Z-ue)+Math.abs(re-ye)>1&&Tl[33*He+fe])U(ue,ye,Z,re,fe,He),U(pe,oe,ue,ye,fe,He);else{const je=N(Z,re),nt=N(pe,oe),xt=N(ue,ye);P.emplaceBack(je,nt,xt)}}return U(0,0,32,32,32,0),U(32,32,0,0,0,32),{vertices:R,indices:P}}(this.tileID.canonical,a);f=v.vertices,g=v.indices}else{f=new xi,g=new to;for(const{x,y:M}of u)f.emplaceBack(x,M,0,0);const v=Gp.exports(f.int16,void 0,4);for(let x=0;x0&&(x=Fp(new Float64Array(16),a.globeMatrix)),this._makeGlobeTileDebugBorderBuffer(o,f,a,g,x,v),this._makeGlobeTileDebugTextBuffer(o,f,a,g,x,v)}_globePoint(o,a,u,f,g,v,x){let M=df(o,a,u);if(v){const D=1<.5?B=-1:P<-.5&&(B=1);let N=(o/wn+u.x)/D+B,U=(a/wn+u.y)/D;N=(N-A)*f._pixelsPerMercatorPixel+A,U=(U-R)*f._pixelsPerMercatorPixel+R;const Z=[N*f.worldSize,U*f.worldSize,0];xr(Z,Z,v),M=Fh(M,Z,x)}return xr(M,M,g)}_makeGlobeTileDebugBorderBuffer(o,a,u,f,g,v){const x=new _i,M=new Ap,D=new zi,A=(P,B,N,U,Z)=>{const re=(N-P)/(Z-1),pe=(U-B)/(Z-1),oe=x.length;for(let ue=0;ueA*P+B;for(let P=0;Po[v])return null}else{const x=1/u[v];let M=(l[v]-a[v])*x,D=(o[v]-a[v])*x;if(M>D){const A=M;M=D,D=A}if(M>f&&(f=M),Dg)return null}return f}function gx(l,o,a,u,f,g,v,x,M,D,A){const R=u-l,P=f-o,B=g-a,N=v-l,U=x-o,Z=M-a,re=A[1]*Z-A[2]*U,pe=A[2]*N-A[0]*Z,oe=A[0]*U-A[1]*N,ue=R*re+P*pe+B*oe;if(Math.abs(ue)<1e-15)return null;const ye=1/ue,fe=D[0]-l,He=D[1]-o,je=D[2]-a,nt=(fe*re+He*pe+je*oe)*ye;if(nt<0||nt>1)return null;const xt=He*B-je*P,Ue=je*R-fe*B,lt=fe*P-He*R,dt=(A[0]*xt+A[1]*Ue+A[2]*lt)*ye;return dt<0||nt+dt>1?null:(N*xt+U*Ue+Z*lt)*ye}function yf(l,o,a){return(l-o)/(a-o)}function Tg(l,o,a,u,f,g,v,x,M){const D=1<{const pe=Z?1:0,oe=(B+1)*U-pe,ue=N*U,ye=(N+1)*U-pe;re[0]=B*U,re[1]=ue,re[2]=oe,re[3]=ye};let R=new Eg(M);const P=[];for(let B=0;B=1;M/=2){const B=x[x.length-1];R=new Eg(M);for(let N=0;N0;){const{idx:N,t:U,nodex:Z,nodey:re,depth:pe}=B.pop();if(this.leaves[N]){Tg(Z,re,pe,o,a,u,f,R,P);const ue=1<=qe[2])return U}continue}let oe=0;for(let ue=0;ue=D[A[je]]&&(A.splice(je,0,ue),He=!0);He||(A[oe]=ue),oe++}}for(let ue=0;ue=this.dim+1||a<-1||a>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return(a+1)*this.stride+(o+1)}_unpackMapbox(o,a,u){return(256*o*256+256*a+u)/10-1e4}_unpackTerrarium(o,a,u){return 256*o+a+u/256-32768}static pack(o,a){const u=[0,0,0,0],f=bf.getUnpackVector(a);let g=Math.floor((o+f[3])/f[2]);return u[2]=g%256,g=Math.floor(g/256),u[1]=g%256,g=Math.floor(g/256),u[0]=g,u}getPixels(){return new Fs({width:this.stride,height:this.stride},this.pixels)}backfillBorder(o,a,u){if(this.dim!==o.dim)throw new Error("dem dimension mismatch");let f=a*this.dim,g=a*this.dim+this.dim,v=u*this.dim,x=u*this.dim+this.dim;switch(a){case-1:f=g-1;break;case 1:g=f+1}switch(u){case-1:v=x-1;break;case 1:x=v+1}const M=-a*this.dim,D=-u*this.dim;for(let A=v;A{this.remove(o,g)},u)),this.data[f].push(g),this.order.push(f),this.order.length>this.max){const v=this._getAndRemoveByKey(this.order[0]);v&&this.onRemove(v)}return this}has(o){return o.wrapped().key in this.data}getAndRemove(o){return this.has(o)?this._getAndRemoveByKey(o.wrapped().key):null}_getAndRemoveByKey(o){const a=this.data[o].shift();return a.timeout&&clearTimeout(a.timeout),0===this.data[o].length&&delete this.data[o],this.order.splice(this.order.indexOf(o),1),a.value}getByKey(o){const a=this.data[o];return a?a[0].value:null}get(o){return this.has(o)?this.data[o.wrapped().key][0].value:null}remove(o,a){if(!this.has(o))return this;const u=o.wrapped().key,f=void 0===a?0:this.data[u].indexOf(a),g=this.data[u][f];return this.data[u].splice(f,1),g.timeout&&clearTimeout(g.timeout),0===this.data[u].length&&delete this.data[u],this.onRemove(g.value),this.order.splice(this.order.indexOf(u),1),this}setMaxSize(o){for(this.max=o;this.order.length>this.max;){const a=this._getAndRemoveByKey(this.order[0]);a&&this.onRemove(a)}return this}filter(o){const a=[];for(const u in this.data)for(const f of this.data[u])o(f.value)||a.push(f);for(const u of a)this.remove(u.value.tileID,u)}}class pd{constructor(o,a,u){this.func=o,this.mask=a,this.range=u}}pd.ReadOnly=!1,pd.ReadWrite=!0,pd.disabled=new pd(519,pd.ReadOnly,[0,1]);class xf{constructor(o,a,u,f,g,v){this.test=o,this.ref=a,this.mask=u,this.fail=f,this.depthFail=g,this.pass=v}}xf.disabled=new xf({func:519,mask:0},0,0,7680,7680,7680);class Io{constructor(o,a,u){this.blendFunction=o,this.blendColor=a,this.mask=u}}Io.Replace=[1,0],Io.disabled=new Io(Io.Replace,Sr.transparent,[!1,!1,!1,!1]),Io.unblended=new Io(Io.Replace,Sr.transparent,[!0,!0,!0,!0]),Io.alphaBlended=new Io([1,771],Sr.transparent,[!0,!0,!0,!0]);class bs{constructor(o,a,u){this.enable=o,this.mode=a,this.frontFace=u}}bs.disabled=new bs(!1,1029,2305),bs.backCCW=new bs(!0,1029,2305),bs.backCW=new bs(!0,1029,2304),bs.frontCW=new bs(!0,1028,2304),bs.frontCCW=new bs(!0,1028,2305);class fd extends cs{constructor(o,a,u){super(),this.id=o,this._onlySymbols=u,a.on("data",f=>{"source"===f.dataType&&"metadata"===f.sourceDataType&&(this._sourceLoaded=!0),this._sourceLoaded&&!this._paused&&"source"===f.dataType&&"content"===f.sourceDataType&&(this.reload(),this.transform&&this.update(this.transform))}),a.on("error",()=>{this._sourceErrored=!0}),this._source=a,this._tiles={},this._cache=new _x(0,this._unloadTile.bind(this)),this._timers={},this._cacheTimers={},this._minTileCacheSize=a.minTileCacheSize,this._maxTileCacheSize=a.maxTileCacheSize,this._loadedParentTiles={},this._coveredTiles={},this._state=new fM,this._isRaster="raster"===this._source.type||"raster-dem"===this._source.type||"custom"===this._source.type&&"raster"===this._source._dataType}onAdd(o){this.map=o,this._minTileCacheSize=void 0===this._minTileCacheSize&&o?o._minTileCacheSize:this._minTileCacheSize,this._maxTileCacheSize=void 0===this._maxTileCacheSize&&o?o._maxTileCacheSize:this._maxTileCacheSize}loaded(){if(this._sourceErrored)return!0;if(!this._sourceLoaded||!this._source.loaded())return!1;for(const o in this._tiles){const a=this._tiles[o];if("loaded"!==a.state&&"errored"!==a.state)return!1}return!0}getSource(){return this._source}pause(){this._paused=!0}resume(){if(!this._paused)return;const o=this._shouldReloadOnResume;this._paused=!1,this._shouldReloadOnResume=!1,o&&this.reload(),this.transform&&this.update(this.transform)}_loadTile(o,a){return o.isSymbolTile=this._onlySymbols,this._source.loadTile(o,a)}_unloadTile(o){if(this._source.unloadTile)return this._source.unloadTile(o,()=>{})}_abortTile(o){if(this._source.abortTile)return this._source.abortTile(o,()=>{})}serialize(){return this._source.serialize()}prepare(o){this._source.prepare&&this._source.prepare(),this._state.coalesceChanges(this._tiles,this.map?this.map.painter:null);for(const a in this._tiles){const u=this._tiles[a];u.upload(o),u.prepare(this.map.style.imageManager)}}getIds(){return Ms(this._tiles).map(o=>o.tileID).sort(iv).map(o=>o.key)}getRenderableIds(o){const a=[];for(const u in this._tiles)this._isIdRenderable(+u,o)&&a.push(this._tiles[u]);return o?a.sort((u,f)=>{const g=u.tileID,v=f.tileID,x=new Ee(g.canonical.x,g.canonical.y)._rotate(this.transform.angle),M=new Ee(v.canonical.x,v.canonical.y)._rotate(this.transform.angle);return g.overscaledZ-v.overscaledZ||M.y-x.y||M.x-x.x}).map(u=>u.tileID.key):a.map(u=>u.tileID).sort(iv).map(u=>u.key)}hasRenderableParent(o){const a=this.findLoadedParent(o,0);return!!a&&this._isIdRenderable(a.tileID.key)}_isIdRenderable(o,a){return this._tiles[o]&&this._tiles[o].hasData()&&!this._coveredTiles[o]&&(a||!this._tiles[o].holdingForFade())}reload(){if(this._paused)this._shouldReloadOnResume=!0;else{this._cache.reset();for(const o in this._tiles)"errored"!==this._tiles[o].state&&this._reloadTile(+o,"reloading")}}_reloadTile(o,a){const u=this._tiles[o];u&&("loading"!==u.state&&(u.state=a),this._loadTile(u,this._tileLoaded.bind(this,u,o,a)))}_tileLoaded(o,a,u,f){if(f)if(o.state="errored",404!==f.status)this._source.fire(new Fa(f,{tile:o}));else if("raster-dem"===this._source.type&&this.usedForTerrain&&this.map.painter.terrain){const g=this.map.painter.terrain;this.update(this.transform,g.getScaledDemTileSize(),!0),g.resetTileLookupCache(this.id)}else this.update(this.transform);else o.timeAdded=an.now(),"expired"===u&&(o.refreshedUponExpiration=!0),this._setTileReloadTimer(a,o),"raster-dem"===this._source.type&&o.dem&&this._backfillDEM(o),this._state.initializeTileState(o,this.map?this.map.painter:null),this._source.fire(new pa("data",{dataType:"source",tile:o,coord:o.tileID,sourceCacheId:this.id}))}_backfillDEM(o){const a=this.getRenderableIds();for(let f=0;f1||(Math.abs(v)>1&&(1===Math.abs(v+M)?v+=M:1===Math.abs(v-M)&&(v-=M)),g.dem&&f.dem&&(f.dem.backfillBorder(g.dem,v,x),f.neighboringTiles&&f.neighboringTiles[D]&&(f.neighboringTiles[D].backfilled=!0)))}}getTile(o){return this.getTileByID(o.key)}getTileByID(o){return this._tiles[o]}_retainLoadedChildren(o,a,u,f){for(const g in this._tiles){let v=this._tiles[g];if(f[g]||!v.hasData()||v.tileID.overscaledZ<=a||v.tileID.overscaledZ>u)continue;let x=v.tileID;for(;v&&v.tileID.overscaledZ>a+1;){const D=v.tileID.scaledTo(v.tileID.overscaledZ-1);v=this._tiles[D.key],v&&v.hasData()&&(x=D)}let M=x;for(;M.overscaledZ>a;)if(M=M.scaledTo(M.overscaledZ-1),o[M.key]){f[x.key]=x;break}}}findLoadedParent(o,a){if(o.key in this._loadedParentTiles){const u=this._loadedParentTiles[o.key];return u&&u.tileID.overscaledZ>=a?u:null}for(let u=o.overscaledZ-1;u>=a;u--){const f=o.scaledTo(u),g=this._getLoadedTile(f);if(g)return g}}_getLoadedTile(o){const a=this._tiles[o.key];return a&&a.hasData()?a:this._cache.getByKey(this._source.reparseOverscaled?o.wrapped().key:o.canonical.key)}updateCacheSize(o,a){a=a||this._source.tileSize;const u=Math.ceil(o.width/a)+1,f=Math.ceil(o.height/a)+1,g=Math.floor(u*f*5),v="number"==typeof this._minTileCacheSize?Math.max(this._minTileCacheSize,g):g,x="number"==typeof this._maxTileCacheSize?Math.min(this._maxTileCacheSize,v):v;this._cache.setMaxSize(x)}handleWrapJump(o){const a=Math.round((o-(void 0===this._prevLng?o:this._prevLng))/360);if(this._prevLng=o,a){const u={};for(const f in this._tiles){const g=this._tiles[f];g.tileID=g.tileID.unwrapTo(g.tileID.wrap+a),u[g.tileID.key]=g}this._tiles=u;for(const f in this._timers)clearTimeout(this._timers[f]),delete this._timers[f];for(const f in this._tiles)this._setTileReloadTimer(+f,this._tiles[f])}}update(o,a,u){if(this.transform=o,!this._sourceLoaded||this._paused||this.transform.freezeTileCoverage||this.usedForTerrain&&!u)return;let f;this.updateCacheSize(o,a),"globe"!==this.transform.projection.name&&this.handleWrapJump(this.transform.center.lng),this._coveredTiles={},this.used||this.usedForTerrain?this._source.tileID?f=o.getVisibleUnwrappedCoordinates(this._source.tileID).map(x=>new jo(x.canonical.z,x.wrap,x.canonical.z,x.canonical.x,x.canonical.y)):(f=o.coveringTiles({tileSize:a||this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:this._source.roundZoom&&!u,reparseOverscaled:this._source.reparseOverscaled,isTerrainDEM:this.usedForTerrain}),this._source.hasTile&&(f=f.filter(x=>this._source.hasTile(x)))):f=[];const g=this._updateRetainedTiles(f);if(rv(this._source.type)&&0!==f.length){const x={},M={},D=Object.keys(g);for(const R of D){const P=g[R],B=this._tiles[R];if(!B||B.fadeEndTime&&B.fadeEndTime<=an.now())continue;const N=this.findLoadedParent(P,Math.max(P.overscaledZ-fd.maxOverzooming,this._source.minzoom));N&&(this._addTile(N.tileID),x[N.tileID.key]=N.tileID),M[R]=P}const A=f[f.length-1].overscaledZ;for(const R in this._tiles){const P=this._tiles[R];if(g[R]||!P.hasData())continue;let B=P.tileID;for(;B.overscaledZ>A;){B=B.scaledTo(B.overscaledZ-1);const N=this._tiles[B.key];if(N&&N.hasData()&&M[B.key]){g[R]=P.tileID;break}}}for(const R in x)g[R]||(this._coveredTiles[R]=!0,g[R]=x[R])}for(const x in g)this._tiles[x].clearFadeHold();const v=function(x,M){const D=[];for(const A in x)A in M||D.push(A);return D}(this._tiles,g);for(const x of v){const M=this._tiles[x];M.hasSymbolBuckets&&!M.holdingForFade()?M.setHoldDuration(this.map._fadeDuration):M.hasSymbolBuckets&&!M.symbolFadeFinished()||this._removeTile(+x)}this._updateLoadedParentTileCache(),this._onlySymbols&&this._source.afterUpdate&&this._source.afterUpdate()}releaseSymbolFadeTiles(){for(const o in this._tiles)this._tiles[o].holdingForFade()&&this._removeTile(+o)}_updateRetainedTiles(o){const a={};if(0===o.length)return a;const u={},f=o.reduce((D,A)=>Math.min(D,A.overscaledZ),1/0),g=o[0].overscaledZ,v=Math.max(g-fd.maxOverzooming,this._source.minzoom),x=Math.max(g+fd.maxUnderzooming,this._source.minzoom),M={};for(const D of o){const A=this._addTile(D);a[D.key]=D,A.hasData()||f=this._source.maxzoom){const P=D.children(this._source.maxzoom)[0],B=this.getTile(P);if(B&&B.hasData()){a[P.key]=P;continue}}else{const P=D.children(this._source.maxzoom);if(a[P[0].key]&&a[P[1].key]&&a[P[2].key]&&a[P[3].key])continue}let R=A.wasRequested();for(let P=D.overscaledZ-1;P>=v;--P){const B=D.scaledTo(P);if(u[B.key]||(u[B.key]=!0,A=this.getTile(B),!A&&R&&(A=this._addTile(B)),A&&(a[B.key]=B,R=A.wasRequested(),A.hasData())))break}}return a}_updateLoadedParentTileCache(){this._loadedParentTiles={};for(const o in this._tiles){const a=[];let u,f=this._tiles[o].tileID;for(;f.overscaledZ>0;){if(f.key in this._loadedParentTiles){u=this._loadedParentTiles[f.key];break}a.push(f.key);const g=f.scaledTo(f.overscaledZ-1);if(u=this._getLoadedTile(g),u)break;f=g}for(const g of a)this._loadedParentTiles[g]=u}}_addTile(o){let a=this._tiles[o.key];if(a)return a;a=this._cache.getAndRemove(o),a&&(this._setTileReloadTimer(o.key,a),a.tileID=o,this._state.initializeTileState(a,this.map?this.map.painter:null),this._cacheTimers[o.key]&&(clearTimeout(this._cacheTimers[o.key]),delete this._cacheTimers[o.key],this._setTileReloadTimer(o.key,a)));const u=Boolean(a);if(!u){const f=this.map?this.map.painter:null;a=new nv(o,this._source.tileSize*o.overscaleFactor(),this.transform.tileZoom,f,this._isRaster),this._loadTile(a,this._tileLoaded.bind(this,a,o.key,a.state))}return a?(a.uses++,this._tiles[o.key]=a,u||this._source.fire(new pa("dataloading",{tile:a,coord:a.tileID,dataType:"source"})),a):null}_setTileReloadTimer(o,a){o in this._timers&&(clearTimeout(this._timers[o]),delete this._timers[o]);const u=a.getExpiryTimeout();u&&(this._timers[o]=setTimeout(()=>{this._reloadTile(o,"expired"),delete this._timers[o]},u))}_removeTile(o){const a=this._tiles[o];a&&(a.uses--,delete this._tiles[o],this._timers[o]&&(clearTimeout(this._timers[o]),delete this._timers[o]),a.uses>0||(a.hasData()&&"reloading"!==a.state?this._cache.add(a.tileID,a,a.getExpiryTimeout()):(a.aborted=!0,this._abortTile(a),this._unloadTile(a))))}clearTiles(){this._shouldReloadOnResume=!1,this._paused=!1;for(const o in this._tiles)this._removeTile(+o);this._source._clear&&this._source._clear(),this._cache.reset(),this.map&&this.usedForTerrain&&this.map.painter.terrain&&this.map.painter.terrain.resetTileLookupCache(this.id)}tilesIn(o,a,u){const f=[],g=this.transform;if(!g)return f;const v="globe"===g.projection.name,x=bl(g.center.lng);for(const M in this._tiles){const D=this._tiles[M];if(u&&D.clearQueryDebugViz(),D.holdingForFade())continue;let A;if(v){const R=D.tileID.canonical;if(0===R.z){const P=[Math.abs(vn(x,...wf(R,-1))-x),Math.abs(vn(x,...wf(R,1))-x)];A=[0,2*P.indexOf(Math.min(...P))-1]}else{const P=[Math.abs(vn(x,...wf(R,-1))-x),Math.abs(vn(x,...wf(R,0))-x),Math.abs(vn(x,...wf(R,1))-x)];A=[P.indexOf(Math.min(...P))-1]}}else A=[0];for(const R of A){const P=o.containsTile(D,g,a,R);P&&f.push(P)}}return f}getVisibleCoordinates(o){const a=this.getRenderableIds(o).map(u=>this._tiles[u].tileID);for(const u of a)u.projMatrix=this.transform.calculateProjMatrix(u.toUnwrapped());return a}hasTransition(){if(this._source.hasTransition())return!0;if(rv(this._source.type))for(const o in this._tiles){const a=this._tiles[o];if(void 0!==a.fadeEndTime&&a.fadeEndTime>=an.now())return!0}return!1}setFeatureState(o,a,u){this._state.updateState(o=o||"_geojsonTileLayer",a,u)}removeFeatureState(o,a,u){this._state.removeFeatureState(o=o||"_geojsonTileLayer",a,u)}getFeatureState(o,a){return this._state.getState(o=o||"_geojsonTileLayer",a)}setDependencies(o,a,u){const f=this._tiles[o];f&&f.setDependencies(a,u)}reloadTilesForDependencies(o,a){for(const u in this._tiles)this._tiles[u].hasDependency(o,a)&&this._reloadTile(+u,"reloading");this._cache.filter(u=>!u.hasDependency(o,a))}_preloadTiles(o,a){const u=new Map,f=Array.isArray(o)?o:[o],g=this.map.painter.terrain,v=this.usedForTerrain&&g?g.getScaledDemTileSize():this._source.tileSize;for(const x of f){const M=x.coveringTiles({tileSize:v,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:this._source.roundZoom&&!this.usedForTerrain,reparseOverscaled:this._source.reparseOverscaled,isTerrainDEM:this.usedForTerrain});for(const D of M)u.set(D.key,D);this.usedForTerrain&&x.updateElevation(!1)}Yo(Array.from(u.values()),(x,M)=>{const D=new nv(x,this._source.tileSize*x.overscaleFactor(),this.transform.tileZoom,this.map.painter,this._isRaster);this._loadTile(D,A=>{"raster-dem"===this._source.type&&D.dem&&this._backfillDEM(D),M(A,D)})},a)}}function iv(l,o){const a=Math.abs(2*l.wrap)-+(l.wrap<0),u=Math.abs(2*o.wrap)-+(o.wrap<0);return l.overscaledZ-o.overscaledZ||u-a||o.canonical.y-l.canonical.y||o.canonical.x-l.canonical.x}function rv(l){return"raster"===l||"image"===l||"video"===l||"custom"===l}function wf(l,o){const a=1<=0&&R[3]>=0&&M.insert(x,R[0],R[1],R[2],R[3])}}loadVTLayers(){if(!this.vtLayers){this.vtLayers=new Sy(new Jp(this.rawTileData)).layers,this.sourceLayerCoder=new Sg(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"]),this.vtFeatures={};for(const o in this.vtLayers)this.vtFeatures[o]=[]}return this.vtLayers}query(o,a,u,f){this.loadVTLayers();const g=o.params||{},v=yl(g.filter),x=o.tileResult,M=o.transform,D=x.bufferedTilespaceBounds,A=this.grid.query(D.min.x,D.min.y,D.max.x,D.max.y,(N,U,Z,re)=>eb(x.bufferedTilespaceGeometry,N,U,Z,re));A.sort(PT);let R=null;M.elevation&&A.length>0&&(R=Ig.create(M.elevation,this.tileID));const P={};let B;for(let N=0;N(re||(re=sc(pe,this.tileID.canonical,o.tileTransform)),oe.queryIntersectsFeature(x,pe,ue,re,this.z,o.transform,o.pixelPosMatrix,R,ye)))}return P}loadMatchingFeature(o,a,u,f,g,v,x,M,D){const{featureIndex:A,bucketIndex:R,sourceLayerIndex:P,layoutVertexArrayOffset:B}=a,N=this.bucketLayerIDs[R];if(f&&!function(pe,oe){for(let ue=0;ue=0)return!0;return!1}(f,N))return;const U=this.sourceLayerCoder.decode(P),Z=this.vtLayers[U].feature(A);if(u.needGeometry){const pe=gh(Z,!0);if(!u.filter(new Te(this.tileID.overscaledZ),pe,this.tileID.canonical))return}else if(!u.filter(new Te(this.tileID.overscaledZ),Z))return;const re=this.getId(Z,U);for(let pe=0;pe{const x=o instanceof Tt?o.get(v):null;return x&&x.evaluate?x.evaluate(a,u,f):x})}function PT(l,o){return o-l}Wt(Hh,"FeatureIndex",{omit:["rawTileData","sourceLayerCoder"]});class vx{constructor(o,a){this.width=o,this.height=a,this.nextRow=0,this.image=new ac({width:o,height:a}),this.positions={},this.uploaded=!1}getDash(o,a){const u=this.getKey(o,a);return this.positions[u]}trim(){const o=this.width,a=this.height=Bo(this.nextRow);this.image.resize({width:o,height:a})}getKey(o,a){return o.join(",")+a}getDashRanges(o,a,u){const f=[];let g=o.length%2==1?-o[o.length-1]*u:0,v=o[0]*u,x=!0;f.push({left:g,right:v,isDash:x,zeroLength:0===o[0]});let M=o[0];for(let D=1;D1&&(M=o[++x]);const A=Math.abs(D-M.left),R=Math.abs(D-M.right),P=Math.min(A,R);let B;const N=g/u*(f+1);if(M.isDash){const U=f-Math.abs(N);B=Math.sqrt(P*P+U*U)}else B=f-Math.sqrt(P*P+N*N);this.image.data[v+D]=Math.max(0,Math.min(255,B+128))}}}addRegularDash(o,a){for(let M=o.length-1;M>=0;--M){const D=o[M],A=o[M+1];D.zeroLength?o.splice(M,1):A&&A.isDash===D.isDash&&(A.left=D.left,o.splice(M,1))}const u=o[0],f=o[o.length-1];u.isDash===f.isDash&&(u.left=f.left-this.width,f.right=u.right+this.width);const g=this.width*this.nextRow;let v=0,x=o[v];for(let M=0;M1&&(x=o[++v]);const D=Math.abs(M-x.left),A=Math.abs(M-x.right),R=Math.min(D,A);this.image.data[g+M]=Math.max(0,Math.min(255,(x.isDash?R:-R)+a+128))}}addDash(o,a){const u=this.getKey(o,a);if(this.positions[u])return this.positions[u];const f="round"===a,g=f?7:0,v=2*g+1;if(this.nextRow+v>this.height)return Ji("LineAtlas out of space"),null;0===o.length&&o.push(1);let x=0;for(let A=0;A=lt.maxzoom||"none"!==lt.visibility&&(ov(Ue,this.zoom,u),(M[lt.id]=lt.createBucket({index:x.bucketLayerIDs.length,layers:Ue,zoom:this.zoom,canonical:this.canonical,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:nt,sourceID:this.source,enableTerrain:this.enableTerrain,projection:this.projection.spec,availableImages:u})).populate(xt,A,this.tileID.canonical,this.tileTransform),x.bucketLayerIDs.push(Ue.map(dt=>dt.id)))}}let P,B,N,U;D.trim();const Z={type:"maybePrepare",isSymbolTile:this.isSymbolTile,zoom:this.zoom},re=bi(A.glyphDependencies,ye=>Object.keys(ye).map(Number));Object.keys(re).length?f.send("getGlyphs",{uid:this.uid,stacks:re},(ye,fe)=>{P||(P=ye,B=fe,ue.call(this))},void 0,!1,Z):B={};const pe=Object.keys(A.iconDependencies);pe.length?f.send("getImages",{icons:pe,source:this.source,tileID:this.tileID,type:"icons"},(ye,fe)=>{P||(P=ye,N=fe,ue.call(this))},void 0,!1,Z):N={};const oe=Object.keys(A.patternDependencies);function ue(){if(P)return g(P);if(B&&N&&U){const ye=new bx(B),fe=new Vb(N,U);for(const He in M){const je=M[He];je instanceof ru?(ov(je.layers,this.zoom,u),J1(je,B,ye.positions,N,fe.iconPositions,this.showCollisionBoxes,u,this.tileID.canonical,this.tileZoom,this.projection)):je.hasPattern&&(je instanceof Km||je instanceof $m||je instanceof Zp)&&(ov(je.layers,this.zoom,u),je.addFeatures(A,this.tileID.canonical,fe.patternPositions,u,this.tileTransform))}this.status="done",g(null,{buckets:Ms(M).filter(He=>!He.isEmpty()),featureIndex:x,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:ye.image,lineAtlas:D,imageAtlas:fe,glyphMap:this.returnDependencies?B:null,iconMap:this.returnDependencies?N:null,glyphPositions:this.returnDependencies?ye.positions:null})}}oe.length?f.send("getImages",{icons:oe,source:this.source,tileID:this.tileID,type:"patterns"},(ye,fe)=>{P||(P=ye,U=fe,ue.call(this))},void 0,!1,Z):U={},ue.call(this)}}function ov(l,o,a){const u=new Te(o);for(const f of l)f.recalculate(u,a)}class xx{constructor(o){this.entries={},this.scheduler=o}request(o,a,u,f){const g=this.entries[o]=this.entries[o]||{callbacks:[]};if(g.result){const[v,x]=g.result;return this.scheduler?this.scheduler.add(()=>{f(v,x)},a):f(v,x),()=>{}}return g.callbacks.push(f),g.cancel||(g.cancel=u((v,x)=>{g.result=[v,x];for(const M of g.callbacks)this.scheduler?this.scheduler.add(()=>{M(v,x)},a):M(v,x);setTimeout(()=>delete this.entries[o],3e3)})),()=>{g.result||(g.callbacks=g.callbacks.filter(v=>v!==f),g.callbacks.length||(g.cancel(),delete this.entries[o]))}}}function wx(l,o,a){const u=JSON.stringify(l.request);return l.data&&(this.deduped.entries[u]={result:[null,l.data]}),this.deduped.request(u,{type:"parseTile",isSymbolTile:l.isSymbolTile,zoom:l.tileZoom},f=>{const g=Vl(l.request,(v,x,M,D)=>{v?f(v):x&&f(null,{vectorTile:a?void 0:new Sy(new Jp(x)),rawData:x,cacheControl:M,expires:D})});return()=>{g.cancel(),f()}},o)}h.ARRAY_TYPE=Qs,h.AUTH_ERR_MSG=Tu,h.Aabb=Uo,h.Actor=class{constructor(l,o,a){this.target=l,this.parent=o,this.mapId=a,this.callbacks={},this.cancelCallbacks={},ca(["receive"],this),this.target.addEventListener("message",this.receive,!1),this.globalScope=da()?l:$,this.scheduler=new hM}send(l,o,a,u,f=!1,g){const v=Math.round(1e18*Math.random()).toString(36).substring(0,10);a&&(a.metadata=g,this.callbacks[v]=a);const x=xu(this.globalScope)?void 0:[];return this.target.postMessage({id:v,type:l,hasCallback:!!a,targetMapId:u,mustQueue:f,sourceMapId:this.mapId,data:Ua(o,x)},x),{cancel:()=>{a&&delete this.callbacks[v],this.target.postMessage({id:v,type:"",targetMapId:u,sourceMapId:this.mapId})}}}receive(l){const o=l.data,a=o.id;if(a&&(!o.targetMapId||this.mapId===o.targetMapId))if(""===o.type){const u=this.cancelCallbacks[a];delete this.cancelCallbacks[a],u&&u.cancel()}else if(o.mustQueue||da()){const u=this.callbacks[a];this.cancelCallbacks[a]=this.scheduler.add(()=>this.processTask(a,o),u&&u.metadata||{type:"message"})}else this.processTask(a,o)}processTask(l,o){if(""===o.type){const a=this.callbacks[l];delete this.callbacks[l],a&&(o.error?a(Xu(o.error)):a(null,Xu(o.data)))}else{const a=xu(this.globalScope)?void 0:[],u=o.hasCallback?(g,v)=>{delete this.cancelCallbacks[l],this.target.postMessage({id:l,type:"",sourceMapId:this.mapId,error:g?Ua(g):null,data:Ua(v,a)},a)}:g=>{},f=Xu(o.data);if(this.parent[o.type])this.parent[o.type](o.sourceMapId,f,u);else if(this.parent.getWorkerSource){const g=o.type.split(".");this.parent.getWorkerSource(o.sourceMapId,g[0],f.source)[g[1]](f,u)}else u(new Error(`Could not find function ${o.type}`))}}remove(){this.scheduler.remove(),this.target.removeEventListener("message",this.receive,!1)}},h.CanonicalTileID=Iy,h.Color=Sr,h.ColorMode=Io,h.CullFaceMode=bs,h.DEMData=bf,h.DataConstantProperty=ke,h.DedupedRequest=xx,h.DepthMode=pd,h.EXTENT=wn,h.Elevation=class{isDataAvailableAtPoint(l){const o=this._source();if(this.isUsingMockSource()||!o||l.y<0||l.y>1)return!1;const a=o.getSource().maxzoom,u=1<1)return o;const f=u.getSource().maxzoom,g=1<{const g=this.getAtTileOffset(l,f.x,f.y),v=u.upVector(l.canonical,f.x,f.y);return Os(v,v,g*u.upVectorScale(l.canonical,o,a).metersToTile),v}}getForTilePoints(l,o,a,u){if(this.isUsingMockSource())return!1;const f=Ig.create(this,l,u);return!!f&&(o.forEach(g=>{g[2]=this.exaggeration()*f.getElevationAt(g[0],g[1],a)}),!0)}getMinMaxForTile(l){if(this.isUsingMockSource())return null;const o=this.findDEMTileFor(l);if(!o||!o.dem)return null;const a=o.dem.tree,u=o.tileID,f=1<this._skuTokenExpiresAt}transformRequest(l,o){return this._transformRequestFn&&this._transformRequestFn(l,o)||{url:l}}normalizeStyleURL(l,o){if(!ha(l))return l;const a=Ts(l);return a.path=`/styles/v1${a.path}`,this._makeAPIURL(a,this._customAccessToken||o)}normalizeGlyphsURL(l,o){if(!ha(l))return l;const a=Ts(l);return a.path=`/fonts/v1${a.path}`,this._makeAPIURL(a,this._customAccessToken||o)}normalizeSourceURL(l,o,a,u){if(!ha(l))return l;const f=Ts(l);return f.path=`/v4/${f.authority}.json`,f.params.push("secure"),a&&f.params.push(`language=${a}`),u&&f.params.push(`worldview=${u}`),this._makeAPIURL(f,this._customAccessToken||o)}normalizeSpriteURL(l,o,a,u){const f=Ts(l);return ha(l)?(f.path=`/styles/v1${f.path}/sprite${o}${a}`,this._makeAPIURL(f,this._customAccessToken||u)):(f.path+=`${o}${a}`,sl(f))}normalizeTileURL(l,o,a){if(this._isSkuTokenExpired()&&this._createSkuToken(),l&&!ha(l))return l;const u=Ts(l);u.path=u.path.replace(/(\.(png|jpg)\d*)(?=$)/,`${o||a&&"raster"!==u.authority&&512===a?"@2x":""}${Ie.supported?".webp":"$1"}`),"raster"===u.authority?u.path=`/${De.RASTER_URL_PREFIX}${u.path}`:(u.path=u.path.replace(/^.+\/v4\//,"/"),u.path=`/${De.TILE_URL_VERSION}${u.path}`);const f=this._customAccessToken||function(g){for(const v of g){const x=v.match(/^access_token=(.*)$/);if(x)return x[1]}return null}(u.params)||De.ACCESS_TOKEN;return De.REQUIRE_ACCESS_TOKEN&&f&&this._skuToken&&u.params.push(`sku=${this._skuToken}`),this._makeAPIURL(u,f)}canonicalizeTileURL(l,o){const a=Ts(l);if(!a.path.match(/^(\/v4\/|\/raster\/v1\/)/)||!a.path.match(/\.[\w]+$/))return l;let u="mapbox://";a.path.match(/^\/raster\/v1\//)?u+=`raster/${a.path.replace(`/${De.RASTER_URL_PREFIX}/`,"")}`:u+=`tiles/${a.path.replace(`/${De.TILE_URL_VERSION}/`,"")}`;let f=a.params;return o&&(f=f.filter(g=>!g.match(/^access_token=/))),f.length&&(u+=`?${f.join("&")}`),u}canonicalizeTileset(l,o){const a=!!o&&ha(o),u=[];for(const f of l.tiles||[])Au(f)?u.push(this.canonicalizeTileURL(f,a)):u.push(f);return u}_makeAPIURL(l,o){const a="See https://docs.mapbox.com/api/overview/#access-tokens-and-token-scopes",u=Ts(De.API_URL);if(l.protocol=u.protocol,l.authority=u.authority,"http"===l.protocol){const f=l.params.indexOf("secure");f>=0&&l.params.splice(f,1)}if("/"!==u.path&&(l.path=`${u.path}${l.path}`),!De.REQUIRE_ACCESS_TOKEN)return sl(l);if(o=o||De.ACCESS_TOKEN,!this._silenceAuthErrors){if(!o)throw new Error(`An API access token is required to use Mapbox GL. ${a}`);if("s"===o[0])throw new Error(`Use a public access token (pk.*) with Mapbox GL, not a secret access token (sk.*). ${a}`)}return l.params=l.params.filter(f=>-1===f.indexOf("access_token")),l.params.push(`access_token=${o||""}`),sl(l)}},h.ResourceType=Ds,h.SegmentVector=jr,h.SourceCache=fd,h.StencilMode=xf,h.StructArrayLayout1ui2=Ap,h.StructArrayLayout2f1f2i16=eo,h.StructArrayLayout2i4=_i,h.StructArrayLayout2ui4=Ys,h.StructArrayLayout3f12=ba,h.StructArrayLayout3ui6=to,h.StructArrayLayout4i8=xi,h.StructArrayLayout5f20=$c,h.Texture=Gh,h.Tile=nv,h.Transitionable=st,h.Uniform1f=Q_,h.Uniform1i=class extends qc{constructor(l){super(l),this.current=0}set(l,o,a){this.fetchUniformLocation(l,o)&&this.current!==a&&(this.current=a,this.gl.uniform1i(this.location,a))}},h.Uniform2f=class extends qc{constructor(l){super(l),this.current=[0,0]}set(l,o,a){this.fetchUniformLocation(l,o)&&(a[0]===this.current[0]&&a[1]===this.current[1]||(this.current=a,this.gl.uniform2f(this.location,a[0],a[1])))}},h.Uniform3f=class extends qc{constructor(l){super(l),this.current=[0,0,0]}set(l,o,a){this.fetchUniformLocation(l,o)&&(a[0]===this.current[0]&&a[1]===this.current[1]&&a[2]===this.current[2]||(this.current=a,this.gl.uniform3f(this.location,a[0],a[1],a[2])))}},h.Uniform4f=d1,h.UniformColor=h1,h.UniformMatrix2f=class extends qc{constructor(l){super(l),this.current=CT}set(l,o,a){if(this.fetchUniformLocation(l,o))for(let u=0;u<4;u++)if(a[u]!==this.current[u]){this.current=a,this.gl.uniformMatrix2fv(this.location,!1,a);break}}},h.UniformMatrix3f=class extends qc{constructor(l){super(l),this.current=Ip}set(l,o,a){if(this.fetchUniformLocation(l,o))for(let u=0;u<9;u++)if(a[u]!==this.current[u]){this.current=a,this.gl.uniformMatrix3fv(this.location,!1,a);break}}},h.UniformMatrix4f=class extends qc{constructor(l){super(l),this.current=wT}set(l,o,a){if(this.fetchUniformLocation(l,o)){if(a[12]!==this.current[12]||a[0]!==this.current[0])return this.current=a,void this.gl.uniformMatrix4fv(this.location,!1,a);for(let u=1;u<16;u++)if(a[u]!==this.current[u]){this.current=a,this.gl.uniformMatrix4fv(this.location,!1,a);break}}}},h.UnwrappedTileID=B1,h.ValidationError=jt,h.VectorTileFeature=qm,h.VectorTileWorkerSource=class extends cs{constructor(l,o,a,u,f){super(),this.actor=l,this.layerIndex=o,this.availableImages=a,this.loadVectorData=f||wx,this.loading={},this.loaded={},this.deduped=new xx(l.scheduler),this.isSpriteLoaded=u,this.scheduler=l.scheduler}loadTile(l,o){const a=l.uid,u=l&&l.request,f=u&&u.collectResourceTiming,g=this.loading[a]=new _M(l);g.abort=this.loadVectorData(l,(v,x)=>{const M=!this.loading[a];if(delete this.loading[a],M||v||!x)return g.status="done",M||(this.loaded[a]=g),o(v);const D=x.rawData,A={};x.expires&&(A.expires=x.expires),x.cacheControl&&(A.cacheControl=x.cacheControl),g.vectorTile=x.vectorTile||new Sy(new Jp(D));const R=()=>{g.parse(g.vectorTile,this.layerIndex,this.availableImages,this.actor,(P,B)=>{if(P||!B)return o(P);const N={};if(f){const U=rn(u);U.length>0&&(N.resourceTiming=JSON.parse(JSON.stringify(U)))}o(null,xn({rawTileData:D.slice(0)},B,A,N))})};this.isSpriteLoaded?R():this.once("isSpriteLoaded",()=>{this.scheduler?this.scheduler.add(R,{type:"parseTile",isSymbolTile:l.isSymbolTile,zoom:l.tileZoom}):R()}),this.loaded=this.loaded||{},this.loaded[a]=g})}reloadTile(l,o){const a=this.loaded,u=l.uid,f=this;if(a&&a[u]){const g=a[u];g.showCollisionBoxes=l.showCollisionBoxes,g.enableTerrain=!!l.enableTerrain,g.projection=l.projection,g.tileTransform=iu(l.tileID.canonical,l.projection);const v=(x,M)=>{const D=g.reloadCallback;D&&(delete g.reloadCallback,g.parse(g.vectorTile,f.layerIndex,this.availableImages,f.actor,D)),o(x,M)};"parsing"===g.status?g.reloadCallback=v:"done"===g.status&&(g.vectorTile?g.parse(g.vectorTile,this.layerIndex,this.availableImages,this.actor,v):v())}}abortTile(l,o){const a=l.uid,u=this.loading[a];u&&(u.abort&&u.abort(),delete this.loading[a]),o()}removeTile(l,o){const a=this.loaded,u=l.uid;a&&a[u]&&delete a[u],o()}},h.WritingMode=$r,h.add=xl,h.addDynamicAttributes=_f,h.adjoint=function(l,o){var a=o[0],u=o[1],f=o[2],g=o[3],v=o[4],x=o[5],M=o[6],D=o[7],A=o[8];return l[0]=v*A-x*D,l[1]=f*D-u*A,l[2]=u*x-f*v,l[3]=x*M-g*A,l[4]=a*A-f*M,l[5]=f*g-a*x,l[6]=g*D-v*M,l[7]=u*M-a*D,l[8]=a*v-u*g,l},h.asyncAll=Yo,h.bezier=On,h.bindAll=ca,h.boundsAttributes=tv,h.bufferConvexPolygon=function(l,o){const a=[];for(let u=0;uDc&&(l.getActor().send("enforceCacheSizeLimit",wu),Su=0)},h.calculateGlobeLabelMatrix=function(l,o){const{x:a,y:u}=l.point,f=rx(a,u,l.worldSize/l._pixelsPerMercatorPixel,0,0);return Qc(f,f,fg(Sl(o)))},h.calculateGlobeMatrix=function(l){const{x:o,y:a}=l.point,{lng:u,lat:f}=l._center;return rx(o,a,l.worldSize,u,f)},h.calculateGlobeMercatorMatrix=function(l){const o=l.pixelsPerMeter,a=o/ys(1,l.center.lat),u=Ma(new Float64Array(16));return yh(u,u,[l.point.x,l.point.y,0]),Jc(u,u,[a,a,o]),Float32Array.from(u)},h.circumferenceAtLatitude=ty,h.clamp=vn,h.clearTileCache=function(l){if(!Cu())return;const o=$.caches.delete(dp);l&&o.catch(l).then(()=>l())},h.clipLine=cd,h.clone=function(l){var o=new Qs(16);return o[0]=l[0],o[1]=l[1],o[2]=l[2],o[3]=l[3],o[4]=l[4],o[5]=l[5],o[6]=l[6],o[7]=l[7],o[8]=l[8],o[9]=l[9],o[10]=l[10],o[11]=l[11],o[12]=l[12],o[13]=l[13],o[14]=l[14],o[15]=l[15],o},h.clone$1=Cr,h.collisionCircleLayout=Qm,h.config=De,h.conjugate=function(l,o){return l[0]=-o[0],l[1]=-o[1],l[2]=-o[2],l[3]=o[3],l},h.create=function(){var l=new Qs(16);return Qs!=Float32Array&&(l[1]=0,l[2]=0,l[3]=0,l[4]=0,l[6]=0,l[7]=0,l[8]=0,l[9]=0,l[11]=0,l[12]=0,l[13]=0,l[14]=0),l[0]=1,l[5]=1,l[10]=1,l[15]=1,l},h.create$1=b1,h.createExpression=Jl,h.createLayout=Ht,h.createStyleLayer=function(l){return"custom"===l.type?new dx(l):new uM[l.type](l)},h.cross=Nm,h.degToRad=ot,h.distance=function(l,o){return Math.hypot(o[0]-l[0],o[1]-l[1],o[2]-l[2])},h.div=function(l,o,a){return l[0]=o[0]/a[0],l[1]=o[1]/a[1],l[2]=o[2]/a[2],l},h.dot=os,h.earthRadius=Im,h.ease=Mi,h.easeCubicInOut=yn,h.ecefToLatLng=function([l,o,a]){const u=Math.hypot(l,o,a),f=Math.atan2(l,a),g=.5*Math.PI-Math.acos(-o/u);return new pi(ft(f),ft(g))},h.emitValidationErrors=uh,h.endsWith=Mo,h.enforceCacheSizeLimit=function(l){Oa(),Ko&&Ko.then(o=>{o.keys().then(a=>{for(let u=0;ug&&(u+=(l[f]-g)*(l[f]-g)),o[f]0){const N=180/u;tb(B,B,[N/D+1,0,0,0,N/A+1,0,-.5*N/R,.5*N/P,1])}return B[2]=M,B[5]=l.x,B[8]=l.y,B},h.getImage=Eu,h.getJSON=function(l,o){return rl(xn(l,{type:"json"}),o)},h.getLatitudinalLod=function(l){const o=80.051129;l=vn(l,-80.051129,o)/o*90;const a=Math.pow(Math.abs(Math.sin(ot(l))),3);return Math.round(a*(lf.length-1))},h.getMapSessionAPI=Ce,h.getPerformanceMeasurement=rn,h.getProjection=vg,h.getRTLTextPluginStatus=Me,h.getReferrer=Es,h.getTilePoint=function(l,{x:o,y:a},u=0){return new Ee(((o-u)*l.scale-l.x)*wn,(a*l.scale-l.y)*wn)},h.getTileVec3=function(l,o,a=0){return vh(((o.x-a)*l.scale-l.x)*wn,(o.y*l.scale-l.y)*wn,ny(o.z,o.y))},h.getVideo=function(l,o){const a=$.document.createElement("video");a.muted=!0,a.onloadstart=function(){o(null,a)};for(let u=0;u{}}},h.globeCenterToScreenPoint=function(l){const o=[0,0,0],a=Ma(new Float64Array(16));return Qc(a,l.pixelMatrix,l.globeMatrix),xr(o,o,a),new Ee(o[0],o[1])},h.globeDenormalizeECEF=fg,h.globeECEFOrigin=function(l,o){const a=[0,0,0];return xr(a,a,ff(Sl(o.canonical))),xr(a,a,l),a},h.globeNormalizeECEF=ff,h.globePixelsToTileUnits=function(l,o){return wn/(512*Math.pow(2,l))*hf(Sl(o))},h.globePoleMatrixForTile=function(l,o,a){const u=Ma(new Float64Array(16)),f=(o/(1<0;return 0===u&&!f&&!v&&g},h.identity=Ma,h.identity$1=Vm,h.invert=Fp,h.isFullscreen=function(){return!!$.document.fullscreenElement||!!$.document.webkitFullscreenElement},h.isLngLatBehindGlobe=$y,h.isMapAuthenticated=function(l){return Ve.has(l)},h.isMapboxURL=ha,h.isSafariWithAntialiasingBug=function(l){const o=l.navigator?l.navigator.userAgent:null;return!!xu(l)&&o&&(o.match("Version/15.4")||o.match("Version/15.5")||o.match(/CPU (OS|iPhone OS) (15_4|15_5) like Mac OS X/))},h.latFromMercatorY=$i,h.latLngToECEF=Dl,h.len=x1,h.length=Bp,h.length$1=function(l){return Math.hypot(l[0],l[1],l[2],l[3])},h.lngFromMercatorX=To,h.loadVectorTile=wx,h.makeRequest=rl,h.mapValue=function(l,o,a,u,f){return vn((l-o)/(a-o)*(f-u)+u,u,f)},h.mercatorScale=Y0,h.mercatorXfromLng=bl,h.mercatorYfromLat=Ca,h.mercatorZfromAltitude=ys,h.mul=rb,h.mul$1=lb,h.multiply=Qc,h.multiply$1=tb,h.multiply$2=sb,h.nextPowerOfTwo=Bo,h.normalize=tr,h.normalize$1=w1,h.normalize$2=cb,h.number=ci,h.ortho=function(l,o,a,u,f,g,v){var x=1/(o-a),M=1/(u-f),D=1/(g-v);return l[0]=-2*x,l[1]=0,l[2]=0,l[3]=0,l[4]=0,l[5]=-2*M,l[6]=0,l[7]=0,l[8]=0,l[9]=0,l[10]=2*D,l[11]=0,l[12]=(o+a)*x,l[13]=(f+u)*M,l[14]=(v+g)*D,l[15]=1,l},h.pbf=Jp,h.perspective=function(l,o,a,u,f){var g,v=1/Math.tan(o/2);return l[0]=v/a,l[1]=0,l[2]=0,l[3]=0,l[4]=0,l[5]=v,l[6]=0,l[7]=0,l[8]=0,l[9]=0,l[11]=-1,l[12]=0,l[13]=0,l[15]=0,null!=f&&f!==1/0?(l[10]=(f+u)*(g=1/(u-f)),l[14]=2*f*u*g):(l[10]=-1,l[14]=-2*u),l},h.pick=function(l,o){const a={};for(let u=0;u0&&a[0]<=l.width&&a[1]>0&&a[1]<=l.height&&!$y(l,new pi(l.center.lat,90)),u[0]>0&&u[0]<=l.width&&u[1]>0&&u[1]<=l.height&&!$y(l,new pi(l.center.lat,-90))]},h.polygonContainsPoint=_h,h.polygonIntersectsBox=eb,h.polygonIntersectsPolygon=Q0,h.polygonizeBounds=function(l,o,a=0,u=!0){const f=new Ee(a,a),g=l.sub(f),v=o.add(f),x=[g,new Ee(v.x,g.y),v,new Ee(g.x,v.y)];return u&&x.push(g.clone()),x},h.posAttributes=af,h.postMapLoadEvent=de,h.postPerformanceEvent=Fe,h.postTurnstileEvent=j,h.potpack=ag,h.prevPowerOfTwo=function(l){return l<=1?1:Math.pow(2,Math.floor(Math.log(l)/Math.LN2))},h.radToDeg=ft,h.refProperties=["type","source","source-layer","minzoom","maxzoom","filter","layout"],h.registerForPluginStateChange=function(l){return l({pluginStatus:ee,pluginURL:te}),ge.on("pluginStateChange",l),l},h.removeAuthState=function(l){Ve.delete(l)},h.renderColorRamp=Vp,h.resample=Rp,h.rotateX=rs,h.rotateX$1=ub,h.rotateY=Bm,h.rotateY$1=xh,h.rotateZ=function(l,o,a){var u=Math.sin(a),f=Math.cos(a),g=o[0],v=o[1],x=o[2],M=o[3],D=o[4],A=o[5],R=o[6],P=o[7];return o!==l&&(l[8]=o[8],l[9]=o[9],l[10]=o[10],l[11]=o[11],l[12]=o[12],l[13]=o[13],l[14]=o[14],l[15]=o[15]),l[0]=g*f+D*u,l[1]=v*f+A*u,l[2]=x*f+R*u,l[3]=M*f+P*u,l[4]=D*f-g*u,l[5]=A*f-v*u,l[6]=R*f-x*u,l[7]=P*f-M*u,l},h.rotateZ$1=function(l,o,a){a*=.5;var u=o[0],f=o[1],g=o[2],v=o[3],x=Math.sin(a),M=Math.cos(a);return l[0]=u*M+f*x,l[1]=f*M-u*x,l[2]=g*M+v*x,l[3]=v*M-g*x,l},h.scale=Jc,h.scale$1=ly,h.scale$2=Os,h.scaleAndAdd=rd,h.set=function(l,o,a,u){return l[0]=o,l[1]=a,l[2]=u,l},h.setCacheLimits=function(l,o){wu=l,Dc=o},h.setColumn=function(l,o,a){l[4*o+0]=a[0],l[4*o+1]=a[1],l[4*o+2]=a[2],l[4*o+3]=a[3]},h.setRTLTextPlugin=function(l,o,a=!1){if(ee===K||ee===ne||ee===q)throw new Error("setRTLTextPlugin cannot be called multiple times.");te=an.resolveURL(l),ee=K,X=o,_e(),a||We()},h.smoothstep=co,h.spec=at,h.squaredLength=function(l){var o=l[0],a=l[1],u=l[2];return o*o+a*a+u*u},h.storeAuthState=function(l,o){o?Ve.add(l):Ve.delete(l)},h.sub=Wa,h.subtract=ay,h.symbolSize=Pb,h.tileAABB=function(l,o,a,u,f,g,v,x,M){if("globe"===M.name)return function rM(l,o,a){const u=o/l.worldSize,f=l.globeMatrix;if(a.z<=1){const je=Sl(a).getCorners();return iM(je,f,u),Uo.fromPoints(je)}const g=uf(a),v=ix(g);iM(v,f,u);const x=Number.MAX_VALUE,M=[-x,-x,-x],D=[x,x,x];if(g.contains(l.center)){for(const xt of v)Ao(D,D,xt),id(M,M,xt);M[2]=0;const je=l.point,nt=[je.x*u,je.y*u,0];return Ao(D,D,nt),id(M,M,nt),new Uo(D,M)}const A=[f[12]*u,f[13]*u,f[14]*u],R=g.getCenter(),P=vn(l.center.lat,-85.051129,Hr),B=vn(R.lat,-85.051129,Hr),N=bl(l.center.lng),U=Ca(P);let Z=N-bl(R.lng);const re=U-Ca(B);Z>.5?Z-=1:Z<-.5&&(Z+=1);let pe=0;Math.abs(Z)>Math.abs(re)?pe=Z>=0?1:3:(pe=re>=0?0:2,rd(A,A,[f[4]*u,f[5]*u,f[6]*u],-Math.sin(ot(re>=0?g.getSouth():g.getNorth()))*Ml));const oe=v[pe],ue=v[(pe+1)%4],ye=new Hy(oe,ue,A),fe=[cf(ye,0)||oe[0],cf(ye,1)||oe[1],cf(ye,2)||oe[2]],He=Bh(l.zoom);if(He>0){const je=function({x:xt,y:Ue,z:lt},dt,pt,et,qe){const kt=1/(1<.5?pn=-1:Hn<-.5&&(pn=1),ln=((ln+pn)*dt-(et*=dt))*pt+et,Ft=((Ft+pn)*dt-et)*pt+et,Xt=(Xt*dt-(qe*=dt))*pt+qe,Rt=(Rt*dt-qe)*pt+qe,[[ln,Rt,0],[Ft,Rt,0],[Ft,Xt,0],[ln,Xt,0]]}(a,o,l._pixelsPerMercatorPixel,N,U);for(let xt=0;xt_a(Uc(l)),h.validateFog=l=>_a(Mp(l)),h.validateLayer=l=>_a(qu(l)),h.validateLight=l=>_a(ts(l)),h.validateSource=l=>_a(wm(l)),h.validateStyle=jc,h.validateTerrain=l=>_a(ch(l)),h.values=Ms,h.vectorTile=$p,h.version=me,h.warnOnce=Ji,h.window=$,h.wrap=Nr}),tt(0,function(h){function $(ie){if("number"==typeof ie||"boolean"==typeof ie||"string"==typeof ie||null==ie)return JSON.stringify(ie);if(Array.isArray(ie)){let j="[";for(const J of ie)j+=`${$(J)},`;return`${j}]`}let V="{";for(const j of Object.keys(ie).sort())V+=`${j}:${$(ie[j])},`;return`${V}}`}function me(ie){let V="";for(const j of h.refProperties)V+=`/${$(ie[j])}`;return V}class Re{constructor(V){this.keyCache={},V&&this.replace(V)}replace(V){this._layerConfigs={},this._layers={},this.update(V,[])}update(V,j){for(const de of V)this._layerConfigs[de.id]=de,(this._layers[de.id]=h.createStyleLayer(de)).compileFilter(),this.keyCache[de.id]&&delete this.keyCache[de.id];for(const de of j)delete this.keyCache[de],delete this._layerConfigs[de],delete this._layers[de];this.familiesBySource={};const J=function(de,be){const Fe={};for(let Ce=0;Cethis._layers[Pt.id]),Fe=be[0];if("none"===Fe.visibility)continue;const Oe=Fe.source||"";let Ce=this.familiesBySource[Oe];Ce||(Ce=this.familiesBySource[Oe]={});const Ve=Fe.sourceLayer||"_geojsonTileLayer";let yt=Ce[Ve];yt||(yt=Ce[Ve]=[]),yt.push(be)}}}class De{loadTile(V,j){const{uid:J,encoding:de,rawImageData:be,padding:Fe,buildQuadTree:Oe}=V,Ce=h.window.ImageBitmap&&be instanceof h.window.ImageBitmap?this.getImageData(be,Fe):be;j(null,new h.DEMData(J,Ce,de,Fe<1,Oe))}getImageData(V,j){this.offscreenCanvas&&this.offscreenCanvasContext||(this.offscreenCanvas=new OffscreenCanvas(V.width,V.height),this.offscreenCanvasContext=this.offscreenCanvas.getContext("2d",{willReadFrequently:!0})),this.offscreenCanvas.width=V.width,this.offscreenCanvas.height=V.height,this.offscreenCanvasContext.drawImage(V,0,0,V.width,V.height);const J=this.offscreenCanvasContext.getImageData(-j,-j,V.width+2*j,V.height+2*j);return this.offscreenCanvasContext.clearRect(0,0,this.offscreenCanvas.width,this.offscreenCanvas.height),J}}var Ie=function ie(V,j){var J,de=V&&V.type;if("FeatureCollection"===de)for(J=0;J=Math.abs(Oe)?j-Ce+Oe:Oe-Ce+j,j=Ce}j+J>=0!=!!V&&ie.reverse()}const Ot=h.VectorTileFeature.prototype.toGeoJSON;class Ut{constructor(V){this._feature=V,this.extent=h.EXTENT,this.type=V.type,this.properties=V.tags,"id"in V&&!isNaN(V.id)&&(this.id=parseInt(V.id,10))}loadGeometry(){if(1===this._feature.type){const V=[];for(const j of this._feature.geometry)V.push([new h.pointGeometry(j[0],j[1])]);return V}{const V=[];for(const j of this._feature.geometry){const J=[];for(const de of j)J.push(new h.pointGeometry(de[0],de[1]));V.push(J)}return V}}toGeoJSON(V,j,J){return Ot.call(this,V,j,J)}}class At{constructor(V){this.layers={_geojsonTileLayer:this},this.name="_geojsonTileLayer",this.extent=h.EXTENT,this.length=V.length,this._features=V}feature(V){return new Ut(this._features[V])}}var St={exports:{}},le=h.pointGeometry,Xe=h.vectorTile.VectorTileFeature,Ee=Ne;function Ne(ie,V){this.options=V||{},this.features=ie,this.length=ie.length}function xe(ie,V){this.id="number"==typeof ie.id?ie.id:void 0,this.type=ie.type,this.rawGeometry=1===ie.type?[ie.geometry]:ie.geometry,this.properties=ie.tags,this.extent=V||4096}Ne.prototype.feature=function(ie){return new xe(this.features[ie],this.options.extent)},xe.prototype.loadGeometry=function(){var ie=this.rawGeometry;this.geometry=[];for(var V=0;V>31}function co(ie,V){for(var j=ie.loadGeometry(),J=ie.type,de=0,be=0,Fe=j.length,Oe=0;Oe>1;Ms(ie,V,Fe,J,de,be%2),Yo(ie,V,j,J,Fe-1,be+1),Yo(ie,V,j,Fe+1,de,be+1)}function Ms(ie,V,j,J,de,be){for(;de>J;){if(de-J>600){const Ve=de-J+1,yt=j-J+1,Pt=Math.log(Ve),wt=.5*Math.exp(2*Pt/3),Yt=.5*Math.sqrt(Pt*wt*(Ve-wt)/Ve)*(yt-Ve/2<0?-1:1);Ms(ie,V,j,Math.max(J,Math.floor(j-yt*wt/Ve+Yt)),Math.min(de,Math.floor(j+(Ve-yt)*wt/Ve+Yt)),be)}const Fe=V[2*j+be];let Oe=J,Ce=de;for(xn(ie,V,J,j),V[2*de+be]>Fe&&xn(ie,V,J,de);OeFe;)Ce--}V[2*J+be]===Fe?xn(ie,V,J,Ce):(Ce++,xn(ie,V,Ce,de)),Ce<=j&&(J=Ce+1),j<=Ce&&(de=Ce-1)}}function xn(ie,V,j,J){Pa(ie,j,J),Pa(V,2*j,2*J),Pa(V,2*j+1,2*J+1)}function Pa(ie,V,j){const J=ie[V];ie[V]=ie[j],ie[j]=J}function Nl(ie,V,j,J){const de=ie-j,be=V-J;return de*de+be*be}St.exports=ft,St.exports.fromVectorTileJs=ft,St.exports.fromGeojsonVt=function(ie,V){V=V||{};var j={};for(var J in ie)j[J]=new ot(ie[J].features,V),j[J].name=J,j[J].version=V.version,j[J].extent=V.extent;return ft({layers:j})},St.exports.GeoJSONWrapper=ot;const Ss=ie=>ie[0],Bo=ie=>ie[1];class Zt{constructor(V,j=Ss,J=Bo,de=64,be=Float64Array){this.nodeSize=de,this.points=V;const Fe=V.length<65536?Uint16Array:Uint32Array,Oe=this.ids=new Fe(V.length),Ce=this.coords=new be(2*V.length);for(let Ve=0;Ve=Oe&&rn<=Ve&&Kt>=Ce&&Kt<=yt&&Yt.push(be[Ii]);continue}const an=Math.floor((vi+ei)/2);rn=Fe[2*an],Kt=Fe[2*an+1],rn>=Oe&&rn<=Ve&&Kt>=Ce&&Kt<=yt&&Yt.push(be[an]);const Ni=(En+1)%2;(0===En?Oe<=rn:Ce<=Kt)&&(wt.push(vi),wt.push(an-1),wt.push(Ni)),(0===En?Ve>=rn:yt>=Kt)&&(wt.push(an+1),wt.push(ei),wt.push(Ni))}return Yt}(this.ids,this.coords,V,j,J,de,this.nodeSize)}within(V,j,J){return function(de,be,Fe,Oe,Ce,Ve){const yt=[0,de.length-1,0],Pt=[],wt=Ce*Ce;for(;yt.length;){const Yt=yt.pop(),rn=yt.pop(),Kt=yt.pop();if(rn-Kt<=Ve){for(let Ni=Kt;Ni<=rn;Ni++)Nl(be[2*Ni],be[2*Ni+1],Fe,Oe)<=wt&&Pt.push(de[Ni]);continue}const En=Math.floor((Kt+rn)/2),ei=be[2*En],vi=be[2*En+1];Nl(ei,vi,Fe,Oe)<=wt&&Pt.push(de[En]);const an=(Yt+1)%2;(0===Yt?Fe-Ce<=ei:Oe-Ce<=vi)&&(yt.push(Kt),yt.push(En-1),yt.push(an)),(0===Yt?Fe+Ce>=ei:Oe+Ce>=vi)&&(yt.push(En+1),yt.push(rn),yt.push(an))}return Pt}(this.ids,this.coords,V,j,J,this.nodeSize)}}const ca={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:ie=>ie},Mo=Math.fround||(bi=new Float32Array(1),ie=>(bi[0]=+ie,bi[0]));var bi;class Nn{constructor(V){this.options=nl(Object.create(ca),V),this.trees=new Array(this.options.maxZoom+1)}load(V){const{log:j,minZoom:J,maxZoom:de,nodeSize:be}=this.options;j&&console.time("total time");const Fe=`prepare ${V.length} points`;j&&console.time(Fe),this.points=V;let Oe=[];for(let Ce=0;Ce=J;Ce--){const Ve=+Date.now();Oe=this._cluster(Oe,Ce),this.trees[Ce]=new Zt(Oe,xu,Gd,be,Float32Array),j&&console.log("z%d: %d clusters in %dms",Ce,Oe.length,+Date.now()-Ve)}return j&&console.timeEnd("total time"),this}getClusters(V,j){let J=((V[0]+180)%360+360)%360-180;const de=Math.max(-90,Math.min(90,V[1]));let be=180===V[2]?180:((V[2]+180)%360+360)%360-180;const Fe=Math.max(-90,Math.min(90,V[3]));if(V[2]-V[0]>=360)J=-180,be=180;else if(J>be){const yt=this.getClusters([J,de,180,Fe],j),Pt=this.getClusters([-180,de,be,Fe],j);return yt.concat(Pt)}const Oe=this.trees[this._limitZoom(j)],Ce=Oe.range(li(J),da(Fe),li(be),da(de)),Ve=[];for(const yt of Ce){const Pt=Oe.points[yt];Ve.push(Pt.numPoints?Ji(Pt):this.points[Pt.index])}return Ve}getChildren(V){const j=this._getOriginId(V),J=this._getOriginZoom(V),de="No cluster with the specified id.",be=this.trees[J];if(!be)throw new Error(de);const Fe=be.points[j];if(!Fe)throw new Error(de);const Oe=this.options.radius/(this.options.extent*Math.pow(2,J-1)),Ce=be.within(Fe.x,Fe.y,Oe),Ve=[];for(const yt of Ce){const Pt=be.points[yt];Pt.parentId===V&&Ve.push(Pt.numPoints?Ji(Pt):this.points[Pt.index])}if(0===Ve.length)throw new Error(de);return Ve}getLeaves(V,j,J){const de=[];return this._appendLeaves(de,V,j=j||10,J=J||0,0),de}getTile(V,j,J){const de=this.trees[this._limitZoom(V)],be=Math.pow(2,V),{extent:Fe,radius:Oe}=this.options,Ce=Oe/Fe,Ve=(J-Ce)/be,yt=(J+1+Ce)/be,Pt={features:[]};return this._addTileFeatures(de.range((j-Ce)/be,Ve,(j+1+Ce)/be,yt),de.points,j,J,be,Pt),0===j&&this._addTileFeatures(de.range(1-Ce/be,Ve,1,yt),de.points,be,J,be,Pt),j===be-1&&this._addTileFeatures(de.range(0,Ve,Ce/be,yt),de.points,-1,J,be,Pt),Pt.features.length?Pt:null}getClusterExpansionZoom(V){let j=this._getOriginZoom(V)-1;for(;j<=this.options.maxZoom;){const J=this.getChildren(V);if(j++,1!==J.length)break;V=J[0].properties.cluster_id}return j}_appendLeaves(V,j,J,de,be){const Fe=this.getChildren(j);for(const Oe of Fe){const Ce=Oe.properties;if(Ce&&Ce.cluster?be+Ce.point_count<=de?be+=Ce.point_count:be=this._appendLeaves(V,Ce.cluster_id,J,de,be):bej&&(rn+=En.numPoints||1)}if(rn>Yt&&rn>=Oe){let Kt=yt.x*Yt,En=yt.y*Yt,ei=Fe&&Yt>1?this._map(yt,!0):null;const vi=(Ve<<5)+(j+1)+this.points.length;for(const an of wt){const Ni=Pt.points[an];if(Ni.zoom<=j)continue;Ni.zoom=j;const Ii=Ni.numPoints||1;Kt+=Ni.x*Ii,En+=Ni.y*Ii,Ni.parentId=vi,Fe&&(ei||(ei=this._map(yt,!0)),Fe(ei,this._map(Ni)))}yt.parentId=vi,J.push(Cr(Kt/rn,En/rn,vi,rn,ei))}else if(J.push(yt),rn>1)for(const Kt of wt){const En=Pt.points[Kt];En.zoom<=j||(En.zoom=j,J.push(En))}}return J}_getOriginId(V){return V-this.points.length>>5}_getOriginZoom(V){return(V-this.points.length)%32}_map(V,j){if(V.numPoints)return j?nl({},V.properties):V.properties;const J=this.points[V.index].properties,de=this.options.map(J);return j&&de===J?nl({},de):de}}function Cr(ie,V,j,J,de){return{x:Mo(ie),y:Mo(V),zoom:1/0,id:j,parentId:-1,numPoints:J,properties:de}}function Jt(ie,V){const[j,J]=ie.geometry.coordinates;return{x:Mo(li(j)),y:Mo(da(J)),zoom:1/0,index:V,parentId:-1}}function Ji(ie){return{type:"Feature",id:ie.id,properties:ua(ie),geometry:{type:"Point",coordinates:[(V=ie.x,360*(V-.5)),Vd(ie.y)]}};var V}function ua(ie){const V=ie.numPoints,j=V>=1e4?`${Math.round(V/1e3)}k`:V>=1e3?Math.round(V/100)/10+"k":V;return nl(nl({},ie.properties),{cluster:!0,cluster_id:ie.id,point_count:V,point_count_abbreviated:j})}function li(ie){return ie/360+.5}function da(ie){const V=Math.sin(ie*Math.PI/180),j=.5-.25*Math.log((1+V)/(1-V))/Math.PI;return j<0?0:j>1?1:j}function Vd(ie){const V=(180-360*ie)*Math.PI/180;return 360*Math.atan(Math.exp(V))/Math.PI-90}function nl(ie,V){for(const j in V)ie[j]=V[j];return ie}function xu(ie){return ie.x}function Gd(ie){return ie.y}function zl(ie,V,j,J){for(var de,be=J,Fe=j-V>>1,Oe=j-V,Ce=ie[V],Ve=ie[V+1],yt=ie[j],Pt=ie[j+1],wt=V+3;wtbe)de=wt,be=Yt;else if(Yt===be){var rn=Math.abs(wt-Fe);rnJ&&(de-V>3&&zl(ie,V,de,J),ie[de+2]=be,j-de>3&&zl(ie,de,j,J))}function dp(ie,V,j,J,de,be){var Fe=de-j,Oe=be-J;if(0!==Fe||0!==Oe){var Ce=((ie-j)*Fe+(V-J)*Oe)/(Fe*Fe+Oe*Oe);Ce>1?(j=de,J=be):Ce>0&&(j+=Fe*Ce,J+=Oe*Ce)}return(Fe=ie-j)*Fe+(Oe=V-J)*Oe}function Ko(ie,V,j,J){var de={id:void 0===ie?null:ie,type:V,geometry:j,tags:J,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};return function(be){var Fe=be.geometry,Oe=be.type;if("Point"===Oe||"MultiPoint"===Oe||"LineString"===Oe)il(be,Fe);else if("Polygon"===Oe||"MultiLineString"===Oe)for(var Ce=0;Ce0&&(Fe+=J?(de*Ve-Ce*be)/2:Math.sqrt(Math.pow(Ce-de,2)+Math.pow(Ve-be,2))),de=Ce,be=Ve}var yt=V.length-3;V[2]=1,zl(V,0,yt,j),V[yt+2]=1,V.size=Math.abs(Fe),V.start=0,V.end=V.size}function Oa(ie,V,j,J){for(var de=0;de1?1:j}function Ds(ie,V,j,J,de,be,Fe,Oe){if(J/=V,be>=(j/=V)&&Fe=J)return null;for(var Ce=[],Ve=0;Ve=j&&rn=J)){var Kt=[];if("Point"===wt||"MultiPoint"===wt)Ud(Pt,Kt,j,J,de);else if("LineString"===wt)Es(Pt,Kt,j,J,de,!1,Oe.lineMetrics);else if("MultiLineString"===wt)Vl(Pt,Kt,j,J,de,!1);else if("Polygon"===wt)Vl(Pt,Kt,j,J,de,!0);else if("MultiPolygon"===wt)for(var En=0;En=j&&Fe<=J&&(V.push(ie[be]),V.push(ie[be+1]),V.push(ie[be+2]))}}function Es(ie,V,j,J,de,be,Fe){for(var Oe,Ce,Ve=rl(ie),yt=0===de?hp:Ec,Pt=ie.start,wt=0;wtj&&(Ce=yt(Ve,Yt,rn,En,ei,j),Fe&&(Ve.start=Pt+Oe*Ce)):vi>J?an=j&&(Ce=yt(Ve,Yt,rn,En,ei,j),Ni=!0),an>J&&vi<=J&&(Ce=yt(Ve,Yt,rn,En,ei,J),Ni=!0),!be&&Ni&&(Fe&&(Ve.end=Pt+Oe*Ce),V.push(Ve),Ve=rl(ie)),Fe&&(Pt+=Oe)}var Ii=ie.length-3;Yt=ie[Ii],rn=ie[Ii+1],Kt=ie[Ii+2],(vi=0===de?Yt:rn)>=j&&vi<=J&&Du(Ve,Yt,rn,Kt),Ii=Ve.length-3,be&&Ii>=3&&(Ve[Ii]!==Ve[0]||Ve[Ii+1]!==Ve[1])&&Du(Ve,Ve[0],Ve[1],Ve[2]),Ve.length&&V.push(Ve)}function rl(ie){var V=[];return V.size=ie.size,V.start=ie.start,V.end=ie.end,V}function Vl(ie,V,j,J,de,be){for(var Fe=0;FeFe.maxX&&(Fe.maxX=yt),Pt>Fe.maxY&&(Fe.maxY=Pt)}return Fe}function Tc(ie,V,j,J){var de=V.geometry,be=V.type,Fe=[];if("Point"===be||"MultiPoint"===be)for(var Oe=0;Oe0&&V.size<(de?Fe:J))j.numPoints+=V.length/3;else{for(var Oe=[],Ce=0;CeFe)&&(j.numSimplified++,Oe.push(V[Ce]),Oe.push(V[Ce+1])),j.numPoints++;de&&function(Ve,yt){for(var Pt=0,wt=0,Yt=Ve.length,rn=Yt-2;wt0===yt)for(wt=0,Yt=Ve.length;wt24)throw new Error("maxZoom should be in the 0-24 range");if(V.promoteId&&V.generateId)throw new Error("promoteId and generateId cannot be used together.");var de,be,Fe,Oe,Ce,Ve,J=function(de,be){var Fe=[];if("FeatureCollection"===de.type)for(var Oe=0;Oe1&&console.time("creation"),wt=this.tiles[Pt]=Au(ie,V,j,J,Ce),this.tileCoords.push({z:V,x:j,y:J}),Ve)){Ve>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",V,j,J,wt.numFeatures,wt.numPoints,wt.numSimplified),console.timeEnd("creation"));var Yt="z"+V;this.stats[Yt]=(this.stats[Yt]||0)+1,this.total++}if(wt.source=ie,de){if(V===Ce.maxZoom||V===de)continue;var rn=1<1&&console.time("clipping");var Kt,En,ei,vi,an,Ni,Ii=.5*Ce.buffer/Ce.extent,pa=.5-Ii,Fa=.5+Ii,cs=1+Ii;Kt=En=ei=vi=null,an=Ds(ie,yt,j-Ii,j+Fa,0,wt.minX,wt.maxX,Ce),Ni=Ds(ie,yt,j+pa,j+cs,0,wt.minX,wt.maxX,Ce),ie=null,an&&(Kt=Ds(an,yt,J-Ii,J+Fa,1,wt.minY,wt.maxY,Ce),En=Ds(an,yt,J+pa,J+cs,1,wt.minY,wt.maxY,Ce),an=null),Ni&&(ei=Ds(Ni,yt,J-Ii,J+Fa,1,wt.minY,wt.maxY,Ce),vi=Ds(Ni,yt,J+pa,J+cs,1,wt.minY,wt.maxY,Ce),Ni=null),Ve>1&&console.timeEnd("clipping"),Oe.push(Kt||[],V+1,2*j,2*J),Oe.push(En||[],V+1,2*j,2*J+1),Oe.push(ei||[],V+1,2*j+1,2*J),Oe.push(vi||[],V+1,2*j+1,2*J+1)}}},ol.prototype.getTile=function(ie,V,j){var J=this.options,de=J.extent,be=J.debug;if(ie<0||ie>24)return null;var Fe=1<1&&console.log("drilling down to z%d-%d-%d",ie,V,j);for(var Ce,Ve=ie,yt=V,Pt=j;!Ce&&Ve>0;)Ve--,yt=Math.floor(yt/2),Pt=Math.floor(Pt/2),Ce=this.tiles[jl(Ve,yt,Pt)];return Ce&&Ce.source?(be>1&&console.log("found parent tile z%d-%d-%d",Ve,yt,Pt),be>1&&console.time("drilling down"),this.splitTile(Ce.source,Ve,yt,Pt,ie,V,j),be>1&&console.timeEnd("drilling down"),this.tiles[Oe]?Tu(this.tiles[Oe],de):null):null};class sl extends h.VectorTileWorkerSource{constructor(V,j,J,de,be){super(V,j,J,de,Ts),be&&(this.loadGeoJSON=be)}loadData(V,j){const J=V&&V.request,de=J&&J.collectResourceTiming;this.loadGeoJSON(V,(be,Fe)=>{if(be||!Fe)return j(be);if("object"!=typeof Fe)return j(new Error(`Input data given to '${V.source}' is not a valid GeoJSON object.`));{Ie(Fe,!0);try{if(V.filter){const Ce=h.createExpression(V.filter,{type:"boolean","property-type":"data-driven",overridable:!1,transition:!1});if("error"===Ce.result)throw new Error(Ce.value.map(yt=>`${yt.key}: ${yt.message}`).join(", "));Fe={type:"FeatureCollection",features:Fe.features.filter(yt=>Ce.value.evaluate({zoom:0},yt))}}this._geoJSONIndex=V.cluster?new Nn(function({superclusterOptions:Ce,clusterProperties:Ve}){if(!Ve||!Ce)return Ce;const yt={},Pt={},wt={accumulated:null,zoom:0},Yt={properties:null},rn=Object.keys(Ve);for(const Kt of rn){const[En,ei]=Ve[Kt],vi=h.createExpression(ei),an=h.createExpression("string"==typeof En?[En,["accumulated"],["get",Kt]]:En);yt[Kt]=vi.value,Pt[Kt]=an.value}return Ce.map=Kt=>{Yt.properties=Kt;const En={};for(const ei of rn)En[ei]=yt[ei].evaluate(wt,Yt);return En},Ce.reduce=(Kt,En)=>{Yt.properties=En;for(const ei of rn)wt.accumulated=Kt[ei],Kt[ei]=Pt[ei].evaluate(wt,Yt)},Ce}(V)).load(Fe.features):new ol(Ce=Fe,V.geojsonVtOptions)}catch(Ce){return j(Ce)}this.loaded={};const Oe={};if(de){const Ce=h.getPerformanceMeasurement(J);Ce&&(Oe.resourceTiming={},Oe.resourceTiming[V.source]=JSON.parse(JSON.stringify(Ce)))}j(null,Oe)}var Ce})}reloadTile(V,j){const J=this.loaded;return J&&J[V.uid]?super.reloadTile(V,j):this.loadTile(V,j)}loadGeoJSON(V,j){if(V.request)h.getJSON(V.request,j);else{if("string"!=typeof V.data)return j(new Error(`Input data given to '${V.source}' is not a valid GeoJSON object.`));try{return j(null,JSON.parse(V.data))}catch{return j(new Error(`Input data given to '${V.source}' is not a valid GeoJSON object.`))}}}getClusterExpansionZoom(V,j){try{j(null,this._geoJSONIndex.getClusterExpansionZoom(V.clusterId))}catch(J){j(J)}}getClusterChildren(V,j){try{j(null,this._geoJSONIndex.getChildren(V.clusterId))}catch(J){j(J)}}getClusterLeaves(V,j){try{j(null,this._geoJSONIndex.getLeaves(V.clusterId,V.limit,V.offset))}catch(J){j(J)}}}class Ac{constructor(V){this.self=V,this.actor=new h.Actor(V,this),this.layerIndexes={},this.availableImages={},this.isSpriteLoaded={},this.projections={},this.defaultProjection=h.getProjection({name:"mercator"}),this.workerSourceTypes={vector:h.VectorTileWorkerSource,geojson:sl},this.workerSources={},this.demWorkerSources={},this.self.registerWorkerSource=(j,J)=>{if(this.workerSourceTypes[j])throw new Error(`Worker source with name "${j}" already registered.`);this.workerSourceTypes[j]=J},this.self.registerRTLTextPlugin=j=>{if(h.plugin.isParsed())throw new Error("RTL text plugin already registered.");h.plugin.applyArabicShaping=j.applyArabicShaping,h.plugin.processBidirectionalText=j.processBidirectionalText,h.plugin.processStyledBidirectionalText=j.processStyledBidirectionalText}}clearCaches(V,j,J){delete this.layerIndexes[V],delete this.availableImages[V],delete this.workerSources[V],delete this.demWorkerSources[V],J()}checkIfReady(V,j,J){J()}setReferrer(V,j){this.referrer=j}spriteLoaded(V,j){this.isSpriteLoaded[V]=j;for(const J in this.workerSources[V]){const de=this.workerSources[V][J];for(const be in de)de[be]instanceof h.VectorTileWorkerSource&&(de[be].isSpriteLoaded=j,de[be].fire(new h.Event("isSpriteLoaded")))}}setImages(V,j,J){this.availableImages[V]=j;for(const de in this.workerSources[V]){const be=this.workerSources[V][de];for(const Fe in be)be[Fe].availableImages=j}J()}enableTerrain(V,j,J){this.terrain=j,J()}setProjection(V,j){this.projections[V]=h.getProjection(j)}setLayers(V,j,J){this.getLayerIndex(V).replace(j),J()}updateLayers(V,j,J){this.getLayerIndex(V).update(j.layers,j.removedIds),J()}loadTile(V,j,J){const de=this.enableTerrain?h.extend({enableTerrain:this.terrain},j):j;de.projection=this.projections[V]||this.defaultProjection,this.getWorkerSource(V,j.type,j.source).loadTile(de,J)}loadDEMTile(V,j,J){const de=this.enableTerrain?h.extend({buildQuadTree:this.terrain},j):j;this.getDEMWorkerSource(V,j.source).loadTile(de,J)}reloadTile(V,j,J){const de=this.enableTerrain?h.extend({enableTerrain:this.terrain},j):j;de.projection=this.projections[V]||this.defaultProjection,this.getWorkerSource(V,j.type,j.source).reloadTile(de,J)}abortTile(V,j,J){this.getWorkerSource(V,j.type,j.source).abortTile(j,J)}removeTile(V,j,J){this.getWorkerSource(V,j.type,j.source).removeTile(j,J)}removeSource(V,j,J){if(!this.workerSources[V]||!this.workerSources[V][j.type]||!this.workerSources[V][j.type][j.source])return;const de=this.workerSources[V][j.type][j.source];delete this.workerSources[V][j.type][j.source],void 0!==de.removeSource?de.removeSource(j,J):J()}loadWorkerSource(V,j,J){try{this.self.importScripts(j.url),J()}catch(de){J(de.toString())}}syncRTLPluginState(V,j,J){try{h.plugin.setState(j);const de=h.plugin.getPluginURL();if(h.plugin.isLoaded()&&!h.plugin.isParsed()&&null!=de){this.self.importScripts(de);const be=h.plugin.isParsed();J(be?void 0:new Error(`RTL Text Plugin failed to import scripts from ${de}`),be)}}catch(de){J(de.toString())}}getAvailableImages(V){let j=this.availableImages[V];return j||(j=[]),j}getLayerIndex(V){let j=this.layerIndexes[V];return j||(j=this.layerIndexes[V]=new Re),j}getWorkerSource(V,j,J){return this.workerSources[V]||(this.workerSources[V]={}),this.workerSources[V][j]||(this.workerSources[V][j]={}),this.workerSources[V][j][J]||(this.workerSources[V][j][J]=new this.workerSourceTypes[j]({send:(be,Fe,Oe,Ce,Ve,yt)=>{this.actor.send(be,Fe,Oe,V,Ve,yt)},scheduler:this.actor.scheduler},this.getLayerIndex(V),this.getAvailableImages(V),this.isSpriteLoaded[V])),this.workerSources[V][j][J]}getDEMWorkerSource(V,j){return this.demWorkerSources[V]||(this.demWorkerSources[V]={}),this.demWorkerSources[V][j]||(this.demWorkerSources[V][j]=new De),this.demWorkerSources[V][j]}enforceCacheSizeLimit(V,j){h.enforceCacheSizeLimit(j)}getWorkerPerformanceMetrics(V,j,J){J(void 0,void 0)}}return typeof WorkerGlobalScope<"u"&&typeof self<"u"&&self instanceof WorkerGlobalScope&&(self.worker=new Ac(self)),Ac}),tt(0,function(h){function $(m,c){if(Array.isArray(m)){if(!Array.isArray(c)||m.length!==c.length)return!1;for(let p=0;p"u"||typeof document>"u"||!(Array.prototype&&Array.prototype.every&&Array.prototype.filter&&Array.prototype.forEach&&Array.prototype.indexOf&&Array.prototype.lastIndexOf&&Array.prototype.map&&Array.prototype.some&&Array.prototype.reduce&&Array.prototype.reduceRight&&Array.isArray)||!Function.prototype||!Function.prototype.bind||!(Object.keys&&Object.create&&Object.getPrototypeOf&&Object.getOwnPropertyNames&&Object.isSealed&&Object.isFrozen&&Object.isExtensible&&Object.getOwnPropertyDescriptor&&Object.defineProperty&&Object.defineProperties&&Object.seal&&Object.freeze&&Object.preventExtensions)||!("JSON"in window&&"parse"in JSON&&"stringify"in JSON)||!function(){if(!("Worker"in window&&"Blob"in window&&"URL"in window))return!1;var y,b,C=new Blob([""],{type:"text/javascript"}),E=URL.createObjectURL(C);try{b=new Worker(E),y=!0}catch{y=!1}return b&&b.terminate(),URL.revokeObjectURL(E),y}()||!("Uint8ClampedArray"in window)||!ArrayBuffer.isView||!function(){var y=document.createElement("canvas");y.width=y.height=1;var b=y.getContext("2d");if(!b)return!1;var C=b.getImageData(0,0,1,1);return C&&C.width===y.width}()||(void 0===De[p=c&&c.failIfMajorPerformanceCaveat]&&(De[p]=function(y){var b,E,T,k,C=(E=y,T=document.createElement("canvas"),(k=Object.create(Re.webGLContextAttributes)).failIfMajorPerformanceCaveat=E,T.getContext("webgl",k)||T.getContext("experimental-webgl",k));if(!C)return!1;try{b=C.createShader(C.VERTEX_SHADER)}catch{return!1}return!(!b||C.isContextLost())&&(C.shaderSource(b,"void main() {}"),C.compileShader(b),!0===C.getShaderParameter(b,C.COMPILE_STATUS))}(p)),!De[p]||document.documentMode));var c,p}var De={};function Ie(m,c,p){const y=h.window.document.createElement(m);return void 0!==c&&(y.className=c),p&&p.appendChild(y),y}function ct(m,c,p){const y=h.window.document.createElementNS("http://www.w3.org/2000/svg",m);for(const b of Object.keys(c))y.setAttributeNS(null,b,c[b]);return p&&p.appendChild(y),y}Re.webGLContextAttributes={antialias:!1,alpha:!0,stencil:!0,depth:!0};const zt=h.window.document&&h.window.document.documentElement.style,Ot=zt&&void 0!==zt.userSelect?"userSelect":"WebkitUserSelect";let Ut;function At(){zt&&Ot&&(Ut=zt[Ot],zt[Ot]="none")}function St(){zt&&Ot&&(zt[Ot]=Ut)}function le(m){m.preventDefault(),m.stopPropagation(),h.window.removeEventListener("click",le,!0)}function Xe(){h.window.addEventListener("click",le,!0),h.window.setTimeout(()=>{h.window.removeEventListener("click",le,!0)},0)}function Ee(m,c){const p=m.getBoundingClientRect();return ht(m,p,c)}function Ne(m,c){const p=m.getBoundingClientRect(),y=[];for(let b=0;b=0?0:m.button}function ht(m,c,p){const y=m.offsetWidth===c.width?1:m.offsetWidth/c.width;return new h.pointGeometry((p.clientX-c.left)*y,(p.clientY-c.top)*y)}function ot(m,c){var p=c[0],y=c[1],b=c[2],C=c[3],E=p*C-b*y;return E?(m[0]=C*(E=1/E),m[1]=-y*E,m[2]=-b*E,m[3]=p*E,m):null}function ft(m){const{userImage:c}=m;return!!(c&&c.render&&c.render())&&(m.data.replace(new Uint8Array(c.data.buffer)),!0)}class Lt extends h.Evented{constructor(){super(),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new h.RGBAImage({width:1,height:1}),this.dirty=!0}isLoaded(){return this.loaded}setLoaded(c){if(this.loaded!==c&&(this.loaded=c,c)){for(const{ids:p,callback:y}of this.requestors)this._notify(p,y);this.requestors=[]}}hasImage(c){return!!this.getImage(c)}getImage(c){return this.images[c]}addImage(c,p){this._validate(c,p)&&(this.images[c]=p)}_validate(c,p){let y=!0;return this._validateStretch(p.stretchX,p.data&&p.data.width)||(this.fire(new h.ErrorEvent(new Error(`Image "${c}" has invalid "stretchX" value`))),y=!1),this._validateStretch(p.stretchY,p.data&&p.data.height)||(this.fire(new h.ErrorEvent(new Error(`Image "${c}" has invalid "stretchY" value`))),y=!1),this._validateContent(p.content,p)||(this.fire(new h.ErrorEvent(new Error(`Image "${c}" has invalid "content" value`))),y=!1),y}_validateStretch(c,p){if(!c)return!0;let y=0;for(const b of c){if(b[0]{this.ready=!0})}broadcast(c,p,y){h.asyncAll(this.actors,(b,C)=>{b.send(c,p,C)},y=y||function(){})}getActor(){return this.currentActor=(this.currentActor+1)%this.actors.length,this.actors[this.currentActor]}remove(){this.actors.forEach(c=>{c.remove()}),this.actors=[],this.workerPool.release(this.id)}}function Bo(m,c,p){return c*(h.EXTENT/(m.tileSize*Math.pow(2,p-m.tileID.overscaledZ)))}Ss.Actor=h.Actor;class Zt{constructor(c,p,y,b){this.screenBounds=c,this.cameraPoint=p,this._screenRaycastCache={},this._cameraRaycastCache={},this.isAboveHorizon=y,this.screenGeometry=this.bufferedScreenGeometry(0),this.screenGeometryMercator=this._bufferedScreenMercator(0,b)}static createFromScreenPoints(c,p){let y,b;if(c instanceof h.pointGeometry||"number"==typeof c[0]){const C=h.pointGeometry.convert(c);y=[C],b=p.isPointAboveHorizon(C)}else{const C=h.pointGeometry.convert(c[0]),E=h.pointGeometry.convert(c[1]);y=[C,E],b=h.polygonizeBounds(C,E).every(T=>p.isPointAboveHorizon(T))}return new Zt(y,p.getCameraPoint(),b,p)}isPointQuery(){return 1===this.screenBounds.length}bufferedScreenGeometry(c){return h.polygonizeBounds(this.screenBounds[0],1===this.screenBounds.length?this.screenBounds[0]:this.screenBounds[1],c)}bufferedCameraGeometry(c){const p=this.screenBounds[0],y=1===this.screenBounds.length?this.screenBounds[0].add(new h.pointGeometry(1,1)):this.screenBounds[1],b=h.polygonizeBounds(p,y,0,!1);return this.cameraPoint.y>y.y&&(this.cameraPoint.x>p.x&&this.cameraPoint.x=y.x?b[2]=this.cameraPoint:this.cameraPoint.x<=p.x&&(b[3]=this.cameraPoint)),h.bufferConvexPolygon(b,c)}bufferedCameraGeometryGlobe(c){const p=this.screenBounds[0],y=1===this.screenBounds.length?this.screenBounds[0].add(new h.pointGeometry(1,1)):this.screenBounds[1],b=h.polygonizeBounds(p,y,c),C=this.cameraPoint.clone();switch(3*((C.y>p.y)+(C.y>y.y))+((C.x>p.x)+(C.x>y.x))){case 0:b[0]=C,b[4]=C.clone();break;case 1:b.splice(1,0,C);break;case 2:b[1]=C;break;case 3:b.splice(4,0,C);break;case 5:b.splice(2,0,C);break;case 6:b[3]=C;break;case 7:b.splice(3,0,C);break;case 8:b[2]=C}return b}containsTile(c,p,y,b=0){const C=c.queryPadding/p._pixelsPerMercatorPixel+1,E=y?this._bufferedCameraMercator(C,p):this._bufferedScreenMercator(C,p);let T=c.tileID.wrap+(E.unwrapped?b:0);const k=E.polygon.map(q=>h.getTilePoint(c.tileTransform,q,T));if(!h.polygonIntersectsBox(k,0,0,h.EXTENT,h.EXTENT))return;T=c.tileID.wrap+(this.screenGeometryMercator.unwrapped?b:0);const F=this.screenGeometryMercator.polygon.map(q=>h.getTileVec3(c.tileTransform,q,T)),O=F.map(q=>new h.pointGeometry(q[0],q[1])),G=p.getFreeCameraOptions().position||new h.MercatorCoordinate(0,0,0),W=h.getTileVec3(c.tileTransform,G,T),Q=F.map(q=>{const X=h.sub(q,q,W);return h.normalize(X,X),new h.Ray(W,X)}),K=Bo(c,1,p.zoom)*p._pixelsPerMercatorPixel;return{queryGeometry:this,tilespaceGeometry:O,tilespaceRays:Q,bufferedTilespaceGeometry:k,bufferedTilespaceBounds:(ne=h.getBounds(k),ne.min.x=h.clamp(ne.min.x,0,h.EXTENT),ne.min.y=h.clamp(ne.min.y,0,h.EXTENT),ne.max.x=h.clamp(ne.max.x,0,h.EXTENT),ne.max.y=h.clamp(ne.max.y,0,h.EXTENT),ne),tile:c,tileID:c.tileID,pixelToTileUnitsFactor:K};var ne}_bufferedScreenMercator(c,p){const y=bi(c);if(this._screenRaycastCache[y])return this._screenRaycastCache[y];{let b;return b="globe"===p.projection.name?this._projectAndResample(this.bufferedScreenGeometry(c),p):{polygon:this.bufferedScreenGeometry(c).map(C=>p.pointCoordinate3D(C)),unwrapped:!0},this._screenRaycastCache[y]=b,b}}_bufferedCameraMercator(c,p){const y=bi(c);if(this._cameraRaycastCache[y])return this._cameraRaycastCache[y];{let b;return b="globe"===p.projection.name?this._projectAndResample(this.bufferedCameraGeometryGlobe(c),p):{polygon:this.bufferedCameraGeometry(c).map(C=>p.pointCoordinate3D(C)),unwrapped:!0},this._cameraRaycastCache[y]=b,b}}_projectAndResample(c,p){const y=function(C,E){const T=h.multiply([],E.pixelMatrix,E.globeMatrix),k=[0,-h.GLOBE_RADIUS,0,1],F=[0,h.GLOBE_RADIUS,0,1],O=[0,0,0,1];h.transformMat4$1(k,k,T),h.transformMat4$1(F,F,T),h.transformMat4$1(O,O,T);const G=new h.pointGeometry(k[0]/k[3],k[1]/k[3]),W=new h.pointGeometry(F[0]/F[3],F[1]/F[3]),Q=h.polygonContainsPoint(C,G)&&k[3]1?ca(C.slice(0,q),E):[],te=qnew h.pointGeometry(Mo(Me.x),Me.y)),te=te.map(Me=>new h.pointGeometry(Mo(Me.x),Me.y));const ce=[...ee];0===ce.length&&ce.push(te[te.length-1]);const _e=h.number(ce[ce.length-1].y,(0===te.length?ee[0]:te[0]).y,X);let ge;return ge=Q?[new h.pointGeometry(0,_e),new h.pointGeometry(0,0),new h.pointGeometry(1,0),new h.pointGeometry(1,_e)]:[new h.pointGeometry(1,_e),new h.pointGeometry(1,1),new h.pointGeometry(0,1),new h.pointGeometry(0,_e)],ce.push(...ge),0===te.length?ce.push(ee[0]):ce.push(...te),{polygon:ce.map(Me=>new h.MercatorCoordinate(Me.x,Me.y)),unwrapped:!1}}(c,p);if(y)return y;const b=function(C,E){let T=!1,k=-1/0,F=0;for(let G=0;Gk&&(k=C[G].x,F=G);for(let G=0;G.5&&(Q.x{G.x-=1}),{polygon:C,unwrapped:T}}(ca(c,p).map(C=>new h.pointGeometry(Mo(C.x),C.y)),p);return{polygon:b.polygon.map(C=>new h.MercatorCoordinate(C.x,C.y)),unwrapped:b.unwrapped}}}function ca(m,c){return h.resample(m,p=>{const y=c.pointCoordinate3D(p);p.x=y.x,p.y=y.y},1/256)}function Mo(m){return m<0?1+m%1:m%1}function bi(m){return 100*m|0}function Nn(m,c,p,y,b){const C=function(E,T){if(E)return b(E);if(T){m.url&&T.tiles&&m.tiles&&delete m.tiles;const k=h.pick(h.extend(T,m),["tiles","minzoom","maxzoom","attribution","mapbox_logo","bounds","scheme","tileSize","encoding"]);T.vector_layers&&(k.vectorLayers=T.vector_layers,k.vectorLayerIds=k.vectorLayers.map(F=>F.id)),k.tiles=c.canonicalizeTileset(k,m.url),b(null,k)}};return m.url?h.getJSON(c.transformRequest(c.normalizeSourceURL(m.url,null,p,y),h.ResourceType.Source),C):h.exported.frame(()=>C(null,m))}class Cr{constructor(c,p,y){this.bounds=h.LngLatBounds.convert(this.validateBounds(c)),this.minzoom=p||0,this.maxzoom=y||24}validateBounds(c){return Array.isArray(c)&&4===c.length?[Math.max(-180,c[0]),Math.max(-90,c[1]),Math.min(180,c[2]),Math.min(90,c[3])]:[-180,-90,180,90]}contains(c){const p=Math.pow(2,c.z),y=Math.floor(h.mercatorXfromLng(this.bounds.getWest())*p),b=Math.floor(h.mercatorYfromLat(this.bounds.getNorth())*p),C=Math.ceil(h.mercatorXfromLng(this.bounds.getEast())*p),E=Math.ceil(h.mercatorYfromLat(this.bounds.getSouth())*p);return c.x>=y&&c.x=b&&c.y{this._tileJSONRequest=null,this._loaded=!0,c?this.fire(new h.ErrorEvent(c)):p&&(h.extend(this,p),p.bounds&&(this.tileBounds=new Cr(p.bounds,this.minzoom,this.maxzoom)),h.postTurnstileEvent(p.tiles),this.fire(new h.Event("data",{dataType:"source",sourceDataType:"metadata"})),this.fire(new h.Event("data",{dataType:"source",sourceDataType:"content"})))})}loaded(){return this._loaded}onAdd(c){this.map=c,this.load()}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.cancel(),this._tileJSONRequest=null)}serialize(){return h.extend({},this._options)}hasTile(c){return!this.tileBounds||this.tileBounds.contains(c.canonical)}loadTile(c,p){const y=h.exported.devicePixelRatio>=2,b=this.map._requestManager.normalizeTileURL(c.tileID.canonical.url(this.tiles,this.scheme),y,this.tileSize);c.request=h.getImage(this.map._requestManager.transformRequest(b,h.ResourceType.Tile),(C,E,T,k)=>(delete c.request,c.aborted?(c.state="unloaded",p(null)):C?(c.state="errored",p(C)):E?(this.map._refreshExpiredTiles&&c.setExpiryData({cacheControl:T,expires:k}),c.setTexture(E,this.map.painter),c.state="loaded",h.cacheEntryPossiblyAdded(this.dispatcher),void p(null)):p(null)))}static loadTileData(c,p,y){c.setTexture(p,y)}static unloadTileData(c,p){c.texture&&p.saveTileTexture(c.texture)}abortTile(c,p){c.request&&(c.request.cancel(),delete c.request),p()}unloadTile(c,p){c.texture&&this.map.painter.saveTileTexture(c.texture),p()}hasTransition(){return!1}}let J;function de(m,c,p,y,b,C,E,T){const k=[m,p,b,c,y,C,1,1,1],F=[E,T,1],O=h.adjoint([],k),[G,W,Q]=h.transformMat3(F,F,h.transpose(O,O));return h.multiply$1(k,[G,0,0,0,W,0,0,0,Q],k)}class be extends h.Evented{constructor(c,p,y,b){super(),this.id=c,this.dispatcher=y,this.coordinates=p.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(b),this.options=p,this._dirty=!1}load(c,p){this._loaded=p||!1,this.fire(new h.Event("dataloading",{dataType:"source"})),this.url=this.options.url,this._imageRequest=h.getImage(this.map._requestManager.transformRequest(this.url,h.ResourceType.Image),(y,b)=>{if(this._imageRequest=null,this._loaded=!0,y)this.fire(new h.ErrorEvent(y));else if(b){const{HTMLImageElement:C}=h.window;this.image=b instanceof C?h.exported.getImageData(b):b,this._dirty=!0,this.width=this.image.width,this.height=this.image.height,c&&(this.coordinates=c),this._finishLoading()}})}loaded(){return this._loaded}updateImage(c){return this.image&&c.url?(this._imageRequest&&c.url!==this.options.url&&(this._imageRequest.cancel(),this._imageRequest=null),this.options.url=c.url,this.load(c.coordinates,this._loaded),this):this}_finishLoading(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new h.Event("data",{dataType:"source",sourceDataType:"metadata"})))}onAdd(c){this.map=c,this.load()}onRemove(){this._imageRequest&&(this._imageRequest.cancel(),this._imageRequest=null),this.texture&&this.texture.destroy()}setCoordinates(c){this.coordinates=c,this._boundsArray=void 0;const p=c.map(h.MercatorCoordinate.fromLngLat);return this.tileID=function(y){let b=1/0,C=1/0,E=-1/0,T=-1/0;for(const G of y)b=Math.min(b,G.x),C=Math.min(C,G.y),E=Math.max(E,G.x),T=Math.max(T,G.y);const k=Math.max(E-b,T-C),F=Math.max(0,Math.floor(-Math.log(k)/Math.LN2)),O=Math.pow(2,F);return new h.CanonicalTileID(F,Math.floor((b+E)/2*O),Math.floor((C+T)/2*O))}(p),this.minzoom=this.maxzoom=this.tileID.z,this.fire(new h.Event("data",{dataType:"source",sourceDataType:"content"})),this}_clear(){this._boundsArray=void 0}_prepareData(c){for(const k in this.tiles){const F=this.tiles[k];"loaded"!==F.state&&(F.state="loaded",F.texture=this.texture)}if(this._boundsArray)return;const p=h.tileTransform(this.tileID,this.map.transform.projection),[y,b,C,E]=this.coordinates.map(k=>{const F=p.projection.project(k[0],k[1]);return h.getTilePoint(p,F)._round()});this.perspectiveTransform=function(k,F,O,G,W,Q,K,ne,q,X){const ee=de(0,0,k,0,0,F,k,F),te=de(O,G,W,Q,K,ne,q,X);return h.multiply$1(te,h.adjoint(ee,ee),te),[te[6]/te[8]*k/h.EXTENT,te[7]/te[8]*F/h.EXTENT]}(this.width,this.height,y.x,y.y,b.x,b.y,E.x,E.y,C.x,C.y);const T=this._boundsArray=new h.StructArrayLayout4i8;T.emplaceBack(y.x,y.y,0,0),T.emplaceBack(b.x,b.y,h.EXTENT,0),T.emplaceBack(E.x,E.y,0,h.EXTENT),T.emplaceBack(C.x,C.y,h.EXTENT,h.EXTENT),this.boundsBuffer&&this.boundsBuffer.destroy(),this.boundsBuffer=c.createVertexBuffer(T,h.boundsAttributes.members),this.boundsSegments=h.SegmentVector.simpleSegment(0,0,4,2)}prepare(){if(0===Object.keys(this.tiles).length||!this.image)return;const c=this.map.painter.context,p=c.gl;this._dirty&&(this.texture?this.texture.update(this.image):(this.texture=new h.Texture(c,this.image,p.RGBA),this.texture.bind(p.LINEAR,p.CLAMP_TO_EDGE)),this._dirty=!1),this._prepareData(c)}loadTile(c,p){this.tileID&&this.tileID.equals(c.tileID.canonical)?(this.tiles[String(c.tileID.wrap)]=c,c.buckets={},p(null)):(c.state="errored",p(null))}serialize(){return{type:"image",url:this.options.url,coordinates:this.coordinates}}hasTransition(){return!1}}const Fe={vector:class extends h.Evented{constructor(m,c,p,y){if(super(),this.id=m,this.dispatcher=p,this.type="vector",this.minzoom=0,this.maxzoom=22,this.scheme="xyz",this.tileSize=512,this.reparseOverscaled=!0,this.isTileClipped=!0,this._loaded=!1,h.extend(this,h.pick(c,["url","scheme","tileSize","promoteId"])),this._options=h.extend({type:"vector"},c),this._collectResourceTiming=c.collectResourceTiming,512!==this.tileSize)throw new Error("vector tile sources must have a tileSize of 512");this.setEventedParent(y),this._tileWorkers={},this._deduped=new h.DedupedRequest}load(m){this._loaded=!1,this.fire(new h.Event("dataloading",{dataType:"source"}));const c=Array.isArray(this.map._language)?this.map._language.join():this.map._language,p=this.map._worldview;this._tileJSONRequest=Nn(this._options,this.map._requestManager,c,p,(y,b)=>{this._tileJSONRequest=null,this._loaded=!0,y?(c&&console.warn(`Ensure that your requested language string is a valid BCP-47 code or list of codes. Found: ${c}`),p&&2!==p.length&&console.warn(`Requested worldview strings must be a valid ISO alpha-2 code. Found: ${p}`),this.fire(new h.ErrorEvent(y))):b&&(h.extend(this,b),b.bounds&&(this.tileBounds=new Cr(b.bounds,this.minzoom,this.maxzoom)),h.postTurnstileEvent(b.tiles,this.map._requestManager._customAccessToken),this.fire(new h.Event("data",{dataType:"source",sourceDataType:"metadata"})),this.fire(new h.Event("data",{dataType:"source",sourceDataType:"content"}))),m&&m(y)})}loaded(){return this._loaded}hasTile(m){return!this.tileBounds||this.tileBounds.contains(m.canonical)}onAdd(m){this.map=m,this.load()}reload(){this.cancelTileJSONRequest(),this.load(()=>{const m=this.map.style._getSourceCaches(this.id);for(const c of m)c.clearTiles()})}setSourceProperty(m){m(),this.reload()}setTiles(m){return this._options.tiles=m,this.reload(),this}setUrl(m){return this.url=m,this._options.url=m,this.reload(),this}onRemove(){this.cancelTileJSONRequest()}serialize(){return h.extend({},this._options)}loadTile(m,c){const p=this.map._requestManager.normalizeTileURL(m.tileID.canonical.url(this.tiles,this.scheme)),y={request:this.map._requestManager.transformRequest(p,h.ResourceType.Tile),data:void 0,uid:m.uid,tileID:m.tileID,tileZoom:m.tileZoom,zoom:m.tileID.overscaledZ,tileSize:this.tileSize*m.tileID.overscaleFactor(),type:this.type,source:this.id,pixelRatio:h.exported.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId,isSymbolTile:m.isSymbolTile};if(y.request.collectResourceTiming=this._collectResourceTiming,m.actor&&"expired"!==m.state)"loading"===m.state?m.reloadCallback=c:m.request=m.actor.send("reloadTile",y,b.bind(this));else if(m.actor=this._tileWorkers[p]=this._tileWorkers[p]||this.dispatcher.getActor(),this.dispatcher.ready)m.request=m.actor.send("loadTile",y,b.bind(this),void 0,!0);else{const C=h.loadVectorTile.call({deduped:this._deduped},y,(E,T)=>{E||!T?b.call(this,E):(y.data={cacheControl:T.cacheControl,expires:T.expires,rawData:T.rawData.slice(0)},m.actor&&m.actor.send("loadTile",y,b.bind(this),void 0,!0))},!0);m.request={cancel:C}}function b(C,E){return delete m.request,m.aborted?c(null):C&&404!==C.status?c(C):(E&&E.resourceTiming&&(m.resourceTiming=E.resourceTiming),this.map._refreshExpiredTiles&&E&&m.setExpiryData(E),m.loadVectorData(E,this.map.painter),h.cacheEntryPossiblyAdded(this.dispatcher),c(null),void(m.reloadCallback&&(this.loadTile(m,m.reloadCallback),m.reloadCallback=null)))}}abortTile(m){m.request&&(m.request.cancel(),delete m.request),m.actor&&m.actor.send("abortTile",{uid:m.uid,type:this.type,source:this.id})}unloadTile(m){m.unloadVectorData(),m.actor&&m.actor.send("removeTile",{uid:m.uid,type:this.type,source:this.id})}hasTransition(){return!1}afterUpdate(){this._tileWorkers={}}cancelTileJSONRequest(){this._tileJSONRequest&&(this._tileJSONRequest.cancel(),this._tileJSONRequest=null)}},raster:j,"raster-dem":class extends j{constructor(m,c,p,y){super(m,c,p,y),this.type="raster-dem",this.maxzoom=22,this._options=h.extend({type:"raster-dem"},c),this.encoding=c.encoding||"mapbox"}loadTile(m,c){const p=this.map._requestManager.normalizeTileURL(m.tileID.canonical.url(this.tiles,this.scheme),!1,this.tileSize);function y(b,C){b&&(m.state="errored",c(b)),C&&(m.dem=C,m.dem.onDeserialize(),m.needsHillshadePrepare=!0,m.needsDEMTextureUpload=!0,m.state="loaded",c(null))}m.request=h.getImage(this.map._requestManager.transformRequest(p,h.ResourceType.Tile),function(b,C,E,T){if(delete m.request,m.aborted)m.state="unloaded",c(null);else if(b)m.state="errored",c(b);else if(C){this.map._refreshExpiredTiles&&m.setExpiryData({cacheControl:E,expires:T});const k=h.window.ImageBitmap&&C instanceof h.window.ImageBitmap&&(null==J&&(J=h.window.OffscreenCanvas&&new h.window.OffscreenCanvas(1,1).getContext("2d")&&"function"==typeof h.window.createImageBitmap),J),F=1-(C.width-h.prevPowerOfTwo(C.width))/2;F<1||m.neighboringTiles||(m.neighboringTiles=this._getNeighboringTiles(m.tileID));const O=k?C:h.exported.getImageData(C,F),G={uid:m.uid,coord:m.tileID,source:this.id,rawImageData:O,encoding:this.encoding,padding:F};m.actor&&"expired"!==m.state||(m.actor=this.dispatcher.getActor(),m.actor.send("loadDEMTile",G,y.bind(this),void 0,!0))}}.bind(this))}_getNeighboringTiles(m){const c=m.canonical,p=Math.pow(2,c.z),y=(c.x-1+p)%p,b=0===c.x?m.wrap-1:m.wrap,C=(c.x+1+p)%p,E=c.x+1===p?m.wrap+1:m.wrap,T={};return T[new h.OverscaledTileID(m.overscaledZ,b,c.z,y,c.y).key]={backfilled:!1},T[new h.OverscaledTileID(m.overscaledZ,E,c.z,C,c.y).key]={backfilled:!1},c.y>0&&(T[new h.OverscaledTileID(m.overscaledZ,b,c.z,y,c.y-1).key]={backfilled:!1},T[new h.OverscaledTileID(m.overscaledZ,m.wrap,c.z,c.x,c.y-1).key]={backfilled:!1},T[new h.OverscaledTileID(m.overscaledZ,E,c.z,C,c.y-1).key]={backfilled:!1}),c.y+1{if(this._loaded=!0,this._pendingLoad=null,p)this.fire(new h.ErrorEvent(p));else{const b={dataType:"source",sourceDataType:this._metadataFired?"content":"metadata"};this._collectResourceTiming&&y&&y.resourceTiming&&y.resourceTiming[this.id]&&(b.resourceTiming=y.resourceTiming[this.id]),this.fire(new h.Event("data",b)),this._metadataFired=!0}this._coalesce&&(this._updateWorkerData(),this._coalesce=!1)})}loaded(){return this._loaded}loadTile(m,c){const p=m.actor?"reloadTile":"loadTile";m.actor=this.actor,m.request=this.actor.send(p,{type:this.type,uid:m.uid,tileID:m.tileID,tileZoom:m.tileZoom,zoom:m.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:h.exported.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId},(y,b)=>(delete m.request,m.unloadVectorData(),m.aborted?c(null):y?c(y):(m.loadVectorData(b,this.map.painter,"reloadTile"===p),c(null))),void 0,"loadTile"===p)}abortTile(m){m.request&&(m.request.cancel(),delete m.request),m.aborted=!0}unloadTile(m){m.unloadVectorData(),this.actor.send("removeTile",{uid:m.uid,type:this.type,source:this.id})}onRemove(){this._pendingLoad&&this._pendingLoad.cancel()}serialize(){return h.extend({},this._options,{type:this.type,data:this._data})}hasTransition(){return!1}},video:class extends be{constructor(m,c,p,y){super(m,c,p,y),this.roundZoom=!0,this.type="video",this.options=c}load(){this._loaded=!1;const m=this.options;this.urls=[];for(const c of m.urls)this.urls.push(this.map._requestManager.transformRequest(c,h.ResourceType.Source).url);h.getVideo(this.urls,(c,p)=>{this._loaded=!0,c?this.fire(new h.ErrorEvent(c)):p&&(this.video=p,this.video.loop=!0,this.video.setAttribute("playsinline",""),this.video.addEventListener("playing",()=>{this.map.triggerRepaint()}),this.map&&this.video.play(),this._finishLoading())})}pause(){this.video&&this.video.pause()}play(){this.video&&this.video.play()}seek(m){if(this.video){const c=this.video.seekable;mc.end(0)?this.fire(new h.ErrorEvent(new h.ValidationError(`sources.${this.id}`,null,`Playback for this video can be set only between the ${c.start(0)} and ${c.end(0)}-second mark.`))):this.video.currentTime=m}}getVideo(){return this.video}onAdd(m){this.map||(this.map=m,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 m=this.map.painter.context,c=m.gl;this.texture?this.video.paused||(this.texture.bind(c.LINEAR,c.CLAMP_TO_EDGE),c.texSubImage2D(c.TEXTURE_2D,0,0,0,c.RGBA,c.UNSIGNED_BYTE,this.video)):(this.texture=new h.Texture(m,this.video,c.RGBA),this.texture.bind(c.LINEAR,c.CLAMP_TO_EDGE),this.width=this.video.videoWidth,this.height=this.video.videoHeight),this._prepareData(m)}serialize(){return{type:"video",urls:this.urls,coordinates:this.coordinates}}hasTransition(){return this.video&&!this.video.paused}},image:be,canvas:class extends be{constructor(m,c,p,y){super(m,c,p,y),c.coordinates?Array.isArray(c.coordinates)&&4===c.coordinates.length&&!c.coordinates.some(b=>!Array.isArray(b)||2!==b.length||b.some(C=>"number"!=typeof C))||this.fire(new h.ErrorEvent(new h.ValidationError(`sources.${m}`,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new h.ErrorEvent(new h.ValidationError(`sources.${m}`,null,'missing required property "coordinates"'))),c.animate&&"boolean"!=typeof c.animate&&this.fire(new h.ErrorEvent(new h.ValidationError(`sources.${m}`,null,'optional "animate" property must be a boolean value'))),c.canvas?"string"==typeof c.canvas||c.canvas instanceof h.window.HTMLCanvasElement||this.fire(new h.ErrorEvent(new h.ValidationError(`sources.${m}`,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 h.ErrorEvent(new h.ValidationError(`sources.${m}`,null,'missing required property "canvas"'))),this.options=c,this.animate=void 0===c.animate||c.animate}load(){this._loaded=!0,this.canvas||(this.canvas=this.options.canvas instanceof h.window.HTMLCanvasElement?this.options.canvas:h.window.document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()?this.fire(new h.ErrorEvent(new Error("Canvas dimensions cannot be less than or equal to zero."))):(this.play=function(){this._playing=!0,this.map.triggerRepaint()},this.pause=function(){this._playing&&(this.prepare(),this._playing=!1)},this._finishLoading())}getCanvas(){return this.canvas}onAdd(m){this.map=m,this.load(),this.canvas&&this.animate&&this.play()}onRemove(){this.pause()}prepare(){let m=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,m=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,m=!0),this._hasInvalidDimensions()||0===Object.keys(this.tiles).length)return;const c=this.map.painter.context;this.texture?(m||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new h.Texture(c,this.canvas,c.gl.RGBA,{premultiply:!0}),this._prepareData(c)}serialize(){return{type:"canvas",coordinates:this.coordinates}}hasTransition(){return this._playing}_hasInvalidDimensions(){for(const m of[this.canvas.width,this.canvas.height])if(isNaN(m)||m<=0)return!0;return!1}},custom:class extends h.Evented{constructor(m,c,p,y){super(),this.id=m,this.type="custom",this._dataType="raster",this._dispatcher=p,this._implementation=c,this.setEventedParent(y),this.scheme="xyz",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this._loaded=!1,this.roundZoom=!0,this._implementation||this.fire(new h.ErrorEvent(new Error(`Missing implementation for ${this.id} custom source`))),this._implementation.loadTile||this.fire(new h.ErrorEvent(new Error(`Missing loadTile implementation for ${this.id} custom source`))),this._implementation.bounds&&(this.tileBounds=new Cr(this._implementation.bounds,this.minzoom,this.maxzoom)),c.update=this._update.bind(this),c.clearTiles=this._clearTiles.bind(this),c.coveringTiles=this._coveringTiles.bind(this),h.extend(this,h.pick(c,["dataType","scheme","minzoom","maxzoom","tileSize","attribution","minTileCacheSize","maxTileCacheSize"]))}serialize(){return h.pick(this,["type","scheme","minzoom","maxzoom","tileSize","attribution"])}load(){this._loaded=!0,this.fire(new h.Event("data",{dataType:"source",sourceDataType:"metadata"})),this.fire(new h.Event("data",{dataType:"source",sourceDataType:"content"}))}loaded(){return this._loaded}onAdd(m){this._map=m,this._loaded=!1,this.fire(new h.Event("dataloading",{dataType:"source"})),this._implementation.onAdd&&this._implementation.onAdd(m),this.load()}onRemove(m){this._implementation.onRemove&&this._implementation.onRemove(m)}hasTile(m){if(this._implementation.hasTile){const{x:c,y:p,z:y}=m.canonical;return this._implementation.hasTile({x:c,y:p,z:y})}return!this.tileBounds||this.tileBounds.contains(m.canonical)}loadTile(m,c){const{x:p,y,z:b}=m.tileID.canonical,C=new h.window.AbortController;m.request=Promise.resolve(this._implementation.loadTile({x:p,y,z:b},{signal:C.signal})).then(function(E){return delete m.request,m.aborted?(m.state="unloaded",c(null)):void 0===E?(m.state="errored",c(null)):null===E?(this.loadTileData(m,{width:this.tileSize,height:this.tileSize,data:null}),m.state="loaded",c(null)):(T=E)instanceof h.window.ImageData||T instanceof h.window.HTMLCanvasElement||T instanceof h.window.ImageBitmap||T instanceof h.window.HTMLImageElement?(this.loadTileData(m,E),m.state="loaded",void c(null)):(m.state="errored",c(new Error(`Can't infer data type for ${this.id}, only raster data supported at the moment`)));var T}.bind(this)).catch(E=>{20!==E.code&&(m.state="errored",c(E))}),m.request.cancel=()=>C.abort()}loadTileData(m,c){j.loadTileData(m,c,this._map.painter)}unloadTileData(m){j.unloadTileData(m,this._map.painter)}unloadTile(m,c){if(this.unloadTileData(m),this._implementation.unloadTile){const{x:p,y,z:b}=m.tileID.canonical;this._implementation.unloadTile({x:p,y,z:b})}c()}abortTile(m,c){m.request&&m.request.cancel&&(m.request.cancel(),delete m.request),c()}hasTransition(){return!1}_coveringTiles(){return this._map.transform.coveringTiles({tileSize:this.tileSize,minzoom:this.minzoom,maxzoom:this.maxzoom,roundZoom:this.roundZoom}).map(m=>({x:m.canonical.x,y:m.canonical.y,z:m.canonical.z}))}_clearTiles(){this._map.style._clearSource(this.id)}_update(){this.fire(new h.Event("data",{dataType:"source",sourceDataType:"content"}))}}},Oe=function(m,c,p,y){const b=new Fe[c.type](m,c,p,y);if(b.id!==m)throw new Error(`Expected Source id to be ${m} instead of ${b.id}`);return h.bindAll(["load","abort","unload","serialize","prepare"],b),b};function Ce(m,c){const p=h.identity([]);return h.scale(p,p,[.5*m.width,.5*-m.height,1]),h.translate(p,p,[1,-1,0]),h.multiply(p,p,m.calculateProjMatrix(c.toUnwrapped())),Float32Array.from(p)}function Ve(m,c,p,y,b,C,E,T=!1){const k=m.tilesIn(y,E,T);k.sort(Pt);const F=[];for(const G of k)F.push({wrappedTileID:G.tile.tileID.wrapped().key,queryResults:G.tile.queryRenderedFeatures(c,p,m._state,G,b,C,Ce(m.transform,G.tile.tileID),T)});const O=function(G){const W={},Q={};for(const K of G){const ne=K.queryResults,q=K.wrappedTileID,X=Q[q]=Q[q]||{};for(const ee in ne){const te=ne[ee],ce=X[ee]=X[ee]||{},_e=W[ee]=W[ee]||[];for(const ge of te)ce[ge.featureIndex]||(ce[ge.featureIndex]=!0,_e.push(ge))}}return W}(F);for(const G in O)O[G].forEach(W=>{const Q=W.feature,K=Q.layer;K&&"background"!==K.type&&"sky"!==K.type&&(Q.source=K.source,K["source-layer"]&&(Q.sourceLayer=K["source-layer"]),Q.state=void 0!==Q.id?m.getFeatureState(K["source-layer"],Q.id):{})});return O}function yt(m,c){const p=m.getRenderableIds().map(C=>m.getTileByID(C)),y=[],b={};for(let C=0;C{p.terminate()}),this.workers=null)}isPreloaded(){return!!this.active[Yt]}numActive(){return Object.keys(this.active).length}}let Kt;function En(){return Kt||(Kt=new rn),Kt}function ei(m,c){const p={};for(const y in m)"ref"!==y&&(p[y]=m[y]);return h.refProperties.forEach(y=>{y in c&&(p[y]=c[y])}),p}function vi(m){m=m.slice();const c=Object.create(null);for(let p=0;p0?(b-E)/T:0;return this.points[C].mult(1-k).add(this.points[p].mult(k))}}class Ba{constructor(c,p,y){const b=this.boxCells=[],C=this.circleCells=[];this.xCellCount=Math.ceil(c/y),this.yCellCount=Math.ceil(p/y);for(let E=0;Ethis.width||b<0||p>this.height)return!C&&[];const T=[];if(c<=0&&p<=0&&this.width<=y&&this.height<=b){if(C)return!0;for(let k=0;k0:T}_queryCircle(c,p,y,b,C){const E=c-y,T=c+y,k=p-y,F=p+y;if(T<0||E>this.width||F<0||k>this.height)return!b&&[];const O=[];return this._forEachCell(E,k,T,F,this._queryCellCircle,O,{hitTest:b,circle:{x:c,y:p,radius:y},seenUids:{box:{},circle:{}}},C),b?O.length>0:O}query(c,p,y,b,C){return this._query(c,p,y,b,!1,C)}hitTest(c,p,y,b,C){return this._query(c,p,y,b,!0,C)}hitTestCircle(c,p,y,b){return this._queryCircle(c,p,y,!0,b)}_queryCell(c,p,y,b,C,E,T,k){const F=T.seenUids,O=this.boxCells[C];if(null!==O){const W=this.bboxes;for(const Q of O)if(!F.box[Q]){F.box[Q]=!0;const K=4*Q;if(c<=W[K+2]&&p<=W[K+3]&&y>=W[K+0]&&b>=W[K+1]&&(!k||k(this.boxKeys[Q]))){if(T.hitTest)return E.push(!0),!0;E.push({key:this.boxKeys[Q],x1:W[K],y1:W[K+1],x2:W[K+2],y2:W[K+3]})}}}const G=this.circleCells[C];if(null!==G){const W=this.circles;for(const Q of G)if(!F.circle[Q]){F.circle[Q]=!0;const K=3*Q;if(this._circleAndRectCollide(W[K],W[K+1],W[K+2],c,p,y,b)&&(!k||k(this.circleKeys[Q]))){if(T.hitTest)return E.push(!0),!0;{const ne=W[K],q=W[K+1],X=W[K+2];E.push({key:this.circleKeys[Q],x1:ne-X,y1:q-X,x2:ne+X,y2:q+X})}}}}}_queryCellCircle(c,p,y,b,C,E,T,k){const F=T.circle,O=T.seenUids,G=this.boxCells[C];if(null!==G){const Q=this.bboxes;for(const K of G)if(!O.box[K]){O.box[K]=!0;const ne=4*K;if(this._circleAndRectCollide(F.x,F.y,F.radius,Q[ne+0],Q[ne+1],Q[ne+2],Q[ne+3])&&(!k||k(this.boxKeys[K])))return E.push(!0),!0}}const W=this.circleCells[C];if(null!==W){const Q=this.circles;for(const K of W)if(!O.circle[K]){O.circle[K]=!0;const ne=3*K;if(this._circlesCollide(Q[ne],Q[ne+1],Q[ne+2],F.x,F.y,F.radius)&&(!k||k(this.circleKeys[K])))return E.push(!0),!0}}}_forEachCell(c,p,y,b,C,E,T,k){const F=this._convertToXCellCoord(c),O=this._convertToYCellCoord(p),G=this._convertToXCellCoord(y),W=this._convertToYCellCoord(b);for(let Q=F;Q<=G;Q++)for(let K=O;K<=W;K++)if(C.call(this,c,p,y,b,this.xCellCount*K+Q,E,T,k))return}_convertToXCellCoord(c){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(c*this.xScale)))}_convertToYCellCoord(c){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(c*this.yScale)))}_circlesCollide(c,p,y,b,C,E){const T=b-c,k=C-p,F=y+E;return F*F>T*T+k*k}_circleAndRectCollide(c,p,y,b,C,E,T){const k=(E-b)/2,F=Math.abs(c-(b+k));if(F>k+y)return!1;const O=(T-C)/2,G=Math.abs(p-(C+O));if(G>O+y)return!1;if(F<=k||G<=O)return!0;const W=F-k,Q=G-O;return W*W+Q*Q<=y*y}}const lm=Math.tan(85*Math.PI/180);function us(m,c,p,y,b,C,E){const T=h.create();if(p)if("globe"===C.name){const k=h.calculateGlobeLabelMatrix(b,c);h.multiply(T,T,k)}else{const k=ot([],E);T[0]=k[0],T[1]=k[1],T[4]=k[2],T[5]=k[3],y||h.rotateZ(T,T,b.angle)}else h.multiply(T,b.labelPlaneMatrix,m);return T}function jd(m,c,p,y,b,C,E){const T=us(m,c,p,y,b,C,E);return"globe"===C.name&&p||(T[2]=T[6]=T[10]=T[14]=0),T}function Mr(m,c,p,y,b,C,E){if(p){if("globe"===C.name){const T=us(m,c,p,y,b,C,E);return h.invert(T,T),h.multiply(T,m,T),T}{const T=h.clone(m),k=h.identity([]);return k[0]=E[0],k[1]=E[1],k[4]=E[2],k[5]=E[3],h.multiply(T,T,k),y||h.rotateZ(T,T,-b.angle),T}}return b.glCoordMatrix}function mr(m,c,p,y){const b=[m,c,p,1];p?h.transformMat4$1(b,b,y):lr(b,b,y);const C=b[3];return b[0]/=C,b[1]/=C,b[2]/=C,b}function Vt(m,c){return Math.min(.5+m/c*.5,1.5)}function ti(m,c){const p=m[0]/m[3],y=m[1]/m[3];return p>=-c[0]&&p<=c[0]&&y>=-c[1]&&y<=c[1]}function on(m,c,p,y,b,C,E,T,k,F){const O=p.transform,G=y?m.textSizeData:m.iconSizeData,W=h.evaluateSizeForZoom(G,p.transform.zoom),Q="globe"===O.projection.name,K=[256/p.width*2+1,256/p.height*2+1],ne=y?m.text.dynamicLayoutVertexArray:m.icon.dynamicLayoutVertexArray;ne.clear();let q=null;Q&&(q=y?m.text.globeExtVertexArray:m.icon.globeExtVertexArray);const X=m.lineVertexArray,ee=y?m.text.placedSymbolArray:m.icon.placedSymbolArray,te=p.transform.width/p.transform.height;let ce,_e=!1;for(let ge=0;geMath.abs(p)?{useVertical:!0}:m===h.WritingMode.vertical?y>0?{needsFlipping:!0}:null:0!==c&&(0===(b=p)||Math.abs(y/b)>lm)?1===c?{needsFlipping:!0}:null:p<0?{needsFlipping:!0}:null;var b}function Zn(m,c,p,y,b,C,E,T,k,F,O,G,W,Q,K,ne,q,X,ee){const te=c/24,ce=m.lineOffsetX*te,_e=m.lineOffsetY*te,{lineStartIndex:ge,glyphStartIndex:Me,numGlyphs:We,segment:ze,writingMode:Te,flipState:Ct}=m,Le=ge+m.lineLength,st=Ye=>{if(O){const[Tt,ke,Qe]=Ye.up,Qt=F.length;h.updateGlobeVertexNormal(O,Qt+0,Tt,ke,Qe),h.updateGlobeVertexNormal(O,Qt+1,Tt,ke,Qe),h.updateGlobeVertexNormal(O,Qt+2,Tt,ke,Qe),h.updateGlobeVertexNormal(O,Qt+3,Tt,ke,Qe)}const[bt,Ke,gt]=Ye.point;h.addDynamicAttributes(F,bt,Ke,gt,Ye.angle)};if(We>1){const Ye=ds(te,T,ce,_e,p,G,W,m,k,C,Q,ne,!1,q,X,ee);if(!Ye)return{notEnoughRoom:!0};if(y&&!p){let[bt,Ke,gt]=Ye.first.point,[Tt,ke,Qe]=Ye.last.point;[bt,Ke]=mr(bt,Ke,gt,E),[Tt,ke]=mr(Tt,ke,Qe,E);const Qt=ki(Te,Ct,(Tt-bt)*K,ke-Ke);if(m.flipState=Qt&&Qt.needsFlipping?1:2,Qt)return Qt}st(Ye.first);for(let bt=Me+1;bt0?Tt:ni(W,gt,bt,1,b,void 0,q,X.canonical),Qe=ki(Te,Ct,(ke[0]-bt[0])*K,ke[1]-bt[1]);if(m.flipState=Qe&&Qe.needsFlipping?1:2,Qe)return Qe}const Ye=Mn(te*T.getoffsetX(Me),ce,_e,p,G,W,ze,ge,Le,k,C,Q,ne,!1,!1,q,X,ee);if(!Ye)return{notEnoughRoom:!0};st(Ye)}return{}}function Iu(m,c,p,y,b){const{x:C,y:E,z:T}=y.projectTilePoint(m.x,m.y,c);if(!b)return mr(C,E,T,p);const[k,F,O]=b(m);return mr(C+k,E+F,T+O,p)}function ni(m,c,p,y,b,C,E,T){const k=Iu(m.sub(c)._unit()._add(m),T,b,E,C);return h.sub(k,p,k),h.normalize(k,k),h.scaleAndAdd(k,p,k,y)}function Mn(m,c,p,y,b,C,E,T,k,F,O,G,W,Q,K,ne,q,X){const ee=y?m-c:m+c;let te=ee>0?1:-1,ce=0;y&&(te*=-1,ce=Math.PI),te<0&&(ce+=Math.PI);let _e=T+E+(te>0?0:1)|0,ge=b,Me=b,We=0,ze=0;const Te=Math.abs(ee),Ct=[],Le=[];let st=C,Ye=st;const bt=()=>ni(Ye,st,Me,Te-We+1,O,W,ne,q.canonical);for(;We+ze<=Te;){if(_e+=te,_e=k)return null;if(Me=ge,Ye=st,Ct.push(Me),Q&&Le.push(Ye),st=new h.pointGeometry(F.getx(_e),F.gety(_e)),ge=G[_e],!ge){const Sn=Iu(st,q.canonical,O,ne,W);ge=Sn[3]>0?G[_e]=Sn:bt()}We+=ze,ze=h.distance(Me,ge)}K&&W&&(G[_e]&&(ge=bt(),ze=h.distance(Me,ge)),G[_e]=ge);const Ke=(Te-We)/ze,gt=st.sub(Ye)._mult(Ke)._add(Ye),Tt=h.sub([],ge,Me),ke=h.scaleAndAdd([],Me,Tt,Ke);let Qe=[0,0,1],Qt=Tt[0],hn=Tt[1];if(X&&(Qe=ne.upVector(q.canonical,gt.x,gt.y),0!==Qe[0]||0!==Qe[1]||1!==Qe[2])){const Sn=[Qe[2],0,-Qe[0]],Un=h.cross([],Qe,Sn);h.normalize(Sn,Sn),h.normalize(Un,Un),Qt=h.dot(Tt,Sn),hn=h.dot(Tt,Un)}if(p){const Sn=h.cross([],Qe,Tt);h.normalize(Sn,Sn),h.scaleAndAdd(ke,ke,Sn,p*te)}const tn=ce+Math.atan2(hn,Qt);return Ct.push(ke),Q&&Le.push(gt),{point:ke,angle:tn,path:Ct,tilePath:Le,up:Qe}}function zr(m,c){const p=c.length,y=p+4*m;c.resize(y),c.float32.fill(-1/0,4*p,4*y)}function lr(m,c,p){const y=c[0],b=c[1];return m[0]=p[0]*y+p[4]*b+p[12],m[1]=p[1]*y+p[5]*b+p[13],m[3]=p[3]*y+p[7]*b+p[15],m}const Na=100;class al{constructor(c,p,y=new Ba(c.width+200,c.height+200,25),b=new Ba(c.width+200,c.height+200,25)){this.transform=c,this.grid=y,this.ignoredGrid=b,this.pitchfactor=Math.cos(c._pitch)*c.cameraToCenterDistance,this.screenRightBoundary=c.width+Na,this.screenBottomBoundary=c.height+Na,this.gridRightBoundary=c.width+200,this.gridBottomBoundary=c.height+200,this.fogState=p}placeCollisionBox(c,p,y,b,C,E,T,k){let F=y.projectedAnchorX,O=y.projectedAnchorY,G=y.projectedAnchorZ;const W=y.elevation,Q=y.tileID,K=c.getProjection();if(W&&Q){const[ge,Me,We]=K.upVector(Q.canonical,y.tileAnchorX,y.tileAnchorY),ze=K.upVectorScale(Q.canonical,this.transform.center.lat,this.transform.worldSize).metersToTile;F+=ge*W*ze,O+=Me*W*ze,G+=We*W*ze}const ne=this.projectAndGetPerspectiveRatio(T,F,O,G,y.tileID,"globe"===K.name||!!W||this.transform.pitch>0,K),q=E*ne.perspectiveRatio,X=(y.x1*p+b.x-y.padding)*q+ne.point.x,ee=(y.y1*p+b.y-y.padding)*q+ne.point.y,te=(y.x2*p+b.x+y.padding)*q+ne.point.x,ce=(y.y2*p+b.y+y.padding)*q+ne.point.y,_e=ne.perspectiveRatio<=.55||ne.occluded;return!this.isInsideGrid(X,ee,te,ce)||!C&&this.grid.hitTest(X,ee,te,ce,k)||_e?{box:[],offscreen:!1,occluded:ne.occluded}:{box:[X,ee,te,ce],offscreen:this.isOffscreen(X,ee,te,ce),occluded:!1}}placeCollisionCircles(c,p,y,b,C,E,T,k,F,O,G,W,Q,K,ne){const q=[],X=this.transform.elevation,ee=c.getProjection(),te=X?X.getAtTileOffsetFunc(ne,this.transform.center.lat,this.transform.worldSize,ee):null,ce=new h.pointGeometry(y.tileAnchorX,y.tileAnchorY);let{x:_e,y:ge,z:Me}=ee.projectTilePoint(ce.x,ce.y,ne.canonical);if(te){const[gt,Tt,ke]=te(ce);_e+=gt,ge+=Tt,Me+=ke}const We="globe"===ee.name,ze=this.projectAndGetPerspectiveRatio(T,_e,ge,Me,ne,We||!!X||this.transform.pitch>0,ee),{perspectiveRatio:Te}=ze,Ct=(G?E/Te:E*Te)/h.ONE_EM,Le=mr(_e,ge,Me,k),st=ze.signedDistanceFromCamera>0?ds(Ct,C,y.lineOffsetX*Ct,y.lineOffsetY*Ct,!1,Le,ce,y,b,k,{},X&&!G?te:null,G&&!!X,ee,ne,G):null;let Ye=!1,bt=!1,Ke=!0;if(st&&!ze.occluded){const gt=.5*Q*Te+K,Tt=new h.pointGeometry(-100,-100),ke=new h.pointGeometry(this.screenRightBoundary,this.screenBottomBoundary),Qe=new Pr,{first:Qt,last:hn}=st,tn=Qt.path.length;let Sn=[];for(let Ht=tn-1;Ht>=1;Ht--)Sn.push(Qt.path[Ht]);for(let Ht=1;Ht(te&&!We&&(_i=te(ziHt[3]<=0)&&(Sn=[]));let un=[];if(Sn.length>0){let Ht=1/0,gi=-1/0,_i=1/0,zi=-1/0;for(const xi of Sn)Ht=Math.min(Ht,xi[0]),_i=Math.min(_i,xi[1]),gi=Math.max(gi,xi[0]),zi=Math.max(zi,xi[1]);gi>=Tt.x&&Ht<=ke.x&&zi>=Tt.y&&_i<=ke.y&&(un=[Sn.map(xi=>new h.pointGeometry(xi[0],xi[1]))],(Htke.x||_ike.y)&&(un=h.clipLine(un,Tt.x,Tt.y,ke.x,ke.y)))}for(const Ht of un){Qe.reset(Ht,.25*gt);let gi=0;gi=Qe.length<=.5*gt?1:Math.ceil(Qe.paddedLength/Un)+1;for(let _i=0;_i0?(h.transformMat4$1(k,k,c),this.fogState&&C&&"globe"!==T.name&&(F=function(Q,K,ne,q,X,ee){const te=ee.calculateFogTileMatrix(X),ce=[K,ne,q];return h.transformMat4(ce,ce,te),Yo(Q,ce,ee.pitch,ee._fov)}(this.fogState,p,y,b,C.toUnwrapped(),this.transform)>.9)):lr(k,k,c);const O=k[3];return{point:new h.pointGeometry((k[0]/O+1)/2*this.transform.width+Na,(-k[1]/O+1)/2*this.transform.height+Na),perspectiveRatio:Math.min(.5+this.transform.getCameraToCenterDistance(T)/O*.5,1.5),signedDistanceFromCamera:O,occluded:E&&k[2]>O||F}}isOffscreen(c,p,y,b){return y=this.screenRightBoundary||bthis.screenBottomBoundary}isInsideGrid(c,p,y,b){return y>=0&&c=0&&py.collisionGroupID===p}}return this.collisionGroups[c]}}function Sr(m,c,p,y,b){const{horizontalAlign:C,verticalAlign:E}=h.getAnchorAlignment(m),T=-(C-.5)*c,k=-(E-.5)*p,F=h.evaluateVariableOffset(m,y);return new h.pointGeometry(T+F[0]*b,k+F[1]*b)}function ku(m,c,p,y,b){const C=new h.pointGeometry(m,c);return p&&C._rotate(y?b:-b),C}class cm{constructor(c,p,y,b,C){this.transform=c.clone(),this.projection=c.projection.name,this.collisionIndex=new al(this.transform,C),this.placements={},this.opacities={},this.variableOffsets={},this.stale=!1,this.commitTime=0,this.fadeDuration=p,this.retainedQueryData={},this.collisionGroups=new hr(y),this.collisionCircleArrays={},this.prevPlacement=b,b&&(b.prevPlacement=void 0),this.placedOrientations={}}getBucketParts(c,p,y,b){const C=y.getBucket(p),E=y.latestFeatureIndex;if(!C||!E||p.id!==C.layerIds[0])return;const T=C.layers[0].layout,k=y.collisionBoxArray,F=Math.pow(2,this.transform.zoom-y.tileID.overscaledZ),O=y.tileSize/h.EXTENT,G=y.tileID.toUnwrapped();this.transform.setProjection(C.projection);const W=(Q=y.tileID,K=C.getProjection(),ne=this.transform,K.name===this.projection?ne.calculateProjMatrix(Q.toUnwrapped()):mt(ne,K,Q));var Q,K,ne;const q="map"===T.get("text-pitch-alignment"),X="map"===T.get("text-rotation-alignment");p.compileFilter();const ee=p.dynamicFilter(),te=p.dynamicFilterNeedsFeature(),ce=this.transform.calculatePixelsToTileUnitsMatrix(y),_e=jd(W,y.tileID.canonical,q,X,this.transform,C.getProjection(),ce);let ge=null;if(q){const ze=Mr(W,y.tileID.canonical,q,X,this.transform,C.getProjection(),ce);ge=h.multiply([],this.transform.labelPlaneMatrix,ze)}let Me=null;ee&&y.latestFeatureIndex&&(Me={unwrappedTileID:G,dynamicFilter:ee,dynamicFilterNeedsFeature:te,featureIndex:y.latestFeatureIndex}),this.retainedQueryData[C.bucketInstanceId]=new Ic(C.bucketInstanceId,E,C.sourceLayerIndex,C.index,y.tileID);const We={bucket:C,layout:T,posMatrix:W,textLabelPlaneMatrix:_e,labelToScreenMatrix:ge,clippingData:Me,scale:F,textPixelRatio:O,holdingForFade:y.holdingForFade(),collisionBoxArray:k,partiallyEvaluatedTextSize:h.evaluateSizeForZoom(C.textSizeData,this.transform.zoom),partiallyEvaluatedIconSize:h.evaluateSizeForZoom(C.iconSizeData,this.transform.zoom),collisionGroup:this.collisionGroups.get(C.sourceID)};if(b)for(const ze of C.sortKeyRanges){const{sortKey:Te,symbolInstanceStart:Ct,symbolInstanceEnd:Le}=ze;c.push({sortKey:Te,symbolInstanceStart:Ct,symbolInstanceEnd:Le,parameters:We})}else c.push({symbolInstanceStart:0,symbolInstanceEnd:C.symbolInstances.length,parameters:We})}attemptAnchorPlacement(c,p,y,b,C,E,T,k,F,O,G,W,Q,K,ne,q,X,ee){const{textOffset0:te,textOffset1:ce,crossTileID:_e}=W,ge=[te,ce],Me=Sr(c,y,b,ge,C),We=this.collisionIndex.placeCollisionBox(K,C,p,ku(Me.x,Me.y,E,T,this.transform.angle),G,k,F,O.predicate);if(q){const ze=K.getSymbolInstanceIconSize(ee,this.transform.zoom,W.placedIconSymbolIndex);if(0===this.collisionIndex.placeCollisionBox(K,ze,q,ku(Me.x,Me.y,E,T,this.transform.angle),G,k,F,O.predicate).box.length)return}if(We.box.length>0){let ze;return this.prevPlacement&&this.prevPlacement.variableOffsets[_e]&&this.prevPlacement.placements[_e]&&this.prevPlacement.placements[_e].text&&(ze=this.prevPlacement.variableOffsets[_e].anchor),this.variableOffsets[_e]={textOffset:ge,width:y,height:b,anchor:c,textScale:C,prevAnchor:ze},this.markUsedJustification(K,c,W,ne),K.allowVerticalPlacement&&(this.markUsedOrientation(K,ne,W),this.placedOrientations[_e]=ne),{shift:Me,placedGlyphBoxes:We}}}placeLayerBucketPart(c,p,y,b){const{bucket:C,layout:E,posMatrix:T,textLabelPlaneMatrix:k,labelToScreenMatrix:F,clippingData:O,textPixelRatio:G,holdingForFade:W,collisionBoxArray:Q,partiallyEvaluatedTextSize:K,partiallyEvaluatedIconSize:ne,collisionGroup:q}=c.parameters,X=E.get("text-optional"),ee=E.get("icon-optional"),te=E.get("text-allow-overlap"),ce=E.get("icon-allow-overlap"),_e="map"===E.get("text-rotation-alignment"),ge="map"===E.get("text-pitch-alignment"),Me="none"!==E.get("icon-text-fit"),We="viewport-y"===E.get("symbol-z-order");this.transform.setProjection(C.projection);let ze=te&&(ce||!C.hasIconData()||ee),Te=ce&&(te||!C.hasTextData()||X);!C.collisionArrays&&Q&&C.deserializeCollisionBoxes(Q),y&&b&&C.updateCollisionDebugBuffers(this.transform.zoom,Q);const Ct=(Le,st,Ye)=>{const{crossTileID:bt,numVerticalGlyphVertices:Ke}=Le;if(O){const cr={zoom:this.transform.zoom,pitch:this.transform.pitch};let Vi=null;if(O.dynamicFilterNeedsFeature){const hi=this.retainedQueryData[C.bucketInstanceId];Vi=O.featureIndex.loadFeature({featureIndex:Le.featureIndex,bucketIndex:hi.bucketIndex,sourceLayerIndex:hi.sourceLayerIndex,layoutVertexArrayOffset:0})}if(!(0,O.dynamicFilter)(cr,Vi,this.retainedQueryData[C.bucketInstanceId].tileID.canonical,new h.pointGeometry(Le.tileAnchorX,Le.tileAnchorY),this.transform.calculateDistanceTileData(O.unwrappedTileID)))return this.placements[bt]=new Hd(!1,!1,!1,!0),void(p[bt]=!0)}if(p[bt])return;if(W)return void(this.placements[bt]=new Hd(!1,!1,!1));let gt=!1,Tt=!1,ke=!0,Qe=!1,Qt=!1,hn=null,tn={box:null,offscreen:null,occluded:null},Sn={box:null,offscreen:null,occluded:null},Un=null,un=null,Ht=null,gi=0,_i=0,zi=0;Ye.textFeatureIndex?gi=Ye.textFeatureIndex:Le.useRuntimeCollisionCircles&&(gi=Le.featureIndex),Ye.verticalTextFeatureIndex&&(_i=Ye.verticalTextFeatureIndex);const xi=cr=>{cr.tileID=this.retainedQueryData[C.bucketInstanceId].tileID;const Vi=this.transform.elevation;(Vi||cr.elevation)&&(cr.elevation=Vi?Vi.getAtTileOffset(cr.tileID,cr.tileAnchorX,cr.tileAnchorY):0)},ns=Ye.textBox;if(ns){xi(ns);const cr=hi=>{let Er=h.WritingMode.horizontal;if(C.allowVerticalPlacement&&!hi&&this.prevPlacement){const gr=this.prevPlacement.placedOrientations[bt];gr&&(this.placedOrientations[bt]=gr,Er=gr,this.markUsedOrientation(C,Er,Le))}return Er},Vi=(hi,Er)=>{if(C.allowVerticalPlacement&&Ke>0&&Ye.verticalTextBox){for(const gr of C.writingModes)if(gr===h.WritingMode.vertical?(tn=Er(),Sn=tn):tn=hi(),tn&&tn.box&&tn.box.length)break}else tn=hi()};if(E.get("text-variable-anchor")){let hi=E.get("text-variable-anchor");if(this.prevPlacement&&this.prevPlacement.variableOffsets[bt]){const er=this.prevPlacement.variableOffsets[bt];hi.indexOf(er.anchor)>0&&(hi=hi.filter(eo=>eo!==er.anchor),hi.unshift(er.anchor))}const Er=(er,eo,rc)=>{const ba=C.getSymbolInstanceTextSize(K,Le,this.transform.zoom,st),to=(er.x2-er.x1)*ba+2*er.padding,is=(er.y2-er.y1)*ba+2*er.padding,xa=Me&&!ce?eo:null;xa&&xi(xa);let Xs={box:[],offscreen:!1,occluded:!1};const $c=te?2*hi.length:hi.length;for(let oc=0;oc<$c;++oc){const Ys=this.attemptAnchorPlacement(hi[oc%hi.length],er,to,is,ba,_e,ge,G,T,q,oc>=hi.length,Le,st,C,rc,xa,K,ne);if(Ys&&(Xs=Ys.placedGlyphBoxes,Xs&&Xs.box&&Xs.box.length)){gt=!0,hn=Ys.shift;break}}return Xs};Vi(()=>Er(ns,Ye.iconBox,h.WritingMode.horizontal),()=>{const er=Ye.verticalTextBox;return er&&xi(er),C.allowVerticalPlacement&&!(tn&&tn.box&&tn.box.length)&&Ke>0&&er?Er(er,Ye.verticalIconBox,h.WritingMode.vertical):{box:null,offscreen:null,occluded:null}}),tn&&(gt=tn.box,ke=tn.offscreen,Qe=tn.occluded);const gr=cr(tn&&tn.box);if(!gt&&this.prevPlacement){const er=this.prevPlacement.variableOffsets[bt];er&&(this.variableOffsets[bt]=er,this.markUsedJustification(C,er.anchor,Le,gr))}}else{const hi=(Er,gr)=>{const er=C.getSymbolInstanceTextSize(K,Le,this.transform.zoom,st),eo=this.collisionIndex.placeCollisionBox(C,er,Er,new h.pointGeometry(0,0),te,G,T,q.predicate);return eo&&eo.box&&eo.box.length&&(this.markUsedOrientation(C,gr,Le),this.placedOrientations[bt]=gr),eo};Vi(()=>hi(ns,h.WritingMode.horizontal),()=>{const Er=Ye.verticalTextBox;return C.allowVerticalPlacement&&Ke>0&&Er?(xi(Er),hi(Er,h.WritingMode.vertical)):{box:null,offscreen:null,occluded:null}}),cr(tn&&tn.box&&tn.box.length)}}if(Un=tn,gt=Un&&Un.box&&Un.box.length>0,ke=Un&&Un.offscreen,Qe=Un&&Un.occluded,Le.useRuntimeCollisionCircles){const cr=C.text.placedSymbolArray.get(Le.centerJustifiedTextSymbolIndex>=0?Le.centerJustifiedTextSymbolIndex:Le.verticalPlacedTextSymbolIndex),Vi=h.evaluateSizeForFeature(C.textSizeData,K,cr),hi=E.get("text-padding");un=this.collisionIndex.placeCollisionCircles(C,te,cr,C.lineVertexArray,C.glyphOffsetArray,Vi,T,k,F,y,ge,q.predicate,Le.collisionCircleDiameter*Vi/h.ONE_EM,hi,this.retainedQueryData[C.bucketInstanceId].tileID),gt=te||un.circles.length>0&&!un.collisionDetected,ke=ke&&un.offscreen,Qe=un.occluded}if(Ye.iconFeatureIndex&&(zi=Ye.iconFeatureIndex),Ye.iconBox){const cr=Vi=>{xi(Vi);const hi=Me&&hn?ku(hn.x,hn.y,_e,ge,this.transform.angle):new h.pointGeometry(0,0),Er=C.getSymbolInstanceIconSize(ne,this.transform.zoom,Le.placedIconSymbolIndex);return this.collisionIndex.placeCollisionBox(C,Er,Vi,hi,ce,G,T,q.predicate)};Sn&&Sn.box&&Sn.box.length&&Ye.verticalIconBox?(Ht=cr(Ye.verticalIconBox),Tt=Ht.box.length>0):(Ht=cr(Ye.iconBox),Tt=Ht.box.length>0),ke=ke&&Ht.offscreen,Qt=Ht.occluded}const Eo=X||0===Le.numHorizontalGlyphVertices&&0===Ke,go=ee||0===Le.numIconVertices;if(Eo||go?go?Eo||(Tt=Tt&>):gt=Tt&>:Tt=gt=Tt&>,gt&&Un&&Un.box&&this.collisionIndex.insertCollisionBox(Un.box,E.get("text-ignore-placement"),C.bucketInstanceId,Sn&&Sn.box&&_i?_i:gi,q.ID),Tt&&Ht&&this.collisionIndex.insertCollisionBox(Ht.box,E.get("icon-ignore-placement"),C.bucketInstanceId,zi,q.ID),un&&(gt&&this.collisionIndex.insertCollisionCircles(un.circles,E.get("text-ignore-placement"),C.bucketInstanceId,gi,q.ID),y)){const cr=C.bucketInstanceId;let Vi=this.collisionCircleArrays[cr];void 0===Vi&&(Vi=this.collisionCircleArrays[cr]=new $d);for(let hi=0;hi=0;--st){const Ye=Le[st];Ct(C.symbolInstances.get(Ye),Ye,C.collisionArrays[Ye])}}else for(let Le=c.symbolInstanceStart;Le=0&&(c.text.placedSymbolArray.get(C).crossTileID=G>=0&&C!==G?0:F),E>=0&&(c.text.placedSymbolArray.get(E).crossTileID=G>=0&&E!==G?0:F),T>=0&&(c.text.placedSymbolArray.get(T).crossTileID=G>=0&&T!==G?0:F),k>=0&&(c.text.placedSymbolArray.get(k).crossTileID=G>=0&&k!==G?0:F)}markUsedOrientation(c,p,y){const b=p===h.WritingMode.horizontal||p===h.WritingMode.horizontalOnly?p:0,C=p===h.WritingMode.vertical?p:0,{leftJustifiedTextSymbolIndex:E,centerJustifiedTextSymbolIndex:T,rightJustifiedTextSymbolIndex:k,verticalPlacedTextSymbolIndex:F}=y,O=c.text.placedSymbolArray;E>=0&&(O.get(E).placedOrientation=b),T>=0&&(O.get(T).placedOrientation=b),k>=0&&(O.get(k).placedOrientation=b),F>=0&&(O.get(F).placedOrientation=C)}commit(c){this.commitTime=c,this.zoomAtLastRecencyCheck=this.transform.zoom;const p=this.prevPlacement;let y=!1;this.prevZoomAdjustment=p?p.zoomAdjustment(this.transform.zoom):0;const b=p?p.symbolFadeChange(c):1,C=p?p.opacities:{},E=p?p.variableOffsets:{},T=p?p.placedOrientations:{};for(const k in this.placements){const F=this.placements[k],O=C[k];O?(this.opacities[k]=new cl(O,b,F.text,F.icon,null,F.clipped),y=y||F.text!==O.text.placed||F.icon!==O.icon.placed):(this.opacities[k]=new cl(null,b,F.text,F.icon,F.skipFade,F.clipped),y=y||F.text||F.icon)}for(const k in C){const F=C[k];if(!this.opacities[k]){const O=new cl(F,b,!1,!1);O.isHidden()||(this.opacities[k]=O,y=y||F.text.placed||F.icon.placed)}}for(const k in E)this.variableOffsets[k]||!this.opacities[k]||this.opacities[k].isHidden()||(this.variableOffsets[k]=E[k]);for(const k in T)this.placedOrientations[k]||!this.opacities[k]||this.opacities[k].isHidden()||(this.placedOrientations[k]=T[k]);y?this.lastPlacementChangeTime=c:"number"!=typeof this.lastPlacementChangeTime&&(this.lastPlacementChangeTime=p?p.lastPlacementChangeTime:c)}updateLayerOpacities(c,p){const y={};for(const b of p){const C=b.getBucket(c);C&&b.latestFeatureIndex&&c.id===C.layerIds[0]&&this.updateBucketOpacities(C,y,b.collisionBoxArray)}}updateBucketOpacities(c,p,y){c.hasTextData()&&c.text.opacityVertexArray.clear(),c.hasIconData()&&c.icon.opacityVertexArray.clear(),c.hasIconCollisionBoxData()&&c.iconCollisionBox.collisionVertexArray.clear(),c.hasTextCollisionBoxData()&&c.textCollisionBox.collisionVertexArray.clear();const b=c.layers[0].layout,C=!!c.layers[0].dynamicFilter(),E=new cl(null,0,!1,!1,!0),T=b.get("text-allow-overlap"),k=b.get("icon-allow-overlap"),F=b.get("text-variable-anchor"),O="map"===b.get("text-rotation-alignment"),G="map"===b.get("text-pitch-alignment"),W="none"!==b.get("icon-text-fit"),Q=new cl(null,0,T&&(k||!c.hasIconData()||b.get("icon-optional")),k&&(T||!c.hasTextData()||b.get("text-optional")),!0);!c.collisionArrays&&y&&(c.hasIconCollisionBoxData()||c.hasTextCollisionBoxData())&&c.deserializeCollisionBoxes(y);const K=(q,X,ee)=>{for(let te=0;te0||te>0,We=_e>0,ze=this.placedOrientations[ce],Te=ze===h.WritingMode.vertical,Ct=ze===h.WritingMode.horizontal||ze===h.WritingMode.horizontalOnly;if(!Me&&!We||ge.isHidden()||ne++,Me){const Le=uo(ge.text);K(c.text,ee,Te?ho:Le),K(c.text,te,Ct?ho:Le);const st=ge.text.isHidden(),{leftJustifiedTextSymbolIndex:Ye,centerJustifiedTextSymbolIndex:bt,rightJustifiedTextSymbolIndex:Ke,verticalPlacedTextSymbolIndex:gt}=X,Tt=c.text.placedSymbolArray,ke=st||Te?1:0;Ye>=0&&(Tt.get(Ye).hidden=ke),bt>=0&&(Tt.get(bt).hidden=ke),Ke>=0&&(Tt.get(Ke).hidden=ke),gt>=0&&(Tt.get(gt).hidden=st||Ct?1:0);const Qe=this.variableOffsets[ce];Qe&&this.markUsedJustification(c,Qe.anchor,X,ze);const Qt=this.placedOrientations[ce];Qt&&(this.markUsedJustification(c,"left",X,Qt),this.markUsedOrientation(c,Qt,X))}if(We){const Le=uo(ge.icon),{placedIconSymbolIndex:st,verticalPlacedIconSymbolIndex:Ye}=X,bt=c.icon.placedSymbolArray,Ke=ge.icon.isHidden()?1:0;st>=0&&(K(c.icon,_e,Te?ho:Le),bt.get(st).hidden=Ke),Ye>=0&&(K(c.icon,X.numVerticalIconVertices,Ct?ho:Le),bt.get(Ye).hidden=Ke)}if(c.hasIconCollisionBoxData()||c.hasTextCollisionBoxData()){const Le=c.collisionArrays[q];if(Le){let st=new h.pointGeometry(0,0),Ye=!0;if(Le.textBox||Le.verticalTextBox){if(F){const Ke=this.variableOffsets[ce];Ke?(st=Sr(Ke.anchor,Ke.width,Ke.height,Ke.textOffset,Ke.textScale),O&&st._rotate(G?this.transform.angle:-this.transform.angle)):Ye=!1}C&&(Ye=!ge.clipped),Le.textBox&&vr(c.textCollisionBox.collisionVertexArray,ge.text.placed,!Ye||Te,st.x,st.y),Le.verticalTextBox&&vr(c.textCollisionBox.collisionVertexArray,ge.text.placed,!Ye||Ct,st.x,st.y)}const bt=Ye&&Boolean(!Ct&&Le.verticalIconBox);Le.iconBox&&vr(c.iconCollisionBox.collisionVertexArray,ge.icon.placed,bt,W?st.x:0,W?st.y:0),Le.verticalIconBox&&vr(c.iconCollisionBox.collisionVertexArray,ge.icon.placed,!bt,W?st.x:0,W?st.y:0)}}}if(c.fullyClipped=0===ne,c.sortFeatures(this.transform.angle),this.retainedQueryData[c.bucketInstanceId]&&(this.retainedQueryData[c.bucketInstanceId].featureSortOrder=c.featureSortOrder),c.hasTextData()&&c.text.opacityVertexBuffer&&c.text.opacityVertexBuffer.updateData(c.text.opacityVertexArray),c.hasIconData()&&c.icon.opacityVertexBuffer&&c.icon.opacityVertexBuffer.updateData(c.icon.opacityVertexArray),c.hasIconCollisionBoxData()&&c.iconCollisionBox.collisionVertexBuffer&&c.iconCollisionBox.collisionVertexBuffer.updateData(c.iconCollisionBox.collisionVertexArray),c.hasTextCollisionBoxData()&&c.textCollisionBox.collisionVertexBuffer&&c.textCollisionBox.collisionVertexBuffer.updateData(c.textCollisionBox.collisionVertexArray),c.bucketInstanceId in this.collisionCircleArrays){const q=this.collisionCircleArrays[c.bucketInstanceId];c.placementInvProjMatrix=q.invProjMatrix,c.placementViewportMatrix=q.viewportMatrix,c.collisionCircleArray=q.circles,delete this.collisionCircleArrays[c.bucketInstanceId]}}symbolFadeChange(c){return 0===this.fadeDuration?1:(c-this.commitTime)/this.fadeDuration+this.prevZoomAdjustment}zoomAdjustment(c){return Math.max(0,(this.transform.zoom-c)/1.5)}hasTransitions(c){return this.stale||c-this.lastPlacementChangeTimec}setStale(){this.stale=!0}}function vr(m,c,p,y,b){m.emplaceBack(c?1:0,p?1:0,y||0,b||0),m.emplaceBack(c?1:0,p?1:0,y||0,b||0),m.emplaceBack(c?1:0,p?1:0,y||0,b||0),m.emplaceBack(c?1:0,p?1:0,y||0,b||0)}const js=Math.pow(2,25),B_=Math.pow(2,24),pp=Math.pow(2,17),Vr=Math.pow(2,16),Ru=Math.pow(2,9),um=Math.pow(2,8),Pu=Math.pow(2,1);function uo(m){if(0===m.opacity&&!m.placed)return 0;if(1===m.opacity&&m.placed)return 4294967295;const c=m.placed?1:0,p=Math.floor(127*m.opacity);return p*js+c*B_+p*pp+c*Vr+p*Ru+c*um+p*Pu+c}const ho=0;class Pi{constructor(c){this._sortAcrossTiles="viewport-y"!==c.layout.get("symbol-z-order")&&void 0!==c.layout.get("symbol-sort-key").constantOr(1),this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]}continuePlacement(c,p,y,b,C){const E=this._bucketParts;for(;this._currentTileIndexT.sortKey-k.sortKey));this._currentPartIndex{const E=h.exported.now()-b;return!this._forceFullPlacement&&E>2};for(;this._currentPlacementIndex>=0;){const E=p[c[this._currentPlacementIndex]],T=this.placement.collisionIndex.transform.zoom;if("symbol"===E.type&&(!E.minzoom||E.minzoom<=T)&&(!E.maxzoom||E.maxzoom>T)){if(this._inProgressLayer||(this._inProgressLayer=new Pi(E)),this._inProgressLayer.continuePlacement(y[E.source],this.placement,this._showCollisionBoxes,E,C))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0}commit(c){return this.placement.commit(c),this.placement}}const Wd=512/h.EXTENT/2;class fp{constructor(c,p,y){this.tileID=c,this.indexedSymbolInstances={},this.bucketInstanceId=y;for(let b=0;bc.overscaledZ)for(const T in E){const k=E[T];k.tileID.isChildOf(c)&&k.findMatches(p.symbolInstances,c,b)}else{const T=E[c.scaledTo(Number(C)).key];T&&T.findMatches(p.symbolInstances,c,b)}}for(let C=0;C{p[y]=!0});for(const y in this.layerIndexes)p[y]||delete this.layerIndexes[y]}}const Hl=(m,c)=>h.emitValidationErrors(m,c&&c.filter(p=>"source.canvas"!==p.identifier)),hm=h.pick(an,["addLayer","removeLayer","setPaintProperty","setLayoutProperty","setFilter","addSource","removeSource","setLayerZoomRange","setLight","setTransition","setGeoJSONSourceData","setTerrain","setFog","setProjection"]),$l=h.pick(an,["setCenter","setZoom","setBearing","setPitch"]),dl={version:8,layers:[],sources:{}},qd={fill:!0,line:!0,background:!0,hillshade:!0,raster:!0};class Kr extends h.Evented{constructor(c,p={}){super(),this.map=c,this.dispatcher=new Ss(En(),this),this.imageManager=new Lt,this.imageManager.setEventedParent(this),this.glyphManager=new h.GlyphManager(c._requestManager,p.localFontFamily?h.LocalGlyphMode.all:p.localIdeographFontFamily?h.LocalGlyphMode.ideographs:h.LocalGlyphMode.none,p.localFontFamily||p.localIdeographFontFamily),this.crossTileSymbolIndex=new nn,this._layers={},this._num3DLayers=0,this._numSymbolLayers=0,this._numCircleLayers=0,this._serializedLayers={},this._sourceCaches={},this._otherSourceCaches={},this._symbolSourceCaches={},this._loaded=!1,this._availableImages=[],this._order=[],this._drapedFirstOrder=[],this._markersNeedUpdate=!1,this._resetUpdates(),this.dispatcher.broadcast("setReferrer",h.getReferrer());const y=this;this._rtlTextPluginCallback=Kr.registerForPluginStateChange(b=>{y.dispatcher.broadcast("syncRTLPluginState",{pluginStatus:b.pluginStatus,pluginURL:b.pluginURL},(C,E)=>{if(h.triggerPluginCompletionEvent(C),E&&E.every(T=>T))for(const T in y._sourceCaches){const k=y._sourceCaches[T],F=k.getSource().type;"vector"!==F&&"geojson"!==F||k.reload()}})}),this.on("data",b=>{if("source"!==b.dataType||"metadata"!==b.sourceDataType)return;const C=this.getSource(b.sourceId);if(C&&C.vectorLayerIds)for(const E in this._layers){const T=this._layers[E];T.source===C.id&&this._validateLayer(T)}})}loadURL(c,p={}){this.fire(new h.Event("dataloading",{dataType:"style"}));const y="boolean"==typeof p.validate?p.validate:!h.isMapboxURL(c);c=this.map._requestManager.normalizeStyleURL(c,p.accessToken);const b=this.map._requestManager.transformRequest(c,h.ResourceType.Style);this._request=h.getJSON(b,(C,E)=>{this._request=null,C?this.fire(new h.ErrorEvent(C)):E&&this._load(E,y)})}loadJSON(c,p={}){this.fire(new h.Event("dataloading",{dataType:"style"})),this._request=h.exported.frame(()=>{this._request=null,this._load(c,!1!==p.validate)})}loadEmpty(){this.fire(new h.Event("dataloading",{dataType:"style"})),this._load(dl,!1)}_updateLayerCount(c,p){const y=p?1:-1;c.is3D()&&(this._num3DLayers+=y),"circle"===c.type&&(this._numCircleLayers+=y),"symbol"===c.type&&(this._numSymbolLayers+=y)}_load(c,p){if(p&&Hl(this,h.validateStyle(c)))return;this._loaded=!0,this.stylesheet=h.clone$1(c),this._updateMapProjection();for(const b in c.sources)this.addSource(b,c.sources[b],{validate:!1});this._changed=!1,c.sprite?this._loadSprite(c.sprite):(this.imageManager.setLoaded(!0),this.dispatcher.broadcast("spriteLoaded",!0)),this.glyphManager.setURL(c.glyphs);const y=vi(this.stylesheet.layers);this._order=y.map(b=>b.id),this._layers={},this._serializedLayers={};for(let b of y)b=h.createStyleLayer(b),b.setEventedParent(this,{layer:{id:b.id}}),this._layers[b.id]=b,this._serializedLayers[b.id]=b.serialize(),this._updateLayerCount(b,!0);this.dispatcher.broadcast("setLayers",this._serializeLayers(this._order)),this.light=new Mi(this.stylesheet.light),this.stylesheet.terrain&&!this.terrainSetForDrapingOnly()&&this._createTerrain(this.stylesheet.terrain,1),this.stylesheet.fog&&this._createFog(this.stylesheet.fog),this._updateDrapeFirstLayers(),this.fire(new h.Event("data",{dataType:"style"})),this.fire(new h.Event("style.load"))}terrainSetForDrapingOnly(){return!!this.terrain&&0===this.terrain.drapeRenderMode}setProjection(c){c?this.stylesheet.projection=c:delete this.stylesheet.projection,this._updateMapProjection()}applyProjectionUpdate(){this._loaded&&(this.dispatcher.broadcast("setProjection",this.map.transform.projectionOptions),this.map.transform.projection.requiresDraping?this.getTerrain()||this.stylesheet.terrain||this.setTerrainForDraping():this.terrainSetForDrapingOnly()&&this.setTerrain(null))}_updateMapProjection(){this.map._useExplicitProjection?this.applyProjectionUpdate():this.map._prioritizeAndUpdateProjection(null,this.stylesheet.projection)}_loadSprite(c){this._spriteRequest=function(p,y,b){let C,E,T;const k=h.exported.devicePixelRatio>1?"@2x":"";let F=h.getJSON(y.transformRequest(y.normalizeSpriteURL(p,k,".json"),h.ResourceType.SpriteJSON),(W,Q)=>{F=null,T||(T=W,C=Q,G())}),O=h.getImage(y.transformRequest(y.normalizeSpriteURL(p,k,".png"),h.ResourceType.SpriteImage),(W,Q)=>{O=null,T||(T=W,E=Q,G())});function G(){if(T)b(T);else if(C&&E){const W=h.exported.getImageData(E),Q={};for(const K in C){const{width:ne,height:q,x:X,y:ee,sdf:te,pixelRatio:ce,stretchX:_e,stretchY:ge,content:Me}=C[K],We=new h.RGBAImage({width:ne,height:q});h.RGBAImage.copy(W,We,{x:X,y:ee},{x:0,y:0},{width:ne,height:q}),Q[K]={data:We,pixelRatio:ce,sdf:te,stretchX:_e,stretchY:ge,content:Me}}b(null,Q)}}return{cancel(){F&&(F.cancel(),F=null),O&&(O.cancel(),O=null)}}}(c,this.map._requestManager,(p,y)=>{if(this._spriteRequest=null,p)this.fire(new h.ErrorEvent(p));else if(y)for(const b in y)this.imageManager.addImage(b,y[b]);this.imageManager.setLoaded(!0),this._availableImages=this.imageManager.listImages(),this.dispatcher.broadcast("setImages",this._availableImages),this.dispatcher.broadcast("spriteLoaded",!0),this.fire(new h.Event("data",{dataType:"style"}))})}_validateLayer(c){const p=this.getSource(c.source);if(!p)return;const y=c.sourceLayer;y&&("geojson"===p.type||p.vectorLayerIds&&-1===p.vectorLayerIds.indexOf(y))&&this.fire(new h.ErrorEvent(new Error(`Source layer "${y}" does not exist on source "${p.id}" as specified by style layer "${c.id}"`)))}loaded(){if(!this._loaded||Object.keys(this._updatedSources).length)return!1;for(const c in this._sourceCaches)if(!this._sourceCaches[c].loaded())return!1;return!!this.imageManager.isLoaded()}_serializeLayers(c){const p=[];for(const y of c){const b=this._layers[y];"custom"!==b.type&&p.push(b.serialize())}return p}hasTransitions(){if(this.light&&this.light.hasTransition()||this.fog&&this.fog.hasTransition())return!0;for(const c in this._sourceCaches)if(this._sourceCaches[c].hasTransition())return!0;for(const c in this._layers)if(this._layers[c].hasTransition())return!0;return!1}get order(){return this.map._optimizeForTerrain&&this.terrain?this._drapedFirstOrder:this._order}isLayerDraped(c){return!!this.terrain&&qd[c.type]}_checkLoaded(){if(!this._loaded)throw new Error("Style is not done loading")}update(c){if(!this._loaded)return;const p=this._changed;if(this._changed){const b=Object.keys(this._updatedLayers),C=Object.keys(this._removedLayers);(b.length||C.length)&&this._updateWorkerLayers(b,C);for(const E in this._updatedSources){const T=this._updatedSources[E];"reload"===T?this._reloadSource(E):"clear"===T&&this._clearSource(E)}this._updateTilesForChangedImages();for(const E in this._updatedPaintProps)this._layers[E].updateTransitions(c);this.light.updateTransitions(c),this.fog&&this.fog.updateTransitions(c),this._resetUpdates()}const y={};for(const b in this._sourceCaches){const C=this._sourceCaches[b];y[b]=C.used,C.used=!1}for(const b of this._order){const C=this._layers[b];if(C.recalculate(c,this._availableImages),!C.isHidden(c.zoom)){const T=this._getLayerSourceCache(C);T&&(T.used=!0)}const E=this.map.painter;if(E){const T=C.getProgramIds();if(!T)continue;const k=C.getProgramConfiguration(c.zoom);for(const F of T)E.useProgram(F,k)}}for(const b in y){const C=this._sourceCaches[b];y[b]!==C.used&&C.getSource().fire(new h.Event("data",{sourceDataType:"visibility",dataType:"source",sourceId:C.getSource().id}))}this.light.recalculate(c),this.terrain&&this.terrain.recalculate(c),this.fog&&this.fog.recalculate(c),this.z=c.zoom,this._markersNeedUpdate&&(this._updateMarkersOpacity(),this._markersNeedUpdate=!1),p&&this.fire(new h.Event("data",{dataType:"style"}))}_updateTilesForChangedImages(){const c=Object.keys(this._changedImages);if(c.length){for(const p in this._sourceCaches)this._sourceCaches[p].reloadTilesForDependencies(["icons","patterns"],c);this._changedImages={}}}_updateWorkerLayers(c,p){this.dispatcher.broadcast("updateLayers",{layers:this._serializeLayers(c),removedIds:p})}_resetUpdates(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSources={},this._updatedPaintProps={},this._changedImages={}}setState(c){if(this._checkLoaded(),Hl(this,h.validateStyle(c)))return!1;(c=h.clone$1(c)).layers=vi(c.layers);const p=function(b,C){if(!b)return[{command:an.setStyle,args:[C]}];let E=[];try{if(!$(b.version,C.version))return[{command:an.setStyle,args:[C]}];$(b.center,C.center)||E.push({command:an.setCenter,args:[C.center]}),$(b.zoom,C.zoom)||E.push({command:an.setZoom,args:[C.zoom]}),$(b.bearing,C.bearing)||E.push({command:an.setBearing,args:[C.bearing]}),$(b.pitch,C.pitch)||E.push({command:an.setPitch,args:[C.pitch]}),$(b.sprite,C.sprite)||E.push({command:an.setSprite,args:[C.sprite]}),$(b.glyphs,C.glyphs)||E.push({command:an.setGlyphs,args:[C.glyphs]}),$(b.transition,C.transition)||E.push({command:an.setTransition,args:[C.transition]}),$(b.light,C.light)||E.push({command:an.setLight,args:[C.light]}),$(b.fog,C.fog)||E.push({command:an.setFog,args:[C.fog]}),$(b.projection,C.projection)||E.push({command:an.setProjection,args:[C.projection]});const T={},k=[];!function(G,W,Q,K){let ne;for(ne in W=W||{},G=G||{})G.hasOwnProperty(ne)&&(W.hasOwnProperty(ne)||Ii(ne,Q,K));for(ne in W)W.hasOwnProperty(ne)&&(G.hasOwnProperty(ne)?$(G[ne],W[ne])||("geojson"===G[ne].type&&"geojson"===W[ne].type&&Fa(G,W,ne)?Q.push({command:an.setGeoJSONSourceData,args:[ne,W[ne].data]}):pa(ne,W,Q,K)):Ni(ne,W,Q))}(b.sources,C.sources,k,T);const F=[];b.layers&&b.layers.forEach(G=>{G.source&&T[G.source]?E.push({command:an.removeLayer,args:[G.id]}):F.push(G)});let O=b.terrain;O&&T[O.source]&&(E.push({command:an.setTerrain,args:[void 0]}),O=void 0),E=E.concat(k),$(O,C.terrain)||E.push({command:an.setTerrain,args:[C.terrain]}),function(G,W,Q){W=W||[];const K=(G=G||[]).map(at),ne=W.map(at),q=G.reduce(La,{}),X=W.reduce(La,{}),ee=K.slice(),te=Object.create(null);let ce,_e,ge,Me,We,ze,Te;for(ce=0,_e=0;ce!(b.command in $l));if(0===p.length)return!1;const y=p.filter(b=>!(b.command in hm));if(y.length>0)throw new Error(`Unimplemented: ${y.map(b=>b.command).join(", ")}.`);return p.forEach(b=>{"setTransition"!==b.command&&"setProjection"!==b.command&&this[b.command].apply(this,b.args)}),this.stylesheet=c,this._updateMapProjection(),!0}addImage(c,p){return this.getImage(c)?this.fire(new h.ErrorEvent(new Error("An image with this name already exists."))):(this.imageManager.addImage(c,p),this._afterImageUpdated(c),this)}updateImage(c,p){this.imageManager.updateImage(c,p)}getImage(c){return this.imageManager.getImage(c)}removeImage(c){return this.getImage(c)?(this.imageManager.removeImage(c),this._afterImageUpdated(c),this):this.fire(new h.ErrorEvent(new Error("No image with this name exists.")))}_afterImageUpdated(c){this._availableImages=this.imageManager.listImages(),this._changedImages[c]=!0,this._changed=!0,this.dispatcher.broadcast("setImages",this._availableImages),this.fire(new h.Event("data",{dataType:"style"}))}listImages(){return this._checkLoaded(),this._availableImages.slice()}addSource(c,p,y={}){if(this._checkLoaded(),void 0!==this.getSource(c))throw new Error("There is already a source with this ID");if(!p.type)throw new Error(`The type property must be defined, but only the following properties were given: ${Object.keys(p).join(", ")}.`);if(["vector","raster","geojson","video","image"].indexOf(p.type)>=0&&this._validate(h.validateSource,`sources.${c}`,p,null,y))return;this.map&&this.map._collectResourceTiming&&(p.collectResourceTiming=!0);const b=Oe(c,p,this.dispatcher,this);b.setEventedParent(this,()=>({isSourceLoaded:this._isSourceCacheLoaded(c),source:b.serialize(),sourceId:c}));const C=E=>{const T=(E?"symbol:":"other:")+c,k=this._sourceCaches[T]=new h.SourceCache(T,b,E);(E?this._symbolSourceCaches:this._otherSourceCaches)[c]=k,k.style=this,k.onAdd(this.map)};C(!1),"vector"!==p.type&&"geojson"!==p.type||C(!0),b.onAdd&&b.onAdd(this.map),this._changed=!0}removeSource(c){this._checkLoaded();const p=this.getSource(c);if(!p)throw new Error("There is no source with this ID");for(const b in this._layers)if(this._layers[b].source===c)return this.fire(new h.ErrorEvent(new Error(`Source "${c}" cannot be removed while layer "${b}" is using it.`)));if(this.terrain&&this.terrain.get().source===c)return this.fire(new h.ErrorEvent(new Error(`Source "${c}" cannot be removed while terrain is using it.`)));const y=this._getSourceCaches(c);for(const b of y)delete this._sourceCaches[b.id],delete this._updatedSources[b.id],b.fire(new h.Event("data",{sourceDataType:"metadata",dataType:"source",sourceId:b.getSource().id})),b.setEventedParent(null),b.clearTiles();return delete this._otherSourceCaches[c],delete this._symbolSourceCaches[c],p.setEventedParent(null),p.onRemove&&p.onRemove(this.map),this._changed=!0,this}setGeoJSONSourceData(c,p){this._checkLoaded(),this.getSource(c).setData(p),this._changed=!0}getSource(c){const p=this._getSourceCache(c);return p&&p.getSource()}_getSources(){const c=[];for(const p in this._otherSourceCaches){const y=this._getSourceCache(p);y&&c.push(y.getSource())}return c}addLayer(c,p,y={}){this._checkLoaded();const b=c.id;if(this.getLayer(b))return void this.fire(new h.ErrorEvent(new Error(`Layer with id "${b}" already exists on this map`)));let C;if("custom"===c.type){if(Hl(this,h.validateCustomStyleLayer(c)))return;C=h.createStyleLayer(c)}else{if("object"==typeof c.source&&(this.addSource(b,c.source),c=h.clone$1(c),c=h.extend(c,{source:b})),this._validate(h.validateLayer,`layers.${b}`,c,{arrayIndex:-1},y))return;C=h.createStyleLayer(c),this._validateLayer(C),C.setEventedParent(this,{layer:{id:b}}),this._serializedLayers[C.id]=C.serialize(),this._updateLayerCount(C,!0)}const E=p?this._order.indexOf(p):this._order.length;if(p&&-1===E)return void this.fire(new h.ErrorEvent(new Error(`Layer with id "${p}" does not exist on this map.`)));this._order.splice(E,0,b),this._layerOrderChanged=!0,this._layers[b]=C;const T=this._getLayerSourceCache(C);if(this._removedLayers[b]&&C.source&&T&&"custom"!==C.type){const k=this._removedLayers[b];delete this._removedLayers[b],k.type!==C.type?this._updatedSources[C.source]="clear":(this._updatedSources[C.source]="reload",T.pause())}this._updateLayer(C),C.onAdd&&C.onAdd(this.map),this._updateDrapeFirstLayers()}moveLayer(c,p){if(this._checkLoaded(),this._changed=!0,!this._layers[c])return void this.fire(new h.ErrorEvent(new Error(`The layer '${c}' does not exist in the map's style and cannot be moved.`)));if(c===p)return;const y=this._order.indexOf(c);this._order.splice(y,1);const b=p?this._order.indexOf(p):this._order.length;p&&-1===b?this.fire(new h.ErrorEvent(new Error(`Layer with id "${p}" does not exist on this map.`))):(this._order.splice(b,0,c),this._layerOrderChanged=!0,this._updateDrapeFirstLayers())}removeLayer(c){this._checkLoaded();const p=this._layers[c];if(!p)return void this.fire(new h.ErrorEvent(new Error(`The layer '${c}' does not exist in the map's style and cannot be removed.`)));p.setEventedParent(null),this._updateLayerCount(p,!1);const y=this._order.indexOf(c);this._order.splice(y,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[c]=p,delete this._layers[c],delete this._serializedLayers[c],delete this._updatedLayers[c],delete this._updatedPaintProps[c],p.onRemove&&p.onRemove(this.map),this._updateDrapeFirstLayers()}getLayer(c){return this._layers[c]}hasLayer(c){return c in this._layers}hasLayerType(c){for(const p in this._layers)if(this._layers[p].type===c)return!0;return!1}setLayerZoomRange(c,p,y){this._checkLoaded();const b=this.getLayer(c);b?b.minzoom===p&&b.maxzoom===y||(null!=p&&(b.minzoom=p),null!=y&&(b.maxzoom=y),this._updateLayer(b)):this.fire(new h.ErrorEvent(new Error(`The layer '${c}' does not exist in the map's style and cannot have zoom extent.`)))}setFilter(c,p,y={}){this._checkLoaded();const b=this.getLayer(c);if(b){if(!$(b.filter,p))return null==p?(b.filter=void 0,void this._updateLayer(b)):void(this._validate(h.validateFilter,`layers.${b.id}.filter`,p,{layerType:b.type},y)||(b.filter=h.clone$1(p),this._updateLayer(b)))}else this.fire(new h.ErrorEvent(new Error(`The layer '${c}' does not exist in the map's style and cannot be filtered.`)))}getFilter(c){const p=this.getLayer(c);return p&&h.clone$1(p.filter)}setLayoutProperty(c,p,y,b={}){this._checkLoaded();const C=this.getLayer(c);C?$(C.getLayoutProperty(p),y)||(C.setLayoutProperty(p,y,b),this._updateLayer(C)):this.fire(new h.ErrorEvent(new Error(`The layer '${c}' does not exist in the map's style and cannot be styled.`)))}getLayoutProperty(c,p){const y=this.getLayer(c);if(y)return y.getLayoutProperty(p);this.fire(new h.ErrorEvent(new Error(`The layer '${c}' does not exist in the map's style.`)))}setPaintProperty(c,p,y,b={}){this._checkLoaded();const C=this.getLayer(c);C?$(C.getPaintProperty(p),y)||(C.setPaintProperty(p,y,b)&&this._updateLayer(C),this._changed=!0,this._updatedPaintProps[c]=!0):this.fire(new h.ErrorEvent(new Error(`The layer '${c}' does not exist in the map's style and cannot be styled.`)))}getPaintProperty(c,p){const y=this.getLayer(c);return y&&y.getPaintProperty(p)}setFeatureState(c,p){this._checkLoaded();const y=c.source,b=c.sourceLayer,C=this.getSource(y);if(!C)return void this.fire(new h.ErrorEvent(new Error(`The source '${y}' does not exist in the map's style.`)));const E=C.type;if("geojson"===E&&b)return void this.fire(new h.ErrorEvent(new Error("GeoJSON sources cannot have a sourceLayer parameter.")));if("vector"===E&&!b)return void this.fire(new h.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")));void 0===c.id&&this.fire(new h.ErrorEvent(new Error("The feature id parameter must be provided.")));const T=this._getSourceCaches(y);for(const k of T)k.setFeatureState(b,c.id,p)}removeFeatureState(c,p){this._checkLoaded();const y=c.source,b=this.getSource(y);if(!b)return void this.fire(new h.ErrorEvent(new Error(`The source '${y}' does not exist in the map's style.`)));const C=b.type,E="vector"===C?c.sourceLayer:void 0;if("vector"===C&&!E)return void this.fire(new h.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")));if(p&&"string"!=typeof c.id&&"number"!=typeof c.id)return void this.fire(new h.ErrorEvent(new Error("A feature id is required to remove its specific state property.")));const T=this._getSourceCaches(y);for(const k of T)k.removeFeatureState(E,c.id,p)}getFeatureState(c){this._checkLoaded();const p=c.source,y=c.sourceLayer,b=this.getSource(p);if(b){if("vector"!==b.type||y)return void 0===c.id&&this.fire(new h.ErrorEvent(new Error("The feature id parameter must be provided."))),this._getSourceCaches(p)[0].getFeatureState(y,c.id);this.fire(new h.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}else this.fire(new h.ErrorEvent(new Error(`The source '${p}' does not exist in the map's style.`)))}getTransition(){return h.extend({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)}serialize(){const c={};for(const p in this._sourceCaches){const y=this._sourceCaches[p].getSource();c[y.id]||(c[y.id]=y.serialize())}return h.filterObject({version:this.stylesheet.version,name:this.stylesheet.name,metadata:this.stylesheet.metadata,light:this.stylesheet.light,terrain:this.getTerrain()||void 0,fog:this.stylesheet.fog,center:this.stylesheet.center,zoom:this.stylesheet.zoom,bearing:this.stylesheet.bearing,pitch:this.stylesheet.pitch,sprite:this.stylesheet.sprite,glyphs:this.stylesheet.glyphs,transition:this.stylesheet.transition,projection:this.stylesheet.projection,sources:c,layers:this._serializeLayers(this._order)},p=>void 0!==p)}_updateLayer(c){this._updatedLayers[c.id]=!0;const p=this._getLayerSourceCache(c);c.source&&!this._updatedSources[c.source]&&p&&"raster"!==p.getSource().type&&(this._updatedSources[c.source]="reload",p.pause()),this._changed=!0,c.invalidateCompiledFilter()}_flattenAndSortRenderedFeatures(c){const p=E=>"fill-extrusion"===this._layers[E].type,y={},b=[];for(let E=this._order.length-1;E>=0;E--){const T=this._order[E];if(p(T)){y[T]=E;for(const k of c){const F=k[T];if(F)for(const O of F)b.push(O)}}}b.sort((E,T)=>T.intersectionZ-E.intersectionZ);const C=[];for(let E=this._order.length-1;E>=0;E--){const T=this._order[E];if(p(T))for(let k=b.length-1;k>=0;k--){const F=b[k].feature;if(y[F.layer.id]{const F=this.getLayer(k);return F&&F.is3D()}):this.has3DLayers(),T=Zt.createFromScreenPoints(c,y);for(const k in this._sourceCaches){const F=this._sourceCaches[k].getSource().id;p.layers&&!b[F]||C.push(Ve(this._sourceCaches[k],this._layers,this._serializedLayers,T,p,y,E,!!this.map._showQueryGeometry))}return this.placement&&C.push(function(k,F,O,G,W,Q,K){const ne={},q=Q.queryRenderedSymbols(G),X=[];for(const ee of Object.keys(q).map(Number))X.push(K[ee]);X.sort(Pt);for(const ee of X){const te=ee.featureIndex.lookupSymbolFeatures(q[ee.bucketInstanceId],F,ee.bucketIndex,ee.sourceLayerIndex,W.filter,W.layers,W.availableImages,k);for(const ce in te){const _e=ne[ce]=ne[ce]||[],ge=te[ce];ge.sort((Me,We)=>{const ze=ee.featureSortOrder;if(ze){const Te=ze.indexOf(Me.featureIndex);return ze.indexOf(We.featureIndex)-Te}return We.featureIndex-Me.featureIndex});for(const Me of ge)_e.push(Me)}}for(const ee in ne)ne[ee].forEach(te=>{const ce=te.feature,_e=O(k[ee]).getFeatureState(ce.layer["source-layer"],ce.id);ce.source=ce.layer.source,ce.layer["source-layer"]&&(ce.sourceLayer=ce.layer["source-layer"]),ce.state=_e});return ne}(this._layers,this._serializedLayers,this._getLayerSourceCache.bind(this),T.screenGeometry,p,this.placement.collisionIndex,this.placement.retainedQueryData)),this._flattenAndSortRenderedFeatures(C)}querySourceFeatures(c,p){p&&p.filter&&this._validate(h.validateFilter,"querySourceFeatures.filter",p.filter,null,p);const y=this._getSourceCaches(c);let b=[];for(const C of y)b=b.concat(yt(C,p));return b}addSourceType(c,p,y){return Kr.getSourceType(c)?y(new Error(`A source type called "${c}" already exists.`)):(Kr.setSourceType(c,p),p.workerSourceURL?void this.dispatcher.broadcast("loadWorkerSource",{name:c,url:p.workerSourceURL},y):y(null,null))}getLight(){return this.light.getLight()}setLight(c,p={}){this._checkLoaded();const y=this.light.getLight();let b=!1;for(const E in c)if(!$(c[E],y[E])){b=!0;break}if(!b)return;const C=this._setTransitionParameters({duration:300,delay:0});this.light.setLight(c,p),this.light.updateTransitions(C)}getTerrain(){return this.terrain&&1===this.terrain.drapeRenderMode?this.terrain.get():null}setTerrainForDraping(){this.setTerrain({source:"",exaggeration:0},0)}setTerrain(c,p=1){if(this._checkLoaded(),!c)return delete this.terrain,delete this.stylesheet.terrain,this.dispatcher.broadcast("enableTerrain",!1),this._force3DLayerUpdate(),void(this._markersNeedUpdate=!0);if(1===p){if("object"==typeof c.source){const y="terrain-dem-src";this.addSource(y,c.source),c=h.clone$1(c),c=h.extend(c,{source:y})}if(this._validate(h.validateTerrain,"terrain",c))return}if(!this.terrain||this.terrain&&p!==this.terrain.drapeRenderMode)this._createTerrain(c,p);else{const y=this.terrain,b=y.get();for(const C of Object.keys(h.spec.terrain))!c.hasOwnProperty(C)&&h.spec.terrain[C].default&&(c[C]=h.spec.terrain[C].default);for(const C in c)if(!$(c[C],b[C])){y.set(c),this.stylesheet.terrain=c;const E=this._setTransitionParameters({duration:0});y.updateTransitions(E);break}}this._updateDrapeFirstLayers(),this._markersNeedUpdate=!0}_createFog(c){const p=this.fog=new Nl(c,this.map.transform);this.stylesheet.fog=c;const y=this._setTransitionParameters({duration:0});p.updateTransitions(y)}_updateMarkersOpacity(){0!==this.map._markers.length&&this.map._requestDomTask(()=>{for(const c of this.map._markers)c._evaluateOpacity()})}getFog(){return this.fog?this.fog.get():null}setFog(c){if(this._checkLoaded(),!c)return delete this.fog,delete this.stylesheet.fog,void(this._markersNeedUpdate=!0);if(this.fog){const p=this.fog,y=p.get();0===Object.keys(c).length&&p.set(c);for(const b in c)if(!$(c[b],y[b])){p.set(c),this.stylesheet.fog=c;const C=this._setTransitionParameters({duration:0});p.updateTransitions(C);break}}else this._createFog(c);this._markersNeedUpdate=!0}_setTransitionParameters(c){return{now:h.exported.now(),transition:h.extend(c,this.stylesheet.transition)}}_updateDrapeFirstLayers(){if(!this.map._optimizeForTerrain||!this.terrain)return;const c=this._order.filter(y=>this.isLayerDraped(this._layers[y])),p=this._order.filter(y=>!this.isLayerDraped(this._layers[y]));this._drapedFirstOrder=[],this._drapedFirstOrder.push(...c),this._drapedFirstOrder.push(...p)}_createTerrain(c,p){const y=this.terrain=new Nr(c,p);this.stylesheet.terrain=c,this.dispatcher.broadcast("enableTerrain",!this.terrainSetForDrapingOnly()),this._force3DLayerUpdate();const b=this._setTransitionParameters({duration:0});y.updateTransitions(b)}_force3DLayerUpdate(){for(const c in this._layers){const p=this._layers[c];"fill-extrusion"===p.type&&this._updateLayer(p)}}_forceSymbolLayerUpdate(){for(const c in this._layers){const p=this._layers[c];"symbol"===p.type&&this._updateLayer(p)}}_validate(c,p,y,b,C={}){return(!C||!1!==C.validate)&&Hl(this,c.call(h.validateStyle,h.extend({key:p,style:this.serialize(),value:y,styleSpec:h.spec},b)))}_remove(){this._request&&(this._request.cancel(),this._request=null),this._spriteRequest&&(this._spriteRequest.cancel(),this._spriteRequest=null),h.evented.off("pluginStateChange",this._rtlTextPluginCallback);for(const c in this._layers)this._layers[c].setEventedParent(null);for(const c in this._sourceCaches)this._sourceCaches[c].clearTiles(),this._sourceCaches[c].setEventedParent(null);this.imageManager.setEventedParent(null),this.setEventedParent(null),this.dispatcher.remove()}_clearSource(c){const p=this._getSourceCaches(c);for(const y of p)y.clearTiles()}_reloadSource(c){const p=this._getSourceCaches(c);for(const y of p)y.resume(),y.reload()}_reloadSources(){for(const c of this._getSources())c.reload&&c.reload()}_updateSources(c){for(const p in this._sourceCaches)this._sourceCaches[p].update(c)}_generateCollisionBoxes(){for(const c in this._sourceCaches){const p=this._sourceCaches[c];p.resume(),p.reload()}}_updatePlacement(c,p,y,b,C=!1){let E=!1,T=!1;const k={};for(const F of this._order){const O=this._layers[F];if("symbol"!==O.type)continue;if(!k[O.source]){const W=this._getLayerSourceCache(O);if(!W)continue;k[O.source]=W.getRenderableIds(!0).map(Q=>W.getTileByID(Q)).sort((Q,K)=>K.tileID.overscaledZ-Q.tileID.overscaledZ||(Q.tileID.isLessThan(K.tileID)?-1:1))}const G=this.crossTileSymbolIndex.addLayer(O,k[O.source],c.center.lng,c.projection);E=E||G}if(this.crossTileSymbolIndex.pruneUnusedLayers(this._order),C=C||this._layerOrderChanged||0===y,this._layerOrderChanged&&this.fire(new h.Event("neworder")),(C||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(h.exported.now(),c.zoom))&&(this.pauseablePlacement=new ul(c,this._order,C,p,y,b,this.placement,this.fog&&c.projection.supportsFog?this.fog.state:null),this._layerOrderChanged=!1),this.pauseablePlacement.isDone()?this.placement.setStale():(this.pauseablePlacement.continuePlacement(this._order,this._layers,k),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(h.exported.now()),T=!0),E&&this.pauseablePlacement.placement.setStale()),T||E)for(const F of this._order){const O=this._layers[F];"symbol"===O.type&&this.placement.updateLayerOpacities(O,k[O.source])}return!this.pauseablePlacement.isDone()||this.placement.hasTransitions(h.exported.now())}_releaseSymbolFadeTiles(){for(const c in this._sourceCaches)this._sourceCaches[c].releaseSymbolFadeTiles()}getImages(c,p,y){this.imageManager.getImages(p.icons,y),this._updateTilesForChangedImages();const b=C=>{C&&C.setDependencies(p.tileID.key,p.type,p.icons)};b(this._otherSourceCaches[p.source]),b(this._symbolSourceCaches[p.source])}getGlyphs(c,p,y){this.glyphManager.getGlyphs(p.stacks,y)}getResource(c,p,y){return h.makeRequest(p,y)}_getSourceCache(c){return this._otherSourceCaches[c]}_getLayerSourceCache(c){return"symbol"===c.type?this._symbolSourceCaches[c.source]:this._otherSourceCaches[c.source]}_getSourceCaches(c){const p=[];return this._otherSourceCaches[c]&&p.push(this._otherSourceCaches[c]),this._symbolSourceCaches[c]&&p.push(this._symbolSourceCaches[c]),p}_isSourceCacheLoaded(c){const p=this._getSourceCaches(c);return 0===p.length?(this.fire(new h.ErrorEvent(new Error(`There is no source with ID '${c}'`))),!1):p.every(y=>y.loaded())}has3DLayers(){return this._num3DLayers>0}hasSymbolLayers(){return this._numSymbolLayers>0}hasCircleLayers(){return this._numCircleLayers>0}_clearWorkerCaches(){this.dispatcher.broadcast("clearCaches")}destroy(){this._clearWorkerCaches(),this.terrainSetForDrapingOnly()&&(delete this.terrain,delete this.stylesheet.terrain)}}Kr.getSourceType=function(m){return Fe[m]},Kr.setSourceType=function(m,c){Fe[m]=c},Kr.registerForPluginStateChange=h.registerForPluginStateChange;var Wl="\n#define EPSILON 0.0000001\n#define PI 3.141592653589793\n#define EXTENT 8192.0\n#define HALF_PI PI/2.0\n#define QUARTER_PI PI/4.0\n#define RAD_TO_DEG 180.0/PI\n#define DEG_TO_RAD PI/180.0\n#define GLOBE_RADIUS EXTENT/PI/2.0",ql="attribute highp vec3 a_pos_3f;uniform lowp mat4 u_matrix;varying highp vec3 v_uv;void main() {const mat3 half_neg_pi_around_x=mat3(1.0,0.0, 0.0,0.0,0.0,-1.0,0.0,1.0, 0.0);v_uv=half_neg_pi_around_x*a_pos_3f;vec4 pos=u_matrix*vec4(a_pos_3f,1.0);gl_Position=pos.xyww;}",mp="\n#define ELEVATION_SCALE 7.0\n#define ELEVATION_OFFSET 450.0\n#ifdef PROJECTION_GLOBE_VIEW\nuniform vec3 u_tile_tl_up;uniform vec3 u_tile_tr_up;uniform vec3 u_tile_br_up;uniform vec3 u_tile_bl_up;uniform float u_tile_up_scale;vec3 elevationVector(vec2 pos) {vec2 uv=pos/EXTENT;vec3 up=normalize(mix(\nmix(u_tile_tl_up,u_tile_tr_up,uv.xxx),mix(u_tile_bl_up,u_tile_br_up,uv.xxx),uv.yyy));return up*u_tile_up_scale;}\n#else\nvec3 elevationVector(vec2 pos) { return vec3(0,0,1); }\n#endif\n#ifdef TERRAIN\n#ifdef TERRAIN_DEM_FLOAT_FORMAT\nuniform highp sampler2D u_dem;uniform highp sampler2D u_dem_prev;\n#else\nuniform sampler2D u_dem;uniform sampler2D u_dem_prev;\n#endif\nuniform vec4 u_dem_unpack;uniform vec2 u_dem_tl;uniform vec2 u_dem_tl_prev;uniform float u_dem_scale;uniform float u_dem_scale_prev;uniform float u_dem_size;uniform float u_dem_lerp;uniform float u_exaggeration;uniform float u_meter_to_dem;uniform mat4 u_label_plane_matrix_inv;uniform sampler2D u_depth;uniform vec2 u_depth_size_inv;vec4 tileUvToDemSample(vec2 uv,float dem_size,float dem_scale,vec2 dem_tl) {vec2 pos=dem_size*(uv*dem_scale+dem_tl)+1.0;vec2 f=fract(pos);return vec4((pos-f+0.5)/(dem_size+2.0),f);}float decodeElevation(vec4 v) {return dot(vec4(v.xyz*255.0,-1.0),u_dem_unpack);}float currentElevation(vec2 apos) {\n#ifdef TERRAIN_DEM_FLOAT_FORMAT\nvec2 pos=(u_dem_size*(apos/8192.0*u_dem_scale+u_dem_tl)+1.5)/(u_dem_size+2.0);return u_exaggeration*texture2D(u_dem,pos).a;\n#else\nfloat dd=1.0/(u_dem_size+2.0);vec4 r=tileUvToDemSample(apos/8192.0,u_dem_size,u_dem_scale,u_dem_tl);vec2 pos=r.xy;vec2 f=r.zw;float tl=decodeElevation(texture2D(u_dem,pos));\n#ifdef TERRAIN_DEM_NEAREST_FILTER\nreturn u_exaggeration*tl;\n#endif\nfloat tr=decodeElevation(texture2D(u_dem,pos+vec2(dd,0.0)));float bl=decodeElevation(texture2D(u_dem,pos+vec2(0.0,dd)));float br=decodeElevation(texture2D(u_dem,pos+vec2(dd,dd)));return u_exaggeration*mix(mix(tl,tr,f.x),mix(bl,br,f.x),f.y);\n#endif\n}float prevElevation(vec2 apos) {\n#ifdef TERRAIN_DEM_FLOAT_FORMAT\nvec2 pos=(u_dem_size*(apos/8192.0*u_dem_scale_prev+u_dem_tl_prev)+1.5)/(u_dem_size+2.0);return u_exaggeration*texture2D(u_dem_prev,pos).a;\n#else\nfloat dd=1.0/(u_dem_size+2.0);vec4 r=tileUvToDemSample(apos/8192.0,u_dem_size,u_dem_scale_prev,u_dem_tl_prev);vec2 pos=r.xy;vec2 f=r.zw;float tl=decodeElevation(texture2D(u_dem_prev,pos));float tr=decodeElevation(texture2D(u_dem_prev,pos+vec2(dd,0.0)));float bl=decodeElevation(texture2D(u_dem_prev,pos+vec2(0.0,dd)));float br=decodeElevation(texture2D(u_dem_prev,pos+vec2(dd,dd)));return u_exaggeration*mix(mix(tl,tr,f.x),mix(bl,br,f.x),f.y);\n#endif\n}\n#ifdef TERRAIN_VERTEX_MORPHING\nfloat elevation(vec2 apos) {\n#ifdef ZERO_EXAGGERATION\nreturn 0.0;\n#endif\nfloat nextElevation=currentElevation(apos);float prevElevation=prevElevation(apos);return mix(prevElevation,nextElevation,u_dem_lerp);}\n#else\nfloat elevation(vec2 apos) {\n#ifdef ZERO_EXAGGERATION\nreturn 0.0;\n#endif\nreturn currentElevation(apos);}\n#endif\nhighp float unpack_depth(highp vec4 rgba_depth)\n{const highp vec4 bit_shift=vec4(1.0/(255.0*255.0*255.0),1.0/(255.0*255.0),1.0/255.0,1.0);return dot(rgba_depth,bit_shift)*2.0-1.0;}bool isOccluded(vec4 frag) {vec3 coord=frag.xyz/frag.w;float depth=unpack_depth(texture2D(u_depth,(coord.xy+1.0)*0.5));return coord.z > depth+0.0005;}float occlusionFade(vec4 frag) {vec3 coord=frag.xyz/frag.w;vec3 df=vec3(5.0*u_depth_size_inv,0.0);vec2 uv=0.5*coord.xy+0.5;vec4 depth=vec4(\nunpack_depth(texture2D(u_depth,uv-df.xz)),unpack_depth(texture2D(u_depth,uv+df.xz)),unpack_depth(texture2D(u_depth,uv-df.zy)),unpack_depth(texture2D(u_depth,uv+df.zy))\n);return dot(vec4(0.25),vec4(1.0)-clamp(300.0*(vec4(coord.z-0.001)-depth),0.0,1.0));}vec4 fourSample(vec2 pos,vec2 off) {\n#ifdef TERRAIN_DEM_FLOAT_FORMAT\nfloat tl=texture2D(u_dem,pos).a;float tr=texture2D(u_dem,pos+vec2(off.x,0.0)).a;float bl=texture2D(u_dem,pos+vec2(0.0,off.y)).a;float br=texture2D(u_dem,pos+off).a;\n#else\nvec4 demtl=vec4(texture2D(u_dem,pos).xyz*255.0,-1.0);float tl=dot(demtl,u_dem_unpack);vec4 demtr=vec4(texture2D(u_dem,pos+vec2(off.x,0.0)).xyz*255.0,-1.0);float tr=dot(demtr,u_dem_unpack);vec4 dembl=vec4(texture2D(u_dem,pos+vec2(0.0,off.y)).xyz*255.0,-1.0);float bl=dot(dembl,u_dem_unpack);vec4 dembr=vec4(texture2D(u_dem,pos+off).xyz*255.0,-1.0);float br=dot(dembr,u_dem_unpack);\n#endif\nreturn vec4(tl,tr,bl,br);}float flatElevation(vec2 pack) {vec2 apos=floor(pack/8.0);vec2 span=10.0*(pack-apos*8.0);vec2 uvTex=(apos-vec2(1.0,1.0))/8190.0;float size=u_dem_size+2.0;float dd=1.0/size;vec2 pos=u_dem_size*(uvTex*u_dem_scale+u_dem_tl)+1.0;vec2 f=fract(pos);pos=(pos-f+0.5)*dd;vec4 h=fourSample(pos,vec2(dd));float z=mix(mix(h.x,h.y,f.x),mix(h.z,h.w,f.x),f.y);vec2 w=floor(0.5*(span*u_meter_to_dem-1.0));vec2 d=dd*w;h=fourSample(pos-d,2.0*d+vec2(dd));vec4 diff=abs(h.xzxy-h.ywzw);vec2 slope=min(vec2(0.25),u_meter_to_dem*0.5*(diff.xz+diff.yw)/(2.0*w+vec2(1.0)));vec2 fix=slope*span;float base=z+max(fix.x,fix.y);return u_exaggeration*base;}float elevationFromUint16(float word) {return u_exaggeration*(word/ELEVATION_SCALE-ELEVATION_OFFSET);}\n#else\nfloat elevation(vec2 pos) { return 0.0; }bool isOccluded(vec4 frag) { return false; }float occlusionFade(vec4 frag) { return 1.0; }\n#endif",pm="#ifdef FOG\nuniform mediump vec4 u_fog_color;uniform mediump vec2 u_fog_range;uniform mediump float u_fog_horizon_blend;uniform mediump mat4 u_fog_matrix;varying vec3 v_fog_pos;float fog_range(float depth) {return (depth-u_fog_range[0])/(u_fog_range[1]-u_fog_range[0]);}float fog_horizon_blending(vec3 camera_dir) {float t=max(0.0,camera_dir.z/u_fog_horizon_blend);return u_fog_color.a*exp(-3.0*t*t);}float fog_opacity(float t) {const float decay=6.0;float falloff=1.0-min(1.0,exp(-decay*t));falloff*=falloff*falloff;return u_fog_color.a*min(1.0,1.00747*falloff);}vec3 fog_position(vec3 pos) {return (u_fog_matrix*vec4(pos,1.0)).xyz;}vec3 fog_position(vec2 pos) {return fog_position(vec3(pos,0.0));}float fog(vec3 pos) {float depth=length(pos);float opacity=fog_opacity(fog_range(depth));return opacity*fog_horizon_blending(pos/depth);}\n#endif",Tn="#ifdef FOG\nuniform mediump vec4 u_fog_color;uniform mediump vec2 u_fog_range;uniform mediump float u_fog_horizon_blend;uniform mediump float u_fog_temporal_offset;varying vec3 v_fog_pos;uniform highp vec3 u_frustum_tl;uniform highp vec3 u_frustum_tr;uniform highp vec3 u_frustum_br;uniform highp vec3 u_frustum_bl;uniform highp vec3 u_globe_pos;uniform highp float u_globe_radius;uniform highp vec2 u_viewport;uniform float u_globe_transition;uniform int u_is_globe;float fog_range(float depth) {return (depth-u_fog_range[0])/(u_fog_range[1]-u_fog_range[0]);}float fog_horizon_blending(vec3 camera_dir) {float t=max(0.0,camera_dir.z/u_fog_horizon_blend);return u_fog_color.a*exp(-3.0*t*t);}float fog_opacity(float t) {const float decay=6.0;float falloff=1.0-min(1.0,exp(-decay*t));falloff*=falloff*falloff;return u_fog_color.a*min(1.0,1.00747*falloff);}float globe_glow_progress() {highp vec2 uv=gl_FragCoord.xy/u_viewport;highp vec3 ray_dir=mix(\nmix(u_frustum_tl,u_frustum_tr,uv.x),mix(u_frustum_bl,u_frustum_br,uv.x),1.0-uv.y);highp vec3 dir=normalize(ray_dir);highp vec3 closest_point=dot(u_globe_pos,dir)*dir;highp float sdf=length(closest_point-u_globe_pos)/u_globe_radius;return sdf+PI*0.5;}float fog_opacity(vec3 pos) {float depth=length(pos);return fog_opacity(fog_range(depth));}vec3 fog_apply(vec3 color,vec3 pos) {float depth=length(pos);float opacity;if (u_is_globe==1) {float glow_progress=globe_glow_progress();float t=mix(glow_progress,depth,u_globe_transition);opacity=fog_opacity(fog_range(t));} else {opacity=fog_opacity(fog_range(depth));opacity*=fog_horizon_blending(pos/depth);}return mix(color,u_fog_color.rgb,opacity);}vec4 fog_apply_from_vert(vec4 color,float fog_opac) {float alpha=EPSILON+color.a;color.rgb=mix(color.rgb/alpha,u_fog_color.rgb,fog_opac)*alpha;return color;}vec3 fog_apply_sky_gradient(vec3 camera_ray,vec3 sky_color) {float horizon_blend=fog_horizon_blending(normalize(camera_ray));return mix(sky_color,u_fog_color.rgb,horizon_blend);}vec4 fog_apply_premultiplied(vec4 color,vec3 pos) {float alpha=EPSILON+color.a;color.rgb=fog_apply(color.rgb/alpha,pos)*alpha;return color;}vec3 fog_dither(vec3 color) {vec2 dither_seed=gl_FragCoord.xy+u_fog_temporal_offset;return dither(color,dither_seed);}vec4 fog_dither(vec4 color) {return vec4(fog_dither(color.rgb),color.a);}\n#endif";let Zd={},Xd={};const So=[];kc(Wl,So),kc(mp,So),kc(pm,So),kc(Tn,So),Zd=Si("",mp),Xd=Si(Tn,pm);const Yd=Si("\nhighp vec3 hash(highp vec2 p) {highp vec3 p3=fract(p.xyx*vec3(443.8975,397.2973,491.1871));p3+=dot(p3,p3.yxz+19.19);return fract((p3.xxy+p3.yzz)*p3.zyx);}vec3 dither(vec3 color,highp vec2 seed) {vec3 rnd=hash(seed)+hash(seed+0.59374)-0.5;return color+rnd/255.0;}highp float unpack_depth(highp vec4 rgba_depth)\n{const highp vec4 bit_shift=vec4(1.0/(255.0*255.0*255.0),1.0/(255.0*255.0),1.0/255.0,1.0);return dot(rgba_depth,bit_shift)*2.0-1.0;}highp vec4 pack_depth(highp float ndc_z) {highp float depth=ndc_z*0.5+0.5;const highp vec4 bit_shift=vec4(255.0*255.0*255.0,255.0*255.0,255.0,1.0);const highp vec4 bit_mask =vec4(0.0,1.0/255.0,1.0/255.0,1.0/255.0);highp vec4 res=fract(depth*bit_shift);res-=res.xxyz*bit_mask;return res;}","\nfloat wrap(float n,float min,float max) {float d=max-min;float w=mod(mod(n-min,d)+d,d)+min;return (w==min) ? max : w;}\n#ifdef PROJECTION_GLOBE_VIEW\nvec3 mercator_tile_position(mat4 matrix,vec2 tile_anchor,vec3 tile_id,vec2 mercator_center) {\n#ifndef PROJECTED_POS_ON_VIEWPORT\nfloat tiles=tile_id.z;vec2 mercator=(tile_anchor/EXTENT+tile_id.xy)/tiles;mercator-=mercator_center;mercator.x=wrap(mercator.x,-0.5,0.5);vec4 mercator_tile=vec4(mercator.xy*EXTENT,EXTENT/(2.0*PI),1.0);mercator_tile=matrix*mercator_tile;return mercator_tile.xyz;\n#else\nreturn vec3(0.0);\n#endif\n}vec3 mix_globe_mercator(vec3 globe,vec3 mercator,float t) {return mix(globe,mercator,t);}mat3 globe_mercator_surface_vectors(vec3 pos_normal,vec3 up_dir,float zoom_transition) {vec3 normal=zoom_transition==0.0 ? pos_normal : normalize(mix(pos_normal,up_dir,zoom_transition));vec3 xAxis=normalize(vec3(normal.z,0.0,-normal.x));vec3 yAxis=normalize(cross(normal,xAxis));return mat3(xAxis,yAxis,normal);}\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(\nunpack_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;}const vec4 AWAY=vec4(-1000.0,-1000.0,-1000.0,1);//Normalized device coordinate that is not rendered."),N_=Wl,ji="\n#ifdef GL_ES\nprecision mediump float;\n#else\n\n#if !defined(lowp)\n#define lowp\n#endif\n\n#if !defined(mediump)\n#define mediump\n#endif\n\n#if !defined(highp)\n#define highp\n#endif\n\n#endif";var fm={background:Si("uniform vec4 u_color;uniform float u_opacity;\n#ifdef LIGHTING_3D_MODE\nvarying vec4 v_color;\n#endif\nvoid main() {vec4 out_color;\n#ifdef LIGHTING_3D_MODE\nout_color=v_color;\n#else\nout_color=u_color;\n#endif\n#ifdef FOG\nout_color=fog_dither(fog_apply_premultiplied(out_color,v_fog_pos));\n#endif\ngl_FragColor=out_color*u_opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","attribute vec2 a_pos;uniform mat4 u_matrix;\n#ifdef LIGHTING_3D_MODE\nuniform vec4 u_color;varying vec4 v_color;\n#endif\nvoid main() {gl_Position=u_matrix*vec4(a_pos,0,1);\n#ifdef LIGHTING_3D_MODE\nv_color=apply_lighting(u_color);\n#endif\n#ifdef FOG\nv_fog_pos=fog_position(a_pos);\n#endif\n}"),backgroundPattern:Si("uniform vec2 u_pattern_tl;uniform vec2 u_pattern_br;uniform vec2 u_texsize;uniform float u_opacity;uniform sampler2D u_image;varying vec2 v_pos;void main() {vec2 imagecoord=mod(v_pos,1.0);vec2 pos=mix(u_pattern_tl/u_texsize,u_pattern_br/u_texsize,imagecoord);vec4 out_color=texture2D(u_image,pos);\n#ifdef LIGHTING_3D_MODE\nout_color=apply_lighting(out_color);\n#endif\n#ifdef FOG\nout_color=fog_dither(fog_apply_premultiplied(out_color,v_fog_pos));\n#endif\ngl_FragColor=out_color*u_opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_pattern_size;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_tile_units_to_pixels;attribute vec2 a_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_pattern_size,u_tile_units_to_pixels,a_pos);\n#ifdef FOG\nv_fog_pos=fog_position(a_pos);\n#endif\n}"),circle:Si("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);lowp float antialiasblur=v_data.z;float antialiased_blur=-max(blur,antialiasblur);float opacity_t=smoothstep(0.0,antialiased_blur,extrude_length-1.0);float color_t=stroke_width < 0.01 ? 0.0 : smoothstep(\nantialiased_blur,0.0,extrude_length-radius/(radius+stroke_width)\n);vec4 out_color=mix(color*opacity,stroke_color*stroke_opacity,color_t);\n#ifdef LIGHTING_3D_MODE\nout_color=apply_lighting(out_color);\n#endif\n#ifdef FOG\nout_color=fog_apply_premultiplied(out_color,v_fog_pos);\n#endif\ngl_FragColor=out_color*(v_visibility*opacity_t);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","#define NUM_VISIBILITY_RINGS 2\n#define INV_SQRT2 0.70710678\n#define ELEVATION_BIAS 0.0001\n#define NUM_SAMPLES_PER_RING 16\nuniform mat4 u_matrix;uniform mat2 u_extrude_scale;uniform lowp float u_device_pixel_ratio;uniform highp float u_camera_to_center_distance;attribute vec2 a_pos;\n#ifdef PROJECTION_GLOBE_VIEW\nattribute vec3 a_pos_3;attribute vec3 a_pos_normal_3;uniform mat4 u_inv_rot_matrix;uniform vec2 u_merc_center;uniform vec3 u_tile_id;uniform float u_zoom_transition;uniform vec3 u_up_dir;\n#endif\nvarying 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\nvec2 calc_offset(vec2 extrusion,float radius,float stroke_width, float view_scale) {return extrusion*(radius+stroke_width)*u_extrude_scale*view_scale;}float cantilevered_elevation(vec2 pos,float radius,float stroke_width,float view_scale) {vec2 c1=pos+calc_offset(vec2(-1,-1),radius,stroke_width,view_scale);vec2 c2=pos+calc_offset(vec2(1,-1),radius,stroke_width,view_scale);vec2 c3=pos+calc_offset(vec2(1,1),radius,stroke_width,view_scale);vec2 c4=pos+calc_offset(vec2(-1,1),radius,stroke_width,view_scale);float h1=elevation(c1)+ELEVATION_BIAS;float h2=elevation(c2)+ELEVATION_BIAS;float h3=elevation(c3)+ELEVATION_BIAS;float h4=elevation(c4)+ELEVATION_BIAS;return max(h4,max(h3,max(h1,h2)));}float circle_elevation(vec2 pos) {\n#if defined(TERRAIN)\nreturn elevation(pos)+ELEVATION_BIAS;\n#else\nreturn 0.0;\n#endif\n}vec4 project_vertex(vec2 extrusion,vec4 world_center,vec4 projected_center,float radius,float stroke_width, float view_scale,mat3 surface_vectors) {vec2 sample_offset=calc_offset(extrusion,radius,stroke_width,view_scale);\n#ifdef PITCH_WITH_MAP\n#ifdef PROJECTION_GLOBE_VIEW\nreturn u_matrix*( world_center+vec4(sample_offset.x*surface_vectors[0]+sample_offset.y*surface_vectors[1],0) );\n#else\nreturn u_matrix*( world_center+vec4(sample_offset,0,0) );\n#endif\n#else\nreturn projected_center+vec4(sample_offset,0,0);\n#endif\n}float get_sample_step() {\n#ifdef PITCH_WITH_MAP\nreturn 2.0*PI/float(NUM_SAMPLES_PER_RING);\n#else\nreturn PI/float(NUM_SAMPLES_PER_RING);\n#endif\n}void 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);vec4 world_center;mat3 surface_vectors;\n#ifdef PROJECTION_GLOBE_VIEW\nvec3 pos_normal_3=a_pos_normal_3/16384.0;surface_vectors=globe_mercator_surface_vectors(pos_normal_3,u_up_dir,u_zoom_transition);vec3 surface_extrusion=extrude.x*surface_vectors[0]+extrude.y*surface_vectors[1];vec3 globe_elevation=elevationVector(circle_center)*circle_elevation(circle_center);vec3 globe_pos=a_pos_3+surface_extrusion+globe_elevation;vec3 mercator_elevation=u_up_dir*u_tile_up_scale*circle_elevation(circle_center);vec3 merc_pos=mercator_tile_position(u_inv_rot_matrix,circle_center,u_tile_id,u_merc_center)+surface_extrusion+mercator_elevation;vec3 pos=mix_globe_mercator(globe_pos,merc_pos,u_zoom_transition);world_center=vec4(pos,1);\n#else \nsurface_vectors=mat3(1.0);float height=circle_elevation(circle_center);world_center=vec4(circle_center,height,1);\n#endif\nvec4 projected_center=u_matrix*world_center;float view_scale=0.0;\n#ifdef PITCH_WITH_MAP\n#ifdef SCALE_WITH_MAP\nview_scale=1.0;\n#else\nview_scale=projected_center.w/u_camera_to_center_distance;\n#endif\n#else\n#ifdef SCALE_WITH_MAP\nview_scale=u_camera_to_center_distance;\n#else\nview_scale=projected_center.w;\n#endif\n#endif\ngl_Position=project_vertex(extrude,world_center,projected_center,radius,stroke_width,view_scale,surface_vectors);float visibility=0.0;\n#ifdef TERRAIN\nfloat step=get_sample_step();vec4 occlusion_world_center;vec4 occlusion_projected_center;\n#ifdef PITCH_WITH_MAP\nfloat cantilevered_height=cantilevered_elevation(circle_center,radius,stroke_width,view_scale);occlusion_world_center=vec4(circle_center,cantilevered_height,1);occlusion_projected_center=u_matrix*occlusion_world_center;\n#else\nocclusion_world_center=world_center;occlusion_projected_center=projected_center;\n#endif\nfor(int ring=0; ring < NUM_VISIBILITY_RINGS; ring++) {float scale=(float(ring)+1.0)/float(NUM_VISIBILITY_RINGS);for(int i=0; i < NUM_SAMPLES_PER_RING; i++) {vec2 extrusion=vec2(cos(step*float(i)),-sin(step*float(i)))*scale;vec4 frag_pos=project_vertex(extrusion,occlusion_world_center,occlusion_projected_center,radius,stroke_width,view_scale,surface_vectors);visibility+=float(!isOccluded(frag_pos));}}visibility/=float(NUM_VISIBILITY_RINGS)*float(NUM_SAMPLES_PER_RING);\n#else\nvisibility=1.0;\n#endif\n#ifdef PROJECTION_GLOBE_VIEW\nvisibility=1.0;\n#endif\nv_visibility=visibility;lowp float antialiasblur=1.0/u_device_pixel_ratio/(radius+stroke_width);v_data=vec3(extrude.x,extrude.y,antialiasblur);\n#ifdef FOG\nv_fog_pos=fog_position(world_center.xyz);\n#endif\n}"),clippingMask:Si("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:Si("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 FOG\nif (u_is_globe==0) {gl_FragColor.r*=pow(1.0-fog_opacity(v_fog_pos),2.0);}\n#endif\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;\n#ifdef PROJECTION_GLOBE_VIEW\nattribute vec3 a_pos_3;attribute vec3 a_pos_normal_3;uniform mat4 u_inv_rot_matrix;uniform vec2 u_merc_center;uniform vec3 u_tile_id;uniform float u_zoom_transition;uniform vec3 u_up_dir;\n#endif\nvarying 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;vec2 tilePos=floor(a_pos*0.5);vec3 pos;\n#ifdef PROJECTION_GLOBE_VIEW\nvec3 pos_normal_3=a_pos_normal_3/16384.0;mat3 surface_vectors=globe_mercator_surface_vectors(pos_normal_3,u_up_dir,u_zoom_transition);vec3 surface_extrusion=extrude.x*surface_vectors[0]+extrude.y*surface_vectors[1];vec3 globe_elevation=elevationVector(tilePos)*elevation(tilePos);vec3 globe_pos=a_pos_3+surface_extrusion+globe_elevation;vec3 mercator_elevation=u_up_dir*u_tile_up_scale*elevation(tilePos);vec3 merc_pos=mercator_tile_position(u_inv_rot_matrix,tilePos,u_tile_id,u_merc_center)+surface_extrusion+mercator_elevation;pos=mix_globe_mercator(globe_pos,merc_pos,u_zoom_transition);\n#else\npos=vec3(tilePos+extrude,elevation(tilePos));\n#endif\ngl_Position=u_matrix*vec4(pos,1);\n#ifdef FOG\nv_fog_pos=fog_position(pos);\n#endif\n}"),heatmapTexture:Si("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}","attribute vec2 a_pos;varying vec2 v_pos;void main() {gl_Position=vec4(a_pos,0,1);v_pos=a_pos*0.5+0.5;}"),collisionBox:Si("varying float v_placed;varying float v_notUsed;void main() {vec4 red =vec4(1.0,0.0,0.0,1.0);vec4 blue=vec4(0.0,0.0,1.0,0.5);gl_FragColor =mix(red,blue,step(0.5,v_placed))*0.5;gl_FragColor*=mix(1.0,0.1,step(0.5,v_notUsed));}","attribute vec3 a_pos;attribute vec2 a_anchor_pos;attribute vec2 a_extrude;attribute vec2 a_placed;attribute vec2 a_shift;attribute float a_size_scale;attribute vec2 a_padding;uniform mat4 u_matrix;uniform vec2 u_extrude_scale;uniform float u_camera_to_center_distance;varying float v_placed;varying float v_notUsed;void main() {vec4 projectedPoint=u_matrix*vec4(a_pos+elevationVector(a_anchor_pos)*elevation(a_anchor_pos),1);highp float camera_to_anchor_distance=projectedPoint.w;highp float collision_perspective_ratio=clamp(\n0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,1.5);gl_Position=projectedPoint;gl_Position.xy+=(a_extrude*a_size_scale+a_shift+a_padding)*u_extrude_scale*gl_Position.w*collision_perspective_ratio;v_placed=a_placed.x;v_notUsed=a_placed.y;}"),collisionCircle:Si("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_2f;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_2f;float radius=a_radius;float collision=a_flags.x;float vertexIdx=a_flags.y;vec2 quadVertexOffset=vec2(\nmix(-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(\n0.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:Si("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;\n#ifdef PROJECTION_GLOBE_VIEW\nattribute vec3 a_pos_3;\n#endif\nvarying vec2 v_uv;uniform mat4 u_matrix;uniform float u_overlay_scale;void main() {float h=elevation(a_pos);v_uv=a_pos/8192.0;\n#ifdef PROJECTION_GLOBE_VIEW\ngl_Position=u_matrix*vec4(a_pos_3+elevationVector(a_pos)*h,1);\n#else\ngl_Position=u_matrix*vec4(a_pos*u_overlay_scale,h,1);\n#endif\n}"),fill:Si("#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\nvec4 out_color=color;\n#ifdef LIGHTING_3D_MODE\nout_color=apply_lighting(out_color);\n#endif\n#ifdef FOG\nout_color=fog_dither(fog_apply_premultiplied(out_color,v_fog_pos));\n#endif\ngl_FragColor=out_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);\n#ifdef FOG\nv_fog_pos=fog_position(a_pos);\n#endif\n}"),fillOutline:Si("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);vec4 out_color=outline_color;\n#ifdef LIGHTING_3D_MODE\nout_color=apply_lighting(out_color);\n#endif\n#ifdef FOG\nout_color=fog_dither(fog_apply_premultiplied(out_color,v_fog_pos));\n#endif\ngl_FragColor=out_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;\n#ifdef FOG\nv_fog_pos=fog_position(a_pos);\n#endif\n}"),fillOutlinePattern:Si("uniform vec2 u_texsize;uniform sampler2D u_image;varying vec2 v_pos;varying vec2 v_pos_world;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern\nvec2 pattern_tl=pattern.xy;vec2 pattern_br=pattern.zw;vec2 imagecoord=mod(v_pos,1.0);vec2 pos=mix(pattern_tl/u_texsize,pattern_br/u_texsize,imagecoord);float dist=length(v_pos_world-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);vec4 out_color=texture2D(u_image,pos);\n#ifdef LIGHTING_3D_MODE\nout_color=apply_lighting(out_color);\n#endif\n#ifdef FOG\nout_color=fog_dither(fog_apply_premultiplied(out_color,v_fog_pos));\n#endif\ngl_FragColor=out_color*(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 float u_tile_units_to_pixels;attribute vec2 a_pos;varying vec2 v_pos;varying vec2 v_pos_world;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern\n#pragma mapbox: define lowp float pixel_ratio\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern\n#pragma mapbox: initialize lowp float pixel_ratio\nvec2 pattern_tl=pattern.xy;vec2 pattern_br=pattern.zw;gl_Position=u_matrix*vec4(a_pos,0,1);vec2 display_size=(pattern_br-pattern_tl)/pixel_ratio;v_pos=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,display_size,u_tile_units_to_pixels,a_pos);v_pos_world=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;\n#ifdef FOG\nv_fog_pos=fog_position(a_pos);\n#endif\n}"),fillPattern:Si("uniform vec2 u_texsize;uniform sampler2D u_image;varying vec2 v_pos;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern\nvec2 pattern_tl=pattern.xy;vec2 pattern_br=pattern.zw;vec2 imagecoord=mod(v_pos,1.0);vec2 pos=mix(pattern_tl/u_texsize,pattern_br/u_texsize,imagecoord);vec4 out_color=texture2D(u_image,pos);\n#ifdef LIGHTING_3D_MODE\nout_color=apply_lighting(out_color);\n#endif\n#ifdef FOG\nout_color=fog_dither(fog_apply_premultiplied(out_color,v_fog_pos));\n#endif\ngl_FragColor=out_color*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 float u_tile_units_to_pixels;attribute vec2 a_pos;varying vec2 v_pos;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern\n#pragma mapbox: define lowp float pixel_ratio\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern\n#pragma mapbox: initialize lowp float pixel_ratio\nvec2 pattern_tl=pattern.xy;vec2 pattern_br=pattern.zw;vec2 display_size=(pattern_br-pattern_tl)/pixel_ratio;gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,display_size,u_tile_units_to_pixels,a_pos);\n#ifdef FOG\nv_fog_pos=fog_position(a_pos);\n#endif\n}"),fillExtrusion:Si("varying vec4 v_color;\n#ifdef RENDER_SHADOWS\nvarying highp vec4 v_pos_light_view_0;varying highp vec4 v_pos_light_view_1;varying float v_depth;\n#endif\n#ifdef FAUX_AO\nuniform lowp vec2 u_ao;varying vec3 v_ao;\n#endif\n#ifdef ZERO_ROOF_RADIUS\nvarying vec4 v_roof_color;\n#endif\n#if defined(ZERO_ROOF_RADIUS) || defined(RENDER_SHADOWS)\nvarying highp vec3 v_normal;\n#endif\nvoid main() {\n#if defined(ZERO_ROOF_RADIUS) || defined(RENDER_SHADOWS)\nvec3 normal=v_normal;\n#endif\nfloat z;vec4 color;\n#ifdef ZERO_ROOF_RADIUS\nz=float(normal.z > 0.00001);color=mix(v_color,v_roof_color,z);\n#else\ncolor=v_color;\n#endif\n#ifdef FAUX_AO\nfloat intensity=u_ao[0];float h=max(0.0,v_ao.z);float h_floors=h/u_ao[1];float y_shade=1.0-0.9*intensity*min(v_ao.y,1.0);float shade=(1.0-0.08*intensity)*(y_shade+(1.0-y_shade)*(1.0-pow(1.0-min(h_floors/16.0,1.0),16.0)))+0.08*intensity*min(h_floors/160.0,1.0);float concave=v_ao.x*v_ao.x;\n#ifdef ZERO_ROOF_RADIUS\nconcave*=(1.0-z);\n#endif\nfloat x_shade=mix(1.0,mix(0.6,0.75,min(h_floors/30.0,1.0)),intensity)+0.1*intensity*min(h,1.0);shade*=mix(1.0,x_shade*x_shade*x_shade,concave);color.rgb=color.rgb*shade;\n#endif\n#ifdef RENDER_SHADOWS\n#ifdef ZERO_ROOF_RADIUS\nnormal=mix(normal,vec3(0.0,0.0,1.0),z);\n#endif\ncolor.xyz=shadowed_color_normal(color.xyz,normalize(normal),v_pos_light_view_0,v_pos_light_view_1,v_depth);\n#endif\n#ifdef FOG\ncolor=fog_dither(fog_apply_premultiplied(color,v_fog_pos));\n#endif\ngl_FragColor=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;uniform float u_edge_radius;attribute vec4 a_pos_normal_ed;attribute vec2 a_centroid_pos;\n#ifdef PROJECTION_GLOBE_VIEW\nattribute vec3 a_pos_3;attribute vec3 a_pos_normal_3;uniform mat4 u_inv_rot_matrix;uniform vec2 u_merc_center;uniform vec3 u_tile_id;uniform float u_zoom_transition;uniform vec3 u_up_dir;uniform float u_height_lift;\n#endif\nvarying vec4 v_color;\n#ifdef RENDER_SHADOWS\nuniform mat4 u_light_matrix_0;uniform mat4 u_light_matrix_1;varying highp vec4 v_pos_light_view_0;varying highp vec4 v_pos_light_view_1;varying float v_depth;\n#endif\n#ifdef ZERO_ROOF_RADIUS\nvarying vec4 v_roof_color;\n#endif\n#if defined(ZERO_ROOF_RADIUS) || defined(RENDER_SHADOWS)\nvarying highp vec3 v_normal;\n#endif\n#ifdef FAUX_AO\nuniform lowp vec2 u_ao;varying vec3 v_ao;\n#endif\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\nvec4 pos_nx=floor(a_pos_normal_ed*0.5);vec4 top_up_ny_start=a_pos_normal_ed-2.0*pos_nx;vec3 top_up_ny=top_up_ny_start.xyz;float x_normal=pos_nx.z/8192.0;vec3 normal=top_up_ny.y==1.0 ? vec3(0.0,0.0,1.0) : normalize(vec3(x_normal,(2.0*top_up_ny.z-1.0)*(1.0-abs(x_normal)),0.0));\n#if defined(ZERO_ROOF_RADIUS) || defined(RENDER_SHADOWS)\nv_normal=normal;\n#endif\nbase=max(0.0,base);height=max(0.0,top_up_ny.y==0.0 && top_up_ny.x==1.0 ? height-u_edge_radius : height);float t=top_up_ny.x;vec2 centroid_pos=vec2(0.0);\n#if defined(HAS_CENTROID) || defined(TERRAIN)\ncentroid_pos=a_centroid_pos;\n#endif\nfloat ele=0.0;float h=0.0;float c_ele;vec3 pos;\n#ifdef TERRAIN\nbool flat_roof=centroid_pos.x !=0.0 && t > 0.0;ele=elevation(pos_nx.xy);c_ele=flat_roof ? centroid_pos.y==0.0 ? elevationFromUint16(centroid_pos.x) : flatElevation(centroid_pos) : ele;h=flat_roof ? max(c_ele+height,ele+base+2.0) : ele+(t > 0.0 ? height : base==0.0 ?-5.0 : base);pos=vec3(pos_nx.xy,h);\n#else\nh=t > 0.0 ? height : base;pos=vec3(pos_nx.xy,h);\n#endif\n#ifdef PROJECTION_GLOBE_VIEW\nfloat lift=float((t+base) > 0.0)*u_height_lift;h+=lift;vec3 globe_normal=normalize(mix(a_pos_normal_3/16384.0,u_up_dir,u_zoom_transition));vec3 globe_pos=a_pos_3+globe_normal*(u_tile_up_scale*h);vec3 merc_pos=mercator_tile_position(u_inv_rot_matrix,pos.xy,u_tile_id,u_merc_center)+u_up_dir*u_tile_up_scale*pos.z;pos=mix_globe_mercator(globe_pos,merc_pos,u_zoom_transition);\n#endif\nfloat hidden=float(centroid_pos.x==0.0 && centroid_pos.y==1.0);gl_Position=mix(u_matrix*vec4(pos,1),AWAY,hidden);\n#ifdef RENDER_SHADOWS\nv_pos_light_view_0=u_light_matrix_0*vec4(pos,1);v_pos_light_view_1=u_light_matrix_1*vec4(pos,1);v_depth=gl_Position.w;\n#endif\nfloat NdotL=0.0;float colorvalue=0.0;\n#ifdef LIGHTING_3D_MODE\nNdotL=calculate_NdotL(normal);\n#else\ncolorvalue=color.r*0.2126+color.g*0.7152+color.b*0.0722;vec4 ambientlight=vec4(0.03,0.03,0.03,1.0);color+=ambientlight;NdotL=clamp(dot(normal,u_lightpos),0.0,1.0);NdotL=mix((1.0-u_lightintensity),max((1.0-colorvalue+u_lightintensity),1.0),NdotL);\n#endif\nif (normal.y !=0.0) {float r=0.84;\n#ifndef LIGHTING_3D_MODE\nr=mix(0.7,0.98,1.0-u_lightintensity);\n#endif\nNdotL*=(\n(1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),r,1.0)));}v_color=vec4(0.0,0.0,0.0,1.0);\n#ifdef FAUX_AO\nfloat concave=pos_nx.w-floor(pos_nx.w*0.5)*2.0;float start=top_up_ny_start.w;float y_ground=1.0-clamp(t+base,0.0,1.0);float top_height=height;\n#ifdef TERRAIN\ntop_height=mix(max(c_ele+height,ele+base+2.0),ele+height,float(centroid_pos.x==0.0))-ele;y_ground+=y_ground*5.0/max(3.0,top_height);\n#endif\nv_ao=vec3(mix(concave,-concave,start),y_ground,h-ele);NdotL*=(1.0+0.05*(1.0-top_up_ny.y)*u_ao[0]);\n#ifdef PROJECTION_GLOBE_VIEW\ntop_height+=u_height_lift;\n#endif\ngl_Position.z-=(0.0000006*(min(top_height,500.)+2.0*min(base,500.0)+60.0*concave+3.0*start))*gl_Position.w;\n#endif\n#ifdef LIGHTING_3D_MODE\nv_color=apply_lighting(color,NdotL);\n#else\nv_color.rgb+=clamp(color.rgb*NdotL*u_lightcolor,mix(vec3(0.0),vec3(0.3),1.0-u_lightcolor),vec3(1.0));\n#endif\nv_color*=u_opacity;\n#ifdef ZERO_ROOF_RADIUS\nv_roof_color=vec4(0.0,0.0,0.0,1.0);\n#ifdef LIGHTING_3D_MODE\nv_roof_color=apply_lighting(color,calculate_NdotL(vec3(0.0,0.0,1.0)));\n#else\nfloat roofNdotL=clamp(u_lightpos.z,0.0,1.0);roofNdotL=mix((1.0-u_lightintensity),max((1.0-colorvalue+u_lightintensity),1.0),roofNdotL);v_roof_color.rgb+=clamp(color.rgb*roofNdotL*u_lightcolor,mix(vec3(0.0),vec3(0.3),1.0-u_lightcolor),vec3(1.0));\n#endif\nv_roof_color*=u_opacity;\n#endif\n#ifdef FOG\nv_fog_pos=fog_position(pos);\n#endif\n}"),fillExtrusionPattern:Si("uniform vec2 u_texsize;uniform sampler2D u_image;\n#ifdef FAUX_AO\nuniform lowp vec2 u_ao;varying vec3 v_ao;\n#endif\n#ifdef LIGHTING_3D_MODE\nvarying float v_NdotL;\n#endif\nvarying vec2 v_pos;varying vec4 v_lighting;uniform lowp float u_opacity;\n#pragma mapbox: define lowp float base\n#pragma mapbox: define lowp float height\n#pragma mapbox: define lowp vec4 pattern\n#pragma mapbox: define lowp float pixel_ratio\nvoid main() {\n#pragma mapbox: initialize lowp float base\n#pragma mapbox: initialize lowp float height\n#pragma mapbox: initialize mediump vec4 pattern\n#pragma mapbox: initialize lowp float pixel_ratio\nvec2 pattern_tl=pattern.xy;vec2 pattern_br=pattern.zw;vec2 imagecoord=mod(v_pos,1.0);vec2 pos=mix(pattern_tl/u_texsize,pattern_br/u_texsize,imagecoord);vec4 out_color=texture2D(u_image,pos);\n#ifdef LIGHTING_3D_MODE\nout_color=apply_lighting(out_color,v_NdotL)*u_opacity;\n#else\nout_color=out_color*v_lighting;\n#endif\n#ifdef FAUX_AO\nfloat intensity=u_ao[0];float h=max(0.0,v_ao.z);float h_floors=h/u_ao[1];float y_shade=1.0-0.9*intensity*min(v_ao.y,1.0);float shade=(1.0-0.08*intensity)*(y_shade+(1.0-y_shade)*(1.0-pow(1.0-min(h_floors/16.0,1.0),16.0)))+0.08*intensity*min(h_floors/160.0,1.0);float concave=v_ao.x*v_ao.x;float x_shade=mix(1.0,mix(0.6,0.75,min(h_floors/30.0,1.0)),intensity)+0.1*intensity*min(h,1.0);shade*=mix(1.0,x_shade*x_shade*x_shade,concave);out_color.rgb=out_color.rgb*shade;\n#endif\n#ifdef FOG\nout_color=fog_dither(fog_apply_premultiplied(out_color,v_fog_pos));\n#endif\ngl_FragColor=out_color;\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 float u_tile_units_to_pixels;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 vec4 a_pos_normal_ed;attribute vec2 a_centroid_pos;\n#ifdef PROJECTION_GLOBE_VIEW\nattribute vec3 a_pos_3;attribute vec3 a_pos_normal_3;uniform mat4 u_inv_rot_matrix;uniform vec2 u_merc_center;uniform vec3 u_tile_id;uniform float u_zoom_transition;uniform vec3 u_up_dir;uniform float u_height_lift;\n#endif\nvarying vec2 v_pos;varying vec4 v_lighting;\n#ifdef FAUX_AO\nuniform lowp vec2 u_ao;varying vec3 v_ao;\n#endif\n#ifdef LIGHTING_3D_MODE\nvarying float v_NdotL;\n#endif\n#pragma mapbox: define lowp float base\n#pragma mapbox: define lowp float height\n#pragma mapbox: define lowp vec4 pattern\n#pragma mapbox: define lowp float pixel_ratio\nvoid main() {\n#pragma mapbox: initialize lowp float base\n#pragma mapbox: initialize lowp float height\n#pragma mapbox: initialize mediump vec4 pattern\n#pragma mapbox: initialize lowp float pixel_ratio\nvec2 pattern_tl=pattern.xy;vec2 pattern_br=pattern.zw;vec4 pos_nx=floor(a_pos_normal_ed*0.5);mediump vec4 top_up_ny_start=a_pos_normal_ed-2.0*pos_nx;mediump vec3 top_up_ny=top_up_ny_start.xyz;float x_normal=pos_nx.z/8192.0;vec3 normal=top_up_ny.y==1.0 ? vec3(0.0,0.0,1.0) : normalize(vec3(x_normal,(2.0*top_up_ny.z-1.0)*(1.0-abs(x_normal)),0.0));float edgedistance=a_pos_normal_ed.w;vec2 display_size=(pattern_br-pattern_tl)/pixel_ratio;base=max(0.0,base);height=max(0.0,height);float t=top_up_ny.x;float z=t > 0.0 ? height : base;vec2 centroid_pos=vec2(0.0);\n#if defined(HAS_CENTROID) || defined(TERRAIN)\ncentroid_pos=a_centroid_pos;\n#endif\nfloat ele=0.0;float h=z;vec3 p;float c_ele;\n#ifdef TERRAIN\nbool flat_roof=centroid_pos.x !=0.0 && t > 0.0;ele=elevation(pos_nx.xy);c_ele=flat_roof ? centroid_pos.y==0.0 ? elevationFromUint16(centroid_pos.x) : flatElevation(centroid_pos) : ele;h=flat_roof ? max(c_ele+height,ele+base+2.0) : ele+(t > 0.0 ? height : base==0.0 ?-5.0 : base);p=vec3(pos_nx.xy,h);\n#else\np=vec3(pos_nx.xy,z);\n#endif\n#ifdef PROJECTION_GLOBE_VIEW\nfloat lift=float((t+base) > 0.0)*u_height_lift;h+=lift;vec3 globe_normal=normalize(mix(a_pos_normal_3/16384.0,u_up_dir,u_zoom_transition));vec3 globe_pos=a_pos_3+globe_normal*(u_tile_up_scale*(p.z+lift));vec3 merc_pos=mercator_tile_position(u_inv_rot_matrix,p.xy,u_tile_id,u_merc_center)+u_up_dir*u_tile_up_scale*p.z;p=mix_globe_mercator(globe_pos,merc_pos,u_zoom_transition);\n#endif\nfloat hidden=float(centroid_pos.x==0.0 && centroid_pos.y==1.0);gl_Position=mix(u_matrix*vec4(p,1),AWAY,hidden);vec2 pos=normal.z==1.0\n? pos_nx.xy\n: vec2(edgedistance,z*u_height_factor);v_pos=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,display_size,u_tile_units_to_pixels,pos);v_lighting=vec4(0.0,0.0,0.0,1.0);float NdotL=0.0;\n#ifdef LIGHTING_3D_MODE\nNdotL=calculate_NdotL(normal);\n#else\nNdotL=clamp(dot(normal,u_lightpos),0.0,1.0);NdotL=mix((1.0-u_lightintensity),max((0.5+u_lightintensity),1.0),NdotL);\n#endif\nif (normal.y !=0.0) {float r=0.84;\n#ifndef LIGHTING_3D_MODE\nr=mix(0.7,0.98,1.0-u_lightintensity);\n#endif\nNdotL*=(\n(1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),r,1.0)));}\n#ifdef FAUX_AO\nfloat concave=pos_nx.w-floor(pos_nx.w*0.5)*2.0;float start=top_up_ny_start.w;float y_ground=1.0-clamp(t+base,0.0,1.0);float top_height=height;\n#ifdef TERRAIN\ntop_height=mix(max(c_ele+height,ele+base+2.0),ele+height,float(centroid_pos.x==0.0))-ele;y_ground+=y_ground*5.0/max(3.0,top_height);\n#endif\nv_ao=vec3(mix(concave,-concave,start),y_ground,h-ele);NdotL*=(1.0+0.05*(1.0-top_up_ny.y)*u_ao[0]);\n#ifdef PROJECTION_GLOBE_VIEW\ntop_height+=u_height_lift;\n#endif\ngl_Position.z-=(0.0000006*(min(top_height,500.)+2.0*min(base,500.0)+60.0*concave+3.0*start))*gl_Position.w;\n#endif\n#ifdef LIGHTING_3D_MODE\nv_NdotL=NdotL;\n#else\nv_lighting.rgb+=clamp(NdotL*u_lightcolor,mix(vec3(0.0),vec3(0.3),1.0-u_lightcolor),vec3(1.0));v_lighting*=u_opacity;\n#endif \n#ifdef FOG\nv_fog_pos=fog_position(p);\n#endif\n}"),hillshadePrepare:Si("#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) {\n#ifdef TERRAIN_DEM_FLOAT_FORMAT\nreturn texture2D(u_image,coord).a/4.0;\n#else\nvec4 data=texture2D(u_image,coord)*255.0;data.a=-1.0;return dot(data,u_unpack)/4.0;\n#endif\n}void main() {vec2 epsilon=1.0/u_dimension;float a=getElevation(v_pos+vec2(-epsilon.x,-epsilon.y));float b=getElevation(v_pos+vec2(0,-epsilon.y));float c=getElevation(v_pos+vec2(epsilon.x,-epsilon.y));float d=getElevation(v_pos+vec2(-epsilon.x,0));float e=getElevation(v_pos+vec2(epsilon.x,0));float f=getElevation(v_pos+vec2(-epsilon.x,epsilon.y));float g=getElevation(v_pos+vec2(0,epsilon.y));float h=getElevation(v_pos+vec2(epsilon.x,epsilon.y));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(\n(c+e+e+h)-(a+d+d+f),(f+g+g+h)-(a+b+b+c)\n)/pow(2.0,exaggeration+(19.2562-u_zoom));gl_FragColor=clamp(vec4(\nderiv.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:Si("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;void 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 LIGHTING_3D_MODE\ngl_FragColor=apply_lighting(gl_FragColor);\n#endif\n#ifdef FOG\ngl_FragColor=fog_dither(fog_apply_premultiplied(gl_FragColor,v_fog_pos));\n#endif\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;\n#ifdef FOG\nv_fog_pos=fog_position(a_pos);\n#endif\n}"),line:Si("uniform lowp float u_device_pixel_ratio;uniform float u_alpha_discard_threshold;uniform highp vec2 u_trim_offset;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;varying highp vec4 v_uv;\n#ifdef RENDER_LINE_DASH\nuniform sampler2D u_dash_image;varying vec2 v_tex;\n#endif\n#ifdef RENDER_LINE_GRADIENT\nuniform sampler2D u_gradient_image;\n#endif\nuniform float u_border_width;uniform vec4 u_border_color;float luminance(vec3 c) {return (c.r+c.r+c.b+c.g+c.g+c.g)*0.1667;}\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float floorwidth\n#pragma mapbox: define lowp vec4 dash\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\nfloat linearstep(float edge0,float edge1,float x) {return clamp((x-edge0)/(edge1-edge0),0.0,1.0);}void main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float floorwidth\n#pragma mapbox: initialize lowp vec4 dash\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);\n#ifdef RENDER_LINE_DASH\nfloat sdfdist=texture2D(u_dash_image,v_tex).a;float sdfgamma=1.0/(2.0*u_device_pixel_ratio)/dash.z;alpha*=linearstep(0.5-sdfgamma/floorwidth,0.5+sdfgamma/floorwidth,sdfdist);\n#endif\nhighp vec4 out_color;\n#ifdef RENDER_LINE_GRADIENT\nout_color=texture2D(u_gradient_image,v_uv.xy);\n#else\nout_color=color;\n#endif\n#ifdef RENDER_LINE_TRIM_OFFSET\nhighp float start=v_uv[2];highp float end=v_uv[3];highp float trim_start=u_trim_offset[0];highp float trim_end=u_trim_offset[1];highp float line_progress=(start+(v_uv.x)*(end-start));if (trim_end > trim_start) {if (line_progress <=trim_end && line_progress >=trim_start) {out_color=vec4(0,0,0,0);}}\n#endif\n#ifdef LIGHTING_3D_MODE\nout_color=apply_lighting(out_color);\n#endif\n#ifdef FOG\nout_color=fog_dither(fog_apply_premultiplied(out_color,v_fog_pos));\n#endif\n#ifdef RENDER_LINE_ALPHA_DISCARD\nif (alpha < u_alpha_discard_threshold) {discard;}\n#endif\n#ifdef RENDER_LINE_BORDER\nfloat edgeBlur=(u_border_width+1.0/u_device_pixel_ratio);float alpha2=clamp(min(dist-(v_width2.t-edgeBlur),v_width2.s-dist)/edgeBlur,0.0,1.0);if (alpha2 < 1.) {float smoothAlpha=smoothstep(0.6,1.0,alpha2);\n#ifdef RENDER_LINE_BORDER_AUTO\nfloat Y=(out_color.a > 0.01) ? luminance(out_color.rgb/out_color.a) : 1.;float adjustment=(Y > 0.) ? 0.5/Y : 0.45;if (out_color.a > 0.25 && Y < 0.25) {vec3 borderColor=(Y > 0.) ? out_color.rgb : vec3(1,1,1)*out_color.a;out_color.rgb=out_color.rgb+borderColor*(adjustment*(1.0-smoothAlpha));} else {out_color.rgb*=(0.6 +0.4*smoothAlpha);}\n#else\nout_color.rgb=mix(u_border_color.rgb,out_color.rgb,smoothAlpha);\n#endif\n}\n#endif\ngl_FragColor=out_color*(alpha*opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","\n#define EXTRUDE_SCALE 0.015873016\nattribute vec2 a_pos_normal;attribute vec4 a_data;\n#if defined(RENDER_LINE_GRADIENT) || defined(RENDER_LINE_TRIM_OFFSET)\nattribute highp vec4 a_packed;\n#endif\n#ifdef RENDER_LINE_DASH\nattribute float a_linesofar;\n#endif\nuniform mat4 u_matrix;uniform mat2 u_pixels_to_tile_units;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 vec4 v_uv;\n#ifdef RENDER_LINE_DASH\nuniform vec2 u_texsize;uniform float u_tile_units_to_pixels;varying vec2 v_tex;\n#endif\n#ifdef RENDER_LINE_GRADIENT\nuniform float u_image_height;\n#endif\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float floorwidth\n#pragma mapbox: define lowp vec4 dash\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 floorwidth\n#pragma mapbox: initialize lowp vec4 dash\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;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*EXTRUDE_SCALE;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*EXTRUDE_SCALE*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist*u_pixels_to_tile_units,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2*u_pixels_to_tile_units,0.0,1.0)+projected_extrude;\n#ifndef RENDER_TO_TEXTURE\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#else\nv_gamma_scale=1.0;\n#endif\n#if defined(RENDER_LINE_GRADIENT) || defined(RENDER_LINE_TRIM_OFFSET)\nfloat a_uv_x=a_packed[0];float a_split_index=a_packed[1];highp float a_clip_start=a_packed[2];highp float a_clip_end=a_packed[3];\n#ifdef RENDER_LINE_GRADIENT\nhighp float texel_height=1.0/u_image_height;highp float half_texel_height=0.5*texel_height;v_uv=vec4(a_uv_x,a_split_index*texel_height-half_texel_height,a_clip_start,a_clip_end);\n#else\nv_uv=vec4(a_uv_x,0.0,a_clip_start,a_clip_end);\n#endif\n#endif\n#ifdef RENDER_LINE_DASH\nfloat scale=dash.z==0.0 ? 0.0 : u_tile_units_to_pixels/dash.z;float height=dash.y;v_tex=vec2(a_linesofar*scale/floorwidth,(-normal.y*height+dash.x+0.5)/u_texsize.y);\n#endif\nv_width2=vec2(outset,inset);\n#ifdef FOG\nv_fog_pos=fog_position(pos);\n#endif\n}"),linePattern:Si("uniform lowp float u_device_pixel_ratio;uniform vec2 u_texsize;uniform float u_tile_units_to_pixels;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\n#pragma mapbox: define lowp float pixel_ratio\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize mediump vec4 pattern\n#pragma mapbox: initialize lowp float pixel_ratio\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\nvec2 pattern_tl=pattern.xy;vec2 pattern_br=pattern.zw;vec2 display_size=(pattern_br-pattern_tl)/pixel_ratio;vec2 pattern_size=vec2(display_size.x/u_tile_units_to_pixels,display_size.y);float aspect=display_size.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=mod(v_linesofar/pattern_size.x*aspect,1.0);float y=0.5*v_normal.y+0.5;vec2 texel_size=1.0/u_texsize;vec2 pos=mix(pattern_tl*texel_size-texel_size,pattern_br*texel_size+texel_size,vec2(x,y));vec4 color=texture2D(u_image,pos);\n#ifdef LIGHTING_3D_MODE\ncolor=apply_lighting(color);\n#endif\n#ifdef FOG\ncolor=fog_dither(fog_apply_premultiplied(color,v_fog_pos));\n#endif\ngl_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_linesofar;uniform mat4 u_matrix;uniform vec2 u_units_to_pixels;uniform mat2 u_pixels_to_tile_units;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\n#pragma mapbox: define lowp float pixel_ratio\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\n#pragma mapbox: initialize lowp float pixel_ratio\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;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_pixels_to_tile_units,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2*u_pixels_to_tile_units,0.0,1.0)+projected_extrude;\n#ifndef RENDER_TO_TEXTURE\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#else\nv_gamma_scale=1.0;\n#endif\nv_linesofar=a_linesofar;v_width2=vec2(outset,inset);v_width=floorwidth;\n#ifdef FOG\nv_fog_pos=fog_position(pos);\n#endif\n}"),raster:Si("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(\ndot(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);vec3 out_color=mix(u_high_vec,u_low_vec,rgb);\n#ifdef LIGHTING_3D_MODE\nout_color=apply_lighting(out_color);\n#endif\n#ifdef FOG\nout_color=fog_dither(fog_apply(out_color,v_fog_pos));\n#endif\ngl_FragColor=vec4(out_color*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 vec2 u_perspective_transform;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos0;varying vec2 v_pos1;void main() {float w=1.0+dot(a_texture_pos,u_perspective_transform);gl_Position=u_matrix*vec4(a_pos*w,0,w);v_pos0=a_texture_pos/8192.0;v_pos1=(v_pos0*u_scale_parent)+u_tl_parent;\n#ifdef FOG\nv_fog_pos=fog_position(a_pos);\n#endif\n}"),symbolIcon:Si("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_tex_size;attribute vec4 a_pixeloffset;attribute vec4 a_projected_pos;attribute float a_fade_opacity;\n#ifdef PROJECTION_GLOBE_VIEW\nattribute vec3 a_globe_anchor;attribute vec3 a_globe_normal;\n#endif\nuniform 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 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 vec3 u_up_vector;\n#ifdef PROJECTION_GLOBE_VIEW\nuniform vec3 u_tile_id;uniform mat4 u_inv_rot_matrix;uniform vec2 u_merc_center;uniform vec3 u_camera_forward;uniform float u_zoom_transition;uniform vec3 u_ecef_origin;uniform mat4 u_tile_matrix;\n#endif\nvarying vec2 v_tex;varying float v_fade_opacity;\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_tex_size.xy;vec2 a_size=a_tex_size.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;vec2 a_min_font_scale=a_pixeloffset.zw/256.0;highp float segment_angle=-a_projected_pos[3];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 tile_anchor=a_pos;vec3 h=elevationVector(tile_anchor)*elevation(tile_anchor);float globe_occlusion_fade;vec3 world_pos;vec3 mercator_pos;\n#ifdef PROJECTION_GLOBE_VIEW\nmercator_pos=mercator_tile_position(u_inv_rot_matrix,tile_anchor,u_tile_id,u_merc_center);world_pos=mix_globe_mercator(a_globe_anchor+h,mercator_pos,u_zoom_transition);vec4 ecef_point=u_tile_matrix*vec4(world_pos,1.0);vec3 origin_to_point=ecef_point.xyz-u_ecef_origin;globe_occlusion_fade=dot(origin_to_point,u_camera_forward) >=0.0 ? 0.0 : 1.0;\n#else\nworld_pos=vec3(tile_anchor,0)+h;globe_occlusion_fade=1.0;\n#endif\nvec4 projected_point=u_matrix*vec4(world_pos,1);highp float camera_to_anchor_distance=projected_point.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(\n0.5+0.5*distance_ratio,0.0,1.5);size*=perspective_ratio;float font_scale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjected_point;\n#ifdef PROJECTION_GLOBE_VIEW\nvec3 displacement=vec3(a_globe_normal.z,0,-a_globe_normal.x);offsetProjected_point=u_matrix*vec4(a_globe_anchor+displacement,1);\n#else\noffsetProjected_point=u_matrix*vec4(tile_anchor+vec2(1,0),0,1);\n#endif\nvec2 a=projected_point.xy/projected_point.w;vec2 b=offsetProjected_point.xy/offsetProjected_point.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}vec4 projected_pos;\n#ifdef PROJECTION_GLOBE_VIEW\nvec3 proj_pos=mix_globe_mercator(a_projected_pos.xyz+h,mercator_pos,u_zoom_transition);projected_pos=u_label_plane_matrix*vec4(proj_pos,1.0);\n#else\nprojected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,h.z,1.0);\n#endif\nhighp 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);float z=0.0;vec2 offset=rotation_matrix*(a_offset/32.0*max(a_min_font_scale,font_scale)+a_pxoffset/16.0);\n#ifdef TERRAIN\n#ifdef PITCH_WITH_MAP_TERRAIN\nvec4 tile_pos=u_label_plane_matrix_inv*vec4(a_projected_pos.xy+offset,0.0,1.0);z=elevation(tile_pos.xy);\n#endif\n#endif\nfloat occlusion_fade=occlusionFade(projected_point)*globe_occlusion_fade;\n#ifdef PROJECTION_GLOBE_VIEW\nvec3 xAxis=u_pitch_with_map ? normalize(cross(a_globe_normal,u_up_vector)) : vec3(1,0,0);vec3 yAxis=u_pitch_with_map ? normalize(cross(a_globe_normal,xAxis)) : vec3(0,1,0);gl_Position=mix(u_coord_matrix*vec4(projected_pos.xyz/projected_pos.w+xAxis*offset.x+yAxis*offset.y,1.0),AWAY,float(projected_point.w <=0.0 || occlusion_fade==0.0));\n#else\ngl_Position=mix(u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+offset,z,1.0),AWAY,float(projected_point.w <=0.0 || occlusion_fade==0.0));\n#endif\nfloat projection_transition_fade=1.0;\n#if defined(PROJECTED_POS_ON_VIEWPORT) && defined(PROJECTION_GLOBE_VIEW)\nprojection_transition_fade=1.0-step(EPSILON,u_zoom_transition);\n#endif\nv_tex=a_tex/u_texsize;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;v_fade_opacity=max(0.0,min(occlusion_fade,fade_opacity[0]+fade_change))*projection_transition_fade;}"),symbolSDF:Si("#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 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_tex_size;attribute vec4 a_pixeloffset;attribute vec4 a_projected_pos;attribute float a_fade_opacity;\n#ifdef PROJECTION_GLOBE_VIEW\nattribute vec3 a_globe_anchor;attribute vec3 a_globe_normal;\n#endif\nuniform 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_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 vec3 u_up_vector;\n#ifdef PROJECTION_GLOBE_VIEW\nuniform vec3 u_tile_id;uniform mat4 u_inv_rot_matrix;uniform vec2 u_merc_center;uniform vec3 u_camera_forward;uniform float u_zoom_transition;uniform vec3 u_ecef_origin;uniform mat4 u_tile_matrix;\n#endif\nvarying 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\nvec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_tex_size.xy;vec2 a_size=a_tex_size.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;highp float segment_angle=-a_projected_pos[3];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 tile_anchor=a_pos;vec3 h=elevationVector(tile_anchor)*elevation(tile_anchor);float globe_occlusion_fade;vec3 world_pos;vec3 mercator_pos;\n#ifdef PROJECTION_GLOBE_VIEW\nmercator_pos=mercator_tile_position(u_inv_rot_matrix,tile_anchor,u_tile_id,u_merc_center);world_pos=mix_globe_mercator(a_globe_anchor+h,mercator_pos,u_zoom_transition);vec4 ecef_point=u_tile_matrix*vec4(world_pos,1.0);vec3 origin_to_point=ecef_point.xyz-u_ecef_origin;globe_occlusion_fade=dot(origin_to_point,u_camera_forward) >=0.0 ? 0.0 : 1.0;\n#else\nworld_pos=vec3(tile_anchor,0)+h;globe_occlusion_fade=1.0;\n#endif\nvec4 projected_point=u_matrix*vec4(world_pos,1);highp float camera_to_anchor_distance=projected_point.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(\n0.5+0.5*distance_ratio,0.0,1.5);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetprojected_point;\n#ifdef PROJECTION_GLOBE_VIEW\nvec3 displacement=vec3(a_globe_normal.z,0,-a_globe_normal.x);offsetprojected_point=u_matrix*vec4(a_globe_anchor+displacement,1);\n#else\noffsetprojected_point=u_matrix*vec4(tile_anchor+vec2(1,0),0,1);\n#endif\nvec2 a=projected_point.xy/projected_point.w;vec2 b=offsetprojected_point.xy/offsetprojected_point.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}vec4 projected_pos;\n#ifdef PROJECTION_GLOBE_VIEW\nvec3 proj_pos=mix_globe_mercator(a_projected_pos.xyz+h,mercator_pos,u_zoom_transition);projected_pos=u_label_plane_matrix*vec4(proj_pos,1.0);\n#else\nprojected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,h.z,1.0);\n#endif\nhighp 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);float z=0.0;vec2 offset=rotation_matrix*(a_offset/32.0*fontScale+a_pxoffset);\n#ifdef TERRAIN\n#ifdef PITCH_WITH_MAP_TERRAIN\nvec4 tile_pos=u_label_plane_matrix_inv*vec4(a_projected_pos.xy+offset,0.0,1.0);z=elevation(tile_pos.xy);\n#endif\n#endif\nfloat occlusion_fade=occlusionFade(projected_point)*globe_occlusion_fade;\n#ifdef PROJECTION_GLOBE_VIEW\nvec3 xAxis=u_pitch_with_map ? normalize(cross(a_globe_normal,u_up_vector)) : vec3(1,0,0);vec3 yAxis=u_pitch_with_map ? normalize(cross(a_globe_normal,xAxis)) : vec3(0,1,0);gl_Position=mix(u_coord_matrix*vec4(projected_pos.xyz/projected_pos.w+xAxis*offset.x+yAxis*offset.y,1.0),AWAY,float(projected_point.w <=0.0 || occlusion_fade==0.0));\n#else\ngl_Position=mix(u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+offset,z,1.0),AWAY,float(projected_point.w <=0.0 || occlusion_fade==0.0));\n#endif\nfloat gamma_scale=gl_Position.w;float projection_transition_fade=1.0;\n#if defined(PROJECTED_POS_ON_VIEWPORT) && defined(PROJECTION_GLOBE_VIEW)\nprojection_transition_fade=1.0-step(EPSILON,u_zoom_transition);\n#endif\nvec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(occlusion_fade,fade_opacity[0]+fade_change));v_data0=a_tex/u_texsize;v_data1=vec3(gamma_scale,size,interpolated_fade_opacity*projection_transition_fade);}"),symbolTextAndIcon:Si("#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_tex_size;attribute vec4 a_projected_pos;attribute float a_fade_opacity;\n#ifdef PROJECTION_GLOBE_VIEW\nattribute vec3 a_globe_anchor;attribute vec3 a_globe_normal;\n#endif\nuniform 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_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 vec3 u_up_vector;uniform vec2 u_texsize_icon;\n#ifdef PROJECTION_GLOBE_VIEW\nuniform vec3 u_tile_id;uniform mat4 u_inv_rot_matrix;uniform vec2 u_merc_center;uniform vec3 u_camera_forward;uniform float u_zoom_transition;uniform vec3 u_ecef_origin;uniform mat4 u_tile_matrix;\n#endif\nvarying 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\nvec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_tex_size.xy;vec2 a_size=a_tex_size.zw;float a_size_min=floor(a_size[0]*0.5);float is_sdf=a_size[0]-2.0*a_size_min;highp float segment_angle=-a_projected_pos[3];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 tile_anchor=a_pos;vec3 h=elevationVector(tile_anchor)*elevation(tile_anchor);float globe_occlusion_fade;vec3 world_pos;vec3 mercator_pos;\n#ifdef PROJECTION_GLOBE_VIEW\nmercator_pos=mercator_tile_position(u_inv_rot_matrix,tile_anchor,u_tile_id,u_merc_center);world_pos=mix_globe_mercator(a_globe_anchor+h,mercator_pos,u_zoom_transition);vec4 ecef_point=u_tile_matrix*vec4(world_pos,1.0);vec3 origin_to_point=ecef_point.xyz-u_ecef_origin;globe_occlusion_fade=dot(origin_to_point,u_camera_forward) >=0.0 ? 0.0 : 1.0;\n#else\nworld_pos=vec3(tile_anchor,0)+h;globe_occlusion_fade=1.0;\n#endif\nvec4 projected_point=u_matrix*vec4(world_pos,1);highp float camera_to_anchor_distance=projected_point.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(\n0.5+0.5*distance_ratio,0.0,1.5);size*=perspective_ratio;float font_scale=size/24.0;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offset_projected_point=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projected_point.xy/projected_point.w;vec2 b=offset_projected_point.xy/offset_projected_point.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}vec4 projected_pos;\n#ifdef PROJECTION_GLOBE_VIEW\nvec3 proj_pos=mix_globe_mercator(a_projected_pos.xyz+h,mercator_pos,u_zoom_transition);projected_pos=u_label_plane_matrix*vec4(proj_pos,1.0);\n#else\nprojected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,h.z,1.0);\n#endif\nhighp 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);float z=0.0;vec2 offset=rotation_matrix*(a_offset/32.0*font_scale);\n#ifdef TERRAIN\n#ifdef PITCH_WITH_MAP_TERRAIN\nvec4 tile_pos=u_label_plane_matrix_inv*vec4(a_projected_pos.xy+offset,0.0,1.0);z=elevation(tile_pos.xy);\n#endif\n#endif\nfloat occlusion_fade=occlusionFade(projected_point)*globe_occlusion_fade;\n#ifdef PROJECTION_GLOBE_VIEW\nvec3 xAxis=u_pitch_with_map ? normalize(cross(a_globe_normal,u_up_vector)) : vec3(1,0,0);vec3 yAxis=u_pitch_with_map ? normalize(cross(a_globe_normal,xAxis)) : vec3(0,1,0);gl_Position=mix(u_coord_matrix*vec4(projected_pos.xyz/projected_pos.w+xAxis*offset.x+yAxis*offset.y,1.0),AWAY,float(projected_point.w <=0.0 || occlusion_fade==0.0));\n#else\ngl_Position=mix(u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+offset,z,1.0),AWAY,float(projected_point.w <=0.0 || occlusion_fade==0.0));\n#endif\nfloat gamma_scale=gl_Position.w;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(occlusion_fade,fade_opacity[0]+fade_change));float projection_transition_fade=1.0;\n#if defined(PROJECTED_POS_ON_VIEWPORT) && defined(PROJECTION_GLOBE_VIEW)\nprojection_transition_fade=1.0-step(EPSILON,u_zoom_transition);\n#endif\nv_data0.xy=a_tex/u_texsize;v_data0.zw=a_tex/u_texsize_icon;v_data1=vec4(gamma_scale,size,interpolated_fade_opacity*projection_transition_fade,is_sdf);}"),terrainRaster:Si("uniform sampler2D u_image0;varying vec2 v_pos0;\n#ifdef FOG\nvarying float v_fog_opacity;\n#endif\n#ifdef RENDER_SHADOWS\nvarying vec4 v_pos_light_view_0;varying vec4 v_pos_light_view_1;varying float v_depth;\n#endif\nvoid main() {vec4 color=texture2D(u_image0,v_pos0);\n#ifdef RENDER_SHADOWS\ncolor.xyz=shadowed_color(color.xyz,v_pos_light_view_0,v_pos_light_view_1,v_depth);\n#endif\n#ifdef FOG\n#ifdef ZERO_EXAGGERATION\ncolor=fog_dither(fog_apply_premultiplied(color,v_fog_pos));\n#else\ncolor=fog_dither(fog_apply_from_vert(color,v_fog_opacity));\n#endif\n#endif\ngl_FragColor=color;\n#ifdef TERRAIN_WIREFRAME\ngl_FragColor=vec4(1.0,0.0,0.0,0.8);\n#endif\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform float u_skirt_height;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos0;\n#ifdef FOG\nvarying float v_fog_opacity;\n#endif\n#ifdef RENDER_SHADOWS\nuniform mat4 u_light_matrix_0;uniform mat4 u_light_matrix_1;varying vec4 v_pos_light_view_0;varying vec4 v_pos_light_view_1;varying float v_depth;\n#endif\nconst float skirtOffset=24575.0;const float wireframeOffset=0.00015;void main() {v_pos0=a_texture_pos/8192.0;float skirt=float(a_pos.x >=skirtOffset);float elevation=elevation(a_texture_pos)-skirt*u_skirt_height;\n#ifdef TERRAIN_WIREFRAME\nelevation+=u_skirt_height*u_skirt_height*wireframeOffset;\n#endif\nvec2 decodedPos=a_pos-vec2(skirt*skirtOffset,0.0);gl_Position=u_matrix*vec4(decodedPos,elevation,1.0);\n#ifdef FOG\n#ifdef ZERO_EXAGGERATION\nv_fog_pos=fog_position(decodedPos);\n#else\nv_fog_opacity=fog(fog_position(vec3(decodedPos,elevation)));\n#endif\n#endif\n#ifdef RENDER_SHADOWS\nvec3 pos=vec3(decodedPos,elevation);v_pos_light_view_0=u_light_matrix_0*vec4(pos,1.);v_pos_light_view_1=u_light_matrix_1*vec4(pos,1.);v_depth=gl_Position.w;\n#endif\n}"),terrainDepth:Si("#ifdef GL_ES\nprecision highp float;\n#endif\nvarying float v_depth;void main() {gl_FragColor=pack_depth(v_depth);}","uniform mat4 u_matrix;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying float v_depth;void main() {float elevation=elevation(a_texture_pos);gl_Position=u_matrix*vec4(a_pos,elevation,1.0);v_depth=gl_Position.z/gl_Position.w;}"),skybox:Si("\nvarying lowp vec3 v_uv;uniform lowp samplerCube u_cubemap;uniform lowp float u_opacity;uniform highp float u_temporal_offset;uniform highp vec3 u_sun_direction;float sun_disk(highp vec3 ray_direction,highp vec3 sun_direction) {highp float cos_angle=dot(normalize(ray_direction),sun_direction);const highp float cos_sun_angular_diameter=0.99996192306;const highp float smoothstep_delta=1e-5;return smoothstep(\ncos_sun_angular_diameter-smoothstep_delta,cos_sun_angular_diameter+smoothstep_delta,cos_angle);}float map(float value,float start,float end,float new_start,float new_end) {return ((value-start)*(new_end-new_start))/(end-start)+new_start;}void main() {vec3 uv=v_uv;const float y_bias=0.015;uv.y+=y_bias;uv.y=pow(abs(uv.y),1.0/5.0);uv.y=map(uv.y,0.0,1.0,-1.0,1.0);vec3 sky_color=textureCube(u_cubemap,uv).rgb;\n#ifdef FOG\nsky_color=fog_apply_sky_gradient(v_uv.xzy,sky_color);\n#endif\nsky_color.rgb=dither(sky_color.rgb,gl_FragCoord.xy+u_temporal_offset);sky_color+=0.1*sun_disk(v_uv,u_sun_direction);gl_FragColor=vec4(sky_color*u_opacity,u_opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}",ql),skyboxGradient:Si("varying highp vec3 v_uv;uniform lowp sampler2D u_color_ramp;uniform highp vec3 u_center_direction;uniform lowp float u_radius;uniform lowp float u_opacity;uniform highp float u_temporal_offset;void main() {float progress=acos(dot(normalize(v_uv),u_center_direction))/u_radius;vec4 color=texture2D(u_color_ramp,vec2(progress,0.5));\n#ifdef FOG\ncolor.rgb=fog_apply_sky_gradient(v_uv.xzy,color.rgb/color.a)*color.a;\n#endif\ncolor*=u_opacity;color.rgb=dither(color.rgb,gl_FragCoord.xy+u_temporal_offset);gl_FragColor=color;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}",ql),skyboxCapture:Si("\nvarying highp vec3 v_position;uniform highp float u_sun_intensity;uniform highp float u_luminance;uniform lowp vec3 u_sun_direction;uniform highp vec4 u_color_tint_r;uniform highp vec4 u_color_tint_m;\n#ifdef GL_ES\nprecision highp float;\n#endif\n#define BETA_R vec3(5.5e-6,13.0e-6,22.4e-6)\n#define BETA_M vec3(21e-6,21e-6,21e-6)\n#define MIE_G 0.76\n#define DENSITY_HEIGHT_SCALE_R 8000.0\n#define DENSITY_HEIGHT_SCALE_M 1200.0\n#define PLANET_RADIUS 6360e3\n#define ATMOSPHERE_RADIUS 6420e3\n#define SAMPLE_STEPS 10\n#define DENSITY_STEPS 4\nfloat ray_sphere_exit(vec3 orig,vec3 dir,float radius) {float a=dot(dir,dir);float b=2.0*dot(dir,orig);float c=dot(orig,orig)-radius*radius;float d=sqrt(b*b-4.0*a*c);return (-b+d)/(2.0*a);}vec3 extinction(vec2 density) {return exp(-vec3(BETA_R*u_color_tint_r.a*density.x+BETA_M*u_color_tint_m.a*density.y));}vec2 local_density(vec3 point) {float height=max(length(point)-PLANET_RADIUS,0.0);float exp_r=exp(-height/DENSITY_HEIGHT_SCALE_R);float exp_m=exp(-height/DENSITY_HEIGHT_SCALE_M);return vec2(exp_r,exp_m);}float phase_ray(float cos_angle) {return (3.0/(16.0*PI))*(1.0+cos_angle*cos_angle);}float phase_mie(float cos_angle) {return (3.0/(8.0*PI))*((1.0-MIE_G*MIE_G)*(1.0+cos_angle*cos_angle))/((2.0+MIE_G*MIE_G)*pow(1.0+MIE_G*MIE_G-2.0*MIE_G*cos_angle,1.5));}vec2 density_to_atmosphere(vec3 point,vec3 light_dir) {float ray_len=ray_sphere_exit(point,light_dir,ATMOSPHERE_RADIUS);float step_len=ray_len/float(DENSITY_STEPS);vec2 density_point_to_atmosphere=vec2(0.0);for (int i=0; i < DENSITY_STEPS;++i) {vec3 point_on_ray=point+light_dir*((float(i)+0.5)*step_len);density_point_to_atmosphere+=local_density(point_on_ray)*step_len;;}return density_point_to_atmosphere;}vec3 atmosphere(vec3 ray_dir,vec3 sun_direction,float sun_intensity) {vec2 density_orig_to_point=vec2(0.0);vec3 scatter_r=vec3(0.0);vec3 scatter_m=vec3(0.0);vec3 origin=vec3(0.0,PLANET_RADIUS,0.0);float ray_len=ray_sphere_exit(origin,ray_dir,ATMOSPHERE_RADIUS);float step_len=ray_len/float(SAMPLE_STEPS);for (int i=0; i < SAMPLE_STEPS;++i) {vec3 point_on_ray=origin+ray_dir*((float(i)+0.5)*step_len);vec2 density=local_density(point_on_ray)*step_len;density_orig_to_point+=density;vec2 density_point_to_atmosphere=density_to_atmosphere(point_on_ray,sun_direction);vec2 density_orig_to_atmosphere=density_orig_to_point+density_point_to_atmosphere;vec3 extinction=extinction(density_orig_to_atmosphere);scatter_r+=density.x*extinction;scatter_m+=density.y*extinction;}float cos_angle=dot(ray_dir,sun_direction);float phase_r=phase_ray(cos_angle);float phase_m=phase_mie(cos_angle);vec3 beta_r=BETA_R*u_color_tint_r.rgb*u_color_tint_r.a;vec3 beta_m=BETA_M*u_color_tint_m.rgb*u_color_tint_m.a;return (scatter_r*phase_r*beta_r+scatter_m*phase_m*beta_m)*sun_intensity;}const float A=0.15;const float B=0.50;const float C=0.10;const float D=0.20;const float E=0.02;const float F=0.30;vec3 uncharted2_tonemap(vec3 x) {return ((x*(A*x+C*B)+D*E)/(x*(A*x+B)+D*F))-E/F;}void main() {vec3 ray_direction=v_position;ray_direction.y=pow(ray_direction.y,5.0);const float y_bias=0.015;ray_direction.y+=y_bias;vec3 color=atmosphere(normalize(ray_direction),u_sun_direction,u_sun_intensity);float white_scale=1.0748724675633854;color=uncharted2_tonemap((log2(2.0/pow(u_luminance,4.0)))*color)*white_scale;gl_FragColor=vec4(color,1.0);}","attribute highp vec3 a_pos_3f;uniform mat3 u_matrix_3f;varying highp vec3 v_position;float map(float value,float start,float end,float new_start,float new_end) {return ((value-start)*(new_end-new_start))/(end-start)+new_start;}void main() {vec4 pos=vec4(u_matrix_3f*a_pos_3f,1.0);v_position=pos.xyz;v_position.y*=-1.0;v_position.y=map(v_position.y,-1.0,1.0,0.0,1.0);gl_Position=vec4(a_pos_3f.xy,0.0,1.0);}"),globeRaster:Si("uniform sampler2D u_image0;varying vec2 v_pos0;\n#ifndef FOG\nuniform highp vec3 u_frustum_tl;uniform highp vec3 u_frustum_tr;uniform highp vec3 u_frustum_br;uniform highp vec3 u_frustum_bl;uniform highp vec3 u_globe_pos;uniform highp float u_globe_radius;uniform vec2 u_viewport;\n#endif\nvoid main() {vec4 color;\n#ifdef CUSTOM_ANTIALIASING\nvec2 uv=gl_FragCoord.xy/u_viewport;highp vec3 ray_dir=mix(\nmix(u_frustum_tl,u_frustum_tr,uv.x),mix(u_frustum_bl,u_frustum_br,uv.x),1.0-uv.y);vec3 dir=normalize(ray_dir);vec3 closest_point=dot(u_globe_pos,dir)*dir;float norm_dist_from_center=1.0-length(closest_point-u_globe_pos)/u_globe_radius;const float antialias_pixel=2.0;float antialias_factor=antialias_pixel*fwidth(norm_dist_from_center);float antialias=smoothstep(0.0,antialias_factor,norm_dist_from_center);vec4 raster=texture2D(u_image0,v_pos0);color=vec4(raster.rgb*antialias,raster.a*antialias);\n#else\ncolor=texture2D(u_image0,v_pos0);\n#endif\n#ifdef FOG\ncolor=fog_dither(fog_apply_premultiplied(color,v_fog_pos));\n#endif\ngl_FragColor=color;\n#ifdef TERRAIN_WIREFRAME\ngl_FragColor=vec4(1.0,0.0,0.0,0.8);\n#endif\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_proj_matrix;uniform mat4 u_normalize_matrix;uniform mat4 u_globe_matrix;uniform mat4 u_merc_matrix;uniform float u_zoom_transition;uniform vec2 u_merc_center;uniform mat3 u_grid_matrix;\n#ifdef GLOBE_POLES\nattribute vec3 a_globe_pos;attribute vec2 a_uv;\n#else\nattribute vec2 a_pos;\n#endif\nvarying vec2 v_pos0;const float wireframeOffset=1e3;float mercatorXfromLng(float lng) {return (180.0+lng)/360.0;}float mercatorYfromLat(float lat) {return (180.0-(RAD_TO_DEG*log(tan(QUARTER_PI+lat/2.0*DEG_TO_RAD))))/360.0;}vec3 latLngToECEF(vec2 latLng) {latLng=DEG_TO_RAD*latLng;float cosLat=cos(latLng[0]);float sinLat=sin(latLng[0]);float cosLng=cos(latLng[1]);float sinLng=sin(latLng[1]);float sx=cosLat*sinLng*GLOBE_RADIUS;float sy=-sinLat*GLOBE_RADIUS;float sz=cosLat*cosLng*GLOBE_RADIUS;return vec3(sx,sy,sz);}void main() {\n#ifdef GLOBE_POLES\nvec3 globe_pos=a_globe_pos;vec2 uv=a_uv;\n#else\nfloat tiles=u_grid_matrix[0][2];float idx=u_grid_matrix[1][2];float idy=u_grid_matrix[2][2];vec3 latLng=u_grid_matrix*vec3(a_pos,1.0);float mercatorY=mercatorYfromLat(latLng[0]);float uvY=mercatorY*tiles-idy;float mercatorX=mercatorXfromLng(latLng[1]);float uvX=mercatorX*tiles-idx;vec3 globe_pos=latLngToECEF(latLng.xy);vec2 merc_pos=vec2(mercatorX,mercatorY);vec2 uv=vec2(uvX,uvY);\n#endif\nv_pos0=uv;vec2 tile_pos=uv*EXTENT;\n#ifdef GLOBE_POLES\nvec3 up_vector=normalize(globe_pos)*u_tile_up_scale;\n#else\nvec3 up_vector=elevationVector(tile_pos);\n#endif\nfloat height=elevation(tile_pos);\n#ifdef TERRAIN_WIREFRAME\nheight+=wireframeOffset;\n#endif\nglobe_pos+=up_vector*height;\n#ifdef GLOBE_POLES\nvec4 interpolated_pos=u_globe_matrix*vec4(globe_pos,1.0);\n#else\nvec4 globe_world_pos=u_globe_matrix*vec4(globe_pos,1.0);vec4 merc_world_pos=vec4(0.0);if (u_zoom_transition > 0.0) {merc_world_pos=vec4(merc_pos,height,1.0);merc_world_pos.xy-=u_merc_center;merc_world_pos.x=wrap(merc_world_pos.x,-0.5,0.5);merc_world_pos=u_merc_matrix*merc_world_pos;}vec4 interpolated_pos=vec4(mix(globe_world_pos.xyz,merc_world_pos.xyz,u_zoom_transition),1.0);\n#endif\ngl_Position=u_proj_matrix*interpolated_pos;\n#ifdef FOG\nv_fog_pos=fog_position((u_normalize_matrix*vec4(globe_pos,1.0)).xyz);\n#endif\n}"),globeAtmosphere:Si("uniform float u_transition;uniform highp float u_fadeout_range;uniform highp float u_temporal_offset;uniform vec3 u_start_color;uniform vec4 u_color;uniform vec4 u_space_color;uniform vec4 u_high_color;uniform float u_star_intensity;uniform float u_star_size;uniform float u_star_density;uniform float u_horizon_angle;uniform mat4 u_rotation_matrix;varying highp vec3 v_ray_dir;varying highp vec3 v_horizon_dir;highp float random(highp vec3 p) {p=fract(p*vec3(23.2342,97.1231,91.2342));p+=dot(p.zxy,p.yxz+123.1234);return fract(p.x*p.y);}float stars(vec3 p,float scale,vec2 offset) {vec2 uv_scale=(u_viewport/u_star_size)*scale;vec3 position=vec3(p.xy*uv_scale+offset*u_viewport,p.z);vec3 q=fract(position)-0.5;vec3 id=floor(position);float random_visibility=step(random(id),u_star_density);float circle=smoothstep(0.5+u_star_intensity,0.5,length(q));return circle*random_visibility;}void main() {highp vec3 dir=normalize(v_ray_dir);float globe_pos_dot_dir;\n#ifdef PROJECTION_GLOBE_VIEW\nglobe_pos_dot_dir=dot(u_globe_pos,dir);highp vec3 closest_point_forward=abs(globe_pos_dot_dir)*dir;float norm_dist_from_center=length(closest_point_forward-u_globe_pos)/u_globe_radius;if (norm_dist_from_center < 0.98) {discard;return;}\n#endif\nhighp vec3 horizon_dir=normalize(v_horizon_dir);float horizon_angle_mercator=dir.y < horizon_dir.y ?\n0.0 : max(acos(dot(dir,horizon_dir)),0.0);float horizon_angle;\n#ifdef PROJECTION_GLOBE_VIEW\nhighp vec3 closest_point=globe_pos_dot_dir*dir;float closest_point_to_center=length(closest_point-u_globe_pos);float theta=asin(clamp(closest_point_to_center/length(u_globe_pos),-1.0,1.0));horizon_angle=globe_pos_dot_dir < 0.0 ?\nPI-theta-u_horizon_angle : theta-u_horizon_angle;float angle_t=pow(u_transition,10.0);horizon_angle=mix(horizon_angle,horizon_angle_mercator,angle_t);\n#else\nhorizon_angle=horizon_angle_mercator;\n#endif\nhorizon_angle/=PI;float t=exp(-horizon_angle/u_fadeout_range);float alpha_0=u_color.a;float alpha_1=u_high_color.a;float alpha_2=u_space_color.a;vec3 color_stop_0=u_color.rgb;vec3 color_stop_1=u_high_color.rgb;vec3 color_stop_2=u_space_color.rgb;vec3 c0=mix(color_stop_2,color_stop_1,alpha_1);vec3 c1=mix(c0,color_stop_0,alpha_0);vec3 c2=mix(c0,c1,t);vec3 c =mix(color_stop_2,c2,t);float a0=mix(alpha_2,1.0,alpha_1);float a1=mix(a0,1.0,alpha_0);float a2=mix(a0,a1,t);float a =mix(alpha_2,a2,t);vec2 uv=gl_FragCoord.xy/u_viewport-0.5;float aspect_ratio=u_viewport.x/u_viewport.y;vec4 uv_dir=vec4(normalize(vec3(uv.x*aspect_ratio,uv.y,1.0)),1.0);uv_dir=u_rotation_matrix*uv_dir;vec3 n=abs(uv_dir.xyz);vec2 uv_remap=(n.x > n.y && n.x > n.z) ? uv_dir.yz/uv_dir.x:\n(n.y > n.x && n.y > n.z) ? uv_dir.zx/uv_dir.y:\nuv_dir.xy/uv_dir.z;uv_remap.x/=aspect_ratio;vec3 D=vec3(uv_remap,1.0);highp float star_field=0.0;if (u_star_intensity > 0.0) {star_field+=stars(D,1.2,vec2(0.0,0.0));star_field+=stars(D,1.0,vec2(1.0,0.0));star_field+=stars(D,0.8,vec2(0.0,1.0));star_field+=stars(D,0.6,vec2(1.0,1.0));star_field*=(1.0-pow(t,0.25+(1.0-u_high_color.a)*0.75));c+=star_field*alpha_2;}c=dither(c,gl_FragCoord.xy+u_temporal_offset);gl_FragColor=vec4(c,a);}","attribute vec3 a_pos;attribute vec2 a_uv;uniform vec3 u_frustum_tl;uniform vec3 u_frustum_tr;uniform vec3 u_frustum_br;uniform vec3 u_frustum_bl;uniform float u_horizon;varying highp vec3 v_ray_dir;varying highp vec3 v_horizon_dir;void main() {v_ray_dir=mix(\nmix(u_frustum_tl,u_frustum_tr,a_uv.x),mix(u_frustum_bl,u_frustum_br,a_uv.x),a_uv.y);v_horizon_dir=mix(\nmix(u_frustum_tl,u_frustum_bl,u_horizon),mix(u_frustum_tr,u_frustum_br,u_horizon),a_uv.x);gl_Position=vec4(a_pos,1.0);}")};function kc(m,c){const p=m.replace(/\s*\/\/[^\n]*\n/g,"\n").split("\n");for(let y of p)if(y=y.trim(),"#"===y[0]&&y.includes("if")&&!y.includes("endif")){y=y.replace("#","").replace(/ifdef|ifndef|elif|if/g,"").replace(/!|defined|\(|\)|\|\||&&/g,"").replace(/\s+/g," ").trim();const b=y.split(" ");for(const C of b)c.includes(C)||c.push(C)}}function Si(m,c){const p=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,y=c.match(/attribute (highp |mediump |lowp )?([\w]+) ([\w]+)/g),b={},C=[...So];return kc(m,C),kc(c,C),{fragmentSource:m=m.replace(p,(E,T,k,F,O)=>(b[O]=!0,"define"===T?`\n#ifndef HAS_UNIFORM_u_${O}\nvarying ${k} ${F} ${O};\n#else\nuniform ${k} ${F} u_${O};\n#endif\n`:`\n#ifdef HAS_UNIFORM_u_${O}\n ${k} ${F} ${O} = u_${O};\n#endif\n`)),vertexSource:c=c.replace(p,(E,T,k,F,O)=>{const G="float"===F?"vec2":"vec4",W=O.match(/color/)?"color":G;return b[O]?"define"===T?`\n#ifndef HAS_UNIFORM_u_${O}\nuniform lowp float u_${O}_t;\nattribute ${k} ${G} a_${O};\nvarying ${k} ${F} ${O};\n#else\nuniform ${k} ${F} u_${O};\n#endif\n`:"vec4"===W?`\n#ifndef HAS_UNIFORM_u_${O}\n ${O} = a_${O};\n#else\n ${k} ${F} ${O} = u_${O};\n#endif\n`:`\n#ifndef HAS_UNIFORM_u_${O}\n ${O} = unpack_mix_${W}(a_${O}, u_${O}_t);\n#else\n ${k} ${F} ${O} = u_${O};\n#endif\n`:"define"===T?`\n#ifndef HAS_UNIFORM_u_${O}\nuniform lowp float u_${O}_t;\nattribute ${k} ${G} a_${O};\n#else\nuniform ${k} ${F} u_${O};\n#endif\n`:"vec4"===W?`\n#ifndef HAS_UNIFORM_u_${O}\n ${k} ${F} ${O} = a_${O};\n#else\n ${k} ${F} ${O} = u_${O};\n#endif\n`:`\n#ifndef HAS_UNIFORM_u_${O}\n ${k} ${F} ${O} = unpack_mix_${W}(a_${O}, u_${O}_t);\n#else\n ${k} ${F} ${O} = u_${O};\n#endif\n`}),staticAttributes:y,usedDefines:C}}class Rc{constructor(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffers=[],this.vao=null}bind(c,p,y,b,C,E,T){this.context=c;let k=this.boundPaintVertexBuffers.length!==b.length;for(let O=0;!k&&O{const te=X.paint.get("hillshade-shadow-color"),ce=X.paint.get("hillshade-highlight-color"),_e=X.paint.get("hillshade-accent-color");let ge=X.paint.get("hillshade-illumination-direction")*(Math.PI/180);"viewport"===X.paint.get("hillshade-illumination-anchor")&&(ge-=ne.transform.angle);const Me=!ne.options.moving;return{u_matrix:ee||ne.transform.calculateProjMatrix(q.tileID.toUnwrapped(),Me),u_image:0,u_latrange:Zl(0,q.tileID),u_light:[X.paint.get("hillshade-exaggeration"),ge],u_shadow:te,u_highlight:ce,u_accent:_e}})(m,p,y,m.terrain?c.projMatrix:null);m.prepareDrawProgram(T,O,c.toUnwrapped());const{tileBoundsBuffer:W,tileBoundsIndexBuffer:Q,tileBoundsSegments:K}=m.getTileBoundsBuffers(p);O.draw(T,k.TRIANGLES,b,C,E,h.CullFaceMode.disabled,G,y.id,W,Q,K)}function Oc(m,c,p){if(!c.needsDEMTextureUpload)return;const y=m.context,b=y.gl;y.pixelStoreUnpackPremultiplyAlpha.set(!1),c.demTexture=c.demTexture||m.getTileTexture(p.stride);const C=p.getPixels();c.demTexture?c.demTexture.update(C,{premultiply:!1}):c.demTexture=new h.Texture(y,C,b.RGBA,{premultiply:!1}),c.needsDEMTextureUpload=!1}function Kd(m,c,p,y,b,C){const E=m.context,T=E.gl;if(!c.dem)return;const k=c.dem;if(E.activeTexture.set(T.TEXTURE1),Oc(m,c,k),!c.demTexture)return;c.demTexture.bind(T.NEAREST,T.CLAMP_TO_EDGE);const F=k.dim;E.activeTexture.set(T.TEXTURE0);let O=c.fbo;if(!O){const K=new h.Texture(E,{width:F,height:F,data:null},T.RGBA);K.bind(T.LINEAR,T.CLAMP_TO_EDGE),O=c.fbo=E.createFramebuffer(F,F,!0),O.colorAttachment.set(K.texture)}E.bindFramebuffer.set(O.framebuffer),E.viewport.set([0,0,F,F]);const{tileBoundsBuffer:G,tileBoundsIndexBuffer:W,tileBoundsSegments:Q}=m.getMercatorTileBoundsBuffers();m.useProgram("hillshadePrepare").draw(E,T.TRIANGLES,y,b,C,h.CullFaceMode.disabled,((K,ne)=>{const q=ne.stride,X=h.create();return h.ortho(X,0,h.EXTENT,-h.EXTENT,0,0,1),h.translate(X,X,[0,-h.EXTENT,0]),{u_matrix:X,u_image:1,u_dimension:[q,q],u_zoom:K.overscaledZ,u_unpack:ne.unpackVector}})(c.tileID,k),p.id,G,W,Q),c.needsHillshadePrepare=!1}const Ou=m=>({u_matrix:new h.UniformMatrix4f(m),u_image0:new h.Uniform1i(m),u_skirt_height:new h.Uniform1f(m)}),Fu=(m,c)=>({u_matrix:m,u_image0:0,u_skirt_height:c}),Xl=(m,c,p,y,b,C,E,T,k,F,O,G,W,Q)=>({u_proj_matrix:Float32Array.from(m),u_globe_matrix:c,u_normalize_matrix:Float32Array.from(y),u_merc_matrix:p,u_zoom_transition:b,u_merc_center:C,u_image0:0,u_frustum_tl:E,u_frustum_tr:T,u_frustum_br:k,u_frustum_bl:F,u_globe_pos:O,u_globe_radius:G,u_viewport:W,u_grid_matrix:Q?Float32Array.from(Q):new Float32Array(9)});function za(m,c){return null!=m&&null!=c&&!(!m.hasData()||!c.hasData())&&null!=m.demTexture&&null!=c.demTexture&&m.tileID.key!==c.tileID.key}const Yl=new class{constructor(){this.operations={}}newMorphing(m,c,p,y,b){if(m in this.operations){const C=this.operations[m];C.to.tileID.key!==p.tileID.key&&(C.queued=p)}else this.operations[m]={startTime:y,phase:0,duration:b,from:c,to:p,queued:null}}getMorphValuesForProxy(m){if(!(m in this.operations))return null;const c=this.operations[m];return{from:c.from,to:c.to,phase:c.phase}}update(m){for(const c in this.operations){const p=this.operations[c];for(p.phase=(m-p.startTime)/p.duration;p.phase>=1||!this._validOp(p);)if(!this._nextOp(p,m)){delete this.operations[c];break}}}_nextOp(m,c){return!!m.queued&&(m.from=m.to,m.to=m.queued,m.queued=null,m.phase=0,m.startTime=c,!0)}_validOp(m){return m.from.hasData()&&m.to.hasData()}},we={0:null,1:"TERRAIN_VERTEX_MORPHING",2:"TERRAIN_WIREFRAME"};function Lu(m,c){const p=1<({u_matrix:m});function Kl(m,c,p,y,b){if(b>0){const C=h.exported.now(),E=(C-m.timeAdded)/b,T=c?(C-c.timeAdded)/b:-1,k=p.getSource(),F=y.coveringZoomLevel({tileSize:k.tileSize,roundZoom:k.roundZoom}),O=!c||Math.abs(c.tileID.overscaledZ-F)>Math.abs(m.tileID.overscaledZ-F),G=O&&m.refreshedUponExpiration?1:h.clamp(O?E:1-T,0,1);return m.refreshedUponExpiration&&E>=1&&(m.refreshedUponExpiration=!1),c?{opacity:1,mix:1-G}:{opacity:G,mix:0}}return{opacity:1,mix:0}}class ci extends h.SourceCache{constructor(c){const p={type:"raster-dem",maxzoom:c.transform.maxZoom},y=new Ss(En(),null),b=Oe("mock-dem",p,y,c.style);super("mock-dem",b,!1),b.setEventedParent(this),this._sourceLoaded=!0}_loadTile(c,p){c.state="loaded",p(null)}}class hl extends h.SourceCache{constructor(c){const p=Oe("proxy",{type:"geojson",maxzoom:c.transform.maxZoom},new Ss(En(),null),c.style);super("proxy",p,!1),p.setEventedParent(this),this.map=this.getSource().map=c,this.used=this._sourceLoaded=!0,this.renderCache=[],this.renderCachePool=[],this.proxyCachedFBO={}}update(c,p,y){if(c.freezeTileCoverage)return;this.transform=c;const b=c.coveringTiles({tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled}).reduce((C,E)=>{if(C[E.key]="",!this._tiles[E.key]){const T=new h.Tile(E,this._source.tileSize*E.overscaleFactor(),c.tileZoom);T.state="loaded",this._tiles[E.key]=T}return C},{});for(const C in this._tiles)C in b||(this.freeFBO(C),this._tiles[C].unloadVectorData(),delete this._tiles[C])}freeFBO(c){const p=this.proxyCachedFBO[c];if(void 0!==p){const y=Object.values(p);this.renderCachePool.push(...y),delete this.proxyCachedFBO[c]}}deallocRenderCache(){this.renderCache.forEach(c=>c.fb.destroy()),this.renderCache=[],this.renderCachePool=[],this.proxyCachedFBO={}}}class gp extends h.OverscaledTileID{constructor(c,p,y){super(c.overscaledZ,c.wrap,c.canonical.z,c.canonical.x,c.canonical.y),this.proxyTileKey=p,this.projMatrix=y}}class mm extends h.Elevation{constructor(c,p){super(),this.painter=c,this.terrainTileForTile={},this.prevTerrainTileForTile={};const[y,b,C]=function(k){const F=new h.StructArrayLayout4i8,O=new h.StructArrayLayout3ui6,G=131;F.reserve(17161),O.reserve(33800);const W=h.EXTENT/128,Q=h.EXTENT+W/2,K=Q+W;for(let q=-W;qQ||q<0||q>Q?24575:0,te=h.clamp(Math.round(X),0,h.EXTENT),ce=h.clamp(Math.round(q),0,h.EXTENT);F.emplaceBack(te+ee,ce,te,ce)}const ne=(q,X)=>{const ee=X*G+q;O.emplaceBack(ee+1,ee,ee+G),O.emplaceBack(ee+G,ee+G+1,ee+1)};for(let q=1;q<129;q++)for(let X=1;X<129;X++)ne(X,q);return[0,129].forEach(q=>{for(let X=0;X<130;X++)ne(X,q),ne(q,X)}),[F,O,32768]}(),E=c.context;this.gridBuffer=E.createVertexBuffer(y,h.boundsAttributes.members),this.gridIndexBuffer=E.createIndexBuffer(b),this.gridSegments=h.SegmentVector.simpleSegment(0,0,y.length,b.length),this.gridNoSkirtSegments=h.SegmentVector.simpleSegment(0,0,y.length,C),this.proxyCoords=[],this.proxiedCoords={},this._visibleDemTiles=[],this._drapedRenderBatches=[],this._sourceTilesOverlap={},this.proxySourceCache=new hl(p.map),this.orthoMatrix=h.create(),h.ortho(this.orthoMatrix,"globe"===this.painter.transform.projection.name?.015:0,h.EXTENT,0,h.EXTENT,0,1);const T=E.gl;this._overlapStencilMode=new h.StencilMode({func:T.GEQUAL,mask:255},0,255,T.KEEP,T.KEEP,T.REPLACE),this._previousZoom=c.transform.zoom,this.pool=[],this._findCoveringTileCache={},this._tilesDirty={},this.style=p,this._useVertexMorphing=!0,this._exaggeration=1,this._mockSourceCache=new ci(p.map)}set style(c){c.on("data",this._onStyleDataEvent.bind(this)),c.on("neworder",this._checkRenderCacheEfficiency.bind(this)),this._style=c,this._checkRenderCacheEfficiency()}update(c,p,y){if(c&&c.terrain){this._style!==c&&(this.style=c),this.enabled=!0;const b=c.terrain.properties;this.sourceCache=0===c.terrain.drapeRenderMode?this._mockSourceCache:c._getSourceCache(b.get("source")),this._exaggeration=b.get("exaggeration");const C=()=>{this.sourceCache.used&&h.warnOnce(`Raster DEM source '${this.sourceCache.id}' is used both for terrain and as layer source.\nThis leads to lower resolution of hillshade. For full hillshade resolution but higher memory consumption, define another raster DEM source.`);const E=this.getScaledDemTileSize();this.sourceCache.update(p,E,!0),this.resetTileLookupCache(this.sourceCache.id)};this.sourceCache.usedForTerrain||(this.resetTileLookupCache(this.sourceCache.id),this.sourceCache.usedForTerrain=!0,C(),this._initializing=!0),C(),p.updateElevation(!0,y),this.resetTileLookupCache(this.proxySourceCache.id),this.proxySourceCache.update(p),this._emptyDEMTextureDirty=!0}else this._disable()}resetTileLookupCache(c){this._findCoveringTileCache[c]={}}getScaledDemTileSize(){return this.sourceCache.getSource().tileSize/128*this.proxySourceCache.getSource().tileSize}_checkRenderCacheEfficiency(){const c=this.renderCacheEfficiency(this._style);this._style.map._optimizeForTerrain||100!==c.efficiency&&h.warnOnce(`Terrain render cache efficiency is not optimal (${c.efficiency}%) and performance\n may be affected negatively, consider placing all background, fill and line layers before layer\n with id '${c.firstUndrapedLayer}' or create a map using optimizeForTerrain: true option.`)}_onStyleDataEvent(c){c.coord&&"source"===c.dataType?this._clearRenderCacheForTile(c.sourceCacheId,c.coord):"style"===c.dataType&&(this._invalidateRenderCache=!0)}_disable(){if(this.enabled&&(this.enabled=!1,this._sharedDepthStencil=void 0,this.proxySourceCache.deallocRenderCache(),this._style))for(const c in this._style._sourceCaches)this._style._sourceCaches[c].usedForTerrain=!1}destroy(){this._disable(),this._emptyDEMTexture&&this._emptyDEMTexture.destroy(),this._emptyDepthBufferTexture&&this._emptyDepthBufferTexture.destroy(),this.pool.forEach(c=>c.fb.destroy()),this.pool=[],this._depthFBO&&(this._depthFBO.destroy(),this._depthFBO=void 0,this._depthTexture=void 0)}_source(){return this.enabled?this.sourceCache:null}isUsingMockSource(){return this.sourceCache===this._mockSourceCache}exaggeration(){return this._exaggeration}get visibleDemTiles(){return this._visibleDemTiles}get drapeBufferSize(){const c=2*this.proxySourceCache.getSource().tileSize;return[c,c]}set useVertexMorphing(c){this._useVertexMorphing=c}updateTileBinding(c){if(!this.enabled)return;this.prevTerrainTileForTile=this.terrainTileForTile;const p=this.proxySourceCache,y=this.painter.transform;this._initializing&&(this._initializing=0===y._centerAltitude&&-1===this.getAtPointOrZero(h.MercatorCoordinate.fromLngLat(y.center),-1),this._emptyDEMTextureDirty=!this._initializing);const b=this.proxyCoords=p.getIds().map(k=>{const F=p.getTileByID(k).tileID;return F.projMatrix=y.calculateProjMatrix(F.toUnwrapped()),F});(function(k,F){const O=F.transform.pointCoordinate(F.transform.getCameraPoint()),G=new h.pointGeometry(O.x,O.y);k.sort((W,Q)=>{if(Q.overscaledZ-W.overscaledZ)return Q.overscaledZ-W.overscaledZ;const K=new h.pointGeometry(W.canonical.x+(1<{this.proxyToSource[k.key]={}}),this.terrainTileForTile={};const E=this._style._sourceCaches;for(const k in E){const F=E[k];if(!F.used||(F!==this.sourceCache&&this.resetTileLookupCache(F.id),this._setupProxiedCoordsForOrtho(F,c[k],C),F.usedForTerrain))continue;const O=c[k];F.getSource().reparseOverscaled&&this._assignTerrainTiles(O)}this.proxiedCoords[p.id]=b.map(k=>new gp(k,k.key,this.orthoMatrix)),this._assignTerrainTiles(b),this._prepareDEMTextures(),this._setupDrapedRenderBatches(),this._initFBOPool(),this._setupRenderCache(C),this.renderingToTexture=!1,this._updateTimestamp=h.exported.now();const T={};this._visibleDemTiles=[];for(const k of this.proxyCoords){const F=this.terrainTileForTile[k.key];if(!F)continue;const O=F.tileID.key;O in T||(this._visibleDemTiles.push(F),T[O]=O)}}_assignTerrainTiles(c){this._initializing||c.forEach(p=>{if(this.terrainTileForTile[p.key])return;const y=this._findTileCoveringTileID(p,this.sourceCache);y&&(this.terrainTileForTile[p.key]=y)})}_prepareDEMTextures(){const c=this.painter.context,p=c.gl;for(const y in this.terrainTileForTile){const b=this.terrainTileForTile[y],C=b.dem;!C||b.demTexture&&!b.needsDEMTextureUpload||(c.activeTexture.set(p.TEXTURE1),Oc(this.painter,b,C))}}_prepareDemTileUniforms(c,p,y,b){if(!p||null==p.demTexture)return!1;const C=c.tileID.canonical,E=Math.pow(2,p.tileID.canonical.z-C.z),T=b||"";return y[`u_dem_tl${T}`]=[C.x*E%1,C.y*E%1],y[`u_dem_scale${T}`]=E,!0}get emptyDEMTexture(){return!this._emptyDEMTextureDirty&&this._emptyDEMTexture?this._emptyDEMTexture:this._updateEmptyDEMTexture()}get emptyDepthBufferTexture(){const c=this.painter.context,p=c.gl;if(!this._emptyDepthBufferTexture){const y=new h.RGBAImage({width:1,height:1},Uint8Array.of(255,255,255,255));this._emptyDepthBufferTexture=new h.Texture(c,y,p.RGBA,{premultiply:!1})}return this._emptyDepthBufferTexture}_getLoadedAreaMinimum(){let c=0;const p=this._visibleDemTiles.reduce((y,b)=>{if(!b.dem)return y;const C=b.dem.tree.minimums[0];return C>0&&c++,y+C},0);return c?p/c:0}_updateEmptyDEMTexture(){const c=this.painter.context,p=c.gl;c.activeTexture.set(p.TEXTURE2);const y=this._getLoadedAreaMinimum(),b=new h.RGBAImage({width:1,height:1},new Uint8Array(h.DEMData.pack(y,this.sourceCache.getSource().encoding)));this._emptyDEMTextureDirty=!1;let C=this._emptyDEMTexture;return C?C.update(b,{premultiply:!1}):C=this._emptyDEMTexture=new h.Texture(c,b,p.RGBA,{premultiply:!1}),C}setupElevationDraw(c,p,y){const b=this.painter.context,C=b.gl,E=(T=this.sourceCache.getSource().encoding,{u_dem:2,u_dem_prev:4,u_dem_unpack:h.DEMData.getUnpackVector(T),u_dem_tl:[0,0],u_dem_tl_prev:[0,0],u_dem_scale:0,u_dem_scale_prev:0,u_dem_size:0,u_dem_lerp:1,u_depth:3,u_depth_size_inv:[0,0],u_exaggeration:0});var T;E.u_dem_size=this.sourceCache.getSource().tileSize,E.u_exaggeration=this.exaggeration();let k=null,F=null,O=1;if(y&&y.morphing&&this._useVertexMorphing){const G=y.morphing.srcDemTile,W=y.morphing.dstDemTile;O=y.morphing.phase,G&&W&&(this._prepareDemTileUniforms(c,G,E,"_prev")&&(F=G),this._prepareDemTileUniforms(c,W,E)&&(k=W))}if(F&&k?(b.activeTexture.set(C.TEXTURE2),k.demTexture.bind(C.NEAREST,C.CLAMP_TO_EDGE,C.NEAREST),b.activeTexture.set(C.TEXTURE4),F.demTexture.bind(C.NEAREST,C.CLAMP_TO_EDGE,C.NEAREST),E.u_dem_lerp=O):(k=this.terrainTileForTile[c.tileID.key],b.activeTexture.set(C.TEXTURE2),(this._prepareDemTileUniforms(c,k,E)?k.demTexture:this.emptyDEMTexture).bind(C.NEAREST,C.CLAMP_TO_EDGE)),b.activeTexture.set(C.TEXTURE3),y&&y.useDepthForOcclusion?(this._depthTexture&&this._depthTexture.bind(C.NEAREST,C.CLAMP_TO_EDGE),this._depthFBO&&(E.u_depth_size_inv=[1/this._depthFBO.width,1/this._depthFBO.height])):(this.emptyDepthBufferTexture.bind(C.NEAREST,C.CLAMP_TO_EDGE),E.u_depth_size_inv=[1,1]),y&&y.useMeterToDem&&k){const G=(1<{if(X===bt)return;const gt=[we[bt],"PROJECTION_GLOBE_VIEW"];ce&>.push("CUSTOM_ANTIALIASING"),Ke&>.push(we[ee]),q=F.useProgram("globeRaster",null,gt),X=bt},ge=F.colorModeForRenderPass(),Me=new h.DepthMode(ne.LEQUAL,h.DepthMode.ReadWrite,F.depthRangeFor3D);Yl.update(Q);const We=h.calculateGlobeMercatorMatrix(te),ze=[h.mercatorXfromLng(te.center.lng),h.mercatorYfromLat(te.center.lat)],Te=ee?[!1,!0]:[!1],Ct=F.globeSharedBuffers,Le=[te.width*h.exported.devicePixelRatio,te.height*h.exported.devicePixelRatio],st=Float32Array.from(te.globeMatrix),Ye={useDenormalizedUpVectorScale:!0};if(Te.forEach(bt=>{X=-1;const Ke=bt?ne.LINES:ne.TRIANGLES;for(const gt of W){const Tt=G.getTile(gt),ke=h.StencilMode.disabled,Qe=O.prevTerrainTileForTile[gt.key],Qt=O.terrainTileForTile[gt.key];za(Qe,Qt)&&Yl.newMorphing(gt.key,Qe,Qt,Q,250),K.activeTexture.set(ne.TEXTURE0),Tt.texture.bind(ne.LINEAR,ne.CLAMP_TO_EDGE);const hn=Yl.getMorphValuesForProxy(gt.key),tn=hn?1:0;hn&&h.extend$1(Ye,{morphing:{srcDemTile:hn.from,dstDemTile:hn.to,phase:h.easeCubicInOut(hn.phase)}});const Sn=h.tileCornersToBounds(gt.canonical),Un=h.getLatitudinalLod(Sn.getCenter().lat),un=h.getGridMatrix(gt.canonical,Sn,Un,te.worldSize/te._pixelsPerMercatorPixel),Ht=h.globeNormalizeECEF(h.globeTileBounds(gt.canonical)),gi=Xl(te.projMatrix,st,We,Ht,h.globeToMercatorTransition(te.zoom),ze,te.frustumCorners.TL,te.frustumCorners.TR,te.frustumCorners.BR,te.frustumCorners.BL,te.globeCenterInViewSpace,te.globeRadius,Le,un);if(_e(tn,bt),O.setupElevationDraw(Tt,q,Ye),F.prepareDrawProgram(K,q,gt.toUnwrapped()),Ct){const[_i,zi,xi]=bt?Ct.getWirefameBuffers(F.context,Un):Ct.getGridBuffers(Un);q.draw(K,Ke,Me,ke,ge,h.CullFaceMode.backCCW,gi,"globe_raster",_i,zi,xi)}}}),Ct){const bt=["GLOBE_POLES","PROJECTION_GLOBE_VIEW"];ce&&bt.push("CUSTOM_ANTIALIASING"),q=F.useProgram("globeRaster",null,bt);for(const Ke of W){const{x:gt,y:Tt,z:ke}=Ke.canonical,Qe=0===Tt,Qt=Tt===(1<zi.draw(K,ne.TRIANGLES,Me,h.StencilMode.disabled,ge,h.CullFaceMode.disabled,Xl(te.projMatrix,Ht,Ht,gi,0,ze,te.frustumCorners.TL,te.frustumCorners.TR,te.frustumCorners.BR,te.frustumCorners.BL,te.globeCenterInViewSpace,te.globeRadius,Le),"globe_pole_raster",xi,Sn,Un);O.setupElevationDraw(un,q,Ye),F.prepareDrawProgram(K,q,Ke.toUnwrapped()),Qe&&_i(q,hn),Qt&&(Ht=h.scale(h.create(),Ht,[1,-1,1]),_i(q,tn))}}}}(b,C,E,T,k);else{const F=b.context,O=F.gl;let G,W;const Q=b.options.showTerrainWireframe?2:0,K=(te,ce)=>{if(W===te)return;const _e=[we[te]];ce&&_e.push(we[Q]),G=b.useProgram("terrainRaster",null,_e),W=te},ne=b.colorModeForRenderPass(),q=new h.DepthMode(O.LEQUAL,h.DepthMode.ReadWrite,b.depthRangeFor3D);Yl.update(k);const X=b.transform,ee=6*Math.pow(1.5,22-X.zoom)*C.exaggeration();(Q?[!1,!0]:[!1]).forEach(te=>{W=-1;const ce=te?O.LINES:O.TRIANGLES,[_e,ge]=te?C.getWirefameBuffer():[C.gridIndexBuffer,C.gridSegments];for(const Me of T){const We=E.getTile(Me),ze=h.StencilMode.disabled,Te=C.prevTerrainTileForTile[Me.key],Ct=C.terrainTileForTile[Me.key];za(Te,Ct)&&Yl.newMorphing(Me.key,Te,Ct,k,250),F.activeTexture.set(O.TEXTURE0),We.texture.bind(O.LINEAR,O.CLAMP_TO_EDGE,O.LINEAR_MIPMAP_NEAREST);const Le=Yl.getMorphValuesForProxy(Me.key),st=Le?1:0;let Ye;Le&&(Ye={morphing:{srcDemTile:Le.from,dstDemTile:Le.to,phase:h.easeCubicInOut(Le.phase)}});const bt=Fu(Me.projMatrix,Lu(Me.canonical,X.renderWorldCopies)?ee/10:ee);K(st,te),C.setupElevationDraw(We,G,Ye),b.prepareDrawProgram(F,G,Me.toUnwrapped()),G.draw(F,ce,q,ze,ne,h.CullFaceMode.backCCW,bt,"terrain_raster",C.gridBuffer,_e,ge)}})}}(p,this,this.proxySourceCache,c,this._updateTimestamp),this.renderingToTexture=!0,p.gpuTimingDeferredRenderEnd(),c.splice(0,c.length))}renderBatch(c){if(0===this._drapedRenderBatches.length)return c+1;this.renderingToTexture=!0;const p=this.painter,y=this.painter.context,b=this.proxySourceCache,C=this.proxiedCoords[b.id],E=this._drapedRenderBatches.shift(),T=[],k=p.style.order;let F=0;for(const O of C){const G=b.getTileByID(O.proxyTileKey),W=b.proxyCachedFBO[O.key]?b.proxyCachedFBO[O.key][c]:void 0,Q=void 0!==W?b.renderCache[W]:this.pool[F++],K=void 0!==W;if(G.texture=Q.tex,K&&!Q.dirty){T.push(G.tileID);continue}let ne;y.bindFramebuffer.set(Q.fb.framebuffer),this.renderedToTile=!1,Q.dirty&&(y.clear({color:h.Color.transparent,stencil:0}),Q.dirty=!1);for(let q=E.start;q<=E.end;++q){const X=p.style._layers[k[q]];if(X.isHidden(p.transform.zoom))continue;const ee=p.style._getLayerSourceCache(X),te=ee?this.proxyToSource[O.key][ee.id]:[O];if(!te)continue;const ce=te;y.viewport.set([0,0,Q.fb.width,Q.fb.height]),ne!==(ee?ee.id:null)&&(this._setupStencil(Q,te,X,ee),ne=ee?ee.id:null),p.renderLayer(p,ee,X,ce)}this.renderedToTile?(Q.dirty=!0,T.push(G.tileID)):K||--F,5===F&&(F=0,this.renderToBackBuffer(T))}return this.renderToBackBuffer(T),this.renderingToTexture=!1,y.bindFramebuffer.set(null),y.viewport.set([0,0,p.width,p.height]),E.end+1}postRender(){}renderCacheEfficiency(c){const p=c.order.length;if(0===p)return{efficiency:100};let y,b=0,C=0,E=!1;for(let T=0;Tp.dem).forEach(p=>{c=Math.min(c,p.dem.tree.minimums[0])}),0===c?c:(c-30)*this._exaggeration}raycast(c,p,y){if(!this._visibleDemTiles)return null;const b=this._visibleDemTiles.filter(C=>C.dem).map(C=>{const E=C.tileID,T=1<(null!==C.t?C.t:Number.MAX_VALUE)-(null!==E.t?E.t:Number.MAX_VALUE));for(const C of b){if(null==C.t)return null;const E=C.tile.dem.tree.raycast(C.minx,C.miny,C.maxx,C.maxy,c,p,y);if(null!=E)return E}return null}_createFBO(){const c=this.painter.context,p=c.gl,y=this.drapeBufferSize;c.activeTexture.set(p.TEXTURE0);const b=new h.Texture(c,{width:y[0],height:y[1],data:null},p.RGBA);b.bind(p.LINEAR,p.CLAMP_TO_EDGE);const C=c.createFramebuffer(y[0],y[1],!1);return C.colorAttachment.set(b.texture),C.depthAttachment=new Ac(c,C.framebuffer),void 0===this._sharedDepthStencil?(this._sharedDepthStencil=c.createRenderbuffer(c.gl.DEPTH_STENCIL,y[0],y[1]),this._stencilRef=0,C.depthAttachment.set(this._sharedDepthStencil),c.clear({stencil:0})):C.depthAttachment.set(this._sharedDepthStencil),c.extTextureFilterAnisotropic&&!c.extTextureFilterAnisotropicForceOff&&p.texParameterf(p.TEXTURE_2D,c.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,c.extTextureFilterAnisotropicMax),{fb:C,tex:b,dirty:!1}}_initFBOPool(){for(;this.pool.length{const p=this._style._layers[c],y=p.isHidden(this.painter.transform.zoom);return"custom"!==p.type&&!y&&p.hasTransition()})}_clearRasterFadeFromRenderCache(){let c=!1;for(const p in this._style._sourceCaches)if(this._style._sourceCaches[p]._source instanceof j){c=!0;break}if(c)for(let p=0;pp.renderCachePool.length){const E=Object.values(p.proxyCachedFBO);p.proxyCachedFBO={};for(let T=0;T=0;E--){const T=y[E];if(p.getTileByID(T.key),void 0!==p.proxyCachedFBO[T.key]){const k=c[T.key],F=this.proxyToSource[T.key];let O=0;for(const G in F){const W=F[G],Q=k[G];if(!Q||Q.length!==W.length||W.some((K,ne)=>K!==Q[ne]||b[G]&&b[G].hasOwnProperty(K.key))){O=-1;break}++O}for(const G in p.proxyCachedFBO[T.key])p.renderCache[p.proxyCachedFBO[T.key][G]].dirty=O<0||O!==Object.values(k).length}}const C=[...this._drapedRenderBatches];C.sort((E,T)=>T.end-T.start-(E.end-E.start));for(const E of C)for(const T of y){if(p.proxyCachedFBO[T.key])continue;let k=p.renderCachePool.pop();void 0===k&&p.renderCache.length<50&&(k=p.renderCache.length,p.renderCache.push(this._createFBO())),void 0!==k&&(p.proxyCachedFBO[T.key]={},p.proxyCachedFBO[T.key][E.start]=k,p.renderCache[k].dirty=!0)}this._tilesDirty={}}_setupStencil(c,p,y,b){if(!b||!this._sourceTilesOverlap[b.id])return void(this._overlapStencilType&&(this._overlapStencilType=!1));const C=this.painter.context,E=C.gl;if(p.length<=1)return void(this._overlapStencilType=!1);let T;if(y.isTileClipped())T=p.length,this._overlapStencilMode.test={func:E.EQUAL,mask:255},this._overlapStencilType="Clip";else{if(!(p[0].overscaledZ>p[p.length-1].overscaledZ))return void(this._overlapStencilType=!1);T=1,this._overlapStencilMode.test={func:E.GREATER,mask:255},this._overlapStencilType="Mask"}this._stencilRef+T>255&&(C.clear({stencil:0}),this._stencilRef=0),this._stencilRef+=T,this._overlapStencilMode.ref=this._stencilRef,y.isTileClipped()&&this._renderTileClippingMasks(p,this._overlapStencilMode.ref)}clipOrMaskOverlapStencilType(){return"Clip"===this._overlapStencilType||"Mask"===this._overlapStencilType}stencilModeForRTTOverlap(c){return this.renderingToTexture&&this._overlapStencilType?("Clip"===this._overlapStencilType&&(this._overlapStencilMode.ref=this.painter._tileClippingMaskIDs[c.key]),this._overlapStencilMode):h.StencilMode.disabled}_renderTileClippingMasks(c,p){const y=this.painter,b=this.painter.context,C=b.gl;y._tileClippingMaskIDs={},b.setColorMode(h.ColorMode.disabled),b.setDepthMode(h.DepthMode.disabled);const E=y.useProgram("clippingMask");for(const T of c){const k=y._tileClippingMaskIDs[T.key]=--p;E.draw(b,C.TRIANGLES,h.DepthMode.disabled,new h.StencilMode({func:C.ALWAYS,mask:0},k,255,C.KEEP,C.KEEP,C.REPLACE),h.ColorMode.disabled,h.CullFaceMode.disabled,Fn(T.projMatrix),"$clipping",y.tileExtentBuffer,y.quadTriangleIndexBuffer,y.tileExtentSegments)}}pointCoordinate(c){const p=this.painter.transform;if(c.x<0||c.x>p.width||c.y<0||c.y>p.height)return null;const y=[c.x,c.y,1,1];h.transformMat4$1(y,y,p.pixelMatrixInverse),h.scale$1(y,y,1/y[3]),y[0]/=p.worldSize,y[1]/=p.worldSize;const b=p._camera.position,C=h.mercatorZfromAltitude(1,p.center.lat),E=[b[0],b[1],b[2]/C,0],T=h.subtract([],y.slice(0,3),E);h.normalize(T,T);const k=this.raycast(E,T,this._exaggeration);return null!==k&&k?(h.scaleAndAdd(E,E,T,k),E[3]=E[2],E[2]*=C,E):null}drawDepth(){const c=this.painter,p=c.context,y=this.proxySourceCache,b=Math.ceil(c.width),C=Math.ceil(c.height);if(!this._depthFBO||this._depthFBO.width===b&&this._depthFBO.height===C||(this._depthFBO.destroy(),this._depthFBO=void 0,this._depthTexture=void 0),!this._depthFBO){const E=p.gl,T=p.createFramebuffer(b,C,!0);p.activeTexture.set(E.TEXTURE0);const k=new h.Texture(p,{width:b,height:C,data:null},E.RGBA);k.bind(E.NEAREST,E.CLAMP_TO_EDGE),T.colorAttachment.set(k.texture);const F=p.createRenderbuffer(p.gl.DEPTH_COMPONENT16,b,C);T.depthAttachment.set(F),this._depthFBO=T,this._depthTexture=k}p.bindFramebuffer.set(this._depthFBO.framebuffer),p.viewport.set([0,0,b,C]),function(E,T,k,F){if("globe"===E.transform.projection.name)return;const O=E.context,G=O.gl;O.clear({depth:1});const W=E.useProgram("terrainDepth"),Q=new h.DepthMode(G.LESS,h.DepthMode.ReadWrite,E.depthRangeFor3D);for(const K of F){const ne=k.getTile(K),q=Fu(K.projMatrix,0);T.setupElevationDraw(ne,W),W.draw(O,G.TRIANGLES,Q,h.StencilMode.disabled,h.ColorMode.unblended,h.CullFaceMode.backCCW,q,"terrain_depth",T.gridBuffer,T.gridIndexBuffer,T.gridNoSkirtSegments)}}(c,this,y,this.proxyCoords)}_setupProxiedCoordsForOrtho(c,p,y){if(c.getSource()instanceof be)return this._setupProxiedCoordsForImageSource(c,p,y);this._findCoveringTileCache[c.id]=this._findCoveringTileCache[c.id]||{};const b=this.proxiedCoords[c.id]=[],C=this.proxyCoords;for(let T=0;T(O.min.x=Math.min(O.min.x,G.x-T.x),O.min.y=Math.min(O.min.y,G.y-T.y),O.max.x=Math.max(O.max.x,G.x-T.x),O.max.y=Math.max(O.max.y,G.y-T.y),O),{min:new h.pointGeometry(Number.MAX_VALUE,Number.MAX_VALUE),max:new h.pointGeometry(-Number.MAX_VALUE,-Number.MAX_VALUE)}),F=(O,G)=>{const W=O.wrap+O.canonical.x/(1<ne+k.max.x||Q+Kq+k.max.y};for(let O=0;OE.key===p.tileID.key);if(C)return C}if(p.tileID.key!==c.key){const C=c.canonical.z-p.tileID.canonical.z;let E,T,k;b=h.create();const F=p.tileID.wrap-c.wrap<0?(E=h.EXTENT>>C,T=E*((p.tileID.canonical.x<=G){const W=c.canonical.z-G;p.getSource().reparseOverscaled?(T=Math.max(c.canonical.z+2,p.transform.tileZoom),E=new h.OverscaledTileID(T,c.wrap,G,c.canonical.x>>W,c.canonical.y>>W)):0!==W&&(T=G,E=new h.OverscaledTileID(T,c.wrap,G,c.canonical.x>>W,c.canonical.y>>W))}E.key!==c.key&&(F.push(E.key),y=p.getTile(E))}const O=G=>{F.forEach(W=>{b[W]=G}),F.length=0};for(T-=1;T>=k&&(!y||!y.hasData());T--){y&&O(y.tileID.key);const G=E.calculateScaledKey(T);if(y=p.getTileByID(G),y&&y.hasData())break;const W=b[G];if(null===W)break;void 0===W?F.push(G):y=p.getTileByID(W)}return O(y?y.tileID.key:null),y&&y.hasData()?y:null}findDEMTileFor(c){return this.enabled?this._findTileCoveringTileID(c,this.sourceCache):null}prepareDrawTile(){this.renderedToTile=!0}_clearRenderCacheForTile(c,p){let y=this._tilesDirty[c];y||(y=this._tilesDirty[c]={}),y[p.key]=!0}getWirefameBuffer(){if(!this.wireframeSegments){const c=function(p){let y=0;const b=new h.StructArrayLayout2ui4,C=131;for(let E=1;E<129;E++){for(let T=1;T<129;T++)y=E*C+T,b.emplaceBack(y,y+1),b.emplaceBack(y,y+C),b.emplaceBack(y+1,y+C),128===E&&b.emplaceBack(y+C,y+C+1);b.emplaceBack(y+1,y+1+C)}return b}();this.wireframeIndexBuffer=this.painter.context.createIndexBuffer(c),this.wireframeSegments=h.SegmentVector.simpleSegment(0,0,this.gridBuffer.length,c.length)}return[this.wireframeIndexBuffer,this.wireframeSegments]}}class _p{static cacheKey(c,p,y,b){let C=`${p}${b?b.cacheKey:""}`;for(const E of y)c.usedDefines.includes(E)&&(C+=`/${E}`);return C}constructor(c,p,y,b,C,E){const T=c.gl;this.program=T.createProgram();const k=function(q){const X=[];for(let ee=0;ee`#define ${q}`));const W=G.concat(c.extStandardDerivatives?"#extension GL_OES_standard_derivatives : enable\n".concat(ji):ji,ji,N_,Yd.fragmentSource,Xd.fragmentSource,y.fragmentSource).join("\n"),Q=G.concat("\n#ifdef GL_ES\nprecision highp float;\n#else\n\n#if !defined(lowp)\n#define lowp\n#endif\n\n#if !defined(mediump)\n#define mediump\n#endif\n\n#if !defined(highp)\n#define highp\n#endif\n\n#endif",N_,Yd.vertexSource,Xd.vertexSource,Zd.vertexSource,y.vertexSource).join("\n"),K=T.createShader(T.FRAGMENT_SHADER);if(T.isContextLost())return void(this.failedToCreate=!0);T.shaderSource(K,W),T.compileShader(K),T.attachShader(this.program,K);const ne=T.createShader(T.VERTEX_SHADER);if(T.isContextLost())this.failedToCreate=!0;else{T.shaderSource(ne,Q),T.compileShader(ne),T.attachShader(this.program,ne),this.attributes={},this.numAttributes=O.length;for(let q=0;q({u_tile_tl_up:new h.Uniform3f(q),u_tile_tr_up:new h.Uniform3f(q),u_tile_br_up:new h.Uniform3f(q),u_tile_bl_up:new h.Uniform3f(q),u_tile_up_scale:new h.Uniform1f(q)}))(c)),E.includes("FOG")&&(this.fogUniforms=(q=>({u_fog_matrix:new h.UniformMatrix4f(q),u_fog_range:new h.Uniform2f(q),u_fog_color:new h.Uniform4f(q),u_fog_horizon_blend:new h.Uniform1f(q),u_fog_temporal_offset:new h.Uniform1f(q),u_frustum_tl:new h.Uniform3f(q),u_frustum_tr:new h.Uniform3f(q),u_frustum_br:new h.Uniform3f(q),u_frustum_bl:new h.Uniform3f(q),u_globe_pos:new h.Uniform3f(q),u_globe_radius:new h.Uniform1f(q),u_globe_transition:new h.Uniform1f(q),u_is_globe:new h.Uniform1i(q),u_viewport:new h.Uniform2f(q)}))(c))}var q}setTerrainUniformValues(c,p){if(!this.terrainUniforms)return;const y=this.terrainUniforms;if(!this.failedToCreate){c.program.set(this.program);for(const b in p)y[b]&&y[b].set(this.program,b,p[b])}}setGlobeUniformValues(c,p){if(!this.globeUniforms)return;const y=this.globeUniforms;if(!this.failedToCreate){c.program.set(this.program);for(const b in p)y[b]&&y[b].set(this.program,b,p[b])}}setFogUniformValues(c,p){if(!this.fogUniforms)return;const y=this.fogUniforms;if(!this.failedToCreate){c.program.set(this.program);for(const b in p)y[b].set(this.program,b,p[b])}}draw(c,p,y,b,C,E,T,k,F,O,G,W,Q,K,ne){const q=c.gl;if(this.failedToCreate)return;c.program.set(this.program),c.setDepthMode(y),c.setStencilMode(b),c.setColorMode(C),c.setCullFace(E);for(const ee of Object.keys(this.fixedUniforms))this.fixedUniforms[ee].set(this.program,ee,T[ee]);K&&K.setUniforms(this.program,c,this.binderUniforms,W,{zoom:Q});const X={[q.LINES]:2,[q.TRIANGLES]:3,[q.LINE_STRIP]:1}[p];for(const ee of G.get()){const te=ee.vaos||(ee.vaos={});(te[k]||(te[k]=new Rc)).bind(c,this,F,K?K.getPaintVertexBuffers():[],O,ee.vertexOffset,ne||[]),q.drawElements(p,ee.primitiveLength*X,q.UNSIGNED_SHORT,ee.primitiveOffset*X*2)}}}function Hs(m,c){const p=Math.pow(2,c.tileID.overscaledZ),y=c.tileSize*Math.pow(2,m.transform.tileZoom)/p,b=y*(c.tileID.canonical.x+c.tileID.wrap*p),C=y*c.tileID.canonical.y;return{u_image:0,u_texsize:c.imageAtlasTexture.size,u_tile_units_to_pixels:1/Bo(c,1,m.transform.tileZoom),u_pixel_coord_upper:[b>>16,C>>16],u_pixel_coord_lower:[65535&b,65535&C]}}const As=h.create(),z_=(m,c,p,y,b,C,E,T,k,F,O)=>{const G=c.style.light,W=G.properties.get("position"),Q=[W.x,W.y,W.z],K=h.create$1();"viewport"===G.properties.get("anchor")&&(h.fromRotation(K,-c.transform.angle),h.transformMat3(Q,Q,K));const ne=G.properties.get("color"),q=c.transform,X={u_matrix:m,u_lightpos:Q,u_lightintensity:G.properties.get("intensity"),u_lightcolor:[ne.r,ne.g,ne.b],u_vertical_gradient:+p,u_opacity:y,u_tile_id:[0,0,0],u_zoom_transition:0,u_inv_rot_matrix:As,u_merc_center:[0,0],u_up_dir:[0,0,0],u_height_lift:0,u_ao:b,u_edge_radius:C};return"globe"===q.projection.name&&(X.u_tile_id=[E.canonical.x,E.canonical.y,1<{const W=z_(m,c,p,y,b,C,E,k,F,O,G),Q={u_height_factor:-Math.pow(2,E.overscaledZ)/T.tileSize/8};return h.extend(W,Hs(c,T),Q)},Qo=m=>({u_matrix:m}),Is=(m,c,p)=>h.extend(Qo(m),Hs(c,p)),Di=(m,c)=>({u_matrix:m,u_world:c}),Fc=(m,c,p,y)=>h.extend(Is(m,c,p),{u_world:y}),Qd=h.create(),Jd=(m,c,p,y,b,C)=>{const E=m.transform,T="globe"===E.projection.name;let k;if("map"===C.paint.get("circle-pitch-alignment"))if(T){const O=h.globePixelsToTileUnits(E.zoom,c.canonical)*E._pixelsPerMercatorPixel;k=Float32Array.from([O,0,0,O])}else k=E.calculatePixelsToTileUnitsMatrix(p);else k=new Float32Array([E.pixelsToGLUnits[0],0,0,E.pixelsToGLUnits[1]]);const F={u_camera_to_center_distance:E.cameraToCenterDistance,u_matrix:m.translatePosMatrix(c.projMatrix,p,C.paint.get("circle-translate"),C.paint.get("circle-translate-anchor")),u_device_pixel_ratio:h.exported.devicePixelRatio,u_extrude_scale:k,u_inv_rot_matrix:Qd,u_merc_center:[0,0],u_tile_id:[0,0,0],u_zoom_transition:0,u_up_dir:[0,0,0]};if(T){F.u_inv_rot_matrix=y,F.u_merc_center=b,F.u_tile_id=[c.canonical.x,c.canonical.y,1<{const c=[];return"map"===m.paint.get("circle-pitch-alignment")&&c.push("PITCH_WITH_MAP"),"map"===m.paint.get("circle-pitch-scale")&&c.push("SCALE_WITH_MAP"),c},hs=(m,c,p,y)=>{const b=h.EXTENT/p.tileSize;return{u_matrix:m,u_camera_to_center_distance:c.getCameraToCenterDistance(y),u_extrude_scale:[c.pixelsToGLUnits[0]/b,c.pixelsToGLUnits[1]/b]}},fa=(m,c,p=1)=>({u_matrix:m,u_color:c,u_overlay:0,u_overlay_scale:p}),_m=h.create(),Rn=(m,c,p,y,b,C,E)=>{const T=m.transform,k="globe"===T.projection.name,F=k?h.globePixelsToTileUnits(T.zoom,c.canonical)*T._pixelsPerMercatorPixel:Bo(p,1,C),O={u_matrix:c.projMatrix,u_extrude_scale:F,u_intensity:E,u_inv_rot_matrix:_m,u_merc_center:[0,0],u_tile_id:[0,0,0],u_zoom_transition:0,u_up_dir:[0,0,0]};if(k){O.u_inv_rot_matrix=y,O.u_merc_center=b,O.u_tile_id=[c.canonical.x,c.canonical.y,1<{const T=m.transform,k=T.calculatePixelsToTileUnitsMatrix(c);return{u_matrix:cn(m,c,p,y),u_pixels_to_tile_units:k,u_device_pixel_ratio:C,u_units_to_pixels:[1/T.pixelsToGLUnits[0],1/T.pixelsToGLUnits[1]],u_dash_image:0,u_gradient_image:1,u_image_height:b,u_texsize:eh(p)?c.lineAtlasTexture.size:[0,0],u_tile_units_to_pixels:Bu(c,m.transform),u_alpha_discard_threshold:0,u_trim_offset:E}},$s=(m,c,p,y,b)=>{const C=m.transform;return{u_matrix:cn(m,c,p,y),u_texsize:c.imageAtlasTexture.size,u_pixels_to_tile_units:C.calculatePixelsToTileUnitsMatrix(c),u_device_pixel_ratio:b,u_image:0,u_tile_units_to_pixels:Bu(c,C),u_units_to_pixels:[1/C.pixelsToGLUnits[0],1/C.pixelsToGLUnits[1]],u_alpha_discard_threshold:0}};function Bu(m,c){return 1/Bo(m,1,c.tileZoom)}function cn(m,c,p,y){return m.translatePosMatrix(y||c.tileID.projMatrix,c,p.paint.get("line-translate"),p.paint.get("line-translate-anchor"))}function eh(m){const c=m.paint.get("line-dasharray").value;return c.value||"constant"!==c.kind}const vp=(m,c,p,y,b,C)=>{return{u_matrix:m,u_tl_parent:c,u_scale_parent:p,u_fade_t:y.mix,u_opacity:y.opacity*b.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:b.paint.get("raster-brightness-min"),u_brightness_high:b.paint.get("raster-brightness-max"),u_saturation_factor:(T=b.paint.get("raster-saturation"),T>0?1-1/(1.001-T):-T),u_contrast_factor:(E=b.paint.get("raster-contrast"),E>0?1/(1-E):1+E),u_spin_weights:Ge(b.paint.get("raster-hue-rotate")),u_perspective_transform:C};var E,T};function Ge(m){m*=Math.PI/180;const c=Math.sin(m),p=Math.cos(m);return[(2*p+1)/3,(-Math.sqrt(3)*c-p+1)/3,(Math.sqrt(3)*c-p+1)/3]}const No=h.create(),Ei=(m,c,p,y,b,C,E,T,k,F,O,G,W,Q,K,ne)=>{const q=b.transform,X={u_is_size_zoom_constant:+("constant"===m||"source"===m),u_is_size_feature_constant:+("constant"===m||"camera"===m),u_size_t:c?c.uSizeT:0,u_size:c?c.uSize:0,u_camera_to_center_distance:q.cameraToCenterDistance,u_rotate_symbol:+p,u_aspect_ratio:q.width/q.height,u_fade_change:b.options.fadeDuration?b.symbolFadeChange:1,u_matrix:C,u_label_plane_matrix:E,u_coord_matrix:T,u_is_text:+k,u_pitch_with_map:+y,u_texsize:F,u_texture:0,u_tile_id:[0,0,0],u_zoom_transition:0,u_inv_rot_matrix:No,u_merc_center:[0,0],u_camera_forward:[0,0,0],u_ecef_origin:[0,0,0],u_tile_matrix:No,u_up_vector:[0,-1,0]};return"globe"===ne.name&&(X.u_tile_id=[O.canonical.x,O.canonical.y,1<h.extend(Ei(m,c,p,y,b,C,E,T,k,F,G,W,Q,K,ne,q),{u_gamma_scale:y?b.transform.cameraToCenterDistance*Math.cos(b.terrain?0:b.transform._pitch):1,u_device_pixel_ratio:h.exported.devicePixelRatio,u_is_halo:+O}),Qr=(m,c,p,y,b,C,E,T,k,F,O,G,W,Q,K,ne)=>h.extend(po(m,c,p,y,b,C,E,T,!0,k,!0,O,G,W,Q,K,ne),{u_texsize_icon:F,u_texture_icon:1}),Lc=(m,c,p)=>({u_matrix:m,u_opacity:c,u_color:p}),zo=(m,c,p,y,b)=>h.extend(function(C,E,T){const k=E.imageManager.getPattern(C.toString()),{width:F,height:O}=E.imageManager.getPixelSize(),G=Math.pow(2,T.tileID.overscaledZ),W=T.tileSize*Math.pow(2,E.transform.tileZoom)/G,Q=W*(T.tileID.canonical.x+T.tileID.wrap*G),K=W*T.tileID.canonical.y;return{u_image:0,u_pattern_tl:k.tl,u_pattern_br:k.br,u_texsize:[F,O],u_pattern_size:k.displaySize,u_tile_units_to_pixels:1/Bo(T,1,E.transform.tileZoom),u_pixel_coord_upper:[Q>>16,K>>16],u_pixel_coord_lower:[65535&Q,65535&K]}}(y,p,b),{u_matrix:m,u_opacity:c}),Va={fillExtrusion:m=>({u_matrix:new h.UniformMatrix4f(m),u_lightpos:new h.Uniform3f(m),u_lightintensity:new h.Uniform1f(m),u_lightcolor:new h.Uniform3f(m),u_vertical_gradient:new h.Uniform1f(m),u_opacity:new h.Uniform1f(m),u_edge_radius:new h.Uniform1f(m),u_ao:new h.Uniform2f(m),u_tile_id:new h.Uniform3f(m),u_zoom_transition:new h.Uniform1f(m),u_inv_rot_matrix:new h.UniformMatrix4f(m),u_merc_center:new h.Uniform2f(m),u_up_dir:new h.Uniform3f(m),u_height_lift:new h.Uniform1f(m)}),fillExtrusionPattern:m=>({u_matrix:new h.UniformMatrix4f(m),u_lightpos:new h.Uniform3f(m),u_lightintensity:new h.Uniform1f(m),u_lightcolor:new h.Uniform3f(m),u_vertical_gradient:new h.Uniform1f(m),u_height_factor:new h.Uniform1f(m),u_edge_radius:new h.Uniform1f(m),u_ao:new h.Uniform2f(m),u_tile_id:new h.Uniform3f(m),u_zoom_transition:new h.Uniform1f(m),u_inv_rot_matrix:new h.UniformMatrix4f(m),u_merc_center:new h.Uniform2f(m),u_up_dir:new h.Uniform3f(m),u_height_lift:new h.Uniform1f(m),u_image:new h.Uniform1i(m),u_texsize:new h.Uniform2f(m),u_pixel_coord_upper:new h.Uniform2f(m),u_pixel_coord_lower:new h.Uniform2f(m),u_tile_units_to_pixels:new h.Uniform1f(m),u_opacity:new h.Uniform1f(m)}),fill:m=>({u_matrix:new h.UniformMatrix4f(m)}),fillPattern:m=>({u_matrix:new h.UniformMatrix4f(m),u_image:new h.Uniform1i(m),u_texsize:new h.Uniform2f(m),u_pixel_coord_upper:new h.Uniform2f(m),u_pixel_coord_lower:new h.Uniform2f(m),u_tile_units_to_pixels:new h.Uniform1f(m)}),fillOutline:m=>({u_matrix:new h.UniformMatrix4f(m),u_world:new h.Uniform2f(m)}),fillOutlinePattern:m=>({u_matrix:new h.UniformMatrix4f(m),u_world:new h.Uniform2f(m),u_image:new h.Uniform1i(m),u_texsize:new h.Uniform2f(m),u_pixel_coord_upper:new h.Uniform2f(m),u_pixel_coord_lower:new h.Uniform2f(m),u_tile_units_to_pixels:new h.Uniform1f(m)}),circle:m=>({u_camera_to_center_distance:new h.Uniform1f(m),u_extrude_scale:new h.UniformMatrix2f(m),u_device_pixel_ratio:new h.Uniform1f(m),u_matrix:new h.UniformMatrix4f(m),u_inv_rot_matrix:new h.UniformMatrix4f(m),u_merc_center:new h.Uniform2f(m),u_tile_id:new h.Uniform3f(m),u_zoom_transition:new h.Uniform1f(m),u_up_dir:new h.Uniform3f(m)}),collisionBox:m=>({u_matrix:new h.UniformMatrix4f(m),u_camera_to_center_distance:new h.Uniform1f(m),u_extrude_scale:new h.Uniform2f(m)}),collisionCircle:m=>({u_matrix:new h.UniformMatrix4f(m),u_inv_matrix:new h.UniformMatrix4f(m),u_camera_to_center_distance:new h.Uniform1f(m),u_viewport_size:new h.Uniform2f(m)}),debug:m=>({u_color:new h.UniformColor(m),u_matrix:new h.UniformMatrix4f(m),u_overlay:new h.Uniform1i(m),u_overlay_scale:new h.Uniform1f(m)}),clippingMask:m=>({u_matrix:new h.UniformMatrix4f(m)}),heatmap:m=>({u_extrude_scale:new h.Uniform1f(m),u_intensity:new h.Uniform1f(m),u_matrix:new h.UniformMatrix4f(m),u_inv_rot_matrix:new h.UniformMatrix4f(m),u_merc_center:new h.Uniform2f(m),u_tile_id:new h.Uniform3f(m),u_zoom_transition:new h.Uniform1f(m),u_up_dir:new h.Uniform3f(m)}),heatmapTexture:m=>({u_image:new h.Uniform1i(m),u_color_ramp:new h.Uniform1i(m),u_opacity:new h.Uniform1f(m)}),hillshade:m=>({u_matrix:new h.UniformMatrix4f(m),u_image:new h.Uniform1i(m),u_latrange:new h.Uniform2f(m),u_light:new h.Uniform2f(m),u_shadow:new h.UniformColor(m),u_highlight:new h.UniformColor(m),u_accent:new h.UniformColor(m)}),hillshadePrepare:m=>({u_matrix:new h.UniformMatrix4f(m),u_image:new h.Uniform1i(m),u_dimension:new h.Uniform2f(m),u_zoom:new h.Uniform1f(m),u_unpack:new h.Uniform4f(m)}),line:m=>({u_matrix:new h.UniformMatrix4f(m),u_pixels_to_tile_units:new h.UniformMatrix2f(m),u_device_pixel_ratio:new h.Uniform1f(m),u_units_to_pixels:new h.Uniform2f(m),u_dash_image:new h.Uniform1i(m),u_gradient_image:new h.Uniform1i(m),u_image_height:new h.Uniform1f(m),u_texsize:new h.Uniform2f(m),u_tile_units_to_pixels:new h.Uniform1f(m),u_alpha_discard_threshold:new h.Uniform1f(m),u_trim_offset:new h.Uniform2f(m)}),linePattern:m=>({u_matrix:new h.UniformMatrix4f(m),u_texsize:new h.Uniform2f(m),u_pixels_to_tile_units:new h.UniformMatrix2f(m),u_device_pixel_ratio:new h.Uniform1f(m),u_image:new h.Uniform1i(m),u_units_to_pixels:new h.Uniform2f(m),u_tile_units_to_pixels:new h.Uniform1f(m),u_alpha_discard_threshold:new h.Uniform1f(m)}),raster:m=>({u_matrix:new h.UniformMatrix4f(m),u_tl_parent:new h.Uniform2f(m),u_scale_parent:new h.Uniform1f(m),u_fade_t:new h.Uniform1f(m),u_opacity:new h.Uniform1f(m),u_image0:new h.Uniform1i(m),u_image1:new h.Uniform1i(m),u_brightness_low:new h.Uniform1f(m),u_brightness_high:new h.Uniform1f(m),u_saturation_factor:new h.Uniform1f(m),u_contrast_factor:new h.Uniform1f(m),u_spin_weights:new h.Uniform3f(m),u_perspective_transform:new h.Uniform2f(m)}),symbolIcon:m=>({u_is_size_zoom_constant:new h.Uniform1i(m),u_is_size_feature_constant:new h.Uniform1i(m),u_size_t:new h.Uniform1f(m),u_size:new h.Uniform1f(m),u_camera_to_center_distance:new h.Uniform1f(m),u_rotate_symbol:new h.Uniform1i(m),u_aspect_ratio:new h.Uniform1f(m),u_fade_change:new h.Uniform1f(m),u_matrix:new h.UniformMatrix4f(m),u_label_plane_matrix:new h.UniformMatrix4f(m),u_coord_matrix:new h.UniformMatrix4f(m),u_is_text:new h.Uniform1i(m),u_pitch_with_map:new h.Uniform1i(m),u_texsize:new h.Uniform2f(m),u_tile_id:new h.Uniform3f(m),u_zoom_transition:new h.Uniform1f(m),u_inv_rot_matrix:new h.UniformMatrix4f(m),u_merc_center:new h.Uniform2f(m),u_camera_forward:new h.Uniform3f(m),u_tile_matrix:new h.UniformMatrix4f(m),u_up_vector:new h.Uniform3f(m),u_ecef_origin:new h.Uniform3f(m),u_texture:new h.Uniform1i(m)}),symbolSDF:m=>({u_is_size_zoom_constant:new h.Uniform1i(m),u_is_size_feature_constant:new h.Uniform1i(m),u_size_t:new h.Uniform1f(m),u_size:new h.Uniform1f(m),u_camera_to_center_distance:new h.Uniform1f(m),u_rotate_symbol:new h.Uniform1i(m),u_aspect_ratio:new h.Uniform1f(m),u_fade_change:new h.Uniform1f(m),u_matrix:new h.UniformMatrix4f(m),u_label_plane_matrix:new h.UniformMatrix4f(m),u_coord_matrix:new h.UniformMatrix4f(m),u_is_text:new h.Uniform1i(m),u_pitch_with_map:new h.Uniform1i(m),u_texsize:new h.Uniform2f(m),u_texture:new h.Uniform1i(m),u_gamma_scale:new h.Uniform1f(m),u_device_pixel_ratio:new h.Uniform1f(m),u_tile_id:new h.Uniform3f(m),u_zoom_transition:new h.Uniform1f(m),u_inv_rot_matrix:new h.UniformMatrix4f(m),u_merc_center:new h.Uniform2f(m),u_camera_forward:new h.Uniform3f(m),u_tile_matrix:new h.UniformMatrix4f(m),u_up_vector:new h.Uniform3f(m),u_ecef_origin:new h.Uniform3f(m),u_is_halo:new h.Uniform1i(m)}),symbolTextAndIcon:m=>({u_is_size_zoom_constant:new h.Uniform1i(m),u_is_size_feature_constant:new h.Uniform1i(m),u_size_t:new h.Uniform1f(m),u_size:new h.Uniform1f(m),u_camera_to_center_distance:new h.Uniform1f(m),u_rotate_symbol:new h.Uniform1i(m),u_aspect_ratio:new h.Uniform1f(m),u_fade_change:new h.Uniform1f(m),u_matrix:new h.UniformMatrix4f(m),u_label_plane_matrix:new h.UniformMatrix4f(m),u_coord_matrix:new h.UniformMatrix4f(m),u_is_text:new h.Uniform1i(m),u_pitch_with_map:new h.Uniform1i(m),u_texsize:new h.Uniform2f(m),u_texsize_icon:new h.Uniform2f(m),u_texture:new h.Uniform1i(m),u_texture_icon:new h.Uniform1i(m),u_gamma_scale:new h.Uniform1f(m),u_device_pixel_ratio:new h.Uniform1f(m),u_is_halo:new h.Uniform1i(m)}),background:m=>({u_matrix:new h.UniformMatrix4f(m),u_opacity:new h.Uniform1f(m),u_color:new h.UniformColor(m)}),backgroundPattern:m=>({u_matrix:new h.UniformMatrix4f(m),u_opacity:new h.Uniform1f(m),u_image:new h.Uniform1i(m),u_pattern_tl:new h.Uniform2f(m),u_pattern_br:new h.Uniform2f(m),u_texsize:new h.Uniform2f(m),u_pattern_size:new h.Uniform2f(m),u_pixel_coord_upper:new h.Uniform2f(m),u_pixel_coord_lower:new h.Uniform2f(m),u_tile_units_to_pixels:new h.Uniform1f(m)}),terrainRaster:Ou,terrainDepth:Ou,skybox:m=>({u_matrix:new h.UniformMatrix4f(m),u_sun_direction:new h.Uniform3f(m),u_cubemap:new h.Uniform1i(m),u_opacity:new h.Uniform1f(m),u_temporal_offset:new h.Uniform1f(m)}),skyboxGradient:m=>({u_matrix:new h.UniformMatrix4f(m),u_color_ramp:new h.Uniform1i(m),u_center_direction:new h.Uniform3f(m),u_radius:new h.Uniform1f(m),u_opacity:new h.Uniform1f(m),u_temporal_offset:new h.Uniform1f(m)}),skyboxCapture:m=>({u_matrix_3f:new h.UniformMatrix3f(m),u_sun_direction:new h.Uniform3f(m),u_sun_intensity:new h.Uniform1f(m),u_color_tint_r:new h.Uniform4f(m),u_color_tint_m:new h.Uniform4f(m),u_luminance:new h.Uniform1f(m)}),globeRaster:m=>({u_proj_matrix:new h.UniformMatrix4f(m),u_globe_matrix:new h.UniformMatrix4f(m),u_normalize_matrix:new h.UniformMatrix4f(m),u_merc_matrix:new h.UniformMatrix4f(m),u_zoom_transition:new h.Uniform1f(m),u_merc_center:new h.Uniform2f(m),u_image0:new h.Uniform1i(m),u_grid_matrix:new h.UniformMatrix3f(m),u_frustum_tl:new h.Uniform3f(m),u_frustum_tr:new h.Uniform3f(m),u_frustum_br:new h.Uniform3f(m),u_frustum_bl:new h.Uniform3f(m),u_globe_pos:new h.Uniform3f(m),u_globe_radius:new h.Uniform1f(m),u_viewport:new h.Uniform2f(m)}),globeAtmosphere:m=>({u_frustum_tl:new h.Uniform3f(m),u_frustum_tr:new h.Uniform3f(m),u_frustum_br:new h.Uniform3f(m),u_frustum_bl:new h.Uniform3f(m),u_horizon:new h.Uniform1f(m),u_transition:new h.Uniform1f(m),u_fadeout_range:new h.Uniform1f(m),u_color:new h.Uniform4f(m),u_high_color:new h.Uniform4f(m),u_space_color:new h.Uniform4f(m),u_star_intensity:new h.Uniform1f(m),u_star_density:new h.Uniform1f(m),u_star_size:new h.Uniform1f(m),u_temporal_offset:new h.Uniform1f(m),u_horizon_angle:new h.Uniform1f(m),u_rotation_matrix:new h.UniformMatrix4f(m)})};let en;function ii(m,c,p,y,b,C,E){const T=m.context,k=T.gl,F=m.transform,O=m.useProgram("collisionBox"),G=[];let W=0,Q=0;for(let ce=0;ce0){const Le=h.create(),st=ze;h.mul(Le,Me.placementInvProjMatrix,F.glCoordMatrix),h.mul(Le,Le,Me.placementViewportMatrix),G.push({circleArray:Ct,circleOffset:Q,transform:st,invTransform:Le,projection:Me.getProjection()}),W+=Ct.length/4,Q=W}Te&&(m.terrain&&m.terrain.setupElevationDraw(ge,O),O.draw(T,k.LINES,h.DepthMode.disabled,h.StencilMode.disabled,m.colorModeForRenderPass(),h.CullFaceMode.disabled,hs(ze,F,ge,Me.getProjection()),p.id,Te.layoutVertexBuffer,Te.indexBuffer,Te.segments,null,F.zoom,null,[Te.collisionVertexBuffer,Te.collisionVertexBufferExt]))}if(!E||!G.length)return;const K=m.useProgram("collisionCircle"),ne=new h.StructArrayLayout2f1f2i16;ne.resize(4*W),ne._trim();let q=0;for(const ce of G)for(let _e=0;_e=0&&(K[ce.associatedIconIndex]={x:st,y:Ye,z:bt,angle:Qe})}else zr(Me,W)}if(O){Q.clear();const te=m.icon.placedSymbolArray;for(let ce=0;ceLe.sortKey-st.sortKey);for(const Le of ze){const st=Le.state;if(m.terrain&&m.terrain.setupElevationDraw(st.tile,st.program,{useDepthForOcclusion:!We,labelPlaneMatrixInv:st.labelPlaneMatrixInv}),W.activeTexture.set(Q.TEXTURE0),st.atlasTexture.bind(st.atlasInterpolation,Q.CLAMP_TO_EDGE),st.atlasTextureIcon&&(W.activeTexture.set(Q.TEXTURE1),st.atlasTextureIcon&&st.atlasTextureIcon.bind(st.atlasInterpolationIcon,Q.CLAMP_TO_EDGE)),st.isSDF){const Ye=st.uniformValues;st.hasHalo&&(Ye.u_is_halo=1,Dr(st.buffers,Le.segments,p,m,st.program,_e,O,G,Ye)),Ye.u_is_halo=0}Dr(st.buffers,Le.segments,p,m,st.program,_e,O,G,st.uniformValues)}}function Dr(m,c,p,y,b,C,E,T,k){const F=y.context,O=[m.dynamicLayoutVertexBuffer,m.opacityVertexBuffer,m.globeExtVertexBuffer];b.draw(F,F.gl.TRIANGLES,C,E,T,h.CullFaceMode.disabled,k,p.id,m.layoutVertexBuffer,m.indexBuffer,c,p.paint,y.transform.zoom,m.programConfigurations.get(p.id),O)}function Nu(m,c,p,y,b,C,E){const T=m.context.gl,k=p.paint.get("fill-pattern"),F=k&&k.constantOr(1);let O,G,W,Q,K;E?(G=F&&!p.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline",O=T.LINES):(G=F?"fillPattern":"fill",O=T.TRIANGLES);for(const ne of y){const q=c.getTile(ne);if(F&&!q.patternsLoaded())continue;const X=q.getBucket(p);if(!X)continue;m.prepareDrawTile();const ee=X.programConfigurations.get(p.id),te=m.useProgram(G,ee);F&&(m.context.activeTexture.set(T.TEXTURE0),q.imageAtlasTexture.bind(T.LINEAR,T.CLAMP_TO_EDGE),ee.updatePaintBuffers());const ce=k.constantOr(null);if(ce&&q.imageAtlas){const ge=q.imageAtlas.patternPositions[ce.toString()];ge&&ee.setConstantPatternPositions(ge)}const _e=m.translatePosMatrix(ne.projMatrix,q,p.paint.get("fill-translate"),p.paint.get("fill-translate-anchor"));if(E){Q=X.indexBuffer2,K=X.segments2;const ge=m.terrain&&m.terrain.renderingToTexture?m.terrain.drapeBufferSize:[T.drawingBufferWidth,T.drawingBufferHeight];W="fillOutlinePattern"===G&&F?Fc(_e,m,q,ge):Di(_e,ge)}else Q=X.indexBuffer,K=X.segments,W=F?Is(_e,m,q):Qo(_e);m.prepareDrawProgram(m.context,te,ne.toUnwrapped()),te.draw(m.context,O,b,m.stencilModeForClipping(ne),C,h.CullFaceMode.disabled,W,p.id,X.layoutVertexBuffer,Q,K,p.paint,m.transform.zoom,ee)}}function Bc(m,c,p,y,b,C,E){const T=m.context,k=T.gl,F=m.transform,O=p.paint.get("fill-extrusion-pattern"),G=O.constantOr(1),W=p.paint.get("fill-extrusion-opacity"),Q=[p.paint.get("fill-extrusion-ambient-occlusion-intensity"),p.paint.get("fill-extrusion-ambient-occlusion-radius")],K=p.layout.get("fill-extrusion-edge-radius"),ne="globe"===F.projection.name?h.fillExtrusionHeightLift():0,q="globe"===F.projection.name,X=q?h.globeToMercatorTransition(F.zoom):0,ee=[h.mercatorXfromLng(F.center.lng),h.mercatorYfromLat(F.center.lat)],te=[];q&&(te.push("PROJECTION_GLOBE_VIEW"),m.style.terrainSetForDrapingOnly()&&te.push("TERRAIN")),Q[0]>0&&te.push("FAUX_AO");for(const ce of y){const _e=c.getTile(ce),ge=_e.getBucket(p);if(!ge||ge.projection.name!==F.projection.name)continue;const Me=ge.programConfigurations.get(p.id),We=m.useProgram(G?"fillExtrusionPattern":"fillExtrusion",Me,te);if(m.terrain){const bt=m.terrain;if(m.style.terrainSetForDrapingOnly())bt.setupElevationDraw(_e,We,{useMeterToDem:!0});else{if(!ge.enableTerrain)continue;if(bt.setupElevationDraw(_e,We,{useMeterToDem:!0}),si(T,c,ce,ge,p,bt),!ge.centroidVertexBuffer){const Ke=We.attributes.a_centroid_pos;void 0!==Ke&&k.vertexAttrib2f(Ke,0,0)}}}G&&(m.context.activeTexture.set(k.TEXTURE0),_e.imageAtlasTexture.bind(k.LINEAR,k.CLAMP_TO_EDGE),Me.updatePaintBuffers());const ze=O.constantOr(null);if(ze&&_e.imageAtlas){const bt=_e.imageAtlas.patternPositions[ze.toString()];bt&&Me.setConstantPatternPositions(bt)}const Te=m.translatePosMatrix(ce.projMatrix,_e,p.paint.get("fill-extrusion-translate"),p.paint.get("fill-extrusion-translate-anchor")),Ct=F.projection.createInversionMatrix(F,ce.canonical),Le=p.paint.get("fill-extrusion-vertical-gradient"),st=G?U0(Te,m,Le,W,Q,K,ce,_e,ne,X,ee,Ct):z_(Te,m,Le,W,Q,K,ce,ne,X,ee,Ct);m.prepareDrawProgram(T,We,ce.toUnwrapped());const Ye=[];m.terrain&&Ye.push(ge.centroidVertexBuffer),q&&Ye.push(ge.layoutVertexExtBuffer),We.draw(T,T.gl.TRIANGLES,b,C,E,h.CullFaceMode.backCCW,st,p.id,ge.layoutVertexBuffer,ge.indexBuffer,ge.segments,p.paint,m.transform.zoom,Me,Ye)}}function si(m,c,p,y,b,C){const E=[X=>{let ee=X.canonical.x-1,te=X.wrap;return ee<0&&(ee=(1<{let ee=X.canonical.x+1,te=X.wrap;return ee===1<new h.OverscaledTileID(X.overscaledZ,X.wrap,X.canonical.z,X.canonical.x,(0===X.canonical.y?1<new h.OverscaledTileID(X.overscaledZ,X.wrap,X.canonical.z,X.canonical.x,X.canonical.y===(1<{const ee=c.getSource().minzoom,te=_e=>{const ge=c.getTileByID(_e);if(ge&&ge.hasData())return ge.getBucket(b)},ce=[0,-1,1];for(const _e of ce){if(X.overscaledZ+_e(k[0]=Math.min(X.min.y,ee.min.y),k[1]=Math.max(X.max.y,ee.max.y),k[2]=h.EXTENT-ee.min.x>X.max.x?ee.min.x-h.EXTENT:X.max.x,k),O=(X,ee)=>(k[0]=Math.min(X.min.x,ee.min.x),k[1]=Math.max(X.max.x,ee.max.x),k[2]=h.EXTENT-ee.min.y>X.max.y?ee.min.y-h.EXTENT:X.max.y,k),G=[(X,ee)=>F(X,ee),(X,ee)=>F(ee,X),(X,ee)=>O(X,ee),(X,ee)=>O(ee,X)],W=new h.pointGeometry(0,0);let Q,K,ne;const q=(X,ee,te,ce,_e)=>{const ge=[[ce?te:X,ce?X:te,0],[ce?te:ee,ce?ee:te,0]],Me=_e<0?h.EXTENT+_e:_e,We=[ce?Me:(X+ee)/2,ce?(X+ee)/2:Me,0];return 0===te&&_e<0||0!==te&&_e>0?C.getForTilePoints(ne,[We],!0,K):ge.push(We),C.getForTilePoints(p,ge,!0,Q),Math.max(ge[0][2],ge[1][2],We[2])/C.exaggeration()};for(let X=0;X<4;X++){const ee=(X<2?1:5)-X,te=y.borders[X];if(0===te.length)continue;const ce=ne=E[X](p),_e=T(ce);if(!(_e&&_e instanceof h.FillExtrusionBucket&&_e.enableTerrain)||y.borderDoneWithNeighborZ[X]===_e.canonical.z&&_e.borderDoneWithNeighborZ[ee]===y.canonical.z||(K=C.findDEMTileFor(ce),!K||!K.dem))continue;if(!Q){const ze=C.findDEMTileFor(p);if(!ze||!ze.dem)return;Q=ze}const ge=_e.borders[ee];let Me=0;const We=_e.borderDoneWithNeighborZ[ee]!==y.canonical.z;if(y.canonical.z===_e.canonical.z){for(let ze=0;zeCt[0]+3));)We&&_e.encodeCentroid(void 0,Le,!1),Me++;if(Le&&MeCt[1]-3)&&(Ye++,++Me!==ge.length);)Le=_e.featuresOnBorder[ge[Me]];if(Le=_e.featuresOnBorder[ge[st]],Te.intersectsCount()>1||Le.intersectsCount()>1||1!==Ye){1!==Ye&&(Me=st),y.encodeCentroid(void 0,Te,!1),We&&_e.encodeCentroid(void 0,Le,!1);continue}const bt=G[X](Te,Le),Ke=X%2?h.EXTENT-1:0;W.x=q(bt[0],Math.min(h.EXTENT-1,bt[1]),Ke,X<2,bt[2]),W.y=0,y.encodeCentroid(W,Te,!1),We&&_e.encodeCentroid(W,Le,!1)}else y.encodeCentroid(void 0,Te,!1)}y.borderDoneWithNeighborZ[X]=_e.canonical.z,y.needsCentroidUpdate=!0,We&&(_e.borderDoneWithNeighborZ[ee]=y.canonical.z,_e.needsCentroidUpdate=!0)}else{for(const ze of te)y.encodeCentroid(void 0,y.featuresOnBorder[ze],!1);if(We){for(const ze of ge)_e.encodeCentroid(void 0,_e.featuresOnBorder[ze],!1);_e.borderDoneWithNeighborZ[ee]=y.canonical.z,_e.needsCentroidUpdate=!0}y.borderDoneWithNeighborZ[X]=_e.canonical.z,y.needsCentroidUpdate=!0}}(y.needsCentroidUpdate||!y.centroidVertexBuffer&&0!==y.centroidVertexArray.length)&&y.uploadCentroid(m)}const bp=new h.Color(1,0,0,1),zu=new h.Color(0,1,0,1),th=new h.Color(0,0,1,1),fl=new h.Color(1,0,1,1),mo=new h.Color(0,1,1,1);function Nc(m,c,p){const y=m.context,b=m.transform,C=y.gl,E="globe"===b.projection.name,T=E?["PROJECTION_GLOBE_VIEW"]:null;let k=p.projMatrix;if(E&&h.globeToMercatorTransition(b.zoom)>0){const Te=h.transitionTileAABBinECEF(p.canonical,b),Ct=h.globeDenormalizeECEF(Te);k=h.multiply(new Float32Array(16),b.globeMatrix,Ct),h.multiply(k,b.projMatrix,k)}const F=m.useProgram("debug",null,T),O=c.getTileByID(p.key);m.terrain&&m.terrain.setupElevationDraw(O,F);const G=h.DepthMode.disabled,W=h.StencilMode.disabled,Q=m.colorModeForRenderPass(),K="$debug";y.activeTexture.set(C.TEXTURE0),m.emptyTexture.bind(C.LINEAR,C.CLAMP_TO_EDGE),E?O._makeGlobeTileDebugBuffers(m.context,b):O._makeDebugTileBoundsBuffers(m.context,b.projection);const ne=O._tileDebugBuffer||m.debugBuffer,q=O._tileDebugIndexBuffer||m.debugIndexBuffer,X=O._tileDebugSegments||m.debugSegments;F.draw(y,C.LINE_STRIP,G,W,Q,h.CullFaceMode.disabled,fa(k,h.Color.red),K,ne,q,X,null,null,null,[O._globeTileDebugBorderBuffer]);const ee=O.latestRawTileData,te=Math.floor((ee&&ee.byteLength||0)/1024),ce=c.getTile(p).tileSize,_e=512/Math.min(ce,512)*(p.overscaledZ/b.zoom)*.5;let ge=p.canonical.toString();p.overscaledZ!==p.canonical.z&&(ge+=` => ${p.overscaledZ}`),ge+=` ${te}kb`,function(Te,Ct){Te.initDebugOverlayCanvas();const Le=Te.debugOverlayCanvas,st=Te.context.gl,Ye=Te.debugOverlayCanvas.getContext("2d");Ye.clearRect(0,0,Le.width,Le.height),Ye.shadowColor="white",Ye.shadowBlur=2,Ye.lineWidth=1.5,Ye.strokeStyle="white",Ye.textBaseline="top",Ye.font="bold 36px Open Sans, sans-serif",Ye.fillText(Ct,5,5),Ye.strokeText(Ct,5,5),Te.debugOverlayTexture.update(Le),Te.debugOverlayTexture.bind(st.LINEAR,st.CLAMP_TO_EDGE)}(m,ge);const Me=O._tileDebugTextBuffer||m.debugBuffer,We=O._tileDebugTextIndexBuffer||m.quadTriangleIndexBuffer,ze=O._tileDebugTextSegments||m.debugSegments;F.draw(y,C.TRIANGLES,G,W,h.ColorMode.alphaBlended,h.CullFaceMode.disabled,fa(k,h.Color.transparent,_e),K,Me,We,ze,null,null,null,[O._globeTileDebugTextBuffer])}function ml(m,c,p,y){Jo(m,0,c+p/2,m.transform.width,p,y)}function ps(m,c,p,y){Jo(m,c-p/2,0,p,m.transform.height,y)}function Jo(m,c,p,y,b,C){const E=m.context,T=E.gl;T.enable(T.SCISSOR_TEST),T.scissor(c*h.exported.devicePixelRatio,p*h.exported.devicePixelRatio,y*h.exported.devicePixelRatio,b*h.exported.devicePixelRatio),E.clear({color:C}),T.disable(T.SCISSOR_TEST)}const zc=h.createLayout([{name:"a_pos_3f",components:3,type:"Float32"}]),{members:fr}=zc;function Rs(m,c,p,y){m.emplaceBack(c,p,y)}class Ga{constructor(c){this.vertexArray=new h.StructArrayLayout3f12,this.indices=new h.StructArrayLayout3ui6,Rs(this.vertexArray,-1,-1,1),Rs(this.vertexArray,1,-1,1),Rs(this.vertexArray,-1,1,1),Rs(this.vertexArray,1,1,1),Rs(this.vertexArray,-1,-1,-1),Rs(this.vertexArray,1,-1,-1),Rs(this.vertexArray,-1,1,-1),Rs(this.vertexArray,1,1,-1),this.indices.emplaceBack(5,1,3),this.indices.emplaceBack(3,7,5),this.indices.emplaceBack(6,2,0),this.indices.emplaceBack(0,4,6),this.indices.emplaceBack(2,6,7),this.indices.emplaceBack(7,3,2),this.indices.emplaceBack(5,4,0),this.indices.emplaceBack(0,1,5),this.indices.emplaceBack(0,2,3),this.indices.emplaceBack(3,1,0),this.indices.emplaceBack(7,6,4),this.indices.emplaceBack(4,5,7),this.vertexBuffer=c.createVertexBuffer(this.vertexArray,fr),this.indexBuffer=c.createIndexBuffer(this.indices),this.segment=h.SegmentVector.simpleSegment(0,0,36,12)}}function gl(m,c,p,y,b,C){const E=m.gl,T=c.paint.get("sky-atmosphere-color"),k=c.paint.get("sky-atmosphere-halo-color"),F=c.paint.get("sky-atmosphere-sun-intensity"),O={u_matrix_3f:h.fromMat4(h.create$1(),y),u_sun_direction:b,u_sun_intensity:F,u_color_tint_r:[(K=T).r,K.g,K.b,K.a],u_color_tint_m:[(ne=k).r,ne.g,ne.b,ne.a],u_luminance:5e-5};var K,ne;E.framebufferTexture2D(E.FRAMEBUFFER,E.COLOR_ATTACHMENT0,E.TEXTURE_CUBE_MAP_POSITIVE_X+C,c.skyboxTexture,0),p.draw(m,E.TRIANGLES,h.DepthMode.disabled,h.StencilMode.disabled,h.ColorMode.unblended,h.CullFaceMode.frontCW,O,"skyboxCapture",c.skyboxGeometry.vertexBuffer,c.skyboxGeometry.indexBuffer,c.skyboxGeometry.segment)}const Vc=h.createLayout([{type:"Float32",name:"a_pos",components:3},{type:"Float32",name:"a_uv",components:2}]);class di{constructor(c){const p=new h.StructArrayLayout5f20;p.emplaceBack(-1,1,1,0,0),p.emplaceBack(1,1,1,1,0),p.emplaceBack(1,-1,1,1,1),p.emplaceBack(-1,-1,1,0,1);const y=new h.StructArrayLayout3ui6;y.emplaceBack(0,1,2),y.emplaceBack(2,3,0),this.vertexBuffer=c.createVertexBuffer(p,Vc.members),this.indexBuffer=c.createIndexBuffer(y),this.segments=h.SegmentVector.simpleSegment(0,0,4,2)}destroy(){this.vertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy()}}const ma={symbol:function(m,c,p,y,b){if("translucent"!==m.renderPass)return;const C=h.StencilMode.disabled,E=m.colorModeForRenderPass();p.layout.get("text-variable-anchor")&&function(T,k,F,O,G,W,Q){const K=k.transform,ne="map"===G,q="map"===W;for(const X of T){const ee=O.getTile(X),te=ee.getBucket(F);if(!te||!te.text||!te.text.segments.get().length)continue;const ce=h.evaluateSizeForZoom(te.textSizeData,K.zoom),_e=Gn(X,te.getProjection(),K),ge=K.calculatePixelsToTileUnitsMatrix(ee),Me=us(_e,ee.tileID.canonical,q,ne,K,te.getProjection(),ge),We="none"!==F.layout.get("icon-text-fit")&&te.hasIconData();if(ce){const ze=Math.pow(2,K.zoom-ee.tileID.overscaledZ);pl(te,ne,q,Q,h.symbolSize,K,Me,X,ze,ce,We)}}}(y,m,p,c,p.layout.get("text-rotation-alignment"),p.layout.get("text-pitch-alignment"),b),0!==p.paint.get("icon-opacity").constantOr(1)&&ks(m,c,p,y,!1,p.paint.get("icon-translate"),p.paint.get("icon-translate-anchor"),p.layout.get("icon-rotation-alignment"),p.layout.get("icon-pitch-alignment"),p.layout.get("icon-keep-upright"),C,E),0!==p.paint.get("text-opacity").constantOr(1)&&ks(m,c,p,y,!0,p.paint.get("text-translate"),p.paint.get("text-translate-anchor"),p.layout.get("text-rotation-alignment"),p.layout.get("text-pitch-alignment"),p.layout.get("text-keep-upright"),C,E),c.map.showCollisionBoxes&&(ii(m,c,p,y,p.paint.get("text-translate"),p.paint.get("text-translate-anchor"),!0),ii(m,c,p,y,p.paint.get("icon-translate"),p.paint.get("icon-translate-anchor"),!1))},circle:function(m,c,p,y){if("translucent"!==m.renderPass)return;const b=p.paint.get("circle-opacity"),C=p.paint.get("circle-stroke-width"),E=p.paint.get("circle-stroke-opacity"),T=void 0!==p.layout.get("circle-sort-key").constantOr(1);if(0===b.constantOr(1)&&(0===C.constantOr(1)||0===E.constantOr(1)))return;const k=m.context,F=k.gl,O=m.transform,G=m.depthModeForSublayer(0,h.DepthMode.ReadOnly),W=h.StencilMode.disabled,Q=m.colorModeForRenderPass(),K="globe"===O.projection.name,ne=[h.mercatorXfromLng(O.center.lng),h.mercatorYfromLat(O.center.lat)],q=[];for(let ee=0;eeee.sortKey-te.sortKey);const X={useDepthForOcclusion:!K};for(const ee of q){const{programConfiguration:te,program:ce,layoutVertexBuffer:_e,globeExtVertexBuffer:ge,indexBuffer:Me,uniformValues:We,tile:ze}=ee.state,Te=ee.segments;m.terrain&&m.terrain.setupElevationDraw(ze,ce,X),m.prepareDrawProgram(k,ce,ze.tileID.toUnwrapped()),ce.draw(k,F.TRIANGLES,G,W,Q,h.CullFaceMode.disabled,We,p.id,_e,Me,Te,p.paint,O.zoom,te,[ge])}},heatmap:function(m,c,p,y){if(0!==p.paint.get("heatmap-opacity"))if("offscreen"===m.renderPass){const b=m.context,C=b.gl,E=h.StencilMode.disabled,T=new h.ColorMode([C.ONE,C.ONE],h.Color.transparent,[!0,!0,!0,!0]);(function(Q,K,ne,q){const X=Q.gl,ee=K.width*q,te=K.height*q;Q.activeTexture.set(X.TEXTURE1),Q.viewport.set([0,0,ee,te]);let ce=ne.heatmapFbo;if(!ce||ce&&(ce.width!==ee||ce.height!==te)){ce&&ce.destroy();const _e=X.createTexture();X.bindTexture(X.TEXTURE_2D,_e),X.texParameteri(X.TEXTURE_2D,X.TEXTURE_WRAP_S,X.CLAMP_TO_EDGE),X.texParameteri(X.TEXTURE_2D,X.TEXTURE_WRAP_T,X.CLAMP_TO_EDGE),X.texParameteri(X.TEXTURE_2D,X.TEXTURE_MIN_FILTER,X.LINEAR),X.texParameteri(X.TEXTURE_2D,X.TEXTURE_MAG_FILTER,X.LINEAR),ce=ne.heatmapFbo=Q.createFramebuffer(ee,te,!1),function(ge,Me,We,ze,Te,Ct){const Le=ge.gl;Le.texImage2D(Le.TEXTURE_2D,0,Le.RGBA,Te,Ct,0,Le.RGBA,ge.extRenderToTextureHalfFloat?ge.extTextureHalfFloat.HALF_FLOAT_OES:Le.UNSIGNED_BYTE,null),ze.colorAttachment.set(We)}(Q,0,_e,ce,ee,te)}else X.bindTexture(X.TEXTURE_2D,ce.colorAttachment.get()),Q.bindFramebuffer.set(ce.framebuffer)})(b,m,p,"globe"===m.transform.projection.name?.5:.25),b.clear({color:h.Color.transparent});const k=m.transform,F="globe"===k.projection.name,O=F?["PROJECTION_GLOBE_VIEW"]:null,G=F?h.CullFaceMode.frontCCW:h.CullFaceMode.disabled,W=[h.mercatorXfromLng(k.center.lng),h.mercatorYfromLat(k.center.lat)];for(let Q=0;Q{const _e=[];eh(ce)&&_e.push("RENDER_LINE_DASH"),ce.paint.get("line-gradient")&&_e.push("RENDER_LINE_GRADIENT");const ge=ce.paint.get("line-trim-offset");0===ge[0]&&0===ge[1]||_e.push("RENDER_LINE_TRIM_OFFSET");const Me=ce.paint.get("line-pattern").constantOr(1),We=1!==ce.paint.get("line-opacity").constantOr(1);return!Me&&We&&_e.push("RENDER_LINE_ALPHA_DISCARD"),_e})(p);let te=ee.includes("RENDER_LINE_ALPHA_DISCARD");m.terrain&&m.terrain.clipOrMaskOverlapStencilType()&&(te=!1);for(const ce of y){const _e=c.getTile(ce);if(Q&&!_e.patternsLoaded())continue;const ge=_e.getBucket(p);if(!ge)continue;m.prepareDrawTile();const Me=ge.programConfigurations.get(p.id),We=m.useProgram(ne,Me,ee),ze=W.constantOr(null);if(ze&&_e.imageAtlas){const gt=_e.imageAtlas.patternPositions[ze.toString()];gt&&Me.setConstantPatternPositions(gt)}const Te=F.constantOr(null),Ct=G.constantOr(null);if(!Q&&Te&&Ct&&_e.lineAtlas){const gt=_e.lineAtlas.getDash(Te,Ct);gt&&Me.setConstantPatternPositions(gt)}let[Le,st]=p.paint.get("line-trim-offset");("round"===Ct||"square"===Ct)&&Le!==st&&(0===Le&&(Le-=1),1===st&&(st+=1));const Ye=m.terrain?ce.projMatrix:null,bt=Q?$s(m,_e,p,Ye,k):yp(m,_e,p,Ye,ge.lineClipsArray.length,k,[Le,st]);if(K){const gt=ge.gradients[p.id];let Tt=gt.texture;if(p.gradientVersion!==gt.version){let ke=256;if(p.stepInterpolant){const Qe=c.getSource().maxzoom,Qt=ce.canonical.z===Qe?Math.ceil(1<{We.draw(q,X.TRIANGLES,E,gt,T,h.CullFaceMode.disabled,bt,p.id,ge.layoutVertexBuffer,ge.indexBuffer,ge.segments,p.paint,m.transform.zoom,Me,[ge.layoutVertexBuffer2])};if(te){const gt=m.stencilModeForClipping(ce).ref;0===gt&&m.terrain&&q.clear({stencil:0});const Tt={func:X.EQUAL,mask:255};bt.u_alpha_discard_threshold=.8,Ke(new h.StencilMode(Tt,gt,255,X.KEEP,X.KEEP,X.INVERT)),bt.u_alpha_discard_threshold=0,Ke(new h.StencilMode(Tt,gt,255,X.KEEP,X.KEEP,X.KEEP))}else Ke(m.stencilModeForClipping(ce))}te&&(m.resetStencilClippingMasks(),m.terrain&&q.clear({stencil:0}))},fill:function(m,c,p,y){const b=p.paint.get("fill-color"),C=p.paint.get("fill-opacity");if(0===C.constantOr(1))return;const E=m.colorModeForRenderPass(),T=p.paint.get("fill-pattern"),k=m.opaquePassEnabledForLayer()&&!T.constantOr(1)&&1===b.constantOr(h.Color.transparent).a&&1===C.constantOr(0)?"opaque":"translucent";if(m.renderPass===k){const F=m.depthModeForSublayer(1,"opaque"===m.renderPass?h.DepthMode.ReadWrite:h.DepthMode.ReadOnly);Nu(m,c,p,y,F,E,!1)}if("translucent"===m.renderPass&&p.paint.get("fill-antialias")){const F=m.depthModeForSublayer(p.getPaintProperty("fill-outline-color")?2:0,h.DepthMode.ReadOnly);Nu(m,c,p,y,F,E,!0)}},"fill-extrusion":function(m,c,p,y){const b=p.paint.get("fill-extrusion-opacity");if(0!==b&&"translucent"===m.renderPass){const C=new h.DepthMode(m.context.gl.LEQUAL,h.DepthMode.ReadWrite,m.depthRangeFor3D);if(1!==b||p.paint.get("fill-extrusion-pattern").constantOr(1))Bc(m,c,p,y,C,h.StencilMode.disabled,h.ColorMode.disabled),Bc(m,c,p,y,C,m.stencilModeFor3D(),m.colorModeForRenderPass()),m.resetStencilClippingMasks();else{const E=m.colorModeForRenderPass();Bc(m,c,p,y,C,h.StencilMode.disabled,E)}}},hillshade:function(m,c,p,y){if("offscreen"!==m.renderPass&&"translucent"!==m.renderPass)return;const b=m.context,C=m.depthModeForSublayer(0,h.DepthMode.ReadOnly),E=m.colorModeForRenderPass(),T=m.terrain&&m.terrain.renderingToTexture,[k,F]="translucent"!==m.renderPass||T?[{},y]:m.stencilConfigForOverlap(y);for(const O of F){const G=c.getTile(O);if(G.needsHillshadePrepare&&"offscreen"===m.renderPass)Kd(m,G,p,C,h.StencilMode.disabled,E);else if("translucent"===m.renderPass){const W=T&&m.terrain?m.terrain.stencilModeForRTTOverlap(O):k[O.overscaledZ];Pc(m,O,G,p,C,W,E)}}b.viewport.set([0,0,m.width,m.height]),m.resetStencilClippingMasks()},raster:function(m,c,p,y,b,C){if("translucent"!==m.renderPass||0===p.paint.get("raster-opacity")||!y.length)return;const E=m.context,T=E.gl,k=c.getSource(),F=m.useProgram("raster"),O=m.colorModeForRenderPass(),G=m.terrain&&m.terrain.renderingToTexture,[W,Q]=k instanceof be||G?[{},y]:m.stencilConfigForOverlap(y),K=Q[Q.length-1].overscaledZ,ne=!m.options.moving;for(const q of Q){const X=G?h.DepthMode.disabled:m.depthModeForSublayer(q.overscaledZ-K,1===p.paint.get("raster-opacity")?h.DepthMode.ReadWrite:h.DepthMode.ReadOnly,T.LESS),ee=q.toUnwrapped(),te=c.getTile(q);if(G&&(!te||!te.hasData()))continue;const ce=G?q.projMatrix:m.transform.calculateProjMatrix(ee,ne),_e=m.terrain&&G?m.terrain.stencilModeForRTTOverlap(q):W[q.overscaledZ],ge=C?0:p.paint.get("raster-fade-duration");te.registerFadeDuration(ge);const Me=c.findLoadedParent(q,0),We=Kl(te,Me,c,m.transform,ge);let ze,Te;m.terrain&&m.terrain.prepareDrawTile();const Ct="nearest"===p.paint.get("raster-resampling")?T.NEAREST:T.LINEAR;E.activeTexture.set(T.TEXTURE0),te.texture.bind(Ct,T.CLAMP_TO_EDGE),E.activeTexture.set(T.TEXTURE1),Me?(Me.texture.bind(Ct,T.CLAMP_TO_EDGE),ze=Math.pow(2,Me.tileID.overscaledZ-te.tileID.overscaledZ),Te=[te.tileID.canonical.x*ze%1,te.tileID.canonical.y*ze%1]):te.texture.bind(Ct,T.CLAMP_TO_EDGE);const Le=vp(ce,Te||[0,0],ze||1,We,p,k instanceof be?k.perspectiveTransform:[0,0]);if(m.prepareDrawProgram(E,F,ee),k instanceof be)k.boundsBuffer&&k.boundsSegments&&F.draw(E,T.TRIANGLES,X,h.StencilMode.disabled,O,h.CullFaceMode.disabled,Le,p.id,k.boundsBuffer,m.quadTriangleIndexBuffer,k.boundsSegments);else{const{tileBoundsBuffer:st,tileBoundsIndexBuffer:Ye,tileBoundsSegments:bt}=m.getTileBoundsBuffers(te);F.draw(E,T.TRIANGLES,X,_e,O,h.CullFaceMode.disabled,Le,p.id,st,Ye,bt)}}m.resetStencilClippingMasks()},background:function(m,c,p,y){const b=p.paint.get("background-color"),C=p.paint.get("background-opacity");if(0===C)return;const E=m.context,T=E.gl,k=m.transform,F=k.tileSize,O=p.paint.get("background-pattern");if(m.isPatternMissing(O))return;const G=!O&&1===b.a&&1===C&&m.opaquePassEnabledForLayer()?"opaque":"translucent";if(m.renderPass!==G)return;const W=h.StencilMode.disabled,Q=m.depthModeForSublayer(0,"opaque"===G?h.DepthMode.ReadWrite:h.DepthMode.ReadOnly),K=m.colorModeForRenderPass(),ne=m.useProgram(O?"backgroundPattern":"background");let q,X=y;X||(q=m.getBackgroundTiles(),X=Object.values(q).map(ee=>ee.tileID)),O&&(E.activeTexture.set(T.TEXTURE0),m.imageManager.bind(m.context));for(const ee of X){const te=ee.toUnwrapped(),ce=y?ee.projMatrix:m.transform.calculateProjMatrix(te);m.prepareDrawTile();const _e=c?c.getTile(ee):q?q[ee.key]:new h.Tile(ee,F,k.zoom,m),ge=O?zo(ce,C,m,O,{tileID:ee,tileSize:F}):Lc(ce,C,b);m.prepareDrawProgram(E,ne,te);const{tileBoundsBuffer:Me,tileBoundsIndexBuffer:We,tileBoundsSegments:ze}=m.getTileBoundsBuffers(_e);ne.draw(E,T.TRIANGLES,Q,W,K,h.CullFaceMode.disabled,ge,p.id,Me,We,ze)}},sky:function(m,c,p){const y=m.transform,b="mercator"===y.projection.name||"globe"===y.projection.name?1:h.smoothstep(7,8,y.zoom),C=p.paint.get("sky-opacity")*b;if(0===C)return;const E=m.context,T=p.paint.get("sky-type"),k=new h.DepthMode(E.gl.LEQUAL,h.DepthMode.ReadOnly,[0,1]),F=m.frameCounter/1e3%1;"atmosphere"===T?"offscreen"===m.renderPass?p.needsSkyboxCapture(m)&&(function(O,G,W,Q){const K=O.context,ne=K.gl;let q=G.skyboxFbo;if(!q){q=G.skyboxFbo=K.createFramebuffer(32,32,!1),G.skyboxGeometry=new Ga(K),G.skyboxTexture=K.gl.createTexture(),ne.bindTexture(ne.TEXTURE_CUBE_MAP,G.skyboxTexture),ne.texParameteri(ne.TEXTURE_CUBE_MAP,ne.TEXTURE_WRAP_S,ne.CLAMP_TO_EDGE),ne.texParameteri(ne.TEXTURE_CUBE_MAP,ne.TEXTURE_WRAP_T,ne.CLAMP_TO_EDGE),ne.texParameteri(ne.TEXTURE_CUBE_MAP,ne.TEXTURE_MIN_FILTER,ne.LINEAR),ne.texParameteri(ne.TEXTURE_CUBE_MAP,ne.TEXTURE_MAG_FILTER,ne.LINEAR);for(let ce=0;ce<6;++ce)ne.texImage2D(ne.TEXTURE_CUBE_MAP_POSITIVE_X+ce,0,ne.RGBA,32,32,0,ne.RGBA,ne.UNSIGNED_BYTE,null)}K.bindFramebuffer.set(q.framebuffer),K.viewport.set([0,0,32,32]);const X=G.getCenter(O,!0),ee=O.useProgram("skyboxCapture"),te=new Float64Array(16);h.identity(te),h.rotateY(te,te,.5*-Math.PI),gl(K,G,ee,te,X,0),h.identity(te),h.rotateY(te,te,.5*Math.PI),gl(K,G,ee,te,X,1),h.identity(te),h.rotateX(te,te,.5*-Math.PI),gl(K,G,ee,te,X,2),h.identity(te),h.rotateX(te,te,.5*Math.PI),gl(K,G,ee,te,X,3),h.identity(te),gl(K,G,ee,te,X,4),h.identity(te),h.rotateY(te,te,Math.PI),gl(K,G,ee,te,X,5),K.viewport.set([0,0,O.width,O.height])}(m,p),p.markSkyboxValid(m)):"sky"===m.renderPass&&function(O,G,W,Q,K){const ne=O.context,q=ne.gl,X=O.transform,ee=O.useProgram("skybox");ne.activeTexture.set(q.TEXTURE0),q.bindTexture(q.TEXTURE_CUBE_MAP,G.skyboxTexture);const te={u_matrix:X.skyboxMatrix,u_sun_direction:G.getCenter(O,!1),u_cubemap:0,u_opacity:Q,u_temporal_offset:K};O.prepareDrawProgram(ne,ee),ee.draw(ne,q.TRIANGLES,W,h.StencilMode.disabled,O.colorModeForRenderPass(),h.CullFaceMode.backCW,te,"skybox",G.skyboxGeometry.vertexBuffer,G.skyboxGeometry.indexBuffer,G.skyboxGeometry.segment)}(m,p,k,C,F):"gradient"===T&&"sky"===m.renderPass&&function(O,G,W,Q,K){const ne=O.context,q=ne.gl,X=O.transform,ee=O.useProgram("skyboxGradient");G.skyboxGeometry||(G.skyboxGeometry=new Ga(ne)),ne.activeTexture.set(q.TEXTURE0);let te=G.colorRampTexture;te||(te=G.colorRampTexture=new h.Texture(ne,G.colorRamp,q.RGBA)),te.bind(q.LINEAR,q.CLAMP_TO_EDGE);const ce=(_e=X.skyboxMatrix,ge=G.getCenter(O,!1),Me=G.paint.get("sky-gradient-radius"),We=Q,ze=K,{u_matrix:_e,u_color_ramp:0,u_center_direction:ge,u_radius:h.degToRad(Me),u_opacity:We,u_temporal_offset:ze});var _e,ge,Me,We,ze;O.prepareDrawProgram(ne,ee),ee.draw(ne,q.TRIANGLES,W,h.StencilMode.disabled,O.colorModeForRenderPass(),h.CullFaceMode.backCW,ce,"skyboxGradient",G.skyboxGeometry.vertexBuffer,G.skyboxGeometry.indexBuffer,G.skyboxGeometry.segment)}(m,p,k,C,F)},debug:function(m,c,p){for(let y=0;yb)return void(this.transform.fogCullDistSq=null);const C=y+.78*(b-y);this.transform.fogCullDistSq=C*C}get terrain(){return this.transform._terrainEnabled()&&this._terrain&&this._terrain.enabled?this._terrain:null}resize(c,p){if(this.width=c*h.exported.devicePixelRatio,this.height=p*h.exported.devicePixelRatio,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(const y of this.style.order)this.style._layers[y].resize()}setup(){const c=this.context,p=new h.StructArrayLayout2i4;p.emplaceBack(0,0),p.emplaceBack(h.EXTENT,0),p.emplaceBack(0,h.EXTENT),p.emplaceBack(h.EXTENT,h.EXTENT),this.tileExtentBuffer=c.createVertexBuffer(p,h.posAttributes.members),this.tileExtentSegments=h.SegmentVector.simpleSegment(0,0,4,2);const y=new h.StructArrayLayout2i4;y.emplaceBack(0,0),y.emplaceBack(h.EXTENT,0),y.emplaceBack(0,h.EXTENT),y.emplaceBack(h.EXTENT,h.EXTENT),this.debugBuffer=c.createVertexBuffer(y,h.posAttributes.members),this.debugSegments=h.SegmentVector.simpleSegment(0,0,4,5);const b=new h.StructArrayLayout2i4;b.emplaceBack(-1,-1),b.emplaceBack(1,-1),b.emplaceBack(-1,1),b.emplaceBack(1,1),this.viewportBuffer=c.createVertexBuffer(b,h.posAttributes.members),this.viewportSegments=h.SegmentVector.simpleSegment(0,0,4,2);const C=new h.StructArrayLayout4i8;C.emplaceBack(0,0,0,0),C.emplaceBack(h.EXTENT,0,h.EXTENT,0),C.emplaceBack(0,h.EXTENT,0,h.EXTENT),C.emplaceBack(h.EXTENT,h.EXTENT,h.EXTENT,h.EXTENT),this.mercatorBoundsBuffer=c.createVertexBuffer(C,h.boundsAttributes.members),this.mercatorBoundsSegments=h.SegmentVector.simpleSegment(0,0,4,2);const E=new h.StructArrayLayout3ui6;E.emplaceBack(0,1,2),E.emplaceBack(2,1,3),this.quadTriangleIndexBuffer=c.createIndexBuffer(E);const T=new h.StructArrayLayout1ui2;for(const F of[0,1,3,2,0])T.emplaceBack(F);this.debugIndexBuffer=c.createIndexBuffer(T),this.emptyTexture=new h.Texture(c,new h.RGBAImage({width:1,height:1},Uint8Array.of(0,0,0,0)),c.gl.RGBA),this.identityMat=h.create();const k=this.context.gl;this.stencilClearMode=new h.StencilMode({func:k.ALWAYS,mask:0},0,255,k.ZERO,k.ZERO,k.ZERO),this.loadTimeStamps.push(h.window.performance.now()),this.atmosphereBuffer=new di(this.context)}getMercatorTileBoundsBuffers(){return{tileBoundsBuffer:this.mercatorBoundsBuffer,tileBoundsIndexBuffer:this.quadTriangleIndexBuffer,tileBoundsSegments:this.mercatorBoundsSegments}}getTileBoundsBuffers(c){return c._makeTileBoundsBuffers(this.context,this.transform.projection),c._tileBoundsBuffer?{tileBoundsBuffer:c._tileBoundsBuffer,tileBoundsIndexBuffer:c._tileBoundsIndexBuffer,tileBoundsSegments:c._tileBoundsSegments}:this.getMercatorTileBoundsBuffers()}clearStencil(){const c=this.context,p=c.gl;this.nextStencilID=1,this.currentStencilSource=void 0,this._tileClippingMaskIDs={},this.useProgram("clippingMask").draw(c,p.TRIANGLES,h.DepthMode.disabled,this.stencilClearMode,h.ColorMode.disabled,h.CullFaceMode.disabled,Fn(this.identityMat),"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)}resetStencilClippingMasks(){this.terrain||(this.currentStencilSource=void 0,this._tileClippingMaskIDs={})}_renderTileClippingMasks(c,p,y){if(!p||this.currentStencilSource===p.id||!c.isTileClipped()||!y||0===y.length)return;if(this._tileClippingMaskIDs&&!this.terrain){let T=!1;for(const k of y)if(void 0===this._tileClippingMaskIDs[k.key]){T=!0;break}if(!T)return}this.currentStencilSource=p.id;const b=this.context,C=b.gl;this.nextStencilID+y.length>256&&this.clearStencil(),b.setColorMode(h.ColorMode.disabled),b.setDepthMode(h.DepthMode.disabled);const E=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(const T of y){const k=p.getTile(T),F=this._tileClippingMaskIDs[T.key]=this.nextStencilID++,{tileBoundsBuffer:O,tileBoundsIndexBuffer:G,tileBoundsSegments:W}=this.getTileBoundsBuffers(k);E.draw(b,C.TRIANGLES,h.DepthMode.disabled,new h.StencilMode({func:C.ALWAYS,mask:0},F,255,C.KEEP,C.KEEP,C.REPLACE),h.ColorMode.disabled,h.CullFaceMode.disabled,Fn(T.projMatrix),"$clipping",O,G,W)}}stencilModeFor3D(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();const c=this.nextStencilID++,p=this.context.gl;return new h.StencilMode({func:p.NOTEQUAL,mask:255},c,255,p.KEEP,p.KEEP,p.REPLACE)}stencilModeForClipping(c){if(this.terrain)return this.terrain.stencilModeForRTTOverlap(c);const p=this.context.gl;return new h.StencilMode({func:p.EQUAL,mask:255},this._tileClippingMaskIDs[c.key],0,p.KEEP,p.KEEP,p.REPLACE)}stencilConfigForOverlap(c){const p=this.context.gl,y=c.sort((E,T)=>T.overscaledZ-E.overscaledZ),b=y[y.length-1].overscaledZ,C=y[0].overscaledZ-b+1;if(C>1){this.currentStencilSource=void 0,this.nextStencilID+C>256&&this.clearStencil();const E={};for(let T=0;T=0;this.currentLayer--){const k=this.style._layers[y[this.currentLayer]],F=c._getLayerSourceCache(k);if(k.isSky())continue;const O=F?E[F.id]:void 0;this._renderTileClippingMasks(k,F,O),this.renderLayer(this,F,k,O)}if(this.style.fog&&this.transform.projection.supportsFog&&function(k,F){const O=k.context,G=O.gl,W=k.transform,Q=new h.DepthMode(G.LEQUAL,h.DepthMode.ReadOnly,[0,1]),K=k.useProgram("globeAtmosphere",null,"globe"===W.projection.name?["PROJECTION_GLOBE_VIEW","FOG"]:["FOG"]),ne=h.globeToMercatorTransition(W.zoom),q=F.properties.get("color").toArray01(),X=F.properties.get("high-color").toArray01(),ee=F.properties.get("space-color").toArray01PremultipliedAlpha(),te=h.identity$1([]);h.rotateY$1(te,te,-h.degToRad(W._center.lng)),h.rotateX$1(te,te,h.degToRad(W._center.lat)),h.rotateZ$1(te,te,W.angle),h.rotateX$1(te,te,-W._pitch);const ce=h.fromQuat(new Float32Array(16),te),_e=h.mapValue(F.properties.get("star-intensity"),0,1,0,.25),Me=h.mapValue(F.properties.get("horizon-blend"),0,1,5e-4,.25),We=h.globeUseCustomAntiAliasing(k,O,W)&&5e-4===Me?W.worldSize/(2*Math.PI*1.025)-1:W.globeRadius,ze=k.frameCounter/1e3%1,Te=h.length(W.globeCenterInViewSpace),Ct=Math.sqrt(Math.pow(Te,2)-Math.pow(We,2)),Le=Math.acos(Ct/Te),st={u_frustum_tl:W.frustumCorners.TL,u_frustum_tr:W.frustumCorners.TR,u_frustum_br:W.frustumCorners.BR,u_frustum_bl:W.frustumCorners.BL,u_horizon:W.frustumCorners.horizon,u_transition:ne,u_fadeout_range:Me,u_color:q,u_high_color:X,u_space_color:ee,u_star_intensity:_e,u_star_size:5*h.exported.devicePixelRatio,u_star_density:0,u_temporal_offset:ze,u_horizon_angle:Le,u_rotation_matrix:ce};k.prepareDrawProgram(O,K);const Ye=k.atmosphereBuffer;Ye&&K.draw(O,G.TRIANGLES,Q,h.StencilMode.disabled,h.ColorMode.alphaBlended,h.CullFaceMode.backCW,st,"skybox",Ye.vertexBuffer,Ye.indexBuffer,Ye.segments)}(this,this.style.fog),this.renderPass="sky",(h.globeToMercatorTransition(this.transform.zoom)>0||"globe"!==this.transform.projection.name)&&this.transform.isHorizonVisible())for(this.currentLayer=0;this.currentLayer{const O=c._getLayerSourceCache(F);O&&!F.isHidden(this.transform.zoom)&&(!k||k.getSource().maxzoom0?p.pop():null}isPatternMissing(c){return null===c||void 0!==c&&!this.imageManager.getPattern(c.toString())}terrainRenderModeElevated(){return this.style&&!!this.style.getTerrain()&&!!this.terrain&&!this.terrain.renderingToTexture}currentGlobalDefines(){const c=this.terrain&&this.terrain.renderingToTexture,p=this.terrain&&0===this.terrain.exaggeration(),y=this.style&&this.style.fog,b=[];return this.terrainRenderModeElevated()&&b.push("TERRAIN"),"globe"===this.transform.projection.name&&b.push("GLOBE"),p&&b.push("ZERO_EXAGGERATION"),y&&!c&&0!==y.getOpacity(this.transform.pitch)&&b.push("FOG"),c&&b.push("RENDER_TO_TEXTURE"),this._showOverdrawInspector&&b.push("OVERDRAW_INSPECTOR"),b}useProgram(c,p,y){this.cache=this.cache||{};const b=y||[],C=this.currentGlobalDefines().concat(b),E=_p.cacheKey(fm[c],c,C,p);return this.cache[E]||(this.cache[E]=new _p(this.context,c,fm[c],p,Va[c],C)),this.cache[E]}setCustomLayerDefaults(){this.context.unbindVAO(),this.context.cullFace.setDefault(),this.context.frontFace.setDefault(),this.context.cullFaceSide.setDefault(),this.context.activeTexture.setDefault(),this.context.pixelStoreUnpack.setDefault(),this.context.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.context.pixelStoreUnpackFlipY.setDefault()}setBaseState(){const c=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(c.FUNC_ADD)}initDebugOverlayCanvas(){null==this.debugOverlayCanvas&&(this.debugOverlayCanvas=h.window.document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512,this.debugOverlayTexture=new h.Texture(this.context,this.debugOverlayCanvas,this.context.gl.RGBA))}destroy(){this._terrain&&this._terrain.destroy(),this.globeSharedBuffers&&this.globeSharedBuffers.destroy(),this.emptyTexture.destroy(),this.debugOverlayTexture&&this.debugOverlayTexture.destroy(),this.atmosphereBuffer&&this.atmosphereBuffer.destroy()}prepareDrawTile(){this.terrain&&this.terrain.prepareDrawTile()}prepareDrawProgram(c,p,y){if(this.terrain&&this.terrain.renderingToTexture)return;const b=this.style.fog;if(b){const C=b.getOpacity(this.transform.pitch),E=((T,k,F,O,G,W,Q,K,ne,q,X)=>{const ee=T.transform,te=k.properties.get("color").toArray01();te[3]=O;const ce=T.frameCounter/1e3%1;return{u_fog_matrix:F?ee.calculateFogTileMatrix(F):T.identityMat,u_fog_range:k.getFovAdjustedRange(ee._fov),u_fog_color:te,u_fog_horizon_blend:k.properties.get("horizon-blend"),u_fog_temporal_offset:ce,u_frustum_tl:G,u_frustum_tr:W,u_frustum_br:Q,u_frustum_bl:K,u_globe_pos:ne,u_globe_radius:q,u_viewport:X,u_globe_transition:h.globeToMercatorTransition(ee.zoom),u_is_globe:+("globe"===ee.projection.name)}})(this,b,y,C,this.transform.frustumCorners.TL,this.transform.frustumCorners.TR,this.transform.frustumCorners.BR,this.transform.frustumCorners.BL,this.transform.globeCenterInViewSpace,this.transform.globeRadius,[this.transform.width*h.exported.devicePixelRatio,this.transform.height*h.exported.devicePixelRatio]);p.setFogUniformValues(c,E)}}setTileLoadedFlag(c){this.tileLoaded=c}saveCanvasCopy(){this.frameCopies.push(this.canvasCopy()),this.tileLoaded=!1}canvasCopy(){const c=this.context.gl,p=c.createTexture();return c.bindTexture(c.TEXTURE_2D,p),c.copyTexImage2D(c.TEXTURE_2D,0,c.RGBA,0,0,c.drawingBufferWidth,c.drawingBufferHeight,0),p}getCanvasCopiesAndTimestamps(){return{canvasCopies:this.frameCopies,timeStamps:this.loadTimeStamps}}averageElevationNeedsEasing(){if(!this.transform._elevation)return!1;const c=this.style&&this.style.fog;return!!c&&0!==c.getOpacity(this.transform.pitch)}getBackgroundTiles(){const c=this._backgroundTiles,p=this._backgroundTiles={},y=this.transform.coveringTiles({tileSize:512});for(const b of y)p[b.key]=c[b.key]||new h.Tile(b,512,this.transform.tileZoom,this);return p}clearBackgroundTiles(){this._backgroundTiles={}}}class xp{constructor(c=0,p=0,y=0,b=0){if(isNaN(c)||c<0||isNaN(p)||p<0||isNaN(y)||y<0||isNaN(b)||b<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=c,this.bottom=p,this.left=y,this.right=b}interpolate(c,p,y){return null!=p.top&&null!=c.top&&(this.top=h.number(c.top,p.top,y)),null!=p.bottom&&null!=c.bottom&&(this.bottom=h.number(c.bottom,p.bottom,y)),null!=p.left&&null!=c.left&&(this.left=h.number(c.left,p.left,y)),null!=p.right&&null!=c.right&&(this.right=h.number(c.right,p.right,y)),this}getCenter(c,p){const y=h.clamp((this.left+c-this.right)/2,0,c),b=h.clamp((this.top+p-this.bottom)/2,0,p);return new h.pointGeometry(y,b)}equals(c){return this.top===c.top&&this.bottom===c.bottom&&this.left===c.left&&this.right===c.right}clone(){return new xp(this.top,this.bottom,this.left,this.right)}toJSON(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}}}function Jr(m,c){const p=h.getColumn(m,3);h.fromQuat(m,c),h.setColumn(m,3,p)}function fs(m,c){const p=h.identity$1([]);return h.rotateZ$1(p,p,-c),h.rotateX$1(p,p,-m),p}function nh(m,c){const p=[m[0],m[1],0],y=[c[0],c[1],0];if(h.length(p)>=1e-15){const E=h.normalize([],p);h.scale$2(y,E,h.dot(y,E)),c[0]=y[0],c[1]=y[1]}const b=h.cross([],c,m);if(h.len(b)<1e-15)return null;const C=Math.atan2(-b[1],b[0]);return fs(Math.atan2(Math.sqrt(m[0]*m[0]+m[1]*m[1]),-m[2]),C)}class Ql{constructor(c,p){this.position=c,this.orientation=p}get position(){return this._position}set position(c){if(c){const p=c instanceof h.MercatorCoordinate?c:new h.MercatorCoordinate(c[0],c[1],c[2]);this._renderWorldCopies&&(p.x=h.wrap(p.x,0,1)),this._position=p}else this._position=null}lookAtPoint(c,p){if(this.orientation=null,!this.position)return;const y=this._elevation?this._elevation.getAtPointOrZero(h.MercatorCoordinate.fromLngLat(c)):0,b=this.position,C=h.MercatorCoordinate.fromLngLat(c,y),E=[C.x-b.x,C.y-b.y,C.z-b.z];p||(p=[0,0,1]),p[2]=Math.abs(p[2]),this.orientation=nh(E,p)}setPitchBearing(c,p){this.orientation=fs(h.degToRad(c),h.degToRad(-p))}}class Gc{constructor(c,p){this._transform=h.identity([]),this.orientation=p,this.position=c}get mercatorPosition(){const c=this.position;return new h.MercatorCoordinate(c[0],c[1],c[2])}get position(){const c=h.getColumn(this._transform,3);return[c[0],c[1],c[2]]}set position(c){var p;c&&h.setColumn(this._transform,3,[(p=c)[0],p[1],p[2],1])}get orientation(){return this._orientation}set orientation(c){this._orientation=c||h.identity$1([]),c&&Jr(this._transform,this._orientation)}getPitchBearing(){const c=this.forward(),p=this.right();return{bearing:Math.atan2(-p[1],p[0]),pitch:Math.atan2(Math.sqrt(c[0]*c[0]+c[1]*c[1]),-c[2])}}setPitchBearing(c,p){this._orientation=fs(c,p),Jr(this._transform,this._orientation)}forward(){const c=h.getColumn(this._transform,2);return[-c[0],-c[1],-c[2]]}up(){const c=h.getColumn(this._transform,1);return[-c[0],-c[1],-c[2]]}right(){const c=h.getColumn(this._transform,0);return[c[0],c[1],c[2]]}getCameraToWorld(c,p){const y=new Float64Array(16);return h.invert(y,this.getWorldToCamera(c,p)),y}getWorldToCameraPosition(c,p,y){const b=this.position;h.scale$2(b,b,-c);const C=new Float64Array(16);return h.fromScaling(C,[y,y,y]),h.translate(C,C,b),C[10]*=p,C}getWorldToCamera(c,p){const y=new Float64Array(16),b=new Float64Array(4),C=this.position;return h.conjugate(b,this._orientation),h.scale$2(C,C,-c),h.fromQuat(y,b),h.translate(y,y,C),y[1]*=-1,y[5]*=-1,y[9]*=-1,y[13]*=-1,y[8]*=p,y[9]*=p,y[10]*=p,y[11]*=p,y}getCameraToClipPerspective(c,p,y,b){const C=new Float64Array(16);return h.perspective(C,c,p,y,b),C}getDistanceToElevation(c,p=!1){const y=0===c?0:h.mercatorZfromAltitude(c,p?h.latFromMercatorY(this.position[1]):this.position[1]),b=this.forward();return(y-this.position[2])/b[2]}clone(){return new Gc([...this.position],[...this.orientation])}}function es(m,c){const p=Jl(m.projection,m.zoom,m.width,m.height),y=function(C,E,T,k,F){const O=new h.LngLat(T.lng-180*_l,T.lat),G=new h.LngLat(T.lng+180*_l,T.lat),W=C.project(O.lng,O.lat),Q=C.project(G.lng,G.lat),K=-Math.atan2(Q.y-W.y,Q.x-W.x),ne=h.MercatorCoordinate.fromLngLat(T);ne.y=h.clamp(ne.y,-.999975,.999975);const q=ne.toLngLat(),X=C.project(q.lng,q.lat),ee=h.MercatorCoordinate.fromLngLat(q);ee.x+=_l;const te=ee.toLngLat(),ce=C.project(te.lng,te.lat),_e=ym(ce.x-X.x,ce.y-X.y,K),ge=h.MercatorCoordinate.fromLngLat(q);ge.y+=_l;const Me=ge.toLngLat(),We=C.project(Me.lng,Me.lat),ze=ym(We.x-X.x,We.y-X.y,K),Te=Math.abs(_e.x)/Math.abs(ze.y),Ct=h.identity([]);h.rotateZ(Ct,Ct,-K*(1-(F?0:k)));const Le=h.identity([]);return h.scale(Le,Le,[1,1-(1-Te)*k,1]),Le[4]=-ze.x/ze.y*k,h.rotateZ(Le,Le,K),h.multiply(Le,Ct,Le),Le}(m.projection,0,m.center,p,c),b=Vu(m);return h.scale(y,y,[b,b,1]),y}function Vu(m){const c=m.projection,p=Jl(m.projection,m.zoom,m.width,m.height),y=ih(c,m.center),b=ih(c,h.LngLat.convert(c.center));return Math.pow(2,y*p+(1-p)*b)}function Jl(m,c,p,y,b=1/0){const C=m.range;if(!C)return 0;const E=Math.min(b,Math.max(p,y)),T=Math.log(E/1024)/Math.LN2;return h.smoothstep(C[0]+T,C[1]+T,c)}const _l=1/4e4;function ih(m,c){const p=h.clamp(c.lat,-h.MAX_MERCATOR_LATITUDE,h.MAX_MERCATOR_LATITUDE),y=new h.LngLat(c.lng-180*_l,p),b=new h.LngLat(c.lng+180*_l,p),C=m.project(y.lng,p),E=m.project(b.lng,p),T=h.MercatorCoordinate.fromLngLat(y),k=h.MercatorCoordinate.fromLngLat(b),F=E.x-C.x,O=E.y-C.y,G=k.x-T.x,W=k.y-T.y,Q=Math.sqrt((G*G+W*W)/(F*F+O*O));return Math.log(Q)/Math.LN2}function ym(m,c,p){const y=Math.cos(p),b=Math.sin(p);return{x:m*y-c*b,y:m*b+c*y}}class Gu{constructor(c,p,y,b,C,E,T){this.tileSize=512,this._renderWorldCopies=void 0===C||C,this._minZoom=c||0,this._maxZoom=p||22,this._minPitch=y??0,this._maxPitch=b??60,this.setProjection(E),this.setMaxBounds(T),this.width=0,this.height=0,this._center=new h.LngLat(0,0),this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._nearZ=0,this._farZ=0,this._unmodified=!0,this._edgeInsets=new xp,this._projMatrixCache={},this._alignedProjMatrixCache={},this._fogTileMatrixCache={},this._distanceTileDataCache={},this._camera=new Gc,this._centerAltitude=0,this._averageElevation=0,this.cameraElevationReference="ground",this._pixelsPerMercatorPixel=1,this.globeRadius=0,this.globeCenterInViewSpace=[0,0,0],this._horizonShift=.1}clone(){const c=new Gu(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies,this.getProjection());return c._elevation=this._elevation,c._centerAltitude=this._centerAltitude,c._centerAltitudeValidForExaggeration=this._centerAltitudeValidForExaggeration,c.tileSize=this.tileSize,c.mercatorFromTransition=this.mercatorFromTransition,c.width=this.width,c.height=this.height,c.cameraElevationReference=this.cameraElevationReference,c._center=this._center,c._setZoom(this.zoom),c._seaLevelZoom=this._seaLevelZoom,c.angle=this.angle,c._fov=this._fov,c._pitch=this._pitch,c._nearZ=this._nearZ,c._farZ=this._farZ,c._averageElevation=this._averageElevation,c._unmodified=this._unmodified,c._edgeInsets=this._edgeInsets.clone(),c._camera=this._camera.clone(),c._calcMatrices(),c.freezeTileCoverage=this.freezeTileCoverage,c.frustumCorners=this.frustumCorners,c}get elevation(){return this._elevation}set elevation(c){this._elevation!==c&&(this._elevation=c,this._updateCameraOnTerrain(),this._calcMatrices())}updateElevation(c,p=!1){const y=this._elevation&&this._elevation.exaggeration()!==this._centerAltitudeValidForExaggeration;(null==this._seaLevelZoom||y)&&this._updateCameraOnTerrain(),(c||y)&&this._constrainCamera(p),this._calcMatrices()}getProjection(){return h.pick(this.projection,["name","center","parallels"])}setProjection(c){this.projectionOptions=c||{name:"mercator"};const p=this.projection?this.getProjection():void 0;this.projection=h.getProjection(this.projectionOptions);const y=!$(p,this.getProjection());return y&&this._calcMatrices(),this.mercatorFromTransition=!1,y}setMercatorFromTransition(){const c=this.projection.name;this.mercatorFromTransition=!0,this.projectionOptions={name:"mercator"},this.projection=h.getProjection({name:"mercator"});const p=c!==this.projection.name;return p&&this._calcMatrices(),p}get minZoom(){return this._minZoom}set minZoom(c){this._minZoom!==c&&(this._minZoom=c,this.zoom=Math.max(this.zoom,c))}get maxZoom(){return this._maxZoom}set maxZoom(c){this._maxZoom!==c&&(this._maxZoom=c,this.zoom=Math.min(this.zoom,c))}get minPitch(){return this._minPitch}set minPitch(c){this._minPitch!==c&&(this._minPitch=c,this.pitch=Math.max(this.pitch,c))}get maxPitch(){return this._maxPitch}set maxPitch(c){this._maxPitch!==c&&(this._maxPitch=c,this.pitch=Math.min(this.pitch,c))}get renderWorldCopies(){return this._renderWorldCopies&&!0===this.projection.supportsWorldCopies}set renderWorldCopies(c){void 0===c?c=!0:null===c&&(c=!1),this._renderWorldCopies=c}get worldSize(){return this.tileSize*this.scale}get cameraWorldSizeForFog(){const c=Math.max(this._camera.getDistanceToElevation(this._averageElevation),Number.EPSILON);return this._worldSizeFromZoom(this._zoomFromMercatorZ(c))}get cameraWorldSize(){const c=Math.max(this._camera.getDistanceToElevation(this._averageElevation,!0),Number.EPSILON);return this._worldSizeFromZoom(this._zoomFromMercatorZ(c))}get pixelsPerMeter(){return this.projection.pixelsPerMeter(this.center.lat,this.worldSize)}get cameraPixelsPerMeter(){return h.mercatorZfromAltitude(this.center.lat,this.cameraWorldSizeForFog)}get centerOffset(){return this.centerPoint._sub(this.size._div(2))}get size(){return new h.pointGeometry(this.width,this.height)}get bearing(){return h.wrap(this.rotation,-180,180)}set bearing(c){this.rotation=c}get rotation(){return-this.angle/Math.PI*180}set rotation(c){const p=-c*Math.PI/180;var y,b,C,E,T,k,F,O,G,W;this.angle!==p&&(this._unmodified=!1,this.angle=p,this._calcMatrices(),this.rotationMatrix=(y=new h.ARRAY_TYPE(4),h.ARRAY_TYPE!=Float32Array&&(y[1]=0,y[2]=0),y[0]=1,y[3]=1,y),b=this.rotationMatrix,E=this.angle,T=(C=this.rotationMatrix)[0],k=C[1],F=C[2],O=C[3],G=Math.sin(E),W=Math.cos(E),b[0]=T*W+F*G,b[1]=k*W+O*G,b[2]=T*-G+F*W,b[3]=k*-G+O*W)}get pitch(){return this._pitch/Math.PI*180}set pitch(c){const p=h.clamp(c,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==p&&(this._unmodified=!1,this._pitch=p,this._calcMatrices())}get aspect(){return this.width/this.height}get fovX(){return this._fov}get fovY(){const c=1/Math.tan(.5*this.fovX);return 2*Math.atan(1/this.aspect/c)}set fov(c){c=Math.max(.01,Math.min(60,c)),this._fov!==c&&(this._unmodified=!1,this._fov=h.degToRad(c),this._calcMatrices())}get averageElevation(){return this._averageElevation}set averageElevation(c){this._averageElevation=c,this._calcFogMatrices(),this._distanceTileDataCache={}}get zoom(){return this._zoom}set zoom(c){const p=Math.min(Math.max(c,this.minZoom),this.maxZoom);this._zoom!==p&&(this._unmodified=!1,this._setZoom(p),this._updateSeaLevelZoom(),this._constrain(),this._calcMatrices())}_setZoom(c){this._zoom=c,this.scale=this.zoomScale(c),this.tileZoom=Math.floor(c),this.zoomFraction=c-this.tileZoom}_updateCameraOnTerrain(){if(!this._elevation||!this._elevation.isDataAvailableAtPoint(this.locationCoordinate(this.center)))return this._centerAltitude=0,this._seaLevelZoom=null,void(this._centerAltitudeValidForExaggeration=void 0);const c=this._elevation;this._centerAltitude=c.getAtPointOrZero(this.locationCoordinate(this.center)),this._centerAltitudeValidForExaggeration=c.exaggeration(),this._updateSeaLevelZoom()}_updateSeaLevelZoom(){void 0!==this._centerAltitudeValidForExaggeration&&(this._seaLevelZoom=this._zoomFromMercatorZ((this.pixelsPerMeter*this._centerAltitude+this.cameraToCenterDistance)/this.worldSize))}sampleAverageElevation(){if(!this._elevation)return 0;const c=this._elevation,p=[[.5,.2],[.3,.5],[.5,.5],[.7,.5],[.5,.8]],y=this.horizonLineFromTop();let b=0,C=0;for(let E=0;Ec.maxzoom&&(p=c.maxzoom);const E=this.locationCoordinate(this.center),T=this.center.lat,k=1<{const Tt=new h.MercatorCoordinate(Ke.x+25e-6,Ke.y,Ke.z),ke=new h.MercatorCoordinate(Ke.x,Ke.y+25e-6,Ke.z),Qe=Ke.toLngLat(),Qt=Tt.toLngLat(),hn=ke.toLngLat(),tn=this.locationCoordinate(Qe),Sn=this.locationCoordinate(Qt),Un=this.locationCoordinate(hn),un=Math.hypot(Sn.x-tn.x,Sn.y-tn.y),Ht=Math.hypot(Un.x-tn.x,Un.y-tn.y);return Math.sqrt(un*Ht)*_e/25e-6},Me=Ke=>{const gt=te,Tt=ce;return{aabb:h.tileAABB(this,k,0,0,0,Ke,Tt,gt,this.projection),zoom:0,x:0,y:0,minZ:Tt,maxZ:gt,wrap:Ke,fullyVisible:!1}},We=[];let ze=[];const Te=p,Ct=c.reparseOverscaled?y:p,Le=Ke=>Ke*Ke,st=Le((ne-this._centerAltitude)*K),Ye=Ke=>{if(!this._elevation||!Ke.tileID||!C)return;const gt=this._elevation.getMinMaxForTile(Ke.tileID),Tt=Ke.aabb;gt?(Tt.min[2]=gt.min,Tt.max[2]=gt.max,Tt.center[2]=(Tt.min[2]+Tt.max[2])/2):(Ke.shouldSplit=bt(Ke),Ke.shouldSplit||(Tt.min[2]=Tt.max[2]=Tt.center[2]=this._centerAltitude))},bt=Ke=>{if(Ke.zoom=.9)return!0}else if(b&&(ke=Le(Ke.aabb.distanceZ(q)*K)),this.projection.isReprojectedInTileSpace&&y<=5){const tn=Math.pow(2,Ke.zoom),Sn=ge(new h.MercatorCoordinate((Ke.x+.5)/tn,(Ke.y+.5)/tn));Qe=Sn>.85?1:Sn}const Qt=gt*gt+Tt*Tt+ke;return Qt{if(Sn*Le(.707)0;){const Ke=We.pop(),gt=Ke.x,Tt=Ke.y;let ke=Ke.fullyVisible;if(!ke){const Qe=Ke.aabb.intersects(W);if(0===Qe)continue;ke=2===Qe}if(Ke.zoom!==Te&&bt(Ke))for(let Qe=0;Qe<4;Qe++){const Qt=(gt<<1)+Qe%2,hn=(Tt<<1)+(Qe>>1),tn={aabb:C?Ke.aabb.quadrant(Qe):h.tileAABB(this,k,Ke.zoom+1,Qt,hn,Ke.wrap,Ke.minZ,Ke.maxZ,this.projection),zoom:Ke.zoom+1,x:Qt,y:hn,wrap:Ke.wrap,fullyVisible:ke,tileID:void 0,shouldSplit:void 0,minZ:Ke.minZ,maxZ:Ke.maxZ};b&&!O&&(tn.tileID=new h.OverscaledTileID(Ke.zoom+1===Te?Ct:Ke.zoom+1,Ke.wrap,Ke.zoom+1,Qt,hn),Ye(tn)),We.push(tn)}else{const Qe=Ke.zoom===Te?Ct:Ke.zoom;if(c.minzoom&&c.minzoom>Qe)continue;const Qt=F[0]-(.5+gt+(Ke.wrap<{const ke=[0,0,0,1],Qe=[h.EXTENT,h.EXTENT,0,1],Qt=this.calculateFogTileMatrix(Tt.tileID.toUnwrapped());h.transformMat4$1(ke,ke,Qt),h.transformMat4$1(Qe,Qe,Qt);const hn=h.getAABBPointSquareDist(ke,Qe);if(0===hn)return!0;let tn=!1;const Sn=this._elevation;if(Sn&&hn>Ke&&0!==gt){const Un=this.calculateProjMatrix(Tt.tileID.toUnwrapped());let un;c.isTerrainDEM||(un=Sn.getMinMaxForTile(Tt.tileID)),un||(un={min:ce,max:te});const Ht=h.furthestTileCorner(this.rotation),gi=[Ht[0]*h.EXTENT,Ht[1]*h.EXTENT,un.max];h.transformMat4(gi,gi,Un),tn=(1-gi[1])*this.height*.5Ke.distanceSq-gt.distanceSq).map(Ke=>Ke.tileID)}resize(c,p){this.width=c,this.height=p,this.pixelsToGLUnits=[2/c,-2/p],this._constrain(),this._calcMatrices()}get unmodified(){return this._unmodified}zoomScale(c){return Math.pow(2,c)}scaleZoom(c){return Math.log(c)/Math.LN2}project(c){const p=h.clamp(c.lat,-h.MAX_MERCATOR_LATITUDE,h.MAX_MERCATOR_LATITUDE),y=this.projection.project(c.lng,p);return new h.pointGeometry(y.x*this.worldSize,y.y*this.worldSize)}unproject(c){return this.projection.unproject(c.x/this.worldSize,c.y/this.worldSize)}get point(){return this.project(this.center)}setLocationAtPoint(c,p){let y,b;const C=this.centerPoint;if("globe"===this.projection.name){const T=this.worldSize;y=(p.x-C.x)/T,b=(p.y-C.y)/T}else{const T=this.pointCoordinate(p),k=this.pointCoordinate(C);y=T.x-k.x,b=T.y-k.y}const E=this.locationCoordinate(c);this.setLocation(new h.MercatorCoordinate(E.x-y,E.y-b))}setLocation(c){this.center=this.coordinateLocation(c),this.projection.wrap&&(this.center=this.center.wrap())}locationPoint(c){return this.projection.locationPoint(this,c)}locationPoint3D(c){return this.projection.locationPoint(this,c,!0)}pointLocation(c){return this.coordinateLocation(this.pointCoordinate(c))}pointLocation3D(c){return this.coordinateLocation(this.pointCoordinate3D(c))}locationCoordinate(c,p){const y=p?h.mercatorZfromAltitude(p,c.lat):void 0,b=this.projection.project(c.lng,c.lat);return new h.MercatorCoordinate(b.x,b.y,y)}coordinateLocation(c){return this.projection.unproject(c.x,c.y)}pointRayIntersection(c,p){const y=p??this._centerAltitude,b=[c.x,c.y,0,1],C=[c.x,c.y,1,1];h.transformMat4$1(b,b,this.pixelMatrixInverse),h.transformMat4$1(C,C,this.pixelMatrixInverse);const E=C[3];h.scale$1(b,b,1/b[3]),h.scale$1(C,C,1/E);const T=b[2],k=C[2];return{p0:b,p1:C,t:T===k?0:(y-T)/(k-T)}}screenPointToMercatorRay(c){const p=[c.x,c.y,0,1],y=[c.x,c.y,1,1];return h.transformMat4$1(p,p,this.pixelMatrixInverse),h.transformMat4$1(y,y,this.pixelMatrixInverse),h.scale$1(p,p,1/p[3]),h.scale$1(y,y,1/y[3]),p[2]=h.mercatorZfromAltitude(p[2],this._center.lat)*this.worldSize,y[2]=h.mercatorZfromAltitude(y[2],this._center.lat)*this.worldSize,h.scale$1(p,p,1/this.worldSize),h.scale$1(y,y,1/this.worldSize),new h.Ray([p[0],p[1],p[2]],h.normalize([],h.sub([],y,p)))}rayIntersectionCoordinate(c){const{p0:p,p1:y,t:b}=c,C=h.mercatorZfromAltitude(p[2],this._center.lat),E=h.mercatorZfromAltitude(y[2],this._center.lat);return new h.MercatorCoordinate(h.number(p[0],y[0],b)/this.worldSize,h.number(p[1],y[1],b)/this.worldSize,h.number(C,E,b))}pointCoordinate(c,p=this._centerAltitude){return this.projection.pointCoordinate(this,c.x,c.y,p)}pointCoordinate3D(c){if(!this.elevation)return this.pointCoordinate(c);let p=this.projection.pointCoordinate3D(this,c.x,c.y);if(p)return new h.MercatorCoordinate(p[0],p[1],p[2]);let y=0,b=this.horizonLineFromTop();if(c.y>b)return this.pointCoordinate(c);const C=.02*b,E=c.clone();for(let T=0;T<10&&b-y>C;T++){E.y=h.number(y,b,.66);const k=this.projection.pointCoordinate3D(this,E.x,E.y);k?(b=E.y,p=k):y=E.y}return p?new h.MercatorCoordinate(p[0],p[1],p[2]):this.pointCoordinate(c)}isPointAboveHorizon(c){return this.projection.isPointAboveHorizon(this,c)}_coordinatePoint(c,p){const y=p&&this.elevation?this.elevation.getAtPointOrZero(c,this._centerAltitude):this._centerAltitude,b=[c.x*this.worldSize,c.y*this.worldSize,y+c.toAltitude(),1];return h.transformMat4$1(b,b,this.pixelMatrix),b[3]>0?new h.pointGeometry(b[0]/b[3],b[1]/b[3]):new h.pointGeometry(Number.MAX_VALUE,Number.MAX_VALUE)}_getGlobeBounds(){const{top:c,left:p}=this._edgeInsets,y=this.height-this._edgeInsets.bottom,b=this.width-this._edgeInsets.right,C=this.pointCoordinate3D(new h.pointGeometry(p,c)),E=this.pointCoordinate3D(new h.pointGeometry(b,c)),T=this.pointCoordinate3D(new h.pointGeometry(b,y)),k=this.pointCoordinate3D(new h.pointGeometry(p,y));let F=Math.min(C.x,k.x),O=Math.max(E.x,T.x),G=Math.min(C.y,E.y),W=Math.max(k.y,T.y);const Q=Math.pow(2,-this.zoom)/16,K=(ge,Me,We,ze)=>{const Te=(ge+We)/2,Ct=(Me+ze)/2,Le=new h.pointGeometry(Te,Ct),st=this.pointCoordinate3D(Le),Ye=Math.max(0,F-st.x,G-st.y,st.x-O,st.y-W);F=Math.min(F,st.x),O=Math.max(O,st.x),G=Math.min(G,st.y),W=Math.max(W,st.y),Ye>Q&&(K(ge,Me,Te,Ct),K(Te,Ct,We,ze))};K(p,c,b,c),K(b,c,b,y),K(b,y,p,y),K(p,y,p,c);const[ne,q]=h.polesInViewport(this),X=ne||q,ee=ne?90:h.latFromMercatorY(G),te=X?180:h.lngFromMercatorX(O),ce=q?-90:h.latFromMercatorY(W),_e=X?-180:h.lngFromMercatorX(F);return new h.LngLatBounds(new h.LngLat(_e,ce),new h.LngLat(te,ee))}_getBounds(c,p){if("globe"===this.projection.name)return this._getGlobeBounds();const y=new h.pointGeometry(this._edgeInsets.left,this._edgeInsets.top),b=new h.pointGeometry(this.width-this._edgeInsets.right,this._edgeInsets.top),C=new h.pointGeometry(this.width-this._edgeInsets.right,this.height-this._edgeInsets.bottom),E=new h.pointGeometry(this._edgeInsets.left,this.height-this._edgeInsets.bottom);let T=this.pointCoordinate(y,c),k=this.pointCoordinate(b,c);const F=this.pointCoordinate(C,p),O=this.pointCoordinate(E,p),G=(W,Q)=>(Q.y-W.y)/(Q.x-W.x);return T.y>1&&k.y>=0?T=new h.MercatorCoordinate((1-O.y)/G(O,T)+O.x,1):T.y<0&&k.y<=1&&(T=new h.MercatorCoordinate(-O.y/G(O,T)+O.x,0)),k.y>1&&T.y>=0?k=new h.MercatorCoordinate((1-F.y)/G(F,k)+F.x,1):k.y<0&&T.y<=1&&(k=new h.MercatorCoordinate(-F.y/G(F,k)+F.x,0)),(new h.LngLatBounds).extend(this.coordinateLocation(T)).extend(this.coordinateLocation(k)).extend(this.coordinateLocation(O)).extend(this.coordinateLocation(F))}_getBounds3D(){const c=this.elevation;if(!c.visibleDemTiles.length||c.isUsingMockSource())return this._getBounds(0,0);const p=c.visibleDemTiles.reduce((y,b)=>{if(b.dem){const C=b.dem.tree;y.min=Math.min(y.min,C.minimums[0]),y.max=Math.max(y.max,C.maximums[0])}return y},{min:Number.MAX_VALUE,max:0});return this._getBounds(p.min*c.exaggeration(),p.max*c.exaggeration())}getBounds(){return this._terrainEnabled()?this._getBounds3D():this._getBounds(0,0)}horizonLineFromTop(c=!0){const p=this.height/2/Math.tan(this._fov/2)/Math.tan(Math.max(this._pitch,.1))+this.centerOffset.y,y=this.height/2-p*(1-this._horizonShift);return c?Math.max(0,y):y}getMaxBounds(){return this.maxBounds}setMaxBounds(c){this.maxBounds=c,this.minLat=-h.MAX_MERCATOR_LATITUDE,this.maxLat=h.MAX_MERCATOR_LATITUDE,this.minLng=-180,this.maxLng=180,c&&(this.minLat=c.getSouth(),this.maxLat=c.getNorth(),this.minLng=c.getWest(),this.maxLng=c.getEast(),this.maxLngG&&(T=G-F),G-OQ&&(E=Q-k),Q-W.5?ee-1:ee,te>.5?te-1:te,0]),this.alignedProjMatrix=ce,E=h.create(),h.scale(E,E,[this.width/2,-this.height/2,1]),h.translate(E,E,[1,-1,0]),this.labelPlaneMatrix=E,E=h.create(),h.scale(E,E,[1,-1,1]),h.translate(E,E,[-1,-1,0]),h.scale(E,E,[2/this.width,2/this.height,1]),this.glCoordMatrix=E,this.pixelMatrix=h.multiply(new Float64Array(16),this.labelPlaneMatrix,this.projMatrix),this._calcFogMatrices(),this._distanceTileDataCache={},E=h.invert(new Float64Array(16),this.pixelMatrix),!E)throw new Error("failed to invert matrix");if(this.pixelMatrixInverse=E,"globe"===this.projection.name||this.mercatorFromTransition){this.globeMatrix=h.calculateGlobeMatrix(this);const _e=[this.globeMatrix[12],this.globeMatrix[13],this.globeMatrix[14]];this.globeCenterInViewSpace=h.transformMat4(_e,_e,b),this.globeRadius=this.worldSize/2/Math.PI-1}else this.globeMatrix=E;this._projMatrixCache={},this._alignedProjMatrixCache={},this._pixelsToTileUnitsCache={}}_calcFogMatrices(){this._fogTileMatrixCache={};const c=this.cameraWorldSizeForFog,p=this.cameraPixelsPerMeter,y=this._camera.position,b=1/this.height/this._pixelsPerMercatorPixel,C=[c,c,p];h.scale$2(C,C,b),h.scale$2(y,y,-1),h.multiply$2(y,y,C);const E=h.create();h.translate(E,E,y),h.scale(E,E,C),this.mercatorFogMatrix=E,this.worldToFogMatrix=this._camera.getWorldToCameraPosition(c,p,b)}_computeCameraPosition(c){const p=(c=c||this.pixelsPerMeter)/this.pixelsPerMeter,y=this._camera.forward(),b=this.point,C=this._mercatorZfromZoom(this._seaLevelZoom?this._seaLevelZoom:this._zoom)*p-c/this.worldSize*this._centerAltitude;return[b.x/this.worldSize-y[0]*C,b.y/this.worldSize-y[1]*C,c/this.worldSize*this._centerAltitude-y[2]*C]}_updateCameraState(){this.height&&(this._camera.setPitchBearing(this._pitch,this.angle),this._camera.position=this._computeCameraPosition())}_translateCameraConstrained(c){const p=this._maxCameraBoundsDistance()*Math.cos(this._pitch),y=this._camera.position[2],b=c[2];let C=1;this.projection.wrap&&(this.center=this.center.wrap()),b>0&&(C=Math.min((p-y)/b,1)),this._camera.position=h.scaleAndAdd([],this._camera.position,c,C),this._updateStateFromCamera()}_updateStateFromCamera(){const c=this._camera.position,p=this._camera.forward(),{pitch:y,bearing:b}=this._camera.getPitchBearing(),C=h.mercatorZfromAltitude(this._centerAltitude,this.center.lat)*this._pixelsPerMercatorPixel,E=this._mercatorZfromZoom(this._maxZoom)*Math.cos(h.degToRad(this._maxPitch)),T=Math.max((c[2]-C)/Math.cos(y),E),k=this._zoomFromMercatorZ(T);h.scaleAndAdd(c,c,p,T),this._pitch=h.clamp(y,h.degToRad(this.minPitch),h.degToRad(this.maxPitch)),this.angle=h.wrap(b,-Math.PI,Math.PI),this._setZoom(h.clamp(k,this._minZoom,this._maxZoom)),this._updateSeaLevelZoom(),this._center=this.coordinateLocation(new h.MercatorCoordinate(c[0],c[1],c[2])),this._unmodified=!1,this._constrain(),this._calcMatrices()}_worldSizeFromZoom(c){return Math.pow(2,c)*this.tileSize}_mercatorZfromZoom(c){return this.cameraToCenterDistance/this._worldSizeFromZoom(c)}_minimumHeightOverTerrain(){const c=Math.min((null!=this._seaLevelZoom?this._seaLevelZoom:this._zoom)+4,this._maxZoom);return this._mercatorZfromZoom(c)}_zoomFromMercatorZ(c){return this.scaleZoom(this.cameraToCenterDistance/(c*this.tileSize))}zoomFromMercatorZAdjusted(c){const p=E=>{const T=this.getCameraToCenterDistance(this.projection,E);return this.scaleZoom(T/(c*this.tileSize))};let y,b=p(this.zoom),C=Math.abs(b-p(b));for(;y!==C;)b=p(b),y=C,C=Math.abs(b-p(b));return b}_terrainEnabled(){return!(!this._elevation||!this.projection.supportsTerrain&&(h.warnOnce("Terrain is not yet supported with alternate projections. Use mercator or globe to enable terrain."),1))}anyCornerOffEdge(c,p){const y=Math.min(c.x,p.x),b=Math.max(c.x,p.x),C=Math.min(c.y,p.y),E=Math.max(c.y,p.y);if(CF||W.y>1)return!0}return!1}isHorizonVisible(){return this.pitch+h.radToDeg(this.fovAboveCenter)>88||this.anyCornerOffEdge(new h.pointGeometry(0,0),new h.pointGeometry(this.width,this.height))}zoomDeltaToMovement(c,p){const y=h.length(h.sub([],this._camera.position,c)),b=this._zoomFromMercatorZ(y)+p;return y-this._mercatorZfromZoom(b)}getCameraPoint(){if("globe"===this.projection.name){const c=function([p,y,b],C){const E=[p,y,b,1];h.transformMat4$1(E,E,C);const T=E[3]=Math.max(E[3],1e-6);return E[0]/=T,E[1]/=T,E[2]/=T,E}([this.globeMatrix[12],this.globeMatrix[13],this.globeMatrix[14]],this.pixelMatrix);return new h.pointGeometry(c[0],c[1])}{const c=Math.tan(this._pitch)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new h.pointGeometry(0,c))}}getCameraToCenterDistance(c,p=this.zoom){const y=Jl(c,p,this.width,this.height,1024),b=c.pixelSpaceConversion(this.center.lat,this.worldSize,y);return.5/Math.tan(.5*this._fov)*this.height*b}getWorldToCameraMatrix(){const c=this._camera.getWorldToCamera(this.worldSize,"meters"===this.projection.zAxisUnit?this.pixelsPerMeter:1);return"globe"===this.projection.name&&h.multiply(c,c,this.globeMatrix),c}}function rh(m,c){let p=!1,y=null;const b=()=>{y=null,p&&(m(),y=setTimeout(b,c),p=!1)};return()=>(p=!0,y||b(),y)}class jt{constructor(c){this._hashName=c&&encodeURIComponent(c),h.bindAll(["_getCurrentHash","_onHashChange","_updateHash"],this),this._updateHash=rh(this._updateHashUnthrottled.bind(this),300)}addTo(c){return this._map=c,h.window.addEventListener("hashchange",this._onHashChange,!1),c.on("moveend",this._updateHash),this}remove(){return this._map?(this._map.off("moveend",this._updateHash),h.window.removeEventListener("hashchange",this._onHashChange,!1),clearTimeout(this._updateHash()),this._map=void 0,this):this}getHashString(){const c=this._map;if(!c)return"";const p=qs(c);if(this._hashName){const y=this._hashName;let b=!1;const C=h.window.location.hash.slice(1).split("&").map(E=>{const T=E.split("=")[0];return T===y?(b=!0,`${T}=${p}`):E}).filter(E=>E);return b||C.push(`${y}=${p}`),`#${C.join("&")}`}return`#${p}`}_getCurrentHash(){const c=h.window.location.hash.replace("#","");if(this._hashName){let p;return c.split("&").map(y=>y.split("=")).forEach(y=>{y[0]===this._hashName&&(p=y)}),(p&&p[1]||"").split("/")}return c.split("/")}_onHashChange(){const c=this._map;if(!c)return!1;const p=this._getCurrentHash();if(p.length>=3&&!p.some(y=>isNaN(y))){const y=c.dragRotate.isEnabled()&&c.touchZoomRotate.isEnabled()?+(p[3]||0):c.getBearing();return c.jumpTo({center:[+p[2],+p[1]],zoom:+p[0],bearing:y,pitch:+(p[4]||0)}),!0}return!1}_updateHashUnthrottled(){const c=h.window.location.href.replace(/(#.+)?$/,this.getHashString());h.window.history.replaceState(h.window.history.state,null,c)}}function qs(m,c){const p=m.getCenter(),y=Math.round(100*m.getZoom())/100,b=Math.ceil((y*Math.LN2+Math.log(512/360/.5))/Math.LN10),C=Math.pow(10,b),E=Math.round(p.lng*C)/C,T=Math.round(p.lat*C)/C,k=m.getBearing(),F=m.getPitch();let O=c?`/${E}/${T}/${y}`:`${y}/${T}/${E}`;return(k||F)&&(O+="/"+Math.round(10*k)/10),F&&(O+=`/${Math.round(F)}`),O}const oh={linearity:.3,easing:h.bezier(0,0,.3,1)},V_=h.extend({deceleration:2500,maxSpeed:1400},oh),G_=h.extend({deceleration:20,maxSpeed:1400},oh),Uu=h.extend({deceleration:1e3,maxSpeed:360},oh),U_=h.extend({deceleration:1e3,maxSpeed:90},oh);class wp{constructor(c){this._map=c,this.clear()}clear(){this._inertiaBuffer=[]}record(c){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:h.exported.now(),settings:c})}_drainInertiaBuffer(){const c=this._inertiaBuffer,p=h.exported.now();for(;c.length>0&&p-c[0].time>160;)c.shift()}_onMoveEnd(c){if(this._drainInertiaBuffer(),this._inertiaBuffer.length<2)return;const p={zoom:0,bearing:0,pitch:0,pan:new h.pointGeometry(0,0),pinchAround:void 0,around:void 0};for(const{settings:C}of this._inertiaBuffer)p.zoom+=C.zoomDelta||0,p.bearing+=C.bearingDelta||0,p.pitch+=C.pitchDelta||0,C.panDelta&&p.pan._add(C.panDelta),C.around&&(p.around=C.around),C.pinchAround&&(p.pinchAround=C.pinchAround);const y=this._inertiaBuffer[this._inertiaBuffer.length-1].time-this._inertiaBuffer[0].time,b={};if(p.pan.mag()){const C=yl(p.pan.mag(),y,h.extend({},V_,c||{}));b.offset=p.pan.mult(C.amount/p.pan.mag()),b.center=this._map.transform.center,ju(b,C)}if(p.zoom){const C=yl(p.zoom,y,G_);b.zoom=this._map.transform.zoom+C.amount,ju(b,C)}if(p.bearing){const C=yl(p.bearing,y,Uu);b.bearing=this._map.transform.bearing+h.clamp(C.amount,-179,179),ju(b,C)}if(p.pitch){const C=yl(p.pitch,y,U_);b.pitch=this._map.transform.pitch+C.amount,ju(b,C)}if(b.zoom||b.bearing){const C=void 0===p.pinchAround?p.around:p.pinchAround;b.around=C?this._map.unproject(C):this._map.getCenter()}return this.clear(),b.noMoveStart=!0,b}}function ju(m,c){(!m.duration||m.durationp.unproject(k)),T=C.reduce((k,F,O,G)=>k.add(F.div(G.length)),new h.pointGeometry(0,0));super(c,{points:C,point:T,lngLats:E,lngLat:p.unproject(T),originalEvent:y}),this._defaultPrevented=!1}}class Hu extends h.Event{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(c,p,y){super(c,{originalEvent:y}),this._defaultPrevented=!1}}class j0{constructor(c,p){this._map=c,this._clickTolerance=p.clickTolerance}reset(){this._mousedownPos=void 0}wheel(c){return this._firePreventable(new Hu(c.type,this._map,c))}mousedown(c,p){return this._mousedownPos=p,this._firePreventable(new Go(c.type,this._map,c))}mouseup(c){this._map.fire(new Go(c.type,this._map,c))}preclick(c){const p=h.extend({},c);p.type="preclick",this._map.fire(new Go(p.type,this._map,p))}click(c,p){this._mousedownPos&&this._mousedownPos.dist(p)>=this._clickTolerance||(this.preclick(c),this._map.fire(new Go(c.type,this._map,c)))}dblclick(c){return this._firePreventable(new Go(c.type,this._map,c))}mouseover(c){this._map.fire(new Go(c.type,this._map,c))}mouseout(c){this._map.fire(new Go(c.type,this._map,c))}touchstart(c){return this._firePreventable(new sh(c.type,this._map,c))}touchmove(c){this._map.fire(new sh(c.type,this._map,c))}touchend(c){this._map.fire(new sh(c.type,this._map,c))}touchcancel(c){this._map.fire(new sh(c.type,this._map,c))}_firePreventable(c){if(this._map.fire(c),c.defaultPrevented)return{}}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class ec{constructor(c){this._map=c}reset(){this._delayContextMenu=!1,this._contextMenuEvent=void 0}mousemove(c){this._map.fire(new Go(c.type,this._map,c))}mousedown(){this._delayContextMenu=!0}mouseup(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new Go("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)}contextmenu(c){this._delayContextMenu?this._contextMenuEvent=c:this._map.fire(new Go(c.type,this._map,c)),this._map.listens("contextmenu")&&c.preventDefault()}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class vm{constructor(c,p){this._map=c,this._el=c.getCanvasContainer(),this._container=c.getContainer(),this._clickTolerance=p.clickTolerance||1}isEnabled(){return!!this._enabled}isActive(){return!!this._active}enable(){this.isEnabled()||(this._enabled=!0)}disable(){this.isEnabled()&&(this._enabled=!1)}mousedown(c,p){this.isEnabled()&&c.shiftKey&&0===c.button&&(At(),this._startPos=this._lastPos=p,this._active=!0)}mousemoveWindow(c,p){if(!this._active)return;const y=p,b=this._startPos,C=this._lastPos;if(!b||!C||C.equals(y)||!this._box&&y.dist(b){this._box&&(this._box.style.transform=`translate(${E}px,${k}px)`,this._box.style.width=T-E+"px",this._box.style.height=F-k+"px")})}mouseupWindow(c,p){if(!this._active)return;const y=this._startPos,b=p;if(y&&0===c.button){if(this.reset(),Xe(),y.x!==b.x||y.y!==b.y)return this._map.fire(new h.Event("boxzoomend",{originalEvent:c})),{cameraAnimation:C=>C.fitScreenCoordinates(y,b,this._map.getBearing(),{linear:!1})};this._fireEvent("boxzoomcancel",c)}}keydown(c){this._active&&27===c.keyCode&&(this.reset(),this._fireEvent("boxzoomcancel",c))}blur(){this.reset()}reset(){this._active=!1,this._container.classList.remove("mapboxgl-crosshair"),this._box&&(this._box.remove(),this._box=null),St(),delete this._startPos,delete this._lastPos}_fireEvent(c,p){return this._map.fire(new h.Event(c,{originalEvent:p}))}}function Hi(m,c){const p={};for(let y=0;ythis.numTouches)&&(this.aborted=!0),this.aborted||(0===this.startTime&&(this.startTime=c.timeStamp),y.length===this.numTouches&&(this.centroid=function(b){const C=new h.pointGeometry(0,0);for(const E of b)C._add(E);return C.div(b.length)}(p),this.touches=Hi(y,p)))}touchmove(c,p,y){if(this.aborted||!this.centroid)return;const b=Hi(y,p);for(const C in this.touches){const T=b[C];(!T||T.dist(this.touches[C])>30)&&(this.aborted=!0)}}touchend(c,p,y){if((!this.centroid||c.timeStamp-this.startTime>500)&&(this.aborted=!0),0===y.length){const b=!this.aborted&&this.centroid;if(this.reset(),b)return b}}}class lh{constructor(c){this.singleTap=new ah(c),this.numTaps=c.numTaps,this.reset()}reset(){this.lastTime=1/0,this.lastTap=void 0,this.count=0,this.singleTap.reset()}touchstart(c,p,y){this.singleTap.touchstart(c,p,y)}touchmove(c,p,y){this.singleTap.touchmove(c,p,y)}touchend(c,p,y){const b=this.singleTap.touchend(c,p,y);if(b){const C=c.timeStamp-this.lastTime<500,E=!this.lastTap||this.lastTap.dist(b)<30;if(C&&E||this.reset(),this.count++,this.lastTime=c.timeStamp,this.lastTap=b,this.count===this.numTaps)return this.reset(),b}}}class bm{constructor(){this._zoomIn=new lh({numTouches:1,numTaps:2}),this._zoomOut=new lh({numTouches:2,numTaps:1}),this.reset()}reset(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()}touchstart(c,p,y){this._zoomIn.touchstart(c,p,y),this._zoomOut.touchstart(c,p,y)}touchmove(c,p,y){this._zoomIn.touchmove(c,p,y),this._zoomOut.touchmove(c,p,y)}touchend(c,p,y){const b=this._zoomIn.touchend(c,p,y),C=this._zoomOut.touchend(c,p,y);return b?(this._active=!0,c.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:E=>E.easeTo({duration:300,zoom:E.getZoom()+1,around:E.unproject(b)},{originalEvent:c})}):C?(this._active=!0,c.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:E=>E.easeTo({duration:300,zoom:E.getZoom()-1,around:E.unproject(C)},{originalEvent:c})}):void 0}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}const $u={0:1,2:2};class Uc{constructor(c){this.reset(),this._clickTolerance=c.clickTolerance||1}blur(){this.reset()}reset(){this._active=!1,this._moved=!1,this._lastPoint=void 0,this._eventButton=void 0}_correctButton(c,p){return!1}_move(c,p){return{}}mousedown(c,p){if(this._lastPoint)return;const y=xe(c);this._correctButton(c,y)&&(this._lastPoint=p,this._eventButton=y)}mousemoveWindow(c,p){const y=this._lastPoint;if(y)if(c.preventDefault(),null!=this._eventButton&&function(b,C){const E=$u[C];return void 0===b.buttons||(b.buttons&E)!==E}(c,this._eventButton))this.reset();else if(this._moved||!(p.dist(y)0&&(this._active=!0);const b=Hi(y,p),C=new h.pointGeometry(0,0),E=new h.pointGeometry(0,0);let T=0;for(const F in b){const O=b[F],G=this._touches[F];G&&(C._add(O),E._add(O.sub(G)),T++,b[F]=O)}if(this._touches=b,T{this._alertContainer.classList.remove("mapboxgl-touch-pan-blocker-show"),this._alertContainer.setAttribute("role","null")},500)}}class qu{constructor(){this.reset()}reset(){this._active=!1,this._firstTwoTouches=void 0}_start(c){}_move(c,p,y){return{}}touchstart(c,p,y){this._firstTwoTouches||y.length<2||(this._firstTwoTouches=[y[0].identifier,y[1].identifier],this._start([p[0],p[1]]))}touchmove(c,p,y){const b=this._firstTwoTouches;if(!b)return;c.preventDefault();const[C,E]=b,T=ga(y,p,C),k=ga(y,p,E);if(!T||!k)return;const F=this._aroundCenter?null:T.add(k).div(2);return this._move([T,k],F,c)}touchend(c,p,y){if(!this._firstTwoTouches)return;const[b,C]=this._firstTwoTouches,E=ga(y,p,b),T=ga(y,p,C);E&&T||(this._active&&Xe(),this.reset())}touchcancel(){this.reset()}enable(c){this._enabled=!0,this._aroundCenter=!!c&&"center"===c.around}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}function ga(m,c,p){for(let y=0;yMath.abs(m.x)}class Mp extends qu{constructor(c){super(),this._map=c}reset(){super.reset(),this._valid=void 0,this._firstMove=void 0,this._lastPoints=void 0}_start(c){this._lastPoints=c,ch(c[0].sub(c[1]))&&(this._valid=!1)}_move(c,p,y){const b=this._lastPoints;if(!b)return;const C=c[0].sub(b[0]),E=c[1].sub(b[1]);return this._map._cooperativeGestures&&!h.isFullscreen()&&y.touches.length<3||(this._valid=this.gestureBeginsVertically(C,E,y.timeStamp),!this._valid)?void 0:(this._lastPoints=c,this._active=!0,{pitchDelta:(C.y+E.y)/2*-.5})}gestureBeginsVertically(c,p,y){if(void 0!==this._valid)return this._valid;const b=c.mag()>=2,C=p.mag()>=2;if(!b&&!C)return;if(!b||!C)return null==this._firstMove&&(this._firstMove=y),y-this._firstMove<100&&void 0;const E=c.y>0==p.y>0;return ch(c)&&ch(p)&&E}}const tc={panStep:100,bearingStep:15,pitchStep:10};class or{constructor(){const c=tc;this._panStep=c.panStep,this._bearingStep=c.bearingStep,this._pitchStep=c.pitchStep,this._rotationDisabled=!1}blur(){this.reset()}reset(){this._active=!1}keydown(c){if(c.altKey||c.ctrlKey||c.metaKey)return;let p=0,y=0,b=0,C=0,E=0;switch(c.keyCode){case 61:case 107:case 171:case 187:p=1;break;case 189:case 109:case 173:p=-1;break;case 37:c.shiftKey?y=-1:(c.preventDefault(),C=-1);break;case 39:c.shiftKey?y=1:(c.preventDefault(),C=1);break;case 38:c.shiftKey?b=1:(c.preventDefault(),E=-1);break;case 40:c.shiftKey?b=-1:(c.preventDefault(),E=1);break;default:return}return this._rotationDisabled&&(y=0,b=0),{cameraAnimation:T=>{const k=T.getZoom();T.easeTo({duration:300,easeId:"keyboardHandler",easing:j_,zoom:p?Math.round(k)+p*(c.shiftKey?2:1):k,bearing:T.getBearing()+y*this._bearingStep,pitch:T.getPitch()+b*this._pitchStep,offset:[-C*this._panStep,-E*this._panStep],center:T.getCenter()},{originalEvent:c})}}}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 j_(m){return m*(2-m)}const jc=4.000244140625;class H_{constructor(c,p){this._map=c,this._el=c.getCanvasContainer(),this._handler=p,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=.0022222222222222222,h.bindAll(["_onTimeout","_addScrollZoomBlocker","_showBlockerAlert"],this)}setZoomRate(c){this._defaultZoomRate=c}setWheelZoomRate(c){this._wheelZoomRate=c}isEnabled(){return!!this._enabled}isActive(){return this._active||void 0!==this._finishTimeout}isZooming(){return!!this._zooming}enable(c){this.isEnabled()||(this._enabled=!0,this._aroundCenter=!!c&&"center"===c.around,this._map._cooperativeGestures&&this._addScrollZoomBlocker())}disable(){this.isEnabled()&&(this._enabled=!1,this._map._cooperativeGestures&&(clearTimeout(this._alertTimer),this._alertContainer.remove()))}wheel(c){if(!this.isEnabled())return;if(this._map._cooperativeGestures){if(!(c.ctrlKey||c.metaKey||this.isZooming()||h.isFullscreen()))return void this._showBlockerAlert();"hidden"!==this._alertContainer.style.visibility&&(this._alertContainer.style.visibility="hidden",clearTimeout(this._alertTimer))}let p=c.deltaMode===h.window.WheelEvent.DOM_DELTA_LINE?40*c.deltaY:c.deltaY;const y=h.exported.now(),b=y-(this._lastWheelEventTime||0);this._lastWheelEventTime=y,0!==p&&p%jc==0?this._type="wheel":0!==p&&Math.abs(p)<4?this._type="trackpad":b>400?(this._type=null,this._lastValue=p,this._timeout=setTimeout(this._onTimeout,40,c)):this._type||(this._type=Math.abs(b*p)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,p+=this._lastValue)),c.shiftKey&&p&&(p/=4),this._type&&(this._lastWheelEvent=c,this._delta-=p,this._active||this._start(c)),c.preventDefault()}_onTimeout(c){this._type="wheel",this._delta-=this._lastValue,this._active||this._start(c)}_start(c){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 p=Ee(this._el,c);this._aroundPoint=this._aroundCenter?this._map.transform.centerPoint:p,this._aroundCoord=this._map.transform.pointCoordinate3D(this._aroundPoint),this._targetZoom=void 0,this._frameId||(this._frameId=!0,this._handler._triggerRenderFrame())}renderFrame(){if(!this._frameId||(this._frameId=null,!this.isActive()))return;const c=this._map.transform;"wheel"===this._type&&c.projection.wrap&&(c._center.lng>=180||c._center.lng<=-180)&&(this._prevEase=null,this._easing=null,this._lastWheelEvent=null,this._lastWheelEventTime=0);const p=()=>c._terrainEnabled()&&this._aroundCoord?c.computeZoomRelativeTo(this._aroundCoord):c.zoom;if(0!==this._delta){const k="wheel"===this._type&&Math.abs(this._delta)>jc?this._wheelZoomRate:this._defaultZoomRate;let F=2/(1+Math.exp(-Math.abs(this._delta*k)));this._delta<0&&0!==F&&(F=1/F);const O=p(),G=Math.pow(2,O),W="number"==typeof this._targetZoom?c.zoomScale(this._targetZoom):G;this._targetZoom=Math.min(c.maxZoom,Math.max(c.minZoom,c.scaleZoom(W*F))),"wheel"===this._type&&(this._startZoom=O,this._easing=this._smoothOutEasing(200)),this._delta=0}const y="number"==typeof this._targetZoom?this._targetZoom:p(),b=this._startZoom,C=this._easing;let E,T=!1;if("wheel"===this._type&&b&&C){const k=Math.min((h.exported.now()-this._lastWheelEventTime)/200,1),F=C(k);E=h.number(b,y,F),k<1?this._frameId||(this._frameId=!0):T=!0}else E=y,T=!0;return this._active=!0,T&&(this._active=!1,this._finishTimeout=setTimeout(()=>{this._zooming=!1,this._handler._triggerRenderFrame(),delete this._targetZoom,delete this._finishTimeout},200)),{noInertia:!0,needsRenderFrame:!T,zoomDelta:E-p(),around:this._aroundPoint,aroundCoord:this._aroundCoord,originalEvent:this._lastWheelEvent}}_smoothOutEasing(c){let p=h.ease;if(this._prevEase){const y=this._prevEase,b=(h.exported.now()-y.start)/y.duration,C=y.easing(b+.01)-y.easing(b),E=.27/Math.sqrt(C*C+1e-4)*.01,T=Math.sqrt(.0729-E*E);p=h.bezier(E,T,.25,1)}return this._prevEase={start:h.exported.now(),duration:c,easing:p},p}blur(){this.reset()}reset(){this._active=!1}_addScrollZoomBlocker(){this._map&&!this._alertContainer&&(this._alertContainer=Ie("div","mapboxgl-scroll-zoom-blocker",this._map._container),this._alertContainer.textContent=/(Mac|iPad)/i.test(h.window.navigator.userAgent)?this._map._getUIString("ScrollZoomBlocker.CmdMessage"):this._map._getUIString("ScrollZoomBlocker.CtrlMessage"),this._alertContainer.style.fontSize=`${Math.max(10,Math.min(24,Math.floor(.05*this._el.clientWidth)))}px`)}_showBlockerAlert(){this._alertContainer.style.visibility="visible",this._alertContainer.classList.add("mapboxgl-scroll-zoom-blocker-show"),this._alertContainer.setAttribute("role","alert"),clearTimeout(this._alertTimer),this._alertTimer=setTimeout(()=>{this._alertContainer.classList.remove("mapboxgl-scroll-zoom-blocker-show"),this._alertContainer.setAttribute("role","null")},200)}}class vl{constructor(c,p){this._clickZoom=c,this._tapZoom=p}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 _a{constructor(){this.reset()}reset(){this._active=!1}blur(){this.reset()}dblclick(c,p){return c.preventDefault(),{cameraAnimation:y=>{y.easeTo({duration:300,zoom:y.getZoom()+(c.shiftKey?-1:1),around:y.unproject(p)},{originalEvent:c})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class uh{constructor(){this._tap=new lh({numTouches:1,numTaps:1}),this.reset()}reset(){this._active=!1,this._swipePoint=void 0,this._swipeTouch=0,this._tapTime=0,this._tap.reset()}touchstart(c,p,y){this._swipePoint||(this._tapTime&&c.timeStamp-this._tapTime>500&&this.reset(),this._tapTime?y.length>0&&(this._swipePoint=p[0],this._swipeTouch=y[0].identifier):this._tap.touchstart(c,p,y))}touchmove(c,p,y){if(this._tapTime){if(this._swipePoint){if(y[0].identifier!==this._swipeTouch)return;const b=p[0],C=b.y-this._swipePoint.y;return this._swipePoint=b,c.preventDefault(),this._active=!0,{zoomDelta:C/128}}}else this._tap.touchmove(c,p,y)}touchend(c,p,y){this._tapTime?this._swipePoint&&0===y.length&&this.reset():this._tap.touchend(c,p,y)&&(this._tapTime=c.timeStamp)}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class zn{constructor(c,p,y){this._el=c,this._mousePan=p,this._touchPan=y}enable(c){this._inertiaOptions=c||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("mapboxgl-touch-drag-pan")}disable(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("mapboxgl-touch-drag-pan")}isEnabled(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()}isActive(){return this._mousePan.isActive()||this._touchPan.isActive()}}class Zs{constructor(c,p,y){this._pitchWithRotate=c.pitchWithRotate,this._mouseRotate=p,this._mousePitch=y}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 Sp{constructor(c,p,y,b){this._el=c,this._touchZoom=p,this._touchRotate=y,this._tapDragZoom=b,this._rotationDisabled=!1,this._enabled=!0}enable(c){this._touchZoom.enable(c),this._rotationDisabled||this._touchRotate.enable(c),this._tapDragZoom.enable(),this._el.classList.add("mapboxgl-touch-zoom-rotate")}disable(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("mapboxgl-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()}}const Wt=m=>m.zoom||m.drag||m.pitch||m.rotate;class Cm extends h.Event{}class Mm{constructor(){this.constants=[1,1,.01],this.radius=0}setup(c,p){const y=h.sub([],p,c);this.radius=h.length(y[2]<0?h.div([],y,this.constants):[y[0],y[1],0])}projectRay(c){h.div(c,c,this.constants),h.normalize(c,c),h.mul$1(c,c,this.constants);const p=h.scale$2([],c,this.radius);if(p[2]>0){const y=h.scale$2([],[0,0,1],h.dot(p,[0,0,1])),b=h.scale$2([],h.normalize([],[p[0],p[1],0]),this.radius),C=h.add([],p,h.scale$2([],h.sub([],h.add([],b,y),p),2));p[0]=C[0],p[1]=C[1]}return p}}function Ua(m){return m.panDelta&&m.panDelta.mag()||m.zoomDelta||m.bearingDelta||m.pitchDelta}class Xu{constructor(c,p){this._map=c,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new wp(c),this._bearingSnap=p.bearingSnap,this._previousActiveHandlers={},this._trackingEllipsoid=new Mm,this._dragOrigin=null,this._eventsInProgress={},this._addDefaultHandlers(p),h.bindAll(["handleEvent","handleWindowEvent"],this);const y=this._el;this._listeners=[[y,"touchstart",{passive:!0}],[y,"touchmove",{passive:!1}],[y,"touchend",void 0],[y,"touchcancel",void 0],[y,"mousedown",void 0],[y,"mousemove",void 0],[y,"mouseup",void 0],[h.window.document,"mousemove",{capture:!0}],[h.window.document,"mouseup",void 0],[y,"mouseover",void 0],[y,"mouseout",void 0],[y,"dblclick",void 0],[y,"click",void 0],[y,"keydown",{capture:!1}],[y,"keyup",void 0],[y,"wheel",{passive:!1}],[y,"contextmenu",void 0],[h.window,"blur",void 0]];for(const[b,C,E]of this._listeners)b.addEventListener(C,b===h.window.document?this.handleWindowEvent:this.handleEvent,E)}destroy(){for(const[c,p,y]of this._listeners)c.removeEventListener(p,c===h.window.document?this.handleWindowEvent:this.handleEvent,y)}_addDefaultHandlers(c){const p=this._map,y=p.getCanvasContainer();this._add("mapEvent",new j0(p,c));const b=p.boxZoom=new vm(p,c);this._add("boxZoom",b);const C=new bm,E=new _a;p.doubleClickZoom=new vl(E,C),this._add("tapZoom",C),this._add("clickZoom",E);const T=new uh;this._add("tapDragZoom",T);const k=p.touchPitch=new Mp(p);this._add("touchPitch",k);const F=new Wu(c),O=new Cp(c);p.dragRotate=new Zs(c,F,O),this._add("mouseRotate",F,["mousePitch"]),this._add("mousePitch",O,["mouseRotate"]);const G=new xm(c),W=new ms(p,c);p.dragPan=new zn(y,G,W),this._add("mousePan",G),this._add("touchPan",W,["touchZoom","touchRotate"]);const Q=new ts,K=new wm;p.touchZoomRotate=new Sp(y,K,Q,T),this._add("touchRotate",Q,["touchPan","touchZoom"]),this._add("touchZoom",K,["touchPan","touchRotate"]),this._add("blockableMapEvent",new ec(p));const ne=p.scrollZoom=new H_(p,this);this._add("scrollZoom",ne,["mousePan"]);const q=p.keyboard=new or;this._add("keyboard",q);for(const X of["boxZoom","doubleClickZoom","tapDragZoom","touchPitch","dragRotate","dragPan","touchZoomRotate","scrollZoom","keyboard"])c.interactive&&c[X]&&p[X].enable(c[X])}_add(c,p,y){this._handlers.push({handlerName:c,handler:p,allowed:y}),this._handlersById[c]=p}stop(c){if(!this._updatingCamera){for(const{handler:p}of this._handlers)p.reset();this._inertia.clear(),this._fireEvents({},{},c),this._changes=[]}}isActive(){for(const{handler:c}of this._handlers)if(c.isActive())return!0;return!1}isZooming(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()}isRotating(){return!!this._eventsInProgress.rotate}isMoving(){return!!Wt(this._eventsInProgress)||this.isZooming()}_isDragging(){return!!this._eventsInProgress.drag}_blockedByActive(c,p,y){for(const b in c)if(b!==y&&(!p||p.indexOf(b)<0))return!0;return!1}handleWindowEvent(c){this.handleEvent(c,`${c.type}Window`)}_getMapTouches(c){const p=[];for(const y of c)this._el.contains(y.target)&&p.push(y);return p}handleEvent(c,p){this._updatingCamera=!0;const y="renderFrame"===c.type,b=y?void 0:c,C={needsRenderFrame:!1},E={},T={},k=c.touches?this._getMapTouches(c.touches):void 0,F=k?Ne(this._el,k):y?void 0:Ee(this._el,c);for(const{handlerName:W,handler:Q,allowed:K}of this._handlers){if(!Q.isEnabled())continue;let ne;this._blockedByActive(T,K,W)?Q.reset():Q[p||c.type]&&(ne=Q[p||c.type](c,F,k),this.mergeHandlerResult(C,E,ne,W,b),ne&&ne.needsRenderFrame&&this._triggerRenderFrame()),(ne||Q.isActive())&&(T[W]=Q)}const O={};for(const W in this._previousActiveHandlers)T[W]||(O[W]=b);this._previousActiveHandlers=T,(Object.keys(O).length||Ua(C))&&(this._changes.push([C,E,O]),this._triggerRenderFrame()),(Object.keys(T).length||Ua(C))&&this._map._stop(!0),this._updatingCamera=!1;const{cameraAnimation:G}=C;G&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],G(this._map))}mergeHandlerResult(c,p,y,b,C){if(!y)return;h.extend(c,y);const E={handlerName:b,originalEvent:y.originalEvent||C};void 0!==y.zoomDelta&&(p.zoom=E),void 0!==y.panDelta&&(p.drag=E),void 0!==y.pitchDelta&&(p.pitch=E),void 0!==y.bearingDelta&&(p.rotate=E)}_applyChanges(){const c={},p={},y={};for(const[b,C,E]of this._changes)b.panDelta&&(c.panDelta=(c.panDelta||new h.pointGeometry(0,0))._add(b.panDelta)),b.zoomDelta&&(c.zoomDelta=(c.zoomDelta||0)+b.zoomDelta),b.bearingDelta&&(c.bearingDelta=(c.bearingDelta||0)+b.bearingDelta),b.pitchDelta&&(c.pitchDelta=(c.pitchDelta||0)+b.pitchDelta),void 0!==b.around&&(c.around=b.around),void 0!==b.aroundCoord&&(c.aroundCoord=b.aroundCoord),void 0!==b.pinchAround&&(c.pinchAround=b.pinchAround),b.noInertia&&(c.noInertia=b.noInertia),h.extend(p,C),h.extend(y,E);this._updateMapTransform(c,p,y),this._changes=[]}_updateMapTransform(c,p,y){const b=this._map,C=b.transform,E=ee=>[ee.x,ee.y,ee.z];if((ee=>{const te=this._eventsInProgress.drag;return te&&!this._handlersById[te.handlerName].isActive()})()&&!Ua(c)){const ee=C.zoom;C.cameraElevationReference="sea",C.recenterOnTerrain(),C.cameraElevationReference="ground",ee!==C.zoom&&this._map._update(!0)}if(C._isCameraConstrained&&b._stop(!0),!Ua(c))return void this._fireEvents(p,y,!0);let{panDelta:T,zoomDelta:k,bearingDelta:F,pitchDelta:O,around:G,aroundCoord:W,pinchAround:Q}=c;C._isCameraConstrained&&(k>0&&(k=0),C._isCameraConstrained=!1),void 0!==Q&&(G=Q),(ee=>p.drag&&!this._eventsInProgress.drag)()&&G&&(this._dragOrigin=E(C.pointCoordinate3D(G)),this._trackingEllipsoid.setup(C._camera.position,this._dragOrigin)),C.cameraElevationReference="sea",b._stop(!0),G=G||b.transform.centerPoint,F&&(C.bearing+=F),O&&(C.pitch+=O),C._updateCameraState();const K=[0,0,0];if(T)if("mercator"===C.projection.name){const ee=this._trackingEllipsoid.projectRay(C.screenPointToMercatorRay(G).dir),te=this._trackingEllipsoid.projectRay(C.screenPointToMercatorRay(G.sub(T)).dir);K[0]=te[0]-ee[0],K[1]=te[1]-ee[1]}else{const ee=C.pointCoordinate(G);if("globe"===C.projection.name){T=T.rotate(-C.angle);const te=C._pixelsPerMercatorPixel/C.worldSize;K[0]=-T.x*h.mercatorScale(h.latFromMercatorY(ee.y))*te,K[1]=-T.y*h.mercatorScale(C.center.lat)*te}else{const te=C.pointCoordinate(G.sub(T));ee&&te&&(K[0]=te.x-ee.x,K[1]=te.y-ee.y)}}const ne=C.zoom,q=[0,0,0];if(k){const ee=E(W||C.pointCoordinate3D(G)),te={dir:h.normalize([],h.sub([],ee,C._camera.position))};if(te.dir[2]<0){const ce=C.zoomDeltaToMovement(ee,k);h.scale$2(q,te.dir,ce)}}const X=h.add(K,K,q);C._translateCameraConstrained(X),k&&Math.abs(C.zoom-ne)>1e-4&&C.recenterOnTerrain(),C.cameraElevationReference="ground",this._map._update(),c.noInertia||this._inertia.record(c),this._fireEvents(p,y,!0)}_fireEvents(c,p,y){const b=Wt(this._eventsInProgress),C=Wt(c),E={};for(const O in c){const{originalEvent:G}=c[O];this._eventsInProgress[O]||(E[`${O}start`]=G),this._eventsInProgress[O]=c[O]}!b&&C&&this._fireEvent("movestart",C.originalEvent);for(const O in E)this._fireEvent(O,E[O]);C&&this._fireEvent("move",C.originalEvent);for(const O in c){const{originalEvent:G}=c[O];this._fireEvent(O,G)}const T={};let k;for(const O in this._eventsInProgress){const{handlerName:G,originalEvent:W}=this._eventsInProgress[O];this._handlersById[G].isActive()||(delete this._eventsInProgress[O],k=p[G]||W,T[`${O}end`]=k)}for(const O in T)this._fireEvent(O,T[O]);const F=Wt(this._eventsInProgress);if(y&&(b||C)&&!F){this._updatingCamera=!0;const O=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),G=W=>0!==W&&-this._bearingSnap{this._frameId=void 0,this.handleEvent(new Cm("renderFrame",{timeStamp:c})),this._applyChanges()})}_triggerRenderFrame(){void 0===this._frameId&&(this._frameId=this._requestFrame())}}const Dp="map.setFreeCameraOptions(...) and map.getFreeCameraOptions() are not yet supported for non-mercator projections.";class Dt extends h.Evented{constructor(c,p){super(),this._moving=!1,this._zooming=!1,this.transform=c,this._bearingSnap=p.bearingSnap,h.bindAll(["_renderFrameCallback"],this)}getCenter(){return new h.LngLat(this.transform.center.lng,this.transform.center.lat)}setCenter(c,p){return this.jumpTo({center:c},p)}panBy(c,p,y){return c=h.pointGeometry.convert(c).mult(-1),this.panTo(this.transform.center,h.extend({offset:c},p),y)}panTo(c,p,y){return this.easeTo(h.extend({center:c},p),y)}getZoom(){return this.transform.zoom}setZoom(c,p){return this.jumpTo({zoom:c},p),this}zoomTo(c,p,y){return this.easeTo(h.extend({zoom:c},p),y)}zoomIn(c,p){return this.zoomTo(this.getZoom()+1,c,p),this}zoomOut(c,p){return this.zoomTo(this.getZoom()-1,c,p),this}getBearing(){return this.transform.bearing}setBearing(c,p){return this.jumpTo({bearing:c},p),this}getPadding(){return this.transform.padding}setPadding(c,p){return this.jumpTo({padding:c},p),this}rotateTo(c,p,y){return this.easeTo(h.extend({bearing:c},p),y)}resetNorth(c,p){return this.rotateTo(0,h.extend({duration:1e3},c),p),this}resetNorthPitch(c,p){return this.easeTo(h.extend({bearing:0,pitch:0,duration:1e3},c),p),this}snapToNorth(c,p){return Math.abs(this.getBearing())c.aspect?y/(2*Math.tan(.5*c.fovX)*c.aspect):b/(2*Math.tan(.5*c.fovY)*c.aspect)}_cameraForBoundsOnGlobe(c,p,y,b,C,E){const T=c.clone(),k=this._extendCameraOptions(E);T.bearing=b,T.pitch=C;const F=h.LngLat.convert(p),O=h.LngLat.convert(y),G=.5*(F.lat+O.lat),W=.5*(F.lng+O.lng),Q=h.latLngToECEF(G,W),K=h.normalize([],Q),ne=h.normalize([],h.cross([],K,[0,1,0])),q=h.cross([],ne,K),X=[ne[0],ne[1],ne[2],0,q[0],q[1],q[2],0,K[0],K[1],K[2],0,0,0,0,1],ee=[Q,h.latLngToECEF(F.lat,F.lng),h.latLngToECEF(O.lat,F.lng),h.latLngToECEF(O.lat,O.lng),h.latLngToECEF(F.lat,O.lng),h.latLngToECEF(G,F.lng),h.latLngToECEF(G,O.lng),h.latLngToECEF(F.lat,W),h.latLngToECEF(O.lat,W)];let te=h.Aabb.fromPoints(ee.map(ke=>[h.dot(ne,ke),h.dot(q,ke),h.dot(K,ke)]));const ce=h.transformMat4([],te.center,X);0===h.squaredLength(ce)&&h.set(ce,0,0,1),h.normalize(ce,ce),h.scale$2(ce,ce,h.GLOBE_RADIUS),T.center=h.ecefToLatLng(ce);const _e=T.getWorldToCameraMatrix(),ge=h.invert(new Float64Array(16),_e);te=h.Aabb.applyTransform(te,h.multiply([],_e,X)),h.transformMat4(ce,ce,_e);const Me=.5*(te.max[2]-te.min[2]),We=this._minimumAABBFrustumDistance(T,te),ze=h.scale$2([],[0,0,1],Me),Te=h.add(ze,ce,ze),Ct=We+(0===T.pitch?0:h.distance(ce,Te)),Le=T.globeCenterInViewSpace,st=h.sub([],ce,[Le[0],Le[1],Le[2]]);h.normalize(st,st),h.scale$2(st,st,Ct);const Ye=h.add([],ce,st);h.transformMat4(Ye,Ye,ge);const bt=h.earthRadius/h.GLOBE_RADIUS,Ke=h.length(Ye),gt=h.mercatorZfromAltitude(Ke*bt-h.earthRadius,0),Tt=Math.min(T.zoomFromMercatorZAdjusted(gt),k.maxZoom);return Tt>.5*(h.GLOBE_ZOOM_THRESHOLD_MIN+h.GLOBE_ZOOM_THRESHOLD_MAX)?(T.setProjection({name:"mercator"}),T.zoom=Tt,this._cameraForBounds(T,p,y,b,C,E)):{center:T.center,zoom:Tt,bearing:b,pitch:C}}queryTerrainElevation(c,p){const y=this.transform.elevation;return y?(p=h.extend({},{exaggerated:!0},p),y.getAtPoint(h.MercatorCoordinate.fromLngLat(c),null,p.exaggerated)):null}_cameraForBounds(c,p,y,b,C,E){if("globe"===c.projection.name)return this._cameraForBoundsOnGlobe(c,p,y,b,C,E);const T=c.clone(),k=this._extendCameraOptions(E),F=T.padding;T.bearing=b,T.pitch=C;const O=h.LngLat.convert(p),G=h.LngLat.convert(y),W=new h.LngLat(O.lng,G.lat),Q=new h.LngLat(G.lng,O.lat),K=T.project(O),ne=T.project(G),q=this.queryTerrainElevation(O),X=this.queryTerrainElevation(G),ee=this.queryTerrainElevation(W),te=this.queryTerrainElevation(Q),ce=[[K.x,K.y,Math.min(q||0,X||0,ee||0,te||0)],[ne.x,ne.y,Math.max(q||0,X||0,ee||0,te||0)]];let _e=h.Aabb.fromPoints(ce);const ge=T.getWorldToCameraMatrix(),Me=h.invert(new Float64Array(16),ge);_e=h.Aabb.applyTransform(_e,ge);const We=h.sub([],_e.max,_e.min),ze=F.left||0,Te=F.right||0,Ct=F.bottom||0,Le=F.top||0,{left:st,right:Ye,top:bt,bottom:Ke}=k.padding,gt=.5*(ze+Te),Tt=.5*(Le+Ct),ke=Math.min(T.scaleZoom(T.scale*Math.min((T.width-(ze+Te+st+Ye))/We[0],(T.height-(Ct+Le+Ke+bt))/We[1])),k.maxZoom),Qe=T.scale/T.zoomScale(ke);_e=new h.Aabb([_e.min[0]-(st+gt)*Qe,_e.min[1]-(Ke+Tt)*Qe,_e.min[2]],[_e.max[0]+(Ye+gt)*Qe,_e.max[1]+(bt+Tt)*Qe,_e.max[2]]);const Qt=.5*We[2],hn=this._minimumAABBFrustumDistance(T,_e),tn=[0,0,1,0];h.transformMat4$1(tn,tn,ge),h.normalize$2(tn,tn);const Sn=h.scale$2([],tn,hn+Qt),Un=h.add([],_e.center,Sn),un=("number"==typeof k.offset.x&&"number"==typeof k.offset.y?new h.pointGeometry(k.offset.x,k.offset.y):h.pointGeometry.convert(k.offset)).rotate(-h.degToRad(b));_e.center[0]-=un.x*Qe,_e.center[1]+=un.y*Qe,h.transformMat4(_e.center,_e.center,Me),h.transformMat4(Un,Un,Me);const Ht=[_e.center[0],_e.center[1],Un[2]*T.pixelsPerMeter];h.scale$2(Ht,Ht,1/T.worldSize);const gi=h.lngFromMercatorX(Ht[0]),_i=h.latFromMercatorY(Ht[1]),zi=Math.min(T._zoomFromMercatorZ(Ht[2]),k.maxZoom),xi=new h.LngLat(gi,_i);return T.mercatorFromTransition&&zi<.5*(h.GLOBE_ZOOM_THRESHOLD_MIN+h.GLOBE_ZOOM_THRESHOLD_MAX)?(T.setProjection({name:"globe"}),T.zoom=zi,this._cameraForBounds(T,p,y,b,C,E)):{center:xi,zoom:zi,bearing:b,pitch:C}}fitBounds(c,p,y){const b=this.cameraForBounds(c,p);return this._fitInternal(b,p,y)}fitScreenCoordinates(c,p,y,b,C){const E=h.pointGeometry.convert(c),T=h.pointGeometry.convert(p),k=new h.pointGeometry(Math.min(E.x,T.x),Math.min(E.y,T.y)),F=new h.pointGeometry(Math.max(E.x,T.x),Math.max(E.y,T.y));if("mercator"===this.transform.projection.name&&this.transform.anyCornerOffEdge(E,T))return this;const O=this.transform.pointLocation3D(k),G=this.transform.pointLocation3D(F),W=this.transform.pointLocation3D(new h.pointGeometry(k.x,F.y)),Q=this.transform.pointLocation3D(new h.pointGeometry(F.x,k.y)),K=[Math.min(O.lng,G.lng,W.lng,Q.lng),Math.min(O.lat,G.lat,W.lat,Q.lat)],ne=[Math.max(O.lng,G.lng,W.lng,Q.lng),Math.max(O.lat,G.lat,W.lat,Q.lat)],q=b&&b.pitch?b.pitch:this.getPitch(),X=this._cameraForBounds(this.transform,K,ne,y,q,b);return this._fitInternal(X,b,C)}_fitInternal(c,p,y){return c?(delete(p=h.extend(c,p)).padding,p.linear?this.easeTo(p,y):this.flyTo(p,y)):this}jumpTo(c,p){this.stop();const y=c.preloadOnly?this.transform.clone():this.transform;let b=!1,C=!1,E=!1;return"zoom"in c&&y.zoom!==+c.zoom&&(b=!0,y.zoom=+c.zoom),void 0!==c.center&&(y.center=h.LngLat.convert(c.center)),"bearing"in c&&y.bearing!==+c.bearing&&(C=!0,y.bearing=+c.bearing),"pitch"in c&&y.pitch!==+c.pitch&&(E=!0,y.pitch=+c.pitch),null==c.padding||y.isPaddingEqual(c.padding)||(y.padding=c.padding),c.preloadOnly?(this._preloadTiles(y),this):(this.fire(new h.Event("movestart",p)).fire(new h.Event("move",p)),b&&this.fire(new h.Event("zoomstart",p)).fire(new h.Event("zoom",p)).fire(new h.Event("zoomend",p)),C&&this.fire(new h.Event("rotatestart",p)).fire(new h.Event("rotate",p)).fire(new h.Event("rotateend",p)),E&&this.fire(new h.Event("pitchstart",p)).fire(new h.Event("pitch",p)).fire(new h.Event("pitchend",p)),this.fire(new h.Event("moveend",p)))}getFreeCameraOptions(){return this.transform.projection.supportsFreeCamera||h.warnOnce(Dp),this.transform.getFreeCameraOptions()}setFreeCameraOptions(c,p){const y=this.transform;if(!y.projection.supportsFreeCamera)return h.warnOnce(Dp),this;this.stop();const b=y.zoom,C=y.pitch,E=y.bearing;y.setFreeCameraOptions(c);const T=b!==y.zoom,k=C!==y.pitch,F=E!==y.bearing;return this.fire(new h.Event("movestart",p)).fire(new h.Event("move",p)),T&&this.fire(new h.Event("zoomstart",p)).fire(new h.Event("zoom",p)).fire(new h.Event("zoomend",p)),F&&this.fire(new h.Event("rotatestart",p)).fire(new h.Event("rotate",p)).fire(new h.Event("rotateend",p)),k&&this.fire(new h.Event("pitchstart",p)).fire(new h.Event("pitch",p)).fire(new h.Event("pitchend",p)),this.fire(new h.Event("moveend",p)),this}easeTo(c,p){this._stop(!1,c.easeId),(!1===(c=h.extend({offset:[0,0],duration:500,easing:h.ease},c)).animate||!c.essential&&h.exported.prefersReducedMotion)&&(c.duration=0);const y=this.transform,b=this.getZoom(),C=this.getBearing(),E=this.getPitch(),T=this.getPadding(),k="zoom"in c?+c.zoom:b,F="bearing"in c?this._normalizeBearing(c.bearing,C):C,O="pitch"in c?+c.pitch:E,G="padding"in c?c.padding:y.padding,W=h.pointGeometry.convert(c.offset);let Q,K,ne;if("globe"===y.projection.name){const ze=h.MercatorCoordinate.fromLngLat(y.center),Te=W.rotate(-y.angle);ze.x+=Te.x/y.worldSize,ze.y+=Te.y/y.worldSize;const Ct=ze.toLngLat(),Le=h.LngLat.convert(c.center||Ct);this._normalizeCenter(Le),Q=y.centerPoint.add(Te),K=new h.pointGeometry(ze.x,ze.y).mult(y.worldSize),ne=new h.pointGeometry(h.mercatorXfromLng(Le.lng),h.mercatorYfromLat(Le.lat)).mult(y.worldSize).sub(K)}else{Q=y.centerPoint.add(W);const ze=y.pointLocation(Q),Te=h.LngLat.convert(c.center||ze);this._normalizeCenter(Te),K=y.project(ze),ne=y.project(Te).sub(K)}const q=y.zoomScale(k-b);let X,ee;c.around&&(X=h.LngLat.convert(c.around),ee=y.locationPoint(X));const te=this._zooming||k!==b,ce=this._rotating||C!==F,_e=this._pitching||O!==E,ge=!y.isPaddingEqual(G),Me=ze=>Te=>{if(te&&(ze.zoom=h.number(b,k,Te)),ce&&(ze.bearing=h.number(C,F,Te)),_e&&(ze.pitch=h.number(E,O,Te)),ge&&(ze.interpolatePadding(T,G,Te),Q=ze.centerPoint.add(W)),X)ze.setLocationAtPoint(X,ee);else{const Ct=ze.zoomScale(ze.zoom-b),Le=k>b?Math.min(2,q):Math.max(.5,q),st=Math.pow(Le,1-Te),Ye=ze.unproject(K.add(ne.mult(Te*st)).mult(Ct));ze.setLocationAtPoint(ze.renderWorldCopies?Ye.wrap():Ye,Q)}return c.preloadOnly||this._fireMoveEvents(p),ze};if(c.preloadOnly){const ze=this._emulate(Me,c.duration,y);return this._preloadTiles(ze),this}const We={moving:this._moving,zooming:this._zooming,rotating:this._rotating,pitching:this._pitching};return this._zooming=te,this._rotating=ce,this._pitching=_e,this._padding=ge,this._easeId=c.easeId,this._prepareEase(p,c.noMoveStart,We),this._ease(Me(y),ze=>{y.recenterOnTerrain(),this._afterEase(p,ze)},c),this}_prepareEase(c,p,y={}){this._moving=!0,this.transform.cameraElevationReference="sea",p||y.moving||this.fire(new h.Event("movestart",c)),this._zooming&&!y.zooming&&this.fire(new h.Event("zoomstart",c)),this._rotating&&!y.rotating&&this.fire(new h.Event("rotatestart",c)),this._pitching&&!y.pitching&&this.fire(new h.Event("pitchstart",c))}_fireMoveEvents(c){this.fire(new h.Event("move",c)),this._zooming&&this.fire(new h.Event("zoom",c)),this._rotating&&this.fire(new h.Event("rotate",c)),this._pitching&&this.fire(new h.Event("pitch",c))}_afterEase(c,p){if(this._easeId&&p&&this._easeId===p)return;this._easeId=void 0,this.transform.cameraElevationReference="ground";const y=this._zooming,b=this._rotating,C=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,y&&this.fire(new h.Event("zoomend",c)),b&&this.fire(new h.Event("rotateend",c)),C&&this.fire(new h.Event("pitchend",c)),this.fire(new h.Event("moveend",c))}flyTo(c,p){if(!c.essential&&h.exported.prefersReducedMotion){const ke=h.pick(c,["center","zoom","bearing","pitch","around"]);return this.jumpTo(ke,p)}this.stop(),c=h.extend({offset:[0,0],speed:1.2,curve:1.42,easing:h.ease},c);const y=this.transform,b=this.getZoom(),C=this.getBearing(),E=this.getPitch(),T=this.getPadding(),k="zoom"in c?h.clamp(+c.zoom,y.minZoom,y.maxZoom):b,F="bearing"in c?this._normalizeBearing(c.bearing,C):C,O="pitch"in c?+c.pitch:E,G="padding"in c?c.padding:y.padding,W=y.zoomScale(k-b),Q=h.pointGeometry.convert(c.offset);let K=y.centerPoint.add(Q);const ne=y.pointLocation(K),q=h.LngLat.convert(c.center||ne);this._normalizeCenter(q);const X=y.project(ne),ee=y.project(q).sub(X);let te=c.curve;const ce=Math.max(y.width,y.height),_e=ce/W,ge=ee.mag();if("minZoom"in c){const ke=h.clamp(Math.min(c.minZoom,b,k),y.minZoom,y.maxZoom),Qe=ce/y.zoomScale(ke-b);te=Math.sqrt(Qe/ge*2)}const Me=te*te;function We(ke){const Qe=(_e*_e-ce*ce+(ke?-1:1)*Me*Me*ge*ge)/(2*(ke?_e:ce)*Me*ge);return Math.log(Math.sqrt(Qe*Qe+1)-Qe)}function ze(ke){return(Math.exp(ke)-Math.exp(-ke))/2}function Te(ke){return(Math.exp(ke)+Math.exp(-ke))/2}const Ct=We(0);let Le=function(ke){return Te(Ct)/Te(Ct+te*ke)},st=function(ke){return ce*((Te(Ct)*(ze(Qe=Ct+te*ke)/Te(Qe))-ze(Ct))/Me)/ge;var Qe},Ye=(We(1)-Ct)/te;if(Math.abs(ge)<1e-6||!isFinite(Ye)){if(Math.abs(ce-_e)<1e-6)return this.easeTo(c,p);const ke=_ec.maxDuration&&(c.duration=0);const bt=C!==F,Ke=O!==E,gt=!y.isPaddingEqual(G),Tt=ke=>Qe=>{const Qt=Qe*Ye,hn=1/Le(Qt);ke.zoom=1===Qe?k:b+ke.scaleZoom(hn),bt&&(ke.bearing=h.number(C,F,Qe)),Ke&&(ke.pitch=h.number(E,O,Qe)),gt&&(ke.interpolatePadding(T,G,Qe),K=ke.centerPoint.add(Q));const tn=1===Qe?q:ke.unproject(X.add(ee.mult(st(Qt))).mult(hn));return ke.setLocationAtPoint(ke.renderWorldCopies?tn.wrap():tn,K),ke._updateCameraOnTerrain(),c.preloadOnly||this._fireMoveEvents(p),ke};if(c.preloadOnly){const ke=this._emulate(Tt,c.duration,y);return this._preloadTiles(ke),this}return this._zooming=!0,this._rotating=bt,this._pitching=Ke,this._padding=gt,this._prepareEase(p,!1),this._ease(Tt(y),()=>this._afterEase(p),c),this}isEasing(){return!!this._easeFrameId}stop(){return this._stop()}_stop(c,p){if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),this._easeFrameId=void 0,this._onEaseFrame=void 0),this._onEaseEnd){const y=this._onEaseEnd;this._onEaseEnd=void 0,y.call(this,p)}if(!c){const y=this.handlers;y&&y.stop(!1)}return this}_ease(c,p,y){!1===y.animate||0===y.duration?(c(1),p()):(this._easeStart=h.exported.now(),this._easeOptions=y,this._onEaseFrame=c,this._onEaseEnd=p,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))}_renderFrameCallback(){const c=Math.min((h.exported.now()-this._easeStart)/this._easeOptions.duration,1),p=this._onEaseFrame;p&&p(this._easeOptions.easing(c)),c<1?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()}_normalizeBearing(c,p){c=h.wrap(c,-180,180);const y=Math.abs(c-p);return Math.abs(c-360-p)180?-360:y<-180?360:0}_emulate(c,p,y){const b=Math.ceil(15*p/1e3),C=[],E=c(y.clone());for(let T=0;T<=b;T++){const k=E(T/b);C.push(k.clone())}return C}}class mi{constructor(c={}){this.options=c,h.bindAll(["_toggleAttribution","_updateEditLink","_updateData","_updateCompact"],this)}getDefaultPosition(){return"bottom-right"}onAdd(c){const p=this.options&&this.options.compact;return this._map=c,this._container=Ie("div","mapboxgl-ctrl mapboxgl-ctrl-attrib"),this._compactButton=Ie("button","mapboxgl-ctrl-attrib-button",this._container),Ie("span","mapboxgl-ctrl-icon",this._compactButton).setAttribute("aria-hidden","true"),this._compactButton.type="button",this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=Ie("div","mapboxgl-ctrl-attrib-inner",this._container),this._innerContainer.setAttribute("role","list"),p&&this._container.classList.add("mapboxgl-compact"),this._updateAttributions(),this._updateEditLink(),this._map.on("styledata",this._updateData),this._map.on("sourcedata",this._updateData),this._map.on("moveend",this._updateEditLink),void 0===p&&(this._map.on("resize",this._updateCompact),this._updateCompact()),this._container}onRemove(){this._container.remove(),this._map.off("styledata",this._updateData),this._map.off("sourcedata",this._updateData),this._map.off("moveend",this._updateEditLink),this._map.off("resize",this._updateCompact),this._map=void 0,this._attribHTML=void 0}_setElementTitle(c,p){const y=this._map._getUIString(`AttributionControl.${p}`);c.setAttribute("aria-label",y),c.removeAttribute("title"),c.firstElementChild&&c.firstElementChild.setAttribute("title",y)}_toggleAttribution(){this._container.classList.contains("mapboxgl-compact-show")?(this._container.classList.remove("mapboxgl-compact-show"),this._compactButton.setAttribute("aria-expanded","false")):(this._container.classList.add("mapboxgl-compact-show"),this._compactButton.setAttribute("aria-expanded","true"))}_updateEditLink(){let c=this._editLink;c||(c=this._editLink=this._container.querySelector(".mapbox-improve-map"));const p=[{key:"owner",value:this.styleOwner},{key:"id",value:this.styleId},{key:"access_token",value:this._map._requestManager._customAccessToken||h.config.ACCESS_TOKEN}];if(c){const y=p.reduce((b,C,E)=>(C.value&&(b+=`${C.key}=${C.value}${Eb.length-C.length),c=c.filter((b,C)=>{for(let E=C+1;E=0)return!1;return!0}),this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?c=[...this.options.customAttribution,...c]:c.unshift(this.options.customAttribution));const y=c.join(" | ");y!==this._attribHTML&&(this._attribHTML=y,c.length?(this._innerContainer.innerHTML=y,this._container.classList.remove("mapboxgl-attrib-empty")):this._container.classList.add("mapboxgl-attrib-empty"),this._editLink=null)}_updateCompact(){this._map.getCanvasContainer().offsetWidth<=640?this._container.classList.add("mapboxgl-compact"):this._container.classList.remove("mapboxgl-compact","mapboxgl-compact-show")}}class Wn{constructor(){h.bindAll(["_updateLogo","_updateCompact"],this)}onAdd(c){this._map=c,this._container=Ie("div","mapboxgl-ctrl");const p=Ie("a","mapboxgl-ctrl-logo");return p.target="_blank",p.rel="noopener nofollow",p.href="https://www.mapbox.com/",p.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),p.setAttribute("rel","noopener nofollow"),this._container.appendChild(p),this._container.style.display="none",this._map.on("sourcedata",this._updateLogo),this._updateLogo(),this._map.on("resize",this._updateCompact),this._updateCompact(),this._container}onRemove(){this._container.remove(),this._map.off("sourcedata",this._updateLogo),this._map.off("resize",this._updateCompact)}getDefaultPosition(){return"bottom-left"}_updateLogo(c){c&&"metadata"!==c.sourceDataType||(this._container.style.display=this._logoRequired()?"block":"none")}_logoRequired(){if(!this._map.style)return!0;const c=this._map.style._sourceCaches;if(0===Object.entries(c).length)return!0;for(const p in c){const y=c[p].getSource();if(y.hasOwnProperty("mapbox_logo")&&!y.mapbox_logo)return!1}return!0}_updateCompact(){const c=this._container.children;if(c.length){const p=c[0];this._map.getCanvasContainer().offsetWidth<250?p.classList.add("mapboxgl-compact"):p.classList.remove("mapboxgl-compact")}}}class qn{constructor(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1}add(c){const p=++this._id;return this._queue.push({callback:c,id:p,cancelled:!1}),p}remove(c){const p=this._currentlyRunning,y=p?this._queue.concat(p):this._queue;for(const b of y)if(b.id===c)return void(b.cancelled=!0)}run(c=0){const p=this._currentlyRunning=this._queue;this._queue=[];for(const y of p)if(!y.cancelled&&(y.callback(c),this._cleared))break;this._cleared=!1,this._currentlyRunning=!1}clear(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]}}function Ur(m,c,p){if(m=new h.LngLat(m.lng,m.lat),c){const y=new h.LngLat(m.lng-360,m.lat),b=new h.LngLat(m.lng+360,m.lat),C=360*Math.ceil(Math.abs(m.lng-p.center.lng)/360),E=p.locationPoint(m).distSqr(c),T=c.x<0||c.y<0||c.x>p.width||c.y>p.height;p.locationPoint(y).distSqr(c)180;){const y=p.locationPoint(m);if(y.x>=0&&y.y>=0&&y.x<=p.width&&y.y<=p.height)break;m.lng>p.center.lng?m.lng-=360:m.lng+=360}return m}const nc={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%)"};class ja extends h.Evented{constructor(c,p){if(super(),(c instanceof h.window.HTMLElement||p)&&(c=h.extend({element:c},p)),h.bindAll(["_update","_onMove","_onUp","_addDragHandler","_onMapClick","_onKeyPress","_clearFadeTimer"],this),this._anchor=c&&c.anchor||"center",this._color=c&&c.color||"#3FB1CE",this._scale=c&&c.scale||1,this._draggable=c&&c.draggable||!1,this._clickTolerance=c&&c.clickTolerance||0,this._isDragging=!1,this._state="inactive",this._rotation=c&&c.rotation||0,this._rotationAlignment=c&&c.rotationAlignment||"auto",this._pitchAlignment=c&&c.pitchAlignment&&c.pitchAlignment||"auto",this._updateMoving=()=>this._update(!0),this._occludedOpacity=c&&c.occludedOpacity||.2,c&&c.element)this._element=c.element,this._offset=h.pointGeometry.convert(c&&c.offset||[0,0]);else{this._defaultMarker=!0,this._element=Ie("div");const b=41,C=27,E=ct("svg",{display:"block",height:b*this._scale+"px",width:C*this._scale+"px",viewBox:`0 0 ${C} ${b}`},this._element),T=ct("radialGradient",{id:"shadowGradient"},ct("defs",{},E));ct("stop",{offset:"10%","stop-opacity":.4},T),ct("stop",{offset:"100%","stop-opacity":.05},T),ct("ellipse",{cx:13.5,cy:34.8,rx:10.5,ry:5.25,fill:"url(#shadowGradient)"},E),ct("path",{fill:this._color,d:"M27,13.5C27,19.07 20.25,27 14.75,34.5C14.02,35.5 12.98,35.5 12.25,34.5C6.75,27 0,19.22 0,13.5C0,6.04 6.04,0 13.5,0C20.96,0 27,6.04 27,13.5Z"},E),ct("path",{opacity:.25,d:"M13.5,0C6.04,0 0,6.04 0,13.5C0,19.22 6.75,27 12.25,34.5C13,35.52 14.02,35.5 14.75,34.5C20.25,27 27,19.07 27,13.5C27,6.04 20.96,0 13.5,0ZM13.5,1C20.42,1 26,6.58 26,13.5C26,15.9 24.5,19.18 22.22,22.74C19.95,26.3 16.71,30.14 13.94,33.91C13.74,34.18 13.61,34.32 13.5,34.44C13.39,34.32 13.26,34.18 13.06,33.91C10.28,30.13 7.41,26.31 5.02,22.77C2.62,19.23 1,15.95 1,13.5C1,6.58 6.58,1 13.5,1Z"},E),ct("circle",{fill:"white",cx:13.5,cy:13.5,r:5.5},E),this._offset=h.pointGeometry.convert(c&&c.offset||[0,-14])}this._element.hasAttribute("aria-label")||this._element.setAttribute("aria-label","Map marker"),this._element.classList.add("mapboxgl-marker"),this._element.addEventListener("dragstart",b=>{b.preventDefault()}),this._element.addEventListener("mousedown",b=>{b.preventDefault()});const y=this._element.classList;for(const b in nc)y.remove(`mapboxgl-marker-anchor-${b}`);y.add(`mapboxgl-marker-anchor-${this._anchor}`),this._popup=null}addTo(c){return c===this._map||(this.remove(),this._map=c,c.getCanvasContainer().appendChild(this._element),c.on("move",this._updateMoving),c.on("moveend",this._update),c.on("remove",this._clearFadeTimer),c._addMarker(this),this.setDraggable(this._draggable),this._update(),c.on("click",this._onMapClick)),this}remove(){const c=this._map;return c&&(c.off("click",this._onMapClick),c.off("move",this._updateMoving),c.off("moveend",this._update),c.off("mousedown",this._addDragHandler),c.off("touchstart",this._addDragHandler),c.off("mouseup",this._onUp),c.off("touchend",this._onUp),c.off("mousemove",this._onMove),c.off("touchmove",this._onMove),c.off("remove",this._clearFadeTimer),c._removeMarker(this),this._map=void 0),this._clearFadeTimer(),this._element.remove(),this._popup&&this._popup.remove(),this}getLngLat(){return this._lngLat}setLngLat(c){return this._lngLat=h.LngLat.convert(c),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(!0),this}getElement(){return this._element}setPopup(c){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeAttribute("role"),this._element.removeEventListener("keypress",this._onKeyPress),this._originalTabIndex||this._element.removeAttribute("tabindex")),c){if(!("offset"in c.options)){const b=Math.sqrt(Math.pow(13.5,2)/2);c.options.offset=this._defaultMarker?{top:[0,0],"top-left":[0,0],"top-right":[0,0],bottom:[0,-38.1],"bottom-left":[b,-1*(24.6+b)],"bottom-right":[-b,-1*(24.6+b)],left:[13.5,-24.6],right:[-13.5,-24.6]}:this._offset}this._popup=c,c._marker=this,this._lngLat&&this._popup.setLngLat(this._lngLat),this._element.setAttribute("role","button"),this._originalTabIndex=this._element.getAttribute("tabindex"),this._originalTabIndex||this._element.setAttribute("tabindex","0"),this._element.addEventListener("keypress",this._onKeyPress),this._element.setAttribute("aria-expanded","false")}return this}_onKeyPress(c){const p=c.code,y=c.charCode||c.keyCode;"Space"!==p&&"Enter"!==p&&32!==y&&13!==y||this.togglePopup()}_onMapClick(c){const p=c.originalEvent.target,y=this._element;this._popup&&(p===y||y.contains(p))&&this.togglePopup()}getPopup(){return this._popup}togglePopup(){const c=this._popup;return c?(c.isOpen()?(c.remove(),this._element.setAttribute("aria-expanded","false")):this._map&&(c.addTo(this._map),this._element.setAttribute("aria-expanded","true")),this):this}_behindTerrain(){const c=this._map,p=this._pos;if(!c||!p)return!1;const y=c.unproject(p),b=c.getFreeCameraOptions();if(!b.position)return!1;const C=b.position.toLngLat();return C.distanceTo(y)<.9*C.distanceTo(this._lngLat)}_evaluateOpacity(){const c=this._map;if(!c)return;const p=this._pos;if(!p||p.x<0||p.x>c.transform.width||p.y<0||p.y>c.transform.height)return void this._clearFadeTimer();const y=c.unproject(p);let b;c._showingGlobe()&&h.isLngLatBehindGlobe(c.transform,this._lngLat)?b=0:(b=1-c._queryFogOpacity(y),c.transform._terrainEnabled()&&c.getTerrain()&&this._behindTerrain()&&(b*=this._occludedOpacity)),this._element.style.opacity=`${b}`,this._element.style.pointerEvents=b>0?"auto":"none",this._popup&&this._popup._setOpacity(b),this._fadeTimer=null}_clearFadeTimer(){this._fadeTimer&&(clearTimeout(this._fadeTimer),this._fadeTimer=null)}_updateDOM(){const c=this._pos;if(!c||!this._map)return;const p=this._offset.mult(this._scale);this._element.style.transform=`\n translate(${c.x}px,${c.y}px)\n ${nc[this._anchor]}\n ${this._calculateXYTransform()} ${this._calculateZTransform()}\n translate(${p.x}px,${p.y}px)\n `}_calculateXYTransform(){const c=this._pos,p=this._map,y=this.getPitchAlignment();if(!p||!c||"map"!==y)return"";if(!p._showingGlobe()){const k=p.getPitch();return k?`rotateX(${k}deg)`:""}const b=h.radToDeg(h.globeTiltAtLngLat(p.transform,this._lngLat)),C=c.sub(h.globeCenterToScreenPoint(p.transform)),E=Math.abs(C.x)+Math.abs(C.y);if(0===E)return"";const T=b/E;return`rotateX(${-C.y*T}deg) rotateY(${C.x*T}deg)`}_calculateZTransform(){const c=this._pos,p=this._map;if(!p||!c)return"";let y=0;const b=this.getRotationAlignment();if("map"===b)if(p._showingGlobe()){const C=p.project(new h.LngLat(this._lngLat.lng,this._lngLat.lat+.001)),E=p.project(new h.LngLat(this._lngLat.lng,this._lngLat.lat-.001)).sub(C);y=h.radToDeg(Math.atan2(E.y,E.x))-90}else y=-p.getBearing();else if("horizon"===b){const C=h.smoothstep(4,6,p.getZoom()),E=h.globeCenterToScreenPoint(p.transform);E.y+=C*p.transform.height;const T=c.sub(E),k=h.radToDeg(Math.atan2(T.y,T.x));y=(k>90?k-270:k+90)*(1-C)}return y+=this._rotation,y?`rotateZ(${y}deg)`:""}_update(c){h.window.cancelAnimationFrame(this._updateFrameId);const p=this._map;p&&(p.transform.renderWorldCopies&&(this._lngLat=Ur(this._lngLat,this._pos,p.transform)),this._pos=p.project(this._lngLat),!0===c?this._updateFrameId=h.window.requestAnimationFrame(()=>{this._element&&this._pos&&this._anchor&&(this._pos=this._pos.round(),this._updateDOM())}):this._pos=this._pos.round(),p._requestDomTask(()=>{this._map&&(this._element&&this._pos&&this._anchor&&this._updateDOM(),(p._showingGlobe()||p.getTerrain()||p.getFog())&&!this._fadeTimer&&(this._fadeTimer=setTimeout(this._evaluateOpacity.bind(this),60)))}))}getOffset(){return this._offset}setOffset(c){return this._offset=h.pointGeometry.convert(c),this._update(),this}_onMove(c){const p=this._map;if(!p)return;const y=this._pointerdownPos,b=this._positionDelta;if(y&&b){if(!this._isDragging){const C=this._clickTolerance||p._clickTolerance;if(c.point.dist(y)=this._endTime)return this._end;const p=h.easeCubicInOut((c-this._startTime)/(this._endTime-this._startTime));return this._start*(1-p)+this._end*p}isEasing(c){return c>=this._startTime&&c<=this._endTime}jumpTo(c){this._startTime=-1/0,this._endTime=-1/0,this._start=c,this._end=c}easeTo(c,p,y){this._start=this.getValue(p),this._end=c,this._startTime=p,this._endTime=p+y}}const $_={"AttributionControl.ToggleAttribution":"Toggle attribution","AttributionControl.MapFeedback":"Map feedback","FullscreenControl.Enter":"Enter fullscreen","FullscreenControl.Exit":"Exit fullscreen","GeolocateControl.FindMyLocation":"Find my location","GeolocateControl.LocationNotAvailable":"Location not available","LogoControl.Title":"Mapbox logo","Map.Title":"Map","NavigationControl.ResetBearing":"Reset bearing to north","NavigationControl.ZoomIn":"Zoom in","NavigationControl.ZoomOut":"Zoom out","ScrollZoomBlocker.CtrlMessage":"Use ctrl + scroll to zoom the map","ScrollZoomBlocker.CmdMessage":"Use \u2318 + scroll to zoom the map","TouchPanBlocker.Message":"Use two fingers to move the map"},Ep={center:[0,0],zoom:0,bearing:0,pitch:0,minZoom:-2,maxZoom:22,minPitch:0,maxPitch:85,interactive:!0,scrollZoom:!0,boxZoom:!0,dragRotate:!0,dragPan:!0,keyboard:!0,doubleClickZoom:!0,touchZoomRotate:!0,touchPitch:!0,cooperativeGestures:!1,performanceMetricsCollection:!0,bearingSnap:7,clickTolerance:3,pitchWithRotate:!0,hash:!1,attributionControl:!0,failIfMajorPerformanceCaveat:!1,preserveDrawingBuffer:!1,trackResize:!0,optimizeForTerrain:!0,renderWorldCopies:!0,refreshExpiredTiles:!0,minTileCacheSize:null,maxTileCacheSize:null,localIdeographFontFamily:"sans-serif",localFontFamily:null,transformRequest:null,accessToken:null,fadeDuration:300,crossSourceCollisions:!0},Do={showCompass:!0,showZoom:!0,visualizePitch:!1};class ya{constructor(c,p,y=!1){this._clickTolerance=10,this.element=p,this.mouseRotate=new Wu({clickTolerance:c.dragRotate._mouseRotate._clickTolerance}),this.map=c,y&&(this.mousePitch=new Cp({clickTolerance:c.dragRotate._mousePitch._clickTolerance})),h.bindAll(["mousedown","mousemove","mouseup","touchstart","touchmove","touchend","reset"],this),p.addEventListener("mousedown",this.mousedown),p.addEventListener("touchstart",this.touchstart,{passive:!1}),p.addEventListener("touchmove",this.touchmove),p.addEventListener("touchend",this.touchend),p.addEventListener("touchcancel",this.reset)}down(c,p){this.mouseRotate.mousedown(c,p),this.mousePitch&&this.mousePitch.mousedown(c,p),At()}move(c,p){const y=this.map,b=this.mouseRotate.mousemoveWindow(c,p),C=b&&b.bearingDelta;if(C&&y.setBearing(y.getBearing()+C),this.mousePitch){const E=this.mousePitch.mousemoveWindow(c,p),T=E&&E.pitchDelta;T&&y.setPitch(y.getPitch()+T)}}off(){const c=this.element;c.removeEventListener("mousedown",this.mousedown),c.removeEventListener("touchstart",this.touchstart,{passive:!1}),c.removeEventListener("touchmove",this.touchmove),c.removeEventListener("touchend",this.touchend),c.removeEventListener("touchcancel",this.reset),this.offTemp()}offTemp(){St(),h.window.removeEventListener("mousemove",this.mousemove),h.window.removeEventListener("mouseup",this.mouseup)}mousedown(c){this.down(h.extend({},c,{ctrlKey:!0,preventDefault:()=>c.preventDefault()}),Ee(this.element,c)),h.window.addEventListener("mousemove",this.mousemove),h.window.addEventListener("mouseup",this.mouseup)}mousemove(c){this.move(c,Ee(this.element,c))}mouseup(c){this.mouseRotate.mouseupWindow(c),this.mousePitch&&this.mousePitch.mouseupWindow(c),this.offTemp()}touchstart(c){1!==c.targetTouches.length?this.reset():(this._startPos=this._lastPos=Ne(this.element,c.targetTouches)[0],this.down({type:"mousedown",button:0,ctrlKey:!0,preventDefault:()=>c.preventDefault()},this._startPos))}touchmove(c){1!==c.targetTouches.length?this.reset():(this._lastPos=Ne(this.element,c.targetTouches)[0],this.move({preventDefault:()=>c.preventDefault()},this._lastPos))}touchend(c){0===c.targetTouches.length&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos){this._container.style.width=m*b+"px",this._container.innerHTML=`${y} ${C}`})}function Tp(m){const c=Math.pow(10,`${Math.floor(m)}`.length-1);let p=m/c;return p=p>=10?10:p>=5?5:p>=3?3:p>=2?2:p>=1?1:function(y){const b=Math.pow(10,Math.ceil(-Math.log(y)/Math.LN10));return Math.round(y*b)/b}(p),c*p}const Hc={version:h.version,supported:me,setRTLTextPlugin:h.setRTLTextPlugin,getRTLTextPluginStatus:h.getRTLTextPluginStatus,Map:class extends Dt{constructor(m){if(h.LivePerformanceUtils.mark(h.PerformanceMarkers.create),null!=(m=h.extend({},Ep,m)).minZoom&&null!=m.maxZoom&&m.minZoom>m.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(null!=m.minPitch&&null!=m.maxPitch&&m.minPitch>m.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(null!=m.minPitch&&m.minPitch<0)throw new Error("minPitch must be greater than or equal to 0");if(null!=m.maxPitch&&m.maxPitch>85)throw new Error("maxPitch must be less than or equal to 85");if(m.antialias&&h.isSafariWithAntialiasingBug(h.window)&&(m.antialias=!1,h.warnOnce("Antialiasing is disabled for this WebGL context to avoid browser bug: https://github.com/mapbox/mapbox-gl-js/issues/11609")),super(new Gu(m.minZoom,m.maxZoom,m.minPitch,m.maxPitch,m.renderWorldCopies),m),this._interactive=m.interactive,this._minTileCacheSize=m.minTileCacheSize,this._maxTileCacheSize=m.maxTileCacheSize,this._failIfMajorPerformanceCaveat=m.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=m.preserveDrawingBuffer,this._antialias=m.antialias,this._trackResize=m.trackResize,this._bearingSnap=m.bearingSnap,this._refreshExpiredTiles=m.refreshExpiredTiles,this._fadeDuration=m.fadeDuration,this._isInitialLoad=!0,this._crossSourceCollisions=m.crossSourceCollisions,this._collectResourceTiming=m.collectResourceTiming,this._optimizeForTerrain=m.optimizeForTerrain,this._language=this._parseLanguage(m.language),this._worldview=m.worldview,this._renderTaskQueue=new qn,this._domRenderTaskQueue=new qn,this._controls=[],this._markers=[],this._popups=[],this._mapId=h.uniqueId(),this._locale=h.extend({},$_,m.locale),this._clickTolerance=m.clickTolerance,this._cooperativeGestures=m.cooperativeGestures,this._performanceMetricsCollection=m.performanceMetricsCollection,this._containerWidth=0,this._containerHeight=0,this._averageElevationLastSampledAt=-1/0,this._averageElevationExaggeration=0,this._averageElevation=new Sm(0),this._interactionRange=[1/0,-1/0],this._visibilityHidden=0,this._useExplicitProjection=!1,this._requestManager=new h.RequestManager(m.transformRequest,m.accessToken,m.testMode),this._silenceAuthErrors=!!m.testMode,"string"==typeof m.container){if(this._container=h.window.document.getElementById(m.container),!this._container)throw new Error(`Container '${m.container}' not found.`)}else{if(!(m.container instanceof h.window.HTMLElement))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=m.container}if(this._container.childNodes.length>0&&h.warnOnce("The map container element should be empty, otherwise the map's interactivity will be negatively impacted. If you want to display a message when WebGL is not supported, use the Mapbox GL Supported plugin instead."),m.maxBounds&&this.setMaxBounds(m.maxBounds),h.bindAll(["_onWindowOnline","_onWindowResize","_onVisibilityChange","_onMapScroll","_contextLost","_contextRestored"],this),this._setupContainer(),this._setupPainter(),void 0===this.painter)throw new Error("Failed to initialize WebGL.");this.on("move",()=>this._update(!1)),this.on("moveend",()=>this._update(!1)),this.on("zoom",()=>this._update(!0)),void 0!==h.window&&(h.window.addEventListener("online",this._onWindowOnline,!1),h.window.addEventListener("resize",this._onWindowResize,!1),h.window.addEventListener("orientationchange",this._onWindowResize,!1),h.window.addEventListener("webkitfullscreenchange",this._onWindowResize,!1),h.window.addEventListener("visibilitychange",this._onVisibilityChange,!1)),this.handlers=new Xu(this,m),this._localFontFamily=m.localFontFamily,this._localIdeographFontFamily=m.localIdeographFontFamily,m.style&&this.setStyle(m.style,{localFontFamily:this._localFontFamily,localIdeographFontFamily:this._localIdeographFontFamily}),m.projection&&this.setProjection(m.projection),this._hash=m.hash&&new jt("string"==typeof m.hash&&m.hash||void 0).addTo(this),this._hash&&this._hash._onHashChange()||(this.jumpTo({center:m.center,zoom:m.zoom,bearing:m.bearing,pitch:m.pitch}),m.bounds&&(this.resize(),this.fitBounds(m.bounds,h.extend({},m.fitBoundsOptions,{duration:0})))),this.resize(),m.attributionControl&&this.addControl(new mi({customAttribution:m.customAttribution})),this._logoControl=new Wn,this.addControl(this._logoControl,m.logoPosition),this.on("style.load",()=>{this.transform.unmodified&&this.jumpTo(this.style.stylesheet)}),this.on("data",c=>{this._update("style"===c.dataType),this.fire(new h.Event(`${c.dataType}data`,c))}),this.on("dataloading",c=>{this.fire(new h.Event(`${c.dataType}dataloading`,c))})}_getMapId(){return this._mapId}addControl(m,c){if(void 0===c&&(c=m.getDefaultPosition?m.getDefaultPosition():"top-right"),!m||!m.onAdd)return this.fire(new h.ErrorEvent(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));const p=m.onAdd(this);this._controls.push(m);const y=this._controlPositions[c];return-1!==c.indexOf("bottom")?y.insertBefore(p,y.firstChild):y.appendChild(p),this}removeControl(m){if(!m||!m.onRemove)return this.fire(new h.ErrorEvent(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));const c=this._controls.indexOf(m);return c>-1&&this._controls.splice(c,1),m.onRemove(this),this}hasControl(m){return this._controls.indexOf(m)>-1}getContainer(){return this._container}getCanvasContainer(){return this._canvasContainer}getCanvas(){return this._canvas}resize(m){if(this._updateContainerDimensions(),this._containerWidth===this.transform.width&&this._containerHeight===this.transform.height)return this;this._resizeCanvas(this._containerWidth,this._containerHeight),this.transform.resize(this._containerWidth,this._containerHeight),this.painter.resize(Math.ceil(this._containerWidth),Math.ceil(this._containerHeight));const c=!this._moving;return c&&this.fire(new h.Event("movestart",m)).fire(new h.Event("move",m)),this.fire(new h.Event("resize",m)),c&&this.fire(new h.Event("moveend",m)),this}getBounds(){return this.transform.getBounds()}getMaxBounds(){return this.transform.getMaxBounds()||null}setMaxBounds(m){return this.transform.setMaxBounds(h.LngLatBounds.convert(m)),this._update()}setMinZoom(m){if((m=m??-2)>=-2&&m<=this.transform.maxZoom)return this.transform.minZoom=m,this._update(),this.getZoom()=this.transform.minZoom)return this.transform.maxZoom=m,this._update(),this.getZoom()>m?this.setZoom(m):this.fire(new h.Event("zoomstart")).fire(new h.Event("zoom")).fire(new h.Event("zoomend")),this;throw new Error("maxZoom must be greater than the current minZoom")}getMaxZoom(){return this.transform.maxZoom}setMinPitch(m){if((m=m??0)<0)throw new Error("minPitch must be greater than or equal to 0");if(m>=0&&m<=this.transform.maxPitch)return this.transform.minPitch=m,this._update(),this.getPitch()85)throw new Error("maxPitch must be less than or equal to 85");if(m>=this.transform.minPitch)return this.transform.maxPitch=m,this._update(),this.getPitch()>m?this.setPitch(m):this.fire(new h.Event("pitchstart")).fire(new h.Event("pitch")).fire(new h.Event("pitchend")),this;throw new Error("maxPitch must be greater than or equal to minPitch")}getMaxPitch(){return this.transform.maxPitch}getRenderWorldCopies(){return this.transform.renderWorldCopies}setRenderWorldCopies(m){return this.transform.renderWorldCopies=m,this.transform.renderWorldCopies||this._forceMarkerAndPopupUpdate(!0),this._update()}getLanguage(){return this._language}_parseLanguage(m){return"auto"===m?h.window.navigator.language:Array.isArray(m)?0===m.length?void 0:m.map(c=>"auto"===c?h.window.navigator.language:c):m}setLanguage(m){const c=this._parseLanguage(m);if(!this.style||c===this._language)return this;this._language=c,this.style._reloadSources();for(const p of this._controls)p._setLanguage&&p._setLanguage(this._language);return this}getWorldview(){return this._worldview}setWorldview(m){return this.style&&m!==this._worldview?(this._worldview=m,this.style._reloadSources(),this):this}getProjection(){return this.transform.mercatorFromTransition?{name:"globe",center:[0,0]}:this.transform.getProjection()}_showingGlobe(){return"globe"===this.transform.projection.name}setProjection(m){return this._lazyInitEmptyStyle(),m?"string"==typeof m&&(m={name:m}):m=null,this._useExplicitProjection=!!m,this._prioritizeAndUpdateProjection(m,this.style.stylesheet?this.style.stylesheet.projection:null)}_updateProjectionTransition(){if("globe"!==this.getProjection().name)return;const m=this.transform,c=m.projection.name;let p;"globe"===c&&m.zoom>=h.GLOBE_ZOOM_THRESHOLD_MAX?(m.setMercatorFromTransition(),p=!0):"mercator"===c&&m.zoom=h.GLOBE_ZOOM_THRESHOLD_MAX?this.transform.setMercatorFromTransition():this.transform.setProjection(m),this.style.applyProjectionUpdate(),c){this.painter.clearBackgroundTiles();for(const p in this.style._sourceCaches)this.style._sourceCaches[p].clearTiles();this._update(!0),this._forceMarkerAndPopupUpdate(!0)}return this}project(m){return this.transform.locationPoint3D(h.LngLat.convert(m))}unproject(m){return this.transform.pointLocation3D(h.pointGeometry.convert(m))}isMoving(){return this._moving||this.handlers&&this.handlers.isMoving()||!1}isZooming(){return this._zooming||this.handlers&&this.handlers.isZooming()||!1}isRotating(){return this._rotating||this.handlers&&this.handlers.isRotating()||!1}_isDragging(){return this.handlers&&this.handlers._isDragging()||!1}_createDelegatedListener(m,c,p){if("mouseenter"===m||"mouseover"===m){let y=!1;const b=E=>{const T=c.filter(F=>this.getLayer(F)),k=T.length?this.queryRenderedFeatures(E.point,{layers:T}):[];k.length?y||(y=!0,p.call(this,new Go(m,this,E.originalEvent,{features:k}))):y=!1},C=()=>{y=!1};return{layers:new Set(c),listener:p,delegates:{mousemove:b,mouseout:C}}}if("mouseleave"===m||"mouseout"===m){let y=!1;const b=E=>{const T=c.filter(k=>this.getLayer(k));(T.length?this.queryRenderedFeatures(E.point,{layers:T}):[]).length?y=!0:y&&(y=!1,p.call(this,new Go(m,this,E.originalEvent)))},C=E=>{y&&(y=!1,p.call(this,new Go(m,this,E.originalEvent)))};return{layers:new Set(c),listener:p,delegates:{mousemove:b,mouseout:C}}}{const y=b=>{const C=c.filter(T=>this.getLayer(T)),E=C.length?this.queryRenderedFeatures(b.point,{layers:C}):[];E.length&&(b.features=E,p.call(this,b),delete b.features)};return{layers:new Set(c),listener:p,delegates:{[m]:y}}}}on(m,c,p){if(void 0===p)return super.on(m,c);Array.isArray(c)||(c=[c]);const y=this._createDelegatedListener(m,c,p);this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[m]=this._delegatedListeners[m]||[],this._delegatedListeners[m].push(y);for(const b in y.delegates)this.on(b,y.delegates[b]);return this}once(m,c,p){if(void 0===p)return super.once(m,c);Array.isArray(c)||(c=[c]);const y=this._createDelegatedListener(m,c,p);for(const b in y.delegates)this.once(b,y.delegates[b]);return this}off(m,c,p){if(void 0===p)return super.off(m,c);c=new Set(Array.isArray(c)?c:[c]);const y=(C,E)=>{if(C.size!==E.size)return!1;for(const T of C)if(!E.has(T))return!1;return!0},b=this._delegatedListeners?this._delegatedListeners[m]:void 0;return b&&(C=>{for(let E=0;E{b?this.fire(new h.ErrorEvent(b)):C&&this._updateDiff(C,c)})}else"object"==typeof m&&this._updateDiff(m,c)}_updateDiff(m,c){try{this.style.setState(m)&&this._update(!0)}catch(p){h.warnOnce(`Unable to perform style diff: ${p.message||p.error||p}. Rebuilding the style from scratch.`),this._updateStyle(m,c)}}getStyle(){if(this.style)return this.style.serialize()}isStyleLoaded(){return this.style?this.style.loaded():(h.warnOnce("There is no style added to the map."),!1)}addSource(m,c){return this._lazyInitEmptyStyle(),this.style.addSource(m,c),this._update(!0)}isSourceLoaded(m){return!!this.style&&this.style._isSourceCacheLoaded(m)}areTilesLoaded(){const m=this.style&&this.style._sourceCaches;for(const c in m){const p=m[c]._tiles;for(const y in p){const b=p[y];if("loaded"!==b.state&&"errored"!==b.state)return!1}}return!0}addSourceType(m,c,p){this._lazyInitEmptyStyle(),this.style.addSourceType(m,c,p)}removeSource(m){return this.style.removeSource(m),this._updateTerrain(),this._update(!0)}getSource(m){return this.style.getSource(m)}addImage(m,c,{pixelRatio:p=1,sdf:y=!1,stretchX:b,stretchY:C,content:E}={}){if(this._lazyInitEmptyStyle(),c instanceof h.window.HTMLImageElement||h.window.ImageBitmap&&c instanceof h.window.ImageBitmap){const{width:T,height:k,data:F}=h.exported.getImageData(c);this.style.addImage(m,{data:new h.RGBAImage({width:T,height:k},F),pixelRatio:p,stretchX:b,stretchY:C,content:E,sdf:y,version:0})}else if(void 0===c.width||void 0===c.height)this.fire(new h.ErrorEvent(new Error("Invalid arguments to map.addImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));else{const{width:T,height:k}=c,F=c;this.style.addImage(m,{data:new h.RGBAImage({width:T,height:k},new Uint8Array(F.data)),pixelRatio:p,stretchX:b,stretchY:C,content:E,sdf:y,version:0,userImage:F}),F.onAdd&&F.onAdd(this,m)}}updateImage(m,c){const p=this.style.getImage(m);if(!p)return void this.fire(new h.ErrorEvent(new Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));const y=c instanceof h.window.HTMLImageElement||h.window.ImageBitmap&&c instanceof h.window.ImageBitmap?h.exported.getImageData(c):c,{width:b,height:C}=y;void 0!==b&&void 0!==C?b===p.data.width&&C===p.data.height?(p.data.replace(y.data,!(c instanceof h.window.HTMLImageElement||h.window.ImageBitmap&&c instanceof h.window.ImageBitmap)),this.style.updateImage(m,p)):this.fire(new h.ErrorEvent(new Error(`The width and height of the updated image (${b}, ${C})\n must be that same as the previous version of the image\n (${p.data.width}, ${p.data.height})`))):this.fire(new h.ErrorEvent(new Error("Invalid arguments to map.updateImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")))}hasImage(m){return m?!!this.style.getImage(m):(this.fire(new h.ErrorEvent(new Error("Missing required image id"))),!1)}removeImage(m){this.style.removeImage(m)}loadImage(m,c){h.getImage(this._requestManager.transformRequest(m,h.ResourceType.Image),(p,y)=>{c(p,y instanceof h.window.HTMLImageElement?h.exported.getImageData(y):y)})}listImages(){return this.style.listImages()}addLayer(m,c){return this._lazyInitEmptyStyle(),this.style.addLayer(m,c),this._update(!0)}moveLayer(m,c){return this.style.moveLayer(m,c),this._update(!0)}removeLayer(m){return this.style.removeLayer(m),this._update(!0)}getLayer(m){return this.style.getLayer(m)}setLayerZoomRange(m,c,p){return this.style.setLayerZoomRange(m,c,p),this._update(!0)}setFilter(m,c,p={}){return this.style.setFilter(m,c,p),this._update(!0)}getFilter(m){return this.style.getFilter(m)}setPaintProperty(m,c,p,y={}){return this.style.setPaintProperty(m,c,p,y),this._update(!0)}getPaintProperty(m,c){return this.style.getPaintProperty(m,c)}setLayoutProperty(m,c,p,y={}){return this.style.setLayoutProperty(m,c,p,y),this._update(!0)}getLayoutProperty(m,c){return this.style.getLayoutProperty(m,c)}setLight(m,c={}){return this._lazyInitEmptyStyle(),this.style.setLight(m,c),this._update(!0)}getLight(){return this.style.getLight()}setTerrain(m){return this._lazyInitEmptyStyle(),!m&&this.transform.projection.requiresDraping?this.style.setTerrainForDraping():this.style.setTerrain(m),this._averageElevationLastSampledAt=-1/0,this._update(!0)}getTerrain(){return this.style?this.style.getTerrain():null}setFog(m){return this._lazyInitEmptyStyle(),this.style.setFog(m),this._update(!0)}getFog(){return this.style?this.style.getFog():null}_queryFogOpacity(m){return this.style&&this.style.fog?this.style.fog.getOpacityAtLatLng(h.LngLat.convert(m),this.transform):0}setFeatureState(m,c){return this.style.setFeatureState(m,c),this._update()}removeFeatureState(m,c){return this.style.removeFeatureState(m,c),this._update()}getFeatureState(m){return this.style.getFeatureState(m)}_updateContainerDimensions(){if(!this._container)return;const m=this._container.getBoundingClientRect().width||400,c=this._container.getBoundingClientRect().height||300;let p,y,b,C=this._container;for(;C&&(!y||!b);){const E=h.window.getComputedStyle(C).transform;E&&"none"!==E&&(p=E.match(/matrix.*\((.+)\)/)[1].split(", "),p[0]&&"0"!==p[0]&&"1"!==p[0]&&(y=p[0]),p[3]&&"0"!==p[3]&&"1"!==p[3]&&(b=p[3])),C=C.parentElement}this._containerWidth=y?Math.abs(m/y):m,this._containerHeight=b?Math.abs(c/b):c}_detectMissingCSS(){"rgb(250, 128, 114)"!==h.window.getComputedStyle(this._missingCSSCanary).getPropertyValue("background-color")&&h.warnOnce("This page appears to be missing CSS declarations for Mapbox GL JS, which may cause the map to display incorrectly. Please ensure your page includes mapbox-gl.css, as described in https://www.mapbox.com/mapbox-gl-js/api/.")}_setupContainer(){const m=this._container;m.classList.add("mapboxgl-map"),(this._missingCSSCanary=Ie("div","mapboxgl-canary",m)).style.visibility="hidden",this._detectMissingCSS();const c=this._canvasContainer=Ie("div","mapboxgl-canvas-container",m);this._interactive&&c.classList.add("mapboxgl-interactive"),this._canvas=Ie("canvas","mapboxgl-canvas",c),this._canvas.addEventListener("webglcontextlost",this._contextLost,!1),this._canvas.addEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.setAttribute("tabindex","0"),this._canvas.setAttribute("aria-label",this._getUIString("Map.Title")),this._canvas.setAttribute("role","region"),this._updateContainerDimensions(),this._resizeCanvas(this._containerWidth,this._containerHeight);const p=this._controlContainer=Ie("div","mapboxgl-control-container",m),y=this._controlPositions={};["top-left","top-right","bottom-left","bottom-right"].forEach(b=>{y[b]=Ie("div",`mapboxgl-ctrl-${b}`,p)}),this._container.addEventListener("scroll",this._onMapScroll,!1)}_resizeCanvas(m,c){const p=h.exported.devicePixelRatio||1;this._canvas.width=p*Math.ceil(m),this._canvas.height=p*Math.ceil(c),this._canvas.style.width=`${m}px`,this._canvas.style.height=`${c}px`}_addMarker(m){this._markers.push(m)}_removeMarker(m){const c=this._markers.indexOf(m);-1!==c&&this._markers.splice(c,1)}_addPopup(m){this._popups.push(m)}_removePopup(m){const c=this._popups.indexOf(m);-1!==c&&this._popups.splice(c,1)}_setupPainter(){const m=h.extend({},me.webGLContextAttributes,{failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer,antialias:this._antialias||!1}),c=this._canvas.getContext("webgl",m)||this._canvas.getContext("experimental-webgl",m);c?(h.storeAuthState(c,!0),this.painter=new Vo(c,this.transform),this.on("data",p=>{"source"===p.dataType&&this.painter.setTileLoadedFlag(!0)}),h.exported$1.testSupport(c)):this.fire(new h.ErrorEvent(new Error("Failed to initialize WebGL")))}_contextLost(m){m.preventDefault(),this._frame&&(this._frame.cancel(),this._frame=null),this.fire(new h.Event("webglcontextlost",{originalEvent:m}))}_contextRestored(m){this._setupPainter(),this.resize(),this._update(),this.fire(new h.Event("webglcontextrestored",{originalEvent:m}))}_onMapScroll(m){if(m.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1}loaded(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()}_update(m){return this.style?(this._styleDirty=this._styleDirty||m,this._sourcesDirty=!0,this.triggerRepaint(),this):this}_requestRenderFrame(m){return this._update(),this._renderTaskQueue.add(m)}_cancelRenderFrame(m){this._renderTaskQueue.remove(m)}_requestDomTask(m){!this.loaded()||this.loaded()&&!this.isMoving()?m():this._domRenderTaskQueue.add(m)}_render(m){let c;const p=this.painter.context.extTimerQuery,y=h.exported.now();if(this.listens("gpu-timing-frame")&&(c=p.createQueryEXT(),p.beginQueryEXT(p.TIME_ELAPSED_EXT,c)),this.painter.context.setDirty(),this.painter.setBaseState(),(this.isMoving()||this.isRotating()||this.isZooming())&&(this._interactionRange[0]=Math.min(this._interactionRange[0],h.window.performance.now()),this._interactionRange[1]=Math.max(this._interactionRange[1],h.window.performance.now())),this._renderTaskQueue.run(m),this._domRenderTaskQueue.run(m),this._removed)return;this._updateProjectionTransition();const b=this._isInitialLoad?0:this._fadeDuration;if(this.style&&this._styleDirty){this._styleDirty=!1;const T=this.transform.zoom,k=this.transform.pitch,F=h.exported.now(),O=new h.EvaluationParameters(T,{now:F,fadeDuration:b,pitch:k,transition:this.style.getTransition()});this.style.update(O)}this.style&&this.style.fog&&this.style.fog.hasTransition()&&(this.style._markersNeedUpdate=!0,this._sourcesDirty=!0);let C=!1;if(this.style&&this._sourcesDirty?(this._sourcesDirty=!1,this.painter._updateFog(this.style),this._updateTerrain(),C=this._updateAverageElevation(y),this.style._updateSources(this.transform),this._forceMarkerAndPopupUpdate()):C=this._updateAverageElevation(y),this._placementDirty=this.style&&this.style._updatePlacement(this.painter.transform,this.showCollisionBoxes,b,this._crossSourceCollisions),this.style&&this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showTerrainWireframe:this.showTerrainWireframe,showOverdrawInspector:this._showOverdrawInspector,showQueryGeometry:!!this._showQueryGeometry,showTileAABBs:this.showTileAABBs,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:b,isInitialLoad:this._isInitialLoad,showPadding:this.showPadding,gpuTiming:!!this.listens("gpu-timing-layer"),gpuTimingDeferredRender:!!this.listens("gpu-timing-deferred-render"),speedIndexTiming:this.speedIndexTiming}),this.fire(new h.Event("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,this.fire(new h.Event("load"))),this.style&&this.style.hasTransitions()&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles(),c){const T=h.exported.now()-y;p.endQueryEXT(p.TIME_ELAPSED_EXT,c),setTimeout(()=>{const k=p.getQueryObjectEXT(c,p.QUERY_RESULT_EXT)/1e6;p.deleteQueryEXT(c),this.fire(new h.Event("gpu-timing-frame",{cpuTime:T,gpuTime:k})),h.window.performance.mark("frame-gpu",{startTime:y,detail:{gpuTime:k}})},50)}if(this.listens("gpu-timing-layer")){const T=this.painter.collectGpuTimers();setTimeout(()=>{const k=this.painter.queryGpuTimers(T);this.fire(new h.Event("gpu-timing-layer",{layerTimes:k}))},50)}if(this.listens("gpu-timing-deferred-render")){const T=this.painter.collectDeferredRenderGpuQueries();setTimeout(()=>{const k=this.painter.queryGpuTimeDeferredRender(T);this.fire(new h.Event("gpu-timing-deferred-render",{gpuTime:k}))},50)}const E=this._sourcesDirty||this._styleDirty||this._placementDirty||C;if(E||this._repaint)this.triggerRepaint();else{const T=!this.isMoving()&&this.loaded();if(T&&(C=this._updateAverageElevation(y,!0)),C)this.triggerRepaint();else if(this._triggerFrame(!1),T&&(this.fire(new h.Event("idle")),this._isInitialLoad=!1,this.speedIndexTiming)){const k=this._calculateSpeedIndex();this.fire(new h.Event("speedindexcompleted",{speedIndex:k})),this.speedIndexTiming=!1}}!this._loaded||this._fullyLoaded||E||(this._fullyLoaded=!0,h.LivePerformanceUtils.mark(h.PerformanceMarkers.fullLoad),this._performanceMetricsCollection&&h.postPerformanceEvent(this._requestManager._customAccessToken,{width:this.painter.width,height:this.painter.height,interactionRange:this._interactionRange,visibilityHidden:this._visibilityHidden,terrainEnabled:!!this.painter.style.getTerrain(),fogEnabled:!!this.painter.style.getFog(),projection:this.getProjection().name,zoom:this.transform.zoom,renderer:this.painter.context.renderer,vendor:this.painter.context.vendor}),this._authenticate())}_forceMarkerAndPopupUpdate(m){for(const c of this._markers)m&&!this.getRenderWorldCopies()&&(c._lngLat=c._lngLat.wrap()),c._update();for(const c of this._popups)!m||this.getRenderWorldCopies()||c._trackPointer||(c._lngLat=c._lngLat.wrap()),c._update()}_updateAverageElevation(m,c=!1){const p=y=>(this.transform.averageElevation=y,this._update(!1),!0);if(!this.painter.averageElevationNeedsEasing())return 0!==this.transform.averageElevation&&p(0);if((c||m-this._averageElevationLastSampledAt>500)&&!this._averageElevation.isEasing(m)){const y=this.transform.averageElevation;let b=this.transform.sampleAverageElevation(),C=!1;this.transform.elevation&&(C=this.transform.elevation.exaggeration()!==this._averageElevationExaggeration,this._averageElevationExaggeration=this.transform.elevation.exaggeration()),isNaN(b)?b=0:this._averageElevationLastSampledAt=m;const E=Math.abs(y-b);if(E>1){if(this._isInitialLoad||C)return this._averageElevation.jumpTo(b),p(b);this._averageElevation.easeTo(b,m,300)}else if(E>1e-4)return this._averageElevation.jumpTo(b),p(b)}return!!this._averageElevation.isEasing(m)&&p(this._averageElevation.getValue(m))}_authenticate(){h.getMapSessionAPI(this._getMapId(),this._requestManager._skuToken,this._requestManager._customAccessToken,m=>{if(m&&(m.message===h.AUTH_ERR_MSG||401===m.status)){const c=this.painter.context.gl;h.storeAuthState(c,!1),this._logoControl instanceof Wn&&this._logoControl._updateLogo(),c&&c.clear(c.DEPTH_BUFFER_BIT|c.COLOR_BUFFER_BIT|c.STENCIL_BUFFER_BIT),this._silenceAuthErrors||this.fire(new h.ErrorEvent(new Error("A valid Mapbox access token is required to use Mapbox GL JS. To create an account or a new access token, visit https://account.mapbox.com/")))}}),h.postMapLoadEvent(this._getMapId(),this._requestManager._skuToken,this._requestManager._customAccessToken,()=>{})}_updateTerrain(){const m=this._isDragging();this.painter.updateTerrain(this.style,m)}_calculateSpeedIndex(){const m=this.painter.canvasCopy(),c=this.painter.getCanvasCopiesAndTimestamps();c.timeStamps.push(performance.now());const p=this.painter.context.gl,y=p.createFramebuffer();function b(C){p.framebufferTexture2D(p.FRAMEBUFFER,p.COLOR_ATTACHMENT0,p.TEXTURE_2D,C,0);const E=new Uint8Array(p.drawingBufferWidth*p.drawingBufferHeight*4);return p.readPixels(0,0,p.drawingBufferWidth,p.drawingBufferHeight,p.RGBA,p.UNSIGNED_BYTE,E),E}return p.bindFramebuffer(p.FRAMEBUFFER,y),this._canvasPixelComparison(b(m),c.canvasCopies.map(b),c.timeStamps)}_canvasPixelComparison(m,c,p){let y=p[1]-p[0];const b=m.length/4;for(let C=0;C{const p=!!this._renderNextFrame;this._frame=null,this._renderNextFrame=null,p&&this._render(c)}))}_preloadTiles(m){const c=this.style?Object.values(this.style._sourceCaches):[];return h.asyncAll(c,(p,y)=>p._preloadTiles(m,y),()=>{this.triggerRepaint()}),this}_onWindowOnline(){this._update()}_onWindowResize(m){this._trackResize&&this.resize({originalEvent:m})._update()}_onVisibilityChange(){"hidden"===h.window.document.visibilityState&&this._visibilityHidden++}get showTileBoundaries(){return!!this._showTileBoundaries}set showTileBoundaries(m){this._showTileBoundaries!==m&&(this._showTileBoundaries=m,this._update())}get showTerrainWireframe(){return!!this._showTerrainWireframe}set showTerrainWireframe(m){this._showTerrainWireframe!==m&&(this._showTerrainWireframe=m,this._update())}get speedIndexTiming(){return!!this._speedIndexTiming}set speedIndexTiming(m){this._speedIndexTiming!==m&&(this._speedIndexTiming=m,this._update())}get showPadding(){return!!this._showPadding}set showPadding(m){this._showPadding!==m&&(this._showPadding=m,this._update())}get showCollisionBoxes(){return!!this._showCollisionBoxes}set showCollisionBoxes(m){this._showCollisionBoxes!==m&&(this._showCollisionBoxes=m,m?this.style._generateCollisionBoxes():this._update())}get showOverdrawInspector(){return!!this._showOverdrawInspector}set showOverdrawInspector(m){this._showOverdrawInspector!==m&&(this._showOverdrawInspector=m,this._update())}get repaint(){return!!this._repaint}set repaint(m){this._repaint!==m&&(this._repaint=m,this.triggerRepaint())}get vertices(){return!!this._vertices}set vertices(m){this._vertices=m,this._update()}get showTileAABBs(){return!!this._showTileAABBs}set showTileAABBs(m){this._showTileAABBs!==m&&(this._showTileAABBs=m,m&&this._update())}_setCacheLimits(m,c){h.setCacheLimits(m,c)}get version(){return h.version}},NavigationControl:class{constructor(m){this.options=h.extend({},Do,m),this._container=Ie("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._container.addEventListener("contextmenu",c=>c.preventDefault()),this.options.showZoom&&(h.bindAll(["_setButtonTitle","_updateZoomButtons"],this),this._zoomInButton=this._createButton("mapboxgl-ctrl-zoom-in",c=>{this._map&&this._map.zoomIn({},{originalEvent:c})}),Ie("span","mapboxgl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden","true"),this._zoomOutButton=this._createButton("mapboxgl-ctrl-zoom-out",c=>{this._map&&this._map.zoomOut({},{originalEvent:c})}),Ie("span","mapboxgl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden","true")),this.options.showCompass&&(h.bindAll(["_rotateCompassArrow"],this),this._compass=this._createButton("mapboxgl-ctrl-compass",c=>{const p=this._map;p&&(this.options.visualizePitch?p.resetNorthPitch({},{originalEvent:c}):p.resetNorth({},{originalEvent:c}))}),this._compassIcon=Ie("span","mapboxgl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden","true"))}_updateZoomButtons(){const m=this._map;if(!m)return;const c=m.getZoom(),p=c===m.getMaxZoom(),y=c===m.getMinZoom();this._zoomInButton.disabled=p,this._zoomOutButton.disabled=y,this._zoomInButton.setAttribute("aria-disabled",p.toString()),this._zoomOutButton.setAttribute("aria-disabled",y.toString())}_rotateCompassArrow(){const m=this._map;if(!m)return;const c=this.options.visualizePitch?`scale(${1/Math.pow(Math.cos(m.transform.pitch*(Math.PI/180)),.5)}) rotateX(${m.transform.pitch}deg) rotateZ(${m.transform.angle*(180/Math.PI)}deg)`:`rotate(${m.transform.angle*(180/Math.PI)}deg)`;m._requestDomTask(()=>{this._compassIcon&&(this._compassIcon.style.transform=c)})}onAdd(m){return this._map=m,this.options.showZoom&&(this._setButtonTitle(this._zoomInButton,"ZoomIn"),this._setButtonTitle(this._zoomOutButton,"ZoomOut"),m.on("zoom",this._updateZoomButtons),this._updateZoomButtons()),this.options.showCompass&&(this._setButtonTitle(this._compass,"ResetBearing"),this.options.visualizePitch&&m.on("pitch",this._rotateCompassArrow),m.on("rotate",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new ya(m,this._compass,this.options.visualizePitch)),this._container}onRemove(){const m=this._map;m&&(this._container.remove(),this.options.showZoom&&m.off("zoom",this._updateZoomButtons),this.options.showCompass&&(this.options.visualizePitch&&m.off("pitch",this._rotateCompassArrow),m.off("rotate",this._rotateCompassArrow),this._handler&&this._handler.off(),this._handler=void 0),this._map=void 0)}_createButton(m,c){const p=Ie("button",m,this._container);return p.type="button",p.addEventListener("click",c),p}_setButtonTitle(m,c){if(!this._map)return;const p=this._map._getUIString(`NavigationControl.${c}`);m.setAttribute("aria-label",p),m.firstElementChild&&m.firstElementChild.setAttribute("title",p)}},GeolocateControl:class extends h.Evented{constructor(m){super(),this.options=h.extend({geolocation:h.window.navigator.geolocation},hh,m),h.bindAll(["_onSuccess","_onError","_onZoom","_finish","_setupUI","_updateCamera","_updateMarker","_updateMarkerRotation","_onDeviceOrientation"],this),this._updateMarkerRotationThrottled=rh(this._updateMarkerRotation,20),this._numberOfWatches=0}onAdd(m){return this._map=m,this._container=Ie("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._checkGeolocationSupport(this._setupUI),this._container}onRemove(){void 0!==this._geolocationWatchID&&(this.options.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0),this.options.showUserLocation&&this._userLocationDotMarker&&this._userLocationDotMarker.remove(),this.options.showAccuracyCircle&&this._accuracyCircleMarker&&this._accuracyCircleMarker.remove(),this._container.remove(),this._map.off("zoom",this._onZoom),this._map=void 0,this._numberOfWatches=0,this._noTimeout=!1}_checkGeolocationSupport(m){const c=(p=!!this.options.geolocation)=>{this._supportsGeolocation=p,m(p)};void 0!==this._supportsGeolocation?m(this._supportsGeolocation):void 0!==h.window.navigator.permissions?h.window.navigator.permissions.query({name:"geolocation"}).then(p=>c("denied"!==p.state)).catch(()=>c()):c()}_isOutOfMapMaxBounds(m){const c=this._map.getMaxBounds(),p=m.coords;return!!c&&(p.longitudec.getEast()||p.latitudec.getNorth())}_setErrorState(){switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error");break;case"ACTIVE_LOCK":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting");break;case"BACKGROUND":this._watchState="BACKGROUND_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting")}}_onSuccess(m){if(this._map){if(this._isOutOfMapMaxBounds(m))return this._setErrorState(),this.fire(new h.Event("outofmaxbounds",m)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=m,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"BACKGROUND":case"BACKGROUND_ERROR":this._watchState="BACKGROUND",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background")}this.options.showUserLocation&&"OFF"!==this._watchState&&this._updateMarker(m),this.options.trackUserLocation&&"ACTIVE_LOCK"!==this._watchState||this._updateCamera(m),this.options.showUserLocation&&this._dotElement.classList.remove("mapboxgl-user-location-dot-stale"),this.fire(new h.Event("geolocate",m)),this._finish()}}_updateCamera(m){const c=new h.LngLat(m.coords.longitude,m.coords.latitude),p=m.coords.accuracy,y=this._map.getBearing(),b=h.extend({bearing:y},this.options.fitBoundsOptions);this._map.fitBounds(c.toBounds(p),b,{geolocateSource:!0})}_updateMarker(m){if(m){const c=new h.LngLat(m.coords.longitude,m.coords.latitude);this._accuracyCircleMarker.setLngLat(c).addTo(this._map),this._userLocationDotMarker.setLngLat(c).addTo(this._map),this._accuracy=m.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()}_updateCircleRadius(){const m=this._map.transform,c=h.mercatorZfromAltitude(1,m._center.lat)*m.worldSize,p=Math.ceil(2*this._accuracy*c);this._circleElement.style.width=`${p}px`,this._circleElement.style.height=`${p}px`}_onZoom(){this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}_updateMarkerRotation(){this._userLocationDotMarker&&"number"==typeof this._heading?(this._userLocationDotMarker.setRotation(this._heading),this._dotElement.classList.add("mapboxgl-user-location-show-heading")):(this._dotElement.classList.remove("mapboxgl-user-location-show-heading"),this._userLocationDotMarker.setRotation(0))}_onError(m){if(this._map){if(this.options.trackUserLocation)if(1===m.code){this._watchState="OFF",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.disabled=!0;const c=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.setAttribute("aria-label",c),this._geolocateButton.firstElementChild&&this._geolocateButton.firstElementChild.setAttribute("title",c),void 0!==this._geolocationWatchID&&this._clearWatch()}else{if(3===m.code&&this._noTimeout)return;this._setErrorState()}"OFF"!==this._watchState&&this.options.showUserLocation&&this._dotElement.classList.add("mapboxgl-user-location-dot-stale"),this.fire(new h.Event("error",m)),this._finish()}}_finish(){this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0}_setupUI(m){if(void 0!==this._map){if(this._container.addEventListener("contextmenu",c=>c.preventDefault()),this._geolocateButton=Ie("button","mapboxgl-ctrl-geolocate",this._container),Ie("span","mapboxgl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden","true"),this._geolocateButton.type="button",!1===m){h.warnOnce("Geolocation support is not available so the GeolocateControl will be disabled.");const c=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.setAttribute("aria-label",c),this._geolocateButton.firstElementChild&&this._geolocateButton.firstElementChild.setAttribute("title",c)}else{const c=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.setAttribute("aria-label",c),this._geolocateButton.firstElementChild&&this._geolocateButton.firstElementChild.setAttribute("title",c)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=Ie("div","mapboxgl-user-location"),this._dotElement.appendChild(Ie("div","mapboxgl-user-location-dot")),this._dotElement.appendChild(Ie("div","mapboxgl-user-location-heading")),this._userLocationDotMarker=new ja({element:this._dotElement,rotationAlignment:"map",pitchAlignment:"map"}),this._circleElement=Ie("div","mapboxgl-user-location-accuracy-circle"),this._accuracyCircleMarker=new ja({element:this._circleElement,pitchAlignment:"map"}),this.options.trackUserLocation&&(this._watchState="OFF"),this._map.on("zoom",this._onZoom)),this._geolocateButton.addEventListener("click",this.trigger.bind(this)),this._setup=!0,this.options.trackUserLocation&&this._map.on("movestart",c=>{c.geolocateSource||"ACTIVE_LOCK"!==this._watchState||c.originalEvent&&"resize"===c.originalEvent.type||(this._watchState="BACKGROUND",this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this.fire(new h.Event("trackuserlocationend")))})}}_onDeviceOrientation(m){this._userLocationDotMarker&&(m.webkitCompassHeading?this._heading=m.webkitCompassHeading:!0===m.absolute&&(this._heading=-1*m.alpha),this._updateMarkerRotationThrottled())}trigger(){if(!this._setup)return h.warnOnce("Geolocate control triggered before added to a map"),!1;if(this.options.trackUserLocation){switch(this._watchState){case"OFF":this._watchState="WAITING_ACTIVE",this.fire(new h.Event("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":this._numberOfWatches--,this._noTimeout=!1,this._watchState="OFF",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this.fire(new h.Event("trackuserlocationend"));break;case"BACKGROUND":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._lastKnownPosition&&this._updateCamera(this._lastKnownPosition),this.fire(new h.Event("trackuserlocationstart"))}switch(this._watchState){case"WAITING_ACTIVE":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"ACTIVE_LOCK":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"ACTIVE_ERROR":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error");break;case"BACKGROUND":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background");break;case"BACKGROUND_ERROR":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background-error")}if("OFF"===this._watchState&&void 0!==this._geolocationWatchID)this._clearWatch();else if(void 0===this._geolocationWatchID){let m;this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),this._numberOfWatches++,this._numberOfWatches>1?(m={maximumAge:6e5,timeout:0},this._noTimeout=!0):(m=this.options.positionOptions,this._noTimeout=!1),this._geolocationWatchID=this.options.geolocation.watchPosition(this._onSuccess,this._onError,m),this.options.showUserHeading&&this._addDeviceOrientationListener()}}else this.options.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0}_addDeviceOrientationListener(){const m=()=>{h.window.addEventListener("ondeviceorientationabsolute"in h.window?"deviceorientationabsolute":"deviceorientation",this._onDeviceOrientation)};void 0!==h.window.DeviceMotionEvent&&"function"==typeof h.window.DeviceMotionEvent.requestPermission?DeviceOrientationEvent.requestPermission().then(c=>{"granted"===c&&m()}).catch(console.error):m()}_clearWatch(){this.options.geolocation.clearWatch(this._geolocationWatchID),h.window.removeEventListener("deviceorientation",this._onDeviceOrientation),h.window.removeEventListener("deviceorientationabsolute",this._onDeviceOrientation),this._geolocationWatchID=void 0,this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","false"),this.options.showUserLocation&&this._updateMarker(null)}},AttributionControl:mi,ScaleControl:class{constructor(m){this.options=h.extend({},ic,m),function(){try{return new Intl.NumberFormat("en",{style:"unit",unitDisplay:"narrow",unit:"meter"}),!0}catch{return!1}}()||(this._setScale=va.bind(this)),h.bindAll(["_update","_setScale","setUnit"],this)}getDefaultPosition(){return"bottom-left"}_update(){const m=this.options.maxWidth||100,c=this._map,p=c._containerHeight/2,y=c._containerWidth/2-m/2,b=c.unproject([y,p]),C=c.unproject([y+m,p]),E=b.distanceTo(C);if("imperial"===this.options.unit){const T=3.2808*E;T>5280?this._setScale(m,T/5280,"mile"):this._setScale(m,T,"foot")}else"nautical"===this.options.unit?this._setScale(m,E/1852,"nautical-mile"):E>=1e3?this._setScale(m,E/1e3,"kilometer"):this._setScale(m,E,"meter")}_setScale(m,c,p){const y=Tp(c),b=y/c;this._map._requestDomTask(()=>{this._container.style.width=m*b+"px",this._container.innerHTML="nautical-mile"!==p?new Intl.NumberFormat(this._language,{style:"unit",unitDisplay:"narrow",unit:p}).format(y):`${y} nm`})}onAdd(m){return this._map=m,this._language=m.getLanguage(),this._container=Ie("div","mapboxgl-ctrl mapboxgl-ctrl-scale",m.getContainer()),this._container.dir="auto",this._map.on("move",this._update),this._update(),this._container}onRemove(){this._container.remove(),this._map.off("move",this._update),this._map=void 0}_setLanguage(m){this._language=m,this._update()}setUnit(m){this.options.unit=m,this._update()}},FullscreenControl:class{constructor(m){this._fullscreen=!1,m&&m.container&&(m.container instanceof h.window.HTMLElement?this._container=m.container:h.warnOnce("Full screen control 'container' must be a DOM element.")),h.bindAll(["_onClickFullscreen","_changeIcon"],this),"onfullscreenchange"in h.window.document?this._fullscreenchange="fullscreenchange":"onwebkitfullscreenchange"in h.window.document&&(this._fullscreenchange="webkitfullscreenchange")}onAdd(m){return this._map=m,this._container||(this._container=this._map.getContainer()),this._controlContainer=Ie("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._checkFullscreenSupport()?this._setupUI():(this._controlContainer.style.display="none",h.warnOnce("This device does not support fullscreen mode.")),this._controlContainer}onRemove(){this._controlContainer.remove(),this._map=null,h.window.document.removeEventListener(this._fullscreenchange,this._changeIcon)}_checkFullscreenSupport(){return!(!h.window.document.fullscreenEnabled&&!h.window.document.webkitFullscreenEnabled)}_setupUI(){const m=this._fullscreenButton=Ie("button","mapboxgl-ctrl-fullscreen",this._controlContainer);Ie("span","mapboxgl-ctrl-icon",m).setAttribute("aria-hidden","true"),m.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),h.window.document.addEventListener(this._fullscreenchange,this._changeIcon)}_updateTitle(){const m=this._getTitle();this._fullscreenButton.setAttribute("aria-label",m),this._fullscreenButton.firstElementChild&&this._fullscreenButton.firstElementChild.setAttribute("title",m)}_getTitle(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")}_isFullscreen(){return this._fullscreen}_changeIcon(){(h.window.document.fullscreenElement||h.window.document.webkitFullscreenElement)===this._container!==this._fullscreen&&(this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("mapboxgl-ctrl-shrink"),this._fullscreenButton.classList.toggle("mapboxgl-ctrl-fullscreen"),this._updateTitle())}_onClickFullscreen(){this._isFullscreen()?h.window.document.exitFullscreen?h.window.document.exitFullscreen():h.window.document.webkitCancelFullScreen&&h.window.document.webkitCancelFullScreen():this._container.requestFullscreen?this._container.requestFullscreen():this._container.webkitRequestFullscreen&&this._container.webkitRequestFullscreen()}},Popup:class extends h.Evented{constructor(m){super(),this.options=h.extend(Object.create(gs),m),h.bindAll(["_update","_onClose","remove","_onMouseEvent"],this),this._classList=new Set(m&&m.className?m.className.trim().split(/\s+/):[])}addTo(m){return this._map&&this.remove(),this._map=m,this.options.closeOnClick&&m.on("preclick",this._onClose),this.options.closeOnMove&&m.on("move",this._onClose),m.on("remove",this.remove),this._update(),m._addPopup(this),this._focusFirstElement(),this._trackPointer?(m.on("mousemove",this._onMouseEvent),m.on("mouseup",this._onMouseEvent),m._canvasContainer.classList.add("mapboxgl-track-pointer")):m.on("move",this._update),this.fire(new h.Event("open")),this}isOpen(){return!!this._map}remove(){this._content&&this._content.remove(),this._container&&(this._container.remove(),this._container=void 0);const m=this._map;return m&&(m.off("move",this._update),m.off("move",this._onClose),m.off("preclick",this._onClose),m.off("click",this._onClose),m.off("remove",this.remove),m.off("mousemove",this._onMouseEvent),m.off("mouseup",this._onMouseEvent),m.off("drag",this._onMouseEvent),m._canvasContainer&&m._canvasContainer.classList.remove("mapboxgl-track-pointer"),m._removePopup(this),this._map=void 0),this.fire(new h.Event("close")),this}getLngLat(){return this._lngLat}setLngLat(m){this._lngLat=h.LngLat.convert(m),this._pos=null,this._trackPointer=!1,this._update();const c=this._map;return c&&(c.on("move",this._update),c.off("mousemove",this._onMouseEvent),c._canvasContainer.classList.remove("mapboxgl-track-pointer")),this}trackPointer(){this._trackPointer=!0,this._pos=null,this._update();const m=this._map;return m&&(m.off("move",this._update),m.on("mousemove",this._onMouseEvent),m.on("drag",this._onMouseEvent),m._canvasContainer.classList.add("mapboxgl-track-pointer")),this}getElement(){return this._container}setText(m){return this.setDOMContent(h.window.document.createTextNode(m))}setHTML(m){const c=h.window.document.createDocumentFragment(),p=h.window.document.createElement("body");let y;for(p.innerHTML=m;y=p.firstChild,y;)c.appendChild(y);return this.setDOMContent(c)}getMaxWidth(){return this._container&&this._container.style.maxWidth}setMaxWidth(m){return this.options.maxWidth=m,this._update(),this}setDOMContent(m){let c=this._content;if(c)for(;c.hasChildNodes();)c.firstChild&&c.removeChild(c.firstChild);else c=this._content=Ie("div","mapboxgl-popup-content",this._container||void 0);if(c.appendChild(m),this.options.closeButton){const p=this._closeButton=Ie("button","mapboxgl-popup-close-button",c);p.type="button",p.setAttribute("aria-label","Close popup"),p.setAttribute("aria-hidden","true"),p.innerHTML="×",p.addEventListener("click",this._onClose)}return this._update(),this._focusFirstElement(),this}addClassName(m){return this._classList.add(m),this._updateClassList(),this}removeClassName(m){return this._classList.delete(m),this._updateClassList(),this}setOffset(m){return this.options.offset=m,this._update(),this}toggleClassName(m){let c;return this._classList.delete(m)?c=!1:(this._classList.add(m),c=!0),this._updateClassList(),c}_onMouseEvent(m){this._update(m.point)}_getAnchor(m){if(this.options.anchor)return this.options.anchor;const c=this._map,p=this._container,y=this._pos;if(!c||!p||!y)return"bottom";const b=p.offsetWidth,C=p.offsetHeight,E=y.xc.transform.width-b/2;if(y.y+mc.transform.height-C){if(E)return"bottom-left";if(T)return"bottom-right"}return E?"left":T?"right":"bottom"}_updateClassList(){const m=this._container;if(!m)return;const c=[...this._classList];c.push("mapboxgl-popup"),this._anchor&&c.push(`mapboxgl-popup-anchor-${this._anchor}`),this._trackPointer&&c.push("mapboxgl-popup-track-pointer"),m.className=c.join(" ")}_update(m){const c=this._map,p=this._content;if(!c||!this._lngLat&&!this._trackPointer||!p)return;let y=this._container;if(y||(y=this._container=Ie("div","mapboxgl-popup",c.getContainer()),this._tip=Ie("div","mapboxgl-popup-tip",y),y.appendChild(p)),this.options.maxWidth&&y.style.maxWidth!==this.options.maxWidth&&(y.style.maxWidth=this.options.maxWidth),c.transform.renderWorldCopies&&!this._trackPointer&&(this._lngLat=Ur(this._lngLat,this._pos,c.transform)),!this._trackPointer||m){const b=this._pos=this._trackPointer&&m?m:c.project(this._lngLat),C=Yu(this.options.offset),E=this._anchor=this._getAnchor(C.y),T=Yu(this.options.offset,E),k=b.add(T).round();c._requestDomTask(()=>{this._container&&E&&(this._container.style.transform=`${nc[E]} translate(${k.x}px,${k.y}px)`)})}if(!this._marker&&c._showingGlobe()){const b=h.isLngLatBehindGlobe(c.transform,this._lngLat)?0:1;this._setOpacity(b)}this._updateClassList()}_focusFirstElement(){if(!this.options.focusAfterOpen||!this._container)return;const m=this._container.querySelector(dh);m&&m.focus()}_onClose(){this.remove()}_setOpacity(m){this._container&&(this._container.style.opacity=`${m}`),this._content&&(this._content.style.pointerEvents=m?"auto":"none")}},Marker:ja,Style:Kr,LngLat:h.LngLat,LngLatBounds:h.LngLatBounds,Point:h.pointGeometry,MercatorCoordinate:h.MercatorCoordinate,FreeCameraOptions:Ql,Evented:h.Evented,config:h.config,prewarm:function(){En().acquire(Yt)},clearPrewarmedResources:function(){const m=Kt;m&&(m.isPreloaded()&&1===m.numActive()?(m.release(Yt),Kt=null):console.warn("Could not clear WebWorkers since there are active Map instances that still reference it. The pre-warmed WebWorker pool can only be cleared when all map instances have been removed with map.remove()"))},get accessToken(){return h.config.ACCESS_TOKEN},set accessToken(m){h.config.ACCESS_TOKEN=m},get baseApiUrl(){return h.config.API_URL},set baseApiUrl(m){h.config.API_URL=m},get workerCount(){return rn.workerCount},set workerCount(m){rn.workerCount=m},get maxParallelImageRequests(){return h.config.MAX_PARALLEL_IMAGE_REQUESTS},set maxParallelImageRequests(m){h.config.MAX_PARALLEL_IMAGE_REQUESTS=m},clearStorage(m){h.clearTileCache(m)},workerUrl:"",workerClass:null,setNow:h.exported.setNow,restoreNow:h.exported.restoreNow};return Hc}),it}()},6775:function(Gt){var it;it=function(){var Je=/^([a-zA-Z]{2,3})(?:[_-]+([a-zA-Z]{3})(?=$|[_-]+))?(?:[_-]+([a-zA-Z]{4})(?=$|[_-]+))?(?:[_-]+([a-zA-Z]{2}|[0-9]{3})(?=$|[_-]+))?/;function it(me){return me.match(Je)||[]}function Pe(me){return{language:(me=it(me))[1]||"",extlang:me[2]||"",script:me[3]||"",region:me[4]||""}}function h(me,Re,De){Object.defineProperty(me,Re,{value:De,enumerable:!0})}function $(me,Re,De){function Ie(ct){return it(ct)[me]||""}h(Ie,"pattern",Re),h(Pe,De,Ie)}return $(1,/^[a-zA-Z]{2,3}$/,"language"),$(2,/^[a-zA-Z]{3}$/,"extlang"),$(3,/^[a-zA-Z]{4}$/,"script"),$(4,/^[a-zA-Z]{2}$|^[0-9]{3}$/,"region"),h(Pe,"split",function tt(me){return it(me).filter(function(Re,De){return Re&&De})}),Pe},Gt.exports?Gt.exports=it():this.subtag=it()},5562:(Gt,Bt,Je)=>{"use strict";var it=Je(8576);Gt.exports=it,typeof window<"u"&&(window.Suggestions=it)},7554:Gt=>{"use strict";var Bt=function(Je){return this.component=Je,this.items=[],this.active=0,this.wrapper=document.createElement("div"),this.wrapper.className="suggestions-wrapper",this.element=document.createElement("ul"),this.element.className="suggestions",this.wrapper.appendChild(this.element),this.selectingListItem=!1,Je.el.parentNode.insertBefore(this.wrapper,Je.el.nextSibling),this};Bt.prototype.show=function(){this.element.style.display="block"},Bt.prototype.hide=function(){this.element.style.display="none"},Bt.prototype.add=function(Je){this.items.push(Je)},Bt.prototype.clear=function(){this.items=[],this.active=0},Bt.prototype.isEmpty=function(){return!this.items.length},Bt.prototype.isVisible=function(){return"block"===this.element.style.display},Bt.prototype.draw=function(){if(this.element.innerHTML="",0!==this.items.length){for(var Je=0;Je{"use strict";var it=Je(4703),tt=Je(5780),Pe=Je(7554),h=function($,me,Re){return this.options=it({minLength:2,limit:5,filter:!0,hideOnBlur:!0},Re=Re||{}),this.el=$,this.data=me||[],this.list=new Pe(this),this.query="",this.selected=null,this.list.draw(),this.el.addEventListener("keyup",function(De){this.handleKeyUp(De.keyCode)}.bind(this),!1),this.el.addEventListener("keydown",function(De){this.handleKeyDown(De)}.bind(this)),this.el.addEventListener("focus",function(){this.handleFocus()}.bind(this)),this.el.addEventListener("blur",function(){this.handleBlur()}.bind(this)),this.el.addEventListener("paste",function(De){this.handlePaste(De)}.bind(this)),this.render=this.options.render?this.options.render.bind(this):this.render.bind(this),this.getItemValue=this.options.getItemValue?this.options.getItemValue.bind(this):this.getItemValue.bind(this),this};h.prototype.handleKeyUp=function($){40===$||38===$||27===$||13===$||9===$||this.handleInputChange(this.el.value)},h.prototype.handleKeyDown=function($){switch($.keyCode){case 13:case 9:this.list.isEmpty()||(this.list.isVisible()&&$.preventDefault(),this.value(this.list.items[this.list.active].original),this.list.hide());break;case 27:this.list.isEmpty()||this.list.hide();break;case 38:this.list.previous();break;case 40:this.list.next()}},h.prototype.handleBlur=function(){!this.list.selectingListItem&&this.options.hideOnBlur&&this.list.hide()},h.prototype.handlePaste=function($){if($.clipboardData)this.handleInputChange($.clipboardData.getData("Text"));else{var me=this;setTimeout(function(){me.handleInputChange($.target.value)},100)}},h.prototype.handleInputChange=function($){this.query=this.normalize($),this.list.clear(),this.query.length-1},h.prototype.value=function($){if(this.selected=$,this.el.value=this.getItemValue($),document.createEvent){var me=document.createEvent("HTMLEvents");me.initEvent("change",!0,!1),this.el.dispatchEvent(me)}else this.el.fireEvent("onchange")},h.prototype.getCandidates=function($){var me={pre:"",post:"",extract:function(De){return this.getItemValue(De)}.bind(this)};$(this.options.filter?tt.filter(this.query,this.data,me).map(function(De){return{original:De.original,string:this.render(De.original,De.string)}}.bind(this)):this.data.map(function(De){return{original:De,string:this.render(De)}}.bind(this)))},h.prototype.getItemValue=function($){return $},h.prototype.render=function($,me){if(me)return me;for(var Re=this.getItemValue($.original?$.original:$),De=this.normalize(Re),Ie=De.lastIndexOf(this.query);Ie>-1;){var ct=Ie+this.query.length;Re=Re.slice(0,Ie)+""+Re.slice(Ie,ct)+""+Re.slice(ct),Ie=De.slice(0,Ie).lastIndexOf(this.query)}return Re},h.prototype.renderError=function($){this.list.drawError($)},Gt.exports=h},3740:Gt=>{var Bt=h.prototype,Je="WGS 84";function h(me){void 0!==me&&(Je=me),this.setEllipsoid(Je)}function $(me,Re){var De=Math.pow(10,Re);return Math.round(me*De)/De}Bt.convertLatLngToUtm=function(me,Re,De){var Ie;if(this.status)return"No ecclipsoid data associated with unknown datum: "+Je;if(!Number.isInteger(De))return"Precision is not integer number.";me=parseFloat(me);var ct=Re=parseFloat(Re),zt=this.toRadians(me),Ot=this.toRadians(ct);ct>=8&&ct<=13&&me>54.5&&me<58||me>=56&&me<64&&ct>=3&&ct<12?Ie=32:(Ie=(ct+180)/6+1,me>=72&&me<84&&(ct>=0&&ct<9?Ie=31:ct>=9&&ct<21?Ie=33:ct>=21&&ct<33?Ie=35:ct>=33&&ct<42&&(Ie=37))),Ie=parseInt(Ie);var At=this.toRadians(6*(Ie-1)-180+3),St=this.getUtmLetterDesignator(me),le=this.eccSquared/(1-this.eccSquared),Xe=this.a/Math.sqrt(1-this.eccSquared*Math.sin(zt)*Math.sin(zt)),Ee=Math.tan(zt)*Math.tan(zt),Ne=le*Math.cos(zt)*Math.cos(zt),xe=Math.cos(zt)*(Ot-At),ht=this.a*((1-this.eccSquared/4-3*this.eccSquared*this.eccSquared/64-5*this.eccSquared*this.eccSquared*this.eccSquared/256)*zt-(3*this.eccSquared/8+3*this.eccSquared*this.eccSquared/32+45*this.eccSquared*this.eccSquared*this.eccSquared/1024)*Math.sin(2*zt)+(15*this.eccSquared*this.eccSquared/256+45*this.eccSquared*this.eccSquared*this.eccSquared/1024)*Math.sin(4*zt)-35*this.eccSquared*this.eccSquared*this.eccSquared/3072*Math.sin(6*zt)),ot=parseFloat(.9996*Xe*(xe+(1-Ee+Ne)*xe*xe*xe/6+(5-18*Ee+Ee*Ee+72*Ne-58*le)*xe*xe*xe*xe*xe/120)+5e5),ft=parseFloat(.9996*(ht+Xe*Math.tan(zt)*(xe*xe/2+(5-Ee+9*Ne+4*Ne*Ne)*xe*xe*xe*xe/24+(61-58*Ee+Ee*Ee+600*Ne-330*le)*xe*xe*xe*xe*xe*xe/720)));return me<0&&(ft+=1e7),ft=$(ft,De),{Easting:ot=$(ot,De),Northing:ft,ZoneNumber:parseInt(Ie),ZoneLetter:St}},Bt.convertUtmToLatLng=function(me,Re,De,Ie){var ct=(1-Math.sqrt(1-this.eccSquared))/(1+Math.sqrt(1-this.eccSquared)),zt=me-5e5,Ot=Re,Ut=De;if(void 0===me)return"Please pass the UTMEasting!";if(void 0===Re)return"Please pass the UTMNorthing!";if(void 0===De)return"Please pass the UTMZoneNumber!";if(void 0===Ie)return"Please pass the UTMZoneLetter!";-1!==["N","P","Q","R","S","T","U","V","W","X","Y","Z"].indexOf(Ie)||(Ot-=1e7);var le=6*(Ut-1)-180+3,Xe=this.eccSquared/(1-this.eccSquared),Ne=Ot/.9996/(this.a*(1-this.eccSquared/4-3*this.eccSquared*this.eccSquared/64-5*this.eccSquared*this.eccSquared*this.eccSquared/256)),xe=Ne+(3*ct/2-27*ct*ct*ct/32)*Math.sin(2*Ne)+(21*ct*ct/16-55*ct*ct*ct*ct/32)*Math.sin(4*Ne)+151*ct*ct*ct/96*Math.sin(6*Ne),ot=(this.toDegrees(xe),this.a/Math.sqrt(1-this.eccSquared*Math.sin(xe)*Math.sin(xe))),ft=Math.tan(xe)*Math.tan(xe),Lt=Xe*Math.cos(xe)*Math.cos(xe),yn=this.a*(1-this.eccSquared)/Math.pow(1-this.eccSquared*Math.sin(xe)*Math.sin(xe),1.5),On=zt/(.9996*ot),Mi=xe-ot*Math.tan(xe)/yn*(On*On/2-(5+3*ft+10*Lt-4*Lt*Lt-9*Xe)*On*On*On*On/24+(61+90*ft+298*Lt+45*ft*ft-252*Xe-3*Lt*Lt)*On*On*On*On*On*On/720);Mi=this.toDegrees(Mi);var vn=(On-(1+2*ft+Lt)*On*On*On/6+(5-2*Lt+28*ft-3*Lt*Lt+8*Xe+24*ft*ft)*On*On*On*On*On/120)/Math.cos(xe);return{lat:Mi,lng:vn=le+this.toDegrees(vn)}},Bt.getUtmLetterDesignator=function(me){return 84>=(me=parseFloat(me))&&me>=72?"X":72>me&&me>=64?"W":64>me&&me>=56?"V":56>me&&me>=48?"U":48>me&&me>=40?"T":40>me&&me>=32?"S":32>me&&me>=24?"R":24>me&&me>=16?"Q":16>me&&me>=8?"P":8>me&&me>=0?"N":0>me&&me>=-8?"M":-8>me&&me>=-16?"L":-16>me&&me>=-24?"K":-24>me&&me>=-32?"J":-32>me&&me>=-40?"H":-40>me&&me>=-48?"G":-48>me&&me>=-56?"F":-56>me&&me>=-64?"E":-64>me&&me>=-72?"D":-72>me&&me>=-80?"C":"Z"},Bt.setEllipsoid=function(me){switch(me){case"Airy":this.a=6377563,this.eccSquared=.00667054;break;case"Australian National":case"South American 1969":this.a=6378160,this.eccSquared=.006694542;break;case"Bessel 1841":this.a=6377397,this.eccSquared=.006674372;break;case"Bessel 1841 Nambia":this.a=6377484,this.eccSquared=.006674372;break;case"Clarke 1866":this.a=6378206,this.eccSquared=.006768658;break;case"Clarke 1880":this.a=6378249,this.eccSquared=.006803511;break;case"Everest":this.a=6377276,this.eccSquared=.006637847;break;case"Fischer 1960 Mercury":this.a=6378166,this.eccSquared=.006693422;break;case"Fischer 1968":this.a=6378150,this.eccSquared=.006693422;break;case"GRS 1967":this.a=6378160,this.eccSquared=.006694605;break;case"GRS 1980":case"WGS 84":case"EUREF89":case"ETRS89":this.a=6378137,this.eccSquared=.00669438;break;case"Helmert 1906":this.a=6378200,this.eccSquared=.006693422;break;case"Hough":this.a=6378270,this.eccSquared=.00672267;break;case"International":case"ED50":this.a=6378388,this.eccSquared=.00672267;break;case"Krassovsky":this.a=6378245,this.eccSquared=.006693422;break;case"Modified Airy":this.a=6377340,this.eccSquared=.00667054;break;case"Modified Everest":this.a=6377304,this.eccSquared=.006637847;break;case"Modified Fischer 1960":this.a=6378155,this.eccSquared=.006693422;break;case"WGS 60":this.a=6378165,this.eccSquared=.006693422;break;case"WGS 66":this.a=6378145,this.eccSquared=.006694542;break;case"WGS 72":this.a=6378135,this.eccSquared=.006694318;break;default:this.status=!0}},Bt.toDegrees=function(me){return me/Math.PI*180},Bt.toRadians=function(me){return me*Math.PI/180},Gt.exports=h},4703:Gt=>{Gt.exports=function Je(){for(var it={},tt=0;tt{"use strict";Je.d(Bt,{x0:()=>h});let h=($=21)=>crypto.getRandomValues(new Uint8Array($)).reduce((me,Re)=>me+((Re&=63)<36?Re.toString(36):Re<62?(Re-26).toString(36).toUpperCase():Re>62?"-":"_"),"")}},Gt=>{Gt(Gt.s=9848)}]);