mapicgc-gl-js 0.0.39 → 0.0.40

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2564,7 +2564,7 @@ end`};t.events.push(["putFont",function(s){(function(a){var o=a.font,h=a.out,f=a
2564
2564
  xml:space="preserve">
2565
2565
  <image style="stroke: none; stroke-width: 0; stroke-dasharray: none; stroke-linecap: butt; stroke-dashoffset: 0; stroke-linejoin: miter; stroke-miterlimit: 4; fill: rgb(0,0,0); fill-rule: nonzero; opacity: 1;"
2566
2566
  xlink:href="${n}" width="${i}" height="${s}"></image>
2567
- </svg>`,o=document.createElement("a");o.href=`data:application/xml,${encodeURIComponent(a)}`,o.download=e,o.click(),o.remove()}toPixels(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:96;return this.unit===og.mm&&(e/=25.4),`${e*t}px`}toBlob(t){const e=atob(t.replace(/^.*,/,"")),n=new Uint8Array(e.length);for(let i=0;i<e.length;i+=1)n[i]=e.charCodeAt(i);return new Blob([n.buffer],{type:"image/png"})}},Xtt=class{constructor(t){Ai(this,"map"),Ai(this,"width"),Ai(this,"height"),Ai(this,"unit"),Ai(this,"svgCanvas"),Ai(this,"svgPath");var e,n,i;if(this.map=t,this.map===void 0)return;this.mapResize=this.mapResize.bind(this),this.map.on("resize",this.mapResize);const s=(e=this.map)==null?void 0:e.getCanvas().clientWidth,a=(n=this.map)==null?void 0:n.getCanvas().clientHeight,o=document.createElementNS("http://www.w3.org/2000/svg","svg");o.style.position="absolute",o.style.top="0px",o.style.left="0px",o.setAttribute("width",`${s}px`),o.setAttribute("height",`${a}px`);const h=document.createElementNS("http://www.w3.org/2000/svg","path");h.setAttribute("style","fill:#888888;stroke-width:0"),h.setAttribute("fill-opacity","0.5"),o.append(h),(i=this.map)==null||i.getCanvasContainer().appendChild(o),this.svgCanvas=o,this.svgPath=h}mapResize(){this.generateCutOut()}updateArea(t,e){this.width=t,this.height=e,this.unit=og.mm,this.generateCutOut()}generateCutOut(){var t,e;if(this.map===void 0||this.svgCanvas===void 0||this.svgPath===void 0)return;const n=this.toPixels(this.width),i=this.toPixels(this.height),s=(t=this.map)==null?void 0:t.getCanvas().clientWidth,a=(e=this.map)==null?void 0:e.getCanvas().clientHeight,o=s/2-n/2,h=o+n,f=a/2-i/2,g=f+i;this.svgCanvas.setAttribute("width",`${s}px`),this.svgCanvas.setAttribute("height",`${a}px`),this.svgPath.setAttribute("d",`M 0 0 L ${s} 0 L ${s} ${a} L 0 ${a} M ${o} ${f} L ${o} ${g} L ${h} ${g} L ${h} ${f}`)}destroy(){this.svgCanvas!==void 0&&(this.svgCanvas.remove(),this.svgCanvas=void 0),this.map!==void 0&&(this.map=void 0)}toPixels(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:96;return this.unit===og.mm&&(e/=25.4),e*t}};const _F={PageSize:"Page Size",PageOrientation:"Page Orientation",Format:"Format",DPI:"DPI",Generate:"Generate"},Jtt={PageSize:"Taille de page",PageOrientation:"Orientation de la page",Format:"Format",DPI:"DPI",Generate:"Générer"},Ytt={PageSize:"Sivukoko",PageOrientation:"Sivun suunta",Format:"Muoto",DPI:"DPI",Generate:"Generoi"},Ztt={PageSize:"Papierformat",PageOrientation:"Papierausrichtung",Format:"Dateiformat",DPI:"Druckauflösung",Generate:"Erstellen"},tet={PageSize:"Sidstorlek",PageOrientation:"Sidorientering",Format:"Format",DPI:"DPI",Generate:"Generera"},eet={PageSize:"Tamaño de página",PageOrientation:"Orientación de página",Format:"Formato",DPI:"DPI",Generate:"Generar"},ret={PageSize:"Kích thước trang",PageOrientation:"Loại trang",Format:"Định dạng",DPI:"Mật độ điểm ảnh (DPI)",Generate:"Tạo"},net={PageSize:"Розмір сторінки",PageOrientation:"Орієнтація сторінки",Format:"Формат",DPI:"DPI",Generate:"Згенерувати"},iet={PageSize:"页面大小",PageOrientation:"页面方向",Format:"格式",DPI:"像素",Generate:"导出"},set={PageSize:"頁面大小",PageOrientation:"頁面方向",Format:"格式",DPI:"像素",Generate:"導出"},oet={PageSize:"ページサイズ",PageOrientation:"ページ方向",Format:"フォーマット",DPI:"DPI(解像度)",Generate:"出力"};let aet=class{constructor(t){Ai(this,"controlContainer"),Ai(this,"exportContainer"),Ai(this,"crosshair"),Ai(this,"printableArea"),Ai(this,"map"),Ai(this,"exportButton"),Ai(this,"options",{PageSize:lf.A4,PageOrientation:ag.Landscape,Format:Iu.PDF,DPI:jw[300],Crosshair:!1,PrintableArea:!1,Local:"en",AllowedSizes:Object.keys(lf),Filename:"map"}),t&&(this.options=Object.assign(this.options,t)),this.onDocumentClick=this.onDocumentClick.bind(this)}getDefaultPosition(){return"top-right"}getTranslation(){switch(this.options.Local){case"de":return Ztt;case"en":return _F;case"fr":return Jtt;case"fi":return Ytt;case"sv":return tet;case"es":return eet;case"vi":return ret;case"uk":return net;case"zhHans":return iet;case"zhHant":return set;case"ja":return oet;default:return _F}}onAdd(t){var e;this.map=t,this.controlContainer=document.createElement("div"),this.controlContainer.classList.add("maplibregl-ctrl"),this.controlContainer.classList.add("maplibregl-ctrl-group"),this.exportContainer=document.createElement("div"),this.exportContainer.classList.add("maplibregl-export-list"),this.exportButton=document.createElement("button"),this.exportButton.classList.add("maplibregl-ctrl-icon"),this.exportButton.classList.add("maplibregl-export-control"),this.exportButton.type="button",this.exportButton.addEventListener("click",()=>{this.exportButton.style.display="none",this.exportContainer.style.display="block",this.toggleCrosshair(!0),this.togglePrintableArea(!0)}),document.addEventListener("click",this.onDocumentClick),this.controlContainer.appendChild(this.exportButton),this.controlContainer.appendChild(this.exportContainer);const n=document.createElement("TABLE");n.className="print-table";const i={};(e=this.options.AllowedSizes)==null||e.forEach(g=>{lf[g]&&(i[g]=lf[g])});const s=this.createSelection(i,this.getTranslation().PageSize,"page-size",this.options.PageSize,(g,b)=>JSON.stringify(g[b]));n.appendChild(s);const a=this.createSelection(ag,this.getTranslation().PageOrientation,"page-orientation",this.options.PageOrientation,(g,b)=>g[b]);n.appendChild(a);const o=this.createSelection(Iu,this.getTranslation().Format,"format-type",this.options.Format,(g,b)=>g[b]);n.appendChild(o);const h=this.createSelection(jw,this.getTranslation().DPI,"dpi-type",this.options.DPI,(g,b)=>g[b]);n.appendChild(h),this.exportContainer.appendChild(n);const f=document.createElement("button");return f.type="button",f.textContent=this.getTranslation().Generate,f.classList.add("generate-button"),f.addEventListener("click",()=>{const g=document.getElementById("mapbox-gl-export-page-size"),b=document.getElementById("mapbox-gl-export-page-orientation"),C=document.getElementById("mapbox-gl-export-format-type"),B=document.getElementById("mapbox-gl-export-dpi-type"),R=b.value;let D=JSON.parse(g.value);R===ag.Portrait&&(D=D.reverse()),new Wtt(t,D,Number(B.value),C.value,og.mm,this.options.Filename).generate()}),this.exportContainer.appendChild(f),this.controlContainer}createSelection(t,e,n,i,s){const a=document.createElement("label");a.textContent=e;const o=document.createElement("select");o.setAttribute("id",`mapbox-gl-export-${n}`),o.style.width="100%",Object.keys(t).forEach(b=>{const C=document.createElement("option");C.setAttribute("value",s(t,b)),C.appendChild(document.createTextNode(b)),C.setAttribute("name",n),i===t[b]&&(C.selected=!0),o.appendChild(C)}),o.addEventListener("change",()=>{this.updatePrintableArea()});const h=document.createElement("TR"),f=document.createElement("TD"),g=document.createElement("TD");return f.appendChild(a),g.appendChild(o),h.appendChild(f),h.appendChild(g),h}onRemove(){!this.controlContainer||!this.controlContainer.parentNode||!this.map||!this.exportButton||(this.exportButton.removeEventListener("click",this.onDocumentClick),this.controlContainer.parentNode.removeChild(this.controlContainer),document.removeEventListener("click",this.onDocumentClick),this.crosshair!==void 0&&(this.crosshair.destroy(),this.crosshair=void 0),this.map=void 0)}onDocumentClick(t){this.controlContainer&&!this.controlContainer.contains(t.target)&&this.exportContainer&&this.exportButton&&(this.exportContainer.style.display="none",this.exportButton.style.display="block",this.toggleCrosshair(!1),this.togglePrintableArea(!1))}toggleCrosshair(t){this.options.Crosshair===!0&&(t===!1?this.crosshair!==void 0&&(this.crosshair.destroy(),this.crosshair=void 0):(this.crosshair=new JZ(this.map),this.crosshair.create()))}togglePrintableArea(t){this.options.PrintableArea===!0&&(t===!1?this.printableArea!==void 0&&(this.printableArea.destroy(),this.printableArea=void 0):(this.printableArea=new Xtt(this.map),this.updatePrintableArea()))}updatePrintableArea(){if(this.printableArea===void 0)return;const t=document.getElementById("mapbox-gl-export-page-size"),e=document.getElementById("mapbox-gl-export-page-orientation").value;let n=JSON.parse(t.value);e===ag.Portrait&&(n=n.reverse()),this.printableArea.updateArea(n[0],n[1])}};var vF=Aet,cet=Object.prototype.hasOwnProperty;function Aet(){for(var r={},t=0;t<arguments.length;t++){var e=arguments[t];for(var n in e)cet.call(e,n)&&(r[n]=e[n])}return r}var bF={exports:{}};(function(r,t){(function(){var e={};r.exports=e,e.simpleFilter=function(n,i){return i.filter(function(s){return e.test(n,s)})},e.test=function(n,i){return e.match(n,i)!==null},e.match=function(n,i,s){s=s||{};var a=0,o=[],h=i.length,f=0,g=0,b=s.pre||"",C=s.post||"",B=s.caseSensitive&&i||i.toLowerCase(),R;n=s.caseSensitive&&n||n.toLowerCase();for(var D=0;D<h;D++)R=i[D],B[D]===n[a]?(R=b+R+C,a+=1,g+=1+g):g=0,f+=g,o[o.length]=R;return a===n.length?(f=B===n?1/0:f,{rendered:o.join(""),score:f}):null},e.filter=function(n,i,s){return!i||i.length===0?[]:typeof n!="string"?i:(s=s||{},i.reduce(function(a,o,h,f){var g=o;s.extract&&(g=s.extract(o));var b=e.match(n,g,s);return b!=null&&(a[a.length]={string:b.rendered,score:b.score,index:h,original:o}),a},[]).sort(function(a,o){var h=o.score-a.score;return h||a.index-o.index}))}})()})(bF);var uet=bF.exports,ua=function(r){return this.component=r,this.items=[],this.active=r.options.noInitialSelection?-1: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,r.el.parentNode.insertBefore(this.wrapper,r.el.nextSibling),this};ua.prototype.show=function(){this.element.style.display="block"},ua.prototype.hide=function(){this.element.style.display="none"},ua.prototype.add=function(r){this.items.push(r)},ua.prototype.clear=function(){this.items=[],this.active=this.component.options.noInitialSelection?-1:0},ua.prototype.isEmpty=function(){return!this.items.length},ua.prototype.isVisible=function(){return this.element.style.display==="block"},ua.prototype.draw=function(){if(this.element.innerHTML="",this.items.length===0){this.hide();return}for(var r=0;r<this.items.length;r++)this.drawItem(this.items[r],this.active===r);this.show()},ua.prototype.drawItem=function(r,t){var e=document.createElement("li"),n=document.createElement("a");t&&(e.className+=" active"),n.innerHTML=r.string,e.appendChild(n),this.element.appendChild(e),e.addEventListener("mousedown",(function(){this.selectingListItem=!0}).bind(this)),e.addEventListener("mouseup",(function(){this.handleMouseUp.call(this,r)}).bind(this))},ua.prototype.handleMouseUp=function(r){this.selectingListItem=!1,this.component.value(r.original),this.clear(),this.draw()},ua.prototype.move=function(r){this.active=r,this.draw()},ua.prototype.previous=function(){this.move(this.active<=0?this.items.length-1:this.active-1)},ua.prototype.next=function(){this.move(this.active>=this.items.length-1?0:this.active+1)},ua.prototype.drawError=function(r){var t=document.createElement("li");t.innerHTML=r,this.element.appendChild(t),this.show()};var het=ua,det=vF,fet=uet,pet=het,_o=function(r,t,e){return e=e||{},this.options=det({minLength:2,limit:5,filter:!0,hideOnBlur:!0,noInitialSelection:!0},e),this.el=r,this.data=t||[],this.list=new pet(this),this.query="",this.selected=null,this.list.draw(),this.el.addEventListener("keyup",(function(n){this.handleKeyUp(n.keyCode,n)}).bind(this),!1),this.el.addEventListener("keydown",(function(n){this.handleKeyDown(n)}).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(n){this.handlePaste(n)}).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};_o.prototype.handleKeyUp=function(r,t){if(!(r===40||r===38||r===27||r===9)){if(r===13){this.list.items[this.list.active]&&(this.list.handleMouseUp(this.list.items[this.list.active]),t.stopPropagation());return}this.handleInputChange(this.el.value)}},_o.prototype.handleKeyDown=function(r){switch(r.keyCode){case 13:this.list.active>=0&&(this.list.selectingListItem=!0);break;case 9:this.list.isEmpty()||(this.list.isVisible()&&r.preventDefault(),this.value(this.list.active>=0?this.list.items[this.list.active].original:null),this.list.hide());break;case 27:this.list.isEmpty()||this.list.hide();break;case 38:this.list.previous();break;case 40:this.list.next();break}},_o.prototype.handleBlur=function(){!this.list.selectingListItem&&this.options.hideOnBlur&&this.list.hide()},_o.prototype.handlePaste=function(r){if(r.clipboardData)this.handleInputChange(r.clipboardData.getData("Text"));else{var t=this;setTimeout(function(){t.handleInputChange(r.target.value)},100)}},_o.prototype.handleInputChange=function(r){if(this.query=this.normalize(r),this.list.clear(),this.query.length<this.options.minLength){this.list.draw();return}this.getCandidates((function(t){for(var e=0;e<t.length&&(this.list.add(t[e]),e!==this.options.limit-1);e++);this.list.draw()}).bind(this))},_o.prototype.handleFocus=function(){this.list.isEmpty()||this.list.show(),this.list.selectingListItem=!1},_o.prototype.update=function(r){this.data=r,this.handleKeyUp()},_o.prototype.clear=function(){this.data=[],this.list.clear()},_o.prototype.normalize=function(r){return r=r.toLowerCase(),r},_o.prototype.match=function(r,t){return r.indexOf(t)>-1},_o.prototype.value=function(r){if(this.selected=r,this.el.value=this.getItemValue(r||{place_name:this.query}),document.createEvent){var t=document.createEvent("HTMLEvents");t.initEvent("change",!0,!1),this.el.dispatchEvent(t)}else this.el.fireEvent("onchange")},_o.prototype.getCandidates=function(r){var t={pre:"<strong>",post:"</strong>",extract:(function(n){return this.getItemValue(n)}).bind(this)},e;this.options.filter?(e=fet.filter(this.query,this.data,t),e=e.map((function(n){return{original:n.original,string:this.render(n.original,n.string)}}).bind(this))):e=this.data.map((function(n){var i=this.render(n);return{original:n,string:i}}).bind(this)),r(e)},_o.prototype.getItemValue=function(r){return r},_o.prototype.render=function(r,t){if(t)return t;for(var e=r.original?this.getItemValue(r.original):this.getItemValue(r),n=this.normalize(e),i=n.lastIndexOf(this.query);i>-1;){var s=i+this.query.length;e=e.slice(0,i)+"<strong>"+e.slice(i,s)+"</strong>"+e.slice(s),i=n.slice(0,i).lastIndexOf(this.query)}return e},_o.prototype.renderError=function(r){this.list.drawError(r)};var get=_o,wF=get,met=wF;typeof window<"u"&&(window.Suggestions=wF);var yet="Expected a function",xF=NaN,_et="[object Symbol]",vet=/^\s+|\s+$/g,bet=/^[-+]0x[0-9a-f]+$/i,wet=/^0b[01]+$/i,xet=/^0o[0-7]+$/i,Bet=parseInt,Cet=typeof pd=="object"&&pd&&pd.Object===Object&&pd,Eet=typeof self=="object"&&self&&self.Object===Object&&self,Tet=Cet||Eet||Function("return this")(),Iet=Object.prototype,Let=Iet.toString,Fet=Math.max,Met=Math.min,qw=function(){return Tet.Date.now()};function Pet(r,t,e){var n,i,s,a,o,h,f=0,g=!1,b=!1,C=!0;if(typeof r!="function")throw new TypeError(yet);t=BF(t)||0,Kw(e)&&(g=!!e.leading,b="maxWait"in e,s=b?Fet(BF(e.maxWait)||0,t):s,C="trailing"in e?!!e.trailing:C);function B(pt){var yt=n,ft=i;return n=i=void 0,f=pt,a=r.apply(ft,yt),a}function R(pt){return f=pt,o=setTimeout(k,t),g?B(pt):a}function D(pt){var yt=pt-h,ft=pt-f,Dt=t-yt;return b?Met(Dt,s-ft):Dt}function Q(pt){var yt=pt-h,ft=pt-f;return h===void 0||yt>=t||yt<0||b&&ft>=s}function k(){var pt=qw();if(Q(pt))return j(pt);o=setTimeout(k,D(pt))}function j(pt){return o=void 0,C&&n?B(pt):(n=i=void 0,a)}function et(){o!==void 0&&clearTimeout(o),f=0,n=h=i=o=void 0}function st(){return o===void 0?a:j(qw())}function mt(){var pt=qw(),yt=Q(pt);if(n=arguments,i=this,h=pt,yt){if(o===void 0)return R(h);if(b)return o=setTimeout(k,t),B(h)}return o===void 0&&(o=setTimeout(k,t)),a}return mt.cancel=et,mt.flush=st,mt}function Kw(r){var t=typeof r;return!!r&&(t=="object"||t=="function")}function Uet(r){return!!r&&typeof r=="object"}function Ret(r){return typeof r=="symbol"||Uet(r)&&Let.call(r)==_et}function BF(r){if(typeof r=="number")return r;if(Ret(r))return xF;if(Kw(r)){var t=typeof r.valueOf=="function"?r.valueOf():r;r=Kw(t)?t+"":t}if(typeof r!="string")return r===0?r:+r;r=r.replace(vet,"");var e=wet.test(r);return e||xet.test(r)?Bet(r.slice(2),e?2:8):bet.test(r)?xF:+r}var Det=Pet,$w={exports:{}},Af=typeof Reflect=="object"?Reflect:null,CF=Af&&typeof Af.apply=="function"?Af.apply:function(t,e,n){return Function.prototype.apply.call(t,e,n)},ey;Af&&typeof Af.ownKeys=="function"?ey=Af.ownKeys:Object.getOwnPropertySymbols?ey=function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:ey=function(t){return Object.getOwnPropertyNames(t)};function Oet(r){console&&console.warn&&console.warn(r)}var EF=Number.isNaN||function(t){return t!==t};function ni(){ni.init.call(this)}$w.exports=ni,$w.exports.once=zet,ni.EventEmitter=ni,ni.prototype._events=void 0,ni.prototype._eventsCount=0,ni.prototype._maxListeners=void 0;var SF=10;function ry(r){if(typeof r!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof r)}Object.defineProperty(ni,"defaultMaxListeners",{enumerable:!0,get:function(){return SF},set:function(r){if(typeof r!="number"||r<0||EF(r))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+r+".");SF=r}}),ni.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},ni.prototype.setMaxListeners=function(t){if(typeof t!="number"||t<0||EF(t))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this};function TF(r){return r._maxListeners===void 0?ni.defaultMaxListeners:r._maxListeners}ni.prototype.getMaxListeners=function(){return TF(this)},ni.prototype.emit=function(t){for(var e=[],n=1;n<arguments.length;n++)e.push(arguments[n]);var i=t==="error",s=this._events;if(s!==void 0)i=i&&s.error===void 0;else if(!i)return!1;if(i){var a;if(e.length>0&&(a=e[0]),a instanceof Error)throw a;var o=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw o.context=a,o}var h=s[t];if(h===void 0)return!1;if(typeof h=="function")CF(h,this,e);else for(var f=h.length,g=PF(h,f),n=0;n<f;++n)CF(g[n],this,e);return!0};function IF(r,t,e,n){var i,s,a;if(ry(e),s=r._events,s===void 0?(s=r._events=Object.create(null),r._eventsCount=0):(s.newListener!==void 0&&(r.emit("newListener",t,e.listener?e.listener:e),s=r._events),a=s[t]),a===void 0)a=s[t]=e,++r._eventsCount;else if(typeof a=="function"?a=s[t]=n?[e,a]:[a,e]:n?a.unshift(e):a.push(e),i=TF(r),i>0&&a.length>i&&!a.warned){a.warned=!0;var o=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");o.name="MaxListenersExceededWarning",o.emitter=r,o.type=t,o.count=a.length,Oet(o)}return r}ni.prototype.addListener=function(t,e){return IF(this,t,e,!1)},ni.prototype.on=ni.prototype.addListener,ni.prototype.prependListener=function(t,e){return IF(this,t,e,!0)};function Net(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function LF(r,t,e){var n={fired:!1,wrapFn:void 0,target:r,type:t,listener:e},i=Net.bind(n);return i.listener=e,n.wrapFn=i,i}ni.prototype.once=function(t,e){return ry(e),this.on(t,LF(this,t,e)),this},ni.prototype.prependOnceListener=function(t,e){return ry(e),this.prependListener(t,LF(this,t,e)),this},ni.prototype.removeListener=function(t,e){var n,i,s,a,o;if(ry(e),i=this._events,i===void 0)return this;if(n=i[t],n===void 0)return this;if(n===e||n.listener===e)--this._eventsCount===0?this._events=Object.create(null):(delete i[t],i.removeListener&&this.emit("removeListener",t,n.listener||e));else if(typeof n!="function"){for(s=-1,a=n.length-1;a>=0;a--)if(n[a]===e||n[a].listener===e){o=n[a].listener,s=a;break}if(s<0)return this;s===0?n.shift():ket(n,s),n.length===1&&(i[t]=n[0]),i.removeListener!==void 0&&this.emit("removeListener",t,o||e)}return this},ni.prototype.off=ni.prototype.removeListener,ni.prototype.removeAllListeners=function(t){var e,n,i;if(n=this._events,n===void 0)return this;if(n.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):n[t]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete n[t]),this;if(arguments.length===0){var s=Object.keys(n),a;for(i=0;i<s.length;++i)a=s[i],a!=="removeListener"&&this.removeAllListeners(a);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(e=n[t],typeof e=="function")this.removeListener(t,e);else if(e!==void 0)for(i=e.length-1;i>=0;i--)this.removeListener(t,e[i]);return this};function FF(r,t,e){var n=r._events;if(n===void 0)return[];var i=n[t];return i===void 0?[]:typeof i=="function"?e?[i.listener||i]:[i]:e?Qet(i):PF(i,i.length)}ni.prototype.listeners=function(t){return FF(this,t,!0)},ni.prototype.rawListeners=function(t){return FF(this,t,!1)},ni.listenerCount=function(r,t){return typeof r.listenerCount=="function"?r.listenerCount(t):MF.call(r,t)},ni.prototype.listenerCount=MF;function MF(r){var t=this._events;if(t!==void 0){var e=t[r];if(typeof e=="function")return 1;if(e!==void 0)return e.length}return 0}ni.prototype.eventNames=function(){return this._eventsCount>0?ey(this._events):[]};function PF(r,t){for(var e=new Array(t),n=0;n<t;++n)e[n]=r[n];return e}function ket(r,t){for(;t+1<r.length;t++)r[t]=r[t+1];r.pop()}function Qet(r){for(var t=new Array(r.length),e=0;e<t.length;++e)t[e]=r[e].listener||r[e];return t}function zet(r,t){return new Promise(function(e,n){function i(a){r.removeListener(t,s),n(a)}function s(){typeof r.removeListener=="function"&&r.removeListener("error",i),e([].slice.call(arguments))}UF(r,t,s,{once:!0}),t!=="error"&&Het(r,i,{once:!0})})}function Het(r,t,e){typeof r.on=="function"&&UF(r,"error",t,e)}function UF(r,t,e,n){if(typeof r.on=="function")n.once?r.once(t,e):r.on(t,e);else if(typeof r.addEventListener=="function")r.addEventListener(t,function i(s){n.once&&r.removeEventListener(t,i),e(s)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof r)}var RF=$w.exports,Get={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]]}},Vet={de:"Suche",it:"Ricerca",en:"Search",nl:"Zoeken",fr:"Chercher",ca:"Cerca",he:"לחפש",ja:"サーチ",lv:"Meklēt",pt:"Procurar",sr:"Претрага",zh:"搜索",cs:"Vyhledávání",hu:"Keresés",ka:"ძიება",nb:"Søke",sk:"Vyhľadávanie",th:"ค้นหา",fi:"Hae",is:"Leita",ko:"수색",pl:"Szukaj",sl:"Iskanje",fa:"جستجو",ru:"Поиск"},jet={placeholder:Vet},DF={exports:{}};(function(r){(function(t,e,n){r.exports?r.exports=n():t[e]=n()})(pd,"subtag",function(){var t="",e=/^([a-zA-Z]{2,3})(?:[_-]+([a-zA-Z]{3})(?=$|[_-]+))?(?:[_-]+([a-zA-Z]{4})(?=$|[_-]+))?(?:[_-]+([a-zA-Z]{2}|[0-9]{3})(?=$|[_-]+))?/;function n(h){return h.match(e)||[]}function i(h){return n(h).filter(function(f,g){return f&&g})}function s(h){return h=n(h),{language:h[1]||t,extlang:h[2]||t,script:h[3]||t,region:h[4]||t}}function a(h,f,g){Object.defineProperty(h,f,{value:g,enumerable:!0})}function o(h,f,g){function b(C){return n(C)[h]||t}a(b,"pattern",f),a(s,g,b)}return o(1,/^[a-zA-Z]{2,3}$/,"language"),o(2,/^[a-zA-Z]{3}$/,"extlang"),o(3,/^[a-zA-Z]{4}$/,"script"),o(4,/^[a-zA-Z]{2}$|^[0-9]{3}$/,"region"),a(s,"split",i),s})})(DF);var qet=DF.exports,Ket=met,$et=Det,Na=vF,Wet=RF.EventEmitter,OF=Get,Xet=jet,Jet=qet;function NF(r,t){this._eventEmitter=new Wet,this.options=Na({},this.options,t),this.inputString="",this.fresh=!0,this.lastSelected=null,this.geocoderApi=r}NF.prototype={options:{zoom:16,flyTo:!0,trackProximity:!0,showResultsWhileTyping:!1,minLength:2,reverseGeocode:!1,limit:5,enableEventLogging:!0,marker:!0,popup:!1,maplibregl:null,collapsed:!1,clearAndBlurOnEsc:!1,clearOnBlur:!1,getItemValue:function(r){return r.text!==void 0?r.text:r.place_name},render:function(r){if(r.geometry){var o=r.place_name.split(",");return'<div class="mapboxgl-ctrl-geocoder--result maplibregl-ctrl-geocoder--result"><svg class="mapboxgl-ctrl-geocoder--result-icon maplibre-ctrl-geocoder--result-icon" viewBox="0 0 24 32" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M12 0C5.36571 0 0 5.38676 0 12.0471C0 21.0824 12 32 12 32C12 32 24 21.0824 24 12.0471C24 5.38676 18.6343 0 12 0ZM12 16.3496C9.63428 16.3496 7.71429 14.4221 7.71429 12.0471C7.71429 9.67207 9.63428 7.74454 12 7.74454C14.3657 7.74454 16.2857 9.67207 16.2857 12.0471C16.2857 14.4221 14.3657 16.3496 12 16.3496Z" fill="#687078"/></svg><div><div class="mapboxgl-ctrl-geocoder--result-title maplibregl-ctrl-geocoder--result-title">'+o[0]+'</div><div class="mapboxgl-ctrl-geocoder--result-address maplibregl-ctrl-geocoder--result-address">'+o.splice(1,o.length).join(",")+"</div></div></div>"}else{var t=r.text,e=t.toLowerCase().indexOf(this.query.toLowerCase()),n=this.query.length,i=t.substring(0,e),s=t.substring(e,e+n),a=t.substring(e+n);return'<div class="mapboxgl-ctrl-geocoder--suggestion maplibregl-ctrl-geocoder--suggestion"><svg class="mapboxgl-ctrl-geocoder--suggestion-icon maplibre-ctrl-geocoder--suggestion-icon" viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg"><path d="M22.8702 20.1258H21.4248L20.9125 19.6318C22.7055 17.546 23.785 14.8382 23.785 11.8925C23.785 5.32419 18.4608 0 11.8925 0C5.32419 0 0 5.32419 0 11.8925C0 18.4608 5.32419 23.785 11.8925 23.785C14.8382 23.785 17.546 22.7055 19.6318 20.9125L20.1258 21.4248V22.8702L29.2739 32L32 29.2739L22.8702 20.1258ZM11.8925 20.1258C7.33676 20.1258 3.65923 16.4483 3.65923 11.8925C3.65923 7.33676 7.33676 3.65923 11.8925 3.65923C16.4483 3.65923 20.1258 7.33676 20.1258 11.8925C20.1258 16.4483 16.4483 20.1258 11.8925 20.1258Z" fill="#687078"/></svg><div class="mapboxgl-ctrl-geocoder--suggestion-info maplibregl-ctrl-geocoder--suggestion-info"><div class="mapboxgl-ctrl-geocoder--suggestion-title maplibregl-ctrl-geocoder--suggestion-title">'+i+'<span class="mapboxgl-ctrl-geocoder--suggestion-match maplibregl-ctrl-geocoder--suggestion-match">'+s+"</span>"+a+"</div></div></div>"}},popupRender:function(r){var t=r.place_name.split(",");return'<div class="mapboxgl-ctrl-geocoder--suggestion maplibre-ctrl-geocoder--suggestion popup-suggestion"><div class="mapboxgl-ctrl-geocoder--suggestion-title maplibre-ctrl-geocoder--suggestion-title popup-suggestion-title">'+t[0]+'</div><div class="mapboxgl-ctrl-geocoder--suggestion-address maplibre-ctrl-geocoder--suggestion-address popup-suggestion-address">'+t.splice(1,t.length).join(",")+"</div></div>"},showResultMarkers:!0,debounceSearch:200},addTo:function(r){function t(n,i){if(!document.body.contains(i))throw new Error("Element provided to #addTo() exists, but is not in the DOM");var s=n.onAdd();i.appendChild(s)}if(r._controlContainer)r.addControl(this);else if(r instanceof HTMLElement)t(this,r);else if(typeof r=="string"){var e=document.querySelectorAll(r);if(e.length===0)throw new Error("Element ",r,"not found.");if(e.length>1)throw new Error("Geocoder can only be added to a single html element");t(this,e[0])}else throw new Error("Error: addTo must be a maplibre-gl-js map, an html element, or a CSS selector query for a single html element")},onAdd:function(r){if(r&&typeof r!="string"&&(this._map=r),this.setLanguage(),this.options.localGeocoderOnly&&!this.options.localGeocoder)throw new Error("A localGeocoder function must be specified to use localGeocoderOnly mode");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);var t=this.container=document.createElement("div");t.className="mapboxgl-ctrl-geocoder mapboxgl-ctrl maplibregl-ctrl-geocoder maplibregl-ctrl";var e=this.createIcon("search",'<path d="M7.4 2.5c-2.7 0-4.9 2.2-4.9 4.9s2.2 4.9 4.9 4.9c1 0 1.8-.2 2.5-.8l3.7 3.7c.2.2.4.3.8.3.7 0 1.1-.4 1.1-1.1 0-.3-.1-.5-.3-.8L11.4 10c.4-.8.8-1.6.8-2.5.1-2.8-2.1-5-4.8-5zm0 1.6c1.8 0 3.2 1.4 3.2 3.2s-1.4 3.2-3.2 3.2-3.3-1.3-3.3-3.1 1.4-3.3 3.3-3.3z"/>');this._inputEl=document.createElement("input"),this._inputEl.type="text",this._inputEl.className="mapboxgl-ctrl-geocoder--input maplibregl-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",$et(this._onKeyDown,this.options.debounceSearch)),this._inputEl.addEventListener("paste",this._onPaste),this._inputEl.addEventListener("change",this._onChange),this.container.addEventListener("mouseenter",this._showButton),this.container.addEventListener("mouseleave",this._hideButton);var n=document.createElement("div");n.classList.add("mapboxgl-ctrl-geocoder--pin-right","maplibregl-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 maplibregl-ctrl-geocoder--button";var i=this.createIcon("close",'<path d="M3.8 2.5c-.6 0-1.3.7-1.3 1.3 0 .3.2.7.5.8L7.2 9 3 13.2c-.3.3-.5.7-.5 1 0 .6.7 1.3 1.3 1.3.3 0 .7-.2 1-.5L9 10.8l4.2 4.2c.2.3.7.3 1 .3.6 0 1.3-.7 1.3-1.3 0-.3-.2-.7-.3-1l-4.4-4L15 4.6c.3-.2.5-.5.5-.8 0-.7-.7-1.3-1.3-1.3-.3 0-.7.2-1 .3L9 7.1 4.8 2.8c-.3-.1-.7-.3-1-.3z"/>');return this._clearEl.appendChild(i),this._loadingEl=this.createIcon("loading",'<path fill="#333" d="M4.4 4.4l.8.8c2.1-2.1 5.5-2.1 7.6 0l.8-.8c-2.5-2.5-6.7-2.5-9.2 0z"/><path opacity=".1" d="M12.8 12.9c-2.1 2.1-5.5 2.1-7.6 0-2.1-2.1-2.1-5.5 0-7.7l-.8-.8c-2.5 2.5-2.5 6.7 0 9.2s6.6 2.5 9.2 0 2.5-6.6 0-9.2l-.8.8c2.2 2.1 2.2 5.6 0 7.7z"/>'),n.appendChild(this._clearEl),n.appendChild(this._loadingEl),t.appendChild(e),t.appendChild(this._inputEl),t.appendChild(n),this._typeahead=new Ket(this._inputEl,[],{filter:!1,minLength:this.options.minLength,limit:this.options.limit,noInitialSelection:!0}),this.setRenderFunction(this.options.render),this._typeahead.getItemValue=this.options.getItemValue,this.mapMarker=null,this.resultMarkers=[],this._handleMarker=this._handleMarker.bind(this),this._handleResultMarkers=this._handleResultMarkers.bind(this),this._map&&(this.options.trackProximity&&(this._updateProximity(),this._map.on("moveend",this._updateProximity)),this._maplibregl=this.options.maplibregl,!this._maplibregl&&this.options.marker&&(console.error("No maplibregl detected in options. Map markers are disabled. Please set options.maplibregl."),this.options.marker=!1)),t},createIcon:function(r,t){var e=document.createElementNS("http://www.w3.org/2000/svg","svg");if(e.setAttribute("class","mapboxgl-ctrl-geocoder--icon mapboxgl-ctrl-geocoder--icon-"+r+" maplibregl-ctrl-geocoder--icon maplibregl-ctrl-geocoder--icon-"+r),e.setAttribute("viewBox","0 0 18 18"),e.setAttribute("xml:space","preserve"),e.setAttribute("width",18),e.setAttribute("height",18),"innerHTML"in e)e.innerHTML=t;else{var n=document.createElement("div");n.innerHTML="<svg>"+t.valueOf().toString()+"</svg>";var i=n.firstChild,s=i.firstChild;e.appendChild(s)}return e},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},_onPaste:function(r){var t=(r.clipboardData||window.clipboardData).getData("text");t.length>=this.options.minLength&&this.options.showResultsWhileTyping&&this._geocode(t)},_onKeyDown:function(r){var t=27,e=9;if(r.keyCode===t&&this.options.clearAndBlurOnEsc)return this._clear(r),this._inputEl.blur();var n=r.target&&r.target.shadowRoot?r.target.shadowRoot.activeElement:r.target,i=n?n.value:"";if(!i)return this.fresh=!0,r.keyCode!==e&&this.clear(r),this._clearEl.style.display="none";if(!(r.metaKey||[e,t,37,39,38,40].indexOf(r.keyCode)!==-1)){if(r.keyCode===13)if(!this.options.showResultsWhileTyping)this._typeahead.selected||this._geocode(n.value);else{this._typeahead.selected==null&&this.geocoderApi.getSuggestions?this._geocode(n.value,!0):this._typeahead.selected==null&&this.options.showResultMarkers&&this._fitBoundsForMarkers();return}n.value.length>=this.options.minLength&&this.options.showResultsWhileTyping&&this._geocode(n.value)}},_showButton:function(){this._inputEl.value.length>0&&(this._clearEl.style.display="block")},_hideButton:function(){this._typeahead.selected&&(this._clearEl.style.display="none")},_onBlur:function(r){this.options.clearOnBlur&&this._clearOnBlur(r),this.options.collapsed&&this._collapse()},_onChange:function(){var r=this._typeahead.selected;if(r&&!r.geometry)r.placeId?this._geocode(r.placeId,!0,!0):this._geocode(r.text,!0);else if(r&&JSON.stringify(r)!==this.lastSelected){if(this._clearEl.style.display="none",this.options.flyTo){var t;if(this._removeResultMarkers(),r.properties&&OF[r.properties.short_code])t=Na({},this.options.flyTo),this._map&&this._map.fitBounds(OF[r.properties.short_code].bbox,t);else if(r.bbox){var e=r.bbox;t=Na({},this.options.flyTo),this._map&&this._map.fitBounds([[e[0],e[1]],[e[2],e[3]]],t)}else{var n={zoom:this.options.zoom};t=Na({},n,this.options.flyTo),r.center?t.center=r.center:r.geometry&&r.geometry.type&&r.geometry.type==="Point"&&r.geometry.coordinates&&(t.center=r.geometry.coordinates),this._map&&this._map.flyTo(t)}}this.options.marker&&this._maplibregl&&this._handleMarker(r),this._inputEl.focus(),this._inputEl.scrollLeft=0,this._inputEl.setSelectionRange(0,0),this.lastSelected=JSON.stringify(r),this._typeahead.selected=null,this._eventEmitter.emit("result",{result:r})}},_getConfigForRequest:function(){var r=["bbox","limit","proximity","countries","types","language","reverseMode"],t=this,e=r.reduce(function(n,i){return t.options[i]&&(["countries","types","language"].indexOf(i)>-1?n[i]=t.options[i].split(/[\s,]+/):n[i]=t.options[i],i==="proximity"&&t.options[i]&&typeof t.options[i].longitude=="number"&&typeof t.options[i].latitude=="number"&&(n[i]=[t.options[i].longitude,t.options[i].latitude])),n},{});return e},_geocode:function(r,t,e){this._loadingEl.style.display="block",this._eventEmitter.emit("loading",{query:r}),this.inputString=r;var n=null,i=this._getConfigForRequest(),s;if(this.options.localGeocoderOnly)s=Promise.resolve();else if(this.options.reverseGeocode&&/(-?\d+\.?\d*)[, ]+(-?\d+\.?\d*)[ ]*$/.test(r)){var a=r.split(/[\s(,)?]+/).map(function(f){return parseFloat(f,10)}).reverse();i.types&&i.types[0],i=Na(i,{query:a,limit:1}),"proximity"in i&&delete i.proximity,s=this.geocoderApi.reverseGeocode(i)}else i=Na(i,{query:r}),this.geocoderApi.getSuggestions?t?this.geocoderApi.searchByPlaceId&&e?s=this.geocoderApi.searchByPlaceId(i):s=this.geocoderApi.forwardGeocode(i):s=this.geocoderApi.getSuggestions(i):s=this.geocoderApi.forwardGeocode(i);var o=[];this.options.localGeocoder&&(o=this.options.localGeocoder(r),o||(o=[]));var h=[];return s.catch((function(f){n=f}).bind(this)).then((function(f){this._loadingEl.style.display="none";var g={};return f?g=f:g={type:"FeatureCollection",features:[]},g.config=i,this.fresh&&(this.fresh=!1),g.features=g.features?o.concat(g.features):o,this.options.externalGeocoder?(h=this.options.externalGeocoder(r,g.features,i)||[],h.then(function(b){return g.features=g.features?b.concat(g.features):b,g},function(){return g})):g}).bind(this)).then((function(f){if(n)throw n;this.options.filter&&f.features.length&&(f.features=f.features.filter(this.options.filter));var g=[];f.suggestions?g=f.suggestions:f.place?g=[f.place]:g=f.features,g.length?(this._clearEl.style.display="block",this._typeahead.update(g),(!this.options.showResultsWhileTyping||t)&&this.options.showResultMarkers&&(f.features.length>0||f.place)&&this._fitBoundsForMarkers(),this._eventEmitter.emit("results",f)):(this._clearEl.style.display="none",this._typeahead.selected=null,this._renderNoResults(),this._eventEmitter.emit("results",f))}).bind(this)).catch((function(f){this._loadingEl.style.display="none",o.length&&this.options.localGeocoder||h.length&&this.options.externalGeocoder?(this._clearEl.style.display="block",this._typeahead.update(o)):(this._clearEl.style.display="none",this._typeahead.selected=null,this._renderError()),this._eventEmitter.emit("results",{features:o}),this._eventEmitter.emit("error",{error:f})}).bind(this)),s},_clear:function(r){r&&r.preventDefault(),this._inputEl.value="",this._typeahead.selected=null,this._typeahead.clear(),this._onChange(),this._clearEl.style.display="none",this._removeMarker(),this._removeResultMarkers(),this.lastSelected=null,this._eventEmitter.emit("clear"),this.fresh=!0},clear:function(r){this._clear(r),this._inputEl.focus()},_clearOnBlur:function(r){var t=this;r.relatedTarget&&t._clear(r)},_onQueryResult:function(r){var t=r;if(t.features.length){var e=t.features[0];this._typeahead.selected=e,this._inputEl.value=e.place_name,this._onChange()}},_updateProximity:function(){if(this._map)if(this._map.getZoom()>9){var r=this._map.getCenter().wrap();this.setProximity({longitude:r.lng,latitude:r.lat})}else this.setProximity(null)},_collapse:function(){!this._inputEl.value&&this._inputEl!==document.activeElement&&this.container.classList.add("mapboxgl-ctrl-geocoder--collapsed","maplibregl-ctrl-geocoder--collapsed")},_unCollapse:function(){this.container.classList.remove("mapboxgl-ctrl-geocoder--collapsed","maplibregl-ctrl-geocoder--collapsed")},query:function(r){return this._geocode(r).then(this._onQueryResult),this},_renderError:function(){var r="<div class='mapbox-gl-geocoder--error maplibre-gl-geocoder--error'>There was an error reaching the server</div>";this._renderMessage(r)},_renderNoResults:function(){var r="<div class='mapbox-gl-geocoder--error mapbox-gl-geocoder--no-results maplibre-gl-geocoder--error maplibre-gl-geocoder--no-results'>No results found</div>";this._renderMessage(r)},_renderMessage:function(r){this._typeahead.update([]),this._typeahead.selected=null,this._typeahead.clear(),this._typeahead.renderError(r)},_getPlaceholderText:function(){if(this.options.placeholder)return this.options.placeholder;if(this.options.language){var r=this.options.language.split(",")[0],t=Jet.language(r),e=Xet.placeholder[t];if(e)return e}return"Search"},_fitBoundsForMarkers:function(){if(!(this._typeahead.data.length<1)){var r=this._typeahead.data.filter(function(i){return typeof i!="string"}).slice(0,this.options.limit);if(this._clearEl.style.display="none",this.options.flyTo&&this._maplibregl&&this._map){var t={padding:100},e=Na({},t,this.options.flyTo),n=new this._maplibregl.LngLatBounds;r.forEach(function(i){n.extend(i.geometry.coordinates)}),this._map.fitBounds(n.toArray(),e)}return r.length>0&&this._maplibregl&&this._handleResultMarkers(r),this}},setInput:function(r){return this._inputEl.value=r,this._typeahead.selected=null,this._typeahead.clear(),r.length>=this.options.minLength&&this.options.showResultsWhileTyping&&this._geocode(r),this},setProximity:function(r){return this.options.proximity=r,this},getProximity:function(){return this.options.proximity},setRenderFunction:function(r){return r&&typeof r=="function"&&(this._typeahead.render=r),this},getRenderFunction:function(){return this._typeahead.render},setLanguage:function(r){var t=navigator.language||navigator.userLanguage||navigator.browserLanguage;return this.options.language=r||this.options.language||t,this},getLanguage:function(){return this.options.language},getZoom:function(){return this.options.zoom},setZoom:function(r){return this.options.zoom=r,this},getFlyTo:function(){return this.options.flyTo},setFlyTo:function(r){return this.options.flyTo=r,this},getPlaceholder:function(){return this.options.placeholder},setPlaceholder:function(r){return this.placeholder=r||this._getPlaceholderText(),this._inputEl.placeholder=this.placeholder,this._inputEl.setAttribute("aria-label",this.placeholder),this},getBbox:function(){return this.options.bbox},setBbox:function(r){return this.options.bbox=r,this},getCountries:function(){return this.options.countries},setCountries:function(r){return this.options.countries=r,this},getTypes:function(){return this.options.types},setTypes:function(r){return this.options.types=r,this},getMinLength:function(){return this.options.minLength},setMinLength:function(r){return this.options.minLength=r,this._typeahead&&(this._typeahead.options.minLength=r),this},getLimit:function(){return this.options.limit},setLimit:function(r){return this.options.limit=r,this._typeahead&&(this._typeahead.options.limit=r),this},getFilter:function(){return this.options.filter},setFilter:function(r){return this.options.filter=r,this},setGeocoderApi:function(r){return this.geocoderApi=r,this},getGeocoderApi:function(){return this.geocoderApi},_handleMarker:function(r){if(this._map){this._removeMarker();var t={color:"#4668F2"},e=Na({},t,this.options.marker);this.mapMarker=new this._maplibregl.Marker(e);var n;if(this.options.popup){var i={},s=Na({},i,this.options.popup);n=new this._maplibregl.Popup(s).setHTML(this.options.popupRender(r))}return r.center?(this.mapMarker.setLngLat(r.center).addTo(this._map),this.options.popup&&this.mapMarker.setPopup(n)):r.geometry&&r.geometry.type&&r.geometry.type==="Point"&&r.geometry.coordinates&&(this.mapMarker.setLngLat(r.geometry.coordinates).addTo(this._map),this.options.popup&&this.mapMarker.setPopup(n)),this}},_removeMarker:function(){this.mapMarker&&(this.mapMarker.remove(),this.mapMarker=null)},_handleResultMarkers:function(r){if(this._map){this._removeResultMarkers();var t={color:"#4668F2"},e=Na({},t,this.options.showResultMarkers);return r.forEach((function(n){if(this.options.showResultMarkers&&this.options.showResultMarkers.element){var i=this.options.showResultMarkers.element.cloneNode(!0);e=Na(e,{element:i})}var s=new this._maplibregl.Marker(Na({},e,{element:i})),a;if(this.options.popup){var o={},h=Na({},o,this.options.popup);a=new this._maplibregl.Popup(h).setHTML(this.options.popupRender(n))}n.center?(s.setLngLat(n.center).addTo(this._map),this.options.popup&&s.setPopup(a)):n.geometry&&n.geometry.type&&n.geometry.type==="Point"&&n.geometry.coordinates&&(s.setLngLat(n.geometry.coordinates).addTo(this._map),this.options.popup&&s.setPopup(a)),this.resultMarkers.push(s)}).bind(this)),this}},_removeResultMarkers:function(){this.resultMarkers&&this.resultMarkers.length>0&&(this.resultMarkers.forEach(function(r){r.remove()}),this.resultMarkers=[])},on:function(r,t){return this._eventEmitter.on(r,t),this},off:function(r,t){return this._eventEmitter.removeListener(r,t),this}};var Yet=NF;const Zet=Bm(Yet),ny={ICGC5M:"https://tilemaps.icgc.cat/tileserver/tileserver/terreny-5m-30m-rgb-extent/{z}/{x}/{y}.png",WORLD30M:"https://s3.amazonaws.com/elevation-tiles-prod/terrarium/{z}/{x}/{y}.png"},uf={TOPO:"https://geoserveis.icgc.cat/contextmaps/icgc_mapa_estandard_general.json",ORTO:"https://geoserveis.icgc.cat/contextmaps/icgc_orto_estandard.json",ORTO3D:"https://tilemaps.icgc.cat/cdn/styles/icgc_orto_3d.json",ADMIN:"https://geoserveis.icgc.cat/contextmaps/icgc_delimitacio_limits_administratius.json",DARK:"https://geoserveis.icgc.cat/contextmaps/icgc_mapa_base_fosc.json",LIGHT:"https://geoserveis.icgc.cat/contextmaps/icgc_mapa_base_gris.json",GEOLOGY:"https://geoserveis.icgc.cat/contextmaps/icgc_geologic_informacio.json"},vo={Orto:{ortofotoColorProvisional:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_provisional",ortofotoColor2022:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2022",ortofotoColor2021:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2021",ortofotoColor2020:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2020",ortofotoColor2019:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2019",ortofotoColor2018:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2018",ortofotoColor2017:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2017",ortofotoColor2016:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2016",ortofotoColor2015:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2015",ortofotoColor2014:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2014",ortofotoColor2013:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2013",ortofotoColor2012:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2012",ortofotoColor2011:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2011",ortofotoColor2010:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2010",ortofotoColor2009:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2009",ortofotoColor2008:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2008",ortofotoColor20062007:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2006-2007",ortofotoColor20042005:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2004-2005",ortofotoColor20002003:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2000-2003",ortofotoBlancINegre1998:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_blanc_i_negre_1998",ortofotoBlancINegre19941997:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_blanc_i_negre_1994-1997",ortofotoColor1993:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_1993",ortofotoBlancINegre19831992:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_blanc_i_negre_1983-1992",ortofotoBlancINegre19701977:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_blanc_i_negre_1970-1977",ortofotoBlancINegre1956:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_blanc_i_negre_1956",ortofotoBlancINegre1945:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_blanc_i_negre_1945",ortofotoColorSerieAnual:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_serie_anual",ortofotoInfraroigProvisional:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_provisional",ortofotoInfraroig2022:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2022",ortofotoInfraroig2021:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2021",ortofotoInfraroig2020:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2020",ortofotoInfraroig2019:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2019",ortofotoInfraroig2018:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2018",ortofotoInfraroig2017:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2017",ortofotoInfraroig2016:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2016",ortofotoInfraroig2015:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2015",ortofotoInfraroig2014:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2014",ortofotoInfraroig2013:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2013",ortofotoInfraroig2012:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2012",ortofotoInfraroig2011:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2011",ortofotoInfraroig2010:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2010",ortofotoInfraroig2009:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2009",ortofotoInfraroig2008:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2008",ortofotoInfraroig20062007:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2006-2007",ortofotoInfraroig19961997:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_1996-1997",ortofotoInfraroigSerieAnual:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_serie_anual"},VectorAdmin:{agrupacionsCensals2015:"https://tilemaps.icgc.cat/vector/fgb/agrupacions_censals_2015.fgb",agrupacionsCensals2016:"https://tilemaps.icgc.cat/vector/fgb/agrupacions_censals_2016.fgb",agrupacionsCensals2017:"https://tilemaps.icgc.cat/vector/fgb/agrupacions_censals_2017.fgb",agrupacionsCensals2018:"https://tilemaps.icgc.cat/vector/fgb/agrupacions_censals_2018.fgb",agrupacionsCensals2019:"https://tilemaps.icgc.cat/vector/fgb/agrupacions_censals_2019.fgb",agrupacionsCensals2020:"https://tilemaps.icgc.cat/vector/fgb/agrupacions_censals_2020.fgb",agrupacionsCensals2021:"https://tilemaps.icgc.cat/vector/fgb/agrupacions_censals_2021.fgb",agrupacionsCensalsVigent:"https://tilemaps.icgc.cat/vector/fgb/agrupacions_censals_vigent.fgb",agrupacionsCensalsVigentText:"https://tilemaps.icgc.cat/vector/fgb/agrupacions_censals_vigent_text.fgb",areesBasiquesPolicials2019:"https://tilemaps.icgc.cat/vector/fgb/arees_basiques_policials_2019.fgb",areesBasiquesPolicials2020:"https://tilemaps.icgc.cat/vector/fgb/arees_basiques_policials_2020.fgb",areesBasiquesPolicials2022:"https://tilemaps.icgc.cat/vector/fgb/arees_basiques_policials_2022.fgb",areesBasiquesPolicialsVigent:"https://tilemaps.icgc.cat/vector/fgb/arees_basiques_policials_vigent.fgb",areesBasiquesPolicialsVigentText:"https://tilemaps.icgc.cat/vector/fgb/arees_basiques_policials_vigent_text.fgb",areesBasiquesSalutVigent:"https://tilemaps.icgc.cat/vector/fgb/arees_basiques_salut_vigent.fgb",areesBasiquesServeisSocialsVigent:"https://tilemaps.icgc.cat/vector/fgb/arees_basiques_serveis_socials_vigent.fgb",areesBasiquesServeisSocialsVigentText:"https://tilemaps.icgc.cat/vector/fgb/arees_basiques_serveis_socials_vigent_text.fgb",areesGestioAssistencialVigent:"https://tilemaps.icgc.cat/vector/fgb/arees_gestio_assistencial_vigent.fgb",areesHidrogeologiquesAquifersVigent:"https://tilemaps.icgc.cat/vector/fgb/arees_hidrogeologiques_aquifers_vigent.fgb",catalunyaVigent:"https://tilemaps.icgc.cat/vector/fgb/catalunya_vigent.fgb",catalunyaVigentText:"https://tilemaps.icgc.cat/vector/fgb/catalunya_vigent_text.fgb",comarques2022:"https://tilemaps.icgc.cat/vector/fgb/comarques_2022.fgb",comarquesVigent:"https://tilemaps.icgc.cat/vector/fgb/comarques_vigent.fgb",comarquesVigentText:"https://tilemaps.icgc.cat/vector/fgb/comarques_vigent_text.fgb",districtesCensals2002:"https://tilemaps.icgc.cat/vector/fgb/districtes_censals_2002.fgb",districtesCensals2003:"https://tilemaps.icgc.cat/vector/fgb/districtes_censals_2003.fgb",districtesCensals2004:"https://tilemaps.icgc.cat/vector/fgb/districtes_censals_2004.fgb",districtesCensals2005:"https://tilemaps.icgc.cat/vector/fgb/districtes_censals_2005.fgb",districtesCensals2006:"https://tilemaps.icgc.cat/vector/fgb/districtes_censals_2006.fgb",districtesCensals2007:"https://tilemaps.icgc.cat/vector/fgb/districtes_censals_2007.fgb",districtesCensals2008:"https://tilemaps.icgc.cat/vector/fgb/districtes_censals_2008.fgb",districtesCensals2009:"https://tilemaps.icgc.cat/vector/fgb/districtes_censals_2009.fgb",districtesCensals2010:"https://tilemaps.icgc.cat/vector/fgb/districtes_censals_2010.fgb",districtesCensals2011:"https://tilemaps.icgc.cat/vector/fgb/districtes_censals_2011.fgb",districtesCensals2012:"https://tilemaps.icgc.cat/vector/fgb/districtes_censals_2012.fgb",districtesCensals2013:"https://tilemaps.icgc.cat/vector/fgb/districtes_censals_2013.fgb",districtesCensals2014:"https://tilemaps.icgc.cat/vector/fgb/districtes_censals_2014.fgb",districtesCensals2015:"https://tilemaps.icgc.cat/vector/fgb/districtes_censals_2015.fgb",districtesCensals2016:"https://tilemaps.icgc.cat/vector/fgb/districtes_censals_2016.fgb",districtesCensals2017:"https://tilemaps.icgc.cat/vector/fgb/districtes_censals_2017.fgb",districtesCensals2018:"https://tilemaps.icgc.cat/vector/fgb/districtes_censals_2018.fgb",districtesCensals2019:"https://tilemaps.icgc.cat/vector/fgb/districtes_censals_2019.fgb",districtesCensals2020:"https://tilemaps.icgc.cat/vector/fgb/districtes_censals_2020.fgb",districtesCensals2021:"https://tilemaps.icgc.cat/vector/fgb/districtes_censals_2021.fgb",districtesCensals2022:"https://tilemaps.icgc.cat/vector/fgb/districtes_censals_2022.fgb",districtesCensalsVigent:"https://tilemaps.icgc.cat/vector/fgb/districtes_censals_vigent.fgb",districtesCensalsVigentText:"https://tilemaps.icgc.cat/vector/fgb/districtes_censals_vigent_text.fgb",incendisForestalsVigent:"https://tilemaps.icgc.cat/vector/fgb/incendis_forestals_vigent.fgb",incendisForestalsVigentText:"https://tilemaps.icgc.cat/vector/fgb/incendis_forestals_vigent_text.fgb",municipis2022:"https://tilemaps.icgc.cat/vector/fgb/municipis_2022.fgb",municipis2022Text:"https://tilemaps.icgc.cat/vector/fgb/municipis_2022_text.fgb",municipisVigent:"https://tilemaps.icgc.cat/vector/fgb/municipis_vigent.fgb",municipisVigentText:"https://tilemaps.icgc.cat/vector/fgb/municipis_vigent_text.fgb",partitsJudicialsVigent:"https://tilemaps.icgc.cat/vector/fgb/partits_judicials_vigent.fgb",partitsJudicialsVigentText:"https://tilemaps.icgc.cat/vector/fgb/partits_judicials_vigent_text.fgb",plaTerritorial2015:"https://tilemaps.icgc.cat/vector/fgb/pla_territorial_2015.fgb",plaTerritorialVigent:"https://tilemaps.icgc.cat/vector/fgb/pla_territorial_vigent.fgb",plaTerritorialVigentText:"https://tilemaps.icgc.cat/vector/fgb/pla_territorial_vigent_text.fgb",provinciesVigent:"https://tilemaps.icgc.cat/vector/fgb/provincies_vigent.fgb",provinciesVigentText:"https://tilemaps.icgc.cat/vector/fgb/provincies_vigent_text.fgb",regionsPolicialsVigent:"https://tilemaps.icgc.cat/vector/fgb/regions_policials_vigent.fgb",regionsPolicialsVigentText:"https://tilemaps.icgc.cat/vector/fgb/regions_policials_vigent_text.fgb",regionsSanitariesVigent:"https://tilemaps.icgc.cat/vector/fgb/regions_sanitaries_vigent.fgb",regionsSanitariesVigentText:"https://tilemaps.icgc.cat/vector/fgb/regions_sanitaries_vigent_text.fgb",seccionsCensals2002:"https://tilemaps.icgc.cat/vector/fgb/seccions_censals_2002.fgb",seccionsCensals2003:"https://tilemaps.icgc.cat/vector/fgb/seccions_censals_2003.fgb",seccionsCensals2004:"https://tilemaps.icgc.cat/vector/fgb/seccions_censals_2004.fgb",seccionsCensals2005:"https://tilemaps.icgc.cat/vector/fgb/seccions_censals_2005.fgb",seccionsCensals2006:"https://tilemaps.icgc.cat/vector/fgb/seccions_censals_2006.fgb",seccionsCensals2007:"https://tilemaps.icgc.cat/vector/fgb/seccions_censals_2007.fgb",seccionsCensals2008:"https://tilemaps.icgc.cat/vector/fgb/seccions_censals_2008.fgb",seccionsCensals2009:"https://tilemaps.icgc.cat/vector/fgb/seccions_censals_2009.fgb",seccionsCensals2010:"https://tilemaps.icgc.cat/vector/fgb/seccions_censals_2010.fgb",seccionsCensals2011:"https://tilemaps.icgc.cat/vector/fgb/seccions_censals_2011.fgb",seccionsCensals2012:"https://tilemaps.icgc.cat/vector/fgb/seccions_censals_2012.fgb",seccionsCensals2013:"https://tilemaps.icgc.cat/vector/fgb/seccions_censals_2013.fgb",seccionsCensals2014:"https://tilemaps.icgc.cat/vector/fgb/seccions_censals_2014.fgb",seccionsCensals2015:"https://tilemaps.icgc.cat/vector/fgb/seccions_censals_2015.fgb",seccionsCensals2016:"https://tilemaps.icgc.cat/vector/fgb/seccions_censals_2016.fgb",seccionsCensals2017:"https://tilemaps.icgc.cat/vector/fgb/seccions_censals_2017.fgb",seccionsCensals2018:"https://tilemaps.icgc.cat/vector/fgb/seccions_censals_2018.fgb",seccionsCensals2019:"https://tilemaps.icgc.cat/vector/fgb/seccions_censals_2019.fgb",seccionsCensals2020:"https://tilemaps.icgc.cat/vector/fgb/seccions_censals_2020.fgb",seccionsCensals2021:"https://tilemaps.icgc.cat/vector/fgb/seccions_censals_2021.fgb",seccionsCensals2022:"https://tilemaps.icgc.cat/vector/fgb/seccions_censals_2022.fgb",seccionsCensalsVigent:"https://tilemaps.icgc.cat/vector/fgb/seccions_censals_vigent.fgb",seccionsCensalsVigentText:"https://tilemaps.icgc.cat/vector/fgb/seccions_censals_vigent_text.fgb",sectorsSanitarisVigent:"https://tilemaps.icgc.cat/vector/fgb/sectors_sanitaris_vigent.fgb",vegueriesVigent:"https://tilemaps.icgc.cat/vector/fgb/vegueries_vigent.fgb",vegueriesVigentText:"https://tilemaps.icgc.cat/vector/fgb/vegueries_vigent_text.fgb"},WMS:{relleu:"https://tilemaps.icgc.cat/mapfactory/wmts/relleu/CAT3857/{z}/{x}/{y}.png",geologia:"https://tilemaps.icgc.cat/mapfactory/wmts/geologia/MON3857NW/{z}/{x}/{y}.png",administratiu:"http://geoserveis.icgc.cat/servei/catalunya/mapa-base/wmts/administratiu/MON3857NW/{z}/{x}/{y}.png",simplificat:"http://geoserveis.icgc.cat/servei/catalunya/mapa-base/wmts/simplificat/MON3857NW/{z}/{x}/{y}.png",cims:"https://geoserveis.icgc.cat/icc_100cims/wms/service?REQUEST=GetMap&SERVICE=WMS&VERSION=1.1.1&LAYERS=0&STYLES=&FORMAT=image/png&BGCOLOR=0xFFFFFF&TRANSPARENT=TRUE&SRS=EPSG:25831&BBOX=137118.923076923,4488408.75,650959.076923077,4749634.75&WIDTH=895&HEIGHT=455",cobertesSol:"http://geoserveis.icgc.cat/servei/catalunya/cobertes-sol/wms?REQUEST=GetMap&SERVICE=WMS&VERSION=1.3.0&LAYERS=cobertes_2009&STYLES=&FORMAT=image/png&BGCOLOR=0xFFFFFF&TRANSPARENT=TRUE&CRS=EPSG:25831&BBOX=374110.828167253,4639230.79853085,452621.120632226,4703578.45000215&WIDTH=1020&HEIGHT=836"},Vector:{altimetria:"https://betaserver.icgc.cat/tileserver3/tileserver.php/alti_bt5m/{z}/{x}/{y}.pbf",toponimia:"https://betaserver.icgc.cat/tileserver3/tileserver.php/redtopo/{z}/{x}/{y}.pbf"}},Wi={mapOptions:{container:"map",center:{0:1.537786,1:41.837539},zoom:7.5,bearing:0,pitch:0,hash:!1,style:"https://geoserveis.icgc.cat/contextmaps/icgc_mapa_base_gris.json.json",maxZoom:18,maxPitch:85},map3dOptions:{spaceErrorFactor:2,zfactor:25,minZoomRange:15.5,maxZoomRange:22,urlTilesetCities:"http://imtilemapsdev.icgc.local/terrenys/Ciutats/tilesetV1.0.json",layerIdOrder:"place-isolated",layerId3d:"edificisMapboxLayer",terrainSource:"ICGC5M",style3dName:"orto3d"},baseStyles:{0:{key:"TOPO",url:"https://geoserveis.icgc.cat/contextmaps/icgc_mapa_estandard_general.json",image:"https://visors.icgc.cat/contextmaps/imatges_estil/icgc_mapa_estandard.png"},1:{key:"ORTO",url:"https://geoserveis.icgc.cat/contextmaps/icgc_orto_estandard.json",image:"https://visors.icgc.cat/contextmaps/imatges_estil/icgc_orto_hibrida.png"},2:{key:"ORTO3D",url:"https://tilemaps.icgc.cat/cdn/styles/icgc_orto_3d.json",image:"https://visors.icgc.cat/contextmaps/imatges_estil/icgc_orto_hibrida.png"},3:{key:"ADMIN",url:"https://geoserveis.icgc.cat/contextmaps/icgc_delimitacio_limits_administratius.json",image:"https://visors.icgc.cat/contextmaps/imatges_estil/icgc_delimitacio_limits_administratius.png"},4:{key:"DARK",url:"https://geoserveis.icgc.cat/contextmaps/icgc_mapa_base_fosc.json",image:"https://visors.icgc.cat/contextmaps/imatges_estil/icgc_mapa_base_fosc.png"},5:{key:"LIGHT",url:"https://geoserveis.icgc.cat/contextmaps/icgc_mapa_base_gris.json",image:"https://visors.icgc.cat/contextmaps/imatges_estil/icgc_mapa_base_gris.png"},6:{key:"GEOLOGY",url:"https://geoserveis.icgc.cat/contextmaps/icgc_geologic_informacio.json",image:"https://visors.icgc.cat/contextmaps/imatges_estil/icgc_geologic_informacio.png"}},urlTerrainICGC:{0:{name:"ICGC5M",url:"https://tilemaps.icgc.cat/tileserver/tileserver/terreny-5m-30m-rgb-extent/{z}/{x}/{y}.png"},1:{name:"WORLD30M",url:"https://s3.amazonaws.com/elevation-tiles-prod/terrarium/{z}/{x}/{y}.png",encoding:"terrarium"}},ortoLayersICGC:{0:{name:"ortofotoColorProvisional",key:"ortofoto_color_provisional",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_provisional"},1:{name:"ortofotoColor2022",key:"ortofoto_color_2022",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2022"},2:{name:"ortofotoColor2021",key:"ortofoto_color_2021",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2021"},3:{name:"ortofotoColor2020",key:"ortofoto_color_2020",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2020"},4:{name:"ortofotoColor2019",key:"ortofoto_color_2019",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2019"},5:{name:"ortofotoColor2018",key:"ortofoto_color_2018",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2018"},6:{name:"ortofotoColor2017",key:"ortofoto_color_2017",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2017"},7:{name:"ortofotoColor2016",key:"ortofoto_color_2016",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2016"},8:{name:"ortofotoColor2015",key:"ortofoto_color_2015",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2015"},9:{name:"ortofotoColor2014",key:"ortofoto_color_2014",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2014"},10:{name:"ortofotoColor2013",key:"ortofoto_color_2013",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2013"},11:{name:"ortofotoColor2012",key:"ortofoto_color_2012",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2012"},12:{name:"ortofotoColor2011",key:"ortofoto_color_2011",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2011"},13:{name:"ortofotoColor2010",key:"ortofoto_color_2010",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2010"},14:{name:"ortofotoColor2009",key:"ortofoto_color_2009",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2009"},15:{name:"ortofotoColor2008",key:"ortofoto_color_2008",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2008"},16:{name:"ortofotoColor20062007",key:"ortofoto_color_2006-2007",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2006-2007"},17:{name:"ortofotoColor20042005",key:"ortofoto_color_2004-2005",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2004-2005"},18:{name:"ortofotoColor20002003",key:"ortofoto_color_2000-2003",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2000-2003"},19:{name:"ortofotoBlancINegre1998",key:"ortofoto_blanc_i_negre_1998",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_blanc_i_negre_1998"},20:{name:"ortofotoBlancINegre19941997",key:"ortofoto_blanc_i_negre_1994-1997",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_blanc_i_negre_1994-1997"},21:{name:"ortofotoColor1993",key:"ortofoto_color_1993",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_1993"},22:{name:"ortofotoBlancINegre19831992",key:"ortofoto_blanc_i_negre_1983-1992",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_blanc_i_negre_1983-1992"},23:{name:"ortofotoBlancINegre19701977",key:"ortofoto_blanc_i_negre_1970-1977",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_blanc_i_negre_1970-1977"},24:{name:"ortofotoBlancINegre1956",key:"ortofoto_blanc_i_negre_1956",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_blanc_i_negre_1956"},25:{name:"ortofotoBlancINegre1945",key:"ortofoto_blanc_i_negre_1945",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_blanc_i_negre_1945"},26:{name:"ortofotoColorSerieAnual",key:"ortofoto_color_serie_anual",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_serie_anual"},27:{name:"ortofotoInfraroigProvisional",key:"ortofoto_infraroig_provisional",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_provisional"},28:{name:"ortofotoInfraroig2022",key:"ortofoto_infraroig_2022",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2022"},29:{name:"ortofotoInfraroig2021",key:"ortofoto_infraroig_2021",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2021"},30:{name:"ortofotoInfraroig2020",key:"ortofoto_infraroig_2020",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2020"},31:{name:"ortofotoInfraroig2019",key:"ortofoto_infraroig_2019",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2019"},32:{name:"ortofotoInfraroig2018",key:"ortofoto_infraroig_2018",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2018"},33:{name:"ortofotoInfraroig2017",key:"ortofoto_infraroig_2017",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2017"},34:{name:"ortofotoInfraroig2016",key:"ortofoto_infraroig_2016",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2016"},35:{name:"ortofotoInfraroig2015",key:"ortofoto_infraroig_2015",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2015"},36:{name:"ortofotoInfraroig2014",key:"ortofoto_infraroig_2014",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2014"},37:{name:"ortofotoInfraroig2013",key:"ortofoto_infraroig_2013",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2013"},38:{name:"ortofotoInfraroig2012",key:"ortofoto_infraroig_2012",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2012"},39:{name:"ortofotoInfraroig2011",key:"ortofoto_infraroig_2011",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2011"},40:{name:"ortofotoInfraroig2010",key:"ortofoto_infraroig_2010",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2010"},41:{name:"ortofotoInfraroig2009",key:"ortofoto_infraroig_2009",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2009"},42:{name:"ortofotoInfraroig2008",key:"ortofoto_infraroig_2008",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2008"},43:{name:"ortofotoInfraroig20062007",key:"ortofoto_infraroig_2006-2007",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2006-2007"},44:{name:"ortofotoInfraroig19961997",key:"ortofoto_infraroig_1996-1997",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_1996-1997"},45:{name:"ortofotoInfraroigSerieAnual",key:"ortofoto_infraroig_serie_anual",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_serie_anual"}},vectorLayersICGC:{0:{name:"agrupacionsCensals2015",key:"agrupacions_censals_2015",url:"https://tilemaps.icgc.cat/vector/fgb/agrupacions_censals_2015.fgb"},1:{name:"agrupacionsCensals2016",key:"agrupacions_censals_2016",url:"https://tilemaps.icgc.cat/vector/fgb/agrupacions_censals_2016.fgb"},2:{name:"agrupacionsCensals2017",key:"agrupacions_censals_2017",url:"https://tilemaps.icgc.cat/vector/fgb/agrupacions_censals_2017.fgb"},3:{name:"agrupacionsCensals2018",key:"agrupacions_censals_2018",url:"https://tilemaps.icgc.cat/vector/fgb/agrupacions_censals_2018.fgb"},4:{name:"agrupacionsCensals2019",key:"agrupacions_censals_2019",url:"https://tilemaps.icgc.cat/vector/fgb/agrupacions_censals_2019.fgb"},5:{name:"agrupacionsCensals2020",key:"agrupacions_censals_2020",url:"https://tilemaps.icgc.cat/vector/fgb/agrupacions_censals_2020.fgb"},6:{name:"agrupacionsCensals2021",key:"agrupacions_censals_2021",url:"https://tilemaps.icgc.cat/vector/fgb/agrupacions_censals_2021.fgb"},7:{name:"agrupacionsCensalsVigent",key:"agrupacions_censals_vigent",url:"https://tilemaps.icgc.cat/vector/fgb/agrupacions_censals_vigent.fgb"},8:{name:"agrupacionsCensalsVigentText",key:"agrupacions_censals_vigent_text",url:"https://tilemaps.icgc.cat/vector/fgb/agrupacions_censals_vigent_text.fgb"},9:{name:"areesBasiquesPolicials2019",key:"arees_basiques_policials_2019",url:"https://tilemaps.icgc.cat/vector/fgb/arees_basiques_policials_2019.fgb"},10:{name:"areesBasiquesPolicials2020",key:"arees_basiques_policials_2020",url:"https://tilemaps.icgc.cat/vector/fgb/arees_basiques_policials_2020.fgb"},11:{name:"areesBasiquesPolicials2022",key:"arees_basiques_policials_2022",url:"https://tilemaps.icgc.cat/vector/fgb/arees_basiques_policials_2022.fgb"},12:{name:"areesBasiquesPolicialsVigent",key:"arees_basiques_policials_vigent",url:"https://tilemaps.icgc.cat/vector/fgb/arees_basiques_policials_vigent.fgb"},13:{name:"areesBasiquesPolicialsVigentText",key:"arees_basiques_policials_vigent_text",url:"https://tilemaps.icgc.cat/vector/fgb/arees_basiques_policials_vigent_text.fgb"},14:{name:"areesBasiquesSalutVigent",key:"arees_basiques_salut_vigent",url:"https://tilemaps.icgc.cat/vector/fgb/arees_basiques_salut_vigent.fgb"},15:{name:"areesBasiquesServeisSocialsVigent",key:"arees_basiques_serveis_socials_vigent",url:"https://tilemaps.icgc.cat/vector/fgb/arees_basiques_serveis_socials_vigent.fgb"},16:{name:"areesBasiquesServeisSocialsVigentText",key:"arees_basiques_serveis_socials_vigent_text",url:"https://tilemaps.icgc.cat/vector/fgb/arees_basiques_serveis_socials_vigent_text.fgb"},17:{name:"areesGestioAssistencialVigent",key:"arees_gestio_assistencial_vigent",url:"https://tilemaps.icgc.cat/vector/fgb/arees_gestio_assistencial_vigent.fgb"},18:{name:"areesHidrogeologiquesAquifersVigent",key:"arees_hidrogeologiques_aquifers_vigent",url:"https://tilemaps.icgc.cat/vector/fgb/arees_hidrogeologiques_aquifers_vigent.fgb"},19:{name:"catalunyaVigent",key:"catalunya_vigent",url:"https://tilemaps.icgc.cat/vector/fgb/catalunya_vigent.fgb"},20:{name:"catalunyaVigentText",key:"catalunya_vigent_text",url:"https://tilemaps.icgc.cat/vector/fgb/catalunya_vigent_text.fgb"},21:{name:"comarques2022",key:"comarques_2022",url:"https://tilemaps.icgc.cat/vector/fgb/comarques_2022.fgb"},22:{name:"comarquesVigent",key:"comarques_vigent",url:"https://tilemaps.icgc.cat/vector/fgb/comarques_vigent.fgb"},23:{name:"comarquesVigentText",key:"comarques_vigent_text",url:"https://tilemaps.icgc.cat/vector/fgb/comarques_vigent_text.fgb"},24:{name:"districtesCensals2002",key:"districtes_censals_2002",url:"https://tilemaps.icgc.cat/vector/fgb/districtes_censals_2002.fgb"},25:{name:"districtesCensals2003",key:"districtes_censals_2003",url:"https://tilemaps.icgc.cat/vector/fgb/districtes_censals_2003.fgb"},26:{name:"districtesCensals2004",key:"districtes_censals_2004",url:"https://tilemaps.icgc.cat/vector/fgb/districtes_censals_2004.fgb"},27:{name:"districtesCensals2005",key:"districtes_censals_2005",url:"https://tilemaps.icgc.cat/vector/fgb/districtes_censals_2005.fgb"},28:{name:"districtesCensals2006",key:"districtes_censals_2006",url:"https://tilemaps.icgc.cat/vector/fgb/districtes_censals_2006.fgb"},29:{name:"districtesCensals2007",key:"districtes_censals_2007",url:"https://tilemaps.icgc.cat/vector/fgb/districtes_censals_2007.fgb"},30:{name:"districtesCensals2008",key:"districtes_censals_2008",url:"https://tilemaps.icgc.cat/vector/fgb/districtes_censals_2008.fgb"},31:{name:"districtesCensals2009",key:"districtes_censals_2009",url:"https://tilemaps.icgc.cat/vector/fgb/districtes_censals_2009.fgb"},32:{name:"districtesCensals2010",key:"districtes_censals_2010",url:"https://tilemaps.icgc.cat/vector/fgb/districtes_censals_2010.fgb"},33:{name:"districtesCensals2011",key:"districtes_censals_2011",url:"https://tilemaps.icgc.cat/vector/fgb/districtes_censals_2011.fgb"},34:{name:"districtesCensals2012",key:"districtes_censals_2012",url:"https://tilemaps.icgc.cat/vector/fgb/districtes_censals_2012.fgb"},35:{name:"districtesCensals2013",key:"districtes_censals_2013",url:"https://tilemaps.icgc.cat/vector/fgb/districtes_censals_2013.fgb"},36:{name:"districtesCensals2014",key:"districtes_censals_2014",url:"https://tilemaps.icgc.cat/vector/fgb/districtes_censals_2014.fgb"},37:{name:"districtesCensals2015",key:"districtes_censals_2015",url:"https://tilemaps.icgc.cat/vector/fgb/districtes_censals_2015.fgb"},38:{name:"districtesCensals2016",key:"districtes_censals_2016",url:"https://tilemaps.icgc.cat/vector/fgb/districtes_censals_2016.fgb"},39:{name:"districtesCensals2017",key:"districtes_censals_2017",url:"https://tilemaps.icgc.cat/vector/fgb/districtes_censals_2017.fgb"},40:{name:"districtesCensals2018",key:"districtes_censals_2018",url:"https://tilemaps.icgc.cat/vector/fgb/districtes_censals_2018.fgb"},41:{name:"districtesCensals2019",key:"districtes_censals_2019",url:"https://tilemaps.icgc.cat/vector/fgb/districtes_censals_2019.fgb"},42:{name:"districtesCensals2020",key:"districtes_censals_2020",url:"https://tilemaps.icgc.cat/vector/fgb/districtes_censals_2020.fgb"},43:{name:"districtesCensals2021",key:"districtes_censals_2021",url:"https://tilemaps.icgc.cat/vector/fgb/districtes_censals_2021.fgb"},44:{name:"districtesCensals2022",key:"districtes_censals_2022",url:"https://tilemaps.icgc.cat/vector/fgb/districtes_censals_2022.fgb"},45:{name:"districtesCensalsVigent",key:"districtes_censals_vigent",url:"https://tilemaps.icgc.cat/vector/fgb/districtes_censals_vigent.fgb"},46:{name:"districtesCensalsVigentText",key:"districtes_censals_vigent_text",url:"https://tilemaps.icgc.cat/vector/fgb/districtes_censals_vigent_text.fgb"},47:{name:"incendisForestalsVigent",key:"incendis_forestals_vigent",url:"https://tilemaps.icgc.cat/vector/fgb/incendis_forestals_vigent.fgb"},48:{name:"incendisForestalsVigentText",key:"incendis_forestals_vigent_text",url:"https://tilemaps.icgc.cat/vector/fgb/incendis_forestals_vigent_text.fgb"},49:{name:"municipis2022",key:"municipis_2022",url:"https://tilemaps.icgc.cat/vector/fgb/municipis_2022.fgb"},50:{name:"municipis2022Text",key:"municipis_2022_text",url:"https://tilemaps.icgc.cat/vector/fgb/municipis_2022_text.fgb"},51:{name:"municipisVigent",key:"municipis_vigent",url:"https://tilemaps.icgc.cat/vector/fgb/municipis_vigent.fgb"},52:{name:"municipisVigentText",key:"municipis_vigent_text",url:"https://tilemaps.icgc.cat/vector/fgb/municipis_vigent_text.fgb"},53:{name:"partitsJudicialsVigent",key:"partits_judicials_vigent",url:"https://tilemaps.icgc.cat/vector/fgb/partits_judicials_vigent.fgb"},54:{name:"partitsJudicialsVigentText",key:"partits_judicials_vigent_text",url:"https://tilemaps.icgc.cat/vector/fgb/partits_judicials_vigent_text.fgb"},55:{name:"plaTerritorial2015",key:"pla_territorial_2015",url:"https://tilemaps.icgc.cat/vector/fgb/pla_territorial_2015.fgb"},56:{name:"plaTerritorialVigent",key:"pla_territorial_vigent",url:"https://tilemaps.icgc.cat/vector/fgb/pla_territorial_vigent.fgb"},57:{name:"plaTerritorialVigentText",key:"pla_territorial_vigent_text",url:"https://tilemaps.icgc.cat/vector/fgb/pla_territorial_vigent_text.fgb"},58:{name:"provinciesVigent",key:"provincies_vigent",url:"https://tilemaps.icgc.cat/vector/fgb/provincies_vigent.fgb"},59:{name:"provinciesVigentText",key:"provincies_vigent_text",url:"https://tilemaps.icgc.cat/vector/fgb/provincies_vigent_text.fgb"},60:{name:"regionsPolicialsVigent",key:"regions_policials_vigent",url:"https://tilemaps.icgc.cat/vector/fgb/regions_policials_vigent.fgb"},61:{name:"regionsPolicialsVigentText",key:"regions_policials_vigent_text",url:"https://tilemaps.icgc.cat/vector/fgb/regions_policials_vigent_text.fgb"},62:{name:"regionsSanitariesVigent",key:"regions_sanitaries_vigent",url:"https://tilemaps.icgc.cat/vector/fgb/regions_sanitaries_vigent.fgb"},63:{name:"regionsSanitariesVigentText",key:"regions_sanitaries_vigent_text",url:"https://tilemaps.icgc.cat/vector/fgb/regions_sanitaries_vigent_text.fgb"},64:{name:"seccionsCensals2002",key:"seccions_censals_2002",url:"https://tilemaps.icgc.cat/vector/fgb/seccions_censals_2002.fgb"},65:{name:"seccionsCensals2003",key:"seccions_censals_2003",url:"https://tilemaps.icgc.cat/vector/fgb/seccions_censals_2003.fgb"},66:{name:"seccionsCensals2004",key:"seccions_censals_2004",url:"https://tilemaps.icgc.cat/vector/fgb/seccions_censals_2004.fgb"},67:{name:"seccionsCensals2005",key:"seccions_censals_2005",url:"https://tilemaps.icgc.cat/vector/fgb/seccions_censals_2005.fgb"},68:{name:"seccionsCensals2006",key:"seccions_censals_2006",url:"https://tilemaps.icgc.cat/vector/fgb/seccions_censals_2006.fgb"},69:{name:"seccionsCensals2007",key:"seccions_censals_2007",url:"https://tilemaps.icgc.cat/vector/fgb/seccions_censals_2007.fgb"},70:{name:"seccionsCensals2008",key:"seccions_censals_2008",url:"https://tilemaps.icgc.cat/vector/fgb/seccions_censals_2008.fgb"},71:{name:"seccionsCensals2009",key:"seccions_censals_2009",url:"https://tilemaps.icgc.cat/vector/fgb/seccions_censals_2009.fgb"},72:{name:"seccionsCensals2010",key:"seccions_censals_2010",url:"https://tilemaps.icgc.cat/vector/fgb/seccions_censals_2010.fgb"},73:{name:"seccionsCensals2011",key:"seccions_censals_2011",url:"https://tilemaps.icgc.cat/vector/fgb/seccions_censals_2011.fgb"},74:{name:"seccionsCensals2012",key:"seccions_censals_2012",url:"https://tilemaps.icgc.cat/vector/fgb/seccions_censals_2012.fgb"},75:{name:"seccionsCensals2013",key:"seccions_censals_2013",url:"https://tilemaps.icgc.cat/vector/fgb/seccions_censals_2013.fgb"},76:{name:"seccionsCensals2014",key:"seccions_censals_2014",url:"https://tilemaps.icgc.cat/vector/fgb/seccions_censals_2014.fgb"},77:{name:"seccionsCensals2015",key:"seccions_censals_2015",url:"https://tilemaps.icgc.cat/vector/fgb/seccions_censals_2015.fgb"},78:{name:"seccionsCensals2016",key:"seccions_censals_2016",url:"https://tilemaps.icgc.cat/vector/fgb/seccions_censals_2016.fgb"},79:{name:"seccionsCensals2017",key:"seccions_censals_2017",url:"https://tilemaps.icgc.cat/vector/fgb/seccions_censals_2017.fgb"},80:{name:"seccionsCensals2018",key:"seccions_censals_2018",url:"https://tilemaps.icgc.cat/vector/fgb/seccions_censals_2018.fgb"},81:{name:"seccionsCensals2019",key:"seccions_censals_2019",url:"https://tilemaps.icgc.cat/vector/fgb/seccions_censals_2019.fgb"},82:{name:"seccionsCensals2020",key:"seccions_censals_2020",url:"https://tilemaps.icgc.cat/vector/fgb/seccions_censals_2020.fgb"},83:{name:"seccionsCensals2021",key:"seccions_censals_2021",url:"https://tilemaps.icgc.cat/vector/fgb/seccions_censals_2021.fgb"},84:{name:"seccionsCensals2022",key:"seccions_censals_2022",url:"https://tilemaps.icgc.cat/vector/fgb/seccions_censals_2022.fgb"},85:{name:"seccionsCensalsVigent",key:"seccions_censals_vigent",url:"https://tilemaps.icgc.cat/vector/fgb/seccions_censals_vigent.fgb"},86:{name:"seccionsCensalsVigentText",key:"seccions_censals_vigent_text",url:"https://tilemaps.icgc.cat/vector/fgb/seccions_censals_vigent_text.fgb"},87:{name:"sectorsSanitarisVigent",key:"sectors_sanitaris_vigent",url:"https://tilemaps.icgc.cat/vector/fgb/sectors_sanitaris_vigent.fgb"},88:{name:"vegueriesVigent",key:"vegueries_vigent",url:"https://tilemaps.icgc.cat/vector/fgb/vegueries_vigent.fgb"},89:{name:"vegueriesVigentText",key:"vegueries_vigent_text",url:"https://tilemaps.icgc.cat/vector/fgb/vegueries_vigent_text.fgb"}},vectorLayers:{0:{key:"altimetria",layer:"",url:"https://betaserver.icgc.cat/tileserver3/tileserver.php/alti_bt5m/{z}/{x}/{y}.pbf"},1:{key:"toponimia",layer:"",url:"https://betaserver.icgc.cat/tileserver3/tileserver.php/redtopo/{z}/{x}/{y}.pbf"}},wmsLayers:{0:{key:"relleu",layer:"",url:"https://tilemaps.icgc.cat/mapfactory/wmts/relleu/CAT3857/{z}/{x}/{y}.png"},1:{key:"geologia",layer:"",url:"https://tilemaps.icgc.cat/mapfactory/wmts/geologia/MON3857NW/{z}/{x}/{y}.png"},2:{key:"administratiu",layer:"",url:"http://geoserveis.icgc.cat/servei/catalunya/mapa-base/wmts/administratiu/MON3857NW/{z}/{x}/{y}.png"},3:{key:"simplificat",layer:"",url:"http://geoserveis.icgc.cat/servei/catalunya/mapa-base/wmts/simplificat/MON3857NW/{z}/{x}/{y}.png"},4:{key:"cims",layer:"",url:"https://geoserveis.icgc.cat/icc_100cims/wms/service?REQUEST=GetMap&SERVICE=WMS&VERSION=1.1.1&LAYERS=0&STYLES=&FORMAT=image/png&BGCOLOR=0xFFFFFF&TRANSPARENT=TRUE&SRS=EPSG:25831&BBOX=137118.923076923,4488408.75,650959.076923077,4749634.75&WIDTH=895&HEIGHT=455"},5:{key:"cobertesSol",layer:"",url:"http://geoserveis.icgc.cat/servei/catalunya/cobertes-sol/wms?REQUEST=GetMap&SERVICE=WMS&VERSION=1.3.0&LAYERS=cobertes_2009&STYLES=&FORMAT=image/png&BGCOLOR=0xFFFFFF&TRANSPARENT=TRUE&CRS=EPSG:25831&BBOX=374110.828167253,4639230.79853085,452621.120632226,4703578.45000215&WIDTH=1020&HEIGHT=836"}}};let trt=class{constructor(t){if(!t)t=Wi.mapOptions;else for(const e in Wi.mapOptions){let n=[Wi.mapOptions.center[0],Wi.mapOptions.center[1]];Wi.mapOptions.center=n,t.hasOwnProperty(e)||(t[e]=Wi.mapOptions[e])}t.maxPitch=85,t.maplibreLogo=!1,t.attributionControl=!1,this.map=new No.Map(t),this.map.options=t,this.map.addControl(new No.AttributionControl({compact:!0})),this.map.on("load",()=>{if(window.document.querySelector(".maplibregl-compact-show")){var e=window.document.querySelector(".maplibregl-compact-show");e.classList.remove("maplibregl-compact-show")}this._dealOrto3dStyle(this.map.getStyle().name)})}_dealOrto3dStyle(t){try{if(t=="orto3d"){const e=new a5({intensity:4}),n=new Zv({ambientLight:e});this.map.setTerrain({source:Wi.map3dOptions.terrainSource,exaggeration:1});const i=this._createCitiesMapboxLayer();this.map.getLayer(Wi.map3dOptions.layerId3d)||(this.map.addLayer(i,Wi.map3dOptions.layerIdOrder),this.map.setLayerZoomRange(Wi.map3dOptions.layerId3d,Wi.map3dOptions.minZoomRange,Wi.map3dOptions.maxZoomRange),i.deck.setProps({effects:[n]}))}else this.map.getLayer(Wi.map3dOptions.layerId3d)&&(this.map.removeLayer(Wi.map3dOptions.layerId3d),this.map.setTerrain(null))}catch(e){return console.error(`Error dealing orto 3D: ${e.message}`),null}}_createCitiesMapboxLayer(){try{return new qK({id:Wi.map3dOptions.layerId3d,type:xw,data:Wi.map3dOptions.urlTilesetCities,loader:ww,loadOptions:{tileset:{viewDistanceScale:1,updateTransforms:!1,maximumScreenSpaceError:Wi.map3dOptions.spaceErrorFactor}},onTilesetLoad:e=>{e.options.maximumScreenSpaceError=Wi.map3dOptions.spaceErrorFactor},onTileLoad:e=>{e.content.cartographicOrigin.z-=Wi.map3dOptions.zfactor},operation:"terrain+draw"})}catch(t){return console.error(`Error adding MapboxLayer: ${t.message}`),null}}addGeocoderICGC(t){try{t===void 0&&(t="top-right");const e="https://eines.icgc.cat/geocodificador/autocompletar?text=";let n={collapsed:!0,marker:!0,popup:!0,showResultMarkers:!0,maplibregl:No,showResultsWhileTyping:!0,minLength:2};const i={forwardGeocode:async a=>{const o=[];try{const h=`https://nominatim.openstreetmap.org/search?q=${a.query}&format=geojson&polygon_geojson=1&addressdetails=1`,f=e+encodeURIComponent(a.query)+"&layers=topo1%2Ctopo2%2Caddress&size=5",b=await(await fetch(f)).json();for(const C of b.features){const B=C.geometry.coordinates,R={type:"Feature",geometry:{type:"Point",coordinates:B},place_name:C.properties.label,properties:C.properties,text:C.properties.label,place_type:["place"],center:B};o.push(R)}}catch(h){console.error(`Failed to forwardGeocode with error: ${h}`)}return{features:o}}};this.map.addControl(new Zet(i,n),t);let s=document.getElementsByClassName("maplibregl-ctrl-geocoder--input");s[0].attributes[2].nodeValue="Cerca...",s[0].addEventListener("input",function(a){a.target.value.length>3})}catch(e){console.error(`Error adding ICGC geocoder: ${e.message}`)}}getStyle(){try{this.map.getStyle()}catch(t){console.error(`Error getting style: ${t.message}`)}}getConfigStyles(){try{let t=[];for(const e of uf)t.push(e.name);return t}catch(t){console.error(`Error retrieving base styles: ${t.message}`)}}getConfigWMSLayers(){try{let t=[];for(const e in vo.WMS)vo.WMS.hasOwnProperty(e)&&t.push(e);return t}catch(t){console.error(`Error retrieving WMS layers: ${t.message}`)}}getConfigOrtoLayers(){try{let t=[];for(const e in vo.Orto)vo.Orto.hasOwnProperty(e)&&t.push(e);return t}catch(t){console.error(`Error retrieving orto image layers: ${t.message}`)}}getConfigVectorLayers(){try{let t=[];for(const e in vo.Vector)vo.Vector.hasOwnProperty(e)&&t.push(e);return t}catch(t){console.error(`Error retrieving vector layers: ${t.message}`)}}getConfigVectorAdminLayers(){try{let t=[];for(const e in vo.VectorAdmin)vo.VectorAdmin.hasOwnProperty(e)&&t.push(e);return t}catch(t){console.error(`Error retrieving vectorAdmin layers: ${t.message}`)}}async fetchData(t,e,n){try{const s=await(await fetch(t)).json();let a=s.features[0].geometry.type;a.includes("ine")&&(n!==void 0?map.addLayer({id:e,type:"line",source:{type:"geojson",data:s},layout:{visibility:"visible"},paint:n}):map.addLayer({id:e,type:"line",source:{type:"geojson",data:s},layout:{visibility:"visible"},paint:{"line-color":"black","line-width":2,"line-opacity":1}})),a.includes("olygon")&&(n!==void 0?map.addLayer({id:e,type:"fill",source:{type:"geojson",data:s},layout:{visibility:"visible"},paint:n}):map.addLayer({id:e,type:"fill",source:{type:"geojson",data:s},layout:{visibility:"visible"},paint:{"fill-color":"blue","fill-opacity":.6}})),a.includes("oint")&&(n!==void 0?map.addLayer({id:e,type:"circle",source:{type:"geojson",data:s},layout:{visibility:"visible"},paint:n}):map.addLayer({id:e,type:"circle",source:{type:"geojson",data:s},layout:{visibility:"visible"},paint:{"circle-color":"red","circle-opacity":.85}}))}catch(i){console.error(`Error fetching data: ${i.message}`)}}async fetchDataAndMenu(t,e,n,i){try{const a=await(await fetch(t)).json(),o=document.getElementById("menu-group");if(n!=="all"){const f=document.createElement("div");f.id="titleDivMenu",f.textContent=e,o.appendChild(f);const g=document.createElement("div");g.id="titleDivMenuSub",g.textContent=`📂 ${n}`,o.appendChild(g)}let h=a.features[0].geometry.type;if(n==="all")h.includes("ine")&&(i!==void 0?map.addLayer({id:e,type:"line",source:{type:"geojson",data:a},layout:{visibility:"visible"},paint:i}):map.addLayer({id:e,type:"line",source:{type:"geojson",data:a},layout:{visibility:"visible"},paint:{"line-color":"black","line-width":2,"line-opacity":1}})),h.includes("olygon")&&(i!==void 0?map.addLayer({id:e,type:"fill",source:{type:"geojson",data:a},layout:{visibility:"visible"},paint:i}):map.addLayer({id:e,type:"fill",source:{type:"geojson",data:a},layout:{visibility:"visible"},paint:{"fill-color":"blue","fill-opacity":.6}})),h.includes("oint")&&(i!==void 0?map.addLayer({id:e,type:"circle",source:{type:"geojson",data:a},layout:{visibility:"visible"},paint:i}):map.addLayer({id:e,type:"circle",source:{type:"geojson",data:a},layout:{visibility:"visible"},paint:{"circle-color":"red","circle-opacity":.85}})),map.addMenuItem(e),map.addFeatureQuery(e);else{let f=n;const g={};a.features.forEach(b=>{const C=b.properties[f];g[C]||(h.includes("ine")&&(i!==void 0?map.addLayer({id:C,type:"line",source:{type:"geojson",data:a},layout:{visibility:"visible"},filter:["==",`${f}`,C],paint:i}):map.addLayer({id:C,type:"line",source:{type:"geojson",data:a},layout:{visibility:"visible"},filter:["==",`${f}`,C],paint:{"line-color":"black","line-width":2,"line-opacity":1}})),h.includes("olygon")&&(i!==void 0?map.addLayer({id:C,type:"fill",source:{type:"geojson",data:a},layout:{visibility:"visible"},filter:["==",`${f}`,C],paint:i}):map.addLayer({id:C,type:"fill",source:{type:"geojson",data:a},layout:{visibility:"visible"},filter:["==",`${f}`,C],paint:{"fill-color":"blue","fill-opacity":.6}})),h.includes("oint")&&(i!==void 0?map.addLayer({id:C,type:"circle",source:{type:"geojson",data:a},layout:{visibility:"visible"},filter:["==",`${f}`,C],paint:i}):map.addLayer({id:C,type:"circle",source:{type:"geojson",data:a},layout:{visibility:"visible"},filter:["==",`${f}`,C],paint:{"circle-color":"red","circle-opacity":.85}})),g[C]=!0,map.addMenuItem(C))})}}catch(s){console.error(`Error fetching data: ${s.message}`)}}on(t,e){try{this.map.on(t,e)}catch(n){console.error(`Error adding event listener: ${n.message}`)}}getSource(t){try{this.map.getSource(t)}catch(e){console.error(`Error getting source: ${e.message}`)}}addSource(t,e){try{this.map.addSource(t,e)}catch(n){console.error(`Error adding source: ${n.message}`)}}setStyle(t,e){try{console.log("kk",t),console.log("base",t),e!==void 0?this.map.setStyle(t,e):this.map.setStyle(t),this.map.on("styledata",()=>{if(window.document.querySelector(".maplibregl-compact-show")){var n=window.document.querySelector(".maplibregl-compact-show");n.classList.remove("maplibregl-compact-show")}this._dealOrto3dStyle(this.map.getStyle().name)})}catch(n){console.error(`Error setting style: ${n.message}`)}}getLayer(t){try{this.map.getLayer(t)}catch(e){console.error(`Error getting layer: ${e.message}`)}}jumpTo(t){try{this.map.jumpTo(t)}catch(e){console.error(`Error jumping to ${t}: ${e.message}`)}}setLayoutProperty(t,e,n){try{this.map.setLayoutProperty(t,e,n)}catch(i){console.error(`Error setting layout property: ${i.message}`)}}setPaintProperty(t,e,n){try{this.map.setPaintProperty(t,e,n)}catch(i){console.error(`Error setting paint property: ${i.message}`)}}addControl(t,e){try{e===void 0&&(e="top-right"),this.map.addControl(t,e)}catch(n){console.error(`Error adding control: ${n.message}`)}}getZoom(){try{return this.map.getZoom()}catch(t){console.error(`Error getting zoom level: ${t.message}`)}}addMouseCoordControl(){try{this.map.on("mousemove",function(t){const e=t.lngLat.lat,i="Lon/Lat (WGS 84) Lon: "+t.lngLat.lng.toFixed(6)+" Lat: "+e.toFixed(6),s=document.getElementById("divInfo"),a=document.createElement("div");a.className="coordControl",a.innerHTML=i+" - ZL: "+map.getZoom().toFixed(1),s.appendChild(a)})}catch(t){console.error(`Error adding mouse coordinate control: ${t.message}`)}}addGeolocateControl(t,e){try{e===void 0&&(e="top-right"),t===void 0?this.map.addControl(new No.GeolocateControl({positionOptions:{enableHighAccuracy:!0},trackUserLocation:!0}),e):this.map.addControl(new No.GeolocateControl(t),e)}catch(n){console.error(`Error adding geolocate control: ${n.message}`)}}getBounds(){try{return this.map.getBounds()}catch(t){console.error(`Error getting bounds: ${t.message}`)}}getCenter(){try{return this.map.getCenter()}catch(t){console.error(`Error getting center: ${t.message}`)}}setTerrain(t){try{return this.map.setTerrain(t)}catch(e){console.error(`Error setting terrain: ${e.message}`)}}setLayerZoomRange(t,e,n){try{return this.map.setLayerZoomRange(t,e,n)}catch(i){console.error(`Error setting terrain: ${i.message}`)}}getCanvas(){try{return this.map.getCanvas()}catch(t){console.error(`Error getting canvas: ${t.message}`)}}setCenter(t){try{return this.map.setCenter(t)}catch(e){console.error(`Error setting center: ${e.message}`)}}addLayer(t,e){try{this.map.addLayer(t,e)}catch(n){console.error(`Error adding layer: ${n.message}`)}}addLayerGeoJSON(t){try{this.map.on("load",()=>{this.map.addSource(`${t.id}-sourceIcgcMap`,{type:"geojson",data:t.data}),this.map.addLayer({id:`${t.id}-layerIcgcMap`,type:t.layerType,source:`${t.id}-sourceIcgcMap`,layout:t.layout,paint:t.paint})})}catch(e){console.error(`Error adding GeoJSON layer: ${e.message}`)}}addLayerWMS(t){try{this.map.on("load",()=>{console.log("holaaddlayerwms",t),this.map.addSource(`${t.id}-sourceIcgcMap`,{type:"raster",tiles:[t.tiles],tileSize:256}),this.map.addLayer({id:`${t.id}-layerIcgcMap`,type:"raster",source:`${t.id}-sourceIcgcMap`,paint:{}})})}catch(e){console.error(`Error adding WMS layer: ${e.message}`)}}removeControl(t){try{this.map.removeControl(t)}catch(e){console.error(`Error removing control: ${e.message}`)}}removeLayer(t){try{this.map.removeLayer(t)}catch(e){console.error(`Error removing layer: ${e.message}`)}}removeSource(t){try{this.map.removeSource(t)}catch(e){console.error(`Error removing source: ${e.message}`)}}addLogo(t){try{const e=document.createElement("img");e.src=t.url,e.style.height="62px";const n=document.getElementById("logos"),i=document.createElement("a");i.id=t.id,i.href=t.href,i.target="_blank",i.style.position="relative",i.style.bottom="1px",i.appendChild(e),n.appendChild(i)}catch(e){console.error(`Error adding logo: ${e.message}`)}}addBasemapsICGC(t){try{const e=i=>{this.map.setStyle(i)},n=document.getElementById("basemap-group");this.map.on("load",()=>{for(const i of t)for(const s of Object.keys(Wi.baseStyles)){const a=Wi.baseStyles[s];if(i===a.url){const o=document.createElement("div");o.className="basemap-item",o.title=a.key,o.style.backgroundImage=`url('${a.image}')`,n.appendChild(o),o.addEventListener("click",()=>e(a.url))}}})}catch(e){console.error(`Error adding basemaps: ${e.message}`)}}addBasemaps(t){try{const e=i=>{console.log("base",i),this.map.setStyle(i.url)},n=document.getElementById("basemap-group");this.map.on("load",()=>{t.forEach(i=>{const s=document.createElement("div");s.className="basemap-item",s.title=i.label,s.style.backgroundImage=`url('${i.image}')`,n.appendChild(s),s.addEventListener("click",()=>e(i))})})}catch(e){console.error(`Error adding basemaps: ${e.message}`)}}addFeatureQuery(t,e){try{let n;this.map.on("load",()=>{this.map.on("mouseenter",t,()=>{this.map.getCanvas().style.cursor="pointer"}),this.map.on("mouseleave",t,()=>{this.map.getCanvas().style.cursor=""}),this.map.on("click",i=>{let s=this.map.queryRenderedFeatures(i.point);if(s&&s[0].source===t){let a=[i.lngLat.lng,i.lngLat.lat];if(e!==void 0&&e.length>0){if(e!==null){let o="";e.forEach(h=>{let f=s[0].properties[h];o=o+`<h4>${f}</h4>`}),n=o,map.addPopup(a,n)}}else{let o="";for(const h in s[0].properties)o+="<b>"+h+"</b>:"+s[0].properties[h]+"<br>";n=o,map.addPopup(a,n)}}})})}catch(n){console.error(`Error adding feature query: ${n.message}`)}}addScaleControl(t,e){try{var n=new No.ScaleControl(t);this.map.addControl(n,e)}catch(i){console.error(`Error adding scale: ${i.message}`)}}removeMeasureControl(){try{const t=document.getElementById("xButton"),e=document.getElementById("distance");e.innerHTML="";let n=this.map.getStyle().layers;for(let i=0;i<n.length;i++)n[i].id.includes("measure")&&this.map.removeLayer(n[i].id)}catch(t){console.error(`Error removing measure control: ${t.message}`)}}addMeasureControl(){try{let f=function(b,C){const B=C.queryRenderedFeatures(b.point,{layers:["measure-points"]});if(o.features.length>1&&o.features.pop(),n.innerHTML="",B.length){const Q=B[0].properties.id;o.features=o.features.filter(k=>k.properties.id!==Q)}else{const Q={type:"Feature",geometry:{type:"Point",coordinates:[b.lngLat.lng,b.lngLat.lat]},properties:{id:String(new Date().getTime())}};o.features.push(Q)}h.geometry.coordinates=o.features.map(Q=>Q.geometry.coordinates),o.features.push(h);const R=document.createElement("pre");R.textContent=`Distància total: ${turf.length(h).toLocaleString()}km`,n.appendChild(R);const D=document.createElement("div");D.id="xButton",D.textContent="X",D.onclick=()=>{try{const Q=document.getElementById("xButton"),k=document.getElementById("distance");k.innerHTML="";let j=C.getStyle().layers;for(let et=0;et<j.length;et++)j[et].id.includes("measure")&&C.removeLayer(j[et].id)}catch(Q){console.error(`Error adding measure control: ${Q.message}`)}},n.appendChild(D),C.getSource("geojson").setData(o)},g=function(b,C){C.getCanvas().style.cursor="grab",i=!0};const e=document.getElementById("distance"),n=document.getElementById("distanceTotal");let i=!1,s=!1;var t;const a=document.createElement("div");a.id="rulerButton",a.onclick=()=>{try{s?document.getElementById("rulerButton").style.backgroundColor="#ff597a":document.getElementById("rulerButton").style.backgroundColor="#41b883",s=!s}catch(b){console.error(`Error adding measure control: ${b.message}`)}},n.appendChild(a);const o={type:"FeatureCollection",features:[]},h={type:"Feature",geometry:{type:"LineString",coordinates:[]}};this.map.on("load",()=>{this.map.addSource("geojson",{type:"geojson",data:o}),this.map.addLayer({id:"measure-points",type:"circle",source:"geojson",paint:{"circle-radius":5,"circle-color":"#000"},filter:["in","$type","Point"]}),this.map.addLayer({id:"measure-lines",type:"line",source:"geojson",layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#000","line-width":2.5},filter:["in","$type","LineString"]})}),this.map.on("click",b=>{clearTimeout(t),!i&&s&&(t=setTimeout(()=>{f(b,this.map)},50))}),this.map.on("dblclick",b=>{s&&(clearTimeout(t),g(b,this.map))}),this.map.on("mousemove",b=>{if(!i&&s){const C=this.map.queryRenderedFeatures(b.point,{layers:["measure-points"]});this.map.getCanvas().style.cursor=C.length?"pointer":"crosshair"}else this.map.getCanvas().style.cursor="grab"})}catch{}}addExportControl(t,e){try{typeof t=="string"&&(e=t,t=void 0),t===void 0&&(t={PageSize:lf.A4,PageOrientation:ag.Landscape,Format:Iu.PNG,DPI:jw[300],Crosshair:!0,PrintableArea:!0},e="top-right"),map.addControl(new aet(t),e)}catch(n){console.error(`Error adding export control: ${n.message}`)}}addPopup(t,e){try{this.map.on("load",()=>{new No.Popup().setLngLat(t).setHTML(e).addTo(this.map)})}catch{}}addMarker(t){try{let e,n;return t.text===void 0?e=new No.Marker(t.options).setLngLat(t.coord).addTo(this.map):(n=new No.Popup({offset:t.textOffset}).setText(t.text),e=new No.Marker().setLngLat(t.coord).setPopup(n).addTo(this.map)),e}catch(e){return console.error(`Error adding marker: ${e.message}`),null}}addPopup(t,e){try{return new No.Popup().setLngLat(t).setHTML(e).addTo(this.map)}catch(n){return console.error(`Error adding popup: ${n.message}`),null}}addFullScreen(t){try{t===void 0&&(t="top-right"),this.map.addControl(new No.FullscreenControl,t)}catch(e){console.error(`Error adding fullscreen control: ${e.message}`)}}addMenuItem(t){try{const e=document.getElementById("menu-group"),n=document.createElement("input");n.type="checkbox",n.id=t,n.checked=!0,e.appendChild(n);const i=document.createElement("label");i.setAttribute("for",t),i.textContent=t,e.appendChild(i),n.addEventListener("change",s=>{this.map.setLayoutProperty(t,"visibility",s.target.checked?"visible":"none")})}catch(e){console.error(`Error adding menu item: ${e.message}`)}}addLayerTree(t){try{let e=t.features;const n=document.getElementById("filter-group");this.map.on("load",()=>{const i=this.map.getStyle().layers;let s;for(let a=0;a<i.length;a++)if(i[a].type==="symbol"){s=i[a].id;break}this.map.addSource(`${t.id}-source`,{type:t.type,data:e}),e.features.forEach(a=>{const o=a.properties.icon,h=`poi-${o}`;if(!this.map.getLayer(h)){this.map.addLayer({id:h,type:"circle",source:`${t.id}-source`,paint:{"circle-radius":6,"circle-color":"#B42222"},filter:["==","icon",o]},s);const f=document.createElement("input");f.type="checkbox",f.id=h,f.checked=!0,n.appendChild(f);const g=document.createElement("label");g.setAttribute("for",h),g.textContent=o,n.appendChild(g),f.addEventListener("change",b=>{this.map.setLayoutProperty(h,"visibility",b.target.checked?"visible":"none")})}})})}catch(e){console.error(`Error adding layer tree: ${e.message}`)}}createNavigationControl(t,e){try{e===void 0&&(e="top-right"),this.map.addControl(new No.NavigationControl(t),e)}catch(n){return console.error(`Error creating navigation control: ${n.message}`),null}}addNavigationControl(t,e){try{e===void 0&&(e="top-right"),this.map.addControl(new No.NavigationControl(t),e)}catch(n){console.error(`Error adding navigation control: ${n.message}`)}}addAttributionControl(t){try{this.map.addControl(new No.AttributionControl(t.options),t.position)}catch(e){console.error(`Error adding attribution control: ${e.message}`)}}_dealStyleMaps(t){try{if(t&&t.indexOf("icgc.cat")!=-1){for(const e in uf)if(uf.hasOwnProperty(e)){const n=uf[e];if(e===t)return n}return uf[0]}else return t}catch(e){return console.error(`Error dealing with map styles: ${e.message}`),null}}addImageLayerICGC(t){try{let n=function(s,a,o,h,f){console.log("hola",t);const g=[a,o,h,f];for(const b of g)for(const[C,B]of Object.entries(b))if(B===s)return C;return null};console.log("name",t);let e=null;e=n(t,vo.Orto,vo.VectorAdmin,vo.WMS,vo.Vector),console.log("op",e),e||console.log("❌ %c The layer: %c%s%c does not exist in the ICGC DB. Consult the documentation.","font-weight: bold; font-style: italic;","font-weight: normal; font-style: normal; color: red;",t,"font-weight: bold; font-style: italic;");let i={id:e,tiles:t};console.log("source",i),this.addLayerWMS(i)}catch(e){console.error(`Error adding ICGC image layer: ${e.message}`)}}async addVectorLayerICGC(t){try{let n=function(i){for(const s in vo.VectorAdmin)if(vo.VectorAdmin.hasOwnProperty(s)&&vo.VectorAdmin[s]===i)return s;return null}(t);if(n===null)console.log("❌ %c The layer: %c%s%c does not exist in the ICGC DB. Consult the documentation.","font-weight: bold; font-style: italic;","font-weight: normal; font-style: normal; color: red;",n,"font-weight: bold; font-style: italic;");else{const i=await fetch(t);this.map.on("load",async()=>{const s={type:"FeatureCollection",features:[]};for await(const o of flatgeobuf.deserialize(i.body))s.features.push(o);let a=op.name+"-source";this.map.addSource(a,{type:"geojson",data:s}),this.map.addLayer({id:op.name+"-fill",type:"fill",source:a,paint:{"fill-color":"#0000FF","fill-opacity":0}}),this.map.addLayer({id:op.name+"-line",type:"line",source:a,paint:{"line-color":"#FFFFFF","line-opacity":.49,"line-width":1}})})}}catch(e){console.error(`Error adding ICGC vector layer: ${e.message}`)}}addTerrainICGC(t,e){this.map.on("load",()=>{try{let n;for(const s in ny)if(ny.hasOwnProperty(s)){const a=ny[s];a===t&&(n=a)}let i=n;t.includes("terrarium")?this.map.addSource("terrainICGC-src",{type:"raster-dem",tiles:[i],tileSize:512,encoding:"terrarium",maxzoom:16}):this.map.addSource("terrainICGC-src",{type:"raster-dem",tiles:[i],tileSize:512,maxzoom:16}),this.map.setTerrain({source:"terrainICGC-src",exaggeration:1.5}),e===void 0&&(e="top-right"),this.map.addControl(new ZN({pitch:90,bearing:null,minpitchzoom:null}),e)}catch(n){console.error(`Error adding 3D terrain: ${n.message}`)}})}};var kF={exports:{}};function ert(r,t){var e=r.getCenter(),n=r.getZoom(),i=r.getBearing(),s=r.getPitch();t.forEach(function(a){a.jumpTo({center:e,zoom:n,bearing:i,pitch:s})})}function rrt(){var r,t=arguments.length;if(t===1)r=arguments[0];else{r=[];for(var e=0;e<t;e++)r.push(arguments[e])}var n=[];r.forEach(function(o,h){n[h]=a.bind(null,o,r.filter(function(f,g){return g!==h}))});function i(){r.forEach(function(o,h){o.on("move",n[h])})}function s(){r.forEach(function(o,h){o.off("move",n[h])})}function a(o,h){s(),ert(o,h),i()}return i(),function(){s(),n=[],r=[]}}var nrt=rrt;(function(r){var t=nrt,e=RF.EventEmitter;function n(i,s,a,o){if(this.options=o||{},this._mapA=i,this._mapB=s,this._horizontal=this.options.orientation==="horizontal",this._onDown=this._onDown.bind(this),this._onMove=this._onMove.bind(this),this._onMouseUp=this._onMouseUp.bind(this),this._onTouchEnd=this._onTouchEnd.bind(this),this._ev=new e,this._swiper=document.createElement("div"),this._swiper.className=this._horizontal?"compare-swiper-horizontal":"compare-swiper-vertical",this._controlContainer=document.createElement("div"),this._controlContainer.className=this._horizontal?"maplibregl-compare maplibregl-compare-horizontal":"maplibregl-compare",this._controlContainer.className=this._controlContainer.className,this._controlContainer.appendChild(this._swiper),typeof a=="string"&&document.body.querySelectorAll){var h=document.body.querySelectorAll(a)[0];if(!h)throw new Error("Cannot find element with specified container selector.");h.appendChild(this._controlContainer)}else if(a instanceof Element&&a.appendChild)a.appendChild(this._controlContainer);else throw new Error("Invalid container specified. Must be CSS selector or HTML element.");this._bounds=s.getContainer().getBoundingClientRect();var f=(this._horizontal?this._bounds.height:this._bounds.width)/2;this._setPosition(f),this._clearSync=t(i,s),this._onResize=(function(){this._bounds=s.getContainer().getBoundingClientRect(),this.currentPosition&&this._setPosition(this.currentPosition)}).bind(this),s.on("resize",this._onResize),this.options&&this.options.mousemove&&(i.getContainer().addEventListener("mousemove",this._onMove),s.getContainer().addEventListener("mousemove",this._onMove)),this._swiper.addEventListener("mousedown",this._onDown),this._swiper.addEventListener("touchstart",this._onDown)}n.prototype={_setPointerEvents:function(i){this._controlContainer.style.pointerEvents=i,this._swiper.style.pointerEvents=i},_onDown:function(i){i.touches?(document.addEventListener("touchmove",this._onMove),document.addEventListener("touchend",this._onTouchEnd)):(document.addEventListener("mousemove",this._onMove),document.addEventListener("mouseup",this._onMouseUp))},_setPosition:function(i){i=Math.min(i,this._horizontal?this._bounds.height:this._bounds.width);var s=this._horizontal?"translate(0, "+i+"px)":"translate("+i+"px, 0)";this._controlContainer.style.transform=s,this._controlContainer.style.WebkitTransform=s;var a=this._horizontal?"rect(0, 999em, "+i+"px, 0)":"rect(0, "+i+"px, "+this._bounds.height+"px, 0)",o=this._horizontal?"rect("+i+"px, 999em, "+this._bounds.height+"px,0)":"rect(0, 999em, "+this._bounds.height+"px,"+i+"px)";this._mapA.getContainer().style.clip=a,this._mapB.getContainer().style.clip=o,this.currentPosition=i},_onMove:function(i){this.options&&this.options.mousemove&&this._setPointerEvents(i.touches?"auto":"none"),this._horizontal?this._setPosition(this._getY(i)):this._setPosition(this._getX(i))},_onMouseUp:function(){document.removeEventListener("mousemove",this._onMove),document.removeEventListener("mouseup",this._onMouseUp),this.fire("slideend",{currentPosition:this.currentPosition})},_onTouchEnd:function(){document.removeEventListener("touchmove",this._onMove),document.removeEventListener("touchend",this._onTouchEnd),this.fire("slideend",{currentPosition:this.currentPosition})},_getX:function(i){i=i.touches?i.touches[0]:i;var s=i.clientX-this._bounds.left;return s<0&&(s=0),s>this._bounds.width&&(s=this._bounds.width),s},_getY:function(i){i=i.touches?i.touches[0]:i;var s=i.clientY-this._bounds.top;return s<0&&(s=0),s>this._bounds.height&&(s=this._bounds.height),s},setSlider:function(i){this._setPosition(i)},on:function(i,s){return this._ev.on(i,s),this},fire:function(i,s){return this._ev.emit(i,s),this},off:function(i,s){return this._ev.removeListener(i,s),this},remove:function(){this._clearSync(),this._mapB.off("resize",this._onResize);var i=this._mapA.getContainer();i&&(i.style.clip=null,i.removeEventListener("mousemove",this._onMove));var s=this._mapB.getContainer();s&&(s.style.clip=null,s.removeEventListener("mousemove",this._onMove)),this._swiper.removeEventListener("mousedown",this._onDown),this._swiper.removeEventListener("touchstart",this._onDown),this._controlContainer.remove()}},window.maplibregl?maplibregl.Compare=n:r.exports=n})(kF);var irt=kF.exports;const srt=Bm(irt);class ort{constructor(t,e,n,i){this.mapCompare=new srt(t.map,e.map,n,{})}}/*!
2567
+ </svg>`,o=document.createElement("a");o.href=`data:application/xml,${encodeURIComponent(a)}`,o.download=e,o.click(),o.remove()}toPixels(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:96;return this.unit===og.mm&&(e/=25.4),`${e*t}px`}toBlob(t){const e=atob(t.replace(/^.*,/,"")),n=new Uint8Array(e.length);for(let i=0;i<e.length;i+=1)n[i]=e.charCodeAt(i);return new Blob([n.buffer],{type:"image/png"})}},Xtt=class{constructor(t){Ai(this,"map"),Ai(this,"width"),Ai(this,"height"),Ai(this,"unit"),Ai(this,"svgCanvas"),Ai(this,"svgPath");var e,n,i;if(this.map=t,this.map===void 0)return;this.mapResize=this.mapResize.bind(this),this.map.on("resize",this.mapResize);const s=(e=this.map)==null?void 0:e.getCanvas().clientWidth,a=(n=this.map)==null?void 0:n.getCanvas().clientHeight,o=document.createElementNS("http://www.w3.org/2000/svg","svg");o.style.position="absolute",o.style.top="0px",o.style.left="0px",o.setAttribute("width",`${s}px`),o.setAttribute("height",`${a}px`);const h=document.createElementNS("http://www.w3.org/2000/svg","path");h.setAttribute("style","fill:#888888;stroke-width:0"),h.setAttribute("fill-opacity","0.5"),o.append(h),(i=this.map)==null||i.getCanvasContainer().appendChild(o),this.svgCanvas=o,this.svgPath=h}mapResize(){this.generateCutOut()}updateArea(t,e){this.width=t,this.height=e,this.unit=og.mm,this.generateCutOut()}generateCutOut(){var t,e;if(this.map===void 0||this.svgCanvas===void 0||this.svgPath===void 0)return;const n=this.toPixels(this.width),i=this.toPixels(this.height),s=(t=this.map)==null?void 0:t.getCanvas().clientWidth,a=(e=this.map)==null?void 0:e.getCanvas().clientHeight,o=s/2-n/2,h=o+n,f=a/2-i/2,g=f+i;this.svgCanvas.setAttribute("width",`${s}px`),this.svgCanvas.setAttribute("height",`${a}px`),this.svgPath.setAttribute("d",`M 0 0 L ${s} 0 L ${s} ${a} L 0 ${a} M ${o} ${f} L ${o} ${g} L ${h} ${g} L ${h} ${f}`)}destroy(){this.svgCanvas!==void 0&&(this.svgCanvas.remove(),this.svgCanvas=void 0),this.map!==void 0&&(this.map=void 0)}toPixels(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:96;return this.unit===og.mm&&(e/=25.4),e*t}};const _F={PageSize:"Page Size",PageOrientation:"Page Orientation",Format:"Format",DPI:"DPI",Generate:"Generate"},Jtt={PageSize:"Taille de page",PageOrientation:"Orientation de la page",Format:"Format",DPI:"DPI",Generate:"Générer"},Ytt={PageSize:"Sivukoko",PageOrientation:"Sivun suunta",Format:"Muoto",DPI:"DPI",Generate:"Generoi"},Ztt={PageSize:"Papierformat",PageOrientation:"Papierausrichtung",Format:"Dateiformat",DPI:"Druckauflösung",Generate:"Erstellen"},tet={PageSize:"Sidstorlek",PageOrientation:"Sidorientering",Format:"Format",DPI:"DPI",Generate:"Generera"},eet={PageSize:"Tamaño de página",PageOrientation:"Orientación de página",Format:"Formato",DPI:"DPI",Generate:"Generar"},ret={PageSize:"Kích thước trang",PageOrientation:"Loại trang",Format:"Định dạng",DPI:"Mật độ điểm ảnh (DPI)",Generate:"Tạo"},net={PageSize:"Розмір сторінки",PageOrientation:"Орієнтація сторінки",Format:"Формат",DPI:"DPI",Generate:"Згенерувати"},iet={PageSize:"页面大小",PageOrientation:"页面方向",Format:"格式",DPI:"像素",Generate:"导出"},set={PageSize:"頁面大小",PageOrientation:"頁面方向",Format:"格式",DPI:"像素",Generate:"導出"},oet={PageSize:"ページサイズ",PageOrientation:"ページ方向",Format:"フォーマット",DPI:"DPI(解像度)",Generate:"出力"};let aet=class{constructor(t){Ai(this,"controlContainer"),Ai(this,"exportContainer"),Ai(this,"crosshair"),Ai(this,"printableArea"),Ai(this,"map"),Ai(this,"exportButton"),Ai(this,"options",{PageSize:lf.A4,PageOrientation:ag.Landscape,Format:Iu.PDF,DPI:jw[300],Crosshair:!1,PrintableArea:!1,Local:"en",AllowedSizes:Object.keys(lf),Filename:"map"}),t&&(this.options=Object.assign(this.options,t)),this.onDocumentClick=this.onDocumentClick.bind(this)}getDefaultPosition(){return"top-right"}getTranslation(){switch(this.options.Local){case"de":return Ztt;case"en":return _F;case"fr":return Jtt;case"fi":return Ytt;case"sv":return tet;case"es":return eet;case"vi":return ret;case"uk":return net;case"zhHans":return iet;case"zhHant":return set;case"ja":return oet;default:return _F}}onAdd(t){var e;this.map=t,this.controlContainer=document.createElement("div"),this.controlContainer.classList.add("maplibregl-ctrl"),this.controlContainer.classList.add("maplibregl-ctrl-group"),this.exportContainer=document.createElement("div"),this.exportContainer.classList.add("maplibregl-export-list"),this.exportButton=document.createElement("button"),this.exportButton.classList.add("maplibregl-ctrl-icon"),this.exportButton.classList.add("maplibregl-export-control"),this.exportButton.type="button",this.exportButton.addEventListener("click",()=>{this.exportButton.style.display="none",this.exportContainer.style.display="block",this.toggleCrosshair(!0),this.togglePrintableArea(!0)}),document.addEventListener("click",this.onDocumentClick),this.controlContainer.appendChild(this.exportButton),this.controlContainer.appendChild(this.exportContainer);const n=document.createElement("TABLE");n.className="print-table";const i={};(e=this.options.AllowedSizes)==null||e.forEach(g=>{lf[g]&&(i[g]=lf[g])});const s=this.createSelection(i,this.getTranslation().PageSize,"page-size",this.options.PageSize,(g,b)=>JSON.stringify(g[b]));n.appendChild(s);const a=this.createSelection(ag,this.getTranslation().PageOrientation,"page-orientation",this.options.PageOrientation,(g,b)=>g[b]);n.appendChild(a);const o=this.createSelection(Iu,this.getTranslation().Format,"format-type",this.options.Format,(g,b)=>g[b]);n.appendChild(o);const h=this.createSelection(jw,this.getTranslation().DPI,"dpi-type",this.options.DPI,(g,b)=>g[b]);n.appendChild(h),this.exportContainer.appendChild(n);const f=document.createElement("button");return f.type="button",f.textContent=this.getTranslation().Generate,f.classList.add("generate-button"),f.addEventListener("click",()=>{const g=document.getElementById("mapbox-gl-export-page-size"),b=document.getElementById("mapbox-gl-export-page-orientation"),C=document.getElementById("mapbox-gl-export-format-type"),B=document.getElementById("mapbox-gl-export-dpi-type"),R=b.value;let D=JSON.parse(g.value);R===ag.Portrait&&(D=D.reverse()),new Wtt(t,D,Number(B.value),C.value,og.mm,this.options.Filename).generate()}),this.exportContainer.appendChild(f),this.controlContainer}createSelection(t,e,n,i,s){const a=document.createElement("label");a.textContent=e;const o=document.createElement("select");o.setAttribute("id",`mapbox-gl-export-${n}`),o.style.width="100%",Object.keys(t).forEach(b=>{const C=document.createElement("option");C.setAttribute("value",s(t,b)),C.appendChild(document.createTextNode(b)),C.setAttribute("name",n),i===t[b]&&(C.selected=!0),o.appendChild(C)}),o.addEventListener("change",()=>{this.updatePrintableArea()});const h=document.createElement("TR"),f=document.createElement("TD"),g=document.createElement("TD");return f.appendChild(a),g.appendChild(o),h.appendChild(f),h.appendChild(g),h}onRemove(){!this.controlContainer||!this.controlContainer.parentNode||!this.map||!this.exportButton||(this.exportButton.removeEventListener("click",this.onDocumentClick),this.controlContainer.parentNode.removeChild(this.controlContainer),document.removeEventListener("click",this.onDocumentClick),this.crosshair!==void 0&&(this.crosshair.destroy(),this.crosshair=void 0),this.map=void 0)}onDocumentClick(t){this.controlContainer&&!this.controlContainer.contains(t.target)&&this.exportContainer&&this.exportButton&&(this.exportContainer.style.display="none",this.exportButton.style.display="block",this.toggleCrosshair(!1),this.togglePrintableArea(!1))}toggleCrosshair(t){this.options.Crosshair===!0&&(t===!1?this.crosshair!==void 0&&(this.crosshair.destroy(),this.crosshair=void 0):(this.crosshair=new JZ(this.map),this.crosshair.create()))}togglePrintableArea(t){this.options.PrintableArea===!0&&(t===!1?this.printableArea!==void 0&&(this.printableArea.destroy(),this.printableArea=void 0):(this.printableArea=new Xtt(this.map),this.updatePrintableArea()))}updatePrintableArea(){if(this.printableArea===void 0)return;const t=document.getElementById("mapbox-gl-export-page-size"),e=document.getElementById("mapbox-gl-export-page-orientation").value;let n=JSON.parse(t.value);e===ag.Portrait&&(n=n.reverse()),this.printableArea.updateArea(n[0],n[1])}};var vF=Aet,cet=Object.prototype.hasOwnProperty;function Aet(){for(var r={},t=0;t<arguments.length;t++){var e=arguments[t];for(var n in e)cet.call(e,n)&&(r[n]=e[n])}return r}var bF={exports:{}};(function(r,t){(function(){var e={};r.exports=e,e.simpleFilter=function(n,i){return i.filter(function(s){return e.test(n,s)})},e.test=function(n,i){return e.match(n,i)!==null},e.match=function(n,i,s){s=s||{};var a=0,o=[],h=i.length,f=0,g=0,b=s.pre||"",C=s.post||"",B=s.caseSensitive&&i||i.toLowerCase(),R;n=s.caseSensitive&&n||n.toLowerCase();for(var D=0;D<h;D++)R=i[D],B[D]===n[a]?(R=b+R+C,a+=1,g+=1+g):g=0,f+=g,o[o.length]=R;return a===n.length?(f=B===n?1/0:f,{rendered:o.join(""),score:f}):null},e.filter=function(n,i,s){return!i||i.length===0?[]:typeof n!="string"?i:(s=s||{},i.reduce(function(a,o,h,f){var g=o;s.extract&&(g=s.extract(o));var b=e.match(n,g,s);return b!=null&&(a[a.length]={string:b.rendered,score:b.score,index:h,original:o}),a},[]).sort(function(a,o){var h=o.score-a.score;return h||a.index-o.index}))}})()})(bF);var uet=bF.exports,ua=function(r){return this.component=r,this.items=[],this.active=r.options.noInitialSelection?-1: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,r.el.parentNode.insertBefore(this.wrapper,r.el.nextSibling),this};ua.prototype.show=function(){this.element.style.display="block"},ua.prototype.hide=function(){this.element.style.display="none"},ua.prototype.add=function(r){this.items.push(r)},ua.prototype.clear=function(){this.items=[],this.active=this.component.options.noInitialSelection?-1:0},ua.prototype.isEmpty=function(){return!this.items.length},ua.prototype.isVisible=function(){return this.element.style.display==="block"},ua.prototype.draw=function(){if(this.element.innerHTML="",this.items.length===0){this.hide();return}for(var r=0;r<this.items.length;r++)this.drawItem(this.items[r],this.active===r);this.show()},ua.prototype.drawItem=function(r,t){var e=document.createElement("li"),n=document.createElement("a");t&&(e.className+=" active"),n.innerHTML=r.string,e.appendChild(n),this.element.appendChild(e),e.addEventListener("mousedown",(function(){this.selectingListItem=!0}).bind(this)),e.addEventListener("mouseup",(function(){this.handleMouseUp.call(this,r)}).bind(this))},ua.prototype.handleMouseUp=function(r){this.selectingListItem=!1,this.component.value(r.original),this.clear(),this.draw()},ua.prototype.move=function(r){this.active=r,this.draw()},ua.prototype.previous=function(){this.move(this.active<=0?this.items.length-1:this.active-1)},ua.prototype.next=function(){this.move(this.active>=this.items.length-1?0:this.active+1)},ua.prototype.drawError=function(r){var t=document.createElement("li");t.innerHTML=r,this.element.appendChild(t),this.show()};var het=ua,det=vF,fet=uet,pet=het,_o=function(r,t,e){return e=e||{},this.options=det({minLength:2,limit:5,filter:!0,hideOnBlur:!0,noInitialSelection:!0},e),this.el=r,this.data=t||[],this.list=new pet(this),this.query="",this.selected=null,this.list.draw(),this.el.addEventListener("keyup",(function(n){this.handleKeyUp(n.keyCode,n)}).bind(this),!1),this.el.addEventListener("keydown",(function(n){this.handleKeyDown(n)}).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(n){this.handlePaste(n)}).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};_o.prototype.handleKeyUp=function(r,t){if(!(r===40||r===38||r===27||r===9)){if(r===13){this.list.items[this.list.active]&&(this.list.handleMouseUp(this.list.items[this.list.active]),t.stopPropagation());return}this.handleInputChange(this.el.value)}},_o.prototype.handleKeyDown=function(r){switch(r.keyCode){case 13:this.list.active>=0&&(this.list.selectingListItem=!0);break;case 9:this.list.isEmpty()||(this.list.isVisible()&&r.preventDefault(),this.value(this.list.active>=0?this.list.items[this.list.active].original:null),this.list.hide());break;case 27:this.list.isEmpty()||this.list.hide();break;case 38:this.list.previous();break;case 40:this.list.next();break}},_o.prototype.handleBlur=function(){!this.list.selectingListItem&&this.options.hideOnBlur&&this.list.hide()},_o.prototype.handlePaste=function(r){if(r.clipboardData)this.handleInputChange(r.clipboardData.getData("Text"));else{var t=this;setTimeout(function(){t.handleInputChange(r.target.value)},100)}},_o.prototype.handleInputChange=function(r){if(this.query=this.normalize(r),this.list.clear(),this.query.length<this.options.minLength){this.list.draw();return}this.getCandidates((function(t){for(var e=0;e<t.length&&(this.list.add(t[e]),e!==this.options.limit-1);e++);this.list.draw()}).bind(this))},_o.prototype.handleFocus=function(){this.list.isEmpty()||this.list.show(),this.list.selectingListItem=!1},_o.prototype.update=function(r){this.data=r,this.handleKeyUp()},_o.prototype.clear=function(){this.data=[],this.list.clear()},_o.prototype.normalize=function(r){return r=r.toLowerCase(),r},_o.prototype.match=function(r,t){return r.indexOf(t)>-1},_o.prototype.value=function(r){if(this.selected=r,this.el.value=this.getItemValue(r||{place_name:this.query}),document.createEvent){var t=document.createEvent("HTMLEvents");t.initEvent("change",!0,!1),this.el.dispatchEvent(t)}else this.el.fireEvent("onchange")},_o.prototype.getCandidates=function(r){var t={pre:"<strong>",post:"</strong>",extract:(function(n){return this.getItemValue(n)}).bind(this)},e;this.options.filter?(e=fet.filter(this.query,this.data,t),e=e.map((function(n){return{original:n.original,string:this.render(n.original,n.string)}}).bind(this))):e=this.data.map((function(n){var i=this.render(n);return{original:n,string:i}}).bind(this)),r(e)},_o.prototype.getItemValue=function(r){return r},_o.prototype.render=function(r,t){if(t)return t;for(var e=r.original?this.getItemValue(r.original):this.getItemValue(r),n=this.normalize(e),i=n.lastIndexOf(this.query);i>-1;){var s=i+this.query.length;e=e.slice(0,i)+"<strong>"+e.slice(i,s)+"</strong>"+e.slice(s),i=n.slice(0,i).lastIndexOf(this.query)}return e},_o.prototype.renderError=function(r){this.list.drawError(r)};var get=_o,wF=get,met=wF;typeof window<"u"&&(window.Suggestions=wF);var yet="Expected a function",xF=NaN,_et="[object Symbol]",vet=/^\s+|\s+$/g,bet=/^[-+]0x[0-9a-f]+$/i,wet=/^0b[01]+$/i,xet=/^0o[0-7]+$/i,Bet=parseInt,Cet=typeof pd=="object"&&pd&&pd.Object===Object&&pd,Eet=typeof self=="object"&&self&&self.Object===Object&&self,Tet=Cet||Eet||Function("return this")(),Iet=Object.prototype,Let=Iet.toString,Fet=Math.max,Met=Math.min,qw=function(){return Tet.Date.now()};function Pet(r,t,e){var n,i,s,a,o,h,f=0,g=!1,b=!1,C=!0;if(typeof r!="function")throw new TypeError(yet);t=BF(t)||0,Kw(e)&&(g=!!e.leading,b="maxWait"in e,s=b?Fet(BF(e.maxWait)||0,t):s,C="trailing"in e?!!e.trailing:C);function B(pt){var yt=n,ft=i;return n=i=void 0,f=pt,a=r.apply(ft,yt),a}function R(pt){return f=pt,o=setTimeout(k,t),g?B(pt):a}function D(pt){var yt=pt-h,ft=pt-f,Dt=t-yt;return b?Met(Dt,s-ft):Dt}function Q(pt){var yt=pt-h,ft=pt-f;return h===void 0||yt>=t||yt<0||b&&ft>=s}function k(){var pt=qw();if(Q(pt))return j(pt);o=setTimeout(k,D(pt))}function j(pt){return o=void 0,C&&n?B(pt):(n=i=void 0,a)}function et(){o!==void 0&&clearTimeout(o),f=0,n=h=i=o=void 0}function st(){return o===void 0?a:j(qw())}function mt(){var pt=qw(),yt=Q(pt);if(n=arguments,i=this,h=pt,yt){if(o===void 0)return R(h);if(b)return o=setTimeout(k,t),B(h)}return o===void 0&&(o=setTimeout(k,t)),a}return mt.cancel=et,mt.flush=st,mt}function Kw(r){var t=typeof r;return!!r&&(t=="object"||t=="function")}function Uet(r){return!!r&&typeof r=="object"}function Ret(r){return typeof r=="symbol"||Uet(r)&&Let.call(r)==_et}function BF(r){if(typeof r=="number")return r;if(Ret(r))return xF;if(Kw(r)){var t=typeof r.valueOf=="function"?r.valueOf():r;r=Kw(t)?t+"":t}if(typeof r!="string")return r===0?r:+r;r=r.replace(vet,"");var e=wet.test(r);return e||xet.test(r)?Bet(r.slice(2),e?2:8):bet.test(r)?xF:+r}var Det=Pet,$w={exports:{}},Af=typeof Reflect=="object"?Reflect:null,CF=Af&&typeof Af.apply=="function"?Af.apply:function(t,e,n){return Function.prototype.apply.call(t,e,n)},ey;Af&&typeof Af.ownKeys=="function"?ey=Af.ownKeys:Object.getOwnPropertySymbols?ey=function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:ey=function(t){return Object.getOwnPropertyNames(t)};function Oet(r){console&&console.warn&&console.warn(r)}var EF=Number.isNaN||function(t){return t!==t};function ni(){ni.init.call(this)}$w.exports=ni,$w.exports.once=zet,ni.EventEmitter=ni,ni.prototype._events=void 0,ni.prototype._eventsCount=0,ni.prototype._maxListeners=void 0;var SF=10;function ry(r){if(typeof r!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof r)}Object.defineProperty(ni,"defaultMaxListeners",{enumerable:!0,get:function(){return SF},set:function(r){if(typeof r!="number"||r<0||EF(r))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+r+".");SF=r}}),ni.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},ni.prototype.setMaxListeners=function(t){if(typeof t!="number"||t<0||EF(t))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this};function TF(r){return r._maxListeners===void 0?ni.defaultMaxListeners:r._maxListeners}ni.prototype.getMaxListeners=function(){return TF(this)},ni.prototype.emit=function(t){for(var e=[],n=1;n<arguments.length;n++)e.push(arguments[n]);var i=t==="error",s=this._events;if(s!==void 0)i=i&&s.error===void 0;else if(!i)return!1;if(i){var a;if(e.length>0&&(a=e[0]),a instanceof Error)throw a;var o=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw o.context=a,o}var h=s[t];if(h===void 0)return!1;if(typeof h=="function")CF(h,this,e);else for(var f=h.length,g=PF(h,f),n=0;n<f;++n)CF(g[n],this,e);return!0};function IF(r,t,e,n){var i,s,a;if(ry(e),s=r._events,s===void 0?(s=r._events=Object.create(null),r._eventsCount=0):(s.newListener!==void 0&&(r.emit("newListener",t,e.listener?e.listener:e),s=r._events),a=s[t]),a===void 0)a=s[t]=e,++r._eventsCount;else if(typeof a=="function"?a=s[t]=n?[e,a]:[a,e]:n?a.unshift(e):a.push(e),i=TF(r),i>0&&a.length>i&&!a.warned){a.warned=!0;var o=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");o.name="MaxListenersExceededWarning",o.emitter=r,o.type=t,o.count=a.length,Oet(o)}return r}ni.prototype.addListener=function(t,e){return IF(this,t,e,!1)},ni.prototype.on=ni.prototype.addListener,ni.prototype.prependListener=function(t,e){return IF(this,t,e,!0)};function Net(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function LF(r,t,e){var n={fired:!1,wrapFn:void 0,target:r,type:t,listener:e},i=Net.bind(n);return i.listener=e,n.wrapFn=i,i}ni.prototype.once=function(t,e){return ry(e),this.on(t,LF(this,t,e)),this},ni.prototype.prependOnceListener=function(t,e){return ry(e),this.prependListener(t,LF(this,t,e)),this},ni.prototype.removeListener=function(t,e){var n,i,s,a,o;if(ry(e),i=this._events,i===void 0)return this;if(n=i[t],n===void 0)return this;if(n===e||n.listener===e)--this._eventsCount===0?this._events=Object.create(null):(delete i[t],i.removeListener&&this.emit("removeListener",t,n.listener||e));else if(typeof n!="function"){for(s=-1,a=n.length-1;a>=0;a--)if(n[a]===e||n[a].listener===e){o=n[a].listener,s=a;break}if(s<0)return this;s===0?n.shift():ket(n,s),n.length===1&&(i[t]=n[0]),i.removeListener!==void 0&&this.emit("removeListener",t,o||e)}return this},ni.prototype.off=ni.prototype.removeListener,ni.prototype.removeAllListeners=function(t){var e,n,i;if(n=this._events,n===void 0)return this;if(n.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):n[t]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete n[t]),this;if(arguments.length===0){var s=Object.keys(n),a;for(i=0;i<s.length;++i)a=s[i],a!=="removeListener"&&this.removeAllListeners(a);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(e=n[t],typeof e=="function")this.removeListener(t,e);else if(e!==void 0)for(i=e.length-1;i>=0;i--)this.removeListener(t,e[i]);return this};function FF(r,t,e){var n=r._events;if(n===void 0)return[];var i=n[t];return i===void 0?[]:typeof i=="function"?e?[i.listener||i]:[i]:e?Qet(i):PF(i,i.length)}ni.prototype.listeners=function(t){return FF(this,t,!0)},ni.prototype.rawListeners=function(t){return FF(this,t,!1)},ni.listenerCount=function(r,t){return typeof r.listenerCount=="function"?r.listenerCount(t):MF.call(r,t)},ni.prototype.listenerCount=MF;function MF(r){var t=this._events;if(t!==void 0){var e=t[r];if(typeof e=="function")return 1;if(e!==void 0)return e.length}return 0}ni.prototype.eventNames=function(){return this._eventsCount>0?ey(this._events):[]};function PF(r,t){for(var e=new Array(t),n=0;n<t;++n)e[n]=r[n];return e}function ket(r,t){for(;t+1<r.length;t++)r[t]=r[t+1];r.pop()}function Qet(r){for(var t=new Array(r.length),e=0;e<t.length;++e)t[e]=r[e].listener||r[e];return t}function zet(r,t){return new Promise(function(e,n){function i(a){r.removeListener(t,s),n(a)}function s(){typeof r.removeListener=="function"&&r.removeListener("error",i),e([].slice.call(arguments))}UF(r,t,s,{once:!0}),t!=="error"&&Het(r,i,{once:!0})})}function Het(r,t,e){typeof r.on=="function"&&UF(r,"error",t,e)}function UF(r,t,e,n){if(typeof r.on=="function")n.once?r.once(t,e):r.on(t,e);else if(typeof r.addEventListener=="function")r.addEventListener(t,function i(s){n.once&&r.removeEventListener(t,i),e(s)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof r)}var RF=$w.exports,Get={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]]}},Vet={de:"Suche",it:"Ricerca",en:"Search",nl:"Zoeken",fr:"Chercher",ca:"Cerca",he:"לחפש",ja:"サーチ",lv:"Meklēt",pt:"Procurar",sr:"Претрага",zh:"搜索",cs:"Vyhledávání",hu:"Keresés",ka:"ძიება",nb:"Søke",sk:"Vyhľadávanie",th:"ค้นหา",fi:"Hae",is:"Leita",ko:"수색",pl:"Szukaj",sl:"Iskanje",fa:"جستجو",ru:"Поиск"},jet={placeholder:Vet},DF={exports:{}};(function(r){(function(t,e,n){r.exports?r.exports=n():t[e]=n()})(pd,"subtag",function(){var t="",e=/^([a-zA-Z]{2,3})(?:[_-]+([a-zA-Z]{3})(?=$|[_-]+))?(?:[_-]+([a-zA-Z]{4})(?=$|[_-]+))?(?:[_-]+([a-zA-Z]{2}|[0-9]{3})(?=$|[_-]+))?/;function n(h){return h.match(e)||[]}function i(h){return n(h).filter(function(f,g){return f&&g})}function s(h){return h=n(h),{language:h[1]||t,extlang:h[2]||t,script:h[3]||t,region:h[4]||t}}function a(h,f,g){Object.defineProperty(h,f,{value:g,enumerable:!0})}function o(h,f,g){function b(C){return n(C)[h]||t}a(b,"pattern",f),a(s,g,b)}return o(1,/^[a-zA-Z]{2,3}$/,"language"),o(2,/^[a-zA-Z]{3}$/,"extlang"),o(3,/^[a-zA-Z]{4}$/,"script"),o(4,/^[a-zA-Z]{2}$|^[0-9]{3}$/,"region"),a(s,"split",i),s})})(DF);var qet=DF.exports,Ket=met,$et=Det,Na=vF,Wet=RF.EventEmitter,OF=Get,Xet=jet,Jet=qet;function NF(r,t){this._eventEmitter=new Wet,this.options=Na({},this.options,t),this.inputString="",this.fresh=!0,this.lastSelected=null,this.geocoderApi=r}NF.prototype={options:{zoom:16,flyTo:!0,trackProximity:!0,showResultsWhileTyping:!1,minLength:2,reverseGeocode:!1,limit:5,enableEventLogging:!0,marker:!0,popup:!1,maplibregl:null,collapsed:!1,clearAndBlurOnEsc:!1,clearOnBlur:!1,getItemValue:function(r){return r.text!==void 0?r.text:r.place_name},render:function(r){if(r.geometry){var o=r.place_name.split(",");return'<div class="mapboxgl-ctrl-geocoder--result maplibregl-ctrl-geocoder--result"><svg class="mapboxgl-ctrl-geocoder--result-icon maplibre-ctrl-geocoder--result-icon" viewBox="0 0 24 32" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M12 0C5.36571 0 0 5.38676 0 12.0471C0 21.0824 12 32 12 32C12 32 24 21.0824 24 12.0471C24 5.38676 18.6343 0 12 0ZM12 16.3496C9.63428 16.3496 7.71429 14.4221 7.71429 12.0471C7.71429 9.67207 9.63428 7.74454 12 7.74454C14.3657 7.74454 16.2857 9.67207 16.2857 12.0471C16.2857 14.4221 14.3657 16.3496 12 16.3496Z" fill="#687078"/></svg><div><div class="mapboxgl-ctrl-geocoder--result-title maplibregl-ctrl-geocoder--result-title">'+o[0]+'</div><div class="mapboxgl-ctrl-geocoder--result-address maplibregl-ctrl-geocoder--result-address">'+o.splice(1,o.length).join(",")+"</div></div></div>"}else{var t=r.text,e=t.toLowerCase().indexOf(this.query.toLowerCase()),n=this.query.length,i=t.substring(0,e),s=t.substring(e,e+n),a=t.substring(e+n);return'<div class="mapboxgl-ctrl-geocoder--suggestion maplibregl-ctrl-geocoder--suggestion"><svg class="mapboxgl-ctrl-geocoder--suggestion-icon maplibre-ctrl-geocoder--suggestion-icon" viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg"><path d="M22.8702 20.1258H21.4248L20.9125 19.6318C22.7055 17.546 23.785 14.8382 23.785 11.8925C23.785 5.32419 18.4608 0 11.8925 0C5.32419 0 0 5.32419 0 11.8925C0 18.4608 5.32419 23.785 11.8925 23.785C14.8382 23.785 17.546 22.7055 19.6318 20.9125L20.1258 21.4248V22.8702L29.2739 32L32 29.2739L22.8702 20.1258ZM11.8925 20.1258C7.33676 20.1258 3.65923 16.4483 3.65923 11.8925C3.65923 7.33676 7.33676 3.65923 11.8925 3.65923C16.4483 3.65923 20.1258 7.33676 20.1258 11.8925C20.1258 16.4483 16.4483 20.1258 11.8925 20.1258Z" fill="#687078"/></svg><div class="mapboxgl-ctrl-geocoder--suggestion-info maplibregl-ctrl-geocoder--suggestion-info"><div class="mapboxgl-ctrl-geocoder--suggestion-title maplibregl-ctrl-geocoder--suggestion-title">'+i+'<span class="mapboxgl-ctrl-geocoder--suggestion-match maplibregl-ctrl-geocoder--suggestion-match">'+s+"</span>"+a+"</div></div></div>"}},popupRender:function(r){var t=r.place_name.split(",");return'<div class="mapboxgl-ctrl-geocoder--suggestion maplibre-ctrl-geocoder--suggestion popup-suggestion"><div class="mapboxgl-ctrl-geocoder--suggestion-title maplibre-ctrl-geocoder--suggestion-title popup-suggestion-title">'+t[0]+'</div><div class="mapboxgl-ctrl-geocoder--suggestion-address maplibre-ctrl-geocoder--suggestion-address popup-suggestion-address">'+t.splice(1,t.length).join(",")+"</div></div>"},showResultMarkers:!0,debounceSearch:200},addTo:function(r){function t(n,i){if(!document.body.contains(i))throw new Error("Element provided to #addTo() exists, but is not in the DOM");var s=n.onAdd();i.appendChild(s)}if(r._controlContainer)r.addControl(this);else if(r instanceof HTMLElement)t(this,r);else if(typeof r=="string"){var e=document.querySelectorAll(r);if(e.length===0)throw new Error("Element ",r,"not found.");if(e.length>1)throw new Error("Geocoder can only be added to a single html element");t(this,e[0])}else throw new Error("Error: addTo must be a maplibre-gl-js map, an html element, or a CSS selector query for a single html element")},onAdd:function(r){if(r&&typeof r!="string"&&(this._map=r),this.setLanguage(),this.options.localGeocoderOnly&&!this.options.localGeocoder)throw new Error("A localGeocoder function must be specified to use localGeocoderOnly mode");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);var t=this.container=document.createElement("div");t.className="mapboxgl-ctrl-geocoder mapboxgl-ctrl maplibregl-ctrl-geocoder maplibregl-ctrl";var e=this.createIcon("search",'<path d="M7.4 2.5c-2.7 0-4.9 2.2-4.9 4.9s2.2 4.9 4.9 4.9c1 0 1.8-.2 2.5-.8l3.7 3.7c.2.2.4.3.8.3.7 0 1.1-.4 1.1-1.1 0-.3-.1-.5-.3-.8L11.4 10c.4-.8.8-1.6.8-2.5.1-2.8-2.1-5-4.8-5zm0 1.6c1.8 0 3.2 1.4 3.2 3.2s-1.4 3.2-3.2 3.2-3.3-1.3-3.3-3.1 1.4-3.3 3.3-3.3z"/>');this._inputEl=document.createElement("input"),this._inputEl.type="text",this._inputEl.className="mapboxgl-ctrl-geocoder--input maplibregl-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",$et(this._onKeyDown,this.options.debounceSearch)),this._inputEl.addEventListener("paste",this._onPaste),this._inputEl.addEventListener("change",this._onChange),this.container.addEventListener("mouseenter",this._showButton),this.container.addEventListener("mouseleave",this._hideButton);var n=document.createElement("div");n.classList.add("mapboxgl-ctrl-geocoder--pin-right","maplibregl-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 maplibregl-ctrl-geocoder--button";var i=this.createIcon("close",'<path d="M3.8 2.5c-.6 0-1.3.7-1.3 1.3 0 .3.2.7.5.8L7.2 9 3 13.2c-.3.3-.5.7-.5 1 0 .6.7 1.3 1.3 1.3.3 0 .7-.2 1-.5L9 10.8l4.2 4.2c.2.3.7.3 1 .3.6 0 1.3-.7 1.3-1.3 0-.3-.2-.7-.3-1l-4.4-4L15 4.6c.3-.2.5-.5.5-.8 0-.7-.7-1.3-1.3-1.3-.3 0-.7.2-1 .3L9 7.1 4.8 2.8c-.3-.1-.7-.3-1-.3z"/>');return this._clearEl.appendChild(i),this._loadingEl=this.createIcon("loading",'<path fill="#333" d="M4.4 4.4l.8.8c2.1-2.1 5.5-2.1 7.6 0l.8-.8c-2.5-2.5-6.7-2.5-9.2 0z"/><path opacity=".1" d="M12.8 12.9c-2.1 2.1-5.5 2.1-7.6 0-2.1-2.1-2.1-5.5 0-7.7l-.8-.8c-2.5 2.5-2.5 6.7 0 9.2s6.6 2.5 9.2 0 2.5-6.6 0-9.2l-.8.8c2.2 2.1 2.2 5.6 0 7.7z"/>'),n.appendChild(this._clearEl),n.appendChild(this._loadingEl),t.appendChild(e),t.appendChild(this._inputEl),t.appendChild(n),this._typeahead=new Ket(this._inputEl,[],{filter:!1,minLength:this.options.minLength,limit:this.options.limit,noInitialSelection:!0}),this.setRenderFunction(this.options.render),this._typeahead.getItemValue=this.options.getItemValue,this.mapMarker=null,this.resultMarkers=[],this._handleMarker=this._handleMarker.bind(this),this._handleResultMarkers=this._handleResultMarkers.bind(this),this._map&&(this.options.trackProximity&&(this._updateProximity(),this._map.on("moveend",this._updateProximity)),this._maplibregl=this.options.maplibregl,!this._maplibregl&&this.options.marker&&(console.error("No maplibregl detected in options. Map markers are disabled. Please set options.maplibregl."),this.options.marker=!1)),t},createIcon:function(r,t){var e=document.createElementNS("http://www.w3.org/2000/svg","svg");if(e.setAttribute("class","mapboxgl-ctrl-geocoder--icon mapboxgl-ctrl-geocoder--icon-"+r+" maplibregl-ctrl-geocoder--icon maplibregl-ctrl-geocoder--icon-"+r),e.setAttribute("viewBox","0 0 18 18"),e.setAttribute("xml:space","preserve"),e.setAttribute("width",18),e.setAttribute("height",18),"innerHTML"in e)e.innerHTML=t;else{var n=document.createElement("div");n.innerHTML="<svg>"+t.valueOf().toString()+"</svg>";var i=n.firstChild,s=i.firstChild;e.appendChild(s)}return e},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},_onPaste:function(r){var t=(r.clipboardData||window.clipboardData).getData("text");t.length>=this.options.minLength&&this.options.showResultsWhileTyping&&this._geocode(t)},_onKeyDown:function(r){var t=27,e=9;if(r.keyCode===t&&this.options.clearAndBlurOnEsc)return this._clear(r),this._inputEl.blur();var n=r.target&&r.target.shadowRoot?r.target.shadowRoot.activeElement:r.target,i=n?n.value:"";if(!i)return this.fresh=!0,r.keyCode!==e&&this.clear(r),this._clearEl.style.display="none";if(!(r.metaKey||[e,t,37,39,38,40].indexOf(r.keyCode)!==-1)){if(r.keyCode===13)if(!this.options.showResultsWhileTyping)this._typeahead.selected||this._geocode(n.value);else{this._typeahead.selected==null&&this.geocoderApi.getSuggestions?this._geocode(n.value,!0):this._typeahead.selected==null&&this.options.showResultMarkers&&this._fitBoundsForMarkers();return}n.value.length>=this.options.minLength&&this.options.showResultsWhileTyping&&this._geocode(n.value)}},_showButton:function(){this._inputEl.value.length>0&&(this._clearEl.style.display="block")},_hideButton:function(){this._typeahead.selected&&(this._clearEl.style.display="none")},_onBlur:function(r){this.options.clearOnBlur&&this._clearOnBlur(r),this.options.collapsed&&this._collapse()},_onChange:function(){var r=this._typeahead.selected;if(r&&!r.geometry)r.placeId?this._geocode(r.placeId,!0,!0):this._geocode(r.text,!0);else if(r&&JSON.stringify(r)!==this.lastSelected){if(this._clearEl.style.display="none",this.options.flyTo){var t;if(this._removeResultMarkers(),r.properties&&OF[r.properties.short_code])t=Na({},this.options.flyTo),this._map&&this._map.fitBounds(OF[r.properties.short_code].bbox,t);else if(r.bbox){var e=r.bbox;t=Na({},this.options.flyTo),this._map&&this._map.fitBounds([[e[0],e[1]],[e[2],e[3]]],t)}else{var n={zoom:this.options.zoom};t=Na({},n,this.options.flyTo),r.center?t.center=r.center:r.geometry&&r.geometry.type&&r.geometry.type==="Point"&&r.geometry.coordinates&&(t.center=r.geometry.coordinates),this._map&&this._map.flyTo(t)}}this.options.marker&&this._maplibregl&&this._handleMarker(r),this._inputEl.focus(),this._inputEl.scrollLeft=0,this._inputEl.setSelectionRange(0,0),this.lastSelected=JSON.stringify(r),this._typeahead.selected=null,this._eventEmitter.emit("result",{result:r})}},_getConfigForRequest:function(){var r=["bbox","limit","proximity","countries","types","language","reverseMode"],t=this,e=r.reduce(function(n,i){return t.options[i]&&(["countries","types","language"].indexOf(i)>-1?n[i]=t.options[i].split(/[\s,]+/):n[i]=t.options[i],i==="proximity"&&t.options[i]&&typeof t.options[i].longitude=="number"&&typeof t.options[i].latitude=="number"&&(n[i]=[t.options[i].longitude,t.options[i].latitude])),n},{});return e},_geocode:function(r,t,e){this._loadingEl.style.display="block",this._eventEmitter.emit("loading",{query:r}),this.inputString=r;var n=null,i=this._getConfigForRequest(),s;if(this.options.localGeocoderOnly)s=Promise.resolve();else if(this.options.reverseGeocode&&/(-?\d+\.?\d*)[, ]+(-?\d+\.?\d*)[ ]*$/.test(r)){var a=r.split(/[\s(,)?]+/).map(function(f){return parseFloat(f,10)}).reverse();i.types&&i.types[0],i=Na(i,{query:a,limit:1}),"proximity"in i&&delete i.proximity,s=this.geocoderApi.reverseGeocode(i)}else i=Na(i,{query:r}),this.geocoderApi.getSuggestions?t?this.geocoderApi.searchByPlaceId&&e?s=this.geocoderApi.searchByPlaceId(i):s=this.geocoderApi.forwardGeocode(i):s=this.geocoderApi.getSuggestions(i):s=this.geocoderApi.forwardGeocode(i);var o=[];this.options.localGeocoder&&(o=this.options.localGeocoder(r),o||(o=[]));var h=[];return s.catch((function(f){n=f}).bind(this)).then((function(f){this._loadingEl.style.display="none";var g={};return f?g=f:g={type:"FeatureCollection",features:[]},g.config=i,this.fresh&&(this.fresh=!1),g.features=g.features?o.concat(g.features):o,this.options.externalGeocoder?(h=this.options.externalGeocoder(r,g.features,i)||[],h.then(function(b){return g.features=g.features?b.concat(g.features):b,g},function(){return g})):g}).bind(this)).then((function(f){if(n)throw n;this.options.filter&&f.features.length&&(f.features=f.features.filter(this.options.filter));var g=[];f.suggestions?g=f.suggestions:f.place?g=[f.place]:g=f.features,g.length?(this._clearEl.style.display="block",this._typeahead.update(g),(!this.options.showResultsWhileTyping||t)&&this.options.showResultMarkers&&(f.features.length>0||f.place)&&this._fitBoundsForMarkers(),this._eventEmitter.emit("results",f)):(this._clearEl.style.display="none",this._typeahead.selected=null,this._renderNoResults(),this._eventEmitter.emit("results",f))}).bind(this)).catch((function(f){this._loadingEl.style.display="none",o.length&&this.options.localGeocoder||h.length&&this.options.externalGeocoder?(this._clearEl.style.display="block",this._typeahead.update(o)):(this._clearEl.style.display="none",this._typeahead.selected=null,this._renderError()),this._eventEmitter.emit("results",{features:o}),this._eventEmitter.emit("error",{error:f})}).bind(this)),s},_clear:function(r){r&&r.preventDefault(),this._inputEl.value="",this._typeahead.selected=null,this._typeahead.clear(),this._onChange(),this._clearEl.style.display="none",this._removeMarker(),this._removeResultMarkers(),this.lastSelected=null,this._eventEmitter.emit("clear"),this.fresh=!0},clear:function(r){this._clear(r),this._inputEl.focus()},_clearOnBlur:function(r){var t=this;r.relatedTarget&&t._clear(r)},_onQueryResult:function(r){var t=r;if(t.features.length){var e=t.features[0];this._typeahead.selected=e,this._inputEl.value=e.place_name,this._onChange()}},_updateProximity:function(){if(this._map)if(this._map.getZoom()>9){var r=this._map.getCenter().wrap();this.setProximity({longitude:r.lng,latitude:r.lat})}else this.setProximity(null)},_collapse:function(){!this._inputEl.value&&this._inputEl!==document.activeElement&&this.container.classList.add("mapboxgl-ctrl-geocoder--collapsed","maplibregl-ctrl-geocoder--collapsed")},_unCollapse:function(){this.container.classList.remove("mapboxgl-ctrl-geocoder--collapsed","maplibregl-ctrl-geocoder--collapsed")},query:function(r){return this._geocode(r).then(this._onQueryResult),this},_renderError:function(){var r="<div class='mapbox-gl-geocoder--error maplibre-gl-geocoder--error'>There was an error reaching the server</div>";this._renderMessage(r)},_renderNoResults:function(){var r="<div class='mapbox-gl-geocoder--error mapbox-gl-geocoder--no-results maplibre-gl-geocoder--error maplibre-gl-geocoder--no-results'>No results found</div>";this._renderMessage(r)},_renderMessage:function(r){this._typeahead.update([]),this._typeahead.selected=null,this._typeahead.clear(),this._typeahead.renderError(r)},_getPlaceholderText:function(){if(this.options.placeholder)return this.options.placeholder;if(this.options.language){var r=this.options.language.split(",")[0],t=Jet.language(r),e=Xet.placeholder[t];if(e)return e}return"Search"},_fitBoundsForMarkers:function(){if(!(this._typeahead.data.length<1)){var r=this._typeahead.data.filter(function(i){return typeof i!="string"}).slice(0,this.options.limit);if(this._clearEl.style.display="none",this.options.flyTo&&this._maplibregl&&this._map){var t={padding:100},e=Na({},t,this.options.flyTo),n=new this._maplibregl.LngLatBounds;r.forEach(function(i){n.extend(i.geometry.coordinates)}),this._map.fitBounds(n.toArray(),e)}return r.length>0&&this._maplibregl&&this._handleResultMarkers(r),this}},setInput:function(r){return this._inputEl.value=r,this._typeahead.selected=null,this._typeahead.clear(),r.length>=this.options.minLength&&this.options.showResultsWhileTyping&&this._geocode(r),this},setProximity:function(r){return this.options.proximity=r,this},getProximity:function(){return this.options.proximity},setRenderFunction:function(r){return r&&typeof r=="function"&&(this._typeahead.render=r),this},getRenderFunction:function(){return this._typeahead.render},setLanguage:function(r){var t=navigator.language||navigator.userLanguage||navigator.browserLanguage;return this.options.language=r||this.options.language||t,this},getLanguage:function(){return this.options.language},getZoom:function(){return this.options.zoom},setZoom:function(r){return this.options.zoom=r,this},getFlyTo:function(){return this.options.flyTo},setFlyTo:function(r){return this.options.flyTo=r,this},getPlaceholder:function(){return this.options.placeholder},setPlaceholder:function(r){return this.placeholder=r||this._getPlaceholderText(),this._inputEl.placeholder=this.placeholder,this._inputEl.setAttribute("aria-label",this.placeholder),this},getBbox:function(){return this.options.bbox},setBbox:function(r){return this.options.bbox=r,this},getCountries:function(){return this.options.countries},setCountries:function(r){return this.options.countries=r,this},getTypes:function(){return this.options.types},setTypes:function(r){return this.options.types=r,this},getMinLength:function(){return this.options.minLength},setMinLength:function(r){return this.options.minLength=r,this._typeahead&&(this._typeahead.options.minLength=r),this},getLimit:function(){return this.options.limit},setLimit:function(r){return this.options.limit=r,this._typeahead&&(this._typeahead.options.limit=r),this},getFilter:function(){return this.options.filter},setFilter:function(r){return this.options.filter=r,this},setGeocoderApi:function(r){return this.geocoderApi=r,this},getGeocoderApi:function(){return this.geocoderApi},_handleMarker:function(r){if(this._map){this._removeMarker();var t={color:"#4668F2"},e=Na({},t,this.options.marker);this.mapMarker=new this._maplibregl.Marker(e);var n;if(this.options.popup){var i={},s=Na({},i,this.options.popup);n=new this._maplibregl.Popup(s).setHTML(this.options.popupRender(r))}return r.center?(this.mapMarker.setLngLat(r.center).addTo(this._map),this.options.popup&&this.mapMarker.setPopup(n)):r.geometry&&r.geometry.type&&r.geometry.type==="Point"&&r.geometry.coordinates&&(this.mapMarker.setLngLat(r.geometry.coordinates).addTo(this._map),this.options.popup&&this.mapMarker.setPopup(n)),this}},_removeMarker:function(){this.mapMarker&&(this.mapMarker.remove(),this.mapMarker=null)},_handleResultMarkers:function(r){if(this._map){this._removeResultMarkers();var t={color:"#4668F2"},e=Na({},t,this.options.showResultMarkers);return r.forEach((function(n){if(this.options.showResultMarkers&&this.options.showResultMarkers.element){var i=this.options.showResultMarkers.element.cloneNode(!0);e=Na(e,{element:i})}var s=new this._maplibregl.Marker(Na({},e,{element:i})),a;if(this.options.popup){var o={},h=Na({},o,this.options.popup);a=new this._maplibregl.Popup(h).setHTML(this.options.popupRender(n))}n.center?(s.setLngLat(n.center).addTo(this._map),this.options.popup&&s.setPopup(a)):n.geometry&&n.geometry.type&&n.geometry.type==="Point"&&n.geometry.coordinates&&(s.setLngLat(n.geometry.coordinates).addTo(this._map),this.options.popup&&s.setPopup(a)),this.resultMarkers.push(s)}).bind(this)),this}},_removeResultMarkers:function(){this.resultMarkers&&this.resultMarkers.length>0&&(this.resultMarkers.forEach(function(r){r.remove()}),this.resultMarkers=[])},on:function(r,t){return this._eventEmitter.on(r,t),this},off:function(r,t){return this._eventEmitter.removeListener(r,t),this}};var Yet=NF;const Zet=Bm(Yet),ny={ICGC5M:"https://tilemaps.icgc.cat/tileserver/tileserver/terreny-5m-30m-rgb-extent/{z}/{x}/{y}.png",WORLD30M:"https://s3.amazonaws.com/elevation-tiles-prod/terrarium/{z}/{x}/{y}.png"},uf={TOPO:"https://geoserveis.icgc.cat/contextmaps/icgc_mapa_estandard_general.json",ORTO:"https://geoserveis.icgc.cat/contextmaps/icgc_orto_estandard.json",ORTO3D:"https://tilemaps.icgc.cat/cdn/styles/icgc_orto_3d.json",ADMIN:"https://geoserveis.icgc.cat/contextmaps/icgc_delimitacio_limits_administratius.json",DARK:"https://geoserveis.icgc.cat/contextmaps/icgc_mapa_base_fosc.json",LIGHT:"https://geoserveis.icgc.cat/contextmaps/icgc_mapa_base_gris.json",GEOLOGY:"https://geoserveis.icgc.cat/contextmaps/icgc_geologic_informacio.json"},vo={Orto:{ortofotoColorProvisional:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_provisional",ortofotoColor2022:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2022",ortofotoColor2021:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2021",ortofotoColor2020:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2020",ortofotoColor2019:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2019",ortofotoColor2018:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2018",ortofotoColor2017:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2017",ortofotoColor2016:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2016",ortofotoColor2015:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2015",ortofotoColor2014:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2014",ortofotoColor2013:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2013",ortofotoColor2012:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2012",ortofotoColor2011:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2011",ortofotoColor2010:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2010",ortofotoColor2009:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2009",ortofotoColor2008:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2008",ortofotoColor20062007:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2006-2007",ortofotoColor20042005:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2004-2005",ortofotoColor20002003:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2000-2003",ortofotoBlancINegre1998:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_blanc_i_negre_1998",ortofotoBlancINegre19941997:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_blanc_i_negre_1994-1997",ortofotoColor1993:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_1993",ortofotoBlancINegre19831992:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_blanc_i_negre_1983-1992",ortofotoBlancINegre19701977:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_blanc_i_negre_1970-1977",ortofotoBlancINegre1956:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_blanc_i_negre_1956",ortofotoBlancINegre1945:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_blanc_i_negre_1945",ortofotoColorSerieAnual:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_serie_anual",ortofotoInfraroigProvisional:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_provisional",ortofotoInfraroig2022:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2022",ortofotoInfraroig2021:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2021",ortofotoInfraroig2020:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2020",ortofotoInfraroig2019:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2019",ortofotoInfraroig2018:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2018",ortofotoInfraroig2017:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2017",ortofotoInfraroig2016:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2016",ortofotoInfraroig2015:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2015",ortofotoInfraroig2014:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2014",ortofotoInfraroig2013:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2013",ortofotoInfraroig2012:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2012",ortofotoInfraroig2011:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2011",ortofotoInfraroig2010:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2010",ortofotoInfraroig2009:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2009",ortofotoInfraroig2008:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2008",ortofotoInfraroig20062007:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2006-2007",ortofotoInfraroig19961997:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_1996-1997",ortofotoInfraroigSerieAnual:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_serie_anual"},VectorAdmin:{agrupacionsCensals2015:"https://tilemaps.icgc.cat/vector/fgb/agrupacions_censals_2015.fgb",agrupacionsCensals2016:"https://tilemaps.icgc.cat/vector/fgb/agrupacions_censals_2016.fgb",agrupacionsCensals2017:"https://tilemaps.icgc.cat/vector/fgb/agrupacions_censals_2017.fgb",agrupacionsCensals2018:"https://tilemaps.icgc.cat/vector/fgb/agrupacions_censals_2018.fgb",agrupacionsCensals2019:"https://tilemaps.icgc.cat/vector/fgb/agrupacions_censals_2019.fgb",agrupacionsCensals2020:"https://tilemaps.icgc.cat/vector/fgb/agrupacions_censals_2020.fgb",agrupacionsCensals2021:"https://tilemaps.icgc.cat/vector/fgb/agrupacions_censals_2021.fgb",agrupacionsCensalsVigent:"https://tilemaps.icgc.cat/vector/fgb/agrupacions_censals_vigent.fgb",agrupacionsCensalsVigentText:"https://tilemaps.icgc.cat/vector/fgb/agrupacions_censals_vigent_text.fgb",areesBasiquesPolicials2019:"https://tilemaps.icgc.cat/vector/fgb/arees_basiques_policials_2019.fgb",areesBasiquesPolicials2020:"https://tilemaps.icgc.cat/vector/fgb/arees_basiques_policials_2020.fgb",areesBasiquesPolicials2022:"https://tilemaps.icgc.cat/vector/fgb/arees_basiques_policials_2022.fgb",areesBasiquesPolicialsVigent:"https://tilemaps.icgc.cat/vector/fgb/arees_basiques_policials_vigent.fgb",areesBasiquesPolicialsVigentText:"https://tilemaps.icgc.cat/vector/fgb/arees_basiques_policials_vigent_text.fgb",areesBasiquesSalutVigent:"https://tilemaps.icgc.cat/vector/fgb/arees_basiques_salut_vigent.fgb",areesBasiquesServeisSocialsVigent:"https://tilemaps.icgc.cat/vector/fgb/arees_basiques_serveis_socials_vigent.fgb",areesBasiquesServeisSocialsVigentText:"https://tilemaps.icgc.cat/vector/fgb/arees_basiques_serveis_socials_vigent_text.fgb",areesGestioAssistencialVigent:"https://tilemaps.icgc.cat/vector/fgb/arees_gestio_assistencial_vigent.fgb",areesHidrogeologiquesAquifersVigent:"https://tilemaps.icgc.cat/vector/fgb/arees_hidrogeologiques_aquifers_vigent.fgb",catalunyaVigent:"https://tilemaps.icgc.cat/vector/fgb/catalunya_vigent.fgb",catalunyaVigentText:"https://tilemaps.icgc.cat/vector/fgb/catalunya_vigent_text.fgb",comarques2022:"https://tilemaps.icgc.cat/vector/fgb/comarques_2022.fgb",comarquesVigent:"https://tilemaps.icgc.cat/vector/fgb/comarques_vigent.fgb",comarquesVigentText:"https://tilemaps.icgc.cat/vector/fgb/comarques_vigent_text.fgb",districtesCensals2002:"https://tilemaps.icgc.cat/vector/fgb/districtes_censals_2002.fgb",districtesCensals2003:"https://tilemaps.icgc.cat/vector/fgb/districtes_censals_2003.fgb",districtesCensals2004:"https://tilemaps.icgc.cat/vector/fgb/districtes_censals_2004.fgb",districtesCensals2005:"https://tilemaps.icgc.cat/vector/fgb/districtes_censals_2005.fgb",districtesCensals2006:"https://tilemaps.icgc.cat/vector/fgb/districtes_censals_2006.fgb",districtesCensals2007:"https://tilemaps.icgc.cat/vector/fgb/districtes_censals_2007.fgb",districtesCensals2008:"https://tilemaps.icgc.cat/vector/fgb/districtes_censals_2008.fgb",districtesCensals2009:"https://tilemaps.icgc.cat/vector/fgb/districtes_censals_2009.fgb",districtesCensals2010:"https://tilemaps.icgc.cat/vector/fgb/districtes_censals_2010.fgb",districtesCensals2011:"https://tilemaps.icgc.cat/vector/fgb/districtes_censals_2011.fgb",districtesCensals2012:"https://tilemaps.icgc.cat/vector/fgb/districtes_censals_2012.fgb",districtesCensals2013:"https://tilemaps.icgc.cat/vector/fgb/districtes_censals_2013.fgb",districtesCensals2014:"https://tilemaps.icgc.cat/vector/fgb/districtes_censals_2014.fgb",districtesCensals2015:"https://tilemaps.icgc.cat/vector/fgb/districtes_censals_2015.fgb",districtesCensals2016:"https://tilemaps.icgc.cat/vector/fgb/districtes_censals_2016.fgb",districtesCensals2017:"https://tilemaps.icgc.cat/vector/fgb/districtes_censals_2017.fgb",districtesCensals2018:"https://tilemaps.icgc.cat/vector/fgb/districtes_censals_2018.fgb",districtesCensals2019:"https://tilemaps.icgc.cat/vector/fgb/districtes_censals_2019.fgb",districtesCensals2020:"https://tilemaps.icgc.cat/vector/fgb/districtes_censals_2020.fgb",districtesCensals2021:"https://tilemaps.icgc.cat/vector/fgb/districtes_censals_2021.fgb",districtesCensals2022:"https://tilemaps.icgc.cat/vector/fgb/districtes_censals_2022.fgb",districtesCensalsVigent:"https://tilemaps.icgc.cat/vector/fgb/districtes_censals_vigent.fgb",districtesCensalsVigentText:"https://tilemaps.icgc.cat/vector/fgb/districtes_censals_vigent_text.fgb",incendisForestalsVigent:"https://tilemaps.icgc.cat/vector/fgb/incendis_forestals_vigent.fgb",incendisForestalsVigentText:"https://tilemaps.icgc.cat/vector/fgb/incendis_forestals_vigent_text.fgb",municipis2022:"https://tilemaps.icgc.cat/vector/fgb/municipis_2022.fgb",municipis2022Text:"https://tilemaps.icgc.cat/vector/fgb/municipis_2022_text.fgb",municipisVigent:"https://tilemaps.icgc.cat/vector/fgb/municipis_vigent.fgb",municipisVigentText:"https://tilemaps.icgc.cat/vector/fgb/municipis_vigent_text.fgb",partitsJudicialsVigent:"https://tilemaps.icgc.cat/vector/fgb/partits_judicials_vigent.fgb",partitsJudicialsVigentText:"https://tilemaps.icgc.cat/vector/fgb/partits_judicials_vigent_text.fgb",plaTerritorial2015:"https://tilemaps.icgc.cat/vector/fgb/pla_territorial_2015.fgb",plaTerritorialVigent:"https://tilemaps.icgc.cat/vector/fgb/pla_territorial_vigent.fgb",plaTerritorialVigentText:"https://tilemaps.icgc.cat/vector/fgb/pla_territorial_vigent_text.fgb",provinciesVigent:"https://tilemaps.icgc.cat/vector/fgb/provincies_vigent.fgb",provinciesVigentText:"https://tilemaps.icgc.cat/vector/fgb/provincies_vigent_text.fgb",regionsPolicialsVigent:"https://tilemaps.icgc.cat/vector/fgb/regions_policials_vigent.fgb",regionsPolicialsVigentText:"https://tilemaps.icgc.cat/vector/fgb/regions_policials_vigent_text.fgb",regionsSanitariesVigent:"https://tilemaps.icgc.cat/vector/fgb/regions_sanitaries_vigent.fgb",regionsSanitariesVigentText:"https://tilemaps.icgc.cat/vector/fgb/regions_sanitaries_vigent_text.fgb",seccionsCensals2002:"https://tilemaps.icgc.cat/vector/fgb/seccions_censals_2002.fgb",seccionsCensals2003:"https://tilemaps.icgc.cat/vector/fgb/seccions_censals_2003.fgb",seccionsCensals2004:"https://tilemaps.icgc.cat/vector/fgb/seccions_censals_2004.fgb",seccionsCensals2005:"https://tilemaps.icgc.cat/vector/fgb/seccions_censals_2005.fgb",seccionsCensals2006:"https://tilemaps.icgc.cat/vector/fgb/seccions_censals_2006.fgb",seccionsCensals2007:"https://tilemaps.icgc.cat/vector/fgb/seccions_censals_2007.fgb",seccionsCensals2008:"https://tilemaps.icgc.cat/vector/fgb/seccions_censals_2008.fgb",seccionsCensals2009:"https://tilemaps.icgc.cat/vector/fgb/seccions_censals_2009.fgb",seccionsCensals2010:"https://tilemaps.icgc.cat/vector/fgb/seccions_censals_2010.fgb",seccionsCensals2011:"https://tilemaps.icgc.cat/vector/fgb/seccions_censals_2011.fgb",seccionsCensals2012:"https://tilemaps.icgc.cat/vector/fgb/seccions_censals_2012.fgb",seccionsCensals2013:"https://tilemaps.icgc.cat/vector/fgb/seccions_censals_2013.fgb",seccionsCensals2014:"https://tilemaps.icgc.cat/vector/fgb/seccions_censals_2014.fgb",seccionsCensals2015:"https://tilemaps.icgc.cat/vector/fgb/seccions_censals_2015.fgb",seccionsCensals2016:"https://tilemaps.icgc.cat/vector/fgb/seccions_censals_2016.fgb",seccionsCensals2017:"https://tilemaps.icgc.cat/vector/fgb/seccions_censals_2017.fgb",seccionsCensals2018:"https://tilemaps.icgc.cat/vector/fgb/seccions_censals_2018.fgb",seccionsCensals2019:"https://tilemaps.icgc.cat/vector/fgb/seccions_censals_2019.fgb",seccionsCensals2020:"https://tilemaps.icgc.cat/vector/fgb/seccions_censals_2020.fgb",seccionsCensals2021:"https://tilemaps.icgc.cat/vector/fgb/seccions_censals_2021.fgb",seccionsCensals2022:"https://tilemaps.icgc.cat/vector/fgb/seccions_censals_2022.fgb",seccionsCensalsVigent:"https://tilemaps.icgc.cat/vector/fgb/seccions_censals_vigent.fgb",seccionsCensalsVigentText:"https://tilemaps.icgc.cat/vector/fgb/seccions_censals_vigent_text.fgb",sectorsSanitarisVigent:"https://tilemaps.icgc.cat/vector/fgb/sectors_sanitaris_vigent.fgb",vegueriesVigent:"https://tilemaps.icgc.cat/vector/fgb/vegueries_vigent.fgb",vegueriesVigentText:"https://tilemaps.icgc.cat/vector/fgb/vegueries_vigent_text.fgb"},WMS:{relleu:"https://tilemaps.icgc.cat/mapfactory/wmts/relleu/CAT3857/{z}/{x}/{y}.png",geologia:"https://tilemaps.icgc.cat/mapfactory/wmts/geologia/MON3857NW/{z}/{x}/{y}.png",administratiu:"http://geoserveis.icgc.cat/servei/catalunya/mapa-base/wmts/administratiu/MON3857NW/{z}/{x}/{y}.png",simplificat:"http://geoserveis.icgc.cat/servei/catalunya/mapa-base/wmts/simplificat/MON3857NW/{z}/{x}/{y}.png",cims:"https://geoserveis.icgc.cat/icc_100cims/wms/service?REQUEST=GetMap&SERVICE=WMS&VERSION=1.1.1&LAYERS=0&STYLES=&FORMAT=image/png&BGCOLOR=0xFFFFFF&TRANSPARENT=TRUE&SRS=EPSG:25831&BBOX=137118.923076923,4488408.75,650959.076923077,4749634.75&WIDTH=895&HEIGHT=455",cobertesSol:"http://geoserveis.icgc.cat/servei/catalunya/cobertes-sol/wms?REQUEST=GetMap&SERVICE=WMS&VERSION=1.3.0&LAYERS=cobertes_2009&STYLES=&FORMAT=image/png&BGCOLOR=0xFFFFFF&TRANSPARENT=TRUE&CRS=EPSG:25831&BBOX=374110.828167253,4639230.79853085,452621.120632226,4703578.45000215&WIDTH=1020&HEIGHT=836"},Vector:{altimetria:"https://betaserver.icgc.cat/tileserver3/tileserver.php/alti_bt5m/{z}/{x}/{y}.pbf",toponimia:"https://betaserver.icgc.cat/tileserver3/tileserver.php/redtopo/{z}/{x}/{y}.pbf"}},Wi={mapOptions:{container:"map",center:{0:1.537786,1:41.837539},zoom:7.5,bearing:0,pitch:0,hash:!1,style:"https://geoserveis.icgc.cat/contextmaps/icgc_mapa_base_gris.json.json",maxZoom:18,maxPitch:85},map3dOptions:{spaceErrorFactor:2,zfactor:25,minZoomRange:15.5,maxZoomRange:22,urlTilesetCities:"http://imtilemapsdev.icgc.local/terrenys/Ciutats/tilesetV1.0.json",layerIdOrder:"place-isolated",layerId3d:"edificisMapboxLayer",terrainSource:"ICGC5M",style3dName:"orto3d"},baseStyles:{0:{key:"TOPO",url:"https://geoserveis.icgc.cat/contextmaps/icgc_mapa_estandard_general.json",image:"https://visors.icgc.cat/contextmaps/imatges_estil/icgc_mapa_estandard.png"},1:{key:"ORTO",url:"https://geoserveis.icgc.cat/contextmaps/icgc_orto_estandard.json",image:"https://visors.icgc.cat/contextmaps/imatges_estil/icgc_orto_hibrida.png"},2:{key:"ORTO3D",url:"https://tilemaps.icgc.cat/cdn/styles/icgc_orto_3d.json",image:"https://visors.icgc.cat/contextmaps/imatges_estil/icgc_orto_hibrida.png"},3:{key:"ADMIN",url:"https://geoserveis.icgc.cat/contextmaps/icgc_delimitacio_limits_administratius.json",image:"https://visors.icgc.cat/contextmaps/imatges_estil/icgc_delimitacio_limits_administratius.png"},4:{key:"DARK",url:"https://geoserveis.icgc.cat/contextmaps/icgc_mapa_base_fosc.json",image:"https://visors.icgc.cat/contextmaps/imatges_estil/icgc_mapa_base_fosc.png"},5:{key:"LIGHT",url:"https://geoserveis.icgc.cat/contextmaps/icgc_mapa_base_gris.json",image:"https://visors.icgc.cat/contextmaps/imatges_estil/icgc_mapa_base_gris.png"},6:{key:"GEOLOGY",url:"https://geoserveis.icgc.cat/contextmaps/icgc_geologic_informacio.json",image:"https://visors.icgc.cat/contextmaps/imatges_estil/icgc_geologic_informacio.png"}},urlTerrainICGC:{0:{name:"ICGC5M",url:"https://tilemaps.icgc.cat/tileserver/tileserver/terreny-5m-30m-rgb-extent/{z}/{x}/{y}.png"},1:{name:"WORLD30M",url:"https://s3.amazonaws.com/elevation-tiles-prod/terrarium/{z}/{x}/{y}.png",encoding:"terrarium"}},ortoLayersICGC:{0:{name:"ortofotoColorProvisional",key:"ortofoto_color_provisional",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_provisional"},1:{name:"ortofotoColor2022",key:"ortofoto_color_2022",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2022"},2:{name:"ortofotoColor2021",key:"ortofoto_color_2021",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2021"},3:{name:"ortofotoColor2020",key:"ortofoto_color_2020",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2020"},4:{name:"ortofotoColor2019",key:"ortofoto_color_2019",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2019"},5:{name:"ortofotoColor2018",key:"ortofoto_color_2018",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2018"},6:{name:"ortofotoColor2017",key:"ortofoto_color_2017",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2017"},7:{name:"ortofotoColor2016",key:"ortofoto_color_2016",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2016"},8:{name:"ortofotoColor2015",key:"ortofoto_color_2015",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2015"},9:{name:"ortofotoColor2014",key:"ortofoto_color_2014",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2014"},10:{name:"ortofotoColor2013",key:"ortofoto_color_2013",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2013"},11:{name:"ortofotoColor2012",key:"ortofoto_color_2012",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2012"},12:{name:"ortofotoColor2011",key:"ortofoto_color_2011",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2011"},13:{name:"ortofotoColor2010",key:"ortofoto_color_2010",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2010"},14:{name:"ortofotoColor2009",key:"ortofoto_color_2009",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2009"},15:{name:"ortofotoColor2008",key:"ortofoto_color_2008",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2008"},16:{name:"ortofotoColor20062007",key:"ortofoto_color_2006-2007",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2006-2007"},17:{name:"ortofotoColor20042005",key:"ortofoto_color_2004-2005",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2004-2005"},18:{name:"ortofotoColor20002003",key:"ortofoto_color_2000-2003",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_2000-2003"},19:{name:"ortofotoBlancINegre1998",key:"ortofoto_blanc_i_negre_1998",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_blanc_i_negre_1998"},20:{name:"ortofotoBlancINegre19941997",key:"ortofoto_blanc_i_negre_1994-1997",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_blanc_i_negre_1994-1997"},21:{name:"ortofotoColor1993",key:"ortofoto_color_1993",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_1993"},22:{name:"ortofotoBlancINegre19831992",key:"ortofoto_blanc_i_negre_1983-1992",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_blanc_i_negre_1983-1992"},23:{name:"ortofotoBlancINegre19701977",key:"ortofoto_blanc_i_negre_1970-1977",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_blanc_i_negre_1970-1977"},24:{name:"ortofotoBlancINegre1956",key:"ortofoto_blanc_i_negre_1956",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_blanc_i_negre_1956"},25:{name:"ortofotoBlancINegre1945",key:"ortofoto_blanc_i_negre_1945",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_blanc_i_negre_1945"},26:{name:"ortofotoColorSerieAnual",key:"ortofoto_color_serie_anual",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_color_serie_anual"},27:{name:"ortofotoInfraroigProvisional",key:"ortofoto_infraroig_provisional",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_provisional"},28:{name:"ortofotoInfraroig2022",key:"ortofoto_infraroig_2022",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2022"},29:{name:"ortofotoInfraroig2021",key:"ortofoto_infraroig_2021",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2021"},30:{name:"ortofotoInfraroig2020",key:"ortofoto_infraroig_2020",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2020"},31:{name:"ortofotoInfraroig2019",key:"ortofoto_infraroig_2019",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2019"},32:{name:"ortofotoInfraroig2018",key:"ortofoto_infraroig_2018",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2018"},33:{name:"ortofotoInfraroig2017",key:"ortofoto_infraroig_2017",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2017"},34:{name:"ortofotoInfraroig2016",key:"ortofoto_infraroig_2016",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2016"},35:{name:"ortofotoInfraroig2015",key:"ortofoto_infraroig_2015",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2015"},36:{name:"ortofotoInfraroig2014",key:"ortofoto_infraroig_2014",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2014"},37:{name:"ortofotoInfraroig2013",key:"ortofoto_infraroig_2013",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2013"},38:{name:"ortofotoInfraroig2012",key:"ortofoto_infraroig_2012",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2012"},39:{name:"ortofotoInfraroig2011",key:"ortofoto_infraroig_2011",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2011"},40:{name:"ortofotoInfraroig2010",key:"ortofoto_infraroig_2010",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2010"},41:{name:"ortofotoInfraroig2009",key:"ortofoto_infraroig_2009",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2009"},42:{name:"ortofotoInfraroig2008",key:"ortofoto_infraroig_2008",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2008"},43:{name:"ortofotoInfraroig20062007",key:"ortofoto_infraroig_2006-2007",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_2006-2007"},44:{name:"ortofotoInfraroig19961997",key:"ortofoto_infraroig_1996-1997",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_1996-1997"},45:{name:"ortofotoInfraroigSerieAnual",key:"ortofoto_infraroig_serie_anual",url:"https://geoserveis.icgc.cat/servei/catalunya/orto-territorial/wms?&bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&STYLES=&srs=EPSG:3857&transparent=true&width=256&height=256&layers=ortofoto_infraroig_serie_anual"}},vectorLayersICGC:{0:{name:"agrupacionsCensals2015",key:"agrupacions_censals_2015",url:"https://tilemaps.icgc.cat/vector/fgb/agrupacions_censals_2015.fgb"},1:{name:"agrupacionsCensals2016",key:"agrupacions_censals_2016",url:"https://tilemaps.icgc.cat/vector/fgb/agrupacions_censals_2016.fgb"},2:{name:"agrupacionsCensals2017",key:"agrupacions_censals_2017",url:"https://tilemaps.icgc.cat/vector/fgb/agrupacions_censals_2017.fgb"},3:{name:"agrupacionsCensals2018",key:"agrupacions_censals_2018",url:"https://tilemaps.icgc.cat/vector/fgb/agrupacions_censals_2018.fgb"},4:{name:"agrupacionsCensals2019",key:"agrupacions_censals_2019",url:"https://tilemaps.icgc.cat/vector/fgb/agrupacions_censals_2019.fgb"},5:{name:"agrupacionsCensals2020",key:"agrupacions_censals_2020",url:"https://tilemaps.icgc.cat/vector/fgb/agrupacions_censals_2020.fgb"},6:{name:"agrupacionsCensals2021",key:"agrupacions_censals_2021",url:"https://tilemaps.icgc.cat/vector/fgb/agrupacions_censals_2021.fgb"},7:{name:"agrupacionsCensalsVigent",key:"agrupacions_censals_vigent",url:"https://tilemaps.icgc.cat/vector/fgb/agrupacions_censals_vigent.fgb"},8:{name:"agrupacionsCensalsVigentText",key:"agrupacions_censals_vigent_text",url:"https://tilemaps.icgc.cat/vector/fgb/agrupacions_censals_vigent_text.fgb"},9:{name:"areesBasiquesPolicials2019",key:"arees_basiques_policials_2019",url:"https://tilemaps.icgc.cat/vector/fgb/arees_basiques_policials_2019.fgb"},10:{name:"areesBasiquesPolicials2020",key:"arees_basiques_policials_2020",url:"https://tilemaps.icgc.cat/vector/fgb/arees_basiques_policials_2020.fgb"},11:{name:"areesBasiquesPolicials2022",key:"arees_basiques_policials_2022",url:"https://tilemaps.icgc.cat/vector/fgb/arees_basiques_policials_2022.fgb"},12:{name:"areesBasiquesPolicialsVigent",key:"arees_basiques_policials_vigent",url:"https://tilemaps.icgc.cat/vector/fgb/arees_basiques_policials_vigent.fgb"},13:{name:"areesBasiquesPolicialsVigentText",key:"arees_basiques_policials_vigent_text",url:"https://tilemaps.icgc.cat/vector/fgb/arees_basiques_policials_vigent_text.fgb"},14:{name:"areesBasiquesSalutVigent",key:"arees_basiques_salut_vigent",url:"https://tilemaps.icgc.cat/vector/fgb/arees_basiques_salut_vigent.fgb"},15:{name:"areesBasiquesServeisSocialsVigent",key:"arees_basiques_serveis_socials_vigent",url:"https://tilemaps.icgc.cat/vector/fgb/arees_basiques_serveis_socials_vigent.fgb"},16:{name:"areesBasiquesServeisSocialsVigentText",key:"arees_basiques_serveis_socials_vigent_text",url:"https://tilemaps.icgc.cat/vector/fgb/arees_basiques_serveis_socials_vigent_text.fgb"},17:{name:"areesGestioAssistencialVigent",key:"arees_gestio_assistencial_vigent",url:"https://tilemaps.icgc.cat/vector/fgb/arees_gestio_assistencial_vigent.fgb"},18:{name:"areesHidrogeologiquesAquifersVigent",key:"arees_hidrogeologiques_aquifers_vigent",url:"https://tilemaps.icgc.cat/vector/fgb/arees_hidrogeologiques_aquifers_vigent.fgb"},19:{name:"catalunyaVigent",key:"catalunya_vigent",url:"https://tilemaps.icgc.cat/vector/fgb/catalunya_vigent.fgb"},20:{name:"catalunyaVigentText",key:"catalunya_vigent_text",url:"https://tilemaps.icgc.cat/vector/fgb/catalunya_vigent_text.fgb"},21:{name:"comarques2022",key:"comarques_2022",url:"https://tilemaps.icgc.cat/vector/fgb/comarques_2022.fgb"},22:{name:"comarquesVigent",key:"comarques_vigent",url:"https://tilemaps.icgc.cat/vector/fgb/comarques_vigent.fgb"},23:{name:"comarquesVigentText",key:"comarques_vigent_text",url:"https://tilemaps.icgc.cat/vector/fgb/comarques_vigent_text.fgb"},24:{name:"districtesCensals2002",key:"districtes_censals_2002",url:"https://tilemaps.icgc.cat/vector/fgb/districtes_censals_2002.fgb"},25:{name:"districtesCensals2003",key:"districtes_censals_2003",url:"https://tilemaps.icgc.cat/vector/fgb/districtes_censals_2003.fgb"},26:{name:"districtesCensals2004",key:"districtes_censals_2004",url:"https://tilemaps.icgc.cat/vector/fgb/districtes_censals_2004.fgb"},27:{name:"districtesCensals2005",key:"districtes_censals_2005",url:"https://tilemaps.icgc.cat/vector/fgb/districtes_censals_2005.fgb"},28:{name:"districtesCensals2006",key:"districtes_censals_2006",url:"https://tilemaps.icgc.cat/vector/fgb/districtes_censals_2006.fgb"},29:{name:"districtesCensals2007",key:"districtes_censals_2007",url:"https://tilemaps.icgc.cat/vector/fgb/districtes_censals_2007.fgb"},30:{name:"districtesCensals2008",key:"districtes_censals_2008",url:"https://tilemaps.icgc.cat/vector/fgb/districtes_censals_2008.fgb"},31:{name:"districtesCensals2009",key:"districtes_censals_2009",url:"https://tilemaps.icgc.cat/vector/fgb/districtes_censals_2009.fgb"},32:{name:"districtesCensals2010",key:"districtes_censals_2010",url:"https://tilemaps.icgc.cat/vector/fgb/districtes_censals_2010.fgb"},33:{name:"districtesCensals2011",key:"districtes_censals_2011",url:"https://tilemaps.icgc.cat/vector/fgb/districtes_censals_2011.fgb"},34:{name:"districtesCensals2012",key:"districtes_censals_2012",url:"https://tilemaps.icgc.cat/vector/fgb/districtes_censals_2012.fgb"},35:{name:"districtesCensals2013",key:"districtes_censals_2013",url:"https://tilemaps.icgc.cat/vector/fgb/districtes_censals_2013.fgb"},36:{name:"districtesCensals2014",key:"districtes_censals_2014",url:"https://tilemaps.icgc.cat/vector/fgb/districtes_censals_2014.fgb"},37:{name:"districtesCensals2015",key:"districtes_censals_2015",url:"https://tilemaps.icgc.cat/vector/fgb/districtes_censals_2015.fgb"},38:{name:"districtesCensals2016",key:"districtes_censals_2016",url:"https://tilemaps.icgc.cat/vector/fgb/districtes_censals_2016.fgb"},39:{name:"districtesCensals2017",key:"districtes_censals_2017",url:"https://tilemaps.icgc.cat/vector/fgb/districtes_censals_2017.fgb"},40:{name:"districtesCensals2018",key:"districtes_censals_2018",url:"https://tilemaps.icgc.cat/vector/fgb/districtes_censals_2018.fgb"},41:{name:"districtesCensals2019",key:"districtes_censals_2019",url:"https://tilemaps.icgc.cat/vector/fgb/districtes_censals_2019.fgb"},42:{name:"districtesCensals2020",key:"districtes_censals_2020",url:"https://tilemaps.icgc.cat/vector/fgb/districtes_censals_2020.fgb"},43:{name:"districtesCensals2021",key:"districtes_censals_2021",url:"https://tilemaps.icgc.cat/vector/fgb/districtes_censals_2021.fgb"},44:{name:"districtesCensals2022",key:"districtes_censals_2022",url:"https://tilemaps.icgc.cat/vector/fgb/districtes_censals_2022.fgb"},45:{name:"districtesCensalsVigent",key:"districtes_censals_vigent",url:"https://tilemaps.icgc.cat/vector/fgb/districtes_censals_vigent.fgb"},46:{name:"districtesCensalsVigentText",key:"districtes_censals_vigent_text",url:"https://tilemaps.icgc.cat/vector/fgb/districtes_censals_vigent_text.fgb"},47:{name:"incendisForestalsVigent",key:"incendis_forestals_vigent",url:"https://tilemaps.icgc.cat/vector/fgb/incendis_forestals_vigent.fgb"},48:{name:"incendisForestalsVigentText",key:"incendis_forestals_vigent_text",url:"https://tilemaps.icgc.cat/vector/fgb/incendis_forestals_vigent_text.fgb"},49:{name:"municipis2022",key:"municipis_2022",url:"https://tilemaps.icgc.cat/vector/fgb/municipis_2022.fgb"},50:{name:"municipis2022Text",key:"municipis_2022_text",url:"https://tilemaps.icgc.cat/vector/fgb/municipis_2022_text.fgb"},51:{name:"municipisVigent",key:"municipis_vigent",url:"https://tilemaps.icgc.cat/vector/fgb/municipis_vigent.fgb"},52:{name:"municipisVigentText",key:"municipis_vigent_text",url:"https://tilemaps.icgc.cat/vector/fgb/municipis_vigent_text.fgb"},53:{name:"partitsJudicialsVigent",key:"partits_judicials_vigent",url:"https://tilemaps.icgc.cat/vector/fgb/partits_judicials_vigent.fgb"},54:{name:"partitsJudicialsVigentText",key:"partits_judicials_vigent_text",url:"https://tilemaps.icgc.cat/vector/fgb/partits_judicials_vigent_text.fgb"},55:{name:"plaTerritorial2015",key:"pla_territorial_2015",url:"https://tilemaps.icgc.cat/vector/fgb/pla_territorial_2015.fgb"},56:{name:"plaTerritorialVigent",key:"pla_territorial_vigent",url:"https://tilemaps.icgc.cat/vector/fgb/pla_territorial_vigent.fgb"},57:{name:"plaTerritorialVigentText",key:"pla_territorial_vigent_text",url:"https://tilemaps.icgc.cat/vector/fgb/pla_territorial_vigent_text.fgb"},58:{name:"provinciesVigent",key:"provincies_vigent",url:"https://tilemaps.icgc.cat/vector/fgb/provincies_vigent.fgb"},59:{name:"provinciesVigentText",key:"provincies_vigent_text",url:"https://tilemaps.icgc.cat/vector/fgb/provincies_vigent_text.fgb"},60:{name:"regionsPolicialsVigent",key:"regions_policials_vigent",url:"https://tilemaps.icgc.cat/vector/fgb/regions_policials_vigent.fgb"},61:{name:"regionsPolicialsVigentText",key:"regions_policials_vigent_text",url:"https://tilemaps.icgc.cat/vector/fgb/regions_policials_vigent_text.fgb"},62:{name:"regionsSanitariesVigent",key:"regions_sanitaries_vigent",url:"https://tilemaps.icgc.cat/vector/fgb/regions_sanitaries_vigent.fgb"},63:{name:"regionsSanitariesVigentText",key:"regions_sanitaries_vigent_text",url:"https://tilemaps.icgc.cat/vector/fgb/regions_sanitaries_vigent_text.fgb"},64:{name:"seccionsCensals2002",key:"seccions_censals_2002",url:"https://tilemaps.icgc.cat/vector/fgb/seccions_censals_2002.fgb"},65:{name:"seccionsCensals2003",key:"seccions_censals_2003",url:"https://tilemaps.icgc.cat/vector/fgb/seccions_censals_2003.fgb"},66:{name:"seccionsCensals2004",key:"seccions_censals_2004",url:"https://tilemaps.icgc.cat/vector/fgb/seccions_censals_2004.fgb"},67:{name:"seccionsCensals2005",key:"seccions_censals_2005",url:"https://tilemaps.icgc.cat/vector/fgb/seccions_censals_2005.fgb"},68:{name:"seccionsCensals2006",key:"seccions_censals_2006",url:"https://tilemaps.icgc.cat/vector/fgb/seccions_censals_2006.fgb"},69:{name:"seccionsCensals2007",key:"seccions_censals_2007",url:"https://tilemaps.icgc.cat/vector/fgb/seccions_censals_2007.fgb"},70:{name:"seccionsCensals2008",key:"seccions_censals_2008",url:"https://tilemaps.icgc.cat/vector/fgb/seccions_censals_2008.fgb"},71:{name:"seccionsCensals2009",key:"seccions_censals_2009",url:"https://tilemaps.icgc.cat/vector/fgb/seccions_censals_2009.fgb"},72:{name:"seccionsCensals2010",key:"seccions_censals_2010",url:"https://tilemaps.icgc.cat/vector/fgb/seccions_censals_2010.fgb"},73:{name:"seccionsCensals2011",key:"seccions_censals_2011",url:"https://tilemaps.icgc.cat/vector/fgb/seccions_censals_2011.fgb"},74:{name:"seccionsCensals2012",key:"seccions_censals_2012",url:"https://tilemaps.icgc.cat/vector/fgb/seccions_censals_2012.fgb"},75:{name:"seccionsCensals2013",key:"seccions_censals_2013",url:"https://tilemaps.icgc.cat/vector/fgb/seccions_censals_2013.fgb"},76:{name:"seccionsCensals2014",key:"seccions_censals_2014",url:"https://tilemaps.icgc.cat/vector/fgb/seccions_censals_2014.fgb"},77:{name:"seccionsCensals2015",key:"seccions_censals_2015",url:"https://tilemaps.icgc.cat/vector/fgb/seccions_censals_2015.fgb"},78:{name:"seccionsCensals2016",key:"seccions_censals_2016",url:"https://tilemaps.icgc.cat/vector/fgb/seccions_censals_2016.fgb"},79:{name:"seccionsCensals2017",key:"seccions_censals_2017",url:"https://tilemaps.icgc.cat/vector/fgb/seccions_censals_2017.fgb"},80:{name:"seccionsCensals2018",key:"seccions_censals_2018",url:"https://tilemaps.icgc.cat/vector/fgb/seccions_censals_2018.fgb"},81:{name:"seccionsCensals2019",key:"seccions_censals_2019",url:"https://tilemaps.icgc.cat/vector/fgb/seccions_censals_2019.fgb"},82:{name:"seccionsCensals2020",key:"seccions_censals_2020",url:"https://tilemaps.icgc.cat/vector/fgb/seccions_censals_2020.fgb"},83:{name:"seccionsCensals2021",key:"seccions_censals_2021",url:"https://tilemaps.icgc.cat/vector/fgb/seccions_censals_2021.fgb"},84:{name:"seccionsCensals2022",key:"seccions_censals_2022",url:"https://tilemaps.icgc.cat/vector/fgb/seccions_censals_2022.fgb"},85:{name:"seccionsCensalsVigent",key:"seccions_censals_vigent",url:"https://tilemaps.icgc.cat/vector/fgb/seccions_censals_vigent.fgb"},86:{name:"seccionsCensalsVigentText",key:"seccions_censals_vigent_text",url:"https://tilemaps.icgc.cat/vector/fgb/seccions_censals_vigent_text.fgb"},87:{name:"sectorsSanitarisVigent",key:"sectors_sanitaris_vigent",url:"https://tilemaps.icgc.cat/vector/fgb/sectors_sanitaris_vigent.fgb"},88:{name:"vegueriesVigent",key:"vegueries_vigent",url:"https://tilemaps.icgc.cat/vector/fgb/vegueries_vigent.fgb"},89:{name:"vegueriesVigentText",key:"vegueries_vigent_text",url:"https://tilemaps.icgc.cat/vector/fgb/vegueries_vigent_text.fgb"}},vectorLayers:{0:{key:"altimetria",layer:"",url:"https://betaserver.icgc.cat/tileserver3/tileserver.php/alti_bt5m/{z}/{x}/{y}.pbf"},1:{key:"toponimia",layer:"",url:"https://betaserver.icgc.cat/tileserver3/tileserver.php/redtopo/{z}/{x}/{y}.pbf"}},wmsLayers:{0:{key:"relleu",layer:"",url:"https://tilemaps.icgc.cat/mapfactory/wmts/relleu/CAT3857/{z}/{x}/{y}.png"},1:{key:"geologia",layer:"",url:"https://tilemaps.icgc.cat/mapfactory/wmts/geologia/MON3857NW/{z}/{x}/{y}.png"},2:{key:"administratiu",layer:"",url:"http://geoserveis.icgc.cat/servei/catalunya/mapa-base/wmts/administratiu/MON3857NW/{z}/{x}/{y}.png"},3:{key:"simplificat",layer:"",url:"http://geoserveis.icgc.cat/servei/catalunya/mapa-base/wmts/simplificat/MON3857NW/{z}/{x}/{y}.png"},4:{key:"cims",layer:"",url:"https://geoserveis.icgc.cat/icc_100cims/wms/service?REQUEST=GetMap&SERVICE=WMS&VERSION=1.1.1&LAYERS=0&STYLES=&FORMAT=image/png&BGCOLOR=0xFFFFFF&TRANSPARENT=TRUE&SRS=EPSG:25831&BBOX=137118.923076923,4488408.75,650959.076923077,4749634.75&WIDTH=895&HEIGHT=455"},5:{key:"cobertesSol",layer:"",url:"http://geoserveis.icgc.cat/servei/catalunya/cobertes-sol/wms?REQUEST=GetMap&SERVICE=WMS&VERSION=1.3.0&LAYERS=cobertes_2009&STYLES=&FORMAT=image/png&BGCOLOR=0xFFFFFF&TRANSPARENT=TRUE&CRS=EPSG:25831&BBOX=374110.828167253,4639230.79853085,452621.120632226,4703578.45000215&WIDTH=1020&HEIGHT=836"}}};let trt=class{constructor(t){if(!t)t=Wi.mapOptions;else for(const e in Wi.mapOptions){let n=[Wi.mapOptions.center[0],Wi.mapOptions.center[1]];Wi.mapOptions.center=n,t.hasOwnProperty(e)||(t[e]=Wi.mapOptions[e])}t.maxPitch=85,t.maplibreLogo=!1,t.attributionControl=!1,this.map=new No.Map(t),this.map.options=t,this.map.addControl(new No.AttributionControl({compact:!0})),this.map.on("load",()=>{if(window.document.querySelector(".maplibregl-compact-show")){var e=window.document.querySelector(".maplibregl-compact-show");e.classList.remove("maplibregl-compact-show")}this._dealOrto3dStyle(this.map.getStyle().name)})}_dealOrto3dStyle(t){try{if(t=="orto3d"){const e=new a5({intensity:4}),n=new Zv({ambientLight:e});this.map.setTerrain({source:Wi.map3dOptions.terrainSource,exaggeration:1});const i=this._createCitiesMapboxLayer();this.map.getLayer(Wi.map3dOptions.layerId3d)||(this.map.addLayer(i,Wi.map3dOptions.layerIdOrder),this.map.setLayerZoomRange(Wi.map3dOptions.layerId3d,Wi.map3dOptions.minZoomRange,Wi.map3dOptions.maxZoomRange),i.deck.setProps({effects:[n]}))}else this.map.getLayer(Wi.map3dOptions.layerId3d)&&(this.map.removeLayer(Wi.map3dOptions.layerId3d),this.map.setTerrain(null))}catch(e){return console.error(`Error dealing orto 3D: ${e.message}`),null}}_createCitiesMapboxLayer(){try{return new qK({id:Wi.map3dOptions.layerId3d,type:xw,data:Wi.map3dOptions.urlTilesetCities,loader:ww,loadOptions:{tileset:{viewDistanceScale:1,updateTransforms:!1,maximumScreenSpaceError:Wi.map3dOptions.spaceErrorFactor}},onTilesetLoad:e=>{e.options.maximumScreenSpaceError=Wi.map3dOptions.spaceErrorFactor},onTileLoad:e=>{e.content.cartographicOrigin.z-=Wi.map3dOptions.zfactor},operation:"terrain+draw"})}catch(t){return console.error(`Error adding MapboxLayer: ${t.message}`),null}}addGeocoderICGC(t){try{t===void 0&&(t="top-right");const e="https://eines.icgc.cat/geocodificador/autocompletar?text=";let n={collapsed:!0,marker:!0,popup:!0,showResultMarkers:!0,maplibregl:No,showResultsWhileTyping:!0,minLength:2};const i={forwardGeocode:async a=>{const o=[];try{const h=`https://nominatim.openstreetmap.org/search?q=${a.query}&format=geojson&polygon_geojson=1&addressdetails=1`,f=e+encodeURIComponent(a.query)+"&layers=topo1%2Ctopo2%2Caddress&size=5",b=await(await fetch(f)).json();for(const C of b.features){const B=C.geometry.coordinates,R={type:"Feature",geometry:{type:"Point",coordinates:B},place_name:C.properties.label,properties:C.properties,text:C.properties.label,place_type:["place"],center:B};o.push(R)}}catch(h){console.error(`Failed to forwardGeocode with error: ${h}`)}return{features:o}}};this.map.addControl(new Zet(i,n),t);let s=document.getElementsByClassName("maplibregl-ctrl-geocoder--input");s[0].attributes[2].nodeValue="Cerca...",s[0].addEventListener("input",function(a){a.target.value.length>3})}catch(e){console.error(`Error adding ICGC geocoder: ${e.message}`)}}getStyle(){try{return this.map.getStyle()}catch(t){console.error(`Error getting style: ${t.message}`)}}getConfigStyles(){try{let t=[];for(const e of uf)t.push(e.name);return t}catch(t){console.error(`Error retrieving base styles: ${t.message}`)}}getConfigWMSLayers(){try{let t=[];for(const e in vo.WMS)vo.WMS.hasOwnProperty(e)&&t.push(e);return t}catch(t){console.error(`Error retrieving WMS layers: ${t.message}`)}}getConfigOrtoLayers(){try{let t=[];for(const e in vo.Orto)vo.Orto.hasOwnProperty(e)&&t.push(e);return t}catch(t){console.error(`Error retrieving orto image layers: ${t.message}`)}}getConfigVectorLayers(){try{let t=[];for(const e in vo.Vector)vo.Vector.hasOwnProperty(e)&&t.push(e);return t}catch(t){console.error(`Error retrieving vector layers: ${t.message}`)}}getConfigVectorAdminLayers(){try{let t=[];for(const e in vo.VectorAdmin)vo.VectorAdmin.hasOwnProperty(e)&&t.push(e);return t}catch(t){console.error(`Error retrieving vectorAdmin layers: ${t.message}`)}}async fetchData(t,e,n){try{const s=await(await fetch(t)).json();let a=s.features[0].geometry.type;a.includes("ine")&&(n!==void 0?map.addLayer({id:e,type:"line",source:{type:"geojson",data:s},layout:{visibility:"visible"},paint:n}):map.addLayer({id:e,type:"line",source:{type:"geojson",data:s},layout:{visibility:"visible"},paint:{"line-color":"black","line-width":2,"line-opacity":1}})),a.includes("olygon")&&(n!==void 0?map.addLayer({id:e,type:"fill",source:{type:"geojson",data:s},layout:{visibility:"visible"},paint:n}):map.addLayer({id:e,type:"fill",source:{type:"geojson",data:s},layout:{visibility:"visible"},paint:{"fill-color":"blue","fill-opacity":.6}})),a.includes("oint")&&(n!==void 0?map.addLayer({id:e,type:"circle",source:{type:"geojson",data:s},layout:{visibility:"visible"},paint:n}):map.addLayer({id:e,type:"circle",source:{type:"geojson",data:s},layout:{visibility:"visible"},paint:{"circle-color":"red","circle-opacity":.85}}))}catch(i){console.error(`Error fetching data: ${i.message}`)}}async fetchDataAndMenu(t,e,n,i){try{const a=await(await fetch(t)).json(),o=document.getElementById("menu-group");if(n!=="all"){const f=document.createElement("div");f.id="titleDivMenu",f.textContent=e,o.appendChild(f);const g=document.createElement("div");g.id="titleDivMenuSub",g.textContent=`📂 ${n}`,o.appendChild(g)}let h=a.features[0].geometry.type;if(n==="all")h.includes("ine")&&(i!==void 0?map.addLayer({id:e,type:"line",source:{type:"geojson",data:a},layout:{visibility:"visible"},paint:i}):map.addLayer({id:e,type:"line",source:{type:"geojson",data:a},layout:{visibility:"visible"},paint:{"line-color":"black","line-width":2,"line-opacity":1}})),h.includes("olygon")&&(i!==void 0?map.addLayer({id:e,type:"fill",source:{type:"geojson",data:a},layout:{visibility:"visible"},paint:i}):map.addLayer({id:e,type:"fill",source:{type:"geojson",data:a},layout:{visibility:"visible"},paint:{"fill-color":"blue","fill-opacity":.6}})),h.includes("oint")&&(i!==void 0?map.addLayer({id:e,type:"circle",source:{type:"geojson",data:a},layout:{visibility:"visible"},paint:i}):map.addLayer({id:e,type:"circle",source:{type:"geojson",data:a},layout:{visibility:"visible"},paint:{"circle-color":"red","circle-opacity":.85}})),map.addMenuItem(e),map.addFeatureQuery(e);else{let f=n;const g={};a.features.forEach(b=>{const C=b.properties[f];g[C]||(h.includes("ine")&&(i!==void 0?map.addLayer({id:C,type:"line",source:{type:"geojson",data:a},layout:{visibility:"visible"},filter:["==",`${f}`,C],paint:i}):map.addLayer({id:C,type:"line",source:{type:"geojson",data:a},layout:{visibility:"visible"},filter:["==",`${f}`,C],paint:{"line-color":"black","line-width":2,"line-opacity":1}})),h.includes("olygon")&&(i!==void 0?map.addLayer({id:C,type:"fill",source:{type:"geojson",data:a},layout:{visibility:"visible"},filter:["==",`${f}`,C],paint:i}):map.addLayer({id:C,type:"fill",source:{type:"geojson",data:a},layout:{visibility:"visible"},filter:["==",`${f}`,C],paint:{"fill-color":"blue","fill-opacity":.6}})),h.includes("oint")&&(i!==void 0?map.addLayer({id:C,type:"circle",source:{type:"geojson",data:a},layout:{visibility:"visible"},filter:["==",`${f}`,C],paint:i}):map.addLayer({id:C,type:"circle",source:{type:"geojson",data:a},layout:{visibility:"visible"},filter:["==",`${f}`,C],paint:{"circle-color":"red","circle-opacity":.85}})),g[C]=!0,map.addMenuItem(C))})}}catch(s){console.error(`Error fetching data: ${s.message}`)}}on(t,e){try{this.map.on(t,e)}catch(n){console.error(`Error adding event listener: ${n.message}`)}}getSource(t){try{return this.map.getSource(t)}catch(e){console.error(`Error getting source: ${e.message}`)}}addSource(t,e){try{this.map.addSource(t,e)}catch(n){console.error(`Error adding source: ${n.message}`)}}setStyle(t,e){try{console.log("kk",t),console.log("base",t),e!==void 0?this.map.setStyle(t,e):this.map.setStyle(t),this.map.on("styledata",()=>{if(window.document.querySelector(".maplibregl-compact-show")){var n=window.document.querySelector(".maplibregl-compact-show");n.classList.remove("maplibregl-compact-show")}this._dealOrto3dStyle(this.map.getStyle().name)})}catch(n){console.error(`Error setting style: ${n.message}`)}}getLayer(t){try{return this.map.getLayer(t)}catch(e){console.error(`Error getting layer: ${e.message}`)}}setFilter(t,e,n){try{return this.map.setFilter(t,e,n)}catch(i){console.error(`Error setting filter: ${i.message}`)}}jumpTo(t){try{this.map.jumpTo(t)}catch(e){console.error(`Error jumping to ${t}: ${e.message}`)}}setLayoutProperty(t,e,n){try{this.map.setLayoutProperty(t,e,n)}catch(i){console.error(`Error setting layout property: ${i.message}`)}}setPaintProperty(t,e,n){try{this.map.setPaintProperty(t,e,n)}catch(i){console.error(`Error setting paint property: ${i.message}`)}}addControl(t,e){try{e===void 0&&(e="top-right"),this.map.addControl(t,e)}catch(n){console.error(`Error adding control: ${n.message}`)}}getZoom(){try{return this.map.getZoom()}catch(t){console.error(`Error getting zoom level: ${t.message}`)}}addMouseCoordControl(){try{this.map.on("mousemove",function(t){const e=t.lngLat.lat,i="Lon/Lat (WGS 84) Lon: "+t.lngLat.lng.toFixed(6)+" Lat: "+e.toFixed(6),s=document.getElementById("divInfo"),a=document.createElement("div");a.className="coordControl",a.innerHTML=i+" - ZL: "+map.getZoom().toFixed(1),s.appendChild(a)})}catch(t){console.error(`Error adding mouse coordinate control: ${t.message}`)}}addGeolocateControl(t,e){try{e===void 0&&(e="top-right"),t===void 0?this.map.addControl(new No.GeolocateControl({positionOptions:{enableHighAccuracy:!0},trackUserLocation:!0}),e):this.map.addControl(new No.GeolocateControl(t),e)}catch(n){console.error(`Error adding geolocate control: ${n.message}`)}}getBounds(){try{return this.map.getBounds()}catch(t){console.error(`Error getting bounds: ${t.message}`)}}getCenter(){try{return this.map.getCenter()}catch(t){console.error(`Error getting center: ${t.message}`)}}setTerrain(t){try{return this.map.setTerrain(t)}catch(e){console.error(`Error setting terrain: ${e.message}`)}}setLayerZoomRange(t,e,n){try{return this.map.setLayerZoomRange(t,e,n)}catch(i){console.error(`Error setting terrain: ${i.message}`)}}getCanvas(){try{return this.map.getCanvas()}catch(t){console.error(`Error getting canvas: ${t.message}`)}}setCenter(t){try{return this.map.setCenter(t)}catch(e){console.error(`Error setting center: ${e.message}`)}}addLayer(t,e){try{this.map.addLayer(t,e)}catch(n){console.error(`Error adding layer: ${n.message}`)}}addLayerGeoJSON(t){try{this.map.on("load",()=>{this.map.addSource(`${t.id}-sourceIcgcMap`,{type:"geojson",data:t.data}),this.map.addLayer({id:`${t.id}-layerIcgcMap`,type:t.layerType,source:`${t.id}-sourceIcgcMap`,layout:t.layout,paint:t.paint})})}catch(e){console.error(`Error adding GeoJSON layer: ${e.message}`)}}addLayerWMS(t){try{this.map.on("load",()=>{console.log("holaaddlayerwms",t),this.map.addSource(`${t.id}-sourceIcgcMap`,{type:"raster",tiles:[t.tiles],tileSize:256}),this.map.addLayer({id:`${t.id}-layerIcgcMap`,type:"raster",source:`${t.id}-sourceIcgcMap`,paint:{}})})}catch(e){console.error(`Error adding WMS layer: ${e.message}`)}}removeControl(t){try{this.map.removeControl(t)}catch(e){console.error(`Error removing control: ${e.message}`)}}removeLayer(t){try{this.map.removeLayer(t)}catch(e){console.error(`Error removing layer: ${e.message}`)}}removeSource(t){try{this.map.removeSource(t)}catch(e){console.error(`Error removing source: ${e.message}`)}}addLogo(t){try{const e=document.createElement("img");e.src=t.url,e.style.height="62px";const n=document.getElementById("logos"),i=document.createElement("a");i.id=t.id,i.href=t.href,i.target="_blank",i.style.position="relative",i.style.bottom="1px",i.appendChild(e),n.appendChild(i)}catch(e){console.error(`Error adding logo: ${e.message}`)}}addBasemapsICGC(t){try{const e=i=>{this.map.setStyle(i)},n=document.getElementById("basemap-group");this.map.on("load",()=>{for(const i of t)for(const s of Object.keys(Wi.baseStyles)){const a=Wi.baseStyles[s];if(i===a.url){const o=document.createElement("div");o.className="basemap-item",o.title=a.key,o.style.backgroundImage=`url('${a.image}')`,n.appendChild(o),o.addEventListener("click",()=>e(a.url))}}})}catch(e){console.error(`Error adding basemaps: ${e.message}`)}}addBasemaps(t){try{const e=i=>{console.log("base",i),this.map.setStyle(i.url)},n=document.getElementById("basemap-group");this.map.on("load",()=>{t.forEach(i=>{const s=document.createElement("div");s.className="basemap-item",s.title=i.label,s.style.backgroundImage=`url('${i.image}')`,n.appendChild(s),s.addEventListener("click",()=>e(i))})})}catch(e){console.error(`Error adding basemaps: ${e.message}`)}}addFeatureQuery(t,e){try{let n;this.map.on("load",()=>{this.map.on("mouseenter",t,()=>{this.map.getCanvas().style.cursor="pointer"}),this.map.on("mouseleave",t,()=>{this.map.getCanvas().style.cursor=""}),this.map.on("click",i=>{let s=this.map.queryRenderedFeatures(i.point);if(s&&s[0].source===t){let a=[i.lngLat.lng,i.lngLat.lat];if(e!==void 0&&e.length>0){if(e!==null){let o="";e.forEach(h=>{let f=s[0].properties[h];o=o+`<h4>${f}</h4>`}),n=o,map.addPopup(a,n)}}else{let o="";for(const h in s[0].properties)o+="<b>"+h+"</b>:"+s[0].properties[h]+"<br>";n=o,map.addPopup(a,n)}}})})}catch(n){console.error(`Error adding feature query: ${n.message}`)}}addScaleControl(t,e){try{var n=new No.ScaleControl(t);this.map.addControl(n,e)}catch(i){console.error(`Error adding scale: ${i.message}`)}}removeMeasureControl(){try{const t=document.getElementById("xButton"),e=document.getElementById("distance");e.innerHTML="";let n=this.map.getStyle().layers;for(let i=0;i<n.length;i++)n[i].id.includes("measure")&&this.map.removeLayer(n[i].id)}catch(t){console.error(`Error removing measure control: ${t.message}`)}}addMeasureControl(){try{let f=function(b,C){const B=C.queryRenderedFeatures(b.point,{layers:["measure-points"]});if(o.features.length>1&&o.features.pop(),n.innerHTML="",B.length){const Q=B[0].properties.id;o.features=o.features.filter(k=>k.properties.id!==Q)}else{const Q={type:"Feature",geometry:{type:"Point",coordinates:[b.lngLat.lng,b.lngLat.lat]},properties:{id:String(new Date().getTime())}};o.features.push(Q)}h.geometry.coordinates=o.features.map(Q=>Q.geometry.coordinates),o.features.push(h);const R=document.createElement("pre");R.textContent=`Distància total: ${turf.length(h).toLocaleString()}km`,n.appendChild(R);const D=document.createElement("div");D.id="xButton",D.textContent="X",D.onclick=()=>{try{const Q=document.getElementById("xButton"),k=document.getElementById("distance");k.innerHTML="";let j=C.getStyle().layers;for(let et=0;et<j.length;et++)j[et].id.includes("measure")&&C.removeLayer(j[et].id)}catch(Q){console.error(`Error adding measure control: ${Q.message}`)}},n.appendChild(D),C.getSource("geojson").setData(o)},g=function(b,C){C.getCanvas().style.cursor="grab",i=!0};const e=document.getElementById("distance"),n=document.getElementById("distanceTotal");let i=!1,s=!1;var t;const a=document.createElement("div");a.id="rulerButton",a.onclick=()=>{try{s?document.getElementById("rulerButton").style.backgroundColor="#ff597a":document.getElementById("rulerButton").style.backgroundColor="#41b883",s=!s}catch(b){console.error(`Error adding measure control: ${b.message}`)}},n.appendChild(a);const o={type:"FeatureCollection",features:[]},h={type:"Feature",geometry:{type:"LineString",coordinates:[]}};this.map.on("load",()=>{this.map.addSource("geojson",{type:"geojson",data:o}),this.map.addLayer({id:"measure-points",type:"circle",source:"geojson",paint:{"circle-radius":5,"circle-color":"#000"},filter:["in","$type","Point"]}),this.map.addLayer({id:"measure-lines",type:"line",source:"geojson",layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#000","line-width":2.5},filter:["in","$type","LineString"]})}),this.map.on("click",b=>{clearTimeout(t),!i&&s&&(t=setTimeout(()=>{f(b,this.map)},50))}),this.map.on("dblclick",b=>{s&&(clearTimeout(t),g(b,this.map))}),this.map.on("mousemove",b=>{if(!i&&s){const C=this.map.queryRenderedFeatures(b.point,{layers:["measure-points"]});this.map.getCanvas().style.cursor=C.length?"pointer":"crosshair"}else this.map.getCanvas().style.cursor="grab"})}catch{}}addExportControl(t,e){try{typeof t=="string"&&(e=t,t=void 0),t===void 0&&(t={PageSize:lf.A4,PageOrientation:ag.Landscape,Format:Iu.PNG,DPI:jw[300],Crosshair:!0,PrintableArea:!0},e="top-right"),map.addControl(new aet(t),e)}catch(n){console.error(`Error adding export control: ${n.message}`)}}addPopup(t,e){try{this.map.on("load",()=>{new No.Popup().setLngLat(t).setHTML(e).addTo(this.map)})}catch{}}addMarker(t){try{let e,n;return t.text===void 0?e=new No.Marker(t.options).setLngLat(t.coord).addTo(this.map):(n=new No.Popup({offset:t.textOffset}).setText(t.text),e=new No.Marker().setLngLat(t.coord).setPopup(n).addTo(this.map)),e}catch(e){return console.error(`Error adding marker: ${e.message}`),null}}addPopup(t,e){try{return new No.Popup().setLngLat(t).setHTML(e).addTo(this.map)}catch(n){return console.error(`Error adding popup: ${n.message}`),null}}addFullScreen(t){try{t===void 0&&(t="top-right"),this.map.addControl(new No.FullscreenControl,t)}catch(e){console.error(`Error adding fullscreen control: ${e.message}`)}}addMenuItem(t){try{const e=document.getElementById("menu-group"),n=document.createElement("input");n.type="checkbox",n.id=t,n.checked=!0,e.appendChild(n);const i=document.createElement("label");i.setAttribute("for",t),i.textContent=t,e.appendChild(i),n.addEventListener("change",s=>{this.map.setLayoutProperty(t,"visibility",s.target.checked?"visible":"none")})}catch(e){console.error(`Error adding menu item: ${e.message}`)}}addLayerTree(t){try{let e=t.features;const n=document.getElementById("filter-group");this.map.on("load",()=>{const i=this.map.getStyle().layers;let s;for(let a=0;a<i.length;a++)if(i[a].type==="symbol"){s=i[a].id;break}this.map.addSource(`${t.id}-source`,{type:t.type,data:e}),e.features.forEach(a=>{const o=a.properties.icon,h=`poi-${o}`;if(!this.map.getLayer(h)){this.map.addLayer({id:h,type:"circle",source:`${t.id}-source`,paint:{"circle-radius":6,"circle-color":"#B42222"},filter:["==","icon",o]},s);const f=document.createElement("input");f.type="checkbox",f.id=h,f.checked=!0,n.appendChild(f);const g=document.createElement("label");g.setAttribute("for",h),g.textContent=o,n.appendChild(g),f.addEventListener("change",b=>{this.map.setLayoutProperty(h,"visibility",b.target.checked?"visible":"none")})}})})}catch(e){console.error(`Error adding layer tree: ${e.message}`)}}createNavigationControl(t,e){try{e===void 0&&(e="top-right"),this.map.addControl(new No.NavigationControl(t),e)}catch(n){return console.error(`Error creating navigation control: ${n.message}`),null}}addNavigationControl(t,e){try{e===void 0&&(e="top-right"),this.map.addControl(new No.NavigationControl(t),e)}catch(n){console.error(`Error adding navigation control: ${n.message}`)}}addAttributionControl(t){try{this.map.addControl(new No.AttributionControl(t.options),t.position)}catch(e){console.error(`Error adding attribution control: ${e.message}`)}}_dealStyleMaps(t){try{if(t&&t.indexOf("icgc.cat")!=-1){for(const e in uf)if(uf.hasOwnProperty(e)){const n=uf[e];if(e===t)return n}return uf[0]}else return t}catch(e){return console.error(`Error dealing with map styles: ${e.message}`),null}}addImageLayerICGC(t){try{let n=function(s,a,o,h,f){console.log("hola",t);const g=[a,o,h,f];for(const b of g)for(const[C,B]of Object.entries(b))if(B===s)return C;return null};console.log("name",t);let e=null;e=n(t,vo.Orto,vo.VectorAdmin,vo.WMS,vo.Vector),console.log("op",e),e||console.log("❌ %c The layer: %c%s%c does not exist in the ICGC DB. Consult the documentation.","font-weight: bold; font-style: italic;","font-weight: normal; font-style: normal; color: red;",t,"font-weight: bold; font-style: italic;");let i={id:e,tiles:t};console.log("source",i),this.addLayerWMS(i)}catch(e){console.error(`Error adding ICGC image layer: ${e.message}`)}}async addVectorLayerICGC(t){try{let n=function(i){for(const s in vo.VectorAdmin)if(vo.VectorAdmin.hasOwnProperty(s)&&vo.VectorAdmin[s]===i)return s;return null}(t);if(n===null)console.log("❌ %c The layer: %c%s%c does not exist in the ICGC DB. Consult the documentation.","font-weight: bold; font-style: italic;","font-weight: normal; font-style: normal; color: red;",n,"font-weight: bold; font-style: italic;");else{const i=await fetch(t);this.map.on("load",async()=>{const s={type:"FeatureCollection",features:[]};for await(const o of flatgeobuf.deserialize(i.body))s.features.push(o);let a=op.name+"-source";this.map.addSource(a,{type:"geojson",data:s}),this.map.addLayer({id:op.name+"-fill",type:"fill",source:a,paint:{"fill-color":"#0000FF","fill-opacity":0}}),this.map.addLayer({id:op.name+"-line",type:"line",source:a,paint:{"line-color":"#FFFFFF","line-opacity":.49,"line-width":1}})})}}catch(e){console.error(`Error adding ICGC vector layer: ${e.message}`)}}addTerrainICGC(t,e){this.map.on("load",()=>{try{let n;for(const s in ny)if(ny.hasOwnProperty(s)){const a=ny[s];a===t&&(n=a)}let i=n;t.includes("terrarium")?this.map.addSource("terrainICGC-src",{type:"raster-dem",tiles:[i],tileSize:512,encoding:"terrarium",maxzoom:16}):this.map.addSource("terrainICGC-src",{type:"raster-dem",tiles:[i],tileSize:512,maxzoom:16}),this.map.setTerrain({source:"terrainICGC-src",exaggeration:1.5}),e===void 0&&(e="top-right"),this.map.addControl(new ZN({pitch:90,bearing:null,minpitchzoom:null}),e)}catch(n){console.error(`Error adding 3D terrain: ${n.message}`)}})}};var kF={exports:{}};function ert(r,t){var e=r.getCenter(),n=r.getZoom(),i=r.getBearing(),s=r.getPitch();t.forEach(function(a){a.jumpTo({center:e,zoom:n,bearing:i,pitch:s})})}function rrt(){var r,t=arguments.length;if(t===1)r=arguments[0];else{r=[];for(var e=0;e<t;e++)r.push(arguments[e])}var n=[];r.forEach(function(o,h){n[h]=a.bind(null,o,r.filter(function(f,g){return g!==h}))});function i(){r.forEach(function(o,h){o.on("move",n[h])})}function s(){r.forEach(function(o,h){o.off("move",n[h])})}function a(o,h){s(),ert(o,h),i()}return i(),function(){s(),n=[],r=[]}}var nrt=rrt;(function(r){var t=nrt,e=RF.EventEmitter;function n(i,s,a,o){if(this.options=o||{},this._mapA=i,this._mapB=s,this._horizontal=this.options.orientation==="horizontal",this._onDown=this._onDown.bind(this),this._onMove=this._onMove.bind(this),this._onMouseUp=this._onMouseUp.bind(this),this._onTouchEnd=this._onTouchEnd.bind(this),this._ev=new e,this._swiper=document.createElement("div"),this._swiper.className=this._horizontal?"compare-swiper-horizontal":"compare-swiper-vertical",this._controlContainer=document.createElement("div"),this._controlContainer.className=this._horizontal?"maplibregl-compare maplibregl-compare-horizontal":"maplibregl-compare",this._controlContainer.className=this._controlContainer.className,this._controlContainer.appendChild(this._swiper),typeof a=="string"&&document.body.querySelectorAll){var h=document.body.querySelectorAll(a)[0];if(!h)throw new Error("Cannot find element with specified container selector.");h.appendChild(this._controlContainer)}else if(a instanceof Element&&a.appendChild)a.appendChild(this._controlContainer);else throw new Error("Invalid container specified. Must be CSS selector or HTML element.");this._bounds=s.getContainer().getBoundingClientRect();var f=(this._horizontal?this._bounds.height:this._bounds.width)/2;this._setPosition(f),this._clearSync=t(i,s),this._onResize=(function(){this._bounds=s.getContainer().getBoundingClientRect(),this.currentPosition&&this._setPosition(this.currentPosition)}).bind(this),s.on("resize",this._onResize),this.options&&this.options.mousemove&&(i.getContainer().addEventListener("mousemove",this._onMove),s.getContainer().addEventListener("mousemove",this._onMove)),this._swiper.addEventListener("mousedown",this._onDown),this._swiper.addEventListener("touchstart",this._onDown)}n.prototype={_setPointerEvents:function(i){this._controlContainer.style.pointerEvents=i,this._swiper.style.pointerEvents=i},_onDown:function(i){i.touches?(document.addEventListener("touchmove",this._onMove),document.addEventListener("touchend",this._onTouchEnd)):(document.addEventListener("mousemove",this._onMove),document.addEventListener("mouseup",this._onMouseUp))},_setPosition:function(i){i=Math.min(i,this._horizontal?this._bounds.height:this._bounds.width);var s=this._horizontal?"translate(0, "+i+"px)":"translate("+i+"px, 0)";this._controlContainer.style.transform=s,this._controlContainer.style.WebkitTransform=s;var a=this._horizontal?"rect(0, 999em, "+i+"px, 0)":"rect(0, "+i+"px, "+this._bounds.height+"px, 0)",o=this._horizontal?"rect("+i+"px, 999em, "+this._bounds.height+"px,0)":"rect(0, 999em, "+this._bounds.height+"px,"+i+"px)";this._mapA.getContainer().style.clip=a,this._mapB.getContainer().style.clip=o,this.currentPosition=i},_onMove:function(i){this.options&&this.options.mousemove&&this._setPointerEvents(i.touches?"auto":"none"),this._horizontal?this._setPosition(this._getY(i)):this._setPosition(this._getX(i))},_onMouseUp:function(){document.removeEventListener("mousemove",this._onMove),document.removeEventListener("mouseup",this._onMouseUp),this.fire("slideend",{currentPosition:this.currentPosition})},_onTouchEnd:function(){document.removeEventListener("touchmove",this._onMove),document.removeEventListener("touchend",this._onTouchEnd),this.fire("slideend",{currentPosition:this.currentPosition})},_getX:function(i){i=i.touches?i.touches[0]:i;var s=i.clientX-this._bounds.left;return s<0&&(s=0),s>this._bounds.width&&(s=this._bounds.width),s},_getY:function(i){i=i.touches?i.touches[0]:i;var s=i.clientY-this._bounds.top;return s<0&&(s=0),s>this._bounds.height&&(s=this._bounds.height),s},setSlider:function(i){this._setPosition(i)},on:function(i,s){return this._ev.on(i,s),this},fire:function(i,s){return this._ev.emit(i,s),this},off:function(i,s){return this._ev.removeListener(i,s),this},remove:function(){this._clearSync(),this._mapB.off("resize",this._onResize);var i=this._mapA.getContainer();i&&(i.style.clip=null,i.removeEventListener("mousemove",this._onMove));var s=this._mapB.getContainer();s&&(s.style.clip=null,s.removeEventListener("mousemove",this._onMove)),this._swiper.removeEventListener("mousedown",this._onDown),this._swiper.removeEventListener("touchstart",this._onDown),this._controlContainer.remove()}},window.maplibregl?maplibregl.Compare=n:r.exports=n})(kF);var irt=kF.exports;const srt=Bm(irt);class ort{constructor(t,e,n,i){this.mapCompare=new srt(t.map,e.map,n,{})}}/*!
2568
2568
  * html2canvas 1.4.1 <https://html2canvas.hertzen.com>
2569
2569
  * Copyright (c) 2022 Niklas von Hertzen <https://hertzen.com>
2570
2570
  * Released under MIT License