@vlci/cdmciutat 31.0.0 → 32.0.0

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.
@@ -1,2 +1,2 @@
1
1
  /*! For license information please see vehicles.js.LICENSE.txt */
2
- !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.vehicles=e():t.vehicles=e()}(self,(()=>(()=>{var t={2725:t=>{var e;self,e=()=>(()=>{"use strict";var t={d:(e,r)=>{for(var n in r)t.o(r,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:r[n]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};t.r(e),t.d(e,{THRESHOLDS:()=>at,addPointInteger:()=>f,buildCamarasTrafico:()=>pt,buildTableCalidadAire:()=>st,calculateMaxYAxis:()=>v,calculatePentahoPath:()=>ut,calculateXAxisStart:()=>w,checkAllGroupsCollapsed:()=>nt,configureDataBar:()=>P,configureDataGaugeCommon:()=>x,configureDataGaugeMonthCommon:()=>I,configureDataLine:()=>O,configureDataValidate:()=>Pt,configureLinesChartValidates:()=>Tt,convertToLanguageSelectorDateRange:()=>Y,convertToTableTreeView:()=>rt,downloadCSVTable:()=>ot,downloadPDFTable:()=>it,formatCellMultiplesLines:()=>Q,formatDayMonthYear:()=>a,formatMilMillionEuros:()=>E,formatMonthAnyo:()=>i,formatName:()=>y,formatNameHeaderColumn:()=>X,formatRoundTooltip:()=>A,formatShortMonthShortYear:()=>u,formatShortMonthYear:()=>s,formatToMillions:()=>p,formatToTons:()=>h,formatTooltip:()=>b,formatTooltipPie:()=>S,formatTrimestre:()=>c,getEnvironment:()=>ct,getMaxFieldNumberFromData:()=>B,getMonth:()=>n,getMonthList:()=>l,getSelectCommonOptions:()=>z,getSelectTwoColumnsOptions:()=>G,initBarChart:()=>bt,initBarChartComparationMonth:()=>Mt,initChart:()=>d,initStackedBarChart:()=>dt,initStackedBarChartMonthSeries:()=>mt,initTable:()=>K,initValueDefaultDate:()=>H,initialCalls:()=>ft,loadIframeOnClickEvent:()=>xt,printDataChart:()=>m,printDataInHTMLElements:()=>L,printNoDataChart:()=>g,resetFilter:()=>W,resetFilterDate:()=>J,resetFilterDates:()=>Z,resultsetWithFields:()=>T,selectConfigDatasource:()=>V,selectFilterAll:()=>$,selectValueDefaultInFilter:()=>q,splitDataset:()=>_,traverseRows:()=>et,updateObject:()=>C,updateStackedBarOptions:()=>gt});const r={"01":"Enero","02":"Febrero","03":"Marzo","04":"Abril","05":"Mayo","06":"Junio","07":"Julio","08":"Agosto","09":"Septiembre",10:"Octubre",11:"Noviembre",12:"Diciembre"};function n(t){return{1:"Gen",2:"Feb",3:"Mar",4:"Abr",5:"Mai",6:"Jun",7:"Jul",8:"Ago",9:"Sep",10:"Oct",11:"Nov",12:"Des"}[parseInt(t.toString(),10)]}function o(t){return[t.substring(0,4),r[t.substring(4,6)]]}function i(t){const[e,r]=o(t);return`${r} ${e}`}function a(t){const[e,n,o]=function(t){return[t.substring(0,4),r[t.substring(4,6)],t.substring(6,8)]}(t);return`${o} ${n} ${e}`}function s(t){const[e,r]=o(t);return`${r.substring(0,3)} ${e}`}function u(t){const[e,r]=o(t);return`${r.substring(0,3)} '${e.substring(2,4)}`}function c(t){const[e,r]=t.split("-");return`${parseFloat(r)/3}T ${e}`}function l(t,e){const r=t[e];return Array.from(r.values()).map((t=>t.slice(0,3)))}function f(t,e=2){let r=navigator.language||navigator.userLanguage;r=r.length<=2?`${r}-${r.toUpperCase()}`:r;const n={minimumFractionDigits:0,maximumFractionDigits:e};return"es-ES"===r?t.toLocaleString("de-DE",n):t.toLocaleString(r,n)}function p(t){const e=1e6;return t>=e?t/e+"M":t.toString()}function h(t){return t>=1e3?t/1e3+" Tn":t.toString()}function y(t,e=29){if(t.length>=e){const r=t.split(" ");let n="",o="";return r.forEach((t=>{`${n} ${t}`.length<=e?n+=(n?" ":"")+t:(o+=`${n}\n`,n=t)})),o+=n,o}return t}function d(t,e){const r=document.getElementById(t);if(!r)return console.error(`No se pudo encontrar el elemento con ID ${t}.`),null;const n=echarts.init(r);n.setOption(e,!0),window.addEventListener("resize",(()=>{null!=n&&void 0!==n&&n.resize()}));const o=document.getElementById("main-content");return o&&(o.addEventListener("shown.bs.collapse",(()=>{n.resize()})),o.addEventListener("hidden.bs.collapse",(()=>{n.resize()}))),n}function g(t,e){const r=t?document.querySelector(t):null,n=e?document.querySelector(e):null;r&&(r.hidden=!0),n&&(n.style.background="url('./build/images/nodata1.png') no-repeat top center",n.hidden=!1)}function m(t,e){const r=t?document.querySelector(t):null,n=e?document.querySelector(e):null;r&&(r.hidden=!0),n&&(n.style.background="#ffffff",n.hidden=!1)}function b(t,e=!1,r=!0,n=""){let o=`<p style="font-weight: 500;color: #565656;">${t[0].name}</p>`;return t.forEach((t=>{const i=e?Math.round(t.data):t.data,a=r?`<div style="font-weight: 400;color: #666;">${s=t.color,`<span style="display:inline-block;margin-right:5px;border-radius:10px;width:9px;height:9px;font-weight: 500;background-color:${s}"></span>`} ${t.seriesName}: \n <span style="float: right; margin-left:20px;font-weight: 600;color: #565656;">\n ${t.data?`${f(i)} ${n}`:"-"}\n </span>\n </div>`:`<div>\n <span style="font-weight: 600;color: #565656;">${t.data?`${f(i)} ${n}`:"-"}\n </span>\n </div>`;var s;o+=a})),o}function w(t){return 100*(t-120)/t}function v(t,e){const r=Math.max(...t);return r+(e-r%e)}function S(t,e=!1){const r=`<span style="display:inline-block;margin-right:5px;border-radius:10px;width:9px;height:9px;background-color:${t.color}"></span>`,n=e?`${t.percent}%`:f(t.value);return`<div> ${r} ${t.name} <span style="float: right; margin-left:20px;font-weight: 600;color: #333;"> ${n} </span></div>`}function A(t,e){let r=`${t.name} : `;return r+=`<span style="font-weight:500">${f(Math.round(t.value))}</span>`,e&&(r+=`<span> (${t.percent}%)</span>`),t.marker+r}function E(t){const e=1e6,r=Number(t);return r>=0&&r<e?`${f(r)} €`:r>=e?`${f(r/e)} M €`:"-"}function M(t,e,r=1){const n=Math.max(...t.map((t=>t[e])))*r;return 5e3*Math.ceil(n/5e3)}function x(t,e,r,n=30,o=15,i=30,a=-70,s=70,u=3){const c=M(t,e.data,1.1),l=s,p=r.slice(),h=[];let d=o,g=i,m=a;for(let r=0;r<t.length;r+=1)h.push({value:t[r][e.data],name:y(String(t[r][e.type]).replace(/\[.*?\]/g,"")),color:p.shift(),title:{offsetCenter:[`${String(m)}%`,`${String(d)}%`],fontFamily:"Montserrat",fontSize:n},detail:{offsetCenter:[`${String(m)}%`,`${String(g)}%`],fontFamily:"Montserrat",width:"33%",formatter:t=>f(Math.round(t))}}),m+=l,(r+1)%u==0&&(g+=i,d+=2*o,m=a);return[c,h]}function I(t,e,r,o=0){return[M(e,r.data,1),t=>function(t,e,r){const o=f(Math.round(e)),i=n(t[r][0]),a=t[r][1],s=`\n${i} ${a} : ${o}`,u=`${o}\n${i} ${a}`;return window.innerWidth<=1710?s:u}(e,t,o),[{value:e[o][r.data]}]]}function k(t,e){const{resultset:r}={resultset:t},n=new Set,o=new Set,i=r.map((([t,r,i])=>{const a=e?Math.round(i):i;return n.add(t),o.add(r),{day:r,type:t,value:a}})),a=Array.from(o.values()),s=Array.from(n.values());return s.sort(((t,e)=>t.toLowerCase().localeCompare(e.toLowerCase(),"es",{ignorePunctuation:!0}))),[s.map((t=>{const e=i.filter((e=>e.type===t)).map((({day:e,value:r})=>[e,t,r])),r=a.map((t=>{const r=e.find((([e])=>e===t));return r?r[2]:null}));return{name:t,data:r}})),s,o]}function O(t,e=[],r=!1){const[n,o,i]=k(t,r);return n.forEach((t=>{t.type="line",t.symbol="circle",t.symbolSize=6,t.smooth=.1,e.length>0&&(t.color=e.shift())})),[n,i,o]}function P(t,e,r=!1){const[n,o,i]=k(t,r);return n.forEach((t=>{t.type="bar",t.color=e.shift(),t.smooth=!1})),[n,i,o]}function T(t){const{resultset:e,metadata:r}=t,n=[];return e.forEach((t=>{const e={};t.forEach(((t,n)=>{e[r[n].colName]=t})),n.push(e)})),n}function C(t,e){const r={...t};return Object.keys(e).forEach((n=>{Object.prototype.hasOwnProperty.call(e,n)&&("series"===n&&Array.isArray(e[n])?r[n]=e[n].map(((e,r)=>({...Array.isArray(t[n])&&t[n][r]||{},...e}))):"object"!=typeof e[n]||null===e[n]||Array.isArray(e[n])?t[n]!==e[n]&&(r[n]=e[n]):r[n]=C(t[n]||{},e[n]))})),r}function L(t,e){t.forEach((t=>{t.id in e&&Object.entries(e[t.id]).forEach((r=>{const n=r[0],o=r[1];"object"==typeof o?o.className?document.querySelector(o.className).className=t[n]:o.element&&o.format&&(document.querySelector(o.element).textContent=e[t.id][n].format(t[n])):document.querySelector(o).textContent=t[n]}))}))}function B(t,e){const r=T(t),n=[];let o=null;return r.forEach((t=>{const r=t[e];"number"!=typeof r||Number.isNaN(r)||n.push(r)})),n.length>0&&(o=Math.max(...n)),o}function _(t,e=!0){const r={Cont:[],Mob:[]};return t.forEach((t=>{"is-res-001-kgs-contenidors"===t[0]&&"total"===t[1]&&(e?r.Cont.push([t[3],t[4],t[2]]):r.Cont.push([t[3],t[2]])),"Mobles"===t[1]&&(e?r.Mob.push([t[3],t[4],t[2]]):r.Mob.push([t[3],t[2]]))})),r}const R=["Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre"],N=["Ene","Feb","Mar","Abr","May","Jun","Jul","Ago","Sep","Oct","Nov","Dic"],U=["Domingo","Lunes","Martes","Miércoles","Jueves","Viernes","Sábado"],F=["Dom","Lun","Mar","Mié","Juv","Vie","Sáb"],D=["Do","Lu","Ma","Mi","Ju","Vi","Sá"];function $(t){const e=t.resultset.map((t=>t[0]));return this.dashboard.fireChange(this.parameter,e),t}function j(t){for(const e of t)if(Array.isArray(e)){if(!j(e))return!1}else if("All"!==e)return!1;return!0}function V(t,e,r,n){return j(e)?(t.queryDefinition.dataAccessId=r,t.dashboard.setParameter(t.parameter,["All"])):t.queryDefinition.dataAccessId=n,!0}function W(t){t.forEach((t=>{Dashboards.fireChange(t,["All"])}))}function z(){return{input:{root:{id:"All"},indexes:{id:0,label:0}},component:{Root:{strings:{isDisabled:"No disponible",allItems:"Todos",noItems:"Ninguno",btnApply:"Aceptar",btnCancel:"Cancelar"}},Group:{Strings:{allItems:"Todos",noItems:"Ninguno",btnApply:"Aceptar",btnCancel:"Cancelar"}}}}}function G(){const t={input:{root:{id:"All"},indexes:{id:0,label:0}},component:{Root:{strings:{isDisabled:"No disponible",allItems:"Todos",noItems:"Ninguno",btnApply:"Aceptar",btnCancel:"Cancelar"}},Group:{Strings:{allItems:"Todos",noItems:"Ninguno",btnApply:"Aceptar",btnCancel:"Cancelar"}}}};return t.input.indexes.id=1,t.input.indexes.label=0,t}function Z(t,e,r,n){const o=Dashboards.getParameterValue(r),i=Dashboards.getParameterValue(n);return Dashboards.fireChange(t,[o]),Dashboards.fireChange(e,[i]),!0}function J(t,e){const r=Dashboards.getParameterValue(e);return Dashboards.fireChange(t,[r]),!0}function H(t,e){Dashboards.fireChange(e,t.resultset[0][0])}function q(t,e){const r=Dashboards.getParameterValue(e),n=t.parameter;t.dashboard.setParameter(n,[r])}function Y(t){t.regional.es={monthNames:R,abbreviatedMonthNames:N,dayNames:U,abbreviatedDayNames:F,dayNamesMin:D,weekHeader:"Sm",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},t.setDefaults(t.regional.es)}function K(t,e){const r=document.getElementById(t);return r?new Tabulator(r,e):(console.error(`No se pudo encontrar el elemento con ID ${t}.`),null)}function X(t,e){let r=t.getValue();return r.length>e&&(r=`${r.substr(0,e)}<br>${r.substr(e)}`),r}function Q(t,e){const r=t.getValue().split(" ");let n="",o="";return r.forEach((t=>{(o+t).length<=e?o+=`${t} `:(n+=`${o}<br>`,o=`${t} `)})),n+=`${o}<br>`,n}function tt(t,e){"expand"===e?t.treeExpand():t.treeCollapse();const r=t.getTreeChildren();r.length>0&&r.forEach((t=>{t.getTreeChildren().length>0&&tt(t,e)}))}function et(t,e){t.getRows().forEach((t=>{t.getTreeChildren().length>0&&tt(t,e)}))}function rt(t,e,r,n){const o=[];for(const i in t)if(t.hasOwnProperty(i)){const a=t[i],s={[e]:a[0],_children:[]};a.shift(),a.forEach(((t,o)=>{const i={[e]:r[o],[n]:t};s._children.push(i)})),o.push(s)}return o}function nt(t){let e=!0;return t.getGroups().forEach((t=>{t._group.visible&&(e=!1)})),e}function ot(t,e,r){const n=document.getElementById(r),o=n.cloneNode(!0);n.parentNode.replaceChild(o,n),o.addEventListener("click",(()=>{t.download("csv",`${e}.csv`,{delimiter:";"})}))}function it(t,e,r){const n=document.getElementById(r),o=n.cloneNode(!0);n.parentNode.replaceChild(o,n),o.addEventListener("click",(()=>{t.download("pdf",`${e}.pdf`,{title:e,rowCalcStyles:{fontSize:8,fontStyle:"bold"},autoTable:{styles:{fontSize:8}}})}))}const at={SO2:[100,200,350,500,750,751],NO2:[40,90,120,230,340,341],O3:[50,100,130,240,380,381],PM10:[20,40,50,100,150,151],PM25:[10,20,25,50,75,76]};function st(t){const e=[],r={0:"b",1:"a",2:"d",3:"m",4:"mm",5:"em",6:"",7:"nd"};function n(t,e,n){const o=document.createElement("td");if(o.setAttribute("id",t),null!=e){o.innerHTML=e;const t=function(t,e){let n;return void 0===e?n=6:"ND"===e?n=7:(n=5,t.forEach(((t,r)=>{e<=t&&5===n&&(n=r)}))),r[n]}(n,e);o.classList.add(t)}return o}return t.forEach((t=>{const r=t;"noData"===r.operationalstatus&&(r.so2value="ND",r.no2value="ND",r.o3value="ND",r.pm10value="ND",r.pm25value="ND"),"A09_CABANYAL_60m"===r.entityid&&(r.pm10value=void 0,r.pm25value=void 0);const o=document.createElement("tr"),i=document.createElement("td");i.innerHTML=r.address,o.appendChild(i),o.appendChild(n(`${r.entityid}_so2`,r.so2value,at.SO2)),o.appendChild(n(`${r.entityid}_no2`,r.no2value,at.NO2)),o.appendChild(n(`${r.entityid}_o3`,r.o3value,at.O3)),o.appendChild(n(`${r.entityid}_pm10`,r.pm10value,at.PM10)),o.appendChild(n(`${r.entityid}_pm25`,r.pm25value,at.PM25)),e.push(o)})),e}function ut(t){document.location=`${document.documentURI.split("%3A")[0]}%3A${document.documentURI.split("%3A")[1]}%3A${document.documentURI.split("%3A")[2]}%3A${document.documentURI.split("%3A")[3]}%3A${t}`}function ct(){const t=window.location.href;let e="";return e=t.includes("localhost")?"local":t.includes("sc_valencia_pre")?"PRE":"PRO",e}function lt(t,e){document.querySelectorAll(`[${t}]`).forEach((r=>{!function(t,e,r){const n=e;if(t){const e=new XMLHttpRequest;e.onreadystatechange=function(){4===this.readyState&&(200===this.status&&(n.innerHTML=this.responseText,r&&r()),404===this.status&&(n.innerHTML="No se ha podido cargar correctamente."))},e.open("GET",t,!0),e.send()}}(r.getAttribute(t),r,e)}))}function ft(t){lt("include-html-cabecera",(function(){!function(){const t=ct();"PRO"!==t&&(document.title+=` (${t})`)}(),function(){const t=ct();"PRO"!==t&&(document.querySelector("nav").querySelectorAll("span")[1].textContent+=` (${t})`)}()})),lt("include-html-menu"),lt("include-html-main-container",(function(){(function(){const t=document.querySelector("body");t.classList.remove("inicio"),t.classList.add(document.documentURI.split("%3A")[4].match(/(.*?).wcdf/)[1])})(),t&&t()})),lt("include-html-copyright")}function pt(t,e,r,n,o,i){let a=!1,s=!1;const u=document.querySelector(t),c=document.querySelector(e),l=()=>{"undefined"!=typeof Liferay&&"ca-ES"===Liferay.ThemeDisplay.getBCP47LanguageId()?(u&&u.setAttribute("src","https://camaras.valencia.es/camaras/ocimovil.html?camara=1&lang=cas"),c&&c.setAttribute("src","https://camaras.valencia.es/camaras/ocimovil.html?lang=cas")):(u&&u.setAttribute("src","https://camaras.valencia.es/camaras/ocimovil.html?camara=1&lang=val"),c&&c.setAttribute("src","https://camaras.valencia.es/camaras/ocimovil.html?lang=val"))};function f(t=!0){const e=document.querySelector(r);t?(u&&(u.src="about:blank"),c&&(c.src="about:blank"),e.classList.add("blur"),s=!0):(e.classList.remove("blur"),l(),s=!1)}const p=t=>{new IntersectionObserver((t=>{t.forEach((t=>{t.isIntersecting&&(s||l(),a||(a=!0,window.setTimeout(f,i)))}))})).observe(t)};!function(){const{userAgent:t}=navigator;return/iPad|iPhone|iPod|Macintosh/.test(t)&&!window.MSStream}()?(u&&(u.setAttribute("sandbox","allow-scripts"),p(u)),c&&(c.setAttribute("sandbox","allow-scripts"),p(c)),document.querySelector(o).addEventListener("click",(()=>{f(!1),window.setTimeout(f,i)}))):document.querySelectorAll(n)[0].style.display="none"}const ht={grid:{containLabel:!0},title:{left:"center",top:"0",textStyle:{fontSize:15,fontFamily:"Montserrat",fontWeight:500,color:"#666"}},legend:{orient:"horizontal",bottom:"0",left:"center",width:"100%",textStyle:{fontSize:11,fontFamily:"Montserrat",fontWeight:400,color:"#666"}},toolbox:{show:!0,right:"0",top:"0",feature:{restore:{textStyle:{fontSize:6,fontFamily:"Montserrat",fontWeight:300}},saveAsImage:{textStyle:{fontSize:6,fontFamily:"Montserrat",fontWeight:300}}},emphasis:{iconStyle:{borderColor:"#ffcd00",textFill:"#666"}}},tooltip:{textStyle:{fontFamily:"Montserrat",fontSize:12}},xAxis:[{type:"category",axisLabel:{show:!0,interval:0,textStyle:{fontFamily:"Montserrat",fontSize:11}},data:[]}],yAxis:[{type:"value",alignTicks:!0,position:"right",axisLabel:{textStyle:{fontSize:10,fontFamily:"Montserrat",fontWeight:400},formatter:t=>`${t}%`}},{type:"value",position:"left",axisLabel:{textStyle:{fontSize:10,fontFamily:"Montserrat",fontWeight:400},formatter:t=>`${p(t)}€`}}]},yt=(t,e)=>{e.sort(((t,e)=>parseInt(t.anyo)-parseInt(e.anyo)));const r={};e.forEach((e=>{const n=e[1],o=e[0];o!==t.seriesName||r[n]||(r[n]=0),o===t.seriesName&&(r[n]+=e[2])}));let n=`<p>${t.seriesName}</p>`;for(const[e,o]of Object.entries(r))n+=`<div>${t.marker} ${e}: <span style="float: right; margin-left:20px;font-weight: 600;">${f(o)}</span></div>`;return n};function dt(t,e,r=void 0,n=void 0){const o=null===n?void 0:n,i=new Set(e.map((t=>t[1])));let a;const s={title:{text:"SIN TITULO",left:"center",top:"top",textStyle:{fontSize:20,fontFamily:"Montserrat",fontWeight:600,color:"#666"}},tooltip:{axisPointer:{type:"shadow"},trigger:"item",formatter:t=>yt(t,e),textStyle:{fontFamily:"Montserrat"},position(t,e,r,n,o){const i={},a=o.contentSize[1]/2,s=o.viewSize[1],u=t[1];return u<a?i.top=10:u+a>s?i.bottom=10:i.top=u-a,t[0]<o.viewSize[0]/2?i.left=t[0]+20:i.right=o.viewSize[0]-t[0]+20,i}},legend:{padding:40,textStyle:{fontFamily:"Montserrat"}},grid:{left:"3%",right:"4%",bottom:"3%",containLabel:!0},xAxis:{type:"value",splitNumber:10,name:"SIN NOMBRE",nameLocation:"start",nameTextStyle:{fontWeight:"bold",fontFamily:"Montserrat",color:"#666",padding:-40},axisLabel:{margin:5,textStyle:{fontFamily:"Montserrat"},formatter:t=>f(t)},splitLine:{lineStyle:{color:"#DDD"}}},yAxis:{type:"category",data:Array.from(i),axisLabel:{textStyle:{fontFamily:"Montserrat"}}},series:(()=>{const t={name:"SIN NOMBRE",type:"bar",stack:"total",label:{show:!0,fontFamily:"Montserrat",fontSize:10,formatter:t=>f(Math.round(t.value))},itemStyle:void 0,emphasis:{focus:"series"},data:void 0};o&&o.itemStyle&&Array.isArray(o.itemStyle.borderColor)&&(a=[...o.itemStyle.borderColor],delete o.itemStyle.borderColor);const r=function(t){return t.reduce(((t,e)=>{const r=e[0];return t[r]||(t[r]=[]),t[r].push(e),t}),{})}(e),n=Object.keys(r);i.forEach((t=>{n.forEach((e=>{void 0===r[e].find((e=>e[1]===t))&&(r[e].push([r[e][0][0],t,void 0]),r[e].sort())}))}));const s=[];return Object.keys(r).forEach((e=>{a&&(t.itemStyle={borderColor:a.shift()}),t.name=e,t.data=r[e].map((t=>t[2]));let n={};n=void 0!==o?C(t,o):t,s.push({...n})})),s})(),toolbox:{show:!0,feature:{restore:{title:"Restablir"},saveAsImage:{title:"Desar"}},right:50}};let u={};u=void 0!==r?C(s,r):s,d(t,u)}function gt(t){let e={};return e=C(ht,t),e}function mt(t,e,r={},o={}){let i={};i=C(r,{color:["#81B1CC","#ABD9EA","#C2EEF9","#F9E2AF","#F9C780","#FDAE61","#F46D43","#FDAE61","#F9E2AF","#C2EEF9","#ABD9EA","#81B1CC"],yAxis:{data:function(){const t=new Set;return e.forEach((e=>{t.add(e[1])})),Array.from(t).sort(((t,e)=>t-e))}()}});const a={itemStyle:{borderWidth:2,borderColor:["#448DAD","#89CADB","#A0DEE8","#F4D28C","#F4B569","#F79646","#F25930","#F79646","#F4D28C","#A0DEE8","#89CADB","#448DAD"]}},s=null===o?a:C(o,a),u=e;u.forEach(((t,e)=>{u[e][0]=n(t[0])})),dt(t,u,i,s)}function bt(t,e=void 0){const r={title:{text:"SIN TITULO",left:"center",top:"top",padding:50,textStyle:{fontSize:14,fontFamily:"Montserrat",fontWeight:400,color:"#333"}},legend:{show:!1},grid:{top:"30%",bottom:"5%",left:"8%",right:"8%"},xAxis:{type:"value",show:!1},yAxis:{show:!1,type:"category"},tooltip:{show:!0,textStyle:{fontFamily:"Montserrat",fontWeight:"600"},appendToBody:!0,formatter:t=>A(t,!1)},series:[{type:"bar",showBackground:!0}]};let n={};n=void 0!==e?C(r,e):r,d(t,n)}const wt="es_ES",vt={es_ES:new Map([["1","Enero"],["2","Febrero"],["3","Marzo"],["4","Abril"],["5","Mayo"],["6","Junio"],["7","Julio"],["8","Agosto"],["9","Septiembre"],["10","Octubre"],["11","Noviembre"],["12","Diciembre"]]),ca_ES:new Map([["1","Gener"],["2","Febrer"],["3","Març"],["4","Abril"],["5","Maig"],["6","Juny"],["7","Juliol"],["8","Agost"],["9","Setembre"],["10","Octubre"],["11","Novembre"],["12","Desembre"]])};function St(t){return Math.max(...t.map((t=>Number(t[0]))))}function At(t){const e=t.filter((e=>Number(e[0])===St(t))),r=Array.from({length:12},(()=>0));return e.forEach((([t,e,n])=>{const o=parseInt(e,10)-1;r[o]=n})),r}function Et(t){const e=t.filter((e=>Number(e[0])===St(t)-1)),r=Array.from({length:12},(()=>0));return e.forEach((([t,e,n])=>{const o=parseInt(e,10)-1;r[o]=n})),r}function Mt(t,e,r=void 0){const n=St(e).toString(),o=(St(e)-1).toString();bt(t,C({title:{left:"center",top:"-12%",textStyle:{fontSize:15,fontFamily:"Montserrat"}},legend:{top:"10%",show:!0,data:[o,n],textStyle:{fontFamily:"Montserrat"}},grid:{bottom:"8%",top:"20%",right:"2%"},xAxis:[{type:"category",data:l(vt,wt),interval:0,margin:10,axisLabel:{textStyle:{fontSize:10,fontFamily:"Montserrat",fontWeight:400}}}],yAxis:[{type:"value",axisLabel:{formatter:t=>t.toLocaleString("es-ES"),textStyle:{fontSize:10,fontFamily:"Montserrat",fontWeight:400}}}],series:[{name:o,type:"bar",data:Et(e)},{name:n,type:"bar",barGap:0,data:At(e)}]},r))}function xt(t,e,r){const n=document.querySelector(e),o=document.querySelector(t);let i=!1;o.addEventListener("click",(()=>{!1===i&&(i=!0,n.setAttribute("src","about:blank"),n.setAttribute("src",r),n.onload=()=>{i=!1})})),o.disabled=!1}const It="id",kt="fecha",Ot="value";function Pt(t,e,r,n){const[o,i]=function(t,e,r){const n=[],o=[];return t.forEach((t=>{e.includes(`${t[It]}`)?n.push(`${t[kt]}`):r.includes(`${t[It]}`)&&o.push(`${t[kt]}`)})),[n.map((t=>[t,0])),o.map((t=>[t,0]))]}(t,r,n);let a="Datos sin validar";0===i.length&&(a="");const s={name:"Datos validados",type:"line",data:[...o,i[0]],lineStyle:{color:"#00A9A0",width:4},showSymbol:!1,tooltip:{show:!1}};let u="",c="";if(0===i.length){const e=t[t.length-1].fecha;u=e,c=e}else u=i[0][0],c=i[i.length-1][0];return[...e,s,{name:"Datos NO validados",type:"line",data:i,lineStyle:{color:"#80D4CF",width:4},showSymbol:!1,tooltip:{show:!1},markArea:{silent:!0,itemStyle:{opacity:.6,color:"#eee"},tooltip:{show:!1},label:{color:"#333",fontStyle:"normal",fontWeight:"400",fontFamily:"Montserrat",fontSize:11},data:[[{name:a,xAxis:u,yAxis:0},{name:"end",xAxis:c,yAxis:Math.max(...t.filter((t=>null!==t[Ot])).map((t=>parseInt(`${t[Ot]}`,10))))}]]}}]}function Tt(t,e,r=void 0){d(t,C({grid:{left:"2.5%",right:"5%",bottom:"70",top:"150",containLabel:!0},title:{left:"center",top:"top",textStyle:{fontSize:20,fontFamily:"Montserrat",fontWeight:600,color:"#666"}},legend:{type:"plain",top:"50",width:"98%",textStyle:{fontFamily:"Montserrat"}},tooltip:{trigger:"axis",show:!0,formatter:t=>b(t),textStyle:{fontFamily:"Montserrat"}},xAxis:{type:"category",boundaryGap:!1,splitLine:{show:!1},axisLabel:{textStyle:{fontSize:10,fontFamily:"Montserrat",color:"#666"}}},yAxis:{type:"value",nameLocation:"end",nameGap:"0",nameTextStyle:{fontFamily:"Montserrat",fontWeight:"500",padding:[-25,0,0,-48],margin:0,align:"left",verticalAlign:"top",width:"auto"},scale:!0,splitNumber:"6",axisLabel:{margin:10,textStyle:{fontSize:10,fontFamily:"Montserrat",color:"#666"}}},dataZoom:{end:100,borderColor:"#eee",fillerColor:"rgba(0,0,0,.05)",textStyle:{fontSize:10,fontFamily:"Montserrat",color:"#333",textBorderColor:"#fff",textBorderWidth:3,fontWeight:"600"},selectedDataBackground:{lineStyle:{color:"#333"},areaStyle:{color:"#ffcd00"}},dataBackground:{backgroundColor:"rgba(0,0,0,1)",lineStyle:{color:"#333"},areaStyle:{color:"rgba(0,0,0,0.5)"}},handleStyle:{color:"rgba(0,0,0,0.2)"},moveHandleStyle:{color:"rgba(0,0,0,0.3)"},emphasis:{handleStyle:{color:"rgba(255,205,0,1)"},moveHandleStyle:{color:"rgba(255,205,0,1)"}}},toolbox:{feature:{restore:{title:"Restablir"},saveAsImage:{title:"Desar"}},right:"1%",top:"0%"},series:e},r))}return e})(),t.exports=e()},7526:(t,e)=>{"use strict";e.byteLength=function(t){var e=s(t),r=e[0],n=e[1];return 3*(r+n)/4-n},e.toByteArray=function(t){var e,r,i=s(t),a=i[0],u=i[1],c=new o(function(t,e,r){return 3*(e+r)/4-r}(0,a,u)),l=0,f=u>0?a-4:a;for(r=0;r<f;r+=4)e=n[t.charCodeAt(r)]<<18|n[t.charCodeAt(r+1)]<<12|n[t.charCodeAt(r+2)]<<6|n[t.charCodeAt(r+3)],c[l++]=e>>16&255,c[l++]=e>>8&255,c[l++]=255&e;return 2===u&&(e=n[t.charCodeAt(r)]<<2|n[t.charCodeAt(r+1)]>>4,c[l++]=255&e),1===u&&(e=n[t.charCodeAt(r)]<<10|n[t.charCodeAt(r+1)]<<4|n[t.charCodeAt(r+2)]>>2,c[l++]=e>>8&255,c[l++]=255&e),c},e.fromByteArray=function(t){for(var e,n=t.length,o=n%3,i=[],a=16383,s=0,c=n-o;s<c;s+=a)i.push(u(t,s,s+a>c?c:s+a));return 1===o?(e=t[n-1],i.push(r[e>>2]+r[e<<4&63]+"==")):2===o&&(e=(t[n-2]<<8)+t[n-1],i.push(r[e>>10]+r[e>>4&63]+r[e<<2&63]+"=")),i.join("")};for(var r=[],n=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0;a<64;++a)r[a]=i[a],n[i.charCodeAt(a)]=a;function s(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");return-1===r&&(r=e),[r,r===e?0:4-r%4]}function u(t,e,n){for(var o,i,a=[],s=e;s<n;s+=3)o=(t[s]<<16&16711680)+(t[s+1]<<8&65280)+(255&t[s+2]),a.push(r[(i=o)>>18&63]+r[i>>12&63]+r[i>>6&63]+r[63&i]);return a.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},8287:(t,e,r)=>{"use strict";const n=r(7526),o=r(251),i="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=u,e.SlowBuffer=function(t){return+t!=t&&(t=0),u.alloc(+t)},e.INSPECT_MAX_BYTES=50;const a=2147483647;function s(t){if(t>a)throw new RangeError('The value "'+t+'" is invalid for option "size"');const e=new Uint8Array(t);return Object.setPrototypeOf(e,u.prototype),e}function u(t,e,r){if("number"==typeof t){if("string"==typeof e)throw new TypeError('The "string" argument must be of type string. Received type number');return f(t)}return c(t,e,r)}function c(t,e,r){if("string"==typeof t)return function(t,e){if("string"==typeof e&&""!==e||(e="utf8"),!u.isEncoding(e))throw new TypeError("Unknown encoding: "+e);const r=0|d(t,e);let n=s(r);const o=n.write(t,e);return o!==r&&(n=n.slice(0,o)),n}(t,e);if(ArrayBuffer.isView(t))return function(t){if(q(t,Uint8Array)){const e=new Uint8Array(t);return h(e.buffer,e.byteOffset,e.byteLength)}return p(t)}(t);if(null==t)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(q(t,ArrayBuffer)||t&&q(t.buffer,ArrayBuffer))return h(t,e,r);if("undefined"!=typeof SharedArrayBuffer&&(q(t,SharedArrayBuffer)||t&&q(t.buffer,SharedArrayBuffer)))return h(t,e,r);if("number"==typeof t)throw new TypeError('The "value" argument must not be of type number. Received type number');const n=t.valueOf&&t.valueOf();if(null!=n&&n!==t)return u.from(n,e,r);const o=function(t){if(u.isBuffer(t)){const e=0|y(t.length),r=s(e);return 0===r.length||t.copy(r,0,0,e),r}return void 0!==t.length?"number"!=typeof t.length||Y(t.length)?s(0):p(t):"Buffer"===t.type&&Array.isArray(t.data)?p(t.data):void 0}(t);if(o)return o;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return u.from(t[Symbol.toPrimitive]("string"),e,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}function l(t){if("number"!=typeof t)throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function f(t){return l(t),s(t<0?0:0|y(t))}function p(t){const e=t.length<0?0:0|y(t.length),r=s(e);for(let n=0;n<e;n+=1)r[n]=255&t[n];return r}function h(t,e,r){if(e<0||t.byteLength<e)throw new RangeError('"offset" is outside of buffer bounds');if(t.byteLength<e+(r||0))throw new RangeError('"length" is outside of buffer bounds');let n;return n=void 0===e&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,e):new Uint8Array(t,e,r),Object.setPrototypeOf(n,u.prototype),n}function y(t){if(t>=a)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a.toString(16)+" bytes");return 0|t}function d(t,e){if(u.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||q(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);const r=t.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;let o=!1;for(;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return Z(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return J(t).length;default:if(o)return n?-1:Z(t).length;e=(""+e).toLowerCase(),o=!0}}function g(t,e,r){let n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return T(this,e,r);case"utf8":case"utf-8":return I(this,e,r);case"ascii":return O(this,e,r);case"latin1":case"binary":return P(this,e,r);case"base64":return x(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function m(t,e,r){const n=t[e];t[e]=t[r],t[r]=n}function b(t,e,r,n,o){if(0===t.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),Y(r=+r)&&(r=o?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(o)return-1;r=t.length-1}else if(r<0){if(!o)return-1;r=0}if("string"==typeof e&&(e=u.from(e,n)),u.isBuffer(e))return 0===e.length?-1:w(t,e,r,n,o);if("number"==typeof e)return e&=255,"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):w(t,[e],r,n,o);throw new TypeError("val must be string, number or Buffer")}function w(t,e,r,n,o){let i,a=1,s=t.length,u=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;a=2,s/=2,u/=2,r/=2}function c(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}if(o){let n=-1;for(i=r;i<s;i++)if(c(t,i)===c(e,-1===n?0:i-n)){if(-1===n&&(n=i),i-n+1===u)return n*a}else-1!==n&&(i-=i-n),n=-1}else for(r+u>s&&(r=s-u),i=r;i>=0;i--){let r=!0;for(let n=0;n<u;n++)if(c(t,i+n)!==c(e,n)){r=!1;break}if(r)return i}return-1}function v(t,e,r,n){r=Number(r)||0;const o=t.length-r;n?(n=Number(n))>o&&(n=o):n=o;const i=e.length;let a;for(n>i/2&&(n=i/2),a=0;a<n;++a){const n=parseInt(e.substr(2*a,2),16);if(Y(n))return a;t[r+a]=n}return a}function S(t,e,r,n){return H(Z(e,t.length-r),t,r,n)}function A(t,e,r,n){return H(function(t){const e=[];for(let r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}(e),t,r,n)}function E(t,e,r,n){return H(J(e),t,r,n)}function M(t,e,r,n){return H(function(t,e){let r,n,o;const i=[];for(let a=0;a<t.length&&!((e-=2)<0);++a)r=t.charCodeAt(a),n=r>>8,o=r%256,i.push(o),i.push(n);return i}(e,t.length-r),t,r,n)}function x(t,e,r){return 0===e&&r===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(e,r))}function I(t,e,r){r=Math.min(t.length,r);const n=[];let o=e;for(;o<r;){const e=t[o];let i=null,a=e>239?4:e>223?3:e>191?2:1;if(o+a<=r){let r,n,s,u;switch(a){case 1:e<128&&(i=e);break;case 2:r=t[o+1],128==(192&r)&&(u=(31&e)<<6|63&r,u>127&&(i=u));break;case 3:r=t[o+1],n=t[o+2],128==(192&r)&&128==(192&n)&&(u=(15&e)<<12|(63&r)<<6|63&n,u>2047&&(u<55296||u>57343)&&(i=u));break;case 4:r=t[o+1],n=t[o+2],s=t[o+3],128==(192&r)&&128==(192&n)&&128==(192&s)&&(u=(15&e)<<18|(63&r)<<12|(63&n)<<6|63&s,u>65535&&u<1114112&&(i=u))}}null===i?(i=65533,a=1):i>65535&&(i-=65536,n.push(i>>>10&1023|55296),i=56320|1023&i),n.push(i),o+=a}return function(t){const e=t.length;if(e<=k)return String.fromCharCode.apply(String,t);let r="",n=0;for(;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=k));return r}(n)}e.kMaxLength=a,u.TYPED_ARRAY_SUPPORT=function(){try{const t=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(t,e),42===t.foo()}catch(t){return!1}}(),u.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(u.prototype,"parent",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.buffer}}),Object.defineProperty(u.prototype,"offset",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.byteOffset}}),u.poolSize=8192,u.from=function(t,e,r){return c(t,e,r)},Object.setPrototypeOf(u.prototype,Uint8Array.prototype),Object.setPrototypeOf(u,Uint8Array),u.alloc=function(t,e,r){return function(t,e,r){return l(t),t<=0?s(t):void 0!==e?"string"==typeof r?s(t).fill(e,r):s(t).fill(e):s(t)}(t,e,r)},u.allocUnsafe=function(t){return f(t)},u.allocUnsafeSlow=function(t){return f(t)},u.isBuffer=function(t){return null!=t&&!0===t._isBuffer&&t!==u.prototype},u.compare=function(t,e){if(q(t,Uint8Array)&&(t=u.from(t,t.offset,t.byteLength)),q(e,Uint8Array)&&(e=u.from(e,e.offset,e.byteLength)),!u.isBuffer(t)||!u.isBuffer(e))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===e)return 0;let r=t.length,n=e.length;for(let o=0,i=Math.min(r,n);o<i;++o)if(t[o]!==e[o]){r=t[o],n=e[o];break}return r<n?-1:n<r?1:0},u.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},u.concat=function(t,e){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return u.alloc(0);let r;if(void 0===e)for(e=0,r=0;r<t.length;++r)e+=t[r].length;const n=u.allocUnsafe(e);let o=0;for(r=0;r<t.length;++r){let e=t[r];if(q(e,Uint8Array))o+e.length>n.length?(u.isBuffer(e)||(e=u.from(e)),e.copy(n,o)):Uint8Array.prototype.set.call(n,e,o);else{if(!u.isBuffer(e))throw new TypeError('"list" argument must be an Array of Buffers');e.copy(n,o)}o+=e.length}return n},u.byteLength=d,u.prototype._isBuffer=!0,u.prototype.swap16=function(){const t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let e=0;e<t;e+=2)m(this,e,e+1);return this},u.prototype.swap32=function(){const t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let e=0;e<t;e+=4)m(this,e,e+3),m(this,e+1,e+2);return this},u.prototype.swap64=function(){const t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let e=0;e<t;e+=8)m(this,e,e+7),m(this,e+1,e+6),m(this,e+2,e+5),m(this,e+3,e+4);return this},u.prototype.toString=function(){const t=this.length;return 0===t?"":0===arguments.length?I(this,0,t):g.apply(this,arguments)},u.prototype.toLocaleString=u.prototype.toString,u.prototype.equals=function(t){if(!u.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===u.compare(this,t)},u.prototype.inspect=function(){let t="";const r=e.INSPECT_MAX_BYTES;return t=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(t+=" ... "),"<Buffer "+t+">"},i&&(u.prototype[i]=u.prototype.inspect),u.prototype.compare=function(t,e,r,n,o){if(q(t,Uint8Array)&&(t=u.from(t,t.offset,t.byteLength)),!u.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===o&&(o=this.length),e<0||r>t.length||n<0||o>this.length)throw new RangeError("out of range index");if(n>=o&&e>=r)return 0;if(n>=o)return-1;if(e>=r)return 1;if(this===t)return 0;let i=(o>>>=0)-(n>>>=0),a=(r>>>=0)-(e>>>=0);const s=Math.min(i,a),c=this.slice(n,o),l=t.slice(e,r);for(let t=0;t<s;++t)if(c[t]!==l[t]){i=c[t],a=l[t];break}return i<a?-1:a<i?1:0},u.prototype.includes=function(t,e,r){return-1!==this.indexOf(t,e,r)},u.prototype.indexOf=function(t,e,r){return b(this,t,e,r,!0)},u.prototype.lastIndexOf=function(t,e,r){return b(this,t,e,r,!1)},u.prototype.write=function(t,e,r,n){if(void 0===e)n="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)n=e,r=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}const o=this.length-e;if((void 0===r||r>o)&&(r=o),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let i=!1;for(;;)switch(n){case"hex":return v(this,t,e,r);case"utf8":case"utf-8":return S(this,t,e,r);case"ascii":case"latin1":case"binary":return A(this,t,e,r);case"base64":return E(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return M(this,t,e,r);default:if(i)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),i=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const k=4096;function O(t,e,r){let n="";r=Math.min(t.length,r);for(let o=e;o<r;++o)n+=String.fromCharCode(127&t[o]);return n}function P(t,e,r){let n="";r=Math.min(t.length,r);for(let o=e;o<r;++o)n+=String.fromCharCode(t[o]);return n}function T(t,e,r){const n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);let o="";for(let n=e;n<r;++n)o+=K[t[n]];return o}function C(t,e,r){const n=t.slice(e,r);let o="";for(let t=0;t<n.length-1;t+=2)o+=String.fromCharCode(n[t]+256*n[t+1]);return o}function L(t,e,r){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}function B(t,e,r,n,o,i){if(!u.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>o||e<i)throw new RangeError('"value" argument is out of bounds');if(r+n>t.length)throw new RangeError("Index out of range")}function _(t,e,r,n,o){V(e,n,o,t,r,7);let i=Number(e&BigInt(4294967295));t[r++]=i,i>>=8,t[r++]=i,i>>=8,t[r++]=i,i>>=8,t[r++]=i;let a=Number(e>>BigInt(32)&BigInt(4294967295));return t[r++]=a,a>>=8,t[r++]=a,a>>=8,t[r++]=a,a>>=8,t[r++]=a,r}function R(t,e,r,n,o){V(e,n,o,t,r,7);let i=Number(e&BigInt(4294967295));t[r+7]=i,i>>=8,t[r+6]=i,i>>=8,t[r+5]=i,i>>=8,t[r+4]=i;let a=Number(e>>BigInt(32)&BigInt(4294967295));return t[r+3]=a,a>>=8,t[r+2]=a,a>>=8,t[r+1]=a,a>>=8,t[r]=a,r+8}function N(t,e,r,n,o,i){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function U(t,e,r,n,i){return e=+e,r>>>=0,i||N(t,0,r,4),o.write(t,e,r,n,23,4),r+4}function F(t,e,r,n,i){return e=+e,r>>>=0,i||N(t,0,r,8),o.write(t,e,r,n,52,8),r+8}u.prototype.slice=function(t,e){const r=this.length;(t=~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),(e=void 0===e?r:~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),e<t&&(e=t);const n=this.subarray(t,e);return Object.setPrototypeOf(n,u.prototype),n},u.prototype.readUintLE=u.prototype.readUIntLE=function(t,e,r){t>>>=0,e>>>=0,r||L(t,e,this.length);let n=this[t],o=1,i=0;for(;++i<e&&(o*=256);)n+=this[t+i]*o;return n},u.prototype.readUintBE=u.prototype.readUIntBE=function(t,e,r){t>>>=0,e>>>=0,r||L(t,e,this.length);let n=this[t+--e],o=1;for(;e>0&&(o*=256);)n+=this[t+--e]*o;return n},u.prototype.readUint8=u.prototype.readUInt8=function(t,e){return t>>>=0,e||L(t,1,this.length),this[t]},u.prototype.readUint16LE=u.prototype.readUInt16LE=function(t,e){return t>>>=0,e||L(t,2,this.length),this[t]|this[t+1]<<8},u.prototype.readUint16BE=u.prototype.readUInt16BE=function(t,e){return t>>>=0,e||L(t,2,this.length),this[t]<<8|this[t+1]},u.prototype.readUint32LE=u.prototype.readUInt32LE=function(t,e){return t>>>=0,e||L(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},u.prototype.readUint32BE=u.prototype.readUInt32BE=function(t,e){return t>>>=0,e||L(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},u.prototype.readBigUInt64LE=X((function(t){W(t>>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||z(t,this.length-8);const n=e+256*this[++t]+65536*this[++t]+this[++t]*2**24,o=this[++t]+256*this[++t]+65536*this[++t]+r*2**24;return BigInt(n)+(BigInt(o)<<BigInt(32))})),u.prototype.readBigUInt64BE=X((function(t){W(t>>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||z(t,this.length-8);const n=e*2**24+65536*this[++t]+256*this[++t]+this[++t],o=this[++t]*2**24+65536*this[++t]+256*this[++t]+r;return(BigInt(n)<<BigInt(32))+BigInt(o)})),u.prototype.readIntLE=function(t,e,r){t>>>=0,e>>>=0,r||L(t,e,this.length);let n=this[t],o=1,i=0;for(;++i<e&&(o*=256);)n+=this[t+i]*o;return o*=128,n>=o&&(n-=Math.pow(2,8*e)),n},u.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||L(t,e,this.length);let n=e,o=1,i=this[t+--n];for(;n>0&&(o*=256);)i+=this[t+--n]*o;return o*=128,i>=o&&(i-=Math.pow(2,8*e)),i},u.prototype.readInt8=function(t,e){return t>>>=0,e||L(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},u.prototype.readInt16LE=function(t,e){t>>>=0,e||L(t,2,this.length);const r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt16BE=function(t,e){t>>>=0,e||L(t,2,this.length);const r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt32LE=function(t,e){return t>>>=0,e||L(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},u.prototype.readInt32BE=function(t,e){return t>>>=0,e||L(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},u.prototype.readBigInt64LE=X((function(t){W(t>>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||z(t,this.length-8);const n=this[t+4]+256*this[t+5]+65536*this[t+6]+(r<<24);return(BigInt(n)<<BigInt(32))+BigInt(e+256*this[++t]+65536*this[++t]+this[++t]*2**24)})),u.prototype.readBigInt64BE=X((function(t){W(t>>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||z(t,this.length-8);const n=(e<<24)+65536*this[++t]+256*this[++t]+this[++t];return(BigInt(n)<<BigInt(32))+BigInt(this[++t]*2**24+65536*this[++t]+256*this[++t]+r)})),u.prototype.readFloatLE=function(t,e){return t>>>=0,e||L(t,4,this.length),o.read(this,t,!0,23,4)},u.prototype.readFloatBE=function(t,e){return t>>>=0,e||L(t,4,this.length),o.read(this,t,!1,23,4)},u.prototype.readDoubleLE=function(t,e){return t>>>=0,e||L(t,8,this.length),o.read(this,t,!0,52,8)},u.prototype.readDoubleBE=function(t,e){return t>>>=0,e||L(t,8,this.length),o.read(this,t,!1,52,8)},u.prototype.writeUintLE=u.prototype.writeUIntLE=function(t,e,r,n){t=+t,e>>>=0,r>>>=0,n||B(this,t,e,r,Math.pow(2,8*r)-1,0);let o=1,i=0;for(this[e]=255&t;++i<r&&(o*=256);)this[e+i]=t/o&255;return e+r},u.prototype.writeUintBE=u.prototype.writeUIntBE=function(t,e,r,n){t=+t,e>>>=0,r>>>=0,n||B(this,t,e,r,Math.pow(2,8*r)-1,0);let o=r-1,i=1;for(this[e+o]=255&t;--o>=0&&(i*=256);)this[e+o]=t/i&255;return e+r},u.prototype.writeUint8=u.prototype.writeUInt8=function(t,e,r){return t=+t,e>>>=0,r||B(this,t,e,1,255,0),this[e]=255&t,e+1},u.prototype.writeUint16LE=u.prototype.writeUInt16LE=function(t,e,r){return t=+t,e>>>=0,r||B(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},u.prototype.writeUint16BE=u.prototype.writeUInt16BE=function(t,e,r){return t=+t,e>>>=0,r||B(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},u.prototype.writeUint32LE=u.prototype.writeUInt32LE=function(t,e,r){return t=+t,e>>>=0,r||B(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},u.prototype.writeUint32BE=u.prototype.writeUInt32BE=function(t,e,r){return t=+t,e>>>=0,r||B(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},u.prototype.writeBigUInt64LE=X((function(t,e=0){return _(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))})),u.prototype.writeBigUInt64BE=X((function(t,e=0){return R(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))})),u.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e>>>=0,!n){const n=Math.pow(2,8*r-1);B(this,t,e,r,n-1,-n)}let o=0,i=1,a=0;for(this[e]=255&t;++o<r&&(i*=256);)t<0&&0===a&&0!==this[e+o-1]&&(a=1),this[e+o]=(t/i|0)-a&255;return e+r},u.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e>>>=0,!n){const n=Math.pow(2,8*r-1);B(this,t,e,r,n-1,-n)}let o=r-1,i=1,a=0;for(this[e+o]=255&t;--o>=0&&(i*=256);)t<0&&0===a&&0!==this[e+o+1]&&(a=1),this[e+o]=(t/i|0)-a&255;return e+r},u.prototype.writeInt8=function(t,e,r){return t=+t,e>>>=0,r||B(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},u.prototype.writeInt16LE=function(t,e,r){return t=+t,e>>>=0,r||B(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},u.prototype.writeInt16BE=function(t,e,r){return t=+t,e>>>=0,r||B(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},u.prototype.writeInt32LE=function(t,e,r){return t=+t,e>>>=0,r||B(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},u.prototype.writeInt32BE=function(t,e,r){return t=+t,e>>>=0,r||B(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},u.prototype.writeBigInt64LE=X((function(t,e=0){return _(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),u.prototype.writeBigInt64BE=X((function(t,e=0){return R(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),u.prototype.writeFloatLE=function(t,e,r){return U(this,t,e,!0,r)},u.prototype.writeFloatBE=function(t,e,r){return U(this,t,e,!1,r)},u.prototype.writeDoubleLE=function(t,e,r){return F(this,t,e,!0,r)},u.prototype.writeDoubleBE=function(t,e,r){return F(this,t,e,!1,r)},u.prototype.copy=function(t,e,r,n){if(!u.isBuffer(t))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e<n-r&&(n=t.length-e+r);const o=n-r;return this===t&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(e,r,n):Uint8Array.prototype.set.call(t,this.subarray(r,n),e),o},u.prototype.fill=function(t,e,r,n){if("string"==typeof t){if("string"==typeof e?(n=e,e=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!u.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===t.length){const e=t.charCodeAt(0);("utf8"===n&&e<128||"latin1"===n)&&(t=e)}}else"number"==typeof t?t&=255:"boolean"==typeof t&&(t=Number(t));if(e<0||this.length<e||this.length<r)throw new RangeError("Out of range index");if(r<=e)return this;let o;if(e>>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(o=e;o<r;++o)this[o]=t;else{const i=u.isBuffer(t)?t:u.from(t,n),a=i.length;if(0===a)throw new TypeError('The value "'+t+'" is invalid for argument "value"');for(o=0;o<r-e;++o)this[o+e]=i[o%a]}return this};const D={};function $(t,e,r){D[t]=class extends r{constructor(){super(),Object.defineProperty(this,"message",{value:e.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${t}]`,this.stack,delete this.name}get code(){return t}set code(t){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:t,writable:!0})}toString(){return`${this.name} [${t}]: ${this.message}`}}}function j(t){let e="",r=t.length;const n="-"===t[0]?1:0;for(;r>=n+4;r-=3)e=`_${t.slice(r-3,r)}${e}`;return`${t.slice(0,r)}${e}`}function V(t,e,r,n,o,i){if(t>r||t<e){const n="bigint"==typeof e?"n":"";let o;throw o=i>3?0===e||e===BigInt(0)?`>= 0${n} and < 2${n} ** ${8*(i+1)}${n}`:`>= -(2${n} ** ${8*(i+1)-1}${n}) and < 2 ** ${8*(i+1)-1}${n}`:`>= ${e}${n} and <= ${r}${n}`,new D.ERR_OUT_OF_RANGE("value",o,t)}!function(t,e,r){W(e,"offset"),void 0!==t[e]&&void 0!==t[e+r]||z(e,t.length-(r+1))}(n,o,i)}function W(t,e){if("number"!=typeof t)throw new D.ERR_INVALID_ARG_TYPE(e,"number",t)}function z(t,e,r){if(Math.floor(t)!==t)throw W(t,r),new D.ERR_OUT_OF_RANGE(r||"offset","an integer",t);if(e<0)throw new D.ERR_BUFFER_OUT_OF_BOUNDS;throw new D.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${e}`,t)}$("ERR_BUFFER_OUT_OF_BOUNDS",(function(t){return t?`${t} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),$("ERR_INVALID_ARG_TYPE",(function(t,e){return`The "${t}" argument must be of type number. Received type ${typeof e}`}),TypeError),$("ERR_OUT_OF_RANGE",(function(t,e,r){let n=`The value of "${t}" is out of range.`,o=r;return Number.isInteger(r)&&Math.abs(r)>2**32?o=j(String(r)):"bigint"==typeof r&&(o=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(o=j(o)),o+="n"),n+=` It must be ${e}. Received ${o}`,n}),RangeError);const G=/[^+/0-9A-Za-z-_]/g;function Z(t,e){let r;e=e||1/0;const n=t.length;let o=null;const i=[];for(let a=0;a<n;++a){if(r=t.charCodeAt(a),r>55295&&r<57344){if(!o){if(r>56319){(e-=3)>-1&&i.push(239,191,189);continue}if(a+1===n){(e-=3)>-1&&i.push(239,191,189);continue}o=r;continue}if(r<56320){(e-=3)>-1&&i.push(239,191,189),o=r;continue}r=65536+(o-55296<<10|r-56320)}else o&&(e-=3)>-1&&i.push(239,191,189);if(o=null,r<128){if((e-=1)<0)break;i.push(r)}else if(r<2048){if((e-=2)<0)break;i.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;i.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return i}function J(t){return n.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(G,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function H(t,e,r,n){let o;for(o=0;o<n&&!(o+r>=e.length||o>=t.length);++o)e[o+r]=t[o];return o}function q(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function Y(t){return t!=t}const K=function(){const t="0123456789abcdef",e=new Array(256);for(let r=0;r<16;++r){const n=16*r;for(let o=0;o<16;++o)e[n+o]=t[r]+t[o]}return e}();function X(t){return"undefined"==typeof BigInt?Q:t}function Q(){throw new Error("BigInt not supported")}},3144:(t,e,r)=>{"use strict";var n=r(6743),o=r(1002),i=r(76),a=r(7119);t.exports=a||n.call(i,o)},2205:(t,e,r)=>{"use strict";var n=r(6743),o=r(1002),i=r(3144);t.exports=function(){return i(n,o,arguments)}},1002:t=>{"use strict";t.exports=Function.prototype.apply},76:t=>{"use strict";t.exports=Function.prototype.call},3126:(t,e,r)=>{"use strict";var n=r(6743),o=r(9675),i=r(76),a=r(3144);t.exports=function(t){if(t.length<1||"function"!=typeof t[0])throw new o("a function is required");return a(n,i,t)}},7119:t=>{"use strict";t.exports="undefined"!=typeof Reflect&&Reflect&&Reflect.apply},487:(t,e,r)=>{"use strict";var n=r(6897),o=r(655),i=r(3126),a=r(2205);t.exports=function(t){var e=i(arguments),r=t.length-(arguments.length-1);return n(e,1+(r>0?r:0),!0)},o?o(t.exports,"apply",{value:a}):t.exports.apply=a},6556:(t,e,r)=>{"use strict";var n=r(453),o=r(3126),i=o([n("%String.prototype.indexOf%")]);t.exports=function(t,e){var r=n(t,!!e);return"function"==typeof r&&i(t,".prototype.")>-1?o([r]):r}},41:(t,e,r)=>{"use strict";var n=r(655),o=r(8068),i=r(9675),a=r(5795);t.exports=function(t,e,r){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new i("`obj` must be an object or a function`");if("string"!=typeof e&&"symbol"!=typeof e)throw new i("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new i("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new i("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new i("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new i("`loose`, if provided, must be a boolean");var s=arguments.length>3?arguments[3]:null,u=arguments.length>4?arguments[4]:null,c=arguments.length>5?arguments[5]:null,l=arguments.length>6&&arguments[6],f=!!a&&a(t,e);if(n)n(t,e,{configurable:null===c&&f?f.configurable:!c,enumerable:null===s&&f?f.enumerable:!s,value:r,writable:null===u&&f?f.writable:!u});else{if(!l&&(s||u||c))throw new o("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");t[e]=r}}},7176:(t,e,r)=>{"use strict";var n,o=r(3126),i=r(5795);try{n=[].__proto__===Array.prototype}catch(t){if(!t||"object"!=typeof t||!("code"in t)||"ERR_PROTO_ACCESS"!==t.code)throw t}var a=!!n&&i&&i(Object.prototype,"__proto__"),s=Object,u=s.getPrototypeOf;t.exports=a&&"function"==typeof a.get?o([a.get]):"function"==typeof u&&function(t){return u(null==t?t:s(t))}},655:t=>{"use strict";var e=Object.defineProperty||!1;if(e)try{e({},"a",{value:1})}catch(t){e=!1}t.exports=e},1237:t=>{"use strict";t.exports=EvalError},9383:t=>{"use strict";t.exports=Error},9290:t=>{"use strict";t.exports=RangeError},9538:t=>{"use strict";t.exports=ReferenceError},8068:t=>{"use strict";t.exports=SyntaxError},9675:t=>{"use strict";t.exports=TypeError},5345:t=>{"use strict";t.exports=URIError},9612:t=>{"use strict";t.exports=Object},2682:(t,e,r)=>{"use strict";var n=r(9600),o=Object.prototype.toString,i=Object.prototype.hasOwnProperty;t.exports=function(t,e,r){if(!n(e))throw new TypeError("iterator must be a function");var a;arguments.length>=3&&(a=r),"[object Array]"===o.call(t)?function(t,e,r){for(var n=0,o=t.length;n<o;n++)i.call(t,n)&&(null==r?e(t[n],n,t):e.call(r,t[n],n,t))}(t,e,a):"string"==typeof t?function(t,e,r){for(var n=0,o=t.length;n<o;n++)null==r?e(t.charAt(n),n,t):e.call(r,t.charAt(n),n,t)}(t,e,a):function(t,e,r){for(var n in t)i.call(t,n)&&(null==r?e(t[n],n,t):e.call(r,t[n],n,t))}(t,e,a)}},9353:t=>{"use strict";var e=Object.prototype.toString,r=Math.max,n=function(t,e){for(var r=[],n=0;n<t.length;n+=1)r[n]=t[n];for(var o=0;o<e.length;o+=1)r[o+t.length]=e[o];return r};t.exports=function(t){var o=this;if("function"!=typeof o||"[object Function]"!==e.apply(o))throw new TypeError("Function.prototype.bind called on incompatible "+o);for(var i,a=function(t){for(var e=[],r=1,n=0;r<t.length;r+=1,n+=1)e[n]=t[r];return e}(arguments),s=r(0,o.length-a.length),u=[],c=0;c<s;c++)u[c]="$"+c;if(i=Function("binder","return function ("+function(t){for(var e="",r=0;r<t.length;r+=1)e+=t[r],r+1<t.length&&(e+=",");return e}(u)+"){ return binder.apply(this,arguments); }")((function(){if(this instanceof i){var e=o.apply(this,n(a,arguments));return Object(e)===e?e:this}return o.apply(t,n(a,arguments))})),o.prototype){var l=function(){};l.prototype=o.prototype,i.prototype=new l,l.prototype=null}return i}},6743:(t,e,r)=>{"use strict";var n=r(9353);t.exports=Function.prototype.bind||n},453:(t,e,r)=>{"use strict";var n,o=r(9612),i=r(9383),a=r(1237),s=r(9290),u=r(9538),c=r(8068),l=r(9675),f=r(5345),p=r(1514),h=r(8968),y=r(6188),d=r(8002),g=r(5880),m=r(414),b=r(3093),w=Function,v=function(t){try{return w('"use strict"; return ('+t+").constructor;")()}catch(t){}},S=r(5795),A=r(655),E=function(){throw new l},M=S?function(){try{return E}catch(t){try{return S(arguments,"callee").get}catch(t){return E}}}():E,x=r(4039)(),I=r(3628),k=r(1064),O=r(8648),P=r(1002),T=r(76),C={},L="undefined"!=typeof Uint8Array&&I?I(Uint8Array):n,B={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?n:ArrayBuffer,"%ArrayIteratorPrototype%":x&&I?I([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":C,"%AsyncGenerator%":C,"%AsyncGeneratorFunction%":C,"%AsyncIteratorPrototype%":C,"%Atomics%":"undefined"==typeof Atomics?n:Atomics,"%BigInt%":"undefined"==typeof BigInt?n:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?n:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?n:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?n:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":i,"%eval%":eval,"%EvalError%":a,"%Float32Array%":"undefined"==typeof Float32Array?n:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?n:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?n:FinalizationRegistry,"%Function%":w,"%GeneratorFunction%":C,"%Int8Array%":"undefined"==typeof Int8Array?n:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?n:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":x&&I?I(I([][Symbol.iterator]())):n,"%JSON%":"object"==typeof JSON?JSON:n,"%Map%":"undefined"==typeof Map?n:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&x&&I?I((new Map)[Symbol.iterator]()):n,"%Math%":Math,"%Number%":Number,"%Object%":o,"%Object.getOwnPropertyDescriptor%":S,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?n:Promise,"%Proxy%":"undefined"==typeof Proxy?n:Proxy,"%RangeError%":s,"%ReferenceError%":u,"%Reflect%":"undefined"==typeof Reflect?n:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?n:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&x&&I?I((new Set)[Symbol.iterator]()):n,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":x&&I?I(""[Symbol.iterator]()):n,"%Symbol%":x?Symbol:n,"%SyntaxError%":c,"%ThrowTypeError%":M,"%TypedArray%":L,"%TypeError%":l,"%Uint8Array%":"undefined"==typeof Uint8Array?n:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?n:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?n:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?n:Uint32Array,"%URIError%":f,"%WeakMap%":"undefined"==typeof WeakMap?n:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?n:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?n:WeakSet,"%Function.prototype.call%":T,"%Function.prototype.apply%":P,"%Object.defineProperty%":A,"%Object.getPrototypeOf%":k,"%Math.abs%":p,"%Math.floor%":h,"%Math.max%":y,"%Math.min%":d,"%Math.pow%":g,"%Math.round%":m,"%Math.sign%":b,"%Reflect.getPrototypeOf%":O};if(I)try{null.error}catch(t){var _=I(I(t));B["%Error.prototype%"]=_}var R=function t(e){var r;if("%AsyncFunction%"===e)r=v("async function () {}");else if("%GeneratorFunction%"===e)r=v("function* () {}");else if("%AsyncGeneratorFunction%"===e)r=v("async function* () {}");else if("%AsyncGenerator%"===e){var n=t("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if("%AsyncIteratorPrototype%"===e){var o=t("%AsyncGenerator%");o&&I&&(r=I(o.prototype))}return B[e]=r,r},N={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},U=r(6743),F=r(9957),D=U.call(T,Array.prototype.concat),$=U.call(P,Array.prototype.splice),j=U.call(T,String.prototype.replace),V=U.call(T,String.prototype.slice),W=U.call(T,RegExp.prototype.exec),z=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,G=/\\(\\)?/g,Z=function(t,e){var r,n=t;if(F(N,n)&&(n="%"+(r=N[n])[0]+"%"),F(B,n)){var o=B[n];if(o===C&&(o=R(n)),void 0===o&&!e)throw new l("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:o}}throw new c("intrinsic "+t+" does not exist!")};t.exports=function(t,e){if("string"!=typeof t||0===t.length)throw new l("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof e)throw new l('"allowMissing" argument must be a boolean');if(null===W(/^%?[^%]*%?$/,t))throw new c("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=function(t){var e=V(t,0,1),r=V(t,-1);if("%"===e&&"%"!==r)throw new c("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==e)throw new c("invalid intrinsic syntax, expected opening `%`");var n=[];return j(t,z,(function(t,e,r,o){n[n.length]=r?j(o,G,"$1"):e||t})),n}(t),n=r.length>0?r[0]:"",o=Z("%"+n+"%",e),i=o.name,a=o.value,s=!1,u=o.alias;u&&(n=u[0],$(r,D([0,1],u)));for(var f=1,p=!0;f<r.length;f+=1){var h=r[f],y=V(h,0,1),d=V(h,-1);if(('"'===y||"'"===y||"`"===y||'"'===d||"'"===d||"`"===d)&&y!==d)throw new c("property names with quotes must have matching quotes");if("constructor"!==h&&p||(s=!0),F(B,i="%"+(n+="."+h)+"%"))a=B[i];else if(null!=a){if(!(h in a)){if(!e)throw new l("base intrinsic for "+t+" exists, but the property is not available.");return}if(S&&f+1>=r.length){var g=S(a,h);a=(p=!!g)&&"get"in g&&!("originalValue"in g.get)?g.get:a[h]}else p=F(a,h),a=a[h];p&&!s&&(B[i]=a)}}return a}},1064:(t,e,r)=>{"use strict";var n=r(9612);t.exports=n.getPrototypeOf||null},8648:t=>{"use strict";t.exports="undefined"!=typeof Reflect&&Reflect.getPrototypeOf||null},3628:(t,e,r)=>{"use strict";var n=r(8648),o=r(1064),i=r(7176);t.exports=n?function(t){return n(t)}:o?function(t){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new TypeError("getProto: not an object");return o(t)}:i?function(t){return i(t)}:null},6549:t=>{"use strict";t.exports=Object.getOwnPropertyDescriptor},5795:(t,e,r)=>{"use strict";var n=r(6549);if(n)try{n([],"length")}catch(t){n=null}t.exports=n},592:(t,e,r)=>{"use strict";var n=r(655),o=function(){return!!n};o.hasArrayLengthDefineBug=function(){if(!n)return null;try{return 1!==n([],"length",{value:1}).length}catch(t){return!0}},t.exports=o},4039:(t,e,r)=>{"use strict";var n="undefined"!=typeof Symbol&&Symbol,o=r(1333);t.exports=function(){return"function"==typeof n&&"function"==typeof Symbol&&"symbol"==typeof n("foo")&&"symbol"==typeof Symbol("bar")&&o()}},1333:t=>{"use strict";t.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var t={},e=Symbol("test"),r=Object(e);if("string"==typeof e)return!1;if("[object Symbol]"!==Object.prototype.toString.call(e))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(var n in t[e]=42,t)return!1;if("function"==typeof Object.keys&&0!==Object.keys(t).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(t).length)return!1;var o=Object.getOwnPropertySymbols(t);if(1!==o.length||o[0]!==e)return!1;if(!Object.prototype.propertyIsEnumerable.call(t,e))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var i=Object.getOwnPropertyDescriptor(t,e);if(42!==i.value||!0!==i.enumerable)return!1}return!0}},9092:(t,e,r)=>{"use strict";var n=r(1333);t.exports=function(){return n()&&!!Symbol.toStringTag}},9957:(t,e,r)=>{"use strict";var n=Function.prototype.call,o=Object.prototype.hasOwnProperty,i=r(6743);t.exports=i.call(n,o)},251:(t,e)=>{e.read=function(t,e,r,n,o){var i,a,s=8*o-n-1,u=(1<<s)-1,c=u>>1,l=-7,f=r?o-1:0,p=r?-1:1,h=t[e+f];for(f+=p,i=h&(1<<-l)-1,h>>=-l,l+=s;l>0;i=256*i+t[e+f],f+=p,l-=8);for(a=i&(1<<-l)-1,i>>=-l,l+=n;l>0;a=256*a+t[e+f],f+=p,l-=8);if(0===i)i=1-c;else{if(i===u)return a?NaN:1/0*(h?-1:1);a+=Math.pow(2,n),i-=c}return(h?-1:1)*a*Math.pow(2,i-n)},e.write=function(t,e,r,n,o,i){var a,s,u,c=8*i-o-1,l=(1<<c)-1,f=l>>1,p=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,h=n?0:i-1,y=n?1:-1,d=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=l):(a=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-a))<1&&(a--,u*=2),(e+=a+f>=1?p/u:p*Math.pow(2,1-f))*u>=2&&(a++,u/=2),a+f>=l?(s=0,a=l):a+f>=1?(s=(e*u-1)*Math.pow(2,o),a+=f):(s=e*Math.pow(2,f-1)*Math.pow(2,o),a=0));o>=8;t[r+h]=255&s,h+=y,s/=256,o-=8);for(a=a<<o|s,c+=o;c>0;t[r+h]=255&a,h+=y,a/=256,c-=8);t[r+h-y]|=128*d}},6698:t=>{"function"==typeof Object.create?t.exports=function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(t,e){if(e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}}},7244:(t,e,r)=>{"use strict";var n=r(9092)(),o=r(6556)("Object.prototype.toString"),i=function(t){return!(n&&t&&"object"==typeof t&&Symbol.toStringTag in t)&&"[object Arguments]"===o(t)},a=function(t){return!!i(t)||null!==t&&"object"==typeof t&&"length"in t&&"number"==typeof t.length&&t.length>=0&&"[object Array]"!==o(t)&&"callee"in t&&"[object Function]"===o(t.callee)},s=function(){return i(arguments)}();i.isLegacyArguments=a,t.exports=s?i:a},9600:t=>{"use strict";var e,r,n=Function.prototype.toString,o="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof o&&"function"==typeof Object.defineProperty)try{e=Object.defineProperty({},"length",{get:function(){throw r}}),r={},o((function(){throw 42}),null,e)}catch(t){t!==r&&(o=null)}else o=null;var i=/^\s*class\b/,a=function(t){try{var e=n.call(t);return i.test(e)}catch(t){return!1}},s=function(t){try{return!a(t)&&(n.call(t),!0)}catch(t){return!1}},u=Object.prototype.toString,c="function"==typeof Symbol&&!!Symbol.toStringTag,l=!(0 in[,]),f=function(){return!1};if("object"==typeof document){var p=document.all;u.call(p)===u.call(document.all)&&(f=function(t){if((l||!t)&&(void 0===t||"object"==typeof t))try{var e=u.call(t);return("[object HTMLAllCollection]"===e||"[object HTML document.all class]"===e||"[object HTMLCollection]"===e||"[object Object]"===e)&&null==t("")}catch(t){}return!1})}t.exports=o?function(t){if(f(t))return!0;if(!t)return!1;if("function"!=typeof t&&"object"!=typeof t)return!1;try{o(t,null,e)}catch(t){if(t!==r)return!1}return!a(t)&&s(t)}:function(t){if(f(t))return!0;if(!t)return!1;if("function"!=typeof t&&"object"!=typeof t)return!1;if(c)return s(t);if(a(t))return!1;var e=u.call(t);return!("[object Function]"!==e&&"[object GeneratorFunction]"!==e&&!/^\[object HTML/.test(e))&&s(t)}},8184:(t,e,r)=>{"use strict";var n,o=r(6556),i=r(9721)(/^\s*(?:function)?\*/),a=r(9092)(),s=r(3628),u=o("Object.prototype.toString"),c=o("Function.prototype.toString");t.exports=function(t){if("function"!=typeof t)return!1;if(i(c(t)))return!0;if(!a)return"[object GeneratorFunction]"===u(t);if(!s)return!1;if(void 0===n){var e=function(){if(!a)return!1;try{return Function("return function*() {}")()}catch(t){}}();n=!!e&&s(e)}return s(t)===n}},4035:(t,e,r)=>{"use strict";var n,o=r(6556),i=r(9092)(),a=r(9957),s=r(5795);if(i){var u=o("RegExp.prototype.exec"),c={},l=function(){throw c},f={toString:l,valueOf:l};"symbol"==typeof Symbol.toPrimitive&&(f[Symbol.toPrimitive]=l),n=function(t){if(!t||"object"!=typeof t)return!1;var e=s(t,"lastIndex");if(!e||!a(e,"value"))return!1;try{u(t,f)}catch(t){return t===c}}}else{var p=o("Object.prototype.toString");n=function(t){return!(!t||"object"!=typeof t&&"function"!=typeof t)&&"[object RegExp]"===p(t)}}t.exports=n},5680:(t,e,r)=>{"use strict";var n=r(5767);t.exports=function(t){return!!n(t)}},1514:t=>{"use strict";t.exports=Math.abs},8968:t=>{"use strict";t.exports=Math.floor},4459:t=>{"use strict";t.exports=Number.isNaN||function(t){return t!=t}},6188:t=>{"use strict";t.exports=Math.max},8002:t=>{"use strict";t.exports=Math.min},5880:t=>{"use strict";t.exports=Math.pow},414:t=>{"use strict";t.exports=Math.round},3093:(t,e,r)=>{"use strict";var n=r(4459);t.exports=function(t){return n(t)||0===t?t:t<0?-1:1}},6578:t=>{"use strict";t.exports=["Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]},5606:t=>{var e,r,n=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function a(t){if(e===setTimeout)return setTimeout(t,0);if((e===o||!e)&&setTimeout)return e=setTimeout,setTimeout(t,0);try{return e(t,0)}catch(r){try{return e.call(null,t,0)}catch(r){return e.call(this,t,0)}}}!function(){try{e="function"==typeof setTimeout?setTimeout:o}catch(t){e=o}try{r="function"==typeof clearTimeout?clearTimeout:i}catch(t){r=i}}();var s,u=[],c=!1,l=-1;function f(){c&&s&&(c=!1,s.length?u=s.concat(u):l=-1,u.length&&p())}function p(){if(!c){var t=a(f);c=!0;for(var e=u.length;e;){for(s=u,u=[];++l<e;)s&&s[l].run();l=-1,e=u.length}s=null,c=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===i||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{return r(t)}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(t)}}function h(t,e){this.fun=t,this.array=e}function y(){}n.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];u.push(new h(t,e)),1!==u.length||c||a(p)},h.prototype.run=function(){this.fun.apply(null,this.array)},n.title="browser",n.browser=!0,n.env={},n.argv=[],n.version="",n.versions={},n.on=y,n.addListener=y,n.once=y,n.off=y,n.removeListener=y,n.removeAllListeners=y,n.emit=y,n.prependListener=y,n.prependOnceListener=y,n.listeners=function(t){return[]},n.binding=function(t){throw new Error("process.binding is not supported")},n.cwd=function(){return"/"},n.chdir=function(t){throw new Error("process.chdir is not supported")},n.umask=function(){return 0}},9721:(t,e,r)=>{"use strict";var n=r(6556),o=r(4035),i=n("RegExp.prototype.exec"),a=r(9675);t.exports=function(t){if(!o(t))throw new a("`regex` must be a RegExp");return function(e){return null!==i(t,e)}}},6897:(t,e,r)=>{"use strict";var n=r(453),o=r(41),i=r(592)(),a=r(5795),s=r(9675),u=n("%Math.floor%");t.exports=function(t,e){if("function"!=typeof t)throw new s("`fn` is not a function");if("number"!=typeof e||e<0||e>4294967295||u(e)!==e)throw new s("`length` must be a positive 32-bit integer");var r=arguments.length>2&&!!arguments[2],n=!0,c=!0;if("length"in t&&a){var l=a(t,"length");l&&!l.configurable&&(n=!1),l&&!l.writable&&(c=!1)}return(n||c||!r)&&(i?o(t,"length",e,!0,!0):o(t,"length",e)),t}},1135:t=>{t.exports=function(t){return t&&"object"==typeof t&&"function"==typeof t.copy&&"function"==typeof t.fill&&"function"==typeof t.readUInt8}},9032:(t,e,r)=>{"use strict";var n=r(7244),o=r(8184),i=r(5767),a=r(5680);function s(t){return t.call.bind(t)}var u="undefined"!=typeof BigInt,c="undefined"!=typeof Symbol,l=s(Object.prototype.toString),f=s(Number.prototype.valueOf),p=s(String.prototype.valueOf),h=s(Boolean.prototype.valueOf);if(u)var y=s(BigInt.prototype.valueOf);if(c)var d=s(Symbol.prototype.valueOf);function g(t,e){if("object"!=typeof t)return!1;try{return e(t),!0}catch(t){return!1}}function m(t){return"[object Map]"===l(t)}function b(t){return"[object Set]"===l(t)}function w(t){return"[object WeakMap]"===l(t)}function v(t){return"[object WeakSet]"===l(t)}function S(t){return"[object ArrayBuffer]"===l(t)}function A(t){return"undefined"!=typeof ArrayBuffer&&(S.working?S(t):t instanceof ArrayBuffer)}function E(t){return"[object DataView]"===l(t)}function M(t){return"undefined"!=typeof DataView&&(E.working?E(t):t instanceof DataView)}e.isArgumentsObject=n,e.isGeneratorFunction=o,e.isTypedArray=a,e.isPromise=function(t){return"undefined"!=typeof Promise&&t instanceof Promise||null!==t&&"object"==typeof t&&"function"==typeof t.then&&"function"==typeof t.catch},e.isArrayBufferView=function(t){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):a(t)||M(t)},e.isUint8Array=function(t){return"Uint8Array"===i(t)},e.isUint8ClampedArray=function(t){return"Uint8ClampedArray"===i(t)},e.isUint16Array=function(t){return"Uint16Array"===i(t)},e.isUint32Array=function(t){return"Uint32Array"===i(t)},e.isInt8Array=function(t){return"Int8Array"===i(t)},e.isInt16Array=function(t){return"Int16Array"===i(t)},e.isInt32Array=function(t){return"Int32Array"===i(t)},e.isFloat32Array=function(t){return"Float32Array"===i(t)},e.isFloat64Array=function(t){return"Float64Array"===i(t)},e.isBigInt64Array=function(t){return"BigInt64Array"===i(t)},e.isBigUint64Array=function(t){return"BigUint64Array"===i(t)},m.working="undefined"!=typeof Map&&m(new Map),e.isMap=function(t){return"undefined"!=typeof Map&&(m.working?m(t):t instanceof Map)},b.working="undefined"!=typeof Set&&b(new Set),e.isSet=function(t){return"undefined"!=typeof Set&&(b.working?b(t):t instanceof Set)},w.working="undefined"!=typeof WeakMap&&w(new WeakMap),e.isWeakMap=function(t){return"undefined"!=typeof WeakMap&&(w.working?w(t):t instanceof WeakMap)},v.working="undefined"!=typeof WeakSet&&v(new WeakSet),e.isWeakSet=function(t){return v(t)},S.working="undefined"!=typeof ArrayBuffer&&S(new ArrayBuffer),e.isArrayBuffer=A,E.working="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView&&E(new DataView(new ArrayBuffer(1),0,1)),e.isDataView=M;var x="undefined"!=typeof SharedArrayBuffer?SharedArrayBuffer:void 0;function I(t){return"[object SharedArrayBuffer]"===l(t)}function k(t){return void 0!==x&&(void 0===I.working&&(I.working=I(new x)),I.working?I(t):t instanceof x)}function O(t){return g(t,f)}function P(t){return g(t,p)}function T(t){return g(t,h)}function C(t){return u&&g(t,y)}function L(t){return c&&g(t,d)}e.isSharedArrayBuffer=k,e.isAsyncFunction=function(t){return"[object AsyncFunction]"===l(t)},e.isMapIterator=function(t){return"[object Map Iterator]"===l(t)},e.isSetIterator=function(t){return"[object Set Iterator]"===l(t)},e.isGeneratorObject=function(t){return"[object Generator]"===l(t)},e.isWebAssemblyCompiledModule=function(t){return"[object WebAssembly.Module]"===l(t)},e.isNumberObject=O,e.isStringObject=P,e.isBooleanObject=T,e.isBigIntObject=C,e.isSymbolObject=L,e.isBoxedPrimitive=function(t){return O(t)||P(t)||T(t)||C(t)||L(t)},e.isAnyArrayBuffer=function(t){return"undefined"!=typeof Uint8Array&&(A(t)||k(t))},["isProxy","isExternal","isModuleNamespaceObject"].forEach((function(t){Object.defineProperty(e,t,{enumerable:!1,value:function(){throw new Error(t+" is not supported in userland")}})}))},537:(t,e,r)=>{var n=r(5606),o=Object.getOwnPropertyDescriptors||function(t){for(var e=Object.keys(t),r={},n=0;n<e.length;n++)r[e[n]]=Object.getOwnPropertyDescriptor(t,e[n]);return r},i=/%[sdj%]/g;e.format=function(t){if(!w(t)){for(var e=[],r=0;r<arguments.length;r++)e.push(c(arguments[r]));return e.join(" ")}r=1;for(var n=arguments,o=n.length,a=String(t).replace(i,(function(t){if("%%"===t)return"%";if(r>=o)return t;switch(t){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(t){return"[Circular]"}default:return t}})),s=n[r];r<o;s=n[++r])m(s)||!A(s)?a+=" "+s:a+=" "+c(s);return a},e.deprecate=function(t,r){if(void 0!==n&&!0===n.noDeprecation)return t;if(void 0===n)return function(){return e.deprecate(t,r).apply(this,arguments)};var o=!1;return function(){if(!o){if(n.throwDeprecation)throw new Error(r);n.traceDeprecation?console.trace(r):console.error(r),o=!0}return t.apply(this,arguments)}};var a={},s=/^$/;if(n.env.NODE_DEBUG){var u=n.env.NODE_DEBUG;u=u.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),s=new RegExp("^"+u+"$","i")}function c(t,r){var n={seen:[],stylize:f};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),g(r)?n.showHidden=r:r&&e._extend(n,r),v(n.showHidden)&&(n.showHidden=!1),v(n.depth)&&(n.depth=2),v(n.colors)&&(n.colors=!1),v(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=l),p(n,t,n.depth)}function l(t,e){var r=c.styles[e];return r?"["+c.colors[r][0]+"m"+t+"["+c.colors[r][1]+"m":t}function f(t,e){return t}function p(t,r,n){if(t.customInspect&&r&&x(r.inspect)&&r.inspect!==e.inspect&&(!r.constructor||r.constructor.prototype!==r)){var o=r.inspect(n,t);return w(o)||(o=p(t,o,n)),o}var i=function(t,e){if(v(e))return t.stylize("undefined","undefined");if(w(e)){var r="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(r,"string")}return b(e)?t.stylize(""+e,"number"):g(e)?t.stylize(""+e,"boolean"):m(e)?t.stylize("null","null"):void 0}(t,r);if(i)return i;var a=Object.keys(r),s=function(t){var e={};return t.forEach((function(t,r){e[t]=!0})),e}(a);if(t.showHidden&&(a=Object.getOwnPropertyNames(r)),M(r)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return h(r);if(0===a.length){if(x(r)){var u=r.name?": "+r.name:"";return t.stylize("[Function"+u+"]","special")}if(S(r))return t.stylize(RegExp.prototype.toString.call(r),"regexp");if(E(r))return t.stylize(Date.prototype.toString.call(r),"date");if(M(r))return h(r)}var c,l="",f=!1,A=["{","}"];return d(r)&&(f=!0,A=["[","]"]),x(r)&&(l=" [Function"+(r.name?": "+r.name:"")+"]"),S(r)&&(l=" "+RegExp.prototype.toString.call(r)),E(r)&&(l=" "+Date.prototype.toUTCString.call(r)),M(r)&&(l=" "+h(r)),0!==a.length||f&&0!=r.length?n<0?S(r)?t.stylize(RegExp.prototype.toString.call(r),"regexp"):t.stylize("[Object]","special"):(t.seen.push(r),c=f?function(t,e,r,n,o){for(var i=[],a=0,s=e.length;a<s;++a)P(e,String(a))?i.push(y(t,e,r,n,String(a),!0)):i.push("");return o.forEach((function(o){o.match(/^\d+$/)||i.push(y(t,e,r,n,o,!0))})),i}(t,r,n,s,a):a.map((function(e){return y(t,r,n,s,e,f)})),t.seen.pop(),function(t,e,r){return t.reduce((function(t,e){return e.indexOf("\n"),t+e.replace(/\u001b\[\d\d?m/g,"").length+1}),0)>60?r[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+r[1]:r[0]+e+" "+t.join(", ")+" "+r[1]}(c,l,A)):A[0]+l+A[1]}function h(t){return"["+Error.prototype.toString.call(t)+"]"}function y(t,e,r,n,o,i){var a,s,u;if((u=Object.getOwnPropertyDescriptor(e,o)||{value:e[o]}).get?s=u.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):u.set&&(s=t.stylize("[Setter]","special")),P(n,o)||(a="["+o+"]"),s||(t.seen.indexOf(u.value)<0?(s=m(r)?p(t,u.value,null):p(t,u.value,r-1)).indexOf("\n")>-1&&(s=i?s.split("\n").map((function(t){return" "+t})).join("\n").slice(2):"\n"+s.split("\n").map((function(t){return" "+t})).join("\n")):s=t.stylize("[Circular]","special")),v(a)){if(i&&o.match(/^\d+$/))return s;(a=JSON.stringify(""+o)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.slice(1,-1),a=t.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=t.stylize(a,"string"))}return a+": "+s}function d(t){return Array.isArray(t)}function g(t){return"boolean"==typeof t}function m(t){return null===t}function b(t){return"number"==typeof t}function w(t){return"string"==typeof t}function v(t){return void 0===t}function S(t){return A(t)&&"[object RegExp]"===I(t)}function A(t){return"object"==typeof t&&null!==t}function E(t){return A(t)&&"[object Date]"===I(t)}function M(t){return A(t)&&("[object Error]"===I(t)||t instanceof Error)}function x(t){return"function"==typeof t}function I(t){return Object.prototype.toString.call(t)}function k(t){return t<10?"0"+t.toString(10):t.toString(10)}e.debuglog=function(t){if(t=t.toUpperCase(),!a[t])if(s.test(t)){var r=n.pid;a[t]=function(){var n=e.format.apply(e,arguments);console.error("%s %d: %s",t,r,n)}}else a[t]=function(){};return a[t]},e.inspect=c,c.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},c.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},e.types=r(9032),e.isArray=d,e.isBoolean=g,e.isNull=m,e.isNullOrUndefined=function(t){return null==t},e.isNumber=b,e.isString=w,e.isSymbol=function(t){return"symbol"==typeof t},e.isUndefined=v,e.isRegExp=S,e.types.isRegExp=S,e.isObject=A,e.isDate=E,e.types.isDate=E,e.isError=M,e.types.isNativeError=M,e.isFunction=x,e.isPrimitive=function(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t},e.isBuffer=r(1135);var O=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function P(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.log=function(){var t,r;console.log("%s - %s",(r=[k((t=new Date).getHours()),k(t.getMinutes()),k(t.getSeconds())].join(":"),[t.getDate(),O[t.getMonth()],r].join(" ")),e.format.apply(e,arguments))},e.inherits=r(6698),e._extend=function(t,e){if(!e||!A(e))return t;for(var r=Object.keys(e),n=r.length;n--;)t[r[n]]=e[r[n]];return t};var T="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function C(t,e){if(!t){var r=new Error("Promise was rejected with a falsy value");r.reason=t,t=r}return e(t)}e.promisify=function(t){if("function"!=typeof t)throw new TypeError('The "original" argument must be of type Function');if(T&&t[T]){var e;if("function"!=typeof(e=t[T]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(e,T,{value:e,enumerable:!1,writable:!1,configurable:!0}),e}function e(){for(var e,r,n=new Promise((function(t,n){e=t,r=n})),o=[],i=0;i<arguments.length;i++)o.push(arguments[i]);o.push((function(t,n){t?r(t):e(n)}));try{t.apply(this,o)}catch(t){r(t)}return n}return Object.setPrototypeOf(e,Object.getPrototypeOf(t)),T&&Object.defineProperty(e,T,{value:e,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(e,o(t))},e.promisify.custom=T,e.callbackify=function(t){if("function"!=typeof t)throw new TypeError('The "original" argument must be of type Function');function e(){for(var e=[],r=0;r<arguments.length;r++)e.push(arguments[r]);var o=e.pop();if("function"!=typeof o)throw new TypeError("The last argument must be of type Function");var i=this,a=function(){return o.apply(i,arguments)};t.apply(this,e).then((function(t){n.nextTick(a.bind(null,null,t))}),(function(t){n.nextTick(C.bind(null,t,a))}))}return Object.setPrototypeOf(e,Object.getPrototypeOf(t)),Object.defineProperties(e,o(t)),e}},5767:(t,e,r)=>{"use strict";var n=r(2682),o=r(9209),i=r(487),a=r(6556),s=r(5795),u=a("Object.prototype.toString"),c=r(9092)(),l="undefined"==typeof globalThis?r.g:globalThis,f=o(),p=a("String.prototype.slice"),h=Object.getPrototypeOf,y=a("Array.prototype.indexOf",!0)||function(t,e){for(var r=0;r<t.length;r+=1)if(t[r]===e)return r;return-1},d={__proto__:null};n(f,c&&s&&h?function(t){var e=new l[t];if(Symbol.toStringTag in e){var r=h(e),n=s(r,Symbol.toStringTag);if(!n){var o=h(r);n=s(o,Symbol.toStringTag)}d["$"+t]=i(n.get)}}:function(t){var e=new l[t],r=e.slice||e.set;r&&(d["$"+t]=i(r))}),t.exports=function(t){if(!t||"object"!=typeof t)return!1;if(!c){var e=p(u(t),8,-1);return y(f,e)>-1?e:"Object"===e&&function(t){var e=!1;return n(d,(function(r,n){if(!e)try{r(t),e=p(n,1)}catch(t){}})),e}(t)}return s?function(t){var e=!1;return n(d,(function(r,n){if(!e)try{"$"+r(t)===n&&(e=p(n,1))}catch(t){}})),e}(t):null}},4047:(t,e,r)=>{var n=r(8287).Buffer;function o(t,e){this.buffer=t,this.position=0,this.isBigEndian=e||!1}function i(t,e,r){return function(){var n;return n=this.isBigEndian?e.call(this.buffer,this.position):t.call(this.buffer,this.position),this.position+=r,n}}t.exports=o,o.prototype.readUInt8=i(n.prototype.readUInt8,n.prototype.readUInt8,1),o.prototype.readUInt16=i(n.prototype.readUInt16LE,n.prototype.readUInt16BE,2),o.prototype.readUInt32=i(n.prototype.readUInt32LE,n.prototype.readUInt32BE,4),o.prototype.readInt8=i(n.prototype.readInt8,n.prototype.readInt8,1),o.prototype.readInt16=i(n.prototype.readInt16LE,n.prototype.readInt16BE,2),o.prototype.readInt32=i(n.prototype.readInt32LE,n.prototype.readInt32BE,4),o.prototype.readFloat=i(n.prototype.readFloatLE,n.prototype.readFloatBE,4),o.prototype.readDouble=i(n.prototype.readDoubleLE,n.prototype.readDoubleBE,8),o.prototype.readVarInt=function(){var t,e=0,r=0;do{e+=(127&(t=this.buffer[this.position+r]))<<7*r,r++}while(t>=128);return this.position+=r,e}},1199:(t,e,r)=>{var n=r(8287).Buffer;function o(t,e){this.buffer=new n(t),this.position=0,this.allowResize=e}function i(t,e){return function(r,n){this.ensureSize(e),t.call(this.buffer,r,this.position,n),this.position+=e}}t.exports=o,o.prototype.writeUInt8=i(n.prototype.writeUInt8,1),o.prototype.writeUInt16LE=i(n.prototype.writeUInt16LE,2),o.prototype.writeUInt16BE=i(n.prototype.writeUInt16BE,2),o.prototype.writeUInt32LE=i(n.prototype.writeUInt32LE,4),o.prototype.writeUInt32BE=i(n.prototype.writeUInt32BE,4),o.prototype.writeInt8=i(n.prototype.writeInt8,1),o.prototype.writeInt16LE=i(n.prototype.writeInt16LE,2),o.prototype.writeInt16BE=i(n.prototype.writeInt16BE,2),o.prototype.writeInt32LE=i(n.prototype.writeInt32LE,4),o.prototype.writeInt32BE=i(n.prototype.writeInt32BE,4),o.prototype.writeFloatLE=i(n.prototype.writeFloatLE,4),o.prototype.writeFloatBE=i(n.prototype.writeFloatBE,4),o.prototype.writeDoubleLE=i(n.prototype.writeDoubleLE,8),o.prototype.writeDoubleBE=i(n.prototype.writeDoubleBE,8),o.prototype.writeBuffer=function(t){this.ensureSize(t.length),t.copy(this.buffer,this.position,0,t.length),this.position+=t.length},o.prototype.writeVarInt=function(t){for(var e=1;4294967168&t;)this.writeUInt8(127&t|128),t>>>=7,e++;return this.writeUInt8(127&t),e},o.prototype.ensureSize=function(t){if(this.buffer.length<this.position+t){if(!this.allowResize)throw new RangeError("index out of range");var e=new n(this.position+t);this.buffer.copy(e,0,0,this.buffer.length),this.buffer=e}}},2957:(t,e,r)=>{var n=r(8287).Buffer;t.exports=g;var o=r(740),i=r(4263),a=r(350),s=r(743),u=r(3452),c=r(3959),l=r(9236),f=r(1141),p=r(4047),h=r(1199),y=r(2104),d=r(1865);function g(){this.srid=void 0,this.hasZ=!1,this.hasM=!1}g.parse=function(t,e){if("string"==typeof t||t instanceof y)return g._parseWkt(t);if(n.isBuffer(t)||t instanceof p)return g._parseWkb(t,e);throw new Error("first argument must be a string or Buffer")},g._parseWkt=function(t){var e,r,n=(e=t instanceof y?t:new y(t)).matchRegex([/^SRID=(\d+);/]);n&&(r=parseInt(n[1],10));var p=e.matchType(),h=e.matchDimension(),d={srid:r,hasZ:h.hasZ,hasM:h.hasM};switch(p){case o.wkt.Point:return i._parseWkt(e,d);case o.wkt.LineString:return a._parseWkt(e,d);case o.wkt.Polygon:return s._parseWkt(e,d);case o.wkt.MultiPoint:return u._parseWkt(e,d);case o.wkt.MultiLineString:return c._parseWkt(e,d);case o.wkt.MultiPolygon:return l._parseWkt(e,d);case o.wkt.GeometryCollection:return f._parseWkt(e,d)}},g._parseWkb=function(t,e){var r,n,h,y={};switch((r=t instanceof p?t:new p(t)).isBigEndian=!r.readInt8(),n=r.readUInt32(),y.hasSrid=!(536870912&~n),y.isEwkb=536870912&n||1073741824&n||2147483648&n,y.hasSrid&&(y.srid=r.readUInt32()),y.hasZ=!1,y.hasM=!1,y.isEwkb||e&&e.isEwkb?(2147483648&n&&(y.hasZ=!0),1073741824&n&&(y.hasM=!0),h=15&n):n>=1e3&&n<2e3?(y.hasZ=!0,h=n-1e3):n>=2e3&&n<3e3?(y.hasM=!0,h=n-2e3):n>=3e3&&n<4e3?(y.hasZ=!0,y.hasM=!0,h=n-3e3):h=n,h){case o.wkb.Point:return i._parseWkb(r,y);case o.wkb.LineString:return a._parseWkb(r,y);case o.wkb.Polygon:return s._parseWkb(r,y);case o.wkb.MultiPoint:return u._parseWkb(r,y);case o.wkb.MultiLineString:return c._parseWkb(r,y);case o.wkb.MultiPolygon:return l._parseWkb(r,y);case o.wkb.GeometryCollection:return f._parseWkb(r,y);default:throw new Error("GeometryType "+h+" not supported")}},g.parseTwkb=function(t){var e,r={},n=(e=t instanceof p?t:new p(t)).readUInt8(),h=e.readUInt8(),y=15&n;if(r.precision=d.decode(n>>4),r.precisionFactor=Math.pow(10,r.precision),r.hasBoundingBox=1&h,r.hasSizeAttribute=h>>1&1,r.hasIdList=h>>2&1,r.hasExtendedPrecision=h>>3&1,r.isEmpty=h>>4&1,r.hasExtendedPrecision){var g=e.readUInt8();r.hasZ=!(1&~g),r.hasM=!(2&~g),r.zPrecision=d.decode((28&g)>>2),r.zPrecisionFactor=Math.pow(10,r.zPrecision),r.mPrecision=d.decode((224&g)>>5),r.mPrecisionFactor=Math.pow(10,r.mPrecision)}else r.hasZ=!1,r.hasM=!1;if(r.hasSizeAttribute&&e.readVarInt(),r.hasBoundingBox){var m=2;r.hasZ&&m++,r.hasM&&m++;for(var b=0;b<m;b++)e.readVarInt(),e.readVarInt()}switch(y){case o.wkb.Point:return i._parseTwkb(e,r);case o.wkb.LineString:return a._parseTwkb(e,r);case o.wkb.Polygon:return s._parseTwkb(e,r);case o.wkb.MultiPoint:return u._parseTwkb(e,r);case o.wkb.MultiLineString:return c._parseTwkb(e,r);case o.wkb.MultiPolygon:return l._parseTwkb(e,r);case o.wkb.GeometryCollection:return f._parseTwkb(e,r);default:throw new Error("GeometryType "+y+" not supported")}},g.parseGeoJSON=function(t){return g._parseGeoJSON(t)},g._parseGeoJSON=function(t,e){var r;switch(t.type){case o.geoJSON.Point:r=i._parseGeoJSON(t);break;case o.geoJSON.LineString:r=a._parseGeoJSON(t);break;case o.geoJSON.Polygon:r=s._parseGeoJSON(t);break;case o.geoJSON.MultiPoint:r=u._parseGeoJSON(t);break;case o.geoJSON.MultiLineString:r=c._parseGeoJSON(t);break;case o.geoJSON.MultiPolygon:r=l._parseGeoJSON(t);break;case o.geoJSON.GeometryCollection:r=f._parseGeoJSON(t);break;default:throw new Error("GeometryType "+t.type+" not supported")}if(t.crs&&t.crs.type&&"name"===t.crs.type&&t.crs.properties&&t.crs.properties.name){var n=t.crs.properties.name;if(0===n.indexOf("EPSG:"))r.srid=parseInt(n.substring(5));else{if(0!==n.indexOf("urn:ogc:def:crs:EPSG::"))throw new Error("Unsupported crs: "+n);r.srid=parseInt(n.substring(22))}}else e||(r.srid=4326);return r},g.prototype.toEwkt=function(){return"SRID="+this.srid+";"+this.toWkt()},g.prototype.toEwkb=function(){var t=new h(this._getWkbSize()+4),e=this.toWkb();return t.writeInt8(1),t.writeUInt32LE((536870912|e.slice(1,5).readUInt32LE(0))>>>0,!0),t.writeUInt32LE(this.srid),t.writeBuffer(e.slice(5)),t.buffer},g.prototype._getWktType=function(t,e){var r=t;return this.hasZ&&this.hasM?r+=" ZM ":this.hasZ?r+=" Z ":this.hasM&&(r+=" M "),!e||this.hasZ||this.hasM||(r+=" "),e&&(r+="EMPTY"),r},g.prototype._getWktCoordinate=function(t){var e=t.x+" "+t.y;return this.hasZ&&(e+=" "+t.z),this.hasM&&(e+=" "+t.m),e},g.prototype._writeWkbType=function(t,e,r){var n=0;void 0!==this.srid||r&&void 0!==r.srid?(this.hasZ&&(n|=2147483648),this.hasM&&(n|=1073741824)):this.hasZ&&this.hasM?n+=3e3:this.hasZ?n+=1e3:this.hasM&&(n+=2e3),t.writeUInt32LE(n+e>>>0,!0)},g.getTwkbPrecision=function(t,e,r){return{xy:t,z:e,m:r,xyFactor:Math.pow(10,t),zFactor:Math.pow(10,e),mFactor:Math.pow(10,r)}},g.prototype._writeTwkbHeader=function(t,e,r,n){var o=(d.encode(r.xy)<<4)+e,i=(this.hasZ||this.hasM)<<3;if(i+=n<<4,t.writeUInt8(o),t.writeUInt8(i),this.hasZ||this.hasM){var a=0;this.hasZ&&(a|=1),this.hasM&&(a|=2),t.writeUInt8(a)}},g.prototype.toGeoJSON=function(t){var e={};return this.srid&&t&&(t.shortCrs?e.crs={type:"name",properties:{name:"EPSG:"+this.srid}}:t.longCrs&&(e.crs={type:"name",properties:{name:"urn:ogc:def:crs:EPSG::"+this.srid}})),e}},1141:(t,e,r)=>{t.exports=s;var n=r(537),o=r(740),i=r(2957),a=r(1199);function s(t,e){i.call(this),this.geometries=t||[],this.srid=e,this.geometries.length>0&&(this.hasZ=this.geometries[0].hasZ,this.hasM=this.geometries[0].hasM)}n.inherits(s,i),s.Z=function(t,e){var r=new s(t,e);return r.hasZ=!0,r},s.M=function(t,e){var r=new s(t,e);return r.hasM=!0,r},s.ZM=function(t,e){var r=new s(t,e);return r.hasZ=!0,r.hasM=!0,r},s._parseWkt=function(t,e){var r=new s;if(r.srid=e.srid,r.hasZ=e.hasZ,r.hasM=e.hasM,t.isMatch(["EMPTY"]))return r;t.expectGroupStart();do{r.geometries.push(i.parse(t))}while(t.isMatch([","]));return t.expectGroupEnd(),r},s._parseWkb=function(t,e){var r=new s;r.srid=e.srid,r.hasZ=e.hasZ,r.hasM=e.hasM;for(var n=t.readUInt32(),o=0;o<n;o++)r.geometries.push(i.parse(t,e));return r},s._parseTwkb=function(t,e){var r=new s;if(r.hasZ=e.hasZ,r.hasM=e.hasM,e.isEmpty)return r;for(var n=t.readVarInt(),o=0;o<n;o++)r.geometries.push(i.parseTwkb(t));return r},s._parseGeoJSON=function(t){for(var e=new s,r=0;r<t.geometries.length;r++)e.geometries.push(i._parseGeoJSON(t.geometries[r],!0));return e.geometries.length>0&&(e.hasZ=e.geometries[0].hasZ),e},s.prototype.toWkt=function(){if(0===this.geometries.length)return this._getWktType(o.wkt.GeometryCollection,!0);for(var t=this._getWktType(o.wkt.GeometryCollection,!1)+"(",e=0;e<this.geometries.length;e++)t+=this.geometries[e].toWkt()+",";return(t=t.slice(0,-1))+")"},s.prototype.toWkb=function(){var t=new a(this._getWkbSize());t.writeInt8(1),this._writeWkbType(t,o.wkb.GeometryCollection),t.writeUInt32LE(this.geometries.length);for(var e=0;e<this.geometries.length;e++)t.writeBuffer(this.geometries[e].toWkb({srid:this.srid}));return t.buffer},s.prototype.toTwkb=function(){var t=new a(0,!0),e=i.getTwkbPrecision(5,0,0),r=0===this.geometries.length;if(this._writeTwkbHeader(t,o.wkb.GeometryCollection,e,r),this.geometries.length>0){t.writeVarInt(this.geometries.length);for(var n=0;n<this.geometries.length;n++)t.writeBuffer(this.geometries[n].toTwkb())}return t.buffer},s.prototype._getWkbSize=function(){for(var t=9,e=0;e<this.geometries.length;e++)t+=this.geometries[e]._getWkbSize();return t},s.prototype.toGeoJSON=function(t){var e=i.prototype.toGeoJSON.call(this,t);e.type=o.geoJSON.GeometryCollection,e.geometries=[];for(var r=0;r<this.geometries.length;r++)e.geometries.push(this.geometries[r].toGeoJSON());return e}},350:(t,e,r)=>{t.exports=u;var n=r(537),o=r(2957),i=r(740),a=r(4263),s=r(1199);function u(t,e){o.call(this),this.points=t||[],this.srid=e,this.points.length>0&&(this.hasZ=this.points[0].hasZ,this.hasM=this.points[0].hasM)}n.inherits(u,o),u.Z=function(t,e){var r=new u(t,e);return r.hasZ=!0,r},u.M=function(t,e){var r=new u(t,e);return r.hasM=!0,r},u.ZM=function(t,e){var r=new u(t,e);return r.hasZ=!0,r.hasM=!0,r},u._parseWkt=function(t,e){var r=new u;return r.srid=e.srid,r.hasZ=e.hasZ,r.hasM=e.hasM,t.isMatch(["EMPTY"])||(t.expectGroupStart(),r.points.push.apply(r.points,t.matchCoordinates(e)),t.expectGroupEnd()),r},u._parseWkb=function(t,e){var r=new u;r.srid=e.srid,r.hasZ=e.hasZ,r.hasM=e.hasM;for(var n=t.readUInt32(),o=0;o<n;o++)r.points.push(a._readWkbPoint(t,e));return r},u._parseTwkb=function(t,e){var r=new u;if(r.hasZ=e.hasZ,r.hasM=e.hasM,e.isEmpty)return r;for(var n=new a(0,0,e.hasZ?0:void 0,e.hasM?0:void 0),o=t.readVarInt(),i=0;i<o;i++)r.points.push(a._readTwkbPoint(t,e,n));return r},u._parseGeoJSON=function(t){var e=new u;t.coordinates.length>0&&(e.hasZ=t.coordinates[0].length>2);for(var r=0;r<t.coordinates.length;r++)e.points.push(a._readGeoJSONPoint(t.coordinates[r]));return e},u.prototype.toWkt=function(){return 0===this.points.length?this._getWktType(i.wkt.LineString,!0):this._getWktType(i.wkt.LineString,!1)+this._toInnerWkt()},u.prototype._toInnerWkt=function(){for(var t="(",e=0;e<this.points.length;e++)t+=this._getWktCoordinate(this.points[e])+",";return(t=t.slice(0,-1))+")"},u.prototype.toWkb=function(t){var e=new s(this._getWkbSize());e.writeInt8(1),this._writeWkbType(e,i.wkb.LineString,t),e.writeUInt32LE(this.points.length);for(var r=0;r<this.points.length;r++)this.points[r]._writeWkbPoint(e);return e.buffer},u.prototype.toTwkb=function(){var t=new s(0,!0),e=o.getTwkbPrecision(5,0,0),r=0===this.points.length;if(this._writeTwkbHeader(t,i.wkb.LineString,e,r),this.points.length>0){t.writeVarInt(this.points.length);for(var n=new a(0,0,0,0),u=0;u<this.points.length;u++)this.points[u]._writeTwkbPoint(t,e,n)}return t.buffer},u.prototype._getWkbSize=function(){var t=16;return this.hasZ&&(t+=8),this.hasM&&(t+=8),9+this.points.length*t},u.prototype.toGeoJSON=function(t){var e=o.prototype.toGeoJSON.call(this,t);e.type=i.geoJSON.LineString,e.coordinates=[];for(var r=0;r<this.points.length;r++)this.hasZ?e.coordinates.push([this.points[r].x,this.points[r].y,this.points[r].z]):e.coordinates.push([this.points[r].x,this.points[r].y]);return e}},3959:(t,e,r)=>{t.exports=c;var n=r(537),o=r(740),i=r(2957),a=r(4263),s=r(350),u=r(1199);function c(t,e){i.call(this),this.lineStrings=t||[],this.srid=e,this.lineStrings.length>0&&(this.hasZ=this.lineStrings[0].hasZ,this.hasM=this.lineStrings[0].hasM)}n.inherits(c,i),c.Z=function(t,e){var r=new c(t,e);return r.hasZ=!0,r},c.M=function(t,e){var r=new c(t,e);return r.hasM=!0,r},c.ZM=function(t,e){var r=new c(t,e);return r.hasZ=!0,r.hasM=!0,r},c._parseWkt=function(t,e){var r=new c;if(r.srid=e.srid,r.hasZ=e.hasZ,r.hasM=e.hasM,t.isMatch(["EMPTY"]))return r;t.expectGroupStart();do{t.expectGroupStart(),r.lineStrings.push(new s(t.matchCoordinates(e))),t.expectGroupEnd()}while(t.isMatch([","]));return t.expectGroupEnd(),r},c._parseWkb=function(t,e){var r=new c;r.srid=e.srid,r.hasZ=e.hasZ,r.hasM=e.hasM;for(var n=t.readUInt32(),o=0;o<n;o++)r.lineStrings.push(i.parse(t,e));return r},c._parseTwkb=function(t,e){var r=new c;if(r.hasZ=e.hasZ,r.hasM=e.hasM,e.isEmpty)return r;for(var n=new a(0,0,e.hasZ?0:void 0,e.hasM?0:void 0),o=t.readVarInt(),i=0;i<o;i++){var u=new s;u.hasZ=e.hasZ,u.hasM=e.hasM;for(var l=t.readVarInt(),f=0;f<l;f++)u.points.push(a._readTwkbPoint(t,e,n));r.lineStrings.push(u)}return r},c._parseGeoJSON=function(t){var e=new c;t.coordinates.length>0&&t.coordinates[0].length>0&&(e.hasZ=t.coordinates[0][0].length>2);for(var r=0;r<t.coordinates.length;r++)e.lineStrings.push(s._parseGeoJSON({coordinates:t.coordinates[r]}));return e},c.prototype.toWkt=function(){if(0===this.lineStrings.length)return this._getWktType(o.wkt.MultiLineString,!0);for(var t=this._getWktType(o.wkt.MultiLineString,!1)+"(",e=0;e<this.lineStrings.length;e++)t+=this.lineStrings[e]._toInnerWkt()+",";return(t=t.slice(0,-1))+")"},c.prototype.toWkb=function(){var t=new u(this._getWkbSize());t.writeInt8(1),this._writeWkbType(t,o.wkb.MultiLineString),t.writeUInt32LE(this.lineStrings.length);for(var e=0;e<this.lineStrings.length;e++)t.writeBuffer(this.lineStrings[e].toWkb({srid:this.srid}));return t.buffer},c.prototype.toTwkb=function(){var t=new u(0,!0),e=i.getTwkbPrecision(5,0,0),r=0===this.lineStrings.length;if(this._writeTwkbHeader(t,o.wkb.MultiLineString,e,r),this.lineStrings.length>0){t.writeVarInt(this.lineStrings.length);for(var n=new a(0,0,0,0),s=0;s<this.lineStrings.length;s++){t.writeVarInt(this.lineStrings[s].points.length);for(var c=0;c<this.lineStrings[s].points.length;c++)this.lineStrings[s].points[c]._writeTwkbPoint(t,e,n)}}return t.buffer},c.prototype._getWkbSize=function(){for(var t=9,e=0;e<this.lineStrings.length;e++)t+=this.lineStrings[e]._getWkbSize();return t},c.prototype.toGeoJSON=function(t){var e=i.prototype.toGeoJSON.call(this,t);e.type=o.geoJSON.MultiLineString,e.coordinates=[];for(var r=0;r<this.lineStrings.length;r++)e.coordinates.push(this.lineStrings[r].toGeoJSON().coordinates);return e}},3452:(t,e,r)=>{t.exports=u;var n=r(537),o=r(740),i=r(2957),a=r(4263),s=r(1199);function u(t,e){i.call(this),this.points=t||[],this.srid=e,this.points.length>0&&(this.hasZ=this.points[0].hasZ,this.hasM=this.points[0].hasM)}n.inherits(u,i),u.Z=function(t,e){var r=new u(t,e);return r.hasZ=!0,r},u.M=function(t,e){var r=new u(t,e);return r.hasM=!0,r},u.ZM=function(t,e){var r=new u(t,e);return r.hasZ=!0,r.hasM=!0,r},u._parseWkt=function(t,e){var r=new u;return r.srid=e.srid,r.hasZ=e.hasZ,r.hasM=e.hasM,t.isMatch(["EMPTY"])||(t.expectGroupStart(),r.points.push.apply(r.points,t.matchCoordinates(e)),t.expectGroupEnd()),r},u._parseWkb=function(t,e){var r=new u;r.srid=e.srid,r.hasZ=e.hasZ,r.hasM=e.hasM;for(var n=t.readUInt32(),o=0;o<n;o++)r.points.push(i.parse(t,e));return r},u._parseTwkb=function(t,e){var r=new u;if(r.hasZ=e.hasZ,r.hasM=e.hasM,e.isEmpty)return r;for(var n=new a(0,0,e.hasZ?0:void 0,e.hasM?0:void 0),o=t.readVarInt(),i=0;i<o;i++)r.points.push(a._readTwkbPoint(t,e,n));return r},u._parseGeoJSON=function(t){var e=new u;t.coordinates.length>0&&(e.hasZ=t.coordinates[0].length>2);for(var r=0;r<t.coordinates.length;r++)e.points.push(a._parseGeoJSON({coordinates:t.coordinates[r]}));return e},u.prototype.toWkt=function(){if(0===this.points.length)return this._getWktType(o.wkt.MultiPoint,!0);for(var t=this._getWktType(o.wkt.MultiPoint,!1)+"(",e=0;e<this.points.length;e++)t+=this._getWktCoordinate(this.points[e])+",";return(t=t.slice(0,-1))+")"},u.prototype.toWkb=function(){var t=new s(this._getWkbSize());t.writeInt8(1),this._writeWkbType(t,o.wkb.MultiPoint),t.writeUInt32LE(this.points.length);for(var e=0;e<this.points.length;e++)t.writeBuffer(this.points[e].toWkb({srid:this.srid}));return t.buffer},u.prototype.toTwkb=function(){var t=new s(0,!0),e=i.getTwkbPrecision(5,0,0),r=0===this.points.length;if(this._writeTwkbHeader(t,o.wkb.MultiPoint,e,r),this.points.length>0){t.writeVarInt(this.points.length);for(var n=new a(0,0,0,0),u=0;u<this.points.length;u++)this.points[u]._writeTwkbPoint(t,e,n)}return t.buffer},u.prototype._getWkbSize=function(){var t=16;return this.hasZ&&(t+=8),this.hasM&&(t+=8),t+=5,9+this.points.length*t},u.prototype.toGeoJSON=function(t){var e=i.prototype.toGeoJSON.call(this,t);e.type=o.geoJSON.MultiPoint,e.coordinates=[];for(var r=0;r<this.points.length;r++)e.coordinates.push(this.points[r].toGeoJSON().coordinates);return e}},9236:(t,e,r)=>{t.exports=c;var n=r(537),o=r(740),i=r(2957),a=r(4263),s=r(743),u=r(1199);function c(t,e){i.call(this),this.polygons=t||[],this.srid=e,this.polygons.length>0&&(this.hasZ=this.polygons[0].hasZ,this.hasM=this.polygons[0].hasM)}n.inherits(c,i),c.Z=function(t,e){var r=new c(t,e);return r.hasZ=!0,r},c.M=function(t,e){var r=new c(t,e);return r.hasM=!0,r},c.ZM=function(t,e){var r=new c(t,e);return r.hasZ=!0,r.hasM=!0,r},c._parseWkt=function(t,e){var r=new c;if(r.srid=e.srid,r.hasZ=e.hasZ,r.hasM=e.hasM,t.isMatch(["EMPTY"]))return r;t.expectGroupStart();do{t.expectGroupStart();var n=[],o=[];for(t.expectGroupStart(),n.push.apply(n,t.matchCoordinates(e)),t.expectGroupEnd();t.isMatch([","]);)t.expectGroupStart(),o.push(t.matchCoordinates(e)),t.expectGroupEnd();r.polygons.push(new s(n,o)),t.expectGroupEnd()}while(t.isMatch([","]));return t.expectGroupEnd(),r},c._parseWkb=function(t,e){var r=new c;r.srid=e.srid,r.hasZ=e.hasZ,r.hasM=e.hasM;for(var n=t.readUInt32(),o=0;o<n;o++)r.polygons.push(i.parse(t,e));return r},c._parseTwkb=function(t,e){var r=new c;if(r.hasZ=e.hasZ,r.hasM=e.hasM,e.isEmpty)return r;for(var n=new a(0,0,e.hasZ?0:void 0,e.hasM?0:void 0),o=t.readVarInt(),i=0;i<o;i++){var u=new s;u.hasZ=e.hasZ,u.hasM=e.hasM;for(var l=t.readVarInt(),f=t.readVarInt(),p=0;p<f;p++)u.exteriorRing.push(a._readTwkbPoint(t,e,n));for(p=1;p<l;p++){for(var h=[],y=t.readVarInt(),d=0;d<y;d++)h.push(a._readTwkbPoint(t,e,n));u.interiorRings.push(h)}r.polygons.push(u)}return r},c._parseGeoJSON=function(t){var e=new c;t.coordinates.length>0&&t.coordinates[0].length>0&&t.coordinates[0][0].length>0&&(e.hasZ=t.coordinates[0][0][0].length>2);for(var r=0;r<t.coordinates.length;r++)e.polygons.push(s._parseGeoJSON({coordinates:t.coordinates[r]}));return e},c.prototype.toWkt=function(){if(0===this.polygons.length)return this._getWktType(o.wkt.MultiPolygon,!0);for(var t=this._getWktType(o.wkt.MultiPolygon,!1)+"(",e=0;e<this.polygons.length;e++)t+=this.polygons[e]._toInnerWkt()+",";return(t=t.slice(0,-1))+")"},c.prototype.toWkb=function(){var t=new u(this._getWkbSize());t.writeInt8(1),this._writeWkbType(t,o.wkb.MultiPolygon),t.writeUInt32LE(this.polygons.length);for(var e=0;e<this.polygons.length;e++)t.writeBuffer(this.polygons[e].toWkb({srid:this.srid}));return t.buffer},c.prototype.toTwkb=function(){var t=new u(0,!0),e=i.getTwkbPrecision(5,0,0),r=0===this.polygons.length;if(this._writeTwkbHeader(t,o.wkb.MultiPolygon,e,r),this.polygons.length>0){t.writeVarInt(this.polygons.length);for(var n=new a(0,0,0,0),s=0;s<this.polygons.length;s++){t.writeVarInt(1+this.polygons[s].interiorRings.length),t.writeVarInt(this.polygons[s].exteriorRing.length);for(var c=0;c<this.polygons[s].exteriorRing.length;c++)this.polygons[s].exteriorRing[c]._writeTwkbPoint(t,e,n);for(c=0;c<this.polygons[s].interiorRings.length;c++){t.writeVarInt(this.polygons[s].interiorRings[c].length);for(var l=0;l<this.polygons[s].interiorRings[c].length;l++)this.polygons[s].interiorRings[c][l]._writeTwkbPoint(t,e,n)}}}return t.buffer},c.prototype._getWkbSize=function(){for(var t=9,e=0;e<this.polygons.length;e++)t+=this.polygons[e]._getWkbSize();return t},c.prototype.toGeoJSON=function(t){var e=i.prototype.toGeoJSON.call(this,t);e.type=o.geoJSON.MultiPolygon,e.coordinates=[];for(var r=0;r<this.polygons.length;r++)e.coordinates.push(this.polygons[r].toGeoJSON().coordinates);return e}},4263:(t,e,r)=>{t.exports=u;var n=r(537),o=r(2957),i=r(740),a=r(1199),s=r(1865);function u(t,e,r,n,i){o.call(this),this.x=t,this.y=e,this.z=r,this.m=n,this.srid=i,this.hasZ=void 0!==this.z,this.hasM=void 0!==this.m}n.inherits(u,o),u.Z=function(t,e,r,n){var o=new u(t,e,r,void 0,n);return o.hasZ=!0,o},u.M=function(t,e,r,n){var o=new u(t,e,void 0,r,n);return o.hasM=!0,o},u.ZM=function(t,e,r,n,o){var i=new u(t,e,r,n,o);return i.hasZ=!0,i.hasM=!0,i},u._parseWkt=function(t,e){var r=new u;if(r.srid=e.srid,r.hasZ=e.hasZ,r.hasM=e.hasM,t.isMatch(["EMPTY"]))return r;t.expectGroupStart();var n=t.matchCoordinate(e);return r.x=n.x,r.y=n.y,r.z=n.z,r.m=n.m,t.expectGroupEnd(),r},u._parseWkb=function(t,e){var r=u._readWkbPoint(t,e);return r.srid=e.srid,r},u._readWkbPoint=function(t,e){return new u(t.readDouble(),t.readDouble(),e.hasZ?t.readDouble():void 0,e.hasM?t.readDouble():void 0)},u._parseTwkb=function(t,e){var r=new u;return r.hasZ=e.hasZ,r.hasM=e.hasM,e.isEmpty||(r.x=s.decode(t.readVarInt())/e.precisionFactor,r.y=s.decode(t.readVarInt())/e.precisionFactor,r.z=e.hasZ?s.decode(t.readVarInt())/e.zPrecisionFactor:void 0,r.m=e.hasM?s.decode(t.readVarInt())/e.mPrecisionFactor:void 0),r},u._readTwkbPoint=function(t,e,r){return r.x+=s.decode(t.readVarInt())/e.precisionFactor,r.y+=s.decode(t.readVarInt())/e.precisionFactor,e.hasZ&&(r.z+=s.decode(t.readVarInt())/e.zPrecisionFactor),e.hasM&&(r.m+=s.decode(t.readVarInt())/e.mPrecisionFactor),new u(r.x,r.y,r.z,r.m)},u._parseGeoJSON=function(t){return u._readGeoJSONPoint(t.coordinates)},u._readGeoJSONPoint=function(t){return 0===t.length?new u:t.length>2?new u(t[0],t[1],t[2]):new u(t[0],t[1])},u.prototype.toWkt=function(){return void 0===this.x&&void 0===this.y&&void 0===this.z&&void 0===this.m?this._getWktType(i.wkt.Point,!0):this._getWktType(i.wkt.Point,!1)+"("+this._getWktCoordinate(this)+")"},u.prototype.toWkb=function(t){var e=new a(this._getWkbSize());return e.writeInt8(1),this._writeWkbType(e,i.wkb.Point,t),void 0===this.x&&void 0===this.y?(e.writeDoubleLE(NaN),e.writeDoubleLE(NaN),this.hasZ&&e.writeDoubleLE(NaN),this.hasM&&e.writeDoubleLE(NaN)):this._writeWkbPoint(e),e.buffer},u.prototype._writeWkbPoint=function(t){t.writeDoubleLE(this.x),t.writeDoubleLE(this.y),this.hasZ&&t.writeDoubleLE(this.z),this.hasM&&t.writeDoubleLE(this.m)},u.prototype.toTwkb=function(){var t=new a(0,!0),e=o.getTwkbPrecision(5,0,0),r=void 0===this.x&&void 0===this.y;return this._writeTwkbHeader(t,i.wkb.Point,e,r),r||this._writeTwkbPoint(t,e,new u(0,0,0,0)),t.buffer},u.prototype._writeTwkbPoint=function(t,e,r){var n=this.x*e.xyFactor,o=this.y*e.xyFactor,i=this.z*e.zFactor,a=this.m*e.mFactor;t.writeVarInt(s.encode(n-r.x)),t.writeVarInt(s.encode(o-r.y)),this.hasZ&&t.writeVarInt(s.encode(i-r.z)),this.hasM&&t.writeVarInt(s.encode(a-r.m)),r.x=n,r.y=o,r.z=i,r.m=a},u.prototype._getWkbSize=function(){var t=21;return this.hasZ&&(t+=8),this.hasM&&(t+=8),t},u.prototype.toGeoJSON=function(t){var e=o.prototype.toGeoJSON.call(this,t);return e.type=i.geoJSON.Point,void 0===this.x&&void 0===this.y?e.coordinates=[]:void 0!==this.z?e.coordinates=[this.x,this.y,this.z]:e.coordinates=[this.x,this.y],e}},743:(t,e,r)=>{t.exports=u;var n=r(537),o=r(2957),i=r(740),a=r(4263),s=r(1199);function u(t,e,r){o.call(this),this.exteriorRing=t||[],this.interiorRings=e||[],this.srid=r,this.exteriorRing.length>0&&(this.hasZ=this.exteriorRing[0].hasZ,this.hasM=this.exteriorRing[0].hasM)}n.inherits(u,o),u.Z=function(t,e,r){var n=new u(t,e,r);return n.hasZ=!0,n},u.M=function(t,e,r){var n=new u(t,e,r);return n.hasM=!0,n},u.ZM=function(t,e,r){var n=new u(t,e,r);return n.hasZ=!0,n.hasM=!0,n},u._parseWkt=function(t,e){var r=new u;if(r.srid=e.srid,r.hasZ=e.hasZ,r.hasM=e.hasM,t.isMatch(["EMPTY"]))return r;for(t.expectGroupStart(),t.expectGroupStart(),r.exteriorRing.push.apply(r.exteriorRing,t.matchCoordinates(e)),t.expectGroupEnd();t.isMatch([","]);)t.expectGroupStart(),r.interiorRings.push(t.matchCoordinates(e)),t.expectGroupEnd();return t.expectGroupEnd(),r},u._parseWkb=function(t,e){var r=new u;r.srid=e.srid,r.hasZ=e.hasZ,r.hasM=e.hasM;var n=t.readUInt32();if(n>0){for(var o=t.readUInt32(),i=0;i<o;i++)r.exteriorRing.push(a._readWkbPoint(t,e));for(i=1;i<n;i++){for(var s=[],c=t.readUInt32(),l=0;l<c;l++)s.push(a._readWkbPoint(t,e));r.interiorRings.push(s)}}return r},u._parseTwkb=function(t,e){var r=new u;if(r.hasZ=e.hasZ,r.hasM=e.hasM,e.isEmpty)return r;for(var n=new a(0,0,e.hasZ?0:void 0,e.hasM?0:void 0),o=t.readVarInt(),i=t.readVarInt(),s=0;s<i;s++)r.exteriorRing.push(a._readTwkbPoint(t,e,n));for(s=1;s<o;s++){for(var c=[],l=t.readVarInt(),f=0;f<l;f++)c.push(a._readTwkbPoint(t,e,n));r.interiorRings.push(c)}return r},u._parseGeoJSON=function(t){var e=new u;t.coordinates.length>0&&t.coordinates[0].length>0&&(e.hasZ=t.coordinates[0][0].length>2);for(var r=0;r<t.coordinates.length;r++){r>0&&e.interiorRings.push([]);for(var n=0;n<t.coordinates[r].length;n++)0===r?e.exteriorRing.push(a._readGeoJSONPoint(t.coordinates[r][n])):e.interiorRings[r-1].push(a._readGeoJSONPoint(t.coordinates[r][n]))}return e},u.prototype.toWkt=function(){return 0===this.exteriorRing.length?this._getWktType(i.wkt.Polygon,!0):this._getWktType(i.wkt.Polygon,!1)+this._toInnerWkt()},u.prototype._toInnerWkt=function(){for(var t="((",e=0;e<this.exteriorRing.length;e++)t+=this._getWktCoordinate(this.exteriorRing[e])+",";for(t=t.slice(0,-1),t+=")",e=0;e<this.interiorRings.length;e++){t+=",(";for(var r=0;r<this.interiorRings[e].length;r++)t+=this._getWktCoordinate(this.interiorRings[e][r])+",";t=t.slice(0,-1),t+=")"}return t+")"},u.prototype.toWkb=function(t){var e=new s(this._getWkbSize());e.writeInt8(1),this._writeWkbType(e,i.wkb.Polygon,t),this.exteriorRing.length>0?(e.writeUInt32LE(1+this.interiorRings.length),e.writeUInt32LE(this.exteriorRing.length)):e.writeUInt32LE(0);for(var r=0;r<this.exteriorRing.length;r++)this.exteriorRing[r]._writeWkbPoint(e);for(r=0;r<this.interiorRings.length;r++){e.writeUInt32LE(this.interiorRings[r].length);for(var n=0;n<this.interiorRings[r].length;n++)this.interiorRings[r][n]._writeWkbPoint(e)}return e.buffer},u.prototype.toTwkb=function(){var t=new s(0,!0),e=o.getTwkbPrecision(5,0,0),r=0===this.exteriorRing.length;if(this._writeTwkbHeader(t,i.wkb.Polygon,e,r),this.exteriorRing.length>0){t.writeVarInt(1+this.interiorRings.length),t.writeVarInt(this.exteriorRing.length);for(var n=new a(0,0,0,0),u=0;u<this.exteriorRing.length;u++)this.exteriorRing[u]._writeTwkbPoint(t,e,n);for(u=0;u<this.interiorRings.length;u++){t.writeVarInt(this.interiorRings[u].length);for(var c=0;c<this.interiorRings[u].length;c++)this.interiorRings[u][c]._writeTwkbPoint(t,e,n)}}return t.buffer},u.prototype._getWkbSize=function(){var t=16;this.hasZ&&(t+=8),this.hasM&&(t+=8);var e=9;this.exteriorRing.length>0&&(e+=4+this.exteriorRing.length*t);for(var r=0;r<this.interiorRings.length;r++)e+=4+this.interiorRings[r].length*t;return e},u.prototype.toGeoJSON=function(t){var e=o.prototype.toGeoJSON.call(this,t);if(e.type=i.geoJSON.Polygon,e.coordinates=[],this.exteriorRing.length>0){for(var r=[],n=0;n<this.exteriorRing.length;n++)this.hasZ?r.push([this.exteriorRing[n].x,this.exteriorRing[n].y,this.exteriorRing[n].z]):r.push([this.exteriorRing[n].x,this.exteriorRing[n].y]);e.coordinates.push(r)}for(var a=0;a<this.interiorRings.length;a++){for(var s=[],u=0;u<this.interiorRings[a].length;u++)this.hasZ?s.push([this.interiorRings[a][u].x,this.interiorRings[a][u].y,this.interiorRings[a][u].z]):s.push([this.interiorRings[a][u].x,this.interiorRings[a][u].y]);e.coordinates.push(s)}return e}},740:t=>{t.exports={wkt:{Point:"POINT",LineString:"LINESTRING",Polygon:"POLYGON",MultiPoint:"MULTIPOINT",MultiLineString:"MULTILINESTRING",MultiPolygon:"MULTIPOLYGON",GeometryCollection:"GEOMETRYCOLLECTION"},wkb:{Point:1,LineString:2,Polygon:3,MultiPoint:4,MultiLineString:5,MultiPolygon:6,GeometryCollection:7},geoJSON:{Point:"Point",LineString:"LineString",Polygon:"Polygon",MultiPoint:"MultiPoint",MultiLineString:"MultiLineString",MultiPolygon:"MultiPolygon",GeometryCollection:"GeometryCollection"}}},2104:(t,e,r)=>{t.exports=i;var n=r(740),o=r(4263);function i(t){this.value=t,this.position=0}i.prototype.match=function(t){this.skipWhitespaces();for(var e=0;e<t.length;e++)if(0===this.value.substring(this.position).indexOf(t[e]))return this.position+=t[e].length,t[e];return null},i.prototype.matchRegex=function(t){this.skipWhitespaces();for(var e=0;e<t.length;e++){var r=this.value.substring(this.position).match(t[e]);if(r)return this.position+=r[0].length,r}return null},i.prototype.isMatch=function(t){this.skipWhitespaces();for(var e=0;e<t.length;e++)if(0===this.value.substring(this.position).indexOf(t[e]))return this.position+=t[e].length,!0;return!1},i.prototype.matchType=function(){var t=this.match([n.wkt.Point,n.wkt.LineString,n.wkt.Polygon,n.wkt.MultiPoint,n.wkt.MultiLineString,n.wkt.MultiPolygon,n.wkt.GeometryCollection]);if(!t)throw new Error("Expected geometry type");return t},i.prototype.matchDimension=function(){switch(this.match(["ZM","Z","M"])){case"ZM":return{hasZ:!0,hasM:!0};case"Z":return{hasZ:!0,hasM:!1};case"M":return{hasZ:!1,hasM:!0};default:return{hasZ:!1,hasM:!1}}},i.prototype.expectGroupStart=function(){if(!this.isMatch(["("]))throw new Error("Expected group start")},i.prototype.expectGroupEnd=function(){if(!this.isMatch([")"]))throw new Error("Expected group end")},i.prototype.matchCoordinate=function(t){var e;if(!(e=t.hasZ&&t.hasM?this.matchRegex([/^(\S*)\s+(\S*)\s+(\S*)\s+([^\s,)]*)/]):t.hasZ||t.hasM?this.matchRegex([/^(\S*)\s+(\S*)\s+([^\s,)]*)/]):this.matchRegex([/^(\S*)\s+([^\s,)]*)/])))throw new Error("Expected coordinates");return t.hasZ&&t.hasM?new o(parseFloat(e[1]),parseFloat(e[2]),parseFloat(e[3]),parseFloat(e[4])):t.hasZ?new o(parseFloat(e[1]),parseFloat(e[2]),parseFloat(e[3])):t.hasM?new o(parseFloat(e[1]),parseFloat(e[2]),void 0,parseFloat(e[3])):new o(parseFloat(e[1]),parseFloat(e[2]))},i.prototype.matchCoordinates=function(t){var e=[];do{var r=this.isMatch(["("]);e.push(this.matchCoordinate(t)),r&&this.expectGroupEnd()}while(this.isMatch([","]));return e},i.prototype.skipWhitespaces=function(){for(;this.position<this.value.length&&" "===this.value[this.position];)this.position++}},543:(t,e,r)=>{e.Types=r(740),e.Geometry=r(2957),e.Point=r(4263),e.LineString=r(350),e.Polygon=r(743),e.MultiPoint=r(3452),e.MultiLineString=r(3959),e.MultiPolygon=r(9236),e.GeometryCollection=r(1141)},1865:t=>{t.exports={encode:function(t){return t<<1^t>>31},decode:function(t){return t>>1^-(1&t)}}},9209:(t,e,r)=>{"use strict";var n=r(6578),o="undefined"==typeof globalThis?r.g:globalThis;t.exports=function(){for(var t=[],e=0;e<n.length;e++)"function"==typeof o[n[e]]&&(t[t.length]=n[e]);return t}}},e={};function r(n){var o=e[n];if(void 0!==o)return o.exports;var i=e[n]={exports:{}};return t[n](i,i.exports,r),i.exports}r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var n={};return(()=>{"use strict";r.r(n),r.d(n,{echartAccesosGaugeVehicles:()=>et,echartAccesosHorStackedBarVehicles:()=>at,echartAccesosPieVehicles:()=>it,echartAccesosVerStackedBarVehicles:()=>st,echartAccessosCiutat:()=>D,echartAccessosCiutatPortada:()=>j,echartPuntosMedidaTrafico:()=>ft,echartVieBarYear:()=>ot,echartVieGaugeMonth:()=>X,echartVieGaugeYear:()=>rt,echartVieLineMonth:()=>nt,echartViePrincCiutat:()=>G,listeneresVehicles:()=>z,mapPuntosMedidaTrafico:()=>lt,tableAcceso:()=>Z,tableVariacio:()=>Y,tableVias:()=>K});var t=r(2725);const e="8%",o="2.5%",i="5%",a="18%",s="20%",u="10%",c="90%",l="1%",f="0%",p=["#9c89b8","#4ea8de","#05668d","#ffbf69","#e56b6f","#83c5be","#02c39a","#ee9b00","#cdb4db","#ffadad","#ce4257","#b7b7a4"],h=33,y=27,d=30;function g(t){let e=navigator.language||navigator.userLanguage;e=e.length<=2?`${e}-${e.toUpperCase()}`:e;const r={minimumFractionDigits:0,maximumFractionDigits:2};return"es-ES"===e?t.toLocaleString("de-DE",r):t.toLocaleString(e,r)}function m(t){return 100*(1-17/t)}function b(t,e=!1){let r=`<p>${t[0].name}</p>`;return t.forEach((t=>{const n=e?Math.round(t.data):t.data,o=`<div>${i=t.color,`<span style="display:inline-block;margin-right:5px;border-radius:10px;width:9px;height:9px;background-color:${i}"></span>`} ${t.seriesName}: <strong style="float: right; margin-left:20px">${t.data?g(n):"-"}</strong></div>`;var i;r+=o})),r}function w(t){return g(t)}function v(t){return{1:"GENER",2:"FEBRER",3:"MARÇ",4:"ABRIL",5:"MAIG",6:"JUNY",7:"JULIO",8:"AGOST",9:"SETEMBRE",10:"OCTUBRE",11:"NOVEMBRE",12:"DESEMBRE"}[t]}function S(t,e){const r=t?document.querySelector(t):null,n=e?document.querySelector(e):null;r&&(r.hidden=!0),n&&(n.style.background="url('./build/images/nodata1.png') no-repeat top center",n.hidden=!1)}function A(t,e){const r=t?document.querySelector(t):null,n=e?document.querySelector(e):null;r&&(r.hidden=!0),n&&(n.style.background="#ffffff",n.hidden=!1)}function E(t,e){return t.reduce(((t,r)=>{const n=r[e];return t[n]||(t[n]=[]),t[n].push(r),t}),{})}function M(t){return Math.round(document.getElementById(t).offsetWidth/h)}function x(t,e,r,n,u="",l="total",f=0,h=1,y=2,d=p){if(0===r.length)S(`#${t}`,`#${e}`);else{A(`#${e}`,`#${t}`);const p=[];let v=E(r,f);const S=new Set(r.map((t=>t[h]))),M=Object.keys(v);S.forEach((t=>{M.forEach((e=>{void 0===v[e].find((e=>e[h]===t))&&(v[e].push([v[e][0][f],t,void 0]),v[e][0][1].length>4?v[e].sort(((t,e)=>{const[r,n]=t[1].split("/"),[o,i]=e[1].split("/"),a=new Date(n,r-1,1),s=new Date(i,o-1,1);return a.getTime()-s.getTime()})):v[e].sort())}))}));const x=Object.entries(v).sort(((t,e)=>t[0].localeCompare(e[0]))),I=""===l?90:0;v=Object.fromEntries(x),Object.keys(v).forEach((t=>{p.push({name:t,type:"bar",stack:l,label:{show:!0,fontFamily:"Montserrat",rotate:I,formatter:t=>g(Math.round(t.value))},emphasis:{focus:"series"},data:v[t].map((t=>t[y]))})}));const k=""!==l?m(S.size):100*(1-7/S.size);B(t,{color:d,title:{text:u,left:"center",top:"top",textStyle:{fontSize:20,fontFamily:"Montserrat",fontWeight:600,color:"#666"}},tooltip:{trigger:"axis",axisPointer:{type:"shadow"},textStyle:{fontFamily:"Montserrat"},formatter:t=>b(t,!0)},legend:{padding:40,textStyle:{fontFamily:"Montserrat"}},grid:{left:o,right:i,bottom:a,top:s,heigh:c,containLabel:!0},yAxis:{type:"value",splitNumber:4,name:n,nameLocation:"end",nameTextStyle:{fontWeight:"bold",fontFamily:"Montserrat",color:"#666"},axisLabel:{formatter:w,textStyle:{fontSize:8,fontFamily:"Montserrat",color:"#666"}}},xAxis:{type:"category",data:[...S],axisLabel:{textStyle:{fontFamily:"Montserrat"}}},series:p,toolbox:{show:!0,feature:{restore:{title:"Restablir"},saveAsImage:{title:"Desar"}},right:50},dataZoom:[{show:!0,data:[...S],start:k,end:100,borderColor:"#eee",fillerColor:"rgba(0,0,0,.05)",textStyle:{fontSize:10,fontFamily:"Montserrat",color:"#333",textBorderColor:"#fff",textBorderWidth:3,fontWeight:"600"},selectedDataBackground:{lineStyle:{color:"#333"},areaStyle:{color:"#ffcd00"}},dataBackground:{backgroundColor:"rgba(0,0,0,1)",lineStyle:{color:"#333"},areaStyle:{color:"rgba(0,0,0,0.5)"}},handleStyle:{color:"rgba(0,0,0,0.2)"},moveHandleStyle:{color:"rgba(0,0,0,0.3)"},emphasis:{handleStyle:{color:"rgba(255,205,0,1)"},moveHandleStyle:{color:"rgba(255,205,0,1)"}}}]})}}function I(t,e,r,n,o,i,a){if(0===o.length)S(`#${t}`,`#${r}`),S(`#${e}`,`#${n}`);else{A(`#${r}`,`#${t}`),A(`#${n}`,`#${e}`);const s=0,u=2,c=function(t,e){const r=function(t,e,r=1){const n=Math.max(...t.map((t=>t[e])))*r;return 5e3*Math.ceil(n/5e3)}(t,e,1.1);let n=50,o=180;r>9999999&&(n=65,o=95);const i=E(t,1);let[a,s]=Object.values(i);return Object.values(i).slice(1).forEach((t=>{s=t})),[s,a,i,r,n,o]}(o,u),l=c[0],f=c[1],p=c[2],h=c[3],y=c[5],d=M(t),g=T(l,u,s,y,d),m=T(f,u,s,y,d);B(t,O(`${i}${v(String(Object.keys(p)[1]))}`,h,g,d)),B(e,O(`${a}${v(String(Object.keys(p)[0]))}`,h,m,d))}}function k(t,e){const r=`<span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:${t.color};"></span>`;let n=`${t.name} : `;return n+=`<span style="font-weight:bold">${g(t.value)}</span>`,e&&(n+=`<span> (${t.percent}%)</span>`),r+n}function O(t,e,r,n){return{color:p,title:{text:t,left:"center",top:"top",padding:10,textStyle:{fontSize:n,fontFamily:"Montserrat",fontWeight:600,color:"#666"}},tooltip:{show:!0,textStyle:{fontFamily:"Montserrat"},formatter:t=>k(t,!1)},splitNumber:3,series:{type:"gauge",max:e,startAngle:-180,endAngle:0,splitNumber:2,pointer:{show:!1,icon:"roundRect"},progress:{show:!0,overlap:!1,roundCap:!0,clip:!0,itemStyle:{borderWidth:1,borderColor:"#464646"}},axisLine:{lineStyle:{width:60}},splitLine:{show:!0,distance:10,length:10},axisTick:{show:!0,splitNumber:5},axisLabel:{show:!0,distance:70,formatter:t=>g(Math.round(t)),fontFamily:"Montserrat",color:"#666"},data:r,detail:{fontSize:n/1.2,color:"inherit",formatter:t=>g(Math.round(t))}},toolbox:{show:!0,feature:{saveAsImage:{title:"Desar"}},right:y,top:d}}}function P(t){if(t.length>=29){const e=t.split(" ");let r="",n="";for(const t of e)`${r} ${t}`.length<=29?r+=(r?" ":"")+t:(n+=`${r}\n`,r=t);return n+=r,n}return t}function T(t,e,r,n,o){let i=20,a=35,s=-190,u=n;t.length<=2&&(s=-140,u+=100,i=25,a=42);const c=p.slice(),l=[];for(let n=0;n<t.length;n+=1)l.push({value:t[n][e],name:P(t[n][r]),color:c.shift(),title:{offsetCenter:[String(s),`${String(i)}%`],fontFamily:"Montserrat",fontSize:o-3},detail:{offsetCenter:[String(s),`${String(a)}%`],fontFamily:"Montserrat"}}),s+=u,(n+1)%3==0&&(a+=30,i+=30,s=-190);return l}function C(t,e,r=!1){const{resultset:n}={resultset:t},o=new Set,i=new Set,a=e,s=n.map((([t,e,n])=>{const a=r?Math.round(n):n;return o.add(t),i.add(e),{day:e,type:t,value:a}})),u=Array.from(i.values()),c=Array.from(o.values());return c.sort(((t,e)=>t.toLowerCase().localeCompare(e.toLowerCase(),"es",{ignorePunctuation:!0}))),[c.map((t=>{const e=s.filter((e=>e.type===t)).map((({day:e,value:r})=>[e,t,r])),r=u.map((t=>{const r=e.find((([e])=>e===t));return r?r[2]:null}));return{name:t,type:"line",symbol:"circle",color:a.shift(),symbolSize:6,smooth:!1,data:r}})),i,c]}function B(t,e){const r=document.getElementById(t);if(!r)return console.error(`No se pudo encontrar el elemento con ID ${t}.`),null;const n=echarts.init(r);return n.setOption(e,!0),$(window).on("resize",(()=>{null!=n&&void 0!==n&&n.resize()})),n}function _(t,e){const r=new Event("tableCreated"),n=$("#formFilterVar");if(""===Dashboards.getParameterValue("updateFilterVar")){for(let t=e.length-1;t>=0;t--)n.append(`<input type="checkbox" id="${e[t]}" onclick="legacy.filterVarUpdate();" />${e[t]}<br /></input>`);(function(){const t=$("#formFilterDates").find("input");$(t).each(((t,e)=>{e.checked&&(e.checked=!1)}));const e=$("#formFilterVar").find("input");$(e).each(((t,e)=>{e.checked&&(e.checked=!1)})),function(){let t=0;const e=$("#formFilterDates").find("input");$(e).each(((e,r)=>{t+=1,r.checked=!0})),t=0;const r=$("#formFilterVar").find("input");$(r).each(((e,r)=>{t+=1,null!=render_tableVariacio?t<=2&&(r.checked=!0):t<=3&&(r.checked=!0)})),console.error(`VALORES FILTRO: ${Dashboards.getParameterValue("filterVarParam")}`),Dashboards.getParameterValue("filterVarParam").length>0&&Dashboards.fireChange("filterVarParam")}()})(),function(){const t=$("#idFilterVar").find("input"),e=[];$(t).each(((t,r)=>{r.checked&&e.push(r.id.replaceAll("/","-"))})),Dashboards.fireChange("filterVarParam",e),Dashboards.fireChange("updateFilterVar","True")}()}console.error("Dispatching tableCreated event..."),document.dispatchEvent(r),console.error("tableCreated event dispatched.")}function R(t){return 100*(t-120)/t}function N(t,r,n,h,y,d,g,v,E=!1,M=!1,x=void 0,I=!0,k=p.slice(),O=!1,P=void 0,T=void 0){const L=t.resultset||t;if(0===L.length)S(`#${d}`,`#${g}`),v&&S(`#${v}`,`#${g}`);else{A(`#${g}`,`#${d}`),v&&A(`#${g}`,`#${v}`);const t=C(L,k,O),p=t[0],S=t[1],N=t[2],U=I?N:null,F=M?(_=S,Array.from(_.values()).map((t=>{const[e,r]=t.split("/");return function(t){const e=t.slice(0,2);return`${t.slice(3,5)}/${e}`}(t)}))):Array.from(S.values());void 0===x&&(x=E?m(S.size):R(S.size)),B(d,function(t,r,n,p,h,y,d,g=5,m="",v=h,S=100,A,E,M){return{title:{text:m,left:"center",top:"top",textStyle:{fontSize:20,fontFamily:"Montserrat",fontWeight:600,color:"#666"}},tooltip:{trigger:"axis",show:!0,formatter:t=>b(t),textStyle:{fontFamily:"Montserrat"}},legend:r?{type:"plain",data:r,textStyle:{fontFamily:"Montserrat"},top:E||e,selected:A}:null,grid:{left:o,right:i,bottom:a,top:r?E?"30%":s:u,heigh:c,containLabel:!0},xAxis:{type:"category",data:n,boundaryGap:!1,splitLine:{show:!1},axisLabel:{textStyle:{fontSize:10,fontFamily:"Montserrat",color:"#666"}}},yAxis:{name:p,nameLocation:"end",nameTextStyle:{fontFamily:"Montserrat",fontWeight:"bold",padding:[0,0,0,d]},type:"value",scale:!0,min:M,axisLabel:{margin:g,formatter:w,textStyle:{fontSize:10,fontFamily:"Montserrat",color:"#666"}}},series:t,dataZoom:[{show:y,data:n,start:v,end:S,borderColor:"#eee",fillerColor:"rgba(0,0,0,.05)",textStyle:{fontSize:10,fontFamily:"Montserrat",color:"#333",textBorderColor:"#fff",textBorderWidth:3,fontWeight:"600"},selectedDataBackground:{lineStyle:{color:"#333"},areaStyle:{color:"#ffcd00"}},dataBackground:{backgroundColor:"rgba(0,0,0,1)",lineStyle:{color:"#333"},areaStyle:{color:"rgba(0,0,0,0.5)"}},handleStyle:{color:"rgba(0,0,0,0.2)"},moveHandleStyle:{color:"rgba(0,0,0,0.3)"},emphasis:{handleStyle:{color:"rgba(255,205,0,1)"},moveHandleStyle:{color:"rgba(255,205,0,1)"}}}],toolbox:{show:y,feature:{restore:{title:"Restablir"},saveAsImage:{title:"Desar"}},right:l,top:f}}}(p,U,F,y,x,r,n,void 0,h,void 0,void 0,void 0,P,T))}var _}const U="ca_ES",F={es_ES:new Map([["chartAccesosGauge","ACCESOS A LA CIUDAD: ACUMULADO AÑO }"],["chartViesGaugeYear","VIAS PRINCIPALES DE LA\nCIUDAD: ACUMULADO AÑO }"],["unidadMedidaVehículos","Vehicles"],["tituloGrafica","TRÀNSIT DE VEHICLES: ACCESSOS A LA CIUTAT"],["tituloGraficaVias","TRÀNSIT DE VEHICLES: VIES PRINCIPALS DE LA CIUTAT"]]),ca_ES:new Map([["chartAccesosGauge","ACCESSOS A LA CIUTAT: ACUMULAT ANY "],["chartViesGaugeYear","VIES PRINCIPALS DE LA\nCIUTAT: ACUMULAT ANY "],["unidadMedidaVehículos","Vehicles"],["tituloGrafica","TRÀNSIT DE VEHICLES: ACCESSOS A LA CIUTAT"],["tituloGraficaVias","TRÀNSIT DE VEHICLES: VIES PRINCIPALS DE LA CIUTAT"]])};function D(e,r){const n=p.slice(),o=C(r.resultset||r,n,!1),i=o[1],a=Array.from(i.values()),s=o[2],u=R(i.size),c=(0,t.resultsetWithFields)(r),l=(0,t.configureDataValidate)(c,o[0],["KpiValid-30-Accesos-Ciudad-Coches","KpiValid-365-Accesos-Ciudad-Coches"],["Kpi-Accesos-Ciudad-Coches"]),f={title:{text:`${F[U].get("tituloGrafica")}`},legend:{show:!0,data:s},xAxis:{type:"category",data:a},yAxis:{name:`${F[U].get("unidadMedidaVehículos")}`,axisLabel:{formatter:w}},dataZoom:{show:!0,data:a,start:u},toolbox:{show:!0}};(0,t.configureLinesChartValidates)("chartAcessosCiutat",l,f)}function j(e,r){const n=p.slice(),o=C(r.resultset||r,n,!1),i=o[1],a=Array.from(i.values()),s=o[2],u=(0,t.resultsetWithFields)(r),c=u.map((t=>t.value)),l=Math.max(...c),f=(0,t.configureDataValidate)(u,o[0],["KpiValid-30-Accesos-Ciudad-Coches","KpiValid-365-Accesos-Ciudad-Coches"],["Kpi-Accesos-Ciudad-Coches"]),h={grid:{left:"0",right:"0",bottom:"0",top:"200",containLabel:!0},title:{text:`${F[U].get("tituloGrafica")}`},legend:{show:!0,data:s},xAxis:{type:"category",data:a,axisLabel:{margin:15}},yAxis:{name:`${F[U].get("unidadMedidaVehículos")}`,axisLabel:{formatter:w},max:l},dataZoom:{show:!1},toolbox:{show:!1}};(0,t.configureLinesChartValidates)("chartTransitAccessosCiutat",f,h)}function V(){document.querySelector("#idFiltrar").style.visibility="visible"}function W(){document.querySelector("#idFiltrar").style.visibility="hidden"}function z(){console.error("EVENTO ATRAPADO, AÑADIENDO LISTENER"),render_tableVariacio.listeners=["filterVarParam","updateFilterVar"],Dashboards.fireChange("filterDatesParam"),Dashboards.fireChange("updateFilter"),Dashboards.fireChange("updateFilterVar"),document.querySelector("#idVariacio").addEventListener("click",V),document.querySelector("#idAcessosCiutat").addEventListener("click",W),document.querySelector("#idViePrincCiutat").addEventListener("click",W)}function G(e,r){const n=p.slice(),o=C(r.resultset||r,n,!1),i=o[1],a=Array.from(i.values()),s=o[2],u=R(i.size),c=(0,t.resultsetWithFields)(r),l=(0,t.configureDataValidate)(c,o[0],["KpiValid-30-Accesos-Vias-Coches","KpiValid-365-Accesos-Vias-Coches"],["Kpi-Accesos-Vias-Coches"]),f={title:{text:`${F[U].get("tituloGraficaVias")}`},legend:{show:!0,data:s},xAxis:{type:"category",data:a},yAxis:{name:`${F[U].get("unidadMedidaVehículos")}`,axisLabel:{formatter:w}},dataZoom:{show:!0,data:a,start:u},toolbox:{show:!0}};(0,t.configureLinesChartValidates)("chartViePrincCiutat",l,f)}function Z(t,e){const r=[];if(null!=e.resultset&&e.resultset.length>0)for(let t=0;t<e.resultset.length;t++){const n=`<div><img class="imgTabulator" src="build/Imagenes/camara.svg">${e.resultset[t][3]}</div>`;r.push({tram:e.resultset[t][1],cam:e.resultset[t][2],url:n})}new Tabulator("#idTableAcceso",{selectable:!1,headerSort:!1,height:700,width:1e3,data:r,layout:"fitColumns",groupBy:["tram"],columns:[{title:"Tram",field:"tram",hozAlign:"center",headerHozAlign:"center",formatter:"html"},{title:"Descripció Càmera",field:"cam",hozAlign:"center",headerHozAlign:"center",width:560},{title:"URL",field:"url",hozAlign:"center",headerHozAlign:"center",formatter:"html"}]})}let J=[];const H=new Set;function q(t){J.push({dat:t[3].replaceAll("-","/"),tram:t[1],int:g(t[6]),vari:g((100*parseFloat(t[5])).toFixed(2)),dataRe:t[2].replaceAll("-","/"),intRe:g(t[7])})}function Y(t){!function(t){t.resultset.forEach((t=>{H.add(t[3].replaceAll("-","/"))}))}(t),function(){const t=Array.from(H);_(t.length,t)}(),function(t){const e=Dashboards.getParameterValue("filterVarParam");if(J=[],null!=t.resultset&&t.resultset.length>0)if(e.length>0)for(let r=e.length-1;r>=0;r-=1)for(let n=0;n<t.resultset.length;n+=1)e[r]===t.resultset[n][3]&&q(t.resultset[n]);else for(let e=0;e<t.resultset.length;e+=1)q(t.resultset[e])}(t),0===Dashboards.getParameterValue("filterVarParam").length?($("#chartVariacio").hide(),$("#no_dataChartVariacio").css("background","url('./build/images/nodata1.png') no-repeat top center"),$("#no_dataChartVariacio").show()):($("#chartVariacio").show(),$("#no_dataChartVariacio").hide()),new Tabulator("#chartVariacio",{selectable:!1,headerSort:!1,height:700,width:1e3,data:J,layout:"fitColumns",groupBy:["dat"],columns:[{title:"Data",field:"dat",hozAlign:"center",headerHozAlign:"center"},{title:"Tram",field:"tram",hozAlign:"center",headerHozAlign:"center",width:560},{title:"Intensitat",field:"int",hozAlign:"center",headerHozAlign:"center"},{title:"Variació",field:"vari",hozAlign:"center",headerHozAlign:"center",formatter:(t,e,r)=>(parseFloat(t.getValue())<0?t.getElement().classList.add("custom-red-cell"):t.getElement().classList.add("custom-green-cell"),t.getValue())},{title:"Data Referència",field:"dataRe",hozAlign:"center",headerHozAlign:"center"},{title:"Intensitat Referència",field:"intRe",hozAlign:"center",headerHozAlign:"center"}]})}function K(t,e){const r=[];if(null!=e.resultset)for(let t=0;t<e.resultset.length;t+=1){const n=`<div><img class="imgTabulator" src="build/Imagenes/camara.svg">${e.resultset[t][3]}</div>`;r.push({tram:e.resultset[t][1],cam:e.resultset[t][2],url:n})}new Tabulator("#idTableViaPri",{selectable:!1,headerSort:!1,height:700,width:1e3,data:r,layout:"fitColumns",groupBy:["tram"],columns:[{title:"Tram",field:"tram",hozAlign:"center",headerHozAlign:"center",formatter:"html"},{title:"Descripció Càmera",field:"cam",hozAlign:"center",headerHozAlign:"center",width:560},{title:"URL",field:"url",hozAlign:"center",headerHozAlign:"center",formatter:"html"}]})}function X(t,e){document.querySelector("#tabViePrincCiutat").addEventListener("click",(()=>{requestAnimationFrame((()=>{I("chartViesMesActual","chartViesMesAnterior","no_dataViesMesActual","no_dataViesMesAnterior",e.resultset,"VIES PRINCIPALS DE LA\nCIUTAT: EVOLUCIÓ ","VIES PRINCIPALS DE LA\nCIUTAT: EVOLUCIÓ ")}))}))}const Q={color:void 0,title:{text:"",left:"center",top:"top",padding:10,textStyle:{fontSize:15,fontFamily:"Montserrat",fontWeight:600,color:"#666"}},tooltip:{show:!0,textStyle:{fontFamily:"Montserrat"}},splitNumber:3,series:{type:"gauge",max:void 0,startAngle:-180,endAngle:0,splitNumber:2,pointer:{show:!1,icon:"roundRect"},progress:{show:!0,overlap:!1,roundCap:!0,clip:!0,itemStyle:{borderWidth:1,borderColor:"#464646"}},axisLine:{lineStyle:{width:60}},splitLine:{show:!0,distance:10,length:10},axisTick:{show:!0,splitNumber:10},axisLabel:{show:!0,distance:70,formatter:void 0,fontFamily:"Montserrat",color:"#666"},data:[],detail:{fontSize:12,color:"inherit"}},toolbox:{show:!0,feature:{saveAsImage:{title:"Desar"}},right:27,top:30}};function tt(e,r){const n=r.resultset,o=["#9c89b8","#4ea8de","#05668d","#ffbf69","#e56b6f","#83c5be","#02c39a","#ee9b00","#cdb4db","#ffadad","#ce4257","#b7b7a4"];if(0===r.length)(0,t.printNoDataChart)(`#${e.idChart}`,`#${e.idNoData}`);else{(0,t.printDataChart)(`#${e.idNoData}`,`#${e.idChart}`);const r={type:0,data:1,time:2},[i,a]=(0,t.configureDataGaugeCommon)(n,r,o.slice(),e.fontSize,e.paramOffsetCenterTitle,e.paramOffsetCenterDetail,e.paramOffsetLabel,e.paramCalculatedOffset,e.paramNumberOfElementsByLine),s={...Q};s.title.text=e.chartName,s.series.max=i,s.series.data=a,s.series.detail.fontSize=e.fontSize,s.series.detail.formatter=e=>(0,t.addPointInteger)(Math.round(e)),s.series.axisTick.splitNumber=5,s.color=o.slice(),s.series.axisLabel.formatter=e=>(0,t.addPointInteger)(Math.round(e)),s.tooltip.formatter=e=>function(e){let r=`${e.name} : `;return r+=`<span style="font-weight:bold">${(0,t.addPointInteger)(Math.round(e.value))}</span>`,e.marker+r}(e),(0,t.initChart)(e.idChart,s)}}function et(t,e){tt({idChart:"chartAccesosGauge",idNoData:"no_dataAccesosGauge",chartName:`${F[U].get("chartAccesosGauge")}${e.resultset[0][2]}`,fontSize:12,paramOffsetCenterTitle:15,paramOffsetCenterDetail:30,paramOffsetLabel:-75,paramCalculatedOffset:75,paramNumberOfElementsByLine:3},e)}function rt(t,e){tt({idChart:"chartViesGaugeYear",idNoData:"no_dataViesGaugeYear",chartName:`${F[U].get("chartViesGaugeYear")}${e.resultset[0][2]}`,fontSize:12,paramOffsetCenterTitle:15,paramOffsetCenterDetail:30,paramOffsetLabel:-90,paramCalculatedOffset:90,paramNumberOfElementsByLine:3},e)}function nt(t,e){N(e,!0,1,"VIES PRINCIPALS DE LA CIUTAT: HISTÒRIC MENSUAL","Vehicles","chartViesLineMonth","no_dataViesLineMonth",void 0,!0)}function ot(t,e){x("chartViesBar","no_dataViesBar",e.resultset,"Vehicles","VIES PRINCIPALS DE LA CIUTAT: HISTÒRIC ANUAL","")}function it(t,e){if(0===e.resultset.length)S("#chartAccesosPie","#no_dataAccesosPie");else{A("#no_dataAccesosPie","#chartAccesosPie");const t=M("chartAccesosPie"),r=e.resultset,n=[],o=0,i=1,a=2;for(let t=0;t<r.length;t+=1)n.push({value:r[t][i],name:r[t][o]});const s=function(t,e,r,n=p){return{textStyle:{fontFamily:"Montserrat"},title:{text:t,left:"center",top:"top",padding:10,textStyle:{fontSize:r-4,fontFamily:"Montserrat",fontWeight:600,color:"#666"}},tooltip:{trigger:"item",textStyle:{fontFamily:"Montserrat"},formatter:t=>k(t,!0)},legend:{orient:"horizontal",textStyle:{fontFamily:"Montserrat"},left:e.length>5?"10%":"12%",bottom:"10%",top:"65%",selectedMode:!1},series:[{type:"pie",radius:"33%",data:e,color:n,top:"-30%",emphasis:{itemStyle:{shadowBlur:10,shadowOffsetX:0,shadowColor:"rgba(0, 0, 0, 0.5)"}}}],toolbox:{show:!0,feature:{saveAsImage:{title:"Desar"}},right:10,top:20}}}(`ACCESSOS A LA CIUTAT: DISTRIBUCIÓ ANY ${r[0][a]}`,n,t+3);B("chartAccesosPie",s)}}function at(e,r){if(0===r.resultset.length)S("#chartAccesosHorStackedBar","#no_dataAccesosHorStackedBar");else{A("#no_dataAccesosHorStackedBar","#chartAccesosHorStackedBar");const e=r.resultset,n={title:{text:"ACCESSOS A LA CIUTAT: HISTÒRIC ANUAL"},color:["#9c89b8","#4ea8de","#05668d","#ffbf69","#e56b6f","#83c5be","#02c39a","#ee9b00","#cdb4db","#ffadad","#ce4257","#b7b7a4"],xAxis:{name:"\n\n\n\nVehicles"}};(0,t.initStackedBarChart)("chartAccesosHorStackedBar",e,n)}}function st(t,e){x("chartAccesosStackedBar","no_dataAccesosStackedBar",e.resultset,"Vehicles","ACCESSOS A LA CIUTAT: HISTÒRIC MENSUAL")}function ut(t="myMap",e=5,r=20,n=13,o,i,a,s){const u=L.map(t).setView([39.46975,-.37739],n),c=L.tileLayer("https://{s}.basemaps.cartocdn.com/light_all/{z}/{x}/{y}{r}.png",{attribution:'&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors &copy; <a href="https://carto.com/attributions">CARTO</a>',subdomains:"abcd",maxZoom:20});u.setMinZoom(e),u.setMaxZoom(r),c.addTo(u),ct(u,o,i,a,{listOfselectedElements:[],elementExist(t){return this.listOfselectedElements.filter((e=>e===t)).length>0},deleteElementOfList(t){const e=this.listOfselectedElements.indexOf(t);e>-1&&this.listOfselectedElements.splice(e,1)}},s)}function ct(t,e,r,n,o,i){function a(t){return{iconUrl:(e=t,`${document.documentURI.split("%3A")[0]}%3A${document.documentURI.split("%3A")[1]}%3A${document.documentURI.split("%3A")[2]}%3A${document.documentURI.split("%3A")[3]}%3A${e}`),iconSize:[34,34],shadowSize:[50,64],iconAnchor:[17,17],shadowAnchor:[4,62],popupAnchor:[-3,-76]};var e}const s=L.icon(a(r)),u=L.icon(a(n));L.geoJSON(e,{onEachFeature:function(a,s){a.properties&&a.properties.address&&s.on("click",(()=>{o.elementExist(a.properties.objectoId)?o.deleteElementOfList(a.properties.objectoId):o.listOfselectedElements.push(a.properties.objectoId),i&&Dashboards.fireChange(i,o.listOfselectedElements),ct(t,e,r,n,o,i)}))},pointToLayer(t,e){let r=s;return o.elementExist(t.properties.objectoId)&&(r=u),L.marker(e,{icon:r})}}).addTo(t)}function lt(t,e){document.querySelector("#tabPuntsMesuraCiutat").addEventListener("click",(()=>{requestAnimationFrame((()=>{ut("idMapPuntsMesuraCiutat",5,20,14,function(t,e=0,n=1,o=2){const{Buffer:i}=r(8287),a=r(543),s={type:"FeatureCollection",features:[]},u=[],c=new Set;return t.forEach((t=>{const e=t[o];c.has(e)||(c.add(e),u.push(t))})),u.forEach((t=>{const r=a.Geometry.parse(i.from(t[o],"hex")),u={type:"Feature",properties:{objectoId:t[e],address:t[n]},geometry:r.toGeoJSON()};s.features.push(u)})),s}(e.resultset,0,1,3),"build/images/mapas/marker-icon-vehiculos.svg/content","build/images/mapas/marker-icon-selected-vehiculos.svg/content","puntoMedidaLaneId")}))}))}function ft(t,e){N(e,!0,-6,"TRÀNSIT DE VEHICLES: PUNTS DE MESURA DE LA CIUTAT","Vehicles","chartPuntsMesuraCiutat","no_dataPuntsMesuraCiutat")}})(),n})()));
2
+ !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.vehicles=e():t.vehicles=e()}(self,(()=>(()=>{var t={2725:t=>{var e;self,e=()=>(()=>{"use strict";var t={d:(e,r)=>{for(var n in r)t.o(r,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:r[n]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};t.r(e),t.d(e,{THRESHOLDS:()=>ut,addPointInteger:()=>f,buildCamarasTrafico:()=>yt,buildTableCalidadAire:()=>ct,calculateMaxYAxis:()=>S,calculatePentahoPath:()=>ft,calculateXAxisStart:()=>w,chartBar:()=>Et,chartTop10:()=>xt,checkAllGroupsCollapsed:()=>at,configureDataBar:()=>P,configureDataGaugeCommon:()=>M,configureDataGaugeMonthCommon:()=>I,configureDataLine:()=>O,configureDataValidate:()=>Rt,configureLinesChartValidates:()=>Nt,convertToLanguageSelectorDateRange:()=>X,convertToTableTreeView:()=>it,distributionChart:()=>Mt,downloadCSVTable:()=>st,downloadPDFTable:()=>lt,formatCellMultiplesLines:()=>rt,formatDayMonthYear:()=>a,formatMilMillionEuros:()=>x,formatMonthAnyo:()=>i,formatName:()=>d,formatNameHeaderColumn:()=>et,formatRoundTooltip:()=>A,formatShortMonthShortYear:()=>l,formatShortMonthYear:()=>s,formatToMillions:()=>p,formatToTons:()=>h,formatTooltip:()=>b,formatTooltipPie:()=>v,formatTrimestre:()=>u,gaugeChart:()=>At,getEnvironment:()=>pt,getMaxFieldNumberFromData:()=>B,getMonth:()=>n,getMonthList:()=>c,getSelectCommonOptions:()=>Z,getSelectTwoColumnsOptions:()=>J,initBarChart:()=>vt,initBarChartComparationMonth:()=>Ct,initChart:()=>y,initStackedBarChart:()=>bt,initStackedBarChartMonthSeries:()=>St,initTable:()=>tt,initValueDefaultDate:()=>Y,initialCalls:()=>dt,loadIframeOnClickEvent:()=>Lt,printDataChart:()=>m,printDataInHTMLElements:()=>L,printNoDataChart:()=>g,resetFilter:()=>G,resetFilterDate:()=>q,resetFilterDates:()=>H,resetFilterToDefault:()=>Q,resultsetWithFields:()=>T,selectConfigDatasource:()=>V,selectConfigDatasourceAllValue:()=>j,selectFilterAll:()=>W,selectValueDefaultInFilter:()=>K,splitDataset:()=>F,traverseRows:()=>ot,updateDomElement:()=>_,updateObject:()=>C,updateStackedBarOptions:()=>wt});const r={"01":"Enero","02":"Febrero","03":"Marzo","04":"Abril","05":"Mayo","06":"Junio","07":"Julio","08":"Agosto","09":"Septiembre",10:"Octubre",11:"Noviembre",12:"Diciembre"};function n(t){return{1:"Gen",2:"Feb",3:"Mar",4:"Abr",5:"Mai",6:"Jun",7:"Jul",8:"Ago",9:"Sep",10:"Oct",11:"Nov",12:"Des"}[parseInt(t.toString(),10)]}function o(t){return[t.substring(0,4),r[t.substring(4,6)]]}function i(t){const[e,r]=o(t);return`${r} ${e}`}function a(t){const[e,n,o]=function(t){return[t.substring(0,4),r[t.substring(4,6)],t.substring(6,8)]}(t);return`${o} ${n} ${e}`}function s(t){const[e,r]=o(t);return`${r.substring(0,3)} ${e}`}function l(t){const[e,r]=o(t);return`${r.substring(0,3)} '${e.substring(2,4)}`}function u(t){const[e,r]=t.split("-");return`${parseFloat(r)/3}T ${e}`}function c(t,e){const r=t[e];return Array.from(r.values()).map((t=>t.slice(0,3)))}function f(t,e=2){let r=navigator.language||navigator.userLanguage;r=r.length<=2?`${r}-${r.toUpperCase()}`:r;const n={minimumFractionDigits:0,maximumFractionDigits:e};return"es-ES"===r?t.toLocaleString("de-DE",n):t.toLocaleString(r,n)}function p(t){const e=1e6;return t>=e?t/e+"M":t.toString()}function h(t){return t>=1e3?t/1e3+" Tn":t.toString()}function d(t,e=29){if(t.length>=e){const r=t.split(" ");let n="",o="";return r.forEach((t=>{`${n} ${t}`.length<=e?n+=(n?" ":"")+t:(o+=`${n}\n`,n=t)})),o+=n,o}return t}function y(t,e){const r=t=>{const r=echarts.init(t);r.setOption(e,!0),window.addEventListener("resize",(()=>{null!=r&&void 0!==r&&r.resize()}));const n=document.getElementById("main-content");return n&&(n.addEventListener("shown.bs.collapse",(()=>{r.resize()})),n.addEventListener("hidden.bs.collapse",(()=>{r.resize()}))),r};let n=document.getElementById(t);return n?r(n):(document.body.addEventListener("MainContentLoadedCustom",(()=>(n=document.getElementById(t),n?r(n):(console.error(`El elemento con ID ${t} no está disponible.`),null)))),null)}function g(t,e){const r=t?document.querySelector(t):null,n=e?document.querySelector(e):null;r&&(r.hidden=!0),n&&(n.style.background="url('./build/images/nodata1.png') no-repeat top center",n.hidden=!1)}function m(t,e){const r=t?document.querySelector(t):null,n=e?document.querySelector(e):null;r&&(r.hidden=!0),n&&(n.style.background="#ffffff",n.hidden=!1)}function b(t,e=!1,r=!0,n=""){let o=`<p style="font-weight: 500;color: #565656;">${t[0].name}</p>`;return t.forEach((t=>{const i=e?Math.round(t.data):t.data,a=r?`<div style="font-weight: 400;color: #666;">${s=t.color,`<span style="display:inline-block;margin-right:5px;border-radius:10px;width:9px;height:9px;font-weight: 500;background-color:${s}"></span>`} ${t.seriesName}: \n <span style="float: right; margin-left:20px;font-weight: 600;color: #565656;">\n ${t.data?`${f(i)} ${n}`:"-"}\n </span>\n </div>`:`<div>\n <span style="font-weight: 600;color: #565656;">${t.data?`${f(i)} ${n}`:"-"}\n </span>\n </div>`;var s;o+=a})),o}function w(t){return 100*(t-120)/t}function S(t,e){const r=Math.max(...t);return r+(e-r%e)}function v(t,e=!1){const r=`<span style="display:inline-block;margin-right:5px;border-radius:10px;width:9px;height:9px;background-color:${t.color}"></span>`,n=e?`${t.percent}%`:f(t.value);return`<div> ${r} ${t.name} <span style="float: right; margin-left:20px;font-weight: 600;color: #333;"> ${n} </span></div>`}function A(t,e){let r=`${t.name} : `;return r+=`<span style="font-weight:500">${f(Math.round(t.value))}</span>`,e&&(r+=`<span> (${t.percent}%)</span>`),t.marker+r}function x(t){const e=1e6,r=Number(t);return r>=0&&r<e?`${f(r)} €`:r>=e?`${f(r/e)} M €`:"-"}function E(t,e,r=1){const n=Math.max(...t.map((t=>t[e])))*r;return 5e3*Math.ceil(n/5e3)}function M(t,e,r,n=30,o=15,i=30,a=-70,s=70,l=3){const u=E(t,e.data,1.1),c=s,p=r.slice(),h=[];let y=o,g=i,m=a;for(let r=0;r<t.length;r+=1)h.push({value:t[r][e.data],name:d(String(t[r][e.type]).replace(/\[.*?\]/g,"")),color:p.shift(),title:{offsetCenter:[`${String(m)}%`,`${String(y)}%`],fontFamily:"Montserrat",fontSize:n},detail:{offsetCenter:[`${String(m)}%`,`${String(g)}%`],fontFamily:"Montserrat",width:"33%",formatter:t=>f(Math.round(t))}}),m+=c,(r+1)%l==0&&(g+=i,y+=2*o,m=a);return[u,h]}function I(t,e,r,o=0){return[E(e,r.data,1),t=>function(t,e,r){const o=f(Math.round(e)),i=n(t[r][0]),a=t[r][1],s=`\n${i} ${a} : ${o}`,l=`${o}\n${i} ${a}`;return window.innerWidth<=1710?s:l}(e,t,o),[{value:e[o][r.data]}]]}function k(t,e){const{resultset:r}={resultset:t},n=new Set,o=new Set,i=r.map((([t,r,i])=>{const a=e?Math.round(i):i;return n.add(t),o.add(r),{day:r,type:t,value:a}})),a=Array.from(o.values()),s=Array.from(n.values());return s.sort(((t,e)=>t.toLowerCase().localeCompare(e.toLowerCase(),"es",{ignorePunctuation:!0}))),[s.map((t=>{const e=i.filter((e=>e.type===t)).map((({day:e,value:r})=>[e,t,r])),r=a.map((t=>{const r=e.find((([e])=>e===t));return r?r[2]:null}));return{name:t,data:r}})),s,o]}function O(t,e=[],r=!1){const[n,o,i]=k(t,r);return n.forEach((t=>{t.type="line",t.symbol="circle",t.symbolSize=6,t.smooth=.1,e.length>0&&(t.color=e.shift())})),[n,i,o]}function P(t,e,r=!1){const[n,o,i]=k(t,r);return n.forEach((t=>{t.type="bar",t.color=e.shift(),t.smooth=!1})),[n,i,o]}function T(t){const{resultset:e,metadata:r}=t,n=[];return e.forEach((t=>{const e={};t.forEach(((t,n)=>{e[r[n].colName]=t})),n.push(e)})),n}function C(t,e){const r={...t};return Object.keys(e).forEach((n=>{Object.prototype.hasOwnProperty.call(e,n)&&("series"===n&&Array.isArray(e[n])?r[n]=e[n].map(((e,r)=>({...Array.isArray(t[n])&&t[n][r]||{},...e}))):"object"!=typeof e[n]||null===e[n]||Array.isArray(e[n])?t[n]!==e[n]&&(r[n]=e[n]):r[n]=C(t[n]||{},e[n]))})),r}function L(t,e){console.log("INICIO HTML");const r=()=>{t.forEach((t=>{t.id in e&&Object.entries(e[t.id]).forEach((r=>{const n=r[0],o=r[1];"object"==typeof o?o.className?document.querySelector(o.className).className=t[n]:o.element&&o.format&&(document.querySelector(o.element).textContent=e[t.id][n].format(t[n])):document.querySelector(o).textContent=t[n]}))}))};try{r()}catch(t){document.body.addEventListener("MainContentLoadedCustom",(()=>{r()}))}}function B(t,e){const r=T(t),n=[];let o=null;return r.forEach((t=>{const r=t[e];"number"!=typeof r||Number.isNaN(r)||n.push(r)})),n.length>0&&(o=Math.max(...n)),o}function _(t,e){const r=document.querySelector(t);r?r.textContent=e:console.warn(`Elemento ${t} no encontrado en el DOM`)}function F(t,e=!0){const r={Cont:[],Mob:[]};return t.forEach((t=>{"is-res-001-kgs-contenidors"===t[0]&&"total"===t[1]&&(e?r.Cont.push([t[3],t[4],t[2]]):r.Cont.push([t[3],t[2]])),"Mobles"===t[1]&&(e?r.Mob.push([t[3],t[4],t[2]]):r.Mob.push([t[3],t[2]]))})),r}const R=["Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre"],N=["Ene","Feb","Mar","Abr","May","Jun","Jul","Ago","Sep","Oct","Nov","Dic"],U=["Domingo","Lunes","Martes","Miércoles","Jueves","Viernes","Sábado"],D=["Dom","Lun","Mar","Mié","Juv","Vie","Sáb"],$=["Do","Lu","Ma","Mi","Ju","Vi","Sá"];function W(t){const e=t.resultset.map((t=>t[0]));return this.dashboard.fireChange(this.parameter,e),t}function z(t){for(const e of t)if(Array.isArray(e)){if(!z(e))return!1}else if("All"!==e)return!1;return!0}function V(t,e,r,n){return z(e)?(t.queryDefinition.dataAccessId=r,t.dashboard.setParameter(t.parameter,["All"])):t.queryDefinition.dataAccessId=n,!0}function j(t){return t.dashboard.setParameter(t.parameter,["All"]),!0}function G(t){t.forEach((t=>{Dashboards.fireChange(t,["All"])}))}function Z(t="Todos"){return{input:{root:{id:"All"},indexes:{id:0,label:0}},component:{Root:{strings:{isDisabled:"No disponible",allItems:t,noItems:"Ninguno",btnApply:"Aceptar",btnCancel:"Cancelar"}},Group:{Strings:{allItems:"Todos",noItems:"Ninguno",btnApply:"Aceptar",btnCancel:"Cancelar"}}}}}function J(t="Todos"){const e=Z(t);return e.input.indexes.id=1,e.input.indexes.label=0,e}function H(t,e,r,n){const o=Dashboards.getParameterValue(r),i=Dashboards.getParameterValue(n);return Dashboards.fireChange(t,[o]),Dashboards.fireChange(e,[i]),!0}function q(t,e){const r=Dashboards.getParameterValue(e);return Dashboards.fireChange(t,[r]),!0}function Y(t,e){Dashboards.fireChange(e,t.resultset[0][0])}function K(t,e){const r=Dashboards.getParameterValue(e),n=t.parameter;t.dashboard.setParameter(n,[r])}function X(t){t.regional.es={monthNames:R,abbreviatedMonthNames:N,dayNames:U,abbreviatedDayNames:D,dayNamesMin:$,weekHeader:"Sm",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},t.setDefaults(t.regional.es)}function Q(t,e){const r=Dashboards.getParameterValue(e);return Dashboards.fireChange(t,Array.isArray(r)?r:[r]),!0}function tt(t,e){const r=document.getElementById(t);return r?new Tabulator(r,e):(console.error(`No se pudo encontrar el elemento con ID ${t}.`),null)}function et(t,e){let r=t.getValue();return r.length>e&&(r=`${r.substr(0,e)}<br>${r.substr(e)}`),r}function rt(t,e){const r=t.getValue().split(" ");let n="",o="";return r.forEach((t=>{(o+t).length<=e?o+=`${t} `:(n+=`${o}<br>`,o=`${t} `)})),n+=`${o}<br>`,n}function nt(t,e){"expand"===e?t.treeExpand():t.treeCollapse();const r=t.getTreeChildren();r.length>0&&r.forEach((t=>{t.getTreeChildren().length>0&&nt(t,e)}))}function ot(t,e){t.getRows().forEach((t=>{t.getTreeChildren().length>0&&nt(t,e)}))}function it(t,e,r,n){const o=[];for(const i in t)if(t.hasOwnProperty(i)){const a=t[i],s={[e]:a[0],_children:[]};a.shift(),a.forEach(((t,o)=>{const i={[e]:r[o],[n]:t};s._children.push(i)})),o.push(s)}return o}function at(t){let e=!0;return t.getGroups().forEach((t=>{t._group.visible&&(e=!1)})),e}function st(t,e,r){const n=document.getElementById(r),o=n.cloneNode(!0);n.parentNode.replaceChild(o,n),o.addEventListener("click",(()=>{t.download("csv",`${e}.csv`,{delimiter:";"})}))}function lt(t,e,r){const n=document.getElementById(r),o=n.cloneNode(!0);n.parentNode.replaceChild(o,n),o.addEventListener("click",(()=>{t.download("pdf",`${e}.pdf`,{title:e,rowCalcStyles:{fontSize:8,fontStyle:"bold"},autoTable:{styles:{fontSize:8}}})}))}const ut={SO2:[100,200,350,500,750,751],NO2:[40,90,120,230,340,341],O3:[50,100,130,240,380,381],PM10:[20,40,50,100,150,151],PM25:[10,20,25,50,75,76]};function ct(t){const e=[],r={0:"b",1:"a",2:"d",3:"m",4:"mm",5:"em",6:"",7:"nd"};function n(t,e,n){const o=document.createElement("td");if(o.setAttribute("id",t),null!=e){o.innerHTML=e;const t=function(t,e){let n;return void 0===e?n=6:"ND"===e?n=7:(n=5,t.forEach(((t,r)=>{e<=t&&5===n&&(n=r)}))),r[n]}(n,e);o.classList.add(t)}return o}return t.forEach((t=>{const r=t;"noData"===r.operationalstatus&&(r.so2value="ND",r.no2value="ND",r.o3value="ND",r.pm10value="ND",r.pm25value="ND"),"A09_CABANYAL_60m"===r.entityid&&(r.pm10value=void 0,r.pm25value=void 0);const o=document.createElement("tr"),i=document.createElement("td");i.innerHTML=r.address,o.appendChild(i),o.appendChild(n(`${r.entityid}_so2`,r.so2value,ut.SO2)),o.appendChild(n(`${r.entityid}_no2`,r.no2value,ut.NO2)),o.appendChild(n(`${r.entityid}_o3`,r.o3value,ut.O3)),o.appendChild(n(`${r.entityid}_pm10`,r.pm10value,ut.PM10)),o.appendChild(n(`${r.entityid}_pm25`,r.pm25value,ut.PM25)),e.push(o)})),e}function ft(t){document.location=`${document.documentURI.split("%3A")[0]}%3A${document.documentURI.split("%3A")[1]}%3A${document.documentURI.split("%3A")[2]}%3A${document.documentURI.split("%3A")[3]}%3A${t}`}function pt(){const t=window.location.href;let e="";return e=t.includes("localhost")?"local":t.includes("sc_valencia_pre")?"PRE":"PRO",e}function ht(t,e){document.querySelectorAll(`[${t}]`).forEach((r=>{!function(t,e,r){const n=e;if(t){const e=new XMLHttpRequest;e.onreadystatechange=function(){4===this.readyState&&(200===this.status&&(n.innerHTML=this.responseText,r&&r()),404===this.status&&(n.innerHTML="No se ha podido cargar correctamente."))},e.open("GET",t,!0),e.send()}}(r.getAttribute(t),r,e)}))}function dt(t){ht("include-html-cabecera",(function(){!function(){const t=pt();"PRO"!==t&&(document.title+=` (${t})`)}(),function(){const t=pt();"PRO"!==t&&(document.querySelector("nav").querySelectorAll("span")[1].textContent+=` (${t})`)}()})),ht("include-html-menu"),ht("include-html-main-container",(function(){document.body.dispatchEvent(new Event("MainContentLoadedCustom")),function(){const t=document.querySelector("body");t.classList.remove("inicio"),t.classList.add(document.documentURI.split("%3A")[4].match(/(.*?).wcdf/)[1])}(),t&&t()})),ht("include-html-copyright")}function yt(t,e,r,n,o,i){let a=!1,s=!1;const l=document.querySelector(t),u=document.querySelector(e),c=()=>{"undefined"!=typeof Liferay&&"ca-ES"===Liferay.ThemeDisplay.getBCP47LanguageId()?(l&&l.setAttribute("src","https://camaras.valencia.es/camaras/ocimovil.html?camara=1&lang=cas"),u&&u.setAttribute("src","https://camaras.valencia.es/camaras/ocimovil.html?lang=cas")):(l&&l.setAttribute("src","https://camaras.valencia.es/camaras/ocimovil.html?camara=1&lang=val"),u&&u.setAttribute("src","https://camaras.valencia.es/camaras/ocimovil.html?lang=val"))};function f(t=!0){const e=document.querySelector(r);t?(l&&(l.src="about:blank"),u&&(u.src="about:blank"),e.classList.add("blur"),s=!0):(e.classList.remove("blur"),c(),s=!1)}const p=t=>{new IntersectionObserver((t=>{t.forEach((t=>{t.isIntersecting&&(s||c(),a||(a=!0,window.setTimeout(f,i)))}))})).observe(t)};!function(){const{userAgent:t}=navigator;return/iPad|iPhone|iPod|Macintosh/.test(t)&&!window.MSStream}()?(l&&(l.setAttribute("sandbox","allow-scripts"),p(l)),u&&(u.setAttribute("sandbox","allow-scripts"),p(u)),document.querySelector(o).addEventListener("click",(()=>{f(!1),window.setTimeout(f,i)}))):document.querySelectorAll(n)[0].style.display="none"}const gt={grid:{containLabel:!0},title:{left:"center",top:"0",textStyle:{fontSize:15,fontFamily:"Montserrat",fontWeight:500,color:"#666"}},legend:{orient:"horizontal",bottom:"0",left:"center",width:"100%",textStyle:{fontSize:11,fontFamily:"Montserrat",fontWeight:400,color:"#666"}},toolbox:{show:!0,right:"0",top:"0",feature:{restore:{textStyle:{fontSize:6,fontFamily:"Montserrat",fontWeight:300}},saveAsImage:{textStyle:{fontSize:6,fontFamily:"Montserrat",fontWeight:300}}},emphasis:{iconStyle:{borderColor:"#ffcd00",textFill:"#666"}}},tooltip:{textStyle:{fontFamily:"Montserrat",fontSize:12}},xAxis:[{type:"category",axisLabel:{show:!0,interval:0,textStyle:{fontFamily:"Montserrat",fontSize:11}},data:[]}],yAxis:[{type:"value",alignTicks:!0,position:"right",axisLabel:{textStyle:{fontSize:10,fontFamily:"Montserrat",fontWeight:400},formatter:t=>`${t}%`}},{type:"value",position:"left",axisLabel:{textStyle:{fontSize:10,fontFamily:"Montserrat",fontWeight:400},formatter:t=>`${p(t)}€`}}]},mt=(t,e)=>{e.sort(((t,e)=>parseInt(t.anyo)-parseInt(e.anyo)));const r={};e.forEach((e=>{const n=e[1],o=e[0];o!==t.seriesName||r[n]||(r[n]=0),o===t.seriesName&&(r[n]+=e[2])}));let n=`<p>${t.seriesName}</p>`;for(const[e,o]of Object.entries(r))n+=`<div>${t.marker} ${e}: <span style="float: right; margin-left:20px;font-weight: 600;">${f(o)}</span></div>`;return n};function bt(t,e,r=void 0,n=void 0){const o=null===n?void 0:n,i=new Set(e.map((t=>t[1])));let a;const s={title:{text:"SIN TITULO",left:"center",top:"top",textStyle:{fontSize:20,fontFamily:"Montserrat",fontWeight:600,color:"#666"}},tooltip:{axisPointer:{type:"shadow"},trigger:"item",formatter:t=>mt(t,e),textStyle:{fontFamily:"Montserrat"},position(t,e,r,n,o){const i={},a=o.contentSize[1]/2,s=o.viewSize[1],l=t[1];return l<a?i.top=10:l+a>s?i.bottom=10:i.top=l-a,t[0]<o.viewSize[0]/2?i.left=t[0]+20:i.right=o.viewSize[0]-t[0]+20,i}},legend:{padding:40,textStyle:{fontFamily:"Montserrat"}},grid:{left:"3%",right:"4%",bottom:"3%",containLabel:!0},xAxis:{type:"value",splitNumber:10,name:"SIN NOMBRE",nameLocation:"start",nameTextStyle:{fontWeight:"bold",fontFamily:"Montserrat",color:"#666",padding:-40},axisLabel:{margin:5,textStyle:{fontFamily:"Montserrat"},formatter:t=>f(t)},splitLine:{lineStyle:{color:"#DDD"}}},yAxis:{type:"category",data:Array.from(i),axisLabel:{textStyle:{fontFamily:"Montserrat"}}},series:(()=>{const t={name:"SIN NOMBRE",type:"bar",stack:"total",label:{show:!0,fontFamily:"Montserrat",fontSize:10,formatter:t=>f(Math.round(t.value))},itemStyle:void 0,emphasis:{focus:"series"},data:void 0};o&&o.itemStyle&&Array.isArray(o.itemStyle.borderColor)&&(a=[...o.itemStyle.borderColor],delete o.itemStyle.borderColor);const r=function(t){return t.reduce(((t,e)=>{const r=e[0];return t[r]||(t[r]=[]),t[r].push(e),t}),{})}(e),n=Object.keys(r);i.forEach((t=>{n.forEach((e=>{void 0===r[e].find((e=>e[1]===t))&&(r[e].push([r[e][0][0],t,void 0]),r[e].sort())}))}));const s=[];return Object.keys(r).forEach((e=>{a&&(t.itemStyle={borderColor:a.shift()}),t.name=e,t.data=r[e].map((t=>t[2]));let n={};n=void 0!==o?C(t,o):t,s.push({...n})})),s})(),toolbox:{show:!0,feature:{restore:{title:"Restablir"},saveAsImage:{title:"Desar"}},right:50}};let l={};l=void 0!==r?C(s,r):s,y(t,l)}function wt(t){let e={};return e=C(gt,t),e}function St(t,e,r={},o={}){let i={};i=C(r,{color:["#81B1CC","#ABD9EA","#C2EEF9","#F9E2AF","#F9C780","#FDAE61","#F46D43","#FDAE61","#F9E2AF","#C2EEF9","#ABD9EA","#81B1CC"],yAxis:{data:function(){const t=new Set;return e.forEach((e=>{t.add(e[1])})),Array.from(t).sort(((t,e)=>t-e))}()}});const a={itemStyle:{borderWidth:2,borderColor:["#448DAD","#89CADB","#A0DEE8","#F4D28C","#F4B569","#F79646","#F25930","#F79646","#F4D28C","#A0DEE8","#89CADB","#448DAD"]}},s=null===o?a:C(o,a),l=e;l.forEach(((t,e)=>{l[e][0]=n(t[0])})),bt(t,l,i,s)}function vt(t,e=void 0){const r={title:{text:"SIN TITULO",left:"center",top:"top",padding:50,textStyle:{fontSize:14,fontFamily:"Montserrat",fontWeight:400,color:"#333"}},legend:{show:!1},grid:{top:"30%",bottom:"5%",left:"8%",right:"8%"},xAxis:{type:"value",show:!1},yAxis:{show:!1,type:"category"},tooltip:{show:!0,textStyle:{fontFamily:"Montserrat",fontWeight:"600"},appendToBody:!0,formatter:t=>A(t,!1)},series:[{type:"bar",showBackground:!0}]};let n={};n=void 0!==e?C(r,e):r,y(t,n)}function At(t,e,r,n,o,i){const a={grid:{left:"0",right:"0",bottom:"0",top:"50",containLabel:!0},title:{text:r,margin:"0",padding:0,top:"0",left:"60%",textAlign:"center",itemGap:5,textStyle:{fontSize:15,lineHeight:15,fontFamily:"Montserrat",fontWeight:"500",color:"#666"},subtext:n,subtextStyle:{fontFamily:"Montserrat",fontSize:12,lineHeight:12,fontWeight:500,color:"#666",width:"100%"}},legend:{show:!1,top:"bottom",textStyle:{fontSize:11,fontFamily:"Montserrat",fontWeight:"400",color:"#666"}},toolbox:{show:!0,right:"0",top:"0",feature:{saveAsImage:{title:"Descargar",textStyle:{fontSize:6,fontFamily:"Montserrat",fontWeight:300}}},emphasis:{iconStyle:{borderColor:"#ffcd00",textFill:"#666"}}},series:[{type:"gauge",center:["50%","65%"],startAngle:200,endAngle:-20,min:0,max:i,splitNumber:10,progress:{show:!0,width:40,itemStyle:{color:"#4BA3C3"}},pointer:{show:!1},axisLine:{lineStyle:{width:40}},axisTick:{distance:-50,splitNumber:5,lineStyle:{width:2,color:"#ccc"}},splitLine:{distance:-55,length:9,lineStyle:{width:2,color:"#ccc"}},axisLabel:{distance:0,textStyle:{color:"#999",fontStyle:"normal",fontWeight:"400",fontFamily:"Montserrat",fontSize:12}},anchor:{show:!1,showAbove:!0,size:35,itemStyle:{borderWidth:40,color:"#284B63"}},detail:{formatter:t+e,width:"60%",borderRadius:8,offsetCenter:[0,0],valueAnimation:!0,textStyle:{color:"#284B63",fontStyle:"normal",fontWeight:"600",fontFamily:"Montserrat",fontSize:30}},data:[{value:t}]}]};echarts.init(document.getElementById(o)).setOption(a)}function xt(t,e,r,n){return{grid:{top:"15%",bottom:"3%",left:"3%",right:"3%"},title:{text:t,margin:"0",padding:0,top:"0",left:"50%",textAlign:"center",itemGap:5,textStyle:{fontFamily:"Montserrat",fontSize:18,fontWeight:600,color:"#666"},subtext:e,subtextStyle:{fontFamily:"Montserrat",fontSize:17,fontWeight:500,color:"#666"}},tooltip:{textStyle:{fontFamily:"Montserrat"},renderMode:"html",tooltipFormatter:n},yAxis:{data:r.map((t=>t[0])),axisLabel:{show:!1}},series:[{data:r.map((t=>t[1])),type:"bar",barWidth:"75%",barCategoryGap:"20%",label:{show:!0,position:"insideLeft",formatter:"{b}",width:400,overflow:"truncate",textStyle:{fontSize:13,fontWeight:600,fontFamily:"Montserrat",color:"#284B63"}},itemStyle:{color:"#82bed4"}}]}}function Et(t,e,r,n,o){const i={grid:{left:"0",right:"0",bottom:"0",top:"60",containLabel:!0},title:{text:t,margin:"0",padding:0,top:"0",left:"50%",textAlign:"center",itemGap:5,textStyle:{fontSize:"15",lineHeight:15,fontFamily:"Montserrat",fontWeight:"500",color:"#666"},subtext:e,subtextStyle:{fontFamily:"Montserrat",fontSize:12,lineHeight:12,fontWeight:500,color:"#666",width:"100%"}},toolbox:{show:!0,right:"0",top:"0",feature:{saveAsImage:{title:"Descragar",textStyle:{fontSize:6,fontFamily:"Montserrat",fontWeight:300}}},emphasis:{iconStyle:{borderColor:"#ffcd00",textFill:"#666"}}},legend:{show:!1,orient:"vertical",top:"55",bottom:"5",left:"0",padding:[0,0],width:"20%",itemHeight:10,itemWidth:11,itemGap:10,textStyle:{fontSize:"12",lineHeight:14,fontFamily:"Montserrat",fontWeight:"400",color:"#666",width:210,overflow:"break"}},tooltip:{trigger:"axis",confine:!0,axisPointer:{type:"none"},textStyle:{fontFamily:"Montserrat",fontSize:12,fontWeight:500}},xAxis:{data:r,axisLabel:{show:!0,margin:6,textStyle:{fontSize:11,fontFamily:"Montserrat",fontWeight:"500"}}},yAxis:{type:"value",alignTicks:!0,scale:!0,axisLabel:{formatter:"{value} kWh",textStyle:{fontSize:11,fontFamily:"Montserrat",fontWeight:400}}},series:[{data:n,type:"bar",itemStyle:{color:"#4BA3C3"}}]};echarts.init(document.getElementById(o)).setOption(i)}function Mt(t,e,r,n,o,i,a){const s=echarts.init(document.getElementById(n)),l={grid:{left:"0",right:"0",bottom:"0",top:"50",containLabel:!0},title:{text:t,margin:"0",padding:0,top:"0",left:"50%",textAlign:"center",itemGap:5,textStyle:{fontSize:"15",lineHeight:15,fontFamily:"Montserrat",fontWeight:"500",color:"#666"},subtext:e,subtextStyle:{fontFamily:"Montserrat",fontSize:12,lineHeight:12,fontWeight:500,color:"#666",width:"100%"}},toolbox:{show:!0,right:"0",top:"0",feature:{saveAsImage:{title:"Descargar",textStyle:{fontSize:6,fontFamily:"Montserrat",fontWeight:300}}},emphasis:{iconStyle:{borderColor:"#ffcd00",textFill:"#666"}}},legend:{show:!1},tooltip:{textStyle:{fontFamily:"Montserrat",fontSize:12,color:"#666",fontWeight:500},formatter:function(t){return t.value[2]+r+o[t.value[0]]+a}},xAxis:{type:"category",data:o,boundaryGap:["20%","20%"],gridIndex:0,offset:0,axisTick:{show:!1},axisLine:{lineStyle:{color:"#ccc"}},axisLabel:{show:!0,interval:0,rotate:0,padding:0,margin:10,fontSize:10,lineHeight:13,fontFamily:"Montserrat",fontWeight:400,color:"#333"}},yAxis:{type:"category",data:a,axisLine:{show:!1},axisTick:{show:!1},axisLabel:{show:!0,fontSize:10,fontFamily:"Montserrat",fontWeight:500,color:"#333"}},series:[{name:"Consum Energètic",type:"scatter",color:"#4BA3C3",symbolSize:function(t){return 11*t[2]},data:i,animationDelay:function(t){return 5*t}}]};l&&s.setOption(l),window.addEventListener("resize",s.resize)}const It="es_ES",kt={es_ES:new Map([["1","Enero"],["2","Febrero"],["3","Marzo"],["4","Abril"],["5","Mayo"],["6","Junio"],["7","Julio"],["8","Agosto"],["9","Septiembre"],["10","Octubre"],["11","Noviembre"],["12","Diciembre"]]),ca_ES:new Map([["1","Gener"],["2","Febrer"],["3","Març"],["4","Abril"],["5","Maig"],["6","Juny"],["7","Juliol"],["8","Agost"],["9","Setembre"],["10","Octubre"],["11","Novembre"],["12","Desembre"]])};function Ot(t){return Math.max(...t.map((t=>Number(t[0]))))}function Pt(t){const e=t.filter((e=>Number(e[0])===Ot(t))),r=Array.from({length:12},(()=>0));return e.forEach((([t,e,n])=>{const o=parseInt(e,10)-1;r[o]=n})),r}function Tt(t){const e=t.filter((e=>Number(e[0])===Ot(t)-1)),r=Array.from({length:12},(()=>0));return e.forEach((([t,e,n])=>{const o=parseInt(e,10)-1;r[o]=n})),r}function Ct(t,e,r=void 0){const n=Ot(e).toString(),o=(Ot(e)-1).toString();vt(t,C({title:{left:"center",top:"-12%",textStyle:{fontSize:15,fontFamily:"Montserrat"}},legend:{top:"10%",show:!0,data:[o,n],textStyle:{fontFamily:"Montserrat"}},grid:{bottom:"8%",top:"20%",right:"2%"},xAxis:[{type:"category",data:c(kt,It),interval:0,margin:10,axisLabel:{textStyle:{fontSize:10,fontFamily:"Montserrat",fontWeight:400}}}],yAxis:[{type:"value",axisLabel:{formatter:t=>t.toLocaleString("es-ES"),textStyle:{fontSize:10,fontFamily:"Montserrat",fontWeight:400}}}],series:[{name:o,type:"bar",data:Tt(e)},{name:n,type:"bar",barGap:0,data:Pt(e)}]},r))}function Lt(t,e,r){const n=document.querySelector(e),o=document.querySelector(t);let i=!1;o.addEventListener("click",(()=>{!1===i&&(i=!0,n.setAttribute("src","about:blank"),n.setAttribute("src",r),n.onload=()=>{i=!1})})),o.disabled=!1}const Bt="id",_t="fecha",Ft="value";function Rt(t,e,r,n,o="es_ES"){const[i,a]=function(t,e,r){const n=[],o=[];return t.forEach((t=>{e.includes(`${t[Bt]}`)?n.push(`${t[_t]}`):r.includes(`${t[Bt]}`)&&o.push(`${t[_t]}`)})),[n.map((t=>[t,0])),o.map((t=>[t,0]))]}(t,r,n);let s="es_ES"==o?"Datos sin validar":"Dades sense validar";0===a.length&&(s="");const l={name:"Datos validados",type:"line",data:[...i,a[0]],lineStyle:{color:"#00A9A0",width:4},showSymbol:!1,tooltip:{show:!1}};let u="",c="";if(0===a.length){const e=t[t.length-1].fecha;u=e,c=e}else u=a[0][0],c=a[a.length-1][0];return[...e,l,{name:"Datos NO validados",type:"line",data:a,lineStyle:{color:"#80D4CF",width:4},showSymbol:!1,tooltip:{show:!1},markArea:{silent:!0,itemStyle:{opacity:.6,color:"#eee"},tooltip:{show:!1},label:{color:"#333",fontStyle:"normal",fontWeight:"400",fontFamily:"Montserrat",fontSize:11},data:[[{name:s,xAxis:u,yAxis:0},{name:"end",xAxis:c,yAxis:Math.max(...t.filter((t=>null!==t[Ft])).map((t=>parseInt(`${t[Ft]}`,10))))}]]}}]}function Nt(t,e,r=void 0){y(t,C({grid:{left:"2.5%",right:"5%",bottom:"70",top:"150",containLabel:!0},title:{left:"center",top:"top",textStyle:{fontSize:20,fontFamily:"Montserrat",fontWeight:600,color:"#666"}},legend:{type:"plain",top:"50",width:"98%",textStyle:{fontFamily:"Montserrat"}},tooltip:{trigger:"axis",show:!0,formatter:t=>b(t),textStyle:{fontFamily:"Montserrat"}},xAxis:{type:"category",boundaryGap:!1,splitLine:{show:!1},axisLabel:{textStyle:{fontSize:10,fontFamily:"Montserrat",color:"#666"}}},yAxis:{type:"value",nameLocation:"end",nameGap:"0",nameTextStyle:{fontFamily:"Montserrat",fontWeight:"500",padding:[-25,0,0,-48],margin:0,align:"left",verticalAlign:"top",width:"auto"},scale:!0,splitNumber:"6",axisLabel:{margin:10,textStyle:{fontSize:10,fontFamily:"Montserrat",color:"#666"}}},dataZoom:{end:100,borderColor:"#eee",fillerColor:"rgba(0,0,0,.05)",textStyle:{fontSize:10,fontFamily:"Montserrat",color:"#333",textBorderColor:"#fff",textBorderWidth:3,fontWeight:"600"},selectedDataBackground:{lineStyle:{color:"#333"},areaStyle:{color:"#ffcd00"}},dataBackground:{backgroundColor:"rgba(0,0,0,1)",lineStyle:{color:"#333"},areaStyle:{color:"rgba(0,0,0,0.5)"}},handleStyle:{color:"rgba(0,0,0,0.2)"},moveHandleStyle:{color:"rgba(0,0,0,0.3)"},emphasis:{handleStyle:{color:"rgba(255,205,0,1)"},moveHandleStyle:{color:"rgba(255,205,0,1)"}}},toolbox:{feature:{restore:{title:"Restablir"},saveAsImage:{title:"Desar"}},right:"1%",top:"0%"},series:e},r))}return e})(),t.exports=e()},7526:(t,e)=>{"use strict";e.byteLength=function(t){var e=s(t),r=e[0],n=e[1];return 3*(r+n)/4-n},e.toByteArray=function(t){var e,r,i=s(t),a=i[0],l=i[1],u=new o(function(t,e,r){return 3*(e+r)/4-r}(0,a,l)),c=0,f=l>0?a-4:a;for(r=0;r<f;r+=4)e=n[t.charCodeAt(r)]<<18|n[t.charCodeAt(r+1)]<<12|n[t.charCodeAt(r+2)]<<6|n[t.charCodeAt(r+3)],u[c++]=e>>16&255,u[c++]=e>>8&255,u[c++]=255&e;return 2===l&&(e=n[t.charCodeAt(r)]<<2|n[t.charCodeAt(r+1)]>>4,u[c++]=255&e),1===l&&(e=n[t.charCodeAt(r)]<<10|n[t.charCodeAt(r+1)]<<4|n[t.charCodeAt(r+2)]>>2,u[c++]=e>>8&255,u[c++]=255&e),u},e.fromByteArray=function(t){for(var e,n=t.length,o=n%3,i=[],a=16383,s=0,u=n-o;s<u;s+=a)i.push(l(t,s,s+a>u?u:s+a));return 1===o?(e=t[n-1],i.push(r[e>>2]+r[e<<4&63]+"==")):2===o&&(e=(t[n-2]<<8)+t[n-1],i.push(r[e>>10]+r[e>>4&63]+r[e<<2&63]+"=")),i.join("")};for(var r=[],n=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0;a<64;++a)r[a]=i[a],n[i.charCodeAt(a)]=a;function s(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");return-1===r&&(r=e),[r,r===e?0:4-r%4]}function l(t,e,n){for(var o,i,a=[],s=e;s<n;s+=3)o=(t[s]<<16&16711680)+(t[s+1]<<8&65280)+(255&t[s+2]),a.push(r[(i=o)>>18&63]+r[i>>12&63]+r[i>>6&63]+r[63&i]);return a.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},8287:(t,e,r)=>{"use strict";const n=r(7526),o=r(251),i="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=l,e.SlowBuffer=function(t){return+t!=t&&(t=0),l.alloc(+t)},e.INSPECT_MAX_BYTES=50;const a=2147483647;function s(t){if(t>a)throw new RangeError('The value "'+t+'" is invalid for option "size"');const e=new Uint8Array(t);return Object.setPrototypeOf(e,l.prototype),e}function l(t,e,r){if("number"==typeof t){if("string"==typeof e)throw new TypeError('The "string" argument must be of type string. Received type number');return f(t)}return u(t,e,r)}function u(t,e,r){if("string"==typeof t)return function(t,e){if("string"==typeof e&&""!==e||(e="utf8"),!l.isEncoding(e))throw new TypeError("Unknown encoding: "+e);const r=0|y(t,e);let n=s(r);const o=n.write(t,e);return o!==r&&(n=n.slice(0,o)),n}(t,e);if(ArrayBuffer.isView(t))return function(t){if(q(t,Uint8Array)){const e=new Uint8Array(t);return h(e.buffer,e.byteOffset,e.byteLength)}return p(t)}(t);if(null==t)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(q(t,ArrayBuffer)||t&&q(t.buffer,ArrayBuffer))return h(t,e,r);if("undefined"!=typeof SharedArrayBuffer&&(q(t,SharedArrayBuffer)||t&&q(t.buffer,SharedArrayBuffer)))return h(t,e,r);if("number"==typeof t)throw new TypeError('The "value" argument must not be of type number. Received type number');const n=t.valueOf&&t.valueOf();if(null!=n&&n!==t)return l.from(n,e,r);const o=function(t){if(l.isBuffer(t)){const e=0|d(t.length),r=s(e);return 0===r.length||t.copy(r,0,0,e),r}return void 0!==t.length?"number"!=typeof t.length||Y(t.length)?s(0):p(t):"Buffer"===t.type&&Array.isArray(t.data)?p(t.data):void 0}(t);if(o)return o;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return l.from(t[Symbol.toPrimitive]("string"),e,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}function c(t){if("number"!=typeof t)throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function f(t){return c(t),s(t<0?0:0|d(t))}function p(t){const e=t.length<0?0:0|d(t.length),r=s(e);for(let n=0;n<e;n+=1)r[n]=255&t[n];return r}function h(t,e,r){if(e<0||t.byteLength<e)throw new RangeError('"offset" is outside of buffer bounds');if(t.byteLength<e+(r||0))throw new RangeError('"length" is outside of buffer bounds');let n;return n=void 0===e&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,e):new Uint8Array(t,e,r),Object.setPrototypeOf(n,l.prototype),n}function d(t){if(t>=a)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a.toString(16)+" bytes");return 0|t}function y(t,e){if(l.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||q(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);const r=t.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;let o=!1;for(;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return Z(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return J(t).length;default:if(o)return n?-1:Z(t).length;e=(""+e).toLowerCase(),o=!0}}function g(t,e,r){let n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return T(this,e,r);case"utf8":case"utf-8":return I(this,e,r);case"ascii":return O(this,e,r);case"latin1":case"binary":return P(this,e,r);case"base64":return M(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function m(t,e,r){const n=t[e];t[e]=t[r],t[r]=n}function b(t,e,r,n,o){if(0===t.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),Y(r=+r)&&(r=o?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(o)return-1;r=t.length-1}else if(r<0){if(!o)return-1;r=0}if("string"==typeof e&&(e=l.from(e,n)),l.isBuffer(e))return 0===e.length?-1:w(t,e,r,n,o);if("number"==typeof e)return e&=255,"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):w(t,[e],r,n,o);throw new TypeError("val must be string, number or Buffer")}function w(t,e,r,n,o){let i,a=1,s=t.length,l=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;a=2,s/=2,l/=2,r/=2}function u(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}if(o){let n=-1;for(i=r;i<s;i++)if(u(t,i)===u(e,-1===n?0:i-n)){if(-1===n&&(n=i),i-n+1===l)return n*a}else-1!==n&&(i-=i-n),n=-1}else for(r+l>s&&(r=s-l),i=r;i>=0;i--){let r=!0;for(let n=0;n<l;n++)if(u(t,i+n)!==u(e,n)){r=!1;break}if(r)return i}return-1}function S(t,e,r,n){r=Number(r)||0;const o=t.length-r;n?(n=Number(n))>o&&(n=o):n=o;const i=e.length;let a;for(n>i/2&&(n=i/2),a=0;a<n;++a){const n=parseInt(e.substr(2*a,2),16);if(Y(n))return a;t[r+a]=n}return a}function v(t,e,r,n){return H(Z(e,t.length-r),t,r,n)}function A(t,e,r,n){return H(function(t){const e=[];for(let r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}(e),t,r,n)}function x(t,e,r,n){return H(J(e),t,r,n)}function E(t,e,r,n){return H(function(t,e){let r,n,o;const i=[];for(let a=0;a<t.length&&!((e-=2)<0);++a)r=t.charCodeAt(a),n=r>>8,o=r%256,i.push(o),i.push(n);return i}(e,t.length-r),t,r,n)}function M(t,e,r){return 0===e&&r===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(e,r))}function I(t,e,r){r=Math.min(t.length,r);const n=[];let o=e;for(;o<r;){const e=t[o];let i=null,a=e>239?4:e>223?3:e>191?2:1;if(o+a<=r){let r,n,s,l;switch(a){case 1:e<128&&(i=e);break;case 2:r=t[o+1],128==(192&r)&&(l=(31&e)<<6|63&r,l>127&&(i=l));break;case 3:r=t[o+1],n=t[o+2],128==(192&r)&&128==(192&n)&&(l=(15&e)<<12|(63&r)<<6|63&n,l>2047&&(l<55296||l>57343)&&(i=l));break;case 4:r=t[o+1],n=t[o+2],s=t[o+3],128==(192&r)&&128==(192&n)&&128==(192&s)&&(l=(15&e)<<18|(63&r)<<12|(63&n)<<6|63&s,l>65535&&l<1114112&&(i=l))}}null===i?(i=65533,a=1):i>65535&&(i-=65536,n.push(i>>>10&1023|55296),i=56320|1023&i),n.push(i),o+=a}return function(t){const e=t.length;if(e<=k)return String.fromCharCode.apply(String,t);let r="",n=0;for(;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=k));return r}(n)}e.kMaxLength=a,l.TYPED_ARRAY_SUPPORT=function(){try{const t=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(t,e),42===t.foo()}catch(t){return!1}}(),l.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(l.prototype,"parent",{enumerable:!0,get:function(){if(l.isBuffer(this))return this.buffer}}),Object.defineProperty(l.prototype,"offset",{enumerable:!0,get:function(){if(l.isBuffer(this))return this.byteOffset}}),l.poolSize=8192,l.from=function(t,e,r){return u(t,e,r)},Object.setPrototypeOf(l.prototype,Uint8Array.prototype),Object.setPrototypeOf(l,Uint8Array),l.alloc=function(t,e,r){return function(t,e,r){return c(t),t<=0?s(t):void 0!==e?"string"==typeof r?s(t).fill(e,r):s(t).fill(e):s(t)}(t,e,r)},l.allocUnsafe=function(t){return f(t)},l.allocUnsafeSlow=function(t){return f(t)},l.isBuffer=function(t){return null!=t&&!0===t._isBuffer&&t!==l.prototype},l.compare=function(t,e){if(q(t,Uint8Array)&&(t=l.from(t,t.offset,t.byteLength)),q(e,Uint8Array)&&(e=l.from(e,e.offset,e.byteLength)),!l.isBuffer(t)||!l.isBuffer(e))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===e)return 0;let r=t.length,n=e.length;for(let o=0,i=Math.min(r,n);o<i;++o)if(t[o]!==e[o]){r=t[o],n=e[o];break}return r<n?-1:n<r?1:0},l.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},l.concat=function(t,e){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return l.alloc(0);let r;if(void 0===e)for(e=0,r=0;r<t.length;++r)e+=t[r].length;const n=l.allocUnsafe(e);let o=0;for(r=0;r<t.length;++r){let e=t[r];if(q(e,Uint8Array))o+e.length>n.length?(l.isBuffer(e)||(e=l.from(e)),e.copy(n,o)):Uint8Array.prototype.set.call(n,e,o);else{if(!l.isBuffer(e))throw new TypeError('"list" argument must be an Array of Buffers');e.copy(n,o)}o+=e.length}return n},l.byteLength=y,l.prototype._isBuffer=!0,l.prototype.swap16=function(){const t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let e=0;e<t;e+=2)m(this,e,e+1);return this},l.prototype.swap32=function(){const t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let e=0;e<t;e+=4)m(this,e,e+3),m(this,e+1,e+2);return this},l.prototype.swap64=function(){const t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let e=0;e<t;e+=8)m(this,e,e+7),m(this,e+1,e+6),m(this,e+2,e+5),m(this,e+3,e+4);return this},l.prototype.toString=function(){const t=this.length;return 0===t?"":0===arguments.length?I(this,0,t):g.apply(this,arguments)},l.prototype.toLocaleString=l.prototype.toString,l.prototype.equals=function(t){if(!l.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===l.compare(this,t)},l.prototype.inspect=function(){let t="";const r=e.INSPECT_MAX_BYTES;return t=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(t+=" ... "),"<Buffer "+t+">"},i&&(l.prototype[i]=l.prototype.inspect),l.prototype.compare=function(t,e,r,n,o){if(q(t,Uint8Array)&&(t=l.from(t,t.offset,t.byteLength)),!l.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===o&&(o=this.length),e<0||r>t.length||n<0||o>this.length)throw new RangeError("out of range index");if(n>=o&&e>=r)return 0;if(n>=o)return-1;if(e>=r)return 1;if(this===t)return 0;let i=(o>>>=0)-(n>>>=0),a=(r>>>=0)-(e>>>=0);const s=Math.min(i,a),u=this.slice(n,o),c=t.slice(e,r);for(let t=0;t<s;++t)if(u[t]!==c[t]){i=u[t],a=c[t];break}return i<a?-1:a<i?1:0},l.prototype.includes=function(t,e,r){return-1!==this.indexOf(t,e,r)},l.prototype.indexOf=function(t,e,r){return b(this,t,e,r,!0)},l.prototype.lastIndexOf=function(t,e,r){return b(this,t,e,r,!1)},l.prototype.write=function(t,e,r,n){if(void 0===e)n="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)n=e,r=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}const o=this.length-e;if((void 0===r||r>o)&&(r=o),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let i=!1;for(;;)switch(n){case"hex":return S(this,t,e,r);case"utf8":case"utf-8":return v(this,t,e,r);case"ascii":case"latin1":case"binary":return A(this,t,e,r);case"base64":return x(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,t,e,r);default:if(i)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),i=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const k=4096;function O(t,e,r){let n="";r=Math.min(t.length,r);for(let o=e;o<r;++o)n+=String.fromCharCode(127&t[o]);return n}function P(t,e,r){let n="";r=Math.min(t.length,r);for(let o=e;o<r;++o)n+=String.fromCharCode(t[o]);return n}function T(t,e,r){const n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);let o="";for(let n=e;n<r;++n)o+=K[t[n]];return o}function C(t,e,r){const n=t.slice(e,r);let o="";for(let t=0;t<n.length-1;t+=2)o+=String.fromCharCode(n[t]+256*n[t+1]);return o}function L(t,e,r){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}function B(t,e,r,n,o,i){if(!l.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>o||e<i)throw new RangeError('"value" argument is out of bounds');if(r+n>t.length)throw new RangeError("Index out of range")}function _(t,e,r,n,o){z(e,n,o,t,r,7);let i=Number(e&BigInt(4294967295));t[r++]=i,i>>=8,t[r++]=i,i>>=8,t[r++]=i,i>>=8,t[r++]=i;let a=Number(e>>BigInt(32)&BigInt(4294967295));return t[r++]=a,a>>=8,t[r++]=a,a>>=8,t[r++]=a,a>>=8,t[r++]=a,r}function F(t,e,r,n,o){z(e,n,o,t,r,7);let i=Number(e&BigInt(4294967295));t[r+7]=i,i>>=8,t[r+6]=i,i>>=8,t[r+5]=i,i>>=8,t[r+4]=i;let a=Number(e>>BigInt(32)&BigInt(4294967295));return t[r+3]=a,a>>=8,t[r+2]=a,a>>=8,t[r+1]=a,a>>=8,t[r]=a,r+8}function R(t,e,r,n,o,i){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function N(t,e,r,n,i){return e=+e,r>>>=0,i||R(t,0,r,4),o.write(t,e,r,n,23,4),r+4}function U(t,e,r,n,i){return e=+e,r>>>=0,i||R(t,0,r,8),o.write(t,e,r,n,52,8),r+8}l.prototype.slice=function(t,e){const r=this.length;(t=~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),(e=void 0===e?r:~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),e<t&&(e=t);const n=this.subarray(t,e);return Object.setPrototypeOf(n,l.prototype),n},l.prototype.readUintLE=l.prototype.readUIntLE=function(t,e,r){t>>>=0,e>>>=0,r||L(t,e,this.length);let n=this[t],o=1,i=0;for(;++i<e&&(o*=256);)n+=this[t+i]*o;return n},l.prototype.readUintBE=l.prototype.readUIntBE=function(t,e,r){t>>>=0,e>>>=0,r||L(t,e,this.length);let n=this[t+--e],o=1;for(;e>0&&(o*=256);)n+=this[t+--e]*o;return n},l.prototype.readUint8=l.prototype.readUInt8=function(t,e){return t>>>=0,e||L(t,1,this.length),this[t]},l.prototype.readUint16LE=l.prototype.readUInt16LE=function(t,e){return t>>>=0,e||L(t,2,this.length),this[t]|this[t+1]<<8},l.prototype.readUint16BE=l.prototype.readUInt16BE=function(t,e){return t>>>=0,e||L(t,2,this.length),this[t]<<8|this[t+1]},l.prototype.readUint32LE=l.prototype.readUInt32LE=function(t,e){return t>>>=0,e||L(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},l.prototype.readUint32BE=l.prototype.readUInt32BE=function(t,e){return t>>>=0,e||L(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},l.prototype.readBigUInt64LE=X((function(t){V(t>>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||j(t,this.length-8);const n=e+256*this[++t]+65536*this[++t]+this[++t]*2**24,o=this[++t]+256*this[++t]+65536*this[++t]+r*2**24;return BigInt(n)+(BigInt(o)<<BigInt(32))})),l.prototype.readBigUInt64BE=X((function(t){V(t>>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||j(t,this.length-8);const n=e*2**24+65536*this[++t]+256*this[++t]+this[++t],o=this[++t]*2**24+65536*this[++t]+256*this[++t]+r;return(BigInt(n)<<BigInt(32))+BigInt(o)})),l.prototype.readIntLE=function(t,e,r){t>>>=0,e>>>=0,r||L(t,e,this.length);let n=this[t],o=1,i=0;for(;++i<e&&(o*=256);)n+=this[t+i]*o;return o*=128,n>=o&&(n-=Math.pow(2,8*e)),n},l.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||L(t,e,this.length);let n=e,o=1,i=this[t+--n];for(;n>0&&(o*=256);)i+=this[t+--n]*o;return o*=128,i>=o&&(i-=Math.pow(2,8*e)),i},l.prototype.readInt8=function(t,e){return t>>>=0,e||L(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},l.prototype.readInt16LE=function(t,e){t>>>=0,e||L(t,2,this.length);const r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},l.prototype.readInt16BE=function(t,e){t>>>=0,e||L(t,2,this.length);const r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},l.prototype.readInt32LE=function(t,e){return t>>>=0,e||L(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},l.prototype.readInt32BE=function(t,e){return t>>>=0,e||L(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},l.prototype.readBigInt64LE=X((function(t){V(t>>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||j(t,this.length-8);const n=this[t+4]+256*this[t+5]+65536*this[t+6]+(r<<24);return(BigInt(n)<<BigInt(32))+BigInt(e+256*this[++t]+65536*this[++t]+this[++t]*2**24)})),l.prototype.readBigInt64BE=X((function(t){V(t>>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||j(t,this.length-8);const n=(e<<24)+65536*this[++t]+256*this[++t]+this[++t];return(BigInt(n)<<BigInt(32))+BigInt(this[++t]*2**24+65536*this[++t]+256*this[++t]+r)})),l.prototype.readFloatLE=function(t,e){return t>>>=0,e||L(t,4,this.length),o.read(this,t,!0,23,4)},l.prototype.readFloatBE=function(t,e){return t>>>=0,e||L(t,4,this.length),o.read(this,t,!1,23,4)},l.prototype.readDoubleLE=function(t,e){return t>>>=0,e||L(t,8,this.length),o.read(this,t,!0,52,8)},l.prototype.readDoubleBE=function(t,e){return t>>>=0,e||L(t,8,this.length),o.read(this,t,!1,52,8)},l.prototype.writeUintLE=l.prototype.writeUIntLE=function(t,e,r,n){t=+t,e>>>=0,r>>>=0,n||B(this,t,e,r,Math.pow(2,8*r)-1,0);let o=1,i=0;for(this[e]=255&t;++i<r&&(o*=256);)this[e+i]=t/o&255;return e+r},l.prototype.writeUintBE=l.prototype.writeUIntBE=function(t,e,r,n){t=+t,e>>>=0,r>>>=0,n||B(this,t,e,r,Math.pow(2,8*r)-1,0);let o=r-1,i=1;for(this[e+o]=255&t;--o>=0&&(i*=256);)this[e+o]=t/i&255;return e+r},l.prototype.writeUint8=l.prototype.writeUInt8=function(t,e,r){return t=+t,e>>>=0,r||B(this,t,e,1,255,0),this[e]=255&t,e+1},l.prototype.writeUint16LE=l.prototype.writeUInt16LE=function(t,e,r){return t=+t,e>>>=0,r||B(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},l.prototype.writeUint16BE=l.prototype.writeUInt16BE=function(t,e,r){return t=+t,e>>>=0,r||B(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},l.prototype.writeUint32LE=l.prototype.writeUInt32LE=function(t,e,r){return t=+t,e>>>=0,r||B(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},l.prototype.writeUint32BE=l.prototype.writeUInt32BE=function(t,e,r){return t=+t,e>>>=0,r||B(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},l.prototype.writeBigUInt64LE=X((function(t,e=0){return _(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))})),l.prototype.writeBigUInt64BE=X((function(t,e=0){return F(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))})),l.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e>>>=0,!n){const n=Math.pow(2,8*r-1);B(this,t,e,r,n-1,-n)}let o=0,i=1,a=0;for(this[e]=255&t;++o<r&&(i*=256);)t<0&&0===a&&0!==this[e+o-1]&&(a=1),this[e+o]=(t/i|0)-a&255;return e+r},l.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e>>>=0,!n){const n=Math.pow(2,8*r-1);B(this,t,e,r,n-1,-n)}let o=r-1,i=1,a=0;for(this[e+o]=255&t;--o>=0&&(i*=256);)t<0&&0===a&&0!==this[e+o+1]&&(a=1),this[e+o]=(t/i|0)-a&255;return e+r},l.prototype.writeInt8=function(t,e,r){return t=+t,e>>>=0,r||B(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},l.prototype.writeInt16LE=function(t,e,r){return t=+t,e>>>=0,r||B(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},l.prototype.writeInt16BE=function(t,e,r){return t=+t,e>>>=0,r||B(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},l.prototype.writeInt32LE=function(t,e,r){return t=+t,e>>>=0,r||B(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},l.prototype.writeInt32BE=function(t,e,r){return t=+t,e>>>=0,r||B(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},l.prototype.writeBigInt64LE=X((function(t,e=0){return _(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),l.prototype.writeBigInt64BE=X((function(t,e=0){return F(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),l.prototype.writeFloatLE=function(t,e,r){return N(this,t,e,!0,r)},l.prototype.writeFloatBE=function(t,e,r){return N(this,t,e,!1,r)},l.prototype.writeDoubleLE=function(t,e,r){return U(this,t,e,!0,r)},l.prototype.writeDoubleBE=function(t,e,r){return U(this,t,e,!1,r)},l.prototype.copy=function(t,e,r,n){if(!l.isBuffer(t))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e<n-r&&(n=t.length-e+r);const o=n-r;return this===t&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(e,r,n):Uint8Array.prototype.set.call(t,this.subarray(r,n),e),o},l.prototype.fill=function(t,e,r,n){if("string"==typeof t){if("string"==typeof e?(n=e,e=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!l.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===t.length){const e=t.charCodeAt(0);("utf8"===n&&e<128||"latin1"===n)&&(t=e)}}else"number"==typeof t?t&=255:"boolean"==typeof t&&(t=Number(t));if(e<0||this.length<e||this.length<r)throw new RangeError("Out of range index");if(r<=e)return this;let o;if(e>>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(o=e;o<r;++o)this[o]=t;else{const i=l.isBuffer(t)?t:l.from(t,n),a=i.length;if(0===a)throw new TypeError('The value "'+t+'" is invalid for argument "value"');for(o=0;o<r-e;++o)this[o+e]=i[o%a]}return this};const D={};function $(t,e,r){D[t]=class extends r{constructor(){super(),Object.defineProperty(this,"message",{value:e.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${t}]`,this.stack,delete this.name}get code(){return t}set code(t){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:t,writable:!0})}toString(){return`${this.name} [${t}]: ${this.message}`}}}function W(t){let e="",r=t.length;const n="-"===t[0]?1:0;for(;r>=n+4;r-=3)e=`_${t.slice(r-3,r)}${e}`;return`${t.slice(0,r)}${e}`}function z(t,e,r,n,o,i){if(t>r||t<e){const n="bigint"==typeof e?"n":"";let o;throw o=i>3?0===e||e===BigInt(0)?`>= 0${n} and < 2${n} ** ${8*(i+1)}${n}`:`>= -(2${n} ** ${8*(i+1)-1}${n}) and < 2 ** ${8*(i+1)-1}${n}`:`>= ${e}${n} and <= ${r}${n}`,new D.ERR_OUT_OF_RANGE("value",o,t)}!function(t,e,r){V(e,"offset"),void 0!==t[e]&&void 0!==t[e+r]||j(e,t.length-(r+1))}(n,o,i)}function V(t,e){if("number"!=typeof t)throw new D.ERR_INVALID_ARG_TYPE(e,"number",t)}function j(t,e,r){if(Math.floor(t)!==t)throw V(t,r),new D.ERR_OUT_OF_RANGE(r||"offset","an integer",t);if(e<0)throw new D.ERR_BUFFER_OUT_OF_BOUNDS;throw new D.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${e}`,t)}$("ERR_BUFFER_OUT_OF_BOUNDS",(function(t){return t?`${t} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),$("ERR_INVALID_ARG_TYPE",(function(t,e){return`The "${t}" argument must be of type number. Received type ${typeof e}`}),TypeError),$("ERR_OUT_OF_RANGE",(function(t,e,r){let n=`The value of "${t}" is out of range.`,o=r;return Number.isInteger(r)&&Math.abs(r)>2**32?o=W(String(r)):"bigint"==typeof r&&(o=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(o=W(o)),o+="n"),n+=` It must be ${e}. Received ${o}`,n}),RangeError);const G=/[^+/0-9A-Za-z-_]/g;function Z(t,e){let r;e=e||1/0;const n=t.length;let o=null;const i=[];for(let a=0;a<n;++a){if(r=t.charCodeAt(a),r>55295&&r<57344){if(!o){if(r>56319){(e-=3)>-1&&i.push(239,191,189);continue}if(a+1===n){(e-=3)>-1&&i.push(239,191,189);continue}o=r;continue}if(r<56320){(e-=3)>-1&&i.push(239,191,189),o=r;continue}r=65536+(o-55296<<10|r-56320)}else o&&(e-=3)>-1&&i.push(239,191,189);if(o=null,r<128){if((e-=1)<0)break;i.push(r)}else if(r<2048){if((e-=2)<0)break;i.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;i.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return i}function J(t){return n.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(G,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function H(t,e,r,n){let o;for(o=0;o<n&&!(o+r>=e.length||o>=t.length);++o)e[o+r]=t[o];return o}function q(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function Y(t){return t!=t}const K=function(){const t="0123456789abcdef",e=new Array(256);for(let r=0;r<16;++r){const n=16*r;for(let o=0;o<16;++o)e[n+o]=t[r]+t[o]}return e}();function X(t){return"undefined"==typeof BigInt?Q:t}function Q(){throw new Error("BigInt not supported")}},3144:(t,e,r)=>{"use strict";var n=r(6743),o=r(1002),i=r(76),a=r(7119);t.exports=a||n.call(i,o)},2205:(t,e,r)=>{"use strict";var n=r(6743),o=r(1002),i=r(3144);t.exports=function(){return i(n,o,arguments)}},1002:t=>{"use strict";t.exports=Function.prototype.apply},76:t=>{"use strict";t.exports=Function.prototype.call},3126:(t,e,r)=>{"use strict";var n=r(6743),o=r(9675),i=r(76),a=r(3144);t.exports=function(t){if(t.length<1||"function"!=typeof t[0])throw new o("a function is required");return a(n,i,t)}},7119:t=>{"use strict";t.exports="undefined"!=typeof Reflect&&Reflect&&Reflect.apply},487:(t,e,r)=>{"use strict";var n=r(6897),o=r(655),i=r(3126),a=r(2205);t.exports=function(t){var e=i(arguments),r=t.length-(arguments.length-1);return n(e,1+(r>0?r:0),!0)},o?o(t.exports,"apply",{value:a}):t.exports.apply=a},6556:(t,e,r)=>{"use strict";var n=r(453),o=r(3126),i=o([n("%String.prototype.indexOf%")]);t.exports=function(t,e){var r=n(t,!!e);return"function"==typeof r&&i(t,".prototype.")>-1?o([r]):r}},41:(t,e,r)=>{"use strict";var n=r(655),o=r(8068),i=r(9675),a=r(5795);t.exports=function(t,e,r){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new i("`obj` must be an object or a function`");if("string"!=typeof e&&"symbol"!=typeof e)throw new i("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new i("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new i("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new i("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new i("`loose`, if provided, must be a boolean");var s=arguments.length>3?arguments[3]:null,l=arguments.length>4?arguments[4]:null,u=arguments.length>5?arguments[5]:null,c=arguments.length>6&&arguments[6],f=!!a&&a(t,e);if(n)n(t,e,{configurable:null===u&&f?f.configurable:!u,enumerable:null===s&&f?f.enumerable:!s,value:r,writable:null===l&&f?f.writable:!l});else{if(!c&&(s||l||u))throw new o("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");t[e]=r}}},7176:(t,e,r)=>{"use strict";var n,o=r(3126),i=r(5795);try{n=[].__proto__===Array.prototype}catch(t){if(!t||"object"!=typeof t||!("code"in t)||"ERR_PROTO_ACCESS"!==t.code)throw t}var a=!!n&&i&&i(Object.prototype,"__proto__"),s=Object,l=s.getPrototypeOf;t.exports=a&&"function"==typeof a.get?o([a.get]):"function"==typeof l&&function(t){return l(null==t?t:s(t))}},655:t=>{"use strict";var e=Object.defineProperty||!1;if(e)try{e({},"a",{value:1})}catch(t){e=!1}t.exports=e},1237:t=>{"use strict";t.exports=EvalError},9383:t=>{"use strict";t.exports=Error},9290:t=>{"use strict";t.exports=RangeError},9538:t=>{"use strict";t.exports=ReferenceError},8068:t=>{"use strict";t.exports=SyntaxError},9675:t=>{"use strict";t.exports=TypeError},5345:t=>{"use strict";t.exports=URIError},9612:t=>{"use strict";t.exports=Object},2682:(t,e,r)=>{"use strict";var n=r(9600),o=Object.prototype.toString,i=Object.prototype.hasOwnProperty;t.exports=function(t,e,r){if(!n(e))throw new TypeError("iterator must be a function");var a;arguments.length>=3&&(a=r),"[object Array]"===o.call(t)?function(t,e,r){for(var n=0,o=t.length;n<o;n++)i.call(t,n)&&(null==r?e(t[n],n,t):e.call(r,t[n],n,t))}(t,e,a):"string"==typeof t?function(t,e,r){for(var n=0,o=t.length;n<o;n++)null==r?e(t.charAt(n),n,t):e.call(r,t.charAt(n),n,t)}(t,e,a):function(t,e,r){for(var n in t)i.call(t,n)&&(null==r?e(t[n],n,t):e.call(r,t[n],n,t))}(t,e,a)}},9353:t=>{"use strict";var e=Object.prototype.toString,r=Math.max,n=function(t,e){for(var r=[],n=0;n<t.length;n+=1)r[n]=t[n];for(var o=0;o<e.length;o+=1)r[o+t.length]=e[o];return r};t.exports=function(t){var o=this;if("function"!=typeof o||"[object Function]"!==e.apply(o))throw new TypeError("Function.prototype.bind called on incompatible "+o);for(var i,a=function(t){for(var e=[],r=1,n=0;r<t.length;r+=1,n+=1)e[n]=t[r];return e}(arguments),s=r(0,o.length-a.length),l=[],u=0;u<s;u++)l[u]="$"+u;if(i=Function("binder","return function ("+function(t){for(var e="",r=0;r<t.length;r+=1)e+=t[r],r+1<t.length&&(e+=",");return e}(l)+"){ return binder.apply(this,arguments); }")((function(){if(this instanceof i){var e=o.apply(this,n(a,arguments));return Object(e)===e?e:this}return o.apply(t,n(a,arguments))})),o.prototype){var c=function(){};c.prototype=o.prototype,i.prototype=new c,c.prototype=null}return i}},6743:(t,e,r)=>{"use strict";var n=r(9353);t.exports=Function.prototype.bind||n},453:(t,e,r)=>{"use strict";var n,o=r(9612),i=r(9383),a=r(1237),s=r(9290),l=r(9538),u=r(8068),c=r(9675),f=r(5345),p=r(1514),h=r(8968),d=r(6188),y=r(8002),g=r(5880),m=r(414),b=r(3093),w=Function,S=function(t){try{return w('"use strict"; return ('+t+").constructor;")()}catch(t){}},v=r(5795),A=r(655),x=function(){throw new c},E=v?function(){try{return x}catch(t){try{return v(arguments,"callee").get}catch(t){return x}}}():x,M=r(4039)(),I=r(3628),k=r(1064),O=r(8648),P=r(1002),T=r(76),C={},L="undefined"!=typeof Uint8Array&&I?I(Uint8Array):n,B={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?n:ArrayBuffer,"%ArrayIteratorPrototype%":M&&I?I([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":C,"%AsyncGenerator%":C,"%AsyncGeneratorFunction%":C,"%AsyncIteratorPrototype%":C,"%Atomics%":"undefined"==typeof Atomics?n:Atomics,"%BigInt%":"undefined"==typeof BigInt?n:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?n:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?n:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?n:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":i,"%eval%":eval,"%EvalError%":a,"%Float32Array%":"undefined"==typeof Float32Array?n:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?n:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?n:FinalizationRegistry,"%Function%":w,"%GeneratorFunction%":C,"%Int8Array%":"undefined"==typeof Int8Array?n:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?n:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":M&&I?I(I([][Symbol.iterator]())):n,"%JSON%":"object"==typeof JSON?JSON:n,"%Map%":"undefined"==typeof Map?n:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&M&&I?I((new Map)[Symbol.iterator]()):n,"%Math%":Math,"%Number%":Number,"%Object%":o,"%Object.getOwnPropertyDescriptor%":v,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?n:Promise,"%Proxy%":"undefined"==typeof Proxy?n:Proxy,"%RangeError%":s,"%ReferenceError%":l,"%Reflect%":"undefined"==typeof Reflect?n:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?n:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&M&&I?I((new Set)[Symbol.iterator]()):n,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":M&&I?I(""[Symbol.iterator]()):n,"%Symbol%":M?Symbol:n,"%SyntaxError%":u,"%ThrowTypeError%":E,"%TypedArray%":L,"%TypeError%":c,"%Uint8Array%":"undefined"==typeof Uint8Array?n:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?n:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?n:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?n:Uint32Array,"%URIError%":f,"%WeakMap%":"undefined"==typeof WeakMap?n:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?n:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?n:WeakSet,"%Function.prototype.call%":T,"%Function.prototype.apply%":P,"%Object.defineProperty%":A,"%Object.getPrototypeOf%":k,"%Math.abs%":p,"%Math.floor%":h,"%Math.max%":d,"%Math.min%":y,"%Math.pow%":g,"%Math.round%":m,"%Math.sign%":b,"%Reflect.getPrototypeOf%":O};if(I)try{null.error}catch(t){var _=I(I(t));B["%Error.prototype%"]=_}var F=function t(e){var r;if("%AsyncFunction%"===e)r=S("async function () {}");else if("%GeneratorFunction%"===e)r=S("function* () {}");else if("%AsyncGeneratorFunction%"===e)r=S("async function* () {}");else if("%AsyncGenerator%"===e){var n=t("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if("%AsyncIteratorPrototype%"===e){var o=t("%AsyncGenerator%");o&&I&&(r=I(o.prototype))}return B[e]=r,r},R={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},N=r(6743),U=r(9957),D=N.call(T,Array.prototype.concat),$=N.call(P,Array.prototype.splice),W=N.call(T,String.prototype.replace),z=N.call(T,String.prototype.slice),V=N.call(T,RegExp.prototype.exec),j=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,G=/\\(\\)?/g,Z=function(t,e){var r,n=t;if(U(R,n)&&(n="%"+(r=R[n])[0]+"%"),U(B,n)){var o=B[n];if(o===C&&(o=F(n)),void 0===o&&!e)throw new c("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:o}}throw new u("intrinsic "+t+" does not exist!")};t.exports=function(t,e){if("string"!=typeof t||0===t.length)throw new c("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof e)throw new c('"allowMissing" argument must be a boolean');if(null===V(/^%?[^%]*%?$/,t))throw new u("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=function(t){var e=z(t,0,1),r=z(t,-1);if("%"===e&&"%"!==r)throw new u("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==e)throw new u("invalid intrinsic syntax, expected opening `%`");var n=[];return W(t,j,(function(t,e,r,o){n[n.length]=r?W(o,G,"$1"):e||t})),n}(t),n=r.length>0?r[0]:"",o=Z("%"+n+"%",e),i=o.name,a=o.value,s=!1,l=o.alias;l&&(n=l[0],$(r,D([0,1],l)));for(var f=1,p=!0;f<r.length;f+=1){var h=r[f],d=z(h,0,1),y=z(h,-1);if(('"'===d||"'"===d||"`"===d||'"'===y||"'"===y||"`"===y)&&d!==y)throw new u("property names with quotes must have matching quotes");if("constructor"!==h&&p||(s=!0),U(B,i="%"+(n+="."+h)+"%"))a=B[i];else if(null!=a){if(!(h in a)){if(!e)throw new c("base intrinsic for "+t+" exists, but the property is not available.");return}if(v&&f+1>=r.length){var g=v(a,h);a=(p=!!g)&&"get"in g&&!("originalValue"in g.get)?g.get:a[h]}else p=U(a,h),a=a[h];p&&!s&&(B[i]=a)}}return a}},1064:(t,e,r)=>{"use strict";var n=r(9612);t.exports=n.getPrototypeOf||null},8648:t=>{"use strict";t.exports="undefined"!=typeof Reflect&&Reflect.getPrototypeOf||null},3628:(t,e,r)=>{"use strict";var n=r(8648),o=r(1064),i=r(7176);t.exports=n?function(t){return n(t)}:o?function(t){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new TypeError("getProto: not an object");return o(t)}:i?function(t){return i(t)}:null},6549:t=>{"use strict";t.exports=Object.getOwnPropertyDescriptor},5795:(t,e,r)=>{"use strict";var n=r(6549);if(n)try{n([],"length")}catch(t){n=null}t.exports=n},592:(t,e,r)=>{"use strict";var n=r(655),o=function(){return!!n};o.hasArrayLengthDefineBug=function(){if(!n)return null;try{return 1!==n([],"length",{value:1}).length}catch(t){return!0}},t.exports=o},4039:(t,e,r)=>{"use strict";var n="undefined"!=typeof Symbol&&Symbol,o=r(1333);t.exports=function(){return"function"==typeof n&&"function"==typeof Symbol&&"symbol"==typeof n("foo")&&"symbol"==typeof Symbol("bar")&&o()}},1333:t=>{"use strict";t.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var t={},e=Symbol("test"),r=Object(e);if("string"==typeof e)return!1;if("[object Symbol]"!==Object.prototype.toString.call(e))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(var n in t[e]=42,t)return!1;if("function"==typeof Object.keys&&0!==Object.keys(t).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(t).length)return!1;var o=Object.getOwnPropertySymbols(t);if(1!==o.length||o[0]!==e)return!1;if(!Object.prototype.propertyIsEnumerable.call(t,e))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var i=Object.getOwnPropertyDescriptor(t,e);if(42!==i.value||!0!==i.enumerable)return!1}return!0}},9092:(t,e,r)=>{"use strict";var n=r(1333);t.exports=function(){return n()&&!!Symbol.toStringTag}},9957:(t,e,r)=>{"use strict";var n=Function.prototype.call,o=Object.prototype.hasOwnProperty,i=r(6743);t.exports=i.call(n,o)},251:(t,e)=>{e.read=function(t,e,r,n,o){var i,a,s=8*o-n-1,l=(1<<s)-1,u=l>>1,c=-7,f=r?o-1:0,p=r?-1:1,h=t[e+f];for(f+=p,i=h&(1<<-c)-1,h>>=-c,c+=s;c>0;i=256*i+t[e+f],f+=p,c-=8);for(a=i&(1<<-c)-1,i>>=-c,c+=n;c>0;a=256*a+t[e+f],f+=p,c-=8);if(0===i)i=1-u;else{if(i===l)return a?NaN:1/0*(h?-1:1);a+=Math.pow(2,n),i-=u}return(h?-1:1)*a*Math.pow(2,i-n)},e.write=function(t,e,r,n,o,i){var a,s,l,u=8*i-o-1,c=(1<<u)-1,f=c>>1,p=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,h=n?0:i-1,d=n?1:-1,y=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=c):(a=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-a))<1&&(a--,l*=2),(e+=a+f>=1?p/l:p*Math.pow(2,1-f))*l>=2&&(a++,l/=2),a+f>=c?(s=0,a=c):a+f>=1?(s=(e*l-1)*Math.pow(2,o),a+=f):(s=e*Math.pow(2,f-1)*Math.pow(2,o),a=0));o>=8;t[r+h]=255&s,h+=d,s/=256,o-=8);for(a=a<<o|s,u+=o;u>0;t[r+h]=255&a,h+=d,a/=256,u-=8);t[r+h-d]|=128*y}},6698:t=>{"function"==typeof Object.create?t.exports=function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(t,e){if(e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}}},7244:(t,e,r)=>{"use strict";var n=r(9092)(),o=r(6556)("Object.prototype.toString"),i=function(t){return!(n&&t&&"object"==typeof t&&Symbol.toStringTag in t)&&"[object Arguments]"===o(t)},a=function(t){return!!i(t)||null!==t&&"object"==typeof t&&"length"in t&&"number"==typeof t.length&&t.length>=0&&"[object Array]"!==o(t)&&"callee"in t&&"[object Function]"===o(t.callee)},s=function(){return i(arguments)}();i.isLegacyArguments=a,t.exports=s?i:a},9600:t=>{"use strict";var e,r,n=Function.prototype.toString,o="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof o&&"function"==typeof Object.defineProperty)try{e=Object.defineProperty({},"length",{get:function(){throw r}}),r={},o((function(){throw 42}),null,e)}catch(t){t!==r&&(o=null)}else o=null;var i=/^\s*class\b/,a=function(t){try{var e=n.call(t);return i.test(e)}catch(t){return!1}},s=function(t){try{return!a(t)&&(n.call(t),!0)}catch(t){return!1}},l=Object.prototype.toString,u="function"==typeof Symbol&&!!Symbol.toStringTag,c=!(0 in[,]),f=function(){return!1};if("object"==typeof document){var p=document.all;l.call(p)===l.call(document.all)&&(f=function(t){if((c||!t)&&(void 0===t||"object"==typeof t))try{var e=l.call(t);return("[object HTMLAllCollection]"===e||"[object HTML document.all class]"===e||"[object HTMLCollection]"===e||"[object Object]"===e)&&null==t("")}catch(t){}return!1})}t.exports=o?function(t){if(f(t))return!0;if(!t)return!1;if("function"!=typeof t&&"object"!=typeof t)return!1;try{o(t,null,e)}catch(t){if(t!==r)return!1}return!a(t)&&s(t)}:function(t){if(f(t))return!0;if(!t)return!1;if("function"!=typeof t&&"object"!=typeof t)return!1;if(u)return s(t);if(a(t))return!1;var e=l.call(t);return!("[object Function]"!==e&&"[object GeneratorFunction]"!==e&&!/^\[object HTML/.test(e))&&s(t)}},8184:(t,e,r)=>{"use strict";var n,o=r(6556),i=r(9721)(/^\s*(?:function)?\*/),a=r(9092)(),s=r(3628),l=o("Object.prototype.toString"),u=o("Function.prototype.toString");t.exports=function(t){if("function"!=typeof t)return!1;if(i(u(t)))return!0;if(!a)return"[object GeneratorFunction]"===l(t);if(!s)return!1;if(void 0===n){var e=function(){if(!a)return!1;try{return Function("return function*() {}")()}catch(t){}}();n=!!e&&s(e)}return s(t)===n}},4035:(t,e,r)=>{"use strict";var n,o=r(6556),i=r(9092)(),a=r(9957),s=r(5795);if(i){var l=o("RegExp.prototype.exec"),u={},c=function(){throw u},f={toString:c,valueOf:c};"symbol"==typeof Symbol.toPrimitive&&(f[Symbol.toPrimitive]=c),n=function(t){if(!t||"object"!=typeof t)return!1;var e=s(t,"lastIndex");if(!e||!a(e,"value"))return!1;try{l(t,f)}catch(t){return t===u}}}else{var p=o("Object.prototype.toString");n=function(t){return!(!t||"object"!=typeof t&&"function"!=typeof t)&&"[object RegExp]"===p(t)}}t.exports=n},5680:(t,e,r)=>{"use strict";var n=r(5767);t.exports=function(t){return!!n(t)}},1514:t=>{"use strict";t.exports=Math.abs},8968:t=>{"use strict";t.exports=Math.floor},4459:t=>{"use strict";t.exports=Number.isNaN||function(t){return t!=t}},6188:t=>{"use strict";t.exports=Math.max},8002:t=>{"use strict";t.exports=Math.min},5880:t=>{"use strict";t.exports=Math.pow},414:t=>{"use strict";t.exports=Math.round},3093:(t,e,r)=>{"use strict";var n=r(4459);t.exports=function(t){return n(t)||0===t?t:t<0?-1:1}},6578:t=>{"use strict";t.exports=["Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]},5606:t=>{var e,r,n=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function a(t){if(e===setTimeout)return setTimeout(t,0);if((e===o||!e)&&setTimeout)return e=setTimeout,setTimeout(t,0);try{return e(t,0)}catch(r){try{return e.call(null,t,0)}catch(r){return e.call(this,t,0)}}}!function(){try{e="function"==typeof setTimeout?setTimeout:o}catch(t){e=o}try{r="function"==typeof clearTimeout?clearTimeout:i}catch(t){r=i}}();var s,l=[],u=!1,c=-1;function f(){u&&s&&(u=!1,s.length?l=s.concat(l):c=-1,l.length&&p())}function p(){if(!u){var t=a(f);u=!0;for(var e=l.length;e;){for(s=l,l=[];++c<e;)s&&s[c].run();c=-1,e=l.length}s=null,u=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===i||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{return r(t)}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(t)}}function h(t,e){this.fun=t,this.array=e}function d(){}n.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];l.push(new h(t,e)),1!==l.length||u||a(p)},h.prototype.run=function(){this.fun.apply(null,this.array)},n.title="browser",n.browser=!0,n.env={},n.argv=[],n.version="",n.versions={},n.on=d,n.addListener=d,n.once=d,n.off=d,n.removeListener=d,n.removeAllListeners=d,n.emit=d,n.prependListener=d,n.prependOnceListener=d,n.listeners=function(t){return[]},n.binding=function(t){throw new Error("process.binding is not supported")},n.cwd=function(){return"/"},n.chdir=function(t){throw new Error("process.chdir is not supported")},n.umask=function(){return 0}},9721:(t,e,r)=>{"use strict";var n=r(6556),o=r(4035),i=n("RegExp.prototype.exec"),a=r(9675);t.exports=function(t){if(!o(t))throw new a("`regex` must be a RegExp");return function(e){return null!==i(t,e)}}},6897:(t,e,r)=>{"use strict";var n=r(453),o=r(41),i=r(592)(),a=r(5795),s=r(9675),l=n("%Math.floor%");t.exports=function(t,e){if("function"!=typeof t)throw new s("`fn` is not a function");if("number"!=typeof e||e<0||e>4294967295||l(e)!==e)throw new s("`length` must be a positive 32-bit integer");var r=arguments.length>2&&!!arguments[2],n=!0,u=!0;if("length"in t&&a){var c=a(t,"length");c&&!c.configurable&&(n=!1),c&&!c.writable&&(u=!1)}return(n||u||!r)&&(i?o(t,"length",e,!0,!0):o(t,"length",e)),t}},1135:t=>{t.exports=function(t){return t&&"object"==typeof t&&"function"==typeof t.copy&&"function"==typeof t.fill&&"function"==typeof t.readUInt8}},9032:(t,e,r)=>{"use strict";var n=r(7244),o=r(8184),i=r(5767),a=r(5680);function s(t){return t.call.bind(t)}var l="undefined"!=typeof BigInt,u="undefined"!=typeof Symbol,c=s(Object.prototype.toString),f=s(Number.prototype.valueOf),p=s(String.prototype.valueOf),h=s(Boolean.prototype.valueOf);if(l)var d=s(BigInt.prototype.valueOf);if(u)var y=s(Symbol.prototype.valueOf);function g(t,e){if("object"!=typeof t)return!1;try{return e(t),!0}catch(t){return!1}}function m(t){return"[object Map]"===c(t)}function b(t){return"[object Set]"===c(t)}function w(t){return"[object WeakMap]"===c(t)}function S(t){return"[object WeakSet]"===c(t)}function v(t){return"[object ArrayBuffer]"===c(t)}function A(t){return"undefined"!=typeof ArrayBuffer&&(v.working?v(t):t instanceof ArrayBuffer)}function x(t){return"[object DataView]"===c(t)}function E(t){return"undefined"!=typeof DataView&&(x.working?x(t):t instanceof DataView)}e.isArgumentsObject=n,e.isGeneratorFunction=o,e.isTypedArray=a,e.isPromise=function(t){return"undefined"!=typeof Promise&&t instanceof Promise||null!==t&&"object"==typeof t&&"function"==typeof t.then&&"function"==typeof t.catch},e.isArrayBufferView=function(t){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):a(t)||E(t)},e.isUint8Array=function(t){return"Uint8Array"===i(t)},e.isUint8ClampedArray=function(t){return"Uint8ClampedArray"===i(t)},e.isUint16Array=function(t){return"Uint16Array"===i(t)},e.isUint32Array=function(t){return"Uint32Array"===i(t)},e.isInt8Array=function(t){return"Int8Array"===i(t)},e.isInt16Array=function(t){return"Int16Array"===i(t)},e.isInt32Array=function(t){return"Int32Array"===i(t)},e.isFloat32Array=function(t){return"Float32Array"===i(t)},e.isFloat64Array=function(t){return"Float64Array"===i(t)},e.isBigInt64Array=function(t){return"BigInt64Array"===i(t)},e.isBigUint64Array=function(t){return"BigUint64Array"===i(t)},m.working="undefined"!=typeof Map&&m(new Map),e.isMap=function(t){return"undefined"!=typeof Map&&(m.working?m(t):t instanceof Map)},b.working="undefined"!=typeof Set&&b(new Set),e.isSet=function(t){return"undefined"!=typeof Set&&(b.working?b(t):t instanceof Set)},w.working="undefined"!=typeof WeakMap&&w(new WeakMap),e.isWeakMap=function(t){return"undefined"!=typeof WeakMap&&(w.working?w(t):t instanceof WeakMap)},S.working="undefined"!=typeof WeakSet&&S(new WeakSet),e.isWeakSet=function(t){return S(t)},v.working="undefined"!=typeof ArrayBuffer&&v(new ArrayBuffer),e.isArrayBuffer=A,x.working="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView&&x(new DataView(new ArrayBuffer(1),0,1)),e.isDataView=E;var M="undefined"!=typeof SharedArrayBuffer?SharedArrayBuffer:void 0;function I(t){return"[object SharedArrayBuffer]"===c(t)}function k(t){return void 0!==M&&(void 0===I.working&&(I.working=I(new M)),I.working?I(t):t instanceof M)}function O(t){return g(t,f)}function P(t){return g(t,p)}function T(t){return g(t,h)}function C(t){return l&&g(t,d)}function L(t){return u&&g(t,y)}e.isSharedArrayBuffer=k,e.isAsyncFunction=function(t){return"[object AsyncFunction]"===c(t)},e.isMapIterator=function(t){return"[object Map Iterator]"===c(t)},e.isSetIterator=function(t){return"[object Set Iterator]"===c(t)},e.isGeneratorObject=function(t){return"[object Generator]"===c(t)},e.isWebAssemblyCompiledModule=function(t){return"[object WebAssembly.Module]"===c(t)},e.isNumberObject=O,e.isStringObject=P,e.isBooleanObject=T,e.isBigIntObject=C,e.isSymbolObject=L,e.isBoxedPrimitive=function(t){return O(t)||P(t)||T(t)||C(t)||L(t)},e.isAnyArrayBuffer=function(t){return"undefined"!=typeof Uint8Array&&(A(t)||k(t))},["isProxy","isExternal","isModuleNamespaceObject"].forEach((function(t){Object.defineProperty(e,t,{enumerable:!1,value:function(){throw new Error(t+" is not supported in userland")}})}))},537:(t,e,r)=>{var n=r(5606),o=Object.getOwnPropertyDescriptors||function(t){for(var e=Object.keys(t),r={},n=0;n<e.length;n++)r[e[n]]=Object.getOwnPropertyDescriptor(t,e[n]);return r},i=/%[sdj%]/g;e.format=function(t){if(!w(t)){for(var e=[],r=0;r<arguments.length;r++)e.push(u(arguments[r]));return e.join(" ")}r=1;for(var n=arguments,o=n.length,a=String(t).replace(i,(function(t){if("%%"===t)return"%";if(r>=o)return t;switch(t){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(t){return"[Circular]"}default:return t}})),s=n[r];r<o;s=n[++r])m(s)||!A(s)?a+=" "+s:a+=" "+u(s);return a},e.deprecate=function(t,r){if(void 0!==n&&!0===n.noDeprecation)return t;if(void 0===n)return function(){return e.deprecate(t,r).apply(this,arguments)};var o=!1;return function(){if(!o){if(n.throwDeprecation)throw new Error(r);n.traceDeprecation?console.trace(r):console.error(r),o=!0}return t.apply(this,arguments)}};var a={},s=/^$/;if(n.env.NODE_DEBUG){var l=n.env.NODE_DEBUG;l=l.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),s=new RegExp("^"+l+"$","i")}function u(t,r){var n={seen:[],stylize:f};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),g(r)?n.showHidden=r:r&&e._extend(n,r),S(n.showHidden)&&(n.showHidden=!1),S(n.depth)&&(n.depth=2),S(n.colors)&&(n.colors=!1),S(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=c),p(n,t,n.depth)}function c(t,e){var r=u.styles[e];return r?"["+u.colors[r][0]+"m"+t+"["+u.colors[r][1]+"m":t}function f(t,e){return t}function p(t,r,n){if(t.customInspect&&r&&M(r.inspect)&&r.inspect!==e.inspect&&(!r.constructor||r.constructor.prototype!==r)){var o=r.inspect(n,t);return w(o)||(o=p(t,o,n)),o}var i=function(t,e){if(S(e))return t.stylize("undefined","undefined");if(w(e)){var r="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(r,"string")}return b(e)?t.stylize(""+e,"number"):g(e)?t.stylize(""+e,"boolean"):m(e)?t.stylize("null","null"):void 0}(t,r);if(i)return i;var a=Object.keys(r),s=function(t){var e={};return t.forEach((function(t,r){e[t]=!0})),e}(a);if(t.showHidden&&(a=Object.getOwnPropertyNames(r)),E(r)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return h(r);if(0===a.length){if(M(r)){var l=r.name?": "+r.name:"";return t.stylize("[Function"+l+"]","special")}if(v(r))return t.stylize(RegExp.prototype.toString.call(r),"regexp");if(x(r))return t.stylize(Date.prototype.toString.call(r),"date");if(E(r))return h(r)}var u,c="",f=!1,A=["{","}"];return y(r)&&(f=!0,A=["[","]"]),M(r)&&(c=" [Function"+(r.name?": "+r.name:"")+"]"),v(r)&&(c=" "+RegExp.prototype.toString.call(r)),x(r)&&(c=" "+Date.prototype.toUTCString.call(r)),E(r)&&(c=" "+h(r)),0!==a.length||f&&0!=r.length?n<0?v(r)?t.stylize(RegExp.prototype.toString.call(r),"regexp"):t.stylize("[Object]","special"):(t.seen.push(r),u=f?function(t,e,r,n,o){for(var i=[],a=0,s=e.length;a<s;++a)P(e,String(a))?i.push(d(t,e,r,n,String(a),!0)):i.push("");return o.forEach((function(o){o.match(/^\d+$/)||i.push(d(t,e,r,n,o,!0))})),i}(t,r,n,s,a):a.map((function(e){return d(t,r,n,s,e,f)})),t.seen.pop(),function(t,e,r){return t.reduce((function(t,e){return e.indexOf("\n"),t+e.replace(/\u001b\[\d\d?m/g,"").length+1}),0)>60?r[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+r[1]:r[0]+e+" "+t.join(", ")+" "+r[1]}(u,c,A)):A[0]+c+A[1]}function h(t){return"["+Error.prototype.toString.call(t)+"]"}function d(t,e,r,n,o,i){var a,s,l;if((l=Object.getOwnPropertyDescriptor(e,o)||{value:e[o]}).get?s=l.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):l.set&&(s=t.stylize("[Setter]","special")),P(n,o)||(a="["+o+"]"),s||(t.seen.indexOf(l.value)<0?(s=m(r)?p(t,l.value,null):p(t,l.value,r-1)).indexOf("\n")>-1&&(s=i?s.split("\n").map((function(t){return" "+t})).join("\n").slice(2):"\n"+s.split("\n").map((function(t){return" "+t})).join("\n")):s=t.stylize("[Circular]","special")),S(a)){if(i&&o.match(/^\d+$/))return s;(a=JSON.stringify(""+o)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.slice(1,-1),a=t.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=t.stylize(a,"string"))}return a+": "+s}function y(t){return Array.isArray(t)}function g(t){return"boolean"==typeof t}function m(t){return null===t}function b(t){return"number"==typeof t}function w(t){return"string"==typeof t}function S(t){return void 0===t}function v(t){return A(t)&&"[object RegExp]"===I(t)}function A(t){return"object"==typeof t&&null!==t}function x(t){return A(t)&&"[object Date]"===I(t)}function E(t){return A(t)&&("[object Error]"===I(t)||t instanceof Error)}function M(t){return"function"==typeof t}function I(t){return Object.prototype.toString.call(t)}function k(t){return t<10?"0"+t.toString(10):t.toString(10)}e.debuglog=function(t){if(t=t.toUpperCase(),!a[t])if(s.test(t)){var r=n.pid;a[t]=function(){var n=e.format.apply(e,arguments);console.error("%s %d: %s",t,r,n)}}else a[t]=function(){};return a[t]},e.inspect=u,u.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},u.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},e.types=r(9032),e.isArray=y,e.isBoolean=g,e.isNull=m,e.isNullOrUndefined=function(t){return null==t},e.isNumber=b,e.isString=w,e.isSymbol=function(t){return"symbol"==typeof t},e.isUndefined=S,e.isRegExp=v,e.types.isRegExp=v,e.isObject=A,e.isDate=x,e.types.isDate=x,e.isError=E,e.types.isNativeError=E,e.isFunction=M,e.isPrimitive=function(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t},e.isBuffer=r(1135);var O=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function P(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.log=function(){var t,r;console.log("%s - %s",(r=[k((t=new Date).getHours()),k(t.getMinutes()),k(t.getSeconds())].join(":"),[t.getDate(),O[t.getMonth()],r].join(" ")),e.format.apply(e,arguments))},e.inherits=r(6698),e._extend=function(t,e){if(!e||!A(e))return t;for(var r=Object.keys(e),n=r.length;n--;)t[r[n]]=e[r[n]];return t};var T="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function C(t,e){if(!t){var r=new Error("Promise was rejected with a falsy value");r.reason=t,t=r}return e(t)}e.promisify=function(t){if("function"!=typeof t)throw new TypeError('The "original" argument must be of type Function');if(T&&t[T]){var e;if("function"!=typeof(e=t[T]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(e,T,{value:e,enumerable:!1,writable:!1,configurable:!0}),e}function e(){for(var e,r,n=new Promise((function(t,n){e=t,r=n})),o=[],i=0;i<arguments.length;i++)o.push(arguments[i]);o.push((function(t,n){t?r(t):e(n)}));try{t.apply(this,o)}catch(t){r(t)}return n}return Object.setPrototypeOf(e,Object.getPrototypeOf(t)),T&&Object.defineProperty(e,T,{value:e,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(e,o(t))},e.promisify.custom=T,e.callbackify=function(t){if("function"!=typeof t)throw new TypeError('The "original" argument must be of type Function');function e(){for(var e=[],r=0;r<arguments.length;r++)e.push(arguments[r]);var o=e.pop();if("function"!=typeof o)throw new TypeError("The last argument must be of type Function");var i=this,a=function(){return o.apply(i,arguments)};t.apply(this,e).then((function(t){n.nextTick(a.bind(null,null,t))}),(function(t){n.nextTick(C.bind(null,t,a))}))}return Object.setPrototypeOf(e,Object.getPrototypeOf(t)),Object.defineProperties(e,o(t)),e}},5767:(t,e,r)=>{"use strict";var n=r(2682),o=r(9209),i=r(487),a=r(6556),s=r(5795),l=a("Object.prototype.toString"),u=r(9092)(),c="undefined"==typeof globalThis?r.g:globalThis,f=o(),p=a("String.prototype.slice"),h=Object.getPrototypeOf,d=a("Array.prototype.indexOf",!0)||function(t,e){for(var r=0;r<t.length;r+=1)if(t[r]===e)return r;return-1},y={__proto__:null};n(f,u&&s&&h?function(t){var e=new c[t];if(Symbol.toStringTag in e){var r=h(e),n=s(r,Symbol.toStringTag);if(!n){var o=h(r);n=s(o,Symbol.toStringTag)}y["$"+t]=i(n.get)}}:function(t){var e=new c[t],r=e.slice||e.set;r&&(y["$"+t]=i(r))}),t.exports=function(t){if(!t||"object"!=typeof t)return!1;if(!u){var e=p(l(t),8,-1);return d(f,e)>-1?e:"Object"===e&&function(t){var e=!1;return n(y,(function(r,n){if(!e)try{r(t),e=p(n,1)}catch(t){}})),e}(t)}return s?function(t){var e=!1;return n(y,(function(r,n){if(!e)try{"$"+r(t)===n&&(e=p(n,1))}catch(t){}})),e}(t):null}},4047:(t,e,r)=>{var n=r(8287).Buffer;function o(t,e){this.buffer=t,this.position=0,this.isBigEndian=e||!1}function i(t,e,r){return function(){var n;return n=this.isBigEndian?e.call(this.buffer,this.position):t.call(this.buffer,this.position),this.position+=r,n}}t.exports=o,o.prototype.readUInt8=i(n.prototype.readUInt8,n.prototype.readUInt8,1),o.prototype.readUInt16=i(n.prototype.readUInt16LE,n.prototype.readUInt16BE,2),o.prototype.readUInt32=i(n.prototype.readUInt32LE,n.prototype.readUInt32BE,4),o.prototype.readInt8=i(n.prototype.readInt8,n.prototype.readInt8,1),o.prototype.readInt16=i(n.prototype.readInt16LE,n.prototype.readInt16BE,2),o.prototype.readInt32=i(n.prototype.readInt32LE,n.prototype.readInt32BE,4),o.prototype.readFloat=i(n.prototype.readFloatLE,n.prototype.readFloatBE,4),o.prototype.readDouble=i(n.prototype.readDoubleLE,n.prototype.readDoubleBE,8),o.prototype.readVarInt=function(){var t,e=0,r=0;do{e+=(127&(t=this.buffer[this.position+r]))<<7*r,r++}while(t>=128);return this.position+=r,e}},1199:(t,e,r)=>{var n=r(8287).Buffer;function o(t,e){this.buffer=new n(t),this.position=0,this.allowResize=e}function i(t,e){return function(r,n){this.ensureSize(e),t.call(this.buffer,r,this.position,n),this.position+=e}}t.exports=o,o.prototype.writeUInt8=i(n.prototype.writeUInt8,1),o.prototype.writeUInt16LE=i(n.prototype.writeUInt16LE,2),o.prototype.writeUInt16BE=i(n.prototype.writeUInt16BE,2),o.prototype.writeUInt32LE=i(n.prototype.writeUInt32LE,4),o.prototype.writeUInt32BE=i(n.prototype.writeUInt32BE,4),o.prototype.writeInt8=i(n.prototype.writeInt8,1),o.prototype.writeInt16LE=i(n.prototype.writeInt16LE,2),o.prototype.writeInt16BE=i(n.prototype.writeInt16BE,2),o.prototype.writeInt32LE=i(n.prototype.writeInt32LE,4),o.prototype.writeInt32BE=i(n.prototype.writeInt32BE,4),o.prototype.writeFloatLE=i(n.prototype.writeFloatLE,4),o.prototype.writeFloatBE=i(n.prototype.writeFloatBE,4),o.prototype.writeDoubleLE=i(n.prototype.writeDoubleLE,8),o.prototype.writeDoubleBE=i(n.prototype.writeDoubleBE,8),o.prototype.writeBuffer=function(t){this.ensureSize(t.length),t.copy(this.buffer,this.position,0,t.length),this.position+=t.length},o.prototype.writeVarInt=function(t){for(var e=1;4294967168&t;)this.writeUInt8(127&t|128),t>>>=7,e++;return this.writeUInt8(127&t),e},o.prototype.ensureSize=function(t){if(this.buffer.length<this.position+t){if(!this.allowResize)throw new RangeError("index out of range");var e=new n(this.position+t);this.buffer.copy(e,0,0,this.buffer.length),this.buffer=e}}},2957:(t,e,r)=>{var n=r(8287).Buffer;t.exports=g;var o=r(740),i=r(4263),a=r(350),s=r(743),l=r(3452),u=r(3959),c=r(9236),f=r(1141),p=r(4047),h=r(1199),d=r(2104),y=r(1865);function g(){this.srid=void 0,this.hasZ=!1,this.hasM=!1}g.parse=function(t,e){if("string"==typeof t||t instanceof d)return g._parseWkt(t);if(n.isBuffer(t)||t instanceof p)return g._parseWkb(t,e);throw new Error("first argument must be a string or Buffer")},g._parseWkt=function(t){var e,r,n=(e=t instanceof d?t:new d(t)).matchRegex([/^SRID=(\d+);/]);n&&(r=parseInt(n[1],10));var p=e.matchType(),h=e.matchDimension(),y={srid:r,hasZ:h.hasZ,hasM:h.hasM};switch(p){case o.wkt.Point:return i._parseWkt(e,y);case o.wkt.LineString:return a._parseWkt(e,y);case o.wkt.Polygon:return s._parseWkt(e,y);case o.wkt.MultiPoint:return l._parseWkt(e,y);case o.wkt.MultiLineString:return u._parseWkt(e,y);case o.wkt.MultiPolygon:return c._parseWkt(e,y);case o.wkt.GeometryCollection:return f._parseWkt(e,y)}},g._parseWkb=function(t,e){var r,n,h,d={};switch((r=t instanceof p?t:new p(t)).isBigEndian=!r.readInt8(),n=r.readUInt32(),d.hasSrid=!(536870912&~n),d.isEwkb=536870912&n||1073741824&n||2147483648&n,d.hasSrid&&(d.srid=r.readUInt32()),d.hasZ=!1,d.hasM=!1,d.isEwkb||e&&e.isEwkb?(2147483648&n&&(d.hasZ=!0),1073741824&n&&(d.hasM=!0),h=15&n):n>=1e3&&n<2e3?(d.hasZ=!0,h=n-1e3):n>=2e3&&n<3e3?(d.hasM=!0,h=n-2e3):n>=3e3&&n<4e3?(d.hasZ=!0,d.hasM=!0,h=n-3e3):h=n,h){case o.wkb.Point:return i._parseWkb(r,d);case o.wkb.LineString:return a._parseWkb(r,d);case o.wkb.Polygon:return s._parseWkb(r,d);case o.wkb.MultiPoint:return l._parseWkb(r,d);case o.wkb.MultiLineString:return u._parseWkb(r,d);case o.wkb.MultiPolygon:return c._parseWkb(r,d);case o.wkb.GeometryCollection:return f._parseWkb(r,d);default:throw new Error("GeometryType "+h+" not supported")}},g.parseTwkb=function(t){var e,r={},n=(e=t instanceof p?t:new p(t)).readUInt8(),h=e.readUInt8(),d=15&n;if(r.precision=y.decode(n>>4),r.precisionFactor=Math.pow(10,r.precision),r.hasBoundingBox=1&h,r.hasSizeAttribute=h>>1&1,r.hasIdList=h>>2&1,r.hasExtendedPrecision=h>>3&1,r.isEmpty=h>>4&1,r.hasExtendedPrecision){var g=e.readUInt8();r.hasZ=!(1&~g),r.hasM=!(2&~g),r.zPrecision=y.decode((28&g)>>2),r.zPrecisionFactor=Math.pow(10,r.zPrecision),r.mPrecision=y.decode((224&g)>>5),r.mPrecisionFactor=Math.pow(10,r.mPrecision)}else r.hasZ=!1,r.hasM=!1;if(r.hasSizeAttribute&&e.readVarInt(),r.hasBoundingBox){var m=2;r.hasZ&&m++,r.hasM&&m++;for(var b=0;b<m;b++)e.readVarInt(),e.readVarInt()}switch(d){case o.wkb.Point:return i._parseTwkb(e,r);case o.wkb.LineString:return a._parseTwkb(e,r);case o.wkb.Polygon:return s._parseTwkb(e,r);case o.wkb.MultiPoint:return l._parseTwkb(e,r);case o.wkb.MultiLineString:return u._parseTwkb(e,r);case o.wkb.MultiPolygon:return c._parseTwkb(e,r);case o.wkb.GeometryCollection:return f._parseTwkb(e,r);default:throw new Error("GeometryType "+d+" not supported")}},g.parseGeoJSON=function(t){return g._parseGeoJSON(t)},g._parseGeoJSON=function(t,e){var r;switch(t.type){case o.geoJSON.Point:r=i._parseGeoJSON(t);break;case o.geoJSON.LineString:r=a._parseGeoJSON(t);break;case o.geoJSON.Polygon:r=s._parseGeoJSON(t);break;case o.geoJSON.MultiPoint:r=l._parseGeoJSON(t);break;case o.geoJSON.MultiLineString:r=u._parseGeoJSON(t);break;case o.geoJSON.MultiPolygon:r=c._parseGeoJSON(t);break;case o.geoJSON.GeometryCollection:r=f._parseGeoJSON(t);break;default:throw new Error("GeometryType "+t.type+" not supported")}if(t.crs&&t.crs.type&&"name"===t.crs.type&&t.crs.properties&&t.crs.properties.name){var n=t.crs.properties.name;if(0===n.indexOf("EPSG:"))r.srid=parseInt(n.substring(5));else{if(0!==n.indexOf("urn:ogc:def:crs:EPSG::"))throw new Error("Unsupported crs: "+n);r.srid=parseInt(n.substring(22))}}else e||(r.srid=4326);return r},g.prototype.toEwkt=function(){return"SRID="+this.srid+";"+this.toWkt()},g.prototype.toEwkb=function(){var t=new h(this._getWkbSize()+4),e=this.toWkb();return t.writeInt8(1),t.writeUInt32LE((536870912|e.slice(1,5).readUInt32LE(0))>>>0,!0),t.writeUInt32LE(this.srid),t.writeBuffer(e.slice(5)),t.buffer},g.prototype._getWktType=function(t,e){var r=t;return this.hasZ&&this.hasM?r+=" ZM ":this.hasZ?r+=" Z ":this.hasM&&(r+=" M "),!e||this.hasZ||this.hasM||(r+=" "),e&&(r+="EMPTY"),r},g.prototype._getWktCoordinate=function(t){var e=t.x+" "+t.y;return this.hasZ&&(e+=" "+t.z),this.hasM&&(e+=" "+t.m),e},g.prototype._writeWkbType=function(t,e,r){var n=0;void 0!==this.srid||r&&void 0!==r.srid?(this.hasZ&&(n|=2147483648),this.hasM&&(n|=1073741824)):this.hasZ&&this.hasM?n+=3e3:this.hasZ?n+=1e3:this.hasM&&(n+=2e3),t.writeUInt32LE(n+e>>>0,!0)},g.getTwkbPrecision=function(t,e,r){return{xy:t,z:e,m:r,xyFactor:Math.pow(10,t),zFactor:Math.pow(10,e),mFactor:Math.pow(10,r)}},g.prototype._writeTwkbHeader=function(t,e,r,n){var o=(y.encode(r.xy)<<4)+e,i=(this.hasZ||this.hasM)<<3;if(i+=n<<4,t.writeUInt8(o),t.writeUInt8(i),this.hasZ||this.hasM){var a=0;this.hasZ&&(a|=1),this.hasM&&(a|=2),t.writeUInt8(a)}},g.prototype.toGeoJSON=function(t){var e={};return this.srid&&t&&(t.shortCrs?e.crs={type:"name",properties:{name:"EPSG:"+this.srid}}:t.longCrs&&(e.crs={type:"name",properties:{name:"urn:ogc:def:crs:EPSG::"+this.srid}})),e}},1141:(t,e,r)=>{t.exports=s;var n=r(537),o=r(740),i=r(2957),a=r(1199);function s(t,e){i.call(this),this.geometries=t||[],this.srid=e,this.geometries.length>0&&(this.hasZ=this.geometries[0].hasZ,this.hasM=this.geometries[0].hasM)}n.inherits(s,i),s.Z=function(t,e){var r=new s(t,e);return r.hasZ=!0,r},s.M=function(t,e){var r=new s(t,e);return r.hasM=!0,r},s.ZM=function(t,e){var r=new s(t,e);return r.hasZ=!0,r.hasM=!0,r},s._parseWkt=function(t,e){var r=new s;if(r.srid=e.srid,r.hasZ=e.hasZ,r.hasM=e.hasM,t.isMatch(["EMPTY"]))return r;t.expectGroupStart();do{r.geometries.push(i.parse(t))}while(t.isMatch([","]));return t.expectGroupEnd(),r},s._parseWkb=function(t,e){var r=new s;r.srid=e.srid,r.hasZ=e.hasZ,r.hasM=e.hasM;for(var n=t.readUInt32(),o=0;o<n;o++)r.geometries.push(i.parse(t,e));return r},s._parseTwkb=function(t,e){var r=new s;if(r.hasZ=e.hasZ,r.hasM=e.hasM,e.isEmpty)return r;for(var n=t.readVarInt(),o=0;o<n;o++)r.geometries.push(i.parseTwkb(t));return r},s._parseGeoJSON=function(t){for(var e=new s,r=0;r<t.geometries.length;r++)e.geometries.push(i._parseGeoJSON(t.geometries[r],!0));return e.geometries.length>0&&(e.hasZ=e.geometries[0].hasZ),e},s.prototype.toWkt=function(){if(0===this.geometries.length)return this._getWktType(o.wkt.GeometryCollection,!0);for(var t=this._getWktType(o.wkt.GeometryCollection,!1)+"(",e=0;e<this.geometries.length;e++)t+=this.geometries[e].toWkt()+",";return(t=t.slice(0,-1))+")"},s.prototype.toWkb=function(){var t=new a(this._getWkbSize());t.writeInt8(1),this._writeWkbType(t,o.wkb.GeometryCollection),t.writeUInt32LE(this.geometries.length);for(var e=0;e<this.geometries.length;e++)t.writeBuffer(this.geometries[e].toWkb({srid:this.srid}));return t.buffer},s.prototype.toTwkb=function(){var t=new a(0,!0),e=i.getTwkbPrecision(5,0,0),r=0===this.geometries.length;if(this._writeTwkbHeader(t,o.wkb.GeometryCollection,e,r),this.geometries.length>0){t.writeVarInt(this.geometries.length);for(var n=0;n<this.geometries.length;n++)t.writeBuffer(this.geometries[n].toTwkb())}return t.buffer},s.prototype._getWkbSize=function(){for(var t=9,e=0;e<this.geometries.length;e++)t+=this.geometries[e]._getWkbSize();return t},s.prototype.toGeoJSON=function(t){var e=i.prototype.toGeoJSON.call(this,t);e.type=o.geoJSON.GeometryCollection,e.geometries=[];for(var r=0;r<this.geometries.length;r++)e.geometries.push(this.geometries[r].toGeoJSON());return e}},350:(t,e,r)=>{t.exports=l;var n=r(537),o=r(2957),i=r(740),a=r(4263),s=r(1199);function l(t,e){o.call(this),this.points=t||[],this.srid=e,this.points.length>0&&(this.hasZ=this.points[0].hasZ,this.hasM=this.points[0].hasM)}n.inherits(l,o),l.Z=function(t,e){var r=new l(t,e);return r.hasZ=!0,r},l.M=function(t,e){var r=new l(t,e);return r.hasM=!0,r},l.ZM=function(t,e){var r=new l(t,e);return r.hasZ=!0,r.hasM=!0,r},l._parseWkt=function(t,e){var r=new l;return r.srid=e.srid,r.hasZ=e.hasZ,r.hasM=e.hasM,t.isMatch(["EMPTY"])||(t.expectGroupStart(),r.points.push.apply(r.points,t.matchCoordinates(e)),t.expectGroupEnd()),r},l._parseWkb=function(t,e){var r=new l;r.srid=e.srid,r.hasZ=e.hasZ,r.hasM=e.hasM;for(var n=t.readUInt32(),o=0;o<n;o++)r.points.push(a._readWkbPoint(t,e));return r},l._parseTwkb=function(t,e){var r=new l;if(r.hasZ=e.hasZ,r.hasM=e.hasM,e.isEmpty)return r;for(var n=new a(0,0,e.hasZ?0:void 0,e.hasM?0:void 0),o=t.readVarInt(),i=0;i<o;i++)r.points.push(a._readTwkbPoint(t,e,n));return r},l._parseGeoJSON=function(t){var e=new l;t.coordinates.length>0&&(e.hasZ=t.coordinates[0].length>2);for(var r=0;r<t.coordinates.length;r++)e.points.push(a._readGeoJSONPoint(t.coordinates[r]));return e},l.prototype.toWkt=function(){return 0===this.points.length?this._getWktType(i.wkt.LineString,!0):this._getWktType(i.wkt.LineString,!1)+this._toInnerWkt()},l.prototype._toInnerWkt=function(){for(var t="(",e=0;e<this.points.length;e++)t+=this._getWktCoordinate(this.points[e])+",";return(t=t.slice(0,-1))+")"},l.prototype.toWkb=function(t){var e=new s(this._getWkbSize());e.writeInt8(1),this._writeWkbType(e,i.wkb.LineString,t),e.writeUInt32LE(this.points.length);for(var r=0;r<this.points.length;r++)this.points[r]._writeWkbPoint(e);return e.buffer},l.prototype.toTwkb=function(){var t=new s(0,!0),e=o.getTwkbPrecision(5,0,0),r=0===this.points.length;if(this._writeTwkbHeader(t,i.wkb.LineString,e,r),this.points.length>0){t.writeVarInt(this.points.length);for(var n=new a(0,0,0,0),l=0;l<this.points.length;l++)this.points[l]._writeTwkbPoint(t,e,n)}return t.buffer},l.prototype._getWkbSize=function(){var t=16;return this.hasZ&&(t+=8),this.hasM&&(t+=8),9+this.points.length*t},l.prototype.toGeoJSON=function(t){var e=o.prototype.toGeoJSON.call(this,t);e.type=i.geoJSON.LineString,e.coordinates=[];for(var r=0;r<this.points.length;r++)this.hasZ?e.coordinates.push([this.points[r].x,this.points[r].y,this.points[r].z]):e.coordinates.push([this.points[r].x,this.points[r].y]);return e}},3959:(t,e,r)=>{t.exports=u;var n=r(537),o=r(740),i=r(2957),a=r(4263),s=r(350),l=r(1199);function u(t,e){i.call(this),this.lineStrings=t||[],this.srid=e,this.lineStrings.length>0&&(this.hasZ=this.lineStrings[0].hasZ,this.hasM=this.lineStrings[0].hasM)}n.inherits(u,i),u.Z=function(t,e){var r=new u(t,e);return r.hasZ=!0,r},u.M=function(t,e){var r=new u(t,e);return r.hasM=!0,r},u.ZM=function(t,e){var r=new u(t,e);return r.hasZ=!0,r.hasM=!0,r},u._parseWkt=function(t,e){var r=new u;if(r.srid=e.srid,r.hasZ=e.hasZ,r.hasM=e.hasM,t.isMatch(["EMPTY"]))return r;t.expectGroupStart();do{t.expectGroupStart(),r.lineStrings.push(new s(t.matchCoordinates(e))),t.expectGroupEnd()}while(t.isMatch([","]));return t.expectGroupEnd(),r},u._parseWkb=function(t,e){var r=new u;r.srid=e.srid,r.hasZ=e.hasZ,r.hasM=e.hasM;for(var n=t.readUInt32(),o=0;o<n;o++)r.lineStrings.push(i.parse(t,e));return r},u._parseTwkb=function(t,e){var r=new u;if(r.hasZ=e.hasZ,r.hasM=e.hasM,e.isEmpty)return r;for(var n=new a(0,0,e.hasZ?0:void 0,e.hasM?0:void 0),o=t.readVarInt(),i=0;i<o;i++){var l=new s;l.hasZ=e.hasZ,l.hasM=e.hasM;for(var c=t.readVarInt(),f=0;f<c;f++)l.points.push(a._readTwkbPoint(t,e,n));r.lineStrings.push(l)}return r},u._parseGeoJSON=function(t){var e=new u;t.coordinates.length>0&&t.coordinates[0].length>0&&(e.hasZ=t.coordinates[0][0].length>2);for(var r=0;r<t.coordinates.length;r++)e.lineStrings.push(s._parseGeoJSON({coordinates:t.coordinates[r]}));return e},u.prototype.toWkt=function(){if(0===this.lineStrings.length)return this._getWktType(o.wkt.MultiLineString,!0);for(var t=this._getWktType(o.wkt.MultiLineString,!1)+"(",e=0;e<this.lineStrings.length;e++)t+=this.lineStrings[e]._toInnerWkt()+",";return(t=t.slice(0,-1))+")"},u.prototype.toWkb=function(){var t=new l(this._getWkbSize());t.writeInt8(1),this._writeWkbType(t,o.wkb.MultiLineString),t.writeUInt32LE(this.lineStrings.length);for(var e=0;e<this.lineStrings.length;e++)t.writeBuffer(this.lineStrings[e].toWkb({srid:this.srid}));return t.buffer},u.prototype.toTwkb=function(){var t=new l(0,!0),e=i.getTwkbPrecision(5,0,0),r=0===this.lineStrings.length;if(this._writeTwkbHeader(t,o.wkb.MultiLineString,e,r),this.lineStrings.length>0){t.writeVarInt(this.lineStrings.length);for(var n=new a(0,0,0,0),s=0;s<this.lineStrings.length;s++){t.writeVarInt(this.lineStrings[s].points.length);for(var u=0;u<this.lineStrings[s].points.length;u++)this.lineStrings[s].points[u]._writeTwkbPoint(t,e,n)}}return t.buffer},u.prototype._getWkbSize=function(){for(var t=9,e=0;e<this.lineStrings.length;e++)t+=this.lineStrings[e]._getWkbSize();return t},u.prototype.toGeoJSON=function(t){var e=i.prototype.toGeoJSON.call(this,t);e.type=o.geoJSON.MultiLineString,e.coordinates=[];for(var r=0;r<this.lineStrings.length;r++)e.coordinates.push(this.lineStrings[r].toGeoJSON().coordinates);return e}},3452:(t,e,r)=>{t.exports=l;var n=r(537),o=r(740),i=r(2957),a=r(4263),s=r(1199);function l(t,e){i.call(this),this.points=t||[],this.srid=e,this.points.length>0&&(this.hasZ=this.points[0].hasZ,this.hasM=this.points[0].hasM)}n.inherits(l,i),l.Z=function(t,e){var r=new l(t,e);return r.hasZ=!0,r},l.M=function(t,e){var r=new l(t,e);return r.hasM=!0,r},l.ZM=function(t,e){var r=new l(t,e);return r.hasZ=!0,r.hasM=!0,r},l._parseWkt=function(t,e){var r=new l;return r.srid=e.srid,r.hasZ=e.hasZ,r.hasM=e.hasM,t.isMatch(["EMPTY"])||(t.expectGroupStart(),r.points.push.apply(r.points,t.matchCoordinates(e)),t.expectGroupEnd()),r},l._parseWkb=function(t,e){var r=new l;r.srid=e.srid,r.hasZ=e.hasZ,r.hasM=e.hasM;for(var n=t.readUInt32(),o=0;o<n;o++)r.points.push(i.parse(t,e));return r},l._parseTwkb=function(t,e){var r=new l;if(r.hasZ=e.hasZ,r.hasM=e.hasM,e.isEmpty)return r;for(var n=new a(0,0,e.hasZ?0:void 0,e.hasM?0:void 0),o=t.readVarInt(),i=0;i<o;i++)r.points.push(a._readTwkbPoint(t,e,n));return r},l._parseGeoJSON=function(t){var e=new l;t.coordinates.length>0&&(e.hasZ=t.coordinates[0].length>2);for(var r=0;r<t.coordinates.length;r++)e.points.push(a._parseGeoJSON({coordinates:t.coordinates[r]}));return e},l.prototype.toWkt=function(){if(0===this.points.length)return this._getWktType(o.wkt.MultiPoint,!0);for(var t=this._getWktType(o.wkt.MultiPoint,!1)+"(",e=0;e<this.points.length;e++)t+=this._getWktCoordinate(this.points[e])+",";return(t=t.slice(0,-1))+")"},l.prototype.toWkb=function(){var t=new s(this._getWkbSize());t.writeInt8(1),this._writeWkbType(t,o.wkb.MultiPoint),t.writeUInt32LE(this.points.length);for(var e=0;e<this.points.length;e++)t.writeBuffer(this.points[e].toWkb({srid:this.srid}));return t.buffer},l.prototype.toTwkb=function(){var t=new s(0,!0),e=i.getTwkbPrecision(5,0,0),r=0===this.points.length;if(this._writeTwkbHeader(t,o.wkb.MultiPoint,e,r),this.points.length>0){t.writeVarInt(this.points.length);for(var n=new a(0,0,0,0),l=0;l<this.points.length;l++)this.points[l]._writeTwkbPoint(t,e,n)}return t.buffer},l.prototype._getWkbSize=function(){var t=16;return this.hasZ&&(t+=8),this.hasM&&(t+=8),t+=5,9+this.points.length*t},l.prototype.toGeoJSON=function(t){var e=i.prototype.toGeoJSON.call(this,t);e.type=o.geoJSON.MultiPoint,e.coordinates=[];for(var r=0;r<this.points.length;r++)e.coordinates.push(this.points[r].toGeoJSON().coordinates);return e}},9236:(t,e,r)=>{t.exports=u;var n=r(537),o=r(740),i=r(2957),a=r(4263),s=r(743),l=r(1199);function u(t,e){i.call(this),this.polygons=t||[],this.srid=e,this.polygons.length>0&&(this.hasZ=this.polygons[0].hasZ,this.hasM=this.polygons[0].hasM)}n.inherits(u,i),u.Z=function(t,e){var r=new u(t,e);return r.hasZ=!0,r},u.M=function(t,e){var r=new u(t,e);return r.hasM=!0,r},u.ZM=function(t,e){var r=new u(t,e);return r.hasZ=!0,r.hasM=!0,r},u._parseWkt=function(t,e){var r=new u;if(r.srid=e.srid,r.hasZ=e.hasZ,r.hasM=e.hasM,t.isMatch(["EMPTY"]))return r;t.expectGroupStart();do{t.expectGroupStart();var n=[],o=[];for(t.expectGroupStart(),n.push.apply(n,t.matchCoordinates(e)),t.expectGroupEnd();t.isMatch([","]);)t.expectGroupStart(),o.push(t.matchCoordinates(e)),t.expectGroupEnd();r.polygons.push(new s(n,o)),t.expectGroupEnd()}while(t.isMatch([","]));return t.expectGroupEnd(),r},u._parseWkb=function(t,e){var r=new u;r.srid=e.srid,r.hasZ=e.hasZ,r.hasM=e.hasM;for(var n=t.readUInt32(),o=0;o<n;o++)r.polygons.push(i.parse(t,e));return r},u._parseTwkb=function(t,e){var r=new u;if(r.hasZ=e.hasZ,r.hasM=e.hasM,e.isEmpty)return r;for(var n=new a(0,0,e.hasZ?0:void 0,e.hasM?0:void 0),o=t.readVarInt(),i=0;i<o;i++){var l=new s;l.hasZ=e.hasZ,l.hasM=e.hasM;for(var c=t.readVarInt(),f=t.readVarInt(),p=0;p<f;p++)l.exteriorRing.push(a._readTwkbPoint(t,e,n));for(p=1;p<c;p++){for(var h=[],d=t.readVarInt(),y=0;y<d;y++)h.push(a._readTwkbPoint(t,e,n));l.interiorRings.push(h)}r.polygons.push(l)}return r},u._parseGeoJSON=function(t){var e=new u;t.coordinates.length>0&&t.coordinates[0].length>0&&t.coordinates[0][0].length>0&&(e.hasZ=t.coordinates[0][0][0].length>2);for(var r=0;r<t.coordinates.length;r++)e.polygons.push(s._parseGeoJSON({coordinates:t.coordinates[r]}));return e},u.prototype.toWkt=function(){if(0===this.polygons.length)return this._getWktType(o.wkt.MultiPolygon,!0);for(var t=this._getWktType(o.wkt.MultiPolygon,!1)+"(",e=0;e<this.polygons.length;e++)t+=this.polygons[e]._toInnerWkt()+",";return(t=t.slice(0,-1))+")"},u.prototype.toWkb=function(){var t=new l(this._getWkbSize());t.writeInt8(1),this._writeWkbType(t,o.wkb.MultiPolygon),t.writeUInt32LE(this.polygons.length);for(var e=0;e<this.polygons.length;e++)t.writeBuffer(this.polygons[e].toWkb({srid:this.srid}));return t.buffer},u.prototype.toTwkb=function(){var t=new l(0,!0),e=i.getTwkbPrecision(5,0,0),r=0===this.polygons.length;if(this._writeTwkbHeader(t,o.wkb.MultiPolygon,e,r),this.polygons.length>0){t.writeVarInt(this.polygons.length);for(var n=new a(0,0,0,0),s=0;s<this.polygons.length;s++){t.writeVarInt(1+this.polygons[s].interiorRings.length),t.writeVarInt(this.polygons[s].exteriorRing.length);for(var u=0;u<this.polygons[s].exteriorRing.length;u++)this.polygons[s].exteriorRing[u]._writeTwkbPoint(t,e,n);for(u=0;u<this.polygons[s].interiorRings.length;u++){t.writeVarInt(this.polygons[s].interiorRings[u].length);for(var c=0;c<this.polygons[s].interiorRings[u].length;c++)this.polygons[s].interiorRings[u][c]._writeTwkbPoint(t,e,n)}}}return t.buffer},u.prototype._getWkbSize=function(){for(var t=9,e=0;e<this.polygons.length;e++)t+=this.polygons[e]._getWkbSize();return t},u.prototype.toGeoJSON=function(t){var e=i.prototype.toGeoJSON.call(this,t);e.type=o.geoJSON.MultiPolygon,e.coordinates=[];for(var r=0;r<this.polygons.length;r++)e.coordinates.push(this.polygons[r].toGeoJSON().coordinates);return e}},4263:(t,e,r)=>{t.exports=l;var n=r(537),o=r(2957),i=r(740),a=r(1199),s=r(1865);function l(t,e,r,n,i){o.call(this),this.x=t,this.y=e,this.z=r,this.m=n,this.srid=i,this.hasZ=void 0!==this.z,this.hasM=void 0!==this.m}n.inherits(l,o),l.Z=function(t,e,r,n){var o=new l(t,e,r,void 0,n);return o.hasZ=!0,o},l.M=function(t,e,r,n){var o=new l(t,e,void 0,r,n);return o.hasM=!0,o},l.ZM=function(t,e,r,n,o){var i=new l(t,e,r,n,o);return i.hasZ=!0,i.hasM=!0,i},l._parseWkt=function(t,e){var r=new l;if(r.srid=e.srid,r.hasZ=e.hasZ,r.hasM=e.hasM,t.isMatch(["EMPTY"]))return r;t.expectGroupStart();var n=t.matchCoordinate(e);return r.x=n.x,r.y=n.y,r.z=n.z,r.m=n.m,t.expectGroupEnd(),r},l._parseWkb=function(t,e){var r=l._readWkbPoint(t,e);return r.srid=e.srid,r},l._readWkbPoint=function(t,e){return new l(t.readDouble(),t.readDouble(),e.hasZ?t.readDouble():void 0,e.hasM?t.readDouble():void 0)},l._parseTwkb=function(t,e){var r=new l;return r.hasZ=e.hasZ,r.hasM=e.hasM,e.isEmpty||(r.x=s.decode(t.readVarInt())/e.precisionFactor,r.y=s.decode(t.readVarInt())/e.precisionFactor,r.z=e.hasZ?s.decode(t.readVarInt())/e.zPrecisionFactor:void 0,r.m=e.hasM?s.decode(t.readVarInt())/e.mPrecisionFactor:void 0),r},l._readTwkbPoint=function(t,e,r){return r.x+=s.decode(t.readVarInt())/e.precisionFactor,r.y+=s.decode(t.readVarInt())/e.precisionFactor,e.hasZ&&(r.z+=s.decode(t.readVarInt())/e.zPrecisionFactor),e.hasM&&(r.m+=s.decode(t.readVarInt())/e.mPrecisionFactor),new l(r.x,r.y,r.z,r.m)},l._parseGeoJSON=function(t){return l._readGeoJSONPoint(t.coordinates)},l._readGeoJSONPoint=function(t){return 0===t.length?new l:t.length>2?new l(t[0],t[1],t[2]):new l(t[0],t[1])},l.prototype.toWkt=function(){return void 0===this.x&&void 0===this.y&&void 0===this.z&&void 0===this.m?this._getWktType(i.wkt.Point,!0):this._getWktType(i.wkt.Point,!1)+"("+this._getWktCoordinate(this)+")"},l.prototype.toWkb=function(t){var e=new a(this._getWkbSize());return e.writeInt8(1),this._writeWkbType(e,i.wkb.Point,t),void 0===this.x&&void 0===this.y?(e.writeDoubleLE(NaN),e.writeDoubleLE(NaN),this.hasZ&&e.writeDoubleLE(NaN),this.hasM&&e.writeDoubleLE(NaN)):this._writeWkbPoint(e),e.buffer},l.prototype._writeWkbPoint=function(t){t.writeDoubleLE(this.x),t.writeDoubleLE(this.y),this.hasZ&&t.writeDoubleLE(this.z),this.hasM&&t.writeDoubleLE(this.m)},l.prototype.toTwkb=function(){var t=new a(0,!0),e=o.getTwkbPrecision(5,0,0),r=void 0===this.x&&void 0===this.y;return this._writeTwkbHeader(t,i.wkb.Point,e,r),r||this._writeTwkbPoint(t,e,new l(0,0,0,0)),t.buffer},l.prototype._writeTwkbPoint=function(t,e,r){var n=this.x*e.xyFactor,o=this.y*e.xyFactor,i=this.z*e.zFactor,a=this.m*e.mFactor;t.writeVarInt(s.encode(n-r.x)),t.writeVarInt(s.encode(o-r.y)),this.hasZ&&t.writeVarInt(s.encode(i-r.z)),this.hasM&&t.writeVarInt(s.encode(a-r.m)),r.x=n,r.y=o,r.z=i,r.m=a},l.prototype._getWkbSize=function(){var t=21;return this.hasZ&&(t+=8),this.hasM&&(t+=8),t},l.prototype.toGeoJSON=function(t){var e=o.prototype.toGeoJSON.call(this,t);return e.type=i.geoJSON.Point,void 0===this.x&&void 0===this.y?e.coordinates=[]:void 0!==this.z?e.coordinates=[this.x,this.y,this.z]:e.coordinates=[this.x,this.y],e}},743:(t,e,r)=>{t.exports=l;var n=r(537),o=r(2957),i=r(740),a=r(4263),s=r(1199);function l(t,e,r){o.call(this),this.exteriorRing=t||[],this.interiorRings=e||[],this.srid=r,this.exteriorRing.length>0&&(this.hasZ=this.exteriorRing[0].hasZ,this.hasM=this.exteriorRing[0].hasM)}n.inherits(l,o),l.Z=function(t,e,r){var n=new l(t,e,r);return n.hasZ=!0,n},l.M=function(t,e,r){var n=new l(t,e,r);return n.hasM=!0,n},l.ZM=function(t,e,r){var n=new l(t,e,r);return n.hasZ=!0,n.hasM=!0,n},l._parseWkt=function(t,e){var r=new l;if(r.srid=e.srid,r.hasZ=e.hasZ,r.hasM=e.hasM,t.isMatch(["EMPTY"]))return r;for(t.expectGroupStart(),t.expectGroupStart(),r.exteriorRing.push.apply(r.exteriorRing,t.matchCoordinates(e)),t.expectGroupEnd();t.isMatch([","]);)t.expectGroupStart(),r.interiorRings.push(t.matchCoordinates(e)),t.expectGroupEnd();return t.expectGroupEnd(),r},l._parseWkb=function(t,e){var r=new l;r.srid=e.srid,r.hasZ=e.hasZ,r.hasM=e.hasM;var n=t.readUInt32();if(n>0){for(var o=t.readUInt32(),i=0;i<o;i++)r.exteriorRing.push(a._readWkbPoint(t,e));for(i=1;i<n;i++){for(var s=[],u=t.readUInt32(),c=0;c<u;c++)s.push(a._readWkbPoint(t,e));r.interiorRings.push(s)}}return r},l._parseTwkb=function(t,e){var r=new l;if(r.hasZ=e.hasZ,r.hasM=e.hasM,e.isEmpty)return r;for(var n=new a(0,0,e.hasZ?0:void 0,e.hasM?0:void 0),o=t.readVarInt(),i=t.readVarInt(),s=0;s<i;s++)r.exteriorRing.push(a._readTwkbPoint(t,e,n));for(s=1;s<o;s++){for(var u=[],c=t.readVarInt(),f=0;f<c;f++)u.push(a._readTwkbPoint(t,e,n));r.interiorRings.push(u)}return r},l._parseGeoJSON=function(t){var e=new l;t.coordinates.length>0&&t.coordinates[0].length>0&&(e.hasZ=t.coordinates[0][0].length>2);for(var r=0;r<t.coordinates.length;r++){r>0&&e.interiorRings.push([]);for(var n=0;n<t.coordinates[r].length;n++)0===r?e.exteriorRing.push(a._readGeoJSONPoint(t.coordinates[r][n])):e.interiorRings[r-1].push(a._readGeoJSONPoint(t.coordinates[r][n]))}return e},l.prototype.toWkt=function(){return 0===this.exteriorRing.length?this._getWktType(i.wkt.Polygon,!0):this._getWktType(i.wkt.Polygon,!1)+this._toInnerWkt()},l.prototype._toInnerWkt=function(){for(var t="((",e=0;e<this.exteriorRing.length;e++)t+=this._getWktCoordinate(this.exteriorRing[e])+",";for(t=t.slice(0,-1),t+=")",e=0;e<this.interiorRings.length;e++){t+=",(";for(var r=0;r<this.interiorRings[e].length;r++)t+=this._getWktCoordinate(this.interiorRings[e][r])+",";t=t.slice(0,-1),t+=")"}return t+")"},l.prototype.toWkb=function(t){var e=new s(this._getWkbSize());e.writeInt8(1),this._writeWkbType(e,i.wkb.Polygon,t),this.exteriorRing.length>0?(e.writeUInt32LE(1+this.interiorRings.length),e.writeUInt32LE(this.exteriorRing.length)):e.writeUInt32LE(0);for(var r=0;r<this.exteriorRing.length;r++)this.exteriorRing[r]._writeWkbPoint(e);for(r=0;r<this.interiorRings.length;r++){e.writeUInt32LE(this.interiorRings[r].length);for(var n=0;n<this.interiorRings[r].length;n++)this.interiorRings[r][n]._writeWkbPoint(e)}return e.buffer},l.prototype.toTwkb=function(){var t=new s(0,!0),e=o.getTwkbPrecision(5,0,0),r=0===this.exteriorRing.length;if(this._writeTwkbHeader(t,i.wkb.Polygon,e,r),this.exteriorRing.length>0){t.writeVarInt(1+this.interiorRings.length),t.writeVarInt(this.exteriorRing.length);for(var n=new a(0,0,0,0),l=0;l<this.exteriorRing.length;l++)this.exteriorRing[l]._writeTwkbPoint(t,e,n);for(l=0;l<this.interiorRings.length;l++){t.writeVarInt(this.interiorRings[l].length);for(var u=0;u<this.interiorRings[l].length;u++)this.interiorRings[l][u]._writeTwkbPoint(t,e,n)}}return t.buffer},l.prototype._getWkbSize=function(){var t=16;this.hasZ&&(t+=8),this.hasM&&(t+=8);var e=9;this.exteriorRing.length>0&&(e+=4+this.exteriorRing.length*t);for(var r=0;r<this.interiorRings.length;r++)e+=4+this.interiorRings[r].length*t;return e},l.prototype.toGeoJSON=function(t){var e=o.prototype.toGeoJSON.call(this,t);if(e.type=i.geoJSON.Polygon,e.coordinates=[],this.exteriorRing.length>0){for(var r=[],n=0;n<this.exteriorRing.length;n++)this.hasZ?r.push([this.exteriorRing[n].x,this.exteriorRing[n].y,this.exteriorRing[n].z]):r.push([this.exteriorRing[n].x,this.exteriorRing[n].y]);e.coordinates.push(r)}for(var a=0;a<this.interiorRings.length;a++){for(var s=[],l=0;l<this.interiorRings[a].length;l++)this.hasZ?s.push([this.interiorRings[a][l].x,this.interiorRings[a][l].y,this.interiorRings[a][l].z]):s.push([this.interiorRings[a][l].x,this.interiorRings[a][l].y]);e.coordinates.push(s)}return e}},740:t=>{t.exports={wkt:{Point:"POINT",LineString:"LINESTRING",Polygon:"POLYGON",MultiPoint:"MULTIPOINT",MultiLineString:"MULTILINESTRING",MultiPolygon:"MULTIPOLYGON",GeometryCollection:"GEOMETRYCOLLECTION"},wkb:{Point:1,LineString:2,Polygon:3,MultiPoint:4,MultiLineString:5,MultiPolygon:6,GeometryCollection:7},geoJSON:{Point:"Point",LineString:"LineString",Polygon:"Polygon",MultiPoint:"MultiPoint",MultiLineString:"MultiLineString",MultiPolygon:"MultiPolygon",GeometryCollection:"GeometryCollection"}}},2104:(t,e,r)=>{t.exports=i;var n=r(740),o=r(4263);function i(t){this.value=t,this.position=0}i.prototype.match=function(t){this.skipWhitespaces();for(var e=0;e<t.length;e++)if(0===this.value.substring(this.position).indexOf(t[e]))return this.position+=t[e].length,t[e];return null},i.prototype.matchRegex=function(t){this.skipWhitespaces();for(var e=0;e<t.length;e++){var r=this.value.substring(this.position).match(t[e]);if(r)return this.position+=r[0].length,r}return null},i.prototype.isMatch=function(t){this.skipWhitespaces();for(var e=0;e<t.length;e++)if(0===this.value.substring(this.position).indexOf(t[e]))return this.position+=t[e].length,!0;return!1},i.prototype.matchType=function(){var t=this.match([n.wkt.Point,n.wkt.LineString,n.wkt.Polygon,n.wkt.MultiPoint,n.wkt.MultiLineString,n.wkt.MultiPolygon,n.wkt.GeometryCollection]);if(!t)throw new Error("Expected geometry type");return t},i.prototype.matchDimension=function(){switch(this.match(["ZM","Z","M"])){case"ZM":return{hasZ:!0,hasM:!0};case"Z":return{hasZ:!0,hasM:!1};case"M":return{hasZ:!1,hasM:!0};default:return{hasZ:!1,hasM:!1}}},i.prototype.expectGroupStart=function(){if(!this.isMatch(["("]))throw new Error("Expected group start")},i.prototype.expectGroupEnd=function(){if(!this.isMatch([")"]))throw new Error("Expected group end")},i.prototype.matchCoordinate=function(t){var e;if(!(e=t.hasZ&&t.hasM?this.matchRegex([/^(\S*)\s+(\S*)\s+(\S*)\s+([^\s,)]*)/]):t.hasZ||t.hasM?this.matchRegex([/^(\S*)\s+(\S*)\s+([^\s,)]*)/]):this.matchRegex([/^(\S*)\s+([^\s,)]*)/])))throw new Error("Expected coordinates");return t.hasZ&&t.hasM?new o(parseFloat(e[1]),parseFloat(e[2]),parseFloat(e[3]),parseFloat(e[4])):t.hasZ?new o(parseFloat(e[1]),parseFloat(e[2]),parseFloat(e[3])):t.hasM?new o(parseFloat(e[1]),parseFloat(e[2]),void 0,parseFloat(e[3])):new o(parseFloat(e[1]),parseFloat(e[2]))},i.prototype.matchCoordinates=function(t){var e=[];do{var r=this.isMatch(["("]);e.push(this.matchCoordinate(t)),r&&this.expectGroupEnd()}while(this.isMatch([","]));return e},i.prototype.skipWhitespaces=function(){for(;this.position<this.value.length&&" "===this.value[this.position];)this.position++}},543:(t,e,r)=>{e.Types=r(740),e.Geometry=r(2957),e.Point=r(4263),e.LineString=r(350),e.Polygon=r(743),e.MultiPoint=r(3452),e.MultiLineString=r(3959),e.MultiPolygon=r(9236),e.GeometryCollection=r(1141)},1865:t=>{t.exports={encode:function(t){return t<<1^t>>31},decode:function(t){return t>>1^-(1&t)}}},9209:(t,e,r)=>{"use strict";var n=r(6578),o="undefined"==typeof globalThis?r.g:globalThis;t.exports=function(){for(var t=[],e=0;e<n.length;e++)"function"==typeof o[n[e]]&&(t[t.length]=n[e]);return t}}},e={};function r(n){var o=e[n];if(void 0!==o)return o.exports;var i=e[n]={exports:{}};return t[n](i,i.exports,r),i.exports}r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var n={};return(()=>{"use strict";r.r(n),r.d(n,{echartAccesosGaugeVehicles:()=>et,echartAccesosHorStackedBarVehicles:()=>at,echartAccesosPieVehicles:()=>it,echartAccesosVerStackedBarVehicles:()=>st,echartAccessosCiutat:()=>D,echartAccessosCiutatPortada:()=>W,echartPuntosMedidaTrafico:()=>ft,echartVieBarYear:()=>ot,echartVieGaugeMonth:()=>X,echartVieGaugeYear:()=>rt,echartVieLineMonth:()=>nt,echartViePrincCiutat:()=>G,listeneresVehicles:()=>j,mapPuntosMedidaTrafico:()=>ct,tableAcceso:()=>Z,tableVariacio:()=>Y,tableVias:()=>K});var t=r(2725);const e="8%",o="2.5%",i="5%",a="18%",s="20%",l="10%",u="90%",c="1%",f="0%",p=["#9c89b8","#4ea8de","#05668d","#ffbf69","#e56b6f","#83c5be","#02c39a","#ee9b00","#cdb4db","#ffadad","#ce4257","#b7b7a4"],h=33,d=27,y=30;function g(t){let e=navigator.language||navigator.userLanguage;e=e.length<=2?`${e}-${e.toUpperCase()}`:e;const r={minimumFractionDigits:0,maximumFractionDigits:2};return"es-ES"===e?t.toLocaleString("de-DE",r):t.toLocaleString(e,r)}function m(t){return 100*(1-17/t)}function b(t,e=!1){let r=`<p>${t[0].name}</p>`;return t.forEach((t=>{const n=e?Math.round(t.data):t.data,o=`<div>${i=t.color,`<span style="display:inline-block;margin-right:5px;border-radius:10px;width:9px;height:9px;background-color:${i}"></span>`} ${t.seriesName}: <strong style="float: right; margin-left:20px">${t.data?g(n):"-"}</strong></div>`;var i;r+=o})),r}function w(t){return g(t)}function S(t){return{1:"GENER",2:"FEBRER",3:"MARÇ",4:"ABRIL",5:"MAIG",6:"JUNY",7:"JULIO",8:"AGOST",9:"SETEMBRE",10:"OCTUBRE",11:"NOVEMBRE",12:"DESEMBRE"}[t]}function v(t,e){const r=t?document.querySelector(t):null,n=e?document.querySelector(e):null;r&&(r.hidden=!0),n&&(n.style.background="url('./build/images/nodata1.png') no-repeat top center",n.hidden=!1)}function A(t,e){const r=t?document.querySelector(t):null,n=e?document.querySelector(e):null;r&&(r.hidden=!0),n&&(n.style.background="#ffffff",n.hidden=!1)}function x(t,e){return t.reduce(((t,r)=>{const n=r[e];return t[n]||(t[n]=[]),t[n].push(r),t}),{})}function E(t){return Math.round(document.getElementById(t).offsetWidth/h)}function M(t,e,r,n,l="",c="total",f=0,h=1,d=2,y=p){if(0===r.length)v(`#${t}`,`#${e}`);else{A(`#${e}`,`#${t}`);const p=[];let S=x(r,f);const v=new Set(r.map((t=>t[h]))),E=Object.keys(S);v.forEach((t=>{E.forEach((e=>{void 0===S[e].find((e=>e[h]===t))&&(S[e].push([S[e][0][f],t,void 0]),S[e][0][1].length>4?S[e].sort(((t,e)=>{const[r,n]=t[1].split("/"),[o,i]=e[1].split("/"),a=new Date(n,r-1,1),s=new Date(i,o-1,1);return a.getTime()-s.getTime()})):S[e].sort())}))}));const M=Object.entries(S).sort(((t,e)=>t[0].localeCompare(e[0]))),I=""===c?90:0;S=Object.fromEntries(M),Object.keys(S).forEach((t=>{p.push({name:t,type:"bar",stack:c,label:{show:!0,fontFamily:"Montserrat",rotate:I,formatter:t=>g(Math.round(t.value))},emphasis:{focus:"series"},data:S[t].map((t=>t[d]))})}));const k=""!==c?m(v.size):100*(1-7/v.size);B(t,{color:y,title:{text:l,left:"center",top:"top",textStyle:{fontSize:20,fontFamily:"Montserrat",fontWeight:600,color:"#666"}},tooltip:{trigger:"axis",axisPointer:{type:"shadow"},textStyle:{fontFamily:"Montserrat"},formatter:t=>b(t,!0)},legend:{padding:40,textStyle:{fontFamily:"Montserrat"}},grid:{left:o,right:i,bottom:a,top:s,heigh:u,containLabel:!0},yAxis:{type:"value",splitNumber:4,name:n,nameLocation:"end",nameTextStyle:{fontWeight:"bold",fontFamily:"Montserrat",color:"#666"},axisLabel:{formatter:w,textStyle:{fontSize:8,fontFamily:"Montserrat",color:"#666"}}},xAxis:{type:"category",data:[...v],axisLabel:{textStyle:{fontFamily:"Montserrat"}}},series:p,toolbox:{show:!0,feature:{restore:{title:"Restablir"},saveAsImage:{title:"Desar"}},right:50},dataZoom:[{show:!0,data:[...v],start:k,end:100,borderColor:"#eee",fillerColor:"rgba(0,0,0,.05)",textStyle:{fontSize:10,fontFamily:"Montserrat",color:"#333",textBorderColor:"#fff",textBorderWidth:3,fontWeight:"600"},selectedDataBackground:{lineStyle:{color:"#333"},areaStyle:{color:"#ffcd00"}},dataBackground:{backgroundColor:"rgba(0,0,0,1)",lineStyle:{color:"#333"},areaStyle:{color:"rgba(0,0,0,0.5)"}},handleStyle:{color:"rgba(0,0,0,0.2)"},moveHandleStyle:{color:"rgba(0,0,0,0.3)"},emphasis:{handleStyle:{color:"rgba(255,205,0,1)"},moveHandleStyle:{color:"rgba(255,205,0,1)"}}}]})}}function I(t,e,r,n,o,i,a){if(0===o.length)v(`#${t}`,`#${r}`),v(`#${e}`,`#${n}`);else{A(`#${r}`,`#${t}`),A(`#${n}`,`#${e}`);const s=0,l=2,u=function(t,e){const r=function(t,e,r=1){const n=Math.max(...t.map((t=>t[e])))*r;return 5e3*Math.ceil(n/5e3)}(t,e,1.1);let n=50,o=180;r>9999999&&(n=65,o=95);const i=x(t,1);let[a,s]=Object.values(i);return Object.values(i).slice(1).forEach((t=>{s=t})),[s,a,i,r,n,o]}(o,l),c=u[0],f=u[1],p=u[2],h=u[3],d=u[5],y=E(t),g=T(c,l,s,d,y),m=T(f,l,s,d,y);B(t,O(`${i}${S(String(Object.keys(p)[1]))}`,h,g,y)),B(e,O(`${a}${S(String(Object.keys(p)[0]))}`,h,m,y))}}function k(t,e){const r=`<span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:${t.color};"></span>`;let n=`${t.name} : `;return n+=`<span style="font-weight:bold">${g(t.value)}</span>`,e&&(n+=`<span> (${t.percent}%)</span>`),r+n}function O(t,e,r,n){return{color:p,title:{text:t,left:"center",top:"top",padding:10,textStyle:{fontSize:n,fontFamily:"Montserrat",fontWeight:600,color:"#666"}},tooltip:{show:!0,textStyle:{fontFamily:"Montserrat"},formatter:t=>k(t,!1)},splitNumber:3,series:{type:"gauge",max:e,startAngle:-180,endAngle:0,splitNumber:2,pointer:{show:!1,icon:"roundRect"},progress:{show:!0,overlap:!1,roundCap:!0,clip:!0,itemStyle:{borderWidth:1,borderColor:"#464646"}},axisLine:{lineStyle:{width:60}},splitLine:{show:!0,distance:10,length:10},axisTick:{show:!0,splitNumber:5},axisLabel:{show:!0,distance:70,formatter:t=>g(Math.round(t)),fontFamily:"Montserrat",color:"#666"},data:r,detail:{fontSize:n/1.2,color:"inherit",formatter:t=>g(Math.round(t))}},toolbox:{show:!0,feature:{saveAsImage:{title:"Desar"}},right:d,top:y}}}function P(t){if(t.length>=29){const e=t.split(" ");let r="",n="";for(const t of e)`${r} ${t}`.length<=29?r+=(r?" ":"")+t:(n+=`${r}\n`,r=t);return n+=r,n}return t}function T(t,e,r,n,o){let i=20,a=35,s=-190,l=n;t.length<=2&&(s=-140,l+=100,i=25,a=42);const u=p.slice(),c=[];for(let n=0;n<t.length;n+=1)c.push({value:t[n][e],name:P(t[n][r]),color:u.shift(),title:{offsetCenter:[String(s),`${String(i)}%`],fontFamily:"Montserrat",fontSize:o-3},detail:{offsetCenter:[String(s),`${String(a)}%`],fontFamily:"Montserrat"}}),s+=l,(n+1)%3==0&&(a+=30,i+=30,s=-190);return c}function C(t,e,r=!1){const{resultset:n}={resultset:t},o=new Set,i=new Set,a=e,s=n.map((([t,e,n])=>{const a=r?Math.round(n):n;return o.add(t),i.add(e),{day:e,type:t,value:a}})),l=Array.from(i.values()),u=Array.from(o.values());return u.sort(((t,e)=>t.toLowerCase().localeCompare(e.toLowerCase(),"es",{ignorePunctuation:!0}))),[u.map((t=>{const e=s.filter((e=>e.type===t)).map((({day:e,value:r})=>[e,t,r])),r=l.map((t=>{const r=e.find((([e])=>e===t));return r?r[2]:null}));return{name:t,type:"line",symbol:"circle",color:a.shift(),symbolSize:6,smooth:!1,data:r}})),i,u]}function B(t,e){const r=document.getElementById(t);if(!r)return console.error(`No se pudo encontrar el elemento con ID ${t}.`),null;const n=echarts.init(r);return n.setOption(e,!0),$(window).on("resize",(()=>{null!=n&&void 0!==n&&n.resize()})),n}function _(t,e){const r=new Event("tableCreated"),n=$("#formFilterVar");if(""===Dashboards.getParameterValue("updateFilterVar")){for(let t=e.length-1;t>=0;t--)n.append(`<input type="checkbox" id="${e[t]}" onclick="legacy.filterVarUpdate();" />${e[t]}<br /></input>`);(function(){const t=$("#formFilterDates").find("input");$(t).each(((t,e)=>{e.checked&&(e.checked=!1)}));const e=$("#formFilterVar").find("input");$(e).each(((t,e)=>{e.checked&&(e.checked=!1)})),function(){let t=0;const e=$("#formFilterDates").find("input");$(e).each(((e,r)=>{t+=1,r.checked=!0})),t=0;const r=$("#formFilterVar").find("input");$(r).each(((e,r)=>{t+=1,null!=render_tableVariacio?t<=2&&(r.checked=!0):t<=3&&(r.checked=!0)})),console.error(`VALORES FILTRO: ${Dashboards.getParameterValue("filterVarParam")}`),Dashboards.getParameterValue("filterVarParam").length>0&&Dashboards.fireChange("filterVarParam")}()})(),function(){const t=$("#idFilterVar").find("input"),e=[];$(t).each(((t,r)=>{r.checked&&e.push(r.id.replaceAll("/","-"))})),Dashboards.fireChange("filterVarParam",e),Dashboards.fireChange("updateFilterVar","True")}()}console.error("Dispatching tableCreated event..."),document.dispatchEvent(r),console.error("tableCreated event dispatched.")}function F(t){return 100*(t-120)/t}function R(t,r,n,h,d,y,g,S,x=!1,E=!1,M=void 0,I=!0,k=p.slice(),O=!1,P=void 0,T=void 0){const L=t.resultset||t;if(0===L.length)v(`#${y}`,`#${g}`),S&&v(`#${S}`,`#${g}`);else{A(`#${g}`,`#${y}`),S&&A(`#${g}`,`#${S}`);const t=C(L,k,O),p=t[0],v=t[1],R=t[2],N=I?R:null,U=E?(_=v,Array.from(_.values()).map((t=>{const[e,r]=t.split("/");return function(t){const e=t.slice(0,2);return`${t.slice(3,5)}/${e}`}(t)}))):Array.from(v.values());void 0===M&&(M=x?m(v.size):F(v.size)),B(y,function(t,r,n,p,h,d,y,g=5,m="",S=h,v=100,A,x,E){return{title:{text:m,left:"center",top:"top",textStyle:{fontSize:20,fontFamily:"Montserrat",fontWeight:600,color:"#666"}},tooltip:{trigger:"axis",show:!0,formatter:t=>b(t),textStyle:{fontFamily:"Montserrat"}},legend:r?{type:"plain",data:r,textStyle:{fontFamily:"Montserrat"},top:x||e,selected:A}:null,grid:{left:o,right:i,bottom:a,top:r?x?"30%":s:l,heigh:u,containLabel:!0},xAxis:{type:"category",data:n,boundaryGap:!1,splitLine:{show:!1},axisLabel:{textStyle:{fontSize:10,fontFamily:"Montserrat",color:"#666"}}},yAxis:{name:p,nameLocation:"end",nameTextStyle:{fontFamily:"Montserrat",fontWeight:"bold",padding:[0,0,0,y]},type:"value",scale:!0,min:E,axisLabel:{margin:g,formatter:w,textStyle:{fontSize:10,fontFamily:"Montserrat",color:"#666"}}},series:t,dataZoom:[{show:d,data:n,start:S,end:v,borderColor:"#eee",fillerColor:"rgba(0,0,0,.05)",textStyle:{fontSize:10,fontFamily:"Montserrat",color:"#333",textBorderColor:"#fff",textBorderWidth:3,fontWeight:"600"},selectedDataBackground:{lineStyle:{color:"#333"},areaStyle:{color:"#ffcd00"}},dataBackground:{backgroundColor:"rgba(0,0,0,1)",lineStyle:{color:"#333"},areaStyle:{color:"rgba(0,0,0,0.5)"}},handleStyle:{color:"rgba(0,0,0,0.2)"},moveHandleStyle:{color:"rgba(0,0,0,0.3)"},emphasis:{handleStyle:{color:"rgba(255,205,0,1)"},moveHandleStyle:{color:"rgba(255,205,0,1)"}}}],toolbox:{show:d,feature:{restore:{title:"Restablir"},saveAsImage:{title:"Desar"}},right:c,top:f}}}(p,N,U,d,M,r,n,void 0,h,void 0,void 0,void 0,P,T))}var _}const N="ca_ES",U={es_ES:new Map([["chartAccesosGauge","ACCESOS A LA CIUDAD: ACUMULADO AÑO }"],["chartViesGaugeYear","VIAS PRINCIPALES DE LA\nCIUDAD: ACUMULADO AÑO }"],["unidadMedidaVehículos","Vehicles"],["tituloGrafica","TRÀNSIT DE VEHICLES: ACCESSOS A LA CIUTAT"],["tituloGraficaVias","TRÀNSIT DE VEHICLES: VIES PRINCIPALS DE LA CIUTAT"]]),ca_ES:new Map([["chartAccesosGauge","ACCESSOS A LA CIUTAT: ACUMULAT ANY "],["chartViesGaugeYear","VIES PRINCIPALS DE LA\nCIUTAT: ACUMULAT ANY "],["unidadMedidaVehículos","Vehicles"],["tituloGrafica","TRÀNSIT DE VEHICLES: ACCESSOS A LA CIUTAT"],["tituloGraficaVias","TRÀNSIT DE VEHICLES: VIES PRINCIPALS DE LA CIUTAT"]])};function D(e,r){const n=p.slice(),o=C(r.resultset||r,n,!1),i=o[1],a=Array.from(i.values()),s=o[2],l=F(i.size),u=(0,t.resultsetWithFields)(r),c=(0,t.configureDataValidate)(u,o[0],["KpiValid-30-Accesos-Ciudad-Coches","KpiValid-365-Accesos-Ciudad-Coches"],["Kpi-Accesos-Ciudad-Coches"]),f={title:{text:`${U[N].get("tituloGrafica")}`},legend:{show:!0,data:s},xAxis:{type:"category",data:a},yAxis:{name:`${U[N].get("unidadMedidaVehículos")}`,axisLabel:{formatter:w}},dataZoom:{show:!0,data:a,start:l},toolbox:{show:!0}};(0,t.configureLinesChartValidates)("chartAcessosCiutat",c,f)}function W(e,r){const n=p.slice(),o=C(r.resultset||r,n,!1),i=o[1],a=Array.from(i.values()),s=o[2],l=(0,t.resultsetWithFields)(r),u=l.map((t=>t.value)),c=Math.max(...u),f=(0,t.configureDataValidate)(l,o[0],["KpiValid-30-Accesos-Ciudad-Coches","KpiValid-365-Accesos-Ciudad-Coches"],["Kpi-Accesos-Ciudad-Coches"]),h={grid:{left:"0",right:"0",bottom:"0",top:"200",containLabel:!0},title:{text:`${U[N].get("tituloGrafica")}`},legend:{show:!0,data:s},xAxis:{type:"category",data:a,axisLabel:{margin:15}},yAxis:{name:`${U[N].get("unidadMedidaVehículos")}`,axisLabel:{formatter:w},max:c},dataZoom:{show:!1},toolbox:{show:!1}};(0,t.configureLinesChartValidates)("chartTransitAccessosCiutat",f,h)}function z(){document.querySelector("#idFiltrar").style.visibility="visible"}function V(){document.querySelector("#idFiltrar").style.visibility="hidden"}function j(){console.error("EVENTO ATRAPADO, AÑADIENDO LISTENER"),render_tableVariacio.listeners=["filterVarParam","updateFilterVar"],Dashboards.fireChange("filterDatesParam"),Dashboards.fireChange("updateFilter"),Dashboards.fireChange("updateFilterVar"),document.querySelector("#idVariacio").addEventListener("click",z),document.querySelector("#idAcessosCiutat").addEventListener("click",V),document.querySelector("#idViePrincCiutat").addEventListener("click",V)}function G(e,r){const n=p.slice(),o=C(r.resultset||r,n,!1),i=o[1],a=Array.from(i.values()),s=o[2],l=F(i.size),u=(0,t.resultsetWithFields)(r),c=(0,t.configureDataValidate)(u,o[0],["KpiValid-30-Accesos-Vias-Coches","KpiValid-365-Accesos-Vias-Coches"],["Kpi-Accesos-Vias-Coches"]),f={title:{text:`${U[N].get("tituloGraficaVias")}`},legend:{show:!0,data:s},xAxis:{type:"category",data:a},yAxis:{name:`${U[N].get("unidadMedidaVehículos")}`,axisLabel:{formatter:w}},dataZoom:{show:!0,data:a,start:l},toolbox:{show:!0}};(0,t.configureLinesChartValidates)("chartViePrincCiutat",c,f)}function Z(t,e){const r=[];if(null!=e.resultset&&e.resultset.length>0)for(let t=0;t<e.resultset.length;t++){const n=`<div><img class="imgTabulator" src="build/Imagenes/camara.svg">${e.resultset[t][3]}</div>`;r.push({tram:e.resultset[t][1],cam:e.resultset[t][2],url:n})}new Tabulator("#idTableAcceso",{selectable:!1,headerSort:!1,height:700,width:1e3,data:r,layout:"fitColumns",groupBy:["tram"],columns:[{title:"Tram",field:"tram",hozAlign:"center",headerHozAlign:"center",formatter:"html"},{title:"Descripció Càmera",field:"cam",hozAlign:"center",headerHozAlign:"center",width:560},{title:"URL",field:"url",hozAlign:"center",headerHozAlign:"center",formatter:"html"}]})}let J=[];const H=new Set;function q(t){J.push({dat:t[3].replaceAll("-","/"),tram:t[1],int:g(t[6]),vari:g((100*parseFloat(t[5])).toFixed(2)),dataRe:t[2].replaceAll("-","/"),intRe:g(t[7])})}function Y(t){!function(t){t.resultset.forEach((t=>{H.add(t[3].replaceAll("-","/"))}))}(t),function(){const t=Array.from(H);_(t.length,t)}(),function(t){const e=Dashboards.getParameterValue("filterVarParam");if(J=[],null!=t.resultset&&t.resultset.length>0)if(e.length>0)for(let r=e.length-1;r>=0;r-=1)for(let n=0;n<t.resultset.length;n+=1)e[r]===t.resultset[n][3]&&q(t.resultset[n]);else for(let e=0;e<t.resultset.length;e+=1)q(t.resultset[e])}(t),0===Dashboards.getParameterValue("filterVarParam").length?($("#chartVariacio").hide(),$("#no_dataChartVariacio").css("background","url('./build/images/nodata1.png') no-repeat top center"),$("#no_dataChartVariacio").show()):($("#chartVariacio").show(),$("#no_dataChartVariacio").hide()),new Tabulator("#chartVariacio",{selectable:!1,headerSort:!1,height:700,width:1e3,data:J,layout:"fitColumns",groupBy:["dat"],columns:[{title:"Data",field:"dat",hozAlign:"center",headerHozAlign:"center"},{title:"Tram",field:"tram",hozAlign:"center",headerHozAlign:"center",width:560},{title:"Intensitat",field:"int",hozAlign:"center",headerHozAlign:"center"},{title:"Variació",field:"vari",hozAlign:"center",headerHozAlign:"center",formatter:(t,e,r)=>(parseFloat(t.getValue())<0?t.getElement().classList.add("custom-red-cell"):t.getElement().classList.add("custom-green-cell"),t.getValue())},{title:"Data Referència",field:"dataRe",hozAlign:"center",headerHozAlign:"center"},{title:"Intensitat Referència",field:"intRe",hozAlign:"center",headerHozAlign:"center"}]})}function K(t,e){const r=[];if(null!=e.resultset)for(let t=0;t<e.resultset.length;t+=1){const n=`<div><img class="imgTabulator" src="build/Imagenes/camara.svg">${e.resultset[t][3]}</div>`;r.push({tram:e.resultset[t][1],cam:e.resultset[t][2],url:n})}new Tabulator("#idTableViaPri",{selectable:!1,headerSort:!1,height:700,width:1e3,data:r,layout:"fitColumns",groupBy:["tram"],columns:[{title:"Tram",field:"tram",hozAlign:"center",headerHozAlign:"center",formatter:"html"},{title:"Descripció Càmera",field:"cam",hozAlign:"center",headerHozAlign:"center",width:560},{title:"URL",field:"url",hozAlign:"center",headerHozAlign:"center",formatter:"html"}]})}function X(t,e){document.querySelector("#tabViePrincCiutat").addEventListener("click",(()=>{requestAnimationFrame((()=>{I("chartViesMesActual","chartViesMesAnterior","no_dataViesMesActual","no_dataViesMesAnterior",e.resultset,"VIES PRINCIPALS DE LA\nCIUTAT: EVOLUCIÓ ","VIES PRINCIPALS DE LA\nCIUTAT: EVOLUCIÓ ")}))}))}const Q={color:void 0,title:{text:"",left:"center",top:"top",padding:10,textStyle:{fontSize:15,fontFamily:"Montserrat",fontWeight:600,color:"#666"}},tooltip:{show:!0,textStyle:{fontFamily:"Montserrat"}},splitNumber:3,series:{type:"gauge",max:void 0,startAngle:-180,endAngle:0,splitNumber:2,pointer:{show:!1,icon:"roundRect"},progress:{show:!0,overlap:!1,roundCap:!0,clip:!0,itemStyle:{borderWidth:1,borderColor:"#464646"}},axisLine:{lineStyle:{width:60}},splitLine:{show:!0,distance:10,length:10},axisTick:{show:!0,splitNumber:10},axisLabel:{show:!0,distance:70,formatter:void 0,fontFamily:"Montserrat",color:"#666"},data:[],detail:{fontSize:12,color:"inherit"}},toolbox:{show:!0,feature:{saveAsImage:{title:"Desar"}},right:27,top:30}};function tt(e,r){const n=r.resultset,o=["#9c89b8","#4ea8de","#05668d","#ffbf69","#e56b6f","#83c5be","#02c39a","#ee9b00","#cdb4db","#ffadad","#ce4257","#b7b7a4"];if(0===r.length)(0,t.printNoDataChart)(`#${e.idChart}`,`#${e.idNoData}`);else{(0,t.printDataChart)(`#${e.idNoData}`,`#${e.idChart}`);const r={type:0,data:1,time:2},[i,a]=(0,t.configureDataGaugeCommon)(n,r,o.slice(),e.fontSize,e.paramOffsetCenterTitle,e.paramOffsetCenterDetail,e.paramOffsetLabel,e.paramCalculatedOffset,e.paramNumberOfElementsByLine),s={...Q};s.title.text=e.chartName,s.series.max=i,s.series.data=a,s.series.detail.fontSize=e.fontSize,s.series.detail.formatter=e=>(0,t.addPointInteger)(Math.round(e)),s.series.axisTick.splitNumber=5,s.color=o.slice(),s.series.axisLabel.formatter=e=>(0,t.addPointInteger)(Math.round(e)),s.tooltip.formatter=e=>function(e){let r=`${e.name} : `;return r+=`<span style="font-weight:bold">${(0,t.addPointInteger)(Math.round(e.value))}</span>`,e.marker+r}(e),(0,t.initChart)(e.idChart,s)}}function et(t,e){tt({idChart:"chartAccesosGauge",idNoData:"no_dataAccesosGauge",chartName:`${U[N].get("chartAccesosGauge")}${e.resultset[0][2]}`,fontSize:12,paramOffsetCenterTitle:15,paramOffsetCenterDetail:30,paramOffsetLabel:-75,paramCalculatedOffset:75,paramNumberOfElementsByLine:3},e)}function rt(t,e){tt({idChart:"chartViesGaugeYear",idNoData:"no_dataViesGaugeYear",chartName:`${U[N].get("chartViesGaugeYear")}${e.resultset[0][2]}`,fontSize:12,paramOffsetCenterTitle:15,paramOffsetCenterDetail:30,paramOffsetLabel:-90,paramCalculatedOffset:90,paramNumberOfElementsByLine:3},e)}function nt(t,e){R(e,!0,1,"VIES PRINCIPALS DE LA CIUTAT: HISTÒRIC MENSUAL","Vehicles","chartViesLineMonth","no_dataViesLineMonth",void 0,!0)}function ot(t,e){M("chartViesBar","no_dataViesBar",e.resultset,"Vehicles","VIES PRINCIPALS DE LA CIUTAT: HISTÒRIC ANUAL","")}function it(t,e){if(0===e.resultset.length)v("#chartAccesosPie","#no_dataAccesosPie");else{A("#no_dataAccesosPie","#chartAccesosPie");const t=E("chartAccesosPie"),r=e.resultset,n=[],o=0,i=1,a=2;for(let t=0;t<r.length;t+=1)n.push({value:r[t][i],name:r[t][o]});const s=function(t,e,r,n=p){return{textStyle:{fontFamily:"Montserrat"},title:{text:t,left:"center",top:"top",padding:10,textStyle:{fontSize:r-4,fontFamily:"Montserrat",fontWeight:600,color:"#666"}},tooltip:{trigger:"item",textStyle:{fontFamily:"Montserrat"},formatter:t=>k(t,!0)},legend:{orient:"horizontal",textStyle:{fontFamily:"Montserrat"},left:e.length>5?"10%":"12%",bottom:"10%",top:"65%",selectedMode:!1},series:[{type:"pie",radius:"33%",data:e,color:n,top:"-30%",emphasis:{itemStyle:{shadowBlur:10,shadowOffsetX:0,shadowColor:"rgba(0, 0, 0, 0.5)"}}}],toolbox:{show:!0,feature:{saveAsImage:{title:"Desar"}},right:10,top:20}}}(`ACCESSOS A LA CIUTAT: DISTRIBUCIÓ ANY ${r[0][a]}`,n,t+3);B("chartAccesosPie",s)}}function at(e,r){if(0===r.resultset.length)v("#chartAccesosHorStackedBar","#no_dataAccesosHorStackedBar");else{A("#no_dataAccesosHorStackedBar","#chartAccesosHorStackedBar");const e=r.resultset,n={title:{text:"ACCESSOS A LA CIUTAT: HISTÒRIC ANUAL"},color:["#9c89b8","#4ea8de","#05668d","#ffbf69","#e56b6f","#83c5be","#02c39a","#ee9b00","#cdb4db","#ffadad","#ce4257","#b7b7a4"],xAxis:{name:"\n\n\n\nVehicles"}};(0,t.initStackedBarChart)("chartAccesosHorStackedBar",e,n)}}function st(t,e){M("chartAccesosStackedBar","no_dataAccesosStackedBar",e.resultset,"Vehicles","ACCESSOS A LA CIUTAT: HISTÒRIC MENSUAL")}function lt(t="myMap",e=5,r=20,n=13,o,i,a,s){const l=L.map(t).setView([39.46975,-.37739],n),u=L.tileLayer("https://{s}.basemaps.cartocdn.com/light_all/{z}/{x}/{y}{r}.png",{attribution:'&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors &copy; <a href="https://carto.com/attributions">CARTO</a>',subdomains:"abcd",maxZoom:20});l.setMinZoom(e),l.setMaxZoom(r),u.addTo(l),ut(l,o,i,a,{listOfselectedElements:[],elementExist(t){return this.listOfselectedElements.filter((e=>e===t)).length>0},deleteElementOfList(t){const e=this.listOfselectedElements.indexOf(t);e>-1&&this.listOfselectedElements.splice(e,1)}},s)}function ut(t,e,r,n,o,i){function a(t){return{iconUrl:(e=t,`${document.documentURI.split("%3A")[0]}%3A${document.documentURI.split("%3A")[1]}%3A${document.documentURI.split("%3A")[2]}%3A${document.documentURI.split("%3A")[3]}%3A${e}`),iconSize:[34,34],shadowSize:[50,64],iconAnchor:[17,17],shadowAnchor:[4,62],popupAnchor:[-3,-76]};var e}const s=L.icon(a(r)),l=L.icon(a(n));L.geoJSON(e,{onEachFeature:function(a,s){a.properties&&a.properties.address&&s.on("click",(()=>{o.elementExist(a.properties.objectoId)?o.deleteElementOfList(a.properties.objectoId):o.listOfselectedElements.push(a.properties.objectoId),i&&Dashboards.fireChange(i,o.listOfselectedElements),ut(t,e,r,n,o,i)}))},pointToLayer(t,e){let r=s;return o.elementExist(t.properties.objectoId)&&(r=l),L.marker(e,{icon:r})}}).addTo(t)}function ct(t,e){document.querySelector("#tabPuntsMesuraCiutat").addEventListener("click",(()=>{requestAnimationFrame((()=>{lt("idMapPuntsMesuraCiutat",5,20,14,function(t,e=0,n=1,o=2){const{Buffer:i}=r(8287),a=r(543),s={type:"FeatureCollection",features:[]},l=[],u=new Set;return t.forEach((t=>{const e=t[o];u.has(e)||(u.add(e),l.push(t))})),l.forEach((t=>{const r=a.Geometry.parse(i.from(t[o],"hex")),l={type:"Feature",properties:{objectoId:t[e],address:t[n]},geometry:r.toGeoJSON()};s.features.push(l)})),s}(e.resultset,0,1,3),"build/images/mapas/marker-icon-vehiculos.svg/content","build/images/mapas/marker-icon-selected-vehiculos.svg/content","puntoMedidaLaneId")}))}))}function ft(t,e){R(e,!0,-6,"TRÀNSIT DE VEHICLES: PUNTS DE MESURA DE LA CIUTAT","Vehicles","chartPuntsMesuraCiutat","no_dataPuntsMesuraCiutat")}})(),n})()));