@sjvair/monitor-map 1.9.2 → 1.9.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1 @@
1
+ var __defProp=Object.defineProperty,__defNormalProp=(t,e,n)=>e in t?__defProp(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,__publicField=(t,e,n)=>__defNormalProp(t,"symbol"!=typeof e?e+"":e,n);!function(){"use strict";class t{constructor(t){__publicField(this,"id"),__publicField(this,"error"),__publicField(this,"success"),__publicField(this,"payload"),this.id=t}pass(t){this.success=!0,this.payload=t}fail(t){this.success=!1,this.error=t}}function e(t,e,n){return Math.min(Math.max(t,n),e)}class n extends Error{constructor(t){super(`Failed to parse color: "${t}"`)}}var r=n;function o(t){if("string"!=typeof t)throw new r(t);if("transparent"===t.trim().toLowerCase())return[0,0,0,0];let n=t.trim();n=d.test(t)?function(t){const e=t.toLowerCase().trim(),n=i[function(t){let e=5381,n=t.length;for(;n;)e=33*e^t.charCodeAt(--n);return(e>>>0)%2341}(e)];if(!n)throw new r(t);return`#${n}`}(t):t;const o=c.exec(n);if(o){const t=Array.from(o).slice(1);return[...t.slice(0,3).map((t=>parseInt(a(t,2),16))),parseInt(a(t[3]||"f",2),16)/255]}const s=u.exec(n);if(s){const t=Array.from(s).slice(1);return[...t.slice(0,3).map((t=>parseInt(t,16))),parseInt(t[3]||"ff",16)/255]}const h=l.exec(n);if(h){const t=Array.from(h).slice(1);return[...t.slice(0,3).map((t=>parseInt(t,10))),parseFloat(t[3]||"1")]}const m=f.exec(n);if(m){const[n,o,s,i]=Array.from(m).slice(1).map(parseFloat);if(e(0,100,o)!==o)throw new r(t);if(e(0,100,s)!==s)throw new r(t);return[...p(n,o,s),Number.isNaN(i)?1:i]}throw new r(t)}const s=t=>parseInt(t.replace(/_/g,""),36),i="1q29ehhb 1n09sgk7 1kl1ekf_ _yl4zsno 16z9eiv3 1p29lhp8 _bd9zg04 17u0____ _iw9zhe5 _to73___ _r45e31e _7l6g016 _jh8ouiv _zn3qba8 1jy4zshs 11u87k0u 1ro9yvyo 1aj3xael 1gz9zjz0 _3w8l4xo 1bf1ekf_ _ke3v___ _4rrkb__ 13j776yz _646mbhl _nrjr4__ _le6mbhl 1n37ehkb _m75f91n _qj3bzfz 1939yygw 11i5z6x8 _1k5f8xs 1509441m 15t5lwgf _ae2th1n _tg1ugcv 1lp1ugcv 16e14up_ _h55rw7n _ny9yavn _7a11xb_ 1ih442g9 _pv442g9 1mv16xof 14e6y7tu 1oo9zkds 17d1cisi _4v9y70f _y98m8kc 1019pq0v 12o9zda8 _348j4f4 1et50i2o _8epa8__ _ts6senj 1o350i2o 1mi9eiuo 1259yrp0 1ln80gnw _632xcoy 1cn9zldc _f29edu4 1n490c8q _9f9ziet 1b94vk74 _m49zkct 1kz6s73a 1eu9dtog _q58s1rz 1dy9sjiq __u89jo3 _aj5nkwg _ld89jo3 13h9z6wx _qa9z2ii _l119xgq _bs5arju 1hj4nwk9 1qt4nwk9 1ge6wau6 14j9zlcw 11p1edc_ _ms1zcxe _439shk6 _jt9y70f _754zsow 1la40eju _oq5p___ _x279qkz 1fa5r3rv _yd2d9ip _424tcku _8y1di2_ _zi2uabw _yy7rn9h 12yz980_ __39ljp6 1b59zg0x _n39zfzp 1fy9zest _b33k___ _hp9wq92 1il50hz4 _io472ub _lj9z3eo 19z9ykg0 _8t8iu3a 12b9bl4a 1ak5yw0o _896v4ku _tb8k8lv _s59zi6t _c09ze0p 1lg80oqn 1id9z8wb _238nba5 1kq6wgdi _154zssg _tn3zk49 _da9y6tc 1sg7cv4f _r12jvtt 1gq5fmkz 1cs9rvci _lp9jn1c _xw1tdnb 13f9zje6 16f6973h _vo7ir40 _bt5arjf _rc45e4t _hr4e100 10v4e100 _hc9zke2 _w91egv_ _sj2r1kk 13c87yx8 _vqpds__ _ni8ggk8 _tj9yqfb 1ia2j4r4 _7x9b10u 1fc9ld4j 1eq9zldr _5j9lhpx _ez9zl6o _md61fzm".split(" ").reduce(((t,e)=>{const n=s(e.substring(0,3)),r=s(e.substring(3)).toString(16);let o="";for(let s=0;s<6-r.length;s++)o+="0";return t[n]=`${o}${r}`,t}),{});const a=(t,e)=>Array.from(Array(e)).map((()=>t)).join(""),c=new RegExp(`^#${a("([a-f0-9])",3)}([a-f0-9])?$`,"i"),u=new RegExp(`^#${a("([a-f0-9]{2})",3)}([a-f0-9]{2})?$`,"i"),l=new RegExp(`^rgba?\\(\\s*(\\d+)\\s*${a(",\\s*(\\d+)\\s*",2)}(?:,\\s*([\\d.]+))?\\s*\\)$`,"i"),f=/^hsla?\(\s*([\d.]+)\s*,\s*([\d.]+)%\s*,\s*([\d.]+)%(?:\s*,\s*([\d.]+))?\s*\)$/i,d=/^[a-z]+$/i,h=t=>Math.round(255*t),p=(t,e,n)=>{let r=n/100;if(0===e)return[r,r,r].map(h);const o=(t%360+360)%360/60,s=(1-Math.abs(2*r-1))*(e/100),i=s*(1-Math.abs(o%2-1));let a=0,c=0,u=0;o>=0&&o<1?(a=s,c=i):o>=1&&o<2?(a=i,c=s):o>=2&&o<3?(c=s,u=i):o>=3&&o<4?(c=i,u=s):o>=4&&o<5?(a=i,u=s):o>=5&&o<6&&(a=s,u=i);const l=r-s/2;return[a+l,c+l,u+l].map(h)};function m(t,n){const[r,s,i,a]=function(t){const[e,n,r,s]=o(t).map(((t,e)=>3===e?t:t/255)),i=Math.max(e,n,r),a=Math.min(e,n,r),c=(i+a)/2;if(i===a)return[0,0,c,s];const u=i-a;return[60*(e===i?(n-r)/u+(n<r?6:0):n===i?(r-e)/u+2:(e-n)/u+4),c>.5?u/(2-i-a):u/(i+a),c,s]}(t);return function(t,n,r,o){return`hsla(${(t%360).toFixed()}, ${e(0,100,100*n).toFixed()}%, ${e(0,100,100*r).toFixed()}%, ${parseFloat(e(0,1,o).toFixed(3))})`}(r,s,i-n,a)}function y(t,n,r){const s=(t,e)=>3===e?t:t/255,[i,a,c,u]=o(t).map(s),[l,f,d,h]=o(n).map(s),p=h-u,m=2*r-1,y=((m*p==-1?m:m+p/(1+m*p))+1)/2,g=1-y;return b=255*(a*g+f*y),w=255*(c*g+d*y),_=h*r+u*(1-r),`rgba(${e(0,255,255*(i*g+l*y)).toFixed()}, ${e(0,255,b).toFixed()}, ${e(0,255,w).toFixed()}, ${parseFloat(e(0,1,_).toFixed(3))})`;var b,w,_}function g(t){const[n,r,s,i]=o(t);let a=t=>{const n=e(0,255,t).toString(16);return 1===n.length?`0${n}`:n};return`#${a(n)}${a(r)}${a(s)}${i<1?a(Math.round(255*i)):""}`}const b="969696",w="000000",_="00e400",v="ffff00",O="ff7e00",S="ff0000",$="8f3f97",E="7e0023";function T(t,e){const n=e[e.length-1];if(t>=n.min)return`#${n.color}`;if(t<=0)return`#${e[0].color}`;for(let r=0;r<=e.length-1;r++)if(e[r].min>t){const n=e[r-1],o=e[r],s=n.min===-1/0?o.min:o.min-n.min,i=(s-(o.min-t))/s;return y(`#${n.color}`,`#${o.color}`,i)}return"#FFFFFF"}const x=class t{constructor(e,n,r,o){__publicField(this,"label"),__publicField(this,"latest"),__publicField(this,"levels",t.levels),__publicField(this,"name"),__publicField(this,"updateDuration"),this.label=n,this.name=e,this.updateDuration=r,o.latest&&this.name in o.latest&&(this.latest=Math.round(parseFloat(o.latest[this.name])))}};__publicField(x,"levels",[{min:-1/0,color:_},{min:12,color:v},{min:35,color:O},{min:55,color:S},{min:150,color:$},{min:250,color:E}]);let R=x;function A(t){switch(t.data_source.name){case"AirNow.gov":return function(t){return D(["pm25","PM 2.5","60m",t],["pm100","PM 10","60M",t])}(t);case"AQview":return function(t){return D(["pm25_avg_60","PM 2.5","60m",t])}(t);case"Central California Asthma Collaborative":return function(t){return D(["pm25","PM 2.5","60m",t])}(t);case"PurpleAir":return function(t){return D(["pm10","PM 1.0","2m",t],["pm25","PM 2.5","2m",t],["pm25_avg_15","PM 2.5","15m",t],["pm25_avg_60","PM 2.5","60m",t],["pm100","PM 10","",t])}(t)}}function D(...t){const e={};for(let n of t)e[n[0]]=new R(...n);return e}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;function j(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var M={exports:{}};M.exports=function(){var t=1e3,e=6e4,n=36e5,r="millisecond",o="second",s="minute",i="hour",a="day",c="week",u="month",l="quarter",f="year",d="date",h="Invalid Date",p=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,m=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,y={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var e=["th","st","nd","rd"],n=t%100;return"["+t+(e[(n-20)%10]||e[n]||e[0])+"]"}},g=function(t,e,n){var r=String(t);return!r||r.length>=e?t:""+Array(e+1-r.length).join(n)+t},b={s:g,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),o=n%60;return(e<=0?"+":"-")+g(r,2,"0")+":"+g(o,2,"0")},m:function t(e,n){if(e.date()<n.date())return-t(n,e);var r=12*(n.year()-e.year())+(n.month()-e.month()),o=e.clone().add(r,u),s=n-o<0,i=e.clone().add(r+(s?-1:1),u);return+(-(r+(n-o)/(s?o-i:i-o))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return{M:u,y:f,w:c,d:a,D:d,h:i,m:s,s:o,ms:r,Q:l}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},w="en",_={};_[w]=y;var v="$isDayjsObject",O=function(t){return t instanceof T||!(!t||!t[v])},S=function t(e,n,r){var o;if(!e)return w;if("string"==typeof e){var s=e.toLowerCase();_[s]&&(o=s),n&&(_[s]=n,o=s);var i=e.split("-");if(!o&&i.length>1)return t(i[0])}else{var a=e.name;_[a]=e,o=a}return!r&&o&&(w=o),o||!r&&w},$=function(t,e){if(O(t))return t.clone();var n="object"==typeof e?e:{};return n.date=t,n.args=arguments,new T(n)},E=b;E.l=S,E.i=O,E.w=function(t,e){return $(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var T=function(){function y(t){this.$L=S(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[v]=!0}var g=y.prototype;return g.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(E.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var r=e.match(p);if(r){var o=r[2]-1||0,s=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],o,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)):new Date(r[1],o,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)}}return new Date(e)}(t),this.init()},g.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},g.$utils=function(){return E},g.isValid=function(){return!(this.$d.toString()===h)},g.isSame=function(t,e){var n=$(t);return this.startOf(e)<=n&&n<=this.endOf(e)},g.isAfter=function(t,e){return $(t)<this.startOf(e)},g.isBefore=function(t,e){return this.endOf(e)<$(t)},g.$g=function(t,e,n){return E.u(t)?this[e]:this.set(n,t)},g.unix=function(){return Math.floor(this.valueOf()/1e3)},g.valueOf=function(){return this.$d.getTime()},g.startOf=function(t,e){var n=this,r=!!E.u(e)||e,l=E.p(t),h=function(t,e){var o=E.w(n.$u?Date.UTC(n.$y,e,t):new Date(n.$y,e,t),n);return r?o:o.endOf(a)},p=function(t,e){return E.w(n.toDate()[t].apply(n.toDate("s"),(r?[0,0,0,0]:[23,59,59,999]).slice(e)),n)},m=this.$W,y=this.$M,g=this.$D,b="set"+(this.$u?"UTC":"");switch(l){case f:return r?h(1,0):h(31,11);case u:return r?h(1,y):h(0,y+1);case c:var w=this.$locale().weekStart||0,_=(m<w?m+7:m)-w;return h(r?g-_:g+(6-_),y);case a:case d:return p(b+"Hours",0);case i:return p(b+"Minutes",1);case s:return p(b+"Seconds",2);case o:return p(b+"Milliseconds",3);default:return this.clone()}},g.endOf=function(t){return this.startOf(t,!1)},g.$set=function(t,e){var n,c=E.p(t),l="set"+(this.$u?"UTC":""),h=(n={},n[a]=l+"Date",n[d]=l+"Date",n[u]=l+"Month",n[f]=l+"FullYear",n[i]=l+"Hours",n[s]=l+"Minutes",n[o]=l+"Seconds",n[r]=l+"Milliseconds",n)[c],p=c===a?this.$D+(e-this.$W):e;if(c===u||c===f){var m=this.clone().set(d,1);m.$d[h](p),m.init(),this.$d=m.set(d,Math.min(this.$D,m.daysInMonth())).$d}else h&&this.$d[h](p);return this.init(),this},g.set=function(t,e){return this.clone().$set(t,e)},g.get=function(t){return this[E.p(t)]()},g.add=function(r,l){var d,h=this;r=Number(r);var p=E.p(l),m=function(t){var e=$(h);return E.w(e.date(e.date()+Math.round(t*r)),h)};if(p===u)return this.set(u,this.$M+r);if(p===f)return this.set(f,this.$y+r);if(p===a)return m(1);if(p===c)return m(7);var y=(d={},d[s]=e,d[i]=n,d[o]=t,d)[p]||1,g=this.$d.getTime()+r*y;return E.w(g,this)},g.subtract=function(t,e){return this.add(-1*t,e)},g.format=function(t){var e=this,n=this.$locale();if(!this.isValid())return n.invalidDate||h;var r=t||"YYYY-MM-DDTHH:mm:ssZ",o=E.z(this),s=this.$H,i=this.$m,a=this.$M,c=n.weekdays,u=n.months,l=n.meridiem,f=function(t,n,o,s){return t&&(t[n]||t(e,r))||o[n].slice(0,s)},d=function(t){return E.s(s%12||12,t,"0")},p=l||function(t,e,n){var r=t<12?"AM":"PM";return n?r.toLowerCase():r};return r.replace(m,(function(t,r){return r||function(t){switch(t){case"YY":return String(e.$y).slice(-2);case"YYYY":return E.s(e.$y,4,"0");case"M":return a+1;case"MM":return E.s(a+1,2,"0");case"MMM":return f(n.monthsShort,a,u,3);case"MMMM":return f(u,a);case"D":return e.$D;case"DD":return E.s(e.$D,2,"0");case"d":return String(e.$W);case"dd":return f(n.weekdaysMin,e.$W,c,2);case"ddd":return f(n.weekdaysShort,e.$W,c,3);case"dddd":return c[e.$W];case"H":return String(s);case"HH":return E.s(s,2,"0");case"h":return d(1);case"hh":return d(2);case"a":return p(s,i,!0);case"A":return p(s,i,!1);case"m":return String(i);case"mm":return E.s(i,2,"0");case"s":return String(e.$s);case"ss":return E.s(e.$s,2,"0");case"SSS":return E.s(e.$ms,3,"0");case"Z":return o}return null}(t)||o.replace(":","")}))},g.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},g.diff=function(r,d,h){var p,m=this,y=E.p(d),g=$(r),b=(g.utcOffset()-this.utcOffset())*e,w=this-g,_=function(){return E.m(m,g)};switch(y){case f:p=_()/12;break;case u:p=_();break;case l:p=_()/3;break;case c:p=(w-b)/6048e5;break;case a:p=(w-b)/864e5;break;case i:p=w/n;break;case s:p=w/e;break;case o:p=w/t;break;default:p=w}return h?p:E.a(p)},g.daysInMonth=function(){return this.endOf(u).$D},g.$locale=function(){return _[this.$L]},g.locale=function(t,e){if(!t)return this.$L;var n=this.clone(),r=S(t,e,!0);return r&&(n.$L=r),n},g.clone=function(){return E.w(this.$d,this)},g.toDate=function(){return new Date(this.valueOf())},g.toJSON=function(){return this.isValid()?this.toISOString():null},g.toISOString=function(){return this.$d.toISOString()},g.toString=function(){return this.$d.toUTCString()},y}(),x=T.prototype;return $.prototype=x,[["$ms",r],["$s",o],["$m",s],["$H",i],["$W",a],["$M",u],["$y",f],["$D",d]].forEach((function(t){x[t[1]]=function(e){return this.$g(e,t[0],t[1])}})),$.extend=function(t,e){return t.$i||(t(e,T,$),t.$i=!0),$},$.locale=S,$.isDayjs=O,$.unix=function(t){return $(1e3*t)},$.en=_[w],$.Ls=_,$.p={},$}();var F=j(M.exports),C={exports:{}};!function(t){t.exports=function(t,e,n){t=t||{};var r=e.prototype,o={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function s(t,e,n,o){return r.fromToBase(t,e,n,o)}n.en.relativeTime=o,r.fromToBase=function(e,r,s,i,a){for(var c,u,l,f=s.$locale().relativeTime||o,d=t.thresholds||[{l:"s",r:44,d:"second"},{l:"m",r:89},{l:"mm",r:44,d:"minute"},{l:"h",r:89},{l:"hh",r:21,d:"hour"},{l:"d",r:35},{l:"dd",r:25,d:"day"},{l:"M",r:45},{l:"MM",r:10,d:"month"},{l:"y",r:17},{l:"yy",d:"year"}],h=d.length,p=0;p<h;p+=1){var m=d[p];m.d&&(c=i?n(e).diff(s,m.d,!0):s.diff(e,m.d,!0));var y=(t.rounding||Math.round)(Math.abs(c));if(l=c>0,y<=m.r||!m.r){y<=1&&p>0&&(m=d[p-1]);var g=f[m.l];a&&(y=a(""+y)),u="string"==typeof g?g.replace("%d",y):g(y,r,m.l,l);break}}if(r)return u;var b=l?f.future:f.past;return"function"==typeof b?b(u):b.replace("%s",u)},r.to=function(t,e){return s(t,e,this,!0)},r.from=function(t,e){return s(t,e,this)};var i=function(t){return t.$u?n.utc():n()};r.toNow=function(t){return this.to(i(this),t)},r.fromNow=function(t){return this.from(i(this),t)}}}(C);var k=j(C.exports),N={exports:{}};!function(t){var e,n;t.exports=(e={year:0,month:1,day:2,hour:3,minute:4,second:5},n={},function(t,r,o){var s,i=function(t,e,r){void 0===r&&(r={});var o=new Date(t);return function(t,e){void 0===e&&(e={});var r=e.timeZoneName||"short",o=t+"|"+r,s=n[o];return s||(s=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:t,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:r}),n[o]=s),s}(e,r).formatToParts(o)},a=function(t,n){for(var r=i(t,n),s=[],a=0;a<r.length;a+=1){var c=r[a],u=c.type,l=c.value,f=e[u];f>=0&&(s[f]=parseInt(l,10))}var d=s[3],h=24===d?0:d,p=s[0]+"-"+s[1]+"-"+s[2]+" "+h+":"+s[4]+":"+s[5]+":000",m=+t;return(o.utc(p).valueOf()-(m-=m%1e3))/6e4},c=r.prototype;c.tz=function(t,e){void 0===t&&(t=s);var n=this.utcOffset(),r=this.toDate(),i=r.toLocaleString("en-US",{timeZone:t}),a=Math.round((r-new Date(i))/1e3/60),c=o(i,{locale:this.$L}).$set("millisecond",this.$ms).utcOffset(15*-Math.round(r.getTimezoneOffset()/15)-a,!0);if(e){var u=c.utcOffset();c=c.add(n-u,"minute")}return c.$x.$timezone=t,c},c.offsetName=function(t){var e=this.$x.$timezone||o.tz.guess(),n=i(this.valueOf(),e,{timeZoneName:t}).find((function(t){return"timezonename"===t.type.toLowerCase()}));return n&&n.value};var u=c.startOf;c.startOf=function(t,e){if(!this.$x||!this.$x.$timezone)return u.call(this,t,e);var n=o(this.format("YYYY-MM-DD HH:mm:ss:SSS"),{locale:this.$L});return u.call(n,t,e).tz(this.$x.$timezone,!0)},o.tz=function(t,e,n){var r=n&&e,i=n||e||s,c=a(+o(),i);if("string"!=typeof t)return o(t).tz(i);var u=function(t,e,n){var r=t-60*e*1e3,o=a(r,n);if(e===o)return[r,e];var s=a(r-=60*(o-e)*1e3,n);return o===s?[r,o]:[t-60*Math.min(o,s)*1e3,Math.max(o,s)]}(o.utc(t,r).valueOf(),c,i),l=u[0],f=u[1],d=o(l).utcOffset(f);return d.$x.$timezone=i,d},o.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},o.tz.setDefault=function(t){s=t}})}(N);var P=j(N.exports),z={exports:{}};!function(t){var e,n,r;t.exports=(e="minute",n=/[+-]\d\d(?::?\d\d)?/g,r=/([+-]|\d\d)/g,function(t,o,s){var i=o.prototype;s.utc=function(t){return new o({date:t,utc:!0,args:arguments})},i.utc=function(t){var n=s(this.toDate(),{locale:this.$L,utc:!0});return t?n.add(this.utcOffset(),e):n},i.local=function(){return s(this.toDate(),{locale:this.$L,utc:!1})};var a=i.parse;i.parse=function(t){t.utc&&(this.$u=!0),this.$utils().u(t.$offset)||(this.$offset=t.$offset),a.call(this,t)};var c=i.init;i.init=function(){if(this.$u){var t=this.$d;this.$y=t.getUTCFullYear(),this.$M=t.getUTCMonth(),this.$D=t.getUTCDate(),this.$W=t.getUTCDay(),this.$H=t.getUTCHours(),this.$m=t.getUTCMinutes(),this.$s=t.getUTCSeconds(),this.$ms=t.getUTCMilliseconds()}else c.call(this)};var u=i.utcOffset;i.utcOffset=function(t,o){var s=this.$utils().u;if(s(t))return this.$u?0:s(this.$offset)?u.call(this):this.$offset;if("string"==typeof t&&null===(t=function(t){void 0===t&&(t="");var e=t.match(n);if(!e)return null;var o=(""+e[0]).match(r)||["-",0,0],s=o[0],i=60*+o[1]+ +o[2];return 0===i?0:"+"===s?i:-i}(t)))return this;var i=Math.abs(t)<=16?60*t:t,a=this;if(o)return a.$offset=i,a.$u=0===t,a;if(0!==t){var c=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(a=this.local().add(i+c,e)).$offset=i,a.$x.$localOffset=c}else a=this.utc();return a};var l=i.format;i.format=function(t){var e=t||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return l.call(this,e)},i.valueOf=function(){var t=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*t},i.isUTC=function(){return!!this.$u},i.toISOString=function(){return this.toDate().toISOString()},i.toString=function(){return this.toDate().toUTCString()};var f=i.toDate;i.toDate=function(t){return"s"===t&&this.$offset?s(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():f.call(this)};var d=i.diff;i.diff=function(t,e,n){if(t&&this.$u===t.$u)return d.call(this,t,e,n);var r=this.local(),o=s(t).local();return d.call(r,o,e,n)}})}(z);var U=j(z.exports);F.$defaultFormat=function(t){return F.utc(t).format("YYYY-MM-DD HH:mm:ss")},F.$prettyPrint=function(t){return F(t).format("h:mma dddd MMM DD, YYYY")};F.extend(k),F.extend(P),F.extend(((t,e,n)=>{e.prototype.skewedDiff=function(t,e){const n=Math.abs(this.diff(t))/6e4;return n>e?Math.floor(n):n<e?Math.ceil(n):n}})),F.extend(U);const L=F;function B(t,e){return function(){return t.apply(e,arguments)}}const{toString:q}=Object.prototype,{getPrototypeOf:I}=Object,H=(t=>e=>{const n=q.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Y=t=>(t=t.toLowerCase(),e=>H(e)===t),W=t=>e=>typeof e===t,{isArray:J}=Array,V=W("undefined");const K=Y("ArrayBuffer");const Z=W("string"),G=W("function"),Q=W("number"),X=t=>null!==t&&"object"==typeof t,tt=t=>{if("object"!==H(t))return!1;const e=I(t);return!(null!==e&&e!==Object.prototype&&null!==Object.getPrototypeOf(e)||Symbol.toStringTag in t||Symbol.iterator in t)},et=Y("Date"),nt=Y("File"),rt=Y("Blob"),ot=Y("FileList"),st=Y("URLSearchParams"),[it,at,ct,ut]=["ReadableStream","Request","Response","Headers"].map(Y);function lt(t,e,{allOwnKeys:n=!1}={}){if(null==t)return;let r,o;if("object"!=typeof t&&(t=[t]),J(t))for(r=0,o=t.length;r<o;r++)e.call(null,t[r],r,t);else{const o=n?Object.getOwnPropertyNames(t):Object.keys(t),s=o.length;let i;for(r=0;r<s;r++)i=o[r],e.call(null,t[i],i,t)}}function ft(t,e){e=e.toLowerCase();const n=Object.keys(t);let r,o=n.length;for(;o-- >0;)if(r=n[o],e===r.toLowerCase())return r;return null}const dt="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,ht=t=>!V(t)&&t!==dt;const pt=(t=>e=>t&&e instanceof t)("undefined"!=typeof Uint8Array&&I(Uint8Array)),mt=Y("HTMLFormElement"),yt=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),gt=Y("RegExp"),bt=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),r={};lt(n,((n,o)=>{let s;!1!==(s=e(n,o,t))&&(r[o]=s||n)})),Object.defineProperties(t,r)},wt="abcdefghijklmnopqrstuvwxyz",_t="0123456789",vt={DIGIT:_t,ALPHA:wt,ALPHA_DIGIT:wt+wt.toUpperCase()+_t};const Ot=Y("AsyncFunction");var St={isArray:J,isArrayBuffer:K,isBuffer:function(t){return null!==t&&!V(t)&&null!==t.constructor&&!V(t.constructor)&&G(t.constructor.isBuffer)&&t.constructor.isBuffer(t)},isFormData:t=>{let e;return t&&("function"==typeof FormData&&t instanceof FormData||G(t.append)&&("formdata"===(e=H(t))||"object"===e&&G(t.toString)&&"[object FormData]"===t.toString()))},isArrayBufferView:function(t){let e;return e="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&K(t.buffer),e},isString:Z,isNumber:Q,isBoolean:t=>!0===t||!1===t,isObject:X,isPlainObject:tt,isReadableStream:it,isRequest:at,isResponse:ct,isHeaders:ut,isUndefined:V,isDate:et,isFile:nt,isBlob:rt,isRegExp:gt,isFunction:G,isStream:t=>X(t)&&G(t.pipe),isURLSearchParams:st,isTypedArray:pt,isFileList:ot,forEach:lt,merge:function t(){const{caseless:e}=ht(this)&&this||{},n={},r=(r,o)=>{const s=e&&ft(n,o)||o;tt(n[s])&&tt(r)?n[s]=t(n[s],r):tt(r)?n[s]=t({},r):J(r)?n[s]=r.slice():n[s]=r};for(let o=0,s=arguments.length;o<s;o++)arguments[o]&&lt(arguments[o],r);return n},extend:(t,e,n,{allOwnKeys:r}={})=>(lt(e,((e,r)=>{n&&G(e)?t[r]=B(e,n):t[r]=e}),{allOwnKeys:r}),t),trim:t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:t=>(65279===t.charCodeAt(0)&&(t=t.slice(1)),t),inherits:(t,e,n,r)=>{t.prototype=Object.create(e.prototype,r),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},toFlatObject:(t,e,n,r)=>{let o,s,i;const a={};if(e=e||{},null==t)return e;do{for(o=Object.getOwnPropertyNames(t),s=o.length;s-- >0;)i=o[s],r&&!r(i,t,e)||a[i]||(e[i]=t[i],a[i]=!0);t=!1!==n&&I(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},kindOf:H,kindOfTest:Y,endsWith:(t,e,n)=>{t=String(t),(void 0===n||n>t.length)&&(n=t.length),n-=e.length;const r=t.indexOf(e,n);return-1!==r&&r===n},toArray:t=>{if(!t)return null;if(J(t))return t;let e=t.length;if(!Q(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},forEachEntry:(t,e)=>{const n=(t&&t[Symbol.iterator]).call(t);let r;for(;(r=n.next())&&!r.done;){const n=r.value;e.call(t,n[0],n[1])}},matchAll:(t,e)=>{let n;const r=[];for(;null!==(n=t.exec(e));)r.push(n);return r},isHTMLForm:mt,hasOwnProperty:yt,hasOwnProp:yt,reduceDescriptors:bt,freezeMethods:t=>{bt(t,((e,n)=>{if(G(t)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const r=t[n];G(r)&&(e.enumerable=!1,"writable"in e?e.writable=!1:e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))}))},toObjectSet:(t,e)=>{const n={},r=t=>{t.forEach((t=>{n[t]=!0}))};return J(t)?r(t):r(String(t).split(e)),n},toCamelCase:t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(t,e,n){return e.toUpperCase()+n})),noop:()=>{},toFiniteNumber:(t,e)=>null!=t&&Number.isFinite(t=+t)?t:e,findKey:ft,global:dt,isContextDefined:ht,ALPHABET:vt,generateString:(t=16,e=vt.ALPHA_DIGIT)=>{let n="";const{length:r}=e;for(;t--;)n+=e[Math.random()*r|0];return n},isSpecCompliantForm:function(t){return!!(t&&G(t.append)&&"FormData"===t[Symbol.toStringTag]&&t[Symbol.iterator])},toJSONObject:t=>{const e=new Array(10),n=(t,r)=>{if(X(t)){if(e.indexOf(t)>=0)return;if(!("toJSON"in t)){e[r]=t;const o=J(t)?[]:{};return lt(t,((t,e)=>{const s=n(t,r+1);!V(s)&&(o[e]=s)})),e[r]=void 0,o}}return t};return n(t,0)},isAsyncFn:Ot,isThenable:t=>t&&(X(t)||G(t))&&G(t.then)&&G(t.catch)};function $t(t,e,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=t,this.name="AxiosError",e&&(this.code=e),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o)}St.inherits($t,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:St.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const Et=$t.prototype,Tt={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((t=>{Tt[t]={value:t}})),Object.defineProperties($t,Tt),Object.defineProperty(Et,"isAxiosError",{value:!0}),$t.from=(t,e,n,r,o,s)=>{const i=Object.create(Et);return St.toFlatObject(t,i,(function(t){return t!==Error.prototype}),(t=>"isAxiosError"!==t)),$t.call(i,t.message,e,n,r,o),i.cause=t,i.name=t.name,s&&Object.assign(i,s),i};function xt(t){return St.isPlainObject(t)||St.isArray(t)}function Rt(t){return St.endsWith(t,"[]")?t.slice(0,-2):t}function At(t,e,n){return t?t.concat(e).map((function(t,e){return t=Rt(t),!n&&e?"["+t+"]":t})).join(n?".":""):e}const Dt=St.toFlatObject(St,{},null,(function(t){return/^is[A-Z]/.test(t)}));function jt(t,e,n){if(!St.isObject(t))throw new TypeError("target must be an object");e=e||new FormData;const r=(n=St.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(t,e){return!St.isUndefined(e[t])}))).metaTokens,o=n.visitor||u,s=n.dots,i=n.indexes,a=(n.Blob||"undefined"!=typeof Blob&&Blob)&&St.isSpecCompliantForm(e);if(!St.isFunction(o))throw new TypeError("visitor must be a function");function c(t){if(null===t)return"";if(St.isDate(t))return t.toISOString();if(!a&&St.isBlob(t))throw new $t("Blob is not supported. Use a Buffer instead.");return St.isArrayBuffer(t)||St.isTypedArray(t)?a&&"function"==typeof Blob?new Blob([t]):Buffer.from(t):t}function u(t,n,o){let a=t;if(t&&!o&&"object"==typeof t)if(St.endsWith(n,"{}"))n=r?n:n.slice(0,-2),t=JSON.stringify(t);else if(St.isArray(t)&&function(t){return St.isArray(t)&&!t.some(xt)}(t)||(St.isFileList(t)||St.endsWith(n,"[]"))&&(a=St.toArray(t)))return n=Rt(n),a.forEach((function(t,r){!St.isUndefined(t)&&null!==t&&e.append(!0===i?At([n],r,s):null===i?n:n+"[]",c(t))})),!1;return!!xt(t)||(e.append(At(o,n,s),c(t)),!1)}const l=[],f=Object.assign(Dt,{defaultVisitor:u,convertValue:c,isVisitable:xt});if(!St.isObject(t))throw new TypeError("data must be an object");return function t(n,r){if(!St.isUndefined(n)){if(-1!==l.indexOf(n))throw Error("Circular reference detected in "+r.join("."));l.push(n),St.forEach(n,(function(n,s){!0===(!(St.isUndefined(n)||null===n)&&o.call(e,n,St.isString(s)?s.trim():s,r,f))&&t(n,r?r.concat(s):[s])})),l.pop()}}(t),e}function Mt(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,(function(t){return e[t]}))}function Ft(t,e){this._pairs=[],t&&jt(t,this,e)}const Ct=Ft.prototype;function kt(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Nt(t,e,n){if(!e)return t;const r=n&&n.encode||kt,o=n&&n.serialize;let s;if(s=o?o(e,n):St.isURLSearchParams(e)?e.toString():new Ft(e,n).toString(r),s){const e=t.indexOf("#");-1!==e&&(t=t.slice(0,e)),t+=(-1===t.indexOf("?")?"?":"&")+s}return t}Ct.append=function(t,e){this._pairs.push([t,e])},Ct.toString=function(t){const e=t?function(e){return t.call(this,e,Mt)}:Mt;return this._pairs.map((function(t){return e(t[0])+"="+e(t[1])}),"").join("&")};class Pt{constructor(){this.handlers=[]}use(t,e,n){return this.handlers.push({fulfilled:t,rejected:e,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){St.forEach(this.handlers,(function(e){null!==e&&t(e)}))}}var zt={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Ut={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:Ft,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]};const Lt="undefined"!=typeof window&&"undefined"!=typeof document,Bt=(qt="undefined"!=typeof navigator&&navigator.product,Lt&&["ReactNative","NativeScript","NS"].indexOf(qt)<0);var qt;const It="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,Ht=Lt&&window.location.href||"http://localhost";var Yt={...Object.freeze({__proto__:null,hasBrowserEnv:Lt,hasStandardBrowserEnv:Bt,hasStandardBrowserWebWorkerEnv:It,origin:Ht}),...Ut};function Wt(t){function e(t,n,r,o){let s=t[o++];if("__proto__"===s)return!0;const i=Number.isFinite(+s),a=o>=t.length;if(s=!s&&St.isArray(r)?r.length:s,a)return St.hasOwnProp(r,s)?r[s]=[r[s],n]:r[s]=n,!i;r[s]&&St.isObject(r[s])||(r[s]=[]);return e(t,n,r[s],o)&&St.isArray(r[s])&&(r[s]=function(t){const e={},n=Object.keys(t);let r;const o=n.length;let s;for(r=0;r<o;r++)s=n[r],e[s]=t[s];return e}(r[s])),!i}if(St.isFormData(t)&&St.isFunction(t.entries)){const n={};return St.forEachEntry(t,((t,r)=>{e(function(t){return St.matchAll(/\w+|\[(\w*)]/g,t).map((t=>"[]"===t[0]?"":t[1]||t[0]))}(t),r,n,0)})),n}return null}const Jt={transitional:zt,adapter:["xhr","http","fetch"],transformRequest:[function(t,e){const n=e.getContentType()||"",r=n.indexOf("application/json")>-1,o=St.isObject(t);o&&St.isHTMLForm(t)&&(t=new FormData(t));if(St.isFormData(t))return r?JSON.stringify(Wt(t)):t;if(St.isArrayBuffer(t)||St.isBuffer(t)||St.isStream(t)||St.isFile(t)||St.isBlob(t)||St.isReadableStream(t))return t;if(St.isArrayBufferView(t))return t.buffer;if(St.isURLSearchParams(t))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let s;if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(t,e){return jt(t,new Yt.classes.URLSearchParams,Object.assign({visitor:function(t,e,n,r){return Yt.isNode&&St.isBuffer(t)?(this.append(e,t.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},e))}(t,this.formSerializer).toString();if((s=St.isFileList(t))||n.indexOf("multipart/form-data")>-1){const e=this.env&&this.env.FormData;return jt(s?{"files[]":t}:t,e&&new e,this.formSerializer)}}return o||r?(e.setContentType("application/json",!1),function(t,e,n){if(St.isString(t))try{return(e||JSON.parse)(t),St.trim(t)}catch(r){if("SyntaxError"!==r.name)throw r}return(n||JSON.stringify)(t)}(t)):t}],transformResponse:[function(t){const e=this.transitional||Jt.transitional,n=e&&e.forcedJSONParsing,r="json"===this.responseType;if(St.isResponse(t)||St.isReadableStream(t))return t;if(t&&St.isString(t)&&(n&&!this.responseType||r)){const n=!(e&&e.silentJSONParsing)&&r;try{return JSON.parse(t)}catch(o){if(n){if("SyntaxError"===o.name)throw $t.from(o,$t.ERR_BAD_RESPONSE,this,null,this.response);throw o}}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Yt.classes.FormData,Blob:Yt.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};St.forEach(["delete","get","head","post","put","patch"],(t=>{Jt.headers[t]={}}));var Vt=Jt;const Kt=St.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]);const Zt=Symbol("internals");function Gt(t){return t&&String(t).trim().toLowerCase()}function Qt(t){return!1===t||null==t?t:St.isArray(t)?t.map(Qt):String(t)}function Xt(t,e,n,r,o){return St.isFunction(r)?r.call(this,e,n):(o&&(e=n),St.isString(e)?St.isString(r)?-1!==e.indexOf(r):St.isRegExp(r)?r.test(e):void 0:void 0)}class te{constructor(t){t&&this.set(t)}set(t,e,n){const r=this;function o(t,e,n){const o=Gt(e);if(!o)throw new Error("header name must be a non-empty string");const s=St.findKey(r,o);(!s||void 0===r[s]||!0===n||void 0===n&&!1!==r[s])&&(r[s||e]=Qt(t))}const s=(t,e)=>St.forEach(t,((t,n)=>o(t,n,e)));if(St.isPlainObject(t)||t instanceof this.constructor)s(t,e);else if(St.isString(t)&&(t=t.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim()))s((t=>{const e={};let n,r,o;return t&&t.split("\n").forEach((function(t){o=t.indexOf(":"),n=t.substring(0,o).trim().toLowerCase(),r=t.substring(o+1).trim(),!n||e[n]&&Kt[n]||("set-cookie"===n?e[n]?e[n].push(r):e[n]=[r]:e[n]=e[n]?e[n]+", "+r:r)})),e})(t),e);else if(St.isHeaders(t))for(const[i,a]of t.entries())o(a,i,n);else null!=t&&o(e,t,n);return this}get(t,e){if(t=Gt(t)){const n=St.findKey(this,t);if(n){const t=this[n];if(!e)return t;if(!0===e)return function(t){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(t);)e[r[1]]=r[2];return e}(t);if(St.isFunction(e))return e.call(this,t,n);if(St.isRegExp(e))return e.exec(t);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=Gt(t)){const n=St.findKey(this,t);return!(!n||void 0===this[n]||e&&!Xt(0,this[n],n,e))}return!1}delete(t,e){const n=this;let r=!1;function o(t){if(t=Gt(t)){const o=St.findKey(n,t);!o||e&&!Xt(0,n[o],o,e)||(delete n[o],r=!0)}}return St.isArray(t)?t.forEach(o):o(t),r}clear(t){const e=Object.keys(this);let n=e.length,r=!1;for(;n--;){const o=e[n];t&&!Xt(0,this[o],o,t,!0)||(delete this[o],r=!0)}return r}normalize(t){const e=this,n={};return St.forEach(this,((r,o)=>{const s=St.findKey(n,o);if(s)return e[s]=Qt(r),void delete e[o];const i=t?function(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((t,e,n)=>e.toUpperCase()+n))}(o):String(o).trim();i!==o&&delete e[o],e[i]=Qt(r),n[i]=!0})),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);return St.forEach(this,((n,r)=>{null!=n&&!1!==n&&(e[r]=t&&St.isArray(n)?n.join(", "):n)})),e}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([t,e])=>t+": "+e)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...e){const n=new this(t);return e.forEach((t=>n.set(t))),n}static accessor(t){const e=(this[Zt]=this[Zt]={accessors:{}}).accessors,n=this.prototype;function r(t){const r=Gt(t);e[r]||(!function(t,e){const n=St.toCamelCase(" "+e);["get","set","has"].forEach((r=>{Object.defineProperty(t,r+n,{value:function(t,n,o){return this[r].call(this,e,t,n,o)},configurable:!0})}))}(n,t),e[r]=!0)}return St.isArray(t)?t.forEach(r):r(t),this}}te.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),St.reduceDescriptors(te.prototype,(({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(t){this[n]=t}}})),St.freezeMethods(te);var ee=te;function ne(t,e){const n=this||Vt,r=e||n,o=ee.from(r.headers);let s=r.data;return St.forEach(t,(function(t){s=t.call(n,s,o.normalize(),e?e.status:void 0)})),o.normalize(),s}function re(t){return!(!t||!t.__CANCEL__)}function oe(t,e,n){$t.call(this,null==t?"canceled":t,$t.ERR_CANCELED,e,n),this.name="CanceledError"}function se(t,e,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?e(new $t("Request failed with status code "+n.status,[$t.ERR_BAD_REQUEST,$t.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):t(n)}St.inherits(oe,$t,{__CANCEL__:!0});var ie=(t,e,n=3)=>{let r=0;const o=function(t,e){t=t||10;const n=new Array(t),r=new Array(t);let o,s=0,i=0;return e=void 0!==e?e:1e3,function(a){const c=Date.now(),u=r[i];o||(o=c),n[s]=a,r[s]=c;let l=i,f=0;for(;l!==s;)f+=n[l++],l%=t;if(s=(s+1)%t,s===i&&(i=(i+1)%t),c-o<e)return;const d=u&&c-u;return d?Math.round(1e3*f/d):void 0}}(50,250);return function(t,e){let n=0;const r=1e3/e;let o=null;return function(){const e=!0===this,s=Date.now();if(e||s-n>r)return o&&(clearTimeout(o),o=null),n=s,t.apply(null,arguments);o||(o=setTimeout((()=>(o=null,n=Date.now(),t.apply(null,arguments))),r-(s-n)))}}((n=>{const s=n.loaded,i=n.lengthComputable?n.total:void 0,a=s-r,c=o(a);r=s;const u={loaded:s,total:i,progress:i?s/i:void 0,bytes:a,rate:c||void 0,estimated:c&&i&&s<=i?(i-s)/c:void 0,event:n,lengthComputable:null!=i};u[e?"download":"upload"]=!0,t(u)}),n)},ae=Yt.hasStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),e=document.createElement("a");let n;function r(n){let r=n;return t&&(e.setAttribute("href",r),r=e.href),e.setAttribute("href",r),{href:e.href,protocol:e.protocol?e.protocol.replace(/:$/,""):"",host:e.host,search:e.search?e.search.replace(/^\?/,""):"",hash:e.hash?e.hash.replace(/^#/,""):"",hostname:e.hostname,port:e.port,pathname:"/"===e.pathname.charAt(0)?e.pathname:"/"+e.pathname}}return n=r(window.location.href),function(t){const e=St.isString(t)?r(t):t;return e.protocol===n.protocol&&e.host===n.host}}():function(){return function(){return!0}}(),ce=Yt.hasStandardBrowserEnv?{write(t,e,n,r,o,s){const i=[t+"="+encodeURIComponent(e)];St.isNumber(n)&&i.push("expires="+new Date(n).toGMTString()),St.isString(r)&&i.push("path="+r),St.isString(o)&&i.push("domain="+o),!0===s&&i.push("secure"),document.cookie=i.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function ue(t,e){return t&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)?function(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}(t,e):e}const le=t=>t instanceof ee?{...t}:t;function fe(t,e){e=e||{};const n={};function r(t,e,n){return St.isPlainObject(t)&&St.isPlainObject(e)?St.merge.call({caseless:n},t,e):St.isPlainObject(e)?St.merge({},e):St.isArray(e)?e.slice():e}function o(t,e,n){return St.isUndefined(e)?St.isUndefined(t)?void 0:r(void 0,t,n):r(t,e,n)}function s(t,e){if(!St.isUndefined(e))return r(void 0,e)}function i(t,e){return St.isUndefined(e)?St.isUndefined(t)?void 0:r(void 0,t):r(void 0,e)}function a(n,o,s){return s in e?r(n,o):s in t?r(void 0,n):void 0}const c={url:s,method:s,data:s,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:a,headers:(t,e)=>o(le(t),le(e),!0)};return St.forEach(Object.keys(Object.assign({},t,e)),(function(r){const s=c[r]||o,i=s(t[r],e[r],r);St.isUndefined(i)&&s!==a||(n[r]=i)})),n}var de=t=>{const e=fe({},t);let n,{data:r,withXSRFToken:o,xsrfHeaderName:s,xsrfCookieName:i,headers:a,auth:c}=e;if(e.headers=a=ee.from(a),e.url=Nt(ue(e.baseURL,e.url),t.params,t.paramsSerializer),c&&a.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):""))),St.isFormData(r))if(Yt.hasStandardBrowserEnv||Yt.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if(!1!==(n=a.getContentType())){const[t,...e]=n?n.split(";").map((t=>t.trim())).filter(Boolean):[];a.setContentType([t||"multipart/form-data",...e].join("; "))}if(Yt.hasStandardBrowserEnv&&(o&&St.isFunction(o)&&(o=o(e)),o||!1!==o&&ae(e.url))){const t=s&&i&&ce.read(i);t&&a.set(s,t)}return e};var he="undefined"!=typeof XMLHttpRequest&&function(t){return new Promise((function(e,n){const r=de(t);let o=r.data;const s=ee.from(r.headers).normalize();let i,{responseType:a}=r;function c(){r.cancelToken&&r.cancelToken.unsubscribe(i),r.signal&&r.signal.removeEventListener("abort",i)}let u=new XMLHttpRequest;function l(){if(!u)return;const r=ee.from("getAllResponseHeaders"in u&&u.getAllResponseHeaders());se((function(t){e(t),c()}),(function(t){n(t),c()}),{data:a&&"text"!==a&&"json"!==a?u.response:u.responseText,status:u.status,statusText:u.statusText,headers:r,config:t,request:u}),u=null}u.open(r.method.toUpperCase(),r.url,!0),u.timeout=r.timeout,"onloadend"in u?u.onloadend=l:u.onreadystatechange=function(){u&&4===u.readyState&&(0!==u.status||u.responseURL&&0===u.responseURL.indexOf("file:"))&&setTimeout(l)},u.onabort=function(){u&&(n(new $t("Request aborted",$t.ECONNABORTED,r,u)),u=null)},u.onerror=function(){n(new $t("Network Error",$t.ERR_NETWORK,r,u)),u=null},u.ontimeout=function(){let t=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const e=r.transitional||zt;r.timeoutErrorMessage&&(t=r.timeoutErrorMessage),n(new $t(t,e.clarifyTimeoutError?$t.ETIMEDOUT:$t.ECONNABORTED,r,u)),u=null},void 0===o&&s.setContentType(null),"setRequestHeader"in u&&St.forEach(s.toJSON(),(function(t,e){u.setRequestHeader(e,t)})),St.isUndefined(r.withCredentials)||(u.withCredentials=!!r.withCredentials),a&&"json"!==a&&(u.responseType=r.responseType),"function"==typeof r.onDownloadProgress&&u.addEventListener("progress",ie(r.onDownloadProgress,!0)),"function"==typeof r.onUploadProgress&&u.upload&&u.upload.addEventListener("progress",ie(r.onUploadProgress)),(r.cancelToken||r.signal)&&(i=e=>{u&&(n(!e||e.type?new oe(null,t,u):e),u.abort(),u=null)},r.cancelToken&&r.cancelToken.subscribe(i),r.signal&&(r.signal.aborted?i():r.signal.addEventListener("abort",i)));const f=function(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}(r.url);f&&-1===Yt.protocols.indexOf(f)?n(new $t("Unsupported protocol "+f+":",$t.ERR_BAD_REQUEST,t)):u.send(o||null)}))};const pe=(t,e)=>{let n,r=new AbortController;const o=function(t){if(!n){n=!0,i();const e=t instanceof Error?t:this.reason;r.abort(e instanceof $t?e:new oe(e instanceof Error?e.message:e))}};let s=e&&setTimeout((()=>{o(new $t(`timeout ${e} of ms exceeded`,$t.ETIMEDOUT))}),e);const i=()=>{t&&(s&&clearTimeout(s),s=null,t.forEach((t=>{t&&(t.removeEventListener?t.removeEventListener("abort",o):t.unsubscribe(o))})),t=null)};t.forEach((t=>t&&t.addEventListener&&t.addEventListener("abort",o)));const{signal:a}=r;return a.unsubscribe=i,[a,()=>{s&&clearTimeout(s),s=null}]},me=function*(t,e){let n=t.byteLength;if(!e||n<e)return void(yield t);let r,o=0;for(;o<n;)r=o+e,yield t.slice(o,r),o=r},ye=(t,e,n,r,o)=>{const s=async function*(t,e,n){for await(const r of t)yield*me(ArrayBuffer.isView(r)?r:await n(String(r)),e)}(t,e,o);let i=0;return new ReadableStream({type:"bytes",async pull(t){const{done:e,value:o}=await s.next();if(e)return t.close(),void r();let a=o.byteLength;n&&n(i+=a),t.enqueue(new Uint8Array(o))},cancel:t=>(r(t),s.return())},{highWaterMark:2})},ge=(t,e)=>{const n=null!=t;return r=>setTimeout((()=>e({lengthComputable:n,total:t,loaded:r})))},be="function"==typeof fetch&&"function"==typeof Request&&"function"==typeof Response,we=be&&"function"==typeof ReadableStream,_e=be&&("function"==typeof TextEncoder?(t=>e=>t.encode(e))(new TextEncoder):async t=>new Uint8Array(await new Response(t).arrayBuffer())),ve=we&&(()=>{let t=!1;const e=new Request(Yt.origin,{body:new ReadableStream,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type");return t&&!e})(),Oe=we&&!!(()=>{try{return St.isReadableStream(new Response("").body)}catch(t){}})(),Se={stream:Oe&&(t=>t.body)};var $e;be&&($e=new Response,["text","arrayBuffer","blob","formData","stream"].forEach((t=>{!Se[t]&&(Se[t]=St.isFunction($e[t])?e=>e[t]():(e,n)=>{throw new $t(`Response type '${t}' is not supported`,$t.ERR_NOT_SUPPORT,n)})})));const Ee=async(t,e)=>{const n=St.toFiniteNumber(t.getContentLength());return null==n?(async t=>null==t?0:St.isBlob(t)?t.size:St.isSpecCompliantForm(t)?(await new Request(t).arrayBuffer()).byteLength:St.isArrayBufferView(t)?t.byteLength:(St.isURLSearchParams(t)&&(t+=""),St.isString(t)?(await _e(t)).byteLength:void 0))(e):n};const Te={http:null,xhr:he,fetch:be&&(async t=>{let{url:e,method:n,data:r,signal:o,cancelToken:s,timeout:i,onDownloadProgress:a,onUploadProgress:c,responseType:u,headers:l,withCredentials:f="same-origin",fetchOptions:d}=de(t);u=u?(u+"").toLowerCase():"text";let h,p,[m,y]=o||s||i?pe([o,s],i):[];const g=()=>{!h&&setTimeout((()=>{m&&m.unsubscribe()})),h=!0};let b;try{if(c&&ve&&"get"!==n&&"head"!==n&&0!==(b=await Ee(l,r))){let t,n=new Request(e,{method:"POST",body:r,duplex:"half"});St.isFormData(r)&&(t=n.headers.get("content-type"))&&l.setContentType(t),n.body&&(r=ye(n.body,65536,ge(b,ie(c)),null,_e))}St.isString(f)||(f=f?"cors":"omit"),p=new Request(e,{...d,signal:m,method:n.toUpperCase(),headers:l.normalize().toJSON(),body:r,duplex:"half",withCredentials:f});let o=await fetch(p);const s=Oe&&("stream"===u||"response"===u);if(Oe&&(a||s)){const t={};["status","statusText","headers"].forEach((e=>{t[e]=o[e]}));const e=St.toFiniteNumber(o.headers.get("content-length"));o=new Response(ye(o.body,65536,a&&ge(e,ie(a,!0)),s&&g,_e),t)}u=u||"text";let i=await Se[St.findKey(Se,u)||"text"](o,t);return!s&&g(),y&&y(),await new Promise(((e,n)=>{se(e,n,{data:i,headers:ee.from(o.headers),status:o.status,statusText:o.statusText,config:t,request:p})}))}catch(w){if(g(),w&&"TypeError"===w.name&&/fetch/i.test(w.message))throw Object.assign(new $t("Network Error",$t.ERR_NETWORK,t,p),{cause:w.cause||w});throw $t.from(w,w&&w.code,t,p)}})};St.forEach(Te,((t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch(n){}Object.defineProperty(t,"adapterName",{value:e})}}));const xe=t=>`- ${t}`,Re=t=>St.isFunction(t)||null===t||!1===t;var Ae=t=>{t=St.isArray(t)?t:[t];const{length:e}=t;let n,r;const o={};for(let s=0;s<e;s++){let e;if(n=t[s],r=n,!Re(n)&&(r=Te[(e=String(n)).toLowerCase()],void 0===r))throw new $t(`Unknown adapter '${e}'`);if(r)break;o[e||"#"+s]=r}if(!r){const t=Object.entries(o).map((([t,e])=>`adapter ${t} `+(!1===e?"is not supported by the environment":"is not available in the build")));throw new $t("There is no suitable adapter to dispatch the request "+(e?t.length>1?"since :\n"+t.map(xe).join("\n"):" "+xe(t[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return r};function De(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new oe(null,t)}function je(t){De(t),t.headers=ee.from(t.headers),t.data=ne.call(t,t.transformRequest),-1!==["post","put","patch"].indexOf(t.method)&&t.headers.setContentType("application/x-www-form-urlencoded",!1);return Ae(t.adapter||Vt.adapter)(t).then((function(e){return De(t),e.data=ne.call(t,t.transformResponse,e),e.headers=ee.from(e.headers),e}),(function(e){return re(e)||(De(t),e&&e.response&&(e.response.data=ne.call(t,t.transformResponse,e.response),e.response.headers=ee.from(e.response.headers))),Promise.reject(e)}))}const Me="1.7.2",Fe={};["object","boolean","number","function","string","symbol"].forEach(((t,e)=>{Fe[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}}));const Ce={};Fe.transitional=function(t,e,n){function r(t,e){return"[Axios v1.7.2] Transitional option '"+t+"'"+e+(n?". "+n:"")}return(n,o,s)=>{if(!1===t)throw new $t(r(o," has been removed"+(e?" in "+e:"")),$t.ERR_DEPRECATED);return e&&!Ce[o]&&(Ce[o]=!0,console.warn(r(o," has been deprecated since v"+e+" and will be removed in the near future"))),!t||t(n,o,s)}};var ke={assertOptions:function(t,e,n){if("object"!=typeof t)throw new $t("options must be an object",$t.ERR_BAD_OPTION_VALUE);const r=Object.keys(t);let o=r.length;for(;o-- >0;){const s=r[o],i=e[s];if(i){const e=t[s],n=void 0===e||i(e,s,t);if(!0!==n)throw new $t("option "+s+" must be "+n,$t.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new $t("Unknown option "+s,$t.ERR_BAD_OPTION)}},validators:Fe};const Ne=ke.validators;class Pe{constructor(t){this.defaults=t,this.interceptors={request:new Pt,response:new Pt}}async request(t,e){try{return await this._request(t,e)}catch(n){if(n instanceof Error){let t;Error.captureStackTrace?Error.captureStackTrace(t={}):t=new Error;const e=t.stack?t.stack.replace(/^.+\n/,""):"";try{n.stack?e&&!String(n.stack).endsWith(e.replace(/^.+\n.+\n/,""))&&(n.stack+="\n"+e):n.stack=e}catch(r){}}throw n}}_request(t,e){"string"==typeof t?(e=e||{}).url=t:e=t||{},e=fe(this.defaults,e);const{transitional:n,paramsSerializer:r,headers:o}=e;void 0!==n&&ke.assertOptions(n,{silentJSONParsing:Ne.transitional(Ne.boolean),forcedJSONParsing:Ne.transitional(Ne.boolean),clarifyTimeoutError:Ne.transitional(Ne.boolean)},!1),null!=r&&(St.isFunction(r)?e.paramsSerializer={serialize:r}:ke.assertOptions(r,{encode:Ne.function,serialize:Ne.function},!0)),e.method=(e.method||this.defaults.method||"get").toLowerCase();let s=o&&St.merge(o.common,o[e.method]);o&&St.forEach(["delete","get","head","post","put","patch","common"],(t=>{delete o[t]})),e.headers=ee.concat(s,o);const i=[];let a=!0;this.interceptors.request.forEach((function(t){"function"==typeof t.runWhen&&!1===t.runWhen(e)||(a=a&&t.synchronous,i.unshift(t.fulfilled,t.rejected))}));const c=[];let u;this.interceptors.response.forEach((function(t){c.push(t.fulfilled,t.rejected)}));let l,f=0;if(!a){const t=[je.bind(this),void 0];for(t.unshift.apply(t,i),t.push.apply(t,c),l=t.length,u=Promise.resolve(e);f<l;)u=u.then(t[f++],t[f++]);return u}l=i.length;let d=e;for(f=0;f<l;){const t=i[f++],e=i[f++];try{d=t(d)}catch(h){e.call(this,h);break}}try{u=je.call(this,d)}catch(h){return Promise.reject(h)}for(f=0,l=c.length;f<l;)u=u.then(c[f++],c[f++]);return u}getUri(t){return Nt(ue((t=fe(this.defaults,t)).baseURL,t.url),t.params,t.paramsSerializer)}}St.forEach(["delete","get","head","options"],(function(t){Pe.prototype[t]=function(e,n){return this.request(fe(n||{},{method:t,url:e,data:(n||{}).data}))}})),St.forEach(["post","put","patch"],(function(t){function e(e){return function(n,r,o){return this.request(fe(o||{},{method:t,headers:e?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}Pe.prototype[t]=e(),Pe.prototype[t+"Form"]=e(!0)}));var ze=Pe;class Ue{constructor(t){if("function"!=typeof t)throw new TypeError("executor must be a function.");let e;this.promise=new Promise((function(t){e=t}));const n=this;this.promise.then((t=>{if(!n._listeners)return;let e=n._listeners.length;for(;e-- >0;)n._listeners[e](t);n._listeners=null})),this.promise.then=t=>{let e;const r=new Promise((t=>{n.subscribe(t),e=t})).then(t);return r.cancel=function(){n.unsubscribe(e)},r},t((function(t,r,o){n.reason||(n.reason=new oe(t,r,o),e(n.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){this.reason?t(this.reason):this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const e=this._listeners.indexOf(t);-1!==e&&this._listeners.splice(e,1)}static source(){let t;return{token:new Ue((function(e){t=e})),cancel:t}}}var Le=Ue;const Be={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Be).forEach((([t,e])=>{Be[e]=t}));var qe=Be;const Ie=function t(e){const n=new ze(e),r=B(ze.prototype.request,n);return St.extend(r,ze.prototype,n,{allOwnKeys:!0}),St.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return t(fe(e,n))},r}(Vt);Ie.Axios=ze,Ie.CanceledError=oe,Ie.CancelToken=Le,Ie.isCancel=re,Ie.VERSION=Me,Ie.toFormData=jt,Ie.AxiosError=$t,Ie.Cancel=Ie.CanceledError,Ie.all=function(t){return Promise.all(t)},Ie.spread=function(t){return function(e){return t.apply(null,e)}},Ie.isAxiosError=function(t){return St.isObject(t)&&!0===t.isAxiosError},Ie.mergeConfig=fe,Ie.AxiosHeaders=ee,Ie.formToJSON=t=>Wt(St.isHTMLForm(t)?new FormData(t):t),Ie.getAdapter=Ae,Ie.HttpStatusCode=qe,Ie.default=Ie;const He=`${"undefined"!=typeof window?window.location.origin:self.location.origin}/api/1.0/`,Ye=Ie.create({baseURL:He}),We="pm25";class Je{constructor(t){__publicField(this,"data"),__publicField(this,"dataFields"),__publicField(this,"displayField"),__publicField(this,"lastUpdated"),__publicField(this,"markerParams"),__publicField(this,"monitorFields");const e=A(t);t.latest&&("pm25"in t.latest&&parseInt(t.latest.pm25,10)<0&&(t.latest.pm25="0"),"pm25_avg_60"in t.latest&&parseInt(t.latest.pm25_avg_60,10)<0&&(t.latest.pm25_avg_60="0")),this.data=t,this.markerParams=function(t){const e=`#${b}`,n={border_color:g(m(e,.1)),border_size:1,fill_color:e,value_color:e,size:8,shape:"square"};switch(t.data_source.name){case"AirNow.gov":case"AQview":case"Central California Asthma Collaborative":n.shape="triangle";break;case"PurpleAir":t.is_sjvair&&(n.shape="circle");break;default:console.error(`Unknown device type for monitor ${t.id}: ${t.data_source.name}`,t),n.shape="diamond"}if(t.latest){const e=T(+t.latest[We],R.levels);if(n.value_color=e,t.is_active)switch(n.fill_color=T(+t.latest[We],R.levels),n.border_color=g(m(n.fill_color,.1)),t.data_source.name){case"AirNow.gov":case"AQview":case"Central California Asthma Collaborative":n.size=14;break;case"PurpleAir":t.is_sjvair?n.size=12:n.size=10}"inside"===t.location&&(n.border_color=`#${w}`,n.border_size=2)}return n}(t),this.monitorFields=e,this.dataFields=Object.keys(this.monitorFields),this.displayField=e[We],this.lastUpdated=t.latest&&Object.keys(t.latest).length>1?L(t.latest.timestamp).fromNow():"never"}}var Ve=Object.freeze({__proto__:null,fetchEntries:async function t(e,n,r=1){const o=[],s={fields:e.dataFields.join(","),page:r,timestamp__gte:L.$defaultFormat(n.start),timestamp__lte:L.$defaultFormat(n.end)};return Ye.get(`monitors/${e.data.id}/entries/`,{params:s}).then((async s=>{const i=s.data;if(i.data.length&&(o.push(...i.data),i.has_next_page)){const s=await t(e,n,++r).catch((t=>{throw t}));s.length&&o.push(...s)}return o}))},fetchMonitors:async function(){return Ye.get("/monitors").then((t=>{const e={};for(let n of t.data.data)e[n.id]=new Je(n);return e}))},fetchSubscriptions:async function(){return Ye.get("alerts/subscriptions").then((t=>t.data.data))},fetchTempByCoords:async function(t){const e=`https://api.weather.gov/points/${t.join(",")}`;return await Ye(e).then((async t=>{try{return(await Ye(t.data.properties.forecastHourly)).data.properties.periods[0].temperature}catch(e){throw e}}))}});new class{constructor(e,n){__publicField(this,"serviceModule"),__publicField(this,"serviceModuleName"),this.serviceModule=n,this.serviceModuleName=e,self.addEventListener("message",(async e=>{const{id:n,taskName:r,parameters:o}=e.data;this.serviceModule[r];const s=new t(n);r in this.serviceModule?await this.serviceModule[r](...o).then((t=>s.pass(t))).catch((t=>s.fail(t.message))):s.fail(`Background task "${String(r)}" not found in "${this.serviceModuleName}" controller`),self.postMessage(s)}))}}("MonitorsService",Ve)}();
@@ -1 +1 @@
1
- import{M as t}from"./MonitorDetails-D4CFKYUG.js";import{d as e,v as a}from"../sjvairMonitorMap.js";async function s(t,n,o=1){const r=[],i={fields:t.dataFields.join(","),page:o,timestamp__gte:e.$defaultFormat(n.start),timestamp__lte:e.$defaultFormat(n.end)};return a.get(`monitors/${t.data.id}/entries/`,{params:i}).then((async e=>{const a=e.data;if(a.data.length&&(r.push(...a.data),a.has_next_page)){const e=await s(t,n,++o).catch((t=>{throw t}));e.length&&r.push(...e)}return r}))}async function n(a,n){return s(a,n).then((s=>{const n=[],r="PurpleAir"===a.data.data_source.name?2:60,i=new Map(Object.keys(t).map((t=>[t,[]])));for(let t=s.length-1;t>=0;t--){const a=s[t];if(n.length>1){const t=e(a.timestamp).utc().tz("America/Los_Angeles").toISOString();let s=e(n[n.length-1]);for(;s.skewedDiff(t,r)>r+1;)s=s.add(r,"m"),o(n,i,a,s)}o(n,i,a)}return[n.map((t=>t.unix())),...i.values()].filter((t=>t.length))})).catch((t=>t))}function o(t,a,s,n){n?t.push(n.utc().tz("America/Los_Angeles")):t.push(e(s.timestamp).utc().tz("America/Los_Angeles"));for(let e of a.keys())if(e in s){const t=a.get(e);let o;if(n)o=null;else{const t=parseFloat(s[e]);o=t>=0?t:0}t.push(o)}}export{n as fetchChartData};
1
+ import{M as t}from"./MonitorDetails-D6c_aK1u.js";import{d as e,v as a}from"../sjvairMonitorMap.js";async function s(t,n,o=1){const r=[],i={fields:t.dataFields.join(","),page:o,timestamp__gte:e.$defaultFormat(n.start),timestamp__lte:e.$defaultFormat(n.end)};return a.get(`monitors/${t.data.id}/entries/`,{params:i}).then((async e=>{const a=e.data;if(a.data.length&&(r.push(...a.data),a.has_next_page)){const e=await s(t,n,++o).catch((t=>{throw t}));e.length&&r.push(...e)}return r}))}async function n(a,n){return s(a,n).then((s=>{const n=[],r="PurpleAir"===a.data.data_source.name?2:60,i=new Map(Object.keys(t).map((t=>[t,[]])));for(let t=s.length-1;t>=0;t--){const a=s[t];if(n.length>1){const t=e(a.timestamp).utc().tz("America/Los_Angeles").toISOString();let s=e(n[n.length-1]);for(;s.skewedDiff(t,r)>r+1;)s=s.add(r,"m"),o(n,i,a,s)}o(n,i,a)}return[n.map((t=>t.unix())),...i.values()].filter((t=>t.length))})).catch((t=>t))}function o(t,a,s,n){n?t.push(n.utc().tz("America/Los_Angeles")):t.push(e(s.timestamp).utc().tz("America/Los_Angeles"));for(let e of a.keys())if(e in s){const t=a.get(e);let o;if(n)o=null;else{const t=parseFloat(s[e]);o=t>=0?t:0}t.push(o)}}export{n as fetchChartData};