@n1k1t/mock-server 0.1.76 → 0.1.77

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,507 +0,0 @@
1
- var Rx=Object.defineProperty;var Ix=(n,t,e)=>t in n?Rx(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e;var it=(n,t,e)=>Ix(n,typeof t!="symbol"?t+"":t,e);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))i(r);new MutationObserver(r=>{for(const o of r)if(o.type==="childList")for(const a of o.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&i(a)}).observe(document,{childList:!0,subtree:!0});function e(r){const o={};return r.integrity&&(o.integrity=r.integrity),r.referrerPolicy&&(o.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?o.credentials="include":r.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function i(r){if(r.ep)return;r.ep=!0;const o=e(r);fetch(r.href,o)}})();var Xn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Sr(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var ua={exports:{}},Tx=ua.exports,Qf;function Dx(){return Qf||(Qf=1,function(n,t){(function(e,i){n.exports=i()})(Tx,function(){return function(e,i,r){e=e||{};var o=i.prototype,a={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 c(f,h,_,p){return o.fromToBase(f,h,_,p)}r.en.relativeTime=a,o.fromToBase=function(f,h,_,p,m){for(var g,b,w,C=_.$locale().relativeTime||a,M=e.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=M.length,S=0;S<D;S+=1){var k=M[S];k.d&&(g=p?r(f).diff(_,k.d,!0):_.diff(f,k.d,!0));var O=(e.rounding||Math.round)(Math.abs(g));if(w=g>0,O<=k.r||!k.r){O<=1&&S>0&&(k=M[S-1]);var I=C[k.l];m&&(O=m(""+O)),b=typeof I=="string"?I.replace("%d",O):I(O,h,k.l,w);break}}if(h)return b;var B=w?C.future:C.past;return typeof B=="function"?B(b):B.replace("%s",b)},o.to=function(f,h){return c(f,h,this,!0)},o.from=function(f,h){return c(f,h,this)};var u=function(f){return f.$u?r.utc():r()};o.toNow=function(f){return this.to(u(this),f)},o.fromNow=function(f){return this.from(u(this),f)}}})}(ua)),ua.exports}var Bx=Dx();const Fx=Sr(Bx);var ha={exports:{}},Nx=ha.exports,td;function Hx(){return td||(td=1,function(n,t){(function(e,i){n.exports=i()})(Nx,function(){var e=1e3,i=6e4,r=36e5,o="millisecond",a="second",c="minute",u="hour",f="day",h="week",_="month",p="quarter",m="year",g="date",b="Invalid Date",w=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,C=/\[([^\]]+)]|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,M={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(nt){var Z=["th","st","nd","rd"],X=nt%100;return"["+nt+(Z[(X-20)%10]||Z[X]||Z[0])+"]"}},D=function(nt,Z,X){var tt=String(nt);return!tt||tt.length>=Z?nt:""+Array(Z+1-tt.length).join(X)+nt},S={s:D,z:function(nt){var Z=-nt.utcOffset(),X=Math.abs(Z),tt=Math.floor(X/60),et=X%60;return(Z<=0?"+":"-")+D(tt,2,"0")+":"+D(et,2,"0")},m:function nt(Z,X){if(Z.date()<X.date())return-nt(X,Z);var tt=12*(X.year()-Z.year())+(X.month()-Z.month()),et=Z.clone().add(tt,_),at=X-et<0,ct=Z.clone().add(tt+(at?-1:1),_);return+(-(tt+(X-et)/(at?et-ct:ct-et))||0)},a:function(nt){return nt<0?Math.ceil(nt)||0:Math.floor(nt)},p:function(nt){return{M:_,y:m,w:h,d:f,D:g,h:u,m:c,s:a,ms:o,Q:p}[nt]||String(nt||"").toLowerCase().replace(/s$/,"")},u:function(nt){return nt===void 0}},k="en",O={};O[k]=M;var I="$isDayjsObject",B=function(nt){return nt instanceof Y||!(!nt||!nt[I])},q=function nt(Z,X,tt){var et;if(!Z)return k;if(typeof Z=="string"){var at=Z.toLowerCase();O[at]&&(et=at),X&&(O[at]=X,et=at);var ct=Z.split("-");if(!et&&ct.length>1)return nt(ct[0])}else{var gt=Z.name;O[gt]=Z,et=gt}return!tt&&et&&(k=et),et||!tt&&k},z=function(nt,Z){if(B(nt))return nt.clone();var X=typeof Z=="object"?Z:{};return X.date=nt,X.args=arguments,new Y(X)},j=S;j.l=q,j.i=B,j.w=function(nt,Z){return z(nt,{locale:Z.$L,utc:Z.$u,x:Z.$x,$offset:Z.$offset})};var Y=function(){function nt(X){this.$L=q(X.locale,null,!0),this.parse(X),this.$x=this.$x||X.x||{},this[I]=!0}var Z=nt.prototype;return Z.parse=function(X){this.$d=function(tt){var et=tt.date,at=tt.utc;if(et===null)return new Date(NaN);if(j.u(et))return new Date;if(et instanceof Date)return new Date(et);if(typeof et=="string"&&!/Z$/i.test(et)){var ct=et.match(w);if(ct){var gt=ct[2]-1||0,Ot=(ct[7]||"0").substring(0,3);return at?new Date(Date.UTC(ct[1],gt,ct[3]||1,ct[4]||0,ct[5]||0,ct[6]||0,Ot)):new Date(ct[1],gt,ct[3]||1,ct[4]||0,ct[5]||0,ct[6]||0,Ot)}}return new Date(et)}(X),this.init()},Z.init=function(){var X=this.$d;this.$y=X.getFullYear(),this.$M=X.getMonth(),this.$D=X.getDate(),this.$W=X.getDay(),this.$H=X.getHours(),this.$m=X.getMinutes(),this.$s=X.getSeconds(),this.$ms=X.getMilliseconds()},Z.$utils=function(){return j},Z.isValid=function(){return this.$d.toString()!==b},Z.isSame=function(X,tt){var et=z(X);return this.startOf(tt)<=et&&et<=this.endOf(tt)},Z.isAfter=function(X,tt){return z(X)<this.startOf(tt)},Z.isBefore=function(X,tt){return this.endOf(tt)<z(X)},Z.$g=function(X,tt,et){return j.u(X)?this[tt]:this.set(et,X)},Z.unix=function(){return Math.floor(this.valueOf()/1e3)},Z.valueOf=function(){return this.$d.getTime()},Z.startOf=function(X,tt){var et=this,at=!!j.u(tt)||tt,ct=j.p(X),gt=function(_e,le){var se=j.w(et.$u?Date.UTC(et.$y,le,_e):new Date(et.$y,le,_e),et);return at?se:se.endOf(f)},Ot=function(_e,le){return j.w(et.toDate()[_e].apply(et.toDate("s"),(at?[0,0,0,0]:[23,59,59,999]).slice(le)),et)},Ft=this.$W,dt=this.$M,xt=this.$D,Zt="set"+(this.$u?"UTC":"");switch(ct){case m:return at?gt(1,0):gt(31,11);case _:return at?gt(1,dt):gt(0,dt+1);case h:var Qe=this.$locale().weekStart||0,Le=(Ft<Qe?Ft+7:Ft)-Qe;return gt(at?xt-Le:xt+(6-Le),dt);case f:case g:return Ot(Zt+"Hours",0);case u:return Ot(Zt+"Minutes",1);case c:return Ot(Zt+"Seconds",2);case a:return Ot(Zt+"Milliseconds",3);default:return this.clone()}},Z.endOf=function(X){return this.startOf(X,!1)},Z.$set=function(X,tt){var et,at=j.p(X),ct="set"+(this.$u?"UTC":""),gt=(et={},et[f]=ct+"Date",et[g]=ct+"Date",et[_]=ct+"Month",et[m]=ct+"FullYear",et[u]=ct+"Hours",et[c]=ct+"Minutes",et[a]=ct+"Seconds",et[o]=ct+"Milliseconds",et)[at],Ot=at===f?this.$D+(tt-this.$W):tt;if(at===_||at===m){var Ft=this.clone().set(g,1);Ft.$d[gt](Ot),Ft.init(),this.$d=Ft.set(g,Math.min(this.$D,Ft.daysInMonth())).$d}else gt&&this.$d[gt](Ot);return this.init(),this},Z.set=function(X,tt){return this.clone().$set(X,tt)},Z.get=function(X){return this[j.p(X)]()},Z.add=function(X,tt){var et,at=this;X=Number(X);var ct=j.p(tt),gt=function(dt){var xt=z(at);return j.w(xt.date(xt.date()+Math.round(dt*X)),at)};if(ct===_)return this.set(_,this.$M+X);if(ct===m)return this.set(m,this.$y+X);if(ct===f)return gt(1);if(ct===h)return gt(7);var Ot=(et={},et[c]=i,et[u]=r,et[a]=e,et)[ct]||1,Ft=this.$d.getTime()+X*Ot;return j.w(Ft,this)},Z.subtract=function(X,tt){return this.add(-1*X,tt)},Z.format=function(X){var tt=this,et=this.$locale();if(!this.isValid())return et.invalidDate||b;var at=X||"YYYY-MM-DDTHH:mm:ssZ",ct=j.z(this),gt=this.$H,Ot=this.$m,Ft=this.$M,dt=et.weekdays,xt=et.months,Zt=et.meridiem,Qe=function(le,se,Pe,xn){return le&&(le[se]||le(tt,at))||Pe[se].slice(0,xn)},Le=function(le){return j.s(gt%12||12,le,"0")},_e=Zt||function(le,se,Pe){var xn=le<12?"AM":"PM";return Pe?xn.toLowerCase():xn};return at.replace(C,function(le,se){return se||function(Pe){switch(Pe){case"YY":return String(tt.$y).slice(-2);case"YYYY":return j.s(tt.$y,4,"0");case"M":return Ft+1;case"MM":return j.s(Ft+1,2,"0");case"MMM":return Qe(et.monthsShort,Ft,xt,3);case"MMMM":return Qe(xt,Ft);case"D":return tt.$D;case"DD":return j.s(tt.$D,2,"0");case"d":return String(tt.$W);case"dd":return Qe(et.weekdaysMin,tt.$W,dt,2);case"ddd":return Qe(et.weekdaysShort,tt.$W,dt,3);case"dddd":return dt[tt.$W];case"H":return String(gt);case"HH":return j.s(gt,2,"0");case"h":return Le(1);case"hh":return Le(2);case"a":return _e(gt,Ot,!0);case"A":return _e(gt,Ot,!1);case"m":return String(Ot);case"mm":return j.s(Ot,2,"0");case"s":return String(tt.$s);case"ss":return j.s(tt.$s,2,"0");case"SSS":return j.s(tt.$ms,3,"0");case"Z":return ct}return null}(le)||ct.replace(":","")})},Z.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},Z.diff=function(X,tt,et){var at,ct=this,gt=j.p(tt),Ot=z(X),Ft=(Ot.utcOffset()-this.utcOffset())*i,dt=this-Ot,xt=function(){return j.m(ct,Ot)};switch(gt){case m:at=xt()/12;break;case _:at=xt();break;case p:at=xt()/3;break;case h:at=(dt-Ft)/6048e5;break;case f:at=(dt-Ft)/864e5;break;case u:at=dt/r;break;case c:at=dt/i;break;case a:at=dt/e;break;default:at=dt}return et?at:j.a(at)},Z.daysInMonth=function(){return this.endOf(_).$D},Z.$locale=function(){return O[this.$L]},Z.locale=function(X,tt){if(!X)return this.$L;var et=this.clone(),at=q(X,tt,!0);return at&&(et.$L=at),et},Z.clone=function(){return j.w(this.$d,this)},Z.toDate=function(){return new Date(this.valueOf())},Z.toJSON=function(){return this.isValid()?this.toISOString():null},Z.toISOString=function(){return this.$d.toISOString()},Z.toString=function(){return this.$d.toUTCString()},nt}(),ot=Y.prototype;return z.prototype=ot,[["$ms",o],["$s",a],["$m",c],["$H",u],["$W",f],["$M",_],["$y",m],["$D",g]].forEach(function(nt){ot[nt[1]]=function(Z){return this.$g(Z,nt[0],nt[1])}}),z.extend=function(nt,Z){return nt.$i||(nt(Z,Y,z),nt.$i=!0),z},z.locale=q,z.isDayjs=B,z.unix=function(nt){return z(1e3*nt)},z.en=O[k],z.Ls=O,z.p={},z})}(ha)),ha.exports}var Wx=Hx();const mr=Sr(Wx);var bo={exports:{}},xo={exports:{}},gn={},De={},ed;function We(){if(ed)return De;ed=1,De.__esModule=!0,De.extend=r,De.indexOf=u,De.escapeExpression=f,De.isEmpty=h,De.createFrame=_,De.blockParams=p,De.appendContextPath=m;var n={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;","=":"&#x3D;"},t=/[&<>"'`=]/g,e=/[&<>"'`=]/;function i(g){return n[g]}function r(g){for(var b=1;b<arguments.length;b++)for(var w in arguments[b])Object.prototype.hasOwnProperty.call(arguments[b],w)&&(g[w]=arguments[b][w]);return g}var o=Object.prototype.toString;De.toString=o;var a=function(b){return typeof b=="function"};a(/x/)&&(De.isFunction=a=function(g){return typeof g=="function"&&o.call(g)==="[object Function]"}),De.isFunction=a;var c=Array.isArray||function(g){return g&&typeof g=="object"?o.call(g)==="[object Array]":!1};De.isArray=c;function u(g,b){for(var w=0,C=g.length;w<C;w++)if(g[w]===b)return w;return-1}function f(g){if(typeof g!="string"){if(g&&g.toHTML)return g.toHTML();if(g==null)return"";if(!g)return g+"";g=""+g}return e.test(g)?g.replace(t,i):g}function h(g){return!g&&g!==0?!0:!!(c(g)&&g.length===0)}function _(g){var b=r({},g);return b._parent=g,b}function p(g,b){return g.path=b,g}function m(g,b){return(g?g+".":"")+b}return De}var wo={exports:{}},nd;function bn(){return nd||(nd=1,function(n,t){t.__esModule=!0;var e=["description","fileName","lineNumber","endLineNumber","message","name","number","stack"];function i(r,o){var a=o&&o.loc,c=void 0,u=void 0,f=void 0,h=void 0;a&&(c=a.start.line,u=a.end.line,f=a.start.column,h=a.end.column,r+=" - "+c+":"+f);for(var _=Error.prototype.constructor.call(this,r),p=0;p<e.length;p++)this[e[p]]=_[e[p]];Error.captureStackTrace&&Error.captureStackTrace(this,i);try{a&&(this.lineNumber=c,this.endLineNumber=u,Object.defineProperty?(Object.defineProperty(this,"column",{value:f,enumerable:!0}),Object.defineProperty(this,"endColumn",{value:h,enumerable:!0})):(this.column=f,this.endColumn=h))}catch{}}i.prototype=new Error,t.default=i,n.exports=t.default}(wo,wo.exports)),wo.exports}var Ur={},So={exports:{}},id;function zx(){return id||(id=1,function(n,t){t.__esModule=!0;var e=We();t.default=function(i){i.registerHelper("blockHelperMissing",function(r,o){var a=o.inverse,c=o.fn;if(r===!0)return c(this);if(r===!1||r==null)return a(this);if(e.isArray(r))return r.length>0?(o.ids&&(o.ids=[o.name]),i.helpers.each(r,o)):a(this);if(o.data&&o.ids){var u=e.createFrame(o.data);u.contextPath=e.appendContextPath(o.data.contextPath,o.name),o={data:u}}return c(r,o)})},n.exports=t.default}(So,So.exports)),So.exports}var ko={exports:{}},rd;function jx(){return rd||(rd=1,function(n,t){t.__esModule=!0;function e(a){return a&&a.__esModule?a:{default:a}}var i=We(),r=bn(),o=e(r);t.default=function(a){a.registerHelper("each",function(c,u){if(!u)throw new o.default("Must pass iterator to #each");var f=u.fn,h=u.inverse,_=0,p="",m=void 0,g=void 0;u.data&&u.ids&&(g=i.appendContextPath(u.data.contextPath,u.ids[0])+"."),i.isFunction(c)&&(c=c.call(this)),u.data&&(m=i.createFrame(u.data));function b(S,k,O){m&&(m.key=S,m.index=k,m.first=k===0,m.last=!!O,g&&(m.contextPath=g+S)),p=p+f(c[S],{data:m,blockParams:i.blockParams([c[S],S],[g+S,null])})}if(c&&typeof c=="object")if(i.isArray(c))for(var w=c.length;_<w;_++)_ in c&&b(_,_,_===c.length-1);else if(Xn.Symbol&&c[Xn.Symbol.iterator]){for(var C=[],M=c[Xn.Symbol.iterator](),D=M.next();!D.done;D=M.next())C.push(D.value);c=C;for(var w=c.length;_<w;_++)b(_,_,_===c.length-1)}else(function(){var S=void 0;Object.keys(c).forEach(function(k){S!==void 0&&b(S,_-1),S=k,_++}),S!==void 0&&b(S,_-1,!0)})();return _===0&&(p=h(this)),p})},n.exports=t.default}(ko,ko.exports)),ko.exports}var Eo={exports:{}},sd;function Ux(){return sd||(sd=1,function(n,t){t.__esModule=!0;function e(o){return o&&o.__esModule?o:{default:o}}var i=bn(),r=e(i);t.default=function(o){o.registerHelper("helperMissing",function(){if(arguments.length!==1)throw new r.default('Missing helper: "'+arguments[arguments.length-1].name+'"')})},n.exports=t.default}(Eo,Eo.exports)),Eo.exports}var Co={exports:{}},od;function Vx(){return od||(od=1,function(n,t){t.__esModule=!0;function e(a){return a&&a.__esModule?a:{default:a}}var i=We(),r=bn(),o=e(r);t.default=function(a){a.registerHelper("if",function(c,u){if(arguments.length!=2)throw new o.default("#if requires exactly one argument");return i.isFunction(c)&&(c=c.call(this)),!u.hash.includeZero&&!c||i.isEmpty(c)?u.inverse(this):u.fn(this)}),a.registerHelper("unless",function(c,u){if(arguments.length!=2)throw new o.default("#unless requires exactly one argument");return a.helpers.if.call(this,c,{fn:u.inverse,inverse:u.fn,hash:u.hash})})},n.exports=t.default}(Co,Co.exports)),Co.exports}var Mo={exports:{}},ad;function qx(){return ad||(ad=1,function(n,t){t.__esModule=!0,t.default=function(e){e.registerHelper("log",function(){for(var i=[void 0],r=arguments[arguments.length-1],o=0;o<arguments.length-1;o++)i.push(arguments[o]);var a=1;r.hash.level!=null?a=r.hash.level:r.data&&r.data.level!=null&&(a=r.data.level),i[0]=a,e.log.apply(e,i)})},n.exports=t.default}(Mo,Mo.exports)),Mo.exports}var Ao={exports:{}},ld;function $x(){return ld||(ld=1,function(n,t){t.__esModule=!0,t.default=function(e){e.registerHelper("lookup",function(i,r,o){return i&&o.lookupProperty(i,r)})},n.exports=t.default}(Ao,Ao.exports)),Ao.exports}var Lo={exports:{}},cd;function Yx(){return cd||(cd=1,function(n,t){t.__esModule=!0;function e(a){return a&&a.__esModule?a:{default:a}}var i=We(),r=bn(),o=e(r);t.default=function(a){a.registerHelper("with",function(c,u){if(arguments.length!=2)throw new o.default("#with requires exactly one argument");i.isFunction(c)&&(c=c.call(this));var f=u.fn;if(i.isEmpty(c))return u.inverse(this);var h=u.data;return u.data&&u.ids&&(h=i.createFrame(u.data),h.contextPath=i.appendContextPath(u.data.contextPath,u.ids[0])),f(c,{data:h,blockParams:i.blockParams([c],[h&&h.contextPath])})})},n.exports=t.default}(Lo,Lo.exports)),Lo.exports}var ud;function kg(){if(ud)return Ur;ud=1,Ur.__esModule=!0,Ur.registerDefaultHelpers=b,Ur.moveHelperToHooks=w;function n(C){return C&&C.__esModule?C:{default:C}}var t=zx(),e=n(t),i=jx(),r=n(i),o=Ux(),a=n(o),c=Vx(),u=n(c),f=qx(),h=n(f),_=$x(),p=n(_),m=Yx(),g=n(m);function b(C){e.default(C),r.default(C),a.default(C),u.default(C),h.default(C),p.default(C),g.default(C)}function w(C,M,D){C.helpers[M]&&(C.hooks[M]=C.helpers[M],D||delete C.helpers[M])}return Ur}var Po={},Oo={exports:{}},hd;function Gx(){return hd||(hd=1,function(n,t){t.__esModule=!0;var e=We();t.default=function(i){i.registerDecorator("inline",function(r,o,a,c){var u=r;return o.partials||(o.partials={},u=function(f,h){var _=a.partials;a.partials=e.extend({},_,o.partials);var p=r(f,h);return a.partials=_,p}),o.partials[c.args[0]]=c.fn,u})},n.exports=t.default}(Oo,Oo.exports)),Oo.exports}var fd;function Kx(){if(fd)return Po;fd=1,Po.__esModule=!0,Po.registerDefaultDecorators=i;function n(r){return r&&r.__esModule?r:{default:r}}var t=Gx(),e=n(t);function i(r){e.default(r)}return Po}var Ro={exports:{}},dd;function Eg(){return dd||(dd=1,function(n,t){t.__esModule=!0;var e=We(),i={methodMap:["debug","info","warn","error"],level:"info",lookupLevel:function(o){if(typeof o=="string"){var a=e.indexOf(i.methodMap,o.toLowerCase());a>=0?o=a:o=parseInt(o,10)}return o},log:function(o){if(o=i.lookupLevel(o),typeof console<"u"&&i.lookupLevel(i.level)<=o){var a=i.methodMap[o];console[a]||(a="log");for(var c=arguments.length,u=Array(c>1?c-1:0),f=1;f<c;f++)u[f-1]=arguments[f];console[a].apply(console,u)}}};t.default=i,n.exports=t.default}(Ro,Ro.exports)),Ro.exports}var cr={},Io={},pd;function Xx(){if(pd)return Io;pd=1,Io.__esModule=!0,Io.createNewLookupObject=t;var n=We();function t(){for(var e=arguments.length,i=Array(e),r=0;r<e;r++)i[r]=arguments[r];return n.extend.apply(void 0,[Object.create(null)].concat(i))}return Io}var gd;function Cg(){if(gd)return cr;gd=1,cr.__esModule=!0,cr.createProtoAccessControl=o,cr.resultIsAllowed=a,cr.resetLoggedProperties=f;function n(h){if(h&&h.__esModule)return h;var _={};if(h!=null)for(var p in h)Object.prototype.hasOwnProperty.call(h,p)&&(_[p]=h[p]);return _.default=h,_}var t=Xx(),e=Eg(),i=n(e),r=Object.create(null);function o(h){var _=Object.create(null);_.constructor=!1,_.__defineGetter__=!1,_.__defineSetter__=!1,_.__lookupGetter__=!1;var p=Object.create(null);return p.__proto__=!1,{properties:{whitelist:t.createNewLookupObject(p,h.allowedProtoProperties),defaultValue:h.allowProtoPropertiesByDefault},methods:{whitelist:t.createNewLookupObject(_,h.allowedProtoMethods),defaultValue:h.allowProtoMethodsByDefault}}}function a(h,_,p){return c(typeof h=="function"?_.methods:_.properties,p)}function c(h,_){return h.whitelist[_]!==void 0?h.whitelist[_]===!0:h.defaultValue!==void 0?h.defaultValue:(u(_),!1)}function u(h){r[h]!==!0&&(r[h]=!0,i.log("error",'Handlebars: Access has been denied to resolve the property "'+h+`" because it is not an "own property" of its parent.
2
- You can add a runtime option to disable the check or this warning:
3
- See https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details`))}function f(){Object.keys(r).forEach(function(h){delete r[h]})}return cr}var md;function Xc(){if(md)return gn;md=1,gn.__esModule=!0,gn.HandlebarsEnvironment=g;function n(w){return w&&w.__esModule?w:{default:w}}var t=We(),e=bn(),i=n(e),r=kg(),o=Kx(),a=Eg(),c=n(a),u=Cg(),f="4.7.7";gn.VERSION=f;var h=8;gn.COMPILER_REVISION=h;var _=7;gn.LAST_COMPATIBLE_COMPILER_REVISION=_;var p={1:"<= 1.0.rc.2",2:"== 1.0.0-rc.3",3:"== 1.0.0-rc.4",4:"== 1.x.x",5:"== 2.0.0-alpha.x",6:">= 2.0.0-beta.1",7:">= 4.0.0 <4.3.0",8:">= 4.3.0"};gn.REVISION_CHANGES=p;var m="[object Object]";function g(w,C,M){this.helpers=w||{},this.partials=C||{},this.decorators=M||{},r.registerDefaultHelpers(this),o.registerDefaultDecorators(this)}g.prototype={constructor:g,logger:c.default,log:c.default.log,registerHelper:function(C,M){if(t.toString.call(C)===m){if(M)throw new i.default("Arg not supported with multiple helpers");t.extend(this.helpers,C)}else this.helpers[C]=M},unregisterHelper:function(C){delete this.helpers[C]},registerPartial:function(C,M){if(t.toString.call(C)===m)t.extend(this.partials,C);else{if(typeof M>"u")throw new i.default('Attempting to register a partial called "'+C+'" as undefined');this.partials[C]=M}},unregisterPartial:function(C){delete this.partials[C]},registerDecorator:function(C,M){if(t.toString.call(C)===m){if(M)throw new i.default("Arg not supported with multiple decorators");t.extend(this.decorators,C)}else this.decorators[C]=M},unregisterDecorator:function(C){delete this.decorators[C]},resetLoggedPropertyAccesses:function(){u.resetLoggedProperties()}};var b=c.default.log;return gn.log=b,gn.createFrame=t.createFrame,gn.logger=c.default,gn}var To={exports:{}},_d;function Jx(){return _d||(_d=1,function(n,t){t.__esModule=!0;function e(i){this.string=i}e.prototype.toString=e.prototype.toHTML=function(){return""+this.string},t.default=e,n.exports=t.default}(To,To.exports)),To.exports}var Un={},Do={},yd;function Zx(){if(yd)return Do;yd=1,Do.__esModule=!0,Do.wrapHelper=n;function n(t,e){if(typeof t!="function")return t;var i=function(){var o=arguments[arguments.length-1];return arguments[arguments.length-1]=e(o),t.apply(this,arguments)};return i}return Do}var vd;function Qx(){if(vd)return Un;vd=1,Un.__esModule=!0,Un.checkRevision=h,Un.template=_,Un.wrapProgram=p,Un.resolvePartial=m,Un.invokePartial=g,Un.noop=b;function n(S){return S&&S.__esModule?S:{default:S}}function t(S){if(S&&S.__esModule)return S;var k={};if(S!=null)for(var O in S)Object.prototype.hasOwnProperty.call(S,O)&&(k[O]=S[O]);return k.default=S,k}var e=We(),i=t(e),r=bn(),o=n(r),a=Xc(),c=kg(),u=Zx(),f=Cg();function h(S){var k=S&&S[0]||1,O=a.COMPILER_REVISION;if(!(k>=a.LAST_COMPATIBLE_COMPILER_REVISION&&k<=a.COMPILER_REVISION))if(k<a.LAST_COMPATIBLE_COMPILER_REVISION){var I=a.REVISION_CHANGES[O],B=a.REVISION_CHANGES[k];throw new o.default("Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version ("+I+") or downgrade your runtime to an older version ("+B+").")}else throw new o.default("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version ("+S[1]+").")}function _(S,k){if(!k)throw new o.default("No environment passed to template");if(!S||!S.main)throw new o.default("Unknown template object: "+typeof S);S.main.decorator=S.main_d,k.VM.checkRevision(S.compiler);var O=S.compiler&&S.compiler[0]===7;function I(z,j,Y){Y.hash&&(j=i.extend({},j,Y.hash),Y.ids&&(Y.ids[0]=!0)),z=k.VM.resolvePartial.call(this,z,j,Y);var ot=i.extend({},Y,{hooks:this.hooks,protoAccessControl:this.protoAccessControl}),nt=k.VM.invokePartial.call(this,z,j,ot);if(nt==null&&k.compile&&(Y.partials[Y.name]=k.compile(z,S.compilerOptions,k),nt=Y.partials[Y.name](j,ot)),nt!=null){if(Y.indent){for(var Z=nt.split(`
4
- `),X=0,tt=Z.length;X<tt&&!(!Z[X]&&X+1===tt);X++)Z[X]=Y.indent+Z[X];nt=Z.join(`
5
- `)}return nt}else throw new o.default("The partial "+Y.name+" could not be compiled when running in runtime-only mode")}var B={strict:function(j,Y,ot){if(!j||!(Y in j))throw new o.default('"'+Y+'" not defined in '+j,{loc:ot});return B.lookupProperty(j,Y)},lookupProperty:function(j,Y){var ot=j[Y];if(ot==null||Object.prototype.hasOwnProperty.call(j,Y)||f.resultIsAllowed(ot,B.protoAccessControl,Y))return ot},lookup:function(j,Y){for(var ot=j.length,nt=0;nt<ot;nt++){var Z=j[nt]&&B.lookupProperty(j[nt],Y);if(Z!=null)return j[nt][Y]}},lambda:function(j,Y){return typeof j=="function"?j.call(Y):j},escapeExpression:i.escapeExpression,invokePartial:I,fn:function(j){var Y=S[j];return Y.decorator=S[j+"_d"],Y},programs:[],program:function(j,Y,ot,nt,Z){var X=this.programs[j],tt=this.fn(j);return Y||Z||nt||ot?X=p(this,j,tt,Y,ot,nt,Z):X||(X=this.programs[j]=p(this,j,tt)),X},data:function(j,Y){for(;j&&Y--;)j=j._parent;return j},mergeIfNeeded:function(j,Y){var ot=j||Y;return j&&Y&&j!==Y&&(ot=i.extend({},Y,j)),ot},nullContext:Object.seal({}),noop:k.VM.noop,compilerInfo:S.compiler};function q(z){var j=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],Y=j.data;q._setup(j),!j.partial&&S.useData&&(Y=w(z,Y));var ot=void 0,nt=S.useBlockParams?[]:void 0;S.useDepths&&(j.depths?ot=z!=j.depths[0]?[z].concat(j.depths):j.depths:ot=[z]);function Z(X){return""+S.main(B,X,B.helpers,B.partials,Y,nt,ot)}return Z=C(S.main,Z,B,j.depths||[],Y,nt),Z(z,j)}return q.isTop=!0,q._setup=function(z){if(z.partial)B.protoAccessControl=z.protoAccessControl,B.helpers=z.helpers,B.partials=z.partials,B.decorators=z.decorators,B.hooks=z.hooks;else{var j=i.extend({},k.helpers,z.helpers);M(j,B),B.helpers=j,S.usePartial&&(B.partials=B.mergeIfNeeded(z.partials,k.partials)),(S.usePartial||S.useDecorators)&&(B.decorators=i.extend({},k.decorators,z.decorators)),B.hooks={},B.protoAccessControl=f.createProtoAccessControl(z);var Y=z.allowCallsToHelperMissing||O;c.moveHelperToHooks(B,"helperMissing",Y),c.moveHelperToHooks(B,"blockHelperMissing",Y)}},q._child=function(z,j,Y,ot){if(S.useBlockParams&&!Y)throw new o.default("must pass block params");if(S.useDepths&&!ot)throw new o.default("must pass parent depths");return p(B,z,S[z],j,0,Y,ot)},q}function p(S,k,O,I,B,q,z){function j(Y){var ot=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],nt=z;return z&&Y!=z[0]&&!(Y===S.nullContext&&z[0]===null)&&(nt=[Y].concat(z)),O(S,Y,S.helpers,S.partials,ot.data||I,q&&[ot.blockParams].concat(q),nt)}return j=C(O,j,S,z,I,q),j.program=k,j.depth=z?z.length:0,j.blockParams=B||0,j}function m(S,k,O){return S?!S.call&&!O.name&&(O.name=S,S=O.partials[S]):O.name==="@partial-block"?S=O.data["partial-block"]:S=O.partials[O.name],S}function g(S,k,O){var I=O.data&&O.data["partial-block"];O.partial=!0,O.ids&&(O.data.contextPath=O.ids[0]||O.data.contextPath);var B=void 0;if(O.fn&&O.fn!==b&&function(){O.data=a.createFrame(O.data);var q=O.fn;B=O.data["partial-block"]=function(j){var Y=arguments.length<=1||arguments[1]===void 0?{}:arguments[1];return Y.data=a.createFrame(Y.data),Y.data["partial-block"]=I,q(j,Y)},q.partials&&(O.partials=i.extend({},O.partials,q.partials))}(),S===void 0&&B&&(S=B),S===void 0)throw new o.default("The partial "+O.name+" could not be found");if(S instanceof Function)return S(k,O)}function b(){return""}function w(S,k){return(!k||!("root"in k))&&(k=k?a.createFrame(k):{},k.root=S),k}function C(S,k,O,I,B,q){if(S.decorator){var z={};k=S.decorator(k,z,O,I&&I[0],B,q,I),i.extend(k,z)}return k}function M(S,k){Object.keys(S).forEach(function(O){var I=S[O];S[O]=D(I,k)})}function D(S,k){var O=k.lookupProperty;return u.wrapHelper(S,function(I){return i.extend({lookupProperty:O},I)})}return Un}var Bo={exports:{}},bd;function Mg(){return bd||(bd=1,function(n,t){t.__esModule=!0,t.default=function(e){var i=typeof Xn<"u"?Xn:window,r=i.Handlebars;e.noConflict=function(){return i.Handlebars===e&&(i.Handlebars=r),e}},n.exports=t.default}(Bo,Bo.exports)),Bo.exports}var xd;function tw(){return xd||(xd=1,function(n,t){t.__esModule=!0;function e(M){return M&&M.__esModule?M:{default:M}}function i(M){if(M&&M.__esModule)return M;var D={};if(M!=null)for(var S in M)Object.prototype.hasOwnProperty.call(M,S)&&(D[S]=M[S]);return D.default=M,D}var r=Xc(),o=i(r),a=Jx(),c=e(a),u=bn(),f=e(u),h=We(),_=i(h),p=Qx(),m=i(p),g=Mg(),b=e(g);function w(){var M=new o.HandlebarsEnvironment;return _.extend(M,o),M.SafeString=c.default,M.Exception=f.default,M.Utils=_,M.escapeExpression=_.escapeExpression,M.VM=m,M.template=function(D){return m.template(D,M)},M}var C=w();C.create=w,b.default(C),C.default=C,t.default=C,n.exports=t.default}(xo,xo.exports)),xo.exports}var Fo={exports:{}},wd;function Ag(){return wd||(wd=1,function(n,t){t.__esModule=!0;var e={helpers:{helperExpression:function(r){return r.type==="SubExpression"||(r.type==="MustacheStatement"||r.type==="BlockStatement")&&!!(r.params&&r.params.length||r.hash)},scopedId:function(r){return/^\.|this\b/.test(r.original)},simpleId:function(r){return r.parts.length===1&&!e.helpers.scopedId(r)&&!r.depth}}};t.default=e,n.exports=t.default}(Fo,Fo.exports)),Fo.exports}var ur={},No={exports:{}},Sd;function ew(){return Sd||(Sd=1,function(n,t){t.__esModule=!0;var e=function(){var i={trace:function(){},yy:{},symbols_:{error:2,root:3,program:4,EOF:5,program_repetition0:6,statement:7,mustache:8,block:9,rawBlock:10,partial:11,partialBlock:12,content:13,COMMENT:14,CONTENT:15,openRawBlock:16,rawBlock_repetition0:17,END_RAW_BLOCK:18,OPEN_RAW_BLOCK:19,helperName:20,openRawBlock_repetition0:21,openRawBlock_option0:22,CLOSE_RAW_BLOCK:23,openBlock:24,block_option0:25,closeBlock:26,openInverse:27,block_option1:28,OPEN_BLOCK:29,openBlock_repetition0:30,openBlock_option0:31,openBlock_option1:32,CLOSE:33,OPEN_INVERSE:34,openInverse_repetition0:35,openInverse_option0:36,openInverse_option1:37,openInverseChain:38,OPEN_INVERSE_CHAIN:39,openInverseChain_repetition0:40,openInverseChain_option0:41,openInverseChain_option1:42,inverseAndProgram:43,INVERSE:44,inverseChain:45,inverseChain_option0:46,OPEN_ENDBLOCK:47,OPEN:48,mustache_repetition0:49,mustache_option0:50,OPEN_UNESCAPED:51,mustache_repetition1:52,mustache_option1:53,CLOSE_UNESCAPED:54,OPEN_PARTIAL:55,partialName:56,partial_repetition0:57,partial_option0:58,openPartialBlock:59,OPEN_PARTIAL_BLOCK:60,openPartialBlock_repetition0:61,openPartialBlock_option0:62,param:63,sexpr:64,OPEN_SEXPR:65,sexpr_repetition0:66,sexpr_option0:67,CLOSE_SEXPR:68,hash:69,hash_repetition_plus0:70,hashSegment:71,ID:72,EQUALS:73,blockParams:74,OPEN_BLOCK_PARAMS:75,blockParams_repetition_plus0:76,CLOSE_BLOCK_PARAMS:77,path:78,dataName:79,STRING:80,NUMBER:81,BOOLEAN:82,UNDEFINED:83,NULL:84,DATA:85,pathSegments:86,SEP:87,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",14:"COMMENT",15:"CONTENT",18:"END_RAW_BLOCK",19:"OPEN_RAW_BLOCK",23:"CLOSE_RAW_BLOCK",29:"OPEN_BLOCK",33:"CLOSE",34:"OPEN_INVERSE",39:"OPEN_INVERSE_CHAIN",44:"INVERSE",47:"OPEN_ENDBLOCK",48:"OPEN",51:"OPEN_UNESCAPED",54:"CLOSE_UNESCAPED",55:"OPEN_PARTIAL",60:"OPEN_PARTIAL_BLOCK",65:"OPEN_SEXPR",68:"CLOSE_SEXPR",72:"ID",73:"EQUALS",75:"OPEN_BLOCK_PARAMS",77:"CLOSE_BLOCK_PARAMS",80:"STRING",81:"NUMBER",82:"BOOLEAN",83:"UNDEFINED",84:"NULL",85:"DATA",87:"SEP"},productions_:[0,[3,2],[4,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[13,1],[10,3],[16,5],[9,4],[9,4],[24,6],[27,6],[38,6],[43,2],[45,3],[45,1],[26,3],[8,5],[8,5],[11,5],[12,3],[59,5],[63,1],[63,1],[64,5],[69,1],[71,3],[74,3],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[56,1],[56,1],[79,2],[78,1],[86,3],[86,1],[6,0],[6,2],[17,0],[17,2],[21,0],[21,2],[22,0],[22,1],[25,0],[25,1],[28,0],[28,1],[30,0],[30,2],[31,0],[31,1],[32,0],[32,1],[35,0],[35,2],[36,0],[36,1],[37,0],[37,1],[40,0],[40,2],[41,0],[41,1],[42,0],[42,1],[46,0],[46,1],[49,0],[49,2],[50,0],[50,1],[52,0],[52,2],[53,0],[53,1],[57,0],[57,2],[58,0],[58,1],[61,0],[61,2],[62,0],[62,1],[66,0],[66,2],[67,0],[67,1],[70,1],[70,2],[76,1],[76,2]],performAction:function(c,u,f,h,_,p,m){var g=p.length-1;switch(_){case 1:return p[g-1];case 2:this.$=h.prepareProgram(p[g]);break;case 3:this.$=p[g];break;case 4:this.$=p[g];break;case 5:this.$=p[g];break;case 6:this.$=p[g];break;case 7:this.$=p[g];break;case 8:this.$=p[g];break;case 9:this.$={type:"CommentStatement",value:h.stripComment(p[g]),strip:h.stripFlags(p[g],p[g]),loc:h.locInfo(this._$)};break;case 10:this.$={type:"ContentStatement",original:p[g],value:p[g],loc:h.locInfo(this._$)};break;case 11:this.$=h.prepareRawBlock(p[g-2],p[g-1],p[g],this._$);break;case 12:this.$={path:p[g-3],params:p[g-2],hash:p[g-1]};break;case 13:this.$=h.prepareBlock(p[g-3],p[g-2],p[g-1],p[g],!1,this._$);break;case 14:this.$=h.prepareBlock(p[g-3],p[g-2],p[g-1],p[g],!0,this._$);break;case 15:this.$={open:p[g-5],path:p[g-4],params:p[g-3],hash:p[g-2],blockParams:p[g-1],strip:h.stripFlags(p[g-5],p[g])};break;case 16:this.$={path:p[g-4],params:p[g-3],hash:p[g-2],blockParams:p[g-1],strip:h.stripFlags(p[g-5],p[g])};break;case 17:this.$={path:p[g-4],params:p[g-3],hash:p[g-2],blockParams:p[g-1],strip:h.stripFlags(p[g-5],p[g])};break;case 18:this.$={strip:h.stripFlags(p[g-1],p[g-1]),program:p[g]};break;case 19:var b=h.prepareBlock(p[g-2],p[g-1],p[g],p[g],!1,this._$),w=h.prepareProgram([b],p[g-1].loc);w.chained=!0,this.$={strip:p[g-2].strip,program:w,chain:!0};break;case 20:this.$=p[g];break;case 21:this.$={path:p[g-1],strip:h.stripFlags(p[g-2],p[g])};break;case 22:this.$=h.prepareMustache(p[g-3],p[g-2],p[g-1],p[g-4],h.stripFlags(p[g-4],p[g]),this._$);break;case 23:this.$=h.prepareMustache(p[g-3],p[g-2],p[g-1],p[g-4],h.stripFlags(p[g-4],p[g]),this._$);break;case 24:this.$={type:"PartialStatement",name:p[g-3],params:p[g-2],hash:p[g-1],indent:"",strip:h.stripFlags(p[g-4],p[g]),loc:h.locInfo(this._$)};break;case 25:this.$=h.preparePartialBlock(p[g-2],p[g-1],p[g],this._$);break;case 26:this.$={path:p[g-3],params:p[g-2],hash:p[g-1],strip:h.stripFlags(p[g-4],p[g])};break;case 27:this.$=p[g];break;case 28:this.$=p[g];break;case 29:this.$={type:"SubExpression",path:p[g-3],params:p[g-2],hash:p[g-1],loc:h.locInfo(this._$)};break;case 30:this.$={type:"Hash",pairs:p[g],loc:h.locInfo(this._$)};break;case 31:this.$={type:"HashPair",key:h.id(p[g-2]),value:p[g],loc:h.locInfo(this._$)};break;case 32:this.$=h.id(p[g-1]);break;case 33:this.$=p[g];break;case 34:this.$=p[g];break;case 35:this.$={type:"StringLiteral",value:p[g],original:p[g],loc:h.locInfo(this._$)};break;case 36:this.$={type:"NumberLiteral",value:Number(p[g]),original:Number(p[g]),loc:h.locInfo(this._$)};break;case 37:this.$={type:"BooleanLiteral",value:p[g]==="true",original:p[g]==="true",loc:h.locInfo(this._$)};break;case 38:this.$={type:"UndefinedLiteral",original:void 0,value:void 0,loc:h.locInfo(this._$)};break;case 39:this.$={type:"NullLiteral",original:null,value:null,loc:h.locInfo(this._$)};break;case 40:this.$=p[g];break;case 41:this.$=p[g];break;case 42:this.$=h.preparePath(!0,p[g],this._$);break;case 43:this.$=h.preparePath(!1,p[g],this._$);break;case 44:p[g-2].push({part:h.id(p[g]),original:p[g],separator:p[g-1]}),this.$=p[g-2];break;case 45:this.$=[{part:h.id(p[g]),original:p[g]}];break;case 46:this.$=[];break;case 47:p[g-1].push(p[g]);break;case 48:this.$=[];break;case 49:p[g-1].push(p[g]);break;case 50:this.$=[];break;case 51:p[g-1].push(p[g]);break;case 58:this.$=[];break;case 59:p[g-1].push(p[g]);break;case 64:this.$=[];break;case 65:p[g-1].push(p[g]);break;case 70:this.$=[];break;case 71:p[g-1].push(p[g]);break;case 78:this.$=[];break;case 79:p[g-1].push(p[g]);break;case 82:this.$=[];break;case 83:p[g-1].push(p[g]);break;case 86:this.$=[];break;case 87:p[g-1].push(p[g]);break;case 90:this.$=[];break;case 91:p[g-1].push(p[g]);break;case 94:this.$=[];break;case 95:p[g-1].push(p[g]);break;case 98:this.$=[p[g]];break;case 99:p[g-1].push(p[g]);break;case 100:this.$=[p[g]];break;case 101:p[g-1].push(p[g]);break}},table:[{3:1,4:2,5:[2,46],6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{1:[3]},{5:[1,4]},{5:[2,2],7:5,8:6,9:7,10:8,11:9,12:10,13:11,14:[1,12],15:[1,20],16:17,19:[1,23],24:15,27:16,29:[1,21],34:[1,22],39:[2,2],44:[2,2],47:[2,2],48:[1,13],51:[1,14],55:[1,18],59:19,60:[1,24]},{1:[2,1]},{5:[2,47],14:[2,47],15:[2,47],19:[2,47],29:[2,47],34:[2,47],39:[2,47],44:[2,47],47:[2,47],48:[2,47],51:[2,47],55:[2,47],60:[2,47]},{5:[2,3],14:[2,3],15:[2,3],19:[2,3],29:[2,3],34:[2,3],39:[2,3],44:[2,3],47:[2,3],48:[2,3],51:[2,3],55:[2,3],60:[2,3]},{5:[2,4],14:[2,4],15:[2,4],19:[2,4],29:[2,4],34:[2,4],39:[2,4],44:[2,4],47:[2,4],48:[2,4],51:[2,4],55:[2,4],60:[2,4]},{5:[2,5],14:[2,5],15:[2,5],19:[2,5],29:[2,5],34:[2,5],39:[2,5],44:[2,5],47:[2,5],48:[2,5],51:[2,5],55:[2,5],60:[2,5]},{5:[2,6],14:[2,6],15:[2,6],19:[2,6],29:[2,6],34:[2,6],39:[2,6],44:[2,6],47:[2,6],48:[2,6],51:[2,6],55:[2,6],60:[2,6]},{5:[2,7],14:[2,7],15:[2,7],19:[2,7],29:[2,7],34:[2,7],39:[2,7],44:[2,7],47:[2,7],48:[2,7],51:[2,7],55:[2,7],60:[2,7]},{5:[2,8],14:[2,8],15:[2,8],19:[2,8],29:[2,8],34:[2,8],39:[2,8],44:[2,8],47:[2,8],48:[2,8],51:[2,8],55:[2,8],60:[2,8]},{5:[2,9],14:[2,9],15:[2,9],19:[2,9],29:[2,9],34:[2,9],39:[2,9],44:[2,9],47:[2,9],48:[2,9],51:[2,9],55:[2,9],60:[2,9]},{20:25,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:36,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:37,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],39:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{4:38,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{15:[2,48],17:39,18:[2,48]},{20:41,56:40,64:42,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:44,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{5:[2,10],14:[2,10],15:[2,10],18:[2,10],19:[2,10],29:[2,10],34:[2,10],39:[2,10],44:[2,10],47:[2,10],48:[2,10],51:[2,10],55:[2,10],60:[2,10]},{20:45,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:46,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:47,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:41,56:48,64:42,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[2,78],49:49,65:[2,78],72:[2,78],80:[2,78],81:[2,78],82:[2,78],83:[2,78],84:[2,78],85:[2,78]},{23:[2,33],33:[2,33],54:[2,33],65:[2,33],68:[2,33],72:[2,33],75:[2,33],80:[2,33],81:[2,33],82:[2,33],83:[2,33],84:[2,33],85:[2,33]},{23:[2,34],33:[2,34],54:[2,34],65:[2,34],68:[2,34],72:[2,34],75:[2,34],80:[2,34],81:[2,34],82:[2,34],83:[2,34],84:[2,34],85:[2,34]},{23:[2,35],33:[2,35],54:[2,35],65:[2,35],68:[2,35],72:[2,35],75:[2,35],80:[2,35],81:[2,35],82:[2,35],83:[2,35],84:[2,35],85:[2,35]},{23:[2,36],33:[2,36],54:[2,36],65:[2,36],68:[2,36],72:[2,36],75:[2,36],80:[2,36],81:[2,36],82:[2,36],83:[2,36],84:[2,36],85:[2,36]},{23:[2,37],33:[2,37],54:[2,37],65:[2,37],68:[2,37],72:[2,37],75:[2,37],80:[2,37],81:[2,37],82:[2,37],83:[2,37],84:[2,37],85:[2,37]},{23:[2,38],33:[2,38],54:[2,38],65:[2,38],68:[2,38],72:[2,38],75:[2,38],80:[2,38],81:[2,38],82:[2,38],83:[2,38],84:[2,38],85:[2,38]},{23:[2,39],33:[2,39],54:[2,39],65:[2,39],68:[2,39],72:[2,39],75:[2,39],80:[2,39],81:[2,39],82:[2,39],83:[2,39],84:[2,39],85:[2,39]},{23:[2,43],33:[2,43],54:[2,43],65:[2,43],68:[2,43],72:[2,43],75:[2,43],80:[2,43],81:[2,43],82:[2,43],83:[2,43],84:[2,43],85:[2,43],87:[1,50]},{72:[1,35],86:51},{23:[2,45],33:[2,45],54:[2,45],65:[2,45],68:[2,45],72:[2,45],75:[2,45],80:[2,45],81:[2,45],82:[2,45],83:[2,45],84:[2,45],85:[2,45],87:[2,45]},{52:52,54:[2,82],65:[2,82],72:[2,82],80:[2,82],81:[2,82],82:[2,82],83:[2,82],84:[2,82],85:[2,82]},{25:53,38:55,39:[1,57],43:56,44:[1,58],45:54,47:[2,54]},{28:59,43:60,44:[1,58],47:[2,56]},{13:62,15:[1,20],18:[1,61]},{33:[2,86],57:63,65:[2,86],72:[2,86],80:[2,86],81:[2,86],82:[2,86],83:[2,86],84:[2,86],85:[2,86]},{33:[2,40],65:[2,40],72:[2,40],80:[2,40],81:[2,40],82:[2,40],83:[2,40],84:[2,40],85:[2,40]},{33:[2,41],65:[2,41],72:[2,41],80:[2,41],81:[2,41],82:[2,41],83:[2,41],84:[2,41],85:[2,41]},{20:64,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{26:65,47:[1,66]},{30:67,33:[2,58],65:[2,58],72:[2,58],75:[2,58],80:[2,58],81:[2,58],82:[2,58],83:[2,58],84:[2,58],85:[2,58]},{33:[2,64],35:68,65:[2,64],72:[2,64],75:[2,64],80:[2,64],81:[2,64],82:[2,64],83:[2,64],84:[2,64],85:[2,64]},{21:69,23:[2,50],65:[2,50],72:[2,50],80:[2,50],81:[2,50],82:[2,50],83:[2,50],84:[2,50],85:[2,50]},{33:[2,90],61:70,65:[2,90],72:[2,90],80:[2,90],81:[2,90],82:[2,90],83:[2,90],84:[2,90],85:[2,90]},{20:74,33:[2,80],50:71,63:72,64:75,65:[1,43],69:73,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{72:[1,79]},{23:[2,42],33:[2,42],54:[2,42],65:[2,42],68:[2,42],72:[2,42],75:[2,42],80:[2,42],81:[2,42],82:[2,42],83:[2,42],84:[2,42],85:[2,42],87:[1,50]},{20:74,53:80,54:[2,84],63:81,64:75,65:[1,43],69:82,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{26:83,47:[1,66]},{47:[2,55]},{4:84,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],39:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{47:[2,20]},{20:85,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:86,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{26:87,47:[1,66]},{47:[2,57]},{5:[2,11],14:[2,11],15:[2,11],19:[2,11],29:[2,11],34:[2,11],39:[2,11],44:[2,11],47:[2,11],48:[2,11],51:[2,11],55:[2,11],60:[2,11]},{15:[2,49],18:[2,49]},{20:74,33:[2,88],58:88,63:89,64:75,65:[1,43],69:90,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{65:[2,94],66:91,68:[2,94],72:[2,94],80:[2,94],81:[2,94],82:[2,94],83:[2,94],84:[2,94],85:[2,94]},{5:[2,25],14:[2,25],15:[2,25],19:[2,25],29:[2,25],34:[2,25],39:[2,25],44:[2,25],47:[2,25],48:[2,25],51:[2,25],55:[2,25],60:[2,25]},{20:92,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,31:93,33:[2,60],63:94,64:75,65:[1,43],69:95,70:76,71:77,72:[1,78],75:[2,60],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,33:[2,66],36:96,63:97,64:75,65:[1,43],69:98,70:76,71:77,72:[1,78],75:[2,66],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,22:99,23:[2,52],63:100,64:75,65:[1,43],69:101,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,33:[2,92],62:102,63:103,64:75,65:[1,43],69:104,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[1,105]},{33:[2,79],65:[2,79],72:[2,79],80:[2,79],81:[2,79],82:[2,79],83:[2,79],84:[2,79],85:[2,79]},{33:[2,81]},{23:[2,27],33:[2,27],54:[2,27],65:[2,27],68:[2,27],72:[2,27],75:[2,27],80:[2,27],81:[2,27],82:[2,27],83:[2,27],84:[2,27],85:[2,27]},{23:[2,28],33:[2,28],54:[2,28],65:[2,28],68:[2,28],72:[2,28],75:[2,28],80:[2,28],81:[2,28],82:[2,28],83:[2,28],84:[2,28],85:[2,28]},{23:[2,30],33:[2,30],54:[2,30],68:[2,30],71:106,72:[1,107],75:[2,30]},{23:[2,98],33:[2,98],54:[2,98],68:[2,98],72:[2,98],75:[2,98]},{23:[2,45],33:[2,45],54:[2,45],65:[2,45],68:[2,45],72:[2,45],73:[1,108],75:[2,45],80:[2,45],81:[2,45],82:[2,45],83:[2,45],84:[2,45],85:[2,45],87:[2,45]},{23:[2,44],33:[2,44],54:[2,44],65:[2,44],68:[2,44],72:[2,44],75:[2,44],80:[2,44],81:[2,44],82:[2,44],83:[2,44],84:[2,44],85:[2,44],87:[2,44]},{54:[1,109]},{54:[2,83],65:[2,83],72:[2,83],80:[2,83],81:[2,83],82:[2,83],83:[2,83],84:[2,83],85:[2,83]},{54:[2,85]},{5:[2,13],14:[2,13],15:[2,13],19:[2,13],29:[2,13],34:[2,13],39:[2,13],44:[2,13],47:[2,13],48:[2,13],51:[2,13],55:[2,13],60:[2,13]},{38:55,39:[1,57],43:56,44:[1,58],45:111,46:110,47:[2,76]},{33:[2,70],40:112,65:[2,70],72:[2,70],75:[2,70],80:[2,70],81:[2,70],82:[2,70],83:[2,70],84:[2,70],85:[2,70]},{47:[2,18]},{5:[2,14],14:[2,14],15:[2,14],19:[2,14],29:[2,14],34:[2,14],39:[2,14],44:[2,14],47:[2,14],48:[2,14],51:[2,14],55:[2,14],60:[2,14]},{33:[1,113]},{33:[2,87],65:[2,87],72:[2,87],80:[2,87],81:[2,87],82:[2,87],83:[2,87],84:[2,87],85:[2,87]},{33:[2,89]},{20:74,63:115,64:75,65:[1,43],67:114,68:[2,96],69:116,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[1,117]},{32:118,33:[2,62],74:119,75:[1,120]},{33:[2,59],65:[2,59],72:[2,59],75:[2,59],80:[2,59],81:[2,59],82:[2,59],83:[2,59],84:[2,59],85:[2,59]},{33:[2,61],75:[2,61]},{33:[2,68],37:121,74:122,75:[1,120]},{33:[2,65],65:[2,65],72:[2,65],75:[2,65],80:[2,65],81:[2,65],82:[2,65],83:[2,65],84:[2,65],85:[2,65]},{33:[2,67],75:[2,67]},{23:[1,123]},{23:[2,51],65:[2,51],72:[2,51],80:[2,51],81:[2,51],82:[2,51],83:[2,51],84:[2,51],85:[2,51]},{23:[2,53]},{33:[1,124]},{33:[2,91],65:[2,91],72:[2,91],80:[2,91],81:[2,91],82:[2,91],83:[2,91],84:[2,91],85:[2,91]},{33:[2,93]},{5:[2,22],14:[2,22],15:[2,22],19:[2,22],29:[2,22],34:[2,22],39:[2,22],44:[2,22],47:[2,22],48:[2,22],51:[2,22],55:[2,22],60:[2,22]},{23:[2,99],33:[2,99],54:[2,99],68:[2,99],72:[2,99],75:[2,99]},{73:[1,108]},{20:74,63:125,64:75,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{5:[2,23],14:[2,23],15:[2,23],19:[2,23],29:[2,23],34:[2,23],39:[2,23],44:[2,23],47:[2,23],48:[2,23],51:[2,23],55:[2,23],60:[2,23]},{47:[2,19]},{47:[2,77]},{20:74,33:[2,72],41:126,63:127,64:75,65:[1,43],69:128,70:76,71:77,72:[1,78],75:[2,72],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{5:[2,24],14:[2,24],15:[2,24],19:[2,24],29:[2,24],34:[2,24],39:[2,24],44:[2,24],47:[2,24],48:[2,24],51:[2,24],55:[2,24],60:[2,24]},{68:[1,129]},{65:[2,95],68:[2,95],72:[2,95],80:[2,95],81:[2,95],82:[2,95],83:[2,95],84:[2,95],85:[2,95]},{68:[2,97]},{5:[2,21],14:[2,21],15:[2,21],19:[2,21],29:[2,21],34:[2,21],39:[2,21],44:[2,21],47:[2,21],48:[2,21],51:[2,21],55:[2,21],60:[2,21]},{33:[1,130]},{33:[2,63]},{72:[1,132],76:131},{33:[1,133]},{33:[2,69]},{15:[2,12],18:[2,12]},{14:[2,26],15:[2,26],19:[2,26],29:[2,26],34:[2,26],47:[2,26],48:[2,26],51:[2,26],55:[2,26],60:[2,26]},{23:[2,31],33:[2,31],54:[2,31],68:[2,31],72:[2,31],75:[2,31]},{33:[2,74],42:134,74:135,75:[1,120]},{33:[2,71],65:[2,71],72:[2,71],75:[2,71],80:[2,71],81:[2,71],82:[2,71],83:[2,71],84:[2,71],85:[2,71]},{33:[2,73],75:[2,73]},{23:[2,29],33:[2,29],54:[2,29],65:[2,29],68:[2,29],72:[2,29],75:[2,29],80:[2,29],81:[2,29],82:[2,29],83:[2,29],84:[2,29],85:[2,29]},{14:[2,15],15:[2,15],19:[2,15],29:[2,15],34:[2,15],39:[2,15],44:[2,15],47:[2,15],48:[2,15],51:[2,15],55:[2,15],60:[2,15]},{72:[1,137],77:[1,136]},{72:[2,100],77:[2,100]},{14:[2,16],15:[2,16],19:[2,16],29:[2,16],34:[2,16],44:[2,16],47:[2,16],48:[2,16],51:[2,16],55:[2,16],60:[2,16]},{33:[1,138]},{33:[2,75]},{33:[2,32]},{72:[2,101],77:[2,101]},{14:[2,17],15:[2,17],19:[2,17],29:[2,17],34:[2,17],39:[2,17],44:[2,17],47:[2,17],48:[2,17],51:[2,17],55:[2,17],60:[2,17]}],defaultActions:{4:[2,1],54:[2,55],56:[2,20],60:[2,57],73:[2,81],82:[2,85],86:[2,18],90:[2,89],101:[2,53],104:[2,93],110:[2,19],111:[2,77],116:[2,97],119:[2,63],122:[2,69],135:[2,75],136:[2,32]},parseError:function(c,u){throw new Error(c)},parse:function(c){var u=this,f=[0],h=[null],_=[],p=this.table,m="",g=0,b=0;this.lexer.setInput(c),this.lexer.yy=this.yy,this.yy.lexer=this.lexer,this.yy.parser=this,typeof this.lexer.yylloc>"u"&&(this.lexer.yylloc={});var w=this.lexer.yylloc;_.push(w);var C=this.lexer.options&&this.lexer.options.ranges;typeof this.yy.parseError=="function"&&(this.parseError=this.yy.parseError);function M(){var ot;return ot=u.lexer.lex()||1,typeof ot!="number"&&(ot=u.symbols_[ot]||ot),ot}for(var D,S,k,O,I={},B,q,z,j;;){if(S=f[f.length-1],this.defaultActions[S]?k=this.defaultActions[S]:((D===null||typeof D>"u")&&(D=M()),k=p[S]&&p[S][D]),typeof k>"u"||!k.length||!k[0]){var Y="";{j=[];for(B in p[S])this.terminals_[B]&&B>2&&j.push("'"+this.terminals_[B]+"'");this.lexer.showPosition?Y="Parse error on line "+(g+1)+`:
6
- `+this.lexer.showPosition()+`
7
- Expecting `+j.join(", ")+", got '"+(this.terminals_[D]||D)+"'":Y="Parse error on line "+(g+1)+": Unexpected "+(D==1?"end of input":"'"+(this.terminals_[D]||D)+"'"),this.parseError(Y,{text:this.lexer.match,token:this.terminals_[D]||D,line:this.lexer.yylineno,loc:w,expected:j})}}if(k[0]instanceof Array&&k.length>1)throw new Error("Parse Error: multiple actions possible at state: "+S+", token: "+D);switch(k[0]){case 1:f.push(D),h.push(this.lexer.yytext),_.push(this.lexer.yylloc),f.push(k[1]),D=null,b=this.lexer.yyleng,m=this.lexer.yytext,g=this.lexer.yylineno,w=this.lexer.yylloc;break;case 2:if(q=this.productions_[k[1]][1],I.$=h[h.length-q],I._$={first_line:_[_.length-(q||1)].first_line,last_line:_[_.length-1].last_line,first_column:_[_.length-(q||1)].first_column,last_column:_[_.length-1].last_column},C&&(I._$.range=[_[_.length-(q||1)].range[0],_[_.length-1].range[1]]),O=this.performAction.call(I,m,b,g,this.yy,k[1],h,_),typeof O<"u")return O;q&&(f=f.slice(0,-1*q*2),h=h.slice(0,-1*q),_=_.slice(0,-1*q)),f.push(this.productions_[k[1]][0]),h.push(I.$),_.push(I._$),z=p[f[f.length-2]][f[f.length-1]],f.push(z);break;case 3:return!0}}return!0}},r=function(){var a={EOF:1,parseError:function(u,f){if(this.yy.parser)this.yy.parser.parseError(u,f);else throw new Error(u)},setInput:function(u){return this._input=u,this._more=this._less=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var u=this._input[0];this.yytext+=u,this.yyleng++,this.offset++,this.match+=u,this.matched+=u;var f=u.match(/(?:\r\n?|\n).*/g);return f?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),u},unput:function(u){var f=u.length,h=u.split(/(?:\r\n?|\n)/g);this._input=u+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-f-1),this.offset-=f;var _=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),h.length-1&&(this.yylineno-=h.length-1);var p=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:h?(h.length===_.length?this.yylloc.first_column:0)+_[_.length-h.length].length-h[0].length:this.yylloc.first_column-f},this.options.ranges&&(this.yylloc.range=[p[0],p[0]+this.yyleng-f]),this},more:function(){return this._more=!0,this},less:function(u){this.unput(this.match.slice(u))},pastInput:function(){var u=this.matched.substr(0,this.matched.length-this.match.length);return(u.length>20?"...":"")+u.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var u=this.match;return u.length<20&&(u+=this._input.substr(0,20-u.length)),(u.substr(0,20)+(u.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var u=this.pastInput(),f=new Array(u.length+1).join("-");return u+this.upcomingInput()+`
8
- `+f+"^"},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var u,f,h,_,p;this._more||(this.yytext="",this.match="");for(var m=this._currentRules(),g=0;g<m.length&&(h=this._input.match(this.rules[m[g]]),!(h&&(!f||h[0].length>f[0].length)&&(f=h,_=g,!this.options.flex)));g++);return f?(p=f[0].match(/(?:\r\n?|\n).*/g),p&&(this.yylineno+=p.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:p?p[p.length-1].length-p[p.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+f[0].length},this.yytext+=f[0],this.match+=f[0],this.matches=f,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._input=this._input.slice(f[0].length),this.matched+=f[0],u=this.performAction.call(this,this.yy,this,m[_],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),u||void 0):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
9
- `+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var u=this.next();return typeof u<"u"?u:this.lex()},begin:function(u){this.conditionStack.push(u)},popState:function(){return this.conditionStack.pop()},_currentRules:function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},topState:function(){return this.conditionStack[this.conditionStack.length-2]},pushState:function(u){this.begin(u)}};return a.options={},a.performAction=function(u,f,h,_){function p(m,g){return f.yytext=f.yytext.substring(m,f.yyleng-g+m)}switch(h){case 0:if(f.yytext.slice(-2)==="\\\\"?(p(0,1),this.begin("mu")):f.yytext.slice(-1)==="\\"?(p(0,1),this.begin("emu")):this.begin("mu"),f.yytext)return 15;break;case 1:return 15;case 2:return this.popState(),15;case 3:return this.begin("raw"),15;case 4:return this.popState(),this.conditionStack[this.conditionStack.length-1]==="raw"?15:(p(5,9),"END_RAW_BLOCK");case 5:return 15;case 6:return this.popState(),14;case 7:return 65;case 8:return 68;case 9:return 19;case 10:return this.popState(),this.begin("raw"),23;case 11:return 55;case 12:return 60;case 13:return 29;case 14:return 47;case 15:return this.popState(),44;case 16:return this.popState(),44;case 17:return 34;case 18:return 39;case 19:return 51;case 20:return 48;case 21:this.unput(f.yytext),this.popState(),this.begin("com");break;case 22:return this.popState(),14;case 23:return 48;case 24:return 73;case 25:return 72;case 26:return 72;case 27:return 87;case 28:break;case 29:return this.popState(),54;case 30:return this.popState(),33;case 31:return f.yytext=p(1,2).replace(/\\"/g,'"'),80;case 32:return f.yytext=p(1,2).replace(/\\'/g,"'"),80;case 33:return 85;case 34:return 82;case 35:return 82;case 36:return 83;case 37:return 84;case 38:return 81;case 39:return 75;case 40:return 77;case 41:return 72;case 42:return f.yytext=f.yytext.replace(/\\([\\\]])/g,"$1"),72;case 43:return"INVALID";case 44:return 5}},a.rules=[/^(?:[^\x00]*?(?=(\{\{)))/,/^(?:[^\x00]+)/,/^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/,/^(?:\{\{\{\{(?=[^\/]))/,/^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/,/^(?:[^\x00]+?(?=(\{\{\{\{)))/,/^(?:[\s\S]*?--(~)?\}\})/,/^(?:\()/,/^(?:\))/,/^(?:\{\{\{\{)/,/^(?:\}\}\}\})/,/^(?:\{\{(~)?>)/,/^(?:\{\{(~)?#>)/,/^(?:\{\{(~)?#\*?)/,/^(?:\{\{(~)?\/)/,/^(?:\{\{(~)?\^\s*(~)?\}\})/,/^(?:\{\{(~)?\s*else\s*(~)?\}\})/,/^(?:\{\{(~)?\^)/,/^(?:\{\{(~)?\s*else\b)/,/^(?:\{\{(~)?\{)/,/^(?:\{\{(~)?&)/,/^(?:\{\{(~)?!--)/,/^(?:\{\{(~)?![\s\S]*?\}\})/,/^(?:\{\{(~)?\*?)/,/^(?:=)/,/^(?:\.\.)/,/^(?:\.(?=([=~}\s\/.)|])))/,/^(?:[\/.])/,/^(?:\s+)/,/^(?:\}(~)?\}\})/,/^(?:(~)?\}\})/,/^(?:"(\\["]|[^"])*")/,/^(?:'(\\[']|[^'])*')/,/^(?:@)/,/^(?:true(?=([~}\s)])))/,/^(?:false(?=([~}\s)])))/,/^(?:undefined(?=([~}\s)])))/,/^(?:null(?=([~}\s)])))/,/^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)])))/,/^(?:as\s+\|)/,/^(?:\|)/,/^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)|]))))/,/^(?:\[(\\\]|[^\]])*\])/,/^(?:.)/,/^(?:$)/],a.conditions={mu:{rules:[7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44],inclusive:!1},emu:{rules:[2],inclusive:!1},com:{rules:[6],inclusive:!1},raw:{rules:[3,4,5],inclusive:!1},INITIAL:{rules:[0,1,44],inclusive:!0}},a}();i.lexer=r;function o(){this.yy={}}return o.prototype=i,i.Parser=o,new o}();t.default=e,n.exports=t.default}(No,No.exports)),No.exports}var Ho={exports:{}},Wo={exports:{}},kd;function Lg(){return kd||(kd=1,function(n,t){t.__esModule=!0;function e(f){return f&&f.__esModule?f:{default:f}}var i=bn(),r=e(i);function o(){this.parents=[]}o.prototype={constructor:o,mutating:!1,acceptKey:function(h,_){var p=this.accept(h[_]);if(this.mutating){if(p&&!o.prototype[p.type])throw new r.default('Unexpected node type "'+p.type+'" found when accepting '+_+" on "+h.type);h[_]=p}},acceptRequired:function(h,_){if(this.acceptKey(h,_),!h[_])throw new r.default(h.type+" requires "+_)},acceptArray:function(h){for(var _=0,p=h.length;_<p;_++)this.acceptKey(h,_),h[_]||(h.splice(_,1),_--,p--)},accept:function(h){if(h){if(!this[h.type])throw new r.default("Unknown type: "+h.type,h);this.current&&this.parents.unshift(this.current),this.current=h;var _=this[h.type](h);if(this.current=this.parents.shift(),!this.mutating||_)return _;if(_!==!1)return h}},Program:function(h){this.acceptArray(h.body)},MustacheStatement:a,Decorator:a,BlockStatement:c,DecoratorBlock:c,PartialStatement:u,PartialBlockStatement:function(h){u.call(this,h),this.acceptKey(h,"program")},ContentStatement:function(){},CommentStatement:function(){},SubExpression:a,PathExpression:function(){},StringLiteral:function(){},NumberLiteral:function(){},BooleanLiteral:function(){},UndefinedLiteral:function(){},NullLiteral:function(){},Hash:function(h){this.acceptArray(h.pairs)},HashPair:function(h){this.acceptRequired(h,"value")}};function a(f){this.acceptRequired(f,"path"),this.acceptArray(f.params),this.acceptKey(f,"hash")}function c(f){a.call(this,f),this.acceptKey(f,"program"),this.acceptKey(f,"inverse")}function u(f){this.acceptRequired(f,"name"),this.acceptArray(f.params),this.acceptKey(f,"hash")}t.default=o,n.exports=t.default}(Wo,Wo.exports)),Wo.exports}var Ed;function nw(){return Ed||(Ed=1,function(n,t){t.__esModule=!0;function e(h){return h&&h.__esModule?h:{default:h}}var i=Lg(),r=e(i);function o(){var h=arguments.length<=0||arguments[0]===void 0?{}:arguments[0];this.options=h}o.prototype=new r.default,o.prototype.Program=function(h){var _=!this.options.ignoreStandalone,p=!this.isRootSeen;this.isRootSeen=!0;for(var m=h.body,g=0,b=m.length;g<b;g++){var w=m[g],C=this.accept(w);if(C){var M=a(m,g,p),D=c(m,g,p),S=C.openStandalone&&M,k=C.closeStandalone&&D,O=C.inlineStandalone&&M&&D;C.close&&u(m,g,!0),C.open&&f(m,g,!0),_&&O&&(u(m,g),f(m,g)&&w.type==="PartialStatement"&&(w.indent=/([ \t]+$)/.exec(m[g-1].original)[1])),_&&S&&(u((w.program||w.inverse).body),f(m,g)),_&&k&&(u(m,g),f((w.inverse||w.program).body))}}return h},o.prototype.BlockStatement=o.prototype.DecoratorBlock=o.prototype.PartialBlockStatement=function(h){this.accept(h.program),this.accept(h.inverse);var _=h.program||h.inverse,p=h.program&&h.inverse,m=p,g=p;if(p&&p.chained)for(m=p.body[0].program;g.chained;)g=g.body[g.body.length-1].program;var b={open:h.openStrip.open,close:h.closeStrip.close,openStandalone:c(_.body),closeStandalone:a((m||_).body)};if(h.openStrip.close&&u(_.body,null,!0),p){var w=h.inverseStrip;w.open&&f(_.body,null,!0),w.close&&u(m.body,null,!0),h.closeStrip.open&&f(g.body,null,!0),!this.options.ignoreStandalone&&a(_.body)&&c(m.body)&&(f(_.body),u(m.body))}else h.closeStrip.open&&f(_.body,null,!0);return b},o.prototype.Decorator=o.prototype.MustacheStatement=function(h){return h.strip},o.prototype.PartialStatement=o.prototype.CommentStatement=function(h){var _=h.strip||{};return{inlineStandalone:!0,open:_.open,close:_.close}};function a(h,_,p){_===void 0&&(_=h.length);var m=h[_-1],g=h[_-2];if(!m)return p;if(m.type==="ContentStatement")return(g||!p?/\r?\n\s*?$/:/(^|\r?\n)\s*?$/).test(m.original)}function c(h,_,p){_===void 0&&(_=-1);var m=h[_+1],g=h[_+2];if(!m)return p;if(m.type==="ContentStatement")return(g||!p?/^\s*?\r?\n/:/^\s*?(\r?\n|$)/).test(m.original)}function u(h,_,p){var m=h[_==null?0:_+1];if(!(!m||m.type!=="ContentStatement"||!p&&m.rightStripped)){var g=m.value;m.value=m.value.replace(p?/^\s+/:/^[ \t]*\r?\n?/,""),m.rightStripped=m.value!==g}}function f(h,_,p){var m=h[_==null?h.length-1:_-1];if(!(!m||m.type!=="ContentStatement"||!p&&m.leftStripped)){var g=m.value;return m.value=m.value.replace(p?/\s+$/:/[ \t]+$/,""),m.leftStripped=m.value!==g,m.leftStripped}}t.default=o,n.exports=t.default}(Ho,Ho.exports)),Ho.exports}var Ke={},Cd;function iw(){if(Cd)return Ke;Cd=1,Ke.__esModule=!0,Ke.SourceLocation=r,Ke.id=o,Ke.stripFlags=a,Ke.stripComment=c,Ke.preparePath=u,Ke.prepareMustache=f,Ke.prepareRawBlock=h,Ke.prepareBlock=_,Ke.prepareProgram=p,Ke.preparePartialBlock=m;function n(g){return g&&g.__esModule?g:{default:g}}var t=bn(),e=n(t);function i(g,b){if(b=b.path?b.path.original:b,g.path.original!==b){var w={loc:g.path.loc};throw new e.default(g.path.original+" doesn't match "+b,w)}}function r(g,b){this.source=g,this.start={line:b.first_line,column:b.first_column},this.end={line:b.last_line,column:b.last_column}}function o(g){return/^\[.*\]$/.test(g)?g.substring(1,g.length-1):g}function a(g,b){return{open:g.charAt(2)==="~",close:b.charAt(b.length-3)==="~"}}function c(g){return g.replace(/^\{\{~?!-?-?/,"").replace(/-?-?~?\}\}$/,"")}function u(g,b,w){w=this.locInfo(w);for(var C=g?"@":"",M=[],D=0,S=0,k=b.length;S<k;S++){var O=b[S].part,I=b[S].original!==O;if(C+=(b[S].separator||"")+O,!I&&(O===".."||O==="."||O==="this")){if(M.length>0)throw new e.default("Invalid path: "+C,{loc:w});O===".."&&D++}else M.push(O)}return{type:"PathExpression",data:g,depth:D,parts:M,original:C,loc:w}}function f(g,b,w,C,M,D){var S=C.charAt(3)||C.charAt(2),k=S!=="{"&&S!=="&",O=/\*/.test(C);return{type:O?"Decorator":"MustacheStatement",path:g,params:b,hash:w,escaped:k,strip:M,loc:this.locInfo(D)}}function h(g,b,w,C){i(g,w),C=this.locInfo(C);var M={type:"Program",body:b,strip:{},loc:C};return{type:"BlockStatement",path:g.path,params:g.params,hash:g.hash,program:M,openStrip:{},inverseStrip:{},closeStrip:{},loc:C}}function _(g,b,w,C,M,D){C&&C.path&&i(g,C);var S=/\*/.test(g.open);b.blockParams=g.blockParams;var k=void 0,O=void 0;if(w){if(S)throw new e.default("Unexpected inverse block on decorator",w);w.chain&&(w.program.body[0].closeStrip=C.strip),O=w.strip,k=w.program}return M&&(M=k,k=b,b=M),{type:S?"DecoratorBlock":"BlockStatement",path:g.path,params:g.params,hash:g.hash,program:b,inverse:k,openStrip:g.strip,inverseStrip:O,closeStrip:C&&C.strip,loc:this.locInfo(D)}}function p(g,b){if(!b&&g.length){var w=g[0].loc,C=g[g.length-1].loc;w&&C&&(b={source:w.source,start:{line:w.start.line,column:w.start.column},end:{line:C.end.line,column:C.end.column}})}return{type:"Program",body:g,strip:{},loc:b}}function m(g,b,w,C){return i(g,w),{type:"PartialBlockStatement",name:g.path,params:g.params,hash:g.hash,program:b,openStrip:g.strip,closeStrip:w&&w.strip,loc:this.locInfo(C)}}return Ke}var Md;function rw(){if(Md)return ur;Md=1,ur.__esModule=!0,ur.parseWithoutProcessing=h,ur.parse=_;function n(p){if(p&&p.__esModule)return p;var m={};if(p!=null)for(var g in p)Object.prototype.hasOwnProperty.call(p,g)&&(m[g]=p[g]);return m.default=p,m}function t(p){return p&&p.__esModule?p:{default:p}}var e=ew(),i=t(e),r=nw(),o=t(r),a=iw(),c=n(a),u=We();ur.parser=i.default;var f={};u.extend(f,c);function h(p,m){if(p.type==="Program")return p;i.default.yy=f,f.locInfo=function(b){return new f.SourceLocation(m&&m.srcName,b)};var g=i.default.parse(p);return g}function _(p,m){var g=h(p,m),b=new o.default(m);return b.accept(g)}return ur}var hr={},Ad;function sw(){if(Ad)return hr;Ad=1,hr.__esModule=!0,hr.Compiler=c,hr.precompile=u,hr.compile=f;function n(p){return p&&p.__esModule?p:{default:p}}var t=bn(),e=n(t),i=We(),r=Ag(),o=n(r),a=[].slice;function c(){}c.prototype={compiler:c,equals:function(m){var g=this.opcodes.length;if(m.opcodes.length!==g)return!1;for(var b=0;b<g;b++){var w=this.opcodes[b],C=m.opcodes[b];if(w.opcode!==C.opcode||!h(w.args,C.args))return!1}g=this.children.length;for(var b=0;b<g;b++)if(!this.children[b].equals(m.children[b]))return!1;return!0},guid:0,compile:function(m,g){return this.sourceNode=[],this.opcodes=[],this.children=[],this.options=g,this.stringParams=g.stringParams,this.trackIds=g.trackIds,g.blockParams=g.blockParams||[],g.knownHelpers=i.extend(Object.create(null),{helperMissing:!0,blockHelperMissing:!0,each:!0,if:!0,unless:!0,with:!0,log:!0,lookup:!0},g.knownHelpers),this.accept(m)},compileProgram:function(m){var g=new this.compiler,b=g.compile(m,this.options),w=this.guid++;return this.usePartial=this.usePartial||b.usePartial,this.children[w]=b,this.useDepths=this.useDepths||b.useDepths,w},accept:function(m){if(!this[m.type])throw new e.default("Unknown type: "+m.type,m);this.sourceNode.unshift(m);var g=this[m.type](m);return this.sourceNode.shift(),g},Program:function(m){this.options.blockParams.unshift(m.blockParams);for(var g=m.body,b=g.length,w=0;w<b;w++)this.accept(g[w]);return this.options.blockParams.shift(),this.isSimple=b===1,this.blockParams=m.blockParams?m.blockParams.length:0,this},BlockStatement:function(m){_(m);var g=m.program,b=m.inverse;g=g&&this.compileProgram(g),b=b&&this.compileProgram(b);var w=this.classifySexpr(m);w==="helper"?this.helperSexpr(m,g,b):w==="simple"?(this.simpleSexpr(m),this.opcode("pushProgram",g),this.opcode("pushProgram",b),this.opcode("emptyHash"),this.opcode("blockValue",m.path.original)):(this.ambiguousSexpr(m,g,b),this.opcode("pushProgram",g),this.opcode("pushProgram",b),this.opcode("emptyHash"),this.opcode("ambiguousBlockValue")),this.opcode("append")},DecoratorBlock:function(m){var g=m.program&&this.compileProgram(m.program),b=this.setupFullMustacheParams(m,g,void 0),w=m.path;this.useDecorators=!0,this.opcode("registerDecorator",b.length,w.original)},PartialStatement:function(m){this.usePartial=!0;var g=m.program;g&&(g=this.compileProgram(m.program));var b=m.params;if(b.length>1)throw new e.default("Unsupported number of partial arguments: "+b.length,m);b.length||(this.options.explicitPartialContext?this.opcode("pushLiteral","undefined"):b.push({type:"PathExpression",parts:[],depth:0}));var w=m.name.original,C=m.name.type==="SubExpression";C&&this.accept(m.name),this.setupFullMustacheParams(m,g,void 0,!0);var M=m.indent||"";this.options.preventIndent&&M&&(this.opcode("appendContent",M),M=""),this.opcode("invokePartial",C,w,M),this.opcode("append")},PartialBlockStatement:function(m){this.PartialStatement(m)},MustacheStatement:function(m){this.SubExpression(m),m.escaped&&!this.options.noEscape?this.opcode("appendEscaped"):this.opcode("append")},Decorator:function(m){this.DecoratorBlock(m)},ContentStatement:function(m){m.value&&this.opcode("appendContent",m.value)},CommentStatement:function(){},SubExpression:function(m){_(m);var g=this.classifySexpr(m);g==="simple"?this.simpleSexpr(m):g==="helper"?this.helperSexpr(m):this.ambiguousSexpr(m)},ambiguousSexpr:function(m,g,b){var w=m.path,C=w.parts[0],M=g!=null||b!=null;this.opcode("getContext",w.depth),this.opcode("pushProgram",g),this.opcode("pushProgram",b),w.strict=!0,this.accept(w),this.opcode("invokeAmbiguous",C,M)},simpleSexpr:function(m){var g=m.path;g.strict=!0,this.accept(g),this.opcode("resolvePossibleLambda")},helperSexpr:function(m,g,b){var w=this.setupFullMustacheParams(m,g,b),C=m.path,M=C.parts[0];if(this.options.knownHelpers[M])this.opcode("invokeKnownHelper",w.length,M);else{if(this.options.knownHelpersOnly)throw new e.default("You specified knownHelpersOnly, but used the unknown helper "+M,m);C.strict=!0,C.falsy=!0,this.accept(C),this.opcode("invokeHelper",w.length,C.original,o.default.helpers.simpleId(C))}},PathExpression:function(m){this.addDepth(m.depth),this.opcode("getContext",m.depth);var g=m.parts[0],b=o.default.helpers.scopedId(m),w=!m.depth&&!b&&this.blockParamIndex(g);w?this.opcode("lookupBlockParam",w,m.parts):g?m.data?(this.options.data=!0,this.opcode("lookupData",m.depth,m.parts,m.strict)):this.opcode("lookupOnContext",m.parts,m.falsy,m.strict,b):this.opcode("pushContext")},StringLiteral:function(m){this.opcode("pushString",m.value)},NumberLiteral:function(m){this.opcode("pushLiteral",m.value)},BooleanLiteral:function(m){this.opcode("pushLiteral",m.value)},UndefinedLiteral:function(){this.opcode("pushLiteral","undefined")},NullLiteral:function(){this.opcode("pushLiteral","null")},Hash:function(m){var g=m.pairs,b=0,w=g.length;for(this.opcode("pushHash");b<w;b++)this.pushParam(g[b].value);for(;b--;)this.opcode("assignToHash",g[b].key);this.opcode("popHash")},opcode:function(m){this.opcodes.push({opcode:m,args:a.call(arguments,1),loc:this.sourceNode[0].loc})},addDepth:function(m){m&&(this.useDepths=!0)},classifySexpr:function(m){var g=o.default.helpers.simpleId(m.path),b=g&&!!this.blockParamIndex(m.path.parts[0]),w=!b&&o.default.helpers.helperExpression(m),C=!b&&(w||g);if(C&&!w){var M=m.path.parts[0],D=this.options;D.knownHelpers[M]?w=!0:D.knownHelpersOnly&&(C=!1)}return w?"helper":C?"ambiguous":"simple"},pushParams:function(m){for(var g=0,b=m.length;g<b;g++)this.pushParam(m[g])},pushParam:function(m){var g=m.value!=null?m.value:m.original||"";if(this.stringParams)g.replace&&(g=g.replace(/^(\.?\.\/)*/g,"").replace(/\//g,".")),m.depth&&this.addDepth(m.depth),this.opcode("getContext",m.depth||0),this.opcode("pushStringParam",g,m.type),m.type==="SubExpression"&&this.accept(m);else{if(this.trackIds){var b=void 0;if(m.parts&&!o.default.helpers.scopedId(m)&&!m.depth&&(b=this.blockParamIndex(m.parts[0])),b){var w=m.parts.slice(1).join(".");this.opcode("pushId","BlockParam",b,w)}else g=m.original||g,g.replace&&(g=g.replace(/^this(?:\.|$)/,"").replace(/^\.\//,"").replace(/^\.$/,"")),this.opcode("pushId",m.type,g)}this.accept(m)}},setupFullMustacheParams:function(m,g,b,w){var C=m.params;return this.pushParams(C),this.opcode("pushProgram",g),this.opcode("pushProgram",b),m.hash?this.accept(m.hash):this.opcode("emptyHash",w),C},blockParamIndex:function(m){for(var g=0,b=this.options.blockParams.length;g<b;g++){var w=this.options.blockParams[g],C=w&&i.indexOf(w,m);if(w&&C>=0)return[g,C]}}};function u(p,m,g){if(p==null||typeof p!="string"&&p.type!=="Program")throw new e.default("You must pass a string or Handlebars AST to Handlebars.precompile. You passed "+p);m=m||{},"data"in m||(m.data=!0),m.compat&&(m.useDepths=!0);var b=g.parse(p,m),w=new g.Compiler().compile(b,m);return new g.JavaScriptCompiler().compile(w,m)}function f(p,m,g){if(m===void 0&&(m={}),p==null||typeof p!="string"&&p.type!=="Program")throw new e.default("You must pass a string or Handlebars AST to Handlebars.compile. You passed "+p);m=i.extend({},m),"data"in m||(m.data=!0),m.compat&&(m.useDepths=!0);var b=void 0;function w(){var M=g.parse(p,m),D=new g.Compiler().compile(M,m),S=new g.JavaScriptCompiler().compile(D,m,void 0,!0);return g.template(S)}function C(M,D){return b||(b=w()),b.call(this,M,D)}return C._setup=function(M){return b||(b=w()),b._setup(M)},C._child=function(M,D,S,k){return b||(b=w()),b._child(M,D,S,k)},C}function h(p,m){if(p===m)return!0;if(i.isArray(p)&&i.isArray(m)&&p.length===m.length){for(var g=0;g<p.length;g++)if(!h(p[g],m[g]))return!1;return!0}}function _(p){if(!p.path.parts){var m=p.path;p.path={type:"PathExpression",data:!1,depth:0,parts:[m.original+""],original:m.original+"",loc:m.loc}}}return hr}var zo={exports:{}},jo={exports:{}},Vr={},rc={},Uo={},Vo={},Ld;function ow(){if(Ld)return Vo;Ld=1;var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");return Vo.encode=function(t){if(0<=t&&t<n.length)return n[t];throw new TypeError("Must be between 0 and 63: "+t)},Vo.decode=function(t){var e=65,i=90,r=97,o=122,a=48,c=57,u=43,f=47,h=26,_=52;return e<=t&&t<=i?t-e:r<=t&&t<=o?t-r+h:a<=t&&t<=c?t-a+_:t==u?62:t==f?63:-1},Vo}var Pd;function Pg(){if(Pd)return Uo;Pd=1;var n=ow(),t=5,e=1<<t,i=e-1,r=e;function o(c){return c<0?(-c<<1)+1:(c<<1)+0}function a(c){var u=(c&1)===1,f=c>>1;return u?-f:f}return Uo.encode=function(u){var f="",h,_=o(u);do h=_&i,_>>>=t,_>0&&(h|=r),f+=n.encode(h);while(_>0);return f},Uo.decode=function(u,f,h){var _=u.length,p=0,m=0,g,b;do{if(f>=_)throw new Error("Expected more digits in base 64 VLQ value.");if(b=n.decode(u.charCodeAt(f++)),b===-1)throw new Error("Invalid base64 digit: "+u.charAt(f-1));g=!!(b&r),b&=i,p=p+(b<<m),m+=t}while(g);h.value=a(p),h.rest=f},Uo}var sc={},Od;function Es(){return Od||(Od=1,function(n){function t(S,k,O){if(k in S)return S[k];if(arguments.length===3)return O;throw new Error('"'+k+'" is a required argument.')}n.getArg=t;var e=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,i=/^data:.+\,.+$/;function r(S){var k=S.match(e);return k?{scheme:k[1],auth:k[2],host:k[3],port:k[4],path:k[5]}:null}n.urlParse=r;function o(S){var k="";return S.scheme&&(k+=S.scheme+":"),k+="//",S.auth&&(k+=S.auth+"@"),S.host&&(k+=S.host),S.port&&(k+=":"+S.port),S.path&&(k+=S.path),k}n.urlGenerate=o;function a(S){var k=S,O=r(S);if(O){if(!O.path)return S;k=O.path}for(var I=n.isAbsolute(k),B=k.split(/\/+/),q,z=0,j=B.length-1;j>=0;j--)q=B[j],q==="."?B.splice(j,1):q===".."?z++:z>0&&(q===""?(B.splice(j+1,z),z=0):(B.splice(j,2),z--));return k=B.join("/"),k===""&&(k=I?"/":"."),O?(O.path=k,o(O)):k}n.normalize=a;function c(S,k){S===""&&(S="."),k===""&&(k=".");var O=r(k),I=r(S);if(I&&(S=I.path||"/"),O&&!O.scheme)return I&&(O.scheme=I.scheme),o(O);if(O||k.match(i))return k;if(I&&!I.host&&!I.path)return I.host=k,o(I);var B=k.charAt(0)==="/"?k:a(S.replace(/\/+$/,"")+"/"+k);return I?(I.path=B,o(I)):B}n.join=c,n.isAbsolute=function(S){return S.charAt(0)==="/"||e.test(S)};function u(S,k){S===""&&(S="."),S=S.replace(/\/$/,"");for(var O=0;k.indexOf(S+"/")!==0;){var I=S.lastIndexOf("/");if(I<0||(S=S.slice(0,I),S.match(/^([^\/]+:\/)?\/*$/)))return k;++O}return Array(O+1).join("../")+k.substr(S.length+1)}n.relative=u;var f=function(){var S=Object.create(null);return!("__proto__"in S)}();function h(S){return S}function _(S){return m(S)?"$"+S:S}n.toSetString=f?h:_;function p(S){return m(S)?S.slice(1):S}n.fromSetString=f?h:p;function m(S){if(!S)return!1;var k=S.length;if(k<9||S.charCodeAt(k-1)!==95||S.charCodeAt(k-2)!==95||S.charCodeAt(k-3)!==111||S.charCodeAt(k-4)!==116||S.charCodeAt(k-5)!==111||S.charCodeAt(k-6)!==114||S.charCodeAt(k-7)!==112||S.charCodeAt(k-8)!==95||S.charCodeAt(k-9)!==95)return!1;for(var O=k-10;O>=0;O--)if(S.charCodeAt(O)!==36)return!1;return!0}function g(S,k,O){var I=w(S.source,k.source);return I!==0||(I=S.originalLine-k.originalLine,I!==0)||(I=S.originalColumn-k.originalColumn,I!==0||O)||(I=S.generatedColumn-k.generatedColumn,I!==0)||(I=S.generatedLine-k.generatedLine,I!==0)?I:w(S.name,k.name)}n.compareByOriginalPositions=g;function b(S,k,O){var I=S.generatedLine-k.generatedLine;return I!==0||(I=S.generatedColumn-k.generatedColumn,I!==0||O)||(I=w(S.source,k.source),I!==0)||(I=S.originalLine-k.originalLine,I!==0)||(I=S.originalColumn-k.originalColumn,I!==0)?I:w(S.name,k.name)}n.compareByGeneratedPositionsDeflated=b;function w(S,k){return S===k?0:S===null?1:k===null?-1:S>k?1:-1}function C(S,k){var O=S.generatedLine-k.generatedLine;return O!==0||(O=S.generatedColumn-k.generatedColumn,O!==0)||(O=w(S.source,k.source),O!==0)||(O=S.originalLine-k.originalLine,O!==0)||(O=S.originalColumn-k.originalColumn,O!==0)?O:w(S.name,k.name)}n.compareByGeneratedPositionsInflated=C;function M(S){return JSON.parse(S.replace(/^\)]}'[^\n]*\n/,""))}n.parseSourceMapInput=M;function D(S,k,O){if(k=k||"",S&&(S[S.length-1]!=="/"&&k[0]!=="/"&&(S+="/"),k=S+k),O){var I=r(O);if(!I)throw new Error("sourceMapURL could not be parsed");if(I.path){var B=I.path.lastIndexOf("/");B>=0&&(I.path=I.path.substring(0,B+1))}k=c(o(I),k)}return a(k)}n.computeSourceURL=D}(sc)),sc}var oc={},Rd;function Og(){if(Rd)return oc;Rd=1;var n=Es(),t=Object.prototype.hasOwnProperty,e=typeof Map<"u";function i(){this._array=[],this._set=e?new Map:Object.create(null)}return i.fromArray=function(o,a){for(var c=new i,u=0,f=o.length;u<f;u++)c.add(o[u],a);return c},i.prototype.size=function(){return e?this._set.size:Object.getOwnPropertyNames(this._set).length},i.prototype.add=function(o,a){var c=e?o:n.toSetString(o),u=e?this.has(o):t.call(this._set,c),f=this._array.length;(!u||a)&&this._array.push(o),u||(e?this._set.set(o,f):this._set[c]=f)},i.prototype.has=function(o){if(e)return this._set.has(o);var a=n.toSetString(o);return t.call(this._set,a)},i.prototype.indexOf=function(o){if(e){var a=this._set.get(o);if(a>=0)return a}else{var c=n.toSetString(o);if(t.call(this._set,c))return this._set[c]}throw new Error('"'+o+'" is not in the set.')},i.prototype.at=function(o){if(o>=0&&o<this._array.length)return this._array[o];throw new Error("No element indexed by "+o)},i.prototype.toArray=function(){return this._array.slice()},oc.ArraySet=i,oc}var ac={},Id;function aw(){if(Id)return ac;Id=1;var n=Es();function t(i,r){var o=i.generatedLine,a=r.generatedLine,c=i.generatedColumn,u=r.generatedColumn;return a>o||a==o&&u>=c||n.compareByGeneratedPositionsInflated(i,r)<=0}function e(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}return e.prototype.unsortedForEach=function(r,o){this._array.forEach(r,o)},e.prototype.add=function(r){t(this._last,r)?(this._last=r,this._array.push(r)):(this._sorted=!1,this._array.push(r))},e.prototype.toArray=function(){return this._sorted||(this._array.sort(n.compareByGeneratedPositionsInflated),this._sorted=!0),this._array},ac.MappingList=e,ac}var Td;function Rg(){if(Td)return rc;Td=1;var n=Pg(),t=Es(),e=Og().ArraySet,i=aw().MappingList;function r(o){o||(o={}),this._file=t.getArg(o,"file",null),this._sourceRoot=t.getArg(o,"sourceRoot",null),this._skipValidation=t.getArg(o,"skipValidation",!1),this._sources=new e,this._names=new e,this._mappings=new i,this._sourcesContents=null}return r.prototype._version=3,r.fromSourceMap=function(a){var c=a.sourceRoot,u=new r({file:a.file,sourceRoot:c});return a.eachMapping(function(f){var h={generated:{line:f.generatedLine,column:f.generatedColumn}};f.source!=null&&(h.source=f.source,c!=null&&(h.source=t.relative(c,h.source)),h.original={line:f.originalLine,column:f.originalColumn},f.name!=null&&(h.name=f.name)),u.addMapping(h)}),a.sources.forEach(function(f){var h=f;c!==null&&(h=t.relative(c,f)),u._sources.has(h)||u._sources.add(h);var _=a.sourceContentFor(f);_!=null&&u.setSourceContent(f,_)}),u},r.prototype.addMapping=function(a){var c=t.getArg(a,"generated"),u=t.getArg(a,"original",null),f=t.getArg(a,"source",null),h=t.getArg(a,"name",null);this._skipValidation||this._validateMapping(c,u,f,h),f!=null&&(f=String(f),this._sources.has(f)||this._sources.add(f)),h!=null&&(h=String(h),this._names.has(h)||this._names.add(h)),this._mappings.add({generatedLine:c.line,generatedColumn:c.column,originalLine:u!=null&&u.line,originalColumn:u!=null&&u.column,source:f,name:h})},r.prototype.setSourceContent=function(a,c){var u=a;this._sourceRoot!=null&&(u=t.relative(this._sourceRoot,u)),c!=null?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[t.toSetString(u)]=c):this._sourcesContents&&(delete this._sourcesContents[t.toSetString(u)],Object.keys(this._sourcesContents).length===0&&(this._sourcesContents=null))},r.prototype.applySourceMap=function(a,c,u){var f=c;if(c==null){if(a.file==null)throw new Error(`SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map's "file" property. Both were omitted.`);f=a.file}var h=this._sourceRoot;h!=null&&(f=t.relative(h,f));var _=new e,p=new e;this._mappings.unsortedForEach(function(m){if(m.source===f&&m.originalLine!=null){var g=a.originalPositionFor({line:m.originalLine,column:m.originalColumn});g.source!=null&&(m.source=g.source,u!=null&&(m.source=t.join(u,m.source)),h!=null&&(m.source=t.relative(h,m.source)),m.originalLine=g.line,m.originalColumn=g.column,g.name!=null&&(m.name=g.name))}var b=m.source;b!=null&&!_.has(b)&&_.add(b);var w=m.name;w!=null&&!p.has(w)&&p.add(w)},this),this._sources=_,this._names=p,a.sources.forEach(function(m){var g=a.sourceContentFor(m);g!=null&&(u!=null&&(m=t.join(u,m)),h!=null&&(m=t.relative(h,m)),this.setSourceContent(m,g))},this)},r.prototype._validateMapping=function(a,c,u,f){if(c&&typeof c.line!="number"&&typeof c.column!="number")throw new Error("original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.");if(!(a&&"line"in a&&"column"in a&&a.line>0&&a.column>=0&&!c&&!u&&!f)){if(a&&"line"in a&&"column"in a&&c&&"line"in c&&"column"in c&&a.line>0&&a.column>=0&&c.line>0&&c.column>=0&&u)return;throw new Error("Invalid mapping: "+JSON.stringify({generated:a,source:u,original:c,name:f}))}},r.prototype._serializeMappings=function(){for(var a=0,c=1,u=0,f=0,h=0,_=0,p="",m,g,b,w,C=this._mappings.toArray(),M=0,D=C.length;M<D;M++){if(g=C[M],m="",g.generatedLine!==c)for(a=0;g.generatedLine!==c;)m+=";",c++;else if(M>0){if(!t.compareByGeneratedPositionsInflated(g,C[M-1]))continue;m+=","}m+=n.encode(g.generatedColumn-a),a=g.generatedColumn,g.source!=null&&(w=this._sources.indexOf(g.source),m+=n.encode(w-_),_=w,m+=n.encode(g.originalLine-1-f),f=g.originalLine-1,m+=n.encode(g.originalColumn-u),u=g.originalColumn,g.name!=null&&(b=this._names.indexOf(g.name),m+=n.encode(b-h),h=b)),p+=m}return p},r.prototype._generateSourcesContent=function(a,c){return a.map(function(u){if(!this._sourcesContents)return null;c!=null&&(u=t.relative(c,u));var f=t.toSetString(u);return Object.prototype.hasOwnProperty.call(this._sourcesContents,f)?this._sourcesContents[f]:null},this)},r.prototype.toJSON=function(){var a={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return this._file!=null&&(a.file=this._file),this._sourceRoot!=null&&(a.sourceRoot=this._sourceRoot),this._sourcesContents&&(a.sourcesContent=this._generateSourcesContent(a.sources,a.sourceRoot)),a},r.prototype.toString=function(){return JSON.stringify(this.toJSON())},rc.SourceMapGenerator=r,rc}var qr={},lc={},Dd;function lw(){return Dd||(Dd=1,function(n){n.GREATEST_LOWER_BOUND=1,n.LEAST_UPPER_BOUND=2;function t(e,i,r,o,a,c){var u=Math.floor((i-e)/2)+e,f=a(r,o[u],!0);return f===0?u:f>0?i-u>1?t(u,i,r,o,a,c):c==n.LEAST_UPPER_BOUND?i<o.length?i:-1:u:u-e>1?t(e,u,r,o,a,c):c==n.LEAST_UPPER_BOUND?u:e<0?-1:e}n.search=function(i,r,o,a){if(r.length===0)return-1;var c=t(-1,r.length,i,r,o,a||n.GREATEST_LOWER_BOUND);if(c<0)return-1;for(;c-1>=0&&o(r[c],r[c-1],!0)===0;)--c;return c}}(lc)),lc}var cc={},Bd;function cw(){if(Bd)return cc;Bd=1;function n(i,r,o){var a=i[r];i[r]=i[o],i[o]=a}function t(i,r){return Math.round(i+Math.random()*(r-i))}function e(i,r,o,a){if(o<a){var c=t(o,a),u=o-1;n(i,c,a);for(var f=i[a],h=o;h<a;h++)r(i[h],f)<=0&&(u+=1,n(i,u,h));n(i,u+1,h);var _=u+1;e(i,r,o,_-1),e(i,r,_+1,a)}}return cc.quickSort=function(i,r){e(i,r,0,i.length-1)},cc}var Fd;function uw(){if(Fd)return qr;Fd=1;var n=Es(),t=lw(),e=Og().ArraySet,i=Pg(),r=cw().quickSort;function o(f,h){var _=f;return typeof f=="string"&&(_=n.parseSourceMapInput(f)),_.sections!=null?new u(_,h):new a(_,h)}o.fromSourceMap=function(f,h){return a.fromSourceMap(f,h)},o.prototype._version=3,o.prototype.__generatedMappings=null,Object.defineProperty(o.prototype,"_generatedMappings",{configurable:!0,enumerable:!0,get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}}),o.prototype.__originalMappings=null,Object.defineProperty(o.prototype,"_originalMappings",{configurable:!0,enumerable:!0,get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}}),o.prototype._charIsMappingSeparator=function(h,_){var p=h.charAt(_);return p===";"||p===","},o.prototype._parseMappings=function(h,_){throw new Error("Subclasses must implement _parseMappings")},o.GENERATED_ORDER=1,o.ORIGINAL_ORDER=2,o.GREATEST_LOWER_BOUND=1,o.LEAST_UPPER_BOUND=2,o.prototype.eachMapping=function(h,_,p){var m=_||null,g=p||o.GENERATED_ORDER,b;switch(g){case o.GENERATED_ORDER:b=this._generatedMappings;break;case o.ORIGINAL_ORDER:b=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}var w=this.sourceRoot;b.map(function(C){var M=C.source===null?null:this._sources.at(C.source);return M=n.computeSourceURL(w,M,this._sourceMapURL),{source:M,generatedLine:C.generatedLine,generatedColumn:C.generatedColumn,originalLine:C.originalLine,originalColumn:C.originalColumn,name:C.name===null?null:this._names.at(C.name)}},this).forEach(h,m)},o.prototype.allGeneratedPositionsFor=function(h){var _=n.getArg(h,"line"),p={source:n.getArg(h,"source"),originalLine:_,originalColumn:n.getArg(h,"column",0)};if(p.source=this._findSourceIndex(p.source),p.source<0)return[];var m=[],g=this._findMapping(p,this._originalMappings,"originalLine","originalColumn",n.compareByOriginalPositions,t.LEAST_UPPER_BOUND);if(g>=0){var b=this._originalMappings[g];if(h.column===void 0)for(var w=b.originalLine;b&&b.originalLine===w;)m.push({line:n.getArg(b,"generatedLine",null),column:n.getArg(b,"generatedColumn",null),lastColumn:n.getArg(b,"lastGeneratedColumn",null)}),b=this._originalMappings[++g];else for(var C=b.originalColumn;b&&b.originalLine===_&&b.originalColumn==C;)m.push({line:n.getArg(b,"generatedLine",null),column:n.getArg(b,"generatedColumn",null),lastColumn:n.getArg(b,"lastGeneratedColumn",null)}),b=this._originalMappings[++g]}return m},qr.SourceMapConsumer=o;function a(f,h){var _=f;typeof f=="string"&&(_=n.parseSourceMapInput(f));var p=n.getArg(_,"version"),m=n.getArg(_,"sources"),g=n.getArg(_,"names",[]),b=n.getArg(_,"sourceRoot",null),w=n.getArg(_,"sourcesContent",null),C=n.getArg(_,"mappings"),M=n.getArg(_,"file",null);if(p!=this._version)throw new Error("Unsupported version: "+p);b&&(b=n.normalize(b)),m=m.map(String).map(n.normalize).map(function(D){return b&&n.isAbsolute(b)&&n.isAbsolute(D)?n.relative(b,D):D}),this._names=e.fromArray(g.map(String),!0),this._sources=e.fromArray(m,!0),this._absoluteSources=this._sources.toArray().map(function(D){return n.computeSourceURL(b,D,h)}),this.sourceRoot=b,this.sourcesContent=w,this._mappings=C,this._sourceMapURL=h,this.file=M}a.prototype=Object.create(o.prototype),a.prototype.consumer=o,a.prototype._findSourceIndex=function(f){var h=f;if(this.sourceRoot!=null&&(h=n.relative(this.sourceRoot,h)),this._sources.has(h))return this._sources.indexOf(h);var _;for(_=0;_<this._absoluteSources.length;++_)if(this._absoluteSources[_]==f)return _;return-1},a.fromSourceMap=function(h,_){var p=Object.create(a.prototype),m=p._names=e.fromArray(h._names.toArray(),!0),g=p._sources=e.fromArray(h._sources.toArray(),!0);p.sourceRoot=h._sourceRoot,p.sourcesContent=h._generateSourcesContent(p._sources.toArray(),p.sourceRoot),p.file=h._file,p._sourceMapURL=_,p._absoluteSources=p._sources.toArray().map(function(O){return n.computeSourceURL(p.sourceRoot,O,_)});for(var b=h._mappings.toArray().slice(),w=p.__generatedMappings=[],C=p.__originalMappings=[],M=0,D=b.length;M<D;M++){var S=b[M],k=new c;k.generatedLine=S.generatedLine,k.generatedColumn=S.generatedColumn,S.source&&(k.source=g.indexOf(S.source),k.originalLine=S.originalLine,k.originalColumn=S.originalColumn,S.name&&(k.name=m.indexOf(S.name)),C.push(k)),w.push(k)}return r(p.__originalMappings,n.compareByOriginalPositions),p},a.prototype._version=3,Object.defineProperty(a.prototype,"sources",{get:function(){return this._absoluteSources.slice()}});function c(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}a.prototype._parseMappings=function(h,_){for(var p=1,m=0,g=0,b=0,w=0,C=0,M=h.length,D=0,S={},k={},O=[],I=[],B,q,z,j,Y;D<M;)if(h.charAt(D)===";")p++,D++,m=0;else if(h.charAt(D)===",")D++;else{for(B=new c,B.generatedLine=p,j=D;j<M&&!this._charIsMappingSeparator(h,j);j++);if(q=h.slice(D,j),z=S[q],z)D+=q.length;else{for(z=[];D<j;)i.decode(h,D,k),Y=k.value,D=k.rest,z.push(Y);if(z.length===2)throw new Error("Found a source, but no line and column");if(z.length===3)throw new Error("Found a source and line, but no column");S[q]=z}B.generatedColumn=m+z[0],m=B.generatedColumn,z.length>1&&(B.source=w+z[1],w+=z[1],B.originalLine=g+z[2],g=B.originalLine,B.originalLine+=1,B.originalColumn=b+z[3],b=B.originalColumn,z.length>4&&(B.name=C+z[4],C+=z[4])),I.push(B),typeof B.originalLine=="number"&&O.push(B)}r(I,n.compareByGeneratedPositionsDeflated),this.__generatedMappings=I,r(O,n.compareByOriginalPositions),this.__originalMappings=O},a.prototype._findMapping=function(h,_,p,m,g,b){if(h[p]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+h[p]);if(h[m]<0)throw new TypeError("Column must be greater than or equal to 0, got "+h[m]);return t.search(h,_,g,b)},a.prototype.computeColumnSpans=function(){for(var h=0;h<this._generatedMappings.length;++h){var _=this._generatedMappings[h];if(h+1<this._generatedMappings.length){var p=this._generatedMappings[h+1];if(_.generatedLine===p.generatedLine){_.lastGeneratedColumn=p.generatedColumn-1;continue}}_.lastGeneratedColumn=1/0}},a.prototype.originalPositionFor=function(h){var _={generatedLine:n.getArg(h,"line"),generatedColumn:n.getArg(h,"column")},p=this._findMapping(_,this._generatedMappings,"generatedLine","generatedColumn",n.compareByGeneratedPositionsDeflated,n.getArg(h,"bias",o.GREATEST_LOWER_BOUND));if(p>=0){var m=this._generatedMappings[p];if(m.generatedLine===_.generatedLine){var g=n.getArg(m,"source",null);g!==null&&(g=this._sources.at(g),g=n.computeSourceURL(this.sourceRoot,g,this._sourceMapURL));var b=n.getArg(m,"name",null);return b!==null&&(b=this._names.at(b)),{source:g,line:n.getArg(m,"originalLine",null),column:n.getArg(m,"originalColumn",null),name:b}}}return{source:null,line:null,column:null,name:null}},a.prototype.hasContentsOfAllSources=function(){return this.sourcesContent?this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(h){return h==null}):!1},a.prototype.sourceContentFor=function(h,_){if(!this.sourcesContent)return null;var p=this._findSourceIndex(h);if(p>=0)return this.sourcesContent[p];var m=h;this.sourceRoot!=null&&(m=n.relative(this.sourceRoot,m));var g;if(this.sourceRoot!=null&&(g=n.urlParse(this.sourceRoot))){var b=m.replace(/^file:\/\//,"");if(g.scheme=="file"&&this._sources.has(b))return this.sourcesContent[this._sources.indexOf(b)];if((!g.path||g.path=="/")&&this._sources.has("/"+m))return this.sourcesContent[this._sources.indexOf("/"+m)]}if(_)return null;throw new Error('"'+m+'" is not in the SourceMap.')},a.prototype.generatedPositionFor=function(h){var _=n.getArg(h,"source");if(_=this._findSourceIndex(_),_<0)return{line:null,column:null,lastColumn:null};var p={source:_,originalLine:n.getArg(h,"line"),originalColumn:n.getArg(h,"column")},m=this._findMapping(p,this._originalMappings,"originalLine","originalColumn",n.compareByOriginalPositions,n.getArg(h,"bias",o.GREATEST_LOWER_BOUND));if(m>=0){var g=this._originalMappings[m];if(g.source===p.source)return{line:n.getArg(g,"generatedLine",null),column:n.getArg(g,"generatedColumn",null),lastColumn:n.getArg(g,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}},qr.BasicSourceMapConsumer=a;function u(f,h){var _=f;typeof f=="string"&&(_=n.parseSourceMapInput(f));var p=n.getArg(_,"version"),m=n.getArg(_,"sections");if(p!=this._version)throw new Error("Unsupported version: "+p);this._sources=new e,this._names=new e;var g={line:-1,column:0};this._sections=m.map(function(b){if(b.url)throw new Error("Support for url field in sections not implemented.");var w=n.getArg(b,"offset"),C=n.getArg(w,"line"),M=n.getArg(w,"column");if(C<g.line||C===g.line&&M<g.column)throw new Error("Section offsets must be ordered and non-overlapping.");return g=w,{generatedOffset:{generatedLine:C+1,generatedColumn:M+1},consumer:new o(n.getArg(b,"map"),h)}})}return u.prototype=Object.create(o.prototype),u.prototype.constructor=o,u.prototype._version=3,Object.defineProperty(u.prototype,"sources",{get:function(){for(var f=[],h=0;h<this._sections.length;h++)for(var _=0;_<this._sections[h].consumer.sources.length;_++)f.push(this._sections[h].consumer.sources[_]);return f}}),u.prototype.originalPositionFor=function(h){var _={generatedLine:n.getArg(h,"line"),generatedColumn:n.getArg(h,"column")},p=t.search(_,this._sections,function(g,b){var w=g.generatedLine-b.generatedOffset.generatedLine;return w||g.generatedColumn-b.generatedOffset.generatedColumn}),m=this._sections[p];return m?m.consumer.originalPositionFor({line:_.generatedLine-(m.generatedOffset.generatedLine-1),column:_.generatedColumn-(m.generatedOffset.generatedLine===_.generatedLine?m.generatedOffset.generatedColumn-1:0),bias:h.bias}):{source:null,line:null,column:null,name:null}},u.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(h){return h.consumer.hasContentsOfAllSources()})},u.prototype.sourceContentFor=function(h,_){for(var p=0;p<this._sections.length;p++){var m=this._sections[p],g=m.consumer.sourceContentFor(h,!0);if(g)return g}if(_)return null;throw new Error('"'+h+'" is not in the SourceMap.')},u.prototype.generatedPositionFor=function(h){for(var _=0;_<this._sections.length;_++){var p=this._sections[_];if(p.consumer._findSourceIndex(n.getArg(h,"source"))!==-1){var m=p.consumer.generatedPositionFor(h);if(m){var g={line:m.line+(p.generatedOffset.generatedLine-1),column:m.column+(p.generatedOffset.generatedLine===m.line?p.generatedOffset.generatedColumn-1:0)};return g}}}return{line:null,column:null}},u.prototype._parseMappings=function(h,_){this.__generatedMappings=[],this.__originalMappings=[];for(var p=0;p<this._sections.length;p++)for(var m=this._sections[p],g=m.consumer._generatedMappings,b=0;b<g.length;b++){var w=g[b],C=m.consumer._sources.at(w.source);C=n.computeSourceURL(m.consumer.sourceRoot,C,this._sourceMapURL),this._sources.add(C),C=this._sources.indexOf(C);var M=null;w.name&&(M=m.consumer._names.at(w.name),this._names.add(M),M=this._names.indexOf(M));var D={source:C,generatedLine:w.generatedLine+(m.generatedOffset.generatedLine-1),generatedColumn:w.generatedColumn+(m.generatedOffset.generatedLine===w.generatedLine?m.generatedOffset.generatedColumn-1:0),originalLine:w.originalLine,originalColumn:w.originalColumn,name:M};this.__generatedMappings.push(D),typeof D.originalLine=="number"&&this.__originalMappings.push(D)}r(this.__generatedMappings,n.compareByGeneratedPositionsDeflated),r(this.__originalMappings,n.compareByOriginalPositions)},qr.IndexedSourceMapConsumer=u,qr}var uc={},Nd;function hw(){if(Nd)return uc;Nd=1;var n=Rg().SourceMapGenerator,t=Es(),e=/(\r?\n)/,i=10,r="$$$isSourceNode$$$";function o(a,c,u,f,h){this.children=[],this.sourceContents={},this.line=a??null,this.column=c??null,this.source=u??null,this.name=h??null,this[r]=!0,f!=null&&this.add(f)}return o.fromStringWithSourceMap=function(c,u,f){var h=new o,_=c.split(e),p=0,m=function(){var M=S(),D=S()||"";return M+D;function S(){return p<_.length?_[p++]:void 0}},g=1,b=0,w=null;return u.eachMapping(function(M){if(w!==null)if(g<M.generatedLine)C(w,m()),g++,b=0;else{var D=_[p]||"",S=D.substr(0,M.generatedColumn-b);_[p]=D.substr(M.generatedColumn-b),b=M.generatedColumn,C(w,S),w=M;return}for(;g<M.generatedLine;)h.add(m()),g++;if(b<M.generatedColumn){var D=_[p]||"";h.add(D.substr(0,M.generatedColumn)),_[p]=D.substr(M.generatedColumn),b=M.generatedColumn}w=M},this),p<_.length&&(w&&C(w,m()),h.add(_.splice(p).join(""))),u.sources.forEach(function(M){var D=u.sourceContentFor(M);D!=null&&(f!=null&&(M=t.join(f,M)),h.setSourceContent(M,D))}),h;function C(M,D){if(M===null||M.source===void 0)h.add(D);else{var S=f?t.join(f,M.source):M.source;h.add(new o(M.originalLine,M.originalColumn,S,D,M.name))}}},o.prototype.add=function(c){if(Array.isArray(c))c.forEach(function(u){this.add(u)},this);else if(c[r]||typeof c=="string")c&&this.children.push(c);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+c);return this},o.prototype.prepend=function(c){if(Array.isArray(c))for(var u=c.length-1;u>=0;u--)this.prepend(c[u]);else if(c[r]||typeof c=="string")this.children.unshift(c);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+c);return this},o.prototype.walk=function(c){for(var u,f=0,h=this.children.length;f<h;f++)u=this.children[f],u[r]?u.walk(c):u!==""&&c(u,{source:this.source,line:this.line,column:this.column,name:this.name})},o.prototype.join=function(c){var u,f,h=this.children.length;if(h>0){for(u=[],f=0;f<h-1;f++)u.push(this.children[f]),u.push(c);u.push(this.children[f]),this.children=u}return this},o.prototype.replaceRight=function(c,u){var f=this.children[this.children.length-1];return f[r]?f.replaceRight(c,u):typeof f=="string"?this.children[this.children.length-1]=f.replace(c,u):this.children.push("".replace(c,u)),this},o.prototype.setSourceContent=function(c,u){this.sourceContents[t.toSetString(c)]=u},o.prototype.walkSourceContents=function(c){for(var u=0,f=this.children.length;u<f;u++)this.children[u][r]&&this.children[u].walkSourceContents(c);for(var h=Object.keys(this.sourceContents),u=0,f=h.length;u<f;u++)c(t.fromSetString(h[u]),this.sourceContents[h[u]])},o.prototype.toString=function(){var c="";return this.walk(function(u){c+=u}),c},o.prototype.toStringWithSourceMap=function(c){var u={code:"",line:1,column:0},f=new n(c),h=!1,_=null,p=null,m=null,g=null;return this.walk(function(b,w){u.code+=b,w.source!==null&&w.line!==null&&w.column!==null?((_!==w.source||p!==w.line||m!==w.column||g!==w.name)&&f.addMapping({source:w.source,original:{line:w.line,column:w.column},generated:{line:u.line,column:u.column},name:w.name}),_=w.source,p=w.line,m=w.column,g=w.name,h=!0):h&&(f.addMapping({generated:{line:u.line,column:u.column}}),_=null,h=!1);for(var C=0,M=b.length;C<M;C++)b.charCodeAt(C)===i?(u.line++,u.column=0,C+1===M?(_=null,h=!1):h&&f.addMapping({source:w.source,original:{line:w.line,column:w.column},generated:{line:u.line,column:u.column},name:w.name})):u.column++}),this.walkSourceContents(function(b,w){f.setSourceContent(b,w)}),{code:u.code,map:f}},uc.SourceNode=o,uc}var Hd;function fw(){return Hd||(Hd=1,Vr.SourceMapGenerator=Rg().SourceMapGenerator,Vr.SourceMapConsumer=uw().SourceMapConsumer,Vr.SourceNode=hw().SourceNode),Vr}var Wd;function dw(){return Wd||(Wd=1,function(n,t){t.__esModule=!0;var e=We(),i=void 0;try{var r=fw();i=r.SourceNode}catch{}i||(i=function(c,u,f,h){this.src="",h&&this.add(h)},i.prototype={add:function(u){e.isArray(u)&&(u=u.join("")),this.src+=u},prepend:function(u){e.isArray(u)&&(u=u.join("")),this.src=u+this.src},toStringWithSourceMap:function(){return{code:this.toString()}},toString:function(){return this.src}});function o(c,u,f){if(e.isArray(c)){for(var h=[],_=0,p=c.length;_<p;_++)h.push(u.wrap(c[_],f));return h}else if(typeof c=="boolean"||typeof c=="number")return c+"";return c}function a(c){this.srcFile=c,this.source=[]}a.prototype={isEmpty:function(){return!this.source.length},prepend:function(u,f){this.source.unshift(this.wrap(u,f))},push:function(u,f){this.source.push(this.wrap(u,f))},merge:function(){var u=this.empty();return this.each(function(f){u.add([" ",f,`
10
- `])}),u},each:function(u){for(var f=0,h=this.source.length;f<h;f++)u(this.source[f])},empty:function(){var u=this.currentLocation||{start:{}};return new i(u.start.line,u.start.column,this.srcFile)},wrap:function(u){var f=arguments.length<=1||arguments[1]===void 0?this.currentLocation||{start:{}}:arguments[1];return u instanceof i?u:(u=o(u,this,f),new i(f.start.line,f.start.column,this.srcFile,u))},functionCall:function(u,f,h){return h=this.generateList(h),this.wrap([u,f?"."+f+"(":"(",h,")"])},quotedString:function(u){return'"'+(u+"").replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")+'"'},objectLiteral:function(u){var f=this,h=[];Object.keys(u).forEach(function(p){var m=o(u[p],f);m!=="undefined"&&h.push([f.quotedString(p),":",m])});var _=this.generateList(h);return _.prepend("{"),_.add("}"),_},generateList:function(u){for(var f=this.empty(),h=0,_=u.length;h<_;h++)h&&f.add(","),f.add(o(u[h],this));return f},generateArray:function(u){var f=this.generateList(u);return f.prepend("["),f.add("]"),f}},t.default=a,n.exports=t.default}(jo,jo.exports)),jo.exports}var zd;function pw(){return zd||(zd=1,function(n,t){t.__esModule=!0;function e(p){return p&&p.__esModule?p:{default:p}}var i=Xc(),r=bn(),o=e(r),a=We(),c=dw(),u=e(c);function f(p){this.value=p}function h(){}h.prototype={nameLookup:function(m,g){return this.internalNameLookup(m,g)},depthedLookup:function(m){return[this.aliasable("container.lookup"),"(depths, ",JSON.stringify(m),")"]},compilerInfo:function(){var m=i.COMPILER_REVISION,g=i.REVISION_CHANGES[m];return[m,g]},appendToBuffer:function(m,g,b){return a.isArray(m)||(m=[m]),m=this.source.wrap(m,g),this.environment.isSimple?["return ",m,";"]:b?["buffer += ",m,";"]:(m.appendToBuffer=!0,m)},initializeBuffer:function(){return this.quotedString("")},internalNameLookup:function(m,g){return this.lookupPropertyFunctionIsUsed=!0,["lookupProperty(",m,",",JSON.stringify(g),")"]},lookupPropertyFunctionIsUsed:!1,compile:function(m,g,b,w){this.environment=m,this.options=g,this.stringParams=this.options.stringParams,this.trackIds=this.options.trackIds,this.precompile=!w,this.name=this.environment.name,this.isChild=!!b,this.context=b||{decorators:[],programs:[],environments:[]},this.preamble(),this.stackSlot=0,this.stackVars=[],this.aliases={},this.registers={list:[]},this.hashes=[],this.compileStack=[],this.inlineStack=[],this.blockParams=[],this.compileChildren(m,g),this.useDepths=this.useDepths||m.useDepths||m.useDecorators||this.options.compat,this.useBlockParams=this.useBlockParams||m.useBlockParams;var C=m.opcodes,M=void 0,D=void 0,S=void 0,k=void 0;for(S=0,k=C.length;S<k;S++)M=C[S],this.source.currentLocation=M.loc,D=D||M.loc,this[M.opcode].apply(this,M.args);if(this.source.currentLocation=D,this.pushSource(""),this.stackSlot||this.inlineStack.length||this.compileStack.length)throw new o.default("Compile completed with content left on stack");this.decorators.isEmpty()?this.decorators=void 0:(this.useDecorators=!0,this.decorators.prepend(["var decorators = container.decorators, ",this.lookupPropertyFunctionVarDeclaration(),`;
11
- `]),this.decorators.push("return fn;"),w?this.decorators=Function.apply(this,["fn","props","container","depth0","data","blockParams","depths",this.decorators.merge()]):(this.decorators.prepend(`function(fn, props, container, depth0, data, blockParams, depths) {
12
- `),this.decorators.push(`}
13
- `),this.decorators=this.decorators.merge()));var O=this.createFunctionContext(w);if(this.isChild)return O;var I={compiler:this.compilerInfo(),main:O};this.decorators&&(I.main_d=this.decorators,I.useDecorators=!0);var B=this.context,q=B.programs,z=B.decorators;for(S=0,k=q.length;S<k;S++)q[S]&&(I[S]=q[S],z[S]&&(I[S+"_d"]=z[S],I.useDecorators=!0));return this.environment.usePartial&&(I.usePartial=!0),this.options.data&&(I.useData=!0),this.useDepths&&(I.useDepths=!0),this.useBlockParams&&(I.useBlockParams=!0),this.options.compat&&(I.compat=!0),w?I.compilerOptions=this.options:(I.compiler=JSON.stringify(I.compiler),this.source.currentLocation={start:{line:1,column:0}},I=this.objectLiteral(I),g.srcName?(I=I.toStringWithSourceMap({file:g.destName}),I.map=I.map&&I.map.toString()):I=I.toString()),I},preamble:function(){this.lastContext=0,this.source=new u.default(this.options.srcName),this.decorators=new u.default(this.options.srcName)},createFunctionContext:function(m){var g=this,b="",w=this.stackVars.concat(this.registers.list);w.length>0&&(b+=", "+w.join(", "));var C=0;Object.keys(this.aliases).forEach(function(S){var k=g.aliases[S];k.children&&k.referenceCount>1&&(b+=", alias"+ ++C+"="+S,k.children[0]="alias"+C)}),this.lookupPropertyFunctionIsUsed&&(b+=", "+this.lookupPropertyFunctionVarDeclaration());var M=["container","depth0","helpers","partials","data"];(this.useBlockParams||this.useDepths)&&M.push("blockParams"),this.useDepths&&M.push("depths");var D=this.mergeSource(b);return m?(M.push(D),Function.apply(this,M)):this.source.wrap(["function(",M.join(","),`) {
14
- `,D,"}"])},mergeSource:function(m){var g=this.environment.isSimple,b=!this.forceBuffer,w=void 0,C=void 0,M=void 0,D=void 0;return this.source.each(function(S){S.appendToBuffer?(M?S.prepend(" + "):M=S,D=S):(M&&(C?M.prepend("buffer += "):w=!0,D.add(";"),M=D=void 0),C=!0,g||(b=!1))}),b?M?(M.prepend("return "),D.add(";")):C||this.source.push('return "";'):(m+=", buffer = "+(w?"":this.initializeBuffer()),M?(M.prepend("return buffer + "),D.add(";")):this.source.push("return buffer;")),m&&this.source.prepend("var "+m.substring(2)+(w?"":`;
15
- `)),this.source.merge()},lookupPropertyFunctionVarDeclaration:function(){return`
16
- lookupProperty = container.lookupProperty || function(parent, propertyName) {
17
- if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
18
- return parent[propertyName];
19
- }
20
- return undefined
21
- }
22
- `.trim()},blockValue:function(m){var g=this.aliasable("container.hooks.blockHelperMissing"),b=[this.contextName(0)];this.setupHelperArgs(m,0,b);var w=this.popStack();b.splice(1,0,w),this.push(this.source.functionCall(g,"call",b))},ambiguousBlockValue:function(){var m=this.aliasable("container.hooks.blockHelperMissing"),g=[this.contextName(0)];this.setupHelperArgs("",0,g,!0),this.flushInline();var b=this.topStack();g.splice(1,0,b),this.pushSource(["if (!",this.lastHelper,") { ",b," = ",this.source.functionCall(m,"call",g),"}"])},appendContent:function(m){this.pendingContent?m=this.pendingContent+m:this.pendingLocation=this.source.currentLocation,this.pendingContent=m},append:function(){if(this.isInline())this.replaceStack(function(g){return[" != null ? ",g,' : ""']}),this.pushSource(this.appendToBuffer(this.popStack()));else{var m=this.popStack();this.pushSource(["if (",m," != null) { ",this.appendToBuffer(m,void 0,!0)," }"]),this.environment.isSimple&&this.pushSource(["else { ",this.appendToBuffer("''",void 0,!0)," }"])}},appendEscaped:function(){this.pushSource(this.appendToBuffer([this.aliasable("container.escapeExpression"),"(",this.popStack(),")"]))},getContext:function(m){this.lastContext=m},pushContext:function(){this.pushStackLiteral(this.contextName(this.lastContext))},lookupOnContext:function(m,g,b,w){var C=0;!w&&this.options.compat&&!this.lastContext?this.push(this.depthedLookup(m[C++])):this.pushContext(),this.resolvePath("context",m,C,g,b)},lookupBlockParam:function(m,g){this.useBlockParams=!0,this.push(["blockParams[",m[0],"][",m[1],"]"]),this.resolvePath("context",g,1)},lookupData:function(m,g,b){m?this.pushStackLiteral("container.data(data, "+m+")"):this.pushStackLiteral("data"),this.resolvePath("data",g,0,!0,b)},resolvePath:function(m,g,b,w,C){var M=this;if(this.options.strict||this.options.assumeObjects){this.push(_(this.options.strict&&C,this,g,m));return}for(var D=g.length;b<D;b++)this.replaceStack(function(S){var k=M.nameLookup(S,g[b],m);return w?[" && ",k]:[" != null ? ",k," : ",S]})},resolvePossibleLambda:function(){this.push([this.aliasable("container.lambda"),"(",this.popStack(),", ",this.contextName(0),")"])},pushStringParam:function(m,g){this.pushContext(),this.pushString(g),g!=="SubExpression"&&(typeof m=="string"?this.pushString(m):this.pushStackLiteral(m))},emptyHash:function(m){this.trackIds&&this.push("{}"),this.stringParams&&(this.push("{}"),this.push("{}")),this.pushStackLiteral(m?"undefined":"{}")},pushHash:function(){this.hash&&this.hashes.push(this.hash),this.hash={values:{},types:[],contexts:[],ids:[]}},popHash:function(){var m=this.hash;this.hash=this.hashes.pop(),this.trackIds&&this.push(this.objectLiteral(m.ids)),this.stringParams&&(this.push(this.objectLiteral(m.contexts)),this.push(this.objectLiteral(m.types))),this.push(this.objectLiteral(m.values))},pushString:function(m){this.pushStackLiteral(this.quotedString(m))},pushLiteral:function(m){this.pushStackLiteral(m)},pushProgram:function(m){m!=null?this.pushStackLiteral(this.programExpression(m)):this.pushStackLiteral(null)},registerDecorator:function(m,g){var b=this.nameLookup("decorators",g,"decorator"),w=this.setupHelperArgs(g,m);this.decorators.push(["fn = ",this.decorators.functionCall(b,"",["fn","props","container",w])," || fn;"])},invokeHelper:function(m,g,b){var w=this.popStack(),C=this.setupHelper(m,g),M=[];b&&M.push(C.name),M.push(w),this.options.strict||M.push(this.aliasable("container.hooks.helperMissing"));var D=["(",this.itemsSeparatedBy(M,"||"),")"],S=this.source.functionCall(D,"call",C.callParams);this.push(S)},itemsSeparatedBy:function(m,g){var b=[];b.push(m[0]);for(var w=1;w<m.length;w++)b.push(g,m[w]);return b},invokeKnownHelper:function(m,g){var b=this.setupHelper(m,g);this.push(this.source.functionCall(b.name,"call",b.callParams))},invokeAmbiguous:function(m,g){this.useRegister("helper");var b=this.popStack();this.emptyHash();var w=this.setupHelper(0,m,g),C=this.lastHelper=this.nameLookup("helpers",m,"helper"),M=["(","(helper = ",C," || ",b,")"];this.options.strict||(M[0]="(helper = ",M.push(" != null ? helper : ",this.aliasable("container.hooks.helperMissing"))),this.push(["(",M,w.paramsInit?["),(",w.paramsInit]:[],"),","(typeof helper === ",this.aliasable('"function"')," ? ",this.source.functionCall("helper","call",w.callParams)," : helper))"])},invokePartial:function(m,g,b){var w=[],C=this.setupParams(g,1,w);m&&(g=this.popStack(),delete C.name),b&&(C.indent=JSON.stringify(b)),C.helpers="helpers",C.partials="partials",C.decorators="container.decorators",m?w.unshift(g):w.unshift(this.nameLookup("partials",g,"partial")),this.options.compat&&(C.depths="depths"),C=this.objectLiteral(C),w.push(C),this.push(this.source.functionCall("container.invokePartial","",w))},assignToHash:function(m){var g=this.popStack(),b=void 0,w=void 0,C=void 0;this.trackIds&&(C=this.popStack()),this.stringParams&&(w=this.popStack(),b=this.popStack());var M=this.hash;b&&(M.contexts[m]=b),w&&(M.types[m]=w),C&&(M.ids[m]=C),M.values[m]=g},pushId:function(m,g,b){m==="BlockParam"?this.pushStackLiteral("blockParams["+g[0]+"].path["+g[1]+"]"+(b?" + "+JSON.stringify("."+b):"")):m==="PathExpression"?this.pushString(g):m==="SubExpression"?this.pushStackLiteral("true"):this.pushStackLiteral("null")},compiler:h,compileChildren:function(m,g){for(var b=m.children,w=void 0,C=void 0,M=0,D=b.length;M<D;M++){w=b[M],C=new this.compiler;var S=this.matchExistingProgram(w);if(S==null){this.context.programs.push("");var k=this.context.programs.length;w.index=k,w.name="program"+k,this.context.programs[k]=C.compile(w,g,this.context,!this.precompile),this.context.decorators[k]=C.decorators,this.context.environments[k]=w,this.useDepths=this.useDepths||C.useDepths,this.useBlockParams=this.useBlockParams||C.useBlockParams,w.useDepths=this.useDepths,w.useBlockParams=this.useBlockParams}else w.index=S.index,w.name="program"+S.index,this.useDepths=this.useDepths||S.useDepths,this.useBlockParams=this.useBlockParams||S.useBlockParams}},matchExistingProgram:function(m){for(var g=0,b=this.context.environments.length;g<b;g++){var w=this.context.environments[g];if(w&&w.equals(m))return w}},programExpression:function(m){var g=this.environment.children[m],b=[g.index,"data",g.blockParams];return(this.useBlockParams||this.useDepths)&&b.push("blockParams"),this.useDepths&&b.push("depths"),"container.program("+b.join(", ")+")"},useRegister:function(m){this.registers[m]||(this.registers[m]=!0,this.registers.list.push(m))},push:function(m){return m instanceof f||(m=this.source.wrap(m)),this.inlineStack.push(m),m},pushStackLiteral:function(m){this.push(new f(m))},pushSource:function(m){this.pendingContent&&(this.source.push(this.appendToBuffer(this.source.quotedString(this.pendingContent),this.pendingLocation)),this.pendingContent=void 0),m&&this.source.push(m)},replaceStack:function(m){var g=["("],b=void 0,w=void 0,C=void 0;if(!this.isInline())throw new o.default("replaceStack on non-inline");var M=this.popStack(!0);if(M instanceof f)b=[M.value],g=["(",b],C=!0;else{w=!0;var D=this.incrStack();g=["((",this.push(D)," = ",M,")"],b=this.topStack()}var S=m.call(this,b);C||this.popStack(),w&&this.stackSlot--,this.push(g.concat(S,")"))},incrStack:function(){return this.stackSlot++,this.stackSlot>this.stackVars.length&&this.stackVars.push("stack"+this.stackSlot),this.topStackName()},topStackName:function(){return"stack"+this.stackSlot},flushInline:function(){var m=this.inlineStack;this.inlineStack=[];for(var g=0,b=m.length;g<b;g++){var w=m[g];if(w instanceof f)this.compileStack.push(w);else{var C=this.incrStack();this.pushSource([C," = ",w,";"]),this.compileStack.push(C)}}},isInline:function(){return this.inlineStack.length},popStack:function(m){var g=this.isInline(),b=(g?this.inlineStack:this.compileStack).pop();if(!m&&b instanceof f)return b.value;if(!g){if(!this.stackSlot)throw new o.default("Invalid stack pop");this.stackSlot--}return b},topStack:function(){var m=this.isInline()?this.inlineStack:this.compileStack,g=m[m.length-1];return g instanceof f?g.value:g},contextName:function(m){return this.useDepths&&m?"depths["+m+"]":"depth"+m},quotedString:function(m){return this.source.quotedString(m)},objectLiteral:function(m){return this.source.objectLiteral(m)},aliasable:function(m){var g=this.aliases[m];return g?(g.referenceCount++,g):(g=this.aliases[m]=this.source.wrap(m),g.aliasable=!0,g.referenceCount=1,g)},setupHelper:function(m,g,b){var w=[],C=this.setupHelperArgs(g,m,w,b),M=this.nameLookup("helpers",g,"helper"),D=this.aliasable(this.contextName(0)+" != null ? "+this.contextName(0)+" : (container.nullContext || {})");return{params:w,paramsInit:C,name:M,callParams:[D].concat(w)}},setupParams:function(m,g,b){var w={},C=[],M=[],D=[],S=!b,k=void 0;S&&(b=[]),w.name=this.quotedString(m),w.hash=this.popStack(),this.trackIds&&(w.hashIds=this.popStack()),this.stringParams&&(w.hashTypes=this.popStack(),w.hashContexts=this.popStack());var O=this.popStack(),I=this.popStack();(I||O)&&(w.fn=I||"container.noop",w.inverse=O||"container.noop");for(var B=g;B--;)k=this.popStack(),b[B]=k,this.trackIds&&(D[B]=this.popStack()),this.stringParams&&(M[B]=this.popStack(),C[B]=this.popStack());return S&&(w.args=this.source.generateArray(b)),this.trackIds&&(w.ids=this.source.generateArray(D)),this.stringParams&&(w.types=this.source.generateArray(M),w.contexts=this.source.generateArray(C)),this.options.data&&(w.data="data"),this.useBlockParams&&(w.blockParams="blockParams"),w},setupHelperArgs:function(m,g,b,w){var C=this.setupParams(m,g,b);return C.loc=JSON.stringify(this.source.currentLocation),C=this.objectLiteral(C),w?(this.useRegister("options"),b.push("options"),["options=",C]):b?(b.push(C),""):C}},function(){for(var p="break else new var case finally return void catch for switch while continue function this with default if throw delete in try do instanceof typeof abstract enum int short boolean export interface static byte extends long super char final native synchronized class float package throws const goto private transient debugger implements protected volatile double import public let yield await null true false".split(" "),m=h.RESERVED_WORDS={},g=0,b=p.length;g<b;g++)m[p[g]]=!0}(),h.isValidJavaScriptVariableName=function(p){return!h.RESERVED_WORDS[p]&&/^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(p)};function _(p,m,g,b){var w=m.popStack(),C=0,M=g.length;for(p&&M--;C<M;C++)w=m.nameLookup(w,g[C],b);return p?[m.aliasable("container.strict"),"(",w,", ",m.quotedString(g[C]),", ",JSON.stringify(m.source.currentLocation)," )"]:w}t.default=h,n.exports=t.default}(zo,zo.exports)),zo.exports}var jd;function gw(){return jd||(jd=1,function(n,t){t.__esModule=!0;function e(M){return M&&M.__esModule?M:{default:M}}var i=tw(),r=e(i),o=Ag(),a=e(o),c=rw(),u=sw(),f=pw(),h=e(f),_=Lg(),p=e(_),m=Mg(),g=e(m),b=r.default.create;function w(){var M=b();return M.compile=function(D,S){return u.compile(D,S,M)},M.precompile=function(D,S){return u.precompile(D,S,M)},M.AST=a.default,M.Compiler=u.Compiler,M.JavaScriptCompiler=h.default,M.Parser=c.parser,M.parse=c.parse,M.parseWithoutProcessing=c.parseWithoutProcessing,M}var C=w();C.create=w,g.default(C),C.Visitor=p.default,C.default=C,t.default=C,n.exports=t.default}(bo,bo.exports)),bo.exports}var mw=gw();const oe=Sr(mw);var Zr={exports:{}};/**
23
- * @license
24
- * Lodash <https://lodash.com/>
25
- * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
26
- * Released under MIT license <https://lodash.com/license>
27
- * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
28
- * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
29
- */var _w=Zr.exports,Ud;function yw(){return Ud||(Ud=1,function(n,t){(function(){var e,i="4.17.21",r=200,o="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",a="Expected a function",c="Invalid `variable` option passed into `_.template`",u="__lodash_hash_undefined__",f=500,h="__lodash_placeholder__",_=1,p=2,m=4,g=1,b=2,w=1,C=2,M=4,D=8,S=16,k=32,O=64,I=128,B=256,q=512,z=30,j="...",Y=800,ot=16,nt=1,Z=2,X=3,tt=1/0,et=9007199254740991,at=17976931348623157e292,ct=NaN,gt=4294967295,Ot=gt-1,Ft=gt>>>1,dt=[["ary",I],["bind",w],["bindKey",C],["curry",D],["curryRight",S],["flip",q],["partial",k],["partialRight",O],["rearg",B]],xt="[object Arguments]",Zt="[object Array]",Qe="[object AsyncFunction]",Le="[object Boolean]",_e="[object Date]",le="[object DOMException]",se="[object Error]",Pe="[object Function]",xn="[object GeneratorFunction]",ze="[object Map]",ei="[object Number]",ni="[object Null]",ke="[object Object]",Ps="[object Promise]",qa="[object Proxy]",In="[object RegExp]",je="[object Set]",Si="[object String]",ki="[object Symbol]",Gi="[object Undefined]",ye="[object WeakMap]",Cr="[object WeakSet]",Ei="[object ArrayBuffer]",Ee="[object DataView]",Mr="[object Float32Array]",A="[object Float64Array]",v="[object Int8Array]",x="[object Int16Array]",R="[object Int32Array]",N="[object Uint8Array]",U="[object Uint8ClampedArray]",G="[object Uint16Array]",vt="[object Uint32Array]",qt=/\b__p \+= '';/g,Ht=/\b(__p \+=) '' \+/g,$t=/(__e\(.*?\)|\b__t\)) \+\n'';/g,It=/&(?:amp|lt|gt|quot|#39);/g,ku=/[&<>"']/g,n0=RegExp(It.source),i0=RegExp(ku.source),r0=/<%-([\s\S]+?)%>/g,s0=/<%([\s\S]+?)%>/g,Eu=/<%=([\s\S]+?)%>/g,o0=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a0=/^\w*$/,l0=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,$a=/[\\^$.*+?()[\]{}|]/g,c0=RegExp($a.source),Ya=/^\s+/,u0=/\s/,h0=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,f0=/\{\n\/\* \[wrapped with (.+)\] \*/,d0=/,? & /,p0=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,g0=/[()=,{}\[\]\/\s]/,m0=/\\(\\)?/g,_0=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Cu=/\w*$/,y0=/^[-+]0x[0-9a-f]+$/i,v0=/^0b[01]+$/i,b0=/^\[object .+?Constructor\]$/,x0=/^0o[0-7]+$/i,w0=/^(?:0|[1-9]\d*)$/,S0=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Os=/($^)/,k0=/['\n\r\u2028\u2029\\]/g,Rs="\\ud800-\\udfff",E0="\\u0300-\\u036f",C0="\\ufe20-\\ufe2f",M0="\\u20d0-\\u20ff",Mu=E0+C0+M0,Au="\\u2700-\\u27bf",Lu="a-z\\xdf-\\xf6\\xf8-\\xff",A0="\\xac\\xb1\\xd7\\xf7",L0="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",P0="\\u2000-\\u206f",O0=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Pu="A-Z\\xc0-\\xd6\\xd8-\\xde",Ou="\\ufe0e\\ufe0f",Ru=A0+L0+P0+O0,Ga="['’]",R0="["+Rs+"]",Iu="["+Ru+"]",Is="["+Mu+"]",Tu="\\d+",I0="["+Au+"]",Du="["+Lu+"]",Bu="[^"+Rs+Ru+Tu+Au+Lu+Pu+"]",Ka="\\ud83c[\\udffb-\\udfff]",T0="(?:"+Is+"|"+Ka+")",Fu="[^"+Rs+"]",Xa="(?:\\ud83c[\\udde6-\\uddff]){2}",Ja="[\\ud800-\\udbff][\\udc00-\\udfff]",Ki="["+Pu+"]",Nu="\\u200d",Hu="(?:"+Du+"|"+Bu+")",D0="(?:"+Ki+"|"+Bu+")",Wu="(?:"+Ga+"(?:d|ll|m|re|s|t|ve))?",zu="(?:"+Ga+"(?:D|LL|M|RE|S|T|VE))?",ju=T0+"?",Uu="["+Ou+"]?",B0="(?:"+Nu+"(?:"+[Fu,Xa,Ja].join("|")+")"+Uu+ju+")*",F0="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",N0="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Vu=Uu+ju+B0,H0="(?:"+[I0,Xa,Ja].join("|")+")"+Vu,W0="(?:"+[Fu+Is+"?",Is,Xa,Ja,R0].join("|")+")",z0=RegExp(Ga,"g"),j0=RegExp(Is,"g"),Za=RegExp(Ka+"(?="+Ka+")|"+W0+Vu,"g"),U0=RegExp([Ki+"?"+Du+"+"+Wu+"(?="+[Iu,Ki,"$"].join("|")+")",D0+"+"+zu+"(?="+[Iu,Ki+Hu,"$"].join("|")+")",Ki+"?"+Hu+"+"+Wu,Ki+"+"+zu,N0,F0,Tu,H0].join("|"),"g"),V0=RegExp("["+Nu+Rs+Mu+Ou+"]"),q0=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,$0=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Y0=-1,jt={};jt[Mr]=jt[A]=jt[v]=jt[x]=jt[R]=jt[N]=jt[U]=jt[G]=jt[vt]=!0,jt[xt]=jt[Zt]=jt[Ei]=jt[Le]=jt[Ee]=jt[_e]=jt[se]=jt[Pe]=jt[ze]=jt[ei]=jt[ke]=jt[In]=jt[je]=jt[Si]=jt[ye]=!1;var Wt={};Wt[xt]=Wt[Zt]=Wt[Ei]=Wt[Ee]=Wt[Le]=Wt[_e]=Wt[Mr]=Wt[A]=Wt[v]=Wt[x]=Wt[R]=Wt[ze]=Wt[ei]=Wt[ke]=Wt[In]=Wt[je]=Wt[Si]=Wt[ki]=Wt[N]=Wt[U]=Wt[G]=Wt[vt]=!0,Wt[se]=Wt[Pe]=Wt[ye]=!1;var G0={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},K0={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},X0={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},J0={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Z0=parseFloat,Q0=parseInt,qu=typeof Xn=="object"&&Xn&&Xn.Object===Object&&Xn,t_=typeof self=="object"&&self&&self.Object===Object&&self,ge=qu||t_||Function("return this")(),Qa=t&&!t.nodeType&&t,Ci=Qa&&!0&&n&&!n.nodeType&&n,$u=Ci&&Ci.exports===Qa,tl=$u&&qu.process,tn=function(){try{var H=Ci&&Ci.require&&Ci.require("util").types;return H||tl&&tl.binding&&tl.binding("util")}catch{}}(),Yu=tn&&tn.isArrayBuffer,Gu=tn&&tn.isDate,Ku=tn&&tn.isMap,Xu=tn&&tn.isRegExp,Ju=tn&&tn.isSet,Zu=tn&&tn.isTypedArray;function Ue(H,$,V){switch(V.length){case 0:return H.call($);case 1:return H.call($,V[0]);case 2:return H.call($,V[0],V[1]);case 3:return H.call($,V[0],V[1],V[2])}return H.apply($,V)}function e_(H,$,V,st){for(var mt=-1,Rt=H==null?0:H.length;++mt<Rt;){var ce=H[mt];$(st,ce,V(ce),H)}return st}function en(H,$){for(var V=-1,st=H==null?0:H.length;++V<st&&$(H[V],V,H)!==!1;);return H}function n_(H,$){for(var V=H==null?0:H.length;V--&&$(H[V],V,H)!==!1;);return H}function Qu(H,$){for(var V=-1,st=H==null?0:H.length;++V<st;)if(!$(H[V],V,H))return!1;return!0}function ii(H,$){for(var V=-1,st=H==null?0:H.length,mt=0,Rt=[];++V<st;){var ce=H[V];$(ce,V,H)&&(Rt[mt++]=ce)}return Rt}function Ts(H,$){var V=H==null?0:H.length;return!!V&&Xi(H,$,0)>-1}function el(H,$,V){for(var st=-1,mt=H==null?0:H.length;++st<mt;)if(V($,H[st]))return!0;return!1}function Yt(H,$){for(var V=-1,st=H==null?0:H.length,mt=Array(st);++V<st;)mt[V]=$(H[V],V,H);return mt}function ri(H,$){for(var V=-1,st=$.length,mt=H.length;++V<st;)H[mt+V]=$[V];return H}function nl(H,$,V,st){var mt=-1,Rt=H==null?0:H.length;for(st&&Rt&&(V=H[++mt]);++mt<Rt;)V=$(V,H[mt],mt,H);return V}function i_(H,$,V,st){var mt=H==null?0:H.length;for(st&&mt&&(V=H[--mt]);mt--;)V=$(V,H[mt],mt,H);return V}function il(H,$){for(var V=-1,st=H==null?0:H.length;++V<st;)if($(H[V],V,H))return!0;return!1}var r_=rl("length");function s_(H){return H.split("")}function o_(H){return H.match(p0)||[]}function th(H,$,V){var st;return V(H,function(mt,Rt,ce){if($(mt,Rt,ce))return st=Rt,!1}),st}function Ds(H,$,V,st){for(var mt=H.length,Rt=V+(st?1:-1);st?Rt--:++Rt<mt;)if($(H[Rt],Rt,H))return Rt;return-1}function Xi(H,$,V){return $===$?y_(H,$,V):Ds(H,eh,V)}function a_(H,$,V,st){for(var mt=V-1,Rt=H.length;++mt<Rt;)if(st(H[mt],$))return mt;return-1}function eh(H){return H!==H}function nh(H,$){var V=H==null?0:H.length;return V?ol(H,$)/V:ct}function rl(H){return function($){return $==null?e:$[H]}}function sl(H){return function($){return H==null?e:H[$]}}function ih(H,$,V,st,mt){return mt(H,function(Rt,ce,Nt){V=st?(st=!1,Rt):$(V,Rt,ce,Nt)}),V}function l_(H,$){var V=H.length;for(H.sort($);V--;)H[V]=H[V].value;return H}function ol(H,$){for(var V,st=-1,mt=H.length;++st<mt;){var Rt=$(H[st]);Rt!==e&&(V=V===e?Rt:V+Rt)}return V}function al(H,$){for(var V=-1,st=Array(H);++V<H;)st[V]=$(V);return st}function c_(H,$){return Yt($,function(V){return[V,H[V]]})}function rh(H){return H&&H.slice(0,lh(H)+1).replace(Ya,"")}function Ve(H){return function($){return H($)}}function ll(H,$){return Yt($,function(V){return H[V]})}function Ar(H,$){return H.has($)}function sh(H,$){for(var V=-1,st=H.length;++V<st&&Xi($,H[V],0)>-1;);return V}function oh(H,$){for(var V=H.length;V--&&Xi($,H[V],0)>-1;);return V}function u_(H,$){for(var V=H.length,st=0;V--;)H[V]===$&&++st;return st}var h_=sl(G0),f_=sl(K0);function d_(H){return"\\"+J0[H]}function p_(H,$){return H==null?e:H[$]}function Ji(H){return V0.test(H)}function g_(H){return q0.test(H)}function m_(H){for(var $,V=[];!($=H.next()).done;)V.push($.value);return V}function cl(H){var $=-1,V=Array(H.size);return H.forEach(function(st,mt){V[++$]=[mt,st]}),V}function ah(H,$){return function(V){return H($(V))}}function si(H,$){for(var V=-1,st=H.length,mt=0,Rt=[];++V<st;){var ce=H[V];(ce===$||ce===h)&&(H[V]=h,Rt[mt++]=V)}return Rt}function Bs(H){var $=-1,V=Array(H.size);return H.forEach(function(st){V[++$]=st}),V}function __(H){var $=-1,V=Array(H.size);return H.forEach(function(st){V[++$]=[st,st]}),V}function y_(H,$,V){for(var st=V-1,mt=H.length;++st<mt;)if(H[st]===$)return st;return-1}function v_(H,$,V){for(var st=V+1;st--;)if(H[st]===$)return st;return st}function Zi(H){return Ji(H)?x_(H):r_(H)}function hn(H){return Ji(H)?w_(H):s_(H)}function lh(H){for(var $=H.length;$--&&u0.test(H.charAt($)););return $}var b_=sl(X0);function x_(H){for(var $=Za.lastIndex=0;Za.test(H);)++$;return $}function w_(H){return H.match(Za)||[]}function S_(H){return H.match(U0)||[]}var k_=function H($){$=$==null?ge:Qi.defaults(ge.Object(),$,Qi.pick(ge,$0));var V=$.Array,st=$.Date,mt=$.Error,Rt=$.Function,ce=$.Math,Nt=$.Object,ul=$.RegExp,E_=$.String,nn=$.TypeError,Fs=V.prototype,C_=Rt.prototype,tr=Nt.prototype,Ns=$["__core-js_shared__"],Hs=C_.toString,Dt=tr.hasOwnProperty,M_=0,ch=function(){var s=/[^.]+$/.exec(Ns&&Ns.keys&&Ns.keys.IE_PROTO||"");return s?"Symbol(src)_1."+s:""}(),Ws=tr.toString,A_=Hs.call(Nt),L_=ge._,P_=ul("^"+Hs.call(Dt).replace($a,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),zs=$u?$.Buffer:e,oi=$.Symbol,js=$.Uint8Array,uh=zs?zs.allocUnsafe:e,Us=ah(Nt.getPrototypeOf,Nt),hh=Nt.create,fh=tr.propertyIsEnumerable,Vs=Fs.splice,dh=oi?oi.isConcatSpreadable:e,Lr=oi?oi.iterator:e,Mi=oi?oi.toStringTag:e,qs=function(){try{var s=Ri(Nt,"defineProperty");return s({},"",{}),s}catch{}}(),O_=$.clearTimeout!==ge.clearTimeout&&$.clearTimeout,R_=st&&st.now!==ge.Date.now&&st.now,I_=$.setTimeout!==ge.setTimeout&&$.setTimeout,$s=ce.ceil,Ys=ce.floor,hl=Nt.getOwnPropertySymbols,T_=zs?zs.isBuffer:e,ph=$.isFinite,D_=Fs.join,B_=ah(Nt.keys,Nt),ue=ce.max,ve=ce.min,F_=st.now,N_=$.parseInt,gh=ce.random,H_=Fs.reverse,fl=Ri($,"DataView"),Pr=Ri($,"Map"),dl=Ri($,"Promise"),er=Ri($,"Set"),Or=Ri($,"WeakMap"),Rr=Ri(Nt,"create"),Gs=Or&&new Or,nr={},W_=Ii(fl),z_=Ii(Pr),j_=Ii(dl),U_=Ii(er),V_=Ii(Or),Ks=oi?oi.prototype:e,Ir=Ks?Ks.valueOf:e,mh=Ks?Ks.toString:e;function L(s){if(Qt(s)&&!_t(s)&&!(s instanceof Mt)){if(s instanceof rn)return s;if(Dt.call(s,"__wrapped__"))return yf(s)}return new rn(s)}var ir=function(){function s(){}return function(l){if(!Xt(l))return{};if(hh)return hh(l);s.prototype=l;var d=new s;return s.prototype=e,d}}();function Xs(){}function rn(s,l){this.__wrapped__=s,this.__actions__=[],this.__chain__=!!l,this.__index__=0,this.__values__=e}L.templateSettings={escape:r0,evaluate:s0,interpolate:Eu,variable:"",imports:{_:L}},L.prototype=Xs.prototype,L.prototype.constructor=L,rn.prototype=ir(Xs.prototype),rn.prototype.constructor=rn;function Mt(s){this.__wrapped__=s,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=gt,this.__views__=[]}function q_(){var s=new Mt(this.__wrapped__);return s.__actions__=Oe(this.__actions__),s.__dir__=this.__dir__,s.__filtered__=this.__filtered__,s.__iteratees__=Oe(this.__iteratees__),s.__takeCount__=this.__takeCount__,s.__views__=Oe(this.__views__),s}function $_(){if(this.__filtered__){var s=new Mt(this);s.__dir__=-1,s.__filtered__=!0}else s=this.clone(),s.__dir__*=-1;return s}function Y_(){var s=this.__wrapped__.value(),l=this.__dir__,d=_t(s),y=l<0,E=d?s.length:0,P=sv(0,E,this.__views__),T=P.start,F=P.end,W=F-T,K=y?F:T-1,J=this.__iteratees__,Q=J.length,rt=0,lt=ve(W,this.__takeCount__);if(!d||!y&&E==W&&lt==W)return Wh(s,this.__actions__);var ht=[];t:for(;W--&&rt<lt;){K+=l;for(var wt=-1,ft=s[K];++wt<Q;){var kt=J[wt],Lt=kt.iteratee,Ye=kt.type,Ae=Lt(ft);if(Ye==Z)ft=Ae;else if(!Ae){if(Ye==nt)continue t;break t}}ht[rt++]=ft}return ht}Mt.prototype=ir(Xs.prototype),Mt.prototype.constructor=Mt;function Ai(s){var l=-1,d=s==null?0:s.length;for(this.clear();++l<d;){var y=s[l];this.set(y[0],y[1])}}function G_(){this.__data__=Rr?Rr(null):{},this.size=0}function K_(s){var l=this.has(s)&&delete this.__data__[s];return this.size-=l?1:0,l}function X_(s){var l=this.__data__;if(Rr){var d=l[s];return d===u?e:d}return Dt.call(l,s)?l[s]:e}function J_(s){var l=this.__data__;return Rr?l[s]!==e:Dt.call(l,s)}function Z_(s,l){var d=this.__data__;return this.size+=this.has(s)?0:1,d[s]=Rr&&l===e?u:l,this}Ai.prototype.clear=G_,Ai.prototype.delete=K_,Ai.prototype.get=X_,Ai.prototype.has=J_,Ai.prototype.set=Z_;function Tn(s){var l=-1,d=s==null?0:s.length;for(this.clear();++l<d;){var y=s[l];this.set(y[0],y[1])}}function Q_(){this.__data__=[],this.size=0}function ty(s){var l=this.__data__,d=Js(l,s);if(d<0)return!1;var y=l.length-1;return d==y?l.pop():Vs.call(l,d,1),--this.size,!0}function ey(s){var l=this.__data__,d=Js(l,s);return d<0?e:l[d][1]}function ny(s){return Js(this.__data__,s)>-1}function iy(s,l){var d=this.__data__,y=Js(d,s);return y<0?(++this.size,d.push([s,l])):d[y][1]=l,this}Tn.prototype.clear=Q_,Tn.prototype.delete=ty,Tn.prototype.get=ey,Tn.prototype.has=ny,Tn.prototype.set=iy;function Dn(s){var l=-1,d=s==null?0:s.length;for(this.clear();++l<d;){var y=s[l];this.set(y[0],y[1])}}function ry(){this.size=0,this.__data__={hash:new Ai,map:new(Pr||Tn),string:new Ai}}function sy(s){var l=co(this,s).delete(s);return this.size-=l?1:0,l}function oy(s){return co(this,s).get(s)}function ay(s){return co(this,s).has(s)}function ly(s,l){var d=co(this,s),y=d.size;return d.set(s,l),this.size+=d.size==y?0:1,this}Dn.prototype.clear=ry,Dn.prototype.delete=sy,Dn.prototype.get=oy,Dn.prototype.has=ay,Dn.prototype.set=ly;function Li(s){var l=-1,d=s==null?0:s.length;for(this.__data__=new Dn;++l<d;)this.add(s[l])}function cy(s){return this.__data__.set(s,u),this}function uy(s){return this.__data__.has(s)}Li.prototype.add=Li.prototype.push=cy,Li.prototype.has=uy;function fn(s){var l=this.__data__=new Tn(s);this.size=l.size}function hy(){this.__data__=new Tn,this.size=0}function fy(s){var l=this.__data__,d=l.delete(s);return this.size=l.size,d}function dy(s){return this.__data__.get(s)}function py(s){return this.__data__.has(s)}function gy(s,l){var d=this.__data__;if(d instanceof Tn){var y=d.__data__;if(!Pr||y.length<r-1)return y.push([s,l]),this.size=++d.size,this;d=this.__data__=new Dn(y)}return d.set(s,l),this.size=d.size,this}fn.prototype.clear=hy,fn.prototype.delete=fy,fn.prototype.get=dy,fn.prototype.has=py,fn.prototype.set=gy;function _h(s,l){var d=_t(s),y=!d&&Ti(s),E=!d&&!y&&hi(s),P=!d&&!y&&!E&&ar(s),T=d||y||E||P,F=T?al(s.length,E_):[],W=F.length;for(var K in s)(l||Dt.call(s,K))&&!(T&&(K=="length"||E&&(K=="offset"||K=="parent")||P&&(K=="buffer"||K=="byteLength"||K=="byteOffset")||Hn(K,W)))&&F.push(K);return F}function yh(s){var l=s.length;return l?s[kl(0,l-1)]:e}function my(s,l){return uo(Oe(s),Pi(l,0,s.length))}function _y(s){return uo(Oe(s))}function pl(s,l,d){(d!==e&&!dn(s[l],d)||d===e&&!(l in s))&&Bn(s,l,d)}function Tr(s,l,d){var y=s[l];(!(Dt.call(s,l)&&dn(y,d))||d===e&&!(l in s))&&Bn(s,l,d)}function Js(s,l){for(var d=s.length;d--;)if(dn(s[d][0],l))return d;return-1}function yy(s,l,d,y){return ai(s,function(E,P,T){l(y,E,d(E),T)}),y}function vh(s,l){return s&&Sn(l,de(l),s)}function vy(s,l){return s&&Sn(l,Ie(l),s)}function Bn(s,l,d){l=="__proto__"&&qs?qs(s,l,{configurable:!0,enumerable:!0,value:d,writable:!0}):s[l]=d}function gl(s,l){for(var d=-1,y=l.length,E=V(y),P=s==null;++d<y;)E[d]=P?e:Kl(s,l[d]);return E}function Pi(s,l,d){return s===s&&(d!==e&&(s=s<=d?s:d),l!==e&&(s=s>=l?s:l)),s}function sn(s,l,d,y,E,P){var T,F=l&_,W=l&p,K=l&m;if(d&&(T=E?d(s,y,E,P):d(s)),T!==e)return T;if(!Xt(s))return s;var J=_t(s);if(J){if(T=av(s),!F)return Oe(s,T)}else{var Q=be(s),rt=Q==Pe||Q==xn;if(hi(s))return Uh(s,F);if(Q==ke||Q==xt||rt&&!E){if(T=W||rt?{}:cf(s),!F)return W?Xy(s,vy(T,s)):Ky(s,vh(T,s))}else{if(!Wt[Q])return E?s:{};T=lv(s,Q,F)}}P||(P=new fn);var lt=P.get(s);if(lt)return lt;P.set(s,T),Nf(s)?s.forEach(function(ft){T.add(sn(ft,l,d,ft,s,P))}):Bf(s)&&s.forEach(function(ft,kt){T.set(kt,sn(ft,l,d,kt,s,P))});var ht=K?W?Dl:Tl:W?Ie:de,wt=J?e:ht(s);return en(wt||s,function(ft,kt){wt&&(kt=ft,ft=s[kt]),Tr(T,kt,sn(ft,l,d,kt,s,P))}),T}function by(s){var l=de(s);return function(d){return bh(d,s,l)}}function bh(s,l,d){var y=d.length;if(s==null)return!y;for(s=Nt(s);y--;){var E=d[y],P=l[E],T=s[E];if(T===e&&!(E in s)||!P(T))return!1}return!0}function xh(s,l,d){if(typeof s!="function")throw new nn(a);return zr(function(){s.apply(e,d)},l)}function Dr(s,l,d,y){var E=-1,P=Ts,T=!0,F=s.length,W=[],K=l.length;if(!F)return W;d&&(l=Yt(l,Ve(d))),y?(P=el,T=!1):l.length>=r&&(P=Ar,T=!1,l=new Li(l));t:for(;++E<F;){var J=s[E],Q=d==null?J:d(J);if(J=y||J!==0?J:0,T&&Q===Q){for(var rt=K;rt--;)if(l[rt]===Q)continue t;W.push(J)}else P(l,Q,y)||W.push(J)}return W}var ai=Gh(wn),wh=Gh(_l,!0);function xy(s,l){var d=!0;return ai(s,function(y,E,P){return d=!!l(y,E,P),d}),d}function Zs(s,l,d){for(var y=-1,E=s.length;++y<E;){var P=s[y],T=l(P);if(T!=null&&(F===e?T===T&&!$e(T):d(T,F)))var F=T,W=P}return W}function wy(s,l,d,y){var E=s.length;for(d=bt(d),d<0&&(d=-d>E?0:E+d),y=y===e||y>E?E:bt(y),y<0&&(y+=E),y=d>y?0:Wf(y);d<y;)s[d++]=l;return s}function Sh(s,l){var d=[];return ai(s,function(y,E,P){l(y,E,P)&&d.push(y)}),d}function me(s,l,d,y,E){var P=-1,T=s.length;for(d||(d=uv),E||(E=[]);++P<T;){var F=s[P];l>0&&d(F)?l>1?me(F,l-1,d,y,E):ri(E,F):y||(E[E.length]=F)}return E}var ml=Kh(),kh=Kh(!0);function wn(s,l){return s&&ml(s,l,de)}function _l(s,l){return s&&kh(s,l,de)}function Qs(s,l){return ii(l,function(d){return Wn(s[d])})}function Oi(s,l){l=ci(l,s);for(var d=0,y=l.length;s!=null&&d<y;)s=s[kn(l[d++])];return d&&d==y?s:e}function Eh(s,l,d){var y=l(s);return _t(s)?y:ri(y,d(s))}function Ce(s){return s==null?s===e?Gi:ni:Mi&&Mi in Nt(s)?rv(s):_v(s)}function yl(s,l){return s>l}function Sy(s,l){return s!=null&&Dt.call(s,l)}function ky(s,l){return s!=null&&l in Nt(s)}function Ey(s,l,d){return s>=ve(l,d)&&s<ue(l,d)}function vl(s,l,d){for(var y=d?el:Ts,E=s[0].length,P=s.length,T=P,F=V(P),W=1/0,K=[];T--;){var J=s[T];T&&l&&(J=Yt(J,Ve(l))),W=ve(J.length,W),F[T]=!d&&(l||E>=120&&J.length>=120)?new Li(T&&J):e}J=s[0];var Q=-1,rt=F[0];t:for(;++Q<E&&K.length<W;){var lt=J[Q],ht=l?l(lt):lt;if(lt=d||lt!==0?lt:0,!(rt?Ar(rt,ht):y(K,ht,d))){for(T=P;--T;){var wt=F[T];if(!(wt?Ar(wt,ht):y(s[T],ht,d)))continue t}rt&&rt.push(ht),K.push(lt)}}return K}function Cy(s,l,d,y){return wn(s,function(E,P,T){l(y,d(E),P,T)}),y}function Br(s,l,d){l=ci(l,s),s=df(s,l);var y=s==null?s:s[kn(an(l))];return y==null?e:Ue(y,s,d)}function Ch(s){return Qt(s)&&Ce(s)==xt}function My(s){return Qt(s)&&Ce(s)==Ei}function Ay(s){return Qt(s)&&Ce(s)==_e}function Fr(s,l,d,y,E){return s===l?!0:s==null||l==null||!Qt(s)&&!Qt(l)?s!==s&&l!==l:Ly(s,l,d,y,Fr,E)}function Ly(s,l,d,y,E,P){var T=_t(s),F=_t(l),W=T?Zt:be(s),K=F?Zt:be(l);W=W==xt?ke:W,K=K==xt?ke:K;var J=W==ke,Q=K==ke,rt=W==K;if(rt&&hi(s)){if(!hi(l))return!1;T=!0,J=!1}if(rt&&!J)return P||(P=new fn),T||ar(s)?of(s,l,d,y,E,P):nv(s,l,W,d,y,E,P);if(!(d&g)){var lt=J&&Dt.call(s,"__wrapped__"),ht=Q&&Dt.call(l,"__wrapped__");if(lt||ht){var wt=lt?s.value():s,ft=ht?l.value():l;return P||(P=new fn),E(wt,ft,d,y,P)}}return rt?(P||(P=new fn),iv(s,l,d,y,E,P)):!1}function Py(s){return Qt(s)&&be(s)==ze}function bl(s,l,d,y){var E=d.length,P=E,T=!y;if(s==null)return!P;for(s=Nt(s);E--;){var F=d[E];if(T&&F[2]?F[1]!==s[F[0]]:!(F[0]in s))return!1}for(;++E<P;){F=d[E];var W=F[0],K=s[W],J=F[1];if(T&&F[2]){if(K===e&&!(W in s))return!1}else{var Q=new fn;if(y)var rt=y(K,J,W,s,l,Q);if(!(rt===e?Fr(J,K,g|b,y,Q):rt))return!1}}return!0}function Mh(s){if(!Xt(s)||fv(s))return!1;var l=Wn(s)?P_:b0;return l.test(Ii(s))}function Oy(s){return Qt(s)&&Ce(s)==In}function Ry(s){return Qt(s)&&be(s)==je}function Iy(s){return Qt(s)&&_o(s.length)&&!!jt[Ce(s)]}function Ah(s){return typeof s=="function"?s:s==null?Te:typeof s=="object"?_t(s)?Oh(s[0],s[1]):Ph(s):Jf(s)}function xl(s){if(!Wr(s))return B_(s);var l=[];for(var d in Nt(s))Dt.call(s,d)&&d!="constructor"&&l.push(d);return l}function Ty(s){if(!Xt(s))return mv(s);var l=Wr(s),d=[];for(var y in s)y=="constructor"&&(l||!Dt.call(s,y))||d.push(y);return d}function wl(s,l){return s<l}function Lh(s,l){var d=-1,y=Re(s)?V(s.length):[];return ai(s,function(E,P,T){y[++d]=l(E,P,T)}),y}function Ph(s){var l=Fl(s);return l.length==1&&l[0][2]?hf(l[0][0],l[0][1]):function(d){return d===s||bl(d,s,l)}}function Oh(s,l){return Hl(s)&&uf(l)?hf(kn(s),l):function(d){var y=Kl(d,s);return y===e&&y===l?Xl(d,s):Fr(l,y,g|b)}}function to(s,l,d,y,E){s!==l&&ml(l,function(P,T){if(E||(E=new fn),Xt(P))Dy(s,l,T,d,to,y,E);else{var F=y?y(zl(s,T),P,T+"",s,l,E):e;F===e&&(F=P),pl(s,T,F)}},Ie)}function Dy(s,l,d,y,E,P,T){var F=zl(s,d),W=zl(l,d),K=T.get(W);if(K){pl(s,d,K);return}var J=P?P(F,W,d+"",s,l,T):e,Q=J===e;if(Q){var rt=_t(W),lt=!rt&&hi(W),ht=!rt&&!lt&&ar(W);J=W,rt||lt||ht?_t(F)?J=F:ne(F)?J=Oe(F):lt?(Q=!1,J=Uh(W,!0)):ht?(Q=!1,J=Vh(W,!0)):J=[]:jr(W)||Ti(W)?(J=F,Ti(F)?J=zf(F):(!Xt(F)||Wn(F))&&(J=cf(W))):Q=!1}Q&&(T.set(W,J),E(J,W,y,P,T),T.delete(W)),pl(s,d,J)}function Rh(s,l){var d=s.length;if(d)return l+=l<0?d:0,Hn(l,d)?s[l]:e}function Ih(s,l,d){l.length?l=Yt(l,function(P){return _t(P)?function(T){return Oi(T,P.length===1?P[0]:P)}:P}):l=[Te];var y=-1;l=Yt(l,Ve(ut()));var E=Lh(s,function(P,T,F){var W=Yt(l,function(K){return K(P)});return{criteria:W,index:++y,value:P}});return l_(E,function(P,T){return Gy(P,T,d)})}function By(s,l){return Th(s,l,function(d,y){return Xl(s,y)})}function Th(s,l,d){for(var y=-1,E=l.length,P={};++y<E;){var T=l[y],F=Oi(s,T);d(F,T)&&Nr(P,ci(T,s),F)}return P}function Fy(s){return function(l){return Oi(l,s)}}function Sl(s,l,d,y){var E=y?a_:Xi,P=-1,T=l.length,F=s;for(s===l&&(l=Oe(l)),d&&(F=Yt(s,Ve(d)));++P<T;)for(var W=0,K=l[P],J=d?d(K):K;(W=E(F,J,W,y))>-1;)F!==s&&Vs.call(F,W,1),Vs.call(s,W,1);return s}function Dh(s,l){for(var d=s?l.length:0,y=d-1;d--;){var E=l[d];if(d==y||E!==P){var P=E;Hn(E)?Vs.call(s,E,1):Ml(s,E)}}return s}function kl(s,l){return s+Ys(gh()*(l-s+1))}function Ny(s,l,d,y){for(var E=-1,P=ue($s((l-s)/(d||1)),0),T=V(P);P--;)T[y?P:++E]=s,s+=d;return T}function El(s,l){var d="";if(!s||l<1||l>et)return d;do l%2&&(d+=s),l=Ys(l/2),l&&(s+=s);while(l);return d}function St(s,l){return jl(ff(s,l,Te),s+"")}function Hy(s){return yh(lr(s))}function Wy(s,l){var d=lr(s);return uo(d,Pi(l,0,d.length))}function Nr(s,l,d,y){if(!Xt(s))return s;l=ci(l,s);for(var E=-1,P=l.length,T=P-1,F=s;F!=null&&++E<P;){var W=kn(l[E]),K=d;if(W==="__proto__"||W==="constructor"||W==="prototype")return s;if(E!=T){var J=F[W];K=y?y(J,W,F):e,K===e&&(K=Xt(J)?J:Hn(l[E+1])?[]:{})}Tr(F,W,K),F=F[W]}return s}var Bh=Gs?function(s,l){return Gs.set(s,l),s}:Te,zy=qs?function(s,l){return qs(s,"toString",{configurable:!0,enumerable:!1,value:Zl(l),writable:!0})}:Te;function jy(s){return uo(lr(s))}function on(s,l,d){var y=-1,E=s.length;l<0&&(l=-l>E?0:E+l),d=d>E?E:d,d<0&&(d+=E),E=l>d?0:d-l>>>0,l>>>=0;for(var P=V(E);++y<E;)P[y]=s[y+l];return P}function Uy(s,l){var d;return ai(s,function(y,E,P){return d=l(y,E,P),!d}),!!d}function eo(s,l,d){var y=0,E=s==null?y:s.length;if(typeof l=="number"&&l===l&&E<=Ft){for(;y<E;){var P=y+E>>>1,T=s[P];T!==null&&!$e(T)&&(d?T<=l:T<l)?y=P+1:E=P}return E}return Cl(s,l,Te,d)}function Cl(s,l,d,y){var E=0,P=s==null?0:s.length;if(P===0)return 0;l=d(l);for(var T=l!==l,F=l===null,W=$e(l),K=l===e;E<P;){var J=Ys((E+P)/2),Q=d(s[J]),rt=Q!==e,lt=Q===null,ht=Q===Q,wt=$e(Q);if(T)var ft=y||ht;else K?ft=ht&&(y||rt):F?ft=ht&&rt&&(y||!lt):W?ft=ht&&rt&&!lt&&(y||!wt):lt||wt?ft=!1:ft=y?Q<=l:Q<l;ft?E=J+1:P=J}return ve(P,Ot)}function Fh(s,l){for(var d=-1,y=s.length,E=0,P=[];++d<y;){var T=s[d],F=l?l(T):T;if(!d||!dn(F,W)){var W=F;P[E++]=T===0?0:T}}return P}function Nh(s){return typeof s=="number"?s:$e(s)?ct:+s}function qe(s){if(typeof s=="string")return s;if(_t(s))return Yt(s,qe)+"";if($e(s))return mh?mh.call(s):"";var l=s+"";return l=="0"&&1/s==-1/0?"-0":l}function li(s,l,d){var y=-1,E=Ts,P=s.length,T=!0,F=[],W=F;if(d)T=!1,E=el;else if(P>=r){var K=l?null:tv(s);if(K)return Bs(K);T=!1,E=Ar,W=new Li}else W=l?[]:F;t:for(;++y<P;){var J=s[y],Q=l?l(J):J;if(J=d||J!==0?J:0,T&&Q===Q){for(var rt=W.length;rt--;)if(W[rt]===Q)continue t;l&&W.push(Q),F.push(J)}else E(W,Q,d)||(W!==F&&W.push(Q),F.push(J))}return F}function Ml(s,l){return l=ci(l,s),s=df(s,l),s==null||delete s[kn(an(l))]}function Hh(s,l,d,y){return Nr(s,l,d(Oi(s,l)),y)}function no(s,l,d,y){for(var E=s.length,P=y?E:-1;(y?P--:++P<E)&&l(s[P],P,s););return d?on(s,y?0:P,y?P+1:E):on(s,y?P+1:0,y?E:P)}function Wh(s,l){var d=s;return d instanceof Mt&&(d=d.value()),nl(l,function(y,E){return E.func.apply(E.thisArg,ri([y],E.args))},d)}function Al(s,l,d){var y=s.length;if(y<2)return y?li(s[0]):[];for(var E=-1,P=V(y);++E<y;)for(var T=s[E],F=-1;++F<y;)F!=E&&(P[E]=Dr(P[E]||T,s[F],l,d));return li(me(P,1),l,d)}function zh(s,l,d){for(var y=-1,E=s.length,P=l.length,T={};++y<E;){var F=y<P?l[y]:e;d(T,s[y],F)}return T}function Ll(s){return ne(s)?s:[]}function Pl(s){return typeof s=="function"?s:Te}function ci(s,l){return _t(s)?s:Hl(s,l)?[s]:_f(Tt(s))}var Vy=St;function ui(s,l,d){var y=s.length;return d=d===e?y:d,!l&&d>=y?s:on(s,l,d)}var jh=O_||function(s){return ge.clearTimeout(s)};function Uh(s,l){if(l)return s.slice();var d=s.length,y=uh?uh(d):new s.constructor(d);return s.copy(y),y}function Ol(s){var l=new s.constructor(s.byteLength);return new js(l).set(new js(s)),l}function qy(s,l){var d=l?Ol(s.buffer):s.buffer;return new s.constructor(d,s.byteOffset,s.byteLength)}function $y(s){var l=new s.constructor(s.source,Cu.exec(s));return l.lastIndex=s.lastIndex,l}function Yy(s){return Ir?Nt(Ir.call(s)):{}}function Vh(s,l){var d=l?Ol(s.buffer):s.buffer;return new s.constructor(d,s.byteOffset,s.length)}function qh(s,l){if(s!==l){var d=s!==e,y=s===null,E=s===s,P=$e(s),T=l!==e,F=l===null,W=l===l,K=$e(l);if(!F&&!K&&!P&&s>l||P&&T&&W&&!F&&!K||y&&T&&W||!d&&W||!E)return 1;if(!y&&!P&&!K&&s<l||K&&d&&E&&!y&&!P||F&&d&&E||!T&&E||!W)return-1}return 0}function Gy(s,l,d){for(var y=-1,E=s.criteria,P=l.criteria,T=E.length,F=d.length;++y<T;){var W=qh(E[y],P[y]);if(W){if(y>=F)return W;var K=d[y];return W*(K=="desc"?-1:1)}}return s.index-l.index}function $h(s,l,d,y){for(var E=-1,P=s.length,T=d.length,F=-1,W=l.length,K=ue(P-T,0),J=V(W+K),Q=!y;++F<W;)J[F]=l[F];for(;++E<T;)(Q||E<P)&&(J[d[E]]=s[E]);for(;K--;)J[F++]=s[E++];return J}function Yh(s,l,d,y){for(var E=-1,P=s.length,T=-1,F=d.length,W=-1,K=l.length,J=ue(P-F,0),Q=V(J+K),rt=!y;++E<J;)Q[E]=s[E];for(var lt=E;++W<K;)Q[lt+W]=l[W];for(;++T<F;)(rt||E<P)&&(Q[lt+d[T]]=s[E++]);return Q}function Oe(s,l){var d=-1,y=s.length;for(l||(l=V(y));++d<y;)l[d]=s[d];return l}function Sn(s,l,d,y){var E=!d;d||(d={});for(var P=-1,T=l.length;++P<T;){var F=l[P],W=y?y(d[F],s[F],F,d,s):e;W===e&&(W=s[F]),E?Bn(d,F,W):Tr(d,F,W)}return d}function Ky(s,l){return Sn(s,Nl(s),l)}function Xy(s,l){return Sn(s,af(s),l)}function io(s,l){return function(d,y){var E=_t(d)?e_:yy,P=l?l():{};return E(d,s,ut(y,2),P)}}function rr(s){return St(function(l,d){var y=-1,E=d.length,P=E>1?d[E-1]:e,T=E>2?d[2]:e;for(P=s.length>3&&typeof P=="function"?(E--,P):e,T&&Me(d[0],d[1],T)&&(P=E<3?e:P,E=1),l=Nt(l);++y<E;){var F=d[y];F&&s(l,F,y,P)}return l})}function Gh(s,l){return function(d,y){if(d==null)return d;if(!Re(d))return s(d,y);for(var E=d.length,P=l?E:-1,T=Nt(d);(l?P--:++P<E)&&y(T[P],P,T)!==!1;);return d}}function Kh(s){return function(l,d,y){for(var E=-1,P=Nt(l),T=y(l),F=T.length;F--;){var W=T[s?F:++E];if(d(P[W],W,P)===!1)break}return l}}function Jy(s,l,d){var y=l&w,E=Hr(s);function P(){var T=this&&this!==ge&&this instanceof P?E:s;return T.apply(y?d:this,arguments)}return P}function Xh(s){return function(l){l=Tt(l);var d=Ji(l)?hn(l):e,y=d?d[0]:l.charAt(0),E=d?ui(d,1).join(""):l.slice(1);return y[s]()+E}}function sr(s){return function(l){return nl(Kf(Gf(l).replace(z0,"")),s,"")}}function Hr(s){return function(){var l=arguments;switch(l.length){case 0:return new s;case 1:return new s(l[0]);case 2:return new s(l[0],l[1]);case 3:return new s(l[0],l[1],l[2]);case 4:return new s(l[0],l[1],l[2],l[3]);case 5:return new s(l[0],l[1],l[2],l[3],l[4]);case 6:return new s(l[0],l[1],l[2],l[3],l[4],l[5]);case 7:return new s(l[0],l[1],l[2],l[3],l[4],l[5],l[6])}var d=ir(s.prototype),y=s.apply(d,l);return Xt(y)?y:d}}function Zy(s,l,d){var y=Hr(s);function E(){for(var P=arguments.length,T=V(P),F=P,W=or(E);F--;)T[F]=arguments[F];var K=P<3&&T[0]!==W&&T[P-1]!==W?[]:si(T,W);if(P-=K.length,P<d)return ef(s,l,ro,E.placeholder,e,T,K,e,e,d-P);var J=this&&this!==ge&&this instanceof E?y:s;return Ue(J,this,T)}return E}function Jh(s){return function(l,d,y){var E=Nt(l);if(!Re(l)){var P=ut(d,3);l=de(l),d=function(F){return P(E[F],F,E)}}var T=s(l,d,y);return T>-1?E[P?l[T]:T]:e}}function Zh(s){return Nn(function(l){var d=l.length,y=d,E=rn.prototype.thru;for(s&&l.reverse();y--;){var P=l[y];if(typeof P!="function")throw new nn(a);if(E&&!T&&lo(P)=="wrapper")var T=new rn([],!0)}for(y=T?y:d;++y<d;){P=l[y];var F=lo(P),W=F=="wrapper"?Bl(P):e;W&&Wl(W[0])&&W[1]==(I|D|k|B)&&!W[4].length&&W[9]==1?T=T[lo(W[0])].apply(T,W[3]):T=P.length==1&&Wl(P)?T[F]():T.thru(P)}return function(){var K=arguments,J=K[0];if(T&&K.length==1&&_t(J))return T.plant(J).value();for(var Q=0,rt=d?l[Q].apply(this,K):J;++Q<d;)rt=l[Q].call(this,rt);return rt}})}function ro(s,l,d,y,E,P,T,F,W,K){var J=l&I,Q=l&w,rt=l&C,lt=l&(D|S),ht=l&q,wt=rt?e:Hr(s);function ft(){for(var kt=arguments.length,Lt=V(kt),Ye=kt;Ye--;)Lt[Ye]=arguments[Ye];if(lt)var Ae=or(ft),Ge=u_(Lt,Ae);if(y&&(Lt=$h(Lt,y,E,lt)),P&&(Lt=Yh(Lt,P,T,lt)),kt-=Ge,lt&&kt<K){var ie=si(Lt,Ae);return ef(s,l,ro,ft.placeholder,d,Lt,ie,F,W,K-kt)}var pn=Q?d:this,jn=rt?pn[s]:s;return kt=Lt.length,F?Lt=yv(Lt,F):ht&&kt>1&&Lt.reverse(),J&&W<kt&&(Lt.length=W),this&&this!==ge&&this instanceof ft&&(jn=wt||Hr(jn)),jn.apply(pn,Lt)}return ft}function Qh(s,l){return function(d,y){return Cy(d,s,l(y),{})}}function so(s,l){return function(d,y){var E;if(d===e&&y===e)return l;if(d!==e&&(E=d),y!==e){if(E===e)return y;typeof d=="string"||typeof y=="string"?(d=qe(d),y=qe(y)):(d=Nh(d),y=Nh(y)),E=s(d,y)}return E}}function Rl(s){return Nn(function(l){return l=Yt(l,Ve(ut())),St(function(d){var y=this;return s(l,function(E){return Ue(E,y,d)})})})}function oo(s,l){l=l===e?" ":qe(l);var d=l.length;if(d<2)return d?El(l,s):l;var y=El(l,$s(s/Zi(l)));return Ji(l)?ui(hn(y),0,s).join(""):y.slice(0,s)}function Qy(s,l,d,y){var E=l&w,P=Hr(s);function T(){for(var F=-1,W=arguments.length,K=-1,J=y.length,Q=V(J+W),rt=this&&this!==ge&&this instanceof T?P:s;++K<J;)Q[K]=y[K];for(;W--;)Q[K++]=arguments[++F];return Ue(rt,E?d:this,Q)}return T}function tf(s){return function(l,d,y){return y&&typeof y!="number"&&Me(l,d,y)&&(d=y=e),l=zn(l),d===e?(d=l,l=0):d=zn(d),y=y===e?l<d?1:-1:zn(y),Ny(l,d,y,s)}}function ao(s){return function(l,d){return typeof l=="string"&&typeof d=="string"||(l=ln(l),d=ln(d)),s(l,d)}}function ef(s,l,d,y,E,P,T,F,W,K){var J=l&D,Q=J?T:e,rt=J?e:T,lt=J?P:e,ht=J?e:P;l|=J?k:O,l&=~(J?O:k),l&M||(l&=-4);var wt=[s,l,E,lt,Q,ht,rt,F,W,K],ft=d.apply(e,wt);return Wl(s)&&pf(ft,wt),ft.placeholder=y,gf(ft,s,l)}function Il(s){var l=ce[s];return function(d,y){if(d=ln(d),y=y==null?0:ve(bt(y),292),y&&ph(d)){var E=(Tt(d)+"e").split("e"),P=l(E[0]+"e"+(+E[1]+y));return E=(Tt(P)+"e").split("e"),+(E[0]+"e"+(+E[1]-y))}return l(d)}}var tv=er&&1/Bs(new er([,-0]))[1]==tt?function(s){return new er(s)}:ec;function nf(s){return function(l){var d=be(l);return d==ze?cl(l):d==je?__(l):c_(l,s(l))}}function Fn(s,l,d,y,E,P,T,F){var W=l&C;if(!W&&typeof s!="function")throw new nn(a);var K=y?y.length:0;if(K||(l&=-97,y=E=e),T=T===e?T:ue(bt(T),0),F=F===e?F:bt(F),K-=E?E.length:0,l&O){var J=y,Q=E;y=E=e}var rt=W?e:Bl(s),lt=[s,l,d,y,E,J,Q,P,T,F];if(rt&&gv(lt,rt),s=lt[0],l=lt[1],d=lt[2],y=lt[3],E=lt[4],F=lt[9]=lt[9]===e?W?0:s.length:ue(lt[9]-K,0),!F&&l&(D|S)&&(l&=-25),!l||l==w)var ht=Jy(s,l,d);else l==D||l==S?ht=Zy(s,l,F):(l==k||l==(w|k))&&!E.length?ht=Qy(s,l,d,y):ht=ro.apply(e,lt);var wt=rt?Bh:pf;return gf(wt(ht,lt),s,l)}function rf(s,l,d,y){return s===e||dn(s,tr[d])&&!Dt.call(y,d)?l:s}function sf(s,l,d,y,E,P){return Xt(s)&&Xt(l)&&(P.set(l,s),to(s,l,e,sf,P),P.delete(l)),s}function ev(s){return jr(s)?e:s}function of(s,l,d,y,E,P){var T=d&g,F=s.length,W=l.length;if(F!=W&&!(T&&W>F))return!1;var K=P.get(s),J=P.get(l);if(K&&J)return K==l&&J==s;var Q=-1,rt=!0,lt=d&b?new Li:e;for(P.set(s,l),P.set(l,s);++Q<F;){var ht=s[Q],wt=l[Q];if(y)var ft=T?y(wt,ht,Q,l,s,P):y(ht,wt,Q,s,l,P);if(ft!==e){if(ft)continue;rt=!1;break}if(lt){if(!il(l,function(kt,Lt){if(!Ar(lt,Lt)&&(ht===kt||E(ht,kt,d,y,P)))return lt.push(Lt)})){rt=!1;break}}else if(!(ht===wt||E(ht,wt,d,y,P))){rt=!1;break}}return P.delete(s),P.delete(l),rt}function nv(s,l,d,y,E,P,T){switch(d){case Ee:if(s.byteLength!=l.byteLength||s.byteOffset!=l.byteOffset)return!1;s=s.buffer,l=l.buffer;case Ei:return!(s.byteLength!=l.byteLength||!P(new js(s),new js(l)));case Le:case _e:case ei:return dn(+s,+l);case se:return s.name==l.name&&s.message==l.message;case In:case Si:return s==l+"";case ze:var F=cl;case je:var W=y&g;if(F||(F=Bs),s.size!=l.size&&!W)return!1;var K=T.get(s);if(K)return K==l;y|=b,T.set(s,l);var J=of(F(s),F(l),y,E,P,T);return T.delete(s),J;case ki:if(Ir)return Ir.call(s)==Ir.call(l)}return!1}function iv(s,l,d,y,E,P){var T=d&g,F=Tl(s),W=F.length,K=Tl(l),J=K.length;if(W!=J&&!T)return!1;for(var Q=W;Q--;){var rt=F[Q];if(!(T?rt in l:Dt.call(l,rt)))return!1}var lt=P.get(s),ht=P.get(l);if(lt&&ht)return lt==l&&ht==s;var wt=!0;P.set(s,l),P.set(l,s);for(var ft=T;++Q<W;){rt=F[Q];var kt=s[rt],Lt=l[rt];if(y)var Ye=T?y(Lt,kt,rt,l,s,P):y(kt,Lt,rt,s,l,P);if(!(Ye===e?kt===Lt||E(kt,Lt,d,y,P):Ye)){wt=!1;break}ft||(ft=rt=="constructor")}if(wt&&!ft){var Ae=s.constructor,Ge=l.constructor;Ae!=Ge&&"constructor"in s&&"constructor"in l&&!(typeof Ae=="function"&&Ae instanceof Ae&&typeof Ge=="function"&&Ge instanceof Ge)&&(wt=!1)}return P.delete(s),P.delete(l),wt}function Nn(s){return jl(ff(s,e,xf),s+"")}function Tl(s){return Eh(s,de,Nl)}function Dl(s){return Eh(s,Ie,af)}var Bl=Gs?function(s){return Gs.get(s)}:ec;function lo(s){for(var l=s.name+"",d=nr[l],y=Dt.call(nr,l)?d.length:0;y--;){var E=d[y],P=E.func;if(P==null||P==s)return E.name}return l}function or(s){var l=Dt.call(L,"placeholder")?L:s;return l.placeholder}function ut(){var s=L.iteratee||Ql;return s=s===Ql?Ah:s,arguments.length?s(arguments[0],arguments[1]):s}function co(s,l){var d=s.__data__;return hv(l)?d[typeof l=="string"?"string":"hash"]:d.map}function Fl(s){for(var l=de(s),d=l.length;d--;){var y=l[d],E=s[y];l[d]=[y,E,uf(E)]}return l}function Ri(s,l){var d=p_(s,l);return Mh(d)?d:e}function rv(s){var l=Dt.call(s,Mi),d=s[Mi];try{s[Mi]=e;var y=!0}catch{}var E=Ws.call(s);return y&&(l?s[Mi]=d:delete s[Mi]),E}var Nl=hl?function(s){return s==null?[]:(s=Nt(s),ii(hl(s),function(l){return fh.call(s,l)}))}:nc,af=hl?function(s){for(var l=[];s;)ri(l,Nl(s)),s=Us(s);return l}:nc,be=Ce;(fl&&be(new fl(new ArrayBuffer(1)))!=Ee||Pr&&be(new Pr)!=ze||dl&&be(dl.resolve())!=Ps||er&&be(new er)!=je||Or&&be(new Or)!=ye)&&(be=function(s){var l=Ce(s),d=l==ke?s.constructor:e,y=d?Ii(d):"";if(y)switch(y){case W_:return Ee;case z_:return ze;case j_:return Ps;case U_:return je;case V_:return ye}return l});function sv(s,l,d){for(var y=-1,E=d.length;++y<E;){var P=d[y],T=P.size;switch(P.type){case"drop":s+=T;break;case"dropRight":l-=T;break;case"take":l=ve(l,s+T);break;case"takeRight":s=ue(s,l-T);break}}return{start:s,end:l}}function ov(s){var l=s.match(f0);return l?l[1].split(d0):[]}function lf(s,l,d){l=ci(l,s);for(var y=-1,E=l.length,P=!1;++y<E;){var T=kn(l[y]);if(!(P=s!=null&&d(s,T)))break;s=s[T]}return P||++y!=E?P:(E=s==null?0:s.length,!!E&&_o(E)&&Hn(T,E)&&(_t(s)||Ti(s)))}function av(s){var l=s.length,d=new s.constructor(l);return l&&typeof s[0]=="string"&&Dt.call(s,"index")&&(d.index=s.index,d.input=s.input),d}function cf(s){return typeof s.constructor=="function"&&!Wr(s)?ir(Us(s)):{}}function lv(s,l,d){var y=s.constructor;switch(l){case Ei:return Ol(s);case Le:case _e:return new y(+s);case Ee:return qy(s,d);case Mr:case A:case v:case x:case R:case N:case U:case G:case vt:return Vh(s,d);case ze:return new y;case ei:case Si:return new y(s);case In:return $y(s);case je:return new y;case ki:return Yy(s)}}function cv(s,l){var d=l.length;if(!d)return s;var y=d-1;return l[y]=(d>1?"& ":"")+l[y],l=l.join(d>2?", ":" "),s.replace(h0,`{
30
- /* [wrapped with `+l+`] */
31
- `)}function uv(s){return _t(s)||Ti(s)||!!(dh&&s&&s[dh])}function Hn(s,l){var d=typeof s;return l=l??et,!!l&&(d=="number"||d!="symbol"&&w0.test(s))&&s>-1&&s%1==0&&s<l}function Me(s,l,d){if(!Xt(d))return!1;var y=typeof l;return(y=="number"?Re(d)&&Hn(l,d.length):y=="string"&&l in d)?dn(d[l],s):!1}function Hl(s,l){if(_t(s))return!1;var d=typeof s;return d=="number"||d=="symbol"||d=="boolean"||s==null||$e(s)?!0:a0.test(s)||!o0.test(s)||l!=null&&s in Nt(l)}function hv(s){var l=typeof s;return l=="string"||l=="number"||l=="symbol"||l=="boolean"?s!=="__proto__":s===null}function Wl(s){var l=lo(s),d=L[l];if(typeof d!="function"||!(l in Mt.prototype))return!1;if(s===d)return!0;var y=Bl(d);return!!y&&s===y[0]}function fv(s){return!!ch&&ch in s}var dv=Ns?Wn:ic;function Wr(s){var l=s&&s.constructor,d=typeof l=="function"&&l.prototype||tr;return s===d}function uf(s){return s===s&&!Xt(s)}function hf(s,l){return function(d){return d==null?!1:d[s]===l&&(l!==e||s in Nt(d))}}function pv(s){var l=go(s,function(y){return d.size===f&&d.clear(),y}),d=l.cache;return l}function gv(s,l){var d=s[1],y=l[1],E=d|y,P=E<(w|C|I),T=y==I&&d==D||y==I&&d==B&&s[7].length<=l[8]||y==(I|B)&&l[7].length<=l[8]&&d==D;if(!(P||T))return s;y&w&&(s[2]=l[2],E|=d&w?0:M);var F=l[3];if(F){var W=s[3];s[3]=W?$h(W,F,l[4]):F,s[4]=W?si(s[3],h):l[4]}return F=l[5],F&&(W=s[5],s[5]=W?Yh(W,F,l[6]):F,s[6]=W?si(s[5],h):l[6]),F=l[7],F&&(s[7]=F),y&I&&(s[8]=s[8]==null?l[8]:ve(s[8],l[8])),s[9]==null&&(s[9]=l[9]),s[0]=l[0],s[1]=E,s}function mv(s){var l=[];if(s!=null)for(var d in Nt(s))l.push(d);return l}function _v(s){return Ws.call(s)}function ff(s,l,d){return l=ue(l===e?s.length-1:l,0),function(){for(var y=arguments,E=-1,P=ue(y.length-l,0),T=V(P);++E<P;)T[E]=y[l+E];E=-1;for(var F=V(l+1);++E<l;)F[E]=y[E];return F[l]=d(T),Ue(s,this,F)}}function df(s,l){return l.length<2?s:Oi(s,on(l,0,-1))}function yv(s,l){for(var d=s.length,y=ve(l.length,d),E=Oe(s);y--;){var P=l[y];s[y]=Hn(P,d)?E[P]:e}return s}function zl(s,l){if(!(l==="constructor"&&typeof s[l]=="function")&&l!="__proto__")return s[l]}var pf=mf(Bh),zr=I_||function(s,l){return ge.setTimeout(s,l)},jl=mf(zy);function gf(s,l,d){var y=l+"";return jl(s,cv(y,vv(ov(y),d)))}function mf(s){var l=0,d=0;return function(){var y=F_(),E=ot-(y-d);if(d=y,E>0){if(++l>=Y)return arguments[0]}else l=0;return s.apply(e,arguments)}}function uo(s,l){var d=-1,y=s.length,E=y-1;for(l=l===e?y:l;++d<l;){var P=kl(d,E),T=s[P];s[P]=s[d],s[d]=T}return s.length=l,s}var _f=pv(function(s){var l=[];return s.charCodeAt(0)===46&&l.push(""),s.replace(l0,function(d,y,E,P){l.push(E?P.replace(m0,"$1"):y||d)}),l});function kn(s){if(typeof s=="string"||$e(s))return s;var l=s+"";return l=="0"&&1/s==-1/0?"-0":l}function Ii(s){if(s!=null){try{return Hs.call(s)}catch{}try{return s+""}catch{}}return""}function vv(s,l){return en(dt,function(d){var y="_."+d[0];l&d[1]&&!Ts(s,y)&&s.push(y)}),s.sort()}function yf(s){if(s instanceof Mt)return s.clone();var l=new rn(s.__wrapped__,s.__chain__);return l.__actions__=Oe(s.__actions__),l.__index__=s.__index__,l.__values__=s.__values__,l}function bv(s,l,d){(d?Me(s,l,d):l===e)?l=1:l=ue(bt(l),0);var y=s==null?0:s.length;if(!y||l<1)return[];for(var E=0,P=0,T=V($s(y/l));E<y;)T[P++]=on(s,E,E+=l);return T}function xv(s){for(var l=-1,d=s==null?0:s.length,y=0,E=[];++l<d;){var P=s[l];P&&(E[y++]=P)}return E}function wv(){var s=arguments.length;if(!s)return[];for(var l=V(s-1),d=arguments[0],y=s;y--;)l[y-1]=arguments[y];return ri(_t(d)?Oe(d):[d],me(l,1))}var Sv=St(function(s,l){return ne(s)?Dr(s,me(l,1,ne,!0)):[]}),kv=St(function(s,l){var d=an(l);return ne(d)&&(d=e),ne(s)?Dr(s,me(l,1,ne,!0),ut(d,2)):[]}),Ev=St(function(s,l){var d=an(l);return ne(d)&&(d=e),ne(s)?Dr(s,me(l,1,ne,!0),e,d):[]});function Cv(s,l,d){var y=s==null?0:s.length;return y?(l=d||l===e?1:bt(l),on(s,l<0?0:l,y)):[]}function Mv(s,l,d){var y=s==null?0:s.length;return y?(l=d||l===e?1:bt(l),l=y-l,on(s,0,l<0?0:l)):[]}function Av(s,l){return s&&s.length?no(s,ut(l,3),!0,!0):[]}function Lv(s,l){return s&&s.length?no(s,ut(l,3),!0):[]}function Pv(s,l,d,y){var E=s==null?0:s.length;return E?(d&&typeof d!="number"&&Me(s,l,d)&&(d=0,y=E),wy(s,l,d,y)):[]}function vf(s,l,d){var y=s==null?0:s.length;if(!y)return-1;var E=d==null?0:bt(d);return E<0&&(E=ue(y+E,0)),Ds(s,ut(l,3),E)}function bf(s,l,d){var y=s==null?0:s.length;if(!y)return-1;var E=y-1;return d!==e&&(E=bt(d),E=d<0?ue(y+E,0):ve(E,y-1)),Ds(s,ut(l,3),E,!0)}function xf(s){var l=s==null?0:s.length;return l?me(s,1):[]}function Ov(s){var l=s==null?0:s.length;return l?me(s,tt):[]}function Rv(s,l){var d=s==null?0:s.length;return d?(l=l===e?1:bt(l),me(s,l)):[]}function Iv(s){for(var l=-1,d=s==null?0:s.length,y={};++l<d;){var E=s[l];y[E[0]]=E[1]}return y}function wf(s){return s&&s.length?s[0]:e}function Tv(s,l,d){var y=s==null?0:s.length;if(!y)return-1;var E=d==null?0:bt(d);return E<0&&(E=ue(y+E,0)),Xi(s,l,E)}function Dv(s){var l=s==null?0:s.length;return l?on(s,0,-1):[]}var Bv=St(function(s){var l=Yt(s,Ll);return l.length&&l[0]===s[0]?vl(l):[]}),Fv=St(function(s){var l=an(s),d=Yt(s,Ll);return l===an(d)?l=e:d.pop(),d.length&&d[0]===s[0]?vl(d,ut(l,2)):[]}),Nv=St(function(s){var l=an(s),d=Yt(s,Ll);return l=typeof l=="function"?l:e,l&&d.pop(),d.length&&d[0]===s[0]?vl(d,e,l):[]});function Hv(s,l){return s==null?"":D_.call(s,l)}function an(s){var l=s==null?0:s.length;return l?s[l-1]:e}function Wv(s,l,d){var y=s==null?0:s.length;if(!y)return-1;var E=y;return d!==e&&(E=bt(d),E=E<0?ue(y+E,0):ve(E,y-1)),l===l?v_(s,l,E):Ds(s,eh,E,!0)}function zv(s,l){return s&&s.length?Rh(s,bt(l)):e}var jv=St(Sf);function Sf(s,l){return s&&s.length&&l&&l.length?Sl(s,l):s}function Uv(s,l,d){return s&&s.length&&l&&l.length?Sl(s,l,ut(d,2)):s}function Vv(s,l,d){return s&&s.length&&l&&l.length?Sl(s,l,e,d):s}var qv=Nn(function(s,l){var d=s==null?0:s.length,y=gl(s,l);return Dh(s,Yt(l,function(E){return Hn(E,d)?+E:E}).sort(qh)),y});function $v(s,l){var d=[];if(!(s&&s.length))return d;var y=-1,E=[],P=s.length;for(l=ut(l,3);++y<P;){var T=s[y];l(T,y,s)&&(d.push(T),E.push(y))}return Dh(s,E),d}function Ul(s){return s==null?s:H_.call(s)}function Yv(s,l,d){var y=s==null?0:s.length;return y?(d&&typeof d!="number"&&Me(s,l,d)?(l=0,d=y):(l=l==null?0:bt(l),d=d===e?y:bt(d)),on(s,l,d)):[]}function Gv(s,l){return eo(s,l)}function Kv(s,l,d){return Cl(s,l,ut(d,2))}function Xv(s,l){var d=s==null?0:s.length;if(d){var y=eo(s,l);if(y<d&&dn(s[y],l))return y}return-1}function Jv(s,l){return eo(s,l,!0)}function Zv(s,l,d){return Cl(s,l,ut(d,2),!0)}function Qv(s,l){var d=s==null?0:s.length;if(d){var y=eo(s,l,!0)-1;if(dn(s[y],l))return y}return-1}function tb(s){return s&&s.length?Fh(s):[]}function eb(s,l){return s&&s.length?Fh(s,ut(l,2)):[]}function nb(s){var l=s==null?0:s.length;return l?on(s,1,l):[]}function ib(s,l,d){return s&&s.length?(l=d||l===e?1:bt(l),on(s,0,l<0?0:l)):[]}function rb(s,l,d){var y=s==null?0:s.length;return y?(l=d||l===e?1:bt(l),l=y-l,on(s,l<0?0:l,y)):[]}function sb(s,l){return s&&s.length?no(s,ut(l,3),!1,!0):[]}function ob(s,l){return s&&s.length?no(s,ut(l,3)):[]}var ab=St(function(s){return li(me(s,1,ne,!0))}),lb=St(function(s){var l=an(s);return ne(l)&&(l=e),li(me(s,1,ne,!0),ut(l,2))}),cb=St(function(s){var l=an(s);return l=typeof l=="function"?l:e,li(me(s,1,ne,!0),e,l)});function ub(s){return s&&s.length?li(s):[]}function hb(s,l){return s&&s.length?li(s,ut(l,2)):[]}function fb(s,l){return l=typeof l=="function"?l:e,s&&s.length?li(s,e,l):[]}function Vl(s){if(!(s&&s.length))return[];var l=0;return s=ii(s,function(d){if(ne(d))return l=ue(d.length,l),!0}),al(l,function(d){return Yt(s,rl(d))})}function kf(s,l){if(!(s&&s.length))return[];var d=Vl(s);return l==null?d:Yt(d,function(y){return Ue(l,e,y)})}var db=St(function(s,l){return ne(s)?Dr(s,l):[]}),pb=St(function(s){return Al(ii(s,ne))}),gb=St(function(s){var l=an(s);return ne(l)&&(l=e),Al(ii(s,ne),ut(l,2))}),mb=St(function(s){var l=an(s);return l=typeof l=="function"?l:e,Al(ii(s,ne),e,l)}),_b=St(Vl);function yb(s,l){return zh(s||[],l||[],Tr)}function vb(s,l){return zh(s||[],l||[],Nr)}var bb=St(function(s){var l=s.length,d=l>1?s[l-1]:e;return d=typeof d=="function"?(s.pop(),d):e,kf(s,d)});function Ef(s){var l=L(s);return l.__chain__=!0,l}function xb(s,l){return l(s),s}function ho(s,l){return l(s)}var wb=Nn(function(s){var l=s.length,d=l?s[0]:0,y=this.__wrapped__,E=function(P){return gl(P,s)};return l>1||this.__actions__.length||!(y instanceof Mt)||!Hn(d)?this.thru(E):(y=y.slice(d,+d+(l?1:0)),y.__actions__.push({func:ho,args:[E],thisArg:e}),new rn(y,this.__chain__).thru(function(P){return l&&!P.length&&P.push(e),P}))});function Sb(){return Ef(this)}function kb(){return new rn(this.value(),this.__chain__)}function Eb(){this.__values__===e&&(this.__values__=Hf(this.value()));var s=this.__index__>=this.__values__.length,l=s?e:this.__values__[this.__index__++];return{done:s,value:l}}function Cb(){return this}function Mb(s){for(var l,d=this;d instanceof Xs;){var y=yf(d);y.__index__=0,y.__values__=e,l?E.__wrapped__=y:l=y;var E=y;d=d.__wrapped__}return E.__wrapped__=s,l}function Ab(){var s=this.__wrapped__;if(s instanceof Mt){var l=s;return this.__actions__.length&&(l=new Mt(this)),l=l.reverse(),l.__actions__.push({func:ho,args:[Ul],thisArg:e}),new rn(l,this.__chain__)}return this.thru(Ul)}function Lb(){return Wh(this.__wrapped__,this.__actions__)}var Pb=io(function(s,l,d){Dt.call(s,d)?++s[d]:Bn(s,d,1)});function Ob(s,l,d){var y=_t(s)?Qu:xy;return d&&Me(s,l,d)&&(l=e),y(s,ut(l,3))}function Rb(s,l){var d=_t(s)?ii:Sh;return d(s,ut(l,3))}var Ib=Jh(vf),Tb=Jh(bf);function Db(s,l){return me(fo(s,l),1)}function Bb(s,l){return me(fo(s,l),tt)}function Fb(s,l,d){return d=d===e?1:bt(d),me(fo(s,l),d)}function Cf(s,l){var d=_t(s)?en:ai;return d(s,ut(l,3))}function Mf(s,l){var d=_t(s)?n_:wh;return d(s,ut(l,3))}var Nb=io(function(s,l,d){Dt.call(s,d)?s[d].push(l):Bn(s,d,[l])});function Hb(s,l,d,y){s=Re(s)?s:lr(s),d=d&&!y?bt(d):0;var E=s.length;return d<0&&(d=ue(E+d,0)),yo(s)?d<=E&&s.indexOf(l,d)>-1:!!E&&Xi(s,l,d)>-1}var Wb=St(function(s,l,d){var y=-1,E=typeof l=="function",P=Re(s)?V(s.length):[];return ai(s,function(T){P[++y]=E?Ue(l,T,d):Br(T,l,d)}),P}),zb=io(function(s,l,d){Bn(s,d,l)});function fo(s,l){var d=_t(s)?Yt:Lh;return d(s,ut(l,3))}function jb(s,l,d,y){return s==null?[]:(_t(l)||(l=l==null?[]:[l]),d=y?e:d,_t(d)||(d=d==null?[]:[d]),Ih(s,l,d))}var Ub=io(function(s,l,d){s[d?0:1].push(l)},function(){return[[],[]]});function Vb(s,l,d){var y=_t(s)?nl:ih,E=arguments.length<3;return y(s,ut(l,4),d,E,ai)}function qb(s,l,d){var y=_t(s)?i_:ih,E=arguments.length<3;return y(s,ut(l,4),d,E,wh)}function $b(s,l){var d=_t(s)?ii:Sh;return d(s,mo(ut(l,3)))}function Yb(s){var l=_t(s)?yh:Hy;return l(s)}function Gb(s,l,d){(d?Me(s,l,d):l===e)?l=1:l=bt(l);var y=_t(s)?my:Wy;return y(s,l)}function Kb(s){var l=_t(s)?_y:jy;return l(s)}function Xb(s){if(s==null)return 0;if(Re(s))return yo(s)?Zi(s):s.length;var l=be(s);return l==ze||l==je?s.size:xl(s).length}function Jb(s,l,d){var y=_t(s)?il:Uy;return d&&Me(s,l,d)&&(l=e),y(s,ut(l,3))}var Zb=St(function(s,l){if(s==null)return[];var d=l.length;return d>1&&Me(s,l[0],l[1])?l=[]:d>2&&Me(l[0],l[1],l[2])&&(l=[l[0]]),Ih(s,me(l,1),[])}),po=R_||function(){return ge.Date.now()};function Qb(s,l){if(typeof l!="function")throw new nn(a);return s=bt(s),function(){if(--s<1)return l.apply(this,arguments)}}function Af(s,l,d){return l=d?e:l,l=s&&l==null?s.length:l,Fn(s,I,e,e,e,e,l)}function Lf(s,l){var d;if(typeof l!="function")throw new nn(a);return s=bt(s),function(){return--s>0&&(d=l.apply(this,arguments)),s<=1&&(l=e),d}}var ql=St(function(s,l,d){var y=w;if(d.length){var E=si(d,or(ql));y|=k}return Fn(s,y,l,d,E)}),Pf=St(function(s,l,d){var y=w|C;if(d.length){var E=si(d,or(Pf));y|=k}return Fn(l,y,s,d,E)});function Of(s,l,d){l=d?e:l;var y=Fn(s,D,e,e,e,e,e,l);return y.placeholder=Of.placeholder,y}function Rf(s,l,d){l=d?e:l;var y=Fn(s,S,e,e,e,e,e,l);return y.placeholder=Rf.placeholder,y}function If(s,l,d){var y,E,P,T,F,W,K=0,J=!1,Q=!1,rt=!0;if(typeof s!="function")throw new nn(a);l=ln(l)||0,Xt(d)&&(J=!!d.leading,Q="maxWait"in d,P=Q?ue(ln(d.maxWait)||0,l):P,rt="trailing"in d?!!d.trailing:rt);function lt(ie){var pn=y,jn=E;return y=E=e,K=ie,T=s.apply(jn,pn),T}function ht(ie){return K=ie,F=zr(kt,l),J?lt(ie):T}function wt(ie){var pn=ie-W,jn=ie-K,Zf=l-pn;return Q?ve(Zf,P-jn):Zf}function ft(ie){var pn=ie-W,jn=ie-K;return W===e||pn>=l||pn<0||Q&&jn>=P}function kt(){var ie=po();if(ft(ie))return Lt(ie);F=zr(kt,wt(ie))}function Lt(ie){return F=e,rt&&y?lt(ie):(y=E=e,T)}function Ye(){F!==e&&jh(F),K=0,y=W=E=F=e}function Ae(){return F===e?T:Lt(po())}function Ge(){var ie=po(),pn=ft(ie);if(y=arguments,E=this,W=ie,pn){if(F===e)return ht(W);if(Q)return jh(F),F=zr(kt,l),lt(W)}return F===e&&(F=zr(kt,l)),T}return Ge.cancel=Ye,Ge.flush=Ae,Ge}var t1=St(function(s,l){return xh(s,1,l)}),e1=St(function(s,l,d){return xh(s,ln(l)||0,d)});function n1(s){return Fn(s,q)}function go(s,l){if(typeof s!="function"||l!=null&&typeof l!="function")throw new nn(a);var d=function(){var y=arguments,E=l?l.apply(this,y):y[0],P=d.cache;if(P.has(E))return P.get(E);var T=s.apply(this,y);return d.cache=P.set(E,T)||P,T};return d.cache=new(go.Cache||Dn),d}go.Cache=Dn;function mo(s){if(typeof s!="function")throw new nn(a);return function(){var l=arguments;switch(l.length){case 0:return!s.call(this);case 1:return!s.call(this,l[0]);case 2:return!s.call(this,l[0],l[1]);case 3:return!s.call(this,l[0],l[1],l[2])}return!s.apply(this,l)}}function i1(s){return Lf(2,s)}var r1=Vy(function(s,l){l=l.length==1&&_t(l[0])?Yt(l[0],Ve(ut())):Yt(me(l,1),Ve(ut()));var d=l.length;return St(function(y){for(var E=-1,P=ve(y.length,d);++E<P;)y[E]=l[E].call(this,y[E]);return Ue(s,this,y)})}),$l=St(function(s,l){var d=si(l,or($l));return Fn(s,k,e,l,d)}),Tf=St(function(s,l){var d=si(l,or(Tf));return Fn(s,O,e,l,d)}),s1=Nn(function(s,l){return Fn(s,B,e,e,e,l)});function o1(s,l){if(typeof s!="function")throw new nn(a);return l=l===e?l:bt(l),St(s,l)}function a1(s,l){if(typeof s!="function")throw new nn(a);return l=l==null?0:ue(bt(l),0),St(function(d){var y=d[l],E=ui(d,0,l);return y&&ri(E,y),Ue(s,this,E)})}function l1(s,l,d){var y=!0,E=!0;if(typeof s!="function")throw new nn(a);return Xt(d)&&(y="leading"in d?!!d.leading:y,E="trailing"in d?!!d.trailing:E),If(s,l,{leading:y,maxWait:l,trailing:E})}function c1(s){return Af(s,1)}function u1(s,l){return $l(Pl(l),s)}function h1(){if(!arguments.length)return[];var s=arguments[0];return _t(s)?s:[s]}function f1(s){return sn(s,m)}function d1(s,l){return l=typeof l=="function"?l:e,sn(s,m,l)}function p1(s){return sn(s,_|m)}function g1(s,l){return l=typeof l=="function"?l:e,sn(s,_|m,l)}function m1(s,l){return l==null||bh(s,l,de(l))}function dn(s,l){return s===l||s!==s&&l!==l}var _1=ao(yl),y1=ao(function(s,l){return s>=l}),Ti=Ch(function(){return arguments}())?Ch:function(s){return Qt(s)&&Dt.call(s,"callee")&&!fh.call(s,"callee")},_t=V.isArray,v1=Yu?Ve(Yu):My;function Re(s){return s!=null&&_o(s.length)&&!Wn(s)}function ne(s){return Qt(s)&&Re(s)}function b1(s){return s===!0||s===!1||Qt(s)&&Ce(s)==Le}var hi=T_||ic,x1=Gu?Ve(Gu):Ay;function w1(s){return Qt(s)&&s.nodeType===1&&!jr(s)}function S1(s){if(s==null)return!0;if(Re(s)&&(_t(s)||typeof s=="string"||typeof s.splice=="function"||hi(s)||ar(s)||Ti(s)))return!s.length;var l=be(s);if(l==ze||l==je)return!s.size;if(Wr(s))return!xl(s).length;for(var d in s)if(Dt.call(s,d))return!1;return!0}function k1(s,l){return Fr(s,l)}function E1(s,l,d){d=typeof d=="function"?d:e;var y=d?d(s,l):e;return y===e?Fr(s,l,e,d):!!y}function Yl(s){if(!Qt(s))return!1;var l=Ce(s);return l==se||l==le||typeof s.message=="string"&&typeof s.name=="string"&&!jr(s)}function C1(s){return typeof s=="number"&&ph(s)}function Wn(s){if(!Xt(s))return!1;var l=Ce(s);return l==Pe||l==xn||l==Qe||l==qa}function Df(s){return typeof s=="number"&&s==bt(s)}function _o(s){return typeof s=="number"&&s>-1&&s%1==0&&s<=et}function Xt(s){var l=typeof s;return s!=null&&(l=="object"||l=="function")}function Qt(s){return s!=null&&typeof s=="object"}var Bf=Ku?Ve(Ku):Py;function M1(s,l){return s===l||bl(s,l,Fl(l))}function A1(s,l,d){return d=typeof d=="function"?d:e,bl(s,l,Fl(l),d)}function L1(s){return Ff(s)&&s!=+s}function P1(s){if(dv(s))throw new mt(o);return Mh(s)}function O1(s){return s===null}function R1(s){return s==null}function Ff(s){return typeof s=="number"||Qt(s)&&Ce(s)==ei}function jr(s){if(!Qt(s)||Ce(s)!=ke)return!1;var l=Us(s);if(l===null)return!0;var d=Dt.call(l,"constructor")&&l.constructor;return typeof d=="function"&&d instanceof d&&Hs.call(d)==A_}var Gl=Xu?Ve(Xu):Oy;function I1(s){return Df(s)&&s>=-9007199254740991&&s<=et}var Nf=Ju?Ve(Ju):Ry;function yo(s){return typeof s=="string"||!_t(s)&&Qt(s)&&Ce(s)==Si}function $e(s){return typeof s=="symbol"||Qt(s)&&Ce(s)==ki}var ar=Zu?Ve(Zu):Iy;function T1(s){return s===e}function D1(s){return Qt(s)&&be(s)==ye}function B1(s){return Qt(s)&&Ce(s)==Cr}var F1=ao(wl),N1=ao(function(s,l){return s<=l});function Hf(s){if(!s)return[];if(Re(s))return yo(s)?hn(s):Oe(s);if(Lr&&s[Lr])return m_(s[Lr]());var l=be(s),d=l==ze?cl:l==je?Bs:lr;return d(s)}function zn(s){if(!s)return s===0?s:0;if(s=ln(s),s===tt||s===-1/0){var l=s<0?-1:1;return l*at}return s===s?s:0}function bt(s){var l=zn(s),d=l%1;return l===l?d?l-d:l:0}function Wf(s){return s?Pi(bt(s),0,gt):0}function ln(s){if(typeof s=="number")return s;if($e(s))return ct;if(Xt(s)){var l=typeof s.valueOf=="function"?s.valueOf():s;s=Xt(l)?l+"":l}if(typeof s!="string")return s===0?s:+s;s=rh(s);var d=v0.test(s);return d||x0.test(s)?Q0(s.slice(2),d?2:8):y0.test(s)?ct:+s}function zf(s){return Sn(s,Ie(s))}function H1(s){return s?Pi(bt(s),-9007199254740991,et):s===0?s:0}function Tt(s){return s==null?"":qe(s)}var W1=rr(function(s,l){if(Wr(l)||Re(l)){Sn(l,de(l),s);return}for(var d in l)Dt.call(l,d)&&Tr(s,d,l[d])}),jf=rr(function(s,l){Sn(l,Ie(l),s)}),vo=rr(function(s,l,d,y){Sn(l,Ie(l),s,y)}),z1=rr(function(s,l,d,y){Sn(l,de(l),s,y)}),j1=Nn(gl);function U1(s,l){var d=ir(s);return l==null?d:vh(d,l)}var V1=St(function(s,l){s=Nt(s);var d=-1,y=l.length,E=y>2?l[2]:e;for(E&&Me(l[0],l[1],E)&&(y=1);++d<y;)for(var P=l[d],T=Ie(P),F=-1,W=T.length;++F<W;){var K=T[F],J=s[K];(J===e||dn(J,tr[K])&&!Dt.call(s,K))&&(s[K]=P[K])}return s}),q1=St(function(s){return s.push(e,sf),Ue(Uf,e,s)});function $1(s,l){return th(s,ut(l,3),wn)}function Y1(s,l){return th(s,ut(l,3),_l)}function G1(s,l){return s==null?s:ml(s,ut(l,3),Ie)}function K1(s,l){return s==null?s:kh(s,ut(l,3),Ie)}function X1(s,l){return s&&wn(s,ut(l,3))}function J1(s,l){return s&&_l(s,ut(l,3))}function Z1(s){return s==null?[]:Qs(s,de(s))}function Q1(s){return s==null?[]:Qs(s,Ie(s))}function Kl(s,l,d){var y=s==null?e:Oi(s,l);return y===e?d:y}function t2(s,l){return s!=null&&lf(s,l,Sy)}function Xl(s,l){return s!=null&&lf(s,l,ky)}var e2=Qh(function(s,l,d){l!=null&&typeof l.toString!="function"&&(l=Ws.call(l)),s[l]=d},Zl(Te)),n2=Qh(function(s,l,d){l!=null&&typeof l.toString!="function"&&(l=Ws.call(l)),Dt.call(s,l)?s[l].push(d):s[l]=[d]},ut),i2=St(Br);function de(s){return Re(s)?_h(s):xl(s)}function Ie(s){return Re(s)?_h(s,!0):Ty(s)}function r2(s,l){var d={};return l=ut(l,3),wn(s,function(y,E,P){Bn(d,l(y,E,P),y)}),d}function s2(s,l){var d={};return l=ut(l,3),wn(s,function(y,E,P){Bn(d,E,l(y,E,P))}),d}var o2=rr(function(s,l,d){to(s,l,d)}),Uf=rr(function(s,l,d,y){to(s,l,d,y)}),a2=Nn(function(s,l){var d={};if(s==null)return d;var y=!1;l=Yt(l,function(P){return P=ci(P,s),y||(y=P.length>1),P}),Sn(s,Dl(s),d),y&&(d=sn(d,_|p|m,ev));for(var E=l.length;E--;)Ml(d,l[E]);return d});function l2(s,l){return Vf(s,mo(ut(l)))}var c2=Nn(function(s,l){return s==null?{}:By(s,l)});function Vf(s,l){if(s==null)return{};var d=Yt(Dl(s),function(y){return[y]});return l=ut(l),Th(s,d,function(y,E){return l(y,E[0])})}function u2(s,l,d){l=ci(l,s);var y=-1,E=l.length;for(E||(E=1,s=e);++y<E;){var P=s==null?e:s[kn(l[y])];P===e&&(y=E,P=d),s=Wn(P)?P.call(s):P}return s}function h2(s,l,d){return s==null?s:Nr(s,l,d)}function f2(s,l,d,y){return y=typeof y=="function"?y:e,s==null?s:Nr(s,l,d,y)}var qf=nf(de),$f=nf(Ie);function d2(s,l,d){var y=_t(s),E=y||hi(s)||ar(s);if(l=ut(l,4),d==null){var P=s&&s.constructor;E?d=y?new P:[]:Xt(s)?d=Wn(P)?ir(Us(s)):{}:d={}}return(E?en:wn)(s,function(T,F,W){return l(d,T,F,W)}),d}function p2(s,l){return s==null?!0:Ml(s,l)}function g2(s,l,d){return s==null?s:Hh(s,l,Pl(d))}function m2(s,l,d,y){return y=typeof y=="function"?y:e,s==null?s:Hh(s,l,Pl(d),y)}function lr(s){return s==null?[]:ll(s,de(s))}function _2(s){return s==null?[]:ll(s,Ie(s))}function y2(s,l,d){return d===e&&(d=l,l=e),d!==e&&(d=ln(d),d=d===d?d:0),l!==e&&(l=ln(l),l=l===l?l:0),Pi(ln(s),l,d)}function v2(s,l,d){return l=zn(l),d===e?(d=l,l=0):d=zn(d),s=ln(s),Ey(s,l,d)}function b2(s,l,d){if(d&&typeof d!="boolean"&&Me(s,l,d)&&(l=d=e),d===e&&(typeof l=="boolean"?(d=l,l=e):typeof s=="boolean"&&(d=s,s=e)),s===e&&l===e?(s=0,l=1):(s=zn(s),l===e?(l=s,s=0):l=zn(l)),s>l){var y=s;s=l,l=y}if(d||s%1||l%1){var E=gh();return ve(s+E*(l-s+Z0("1e-"+((E+"").length-1))),l)}return kl(s,l)}var x2=sr(function(s,l,d){return l=l.toLowerCase(),s+(d?Yf(l):l)});function Yf(s){return Jl(Tt(s).toLowerCase())}function Gf(s){return s=Tt(s),s&&s.replace(S0,h_).replace(j0,"")}function w2(s,l,d){s=Tt(s),l=qe(l);var y=s.length;d=d===e?y:Pi(bt(d),0,y);var E=d;return d-=l.length,d>=0&&s.slice(d,E)==l}function S2(s){return s=Tt(s),s&&i0.test(s)?s.replace(ku,f_):s}function k2(s){return s=Tt(s),s&&c0.test(s)?s.replace($a,"\\$&"):s}var E2=sr(function(s,l,d){return s+(d?"-":"")+l.toLowerCase()}),C2=sr(function(s,l,d){return s+(d?" ":"")+l.toLowerCase()}),M2=Xh("toLowerCase");function A2(s,l,d){s=Tt(s),l=bt(l);var y=l?Zi(s):0;if(!l||y>=l)return s;var E=(l-y)/2;return oo(Ys(E),d)+s+oo($s(E),d)}function L2(s,l,d){s=Tt(s),l=bt(l);var y=l?Zi(s):0;return l&&y<l?s+oo(l-y,d):s}function P2(s,l,d){s=Tt(s),l=bt(l);var y=l?Zi(s):0;return l&&y<l?oo(l-y,d)+s:s}function O2(s,l,d){return d||l==null?l=0:l&&(l=+l),N_(Tt(s).replace(Ya,""),l||0)}function R2(s,l,d){return(d?Me(s,l,d):l===e)?l=1:l=bt(l),El(Tt(s),l)}function I2(){var s=arguments,l=Tt(s[0]);return s.length<3?l:l.replace(s[1],s[2])}var T2=sr(function(s,l,d){return s+(d?"_":"")+l.toLowerCase()});function D2(s,l,d){return d&&typeof d!="number"&&Me(s,l,d)&&(l=d=e),d=d===e?gt:d>>>0,d?(s=Tt(s),s&&(typeof l=="string"||l!=null&&!Gl(l))&&(l=qe(l),!l&&Ji(s))?ui(hn(s),0,d):s.split(l,d)):[]}var B2=sr(function(s,l,d){return s+(d?" ":"")+Jl(l)});function F2(s,l,d){return s=Tt(s),d=d==null?0:Pi(bt(d),0,s.length),l=qe(l),s.slice(d,d+l.length)==l}function N2(s,l,d){var y=L.templateSettings;d&&Me(s,l,d)&&(l=e),s=Tt(s),l=vo({},l,y,rf);var E=vo({},l.imports,y.imports,rf),P=de(E),T=ll(E,P),F,W,K=0,J=l.interpolate||Os,Q="__p += '",rt=ul((l.escape||Os).source+"|"+J.source+"|"+(J===Eu?_0:Os).source+"|"+(l.evaluate||Os).source+"|$","g"),lt="//# sourceURL="+(Dt.call(l,"sourceURL")?(l.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Y0+"]")+`
32
- `;s.replace(rt,function(ft,kt,Lt,Ye,Ae,Ge){return Lt||(Lt=Ye),Q+=s.slice(K,Ge).replace(k0,d_),kt&&(F=!0,Q+=`' +
33
- __e(`+kt+`) +
34
- '`),Ae&&(W=!0,Q+=`';
35
- `+Ae+`;
36
- __p += '`),Lt&&(Q+=`' +
37
- ((__t = (`+Lt+`)) == null ? '' : __t) +
38
- '`),K=Ge+ft.length,ft}),Q+=`';
39
- `;var ht=Dt.call(l,"variable")&&l.variable;if(!ht)Q=`with (obj) {
40
- `+Q+`
41
- }
42
- `;else if(g0.test(ht))throw new mt(c);Q=(W?Q.replace(qt,""):Q).replace(Ht,"$1").replace($t,"$1;"),Q="function("+(ht||"obj")+`) {
43
- `+(ht?"":`obj || (obj = {});
44
- `)+"var __t, __p = ''"+(F?", __e = _.escape":"")+(W?`, __j = Array.prototype.join;
45
- function print() { __p += __j.call(arguments, '') }
46
- `:`;
47
- `)+Q+`return __p
48
- }`;var wt=Xf(function(){return Rt(P,lt+"return "+Q).apply(e,T)});if(wt.source=Q,Yl(wt))throw wt;return wt}function H2(s){return Tt(s).toLowerCase()}function W2(s){return Tt(s).toUpperCase()}function z2(s,l,d){if(s=Tt(s),s&&(d||l===e))return rh(s);if(!s||!(l=qe(l)))return s;var y=hn(s),E=hn(l),P=sh(y,E),T=oh(y,E)+1;return ui(y,P,T).join("")}function j2(s,l,d){if(s=Tt(s),s&&(d||l===e))return s.slice(0,lh(s)+1);if(!s||!(l=qe(l)))return s;var y=hn(s),E=oh(y,hn(l))+1;return ui(y,0,E).join("")}function U2(s,l,d){if(s=Tt(s),s&&(d||l===e))return s.replace(Ya,"");if(!s||!(l=qe(l)))return s;var y=hn(s),E=sh(y,hn(l));return ui(y,E).join("")}function V2(s,l){var d=z,y=j;if(Xt(l)){var E="separator"in l?l.separator:E;d="length"in l?bt(l.length):d,y="omission"in l?qe(l.omission):y}s=Tt(s);var P=s.length;if(Ji(s)){var T=hn(s);P=T.length}if(d>=P)return s;var F=d-Zi(y);if(F<1)return y;var W=T?ui(T,0,F).join(""):s.slice(0,F);if(E===e)return W+y;if(T&&(F+=W.length-F),Gl(E)){if(s.slice(F).search(E)){var K,J=W;for(E.global||(E=ul(E.source,Tt(Cu.exec(E))+"g")),E.lastIndex=0;K=E.exec(J);)var Q=K.index;W=W.slice(0,Q===e?F:Q)}}else if(s.indexOf(qe(E),F)!=F){var rt=W.lastIndexOf(E);rt>-1&&(W=W.slice(0,rt))}return W+y}function q2(s){return s=Tt(s),s&&n0.test(s)?s.replace(It,b_):s}var $2=sr(function(s,l,d){return s+(d?" ":"")+l.toUpperCase()}),Jl=Xh("toUpperCase");function Kf(s,l,d){return s=Tt(s),l=d?e:l,l===e?g_(s)?S_(s):o_(s):s.match(l)||[]}var Xf=St(function(s,l){try{return Ue(s,e,l)}catch(d){return Yl(d)?d:new mt(d)}}),Y2=Nn(function(s,l){return en(l,function(d){d=kn(d),Bn(s,d,ql(s[d],s))}),s});function G2(s){var l=s==null?0:s.length,d=ut();return s=l?Yt(s,function(y){if(typeof y[1]!="function")throw new nn(a);return[d(y[0]),y[1]]}):[],St(function(y){for(var E=-1;++E<l;){var P=s[E];if(Ue(P[0],this,y))return Ue(P[1],this,y)}})}function K2(s){return by(sn(s,_))}function Zl(s){return function(){return s}}function X2(s,l){return s==null||s!==s?l:s}var J2=Zh(),Z2=Zh(!0);function Te(s){return s}function Ql(s){return Ah(typeof s=="function"?s:sn(s,_))}function Q2(s){return Ph(sn(s,_))}function tx(s,l){return Oh(s,sn(l,_))}var ex=St(function(s,l){return function(d){return Br(d,s,l)}}),nx=St(function(s,l){return function(d){return Br(s,d,l)}});function tc(s,l,d){var y=de(l),E=Qs(l,y);d==null&&!(Xt(l)&&(E.length||!y.length))&&(d=l,l=s,s=this,E=Qs(l,de(l)));var P=!(Xt(d)&&"chain"in d)||!!d.chain,T=Wn(s);return en(E,function(F){var W=l[F];s[F]=W,T&&(s.prototype[F]=function(){var K=this.__chain__;if(P||K){var J=s(this.__wrapped__),Q=J.__actions__=Oe(this.__actions__);return Q.push({func:W,args:arguments,thisArg:s}),J.__chain__=K,J}return W.apply(s,ri([this.value()],arguments))})}),s}function ix(){return ge._===this&&(ge._=L_),this}function ec(){}function rx(s){return s=bt(s),St(function(l){return Rh(l,s)})}var sx=Rl(Yt),ox=Rl(Qu),ax=Rl(il);function Jf(s){return Hl(s)?rl(kn(s)):Fy(s)}function lx(s){return function(l){return s==null?e:Oi(s,l)}}var cx=tf(),ux=tf(!0);function nc(){return[]}function ic(){return!1}function hx(){return{}}function fx(){return""}function dx(){return!0}function px(s,l){if(s=bt(s),s<1||s>et)return[];var d=gt,y=ve(s,gt);l=ut(l),s-=gt;for(var E=al(y,l);++d<s;)l(d);return E}function gx(s){return _t(s)?Yt(s,kn):$e(s)?[s]:Oe(_f(Tt(s)))}function mx(s){var l=++M_;return Tt(s)+l}var _x=so(function(s,l){return s+l},0),yx=Il("ceil"),vx=so(function(s,l){return s/l},1),bx=Il("floor");function xx(s){return s&&s.length?Zs(s,Te,yl):e}function wx(s,l){return s&&s.length?Zs(s,ut(l,2),yl):e}function Sx(s){return nh(s,Te)}function kx(s,l){return nh(s,ut(l,2))}function Ex(s){return s&&s.length?Zs(s,Te,wl):e}function Cx(s,l){return s&&s.length?Zs(s,ut(l,2),wl):e}var Mx=so(function(s,l){return s*l},1),Ax=Il("round"),Lx=so(function(s,l){return s-l},0);function Px(s){return s&&s.length?ol(s,Te):0}function Ox(s,l){return s&&s.length?ol(s,ut(l,2)):0}return L.after=Qb,L.ary=Af,L.assign=W1,L.assignIn=jf,L.assignInWith=vo,L.assignWith=z1,L.at=j1,L.before=Lf,L.bind=ql,L.bindAll=Y2,L.bindKey=Pf,L.castArray=h1,L.chain=Ef,L.chunk=bv,L.compact=xv,L.concat=wv,L.cond=G2,L.conforms=K2,L.constant=Zl,L.countBy=Pb,L.create=U1,L.curry=Of,L.curryRight=Rf,L.debounce=If,L.defaults=V1,L.defaultsDeep=q1,L.defer=t1,L.delay=e1,L.difference=Sv,L.differenceBy=kv,L.differenceWith=Ev,L.drop=Cv,L.dropRight=Mv,L.dropRightWhile=Av,L.dropWhile=Lv,L.fill=Pv,L.filter=Rb,L.flatMap=Db,L.flatMapDeep=Bb,L.flatMapDepth=Fb,L.flatten=xf,L.flattenDeep=Ov,L.flattenDepth=Rv,L.flip=n1,L.flow=J2,L.flowRight=Z2,L.fromPairs=Iv,L.functions=Z1,L.functionsIn=Q1,L.groupBy=Nb,L.initial=Dv,L.intersection=Bv,L.intersectionBy=Fv,L.intersectionWith=Nv,L.invert=e2,L.invertBy=n2,L.invokeMap=Wb,L.iteratee=Ql,L.keyBy=zb,L.keys=de,L.keysIn=Ie,L.map=fo,L.mapKeys=r2,L.mapValues=s2,L.matches=Q2,L.matchesProperty=tx,L.memoize=go,L.merge=o2,L.mergeWith=Uf,L.method=ex,L.methodOf=nx,L.mixin=tc,L.negate=mo,L.nthArg=rx,L.omit=a2,L.omitBy=l2,L.once=i1,L.orderBy=jb,L.over=sx,L.overArgs=r1,L.overEvery=ox,L.overSome=ax,L.partial=$l,L.partialRight=Tf,L.partition=Ub,L.pick=c2,L.pickBy=Vf,L.property=Jf,L.propertyOf=lx,L.pull=jv,L.pullAll=Sf,L.pullAllBy=Uv,L.pullAllWith=Vv,L.pullAt=qv,L.range=cx,L.rangeRight=ux,L.rearg=s1,L.reject=$b,L.remove=$v,L.rest=o1,L.reverse=Ul,L.sampleSize=Gb,L.set=h2,L.setWith=f2,L.shuffle=Kb,L.slice=Yv,L.sortBy=Zb,L.sortedUniq=tb,L.sortedUniqBy=eb,L.split=D2,L.spread=a1,L.tail=nb,L.take=ib,L.takeRight=rb,L.takeRightWhile=sb,L.takeWhile=ob,L.tap=xb,L.throttle=l1,L.thru=ho,L.toArray=Hf,L.toPairs=qf,L.toPairsIn=$f,L.toPath=gx,L.toPlainObject=zf,L.transform=d2,L.unary=c1,L.union=ab,L.unionBy=lb,L.unionWith=cb,L.uniq=ub,L.uniqBy=hb,L.uniqWith=fb,L.unset=p2,L.unzip=Vl,L.unzipWith=kf,L.update=g2,L.updateWith=m2,L.values=lr,L.valuesIn=_2,L.without=db,L.words=Kf,L.wrap=u1,L.xor=pb,L.xorBy=gb,L.xorWith=mb,L.zip=_b,L.zipObject=yb,L.zipObjectDeep=vb,L.zipWith=bb,L.entries=qf,L.entriesIn=$f,L.extend=jf,L.extendWith=vo,tc(L,L),L.add=_x,L.attempt=Xf,L.camelCase=x2,L.capitalize=Yf,L.ceil=yx,L.clamp=y2,L.clone=f1,L.cloneDeep=p1,L.cloneDeepWith=g1,L.cloneWith=d1,L.conformsTo=m1,L.deburr=Gf,L.defaultTo=X2,L.divide=vx,L.endsWith=w2,L.eq=dn,L.escape=S2,L.escapeRegExp=k2,L.every=Ob,L.find=Ib,L.findIndex=vf,L.findKey=$1,L.findLast=Tb,L.findLastIndex=bf,L.findLastKey=Y1,L.floor=bx,L.forEach=Cf,L.forEachRight=Mf,L.forIn=G1,L.forInRight=K1,L.forOwn=X1,L.forOwnRight=J1,L.get=Kl,L.gt=_1,L.gte=y1,L.has=t2,L.hasIn=Xl,L.head=wf,L.identity=Te,L.includes=Hb,L.indexOf=Tv,L.inRange=v2,L.invoke=i2,L.isArguments=Ti,L.isArray=_t,L.isArrayBuffer=v1,L.isArrayLike=Re,L.isArrayLikeObject=ne,L.isBoolean=b1,L.isBuffer=hi,L.isDate=x1,L.isElement=w1,L.isEmpty=S1,L.isEqual=k1,L.isEqualWith=E1,L.isError=Yl,L.isFinite=C1,L.isFunction=Wn,L.isInteger=Df,L.isLength=_o,L.isMap=Bf,L.isMatch=M1,L.isMatchWith=A1,L.isNaN=L1,L.isNative=P1,L.isNil=R1,L.isNull=O1,L.isNumber=Ff,L.isObject=Xt,L.isObjectLike=Qt,L.isPlainObject=jr,L.isRegExp=Gl,L.isSafeInteger=I1,L.isSet=Nf,L.isString=yo,L.isSymbol=$e,L.isTypedArray=ar,L.isUndefined=T1,L.isWeakMap=D1,L.isWeakSet=B1,L.join=Hv,L.kebabCase=E2,L.last=an,L.lastIndexOf=Wv,L.lowerCase=C2,L.lowerFirst=M2,L.lt=F1,L.lte=N1,L.max=xx,L.maxBy=wx,L.mean=Sx,L.meanBy=kx,L.min=Ex,L.minBy=Cx,L.stubArray=nc,L.stubFalse=ic,L.stubObject=hx,L.stubString=fx,L.stubTrue=dx,L.multiply=Mx,L.nth=zv,L.noConflict=ix,L.noop=ec,L.now=po,L.pad=A2,L.padEnd=L2,L.padStart=P2,L.parseInt=O2,L.random=b2,L.reduce=Vb,L.reduceRight=qb,L.repeat=R2,L.replace=I2,L.result=u2,L.round=Ax,L.runInContext=H,L.sample=Yb,L.size=Xb,L.snakeCase=T2,L.some=Jb,L.sortedIndex=Gv,L.sortedIndexBy=Kv,L.sortedIndexOf=Xv,L.sortedLastIndex=Jv,L.sortedLastIndexBy=Zv,L.sortedLastIndexOf=Qv,L.startCase=B2,L.startsWith=F2,L.subtract=Lx,L.sum=Px,L.sumBy=Ox,L.template=N2,L.times=px,L.toFinite=zn,L.toInteger=bt,L.toLength=Wf,L.toLower=H2,L.toNumber=ln,L.toSafeInteger=H1,L.toString=Tt,L.toUpper=W2,L.trim=z2,L.trimEnd=j2,L.trimStart=U2,L.truncate=V2,L.unescape=q2,L.uniqueId=mx,L.upperCase=$2,L.upperFirst=Jl,L.each=Cf,L.eachRight=Mf,L.first=wf,tc(L,function(){var s={};return wn(L,function(l,d){Dt.call(L.prototype,d)||(s[d]=l)}),s}(),{chain:!1}),L.VERSION=i,en(["bind","bindKey","curry","curryRight","partial","partialRight"],function(s){L[s].placeholder=L}),en(["drop","take"],function(s,l){Mt.prototype[s]=function(d){d=d===e?1:ue(bt(d),0);var y=this.__filtered__&&!l?new Mt(this):this.clone();return y.__filtered__?y.__takeCount__=ve(d,y.__takeCount__):y.__views__.push({size:ve(d,gt),type:s+(y.__dir__<0?"Right":"")}),y},Mt.prototype[s+"Right"]=function(d){return this.reverse()[s](d).reverse()}}),en(["filter","map","takeWhile"],function(s,l){var d=l+1,y=d==nt||d==X;Mt.prototype[s]=function(E){var P=this.clone();return P.__iteratees__.push({iteratee:ut(E,3),type:d}),P.__filtered__=P.__filtered__||y,P}}),en(["head","last"],function(s,l){var d="take"+(l?"Right":"");Mt.prototype[s]=function(){return this[d](1).value()[0]}}),en(["initial","tail"],function(s,l){var d="drop"+(l?"":"Right");Mt.prototype[s]=function(){return this.__filtered__?new Mt(this):this[d](1)}}),Mt.prototype.compact=function(){return this.filter(Te)},Mt.prototype.find=function(s){return this.filter(s).head()},Mt.prototype.findLast=function(s){return this.reverse().find(s)},Mt.prototype.invokeMap=St(function(s,l){return typeof s=="function"?new Mt(this):this.map(function(d){return Br(d,s,l)})}),Mt.prototype.reject=function(s){return this.filter(mo(ut(s)))},Mt.prototype.slice=function(s,l){s=bt(s);var d=this;return d.__filtered__&&(s>0||l<0)?new Mt(d):(s<0?d=d.takeRight(-s):s&&(d=d.drop(s)),l!==e&&(l=bt(l),d=l<0?d.dropRight(-l):d.take(l-s)),d)},Mt.prototype.takeRightWhile=function(s){return this.reverse().takeWhile(s).reverse()},Mt.prototype.toArray=function(){return this.take(gt)},wn(Mt.prototype,function(s,l){var d=/^(?:filter|find|map|reject)|While$/.test(l),y=/^(?:head|last)$/.test(l),E=L[y?"take"+(l=="last"?"Right":""):l],P=y||/^find/.test(l);E&&(L.prototype[l]=function(){var T=this.__wrapped__,F=y?[1]:arguments,W=T instanceof Mt,K=F[0],J=W||_t(T),Q=function(kt){var Lt=E.apply(L,ri([kt],F));return y&&rt?Lt[0]:Lt};J&&d&&typeof K=="function"&&K.length!=1&&(W=J=!1);var rt=this.__chain__,lt=!!this.__actions__.length,ht=P&&!rt,wt=W&&!lt;if(!P&&J){T=wt?T:new Mt(this);var ft=s.apply(T,F);return ft.__actions__.push({func:ho,args:[Q],thisArg:e}),new rn(ft,rt)}return ht&&wt?s.apply(this,F):(ft=this.thru(Q),ht?y?ft.value()[0]:ft.value():ft)})}),en(["pop","push","shift","sort","splice","unshift"],function(s){var l=Fs[s],d=/^(?:push|sort|unshift)$/.test(s)?"tap":"thru",y=/^(?:pop|shift)$/.test(s);L.prototype[s]=function(){var E=arguments;if(y&&!this.__chain__){var P=this.value();return l.apply(_t(P)?P:[],E)}return this[d](function(T){return l.apply(_t(T)?T:[],E)})}}),wn(Mt.prototype,function(s,l){var d=L[l];if(d){var y=d.name+"";Dt.call(nr,y)||(nr[y]=[]),nr[y].push({name:l,func:d})}}),nr[ro(e,C).name]=[{name:"wrapper",func:e}],Mt.prototype.clone=q_,Mt.prototype.reverse=$_,Mt.prototype.value=Y_,L.prototype.at=wb,L.prototype.chain=Sb,L.prototype.commit=kb,L.prototype.next=Eb,L.prototype.plant=Mb,L.prototype.reverse=Ab,L.prototype.toJSON=L.prototype.valueOf=L.prototype.value=Lb,L.prototype.first=L.prototype.head,Lr&&(L.prototype[Lr]=Cb),L},Qi=k_();Ci?((Ci.exports=Qi)._=Qi,Qa._=Qi):ge._=Qi}).call(_w)}(Zr,Zr.exports)),Zr.exports}var vw=yw();const Ze=Sr(vw),Cs=n=>function(...t){return n(this)(...t)};var qo={exports:{}},Vd;function bw(){return Vd||(Vd=1,function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),e.BASE=2166136261;function e(i,r=e.BASE){const o=i.length;for(let a=0;a<o;a++)r^=i.charCodeAt(a),r+=(r<<1)+(r<<4)+(r<<7)+(r<<8)+(r<<24);return r>>>0}t.default=e,n.exports=e}(qo,qo.exports)),qo.exports}var xw=bw();const ww=Sr(xw),Jc=(n,t,e="")=>Object.entries(n).reduce((i,[r,o])=>{const a=`${e}${e?".":""}${r}`;return Ze.isObject(o)&&!t.includes(a)?i.concat(Jc(o,t,a)):i.concat([[a,o]])},[]),ka=n=>`hsl(${Math.floor(ww(n))/120%360}, 100%, 74%)`,Sw=Cs(n=>(t,e,i,{fn:r,inverse:o})=>{const c=(()=>{switch(e){case"eq":return t===i;case"neq":return t!==i;case"lt":return t<i;case"lte":return t<=i;case"gt":return t>i;case"gte":return t>=i;default:return!1}})();return c?r?r(n):o?o(n):c:null}),kw=Cs(()=>(n,t)=>Ze.truncate(n,{length:t})),Ew=Cs(()=>n=>new Date(n).toLocaleTimeString()),Cw=Cs(()=>n=>(n/1e3).toFixed(3)),Mw=Cs(()=>n=>ka(n)),Aw=Object.freeze(Object.defineProperty({__proto__:null,compare:Sw,toColor:Mw,toLocaleTime:Ew,toSeconds:Cw,truncate:kw},Symbol.toStringTag,{value:"Module"})),Lw=`
49
- <div class="segment">
50
- {{#compare format 'neq' 'short'}}
51
- <button class="activity">
52
- {{#if isEnabled}}
53
- <i class="fas fa-plug"></i>
54
- {{else}}
55
- <i class="fas fa-power-off"></i>
56
- {{/if}}
57
- </button>
58
-
59
- <span class="calls-count {{#compare meta.executionsCount 'gt' 0}}active{{/compare}}">
60
- <i class="fas fa-undo-alt"></i>{{meta.executionsCount}}
61
- </span>
62
- {{/compare}}
63
-
64
- <span class="name"><b style="color: {{toColor group}};">{{group}}</b> {{name}}</span>
65
- </div>
66
-
67
- {{#compare format 'neq' 'short'}}
68
- {{#compare meta.tags.length 'gt' 0}}<span class="arrow"><i class="fas fa-chevron-right"></i></span>{{/compare}}
69
-
70
- <div class="segment">
71
- {{#each transports}}<span class="transport">{{this}}</span>{{/each}}
72
-
73
- {{#each meta.tags}}
74
- {{#compare @index 'lte' 5}}
75
- {{#if (compare location 'eq' 'outgoing.status')}}
76
- <span class="status
77
- {{#compare value 'lt' 400}}green{{/compare}}
78
- {{#compare value 'gte' 400}}red{{/compare}}
79
- "><b>{{value}}</b></span>
80
- {{else if (compare location 'eq' 'method')}}
81
- <span class="method" style="color: {{toColor value}};">{{value}}</span>
82
- {{else}}
83
- <span class="{{location}}">{{> truncated this length=45}}</span>
84
- {{/if}}
85
- {{/compare}}
86
- {{/each}}
87
- </div>
88
- {{/compare}}
89
-
90
- {{#with schema.forward}}
91
- <span class="arrow"><i class="fas fa-chevron-right"></i></span>
92
-
93
- <div class="segment">
94
- {{#if baseUrl}}<span class="forward">{{> truncated value=baseUrl length=45}}</span>{{/if}}
95
- {{#if url}}<span class="forward">{{> truncated value=url length=45}}</span>{{/if}}
96
-
97
- {{#if ../isCached}}<span class="cache"><i class="fas fa-database"></i></span>{{/if}}
98
- </div>
99
- {{/with}}
100
- `,Pw=`
101
- {{#if (compare value.length 'gt' length)}}
102
- <span class="truncated">
103
- <span class="full">{{value}}</span>
104
- <span class="short">{{truncate value length}}</span>
105
- </span>
106
- {{else}}
107
- {{value}}
108
- {{/if}}
109
- `,Ow=Lw,Rw=Pw,Iw=Object.freeze(Object.defineProperty({__proto__:null,expectationMeta:Ow,truncated:Rw},Symbol.toStringTag,{value:"Module"})),Tw={init:()=>{Object.entries(Aw).forEach(([n,t])=>oe.registerHelper(n,t)),Object.entries(Iw).forEach(([n,t])=>oe.registerPartial(n,t))}};mr.extend(Fx);Tw.init();const Dw=`
110
- <div class="buttons"></div>
111
- `;var $o={exports:{}},qd;function Bw(){if(qd)return $o.exports;qd=1;var n=typeof Reflect=="object"?Reflect:null,t=n&&typeof n.apply=="function"?n.apply:function(k,O,I){return Function.prototype.apply.call(k,O,I)},e;n&&typeof n.ownKeys=="function"?e=n.ownKeys:Object.getOwnPropertySymbols?e=function(k){return Object.getOwnPropertyNames(k).concat(Object.getOwnPropertySymbols(k))}:e=function(k){return Object.getOwnPropertyNames(k)};function i(S){console&&console.warn&&console.warn(S)}var r=Number.isNaN||function(k){return k!==k};function o(){o.init.call(this)}$o.exports=o,$o.exports.once=C,o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var a=10;function c(S){if(typeof S!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof S)}Object.defineProperty(o,"defaultMaxListeners",{enumerable:!0,get:function(){return a},set:function(S){if(typeof S!="number"||S<0||r(S))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+S+".");a=S}}),o.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},o.prototype.setMaxListeners=function(k){if(typeof k!="number"||k<0||r(k))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+k+".");return this._maxListeners=k,this};function u(S){return S._maxListeners===void 0?o.defaultMaxListeners:S._maxListeners}o.prototype.getMaxListeners=function(){return u(this)},o.prototype.emit=function(k){for(var O=[],I=1;I<arguments.length;I++)O.push(arguments[I]);var B=k==="error",q=this._events;if(q!==void 0)B=B&&q.error===void 0;else if(!B)return!1;if(B){var z;if(O.length>0&&(z=O[0]),z instanceof Error)throw z;var j=new Error("Unhandled error."+(z?" ("+z.message+")":""));throw j.context=z,j}var Y=q[k];if(Y===void 0)return!1;if(typeof Y=="function")t(Y,this,O);else for(var ot=Y.length,nt=g(Y,ot),I=0;I<ot;++I)t(nt[I],this,O);return!0};function f(S,k,O,I){var B,q,z;if(c(O),q=S._events,q===void 0?(q=S._events=Object.create(null),S._eventsCount=0):(q.newListener!==void 0&&(S.emit("newListener",k,O.listener?O.listener:O),q=S._events),z=q[k]),z===void 0)z=q[k]=O,++S._eventsCount;else if(typeof z=="function"?z=q[k]=I?[O,z]:[z,O]:I?z.unshift(O):z.push(O),B=u(S),B>0&&z.length>B&&!z.warned){z.warned=!0;var j=new Error("Possible EventEmitter memory leak detected. "+z.length+" "+String(k)+" listeners added. Use emitter.setMaxListeners() to increase limit");j.name="MaxListenersExceededWarning",j.emitter=S,j.type=k,j.count=z.length,i(j)}return S}o.prototype.addListener=function(k,O){return f(this,k,O,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(k,O){return f(this,k,O,!0)};function h(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function _(S,k,O){var I={fired:!1,wrapFn:void 0,target:S,type:k,listener:O},B=h.bind(I);return B.listener=O,I.wrapFn=B,B}o.prototype.once=function(k,O){return c(O),this.on(k,_(this,k,O)),this},o.prototype.prependOnceListener=function(k,O){return c(O),this.prependListener(k,_(this,k,O)),this},o.prototype.removeListener=function(k,O){var I,B,q,z,j;if(c(O),B=this._events,B===void 0)return this;if(I=B[k],I===void 0)return this;if(I===O||I.listener===O)--this._eventsCount===0?this._events=Object.create(null):(delete B[k],B.removeListener&&this.emit("removeListener",k,I.listener||O));else if(typeof I!="function"){for(q=-1,z=I.length-1;z>=0;z--)if(I[z]===O||I[z].listener===O){j=I[z].listener,q=z;break}if(q<0)return this;q===0?I.shift():b(I,q),I.length===1&&(B[k]=I[0]),B.removeListener!==void 0&&this.emit("removeListener",k,j||O)}return this},o.prototype.off=o.prototype.removeListener,o.prototype.removeAllListeners=function(k){var O,I,B;if(I=this._events,I===void 0)return this;if(I.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):I[k]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete I[k]),this;if(arguments.length===0){var q=Object.keys(I),z;for(B=0;B<q.length;++B)z=q[B],z!=="removeListener"&&this.removeAllListeners(z);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(O=I[k],typeof O=="function")this.removeListener(k,O);else if(O!==void 0)for(B=O.length-1;B>=0;B--)this.removeListener(k,O[B]);return this};function p(S,k,O){var I=S._events;if(I===void 0)return[];var B=I[k];return B===void 0?[]:typeof B=="function"?O?[B.listener||B]:[B]:O?w(B):g(B,B.length)}o.prototype.listeners=function(k){return p(this,k,!0)},o.prototype.rawListeners=function(k){return p(this,k,!1)},o.listenerCount=function(S,k){return typeof S.listenerCount=="function"?S.listenerCount(k):m.call(S,k)},o.prototype.listenerCount=m;function m(S){var k=this._events;if(k!==void 0){var O=k[S];if(typeof O=="function")return 1;if(O!==void 0)return O.length}return 0}o.prototype.eventNames=function(){return this._eventsCount>0?e(this._events):[]};function g(S,k){for(var O=new Array(k),I=0;I<k;++I)O[I]=S[I];return O}function b(S,k){for(;k+1<S.length;k++)S[k]=S[k+1];S.pop()}function w(S){for(var k=new Array(S.length),O=0;O<k.length;++O)k[O]=S[O].listener||S[O];return k}function C(S,k){return new Promise(function(O,I){function B(z){S.removeListener(k,q),I(z)}function q(){typeof S.removeListener=="function"&&S.removeListener("error",B),O([].slice.call(arguments))}D(S,k,q,{once:!0}),k!=="error"&&M(S,B,{once:!0})})}function M(S,k,O){typeof S.on=="function"&&D(S,"error",k,O)}function D(S,k,O,I){if(typeof S.on=="function")I.once?S.once(k,O):S.on(k,O);else if(typeof S.addEventListener=="function")S.addEventListener(k,function B(q){I.once&&S.removeEventListener(k,B),O(q)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof S)}return $o.exports}var Ig=Bw();const Ms=Sr(Ig),Fw=`
112
- <div class="panel {{class}} {{#if width}}width-{{width}}{{/if}} {{#if height}}height-{{height}}{{/if}}">
113
- {{#if title}}
114
- <p class="title">
115
- {{#if title.icon}}<i class="{{title.icon}}"></i>{{/if}}
116
- <span class="title">{{{title.text}}}</span>
117
- {{#if title.description}}<span class="description">{{{title.description}}}</span>{{/if}}
118
- </p>
119
- {{/if}}
120
-
121
- <div class="content"></div>
122
- </div>
123
- `;class te{constructor(t){this.element=document.createElement("div"),t&&(this.element=this.compilePredicateToElement(t))}get isHidden(){return this.element.classList.contains("hidden")}get id(){return this.element.id}assignId(t){return this.element.id=t,this}show(){return this.element.classList.remove("hidden"),this}hide(){return this.element.classList.add("hidden"),this}append(t){return this.element.append(this.compilePredicateToElement(t)),this}prepend(t){return this.element.prepend(this.compilePredicateToElement(t)),this}replace(t){const e=this.compilePredicateToElement(t);return this.element.after(e),this.isHidden&&e.classList.add("hidden"),Object.assign(this.delete(),{element:e})}clear(){return this.element.innerHTML="",this}delete(){return this.element.remove(),this}compilePredicateToElement(t){return t instanceof te?t.element:typeof t=="string"?this.compileHtmlStringToElement(t):t===null?document.createElement("div"):t}compileHtmlStringToElement(t){return new DOMParser().parseFromString(t,"text/html").body.firstElementChild}}class Zc{constructor(t){this.key=t}extract(){return JSON.parse(localStorage.getItem(this.key)??"null")}store(t){return localStorage.setItem(this.key,JSON.stringify(t)),this}clear(){return localStorage.removeItem(this.key),this}static build(t){return new Zc(t)}}const $d=(()=>{const n={password:String,number:Number,text:String};return(t,e)=>{if(t==="checkbox")return e||null;if(t==="file")return null;const i=e.trim();return i.length?(n[t]??String)(i):null}})();class gs extends te{get paths(){return[...this.element.querySelectorAll("*[data-key]")].map(t=>t.getAttribute("data-key")).filter(Boolean)}async extract(){const t={};for(const e of this.element.querySelectorAll("*[data-key]")){const i=e.getAttribute("data-key"),r=e.getAttribute("cast")??e.getAttribute("type")??"text";if(!i||!("value"in e)||typeof e.value!="string")continue;if(r==="file"){const a=[];for(const c of"files"in e?e.files:new FileList)a.push({name:c.name,content:await c.text()});Ze.set(t,i,a);continue}if(e.hasAttribute("list")){const a=e.getAttribute("list")??",",c=e.value.split(a).map(u=>$d(r,u)).filter(u=>u!==null);c.length&&Ze.set(t,i,c);continue}const o=$d(r,e.value);if(r==="checkbox"&&"checked"in e){e.checked&&Ze.set(t,i,o??!0);continue}o!==null&&Ze.set(t,i,o)}return t}assign(t){return Jc(t,this.paths).map(([e,i])=>[e,i,this.element.querySelector(`*[data-key="${e}"]`)]).forEach(([e,i,r])=>Ze.set(r,"value",Array.isArray(i)?i.join(r.getAttribute("list")??","):i??"")),this}static build(t){return new gs(t)}}class Ia extends te{constructor(t,e){super(e),this.key=t,this.client=Zc.build(this.key),this.form=gs.build(this.element)}sync(){const t=this.client.extract()??[];return this.form.assign(t.reduce((e,[i,r])=>Ze.set(e,i,r),{})),this}save(){return this.client.store(Jc(this.form.extract(),this.form.paths)),this}clear(){return this.client.clear(),this}static build(t,e){return new Ia(t,e)}}class yi{constructor(t){if(this.element=t,this.handlers=[],!t)throw new Error("Provided element is not valid");t.addEventListener("click",e=>this.trigger(e))}handle(t){return this.element?(this.handlers.push(async e=>{this.element.classList.add("processed");try{await t(e)}finally{this.element.classList.remove("processed")}}),this):this}async trigger(t=new Event("manual")){for(const e of this.handlers)await e(t)}static build(t){return new yi(t)}}class kr extends te{constructor(t){super(t),this.content=new te(this.element.querySelector("div.content")),this.isInitialized=!1,this.controls={main:new te(this.element.querySelector("div.controls div.main")),additional:new te(this.element.querySelector("div.controls div.additional"))},this.storage=Ia.build(`config:${this.element.id}`,this.element.querySelector("div.storage")),this.meta={},this.events=new Ms,this.expander=this.element.querySelector("div.controls button#expand"),this.expander&&yi.build(this.expander).handle(()=>this.controls.additional.isHidden?(this.controls.additional.show(),this.expander.classList.add("toggled")):(this.controls.additional.hide(),this.expander.classList.remove("toggled")))}assignMeta(t){return Object.assign(this,{meta:t})}initialize(){return this.isInitialized=!0,this.storage.sync(),this.emit("initialize",this)}refresh(){return this.emit("refresh",this)}select(){return this.emit("select",this)}on(t,e){return this.events.on(t,e),this}once(t,e){return this.events.once(t,e),this}emit(t,...e){return this.events.emit(t,...e),this}static build(t){return new kr(t)}}class Nw{constructor(){this.storage=Ia.build("void",document.body),this.shared={}}share(t){return Object.assign(this,{shared:t})}switchStorage(t){return Object.assign(this,{storage:t})}}const Hw=oe.compile(Fw);class Jn extends te{constructor(t={}){super(Hw(t)),this.content=new te(this.element.querySelector("div.content"))}clear(){return this.content.clear(),this}append(t){return this.content.append(t),this}prepend(t){return this.content.prepend(t),this}replace(t){return this.content.replace(t),this}static build(t){return new Jn(t)}}class os extends te{constructor(t){super(`
124
- <button
125
- style="${t!=null&&t.colorify?`color: ${ka(t.name)}`:""}"
126
- class="${t.isEnabled?"checked":""}"
127
- >${t.name}</button>
128
- `),this.configuration=t,this.events=new Ms,this.element.addEventListener("click",()=>this.isEnabled?this.disable("click"):this.enable("click"))}get name(){return this.configuration.name}get isEnabled(){return this.element.classList.contains("checked")}enable(t="auto"){return this.isEnabled?this:(this.element.classList.add("checked"),this.emit("enable",this,t))}disable(t="auto"){return this.isEnabled?(this.element.classList.remove("checked"),this.emit("disable",this,t)):this}on(t,e){return this.events.on(t,e),this}once(t,e){return this.events.once(t,e),this}emit(t,...e){return this.events.emit(t,...e),this}static build(t){return new os(t)}}const Ln=n=>n,Ww=(n=0,t=1)=>(e=t)=>n+=e,zw=oe.compile(Dw);class ms extends te{constructor(t){super(),this.provided=t,this.buttons={all:os.build({name:"ALL",isEnabled:!0}),provided:Ln({})},this.events=new Ms,this.panel=new Jn({...this.provided,class:"checkbox-area"}).append(zw(this.provided)),this.area=new te(this.panel.element.querySelector("div.buttons")).append(this.buttons.all),this.replace(this.panel),this.buttons.all.on("enable",(e,i)=>i==="click"?this.extract().forEach(r=>r.enable()):null),this.buttons.all.on("disable",(e,i)=>i==="click"?this.extract().forEach(r=>r.disable()):null)}extract(){return Object.values(this.buttons.provided)}provide(...t){return t.forEach(e=>{const i=e instanceof os?e:os.build(e);this.buttons.provided[i.name]=i,this.area.append(i),i.on("enable",(r,o)=>{this.extract().every(a=>a.isEnabled)&&this.buttons.all.enable(),o!=="silent"&&this.emit("enable",r)}),i.on("disable",(r,o)=>{this.extract().some(a=>!a.isEnabled)&&this.buttons.all.disable(),o!=="silent"&&this.emit("disable",r)})}),this}clear(){return this.extract().forEach(t=>t.delete()),this.buttons.provided={},this}on(t,e){return this.events.on(t,e),this}once(t,e){return this.events.once(t,e),this}emit(t,...e){return this.events.emit(t,...e),this}static build(t){return new ms(t)}}const jw=`
129
- <div class="container expectation" id="{{id}}">
130
- <div class="meta">{{> expectationMeta this}}</div>
131
- </div>
132
- `,Uw=`
133
- <div class="viewer container"></div>
134
- `;function Vw(n,t){var e,i,r,o,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return o={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function c(u){return function(f){return function(h){if(e)throw new TypeError("Generator is already executing.");for(;a;)try{if(e=1,i&&(r=2&h[0]?i.return:h[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,h[1])).done)return r;switch(i=0,r&&(h=[2&h[0],r.value]),h[0]){case 0:case 1:r=h;break;case 4:return a.label++,{value:h[1],done:!1};case 5:a.label++,i=h[1],h=[0];continue;case 7:h=a.ops.pop(),a.trys.pop();continue;default:if(r=a.trys,!((r=r.length>0&&r[r.length-1])||h[0]!==6&&h[0]!==2)){a=0;continue}if(h[0]===3&&(!r||h[1]>r[0]&&h[1]<r[3])){a.label=h[1];break}if(h[0]===6&&a.label<r[1]){a.label=r[1],r=h;break}if(r&&a.label<r[2]){a.label=r[2],a.ops.push(h);break}r[2]&&a.ops.pop(),a.trys.pop();continue}h=t.call(n,a)}catch(_){h=[6,_],i=0}finally{e=r=0}if(5&h[0])throw h[1];return{value:h[0]?h[1]:void 0,done:!0}}([u,f])}}}function Tg(n){return n===null?"null":typeof n}function Cc(n){return!!n&&typeof n=="object"}function Dg(n){if(n===void 0)return"";if(n===null||typeof n=="object"&&!n.constructor)return"Object";var t=/function ([^(]*)/.exec(n.constructor.toString());return t&&t.length>1?t[1]:""}function Bg(n,t,e){return n==="null"||n==="undefined"?n:(n!=="string"&&n!=="stringifiable"||(e=e.replace(/"/g,'\\"')),n==="function"?t.toString().replace(/[\r\n]/g,"").replace(/\{.*\}/,"")+"{…}":e)}function Yd(n){var t="";return Cc(n)?(t=Dg(n),Array.isArray(n)&&(t+="["+n.length+"]")):t=Bg(Tg(n),n,n),typeof t=="string"?'"'+t+'"':t}function Ne(n){return"json-formatter-"+n}function he(n,t,e){var i=document.createElement(n);return t&&i.classList.add(Ne(t)),e!==void 0&&(e instanceof Node?i.appendChild(e):i.appendChild(document.createTextNode(String(e)))),i}(function(n){if(typeof window<"u"){var t=document.createElement("style");t.setAttribute("media","screen"),t.innerHTML=n,document.head.appendChild(t)}})(`.json-formatter-row {
135
- font-family: monospace;
136
- }
137
- .json-formatter-row,
138
- .json-formatter-row a,
139
- .json-formatter-row a:hover {
140
- color: black;
141
- text-decoration: none;
142
- }
143
- .json-formatter-row .json-formatter-row {
144
- margin-left: 1rem;
145
- }
146
- .json-formatter-row .json-formatter-children.json-formatter-empty {
147
- opacity: 0.5;
148
- margin-left: 1rem;
149
- }
150
- .json-formatter-row .json-formatter-children.json-formatter-empty:after {
151
- display: none;
152
- }
153
- .json-formatter-row .json-formatter-children.json-formatter-empty.json-formatter-object:after {
154
- content: "No properties";
155
- }
156
- .json-formatter-row .json-formatter-children.json-formatter-empty.json-formatter-array:after {
157
- content: "[]";
158
- }
159
- .json-formatter-row .json-formatter-string,
160
- .json-formatter-row .json-formatter-stringifiable {
161
- color: green;
162
- white-space: pre;
163
- word-wrap: break-word;
164
- }
165
- .json-formatter-row .json-formatter-number {
166
- color: blue;
167
- }
168
- .json-formatter-row .json-formatter-boolean {
169
- color: red;
170
- }
171
- .json-formatter-row .json-formatter-null {
172
- color: #855A00;
173
- }
174
- .json-formatter-row .json-formatter-undefined {
175
- color: #ca0b69;
176
- }
177
- .json-formatter-row .json-formatter-function {
178
- color: #FF20ED;
179
- }
180
- .json-formatter-row .json-formatter-date {
181
- background-color: rgba(0, 0, 0, 0.05);
182
- }
183
- .json-formatter-row .json-formatter-url {
184
- text-decoration: underline;
185
- color: blue;
186
- cursor: pointer;
187
- }
188
- .json-formatter-row .json-formatter-bracket {
189
- color: blue;
190
- }
191
- .json-formatter-row .json-formatter-key {
192
- color: #00008B;
193
- padding-right: 0.2rem;
194
- }
195
- .json-formatter-row .json-formatter-toggler-link {
196
- cursor: pointer;
197
- }
198
- .json-formatter-row .json-formatter-toggler {
199
- line-height: 1.2rem;
200
- font-size: 0.7rem;
201
- vertical-align: middle;
202
- opacity: 0.6;
203
- cursor: pointer;
204
- padding-right: 0.2rem;
205
- }
206
- .json-formatter-row .json-formatter-toggler:after {
207
- display: inline-block;
208
- transition: transform 100ms ease-in;
209
- content: "►";
210
- }
211
- .json-formatter-row > a > .json-formatter-preview-text {
212
- opacity: 0;
213
- transition: opacity 0.15s ease-in;
214
- font-style: italic;
215
- }
216
- .json-formatter-row:hover > a > .json-formatter-preview-text {
217
- opacity: 0.6;
218
- }
219
- .json-formatter-row.json-formatter-open > .json-formatter-toggler-link .json-formatter-toggler:after {
220
- transform: rotate(90deg);
221
- }
222
- .json-formatter-row.json-formatter-open > .json-formatter-children:after {
223
- display: inline-block;
224
- }
225
- .json-formatter-row.json-formatter-open > a > .json-formatter-preview-text {
226
- display: none;
227
- }
228
- .json-formatter-row.json-formatter-open.json-formatter-empty:after {
229
- display: block;
230
- }
231
- .json-formatter-dark.json-formatter-row {
232
- font-family: monospace;
233
- }
234
- .json-formatter-dark.json-formatter-row,
235
- .json-formatter-dark.json-formatter-row a,
236
- .json-formatter-dark.json-formatter-row a:hover {
237
- color: white;
238
- text-decoration: none;
239
- }
240
- .json-formatter-dark.json-formatter-row .json-formatter-row {
241
- margin-left: 1rem;
242
- }
243
- .json-formatter-dark.json-formatter-row .json-formatter-children.json-formatter-empty {
244
- opacity: 0.5;
245
- margin-left: 1rem;
246
- }
247
- .json-formatter-dark.json-formatter-row .json-formatter-children.json-formatter-empty:after {
248
- display: none;
249
- }
250
- .json-formatter-dark.json-formatter-row .json-formatter-children.json-formatter-empty.json-formatter-object:after {
251
- content: "No properties";
252
- }
253
- .json-formatter-dark.json-formatter-row .json-formatter-children.json-formatter-empty.json-formatter-array:after {
254
- content: "[]";
255
- }
256
- .json-formatter-dark.json-formatter-row .json-formatter-string,
257
- .json-formatter-dark.json-formatter-row .json-formatter-stringifiable {
258
- color: #31F031;
259
- white-space: pre;
260
- word-wrap: break-word;
261
- }
262
- .json-formatter-dark.json-formatter-row .json-formatter-number {
263
- color: #66C2FF;
264
- }
265
- .json-formatter-dark.json-formatter-row .json-formatter-boolean {
266
- color: #EC4242;
267
- }
268
- .json-formatter-dark.json-formatter-row .json-formatter-null {
269
- color: #EEC97D;
270
- }
271
- .json-formatter-dark.json-formatter-row .json-formatter-undefined {
272
- color: #ef8fbe;
273
- }
274
- .json-formatter-dark.json-formatter-row .json-formatter-function {
275
- color: #FD48CB;
276
- }
277
- .json-formatter-dark.json-formatter-row .json-formatter-date {
278
- background-color: rgba(255, 255, 255, 0.05);
279
- }
280
- .json-formatter-dark.json-formatter-row .json-formatter-url {
281
- text-decoration: underline;
282
- color: #027BFF;
283
- cursor: pointer;
284
- }
285
- .json-formatter-dark.json-formatter-row .json-formatter-bracket {
286
- color: #9494FF;
287
- }
288
- .json-formatter-dark.json-formatter-row .json-formatter-key {
289
- color: #23A0DB;
290
- padding-right: 0.2rem;
291
- }
292
- .json-formatter-dark.json-formatter-row .json-formatter-toggler-link {
293
- cursor: pointer;
294
- }
295
- .json-formatter-dark.json-formatter-row .json-formatter-toggler {
296
- line-height: 1.2rem;
297
- font-size: 0.7rem;
298
- vertical-align: middle;
299
- opacity: 0.6;
300
- cursor: pointer;
301
- padding-right: 0.2rem;
302
- }
303
- .json-formatter-dark.json-formatter-row .json-formatter-toggler:after {
304
- display: inline-block;
305
- transition: transform 100ms ease-in;
306
- content: "►";
307
- }
308
- .json-formatter-dark.json-formatter-row > a > .json-formatter-preview-text {
309
- opacity: 0;
310
- transition: opacity 0.15s ease-in;
311
- font-style: italic;
312
- }
313
- .json-formatter-dark.json-formatter-row:hover > a > .json-formatter-preview-text {
314
- opacity: 0.6;
315
- }
316
- .json-formatter-dark.json-formatter-row.json-formatter-open > .json-formatter-toggler-link .json-formatter-toggler:after {
317
- transform: rotate(90deg);
318
- }
319
- .json-formatter-dark.json-formatter-row.json-formatter-open > .json-formatter-children:after {
320
- display: inline-block;
321
- }
322
- .json-formatter-dark.json-formatter-row.json-formatter-open > a > .json-formatter-preview-text {
323
- display: none;
324
- }
325
- .json-formatter-dark.json-formatter-row.json-formatter-open.json-formatter-empty:after {
326
- display: block;
327
- }
328
- `);var qw=/(^\d{1,4}[\.|\\/|-]\d{1,2}[\.|\\/|-]\d{1,4})(\s*(?:0?[1-9]:[0-5]|1(?=[012])\d:[0-5])\d\s*[ap]m)?$/,$w=/\d{2}:\d{2}:\d{2} GMT-\d{4}/,Yw=/\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{3}Z/,Yo=window.requestAnimationFrame||function(n){return n(),0},fr={hoverPreviewEnabled:!1,hoverPreviewArrayCount:10,hoverPreviewFieldCount:5,animateOpen:!0,animateClose:!0,theme:null,useToJSON:!0,sortPropertiesBy:null,maxArrayItems:100,exposePath:!1,afterCopyHandler:function(){}},Gw=function(){function n(t,e,i,r,o,a,c,u){e===void 0&&(e=1),i===void 0&&(i=fr),a===void 0&&(a=[]),u===void 0&&(u=1),this.json=t,this.open=e,this.config=i,this.key=r,this.displayKey=o,this.path=a,this.arrayRange=c,this.level=u,this._isOpen=null,this.config.hoverPreviewEnabled===void 0&&(this.config.hoverPreviewEnabled=fr.hoverPreviewEnabled),this.config.hoverPreviewArrayCount===void 0&&(this.config.hoverPreviewArrayCount=fr.hoverPreviewArrayCount),this.config.hoverPreviewFieldCount===void 0&&(this.config.hoverPreviewFieldCount=fr.hoverPreviewFieldCount),this.config.useToJSON===void 0&&(this.config.useToJSON=fr.useToJSON),this.config.maxArrayItems===void 0&&(this.config.maxArrayItems=fr.maxArrayItems),this.key===""&&(this.key='""'),this.displayKey===void 0&&(this.displayKey=this.key)}return Object.defineProperty(n.prototype,"isOpen",{get:function(){return this._isOpen!==null?this._isOpen:this.open>0},set:function(t){this._isOpen=t},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"isDate",{get:function(){return this.json instanceof Date||this.type==="string"&&(qw.test(this.json)||Yw.test(this.json)||$w.test(this.json))},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"isUrl",{get:function(){return this.type==="string"&&this.json.indexOf("http")===0},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"isArray",{get:function(){return Array.isArray(this.json)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"isLargeArray",{get:function(){return this.isArray&&this.json.length>this.config.maxArrayItems},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"isArrayRange",{get:function(){return this.isArray&&this.arrayRange!==void 0&&this.arrayRange.length==2},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"isObject",{get:function(){return Cc(this.json)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"isEmptyObject",{get:function(){return!this.keys.length&&!this.isArray},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"isEmpty",{get:function(){return this.isEmptyObject||this.keys&&!this.keys.length&&this.isArray},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"useToJSON",{get:function(){return this.config.useToJSON&&this.type==="stringifiable"},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"hasKey",{get:function(){return this.key!==void 0},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"constructorName",{get:function(){return Dg(this.json)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"type",{get:function(){return this.config.useToJSON&&this.json&&this.json.toJSON?"stringifiable":Tg(this.json)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"keys",{get:function(){if(this.isObject){var t=Object.keys(this.json);if(this.isLargeArray){var e=Math.ceil(this.json.length/this.config.maxArrayItems);t=[];for(var i=0;i<e;i++){var r=i*this.config.maxArrayItems,o=Math.min(this.json.length-1,r+(this.config.maxArrayItems-1));t.push(r+" … "+o)}}return!this.isArray&&this.config.sortPropertiesBy?t.sort(this.config.sortPropertiesBy):t}return[]},enumerable:!1,configurable:!0}),n.prototype.toggleOpen=function(t){var e,i;if(!((i=(e=t.target)===null||e===void 0?void 0:e.classList)===null||i===void 0)&&i.contains("json-formatter-copy"))return null;this.isOpen=!this.isOpen,this.element&&(this.isOpen?this.appendChildren(this.config.animateOpen):this.removeChildren(this.config.animateClose),this.element.classList.toggle(Ne("open")))},n.prototype.onCopy=function(t){var e,i,r,o,a,c;return r=this,o=void 0,c=function(){return Vw(this,function(u){switch(u.label){case 0:return[4,navigator.clipboard.writeText(Cc(this.json)?JSON.stringify(this.json):this.json)];case 1:return u.sent(),(i=(e=this.config).afterCopyHandler)===null||i===void 0||i.call(e),[2]}})},new((a=void 0)||(a=Promise))(function(u,f){function h(m){try{p(c.next(m))}catch(g){f(g)}}function _(m){try{p(c.throw(m))}catch(g){f(g)}}function p(m){m.done?u(m.value):new a(function(g){g(m.value)}).then(h,_)}p((c=c.apply(r,o||[])).next())})},n.prototype.openAtDepth=function(t){t===void 0&&(t=1),t<0||(this.open=t,this.isOpen=t!==0,this.element&&(this.removeChildren(!1),t===0?this.element.classList.remove(Ne("open")):(this.appendChildren(this.config.animateOpen),this.element.classList.add(Ne("open")))))},n.prototype.getInlinepreview=function(){var t=this;if(this.isArray){var e=this.json.slice(0,this.config.hoverPreviewArrayCount).map(Yd);return e.length<this.json.length&&e.push("..."),"["+e.join(", ")+"]"}var i=this.keys,r=i.slice(0,this.config.hoverPreviewFieldCount).map(function(a){var c=(a+": "+Yd(t.json[a])).replace(/\n/g,"");return c.length>35?c.substring(0,32)+"...":c}),o=i.length>=this.config.hoverPreviewFieldCount?", …":"";return"{ "+r.join(", ")+o+" }"},n.prototype.render=function(){this.element=he("div","row");var t=this.isObject?he("a","toggler-link"):he("span");if(this.isArrayRange?t.appendChild(he("span","range","["+this.displayKey+"]")):this.hasKey&&(t.appendChild(he("span","key",this.displayKey+":")).classList.add("level-"+this.level),this.config.exposePath&&(this.element.dataset.path=JSON.stringify(this.path))),this.isObject&&!this.useToJSON&&t.appendChild(he("span","toggler")),this.isObject&&!this.useToJSON){var e=he("span","value"),i=he("span");if(!this.isArrayRange){var r=he("span","constructor-name",this.constructorName);i.appendChild(r)}if(this.isArray&&!this.isArrayRange){var o=he("span");o.appendChild(he("span","bracket","[")),o.appendChild(he("span","number",this.json.length)),o.appendChild(he("span","bracket","]")),i.appendChild(o)}var a=he("span","preview",this.getInlinepreview());i.appendChild(a),e.appendChild(i),t.appendChild(e)}else{(e=this.isUrl?he("a"):he("span")).classList.add(Ne(this.type)),this.isDate&&e.classList.add(Ne("date")),this.isUrl&&(e.classList.add(Ne("url")),e.setAttribute("href",this.json));var c=Bg(this.type,this.json,this.useToJSON?this.json.toJSON():this.json);e.appendChild(document.createTextNode(c)),t.appendChild(e)}if(this.isObject&&this.config.hoverPreviewEnabled){var u=he("span","preview-text");u.appendChild(document.createTextNode(this.getInlinepreview())),t.appendChild(u)}var f=he("div","children");this.isObject&&f.classList.add(Ne("object")),this.isArray&&f.classList.add(Ne("array")),this.isEmpty&&f.classList.add(Ne("empty")),this.config&&this.config.theme&&this.element.classList.add(Ne(this.config.theme)),this.isOpen&&this.element.classList.add(Ne("open"));var h=he("button","copy");return h.classList.add("fas"),h.classList.add("fa-clone"),h.addEventListener("click",this.onCopy.bind(this)),t.prepend(h),this.element.appendChild(t),this.element.appendChild(f),this.isObject&&this.isOpen&&this.appendChildren(),this.isObject&&!this.useToJSON&&t.addEventListener("click",this.toggleOpen.bind(this)),this.element},n.prototype.appendChildren=function(t){var e=this;t===void 0&&(t=!1);var i=this.element.querySelector("div."+Ne("children"));if(i&&!this.isEmpty){var r=function(c,u){var f=e.isLargeArray?[u*e.config.maxArrayItems,Math.min(e.json.length-1,u*e.config.maxArrayItems+(e.config.maxArrayItems-1))]:void 0,h=e.isArrayRange?(e.arrayRange[0]+u).toString():c,_=new n(f?e.json.slice(f[0],f[1]+1):e.json[c],e.open-1,e.config,c,h,f?e.path:e.path.concat(h),f,e.level+1);i.appendChild(_.render())};if(t){var o=0,a=function(){var c=e.keys[o];r(c,o),(o+=1)<e.keys.length&&(o>10?a():Yo(a))};Yo(a)}else this.keys.forEach(function(c,u){return r(c,u)})}},n.prototype.removeChildren=function(t){t===void 0&&(t=!1);var e=this.element.querySelector("div."+Ne("children"));if(t){var i=0,r=function(){e&&e.children.length&&(e.removeChild(e.children[0]),(i+=1)>10?r():Yo(r))};Yo(r)}else e&&(e.innerHTML="")},n}();const Rn=Object.create(null);Rn.open="0";Rn.close="1";Rn.ping="2";Rn.pong="3";Rn.message="4";Rn.upgrade="5";Rn.noop="6";const fa=Object.create(null);Object.keys(Rn).forEach(n=>{fa[Rn[n]]=n});const Kw={type:"error",data:"parser error"},Xw=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",Jw=typeof ArrayBuffer=="function",Zw=n=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(n):n&&n.buffer instanceof ArrayBuffer,Fg=({type:n,data:t},e,i)=>Xw&&t instanceof Blob?e?i(t):Gd(t,i):Jw&&(t instanceof ArrayBuffer||Zw(t))?e?i(t):Gd(new Blob([t]),i):i(Rn[n]+(t||"")),Gd=(n,t)=>{const e=new FileReader;return e.onload=function(){const i=e.result.split(",")[1];t("b"+i)},e.readAsDataURL(n)},Kd="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Qr=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let n=0;n<Kd.length;n++)Qr[Kd.charCodeAt(n)]=n;const Qw=n=>{let t=n.length*.75,e=n.length,i,r=0,o,a,c,u;n[n.length-1]==="="&&(t--,n[n.length-2]==="="&&t--);const f=new ArrayBuffer(t),h=new Uint8Array(f);for(i=0;i<e;i+=4)o=Qr[n.charCodeAt(i)],a=Qr[n.charCodeAt(i+1)],c=Qr[n.charCodeAt(i+2)],u=Qr[n.charCodeAt(i+3)],h[r++]=o<<2|a>>4,h[r++]=(a&15)<<4|c>>2,h[r++]=(c&3)<<6|u&63;return f},tS=typeof ArrayBuffer=="function",Ng=(n,t)=>{if(typeof n!="string")return{type:"message",data:Hg(n,t)};const e=n.charAt(0);return e==="b"?{type:"message",data:eS(n.substring(1),t)}:fa[e]?n.length>1?{type:fa[e],data:n.substring(1)}:{type:fa[e]}:Kw},eS=(n,t)=>{if(tS){const e=Qw(n);return Hg(e,t)}else return{base64:!0,data:n}},Hg=(n,t)=>{switch(t){case"blob":return n instanceof ArrayBuffer?new Blob([n]):n;case"arraybuffer":default:return n}},Wg="",nS=(n,t)=>{const e=n.length,i=new Array(e);let r=0;n.forEach((o,a)=>{Fg(o,!1,c=>{i[a]=c,++r===e&&t(i.join(Wg))})})},iS=(n,t)=>{const e=n.split(Wg),i=[];for(let r=0;r<e.length;r++){const o=Ng(e[r],t);if(i.push(o),o.type==="error")break}return i},zg=4;function ae(n){if(n)return rS(n)}function rS(n){for(var t in ae.prototype)n[t]=ae.prototype[t];return n}ae.prototype.on=ae.prototype.addEventListener=function(n,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+n]=this._callbacks["$"+n]||[]).push(t),this};ae.prototype.once=function(n,t){function e(){this.off(n,e),t.apply(this,arguments)}return e.fn=t,this.on(n,e),this};ae.prototype.off=ae.prototype.removeListener=ae.prototype.removeAllListeners=ae.prototype.removeEventListener=function(n,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var e=this._callbacks["$"+n];if(!e)return this;if(arguments.length==1)return delete this._callbacks["$"+n],this;for(var i,r=0;r<e.length;r++)if(i=e[r],i===t||i.fn===t){e.splice(r,1);break}return e.length===0&&delete this._callbacks["$"+n],this};ae.prototype.emit=function(n){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),e=this._callbacks["$"+n],i=1;i<arguments.length;i++)t[i-1]=arguments[i];if(e){e=e.slice(0);for(var i=0,r=e.length;i<r;++i)e[i].apply(this,t)}return this};ae.prototype.emitReserved=ae.prototype.emit;ae.prototype.listeners=function(n){return this._callbacks=this._callbacks||{},this._callbacks["$"+n]||[]};ae.prototype.hasListeners=function(n){return!!this.listeners(n).length};const di=typeof self<"u"?self:typeof window<"u"?window:Function("return this")();function jg(n,...t){return t.reduce((e,i)=>(n.hasOwnProperty(i)&&(e[i]=n[i]),e),{})}const sS=setTimeout,oS=clearTimeout;function Ta(n,t){t.useNativeTimers?(n.setTimeoutFn=sS.bind(di),n.clearTimeoutFn=oS.bind(di)):(n.setTimeoutFn=setTimeout.bind(di),n.clearTimeoutFn=clearTimeout.bind(di))}const aS=1.33;function lS(n){return typeof n=="string"?cS(n):Math.ceil((n.byteLength||n.size)*aS)}function cS(n){let t=0,e=0;for(let i=0,r=n.length;i<r;i++)t=n.charCodeAt(i),t<128?e+=1:t<2048?e+=2:t<55296||t>=57344?e+=3:(i++,e+=4);return e}class uS extends Error{constructor(t,e,i){super(t),this.description=e,this.context=i,this.type="TransportError"}}class Ug extends ae{constructor(t){super(),this.writable=!1,Ta(this,t),this.opts=t,this.query=t.query,this.readyState="",this.socket=t.socket}onError(t,e,i){return super.emitReserved("error",new uS(t,e,i)),this}open(){return(this.readyState==="closed"||this.readyState==="")&&(this.readyState="opening",this.doOpen()),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(t){this.readyState==="open"&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const e=Ng(t,this.socket.binaryType);this.onPacket(e)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}}const Vg="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),Mc=64,hS={};let Xd=0,Go=0,Jd;function Zd(n){let t="";do t=Vg[n%Mc]+t,n=Math.floor(n/Mc);while(n>0);return t}function qg(){const n=Zd(+new Date);return n!==Jd?(Xd=0,Jd=n):n+"."+Zd(Xd++)}for(;Go<Mc;Go++)hS[Vg[Go]]=Go;function $g(n){let t="";for(let e in n)n.hasOwnProperty(e)&&(t.length&&(t+="&"),t+=encodeURIComponent(e)+"="+encodeURIComponent(n[e]));return t}function fS(n){let t={},e=n.split("&");for(let i=0,r=e.length;i<r;i++){let o=e[i].split("=");t[decodeURIComponent(o[0])]=decodeURIComponent(o[1])}return t}let Yg=!1;try{Yg=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const dS=Yg;function Gg(n){const t=n.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!t||dS))return new XMLHttpRequest}catch{}if(!t)try{return new di[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}function pS(){}const gS=function(){return new Gg({xdomain:!1}).responseType!=null}();class mS extends Ug{constructor(t){if(super(t),this.polling=!1,typeof location<"u"){const i=location.protocol==="https:";let r=location.port;r||(r=i?"443":"80"),this.xd=typeof location<"u"&&t.hostname!==location.hostname||r!==t.port,this.xs=t.secure!==i}const e=t&&t.forceBase64;this.supportsBinary=gS&&!e}get name(){return"polling"}doOpen(){this.poll()}pause(t){this.readyState="pausing";const e=()=>{this.readyState="paused",t()};if(this.polling||!this.writable){let i=0;this.polling&&(i++,this.once("pollComplete",function(){--i||e()})),this.writable||(i++,this.once("drain",function(){--i||e()}))}else e()}poll(){this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const e=i=>{if(this.readyState==="opening"&&i.type==="open"&&this.onOpen(),i.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(i)};iS(t,this.socket.binaryType).forEach(e),this.readyState!=="closed"&&(this.polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this.poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,nS(t,e=>{this.doWrite(e,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){let t=this.query||{};const e=this.opts.secure?"https":"http";let i="";this.opts.timestampRequests!==!1&&(t[this.opts.timestampParam]=qg()),!this.supportsBinary&&!t.sid&&(t.b64=1),this.opts.port&&(e==="https"&&Number(this.opts.port)!==443||e==="http"&&Number(this.opts.port)!==80)&&(i=":"+this.opts.port);const r=$g(t),o=this.opts.hostname.indexOf(":")!==-1;return e+"://"+(o?"["+this.opts.hostname+"]":this.opts.hostname)+i+this.opts.path+(r.length?"?"+r:"")}request(t={}){return Object.assign(t,{xd:this.xd,xs:this.xs},this.opts),new Pn(this.uri(),t)}doWrite(t,e){const i=this.request({method:"POST",data:t});i.on("success",e),i.on("error",(r,o)=>{this.onError("xhr post error",r,o)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(e,i)=>{this.onError("xhr poll error",e,i)}),this.pollXhr=t}}class Pn extends ae{constructor(t,e){super(),Ta(this,e),this.opts=e,this.method=e.method||"GET",this.uri=t,this.async=e.async!==!1,this.data=e.data!==void 0?e.data:null,this.create()}create(){const t=jg(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");t.xdomain=!!this.opts.xd,t.xscheme=!!this.opts.xs;const e=this.xhr=new Gg(t);try{e.open(this.method,this.uri,this.async);try{if(this.opts.extraHeaders){e.setDisableHeaderCheck&&e.setDisableHeaderCheck(!0);for(let i in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(i)&&e.setRequestHeader(i,this.opts.extraHeaders[i])}}catch{}if(this.method==="POST")try{e.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{e.setRequestHeader("Accept","*/*")}catch{}"withCredentials"in e&&(e.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(e.timeout=this.opts.requestTimeout),e.onreadystatechange=()=>{e.readyState===4&&(e.status===200||e.status===1223?this.onLoad():this.setTimeoutFn(()=>{this.onError(typeof e.status=="number"?e.status:0)},0))},e.send(this.data)}catch(i){this.setTimeoutFn(()=>{this.onError(i)},0);return}typeof document<"u"&&(this.index=Pn.requestsCount++,Pn.requests[this.index]=this)}onError(t){this.emitReserved("error",t,this.xhr),this.cleanup(!0)}cleanup(t){if(!(typeof this.xhr>"u"||this.xhr===null)){if(this.xhr.onreadystatechange=pS,t)try{this.xhr.abort()}catch{}typeof document<"u"&&delete Pn.requests[this.index],this.xhr=null}}onLoad(){const t=this.xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}}Pn.requestsCount=0;Pn.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",Qd);else if(typeof addEventListener=="function"){const n="onpagehide"in di?"pagehide":"unload";addEventListener(n,Qd,!1)}}function Qd(){for(let n in Pn.requests)Pn.requests.hasOwnProperty(n)&&Pn.requests[n].abort()}var _S={},Da={};Da.byteLength=bS;Da.toByteArray=wS;Da.fromByteArray=ES;var An=[],un=[],yS=typeof Uint8Array<"u"?Uint8Array:Array,hc="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var dr=0,vS=hc.length;dr<vS;++dr)An[dr]=hc[dr],un[hc.charCodeAt(dr)]=dr;un[45]=62;un[95]=63;function Kg(n){var t=n.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var e=n.indexOf("=");e===-1&&(e=t);var i=e===t?0:4-e%4;return[e,i]}function bS(n){var t=Kg(n),e=t[0],i=t[1];return(e+i)*3/4-i}function xS(n,t,e){return(t+e)*3/4-e}function wS(n){var t,e=Kg(n),i=e[0],r=e[1],o=new yS(xS(n,i,r)),a=0,c=r>0?i-4:i,u;for(u=0;u<c;u+=4)t=un[n.charCodeAt(u)]<<18|un[n.charCodeAt(u+1)]<<12|un[n.charCodeAt(u+2)]<<6|un[n.charCodeAt(u+3)],o[a++]=t>>16&255,o[a++]=t>>8&255,o[a++]=t&255;return r===2&&(t=un[n.charCodeAt(u)]<<2|un[n.charCodeAt(u+1)]>>4,o[a++]=t&255),r===1&&(t=un[n.charCodeAt(u)]<<10|un[n.charCodeAt(u+1)]<<4|un[n.charCodeAt(u+2)]>>2,o[a++]=t>>8&255,o[a++]=t&255),o}function SS(n){return An[n>>18&63]+An[n>>12&63]+An[n>>6&63]+An[n&63]}function kS(n,t,e){for(var i,r=[],o=t;o<e;o+=3)i=(n[o]<<16&16711680)+(n[o+1]<<8&65280)+(n[o+2]&255),r.push(SS(i));return r.join("")}function ES(n){for(var t,e=n.length,i=e%3,r=[],o=16383,a=0,c=e-i;a<c;a+=o)r.push(kS(n,a,a+o>c?c:a+o));return i===1?(t=n[e-1],r.push(An[t>>2]+An[t<<4&63]+"==")):i===2&&(t=(n[e-2]<<8)+n[e-1],r.push(An[t>>10]+An[t>>4&63]+An[t<<2&63]+"=")),r.join("")}var Qc={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */Qc.read=function(n,t,e,i,r){var o,a,c=r*8-i-1,u=(1<<c)-1,f=u>>1,h=-7,_=e?r-1:0,p=e?-1:1,m=n[t+_];for(_+=p,o=m&(1<<-h)-1,m>>=-h,h+=c;h>0;o=o*256+n[t+_],_+=p,h-=8);for(a=o&(1<<-h)-1,o>>=-h,h+=i;h>0;a=a*256+n[t+_],_+=p,h-=8);if(o===0)o=1-f;else{if(o===u)return a?NaN:(m?-1:1)*(1/0);a=a+Math.pow(2,i),o=o-f}return(m?-1:1)*a*Math.pow(2,o-i)};Qc.write=function(n,t,e,i,r,o){var a,c,u,f=o*8-r-1,h=(1<<f)-1,_=h>>1,p=r===23?Math.pow(2,-24)-Math.pow(2,-77):0,m=i?0:o-1,g=i?1:-1,b=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(c=isNaN(t)?1:0,a=h):(a=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-a))<1&&(a--,u*=2),a+_>=1?t+=p/u:t+=p*Math.pow(2,1-_),t*u>=2&&(a++,u/=2),a+_>=h?(c=0,a=h):a+_>=1?(c=(t*u-1)*Math.pow(2,r),a=a+_):(c=t*Math.pow(2,_-1)*Math.pow(2,r),a=0));r>=8;n[e+m]=c&255,m+=g,c/=256,r-=8);for(a=a<<r|c,f+=r;f>0;n[e+m]=a&255,m+=g,a/=256,f-=8);n[e+m-g]|=b*128};/*!
329
- * The buffer module from node.js, for the browser.
330
- *
331
- * @author Feross Aboukhadijeh <https://feross.org>
332
- * @license MIT
333
- */(function(n){const t=Da,e=Qc,i=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;n.Buffer=h,n.SlowBuffer=k,n.INSPECT_MAX_BYTES=50;const r=2147483647;n.kMaxLength=r;const{Uint8Array:o,ArrayBuffer:a,SharedArrayBuffer:c}=globalThis;h.TYPED_ARRAY_SUPPORT=u(),!h.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function u(){try{const A=new o(1),v={foo:function(){return 42}};return Object.setPrototypeOf(v,o.prototype),Object.setPrototypeOf(A,v),A.foo()===42}catch{return!1}}Object.defineProperty(h.prototype,"parent",{enumerable:!0,get:function(){if(h.isBuffer(this))return this.buffer}}),Object.defineProperty(h.prototype,"offset",{enumerable:!0,get:function(){if(h.isBuffer(this))return this.byteOffset}});function f(A){if(A>r)throw new RangeError('The value "'+A+'" is invalid for option "size"');const v=new o(A);return Object.setPrototypeOf(v,h.prototype),v}function h(A,v,x){if(typeof A=="number"){if(typeof v=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return g(A)}return _(A,v,x)}h.poolSize=8192;function _(A,v,x){if(typeof A=="string")return b(A,v);if(a.isView(A))return C(A);if(A==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof A);if(ye(A,a)||A&&ye(A.buffer,a)||typeof c<"u"&&(ye(A,c)||A&&ye(A.buffer,c)))return M(A,v,x);if(typeof A=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const R=A.valueOf&&A.valueOf();if(R!=null&&R!==A)return h.from(R,v,x);const N=D(A);if(N)return N;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof A[Symbol.toPrimitive]=="function")return h.from(A[Symbol.toPrimitive]("string"),v,x);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof A)}h.from=function(A,v,x){return _(A,v,x)},Object.setPrototypeOf(h.prototype,o.prototype),Object.setPrototypeOf(h,o);function p(A){if(typeof A!="number")throw new TypeError('"size" argument must be of type number');if(A<0)throw new RangeError('The value "'+A+'" is invalid for option "size"')}function m(A,v,x){return p(A),A<=0?f(A):v!==void 0?typeof x=="string"?f(A).fill(v,x):f(A).fill(v):f(A)}h.alloc=function(A,v,x){return m(A,v,x)};function g(A){return p(A),f(A<0?0:S(A)|0)}h.allocUnsafe=function(A){return g(A)},h.allocUnsafeSlow=function(A){return g(A)};function b(A,v){if((typeof v!="string"||v==="")&&(v="utf8"),!h.isEncoding(v))throw new TypeError("Unknown encoding: "+v);const x=O(A,v)|0;let R=f(x);const N=R.write(A,v);return N!==x&&(R=R.slice(0,N)),R}function w(A){const v=A.length<0?0:S(A.length)|0,x=f(v);for(let R=0;R<v;R+=1)x[R]=A[R]&255;return x}function C(A){if(ye(A,o)){const v=new o(A);return M(v.buffer,v.byteOffset,v.byteLength)}return w(A)}function M(A,v,x){if(v<0||A.byteLength<v)throw new RangeError('"offset" is outside of buffer bounds');if(A.byteLength<v+(x||0))throw new RangeError('"length" is outside of buffer bounds');let R;return v===void 0&&x===void 0?R=new o(A):x===void 0?R=new o(A,v):R=new o(A,v,x),Object.setPrototypeOf(R,h.prototype),R}function D(A){if(h.isBuffer(A)){const v=S(A.length)|0,x=f(v);return x.length===0||A.copy(x,0,0,v),x}if(A.length!==void 0)return typeof A.length!="number"||Cr(A.length)?f(0):w(A);if(A.type==="Buffer"&&Array.isArray(A.data))return w(A.data)}function S(A){if(A>=r)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+r.toString(16)+" bytes");return A|0}function k(A){return+A!=A&&(A=0),h.alloc(+A)}h.isBuffer=function(v){return v!=null&&v._isBuffer===!0&&v!==h.prototype},h.compare=function(v,x){if(ye(v,o)&&(v=h.from(v,v.offset,v.byteLength)),ye(x,o)&&(x=h.from(x,x.offset,x.byteLength)),!h.isBuffer(v)||!h.isBuffer(x))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(v===x)return 0;let R=v.length,N=x.length;for(let U=0,G=Math.min(R,N);U<G;++U)if(v[U]!==x[U]){R=v[U],N=x[U];break}return R<N?-1:N<R?1:0},h.isEncoding=function(v){switch(String(v).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},h.concat=function(v,x){if(!Array.isArray(v))throw new TypeError('"list" argument must be an Array of Buffers');if(v.length===0)return h.alloc(0);let R;if(x===void 0)for(x=0,R=0;R<v.length;++R)x+=v[R].length;const N=h.allocUnsafe(x);let U=0;for(R=0;R<v.length;++R){let G=v[R];if(ye(G,o))U+G.length>N.length?(h.isBuffer(G)||(G=h.from(G)),G.copy(N,U)):o.prototype.set.call(N,G,U);else if(h.isBuffer(G))G.copy(N,U);else throw new TypeError('"list" argument must be an Array of Buffers');U+=G.length}return N};function O(A,v){if(h.isBuffer(A))return A.length;if(a.isView(A)||ye(A,a))return A.byteLength;if(typeof A!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof A);const x=A.length,R=arguments.length>2&&arguments[2]===!0;if(!R&&x===0)return 0;let N=!1;for(;;)switch(v){case"ascii":case"latin1":case"binary":return x;case"utf8":case"utf-8":return In(A).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return x*2;case"hex":return x>>>1;case"base64":return ki(A).length;default:if(N)return R?-1:In(A).length;v=(""+v).toLowerCase(),N=!0}}h.byteLength=O;function I(A,v,x){let R=!1;if((v===void 0||v<0)&&(v=0),v>this.length||((x===void 0||x>this.length)&&(x=this.length),x<=0)||(x>>>=0,v>>>=0,x<=v))return"";for(A||(A="utf8");;)switch(A){case"hex":return Ot(this,v,x);case"utf8":case"utf-8":return tt(this,v,x);case"ascii":return ct(this,v,x);case"latin1":case"binary":return gt(this,v,x);case"base64":return X(this,v,x);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ft(this,v,x);default:if(R)throw new TypeError("Unknown encoding: "+A);A=(A+"").toLowerCase(),R=!0}}h.prototype._isBuffer=!0;function B(A,v,x){const R=A[v];A[v]=A[x],A[x]=R}h.prototype.swap16=function(){const v=this.length;if(v%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let x=0;x<v;x+=2)B(this,x,x+1);return this},h.prototype.swap32=function(){const v=this.length;if(v%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let x=0;x<v;x+=4)B(this,x,x+3),B(this,x+1,x+2);return this},h.prototype.swap64=function(){const v=this.length;if(v%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let x=0;x<v;x+=8)B(this,x,x+7),B(this,x+1,x+6),B(this,x+2,x+5),B(this,x+3,x+4);return this},h.prototype.toString=function(){const v=this.length;return v===0?"":arguments.length===0?tt(this,0,v):I.apply(this,arguments)},h.prototype.toLocaleString=h.prototype.toString,h.prototype.equals=function(v){if(!h.isBuffer(v))throw new TypeError("Argument must be a Buffer");return this===v?!0:h.compare(this,v)===0},h.prototype.inspect=function(){let v="";const x=n.INSPECT_MAX_BYTES;return v=this.toString("hex",0,x).replace(/(.{2})/g,"$1 ").trim(),this.length>x&&(v+=" ... "),"<Buffer "+v+">"},i&&(h.prototype[i]=h.prototype.inspect),h.prototype.compare=function(v,x,R,N,U){if(ye(v,o)&&(v=h.from(v,v.offset,v.byteLength)),!h.isBuffer(v))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof v);if(x===void 0&&(x=0),R===void 0&&(R=v?v.length:0),N===void 0&&(N=0),U===void 0&&(U=this.length),x<0||R>v.length||N<0||U>this.length)throw new RangeError("out of range index");if(N>=U&&x>=R)return 0;if(N>=U)return-1;if(x>=R)return 1;if(x>>>=0,R>>>=0,N>>>=0,U>>>=0,this===v)return 0;let G=U-N,vt=R-x;const qt=Math.min(G,vt),Ht=this.slice(N,U),$t=v.slice(x,R);for(let It=0;It<qt;++It)if(Ht[It]!==$t[It]){G=Ht[It],vt=$t[It];break}return G<vt?-1:vt<G?1:0};function q(A,v,x,R,N){if(A.length===0)return-1;if(typeof x=="string"?(R=x,x=0):x>2147483647?x=2147483647:x<-2147483648&&(x=-2147483648),x=+x,Cr(x)&&(x=N?0:A.length-1),x<0&&(x=A.length+x),x>=A.length){if(N)return-1;x=A.length-1}else if(x<0)if(N)x=0;else return-1;if(typeof v=="string"&&(v=h.from(v,R)),h.isBuffer(v))return v.length===0?-1:z(A,v,x,R,N);if(typeof v=="number")return v=v&255,typeof o.prototype.indexOf=="function"?N?o.prototype.indexOf.call(A,v,x):o.prototype.lastIndexOf.call(A,v,x):z(A,[v],x,R,N);throw new TypeError("val must be string, number or Buffer")}function z(A,v,x,R,N){let U=1,G=A.length,vt=v.length;if(R!==void 0&&(R=String(R).toLowerCase(),R==="ucs2"||R==="ucs-2"||R==="utf16le"||R==="utf-16le")){if(A.length<2||v.length<2)return-1;U=2,G/=2,vt/=2,x/=2}function qt($t,It){return U===1?$t[It]:$t.readUInt16BE(It*U)}let Ht;if(N){let $t=-1;for(Ht=x;Ht<G;Ht++)if(qt(A,Ht)===qt(v,$t===-1?0:Ht-$t)){if($t===-1&&($t=Ht),Ht-$t+1===vt)return $t*U}else $t!==-1&&(Ht-=Ht-$t),$t=-1}else for(x+vt>G&&(x=G-vt),Ht=x;Ht>=0;Ht--){let $t=!0;for(let It=0;It<vt;It++)if(qt(A,Ht+It)!==qt(v,It)){$t=!1;break}if($t)return Ht}return-1}h.prototype.includes=function(v,x,R){return this.indexOf(v,x,R)!==-1},h.prototype.indexOf=function(v,x,R){return q(this,v,x,R,!0)},h.prototype.lastIndexOf=function(v,x,R){return q(this,v,x,R,!1)};function j(A,v,x,R){x=Number(x)||0;const N=A.length-x;R?(R=Number(R),R>N&&(R=N)):R=N;const U=v.length;R>U/2&&(R=U/2);let G;for(G=0;G<R;++G){const vt=parseInt(v.substr(G*2,2),16);if(Cr(vt))return G;A[x+G]=vt}return G}function Y(A,v,x,R){return Gi(In(v,A.length-x),A,x,R)}function ot(A,v,x,R){return Gi(je(v),A,x,R)}function nt(A,v,x,R){return Gi(ki(v),A,x,R)}function Z(A,v,x,R){return Gi(Si(v,A.length-x),A,x,R)}h.prototype.write=function(v,x,R,N){if(x===void 0)N="utf8",R=this.length,x=0;else if(R===void 0&&typeof x=="string")N=x,R=this.length,x=0;else if(isFinite(x))x=x>>>0,isFinite(R)?(R=R>>>0,N===void 0&&(N="utf8")):(N=R,R=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const U=this.length-x;if((R===void 0||R>U)&&(R=U),v.length>0&&(R<0||x<0)||x>this.length)throw new RangeError("Attempt to write outside buffer bounds");N||(N="utf8");let G=!1;for(;;)switch(N){case"hex":return j(this,v,x,R);case"utf8":case"utf-8":return Y(this,v,x,R);case"ascii":case"latin1":case"binary":return ot(this,v,x,R);case"base64":return nt(this,v,x,R);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Z(this,v,x,R);default:if(G)throw new TypeError("Unknown encoding: "+N);N=(""+N).toLowerCase(),G=!0}},h.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function X(A,v,x){return v===0&&x===A.length?t.fromByteArray(A):t.fromByteArray(A.slice(v,x))}function tt(A,v,x){x=Math.min(A.length,x);const R=[];let N=v;for(;N<x;){const U=A[N];let G=null,vt=U>239?4:U>223?3:U>191?2:1;if(N+vt<=x){let qt,Ht,$t,It;switch(vt){case 1:U<128&&(G=U);break;case 2:qt=A[N+1],(qt&192)===128&&(It=(U&31)<<6|qt&63,It>127&&(G=It));break;case 3:qt=A[N+1],Ht=A[N+2],(qt&192)===128&&(Ht&192)===128&&(It=(U&15)<<12|(qt&63)<<6|Ht&63,It>2047&&(It<55296||It>57343)&&(G=It));break;case 4:qt=A[N+1],Ht=A[N+2],$t=A[N+3],(qt&192)===128&&(Ht&192)===128&&($t&192)===128&&(It=(U&15)<<18|(qt&63)<<12|(Ht&63)<<6|$t&63,It>65535&&It<1114112&&(G=It))}}G===null?(G=65533,vt=1):G>65535&&(G-=65536,R.push(G>>>10&1023|55296),G=56320|G&1023),R.push(G),N+=vt}return at(R)}const et=4096;function at(A){const v=A.length;if(v<=et)return String.fromCharCode.apply(String,A);let x="",R=0;for(;R<v;)x+=String.fromCharCode.apply(String,A.slice(R,R+=et));return x}function ct(A,v,x){let R="";x=Math.min(A.length,x);for(let N=v;N<x;++N)R+=String.fromCharCode(A[N]&127);return R}function gt(A,v,x){let R="";x=Math.min(A.length,x);for(let N=v;N<x;++N)R+=String.fromCharCode(A[N]);return R}function Ot(A,v,x){const R=A.length;(!v||v<0)&&(v=0),(!x||x<0||x>R)&&(x=R);let N="";for(let U=v;U<x;++U)N+=Ei[A[U]];return N}function Ft(A,v,x){const R=A.slice(v,x);let N="";for(let U=0;U<R.length-1;U+=2)N+=String.fromCharCode(R[U]+R[U+1]*256);return N}h.prototype.slice=function(v,x){const R=this.length;v=~~v,x=x===void 0?R:~~x,v<0?(v+=R,v<0&&(v=0)):v>R&&(v=R),x<0?(x+=R,x<0&&(x=0)):x>R&&(x=R),x<v&&(x=v);const N=this.subarray(v,x);return Object.setPrototypeOf(N,h.prototype),N};function dt(A,v,x){if(A%1!==0||A<0)throw new RangeError("offset is not uint");if(A+v>x)throw new RangeError("Trying to access beyond buffer length")}h.prototype.readUintLE=h.prototype.readUIntLE=function(v,x,R){v=v>>>0,x=x>>>0,R||dt(v,x,this.length);let N=this[v],U=1,G=0;for(;++G<x&&(U*=256);)N+=this[v+G]*U;return N},h.prototype.readUintBE=h.prototype.readUIntBE=function(v,x,R){v=v>>>0,x=x>>>0,R||dt(v,x,this.length);let N=this[v+--x],U=1;for(;x>0&&(U*=256);)N+=this[v+--x]*U;return N},h.prototype.readUint8=h.prototype.readUInt8=function(v,x){return v=v>>>0,x||dt(v,1,this.length),this[v]},h.prototype.readUint16LE=h.prototype.readUInt16LE=function(v,x){return v=v>>>0,x||dt(v,2,this.length),this[v]|this[v+1]<<8},h.prototype.readUint16BE=h.prototype.readUInt16BE=function(v,x){return v=v>>>0,x||dt(v,2,this.length),this[v]<<8|this[v+1]},h.prototype.readUint32LE=h.prototype.readUInt32LE=function(v,x){return v=v>>>0,x||dt(v,4,this.length),(this[v]|this[v+1]<<8|this[v+2]<<16)+this[v+3]*16777216},h.prototype.readUint32BE=h.prototype.readUInt32BE=function(v,x){return v=v>>>0,x||dt(v,4,this.length),this[v]*16777216+(this[v+1]<<16|this[v+2]<<8|this[v+3])},h.prototype.readBigUInt64LE=Ee(function(v){v=v>>>0,ni(v,"offset");const x=this[v],R=this[v+7];(x===void 0||R===void 0)&&ke(v,this.length-8);const N=x+this[++v]*2**8+this[++v]*2**16+this[++v]*2**24,U=this[++v]+this[++v]*2**8+this[++v]*2**16+R*2**24;return BigInt(N)+(BigInt(U)<<BigInt(32))}),h.prototype.readBigUInt64BE=Ee(function(v){v=v>>>0,ni(v,"offset");const x=this[v],R=this[v+7];(x===void 0||R===void 0)&&ke(v,this.length-8);const N=x*2**24+this[++v]*2**16+this[++v]*2**8+this[++v],U=this[++v]*2**24+this[++v]*2**16+this[++v]*2**8+R;return(BigInt(N)<<BigInt(32))+BigInt(U)}),h.prototype.readIntLE=function(v,x,R){v=v>>>0,x=x>>>0,R||dt(v,x,this.length);let N=this[v],U=1,G=0;for(;++G<x&&(U*=256);)N+=this[v+G]*U;return U*=128,N>=U&&(N-=Math.pow(2,8*x)),N},h.prototype.readIntBE=function(v,x,R){v=v>>>0,x=x>>>0,R||dt(v,x,this.length);let N=x,U=1,G=this[v+--N];for(;N>0&&(U*=256);)G+=this[v+--N]*U;return U*=128,G>=U&&(G-=Math.pow(2,8*x)),G},h.prototype.readInt8=function(v,x){return v=v>>>0,x||dt(v,1,this.length),this[v]&128?(255-this[v]+1)*-1:this[v]},h.prototype.readInt16LE=function(v,x){v=v>>>0,x||dt(v,2,this.length);const R=this[v]|this[v+1]<<8;return R&32768?R|4294901760:R},h.prototype.readInt16BE=function(v,x){v=v>>>0,x||dt(v,2,this.length);const R=this[v+1]|this[v]<<8;return R&32768?R|4294901760:R},h.prototype.readInt32LE=function(v,x){return v=v>>>0,x||dt(v,4,this.length),this[v]|this[v+1]<<8|this[v+2]<<16|this[v+3]<<24},h.prototype.readInt32BE=function(v,x){return v=v>>>0,x||dt(v,4,this.length),this[v]<<24|this[v+1]<<16|this[v+2]<<8|this[v+3]},h.prototype.readBigInt64LE=Ee(function(v){v=v>>>0,ni(v,"offset");const x=this[v],R=this[v+7];(x===void 0||R===void 0)&&ke(v,this.length-8);const N=this[v+4]+this[v+5]*2**8+this[v+6]*2**16+(R<<24);return(BigInt(N)<<BigInt(32))+BigInt(x+this[++v]*2**8+this[++v]*2**16+this[++v]*2**24)}),h.prototype.readBigInt64BE=Ee(function(v){v=v>>>0,ni(v,"offset");const x=this[v],R=this[v+7];(x===void 0||R===void 0)&&ke(v,this.length-8);const N=(x<<24)+this[++v]*2**16+this[++v]*2**8+this[++v];return(BigInt(N)<<BigInt(32))+BigInt(this[++v]*2**24+this[++v]*2**16+this[++v]*2**8+R)}),h.prototype.readFloatLE=function(v,x){return v=v>>>0,x||dt(v,4,this.length),e.read(this,v,!0,23,4)},h.prototype.readFloatBE=function(v,x){return v=v>>>0,x||dt(v,4,this.length),e.read(this,v,!1,23,4)},h.prototype.readDoubleLE=function(v,x){return v=v>>>0,x||dt(v,8,this.length),e.read(this,v,!0,52,8)},h.prototype.readDoubleBE=function(v,x){return v=v>>>0,x||dt(v,8,this.length),e.read(this,v,!1,52,8)};function xt(A,v,x,R,N,U){if(!h.isBuffer(A))throw new TypeError('"buffer" argument must be a Buffer instance');if(v>N||v<U)throw new RangeError('"value" argument is out of bounds');if(x+R>A.length)throw new RangeError("Index out of range")}h.prototype.writeUintLE=h.prototype.writeUIntLE=function(v,x,R,N){if(v=+v,x=x>>>0,R=R>>>0,!N){const vt=Math.pow(2,8*R)-1;xt(this,v,x,R,vt,0)}let U=1,G=0;for(this[x]=v&255;++G<R&&(U*=256);)this[x+G]=v/U&255;return x+R},h.prototype.writeUintBE=h.prototype.writeUIntBE=function(v,x,R,N){if(v=+v,x=x>>>0,R=R>>>0,!N){const vt=Math.pow(2,8*R)-1;xt(this,v,x,R,vt,0)}let U=R-1,G=1;for(this[x+U]=v&255;--U>=0&&(G*=256);)this[x+U]=v/G&255;return x+R},h.prototype.writeUint8=h.prototype.writeUInt8=function(v,x,R){return v=+v,x=x>>>0,R||xt(this,v,x,1,255,0),this[x]=v&255,x+1},h.prototype.writeUint16LE=h.prototype.writeUInt16LE=function(v,x,R){return v=+v,x=x>>>0,R||xt(this,v,x,2,65535,0),this[x]=v&255,this[x+1]=v>>>8,x+2},h.prototype.writeUint16BE=h.prototype.writeUInt16BE=function(v,x,R){return v=+v,x=x>>>0,R||xt(this,v,x,2,65535,0),this[x]=v>>>8,this[x+1]=v&255,x+2},h.prototype.writeUint32LE=h.prototype.writeUInt32LE=function(v,x,R){return v=+v,x=x>>>0,R||xt(this,v,x,4,4294967295,0),this[x+3]=v>>>24,this[x+2]=v>>>16,this[x+1]=v>>>8,this[x]=v&255,x+4},h.prototype.writeUint32BE=h.prototype.writeUInt32BE=function(v,x,R){return v=+v,x=x>>>0,R||xt(this,v,x,4,4294967295,0),this[x]=v>>>24,this[x+1]=v>>>16,this[x+2]=v>>>8,this[x+3]=v&255,x+4};function Zt(A,v,x,R,N){ei(v,R,N,A,x,7);let U=Number(v&BigInt(4294967295));A[x++]=U,U=U>>8,A[x++]=U,U=U>>8,A[x++]=U,U=U>>8,A[x++]=U;let G=Number(v>>BigInt(32)&BigInt(4294967295));return A[x++]=G,G=G>>8,A[x++]=G,G=G>>8,A[x++]=G,G=G>>8,A[x++]=G,x}function Qe(A,v,x,R,N){ei(v,R,N,A,x,7);let U=Number(v&BigInt(4294967295));A[x+7]=U,U=U>>8,A[x+6]=U,U=U>>8,A[x+5]=U,U=U>>8,A[x+4]=U;let G=Number(v>>BigInt(32)&BigInt(4294967295));return A[x+3]=G,G=G>>8,A[x+2]=G,G=G>>8,A[x+1]=G,G=G>>8,A[x]=G,x+8}h.prototype.writeBigUInt64LE=Ee(function(v,x=0){return Zt(this,v,x,BigInt(0),BigInt("0xffffffffffffffff"))}),h.prototype.writeBigUInt64BE=Ee(function(v,x=0){return Qe(this,v,x,BigInt(0),BigInt("0xffffffffffffffff"))}),h.prototype.writeIntLE=function(v,x,R,N){if(v=+v,x=x>>>0,!N){const qt=Math.pow(2,8*R-1);xt(this,v,x,R,qt-1,-qt)}let U=0,G=1,vt=0;for(this[x]=v&255;++U<R&&(G*=256);)v<0&&vt===0&&this[x+U-1]!==0&&(vt=1),this[x+U]=(v/G>>0)-vt&255;return x+R},h.prototype.writeIntBE=function(v,x,R,N){if(v=+v,x=x>>>0,!N){const qt=Math.pow(2,8*R-1);xt(this,v,x,R,qt-1,-qt)}let U=R-1,G=1,vt=0;for(this[x+U]=v&255;--U>=0&&(G*=256);)v<0&&vt===0&&this[x+U+1]!==0&&(vt=1),this[x+U]=(v/G>>0)-vt&255;return x+R},h.prototype.writeInt8=function(v,x,R){return v=+v,x=x>>>0,R||xt(this,v,x,1,127,-128),v<0&&(v=255+v+1),this[x]=v&255,x+1},h.prototype.writeInt16LE=function(v,x,R){return v=+v,x=x>>>0,R||xt(this,v,x,2,32767,-32768),this[x]=v&255,this[x+1]=v>>>8,x+2},h.prototype.writeInt16BE=function(v,x,R){return v=+v,x=x>>>0,R||xt(this,v,x,2,32767,-32768),this[x]=v>>>8,this[x+1]=v&255,x+2},h.prototype.writeInt32LE=function(v,x,R){return v=+v,x=x>>>0,R||xt(this,v,x,4,2147483647,-2147483648),this[x]=v&255,this[x+1]=v>>>8,this[x+2]=v>>>16,this[x+3]=v>>>24,x+4},h.prototype.writeInt32BE=function(v,x,R){return v=+v,x=x>>>0,R||xt(this,v,x,4,2147483647,-2147483648),v<0&&(v=4294967295+v+1),this[x]=v>>>24,this[x+1]=v>>>16,this[x+2]=v>>>8,this[x+3]=v&255,x+4},h.prototype.writeBigInt64LE=Ee(function(v,x=0){return Zt(this,v,x,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),h.prototype.writeBigInt64BE=Ee(function(v,x=0){return Qe(this,v,x,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Le(A,v,x,R,N,U){if(x+R>A.length)throw new RangeError("Index out of range");if(x<0)throw new RangeError("Index out of range")}function _e(A,v,x,R,N){return v=+v,x=x>>>0,N||Le(A,v,x,4),e.write(A,v,x,R,23,4),x+4}h.prototype.writeFloatLE=function(v,x,R){return _e(this,v,x,!0,R)},h.prototype.writeFloatBE=function(v,x,R){return _e(this,v,x,!1,R)};function le(A,v,x,R,N){return v=+v,x=x>>>0,N||Le(A,v,x,8),e.write(A,v,x,R,52,8),x+8}h.prototype.writeDoubleLE=function(v,x,R){return le(this,v,x,!0,R)},h.prototype.writeDoubleBE=function(v,x,R){return le(this,v,x,!1,R)},h.prototype.copy=function(v,x,R,N){if(!h.isBuffer(v))throw new TypeError("argument should be a Buffer");if(R||(R=0),!N&&N!==0&&(N=this.length),x>=v.length&&(x=v.length),x||(x=0),N>0&&N<R&&(N=R),N===R||v.length===0||this.length===0)return 0;if(x<0)throw new RangeError("targetStart out of bounds");if(R<0||R>=this.length)throw new RangeError("Index out of range");if(N<0)throw new RangeError("sourceEnd out of bounds");N>this.length&&(N=this.length),v.length-x<N-R&&(N=v.length-x+R);const U=N-R;return this===v&&typeof o.prototype.copyWithin=="function"?this.copyWithin(x,R,N):o.prototype.set.call(v,this.subarray(R,N),x),U},h.prototype.fill=function(v,x,R,N){if(typeof v=="string"){if(typeof x=="string"?(N=x,x=0,R=this.length):typeof R=="string"&&(N=R,R=this.length),N!==void 0&&typeof N!="string")throw new TypeError("encoding must be a string");if(typeof N=="string"&&!h.isEncoding(N))throw new TypeError("Unknown encoding: "+N);if(v.length===1){const G=v.charCodeAt(0);(N==="utf8"&&G<128||N==="latin1")&&(v=G)}}else typeof v=="number"?v=v&255:typeof v=="boolean"&&(v=Number(v));if(x<0||this.length<x||this.length<R)throw new RangeError("Out of range index");if(R<=x)return this;x=x>>>0,R=R===void 0?this.length:R>>>0,v||(v=0);let U;if(typeof v=="number")for(U=x;U<R;++U)this[U]=v;else{const G=h.isBuffer(v)?v:h.from(v,N),vt=G.length;if(vt===0)throw new TypeError('The value "'+v+'" is invalid for argument "value"');for(U=0;U<R-x;++U)this[U+x]=G[U%vt]}return this};const se={};function Pe(A,v,x){se[A]=class extends x{constructor(){super(),Object.defineProperty(this,"message",{value:v.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${A}]`,this.stack,delete this.name}get code(){return A}set code(N){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:N,writable:!0})}toString(){return`${this.name} [${A}]: ${this.message}`}}}Pe("ERR_BUFFER_OUT_OF_BOUNDS",function(A){return A?`${A} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),Pe("ERR_INVALID_ARG_TYPE",function(A,v){return`The "${A}" argument must be of type number. Received type ${typeof v}`},TypeError),Pe("ERR_OUT_OF_RANGE",function(A,v,x){let R=`The value of "${A}" is out of range.`,N=x;return Number.isInteger(x)&&Math.abs(x)>2**32?N=xn(String(x)):typeof x=="bigint"&&(N=String(x),(x>BigInt(2)**BigInt(32)||x<-(BigInt(2)**BigInt(32)))&&(N=xn(N)),N+="n"),R+=` It must be ${v}. Received ${N}`,R},RangeError);function xn(A){let v="",x=A.length;const R=A[0]==="-"?1:0;for(;x>=R+4;x-=3)v=`_${A.slice(x-3,x)}${v}`;return`${A.slice(0,x)}${v}`}function ze(A,v,x){ni(v,"offset"),(A[v]===void 0||A[v+x]===void 0)&&ke(v,A.length-(x+1))}function ei(A,v,x,R,N,U){if(A>x||A<v){const G=typeof v=="bigint"?"n":"";let vt;throw v===0||v===BigInt(0)?vt=`>= 0${G} and < 2${G} ** ${(U+1)*8}${G}`:vt=`>= -(2${G} ** ${(U+1)*8-1}${G}) and < 2 ** ${(U+1)*8-1}${G}`,new se.ERR_OUT_OF_RANGE("value",vt,A)}ze(R,N,U)}function ni(A,v){if(typeof A!="number")throw new se.ERR_INVALID_ARG_TYPE(v,"number",A)}function ke(A,v,x){throw Math.floor(A)!==A?(ni(A,x),new se.ERR_OUT_OF_RANGE("offset","an integer",A)):v<0?new se.ERR_BUFFER_OUT_OF_BOUNDS:new se.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${v}`,A)}const Ps=/[^+/0-9A-Za-z-_]/g;function qa(A){if(A=A.split("=")[0],A=A.trim().replace(Ps,""),A.length<2)return"";for(;A.length%4!==0;)A=A+"=";return A}function In(A,v){v=v||1/0;let x;const R=A.length;let N=null;const U=[];for(let G=0;G<R;++G){if(x=A.charCodeAt(G),x>55295&&x<57344){if(!N){if(x>56319){(v-=3)>-1&&U.push(239,191,189);continue}else if(G+1===R){(v-=3)>-1&&U.push(239,191,189);continue}N=x;continue}if(x<56320){(v-=3)>-1&&U.push(239,191,189),N=x;continue}x=(N-55296<<10|x-56320)+65536}else N&&(v-=3)>-1&&U.push(239,191,189);if(N=null,x<128){if((v-=1)<0)break;U.push(x)}else if(x<2048){if((v-=2)<0)break;U.push(x>>6|192,x&63|128)}else if(x<65536){if((v-=3)<0)break;U.push(x>>12|224,x>>6&63|128,x&63|128)}else if(x<1114112){if((v-=4)<0)break;U.push(x>>18|240,x>>12&63|128,x>>6&63|128,x&63|128)}else throw new Error("Invalid code point")}return U}function je(A){const v=[];for(let x=0;x<A.length;++x)v.push(A.charCodeAt(x)&255);return v}function Si(A,v){let x,R,N;const U=[];for(let G=0;G<A.length&&!((v-=2)<0);++G)x=A.charCodeAt(G),R=x>>8,N=x%256,U.push(N),U.push(R);return U}function ki(A){return t.toByteArray(qa(A))}function Gi(A,v,x,R){let N;for(N=0;N<R&&!(N+x>=v.length||N>=A.length);++N)v[N+x]=A[N];return N}function ye(A,v){return A instanceof v||A!=null&&A.constructor!=null&&A.constructor.name!=null&&A.constructor.name===v.name}function Cr(A){return A!==A}const Ei=function(){const A="0123456789abcdef",v=new Array(256);for(let x=0;x<16;++x){const R=x*16;for(let N=0;N<16;++N)v[R+N]=A[x]+A[N]}return v}();function Ee(A){return typeof BigInt>"u"?Mr:A}function Mr(){throw new Error("BigInt not supported")}})(_S);const Xg=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,e)=>e(t,0),Ko=di.WebSocket||di.MozWebSocket,tp=!0,CS="arraybuffer",ep=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class MS extends Ug{constructor(t){super(t),this.supportsBinary=!t.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const t=this.uri(),e=this.opts.protocols,i=ep?{}:jg(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(i.headers=this.opts.extraHeaders);try{this.ws=tp&&!ep?e?new Ko(t,e):new Ko(t):new Ko(t,e,i)}catch(r){return this.emitReserved("error",r)}this.ws.binaryType=this.socket.binaryType||CS,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let e=0;e<t.length;e++){const i=t[e],r=e===t.length-1;Fg(i,this.supportsBinary,o=>{const a={};try{tp&&this.ws.send(o)}catch{}r&&Xg(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.close(),this.ws=null)}uri(){let t=this.query||{};const e=this.opts.secure?"wss":"ws";let i="";this.opts.port&&(e==="wss"&&Number(this.opts.port)!==443||e==="ws"&&Number(this.opts.port)!==80)&&(i=":"+this.opts.port),this.opts.timestampRequests&&(t[this.opts.timestampParam]=qg()),this.supportsBinary||(t.b64=1);const r=$g(t),o=this.opts.hostname.indexOf(":")!==-1;return e+"://"+(o?"["+this.opts.hostname+"]":this.opts.hostname)+i+this.opts.path+(r.length?"?"+r:"")}check(){return!!Ko}}const AS={websocket:MS,polling:mS},LS=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,PS=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Ac(n){const t=n,e=n.indexOf("["),i=n.indexOf("]");e!=-1&&i!=-1&&(n=n.substring(0,e)+n.substring(e,i).replace(/:/g,";")+n.substring(i,n.length));let r=LS.exec(n||""),o={},a=14;for(;a--;)o[PS[a]]=r[a]||"";return e!=-1&&i!=-1&&(o.source=t,o.host=o.host.substring(1,o.host.length-1).replace(/;/g,":"),o.authority=o.authority.replace("[","").replace("]","").replace(/;/g,":"),o.ipv6uri=!0),o.pathNames=OS(o,o.path),o.queryKey=RS(o,o.query),o}function OS(n,t){const e=/\/{2,9}/g,i=t.replace(e,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&i.splice(0,1),t.slice(-1)=="/"&&i.splice(i.length-1,1),i}function RS(n,t){const e={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(i,r,o){r&&(e[r]=o)}),e}let Jg=class _r extends ae{constructor(t,e={}){super(),t&&typeof t=="object"&&(e=t,t=null),t?(t=Ac(t),e.hostname=t.host,e.secure=t.protocol==="https"||t.protocol==="wss",e.port=t.port,t.query&&(e.query=t.query)):e.host&&(e.hostname=Ac(e.host).host),Ta(this,e),this.secure=e.secure!=null?e.secure:typeof location<"u"&&location.protocol==="https:",e.hostname&&!e.port&&(e.port=this.secure?"443":"80"),this.hostname=e.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=e.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=e.transports||["polling","websocket"],this.readyState="",this.writeBuffer=[],this.prevBufferLen=0,this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!0},e),this.opts.path=this.opts.path.replace(/\/$/,"")+"/",typeof this.opts.query=="string"&&(this.opts.query=fS(this.opts.query)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingTimeoutTimer=null,typeof addEventListener=="function"&&(this.opts.closeOnBeforeunload&&(this.beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this.beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this.offlineEventListener=()=>{this.onClose("transport close",{description:"network connection lost"})},addEventListener("offline",this.offlineEventListener,!1))),this.open()}createTransport(t){const e=Object.assign({},this.opts.query);e.EIO=zg,e.transport=t,this.id&&(e.sid=this.id);const i=Object.assign({},this.opts.transportOptions[t],this.opts,{query:e,socket:this,hostname:this.hostname,secure:this.secure,port:this.port});return new AS[t](i)}open(){let t;if(this.opts.rememberUpgrade&&_r.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1)t="websocket";else if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}else t=this.transports[0];this.readyState="opening";try{t=this.createTransport(t)}catch{this.transports.shift(),this.open();return}t.open(),this.setTransport(t)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",e=>this.onClose("transport close",e))}probe(t){let e=this.createTransport(t),i=!1;_r.priorWebsocketSuccess=!1;const r=()=>{i||(e.send([{type:"ping",data:"probe"}]),e.once("packet",_=>{if(!i)if(_.type==="pong"&&_.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",e),!e)return;_r.priorWebsocketSuccess=e.name==="websocket",this.transport.pause(()=>{i||this.readyState!=="closed"&&(h(),this.setTransport(e),e.send([{type:"upgrade"}]),this.emitReserved("upgrade",e),e=null,this.upgrading=!1,this.flush())})}else{const p=new Error("probe error");p.transport=e.name,this.emitReserved("upgradeError",p)}}))};function o(){i||(i=!0,h(),e.close(),e=null)}const a=_=>{const p=new Error("probe error: "+_);p.transport=e.name,o(),this.emitReserved("upgradeError",p)};function c(){a("transport closed")}function u(){a("socket closed")}function f(_){e&&_.name!==e.name&&o()}const h=()=>{e.removeListener("open",r),e.removeListener("error",a),e.removeListener("close",c),this.off("close",u),this.off("upgrading",f)};e.once("open",r),e.once("error",a),e.once("close",c),this.once("close",u),this.once("upgrading",f),e.open()}onOpen(){if(this.readyState="open",_r.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush(),this.readyState==="open"&&this.opts.upgrade&&this.transport.pause){let t=0;const e=this.upgrades.length;for(;t<e;t++)this.probe(this.upgrades[t])}}onPacket(t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this.resetPingTimeout(),this.sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong");break;case"error":const e=new Error("server error");e.code=t.data,this.onError(e);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data);break}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this.upgrades=this.filterUpgrades(t.upgrades),this.pingInterval=t.pingInterval,this.pingTimeout=t.pingTimeout,this.maxPayload=t.maxPayload,this.onOpen(),this.readyState!=="closed"&&this.resetPingTimeout()}resetPingTimeout(){this.clearTimeoutFn(this.pingTimeoutTimer),this.pingTimeoutTimer=this.setTimeoutFn(()=>{this.onClose("ping timeout")},this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}onDrain(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this.getWritablePackets();this.transport.send(t),this.prevBufferLen=t.length,this.emitReserved("flush")}}getWritablePackets(){if(!(this.maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let e=1;for(let i=0;i<this.writeBuffer.length;i++){const r=this.writeBuffer[i].data;if(r&&(e+=lS(r)),i>0&&e>this.maxPayload)return this.writeBuffer.slice(0,i);e+=2}return this.writeBuffer}write(t,e,i){return this.sendPacket("message",t,e,i),this}send(t,e,i){return this.sendPacket("message",t,e,i),this}sendPacket(t,e,i,r){if(typeof e=="function"&&(r=e,e=void 0),typeof i=="function"&&(r=i,i=null),this.readyState==="closing"||this.readyState==="closed")return;i=i||{},i.compress=i.compress!==!1;const o={type:t,data:e,options:i};this.emitReserved("packetCreate",o),this.writeBuffer.push(o),r&&this.once("flush",r),this.flush()}close(){const t=()=>{this.onClose("forced close"),this.transport.close()},e=()=>{this.off("upgrade",e),this.off("upgradeError",e),t()},i=()=>{this.once("upgrade",e),this.once("upgradeError",e)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?i():t()}):this.upgrading?i():t()),this}onError(t){_r.priorWebsocketSuccess=!1,this.emitReserved("error",t),this.onClose("transport error",t)}onClose(t,e){(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")&&(this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),typeof removeEventListener=="function"&&(removeEventListener("beforeunload",this.beforeunloadEventListener,!1),removeEventListener("offline",this.offlineEventListener,!1)),this.readyState="closed",this.id=null,this.emitReserved("close",t,e),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(t){const e=[];let i=0;const r=t.length;for(;i<r;i++)~this.transports.indexOf(t[i])&&e.push(t[i]);return e}};Jg.protocol=zg;function IS(n,t="",e){let i=n;e=e||typeof location<"u"&&location,n==null&&(n=e.protocol+"//"+e.host),typeof n=="string"&&(n.charAt(0)==="/"&&(n.charAt(1)==="/"?n=e.protocol+n:n=e.host+n),/^(https?|wss?):\/\//.test(n)||(typeof e<"u"?n=e.protocol+"//"+n:n="https://"+n),i=Ac(n)),i.port||(/^(http|ws)$/.test(i.protocol)?i.port="80":/^(http|ws)s$/.test(i.protocol)&&(i.port="443")),i.path=i.path||"/";const o=i.host.indexOf(":")!==-1?"["+i.host+"]":i.host;return i.id=i.protocol+"://"+o+":"+i.port+t,i.href=i.protocol+"://"+o+(e&&e.port===i.port?"":":"+i.port),i}const TS=typeof ArrayBuffer=="function",DS=n=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(n):n.buffer instanceof ArrayBuffer,Zg=Object.prototype.toString,BS=typeof Blob=="function"||typeof Blob<"u"&&Zg.call(Blob)==="[object BlobConstructor]",FS=typeof File=="function"||typeof File<"u"&&Zg.call(File)==="[object FileConstructor]";function tu(n){return TS&&(n instanceof ArrayBuffer||DS(n))||BS&&n instanceof Blob||FS&&n instanceof File}function da(n,t){if(!n||typeof n!="object")return!1;if(Array.isArray(n)){for(let e=0,i=n.length;e<i;e++)if(da(n[e]))return!0;return!1}if(tu(n))return!0;if(n.toJSON&&typeof n.toJSON=="function"&&arguments.length===1)return da(n.toJSON(),!0);for(const e in n)if(Object.prototype.hasOwnProperty.call(n,e)&&da(n[e]))return!0;return!1}function NS(n){const t=[],e=n.data,i=n;return i.data=Lc(e,t),i.attachments=t.length,{packet:i,buffers:t}}function Lc(n,t){if(!n)return n;if(tu(n)){const e={_placeholder:!0,num:t.length};return t.push(n),e}else if(Array.isArray(n)){const e=new Array(n.length);for(let i=0;i<n.length;i++)e[i]=Lc(n[i],t);return e}else if(typeof n=="object"&&!(n instanceof Date)){const e={};for(const i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=Lc(n[i],t));return e}return n}function HS(n,t){return n.data=Pc(n.data,t),n.attachments=void 0,n}function Pc(n,t){if(!n)return n;if(n&&n._placeholder===!0){if(typeof n.num=="number"&&n.num>=0&&n.num<t.length)return t[n.num];throw new Error("illegal attachments")}else if(Array.isArray(n))for(let e=0;e<n.length;e++)n[e]=Pc(n[e],t);else if(typeof n=="object")for(const e in n)Object.prototype.hasOwnProperty.call(n,e)&&(n[e]=Pc(n[e],t));return n}const WS=5;var Pt;(function(n){n[n.CONNECT=0]="CONNECT",n[n.DISCONNECT=1]="DISCONNECT",n[n.EVENT=2]="EVENT",n[n.ACK=3]="ACK",n[n.CONNECT_ERROR=4]="CONNECT_ERROR",n[n.BINARY_EVENT=5]="BINARY_EVENT",n[n.BINARY_ACK=6]="BINARY_ACK"})(Pt||(Pt={}));class zS{constructor(t){this.replacer=t}encode(t){return(t.type===Pt.EVENT||t.type===Pt.ACK)&&da(t)?(t.type=t.type===Pt.EVENT?Pt.BINARY_EVENT:Pt.BINARY_ACK,this.encodeAsBinary(t)):[this.encodeAsString(t)]}encodeAsString(t){let e=""+t.type;return(t.type===Pt.BINARY_EVENT||t.type===Pt.BINARY_ACK)&&(e+=t.attachments+"-"),t.nsp&&t.nsp!=="/"&&(e+=t.nsp+","),t.id!=null&&(e+=t.id),t.data!=null&&(e+=JSON.stringify(t.data,this.replacer)),e}encodeAsBinary(t){const e=NS(t),i=this.encodeAsString(e.packet),r=e.buffers;return r.unshift(i),r}}class eu extends ae{constructor(t){super(),this.reviver=t}add(t){let e;if(typeof t=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");e=this.decodeString(t),e.type===Pt.BINARY_EVENT||e.type===Pt.BINARY_ACK?(this.reconstructor=new jS(e),e.attachments===0&&super.emitReserved("decoded",e)):super.emitReserved("decoded",e)}else if(tu(t)||t.base64)if(this.reconstructor)e=this.reconstructor.takeBinaryData(t),e&&(this.reconstructor=null,super.emitReserved("decoded",e));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+t)}decodeString(t){let e=0;const i={type:Number(t.charAt(0))};if(Pt[i.type]===void 0)throw new Error("unknown packet type "+i.type);if(i.type===Pt.BINARY_EVENT||i.type===Pt.BINARY_ACK){const o=e+1;for(;t.charAt(++e)!=="-"&&e!=t.length;);const a=t.substring(o,e);if(a!=Number(a)||t.charAt(e)!=="-")throw new Error("Illegal attachments");i.attachments=Number(a)}if(t.charAt(e+1)==="/"){const o=e+1;for(;++e&&!(t.charAt(e)===","||e===t.length););i.nsp=t.substring(o,e)}else i.nsp="/";const r=t.charAt(e+1);if(r!==""&&Number(r)==r){const o=e+1;for(;++e;){const a=t.charAt(e);if(a==null||Number(a)!=a){--e;break}if(e===t.length)break}i.id=Number(t.substring(o,e+1))}if(t.charAt(++e)){const o=this.tryParse(t.substr(e));if(eu.isPayloadValid(i.type,o))i.data=o;else throw new Error("invalid payload")}return i}tryParse(t){try{return JSON.parse(t,this.reviver)}catch{return!1}}static isPayloadValid(t,e){switch(t){case Pt.CONNECT:return typeof e=="object";case Pt.DISCONNECT:return e===void 0;case Pt.CONNECT_ERROR:return typeof e=="string"||typeof e=="object";case Pt.EVENT:case Pt.BINARY_EVENT:return Array.isArray(e)&&e.length>0;case Pt.ACK:case Pt.BINARY_ACK:return Array.isArray(e)}}destroy(){this.reconstructor&&this.reconstructor.finishedReconstruction()}}class jS{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const e=HS(this.reconPack,this.buffers);return this.finishedReconstruction(),e}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const US=Object.freeze(Object.defineProperty({__proto__:null,Decoder:eu,Encoder:zS,get PacketType(){return Pt},protocol:WS},Symbol.toStringTag,{value:"Module"}));function mn(n,t,e){return n.on(t,e),function(){n.off(t,e)}}const VS=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class Qg extends ae{constructor(t,e,i){super(),this.connected=!1,this.receiveBuffer=[],this.sendBuffer=[],this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=e,i&&i.auth&&(this.auth=i.auth),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[mn(t,"open",this.onopen.bind(this)),mn(t,"packet",this.onpacket.bind(this)),mn(t,"error",this.onerror.bind(this)),mn(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...e){if(VS.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');e.unshift(t);const i={type:Pt.EVENT,data:e};if(i.options={},i.options.compress=this.flags.compress!==!1,typeof e[e.length-1]=="function"){const a=this.ids++,c=e.pop();this._registerAckCallback(a,c),i.id=a}const r=this.io.engine&&this.io.engine.transport&&this.io.engine.transport.writable;return this.flags.volatile&&(!r||!this.connected)||(this.connected?(this.notifyOutgoingListeners(i),this.packet(i)):this.sendBuffer.push(i)),this.flags={},this}_registerAckCallback(t,e){const i=this.flags.timeout;if(i===void 0){this.acks[t]=e;return}const r=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let o=0;o<this.sendBuffer.length;o++)this.sendBuffer[o].id===t&&this.sendBuffer.splice(o,1);e.call(this,new Error("operation has timed out"))},i);this.acks[t]=(...o)=>{this.io.clearTimeoutFn(r),e.apply(this,[null,...o])}}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this.packet({type:Pt.CONNECT,data:t})}):this.packet({type:Pt.CONNECT,data:this.auth})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,e){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,e)}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case Pt.CONNECT:if(t.data&&t.data.sid){const r=t.data.sid;this.onconnect(r)}else this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case Pt.EVENT:case Pt.BINARY_EVENT:this.onevent(t);break;case Pt.ACK:case Pt.BINARY_ACK:this.onack(t);break;case Pt.DISCONNECT:this.ondisconnect();break;case Pt.CONNECT_ERROR:this.destroy();const i=new Error(t.data.message);i.data=t.data.data,this.emitReserved("connect_error",i);break}}onevent(t){const e=t.data||[];t.id!=null&&e.push(this.ack(t.id)),this.connected?this.emitEvent(e):this.receiveBuffer.push(Object.freeze(e))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const e=this._anyListeners.slice();for(const i of e)i.apply(this,t)}super.emit.apply(this,t)}ack(t){const e=this;let i=!1;return function(...r){i||(i=!0,e.packet({type:Pt.ACK,id:t,data:r}))}}onack(t){const e=this.acks[t.id];typeof e=="function"&&(e.apply(this,t.data),delete this.acks[t.id])}onconnect(t){this.id=t,this.connected=!0,this.emitBuffered(),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:Pt.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const e=this._anyListeners;for(let i=0;i<e.length;i++)if(t===e[i])return e.splice(i,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(t),this}prependAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(t),this}offAnyOutgoing(t){if(!this._anyOutgoingListeners)return this;if(t){const e=this._anyOutgoingListeners;for(let i=0;i<e.length;i++)if(t===e[i])return e.splice(i,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(t){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const e=this._anyOutgoingListeners.slice();for(const i of e)i.apply(this,t.data)}}}function Er(n){n=n||{},this.ms=n.min||100,this.max=n.max||1e4,this.factor=n.factor||2,this.jitter=n.jitter>0&&n.jitter<=1?n.jitter:0,this.attempts=0}Er.prototype.duration=function(){var n=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),e=Math.floor(t*this.jitter*n);n=(Math.floor(t*10)&1)==0?n-e:n+e}return Math.min(n,this.max)|0};Er.prototype.reset=function(){this.attempts=0};Er.prototype.setMin=function(n){this.ms=n};Er.prototype.setMax=function(n){this.max=n};Er.prototype.setJitter=function(n){this.jitter=n};class Oc extends ae{constructor(t,e){var i;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(e=t,t=void 0),e=e||{},e.path=e.path||"/socket.io",this.opts=e,Ta(this,e),this.reconnection(e.reconnection!==!1),this.reconnectionAttempts(e.reconnectionAttempts||1/0),this.reconnectionDelay(e.reconnectionDelay||1e3),this.reconnectionDelayMax(e.reconnectionDelayMax||5e3),this.randomizationFactor((i=e.randomizationFactor)!==null&&i!==void 0?i:.5),this.backoff=new Er({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(e.timeout==null?2e4:e.timeout),this._readyState="closed",this.uri=t;const r=e.parser||US;this.encoder=new r.Encoder,this.decoder=new r.Decoder,this._autoConnect=e.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var e;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(e=this.backoff)===null||e===void 0||e.setMin(t),this)}randomizationFactor(t){var e;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(e=this.backoff)===null||e===void 0||e.setJitter(t),this)}reconnectionDelayMax(t){var e;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(e=this.backoff)===null||e===void 0||e.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new Jg(this.uri,this.opts);const e=this.engine,i=this;this._readyState="opening",this.skipReconnect=!1;const r=mn(e,"open",function(){i.onopen(),t&&t()}),o=mn(e,"error",a=>{i.cleanup(),i._readyState="closed",this.emitReserved("error",a),t?t(a):i.maybeReconnectOnOpen()});if(this._timeout!==!1){const a=this._timeout;a===0&&r();const c=this.setTimeoutFn(()=>{r(),e.close(),e.emit("error",new Error("timeout"))},a);this.opts.autoUnref&&c.unref(),this.subs.push(function(){clearTimeout(c)})}return this.subs.push(r),this.subs.push(o),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(mn(t,"ping",this.onping.bind(this)),mn(t,"data",this.ondata.bind(this)),mn(t,"error",this.onerror.bind(this)),mn(t,"close",this.onclose.bind(this)),mn(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(e){this.onclose("parse error",e)}}ondecoded(t){Xg(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,e){let i=this.nsps[t];return i||(i=new Qg(this,t,e),this.nsps[t]=i),i}_destroy(t){const e=Object.keys(this.nsps);for(const i of e)if(this.nsps[i].active)return;this._close()}_packet(t){const e=this.encoder.encode(t);for(let i=0;i<e.length;i++)this.engine.write(e[i],t.options)}cleanup(){this.subs.forEach(t=>t()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(t,e){this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,e),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const e=this.backoff.duration();this._reconnecting=!0;const i=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(r=>{r?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",r)):t.onreconnect()}))},e);this.opts.autoUnref&&i.unref(),this.subs.push(function(){clearTimeout(i)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const $r={};function pa(n,t){typeof n=="object"&&(t=n,n=void 0),t=t||{};const e=IS(n,t.path||"/socket.io"),i=e.source,r=e.id,o=e.path,a=$r[r]&&o in $r[r].nsps,c=t.forceNew||t["force new connection"]||t.multiplex===!1||a;let u;return c?u=new Oc(i,t):($r[r]||($r[r]=new Oc(i,t)),u=$r[r]),e.query&&!t.query&&(t.query=e.queryKey),u.socket(e.path,t)}Object.assign(pa,{Manager:Oc,Socket:Qg,io:pa,connect:pa});class qS extends Nw{constructor(){var t,e;super(...arguments),this.config={history:{limit:100}},this.instances={io:pa(((t=window.DEV)==null?void 0:t.io.origin)??location.origin,{path:((e=window.DEV)==null?void 0:e.io.path)??`${location.pathname.split("/").slice(0,-3).join("/")}/socket.io/`})},this.services={io:{exec:(i,r)=>new Promise(o=>this.instances.io.emit(i,r,o)),subscribe:(i,r)=>this.instances.io.on(i,r)}},this.events=new Ms}on(t,e){return this.events.on(t,e),this}once(t,e){return this.events.once(t,e),this}emit(t,...e){return this.events.emit(t,...e),this}assignConfig(t){return Object.assign(this,{config:t})}}const pt=new qS,$S=oe.compile(Uw);class Ba extends te{constructor(t){var e;super($S({})),this.options=t,this.instance=new Gw({},((e=this.options)==null?void 0:e.depth)??3,{theme:"custom",afterCopyHandler:()=>pt.shared.popups.push("Copied!")}),this.provide({})}provide(t){return this.instance.json=t,this.clear().append(this.instance.render())}static build(t){return new Ba(t)}}const YS=oe.compile(jw);class as extends te{constructor(t){super(),this.data=t,this.viewer=Ba.build({depth:3}).hide(),this.refresh()}provide(t){return Object.assign(this,{data:t})}refresh(){return this.replace(YS(this.data)).append(this.viewer),this.viewer.provide(Ze.pick(this.data,["id","type","transports","schema"])),yi.build(this.element.querySelector("button.activity")).handle(()=>pt.services.io.exec("expectations:update",{id:this.data.id,set:{isEnabled:!this.data.isEnabled}})),this.element.querySelector("div.meta").addEventListener("click",t=>t.composedPath().some(e=>{var i;return(i=e==null?void 0:e.classList)==null?void 0:i.contains("meta")})&&t.target.nodeName!=="BUTTON"?this.viewer.isHidden?this.viewer.show():this.viewer.hide():null),this}match(t){var e,i;return[this.data.group,this.data.name,(e=this.data.schema.forward)==null?void 0:e.baseUrl,(i=this.data.schema.forward)==null?void 0:i.url,this.data.meta.tags.map(({value:r})=>r).join()].some(r=>r==null?void 0:r.includes(t))}static build(t){return new as(t)}}const GS=`
334
- <div class="container history" id="{{id}}">
335
- <div class="meta">
336
- <div class="segment">
337
- <span class="time">{{#toLocaleTime timestamp}}{{/toLocaleTime}}</span>
338
-
339
- {{#if snapshot.error}}
340
- <span class="error">
341
- {{#compare snapshot.error.code.length 'lte' 24}}{{snapshot.error.code}}{{/compare}}
342
- {{#compare snapshot.error.code.length 'gt' 24}}Error{{/compare}}
343
- </span>
344
- {{/if}}
345
-
346
- {{#compare status 'eq' 'pending'}}
347
- <span class="pending"><i class="fas fa-hourglass-start"></i></span>
348
- {{/compare}}
349
-
350
- {{#compare status 'eq' 'completed'}}
351
- <span class="status
352
- {{#compare snapshot.transport 'eq' 'http'}}
353
- {{#compare snapshot.outgoing.status 'lt' 400}}green{{/compare}}
354
- {{#compare snapshot.outgoing.status 'gte' 400}}red{{/compare}}
355
- {{/compare}}
356
- "><b>{{snapshot.outgoing.status}}</b> {{toSeconds duration}}s</span>
357
- {{/compare}}
358
-
359
- <span class="method" style="color: {{toColor snapshot.incoming.method}};">{{snapshot.incoming.method}}</span>
360
- <span class="path">{{> truncated value=snapshot.incoming.path length=45}}</span>
361
-
362
- {{#if snapshot.seed}}<span class="seed">{{snapshot.seed}}</span>{{/if}}
363
- </div>
364
-
365
- <span class="arrow"><i class="fas fa-chevron-right"></i></span>
366
-
367
- {{#if expectation}}
368
- {{>expectationMeta expectation format='short' isCached=snapshot.forwarded.isCached}}
369
- {{else}}
370
- <div class="segment"><span class="handled-with red">Nowhere</span></div>
371
- {{/if}}
372
- </div>
373
-
374
- {{!-- {{#if snapshot.messages}}
375
- <p class="messages-title">
376
- <span class="count">Total messages <b>{{snapshot.messages.length}}</b></span>
377
- </p>
378
-
379
- <div class="messages">
380
- {{#each snapshot.messages}}
381
- <div id="{{id}}" class="message {{location}}">
382
- <p class="header">
383
- {{#compare location 'eq' 'incoming'}}<i class="fas fa-angle-right"></i>{{/compare}}
384
- {{#compare location 'eq' 'outgoing'}}<i class="fas fa-angle-left"></i>{{/compare}}
385
- <span class="time">{{#toLocaleTime timestamp}}{{/toLocaleTime}}</span>
386
- </p>
387
-
388
- <pre class="panel hidden"></pre>
389
- </div>
390
- {{/each}}
391
- </div>
392
- {{/if}} --}}
393
- </div>
394
- `,KS=oe.compile(GS);class ls extends te{constructor(t){super(),this.data=t,this.viewer=Ba.build({depth:2}).hide(),this.refresh()}provide(t){return Object.assign(this,{data:t})}refresh(){var t,e;return this.replace(KS(this.data)).append(this.viewer),this.viewer.provide({event:this.data.snapshot.event,transport:this.data.snapshot.transport,...Object.keys(this.data.snapshot.flags).length&&{flags:this.data.snapshot.flags},...this.data.expectation&&{expectation:{id:this.data.expectation.id,group:this.data.expectation.group,...this.data.expectation.schema.forward&&{forward:this.data.expectation.schema.forward}}},...((t=this.data.snapshot.cache)==null?void 0:t.isEnabled)&&{cache:this.data.snapshot.cache},...this.data.snapshot.seed&&{seed:this.data.snapshot.seed},...this.data.snapshot.container&&{container:this.data.snapshot.container},incoming:this.data.snapshot.incoming,...this.data.snapshot.error&&{error:this.data.snapshot.error},...this.data.status==="completed"&&{outgoing:this.data.snapshot.outgoing},...this.data.snapshot.forwarded&&{forwarded:this.data.snapshot.forwarded},...((e=this.data.snapshot.messages)==null?void 0:e.length)&&{messages:this.data.snapshot.messages}}),this.element.querySelector("div.meta").addEventListener("click",i=>i.composedPath().some(r=>{var o;return(o=r==null?void 0:r.classList)==null?void 0:o.contains("meta")})?this.viewer.isHidden?this.viewer.show():this.viewer.hide():null),this}match(t){var i;return[this.data.group,(i=this.data.expectation)==null?void 0:i.name,this.data.snapshot.incoming.path,this.data.snapshot.incoming.method,this.data.snapshot.incoming.dataRaw,this.data.snapshot.incoming.error,String(this.data.snapshot.outgoing.status),String(this.data.snapshot.seed??""),this.data.snapshot.outgoing.dataRaw].some(r=>r==null?void 0:r.includes(t))||[this.data.snapshot.incoming.query,this.data.snapshot.incoming.headers,this.data.snapshot.outgoing.headers,this.data.snapshot.container,this.data.snapshot.state,this.data.snapshot.cache].some(r=>{var o;return(o=JSON.stringify(r))==null?void 0:o.includes(t)})}static build(t){return new ls(t)}}class nu extends te{constructor(t={}){super('<div class="curtain hidden"></div>'),this.options=t,t.isPreventedToManualClose||this.element.addEventListener("click",e=>e.target===this.element?this.hide():null)}static build(t){return new nu(t)}}class iu extends nu{constructor(){super({isPreventedToManualClose:!0}),this.append('<div><p>Ping pong</p><div class="loader"></div></div>').assignId("loader")}static build(){return new iu}}const XS=`
395
- <div class="popup-message {{level}}">
396
- {{#compare level 'eq' 'info'}}<i class="fas fa-check"></i>{{/compare}}
397
- {{#compare level 'eq' 'warning'}}<i class="fas fa-exclamation-triangle"></i>{{/compare}}
398
- {{#compare level 'eq' 'error'}}<i class="fas fa-times"></i>{{/compare}}
399
-
400
- <span>{{{message}}}</span>
401
- </div>
402
- `,JS=oe.compile(XS);class ru extends te{constructor(){super(),this.element.classList.add("popups")}push(t,e={}){const i=this.compileHtmlStringToElement(JS({message:t,level:e.level??"info"}));this.element.prepend(i),setTimeout(()=>i.remove(),3e3)}static build(){return new ru}}const ZS=`
403
- <div class="search">
404
- <i class="fas fa-search"></i>
405
- <div class="input" title="{{title}}"><input data-key="search" type="text"></div>
406
- <button><i class="far fa-times-circle"></i></button>
407
- </div>
408
- `,QS=oe.compile(ZS);class Fa extends te{constructor(t){super(QS({title:(t==null?void 0:t.title)??"Type something"})),this.options=t,this.events=new Ig.EventEmitter,this.input=this.element.querySelector("input"),this.button=this.element.querySelector("button"),this.button.classList.add("hidden"),this.button.addEventListener("click",()=>this.clear()),this.on("input",()=>{this.button.classList.remove("hidden"),this.element.classList.add("filled")}),this.on("clear",()=>{this.button.classList.add("hidden"),this.element.classList.remove("filled")}),this.input.addEventListener("keydown",Ze.debounce(()=>this.input.value?this.emit("input",this.input.value):this.clear(),350))}clear(){return this.input.value="",this.emit("clear")}on(t,e){return this.events.on(t,e),this}once(t,e){return this.events.once(t,e),this}emit(t,...e){return this.events.emit(t,...e),this}static build(t){return new Fa(t)}}const tk=`
409
- <header>
410
- <div id="tabs">
411
- {{#each tabs}}
412
- {{#compare type 'eq' 'separator'}}<hr>{{/compare}}
413
-
414
- {{#compare type 'eq' 'section'}}
415
- <button class="{{#unless entity.meta.name}}icon-only{{/unless}} {{#if isSelected}}checked{{/if}}" id="{{id}}">
416
- <i class="{{entity.meta.icon}}"></i>{{entity.meta.name}}
417
- </button>
418
- {{/compare}}
419
- {{/each}}
420
- </div>
421
- </header>
422
- `,ek=oe.compile(tk);class su extends te{constructor(t){super(ek({tabs:t.map(e=>e.type==="section"?Object.assign(e,{id:e.entity.id,isSelected:!e.entity.isHidden}):e)})),this.tabs=t,this.sections=this.tabs.map(e=>e.type==="section"?e.entity:null).filter(Boolean).reduce((e,i)=>Ze.set(e,i.id,i),{}),this.events=new Ms,Object.values(this.sections).forEach(e=>e.on("select",()=>{const i=this.element.querySelector(`button#${e.id}`);this.element.querySelectorAll("div#tabs button").forEach(r=>r.classList.remove("checked")),i==null||i.classList.add("checked")})),this.element.querySelector("div#tabs").addEventListener("click",e=>{var r;const i=e;((r=i.target)==null?void 0:r.nodeName)!=="BUTTON"||!this.sections[i.target.id]||this.emit("select",this.sections[i.target.id])}),this.on("select",e=>{Object.values(this.sections).forEach(i=>i.hide()),pt.switchStorage(e.storage),e.isInitialized?e.show().select():e.initialize().show().select()})}on(t,e){return this.events.on(t,e),this}once(t,e){return this.events.once(t,e),this}emit(t,...e){return this.events.emit(t,...e),this}static build(t){return new su(t)}}const nk=`
423
- <div class="empty">
424
- <i class="fas fa-hourglass-start"></i>
425
- <p>There's still nothing...</p>
426
- </div>
427
- `,ik=oe.compile(nk);class Na extends te{static build(){return new Na(ik({}))}}/*!
428
- * @kurkle/color v0.3.4
429
- * https://github.com/kurkle/color#readme
430
- * (c) 2024 Jukka Kurkela
431
- * Released under the MIT License
432
- */function As(n){return n+.5|0}const pi=(n,t,e)=>Math.max(Math.min(n,e),t);function ts(n){return pi(As(n*2.55),0,255)}function vi(n){return pi(As(n*255),0,255)}function Yn(n){return pi(As(n/2.55)/100,0,1)}function np(n){return pi(As(n*100),0,100)}const cn={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},Rc=[..."0123456789ABCDEF"],rk=n=>Rc[n&15],sk=n=>Rc[(n&240)>>4]+Rc[n&15],Xo=n=>(n&240)>>4===(n&15),ok=n=>Xo(n.r)&&Xo(n.g)&&Xo(n.b)&&Xo(n.a);function ak(n){var t=n.length,e;return n[0]==="#"&&(t===4||t===5?e={r:255&cn[n[1]]*17,g:255&cn[n[2]]*17,b:255&cn[n[3]]*17,a:t===5?cn[n[4]]*17:255}:(t===7||t===9)&&(e={r:cn[n[1]]<<4|cn[n[2]],g:cn[n[3]]<<4|cn[n[4]],b:cn[n[5]]<<4|cn[n[6]],a:t===9?cn[n[7]]<<4|cn[n[8]]:255})),e}const lk=(n,t)=>n<255?t(n):"";function ck(n){var t=ok(n)?rk:sk;return n?"#"+t(n.r)+t(n.g)+t(n.b)+lk(n.a,t):void 0}const uk=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function tm(n,t,e){const i=t*Math.min(e,1-e),r=(o,a=(o+n/30)%12)=>e-i*Math.max(Math.min(a-3,9-a,1),-1);return[r(0),r(8),r(4)]}function hk(n,t,e){const i=(r,o=(r+n/60)%6)=>e-e*t*Math.max(Math.min(o,4-o,1),0);return[i(5),i(3),i(1)]}function fk(n,t,e){const i=tm(n,1,.5);let r;for(t+e>1&&(r=1/(t+e),t*=r,e*=r),r=0;r<3;r++)i[r]*=1-t-e,i[r]+=t;return i}function dk(n,t,e,i,r){return n===r?(t-e)/i+(t<e?6:0):t===r?(e-n)/i+2:(n-t)/i+4}function ou(n){const e=n.r/255,i=n.g/255,r=n.b/255,o=Math.max(e,i,r),a=Math.min(e,i,r),c=(o+a)/2;let u,f,h;return o!==a&&(h=o-a,f=c>.5?h/(2-o-a):h/(o+a),u=dk(e,i,r,h,o),u=u*60+.5),[u|0,f||0,c]}function au(n,t,e,i){return(Array.isArray(t)?n(t[0],t[1],t[2]):n(t,e,i)).map(vi)}function lu(n,t,e){return au(tm,n,t,e)}function pk(n,t,e){return au(fk,n,t,e)}function gk(n,t,e){return au(hk,n,t,e)}function em(n){return(n%360+360)%360}function mk(n){const t=uk.exec(n);let e=255,i;if(!t)return;t[5]!==i&&(e=t[6]?ts(+t[5]):vi(+t[5]));const r=em(+t[2]),o=+t[3]/100,a=+t[4]/100;return t[1]==="hwb"?i=pk(r,o,a):t[1]==="hsv"?i=gk(r,o,a):i=lu(r,o,a),{r:i[0],g:i[1],b:i[2],a:e}}function _k(n,t){var e=ou(n);e[0]=em(e[0]+t),e=lu(e),n.r=e[0],n.g=e[1],n.b=e[2]}function yk(n){if(!n)return;const t=ou(n),e=t[0],i=np(t[1]),r=np(t[2]);return n.a<255?`hsla(${e}, ${i}%, ${r}%, ${Yn(n.a)})`:`hsl(${e}, ${i}%, ${r}%)`}const ip={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},rp={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};function vk(){const n={},t=Object.keys(rp),e=Object.keys(ip);let i,r,o,a,c;for(i=0;i<t.length;i++){for(a=c=t[i],r=0;r<e.length;r++)o=e[r],c=c.replace(o,ip[o]);o=parseInt(rp[a],16),n[c]=[o>>16&255,o>>8&255,o&255]}return n}let Jo;function bk(n){Jo||(Jo=vk(),Jo.transparent=[0,0,0,0]);const t=Jo[n.toLowerCase()];return t&&{r:t[0],g:t[1],b:t[2],a:t.length===4?t[3]:255}}const xk=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function wk(n){const t=xk.exec(n);let e=255,i,r,o;if(t){if(t[7]!==i){const a=+t[7];e=t[8]?ts(a):pi(a*255,0,255)}return i=+t[1],r=+t[3],o=+t[5],i=255&(t[2]?ts(i):pi(i,0,255)),r=255&(t[4]?ts(r):pi(r,0,255)),o=255&(t[6]?ts(o):pi(o,0,255)),{r:i,g:r,b:o,a:e}}}function Sk(n){return n&&(n.a<255?`rgba(${n.r}, ${n.g}, ${n.b}, ${Yn(n.a)})`:`rgb(${n.r}, ${n.g}, ${n.b})`)}const fc=n=>n<=.0031308?n*12.92:Math.pow(n,1/2.4)*1.055-.055,pr=n=>n<=.04045?n/12.92:Math.pow((n+.055)/1.055,2.4);function kk(n,t,e){const i=pr(Yn(n.r)),r=pr(Yn(n.g)),o=pr(Yn(n.b));return{r:vi(fc(i+e*(pr(Yn(t.r))-i))),g:vi(fc(r+e*(pr(Yn(t.g))-r))),b:vi(fc(o+e*(pr(Yn(t.b))-o))),a:n.a+e*(t.a-n.a)}}function Zo(n,t,e){if(n){let i=ou(n);i[t]=Math.max(0,Math.min(i[t]+i[t]*e,t===0?360:1)),i=lu(i),n.r=i[0],n.g=i[1],n.b=i[2]}}function nm(n,t){return n&&Object.assign(t||{},n)}function sp(n){var t={r:0,g:0,b:0,a:255};return Array.isArray(n)?n.length>=3&&(t={r:n[0],g:n[1],b:n[2],a:255},n.length>3&&(t.a=vi(n[3]))):(t=nm(n,{r:0,g:0,b:0,a:1}),t.a=vi(t.a)),t}function Ek(n){return n.charAt(0)==="r"?wk(n):mk(n)}class _s{constructor(t){if(t instanceof _s)return t;const e=typeof t;let i;e==="object"?i=sp(t):e==="string"&&(i=ak(t)||bk(t)||Ek(t)),this._rgb=i,this._valid=!!i}get valid(){return this._valid}get rgb(){var t=nm(this._rgb);return t&&(t.a=Yn(t.a)),t}set rgb(t){this._rgb=sp(t)}rgbString(){return this._valid?Sk(this._rgb):void 0}hexString(){return this._valid?ck(this._rgb):void 0}hslString(){return this._valid?yk(this._rgb):void 0}mix(t,e){if(t){const i=this.rgb,r=t.rgb;let o;const a=e===o?.5:e,c=2*a-1,u=i.a-r.a,f=((c*u===-1?c:(c+u)/(1+c*u))+1)/2;o=1-f,i.r=255&f*i.r+o*r.r+.5,i.g=255&f*i.g+o*r.g+.5,i.b=255&f*i.b+o*r.b+.5,i.a=a*i.a+(1-a)*r.a,this.rgb=i}return this}interpolate(t,e){return t&&(this._rgb=kk(this._rgb,t._rgb,e)),this}clone(){return new _s(this.rgb)}alpha(t){return this._rgb.a=vi(t),this}clearer(t){const e=this._rgb;return e.a*=1-t,this}greyscale(){const t=this._rgb,e=As(t.r*.3+t.g*.59+t.b*.11);return t.r=t.g=t.b=e,this}opaquer(t){const e=this._rgb;return e.a*=1+t,this}negate(){const t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return Zo(this._rgb,2,t),this}darken(t){return Zo(this._rgb,2,-t),this}saturate(t){return Zo(this._rgb,1,t),this}desaturate(t){return Zo(this._rgb,1,-t),this}rotate(t){return _k(this._rgb,t),this}}/*!
433
- * Chart.js v4.4.8
434
- * https://www.chartjs.org
435
- * (c) 2025 Chart.js Contributors
436
- * Released under the MIT License
437
- */function Vn(){}const Ck=(()=>{let n=0;return()=>n++})();function Ct(n){return n==null}function Gt(n){if(Array.isArray&&Array.isArray(n))return!0;const t=Object.prototype.toString.call(n);return t.slice(0,7)==="[object"&&t.slice(-6)==="Array]"}function At(n){return n!==null&&Object.prototype.toString.call(n)==="[object Object]"}function ee(n){return(typeof n=="number"||n instanceof Number)&&isFinite(+n)}function Xe(n,t){return ee(n)?n:t}function yt(n,t){return typeof n>"u"?t:n}const Mk=(n,t)=>typeof n=="string"&&n.endsWith("%")?parseFloat(n)/100:+n/t,im=(n,t)=>typeof n=="string"&&n.endsWith("%")?parseFloat(n)/100*t:+n;function zt(n,t,e){if(n&&typeof n.call=="function")return n.apply(e,t)}function Bt(n,t,e,i){let r,o,a;if(Gt(n))for(o=n.length,r=0;r<o;r++)t.call(e,n[r],r);else if(At(n))for(a=Object.keys(n),o=a.length,r=0;r<o;r++)t.call(e,n[a[r]],a[r])}function Ea(n,t){let e,i,r,o;if(!n||!t||n.length!==t.length)return!1;for(e=0,i=n.length;e<i;++e)if(r=n[e],o=t[e],r.datasetIndex!==o.datasetIndex||r.index!==o.index)return!1;return!0}function Ca(n){if(Gt(n))return n.map(Ca);if(At(n)){const t=Object.create(null),e=Object.keys(n),i=e.length;let r=0;for(;r<i;++r)t[e[r]]=Ca(n[e[r]]);return t}return n}function rm(n){return["__proto__","prototype","constructor"].indexOf(n)===-1}function Ak(n,t,e,i){if(!rm(n))return;const r=t[n],o=e[n];At(r)&&At(o)?ys(r,o,i):t[n]=Ca(o)}function ys(n,t,e){const i=Gt(t)?t:[t],r=i.length;if(!At(n))return n;e=e||{};const o=e.merger||Ak;let a;for(let c=0;c<r;++c){if(a=i[c],!At(a))continue;const u=Object.keys(a);for(let f=0,h=u.length;f<h;++f)o(u[f],n,a,e)}return n}function cs(n,t){return ys(n,t,{merger:Lk})}function Lk(n,t,e){if(!rm(n))return;const i=t[n],r=e[n];At(i)&&At(r)?cs(i,r):Object.prototype.hasOwnProperty.call(t,n)||(t[n]=Ca(r))}const op={"":n=>n,x:n=>n.x,y:n=>n.y};function Pk(n){const t=n.split("."),e=[];let i="";for(const r of t)i+=r,i.endsWith("\\")?i=i.slice(0,-1)+".":(e.push(i),i="");return e}function Ok(n){const t=Pk(n);return e=>{for(const i of t){if(i==="")break;e=e&&e[i]}return e}}function bi(n,t){return(op[t]||(op[t]=Ok(t)))(n)}function cu(n){return n.charAt(0).toUpperCase()+n.slice(1)}const vs=n=>typeof n<"u",xi=n=>typeof n=="function",ap=(n,t)=>{if(n.size!==t.size)return!1;for(const e of n)if(!t.has(e))return!1;return!0};function Rk(n){return n.type==="mouseup"||n.type==="click"||n.type==="contextmenu"}const Vt=Math.PI,Ut=2*Vt,Ik=Ut+Vt,Ma=Number.POSITIVE_INFINITY,Tk=Vt/180,re=Vt/2,Di=Vt/4,lp=Vt*2/3,gi=Math.log10,On=Math.sign;function us(n,t,e){return Math.abs(n-t)<e}function cp(n){const t=Math.round(n);n=us(n,t,n/1e3)?t:n;const e=Math.pow(10,Math.floor(gi(n))),i=n/e;return(i<=1?1:i<=2?2:i<=5?5:10)*e}function Dk(n){const t=[],e=Math.sqrt(n);let i;for(i=1;i<e;i++)n%i===0&&(t.push(i),t.push(n/i));return e===(e|0)&&t.push(e),t.sort((r,o)=>r-o).pop(),t}function Bk(n){return typeof n=="symbol"||typeof n=="object"&&n!==null&&!(Symbol.toPrimitive in n||"toString"in n||"valueOf"in n)}function br(n){return!Bk(n)&&!isNaN(parseFloat(n))&&isFinite(n)}function Fk(n,t){const e=Math.round(n);return e-t<=n&&e+t>=n}function sm(n,t,e){let i,r,o;for(i=0,r=n.length;i<r;i++)o=n[i][e],isNaN(o)||(t.min=Math.min(t.min,o),t.max=Math.max(t.max,o))}function _n(n){return n*(Vt/180)}function uu(n){return n*(180/Vt)}function up(n){if(!ee(n))return;let t=1,e=0;for(;Math.round(n*t)/t!==n;)t*=10,e++;return e}function om(n,t){const e=t.x-n.x,i=t.y-n.y,r=Math.sqrt(e*e+i*i);let o=Math.atan2(i,e);return o<-.5*Vt&&(o+=Ut),{angle:o,distance:r}}function Ic(n,t){return Math.sqrt(Math.pow(t.x-n.x,2)+Math.pow(t.y-n.y,2))}function Nk(n,t){return(n-t+Ik)%Ut-Vt}function Je(n){return(n%Ut+Ut)%Ut}function bs(n,t,e,i){const r=Je(n),o=Je(t),a=Je(e),c=Je(o-r),u=Je(a-r),f=Je(r-o),h=Je(r-a);return r===o||r===a||i&&o===a||c>u&&f<h}function pe(n,t,e){return Math.max(t,Math.min(e,n))}function Hk(n){return pe(n,-32768,32767)}function Zn(n,t,e,i=1e-6){return n>=Math.min(t,e)-i&&n<=Math.max(t,e)+i}function hu(n,t,e){e=e||(a=>n[a]<t);let i=n.length-1,r=0,o;for(;i-r>1;)o=r+i>>1,e(o)?r=o:i=o;return{lo:r,hi:i}}const Qn=(n,t,e,i)=>hu(n,e,i?r=>{const o=n[r][t];return o<e||o===e&&n[r+1][t]===e}:r=>n[r][t]<e),Wk=(n,t,e)=>hu(n,e,i=>n[i][t]>=e);function zk(n,t,e){let i=0,r=n.length;for(;i<r&&n[i]<t;)i++;for(;r>i&&n[r-1]>e;)r--;return i>0||r<n.length?n.slice(i,r):n}const am=["push","pop","shift","splice","unshift"];function jk(n,t){if(n._chartjs){n._chartjs.listeners.push(t);return}Object.defineProperty(n,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[t]}}),am.forEach(e=>{const i="_onData"+cu(e),r=n[e];Object.defineProperty(n,e,{configurable:!0,enumerable:!1,value(...o){const a=r.apply(this,o);return n._chartjs.listeners.forEach(c=>{typeof c[i]=="function"&&c[i](...o)}),a}})})}function hp(n,t){const e=n._chartjs;if(!e)return;const i=e.listeners,r=i.indexOf(t);r!==-1&&i.splice(r,1),!(i.length>0)&&(am.forEach(o=>{delete n[o]}),delete n._chartjs)}function lm(n){const t=new Set(n);return t.size===n.length?n:Array.from(t)}const cm=function(){return typeof window>"u"?function(n){return n()}:window.requestAnimationFrame}();function um(n,t){let e=[],i=!1;return function(...r){e=r,i||(i=!0,cm.call(window,()=>{i=!1,n.apply(t,e)}))}}function Uk(n,t){let e;return function(...i){return t?(clearTimeout(e),e=setTimeout(n,t,i)):n.apply(this,i),t}}const fu=n=>n==="start"?"left":n==="end"?"right":"center",xe=(n,t,e)=>n==="start"?t:n==="end"?e:(t+e)/2,Vk=(n,t,e,i)=>n===(i?"left":"right")?e:n==="center"?(t+e)/2:t;function hm(n,t,e){const i=t.length;let r=0,o=i;if(n._sorted){const{iScale:a,vScale:c,_parsed:u}=n,f=n.dataset&&n.dataset.options?n.dataset.options.spanGaps:null,h=a.axis,{min:_,max:p,minDefined:m,maxDefined:g}=a.getUserBounds();if(m){if(r=Math.min(Qn(u,h,_).lo,e?i:Qn(t,h,a.getPixelForValue(_)).lo),f){const b=u.slice(0,r+1).reverse().findIndex(w=>!Ct(w[c.axis]));r-=Math.max(0,b)}r=pe(r,0,i-1)}if(g){let b=Math.max(Qn(u,a.axis,p,!0).hi+1,e?0:Qn(t,h,a.getPixelForValue(p),!0).hi+1);if(f){const w=u.slice(b-1).findIndex(C=>!Ct(C[c.axis]));b+=Math.max(0,w)}o=pe(b,r,i)-r}else o=i-r}return{start:r,count:o}}function fm(n){const{xScale:t,yScale:e,_scaleRanges:i}=n,r={xmin:t.min,xmax:t.max,ymin:e.min,ymax:e.max};if(!i)return n._scaleRanges=r,!0;const o=i.xmin!==t.min||i.xmax!==t.max||i.ymin!==e.min||i.ymax!==e.max;return Object.assign(i,r),o}const Qo=n=>n===0||n===1,fp=(n,t,e)=>-(Math.pow(2,10*(n-=1))*Math.sin((n-t)*Ut/e)),dp=(n,t,e)=>Math.pow(2,-10*n)*Math.sin((n-t)*Ut/e)+1,hs={linear:n=>n,easeInQuad:n=>n*n,easeOutQuad:n=>-n*(n-2),easeInOutQuad:n=>(n/=.5)<1?.5*n*n:-.5*(--n*(n-2)-1),easeInCubic:n=>n*n*n,easeOutCubic:n=>(n-=1)*n*n+1,easeInOutCubic:n=>(n/=.5)<1?.5*n*n*n:.5*((n-=2)*n*n+2),easeInQuart:n=>n*n*n*n,easeOutQuart:n=>-((n-=1)*n*n*n-1),easeInOutQuart:n=>(n/=.5)<1?.5*n*n*n*n:-.5*((n-=2)*n*n*n-2),easeInQuint:n=>n*n*n*n*n,easeOutQuint:n=>(n-=1)*n*n*n*n+1,easeInOutQuint:n=>(n/=.5)<1?.5*n*n*n*n*n:.5*((n-=2)*n*n*n*n+2),easeInSine:n=>-Math.cos(n*re)+1,easeOutSine:n=>Math.sin(n*re),easeInOutSine:n=>-.5*(Math.cos(Vt*n)-1),easeInExpo:n=>n===0?0:Math.pow(2,10*(n-1)),easeOutExpo:n=>n===1?1:-Math.pow(2,-10*n)+1,easeInOutExpo:n=>Qo(n)?n:n<.5?.5*Math.pow(2,10*(n*2-1)):.5*(-Math.pow(2,-10*(n*2-1))+2),easeInCirc:n=>n>=1?n:-(Math.sqrt(1-n*n)-1),easeOutCirc:n=>Math.sqrt(1-(n-=1)*n),easeInOutCirc:n=>(n/=.5)<1?-.5*(Math.sqrt(1-n*n)-1):.5*(Math.sqrt(1-(n-=2)*n)+1),easeInElastic:n=>Qo(n)?n:fp(n,.075,.3),easeOutElastic:n=>Qo(n)?n:dp(n,.075,.3),easeInOutElastic(n){return Qo(n)?n:n<.5?.5*fp(n*2,.1125,.45):.5+.5*dp(n*2-1,.1125,.45)},easeInBack(n){return n*n*((1.70158+1)*n-1.70158)},easeOutBack(n){return(n-=1)*n*((1.70158+1)*n+1.70158)+1},easeInOutBack(n){let t=1.70158;return(n/=.5)<1?.5*(n*n*(((t*=1.525)+1)*n-t)):.5*((n-=2)*n*(((t*=1.525)+1)*n+t)+2)},easeInBounce:n=>1-hs.easeOutBounce(1-n),easeOutBounce(n){return n<1/2.75?7.5625*n*n:n<2/2.75?7.5625*(n-=1.5/2.75)*n+.75:n<2.5/2.75?7.5625*(n-=2.25/2.75)*n+.9375:7.5625*(n-=2.625/2.75)*n+.984375},easeInOutBounce:n=>n<.5?hs.easeInBounce(n*2)*.5:hs.easeOutBounce(n*2-1)*.5+.5};function du(n){if(n&&typeof n=="object"){const t=n.toString();return t==="[object CanvasPattern]"||t==="[object CanvasGradient]"}return!1}function pp(n){return du(n)?n:new _s(n)}function dc(n){return du(n)?n:new _s(n).saturate(.5).darken(.1).hexString()}const qk=["x","y","borderWidth","radius","tension"],$k=["color","borderColor","backgroundColor"];function Yk(n){n.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),n.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>t!=="onProgress"&&t!=="onComplete"&&t!=="fn"}),n.set("animations",{colors:{type:"color",properties:$k},numbers:{type:"number",properties:qk}}),n.describe("animations",{_fallback:"animation"}),n.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>t|0}}}})}function Gk(n){n.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const gp=new Map;function Kk(n,t){t=t||{};const e=n+JSON.stringify(t);let i=gp.get(e);return i||(i=new Intl.NumberFormat(n,t),gp.set(e,i)),i}function Ls(n,t,e){return Kk(t,e).format(n)}const dm={values(n){return Gt(n)?n:""+n},numeric(n,t,e){if(n===0)return"0";const i=this.chart.options.locale;let r,o=n;if(e.length>1){const f=Math.max(Math.abs(e[0].value),Math.abs(e[e.length-1].value));(f<1e-4||f>1e15)&&(r="scientific"),o=Xk(n,e)}const a=gi(Math.abs(o)),c=isNaN(a)?1:Math.max(Math.min(-1*Math.floor(a),20),0),u={notation:r,minimumFractionDigits:c,maximumFractionDigits:c};return Object.assign(u,this.options.ticks.format),Ls(n,i,u)},logarithmic(n,t,e){if(n===0)return"0";const i=e[t].significand||n/Math.pow(10,Math.floor(gi(n)));return[1,2,3,5,10,15].includes(i)||t>.8*e.length?dm.numeric.call(this,n,t,e):""}};function Xk(n,t){let e=t.length>3?t[2].value-t[1].value:t[1].value-t[0].value;return Math.abs(e)>=1&&n!==Math.floor(n)&&(e=n-Math.floor(n)),e}var Ha={formatters:dm};function Jk(n){n.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(t,e)=>e.lineWidth,tickColor:(t,e)=>e.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:Ha.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),n.route("scale.ticks","color","","color"),n.route("scale.grid","color","","borderColor"),n.route("scale.border","color","","borderColor"),n.route("scale.title","color","","color"),n.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&t!=="callback"&&t!=="parser",_indexable:t=>t!=="borderDash"&&t!=="tickBorderDash"&&t!=="dash"}),n.describe("scales",{_fallback:"scale"}),n.describe("scale.ticks",{_scriptable:t=>t!=="backdropPadding"&&t!=="callback",_indexable:t=>t!=="backdropPadding"})}const qi=Object.create(null),Tc=Object.create(null);function fs(n,t){if(!t)return n;const e=t.split(".");for(let i=0,r=e.length;i<r;++i){const o=e[i];n=n[o]||(n[o]=Object.create(null))}return n}function pc(n,t,e){return typeof t=="string"?ys(fs(n,t),e):ys(fs(n,""),t)}class Zk{constructor(t,e){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=i=>i.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(i,r)=>dc(r.backgroundColor),this.hoverBorderColor=(i,r)=>dc(r.borderColor),this.hoverColor=(i,r)=>dc(r.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(t),this.apply(e)}set(t,e){return pc(this,t,e)}get(t){return fs(this,t)}describe(t,e){return pc(Tc,t,e)}override(t,e){return pc(qi,t,e)}route(t,e,i,r){const o=fs(this,t),a=fs(this,i),c="_"+e;Object.defineProperties(o,{[c]:{value:o[e],writable:!0},[e]:{enumerable:!0,get(){const u=this[c],f=a[r];return At(u)?Object.assign({},f,u):yt(u,f)},set(u){this[c]=u}}})}apply(t){t.forEach(e=>e(this))}}var Kt=new Zk({_scriptable:n=>!n.startsWith("on"),_indexable:n=>n!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[Yk,Gk,Jk]);function Qk(n){return!n||Ct(n.size)||Ct(n.family)?null:(n.style?n.style+" ":"")+(n.weight?n.weight+" ":"")+n.size+"px "+n.family}function Aa(n,t,e,i,r){let o=t[r];return o||(o=t[r]=n.measureText(r).width,e.push(r)),o>i&&(i=o),i}function tE(n,t,e,i){i=i||{};let r=i.data=i.data||{},o=i.garbageCollect=i.garbageCollect||[];i.font!==t&&(r=i.data={},o=i.garbageCollect=[],i.font=t),n.save(),n.font=t;let a=0;const c=e.length;let u,f,h,_,p;for(u=0;u<c;u++)if(_=e[u],_!=null&&!Gt(_))a=Aa(n,r,o,a,_);else if(Gt(_))for(f=0,h=_.length;f<h;f++)p=_[f],p!=null&&!Gt(p)&&(a=Aa(n,r,o,a,p));n.restore();const m=o.length/2;if(m>e.length){for(u=0;u<m;u++)delete r[o[u]];o.splice(0,m)}return a}function Bi(n,t,e){const i=n.currentDevicePixelRatio,r=e!==0?Math.max(e/2,.5):0;return Math.round((t-r)*i)/i+r}function mp(n,t){!t&&!n||(t=t||n.getContext("2d"),t.save(),t.resetTransform(),t.clearRect(0,0,n.width,n.height),t.restore())}function Dc(n,t,e,i){pm(n,t,e,i,null)}function pm(n,t,e,i,r){let o,a,c,u,f,h,_,p;const m=t.pointStyle,g=t.rotation,b=t.radius;let w=(g||0)*Tk;if(m&&typeof m=="object"&&(o=m.toString(),o==="[object HTMLImageElement]"||o==="[object HTMLCanvasElement]")){n.save(),n.translate(e,i),n.rotate(w),n.drawImage(m,-m.width/2,-m.height/2,m.width,m.height),n.restore();return}if(!(isNaN(b)||b<=0)){switch(n.beginPath(),m){default:r?n.ellipse(e,i,r/2,b,0,0,Ut):n.arc(e,i,b,0,Ut),n.closePath();break;case"triangle":h=r?r/2:b,n.moveTo(e+Math.sin(w)*h,i-Math.cos(w)*b),w+=lp,n.lineTo(e+Math.sin(w)*h,i-Math.cos(w)*b),w+=lp,n.lineTo(e+Math.sin(w)*h,i-Math.cos(w)*b),n.closePath();break;case"rectRounded":f=b*.516,u=b-f,a=Math.cos(w+Di)*u,_=Math.cos(w+Di)*(r?r/2-f:u),c=Math.sin(w+Di)*u,p=Math.sin(w+Di)*(r?r/2-f:u),n.arc(e-_,i-c,f,w-Vt,w-re),n.arc(e+p,i-a,f,w-re,w),n.arc(e+_,i+c,f,w,w+re),n.arc(e-p,i+a,f,w+re,w+Vt),n.closePath();break;case"rect":if(!g){u=Math.SQRT1_2*b,h=r?r/2:u,n.rect(e-h,i-u,2*h,2*u);break}w+=Di;case"rectRot":_=Math.cos(w)*(r?r/2:b),a=Math.cos(w)*b,c=Math.sin(w)*b,p=Math.sin(w)*(r?r/2:b),n.moveTo(e-_,i-c),n.lineTo(e+p,i-a),n.lineTo(e+_,i+c),n.lineTo(e-p,i+a),n.closePath();break;case"crossRot":w+=Di;case"cross":_=Math.cos(w)*(r?r/2:b),a=Math.cos(w)*b,c=Math.sin(w)*b,p=Math.sin(w)*(r?r/2:b),n.moveTo(e-_,i-c),n.lineTo(e+_,i+c),n.moveTo(e+p,i-a),n.lineTo(e-p,i+a);break;case"star":_=Math.cos(w)*(r?r/2:b),a=Math.cos(w)*b,c=Math.sin(w)*b,p=Math.sin(w)*(r?r/2:b),n.moveTo(e-_,i-c),n.lineTo(e+_,i+c),n.moveTo(e+p,i-a),n.lineTo(e-p,i+a),w+=Di,_=Math.cos(w)*(r?r/2:b),a=Math.cos(w)*b,c=Math.sin(w)*b,p=Math.sin(w)*(r?r/2:b),n.moveTo(e-_,i-c),n.lineTo(e+_,i+c),n.moveTo(e+p,i-a),n.lineTo(e-p,i+a);break;case"line":a=r?r/2:Math.cos(w)*b,c=Math.sin(w)*b,n.moveTo(e-a,i-c),n.lineTo(e+a,i+c);break;case"dash":n.moveTo(e,i),n.lineTo(e+Math.cos(w)*(r?r/2:b),i+Math.sin(w)*b);break;case!1:n.closePath();break}n.fill(),t.borderWidth>0&&n.stroke()}}function ti(n,t,e){return e=e||.5,!t||n&&n.x>t.left-e&&n.x<t.right+e&&n.y>t.top-e&&n.y<t.bottom+e}function Wa(n,t){n.save(),n.beginPath(),n.rect(t.left,t.top,t.right-t.left,t.bottom-t.top),n.clip()}function za(n){n.restore()}function eE(n,t,e,i,r){if(!t)return n.lineTo(e.x,e.y);if(r==="middle"){const o=(t.x+e.x)/2;n.lineTo(o,t.y),n.lineTo(o,e.y)}else r==="after"!=!!i?n.lineTo(t.x,e.y):n.lineTo(e.x,t.y);n.lineTo(e.x,e.y)}function nE(n,t,e,i){if(!t)return n.lineTo(e.x,e.y);n.bezierCurveTo(i?t.cp1x:t.cp2x,i?t.cp1y:t.cp2y,i?e.cp2x:e.cp1x,i?e.cp2y:e.cp1y,e.x,e.y)}function iE(n,t){t.translation&&n.translate(t.translation[0],t.translation[1]),Ct(t.rotation)||n.rotate(t.rotation),t.color&&(n.fillStyle=t.color),t.textAlign&&(n.textAlign=t.textAlign),t.textBaseline&&(n.textBaseline=t.textBaseline)}function rE(n,t,e,i,r){if(r.strikethrough||r.underline){const o=n.measureText(i),a=t-o.actualBoundingBoxLeft,c=t+o.actualBoundingBoxRight,u=e-o.actualBoundingBoxAscent,f=e+o.actualBoundingBoxDescent,h=r.strikethrough?(u+f)/2:f;n.strokeStyle=n.fillStyle,n.beginPath(),n.lineWidth=r.decorationWidth||2,n.moveTo(a,h),n.lineTo(c,h),n.stroke()}}function sE(n,t){const e=n.fillStyle;n.fillStyle=t.color,n.fillRect(t.left,t.top,t.width,t.height),n.fillStyle=e}function $i(n,t,e,i,r,o={}){const a=Gt(t)?t:[t],c=o.strokeWidth>0&&o.strokeColor!=="";let u,f;for(n.save(),n.font=r.string,iE(n,o),u=0;u<a.length;++u)f=a[u],o.backdrop&&sE(n,o.backdrop),c&&(o.strokeColor&&(n.strokeStyle=o.strokeColor),Ct(o.strokeWidth)||(n.lineWidth=o.strokeWidth),n.strokeText(f,e,i,o.maxWidth)),n.fillText(f,e,i,o.maxWidth),rE(n,e,i,f,o),i+=Number(r.lineHeight);n.restore()}function xs(n,t){const{x:e,y:i,w:r,h:o,radius:a}=t;n.arc(e+a.topLeft,i+a.topLeft,a.topLeft,1.5*Vt,Vt,!0),n.lineTo(e,i+o-a.bottomLeft),n.arc(e+a.bottomLeft,i+o-a.bottomLeft,a.bottomLeft,Vt,re,!0),n.lineTo(e+r-a.bottomRight,i+o),n.arc(e+r-a.bottomRight,i+o-a.bottomRight,a.bottomRight,re,0,!0),n.lineTo(e+r,i+a.topRight),n.arc(e+r-a.topRight,i+a.topRight,a.topRight,0,-re,!0),n.lineTo(e+a.topLeft,i)}const oE=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,aE=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function lE(n,t){const e=(""+n).match(oE);if(!e||e[1]==="normal")return t*1.2;switch(n=+e[2],e[3]){case"px":return n;case"%":n/=100;break}return t*n}const cE=n=>+n||0;function pu(n,t){const e={},i=At(t),r=i?Object.keys(t):t,o=At(n)?i?a=>yt(n[a],n[t[a]]):a=>n[a]:()=>n;for(const a of r)e[a]=cE(o(a));return e}function gm(n){return pu(n,{top:"y",right:"x",bottom:"y",left:"x"})}function Ui(n){return pu(n,["topLeft","topRight","bottomLeft","bottomRight"])}function Se(n){const t=gm(n);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function fe(n,t){n=n||{},t=t||Kt.font;let e=yt(n.size,t.size);typeof e=="string"&&(e=parseInt(e,10));let i=yt(n.style,t.style);i&&!(""+i).match(aE)&&(console.warn('Invalid font style specified: "'+i+'"'),i=void 0);const r={family:yt(n.family,t.family),lineHeight:lE(yt(n.lineHeight,t.lineHeight),e),size:e,style:i,weight:yt(n.weight,t.weight),string:""};return r.string=Qk(r),r}function es(n,t,e,i){let r,o,a;for(r=0,o=n.length;r<o;++r)if(a=n[r],a!==void 0&&a!==void 0)return a}function uE(n,t,e){const{min:i,max:r}=n,o=im(t,(r-i)/2),a=(c,u)=>e&&c===0?0:c+u;return{min:a(i,-Math.abs(o)),max:a(r,o)}}function wi(n,t){return Object.assign(Object.create(n),t)}function gu(n,t=[""],e,i,r=()=>n[0]){const o=e||n;typeof i>"u"&&(i=vm("_fallback",n));const a={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:n,_rootScopes:o,_fallback:i,_getTarget:r,override:c=>gu([c,...n],t,o,i)};return new Proxy(a,{deleteProperty(c,u){return delete c[u],delete c._keys,delete n[0][u],!0},get(c,u){return _m(c,u,()=>yE(u,t,n,c))},getOwnPropertyDescriptor(c,u){return Reflect.getOwnPropertyDescriptor(c._scopes[0],u)},getPrototypeOf(){return Reflect.getPrototypeOf(n[0])},has(c,u){return yp(c).includes(u)},ownKeys(c){return yp(c)},set(c,u,f){const h=c._storage||(c._storage=r());return c[u]=h[u]=f,delete c._keys,!0}})}function xr(n,t,e,i){const r={_cacheable:!1,_proxy:n,_context:t,_subProxy:e,_stack:new Set,_descriptors:mm(n,i),setContext:o=>xr(n,o,e,i),override:o=>xr(n.override(o),t,e,i)};return new Proxy(r,{deleteProperty(o,a){return delete o[a],delete n[a],!0},get(o,a,c){return _m(o,a,()=>fE(o,a,c))},getOwnPropertyDescriptor(o,a){return o._descriptors.allKeys?Reflect.has(n,a)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(n,a)},getPrototypeOf(){return Reflect.getPrototypeOf(n)},has(o,a){return Reflect.has(n,a)},ownKeys(){return Reflect.ownKeys(n)},set(o,a,c){return n[a]=c,delete o[a],!0}})}function mm(n,t={scriptable:!0,indexable:!0}){const{_scriptable:e=t.scriptable,_indexable:i=t.indexable,_allKeys:r=t.allKeys}=n;return{allKeys:r,scriptable:e,indexable:i,isScriptable:xi(e)?e:()=>e,isIndexable:xi(i)?i:()=>i}}const hE=(n,t)=>n?n+cu(t):t,mu=(n,t)=>At(t)&&n!=="adapters"&&(Object.getPrototypeOf(t)===null||t.constructor===Object);function _m(n,t,e){if(Object.prototype.hasOwnProperty.call(n,t)||t==="constructor")return n[t];const i=e();return n[t]=i,i}function fE(n,t,e){const{_proxy:i,_context:r,_subProxy:o,_descriptors:a}=n;let c=i[t];return xi(c)&&a.isScriptable(t)&&(c=dE(t,c,n,e)),Gt(c)&&c.length&&(c=pE(t,c,n,a.isIndexable)),mu(t,c)&&(c=xr(c,r,o&&o[t],a)),c}function dE(n,t,e,i){const{_proxy:r,_context:o,_subProxy:a,_stack:c}=e;if(c.has(n))throw new Error("Recursion detected: "+Array.from(c).join("->")+"->"+n);c.add(n);let u=t(o,a||i);return c.delete(n),mu(n,u)&&(u=_u(r._scopes,r,n,u)),u}function pE(n,t,e,i){const{_proxy:r,_context:o,_subProxy:a,_descriptors:c}=e;if(typeof o.index<"u"&&i(n))return t[o.index%t.length];if(At(t[0])){const u=t,f=r._scopes.filter(h=>h!==u);t=[];for(const h of u){const _=_u(f,r,n,h);t.push(xr(_,o,a&&a[n],c))}}return t}function ym(n,t,e){return xi(n)?n(t,e):n}const gE=(n,t)=>n===!0?t:typeof n=="string"?bi(t,n):void 0;function mE(n,t,e,i,r){for(const o of t){const a=gE(e,o);if(a){n.add(a);const c=ym(a._fallback,e,r);if(typeof c<"u"&&c!==e&&c!==i)return c}else if(a===!1&&typeof i<"u"&&e!==i)return null}return!1}function _u(n,t,e,i){const r=t._rootScopes,o=ym(t._fallback,e,i),a=[...n,...r],c=new Set;c.add(i);let u=_p(c,a,e,o||e,i);return u===null||typeof o<"u"&&o!==e&&(u=_p(c,a,o,u,i),u===null)?!1:gu(Array.from(c),[""],r,o,()=>_E(t,e,i))}function _p(n,t,e,i,r){for(;e;)e=mE(n,t,e,i,r);return e}function _E(n,t,e){const i=n._getTarget();t in i||(i[t]={});const r=i[t];return Gt(r)&&At(e)?e:r||{}}function yE(n,t,e,i){let r;for(const o of t)if(r=vm(hE(o,n),e),typeof r<"u")return mu(n,r)?_u(e,i,n,r):r}function vm(n,t){for(const e of t){if(!e)continue;const i=e[n];if(typeof i<"u")return i}}function yp(n){let t=n._keys;return t||(t=n._keys=vE(n._scopes)),t}function vE(n){const t=new Set;for(const e of n)for(const i of Object.keys(e).filter(r=>!r.startsWith("_")))t.add(i);return Array.from(t)}function bm(n,t,e,i){const{iScale:r}=n,{key:o="r"}=this._parsing,a=new Array(i);let c,u,f,h;for(c=0,u=i;c<u;++c)f=c+e,h=t[f],a[c]={r:r.parse(bi(h,o),f)};return a}const bE=Number.EPSILON||1e-14,wr=(n,t)=>t<n.length&&!n[t].skip&&n[t],xm=n=>n==="x"?"y":"x";function xE(n,t,e,i){const r=n.skip?t:n,o=t,a=e.skip?t:e,c=Ic(o,r),u=Ic(a,o);let f=c/(c+u),h=u/(c+u);f=isNaN(f)?0:f,h=isNaN(h)?0:h;const _=i*f,p=i*h;return{previous:{x:o.x-_*(a.x-r.x),y:o.y-_*(a.y-r.y)},next:{x:o.x+p*(a.x-r.x),y:o.y+p*(a.y-r.y)}}}function wE(n,t,e){const i=n.length;let r,o,a,c,u,f=wr(n,0);for(let h=0;h<i-1;++h)if(u=f,f=wr(n,h+1),!(!u||!f)){if(us(t[h],0,bE)){e[h]=e[h+1]=0;continue}r=e[h]/t[h],o=e[h+1]/t[h],c=Math.pow(r,2)+Math.pow(o,2),!(c<=9)&&(a=3/Math.sqrt(c),e[h]=r*a*t[h],e[h+1]=o*a*t[h])}}function SE(n,t,e="x"){const i=xm(e),r=n.length;let o,a,c,u=wr(n,0);for(let f=0;f<r;++f){if(a=c,c=u,u=wr(n,f+1),!c)continue;const h=c[e],_=c[i];a&&(o=(h-a[e])/3,c[`cp1${e}`]=h-o,c[`cp1${i}`]=_-o*t[f]),u&&(o=(u[e]-h)/3,c[`cp2${e}`]=h+o,c[`cp2${i}`]=_+o*t[f])}}function kE(n,t="x"){const e=xm(t),i=n.length,r=Array(i).fill(0),o=Array(i);let a,c,u,f=wr(n,0);for(a=0;a<i;++a)if(c=u,u=f,f=wr(n,a+1),!!u){if(f){const h=f[t]-u[t];r[a]=h!==0?(f[e]-u[e])/h:0}o[a]=c?f?On(r[a-1])!==On(r[a])?0:(r[a-1]+r[a])/2:r[a-1]:r[a]}wE(n,r,o),SE(n,o,t)}function ta(n,t,e){return Math.max(Math.min(n,e),t)}function EE(n,t){let e,i,r,o,a,c=ti(n[0],t);for(e=0,i=n.length;e<i;++e)a=o,o=c,c=e<i-1&&ti(n[e+1],t),o&&(r=n[e],a&&(r.cp1x=ta(r.cp1x,t.left,t.right),r.cp1y=ta(r.cp1y,t.top,t.bottom)),c&&(r.cp2x=ta(r.cp2x,t.left,t.right),r.cp2y=ta(r.cp2y,t.top,t.bottom)))}function CE(n,t,e,i,r){let o,a,c,u;if(t.spanGaps&&(n=n.filter(f=>!f.skip)),t.cubicInterpolationMode==="monotone")kE(n,r);else{let f=i?n[n.length-1]:n[0];for(o=0,a=n.length;o<a;++o)c=n[o],u=xE(f,c,n[Math.min(o+1,a-(i?0:1))%a],t.tension),c.cp1x=u.previous.x,c.cp1y=u.previous.y,c.cp2x=u.next.x,c.cp2y=u.next.y,f=c}t.capBezierPoints&&EE(n,e)}function yu(){return typeof window<"u"&&typeof document<"u"}function vu(n){let t=n.parentNode;return t&&t.toString()==="[object ShadowRoot]"&&(t=t.host),t}function La(n,t,e){let i;return typeof n=="string"?(i=parseInt(n,10),n.indexOf("%")!==-1&&(i=i/100*t.parentNode[e])):i=n,i}const ja=n=>n.ownerDocument.defaultView.getComputedStyle(n,null);function ME(n,t){return ja(n).getPropertyValue(t)}const AE=["top","right","bottom","left"];function Vi(n,t,e){const i={};e=e?"-"+e:"";for(let r=0;r<4;r++){const o=AE[r];i[o]=parseFloat(n[t+"-"+o+e])||0}return i.width=i.left+i.right,i.height=i.top+i.bottom,i}const LE=(n,t,e)=>(n>0||t>0)&&(!e||!e.shadowRoot);function PE(n,t){const e=n.touches,i=e&&e.length?e[0]:n,{offsetX:r,offsetY:o}=i;let a=!1,c,u;if(LE(r,o,n.target))c=r,u=o;else{const f=t.getBoundingClientRect();c=i.clientX-f.left,u=i.clientY-f.top,a=!0}return{x:c,y:u,box:a}}function Hi(n,t){if("native"in n)return n;const{canvas:e,currentDevicePixelRatio:i}=t,r=ja(e),o=r.boxSizing==="border-box",a=Vi(r,"padding"),c=Vi(r,"border","width"),{x:u,y:f,box:h}=PE(n,e),_=a.left+(h&&c.left),p=a.top+(h&&c.top);let{width:m,height:g}=t;return o&&(m-=a.width+c.width,g-=a.height+c.height),{x:Math.round((u-_)/m*e.width/i),y:Math.round((f-p)/g*e.height/i)}}function OE(n,t,e){let i,r;if(t===void 0||e===void 0){const o=n&&vu(n);if(!o)t=n.clientWidth,e=n.clientHeight;else{const a=o.getBoundingClientRect(),c=ja(o),u=Vi(c,"border","width"),f=Vi(c,"padding");t=a.width-f.width-u.width,e=a.height-f.height-u.height,i=La(c.maxWidth,o,"clientWidth"),r=La(c.maxHeight,o,"clientHeight")}}return{width:t,height:e,maxWidth:i||Ma,maxHeight:r||Ma}}const ea=n=>Math.round(n*10)/10;function RE(n,t,e,i){const r=ja(n),o=Vi(r,"margin"),a=La(r.maxWidth,n,"clientWidth")||Ma,c=La(r.maxHeight,n,"clientHeight")||Ma,u=OE(n,t,e);let{width:f,height:h}=u;if(r.boxSizing==="content-box"){const p=Vi(r,"border","width"),m=Vi(r,"padding");f-=m.width+p.width,h-=m.height+p.height}return f=Math.max(0,f-o.width),h=Math.max(0,i?f/i:h-o.height),f=ea(Math.min(f,a,u.maxWidth)),h=ea(Math.min(h,c,u.maxHeight)),f&&!h&&(h=ea(f/2)),(t!==void 0||e!==void 0)&&i&&u.height&&h>u.height&&(h=u.height,f=ea(Math.floor(h*i))),{width:f,height:h}}function vp(n,t,e){const i=t||1,r=Math.floor(n.height*i),o=Math.floor(n.width*i);n.height=Math.floor(n.height),n.width=Math.floor(n.width);const a=n.canvas;return a.style&&(e||!a.style.height&&!a.style.width)&&(a.style.height=`${n.height}px`,a.style.width=`${n.width}px`),n.currentDevicePixelRatio!==i||a.height!==r||a.width!==o?(n.currentDevicePixelRatio=i,a.height=r,a.width=o,n.ctx.setTransform(i,0,0,i,0,0),!0):!1}const IE=function(){let n=!1;try{const t={get passive(){return n=!0,!1}};yu()&&(window.addEventListener("test",null,t),window.removeEventListener("test",null,t))}catch{}return n}();function bp(n,t){const e=ME(n,t),i=e&&e.match(/^(\d+)(\.\d+)?px$/);return i?+i[1]:void 0}function Wi(n,t,e,i){return{x:n.x+e*(t.x-n.x),y:n.y+e*(t.y-n.y)}}function TE(n,t,e,i){return{x:n.x+e*(t.x-n.x),y:i==="middle"?e<.5?n.y:t.y:i==="after"?e<1?n.y:t.y:e>0?t.y:n.y}}function DE(n,t,e,i){const r={x:n.cp2x,y:n.cp2y},o={x:t.cp1x,y:t.cp1y},a=Wi(n,r,e),c=Wi(r,o,e),u=Wi(o,t,e),f=Wi(a,c,e),h=Wi(c,u,e);return Wi(f,h,e)}const BE=function(n,t){return{x(e){return n+n+t-e},setWidth(e){t=e},textAlign(e){return e==="center"?e:e==="right"?"left":"right"},xPlus(e,i){return e-i},leftForLtr(e,i){return e-i}}},FE=function(){return{x(n){return n},setWidth(n){},textAlign(n){return n},xPlus(n,t){return n+t},leftForLtr(n,t){return n}}};function vr(n,t,e){return n?BE(t,e):FE()}function wm(n,t){let e,i;(t==="ltr"||t==="rtl")&&(e=n.canvas.style,i=[e.getPropertyValue("direction"),e.getPropertyPriority("direction")],e.setProperty("direction",t,"important"),n.prevTextDirection=i)}function Sm(n,t){t!==void 0&&(delete n.prevTextDirection,n.canvas.style.setProperty("direction",t[0],t[1]))}function km(n){return n==="angle"?{between:bs,compare:Nk,normalize:Je}:{between:Zn,compare:(t,e)=>t-e,normalize:t=>t}}function xp({start:n,end:t,count:e,loop:i,style:r}){return{start:n%e,end:t%e,loop:i&&(t-n+1)%e===0,style:r}}function NE(n,t,e){const{property:i,start:r,end:o}=e,{between:a,normalize:c}=km(i),u=t.length;let{start:f,end:h,loop:_}=n,p,m;if(_){for(f+=u,h+=u,p=0,m=u;p<m&&a(c(t[f%u][i]),r,o);++p)f--,h--;f%=u,h%=u}return h<f&&(h+=u),{start:f,end:h,loop:_,style:n.style}}function Em(n,t,e){if(!e)return[n];const{property:i,start:r,end:o}=e,a=t.length,{compare:c,between:u,normalize:f}=km(i),{start:h,end:_,loop:p,style:m}=NE(n,t,e),g=[];let b=!1,w=null,C,M,D;const S=()=>u(r,D,C)&&c(r,D)!==0,k=()=>c(o,C)===0||u(o,D,C),O=()=>b||S(),I=()=>!b||k();for(let B=h,q=h;B<=_;++B)M=t[B%a],!M.skip&&(C=f(M[i]),C!==D&&(b=u(C,r,o),w===null&&O()&&(w=c(C,r)===0?B:q),w!==null&&I()&&(g.push(xp({start:w,end:B,loop:p,count:a,style:m})),w=null),q=B,D=C));return w!==null&&g.push(xp({start:w,end:_,loop:p,count:a,style:m})),g}function Cm(n,t){const e=[],i=n.segments;for(let r=0;r<i.length;r++){const o=Em(i[r],n.points,t);o.length&&e.push(...o)}return e}function HE(n,t,e,i){let r=0,o=t-1;if(e&&!i)for(;r<t&&!n[r].skip;)r++;for(;r<t&&n[r].skip;)r++;for(r%=t,e&&(o+=r);o>r&&n[o%t].skip;)o--;return o%=t,{start:r,end:o}}function WE(n,t,e,i){const r=n.length,o=[];let a=t,c=n[t],u;for(u=t+1;u<=e;++u){const f=n[u%r];f.skip||f.stop?c.skip||(i=!1,o.push({start:t%r,end:(u-1)%r,loop:i}),t=a=f.stop?u:null):(a=u,c.skip&&(t=u)),c=f}return a!==null&&o.push({start:t%r,end:a%r,loop:i}),o}function zE(n,t){const e=n.points,i=n.options.spanGaps,r=e.length;if(!r)return[];const o=!!n._loop,{start:a,end:c}=HE(e,r,o,i);if(i===!0)return wp(n,[{start:a,end:c,loop:o}],e,t);const u=c<a?c+r:c,f=!!n._fullLoop&&a===0&&c===r-1;return wp(n,WE(e,a,u,f),e,t)}function wp(n,t,e,i){return!i||!i.setContext||!e?t:jE(n,t,e,i)}function jE(n,t,e,i){const r=n._chart.getContext(),o=Sp(n.options),{_datasetIndex:a,options:{spanGaps:c}}=n,u=e.length,f=[];let h=o,_=t[0].start,p=_;function m(g,b,w,C){const M=c?-1:1;if(g!==b){for(g+=u;e[g%u].skip;)g-=M;for(;e[b%u].skip;)b+=M;g%u!==b%u&&(f.push({start:g%u,end:b%u,loop:w,style:C}),h=C,_=b%u)}}for(const g of t){_=c?_:g.start;let b=e[_%u],w;for(p=_+1;p<=g.end;p++){const C=e[p%u];w=Sp(i.setContext(wi(r,{type:"segment",p0:b,p1:C,p0DataIndex:(p-1)%u,p1DataIndex:p%u,datasetIndex:a}))),UE(w,h)&&m(_,p-1,g.loop,h),b=C,h=w}_<p-1&&m(_,p-1,g.loop,h)}return f}function Sp(n){return{backgroundColor:n.backgroundColor,borderCapStyle:n.borderCapStyle,borderDash:n.borderDash,borderDashOffset:n.borderDashOffset,borderJoinStyle:n.borderJoinStyle,borderWidth:n.borderWidth,borderColor:n.borderColor}}function UE(n,t){if(!t)return!1;const e=[],i=function(r,o){return du(o)?(e.includes(o)||e.push(o),e.indexOf(o)):o};return JSON.stringify(n,i)!==JSON.stringify(t,i)}/*!
438
- * Chart.js v4.4.8
439
- * https://www.chartjs.org
440
- * (c) 2025 Chart.js Contributors
441
- * Released under the MIT License
442
- */class VE{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,e,i,r){const o=e.listeners[r],a=e.duration;o.forEach(c=>c({chart:t,initial:e.initial,numSteps:a,currentStep:Math.min(i-e.start,a)}))}_refresh(){this._request||(this._running=!0,this._request=cm.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let e=0;this._charts.forEach((i,r)=>{if(!i.running||!i.items.length)return;const o=i.items;let a=o.length-1,c=!1,u;for(;a>=0;--a)u=o[a],u._active?(u._total>i.duration&&(i.duration=u._total),u.tick(t),c=!0):(o[a]=o[o.length-1],o.pop());c&&(r.draw(),this._notify(r,i,t,"progress")),o.length||(i.running=!1,this._notify(r,i,t,"complete"),i.initial=!1),e+=o.length}),this._lastDate=t,e===0&&(this._running=!1)}_getAnims(t){const e=this._charts;let i=e.get(t);return i||(i={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(t,i)),i}listen(t,e,i){this._getAnims(t).listeners[e].push(i)}add(t,e){!e||!e.length||this._getAnims(t).items.push(...e)}has(t){return this._getAnims(t).items.length>0}start(t){const e=this._charts.get(t);e&&(e.running=!0,e.start=Date.now(),e.duration=e.items.reduce((i,r)=>Math.max(i,r._duration),0),this._refresh())}running(t){if(!this._running)return!1;const e=this._charts.get(t);return!(!e||!e.running||!e.items.length)}stop(t){const e=this._charts.get(t);if(!e||!e.items.length)return;const i=e.items;let r=i.length-1;for(;r>=0;--r)i[r].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var qn=new VE;const kp="transparent",qE={boolean(n,t,e){return e>.5?t:n},color(n,t,e){const i=pp(n||kp),r=i.valid&&pp(t||kp);return r&&r.valid?r.mix(i,e).hexString():t},number(n,t,e){return n+(t-n)*e}};class $E{constructor(t,e,i,r){const o=e[i];r=es([t.to,r,o,t.from]);const a=es([t.from,o,r]);this._active=!0,this._fn=t.fn||qE[t.type||typeof a],this._easing=hs[t.easing]||hs.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=e,this._prop=i,this._from=a,this._to=r,this._promises=void 0}active(){return this._active}update(t,e,i){if(this._active){this._notify(!1);const r=this._target[this._prop],o=i-this._start,a=this._duration-o;this._start=i,this._duration=Math.floor(Math.max(a,t.duration)),this._total+=o,this._loop=!!t.loop,this._to=es([t.to,e,r,t.from]),this._from=es([t.from,r,e])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const e=t-this._start,i=this._duration,r=this._prop,o=this._from,a=this._loop,c=this._to;let u;if(this._active=o!==c&&(a||e<i),!this._active){this._target[r]=c,this._notify(!0);return}if(e<0){this._target[r]=o;return}u=e/i%2,u=a&&u>1?2-u:u,u=this._easing(Math.min(1,Math.max(0,u))),this._target[r]=this._fn(o,c,u)}wait(){const t=this._promises||(this._promises=[]);return new Promise((e,i)=>{t.push({res:e,rej:i})})}_notify(t){const e=t?"res":"rej",i=this._promises||[];for(let r=0;r<i.length;r++)i[r][e]()}}class Mm{constructor(t,e){this._chart=t,this._properties=new Map,this.configure(e)}configure(t){if(!At(t))return;const e=Object.keys(Kt.animation),i=this._properties;Object.getOwnPropertyNames(t).forEach(r=>{const o=t[r];if(!At(o))return;const a={};for(const c of e)a[c]=o[c];(Gt(o.properties)&&o.properties||[r]).forEach(c=>{(c===r||!i.has(c))&&i.set(c,a)})})}_animateOptions(t,e){const i=e.options,r=GE(t,i);if(!r)return[];const o=this._createAnimations(r,i);return i.$shared&&YE(t.options.$animations,i).then(()=>{t.options=i},()=>{}),o}_createAnimations(t,e){const i=this._properties,r=[],o=t.$animations||(t.$animations={}),a=Object.keys(e),c=Date.now();let u;for(u=a.length-1;u>=0;--u){const f=a[u];if(f.charAt(0)==="$")continue;if(f==="options"){r.push(...this._animateOptions(t,e));continue}const h=e[f];let _=o[f];const p=i.get(f);if(_)if(p&&_.active()){_.update(p,h,c);continue}else _.cancel();if(!p||!p.duration){t[f]=h;continue}o[f]=_=new $E(p,t,f,h),r.push(_)}return r}update(t,e){if(this._properties.size===0){Object.assign(t,e);return}const i=this._createAnimations(t,e);if(i.length)return qn.add(this._chart,i),!0}}function YE(n,t){const e=[],i=Object.keys(t);for(let r=0;r<i.length;r++){const o=n[i[r]];o&&o.active()&&e.push(o.wait())}return Promise.all(e)}function GE(n,t){if(!t)return;let e=n.options;if(!e){n.options=t;return}return e.$shared&&(n.options=e=Object.assign({},e,{$shared:!1,$animations:{}})),e}function Ep(n,t){const e=n&&n.options||{},i=e.reverse,r=e.min===void 0?t:0,o=e.max===void 0?t:0;return{start:i?o:r,end:i?r:o}}function KE(n,t,e){if(e===!1)return!1;const i=Ep(n,e),r=Ep(t,e);return{top:r.end,right:i.end,bottom:r.start,left:i.start}}function XE(n){let t,e,i,r;return At(n)?(t=n.top,e=n.right,i=n.bottom,r=n.left):t=e=i=r=n,{top:t,right:e,bottom:i,left:r,disabled:n===!1}}function Am(n,t){const e=[],i=n._getSortedDatasetMetas(t);let r,o;for(r=0,o=i.length;r<o;++r)e.push(i[r].index);return e}function Cp(n,t,e,i={}){const r=n.keys,o=i.mode==="single";let a,c,u,f;if(t===null)return;let h=!1;for(a=0,c=r.length;a<c;++a){if(u=+r[a],u===e){if(h=!0,i.all)continue;break}f=n.values[u],ee(f)&&(o||t===0||On(t)===On(f))&&(t+=f)}return!h&&!i.all?0:t}function JE(n,t){const{iScale:e,vScale:i}=t,r=e.axis==="x"?"x":"y",o=i.axis==="x"?"x":"y",a=Object.keys(n),c=new Array(a.length);let u,f,h;for(u=0,f=a.length;u<f;++u)h=a[u],c[u]={[r]:h,[o]:n[h]};return c}function gc(n,t){const e=n&&n.options.stacked;return e||e===void 0&&t.stack!==void 0}function ZE(n,t,e){return`${n.id}.${t.id}.${e.stack||e.type}`}function QE(n){const{min:t,max:e,minDefined:i,maxDefined:r}=n.getUserBounds();return{min:i?t:Number.NEGATIVE_INFINITY,max:r?e:Number.POSITIVE_INFINITY}}function tC(n,t,e){const i=n[t]||(n[t]={});return i[e]||(i[e]={})}function Mp(n,t,e,i){for(const r of t.getMatchingVisibleMetas(i).reverse()){const o=n[r.index];if(e&&o>0||!e&&o<0)return r.index}return null}function Ap(n,t){const{chart:e,_cachedMeta:i}=n,r=e._stacks||(e._stacks={}),{iScale:o,vScale:a,index:c}=i,u=o.axis,f=a.axis,h=ZE(o,a,i),_=t.length;let p;for(let m=0;m<_;++m){const g=t[m],{[u]:b,[f]:w}=g,C=g._stacks||(g._stacks={});p=C[f]=tC(r,h,b),p[c]=w,p._top=Mp(p,a,!0,i.type),p._bottom=Mp(p,a,!1,i.type);const M=p._visualValues||(p._visualValues={});M[c]=w}}function mc(n,t){const e=n.scales;return Object.keys(e).filter(i=>e[i].axis===t).shift()}function eC(n,t){return wi(n,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function nC(n,t,e){return wi(n,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:e,index:t,mode:"default",type:"data"})}function Yr(n,t){const e=n.controller.index,i=n.vScale&&n.vScale.axis;if(i){t=t||n._parsed;for(const r of t){const o=r._stacks;if(!o||o[i]===void 0||o[i][e]===void 0)return;delete o[i][e],o[i]._visualValues!==void 0&&o[i]._visualValues[e]!==void 0&&delete o[i]._visualValues[e]}}}const _c=n=>n==="reset"||n==="none",Lp=(n,t)=>t?n:Object.assign({},n),iC=(n,t,e)=>n&&!t.hidden&&t._stacked&&{keys:Am(e,!0),values:null};class yn{constructor(t,e){this.chart=t,this._ctx=t.ctx,this.index=e,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=gc(t.vScale,t),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(t){this.index!==t&&Yr(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,e=this._cachedMeta,i=this.getDataset(),r=(_,p,m,g)=>_==="x"?p:_==="r"?g:m,o=e.xAxisID=yt(i.xAxisID,mc(t,"x")),a=e.yAxisID=yt(i.yAxisID,mc(t,"y")),c=e.rAxisID=yt(i.rAxisID,mc(t,"r")),u=e.indexAxis,f=e.iAxisID=r(u,o,a,c),h=e.vAxisID=r(u,a,o,c);e.xScale=this.getScaleForId(o),e.yScale=this.getScaleForId(a),e.rScale=this.getScaleForId(c),e.iScale=this.getScaleForId(f),e.vScale=this.getScaleForId(h)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const e=this._cachedMeta;return t===e.iScale?e.vScale:e.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&hp(this._data,this),t._stacked&&Yr(t)}_dataCheck(){const t=this.getDataset(),e=t.data||(t.data=[]),i=this._data;if(At(e)){const r=this._cachedMeta;this._data=JE(e,r)}else if(i!==e){if(i){hp(i,this);const r=this._cachedMeta;Yr(r),r._parsed=[]}e&&Object.isExtensible(e)&&jk(e,this),this._syncList=[],this._data=e}}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const e=this._cachedMeta,i=this.getDataset();let r=!1;this._dataCheck();const o=e._stacked;e._stacked=gc(e.vScale,e),e.stack!==i.stack&&(r=!0,Yr(e),e.stack=i.stack),this._resyncElements(t),(r||o!==e._stacked)&&(Ap(this,e._parsed),e._stacked=gc(e.vScale,e))}configure(){const t=this.chart.config,e=t.datasetScopeKeys(this._type),i=t.getOptionScopes(this.getDataset(),e,!0);this.options=t.createResolver(i,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,e){const{_cachedMeta:i,_data:r}=this,{iScale:o,_stacked:a}=i,c=o.axis;let u=t===0&&e===r.length?!0:i._sorted,f=t>0&&i._parsed[t-1],h,_,p;if(this._parsing===!1)i._parsed=r,i._sorted=!0,p=r;else{Gt(r[t])?p=this.parseArrayData(i,r,t,e):At(r[t])?p=this.parseObjectData(i,r,t,e):p=this.parsePrimitiveData(i,r,t,e);const m=()=>_[c]===null||f&&_[c]<f[c];for(h=0;h<e;++h)i._parsed[h+t]=_=p[h],u&&(m()&&(u=!1),f=_);i._sorted=u}a&&Ap(this,p)}parsePrimitiveData(t,e,i,r){const{iScale:o,vScale:a}=t,c=o.axis,u=a.axis,f=o.getLabels(),h=o===a,_=new Array(r);let p,m,g;for(p=0,m=r;p<m;++p)g=p+i,_[p]={[c]:h||o.parse(f[g],g),[u]:a.parse(e[g],g)};return _}parseArrayData(t,e,i,r){const{xScale:o,yScale:a}=t,c=new Array(r);let u,f,h,_;for(u=0,f=r;u<f;++u)h=u+i,_=e[h],c[u]={x:o.parse(_[0],h),y:a.parse(_[1],h)};return c}parseObjectData(t,e,i,r){const{xScale:o,yScale:a}=t,{xAxisKey:c="x",yAxisKey:u="y"}=this._parsing,f=new Array(r);let h,_,p,m;for(h=0,_=r;h<_;++h)p=h+i,m=e[p],f[h]={x:o.parse(bi(m,c),p),y:a.parse(bi(m,u),p)};return f}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,e,i){const r=this.chart,o=this._cachedMeta,a=e[t.axis],c={keys:Am(r,!0),values:e._stacks[t.axis]._visualValues};return Cp(c,a,o.index,{mode:i})}updateRangeFromParsed(t,e,i,r){const o=i[e.axis];let a=o===null?NaN:o;const c=r&&i._stacks[e.axis];r&&c&&(r.values=c,a=Cp(r,o,this._cachedMeta.index)),t.min=Math.min(t.min,a),t.max=Math.max(t.max,a)}getMinMax(t,e){const i=this._cachedMeta,r=i._parsed,o=i._sorted&&t===i.iScale,a=r.length,c=this._getOtherScale(t),u=iC(e,i,this.chart),f={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:h,max:_}=QE(c);let p,m;function g(){m=r[p];const b=m[c.axis];return!ee(m[t.axis])||h>b||_<b}for(p=0;p<a&&!(!g()&&(this.updateRangeFromParsed(f,t,m,u),o));++p);if(o){for(p=a-1;p>=0;--p)if(!g()){this.updateRangeFromParsed(f,t,m,u);break}}return f}getAllParsedValues(t){const e=this._cachedMeta._parsed,i=[];let r,o,a;for(r=0,o=e.length;r<o;++r)a=e[r][t.axis],ee(a)&&i.push(a);return i}getMaxOverflow(){return!1}getLabelAndValue(t){const e=this._cachedMeta,i=e.iScale,r=e.vScale,o=this.getParsed(t);return{label:i?""+i.getLabelForValue(o[i.axis]):"",value:r?""+r.getLabelForValue(o[r.axis]):""}}_update(t){const e=this._cachedMeta;this.update(t||"default"),e._clip=XE(yt(this.options.clip,KE(e.xScale,e.yScale,this.getMaxOverflow())))}update(t){}draw(){const t=this._ctx,e=this.chart,i=this._cachedMeta,r=i.data||[],o=e.chartArea,a=[],c=this._drawStart||0,u=this._drawCount||r.length-c,f=this.options.drawActiveElementsOnTop;let h;for(i.dataset&&i.dataset.draw(t,o,c,u),h=c;h<c+u;++h){const _=r[h];_.hidden||(_.active&&f?a.push(_):_.draw(t,o))}for(h=0;h<a.length;++h)a[h].draw(t,o)}getStyle(t,e){const i=e?"active":"default";return t===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(i):this.resolveDataElementOptions(t||0,i)}getContext(t,e,i){const r=this.getDataset();let o;if(t>=0&&t<this._cachedMeta.data.length){const a=this._cachedMeta.data[t];o=a.$context||(a.$context=nC(this.getContext(),t,a)),o.parsed=this.getParsed(t),o.raw=r.data[t],o.index=o.dataIndex=t}else o=this.$context||(this.$context=eC(this.chart.getContext(),this.index)),o.dataset=r,o.index=o.datasetIndex=this.index;return o.active=!!e,o.mode=i,o}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,e){return this._resolveElementOptions(this.dataElementType.id,e,t)}_resolveElementOptions(t,e="default",i){const r=e==="active",o=this._cachedDataOpts,a=t+"-"+e,c=o[a],u=this.enableOptionSharing&&vs(i);if(c)return Lp(c,u);const f=this.chart.config,h=f.datasetElementScopeKeys(this._type,t),_=r?[`${t}Hover`,"hover",t,""]:[t,""],p=f.getOptionScopes(this.getDataset(),h),m=Object.keys(Kt.elements[t]),g=()=>this.getContext(i,r,e),b=f.resolveNamedOptions(p,m,g,_);return b.$shared&&(b.$shared=u,o[a]=Object.freeze(Lp(b,u))),b}_resolveAnimations(t,e,i){const r=this.chart,o=this._cachedDataOpts,a=`animation-${e}`,c=o[a];if(c)return c;let u;if(r.options.animation!==!1){const h=this.chart.config,_=h.datasetAnimationScopeKeys(this._type,e),p=h.getOptionScopes(this.getDataset(),_);u=h.createResolver(p,this.getContext(t,i,e))}const f=new Mm(r,u&&u.animations);return u&&u._cacheable&&(o[a]=Object.freeze(f)),f}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||_c(t)||this.chart._animationsDisabled}_getSharedOptions(t,e){const i=this.resolveDataElementOptions(t,e),r=this._sharedOptions,o=this.getSharedOptions(i),a=this.includeOptions(e,o)||o!==r;return this.updateSharedOptions(o,e,i),{sharedOptions:o,includeOptions:a}}updateElement(t,e,i,r){_c(r)?Object.assign(t,i):this._resolveAnimations(e,r).update(t,i)}updateSharedOptions(t,e,i){t&&!_c(e)&&this._resolveAnimations(void 0,e).update(t,i)}_setStyle(t,e,i,r){t.active=r;const o=this.getStyle(e,r);this._resolveAnimations(e,i,r).update(t,{options:!r&&this.getSharedOptions(o)||o})}removeHoverStyle(t,e,i){this._setStyle(t,i,"active",!1)}setHoverStyle(t,e,i){this._setStyle(t,i,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const e=this._data,i=this._cachedMeta.data;for(const[c,u,f]of this._syncList)this[c](u,f);this._syncList=[];const r=i.length,o=e.length,a=Math.min(o,r);a&&this.parse(0,a),o>r?this._insertElements(r,o-r,t):o<r&&this._removeElements(o,r-o)}_insertElements(t,e,i=!0){const r=this._cachedMeta,o=r.data,a=t+e;let c;const u=f=>{for(f.length+=e,c=f.length-1;c>=a;c--)f[c]=f[c-e]};for(u(o),c=t;c<a;++c)o[c]=new this.dataElementType;this._parsing&&u(r._parsed),this.parse(t,e),i&&this.updateElements(o,t,e,"reset")}updateElements(t,e,i,r){}_removeElements(t,e){const i=this._cachedMeta;if(this._parsing){const r=i._parsed.splice(t,e);i._stacked&&Yr(i,r)}i.data.splice(t,e)}_sync(t){if(this._parsing)this._syncList.push(t);else{const[e,i,r]=t;this[e](i,r)}this.chart._dataChanges.push([this.index,...t])}_onDataPush(){const t=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-t,t])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(t,e){e&&this._sync(["_removeElements",t,e]);const i=arguments.length-2;i&&this._sync(["_insertElements",t,i])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}it(yn,"defaults",{}),it(yn,"datasetElementType",null),it(yn,"dataElementType",null);function rC(n,t){if(!n._cache.$bar){const e=n.getMatchingVisibleMetas(t);let i=[];for(let r=0,o=e.length;r<o;r++)i=i.concat(e[r].controller.getAllParsedValues(n));n._cache.$bar=lm(i.sort((r,o)=>r-o))}return n._cache.$bar}function sC(n){const t=n.iScale,e=rC(t,n.type);let i=t._length,r,o,a,c;const u=()=>{a===32767||a===-32768||(vs(c)&&(i=Math.min(i,Math.abs(a-c)||i)),c=a)};for(r=0,o=e.length;r<o;++r)a=t.getPixelForValue(e[r]),u();for(c=void 0,r=0,o=t.ticks.length;r<o;++r)a=t.getPixelForTick(r),u();return i}function oC(n,t,e,i){const r=e.barThickness;let o,a;return Ct(r)?(o=t.min*e.categoryPercentage,a=e.barPercentage):(o=r*i,a=1),{chunk:o/i,ratio:a,start:t.pixels[n]-o/2}}function aC(n,t,e,i){const r=t.pixels,o=r[n];let a=n>0?r[n-1]:null,c=n<r.length-1?r[n+1]:null;const u=e.categoryPercentage;a===null&&(a=o-(c===null?t.end-t.start:c-o)),c===null&&(c=o+o-a);const f=o-(o-Math.min(a,c))/2*u;return{chunk:Math.abs(c-a)/2*u/i,ratio:e.barPercentage,start:f}}function lC(n,t,e,i){const r=e.parse(n[0],i),o=e.parse(n[1],i),a=Math.min(r,o),c=Math.max(r,o);let u=a,f=c;Math.abs(a)>Math.abs(c)&&(u=c,f=a),t[e.axis]=f,t._custom={barStart:u,barEnd:f,start:r,end:o,min:a,max:c}}function Lm(n,t,e,i){return Gt(n)?lC(n,t,e,i):t[e.axis]=e.parse(n,i),t}function Pp(n,t,e,i){const r=n.iScale,o=n.vScale,a=r.getLabels(),c=r===o,u=[];let f,h,_,p;for(f=e,h=e+i;f<h;++f)p=t[f],_={},_[r.axis]=c||r.parse(a[f],f),u.push(Lm(p,_,o,f));return u}function yc(n){return n&&n.barStart!==void 0&&n.barEnd!==void 0}function cC(n,t,e){return n!==0?On(n):(t.isHorizontal()?1:-1)*(t.min>=e?1:-1)}function uC(n){let t,e,i,r,o;return n.horizontal?(t=n.base>n.x,e="left",i="right"):(t=n.base<n.y,e="bottom",i="top"),t?(r="end",o="start"):(r="start",o="end"),{start:e,end:i,reverse:t,top:r,bottom:o}}function hC(n,t,e,i){let r=t.borderSkipped;const o={};if(!r){n.borderSkipped=o;return}if(r===!0){n.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}const{start:a,end:c,reverse:u,top:f,bottom:h}=uC(n);r==="middle"&&e&&(n.enableBorderRadius=!0,(e._top||0)===i?r=f:(e._bottom||0)===i?r=h:(o[Op(h,a,c,u)]=!0,r=f)),o[Op(r,a,c,u)]=!0,n.borderSkipped=o}function Op(n,t,e,i){return i?(n=fC(n,t,e),n=Rp(n,e,t)):n=Rp(n,t,e),n}function fC(n,t,e){return n===t?e:n===e?t:n}function Rp(n,t,e){return n==="start"?t:n==="end"?e:n}function dC(n,{inflateAmount:t},e){n.inflateAmount=t==="auto"?e===1?.33:0:t}class ga extends yn{parsePrimitiveData(t,e,i,r){return Pp(t,e,i,r)}parseArrayData(t,e,i,r){return Pp(t,e,i,r)}parseObjectData(t,e,i,r){const{iScale:o,vScale:a}=t,{xAxisKey:c="x",yAxisKey:u="y"}=this._parsing,f=o.axis==="x"?c:u,h=a.axis==="x"?c:u,_=[];let p,m,g,b;for(p=i,m=i+r;p<m;++p)b=e[p],g={},g[o.axis]=o.parse(bi(b,f),p),_.push(Lm(bi(b,h),g,a,p));return _}updateRangeFromParsed(t,e,i,r){super.updateRangeFromParsed(t,e,i,r);const o=i._custom;o&&e===this._cachedMeta.vScale&&(t.min=Math.min(t.min,o.min),t.max=Math.max(t.max,o.max))}getMaxOverflow(){return 0}getLabelAndValue(t){const e=this._cachedMeta,{iScale:i,vScale:r}=e,o=this.getParsed(t),a=o._custom,c=yc(a)?"["+a.start+", "+a.end+"]":""+r.getLabelForValue(o[r.axis]);return{label:""+i.getLabelForValue(o[i.axis]),value:c}}initialize(){this.enableOptionSharing=!0,super.initialize();const t=this._cachedMeta;t.stack=this.getDataset().stack}update(t){const e=this._cachedMeta;this.updateElements(e.data,0,e.data.length,t)}updateElements(t,e,i,r){const o=r==="reset",{index:a,_cachedMeta:{vScale:c}}=this,u=c.getBasePixel(),f=c.isHorizontal(),h=this._getRuler(),{sharedOptions:_,includeOptions:p}=this._getSharedOptions(e,r);for(let m=e;m<e+i;m++){const g=this.getParsed(m),b=o||Ct(g[c.axis])?{base:u,head:u}:this._calculateBarValuePixels(m),w=this._calculateBarIndexPixels(m,h),C=(g._stacks||{})[c.axis],M={horizontal:f,base:b.base,enableBorderRadius:!C||yc(g._custom)||a===C._top||a===C._bottom,x:f?b.head:w.center,y:f?w.center:b.head,height:f?w.size:Math.abs(b.size),width:f?Math.abs(b.size):w.size};p&&(M.options=_||this.resolveDataElementOptions(m,t[m].active?"active":r));const D=M.options||t[m].options;hC(M,D,C,a),dC(M,D,h.ratio),this.updateElement(t[m],m,M,r)}}_getStacks(t,e){const{iScale:i}=this._cachedMeta,r=i.getMatchingVisibleMetas(this._type).filter(h=>h.controller.options.grouped),o=i.options.stacked,a=[],c=this._cachedMeta.controller.getParsed(e),u=c&&c[i.axis],f=h=>{const _=h._parsed.find(m=>m[i.axis]===u),p=_&&_[h.vScale.axis];if(Ct(p)||isNaN(p))return!0};for(const h of r)if(!(e!==void 0&&f(h))&&((o===!1||a.indexOf(h.stack)===-1||o===void 0&&h.stack===void 0)&&a.push(h.stack),h.index===t))break;return a.length||a.push(void 0),a}_getStackCount(t){return this._getStacks(void 0,t).length}_getStackIndex(t,e,i){const r=this._getStacks(t,i),o=e!==void 0?r.indexOf(e):-1;return o===-1?r.length-1:o}_getRuler(){const t=this.options,e=this._cachedMeta,i=e.iScale,r=[];let o,a;for(o=0,a=e.data.length;o<a;++o)r.push(i.getPixelForValue(this.getParsed(o)[i.axis],o));const c=t.barThickness;return{min:c||sC(e),pixels:r,start:i._startPixel,end:i._endPixel,stackCount:this._getStackCount(),scale:i,grouped:t.grouped,ratio:c?1:t.categoryPercentage*t.barPercentage}}_calculateBarValuePixels(t){const{_cachedMeta:{vScale:e,_stacked:i,index:r},options:{base:o,minBarLength:a}}=this,c=o||0,u=this.getParsed(t),f=u._custom,h=yc(f);let _=u[e.axis],p=0,m=i?this.applyStack(e,u,i):_,g,b;m!==_&&(p=m-_,m=_),h&&(_=f.barStart,m=f.barEnd-f.barStart,_!==0&&On(_)!==On(f.barEnd)&&(p=0),p+=_);const w=!Ct(o)&&!h?o:p;let C=e.getPixelForValue(w);if(this.chart.getDataVisibility(t)?g=e.getPixelForValue(p+m):g=C,b=g-C,Math.abs(b)<a){b=cC(b,e,c)*a,_===c&&(C-=b/2);const M=e.getPixelForDecimal(0),D=e.getPixelForDecimal(1),S=Math.min(M,D),k=Math.max(M,D);C=Math.max(Math.min(C,k),S),g=C+b,i&&!h&&(u._stacks[e.axis]._visualValues[r]=e.getValueForPixel(g)-e.getValueForPixel(C))}if(C===e.getPixelForValue(c)){const M=On(b)*e.getLineWidthForValue(c)/2;C+=M,b-=M}return{size:b,base:C,head:g,center:g+b/2}}_calculateBarIndexPixels(t,e){const i=e.scale,r=this.options,o=r.skipNull,a=yt(r.maxBarThickness,1/0);let c,u;if(e.grouped){const f=o?this._getStackCount(t):e.stackCount,h=r.barThickness==="flex"?aC(t,e,r,f):oC(t,e,r,f),_=this._getStackIndex(this.index,this._cachedMeta.stack,o?t:void 0);c=h.start+h.chunk*_+h.chunk/2,u=Math.min(a,h.chunk*h.ratio)}else c=i.getPixelForValue(this.getParsed(t)[i.axis],t),u=Math.min(a,e.min*e.ratio);return{base:c-u/2,head:c+u/2,center:c,size:u}}draw(){const t=this._cachedMeta,e=t.vScale,i=t.data,r=i.length;let o=0;for(;o<r;++o)this.getParsed(o)[e.axis]!==null&&!i[o].hidden&&i[o].draw(this._ctx)}}it(ga,"id","bar"),it(ga,"defaults",{datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}}),it(ga,"overrides",{scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}});class ma extends yn{initialize(){this.enableOptionSharing=!0,super.initialize()}parsePrimitiveData(t,e,i,r){const o=super.parsePrimitiveData(t,e,i,r);for(let a=0;a<o.length;a++)o[a]._custom=this.resolveDataElementOptions(a+i).radius;return o}parseArrayData(t,e,i,r){const o=super.parseArrayData(t,e,i,r);for(let a=0;a<o.length;a++){const c=e[i+a];o[a]._custom=yt(c[2],this.resolveDataElementOptions(a+i).radius)}return o}parseObjectData(t,e,i,r){const o=super.parseObjectData(t,e,i,r);for(let a=0;a<o.length;a++){const c=e[i+a];o[a]._custom=yt(c&&c.r&&+c.r,this.resolveDataElementOptions(a+i).radius)}return o}getMaxOverflow(){const t=this._cachedMeta.data;let e=0;for(let i=t.length-1;i>=0;--i)e=Math.max(e,t[i].size(this.resolveDataElementOptions(i))/2);return e>0&&e}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart.data.labels||[],{xScale:r,yScale:o}=e,a=this.getParsed(t),c=r.getLabelForValue(a.x),u=o.getLabelForValue(a.y),f=a._custom;return{label:i[t]||"",value:"("+c+", "+u+(f?", "+f:"")+")"}}update(t){const e=this._cachedMeta.data;this.updateElements(e,0,e.length,t)}updateElements(t,e,i,r){const o=r==="reset",{iScale:a,vScale:c}=this._cachedMeta,{sharedOptions:u,includeOptions:f}=this._getSharedOptions(e,r),h=a.axis,_=c.axis;for(let p=e;p<e+i;p++){const m=t[p],g=!o&&this.getParsed(p),b={},w=b[h]=o?a.getPixelForDecimal(.5):a.getPixelForValue(g[h]),C=b[_]=o?c.getBasePixel():c.getPixelForValue(g[_]);b.skip=isNaN(w)||isNaN(C),f&&(b.options=u||this.resolveDataElementOptions(p,m.active?"active":r),o&&(b.options.radius=0)),this.updateElement(m,p,b,r)}}resolveDataElementOptions(t,e){const i=this.getParsed(t);let r=super.resolveDataElementOptions(t,e);r.$shared&&(r=Object.assign({},r,{$shared:!1}));const o=r.radius;return e!=="active"&&(r.radius=0),r.radius+=yt(i&&i._custom,o),r}}it(ma,"id","bubble"),it(ma,"defaults",{datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}}),it(ma,"overrides",{scales:{x:{type:"linear"},y:{type:"linear"}}});function pC(n,t,e){let i=1,r=1,o=0,a=0;if(t<Ut){const c=n,u=c+t,f=Math.cos(c),h=Math.sin(c),_=Math.cos(u),p=Math.sin(u),m=(D,S,k)=>bs(D,c,u,!0)?1:Math.max(S,S*e,k,k*e),g=(D,S,k)=>bs(D,c,u,!0)?-1:Math.min(S,S*e,k,k*e),b=m(0,f,_),w=m(re,h,p),C=g(Vt,f,_),M=g(Vt+re,h,p);i=(b-C)/2,r=(w-M)/2,o=-(b+C)/2,a=-(w+M)/2}return{ratioX:i,ratioY:r,offsetX:o,offsetY:a}}class ji extends yn{constructor(t,e){super(t,e),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,e){const i=this.getDataset().data,r=this._cachedMeta;if(this._parsing===!1)r._parsed=i;else{let o=u=>+i[u];if(At(i[t])){const{key:u="value"}=this._parsing;o=f=>+bi(i[f],u)}let a,c;for(a=t,c=t+e;a<c;++a)r._parsed[a]=o(a)}}_getRotation(){return _n(this.options.rotation-90)}_getCircumference(){return _n(this.options.circumference)}_getRotationExtents(){let t=Ut,e=-Ut;for(let i=0;i<this.chart.data.datasets.length;++i)if(this.chart.isDatasetVisible(i)&&this.chart.getDatasetMeta(i).type===this._type){const r=this.chart.getDatasetMeta(i).controller,o=r._getRotation(),a=r._getCircumference();t=Math.min(t,o),e=Math.max(e,o+a)}return{rotation:t,circumference:e-t}}update(t){const e=this.chart,{chartArea:i}=e,r=this._cachedMeta,o=r.data,a=this.getMaxBorderWidth()+this.getMaxOffset(o)+this.options.spacing,c=Math.max((Math.min(i.width,i.height)-a)/2,0),u=Math.min(Mk(this.options.cutout,c),1),f=this._getRingWeight(this.index),{circumference:h,rotation:_}=this._getRotationExtents(),{ratioX:p,ratioY:m,offsetX:g,offsetY:b}=pC(_,h,u),w=(i.width-a)/p,C=(i.height-a)/m,M=Math.max(Math.min(w,C)/2,0),D=im(this.options.radius,M),S=Math.max(D*u,0),k=(D-S)/this._getVisibleDatasetWeightTotal();this.offsetX=g*D,this.offsetY=b*D,r.total=this.calculateTotal(),this.outerRadius=D-k*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-k*f,0),this.updateElements(o,0,o.length,t)}_circumference(t,e){const i=this.options,r=this._cachedMeta,o=this._getCircumference();return e&&i.animation.animateRotate||!this.chart.getDataVisibility(t)||r._parsed[t]===null||r.data[t].hidden?0:this.calculateCircumference(r._parsed[t]*o/Ut)}updateElements(t,e,i,r){const o=r==="reset",a=this.chart,c=a.chartArea,f=a.options.animation,h=(c.left+c.right)/2,_=(c.top+c.bottom)/2,p=o&&f.animateScale,m=p?0:this.innerRadius,g=p?0:this.outerRadius,{sharedOptions:b,includeOptions:w}=this._getSharedOptions(e,r);let C=this._getRotation(),M;for(M=0;M<e;++M)C+=this._circumference(M,o);for(M=e;M<e+i;++M){const D=this._circumference(M,o),S=t[M],k={x:h+this.offsetX,y:_+this.offsetY,startAngle:C,endAngle:C+D,circumference:D,outerRadius:g,innerRadius:m};w&&(k.options=b||this.resolveDataElementOptions(M,S.active?"active":r)),C+=D,this.updateElement(S,M,k,r)}}calculateTotal(){const t=this._cachedMeta,e=t.data;let i=0,r;for(r=0;r<e.length;r++){const o=t._parsed[r];o!==null&&!isNaN(o)&&this.chart.getDataVisibility(r)&&!e[r].hidden&&(i+=Math.abs(o))}return i}calculateCircumference(t){const e=this._cachedMeta.total;return e>0&&!isNaN(t)?Ut*(Math.abs(t)/e):0}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart,r=i.data.labels||[],o=Ls(e._parsed[t],i.options.locale);return{label:r[t]||"",value:o}}getMaxBorderWidth(t){let e=0;const i=this.chart;let r,o,a,c,u;if(!t){for(r=0,o=i.data.datasets.length;r<o;++r)if(i.isDatasetVisible(r)){a=i.getDatasetMeta(r),t=a.data,c=a.controller;break}}if(!t)return 0;for(r=0,o=t.length;r<o;++r)u=c.resolveDataElementOptions(r),u.borderAlign!=="inner"&&(e=Math.max(e,u.borderWidth||0,u.hoverBorderWidth||0));return e}getMaxOffset(t){let e=0;for(let i=0,r=t.length;i<r;++i){const o=this.resolveDataElementOptions(i);e=Math.max(e,o.offset||0,o.hoverOffset||0)}return e}_getRingWeightOffset(t){let e=0;for(let i=0;i<t;++i)this.chart.isDatasetVisible(i)&&(e+=this._getRingWeight(i));return e}_getRingWeight(t){return Math.max(yt(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}it(ji,"id","doughnut"),it(ji,"defaults",{datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"}),it(ji,"descriptors",{_scriptable:t=>t!=="spacing",_indexable:t=>t!=="spacing"&&!t.startsWith("borderDash")&&!t.startsWith("hoverBorderDash")}),it(ji,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:i,color:r}}=t.legend.options;return e.labels.map((o,a)=>{const u=t.getDatasetMeta(0).controller.getStyle(a);return{text:o,fillStyle:u.backgroundColor,strokeStyle:u.borderColor,fontColor:r,lineWidth:u.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(a),index:a}})}return[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}}}});class _a extends yn{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){const e=this._cachedMeta,{dataset:i,data:r=[],_dataset:o}=e,a=this.chart._animationsDisabled;let{start:c,count:u}=hm(e,r,a);this._drawStart=c,this._drawCount=u,fm(e)&&(c=0,u=r.length),i._chart=this.chart,i._datasetIndex=this.index,i._decimated=!!o._decimated,i.points=r;const f=this.resolveDatasetElementOptions(t);this.options.showLine||(f.borderWidth=0),f.segment=this.options.segment,this.updateElement(i,void 0,{animated:!a,options:f},t),this.updateElements(r,c,u,t)}updateElements(t,e,i,r){const o=r==="reset",{iScale:a,vScale:c,_stacked:u,_dataset:f}=this._cachedMeta,{sharedOptions:h,includeOptions:_}=this._getSharedOptions(e,r),p=a.axis,m=c.axis,{spanGaps:g,segment:b}=this.options,w=br(g)?g:Number.POSITIVE_INFINITY,C=this.chart._animationsDisabled||o||r==="none",M=e+i,D=t.length;let S=e>0&&this.getParsed(e-1);for(let k=0;k<D;++k){const O=t[k],I=C?O:{};if(k<e||k>=M){I.skip=!0;continue}const B=this.getParsed(k),q=Ct(B[m]),z=I[p]=a.getPixelForValue(B[p],k),j=I[m]=o||q?c.getBasePixel():c.getPixelForValue(u?this.applyStack(c,B,u):B[m],k);I.skip=isNaN(z)||isNaN(j)||q,I.stop=k>0&&Math.abs(B[p]-S[p])>w,b&&(I.parsed=B,I.raw=f.data[k]),_&&(I.options=h||this.resolveDataElementOptions(k,O.active?"active":r)),C||this.updateElement(O,k,I,r),S=B}}getMaxOverflow(){const t=this._cachedMeta,e=t.dataset,i=e.options&&e.options.borderWidth||0,r=t.data||[];if(!r.length)return i;const o=r[0].size(this.resolveDataElementOptions(0)),a=r[r.length-1].size(this.resolveDataElementOptions(r.length-1));return Math.max(i,o,a)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}it(_a,"id","line"),it(_a,"defaults",{datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1}),it(_a,"overrides",{scales:{_index_:{type:"category"},_value_:{type:"linear"}}});class ds extends yn{constructor(t,e){super(t,e),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart,r=i.data.labels||[],o=Ls(e._parsed[t].r,i.options.locale);return{label:r[t]||"",value:o}}parseObjectData(t,e,i,r){return bm.bind(this)(t,e,i,r)}update(t){const e=this._cachedMeta.data;this._updateRadius(),this.updateElements(e,0,e.length,t)}getMinMax(){const t=this._cachedMeta,e={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return t.data.forEach((i,r)=>{const o=this.getParsed(r).r;!isNaN(o)&&this.chart.getDataVisibility(r)&&(o<e.min&&(e.min=o),o>e.max&&(e.max=o))}),e}_updateRadius(){const t=this.chart,e=t.chartArea,i=t.options,r=Math.min(e.right-e.left,e.bottom-e.top),o=Math.max(r/2,0),a=Math.max(i.cutoutPercentage?o/100*i.cutoutPercentage:1,0),c=(o-a)/t.getVisibleDatasetCount();this.outerRadius=o-c*this.index,this.innerRadius=this.outerRadius-c}updateElements(t,e,i,r){const o=r==="reset",a=this.chart,u=a.options.animation,f=this._cachedMeta.rScale,h=f.xCenter,_=f.yCenter,p=f.getIndexAngle(0)-.5*Vt;let m=p,g;const b=360/this.countVisibleElements();for(g=0;g<e;++g)m+=this._computeAngle(g,r,b);for(g=e;g<e+i;g++){const w=t[g];let C=m,M=m+this._computeAngle(g,r,b),D=a.getDataVisibility(g)?f.getDistanceFromCenterForValue(this.getParsed(g).r):0;m=M,o&&(u.animateScale&&(D=0),u.animateRotate&&(C=M=p));const S={x:h,y:_,innerRadius:0,outerRadius:D,startAngle:C,endAngle:M,options:this.resolveDataElementOptions(g,w.active?"active":r)};this.updateElement(w,g,S,r)}}countVisibleElements(){const t=this._cachedMeta;let e=0;return t.data.forEach((i,r)=>{!isNaN(this.getParsed(r).r)&&this.chart.getDataVisibility(r)&&e++}),e}_computeAngle(t,e,i){return this.chart.getDataVisibility(t)?_n(this.resolveDataElementOptions(t,e).angle||i):0}}it(ds,"id","polarArea"),it(ds,"defaults",{dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0}),it(ds,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:i,color:r}}=t.legend.options;return e.labels.map((o,a)=>{const u=t.getDatasetMeta(0).controller.getStyle(a);return{text:o,fillStyle:u.backgroundColor,strokeStyle:u.borderColor,fontColor:r,lineWidth:u.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(a),index:a}})}return[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}});class Bc extends ji{}it(Bc,"id","pie"),it(Bc,"defaults",{cutout:0,rotation:0,circumference:360,radius:"100%"});class ya extends yn{getLabelAndValue(t){const e=this._cachedMeta.vScale,i=this.getParsed(t);return{label:e.getLabels()[t],value:""+e.getLabelForValue(i[e.axis])}}parseObjectData(t,e,i,r){return bm.bind(this)(t,e,i,r)}update(t){const e=this._cachedMeta,i=e.dataset,r=e.data||[],o=e.iScale.getLabels();if(i.points=r,t!=="resize"){const a=this.resolveDatasetElementOptions(t);this.options.showLine||(a.borderWidth=0);const c={_loop:!0,_fullLoop:o.length===r.length,options:a};this.updateElement(i,void 0,c,t)}this.updateElements(r,0,r.length,t)}updateElements(t,e,i,r){const o=this._cachedMeta.rScale,a=r==="reset";for(let c=e;c<e+i;c++){const u=t[c],f=this.resolveDataElementOptions(c,u.active?"active":r),h=o.getPointPositionForValue(c,this.getParsed(c).r),_=a?o.xCenter:h.x,p=a?o.yCenter:h.y,m={x:_,y:p,angle:h.angle,skip:isNaN(_)||isNaN(p),options:f};this.updateElement(u,c,m,r)}}}it(ya,"id","radar"),it(ya,"defaults",{datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}}),it(ya,"overrides",{aspectRatio:1,scales:{r:{type:"radialLinear"}}});class va extends yn{getLabelAndValue(t){const e=this._cachedMeta,i=this.chart.data.labels||[],{xScale:r,yScale:o}=e,a=this.getParsed(t),c=r.getLabelForValue(a.x),u=o.getLabelForValue(a.y);return{label:i[t]||"",value:"("+c+", "+u+")"}}update(t){const e=this._cachedMeta,{data:i=[]}=e,r=this.chart._animationsDisabled;let{start:o,count:a}=hm(e,i,r);if(this._drawStart=o,this._drawCount=a,fm(e)&&(o=0,a=i.length),this.options.showLine){this.datasetElementType||this.addElements();const{dataset:c,_dataset:u}=e;c._chart=this.chart,c._datasetIndex=this.index,c._decimated=!!u._decimated,c.points=i;const f=this.resolveDatasetElementOptions(t);f.segment=this.options.segment,this.updateElement(c,void 0,{animated:!r,options:f},t)}else this.datasetElementType&&(delete e.dataset,this.datasetElementType=!1);this.updateElements(i,o,a,t)}addElements(){const{showLine:t}=this.options;!this.datasetElementType&&t&&(this.datasetElementType=this.chart.registry.getElement("line")),super.addElements()}updateElements(t,e,i,r){const o=r==="reset",{iScale:a,vScale:c,_stacked:u,_dataset:f}=this._cachedMeta,h=this.resolveDataElementOptions(e,r),_=this.getSharedOptions(h),p=this.includeOptions(r,_),m=a.axis,g=c.axis,{spanGaps:b,segment:w}=this.options,C=br(b)?b:Number.POSITIVE_INFINITY,M=this.chart._animationsDisabled||o||r==="none";let D=e>0&&this.getParsed(e-1);for(let S=e;S<e+i;++S){const k=t[S],O=this.getParsed(S),I=M?k:{},B=Ct(O[g]),q=I[m]=a.getPixelForValue(O[m],S),z=I[g]=o||B?c.getBasePixel():c.getPixelForValue(u?this.applyStack(c,O,u):O[g],S);I.skip=isNaN(q)||isNaN(z)||B,I.stop=S>0&&Math.abs(O[m]-D[m])>C,w&&(I.parsed=O,I.raw=f.data[S]),p&&(I.options=_||this.resolveDataElementOptions(S,k.active?"active":r)),M||this.updateElement(k,S,I,r),D=O}this.updateSharedOptions(_,r,h)}getMaxOverflow(){const t=this._cachedMeta,e=t.data||[];if(!this.options.showLine){let c=0;for(let u=e.length-1;u>=0;--u)c=Math.max(c,e[u].size(this.resolveDataElementOptions(u))/2);return c>0&&c}const i=t.dataset,r=i.options&&i.options.borderWidth||0;if(!e.length)return r;const o=e[0].size(this.resolveDataElementOptions(0)),a=e[e.length-1].size(this.resolveDataElementOptions(e.length-1));return Math.max(r,o,a)/2}}it(va,"id","scatter"),it(va,"defaults",{datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1}),it(va,"overrides",{interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}});var gC=Object.freeze({__proto__:null,BarController:ga,BubbleController:ma,DoughnutController:ji,LineController:_a,PieController:Bc,PolarAreaController:ds,RadarController:ya,ScatterController:va});function Fi(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class bu{constructor(t){it(this,"options");this.options=t||{}}static override(t){Object.assign(bu.prototype,t)}init(){}formats(){return Fi()}parse(){return Fi()}format(){return Fi()}add(){return Fi()}diff(){return Fi()}startOf(){return Fi()}endOf(){return Fi()}}var mC={_date:bu};function _C(n,t,e,i){const{controller:r,data:o,_sorted:a}=n,c=r._cachedMeta.iScale,u=n.dataset&&n.dataset.options?n.dataset.options.spanGaps:null;if(c&&t===c.axis&&t!=="r"&&a&&o.length){const f=c._reversePixels?Wk:Qn;if(i){if(r._sharedOptions){const h=o[0],_=typeof h.getRange=="function"&&h.getRange(t);if(_){const p=f(o,t,e-_),m=f(o,t,e+_);return{lo:p.lo,hi:m.hi}}}}else{const h=f(o,t,e);if(u){const{vScale:_}=r._cachedMeta,{_parsed:p}=n,m=p.slice(0,h.lo+1).reverse().findIndex(b=>!Ct(b[_.axis]));h.lo-=Math.max(0,m);const g=p.slice(h.hi).findIndex(b=>!Ct(b[_.axis]));h.hi+=Math.max(0,g)}return h}}return{lo:0,hi:o.length-1}}function Ua(n,t,e,i,r){const o=n.getSortedVisibleDatasetMetas(),a=e[t];for(let c=0,u=o.length;c<u;++c){const{index:f,data:h}=o[c],{lo:_,hi:p}=_C(o[c],t,a,r);for(let m=_;m<=p;++m){const g=h[m];g.skip||i(g,f,m)}}}function yC(n){const t=n.indexOf("x")!==-1,e=n.indexOf("y")!==-1;return function(i,r){const o=t?Math.abs(i.x-r.x):0,a=e?Math.abs(i.y-r.y):0;return Math.sqrt(Math.pow(o,2)+Math.pow(a,2))}}function vc(n,t,e,i,r){const o=[];return!r&&!n.isPointInArea(t)||Ua(n,e,t,function(c,u,f){!r&&!ti(c,n.chartArea,0)||c.inRange(t.x,t.y,i)&&o.push({element:c,datasetIndex:u,index:f})},!0),o}function vC(n,t,e,i){let r=[];function o(a,c,u){const{startAngle:f,endAngle:h}=a.getProps(["startAngle","endAngle"],i),{angle:_}=om(a,{x:t.x,y:t.y});bs(_,f,h)&&r.push({element:a,datasetIndex:c,index:u})}return Ua(n,e,t,o),r}function bC(n,t,e,i,r,o){let a=[];const c=yC(e);let u=Number.POSITIVE_INFINITY;function f(h,_,p){const m=h.inRange(t.x,t.y,r);if(i&&!m)return;const g=h.getCenterPoint(r);if(!(!!o||n.isPointInArea(g))&&!m)return;const w=c(t,g);w<u?(a=[{element:h,datasetIndex:_,index:p}],u=w):w===u&&a.push({element:h,datasetIndex:_,index:p})}return Ua(n,e,t,f),a}function bc(n,t,e,i,r,o){return!o&&!n.isPointInArea(t)?[]:e==="r"&&!i?vC(n,t,e,r):bC(n,t,e,i,r,o)}function Ip(n,t,e,i,r){const o=[],a=e==="x"?"inXRange":"inYRange";let c=!1;return Ua(n,e,t,(u,f,h)=>{u[a]&&u[a](t[e],r)&&(o.push({element:u,datasetIndex:f,index:h}),c=c||u.inRange(t.x,t.y,r))}),i&&!c?[]:o}var xC={modes:{index(n,t,e,i){const r=Hi(t,n),o=e.axis||"x",a=e.includeInvisible||!1,c=e.intersect?vc(n,r,o,i,a):bc(n,r,o,!1,i,a),u=[];return c.length?(n.getSortedVisibleDatasetMetas().forEach(f=>{const h=c[0].index,_=f.data[h];_&&!_.skip&&u.push({element:_,datasetIndex:f.index,index:h})}),u):[]},dataset(n,t,e,i){const r=Hi(t,n),o=e.axis||"xy",a=e.includeInvisible||!1;let c=e.intersect?vc(n,r,o,i,a):bc(n,r,o,!1,i,a);if(c.length>0){const u=c[0].datasetIndex,f=n.getDatasetMeta(u).data;c=[];for(let h=0;h<f.length;++h)c.push({element:f[h],datasetIndex:u,index:h})}return c},point(n,t,e,i){const r=Hi(t,n),o=e.axis||"xy",a=e.includeInvisible||!1;return vc(n,r,o,i,a)},nearest(n,t,e,i){const r=Hi(t,n),o=e.axis||"xy",a=e.includeInvisible||!1;return bc(n,r,o,e.intersect,i,a)},x(n,t,e,i){const r=Hi(t,n);return Ip(n,r,"x",e.intersect,i)},y(n,t,e,i){const r=Hi(t,n);return Ip(n,r,"y",e.intersect,i)}}};const Pm=["left","top","right","bottom"];function Gr(n,t){return n.filter(e=>e.pos===t)}function Tp(n,t){return n.filter(e=>Pm.indexOf(e.pos)===-1&&e.box.axis===t)}function Kr(n,t){return n.sort((e,i)=>{const r=t?i:e,o=t?e:i;return r.weight===o.weight?r.index-o.index:r.weight-o.weight})}function wC(n){const t=[];let e,i,r,o,a,c;for(e=0,i=(n||[]).length;e<i;++e)r=n[e],{position:o,options:{stack:a,stackWeight:c=1}}=r,t.push({index:e,box:r,pos:o,horizontal:r.isHorizontal(),weight:r.weight,stack:a&&o+a,stackWeight:c});return t}function SC(n){const t={};for(const e of n){const{stack:i,pos:r,stackWeight:o}=e;if(!i||!Pm.includes(r))continue;const a=t[i]||(t[i]={count:0,placed:0,weight:0,size:0});a.count++,a.weight+=o}return t}function kC(n,t){const e=SC(n),{vBoxMaxWidth:i,hBoxMaxHeight:r}=t;let o,a,c;for(o=0,a=n.length;o<a;++o){c=n[o];const{fullSize:u}=c.box,f=e[c.stack],h=f&&c.stackWeight/f.weight;c.horizontal?(c.width=h?h*i:u&&t.availableWidth,c.height=r):(c.width=i,c.height=h?h*r:u&&t.availableHeight)}return e}function EC(n){const t=wC(n),e=Kr(t.filter(f=>f.box.fullSize),!0),i=Kr(Gr(t,"left"),!0),r=Kr(Gr(t,"right")),o=Kr(Gr(t,"top"),!0),a=Kr(Gr(t,"bottom")),c=Tp(t,"x"),u=Tp(t,"y");return{fullSize:e,leftAndTop:i.concat(o),rightAndBottom:r.concat(u).concat(a).concat(c),chartArea:Gr(t,"chartArea"),vertical:i.concat(r).concat(u),horizontal:o.concat(a).concat(c)}}function Dp(n,t,e,i){return Math.max(n[e],t[e])+Math.max(n[i],t[i])}function Om(n,t){n.top=Math.max(n.top,t.top),n.left=Math.max(n.left,t.left),n.bottom=Math.max(n.bottom,t.bottom),n.right=Math.max(n.right,t.right)}function CC(n,t,e,i){const{pos:r,box:o}=e,a=n.maxPadding;if(!At(r)){e.size&&(n[r]-=e.size);const _=i[e.stack]||{size:0,count:1};_.size=Math.max(_.size,e.horizontal?o.height:o.width),e.size=_.size/_.count,n[r]+=e.size}o.getPadding&&Om(a,o.getPadding());const c=Math.max(0,t.outerWidth-Dp(a,n,"left","right")),u=Math.max(0,t.outerHeight-Dp(a,n,"top","bottom")),f=c!==n.w,h=u!==n.h;return n.w=c,n.h=u,e.horizontal?{same:f,other:h}:{same:h,other:f}}function MC(n){const t=n.maxPadding;function e(i){const r=Math.max(t[i]-n[i],0);return n[i]+=r,r}n.y+=e("top"),n.x+=e("left"),e("right"),e("bottom")}function AC(n,t){const e=t.maxPadding;function i(r){const o={left:0,top:0,right:0,bottom:0};return r.forEach(a=>{o[a]=Math.max(t[a],e[a])}),o}return i(n?["left","right"]:["top","bottom"])}function ns(n,t,e,i){const r=[];let o,a,c,u,f,h;for(o=0,a=n.length,f=0;o<a;++o){c=n[o],u=c.box,u.update(c.width||t.w,c.height||t.h,AC(c.horizontal,t));const{same:_,other:p}=CC(t,e,c,i);f|=_&&r.length,h=h||p,u.fullSize||r.push(c)}return f&&ns(r,t,e,i)||h}function na(n,t,e,i,r){n.top=e,n.left=t,n.right=t+i,n.bottom=e+r,n.width=i,n.height=r}function Bp(n,t,e,i){const r=e.padding;let{x:o,y:a}=t;for(const c of n){const u=c.box,f=i[c.stack]||{placed:0,weight:1},h=c.stackWeight/f.weight||1;if(c.horizontal){const _=t.w*h,p=f.size||u.height;vs(f.start)&&(a=f.start),u.fullSize?na(u,r.left,a,e.outerWidth-r.right-r.left,p):na(u,t.left+f.placed,a,_,p),f.start=a,f.placed+=_,a=u.bottom}else{const _=t.h*h,p=f.size||u.width;vs(f.start)&&(o=f.start),u.fullSize?na(u,o,r.top,p,e.outerHeight-r.bottom-r.top):na(u,o,t.top+f.placed,p,_),f.start=o,f.placed+=_,o=u.right}}t.x=o,t.y=a}var we={addBox(n,t){n.boxes||(n.boxes=[]),t.fullSize=t.fullSize||!1,t.position=t.position||"top",t.weight=t.weight||0,t._layers=t._layers||function(){return[{z:0,draw(e){t.draw(e)}}]},n.boxes.push(t)},removeBox(n,t){const e=n.boxes?n.boxes.indexOf(t):-1;e!==-1&&n.boxes.splice(e,1)},configure(n,t,e){t.fullSize=e.fullSize,t.position=e.position,t.weight=e.weight},update(n,t,e,i){if(!n)return;const r=Se(n.options.layout.padding),o=Math.max(t-r.width,0),a=Math.max(e-r.height,0),c=EC(n.boxes),u=c.vertical,f=c.horizontal;Bt(n.boxes,b=>{typeof b.beforeLayout=="function"&&b.beforeLayout()});const h=u.reduce((b,w)=>w.box.options&&w.box.options.display===!1?b:b+1,0)||1,_=Object.freeze({outerWidth:t,outerHeight:e,padding:r,availableWidth:o,availableHeight:a,vBoxMaxWidth:o/2/h,hBoxMaxHeight:a/2}),p=Object.assign({},r);Om(p,Se(i));const m=Object.assign({maxPadding:p,w:o,h:a,x:r.left,y:r.top},r),g=kC(u.concat(f),_);ns(c.fullSize,m,_,g),ns(u,m,_,g),ns(f,m,_,g)&&ns(u,m,_,g),MC(m),Bp(c.leftAndTop,m,_,g),m.x+=m.w,m.y+=m.h,Bp(c.rightAndBottom,m,_,g),n.chartArea={left:m.left,top:m.top,right:m.left+m.w,bottom:m.top+m.h,height:m.h,width:m.w},Bt(c.chartArea,b=>{const w=b.box;Object.assign(w,n.chartArea),w.update(m.w,m.h,{left:0,top:0,right:0,bottom:0})})}};class Rm{acquireContext(t,e){}releaseContext(t){return!1}addEventListener(t,e,i){}removeEventListener(t,e,i){}getDevicePixelRatio(){return 1}getMaximumSize(t,e,i,r){return e=Math.max(0,e||t.width),i=i||t.height,{width:e,height:Math.max(0,r?Math.floor(e/r):i)}}isAttached(t){return!0}updateConfig(t){}}class LC extends Rm{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const ba="$chartjs",PC={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},Fp=n=>n===null||n==="";function OC(n,t){const e=n.style,i=n.getAttribute("height"),r=n.getAttribute("width");if(n[ba]={initial:{height:i,width:r,style:{display:e.display,height:e.height,width:e.width}}},e.display=e.display||"block",e.boxSizing=e.boxSizing||"border-box",Fp(r)){const o=bp(n,"width");o!==void 0&&(n.width=o)}if(Fp(i))if(n.style.height==="")n.height=n.width/(t||2);else{const o=bp(n,"height");o!==void 0&&(n.height=o)}return n}const Im=IE?{passive:!0}:!1;function RC(n,t,e){n&&n.addEventListener(t,e,Im)}function IC(n,t,e){n&&n.canvas&&n.canvas.removeEventListener(t,e,Im)}function TC(n,t){const e=PC[n.type]||n.type,{x:i,y:r}=Hi(n,t);return{type:e,chart:t,native:n,x:i!==void 0?i:null,y:r!==void 0?r:null}}function Pa(n,t){for(const e of n)if(e===t||e.contains(t))return!0}function DC(n,t,e){const i=n.canvas,r=new MutationObserver(o=>{let a=!1;for(const c of o)a=a||Pa(c.addedNodes,i),a=a&&!Pa(c.removedNodes,i);a&&e()});return r.observe(document,{childList:!0,subtree:!0}),r}function BC(n,t,e){const i=n.canvas,r=new MutationObserver(o=>{let a=!1;for(const c of o)a=a||Pa(c.removedNodes,i),a=a&&!Pa(c.addedNodes,i);a&&e()});return r.observe(document,{childList:!0,subtree:!0}),r}const ws=new Map;let Np=0;function Tm(){const n=window.devicePixelRatio;n!==Np&&(Np=n,ws.forEach((t,e)=>{e.currentDevicePixelRatio!==n&&t()}))}function FC(n,t){ws.size||window.addEventListener("resize",Tm),ws.set(n,t)}function NC(n){ws.delete(n),ws.size||window.removeEventListener("resize",Tm)}function HC(n,t,e){const i=n.canvas,r=i&&vu(i);if(!r)return;const o=um((c,u)=>{const f=r.clientWidth;e(c,u),f<r.clientWidth&&e()},window),a=new ResizeObserver(c=>{const u=c[0],f=u.contentRect.width,h=u.contentRect.height;f===0&&h===0||o(f,h)});return a.observe(r),FC(n,o),a}function xc(n,t,e){e&&e.disconnect(),t==="resize"&&NC(n)}function WC(n,t,e){const i=n.canvas,r=um(o=>{n.ctx!==null&&e(TC(o,n))},n);return RC(i,t,r),r}class zC extends Rm{acquireContext(t,e){const i=t&&t.getContext&&t.getContext("2d");return i&&i.canvas===t?(OC(t,e),i):null}releaseContext(t){const e=t.canvas;if(!e[ba])return!1;const i=e[ba].initial;["height","width"].forEach(o=>{const a=i[o];Ct(a)?e.removeAttribute(o):e.setAttribute(o,a)});const r=i.style||{};return Object.keys(r).forEach(o=>{e.style[o]=r[o]}),e.width=e.width,delete e[ba],!0}addEventListener(t,e,i){this.removeEventListener(t,e);const r=t.$proxies||(t.$proxies={}),a={attach:DC,detach:BC,resize:HC}[e]||WC;r[e]=a(t,e,i)}removeEventListener(t,e){const i=t.$proxies||(t.$proxies={}),r=i[e];if(!r)return;({attach:xc,detach:xc,resize:xc}[e]||IC)(t,e,r),i[e]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,i,r){return RE(t,e,i,r)}isAttached(t){const e=t&&vu(t);return!!(e&&e.isConnected)}}function jC(n){return!yu()||typeof OffscreenCanvas<"u"&&n instanceof OffscreenCanvas?LC:zC}class vn{constructor(){it(this,"x");it(this,"y");it(this,"active",!1);it(this,"options");it(this,"$animations")}tooltipPosition(t){const{x:e,y:i}=this.getProps(["x","y"],t);return{x:e,y:i}}hasValue(){return br(this.x)&&br(this.y)}getProps(t,e){const i=this.$animations;if(!e||!i)return this;const r={};return t.forEach(o=>{r[o]=i[o]&&i[o].active()?i[o]._to:this[o]}),r}}it(vn,"defaults",{}),it(vn,"defaultRoutes");function UC(n,t){const e=n.options.ticks,i=VC(n),r=Math.min(e.maxTicksLimit||i,i),o=e.major.enabled?$C(t):[],a=o.length,c=o[0],u=o[a-1],f=[];if(a>r)return YC(t,f,o,a/r),f;const h=qC(o,t,r);if(a>0){let _,p;const m=a>1?Math.round((u-c)/(a-1)):null;for(ia(t,f,h,Ct(m)?0:c-m,c),_=0,p=a-1;_<p;_++)ia(t,f,h,o[_],o[_+1]);return ia(t,f,h,u,Ct(m)?t.length:u+m),f}return ia(t,f,h),f}function VC(n){const t=n.options.offset,e=n._tickSize(),i=n._length/e+(t?0:1),r=n._maxLength/e;return Math.floor(Math.min(i,r))}function qC(n,t,e){const i=GC(n),r=t.length/e;if(!i)return Math.max(r,1);const o=Dk(i);for(let a=0,c=o.length-1;a<c;a++){const u=o[a];if(u>r)return u}return Math.max(r,1)}function $C(n){const t=[];let e,i;for(e=0,i=n.length;e<i;e++)n[e].major&&t.push(e);return t}function YC(n,t,e,i){let r=0,o=e[0],a;for(i=Math.ceil(i),a=0;a<n.length;a++)a===o&&(t.push(n[a]),r++,o=e[r*i])}function ia(n,t,e,i,r){const o=yt(i,0),a=Math.min(yt(r,n.length),n.length);let c=0,u,f,h;for(e=Math.ceil(e),r&&(u=r-i,e=u/Math.floor(u/e)),h=o;h<0;)c++,h=Math.round(o+c*e);for(f=Math.max(o,0);f<a;f++)f===h&&(t.push(n[f]),c++,h=Math.round(o+c*e))}function GC(n){const t=n.length;let e,i;if(t<2)return!1;for(i=n[0],e=1;e<t;++e)if(n[e]-n[e-1]!==i)return!1;return i}const KC=n=>n==="left"?"right":n==="right"?"left":n,Hp=(n,t,e)=>t==="top"||t==="left"?n[t]+e:n[t]-e,Wp=(n,t)=>Math.min(t||n,n);function zp(n,t){const e=[],i=n.length/t,r=n.length;let o=0;for(;o<r;o+=i)e.push(n[Math.floor(o)]);return e}function XC(n,t,e){const i=n.ticks.length,r=Math.min(t,i-1),o=n._startPixel,a=n._endPixel,c=1e-6;let u=n.getPixelForTick(r),f;if(!(e&&(i===1?f=Math.max(u-o,a-u):t===0?f=(n.getPixelForTick(1)-u)/2:f=(u-n.getPixelForTick(r-1))/2,u+=r<t?f:-f,u<o-c||u>a+c)))return u}function JC(n,t){Bt(n,e=>{const i=e.gc,r=i.length/2;let o;if(r>t){for(o=0;o<r;++o)delete e.data[i[o]];i.splice(0,r)}})}function Xr(n){return n.drawTicks?n.tickLength:0}function jp(n,t){if(!n.display)return 0;const e=fe(n.font,t),i=Se(n.padding);return(Gt(n.text)?n.text.length:1)*e.lineHeight+i.height}function ZC(n,t){return wi(n,{scale:t,type:"scale"})}function QC(n,t,e){return wi(n,{tick:e,index:t,type:"tick"})}function tM(n,t,e){let i=fu(n);return(e&&t!=="right"||!e&&t==="right")&&(i=KC(i)),i}function eM(n,t,e,i){const{top:r,left:o,bottom:a,right:c,chart:u}=n,{chartArea:f,scales:h}=u;let _=0,p,m,g;const b=a-r,w=c-o;if(n.isHorizontal()){if(m=xe(i,o,c),At(e)){const C=Object.keys(e)[0],M=e[C];g=h[C].getPixelForValue(M)+b-t}else e==="center"?g=(f.bottom+f.top)/2+b-t:g=Hp(n,e,t);p=c-o}else{if(At(e)){const C=Object.keys(e)[0],M=e[C];m=h[C].getPixelForValue(M)-w+t}else e==="center"?m=(f.left+f.right)/2-w+t:m=Hp(n,e,t);g=xe(i,a,r),_=e==="left"?-re:re}return{titleX:m,titleY:g,maxWidth:p,rotation:_}}class Yi extends vn{constructor(t){super(),this.id=t.id,this.type=t.type,this.options=void 0,this.ctx=t.ctx,this.chart=t.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(t){this.options=t.setContext(this.getContext()),this.axis=t.axis,this._userMin=this.parse(t.min),this._userMax=this.parse(t.max),this._suggestedMin=this.parse(t.suggestedMin),this._suggestedMax=this.parse(t.suggestedMax)}parse(t,e){return t}getUserBounds(){let{_userMin:t,_userMax:e,_suggestedMin:i,_suggestedMax:r}=this;return t=Xe(t,Number.POSITIVE_INFINITY),e=Xe(e,Number.NEGATIVE_INFINITY),i=Xe(i,Number.POSITIVE_INFINITY),r=Xe(r,Number.NEGATIVE_INFINITY),{min:Xe(t,i),max:Xe(e,r),minDefined:ee(t),maxDefined:ee(e)}}getMinMax(t){let{min:e,max:i,minDefined:r,maxDefined:o}=this.getUserBounds(),a;if(r&&o)return{min:e,max:i};const c=this.getMatchingVisibleMetas();for(let u=0,f=c.length;u<f;++u)a=c[u].controller.getMinMax(this,t),r||(e=Math.min(e,a.min)),o||(i=Math.max(i,a.max));return e=o&&e>i?i:e,i=r&&e>i?e:i,{min:Xe(e,Xe(i,e)),max:Xe(i,Xe(e,i))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}getLabelItems(t=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(t))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){zt(this.options.beforeUpdate,[this])}update(t,e,i){const{beginAtZero:r,grace:o,ticks:a}=this.options,c=a.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=e,this._margins=i=Object.assign({left:0,right:0,top:0,bottom:0},i),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+i.left+i.right:this.height+i.top+i.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=uE(this,o,r),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const u=c<this.ticks.length;this._convertTicksToLabels(u?zp(this.ticks,c):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),a.display&&(a.autoSkip||a.source==="auto")&&(this.ticks=UC(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),u&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let t=this.options.reverse,e,i;this.isHorizontal()?(e=this.left,i=this.right):(e=this.top,i=this.bottom,t=!t),this._startPixel=e,this._endPixel=i,this._reversePixels=t,this._length=i-e,this._alignToPixels=this.options.alignToPixels}afterUpdate(){zt(this.options.afterUpdate,[this])}beforeSetDimensions(){zt(this.options.beforeSetDimensions,[this])}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):(this.height=this.maxHeight,this.top=0,this.bottom=this.height),this.paddingLeft=0,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0}afterSetDimensions(){zt(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),zt(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){zt(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){const e=this.options.ticks;let i,r,o;for(i=0,r=t.length;i<r;i++)o=t[i],o.label=zt(e.callback,[o.value,i,t],this)}afterTickToLabelConversion(){zt(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){zt(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this.options,e=t.ticks,i=Wp(this.ticks.length,t.ticks.maxTicksLimit),r=e.minRotation||0,o=e.maxRotation;let a=r,c,u,f;if(!this._isVisible()||!e.display||r>=o||i<=1||!this.isHorizontal()){this.labelRotation=r;return}const h=this._getLabelSizes(),_=h.widest.width,p=h.highest.height,m=pe(this.chart.width-_,0,this.maxWidth);c=t.offset?this.maxWidth/i:m/(i-1),_+6>c&&(c=m/(i-(t.offset?.5:1)),u=this.maxHeight-Xr(t.grid)-e.padding-jp(t.title,this.chart.options.font),f=Math.sqrt(_*_+p*p),a=uu(Math.min(Math.asin(pe((h.highest.height+6)/c,-1,1)),Math.asin(pe(u/f,-1,1))-Math.asin(pe(p/f,-1,1)))),a=Math.max(r,Math.min(o,a))),this.labelRotation=a}afterCalculateLabelRotation(){zt(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){zt(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:e,options:{ticks:i,title:r,grid:o}}=this,a=this._isVisible(),c=this.isHorizontal();if(a){const u=jp(r,e.options.font);if(c?(t.width=this.maxWidth,t.height=Xr(o)+u):(t.height=this.maxHeight,t.width=Xr(o)+u),i.display&&this.ticks.length){const{first:f,last:h,widest:_,highest:p}=this._getLabelSizes(),m=i.padding*2,g=_n(this.labelRotation),b=Math.cos(g),w=Math.sin(g);if(c){const C=i.mirror?0:w*_.width+b*p.height;t.height=Math.min(this.maxHeight,t.height+C+m)}else{const C=i.mirror?0:b*_.width+w*p.height;t.width=Math.min(this.maxWidth,t.width+C+m)}this._calculatePadding(f,h,w,b)}}this._handleMargins(),c?(this.width=this._length=e.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=e.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,e,i,r){const{ticks:{align:o,padding:a},position:c}=this.options,u=this.labelRotation!==0,f=c!=="top"&&this.axis==="x";if(this.isHorizontal()){const h=this.getPixelForTick(0)-this.left,_=this.right-this.getPixelForTick(this.ticks.length-1);let p=0,m=0;u?f?(p=r*t.width,m=i*e.height):(p=i*t.height,m=r*e.width):o==="start"?m=e.width:o==="end"?p=t.width:o!=="inner"&&(p=t.width/2,m=e.width/2),this.paddingLeft=Math.max((p-h+a)*this.width/(this.width-h),0),this.paddingRight=Math.max((m-_+a)*this.width/(this.width-_),0)}else{let h=e.height/2,_=t.height/2;o==="start"?(h=0,_=t.height):o==="end"&&(h=e.height,_=0),this.paddingTop=h+a,this.paddingBottom=_+a}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){zt(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:e}=this.options;return e==="top"||e==="bottom"||t==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){this.beforeTickToLabelConversion(),this.generateTickLabels(t);let e,i;for(e=0,i=t.length;e<i;e++)Ct(t[e].label)&&(t.splice(e,1),i--,e--);this.afterTickToLabelConversion()}_getLabelSizes(){let t=this._labelSizes;if(!t){const e=this.options.ticks.sampleSize;let i=this.ticks;e<i.length&&(i=zp(i,e)),this._labelSizes=t=this._computeLabelSizes(i,i.length,this.options.ticks.maxTicksLimit)}return t}_computeLabelSizes(t,e,i){const{ctx:r,_longestTextCache:o}=this,a=[],c=[],u=Math.floor(e/Wp(e,i));let f=0,h=0,_,p,m,g,b,w,C,M,D,S,k;for(_=0;_<e;_+=u){if(g=t[_].label,b=this._resolveTickFontOptions(_),r.font=w=b.string,C=o[w]=o[w]||{data:{},gc:[]},M=b.lineHeight,D=S=0,!Ct(g)&&!Gt(g))D=Aa(r,C.data,C.gc,D,g),S=M;else if(Gt(g))for(p=0,m=g.length;p<m;++p)k=g[p],!Ct(k)&&!Gt(k)&&(D=Aa(r,C.data,C.gc,D,k),S+=M);a.push(D),c.push(S),f=Math.max(D,f),h=Math.max(S,h)}JC(o,e);const O=a.indexOf(f),I=c.indexOf(h),B=q=>({width:a[q]||0,height:c[q]||0});return{first:B(0),last:B(e-1),widest:B(O),highest:B(I),widths:a,heights:c}}getLabelForValue(t){return t}getPixelForValue(t,e){return NaN}getValueForPixel(t){}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const e=this._startPixel+t*this._length;return Hk(this._alignToPixels?Bi(this.chart,e,0):e)}getDecimalForPixel(t){const e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:e}=this;return t<0&&e<0?e:t>0&&e>0?t:0}getContext(t){const e=this.ticks||[];if(t>=0&&t<e.length){const i=e[t];return i.$context||(i.$context=QC(this.getContext(),t,i))}return this.$context||(this.$context=ZC(this.chart.getContext(),this))}_tickSize(){const t=this.options.ticks,e=_n(this.labelRotation),i=Math.abs(Math.cos(e)),r=Math.abs(Math.sin(e)),o=this._getLabelSizes(),a=t.autoSkipPadding||0,c=o?o.widest.width+a:0,u=o?o.highest.height+a:0;return this.isHorizontal()?u*i>c*r?c/i:u/r:u*r<c*i?u/i:c/r}_isVisible(){const t=this.options.display;return t!=="auto"?!!t:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){const e=this.axis,i=this.chart,r=this.options,{grid:o,position:a,border:c}=r,u=o.offset,f=this.isHorizontal(),_=this.ticks.length+(u?1:0),p=Xr(o),m=[],g=c.setContext(this.getContext()),b=g.display?g.width:0,w=b/2,C=function(X){return Bi(i,X,b)};let M,D,S,k,O,I,B,q,z,j,Y,ot;if(a==="top")M=C(this.bottom),I=this.bottom-p,q=M-w,j=C(t.top)+w,ot=t.bottom;else if(a==="bottom")M=C(this.top),j=t.top,ot=C(t.bottom)-w,I=M+w,q=this.top+p;else if(a==="left")M=C(this.right),O=this.right-p,B=M-w,z=C(t.left)+w,Y=t.right;else if(a==="right")M=C(this.left),z=t.left,Y=C(t.right)-w,O=M+w,B=this.left+p;else if(e==="x"){if(a==="center")M=C((t.top+t.bottom)/2+.5);else if(At(a)){const X=Object.keys(a)[0],tt=a[X];M=C(this.chart.scales[X].getPixelForValue(tt))}j=t.top,ot=t.bottom,I=M+w,q=I+p}else if(e==="y"){if(a==="center")M=C((t.left+t.right)/2);else if(At(a)){const X=Object.keys(a)[0],tt=a[X];M=C(this.chart.scales[X].getPixelForValue(tt))}O=M-w,B=O-p,z=t.left,Y=t.right}const nt=yt(r.ticks.maxTicksLimit,_),Z=Math.max(1,Math.ceil(_/nt));for(D=0;D<_;D+=Z){const X=this.getContext(D),tt=o.setContext(X),et=c.setContext(X),at=tt.lineWidth,ct=tt.color,gt=et.dash||[],Ot=et.dashOffset,Ft=tt.tickWidth,dt=tt.tickColor,xt=tt.tickBorderDash||[],Zt=tt.tickBorderDashOffset;S=XC(this,D,u),S!==void 0&&(k=Bi(i,S,at),f?O=B=z=Y=k:I=q=j=ot=k,m.push({tx1:O,ty1:I,tx2:B,ty2:q,x1:z,y1:j,x2:Y,y2:ot,width:at,color:ct,borderDash:gt,borderDashOffset:Ot,tickWidth:Ft,tickColor:dt,tickBorderDash:xt,tickBorderDashOffset:Zt}))}return this._ticksLength=_,this._borderValue=M,m}_computeLabelItems(t){const e=this.axis,i=this.options,{position:r,ticks:o}=i,a=this.isHorizontal(),c=this.ticks,{align:u,crossAlign:f,padding:h,mirror:_}=o,p=Xr(i.grid),m=p+h,g=_?-h:m,b=-_n(this.labelRotation),w=[];let C,M,D,S,k,O,I,B,q,z,j,Y,ot="middle";if(r==="top")O=this.bottom-g,I=this._getXAxisLabelAlignment();else if(r==="bottom")O=this.top+g,I=this._getXAxisLabelAlignment();else if(r==="left"){const Z=this._getYAxisLabelAlignment(p);I=Z.textAlign,k=Z.x}else if(r==="right"){const Z=this._getYAxisLabelAlignment(p);I=Z.textAlign,k=Z.x}else if(e==="x"){if(r==="center")O=(t.top+t.bottom)/2+m;else if(At(r)){const Z=Object.keys(r)[0],X=r[Z];O=this.chart.scales[Z].getPixelForValue(X)+m}I=this._getXAxisLabelAlignment()}else if(e==="y"){if(r==="center")k=(t.left+t.right)/2-m;else if(At(r)){const Z=Object.keys(r)[0],X=r[Z];k=this.chart.scales[Z].getPixelForValue(X)}I=this._getYAxisLabelAlignment(p).textAlign}e==="y"&&(u==="start"?ot="top":u==="end"&&(ot="bottom"));const nt=this._getLabelSizes();for(C=0,M=c.length;C<M;++C){D=c[C],S=D.label;const Z=o.setContext(this.getContext(C));B=this.getPixelForTick(C)+o.labelOffset,q=this._resolveTickFontOptions(C),z=q.lineHeight,j=Gt(S)?S.length:1;const X=j/2,tt=Z.color,et=Z.textStrokeColor,at=Z.textStrokeWidth;let ct=I;a?(k=B,I==="inner"&&(C===M-1?ct=this.options.reverse?"left":"right":C===0?ct=this.options.reverse?"right":"left":ct="center"),r==="top"?f==="near"||b!==0?Y=-j*z+z/2:f==="center"?Y=-nt.highest.height/2-X*z+z:Y=-nt.highest.height+z/2:f==="near"||b!==0?Y=z/2:f==="center"?Y=nt.highest.height/2-X*z:Y=nt.highest.height-j*z,_&&(Y*=-1),b!==0&&!Z.showLabelBackdrop&&(k+=z/2*Math.sin(b))):(O=B,Y=(1-j)*z/2);let gt;if(Z.showLabelBackdrop){const Ot=Se(Z.backdropPadding),Ft=nt.heights[C],dt=nt.widths[C];let xt=Y-Ot.top,Zt=0-Ot.left;switch(ot){case"middle":xt-=Ft/2;break;case"bottom":xt-=Ft;break}switch(I){case"center":Zt-=dt/2;break;case"right":Zt-=dt;break;case"inner":C===M-1?Zt-=dt:C>0&&(Zt-=dt/2);break}gt={left:Zt,top:xt,width:dt+Ot.width,height:Ft+Ot.height,color:Z.backdropColor}}w.push({label:S,font:q,textOffset:Y,options:{rotation:b,color:tt,strokeColor:et,strokeWidth:at,textAlign:ct,textBaseline:ot,translation:[k,O],backdrop:gt}})}return w}_getXAxisLabelAlignment(){const{position:t,ticks:e}=this.options;if(-_n(this.labelRotation))return t==="top"?"left":"right";let r="center";return e.align==="start"?r="left":e.align==="end"?r="right":e.align==="inner"&&(r="inner"),r}_getYAxisLabelAlignment(t){const{position:e,ticks:{crossAlign:i,mirror:r,padding:o}}=this.options,a=this._getLabelSizes(),c=t+o,u=a.widest.width;let f,h;return e==="left"?r?(h=this.right+o,i==="near"?f="left":i==="center"?(f="center",h+=u/2):(f="right",h+=u)):(h=this.right-c,i==="near"?f="right":i==="center"?(f="center",h-=u/2):(f="left",h=this.left)):e==="right"?r?(h=this.left+o,i==="near"?f="right":i==="center"?(f="center",h-=u/2):(f="left",h-=u)):(h=this.left+c,i==="near"?f="left":i==="center"?(f="center",h+=u/2):(f="right",h=this.right)):f="right",{textAlign:f,x:h}}_computeLabelArea(){if(this.options.ticks.mirror)return;const t=this.chart,e=this.options.position;if(e==="left"||e==="right")return{top:0,left:this.left,bottom:t.height,right:this.right};if(e==="top"||e==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:t.width}}drawBackground(){const{ctx:t,options:{backgroundColor:e},left:i,top:r,width:o,height:a}=this;e&&(t.save(),t.fillStyle=e,t.fillRect(i,r,o,a),t.restore())}getLineWidthForValue(t){const e=this.options.grid;if(!this._isVisible()||!e.display)return 0;const r=this.ticks.findIndex(o=>o.value===t);return r>=0?e.setContext(this.getContext(r)).lineWidth:0}drawGrid(t){const e=this.options.grid,i=this.ctx,r=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let o,a;const c=(u,f,h)=>{!h.width||!h.color||(i.save(),i.lineWidth=h.width,i.strokeStyle=h.color,i.setLineDash(h.borderDash||[]),i.lineDashOffset=h.borderDashOffset,i.beginPath(),i.moveTo(u.x,u.y),i.lineTo(f.x,f.y),i.stroke(),i.restore())};if(e.display)for(o=0,a=r.length;o<a;++o){const u=r[o];e.drawOnChartArea&&c({x:u.x1,y:u.y1},{x:u.x2,y:u.y2},u),e.drawTicks&&c({x:u.tx1,y:u.ty1},{x:u.tx2,y:u.ty2},{color:u.tickColor,width:u.tickWidth,borderDash:u.tickBorderDash,borderDashOffset:u.tickBorderDashOffset})}}drawBorder(){const{chart:t,ctx:e,options:{border:i,grid:r}}=this,o=i.setContext(this.getContext()),a=i.display?o.width:0;if(!a)return;const c=r.setContext(this.getContext(0)).lineWidth,u=this._borderValue;let f,h,_,p;this.isHorizontal()?(f=Bi(t,this.left,a)-a/2,h=Bi(t,this.right,c)+c/2,_=p=u):(_=Bi(t,this.top,a)-a/2,p=Bi(t,this.bottom,c)+c/2,f=h=u),e.save(),e.lineWidth=o.width,e.strokeStyle=o.color,e.beginPath(),e.moveTo(f,_),e.lineTo(h,p),e.stroke(),e.restore()}drawLabels(t){if(!this.options.ticks.display)return;const i=this.ctx,r=this._computeLabelArea();r&&Wa(i,r);const o=this.getLabelItems(t);for(const a of o){const c=a.options,u=a.font,f=a.label,h=a.textOffset;$i(i,f,0,h,u,c)}r&&za(i)}drawTitle(){const{ctx:t,options:{position:e,title:i,reverse:r}}=this;if(!i.display)return;const o=fe(i.font),a=Se(i.padding),c=i.align;let u=o.lineHeight/2;e==="bottom"||e==="center"||At(e)?(u+=a.bottom,Gt(i.text)&&(u+=o.lineHeight*(i.text.length-1))):u+=a.top;const{titleX:f,titleY:h,maxWidth:_,rotation:p}=eM(this,u,e,c);$i(t,i.text,0,0,o,{color:i.color,maxWidth:_,rotation:p,textAlign:tM(c,e,r),textBaseline:"middle",translation:[f,h]})}draw(t){this._isVisible()&&(this.drawBackground(),this.drawGrid(t),this.drawBorder(),this.drawTitle(),this.drawLabels(t))}_layers(){const t=this.options,e=t.ticks&&t.ticks.z||0,i=yt(t.grid&&t.grid.z,-1),r=yt(t.border&&t.border.z,0);return!this._isVisible()||this.draw!==Yi.prototype.draw?[{z:e,draw:o=>{this.draw(o)}}]:[{z:i,draw:o=>{this.drawBackground(),this.drawGrid(o),this.drawTitle()}},{z:r,draw:()=>{this.drawBorder()}},{z:e,draw:o=>{this.drawLabels(o)}}]}getMatchingVisibleMetas(t){const e=this.chart.getSortedVisibleDatasetMetas(),i=this.axis+"AxisID",r=[];let o,a;for(o=0,a=e.length;o<a;++o){const c=e[o];c[i]===this.id&&(!t||c.type===t)&&r.push(c)}return r}_resolveTickFontOptions(t){const e=this.options.ticks.setContext(this.getContext(t));return fe(e.font)}_maxDigits(){const t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}}class ra{constructor(t,e,i){this.type=t,this.scope=e,this.override=i,this.items=Object.create(null)}isForType(t){return Object.prototype.isPrototypeOf.call(this.type.prototype,t.prototype)}register(t){const e=Object.getPrototypeOf(t);let i;rM(e)&&(i=this.register(e));const r=this.items,o=t.id,a=this.scope+"."+o;if(!o)throw new Error("class does not have id: "+t);return o in r||(r[o]=t,nM(t,a,i),this.override&&Kt.override(t.id,t.overrides)),a}get(t){return this.items[t]}unregister(t){const e=this.items,i=t.id,r=this.scope;i in e&&delete e[i],r&&i in Kt[r]&&(delete Kt[r][i],this.override&&delete qi[i])}}function nM(n,t,e){const i=ys(Object.create(null),[e?Kt.get(e):{},Kt.get(t),n.defaults]);Kt.set(t,i),n.defaultRoutes&&iM(t,n.defaultRoutes),n.descriptors&&Kt.describe(t,n.descriptors)}function iM(n,t){Object.keys(t).forEach(e=>{const i=e.split("."),r=i.pop(),o=[n].concat(i).join("."),a=t[e].split("."),c=a.pop(),u=a.join(".");Kt.route(o,r,u,c)})}function rM(n){return"id"in n&&"defaults"in n}class sM{constructor(){this.controllers=new ra(yn,"datasets",!0),this.elements=new ra(vn,"elements"),this.plugins=new ra(Object,"plugins"),this.scales=new ra(Yi,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,e,i){[...e].forEach(r=>{const o=i||this._getRegistryForType(r);i||o.isForType(r)||o===this.plugins&&r.id?this._exec(t,o,r):Bt(r,a=>{const c=i||this._getRegistryForType(a);this._exec(t,c,a)})})}_exec(t,e,i){const r=cu(t);zt(i["before"+r],[],i),e[t](i),zt(i["after"+r],[],i)}_getRegistryForType(t){for(let e=0;e<this._typedRegistries.length;e++){const i=this._typedRegistries[e];if(i.isForType(t))return i}return this.plugins}_get(t,e,i){const r=e.get(t);if(r===void 0)throw new Error('"'+t+'" is not a registered '+i+".");return r}}var Mn=new sM;class oM{constructor(){this._init=[]}notify(t,e,i,r){e==="beforeInit"&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install"));const o=r?this._descriptors(t).filter(r):this._descriptors(t),a=this._notify(o,t,e,i);return e==="afterDestroy"&&(this._notify(o,t,"stop"),this._notify(this._init,t,"uninstall")),a}_notify(t,e,i,r){r=r||{};for(const o of t){const a=o.plugin,c=a[i],u=[e,r,o.options];if(zt(c,u,a)===!1&&r.cancelable)return!1}return!0}invalidate(){Ct(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(t){if(this._cache)return this._cache;const e=this._cache=this._createDescriptors(t);return this._notifyStateChanges(t),e}_createDescriptors(t,e){const i=t&&t.config,r=yt(i.options&&i.options.plugins,{}),o=aM(i);return r===!1&&!e?[]:cM(t,o,r,e)}_notifyStateChanges(t){const e=this._oldCache||[],i=this._cache,r=(o,a)=>o.filter(c=>!a.some(u=>c.plugin.id===u.plugin.id));this._notify(r(e,i),t,"stop"),this._notify(r(i,e),t,"start")}}function aM(n){const t={},e=[],i=Object.keys(Mn.plugins.items);for(let o=0;o<i.length;o++)e.push(Mn.getPlugin(i[o]));const r=n.plugins||[];for(let o=0;o<r.length;o++){const a=r[o];e.indexOf(a)===-1&&(e.push(a),t[a.id]=!0)}return{plugins:e,localIds:t}}function lM(n,t){return!t&&n===!1?null:n===!0?{}:n}function cM(n,{plugins:t,localIds:e},i,r){const o=[],a=n.getContext();for(const c of t){const u=c.id,f=lM(i[u],r);f!==null&&o.push({plugin:c,options:uM(n.config,{plugin:c,local:e[u]},f,a)})}return o}function uM(n,{plugin:t,local:e},i,r){const o=n.pluginScopeKeys(t),a=n.getOptionScopes(i,o);return e&&t.defaults&&a.push(t.defaults),n.createResolver(a,r,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function Fc(n,t){const e=Kt.datasets[n]||{};return((t.datasets||{})[n]||{}).indexAxis||t.indexAxis||e.indexAxis||"x"}function hM(n,t){let e=n;return n==="_index_"?e=t:n==="_value_"&&(e=t==="x"?"y":"x"),e}function fM(n,t){return n===t?"_index_":"_value_"}function Up(n){if(n==="x"||n==="y"||n==="r")return n}function dM(n){if(n==="top"||n==="bottom")return"x";if(n==="left"||n==="right")return"y"}function Nc(n,...t){if(Up(n))return n;for(const e of t){const i=e.axis||dM(e.position)||n.length>1&&Up(n[0].toLowerCase());if(i)return i}throw new Error(`Cannot determine type of '${n}' axis. Please provide 'axis' or 'position' option.`)}function Vp(n,t,e){if(e[t+"AxisID"]===n)return{axis:t}}function pM(n,t){if(t.data&&t.data.datasets){const e=t.data.datasets.filter(i=>i.xAxisID===n||i.yAxisID===n);if(e.length)return Vp(n,"x",e[0])||Vp(n,"y",e[0])}return{}}function gM(n,t){const e=qi[n.type]||{scales:{}},i=t.scales||{},r=Fc(n.type,t),o=Object.create(null);return Object.keys(i).forEach(a=>{const c=i[a];if(!At(c))return console.error(`Invalid scale configuration for scale: ${a}`);if(c._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${a}`);const u=Nc(a,c,pM(a,n),Kt.scales[c.type]),f=fM(u,r),h=e.scales||{};o[a]=cs(Object.create(null),[{axis:u},c,h[u],h[f]])}),n.data.datasets.forEach(a=>{const c=a.type||n.type,u=a.indexAxis||Fc(c,t),h=(qi[c]||{}).scales||{};Object.keys(h).forEach(_=>{const p=hM(_,u),m=a[p+"AxisID"]||p;o[m]=o[m]||Object.create(null),cs(o[m],[{axis:p},i[m],h[_]])})}),Object.keys(o).forEach(a=>{const c=o[a];cs(c,[Kt.scales[c.type],Kt.scale])}),o}function Dm(n){const t=n.options||(n.options={});t.plugins=yt(t.plugins,{}),t.scales=gM(n,t)}function Bm(n){return n=n||{},n.datasets=n.datasets||[],n.labels=n.labels||[],n}function mM(n){return n=n||{},n.data=Bm(n.data),Dm(n),n}const qp=new Map,Fm=new Set;function sa(n,t){let e=qp.get(n);return e||(e=t(),qp.set(n,e),Fm.add(e)),e}const Jr=(n,t,e)=>{const i=bi(t,e);i!==void 0&&n.add(i)};class _M{constructor(t){this._config=mM(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=Bm(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){const t=this._config;this.clearCache(),Dm(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return sa(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,e){return sa(`${t}.transition.${e}`,()=>[[`datasets.${t}.transitions.${e}`,`transitions.${e}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,e){return sa(`${t}-${e}`,()=>[[`datasets.${t}.elements.${e}`,`datasets.${t}`,`elements.${e}`,""]])}pluginScopeKeys(t){const e=t.id,i=this.type;return sa(`${i}-plugin-${e}`,()=>[[`plugins.${e}`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,e){const i=this._scopeCache;let r=i.get(t);return(!r||e)&&(r=new Map,i.set(t,r)),r}getOptionScopes(t,e,i){const{options:r,type:o}=this,a=this._cachedScopes(t,i),c=a.get(e);if(c)return c;const u=new Set;e.forEach(h=>{t&&(u.add(t),h.forEach(_=>Jr(u,t,_))),h.forEach(_=>Jr(u,r,_)),h.forEach(_=>Jr(u,qi[o]||{},_)),h.forEach(_=>Jr(u,Kt,_)),h.forEach(_=>Jr(u,Tc,_))});const f=Array.from(u);return f.length===0&&f.push(Object.create(null)),Fm.has(e)&&a.set(e,f),f}chartOptionScopes(){const{options:t,type:e}=this;return[t,qi[e]||{},Kt.datasets[e]||{},{type:e},Kt,Tc]}resolveNamedOptions(t,e,i,r=[""]){const o={$shared:!0},{resolver:a,subPrefixes:c}=$p(this._resolverCache,t,r);let u=a;if(vM(a,e)){o.$shared=!1,i=xi(i)?i():i;const f=this.createResolver(t,i,c);u=xr(a,i,f)}for(const f of e)o[f]=u[f];return o}createResolver(t,e,i=[""],r){const{resolver:o}=$p(this._resolverCache,t,i);return At(e)?xr(o,e,void 0,r):o}}function $p(n,t,e){let i=n.get(t);i||(i=new Map,n.set(t,i));const r=e.join();let o=i.get(r);return o||(o={resolver:gu(t,e),subPrefixes:e.filter(c=>!c.toLowerCase().includes("hover"))},i.set(r,o)),o}const yM=n=>At(n)&&Object.getOwnPropertyNames(n).some(t=>xi(n[t]));function vM(n,t){const{isScriptable:e,isIndexable:i}=mm(n);for(const r of t){const o=e(r),a=i(r),c=(a||o)&&n[r];if(o&&(xi(c)||yM(c))||a&&Gt(c))return!0}return!1}var bM="4.4.8";const xM=["top","bottom","left","right","chartArea"];function Yp(n,t){return n==="top"||n==="bottom"||xM.indexOf(n)===-1&&t==="x"}function Gp(n,t){return function(e,i){return e[n]===i[n]?e[t]-i[t]:e[n]-i[n]}}function Kp(n){const t=n.chart,e=t.options.animation;t.notifyPlugins("afterRender"),zt(e&&e.onComplete,[n],t)}function wM(n){const t=n.chart,e=t.options.animation;zt(e&&e.onProgress,[n],t)}function Nm(n){return yu()&&typeof n=="string"?n=document.getElementById(n):n&&n.length&&(n=n[0]),n&&n.canvas&&(n=n.canvas),n}const xa={},Xp=n=>{const t=Nm(n);return Object.values(xa).filter(e=>e.canvas===t).pop()};function SM(n,t,e){const i=Object.keys(n);for(const r of i){const o=+r;if(o>=t){const a=n[r];delete n[r],(e>0||o>t)&&(n[o+e]=a)}}}function kM(n,t,e,i){return!e||n.type==="mouseout"?null:i?t:n}function oa(n,t,e){return n.options.clip?n[e]:t[e]}function EM(n,t){const{xScale:e,yScale:i}=n;return e&&i?{left:oa(e,t,"left"),right:oa(e,t,"right"),top:oa(i,t,"top"),bottom:oa(i,t,"bottom")}:t}class Gn{static register(...t){Mn.add(...t),Jp()}static unregister(...t){Mn.remove(...t),Jp()}constructor(t,e){const i=this.config=new _M(e),r=Nm(t),o=Xp(r);if(o)throw new Error("Canvas is already in use. Chart with ID '"+o.id+"' must be destroyed before the canvas with ID '"+o.canvas.id+"' can be reused.");const a=i.createResolver(i.chartOptionScopes(),this.getContext());this.platform=new(i.platform||jC(r)),this.platform.updateConfig(i);const c=this.platform.acquireContext(r,a.aspectRatio),u=c&&c.canvas,f=u&&u.height,h=u&&u.width;if(this.id=Ck(),this.ctx=c,this.canvas=u,this.width=h,this.height=f,this._options=a,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new oM,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=Uk(_=>this.update(_),a.resizeDelay||0),this._dataChanges=[],xa[this.id]=this,!c||!u){console.error("Failed to create chart: can't acquire context from the given item");return}qn.listen(this,"complete",Kp),qn.listen(this,"progress",wM),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:e},width:i,height:r,_aspectRatio:o}=this;return Ct(t)?e&&o?o:r?i/r:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}get registry(){return Mn}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():vp(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return mp(this.canvas,this.ctx),this}stop(){return qn.stop(this),this}resize(t,e){qn.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}_resize(t,e){const i=this.options,r=this.canvas,o=i.maintainAspectRatio&&this.aspectRatio,a=this.platform.getMaximumSize(r,t,e,o),c=i.devicePixelRatio||this.platform.getDevicePixelRatio(),u=this.width?"resize":"attach";this.width=a.width,this.height=a.height,this._aspectRatio=this.aspectRatio,vp(this,c,!0)&&(this.notifyPlugins("resize",{size:a}),zt(i.onResize,[this,a],this),this.attached&&this._doResize(u)&&this.render())}ensureScalesHaveIDs(){const e=this.options.scales||{};Bt(e,(i,r)=>{i.id=r})}buildOrUpdateScales(){const t=this.options,e=t.scales,i=this.scales,r=Object.keys(i).reduce((a,c)=>(a[c]=!1,a),{});let o=[];e&&(o=o.concat(Object.keys(e).map(a=>{const c=e[a],u=Nc(a,c),f=u==="r",h=u==="x";return{options:c,dposition:f?"chartArea":h?"bottom":"left",dtype:f?"radialLinear":h?"category":"linear"}}))),Bt(o,a=>{const c=a.options,u=c.id,f=Nc(u,c),h=yt(c.type,a.dtype);(c.position===void 0||Yp(c.position,f)!==Yp(a.dposition))&&(c.position=a.dposition),r[u]=!0;let _=null;if(u in i&&i[u].type===h)_=i[u];else{const p=Mn.getScale(h);_=new p({id:u,type:h,ctx:this.ctx,chart:this}),i[_.id]=_}_.init(c,t)}),Bt(r,(a,c)=>{a||delete i[c]}),Bt(i,a=>{we.configure(this,a,a.options),we.addBox(this,a)})}_updateMetasets(){const t=this._metasets,e=this.data.datasets.length,i=t.length;if(t.sort((r,o)=>r.index-o.index),i>e){for(let r=e;r<i;++r)this._destroyDatasetMeta(r);t.splice(e,i-e)}this._sortedMetasets=t.slice(0).sort(Gp("order","index"))}_removeUnreferencedMetasets(){const{_metasets:t,data:{datasets:e}}=this;t.length>e.length&&delete this._stacks,t.forEach((i,r)=>{e.filter(o=>o===i._dataset).length===0&&this._destroyDatasetMeta(r)})}buildOrUpdateControllers(){const t=[],e=this.data.datasets;let i,r;for(this._removeUnreferencedMetasets(),i=0,r=e.length;i<r;i++){const o=e[i];let a=this.getDatasetMeta(i);const c=o.type||this.config.type;if(a.type&&a.type!==c&&(this._destroyDatasetMeta(i),a=this.getDatasetMeta(i)),a.type=c,a.indexAxis=o.indexAxis||Fc(c,this.options),a.order=o.order||0,a.index=i,a.label=""+o.label,a.visible=this.isDatasetVisible(i),a.controller)a.controller.updateIndex(i),a.controller.linkScales();else{const u=Mn.getController(c),{datasetElementType:f,dataElementType:h}=Kt.datasets[c];Object.assign(u,{dataElementType:Mn.getElement(h),datasetElementType:f&&Mn.getElement(f)}),a.controller=new u(this,i),t.push(a.controller)}}return this._updateMetasets(),t}_resetElements(){Bt(this.data.datasets,(t,e)=>{this.getDatasetMeta(e).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const e=this.config;e.update();const i=this._options=e.createResolver(e.chartOptionScopes(),this.getContext()),r=this._animationsDisabled=!i.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0})===!1)return;const o=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let a=0;for(let f=0,h=this.data.datasets.length;f<h;f++){const{controller:_}=this.getDatasetMeta(f),p=!r&&o.indexOf(_)===-1;_.buildOrUpdateElements(p),a=Math.max(+_.getMaxOverflow(),a)}a=this._minPadding=i.layout.autoPadding?a:0,this._updateLayout(a),r||Bt(o,f=>{f.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(Gp("z","_idx"));const{_active:c,_lastEvent:u}=this;u?this._eventHandler(u,!0):c.length&&this._updateHoverStyles(c,c,!0),this.render()}_updateScales(){Bt(this.scales,t=>{we.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,e=new Set(Object.keys(this._listeners)),i=new Set(t.events);(!ap(e,i)||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,e=this._getUniformDataChanges()||[];for(const{method:i,start:r,count:o}of e){const a=i==="_removeElements"?-o:o;SM(t,r,a)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const e=this.data.datasets.length,i=o=>new Set(t.filter(a=>a[0]===o).map((a,c)=>c+","+a.splice(1).join(","))),r=i(0);for(let o=1;o<e;o++)if(!ap(r,i(o)))return;return Array.from(r).map(o=>o.split(",")).map(o=>({method:o[1],start:+o[2],count:+o[3]}))}_updateLayout(t){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;we.update(this,this.width,this.height,t);const e=this.chartArea,i=e.width<=0||e.height<=0;this._layers=[],Bt(this.boxes,r=>{i&&r.position==="chartArea"||(r.configure&&r.configure(),this._layers.push(...r._layers()))},this),this._layers.forEach((r,o)=>{r._idx=o}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})!==!1){for(let e=0,i=this.data.datasets.length;e<i;++e)this.getDatasetMeta(e).controller.configure();for(let e=0,i=this.data.datasets.length;e<i;++e)this._updateDataset(e,xi(t)?t({datasetIndex:e}):t);this.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,e){const i=this.getDatasetMeta(t),r={meta:i,index:t,mode:e,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",r)!==!1&&(i.controller._update(e),r.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",r))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(qn.has(this)?this.attached&&!qn.running(this)&&qn.start(this):(this.draw(),Kp({chart:this})))}draw(){let t;if(this._resizeBeforeDraw){const{width:i,height:r}=this._resizeBeforeDraw;this._resizeBeforeDraw=null,this._resize(i,r)}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;const e=this._layers;for(t=0;t<e.length&&e[t].z<=0;++t)e[t].draw(this.chartArea);for(this._drawDatasets();t<e.length;++t)e[t].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(t){const e=this._sortedMetasets,i=[];let r,o;for(r=0,o=e.length;r<o;++r){const a=e[r];(!t||a.visible)&&i.push(a)}return i}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;const t=this.getSortedVisibleDatasetMetas();for(let e=t.length-1;e>=0;--e)this._drawDataset(t[e]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const e=this.ctx,i=t._clip,r=!i.disabled,o=EM(t,this.chartArea),a={meta:t,index:t.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",a)!==!1&&(r&&Wa(e,{left:i.left===!1?0:o.left-i.left,right:i.right===!1?this.width:o.right+i.right,top:i.top===!1?0:o.top-i.top,bottom:i.bottom===!1?this.height:o.bottom+i.bottom}),t.controller.draw(),r&&za(e),a.cancelable=!1,this.notifyPlugins("afterDatasetDraw",a))}isPointInArea(t){return ti(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,e,i,r){const o=xC.modes[e];return typeof o=="function"?o(this,t,i,r):[]}getDatasetMeta(t){const e=this.data.datasets[t],i=this._metasets;let r=i.filter(o=>o&&o._dataset===e).pop();return r||(r={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e&&e.order||0,index:t,_dataset:e,_parsed:[],_sorted:!1},i.push(r)),r}getContext(){return this.$context||(this.$context=wi(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const e=this.data.datasets[t];if(!e)return!1;const i=this.getDatasetMeta(t);return typeof i.hidden=="boolean"?!i.hidden:!e.hidden}setDatasetVisibility(t,e){const i=this.getDatasetMeta(t);i.hidden=!e}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,e,i){const r=i?"show":"hide",o=this.getDatasetMeta(t),a=o.controller._resolveAnimations(void 0,r);vs(e)?(o.data[e].hidden=!i,this.update()):(this.setDatasetVisibility(t,i),a.update(o,{visible:i}),this.update(c=>c.datasetIndex===t?r:void 0))}hide(t,e){this._updateVisibility(t,e,!1)}show(t,e){this._updateVisibility(t,e,!0)}_destroyDatasetMeta(t){const e=this._metasets[t];e&&e.controller&&e.controller._destroy(),delete this._metasets[t]}_stop(){let t,e;for(this.stop(),qn.remove(this),t=0,e=this.data.datasets.length;t<e;++t)this._destroyDatasetMeta(t)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:t,ctx:e}=this;this._stop(),this.config.clearCache(),t&&(this.unbindEvents(),mp(t,e),this.platform.releaseContext(e),this.canvas=null,this.ctx=null),delete xa[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...t){return this.canvas.toDataURL(...t)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const t=this._listeners,e=this.platform,i=(o,a)=>{e.addEventListener(this,o,a),t[o]=a},r=(o,a,c)=>{o.offsetX=a,o.offsetY=c,this._eventHandler(o)};Bt(this.options.events,o=>i(o,r))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,e=this.platform,i=(u,f)=>{e.addEventListener(this,u,f),t[u]=f},r=(u,f)=>{t[u]&&(e.removeEventListener(this,u,f),delete t[u])},o=(u,f)=>{this.canvas&&this.resize(u,f)};let a;const c=()=>{r("attach",c),this.attached=!0,this.resize(),i("resize",o),i("detach",a)};a=()=>{this.attached=!1,r("resize",o),this._stop(),this._resize(0,0),i("attach",c)},e.isAttached(this.canvas)?c():a()}unbindEvents(){Bt(this._listeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._listeners={},Bt(this._responsiveListeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,e,i){const r=i?"set":"remove";let o,a,c,u;for(e==="dataset"&&(o=this.getDatasetMeta(t[0].datasetIndex),o.controller["_"+r+"DatasetHoverStyle"]()),c=0,u=t.length;c<u;++c){a=t[c];const f=a&&this.getDatasetMeta(a.datasetIndex).controller;f&&f[r+"HoverStyle"](a.element,a.datasetIndex,a.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){const e=this._active||[],i=t.map(({datasetIndex:o,index:a})=>{const c=this.getDatasetMeta(o);if(!c)throw new Error("No dataset found at index "+o);return{datasetIndex:o,element:c.data[a],index:a}});!Ea(i,e)&&(this._active=i,this._lastEvent=null,this._updateHoverStyles(i,e))}notifyPlugins(t,e,i){return this._plugins.notify(this,t,e,i)}isPluginEnabled(t){return this._plugins._cache.filter(e=>e.plugin.id===t).length===1}_updateHoverStyles(t,e,i){const r=this.options.hover,o=(u,f)=>u.filter(h=>!f.some(_=>h.datasetIndex===_.datasetIndex&&h.index===_.index)),a=o(e,t),c=i?t:o(t,e);a.length&&this.updateHoverStyle(a,r.mode,!1),c.length&&r.mode&&this.updateHoverStyle(c,r.mode,!0)}_eventHandler(t,e){const i={event:t,replay:e,cancelable:!0,inChartArea:this.isPointInArea(t)},r=a=>(a.options.events||this.options.events).includes(t.native.type);if(this.notifyPlugins("beforeEvent",i,r)===!1)return;const o=this._handleEvent(t,e,i.inChartArea);return i.cancelable=!1,this.notifyPlugins("afterEvent",i,r),(o||i.changed)&&this.render(),this}_handleEvent(t,e,i){const{_active:r=[],options:o}=this,a=e,c=this._getActiveElements(t,r,i,a),u=Rk(t),f=kM(t,this._lastEvent,i,u);i&&(this._lastEvent=null,zt(o.onHover,[t,c,this],this),u&&zt(o.onClick,[t,c,this],this));const h=!Ea(c,r);return(h||e)&&(this._active=c,this._updateHoverStyles(c,r,e)),this._lastEvent=f,h}_getActiveElements(t,e,i,r){if(t.type==="mouseout")return[];if(!i)return e;const o=this.options.hover;return this.getElementsAtEventForMode(t,o.mode,o,r)}}it(Gn,"defaults",Kt),it(Gn,"instances",xa),it(Gn,"overrides",qi),it(Gn,"registry",Mn),it(Gn,"version",bM),it(Gn,"getChart",Xp);function Jp(){return Bt(Gn.instances,n=>n._plugins.invalidate())}function CM(n,t,e){const{startAngle:i,pixelMargin:r,x:o,y:a,outerRadius:c,innerRadius:u}=t;let f=r/c;n.beginPath(),n.arc(o,a,c,i-f,e+f),u>r?(f=r/u,n.arc(o,a,u,e+f,i-f,!0)):n.arc(o,a,r,e+re,i-re),n.closePath(),n.clip()}function MM(n){return pu(n,["outerStart","outerEnd","innerStart","innerEnd"])}function AM(n,t,e,i){const r=MM(n.options.borderRadius),o=(e-t)/2,a=Math.min(o,i*t/2),c=u=>{const f=(e-Math.min(o,u))*i/2;return pe(u,0,Math.min(o,f))};return{outerStart:c(r.outerStart),outerEnd:c(r.outerEnd),innerStart:pe(r.innerStart,0,a),innerEnd:pe(r.innerEnd,0,a)}}function gr(n,t,e,i){return{x:e+n*Math.cos(t),y:i+n*Math.sin(t)}}function Oa(n,t,e,i,r,o){const{x:a,y:c,startAngle:u,pixelMargin:f,innerRadius:h}=t,_=Math.max(t.outerRadius+i+e-f,0),p=h>0?h+i+e+f:0;let m=0;const g=r-u;if(i){const Z=h>0?h-i:0,X=_>0?_-i:0,tt=(Z+X)/2,et=tt!==0?g*tt/(tt+i):g;m=(g-et)/2}const b=Math.max(.001,g*_-e/Vt)/_,w=(g-b)/2,C=u+w+m,M=r-w-m,{outerStart:D,outerEnd:S,innerStart:k,innerEnd:O}=AM(t,p,_,M-C),I=_-D,B=_-S,q=C+D/I,z=M-S/B,j=p+k,Y=p+O,ot=C+k/j,nt=M-O/Y;if(n.beginPath(),o){const Z=(q+z)/2;if(n.arc(a,c,_,q,Z),n.arc(a,c,_,Z,z),S>0){const at=gr(B,z,a,c);n.arc(at.x,at.y,S,z,M+re)}const X=gr(Y,M,a,c);if(n.lineTo(X.x,X.y),O>0){const at=gr(Y,nt,a,c);n.arc(at.x,at.y,O,M+re,nt+Math.PI)}const tt=(M-O/p+(C+k/p))/2;if(n.arc(a,c,p,M-O/p,tt,!0),n.arc(a,c,p,tt,C+k/p,!0),k>0){const at=gr(j,ot,a,c);n.arc(at.x,at.y,k,ot+Math.PI,C-re)}const et=gr(I,C,a,c);if(n.lineTo(et.x,et.y),D>0){const at=gr(I,q,a,c);n.arc(at.x,at.y,D,C-re,q)}}else{n.moveTo(a,c);const Z=Math.cos(q)*_+a,X=Math.sin(q)*_+c;n.lineTo(Z,X);const tt=Math.cos(z)*_+a,et=Math.sin(z)*_+c;n.lineTo(tt,et)}n.closePath()}function LM(n,t,e,i,r){const{fullCircles:o,startAngle:a,circumference:c}=t;let u=t.endAngle;if(o){Oa(n,t,e,i,u,r);for(let f=0;f<o;++f)n.fill();isNaN(c)||(u=a+(c%Ut||Ut))}return Oa(n,t,e,i,u,r),n.fill(),u}function PM(n,t,e,i,r){const{fullCircles:o,startAngle:a,circumference:c,options:u}=t,{borderWidth:f,borderJoinStyle:h,borderDash:_,borderDashOffset:p}=u,m=u.borderAlign==="inner";if(!f)return;n.setLineDash(_||[]),n.lineDashOffset=p,m?(n.lineWidth=f*2,n.lineJoin=h||"round"):(n.lineWidth=f,n.lineJoin=h||"bevel");let g=t.endAngle;if(o){Oa(n,t,e,i,g,r);for(let b=0;b<o;++b)n.stroke();isNaN(c)||(g=a+(c%Ut||Ut))}m&&CM(n,t,g),o||(Oa(n,t,e,i,g,r),n.stroke())}class is extends vn{constructor(e){super();it(this,"circumference");it(this,"endAngle");it(this,"fullCircles");it(this,"innerRadius");it(this,"outerRadius");it(this,"pixelMargin");it(this,"startAngle");this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,e&&Object.assign(this,e)}inRange(e,i,r){const o=this.getProps(["x","y"],r),{angle:a,distance:c}=om(o,{x:e,y:i}),{startAngle:u,endAngle:f,innerRadius:h,outerRadius:_,circumference:p}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],r),m=(this.options.spacing+this.options.borderWidth)/2,g=yt(p,f-u),b=bs(a,u,f)&&u!==f,w=g>=Ut||b,C=Zn(c,h+m,_+m);return w&&C}getCenterPoint(e){const{x:i,y:r,startAngle:o,endAngle:a,innerRadius:c,outerRadius:u}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],e),{offset:f,spacing:h}=this.options,_=(o+a)/2,p=(c+u+h+f)/2;return{x:i+Math.cos(_)*p,y:r+Math.sin(_)*p}}tooltipPosition(e){return this.getCenterPoint(e)}draw(e){const{options:i,circumference:r}=this,o=(i.offset||0)/4,a=(i.spacing||0)/2,c=i.circular;if(this.pixelMargin=i.borderAlign==="inner"?.33:0,this.fullCircles=r>Ut?Math.floor(r/Ut):0,r===0||this.innerRadius<0||this.outerRadius<0)return;e.save();const u=(this.startAngle+this.endAngle)/2;e.translate(Math.cos(u)*o,Math.sin(u)*o);const f=1-Math.sin(Math.min(Vt,r||0)),h=o*f;e.fillStyle=i.backgroundColor,e.strokeStyle=i.borderColor,LM(e,this,h,a,c),PM(e,this,h,a,c),e.restore()}}it(is,"id","arc"),it(is,"defaults",{borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0}),it(is,"defaultRoutes",{backgroundColor:"backgroundColor"}),it(is,"descriptors",{_scriptable:!0,_indexable:e=>e!=="borderDash"});function Hm(n,t,e=t){n.lineCap=yt(e.borderCapStyle,t.borderCapStyle),n.setLineDash(yt(e.borderDash,t.borderDash)),n.lineDashOffset=yt(e.borderDashOffset,t.borderDashOffset),n.lineJoin=yt(e.borderJoinStyle,t.borderJoinStyle),n.lineWidth=yt(e.borderWidth,t.borderWidth),n.strokeStyle=yt(e.borderColor,t.borderColor)}function OM(n,t,e){n.lineTo(e.x,e.y)}function RM(n){return n.stepped?eE:n.tension||n.cubicInterpolationMode==="monotone"?nE:OM}function Wm(n,t,e={}){const i=n.length,{start:r=0,end:o=i-1}=e,{start:a,end:c}=t,u=Math.max(r,a),f=Math.min(o,c),h=r<a&&o<a||r>c&&o>c;return{count:i,start:u,loop:t.loop,ilen:f<u&&!h?i+f-u:f-u}}function IM(n,t,e,i){const{points:r,options:o}=t,{count:a,start:c,loop:u,ilen:f}=Wm(r,e,i),h=RM(o);let{move:_=!0,reverse:p}=i||{},m,g,b;for(m=0;m<=f;++m)g=r[(c+(p?f-m:m))%a],!g.skip&&(_?(n.moveTo(g.x,g.y),_=!1):h(n,b,g,p,o.stepped),b=g);return u&&(g=r[(c+(p?f:0))%a],h(n,b,g,p,o.stepped)),!!u}function TM(n,t,e,i){const r=t.points,{count:o,start:a,ilen:c}=Wm(r,e,i),{move:u=!0,reverse:f}=i||{};let h=0,_=0,p,m,g,b,w,C;const M=S=>(a+(f?c-S:S))%o,D=()=>{b!==w&&(n.lineTo(h,w),n.lineTo(h,b),n.lineTo(h,C))};for(u&&(m=r[M(0)],n.moveTo(m.x,m.y)),p=0;p<=c;++p){if(m=r[M(p)],m.skip)continue;const S=m.x,k=m.y,O=S|0;O===g?(k<b?b=k:k>w&&(w=k),h=(_*h+S)/++_):(D(),n.lineTo(S,k),g=O,_=0,b=w=k),C=k}D()}function Hc(n){const t=n.options,e=t.borderDash&&t.borderDash.length;return!n._decimated&&!n._loop&&!t.tension&&t.cubicInterpolationMode!=="monotone"&&!t.stepped&&!e?TM:IM}function DM(n){return n.stepped?TE:n.tension||n.cubicInterpolationMode==="monotone"?DE:Wi}function BM(n,t,e,i){let r=t._path;r||(r=t._path=new Path2D,t.path(r,e,i)&&r.closePath()),Hm(n,t.options),n.stroke(r)}function FM(n,t,e,i){const{segments:r,options:o}=t,a=Hc(t);for(const c of r)Hm(n,o,c.style),n.beginPath(),a(n,t,c,{start:e,end:e+i-1})&&n.closePath(),n.stroke()}const NM=typeof Path2D=="function";function HM(n,t,e,i){NM&&!t.options.segment?BM(n,t,e,i):FM(n,t,e,i)}class mi extends vn{constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,e){const i=this.options;if((i.tension||i.cubicInterpolationMode==="monotone")&&!i.stepped&&!this._pointsUpdated){const r=i.spanGaps?this._loop:this._fullLoop;CE(this._points,i,t,r,e),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=zE(this,this.options.segment))}first(){const t=this.segments,e=this.points;return t.length&&e[t[0].start]}last(){const t=this.segments,e=this.points,i=t.length;return i&&e[t[i-1].end]}interpolate(t,e){const i=this.options,r=t[e],o=this.points,a=Cm(this,{property:e,start:r,end:r});if(!a.length)return;const c=[],u=DM(i);let f,h;for(f=0,h=a.length;f<h;++f){const{start:_,end:p}=a[f],m=o[_],g=o[p];if(m===g){c.push(m);continue}const b=Math.abs((r-m[e])/(g[e]-m[e])),w=u(m,g,b,i.stepped);w[e]=t[e],c.push(w)}return c.length===1?c[0]:c}pathSegment(t,e,i){return Hc(this)(t,this,e,i)}path(t,e,i){const r=this.segments,o=Hc(this);let a=this._loop;e=e||0,i=i||this.points.length-e;for(const c of r)a&=o(t,this,c,{start:e,end:e+i-1});return!!a}draw(t,e,i,r){const o=this.options||{};(this.points||[]).length&&o.borderWidth&&(t.save(),HM(t,this,i,r),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}it(mi,"id","line"),it(mi,"defaults",{borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0}),it(mi,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"}),it(mi,"descriptors",{_scriptable:!0,_indexable:t=>t!=="borderDash"&&t!=="fill"});function Zp(n,t,e,i){const r=n.options,{[e]:o}=n.getProps([e],i);return Math.abs(t-o)<r.radius+r.hitRadius}class wa extends vn{constructor(e){super();it(this,"parsed");it(this,"skip");it(this,"stop");this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,e&&Object.assign(this,e)}inRange(e,i,r){const o=this.options,{x:a,y:c}=this.getProps(["x","y"],r);return Math.pow(e-a,2)+Math.pow(i-c,2)<Math.pow(o.hitRadius+o.radius,2)}inXRange(e,i){return Zp(this,e,"x",i)}inYRange(e,i){return Zp(this,e,"y",i)}getCenterPoint(e){const{x:i,y:r}=this.getProps(["x","y"],e);return{x:i,y:r}}size(e){e=e||this.options||{};let i=e.radius||0;i=Math.max(i,i&&e.hoverRadius||0);const r=i&&e.borderWidth||0;return(i+r)*2}draw(e,i){const r=this.options;this.skip||r.radius<.1||!ti(this,i,this.size(r)/2)||(e.strokeStyle=r.borderColor,e.lineWidth=r.borderWidth,e.fillStyle=r.backgroundColor,Dc(e,r,this.x,this.y))}getRange(){const e=this.options||{};return e.radius+e.hitRadius}}it(wa,"id","point"),it(wa,"defaults",{borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0}),it(wa,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});function zm(n,t){const{x:e,y:i,base:r,width:o,height:a}=n.getProps(["x","y","base","width","height"],t);let c,u,f,h,_;return n.horizontal?(_=a/2,c=Math.min(e,r),u=Math.max(e,r),f=i-_,h=i+_):(_=o/2,c=e-_,u=e+_,f=Math.min(i,r),h=Math.max(i,r)),{left:c,top:f,right:u,bottom:h}}function _i(n,t,e,i){return n?0:pe(t,e,i)}function WM(n,t,e){const i=n.options.borderWidth,r=n.borderSkipped,o=gm(i);return{t:_i(r.top,o.top,0,e),r:_i(r.right,o.right,0,t),b:_i(r.bottom,o.bottom,0,e),l:_i(r.left,o.left,0,t)}}function zM(n,t,e){const{enableBorderRadius:i}=n.getProps(["enableBorderRadius"]),r=n.options.borderRadius,o=Ui(r),a=Math.min(t,e),c=n.borderSkipped,u=i||At(r);return{topLeft:_i(!u||c.top||c.left,o.topLeft,0,a),topRight:_i(!u||c.top||c.right,o.topRight,0,a),bottomLeft:_i(!u||c.bottom||c.left,o.bottomLeft,0,a),bottomRight:_i(!u||c.bottom||c.right,o.bottomRight,0,a)}}function jM(n){const t=zm(n),e=t.right-t.left,i=t.bottom-t.top,r=WM(n,e/2,i/2),o=zM(n,e/2,i/2);return{outer:{x:t.left,y:t.top,w:e,h:i,radius:o},inner:{x:t.left+r.l,y:t.top+r.t,w:e-r.l-r.r,h:i-r.t-r.b,radius:{topLeft:Math.max(0,o.topLeft-Math.max(r.t,r.l)),topRight:Math.max(0,o.topRight-Math.max(r.t,r.r)),bottomLeft:Math.max(0,o.bottomLeft-Math.max(r.b,r.l)),bottomRight:Math.max(0,o.bottomRight-Math.max(r.b,r.r))}}}}function wc(n,t,e,i){const r=t===null,o=e===null,c=n&&!(r&&o)&&zm(n,i);return c&&(r||Zn(t,c.left,c.right))&&(o||Zn(e,c.top,c.bottom))}function UM(n){return n.topLeft||n.topRight||n.bottomLeft||n.bottomRight}function VM(n,t){n.rect(t.x,t.y,t.w,t.h)}function Sc(n,t,e={}){const i=n.x!==e.x?-t:0,r=n.y!==e.y?-t:0,o=(n.x+n.w!==e.x+e.w?t:0)-i,a=(n.y+n.h!==e.y+e.h?t:0)-r;return{x:n.x+i,y:n.y+r,w:n.w+o,h:n.h+a,radius:n.radius}}class Sa extends vn{constructor(t){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,t&&Object.assign(this,t)}draw(t){const{inflateAmount:e,options:{borderColor:i,backgroundColor:r}}=this,{inner:o,outer:a}=jM(this),c=UM(a.radius)?xs:VM;t.save(),(a.w!==o.w||a.h!==o.h)&&(t.beginPath(),c(t,Sc(a,e,o)),t.clip(),c(t,Sc(o,-e,a)),t.fillStyle=i,t.fill("evenodd")),t.beginPath(),c(t,Sc(o,e)),t.fillStyle=r,t.fill(),t.restore()}inRange(t,e,i){return wc(this,t,e,i)}inXRange(t,e){return wc(this,t,null,e)}inYRange(t,e){return wc(this,null,t,e)}getCenterPoint(t){const{x:e,y:i,base:r,horizontal:o}=this.getProps(["x","y","base","horizontal"],t);return{x:o?(e+r)/2:e,y:o?i:(i+r)/2}}getRange(t){return t==="x"?this.width/2:this.height/2}}it(Sa,"id","bar"),it(Sa,"defaults",{borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0}),it(Sa,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});var qM=Object.freeze({__proto__:null,ArcElement:is,BarElement:Sa,LineElement:mi,PointElement:wa});const Wc=["rgb(54, 162, 235)","rgb(255, 99, 132)","rgb(255, 159, 64)","rgb(255, 205, 86)","rgb(75, 192, 192)","rgb(153, 102, 255)","rgb(201, 203, 207)"],Qp=Wc.map(n=>n.replace("rgb(","rgba(").replace(")",", 0.5)"));function jm(n){return Wc[n%Wc.length]}function Um(n){return Qp[n%Qp.length]}function $M(n,t){return n.borderColor=jm(t),n.backgroundColor=Um(t),++t}function YM(n,t){return n.backgroundColor=n.data.map(()=>jm(t++)),t}function GM(n,t){return n.backgroundColor=n.data.map(()=>Um(t++)),t}function KM(n){let t=0;return(e,i)=>{const r=n.getDatasetMeta(i).controller;r instanceof ji?t=YM(e,t):r instanceof ds?t=GM(e,t):r&&(t=$M(e,t))}}function tg(n){let t;for(t in n)if(n[t].borderColor||n[t].backgroundColor)return!0;return!1}function XM(n){return n&&(n.borderColor||n.backgroundColor)}function JM(){return Kt.borderColor!=="rgba(0,0,0,0.1)"||Kt.backgroundColor!=="rgba(0,0,0,0.1)"}var ZM={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(n,t,e){if(!e.enabled)return;const{data:{datasets:i},options:r}=n.config,{elements:o}=r,a=tg(i)||XM(r)||o&&tg(o)||JM();if(!e.forceOverride&&a)return;const c=KM(n);i.forEach(c)}};function QM(n,t,e,i,r){const o=r.samples||i;if(o>=e)return n.slice(t,t+e);const a=[],c=(e-2)/(o-2);let u=0;const f=t+e-1;let h=t,_,p,m,g,b;for(a[u++]=n[h],_=0;_<o-2;_++){let w=0,C=0,M;const D=Math.floor((_+1)*c)+1+t,S=Math.min(Math.floor((_+2)*c)+1,e)+t,k=S-D;for(M=D;M<S;M++)w+=n[M].x,C+=n[M].y;w/=k,C/=k;const O=Math.floor(_*c)+1+t,I=Math.min(Math.floor((_+1)*c)+1,e)+t,{x:B,y:q}=n[h];for(m=g=-1,M=O;M<I;M++)g=.5*Math.abs((B-w)*(n[M].y-q)-(B-n[M].x)*(C-q)),g>m&&(m=g,p=n[M],b=M);a[u++]=p,h=b}return a[u++]=n[f],a}function tA(n,t,e,i){let r=0,o=0,a,c,u,f,h,_,p,m,g,b;const w=[],C=t+e-1,M=n[t].x,S=n[C].x-M;for(a=t;a<t+e;++a){c=n[a],u=(c.x-M)/S*i,f=c.y;const k=u|0;if(k===h)f<g?(g=f,_=a):f>b&&(b=f,p=a),r=(o*r+c.x)/++o;else{const O=a-1;if(!Ct(_)&&!Ct(p)){const I=Math.min(_,p),B=Math.max(_,p);I!==m&&I!==O&&w.push({...n[I],x:r}),B!==m&&B!==O&&w.push({...n[B],x:r})}a>0&&O!==m&&w.push(n[O]),w.push(c),h=k,o=0,g=b=f,_=p=m=a}}return w}function Vm(n){if(n._decimated){const t=n._data;delete n._decimated,delete n._data,Object.defineProperty(n,"data",{configurable:!0,enumerable:!0,writable:!0,value:t})}}function eg(n){n.data.datasets.forEach(t=>{Vm(t)})}function eA(n,t){const e=t.length;let i=0,r;const{iScale:o}=n,{min:a,max:c,minDefined:u,maxDefined:f}=o.getUserBounds();return u&&(i=pe(Qn(t,o.axis,a).lo,0,e-1)),f?r=pe(Qn(t,o.axis,c).hi+1,i,e)-i:r=e-i,{start:i,count:r}}var nA={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(n,t,e)=>{if(!e.enabled){eg(n);return}const i=n.width;n.data.datasets.forEach((r,o)=>{const{_data:a,indexAxis:c}=r,u=n.getDatasetMeta(o),f=a||r.data;if(es([c,n.options.indexAxis])==="y"||!u.controller.supportsDecimation)return;const h=n.scales[u.xAxisID];if(h.type!=="linear"&&h.type!=="time"||n.options.parsing)return;let{start:_,count:p}=eA(u,f);const m=e.threshold||4*i;if(p<=m){Vm(r);return}Ct(a)&&(r._data=f,delete r.data,Object.defineProperty(r,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(b){this._data=b}}));let g;switch(e.algorithm){case"lttb":g=QM(f,_,p,i,e);break;case"min-max":g=tA(f,_,p,i);break;default:throw new Error(`Unsupported decimation algorithm '${e.algorithm}'`)}r._decimated=g})},destroy(n){eg(n)}};function iA(n,t,e){const i=n.segments,r=n.points,o=t.points,a=[];for(const c of i){let{start:u,end:f}=c;f=xu(u,f,r);const h=zc(e,r[u],r[f],c.loop);if(!t.segments){a.push({source:c,target:h,start:r[u],end:r[f]});continue}const _=Cm(t,h);for(const p of _){const m=zc(e,o[p.start],o[p.end],p.loop),g=Em(c,r,m);for(const b of g)a.push({source:b,target:p,start:{[e]:ng(h,m,"start",Math.max)},end:{[e]:ng(h,m,"end",Math.min)}})}}return a}function zc(n,t,e,i){if(i)return;let r=t[n],o=e[n];return n==="angle"&&(r=Je(r),o=Je(o)),{property:n,start:r,end:o}}function rA(n,t){const{x:e=null,y:i=null}=n||{},r=t.points,o=[];return t.segments.forEach(({start:a,end:c})=>{c=xu(a,c,r);const u=r[a],f=r[c];i!==null?(o.push({x:u.x,y:i}),o.push({x:f.x,y:i})):e!==null&&(o.push({x:e,y:u.y}),o.push({x:e,y:f.y}))}),o}function xu(n,t,e){for(;t>n;t--){const i=e[t];if(!isNaN(i.x)&&!isNaN(i.y))break}return t}function ng(n,t,e,i){return n&&t?i(n[e],t[e]):n?n[e]:t?t[e]:0}function qm(n,t){let e=[],i=!1;return Gt(n)?(i=!0,e=n):e=rA(n,t),e.length?new mi({points:e,options:{tension:0},_loop:i,_fullLoop:i}):null}function ig(n){return n&&n.fill!==!1}function sA(n,t,e){let r=n[t].fill;const o=[t];let a;if(!e)return r;for(;r!==!1&&o.indexOf(r)===-1;){if(!ee(r))return r;if(a=n[r],!a)return!1;if(a.visible)return r;o.push(r),r=a.fill}return!1}function oA(n,t,e){const i=uA(n);if(At(i))return isNaN(i.value)?!1:i;let r=parseFloat(i);return ee(r)&&Math.floor(r)===r?aA(i[0],t,r,e):["origin","start","end","stack","shape"].indexOf(i)>=0&&i}function aA(n,t,e,i){return(n==="-"||n==="+")&&(e=t+e),e===t||e<0||e>=i?!1:e}function lA(n,t){let e=null;return n==="start"?e=t.bottom:n==="end"?e=t.top:At(n)?e=t.getPixelForValue(n.value):t.getBasePixel&&(e=t.getBasePixel()),e}function cA(n,t,e){let i;return n==="start"?i=e:n==="end"?i=t.options.reverse?t.min:t.max:At(n)?i=n.value:i=t.getBaseValue(),i}function uA(n){const t=n.options,e=t.fill;let i=yt(e&&e.target,e);return i===void 0&&(i=!!t.backgroundColor),i===!1||i===null?!1:i===!0?"origin":i}function hA(n){const{scale:t,index:e,line:i}=n,r=[],o=i.segments,a=i.points,c=fA(t,e);c.push(qm({x:null,y:t.bottom},i));for(let u=0;u<o.length;u++){const f=o[u];for(let h=f.start;h<=f.end;h++)dA(r,a[h],c)}return new mi({points:r,options:{}})}function fA(n,t){const e=[],i=n.getMatchingVisibleMetas("line");for(let r=0;r<i.length;r++){const o=i[r];if(o.index===t)break;o.hidden||e.unshift(o.dataset)}return e}function dA(n,t,e){const i=[];for(let r=0;r<e.length;r++){const o=e[r],{first:a,last:c,point:u}=pA(o,t,"x");if(!(!u||a&&c)){if(a)i.unshift(u);else if(n.push(u),!c)break}}n.push(...i)}function pA(n,t,e){const i=n.interpolate(t,e);if(!i)return{};const r=i[e],o=n.segments,a=n.points;let c=!1,u=!1;for(let f=0;f<o.length;f++){const h=o[f],_=a[h.start][e],p=a[h.end][e];if(Zn(r,_,p)){c=r===_,u=r===p;break}}return{first:c,last:u,point:i}}class $m{constructor(t){this.x=t.x,this.y=t.y,this.radius=t.radius}pathSegment(t,e,i){const{x:r,y:o,radius:a}=this;return e=e||{start:0,end:Ut},t.arc(r,o,a,e.end,e.start,!0),!i.bounds}interpolate(t){const{x:e,y:i,radius:r}=this,o=t.angle;return{x:e+Math.cos(o)*r,y:i+Math.sin(o)*r,angle:o}}}function gA(n){const{chart:t,fill:e,line:i}=n;if(ee(e))return mA(t,e);if(e==="stack")return hA(n);if(e==="shape")return!0;const r=_A(n);return r instanceof $m?r:qm(r,i)}function mA(n,t){const e=n.getDatasetMeta(t);return e&&n.isDatasetVisible(t)?e.dataset:null}function _A(n){return(n.scale||{}).getPointPositionForValue?vA(n):yA(n)}function yA(n){const{scale:t={},fill:e}=n,i=lA(e,t);if(ee(i)){const r=t.isHorizontal();return{x:r?i:null,y:r?null:i}}return null}function vA(n){const{scale:t,fill:e}=n,i=t.options,r=t.getLabels().length,o=i.reverse?t.max:t.min,a=cA(e,t,o),c=[];if(i.grid.circular){const u=t.getPointPositionForValue(0,o);return new $m({x:u.x,y:u.y,radius:t.getDistanceFromCenterForValue(a)})}for(let u=0;u<r;++u)c.push(t.getPointPositionForValue(u,a));return c}function kc(n,t,e){const i=gA(t),{line:r,scale:o,axis:a}=t,c=r.options,u=c.fill,f=c.backgroundColor,{above:h=f,below:_=f}=u||{};i&&r.points.length&&(Wa(n,e),bA(n,{line:r,target:i,above:h,below:_,area:e,scale:o,axis:a}),za(n))}function bA(n,t){const{line:e,target:i,above:r,below:o,area:a,scale:c}=t,u=e._loop?"angle":t.axis;n.save(),u==="x"&&o!==r&&(rg(n,i,a.top),sg(n,{line:e,target:i,color:r,scale:c,property:u}),n.restore(),n.save(),rg(n,i,a.bottom)),sg(n,{line:e,target:i,color:o,scale:c,property:u}),n.restore()}function rg(n,t,e){const{segments:i,points:r}=t;let o=!0,a=!1;n.beginPath();for(const c of i){const{start:u,end:f}=c,h=r[u],_=r[xu(u,f,r)];o?(n.moveTo(h.x,h.y),o=!1):(n.lineTo(h.x,e),n.lineTo(h.x,h.y)),a=!!t.pathSegment(n,c,{move:a}),a?n.closePath():n.lineTo(_.x,e)}n.lineTo(t.first().x,e),n.closePath(),n.clip()}function sg(n,t){const{line:e,target:i,property:r,color:o,scale:a}=t,c=iA(e,i,r);for(const{source:u,target:f,start:h,end:_}of c){const{style:{backgroundColor:p=o}={}}=u,m=i!==!0;n.save(),n.fillStyle=p,xA(n,a,m&&zc(r,h,_)),n.beginPath();const g=!!e.pathSegment(n,u);let b;if(m){g?n.closePath():og(n,i,_,r);const w=!!i.pathSegment(n,f,{move:g,reverse:!0});b=g&&w,b||og(n,i,h,r)}n.closePath(),n.fill(b?"evenodd":"nonzero"),n.restore()}}function xA(n,t,e){const{top:i,bottom:r}=t.chart.chartArea,{property:o,start:a,end:c}=e||{};o==="x"&&(n.beginPath(),n.rect(a,i,c-a,r-i),n.clip())}function og(n,t,e,i){const r=t.interpolate(e,i);r&&n.lineTo(r.x,r.y)}var wA={id:"filler",afterDatasetsUpdate(n,t,e){const i=(n.data.datasets||[]).length,r=[];let o,a,c,u;for(a=0;a<i;++a)o=n.getDatasetMeta(a),c=o.dataset,u=null,c&&c.options&&c instanceof mi&&(u={visible:n.isDatasetVisible(a),index:a,fill:oA(c,a,i),chart:n,axis:o.controller.options.indexAxis,scale:o.vScale,line:c}),o.$filler=u,r.push(u);for(a=0;a<i;++a)u=r[a],!(!u||u.fill===!1)&&(u.fill=sA(r,a,e.propagate))},beforeDraw(n,t,e){const i=e.drawTime==="beforeDraw",r=n.getSortedVisibleDatasetMetas(),o=n.chartArea;for(let a=r.length-1;a>=0;--a){const c=r[a].$filler;c&&(c.line.updateControlPoints(o,c.axis),i&&c.fill&&kc(n.ctx,c,o))}},beforeDatasetsDraw(n,t,e){if(e.drawTime!=="beforeDatasetsDraw")return;const i=n.getSortedVisibleDatasetMetas();for(let r=i.length-1;r>=0;--r){const o=i[r].$filler;ig(o)&&kc(n.ctx,o,n.chartArea)}},beforeDatasetDraw(n,t,e){const i=t.meta.$filler;!ig(i)||e.drawTime!=="beforeDatasetDraw"||kc(n.ctx,i,n.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const ag=(n,t)=>{let{boxHeight:e=t,boxWidth:i=t}=n;return n.usePointStyle&&(e=Math.min(e,t),i=n.pointStyleWidth||Math.min(i,t)),{boxWidth:i,boxHeight:e,itemHeight:Math.max(t,e)}},SA=(n,t)=>n!==null&&t!==null&&n.datasetIndex===t.datasetIndex&&n.index===t.index;class lg extends vn{constructor(t){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e,i){this.maxWidth=t,this.maxHeight=e,this._margins=i,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const t=this.options.labels||{};let e=zt(t.generateLabels,[this.chart],this)||[];t.filter&&(e=e.filter(i=>t.filter(i,this.chart.data))),t.sort&&(e=e.sort((i,r)=>t.sort(i,r,this.chart.data))),this.options.reverse&&e.reverse(),this.legendItems=e}fit(){const{options:t,ctx:e}=this;if(!t.display){this.width=this.height=0;return}const i=t.labels,r=fe(i.font),o=r.size,a=this._computeTitleHeight(),{boxWidth:c,itemHeight:u}=ag(i,o);let f,h;e.font=r.string,this.isHorizontal()?(f=this.maxWidth,h=this._fitRows(a,o,c,u)+10):(h=this.maxHeight,f=this._fitCols(a,r,c,u)+10),this.width=Math.min(f,t.maxWidth||this.maxWidth),this.height=Math.min(h,t.maxHeight||this.maxHeight)}_fitRows(t,e,i,r){const{ctx:o,maxWidth:a,options:{labels:{padding:c}}}=this,u=this.legendHitBoxes=[],f=this.lineWidths=[0],h=r+c;let _=t;o.textAlign="left",o.textBaseline="middle";let p=-1,m=-h;return this.legendItems.forEach((g,b)=>{const w=i+e/2+o.measureText(g.text).width;(b===0||f[f.length-1]+w+2*c>a)&&(_+=h,f[f.length-(b>0?0:1)]=0,m+=h,p++),u[b]={left:0,top:m,row:p,width:w,height:r},f[f.length-1]+=w+c}),_}_fitCols(t,e,i,r){const{ctx:o,maxHeight:a,options:{labels:{padding:c}}}=this,u=this.legendHitBoxes=[],f=this.columnSizes=[],h=a-t;let _=c,p=0,m=0,g=0,b=0;return this.legendItems.forEach((w,C)=>{const{itemWidth:M,itemHeight:D}=kA(i,e,o,w,r);C>0&&m+D+2*c>h&&(_+=p+c,f.push({width:p,height:m}),g+=p+c,b++,p=m=0),u[C]={left:g,top:m,col:b,width:M,height:D},p=Math.max(p,M),m+=D+c}),_+=p,f.push({width:p,height:m}),_}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:e,options:{align:i,labels:{padding:r},rtl:o}}=this,a=vr(o,this.left,this.width);if(this.isHorizontal()){let c=0,u=xe(i,this.left+r,this.right-this.lineWidths[c]);for(const f of e)c!==f.row&&(c=f.row,u=xe(i,this.left+r,this.right-this.lineWidths[c])),f.top+=this.top+t+r,f.left=a.leftForLtr(a.x(u),f.width),u+=f.width+r}else{let c=0,u=xe(i,this.top+t+r,this.bottom-this.columnSizes[c].height);for(const f of e)f.col!==c&&(c=f.col,u=xe(i,this.top+t+r,this.bottom-this.columnSizes[c].height)),f.top=u,f.left+=this.left+r,f.left=a.leftForLtr(a.x(f.left),f.width),u+=f.height+r}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const t=this.ctx;Wa(t,this),this._draw(),za(t)}}_draw(){const{options:t,columnSizes:e,lineWidths:i,ctx:r}=this,{align:o,labels:a}=t,c=Kt.color,u=vr(t.rtl,this.left,this.width),f=fe(a.font),{padding:h}=a,_=f.size,p=_/2;let m;this.drawTitle(),r.textAlign=u.textAlign("left"),r.textBaseline="middle",r.lineWidth=.5,r.font=f.string;const{boxWidth:g,boxHeight:b,itemHeight:w}=ag(a,_),C=function(O,I,B){if(isNaN(g)||g<=0||isNaN(b)||b<0)return;r.save();const q=yt(B.lineWidth,1);if(r.fillStyle=yt(B.fillStyle,c),r.lineCap=yt(B.lineCap,"butt"),r.lineDashOffset=yt(B.lineDashOffset,0),r.lineJoin=yt(B.lineJoin,"miter"),r.lineWidth=q,r.strokeStyle=yt(B.strokeStyle,c),r.setLineDash(yt(B.lineDash,[])),a.usePointStyle){const z={radius:b*Math.SQRT2/2,pointStyle:B.pointStyle,rotation:B.rotation,borderWidth:q},j=u.xPlus(O,g/2),Y=I+p;pm(r,z,j,Y,a.pointStyleWidth&&g)}else{const z=I+Math.max((_-b)/2,0),j=u.leftForLtr(O,g),Y=Ui(B.borderRadius);r.beginPath(),Object.values(Y).some(ot=>ot!==0)?xs(r,{x:j,y:z,w:g,h:b,radius:Y}):r.rect(j,z,g,b),r.fill(),q!==0&&r.stroke()}r.restore()},M=function(O,I,B){$i(r,B.text,O,I+w/2,f,{strikethrough:B.hidden,textAlign:u.textAlign(B.textAlign)})},D=this.isHorizontal(),S=this._computeTitleHeight();D?m={x:xe(o,this.left+h,this.right-i[0]),y:this.top+h+S,line:0}:m={x:this.left+h,y:xe(o,this.top+S+h,this.bottom-e[0].height),line:0},wm(this.ctx,t.textDirection);const k=w+h;this.legendItems.forEach((O,I)=>{r.strokeStyle=O.fontColor,r.fillStyle=O.fontColor;const B=r.measureText(O.text).width,q=u.textAlign(O.textAlign||(O.textAlign=a.textAlign)),z=g+p+B;let j=m.x,Y=m.y;u.setWidth(this.width),D?I>0&&j+z+h>this.right&&(Y=m.y+=k,m.line++,j=m.x=xe(o,this.left+h,this.right-i[m.line])):I>0&&Y+k>this.bottom&&(j=m.x=j+e[m.line].width+h,m.line++,Y=m.y=xe(o,this.top+S+h,this.bottom-e[m.line].height));const ot=u.x(j);if(C(ot,Y,O),j=Vk(q,j+g+p,D?j+z:this.right,t.rtl),M(u.x(j),Y,O),D)m.x+=z+h;else if(typeof O.text!="string"){const nt=f.lineHeight;m.y+=Ym(O,nt)+h}else m.y+=k}),Sm(this.ctx,t.textDirection)}drawTitle(){const t=this.options,e=t.title,i=fe(e.font),r=Se(e.padding);if(!e.display)return;const o=vr(t.rtl,this.left,this.width),a=this.ctx,c=e.position,u=i.size/2,f=r.top+u;let h,_=this.left,p=this.width;if(this.isHorizontal())p=Math.max(...this.lineWidths),h=this.top+f,_=xe(t.align,_,this.right-p);else{const g=this.columnSizes.reduce((b,w)=>Math.max(b,w.height),0);h=f+xe(t.align,this.top,this.bottom-g-t.labels.padding-this._computeTitleHeight())}const m=xe(c,_,_+p);a.textAlign=o.textAlign(fu(c)),a.textBaseline="middle",a.strokeStyle=e.color,a.fillStyle=e.color,a.font=i.string,$i(a,e.text,m,h,i)}_computeTitleHeight(){const t=this.options.title,e=fe(t.font),i=Se(t.padding);return t.display?e.lineHeight+i.height:0}_getLegendItemAt(t,e){let i,r,o;if(Zn(t,this.left,this.right)&&Zn(e,this.top,this.bottom)){for(o=this.legendHitBoxes,i=0;i<o.length;++i)if(r=o[i],Zn(t,r.left,r.left+r.width)&&Zn(e,r.top,r.top+r.height))return this.legendItems[i]}return null}handleEvent(t){const e=this.options;if(!MA(t.type,e))return;const i=this._getLegendItemAt(t.x,t.y);if(t.type==="mousemove"||t.type==="mouseout"){const r=this._hoveredItem,o=SA(r,i);r&&!o&&zt(e.onLeave,[t,r,this],this),this._hoveredItem=i,i&&!o&&zt(e.onHover,[t,i,this],this)}else i&&zt(e.onClick,[t,i,this],this)}}function kA(n,t,e,i,r){const o=EA(i,n,t,e),a=CA(r,i,t.lineHeight);return{itemWidth:o,itemHeight:a}}function EA(n,t,e,i){let r=n.text;return r&&typeof r!="string"&&(r=r.reduce((o,a)=>o.length>a.length?o:a)),t+e.size/2+i.measureText(r).width}function CA(n,t,e){let i=n;return typeof t.text!="string"&&(i=Ym(t,e)),i}function Ym(n,t){const e=n.text?n.text.length:0;return t*e}function MA(n,t){return!!((n==="mousemove"||n==="mouseout")&&(t.onHover||t.onLeave)||t.onClick&&(n==="click"||n==="mouseup"))}var AA={id:"legend",_element:lg,start(n,t,e){const i=n.legend=new lg({ctx:n.ctx,options:e,chart:n});we.configure(n,i,e),we.addBox(n,i)},stop(n){we.removeBox(n,n.legend),delete n.legend},beforeUpdate(n,t,e){const i=n.legend;we.configure(n,i,e),i.options=e},afterUpdate(n){const t=n.legend;t.buildLabels(),t.adjustHitBoxes()},afterEvent(n,t){t.replay||n.legend.handleEvent(t.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(n,t,e){const i=t.datasetIndex,r=e.chart;r.isDatasetVisible(i)?(r.hide(i),t.hidden=!0):(r.show(i),t.hidden=!1)},onHover:null,onLeave:null,labels:{color:n=>n.chart.options.color,boxWidth:40,padding:10,generateLabels(n){const t=n.data.datasets,{labels:{usePointStyle:e,pointStyle:i,textAlign:r,color:o,useBorderRadius:a,borderRadius:c}}=n.legend.options;return n._getSortedDatasetMetas().map(u=>{const f=u.controller.getStyle(e?0:void 0),h=Se(f.borderWidth);return{text:t[u.index].label,fillStyle:f.backgroundColor,fontColor:o,hidden:!u.visible,lineCap:f.borderCapStyle,lineDash:f.borderDash,lineDashOffset:f.borderDashOffset,lineJoin:f.borderJoinStyle,lineWidth:(h.width+h.height)/4,strokeStyle:f.borderColor,pointStyle:i||f.pointStyle,rotation:f.rotation,textAlign:r||f.textAlign,borderRadius:a&&(c||f.borderRadius),datasetIndex:u.index}},this)}},title:{color:n=>n.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:n=>!n.startsWith("on"),labels:{_scriptable:n=>!["generateLabels","filter","sort"].includes(n)}}};class wu extends vn{constructor(t){super(),this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e){const i=this.options;if(this.left=0,this.top=0,!i.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=t,this.height=this.bottom=e;const r=Gt(i.text)?i.text.length:1;this._padding=Se(i.padding);const o=r*fe(i.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=o:this.width=o}isHorizontal(){const t=this.options.position;return t==="top"||t==="bottom"}_drawArgs(t){const{top:e,left:i,bottom:r,right:o,options:a}=this,c=a.align;let u=0,f,h,_;return this.isHorizontal()?(h=xe(c,i,o),_=e+t,f=o-i):(a.position==="left"?(h=i+t,_=xe(c,r,e),u=Vt*-.5):(h=o-t,_=xe(c,e,r),u=Vt*.5),f=r-e),{titleX:h,titleY:_,maxWidth:f,rotation:u}}draw(){const t=this.ctx,e=this.options;if(!e.display)return;const i=fe(e.font),o=i.lineHeight/2+this._padding.top,{titleX:a,titleY:c,maxWidth:u,rotation:f}=this._drawArgs(o);$i(t,e.text,0,0,i,{color:e.color,maxWidth:u,rotation:f,textAlign:fu(e.align),textBaseline:"middle",translation:[a,c]})}}function LA(n,t){const e=new wu({ctx:n.ctx,options:t,chart:n});we.configure(n,e,t),we.addBox(n,e),n.titleBlock=e}var PA={id:"title",_element:wu,start(n,t,e){LA(n,e)},stop(n){const t=n.titleBlock;we.removeBox(n,t),delete n.titleBlock},beforeUpdate(n,t,e){const i=n.titleBlock;we.configure(n,i,e),i.options=e},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const aa=new WeakMap;var OA={id:"subtitle",start(n,t,e){const i=new wu({ctx:n.ctx,options:e,chart:n});we.configure(n,i,e),we.addBox(n,i),aa.set(n,i)},stop(n){we.removeBox(n,aa.get(n)),aa.delete(n)},beforeUpdate(n,t,e){const i=aa.get(n);we.configure(n,i,e),i.options=e},defaults:{align:"center",display:!1,font:{weight:"normal"},fullSize:!0,padding:0,position:"top",text:"",weight:1500},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const rs={average(n){if(!n.length)return!1;let t,e,i=new Set,r=0,o=0;for(t=0,e=n.length;t<e;++t){const c=n[t].element;if(c&&c.hasValue()){const u=c.tooltipPosition();i.add(u.x),r+=u.y,++o}}return o===0||i.size===0?!1:{x:[...i].reduce((c,u)=>c+u)/i.size,y:r/o}},nearest(n,t){if(!n.length)return!1;let e=t.x,i=t.y,r=Number.POSITIVE_INFINITY,o,a,c;for(o=0,a=n.length;o<a;++o){const u=n[o].element;if(u&&u.hasValue()){const f=u.getCenterPoint(),h=Ic(t,f);h<r&&(r=h,c=u)}}if(c){const u=c.tooltipPosition();e=u.x,i=u.y}return{x:e,y:i}}};function Cn(n,t){return t&&(Gt(t)?Array.prototype.push.apply(n,t):n.push(t)),n}function $n(n){return(typeof n=="string"||n instanceof String)&&n.indexOf(`
443
- `)>-1?n.split(`
444
- `):n}function RA(n,t){const{element:e,datasetIndex:i,index:r}=t,o=n.getDatasetMeta(i).controller,{label:a,value:c}=o.getLabelAndValue(r);return{chart:n,label:a,parsed:o.getParsed(r),raw:n.data.datasets[i].data[r],formattedValue:c,dataset:o.getDataset(),dataIndex:r,datasetIndex:i,element:e}}function cg(n,t){const e=n.chart.ctx,{body:i,footer:r,title:o}=n,{boxWidth:a,boxHeight:c}=t,u=fe(t.bodyFont),f=fe(t.titleFont),h=fe(t.footerFont),_=o.length,p=r.length,m=i.length,g=Se(t.padding);let b=g.height,w=0,C=i.reduce((S,k)=>S+k.before.length+k.lines.length+k.after.length,0);if(C+=n.beforeBody.length+n.afterBody.length,_&&(b+=_*f.lineHeight+(_-1)*t.titleSpacing+t.titleMarginBottom),C){const S=t.displayColors?Math.max(c,u.lineHeight):u.lineHeight;b+=m*S+(C-m)*u.lineHeight+(C-1)*t.bodySpacing}p&&(b+=t.footerMarginTop+p*h.lineHeight+(p-1)*t.footerSpacing);let M=0;const D=function(S){w=Math.max(w,e.measureText(S).width+M)};return e.save(),e.font=f.string,Bt(n.title,D),e.font=u.string,Bt(n.beforeBody.concat(n.afterBody),D),M=t.displayColors?a+2+t.boxPadding:0,Bt(i,S=>{Bt(S.before,D),Bt(S.lines,D),Bt(S.after,D)}),M=0,e.font=h.string,Bt(n.footer,D),e.restore(),w+=g.width,{width:w,height:b}}function IA(n,t){const{y:e,height:i}=t;return e<i/2?"top":e>n.height-i/2?"bottom":"center"}function TA(n,t,e,i){const{x:r,width:o}=i,a=e.caretSize+e.caretPadding;if(n==="left"&&r+o+a>t.width||n==="right"&&r-o-a<0)return!0}function DA(n,t,e,i){const{x:r,width:o}=e,{width:a,chartArea:{left:c,right:u}}=n;let f="center";return i==="center"?f=r<=(c+u)/2?"left":"right":r<=o/2?f="left":r>=a-o/2&&(f="right"),TA(f,n,t,e)&&(f="center"),f}function ug(n,t,e){const i=e.yAlign||t.yAlign||IA(n,e);return{xAlign:e.xAlign||t.xAlign||DA(n,t,e,i),yAlign:i}}function BA(n,t){let{x:e,width:i}=n;return t==="right"?e-=i:t==="center"&&(e-=i/2),e}function FA(n,t,e){let{y:i,height:r}=n;return t==="top"?i+=e:t==="bottom"?i-=r+e:i-=r/2,i}function hg(n,t,e,i){const{caretSize:r,caretPadding:o,cornerRadius:a}=n,{xAlign:c,yAlign:u}=e,f=r+o,{topLeft:h,topRight:_,bottomLeft:p,bottomRight:m}=Ui(a);let g=BA(t,c);const b=FA(t,u,f);return u==="center"?c==="left"?g+=f:c==="right"&&(g-=f):c==="left"?g-=Math.max(h,p)+r:c==="right"&&(g+=Math.max(_,m)+r),{x:pe(g,0,i.width-t.width),y:pe(b,0,i.height-t.height)}}function la(n,t,e){const i=Se(e.padding);return t==="center"?n.x+n.width/2:t==="right"?n.x+n.width-i.right:n.x+i.left}function fg(n){return Cn([],$n(n))}function NA(n,t,e){return wi(n,{tooltip:t,tooltipItems:e,type:"tooltip"})}function dg(n,t){const e=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return e?n.override(e):n}const Gm={beforeTitle:Vn,title(n){if(n.length>0){const t=n[0],e=t.chart.data.labels,i=e?e.length:0;if(this&&this.options&&this.options.mode==="dataset")return t.dataset.label||"";if(t.label)return t.label;if(i>0&&t.dataIndex<i)return e[t.dataIndex]}return""},afterTitle:Vn,beforeBody:Vn,beforeLabel:Vn,label(n){if(this&&this.options&&this.options.mode==="dataset")return n.label+": "+n.formattedValue||n.formattedValue;let t=n.dataset.label||"";t&&(t+=": ");const e=n.formattedValue;return Ct(e)||(t+=e),t},labelColor(n){const e=n.chart.getDatasetMeta(n.datasetIndex).controller.getStyle(n.dataIndex);return{borderColor:e.borderColor,backgroundColor:e.backgroundColor,borderWidth:e.borderWidth,borderDash:e.borderDash,borderDashOffset:e.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(n){const e=n.chart.getDatasetMeta(n.datasetIndex).controller.getStyle(n.dataIndex);return{pointStyle:e.pointStyle,rotation:e.rotation}},afterLabel:Vn,afterBody:Vn,beforeFooter:Vn,footer:Vn,afterFooter:Vn};function Be(n,t,e,i){const r=n[t].call(e,i);return typeof r>"u"?Gm[t].call(e,i):r}class jc extends vn{constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const e=this.chart,i=this.options.setContext(this.getContext()),r=i.enabled&&e.options.animation&&i.animations,o=new Mm(this.chart,r);return r._cacheable&&(this._cachedAnimations=Object.freeze(o)),o}getContext(){return this.$context||(this.$context=NA(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,e){const{callbacks:i}=e,r=Be(i,"beforeTitle",this,t),o=Be(i,"title",this,t),a=Be(i,"afterTitle",this,t);let c=[];return c=Cn(c,$n(r)),c=Cn(c,$n(o)),c=Cn(c,$n(a)),c}getBeforeBody(t,e){return fg(Be(e.callbacks,"beforeBody",this,t))}getBody(t,e){const{callbacks:i}=e,r=[];return Bt(t,o=>{const a={before:[],lines:[],after:[]},c=dg(i,o);Cn(a.before,$n(Be(c,"beforeLabel",this,o))),Cn(a.lines,Be(c,"label",this,o)),Cn(a.after,$n(Be(c,"afterLabel",this,o))),r.push(a)}),r}getAfterBody(t,e){return fg(Be(e.callbacks,"afterBody",this,t))}getFooter(t,e){const{callbacks:i}=e,r=Be(i,"beforeFooter",this,t),o=Be(i,"footer",this,t),a=Be(i,"afterFooter",this,t);let c=[];return c=Cn(c,$n(r)),c=Cn(c,$n(o)),c=Cn(c,$n(a)),c}_createItems(t){const e=this._active,i=this.chart.data,r=[],o=[],a=[];let c=[],u,f;for(u=0,f=e.length;u<f;++u)c.push(RA(this.chart,e[u]));return t.filter&&(c=c.filter((h,_,p)=>t.filter(h,_,p,i))),t.itemSort&&(c=c.sort((h,_)=>t.itemSort(h,_,i))),Bt(c,h=>{const _=dg(t.callbacks,h);r.push(Be(_,"labelColor",this,h)),o.push(Be(_,"labelPointStyle",this,h)),a.push(Be(_,"labelTextColor",this,h))}),this.labelColors=r,this.labelPointStyles=o,this.labelTextColors=a,this.dataPoints=c,c}update(t,e){const i=this.options.setContext(this.getContext()),r=this._active;let o,a=[];if(!r.length)this.opacity!==0&&(o={opacity:0});else{const c=rs[i.position].call(this,r,this._eventPosition);a=this._createItems(i),this.title=this.getTitle(a,i),this.beforeBody=this.getBeforeBody(a,i),this.body=this.getBody(a,i),this.afterBody=this.getAfterBody(a,i),this.footer=this.getFooter(a,i);const u=this._size=cg(this,i),f=Object.assign({},c,u),h=ug(this.chart,i,f),_=hg(i,f,h,this.chart);this.xAlign=h.xAlign,this.yAlign=h.yAlign,o={opacity:1,x:_.x,y:_.y,width:u.width,height:u.height,caretX:c.x,caretY:c.y}}this._tooltipItems=a,this.$context=void 0,o&&this._resolveAnimations().update(this,o),t&&i.external&&i.external.call(this,{chart:this.chart,tooltip:this,replay:e})}drawCaret(t,e,i,r){const o=this.getCaretPosition(t,i,r);e.lineTo(o.x1,o.y1),e.lineTo(o.x2,o.y2),e.lineTo(o.x3,o.y3)}getCaretPosition(t,e,i){const{xAlign:r,yAlign:o}=this,{caretSize:a,cornerRadius:c}=i,{topLeft:u,topRight:f,bottomLeft:h,bottomRight:_}=Ui(c),{x:p,y:m}=t,{width:g,height:b}=e;let w,C,M,D,S,k;return o==="center"?(S=m+b/2,r==="left"?(w=p,C=w-a,D=S+a,k=S-a):(w=p+g,C=w+a,D=S-a,k=S+a),M=w):(r==="left"?C=p+Math.max(u,h)+a:r==="right"?C=p+g-Math.max(f,_)-a:C=this.caretX,o==="top"?(D=m,S=D-a,w=C-a,M=C+a):(D=m+b,S=D+a,w=C+a,M=C-a),k=D),{x1:w,x2:C,x3:M,y1:D,y2:S,y3:k}}drawTitle(t,e,i){const r=this.title,o=r.length;let a,c,u;if(o){const f=vr(i.rtl,this.x,this.width);for(t.x=la(this,i.titleAlign,i),e.textAlign=f.textAlign(i.titleAlign),e.textBaseline="middle",a=fe(i.titleFont),c=i.titleSpacing,e.fillStyle=i.titleColor,e.font=a.string,u=0;u<o;++u)e.fillText(r[u],f.x(t.x),t.y+a.lineHeight/2),t.y+=a.lineHeight+c,u+1===o&&(t.y+=i.titleMarginBottom-c)}}_drawColorBox(t,e,i,r,o){const a=this.labelColors[i],c=this.labelPointStyles[i],{boxHeight:u,boxWidth:f}=o,h=fe(o.bodyFont),_=la(this,"left",o),p=r.x(_),m=u<h.lineHeight?(h.lineHeight-u)/2:0,g=e.y+m;if(o.usePointStyle){const b={radius:Math.min(f,u)/2,pointStyle:c.pointStyle,rotation:c.rotation,borderWidth:1},w=r.leftForLtr(p,f)+f/2,C=g+u/2;t.strokeStyle=o.multiKeyBackground,t.fillStyle=o.multiKeyBackground,Dc(t,b,w,C),t.strokeStyle=a.borderColor,t.fillStyle=a.backgroundColor,Dc(t,b,w,C)}else{t.lineWidth=At(a.borderWidth)?Math.max(...Object.values(a.borderWidth)):a.borderWidth||1,t.strokeStyle=a.borderColor,t.setLineDash(a.borderDash||[]),t.lineDashOffset=a.borderDashOffset||0;const b=r.leftForLtr(p,f),w=r.leftForLtr(r.xPlus(p,1),f-2),C=Ui(a.borderRadius);Object.values(C).some(M=>M!==0)?(t.beginPath(),t.fillStyle=o.multiKeyBackground,xs(t,{x:b,y:g,w:f,h:u,radius:C}),t.fill(),t.stroke(),t.fillStyle=a.backgroundColor,t.beginPath(),xs(t,{x:w,y:g+1,w:f-2,h:u-2,radius:C}),t.fill()):(t.fillStyle=o.multiKeyBackground,t.fillRect(b,g,f,u),t.strokeRect(b,g,f,u),t.fillStyle=a.backgroundColor,t.fillRect(w,g+1,f-2,u-2))}t.fillStyle=this.labelTextColors[i]}drawBody(t,e,i){const{body:r}=this,{bodySpacing:o,bodyAlign:a,displayColors:c,boxHeight:u,boxWidth:f,boxPadding:h}=i,_=fe(i.bodyFont);let p=_.lineHeight,m=0;const g=vr(i.rtl,this.x,this.width),b=function(B){e.fillText(B,g.x(t.x+m),t.y+p/2),t.y+=p+o},w=g.textAlign(a);let C,M,D,S,k,O,I;for(e.textAlign=a,e.textBaseline="middle",e.font=_.string,t.x=la(this,w,i),e.fillStyle=i.bodyColor,Bt(this.beforeBody,b),m=c&&w!=="right"?a==="center"?f/2+h:f+2+h:0,S=0,O=r.length;S<O;++S){for(C=r[S],M=this.labelTextColors[S],e.fillStyle=M,Bt(C.before,b),D=C.lines,c&&D.length&&(this._drawColorBox(e,t,S,g,i),p=Math.max(_.lineHeight,u)),k=0,I=D.length;k<I;++k)b(D[k]),p=_.lineHeight;Bt(C.after,b)}m=0,p=_.lineHeight,Bt(this.afterBody,b),t.y-=o}drawFooter(t,e,i){const r=this.footer,o=r.length;let a,c;if(o){const u=vr(i.rtl,this.x,this.width);for(t.x=la(this,i.footerAlign,i),t.y+=i.footerMarginTop,e.textAlign=u.textAlign(i.footerAlign),e.textBaseline="middle",a=fe(i.footerFont),e.fillStyle=i.footerColor,e.font=a.string,c=0;c<o;++c)e.fillText(r[c],u.x(t.x),t.y+a.lineHeight/2),t.y+=a.lineHeight+i.footerSpacing}}drawBackground(t,e,i,r){const{xAlign:o,yAlign:a}=this,{x:c,y:u}=t,{width:f,height:h}=i,{topLeft:_,topRight:p,bottomLeft:m,bottomRight:g}=Ui(r.cornerRadius);e.fillStyle=r.backgroundColor,e.strokeStyle=r.borderColor,e.lineWidth=r.borderWidth,e.beginPath(),e.moveTo(c+_,u),a==="top"&&this.drawCaret(t,e,i,r),e.lineTo(c+f-p,u),e.quadraticCurveTo(c+f,u,c+f,u+p),a==="center"&&o==="right"&&this.drawCaret(t,e,i,r),e.lineTo(c+f,u+h-g),e.quadraticCurveTo(c+f,u+h,c+f-g,u+h),a==="bottom"&&this.drawCaret(t,e,i,r),e.lineTo(c+m,u+h),e.quadraticCurveTo(c,u+h,c,u+h-m),a==="center"&&o==="left"&&this.drawCaret(t,e,i,r),e.lineTo(c,u+_),e.quadraticCurveTo(c,u,c+_,u),e.closePath(),e.fill(),r.borderWidth>0&&e.stroke()}_updateAnimationTarget(t){const e=this.chart,i=this.$animations,r=i&&i.x,o=i&&i.y;if(r||o){const a=rs[t.position].call(this,this._active,this._eventPosition);if(!a)return;const c=this._size=cg(this,t),u=Object.assign({},a,this._size),f=ug(e,t,u),h=hg(t,u,f,e);(r._to!==h.x||o._to!==h.y)&&(this.xAlign=f.xAlign,this.yAlign=f.yAlign,this.width=c.width,this.height=c.height,this.caretX=a.x,this.caretY=a.y,this._resolveAnimations().update(this,h))}}_willRender(){return!!this.opacity}draw(t){const e=this.options.setContext(this.getContext());let i=this.opacity;if(!i)return;this._updateAnimationTarget(e);const r={width:this.width,height:this.height},o={x:this.x,y:this.y};i=Math.abs(i)<.001?0:i;const a=Se(e.padding),c=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;e.enabled&&c&&(t.save(),t.globalAlpha=i,this.drawBackground(o,t,r,e),wm(t,e.textDirection),o.y+=a.top,this.drawTitle(o,t,e),this.drawBody(o,t,e),this.drawFooter(o,t,e),Sm(t,e.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,e){const i=this._active,r=t.map(({datasetIndex:c,index:u})=>{const f=this.chart.getDatasetMeta(c);if(!f)throw new Error("Cannot find a dataset at index "+c);return{datasetIndex:c,element:f.data[u],index:u}}),o=!Ea(i,r),a=this._positionChanged(r,e);(o||a)&&(this._active=r,this._eventPosition=e,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,e,i=!0){if(e&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const r=this.options,o=this._active||[],a=this._getActiveElements(t,o,e,i),c=this._positionChanged(a,t),u=e||!Ea(a,o)||c;return u&&(this._active=a,(r.enabled||r.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,e))),u}_getActiveElements(t,e,i,r){const o=this.options;if(t.type==="mouseout")return[];if(!r)return e.filter(c=>this.chart.data.datasets[c.datasetIndex]&&this.chart.getDatasetMeta(c.datasetIndex).controller.getParsed(c.index)!==void 0);const a=this.chart.getElementsAtEventForMode(t,o.mode,o,i);return o.reverse&&a.reverse(),a}_positionChanged(t,e){const{caretX:i,caretY:r,options:o}=this,a=rs[o.position].call(this,t,e);return a!==!1&&(i!==a.x||r!==a.y)}}it(jc,"positioners",rs);var HA={id:"tooltip",_element:jc,positioners:rs,afterInit(n,t,e){e&&(n.tooltip=new jc({chart:n,options:e}))},beforeUpdate(n,t,e){n.tooltip&&n.tooltip.initialize(e)},reset(n,t,e){n.tooltip&&n.tooltip.initialize(e)},afterDraw(n){const t=n.tooltip;if(t&&t._willRender()){const e={tooltip:t};if(n.notifyPlugins("beforeTooltipDraw",{...e,cancelable:!0})===!1)return;t.draw(n.ctx),n.notifyPlugins("afterTooltipDraw",e)}},afterEvent(n,t){if(n.tooltip){const e=t.replay;n.tooltip.handleEvent(t.event,e,t.inChartArea)&&(t.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(n,t)=>t.bodyFont.size,boxWidth:(n,t)=>t.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:Gm},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:n=>n!=="filter"&&n!=="itemSort"&&n!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},WA=Object.freeze({__proto__:null,Colors:ZM,Decimation:nA,Filler:wA,Legend:AA,SubTitle:OA,Title:PA,Tooltip:HA});const zA=(n,t,e,i)=>(typeof t=="string"?(e=n.push(t)-1,i.unshift({index:e,label:t})):isNaN(t)&&(e=null),e);function jA(n,t,e,i){const r=n.indexOf(t);if(r===-1)return zA(n,t,e,i);const o=n.lastIndexOf(t);return r!==o?e:r}const UA=(n,t)=>n===null?null:pe(Math.round(n),0,t);function pg(n){const t=this.getLabels();return n>=0&&n<t.length?t[n]:n}class Uc extends Yi{constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const e=this._addedLabels;if(e.length){const i=this.getLabels();for(const{index:r,label:o}of e)i[r]===o&&i.splice(r,1);this._addedLabels=[]}super.init(t)}parse(t,e){if(Ct(t))return null;const i=this.getLabels();return e=isFinite(e)&&i[e]===t?e:jA(i,t,yt(e,t),this._addedLabels),UA(e,i.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let{min:i,max:r}=this.getMinMax(!0);this.options.bounds==="ticks"&&(t||(i=0),e||(r=this.getLabels().length-1)),this.min=i,this.max=r}buildTicks(){const t=this.min,e=this.max,i=this.options.offset,r=[];let o=this.getLabels();o=t===0&&e===o.length-1?o:o.slice(t,e+1),this._valueRange=Math.max(o.length-(i?0:1),1),this._startValue=this.min-(i?.5:0);for(let a=t;a<=e;a++)r.push({value:a});return r}getLabelForValue(t){return pg.call(this,t)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return typeof t!="number"&&(t=this.parse(t)),t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}it(Uc,"id","category"),it(Uc,"defaults",{ticks:{callback:pg}});function VA(n,t){const e=[],{bounds:r,step:o,min:a,max:c,precision:u,count:f,maxTicks:h,maxDigits:_,includeBounds:p}=n,m=o||1,g=h-1,{min:b,max:w}=t,C=!Ct(a),M=!Ct(c),D=!Ct(f),S=(w-b)/(_+1);let k=cp((w-b)/g/m)*m,O,I,B,q;if(k<1e-14&&!C&&!M)return[{value:b},{value:w}];q=Math.ceil(w/k)-Math.floor(b/k),q>g&&(k=cp(q*k/g/m)*m),Ct(u)||(O=Math.pow(10,u),k=Math.ceil(k*O)/O),r==="ticks"?(I=Math.floor(b/k)*k,B=Math.ceil(w/k)*k):(I=b,B=w),C&&M&&o&&Fk((c-a)/o,k/1e3)?(q=Math.round(Math.min((c-a)/k,h)),k=(c-a)/q,I=a,B=c):D?(I=C?a:I,B=M?c:B,q=f-1,k=(B-I)/q):(q=(B-I)/k,us(q,Math.round(q),k/1e3)?q=Math.round(q):q=Math.ceil(q));const z=Math.max(up(k),up(I));O=Math.pow(10,Ct(u)?z:u),I=Math.round(I*O)/O,B=Math.round(B*O)/O;let j=0;for(C&&(p&&I!==a?(e.push({value:a}),I<a&&j++,us(Math.round((I+j*k)*O)/O,a,gg(a,S,n))&&j++):I<a&&j++);j<q;++j){const Y=Math.round((I+j*k)*O)/O;if(M&&Y>c)break;e.push({value:Y})}return M&&p&&B!==c?e.length&&us(e[e.length-1].value,c,gg(c,S,n))?e[e.length-1].value=c:e.push({value:c}):(!M||B===c)&&e.push({value:B}),e}function gg(n,t,{horizontal:e,minRotation:i}){const r=_n(i),o=(e?Math.sin(r):Math.cos(r))||.001,a=.75*t*(""+n).length;return Math.min(t/o,a)}class Ra extends Yi{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,e){return Ct(t)||(typeof t=="number"||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:e,maxDefined:i}=this.getUserBounds();let{min:r,max:o}=this;const a=u=>r=e?r:u,c=u=>o=i?o:u;if(t){const u=On(r),f=On(o);u<0&&f<0?c(0):u>0&&f>0&&a(0)}if(r===o){let u=o===0?1:Math.abs(o*.05);c(o+u),t||a(r-u)}this.min=r,this.max=o}getTickLimit(){const t=this.options.ticks;let{maxTicksLimit:e,stepSize:i}=t,r;return i?(r=Math.ceil(this.max/i)-Math.floor(this.min/i)+1,r>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${i} would result generating up to ${r} ticks. Limiting to 1000.`),r=1e3)):(r=this.computeTickLimit(),e=e||11),e&&(r=Math.min(e,r)),r}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,e=t.ticks;let i=this.getTickLimit();i=Math.max(2,i);const r={maxTicks:i,bounds:t.bounds,min:t.min,max:t.max,precision:e.precision,step:e.stepSize,count:e.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:e.minRotation||0,includeBounds:e.includeBounds!==!1},o=this._range||this,a=VA(r,o);return t.bounds==="ticks"&&sm(a,this,"value"),t.reverse?(a.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),a}configure(){const t=this.ticks;let e=this.min,i=this.max;if(super.configure(),this.options.offset&&t.length){const r=(i-e)/Math.max(t.length-1,1)/2;e-=r,i+=r}this._startValue=e,this._endValue=i,this._valueRange=i-e}getLabelForValue(t){return Ls(t,this.chart.options.locale,this.options.ticks.format)}}class Vc extends Ra{determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=ee(t)?t:0,this.max=ee(e)?e:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),e=t?this.width:this.height,i=_n(this.options.ticks.minRotation),r=(t?Math.sin(i):Math.cos(i))||.001,o=this._resolveTickFontOptions(0);return Math.ceil(e/Math.min(40,o.lineHeight/r))}getPixelForValue(t){return t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}it(Vc,"id","linear"),it(Vc,"defaults",{ticks:{callback:Ha.formatters.numeric}});const Ss=n=>Math.floor(gi(n)),Ni=(n,t)=>Math.pow(10,Ss(n)+t);function mg(n){return n/Math.pow(10,Ss(n))===1}function _g(n,t,e){const i=Math.pow(10,e),r=Math.floor(n/i);return Math.ceil(t/i)-r}function qA(n,t){const e=t-n;let i=Ss(e);for(;_g(n,t,i)>10;)i++;for(;_g(n,t,i)<10;)i--;return Math.min(i,Ss(n))}function $A(n,{min:t,max:e}){t=Xe(n.min,t);const i=[],r=Ss(t);let o=qA(t,e),a=o<0?Math.pow(10,Math.abs(o)):1;const c=Math.pow(10,o),u=r>o?Math.pow(10,r):0,f=Math.round((t-u)*a)/a,h=Math.floor((t-u)/c/10)*c*10;let _=Math.floor((f-h)/Math.pow(10,o)),p=Xe(n.min,Math.round((u+h+_*Math.pow(10,o))*a)/a);for(;p<e;)i.push({value:p,major:mg(p),significand:_}),_>=10?_=_<15?15:20:_++,_>=20&&(o++,_=2,a=o>=0?1:a),p=Math.round((u+h+_*Math.pow(10,o))*a)/a;const m=Xe(n.max,p);return i.push({value:m,major:mg(m),significand:_}),i}class qc extends Yi{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,e){const i=Ra.prototype.parse.apply(this,[t,e]);if(i===0){this._zero=!0;return}return ee(i)&&i>0?i:null}determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=ee(t)?Math.max(0,t):null,this.max=ee(e)?Math.max(0,e):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!ee(this._userMin)&&(this.min=t===Ni(this.min,0)?Ni(this.min,-1):Ni(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let i=this.min,r=this.max;const o=c=>i=t?i:c,a=c=>r=e?r:c;i===r&&(i<=0?(o(1),a(10)):(o(Ni(i,-1)),a(Ni(r,1)))),i<=0&&o(Ni(r,-1)),r<=0&&a(Ni(i,1)),this.min=i,this.max=r}buildTicks(){const t=this.options,e={min:this._userMin,max:this._userMax},i=$A(e,this);return t.bounds==="ticks"&&sm(i,this,"value"),t.reverse?(i.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),i}getLabelForValue(t){return t===void 0?"0":Ls(t,this.chart.options.locale,this.options.ticks.format)}configure(){const t=this.min;super.configure(),this._startValue=gi(t),this._valueRange=gi(this.max)-gi(t)}getPixelForValue(t){return(t===void 0||t===0)&&(t=this.min),t===null||isNaN(t)?NaN:this.getPixelForDecimal(t===this.min?0:(gi(t)-this._startValue)/this._valueRange)}getValueForPixel(t){const e=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+e*this._valueRange)}}it(qc,"id","logarithmic"),it(qc,"defaults",{ticks:{callback:Ha.formatters.logarithmic,major:{enabled:!0}}});function $c(n){const t=n.ticks;if(t.display&&n.display){const e=Se(t.backdropPadding);return yt(t.font&&t.font.size,Kt.font.size)+e.height}return 0}function YA(n,t,e){return e=Gt(e)?e:[e],{w:tE(n,t.string,e),h:e.length*t.lineHeight}}function yg(n,t,e,i,r){return n===i||n===r?{start:t-e/2,end:t+e/2}:n<i||n>r?{start:t-e,end:t}:{start:t,end:t+e}}function GA(n){const t={l:n.left+n._padding.left,r:n.right-n._padding.right,t:n.top+n._padding.top,b:n.bottom-n._padding.bottom},e=Object.assign({},t),i=[],r=[],o=n._pointLabels.length,a=n.options.pointLabels,c=a.centerPointLabels?Vt/o:0;for(let u=0;u<o;u++){const f=a.setContext(n.getPointLabelContext(u));r[u]=f.padding;const h=n.getPointPosition(u,n.drawingArea+r[u],c),_=fe(f.font),p=YA(n.ctx,_,n._pointLabels[u]);i[u]=p;const m=Je(n.getIndexAngle(u)+c),g=Math.round(uu(m)),b=yg(g,h.x,p.w,0,180),w=yg(g,h.y,p.h,90,270);KA(e,t,m,b,w)}n.setCenterPoint(t.l-e.l,e.r-t.r,t.t-e.t,e.b-t.b),n._pointLabelItems=ZA(n,i,r)}function KA(n,t,e,i,r){const o=Math.abs(Math.sin(e)),a=Math.abs(Math.cos(e));let c=0,u=0;i.start<t.l?(c=(t.l-i.start)/o,n.l=Math.min(n.l,t.l-c)):i.end>t.r&&(c=(i.end-t.r)/o,n.r=Math.max(n.r,t.r+c)),r.start<t.t?(u=(t.t-r.start)/a,n.t=Math.min(n.t,t.t-u)):r.end>t.b&&(u=(r.end-t.b)/a,n.b=Math.max(n.b,t.b+u))}function XA(n,t,e){const i=n.drawingArea,{extra:r,additionalAngle:o,padding:a,size:c}=e,u=n.getPointPosition(t,i+r+a,o),f=Math.round(uu(Je(u.angle+re))),h=eL(u.y,c.h,f),_=QA(f),p=tL(u.x,c.w,_);return{visible:!0,x:u.x,y:h,textAlign:_,left:p,top:h,right:p+c.w,bottom:h+c.h}}function JA(n,t){if(!t)return!0;const{left:e,top:i,right:r,bottom:o}=n;return!(ti({x:e,y:i},t)||ti({x:e,y:o},t)||ti({x:r,y:i},t)||ti({x:r,y:o},t))}function ZA(n,t,e){const i=[],r=n._pointLabels.length,o=n.options,{centerPointLabels:a,display:c}=o.pointLabels,u={extra:$c(o)/2,additionalAngle:a?Vt/r:0};let f;for(let h=0;h<r;h++){u.padding=e[h],u.size=t[h];const _=XA(n,h,u);i.push(_),c==="auto"&&(_.visible=JA(_,f),_.visible&&(f=_))}return i}function QA(n){return n===0||n===180?"center":n<180?"left":"right"}function tL(n,t,e){return e==="right"?n-=t:e==="center"&&(n-=t/2),n}function eL(n,t,e){return e===90||e===270?n-=t/2:(e>270||e<90)&&(n-=t),n}function nL(n,t,e){const{left:i,top:r,right:o,bottom:a}=e,{backdropColor:c}=t;if(!Ct(c)){const u=Ui(t.borderRadius),f=Se(t.backdropPadding);n.fillStyle=c;const h=i-f.left,_=r-f.top,p=o-i+f.width,m=a-r+f.height;Object.values(u).some(g=>g!==0)?(n.beginPath(),xs(n,{x:h,y:_,w:p,h:m,radius:u}),n.fill()):n.fillRect(h,_,p,m)}}function iL(n,t){const{ctx:e,options:{pointLabels:i}}=n;for(let r=t-1;r>=0;r--){const o=n._pointLabelItems[r];if(!o.visible)continue;const a=i.setContext(n.getPointLabelContext(r));nL(e,a,o);const c=fe(a.font),{x:u,y:f,textAlign:h}=o;$i(e,n._pointLabels[r],u,f+c.lineHeight/2,c,{color:a.color,textAlign:h,textBaseline:"middle"})}}function Km(n,t,e,i){const{ctx:r}=n;if(e)r.arc(n.xCenter,n.yCenter,t,0,Ut);else{let o=n.getPointPosition(0,t);r.moveTo(o.x,o.y);for(let a=1;a<i;a++)o=n.getPointPosition(a,t),r.lineTo(o.x,o.y)}}function rL(n,t,e,i,r){const o=n.ctx,a=t.circular,{color:c,lineWidth:u}=t;!a&&!i||!c||!u||e<0||(o.save(),o.strokeStyle=c,o.lineWidth=u,o.setLineDash(r.dash||[]),o.lineDashOffset=r.dashOffset,o.beginPath(),Km(n,e,a,i),o.closePath(),o.stroke(),o.restore())}function sL(n,t,e){return wi(n,{label:e,index:t,type:"pointLabel"})}class ss extends Ra{constructor(t){super(t),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){const t=this._padding=Se($c(this.options)/2),e=this.width=this.maxWidth-t.width,i=this.height=this.maxHeight-t.height;this.xCenter=Math.floor(this.left+e/2+t.left),this.yCenter=Math.floor(this.top+i/2+t.top),this.drawingArea=Math.floor(Math.min(e,i)/2)}determineDataLimits(){const{min:t,max:e}=this.getMinMax(!1);this.min=ee(t)&&!isNaN(t)?t:0,this.max=ee(e)&&!isNaN(e)?e:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/$c(this.options))}generateTickLabels(t){Ra.prototype.generateTickLabels.call(this,t),this._pointLabels=this.getLabels().map((e,i)=>{const r=zt(this.options.pointLabels.callback,[e,i],this);return r||r===0?r:""}).filter((e,i)=>this.chart.getDataVisibility(i))}fit(){const t=this.options;t.display&&t.pointLabels.display?GA(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(t,e,i,r){this.xCenter+=Math.floor((t-e)/2),this.yCenter+=Math.floor((i-r)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(t,e,i,r))}getIndexAngle(t){const e=Ut/(this._pointLabels.length||1),i=this.options.startAngle||0;return Je(t*e+_n(i))}getDistanceFromCenterForValue(t){if(Ct(t))return NaN;const e=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-t)*e:(t-this.min)*e}getValueForDistanceFromCenter(t){if(Ct(t))return NaN;const e=t/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-e:this.min+e}getPointLabelContext(t){const e=this._pointLabels||[];if(t>=0&&t<e.length){const i=e[t];return sL(this.getContext(),t,i)}}getPointPosition(t,e,i=0){const r=this.getIndexAngle(t)-re+i;return{x:Math.cos(r)*e+this.xCenter,y:Math.sin(r)*e+this.yCenter,angle:r}}getPointPositionForValue(t,e){return this.getPointPosition(t,this.getDistanceFromCenterForValue(e))}getBasePosition(t){return this.getPointPositionForValue(t||0,this.getBaseValue())}getPointLabelPosition(t){const{left:e,top:i,right:r,bottom:o}=this._pointLabelItems[t];return{left:e,top:i,right:r,bottom:o}}drawBackground(){const{backgroundColor:t,grid:{circular:e}}=this.options;if(t){const i=this.ctx;i.save(),i.beginPath(),Km(this,this.getDistanceFromCenterForValue(this._endValue),e,this._pointLabels.length),i.closePath(),i.fillStyle=t,i.fill(),i.restore()}}drawGrid(){const t=this.ctx,e=this.options,{angleLines:i,grid:r,border:o}=e,a=this._pointLabels.length;let c,u,f;if(e.pointLabels.display&&iL(this,a),r.display&&this.ticks.forEach((h,_)=>{if(_!==0||_===0&&this.min<0){u=this.getDistanceFromCenterForValue(h.value);const p=this.getContext(_),m=r.setContext(p),g=o.setContext(p);rL(this,m,u,a,g)}}),i.display){for(t.save(),c=a-1;c>=0;c--){const h=i.setContext(this.getPointLabelContext(c)),{color:_,lineWidth:p}=h;!p||!_||(t.lineWidth=p,t.strokeStyle=_,t.setLineDash(h.borderDash),t.lineDashOffset=h.borderDashOffset,u=this.getDistanceFromCenterForValue(e.reverse?this.min:this.max),f=this.getPointPosition(c,u),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(f.x,f.y),t.stroke())}t.restore()}}drawBorder(){}drawLabels(){const t=this.ctx,e=this.options,i=e.ticks;if(!i.display)return;const r=this.getIndexAngle(0);let o,a;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(r),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach((c,u)=>{if(u===0&&this.min>=0&&!e.reverse)return;const f=i.setContext(this.getContext(u)),h=fe(f.font);if(o=this.getDistanceFromCenterForValue(this.ticks[u].value),f.showLabelBackdrop){t.font=h.string,a=t.measureText(c.label).width,t.fillStyle=f.backdropColor;const _=Se(f.backdropPadding);t.fillRect(-a/2-_.left,-o-h.size/2-_.top,a+_.width,h.size+_.height)}$i(t,c.label,0,-o,h,{color:f.color,strokeColor:f.textStrokeColor,strokeWidth:f.textStrokeWidth})}),t.restore()}drawTitle(){}}it(ss,"id","radialLinear"),it(ss,"defaults",{display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:Ha.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(t){return t},padding:5,centerPointLabels:!1}}),it(ss,"defaultRoutes",{"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"}),it(ss,"descriptors",{angleLines:{_fallback:"grid"}});const Va={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},He=Object.keys(Va);function vg(n,t){return n-t}function bg(n,t){if(Ct(t))return null;const e=n._adapter,{parser:i,round:r,isoWeekday:o}=n._parseOpts;let a=t;return typeof i=="function"&&(a=i(a)),ee(a)||(a=typeof i=="string"?e.parse(a,i):e.parse(a)),a===null?null:(r&&(a=r==="week"&&(br(o)||o===!0)?e.startOf(a,"isoWeek",o):e.startOf(a,r)),+a)}function xg(n,t,e,i){const r=He.length;for(let o=He.indexOf(n);o<r-1;++o){const a=Va[He[o]],c=a.steps?a.steps:Number.MAX_SAFE_INTEGER;if(a.common&&Math.ceil((e-t)/(c*a.size))<=i)return He[o]}return He[r-1]}function oL(n,t,e,i,r){for(let o=He.length-1;o>=He.indexOf(e);o--){const a=He[o];if(Va[a].common&&n._adapter.diff(r,i,a)>=t-1)return a}return He[e?He.indexOf(e):0]}function aL(n){for(let t=He.indexOf(n)+1,e=He.length;t<e;++t)if(Va[He[t]].common)return He[t]}function wg(n,t,e){if(!e)n[t]=!0;else if(e.length){const{lo:i,hi:r}=hu(e,t),o=e[i]>=t?e[i]:e[r];n[o]=!0}}function lL(n,t,e,i){const r=n._adapter,o=+r.startOf(t[0].value,i),a=t[t.length-1].value;let c,u;for(c=o;c<=a;c=+r.add(c,1,i))u=e[c],u>=0&&(t[u].major=!0);return t}function Sg(n,t,e){const i=[],r={},o=t.length;let a,c;for(a=0;a<o;++a)c=t[a],r[c]=a,i.push({value:c,major:!1});return o===0||!e?i:lL(n,i,r,e)}class ks extends Yi{constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,e={}){const i=t.time||(t.time={}),r=this._adapter=new mC._date(t.adapters.date);r.init(e),cs(i.displayFormats,r.formats()),this._parseOpts={parser:i.parser,round:i.round,isoWeekday:i.isoWeekday},super.init(t),this._normalized=e.normalized}parse(t,e){return t===void 0?null:bg(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,e=this._adapter,i=t.time.unit||"day";let{min:r,max:o,minDefined:a,maxDefined:c}=this.getUserBounds();function u(f){!a&&!isNaN(f.min)&&(r=Math.min(r,f.min)),!c&&!isNaN(f.max)&&(o=Math.max(o,f.max))}(!a||!c)&&(u(this._getLabelBounds()),(t.bounds!=="ticks"||t.ticks.source!=="labels")&&u(this.getMinMax(!1))),r=ee(r)&&!isNaN(r)?r:+e.startOf(Date.now(),i),o=ee(o)&&!isNaN(o)?o:+e.endOf(Date.now(),i)+1,this.min=Math.min(r,o-1),this.max=Math.max(r+1,o)}_getLabelBounds(){const t=this.getLabelTimestamps();let e=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;return t.length&&(e=t[0],i=t[t.length-1]),{min:e,max:i}}buildTicks(){const t=this.options,e=t.time,i=t.ticks,r=i.source==="labels"?this.getLabelTimestamps():this._generate();t.bounds==="ticks"&&r.length&&(this.min=this._userMin||r[0],this.max=this._userMax||r[r.length-1]);const o=this.min,a=this.max,c=zk(r,o,a);return this._unit=e.unit||(i.autoSkip?xg(e.minUnit,this.min,this.max,this._getLabelCapacity(o)):oL(this,c.length,e.minUnit,this.min,this.max)),this._majorUnit=!i.major.enabled||this._unit==="year"?void 0:aL(this._unit),this.initOffsets(r),t.reverse&&c.reverse(),Sg(this,c,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(t=>+t.value))}initOffsets(t=[]){let e=0,i=0,r,o;this.options.offset&&t.length&&(r=this.getDecimalForValue(t[0]),t.length===1?e=1-r:e=(this.getDecimalForValue(t[1])-r)/2,o=this.getDecimalForValue(t[t.length-1]),t.length===1?i=o:i=(o-this.getDecimalForValue(t[t.length-2]))/2);const a=t.length<3?.5:.25;e=pe(e,0,a),i=pe(i,0,a),this._offsets={start:e,end:i,factor:1/(e+1+i)}}_generate(){const t=this._adapter,e=this.min,i=this.max,r=this.options,o=r.time,a=o.unit||xg(o.minUnit,e,i,this._getLabelCapacity(e)),c=yt(r.ticks.stepSize,1),u=a==="week"?o.isoWeekday:!1,f=br(u)||u===!0,h={};let _=e,p,m;if(f&&(_=+t.startOf(_,"isoWeek",u)),_=+t.startOf(_,f?"day":a),t.diff(i,e,a)>1e5*c)throw new Error(e+" and "+i+" are too far apart with stepSize of "+c+" "+a);const g=r.ticks.source==="data"&&this.getDataTimestamps();for(p=_,m=0;p<i;p=+t.add(p,c,a),m++)wg(h,p,g);return(p===i||r.bounds==="ticks"||m===1)&&wg(h,p,g),Object.keys(h).sort(vg).map(b=>+b)}getLabelForValue(t){const e=this._adapter,i=this.options.time;return i.tooltipFormat?e.format(t,i.tooltipFormat):e.format(t,i.displayFormats.datetime)}format(t,e){const r=this.options.time.displayFormats,o=this._unit,a=e||r[o];return this._adapter.format(t,a)}_tickFormatFunction(t,e,i,r){const o=this.options,a=o.ticks.callback;if(a)return zt(a,[t,e,i],this);const c=o.time.displayFormats,u=this._unit,f=this._majorUnit,h=u&&c[u],_=f&&c[f],p=i[e],m=f&&_&&p&&p.major;return this._adapter.format(t,r||(m?_:h))}generateTickLabels(t){let e,i,r;for(e=0,i=t.length;e<i;++e)r=t[e],r.label=this._tickFormatFunction(r.value,e,t)}getDecimalForValue(t){return t===null?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){const e=this._offsets,i=this.getDecimalForValue(t);return this.getPixelForDecimal((e.start+i)*e.factor)}getValueForPixel(t){const e=this._offsets,i=this.getDecimalForPixel(t)/e.factor-e.end;return this.min+i*(this.max-this.min)}_getLabelSize(t){const e=this.options.ticks,i=this.ctx.measureText(t).width,r=_n(this.isHorizontal()?e.maxRotation:e.minRotation),o=Math.cos(r),a=Math.sin(r),c=this._resolveTickFontOptions(0).size;return{w:i*o+c*a,h:i*a+c*o}}_getLabelCapacity(t){const e=this.options.time,i=e.displayFormats,r=i[e.unit]||i.millisecond,o=this._tickFormatFunction(t,0,Sg(this,[t],this._majorUnit),r),a=this._getLabelSize(o),c=Math.floor(this.isHorizontal()?this.width/a.w:this.height/a.h)-1;return c>0?c:1}getDataTimestamps(){let t=this._cache.data||[],e,i;if(t.length)return t;const r=this.getMatchingVisibleMetas();if(this._normalized&&r.length)return this._cache.data=r[0].controller.getAllParsedValues(this);for(e=0,i=r.length;e<i;++e)t=t.concat(r[e].controller.getAllParsedValues(this));return this._cache.data=this.normalize(t)}getLabelTimestamps(){const t=this._cache.labels||[];let e,i;if(t.length)return t;const r=this.getLabels();for(e=0,i=r.length;e<i;++e)t.push(bg(this,r[e]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return lm(t.sort(vg))}}it(ks,"id","time"),it(ks,"defaults",{bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}});function ca(n,t,e){let i=0,r=n.length-1,o,a,c,u;e?(t>=n[i].pos&&t<=n[r].pos&&({lo:i,hi:r}=Qn(n,"pos",t)),{pos:o,time:c}=n[i],{pos:a,time:u}=n[r]):(t>=n[i].time&&t<=n[r].time&&({lo:i,hi:r}=Qn(n,"time",t)),{time:o,pos:c}=n[i],{time:a,pos:u}=n[r]);const f=a-o;return f?c+(u-c)*(t-o)/f:c}class Yc extends ks{constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),e=this._table=this.buildLookupTable(t);this._minPos=ca(e,this.min),this._tableRange=ca(e,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:e,max:i}=this,r=[],o=[];let a,c,u,f,h;for(a=0,c=t.length;a<c;++a)f=t[a],f>=e&&f<=i&&r.push(f);if(r.length<2)return[{time:e,pos:0},{time:i,pos:1}];for(a=0,c=r.length;a<c;++a)h=r[a+1],u=r[a-1],f=r[a],Math.round((h+u)/2)!==f&&o.push({time:f,pos:a/(c-1)});return o}_generate(){const t=this.min,e=this.max;let i=super.getDataTimestamps();return(!i.includes(t)||!i.length)&&i.splice(0,0,t),(!i.includes(e)||i.length===1)&&i.push(e),i.sort((r,o)=>r-o)}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const e=this.getDataTimestamps(),i=this.getLabelTimestamps();return e.length&&i.length?t=this.normalize(e.concat(i)):t=e.length?e:i,t=this._cache.all=t,t}getDecimalForValue(t){return(ca(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const e=this._offsets,i=this.getDecimalForPixel(t)/e.factor-e.end;return ca(this._table,i*this._tableRange+this._minPos,!0)}}it(Yc,"id","timeseries"),it(Yc,"defaults",ks.defaults);var cL=Object.freeze({__proto__:null,CategoryScale:Uc,LinearScale:Vc,LogarithmicScale:qc,RadialLinearScale:ss,TimeScale:ks,TimeSeriesScale:Yc});const uL=[gC,qM,WA,cL];Gn.register(...uL);const hL=n=>Ln({L:20,M:10,S:7,XS:5})[n],fL=n=>Ln({L:200,M:100,S:60,XS:40})[n];class yr extends te{constructor(t){super(),this.provided=t,this.counter=Ww(),this.aliases={},this.stack=[],this.points=new Map,this.labels=new Set,this.limits={legend:hL(this.provided.width??"L"),point:this.provided.limit??fL(this.provided.width??"L")},this.source=new Gn(document.createElement("canvas"),{type:"line",data:{labels:Ln([]),datasets:[]},options:{scales:{y:{grid:{color:"rgba(255, 255, 255, 0.05)"},ticks:{maxTicksLimit:this.limits.legend*2}},x:{grid:{color:"rgba(255, 255, 255, 0.05)"},ticks:{maxTicksLimit:this.limits.legend}}},plugins:{legend:{labels:{usePointStyle:!0,pointStyle:"circle",boxHeight:5,boxWidth:5}}}}}),this.panel=Jn.build({...this.provided,class:"chart"}).replace(this.source.canvas),this.replace(this.panel)}provide(t){t.forEach(i=>{if(this.provided.mode==="aggregation"){const o=this.aliases[i.legend]??this.counter(),a=this.points.get(o)??Ln({legend:i.legend,values:{}});return this.aliases[i.legend]||(this.aliases[i.legend]=o,this.points.set(o,a),this.stack.push(o)),Object.entries(i.values).forEach(([c,u])=>{a.values[c]=(a.values[c]??0)+u,this.labels.add(c)})}const r=this.counter();this.stack.push(r),this.points.set(r,i),Object.keys(i.values).forEach(o=>this.labels.add(o))}),this.stack.slice(0,Ze.clamp(this.stack.length-this.limits.point,0,1/0)).forEach(i=>{const r=this.points.get(i);r&&Ze.unset(this.aliases,r.legend),this.points.delete(i),this.stack.shift()});const e=[...this.points.values()];return this.source.data={labels:e.map(i=>i.legend),datasets:[...this.labels.values()].map(i=>({label:i,data:Array(e.length).fill(null).map((r,o)=>e[o].values[i]??null),tension:.3,pointRadius:2,pointHitRadius:20,pointHoverRadius:5,borderWidth:1,borderColor:ka(i),backgroundColor:ka(i)}))},this.source.update("none"),this}clear(){return this.source.reset(),this.points.clear(),this.labels.clear(),this.aliases={},this.stack=[],this}static build(t){return new yr(t)}}const dL=`
445
- <section id="expectations">
446
- <div class="storage"></div>
447
-
448
- <div class="controls">
449
- <div class="main">
450
- <button class="icon-only" id="expand"><i class="fas fa-chevron-down"></i></button>
451
- </div>
452
-
453
- <div class="additional container hidden"></div>
454
- </div>
455
-
456
- <div class="content"></div>
457
- </section>
458
- `,pL=oe.compile(dL),Kn=new Map,Gc=Na.build(),Jt={state:{filters:{search:Ln(null),groups:Ln(null)}},search:Fa.build({title:"Search expectations"}).on("clear",()=>{Jt.state.filters.search=null,zi()}).on("input",n=>{Jt.state.filters.search=n,zi()}),filter:ms.build({title:{text:"Groups filter",icon:"fas fa-filter",description:"shows/hides items in the list below"},width:"M"}),switcher:ms.build({title:{text:"Groups switcher",icon:"fas fa-power-off",description:"turnes on/off items in the list below"},width:"M"})},gL=n=>{let t=n;return Jt.state.filters.groups&&(t=t.filter(e=>Jt.state.filters.groups.includes(e.data.group))),Jt.state.filters.search&&(t=t.filter(e=>e.match(Jt.state.filters.search))),t},zi=(n=[...Kn.values()])=>{const t=gL(n.map(e=>e.hide())).map(e=>e.show());n.length===Kn.size&&(t.length?Gc.hide():Gc.show())},Ec=n=>(n??pt.shared.groups).forEach(t=>{var i,r;[...Kn.values()].filter(o=>o.data.group===t).every(o=>!o.data.isEnabled)?(i=Jt.switcher.buttons.provided[t])==null||i.disable("silent"):(r=Jt.switcher.buttons.provided[t])==null||r.enable("silent")}),Su=kr.build(pL({})).assignMeta({name:"Expectations",icon:"fas fa-magic"}).once("initialize",n=>{n.append(Gc),n.controls.main.append(Jt.search),n.controls.additional.append(Jt.filter),n.controls.additional.append(Jt.switcher),pt.on("group:register",t=>{Jt.switcher.provide({name:t,isEnabled:!0,colorify:!0}),Jt.filter.provide({name:t,isEnabled:!0,colorify:!0})}),Jt.switcher.on("enable",t=>pt.services.io.exec("expectations:group:update",{name:t.name,set:{isEnabled:!0}})),Jt.switcher.on("disable",t=>pt.services.io.exec("expectations:group:update",{name:t.name,set:{isEnabled:!1}})),Jt.filter.on("enable",()=>{Jt.state.filters.groups=Jt.filter.extract().filter(t=>t.isEnabled).map(t=>t.name),zi()}),Jt.filter.on("disable",()=>{Jt.state.filters.groups=Jt.filter.extract().filter(t=>t.isEnabled).map(t=>t.name),zi()}),pt.services.io.subscribe("expectation:added",t=>{const e=as.build(t);Kn.set(t.id,e),n.content.append(e),pt.shared.groups.has(t.group)||(pt.shared.groups.add(t.group),pt.emit("group:register",t.group)),zi([e]),Ec([e.data.group])}),pt.services.io.subscribe("expectation:updated",t=>{const e=Kn.get(t.id)??as.build(t);Kn.has(t.id)&&e.provide(t).refresh(),n.content.element.querySelector(`div.expectation[id="${t.id}"]`)||(n.content.append(e),zi([e])),pt.shared.groups.has(t.group)||(pt.shared.groups.add(t.group),pt.emit("group:register",t.group)),Kn.set(t.id,e),Ec([e.data.group])})}).on("initialize",async n=>{pt.shared.groups.clear(),n.content.clear(),Jt.switcher.clear(),Jt.filter.clear(),Kn.clear();const{data:t}=await pt.services.io.exec("expectations:get-list");t.forEach(e=>{const i=as.build(e);pt.shared.groups.has(e.group)||(pt.shared.groups.add(e.group),pt.emit("group:register",e.group)),Kn.set(e.id,i),n.content.append(i)}),zi(),Ec()}),mL=`
459
- <section id="analytics">
460
- <div class="storage"></div>
461
- <div class="content container"></div>
462
- </section>
463
- `,_L=oe.compile(mL),Fe={memory:yr.build({title:{text:"Server memory usage",icon:"fas fa-memory",description:"updates every 5 seconds"},width:"M"}),cache:yr.build({title:{text:"Cache memory usage",icon:"fas fa-database",description:"updates every 10 minutes"},width:"M"}),containers:yr.build({title:{text:"Registered containers",icon:"fas fa-box",description:"updates every 5 seconds"},width:"S"}),rate:yr.build({title:{text:"Requests rate",icon:"fas fa-rocket",description:"updates instantly"},mode:"aggregation",width:"S"})},Xm=kr.build(_L({})).assignMeta({icon:"fas fa-chart-line"}).once("initialize",n=>{n.content.append(Fe.memory),n.content.append(Fe.cache),n.content.append(Fe.containers),n.content.append(Fe.rate),pt.services.io.subscribe("metric:registered",({name:t,point:{timestamp:e,values:i}})=>t in Fe?Fe[t].provide([{values:i,legend:mr(e).format("HH:mm")}]):null)}).on("initialize",async()=>{Fe.containers.clear(),Fe.memory.clear(),Fe.cache.clear(),Fe.rate.clear();const{data:n}=await pt.services.io.exec("metrics:get");Fe.memory.provide(n.memory.map(({timestamp:t,values:e})=>({values:e,legend:mr(t).format("HH:mm")}))),Fe.cache.provide(n.cache.map(({timestamp:t,values:e})=>({values:e,legend:mr(t).format("HH:mm")}))),Fe.rate.provide(n.rate.map(({timestamp:t,values:e})=>({values:e,legend:mr(t).format("HH:mm")}))),Fe.containers.provide(n.containers.map(({timestamp:t,values:e})=>({values:e,legend:mr(t).format("HH:mm")})))}),yL=`
464
- <div class="content">
465
- <div class="input size-M" title="Backup file"><input type="file" data-key="files"></div>
466
- <div class="input size-XS" title="TTL (seconds)"><input type="text" data-key="ttl" value="3600"></div>
467
-
468
- <button id="restore"><i class="fas fa-undo"></i>Restore</button>
469
- </div>
470
- `,vL=`
471
- <div class="content">
472
- <div class="input size-L" title="prefix"><input type="text" data-key="prefix" value="*"></div>
473
- <button id="delete"><i class="fas fa-trash-alt"></i>Delete</button>
474
- </div>
475
- `,bL=`
476
- <div class="content">
477
- <button id="backup"><i class="fas fa-save"></i>Backup</button>
478
- </div>
479
- `,xL=`
480
- <section id="settings">
481
- <div class="storage"></div>
482
- <div class="content container"></div>
483
- </section>
484
- `,wL=`
485
- <div class="content">
486
- <p class="version"><span>Version</span><b>{{version}}</b></p>
487
- <p class="version"><span>Uptime</span><b>{{uptime}}</b></p>
488
- </div>
489
- `,ps={cacheRestoration:oe.compile(yL),cacheDeletion:oe.compile(vL),cacheBackup:oe.compile(bL),section:oe.compile(xL),stats:oe.compile(wL)},En={stats:Jn.build({title:{text:"Stats",icon:"fas fa-server"},class:"stats",height:"XS",width:"M"}),cacheDeletion:Jn.build({title:{text:"Cache deletion",icon:"fas fa-database"},class:"cache",height:"XS",width:"M"}).replace(ps.cacheDeletion({})),cacheBackup:Jn.build({title:{text:"Cache backup",icon:"fas fa-database"},class:"cache",height:"XS",width:"M"}).replace(ps.cacheBackup({})),cacheRestoration:Jn.build({title:{text:"Cache restoration",icon:"fas fa-database"},class:"cache",height:"XS",width:"M"}).replace(ps.cacheRestoration({}))},Jm=kr.build(ps.section({})).assignMeta({icon:"fas fa-cog"}).once("initialize",async n=>{n.content.append(En.stats),n.content.append(En.cacheDeletion),n.content.append(En.cacheBackup),n.content.append(En.cacheRestoration),yi.build(En.cacheDeletion.element.querySelector("button#delete")).handle(async()=>{var i;const t=await gs.build(En.cacheDeletion).extract(),{data:e}=await pt.services.io.exec("cache:delete",{prefix:t.prefix});pt.shared.popups.push(`Deleted <b>${((i=e.redis)==null?void 0:i.count)??0}</b> cache keys`)}),yi.build(En.cacheBackup.element.querySelector("button#backup")).handle(async()=>{const{data:t}=await pt.services.io.exec("cache:backup"),e=document.createElement("a"),i=new Date;e.download=`mock-server-cache-backup-${i.toLocaleDateString()}-${i.getTime()}.txt`,e.href=URL.createObjectURL(new Blob([t],{type:"text"})),e.click()}),yi.build(En.cacheRestoration.element.querySelector("button#restore")).handle(async()=>{var e;const t=await gs.build(En.cacheRestoration).extract();if(!((e=t.files)!=null&&e.length))return pt.shared.popups.push("File is not provided",{level:"warning"});await pt.services.io.exec("cache:restore",{ttl:t.ttl,backup:t.files[0].content}),pt.shared.popups.push("Restored")})}).on("select",async()=>{const{data:n}=await pt.services.io.exec("stats");En.stats.replace(ps.stats(n))}),SL=`
490
- <section id="history">
491
- <div class="storage"></div>
492
-
493
- <div class="controls">
494
- <div class="main">
495
- <button class="icon-only" id="expand"><i class="fas fa-chevron-down"></i></button>
496
- </div>
497
-
498
- <div class="additional container hidden"></div>
499
- </div>
500
-
501
- <div class="content"></div>
502
- </section>
503
- `,kL=`
504
- <div class="buttons">
505
- <button id="clear"><i class="fas fa-trash-alt"></i>Clear list</button>
506
- </div>
507
- `,Zm={section:oe.compile(SL),actions:oe.compile(kL)},Kc=Na.build(),Et={state:{storage:new Map,stack:Ln([]),filters:{search:Ln(null),groups:Ln(null)}},search:Fa.build({title:"Search history"}).on("clear",()=>{Et.state.filters.search=null,fi()}).on("input",n=>{Et.state.filters.search=n,fi()}),filter:ms.build({title:{text:"Groups filter",icon:"fas fa-filter",description:"shows/hides items in the list below"},width:"M"}),actions:Jn.build({title:{text:"Actions",icon:"fas fa-sliders-h"},class:"actions",width:"M"}).append(Zm.actions({}))},EL=n=>{let t=n;return Et.state.filters.groups&&(t=t.filter(e=>Et.state.filters.groups.includes(e.data.group))),Et.state.filters.search&&(t=t.filter(e=>e.match(Et.state.filters.search))),t},fi=(n=[...Et.state.storage.values()])=>{const t=EL(n.map(e=>e.hide())).map(e=>e.show());n.length===Et.state.storage.size&&(t.length?Kc.hide():Kc.show())},Qm=kr.build(Zm.section({})).assignMeta({name:"History",icon:"fas fa-history"}).once("initialize",n=>{n.append(Kc),n.controls.main.append(Et.search),n.controls.additional.append(Et.filter),n.controls.additional.append(Et.actions),yi.build(Et.actions.element.querySelector("button#clear")).handle(async()=>{if(!Et.state.stack.length)return pt.shared.popups.push("Nothing to clear",{level:"warning"});await pt.services.io.exec("history:delete"),Et.state.storage.clear(),Et.state.stack=[],n.content.clear(),pt.shared.popups.push("History has cleared"),fi()}),pt.on("group:register",t=>Et.filter.provide({name:t,isEnabled:!0,colorify:!0})),Et.filter.on("enable",()=>{Et.state.filters.groups=Et.filter.extract().filter(t=>t.isEnabled).map(t=>t.name),fi()}),Et.filter.on("disable",()=>{Et.state.filters.groups=Et.filter.extract().filter(t=>t.isEnabled).map(t=>t.name),fi()}),pt.services.io.subscribe("history:added",t=>{var i;const e=ls.build(t);if(Et.state.storage.set(t.id,e),Et.state.stack.push(t.id),Et.state.stack.length>pt.config.history.limit*pt.shared.groups.size){const r=Et.state.stack.shift();(i=Et.state.storage.get(r))==null||i.delete(),Et.state.storage.delete(r)}n.content.prepend(e),fi([e])}),pt.services.io.subscribe("history:updated",t=>{const e=Et.state.storage.get(t.id)??ls.build(t);Et.state.storage.has(t.id)?e.provide(t).refresh():Et.state.stack.push(t.id),Et.state.storage.set(t.id,e),n.element.querySelector(`div.history[id="${t.id}"]`)||(n.content.prepend(e),fi([e]))})}).on("initialize",async n=>{Et.filter.clear(),Et.state.stack=[],n.content.clear(),Et.state.storage.clear();const{data:t}=await pt.services.io.exec("history:get-list");t.forEach(e=>{const i=ls.build(e);Et.state.storage.set(e.id,i),Et.state.stack.push(e.id),n.content.append(i)}),fi()}),t0=Object.freeze(Object.defineProperty({__proto__:null,analytics:Xm,expectations:Su,history:Qm,settings:Jm},Symbol.toStringTag,{value:"Module"})),e0=iu.build().show(),CL=su.build([{type:"section",entity:Jm.hide()},{type:"section",entity:Xm.hide()},{type:"separator"},{type:"section",entity:Su},{type:"section",entity:Qm.hide()}]);pt.switchStorage(Su.storage).share({popups:ru.build(),groups:new Set});document.body.prepend(CL.element);document.body.append(e0.element);document.body.append(pt.shared.popups.element);Object.values(t0).forEach(n=>document.body.append(n.element));pt.instances.io.on("connect",async()=>{console.log("WebSocket has connected"),await pt.services.io.exec("ping");const{data:n}=await pt.services.io.exec("config:get");pt.assignConfig(n),pt.shared.popups.push("Connected!"),Object.values(t0).forEach(t=>t.initialize()),e0.hide()});