@sjvair/monitor-map 1.32.0 → 1.34.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 +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),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 i(t){if("string"!=typeof t)throw new r(t);if("transparent"===t.trim().toLowerCase())return[0,0,0,0];let n=t.trim();n=h.test(t)?function(t){const e=t.toLowerCase().trim(),n=s[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 i=c.exec(n);if(i){const t=Array.from(i).slice(1);return[...t.slice(0,3).map((t=>parseInt(a(t,2),16))),parseInt(a(t[3]||"f",2),16)/255]}const o=u.exec(n);if(o){const t=Array.from(o).slice(1);return[...t.slice(0,3).map((t=>parseInt(t,16))),parseInt(t[3]||"ff",16)/255]}const d=l.exec(n);if(d){const t=Array.from(d).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,i,o,s]=Array.from(m).slice(1).map(parseFloat);if(e(0,100,i)!==i)throw new r(t);if(e(0,100,o)!==o)throw new r(t);return[...p(n,i,o),s||1]}throw new r(t)}const o=t=>parseInt(t.replace(/_/g,""),36),s="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=o(e.substring(0,3)),r=o(e.substring(3)).toString(16);let i="";for(let o=0;o<6-r.length;o++)i+="0";return t[n]=`${i}${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,h=/^[a-z]+$/i,d=t=>Math.round(255*t),p=(t,e,n)=>{let r=n/100;if(0===e)return[r,r,r].map(d);const i=(t%360+360)%360/60,o=(1-Math.abs(2*r-1))*(e/100),s=o*(1-Math.abs(i%2-1));let a=0,c=0,u=0;i>=0&&i<1?(a=o,c=s):i>=1&&i<2?(a=s,c=o):i>=2&&i<3?(c=o,u=s):i>=3&&i<4?(c=s,u=o):i>=4&&i<5?(a=s,u=o):i>=5&&i<6&&(a=o,u=s);const l=r-o/2;return[a+l,c+l,u+l].map(d)};function m(t,n){const[r,o,s,a]=function(t){const[e,n,r,o]=i(t).map(((t,e)=>3===e?t:t/255)),s=Math.max(e,n,r),a=Math.min(e,n,r),c=(s+a)/2;if(s===a)return[0,0,c,o];const u=s-a;return[60*(e===s?(n-r)/u+(n<r?6:0):n===s?(r-e)/u+2:(e-n)/u+4),c>.5?u/(2-s-a):u/(s+a),c,o]}(t);return function(t,n,r,i){return`hsla(${(t%360).toFixed()}, ${e(0,100,100*n).toFixed()}%, ${e(0,100,100*r).toFixed()}%, ${parseFloat(e(0,1,i).toFixed(3))})`}(r,o,s-n,a)}function g(t,n,r){const o=(t,e)=>3===e?t:t/255,[s,a,c,u]=i(t).map(o),[l,f,h,d]=i(n).map(o),p=d-u,m=2*r-1,g=((m*p==-1?m:m+p/(1+m*p))+1)/2,y=1-g;return _=255*(a*y+f*g),b=255*(c*y+h*g),w=d*r+u*(1-r),`rgba(${e(0,255,255*(s*y+l*g)).toFixed()}, ${e(0,255,_).toFixed()}, ${e(0,255,b).toFixed()}, ${parseFloat(e(0,1,w).toFixed(3))})`;var _,b,w}function y(t){const[n,r,o,s]=i(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(o)}${s<1?a(Math.round(255*s)):""}`}const _="969696",b="000000",w="00e400",v="ffff00",O="ff7e00",$="ff0000",E="8f3f97",S="7e0023";function x(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],i=e[r],o=n.min===-1/0?i.min:i.min-n.min,s=(o-(i.min-t))/o;return g(`#${n.color}`,`#${i.color}`,s)}return"#FFFFFF"}const M=class{constructor(t,e,n,r){__publicField(this,"label"),__publicField(this,"latest"),__publicField(this,"levels",M.levels),__publicField(this,"name"),__publicField(this,"updateDuration"),this.label=e,this.name=t,this.updateDuration=n,r.latest&&this.name in r.latest&&(this.latest=Math.round(parseFloat(r.latest[this.name])))}};let D=M;function j(t){switch(t.device){case"AirNow":return function(t){return T(["pm25","PM 2.5","60m",t],["pm100","PM 10","60M",t])}(t);case"BAM1022":return function(t){return T(["pm25","PM 2.5","60m",t])}(t);case"PurpleAir":return function(t){return T(["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 T(...t){const e={};for(let n of t)e[n[0]]=new D(...n);return e}__publicField(D,"levels",[{min:-1/0,color:w},{min:12,color:v},{min:35,color:O},{min:55,color:$},{min:150,color:E},{min:250,color:S}]);"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;var R={exports:{}};R.exports=function(){var t=1e3,e=6e4,n=36e5,r="millisecond",i="second",o="minute",s="hour",a="day",c="week",u="month",l="quarter",f="year",h="date",d="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,g={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("_")},y=function(t,e,n){var r=String(t);return!r||r.length>=e?t:""+Array(e+1-r.length).join(n)+t},_={s:y,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),i=n%60;return(e<=0?"+":"-")+y(r,2,"0")+":"+y(i,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()),i=e.clone().add(r,u),o=n-i<0,s=e.clone().add(r+(o?-1:1),u);return+(-(r+(n-i)/(o?i-s:s-i))||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:h,h:s,m:o,s:i,ms:r,Q:l}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},b="en",w={};w[b]=g;var v=function(t){return t instanceof S},O=function t(e,n,r){var i;if(!e)return b;if("string"==typeof e){var o=e.toLowerCase();w[o]&&(i=o),n&&(w[o]=n,i=o);var s=e.split("-");if(!i&&s.length>1)return t(s[0])}else{var a=e.name;w[a]=e,i=a}return!r&&i&&(b=i),i||!r&&b},$=function(t,e){if(v(t))return t.clone();var n="object"==typeof e?e:{};return n.date=t,n.args=arguments,new S(n)},E=_;E.l=O,E.i=v,E.w=function(t,e){return $(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var S=function(){function g(t){this.$L=O(t.locale,null,!0),this.parse(t)}var y=g.prototype;return y.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 i=r[2]-1||0,o=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,o)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,o)}}return new Date(e)}(t),this.$x=t.x||{},this.init()},y.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()},y.$utils=function(){return E},y.isValid=function(){return!(this.$d.toString()===d)},y.isSame=function(t,e){var n=$(t);return this.startOf(e)<=n&&n<=this.endOf(e)},y.isAfter=function(t,e){return $(t)<this.startOf(e)},y.isBefore=function(t,e){return this.endOf(e)<$(t)},y.$g=function(t,e,n){return E.u(t)?this[e]:this.set(n,t)},y.unix=function(){return Math.floor(this.valueOf()/1e3)},y.valueOf=function(){return this.$d.getTime()},y.startOf=function(t,e){var n=this,r=!!E.u(e)||e,l=E.p(t),d=function(t,e){var i=E.w(n.$u?Date.UTC(n.$y,e,t):new Date(n.$y,e,t),n);return r?i:i.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,g=this.$M,y=this.$D,_="set"+(this.$u?"UTC":"");switch(l){case f:return r?d(1,0):d(31,11);case u:return r?d(1,g):d(0,g+1);case c:var b=this.$locale().weekStart||0,w=(m<b?m+7:m)-b;return d(r?y-w:y+(6-w),g);case a:case h:return p(_+"Hours",0);case s:return p(_+"Minutes",1);case o:return p(_+"Seconds",2);case i:return p(_+"Milliseconds",3);default:return this.clone()}},y.endOf=function(t){return this.startOf(t,!1)},y.$set=function(t,e){var n,c=E.p(t),l="set"+(this.$u?"UTC":""),d=(n={},n[a]=l+"Date",n[h]=l+"Date",n[u]=l+"Month",n[f]=l+"FullYear",n[s]=l+"Hours",n[o]=l+"Minutes",n[i]=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(h,1);m.$d[d](p),m.init(),this.$d=m.set(h,Math.min(this.$D,m.daysInMonth())).$d}else d&&this.$d[d](p);return this.init(),this},y.set=function(t,e){return this.clone().$set(t,e)},y.get=function(t){return this[E.p(t)]()},y.add=function(r,l){var h,d=this;r=Number(r);var p=E.p(l),m=function(t){var e=$(d);return E.w(e.date(e.date()+Math.round(t*r)),d)};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 g=(h={},h[o]=e,h[s]=n,h[i]=t,h)[p]||1,y=this.$d.getTime()+r*g;return E.w(y,this)},y.subtract=function(t,e){return this.add(-1*t,e)},y.format=function(t){var e=this,n=this.$locale();if(!this.isValid())return n.invalidDate||d;var r=t||"YYYY-MM-DDTHH:mm:ssZ",i=E.z(this),o=this.$H,s=this.$m,a=this.$M,c=n.weekdays,u=n.months,l=function(t,n,i,o){return t&&(t[n]||t(e,r))||i[n].slice(0,o)},f=function(t){return E.s(o%12||12,t,"0")},h=n.meridiem||function(t,e,n){var r=t<12?"AM":"PM";return n?r.toLowerCase():r},p={YY:String(this.$y).slice(-2),YYYY:this.$y,M:a+1,MM:E.s(a+1,2,"0"),MMM:l(n.monthsShort,a,u,3),MMMM:l(u,a),D:this.$D,DD:E.s(this.$D,2,"0"),d:String(this.$W),dd:l(n.weekdaysMin,this.$W,c,2),ddd:l(n.weekdaysShort,this.$W,c,3),dddd:c[this.$W],H:String(o),HH:E.s(o,2,"0"),h:f(1),hh:f(2),a:h(o,s,!0),A:h(o,s,!1),m:String(s),mm:E.s(s,2,"0"),s:String(this.$s),ss:E.s(this.$s,2,"0"),SSS:E.s(this.$ms,3,"0"),Z:i};return r.replace(m,(function(t,e){return e||p[t]||i.replace(":","")}))},y.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},y.diff=function(r,h,d){var p,m=E.p(h),g=$(r),y=(g.utcOffset()-this.utcOffset())*e,_=this-g,b=E.m(this,g);return b=(p={},p[f]=b/12,p[u]=b,p[l]=b/3,p[c]=(_-y)/6048e5,p[a]=(_-y)/864e5,p[s]=_/n,p[o]=_/e,p[i]=_/t,p)[m]||_,d?b:E.a(b)},y.daysInMonth=function(){return this.endOf(u).$D},y.$locale=function(){return w[this.$L]},y.locale=function(t,e){if(!t)return this.$L;var n=this.clone(),r=O(t,e,!0);return r&&(n.$L=r),n},y.clone=function(){return E.w(this.$d,this)},y.toDate=function(){return new Date(this.valueOf())},y.toJSON=function(){return this.isValid()?this.toISOString():null},y.toISOString=function(){return this.$d.toISOString()},y.toString=function(){return this.$d.toUTCString()},g}(),x=S.prototype;return $.prototype=x,[["$ms",r],["$s",i],["$m",o],["$H",s],["$W",a],["$M",u],["$y",f],["$D",h]].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,S,$),t.$i=!0),$},$.locale=O,$.isDayjs=v,$.unix=function(t){return $(1e3*t)},$.en=w[b],$.Ls=w,$.p={},$}();var A=R.exports,F={exports:{}};!function(t,e){t.exports=function(t,e,n){t=t||{};var r=e.prototype,i={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 o(t,e,n,i){return r.fromToBase(t,e,n,i)}n.en.relativeTime=i,r.fromToBase=function(e,r,o,s,a){for(var c,u,l,f=o.$locale().relativeTime||i,h=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"}],d=h.length,p=0;p<d;p+=1){var m=h[p];m.d&&(c=s?n(e).diff(o,m.d,!0):o.diff(e,m.d,!0));var g=(t.rounding||Math.round)(Math.abs(c));if(l=c>0,g<=m.r||!m.r){g<=1&&p>0&&(m=h[p-1]);var y=f[m.l];a&&(g=a(""+g)),u="string"==typeof y?y.replace("%d",g):y(g,r,m.l,l);break}}if(r)return u;var _=l?f.future:f.past;return"function"==typeof _?_(u):_.replace("%s",u)},r.to=function(t,e){return o(t,e,this,!0)},r.from=function(t,e){return o(t,e,this)};var s=function(t){return t.$u?n.utc():n()};r.toNow=function(t){return this.to(s(this),t)},r.fromNow=function(t){return this.from(s(this),t)}}}(F);var z=F.exports,k={exports:{}};!function(t,e){var n,r;t.exports=(n={year:0,month:1,day:2,hour:3,minute:4,second:5},r={},function(t,e,i){var o,s=function(t,e,n){void 0===n&&(n={});var i=new Date(t);return function(t,e){void 0===e&&(e={});var n=e.timeZoneName||"short",i=t+"|"+n,o=r[i];return o||(o=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:n}),r[i]=o),o}(e,n).formatToParts(i)},a=function(t,e){for(var r=s(t,e),o=[],a=0;a<r.length;a+=1){var c=r[a],u=c.type,l=c.value,f=n[u];f>=0&&(o[f]=parseInt(l,10))}var h=o[3],d=24===h?0:h,p=o[0]+"-"+o[1]+"-"+o[2]+" "+d+":"+o[4]+":"+o[5]+":000",m=+t;return(i.utc(p).valueOf()-(m-=m%1e3))/6e4},c=e.prototype;c.tz=function(t,e){void 0===t&&(t=o);var n=this.utcOffset(),r=this.toDate(),s=r.toLocaleString("en-US",{timeZone:t}),a=Math.round((r-new Date(s))/1e3/60),c=i(s).$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||i.tz.guess(),n=s(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=i(this.format("YYYY-MM-DD HH:mm:ss:SSS"));return u.call(n,t,e).tz(this.$x.$timezone,!0)},i.tz=function(t,e,n){var r=n&&e,s=n||e||o,c=a(+i(),s);if("string"!=typeof t)return i(t).tz(s);var u=function(t,e,n){var r=t-60*e*1e3,i=a(r,n);if(e===i)return[r,e];var o=a(r-=60*(i-e)*1e3,n);return i===o?[r,i]:[t-60*Math.min(i,o)*1e3,Math.max(i,o)]}(i.utc(t,r).valueOf(),c,s),l=u[0],f=u[1],h=i(l).utcOffset(f);return h.$x.$timezone=s,h},i.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},i.tz.setDefault=function(t){o=t}})}(k);var C=k.exports,N={exports:{}};!function(t,e){var n,r,i;t.exports=(n="minute",r=/[+-]\d\d(?::?\d\d)?/g,i=/([+-]|\d\d)/g,function(t,e,o){var s=e.prototype;o.utc=function(t){return new e({date:t,utc:!0,args:arguments})},s.utc=function(t){var e=o(this.toDate(),{locale:this.$L,utc:!0});return t?e.add(this.utcOffset(),n):e},s.local=function(){return o(this.toDate(),{locale:this.$L,utc:!1})};var a=s.parse;s.parse=function(t){t.utc&&(this.$u=!0),this.$utils().u(t.$offset)||(this.$offset=t.$offset),a.call(this,t)};var c=s.init;s.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=s.utcOffset;s.utcOffset=function(t,e){var o=this.$utils().u;if(o(t))return this.$u?0:o(this.$offset)?u.call(this):this.$offset;if("string"==typeof t&&null===(t=function(t){void 0===t&&(t="");var e=t.match(r);if(!e)return null;var n=(""+e[0]).match(i)||["-",0,0],o=n[0],s=60*+n[1]+ +n[2];return 0===s?0:"+"===o?s:-s}(t)))return this;var s=Math.abs(t)<=16?60*t:t,a=this;if(e)return a.$offset=s,a.$u=0===t,a;if(0!==t){var c=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(a=this.local().add(s+c,n)).$offset=s,a.$x.$localOffset=c}else a=this.utc();return a};var l=s.format;s.format=function(t){var e=t||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return l.call(this,e)},s.valueOf=function(){var t=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*t},s.isUTC=function(){return!!this.$u},s.toISOString=function(){return this.toDate().toISOString()},s.toString=function(){return this.toDate().toUTCString()};var f=s.toDate;s.toDate=function(t){return"s"===t&&this.$offset?o(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():f.call(this)};var h=s.diff;s.diff=function(t,e,n){if(t&&this.$u===t.$u)return h.call(this,t,e,n);var r=this.local(),i=o(t).local();return h.call(r,i,e,n)}})}(N);var P=N.exports;A.$defaultFormat=function(t){return A.utc(t).format("YYYY-MM-DD HH:mm:ss")},A.$prettyPrint=function(t){return A(t).format("h:mma dddd MMM DD, YYYY")};A.extend(z),A.extend(C),A.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}})),A.extend(P);const U=A;function L(t,e){return function(){return t.apply(e,arguments)}}const{toString:B}=Object.prototype,{getPrototypeOf:q}=Object,I=(H=Object.create(null),t=>{const e=B.call(t);return H[e]||(H[e]=e.slice(8,-1).toLowerCase())});var H;const Y=t=>(t=t.toLowerCase(),e=>I(e)===t),V=t=>e=>typeof e===t,{isArray:J}=Array,W=V("undefined");const Z=Y("ArrayBuffer");const K=V("string"),Q=V("function"),X=V("number"),G=t=>null!==t&&"object"==typeof t,tt=t=>{if("object"!==I(t))return!1;const e=q(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"),it=Y("FileList"),ot=Y("URLSearchParams");function st(t,e,{allOwnKeys:n=!1}={}){if(null==t)return;let r,i;if("object"!=typeof t&&(t=[t]),J(t))for(r=0,i=t.length;r<i;r++)e.call(null,t[r],r,t);else{const i=n?Object.getOwnPropertyNames(t):Object.keys(t),o=i.length;let s;for(r=0;r<o;r++)s=i[r],e.call(null,t[s],s,t)}}const at=(ct="undefined"!=typeof Uint8Array&&q(Uint8Array),t=>ct&&t instanceof ct);var ct;const ut=Y("HTMLFormElement"),lt=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),ft=Y("RegExp"),ht=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),r={};st(n,((n,i)=>{!1!==e(n,i,t)&&(r[i]=n)})),Object.defineProperties(t,r)};var dt={isArray:J,isArrayBuffer:Z,isBuffer:function(t){return null!==t&&!W(t)&&null!==t.constructor&&!W(t.constructor)&&Q(t.constructor.isBuffer)&&t.constructor.isBuffer(t)},isFormData:t=>{const e="[object FormData]";return t&&("function"==typeof FormData&&t instanceof FormData||B.call(t)===e||Q(t.toString)&&t.toString()===e)},isArrayBufferView:function(t){let e;return e="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&Z(t.buffer),e},isString:K,isNumber:X,isBoolean:t=>!0===t||!1===t,isObject:G,isPlainObject:tt,isUndefined:W,isDate:et,isFile:nt,isBlob:rt,isRegExp:ft,isFunction:Q,isStream:t=>G(t)&&Q(t.pipe),isURLSearchParams:ot,isTypedArray:at,isFileList:it,forEach:st,merge:function t(){const e={},n=(n,r)=>{tt(e[r])&&tt(n)?e[r]=t(e[r],n):tt(n)?e[r]=t({},n):J(n)?e[r]=n.slice():e[r]=n};for(let r=0,i=arguments.length;r<i;r++)arguments[r]&&st(arguments[r],n);return e},extend:(t,e,n,{allOwnKeys:r}={})=>(st(e,((e,r)=>{n&&Q(e)?t[r]=L(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 i,o,s;const a={};if(e=e||{},null==t)return e;do{for(i=Object.getOwnPropertyNames(t),o=i.length;o-- >0;)s=i[o],r&&!r(s,t,e)||a[s]||(e[s]=t[s],a[s]=!0);t=!1!==n&&q(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},kindOf:I,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(!X(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:ut,hasOwnProperty:lt,hasOwnProp:lt,reduceDescriptors:ht,freezeMethods:t=>{ht(t,((e,n)=>{const r=t[n];Q(r)&&(e.enumerable=!1,"writable"in e?e.writable=!1:e.set||(e.set=()=>{throw Error("Can not 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)=>(t=+t,Number.isFinite(t)?t:e)};function pt(t,e,n,r,i){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),i&&(this.response=i)}dt.inherits(pt,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:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const mt=pt.prototype,gt={};["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=>{gt[t]={value:t}})),Object.defineProperties(pt,gt),Object.defineProperty(mt,"isAxiosError",{value:!0}),pt.from=(t,e,n,r,i,o)=>{const s=Object.create(mt);return dt.toFlatObject(t,s,(function(t){return t!==Error.prototype}),(t=>"isAxiosError"!==t)),pt.call(s,t.message,e,n,r,i),s.cause=t,s.name=t.name,o&&Object.assign(s,o),s};var yt="object"==typeof self?self.FormData:window.FormData;function _t(t){return dt.isPlainObject(t)||dt.isArray(t)}function bt(t){return dt.endsWith(t,"[]")?t.slice(0,-2):t}function wt(t,e,n){return t?t.concat(e).map((function(t,e){return t=bt(t),!n&&e?"["+t+"]":t})).join(n?".":""):e}const vt=dt.toFlatObject(dt,{},null,(function(t){return/^is[A-Z]/.test(t)}));function Ot(t,e,n){if(!dt.isObject(t))throw new TypeError("target must be an object");e=e||new(yt||FormData);const r=(n=dt.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(t,e){return!dt.isUndefined(e[t])}))).metaTokens,i=n.visitor||l,o=n.dots,s=n.indexes,a=(n.Blob||"undefined"!=typeof Blob&&Blob)&&((c=e)&&dt.isFunction(c.append)&&"FormData"===c[Symbol.toStringTag]&&c[Symbol.iterator]);var c;if(!dt.isFunction(i))throw new TypeError("visitor must be a function");function u(t){if(null===t)return"";if(dt.isDate(t))return t.toISOString();if(!a&&dt.isBlob(t))throw new pt("Blob is not supported. Use a Buffer instead.");return dt.isArrayBuffer(t)||dt.isTypedArray(t)?a&&"function"==typeof Blob?new Blob([t]):Buffer.from(t):t}function l(t,n,i){let a=t;if(t&&!i&&"object"==typeof t)if(dt.endsWith(n,"{}"))n=r?n:n.slice(0,-2),t=JSON.stringify(t);else if(dt.isArray(t)&&function(t){return dt.isArray(t)&&!t.some(_t)}(t)||dt.isFileList(t)||dt.endsWith(n,"[]")&&(a=dt.toArray(t)))return n=bt(n),a.forEach((function(t,r){!dt.isUndefined(t)&&null!==t&&e.append(!0===s?wt([n],r,o):null===s?n:n+"[]",u(t))})),!1;return!!_t(t)||(e.append(wt(i,n,o),u(t)),!1)}const f=[],h=Object.assign(vt,{defaultVisitor:l,convertValue:u,isVisitable:_t});if(!dt.isObject(t))throw new TypeError("data must be an object");return function t(n,r){if(!dt.isUndefined(n)){if(-1!==f.indexOf(n))throw Error("Circular reference detected in "+r.join("."));f.push(n),dt.forEach(n,(function(n,o){!0===(!(dt.isUndefined(n)||null===n)&&i.call(e,n,dt.isString(o)?o.trim():o,r,h))&&t(n,r?r.concat(o):[o])})),f.pop()}}(t),e}function $t(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,(function(t){return e[t]}))}function Et(t,e){this._pairs=[],t&&Ot(t,this,e)}const St=Et.prototype;function xt(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Mt(t,e,n){if(!e)return t;const r=n&&n.encode||xt,i=n&&n.serialize;let o;if(o=i?i(e,n):dt.isURLSearchParams(e)?e.toString():new Et(e,n).toString(r),o){const e=t.indexOf("#");-1!==e&&(t=t.slice(0,e)),t+=(-1===t.indexOf("?")?"?":"&")+o}return t}St.append=function(t,e){this._pairs.push([t,e])},St.toString=function(t){const e=t?function(e){return t.call(this,e,$t)}:$t;return this._pairs.map((function(t){return e(t[0])+"="+e(t[1])}),"").join("&")};class Dt{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){dt.forEach(this.handlers,(function(e){null!==e&&t(e)}))}}var jt={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Tt="undefined"!=typeof URLSearchParams?URLSearchParams:Et,Rt=FormData;const At=(()=>{let t;return("undefined"==typeof navigator||"ReactNative"!==(t=navigator.product)&&"NativeScript"!==t&&"NS"!==t)&&("undefined"!=typeof window&&"undefined"!=typeof document)})();var Ft={isBrowser:!0,classes:{URLSearchParams:Tt,FormData:Rt,Blob:Blob},isStandardBrowserEnv:At,protocols:["http","https","file","blob","url","data"]};function zt(t){function e(t,n,r,i){let o=t[i++];const s=Number.isFinite(+o),a=i>=t.length;if(o=!o&&dt.isArray(r)?r.length:o,a)return dt.hasOwnProp(r,o)?r[o]=[r[o],n]:r[o]=n,!s;r[o]&&dt.isObject(r[o])||(r[o]=[]);return e(t,n,r[o],i)&&dt.isArray(r[o])&&(r[o]=function(t){const e={},n=Object.keys(t);let r;const i=n.length;let o;for(r=0;r<i;r++)o=n[r],e[o]=t[o];return e}(r[o])),!s}if(dt.isFormData(t)&&dt.isFunction(t.entries)){const n={};return dt.forEachEntry(t,((t,r)=>{e(function(t){return dt.matchAll(/\w+|\[(\w*)]/g,t).map((t=>"[]"===t[0]?"":t[1]||t[0]))}(t),r,n,0)})),n}return null}var kt=Ft.isStandardBrowserEnv?{write:function(t,e,n,r,i,o){const s=[];s.push(t+"="+encodeURIComponent(e)),dt.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),dt.isString(r)&&s.push("path="+r),dt.isString(i)&&s.push("domain="+i),!0===o&&s.push("secure"),document.cookie=s.join("; ")},read:function(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove:function(t){this.write(t,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}};function Ct(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}var Nt=Ft.isStandardBrowserEnv?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=dt.isString(t)?r(t):t;return e.protocol===n.protocol&&e.host===n.host}}():function(){return!0};function Pt(t,e,n){pt.call(this,null==t?"canceled":t,pt.ERR_CANCELED,e,n),this.name="CanceledError"}dt.inherits(Pt,pt,{__CANCEL__:!0});const Ut=dt.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 Lt=Symbol("internals"),Bt=Symbol("defaults");function qt(t){return t&&String(t).trim().toLowerCase()}function It(t){return!1===t||null==t?t:dt.isArray(t)?t.map(It):String(t)}function Ht(t,e,n,r){return dt.isFunction(r)?r.call(this,e,n):dt.isString(e)?dt.isString(r)?-1!==e.indexOf(r):dt.isRegExp(r)?r.test(e):void 0:void 0}function Yt(t,e){e=e.toLowerCase();const n=Object.keys(t);let r,i=n.length;for(;i-- >0;)if(r=n[i],e===r.toLowerCase())return r;return null}function Vt(t,e){t&&this.set(t),this[Bt]=e||null}function Jt(t,e){let n=0;const r=function(t,e){t=t||10;const n=new Array(t),r=new Array(t);let i,o=0,s=0;return e=void 0!==e?e:1e3,function(a){const c=Date.now(),u=r[s];i||(i=c),n[o]=a,r[o]=c;let l=s,f=0;for(;l!==o;)f+=n[l++],l%=t;if(o=(o+1)%t,o===s&&(s=(s+1)%t),c-i<e)return;const h=u&&c-u;return h?Math.round(1e3*f/h):void 0}}(50,250);return i=>{const o=i.loaded,s=i.lengthComputable?i.total:void 0,a=o-n,c=r(a);n=o;const u={loaded:o,total:s,progress:s?o/s:void 0,bytes:a,rate:c||void 0,estimated:c&&s&&o<=s?(s-o)/c:void 0};u[e?"download":"upload"]=!0,t(u)}}function Wt(t){return new Promise((function(e,n){let r=t.data;const i=Vt.from(t.headers).normalize(),o=t.responseType;let s;function a(){t.cancelToken&&t.cancelToken.unsubscribe(s),t.signal&&t.signal.removeEventListener("abort",s)}dt.isFormData(r)&&Ft.isStandardBrowserEnv&&i.setContentType(!1);let c=new XMLHttpRequest;if(t.auth){const e=t.auth.username||"",n=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";i.set("Authorization","Basic "+btoa(e+":"+n))}const u=Ct(t.baseURL,t.url);function l(){if(!c)return;const r=Vt.from("getAllResponseHeaders"in c&&c.getAllResponseHeaders());!function(t,e,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?e(new pt("Request failed with status code "+n.status,[pt.ERR_BAD_REQUEST,pt.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):t(n)}((function(t){e(t),a()}),(function(t){n(t),a()}),{data:o&&"text"!==o&&"json"!==o?c.response:c.responseText,status:c.status,statusText:c.statusText,headers:r,config:t,request:c}),c=null}if(c.open(t.method.toUpperCase(),Mt(u,t.params,t.paramsSerializer),!0),c.timeout=t.timeout,"onloadend"in c?c.onloadend=l:c.onreadystatechange=function(){c&&4===c.readyState&&(0!==c.status||c.responseURL&&0===c.responseURL.indexOf("file:"))&&setTimeout(l)},c.onabort=function(){c&&(n(new pt("Request aborted",pt.ECONNABORTED,t,c)),c=null)},c.onerror=function(){n(new pt("Network Error",pt.ERR_NETWORK,t,c)),c=null},c.ontimeout=function(){let e=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded";const r=t.transitional||jt;t.timeoutErrorMessage&&(e=t.timeoutErrorMessage),n(new pt(e,r.clarifyTimeoutError?pt.ETIMEDOUT:pt.ECONNABORTED,t,c)),c=null},Ft.isStandardBrowserEnv){const e=(t.withCredentials||Nt(u))&&t.xsrfCookieName&&kt.read(t.xsrfCookieName);e&&i.set(t.xsrfHeaderName,e)}void 0===r&&i.setContentType(null),"setRequestHeader"in c&&dt.forEach(i.toJSON(),(function(t,e){c.setRequestHeader(e,t)})),dt.isUndefined(t.withCredentials)||(c.withCredentials=!!t.withCredentials),o&&"json"!==o&&(c.responseType=t.responseType),"function"==typeof t.onDownloadProgress&&c.addEventListener("progress",Jt(t.onDownloadProgress,!0)),"function"==typeof t.onUploadProgress&&c.upload&&c.upload.addEventListener("progress",Jt(t.onUploadProgress)),(t.cancelToken||t.signal)&&(s=e=>{c&&(n(!e||e.type?new Pt(null,t,c):e),c.abort(),c=null)},t.cancelToken&&t.cancelToken.subscribe(s),t.signal&&(t.signal.aborted?s():t.signal.addEventListener("abort",s)));const f=function(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}(u);f&&-1===Ft.protocols.indexOf(f)?n(new pt("Unsupported protocol "+f+":",pt.ERR_BAD_REQUEST,t)):c.send(r||null)}))}Object.assign(Vt.prototype,{set:function(t,e,n){const r=this;function i(t,e,n){const i=qt(e);if(!i)throw new Error("header name must be a non-empty string");const o=Yt(r,i);(!o||!0===n||!1!==r[o]&&!1!==n)&&(r[o||e]=It(t))}return dt.isPlainObject(t)?dt.forEach(t,((t,n)=>{i(t,n,e)})):i(e,t,n),this},get:function(t,e){if(!(t=qt(t)))return;const n=Yt(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(dt.isFunction(e))return e.call(this,t,n);if(dt.isRegExp(e))return e.exec(t);throw new TypeError("parser must be boolean|regexp|function")}},has:function(t,e){if(t=qt(t)){const n=Yt(this,t);return!(!n||e&&!Ht(0,this[n],n,e))}return!1},delete:function(t,e){const n=this;let r=!1;function i(t){if(t=qt(t)){const i=Yt(n,t);!i||e&&!Ht(0,n[i],i,e)||(delete n[i],r=!0)}}return dt.isArray(t)?t.forEach(i):i(t),r},clear:function(){return Object.keys(this).forEach(this.delete.bind(this))},normalize:function(t){const e=this,n={};return dt.forEach(this,((r,i)=>{const o=Yt(n,i);if(o)return e[o]=It(r),void delete e[i];const s=t?function(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((t,e,n)=>e.toUpperCase()+n))}(i):String(i).trim();s!==i&&delete e[i],e[s]=It(r),n[s]=!0})),this},toJSON:function(t){const e=Object.create(null);return dt.forEach(Object.assign({},this[Bt]||null,this),((n,r)=>{null!=n&&!1!==n&&(e[r]=t&&dt.isArray(n)?n.join(", "):n)})),e}}),Object.assign(Vt,{from:function(t){return dt.isString(t)?new this((t=>{const e={};let n,r,i;return t&&t.split("\n").forEach((function(t){i=t.indexOf(":"),n=t.substring(0,i).trim().toLowerCase(),r=t.substring(i+1).trim(),!n||e[n]&&Ut[n]||("set-cookie"===n?e[n]?e[n].push(r):e[n]=[r]:e[n]=e[n]?e[n]+", "+r:r)})),e})(t)):t instanceof this?t:new this(t)},accessor:function(t){const e=(this[Lt]=this[Lt]={accessors:{}}).accessors,n=this.prototype;function r(t){const r=qt(t);e[r]||(!function(t,e){const n=dt.toCamelCase(" "+e);["get","set","has"].forEach((r=>{Object.defineProperty(t,r+n,{value:function(t,n,i){return this[r].call(this,e,t,n,i)},configurable:!0})}))}(n,t),e[r]=!0)}return dt.isArray(t)?t.forEach(r):r(t),this}}),Vt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent"]),dt.freezeMethods(Vt.prototype),dt.freezeMethods(Vt);const Zt={http:Wt,xhr:Wt};var Kt=t=>{if(dt.isString(t)){const e=Zt[t];if(!t)throw Error(dt.hasOwnProp(t)?`Adapter '${t}' is not available in the build`:`Can not resolve adapter '${t}'`);return e}if(!dt.isFunction(t))throw new TypeError("adapter is not a function");return t};const Qt={"Content-Type":"application/x-www-form-urlencoded"};const Xt={transitional:jt,adapter:function(){let t;return"undefined"!=typeof XMLHttpRequest?t=Kt("xhr"):"undefined"!=typeof process&&"process"===dt.kindOf(process)&&(t=Kt("http")),t}(),transformRequest:[function(t,e){const n=e.getContentType()||"",r=n.indexOf("application/json")>-1,i=dt.isObject(t);i&&dt.isHTMLForm(t)&&(t=new FormData(t));if(dt.isFormData(t))return r&&r?JSON.stringify(zt(t)):t;if(dt.isArrayBuffer(t)||dt.isBuffer(t)||dt.isStream(t)||dt.isFile(t)||dt.isBlob(t))return t;if(dt.isArrayBufferView(t))return t.buffer;if(dt.isURLSearchParams(t))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let o;if(i){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(t,e){return Ot(t,new Ft.classes.URLSearchParams,Object.assign({visitor:function(t,e,n,r){return Ft.isNode&&dt.isBuffer(t)?(this.append(e,t.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},e))}(t,this.formSerializer).toString();if((o=dt.isFileList(t))||n.indexOf("multipart/form-data")>-1){const e=this.env&&this.env.FormData;return Ot(o?{"files[]":t}:t,e&&new e,this.formSerializer)}}return i||r?(e.setContentType("application/json",!1),function(t,e,n){if(dt.isString(t))try{return(e||JSON.parse)(t),dt.trim(t)}catch(r){if("SyntaxError"!==r.name)throw r}return(n||JSON.stringify)(t)}(t)):t}],transformResponse:[function(t){const e=this.transitional||Xt.transitional,n=e&&e.forcedJSONParsing,r="json"===this.responseType;if(t&&dt.isString(t)&&(n&&!this.responseType||r)){const n=!(e&&e.silentJSONParsing)&&r;try{return JSON.parse(t)}catch(i){if(n){if("SyntaxError"===i.name)throw pt.from(i,pt.ERR_BAD_RESPONSE,this,null,this.response);throw i}}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Ft.classes.FormData,Blob:Ft.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};function Gt(t,e){const n=this||Xt,r=e||n,i=Vt.from(r.headers);let o=r.data;return dt.forEach(t,(function(t){o=t.call(n,o,i.normalize(),e?e.status:void 0)})),i.normalize(),o}function te(t){return!(!t||!t.__CANCEL__)}function ee(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new Pt}function ne(t){ee(t),t.headers=Vt.from(t.headers),t.data=Gt.call(t,t.transformRequest);return(t.adapter||Xt.adapter)(t).then((function(e){return ee(t),e.data=Gt.call(t,t.transformResponse,e),e.headers=Vt.from(e.headers),e}),(function(e){return te(e)||(ee(t),e&&e.response&&(e.response.data=Gt.call(t,t.transformResponse,e.response),e.response.headers=Vt.from(e.response.headers))),Promise.reject(e)}))}function re(t,e){e=e||{};const n={};function r(t,e){return dt.isPlainObject(t)&&dt.isPlainObject(e)?dt.merge(t,e):dt.isPlainObject(e)?dt.merge({},e):dt.isArray(e)?e.slice():e}function i(n){return dt.isUndefined(e[n])?dt.isUndefined(t[n])?void 0:r(void 0,t[n]):r(t[n],e[n])}function o(t){if(!dt.isUndefined(e[t]))return r(void 0,e[t])}function s(n){return dt.isUndefined(e[n])?dt.isUndefined(t[n])?void 0:r(void 0,t[n]):r(void 0,e[n])}function a(n){return n in e?r(t[n],e[n]):n in t?r(void 0,t[n]):void 0}const c={url:o,method:o,data:o,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a};return dt.forEach(Object.keys(t).concat(Object.keys(e)),(function(t){const e=c[t]||i,r=e(t);dt.isUndefined(r)&&e!==a||(n[t]=r)})),n}dt.forEach(["delete","get","head"],(function(t){Xt.headers[t]={}})),dt.forEach(["post","put","patch"],(function(t){Xt.headers[t]=dt.merge(Qt)}));const ie="1.1.3",oe={};["object","boolean","number","function","string","symbol"].forEach(((t,e)=>{oe[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}}));const se={};oe.transitional=function(t,e,n){function r(t,e){return"[Axios v1.1.3] Transitional option '"+t+"'"+e+(n?". "+n:"")}return(n,i,o)=>{if(!1===t)throw new pt(r(i," has been removed"+(e?" in "+e:"")),pt.ERR_DEPRECATED);return e&&!se[i]&&(se[i]=!0,console.warn(r(i," has been deprecated since v"+e+" and will be removed in the near future"))),!t||t(n,i,o)}};var ae={assertOptions:function(t,e,n){if("object"!=typeof t)throw new pt("options must be an object",pt.ERR_BAD_OPTION_VALUE);const r=Object.keys(t);let i=r.length;for(;i-- >0;){const o=r[i],s=e[o];if(s){const e=t[o],n=void 0===e||s(e,o,t);if(!0!==n)throw new pt("option "+o+" must be "+n,pt.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new pt("Unknown option "+o,pt.ERR_BAD_OPTION)}},validators:oe};const ce=ae.validators;class ue{constructor(t){this.defaults=t,this.interceptors={request:new Dt,response:new Dt}}request(t,e){"string"==typeof t?(e=e||{}).url=t:e=t||{},e=re(this.defaults,e);const{transitional:n,paramsSerializer:r}=e;void 0!==n&&ae.assertOptions(n,{silentJSONParsing:ce.transitional(ce.boolean),forcedJSONParsing:ce.transitional(ce.boolean),clarifyTimeoutError:ce.transitional(ce.boolean)},!1),void 0!==r&&ae.assertOptions(r,{encode:ce.function,serialize:ce.function},!0),e.method=(e.method||this.defaults.method||"get").toLowerCase();const i=e.headers&&dt.merge(e.headers.common,e.headers[e.method]);i&&dt.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),e.headers=new Vt(e.headers,i);const o=[];let s=!0;this.interceptors.request.forEach((function(t){"function"==typeof t.runWhen&&!1===t.runWhen(e)||(s=s&&t.synchronous,o.unshift(t.fulfilled,t.rejected))}));const a=[];let c;this.interceptors.response.forEach((function(t){a.push(t.fulfilled,t.rejected)}));let u,l=0;if(!s){const t=[ne.bind(this),void 0];for(t.unshift.apply(t,o),t.push.apply(t,a),u=t.length,c=Promise.resolve(e);l<u;)c=c.then(t[l++],t[l++]);return c}u=o.length;let f=e;for(l=0;l<u;){const t=o[l++],e=o[l++];try{f=t(f)}catch(h){e.call(this,h);break}}try{c=ne.call(this,f)}catch(h){return Promise.reject(h)}for(l=0,u=a.length;l<u;)c=c.then(a[l++],a[l++]);return c}getUri(t){return Mt(Ct((t=re(this.defaults,t)).baseURL,t.url),t.params,t.paramsSerializer)}}dt.forEach(["delete","get","head","options"],(function(t){ue.prototype[t]=function(e,n){return this.request(re(n||{},{method:t,url:e,data:(n||{}).data}))}})),dt.forEach(["post","put","patch"],(function(t){function e(e){return function(n,r,i){return this.request(re(i||{},{method:t,headers:e?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}ue.prototype[t]=e(),ue.prototype[t+"Form"]=e(!0)}));class le{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,i){n.reason||(n.reason=new Pt(t,r,i),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 le((function(e){t=e})),cancel:t}}}const fe=function t(e){const n=new ue(e),r=L(ue.prototype.request,n);return dt.extend(r,ue.prototype,n,{allOwnKeys:!0}),dt.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return t(re(e,n))},r}(Xt);fe.Axios=ue,fe.CanceledError=Pt,fe.CancelToken=le,fe.isCancel=te,fe.VERSION=ie,fe.toFormData=Ot,fe.AxiosError=pt,fe.Cancel=fe.CanceledError,fe.all=function(t){return Promise.all(t)},fe.spread=function(t){return function(e){return t.apply(null,e)}},fe.isAxiosError=function(t){return dt.isObject(t)&&!0===t.isAxiosError},fe.formToJSON=t=>zt(dt.isHTMLForm(t)?new FormData(t):t);const he="leach"!=={VITE_MAPTILER_KEY:"1ZwL7YJSSN42A678HHPn",VITE_NREL_KEY:"BThVJdnwHbO8hDpQkBdeqsUoeXhQuMgMRgO3hvyo",VITE_OPENWEATHERMAP_KEY:"09b21cd89a07eaa465d3d9c2b2a6d0c3",BASE_URL:"/static/widget/",MODE:"production",DEV:!1,PROD:!0}.VITE_REQUEST_MODE?"/api/1.0/":"https://www.sjvair.com/api/1.0/",de=fe.create({baseURL:he});class pe{constructor(t){__publicField(this,"data"),__publicField(this,"dataFields"),__publicField(this,"displayField"),__publicField(this,"lastUpdated"),__publicField(this,"markerParams"),__publicField(this,"monitorFields"),this.data=t,this.markerParams=function(t){const e=`#${_}`,n={border_color:y(m(e,.1)),border_size:1,fill_color:e,value_color:e,size:8,shape:"square"};switch(t.device){case"AirNow":case"BAM1022":n.shape="triangle";break;case"PurpleAir":t.is_sjvair&&(n.shape="circle");break;default:console.error(`Unknown device type for monitor ${t.id}`),n.shape="diamond"}if(t.latest){const e=x(+t.latest.pm25_avg_15,D.levels);if(n.value_color=e,t.is_active)switch(n.fill_color=x(+t.latest.pm25_avg_15,D.levels),n.border_color=y(m(n.fill_color,.1)),t.device){case"AirNow":case"BAM1022":n.size=14;break;case"PurpleAir":t.is_sjvair?n.size=16:n.size=10}"inside"===t.location&&(n.border_color=`#${b}`,n.border_size=2)}return n}(t),this.monitorFields=j(t),this.dataFields=Object.keys(this.monitorFields),this.displayField=this.monitorFields.pm25_avg_15,this.lastUpdated=t.latest&&Object.keys(t.latest).length>1?U(t.latest.timestamp).fromNow():"never"}}var me=Object.freeze({__proto__:null,fetchMonitors:async function(){return de.get("/monitors").then((t=>{const e={};for(let n of t.data.data)n.position.coordinates[1]>42||(e[n.id]=new pe(n));return e}))},fetchEntries:async function t(e,n,r=1){const i=[],o={fields:e.dataFields.join(","),page:r,timestamp__gte:U.$defaultFormat(n.start),timestamp__lte:U.$defaultFormat(n.end)};return de.get(`monitors/${e.data.id}/entries/`,{params:o}).then((async o=>{const s=o.data;if(s.data.length&&(i.push(...s.data),s.has_next_page)){const o=await t(e,n,++r).catch((t=>{throw t}));o.length&&i.push(...o)}return i}))},fetchSubscriptions:async function(){return de.get("alerts/subscriptions").then((t=>t.data.data))},fetchTempByCoords:async function(t){const e=`https://api.weather.gov/points/${t.join(",")}`;return await de(e).then((async t=>{try{return(await de(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:i}=e.data;this.serviceModule[r];const o=new t(n);r in this.serviceModule?await this.serviceModule[r](...i).then((t=>o.pass(t))).catch((t=>o.fail(t.message))):o.fail(`Background task "${String(r)}" not found in "${this.serviceModuleName}" controller`),self.postMessage(o)}))}}("MonitorsService",me)}();
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),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 i(t){if("string"!=typeof t)throw new r(t);if("transparent"===t.trim().toLowerCase())return[0,0,0,0];let n=t.trim();n=h.test(t)?function(t){const e=t.toLowerCase().trim(),n=s[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 i=c.exec(n);if(i){const t=Array.from(i).slice(1);return[...t.slice(0,3).map((t=>parseInt(a(t,2),16))),parseInt(a(t[3]||"f",2),16)/255]}const o=u.exec(n);if(o){const t=Array.from(o).slice(1);return[...t.slice(0,3).map((t=>parseInt(t,16))),parseInt(t[3]||"ff",16)/255]}const d=l.exec(n);if(d){const t=Array.from(d).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,i,o,s]=Array.from(m).slice(1).map(parseFloat);if(e(0,100,i)!==i)throw new r(t);if(e(0,100,o)!==o)throw new r(t);return[...p(n,i,o),s||1]}throw new r(t)}const o=t=>parseInt(t.replace(/_/g,""),36),s="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=o(e.substring(0,3)),r=o(e.substring(3)).toString(16);let i="";for(let o=0;o<6-r.length;o++)i+="0";return t[n]=`${i}${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,h=/^[a-z]+$/i,d=t=>Math.round(255*t),p=(t,e,n)=>{let r=n/100;if(0===e)return[r,r,r].map(d);const i=(t%360+360)%360/60,o=(1-Math.abs(2*r-1))*(e/100),s=o*(1-Math.abs(i%2-1));let a=0,c=0,u=0;i>=0&&i<1?(a=o,c=s):i>=1&&i<2?(a=s,c=o):i>=2&&i<3?(c=o,u=s):i>=3&&i<4?(c=s,u=o):i>=4&&i<5?(a=s,u=o):i>=5&&i<6&&(a=o,u=s);const l=r-o/2;return[a+l,c+l,u+l].map(d)};function m(t,n){const[r,o,s,a]=function(t){const[e,n,r,o]=i(t).map(((t,e)=>3===e?t:t/255)),s=Math.max(e,n,r),a=Math.min(e,n,r),c=(s+a)/2;if(s===a)return[0,0,c,o];const u=s-a;return[60*(e===s?(n-r)/u+(n<r?6:0):n===s?(r-e)/u+2:(e-n)/u+4),c>.5?u/(2-s-a):u/(s+a),c,o]}(t);return function(t,n,r,i){return`hsla(${(t%360).toFixed()}, ${e(0,100,100*n).toFixed()}%, ${e(0,100,100*r).toFixed()}%, ${parseFloat(e(0,1,i).toFixed(3))})`}(r,o,s-n,a)}function g(t,n,r){const o=(t,e)=>3===e?t:t/255,[s,a,c,u]=i(t).map(o),[l,f,h,d]=i(n).map(o),p=d-u,m=2*r-1,g=((m*p==-1?m:m+p/(1+m*p))+1)/2,y=1-g;return _=255*(a*y+f*g),b=255*(c*y+h*g),w=d*r+u*(1-r),`rgba(${e(0,255,255*(s*y+l*g)).toFixed()}, ${e(0,255,_).toFixed()}, ${e(0,255,b).toFixed()}, ${parseFloat(e(0,1,w).toFixed(3))})`;var _,b,w}function y(t){const[n,r,o,s]=i(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(o)}${s<1?a(Math.round(255*s)):""}`}const _="969696",b="000000",w="00e400",v="ffff00",O="ff7e00",$="ff0000",E="8f3f97",S="7e0023";function x(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],i=e[r],o=n.min===-1/0?i.min:i.min-n.min,s=(o-(i.min-t))/o;return g(`#${n.color}`,`#${i.color}`,s)}return"#FFFFFF"}const M=class{constructor(t,e,n,r){__publicField(this,"label"),__publicField(this,"latest"),__publicField(this,"levels",M.levels),__publicField(this,"name"),__publicField(this,"updateDuration"),this.label=e,this.name=t,this.updateDuration=n,r.latest&&this.name in r.latest&&(this.latest=Math.round(parseFloat(r.latest[this.name])))}};let D=M;function j(t){switch(t.device){case"AirNow":return function(t){return T(["pm25","PM 2.5","60m",t],["pm100","PM 10","60M",t])}(t);case"BAM1022":return function(t){return T(["pm25","PM 2.5","60m",t])}(t);case"PurpleAir":return function(t){return T(["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 T(...t){const e={};for(let n of t)e[n[0]]=new D(...n);return e}__publicField(D,"levels",[{min:-1/0,color:w},{min:12,color:v},{min:35,color:O},{min:55,color:$},{min:150,color:E},{min:250,color:S}]);"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;var R={exports:{}};R.exports=function(){var t=1e3,e=6e4,n=36e5,r="millisecond",i="second",o="minute",s="hour",a="day",c="week",u="month",l="quarter",f="year",h="date",d="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,g={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("_")},y=function(t,e,n){var r=String(t);return!r||r.length>=e?t:""+Array(e+1-r.length).join(n)+t},_={s:y,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),i=n%60;return(e<=0?"+":"-")+y(r,2,"0")+":"+y(i,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()),i=e.clone().add(r,u),o=n-i<0,s=e.clone().add(r+(o?-1:1),u);return+(-(r+(n-i)/(o?i-s:s-i))||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:h,h:s,m:o,s:i,ms:r,Q:l}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},b="en",w={};w[b]=g;var v=function(t){return t instanceof S},O=function t(e,n,r){var i;if(!e)return b;if("string"==typeof e){var o=e.toLowerCase();w[o]&&(i=o),n&&(w[o]=n,i=o);var s=e.split("-");if(!i&&s.length>1)return t(s[0])}else{var a=e.name;w[a]=e,i=a}return!r&&i&&(b=i),i||!r&&b},$=function(t,e){if(v(t))return t.clone();var n="object"==typeof e?e:{};return n.date=t,n.args=arguments,new S(n)},E=_;E.l=O,E.i=v,E.w=function(t,e){return $(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var S=function(){function g(t){this.$L=O(t.locale,null,!0),this.parse(t)}var y=g.prototype;return y.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 i=r[2]-1||0,o=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,o)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,o)}}return new Date(e)}(t),this.$x=t.x||{},this.init()},y.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()},y.$utils=function(){return E},y.isValid=function(){return!(this.$d.toString()===d)},y.isSame=function(t,e){var n=$(t);return this.startOf(e)<=n&&n<=this.endOf(e)},y.isAfter=function(t,e){return $(t)<this.startOf(e)},y.isBefore=function(t,e){return this.endOf(e)<$(t)},y.$g=function(t,e,n){return E.u(t)?this[e]:this.set(n,t)},y.unix=function(){return Math.floor(this.valueOf()/1e3)},y.valueOf=function(){return this.$d.getTime()},y.startOf=function(t,e){var n=this,r=!!E.u(e)||e,l=E.p(t),d=function(t,e){var i=E.w(n.$u?Date.UTC(n.$y,e,t):new Date(n.$y,e,t),n);return r?i:i.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,g=this.$M,y=this.$D,_="set"+(this.$u?"UTC":"");switch(l){case f:return r?d(1,0):d(31,11);case u:return r?d(1,g):d(0,g+1);case c:var b=this.$locale().weekStart||0,w=(m<b?m+7:m)-b;return d(r?y-w:y+(6-w),g);case a:case h:return p(_+"Hours",0);case s:return p(_+"Minutes",1);case o:return p(_+"Seconds",2);case i:return p(_+"Milliseconds",3);default:return this.clone()}},y.endOf=function(t){return this.startOf(t,!1)},y.$set=function(t,e){var n,c=E.p(t),l="set"+(this.$u?"UTC":""),d=(n={},n[a]=l+"Date",n[h]=l+"Date",n[u]=l+"Month",n[f]=l+"FullYear",n[s]=l+"Hours",n[o]=l+"Minutes",n[i]=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(h,1);m.$d[d](p),m.init(),this.$d=m.set(h,Math.min(this.$D,m.daysInMonth())).$d}else d&&this.$d[d](p);return this.init(),this},y.set=function(t,e){return this.clone().$set(t,e)},y.get=function(t){return this[E.p(t)]()},y.add=function(r,l){var h,d=this;r=Number(r);var p=E.p(l),m=function(t){var e=$(d);return E.w(e.date(e.date()+Math.round(t*r)),d)};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 g=(h={},h[o]=e,h[s]=n,h[i]=t,h)[p]||1,y=this.$d.getTime()+r*g;return E.w(y,this)},y.subtract=function(t,e){return this.add(-1*t,e)},y.format=function(t){var e=this,n=this.$locale();if(!this.isValid())return n.invalidDate||d;var r=t||"YYYY-MM-DDTHH:mm:ssZ",i=E.z(this),o=this.$H,s=this.$m,a=this.$M,c=n.weekdays,u=n.months,l=function(t,n,i,o){return t&&(t[n]||t(e,r))||i[n].slice(0,o)},f=function(t){return E.s(o%12||12,t,"0")},h=n.meridiem||function(t,e,n){var r=t<12?"AM":"PM";return n?r.toLowerCase():r},p={YY:String(this.$y).slice(-2),YYYY:this.$y,M:a+1,MM:E.s(a+1,2,"0"),MMM:l(n.monthsShort,a,u,3),MMMM:l(u,a),D:this.$D,DD:E.s(this.$D,2,"0"),d:String(this.$W),dd:l(n.weekdaysMin,this.$W,c,2),ddd:l(n.weekdaysShort,this.$W,c,3),dddd:c[this.$W],H:String(o),HH:E.s(o,2,"0"),h:f(1),hh:f(2),a:h(o,s,!0),A:h(o,s,!1),m:String(s),mm:E.s(s,2,"0"),s:String(this.$s),ss:E.s(this.$s,2,"0"),SSS:E.s(this.$ms,3,"0"),Z:i};return r.replace(m,(function(t,e){return e||p[t]||i.replace(":","")}))},y.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},y.diff=function(r,h,d){var p,m=E.p(h),g=$(r),y=(g.utcOffset()-this.utcOffset())*e,_=this-g,b=E.m(this,g);return b=(p={},p[f]=b/12,p[u]=b,p[l]=b/3,p[c]=(_-y)/6048e5,p[a]=(_-y)/864e5,p[s]=_/n,p[o]=_/e,p[i]=_/t,p)[m]||_,d?b:E.a(b)},y.daysInMonth=function(){return this.endOf(u).$D},y.$locale=function(){return w[this.$L]},y.locale=function(t,e){if(!t)return this.$L;var n=this.clone(),r=O(t,e,!0);return r&&(n.$L=r),n},y.clone=function(){return E.w(this.$d,this)},y.toDate=function(){return new Date(this.valueOf())},y.toJSON=function(){return this.isValid()?this.toISOString():null},y.toISOString=function(){return this.$d.toISOString()},y.toString=function(){return this.$d.toUTCString()},g}(),x=S.prototype;return $.prototype=x,[["$ms",r],["$s",i],["$m",o],["$H",s],["$W",a],["$M",u],["$y",f],["$D",h]].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,S,$),t.$i=!0),$},$.locale=O,$.isDayjs=v,$.unix=function(t){return $(1e3*t)},$.en=w[b],$.Ls=w,$.p={},$}();var A=R.exports,F={exports:{}};!function(t,e){t.exports=function(t,e,n){t=t||{};var r=e.prototype,i={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 o(t,e,n,i){return r.fromToBase(t,e,n,i)}n.en.relativeTime=i,r.fromToBase=function(e,r,o,s,a){for(var c,u,l,f=o.$locale().relativeTime||i,h=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"}],d=h.length,p=0;p<d;p+=1){var m=h[p];m.d&&(c=s?n(e).diff(o,m.d,!0):o.diff(e,m.d,!0));var g=(t.rounding||Math.round)(Math.abs(c));if(l=c>0,g<=m.r||!m.r){g<=1&&p>0&&(m=h[p-1]);var y=f[m.l];a&&(g=a(""+g)),u="string"==typeof y?y.replace("%d",g):y(g,r,m.l,l);break}}if(r)return u;var _=l?f.future:f.past;return"function"==typeof _?_(u):_.replace("%s",u)},r.to=function(t,e){return o(t,e,this,!0)},r.from=function(t,e){return o(t,e,this)};var s=function(t){return t.$u?n.utc():n()};r.toNow=function(t){return this.to(s(this),t)},r.fromNow=function(t){return this.from(s(this),t)}}}(F);var z=F.exports,k={exports:{}};!function(t,e){var n,r;t.exports=(n={year:0,month:1,day:2,hour:3,minute:4,second:5},r={},function(t,e,i){var o,s=function(t,e,n){void 0===n&&(n={});var i=new Date(t);return function(t,e){void 0===e&&(e={});var n=e.timeZoneName||"short",i=t+"|"+n,o=r[i];return o||(o=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:n}),r[i]=o),o}(e,n).formatToParts(i)},a=function(t,e){for(var r=s(t,e),o=[],a=0;a<r.length;a+=1){var c=r[a],u=c.type,l=c.value,f=n[u];f>=0&&(o[f]=parseInt(l,10))}var h=o[3],d=24===h?0:h,p=o[0]+"-"+o[1]+"-"+o[2]+" "+d+":"+o[4]+":"+o[5]+":000",m=+t;return(i.utc(p).valueOf()-(m-=m%1e3))/6e4},c=e.prototype;c.tz=function(t,e){void 0===t&&(t=o);var n=this.utcOffset(),r=this.toDate(),s=r.toLocaleString("en-US",{timeZone:t}),a=Math.round((r-new Date(s))/1e3/60),c=i(s).$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||i.tz.guess(),n=s(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=i(this.format("YYYY-MM-DD HH:mm:ss:SSS"));return u.call(n,t,e).tz(this.$x.$timezone,!0)},i.tz=function(t,e,n){var r=n&&e,s=n||e||o,c=a(+i(),s);if("string"!=typeof t)return i(t).tz(s);var u=function(t,e,n){var r=t-60*e*1e3,i=a(r,n);if(e===i)return[r,e];var o=a(r-=60*(i-e)*1e3,n);return i===o?[r,i]:[t-60*Math.min(i,o)*1e3,Math.max(i,o)]}(i.utc(t,r).valueOf(),c,s),l=u[0],f=u[1],h=i(l).utcOffset(f);return h.$x.$timezone=s,h},i.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},i.tz.setDefault=function(t){o=t}})}(k);var C=k.exports,N={exports:{}};!function(t,e){var n,r,i;t.exports=(n="minute",r=/[+-]\d\d(?::?\d\d)?/g,i=/([+-]|\d\d)/g,function(t,e,o){var s=e.prototype;o.utc=function(t){return new e({date:t,utc:!0,args:arguments})},s.utc=function(t){var e=o(this.toDate(),{locale:this.$L,utc:!0});return t?e.add(this.utcOffset(),n):e},s.local=function(){return o(this.toDate(),{locale:this.$L,utc:!1})};var a=s.parse;s.parse=function(t){t.utc&&(this.$u=!0),this.$utils().u(t.$offset)||(this.$offset=t.$offset),a.call(this,t)};var c=s.init;s.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=s.utcOffset;s.utcOffset=function(t,e){var o=this.$utils().u;if(o(t))return this.$u?0:o(this.$offset)?u.call(this):this.$offset;if("string"==typeof t&&null===(t=function(t){void 0===t&&(t="");var e=t.match(r);if(!e)return null;var n=(""+e[0]).match(i)||["-",0,0],o=n[0],s=60*+n[1]+ +n[2];return 0===s?0:"+"===o?s:-s}(t)))return this;var s=Math.abs(t)<=16?60*t:t,a=this;if(e)return a.$offset=s,a.$u=0===t,a;if(0!==t){var c=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(a=this.local().add(s+c,n)).$offset=s,a.$x.$localOffset=c}else a=this.utc();return a};var l=s.format;s.format=function(t){var e=t||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return l.call(this,e)},s.valueOf=function(){var t=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*t},s.isUTC=function(){return!!this.$u},s.toISOString=function(){return this.toDate().toISOString()},s.toString=function(){return this.toDate().toUTCString()};var f=s.toDate;s.toDate=function(t){return"s"===t&&this.$offset?o(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():f.call(this)};var h=s.diff;s.diff=function(t,e,n){if(t&&this.$u===t.$u)return h.call(this,t,e,n);var r=this.local(),i=o(t).local();return h.call(r,i,e,n)}})}(N);var P=N.exports;A.$defaultFormat=function(t){return A.utc(t).format("YYYY-MM-DD HH:mm:ss")},A.$prettyPrint=function(t){return A(t).format("h:mma dddd MMM DD, YYYY")};A.extend(z),A.extend(C),A.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}})),A.extend(P);const U=A;function L(t,e){return function(){return t.apply(e,arguments)}}const{toString:B}=Object.prototype,{getPrototypeOf:q}=Object,I=(H=Object.create(null),t=>{const e=B.call(t);return H[e]||(H[e]=e.slice(8,-1).toLowerCase())});var H;const Y=t=>(t=t.toLowerCase(),e=>I(e)===t),V=t=>e=>typeof e===t,{isArray:J}=Array,W=V("undefined");const Z=Y("ArrayBuffer");const K=V("string"),Q=V("function"),X=V("number"),G=t=>null!==t&&"object"==typeof t,tt=t=>{if("object"!==I(t))return!1;const e=q(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"),it=Y("FileList"),ot=Y("URLSearchParams");function st(t,e,{allOwnKeys:n=!1}={}){if(null==t)return;let r,i;if("object"!=typeof t&&(t=[t]),J(t))for(r=0,i=t.length;r<i;r++)e.call(null,t[r],r,t);else{const i=n?Object.getOwnPropertyNames(t):Object.keys(t),o=i.length;let s;for(r=0;r<o;r++)s=i[r],e.call(null,t[s],s,t)}}const at=(ct="undefined"!=typeof Uint8Array&&q(Uint8Array),t=>ct&&t instanceof ct);var ct;const ut=Y("HTMLFormElement"),lt=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),ft=Y("RegExp"),ht=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),r={};st(n,((n,i)=>{!1!==e(n,i,t)&&(r[i]=n)})),Object.defineProperties(t,r)};var dt={isArray:J,isArrayBuffer:Z,isBuffer:function(t){return null!==t&&!W(t)&&null!==t.constructor&&!W(t.constructor)&&Q(t.constructor.isBuffer)&&t.constructor.isBuffer(t)},isFormData:t=>{const e="[object FormData]";return t&&("function"==typeof FormData&&t instanceof FormData||B.call(t)===e||Q(t.toString)&&t.toString()===e)},isArrayBufferView:function(t){let e;return e="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&Z(t.buffer),e},isString:K,isNumber:X,isBoolean:t=>!0===t||!1===t,isObject:G,isPlainObject:tt,isUndefined:W,isDate:et,isFile:nt,isBlob:rt,isRegExp:ft,isFunction:Q,isStream:t=>G(t)&&Q(t.pipe),isURLSearchParams:ot,isTypedArray:at,isFileList:it,forEach:st,merge:function t(){const e={},n=(n,r)=>{tt(e[r])&&tt(n)?e[r]=t(e[r],n):tt(n)?e[r]=t({},n):J(n)?e[r]=n.slice():e[r]=n};for(let r=0,i=arguments.length;r<i;r++)arguments[r]&&st(arguments[r],n);return e},extend:(t,e,n,{allOwnKeys:r}={})=>(st(e,((e,r)=>{n&&Q(e)?t[r]=L(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 i,o,s;const a={};if(e=e||{},null==t)return e;do{for(i=Object.getOwnPropertyNames(t),o=i.length;o-- >0;)s=i[o],r&&!r(s,t,e)||a[s]||(e[s]=t[s],a[s]=!0);t=!1!==n&&q(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},kindOf:I,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(!X(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:ut,hasOwnProperty:lt,hasOwnProp:lt,reduceDescriptors:ht,freezeMethods:t=>{ht(t,((e,n)=>{const r=t[n];Q(r)&&(e.enumerable=!1,"writable"in e?e.writable=!1:e.set||(e.set=()=>{throw Error("Can not 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)=>(t=+t,Number.isFinite(t)?t:e)};function pt(t,e,n,r,i){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),i&&(this.response=i)}dt.inherits(pt,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:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const mt=pt.prototype,gt={};["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=>{gt[t]={value:t}})),Object.defineProperties(pt,gt),Object.defineProperty(mt,"isAxiosError",{value:!0}),pt.from=(t,e,n,r,i,o)=>{const s=Object.create(mt);return dt.toFlatObject(t,s,(function(t){return t!==Error.prototype}),(t=>"isAxiosError"!==t)),pt.call(s,t.message,e,n,r,i),s.cause=t,s.name=t.name,o&&Object.assign(s,o),s};var yt="object"==typeof self?self.FormData:window.FormData;function _t(t){return dt.isPlainObject(t)||dt.isArray(t)}function bt(t){return dt.endsWith(t,"[]")?t.slice(0,-2):t}function wt(t,e,n){return t?t.concat(e).map((function(t,e){return t=bt(t),!n&&e?"["+t+"]":t})).join(n?".":""):e}const vt=dt.toFlatObject(dt,{},null,(function(t){return/^is[A-Z]/.test(t)}));function Ot(t,e,n){if(!dt.isObject(t))throw new TypeError("target must be an object");e=e||new(yt||FormData);const r=(n=dt.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(t,e){return!dt.isUndefined(e[t])}))).metaTokens,i=n.visitor||l,o=n.dots,s=n.indexes,a=(n.Blob||"undefined"!=typeof Blob&&Blob)&&((c=e)&&dt.isFunction(c.append)&&"FormData"===c[Symbol.toStringTag]&&c[Symbol.iterator]);var c;if(!dt.isFunction(i))throw new TypeError("visitor must be a function");function u(t){if(null===t)return"";if(dt.isDate(t))return t.toISOString();if(!a&&dt.isBlob(t))throw new pt("Blob is not supported. Use a Buffer instead.");return dt.isArrayBuffer(t)||dt.isTypedArray(t)?a&&"function"==typeof Blob?new Blob([t]):Buffer.from(t):t}function l(t,n,i){let a=t;if(t&&!i&&"object"==typeof t)if(dt.endsWith(n,"{}"))n=r?n:n.slice(0,-2),t=JSON.stringify(t);else if(dt.isArray(t)&&function(t){return dt.isArray(t)&&!t.some(_t)}(t)||dt.isFileList(t)||dt.endsWith(n,"[]")&&(a=dt.toArray(t)))return n=bt(n),a.forEach((function(t,r){!dt.isUndefined(t)&&null!==t&&e.append(!0===s?wt([n],r,o):null===s?n:n+"[]",u(t))})),!1;return!!_t(t)||(e.append(wt(i,n,o),u(t)),!1)}const f=[],h=Object.assign(vt,{defaultVisitor:l,convertValue:u,isVisitable:_t});if(!dt.isObject(t))throw new TypeError("data must be an object");return function t(n,r){if(!dt.isUndefined(n)){if(-1!==f.indexOf(n))throw Error("Circular reference detected in "+r.join("."));f.push(n),dt.forEach(n,(function(n,o){!0===(!(dt.isUndefined(n)||null===n)&&i.call(e,n,dt.isString(o)?o.trim():o,r,h))&&t(n,r?r.concat(o):[o])})),f.pop()}}(t),e}function $t(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,(function(t){return e[t]}))}function Et(t,e){this._pairs=[],t&&Ot(t,this,e)}const St=Et.prototype;function xt(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Mt(t,e,n){if(!e)return t;const r=n&&n.encode||xt,i=n&&n.serialize;let o;if(o=i?i(e,n):dt.isURLSearchParams(e)?e.toString():new Et(e,n).toString(r),o){const e=t.indexOf("#");-1!==e&&(t=t.slice(0,e)),t+=(-1===t.indexOf("?")?"?":"&")+o}return t}St.append=function(t,e){this._pairs.push([t,e])},St.toString=function(t){const e=t?function(e){return t.call(this,e,$t)}:$t;return this._pairs.map((function(t){return e(t[0])+"="+e(t[1])}),"").join("&")};class Dt{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){dt.forEach(this.handlers,(function(e){null!==e&&t(e)}))}}var jt={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Tt="undefined"!=typeof URLSearchParams?URLSearchParams:Et,Rt=FormData;const At=(()=>{let t;return("undefined"==typeof navigator||"ReactNative"!==(t=navigator.product)&&"NativeScript"!==t&&"NS"!==t)&&("undefined"!=typeof window&&"undefined"!=typeof document)})();var Ft={isBrowser:!0,classes:{URLSearchParams:Tt,FormData:Rt,Blob:Blob},isStandardBrowserEnv:At,protocols:["http","https","file","blob","url","data"]};function zt(t){function e(t,n,r,i){let o=t[i++];const s=Number.isFinite(+o),a=i>=t.length;if(o=!o&&dt.isArray(r)?r.length:o,a)return dt.hasOwnProp(r,o)?r[o]=[r[o],n]:r[o]=n,!s;r[o]&&dt.isObject(r[o])||(r[o]=[]);return e(t,n,r[o],i)&&dt.isArray(r[o])&&(r[o]=function(t){const e={},n=Object.keys(t);let r;const i=n.length;let o;for(r=0;r<i;r++)o=n[r],e[o]=t[o];return e}(r[o])),!s}if(dt.isFormData(t)&&dt.isFunction(t.entries)){const n={};return dt.forEachEntry(t,((t,r)=>{e(function(t){return dt.matchAll(/\w+|\[(\w*)]/g,t).map((t=>"[]"===t[0]?"":t[1]||t[0]))}(t),r,n,0)})),n}return null}var kt=Ft.isStandardBrowserEnv?{write:function(t,e,n,r,i,o){const s=[];s.push(t+"="+encodeURIComponent(e)),dt.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),dt.isString(r)&&s.push("path="+r),dt.isString(i)&&s.push("domain="+i),!0===o&&s.push("secure"),document.cookie=s.join("; ")},read:function(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove:function(t){this.write(t,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}};function Ct(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}var Nt=Ft.isStandardBrowserEnv?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=dt.isString(t)?r(t):t;return e.protocol===n.protocol&&e.host===n.host}}():function(){return!0};function Pt(t,e,n){pt.call(this,null==t?"canceled":t,pt.ERR_CANCELED,e,n),this.name="CanceledError"}dt.inherits(Pt,pt,{__CANCEL__:!0});const Ut=dt.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 Lt=Symbol("internals"),Bt=Symbol("defaults");function qt(t){return t&&String(t).trim().toLowerCase()}function It(t){return!1===t||null==t?t:dt.isArray(t)?t.map(It):String(t)}function Ht(t,e,n,r){return dt.isFunction(r)?r.call(this,e,n):dt.isString(e)?dt.isString(r)?-1!==e.indexOf(r):dt.isRegExp(r)?r.test(e):void 0:void 0}function Yt(t,e){e=e.toLowerCase();const n=Object.keys(t);let r,i=n.length;for(;i-- >0;)if(r=n[i],e===r.toLowerCase())return r;return null}function Vt(t,e){t&&this.set(t),this[Bt]=e||null}function Jt(t,e){let n=0;const r=function(t,e){t=t||10;const n=new Array(t),r=new Array(t);let i,o=0,s=0;return e=void 0!==e?e:1e3,function(a){const c=Date.now(),u=r[s];i||(i=c),n[o]=a,r[o]=c;let l=s,f=0;for(;l!==o;)f+=n[l++],l%=t;if(o=(o+1)%t,o===s&&(s=(s+1)%t),c-i<e)return;const h=u&&c-u;return h?Math.round(1e3*f/h):void 0}}(50,250);return i=>{const o=i.loaded,s=i.lengthComputable?i.total:void 0,a=o-n,c=r(a);n=o;const u={loaded:o,total:s,progress:s?o/s:void 0,bytes:a,rate:c||void 0,estimated:c&&s&&o<=s?(s-o)/c:void 0};u[e?"download":"upload"]=!0,t(u)}}function Wt(t){return new Promise((function(e,n){let r=t.data;const i=Vt.from(t.headers).normalize(),o=t.responseType;let s;function a(){t.cancelToken&&t.cancelToken.unsubscribe(s),t.signal&&t.signal.removeEventListener("abort",s)}dt.isFormData(r)&&Ft.isStandardBrowserEnv&&i.setContentType(!1);let c=new XMLHttpRequest;if(t.auth){const e=t.auth.username||"",n=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";i.set("Authorization","Basic "+btoa(e+":"+n))}const u=Ct(t.baseURL,t.url);function l(){if(!c)return;const r=Vt.from("getAllResponseHeaders"in c&&c.getAllResponseHeaders());!function(t,e,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?e(new pt("Request failed with status code "+n.status,[pt.ERR_BAD_REQUEST,pt.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):t(n)}((function(t){e(t),a()}),(function(t){n(t),a()}),{data:o&&"text"!==o&&"json"!==o?c.response:c.responseText,status:c.status,statusText:c.statusText,headers:r,config:t,request:c}),c=null}if(c.open(t.method.toUpperCase(),Mt(u,t.params,t.paramsSerializer),!0),c.timeout=t.timeout,"onloadend"in c?c.onloadend=l:c.onreadystatechange=function(){c&&4===c.readyState&&(0!==c.status||c.responseURL&&0===c.responseURL.indexOf("file:"))&&setTimeout(l)},c.onabort=function(){c&&(n(new pt("Request aborted",pt.ECONNABORTED,t,c)),c=null)},c.onerror=function(){n(new pt("Network Error",pt.ERR_NETWORK,t,c)),c=null},c.ontimeout=function(){let e=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded";const r=t.transitional||jt;t.timeoutErrorMessage&&(e=t.timeoutErrorMessage),n(new pt(e,r.clarifyTimeoutError?pt.ETIMEDOUT:pt.ECONNABORTED,t,c)),c=null},Ft.isStandardBrowserEnv){const e=(t.withCredentials||Nt(u))&&t.xsrfCookieName&&kt.read(t.xsrfCookieName);e&&i.set(t.xsrfHeaderName,e)}void 0===r&&i.setContentType(null),"setRequestHeader"in c&&dt.forEach(i.toJSON(),(function(t,e){c.setRequestHeader(e,t)})),dt.isUndefined(t.withCredentials)||(c.withCredentials=!!t.withCredentials),o&&"json"!==o&&(c.responseType=t.responseType),"function"==typeof t.onDownloadProgress&&c.addEventListener("progress",Jt(t.onDownloadProgress,!0)),"function"==typeof t.onUploadProgress&&c.upload&&c.upload.addEventListener("progress",Jt(t.onUploadProgress)),(t.cancelToken||t.signal)&&(s=e=>{c&&(n(!e||e.type?new Pt(null,t,c):e),c.abort(),c=null)},t.cancelToken&&t.cancelToken.subscribe(s),t.signal&&(t.signal.aborted?s():t.signal.addEventListener("abort",s)));const f=function(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}(u);f&&-1===Ft.protocols.indexOf(f)?n(new pt("Unsupported protocol "+f+":",pt.ERR_BAD_REQUEST,t)):c.send(r||null)}))}Object.assign(Vt.prototype,{set:function(t,e,n){const r=this;function i(t,e,n){const i=qt(e);if(!i)throw new Error("header name must be a non-empty string");const o=Yt(r,i);(!o||!0===n||!1!==r[o]&&!1!==n)&&(r[o||e]=It(t))}return dt.isPlainObject(t)?dt.forEach(t,((t,n)=>{i(t,n,e)})):i(e,t,n),this},get:function(t,e){if(!(t=qt(t)))return;const n=Yt(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(dt.isFunction(e))return e.call(this,t,n);if(dt.isRegExp(e))return e.exec(t);throw new TypeError("parser must be boolean|regexp|function")}},has:function(t,e){if(t=qt(t)){const n=Yt(this,t);return!(!n||e&&!Ht(0,this[n],n,e))}return!1},delete:function(t,e){const n=this;let r=!1;function i(t){if(t=qt(t)){const i=Yt(n,t);!i||e&&!Ht(0,n[i],i,e)||(delete n[i],r=!0)}}return dt.isArray(t)?t.forEach(i):i(t),r},clear:function(){return Object.keys(this).forEach(this.delete.bind(this))},normalize:function(t){const e=this,n={};return dt.forEach(this,((r,i)=>{const o=Yt(n,i);if(o)return e[o]=It(r),void delete e[i];const s=t?function(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((t,e,n)=>e.toUpperCase()+n))}(i):String(i).trim();s!==i&&delete e[i],e[s]=It(r),n[s]=!0})),this},toJSON:function(t){const e=Object.create(null);return dt.forEach(Object.assign({},this[Bt]||null,this),((n,r)=>{null!=n&&!1!==n&&(e[r]=t&&dt.isArray(n)?n.join(", "):n)})),e}}),Object.assign(Vt,{from:function(t){return dt.isString(t)?new this((t=>{const e={};let n,r,i;return t&&t.split("\n").forEach((function(t){i=t.indexOf(":"),n=t.substring(0,i).trim().toLowerCase(),r=t.substring(i+1).trim(),!n||e[n]&&Ut[n]||("set-cookie"===n?e[n]?e[n].push(r):e[n]=[r]:e[n]=e[n]?e[n]+", "+r:r)})),e})(t)):t instanceof this?t:new this(t)},accessor:function(t){const e=(this[Lt]=this[Lt]={accessors:{}}).accessors,n=this.prototype;function r(t){const r=qt(t);e[r]||(!function(t,e){const n=dt.toCamelCase(" "+e);["get","set","has"].forEach((r=>{Object.defineProperty(t,r+n,{value:function(t,n,i){return this[r].call(this,e,t,n,i)},configurable:!0})}))}(n,t),e[r]=!0)}return dt.isArray(t)?t.forEach(r):r(t),this}}),Vt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent"]),dt.freezeMethods(Vt.prototype),dt.freezeMethods(Vt);const Zt={http:Wt,xhr:Wt};var Kt=t=>{if(dt.isString(t)){const e=Zt[t];if(!t)throw Error(dt.hasOwnProp(t)?`Adapter '${t}' is not available in the build`:`Can not resolve adapter '${t}'`);return e}if(!dt.isFunction(t))throw new TypeError("adapter is not a function");return t};const Qt={"Content-Type":"application/x-www-form-urlencoded"};const Xt={transitional:jt,adapter:function(){let t;return"undefined"!=typeof XMLHttpRequest?t=Kt("xhr"):"undefined"!=typeof process&&"process"===dt.kindOf(process)&&(t=Kt("http")),t}(),transformRequest:[function(t,e){const n=e.getContentType()||"",r=n.indexOf("application/json")>-1,i=dt.isObject(t);i&&dt.isHTMLForm(t)&&(t=new FormData(t));if(dt.isFormData(t))return r&&r?JSON.stringify(zt(t)):t;if(dt.isArrayBuffer(t)||dt.isBuffer(t)||dt.isStream(t)||dt.isFile(t)||dt.isBlob(t))return t;if(dt.isArrayBufferView(t))return t.buffer;if(dt.isURLSearchParams(t))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let o;if(i){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(t,e){return Ot(t,new Ft.classes.URLSearchParams,Object.assign({visitor:function(t,e,n,r){return Ft.isNode&&dt.isBuffer(t)?(this.append(e,t.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},e))}(t,this.formSerializer).toString();if((o=dt.isFileList(t))||n.indexOf("multipart/form-data")>-1){const e=this.env&&this.env.FormData;return Ot(o?{"files[]":t}:t,e&&new e,this.formSerializer)}}return i||r?(e.setContentType("application/json",!1),function(t,e,n){if(dt.isString(t))try{return(e||JSON.parse)(t),dt.trim(t)}catch(r){if("SyntaxError"!==r.name)throw r}return(n||JSON.stringify)(t)}(t)):t}],transformResponse:[function(t){const e=this.transitional||Xt.transitional,n=e&&e.forcedJSONParsing,r="json"===this.responseType;if(t&&dt.isString(t)&&(n&&!this.responseType||r)){const n=!(e&&e.silentJSONParsing)&&r;try{return JSON.parse(t)}catch(i){if(n){if("SyntaxError"===i.name)throw pt.from(i,pt.ERR_BAD_RESPONSE,this,null,this.response);throw i}}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Ft.classes.FormData,Blob:Ft.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};function Gt(t,e){const n=this||Xt,r=e||n,i=Vt.from(r.headers);let o=r.data;return dt.forEach(t,(function(t){o=t.call(n,o,i.normalize(),e?e.status:void 0)})),i.normalize(),o}function te(t){return!(!t||!t.__CANCEL__)}function ee(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new Pt}function ne(t){ee(t),t.headers=Vt.from(t.headers),t.data=Gt.call(t,t.transformRequest);return(t.adapter||Xt.adapter)(t).then((function(e){return ee(t),e.data=Gt.call(t,t.transformResponse,e),e.headers=Vt.from(e.headers),e}),(function(e){return te(e)||(ee(t),e&&e.response&&(e.response.data=Gt.call(t,t.transformResponse,e.response),e.response.headers=Vt.from(e.response.headers))),Promise.reject(e)}))}function re(t,e){e=e||{};const n={};function r(t,e){return dt.isPlainObject(t)&&dt.isPlainObject(e)?dt.merge(t,e):dt.isPlainObject(e)?dt.merge({},e):dt.isArray(e)?e.slice():e}function i(n){return dt.isUndefined(e[n])?dt.isUndefined(t[n])?void 0:r(void 0,t[n]):r(t[n],e[n])}function o(t){if(!dt.isUndefined(e[t]))return r(void 0,e[t])}function s(n){return dt.isUndefined(e[n])?dt.isUndefined(t[n])?void 0:r(void 0,t[n]):r(void 0,e[n])}function a(n){return n in e?r(t[n],e[n]):n in t?r(void 0,t[n]):void 0}const c={url:o,method:o,data:o,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a};return dt.forEach(Object.keys(t).concat(Object.keys(e)),(function(t){const e=c[t]||i,r=e(t);dt.isUndefined(r)&&e!==a||(n[t]=r)})),n}dt.forEach(["delete","get","head"],(function(t){Xt.headers[t]={}})),dt.forEach(["post","put","patch"],(function(t){Xt.headers[t]=dt.merge(Qt)}));const ie="1.1.3",oe={};["object","boolean","number","function","string","symbol"].forEach(((t,e)=>{oe[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}}));const se={};oe.transitional=function(t,e,n){function r(t,e){return"[Axios v1.1.3] Transitional option '"+t+"'"+e+(n?". "+n:"")}return(n,i,o)=>{if(!1===t)throw new pt(r(i," has been removed"+(e?" in "+e:"")),pt.ERR_DEPRECATED);return e&&!se[i]&&(se[i]=!0,console.warn(r(i," has been deprecated since v"+e+" and will be removed in the near future"))),!t||t(n,i,o)}};var ae={assertOptions:function(t,e,n){if("object"!=typeof t)throw new pt("options must be an object",pt.ERR_BAD_OPTION_VALUE);const r=Object.keys(t);let i=r.length;for(;i-- >0;){const o=r[i],s=e[o];if(s){const e=t[o],n=void 0===e||s(e,o,t);if(!0!==n)throw new pt("option "+o+" must be "+n,pt.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new pt("Unknown option "+o,pt.ERR_BAD_OPTION)}},validators:oe};const ce=ae.validators;class ue{constructor(t){this.defaults=t,this.interceptors={request:new Dt,response:new Dt}}request(t,e){"string"==typeof t?(e=e||{}).url=t:e=t||{},e=re(this.defaults,e);const{transitional:n,paramsSerializer:r}=e;void 0!==n&&ae.assertOptions(n,{silentJSONParsing:ce.transitional(ce.boolean),forcedJSONParsing:ce.transitional(ce.boolean),clarifyTimeoutError:ce.transitional(ce.boolean)},!1),void 0!==r&&ae.assertOptions(r,{encode:ce.function,serialize:ce.function},!0),e.method=(e.method||this.defaults.method||"get").toLowerCase();const i=e.headers&&dt.merge(e.headers.common,e.headers[e.method]);i&&dt.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),e.headers=new Vt(e.headers,i);const o=[];let s=!0;this.interceptors.request.forEach((function(t){"function"==typeof t.runWhen&&!1===t.runWhen(e)||(s=s&&t.synchronous,o.unshift(t.fulfilled,t.rejected))}));const a=[];let c;this.interceptors.response.forEach((function(t){a.push(t.fulfilled,t.rejected)}));let u,l=0;if(!s){const t=[ne.bind(this),void 0];for(t.unshift.apply(t,o),t.push.apply(t,a),u=t.length,c=Promise.resolve(e);l<u;)c=c.then(t[l++],t[l++]);return c}u=o.length;let f=e;for(l=0;l<u;){const t=o[l++],e=o[l++];try{f=t(f)}catch(h){e.call(this,h);break}}try{c=ne.call(this,f)}catch(h){return Promise.reject(h)}for(l=0,u=a.length;l<u;)c=c.then(a[l++],a[l++]);return c}getUri(t){return Mt(Ct((t=re(this.defaults,t)).baseURL,t.url),t.params,t.paramsSerializer)}}dt.forEach(["delete","get","head","options"],(function(t){ue.prototype[t]=function(e,n){return this.request(re(n||{},{method:t,url:e,data:(n||{}).data}))}})),dt.forEach(["post","put","patch"],(function(t){function e(e){return function(n,r,i){return this.request(re(i||{},{method:t,headers:e?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}ue.prototype[t]=e(),ue.prototype[t+"Form"]=e(!0)}));class le{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,i){n.reason||(n.reason=new Pt(t,r,i),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 le((function(e){t=e})),cancel:t}}}const fe=function t(e){const n=new ue(e),r=L(ue.prototype.request,n);return dt.extend(r,ue.prototype,n,{allOwnKeys:!0}),dt.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return t(re(e,n))},r}(Xt);fe.Axios=ue,fe.CanceledError=Pt,fe.CancelToken=le,fe.isCancel=te,fe.VERSION=ie,fe.toFormData=Ot,fe.AxiosError=pt,fe.Cancel=fe.CanceledError,fe.all=function(t){return Promise.all(t)},fe.spread=function(t){return function(e){return t.apply(null,e)}},fe.isAxiosError=function(t){return dt.isObject(t)&&!0===t.isAxiosError},fe.formToJSON=t=>zt(dt.isHTMLForm(t)?new FormData(t):t);const he="leach"!=={VITE_MAPTILER_KEY:"1ZwL7YJSSN42A678HHPn",VITE_NREL_KEY:"BThVJdnwHbO8hDpQkBdeqsUoeXhQuMgMRgO3hvyo",VITE_OPENWEATHERMAP_KEY:"09b21cd89a07eaa465d3d9c2b2a6d0c3",BASE_URL:"/static/widget/",MODE:"production",DEV:!1,PROD:!0}.VITE_REQUEST_MODE?"/api/1.0/":"https://www.sjvair.com/api/1.0/",de=fe.create({baseURL:he});class pe{constructor(t){__publicField(this,"data"),__publicField(this,"dataFields"),__publicField(this,"displayField"),__publicField(this,"lastUpdated"),__publicField(this,"markerParams"),__publicField(this,"monitorFields");const e=j(t);this.data=t,this.markerParams=function(t){const e=`#${_}`,n={border_color:y(m(e,.1)),border_size:1,fill_color:e,value_color:e,size:8,shape:"square"};switch(t.device){case"AirNow":case"BAM1022":n.shape="triangle";break;case"PurpleAir":t.is_sjvair&&(n.shape="circle");break;default:console.error(`Unknown device type for monitor ${t.id}`),n.shape="diamond"}if(t.latest){const e=x(+t.latest.pm25,D.levels);if(n.value_color=e,t.is_active)switch(n.fill_color=x(+t.latest.pm25,D.levels),n.border_color=y(m(n.fill_color,.1)),t.device){case"AirNow":case"BAM1022":n.size=14;break;case"PurpleAir":t.is_sjvair?n.size=12:n.size=10}"inside"===t.location&&(n.border_color=`#${b}`,n.border_size=2)}return n}(t),this.monitorFields=e,this.dataFields=Object.keys(this.monitorFields),this.displayField=e.pm25,this.lastUpdated=t.latest&&Object.keys(t.latest).length>1?U(t.latest.timestamp).fromNow():"never"}}var me=Object.freeze({__proto__:null,fetchMonitors:async function(){return de.get("/monitors").then((t=>{const e={};for(let n of t.data.data)n.position.coordinates[1]>42||(e[n.id]=new pe(n));return e}))},fetchEntries:async function t(e,n,r=1){const i=[],o={fields:e.dataFields.join(","),page:r,timestamp__gte:U.$defaultFormat(n.start),timestamp__lte:U.$defaultFormat(n.end)};return de.get(`monitors/${e.data.id}/entries/`,{params:o}).then((async o=>{const s=o.data;if(s.data.length&&(i.push(...s.data),s.has_next_page)){const o=await t(e,n,++r).catch((t=>{throw t}));o.length&&i.push(...o)}return i}))},fetchSubscriptions:async function(){return de.get("alerts/subscriptions").then((t=>t.data.data))},fetchTempByCoords:async function(t){const e=`https://api.weather.gov/points/${t.join(",")}`;return await de(e).then((async t=>{try{return(await de(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:i}=e.data;this.serviceModule[r];const o=new t(n);r in this.serviceModule?await this.serviceModule[r](...i).then((t=>o.pass(t))).catch((t=>o.fail(t.message))):o.fail(`Background task "${String(r)}" not found in "${this.serviceModuleName}" controller`),self.postMessage(o)}))}}("MonitorsService",me)}();
@@ -0,0 +1 @@
1
+ import{M as t}from"./MonitorDetails.d80e4aa2.js";import{fetchEntries as e}from"./requests.8b8eb20f.js";import{d as s}from"../sjvairMonitorMap.js";async function n(n,r){return e(n,r).then((e=>{const r=[],i="PurpleAir"===n.data.device?2:60,a=new Map(Object.keys(t).map((t=>[t,[]])));for(let t=e.length-1;t>=0;t--){const n=e[t];if(r.length>1){const t=s(n.timestamp).utc().tz("America/Los_Angeles").toISOString();let e=s(r[r.length-1]);for(;e.skewedDiff(t,i)>i+1;)e=e.add(i,"m"),o(r,a,n,e)}o(r,a,n)}return[r.map((t=>t.unix())),...a.values()].filter((t=>t.length))})).catch((t=>t))}function o(t,e,n,o){o?t.push(o.utc().tz("America/Los_Angeles")):t.push(s(n.timestamp).utc().tz("America/Los_Angeles"));for(let s of e.keys())if(s in n){const t=e.get(s);let r;if(o)r=null;else{const t=parseFloat(n[s]);r=t>=0?t:0}t.push(r)}}export{n as fetchChartData};