@n1k1t/mock-server 0.1.77 → 0.1.79

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.
Files changed (39) hide show
  1. package/lib/package.json +2 -1
  2. package/lib/src/client/types.d.ts +4 -1
  3. package/lib/src/client/types.d.ts.map +1 -1
  4. package/lib/src/gui/app/types/dev.d.ts +0 -3
  5. package/lib/src/gui/app/types/dev.d.ts.map +1 -1
  6. package/lib/src/server/endpoints/cache.restore.endpoint.js +1 -1
  7. package/lib/src/server/endpoints/cache.restore.stream.endpoint.d.ts +34 -0
  8. package/lib/src/server/endpoints/cache.restore.stream.endpoint.d.ts.map +1 -0
  9. package/lib/src/server/endpoints/cache.restore.stream.endpoint.js +34 -0
  10. package/lib/src/server/endpoints/cache.restore.stream.endpoint.js.map +1 -0
  11. package/lib/src/server/endpoints/index.d.ts +1 -0
  12. package/lib/src/server/endpoints/index.d.ts.map +1 -1
  13. package/lib/src/server/endpoints/index.js +3 -1
  14. package/lib/src/server/endpoints/index.js.map +1 -1
  15. package/lib/src/server/transports/internal/io.transport/context.d.ts +2 -2
  16. package/lib/src/server/transports/internal/io.transport/context.d.ts.map +1 -1
  17. package/lib/src/server/transports/internal/io.transport/index.d.ts.map +1 -1
  18. package/lib/src/server/transports/internal/io.transport/index.js +15 -5
  19. package/lib/src/server/transports/internal/io.transport/index.js.map +1 -1
  20. package/lib/src/server/transports/internal/io.transport/reply.js +4 -4
  21. package/lib/src/server/transports/internal/io.transport/reply.js.map +1 -1
  22. package/lib/src/server/types/index.d.ts +5 -0
  23. package/lib/src/server/types/index.d.ts.map +1 -1
  24. package/lib/src/utils/common.d.ts +35 -0
  25. package/lib/src/utils/common.d.ts.map +1 -0
  26. package/lib/src/utils/common.js +65 -0
  27. package/lib/src/utils/common.js.map +1 -0
  28. package/lib/src/utils/index.d.ts +2 -25
  29. package/lib/src/utils/index.d.ts.map +1 -1
  30. package/lib/src/utils/index.js +15 -45
  31. package/lib/src/utils/index.js.map +1 -1
  32. package/lib/src/utils/io-stream.d.ts +19 -0
  33. package/lib/src/utils/io-stream.d.ts.map +1 -0
  34. package/lib/src/utils/io-stream.js +5 -0
  35. package/lib/src/utils/io-stream.js.map +1 -0
  36. package/package.json +2 -1
  37. package/public/assets/index-BXPxP7__.js +521 -0
  38. package/public/index.html +1 -1
  39. package/public/assets/index-BLcRhCT2.js +0 -508
@@ -0,0 +1,521 @@
1
+ var HA=Object.defineProperty;var zA=(n,t,e)=>t in n?HA(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e;var At=(n,t,e)=>zA(n,typeof t!="symbol"?t+"":t,e);function VA(n,t){for(var e=0;e<t.length;e++){const r=t[e];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in n)){const s=Object.getOwnPropertyDescriptor(r,i);s&&Object.defineProperty(n,i,s.get?s:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const a of s.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function e(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(i){if(i.ep)return;i.ep=!0;const s=e(i);fetch(i.href,s)}})();var He=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function _i(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Qa={exports:{}},$A=Qa.exports,xg;function GA(){return xg||(xg=1,function(n,t){(function(e,r){n.exports=r()})($A,function(){return function(e,r,i){e=e||{};var s=r.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 l(h,f,g,d){return s.fromToBase(h,f,g,d)}i.en.relativeTime=a,s.fromToBase=function(h,f,g,d,m){for(var p,v,b,_=g.$locale().relativeTime||a,A=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"}],C=A.length,w=0;w<C;w+=1){var M=A[w];M.d&&(p=d?i(h).diff(g,M.d,!0):g.diff(h,M.d,!0));var O=(e.rounding||Math.round)(Math.abs(p));if(b=p>0,O<=M.r||!M.r){O<=1&&w>0&&(M=A[w-1]);var L=_[M.l];m&&(O=m(""+O)),v=typeof L=="string"?L.replace("%d",O):L(O,f,M.l,b);break}}if(f)return v;var N=b?_.future:_.past;return typeof N=="function"?N(v):N.replace("%s",v)},s.to=function(h,f){return l(h,f,this,!0)},s.from=function(h,f){return l(h,f,this)};var c=function(h){return h.$u?i.utc():i()};s.toNow=function(h){return this.to(c(this),h)},s.fromNow=function(h){return this.from(c(this),h)}}})}(Qa)),Qa.exports}var YA=GA();const KA=_i(YA);var tl={exports:{}},XA=tl.exports,Sg;function JA(){return Sg||(Sg=1,function(n,t){(function(e,r){n.exports=r()})(XA,function(){var e=1e3,r=6e4,i=36e5,s="millisecond",a="second",l="minute",c="hour",h="day",f="week",g="month",d="quarter",m="year",p="date",v="Invalid Date",b=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,_=/\[([^\]]+)]|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,A={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(dt){var st=["th","st","nd","rd"],at=dt%100;return"["+dt+(st[(at-20)%10]||st[at]||st[0])+"]"}},C=function(dt,st,at){var _t=String(dt);return!_t||_t.length>=st?dt:""+Array(st+1-_t.length).join(at)+dt},w={s:C,z:function(dt){var st=-dt.utcOffset(),at=Math.abs(st),_t=Math.floor(at/60),bt=at%60;return(st<=0?"+":"-")+C(_t,2,"0")+":"+C(bt,2,"0")},m:function dt(st,at){if(st.date()<at.date())return-dt(at,st);var _t=12*(at.year()-st.year())+(at.month()-st.month()),bt=st.clone().add(_t,g),Et=at-bt<0,kt=st.clone().add(_t+(Et?-1:1),g);return+(-(_t+(at-bt)/(Et?bt-kt:kt-bt))||0)},a:function(dt){return dt<0?Math.ceil(dt)||0:Math.floor(dt)},p:function(dt){return{M:g,y:m,w:f,d:h,D:p,h:c,m:l,s:a,ms:s,Q:d}[dt]||String(dt||"").toLowerCase().replace(/s$/,"")},u:function(dt){return dt===void 0}},M="en",O={};O[M]=A;var L="$isDayjsObject",N=function(dt){return dt instanceof U||!(!dt||!dt[L])},Y=function dt(st,at,_t){var bt;if(!st)return M;if(typeof st=="string"){var Et=st.toLowerCase();O[Et]&&(bt=Et),at&&(O[Et]=at,bt=Et);var kt=st.split("-");if(!bt&&kt.length>1)return dt(kt[0])}else{var Ot=st.name;O[Ot]=st,bt=Ot}return!_t&&bt&&(M=bt),bt||!_t&&M},z=function(dt,st){if(N(dt))return dt.clone();var at=typeof st=="object"?st:{};return at.date=dt,at.args=arguments,new U(at)},G=w;G.l=Y,G.i=N,G.w=function(dt,st){return z(dt,{locale:st.$L,utc:st.$u,x:st.$x,$offset:st.$offset})};var U=function(){function dt(at){this.$L=Y(at.locale,null,!0),this.parse(at),this.$x=this.$x||at.x||{},this[L]=!0}var st=dt.prototype;return st.parse=function(at){this.$d=function(_t){var bt=_t.date,Et=_t.utc;if(bt===null)return new Date(NaN);if(G.u(bt))return new Date;if(bt instanceof Date)return new Date(bt);if(typeof bt=="string"&&!/Z$/i.test(bt)){var kt=bt.match(b);if(kt){var Ot=kt[2]-1||0,Lt=(kt[7]||"0").substring(0,3);return Et?new Date(Date.UTC(kt[1],Ot,kt[3]||1,kt[4]||0,kt[5]||0,kt[6]||0,Lt)):new Date(kt[1],Ot,kt[3]||1,kt[4]||0,kt[5]||0,kt[6]||0,Lt)}}return new Date(bt)}(at),this.init()},st.init=function(){var at=this.$d;this.$y=at.getFullYear(),this.$M=at.getMonth(),this.$D=at.getDate(),this.$W=at.getDay(),this.$H=at.getHours(),this.$m=at.getMinutes(),this.$s=at.getSeconds(),this.$ms=at.getMilliseconds()},st.$utils=function(){return G},st.isValid=function(){return this.$d.toString()!==v},st.isSame=function(at,_t){var bt=z(at);return this.startOf(_t)<=bt&&bt<=this.endOf(_t)},st.isAfter=function(at,_t){return z(at)<this.startOf(_t)},st.isBefore=function(at,_t){return this.endOf(_t)<z(at)},st.$g=function(at,_t,bt){return G.u(at)?this[_t]:this.set(bt,at)},st.unix=function(){return Math.floor(this.valueOf()/1e3)},st.valueOf=function(){return this.$d.getTime()},st.startOf=function(at,_t){var bt=this,Et=!!G.u(_t)||_t,kt=G.p(at),Ot=function(mt,yt){var D=G.w(bt.$u?Date.UTC(bt.$y,yt,mt):new Date(bt.$y,yt,mt),bt);return Et?D:D.endOf(h)},Lt=function(mt,yt){return G.w(bt.toDate()[mt].apply(bt.toDate("s"),(Et?[0,0,0,0]:[23,59,59,999]).slice(yt)),bt)},Q=this.$W,et=this.$M,ot=this.$D,V="set"+(this.$u?"UTC":"");switch(kt){case m:return Et?Ot(1,0):Ot(31,11);case g:return Et?Ot(1,et):Ot(0,et+1);case f:var X=this.$locale().weekStart||0,lt=(Q<X?Q+7:Q)-X;return Ot(Et?ot-lt:ot+(6-lt),et);case h:case p:return Lt(V+"Hours",0);case c:return Lt(V+"Minutes",1);case l:return Lt(V+"Seconds",2);case a:return Lt(V+"Milliseconds",3);default:return this.clone()}},st.endOf=function(at){return this.startOf(at,!1)},st.$set=function(at,_t){var bt,Et=G.p(at),kt="set"+(this.$u?"UTC":""),Ot=(bt={},bt[h]=kt+"Date",bt[p]=kt+"Date",bt[g]=kt+"Month",bt[m]=kt+"FullYear",bt[c]=kt+"Hours",bt[l]=kt+"Minutes",bt[a]=kt+"Seconds",bt[s]=kt+"Milliseconds",bt)[Et],Lt=Et===h?this.$D+(_t-this.$W):_t;if(Et===g||Et===m){var Q=this.clone().set(p,1);Q.$d[Ot](Lt),Q.init(),this.$d=Q.set(p,Math.min(this.$D,Q.daysInMonth())).$d}else Ot&&this.$d[Ot](Lt);return this.init(),this},st.set=function(at,_t){return this.clone().$set(at,_t)},st.get=function(at){return this[G.p(at)]()},st.add=function(at,_t){var bt,Et=this;at=Number(at);var kt=G.p(_t),Ot=function(et){var ot=z(Et);return G.w(ot.date(ot.date()+Math.round(et*at)),Et)};if(kt===g)return this.set(g,this.$M+at);if(kt===m)return this.set(m,this.$y+at);if(kt===h)return Ot(1);if(kt===f)return Ot(7);var Lt=(bt={},bt[l]=r,bt[c]=i,bt[a]=e,bt)[kt]||1,Q=this.$d.getTime()+at*Lt;return G.w(Q,this)},st.subtract=function(at,_t){return this.add(-1*at,_t)},st.format=function(at){var _t=this,bt=this.$locale();if(!this.isValid())return bt.invalidDate||v;var Et=at||"YYYY-MM-DDTHH:mm:ssZ",kt=G.z(this),Ot=this.$H,Lt=this.$m,Q=this.$M,et=bt.weekdays,ot=bt.months,V=bt.meridiem,X=function(yt,D,j,ut){return yt&&(yt[D]||yt(_t,Et))||j[D].slice(0,ut)},lt=function(yt){return G.s(Ot%12||12,yt,"0")},mt=V||function(yt,D,j){var ut=yt<12?"AM":"PM";return j?ut.toLowerCase():ut};return Et.replace(_,function(yt,D){return D||function(j){switch(j){case"YY":return String(_t.$y).slice(-2);case"YYYY":return G.s(_t.$y,4,"0");case"M":return Q+1;case"MM":return G.s(Q+1,2,"0");case"MMM":return X(bt.monthsShort,Q,ot,3);case"MMMM":return X(ot,Q);case"D":return _t.$D;case"DD":return G.s(_t.$D,2,"0");case"d":return String(_t.$W);case"dd":return X(bt.weekdaysMin,_t.$W,et,2);case"ddd":return X(bt.weekdaysShort,_t.$W,et,3);case"dddd":return et[_t.$W];case"H":return String(Ot);case"HH":return G.s(Ot,2,"0");case"h":return lt(1);case"hh":return lt(2);case"a":return mt(Ot,Lt,!0);case"A":return mt(Ot,Lt,!1);case"m":return String(Lt);case"mm":return G.s(Lt,2,"0");case"s":return String(_t.$s);case"ss":return G.s(_t.$s,2,"0");case"SSS":return G.s(_t.$ms,3,"0");case"Z":return kt}return null}(yt)||kt.replace(":","")})},st.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},st.diff=function(at,_t,bt){var Et,kt=this,Ot=G.p(_t),Lt=z(at),Q=(Lt.utcOffset()-this.utcOffset())*r,et=this-Lt,ot=function(){return G.m(kt,Lt)};switch(Ot){case m:Et=ot()/12;break;case g:Et=ot();break;case d:Et=ot()/3;break;case f:Et=(et-Q)/6048e5;break;case h:Et=(et-Q)/864e5;break;case c:Et=et/i;break;case l:Et=et/r;break;case a:Et=et/e;break;default:Et=et}return bt?Et:G.a(Et)},st.daysInMonth=function(){return this.endOf(g).$D},st.$locale=function(){return O[this.$L]},st.locale=function(at,_t){if(!at)return this.$L;var bt=this.clone(),Et=Y(at,_t,!0);return Et&&(bt.$L=Et),bt},st.clone=function(){return G.w(this.$d,this)},st.toDate=function(){return new Date(this.valueOf())},st.toJSON=function(){return this.isValid()?this.toISOString():null},st.toISOString=function(){return this.$d.toISOString()},st.toString=function(){return this.$d.toUTCString()},dt}(),xt=U.prototype;return z.prototype=xt,[["$ms",s],["$s",a],["$m",l],["$H",c],["$W",h],["$M",g],["$y",m],["$D",p]].forEach(function(dt){xt[dt[1]]=function(st){return this.$g(st,dt[0],dt[1])}}),z.extend=function(dt,st){return dt.$i||(dt(st,U,z),dt.$i=!0),z},z.locale=Y,z.isDayjs=N,z.unix=function(dt){return z(1e3*dt)},z.en=O[M],z.Ls=O,z.p={},z})}(tl)),tl.exports}var ZA=JA();const zi=_i(ZA);var na={exports:{}},ra={exports:{}},Hn={},fn={},Eg;function mn(){if(Eg)return fn;Eg=1,fn.__esModule=!0,fn.extend=i,fn.indexOf=c,fn.escapeExpression=h,fn.isEmpty=f,fn.createFrame=g,fn.blockParams=d,fn.appendContextPath=m;var n={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;","=":"&#x3D;"},t=/[&<>"'`=]/g,e=/[&<>"'`=]/;function r(p){return n[p]}function i(p){for(var v=1;v<arguments.length;v++)for(var b in arguments[v])Object.prototype.hasOwnProperty.call(arguments[v],b)&&(p[b]=arguments[v][b]);return p}var s=Object.prototype.toString;fn.toString=s;var a=function(v){return typeof v=="function"};a(/x/)&&(fn.isFunction=a=function(p){return typeof p=="function"&&s.call(p)==="[object Function]"}),fn.isFunction=a;var l=Array.isArray||function(p){return p&&typeof p=="object"?s.call(p)==="[object Array]":!1};fn.isArray=l;function c(p,v){for(var b=0,_=p.length;b<_;b++)if(p[b]===v)return b;return-1}function h(p){if(typeof p!="string"){if(p&&p.toHTML)return p.toHTML();if(p==null)return"";if(!p)return p+"";p=""+p}return e.test(p)?p.replace(t,r):p}function f(p){return!p&&p!==0?!0:!!(l(p)&&p.length===0)}function g(p){var v=i({},p);return v._parent=p,v}function d(p,v){return p.path=v,p}function m(p,v){return(p?p+".":"")+v}return fn}var ia={exports:{}},Ag;function Yn(){return Ag||(Ag=1,function(n,t){t.__esModule=!0;var e=["description","fileName","lineNumber","endLineNumber","message","name","number","stack"];function r(i,s){var a=s&&s.loc,l=void 0,c=void 0,h=void 0,f=void 0;a&&(l=a.start.line,c=a.end.line,h=a.start.column,f=a.end.column,i+=" - "+l+":"+h);for(var g=Error.prototype.constructor.call(this,i),d=0;d<e.length;d++)this[e[d]]=g[e[d]];Error.captureStackTrace&&Error.captureStackTrace(this,r);try{a&&(this.lineNumber=l,this.endLineNumber=c,Object.defineProperty?(Object.defineProperty(this,"column",{value:h,enumerable:!0}),Object.defineProperty(this,"endColumn",{value:f,enumerable:!0})):(this.column=h,this.endColumn=f))}catch{}}r.prototype=new Error,t.default=r,n.exports=t.default}(ia,ia.exports)),ia.exports}var ws={},sa={exports:{}},kg;function QA(){return kg||(kg=1,function(n,t){t.__esModule=!0;var e=mn();t.default=function(r){r.registerHelper("blockHelperMissing",function(i,s){var a=s.inverse,l=s.fn;if(i===!0)return l(this);if(i===!1||i==null)return a(this);if(e.isArray(i))return i.length>0?(s.ids&&(s.ids=[s.name]),r.helpers.each(i,s)):a(this);if(s.data&&s.ids){var c=e.createFrame(s.data);c.contextPath=e.appendContextPath(s.data.contextPath,s.name),s={data:c}}return l(i,s)})},n.exports=t.default}(sa,sa.exports)),sa.exports}var oa={exports:{}},Rg;function tk(){return Rg||(Rg=1,function(n,t){t.__esModule=!0;function e(a){return a&&a.__esModule?a:{default:a}}var r=mn(),i=Yn(),s=e(i);t.default=function(a){a.registerHelper("each",function(l,c){if(!c)throw new s.default("Must pass iterator to #each");var h=c.fn,f=c.inverse,g=0,d="",m=void 0,p=void 0;c.data&&c.ids&&(p=r.appendContextPath(c.data.contextPath,c.ids[0])+"."),r.isFunction(l)&&(l=l.call(this)),c.data&&(m=r.createFrame(c.data));function v(w,M,O){m&&(m.key=w,m.index=M,m.first=M===0,m.last=!!O,p&&(m.contextPath=p+w)),d=d+h(l[w],{data:m,blockParams:r.blockParams([l[w],w],[p+w,null])})}if(l&&typeof l=="object")if(r.isArray(l))for(var b=l.length;g<b;g++)g in l&&v(g,g,g===l.length-1);else if(He.Symbol&&l[He.Symbol.iterator]){for(var _=[],A=l[He.Symbol.iterator](),C=A.next();!C.done;C=A.next())_.push(C.value);l=_;for(var b=l.length;g<b;g++)v(g,g,g===l.length-1)}else(function(){var w=void 0;Object.keys(l).forEach(function(M){w!==void 0&&v(w,g-1),w=M,g++}),w!==void 0&&v(w,g-1,!0)})();return g===0&&(d=f(this)),d})},n.exports=t.default}(oa,oa.exports)),oa.exports}var aa={exports:{}},Mg;function ek(){return Mg||(Mg=1,function(n,t){t.__esModule=!0;function e(s){return s&&s.__esModule?s:{default:s}}var r=Yn(),i=e(r);t.default=function(s){s.registerHelper("helperMissing",function(){if(arguments.length!==1)throw new i.default('Missing helper: "'+arguments[arguments.length-1].name+'"')})},n.exports=t.default}(aa,aa.exports)),aa.exports}var la={exports:{}},Cg;function nk(){return Cg||(Cg=1,function(n,t){t.__esModule=!0;function e(a){return a&&a.__esModule?a:{default:a}}var r=mn(),i=Yn(),s=e(i);t.default=function(a){a.registerHelper("if",function(l,c){if(arguments.length!=2)throw new s.default("#if requires exactly one argument");return r.isFunction(l)&&(l=l.call(this)),!c.hash.includeZero&&!l||r.isEmpty(l)?c.inverse(this):c.fn(this)}),a.registerHelper("unless",function(l,c){if(arguments.length!=2)throw new s.default("#unless requires exactly one argument");return a.helpers.if.call(this,l,{fn:c.inverse,inverse:c.fn,hash:c.hash})})},n.exports=t.default}(la,la.exports)),la.exports}var ua={exports:{}},Pg;function rk(){return Pg||(Pg=1,function(n,t){t.__esModule=!0,t.default=function(e){e.registerHelper("log",function(){for(var r=[void 0],i=arguments[arguments.length-1],s=0;s<arguments.length-1;s++)r.push(arguments[s]);var a=1;i.hash.level!=null?a=i.hash.level:i.data&&i.data.level!=null&&(a=i.data.level),r[0]=a,e.log.apply(e,r)})},n.exports=t.default}(ua,ua.exports)),ua.exports}var ca={exports:{}},Og;function ik(){return Og||(Og=1,function(n,t){t.__esModule=!0,t.default=function(e){e.registerHelper("lookup",function(r,i,s){return r&&s.lookupProperty(r,i)})},n.exports=t.default}(ca,ca.exports)),ca.exports}var fa={exports:{}},Lg;function sk(){return Lg||(Lg=1,function(n,t){t.__esModule=!0;function e(a){return a&&a.__esModule?a:{default:a}}var r=mn(),i=Yn(),s=e(i);t.default=function(a){a.registerHelper("with",function(l,c){if(arguments.length!=2)throw new s.default("#with requires exactly one argument");r.isFunction(l)&&(l=l.call(this));var h=c.fn;if(r.isEmpty(l))return c.inverse(this);var f=c.data;return c.data&&c.ids&&(f=r.createFrame(c.data),f.contextPath=r.appendContextPath(c.data.contextPath,c.ids[0])),h(l,{data:f,blockParams:r.blockParams([l],[f&&f.contextPath])})})},n.exports=t.default}(fa,fa.exports)),fa.exports}var Tg;function Av(){if(Tg)return ws;Tg=1,ws.__esModule=!0,ws.registerDefaultHelpers=v,ws.moveHelperToHooks=b;function n(_){return _&&_.__esModule?_:{default:_}}var t=QA(),e=n(t),r=tk(),i=n(r),s=ek(),a=n(s),l=nk(),c=n(l),h=rk(),f=n(h),g=ik(),d=n(g),m=sk(),p=n(m);function v(_){e.default(_),i.default(_),a.default(_),c.default(_),f.default(_),d.default(_),p.default(_)}function b(_,A,C){_.helpers[A]&&(_.hooks[A]=_.helpers[A],C||delete _.helpers[A])}return ws}var ha={},da={exports:{}},Bg;function ok(){return Bg||(Bg=1,function(n,t){t.__esModule=!0;var e=mn();t.default=function(r){r.registerDecorator("inline",function(i,s,a,l){var c=i;return s.partials||(s.partials={},c=function(h,f){var g=a.partials;a.partials=e.extend({},g,s.partials);var d=i(h,f);return a.partials=g,d}),s.partials[l.args[0]]=l.fn,c})},n.exports=t.default}(da,da.exports)),da.exports}var Ig;function ak(){if(Ig)return ha;Ig=1,ha.__esModule=!0,ha.registerDefaultDecorators=r;function n(i){return i&&i.__esModule?i:{default:i}}var t=ok(),e=n(t);function r(i){e.default(i)}return ha}var pa={exports:{}},Dg;function kv(){return Dg||(Dg=1,function(n,t){t.__esModule=!0;var e=mn(),r={methodMap:["debug","info","warn","error"],level:"info",lookupLevel:function(s){if(typeof s=="string"){var a=e.indexOf(r.methodMap,s.toLowerCase());a>=0?s=a:s=parseInt(s,10)}return s},log:function(s){if(s=r.lookupLevel(s),typeof console<"u"&&r.lookupLevel(r.level)<=s){var a=r.methodMap[s];console[a]||(a="log");for(var l=arguments.length,c=Array(l>1?l-1:0),h=1;h<l;h++)c[h-1]=arguments[h];console[a].apply(console,c)}}};t.default=r,n.exports=t.default}(pa,pa.exports)),pa.exports}var Fi={},ga={},Fg;function lk(){if(Fg)return ga;Fg=1,ga.__esModule=!0,ga.createNewLookupObject=t;var n=mn();function t(){for(var e=arguments.length,r=Array(e),i=0;i<e;i++)r[i]=arguments[i];return n.extend.apply(void 0,[Object.create(null)].concat(r))}return ga}var Ng;function Rv(){if(Ng)return Fi;Ng=1,Fi.__esModule=!0,Fi.createProtoAccessControl=s,Fi.resultIsAllowed=a,Fi.resetLoggedProperties=h;function n(f){if(f&&f.__esModule)return f;var g={};if(f!=null)for(var d in f)Object.prototype.hasOwnProperty.call(f,d)&&(g[d]=f[d]);return g.default=f,g}var t=lk(),e=kv(),r=n(e),i=Object.create(null);function s(f){var g=Object.create(null);g.constructor=!1,g.__defineGetter__=!1,g.__defineSetter__=!1,g.__lookupGetter__=!1;var d=Object.create(null);return d.__proto__=!1,{properties:{whitelist:t.createNewLookupObject(d,f.allowedProtoProperties),defaultValue:f.allowProtoPropertiesByDefault},methods:{whitelist:t.createNewLookupObject(g,f.allowedProtoMethods),defaultValue:f.allowProtoMethodsByDefault}}}function a(f,g,d){return l(typeof f=="function"?g.methods:g.properties,d)}function l(f,g){return f.whitelist[g]!==void 0?f.whitelist[g]===!0:f.defaultValue!==void 0?f.defaultValue:(c(g),!1)}function c(f){i[f]!==!0&&(i[f]=!0,r.log("error",'Handlebars: Access has been denied to resolve the property "'+f+`" 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 h(){Object.keys(i).forEach(function(f){delete i[f]})}return Fi}var jg;function gh(){if(jg)return Hn;jg=1,Hn.__esModule=!0,Hn.HandlebarsEnvironment=p;function n(b){return b&&b.__esModule?b:{default:b}}var t=mn(),e=Yn(),r=n(e),i=Av(),s=ak(),a=kv(),l=n(a),c=Rv(),h="4.7.7";Hn.VERSION=h;var f=8;Hn.COMPILER_REVISION=f;var g=7;Hn.LAST_COMPATIBLE_COMPILER_REVISION=g;var d={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"};Hn.REVISION_CHANGES=d;var m="[object Object]";function p(b,_,A){this.helpers=b||{},this.partials=_||{},this.decorators=A||{},i.registerDefaultHelpers(this),s.registerDefaultDecorators(this)}p.prototype={constructor:p,logger:l.default,log:l.default.log,registerHelper:function(_,A){if(t.toString.call(_)===m){if(A)throw new r.default("Arg not supported with multiple helpers");t.extend(this.helpers,_)}else this.helpers[_]=A},unregisterHelper:function(_){delete this.helpers[_]},registerPartial:function(_,A){if(t.toString.call(_)===m)t.extend(this.partials,_);else{if(typeof A>"u")throw new r.default('Attempting to register a partial called "'+_+'" as undefined');this.partials[_]=A}},unregisterPartial:function(_){delete this.partials[_]},registerDecorator:function(_,A){if(t.toString.call(_)===m){if(A)throw new r.default("Arg not supported with multiple decorators");t.extend(this.decorators,_)}else this.decorators[_]=A},unregisterDecorator:function(_){delete this.decorators[_]},resetLoggedPropertyAccesses:function(){c.resetLoggedProperties()}};var v=l.default.log;return Hn.log=v,Hn.createFrame=t.createFrame,Hn.logger=l.default,Hn}var ma={exports:{}},Ug;function uk(){return Ug||(Ug=1,function(n,t){t.__esModule=!0;function e(r){this.string=r}e.prototype.toString=e.prototype.toHTML=function(){return""+this.string},t.default=e,n.exports=t.default}(ma,ma.exports)),ma.exports}var vr={},ya={},qg;function ck(){if(qg)return ya;qg=1,ya.__esModule=!0,ya.wrapHelper=n;function n(t,e){if(typeof t!="function")return t;var r=function(){var s=arguments[arguments.length-1];return arguments[arguments.length-1]=e(s),t.apply(this,arguments)};return r}return ya}var Wg;function fk(){if(Wg)return vr;Wg=1,vr.__esModule=!0,vr.checkRevision=f,vr.template=g,vr.wrapProgram=d,vr.resolvePartial=m,vr.invokePartial=p,vr.noop=v;function n(w){return w&&w.__esModule?w:{default:w}}function t(w){if(w&&w.__esModule)return w;var M={};if(w!=null)for(var O in w)Object.prototype.hasOwnProperty.call(w,O)&&(M[O]=w[O]);return M.default=w,M}var e=mn(),r=t(e),i=Yn(),s=n(i),a=gh(),l=Av(),c=ck(),h=Rv();function f(w){var M=w&&w[0]||1,O=a.COMPILER_REVISION;if(!(M>=a.LAST_COMPATIBLE_COMPILER_REVISION&&M<=a.COMPILER_REVISION))if(M<a.LAST_COMPATIBLE_COMPILER_REVISION){var L=a.REVISION_CHANGES[O],N=a.REVISION_CHANGES[M];throw new s.default("Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version ("+L+") or downgrade your runtime to an older version ("+N+").")}else throw new s.default("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version ("+w[1]+").")}function g(w,M){if(!M)throw new s.default("No environment passed to template");if(!w||!w.main)throw new s.default("Unknown template object: "+typeof w);w.main.decorator=w.main_d,M.VM.checkRevision(w.compiler);var O=w.compiler&&w.compiler[0]===7;function L(z,G,U){U.hash&&(G=r.extend({},G,U.hash),U.ids&&(U.ids[0]=!0)),z=M.VM.resolvePartial.call(this,z,G,U);var xt=r.extend({},U,{hooks:this.hooks,protoAccessControl:this.protoAccessControl}),dt=M.VM.invokePartial.call(this,z,G,xt);if(dt==null&&M.compile&&(U.partials[U.name]=M.compile(z,w.compilerOptions,M),dt=U.partials[U.name](G,xt)),dt!=null){if(U.indent){for(var st=dt.split(`
4
+ `),at=0,_t=st.length;at<_t&&!(!st[at]&&at+1===_t);at++)st[at]=U.indent+st[at];dt=st.join(`
5
+ `)}return dt}else throw new s.default("The partial "+U.name+" could not be compiled when running in runtime-only mode")}var N={strict:function(G,U,xt){if(!G||!(U in G))throw new s.default('"'+U+'" not defined in '+G,{loc:xt});return N.lookupProperty(G,U)},lookupProperty:function(G,U){var xt=G[U];if(xt==null||Object.prototype.hasOwnProperty.call(G,U)||h.resultIsAllowed(xt,N.protoAccessControl,U))return xt},lookup:function(G,U){for(var xt=G.length,dt=0;dt<xt;dt++){var st=G[dt]&&N.lookupProperty(G[dt],U);if(st!=null)return G[dt][U]}},lambda:function(G,U){return typeof G=="function"?G.call(U):G},escapeExpression:r.escapeExpression,invokePartial:L,fn:function(G){var U=w[G];return U.decorator=w[G+"_d"],U},programs:[],program:function(G,U,xt,dt,st){var at=this.programs[G],_t=this.fn(G);return U||st||dt||xt?at=d(this,G,_t,U,xt,dt,st):at||(at=this.programs[G]=d(this,G,_t)),at},data:function(G,U){for(;G&&U--;)G=G._parent;return G},mergeIfNeeded:function(G,U){var xt=G||U;return G&&U&&G!==U&&(xt=r.extend({},U,G)),xt},nullContext:Object.seal({}),noop:M.VM.noop,compilerInfo:w.compiler};function Y(z){var G=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],U=G.data;Y._setup(G),!G.partial&&w.useData&&(U=b(z,U));var xt=void 0,dt=w.useBlockParams?[]:void 0;w.useDepths&&(G.depths?xt=z!=G.depths[0]?[z].concat(G.depths):G.depths:xt=[z]);function st(at){return""+w.main(N,at,N.helpers,N.partials,U,dt,xt)}return st=_(w.main,st,N,G.depths||[],U,dt),st(z,G)}return Y.isTop=!0,Y._setup=function(z){if(z.partial)N.protoAccessControl=z.protoAccessControl,N.helpers=z.helpers,N.partials=z.partials,N.decorators=z.decorators,N.hooks=z.hooks;else{var G=r.extend({},M.helpers,z.helpers);A(G,N),N.helpers=G,w.usePartial&&(N.partials=N.mergeIfNeeded(z.partials,M.partials)),(w.usePartial||w.useDecorators)&&(N.decorators=r.extend({},M.decorators,z.decorators)),N.hooks={},N.protoAccessControl=h.createProtoAccessControl(z);var U=z.allowCallsToHelperMissing||O;l.moveHelperToHooks(N,"helperMissing",U),l.moveHelperToHooks(N,"blockHelperMissing",U)}},Y._child=function(z,G,U,xt){if(w.useBlockParams&&!U)throw new s.default("must pass block params");if(w.useDepths&&!xt)throw new s.default("must pass parent depths");return d(N,z,w[z],G,0,U,xt)},Y}function d(w,M,O,L,N,Y,z){function G(U){var xt=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],dt=z;return z&&U!=z[0]&&!(U===w.nullContext&&z[0]===null)&&(dt=[U].concat(z)),O(w,U,w.helpers,w.partials,xt.data||L,Y&&[xt.blockParams].concat(Y),dt)}return G=_(O,G,w,z,L,Y),G.program=M,G.depth=z?z.length:0,G.blockParams=N||0,G}function m(w,M,O){return w?!w.call&&!O.name&&(O.name=w,w=O.partials[w]):O.name==="@partial-block"?w=O.data["partial-block"]:w=O.partials[O.name],w}function p(w,M,O){var L=O.data&&O.data["partial-block"];O.partial=!0,O.ids&&(O.data.contextPath=O.ids[0]||O.data.contextPath);var N=void 0;if(O.fn&&O.fn!==v&&function(){O.data=a.createFrame(O.data);var Y=O.fn;N=O.data["partial-block"]=function(G){var U=arguments.length<=1||arguments[1]===void 0?{}:arguments[1];return U.data=a.createFrame(U.data),U.data["partial-block"]=L,Y(G,U)},Y.partials&&(O.partials=r.extend({},O.partials,Y.partials))}(),w===void 0&&N&&(w=N),w===void 0)throw new s.default("The partial "+O.name+" could not be found");if(w instanceof Function)return w(M,O)}function v(){return""}function b(w,M){return(!M||!("root"in M))&&(M=M?a.createFrame(M):{},M.root=w),M}function _(w,M,O,L,N,Y){if(w.decorator){var z={};M=w.decorator(M,z,O,L&&L[0],N,Y,L),r.extend(M,z)}return M}function A(w,M){Object.keys(w).forEach(function(O){var L=w[O];w[O]=C(L,M)})}function C(w,M){var O=M.lookupProperty;return c.wrapHelper(w,function(L){return r.extend({lookupProperty:O},L)})}return vr}var va={exports:{}},Hg;function Mv(){return Hg||(Hg=1,function(n,t){t.__esModule=!0,t.default=function(e){var r=typeof He<"u"?He:window,i=r.Handlebars;e.noConflict=function(){return r.Handlebars===e&&(r.Handlebars=i),e}},n.exports=t.default}(va,va.exports)),va.exports}var zg;function hk(){return zg||(zg=1,function(n,t){t.__esModule=!0;function e(A){return A&&A.__esModule?A:{default:A}}function r(A){if(A&&A.__esModule)return A;var C={};if(A!=null)for(var w in A)Object.prototype.hasOwnProperty.call(A,w)&&(C[w]=A[w]);return C.default=A,C}var i=gh(),s=r(i),a=uk(),l=e(a),c=Yn(),h=e(c),f=mn(),g=r(f),d=fk(),m=r(d),p=Mv(),v=e(p);function b(){var A=new s.HandlebarsEnvironment;return g.extend(A,s),A.SafeString=l.default,A.Exception=h.default,A.Utils=g,A.escapeExpression=g.escapeExpression,A.VM=m,A.template=function(C){return m.template(C,A)},A}var _=b();_.create=b,v.default(_),_.default=_,t.default=_,n.exports=t.default}(ra,ra.exports)),ra.exports}var ba={exports:{}},Vg;function Cv(){return Vg||(Vg=1,function(n,t){t.__esModule=!0;var e={helpers:{helperExpression:function(i){return i.type==="SubExpression"||(i.type==="MustacheStatement"||i.type==="BlockStatement")&&!!(i.params&&i.params.length||i.hash)},scopedId:function(i){return/^\.|this\b/.test(i.original)},simpleId:function(i){return i.parts.length===1&&!e.helpers.scopedId(i)&&!i.depth}}};t.default=e,n.exports=t.default}(ba,ba.exports)),ba.exports}var Ni={},_a={exports:{}},$g;function dk(){return $g||($g=1,function(n,t){t.__esModule=!0;var e=function(){var r={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(l,c,h,f,g,d,m){var p=d.length-1;switch(g){case 1:return d[p-1];case 2:this.$=f.prepareProgram(d[p]);break;case 3:this.$=d[p];break;case 4:this.$=d[p];break;case 5:this.$=d[p];break;case 6:this.$=d[p];break;case 7:this.$=d[p];break;case 8:this.$=d[p];break;case 9:this.$={type:"CommentStatement",value:f.stripComment(d[p]),strip:f.stripFlags(d[p],d[p]),loc:f.locInfo(this._$)};break;case 10:this.$={type:"ContentStatement",original:d[p],value:d[p],loc:f.locInfo(this._$)};break;case 11:this.$=f.prepareRawBlock(d[p-2],d[p-1],d[p],this._$);break;case 12:this.$={path:d[p-3],params:d[p-2],hash:d[p-1]};break;case 13:this.$=f.prepareBlock(d[p-3],d[p-2],d[p-1],d[p],!1,this._$);break;case 14:this.$=f.prepareBlock(d[p-3],d[p-2],d[p-1],d[p],!0,this._$);break;case 15:this.$={open:d[p-5],path:d[p-4],params:d[p-3],hash:d[p-2],blockParams:d[p-1],strip:f.stripFlags(d[p-5],d[p])};break;case 16:this.$={path:d[p-4],params:d[p-3],hash:d[p-2],blockParams:d[p-1],strip:f.stripFlags(d[p-5],d[p])};break;case 17:this.$={path:d[p-4],params:d[p-3],hash:d[p-2],blockParams:d[p-1],strip:f.stripFlags(d[p-5],d[p])};break;case 18:this.$={strip:f.stripFlags(d[p-1],d[p-1]),program:d[p]};break;case 19:var v=f.prepareBlock(d[p-2],d[p-1],d[p],d[p],!1,this._$),b=f.prepareProgram([v],d[p-1].loc);b.chained=!0,this.$={strip:d[p-2].strip,program:b,chain:!0};break;case 20:this.$=d[p];break;case 21:this.$={path:d[p-1],strip:f.stripFlags(d[p-2],d[p])};break;case 22:this.$=f.prepareMustache(d[p-3],d[p-2],d[p-1],d[p-4],f.stripFlags(d[p-4],d[p]),this._$);break;case 23:this.$=f.prepareMustache(d[p-3],d[p-2],d[p-1],d[p-4],f.stripFlags(d[p-4],d[p]),this._$);break;case 24:this.$={type:"PartialStatement",name:d[p-3],params:d[p-2],hash:d[p-1],indent:"",strip:f.stripFlags(d[p-4],d[p]),loc:f.locInfo(this._$)};break;case 25:this.$=f.preparePartialBlock(d[p-2],d[p-1],d[p],this._$);break;case 26:this.$={path:d[p-3],params:d[p-2],hash:d[p-1],strip:f.stripFlags(d[p-4],d[p])};break;case 27:this.$=d[p];break;case 28:this.$=d[p];break;case 29:this.$={type:"SubExpression",path:d[p-3],params:d[p-2],hash:d[p-1],loc:f.locInfo(this._$)};break;case 30:this.$={type:"Hash",pairs:d[p],loc:f.locInfo(this._$)};break;case 31:this.$={type:"HashPair",key:f.id(d[p-2]),value:d[p],loc:f.locInfo(this._$)};break;case 32:this.$=f.id(d[p-1]);break;case 33:this.$=d[p];break;case 34:this.$=d[p];break;case 35:this.$={type:"StringLiteral",value:d[p],original:d[p],loc:f.locInfo(this._$)};break;case 36:this.$={type:"NumberLiteral",value:Number(d[p]),original:Number(d[p]),loc:f.locInfo(this._$)};break;case 37:this.$={type:"BooleanLiteral",value:d[p]==="true",original:d[p]==="true",loc:f.locInfo(this._$)};break;case 38:this.$={type:"UndefinedLiteral",original:void 0,value:void 0,loc:f.locInfo(this._$)};break;case 39:this.$={type:"NullLiteral",original:null,value:null,loc:f.locInfo(this._$)};break;case 40:this.$=d[p];break;case 41:this.$=d[p];break;case 42:this.$=f.preparePath(!0,d[p],this._$);break;case 43:this.$=f.preparePath(!1,d[p],this._$);break;case 44:d[p-2].push({part:f.id(d[p]),original:d[p],separator:d[p-1]}),this.$=d[p-2];break;case 45:this.$=[{part:f.id(d[p]),original:d[p]}];break;case 46:this.$=[];break;case 47:d[p-1].push(d[p]);break;case 48:this.$=[];break;case 49:d[p-1].push(d[p]);break;case 50:this.$=[];break;case 51:d[p-1].push(d[p]);break;case 58:this.$=[];break;case 59:d[p-1].push(d[p]);break;case 64:this.$=[];break;case 65:d[p-1].push(d[p]);break;case 70:this.$=[];break;case 71:d[p-1].push(d[p]);break;case 78:this.$=[];break;case 79:d[p-1].push(d[p]);break;case 82:this.$=[];break;case 83:d[p-1].push(d[p]);break;case 86:this.$=[];break;case 87:d[p-1].push(d[p]);break;case 90:this.$=[];break;case 91:d[p-1].push(d[p]);break;case 94:this.$=[];break;case 95:d[p-1].push(d[p]);break;case 98:this.$=[d[p]];break;case 99:d[p-1].push(d[p]);break;case 100:this.$=[d[p]];break;case 101:d[p-1].push(d[p]);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(l,c){throw new Error(l)},parse:function(l){var c=this,h=[0],f=[null],g=[],d=this.table,m="",p=0,v=0;this.lexer.setInput(l),this.lexer.yy=this.yy,this.yy.lexer=this.lexer,this.yy.parser=this,typeof this.lexer.yylloc>"u"&&(this.lexer.yylloc={});var b=this.lexer.yylloc;g.push(b);var _=this.lexer.options&&this.lexer.options.ranges;typeof this.yy.parseError=="function"&&(this.parseError=this.yy.parseError);function A(){var xt;return xt=c.lexer.lex()||1,typeof xt!="number"&&(xt=c.symbols_[xt]||xt),xt}for(var C,w,M,O,L={},N,Y,z,G;;){if(w=h[h.length-1],this.defaultActions[w]?M=this.defaultActions[w]:((C===null||typeof C>"u")&&(C=A()),M=d[w]&&d[w][C]),typeof M>"u"||!M.length||!M[0]){var U="";{G=[];for(N in d[w])this.terminals_[N]&&N>2&&G.push("'"+this.terminals_[N]+"'");this.lexer.showPosition?U="Parse error on line "+(p+1)+`:
6
+ `+this.lexer.showPosition()+`
7
+ Expecting `+G.join(", ")+", got '"+(this.terminals_[C]||C)+"'":U="Parse error on line "+(p+1)+": Unexpected "+(C==1?"end of input":"'"+(this.terminals_[C]||C)+"'"),this.parseError(U,{text:this.lexer.match,token:this.terminals_[C]||C,line:this.lexer.yylineno,loc:b,expected:G})}}if(M[0]instanceof Array&&M.length>1)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+C);switch(M[0]){case 1:h.push(C),f.push(this.lexer.yytext),g.push(this.lexer.yylloc),h.push(M[1]),C=null,v=this.lexer.yyleng,m=this.lexer.yytext,p=this.lexer.yylineno,b=this.lexer.yylloc;break;case 2:if(Y=this.productions_[M[1]][1],L.$=f[f.length-Y],L._$={first_line:g[g.length-(Y||1)].first_line,last_line:g[g.length-1].last_line,first_column:g[g.length-(Y||1)].first_column,last_column:g[g.length-1].last_column},_&&(L._$.range=[g[g.length-(Y||1)].range[0],g[g.length-1].range[1]]),O=this.performAction.call(L,m,v,p,this.yy,M[1],f,g),typeof O<"u")return O;Y&&(h=h.slice(0,-1*Y*2),f=f.slice(0,-1*Y),g=g.slice(0,-1*Y)),h.push(this.productions_[M[1]][0]),f.push(L.$),g.push(L._$),z=d[h[h.length-2]][h[h.length-1]],h.push(z);break;case 3:return!0}}return!0}},i=function(){var a={EOF:1,parseError:function(c,h){if(this.yy.parser)this.yy.parser.parseError(c,h);else throw new Error(c)},setInput:function(c){return this._input=c,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 c=this._input[0];this.yytext+=c,this.yyleng++,this.offset++,this.match+=c,this.matched+=c;var h=c.match(/(?:\r\n?|\n).*/g);return h?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),c},unput:function(c){var h=c.length,f=c.split(/(?:\r\n?|\n)/g);this._input=c+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-h-1),this.offset-=h;var g=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),f.length-1&&(this.yylineno-=f.length-1);var d=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:f?(f.length===g.length?this.yylloc.first_column:0)+g[g.length-f.length].length-f[0].length:this.yylloc.first_column-h},this.options.ranges&&(this.yylloc.range=[d[0],d[0]+this.yyleng-h]),this},more:function(){return this._more=!0,this},less:function(c){this.unput(this.match.slice(c))},pastInput:function(){var c=this.matched.substr(0,this.matched.length-this.match.length);return(c.length>20?"...":"")+c.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var c=this.match;return c.length<20&&(c+=this._input.substr(0,20-c.length)),(c.substr(0,20)+(c.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var c=this.pastInput(),h=new Array(c.length+1).join("-");return c+this.upcomingInput()+`
8
+ `+h+"^"},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var c,h,f,g,d;this._more||(this.yytext="",this.match="");for(var m=this._currentRules(),p=0;p<m.length&&(f=this._input.match(this.rules[m[p]]),!(f&&(!h||f[0].length>h[0].length)&&(h=f,g=p,!this.options.flex)));p++);return h?(d=h[0].match(/(?:\r\n?|\n).*/g),d&&(this.yylineno+=d.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:d?d[d.length-1].length-d[d.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+h[0].length},this.yytext+=h[0],this.match+=h[0],this.matches=h,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(h[0].length),this.matched+=h[0],c=this.performAction.call(this,this.yy,this,m[g],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),c||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 c=this.next();return typeof c<"u"?c:this.lex()},begin:function(c){this.conditionStack.push(c)},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(c){this.begin(c)}};return a.options={},a.performAction=function(c,h,f,g){function d(m,p){return h.yytext=h.yytext.substring(m,h.yyleng-p+m)}switch(f){case 0:if(h.yytext.slice(-2)==="\\\\"?(d(0,1),this.begin("mu")):h.yytext.slice(-1)==="\\"?(d(0,1),this.begin("emu")):this.begin("mu"),h.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:(d(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(h.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 h.yytext=d(1,2).replace(/\\"/g,'"'),80;case 32:return h.yytext=d(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 h.yytext=h.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}();r.lexer=i;function s(){this.yy={}}return s.prototype=r,r.Parser=s,new s}();t.default=e,n.exports=t.default}(_a,_a.exports)),_a.exports}var wa={exports:{}},xa={exports:{}},Gg;function Pv(){return Gg||(Gg=1,function(n,t){t.__esModule=!0;function e(h){return h&&h.__esModule?h:{default:h}}var r=Yn(),i=e(r);function s(){this.parents=[]}s.prototype={constructor:s,mutating:!1,acceptKey:function(f,g){var d=this.accept(f[g]);if(this.mutating){if(d&&!s.prototype[d.type])throw new i.default('Unexpected node type "'+d.type+'" found when accepting '+g+" on "+f.type);f[g]=d}},acceptRequired:function(f,g){if(this.acceptKey(f,g),!f[g])throw new i.default(f.type+" requires "+g)},acceptArray:function(f){for(var g=0,d=f.length;g<d;g++)this.acceptKey(f,g),f[g]||(f.splice(g,1),g--,d--)},accept:function(f){if(f){if(!this[f.type])throw new i.default("Unknown type: "+f.type,f);this.current&&this.parents.unshift(this.current),this.current=f;var g=this[f.type](f);if(this.current=this.parents.shift(),!this.mutating||g)return g;if(g!==!1)return f}},Program:function(f){this.acceptArray(f.body)},MustacheStatement:a,Decorator:a,BlockStatement:l,DecoratorBlock:l,PartialStatement:c,PartialBlockStatement:function(f){c.call(this,f),this.acceptKey(f,"program")},ContentStatement:function(){},CommentStatement:function(){},SubExpression:a,PathExpression:function(){},StringLiteral:function(){},NumberLiteral:function(){},BooleanLiteral:function(){},UndefinedLiteral:function(){},NullLiteral:function(){},Hash:function(f){this.acceptArray(f.pairs)},HashPair:function(f){this.acceptRequired(f,"value")}};function a(h){this.acceptRequired(h,"path"),this.acceptArray(h.params),this.acceptKey(h,"hash")}function l(h){a.call(this,h),this.acceptKey(h,"program"),this.acceptKey(h,"inverse")}function c(h){this.acceptRequired(h,"name"),this.acceptArray(h.params),this.acceptKey(h,"hash")}t.default=s,n.exports=t.default}(xa,xa.exports)),xa.exports}var Yg;function pk(){return Yg||(Yg=1,function(n,t){t.__esModule=!0;function e(f){return f&&f.__esModule?f:{default:f}}var r=Pv(),i=e(r);function s(){var f=arguments.length<=0||arguments[0]===void 0?{}:arguments[0];this.options=f}s.prototype=new i.default,s.prototype.Program=function(f){var g=!this.options.ignoreStandalone,d=!this.isRootSeen;this.isRootSeen=!0;for(var m=f.body,p=0,v=m.length;p<v;p++){var b=m[p],_=this.accept(b);if(_){var A=a(m,p,d),C=l(m,p,d),w=_.openStandalone&&A,M=_.closeStandalone&&C,O=_.inlineStandalone&&A&&C;_.close&&c(m,p,!0),_.open&&h(m,p,!0),g&&O&&(c(m,p),h(m,p)&&b.type==="PartialStatement"&&(b.indent=/([ \t]+$)/.exec(m[p-1].original)[1])),g&&w&&(c((b.program||b.inverse).body),h(m,p)),g&&M&&(c(m,p),h((b.inverse||b.program).body))}}return f},s.prototype.BlockStatement=s.prototype.DecoratorBlock=s.prototype.PartialBlockStatement=function(f){this.accept(f.program),this.accept(f.inverse);var g=f.program||f.inverse,d=f.program&&f.inverse,m=d,p=d;if(d&&d.chained)for(m=d.body[0].program;p.chained;)p=p.body[p.body.length-1].program;var v={open:f.openStrip.open,close:f.closeStrip.close,openStandalone:l(g.body),closeStandalone:a((m||g).body)};if(f.openStrip.close&&c(g.body,null,!0),d){var b=f.inverseStrip;b.open&&h(g.body,null,!0),b.close&&c(m.body,null,!0),f.closeStrip.open&&h(p.body,null,!0),!this.options.ignoreStandalone&&a(g.body)&&l(m.body)&&(h(g.body),c(m.body))}else f.closeStrip.open&&h(g.body,null,!0);return v},s.prototype.Decorator=s.prototype.MustacheStatement=function(f){return f.strip},s.prototype.PartialStatement=s.prototype.CommentStatement=function(f){var g=f.strip||{};return{inlineStandalone:!0,open:g.open,close:g.close}};function a(f,g,d){g===void 0&&(g=f.length);var m=f[g-1],p=f[g-2];if(!m)return d;if(m.type==="ContentStatement")return(p||!d?/\r?\n\s*?$/:/(^|\r?\n)\s*?$/).test(m.original)}function l(f,g,d){g===void 0&&(g=-1);var m=f[g+1],p=f[g+2];if(!m)return d;if(m.type==="ContentStatement")return(p||!d?/^\s*?\r?\n/:/^\s*?(\r?\n|$)/).test(m.original)}function c(f,g,d){var m=f[g==null?0:g+1];if(!(!m||m.type!=="ContentStatement"||!d&&m.rightStripped)){var p=m.value;m.value=m.value.replace(d?/^\s+/:/^[ \t]*\r?\n?/,""),m.rightStripped=m.value!==p}}function h(f,g,d){var m=f[g==null?f.length-1:g-1];if(!(!m||m.type!=="ContentStatement"||!d&&m.leftStripped)){var p=m.value;return m.value=m.value.replace(d?/\s+$/:/[ \t]+$/,""),m.leftStripped=m.value!==p,m.leftStripped}}t.default=s,n.exports=t.default}(wa,wa.exports)),wa.exports}var Sn={},Kg;function gk(){if(Kg)return Sn;Kg=1,Sn.__esModule=!0,Sn.SourceLocation=i,Sn.id=s,Sn.stripFlags=a,Sn.stripComment=l,Sn.preparePath=c,Sn.prepareMustache=h,Sn.prepareRawBlock=f,Sn.prepareBlock=g,Sn.prepareProgram=d,Sn.preparePartialBlock=m;function n(p){return p&&p.__esModule?p:{default:p}}var t=Yn(),e=n(t);function r(p,v){if(v=v.path?v.path.original:v,p.path.original!==v){var b={loc:p.path.loc};throw new e.default(p.path.original+" doesn't match "+v,b)}}function i(p,v){this.source=p,this.start={line:v.first_line,column:v.first_column},this.end={line:v.last_line,column:v.last_column}}function s(p){return/^\[.*\]$/.test(p)?p.substring(1,p.length-1):p}function a(p,v){return{open:p.charAt(2)==="~",close:v.charAt(v.length-3)==="~"}}function l(p){return p.replace(/^\{\{~?!-?-?/,"").replace(/-?-?~?\}\}$/,"")}function c(p,v,b){b=this.locInfo(b);for(var _=p?"@":"",A=[],C=0,w=0,M=v.length;w<M;w++){var O=v[w].part,L=v[w].original!==O;if(_+=(v[w].separator||"")+O,!L&&(O===".."||O==="."||O==="this")){if(A.length>0)throw new e.default("Invalid path: "+_,{loc:b});O===".."&&C++}else A.push(O)}return{type:"PathExpression",data:p,depth:C,parts:A,original:_,loc:b}}function h(p,v,b,_,A,C){var w=_.charAt(3)||_.charAt(2),M=w!=="{"&&w!=="&",O=/\*/.test(_);return{type:O?"Decorator":"MustacheStatement",path:p,params:v,hash:b,escaped:M,strip:A,loc:this.locInfo(C)}}function f(p,v,b,_){r(p,b),_=this.locInfo(_);var A={type:"Program",body:v,strip:{},loc:_};return{type:"BlockStatement",path:p.path,params:p.params,hash:p.hash,program:A,openStrip:{},inverseStrip:{},closeStrip:{},loc:_}}function g(p,v,b,_,A,C){_&&_.path&&r(p,_);var w=/\*/.test(p.open);v.blockParams=p.blockParams;var M=void 0,O=void 0;if(b){if(w)throw new e.default("Unexpected inverse block on decorator",b);b.chain&&(b.program.body[0].closeStrip=_.strip),O=b.strip,M=b.program}return A&&(A=M,M=v,v=A),{type:w?"DecoratorBlock":"BlockStatement",path:p.path,params:p.params,hash:p.hash,program:v,inverse:M,openStrip:p.strip,inverseStrip:O,closeStrip:_&&_.strip,loc:this.locInfo(C)}}function d(p,v){if(!v&&p.length){var b=p[0].loc,_=p[p.length-1].loc;b&&_&&(v={source:b.source,start:{line:b.start.line,column:b.start.column},end:{line:_.end.line,column:_.end.column}})}return{type:"Program",body:p,strip:{},loc:v}}function m(p,v,b,_){return r(p,b),{type:"PartialBlockStatement",name:p.path,params:p.params,hash:p.hash,program:v,openStrip:p.strip,closeStrip:b&&b.strip,loc:this.locInfo(_)}}return Sn}var Xg;function mk(){if(Xg)return Ni;Xg=1,Ni.__esModule=!0,Ni.parseWithoutProcessing=f,Ni.parse=g;function n(d){if(d&&d.__esModule)return d;var m={};if(d!=null)for(var p in d)Object.prototype.hasOwnProperty.call(d,p)&&(m[p]=d[p]);return m.default=d,m}function t(d){return d&&d.__esModule?d:{default:d}}var e=dk(),r=t(e),i=pk(),s=t(i),a=gk(),l=n(a),c=mn();Ni.parser=r.default;var h={};c.extend(h,l);function f(d,m){if(d.type==="Program")return d;r.default.yy=h,h.locInfo=function(v){return new h.SourceLocation(m&&m.srcName,v)};var p=r.default.parse(d);return p}function g(d,m){var p=f(d,m),v=new s.default(m);return v.accept(p)}return Ni}var ji={},Jg;function yk(){if(Jg)return ji;Jg=1,ji.__esModule=!0,ji.Compiler=l,ji.precompile=c,ji.compile=h;function n(d){return d&&d.__esModule?d:{default:d}}var t=Yn(),e=n(t),r=mn(),i=Cv(),s=n(i),a=[].slice;function l(){}l.prototype={compiler:l,equals:function(m){var p=this.opcodes.length;if(m.opcodes.length!==p)return!1;for(var v=0;v<p;v++){var b=this.opcodes[v],_=m.opcodes[v];if(b.opcode!==_.opcode||!f(b.args,_.args))return!1}p=this.children.length;for(var v=0;v<p;v++)if(!this.children[v].equals(m.children[v]))return!1;return!0},guid:0,compile:function(m,p){return this.sourceNode=[],this.opcodes=[],this.children=[],this.options=p,this.stringParams=p.stringParams,this.trackIds=p.trackIds,p.blockParams=p.blockParams||[],p.knownHelpers=r.extend(Object.create(null),{helperMissing:!0,blockHelperMissing:!0,each:!0,if:!0,unless:!0,with:!0,log:!0,lookup:!0},p.knownHelpers),this.accept(m)},compileProgram:function(m){var p=new this.compiler,v=p.compile(m,this.options),b=this.guid++;return this.usePartial=this.usePartial||v.usePartial,this.children[b]=v,this.useDepths=this.useDepths||v.useDepths,b},accept:function(m){if(!this[m.type])throw new e.default("Unknown type: "+m.type,m);this.sourceNode.unshift(m);var p=this[m.type](m);return this.sourceNode.shift(),p},Program:function(m){this.options.blockParams.unshift(m.blockParams);for(var p=m.body,v=p.length,b=0;b<v;b++)this.accept(p[b]);return this.options.blockParams.shift(),this.isSimple=v===1,this.blockParams=m.blockParams?m.blockParams.length:0,this},BlockStatement:function(m){g(m);var p=m.program,v=m.inverse;p=p&&this.compileProgram(p),v=v&&this.compileProgram(v);var b=this.classifySexpr(m);b==="helper"?this.helperSexpr(m,p,v):b==="simple"?(this.simpleSexpr(m),this.opcode("pushProgram",p),this.opcode("pushProgram",v),this.opcode("emptyHash"),this.opcode("blockValue",m.path.original)):(this.ambiguousSexpr(m,p,v),this.opcode("pushProgram",p),this.opcode("pushProgram",v),this.opcode("emptyHash"),this.opcode("ambiguousBlockValue")),this.opcode("append")},DecoratorBlock:function(m){var p=m.program&&this.compileProgram(m.program),v=this.setupFullMustacheParams(m,p,void 0),b=m.path;this.useDecorators=!0,this.opcode("registerDecorator",v.length,b.original)},PartialStatement:function(m){this.usePartial=!0;var p=m.program;p&&(p=this.compileProgram(m.program));var v=m.params;if(v.length>1)throw new e.default("Unsupported number of partial arguments: "+v.length,m);v.length||(this.options.explicitPartialContext?this.opcode("pushLiteral","undefined"):v.push({type:"PathExpression",parts:[],depth:0}));var b=m.name.original,_=m.name.type==="SubExpression";_&&this.accept(m.name),this.setupFullMustacheParams(m,p,void 0,!0);var A=m.indent||"";this.options.preventIndent&&A&&(this.opcode("appendContent",A),A=""),this.opcode("invokePartial",_,b,A),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){g(m);var p=this.classifySexpr(m);p==="simple"?this.simpleSexpr(m):p==="helper"?this.helperSexpr(m):this.ambiguousSexpr(m)},ambiguousSexpr:function(m,p,v){var b=m.path,_=b.parts[0],A=p!=null||v!=null;this.opcode("getContext",b.depth),this.opcode("pushProgram",p),this.opcode("pushProgram",v),b.strict=!0,this.accept(b),this.opcode("invokeAmbiguous",_,A)},simpleSexpr:function(m){var p=m.path;p.strict=!0,this.accept(p),this.opcode("resolvePossibleLambda")},helperSexpr:function(m,p,v){var b=this.setupFullMustacheParams(m,p,v),_=m.path,A=_.parts[0];if(this.options.knownHelpers[A])this.opcode("invokeKnownHelper",b.length,A);else{if(this.options.knownHelpersOnly)throw new e.default("You specified knownHelpersOnly, but used the unknown helper "+A,m);_.strict=!0,_.falsy=!0,this.accept(_),this.opcode("invokeHelper",b.length,_.original,s.default.helpers.simpleId(_))}},PathExpression:function(m){this.addDepth(m.depth),this.opcode("getContext",m.depth);var p=m.parts[0],v=s.default.helpers.scopedId(m),b=!m.depth&&!v&&this.blockParamIndex(p);b?this.opcode("lookupBlockParam",b,m.parts):p?m.data?(this.options.data=!0,this.opcode("lookupData",m.depth,m.parts,m.strict)):this.opcode("lookupOnContext",m.parts,m.falsy,m.strict,v):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 p=m.pairs,v=0,b=p.length;for(this.opcode("pushHash");v<b;v++)this.pushParam(p[v].value);for(;v--;)this.opcode("assignToHash",p[v].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 p=s.default.helpers.simpleId(m.path),v=p&&!!this.blockParamIndex(m.path.parts[0]),b=!v&&s.default.helpers.helperExpression(m),_=!v&&(b||p);if(_&&!b){var A=m.path.parts[0],C=this.options;C.knownHelpers[A]?b=!0:C.knownHelpersOnly&&(_=!1)}return b?"helper":_?"ambiguous":"simple"},pushParams:function(m){for(var p=0,v=m.length;p<v;p++)this.pushParam(m[p])},pushParam:function(m){var p=m.value!=null?m.value:m.original||"";if(this.stringParams)p.replace&&(p=p.replace(/^(\.?\.\/)*/g,"").replace(/\//g,".")),m.depth&&this.addDepth(m.depth),this.opcode("getContext",m.depth||0),this.opcode("pushStringParam",p,m.type),m.type==="SubExpression"&&this.accept(m);else{if(this.trackIds){var v=void 0;if(m.parts&&!s.default.helpers.scopedId(m)&&!m.depth&&(v=this.blockParamIndex(m.parts[0])),v){var b=m.parts.slice(1).join(".");this.opcode("pushId","BlockParam",v,b)}else p=m.original||p,p.replace&&(p=p.replace(/^this(?:\.|$)/,"").replace(/^\.\//,"").replace(/^\.$/,"")),this.opcode("pushId",m.type,p)}this.accept(m)}},setupFullMustacheParams:function(m,p,v,b){var _=m.params;return this.pushParams(_),this.opcode("pushProgram",p),this.opcode("pushProgram",v),m.hash?this.accept(m.hash):this.opcode("emptyHash",b),_},blockParamIndex:function(m){for(var p=0,v=this.options.blockParams.length;p<v;p++){var b=this.options.blockParams[p],_=b&&r.indexOf(b,m);if(b&&_>=0)return[p,_]}}};function c(d,m,p){if(d==null||typeof d!="string"&&d.type!=="Program")throw new e.default("You must pass a string or Handlebars AST to Handlebars.precompile. You passed "+d);m=m||{},"data"in m||(m.data=!0),m.compat&&(m.useDepths=!0);var v=p.parse(d,m),b=new p.Compiler().compile(v,m);return new p.JavaScriptCompiler().compile(b,m)}function h(d,m,p){if(m===void 0&&(m={}),d==null||typeof d!="string"&&d.type!=="Program")throw new e.default("You must pass a string or Handlebars AST to Handlebars.compile. You passed "+d);m=r.extend({},m),"data"in m||(m.data=!0),m.compat&&(m.useDepths=!0);var v=void 0;function b(){var A=p.parse(d,m),C=new p.Compiler().compile(A,m),w=new p.JavaScriptCompiler().compile(C,m,void 0,!0);return p.template(w)}function _(A,C){return v||(v=b()),v.call(this,A,C)}return _._setup=function(A){return v||(v=b()),v._setup(A)},_._child=function(A,C,w,M){return v||(v=b()),v._child(A,C,w,M)},_}function f(d,m){if(d===m)return!0;if(r.isArray(d)&&r.isArray(m)&&d.length===m.length){for(var p=0;p<d.length;p++)if(!f(d[p],m[p]))return!1;return!0}}function g(d){if(!d.path.parts){var m=d.path;d.path={type:"PathExpression",data:!1,depth:0,parts:[m.original+""],original:m.original+"",loc:m.loc}}}return ji}var Sa={exports:{}},Ea={exports:{}},xs={},Ku={},Aa={},ka={},Zg;function vk(){if(Zg)return ka;Zg=1;var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");return ka.encode=function(t){if(0<=t&&t<n.length)return n[t];throw new TypeError("Must be between 0 and 63: "+t)},ka.decode=function(t){var e=65,r=90,i=97,s=122,a=48,l=57,c=43,h=47,f=26,g=52;return e<=t&&t<=r?t-e:i<=t&&t<=s?t-i+f:a<=t&&t<=l?t-a+g:t==c?62:t==h?63:-1},ka}var Qg;function Ov(){if(Qg)return Aa;Qg=1;var n=vk(),t=5,e=1<<t,r=e-1,i=e;function s(l){return l<0?(-l<<1)+1:(l<<1)+0}function a(l){var c=(l&1)===1,h=l>>1;return c?-h:h}return Aa.encode=function(c){var h="",f,g=s(c);do f=g&r,g>>>=t,g>0&&(f|=i),h+=n.encode(f);while(g>0);return h},Aa.decode=function(c,h,f){var g=c.length,d=0,m=0,p,v;do{if(h>=g)throw new Error("Expected more digits in base 64 VLQ value.");if(v=n.decode(c.charCodeAt(h++)),v===-1)throw new Error("Invalid base64 digit: "+c.charAt(h-1));p=!!(v&i),v&=r,d=d+(v<<m),m+=t}while(p);f.value=a(d),f.rest=h},Aa}var Xu={},tm;function io(){return tm||(tm=1,function(n){function t(w,M,O){if(M in w)return w[M];if(arguments.length===3)return O;throw new Error('"'+M+'" is a required argument.')}n.getArg=t;var e=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,r=/^data:.+\,.+$/;function i(w){var M=w.match(e);return M?{scheme:M[1],auth:M[2],host:M[3],port:M[4],path:M[5]}:null}n.urlParse=i;function s(w){var M="";return w.scheme&&(M+=w.scheme+":"),M+="//",w.auth&&(M+=w.auth+"@"),w.host&&(M+=w.host),w.port&&(M+=":"+w.port),w.path&&(M+=w.path),M}n.urlGenerate=s;function a(w){var M=w,O=i(w);if(O){if(!O.path)return w;M=O.path}for(var L=n.isAbsolute(M),N=M.split(/\/+/),Y,z=0,G=N.length-1;G>=0;G--)Y=N[G],Y==="."?N.splice(G,1):Y===".."?z++:z>0&&(Y===""?(N.splice(G+1,z),z=0):(N.splice(G,2),z--));return M=N.join("/"),M===""&&(M=L?"/":"."),O?(O.path=M,s(O)):M}n.normalize=a;function l(w,M){w===""&&(w="."),M===""&&(M=".");var O=i(M),L=i(w);if(L&&(w=L.path||"/"),O&&!O.scheme)return L&&(O.scheme=L.scheme),s(O);if(O||M.match(r))return M;if(L&&!L.host&&!L.path)return L.host=M,s(L);var N=M.charAt(0)==="/"?M:a(w.replace(/\/+$/,"")+"/"+M);return L?(L.path=N,s(L)):N}n.join=l,n.isAbsolute=function(w){return w.charAt(0)==="/"||e.test(w)};function c(w,M){w===""&&(w="."),w=w.replace(/\/$/,"");for(var O=0;M.indexOf(w+"/")!==0;){var L=w.lastIndexOf("/");if(L<0||(w=w.slice(0,L),w.match(/^([^\/]+:\/)?\/*$/)))return M;++O}return Array(O+1).join("../")+M.substr(w.length+1)}n.relative=c;var h=function(){var w=Object.create(null);return!("__proto__"in w)}();function f(w){return w}function g(w){return m(w)?"$"+w:w}n.toSetString=h?f:g;function d(w){return m(w)?w.slice(1):w}n.fromSetString=h?f:d;function m(w){if(!w)return!1;var M=w.length;if(M<9||w.charCodeAt(M-1)!==95||w.charCodeAt(M-2)!==95||w.charCodeAt(M-3)!==111||w.charCodeAt(M-4)!==116||w.charCodeAt(M-5)!==111||w.charCodeAt(M-6)!==114||w.charCodeAt(M-7)!==112||w.charCodeAt(M-8)!==95||w.charCodeAt(M-9)!==95)return!1;for(var O=M-10;O>=0;O--)if(w.charCodeAt(O)!==36)return!1;return!0}function p(w,M,O){var L=b(w.source,M.source);return L!==0||(L=w.originalLine-M.originalLine,L!==0)||(L=w.originalColumn-M.originalColumn,L!==0||O)||(L=w.generatedColumn-M.generatedColumn,L!==0)||(L=w.generatedLine-M.generatedLine,L!==0)?L:b(w.name,M.name)}n.compareByOriginalPositions=p;function v(w,M,O){var L=w.generatedLine-M.generatedLine;return L!==0||(L=w.generatedColumn-M.generatedColumn,L!==0||O)||(L=b(w.source,M.source),L!==0)||(L=w.originalLine-M.originalLine,L!==0)||(L=w.originalColumn-M.originalColumn,L!==0)?L:b(w.name,M.name)}n.compareByGeneratedPositionsDeflated=v;function b(w,M){return w===M?0:w===null?1:M===null?-1:w>M?1:-1}function _(w,M){var O=w.generatedLine-M.generatedLine;return O!==0||(O=w.generatedColumn-M.generatedColumn,O!==0)||(O=b(w.source,M.source),O!==0)||(O=w.originalLine-M.originalLine,O!==0)||(O=w.originalColumn-M.originalColumn,O!==0)?O:b(w.name,M.name)}n.compareByGeneratedPositionsInflated=_;function A(w){return JSON.parse(w.replace(/^\)]}'[^\n]*\n/,""))}n.parseSourceMapInput=A;function C(w,M,O){if(M=M||"",w&&(w[w.length-1]!=="/"&&M[0]!=="/"&&(w+="/"),M=w+M),O){var L=i(O);if(!L)throw new Error("sourceMapURL could not be parsed");if(L.path){var N=L.path.lastIndexOf("/");N>=0&&(L.path=L.path.substring(0,N+1))}M=l(s(L),M)}return a(M)}n.computeSourceURL=C}(Xu)),Xu}var Ju={},em;function Lv(){if(em)return Ju;em=1;var n=io(),t=Object.prototype.hasOwnProperty,e=typeof Map<"u";function r(){this._array=[],this._set=e?new Map:Object.create(null)}return r.fromArray=function(s,a){for(var l=new r,c=0,h=s.length;c<h;c++)l.add(s[c],a);return l},r.prototype.size=function(){return e?this._set.size:Object.getOwnPropertyNames(this._set).length},r.prototype.add=function(s,a){var l=e?s:n.toSetString(s),c=e?this.has(s):t.call(this._set,l),h=this._array.length;(!c||a)&&this._array.push(s),c||(e?this._set.set(s,h):this._set[l]=h)},r.prototype.has=function(s){if(e)return this._set.has(s);var a=n.toSetString(s);return t.call(this._set,a)},r.prototype.indexOf=function(s){if(e){var a=this._set.get(s);if(a>=0)return a}else{var l=n.toSetString(s);if(t.call(this._set,l))return this._set[l]}throw new Error('"'+s+'" is not in the set.')},r.prototype.at=function(s){if(s>=0&&s<this._array.length)return this._array[s];throw new Error("No element indexed by "+s)},r.prototype.toArray=function(){return this._array.slice()},Ju.ArraySet=r,Ju}var Zu={},nm;function bk(){if(nm)return Zu;nm=1;var n=io();function t(r,i){var s=r.generatedLine,a=i.generatedLine,l=r.generatedColumn,c=i.generatedColumn;return a>s||a==s&&c>=l||n.compareByGeneratedPositionsInflated(r,i)<=0}function e(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}return e.prototype.unsortedForEach=function(i,s){this._array.forEach(i,s)},e.prototype.add=function(i){t(this._last,i)?(this._last=i,this._array.push(i)):(this._sorted=!1,this._array.push(i))},e.prototype.toArray=function(){return this._sorted||(this._array.sort(n.compareByGeneratedPositionsInflated),this._sorted=!0),this._array},Zu.MappingList=e,Zu}var rm;function Tv(){if(rm)return Ku;rm=1;var n=Ov(),t=io(),e=Lv().ArraySet,r=bk().MappingList;function i(s){s||(s={}),this._file=t.getArg(s,"file",null),this._sourceRoot=t.getArg(s,"sourceRoot",null),this._skipValidation=t.getArg(s,"skipValidation",!1),this._sources=new e,this._names=new e,this._mappings=new r,this._sourcesContents=null}return i.prototype._version=3,i.fromSourceMap=function(a){var l=a.sourceRoot,c=new i({file:a.file,sourceRoot:l});return a.eachMapping(function(h){var f={generated:{line:h.generatedLine,column:h.generatedColumn}};h.source!=null&&(f.source=h.source,l!=null&&(f.source=t.relative(l,f.source)),f.original={line:h.originalLine,column:h.originalColumn},h.name!=null&&(f.name=h.name)),c.addMapping(f)}),a.sources.forEach(function(h){var f=h;l!==null&&(f=t.relative(l,h)),c._sources.has(f)||c._sources.add(f);var g=a.sourceContentFor(h);g!=null&&c.setSourceContent(h,g)}),c},i.prototype.addMapping=function(a){var l=t.getArg(a,"generated"),c=t.getArg(a,"original",null),h=t.getArg(a,"source",null),f=t.getArg(a,"name",null);this._skipValidation||this._validateMapping(l,c,h,f),h!=null&&(h=String(h),this._sources.has(h)||this._sources.add(h)),f!=null&&(f=String(f),this._names.has(f)||this._names.add(f)),this._mappings.add({generatedLine:l.line,generatedColumn:l.column,originalLine:c!=null&&c.line,originalColumn:c!=null&&c.column,source:h,name:f})},i.prototype.setSourceContent=function(a,l){var c=a;this._sourceRoot!=null&&(c=t.relative(this._sourceRoot,c)),l!=null?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[t.toSetString(c)]=l):this._sourcesContents&&(delete this._sourcesContents[t.toSetString(c)],Object.keys(this._sourcesContents).length===0&&(this._sourcesContents=null))},i.prototype.applySourceMap=function(a,l,c){var h=l;if(l==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.`);h=a.file}var f=this._sourceRoot;f!=null&&(h=t.relative(f,h));var g=new e,d=new e;this._mappings.unsortedForEach(function(m){if(m.source===h&&m.originalLine!=null){var p=a.originalPositionFor({line:m.originalLine,column:m.originalColumn});p.source!=null&&(m.source=p.source,c!=null&&(m.source=t.join(c,m.source)),f!=null&&(m.source=t.relative(f,m.source)),m.originalLine=p.line,m.originalColumn=p.column,p.name!=null&&(m.name=p.name))}var v=m.source;v!=null&&!g.has(v)&&g.add(v);var b=m.name;b!=null&&!d.has(b)&&d.add(b)},this),this._sources=g,this._names=d,a.sources.forEach(function(m){var p=a.sourceContentFor(m);p!=null&&(c!=null&&(m=t.join(c,m)),f!=null&&(m=t.relative(f,m)),this.setSourceContent(m,p))},this)},i.prototype._validateMapping=function(a,l,c,h){if(l&&typeof l.line!="number"&&typeof l.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&&!l&&!c&&!h)){if(a&&"line"in a&&"column"in a&&l&&"line"in l&&"column"in l&&a.line>0&&a.column>=0&&l.line>0&&l.column>=0&&c)return;throw new Error("Invalid mapping: "+JSON.stringify({generated:a,source:c,original:l,name:h}))}},i.prototype._serializeMappings=function(){for(var a=0,l=1,c=0,h=0,f=0,g=0,d="",m,p,v,b,_=this._mappings.toArray(),A=0,C=_.length;A<C;A++){if(p=_[A],m="",p.generatedLine!==l)for(a=0;p.generatedLine!==l;)m+=";",l++;else if(A>0){if(!t.compareByGeneratedPositionsInflated(p,_[A-1]))continue;m+=","}m+=n.encode(p.generatedColumn-a),a=p.generatedColumn,p.source!=null&&(b=this._sources.indexOf(p.source),m+=n.encode(b-g),g=b,m+=n.encode(p.originalLine-1-h),h=p.originalLine-1,m+=n.encode(p.originalColumn-c),c=p.originalColumn,p.name!=null&&(v=this._names.indexOf(p.name),m+=n.encode(v-f),f=v)),d+=m}return d},i.prototype._generateSourcesContent=function(a,l){return a.map(function(c){if(!this._sourcesContents)return null;l!=null&&(c=t.relative(l,c));var h=t.toSetString(c);return Object.prototype.hasOwnProperty.call(this._sourcesContents,h)?this._sourcesContents[h]:null},this)},i.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},i.prototype.toString=function(){return JSON.stringify(this.toJSON())},Ku.SourceMapGenerator=i,Ku}var Ss={},Qu={},im;function _k(){return im||(im=1,function(n){n.GREATEST_LOWER_BOUND=1,n.LEAST_UPPER_BOUND=2;function t(e,r,i,s,a,l){var c=Math.floor((r-e)/2)+e,h=a(i,s[c],!0);return h===0?c:h>0?r-c>1?t(c,r,i,s,a,l):l==n.LEAST_UPPER_BOUND?r<s.length?r:-1:c:c-e>1?t(e,c,i,s,a,l):l==n.LEAST_UPPER_BOUND?c:e<0?-1:e}n.search=function(r,i,s,a){if(i.length===0)return-1;var l=t(-1,i.length,r,i,s,a||n.GREATEST_LOWER_BOUND);if(l<0)return-1;for(;l-1>=0&&s(i[l],i[l-1],!0)===0;)--l;return l}}(Qu)),Qu}var tc={},sm;function wk(){if(sm)return tc;sm=1;function n(r,i,s){var a=r[i];r[i]=r[s],r[s]=a}function t(r,i){return Math.round(r+Math.random()*(i-r))}function e(r,i,s,a){if(s<a){var l=t(s,a),c=s-1;n(r,l,a);for(var h=r[a],f=s;f<a;f++)i(r[f],h)<=0&&(c+=1,n(r,c,f));n(r,c+1,f);var g=c+1;e(r,i,s,g-1),e(r,i,g+1,a)}}return tc.quickSort=function(r,i){e(r,i,0,r.length-1)},tc}var om;function xk(){if(om)return Ss;om=1;var n=io(),t=_k(),e=Lv().ArraySet,r=Ov(),i=wk().quickSort;function s(h,f){var g=h;return typeof h=="string"&&(g=n.parseSourceMapInput(h)),g.sections!=null?new c(g,f):new a(g,f)}s.fromSourceMap=function(h,f){return a.fromSourceMap(h,f)},s.prototype._version=3,s.prototype.__generatedMappings=null,Object.defineProperty(s.prototype,"_generatedMappings",{configurable:!0,enumerable:!0,get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}}),s.prototype.__originalMappings=null,Object.defineProperty(s.prototype,"_originalMappings",{configurable:!0,enumerable:!0,get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}}),s.prototype._charIsMappingSeparator=function(f,g){var d=f.charAt(g);return d===";"||d===","},s.prototype._parseMappings=function(f,g){throw new Error("Subclasses must implement _parseMappings")},s.GENERATED_ORDER=1,s.ORIGINAL_ORDER=2,s.GREATEST_LOWER_BOUND=1,s.LEAST_UPPER_BOUND=2,s.prototype.eachMapping=function(f,g,d){var m=g||null,p=d||s.GENERATED_ORDER,v;switch(p){case s.GENERATED_ORDER:v=this._generatedMappings;break;case s.ORIGINAL_ORDER:v=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}var b=this.sourceRoot;v.map(function(_){var A=_.source===null?null:this._sources.at(_.source);return A=n.computeSourceURL(b,A,this._sourceMapURL),{source:A,generatedLine:_.generatedLine,generatedColumn:_.generatedColumn,originalLine:_.originalLine,originalColumn:_.originalColumn,name:_.name===null?null:this._names.at(_.name)}},this).forEach(f,m)},s.prototype.allGeneratedPositionsFor=function(f){var g=n.getArg(f,"line"),d={source:n.getArg(f,"source"),originalLine:g,originalColumn:n.getArg(f,"column",0)};if(d.source=this._findSourceIndex(d.source),d.source<0)return[];var m=[],p=this._findMapping(d,this._originalMappings,"originalLine","originalColumn",n.compareByOriginalPositions,t.LEAST_UPPER_BOUND);if(p>=0){var v=this._originalMappings[p];if(f.column===void 0)for(var b=v.originalLine;v&&v.originalLine===b;)m.push({line:n.getArg(v,"generatedLine",null),column:n.getArg(v,"generatedColumn",null),lastColumn:n.getArg(v,"lastGeneratedColumn",null)}),v=this._originalMappings[++p];else for(var _=v.originalColumn;v&&v.originalLine===g&&v.originalColumn==_;)m.push({line:n.getArg(v,"generatedLine",null),column:n.getArg(v,"generatedColumn",null),lastColumn:n.getArg(v,"lastGeneratedColumn",null)}),v=this._originalMappings[++p]}return m},Ss.SourceMapConsumer=s;function a(h,f){var g=h;typeof h=="string"&&(g=n.parseSourceMapInput(h));var d=n.getArg(g,"version"),m=n.getArg(g,"sources"),p=n.getArg(g,"names",[]),v=n.getArg(g,"sourceRoot",null),b=n.getArg(g,"sourcesContent",null),_=n.getArg(g,"mappings"),A=n.getArg(g,"file",null);if(d!=this._version)throw new Error("Unsupported version: "+d);v&&(v=n.normalize(v)),m=m.map(String).map(n.normalize).map(function(C){return v&&n.isAbsolute(v)&&n.isAbsolute(C)?n.relative(v,C):C}),this._names=e.fromArray(p.map(String),!0),this._sources=e.fromArray(m,!0),this._absoluteSources=this._sources.toArray().map(function(C){return n.computeSourceURL(v,C,f)}),this.sourceRoot=v,this.sourcesContent=b,this._mappings=_,this._sourceMapURL=f,this.file=A}a.prototype=Object.create(s.prototype),a.prototype.consumer=s,a.prototype._findSourceIndex=function(h){var f=h;if(this.sourceRoot!=null&&(f=n.relative(this.sourceRoot,f)),this._sources.has(f))return this._sources.indexOf(f);var g;for(g=0;g<this._absoluteSources.length;++g)if(this._absoluteSources[g]==h)return g;return-1},a.fromSourceMap=function(f,g){var d=Object.create(a.prototype),m=d._names=e.fromArray(f._names.toArray(),!0),p=d._sources=e.fromArray(f._sources.toArray(),!0);d.sourceRoot=f._sourceRoot,d.sourcesContent=f._generateSourcesContent(d._sources.toArray(),d.sourceRoot),d.file=f._file,d._sourceMapURL=g,d._absoluteSources=d._sources.toArray().map(function(O){return n.computeSourceURL(d.sourceRoot,O,g)});for(var v=f._mappings.toArray().slice(),b=d.__generatedMappings=[],_=d.__originalMappings=[],A=0,C=v.length;A<C;A++){var w=v[A],M=new l;M.generatedLine=w.generatedLine,M.generatedColumn=w.generatedColumn,w.source&&(M.source=p.indexOf(w.source),M.originalLine=w.originalLine,M.originalColumn=w.originalColumn,w.name&&(M.name=m.indexOf(w.name)),_.push(M)),b.push(M)}return i(d.__originalMappings,n.compareByOriginalPositions),d},a.prototype._version=3,Object.defineProperty(a.prototype,"sources",{get:function(){return this._absoluteSources.slice()}});function l(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}a.prototype._parseMappings=function(f,g){for(var d=1,m=0,p=0,v=0,b=0,_=0,A=f.length,C=0,w={},M={},O=[],L=[],N,Y,z,G,U;C<A;)if(f.charAt(C)===";")d++,C++,m=0;else if(f.charAt(C)===",")C++;else{for(N=new l,N.generatedLine=d,G=C;G<A&&!this._charIsMappingSeparator(f,G);G++);if(Y=f.slice(C,G),z=w[Y],z)C+=Y.length;else{for(z=[];C<G;)r.decode(f,C,M),U=M.value,C=M.rest,z.push(U);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");w[Y]=z}N.generatedColumn=m+z[0],m=N.generatedColumn,z.length>1&&(N.source=b+z[1],b+=z[1],N.originalLine=p+z[2],p=N.originalLine,N.originalLine+=1,N.originalColumn=v+z[3],v=N.originalColumn,z.length>4&&(N.name=_+z[4],_+=z[4])),L.push(N),typeof N.originalLine=="number"&&O.push(N)}i(L,n.compareByGeneratedPositionsDeflated),this.__generatedMappings=L,i(O,n.compareByOriginalPositions),this.__originalMappings=O},a.prototype._findMapping=function(f,g,d,m,p,v){if(f[d]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+f[d]);if(f[m]<0)throw new TypeError("Column must be greater than or equal to 0, got "+f[m]);return t.search(f,g,p,v)},a.prototype.computeColumnSpans=function(){for(var f=0;f<this._generatedMappings.length;++f){var g=this._generatedMappings[f];if(f+1<this._generatedMappings.length){var d=this._generatedMappings[f+1];if(g.generatedLine===d.generatedLine){g.lastGeneratedColumn=d.generatedColumn-1;continue}}g.lastGeneratedColumn=1/0}},a.prototype.originalPositionFor=function(f){var g={generatedLine:n.getArg(f,"line"),generatedColumn:n.getArg(f,"column")},d=this._findMapping(g,this._generatedMappings,"generatedLine","generatedColumn",n.compareByGeneratedPositionsDeflated,n.getArg(f,"bias",s.GREATEST_LOWER_BOUND));if(d>=0){var m=this._generatedMappings[d];if(m.generatedLine===g.generatedLine){var p=n.getArg(m,"source",null);p!==null&&(p=this._sources.at(p),p=n.computeSourceURL(this.sourceRoot,p,this._sourceMapURL));var v=n.getArg(m,"name",null);return v!==null&&(v=this._names.at(v)),{source:p,line:n.getArg(m,"originalLine",null),column:n.getArg(m,"originalColumn",null),name:v}}}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(f){return f==null}):!1},a.prototype.sourceContentFor=function(f,g){if(!this.sourcesContent)return null;var d=this._findSourceIndex(f);if(d>=0)return this.sourcesContent[d];var m=f;this.sourceRoot!=null&&(m=n.relative(this.sourceRoot,m));var p;if(this.sourceRoot!=null&&(p=n.urlParse(this.sourceRoot))){var v=m.replace(/^file:\/\//,"");if(p.scheme=="file"&&this._sources.has(v))return this.sourcesContent[this._sources.indexOf(v)];if((!p.path||p.path=="/")&&this._sources.has("/"+m))return this.sourcesContent[this._sources.indexOf("/"+m)]}if(g)return null;throw new Error('"'+m+'" is not in the SourceMap.')},a.prototype.generatedPositionFor=function(f){var g=n.getArg(f,"source");if(g=this._findSourceIndex(g),g<0)return{line:null,column:null,lastColumn:null};var d={source:g,originalLine:n.getArg(f,"line"),originalColumn:n.getArg(f,"column")},m=this._findMapping(d,this._originalMappings,"originalLine","originalColumn",n.compareByOriginalPositions,n.getArg(f,"bias",s.GREATEST_LOWER_BOUND));if(m>=0){var p=this._originalMappings[m];if(p.source===d.source)return{line:n.getArg(p,"generatedLine",null),column:n.getArg(p,"generatedColumn",null),lastColumn:n.getArg(p,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}},Ss.BasicSourceMapConsumer=a;function c(h,f){var g=h;typeof h=="string"&&(g=n.parseSourceMapInput(h));var d=n.getArg(g,"version"),m=n.getArg(g,"sections");if(d!=this._version)throw new Error("Unsupported version: "+d);this._sources=new e,this._names=new e;var p={line:-1,column:0};this._sections=m.map(function(v){if(v.url)throw new Error("Support for url field in sections not implemented.");var b=n.getArg(v,"offset"),_=n.getArg(b,"line"),A=n.getArg(b,"column");if(_<p.line||_===p.line&&A<p.column)throw new Error("Section offsets must be ordered and non-overlapping.");return p=b,{generatedOffset:{generatedLine:_+1,generatedColumn:A+1},consumer:new s(n.getArg(v,"map"),f)}})}return c.prototype=Object.create(s.prototype),c.prototype.constructor=s,c.prototype._version=3,Object.defineProperty(c.prototype,"sources",{get:function(){for(var h=[],f=0;f<this._sections.length;f++)for(var g=0;g<this._sections[f].consumer.sources.length;g++)h.push(this._sections[f].consumer.sources[g]);return h}}),c.prototype.originalPositionFor=function(f){var g={generatedLine:n.getArg(f,"line"),generatedColumn:n.getArg(f,"column")},d=t.search(g,this._sections,function(p,v){var b=p.generatedLine-v.generatedOffset.generatedLine;return b||p.generatedColumn-v.generatedOffset.generatedColumn}),m=this._sections[d];return m?m.consumer.originalPositionFor({line:g.generatedLine-(m.generatedOffset.generatedLine-1),column:g.generatedColumn-(m.generatedOffset.generatedLine===g.generatedLine?m.generatedOffset.generatedColumn-1:0),bias:f.bias}):{source:null,line:null,column:null,name:null}},c.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(f){return f.consumer.hasContentsOfAllSources()})},c.prototype.sourceContentFor=function(f,g){for(var d=0;d<this._sections.length;d++){var m=this._sections[d],p=m.consumer.sourceContentFor(f,!0);if(p)return p}if(g)return null;throw new Error('"'+f+'" is not in the SourceMap.')},c.prototype.generatedPositionFor=function(f){for(var g=0;g<this._sections.length;g++){var d=this._sections[g];if(d.consumer._findSourceIndex(n.getArg(f,"source"))!==-1){var m=d.consumer.generatedPositionFor(f);if(m){var p={line:m.line+(d.generatedOffset.generatedLine-1),column:m.column+(d.generatedOffset.generatedLine===m.line?d.generatedOffset.generatedColumn-1:0)};return p}}}return{line:null,column:null}},c.prototype._parseMappings=function(f,g){this.__generatedMappings=[],this.__originalMappings=[];for(var d=0;d<this._sections.length;d++)for(var m=this._sections[d],p=m.consumer._generatedMappings,v=0;v<p.length;v++){var b=p[v],_=m.consumer._sources.at(b.source);_=n.computeSourceURL(m.consumer.sourceRoot,_,this._sourceMapURL),this._sources.add(_),_=this._sources.indexOf(_);var A=null;b.name&&(A=m.consumer._names.at(b.name),this._names.add(A),A=this._names.indexOf(A));var C={source:_,generatedLine:b.generatedLine+(m.generatedOffset.generatedLine-1),generatedColumn:b.generatedColumn+(m.generatedOffset.generatedLine===b.generatedLine?m.generatedOffset.generatedColumn-1:0),originalLine:b.originalLine,originalColumn:b.originalColumn,name:A};this.__generatedMappings.push(C),typeof C.originalLine=="number"&&this.__originalMappings.push(C)}i(this.__generatedMappings,n.compareByGeneratedPositionsDeflated),i(this.__originalMappings,n.compareByOriginalPositions)},Ss.IndexedSourceMapConsumer=c,Ss}var ec={},am;function Sk(){if(am)return ec;am=1;var n=Tv().SourceMapGenerator,t=io(),e=/(\r?\n)/,r=10,i="$$$isSourceNode$$$";function s(a,l,c,h,f){this.children=[],this.sourceContents={},this.line=a??null,this.column=l??null,this.source=c??null,this.name=f??null,this[i]=!0,h!=null&&this.add(h)}return s.fromStringWithSourceMap=function(l,c,h){var f=new s,g=l.split(e),d=0,m=function(){var A=w(),C=w()||"";return A+C;function w(){return d<g.length?g[d++]:void 0}},p=1,v=0,b=null;return c.eachMapping(function(A){if(b!==null)if(p<A.generatedLine)_(b,m()),p++,v=0;else{var C=g[d]||"",w=C.substr(0,A.generatedColumn-v);g[d]=C.substr(A.generatedColumn-v),v=A.generatedColumn,_(b,w),b=A;return}for(;p<A.generatedLine;)f.add(m()),p++;if(v<A.generatedColumn){var C=g[d]||"";f.add(C.substr(0,A.generatedColumn)),g[d]=C.substr(A.generatedColumn),v=A.generatedColumn}b=A},this),d<g.length&&(b&&_(b,m()),f.add(g.splice(d).join(""))),c.sources.forEach(function(A){var C=c.sourceContentFor(A);C!=null&&(h!=null&&(A=t.join(h,A)),f.setSourceContent(A,C))}),f;function _(A,C){if(A===null||A.source===void 0)f.add(C);else{var w=h?t.join(h,A.source):A.source;f.add(new s(A.originalLine,A.originalColumn,w,C,A.name))}}},s.prototype.add=function(l){if(Array.isArray(l))l.forEach(function(c){this.add(c)},this);else if(l[i]||typeof l=="string")l&&this.children.push(l);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+l);return this},s.prototype.prepend=function(l){if(Array.isArray(l))for(var c=l.length-1;c>=0;c--)this.prepend(l[c]);else if(l[i]||typeof l=="string")this.children.unshift(l);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+l);return this},s.prototype.walk=function(l){for(var c,h=0,f=this.children.length;h<f;h++)c=this.children[h],c[i]?c.walk(l):c!==""&&l(c,{source:this.source,line:this.line,column:this.column,name:this.name})},s.prototype.join=function(l){var c,h,f=this.children.length;if(f>0){for(c=[],h=0;h<f-1;h++)c.push(this.children[h]),c.push(l);c.push(this.children[h]),this.children=c}return this},s.prototype.replaceRight=function(l,c){var h=this.children[this.children.length-1];return h[i]?h.replaceRight(l,c):typeof h=="string"?this.children[this.children.length-1]=h.replace(l,c):this.children.push("".replace(l,c)),this},s.prototype.setSourceContent=function(l,c){this.sourceContents[t.toSetString(l)]=c},s.prototype.walkSourceContents=function(l){for(var c=0,h=this.children.length;c<h;c++)this.children[c][i]&&this.children[c].walkSourceContents(l);for(var f=Object.keys(this.sourceContents),c=0,h=f.length;c<h;c++)l(t.fromSetString(f[c]),this.sourceContents[f[c]])},s.prototype.toString=function(){var l="";return this.walk(function(c){l+=c}),l},s.prototype.toStringWithSourceMap=function(l){var c={code:"",line:1,column:0},h=new n(l),f=!1,g=null,d=null,m=null,p=null;return this.walk(function(v,b){c.code+=v,b.source!==null&&b.line!==null&&b.column!==null?((g!==b.source||d!==b.line||m!==b.column||p!==b.name)&&h.addMapping({source:b.source,original:{line:b.line,column:b.column},generated:{line:c.line,column:c.column},name:b.name}),g=b.source,d=b.line,m=b.column,p=b.name,f=!0):f&&(h.addMapping({generated:{line:c.line,column:c.column}}),g=null,f=!1);for(var _=0,A=v.length;_<A;_++)v.charCodeAt(_)===r?(c.line++,c.column=0,_+1===A?(g=null,f=!1):f&&h.addMapping({source:b.source,original:{line:b.line,column:b.column},generated:{line:c.line,column:c.column},name:b.name})):c.column++}),this.walkSourceContents(function(v,b){h.setSourceContent(v,b)}),{code:c.code,map:h}},ec.SourceNode=s,ec}var lm;function Ek(){return lm||(lm=1,xs.SourceMapGenerator=Tv().SourceMapGenerator,xs.SourceMapConsumer=xk().SourceMapConsumer,xs.SourceNode=Sk().SourceNode),xs}var um;function Ak(){return um||(um=1,function(n,t){t.__esModule=!0;var e=mn(),r=void 0;try{var i=Ek();r=i.SourceNode}catch{}r||(r=function(l,c,h,f){this.src="",f&&this.add(f)},r.prototype={add:function(c){e.isArray(c)&&(c=c.join("")),this.src+=c},prepend:function(c){e.isArray(c)&&(c=c.join("")),this.src=c+this.src},toStringWithSourceMap:function(){return{code:this.toString()}},toString:function(){return this.src}});function s(l,c,h){if(e.isArray(l)){for(var f=[],g=0,d=l.length;g<d;g++)f.push(c.wrap(l[g],h));return f}else if(typeof l=="boolean"||typeof l=="number")return l+"";return l}function a(l){this.srcFile=l,this.source=[]}a.prototype={isEmpty:function(){return!this.source.length},prepend:function(c,h){this.source.unshift(this.wrap(c,h))},push:function(c,h){this.source.push(this.wrap(c,h))},merge:function(){var c=this.empty();return this.each(function(h){c.add([" ",h,`
10
+ `])}),c},each:function(c){for(var h=0,f=this.source.length;h<f;h++)c(this.source[h])},empty:function(){var c=this.currentLocation||{start:{}};return new r(c.start.line,c.start.column,this.srcFile)},wrap:function(c){var h=arguments.length<=1||arguments[1]===void 0?this.currentLocation||{start:{}}:arguments[1];return c instanceof r?c:(c=s(c,this,h),new r(h.start.line,h.start.column,this.srcFile,c))},functionCall:function(c,h,f){return f=this.generateList(f),this.wrap([c,h?"."+h+"(":"(",f,")"])},quotedString:function(c){return'"'+(c+"").replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")+'"'},objectLiteral:function(c){var h=this,f=[];Object.keys(c).forEach(function(d){var m=s(c[d],h);m!=="undefined"&&f.push([h.quotedString(d),":",m])});var g=this.generateList(f);return g.prepend("{"),g.add("}"),g},generateList:function(c){for(var h=this.empty(),f=0,g=c.length;f<g;f++)f&&h.add(","),h.add(s(c[f],this));return h},generateArray:function(c){var h=this.generateList(c);return h.prepend("["),h.add("]"),h}},t.default=a,n.exports=t.default}(Ea,Ea.exports)),Ea.exports}var cm;function kk(){return cm||(cm=1,function(n,t){t.__esModule=!0;function e(d){return d&&d.__esModule?d:{default:d}}var r=gh(),i=Yn(),s=e(i),a=mn(),l=Ak(),c=e(l);function h(d){this.value=d}function f(){}f.prototype={nameLookup:function(m,p){return this.internalNameLookup(m,p)},depthedLookup:function(m){return[this.aliasable("container.lookup"),"(depths, ",JSON.stringify(m),")"]},compilerInfo:function(){var m=r.COMPILER_REVISION,p=r.REVISION_CHANGES[m];return[m,p]},appendToBuffer:function(m,p,v){return a.isArray(m)||(m=[m]),m=this.source.wrap(m,p),this.environment.isSimple?["return ",m,";"]:v?["buffer += ",m,";"]:(m.appendToBuffer=!0,m)},initializeBuffer:function(){return this.quotedString("")},internalNameLookup:function(m,p){return this.lookupPropertyFunctionIsUsed=!0,["lookupProperty(",m,",",JSON.stringify(p),")"]},lookupPropertyFunctionIsUsed:!1,compile:function(m,p,v,b){this.environment=m,this.options=p,this.stringParams=this.options.stringParams,this.trackIds=this.options.trackIds,this.precompile=!b,this.name=this.environment.name,this.isChild=!!v,this.context=v||{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,p),this.useDepths=this.useDepths||m.useDepths||m.useDecorators||this.options.compat,this.useBlockParams=this.useBlockParams||m.useBlockParams;var _=m.opcodes,A=void 0,C=void 0,w=void 0,M=void 0;for(w=0,M=_.length;w<M;w++)A=_[w],this.source.currentLocation=A.loc,C=C||A.loc,this[A.opcode].apply(this,A.args);if(this.source.currentLocation=C,this.pushSource(""),this.stackSlot||this.inlineStack.length||this.compileStack.length)throw new s.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;"),b?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(b);if(this.isChild)return O;var L={compiler:this.compilerInfo(),main:O};this.decorators&&(L.main_d=this.decorators,L.useDecorators=!0);var N=this.context,Y=N.programs,z=N.decorators;for(w=0,M=Y.length;w<M;w++)Y[w]&&(L[w]=Y[w],z[w]&&(L[w+"_d"]=z[w],L.useDecorators=!0));return this.environment.usePartial&&(L.usePartial=!0),this.options.data&&(L.useData=!0),this.useDepths&&(L.useDepths=!0),this.useBlockParams&&(L.useBlockParams=!0),this.options.compat&&(L.compat=!0),b?L.compilerOptions=this.options:(L.compiler=JSON.stringify(L.compiler),this.source.currentLocation={start:{line:1,column:0}},L=this.objectLiteral(L),p.srcName?(L=L.toStringWithSourceMap({file:p.destName}),L.map=L.map&&L.map.toString()):L=L.toString()),L},preamble:function(){this.lastContext=0,this.source=new c.default(this.options.srcName),this.decorators=new c.default(this.options.srcName)},createFunctionContext:function(m){var p=this,v="",b=this.stackVars.concat(this.registers.list);b.length>0&&(v+=", "+b.join(", "));var _=0;Object.keys(this.aliases).forEach(function(w){var M=p.aliases[w];M.children&&M.referenceCount>1&&(v+=", alias"+ ++_+"="+w,M.children[0]="alias"+_)}),this.lookupPropertyFunctionIsUsed&&(v+=", "+this.lookupPropertyFunctionVarDeclaration());var A=["container","depth0","helpers","partials","data"];(this.useBlockParams||this.useDepths)&&A.push("blockParams"),this.useDepths&&A.push("depths");var C=this.mergeSource(v);return m?(A.push(C),Function.apply(this,A)):this.source.wrap(["function(",A.join(","),`) {
14
+ `,C,"}"])},mergeSource:function(m){var p=this.environment.isSimple,v=!this.forceBuffer,b=void 0,_=void 0,A=void 0,C=void 0;return this.source.each(function(w){w.appendToBuffer?(A?w.prepend(" + "):A=w,C=w):(A&&(_?A.prepend("buffer += "):b=!0,C.add(";"),A=C=void 0),_=!0,p||(v=!1))}),v?A?(A.prepend("return "),C.add(";")):_||this.source.push('return "";'):(m+=", buffer = "+(b?"":this.initializeBuffer()),A?(A.prepend("return buffer + "),C.add(";")):this.source.push("return buffer;")),m&&this.source.prepend("var "+m.substring(2)+(b?"":`;
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 p=this.aliasable("container.hooks.blockHelperMissing"),v=[this.contextName(0)];this.setupHelperArgs(m,0,v);var b=this.popStack();v.splice(1,0,b),this.push(this.source.functionCall(p,"call",v))},ambiguousBlockValue:function(){var m=this.aliasable("container.hooks.blockHelperMissing"),p=[this.contextName(0)];this.setupHelperArgs("",0,p,!0),this.flushInline();var v=this.topStack();p.splice(1,0,v),this.pushSource(["if (!",this.lastHelper,") { ",v," = ",this.source.functionCall(m,"call",p),"}"])},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(p){return[" != null ? ",p,' : ""']}),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,p,v,b){var _=0;!b&&this.options.compat&&!this.lastContext?this.push(this.depthedLookup(m[_++])):this.pushContext(),this.resolvePath("context",m,_,p,v)},lookupBlockParam:function(m,p){this.useBlockParams=!0,this.push(["blockParams[",m[0],"][",m[1],"]"]),this.resolvePath("context",p,1)},lookupData:function(m,p,v){m?this.pushStackLiteral("container.data(data, "+m+")"):this.pushStackLiteral("data"),this.resolvePath("data",p,0,!0,v)},resolvePath:function(m,p,v,b,_){var A=this;if(this.options.strict||this.options.assumeObjects){this.push(g(this.options.strict&&_,this,p,m));return}for(var C=p.length;v<C;v++)this.replaceStack(function(w){var M=A.nameLookup(w,p[v],m);return b?[" && ",M]:[" != null ? ",M," : ",w]})},resolvePossibleLambda:function(){this.push([this.aliasable("container.lambda"),"(",this.popStack(),", ",this.contextName(0),")"])},pushStringParam:function(m,p){this.pushContext(),this.pushString(p),p!=="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,p){var v=this.nameLookup("decorators",p,"decorator"),b=this.setupHelperArgs(p,m);this.decorators.push(["fn = ",this.decorators.functionCall(v,"",["fn","props","container",b])," || fn;"])},invokeHelper:function(m,p,v){var b=this.popStack(),_=this.setupHelper(m,p),A=[];v&&A.push(_.name),A.push(b),this.options.strict||A.push(this.aliasable("container.hooks.helperMissing"));var C=["(",this.itemsSeparatedBy(A,"||"),")"],w=this.source.functionCall(C,"call",_.callParams);this.push(w)},itemsSeparatedBy:function(m,p){var v=[];v.push(m[0]);for(var b=1;b<m.length;b++)v.push(p,m[b]);return v},invokeKnownHelper:function(m,p){var v=this.setupHelper(m,p);this.push(this.source.functionCall(v.name,"call",v.callParams))},invokeAmbiguous:function(m,p){this.useRegister("helper");var v=this.popStack();this.emptyHash();var b=this.setupHelper(0,m,p),_=this.lastHelper=this.nameLookup("helpers",m,"helper"),A=["(","(helper = ",_," || ",v,")"];this.options.strict||(A[0]="(helper = ",A.push(" != null ? helper : ",this.aliasable("container.hooks.helperMissing"))),this.push(["(",A,b.paramsInit?["),(",b.paramsInit]:[],"),","(typeof helper === ",this.aliasable('"function"')," ? ",this.source.functionCall("helper","call",b.callParams)," : helper))"])},invokePartial:function(m,p,v){var b=[],_=this.setupParams(p,1,b);m&&(p=this.popStack(),delete _.name),v&&(_.indent=JSON.stringify(v)),_.helpers="helpers",_.partials="partials",_.decorators="container.decorators",m?b.unshift(p):b.unshift(this.nameLookup("partials",p,"partial")),this.options.compat&&(_.depths="depths"),_=this.objectLiteral(_),b.push(_),this.push(this.source.functionCall("container.invokePartial","",b))},assignToHash:function(m){var p=this.popStack(),v=void 0,b=void 0,_=void 0;this.trackIds&&(_=this.popStack()),this.stringParams&&(b=this.popStack(),v=this.popStack());var A=this.hash;v&&(A.contexts[m]=v),b&&(A.types[m]=b),_&&(A.ids[m]=_),A.values[m]=p},pushId:function(m,p,v){m==="BlockParam"?this.pushStackLiteral("blockParams["+p[0]+"].path["+p[1]+"]"+(v?" + "+JSON.stringify("."+v):"")):m==="PathExpression"?this.pushString(p):m==="SubExpression"?this.pushStackLiteral("true"):this.pushStackLiteral("null")},compiler:f,compileChildren:function(m,p){for(var v=m.children,b=void 0,_=void 0,A=0,C=v.length;A<C;A++){b=v[A],_=new this.compiler;var w=this.matchExistingProgram(b);if(w==null){this.context.programs.push("");var M=this.context.programs.length;b.index=M,b.name="program"+M,this.context.programs[M]=_.compile(b,p,this.context,!this.precompile),this.context.decorators[M]=_.decorators,this.context.environments[M]=b,this.useDepths=this.useDepths||_.useDepths,this.useBlockParams=this.useBlockParams||_.useBlockParams,b.useDepths=this.useDepths,b.useBlockParams=this.useBlockParams}else b.index=w.index,b.name="program"+w.index,this.useDepths=this.useDepths||w.useDepths,this.useBlockParams=this.useBlockParams||w.useBlockParams}},matchExistingProgram:function(m){for(var p=0,v=this.context.environments.length;p<v;p++){var b=this.context.environments[p];if(b&&b.equals(m))return b}},programExpression:function(m){var p=this.environment.children[m],v=[p.index,"data",p.blockParams];return(this.useBlockParams||this.useDepths)&&v.push("blockParams"),this.useDepths&&v.push("depths"),"container.program("+v.join(", ")+")"},useRegister:function(m){this.registers[m]||(this.registers[m]=!0,this.registers.list.push(m))},push:function(m){return m instanceof h||(m=this.source.wrap(m)),this.inlineStack.push(m),m},pushStackLiteral:function(m){this.push(new h(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 p=["("],v=void 0,b=void 0,_=void 0;if(!this.isInline())throw new s.default("replaceStack on non-inline");var A=this.popStack(!0);if(A instanceof h)v=[A.value],p=["(",v],_=!0;else{b=!0;var C=this.incrStack();p=["((",this.push(C)," = ",A,")"],v=this.topStack()}var w=m.call(this,v);_||this.popStack(),b&&this.stackSlot--,this.push(p.concat(w,")"))},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 p=0,v=m.length;p<v;p++){var b=m[p];if(b instanceof h)this.compileStack.push(b);else{var _=this.incrStack();this.pushSource([_," = ",b,";"]),this.compileStack.push(_)}}},isInline:function(){return this.inlineStack.length},popStack:function(m){var p=this.isInline(),v=(p?this.inlineStack:this.compileStack).pop();if(!m&&v instanceof h)return v.value;if(!p){if(!this.stackSlot)throw new s.default("Invalid stack pop");this.stackSlot--}return v},topStack:function(){var m=this.isInline()?this.inlineStack:this.compileStack,p=m[m.length-1];return p instanceof h?p.value:p},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 p=this.aliases[m];return p?(p.referenceCount++,p):(p=this.aliases[m]=this.source.wrap(m),p.aliasable=!0,p.referenceCount=1,p)},setupHelper:function(m,p,v){var b=[],_=this.setupHelperArgs(p,m,b,v),A=this.nameLookup("helpers",p,"helper"),C=this.aliasable(this.contextName(0)+" != null ? "+this.contextName(0)+" : (container.nullContext || {})");return{params:b,paramsInit:_,name:A,callParams:[C].concat(b)}},setupParams:function(m,p,v){var b={},_=[],A=[],C=[],w=!v,M=void 0;w&&(v=[]),b.name=this.quotedString(m),b.hash=this.popStack(),this.trackIds&&(b.hashIds=this.popStack()),this.stringParams&&(b.hashTypes=this.popStack(),b.hashContexts=this.popStack());var O=this.popStack(),L=this.popStack();(L||O)&&(b.fn=L||"container.noop",b.inverse=O||"container.noop");for(var N=p;N--;)M=this.popStack(),v[N]=M,this.trackIds&&(C[N]=this.popStack()),this.stringParams&&(A[N]=this.popStack(),_[N]=this.popStack());return w&&(b.args=this.source.generateArray(v)),this.trackIds&&(b.ids=this.source.generateArray(C)),this.stringParams&&(b.types=this.source.generateArray(A),b.contexts=this.source.generateArray(_)),this.options.data&&(b.data="data"),this.useBlockParams&&(b.blockParams="blockParams"),b},setupHelperArgs:function(m,p,v,b){var _=this.setupParams(m,p,v);return _.loc=JSON.stringify(this.source.currentLocation),_=this.objectLiteral(_),b?(this.useRegister("options"),v.push("options"),["options=",_]):v?(v.push(_),""):_}},function(){for(var d="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=f.RESERVED_WORDS={},p=0,v=d.length;p<v;p++)m[d[p]]=!0}(),f.isValidJavaScriptVariableName=function(d){return!f.RESERVED_WORDS[d]&&/^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(d)};function g(d,m,p,v){var b=m.popStack(),_=0,A=p.length;for(d&&A--;_<A;_++)b=m.nameLookup(b,p[_],v);return d?[m.aliasable("container.strict"),"(",b,", ",m.quotedString(p[_]),", ",JSON.stringify(m.source.currentLocation)," )"]:b}t.default=f,n.exports=t.default}(Sa,Sa.exports)),Sa.exports}var fm;function Rk(){return fm||(fm=1,function(n,t){t.__esModule=!0;function e(A){return A&&A.__esModule?A:{default:A}}var r=hk(),i=e(r),s=Cv(),a=e(s),l=mk(),c=yk(),h=kk(),f=e(h),g=Pv(),d=e(g),m=Mv(),p=e(m),v=i.default.create;function b(){var A=v();return A.compile=function(C,w){return c.compile(C,w,A)},A.precompile=function(C,w){return c.precompile(C,w,A)},A.AST=a.default,A.Compiler=c.Compiler,A.JavaScriptCompiler=f.default,A.Parser=l.parser,A.parse=l.parse,A.parseWithoutProcessing=l.parseWithoutProcessing,A}var _=b();_.create=b,p.default(_),_.Visitor=d.default,_.default=_,t.default=_,n.exports=t.default}(na,na.exports)),na.exports}var Mk=Rk();const Fe=_i(Mk);var Ps={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 Ck=Ps.exports,hm;function Pk(){return hm||(hm=1,function(n,t){(function(){var e,r="4.17.21",i=200,s="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",a="Expected a function",l="Invalid `variable` option passed into `_.template`",c="__lodash_hash_undefined__",h=500,f="__lodash_placeholder__",g=1,d=2,m=4,p=1,v=2,b=1,_=2,A=4,C=8,w=16,M=32,O=64,L=128,N=256,Y=512,z=30,G="...",U=800,xt=16,dt=1,st=2,at=3,_t=1/0,bt=9007199254740991,Et=17976931348623157e292,kt=NaN,Ot=4294967295,Lt=Ot-1,Q=Ot>>>1,et=[["ary",L],["bind",b],["bindKey",_],["curry",C],["curryRight",w],["flip",Y],["partial",M],["partialRight",O],["rearg",N]],ot="[object Arguments]",V="[object Array]",X="[object AsyncFunction]",lt="[object Boolean]",mt="[object Date]",yt="[object DOMException]",D="[object Error]",j="[object Function]",ut="[object GeneratorFunction]",St="[object Map]",Ft="[object Number]",Mt="[object Null]",Tt="[object Object]",je="[object Promise]",ft="[object Proxy]",Ce="[object RegExp]",ue="[object Set]",te="[object String]",re="[object Symbol]",Ve="[object Undefined]",ke="[object WeakMap]",on="[object WeakSet]",Ye="[object ArrayBuffer]",ye="[object DataView]",Rn="[object Float32Array]",T="[object Float64Array]",S="[object Int8Array]",k="[object Int16Array]",q="[object Int32Array]",K="[object Uint8Array]",nt="[object Uint8ClampedArray]",ht="[object Uint16Array]",Ut="[object Uint32Array]",ce=/\b__p \+= '';/g,fe=/\b(__p \+=) '' \+/g,de=/(__e\(.*?\)|\b__t\)) \+\n'';/g,ne=/&(?:amp|lt|gt|quot|#39);/g,Jr=/[&<>"']/g,Mn=RegExp(ne.source),ss=RegExp(Jr.source),Nl=/<%-([\s\S]+?)%>/g,Kn=/<%([\s\S]+?)%>/g,ho=/<%=([\s\S]+?)%>/g,B=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,E=/^\w*$/,R=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,W=/[\\^$.*+?()[\]{}|]/g,J=RegExp(W.source),rt=/^\s+/,pt=/\s/,Vt=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,we=/\{\n\/\* \[wrapped with (.+)\] \*/,pe=/,? & /,xe=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,oe=/[()=,{}\[\]\/\s]/,R_=/\\(\\)?/g,M_=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Xh=/\w*$/,C_=/^[-+]0x[0-9a-f]+$/i,P_=/^0b[01]+$/i,O_=/^\[object .+?Constructor\]$/,L_=/^0o[0-7]+$/i,T_=/^(?:0|[1-9]\d*)$/,B_=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,po=/($^)/,I_=/['\n\r\u2028\u2029\\]/g,go="\\ud800-\\udfff",D_="\\u0300-\\u036f",F_="\\ufe20-\\ufe2f",N_="\\u20d0-\\u20ff",Jh=D_+F_+N_,Zh="\\u2700-\\u27bf",Qh="a-z\\xdf-\\xf6\\xf8-\\xff",j_="\\xac\\xb1\\xd7\\xf7",U_="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",q_="\\u2000-\\u206f",W_=" \\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",td="A-Z\\xc0-\\xd6\\xd8-\\xde",ed="\\ufe0e\\ufe0f",nd=j_+U_+q_+W_,jl="['’]",H_="["+go+"]",rd="["+nd+"]",mo="["+Jh+"]",id="\\d+",z_="["+Zh+"]",sd="["+Qh+"]",od="[^"+go+nd+id+Zh+Qh+td+"]",Ul="\\ud83c[\\udffb-\\udfff]",V_="(?:"+mo+"|"+Ul+")",ad="[^"+go+"]",ql="(?:\\ud83c[\\udde6-\\uddff]){2}",Wl="[\\ud800-\\udbff][\\udc00-\\udfff]",Si="["+td+"]",ld="\\u200d",ud="(?:"+sd+"|"+od+")",$_="(?:"+Si+"|"+od+")",cd="(?:"+jl+"(?:d|ll|m|re|s|t|ve))?",fd="(?:"+jl+"(?:D|LL|M|RE|S|T|VE))?",hd=V_+"?",dd="["+ed+"]?",G_="(?:"+ld+"(?:"+[ad,ql,Wl].join("|")+")"+dd+hd+")*",Y_="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",K_="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",pd=dd+hd+G_,X_="(?:"+[z_,ql,Wl].join("|")+")"+pd,J_="(?:"+[ad+mo+"?",mo,ql,Wl,H_].join("|")+")",Z_=RegExp(jl,"g"),Q_=RegExp(mo,"g"),Hl=RegExp(Ul+"(?="+Ul+")|"+J_+pd,"g"),t1=RegExp([Si+"?"+sd+"+"+cd+"(?="+[rd,Si,"$"].join("|")+")",$_+"+"+fd+"(?="+[rd,Si+ud,"$"].join("|")+")",Si+"?"+ud+"+"+cd,Si+"+"+fd,K_,Y_,id,X_].join("|"),"g"),e1=RegExp("["+ld+go+Jh+ed+"]"),n1=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,r1=["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"],i1=-1,ve={};ve[Rn]=ve[T]=ve[S]=ve[k]=ve[q]=ve[K]=ve[nt]=ve[ht]=ve[Ut]=!0,ve[ot]=ve[V]=ve[Ye]=ve[lt]=ve[ye]=ve[mt]=ve[D]=ve[j]=ve[St]=ve[Ft]=ve[Tt]=ve[Ce]=ve[ue]=ve[te]=ve[ke]=!1;var ge={};ge[ot]=ge[V]=ge[Ye]=ge[ye]=ge[lt]=ge[mt]=ge[Rn]=ge[T]=ge[S]=ge[k]=ge[q]=ge[St]=ge[Ft]=ge[Tt]=ge[Ce]=ge[ue]=ge[te]=ge[re]=ge[K]=ge[nt]=ge[ht]=ge[Ut]=!0,ge[D]=ge[j]=ge[ke]=!1;var s1={À:"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"},o1={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},a1={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},l1={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},u1=parseFloat,c1=parseInt,gd=typeof He=="object"&&He&&He.Object===Object&&He,f1=typeof self=="object"&&self&&self.Object===Object&&self,Ke=gd||f1||Function("return this")(),zl=t&&!t.nodeType&&t,Zr=zl&&!0&&n&&!n.nodeType&&n,md=Zr&&Zr.exports===zl,Vl=md&&gd.process,Cn=function(){try{var Z=Zr&&Zr.require&&Zr.require("util").types;return Z||Vl&&Vl.binding&&Vl.binding("util")}catch{}}(),yd=Cn&&Cn.isArrayBuffer,vd=Cn&&Cn.isDate,bd=Cn&&Cn.isMap,_d=Cn&&Cn.isRegExp,wd=Cn&&Cn.isSet,xd=Cn&&Cn.isTypedArray;function yn(Z,ct,it){switch(it.length){case 0:return Z.call(ct);case 1:return Z.call(ct,it[0]);case 2:return Z.call(ct,it[0],it[1]);case 3:return Z.call(ct,it[0],it[1],it[2])}return Z.apply(ct,it)}function h1(Z,ct,it,Ct){for(var jt=-1,ie=Z==null?0:Z.length;++jt<ie;){var Ue=Z[jt];ct(Ct,Ue,it(Ue),Z)}return Ct}function Pn(Z,ct){for(var it=-1,Ct=Z==null?0:Z.length;++it<Ct&&ct(Z[it],it,Z)!==!1;);return Z}function d1(Z,ct){for(var it=Z==null?0:Z.length;it--&&ct(Z[it],it,Z)!==!1;);return Z}function Sd(Z,ct){for(var it=-1,Ct=Z==null?0:Z.length;++it<Ct;)if(!ct(Z[it],it,Z))return!1;return!0}function Or(Z,ct){for(var it=-1,Ct=Z==null?0:Z.length,jt=0,ie=[];++it<Ct;){var Ue=Z[it];ct(Ue,it,Z)&&(ie[jt++]=Ue)}return ie}function yo(Z,ct){var it=Z==null?0:Z.length;return!!it&&Ei(Z,ct,0)>-1}function $l(Z,ct,it){for(var Ct=-1,jt=Z==null?0:Z.length;++Ct<jt;)if(it(ct,Z[Ct]))return!0;return!1}function Se(Z,ct){for(var it=-1,Ct=Z==null?0:Z.length,jt=Array(Ct);++it<Ct;)jt[it]=ct(Z[it],it,Z);return jt}function Lr(Z,ct){for(var it=-1,Ct=ct.length,jt=Z.length;++it<Ct;)Z[jt+it]=ct[it];return Z}function Gl(Z,ct,it,Ct){var jt=-1,ie=Z==null?0:Z.length;for(Ct&&ie&&(it=Z[++jt]);++jt<ie;)it=ct(it,Z[jt],jt,Z);return it}function p1(Z,ct,it,Ct){var jt=Z==null?0:Z.length;for(Ct&&jt&&(it=Z[--jt]);jt--;)it=ct(it,Z[jt],jt,Z);return it}function Yl(Z,ct){for(var it=-1,Ct=Z==null?0:Z.length;++it<Ct;)if(ct(Z[it],it,Z))return!0;return!1}var g1=Kl("length");function m1(Z){return Z.split("")}function y1(Z){return Z.match(xe)||[]}function Ed(Z,ct,it){var Ct;return it(Z,function(jt,ie,Ue){if(ct(jt,ie,Ue))return Ct=ie,!1}),Ct}function vo(Z,ct,it,Ct){for(var jt=Z.length,ie=it+(Ct?1:-1);Ct?ie--:++ie<jt;)if(ct(Z[ie],ie,Z))return ie;return-1}function Ei(Z,ct,it){return ct===ct?C1(Z,ct,it):vo(Z,Ad,it)}function v1(Z,ct,it,Ct){for(var jt=it-1,ie=Z.length;++jt<ie;)if(Ct(Z[jt],ct))return jt;return-1}function Ad(Z){return Z!==Z}function kd(Z,ct){var it=Z==null?0:Z.length;return it?Jl(Z,ct)/it:kt}function Kl(Z){return function(ct){return ct==null?e:ct[Z]}}function Xl(Z){return function(ct){return Z==null?e:Z[ct]}}function Rd(Z,ct,it,Ct,jt){return jt(Z,function(ie,Ue,he){it=Ct?(Ct=!1,ie):ct(it,ie,Ue,he)}),it}function b1(Z,ct){var it=Z.length;for(Z.sort(ct);it--;)Z[it]=Z[it].value;return Z}function Jl(Z,ct){for(var it,Ct=-1,jt=Z.length;++Ct<jt;){var ie=ct(Z[Ct]);ie!==e&&(it=it===e?ie:it+ie)}return it}function Zl(Z,ct){for(var it=-1,Ct=Array(Z);++it<Z;)Ct[it]=ct(it);return Ct}function _1(Z,ct){return Se(ct,function(it){return[it,Z[it]]})}function Md(Z){return Z&&Z.slice(0,Ld(Z)+1).replace(rt,"")}function vn(Z){return function(ct){return Z(ct)}}function Ql(Z,ct){return Se(ct,function(it){return Z[it]})}function os(Z,ct){return Z.has(ct)}function Cd(Z,ct){for(var it=-1,Ct=Z.length;++it<Ct&&Ei(ct,Z[it],0)>-1;);return it}function Pd(Z,ct){for(var it=Z.length;it--&&Ei(ct,Z[it],0)>-1;);return it}function w1(Z,ct){for(var it=Z.length,Ct=0;it--;)Z[it]===ct&&++Ct;return Ct}var x1=Xl(s1),S1=Xl(o1);function E1(Z){return"\\"+l1[Z]}function A1(Z,ct){return Z==null?e:Z[ct]}function Ai(Z){return e1.test(Z)}function k1(Z){return n1.test(Z)}function R1(Z){for(var ct,it=[];!(ct=Z.next()).done;)it.push(ct.value);return it}function tu(Z){var ct=-1,it=Array(Z.size);return Z.forEach(function(Ct,jt){it[++ct]=[jt,Ct]}),it}function Od(Z,ct){return function(it){return Z(ct(it))}}function Tr(Z,ct){for(var it=-1,Ct=Z.length,jt=0,ie=[];++it<Ct;){var Ue=Z[it];(Ue===ct||Ue===f)&&(Z[it]=f,ie[jt++]=it)}return ie}function bo(Z){var ct=-1,it=Array(Z.size);return Z.forEach(function(Ct){it[++ct]=Ct}),it}function M1(Z){var ct=-1,it=Array(Z.size);return Z.forEach(function(Ct){it[++ct]=[Ct,Ct]}),it}function C1(Z,ct,it){for(var Ct=it-1,jt=Z.length;++Ct<jt;)if(Z[Ct]===ct)return Ct;return-1}function P1(Z,ct,it){for(var Ct=it+1;Ct--;)if(Z[Ct]===ct)return Ct;return Ct}function ki(Z){return Ai(Z)?L1(Z):g1(Z)}function jn(Z){return Ai(Z)?T1(Z):m1(Z)}function Ld(Z){for(var ct=Z.length;ct--&&pt.test(Z.charAt(ct)););return ct}var O1=Xl(a1);function L1(Z){for(var ct=Hl.lastIndex=0;Hl.test(Z);)++ct;return ct}function T1(Z){return Z.match(Hl)||[]}function B1(Z){return Z.match(t1)||[]}var I1=function Z(ct){ct=ct==null?Ke:Ri.defaults(Ke.Object(),ct,Ri.pick(Ke,r1));var it=ct.Array,Ct=ct.Date,jt=ct.Error,ie=ct.Function,Ue=ct.Math,he=ct.Object,eu=ct.RegExp,D1=ct.String,On=ct.TypeError,_o=it.prototype,F1=ie.prototype,Mi=he.prototype,wo=ct["__core-js_shared__"],xo=F1.toString,ae=Mi.hasOwnProperty,N1=0,Td=function(){var o=/[^.]+$/.exec(wo&&wo.keys&&wo.keys.IE_PROTO||"");return o?"Symbol(src)_1."+o:""}(),So=Mi.toString,j1=xo.call(he),U1=Ke._,q1=eu("^"+xo.call(ae).replace(W,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Eo=md?ct.Buffer:e,Br=ct.Symbol,Ao=ct.Uint8Array,Bd=Eo?Eo.allocUnsafe:e,ko=Od(he.getPrototypeOf,he),Id=he.create,Dd=Mi.propertyIsEnumerable,Ro=_o.splice,Fd=Br?Br.isConcatSpreadable:e,as=Br?Br.iterator:e,Qr=Br?Br.toStringTag:e,Mo=function(){try{var o=ii(he,"defineProperty");return o({},"",{}),o}catch{}}(),W1=ct.clearTimeout!==Ke.clearTimeout&&ct.clearTimeout,H1=Ct&&Ct.now!==Ke.Date.now&&Ct.now,z1=ct.setTimeout!==Ke.setTimeout&&ct.setTimeout,Co=Ue.ceil,Po=Ue.floor,nu=he.getOwnPropertySymbols,V1=Eo?Eo.isBuffer:e,Nd=ct.isFinite,$1=_o.join,G1=Od(he.keys,he),qe=Ue.max,Je=Ue.min,Y1=Ct.now,K1=ct.parseInt,jd=Ue.random,X1=_o.reverse,ru=ii(ct,"DataView"),ls=ii(ct,"Map"),iu=ii(ct,"Promise"),Ci=ii(ct,"Set"),us=ii(ct,"WeakMap"),cs=ii(he,"create"),Oo=us&&new us,Pi={},J1=si(ru),Z1=si(ls),Q1=si(iu),tw=si(Ci),ew=si(us),Lo=Br?Br.prototype:e,fs=Lo?Lo.valueOf:e,Ud=Lo?Lo.toString:e;function I(o){if(Pe(o)&&!qt(o)&&!(o instanceof Xt)){if(o instanceof Ln)return o;if(ae.call(o,"__wrapped__"))return qp(o)}return new Ln(o)}var Oi=function(){function o(){}return function(u){if(!Re(u))return{};if(Id)return Id(u);o.prototype=u;var y=new o;return o.prototype=e,y}}();function To(){}function Ln(o,u){this.__wrapped__=o,this.__actions__=[],this.__chain__=!!u,this.__index__=0,this.__values__=e}I.templateSettings={escape:Nl,evaluate:Kn,interpolate:ho,variable:"",imports:{_:I}},I.prototype=To.prototype,I.prototype.constructor=I,Ln.prototype=Oi(To.prototype),Ln.prototype.constructor=Ln;function Xt(o){this.__wrapped__=o,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=Ot,this.__views__=[]}function nw(){var o=new Xt(this.__wrapped__);return o.__actions__=an(this.__actions__),o.__dir__=this.__dir__,o.__filtered__=this.__filtered__,o.__iteratees__=an(this.__iteratees__),o.__takeCount__=this.__takeCount__,o.__views__=an(this.__views__),o}function rw(){if(this.__filtered__){var o=new Xt(this);o.__dir__=-1,o.__filtered__=!0}else o=this.clone(),o.__dir__*=-1;return o}function iw(){var o=this.__wrapped__.value(),u=this.__dir__,y=qt(o),x=u<0,P=y?o.length:0,F=m2(0,P,this.__views__),H=F.start,$=F.end,tt=$-H,gt=x?$:H-1,vt=this.__iteratees__,wt=vt.length,Rt=0,Pt=Je(tt,this.__takeCount__);if(!y||!x&&P==tt&&Pt==tt)return cp(o,this.__actions__);var It=[];t:for(;tt--&&Rt<Pt;){gt+=u;for(var zt=-1,Dt=o[gt];++zt<wt;){var Gt=vt[zt],Zt=Gt.iteratee,wn=Gt.type,sn=Zt(Dt);if(wn==st)Dt=sn;else if(!sn){if(wn==dt)continue t;break t}}It[Rt++]=Dt}return It}Xt.prototype=Oi(To.prototype),Xt.prototype.constructor=Xt;function ti(o){var u=-1,y=o==null?0:o.length;for(this.clear();++u<y;){var x=o[u];this.set(x[0],x[1])}}function sw(){this.__data__=cs?cs(null):{},this.size=0}function ow(o){var u=this.has(o)&&delete this.__data__[o];return this.size-=u?1:0,u}function aw(o){var u=this.__data__;if(cs){var y=u[o];return y===c?e:y}return ae.call(u,o)?u[o]:e}function lw(o){var u=this.__data__;return cs?u[o]!==e:ae.call(u,o)}function uw(o,u){var y=this.__data__;return this.size+=this.has(o)?0:1,y[o]=cs&&u===e?c:u,this}ti.prototype.clear=sw,ti.prototype.delete=ow,ti.prototype.get=aw,ti.prototype.has=lw,ti.prototype.set=uw;function ur(o){var u=-1,y=o==null?0:o.length;for(this.clear();++u<y;){var x=o[u];this.set(x[0],x[1])}}function cw(){this.__data__=[],this.size=0}function fw(o){var u=this.__data__,y=Bo(u,o);if(y<0)return!1;var x=u.length-1;return y==x?u.pop():Ro.call(u,y,1),--this.size,!0}function hw(o){var u=this.__data__,y=Bo(u,o);return y<0?e:u[y][1]}function dw(o){return Bo(this.__data__,o)>-1}function pw(o,u){var y=this.__data__,x=Bo(y,o);return x<0?(++this.size,y.push([o,u])):y[x][1]=u,this}ur.prototype.clear=cw,ur.prototype.delete=fw,ur.prototype.get=hw,ur.prototype.has=dw,ur.prototype.set=pw;function cr(o){var u=-1,y=o==null?0:o.length;for(this.clear();++u<y;){var x=o[u];this.set(x[0],x[1])}}function gw(){this.size=0,this.__data__={hash:new ti,map:new(ls||ur),string:new ti}}function mw(o){var u=$o(this,o).delete(o);return this.size-=u?1:0,u}function yw(o){return $o(this,o).get(o)}function vw(o){return $o(this,o).has(o)}function bw(o,u){var y=$o(this,o),x=y.size;return y.set(o,u),this.size+=y.size==x?0:1,this}cr.prototype.clear=gw,cr.prototype.delete=mw,cr.prototype.get=yw,cr.prototype.has=vw,cr.prototype.set=bw;function ei(o){var u=-1,y=o==null?0:o.length;for(this.__data__=new cr;++u<y;)this.add(o[u])}function _w(o){return this.__data__.set(o,c),this}function ww(o){return this.__data__.has(o)}ei.prototype.add=ei.prototype.push=_w,ei.prototype.has=ww;function Un(o){var u=this.__data__=new ur(o);this.size=u.size}function xw(){this.__data__=new ur,this.size=0}function Sw(o){var u=this.__data__,y=u.delete(o);return this.size=u.size,y}function Ew(o){return this.__data__.get(o)}function Aw(o){return this.__data__.has(o)}function kw(o,u){var y=this.__data__;if(y instanceof ur){var x=y.__data__;if(!ls||x.length<i-1)return x.push([o,u]),this.size=++y.size,this;y=this.__data__=new cr(x)}return y.set(o,u),this.size=y.size,this}Un.prototype.clear=xw,Un.prototype.delete=Sw,Un.prototype.get=Ew,Un.prototype.has=Aw,Un.prototype.set=kw;function qd(o,u){var y=qt(o),x=!y&&oi(o),P=!y&&!x&&jr(o),F=!y&&!x&&!P&&Ii(o),H=y||x||P||F,$=H?Zl(o.length,D1):[],tt=$.length;for(var gt in o)(u||ae.call(o,gt))&&!(H&&(gt=="length"||P&&(gt=="offset"||gt=="parent")||F&&(gt=="buffer"||gt=="byteLength"||gt=="byteOffset")||pr(gt,tt)))&&$.push(gt);return $}function Wd(o){var u=o.length;return u?o[gu(0,u-1)]:e}function Rw(o,u){return Go(an(o),ni(u,0,o.length))}function Mw(o){return Go(an(o))}function su(o,u,y){(y!==e&&!qn(o[u],y)||y===e&&!(u in o))&&fr(o,u,y)}function hs(o,u,y){var x=o[u];(!(ae.call(o,u)&&qn(x,y))||y===e&&!(u in o))&&fr(o,u,y)}function Bo(o,u){for(var y=o.length;y--;)if(qn(o[y][0],u))return y;return-1}function Cw(o,u,y,x){return Ir(o,function(P,F,H){u(x,P,y(P),H)}),x}function Hd(o,u){return o&&Jn(u,$e(u),o)}function Pw(o,u){return o&&Jn(u,un(u),o)}function fr(o,u,y){u=="__proto__"&&Mo?Mo(o,u,{configurable:!0,enumerable:!0,value:y,writable:!0}):o[u]=y}function ou(o,u){for(var y=-1,x=u.length,P=it(x),F=o==null;++y<x;)P[y]=F?e:Uu(o,u[y]);return P}function ni(o,u,y){return o===o&&(y!==e&&(o=o<=y?o:y),u!==e&&(o=o>=u?o:u)),o}function Tn(o,u,y,x,P,F){var H,$=u&g,tt=u&d,gt=u&m;if(y&&(H=P?y(o,x,P,F):y(o)),H!==e)return H;if(!Re(o))return o;var vt=qt(o);if(vt){if(H=v2(o),!$)return an(o,H)}else{var wt=Ze(o),Rt=wt==j||wt==ut;if(jr(o))return dp(o,$);if(wt==Tt||wt==ot||Rt&&!P){if(H=tt||Rt?{}:Lp(o),!$)return tt?a2(o,Pw(H,o)):o2(o,Hd(H,o))}else{if(!ge[wt])return P?o:{};H=b2(o,wt,$)}}F||(F=new Un);var Pt=F.get(o);if(Pt)return Pt;F.set(o,H),ag(o)?o.forEach(function(Dt){H.add(Tn(Dt,u,y,Dt,o,F))}):sg(o)&&o.forEach(function(Dt,Gt){H.set(Gt,Tn(Dt,u,y,Gt,o,F))});var It=gt?tt?ku:Au:tt?un:$e,zt=vt?e:It(o);return Pn(zt||o,function(Dt,Gt){zt&&(Gt=Dt,Dt=o[Gt]),hs(H,Gt,Tn(Dt,u,y,Gt,o,F))}),H}function Ow(o){var u=$e(o);return function(y){return zd(y,o,u)}}function zd(o,u,y){var x=y.length;if(o==null)return!x;for(o=he(o);x--;){var P=y[x],F=u[P],H=o[P];if(H===e&&!(P in o)||!F(H))return!1}return!0}function Vd(o,u,y){if(typeof o!="function")throw new On(a);return bs(function(){o.apply(e,y)},u)}function ds(o,u,y,x){var P=-1,F=yo,H=!0,$=o.length,tt=[],gt=u.length;if(!$)return tt;y&&(u=Se(u,vn(y))),x?(F=$l,H=!1):u.length>=i&&(F=os,H=!1,u=new ei(u));t:for(;++P<$;){var vt=o[P],wt=y==null?vt:y(vt);if(vt=x||vt!==0?vt:0,H&&wt===wt){for(var Rt=gt;Rt--;)if(u[Rt]===wt)continue t;tt.push(vt)}else F(u,wt,x)||tt.push(vt)}return tt}var Ir=vp(Xn),$d=vp(lu,!0);function Lw(o,u){var y=!0;return Ir(o,function(x,P,F){return y=!!u(x,P,F),y}),y}function Io(o,u,y){for(var x=-1,P=o.length;++x<P;){var F=o[x],H=u(F);if(H!=null&&($===e?H===H&&!_n(H):y(H,$)))var $=H,tt=F}return tt}function Tw(o,u,y,x){var P=o.length;for(y=Ht(y),y<0&&(y=-y>P?0:P+y),x=x===e||x>P?P:Ht(x),x<0&&(x+=P),x=y>x?0:ug(x);y<x;)o[y++]=u;return o}function Gd(o,u){var y=[];return Ir(o,function(x,P,F){u(x,P,F)&&y.push(x)}),y}function Xe(o,u,y,x,P){var F=-1,H=o.length;for(y||(y=w2),P||(P=[]);++F<H;){var $=o[F];u>0&&y($)?u>1?Xe($,u-1,y,x,P):Lr(P,$):x||(P[P.length]=$)}return P}var au=bp(),Yd=bp(!0);function Xn(o,u){return o&&au(o,u,$e)}function lu(o,u){return o&&Yd(o,u,$e)}function Do(o,u){return Or(u,function(y){return gr(o[y])})}function ri(o,u){u=Fr(u,o);for(var y=0,x=u.length;o!=null&&y<x;)o=o[Zn(u[y++])];return y&&y==x?o:e}function Kd(o,u,y){var x=u(o);return qt(o)?x:Lr(x,y(o))}function nn(o){return o==null?o===e?Ve:Mt:Qr&&Qr in he(o)?g2(o):M2(o)}function uu(o,u){return o>u}function Bw(o,u){return o!=null&&ae.call(o,u)}function Iw(o,u){return o!=null&&u in he(o)}function Dw(o,u,y){return o>=Je(u,y)&&o<qe(u,y)}function cu(o,u,y){for(var x=y?$l:yo,P=o[0].length,F=o.length,H=F,$=it(F),tt=1/0,gt=[];H--;){var vt=o[H];H&&u&&(vt=Se(vt,vn(u))),tt=Je(vt.length,tt),$[H]=!y&&(u||P>=120&&vt.length>=120)?new ei(H&&vt):e}vt=o[0];var wt=-1,Rt=$[0];t:for(;++wt<P&&gt.length<tt;){var Pt=vt[wt],It=u?u(Pt):Pt;if(Pt=y||Pt!==0?Pt:0,!(Rt?os(Rt,It):x(gt,It,y))){for(H=F;--H;){var zt=$[H];if(!(zt?os(zt,It):x(o[H],It,y)))continue t}Rt&&Rt.push(It),gt.push(Pt)}}return gt}function Fw(o,u,y,x){return Xn(o,function(P,F,H){u(x,y(P),F,H)}),x}function ps(o,u,y){u=Fr(u,o),o=Dp(o,u);var x=o==null?o:o[Zn(In(u))];return x==null?e:yn(x,o,y)}function Xd(o){return Pe(o)&&nn(o)==ot}function Nw(o){return Pe(o)&&nn(o)==Ye}function jw(o){return Pe(o)&&nn(o)==mt}function gs(o,u,y,x,P){return o===u?!0:o==null||u==null||!Pe(o)&&!Pe(u)?o!==o&&u!==u:Uw(o,u,y,x,gs,P)}function Uw(o,u,y,x,P,F){var H=qt(o),$=qt(u),tt=H?V:Ze(o),gt=$?V:Ze(u);tt=tt==ot?Tt:tt,gt=gt==ot?Tt:gt;var vt=tt==Tt,wt=gt==Tt,Rt=tt==gt;if(Rt&&jr(o)){if(!jr(u))return!1;H=!0,vt=!1}if(Rt&&!vt)return F||(F=new Un),H||Ii(o)?Cp(o,u,y,x,P,F):d2(o,u,tt,y,x,P,F);if(!(y&p)){var Pt=vt&&ae.call(o,"__wrapped__"),It=wt&&ae.call(u,"__wrapped__");if(Pt||It){var zt=Pt?o.value():o,Dt=It?u.value():u;return F||(F=new Un),P(zt,Dt,y,x,F)}}return Rt?(F||(F=new Un),p2(o,u,y,x,P,F)):!1}function qw(o){return Pe(o)&&Ze(o)==St}function fu(o,u,y,x){var P=y.length,F=P,H=!x;if(o==null)return!F;for(o=he(o);P--;){var $=y[P];if(H&&$[2]?$[1]!==o[$[0]]:!($[0]in o))return!1}for(;++P<F;){$=y[P];var tt=$[0],gt=o[tt],vt=$[1];if(H&&$[2]){if(gt===e&&!(tt in o))return!1}else{var wt=new Un;if(x)var Rt=x(gt,vt,tt,o,u,wt);if(!(Rt===e?gs(vt,gt,p|v,x,wt):Rt))return!1}}return!0}function Jd(o){if(!Re(o)||S2(o))return!1;var u=gr(o)?q1:O_;return u.test(si(o))}function Ww(o){return Pe(o)&&nn(o)==Ce}function Hw(o){return Pe(o)&&Ze(o)==ue}function zw(o){return Pe(o)&&Qo(o.length)&&!!ve[nn(o)]}function Zd(o){return typeof o=="function"?o:o==null?cn:typeof o=="object"?qt(o)?ep(o[0],o[1]):tp(o):_g(o)}function hu(o){if(!vs(o))return G1(o);var u=[];for(var y in he(o))ae.call(o,y)&&y!="constructor"&&u.push(y);return u}function Vw(o){if(!Re(o))return R2(o);var u=vs(o),y=[];for(var x in o)x=="constructor"&&(u||!ae.call(o,x))||y.push(x);return y}function du(o,u){return o<u}function Qd(o,u){var y=-1,x=ln(o)?it(o.length):[];return Ir(o,function(P,F,H){x[++y]=u(P,F,H)}),x}function tp(o){var u=Mu(o);return u.length==1&&u[0][2]?Bp(u[0][0],u[0][1]):function(y){return y===o||fu(y,o,u)}}function ep(o,u){return Pu(o)&&Tp(u)?Bp(Zn(o),u):function(y){var x=Uu(y,o);return x===e&&x===u?qu(y,o):gs(u,x,p|v)}}function Fo(o,u,y,x,P){o!==u&&au(u,function(F,H){if(P||(P=new Un),Re(F))$w(o,u,H,y,Fo,x,P);else{var $=x?x(Lu(o,H),F,H+"",o,u,P):e;$===e&&($=F),su(o,H,$)}},un)}function $w(o,u,y,x,P,F,H){var $=Lu(o,y),tt=Lu(u,y),gt=H.get(tt);if(gt){su(o,y,gt);return}var vt=F?F($,tt,y+"",o,u,H):e,wt=vt===e;if(wt){var Rt=qt(tt),Pt=!Rt&&jr(tt),It=!Rt&&!Pt&&Ii(tt);vt=tt,Rt||Pt||It?qt($)?vt=$:Te($)?vt=an($):Pt?(wt=!1,vt=dp(tt,!0)):It?(wt=!1,vt=pp(tt,!0)):vt=[]:_s(tt)||oi(tt)?(vt=$,oi($)?vt=cg($):(!Re($)||gr($))&&(vt=Lp(tt))):wt=!1}wt&&(H.set(tt,vt),P(vt,tt,x,F,H),H.delete(tt)),su(o,y,vt)}function np(o,u){var y=o.length;if(y)return u+=u<0?y:0,pr(u,y)?o[u]:e}function rp(o,u,y){u.length?u=Se(u,function(F){return qt(F)?function(H){return ri(H,F.length===1?F[0]:F)}:F}):u=[cn];var x=-1;u=Se(u,vn(Bt()));var P=Qd(o,function(F,H,$){var tt=Se(u,function(gt){return gt(F)});return{criteria:tt,index:++x,value:F}});return b1(P,function(F,H){return s2(F,H,y)})}function Gw(o,u){return ip(o,u,function(y,x){return qu(o,x)})}function ip(o,u,y){for(var x=-1,P=u.length,F={};++x<P;){var H=u[x],$=ri(o,H);y($,H)&&ms(F,Fr(H,o),$)}return F}function Yw(o){return function(u){return ri(u,o)}}function pu(o,u,y,x){var P=x?v1:Ei,F=-1,H=u.length,$=o;for(o===u&&(u=an(u)),y&&($=Se(o,vn(y)));++F<H;)for(var tt=0,gt=u[F],vt=y?y(gt):gt;(tt=P($,vt,tt,x))>-1;)$!==o&&Ro.call($,tt,1),Ro.call(o,tt,1);return o}function sp(o,u){for(var y=o?u.length:0,x=y-1;y--;){var P=u[y];if(y==x||P!==F){var F=P;pr(P)?Ro.call(o,P,1):vu(o,P)}}return o}function gu(o,u){return o+Po(jd()*(u-o+1))}function Kw(o,u,y,x){for(var P=-1,F=qe(Co((u-o)/(y||1)),0),H=it(F);F--;)H[x?F:++P]=o,o+=y;return H}function mu(o,u){var y="";if(!o||u<1||u>bt)return y;do u%2&&(y+=o),u=Po(u/2),u&&(o+=o);while(u);return y}function $t(o,u){return Tu(Ip(o,u,cn),o+"")}function Xw(o){return Wd(Di(o))}function Jw(o,u){var y=Di(o);return Go(y,ni(u,0,y.length))}function ms(o,u,y,x){if(!Re(o))return o;u=Fr(u,o);for(var P=-1,F=u.length,H=F-1,$=o;$!=null&&++P<F;){var tt=Zn(u[P]),gt=y;if(tt==="__proto__"||tt==="constructor"||tt==="prototype")return o;if(P!=H){var vt=$[tt];gt=x?x(vt,tt,$):e,gt===e&&(gt=Re(vt)?vt:pr(u[P+1])?[]:{})}hs($,tt,gt),$=$[tt]}return o}var op=Oo?function(o,u){return Oo.set(o,u),o}:cn,Zw=Mo?function(o,u){return Mo(o,"toString",{configurable:!0,enumerable:!1,value:Hu(u),writable:!0})}:cn;function Qw(o){return Go(Di(o))}function Bn(o,u,y){var x=-1,P=o.length;u<0&&(u=-u>P?0:P+u),y=y>P?P:y,y<0&&(y+=P),P=u>y?0:y-u>>>0,u>>>=0;for(var F=it(P);++x<P;)F[x]=o[x+u];return F}function t2(o,u){var y;return Ir(o,function(x,P,F){return y=u(x,P,F),!y}),!!y}function No(o,u,y){var x=0,P=o==null?x:o.length;if(typeof u=="number"&&u===u&&P<=Q){for(;x<P;){var F=x+P>>>1,H=o[F];H!==null&&!_n(H)&&(y?H<=u:H<u)?x=F+1:P=F}return P}return yu(o,u,cn,y)}function yu(o,u,y,x){var P=0,F=o==null?0:o.length;if(F===0)return 0;u=y(u);for(var H=u!==u,$=u===null,tt=_n(u),gt=u===e;P<F;){var vt=Po((P+F)/2),wt=y(o[vt]),Rt=wt!==e,Pt=wt===null,It=wt===wt,zt=_n(wt);if(H)var Dt=x||It;else gt?Dt=It&&(x||Rt):$?Dt=It&&Rt&&(x||!Pt):tt?Dt=It&&Rt&&!Pt&&(x||!zt):Pt||zt?Dt=!1:Dt=x?wt<=u:wt<u;Dt?P=vt+1:F=vt}return Je(F,Lt)}function ap(o,u){for(var y=-1,x=o.length,P=0,F=[];++y<x;){var H=o[y],$=u?u(H):H;if(!y||!qn($,tt)){var tt=$;F[P++]=H===0?0:H}}return F}function lp(o){return typeof o=="number"?o:_n(o)?kt:+o}function bn(o){if(typeof o=="string")return o;if(qt(o))return Se(o,bn)+"";if(_n(o))return Ud?Ud.call(o):"";var u=o+"";return u=="0"&&1/o==-1/0?"-0":u}function Dr(o,u,y){var x=-1,P=yo,F=o.length,H=!0,$=[],tt=$;if(y)H=!1,P=$l;else if(F>=i){var gt=u?null:f2(o);if(gt)return bo(gt);H=!1,P=os,tt=new ei}else tt=u?[]:$;t:for(;++x<F;){var vt=o[x],wt=u?u(vt):vt;if(vt=y||vt!==0?vt:0,H&&wt===wt){for(var Rt=tt.length;Rt--;)if(tt[Rt]===wt)continue t;u&&tt.push(wt),$.push(vt)}else P(tt,wt,y)||(tt!==$&&tt.push(wt),$.push(vt))}return $}function vu(o,u){return u=Fr(u,o),o=Dp(o,u),o==null||delete o[Zn(In(u))]}function up(o,u,y,x){return ms(o,u,y(ri(o,u)),x)}function jo(o,u,y,x){for(var P=o.length,F=x?P:-1;(x?F--:++F<P)&&u(o[F],F,o););return y?Bn(o,x?0:F,x?F+1:P):Bn(o,x?F+1:0,x?P:F)}function cp(o,u){var y=o;return y instanceof Xt&&(y=y.value()),Gl(u,function(x,P){return P.func.apply(P.thisArg,Lr([x],P.args))},y)}function bu(o,u,y){var x=o.length;if(x<2)return x?Dr(o[0]):[];for(var P=-1,F=it(x);++P<x;)for(var H=o[P],$=-1;++$<x;)$!=P&&(F[P]=ds(F[P]||H,o[$],u,y));return Dr(Xe(F,1),u,y)}function fp(o,u,y){for(var x=-1,P=o.length,F=u.length,H={};++x<P;){var $=x<F?u[x]:e;y(H,o[x],$)}return H}function _u(o){return Te(o)?o:[]}function wu(o){return typeof o=="function"?o:cn}function Fr(o,u){return qt(o)?o:Pu(o,u)?[o]:Up(se(o))}var e2=$t;function Nr(o,u,y){var x=o.length;return y=y===e?x:y,!u&&y>=x?o:Bn(o,u,y)}var hp=W1||function(o){return Ke.clearTimeout(o)};function dp(o,u){if(u)return o.slice();var y=o.length,x=Bd?Bd(y):new o.constructor(y);return o.copy(x),x}function xu(o){var u=new o.constructor(o.byteLength);return new Ao(u).set(new Ao(o)),u}function n2(o,u){var y=u?xu(o.buffer):o.buffer;return new o.constructor(y,o.byteOffset,o.byteLength)}function r2(o){var u=new o.constructor(o.source,Xh.exec(o));return u.lastIndex=o.lastIndex,u}function i2(o){return fs?he(fs.call(o)):{}}function pp(o,u){var y=u?xu(o.buffer):o.buffer;return new o.constructor(y,o.byteOffset,o.length)}function gp(o,u){if(o!==u){var y=o!==e,x=o===null,P=o===o,F=_n(o),H=u!==e,$=u===null,tt=u===u,gt=_n(u);if(!$&&!gt&&!F&&o>u||F&&H&&tt&&!$&&!gt||x&&H&&tt||!y&&tt||!P)return 1;if(!x&&!F&&!gt&&o<u||gt&&y&&P&&!x&&!F||$&&y&&P||!H&&P||!tt)return-1}return 0}function s2(o,u,y){for(var x=-1,P=o.criteria,F=u.criteria,H=P.length,$=y.length;++x<H;){var tt=gp(P[x],F[x]);if(tt){if(x>=$)return tt;var gt=y[x];return tt*(gt=="desc"?-1:1)}}return o.index-u.index}function mp(o,u,y,x){for(var P=-1,F=o.length,H=y.length,$=-1,tt=u.length,gt=qe(F-H,0),vt=it(tt+gt),wt=!x;++$<tt;)vt[$]=u[$];for(;++P<H;)(wt||P<F)&&(vt[y[P]]=o[P]);for(;gt--;)vt[$++]=o[P++];return vt}function yp(o,u,y,x){for(var P=-1,F=o.length,H=-1,$=y.length,tt=-1,gt=u.length,vt=qe(F-$,0),wt=it(vt+gt),Rt=!x;++P<vt;)wt[P]=o[P];for(var Pt=P;++tt<gt;)wt[Pt+tt]=u[tt];for(;++H<$;)(Rt||P<F)&&(wt[Pt+y[H]]=o[P++]);return wt}function an(o,u){var y=-1,x=o.length;for(u||(u=it(x));++y<x;)u[y]=o[y];return u}function Jn(o,u,y,x){var P=!y;y||(y={});for(var F=-1,H=u.length;++F<H;){var $=u[F],tt=x?x(y[$],o[$],$,y,o):e;tt===e&&(tt=o[$]),P?fr(y,$,tt):hs(y,$,tt)}return y}function o2(o,u){return Jn(o,Cu(o),u)}function a2(o,u){return Jn(o,Pp(o),u)}function Uo(o,u){return function(y,x){var P=qt(y)?h1:Cw,F=u?u():{};return P(y,o,Bt(x,2),F)}}function Li(o){return $t(function(u,y){var x=-1,P=y.length,F=P>1?y[P-1]:e,H=P>2?y[2]:e;for(F=o.length>3&&typeof F=="function"?(P--,F):e,H&&rn(y[0],y[1],H)&&(F=P<3?e:F,P=1),u=he(u);++x<P;){var $=y[x];$&&o(u,$,x,F)}return u})}function vp(o,u){return function(y,x){if(y==null)return y;if(!ln(y))return o(y,x);for(var P=y.length,F=u?P:-1,H=he(y);(u?F--:++F<P)&&x(H[F],F,H)!==!1;);return y}}function bp(o){return function(u,y,x){for(var P=-1,F=he(u),H=x(u),$=H.length;$--;){var tt=H[o?$:++P];if(y(F[tt],tt,F)===!1)break}return u}}function l2(o,u,y){var x=u&b,P=ys(o);function F(){var H=this&&this!==Ke&&this instanceof F?P:o;return H.apply(x?y:this,arguments)}return F}function _p(o){return function(u){u=se(u);var y=Ai(u)?jn(u):e,x=y?y[0]:u.charAt(0),P=y?Nr(y,1).join(""):u.slice(1);return x[o]()+P}}function Ti(o){return function(u){return Gl(vg(yg(u).replace(Z_,"")),o,"")}}function ys(o){return function(){var u=arguments;switch(u.length){case 0:return new o;case 1:return new o(u[0]);case 2:return new o(u[0],u[1]);case 3:return new o(u[0],u[1],u[2]);case 4:return new o(u[0],u[1],u[2],u[3]);case 5:return new o(u[0],u[1],u[2],u[3],u[4]);case 6:return new o(u[0],u[1],u[2],u[3],u[4],u[5]);case 7:return new o(u[0],u[1],u[2],u[3],u[4],u[5],u[6])}var y=Oi(o.prototype),x=o.apply(y,u);return Re(x)?x:y}}function u2(o,u,y){var x=ys(o);function P(){for(var F=arguments.length,H=it(F),$=F,tt=Bi(P);$--;)H[$]=arguments[$];var gt=F<3&&H[0]!==tt&&H[F-1]!==tt?[]:Tr(H,tt);if(F-=gt.length,F<y)return Ap(o,u,qo,P.placeholder,e,H,gt,e,e,y-F);var vt=this&&this!==Ke&&this instanceof P?x:o;return yn(vt,this,H)}return P}function wp(o){return function(u,y,x){var P=he(u);if(!ln(u)){var F=Bt(y,3);u=$e(u),y=function($){return F(P[$],$,P)}}var H=o(u,y,x);return H>-1?P[F?u[H]:H]:e}}function xp(o){return dr(function(u){var y=u.length,x=y,P=Ln.prototype.thru;for(o&&u.reverse();x--;){var F=u[x];if(typeof F!="function")throw new On(a);if(P&&!H&&Vo(F)=="wrapper")var H=new Ln([],!0)}for(x=H?x:y;++x<y;){F=u[x];var $=Vo(F),tt=$=="wrapper"?Ru(F):e;tt&&Ou(tt[0])&&tt[1]==(L|C|M|N)&&!tt[4].length&&tt[9]==1?H=H[Vo(tt[0])].apply(H,tt[3]):H=F.length==1&&Ou(F)?H[$]():H.thru(F)}return function(){var gt=arguments,vt=gt[0];if(H&&gt.length==1&&qt(vt))return H.plant(vt).value();for(var wt=0,Rt=y?u[wt].apply(this,gt):vt;++wt<y;)Rt=u[wt].call(this,Rt);return Rt}})}function qo(o,u,y,x,P,F,H,$,tt,gt){var vt=u&L,wt=u&b,Rt=u&_,Pt=u&(C|w),It=u&Y,zt=Rt?e:ys(o);function Dt(){for(var Gt=arguments.length,Zt=it(Gt),wn=Gt;wn--;)Zt[wn]=arguments[wn];if(Pt)var sn=Bi(Dt),xn=w1(Zt,sn);if(x&&(Zt=mp(Zt,x,P,Pt)),F&&(Zt=yp(Zt,F,H,Pt)),Gt-=xn,Pt&&Gt<gt){var Be=Tr(Zt,sn);return Ap(o,u,qo,Dt.placeholder,y,Zt,Be,$,tt,gt-Gt)}var Wn=wt?y:this,yr=Rt?Wn[o]:o;return Gt=Zt.length,$?Zt=C2(Zt,$):It&&Gt>1&&Zt.reverse(),vt&&tt<Gt&&(Zt.length=tt),this&&this!==Ke&&this instanceof Dt&&(yr=zt||ys(yr)),yr.apply(Wn,Zt)}return Dt}function Sp(o,u){return function(y,x){return Fw(y,o,u(x),{})}}function Wo(o,u){return function(y,x){var P;if(y===e&&x===e)return u;if(y!==e&&(P=y),x!==e){if(P===e)return x;typeof y=="string"||typeof x=="string"?(y=bn(y),x=bn(x)):(y=lp(y),x=lp(x)),P=o(y,x)}return P}}function Su(o){return dr(function(u){return u=Se(u,vn(Bt())),$t(function(y){var x=this;return o(u,function(P){return yn(P,x,y)})})})}function Ho(o,u){u=u===e?" ":bn(u);var y=u.length;if(y<2)return y?mu(u,o):u;var x=mu(u,Co(o/ki(u)));return Ai(u)?Nr(jn(x),0,o).join(""):x.slice(0,o)}function c2(o,u,y,x){var P=u&b,F=ys(o);function H(){for(var $=-1,tt=arguments.length,gt=-1,vt=x.length,wt=it(vt+tt),Rt=this&&this!==Ke&&this instanceof H?F:o;++gt<vt;)wt[gt]=x[gt];for(;tt--;)wt[gt++]=arguments[++$];return yn(Rt,P?y:this,wt)}return H}function Ep(o){return function(u,y,x){return x&&typeof x!="number"&&rn(u,y,x)&&(y=x=e),u=mr(u),y===e?(y=u,u=0):y=mr(y),x=x===e?u<y?1:-1:mr(x),Kw(u,y,x,o)}}function zo(o){return function(u,y){return typeof u=="string"&&typeof y=="string"||(u=Dn(u),y=Dn(y)),o(u,y)}}function Ap(o,u,y,x,P,F,H,$,tt,gt){var vt=u&C,wt=vt?H:e,Rt=vt?e:H,Pt=vt?F:e,It=vt?e:F;u|=vt?M:O,u&=~(vt?O:M),u&A||(u&=-4);var zt=[o,u,P,Pt,wt,It,Rt,$,tt,gt],Dt=y.apply(e,zt);return Ou(o)&&Fp(Dt,zt),Dt.placeholder=x,Np(Dt,o,u)}function Eu(o){var u=Ue[o];return function(y,x){if(y=Dn(y),x=x==null?0:Je(Ht(x),292),x&&Nd(y)){var P=(se(y)+"e").split("e"),F=u(P[0]+"e"+(+P[1]+x));return P=(se(F)+"e").split("e"),+(P[0]+"e"+(+P[1]-x))}return u(y)}}var f2=Ci&&1/bo(new Ci([,-0]))[1]==_t?function(o){return new Ci(o)}:$u;function kp(o){return function(u){var y=Ze(u);return y==St?tu(u):y==ue?M1(u):_1(u,o(u))}}function hr(o,u,y,x,P,F,H,$){var tt=u&_;if(!tt&&typeof o!="function")throw new On(a);var gt=x?x.length:0;if(gt||(u&=-97,x=P=e),H=H===e?H:qe(Ht(H),0),$=$===e?$:Ht($),gt-=P?P.length:0,u&O){var vt=x,wt=P;x=P=e}var Rt=tt?e:Ru(o),Pt=[o,u,y,x,P,vt,wt,F,H,$];if(Rt&&k2(Pt,Rt),o=Pt[0],u=Pt[1],y=Pt[2],x=Pt[3],P=Pt[4],$=Pt[9]=Pt[9]===e?tt?0:o.length:qe(Pt[9]-gt,0),!$&&u&(C|w)&&(u&=-25),!u||u==b)var It=l2(o,u,y);else u==C||u==w?It=u2(o,u,$):(u==M||u==(b|M))&&!P.length?It=c2(o,u,y,x):It=qo.apply(e,Pt);var zt=Rt?op:Fp;return Np(zt(It,Pt),o,u)}function Rp(o,u,y,x){return o===e||qn(o,Mi[y])&&!ae.call(x,y)?u:o}function Mp(o,u,y,x,P,F){return Re(o)&&Re(u)&&(F.set(u,o),Fo(o,u,e,Mp,F),F.delete(u)),o}function h2(o){return _s(o)?e:o}function Cp(o,u,y,x,P,F){var H=y&p,$=o.length,tt=u.length;if($!=tt&&!(H&&tt>$))return!1;var gt=F.get(o),vt=F.get(u);if(gt&&vt)return gt==u&&vt==o;var wt=-1,Rt=!0,Pt=y&v?new ei:e;for(F.set(o,u),F.set(u,o);++wt<$;){var It=o[wt],zt=u[wt];if(x)var Dt=H?x(zt,It,wt,u,o,F):x(It,zt,wt,o,u,F);if(Dt!==e){if(Dt)continue;Rt=!1;break}if(Pt){if(!Yl(u,function(Gt,Zt){if(!os(Pt,Zt)&&(It===Gt||P(It,Gt,y,x,F)))return Pt.push(Zt)})){Rt=!1;break}}else if(!(It===zt||P(It,zt,y,x,F))){Rt=!1;break}}return F.delete(o),F.delete(u),Rt}function d2(o,u,y,x,P,F,H){switch(y){case ye:if(o.byteLength!=u.byteLength||o.byteOffset!=u.byteOffset)return!1;o=o.buffer,u=u.buffer;case Ye:return!(o.byteLength!=u.byteLength||!F(new Ao(o),new Ao(u)));case lt:case mt:case Ft:return qn(+o,+u);case D:return o.name==u.name&&o.message==u.message;case Ce:case te:return o==u+"";case St:var $=tu;case ue:var tt=x&p;if($||($=bo),o.size!=u.size&&!tt)return!1;var gt=H.get(o);if(gt)return gt==u;x|=v,H.set(o,u);var vt=Cp($(o),$(u),x,P,F,H);return H.delete(o),vt;case re:if(fs)return fs.call(o)==fs.call(u)}return!1}function p2(o,u,y,x,P,F){var H=y&p,$=Au(o),tt=$.length,gt=Au(u),vt=gt.length;if(tt!=vt&&!H)return!1;for(var wt=tt;wt--;){var Rt=$[wt];if(!(H?Rt in u:ae.call(u,Rt)))return!1}var Pt=F.get(o),It=F.get(u);if(Pt&&It)return Pt==u&&It==o;var zt=!0;F.set(o,u),F.set(u,o);for(var Dt=H;++wt<tt;){Rt=$[wt];var Gt=o[Rt],Zt=u[Rt];if(x)var wn=H?x(Zt,Gt,Rt,u,o,F):x(Gt,Zt,Rt,o,u,F);if(!(wn===e?Gt===Zt||P(Gt,Zt,y,x,F):wn)){zt=!1;break}Dt||(Dt=Rt=="constructor")}if(zt&&!Dt){var sn=o.constructor,xn=u.constructor;sn!=xn&&"constructor"in o&&"constructor"in u&&!(typeof sn=="function"&&sn instanceof sn&&typeof xn=="function"&&xn instanceof xn)&&(zt=!1)}return F.delete(o),F.delete(u),zt}function dr(o){return Tu(Ip(o,e,zp),o+"")}function Au(o){return Kd(o,$e,Cu)}function ku(o){return Kd(o,un,Pp)}var Ru=Oo?function(o){return Oo.get(o)}:$u;function Vo(o){for(var u=o.name+"",y=Pi[u],x=ae.call(Pi,u)?y.length:0;x--;){var P=y[x],F=P.func;if(F==null||F==o)return P.name}return u}function Bi(o){var u=ae.call(I,"placeholder")?I:o;return u.placeholder}function Bt(){var o=I.iteratee||zu;return o=o===zu?Zd:o,arguments.length?o(arguments[0],arguments[1]):o}function $o(o,u){var y=o.__data__;return x2(u)?y[typeof u=="string"?"string":"hash"]:y.map}function Mu(o){for(var u=$e(o),y=u.length;y--;){var x=u[y],P=o[x];u[y]=[x,P,Tp(P)]}return u}function ii(o,u){var y=A1(o,u);return Jd(y)?y:e}function g2(o){var u=ae.call(o,Qr),y=o[Qr];try{o[Qr]=e;var x=!0}catch{}var P=So.call(o);return x&&(u?o[Qr]=y:delete o[Qr]),P}var Cu=nu?function(o){return o==null?[]:(o=he(o),Or(nu(o),function(u){return Dd.call(o,u)}))}:Gu,Pp=nu?function(o){for(var u=[];o;)Lr(u,Cu(o)),o=ko(o);return u}:Gu,Ze=nn;(ru&&Ze(new ru(new ArrayBuffer(1)))!=ye||ls&&Ze(new ls)!=St||iu&&Ze(iu.resolve())!=je||Ci&&Ze(new Ci)!=ue||us&&Ze(new us)!=ke)&&(Ze=function(o){var u=nn(o),y=u==Tt?o.constructor:e,x=y?si(y):"";if(x)switch(x){case J1:return ye;case Z1:return St;case Q1:return je;case tw:return ue;case ew:return ke}return u});function m2(o,u,y){for(var x=-1,P=y.length;++x<P;){var F=y[x],H=F.size;switch(F.type){case"drop":o+=H;break;case"dropRight":u-=H;break;case"take":u=Je(u,o+H);break;case"takeRight":o=qe(o,u-H);break}}return{start:o,end:u}}function y2(o){var u=o.match(we);return u?u[1].split(pe):[]}function Op(o,u,y){u=Fr(u,o);for(var x=-1,P=u.length,F=!1;++x<P;){var H=Zn(u[x]);if(!(F=o!=null&&y(o,H)))break;o=o[H]}return F||++x!=P?F:(P=o==null?0:o.length,!!P&&Qo(P)&&pr(H,P)&&(qt(o)||oi(o)))}function v2(o){var u=o.length,y=new o.constructor(u);return u&&typeof o[0]=="string"&&ae.call(o,"index")&&(y.index=o.index,y.input=o.input),y}function Lp(o){return typeof o.constructor=="function"&&!vs(o)?Oi(ko(o)):{}}function b2(o,u,y){var x=o.constructor;switch(u){case Ye:return xu(o);case lt:case mt:return new x(+o);case ye:return n2(o,y);case Rn:case T:case S:case k:case q:case K:case nt:case ht:case Ut:return pp(o,y);case St:return new x;case Ft:case te:return new x(o);case Ce:return r2(o);case ue:return new x;case re:return i2(o)}}function _2(o,u){var y=u.length;if(!y)return o;var x=y-1;return u[x]=(y>1?"& ":"")+u[x],u=u.join(y>2?", ":" "),o.replace(Vt,`{
30
+ /* [wrapped with `+u+`] */
31
+ `)}function w2(o){return qt(o)||oi(o)||!!(Fd&&o&&o[Fd])}function pr(o,u){var y=typeof o;return u=u??bt,!!u&&(y=="number"||y!="symbol"&&T_.test(o))&&o>-1&&o%1==0&&o<u}function rn(o,u,y){if(!Re(y))return!1;var x=typeof u;return(x=="number"?ln(y)&&pr(u,y.length):x=="string"&&u in y)?qn(y[u],o):!1}function Pu(o,u){if(qt(o))return!1;var y=typeof o;return y=="number"||y=="symbol"||y=="boolean"||o==null||_n(o)?!0:E.test(o)||!B.test(o)||u!=null&&o in he(u)}function x2(o){var u=typeof o;return u=="string"||u=="number"||u=="symbol"||u=="boolean"?o!=="__proto__":o===null}function Ou(o){var u=Vo(o),y=I[u];if(typeof y!="function"||!(u in Xt.prototype))return!1;if(o===y)return!0;var x=Ru(y);return!!x&&o===x[0]}function S2(o){return!!Td&&Td in o}var E2=wo?gr:Yu;function vs(o){var u=o&&o.constructor,y=typeof u=="function"&&u.prototype||Mi;return o===y}function Tp(o){return o===o&&!Re(o)}function Bp(o,u){return function(y){return y==null?!1:y[o]===u&&(u!==e||o in he(y))}}function A2(o){var u=Jo(o,function(x){return y.size===h&&y.clear(),x}),y=u.cache;return u}function k2(o,u){var y=o[1],x=u[1],P=y|x,F=P<(b|_|L),H=x==L&&y==C||x==L&&y==N&&o[7].length<=u[8]||x==(L|N)&&u[7].length<=u[8]&&y==C;if(!(F||H))return o;x&b&&(o[2]=u[2],P|=y&b?0:A);var $=u[3];if($){var tt=o[3];o[3]=tt?mp(tt,$,u[4]):$,o[4]=tt?Tr(o[3],f):u[4]}return $=u[5],$&&(tt=o[5],o[5]=tt?yp(tt,$,u[6]):$,o[6]=tt?Tr(o[5],f):u[6]),$=u[7],$&&(o[7]=$),x&L&&(o[8]=o[8]==null?u[8]:Je(o[8],u[8])),o[9]==null&&(o[9]=u[9]),o[0]=u[0],o[1]=P,o}function R2(o){var u=[];if(o!=null)for(var y in he(o))u.push(y);return u}function M2(o){return So.call(o)}function Ip(o,u,y){return u=qe(u===e?o.length-1:u,0),function(){for(var x=arguments,P=-1,F=qe(x.length-u,0),H=it(F);++P<F;)H[P]=x[u+P];P=-1;for(var $=it(u+1);++P<u;)$[P]=x[P];return $[u]=y(H),yn(o,this,$)}}function Dp(o,u){return u.length<2?o:ri(o,Bn(u,0,-1))}function C2(o,u){for(var y=o.length,x=Je(u.length,y),P=an(o);x--;){var F=u[x];o[x]=pr(F,y)?P[F]:e}return o}function Lu(o,u){if(!(u==="constructor"&&typeof o[u]=="function")&&u!="__proto__")return o[u]}var Fp=jp(op),bs=z1||function(o,u){return Ke.setTimeout(o,u)},Tu=jp(Zw);function Np(o,u,y){var x=u+"";return Tu(o,_2(x,P2(y2(x),y)))}function jp(o){var u=0,y=0;return function(){var x=Y1(),P=xt-(x-y);if(y=x,P>0){if(++u>=U)return arguments[0]}else u=0;return o.apply(e,arguments)}}function Go(o,u){var y=-1,x=o.length,P=x-1;for(u=u===e?x:u;++y<u;){var F=gu(y,P),H=o[F];o[F]=o[y],o[y]=H}return o.length=u,o}var Up=A2(function(o){var u=[];return o.charCodeAt(0)===46&&u.push(""),o.replace(R,function(y,x,P,F){u.push(P?F.replace(R_,"$1"):x||y)}),u});function Zn(o){if(typeof o=="string"||_n(o))return o;var u=o+"";return u=="0"&&1/o==-1/0?"-0":u}function si(o){if(o!=null){try{return xo.call(o)}catch{}try{return o+""}catch{}}return""}function P2(o,u){return Pn(et,function(y){var x="_."+y[0];u&y[1]&&!yo(o,x)&&o.push(x)}),o.sort()}function qp(o){if(o instanceof Xt)return o.clone();var u=new Ln(o.__wrapped__,o.__chain__);return u.__actions__=an(o.__actions__),u.__index__=o.__index__,u.__values__=o.__values__,u}function O2(o,u,y){(y?rn(o,u,y):u===e)?u=1:u=qe(Ht(u),0);var x=o==null?0:o.length;if(!x||u<1)return[];for(var P=0,F=0,H=it(Co(x/u));P<x;)H[F++]=Bn(o,P,P+=u);return H}function L2(o){for(var u=-1,y=o==null?0:o.length,x=0,P=[];++u<y;){var F=o[u];F&&(P[x++]=F)}return P}function T2(){var o=arguments.length;if(!o)return[];for(var u=it(o-1),y=arguments[0],x=o;x--;)u[x-1]=arguments[x];return Lr(qt(y)?an(y):[y],Xe(u,1))}var B2=$t(function(o,u){return Te(o)?ds(o,Xe(u,1,Te,!0)):[]}),I2=$t(function(o,u){var y=In(u);return Te(y)&&(y=e),Te(o)?ds(o,Xe(u,1,Te,!0),Bt(y,2)):[]}),D2=$t(function(o,u){var y=In(u);return Te(y)&&(y=e),Te(o)?ds(o,Xe(u,1,Te,!0),e,y):[]});function F2(o,u,y){var x=o==null?0:o.length;return x?(u=y||u===e?1:Ht(u),Bn(o,u<0?0:u,x)):[]}function N2(o,u,y){var x=o==null?0:o.length;return x?(u=y||u===e?1:Ht(u),u=x-u,Bn(o,0,u<0?0:u)):[]}function j2(o,u){return o&&o.length?jo(o,Bt(u,3),!0,!0):[]}function U2(o,u){return o&&o.length?jo(o,Bt(u,3),!0):[]}function q2(o,u,y,x){var P=o==null?0:o.length;return P?(y&&typeof y!="number"&&rn(o,u,y)&&(y=0,x=P),Tw(o,u,y,x)):[]}function Wp(o,u,y){var x=o==null?0:o.length;if(!x)return-1;var P=y==null?0:Ht(y);return P<0&&(P=qe(x+P,0)),vo(o,Bt(u,3),P)}function Hp(o,u,y){var x=o==null?0:o.length;if(!x)return-1;var P=x-1;return y!==e&&(P=Ht(y),P=y<0?qe(x+P,0):Je(P,x-1)),vo(o,Bt(u,3),P,!0)}function zp(o){var u=o==null?0:o.length;return u?Xe(o,1):[]}function W2(o){var u=o==null?0:o.length;return u?Xe(o,_t):[]}function H2(o,u){var y=o==null?0:o.length;return y?(u=u===e?1:Ht(u),Xe(o,u)):[]}function z2(o){for(var u=-1,y=o==null?0:o.length,x={};++u<y;){var P=o[u];x[P[0]]=P[1]}return x}function Vp(o){return o&&o.length?o[0]:e}function V2(o,u,y){var x=o==null?0:o.length;if(!x)return-1;var P=y==null?0:Ht(y);return P<0&&(P=qe(x+P,0)),Ei(o,u,P)}function $2(o){var u=o==null?0:o.length;return u?Bn(o,0,-1):[]}var G2=$t(function(o){var u=Se(o,_u);return u.length&&u[0]===o[0]?cu(u):[]}),Y2=$t(function(o){var u=In(o),y=Se(o,_u);return u===In(y)?u=e:y.pop(),y.length&&y[0]===o[0]?cu(y,Bt(u,2)):[]}),K2=$t(function(o){var u=In(o),y=Se(o,_u);return u=typeof u=="function"?u:e,u&&y.pop(),y.length&&y[0]===o[0]?cu(y,e,u):[]});function X2(o,u){return o==null?"":$1.call(o,u)}function In(o){var u=o==null?0:o.length;return u?o[u-1]:e}function J2(o,u,y){var x=o==null?0:o.length;if(!x)return-1;var P=x;return y!==e&&(P=Ht(y),P=P<0?qe(x+P,0):Je(P,x-1)),u===u?P1(o,u,P):vo(o,Ad,P,!0)}function Z2(o,u){return o&&o.length?np(o,Ht(u)):e}var Q2=$t($p);function $p(o,u){return o&&o.length&&u&&u.length?pu(o,u):o}function tx(o,u,y){return o&&o.length&&u&&u.length?pu(o,u,Bt(y,2)):o}function ex(o,u,y){return o&&o.length&&u&&u.length?pu(o,u,e,y):o}var nx=dr(function(o,u){var y=o==null?0:o.length,x=ou(o,u);return sp(o,Se(u,function(P){return pr(P,y)?+P:P}).sort(gp)),x});function rx(o,u){var y=[];if(!(o&&o.length))return y;var x=-1,P=[],F=o.length;for(u=Bt(u,3);++x<F;){var H=o[x];u(H,x,o)&&(y.push(H),P.push(x))}return sp(o,P),y}function Bu(o){return o==null?o:X1.call(o)}function ix(o,u,y){var x=o==null?0:o.length;return x?(y&&typeof y!="number"&&rn(o,u,y)?(u=0,y=x):(u=u==null?0:Ht(u),y=y===e?x:Ht(y)),Bn(o,u,y)):[]}function sx(o,u){return No(o,u)}function ox(o,u,y){return yu(o,u,Bt(y,2))}function ax(o,u){var y=o==null?0:o.length;if(y){var x=No(o,u);if(x<y&&qn(o[x],u))return x}return-1}function lx(o,u){return No(o,u,!0)}function ux(o,u,y){return yu(o,u,Bt(y,2),!0)}function cx(o,u){var y=o==null?0:o.length;if(y){var x=No(o,u,!0)-1;if(qn(o[x],u))return x}return-1}function fx(o){return o&&o.length?ap(o):[]}function hx(o,u){return o&&o.length?ap(o,Bt(u,2)):[]}function dx(o){var u=o==null?0:o.length;return u?Bn(o,1,u):[]}function px(o,u,y){return o&&o.length?(u=y||u===e?1:Ht(u),Bn(o,0,u<0?0:u)):[]}function gx(o,u,y){var x=o==null?0:o.length;return x?(u=y||u===e?1:Ht(u),u=x-u,Bn(o,u<0?0:u,x)):[]}function mx(o,u){return o&&o.length?jo(o,Bt(u,3),!1,!0):[]}function yx(o,u){return o&&o.length?jo(o,Bt(u,3)):[]}var vx=$t(function(o){return Dr(Xe(o,1,Te,!0))}),bx=$t(function(o){var u=In(o);return Te(u)&&(u=e),Dr(Xe(o,1,Te,!0),Bt(u,2))}),_x=$t(function(o){var u=In(o);return u=typeof u=="function"?u:e,Dr(Xe(o,1,Te,!0),e,u)});function wx(o){return o&&o.length?Dr(o):[]}function xx(o,u){return o&&o.length?Dr(o,Bt(u,2)):[]}function Sx(o,u){return u=typeof u=="function"?u:e,o&&o.length?Dr(o,e,u):[]}function Iu(o){if(!(o&&o.length))return[];var u=0;return o=Or(o,function(y){if(Te(y))return u=qe(y.length,u),!0}),Zl(u,function(y){return Se(o,Kl(y))})}function Gp(o,u){if(!(o&&o.length))return[];var y=Iu(o);return u==null?y:Se(y,function(x){return yn(u,e,x)})}var Ex=$t(function(o,u){return Te(o)?ds(o,u):[]}),Ax=$t(function(o){return bu(Or(o,Te))}),kx=$t(function(o){var u=In(o);return Te(u)&&(u=e),bu(Or(o,Te),Bt(u,2))}),Rx=$t(function(o){var u=In(o);return u=typeof u=="function"?u:e,bu(Or(o,Te),e,u)}),Mx=$t(Iu);function Cx(o,u){return fp(o||[],u||[],hs)}function Px(o,u){return fp(o||[],u||[],ms)}var Ox=$t(function(o){var u=o.length,y=u>1?o[u-1]:e;return y=typeof y=="function"?(o.pop(),y):e,Gp(o,y)});function Yp(o){var u=I(o);return u.__chain__=!0,u}function Lx(o,u){return u(o),o}function Yo(o,u){return u(o)}var Tx=dr(function(o){var u=o.length,y=u?o[0]:0,x=this.__wrapped__,P=function(F){return ou(F,o)};return u>1||this.__actions__.length||!(x instanceof Xt)||!pr(y)?this.thru(P):(x=x.slice(y,+y+(u?1:0)),x.__actions__.push({func:Yo,args:[P],thisArg:e}),new Ln(x,this.__chain__).thru(function(F){return u&&!F.length&&F.push(e),F}))});function Bx(){return Yp(this)}function Ix(){return new Ln(this.value(),this.__chain__)}function Dx(){this.__values__===e&&(this.__values__=lg(this.value()));var o=this.__index__>=this.__values__.length,u=o?e:this.__values__[this.__index__++];return{done:o,value:u}}function Fx(){return this}function Nx(o){for(var u,y=this;y instanceof To;){var x=qp(y);x.__index__=0,x.__values__=e,u?P.__wrapped__=x:u=x;var P=x;y=y.__wrapped__}return P.__wrapped__=o,u}function jx(){var o=this.__wrapped__;if(o instanceof Xt){var u=o;return this.__actions__.length&&(u=new Xt(this)),u=u.reverse(),u.__actions__.push({func:Yo,args:[Bu],thisArg:e}),new Ln(u,this.__chain__)}return this.thru(Bu)}function Ux(){return cp(this.__wrapped__,this.__actions__)}var qx=Uo(function(o,u,y){ae.call(o,y)?++o[y]:fr(o,y,1)});function Wx(o,u,y){var x=qt(o)?Sd:Lw;return y&&rn(o,u,y)&&(u=e),x(o,Bt(u,3))}function Hx(o,u){var y=qt(o)?Or:Gd;return y(o,Bt(u,3))}var zx=wp(Wp),Vx=wp(Hp);function $x(o,u){return Xe(Ko(o,u),1)}function Gx(o,u){return Xe(Ko(o,u),_t)}function Yx(o,u,y){return y=y===e?1:Ht(y),Xe(Ko(o,u),y)}function Kp(o,u){var y=qt(o)?Pn:Ir;return y(o,Bt(u,3))}function Xp(o,u){var y=qt(o)?d1:$d;return y(o,Bt(u,3))}var Kx=Uo(function(o,u,y){ae.call(o,y)?o[y].push(u):fr(o,y,[u])});function Xx(o,u,y,x){o=ln(o)?o:Di(o),y=y&&!x?Ht(y):0;var P=o.length;return y<0&&(y=qe(P+y,0)),ta(o)?y<=P&&o.indexOf(u,y)>-1:!!P&&Ei(o,u,y)>-1}var Jx=$t(function(o,u,y){var x=-1,P=typeof u=="function",F=ln(o)?it(o.length):[];return Ir(o,function(H){F[++x]=P?yn(u,H,y):ps(H,u,y)}),F}),Zx=Uo(function(o,u,y){fr(o,y,u)});function Ko(o,u){var y=qt(o)?Se:Qd;return y(o,Bt(u,3))}function Qx(o,u,y,x){return o==null?[]:(qt(u)||(u=u==null?[]:[u]),y=x?e:y,qt(y)||(y=y==null?[]:[y]),rp(o,u,y))}var tS=Uo(function(o,u,y){o[y?0:1].push(u)},function(){return[[],[]]});function eS(o,u,y){var x=qt(o)?Gl:Rd,P=arguments.length<3;return x(o,Bt(u,4),y,P,Ir)}function nS(o,u,y){var x=qt(o)?p1:Rd,P=arguments.length<3;return x(o,Bt(u,4),y,P,$d)}function rS(o,u){var y=qt(o)?Or:Gd;return y(o,Zo(Bt(u,3)))}function iS(o){var u=qt(o)?Wd:Xw;return u(o)}function sS(o,u,y){(y?rn(o,u,y):u===e)?u=1:u=Ht(u);var x=qt(o)?Rw:Jw;return x(o,u)}function oS(o){var u=qt(o)?Mw:Qw;return u(o)}function aS(o){if(o==null)return 0;if(ln(o))return ta(o)?ki(o):o.length;var u=Ze(o);return u==St||u==ue?o.size:hu(o).length}function lS(o,u,y){var x=qt(o)?Yl:t2;return y&&rn(o,u,y)&&(u=e),x(o,Bt(u,3))}var uS=$t(function(o,u){if(o==null)return[];var y=u.length;return y>1&&rn(o,u[0],u[1])?u=[]:y>2&&rn(u[0],u[1],u[2])&&(u=[u[0]]),rp(o,Xe(u,1),[])}),Xo=H1||function(){return Ke.Date.now()};function cS(o,u){if(typeof u!="function")throw new On(a);return o=Ht(o),function(){if(--o<1)return u.apply(this,arguments)}}function Jp(o,u,y){return u=y?e:u,u=o&&u==null?o.length:u,hr(o,L,e,e,e,e,u)}function Zp(o,u){var y;if(typeof u!="function")throw new On(a);return o=Ht(o),function(){return--o>0&&(y=u.apply(this,arguments)),o<=1&&(u=e),y}}var Du=$t(function(o,u,y){var x=b;if(y.length){var P=Tr(y,Bi(Du));x|=M}return hr(o,x,u,y,P)}),Qp=$t(function(o,u,y){var x=b|_;if(y.length){var P=Tr(y,Bi(Qp));x|=M}return hr(u,x,o,y,P)});function tg(o,u,y){u=y?e:u;var x=hr(o,C,e,e,e,e,e,u);return x.placeholder=tg.placeholder,x}function eg(o,u,y){u=y?e:u;var x=hr(o,w,e,e,e,e,e,u);return x.placeholder=eg.placeholder,x}function ng(o,u,y){var x,P,F,H,$,tt,gt=0,vt=!1,wt=!1,Rt=!0;if(typeof o!="function")throw new On(a);u=Dn(u)||0,Re(y)&&(vt=!!y.leading,wt="maxWait"in y,F=wt?qe(Dn(y.maxWait)||0,u):F,Rt="trailing"in y?!!y.trailing:Rt);function Pt(Be){var Wn=x,yr=P;return x=P=e,gt=Be,H=o.apply(yr,Wn),H}function It(Be){return gt=Be,$=bs(Gt,u),vt?Pt(Be):H}function zt(Be){var Wn=Be-tt,yr=Be-gt,wg=u-Wn;return wt?Je(wg,F-yr):wg}function Dt(Be){var Wn=Be-tt,yr=Be-gt;return tt===e||Wn>=u||Wn<0||wt&&yr>=F}function Gt(){var Be=Xo();if(Dt(Be))return Zt(Be);$=bs(Gt,zt(Be))}function Zt(Be){return $=e,Rt&&x?Pt(Be):(x=P=e,H)}function wn(){$!==e&&hp($),gt=0,x=tt=P=$=e}function sn(){return $===e?H:Zt(Xo())}function xn(){var Be=Xo(),Wn=Dt(Be);if(x=arguments,P=this,tt=Be,Wn){if($===e)return It(tt);if(wt)return hp($),$=bs(Gt,u),Pt(tt)}return $===e&&($=bs(Gt,u)),H}return xn.cancel=wn,xn.flush=sn,xn}var fS=$t(function(o,u){return Vd(o,1,u)}),hS=$t(function(o,u,y){return Vd(o,Dn(u)||0,y)});function dS(o){return hr(o,Y)}function Jo(o,u){if(typeof o!="function"||u!=null&&typeof u!="function")throw new On(a);var y=function(){var x=arguments,P=u?u.apply(this,x):x[0],F=y.cache;if(F.has(P))return F.get(P);var H=o.apply(this,x);return y.cache=F.set(P,H)||F,H};return y.cache=new(Jo.Cache||cr),y}Jo.Cache=cr;function Zo(o){if(typeof o!="function")throw new On(a);return function(){var u=arguments;switch(u.length){case 0:return!o.call(this);case 1:return!o.call(this,u[0]);case 2:return!o.call(this,u[0],u[1]);case 3:return!o.call(this,u[0],u[1],u[2])}return!o.apply(this,u)}}function pS(o){return Zp(2,o)}var gS=e2(function(o,u){u=u.length==1&&qt(u[0])?Se(u[0],vn(Bt())):Se(Xe(u,1),vn(Bt()));var y=u.length;return $t(function(x){for(var P=-1,F=Je(x.length,y);++P<F;)x[P]=u[P].call(this,x[P]);return yn(o,this,x)})}),Fu=$t(function(o,u){var y=Tr(u,Bi(Fu));return hr(o,M,e,u,y)}),rg=$t(function(o,u){var y=Tr(u,Bi(rg));return hr(o,O,e,u,y)}),mS=dr(function(o,u){return hr(o,N,e,e,e,u)});function yS(o,u){if(typeof o!="function")throw new On(a);return u=u===e?u:Ht(u),$t(o,u)}function vS(o,u){if(typeof o!="function")throw new On(a);return u=u==null?0:qe(Ht(u),0),$t(function(y){var x=y[u],P=Nr(y,0,u);return x&&Lr(P,x),yn(o,this,P)})}function bS(o,u,y){var x=!0,P=!0;if(typeof o!="function")throw new On(a);return Re(y)&&(x="leading"in y?!!y.leading:x,P="trailing"in y?!!y.trailing:P),ng(o,u,{leading:x,maxWait:u,trailing:P})}function _S(o){return Jp(o,1)}function wS(o,u){return Fu(wu(u),o)}function xS(){if(!arguments.length)return[];var o=arguments[0];return qt(o)?o:[o]}function SS(o){return Tn(o,m)}function ES(o,u){return u=typeof u=="function"?u:e,Tn(o,m,u)}function AS(o){return Tn(o,g|m)}function kS(o,u){return u=typeof u=="function"?u:e,Tn(o,g|m,u)}function RS(o,u){return u==null||zd(o,u,$e(u))}function qn(o,u){return o===u||o!==o&&u!==u}var MS=zo(uu),CS=zo(function(o,u){return o>=u}),oi=Xd(function(){return arguments}())?Xd:function(o){return Pe(o)&&ae.call(o,"callee")&&!Dd.call(o,"callee")},qt=it.isArray,PS=yd?vn(yd):Nw;function ln(o){return o!=null&&Qo(o.length)&&!gr(o)}function Te(o){return Pe(o)&&ln(o)}function OS(o){return o===!0||o===!1||Pe(o)&&nn(o)==lt}var jr=V1||Yu,LS=vd?vn(vd):jw;function TS(o){return Pe(o)&&o.nodeType===1&&!_s(o)}function BS(o){if(o==null)return!0;if(ln(o)&&(qt(o)||typeof o=="string"||typeof o.splice=="function"||jr(o)||Ii(o)||oi(o)))return!o.length;var u=Ze(o);if(u==St||u==ue)return!o.size;if(vs(o))return!hu(o).length;for(var y in o)if(ae.call(o,y))return!1;return!0}function IS(o,u){return gs(o,u)}function DS(o,u,y){y=typeof y=="function"?y:e;var x=y?y(o,u):e;return x===e?gs(o,u,e,y):!!x}function Nu(o){if(!Pe(o))return!1;var u=nn(o);return u==D||u==yt||typeof o.message=="string"&&typeof o.name=="string"&&!_s(o)}function FS(o){return typeof o=="number"&&Nd(o)}function gr(o){if(!Re(o))return!1;var u=nn(o);return u==j||u==ut||u==X||u==ft}function ig(o){return typeof o=="number"&&o==Ht(o)}function Qo(o){return typeof o=="number"&&o>-1&&o%1==0&&o<=bt}function Re(o){var u=typeof o;return o!=null&&(u=="object"||u=="function")}function Pe(o){return o!=null&&typeof o=="object"}var sg=bd?vn(bd):qw;function NS(o,u){return o===u||fu(o,u,Mu(u))}function jS(o,u,y){return y=typeof y=="function"?y:e,fu(o,u,Mu(u),y)}function US(o){return og(o)&&o!=+o}function qS(o){if(E2(o))throw new jt(s);return Jd(o)}function WS(o){return o===null}function HS(o){return o==null}function og(o){return typeof o=="number"||Pe(o)&&nn(o)==Ft}function _s(o){if(!Pe(o)||nn(o)!=Tt)return!1;var u=ko(o);if(u===null)return!0;var y=ae.call(u,"constructor")&&u.constructor;return typeof y=="function"&&y instanceof y&&xo.call(y)==j1}var ju=_d?vn(_d):Ww;function zS(o){return ig(o)&&o>=-9007199254740991&&o<=bt}var ag=wd?vn(wd):Hw;function ta(o){return typeof o=="string"||!qt(o)&&Pe(o)&&nn(o)==te}function _n(o){return typeof o=="symbol"||Pe(o)&&nn(o)==re}var Ii=xd?vn(xd):zw;function VS(o){return o===e}function $S(o){return Pe(o)&&Ze(o)==ke}function GS(o){return Pe(o)&&nn(o)==on}var YS=zo(du),KS=zo(function(o,u){return o<=u});function lg(o){if(!o)return[];if(ln(o))return ta(o)?jn(o):an(o);if(as&&o[as])return R1(o[as]());var u=Ze(o),y=u==St?tu:u==ue?bo:Di;return y(o)}function mr(o){if(!o)return o===0?o:0;if(o=Dn(o),o===_t||o===-1/0){var u=o<0?-1:1;return u*Et}return o===o?o:0}function Ht(o){var u=mr(o),y=u%1;return u===u?y?u-y:u:0}function ug(o){return o?ni(Ht(o),0,Ot):0}function Dn(o){if(typeof o=="number")return o;if(_n(o))return kt;if(Re(o)){var u=typeof o.valueOf=="function"?o.valueOf():o;o=Re(u)?u+"":u}if(typeof o!="string")return o===0?o:+o;o=Md(o);var y=P_.test(o);return y||L_.test(o)?c1(o.slice(2),y?2:8):C_.test(o)?kt:+o}function cg(o){return Jn(o,un(o))}function XS(o){return o?ni(Ht(o),-9007199254740991,bt):o===0?o:0}function se(o){return o==null?"":bn(o)}var JS=Li(function(o,u){if(vs(u)||ln(u)){Jn(u,$e(u),o);return}for(var y in u)ae.call(u,y)&&hs(o,y,u[y])}),fg=Li(function(o,u){Jn(u,un(u),o)}),ea=Li(function(o,u,y,x){Jn(u,un(u),o,x)}),ZS=Li(function(o,u,y,x){Jn(u,$e(u),o,x)}),QS=dr(ou);function tE(o,u){var y=Oi(o);return u==null?y:Hd(y,u)}var eE=$t(function(o,u){o=he(o);var y=-1,x=u.length,P=x>2?u[2]:e;for(P&&rn(u[0],u[1],P)&&(x=1);++y<x;)for(var F=u[y],H=un(F),$=-1,tt=H.length;++$<tt;){var gt=H[$],vt=o[gt];(vt===e||qn(vt,Mi[gt])&&!ae.call(o,gt))&&(o[gt]=F[gt])}return o}),nE=$t(function(o){return o.push(e,Mp),yn(hg,e,o)});function rE(o,u){return Ed(o,Bt(u,3),Xn)}function iE(o,u){return Ed(o,Bt(u,3),lu)}function sE(o,u){return o==null?o:au(o,Bt(u,3),un)}function oE(o,u){return o==null?o:Yd(o,Bt(u,3),un)}function aE(o,u){return o&&Xn(o,Bt(u,3))}function lE(o,u){return o&&lu(o,Bt(u,3))}function uE(o){return o==null?[]:Do(o,$e(o))}function cE(o){return o==null?[]:Do(o,un(o))}function Uu(o,u,y){var x=o==null?e:ri(o,u);return x===e?y:x}function fE(o,u){return o!=null&&Op(o,u,Bw)}function qu(o,u){return o!=null&&Op(o,u,Iw)}var hE=Sp(function(o,u,y){u!=null&&typeof u.toString!="function"&&(u=So.call(u)),o[u]=y},Hu(cn)),dE=Sp(function(o,u,y){u!=null&&typeof u.toString!="function"&&(u=So.call(u)),ae.call(o,u)?o[u].push(y):o[u]=[y]},Bt),pE=$t(ps);function $e(o){return ln(o)?qd(o):hu(o)}function un(o){return ln(o)?qd(o,!0):Vw(o)}function gE(o,u){var y={};return u=Bt(u,3),Xn(o,function(x,P,F){fr(y,u(x,P,F),x)}),y}function mE(o,u){var y={};return u=Bt(u,3),Xn(o,function(x,P,F){fr(y,P,u(x,P,F))}),y}var yE=Li(function(o,u,y){Fo(o,u,y)}),hg=Li(function(o,u,y,x){Fo(o,u,y,x)}),vE=dr(function(o,u){var y={};if(o==null)return y;var x=!1;u=Se(u,function(F){return F=Fr(F,o),x||(x=F.length>1),F}),Jn(o,ku(o),y),x&&(y=Tn(y,g|d|m,h2));for(var P=u.length;P--;)vu(y,u[P]);return y});function bE(o,u){return dg(o,Zo(Bt(u)))}var _E=dr(function(o,u){return o==null?{}:Gw(o,u)});function dg(o,u){if(o==null)return{};var y=Se(ku(o),function(x){return[x]});return u=Bt(u),ip(o,y,function(x,P){return u(x,P[0])})}function wE(o,u,y){u=Fr(u,o);var x=-1,P=u.length;for(P||(P=1,o=e);++x<P;){var F=o==null?e:o[Zn(u[x])];F===e&&(x=P,F=y),o=gr(F)?F.call(o):F}return o}function xE(o,u,y){return o==null?o:ms(o,u,y)}function SE(o,u,y,x){return x=typeof x=="function"?x:e,o==null?o:ms(o,u,y,x)}var pg=kp($e),gg=kp(un);function EE(o,u,y){var x=qt(o),P=x||jr(o)||Ii(o);if(u=Bt(u,4),y==null){var F=o&&o.constructor;P?y=x?new F:[]:Re(o)?y=gr(F)?Oi(ko(o)):{}:y={}}return(P?Pn:Xn)(o,function(H,$,tt){return u(y,H,$,tt)}),y}function AE(o,u){return o==null?!0:vu(o,u)}function kE(o,u,y){return o==null?o:up(o,u,wu(y))}function RE(o,u,y,x){return x=typeof x=="function"?x:e,o==null?o:up(o,u,wu(y),x)}function Di(o){return o==null?[]:Ql(o,$e(o))}function ME(o){return o==null?[]:Ql(o,un(o))}function CE(o,u,y){return y===e&&(y=u,u=e),y!==e&&(y=Dn(y),y=y===y?y:0),u!==e&&(u=Dn(u),u=u===u?u:0),ni(Dn(o),u,y)}function PE(o,u,y){return u=mr(u),y===e?(y=u,u=0):y=mr(y),o=Dn(o),Dw(o,u,y)}function OE(o,u,y){if(y&&typeof y!="boolean"&&rn(o,u,y)&&(u=y=e),y===e&&(typeof u=="boolean"?(y=u,u=e):typeof o=="boolean"&&(y=o,o=e)),o===e&&u===e?(o=0,u=1):(o=mr(o),u===e?(u=o,o=0):u=mr(u)),o>u){var x=o;o=u,u=x}if(y||o%1||u%1){var P=jd();return Je(o+P*(u-o+u1("1e-"+((P+"").length-1))),u)}return gu(o,u)}var LE=Ti(function(o,u,y){return u=u.toLowerCase(),o+(y?mg(u):u)});function mg(o){return Wu(se(o).toLowerCase())}function yg(o){return o=se(o),o&&o.replace(B_,x1).replace(Q_,"")}function TE(o,u,y){o=se(o),u=bn(u);var x=o.length;y=y===e?x:ni(Ht(y),0,x);var P=y;return y-=u.length,y>=0&&o.slice(y,P)==u}function BE(o){return o=se(o),o&&ss.test(o)?o.replace(Jr,S1):o}function IE(o){return o=se(o),o&&J.test(o)?o.replace(W,"\\$&"):o}var DE=Ti(function(o,u,y){return o+(y?"-":"")+u.toLowerCase()}),FE=Ti(function(o,u,y){return o+(y?" ":"")+u.toLowerCase()}),NE=_p("toLowerCase");function jE(o,u,y){o=se(o),u=Ht(u);var x=u?ki(o):0;if(!u||x>=u)return o;var P=(u-x)/2;return Ho(Po(P),y)+o+Ho(Co(P),y)}function UE(o,u,y){o=se(o),u=Ht(u);var x=u?ki(o):0;return u&&x<u?o+Ho(u-x,y):o}function qE(o,u,y){o=se(o),u=Ht(u);var x=u?ki(o):0;return u&&x<u?Ho(u-x,y)+o:o}function WE(o,u,y){return y||u==null?u=0:u&&(u=+u),K1(se(o).replace(rt,""),u||0)}function HE(o,u,y){return(y?rn(o,u,y):u===e)?u=1:u=Ht(u),mu(se(o),u)}function zE(){var o=arguments,u=se(o[0]);return o.length<3?u:u.replace(o[1],o[2])}var VE=Ti(function(o,u,y){return o+(y?"_":"")+u.toLowerCase()});function $E(o,u,y){return y&&typeof y!="number"&&rn(o,u,y)&&(u=y=e),y=y===e?Ot:y>>>0,y?(o=se(o),o&&(typeof u=="string"||u!=null&&!ju(u))&&(u=bn(u),!u&&Ai(o))?Nr(jn(o),0,y):o.split(u,y)):[]}var GE=Ti(function(o,u,y){return o+(y?" ":"")+Wu(u)});function YE(o,u,y){return o=se(o),y=y==null?0:ni(Ht(y),0,o.length),u=bn(u),o.slice(y,y+u.length)==u}function KE(o,u,y){var x=I.templateSettings;y&&rn(o,u,y)&&(u=e),o=se(o),u=ea({},u,x,Rp);var P=ea({},u.imports,x.imports,Rp),F=$e(P),H=Ql(P,F),$,tt,gt=0,vt=u.interpolate||po,wt="__p += '",Rt=eu((u.escape||po).source+"|"+vt.source+"|"+(vt===ho?M_:po).source+"|"+(u.evaluate||po).source+"|$","g"),Pt="//# sourceURL="+(ae.call(u,"sourceURL")?(u.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++i1+"]")+`
32
+ `;o.replace(Rt,function(Dt,Gt,Zt,wn,sn,xn){return Zt||(Zt=wn),wt+=o.slice(gt,xn).replace(I_,E1),Gt&&($=!0,wt+=`' +
33
+ __e(`+Gt+`) +
34
+ '`),sn&&(tt=!0,wt+=`';
35
+ `+sn+`;
36
+ __p += '`),Zt&&(wt+=`' +
37
+ ((__t = (`+Zt+`)) == null ? '' : __t) +
38
+ '`),gt=xn+Dt.length,Dt}),wt+=`';
39
+ `;var It=ae.call(u,"variable")&&u.variable;if(!It)wt=`with (obj) {
40
+ `+wt+`
41
+ }
42
+ `;else if(oe.test(It))throw new jt(l);wt=(tt?wt.replace(ce,""):wt).replace(fe,"$1").replace(de,"$1;"),wt="function("+(It||"obj")+`) {
43
+ `+(It?"":`obj || (obj = {});
44
+ `)+"var __t, __p = ''"+($?", __e = _.escape":"")+(tt?`, __j = Array.prototype.join;
45
+ function print() { __p += __j.call(arguments, '') }
46
+ `:`;
47
+ `)+wt+`return __p
48
+ }`;var zt=bg(function(){return ie(F,Pt+"return "+wt).apply(e,H)});if(zt.source=wt,Nu(zt))throw zt;return zt}function XE(o){return se(o).toLowerCase()}function JE(o){return se(o).toUpperCase()}function ZE(o,u,y){if(o=se(o),o&&(y||u===e))return Md(o);if(!o||!(u=bn(u)))return o;var x=jn(o),P=jn(u),F=Cd(x,P),H=Pd(x,P)+1;return Nr(x,F,H).join("")}function QE(o,u,y){if(o=se(o),o&&(y||u===e))return o.slice(0,Ld(o)+1);if(!o||!(u=bn(u)))return o;var x=jn(o),P=Pd(x,jn(u))+1;return Nr(x,0,P).join("")}function tA(o,u,y){if(o=se(o),o&&(y||u===e))return o.replace(rt,"");if(!o||!(u=bn(u)))return o;var x=jn(o),P=Cd(x,jn(u));return Nr(x,P).join("")}function eA(o,u){var y=z,x=G;if(Re(u)){var P="separator"in u?u.separator:P;y="length"in u?Ht(u.length):y,x="omission"in u?bn(u.omission):x}o=se(o);var F=o.length;if(Ai(o)){var H=jn(o);F=H.length}if(y>=F)return o;var $=y-ki(x);if($<1)return x;var tt=H?Nr(H,0,$).join(""):o.slice(0,$);if(P===e)return tt+x;if(H&&($+=tt.length-$),ju(P)){if(o.slice($).search(P)){var gt,vt=tt;for(P.global||(P=eu(P.source,se(Xh.exec(P))+"g")),P.lastIndex=0;gt=P.exec(vt);)var wt=gt.index;tt=tt.slice(0,wt===e?$:wt)}}else if(o.indexOf(bn(P),$)!=$){var Rt=tt.lastIndexOf(P);Rt>-1&&(tt=tt.slice(0,Rt))}return tt+x}function nA(o){return o=se(o),o&&Mn.test(o)?o.replace(ne,O1):o}var rA=Ti(function(o,u,y){return o+(y?" ":"")+u.toUpperCase()}),Wu=_p("toUpperCase");function vg(o,u,y){return o=se(o),u=y?e:u,u===e?k1(o)?B1(o):y1(o):o.match(u)||[]}var bg=$t(function(o,u){try{return yn(o,e,u)}catch(y){return Nu(y)?y:new jt(y)}}),iA=dr(function(o,u){return Pn(u,function(y){y=Zn(y),fr(o,y,Du(o[y],o))}),o});function sA(o){var u=o==null?0:o.length,y=Bt();return o=u?Se(o,function(x){if(typeof x[1]!="function")throw new On(a);return[y(x[0]),x[1]]}):[],$t(function(x){for(var P=-1;++P<u;){var F=o[P];if(yn(F[0],this,x))return yn(F[1],this,x)}})}function oA(o){return Ow(Tn(o,g))}function Hu(o){return function(){return o}}function aA(o,u){return o==null||o!==o?u:o}var lA=xp(),uA=xp(!0);function cn(o){return o}function zu(o){return Zd(typeof o=="function"?o:Tn(o,g))}function cA(o){return tp(Tn(o,g))}function fA(o,u){return ep(o,Tn(u,g))}var hA=$t(function(o,u){return function(y){return ps(y,o,u)}}),dA=$t(function(o,u){return function(y){return ps(o,y,u)}});function Vu(o,u,y){var x=$e(u),P=Do(u,x);y==null&&!(Re(u)&&(P.length||!x.length))&&(y=u,u=o,o=this,P=Do(u,$e(u)));var F=!(Re(y)&&"chain"in y)||!!y.chain,H=gr(o);return Pn(P,function($){var tt=u[$];o[$]=tt,H&&(o.prototype[$]=function(){var gt=this.__chain__;if(F||gt){var vt=o(this.__wrapped__),wt=vt.__actions__=an(this.__actions__);return wt.push({func:tt,args:arguments,thisArg:o}),vt.__chain__=gt,vt}return tt.apply(o,Lr([this.value()],arguments))})}),o}function pA(){return Ke._===this&&(Ke._=U1),this}function $u(){}function gA(o){return o=Ht(o),$t(function(u){return np(u,o)})}var mA=Su(Se),yA=Su(Sd),vA=Su(Yl);function _g(o){return Pu(o)?Kl(Zn(o)):Yw(o)}function bA(o){return function(u){return o==null?e:ri(o,u)}}var _A=Ep(),wA=Ep(!0);function Gu(){return[]}function Yu(){return!1}function xA(){return{}}function SA(){return""}function EA(){return!0}function AA(o,u){if(o=Ht(o),o<1||o>bt)return[];var y=Ot,x=Je(o,Ot);u=Bt(u),o-=Ot;for(var P=Zl(x,u);++y<o;)u(y);return P}function kA(o){return qt(o)?Se(o,Zn):_n(o)?[o]:an(Up(se(o)))}function RA(o){var u=++N1;return se(o)+u}var MA=Wo(function(o,u){return o+u},0),CA=Eu("ceil"),PA=Wo(function(o,u){return o/u},1),OA=Eu("floor");function LA(o){return o&&o.length?Io(o,cn,uu):e}function TA(o,u){return o&&o.length?Io(o,Bt(u,2),uu):e}function BA(o){return kd(o,cn)}function IA(o,u){return kd(o,Bt(u,2))}function DA(o){return o&&o.length?Io(o,cn,du):e}function FA(o,u){return o&&o.length?Io(o,Bt(u,2),du):e}var NA=Wo(function(o,u){return o*u},1),jA=Eu("round"),UA=Wo(function(o,u){return o-u},0);function qA(o){return o&&o.length?Jl(o,cn):0}function WA(o,u){return o&&o.length?Jl(o,Bt(u,2)):0}return I.after=cS,I.ary=Jp,I.assign=JS,I.assignIn=fg,I.assignInWith=ea,I.assignWith=ZS,I.at=QS,I.before=Zp,I.bind=Du,I.bindAll=iA,I.bindKey=Qp,I.castArray=xS,I.chain=Yp,I.chunk=O2,I.compact=L2,I.concat=T2,I.cond=sA,I.conforms=oA,I.constant=Hu,I.countBy=qx,I.create=tE,I.curry=tg,I.curryRight=eg,I.debounce=ng,I.defaults=eE,I.defaultsDeep=nE,I.defer=fS,I.delay=hS,I.difference=B2,I.differenceBy=I2,I.differenceWith=D2,I.drop=F2,I.dropRight=N2,I.dropRightWhile=j2,I.dropWhile=U2,I.fill=q2,I.filter=Hx,I.flatMap=$x,I.flatMapDeep=Gx,I.flatMapDepth=Yx,I.flatten=zp,I.flattenDeep=W2,I.flattenDepth=H2,I.flip=dS,I.flow=lA,I.flowRight=uA,I.fromPairs=z2,I.functions=uE,I.functionsIn=cE,I.groupBy=Kx,I.initial=$2,I.intersection=G2,I.intersectionBy=Y2,I.intersectionWith=K2,I.invert=hE,I.invertBy=dE,I.invokeMap=Jx,I.iteratee=zu,I.keyBy=Zx,I.keys=$e,I.keysIn=un,I.map=Ko,I.mapKeys=gE,I.mapValues=mE,I.matches=cA,I.matchesProperty=fA,I.memoize=Jo,I.merge=yE,I.mergeWith=hg,I.method=hA,I.methodOf=dA,I.mixin=Vu,I.negate=Zo,I.nthArg=gA,I.omit=vE,I.omitBy=bE,I.once=pS,I.orderBy=Qx,I.over=mA,I.overArgs=gS,I.overEvery=yA,I.overSome=vA,I.partial=Fu,I.partialRight=rg,I.partition=tS,I.pick=_E,I.pickBy=dg,I.property=_g,I.propertyOf=bA,I.pull=Q2,I.pullAll=$p,I.pullAllBy=tx,I.pullAllWith=ex,I.pullAt=nx,I.range=_A,I.rangeRight=wA,I.rearg=mS,I.reject=rS,I.remove=rx,I.rest=yS,I.reverse=Bu,I.sampleSize=sS,I.set=xE,I.setWith=SE,I.shuffle=oS,I.slice=ix,I.sortBy=uS,I.sortedUniq=fx,I.sortedUniqBy=hx,I.split=$E,I.spread=vS,I.tail=dx,I.take=px,I.takeRight=gx,I.takeRightWhile=mx,I.takeWhile=yx,I.tap=Lx,I.throttle=bS,I.thru=Yo,I.toArray=lg,I.toPairs=pg,I.toPairsIn=gg,I.toPath=kA,I.toPlainObject=cg,I.transform=EE,I.unary=_S,I.union=vx,I.unionBy=bx,I.unionWith=_x,I.uniq=wx,I.uniqBy=xx,I.uniqWith=Sx,I.unset=AE,I.unzip=Iu,I.unzipWith=Gp,I.update=kE,I.updateWith=RE,I.values=Di,I.valuesIn=ME,I.without=Ex,I.words=vg,I.wrap=wS,I.xor=Ax,I.xorBy=kx,I.xorWith=Rx,I.zip=Mx,I.zipObject=Cx,I.zipObjectDeep=Px,I.zipWith=Ox,I.entries=pg,I.entriesIn=gg,I.extend=fg,I.extendWith=ea,Vu(I,I),I.add=MA,I.attempt=bg,I.camelCase=LE,I.capitalize=mg,I.ceil=CA,I.clamp=CE,I.clone=SS,I.cloneDeep=AS,I.cloneDeepWith=kS,I.cloneWith=ES,I.conformsTo=RS,I.deburr=yg,I.defaultTo=aA,I.divide=PA,I.endsWith=TE,I.eq=qn,I.escape=BE,I.escapeRegExp=IE,I.every=Wx,I.find=zx,I.findIndex=Wp,I.findKey=rE,I.findLast=Vx,I.findLastIndex=Hp,I.findLastKey=iE,I.floor=OA,I.forEach=Kp,I.forEachRight=Xp,I.forIn=sE,I.forInRight=oE,I.forOwn=aE,I.forOwnRight=lE,I.get=Uu,I.gt=MS,I.gte=CS,I.has=fE,I.hasIn=qu,I.head=Vp,I.identity=cn,I.includes=Xx,I.indexOf=V2,I.inRange=PE,I.invoke=pE,I.isArguments=oi,I.isArray=qt,I.isArrayBuffer=PS,I.isArrayLike=ln,I.isArrayLikeObject=Te,I.isBoolean=OS,I.isBuffer=jr,I.isDate=LS,I.isElement=TS,I.isEmpty=BS,I.isEqual=IS,I.isEqualWith=DS,I.isError=Nu,I.isFinite=FS,I.isFunction=gr,I.isInteger=ig,I.isLength=Qo,I.isMap=sg,I.isMatch=NS,I.isMatchWith=jS,I.isNaN=US,I.isNative=qS,I.isNil=HS,I.isNull=WS,I.isNumber=og,I.isObject=Re,I.isObjectLike=Pe,I.isPlainObject=_s,I.isRegExp=ju,I.isSafeInteger=zS,I.isSet=ag,I.isString=ta,I.isSymbol=_n,I.isTypedArray=Ii,I.isUndefined=VS,I.isWeakMap=$S,I.isWeakSet=GS,I.join=X2,I.kebabCase=DE,I.last=In,I.lastIndexOf=J2,I.lowerCase=FE,I.lowerFirst=NE,I.lt=YS,I.lte=KS,I.max=LA,I.maxBy=TA,I.mean=BA,I.meanBy=IA,I.min=DA,I.minBy=FA,I.stubArray=Gu,I.stubFalse=Yu,I.stubObject=xA,I.stubString=SA,I.stubTrue=EA,I.multiply=NA,I.nth=Z2,I.noConflict=pA,I.noop=$u,I.now=Xo,I.pad=jE,I.padEnd=UE,I.padStart=qE,I.parseInt=WE,I.random=OE,I.reduce=eS,I.reduceRight=nS,I.repeat=HE,I.replace=zE,I.result=wE,I.round=jA,I.runInContext=Z,I.sample=iS,I.size=aS,I.snakeCase=VE,I.some=lS,I.sortedIndex=sx,I.sortedIndexBy=ox,I.sortedIndexOf=ax,I.sortedLastIndex=lx,I.sortedLastIndexBy=ux,I.sortedLastIndexOf=cx,I.startCase=GE,I.startsWith=YE,I.subtract=UA,I.sum=qA,I.sumBy=WA,I.template=KE,I.times=AA,I.toFinite=mr,I.toInteger=Ht,I.toLength=ug,I.toLower=XE,I.toNumber=Dn,I.toSafeInteger=XS,I.toString=se,I.toUpper=JE,I.trim=ZE,I.trimEnd=QE,I.trimStart=tA,I.truncate=eA,I.unescape=nA,I.uniqueId=RA,I.upperCase=rA,I.upperFirst=Wu,I.each=Kp,I.eachRight=Xp,I.first=Vp,Vu(I,function(){var o={};return Xn(I,function(u,y){ae.call(I.prototype,y)||(o[y]=u)}),o}(),{chain:!1}),I.VERSION=r,Pn(["bind","bindKey","curry","curryRight","partial","partialRight"],function(o){I[o].placeholder=I}),Pn(["drop","take"],function(o,u){Xt.prototype[o]=function(y){y=y===e?1:qe(Ht(y),0);var x=this.__filtered__&&!u?new Xt(this):this.clone();return x.__filtered__?x.__takeCount__=Je(y,x.__takeCount__):x.__views__.push({size:Je(y,Ot),type:o+(x.__dir__<0?"Right":"")}),x},Xt.prototype[o+"Right"]=function(y){return this.reverse()[o](y).reverse()}}),Pn(["filter","map","takeWhile"],function(o,u){var y=u+1,x=y==dt||y==at;Xt.prototype[o]=function(P){var F=this.clone();return F.__iteratees__.push({iteratee:Bt(P,3),type:y}),F.__filtered__=F.__filtered__||x,F}}),Pn(["head","last"],function(o,u){var y="take"+(u?"Right":"");Xt.prototype[o]=function(){return this[y](1).value()[0]}}),Pn(["initial","tail"],function(o,u){var y="drop"+(u?"":"Right");Xt.prototype[o]=function(){return this.__filtered__?new Xt(this):this[y](1)}}),Xt.prototype.compact=function(){return this.filter(cn)},Xt.prototype.find=function(o){return this.filter(o).head()},Xt.prototype.findLast=function(o){return this.reverse().find(o)},Xt.prototype.invokeMap=$t(function(o,u){return typeof o=="function"?new Xt(this):this.map(function(y){return ps(y,o,u)})}),Xt.prototype.reject=function(o){return this.filter(Zo(Bt(o)))},Xt.prototype.slice=function(o,u){o=Ht(o);var y=this;return y.__filtered__&&(o>0||u<0)?new Xt(y):(o<0?y=y.takeRight(-o):o&&(y=y.drop(o)),u!==e&&(u=Ht(u),y=u<0?y.dropRight(-u):y.take(u-o)),y)},Xt.prototype.takeRightWhile=function(o){return this.reverse().takeWhile(o).reverse()},Xt.prototype.toArray=function(){return this.take(Ot)},Xn(Xt.prototype,function(o,u){var y=/^(?:filter|find|map|reject)|While$/.test(u),x=/^(?:head|last)$/.test(u),P=I[x?"take"+(u=="last"?"Right":""):u],F=x||/^find/.test(u);P&&(I.prototype[u]=function(){var H=this.__wrapped__,$=x?[1]:arguments,tt=H instanceof Xt,gt=$[0],vt=tt||qt(H),wt=function(Gt){var Zt=P.apply(I,Lr([Gt],$));return x&&Rt?Zt[0]:Zt};vt&&y&&typeof gt=="function"&&gt.length!=1&&(tt=vt=!1);var Rt=this.__chain__,Pt=!!this.__actions__.length,It=F&&!Rt,zt=tt&&!Pt;if(!F&&vt){H=zt?H:new Xt(this);var Dt=o.apply(H,$);return Dt.__actions__.push({func:Yo,args:[wt],thisArg:e}),new Ln(Dt,Rt)}return It&&zt?o.apply(this,$):(Dt=this.thru(wt),It?x?Dt.value()[0]:Dt.value():Dt)})}),Pn(["pop","push","shift","sort","splice","unshift"],function(o){var u=_o[o],y=/^(?:push|sort|unshift)$/.test(o)?"tap":"thru",x=/^(?:pop|shift)$/.test(o);I.prototype[o]=function(){var P=arguments;if(x&&!this.__chain__){var F=this.value();return u.apply(qt(F)?F:[],P)}return this[y](function(H){return u.apply(qt(H)?H:[],P)})}}),Xn(Xt.prototype,function(o,u){var y=I[u];if(y){var x=y.name+"";ae.call(Pi,x)||(Pi[x]=[]),Pi[x].push({name:u,func:y})}}),Pi[qo(e,_).name]=[{name:"wrapper",func:e}],Xt.prototype.clone=nw,Xt.prototype.reverse=rw,Xt.prototype.value=iw,I.prototype.at=Tx,I.prototype.chain=Bx,I.prototype.commit=Ix,I.prototype.next=Dx,I.prototype.plant=Nx,I.prototype.reverse=jx,I.prototype.toJSON=I.prototype.valueOf=I.prototype.value=Ux,I.prototype.first=I.prototype.head,as&&(I.prototype[as]=Fx),I},Ri=I1();Zr?((Zr.exports=Ri)._=Ri,zl._=Ri):Ke._=Ri}).call(Ck)}(Ps,Ps.exports)),Ps.exports}var Ok=Pk();const kn=_i(Ok),so=n=>function(...t){return n(this)(...t)};var Ra={exports:{}},dm;function Lk(){return dm||(dm=1,function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),e.BASE=2166136261;function e(r,i=e.BASE){const s=r.length;for(let a=0;a<s;a++)i^=r.charCodeAt(a),i+=(i<<1)+(i<<4)+(i<<7)+(i<<8)+(i<<24);return i>>>0}t.default=e,n.exports=e}(Ra,Ra.exports)),Ra.exports}var Tk=Lk();const Bk=_i(Tk),mh=(n,t,e="")=>Object.entries(n).reduce((r,[i,s])=>{const a=`${e}${e?".":""}${i}`;return kn.isObject(s)&&!t.includes(a)?r.concat(mh(s,t,a)):r.concat([[a,s]])},[]),pl=n=>`hsl(${Math.floor(Bk(n))/120%360}, 100%, 74%)`,Ik=so(n=>(t,e,r,{fn:i,inverse:s})=>{const l=(()=>{switch(e){case"eq":return t===r;case"neq":return t!==r;case"lt":return t<r;case"lte":return t<=r;case"gt":return t>r;case"gte":return t>=r;default:return!1}})();return l?i?i(n):s?s(n):l:null}),Dk=so(()=>(n,t)=>kn.truncate(n,{length:t})),Fk=so(()=>n=>new Date(n).toLocaleTimeString()),Nk=so(()=>n=>(n/1e3).toFixed(3)),jk=so(()=>n=>pl(n)),Uk=Object.freeze(Object.defineProperty({__proto__:null,compare:Ik,toColor:jk,toLocaleTime:Fk,toSeconds:Nk,truncate:Dk},Symbol.toStringTag,{value:"Module"})),qk=`
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
+ `,Wk=`
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
+ `,Hk=qk,zk=Wk,Vk=Object.freeze(Object.defineProperty({__proto__:null,expectationMeta:Hk,truncated:zk},Symbol.toStringTag,{value:"Module"})),$k={init:()=>{Object.entries(Uk).forEach(([n,t])=>Fe.registerHelper(n,t)),Object.entries(Vk).forEach(([n,t])=>Fe.registerPartial(n,t))}};zi.extend(KA);$k.init();const Gk=`
110
+ <div class="buttons"></div>
111
+ `;var Ma={exports:{}},pm;function Qi(){if(pm)return Ma.exports;pm=1;var n=typeof Reflect=="object"?Reflect:null,t=n&&typeof n.apply=="function"?n.apply:function(M,O,L){return Function.prototype.apply.call(M,O,L)},e;n&&typeof n.ownKeys=="function"?e=n.ownKeys:Object.getOwnPropertySymbols?e=function(M){return Object.getOwnPropertyNames(M).concat(Object.getOwnPropertySymbols(M))}:e=function(M){return Object.getOwnPropertyNames(M)};function r(w){console&&console.warn&&console.warn(w)}var i=Number.isNaN||function(M){return M!==M};function s(){s.init.call(this)}Ma.exports=s,Ma.exports.once=_,s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var a=10;function l(w){if(typeof w!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof w)}Object.defineProperty(s,"defaultMaxListeners",{enumerable:!0,get:function(){return a},set:function(w){if(typeof w!="number"||w<0||i(w))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+w+".");a=w}}),s.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},s.prototype.setMaxListeners=function(M){if(typeof M!="number"||M<0||i(M))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+M+".");return this._maxListeners=M,this};function c(w){return w._maxListeners===void 0?s.defaultMaxListeners:w._maxListeners}s.prototype.getMaxListeners=function(){return c(this)},s.prototype.emit=function(M){for(var O=[],L=1;L<arguments.length;L++)O.push(arguments[L]);var N=M==="error",Y=this._events;if(Y!==void 0)N=N&&Y.error===void 0;else if(!N)return!1;if(N){var z;if(O.length>0&&(z=O[0]),z instanceof Error)throw z;var G=new Error("Unhandled error."+(z?" ("+z.message+")":""));throw G.context=z,G}var U=Y[M];if(U===void 0)return!1;if(typeof U=="function")t(U,this,O);else for(var xt=U.length,dt=p(U,xt),L=0;L<xt;++L)t(dt[L],this,O);return!0};function h(w,M,O,L){var N,Y,z;if(l(O),Y=w._events,Y===void 0?(Y=w._events=Object.create(null),w._eventsCount=0):(Y.newListener!==void 0&&(w.emit("newListener",M,O.listener?O.listener:O),Y=w._events),z=Y[M]),z===void 0)z=Y[M]=O,++w._eventsCount;else if(typeof z=="function"?z=Y[M]=L?[O,z]:[z,O]:L?z.unshift(O):z.push(O),N=c(w),N>0&&z.length>N&&!z.warned){z.warned=!0;var G=new Error("Possible EventEmitter memory leak detected. "+z.length+" "+String(M)+" listeners added. Use emitter.setMaxListeners() to increase limit");G.name="MaxListenersExceededWarning",G.emitter=w,G.type=M,G.count=z.length,r(G)}return w}s.prototype.addListener=function(M,O){return h(this,M,O,!1)},s.prototype.on=s.prototype.addListener,s.prototype.prependListener=function(M,O){return h(this,M,O,!0)};function f(){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 g(w,M,O){var L={fired:!1,wrapFn:void 0,target:w,type:M,listener:O},N=f.bind(L);return N.listener=O,L.wrapFn=N,N}s.prototype.once=function(M,O){return l(O),this.on(M,g(this,M,O)),this},s.prototype.prependOnceListener=function(M,O){return l(O),this.prependListener(M,g(this,M,O)),this},s.prototype.removeListener=function(M,O){var L,N,Y,z,G;if(l(O),N=this._events,N===void 0)return this;if(L=N[M],L===void 0)return this;if(L===O||L.listener===O)--this._eventsCount===0?this._events=Object.create(null):(delete N[M],N.removeListener&&this.emit("removeListener",M,L.listener||O));else if(typeof L!="function"){for(Y=-1,z=L.length-1;z>=0;z--)if(L[z]===O||L[z].listener===O){G=L[z].listener,Y=z;break}if(Y<0)return this;Y===0?L.shift():v(L,Y),L.length===1&&(N[M]=L[0]),N.removeListener!==void 0&&this.emit("removeListener",M,G||O)}return this},s.prototype.off=s.prototype.removeListener,s.prototype.removeAllListeners=function(M){var O,L,N;if(L=this._events,L===void 0)return this;if(L.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):L[M]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete L[M]),this;if(arguments.length===0){var Y=Object.keys(L),z;for(N=0;N<Y.length;++N)z=Y[N],z!=="removeListener"&&this.removeAllListeners(z);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(O=L[M],typeof O=="function")this.removeListener(M,O);else if(O!==void 0)for(N=O.length-1;N>=0;N--)this.removeListener(M,O[N]);return this};function d(w,M,O){var L=w._events;if(L===void 0)return[];var N=L[M];return N===void 0?[]:typeof N=="function"?O?[N.listener||N]:[N]:O?b(N):p(N,N.length)}s.prototype.listeners=function(M){return d(this,M,!0)},s.prototype.rawListeners=function(M){return d(this,M,!1)},s.listenerCount=function(w,M){return typeof w.listenerCount=="function"?w.listenerCount(M):m.call(w,M)},s.prototype.listenerCount=m;function m(w){var M=this._events;if(M!==void 0){var O=M[w];if(typeof O=="function")return 1;if(O!==void 0)return O.length}return 0}s.prototype.eventNames=function(){return this._eventsCount>0?e(this._events):[]};function p(w,M){for(var O=new Array(M),L=0;L<M;++L)O[L]=w[L];return O}function v(w,M){for(;M+1<w.length;M++)w[M]=w[M+1];w.pop()}function b(w){for(var M=new Array(w.length),O=0;O<M.length;++O)M[O]=w[O].listener||w[O];return M}function _(w,M){return new Promise(function(O,L){function N(z){w.removeListener(M,Y),L(z)}function Y(){typeof w.removeListener=="function"&&w.removeListener("error",N),O([].slice.call(arguments))}C(w,M,Y,{once:!0}),M!=="error"&&A(w,N,{once:!0})})}function A(w,M,O){typeof w.on=="function"&&C(w,"error",M,O)}function C(w,M,O,L){if(typeof w.on=="function")L.once?w.once(M,O):w.on(M,O);else if(typeof w.addEventListener=="function")w.addEventListener(M,function N(Y){L.once&&w.removeEventListener(M,N),O(Y)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof w)}return Ma.exports}var Bv=Qi();const oo=_i(Bv),Yk=`
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 Oe{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 Oe?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 yh{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 yh(t)}}const gm=(()=>{const n={password:String,number:Number,text:String};return(t,e)=>{if(t==="checkbox")return e||null;if(t==="file")return null;const r=e.trim();return r.length?(n[t]??String)(r):null}})();class Gs extends Oe{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 r=e.getAttribute("data-key"),i=e.getAttribute("cast")??e.getAttribute("type")??"text";if(!r||!("value"in e)||typeof e.value!="string")continue;if(i==="file"){const a=[];for(const l of"files"in e?e.files:new FileList)a.push({source:l,name:l.name,size:l.size,content:await l.text()});kn.set(t,r,a);continue}if(e.hasAttribute("list")){const a=e.getAttribute("list")??",",l=e.value.split(a).map(c=>gm(i,c)).filter(c=>c!==null);l.length&&kn.set(t,r,l);continue}const s=gm(i,e.value);if(i==="checkbox"&&"checked"in e){e.checked&&kn.set(t,r,s??!0);continue}s!==null&&kn.set(t,r,s)}return t}assign(t){return mh(t,this.paths).map(([e,r])=>[e,r,this.element.querySelector(`*[data-key="${e}"]`)]).forEach(([e,r,i])=>kn.set(i,"value",Array.isArray(r)?r.join(i.getAttribute("list")??","):r??"")),this}static build(t){return new Gs(t)}}class Sl extends Oe{constructor(t,e){super(e),this.key=t,this.client=yh.build(this.key),this.form=Gs.build(this.element)}sync(){const t=this.client.extract()??[];return this.form.assign(t.reduce((e,[r,i])=>kn.set(e,r,i),{})),this}save(){return this.client.store(mh(this.form.extract(),this.form.paths)),this}clear(){return this.client.clear(),this}static build(t,e){return new Sl(t,e)}}class $r{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 $r(t)}}class ts extends Oe{constructor(t){super(t),this.content=new Oe(this.element.querySelector("div.content")),this.isInitialized=!1,this.controls={main:new Oe(this.element.querySelector("div.controls div.main")),additional:new Oe(this.element.querySelector("div.controls div.additional"))},this.storage=Sl.build(`config:${this.element.id}`,this.element.querySelector("div.storage")),this.meta={},this.events=new oo,this.expander=this.element.querySelector("div.controls button#expand"),this.expander&&$r.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 ts(t)}}class Kk{constructor(){this.storage=Sl.build("void",document.body),this.shared={}}share(t){return Object.assign(this,{shared:t})}switchStorage(t){return Object.assign(this,{storage:t})}}const Xk=Fe.compile(Yk);class Ar extends Oe{constructor(t={}){super(Xk(t)),this.content=new Oe(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 Ar(t)}}class Ns extends Oe{constructor(t){super(`
124
+ <button
125
+ style="${t!=null&&t.colorify?`color: ${pl(t.name)}`:""}"
126
+ class="${t.isEnabled?"checked":""}"
127
+ >${t.name}</button>
128
+ `),this.configuration=t,this.events=new oo,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 Ns(t)}}var Iv={},El={};El.byteLength=Qk;El.toByteArray=eR;El.fromByteArray=iR;var ir=[],Nn=[],Jk=typeof Uint8Array<"u"?Uint8Array:Array,nc="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var Ui=0,Zk=nc.length;Ui<Zk;++Ui)ir[Ui]=nc[Ui],Nn[nc.charCodeAt(Ui)]=Ui;Nn[45]=62;Nn[95]=63;function Dv(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 r=e===t?0:4-e%4;return[e,r]}function Qk(n){var t=Dv(n),e=t[0],r=t[1];return(e+r)*3/4-r}function tR(n,t,e){return(t+e)*3/4-e}function eR(n){var t,e=Dv(n),r=e[0],i=e[1],s=new Jk(tR(n,r,i)),a=0,l=i>0?r-4:r,c;for(c=0;c<l;c+=4)t=Nn[n.charCodeAt(c)]<<18|Nn[n.charCodeAt(c+1)]<<12|Nn[n.charCodeAt(c+2)]<<6|Nn[n.charCodeAt(c+3)],s[a++]=t>>16&255,s[a++]=t>>8&255,s[a++]=t&255;return i===2&&(t=Nn[n.charCodeAt(c)]<<2|Nn[n.charCodeAt(c+1)]>>4,s[a++]=t&255),i===1&&(t=Nn[n.charCodeAt(c)]<<10|Nn[n.charCodeAt(c+1)]<<4|Nn[n.charCodeAt(c+2)]>>2,s[a++]=t>>8&255,s[a++]=t&255),s}function nR(n){return ir[n>>18&63]+ir[n>>12&63]+ir[n>>6&63]+ir[n&63]}function rR(n,t,e){for(var r,i=[],s=t;s<e;s+=3)r=(n[s]<<16&16711680)+(n[s+1]<<8&65280)+(n[s+2]&255),i.push(nR(r));return i.join("")}function iR(n){for(var t,e=n.length,r=e%3,i=[],s=16383,a=0,l=e-r;a<l;a+=s)i.push(rR(n,a,a+s>l?l:a+s));return r===1?(t=n[e-1],i.push(ir[t>>2]+ir[t<<4&63]+"==")):r===2&&(t=(n[e-2]<<8)+n[e-1],i.push(ir[t>>10]+ir[t>>4&63]+ir[t<<2&63]+"=")),i.join("")}var vh={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */vh.read=function(n,t,e,r,i){var s,a,l=i*8-r-1,c=(1<<l)-1,h=c>>1,f=-7,g=e?i-1:0,d=e?-1:1,m=n[t+g];for(g+=d,s=m&(1<<-f)-1,m>>=-f,f+=l;f>0;s=s*256+n[t+g],g+=d,f-=8);for(a=s&(1<<-f)-1,s>>=-f,f+=r;f>0;a=a*256+n[t+g],g+=d,f-=8);if(s===0)s=1-h;else{if(s===c)return a?NaN:(m?-1:1)*(1/0);a=a+Math.pow(2,r),s=s-h}return(m?-1:1)*a*Math.pow(2,s-r)};vh.write=function(n,t,e,r,i,s){var a,l,c,h=s*8-i-1,f=(1<<h)-1,g=f>>1,d=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,m=r?0:s-1,p=r?1:-1,v=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(l=isNaN(t)?1:0,a=f):(a=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-a))<1&&(a--,c*=2),a+g>=1?t+=d/c:t+=d*Math.pow(2,1-g),t*c>=2&&(a++,c/=2),a+g>=f?(l=0,a=f):a+g>=1?(l=(t*c-1)*Math.pow(2,i),a=a+g):(l=t*Math.pow(2,g-1)*Math.pow(2,i),a=0));i>=8;n[e+m]=l&255,m+=p,l/=256,i-=8);for(a=a<<i|l,h+=i;h>0;n[e+m]=a&255,m+=p,a/=256,h-=8);n[e+m-p]|=v*128};/*!
129
+ * The buffer module from node.js, for the browser.
130
+ *
131
+ * @author Feross Aboukhadijeh <https://feross.org>
132
+ * @license MIT
133
+ */(function(n){const t=El,e=vh,r=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;n.Buffer=f,n.SlowBuffer=M,n.INSPECT_MAX_BYTES=50;const i=2147483647;n.kMaxLength=i;const{Uint8Array:s,ArrayBuffer:a,SharedArrayBuffer:l}=globalThis;f.TYPED_ARRAY_SUPPORT=c(),!f.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 c(){try{const T=new s(1),S={foo:function(){return 42}};return Object.setPrototypeOf(S,s.prototype),Object.setPrototypeOf(T,S),T.foo()===42}catch{return!1}}Object.defineProperty(f.prototype,"parent",{enumerable:!0,get:function(){if(f.isBuffer(this))return this.buffer}}),Object.defineProperty(f.prototype,"offset",{enumerable:!0,get:function(){if(f.isBuffer(this))return this.byteOffset}});function h(T){if(T>i)throw new RangeError('The value "'+T+'" is invalid for option "size"');const S=new s(T);return Object.setPrototypeOf(S,f.prototype),S}function f(T,S,k){if(typeof T=="number"){if(typeof S=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return p(T)}return g(T,S,k)}f.poolSize=8192;function g(T,S,k){if(typeof T=="string")return v(T,S);if(a.isView(T))return _(T);if(T==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof T);if(ke(T,a)||T&&ke(T.buffer,a)||typeof l<"u"&&(ke(T,l)||T&&ke(T.buffer,l)))return A(T,S,k);if(typeof T=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const q=T.valueOf&&T.valueOf();if(q!=null&&q!==T)return f.from(q,S,k);const K=C(T);if(K)return K;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof T[Symbol.toPrimitive]=="function")return f.from(T[Symbol.toPrimitive]("string"),S,k);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof T)}f.from=function(T,S,k){return g(T,S,k)},Object.setPrototypeOf(f.prototype,s.prototype),Object.setPrototypeOf(f,s);function d(T){if(typeof T!="number")throw new TypeError('"size" argument must be of type number');if(T<0)throw new RangeError('The value "'+T+'" is invalid for option "size"')}function m(T,S,k){return d(T),T<=0?h(T):S!==void 0?typeof k=="string"?h(T).fill(S,k):h(T).fill(S):h(T)}f.alloc=function(T,S,k){return m(T,S,k)};function p(T){return d(T),h(T<0?0:w(T)|0)}f.allocUnsafe=function(T){return p(T)},f.allocUnsafeSlow=function(T){return p(T)};function v(T,S){if((typeof S!="string"||S==="")&&(S="utf8"),!f.isEncoding(S))throw new TypeError("Unknown encoding: "+S);const k=O(T,S)|0;let q=h(k);const K=q.write(T,S);return K!==k&&(q=q.slice(0,K)),q}function b(T){const S=T.length<0?0:w(T.length)|0,k=h(S);for(let q=0;q<S;q+=1)k[q]=T[q]&255;return k}function _(T){if(ke(T,s)){const S=new s(T);return A(S.buffer,S.byteOffset,S.byteLength)}return b(T)}function A(T,S,k){if(S<0||T.byteLength<S)throw new RangeError('"offset" is outside of buffer bounds');if(T.byteLength<S+(k||0))throw new RangeError('"length" is outside of buffer bounds');let q;return S===void 0&&k===void 0?q=new s(T):k===void 0?q=new s(T,S):q=new s(T,S,k),Object.setPrototypeOf(q,f.prototype),q}function C(T){if(f.isBuffer(T)){const S=w(T.length)|0,k=h(S);return k.length===0||T.copy(k,0,0,S),k}if(T.length!==void 0)return typeof T.length!="number"||on(T.length)?h(0):b(T);if(T.type==="Buffer"&&Array.isArray(T.data))return b(T.data)}function w(T){if(T>=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return T|0}function M(T){return+T!=T&&(T=0),f.alloc(+T)}f.isBuffer=function(S){return S!=null&&S._isBuffer===!0&&S!==f.prototype},f.compare=function(S,k){if(ke(S,s)&&(S=f.from(S,S.offset,S.byteLength)),ke(k,s)&&(k=f.from(k,k.offset,k.byteLength)),!f.isBuffer(S)||!f.isBuffer(k))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(S===k)return 0;let q=S.length,K=k.length;for(let nt=0,ht=Math.min(q,K);nt<ht;++nt)if(S[nt]!==k[nt]){q=S[nt],K=k[nt];break}return q<K?-1:K<q?1:0},f.isEncoding=function(S){switch(String(S).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}},f.concat=function(S,k){if(!Array.isArray(S))throw new TypeError('"list" argument must be an Array of Buffers');if(S.length===0)return f.alloc(0);let q;if(k===void 0)for(k=0,q=0;q<S.length;++q)k+=S[q].length;const K=f.allocUnsafe(k);let nt=0;for(q=0;q<S.length;++q){let ht=S[q];if(ke(ht,s))nt+ht.length>K.length?(f.isBuffer(ht)||(ht=f.from(ht)),ht.copy(K,nt)):s.prototype.set.call(K,ht,nt);else if(f.isBuffer(ht))ht.copy(K,nt);else throw new TypeError('"list" argument must be an Array of Buffers');nt+=ht.length}return K};function O(T,S){if(f.isBuffer(T))return T.length;if(a.isView(T)||ke(T,a))return T.byteLength;if(typeof T!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof T);const k=T.length,q=arguments.length>2&&arguments[2]===!0;if(!q&&k===0)return 0;let K=!1;for(;;)switch(S){case"ascii":case"latin1":case"binary":return k;case"utf8":case"utf-8":return Ce(T).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k*2;case"hex":return k>>>1;case"base64":return re(T).length;default:if(K)return q?-1:Ce(T).length;S=(""+S).toLowerCase(),K=!0}}f.byteLength=O;function L(T,S,k){let q=!1;if((S===void 0||S<0)&&(S=0),S>this.length||((k===void 0||k>this.length)&&(k=this.length),k<=0)||(k>>>=0,S>>>=0,k<=S))return"";for(T||(T="utf8");;)switch(T){case"hex":return Lt(this,S,k);case"utf8":case"utf-8":return _t(this,S,k);case"ascii":return kt(this,S,k);case"latin1":case"binary":return Ot(this,S,k);case"base64":return at(this,S,k);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Q(this,S,k);default:if(q)throw new TypeError("Unknown encoding: "+T);T=(T+"").toLowerCase(),q=!0}}f.prototype._isBuffer=!0;function N(T,S,k){const q=T[S];T[S]=T[k],T[k]=q}f.prototype.swap16=function(){const S=this.length;if(S%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let k=0;k<S;k+=2)N(this,k,k+1);return this},f.prototype.swap32=function(){const S=this.length;if(S%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let k=0;k<S;k+=4)N(this,k,k+3),N(this,k+1,k+2);return this},f.prototype.swap64=function(){const S=this.length;if(S%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let k=0;k<S;k+=8)N(this,k,k+7),N(this,k+1,k+6),N(this,k+2,k+5),N(this,k+3,k+4);return this},f.prototype.toString=function(){const S=this.length;return S===0?"":arguments.length===0?_t(this,0,S):L.apply(this,arguments)},f.prototype.toLocaleString=f.prototype.toString,f.prototype.equals=function(S){if(!f.isBuffer(S))throw new TypeError("Argument must be a Buffer");return this===S?!0:f.compare(this,S)===0},f.prototype.inspect=function(){let S="";const k=n.INSPECT_MAX_BYTES;return S=this.toString("hex",0,k).replace(/(.{2})/g,"$1 ").trim(),this.length>k&&(S+=" ... "),"<Buffer "+S+">"},r&&(f.prototype[r]=f.prototype.inspect),f.prototype.compare=function(S,k,q,K,nt){if(ke(S,s)&&(S=f.from(S,S.offset,S.byteLength)),!f.isBuffer(S))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof S);if(k===void 0&&(k=0),q===void 0&&(q=S?S.length:0),K===void 0&&(K=0),nt===void 0&&(nt=this.length),k<0||q>S.length||K<0||nt>this.length)throw new RangeError("out of range index");if(K>=nt&&k>=q)return 0;if(K>=nt)return-1;if(k>=q)return 1;if(k>>>=0,q>>>=0,K>>>=0,nt>>>=0,this===S)return 0;let ht=nt-K,Ut=q-k;const ce=Math.min(ht,Ut),fe=this.slice(K,nt),de=S.slice(k,q);for(let ne=0;ne<ce;++ne)if(fe[ne]!==de[ne]){ht=fe[ne],Ut=de[ne];break}return ht<Ut?-1:Ut<ht?1:0};function Y(T,S,k,q,K){if(T.length===0)return-1;if(typeof k=="string"?(q=k,k=0):k>2147483647?k=2147483647:k<-2147483648&&(k=-2147483648),k=+k,on(k)&&(k=K?0:T.length-1),k<0&&(k=T.length+k),k>=T.length){if(K)return-1;k=T.length-1}else if(k<0)if(K)k=0;else return-1;if(typeof S=="string"&&(S=f.from(S,q)),f.isBuffer(S))return S.length===0?-1:z(T,S,k,q,K);if(typeof S=="number")return S=S&255,typeof s.prototype.indexOf=="function"?K?s.prototype.indexOf.call(T,S,k):s.prototype.lastIndexOf.call(T,S,k):z(T,[S],k,q,K);throw new TypeError("val must be string, number or Buffer")}function z(T,S,k,q,K){let nt=1,ht=T.length,Ut=S.length;if(q!==void 0&&(q=String(q).toLowerCase(),q==="ucs2"||q==="ucs-2"||q==="utf16le"||q==="utf-16le")){if(T.length<2||S.length<2)return-1;nt=2,ht/=2,Ut/=2,k/=2}function ce(de,ne){return nt===1?de[ne]:de.readUInt16BE(ne*nt)}let fe;if(K){let de=-1;for(fe=k;fe<ht;fe++)if(ce(T,fe)===ce(S,de===-1?0:fe-de)){if(de===-1&&(de=fe),fe-de+1===Ut)return de*nt}else de!==-1&&(fe-=fe-de),de=-1}else for(k+Ut>ht&&(k=ht-Ut),fe=k;fe>=0;fe--){let de=!0;for(let ne=0;ne<Ut;ne++)if(ce(T,fe+ne)!==ce(S,ne)){de=!1;break}if(de)return fe}return-1}f.prototype.includes=function(S,k,q){return this.indexOf(S,k,q)!==-1},f.prototype.indexOf=function(S,k,q){return Y(this,S,k,q,!0)},f.prototype.lastIndexOf=function(S,k,q){return Y(this,S,k,q,!1)};function G(T,S,k,q){k=Number(k)||0;const K=T.length-k;q?(q=Number(q),q>K&&(q=K)):q=K;const nt=S.length;q>nt/2&&(q=nt/2);let ht;for(ht=0;ht<q;++ht){const Ut=parseInt(S.substr(ht*2,2),16);if(on(Ut))return ht;T[k+ht]=Ut}return ht}function U(T,S,k,q){return Ve(Ce(S,T.length-k),T,k,q)}function xt(T,S,k,q){return Ve(ue(S),T,k,q)}function dt(T,S,k,q){return Ve(re(S),T,k,q)}function st(T,S,k,q){return Ve(te(S,T.length-k),T,k,q)}f.prototype.write=function(S,k,q,K){if(k===void 0)K="utf8",q=this.length,k=0;else if(q===void 0&&typeof k=="string")K=k,q=this.length,k=0;else if(isFinite(k))k=k>>>0,isFinite(q)?(q=q>>>0,K===void 0&&(K="utf8")):(K=q,q=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const nt=this.length-k;if((q===void 0||q>nt)&&(q=nt),S.length>0&&(q<0||k<0)||k>this.length)throw new RangeError("Attempt to write outside buffer bounds");K||(K="utf8");let ht=!1;for(;;)switch(K){case"hex":return G(this,S,k,q);case"utf8":case"utf-8":return U(this,S,k,q);case"ascii":case"latin1":case"binary":return xt(this,S,k,q);case"base64":return dt(this,S,k,q);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return st(this,S,k,q);default:if(ht)throw new TypeError("Unknown encoding: "+K);K=(""+K).toLowerCase(),ht=!0}},f.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function at(T,S,k){return S===0&&k===T.length?t.fromByteArray(T):t.fromByteArray(T.slice(S,k))}function _t(T,S,k){k=Math.min(T.length,k);const q=[];let K=S;for(;K<k;){const nt=T[K];let ht=null,Ut=nt>239?4:nt>223?3:nt>191?2:1;if(K+Ut<=k){let ce,fe,de,ne;switch(Ut){case 1:nt<128&&(ht=nt);break;case 2:ce=T[K+1],(ce&192)===128&&(ne=(nt&31)<<6|ce&63,ne>127&&(ht=ne));break;case 3:ce=T[K+1],fe=T[K+2],(ce&192)===128&&(fe&192)===128&&(ne=(nt&15)<<12|(ce&63)<<6|fe&63,ne>2047&&(ne<55296||ne>57343)&&(ht=ne));break;case 4:ce=T[K+1],fe=T[K+2],de=T[K+3],(ce&192)===128&&(fe&192)===128&&(de&192)===128&&(ne=(nt&15)<<18|(ce&63)<<12|(fe&63)<<6|de&63,ne>65535&&ne<1114112&&(ht=ne))}}ht===null?(ht=65533,Ut=1):ht>65535&&(ht-=65536,q.push(ht>>>10&1023|55296),ht=56320|ht&1023),q.push(ht),K+=Ut}return Et(q)}const bt=4096;function Et(T){const S=T.length;if(S<=bt)return String.fromCharCode.apply(String,T);let k="",q=0;for(;q<S;)k+=String.fromCharCode.apply(String,T.slice(q,q+=bt));return k}function kt(T,S,k){let q="";k=Math.min(T.length,k);for(let K=S;K<k;++K)q+=String.fromCharCode(T[K]&127);return q}function Ot(T,S,k){let q="";k=Math.min(T.length,k);for(let K=S;K<k;++K)q+=String.fromCharCode(T[K]);return q}function Lt(T,S,k){const q=T.length;(!S||S<0)&&(S=0),(!k||k<0||k>q)&&(k=q);let K="";for(let nt=S;nt<k;++nt)K+=Ye[T[nt]];return K}function Q(T,S,k){const q=T.slice(S,k);let K="";for(let nt=0;nt<q.length-1;nt+=2)K+=String.fromCharCode(q[nt]+q[nt+1]*256);return K}f.prototype.slice=function(S,k){const q=this.length;S=~~S,k=k===void 0?q:~~k,S<0?(S+=q,S<0&&(S=0)):S>q&&(S=q),k<0?(k+=q,k<0&&(k=0)):k>q&&(k=q),k<S&&(k=S);const K=this.subarray(S,k);return Object.setPrototypeOf(K,f.prototype),K};function et(T,S,k){if(T%1!==0||T<0)throw new RangeError("offset is not uint");if(T+S>k)throw new RangeError("Trying to access beyond buffer length")}f.prototype.readUintLE=f.prototype.readUIntLE=function(S,k,q){S=S>>>0,k=k>>>0,q||et(S,k,this.length);let K=this[S],nt=1,ht=0;for(;++ht<k&&(nt*=256);)K+=this[S+ht]*nt;return K},f.prototype.readUintBE=f.prototype.readUIntBE=function(S,k,q){S=S>>>0,k=k>>>0,q||et(S,k,this.length);let K=this[S+--k],nt=1;for(;k>0&&(nt*=256);)K+=this[S+--k]*nt;return K},f.prototype.readUint8=f.prototype.readUInt8=function(S,k){return S=S>>>0,k||et(S,1,this.length),this[S]},f.prototype.readUint16LE=f.prototype.readUInt16LE=function(S,k){return S=S>>>0,k||et(S,2,this.length),this[S]|this[S+1]<<8},f.prototype.readUint16BE=f.prototype.readUInt16BE=function(S,k){return S=S>>>0,k||et(S,2,this.length),this[S]<<8|this[S+1]},f.prototype.readUint32LE=f.prototype.readUInt32LE=function(S,k){return S=S>>>0,k||et(S,4,this.length),(this[S]|this[S+1]<<8|this[S+2]<<16)+this[S+3]*16777216},f.prototype.readUint32BE=f.prototype.readUInt32BE=function(S,k){return S=S>>>0,k||et(S,4,this.length),this[S]*16777216+(this[S+1]<<16|this[S+2]<<8|this[S+3])},f.prototype.readBigUInt64LE=ye(function(S){S=S>>>0,Mt(S,"offset");const k=this[S],q=this[S+7];(k===void 0||q===void 0)&&Tt(S,this.length-8);const K=k+this[++S]*2**8+this[++S]*2**16+this[++S]*2**24,nt=this[++S]+this[++S]*2**8+this[++S]*2**16+q*2**24;return BigInt(K)+(BigInt(nt)<<BigInt(32))}),f.prototype.readBigUInt64BE=ye(function(S){S=S>>>0,Mt(S,"offset");const k=this[S],q=this[S+7];(k===void 0||q===void 0)&&Tt(S,this.length-8);const K=k*2**24+this[++S]*2**16+this[++S]*2**8+this[++S],nt=this[++S]*2**24+this[++S]*2**16+this[++S]*2**8+q;return(BigInt(K)<<BigInt(32))+BigInt(nt)}),f.prototype.readIntLE=function(S,k,q){S=S>>>0,k=k>>>0,q||et(S,k,this.length);let K=this[S],nt=1,ht=0;for(;++ht<k&&(nt*=256);)K+=this[S+ht]*nt;return nt*=128,K>=nt&&(K-=Math.pow(2,8*k)),K},f.prototype.readIntBE=function(S,k,q){S=S>>>0,k=k>>>0,q||et(S,k,this.length);let K=k,nt=1,ht=this[S+--K];for(;K>0&&(nt*=256);)ht+=this[S+--K]*nt;return nt*=128,ht>=nt&&(ht-=Math.pow(2,8*k)),ht},f.prototype.readInt8=function(S,k){return S=S>>>0,k||et(S,1,this.length),this[S]&128?(255-this[S]+1)*-1:this[S]},f.prototype.readInt16LE=function(S,k){S=S>>>0,k||et(S,2,this.length);const q=this[S]|this[S+1]<<8;return q&32768?q|4294901760:q},f.prototype.readInt16BE=function(S,k){S=S>>>0,k||et(S,2,this.length);const q=this[S+1]|this[S]<<8;return q&32768?q|4294901760:q},f.prototype.readInt32LE=function(S,k){return S=S>>>0,k||et(S,4,this.length),this[S]|this[S+1]<<8|this[S+2]<<16|this[S+3]<<24},f.prototype.readInt32BE=function(S,k){return S=S>>>0,k||et(S,4,this.length),this[S]<<24|this[S+1]<<16|this[S+2]<<8|this[S+3]},f.prototype.readBigInt64LE=ye(function(S){S=S>>>0,Mt(S,"offset");const k=this[S],q=this[S+7];(k===void 0||q===void 0)&&Tt(S,this.length-8);const K=this[S+4]+this[S+5]*2**8+this[S+6]*2**16+(q<<24);return(BigInt(K)<<BigInt(32))+BigInt(k+this[++S]*2**8+this[++S]*2**16+this[++S]*2**24)}),f.prototype.readBigInt64BE=ye(function(S){S=S>>>0,Mt(S,"offset");const k=this[S],q=this[S+7];(k===void 0||q===void 0)&&Tt(S,this.length-8);const K=(k<<24)+this[++S]*2**16+this[++S]*2**8+this[++S];return(BigInt(K)<<BigInt(32))+BigInt(this[++S]*2**24+this[++S]*2**16+this[++S]*2**8+q)}),f.prototype.readFloatLE=function(S,k){return S=S>>>0,k||et(S,4,this.length),e.read(this,S,!0,23,4)},f.prototype.readFloatBE=function(S,k){return S=S>>>0,k||et(S,4,this.length),e.read(this,S,!1,23,4)},f.prototype.readDoubleLE=function(S,k){return S=S>>>0,k||et(S,8,this.length),e.read(this,S,!0,52,8)},f.prototype.readDoubleBE=function(S,k){return S=S>>>0,k||et(S,8,this.length),e.read(this,S,!1,52,8)};function ot(T,S,k,q,K,nt){if(!f.isBuffer(T))throw new TypeError('"buffer" argument must be a Buffer instance');if(S>K||S<nt)throw new RangeError('"value" argument is out of bounds');if(k+q>T.length)throw new RangeError("Index out of range")}f.prototype.writeUintLE=f.prototype.writeUIntLE=function(S,k,q,K){if(S=+S,k=k>>>0,q=q>>>0,!K){const Ut=Math.pow(2,8*q)-1;ot(this,S,k,q,Ut,0)}let nt=1,ht=0;for(this[k]=S&255;++ht<q&&(nt*=256);)this[k+ht]=S/nt&255;return k+q},f.prototype.writeUintBE=f.prototype.writeUIntBE=function(S,k,q,K){if(S=+S,k=k>>>0,q=q>>>0,!K){const Ut=Math.pow(2,8*q)-1;ot(this,S,k,q,Ut,0)}let nt=q-1,ht=1;for(this[k+nt]=S&255;--nt>=0&&(ht*=256);)this[k+nt]=S/ht&255;return k+q},f.prototype.writeUint8=f.prototype.writeUInt8=function(S,k,q){return S=+S,k=k>>>0,q||ot(this,S,k,1,255,0),this[k]=S&255,k+1},f.prototype.writeUint16LE=f.prototype.writeUInt16LE=function(S,k,q){return S=+S,k=k>>>0,q||ot(this,S,k,2,65535,0),this[k]=S&255,this[k+1]=S>>>8,k+2},f.prototype.writeUint16BE=f.prototype.writeUInt16BE=function(S,k,q){return S=+S,k=k>>>0,q||ot(this,S,k,2,65535,0),this[k]=S>>>8,this[k+1]=S&255,k+2},f.prototype.writeUint32LE=f.prototype.writeUInt32LE=function(S,k,q){return S=+S,k=k>>>0,q||ot(this,S,k,4,4294967295,0),this[k+3]=S>>>24,this[k+2]=S>>>16,this[k+1]=S>>>8,this[k]=S&255,k+4},f.prototype.writeUint32BE=f.prototype.writeUInt32BE=function(S,k,q){return S=+S,k=k>>>0,q||ot(this,S,k,4,4294967295,0),this[k]=S>>>24,this[k+1]=S>>>16,this[k+2]=S>>>8,this[k+3]=S&255,k+4};function V(T,S,k,q,K){Ft(S,q,K,T,k,7);let nt=Number(S&BigInt(4294967295));T[k++]=nt,nt=nt>>8,T[k++]=nt,nt=nt>>8,T[k++]=nt,nt=nt>>8,T[k++]=nt;let ht=Number(S>>BigInt(32)&BigInt(4294967295));return T[k++]=ht,ht=ht>>8,T[k++]=ht,ht=ht>>8,T[k++]=ht,ht=ht>>8,T[k++]=ht,k}function X(T,S,k,q,K){Ft(S,q,K,T,k,7);let nt=Number(S&BigInt(4294967295));T[k+7]=nt,nt=nt>>8,T[k+6]=nt,nt=nt>>8,T[k+5]=nt,nt=nt>>8,T[k+4]=nt;let ht=Number(S>>BigInt(32)&BigInt(4294967295));return T[k+3]=ht,ht=ht>>8,T[k+2]=ht,ht=ht>>8,T[k+1]=ht,ht=ht>>8,T[k]=ht,k+8}f.prototype.writeBigUInt64LE=ye(function(S,k=0){return V(this,S,k,BigInt(0),BigInt("0xffffffffffffffff"))}),f.prototype.writeBigUInt64BE=ye(function(S,k=0){return X(this,S,k,BigInt(0),BigInt("0xffffffffffffffff"))}),f.prototype.writeIntLE=function(S,k,q,K){if(S=+S,k=k>>>0,!K){const ce=Math.pow(2,8*q-1);ot(this,S,k,q,ce-1,-ce)}let nt=0,ht=1,Ut=0;for(this[k]=S&255;++nt<q&&(ht*=256);)S<0&&Ut===0&&this[k+nt-1]!==0&&(Ut=1),this[k+nt]=(S/ht>>0)-Ut&255;return k+q},f.prototype.writeIntBE=function(S,k,q,K){if(S=+S,k=k>>>0,!K){const ce=Math.pow(2,8*q-1);ot(this,S,k,q,ce-1,-ce)}let nt=q-1,ht=1,Ut=0;for(this[k+nt]=S&255;--nt>=0&&(ht*=256);)S<0&&Ut===0&&this[k+nt+1]!==0&&(Ut=1),this[k+nt]=(S/ht>>0)-Ut&255;return k+q},f.prototype.writeInt8=function(S,k,q){return S=+S,k=k>>>0,q||ot(this,S,k,1,127,-128),S<0&&(S=255+S+1),this[k]=S&255,k+1},f.prototype.writeInt16LE=function(S,k,q){return S=+S,k=k>>>0,q||ot(this,S,k,2,32767,-32768),this[k]=S&255,this[k+1]=S>>>8,k+2},f.prototype.writeInt16BE=function(S,k,q){return S=+S,k=k>>>0,q||ot(this,S,k,2,32767,-32768),this[k]=S>>>8,this[k+1]=S&255,k+2},f.prototype.writeInt32LE=function(S,k,q){return S=+S,k=k>>>0,q||ot(this,S,k,4,2147483647,-2147483648),this[k]=S&255,this[k+1]=S>>>8,this[k+2]=S>>>16,this[k+3]=S>>>24,k+4},f.prototype.writeInt32BE=function(S,k,q){return S=+S,k=k>>>0,q||ot(this,S,k,4,2147483647,-2147483648),S<0&&(S=4294967295+S+1),this[k]=S>>>24,this[k+1]=S>>>16,this[k+2]=S>>>8,this[k+3]=S&255,k+4},f.prototype.writeBigInt64LE=ye(function(S,k=0){return V(this,S,k,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),f.prototype.writeBigInt64BE=ye(function(S,k=0){return X(this,S,k,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function lt(T,S,k,q,K,nt){if(k+q>T.length)throw new RangeError("Index out of range");if(k<0)throw new RangeError("Index out of range")}function mt(T,S,k,q,K){return S=+S,k=k>>>0,K||lt(T,S,k,4),e.write(T,S,k,q,23,4),k+4}f.prototype.writeFloatLE=function(S,k,q){return mt(this,S,k,!0,q)},f.prototype.writeFloatBE=function(S,k,q){return mt(this,S,k,!1,q)};function yt(T,S,k,q,K){return S=+S,k=k>>>0,K||lt(T,S,k,8),e.write(T,S,k,q,52,8),k+8}f.prototype.writeDoubleLE=function(S,k,q){return yt(this,S,k,!0,q)},f.prototype.writeDoubleBE=function(S,k,q){return yt(this,S,k,!1,q)},f.prototype.copy=function(S,k,q,K){if(!f.isBuffer(S))throw new TypeError("argument should be a Buffer");if(q||(q=0),!K&&K!==0&&(K=this.length),k>=S.length&&(k=S.length),k||(k=0),K>0&&K<q&&(K=q),K===q||S.length===0||this.length===0)return 0;if(k<0)throw new RangeError("targetStart out of bounds");if(q<0||q>=this.length)throw new RangeError("Index out of range");if(K<0)throw new RangeError("sourceEnd out of bounds");K>this.length&&(K=this.length),S.length-k<K-q&&(K=S.length-k+q);const nt=K-q;return this===S&&typeof s.prototype.copyWithin=="function"?this.copyWithin(k,q,K):s.prototype.set.call(S,this.subarray(q,K),k),nt},f.prototype.fill=function(S,k,q,K){if(typeof S=="string"){if(typeof k=="string"?(K=k,k=0,q=this.length):typeof q=="string"&&(K=q,q=this.length),K!==void 0&&typeof K!="string")throw new TypeError("encoding must be a string");if(typeof K=="string"&&!f.isEncoding(K))throw new TypeError("Unknown encoding: "+K);if(S.length===1){const ht=S.charCodeAt(0);(K==="utf8"&&ht<128||K==="latin1")&&(S=ht)}}else typeof S=="number"?S=S&255:typeof S=="boolean"&&(S=Number(S));if(k<0||this.length<k||this.length<q)throw new RangeError("Out of range index");if(q<=k)return this;k=k>>>0,q=q===void 0?this.length:q>>>0,S||(S=0);let nt;if(typeof S=="number")for(nt=k;nt<q;++nt)this[nt]=S;else{const ht=f.isBuffer(S)?S:f.from(S,K),Ut=ht.length;if(Ut===0)throw new TypeError('The value "'+S+'" is invalid for argument "value"');for(nt=0;nt<q-k;++nt)this[nt+k]=ht[nt%Ut]}return this};const D={};function j(T,S,k){D[T]=class extends k{constructor(){super(),Object.defineProperty(this,"message",{value:S.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${T}]`,this.stack,delete this.name}get code(){return T}set code(K){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:K,writable:!0})}toString(){return`${this.name} [${T}]: ${this.message}`}}}j("ERR_BUFFER_OUT_OF_BOUNDS",function(T){return T?`${T} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),j("ERR_INVALID_ARG_TYPE",function(T,S){return`The "${T}" argument must be of type number. Received type ${typeof S}`},TypeError),j("ERR_OUT_OF_RANGE",function(T,S,k){let q=`The value of "${T}" is out of range.`,K=k;return Number.isInteger(k)&&Math.abs(k)>2**32?K=ut(String(k)):typeof k=="bigint"&&(K=String(k),(k>BigInt(2)**BigInt(32)||k<-(BigInt(2)**BigInt(32)))&&(K=ut(K)),K+="n"),q+=` It must be ${S}. Received ${K}`,q},RangeError);function ut(T){let S="",k=T.length;const q=T[0]==="-"?1:0;for(;k>=q+4;k-=3)S=`_${T.slice(k-3,k)}${S}`;return`${T.slice(0,k)}${S}`}function St(T,S,k){Mt(S,"offset"),(T[S]===void 0||T[S+k]===void 0)&&Tt(S,T.length-(k+1))}function Ft(T,S,k,q,K,nt){if(T>k||T<S){const ht=typeof S=="bigint"?"n":"";let Ut;throw S===0||S===BigInt(0)?Ut=`>= 0${ht} and < 2${ht} ** ${(nt+1)*8}${ht}`:Ut=`>= -(2${ht} ** ${(nt+1)*8-1}${ht}) and < 2 ** ${(nt+1)*8-1}${ht}`,new D.ERR_OUT_OF_RANGE("value",Ut,T)}St(q,K,nt)}function Mt(T,S){if(typeof T!="number")throw new D.ERR_INVALID_ARG_TYPE(S,"number",T)}function Tt(T,S,k){throw Math.floor(T)!==T?(Mt(T,k),new D.ERR_OUT_OF_RANGE("offset","an integer",T)):S<0?new D.ERR_BUFFER_OUT_OF_BOUNDS:new D.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${S}`,T)}const je=/[^+/0-9A-Za-z-_]/g;function ft(T){if(T=T.split("=")[0],T=T.trim().replace(je,""),T.length<2)return"";for(;T.length%4!==0;)T=T+"=";return T}function Ce(T,S){S=S||1/0;let k;const q=T.length;let K=null;const nt=[];for(let ht=0;ht<q;++ht){if(k=T.charCodeAt(ht),k>55295&&k<57344){if(!K){if(k>56319){(S-=3)>-1&&nt.push(239,191,189);continue}else if(ht+1===q){(S-=3)>-1&&nt.push(239,191,189);continue}K=k;continue}if(k<56320){(S-=3)>-1&&nt.push(239,191,189),K=k;continue}k=(K-55296<<10|k-56320)+65536}else K&&(S-=3)>-1&&nt.push(239,191,189);if(K=null,k<128){if((S-=1)<0)break;nt.push(k)}else if(k<2048){if((S-=2)<0)break;nt.push(k>>6|192,k&63|128)}else if(k<65536){if((S-=3)<0)break;nt.push(k>>12|224,k>>6&63|128,k&63|128)}else if(k<1114112){if((S-=4)<0)break;nt.push(k>>18|240,k>>12&63|128,k>>6&63|128,k&63|128)}else throw new Error("Invalid code point")}return nt}function ue(T){const S=[];for(let k=0;k<T.length;++k)S.push(T.charCodeAt(k)&255);return S}function te(T,S){let k,q,K;const nt=[];for(let ht=0;ht<T.length&&!((S-=2)<0);++ht)k=T.charCodeAt(ht),q=k>>8,K=k%256,nt.push(K),nt.push(q);return nt}function re(T){return t.toByteArray(ft(T))}function Ve(T,S,k,q){let K;for(K=0;K<q&&!(K+k>=S.length||K>=T.length);++K)S[K+k]=T[K];return K}function ke(T,S){return T instanceof S||T!=null&&T.constructor!=null&&T.constructor.name!=null&&T.constructor.name===S.name}function on(T){return T!==T}const Ye=function(){const T="0123456789abcdef",S=new Array(256);for(let k=0;k<16;++k){const q=k*16;for(let K=0;K<16;++K)S[q+K]=T[k]+T[K]}return S}();function ye(T){return typeof BigInt>"u"?Rn:T}function Rn(){throw new Error("BigInt not supported")}})(Iv);const Ys=Iv.Buffer;var Ca={exports:{}},Pa={exports:{}};function sR(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Fv={exports:{}},De=Fv.exports={},nr,rr;function Hf(){throw new Error("setTimeout has not been defined")}function zf(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?nr=setTimeout:nr=Hf}catch{nr=Hf}try{typeof clearTimeout=="function"?rr=clearTimeout:rr=zf}catch{rr=zf}})();function Nv(n){if(nr===setTimeout)return setTimeout(n,0);if((nr===Hf||!nr)&&setTimeout)return nr=setTimeout,setTimeout(n,0);try{return nr(n,0)}catch{try{return nr.call(null,n,0)}catch{return nr.call(this,n,0)}}}function oR(n){if(rr===clearTimeout)return clearTimeout(n);if((rr===zf||!rr)&&clearTimeout)return rr=clearTimeout,clearTimeout(n);try{return rr(n)}catch{try{return rr.call(null,n)}catch{return rr.call(this,n)}}}var kr=[],Gi=!1,pi,el=-1;function aR(){!Gi||!pi||(Gi=!1,pi.length?kr=pi.concat(kr):el=-1,kr.length&&jv())}function jv(){if(!Gi){var n=Nv(aR);Gi=!0;for(var t=kr.length;t;){for(pi=kr,kr=[];++el<t;)pi&&pi[el].run();el=-1,t=kr.length}pi=null,Gi=!1,oR(n)}}De.nextTick=function(n){var t=new Array(arguments.length-1);if(arguments.length>1)for(var e=1;e<arguments.length;e++)t[e-1]=arguments[e];kr.push(new Uv(n,t)),kr.length===1&&!Gi&&Nv(jv)};function Uv(n,t){this.fun=n,this.array=t}Uv.prototype.run=function(){this.fun.apply(null,this.array)};De.title="browser";De.browser=!0;De.env={};De.argv=[];De.version="";De.versions={};function Pr(){}De.on=Pr;De.addListener=Pr;De.once=Pr;De.off=Pr;De.removeListener=Pr;De.removeAllListeners=Pr;De.emit=Pr;De.prependListener=Pr;De.prependOnceListener=Pr;De.listeners=function(n){return[]};De.binding=function(n){throw new Error("process.binding is not supported")};De.cwd=function(){return"/"};De.chdir=function(n){throw new Error("process.chdir is not supported")};De.umask=function(){return 0};var lR=Fv.exports;const Qt=sR(lR);var rc={},ic={},sc,mm;function qv(){return mm||(mm=1,sc=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},e=Symbol("test"),r=Object(e);if(typeof e=="string"||Object.prototype.toString.call(e)!=="[object Symbol]"||Object.prototype.toString.call(r)!=="[object Symbol]")return!1;var i=42;t[e]=i;for(var s in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var a=Object.getOwnPropertySymbols(t);if(a.length!==1||a[0]!==e||!Object.prototype.propertyIsEnumerable.call(t,e))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var l=Object.getOwnPropertyDescriptor(t,e);if(l.value!==i||l.enumerable!==!0)return!1}return!0}),sc}var oc,ym;function Al(){if(ym)return oc;ym=1;var n=qv();return oc=function(){return n()&&!!Symbol.toStringTag},oc}var ac,vm;function Wv(){return vm||(vm=1,ac=Object),ac}var lc,bm;function uR(){return bm||(bm=1,lc=Error),lc}var uc,_m;function cR(){return _m||(_m=1,uc=EvalError),uc}var cc,wm;function fR(){return wm||(wm=1,cc=RangeError),cc}var fc,xm;function hR(){return xm||(xm=1,fc=ReferenceError),fc}var hc,Sm;function Hv(){return Sm||(Sm=1,hc=SyntaxError),hc}var dc,Em;function ao(){return Em||(Em=1,dc=TypeError),dc}var pc,Am;function dR(){return Am||(Am=1,pc=URIError),pc}var gc,km;function pR(){return km||(km=1,gc=Math.abs),gc}var mc,Rm;function gR(){return Rm||(Rm=1,mc=Math.floor),mc}var yc,Mm;function mR(){return Mm||(Mm=1,yc=Math.max),yc}var vc,Cm;function yR(){return Cm||(Cm=1,vc=Math.min),vc}var bc,Pm;function vR(){return Pm||(Pm=1,bc=Math.pow),bc}var _c,Om;function bR(){return Om||(Om=1,_c=Math.round),_c}var wc,Lm;function _R(){return Lm||(Lm=1,wc=Number.isNaN||function(t){return t!==t}),wc}var xc,Tm;function wR(){if(Tm)return xc;Tm=1;var n=_R();return xc=function(e){return n(e)||e===0?e:e<0?-1:1},xc}var Sc,Bm;function xR(){return Bm||(Bm=1,Sc=Object.getOwnPropertyDescriptor),Sc}var Ec,Im;function es(){if(Im)return Ec;Im=1;var n=xR();if(n)try{n([],"length")}catch{n=null}return Ec=n,Ec}var Ac,Dm;function kl(){if(Dm)return Ac;Dm=1;var n=Object.defineProperty||!1;if(n)try{n({},"a",{value:1})}catch{n=!1}return Ac=n,Ac}var kc,Fm;function SR(){if(Fm)return kc;Fm=1;var n=typeof Symbol<"u"&&Symbol,t=qv();return kc=function(){return typeof n!="function"||typeof Symbol!="function"||typeof n("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:t()},kc}var Rc,Nm;function zv(){return Nm||(Nm=1,Rc=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),Rc}var Mc,jm;function Vv(){if(jm)return Mc;jm=1;var n=Wv();return Mc=n.getPrototypeOf||null,Mc}var Cc,Um;function ER(){if(Um)return Cc;Um=1;var n="Function.prototype.bind called on incompatible ",t=Object.prototype.toString,e=Math.max,r="[object Function]",i=function(c,h){for(var f=[],g=0;g<c.length;g+=1)f[g]=c[g];for(var d=0;d<h.length;d+=1)f[d+c.length]=h[d];return f},s=function(c,h){for(var f=[],g=h,d=0;g<c.length;g+=1,d+=1)f[d]=c[g];return f},a=function(l,c){for(var h="",f=0;f<l.length;f+=1)h+=l[f],f+1<l.length&&(h+=c);return h};return Cc=function(c){var h=this;if(typeof h!="function"||t.apply(h)!==r)throw new TypeError(n+h);for(var f=s(arguments,1),g,d=function(){if(this instanceof g){var _=h.apply(this,i(f,arguments));return Object(_)===_?_:this}return h.apply(c,i(f,arguments))},m=e(0,h.length-f.length),p=[],v=0;v<m;v++)p[v]="$"+v;if(g=Function("binder","return function ("+a(p,",")+"){ return binder.apply(this,arguments); }")(d),h.prototype){var b=function(){};b.prototype=h.prototype,g.prototype=new b,b.prototype=null}return g},Cc}var Pc,qm;function lo(){if(qm)return Pc;qm=1;var n=ER();return Pc=Function.prototype.bind||n,Pc}var Oc,Wm;function bh(){return Wm||(Wm=1,Oc=Function.prototype.call),Oc}var Lc,Hm;function _h(){return Hm||(Hm=1,Lc=Function.prototype.apply),Lc}var Tc,zm;function AR(){return zm||(zm=1,Tc=typeof Reflect<"u"&&Reflect&&Reflect.apply),Tc}var Bc,Vm;function $v(){if(Vm)return Bc;Vm=1;var n=lo(),t=_h(),e=bh(),r=AR();return Bc=r||n.call(e,t),Bc}var Ic,$m;function wh(){if($m)return Ic;$m=1;var n=lo(),t=ao(),e=bh(),r=$v();return Ic=function(s){if(s.length<1||typeof s[0]!="function")throw new t("a function is required");return r(n,e,s)},Ic}var Dc,Gm;function kR(){if(Gm)return Dc;Gm=1;var n=wh(),t=es(),e;try{e=[].__proto__===Array.prototype}catch(a){if(!a||typeof a!="object"||!("code"in a)||a.code!=="ERR_PROTO_ACCESS")throw a}var r=!!e&&t&&t(Object.prototype,"__proto__"),i=Object,s=i.getPrototypeOf;return Dc=r&&typeof r.get=="function"?n([r.get]):typeof s=="function"?function(l){return s(l==null?l:i(l))}:!1,Dc}var Fc,Ym;function xh(){if(Ym)return Fc;Ym=1;var n=zv(),t=Vv(),e=kR();return Fc=n?function(i){return n(i)}:t?function(i){if(!i||typeof i!="object"&&typeof i!="function")throw new TypeError("getProto: not an object");return t(i)}:e?function(i){return e(i)}:null,Fc}var Nc,Km;function Gv(){if(Km)return Nc;Km=1;var n=Function.prototype.call,t=Object.prototype.hasOwnProperty,e=lo();return Nc=e.call(n,t),Nc}var jc,Xm;function Yv(){if(Xm)return jc;Xm=1;var n,t=Wv(),e=uR(),r=cR(),i=fR(),s=hR(),a=Hv(),l=ao(),c=dR(),h=pR(),f=gR(),g=mR(),d=yR(),m=vR(),p=bR(),v=wR(),b=Function,_=function(mt){try{return b('"use strict"; return ('+mt+").constructor;")()}catch{}},A=es(),C=kl(),w=function(){throw new l},M=A?function(){try{return arguments.callee,w}catch{try{return A(arguments,"callee").get}catch{return w}}}():w,O=SR()(),L=xh(),N=Vv(),Y=zv(),z=_h(),G=bh(),U={},xt=typeof Uint8Array>"u"||!L?n:L(Uint8Array),dt={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?n:ArrayBuffer,"%ArrayIteratorPrototype%":O&&L?L([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":U,"%AsyncGenerator%":U,"%AsyncGeneratorFunction%":U,"%AsyncIteratorPrototype%":U,"%Atomics%":typeof Atomics>"u"?n:Atomics,"%BigInt%":typeof BigInt>"u"?n:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?n:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?n:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?n:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":e,"%eval%":eval,"%EvalError%":r,"%Float16Array%":typeof Float16Array>"u"?n:Float16Array,"%Float32Array%":typeof Float32Array>"u"?n:Float32Array,"%Float64Array%":typeof Float64Array>"u"?n:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?n:FinalizationRegistry,"%Function%":b,"%GeneratorFunction%":U,"%Int8Array%":typeof Int8Array>"u"?n:Int8Array,"%Int16Array%":typeof Int16Array>"u"?n:Int16Array,"%Int32Array%":typeof Int32Array>"u"?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":O&&L?L(L([][Symbol.iterator]())):n,"%JSON%":typeof JSON=="object"?JSON:n,"%Map%":typeof Map>"u"?n:Map,"%MapIteratorPrototype%":typeof Map>"u"||!O||!L?n:L(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":t,"%Object.getOwnPropertyDescriptor%":A,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?n:Promise,"%Proxy%":typeof Proxy>"u"?n:Proxy,"%RangeError%":i,"%ReferenceError%":s,"%Reflect%":typeof Reflect>"u"?n:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?n:Set,"%SetIteratorPrototype%":typeof Set>"u"||!O||!L?n:L(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":O&&L?L(""[Symbol.iterator]()):n,"%Symbol%":O?Symbol:n,"%SyntaxError%":a,"%ThrowTypeError%":M,"%TypedArray%":xt,"%TypeError%":l,"%Uint8Array%":typeof Uint8Array>"u"?n:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?n:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?n:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?n:Uint32Array,"%URIError%":c,"%WeakMap%":typeof WeakMap>"u"?n:WeakMap,"%WeakRef%":typeof WeakRef>"u"?n:WeakRef,"%WeakSet%":typeof WeakSet>"u"?n:WeakSet,"%Function.prototype.call%":G,"%Function.prototype.apply%":z,"%Object.defineProperty%":C,"%Object.getPrototypeOf%":N,"%Math.abs%":h,"%Math.floor%":f,"%Math.max%":g,"%Math.min%":d,"%Math.pow%":m,"%Math.round%":p,"%Math.sign%":v,"%Reflect.getPrototypeOf%":Y};if(L)try{null.error}catch(mt){var st=L(L(mt));dt["%Error.prototype%"]=st}var at=function mt(yt){var D;if(yt==="%AsyncFunction%")D=_("async function () {}");else if(yt==="%GeneratorFunction%")D=_("function* () {}");else if(yt==="%AsyncGeneratorFunction%")D=_("async function* () {}");else if(yt==="%AsyncGenerator%"){var j=mt("%AsyncGeneratorFunction%");j&&(D=j.prototype)}else if(yt==="%AsyncIteratorPrototype%"){var ut=mt("%AsyncGenerator%");ut&&L&&(D=L(ut.prototype))}return dt[yt]=D,D},_t={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},bt=lo(),Et=Gv(),kt=bt.call(G,Array.prototype.concat),Ot=bt.call(z,Array.prototype.splice),Lt=bt.call(G,String.prototype.replace),Q=bt.call(G,String.prototype.slice),et=bt.call(G,RegExp.prototype.exec),ot=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,V=/\\(\\)?/g,X=function(yt){var D=Q(yt,0,1),j=Q(yt,-1);if(D==="%"&&j!=="%")throw new a("invalid intrinsic syntax, expected closing `%`");if(j==="%"&&D!=="%")throw new a("invalid intrinsic syntax, expected opening `%`");var ut=[];return Lt(yt,ot,function(St,Ft,Mt,Tt){ut[ut.length]=Mt?Lt(Tt,V,"$1"):Ft||St}),ut},lt=function(yt,D){var j=yt,ut;if(Et(_t,j)&&(ut=_t[j],j="%"+ut[0]+"%"),Et(dt,j)){var St=dt[j];if(St===U&&(St=at(j)),typeof St>"u"&&!D)throw new l("intrinsic "+yt+" exists, but is not available. Please file an issue!");return{alias:ut,name:j,value:St}}throw new a("intrinsic "+yt+" does not exist!")};return jc=function(yt,D){if(typeof yt!="string"||yt.length===0)throw new l("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof D!="boolean")throw new l('"allowMissing" argument must be a boolean');if(et(/^%?[^%]*%?$/,yt)===null)throw new a("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var j=X(yt),ut=j.length>0?j[0]:"",St=lt("%"+ut+"%",D),Ft=St.name,Mt=St.value,Tt=!1,je=St.alias;je&&(ut=je[0],Ot(j,kt([0,1],je)));for(var ft=1,Ce=!0;ft<j.length;ft+=1){var ue=j[ft],te=Q(ue,0,1),re=Q(ue,-1);if((te==='"'||te==="'"||te==="`"||re==='"'||re==="'"||re==="`")&&te!==re)throw new a("property names with quotes must have matching quotes");if((ue==="constructor"||!Ce)&&(Tt=!0),ut+="."+ue,Ft="%"+ut+"%",Et(dt,Ft))Mt=dt[Ft];else if(Mt!=null){if(!(ue in Mt)){if(!D)throw new l("base intrinsic for "+yt+" exists, but the property is not available.");return}if(A&&ft+1>=j.length){var Ve=A(Mt,ue);Ce=!!Ve,Ce&&"get"in Ve&&!("originalValue"in Ve.get)?Mt=Ve.get:Mt=Mt[ue]}else Ce=Et(Mt,ue),Mt=Mt[ue];Ce&&!Tt&&(dt[Ft]=Mt)}}return Mt},jc}var Uc,Jm;function uo(){if(Jm)return Uc;Jm=1;var n=Yv(),t=wh(),e=t([n("%String.prototype.indexOf%")]);return Uc=function(i,s){var a=n(i,!!s);return typeof a=="function"&&e(i,".prototype.")>-1?t([a]):a},Uc}var qc,Zm;function RR(){if(Zm)return qc;Zm=1;var n=Al()(),t=uo(),e=t("Object.prototype.toString"),r=function(l){return n&&l&&typeof l=="object"&&Symbol.toStringTag in l?!1:e(l)==="[object Arguments]"},i=function(l){return r(l)?!0:l!==null&&typeof l=="object"&&"length"in l&&typeof l.length=="number"&&l.length>=0&&e(l)!=="[object Array]"&&"callee"in l&&e(l.callee)==="[object Function]"},s=function(){return r(arguments)}();return r.isLegacyArguments=i,qc=s?r:i,qc}var Wc,Qm;function MR(){if(Qm)return Wc;Qm=1;var n=uo(),t=Al()(),e=Gv(),r=es(),i;if(t){var s=n("RegExp.prototype.exec"),a={},l=function(){throw a},c={toString:l,valueOf:l};typeof Symbol.toPrimitive=="symbol"&&(c[Symbol.toPrimitive]=l),i=function(d){if(!d||typeof d!="object")return!1;var m=r(d,"lastIndex"),p=m&&e(m,"value");if(!p)return!1;try{s(d,c)}catch(v){return v===a}}}else{var h=n("Object.prototype.toString"),f="[object RegExp]";i=function(d){return!d||typeof d!="object"&&typeof d!="function"?!1:h(d)===f}}return Wc=i,Wc}var Hc,ty;function CR(){if(ty)return Hc;ty=1;var n=uo(),t=MR(),e=n("RegExp.prototype.exec"),r=ao();return Hc=function(s){if(!t(s))throw new r("`regex` must be a RegExp");return function(l){return e(s,l)!==null}},Hc}var zc,ey;function PR(){if(ey)return zc;ey=1;var n=uo(),t=CR(),e=t(/^\s*(?:function)?\*/),r=Al()(),i=xh(),s=n("Object.prototype.toString"),a=n("Function.prototype.toString"),l=function(){if(!r)return!1;try{return Function("return function*() {}")()}catch{}},c;return zc=function(f){if(typeof f!="function")return!1;if(e(a(f)))return!0;if(!r){var g=s(f);return g==="[object GeneratorFunction]"}if(!i)return!1;if(typeof c>"u"){var d=l();c=d?i(d):!1}return i(f)===c},zc}var Vc,ny;function OR(){if(ny)return Vc;ny=1;var n=Function.prototype.toString,t=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,e,r;if(typeof t=="function"&&typeof Object.defineProperty=="function")try{e=Object.defineProperty({},"length",{get:function(){throw r}}),r={},t(function(){throw 42},null,e)}catch(A){A!==r&&(t=null)}else t=null;var i=/^\s*class\b/,s=function(C){try{var w=n.call(C);return i.test(w)}catch{return!1}},a=function(C){try{return s(C)?!1:(n.call(C),!0)}catch{return!1}},l=Object.prototype.toString,c="[object Object]",h="[object Function]",f="[object GeneratorFunction]",g="[object HTMLAllCollection]",d="[object HTML document.all class]",m="[object HTMLCollection]",p=typeof Symbol=="function"&&!!Symbol.toStringTag,v=!(0 in[,]),b=function(){return!1};if(typeof document=="object"){var _=document.all;l.call(_)===l.call(document.all)&&(b=function(C){if((v||!C)&&(typeof C>"u"||typeof C=="object"))try{var w=l.call(C);return(w===g||w===d||w===m||w===c)&&C("")==null}catch{}return!1})}return Vc=t?function(C){if(b(C))return!0;if(!C||typeof C!="function"&&typeof C!="object")return!1;try{t(C,null,e)}catch(w){if(w!==r)return!1}return!s(C)&&a(C)}:function(C){if(b(C))return!0;if(!C||typeof C!="function"&&typeof C!="object")return!1;if(p)return a(C);if(s(C))return!1;var w=l.call(C);return w!==h&&w!==f&&!/^\[object HTML/.test(w)?!1:a(C)},Vc}var $c,ry;function LR(){if(ry)return $c;ry=1;var n=OR(),t=Object.prototype.toString,e=Object.prototype.hasOwnProperty,r=function(c,h,f){for(var g=0,d=c.length;g<d;g++)e.call(c,g)&&(f==null?h(c[g],g,c):h.call(f,c[g],g,c))},i=function(c,h,f){for(var g=0,d=c.length;g<d;g++)f==null?h(c.charAt(g),g,c):h.call(f,c.charAt(g),g,c)},s=function(c,h,f){for(var g in c)e.call(c,g)&&(f==null?h(c[g],g,c):h.call(f,c[g],g,c))};function a(l){return t.call(l)==="[object Array]"}return $c=function(c,h,f){if(!n(h))throw new TypeError("iterator must be a function");var g;arguments.length>=3&&(g=f),a(c)?r(c,h,g):typeof c=="string"?i(c,h,g):s(c,h,g)},$c}var Gc,iy;function TR(){return iy||(iy=1,Gc=["Float16Array","Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]),Gc}var Yc,sy;function BR(){if(sy)return Yc;sy=1;var n=TR(),t=typeof globalThis>"u"?He:globalThis;return Yc=function(){for(var r=[],i=0;i<n.length;i++)typeof t[n[i]]=="function"&&(r[r.length]=n[i]);return r},Yc}var Kc={exports:{}},Xc,oy;function IR(){if(oy)return Xc;oy=1;var n=kl(),t=Hv(),e=ao(),r=es();return Xc=function(s,a,l){if(!s||typeof s!="object"&&typeof s!="function")throw new e("`obj` must be an object or a function`");if(typeof a!="string"&&typeof a!="symbol")throw new e("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new e("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new e("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new e("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new e("`loose`, if provided, must be a boolean");var c=arguments.length>3?arguments[3]:null,h=arguments.length>4?arguments[4]:null,f=arguments.length>5?arguments[5]:null,g=arguments.length>6?arguments[6]:!1,d=!!r&&r(s,a);if(n)n(s,a,{configurable:f===null&&d?d.configurable:!f,enumerable:c===null&&d?d.enumerable:!c,value:l,writable:h===null&&d?d.writable:!h});else if(g||!c&&!h&&!f)s[a]=l;else throw new t("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},Xc}var Jc,ay;function DR(){if(ay)return Jc;ay=1;var n=kl(),t=function(){return!!n};return t.hasArrayLengthDefineBug=function(){if(!n)return null;try{return n([],"length",{value:1}).length!==1}catch{return!0}},Jc=t,Jc}var Zc,ly;function FR(){if(ly)return Zc;ly=1;var n=Yv(),t=IR(),e=DR()(),r=es(),i=ao(),s=n("%Math.floor%");return Zc=function(l,c){if(typeof l!="function")throw new i("`fn` is not a function");if(typeof c!="number"||c<0||c>4294967295||s(c)!==c)throw new i("`length` must be a positive 32-bit integer");var h=arguments.length>2&&!!arguments[2],f=!0,g=!0;if("length"in l&&r){var d=r(l,"length");d&&!d.configurable&&(f=!1),d&&!d.writable&&(g=!1)}return(f||g||!h)&&(e?t(l,"length",c,!0,!0):t(l,"length",c)),l},Zc}var Qc,uy;function NR(){if(uy)return Qc;uy=1;var n=lo(),t=_h(),e=$v();return Qc=function(){return e(n,t,arguments)},Qc}var cy;function jR(){return cy||(cy=1,function(n){var t=FR(),e=kl(),r=wh(),i=NR();n.exports=function(a){var l=r(arguments),c=a.length-(arguments.length-1);return t(l,1+(c>0?c:0),!0)},e?e(n.exports,"apply",{value:i}):n.exports.apply=i}(Kc)),Kc.exports}var tf,fy;function Kv(){if(fy)return tf;fy=1;var n=LR(),t=BR(),e=jR(),r=uo(),i=es(),s=xh(),a=r("Object.prototype.toString"),l=Al()(),c=typeof globalThis>"u"?He:globalThis,h=t(),f=r("String.prototype.slice"),g=r("Array.prototype.indexOf",!0)||function(b,_){for(var A=0;A<b.length;A+=1)if(b[A]===_)return A;return-1},d={__proto__:null};l&&i&&s?n(h,function(v){var b=new c[v];if(Symbol.toStringTag in b&&s){var _=s(b),A=i(_,Symbol.toStringTag);if(!A&&_){var C=s(_);A=i(C,Symbol.toStringTag)}d["$"+v]=e(A.get)}}):n(h,function(v){var b=new c[v],_=b.slice||b.set;_&&(d["$"+v]=e(_))});var m=function(b){var _=!1;return n(d,function(A,C){if(!_)try{"$"+A(b)===C&&(_=f(C,1))}catch{}}),_},p=function(b){var _=!1;return n(d,function(A,C){if(!_)try{A(b),_=f(C,1)}catch{}}),_};return tf=function(b){if(!b||typeof b!="object")return!1;if(!l){var _=f(a(b),8,-1);return g(h,_)>-1?_:_!=="Object"?!1:p(b)}return i?m(b):null},tf}var ef,hy;function UR(){if(hy)return ef;hy=1;var n=Kv();return ef=function(e){return!!n(e)},ef}var dy;function qR(){return dy||(dy=1,function(n){var t=RR(),e=PR(),r=Kv(),i=UR();function s(ft){return ft.call.bind(ft)}var a=typeof BigInt<"u",l=typeof Symbol<"u",c=s(Object.prototype.toString),h=s(Number.prototype.valueOf),f=s(String.prototype.valueOf),g=s(Boolean.prototype.valueOf);if(a)var d=s(BigInt.prototype.valueOf);if(l)var m=s(Symbol.prototype.valueOf);function p(ft,Ce){if(typeof ft!="object")return!1;try{return Ce(ft),!0}catch{return!1}}n.isArgumentsObject=t,n.isGeneratorFunction=e,n.isTypedArray=i;function v(ft){return typeof Promise<"u"&&ft instanceof Promise||ft!==null&&typeof ft=="object"&&typeof ft.then=="function"&&typeof ft.catch=="function"}n.isPromise=v;function b(ft){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(ft):i(ft)||Q(ft)}n.isArrayBufferView=b;function _(ft){return r(ft)==="Uint8Array"}n.isUint8Array=_;function A(ft){return r(ft)==="Uint8ClampedArray"}n.isUint8ClampedArray=A;function C(ft){return r(ft)==="Uint16Array"}n.isUint16Array=C;function w(ft){return r(ft)==="Uint32Array"}n.isUint32Array=w;function M(ft){return r(ft)==="Int8Array"}n.isInt8Array=M;function O(ft){return r(ft)==="Int16Array"}n.isInt16Array=O;function L(ft){return r(ft)==="Int32Array"}n.isInt32Array=L;function N(ft){return r(ft)==="Float32Array"}n.isFloat32Array=N;function Y(ft){return r(ft)==="Float64Array"}n.isFloat64Array=Y;function z(ft){return r(ft)==="BigInt64Array"}n.isBigInt64Array=z;function G(ft){return r(ft)==="BigUint64Array"}n.isBigUint64Array=G;function U(ft){return c(ft)==="[object Map]"}U.working=typeof Map<"u"&&U(new Map);function xt(ft){return typeof Map>"u"?!1:U.working?U(ft):ft instanceof Map}n.isMap=xt;function dt(ft){return c(ft)==="[object Set]"}dt.working=typeof Set<"u"&&dt(new Set);function st(ft){return typeof Set>"u"?!1:dt.working?dt(ft):ft instanceof Set}n.isSet=st;function at(ft){return c(ft)==="[object WeakMap]"}at.working=typeof WeakMap<"u"&&at(new WeakMap);function _t(ft){return typeof WeakMap>"u"?!1:at.working?at(ft):ft instanceof WeakMap}n.isWeakMap=_t;function bt(ft){return c(ft)==="[object WeakSet]"}bt.working=typeof WeakSet<"u"&&bt(new WeakSet);function Et(ft){return bt(ft)}n.isWeakSet=Et;function kt(ft){return c(ft)==="[object ArrayBuffer]"}kt.working=typeof ArrayBuffer<"u"&&kt(new ArrayBuffer);function Ot(ft){return typeof ArrayBuffer>"u"?!1:kt.working?kt(ft):ft instanceof ArrayBuffer}n.isArrayBuffer=Ot;function Lt(ft){return c(ft)==="[object DataView]"}Lt.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&Lt(new DataView(new ArrayBuffer(1),0,1));function Q(ft){return typeof DataView>"u"?!1:Lt.working?Lt(ft):ft instanceof DataView}n.isDataView=Q;var et=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function ot(ft){return c(ft)==="[object SharedArrayBuffer]"}function V(ft){return typeof et>"u"?!1:(typeof ot.working>"u"&&(ot.working=ot(new et)),ot.working?ot(ft):ft instanceof et)}n.isSharedArrayBuffer=V;function X(ft){return c(ft)==="[object AsyncFunction]"}n.isAsyncFunction=X;function lt(ft){return c(ft)==="[object Map Iterator]"}n.isMapIterator=lt;function mt(ft){return c(ft)==="[object Set Iterator]"}n.isSetIterator=mt;function yt(ft){return c(ft)==="[object Generator]"}n.isGeneratorObject=yt;function D(ft){return c(ft)==="[object WebAssembly.Module]"}n.isWebAssemblyCompiledModule=D;function j(ft){return p(ft,h)}n.isNumberObject=j;function ut(ft){return p(ft,f)}n.isStringObject=ut;function St(ft){return p(ft,g)}n.isBooleanObject=St;function Ft(ft){return a&&p(ft,d)}n.isBigIntObject=Ft;function Mt(ft){return l&&p(ft,m)}n.isSymbolObject=Mt;function Tt(ft){return j(ft)||ut(ft)||St(ft)||Ft(ft)||Mt(ft)}n.isBoxedPrimitive=Tt;function je(ft){return typeof Uint8Array<"u"&&(Ot(ft)||V(ft))}n.isAnyArrayBuffer=je,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(ft){Object.defineProperty(n,ft,{enumerable:!1,value:function(){throw new Error(ft+" is not supported in userland")}})})}(ic)),ic}var nf,py;function WR(){return py||(py=1,nf=function(t){return t&&typeof t=="object"&&typeof t.copy=="function"&&typeof t.fill=="function"&&typeof t.readUInt8=="function"}),nf}var Oa={exports:{}},gy;function wi(){return gy||(gy=1,typeof Object.create=="function"?Oa.exports=function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:Oa.exports=function(t,e){if(e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}}),Oa.exports}var my;function ns(){return my||(my=1,function(n){var t={},e=Object.getOwnPropertyDescriptors||function(et){for(var ot=Object.keys(et),V={},X=0;X<ot.length;X++)V[ot[X]]=Object.getOwnPropertyDescriptor(et,ot[X]);return V},r=/%[sdj%]/g;n.format=function(Q){if(!O(Q)){for(var et=[],ot=0;ot<arguments.length;ot++)et.push(l(arguments[ot]));return et.join(" ")}for(var ot=1,V=arguments,X=V.length,lt=String(Q).replace(r,function(yt){if(yt==="%%")return"%";if(ot>=X)return yt;switch(yt){case"%s":return String(V[ot++]);case"%d":return Number(V[ot++]);case"%j":try{return JSON.stringify(V[ot++])}catch{return"[Circular]"}default:return yt}}),mt=V[ot];ot<X;mt=V[++ot])C(mt)||!z(mt)?lt+=" "+mt:lt+=" "+l(mt);return lt},n.deprecate=function(Q,et){if(typeof Qt<"u"&&Qt.noDeprecation===!0)return Q;if(typeof Qt>"u")return function(){return n.deprecate(Q,et).apply(this,arguments)};var ot=!1;function V(){if(!ot){if(Qt.throwDeprecation)throw new Error(et);Qt.traceDeprecation?console.trace(et):console.error(et),ot=!0}return Q.apply(this,arguments)}return V};var i={},s=/^$/;if(t.NODE_DEBUG){var a=t.NODE_DEBUG;a=a.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),s=new RegExp("^"+a+"$","i")}n.debuglog=function(Q){if(Q=Q.toUpperCase(),!i[Q])if(s.test(Q)){var et=Qt.pid;i[Q]=function(){var ot=n.format.apply(n,arguments);console.error("%s %d: %s",Q,et,ot)}}else i[Q]=function(){};return i[Q]};function l(Q,et){var ot={seen:[],stylize:h};return arguments.length>=3&&(ot.depth=arguments[2]),arguments.length>=4&&(ot.colors=arguments[3]),A(et)?ot.showHidden=et:et&&n._extend(ot,et),N(ot.showHidden)&&(ot.showHidden=!1),N(ot.depth)&&(ot.depth=2),N(ot.colors)&&(ot.colors=!1),N(ot.customInspect)&&(ot.customInspect=!0),ot.colors&&(ot.stylize=c),g(ot,Q,ot.depth)}n.inspect=l,l.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},l.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function c(Q,et){var ot=l.styles[et];return ot?"\x1B["+l.colors[ot][0]+"m"+Q+"\x1B["+l.colors[ot][1]+"m":Q}function h(Q,et){return Q}function f(Q){var et={};return Q.forEach(function(ot,V){et[ot]=!0}),et}function g(Q,et,ot){if(Q.customInspect&&et&&xt(et.inspect)&&et.inspect!==n.inspect&&!(et.constructor&&et.constructor.prototype===et)){var V=et.inspect(ot,Q);return O(V)||(V=g(Q,V,ot)),V}var X=d(Q,et);if(X)return X;var lt=Object.keys(et),mt=f(lt);if(Q.showHidden&&(lt=Object.getOwnPropertyNames(et)),U(et)&&(lt.indexOf("message")>=0||lt.indexOf("description")>=0))return m(et);if(lt.length===0){if(xt(et)){var yt=et.name?": "+et.name:"";return Q.stylize("[Function"+yt+"]","special")}if(Y(et))return Q.stylize(RegExp.prototype.toString.call(et),"regexp");if(G(et))return Q.stylize(Date.prototype.toString.call(et),"date");if(U(et))return m(et)}var D="",j=!1,ut=["{","}"];if(_(et)&&(j=!0,ut=["[","]"]),xt(et)){var St=et.name?": "+et.name:"";D=" [Function"+St+"]"}if(Y(et)&&(D=" "+RegExp.prototype.toString.call(et)),G(et)&&(D=" "+Date.prototype.toUTCString.call(et)),U(et)&&(D=" "+m(et)),lt.length===0&&(!j||et.length==0))return ut[0]+D+ut[1];if(ot<0)return Y(et)?Q.stylize(RegExp.prototype.toString.call(et),"regexp"):Q.stylize("[Object]","special");Q.seen.push(et);var Ft;return j?Ft=p(Q,et,ot,mt,lt):Ft=lt.map(function(Mt){return v(Q,et,ot,mt,Mt,j)}),Q.seen.pop(),b(Ft,D,ut)}function d(Q,et){if(N(et))return Q.stylize("undefined","undefined");if(O(et)){var ot="'"+JSON.stringify(et).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return Q.stylize(ot,"string")}if(M(et))return Q.stylize(""+et,"number");if(A(et))return Q.stylize(""+et,"boolean");if(C(et))return Q.stylize("null","null")}function m(Q){return"["+Error.prototype.toString.call(Q)+"]"}function p(Q,et,ot,V,X){for(var lt=[],mt=0,yt=et.length;mt<yt;++mt)Et(et,String(mt))?lt.push(v(Q,et,ot,V,String(mt),!0)):lt.push("");return X.forEach(function(D){D.match(/^\d+$/)||lt.push(v(Q,et,ot,V,D,!0))}),lt}function v(Q,et,ot,V,X,lt){var mt,yt,D;if(D=Object.getOwnPropertyDescriptor(et,X)||{value:et[X]},D.get?D.set?yt=Q.stylize("[Getter/Setter]","special"):yt=Q.stylize("[Getter]","special"):D.set&&(yt=Q.stylize("[Setter]","special")),Et(V,X)||(mt="["+X+"]"),yt||(Q.seen.indexOf(D.value)<0?(C(ot)?yt=g(Q,D.value,null):yt=g(Q,D.value,ot-1),yt.indexOf(`
134
+ `)>-1&&(lt?yt=yt.split(`
135
+ `).map(function(j){return" "+j}).join(`
136
+ `).slice(2):yt=`
137
+ `+yt.split(`
138
+ `).map(function(j){return" "+j}).join(`
139
+ `))):yt=Q.stylize("[Circular]","special")),N(mt)){if(lt&&X.match(/^\d+$/))return yt;mt=JSON.stringify(""+X),mt.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(mt=mt.slice(1,-1),mt=Q.stylize(mt,"name")):(mt=mt.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),mt=Q.stylize(mt,"string"))}return mt+": "+yt}function b(Q,et,ot){var V=Q.reduce(function(X,lt){return lt.indexOf(`
140
+ `)>=0,X+lt.replace(/\u001b\[\d\d?m/g,"").length+1},0);return V>60?ot[0]+(et===""?"":et+`
141
+ `)+" "+Q.join(`,
142
+ `)+" "+ot[1]:ot[0]+et+" "+Q.join(", ")+" "+ot[1]}n.types=qR();function _(Q){return Array.isArray(Q)}n.isArray=_;function A(Q){return typeof Q=="boolean"}n.isBoolean=A;function C(Q){return Q===null}n.isNull=C;function w(Q){return Q==null}n.isNullOrUndefined=w;function M(Q){return typeof Q=="number"}n.isNumber=M;function O(Q){return typeof Q=="string"}n.isString=O;function L(Q){return typeof Q=="symbol"}n.isSymbol=L;function N(Q){return Q===void 0}n.isUndefined=N;function Y(Q){return z(Q)&&st(Q)==="[object RegExp]"}n.isRegExp=Y,n.types.isRegExp=Y;function z(Q){return typeof Q=="object"&&Q!==null}n.isObject=z;function G(Q){return z(Q)&&st(Q)==="[object Date]"}n.isDate=G,n.types.isDate=G;function U(Q){return z(Q)&&(st(Q)==="[object Error]"||Q instanceof Error)}n.isError=U,n.types.isNativeError=U;function xt(Q){return typeof Q=="function"}n.isFunction=xt;function dt(Q){return Q===null||typeof Q=="boolean"||typeof Q=="number"||typeof Q=="string"||typeof Q=="symbol"||typeof Q>"u"}n.isPrimitive=dt,n.isBuffer=WR();function st(Q){return Object.prototype.toString.call(Q)}function at(Q){return Q<10?"0"+Q.toString(10):Q.toString(10)}var _t=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function bt(){var Q=new Date,et=[at(Q.getHours()),at(Q.getMinutes()),at(Q.getSeconds())].join(":");return[Q.getDate(),_t[Q.getMonth()],et].join(" ")}n.log=function(){console.log("%s - %s",bt(),n.format.apply(n,arguments))},n.inherits=wi(),n._extend=function(Q,et){if(!et||!z(et))return Q;for(var ot=Object.keys(et),V=ot.length;V--;)Q[ot[V]]=et[ot[V]];return Q};function Et(Q,et){return Object.prototype.hasOwnProperty.call(Q,et)}var kt=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;n.promisify=function(et){if(typeof et!="function")throw new TypeError('The "original" argument must be of type Function');if(kt&&et[kt]){var ot=et[kt];if(typeof ot!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(ot,kt,{value:ot,enumerable:!1,writable:!1,configurable:!0}),ot}function ot(){for(var V,X,lt=new Promise(function(D,j){V=D,X=j}),mt=[],yt=0;yt<arguments.length;yt++)mt.push(arguments[yt]);mt.push(function(D,j){D?X(D):V(j)});try{et.apply(this,mt)}catch(D){X(D)}return lt}return Object.setPrototypeOf(ot,Object.getPrototypeOf(et)),kt&&Object.defineProperty(ot,kt,{value:ot,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(ot,e(et))},n.promisify.custom=kt;function Ot(Q,et){if(!Q){var ot=new Error("Promise was rejected with a falsy value");ot.reason=Q,Q=ot}return et(Q)}function Lt(Q){if(typeof Q!="function")throw new TypeError('The "original" argument must be of type Function');function et(){for(var ot=[],V=0;V<arguments.length;V++)ot.push(arguments[V]);var X=ot.pop();if(typeof X!="function")throw new TypeError("The last argument must be of type Function");var lt=this,mt=function(){return X.apply(lt,arguments)};Q.apply(this,ot).then(function(yt){Qt.nextTick(mt.bind(null,null,yt))},function(yt){Qt.nextTick(Ot.bind(null,yt,mt))})}return Object.setPrototypeOf(et,Object.getPrototypeOf(Q)),Object.defineProperties(et,e(Q)),et}n.callbackify=Lt}(rc)),rc}var rf,yy;function Sh(){if(yy)return rf;yy=1;var n=[].slice;return rf=function(t,e){if(typeof e=="string"&&(e=t[e]),typeof e!="function")throw new Error("bind() requires a function");var r=n.call(arguments,2);return function(){return e.apply(t,r.concat(n.call(arguments)))}},rf}var sf,vy;function Xv(){return vy||(vy=1,sf=Qi().EventEmitter),sf}var of={},by;function Rl(){return by||(by=1,function(n){Object.defineProperties(n,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});var t={},e={};e.byteLength=f,e.toByteArray=d,e.fromByteArray=v;for(var r=[],i=[],s=typeof Uint8Array<"u"?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",l=0,c=a.length;l<c;++l)r[l]=a[l],i[a.charCodeAt(l)]=l;i[45]=62,i[95]=63;function h(A){var C=A.length;if(C%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var w=A.indexOf("=");w===-1&&(w=C);var M=w===C?0:4-w%4;return[w,M]}function f(A){var C=h(A),w=C[0],M=C[1];return(w+M)*3/4-M}function g(A,C,w){return(C+w)*3/4-w}function d(A){var C,w=h(A),M=w[0],O=w[1],L=new s(g(A,M,O)),N=0,Y=O>0?M-4:M,z;for(z=0;z<Y;z+=4)C=i[A.charCodeAt(z)]<<18|i[A.charCodeAt(z+1)]<<12|i[A.charCodeAt(z+2)]<<6|i[A.charCodeAt(z+3)],L[N++]=C>>16&255,L[N++]=C>>8&255,L[N++]=C&255;return O===2&&(C=i[A.charCodeAt(z)]<<2|i[A.charCodeAt(z+1)]>>4,L[N++]=C&255),O===1&&(C=i[A.charCodeAt(z)]<<10|i[A.charCodeAt(z+1)]<<4|i[A.charCodeAt(z+2)]>>2,L[N++]=C>>8&255,L[N++]=C&255),L}function m(A){return r[A>>18&63]+r[A>>12&63]+r[A>>6&63]+r[A&63]}function p(A,C,w){for(var M,O=[],L=C;L<w;L+=3)M=(A[L]<<16&16711680)+(A[L+1]<<8&65280)+(A[L+2]&255),O.push(m(M));return O.join("")}function v(A){for(var C,w=A.length,M=w%3,O=[],L=16383,N=0,Y=w-M;N<Y;N+=L)O.push(p(A,N,N+L>Y?Y:N+L));return M===1?(C=A[w-1],O.push(r[C>>2]+r[C<<4&63]+"==")):M===2&&(C=(A[w-2]<<8)+A[w-1],O.push(r[C>>10]+r[C>>4&63]+r[C<<2&63]+"=")),O.join("")}var b={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */b.read=function(A,C,w,M,O){var L,N,Y=O*8-M-1,z=(1<<Y)-1,G=z>>1,U=-7,xt=w?O-1:0,dt=w?-1:1,st=A[C+xt];for(xt+=dt,L=st&(1<<-U)-1,st>>=-U,U+=Y;U>0;L=L*256+A[C+xt],xt+=dt,U-=8);for(N=L&(1<<-U)-1,L>>=-U,U+=M;U>0;N=N*256+A[C+xt],xt+=dt,U-=8);if(L===0)L=1-G;else{if(L===z)return N?NaN:(st?-1:1)*(1/0);N=N+Math.pow(2,M),L=L-G}return(st?-1:1)*N*Math.pow(2,L-M)},b.write=function(A,C,w,M,O,L){var N,Y,z,G=L*8-O-1,U=(1<<G)-1,xt=U>>1,dt=O===23?Math.pow(2,-24)-Math.pow(2,-77):0,st=M?0:L-1,at=M?1:-1,_t=C<0||C===0&&1/C<0?1:0;for(C=Math.abs(C),isNaN(C)||C===1/0?(Y=isNaN(C)?1:0,N=U):(N=Math.floor(Math.log(C)/Math.LN2),C*(z=Math.pow(2,-N))<1&&(N--,z*=2),N+xt>=1?C+=dt/z:C+=dt*Math.pow(2,1-xt),C*z>=2&&(N++,z/=2),N+xt>=U?(Y=0,N=U):N+xt>=1?(Y=(C*z-1)*Math.pow(2,O),N=N+xt):(Y=C*Math.pow(2,xt-1)*Math.pow(2,O),N=0));O>=8;A[w+st]=Y&255,st+=at,Y/=256,O-=8);for(N=N<<O|Y,G+=O;G>0;A[w+st]=N&255,st+=at,N/=256,G-=8);A[w+st-at]|=_t*128};/*!
143
+ * The buffer module from node.js, for the browser.
144
+ *
145
+ * @author Feross Aboukhadijeh <https://feross.org>
146
+ * @license MIT
147
+ */(function(A){const C=e,w=b,M=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;A.Buffer=U,A.SlowBuffer=Q,A.INSPECT_MAX_BYTES=50;const O=2147483647;A.kMaxLength=O;const{Uint8Array:L,ArrayBuffer:N,SharedArrayBuffer:Y}=globalThis;U.TYPED_ARRAY_SUPPORT=z(),!U.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 z(){try{const B=new L(1),E={foo:function(){return 42}};return Object.setPrototypeOf(E,L.prototype),Object.setPrototypeOf(B,E),B.foo()===42}catch{return!1}}Object.defineProperty(U.prototype,"parent",{enumerable:!0,get:function(){if(U.isBuffer(this))return this.buffer}}),Object.defineProperty(U.prototype,"offset",{enumerable:!0,get:function(){if(U.isBuffer(this))return this.byteOffset}});function G(B){if(B>O)throw new RangeError('The value "'+B+'" is invalid for option "size"');const E=new L(B);return Object.setPrototypeOf(E,U.prototype),E}function U(B,E,R){if(typeof B=="number"){if(typeof E=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return at(B)}return xt(B,E,R)}U.poolSize=8192;function xt(B,E,R){if(typeof B=="string")return _t(B,E);if(N.isView(B))return Et(B);if(B==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof B);if(Mn(B,N)||B&&Mn(B.buffer,N)||typeof Y<"u"&&(Mn(B,Y)||B&&Mn(B.buffer,Y)))return kt(B,E,R);if(typeof B=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const W=B.valueOf&&B.valueOf();if(W!=null&&W!==B)return U.from(W,E,R);const J=Ot(B);if(J)return J;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof B[Symbol.toPrimitive]=="function")return U.from(B[Symbol.toPrimitive]("string"),E,R);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof B)}U.from=function(B,E,R){return xt(B,E,R)},Object.setPrototypeOf(U.prototype,L.prototype),Object.setPrototypeOf(U,L);function dt(B){if(typeof B!="number")throw new TypeError('"size" argument must be of type number');if(B<0)throw new RangeError('The value "'+B+'" is invalid for option "size"')}function st(B,E,R){return dt(B),B<=0?G(B):E!==void 0?typeof R=="string"?G(B).fill(E,R):G(B).fill(E):G(B)}U.alloc=function(B,E,R){return st(B,E,R)};function at(B){return dt(B),G(B<0?0:Lt(B)|0)}U.allocUnsafe=function(B){return at(B)},U.allocUnsafeSlow=function(B){return at(B)};function _t(B,E){if((typeof E!="string"||E==="")&&(E="utf8"),!U.isEncoding(E))throw new TypeError("Unknown encoding: "+E);const R=et(B,E)|0;let W=G(R);const J=W.write(B,E);return J!==R&&(W=W.slice(0,J)),W}function bt(B){const E=B.length<0?0:Lt(B.length)|0,R=G(E);for(let W=0;W<E;W+=1)R[W]=B[W]&255;return R}function Et(B){if(Mn(B,L)){const E=new L(B);return kt(E.buffer,E.byteOffset,E.byteLength)}return bt(B)}function kt(B,E,R){if(E<0||B.byteLength<E)throw new RangeError('"offset" is outside of buffer bounds');if(B.byteLength<E+(R||0))throw new RangeError('"length" is outside of buffer bounds');let W;return E===void 0&&R===void 0?W=new L(B):R===void 0?W=new L(B,E):W=new L(B,E,R),Object.setPrototypeOf(W,U.prototype),W}function Ot(B){if(U.isBuffer(B)){const E=Lt(B.length)|0,R=G(E);return R.length===0||B.copy(R,0,0,E),R}if(B.length!==void 0)return typeof B.length!="number"||ss(B.length)?G(0):bt(B);if(B.type==="Buffer"&&Array.isArray(B.data))return bt(B.data)}function Lt(B){if(B>=O)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+O.toString(16)+" bytes");return B|0}function Q(B){return+B!=B&&(B=0),U.alloc(+B)}U.isBuffer=function(E){return E!=null&&E._isBuffer===!0&&E!==U.prototype},U.compare=function(E,R){if(Mn(E,L)&&(E=U.from(E,E.offset,E.byteLength)),Mn(R,L)&&(R=U.from(R,R.offset,R.byteLength)),!U.isBuffer(E)||!U.isBuffer(R))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(E===R)return 0;let W=E.length,J=R.length;for(let rt=0,pt=Math.min(W,J);rt<pt;++rt)if(E[rt]!==R[rt]){W=E[rt],J=R[rt];break}return W<J?-1:J<W?1:0},U.isEncoding=function(E){switch(String(E).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},U.concat=function(E,R){if(!Array.isArray(E))throw new TypeError('"list" argument must be an Array of Buffers');if(E.length===0)return U.alloc(0);let W;if(R===void 0)for(R=0,W=0;W<E.length;++W)R+=E[W].length;const J=U.allocUnsafe(R);let rt=0;for(W=0;W<E.length;++W){let pt=E[W];if(Mn(pt,L))rt+pt.length>J.length?(U.isBuffer(pt)||(pt=U.from(pt)),pt.copy(J,rt)):L.prototype.set.call(J,pt,rt);else if(U.isBuffer(pt))pt.copy(J,rt);else throw new TypeError('"list" argument must be an Array of Buffers');rt+=pt.length}return J};function et(B,E){if(U.isBuffer(B))return B.length;if(N.isView(B)||Mn(B,N))return B.byteLength;if(typeof B!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof B);const R=B.length,W=arguments.length>2&&arguments[2]===!0;if(!W&&R===0)return 0;let J=!1;for(;;)switch(E){case"ascii":case"latin1":case"binary":return R;case"utf8":case"utf-8":return ce(B).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return R*2;case"hex":return R>>>1;case"base64":return ne(B).length;default:if(J)return W?-1:ce(B).length;E=(""+E).toLowerCase(),J=!0}}U.byteLength=et;function ot(B,E,R){let W=!1;if((E===void 0||E<0)&&(E=0),E>this.length||((R===void 0||R>this.length)&&(R=this.length),R<=0)||(R>>>=0,E>>>=0,R<=E))return"";for(B||(B="utf8");;)switch(B){case"hex":return Ce(this,E,R);case"utf8":case"utf-8":return Ft(this,E,R);case"ascii":return je(this,E,R);case"latin1":case"binary":return ft(this,E,R);case"base64":return St(this,E,R);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ue(this,E,R);default:if(W)throw new TypeError("Unknown encoding: "+B);B=(B+"").toLowerCase(),W=!0}}U.prototype._isBuffer=!0;function V(B,E,R){const W=B[E];B[E]=B[R],B[R]=W}U.prototype.swap16=function(){const E=this.length;if(E%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let R=0;R<E;R+=2)V(this,R,R+1);return this},U.prototype.swap32=function(){const E=this.length;if(E%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let R=0;R<E;R+=4)V(this,R,R+3),V(this,R+1,R+2);return this},U.prototype.swap64=function(){const E=this.length;if(E%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let R=0;R<E;R+=8)V(this,R,R+7),V(this,R+1,R+6),V(this,R+2,R+5),V(this,R+3,R+4);return this},U.prototype.toString=function(){const E=this.length;return E===0?"":arguments.length===0?Ft(this,0,E):ot.apply(this,arguments)},U.prototype.toLocaleString=U.prototype.toString,U.prototype.equals=function(E){if(!U.isBuffer(E))throw new TypeError("Argument must be a Buffer");return this===E?!0:U.compare(this,E)===0},U.prototype.inspect=function(){let E="";const R=A.INSPECT_MAX_BYTES;return E=this.toString("hex",0,R).replace(/(.{2})/g,"$1 ").trim(),this.length>R&&(E+=" ... "),"<Buffer "+E+">"},M&&(U.prototype[M]=U.prototype.inspect),U.prototype.compare=function(E,R,W,J,rt){if(Mn(E,L)&&(E=U.from(E,E.offset,E.byteLength)),!U.isBuffer(E))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof E);if(R===void 0&&(R=0),W===void 0&&(W=E?E.length:0),J===void 0&&(J=0),rt===void 0&&(rt=this.length),R<0||W>E.length||J<0||rt>this.length)throw new RangeError("out of range index");if(J>=rt&&R>=W)return 0;if(J>=rt)return-1;if(R>=W)return 1;if(R>>>=0,W>>>=0,J>>>=0,rt>>>=0,this===E)return 0;let pt=rt-J,Vt=W-R;const we=Math.min(pt,Vt),pe=this.slice(J,rt),xe=E.slice(R,W);for(let oe=0;oe<we;++oe)if(pe[oe]!==xe[oe]){pt=pe[oe],Vt=xe[oe];break}return pt<Vt?-1:Vt<pt?1:0};function X(B,E,R,W,J){if(B.length===0)return-1;if(typeof R=="string"?(W=R,R=0):R>2147483647?R=2147483647:R<-2147483648&&(R=-2147483648),R=+R,ss(R)&&(R=J?0:B.length-1),R<0&&(R=B.length+R),R>=B.length){if(J)return-1;R=B.length-1}else if(R<0)if(J)R=0;else return-1;if(typeof E=="string"&&(E=U.from(E,W)),U.isBuffer(E))return E.length===0?-1:lt(B,E,R,W,J);if(typeof E=="number")return E=E&255,typeof L.prototype.indexOf=="function"?J?L.prototype.indexOf.call(B,E,R):L.prototype.lastIndexOf.call(B,E,R):lt(B,[E],R,W,J);throw new TypeError("val must be string, number or Buffer")}function lt(B,E,R,W,J){let rt=1,pt=B.length,Vt=E.length;if(W!==void 0&&(W=String(W).toLowerCase(),W==="ucs2"||W==="ucs-2"||W==="utf16le"||W==="utf-16le")){if(B.length<2||E.length<2)return-1;rt=2,pt/=2,Vt/=2,R/=2}function we(xe,oe){return rt===1?xe[oe]:xe.readUInt16BE(oe*rt)}let pe;if(J){let xe=-1;for(pe=R;pe<pt;pe++)if(we(B,pe)===we(E,xe===-1?0:pe-xe)){if(xe===-1&&(xe=pe),pe-xe+1===Vt)return xe*rt}else xe!==-1&&(pe-=pe-xe),xe=-1}else for(R+Vt>pt&&(R=pt-Vt),pe=R;pe>=0;pe--){let xe=!0;for(let oe=0;oe<Vt;oe++)if(we(B,pe+oe)!==we(E,oe)){xe=!1;break}if(xe)return pe}return-1}U.prototype.includes=function(E,R,W){return this.indexOf(E,R,W)!==-1},U.prototype.indexOf=function(E,R,W){return X(this,E,R,W,!0)},U.prototype.lastIndexOf=function(E,R,W){return X(this,E,R,W,!1)};function mt(B,E,R,W){R=Number(R)||0;const J=B.length-R;W?(W=Number(W),W>J&&(W=J)):W=J;const rt=E.length;W>rt/2&&(W=rt/2);let pt;for(pt=0;pt<W;++pt){const Vt=parseInt(E.substr(pt*2,2),16);if(ss(Vt))return pt;B[R+pt]=Vt}return pt}function yt(B,E,R,W){return Jr(ce(E,B.length-R),B,R,W)}function D(B,E,R,W){return Jr(fe(E),B,R,W)}function j(B,E,R,W){return Jr(ne(E),B,R,W)}function ut(B,E,R,W){return Jr(de(E,B.length-R),B,R,W)}U.prototype.write=function(E,R,W,J){if(R===void 0)J="utf8",W=this.length,R=0;else if(W===void 0&&typeof R=="string")J=R,W=this.length,R=0;else if(isFinite(R))R=R>>>0,isFinite(W)?(W=W>>>0,J===void 0&&(J="utf8")):(J=W,W=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const rt=this.length-R;if((W===void 0||W>rt)&&(W=rt),E.length>0&&(W<0||R<0)||R>this.length)throw new RangeError("Attempt to write outside buffer bounds");J||(J="utf8");let pt=!1;for(;;)switch(J){case"hex":return mt(this,E,R,W);case"utf8":case"utf-8":return yt(this,E,R,W);case"ascii":case"latin1":case"binary":return D(this,E,R,W);case"base64":return j(this,E,R,W);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ut(this,E,R,W);default:if(pt)throw new TypeError("Unknown encoding: "+J);J=(""+J).toLowerCase(),pt=!0}},U.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function St(B,E,R){return E===0&&R===B.length?C.fromByteArray(B):C.fromByteArray(B.slice(E,R))}function Ft(B,E,R){R=Math.min(B.length,R);const W=[];let J=E;for(;J<R;){const rt=B[J];let pt=null,Vt=rt>239?4:rt>223?3:rt>191?2:1;if(J+Vt<=R){let we,pe,xe,oe;switch(Vt){case 1:rt<128&&(pt=rt);break;case 2:we=B[J+1],(we&192)===128&&(oe=(rt&31)<<6|we&63,oe>127&&(pt=oe));break;case 3:we=B[J+1],pe=B[J+2],(we&192)===128&&(pe&192)===128&&(oe=(rt&15)<<12|(we&63)<<6|pe&63,oe>2047&&(oe<55296||oe>57343)&&(pt=oe));break;case 4:we=B[J+1],pe=B[J+2],xe=B[J+3],(we&192)===128&&(pe&192)===128&&(xe&192)===128&&(oe=(rt&15)<<18|(we&63)<<12|(pe&63)<<6|xe&63,oe>65535&&oe<1114112&&(pt=oe))}}pt===null?(pt=65533,Vt=1):pt>65535&&(pt-=65536,W.push(pt>>>10&1023|55296),pt=56320|pt&1023),W.push(pt),J+=Vt}return Tt(W)}const Mt=4096;function Tt(B){const E=B.length;if(E<=Mt)return String.fromCharCode.apply(String,B);let R="",W=0;for(;W<E;)R+=String.fromCharCode.apply(String,B.slice(W,W+=Mt));return R}function je(B,E,R){let W="";R=Math.min(B.length,R);for(let J=E;J<R;++J)W+=String.fromCharCode(B[J]&127);return W}function ft(B,E,R){let W="";R=Math.min(B.length,R);for(let J=E;J<R;++J)W+=String.fromCharCode(B[J]);return W}function Ce(B,E,R){const W=B.length;(!E||E<0)&&(E=0),(!R||R<0||R>W)&&(R=W);let J="";for(let rt=E;rt<R;++rt)J+=Nl[B[rt]];return J}function ue(B,E,R){const W=B.slice(E,R);let J="";for(let rt=0;rt<W.length-1;rt+=2)J+=String.fromCharCode(W[rt]+W[rt+1]*256);return J}U.prototype.slice=function(E,R){const W=this.length;E=~~E,R=R===void 0?W:~~R,E<0?(E+=W,E<0&&(E=0)):E>W&&(E=W),R<0?(R+=W,R<0&&(R=0)):R>W&&(R=W),R<E&&(R=E);const J=this.subarray(E,R);return Object.setPrototypeOf(J,U.prototype),J};function te(B,E,R){if(B%1!==0||B<0)throw new RangeError("offset is not uint");if(B+E>R)throw new RangeError("Trying to access beyond buffer length")}U.prototype.readUintLE=U.prototype.readUIntLE=function(E,R,W){E=E>>>0,R=R>>>0,W||te(E,R,this.length);let J=this[E],rt=1,pt=0;for(;++pt<R&&(rt*=256);)J+=this[E+pt]*rt;return J},U.prototype.readUintBE=U.prototype.readUIntBE=function(E,R,W){E=E>>>0,R=R>>>0,W||te(E,R,this.length);let J=this[E+--R],rt=1;for(;R>0&&(rt*=256);)J+=this[E+--R]*rt;return J},U.prototype.readUint8=U.prototype.readUInt8=function(E,R){return E=E>>>0,R||te(E,1,this.length),this[E]},U.prototype.readUint16LE=U.prototype.readUInt16LE=function(E,R){return E=E>>>0,R||te(E,2,this.length),this[E]|this[E+1]<<8},U.prototype.readUint16BE=U.prototype.readUInt16BE=function(E,R){return E=E>>>0,R||te(E,2,this.length),this[E]<<8|this[E+1]},U.prototype.readUint32LE=U.prototype.readUInt32LE=function(E,R){return E=E>>>0,R||te(E,4,this.length),(this[E]|this[E+1]<<8|this[E+2]<<16)+this[E+3]*16777216},U.prototype.readUint32BE=U.prototype.readUInt32BE=function(E,R){return E=E>>>0,R||te(E,4,this.length),this[E]*16777216+(this[E+1]<<16|this[E+2]<<8|this[E+3])},U.prototype.readBigUInt64LE=Kn(function(E){E=E>>>0,K(E,"offset");const R=this[E],W=this[E+7];(R===void 0||W===void 0)&&nt(E,this.length-8);const J=R+this[++E]*2**8+this[++E]*2**16+this[++E]*2**24,rt=this[++E]+this[++E]*2**8+this[++E]*2**16+W*2**24;return BigInt(J)+(BigInt(rt)<<BigInt(32))}),U.prototype.readBigUInt64BE=Kn(function(E){E=E>>>0,K(E,"offset");const R=this[E],W=this[E+7];(R===void 0||W===void 0)&&nt(E,this.length-8);const J=R*2**24+this[++E]*2**16+this[++E]*2**8+this[++E],rt=this[++E]*2**24+this[++E]*2**16+this[++E]*2**8+W;return(BigInt(J)<<BigInt(32))+BigInt(rt)}),U.prototype.readIntLE=function(E,R,W){E=E>>>0,R=R>>>0,W||te(E,R,this.length);let J=this[E],rt=1,pt=0;for(;++pt<R&&(rt*=256);)J+=this[E+pt]*rt;return rt*=128,J>=rt&&(J-=Math.pow(2,8*R)),J},U.prototype.readIntBE=function(E,R,W){E=E>>>0,R=R>>>0,W||te(E,R,this.length);let J=R,rt=1,pt=this[E+--J];for(;J>0&&(rt*=256);)pt+=this[E+--J]*rt;return rt*=128,pt>=rt&&(pt-=Math.pow(2,8*R)),pt},U.prototype.readInt8=function(E,R){return E=E>>>0,R||te(E,1,this.length),this[E]&128?(255-this[E]+1)*-1:this[E]},U.prototype.readInt16LE=function(E,R){E=E>>>0,R||te(E,2,this.length);const W=this[E]|this[E+1]<<8;return W&32768?W|4294901760:W},U.prototype.readInt16BE=function(E,R){E=E>>>0,R||te(E,2,this.length);const W=this[E+1]|this[E]<<8;return W&32768?W|4294901760:W},U.prototype.readInt32LE=function(E,R){return E=E>>>0,R||te(E,4,this.length),this[E]|this[E+1]<<8|this[E+2]<<16|this[E+3]<<24},U.prototype.readInt32BE=function(E,R){return E=E>>>0,R||te(E,4,this.length),this[E]<<24|this[E+1]<<16|this[E+2]<<8|this[E+3]},U.prototype.readBigInt64LE=Kn(function(E){E=E>>>0,K(E,"offset");const R=this[E],W=this[E+7];(R===void 0||W===void 0)&&nt(E,this.length-8);const J=this[E+4]+this[E+5]*2**8+this[E+6]*2**16+(W<<24);return(BigInt(J)<<BigInt(32))+BigInt(R+this[++E]*2**8+this[++E]*2**16+this[++E]*2**24)}),U.prototype.readBigInt64BE=Kn(function(E){E=E>>>0,K(E,"offset");const R=this[E],W=this[E+7];(R===void 0||W===void 0)&&nt(E,this.length-8);const J=(R<<24)+this[++E]*2**16+this[++E]*2**8+this[++E];return(BigInt(J)<<BigInt(32))+BigInt(this[++E]*2**24+this[++E]*2**16+this[++E]*2**8+W)}),U.prototype.readFloatLE=function(E,R){return E=E>>>0,R||te(E,4,this.length),w.read(this,E,!0,23,4)},U.prototype.readFloatBE=function(E,R){return E=E>>>0,R||te(E,4,this.length),w.read(this,E,!1,23,4)},U.prototype.readDoubleLE=function(E,R){return E=E>>>0,R||te(E,8,this.length),w.read(this,E,!0,52,8)},U.prototype.readDoubleBE=function(E,R){return E=E>>>0,R||te(E,8,this.length),w.read(this,E,!1,52,8)};function re(B,E,R,W,J,rt){if(!U.isBuffer(B))throw new TypeError('"buffer" argument must be a Buffer instance');if(E>J||E<rt)throw new RangeError('"value" argument is out of bounds');if(R+W>B.length)throw new RangeError("Index out of range")}U.prototype.writeUintLE=U.prototype.writeUIntLE=function(E,R,W,J){if(E=+E,R=R>>>0,W=W>>>0,!J){const Vt=Math.pow(2,8*W)-1;re(this,E,R,W,Vt,0)}let rt=1,pt=0;for(this[R]=E&255;++pt<W&&(rt*=256);)this[R+pt]=E/rt&255;return R+W},U.prototype.writeUintBE=U.prototype.writeUIntBE=function(E,R,W,J){if(E=+E,R=R>>>0,W=W>>>0,!J){const Vt=Math.pow(2,8*W)-1;re(this,E,R,W,Vt,0)}let rt=W-1,pt=1;for(this[R+rt]=E&255;--rt>=0&&(pt*=256);)this[R+rt]=E/pt&255;return R+W},U.prototype.writeUint8=U.prototype.writeUInt8=function(E,R,W){return E=+E,R=R>>>0,W||re(this,E,R,1,255,0),this[R]=E&255,R+1},U.prototype.writeUint16LE=U.prototype.writeUInt16LE=function(E,R,W){return E=+E,R=R>>>0,W||re(this,E,R,2,65535,0),this[R]=E&255,this[R+1]=E>>>8,R+2},U.prototype.writeUint16BE=U.prototype.writeUInt16BE=function(E,R,W){return E=+E,R=R>>>0,W||re(this,E,R,2,65535,0),this[R]=E>>>8,this[R+1]=E&255,R+2},U.prototype.writeUint32LE=U.prototype.writeUInt32LE=function(E,R,W){return E=+E,R=R>>>0,W||re(this,E,R,4,4294967295,0),this[R+3]=E>>>24,this[R+2]=E>>>16,this[R+1]=E>>>8,this[R]=E&255,R+4},U.prototype.writeUint32BE=U.prototype.writeUInt32BE=function(E,R,W){return E=+E,R=R>>>0,W||re(this,E,R,4,4294967295,0),this[R]=E>>>24,this[R+1]=E>>>16,this[R+2]=E>>>8,this[R+3]=E&255,R+4};function Ve(B,E,R,W,J){q(E,W,J,B,R,7);let rt=Number(E&BigInt(4294967295));B[R++]=rt,rt=rt>>8,B[R++]=rt,rt=rt>>8,B[R++]=rt,rt=rt>>8,B[R++]=rt;let pt=Number(E>>BigInt(32)&BigInt(4294967295));return B[R++]=pt,pt=pt>>8,B[R++]=pt,pt=pt>>8,B[R++]=pt,pt=pt>>8,B[R++]=pt,R}function ke(B,E,R,W,J){q(E,W,J,B,R,7);let rt=Number(E&BigInt(4294967295));B[R+7]=rt,rt=rt>>8,B[R+6]=rt,rt=rt>>8,B[R+5]=rt,rt=rt>>8,B[R+4]=rt;let pt=Number(E>>BigInt(32)&BigInt(4294967295));return B[R+3]=pt,pt=pt>>8,B[R+2]=pt,pt=pt>>8,B[R+1]=pt,pt=pt>>8,B[R]=pt,R+8}U.prototype.writeBigUInt64LE=Kn(function(E,R=0){return Ve(this,E,R,BigInt(0),BigInt("0xffffffffffffffff"))}),U.prototype.writeBigUInt64BE=Kn(function(E,R=0){return ke(this,E,R,BigInt(0),BigInt("0xffffffffffffffff"))}),U.prototype.writeIntLE=function(E,R,W,J){if(E=+E,R=R>>>0,!J){const we=Math.pow(2,8*W-1);re(this,E,R,W,we-1,-we)}let rt=0,pt=1,Vt=0;for(this[R]=E&255;++rt<W&&(pt*=256);)E<0&&Vt===0&&this[R+rt-1]!==0&&(Vt=1),this[R+rt]=(E/pt>>0)-Vt&255;return R+W},U.prototype.writeIntBE=function(E,R,W,J){if(E=+E,R=R>>>0,!J){const we=Math.pow(2,8*W-1);re(this,E,R,W,we-1,-we)}let rt=W-1,pt=1,Vt=0;for(this[R+rt]=E&255;--rt>=0&&(pt*=256);)E<0&&Vt===0&&this[R+rt+1]!==0&&(Vt=1),this[R+rt]=(E/pt>>0)-Vt&255;return R+W},U.prototype.writeInt8=function(E,R,W){return E=+E,R=R>>>0,W||re(this,E,R,1,127,-128),E<0&&(E=255+E+1),this[R]=E&255,R+1},U.prototype.writeInt16LE=function(E,R,W){return E=+E,R=R>>>0,W||re(this,E,R,2,32767,-32768),this[R]=E&255,this[R+1]=E>>>8,R+2},U.prototype.writeInt16BE=function(E,R,W){return E=+E,R=R>>>0,W||re(this,E,R,2,32767,-32768),this[R]=E>>>8,this[R+1]=E&255,R+2},U.prototype.writeInt32LE=function(E,R,W){return E=+E,R=R>>>0,W||re(this,E,R,4,2147483647,-2147483648),this[R]=E&255,this[R+1]=E>>>8,this[R+2]=E>>>16,this[R+3]=E>>>24,R+4},U.prototype.writeInt32BE=function(E,R,W){return E=+E,R=R>>>0,W||re(this,E,R,4,2147483647,-2147483648),E<0&&(E=4294967295+E+1),this[R]=E>>>24,this[R+1]=E>>>16,this[R+2]=E>>>8,this[R+3]=E&255,R+4},U.prototype.writeBigInt64LE=Kn(function(E,R=0){return Ve(this,E,R,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),U.prototype.writeBigInt64BE=Kn(function(E,R=0){return ke(this,E,R,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function on(B,E,R,W,J,rt){if(R+W>B.length)throw new RangeError("Index out of range");if(R<0)throw new RangeError("Index out of range")}function Ye(B,E,R,W,J){return E=+E,R=R>>>0,J||on(B,E,R,4),w.write(B,E,R,W,23,4),R+4}U.prototype.writeFloatLE=function(E,R,W){return Ye(this,E,R,!0,W)},U.prototype.writeFloatBE=function(E,R,W){return Ye(this,E,R,!1,W)};function ye(B,E,R,W,J){return E=+E,R=R>>>0,J||on(B,E,R,8),w.write(B,E,R,W,52,8),R+8}U.prototype.writeDoubleLE=function(E,R,W){return ye(this,E,R,!0,W)},U.prototype.writeDoubleBE=function(E,R,W){return ye(this,E,R,!1,W)},U.prototype.copy=function(E,R,W,J){if(!U.isBuffer(E))throw new TypeError("argument should be a Buffer");if(W||(W=0),!J&&J!==0&&(J=this.length),R>=E.length&&(R=E.length),R||(R=0),J>0&&J<W&&(J=W),J===W||E.length===0||this.length===0)return 0;if(R<0)throw new RangeError("targetStart out of bounds");if(W<0||W>=this.length)throw new RangeError("Index out of range");if(J<0)throw new RangeError("sourceEnd out of bounds");J>this.length&&(J=this.length),E.length-R<J-W&&(J=E.length-R+W);const rt=J-W;return this===E&&typeof L.prototype.copyWithin=="function"?this.copyWithin(R,W,J):L.prototype.set.call(E,this.subarray(W,J),R),rt},U.prototype.fill=function(E,R,W,J){if(typeof E=="string"){if(typeof R=="string"?(J=R,R=0,W=this.length):typeof W=="string"&&(J=W,W=this.length),J!==void 0&&typeof J!="string")throw new TypeError("encoding must be a string");if(typeof J=="string"&&!U.isEncoding(J))throw new TypeError("Unknown encoding: "+J);if(E.length===1){const pt=E.charCodeAt(0);(J==="utf8"&&pt<128||J==="latin1")&&(E=pt)}}else typeof E=="number"?E=E&255:typeof E=="boolean"&&(E=Number(E));if(R<0||this.length<R||this.length<W)throw new RangeError("Out of range index");if(W<=R)return this;R=R>>>0,W=W===void 0?this.length:W>>>0,E||(E=0);let rt;if(typeof E=="number")for(rt=R;rt<W;++rt)this[rt]=E;else{const pt=U.isBuffer(E)?E:U.from(E,J),Vt=pt.length;if(Vt===0)throw new TypeError('The value "'+E+'" is invalid for argument "value"');for(rt=0;rt<W-R;++rt)this[rt+R]=pt[rt%Vt]}return this};const Rn={};function T(B,E,R){Rn[B]=class extends R{constructor(){super(),Object.defineProperty(this,"message",{value:E.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${B}]`,this.stack,delete this.name}get code(){return B}set code(J){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:J,writable:!0})}toString(){return`${this.name} [${B}]: ${this.message}`}}}T("ERR_BUFFER_OUT_OF_BOUNDS",function(B){return B?`${B} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),T("ERR_INVALID_ARG_TYPE",function(B,E){return`The "${B}" argument must be of type number. Received type ${typeof E}`},TypeError),T("ERR_OUT_OF_RANGE",function(B,E,R){let W=`The value of "${B}" is out of range.`,J=R;return Number.isInteger(R)&&Math.abs(R)>2**32?J=S(String(R)):typeof R=="bigint"&&(J=String(R),(R>BigInt(2)**BigInt(32)||R<-(BigInt(2)**BigInt(32)))&&(J=S(J)),J+="n"),W+=` It must be ${E}. Received ${J}`,W},RangeError);function S(B){let E="",R=B.length;const W=B[0]==="-"?1:0;for(;R>=W+4;R-=3)E=`_${B.slice(R-3,R)}${E}`;return`${B.slice(0,R)}${E}`}function k(B,E,R){K(E,"offset"),(B[E]===void 0||B[E+R]===void 0)&&nt(E,B.length-(R+1))}function q(B,E,R,W,J,rt){if(B>R||B<E){const pt=typeof E=="bigint"?"n":"";let Vt;throw E===0||E===BigInt(0)?Vt=`>= 0${pt} and < 2${pt} ** ${(rt+1)*8}${pt}`:Vt=`>= -(2${pt} ** ${(rt+1)*8-1}${pt}) and < 2 ** ${(rt+1)*8-1}${pt}`,new Rn.ERR_OUT_OF_RANGE("value",Vt,B)}k(W,J,rt)}function K(B,E){if(typeof B!="number")throw new Rn.ERR_INVALID_ARG_TYPE(E,"number",B)}function nt(B,E,R){throw Math.floor(B)!==B?(K(B,R),new Rn.ERR_OUT_OF_RANGE("offset","an integer",B)):E<0?new Rn.ERR_BUFFER_OUT_OF_BOUNDS:new Rn.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${E}`,B)}const ht=/[^+/0-9A-Za-z-_]/g;function Ut(B){if(B=B.split("=")[0],B=B.trim().replace(ht,""),B.length<2)return"";for(;B.length%4!==0;)B=B+"=";return B}function ce(B,E){E=E||1/0;let R;const W=B.length;let J=null;const rt=[];for(let pt=0;pt<W;++pt){if(R=B.charCodeAt(pt),R>55295&&R<57344){if(!J){if(R>56319){(E-=3)>-1&&rt.push(239,191,189);continue}else if(pt+1===W){(E-=3)>-1&&rt.push(239,191,189);continue}J=R;continue}if(R<56320){(E-=3)>-1&&rt.push(239,191,189),J=R;continue}R=(J-55296<<10|R-56320)+65536}else J&&(E-=3)>-1&&rt.push(239,191,189);if(J=null,R<128){if((E-=1)<0)break;rt.push(R)}else if(R<2048){if((E-=2)<0)break;rt.push(R>>6|192,R&63|128)}else if(R<65536){if((E-=3)<0)break;rt.push(R>>12|224,R>>6&63|128,R&63|128)}else if(R<1114112){if((E-=4)<0)break;rt.push(R>>18|240,R>>12&63|128,R>>6&63|128,R&63|128)}else throw new Error("Invalid code point")}return rt}function fe(B){const E=[];for(let R=0;R<B.length;++R)E.push(B.charCodeAt(R)&255);return E}function de(B,E){let R,W,J;const rt=[];for(let pt=0;pt<B.length&&!((E-=2)<0);++pt)R=B.charCodeAt(pt),W=R>>8,J=R%256,rt.push(J),rt.push(W);return rt}function ne(B){return C.toByteArray(Ut(B))}function Jr(B,E,R,W){let J;for(J=0;J<W&&!(J+R>=E.length||J>=B.length);++J)E[J+R]=B[J];return J}function Mn(B,E){return B instanceof E||B!=null&&B.constructor!=null&&B.constructor.name!=null&&B.constructor.name===E.name}function ss(B){return B!==B}const Nl=function(){const B="0123456789abcdef",E=new Array(256);for(let R=0;R<16;++R){const W=R*16;for(let J=0;J<16;++J)E[W+J]=B[R]+B[J]}return E}();function Kn(B){return typeof BigInt>"u"?ho:B}function ho(){throw new Error("BigInt not supported")}})(t);const _=t.Buffer;n.Blob=t.Blob,n.BlobOptions=t.BlobOptions,n.Buffer=t.Buffer,n.File=t.File,n.FileOptions=t.FileOptions,n.INSPECT_MAX_BYTES=t.INSPECT_MAX_BYTES,n.SlowBuffer=t.SlowBuffer,n.TranscodeEncoding=t.TranscodeEncoding,n.atob=t.atob,n.btoa=t.btoa,n.constants=t.constants,n.default=_,n.isAscii=t.isAscii,n.isUtf8=t.isUtf8,n.kMaxLength=t.kMaxLength,n.kStringMaxLength=t.kStringMaxLength,n.resolveObjectURL=t.resolveObjectURL,n.transcode=t.transcode}(of)),of}var af,_y;function HR(){if(_y)return af;_y=1;function n(p,v){var b=Object.keys(p);if(Object.getOwnPropertySymbols){var _=Object.getOwnPropertySymbols(p);v&&(_=_.filter(function(A){return Object.getOwnPropertyDescriptor(p,A).enumerable})),b.push.apply(b,_)}return b}function t(p){for(var v=1;v<arguments.length;v++){var b=arguments[v]!=null?arguments[v]:{};v%2?n(Object(b),!0).forEach(function(_){e(p,_,b[_])}):Object.getOwnPropertyDescriptors?Object.defineProperties(p,Object.getOwnPropertyDescriptors(b)):n(Object(b)).forEach(function(_){Object.defineProperty(p,_,Object.getOwnPropertyDescriptor(b,_))})}return p}function e(p,v,b){return v=a(v),v in p?Object.defineProperty(p,v,{value:b,enumerable:!0,configurable:!0,writable:!0}):p[v]=b,p}function r(p,v){if(!(p instanceof v))throw new TypeError("Cannot call a class as a function")}function i(p,v){for(var b=0;b<v.length;b++){var _=v[b];_.enumerable=_.enumerable||!1,_.configurable=!0,"value"in _&&(_.writable=!0),Object.defineProperty(p,a(_.key),_)}}function s(p,v,b){return v&&i(p.prototype,v),Object.defineProperty(p,"prototype",{writable:!1}),p}function a(p){var v=l(p,"string");return typeof v=="symbol"?v:String(v)}function l(p,v){if(typeof p!="object"||p===null)return p;var b=p[Symbol.toPrimitive];if(b!==void 0){var _=b.call(p,v);if(typeof _!="object")return _;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(p)}var c=Rl(),h=c.Buffer,f=ns(),g=f.inspect,d=g&&g.custom||"inspect";function m(p,v,b){h.prototype.copy.call(p,v,b)}return af=function(){function p(){r(this,p),this.head=null,this.tail=null,this.length=0}return s(p,[{key:"push",value:function(b){var _={data:b,next:null};this.length>0?this.tail.next=_:this.head=_,this.tail=_,++this.length}},{key:"unshift",value:function(b){var _={data:b,next:this.head};this.length===0&&(this.tail=_),this.head=_,++this.length}},{key:"shift",value:function(){if(this.length!==0){var b=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,b}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(b){if(this.length===0)return"";for(var _=this.head,A=""+_.data;_=_.next;)A+=b+_.data;return A}},{key:"concat",value:function(b){if(this.length===0)return h.alloc(0);for(var _=h.allocUnsafe(b>>>0),A=this.head,C=0;A;)m(A.data,_,C),C+=A.data.length,A=A.next;return _}},{key:"consume",value:function(b,_){var A;return b<this.head.data.length?(A=this.head.data.slice(0,b),this.head.data=this.head.data.slice(b)):b===this.head.data.length?A=this.shift():A=_?this._getString(b):this._getBuffer(b),A}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(b){var _=this.head,A=1,C=_.data;for(b-=C.length;_=_.next;){var w=_.data,M=b>w.length?w.length:b;if(M===w.length?C+=w:C+=w.slice(0,b),b-=M,b===0){M===w.length?(++A,_.next?this.head=_.next:this.head=this.tail=null):(this.head=_,_.data=w.slice(M));break}++A}return this.length-=A,C}},{key:"_getBuffer",value:function(b){var _=h.allocUnsafe(b),A=this.head,C=1;for(A.data.copy(_),b-=A.data.length;A=A.next;){var w=A.data,M=b>w.length?w.length:b;if(w.copy(_,_.length-b,0,M),b-=M,b===0){M===w.length?(++C,A.next?this.head=A.next:this.head=this.tail=null):(this.head=A,A.data=w.slice(M));break}++C}return this.length-=C,_}},{key:d,value:function(b,_){return g(this,t(t({},_),{},{depth:0,customInspect:!1}))}}]),p}(),af}var lf,wy;function Jv(){if(wy)return lf;wy=1;function n(a,l){var c=this,h=this._readableState&&this._readableState.destroyed,f=this._writableState&&this._writableState.destroyed;return h||f?(l?l(a):a&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,Qt.nextTick(i,this,a)):Qt.nextTick(i,this,a)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(a||null,function(g){!l&&g?c._writableState?c._writableState.errorEmitted?Qt.nextTick(e,c):(c._writableState.errorEmitted=!0,Qt.nextTick(t,c,g)):Qt.nextTick(t,c,g):l?(Qt.nextTick(e,c),l(g)):Qt.nextTick(e,c)}),this)}function t(a,l){i(a,l),e(a)}function e(a){a._writableState&&!a._writableState.emitClose||a._readableState&&!a._readableState.emitClose||a.emit("close")}function r(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function i(a,l){a.emit("error",l)}function s(a,l){var c=a._readableState,h=a._writableState;c&&c.autoDestroy||h&&h.autoDestroy?a.destroy(l):a.emit("error",l)}return lf={destroy:n,undestroy:r,errorOrDestroy:s},lf}var uf={},xy;function rs(){if(xy)return uf;xy=1;function n(l,c){l.prototype=Object.create(c.prototype),l.prototype.constructor=l,l.__proto__=c}var t={};function e(l,c,h){h||(h=Error);function f(d,m,p){return typeof c=="string"?c:c(d,m,p)}var g=function(d){n(m,d);function m(p,v,b){return d.call(this,f(p,v,b))||this}return m}(h);g.prototype.name=h.name,g.prototype.code=l,t[l]=g}function r(l,c){if(Array.isArray(l)){var h=l.length;return l=l.map(function(f){return String(f)}),h>2?"one of ".concat(c," ").concat(l.slice(0,h-1).join(", "),", or ")+l[h-1]:h===2?"one of ".concat(c," ").concat(l[0]," or ").concat(l[1]):"of ".concat(c," ").concat(l[0])}else return"of ".concat(c," ").concat(String(l))}function i(l,c,h){return l.substr(0,c.length)===c}function s(l,c,h){return(h===void 0||h>l.length)&&(h=l.length),l.substring(h-c.length,h)===c}function a(l,c,h){return typeof h!="number"&&(h=0),h+c.length>l.length?!1:l.indexOf(c,h)!==-1}return e("ERR_INVALID_OPT_VALUE",function(l,c){return'The value "'+c+'" is invalid for option "'+l+'"'},TypeError),e("ERR_INVALID_ARG_TYPE",function(l,c,h){var f;typeof c=="string"&&i(c,"not ")?(f="must not be",c=c.replace(/^not /,"")):f="must be";var g;if(s(l," argument"))g="The ".concat(l," ").concat(f," ").concat(r(c,"type"));else{var d=a(l,".")?"property":"argument";g='The "'.concat(l,'" ').concat(d," ").concat(f," ").concat(r(c,"type"))}return g+=". Received type ".concat(typeof h),g},TypeError),e("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),e("ERR_METHOD_NOT_IMPLEMENTED",function(l){return"The "+l+" method is not implemented"}),e("ERR_STREAM_PREMATURE_CLOSE","Premature close"),e("ERR_STREAM_DESTROYED",function(l){return"Cannot call "+l+" after a stream was destroyed"}),e("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),e("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),e("ERR_STREAM_WRITE_AFTER_END","write after end"),e("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),e("ERR_UNKNOWN_ENCODING",function(l){return"Unknown encoding: "+l},TypeError),e("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),uf.codes=t,uf}var cf,Sy;function Zv(){if(Sy)return cf;Sy=1;var n=rs().codes.ERR_INVALID_OPT_VALUE;function t(r,i,s){return r.highWaterMark!=null?r.highWaterMark:i?r[s]:null}function e(r,i,s,a){var l=t(i,a,s);if(l!=null){if(!(isFinite(l)&&Math.floor(l)===l)||l<0){var c=a?s:"highWaterMark";throw new n(c,l)}return Math.floor(l)}return r.objectMode?16:16*1024}return cf={getHighWaterMark:e},cf}var ff,Ey;function zR(){if(Ey)return ff;Ey=1,ff=n;function n(e,r){if(t("noDeprecation"))return e;var i=!1;function s(){if(!i){if(t("throwDeprecation"))throw new Error(r);t("traceDeprecation")?console.trace(r):console.warn(r),i=!0}return e.apply(this,arguments)}return s}function t(e){try{if(!He.localStorage)return!1}catch{return!1}var r=He.localStorage[e];return r==null?!1:String(r).toLowerCase()==="true"}return ff}var hf,Ay;function Qv(){if(Ay)return hf;Ay=1,hf=N;function n(V){var X=this;this.next=null,this.entry=null,this.finish=function(){ot(X,V)}}var t;N.WritableState=O;var e={deprecate:zR()},r=Xv(),i=Rl().Buffer,s=(typeof He<"u"?He:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function a(V){return i.from(V)}function l(V){return i.isBuffer(V)||V instanceof s}var c=Jv(),h=Zv(),f=h.getHighWaterMark,g=rs().codes,d=g.ERR_INVALID_ARG_TYPE,m=g.ERR_METHOD_NOT_IMPLEMENTED,p=g.ERR_MULTIPLE_CALLBACK,v=g.ERR_STREAM_CANNOT_PIPE,b=g.ERR_STREAM_DESTROYED,_=g.ERR_STREAM_NULL_VALUES,A=g.ERR_STREAM_WRITE_AFTER_END,C=g.ERR_UNKNOWN_ENCODING,w=c.errorOrDestroy;wi()(N,r);function M(){}function O(V,X,lt){t=t||Ki(),V=V||{},typeof lt!="boolean"&&(lt=X instanceof t),this.objectMode=!!V.objectMode,lt&&(this.objectMode=this.objectMode||!!V.writableObjectMode),this.highWaterMark=f(this,V,"writableHighWaterMark",lt),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var mt=V.decodeStrings===!1;this.decodeStrings=!mt,this.defaultEncoding=V.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(yt){at(X,yt)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=V.emitClose!==!1,this.autoDestroy=!!V.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new n(this)}O.prototype.getBuffer=function(){for(var X=this.bufferedRequest,lt=[];X;)lt.push(X),X=X.next;return lt},function(){try{Object.defineProperty(O.prototype,"buffer",{get:e.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}();var L;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(L=Function.prototype[Symbol.hasInstance],Object.defineProperty(N,Symbol.hasInstance,{value:function(X){return L.call(this,X)?!0:this!==N?!1:X&&X._writableState instanceof O}})):L=function(X){return X instanceof this};function N(V){t=t||Ki();var X=this instanceof t;if(!X&&!L.call(N,this))return new N(V);this._writableState=new O(V,this,X),this.writable=!0,V&&(typeof V.write=="function"&&(this._write=V.write),typeof V.writev=="function"&&(this._writev=V.writev),typeof V.destroy=="function"&&(this._destroy=V.destroy),typeof V.final=="function"&&(this._final=V.final)),r.call(this)}N.prototype.pipe=function(){w(this,new v)};function Y(V,X){var lt=new A;w(V,lt),Qt.nextTick(X,lt)}function z(V,X,lt,mt){var yt;return lt===null?yt=new _:typeof lt!="string"&&!X.objectMode&&(yt=new d("chunk",["string","Buffer"],lt)),yt?(w(V,yt),Qt.nextTick(mt,yt),!1):!0}N.prototype.write=function(V,X,lt){var mt=this._writableState,yt=!1,D=!mt.objectMode&&l(V);return D&&!i.isBuffer(V)&&(V=a(V)),typeof X=="function"&&(lt=X,X=null),D?X="buffer":X||(X=mt.defaultEncoding),typeof lt!="function"&&(lt=M),mt.ending?Y(this,lt):(D||z(this,mt,V,lt))&&(mt.pendingcb++,yt=U(this,mt,D,V,X,lt)),yt},N.prototype.cork=function(){this._writableState.corked++},N.prototype.uncork=function(){var V=this._writableState;V.corked&&(V.corked--,!V.writing&&!V.corked&&!V.bufferProcessing&&V.bufferedRequest&&Et(this,V))},N.prototype.setDefaultEncoding=function(X){if(typeof X=="string"&&(X=X.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((X+"").toLowerCase())>-1))throw new C(X);return this._writableState.defaultEncoding=X,this},Object.defineProperty(N.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function G(V,X,lt){return!V.objectMode&&V.decodeStrings!==!1&&typeof X=="string"&&(X=i.from(X,lt)),X}Object.defineProperty(N.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function U(V,X,lt,mt,yt,D){if(!lt){var j=G(X,mt,yt);mt!==j&&(lt=!0,yt="buffer",mt=j)}var ut=X.objectMode?1:mt.length;X.length+=ut;var St=X.length<X.highWaterMark;if(St||(X.needDrain=!0),X.writing||X.corked){var Ft=X.lastBufferedRequest;X.lastBufferedRequest={chunk:mt,encoding:yt,isBuf:lt,callback:D,next:null},Ft?Ft.next=X.lastBufferedRequest:X.bufferedRequest=X.lastBufferedRequest,X.bufferedRequestCount+=1}else xt(V,X,!1,ut,mt,yt,D);return St}function xt(V,X,lt,mt,yt,D,j){X.writelen=mt,X.writecb=j,X.writing=!0,X.sync=!0,X.destroyed?X.onwrite(new b("write")):lt?V._writev(yt,X.onwrite):V._write(yt,D,X.onwrite),X.sync=!1}function dt(V,X,lt,mt,yt){--X.pendingcb,lt?(Qt.nextTick(yt,mt),Qt.nextTick(Q,V,X),V._writableState.errorEmitted=!0,w(V,mt)):(yt(mt),V._writableState.errorEmitted=!0,w(V,mt),Q(V,X))}function st(V){V.writing=!1,V.writecb=null,V.length-=V.writelen,V.writelen=0}function at(V,X){var lt=V._writableState,mt=lt.sync,yt=lt.writecb;if(typeof yt!="function")throw new p;if(st(lt),X)dt(V,lt,mt,X,yt);else{var D=kt(lt)||V.destroyed;!D&&!lt.corked&&!lt.bufferProcessing&&lt.bufferedRequest&&Et(V,lt),mt?Qt.nextTick(_t,V,lt,D,yt):_t(V,lt,D,yt)}}function _t(V,X,lt,mt){lt||bt(V,X),X.pendingcb--,mt(),Q(V,X)}function bt(V,X){X.length===0&&X.needDrain&&(X.needDrain=!1,V.emit("drain"))}function Et(V,X){X.bufferProcessing=!0;var lt=X.bufferedRequest;if(V._writev&&lt&&lt.next){var mt=X.bufferedRequestCount,yt=new Array(mt),D=X.corkedRequestsFree;D.entry=lt;for(var j=0,ut=!0;lt;)yt[j]=lt,lt.isBuf||(ut=!1),lt=lt.next,j+=1;yt.allBuffers=ut,xt(V,X,!0,X.length,yt,"",D.finish),X.pendingcb++,X.lastBufferedRequest=null,D.next?(X.corkedRequestsFree=D.next,D.next=null):X.corkedRequestsFree=new n(X),X.bufferedRequestCount=0}else{for(;lt;){var St=lt.chunk,Ft=lt.encoding,Mt=lt.callback,Tt=X.objectMode?1:St.length;if(xt(V,X,!1,Tt,St,Ft,Mt),lt=lt.next,X.bufferedRequestCount--,X.writing)break}lt===null&&(X.lastBufferedRequest=null)}X.bufferedRequest=lt,X.bufferProcessing=!1}N.prototype._write=function(V,X,lt){lt(new m("_write()"))},N.prototype._writev=null,N.prototype.end=function(V,X,lt){var mt=this._writableState;return typeof V=="function"?(lt=V,V=null,X=null):typeof X=="function"&&(lt=X,X=null),V!=null&&this.write(V,X),mt.corked&&(mt.corked=1,this.uncork()),mt.ending||et(this,mt,lt),this},Object.defineProperty(N.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function kt(V){return V.ending&&V.length===0&&V.bufferedRequest===null&&!V.finished&&!V.writing}function Ot(V,X){V._final(function(lt){X.pendingcb--,lt&&w(V,lt),X.prefinished=!0,V.emit("prefinish"),Q(V,X)})}function Lt(V,X){!X.prefinished&&!X.finalCalled&&(typeof V._final=="function"&&!X.destroyed?(X.pendingcb++,X.finalCalled=!0,Qt.nextTick(Ot,V,X)):(X.prefinished=!0,V.emit("prefinish")))}function Q(V,X){var lt=kt(X);if(lt&&(Lt(V,X),X.pendingcb===0&&(X.finished=!0,V.emit("finish"),X.autoDestroy))){var mt=V._readableState;(!mt||mt.autoDestroy&&mt.endEmitted)&&V.destroy()}return lt}function et(V,X,lt){X.ending=!0,Q(V,X),lt&&(X.finished?Qt.nextTick(lt):V.once("finish",lt)),X.ended=!0,V.writable=!1}function ot(V,X,lt){var mt=V.entry;for(V.entry=null;mt;){var yt=mt.callback;X.pendingcb--,yt(lt),mt=mt.next}X.corkedRequestsFree.next=V}return Object.defineProperty(N.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(X){this._writableState&&(this._writableState.destroyed=X)}}),N.prototype.destroy=c.destroy,N.prototype._undestroy=c.undestroy,N.prototype._destroy=function(V,X){X(V)},hf}var df,ky;function Ki(){if(ky)return df;ky=1;var n=Object.keys||function(h){var f=[];for(var g in h)f.push(g);return f};df=a;var t=tb(),e=Qv();wi()(a,t);for(var r=n(e.prototype),i=0;i<r.length;i++){var s=r[i];a.prototype[s]||(a.prototype[s]=e.prototype[s])}function a(h){if(!(this instanceof a))return new a(h);t.call(this,h),e.call(this,h),this.allowHalfOpen=!0,h&&(h.readable===!1&&(this.readable=!1),h.writable===!1&&(this.writable=!1),h.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",l)))}Object.defineProperty(a.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(a.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(a.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function l(){this._writableState.ended||Qt.nextTick(c,this)}function c(h){h.end()}return Object.defineProperty(a.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(f){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=f,this._writableState.destroyed=f)}}),df}var pf={},La={exports:{}};/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */var Ry;function VR(){return Ry||(Ry=1,function(n,t){var e=Rl(),r=e.Buffer;function i(a,l){for(var c in a)l[c]=a[c]}r.from&&r.alloc&&r.allocUnsafe&&r.allocUnsafeSlow?n.exports=e:(i(e,t),t.Buffer=s);function s(a,l,c){return r(a,l,c)}s.prototype=Object.create(r.prototype),i(r,s),s.from=function(a,l,c){if(typeof a=="number")throw new TypeError("Argument must not be a number");return r(a,l,c)},s.alloc=function(a,l,c){if(typeof a!="number")throw new TypeError("Argument must be a number");var h=r(a);return l!==void 0?typeof c=="string"?h.fill(l,c):h.fill(l):h.fill(0),h},s.allocUnsafe=function(a){if(typeof a!="number")throw new TypeError("Argument must be a number");return r(a)},s.allocUnsafeSlow=function(a){if(typeof a!="number")throw new TypeError("Argument must be a number");return e.SlowBuffer(a)}}(La,La.exports)),La.exports}var My;function Cy(){if(My)return pf;My=1;var n=VR().Buffer,t=n.isEncoding||function(_){switch(_=""+_,_&&_.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function e(_){if(!_)return"utf8";for(var A;;)switch(_){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return _;default:if(A)return;_=(""+_).toLowerCase(),A=!0}}function r(_){var A=e(_);if(typeof A!="string"&&(n.isEncoding===t||!t(_)))throw new Error("Unknown encoding: "+_);return A||_}pf.StringDecoder=i;function i(_){this.encoding=r(_);var A;switch(this.encoding){case"utf16le":this.text=g,this.end=d,A=4;break;case"utf8":this.fillLast=c,A=4;break;case"base64":this.text=m,this.end=p,A=3;break;default:this.write=v,this.end=b;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(A)}i.prototype.write=function(_){if(_.length===0)return"";var A,C;if(this.lastNeed){if(A=this.fillLast(_),A===void 0)return"";C=this.lastNeed,this.lastNeed=0}else C=0;return C<_.length?A?A+this.text(_,C):this.text(_,C):A||""},i.prototype.end=f,i.prototype.text=h,i.prototype.fillLast=function(_){if(this.lastNeed<=_.length)return _.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);_.copy(this.lastChar,this.lastTotal-this.lastNeed,0,_.length),this.lastNeed-=_.length};function s(_){return _<=127?0:_>>5===6?2:_>>4===14?3:_>>3===30?4:_>>6===2?-1:-2}function a(_,A,C){var w=A.length-1;if(w<C)return 0;var M=s(A[w]);return M>=0?(M>0&&(_.lastNeed=M-1),M):--w<C||M===-2?0:(M=s(A[w]),M>=0?(M>0&&(_.lastNeed=M-2),M):--w<C||M===-2?0:(M=s(A[w]),M>=0?(M>0&&(M===2?M=0:_.lastNeed=M-3),M):0))}function l(_,A,C){if((A[0]&192)!==128)return _.lastNeed=0,"�";if(_.lastNeed>1&&A.length>1){if((A[1]&192)!==128)return _.lastNeed=1,"�";if(_.lastNeed>2&&A.length>2&&(A[2]&192)!==128)return _.lastNeed=2,"�"}}function c(_){var A=this.lastTotal-this.lastNeed,C=l(this,_);if(C!==void 0)return C;if(this.lastNeed<=_.length)return _.copy(this.lastChar,A,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);_.copy(this.lastChar,A,0,_.length),this.lastNeed-=_.length}function h(_,A){var C=a(this,_,A);if(!this.lastNeed)return _.toString("utf8",A);this.lastTotal=C;var w=_.length-(C-this.lastNeed);return _.copy(this.lastChar,0,w),_.toString("utf8",A,w)}function f(_){var A=_&&_.length?this.write(_):"";return this.lastNeed?A+"�":A}function g(_,A){if((_.length-A)%2===0){var C=_.toString("utf16le",A);if(C){var w=C.charCodeAt(C.length-1);if(w>=55296&&w<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=_[_.length-2],this.lastChar[1]=_[_.length-1],C.slice(0,-1)}return C}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=_[_.length-1],_.toString("utf16le",A,_.length-1)}function d(_){var A=_&&_.length?this.write(_):"";if(this.lastNeed){var C=this.lastTotal-this.lastNeed;return A+this.lastChar.toString("utf16le",0,C)}return A}function m(_,A){var C=(_.length-A)%3;return C===0?_.toString("base64",A):(this.lastNeed=3-C,this.lastTotal=3,C===1?this.lastChar[0]=_[_.length-1]:(this.lastChar[0]=_[_.length-2],this.lastChar[1]=_[_.length-1]),_.toString("base64",A,_.length-C))}function p(_){var A=_&&_.length?this.write(_):"";return this.lastNeed?A+this.lastChar.toString("base64",0,3-this.lastNeed):A}function v(_){return _.toString(this.encoding)}function b(_){return _&&_.length?this.write(_):""}return pf}var gf,Py;function Eh(){if(Py)return gf;Py=1;var n=rs().codes.ERR_STREAM_PREMATURE_CLOSE;function t(s){var a=!1;return function(){if(!a){a=!0;for(var l=arguments.length,c=new Array(l),h=0;h<l;h++)c[h]=arguments[h];s.apply(this,c)}}}function e(){}function r(s){return s.setHeader&&typeof s.abort=="function"}function i(s,a,l){if(typeof a=="function")return i(s,null,a);a||(a={}),l=t(l||e);var c=a.readable||a.readable!==!1&&s.readable,h=a.writable||a.writable!==!1&&s.writable,f=function(){s.writable||d()},g=s._writableState&&s._writableState.finished,d=function(){h=!1,g=!0,c||l.call(s)},m=s._readableState&&s._readableState.endEmitted,p=function(){c=!1,m=!0,h||l.call(s)},v=function(C){l.call(s,C)},b=function(){var C;if(c&&!m)return(!s._readableState||!s._readableState.ended)&&(C=new n),l.call(s,C);if(h&&!g)return(!s._writableState||!s._writableState.ended)&&(C=new n),l.call(s,C)},_=function(){s.req.on("finish",d)};return r(s)?(s.on("complete",d),s.on("abort",b),s.req?_():s.on("request",_)):h&&!s._writableState&&(s.on("end",f),s.on("close",f)),s.on("end",p),s.on("finish",d),a.error!==!1&&s.on("error",v),s.on("close",b),function(){s.removeListener("complete",d),s.removeListener("abort",b),s.removeListener("request",_),s.req&&s.req.removeListener("finish",d),s.removeListener("end",f),s.removeListener("close",f),s.removeListener("finish",d),s.removeListener("end",p),s.removeListener("error",v),s.removeListener("close",b)}}return gf=i,gf}var mf,Oy;function $R(){if(Oy)return mf;Oy=1;var n;function t(C,w,M){return w=e(w),w in C?Object.defineProperty(C,w,{value:M,enumerable:!0,configurable:!0,writable:!0}):C[w]=M,C}function e(C){var w=r(C,"string");return typeof w=="symbol"?w:String(w)}function r(C,w){if(typeof C!="object"||C===null)return C;var M=C[Symbol.toPrimitive];if(M!==void 0){var O=M.call(C,w);if(typeof O!="object")return O;throw new TypeError("@@toPrimitive must return a primitive value.")}return(w==="string"?String:Number)(C)}var i=Eh(),s=Symbol("lastResolve"),a=Symbol("lastReject"),l=Symbol("error"),c=Symbol("ended"),h=Symbol("lastPromise"),f=Symbol("handlePromise"),g=Symbol("stream");function d(C,w){return{value:C,done:w}}function m(C){var w=C[s];if(w!==null){var M=C[g].read();M!==null&&(C[h]=null,C[s]=null,C[a]=null,w(d(M,!1)))}}function p(C){Qt.nextTick(m,C)}function v(C,w){return function(M,O){C.then(function(){if(w[c]){M(d(void 0,!0));return}w[f](M,O)},O)}}var b=Object.getPrototypeOf(function(){}),_=Object.setPrototypeOf((n={get stream(){return this[g]},next:function(){var w=this,M=this[l];if(M!==null)return Promise.reject(M);if(this[c])return Promise.resolve(d(void 0,!0));if(this[g].destroyed)return new Promise(function(Y,z){Qt.nextTick(function(){w[l]?z(w[l]):Y(d(void 0,!0))})});var O=this[h],L;if(O)L=new Promise(v(O,this));else{var N=this[g].read();if(N!==null)return Promise.resolve(d(N,!1));L=new Promise(this[f])}return this[h]=L,L}},t(n,Symbol.asyncIterator,function(){return this}),t(n,"return",function(){var w=this;return new Promise(function(M,O){w[g].destroy(null,function(L){if(L){O(L);return}M(d(void 0,!0))})})}),n),b),A=function(w){var M,O=Object.create(_,(M={},t(M,g,{value:w,writable:!0}),t(M,s,{value:null,writable:!0}),t(M,a,{value:null,writable:!0}),t(M,l,{value:null,writable:!0}),t(M,c,{value:w._readableState.endEmitted,writable:!0}),t(M,f,{value:function(N,Y){var z=O[g].read();z?(O[h]=null,O[s]=null,O[a]=null,N(d(z,!1))):(O[s]=N,O[a]=Y)},writable:!0}),M));return O[h]=null,i(w,function(L){if(L&&L.code!=="ERR_STREAM_PREMATURE_CLOSE"){var N=O[a];N!==null&&(O[h]=null,O[s]=null,O[a]=null,N(L)),O[l]=L;return}var Y=O[s];Y!==null&&(O[h]=null,O[s]=null,O[a]=null,Y(d(void 0,!0))),O[c]=!0}),w.on("readable",p.bind(null,O)),O};return mf=A,mf}var yf,Ly;function GR(){return Ly||(Ly=1,yf=function(){throw new Error("Readable.from is not available in the browser")}),yf}var vf,Ty;function tb(){if(Ty)return vf;Ty=1,vf=Y;var n;Y.ReadableState=N,Qi().EventEmitter;var t=function(j,ut){return j.listeners(ut).length},e=Xv(),r=Rl().Buffer,i=(typeof He<"u"?He:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function s(D){return r.from(D)}function a(D){return r.isBuffer(D)||D instanceof i}var l=ns(),c;l&&l.debuglog?c=l.debuglog("stream"):c=function(){};var h=HR(),f=Jv(),g=Zv(),d=g.getHighWaterMark,m=rs().codes,p=m.ERR_INVALID_ARG_TYPE,v=m.ERR_STREAM_PUSH_AFTER_EOF,b=m.ERR_METHOD_NOT_IMPLEMENTED,_=m.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,A,C,w;wi()(Y,e);var M=f.errorOrDestroy,O=["error","close","destroy","pause","resume"];function L(D,j,ut){if(typeof D.prependListener=="function")return D.prependListener(j,ut);!D._events||!D._events[j]?D.on(j,ut):Array.isArray(D._events[j])?D._events[j].unshift(ut):D._events[j]=[ut,D._events[j]]}function N(D,j,ut){n=n||Ki(),D=D||{},typeof ut!="boolean"&&(ut=j instanceof n),this.objectMode=!!D.objectMode,ut&&(this.objectMode=this.objectMode||!!D.readableObjectMode),this.highWaterMark=d(this,D,"readableHighWaterMark",ut),this.buffer=new h,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=D.emitClose!==!1,this.autoDestroy=!!D.autoDestroy,this.destroyed=!1,this.defaultEncoding=D.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,D.encoding&&(A||(A=Cy().StringDecoder),this.decoder=new A(D.encoding),this.encoding=D.encoding)}function Y(D){if(n=n||Ki(),!(this instanceof Y))return new Y(D);var j=this instanceof n;this._readableState=new N(D,this,j),this.readable=!0,D&&(typeof D.read=="function"&&(this._read=D.read),typeof D.destroy=="function"&&(this._destroy=D.destroy)),e.call(this)}Object.defineProperty(Y.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(j){this._readableState&&(this._readableState.destroyed=j)}}),Y.prototype.destroy=f.destroy,Y.prototype._undestroy=f.undestroy,Y.prototype._destroy=function(D,j){j(D)},Y.prototype.push=function(D,j){var ut=this._readableState,St;return ut.objectMode?St=!0:typeof D=="string"&&(j=j||ut.defaultEncoding,j!==ut.encoding&&(D=r.from(D,j),j=""),St=!0),z(this,D,j,!1,St)},Y.prototype.unshift=function(D){return z(this,D,null,!0,!1)};function z(D,j,ut,St,Ft){c("readableAddChunk",j);var Mt=D._readableState;if(j===null)Mt.reading=!1,at(D,Mt);else{var Tt;if(Ft||(Tt=U(Mt,j)),Tt)M(D,Tt);else if(Mt.objectMode||j&&j.length>0)if(typeof j!="string"&&!Mt.objectMode&&Object.getPrototypeOf(j)!==r.prototype&&(j=s(j)),St)Mt.endEmitted?M(D,new _):G(D,Mt,j,!0);else if(Mt.ended)M(D,new v);else{if(Mt.destroyed)return!1;Mt.reading=!1,Mt.decoder&&!ut?(j=Mt.decoder.write(j),Mt.objectMode||j.length!==0?G(D,Mt,j,!1):Et(D,Mt)):G(D,Mt,j,!1)}else St||(Mt.reading=!1,Et(D,Mt))}return!Mt.ended&&(Mt.length<Mt.highWaterMark||Mt.length===0)}function G(D,j,ut,St){j.flowing&&j.length===0&&!j.sync?(j.awaitDrain=0,D.emit("data",ut)):(j.length+=j.objectMode?1:ut.length,St?j.buffer.unshift(ut):j.buffer.push(ut),j.needReadable&&_t(D)),Et(D,j)}function U(D,j){var ut;return!a(j)&&typeof j!="string"&&j!==void 0&&!D.objectMode&&(ut=new p("chunk",["string","Buffer","Uint8Array"],j)),ut}Y.prototype.isPaused=function(){return this._readableState.flowing===!1},Y.prototype.setEncoding=function(D){A||(A=Cy().StringDecoder);var j=new A(D);this._readableState.decoder=j,this._readableState.encoding=this._readableState.decoder.encoding;for(var ut=this._readableState.buffer.head,St="";ut!==null;)St+=j.write(ut.data),ut=ut.next;return this._readableState.buffer.clear(),St!==""&&this._readableState.buffer.push(St),this._readableState.length=St.length,this};var xt=1073741824;function dt(D){return D>=xt?D=xt:(D--,D|=D>>>1,D|=D>>>2,D|=D>>>4,D|=D>>>8,D|=D>>>16,D++),D}function st(D,j){return D<=0||j.length===0&&j.ended?0:j.objectMode?1:D!==D?j.flowing&&j.length?j.buffer.head.data.length:j.length:(D>j.highWaterMark&&(j.highWaterMark=dt(D)),D<=j.length?D:j.ended?j.length:(j.needReadable=!0,0))}Y.prototype.read=function(D){c("read",D),D=parseInt(D,10);var j=this._readableState,ut=D;if(D!==0&&(j.emittedReadable=!1),D===0&&j.needReadable&&((j.highWaterMark!==0?j.length>=j.highWaterMark:j.length>0)||j.ended))return c("read: emitReadable",j.length,j.ended),j.length===0&&j.ended?lt(this):_t(this),null;if(D=st(D,j),D===0&&j.ended)return j.length===0&&lt(this),null;var St=j.needReadable;c("need readable",St),(j.length===0||j.length-D<j.highWaterMark)&&(St=!0,c("length less than watermark",St)),j.ended||j.reading?(St=!1,c("reading or ended",St)):St&&(c("do read"),j.reading=!0,j.sync=!0,j.length===0&&(j.needReadable=!0),this._read(j.highWaterMark),j.sync=!1,j.reading||(D=st(ut,j)));var Ft;return D>0?Ft=X(D,j):Ft=null,Ft===null?(j.needReadable=j.length<=j.highWaterMark,D=0):(j.length-=D,j.awaitDrain=0),j.length===0&&(j.ended||(j.needReadable=!0),ut!==D&&j.ended&&lt(this)),Ft!==null&&this.emit("data",Ft),Ft};function at(D,j){if(c("onEofChunk"),!j.ended){if(j.decoder){var ut=j.decoder.end();ut&&ut.length&&(j.buffer.push(ut),j.length+=j.objectMode?1:ut.length)}j.ended=!0,j.sync?_t(D):(j.needReadable=!1,j.emittedReadable||(j.emittedReadable=!0,bt(D)))}}function _t(D){var j=D._readableState;c("emitReadable",j.needReadable,j.emittedReadable),j.needReadable=!1,j.emittedReadable||(c("emitReadable",j.flowing),j.emittedReadable=!0,Qt.nextTick(bt,D))}function bt(D){var j=D._readableState;c("emitReadable_",j.destroyed,j.length,j.ended),!j.destroyed&&(j.length||j.ended)&&(D.emit("readable"),j.emittedReadable=!1),j.needReadable=!j.flowing&&!j.ended&&j.length<=j.highWaterMark,V(D)}function Et(D,j){j.readingMore||(j.readingMore=!0,Qt.nextTick(kt,D,j))}function kt(D,j){for(;!j.reading&&!j.ended&&(j.length<j.highWaterMark||j.flowing&&j.length===0);){var ut=j.length;if(c("maybeReadMore read 0"),D.read(0),ut===j.length)break}j.readingMore=!1}Y.prototype._read=function(D){M(this,new b("_read()"))},Y.prototype.pipe=function(D,j){var ut=this,St=this._readableState;switch(St.pipesCount){case 0:St.pipes=D;break;case 1:St.pipes=[St.pipes,D];break;default:St.pipes.push(D);break}St.pipesCount+=1,c("pipe count=%d opts=%j",St.pipesCount,j);var Ft=(!j||j.end!==!1)&&D!==Qt.stdout&&D!==Qt.stderr,Mt=Ft?je:on;St.endEmitted?Qt.nextTick(Mt):ut.once("end",Mt),D.on("unpipe",Tt);function Tt(Ye,ye){c("onunpipe"),Ye===ut&&ye&&ye.hasUnpiped===!1&&(ye.hasUnpiped=!0,ue())}function je(){c("onend"),D.end()}var ft=Ot(ut);D.on("drain",ft);var Ce=!1;function ue(){c("cleanup"),D.removeListener("close",Ve),D.removeListener("finish",ke),D.removeListener("drain",ft),D.removeListener("error",re),D.removeListener("unpipe",Tt),ut.removeListener("end",je),ut.removeListener("end",on),ut.removeListener("data",te),Ce=!0,St.awaitDrain&&(!D._writableState||D._writableState.needDrain)&&ft()}ut.on("data",te);function te(Ye){c("ondata");var ye=D.write(Ye);c("dest.write",ye),ye===!1&&((St.pipesCount===1&&St.pipes===D||St.pipesCount>1&&yt(St.pipes,D)!==-1)&&!Ce&&(c("false write response, pause",St.awaitDrain),St.awaitDrain++),ut.pause())}function re(Ye){c("onerror",Ye),on(),D.removeListener("error",re),t(D,"error")===0&&M(D,Ye)}L(D,"error",re);function Ve(){D.removeListener("finish",ke),on()}D.once("close",Ve);function ke(){c("onfinish"),D.removeListener("close",Ve),on()}D.once("finish",ke);function on(){c("unpipe"),ut.unpipe(D)}return D.emit("pipe",ut),St.flowing||(c("pipe resume"),ut.resume()),D};function Ot(D){return function(){var ut=D._readableState;c("pipeOnDrain",ut.awaitDrain),ut.awaitDrain&&ut.awaitDrain--,ut.awaitDrain===0&&t(D,"data")&&(ut.flowing=!0,V(D))}}Y.prototype.unpipe=function(D){var j=this._readableState,ut={hasUnpiped:!1};if(j.pipesCount===0)return this;if(j.pipesCount===1)return D&&D!==j.pipes?this:(D||(D=j.pipes),j.pipes=null,j.pipesCount=0,j.flowing=!1,D&&D.emit("unpipe",this,ut),this);if(!D){var St=j.pipes,Ft=j.pipesCount;j.pipes=null,j.pipesCount=0,j.flowing=!1;for(var Mt=0;Mt<Ft;Mt++)St[Mt].emit("unpipe",this,{hasUnpiped:!1});return this}var Tt=yt(j.pipes,D);return Tt===-1?this:(j.pipes.splice(Tt,1),j.pipesCount-=1,j.pipesCount===1&&(j.pipes=j.pipes[0]),D.emit("unpipe",this,ut),this)},Y.prototype.on=function(D,j){var ut=e.prototype.on.call(this,D,j),St=this._readableState;return D==="data"?(St.readableListening=this.listenerCount("readable")>0,St.flowing!==!1&&this.resume()):D==="readable"&&!St.endEmitted&&!St.readableListening&&(St.readableListening=St.needReadable=!0,St.flowing=!1,St.emittedReadable=!1,c("on readable",St.length,St.reading),St.length?_t(this):St.reading||Qt.nextTick(Q,this)),ut},Y.prototype.addListener=Y.prototype.on,Y.prototype.removeListener=function(D,j){var ut=e.prototype.removeListener.call(this,D,j);return D==="readable"&&Qt.nextTick(Lt,this),ut},Y.prototype.removeAllListeners=function(D){var j=e.prototype.removeAllListeners.apply(this,arguments);return(D==="readable"||D===void 0)&&Qt.nextTick(Lt,this),j};function Lt(D){var j=D._readableState;j.readableListening=D.listenerCount("readable")>0,j.resumeScheduled&&!j.paused?j.flowing=!0:D.listenerCount("data")>0&&D.resume()}function Q(D){c("readable nexttick read 0"),D.read(0)}Y.prototype.resume=function(){var D=this._readableState;return D.flowing||(c("resume"),D.flowing=!D.readableListening,et(this,D)),D.paused=!1,this};function et(D,j){j.resumeScheduled||(j.resumeScheduled=!0,Qt.nextTick(ot,D,j))}function ot(D,j){c("resume",j.reading),j.reading||D.read(0),j.resumeScheduled=!1,D.emit("resume"),V(D),j.flowing&&!j.reading&&D.read(0)}Y.prototype.pause=function(){return c("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(c("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function V(D){var j=D._readableState;for(c("flow",j.flowing);j.flowing&&D.read()!==null;);}Y.prototype.wrap=function(D){var j=this,ut=this._readableState,St=!1;D.on("end",function(){if(c("wrapped end"),ut.decoder&&!ut.ended){var Tt=ut.decoder.end();Tt&&Tt.length&&j.push(Tt)}j.push(null)}),D.on("data",function(Tt){if(c("wrapped data"),ut.decoder&&(Tt=ut.decoder.write(Tt)),!(ut.objectMode&&Tt==null)&&!(!ut.objectMode&&(!Tt||!Tt.length))){var je=j.push(Tt);je||(St=!0,D.pause())}});for(var Ft in D)this[Ft]===void 0&&typeof D[Ft]=="function"&&(this[Ft]=function(je){return function(){return D[je].apply(D,arguments)}}(Ft));for(var Mt=0;Mt<O.length;Mt++)D.on(O[Mt],this.emit.bind(this,O[Mt]));return this._read=function(Tt){c("wrapped _read",Tt),St&&(St=!1,D.resume())},this},typeof Symbol=="function"&&(Y.prototype[Symbol.asyncIterator]=function(){return C===void 0&&(C=$R()),C(this)}),Object.defineProperty(Y.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(Y.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(Y.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(j){this._readableState&&(this._readableState.flowing=j)}}),Y._fromList=X,Object.defineProperty(Y.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function X(D,j){if(j.length===0)return null;var ut;return j.objectMode?ut=j.buffer.shift():!D||D>=j.length?(j.decoder?ut=j.buffer.join(""):j.buffer.length===1?ut=j.buffer.first():ut=j.buffer.concat(j.length),j.buffer.clear()):ut=j.buffer.consume(D,j.decoder),ut}function lt(D){var j=D._readableState;c("endReadable",j.endEmitted),j.endEmitted||(j.ended=!0,Qt.nextTick(mt,j,D))}function mt(D,j){if(c("endReadableNT",D.endEmitted,D.length),!D.endEmitted&&D.length===0&&(D.endEmitted=!0,j.readable=!1,j.emit("end"),D.autoDestroy)){var ut=j._writableState;(!ut||ut.autoDestroy&&ut.finished)&&j.destroy()}}typeof Symbol=="function"&&(Y.from=function(D,j){return w===void 0&&(w=GR()),w(Y,D,j)});function yt(D,j){for(var ut=0,St=D.length;ut<St;ut++)if(D[ut]===j)return ut;return-1}return vf}var bf,By;function eb(){if(By)return bf;By=1,bf=l;var n=rs().codes,t=n.ERR_METHOD_NOT_IMPLEMENTED,e=n.ERR_MULTIPLE_CALLBACK,r=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,i=n.ERR_TRANSFORM_WITH_LENGTH_0,s=Ki();wi()(l,s);function a(f,g){var d=this._transformState;d.transforming=!1;var m=d.writecb;if(m===null)return this.emit("error",new e);d.writechunk=null,d.writecb=null,g!=null&&this.push(g),m(f);var p=this._readableState;p.reading=!1,(p.needReadable||p.length<p.highWaterMark)&&this._read(p.highWaterMark)}function l(f){if(!(this instanceof l))return new l(f);s.call(this,f),this._transformState={afterTransform:a.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,f&&(typeof f.transform=="function"&&(this._transform=f.transform),typeof f.flush=="function"&&(this._flush=f.flush)),this.on("prefinish",c)}function c(){var f=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(g,d){h(f,g,d)}):h(this,null,null)}l.prototype.push=function(f,g){return this._transformState.needTransform=!1,s.prototype.push.call(this,f,g)},l.prototype._transform=function(f,g,d){d(new t("_transform()"))},l.prototype._write=function(f,g,d){var m=this._transformState;if(m.writecb=d,m.writechunk=f,m.writeencoding=g,!m.transforming){var p=this._readableState;(m.needTransform||p.needReadable||p.length<p.highWaterMark)&&this._read(p.highWaterMark)}},l.prototype._read=function(f){var g=this._transformState;g.writechunk!==null&&!g.transforming?(g.transforming=!0,this._transform(g.writechunk,g.writeencoding,g.afterTransform)):g.needTransform=!0},l.prototype._destroy=function(f,g){s.prototype._destroy.call(this,f,function(d){g(d)})};function h(f,g,d){if(g)return f.emit("error",g);if(d!=null&&f.push(d),f._writableState.length)throw new i;if(f._transformState.transforming)throw new r;return f.push(null)}return bf}var _f,Iy;function YR(){if(Iy)return _f;Iy=1,_f=t;var n=eb();wi()(t,n);function t(e){if(!(this instanceof t))return new t(e);n.call(this,e)}return t.prototype._transform=function(e,r,i){i(null,e)},_f}var wf,Dy;function KR(){if(Dy)return wf;Dy=1;var n;function t(d){var m=!1;return function(){m||(m=!0,d.apply(void 0,arguments))}}var e=rs().codes,r=e.ERR_MISSING_ARGS,i=e.ERR_STREAM_DESTROYED;function s(d){if(d)throw d}function a(d){return d.setHeader&&typeof d.abort=="function"}function l(d,m,p,v){v=t(v);var b=!1;d.on("close",function(){b=!0}),n===void 0&&(n=Eh()),n(d,{readable:m,writable:p},function(A){if(A)return v(A);b=!0,v()});var _=!1;return function(A){if(!b&&!_){if(_=!0,a(d))return d.abort();if(typeof d.destroy=="function")return d.destroy();v(A||new i("pipe"))}}}function c(d){d()}function h(d,m){return d.pipe(m)}function f(d){return!d.length||typeof d[d.length-1]!="function"?s:d.pop()}function g(){for(var d=arguments.length,m=new Array(d),p=0;p<d;p++)m[p]=arguments[p];var v=f(m);if(Array.isArray(m[0])&&(m=m[0]),m.length<2)throw new r("streams");var b,_=m.map(function(A,C){var w=C<m.length-1,M=C>0;return l(A,w,M,function(O){b||(b=O),O&&_.forEach(c),!w&&(_.forEach(c),v(b))})});return m.reduce(h)}return wf=g,wf}var xf,Fy;function nb(){if(Fy)return xf;Fy=1,xf=e;var n=Qi().EventEmitter,t=wi();t(e,n),e.Readable=tb(),e.Writable=Qv(),e.Duplex=Ki(),e.Transform=eb(),e.PassThrough=YR(),e.finished=Eh(),e.pipeline=KR(),e.Stream=e;function e(){n.call(this)}return e.prototype.pipe=function(r,i){var s=this;function a(m){r.writable&&r.write(m)===!1&&s.pause&&s.pause()}s.on("data",a);function l(){s.readable&&s.resume&&s.resume()}r.on("drain",l),!r._isStdio&&(!i||i.end!==!1)&&(s.on("end",h),s.on("close",f));var c=!1;function h(){c||(c=!0,r.end())}function f(){c||(c=!0,typeof r.destroy=="function"&&r.destroy())}function g(m){if(d(),n.listenerCount(this,"error")===0)throw m}s.on("error",g),r.on("error",g);function d(){s.removeListener("data",a),r.removeListener("drain",l),s.removeListener("end",h),s.removeListener("close",f),s.removeListener("error",g),r.removeListener("error",g),s.removeListener("end",d),s.removeListener("close",d),r.removeListener("close",d)}return s.on("end",d),s.on("close",d),r.on("close",d),r.emit("pipe",s),r},xf}var Sf,Ny;function XR(){if(Ny)return Sf;Ny=1;function n(t){return t?(t^Math.random()*16>>t/4).toString(16):("10000000-1000-4000-8000"+-1e11).replace(/[018]/g,n)}return Sf=n,Sf}var Ta={exports:{}},Ba={exports:{}},Ef,jy;function JR(){if(jy)return Ef;jy=1;var n=1e3,t=n*60,e=t*60,r=e*24,i=r*365.25;Ef=function(h,f){return f=f||{},typeof h=="string"?s(h):f.long?l(h):a(h)};function s(h){if(h=""+h,!(h.length>1e4)){var f=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(h);if(f){var g=parseFloat(f[1]),d=(f[2]||"ms").toLowerCase();switch(d){case"years":case"year":case"yrs":case"yr":case"y":return g*i;case"days":case"day":case"d":return g*r;case"hours":case"hour":case"hrs":case"hr":case"h":return g*e;case"minutes":case"minute":case"mins":case"min":case"m":return g*t;case"seconds":case"second":case"secs":case"sec":case"s":return g*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return g}}}}function a(h){return h>=r?Math.round(h/r)+"d":h>=e?Math.round(h/e)+"h":h>=t?Math.round(h/t)+"m":h>=n?Math.round(h/n)+"s":h+"ms"}function l(h){return c(h,r,"day")||c(h,e,"hour")||c(h,t,"minute")||c(h,n,"second")||h+" ms"}function c(h,f,g){if(!(h<f))return h<f*1.5?Math.floor(h/f)+" "+g:Math.ceil(h/f)+" "+g+"s"}return Ef}var Uy;function ZR(){return Uy||(Uy=1,function(n,t){t=n.exports=s,t.coerce=h,t.disable=l,t.enable=a,t.enabled=c,t.humanize=JR(),t.names=[],t.skips=[],t.formatters={};var e=0,r;function i(){return t.colors[e++%t.colors.length]}function s(f){function g(){}g.enabled=!1;function d(){var p=d,v=+new Date,b=v-(r||v);p.diff=b,p.prev=r,p.curr=v,r=v,p.useColors==null&&(p.useColors=t.useColors()),p.color==null&&p.useColors&&(p.color=i());var _=Array.prototype.slice.call(arguments);_[0]=t.coerce(_[0]),typeof _[0]!="string"&&(_=["%o"].concat(_));var A=0;_[0]=_[0].replace(/%([a-z%])/g,function(w,M){if(w==="%%")return w;A++;var O=t.formatters[M];if(typeof O=="function"){var L=_[A];w=O.call(p,L),_.splice(A,1),A--}return w}),typeof t.formatArgs=="function"&&(_=t.formatArgs.apply(p,_));var C=d.log||t.log||console.log.bind(console);C.apply(p,_)}d.enabled=!0;var m=t.enabled(f)?d:g;return m.namespace=f,m}function a(f){t.save(f);for(var g=(f||"").split(/[\s,]+/),d=g.length,m=0;m<d;m++)g[m]&&(f=g[m].replace(/\*/g,".*?"),f[0]==="-"?t.skips.push(new RegExp("^"+f.substr(1)+"$")):t.names.push(new RegExp("^"+f+"$")))}function l(){t.enable("")}function c(f){var g,d;for(g=0,d=t.skips.length;g<d;g++)if(t.skips[g].test(f))return!1;for(g=0,d=t.names.length;g<d;g++)if(t.names[g].test(f))return!0;return!1}function h(f){return f instanceof Error?f.stack||f.message:f}}(Ba,Ba.exports)),Ba.exports}var qy;function rb(){return qy||(qy=1,function(n,t){t=n.exports=ZR(),t.log=i,t.formatArgs=r,t.save=s,t.load=a,t.useColors=e,t.storage=typeof chrome<"u"&&typeof chrome.storage<"u"?chrome.storage.local:l(),t.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"];function e(){return"WebkitAppearance"in document.documentElement.style||window.console&&(console.firebug||console.exception&&console.table)||navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31}t.formatters.j=function(c){return JSON.stringify(c)};function r(){var c=arguments,h=this.useColors;if(c[0]=(h?"%c":"")+this.namespace+(h?" %c":" ")+c[0]+(h?"%c ":" ")+"+"+t.humanize(this.diff),!h)return c;var f="color: "+this.color;c=[c[0],f,"color: inherit"].concat(Array.prototype.slice.call(c,1));var g=0,d=0;return c[0].replace(/%[a-z%]/g,function(m){m!=="%%"&&(g++,m==="%c"&&(d=g))}),c.splice(d,0,f),c}function i(){return typeof console=="object"&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function s(c){try{c==null?t.storage.removeItem("debug"):t.storage.debug=c}catch{}}function a(){var c;try{c=t.storage.debug}catch{}return c}t.enable(a());function l(){try{return window.localStorage}catch{}}}(Ta,Ta.exports)),Ta.exports}var Af,Wy;function Ah(){if(Wy)return Af;Wy=1;var n=ns(),t=nb().Duplex,e=Sh(),r=XR(),i=rb()("socket.io-stream:iostream");Af=s,n.inherits(s,t);function s(a){if(!(this instanceof s))return new s(a);s.super_.call(this,a),this.options=a,this.id=r(),this.socket=null,this.pushBuffer=[],this.writeBuffer=[],this._readable=!1,this._writable=!1,this.destroyed=!1,this.allowHalfOpen=a&&a.allowHalfOpen||!1,this.on("finish",this._onfinish),this.on("end",this._onend),this.on("error",this._onerror)}return s.prototype.destroy=function(){if(i("destroy"),this.destroyed){i("already destroyed");return}this.readable=this.writable=!1,this.socket&&(i("clean up"),this.socket.cleanup(this.id),this.socket=null),this.destroyed=!0},s.prototype._read=function(a){var l;if(!this.destroyed){if(this.pushBuffer.length){for(;(l=this.pushBuffer.shift())&&l(););return}this._readable=!0,this.socket._read(this.id,a)}},s.prototype._onread=function(a){var l=this.writeBuffer.shift();if(l)return l();this._writable=!0},s.prototype._write=function(a,l,c){var h=this;function f(){h.destroyed||(h._writable=!1,h.socket._write(h.id,a,l,c))}this._writable?f():this.writeBuffer.push(f)},s.prototype._onwrite=function(a,l,c){var h=this;function f(){h._readable=!1;var g=h.push(a||"",l);return c(),g}this._readable?f():this.pushBuffer.push(f)},s.prototype._end=function(){this.pushBuffer.length?this.pushBuffer.push(e(this,"_done")):this._done()},s.prototype._done=function(){return this._readable=!1,this.push(null)},s.prototype._onfinish=function(){if(i("_onfinish"),this.socket&&this.socket._end(this.id),this.writable=!1,this._writableState.ended=!0,!this.readable||this._readableState.ended)return i("_onfinish: ended, destroy %s",this._readableState),this.destroy();i("_onfinish: not ended"),this.allowHalfOpen||(this.push(null),this.readable&&!this._readableState.endEmitted&&this.read(0))},s.prototype._onend=function(){if(i("_onend"),this.readable=!1,this._readableState.ended=!0,!this.writable||this._writableState.finished)return i("_onend: %s",this._writableState),this.destroy();i("_onend: not finished"),this.allowHalfOpen||this.end()},s.prototype._onerror=function(a){!a.remote&&this.socket&&this.socket._error(this.id,a),this.destroy()},Af}var Ia={},Hy;function QR(){if(Hy)return Ia;Hy=1;var n=ns(),t=Qi().EventEmitter,e=Ah();Ia.Encoder=r,Ia.Decoder=i,n.inherits(r,t);function r(){t.call(this)}r.prototype.encode=function(s){return s instanceof e?this.encodeStream(s):n.isArray(s)?this.encodeArray(s):s&&typeof s=="object"?this.encodeObject(s):s},r.prototype.encodeStream=function(s){this.emit("stream",s);var a={$stream:s.id};return s.options&&(a.options=s.options),a},r.prototype.encodeArray=function(s){for(var a=[],l=0,c=s.length;l<c;l++)a.push(this.encode(s[l]));return a},r.prototype.encodeObject=function(s){var a={};for(var l in s)s.hasOwnProperty(l)&&(a[l]=this.encode(s[l]));return a},n.inherits(i,t);function i(){t.call(this)}return i.prototype.decode=function(s){return s&&s.$stream?this.decodeStream(s):n.isArray(s)?this.decodeArray(s):s&&typeof s=="object"?this.decodeObject(s):s},i.prototype.decodeStream=function(s){var a=new e(s.options);return a.id=s.$stream,this.emit("stream",a),a},i.prototype.decodeArray=function(s){for(var a=[],l=0,c=s.length;l<c;l++)a.push(this.decode(s[l]));return a},i.prototype.decodeObject=function(s){var a={};for(var l in s)s.hasOwnProperty(l)&&(a[l]=this.decode(s[l]));return a},Ia}var zy;function tM(){return zy||(zy=1,function(n,t){var e=ns(),r=Qi().EventEmitter,i=Sh();Ah();var s=QR(),a=rb()("socket.io-stream:socket"),l=r.prototype.emit,c=r.prototype.on,h=Array.prototype.slice;t=n.exports=f,t.event="$stream",t.events=["error","newListener","removeListener"],e.inherits(f,r);function f(g,d){if(!(this instanceof f))return new f(g,d);r.call(this),d=d||{},this.sio=g,this.forceBase64=!!d.forceBase64,this.streams={},this.encoder=new s.Encoder,this.decoder=new s.Decoder;var m=t.event;g.on(m,i(this,l)),g.on(m+"-read",i(this,"_onread")),g.on(m+"-write",i(this,"_onwrite")),g.on(m+"-end",i(this,"_onend")),g.on(m+"-error",i(this,"_onerror")),g.on("error",i(this,l,"error")),g.on("disconnect",i(this,"_ondisconnect")),this.encoder.on("stream",i(this,"_onencode")),this.decoder.on("stream",i(this,"_ondecode"))}f.prototype.$emit=l,f.prototype.emit=function(g){return~t.events.indexOf(g)?l.apply(this,arguments):(this._stream.apply(this,arguments),this)},f.prototype.on=function(g,d){return~t.events.indexOf(g)?c.apply(this,arguments):(this._onstream(g,d),this)},f.prototype._stream=function(g){a("sending new streams");var d=this,m=h.call(arguments,1),p=m[m.length-1];typeof p=="function"&&(m[m.length-1]=function(){var b=h.call(arguments);b=d.decoder.decode(b),p.apply(this,b)}),m=this.encoder.encode(m);var v=this.sio;v.emit.apply(v,[t.event,g].concat(m))},f.prototype._read=function(g,d){this.sio.emit(t.event+"-read",g,d)},f.prototype._write=function(g,d,m,p){Ys.isBuffer(d)&&(this.forceBase64?(m="base64",d=d.toString(m)):He.Buffer||(d.toArrayBuffer?d=d.toArrayBuffer():d=d.buffer)),this.sio.emit(t.event+"-write",g,d,m,p)},f.prototype._end=function(g){this.sio.emit(t.event+"-end",g)},f.prototype._error=function(g,d){this.sio.emit(t.event+"-error",g,d.message||d)},f.prototype._onstream=function(g,d){if(typeof d!="function")throw TypeError("listener must be a function");function m(){a("new streams");var p=this,v=h.call(arguments),b=v[v.length-1];typeof b=="function"&&(v[v.length-1]=function(){var _=h.call(arguments);_=p.encoder.encode(_),b.apply(this,_)}),v=this.decoder.decode(v),d.apply(this,v)}m.listener=d,c.call(this,g,m)},f.prototype._onread=function(g,d){a('read: "%s"',g);var m=this.streams[g];m?m._onread(d):a("ignore invalid stream id")},f.prototype._onwrite=function(g,d,m,p){a('write: "%s"',g);var v=this.streams[g];if(!v){p("invalid stream id: "+g);return}He.ArrayBuffer&&d instanceof ArrayBuffer&&(d=new Ys(new Uint8Array(d))),v._onwrite(d,m,p)},f.prototype._onend=function(g){a('end: "%s"',g);var d=this.streams[g];if(!d){a('ignore non-existent stream id: "%s"',g);return}d._end()},f.prototype._onerror=function(g,d){a('error: "%s", "%s"',g,d);var m=this.streams[g];if(!m){a('invalid stream id: "%s"',g);return}var p=new Error(d);p.remote=!0,m.emit("error",p)},f.prototype._ondisconnect=function(){var g;for(var d in this.streams)g=this.streams[d],g.destroy(),g.emit("close"),g.emit("error",new Error("Connection aborted"))},f.prototype._onencode=function(g){if(g.socket||g.destroyed)throw new Error("stream has already been sent.");var d=g.id;if(this.streams[d])throw new Error("Encoded stream already exists: "+d);this.streams[d]=g,g.socket=this},f.prototype._ondecode=function(g){var d=g.id;if(this.streams[d]){this._error(d,new Error("Decoded stream already exists: "+d));return}this.streams[d]=g,g.socket=this},f.prototype.cleanup=function(g){delete this.streams[g]}}(Pa,Pa.exports)),Pa.exports}var kf,Vy;function eM(){if(Vy)return kf;Vy=1;var n=ns(),t=nb().Readable,e=Sh();kf=r,n.inherits(r,t);function r(i,s){if(!(this instanceof r))return new r(i,s);t.call(this,s),s=s||{},this.blob=i,this.slice=i.slice||i.webkitSlice||i.mozSlice,this.start=0,this.sync=s.synchronous||!1;var a;s.synchronous?a=this.fileReader=new FileReaderSync:a=this.fileReader=new FileReader,a.onload=e(this,"_onload"),a.onerror=e(this,"_onerror")}return r.prototype._read=function(i){var s=this.start,a=this.start=this.start+i,l=this.slice.call(this.blob,s,a);if(l.size)if(this.sync){var c=new Ys(new Uint8Array(this.fileReader.readAsArrayBuffer(l)));this.push(c)}else this.fileReader.readAsArrayBuffer(l);else this.push(null)},r.prototype._onload=function(i){var s=new Ys(new Uint8Array(i.target.result));this.push(s)},r.prototype._onerror=function(i){var s=i.target.error;this.emit("error",s)},kf}var $y;function nM(){return $y||($y=1,function(n,t){var e=tM(),r=Ah(),i=eM();t=n.exports=s,t.Buffer=Ys,t.Socket=e,t.IOStream=r,t.forceBase64=!1;function s(a,l){return l=l||{},l.forceBase64==null&&(l.forceBase64=t.forceBase64),a._streamSocket||(a._streamSocket=new e(a,l)),a._streamSocket}t.createStream=function(a){return new r(a)},t.createBlobReadStream=function(a,l){return new i(a,l)}}(Ca,Ca.exports)),Ca.exports}var Rf,Gy;function rM(){return Gy||(Gy=1,Rf=nM()),Rf}var ib=rM();const sb=_i(ib),iM=VA({__proto__:null,default:sb},[ib]),Mf=sb||iM,sr=n=>n,sM=(n=0,t=1)=>(e=t)=>n+=e,oM=Fe.compile(Gk);class Ks extends Oe{constructor(t){super(),this.provided=t,this.buttons={all:Ns.build({name:"ALL",isEnabled:!0}),provided:sr({})},this.events=new oo,this.panel=new Ar({...this.provided,class:"checkbox-area"}).append(oM(this.provided)),this.area=new Oe(this.panel.element.querySelector("div.buttons")).append(this.buttons.all),this.replace(this.panel),this.buttons.all.on("enable",(e,r)=>r==="click"?this.extract().forEach(i=>i.enable()):null),this.buttons.all.on("disable",(e,r)=>r==="click"?this.extract().forEach(i=>i.disable()):null)}extract(){return Object.values(this.buttons.provided)}provide(...t){return t.forEach(e=>{const r=e instanceof Ns?e:Ns.build(e);this.buttons.provided[r.name]=r,this.area.append(r),r.on("enable",(i,s)=>{this.extract().every(a=>a.isEnabled)&&this.buttons.all.enable(),s!=="silent"&&this.emit("enable",i)}),r.on("disable",(i,s)=>{this.extract().some(a=>!a.isEnabled)&&this.buttons.all.disable(),s!=="silent"&&this.emit("disable",i)})}),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 Ks(t)}}const aM=`
148
+ <div class="container expectation" id="{{id}}">
149
+ <div class="meta">{{> expectationMeta this}}</div>
150
+ </div>
151
+ `,lM=`
152
+ <div class="viewer container"></div>
153
+ `;function uM(n,t){var e,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function l(c){return function(h){return function(f){if(e)throw new TypeError("Generator is already executing.");for(;a;)try{if(e=1,r&&(i=2&f[0]?r.return:f[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,f[1])).done)return i;switch(r=0,i&&(f=[2&f[0],i.value]),f[0]){case 0:case 1:i=f;break;case 4:return a.label++,{value:f[1],done:!1};case 5:a.label++,r=f[1],f=[0];continue;case 7:f=a.ops.pop(),a.trys.pop();continue;default:if(i=a.trys,!((i=i.length>0&&i[i.length-1])||f[0]!==6&&f[0]!==2)){a=0;continue}if(f[0]===3&&(!i||f[1]>i[0]&&f[1]<i[3])){a.label=f[1];break}if(f[0]===6&&a.label<i[1]){a.label=i[1],i=f;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(f);break}i[2]&&a.ops.pop(),a.trys.pop();continue}f=t.call(n,a)}catch(g){f=[6,g],r=0}finally{e=i=0}if(5&f[0])throw f[1];return{value:f[0]?f[1]:void 0,done:!0}}([c,h])}}}function ob(n){return n===null?"null":typeof n}function Vf(n){return!!n&&typeof n=="object"}function ab(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 lb(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 Yy(n){var t="";return Vf(n)?(t=ab(n),Array.isArray(n)&&(t+="["+n.length+"]")):t=lb(ob(n),n,n),typeof t=="string"?'"'+t+'"':t}function pn(n){return"json-formatter-"+n}function We(n,t,e){var r=document.createElement(n);return t&&r.classList.add(pn(t)),e!==void 0&&(e instanceof Node?r.appendChild(e):r.appendChild(document.createTextNode(String(e)))),r}(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 {
154
+ font-family: monospace;
155
+ }
156
+ .json-formatter-row,
157
+ .json-formatter-row a,
158
+ .json-formatter-row a:hover {
159
+ color: black;
160
+ text-decoration: none;
161
+ }
162
+ .json-formatter-row .json-formatter-row {
163
+ margin-left: 1rem;
164
+ }
165
+ .json-formatter-row .json-formatter-children.json-formatter-empty {
166
+ opacity: 0.5;
167
+ margin-left: 1rem;
168
+ }
169
+ .json-formatter-row .json-formatter-children.json-formatter-empty:after {
170
+ display: none;
171
+ }
172
+ .json-formatter-row .json-formatter-children.json-formatter-empty.json-formatter-object:after {
173
+ content: "No properties";
174
+ }
175
+ .json-formatter-row .json-formatter-children.json-formatter-empty.json-formatter-array:after {
176
+ content: "[]";
177
+ }
178
+ .json-formatter-row .json-formatter-string,
179
+ .json-formatter-row .json-formatter-stringifiable {
180
+ color: green;
181
+ white-space: pre;
182
+ word-wrap: break-word;
183
+ }
184
+ .json-formatter-row .json-formatter-number {
185
+ color: blue;
186
+ }
187
+ .json-formatter-row .json-formatter-boolean {
188
+ color: red;
189
+ }
190
+ .json-formatter-row .json-formatter-null {
191
+ color: #855A00;
192
+ }
193
+ .json-formatter-row .json-formatter-undefined {
194
+ color: #ca0b69;
195
+ }
196
+ .json-formatter-row .json-formatter-function {
197
+ color: #FF20ED;
198
+ }
199
+ .json-formatter-row .json-formatter-date {
200
+ background-color: rgba(0, 0, 0, 0.05);
201
+ }
202
+ .json-formatter-row .json-formatter-url {
203
+ text-decoration: underline;
204
+ color: blue;
205
+ cursor: pointer;
206
+ }
207
+ .json-formatter-row .json-formatter-bracket {
208
+ color: blue;
209
+ }
210
+ .json-formatter-row .json-formatter-key {
211
+ color: #00008B;
212
+ padding-right: 0.2rem;
213
+ }
214
+ .json-formatter-row .json-formatter-toggler-link {
215
+ cursor: pointer;
216
+ }
217
+ .json-formatter-row .json-formatter-toggler {
218
+ line-height: 1.2rem;
219
+ font-size: 0.7rem;
220
+ vertical-align: middle;
221
+ opacity: 0.6;
222
+ cursor: pointer;
223
+ padding-right: 0.2rem;
224
+ }
225
+ .json-formatter-row .json-formatter-toggler:after {
226
+ display: inline-block;
227
+ transition: transform 100ms ease-in;
228
+ content: "►";
229
+ }
230
+ .json-formatter-row > a > .json-formatter-preview-text {
231
+ opacity: 0;
232
+ transition: opacity 0.15s ease-in;
233
+ font-style: italic;
234
+ }
235
+ .json-formatter-row:hover > a > .json-formatter-preview-text {
236
+ opacity: 0.6;
237
+ }
238
+ .json-formatter-row.json-formatter-open > .json-formatter-toggler-link .json-formatter-toggler:after {
239
+ transform: rotate(90deg);
240
+ }
241
+ .json-formatter-row.json-formatter-open > .json-formatter-children:after {
242
+ display: inline-block;
243
+ }
244
+ .json-formatter-row.json-formatter-open > a > .json-formatter-preview-text {
245
+ display: none;
246
+ }
247
+ .json-formatter-row.json-formatter-open.json-formatter-empty:after {
248
+ display: block;
249
+ }
250
+ .json-formatter-dark.json-formatter-row {
251
+ font-family: monospace;
252
+ }
253
+ .json-formatter-dark.json-formatter-row,
254
+ .json-formatter-dark.json-formatter-row a,
255
+ .json-formatter-dark.json-formatter-row a:hover {
256
+ color: white;
257
+ text-decoration: none;
258
+ }
259
+ .json-formatter-dark.json-formatter-row .json-formatter-row {
260
+ margin-left: 1rem;
261
+ }
262
+ .json-formatter-dark.json-formatter-row .json-formatter-children.json-formatter-empty {
263
+ opacity: 0.5;
264
+ margin-left: 1rem;
265
+ }
266
+ .json-formatter-dark.json-formatter-row .json-formatter-children.json-formatter-empty:after {
267
+ display: none;
268
+ }
269
+ .json-formatter-dark.json-formatter-row .json-formatter-children.json-formatter-empty.json-formatter-object:after {
270
+ content: "No properties";
271
+ }
272
+ .json-formatter-dark.json-formatter-row .json-formatter-children.json-formatter-empty.json-formatter-array:after {
273
+ content: "[]";
274
+ }
275
+ .json-formatter-dark.json-formatter-row .json-formatter-string,
276
+ .json-formatter-dark.json-formatter-row .json-formatter-stringifiable {
277
+ color: #31F031;
278
+ white-space: pre;
279
+ word-wrap: break-word;
280
+ }
281
+ .json-formatter-dark.json-formatter-row .json-formatter-number {
282
+ color: #66C2FF;
283
+ }
284
+ .json-formatter-dark.json-formatter-row .json-formatter-boolean {
285
+ color: #EC4242;
286
+ }
287
+ .json-formatter-dark.json-formatter-row .json-formatter-null {
288
+ color: #EEC97D;
289
+ }
290
+ .json-formatter-dark.json-formatter-row .json-formatter-undefined {
291
+ color: #ef8fbe;
292
+ }
293
+ .json-formatter-dark.json-formatter-row .json-formatter-function {
294
+ color: #FD48CB;
295
+ }
296
+ .json-formatter-dark.json-formatter-row .json-formatter-date {
297
+ background-color: rgba(255, 255, 255, 0.05);
298
+ }
299
+ .json-formatter-dark.json-formatter-row .json-formatter-url {
300
+ text-decoration: underline;
301
+ color: #027BFF;
302
+ cursor: pointer;
303
+ }
304
+ .json-formatter-dark.json-formatter-row .json-formatter-bracket {
305
+ color: #9494FF;
306
+ }
307
+ .json-formatter-dark.json-formatter-row .json-formatter-key {
308
+ color: #23A0DB;
309
+ padding-right: 0.2rem;
310
+ }
311
+ .json-formatter-dark.json-formatter-row .json-formatter-toggler-link {
312
+ cursor: pointer;
313
+ }
314
+ .json-formatter-dark.json-formatter-row .json-formatter-toggler {
315
+ line-height: 1.2rem;
316
+ font-size: 0.7rem;
317
+ vertical-align: middle;
318
+ opacity: 0.6;
319
+ cursor: pointer;
320
+ padding-right: 0.2rem;
321
+ }
322
+ .json-formatter-dark.json-formatter-row .json-formatter-toggler:after {
323
+ display: inline-block;
324
+ transition: transform 100ms ease-in;
325
+ content: "►";
326
+ }
327
+ .json-formatter-dark.json-formatter-row > a > .json-formatter-preview-text {
328
+ opacity: 0;
329
+ transition: opacity 0.15s ease-in;
330
+ font-style: italic;
331
+ }
332
+ .json-formatter-dark.json-formatter-row:hover > a > .json-formatter-preview-text {
333
+ opacity: 0.6;
334
+ }
335
+ .json-formatter-dark.json-formatter-row.json-formatter-open > .json-formatter-toggler-link .json-formatter-toggler:after {
336
+ transform: rotate(90deg);
337
+ }
338
+ .json-formatter-dark.json-formatter-row.json-formatter-open > .json-formatter-children:after {
339
+ display: inline-block;
340
+ }
341
+ .json-formatter-dark.json-formatter-row.json-formatter-open > a > .json-formatter-preview-text {
342
+ display: none;
343
+ }
344
+ .json-formatter-dark.json-formatter-row.json-formatter-open.json-formatter-empty:after {
345
+ display: block;
346
+ }
347
+ `);var cM=/(^\d{1,4}[\.|\\/|-]\d{1,2}[\.|\\/|-]\d{1,4})(\s*(?:0?[1-9]:[0-5]|1(?=[012])\d:[0-5])\d\s*[ap]m)?$/,fM=/\d{2}:\d{2}:\d{2} GMT-\d{4}/,hM=/\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{3}Z/,Da=window.requestAnimationFrame||function(n){return n(),0},qi={hoverPreviewEnabled:!1,hoverPreviewArrayCount:10,hoverPreviewFieldCount:5,animateOpen:!0,animateClose:!0,theme:null,useToJSON:!0,sortPropertiesBy:null,maxArrayItems:100,exposePath:!1,afterCopyHandler:function(){}},dM=function(){function n(t,e,r,i,s,a,l,c){e===void 0&&(e=1),r===void 0&&(r=qi),a===void 0&&(a=[]),c===void 0&&(c=1),this.json=t,this.open=e,this.config=r,this.key=i,this.displayKey=s,this.path=a,this.arrayRange=l,this.level=c,this._isOpen=null,this.config.hoverPreviewEnabled===void 0&&(this.config.hoverPreviewEnabled=qi.hoverPreviewEnabled),this.config.hoverPreviewArrayCount===void 0&&(this.config.hoverPreviewArrayCount=qi.hoverPreviewArrayCount),this.config.hoverPreviewFieldCount===void 0&&(this.config.hoverPreviewFieldCount=qi.hoverPreviewFieldCount),this.config.useToJSON===void 0&&(this.config.useToJSON=qi.useToJSON),this.config.maxArrayItems===void 0&&(this.config.maxArrayItems=qi.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"&&(cM.test(this.json)||hM.test(this.json)||fM.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 Vf(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 ab(this.json)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"type",{get:function(){return this.config.useToJSON&&this.json&&this.json.toJSON?"stringifiable":ob(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 r=0;r<e;r++){var i=r*this.config.maxArrayItems,s=Math.min(this.json.length-1,i+(this.config.maxArrayItems-1));t.push(i+" … "+s)}}return!this.isArray&&this.config.sortPropertiesBy?t.sort(this.config.sortPropertiesBy):t}return[]},enumerable:!1,configurable:!0}),n.prototype.toggleOpen=function(t){var e,r;if(!((r=(e=t.target)===null||e===void 0?void 0:e.classList)===null||r===void 0)&&r.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(pn("open")))},n.prototype.onCopy=function(t){var e,r,i,s,a,l;return i=this,s=void 0,l=function(){return uM(this,function(c){switch(c.label){case 0:return[4,navigator.clipboard.writeText(Vf(this.json)?JSON.stringify(this.json):this.json)];case 1:return c.sent(),(r=(e=this.config).afterCopyHandler)===null||r===void 0||r.call(e),[2]}})},new((a=void 0)||(a=Promise))(function(c,h){function f(m){try{d(l.next(m))}catch(p){h(p)}}function g(m){try{d(l.throw(m))}catch(p){h(p)}}function d(m){m.done?c(m.value):new a(function(p){p(m.value)}).then(f,g)}d((l=l.apply(i,s||[])).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(pn("open")):(this.appendChildren(this.config.animateOpen),this.element.classList.add(pn("open")))))},n.prototype.getInlinepreview=function(){var t=this;if(this.isArray){var e=this.json.slice(0,this.config.hoverPreviewArrayCount).map(Yy);return e.length<this.json.length&&e.push("..."),"["+e.join(", ")+"]"}var r=this.keys,i=r.slice(0,this.config.hoverPreviewFieldCount).map(function(a){var l=(a+": "+Yy(t.json[a])).replace(/\n/g,"");return l.length>35?l.substring(0,32)+"...":l}),s=r.length>=this.config.hoverPreviewFieldCount?", …":"";return"{ "+i.join(", ")+s+" }"},n.prototype.render=function(){this.element=We("div","row");var t=this.isObject?We("a","toggler-link"):We("span");if(this.isArrayRange?t.appendChild(We("span","range","["+this.displayKey+"]")):this.hasKey&&(t.appendChild(We("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(We("span","toggler")),this.isObject&&!this.useToJSON){var e=We("span","value"),r=We("span");if(!this.isArrayRange){var i=We("span","constructor-name",this.constructorName);r.appendChild(i)}if(this.isArray&&!this.isArrayRange){var s=We("span");s.appendChild(We("span","bracket","[")),s.appendChild(We("span","number",this.json.length)),s.appendChild(We("span","bracket","]")),r.appendChild(s)}var a=We("span","preview",this.getInlinepreview());r.appendChild(a),e.appendChild(r),t.appendChild(e)}else{(e=this.isUrl?We("a"):We("span")).classList.add(pn(this.type)),this.isDate&&e.classList.add(pn("date")),this.isUrl&&(e.classList.add(pn("url")),e.setAttribute("href",this.json));var l=lb(this.type,this.json,this.useToJSON?this.json.toJSON():this.json);e.appendChild(document.createTextNode(l)),t.appendChild(e)}if(this.isObject&&this.config.hoverPreviewEnabled){var c=We("span","preview-text");c.appendChild(document.createTextNode(this.getInlinepreview())),t.appendChild(c)}var h=We("div","children");this.isObject&&h.classList.add(pn("object")),this.isArray&&h.classList.add(pn("array")),this.isEmpty&&h.classList.add(pn("empty")),this.config&&this.config.theme&&this.element.classList.add(pn(this.config.theme)),this.isOpen&&this.element.classList.add(pn("open"));var f=We("button","copy");return f.classList.add("fas"),f.classList.add("fa-clone"),f.addEventListener("click",this.onCopy.bind(this)),t.prepend(f),this.element.appendChild(t),this.element.appendChild(h),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 r=this.element.querySelector("div."+pn("children"));if(r&&!this.isEmpty){var i=function(l,c){var h=e.isLargeArray?[c*e.config.maxArrayItems,Math.min(e.json.length-1,c*e.config.maxArrayItems+(e.config.maxArrayItems-1))]:void 0,f=e.isArrayRange?(e.arrayRange[0]+c).toString():l,g=new n(h?e.json.slice(h[0],h[1]+1):e.json[l],e.open-1,e.config,l,f,h?e.path:e.path.concat(f),h,e.level+1);r.appendChild(g.render())};if(t){var s=0,a=function(){var l=e.keys[s];i(l,s),(s+=1)<e.keys.length&&(s>10?a():Da(a))};Da(a)}else this.keys.forEach(function(l,c){return i(l,c)})}},n.prototype.removeChildren=function(t){t===void 0&&(t=!1);var e=this.element.querySelector("div."+pn("children"));if(t){var r=0,i=function(){e&&e.children.length&&(e.removeChild(e.children[0]),(r+=1)>10?i():Da(i))};Da(i)}else e&&(e.innerHTML="")},n}();const lr=Object.create(null);lr.open="0";lr.close="1";lr.ping="2";lr.pong="3";lr.message="4";lr.upgrade="5";lr.noop="6";const nl=Object.create(null);Object.keys(lr).forEach(n=>{nl[lr[n]]=n});const pM={type:"error",data:"parser error"},gM=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",mM=typeof ArrayBuffer=="function",yM=n=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(n):n&&n.buffer instanceof ArrayBuffer,ub=({type:n,data:t},e,r)=>gM&&t instanceof Blob?e?r(t):Ky(t,r):mM&&(t instanceof ArrayBuffer||yM(t))?e?r(t):Ky(new Blob([t]),r):r(lr[n]+(t||"")),Ky=(n,t)=>{const e=new FileReader;return e.onload=function(){const r=e.result.split(",")[1];t("b"+r)},e.readAsDataURL(n)},Xy="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Os=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let n=0;n<Xy.length;n++)Os[Xy.charCodeAt(n)]=n;const vM=n=>{let t=n.length*.75,e=n.length,r,i=0,s,a,l,c;n[n.length-1]==="="&&(t--,n[n.length-2]==="="&&t--);const h=new ArrayBuffer(t),f=new Uint8Array(h);for(r=0;r<e;r+=4)s=Os[n.charCodeAt(r)],a=Os[n.charCodeAt(r+1)],l=Os[n.charCodeAt(r+2)],c=Os[n.charCodeAt(r+3)],f[i++]=s<<2|a>>4,f[i++]=(a&15)<<4|l>>2,f[i++]=(l&3)<<6|c&63;return h},bM=typeof ArrayBuffer=="function",cb=(n,t)=>{if(typeof n!="string")return{type:"message",data:fb(n,t)};const e=n.charAt(0);return e==="b"?{type:"message",data:_M(n.substring(1),t)}:nl[e]?n.length>1?{type:nl[e],data:n.substring(1)}:{type:nl[e]}:pM},_M=(n,t)=>{if(bM){const e=vM(n);return fb(e,t)}else return{base64:!0,data:n}},fb=(n,t)=>{switch(t){case"blob":return n instanceof ArrayBuffer?new Blob([n]):n;case"arraybuffer":default:return n}},hb="",wM=(n,t)=>{const e=n.length,r=new Array(e);let i=0;n.forEach((s,a)=>{ub(s,!1,l=>{r[a]=l,++i===e&&t(r.join(hb))})})},xM=(n,t)=>{const e=n.split(hb),r=[];for(let i=0;i<e.length;i++){const s=cb(e[i],t);if(r.push(s),s.type==="error")break}return r},db=4;function Ne(n){if(n)return SM(n)}function SM(n){for(var t in Ne.prototype)n[t]=Ne.prototype[t];return n}Ne.prototype.on=Ne.prototype.addEventListener=function(n,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+n]=this._callbacks["$"+n]||[]).push(t),this};Ne.prototype.once=function(n,t){function e(){this.off(n,e),t.apply(this,arguments)}return e.fn=t,this.on(n,e),this};Ne.prototype.off=Ne.prototype.removeListener=Ne.prototype.removeAllListeners=Ne.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 r,i=0;i<e.length;i++)if(r=e[i],r===t||r.fn===t){e.splice(i,1);break}return e.length===0&&delete this._callbacks["$"+n],this};Ne.prototype.emit=function(n){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),e=this._callbacks["$"+n],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(e){e=e.slice(0);for(var r=0,i=e.length;r<i;++r)e[r].apply(this,t)}return this};Ne.prototype.emitReserved=Ne.prototype.emit;Ne.prototype.listeners=function(n){return this._callbacks=this._callbacks||{},this._callbacks["$"+n]||[]};Ne.prototype.hasListeners=function(n){return!!this.listeners(n).length};const qr=typeof self<"u"?self:typeof window<"u"?window:Function("return this")();function pb(n,...t){return t.reduce((e,r)=>(n.hasOwnProperty(r)&&(e[r]=n[r]),e),{})}const EM=setTimeout,AM=clearTimeout;function Ml(n,t){t.useNativeTimers?(n.setTimeoutFn=EM.bind(qr),n.clearTimeoutFn=AM.bind(qr)):(n.setTimeoutFn=setTimeout.bind(qr),n.clearTimeoutFn=clearTimeout.bind(qr))}const kM=1.33;function RM(n){return typeof n=="string"?MM(n):Math.ceil((n.byteLength||n.size)*kM)}function MM(n){let t=0,e=0;for(let r=0,i=n.length;r<i;r++)t=n.charCodeAt(r),t<128?e+=1:t<2048?e+=2:t<55296||t>=57344?e+=3:(r++,e+=4);return e}class CM extends Error{constructor(t,e,r){super(t),this.description=e,this.context=r,this.type="TransportError"}}class gb extends Ne{constructor(t){super(),this.writable=!1,Ml(this,t),this.opts=t,this.query=t.query,this.readyState="",this.socket=t.socket}onError(t,e,r){return super.emitReserved("error",new CM(t,e,r)),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=cb(t,this.socket.binaryType);this.onPacket(e)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}}const mb="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),$f=64,PM={};let Jy=0,Fa=0,Zy;function Qy(n){let t="";do t=mb[n%$f]+t,n=Math.floor(n/$f);while(n>0);return t}function yb(){const n=Qy(+new Date);return n!==Zy?(Jy=0,Zy=n):n+"."+Qy(Jy++)}for(;Fa<$f;Fa++)PM[mb[Fa]]=Fa;function vb(n){let t="";for(let e in n)n.hasOwnProperty(e)&&(t.length&&(t+="&"),t+=encodeURIComponent(e)+"="+encodeURIComponent(n[e]));return t}function OM(n){let t={},e=n.split("&");for(let r=0,i=e.length;r<i;r++){let s=e[r].split("=");t[decodeURIComponent(s[0])]=decodeURIComponent(s[1])}return t}let bb=!1;try{bb=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const LM=bb;function _b(n){const t=n.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!t||LM))return new XMLHttpRequest}catch{}if(!t)try{return new qr[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}function TM(){}const BM=function(){return new _b({xdomain:!1}).responseType!=null}();class IM extends gb{constructor(t){if(super(t),this.polling=!1,typeof location<"u"){const r=location.protocol==="https:";let i=location.port;i||(i=r?"443":"80"),this.xd=typeof location<"u"&&t.hostname!==location.hostname||i!==t.port,this.xs=t.secure!==r}const e=t&&t.forceBase64;this.supportsBinary=BM&&!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 r=0;this.polling&&(r++,this.once("pollComplete",function(){--r||e()})),this.writable||(r++,this.once("drain",function(){--r||e()}))}else e()}poll(){this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const e=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};xM(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,wM(t,e=>{this.doWrite(e,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){let t=this.query||{};const e=this.opts.secure?"https":"http";let r="";this.opts.timestampRequests!==!1&&(t[this.opts.timestampParam]=yb()),!this.supportsBinary&&!t.sid&&(t.b64=1),this.opts.port&&(e==="https"&&Number(this.opts.port)!==443||e==="http"&&Number(this.opts.port)!==80)&&(r=":"+this.opts.port);const i=vb(t),s=this.opts.hostname.indexOf(":")!==-1;return e+"://"+(s?"["+this.opts.hostname+"]":this.opts.hostname)+r+this.opts.path+(i.length?"?"+i:"")}request(t={}){return Object.assign(t,{xd:this.xd,xs:this.xs},this.opts),new or(this.uri(),t)}doWrite(t,e){const r=this.request({method:"POST",data:t});r.on("success",e),r.on("error",(i,s)=>{this.onError("xhr post error",i,s)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(e,r)=>{this.onError("xhr poll error",e,r)}),this.pollXhr=t}}class or extends Ne{constructor(t,e){super(),Ml(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=pb(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 _b(t);try{e.open(this.method,this.uri,this.async);try{if(this.opts.extraHeaders){e.setDisableHeaderCheck&&e.setDisableHeaderCheck(!0);for(let r in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(r)&&e.setRequestHeader(r,this.opts.extraHeaders[r])}}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(r){this.setTimeoutFn(()=>{this.onError(r)},0);return}typeof document<"u"&&(this.index=or.requestsCount++,or.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=TM,t)try{this.xhr.abort()}catch{}typeof document<"u"&&delete or.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()}}or.requestsCount=0;or.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",t0);else if(typeof addEventListener=="function"){const n="onpagehide"in qr?"pagehide":"unload";addEventListener(n,t0,!1)}}function t0(){for(let n in or.requests)or.requests.hasOwnProperty(n)&&or.requests[n].abort()}const wb=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,e)=>e(t,0),Na=qr.WebSocket||qr.MozWebSocket,e0=!0,DM="arraybuffer",n0=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class FM extends gb{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,r=n0?{}:pb(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=e0&&!n0?e?new Na(t,e):new Na(t):new Na(t,e,r)}catch(i){return this.emitReserved("error",i)}this.ws.binaryType=this.socket.binaryType||DM,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 r=t[e],i=e===t.length-1;ub(r,this.supportsBinary,s=>{const a={};try{e0&&this.ws.send(s)}catch{}i&&wb(()=>{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 r="";this.opts.port&&(e==="wss"&&Number(this.opts.port)!==443||e==="ws"&&Number(this.opts.port)!==80)&&(r=":"+this.opts.port),this.opts.timestampRequests&&(t[this.opts.timestampParam]=yb()),this.supportsBinary||(t.b64=1);const i=vb(t),s=this.opts.hostname.indexOf(":")!==-1;return e+"://"+(s?"["+this.opts.hostname+"]":this.opts.hostname)+r+this.opts.path+(i.length?"?"+i:"")}check(){return!!Na}}const NM={websocket:FM,polling:IM},jM=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,UM=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Gf(n){const t=n,e=n.indexOf("["),r=n.indexOf("]");e!=-1&&r!=-1&&(n=n.substring(0,e)+n.substring(e,r).replace(/:/g,";")+n.substring(r,n.length));let i=jM.exec(n||""),s={},a=14;for(;a--;)s[UM[a]]=i[a]||"";return e!=-1&&r!=-1&&(s.source=t,s.host=s.host.substring(1,s.host.length-1).replace(/;/g,":"),s.authority=s.authority.replace("[","").replace("]","").replace(/;/g,":"),s.ipv6uri=!0),s.pathNames=qM(s,s.path),s.queryKey=WM(s,s.query),s}function qM(n,t){const e=/\/{2,9}/g,r=t.replace(e,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&r.splice(0,1),t.slice(-1)=="/"&&r.splice(r.length-1,1),r}function WM(n,t){const e={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,i,s){i&&(e[i]=s)}),e}let xb=class Vi extends Ne{constructor(t,e={}){super(),t&&typeof t=="object"&&(e=t,t=null),t?(t=Gf(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=Gf(e.host).host),Ml(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=OM(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=db,e.transport=t,this.id&&(e.sid=this.id);const r=Object.assign({},this.opts.transportOptions[t],this.opts,{query:e,socket:this,hostname:this.hostname,secure:this.secure,port:this.port});return new NM[t](r)}open(){let t;if(this.opts.rememberUpgrade&&Vi.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),r=!1;Vi.priorWebsocketSuccess=!1;const i=()=>{r||(e.send([{type:"ping",data:"probe"}]),e.once("packet",g=>{if(!r)if(g.type==="pong"&&g.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",e),!e)return;Vi.priorWebsocketSuccess=e.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(f(),this.setTransport(e),e.send([{type:"upgrade"}]),this.emitReserved("upgrade",e),e=null,this.upgrading=!1,this.flush())})}else{const d=new Error("probe error");d.transport=e.name,this.emitReserved("upgradeError",d)}}))};function s(){r||(r=!0,f(),e.close(),e=null)}const a=g=>{const d=new Error("probe error: "+g);d.transport=e.name,s(),this.emitReserved("upgradeError",d)};function l(){a("transport closed")}function c(){a("socket closed")}function h(g){e&&g.name!==e.name&&s()}const f=()=>{e.removeListener("open",i),e.removeListener("error",a),e.removeListener("close",l),this.off("close",c),this.off("upgrading",h)};e.once("open",i),e.once("error",a),e.once("close",l),this.once("close",c),this.once("upgrading",h),e.open()}onOpen(){if(this.readyState="open",Vi.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 r=0;r<this.writeBuffer.length;r++){const i=this.writeBuffer[r].data;if(i&&(e+=RM(i)),r>0&&e>this.maxPayload)return this.writeBuffer.slice(0,r);e+=2}return this.writeBuffer}write(t,e,r){return this.sendPacket("message",t,e,r),this}send(t,e,r){return this.sendPacket("message",t,e,r),this}sendPacket(t,e,r,i){if(typeof e=="function"&&(i=e,e=void 0),typeof r=="function"&&(i=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const s={type:t,data:e,options:r};this.emitReserved("packetCreate",s),this.writeBuffer.push(s),i&&this.once("flush",i),this.flush()}close(){const t=()=>{this.onClose("forced close"),this.transport.close()},e=()=>{this.off("upgrade",e),this.off("upgradeError",e),t()},r=()=>{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?r():t()}):this.upgrading?r():t()),this}onError(t){Vi.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 r=0;const i=t.length;for(;r<i;r++)~this.transports.indexOf(t[r])&&e.push(t[r]);return e}};xb.protocol=db;function HM(n,t="",e){let r=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),r=Gf(n)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";const s=r.host.indexOf(":")!==-1?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+s+":"+r.port+t,r.href=r.protocol+"://"+s+(e&&e.port===r.port?"":":"+r.port),r}const zM=typeof ArrayBuffer=="function",VM=n=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(n):n.buffer instanceof ArrayBuffer,Sb=Object.prototype.toString,$M=typeof Blob=="function"||typeof Blob<"u"&&Sb.call(Blob)==="[object BlobConstructor]",GM=typeof File=="function"||typeof File<"u"&&Sb.call(File)==="[object FileConstructor]";function kh(n){return zM&&(n instanceof ArrayBuffer||VM(n))||$M&&n instanceof Blob||GM&&n instanceof File}function rl(n,t){if(!n||typeof n!="object")return!1;if(Array.isArray(n)){for(let e=0,r=n.length;e<r;e++)if(rl(n[e]))return!0;return!1}if(kh(n))return!0;if(n.toJSON&&typeof n.toJSON=="function"&&arguments.length===1)return rl(n.toJSON(),!0);for(const e in n)if(Object.prototype.hasOwnProperty.call(n,e)&&rl(n[e]))return!0;return!1}function YM(n){const t=[],e=n.data,r=n;return r.data=Yf(e,t),r.attachments=t.length,{packet:r,buffers:t}}function Yf(n,t){if(!n)return n;if(kh(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 r=0;r<n.length;r++)e[r]=Yf(n[r],t);return e}else if(typeof n=="object"&&!(n instanceof Date)){const e={};for(const r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=Yf(n[r],t));return e}return n}function KM(n,t){return n.data=Kf(n.data,t),n.attachments=void 0,n}function Kf(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]=Kf(n[e],t);else if(typeof n=="object")for(const e in n)Object.prototype.hasOwnProperty.call(n,e)&&(n[e]=Kf(n[e],t));return n}const XM=5;var ee;(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"})(ee||(ee={}));class JM{constructor(t){this.replacer=t}encode(t){return(t.type===ee.EVENT||t.type===ee.ACK)&&rl(t)?(t.type=t.type===ee.EVENT?ee.BINARY_EVENT:ee.BINARY_ACK,this.encodeAsBinary(t)):[this.encodeAsString(t)]}encodeAsString(t){let e=""+t.type;return(t.type===ee.BINARY_EVENT||t.type===ee.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=YM(t),r=this.encodeAsString(e.packet),i=e.buffers;return i.unshift(r),i}}class Rh extends Ne{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===ee.BINARY_EVENT||e.type===ee.BINARY_ACK?(this.reconstructor=new ZM(e),e.attachments===0&&super.emitReserved("decoded",e)):super.emitReserved("decoded",e)}else if(kh(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 r={type:Number(t.charAt(0))};if(ee[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===ee.BINARY_EVENT||r.type===ee.BINARY_ACK){const s=e+1;for(;t.charAt(++e)!=="-"&&e!=t.length;);const a=t.substring(s,e);if(a!=Number(a)||t.charAt(e)!=="-")throw new Error("Illegal attachments");r.attachments=Number(a)}if(t.charAt(e+1)==="/"){const s=e+1;for(;++e&&!(t.charAt(e)===","||e===t.length););r.nsp=t.substring(s,e)}else r.nsp="/";const i=t.charAt(e+1);if(i!==""&&Number(i)==i){const s=e+1;for(;++e;){const a=t.charAt(e);if(a==null||Number(a)!=a){--e;break}if(e===t.length)break}r.id=Number(t.substring(s,e+1))}if(t.charAt(++e)){const s=this.tryParse(t.substr(e));if(Rh.isPayloadValid(r.type,s))r.data=s;else throw new Error("invalid payload")}return r}tryParse(t){try{return JSON.parse(t,this.reviver)}catch{return!1}}static isPayloadValid(t,e){switch(t){case ee.CONNECT:return typeof e=="object";case ee.DISCONNECT:return e===void 0;case ee.CONNECT_ERROR:return typeof e=="string"||typeof e=="object";case ee.EVENT:case ee.BINARY_EVENT:return Array.isArray(e)&&e.length>0;case ee.ACK:case ee.BINARY_ACK:return Array.isArray(e)}}destroy(){this.reconstructor&&this.reconstructor.finishedReconstruction()}}class ZM{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=KM(this.reconPack,this.buffers);return this.finishedReconstruction(),e}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const QM=Object.freeze(Object.defineProperty({__proto__:null,Decoder:Rh,Encoder:JM,get PacketType(){return ee},protocol:XM},Symbol.toStringTag,{value:"Module"}));function zn(n,t,e){return n.on(t,e),function(){n.off(t,e)}}const tC=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class Eb extends Ne{constructor(t,e,r){super(),this.connected=!1,this.receiveBuffer=[],this.sendBuffer=[],this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=e,r&&r.auth&&(this.auth=r.auth),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[zn(t,"open",this.onopen.bind(this)),zn(t,"packet",this.onpacket.bind(this)),zn(t,"error",this.onerror.bind(this)),zn(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(tC.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');e.unshift(t);const r={type:ee.EVENT,data:e};if(r.options={},r.options.compress=this.flags.compress!==!1,typeof e[e.length-1]=="function"){const a=this.ids++,l=e.pop();this._registerAckCallback(a,l),r.id=a}const i=this.io.engine&&this.io.engine.transport&&this.io.engine.transport.writable;return this.flags.volatile&&(!i||!this.connected)||(this.connected?(this.notifyOutgoingListeners(r),this.packet(r)):this.sendBuffer.push(r)),this.flags={},this}_registerAckCallback(t,e){const r=this.flags.timeout;if(r===void 0){this.acks[t]=e;return}const i=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let s=0;s<this.sendBuffer.length;s++)this.sendBuffer[s].id===t&&this.sendBuffer.splice(s,1);e.call(this,new Error("operation has timed out"))},r);this.acks[t]=(...s)=>{this.io.clearTimeoutFn(i),e.apply(this,[null,...s])}}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this.packet({type:ee.CONNECT,data:t})}):this.packet({type:ee.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 ee.CONNECT:if(t.data&&t.data.sid){const i=t.data.sid;this.onconnect(i)}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 ee.EVENT:case ee.BINARY_EVENT:this.onevent(t);break;case ee.ACK:case ee.BINARY_ACK:this.onack(t);break;case ee.DISCONNECT:this.ondisconnect();break;case ee.CONNECT_ERROR:this.destroy();const r=new Error(t.data.message);r.data=t.data.data,this.emitReserved("connect_error",r);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 r of e)r.apply(this,t)}super.emit.apply(this,t)}ack(t){const e=this;let r=!1;return function(...i){r||(r=!0,e.packet({type:ee.ACK,id:t,data:i}))}}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:ee.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 r=0;r<e.length;r++)if(t===e[r])return e.splice(r,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 r=0;r<e.length;r++)if(t===e[r])return e.splice(r,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 r of e)r.apply(this,t.data)}}}function is(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}is.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};is.prototype.reset=function(){this.attempts=0};is.prototype.setMin=function(n){this.ms=n};is.prototype.setMax=function(n){this.max=n};is.prototype.setJitter=function(n){this.jitter=n};class Xf extends Ne{constructor(t,e){var r;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,Ml(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((r=e.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new is({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(e.timeout==null?2e4:e.timeout),this._readyState="closed",this.uri=t;const i=e.parser||QM;this.encoder=new i.Encoder,this.decoder=new i.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 xb(this.uri,this.opts);const e=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const i=zn(e,"open",function(){r.onopen(),t&&t()}),s=zn(e,"error",a=>{r.cleanup(),r._readyState="closed",this.emitReserved("error",a),t?t(a):r.maybeReconnectOnOpen()});if(this._timeout!==!1){const a=this._timeout;a===0&&i();const l=this.setTimeoutFn(()=>{i(),e.close(),e.emit("error",new Error("timeout"))},a);this.opts.autoUnref&&l.unref(),this.subs.push(function(){clearTimeout(l)})}return this.subs.push(i),this.subs.push(s),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(zn(t,"ping",this.onping.bind(this)),zn(t,"data",this.ondata.bind(this)),zn(t,"error",this.onerror.bind(this)),zn(t,"close",this.onclose.bind(this)),zn(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){wb(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,e){let r=this.nsps[t];return r||(r=new Eb(this,t,e),this.nsps[t]=r),r}_destroy(t){const e=Object.keys(this.nsps);for(const r of e)if(this.nsps[r].active)return;this._close()}_packet(t){const e=this.encoder.encode(t);for(let r=0;r<e.length;r++)this.engine.write(e[r],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 r=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(i=>{i?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",i)):t.onreconnect()}))},e);this.opts.autoUnref&&r.unref(),this.subs.push(function(){clearTimeout(r)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const Es={};function il(n,t){typeof n=="object"&&(t=n,n=void 0),t=t||{};const e=HM(n,t.path||"/socket.io"),r=e.source,i=e.id,s=e.path,a=Es[i]&&s in Es[i].nsps,l=t.forceNew||t["force new connection"]||t.multiplex===!1||a;let c;return l?c=new Xf(r,t):(Es[i]||(Es[i]=new Xf(r,t)),c=Es[i]),e.query&&!t.query&&(t.query=e.queryKey),c.socket(e.path,t)}Object.assign(il,{Manager:Xf,Socket:Eb,io:il,connect:il});class eC extends Kk{constructor(){var t,e;super(...arguments),this.config={history:{limit:100}},this.instances={io:il(((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:(r,i)=>new Promise(s=>this.instances.io.emit(r,i,s)),subscribe:(r,i)=>this.instances.io.on(r,i)}},this.events=new oo}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 Nt=new eC,nC=Fe.compile(lM);class Cl extends Oe{constructor(t){var e;super(nC({})),this.options=t,this.instance=new dM({},((e=this.options)==null?void 0:e.depth)??3,{theme:"custom",afterCopyHandler:()=>Nt.shared.popups.push("Copied!")}),this.provide({})}provide(t){return this.instance.json=t,this.clear().append(this.instance.render())}static build(t){return new Cl(t)}}const rC=Fe.compile(aM);class js extends Oe{constructor(t){super(),this.data=t,this.viewer=Cl.build({depth:3}).hide(),this.refresh()}provide(t){return Object.assign(this,{data:t})}refresh(){return this.replace(rC(this.data)).append(this.viewer),this.viewer.provide(kn.pick(this.data,["id","type","transports","schema"])),$r.build(this.element.querySelector("button.activity")).handle(()=>Nt.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 r;return(r=e==null?void 0:e.classList)==null?void 0:r.contains("meta")})&&t.target.nodeName!=="BUTTON"?this.viewer.isHidden?this.viewer.show():this.viewer.hide():null),this}match(t){var e,r;return[this.data.group,this.data.name,(e=this.data.schema.forward)==null?void 0:e.baseUrl,(r=this.data.schema.forward)==null?void 0:r.url,this.data.meta.tags.map(({value:i})=>i).join()].some(i=>i==null?void 0:i.includes(t))}static build(t){return new js(t)}}const iC=`
348
+ <div class="container history" id="{{id}}">
349
+ <div class="meta">
350
+ <div class="segment">
351
+ <span class="time">{{#toLocaleTime timestamp}}{{/toLocaleTime}}</span>
352
+
353
+ {{#if snapshot.error}}
354
+ <span class="error">
355
+ {{#compare snapshot.error.code.length 'lte' 24}}{{snapshot.error.code}}{{/compare}}
356
+ {{#compare snapshot.error.code.length 'gt' 24}}Error{{/compare}}
357
+ </span>
358
+ {{/if}}
359
+
360
+ {{#compare status 'eq' 'pending'}}
361
+ <span class="pending"><i class="fas fa-hourglass-start"></i></span>
362
+ {{/compare}}
363
+
364
+ {{#compare status 'eq' 'completed'}}
365
+ <span class="status
366
+ {{#compare snapshot.transport 'eq' 'http'}}
367
+ {{#compare snapshot.outgoing.status 'lt' 400}}green{{/compare}}
368
+ {{#compare snapshot.outgoing.status 'gte' 400}}red{{/compare}}
369
+ {{/compare}}
370
+ "><b>{{snapshot.outgoing.status}}</b> {{toSeconds duration}}s</span>
371
+ {{/compare}}
372
+
373
+ <span class="method" style="color: {{toColor snapshot.incoming.method}};">{{snapshot.incoming.method}}</span>
374
+ <span class="path">{{> truncated value=snapshot.incoming.path length=45}}</span>
375
+
376
+ {{#if snapshot.seed}}<span class="seed">{{snapshot.seed}}</span>{{/if}}
377
+ </div>
378
+
379
+ <span class="arrow"><i class="fas fa-chevron-right"></i></span>
380
+
381
+ {{#if expectation}}
382
+ {{>expectationMeta expectation format='short' isCached=snapshot.forwarded.isCached}}
383
+ {{else}}
384
+ <div class="segment"><span class="handled-with red">Nowhere</span></div>
385
+ {{/if}}
386
+ </div>
387
+
388
+ {{!-- {{#if snapshot.messages}}
389
+ <p class="messages-title">
390
+ <span class="count">Total messages <b>{{snapshot.messages.length}}</b></span>
391
+ </p>
392
+
393
+ <div class="messages">
394
+ {{#each snapshot.messages}}
395
+ <div id="{{id}}" class="message {{location}}">
396
+ <p class="header">
397
+ {{#compare location 'eq' 'incoming'}}<i class="fas fa-angle-right"></i>{{/compare}}
398
+ {{#compare location 'eq' 'outgoing'}}<i class="fas fa-angle-left"></i>{{/compare}}
399
+ <span class="time">{{#toLocaleTime timestamp}}{{/toLocaleTime}}</span>
400
+ </p>
401
+
402
+ <pre class="panel hidden"></pre>
403
+ </div>
404
+ {{/each}}
405
+ </div>
406
+ {{/if}} --}}
407
+ </div>
408
+ `,sC=Fe.compile(iC);class Us extends Oe{constructor(t){super(),this.data=t,this.viewer=Cl.build({depth:2}).hide(),this.refresh()}provide(t){return Object.assign(this,{data:t})}refresh(){var t,e;return this.replace(sC(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",r=>r.composedPath().some(i=>{var s;return(s=i==null?void 0:i.classList)==null?void 0:s.contains("meta")})?this.viewer.isHidden?this.viewer.show():this.viewer.hide():null),this}match(t){var r;return[this.data.group,(r=this.data.expectation)==null?void 0:r.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(i=>i==null?void 0:i.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(i=>{var s;return(s=JSON.stringify(i))==null?void 0:s.includes(t)})}static build(t){return new Us(t)}}class Mh extends Oe{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 Mh(t)}}class Ch extends Mh{constructor(){super({isPreventedToManualClose:!0}),this.append('<div><p>Ping pong</p><div class="loader"></div></div>').assignId("loader")}static build(){return new Ch}}const oC=`
409
+ <div class="popup-message {{level}}">
410
+ {{#compare level 'eq' 'info'}}<i class="fas fa-check"></i>{{/compare}}
411
+ {{#compare level 'eq' 'warning'}}<i class="fas fa-exclamation-triangle"></i>{{/compare}}
412
+ {{#compare level 'eq' 'error'}}<i class="fas fa-times"></i>{{/compare}}
413
+
414
+ <span>{{{message}}}</span>
415
+ </div>
416
+ `,aC=Fe.compile(oC);class Ph extends Oe{constructor(){super(),this.element.classList.add("popups")}push(t,e={}){const r=this.compileHtmlStringToElement(aC({message:t,level:e.level??"info"}));this.element.prepend(r),setTimeout(()=>r.remove(),3e3)}static build(){return new Ph}}const lC=`
417
+ <div class="search">
418
+ <i class="fas fa-search"></i>
419
+ <div class="input" title="{{title}}"><input data-key="search" type="text"></div>
420
+ <button><i class="far fa-times-circle"></i></button>
421
+ </div>
422
+ `,uC=Fe.compile(lC);class Pl extends Oe{constructor(t){super(uC({title:(t==null?void 0:t.title)??"Type something"})),this.options=t,this.events=new Bv.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",kn.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 Pl(t)}}const cC=`
423
+ <header>
424
+ <div id="tabs">
425
+ {{#each tabs}}
426
+ {{#compare type 'eq' 'separator'}}<hr>{{/compare}}
427
+
428
+ {{#compare type 'eq' 'section'}}
429
+ <button class="{{#unless entity.meta.name}}icon-only{{/unless}} {{#if isSelected}}checked{{/if}}" id="{{id}}">
430
+ <i class="{{entity.meta.icon}}"></i>{{entity.meta.name}}
431
+ </button>
432
+ {{/compare}}
433
+ {{/each}}
434
+ </div>
435
+ </header>
436
+ `,fC=Fe.compile(cC);class Oh extends Oe{constructor(t){super(fC({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,r)=>kn.set(e,r.id,r),{}),this.events=new oo,Object.values(this.sections).forEach(e=>e.on("select",()=>{const r=this.element.querySelector(`button#${e.id}`);this.element.querySelectorAll("div#tabs button").forEach(i=>i.classList.remove("checked")),r==null||r.classList.add("checked")})),this.element.querySelector("div#tabs").addEventListener("click",e=>{var i;const r=e;((i=r.target)==null?void 0:i.nodeName)!=="BUTTON"||!this.sections[r.target.id]||this.emit("select",this.sections[r.target.id])}),this.on("select",e=>{Object.values(this.sections).forEach(r=>r.hide()),Nt.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 Oh(t)}}const hC=`
437
+ <div class="empty">
438
+ <i class="fas fa-hourglass-start"></i>
439
+ <p>There's still nothing...</p>
440
+ </div>
441
+ `,dC=Fe.compile(hC);class Ol extends Oe{static build(){return new Ol(dC({}))}}/*!
442
+ * @kurkle/color v0.3.4
443
+ * https://github.com/kurkle/color#readme
444
+ * (c) 2024 Jukka Kurkela
445
+ * Released under the MIT License
446
+ */function co(n){return n+.5|0}const Wr=(n,t,e)=>Math.max(Math.min(n,e),t);function Ls(n){return Wr(co(n*2.55),0,255)}function Gr(n){return Wr(co(n*255),0,255)}function xr(n){return Wr(co(n/2.55)/100,0,1)}function r0(n){return Wr(co(n*100),0,100)}const Fn={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},Jf=[..."0123456789ABCDEF"],pC=n=>Jf[n&15],gC=n=>Jf[(n&240)>>4]+Jf[n&15],ja=n=>(n&240)>>4===(n&15),mC=n=>ja(n.r)&&ja(n.g)&&ja(n.b)&&ja(n.a);function yC(n){var t=n.length,e;return n[0]==="#"&&(t===4||t===5?e={r:255&Fn[n[1]]*17,g:255&Fn[n[2]]*17,b:255&Fn[n[3]]*17,a:t===5?Fn[n[4]]*17:255}:(t===7||t===9)&&(e={r:Fn[n[1]]<<4|Fn[n[2]],g:Fn[n[3]]<<4|Fn[n[4]],b:Fn[n[5]]<<4|Fn[n[6]],a:t===9?Fn[n[7]]<<4|Fn[n[8]]:255})),e}const vC=(n,t)=>n<255?t(n):"";function bC(n){var t=mC(n)?pC:gC;return n?"#"+t(n.r)+t(n.g)+t(n.b)+vC(n.a,t):void 0}const _C=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function Ab(n,t,e){const r=t*Math.min(e,1-e),i=(s,a=(s+n/30)%12)=>e-r*Math.max(Math.min(a-3,9-a,1),-1);return[i(0),i(8),i(4)]}function wC(n,t,e){const r=(i,s=(i+n/60)%6)=>e-e*t*Math.max(Math.min(s,4-s,1),0);return[r(5),r(3),r(1)]}function xC(n,t,e){const r=Ab(n,1,.5);let i;for(t+e>1&&(i=1/(t+e),t*=i,e*=i),i=0;i<3;i++)r[i]*=1-t-e,r[i]+=t;return r}function SC(n,t,e,r,i){return n===i?(t-e)/r+(t<e?6:0):t===i?(e-n)/r+2:(n-t)/r+4}function Lh(n){const e=n.r/255,r=n.g/255,i=n.b/255,s=Math.max(e,r,i),a=Math.min(e,r,i),l=(s+a)/2;let c,h,f;return s!==a&&(f=s-a,h=l>.5?f/(2-s-a):f/(s+a),c=SC(e,r,i,f,s),c=c*60+.5),[c|0,h||0,l]}function Th(n,t,e,r){return(Array.isArray(t)?n(t[0],t[1],t[2]):n(t,e,r)).map(Gr)}function Bh(n,t,e){return Th(Ab,n,t,e)}function EC(n,t,e){return Th(xC,n,t,e)}function AC(n,t,e){return Th(wC,n,t,e)}function kb(n){return(n%360+360)%360}function kC(n){const t=_C.exec(n);let e=255,r;if(!t)return;t[5]!==r&&(e=t[6]?Ls(+t[5]):Gr(+t[5]));const i=kb(+t[2]),s=+t[3]/100,a=+t[4]/100;return t[1]==="hwb"?r=EC(i,s,a):t[1]==="hsv"?r=AC(i,s,a):r=Bh(i,s,a),{r:r[0],g:r[1],b:r[2],a:e}}function RC(n,t){var e=Lh(n);e[0]=kb(e[0]+t),e=Bh(e),n.r=e[0],n.g=e[1],n.b=e[2]}function MC(n){if(!n)return;const t=Lh(n),e=t[0],r=r0(t[1]),i=r0(t[2]);return n.a<255?`hsla(${e}, ${r}%, ${i}%, ${xr(n.a)})`:`hsl(${e}, ${r}%, ${i}%)`}const i0={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"},s0={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 CC(){const n={},t=Object.keys(s0),e=Object.keys(i0);let r,i,s,a,l;for(r=0;r<t.length;r++){for(a=l=t[r],i=0;i<e.length;i++)s=e[i],l=l.replace(s,i0[s]);s=parseInt(s0[a],16),n[l]=[s>>16&255,s>>8&255,s&255]}return n}let Ua;function PC(n){Ua||(Ua=CC(),Ua.transparent=[0,0,0,0]);const t=Ua[n.toLowerCase()];return t&&{r:t[0],g:t[1],b:t[2],a:t.length===4?t[3]:255}}const OC=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function LC(n){const t=OC.exec(n);let e=255,r,i,s;if(t){if(t[7]!==r){const a=+t[7];e=t[8]?Ls(a):Wr(a*255,0,255)}return r=+t[1],i=+t[3],s=+t[5],r=255&(t[2]?Ls(r):Wr(r,0,255)),i=255&(t[4]?Ls(i):Wr(i,0,255)),s=255&(t[6]?Ls(s):Wr(s,0,255)),{r,g:i,b:s,a:e}}}function TC(n){return n&&(n.a<255?`rgba(${n.r}, ${n.g}, ${n.b}, ${xr(n.a)})`:`rgb(${n.r}, ${n.g}, ${n.b})`)}const Cf=n=>n<=.0031308?n*12.92:Math.pow(n,1/2.4)*1.055-.055,Wi=n=>n<=.04045?n/12.92:Math.pow((n+.055)/1.055,2.4);function BC(n,t,e){const r=Wi(xr(n.r)),i=Wi(xr(n.g)),s=Wi(xr(n.b));return{r:Gr(Cf(r+e*(Wi(xr(t.r))-r))),g:Gr(Cf(i+e*(Wi(xr(t.g))-i))),b:Gr(Cf(s+e*(Wi(xr(t.b))-s))),a:n.a+e*(t.a-n.a)}}function qa(n,t,e){if(n){let r=Lh(n);r[t]=Math.max(0,Math.min(r[t]+r[t]*e,t===0?360:1)),r=Bh(r),n.r=r[0],n.g=r[1],n.b=r[2]}}function Rb(n,t){return n&&Object.assign(t||{},n)}function o0(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=Gr(n[3]))):(t=Rb(n,{r:0,g:0,b:0,a:1}),t.a=Gr(t.a)),t}function IC(n){return n.charAt(0)==="r"?LC(n):kC(n)}class Xs{constructor(t){if(t instanceof Xs)return t;const e=typeof t;let r;e==="object"?r=o0(t):e==="string"&&(r=yC(t)||PC(t)||IC(t)),this._rgb=r,this._valid=!!r}get valid(){return this._valid}get rgb(){var t=Rb(this._rgb);return t&&(t.a=xr(t.a)),t}set rgb(t){this._rgb=o0(t)}rgbString(){return this._valid?TC(this._rgb):void 0}hexString(){return this._valid?bC(this._rgb):void 0}hslString(){return this._valid?MC(this._rgb):void 0}mix(t,e){if(t){const r=this.rgb,i=t.rgb;let s;const a=e===s?.5:e,l=2*a-1,c=r.a-i.a,h=((l*c===-1?l:(l+c)/(1+l*c))+1)/2;s=1-h,r.r=255&h*r.r+s*i.r+.5,r.g=255&h*r.g+s*i.g+.5,r.b=255&h*r.b+s*i.b+.5,r.a=a*r.a+(1-a)*i.a,this.rgb=r}return this}interpolate(t,e){return t&&(this._rgb=BC(this._rgb,t._rgb,e)),this}clone(){return new Xs(this.rgb)}alpha(t){return this._rgb.a=Gr(t),this}clearer(t){const e=this._rgb;return e.a*=1-t,this}greyscale(){const t=this._rgb,e=co(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 qa(this._rgb,2,t),this}darken(t){return qa(this._rgb,2,-t),this}saturate(t){return qa(this._rgb,1,t),this}desaturate(t){return qa(this._rgb,1,-t),this}rotate(t){return RC(this._rgb,t),this}}/*!
447
+ * Chart.js v4.4.8
448
+ * https://www.chartjs.org
449
+ * (c) 2025 Chart.js Contributors
450
+ * Released under the MIT License
451
+ */function br(){}const DC=(()=>{let n=0;return()=>n++})();function Kt(n){return n==null}function Ee(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 Jt(n){return n!==null&&Object.prototype.toString.call(n)==="[object Object]"}function Le(n){return(typeof n=="number"||n instanceof Number)&&isFinite(+n)}function En(n,t){return Le(n)?n:t}function Wt(n,t){return typeof n>"u"?t:n}const FC=(n,t)=>typeof n=="string"&&n.endsWith("%")?parseFloat(n)/100:+n/t,Mb=(n,t)=>typeof n=="string"&&n.endsWith("%")?parseFloat(n)/100*t:+n;function me(n,t,e){if(n&&typeof n.call=="function")return n.apply(e,t)}function le(n,t,e,r){let i,s,a;if(Ee(n))for(s=n.length,i=0;i<s;i++)t.call(e,n[i],i);else if(Jt(n))for(a=Object.keys(n),s=a.length,i=0;i<s;i++)t.call(e,n[a[i]],a[i])}function gl(n,t){let e,r,i,s;if(!n||!t||n.length!==t.length)return!1;for(e=0,r=n.length;e<r;++e)if(i=n[e],s=t[e],i.datasetIndex!==s.datasetIndex||i.index!==s.index)return!1;return!0}function ml(n){if(Ee(n))return n.map(ml);if(Jt(n)){const t=Object.create(null),e=Object.keys(n),r=e.length;let i=0;for(;i<r;++i)t[e[i]]=ml(n[e[i]]);return t}return n}function Cb(n){return["__proto__","prototype","constructor"].indexOf(n)===-1}function NC(n,t,e,r){if(!Cb(n))return;const i=t[n],s=e[n];Jt(i)&&Jt(s)?Js(i,s,r):t[n]=ml(s)}function Js(n,t,e){const r=Ee(t)?t:[t],i=r.length;if(!Jt(n))return n;e=e||{};const s=e.merger||NC;let a;for(let l=0;l<i;++l){if(a=r[l],!Jt(a))continue;const c=Object.keys(a);for(let h=0,f=c.length;h<f;++h)s(c[h],n,a,e)}return n}function qs(n,t){return Js(n,t,{merger:jC})}function jC(n,t,e){if(!Cb(n))return;const r=t[n],i=e[n];Jt(r)&&Jt(i)?qs(r,i):Object.prototype.hasOwnProperty.call(t,n)||(t[n]=ml(i))}const a0={"":n=>n,x:n=>n.x,y:n=>n.y};function UC(n){const t=n.split("."),e=[];let r="";for(const i of t)r+=i,r.endsWith("\\")?r=r.slice(0,-1)+".":(e.push(r),r="");return e}function qC(n){const t=UC(n);return e=>{for(const r of t){if(r==="")break;e=e&&e[r]}return e}}function Yr(n,t){return(a0[t]||(a0[t]=qC(t)))(n)}function Ih(n){return n.charAt(0).toUpperCase()+n.slice(1)}const Zs=n=>typeof n<"u",Kr=n=>typeof n=="function",l0=(n,t)=>{if(n.size!==t.size)return!1;for(const e of n)if(!t.has(e))return!1;return!0};function WC(n){return n.type==="mouseup"||n.type==="click"||n.type==="contextmenu"}const _e=Math.PI,be=2*_e,HC=be+_e,yl=Number.POSITIVE_INFINITY,zC=_e/180,Ie=_e/2,ai=_e/4,u0=_e*2/3,Hr=Math.log10,ar=Math.sign;function Ws(n,t,e){return Math.abs(n-t)<e}function c0(n){const t=Math.round(n);n=Ws(n,t,n/1e3)?t:n;const e=Math.pow(10,Math.floor(Hr(n))),r=n/e;return(r<=1?1:r<=2?2:r<=5?5:10)*e}function VC(n){const t=[],e=Math.sqrt(n);let r;for(r=1;r<e;r++)n%r===0&&(t.push(r),t.push(n/r));return e===(e|0)&&t.push(e),t.sort((i,s)=>i-s).pop(),t}function $C(n){return typeof n=="symbol"||typeof n=="object"&&n!==null&&!(Symbol.toPrimitive in n||"toString"in n||"valueOf"in n)}function Xi(n){return!$C(n)&&!isNaN(parseFloat(n))&&isFinite(n)}function GC(n,t){const e=Math.round(n);return e-t<=n&&e+t>=n}function Pb(n,t,e){let r,i,s;for(r=0,i=n.length;r<i;r++)s=n[r][e],isNaN(s)||(t.min=Math.min(t.min,s),t.max=Math.max(t.max,s))}function Vn(n){return n*(_e/180)}function Dh(n){return n*(180/_e)}function f0(n){if(!Le(n))return;let t=1,e=0;for(;Math.round(n*t)/t!==n;)t*=10,e++;return e}function Ob(n,t){const e=t.x-n.x,r=t.y-n.y,i=Math.sqrt(e*e+r*r);let s=Math.atan2(r,e);return s<-.5*_e&&(s+=be),{angle:s,distance:i}}function Zf(n,t){return Math.sqrt(Math.pow(t.x-n.x,2)+Math.pow(t.y-n.y,2))}function YC(n,t){return(n-t+HC)%be-_e}function An(n){return(n%be+be)%be}function Qs(n,t,e,r){const i=An(n),s=An(t),a=An(e),l=An(s-i),c=An(a-i),h=An(i-s),f=An(i-a);return i===s||i===a||r&&s===a||l>c&&h<f}function Ge(n,t,e){return Math.max(t,Math.min(e,n))}function KC(n){return Ge(n,-32768,32767)}function Rr(n,t,e,r=1e-6){return n>=Math.min(t,e)-r&&n<=Math.max(t,e)+r}function Fh(n,t,e){e=e||(a=>n[a]<t);let r=n.length-1,i=0,s;for(;r-i>1;)s=i+r>>1,e(s)?i=s:r=s;return{lo:i,hi:r}}const Mr=(n,t,e,r)=>Fh(n,e,r?i=>{const s=n[i][t];return s<e||s===e&&n[i+1][t]===e}:i=>n[i][t]<e),XC=(n,t,e)=>Fh(n,e,r=>n[r][t]>=e);function JC(n,t,e){let r=0,i=n.length;for(;r<i&&n[r]<t;)r++;for(;i>r&&n[i-1]>e;)i--;return r>0||i<n.length?n.slice(r,i):n}const Lb=["push","pop","shift","splice","unshift"];function ZC(n,t){if(n._chartjs){n._chartjs.listeners.push(t);return}Object.defineProperty(n,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[t]}}),Lb.forEach(e=>{const r="_onData"+Ih(e),i=n[e];Object.defineProperty(n,e,{configurable:!0,enumerable:!1,value(...s){const a=i.apply(this,s);return n._chartjs.listeners.forEach(l=>{typeof l[r]=="function"&&l[r](...s)}),a}})})}function h0(n,t){const e=n._chartjs;if(!e)return;const r=e.listeners,i=r.indexOf(t);i!==-1&&r.splice(i,1),!(r.length>0)&&(Lb.forEach(s=>{delete n[s]}),delete n._chartjs)}function Tb(n){const t=new Set(n);return t.size===n.length?n:Array.from(t)}const Bb=function(){return typeof window>"u"?function(n){return n()}:window.requestAnimationFrame}();function Ib(n,t){let e=[],r=!1;return function(...i){e=i,r||(r=!0,Bb.call(window,()=>{r=!1,n.apply(t,e)}))}}function QC(n,t){let e;return function(...r){return t?(clearTimeout(e),e=setTimeout(n,t,r)):n.apply(this,r),t}}const Nh=n=>n==="start"?"left":n==="end"?"right":"center",Qe=(n,t,e)=>n==="start"?t:n==="end"?e:(t+e)/2,tP=(n,t,e,r)=>n===(r?"left":"right")?e:n==="center"?(t+e)/2:t;function Db(n,t,e){const r=t.length;let i=0,s=r;if(n._sorted){const{iScale:a,vScale:l,_parsed:c}=n,h=n.dataset&&n.dataset.options?n.dataset.options.spanGaps:null,f=a.axis,{min:g,max:d,minDefined:m,maxDefined:p}=a.getUserBounds();if(m){if(i=Math.min(Mr(c,f,g).lo,e?r:Mr(t,f,a.getPixelForValue(g)).lo),h){const v=c.slice(0,i+1).reverse().findIndex(b=>!Kt(b[l.axis]));i-=Math.max(0,v)}i=Ge(i,0,r-1)}if(p){let v=Math.max(Mr(c,a.axis,d,!0).hi+1,e?0:Mr(t,f,a.getPixelForValue(d),!0).hi+1);if(h){const b=c.slice(v-1).findIndex(_=>!Kt(_[l.axis]));v+=Math.max(0,b)}s=Ge(v,i,r)-i}else s=r-i}return{start:i,count:s}}function Fb(n){const{xScale:t,yScale:e,_scaleRanges:r}=n,i={xmin:t.min,xmax:t.max,ymin:e.min,ymax:e.max};if(!r)return n._scaleRanges=i,!0;const s=r.xmin!==t.min||r.xmax!==t.max||r.ymin!==e.min||r.ymax!==e.max;return Object.assign(r,i),s}const Wa=n=>n===0||n===1,d0=(n,t,e)=>-(Math.pow(2,10*(n-=1))*Math.sin((n-t)*be/e)),p0=(n,t,e)=>Math.pow(2,-10*n)*Math.sin((n-t)*be/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*Ie)+1,easeOutSine:n=>Math.sin(n*Ie),easeInOutSine:n=>-.5*(Math.cos(_e*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=>Wa(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=>Wa(n)?n:d0(n,.075,.3),easeOutElastic:n=>Wa(n)?n:p0(n,.075,.3),easeInOutElastic(n){return Wa(n)?n:n<.5?.5*d0(n*2,.1125,.45):.5+.5*p0(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 jh(n){if(n&&typeof n=="object"){const t=n.toString();return t==="[object CanvasPattern]"||t==="[object CanvasGradient]"}return!1}function g0(n){return jh(n)?n:new Xs(n)}function Pf(n){return jh(n)?n:new Xs(n).saturate(.5).darken(.1).hexString()}const eP=["x","y","borderWidth","radius","tension"],nP=["color","borderColor","backgroundColor"];function rP(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:nP},numbers:{type:"number",properties:eP}}),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 iP(n){n.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const m0=new Map;function sP(n,t){t=t||{};const e=n+JSON.stringify(t);let r=m0.get(e);return r||(r=new Intl.NumberFormat(n,t),m0.set(e,r)),r}function fo(n,t,e){return sP(t,e).format(n)}const Nb={values(n){return Ee(n)?n:""+n},numeric(n,t,e){if(n===0)return"0";const r=this.chart.options.locale;let i,s=n;if(e.length>1){const h=Math.max(Math.abs(e[0].value),Math.abs(e[e.length-1].value));(h<1e-4||h>1e15)&&(i="scientific"),s=oP(n,e)}const a=Hr(Math.abs(s)),l=isNaN(a)?1:Math.max(Math.min(-1*Math.floor(a),20),0),c={notation:i,minimumFractionDigits:l,maximumFractionDigits:l};return Object.assign(c,this.options.ticks.format),fo(n,r,c)},logarithmic(n,t,e){if(n===0)return"0";const r=e[t].significand||n/Math.pow(10,Math.floor(Hr(n)));return[1,2,3,5,10,15].includes(r)||t>.8*e.length?Nb.numeric.call(this,n,t,e):""}};function oP(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 Ll={formatters:Nb};function aP(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:Ll.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 vi=Object.create(null),Qf=Object.create(null);function zs(n,t){if(!t)return n;const e=t.split(".");for(let r=0,i=e.length;r<i;++r){const s=e[r];n=n[s]||(n[s]=Object.create(null))}return n}function Of(n,t,e){return typeof t=="string"?Js(zs(n,t),e):Js(zs(n,""),t)}class lP{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=r=>r.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=(r,i)=>Pf(i.backgroundColor),this.hoverBorderColor=(r,i)=>Pf(i.borderColor),this.hoverColor=(r,i)=>Pf(i.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 Of(this,t,e)}get(t){return zs(this,t)}describe(t,e){return Of(Qf,t,e)}override(t,e){return Of(vi,t,e)}route(t,e,r,i){const s=zs(this,t),a=zs(this,r),l="_"+e;Object.defineProperties(s,{[l]:{value:s[e],writable:!0},[e]:{enumerable:!0,get(){const c=this[l],h=a[i];return Jt(c)?Object.assign({},h,c):Wt(c,h)},set(c){this[l]=c}}})}apply(t){t.forEach(e=>e(this))}}var Ae=new lP({_scriptable:n=>!n.startsWith("on"),_indexable:n=>n!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[rP,iP,aP]);function uP(n){return!n||Kt(n.size)||Kt(n.family)?null:(n.style?n.style+" ":"")+(n.weight?n.weight+" ":"")+n.size+"px "+n.family}function vl(n,t,e,r,i){let s=t[i];return s||(s=t[i]=n.measureText(i).width,e.push(i)),s>r&&(r=s),r}function cP(n,t,e,r){r=r||{};let i=r.data=r.data||{},s=r.garbageCollect=r.garbageCollect||[];r.font!==t&&(i=r.data={},s=r.garbageCollect=[],r.font=t),n.save(),n.font=t;let a=0;const l=e.length;let c,h,f,g,d;for(c=0;c<l;c++)if(g=e[c],g!=null&&!Ee(g))a=vl(n,i,s,a,g);else if(Ee(g))for(h=0,f=g.length;h<f;h++)d=g[h],d!=null&&!Ee(d)&&(a=vl(n,i,s,a,d));n.restore();const m=s.length/2;if(m>e.length){for(c=0;c<m;c++)delete i[s[c]];s.splice(0,m)}return a}function li(n,t,e){const r=n.currentDevicePixelRatio,i=e!==0?Math.max(e/2,.5):0;return Math.round((t-i)*r)/r+i}function y0(n,t){!t&&!n||(t=t||n.getContext("2d"),t.save(),t.resetTransform(),t.clearRect(0,0,n.width,n.height),t.restore())}function th(n,t,e,r){jb(n,t,e,r,null)}function jb(n,t,e,r,i){let s,a,l,c,h,f,g,d;const m=t.pointStyle,p=t.rotation,v=t.radius;let b=(p||0)*zC;if(m&&typeof m=="object"&&(s=m.toString(),s==="[object HTMLImageElement]"||s==="[object HTMLCanvasElement]")){n.save(),n.translate(e,r),n.rotate(b),n.drawImage(m,-m.width/2,-m.height/2,m.width,m.height),n.restore();return}if(!(isNaN(v)||v<=0)){switch(n.beginPath(),m){default:i?n.ellipse(e,r,i/2,v,0,0,be):n.arc(e,r,v,0,be),n.closePath();break;case"triangle":f=i?i/2:v,n.moveTo(e+Math.sin(b)*f,r-Math.cos(b)*v),b+=u0,n.lineTo(e+Math.sin(b)*f,r-Math.cos(b)*v),b+=u0,n.lineTo(e+Math.sin(b)*f,r-Math.cos(b)*v),n.closePath();break;case"rectRounded":h=v*.516,c=v-h,a=Math.cos(b+ai)*c,g=Math.cos(b+ai)*(i?i/2-h:c),l=Math.sin(b+ai)*c,d=Math.sin(b+ai)*(i?i/2-h:c),n.arc(e-g,r-l,h,b-_e,b-Ie),n.arc(e+d,r-a,h,b-Ie,b),n.arc(e+g,r+l,h,b,b+Ie),n.arc(e-d,r+a,h,b+Ie,b+_e),n.closePath();break;case"rect":if(!p){c=Math.SQRT1_2*v,f=i?i/2:c,n.rect(e-f,r-c,2*f,2*c);break}b+=ai;case"rectRot":g=Math.cos(b)*(i?i/2:v),a=Math.cos(b)*v,l=Math.sin(b)*v,d=Math.sin(b)*(i?i/2:v),n.moveTo(e-g,r-l),n.lineTo(e+d,r-a),n.lineTo(e+g,r+l),n.lineTo(e-d,r+a),n.closePath();break;case"crossRot":b+=ai;case"cross":g=Math.cos(b)*(i?i/2:v),a=Math.cos(b)*v,l=Math.sin(b)*v,d=Math.sin(b)*(i?i/2:v),n.moveTo(e-g,r-l),n.lineTo(e+g,r+l),n.moveTo(e+d,r-a),n.lineTo(e-d,r+a);break;case"star":g=Math.cos(b)*(i?i/2:v),a=Math.cos(b)*v,l=Math.sin(b)*v,d=Math.sin(b)*(i?i/2:v),n.moveTo(e-g,r-l),n.lineTo(e+g,r+l),n.moveTo(e+d,r-a),n.lineTo(e-d,r+a),b+=ai,g=Math.cos(b)*(i?i/2:v),a=Math.cos(b)*v,l=Math.sin(b)*v,d=Math.sin(b)*(i?i/2:v),n.moveTo(e-g,r-l),n.lineTo(e+g,r+l),n.moveTo(e+d,r-a),n.lineTo(e-d,r+a);break;case"line":a=i?i/2:Math.cos(b)*v,l=Math.sin(b)*v,n.moveTo(e-a,r-l),n.lineTo(e+a,r+l);break;case"dash":n.moveTo(e,r),n.lineTo(e+Math.cos(b)*(i?i/2:v),r+Math.sin(b)*v);break;case!1:n.closePath();break}n.fill(),t.borderWidth>0&&n.stroke()}}function Cr(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 Tl(n,t){n.save(),n.beginPath(),n.rect(t.left,t.top,t.right-t.left,t.bottom-t.top),n.clip()}function Bl(n){n.restore()}function fP(n,t,e,r,i){if(!t)return n.lineTo(e.x,e.y);if(i==="middle"){const s=(t.x+e.x)/2;n.lineTo(s,t.y),n.lineTo(s,e.y)}else i==="after"!=!!r?n.lineTo(t.x,e.y):n.lineTo(e.x,t.y);n.lineTo(e.x,e.y)}function hP(n,t,e,r){if(!t)return n.lineTo(e.x,e.y);n.bezierCurveTo(r?t.cp1x:t.cp2x,r?t.cp1y:t.cp2y,r?e.cp2x:e.cp1x,r?e.cp2y:e.cp1y,e.x,e.y)}function dP(n,t){t.translation&&n.translate(t.translation[0],t.translation[1]),Kt(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 pP(n,t,e,r,i){if(i.strikethrough||i.underline){const s=n.measureText(r),a=t-s.actualBoundingBoxLeft,l=t+s.actualBoundingBoxRight,c=e-s.actualBoundingBoxAscent,h=e+s.actualBoundingBoxDescent,f=i.strikethrough?(c+h)/2:h;n.strokeStyle=n.fillStyle,n.beginPath(),n.lineWidth=i.decorationWidth||2,n.moveTo(a,f),n.lineTo(l,f),n.stroke()}}function gP(n,t){const e=n.fillStyle;n.fillStyle=t.color,n.fillRect(t.left,t.top,t.width,t.height),n.fillStyle=e}function bi(n,t,e,r,i,s={}){const a=Ee(t)?t:[t],l=s.strokeWidth>0&&s.strokeColor!=="";let c,h;for(n.save(),n.font=i.string,dP(n,s),c=0;c<a.length;++c)h=a[c],s.backdrop&&gP(n,s.backdrop),l&&(s.strokeColor&&(n.strokeStyle=s.strokeColor),Kt(s.strokeWidth)||(n.lineWidth=s.strokeWidth),n.strokeText(h,e,r,s.maxWidth)),n.fillText(h,e,r,s.maxWidth),pP(n,e,r,h,s),r+=Number(i.lineHeight);n.restore()}function to(n,t){const{x:e,y:r,w:i,h:s,radius:a}=t;n.arc(e+a.topLeft,r+a.topLeft,a.topLeft,1.5*_e,_e,!0),n.lineTo(e,r+s-a.bottomLeft),n.arc(e+a.bottomLeft,r+s-a.bottomLeft,a.bottomLeft,_e,Ie,!0),n.lineTo(e+i-a.bottomRight,r+s),n.arc(e+i-a.bottomRight,r+s-a.bottomRight,a.bottomRight,Ie,0,!0),n.lineTo(e+i,r+a.topRight),n.arc(e+i-a.topRight,r+a.topRight,a.topRight,0,-Ie,!0),n.lineTo(e+a.topLeft,r)}const mP=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,yP=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function vP(n,t){const e=(""+n).match(mP);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 bP=n=>+n||0;function Uh(n,t){const e={},r=Jt(t),i=r?Object.keys(t):t,s=Jt(n)?r?a=>Wt(n[a],n[t[a]]):a=>n[a]:()=>n;for(const a of i)e[a]=bP(s(a));return e}function Ub(n){return Uh(n,{top:"y",right:"x",bottom:"y",left:"x"})}function mi(n){return Uh(n,["topLeft","topRight","bottomLeft","bottomRight"])}function en(n){const t=Ub(n);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function ze(n,t){n=n||{},t=t||Ae.font;let e=Wt(n.size,t.size);typeof e=="string"&&(e=parseInt(e,10));let r=Wt(n.style,t.style);r&&!(""+r).match(yP)&&(console.warn('Invalid font style specified: "'+r+'"'),r=void 0);const i={family:Wt(n.family,t.family),lineHeight:vP(Wt(n.lineHeight,t.lineHeight),e),size:e,style:r,weight:Wt(n.weight,t.weight),string:""};return i.string=uP(i),i}function Ts(n,t,e,r){let i,s,a;for(i=0,s=n.length;i<s;++i)if(a=n[i],a!==void 0&&a!==void 0)return a}function _P(n,t,e){const{min:r,max:i}=n,s=Mb(t,(i-r)/2),a=(l,c)=>e&&l===0?0:l+c;return{min:a(r,-Math.abs(s)),max:a(i,s)}}function Xr(n,t){return Object.assign(Object.create(n),t)}function qh(n,t=[""],e,r,i=()=>n[0]){const s=e||n;typeof r>"u"&&(r=zb("_fallback",n));const a={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:n,_rootScopes:s,_fallback:r,_getTarget:i,override:l=>qh([l,...n],t,s,r)};return new Proxy(a,{deleteProperty(l,c){return delete l[c],delete l._keys,delete n[0][c],!0},get(l,c){return Wb(l,c,()=>MP(c,t,n,l))},getOwnPropertyDescriptor(l,c){return Reflect.getOwnPropertyDescriptor(l._scopes[0],c)},getPrototypeOf(){return Reflect.getPrototypeOf(n[0])},has(l,c){return b0(l).includes(c)},ownKeys(l){return b0(l)},set(l,c,h){const f=l._storage||(l._storage=i());return l[c]=f[c]=h,delete l._keys,!0}})}function Ji(n,t,e,r){const i={_cacheable:!1,_proxy:n,_context:t,_subProxy:e,_stack:new Set,_descriptors:qb(n,r),setContext:s=>Ji(n,s,e,r),override:s=>Ji(n.override(s),t,e,r)};return new Proxy(i,{deleteProperty(s,a){return delete s[a],delete n[a],!0},get(s,a,l){return Wb(s,a,()=>xP(s,a,l))},getOwnPropertyDescriptor(s,a){return s._descriptors.allKeys?Reflect.has(n,a)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(n,a)},getPrototypeOf(){return Reflect.getPrototypeOf(n)},has(s,a){return Reflect.has(n,a)},ownKeys(){return Reflect.ownKeys(n)},set(s,a,l){return n[a]=l,delete s[a],!0}})}function qb(n,t={scriptable:!0,indexable:!0}){const{_scriptable:e=t.scriptable,_indexable:r=t.indexable,_allKeys:i=t.allKeys}=n;return{allKeys:i,scriptable:e,indexable:r,isScriptable:Kr(e)?e:()=>e,isIndexable:Kr(r)?r:()=>r}}const wP=(n,t)=>n?n+Ih(t):t,Wh=(n,t)=>Jt(t)&&n!=="adapters"&&(Object.getPrototypeOf(t)===null||t.constructor===Object);function Wb(n,t,e){if(Object.prototype.hasOwnProperty.call(n,t)||t==="constructor")return n[t];const r=e();return n[t]=r,r}function xP(n,t,e){const{_proxy:r,_context:i,_subProxy:s,_descriptors:a}=n;let l=r[t];return Kr(l)&&a.isScriptable(t)&&(l=SP(t,l,n,e)),Ee(l)&&l.length&&(l=EP(t,l,n,a.isIndexable)),Wh(t,l)&&(l=Ji(l,i,s&&s[t],a)),l}function SP(n,t,e,r){const{_proxy:i,_context:s,_subProxy:a,_stack:l}=e;if(l.has(n))throw new Error("Recursion detected: "+Array.from(l).join("->")+"->"+n);l.add(n);let c=t(s,a||r);return l.delete(n),Wh(n,c)&&(c=Hh(i._scopes,i,n,c)),c}function EP(n,t,e,r){const{_proxy:i,_context:s,_subProxy:a,_descriptors:l}=e;if(typeof s.index<"u"&&r(n))return t[s.index%t.length];if(Jt(t[0])){const c=t,h=i._scopes.filter(f=>f!==c);t=[];for(const f of c){const g=Hh(h,i,n,f);t.push(Ji(g,s,a&&a[n],l))}}return t}function Hb(n,t,e){return Kr(n)?n(t,e):n}const AP=(n,t)=>n===!0?t:typeof n=="string"?Yr(t,n):void 0;function kP(n,t,e,r,i){for(const s of t){const a=AP(e,s);if(a){n.add(a);const l=Hb(a._fallback,e,i);if(typeof l<"u"&&l!==e&&l!==r)return l}else if(a===!1&&typeof r<"u"&&e!==r)return null}return!1}function Hh(n,t,e,r){const i=t._rootScopes,s=Hb(t._fallback,e,r),a=[...n,...i],l=new Set;l.add(r);let c=v0(l,a,e,s||e,r);return c===null||typeof s<"u"&&s!==e&&(c=v0(l,a,s,c,r),c===null)?!1:qh(Array.from(l),[""],i,s,()=>RP(t,e,r))}function v0(n,t,e,r,i){for(;e;)e=kP(n,t,e,r,i);return e}function RP(n,t,e){const r=n._getTarget();t in r||(r[t]={});const i=r[t];return Ee(i)&&Jt(e)?e:i||{}}function MP(n,t,e,r){let i;for(const s of t)if(i=zb(wP(s,n),e),typeof i<"u")return Wh(n,i)?Hh(e,r,n,i):i}function zb(n,t){for(const e of t){if(!e)continue;const r=e[n];if(typeof r<"u")return r}}function b0(n){let t=n._keys;return t||(t=n._keys=CP(n._scopes)),t}function CP(n){const t=new Set;for(const e of n)for(const r of Object.keys(e).filter(i=>!i.startsWith("_")))t.add(r);return Array.from(t)}function Vb(n,t,e,r){const{iScale:i}=n,{key:s="r"}=this._parsing,a=new Array(r);let l,c,h,f;for(l=0,c=r;l<c;++l)h=l+e,f=t[h],a[l]={r:i.parse(Yr(f,s),h)};return a}const PP=Number.EPSILON||1e-14,Zi=(n,t)=>t<n.length&&!n[t].skip&&n[t],$b=n=>n==="x"?"y":"x";function OP(n,t,e,r){const i=n.skip?t:n,s=t,a=e.skip?t:e,l=Zf(s,i),c=Zf(a,s);let h=l/(l+c),f=c/(l+c);h=isNaN(h)?0:h,f=isNaN(f)?0:f;const g=r*h,d=r*f;return{previous:{x:s.x-g*(a.x-i.x),y:s.y-g*(a.y-i.y)},next:{x:s.x+d*(a.x-i.x),y:s.y+d*(a.y-i.y)}}}function LP(n,t,e){const r=n.length;let i,s,a,l,c,h=Zi(n,0);for(let f=0;f<r-1;++f)if(c=h,h=Zi(n,f+1),!(!c||!h)){if(Ws(t[f],0,PP)){e[f]=e[f+1]=0;continue}i=e[f]/t[f],s=e[f+1]/t[f],l=Math.pow(i,2)+Math.pow(s,2),!(l<=9)&&(a=3/Math.sqrt(l),e[f]=i*a*t[f],e[f+1]=s*a*t[f])}}function TP(n,t,e="x"){const r=$b(e),i=n.length;let s,a,l,c=Zi(n,0);for(let h=0;h<i;++h){if(a=l,l=c,c=Zi(n,h+1),!l)continue;const f=l[e],g=l[r];a&&(s=(f-a[e])/3,l[`cp1${e}`]=f-s,l[`cp1${r}`]=g-s*t[h]),c&&(s=(c[e]-f)/3,l[`cp2${e}`]=f+s,l[`cp2${r}`]=g+s*t[h])}}function BP(n,t="x"){const e=$b(t),r=n.length,i=Array(r).fill(0),s=Array(r);let a,l,c,h=Zi(n,0);for(a=0;a<r;++a)if(l=c,c=h,h=Zi(n,a+1),!!c){if(h){const f=h[t]-c[t];i[a]=f!==0?(h[e]-c[e])/f:0}s[a]=l?h?ar(i[a-1])!==ar(i[a])?0:(i[a-1]+i[a])/2:i[a-1]:i[a]}LP(n,i,s),TP(n,s,t)}function Ha(n,t,e){return Math.max(Math.min(n,e),t)}function IP(n,t){let e,r,i,s,a,l=Cr(n[0],t);for(e=0,r=n.length;e<r;++e)a=s,s=l,l=e<r-1&&Cr(n[e+1],t),s&&(i=n[e],a&&(i.cp1x=Ha(i.cp1x,t.left,t.right),i.cp1y=Ha(i.cp1y,t.top,t.bottom)),l&&(i.cp2x=Ha(i.cp2x,t.left,t.right),i.cp2y=Ha(i.cp2y,t.top,t.bottom)))}function DP(n,t,e,r,i){let s,a,l,c;if(t.spanGaps&&(n=n.filter(h=>!h.skip)),t.cubicInterpolationMode==="monotone")BP(n,i);else{let h=r?n[n.length-1]:n[0];for(s=0,a=n.length;s<a;++s)l=n[s],c=OP(h,l,n[Math.min(s+1,a-(r?0:1))%a],t.tension),l.cp1x=c.previous.x,l.cp1y=c.previous.y,l.cp2x=c.next.x,l.cp2y=c.next.y,h=l}t.capBezierPoints&&IP(n,e)}function zh(){return typeof window<"u"&&typeof document<"u"}function Vh(n){let t=n.parentNode;return t&&t.toString()==="[object ShadowRoot]"&&(t=t.host),t}function bl(n,t,e){let r;return typeof n=="string"?(r=parseInt(n,10),n.indexOf("%")!==-1&&(r=r/100*t.parentNode[e])):r=n,r}const Il=n=>n.ownerDocument.defaultView.getComputedStyle(n,null);function FP(n,t){return Il(n).getPropertyValue(t)}const NP=["top","right","bottom","left"];function yi(n,t,e){const r={};e=e?"-"+e:"";for(let i=0;i<4;i++){const s=NP[i];r[s]=parseFloat(n[t+"-"+s+e])||0}return r.width=r.left+r.right,r.height=r.top+r.bottom,r}const jP=(n,t,e)=>(n>0||t>0)&&(!e||!e.shadowRoot);function UP(n,t){const e=n.touches,r=e&&e.length?e[0]:n,{offsetX:i,offsetY:s}=r;let a=!1,l,c;if(jP(i,s,n.target))l=i,c=s;else{const h=t.getBoundingClientRect();l=r.clientX-h.left,c=r.clientY-h.top,a=!0}return{x:l,y:c,box:a}}function fi(n,t){if("native"in n)return n;const{canvas:e,currentDevicePixelRatio:r}=t,i=Il(e),s=i.boxSizing==="border-box",a=yi(i,"padding"),l=yi(i,"border","width"),{x:c,y:h,box:f}=UP(n,e),g=a.left+(f&&l.left),d=a.top+(f&&l.top);let{width:m,height:p}=t;return s&&(m-=a.width+l.width,p-=a.height+l.height),{x:Math.round((c-g)/m*e.width/r),y:Math.round((h-d)/p*e.height/r)}}function qP(n,t,e){let r,i;if(t===void 0||e===void 0){const s=n&&Vh(n);if(!s)t=n.clientWidth,e=n.clientHeight;else{const a=s.getBoundingClientRect(),l=Il(s),c=yi(l,"border","width"),h=yi(l,"padding");t=a.width-h.width-c.width,e=a.height-h.height-c.height,r=bl(l.maxWidth,s,"clientWidth"),i=bl(l.maxHeight,s,"clientHeight")}}return{width:t,height:e,maxWidth:r||yl,maxHeight:i||yl}}const za=n=>Math.round(n*10)/10;function WP(n,t,e,r){const i=Il(n),s=yi(i,"margin"),a=bl(i.maxWidth,n,"clientWidth")||yl,l=bl(i.maxHeight,n,"clientHeight")||yl,c=qP(n,t,e);let{width:h,height:f}=c;if(i.boxSizing==="content-box"){const d=yi(i,"border","width"),m=yi(i,"padding");h-=m.width+d.width,f-=m.height+d.height}return h=Math.max(0,h-s.width),f=Math.max(0,r?h/r:f-s.height),h=za(Math.min(h,a,c.maxWidth)),f=za(Math.min(f,l,c.maxHeight)),h&&!f&&(f=za(h/2)),(t!==void 0||e!==void 0)&&r&&c.height&&f>c.height&&(f=c.height,h=za(Math.floor(f*r))),{width:h,height:f}}function _0(n,t,e){const r=t||1,i=Math.floor(n.height*r),s=Math.floor(n.width*r);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!==r||a.height!==i||a.width!==s?(n.currentDevicePixelRatio=r,a.height=i,a.width=s,n.ctx.setTransform(r,0,0,r,0,0),!0):!1}const HP=function(){let n=!1;try{const t={get passive(){return n=!0,!1}};zh()&&(window.addEventListener("test",null,t),window.removeEventListener("test",null,t))}catch{}return n}();function w0(n,t){const e=FP(n,t),r=e&&e.match(/^(\d+)(\.\d+)?px$/);return r?+r[1]:void 0}function hi(n,t,e,r){return{x:n.x+e*(t.x-n.x),y:n.y+e*(t.y-n.y)}}function zP(n,t,e,r){return{x:n.x+e*(t.x-n.x),y:r==="middle"?e<.5?n.y:t.y:r==="after"?e<1?n.y:t.y:e>0?t.y:n.y}}function VP(n,t,e,r){const i={x:n.cp2x,y:n.cp2y},s={x:t.cp1x,y:t.cp1y},a=hi(n,i,e),l=hi(i,s,e),c=hi(s,t,e),h=hi(a,l,e),f=hi(l,c,e);return hi(h,f,e)}const $P=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,r){return e-r},leftForLtr(e,r){return e-r}}},GP=function(){return{x(n){return n},setWidth(n){},textAlign(n){return n},xPlus(n,t){return n+t},leftForLtr(n,t){return n}}};function Yi(n,t,e){return n?$P(t,e):GP()}function Gb(n,t){let e,r;(t==="ltr"||t==="rtl")&&(e=n.canvas.style,r=[e.getPropertyValue("direction"),e.getPropertyPriority("direction")],e.setProperty("direction",t,"important"),n.prevTextDirection=r)}function Yb(n,t){t!==void 0&&(delete n.prevTextDirection,n.canvas.style.setProperty("direction",t[0],t[1]))}function Kb(n){return n==="angle"?{between:Qs,compare:YC,normalize:An}:{between:Rr,compare:(t,e)=>t-e,normalize:t=>t}}function x0({start:n,end:t,count:e,loop:r,style:i}){return{start:n%e,end:t%e,loop:r&&(t-n+1)%e===0,style:i}}function YP(n,t,e){const{property:r,start:i,end:s}=e,{between:a,normalize:l}=Kb(r),c=t.length;let{start:h,end:f,loop:g}=n,d,m;if(g){for(h+=c,f+=c,d=0,m=c;d<m&&a(l(t[h%c][r]),i,s);++d)h--,f--;h%=c,f%=c}return f<h&&(f+=c),{start:h,end:f,loop:g,style:n.style}}function Xb(n,t,e){if(!e)return[n];const{property:r,start:i,end:s}=e,a=t.length,{compare:l,between:c,normalize:h}=Kb(r),{start:f,end:g,loop:d,style:m}=YP(n,t,e),p=[];let v=!1,b=null,_,A,C;const w=()=>c(i,C,_)&&l(i,C)!==0,M=()=>l(s,_)===0||c(s,C,_),O=()=>v||w(),L=()=>!v||M();for(let N=f,Y=f;N<=g;++N)A=t[N%a],!A.skip&&(_=h(A[r]),_!==C&&(v=c(_,i,s),b===null&&O()&&(b=l(_,i)===0?N:Y),b!==null&&L()&&(p.push(x0({start:b,end:N,loop:d,count:a,style:m})),b=null),Y=N,C=_));return b!==null&&p.push(x0({start:b,end:g,loop:d,count:a,style:m})),p}function Jb(n,t){const e=[],r=n.segments;for(let i=0;i<r.length;i++){const s=Xb(r[i],n.points,t);s.length&&e.push(...s)}return e}function KP(n,t,e,r){let i=0,s=t-1;if(e&&!r)for(;i<t&&!n[i].skip;)i++;for(;i<t&&n[i].skip;)i++;for(i%=t,e&&(s+=i);s>i&&n[s%t].skip;)s--;return s%=t,{start:i,end:s}}function XP(n,t,e,r){const i=n.length,s=[];let a=t,l=n[t],c;for(c=t+1;c<=e;++c){const h=n[c%i];h.skip||h.stop?l.skip||(r=!1,s.push({start:t%i,end:(c-1)%i,loop:r}),t=a=h.stop?c:null):(a=c,l.skip&&(t=c)),l=h}return a!==null&&s.push({start:t%i,end:a%i,loop:r}),s}function JP(n,t){const e=n.points,r=n.options.spanGaps,i=e.length;if(!i)return[];const s=!!n._loop,{start:a,end:l}=KP(e,i,s,r);if(r===!0)return S0(n,[{start:a,end:l,loop:s}],e,t);const c=l<a?l+i:l,h=!!n._fullLoop&&a===0&&l===i-1;return S0(n,XP(e,a,c,h),e,t)}function S0(n,t,e,r){return!r||!r.setContext||!e?t:ZP(n,t,e,r)}function ZP(n,t,e,r){const i=n._chart.getContext(),s=E0(n.options),{_datasetIndex:a,options:{spanGaps:l}}=n,c=e.length,h=[];let f=s,g=t[0].start,d=g;function m(p,v,b,_){const A=l?-1:1;if(p!==v){for(p+=c;e[p%c].skip;)p-=A;for(;e[v%c].skip;)v+=A;p%c!==v%c&&(h.push({start:p%c,end:v%c,loop:b,style:_}),f=_,g=v%c)}}for(const p of t){g=l?g:p.start;let v=e[g%c],b;for(d=g+1;d<=p.end;d++){const _=e[d%c];b=E0(r.setContext(Xr(i,{type:"segment",p0:v,p1:_,p0DataIndex:(d-1)%c,p1DataIndex:d%c,datasetIndex:a}))),QP(b,f)&&m(g,d-1,p.loop,f),v=_,f=b}g<d-1&&m(g,d-1,p.loop,f)}return h}function E0(n){return{backgroundColor:n.backgroundColor,borderCapStyle:n.borderCapStyle,borderDash:n.borderDash,borderDashOffset:n.borderDashOffset,borderJoinStyle:n.borderJoinStyle,borderWidth:n.borderWidth,borderColor:n.borderColor}}function QP(n,t){if(!t)return!1;const e=[],r=function(i,s){return jh(s)?(e.includes(s)||e.push(s),e.indexOf(s)):s};return JSON.stringify(n,r)!==JSON.stringify(t,r)}/*!
452
+ * Chart.js v4.4.8
453
+ * https://www.chartjs.org
454
+ * (c) 2025 Chart.js Contributors
455
+ * Released under the MIT License
456
+ */class tO{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,e,r,i){const s=e.listeners[i],a=e.duration;s.forEach(l=>l({chart:t,initial:e.initial,numSteps:a,currentStep:Math.min(r-e.start,a)}))}_refresh(){this._request||(this._running=!0,this._request=Bb.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let e=0;this._charts.forEach((r,i)=>{if(!r.running||!r.items.length)return;const s=r.items;let a=s.length-1,l=!1,c;for(;a>=0;--a)c=s[a],c._active?(c._total>r.duration&&(r.duration=c._total),c.tick(t),l=!0):(s[a]=s[s.length-1],s.pop());l&&(i.draw(),this._notify(i,r,t,"progress")),s.length||(r.running=!1,this._notify(i,r,t,"complete"),r.initial=!1),e+=s.length}),this._lastDate=t,e===0&&(this._running=!1)}_getAnims(t){const e=this._charts;let r=e.get(t);return r||(r={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(t,r)),r}listen(t,e,r){this._getAnims(t).listeners[e].push(r)}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((r,i)=>Math.max(r,i._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 r=e.items;let i=r.length-1;for(;i>=0;--i)r[i].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var _r=new tO;const A0="transparent",eO={boolean(n,t,e){return e>.5?t:n},color(n,t,e){const r=g0(n||A0),i=r.valid&&g0(t||A0);return i&&i.valid?i.mix(r,e).hexString():t},number(n,t,e){return n+(t-n)*e}};class nO{constructor(t,e,r,i){const s=e[r];i=Ts([t.to,i,s,t.from]);const a=Ts([t.from,s,i]);this._active=!0,this._fn=t.fn||eO[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=r,this._from=a,this._to=i,this._promises=void 0}active(){return this._active}update(t,e,r){if(this._active){this._notify(!1);const i=this._target[this._prop],s=r-this._start,a=this._duration-s;this._start=r,this._duration=Math.floor(Math.max(a,t.duration)),this._total+=s,this._loop=!!t.loop,this._to=Ts([t.to,e,i,t.from]),this._from=Ts([t.from,i,e])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const e=t-this._start,r=this._duration,i=this._prop,s=this._from,a=this._loop,l=this._to;let c;if(this._active=s!==l&&(a||e<r),!this._active){this._target[i]=l,this._notify(!0);return}if(e<0){this._target[i]=s;return}c=e/r%2,c=a&&c>1?2-c:c,c=this._easing(Math.min(1,Math.max(0,c))),this._target[i]=this._fn(s,l,c)}wait(){const t=this._promises||(this._promises=[]);return new Promise((e,r)=>{t.push({res:e,rej:r})})}_notify(t){const e=t?"res":"rej",r=this._promises||[];for(let i=0;i<r.length;i++)r[i][e]()}}class Zb{constructor(t,e){this._chart=t,this._properties=new Map,this.configure(e)}configure(t){if(!Jt(t))return;const e=Object.keys(Ae.animation),r=this._properties;Object.getOwnPropertyNames(t).forEach(i=>{const s=t[i];if(!Jt(s))return;const a={};for(const l of e)a[l]=s[l];(Ee(s.properties)&&s.properties||[i]).forEach(l=>{(l===i||!r.has(l))&&r.set(l,a)})})}_animateOptions(t,e){const r=e.options,i=iO(t,r);if(!i)return[];const s=this._createAnimations(i,r);return r.$shared&&rO(t.options.$animations,r).then(()=>{t.options=r},()=>{}),s}_createAnimations(t,e){const r=this._properties,i=[],s=t.$animations||(t.$animations={}),a=Object.keys(e),l=Date.now();let c;for(c=a.length-1;c>=0;--c){const h=a[c];if(h.charAt(0)==="$")continue;if(h==="options"){i.push(...this._animateOptions(t,e));continue}const f=e[h];let g=s[h];const d=r.get(h);if(g)if(d&&g.active()){g.update(d,f,l);continue}else g.cancel();if(!d||!d.duration){t[h]=f;continue}s[h]=g=new nO(d,t,h,f),i.push(g)}return i}update(t,e){if(this._properties.size===0){Object.assign(t,e);return}const r=this._createAnimations(t,e);if(r.length)return _r.add(this._chart,r),!0}}function rO(n,t){const e=[],r=Object.keys(t);for(let i=0;i<r.length;i++){const s=n[r[i]];s&&s.active()&&e.push(s.wait())}return Promise.all(e)}function iO(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 k0(n,t){const e=n&&n.options||{},r=e.reverse,i=e.min===void 0?t:0,s=e.max===void 0?t:0;return{start:r?s:i,end:r?i:s}}function sO(n,t,e){if(e===!1)return!1;const r=k0(n,e),i=k0(t,e);return{top:i.end,right:r.end,bottom:i.start,left:r.start}}function oO(n){let t,e,r,i;return Jt(n)?(t=n.top,e=n.right,r=n.bottom,i=n.left):t=e=r=i=n,{top:t,right:e,bottom:r,left:i,disabled:n===!1}}function Qb(n,t){const e=[],r=n._getSortedDatasetMetas(t);let i,s;for(i=0,s=r.length;i<s;++i)e.push(r[i].index);return e}function R0(n,t,e,r={}){const i=n.keys,s=r.mode==="single";let a,l,c,h;if(t===null)return;let f=!1;for(a=0,l=i.length;a<l;++a){if(c=+i[a],c===e){if(f=!0,r.all)continue;break}h=n.values[c],Le(h)&&(s||t===0||ar(t)===ar(h))&&(t+=h)}return!f&&!r.all?0:t}function aO(n,t){const{iScale:e,vScale:r}=t,i=e.axis==="x"?"x":"y",s=r.axis==="x"?"x":"y",a=Object.keys(n),l=new Array(a.length);let c,h,f;for(c=0,h=a.length;c<h;++c)f=a[c],l[c]={[i]:f,[s]:n[f]};return l}function Lf(n,t){const e=n&&n.options.stacked;return e||e===void 0&&t.stack!==void 0}function lO(n,t,e){return`${n.id}.${t.id}.${e.stack||e.type}`}function uO(n){const{min:t,max:e,minDefined:r,maxDefined:i}=n.getUserBounds();return{min:r?t:Number.NEGATIVE_INFINITY,max:i?e:Number.POSITIVE_INFINITY}}function cO(n,t,e){const r=n[t]||(n[t]={});return r[e]||(r[e]={})}function M0(n,t,e,r){for(const i of t.getMatchingVisibleMetas(r).reverse()){const s=n[i.index];if(e&&s>0||!e&&s<0)return i.index}return null}function C0(n,t){const{chart:e,_cachedMeta:r}=n,i=e._stacks||(e._stacks={}),{iScale:s,vScale:a,index:l}=r,c=s.axis,h=a.axis,f=lO(s,a,r),g=t.length;let d;for(let m=0;m<g;++m){const p=t[m],{[c]:v,[h]:b}=p,_=p._stacks||(p._stacks={});d=_[h]=cO(i,f,v),d[l]=b,d._top=M0(d,a,!0,r.type),d._bottom=M0(d,a,!1,r.type);const A=d._visualValues||(d._visualValues={});A[l]=b}}function Tf(n,t){const e=n.scales;return Object.keys(e).filter(r=>e[r].axis===t).shift()}function fO(n,t){return Xr(n,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function hO(n,t,e){return Xr(n,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:e,index:t,mode:"default",type:"data"})}function As(n,t){const e=n.controller.index,r=n.vScale&&n.vScale.axis;if(r){t=t||n._parsed;for(const i of t){const s=i._stacks;if(!s||s[r]===void 0||s[r][e]===void 0)return;delete s[r][e],s[r]._visualValues!==void 0&&s[r]._visualValues[e]!==void 0&&delete s[r]._visualValues[e]}}}const Bf=n=>n==="reset"||n==="none",P0=(n,t)=>t?n:Object.assign({},n),dO=(n,t,e)=>n&&!t.hidden&&t._stacked&&{keys:Qb(e,!0),values:null};class $n{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=Lf(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&&As(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,e=this._cachedMeta,r=this.getDataset(),i=(g,d,m,p)=>g==="x"?d:g==="r"?p:m,s=e.xAxisID=Wt(r.xAxisID,Tf(t,"x")),a=e.yAxisID=Wt(r.yAxisID,Tf(t,"y")),l=e.rAxisID=Wt(r.rAxisID,Tf(t,"r")),c=e.indexAxis,h=e.iAxisID=i(c,s,a,l),f=e.vAxisID=i(c,a,s,l);e.xScale=this.getScaleForId(s),e.yScale=this.getScaleForId(a),e.rScale=this.getScaleForId(l),e.iScale=this.getScaleForId(h),e.vScale=this.getScaleForId(f)}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&&h0(this._data,this),t._stacked&&As(t)}_dataCheck(){const t=this.getDataset(),e=t.data||(t.data=[]),r=this._data;if(Jt(e)){const i=this._cachedMeta;this._data=aO(e,i)}else if(r!==e){if(r){h0(r,this);const i=this._cachedMeta;As(i),i._parsed=[]}e&&Object.isExtensible(e)&&ZC(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,r=this.getDataset();let i=!1;this._dataCheck();const s=e._stacked;e._stacked=Lf(e.vScale,e),e.stack!==r.stack&&(i=!0,As(e),e.stack=r.stack),this._resyncElements(t),(i||s!==e._stacked)&&(C0(this,e._parsed),e._stacked=Lf(e.vScale,e))}configure(){const t=this.chart.config,e=t.datasetScopeKeys(this._type),r=t.getOptionScopes(this.getDataset(),e,!0);this.options=t.createResolver(r,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,e){const{_cachedMeta:r,_data:i}=this,{iScale:s,_stacked:a}=r,l=s.axis;let c=t===0&&e===i.length?!0:r._sorted,h=t>0&&r._parsed[t-1],f,g,d;if(this._parsing===!1)r._parsed=i,r._sorted=!0,d=i;else{Ee(i[t])?d=this.parseArrayData(r,i,t,e):Jt(i[t])?d=this.parseObjectData(r,i,t,e):d=this.parsePrimitiveData(r,i,t,e);const m=()=>g[l]===null||h&&g[l]<h[l];for(f=0;f<e;++f)r._parsed[f+t]=g=d[f],c&&(m()&&(c=!1),h=g);r._sorted=c}a&&C0(this,d)}parsePrimitiveData(t,e,r,i){const{iScale:s,vScale:a}=t,l=s.axis,c=a.axis,h=s.getLabels(),f=s===a,g=new Array(i);let d,m,p;for(d=0,m=i;d<m;++d)p=d+r,g[d]={[l]:f||s.parse(h[p],p),[c]:a.parse(e[p],p)};return g}parseArrayData(t,e,r,i){const{xScale:s,yScale:a}=t,l=new Array(i);let c,h,f,g;for(c=0,h=i;c<h;++c)f=c+r,g=e[f],l[c]={x:s.parse(g[0],f),y:a.parse(g[1],f)};return l}parseObjectData(t,e,r,i){const{xScale:s,yScale:a}=t,{xAxisKey:l="x",yAxisKey:c="y"}=this._parsing,h=new Array(i);let f,g,d,m;for(f=0,g=i;f<g;++f)d=f+r,m=e[d],h[f]={x:s.parse(Yr(m,l),d),y:a.parse(Yr(m,c),d)};return h}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,e,r){const i=this.chart,s=this._cachedMeta,a=e[t.axis],l={keys:Qb(i,!0),values:e._stacks[t.axis]._visualValues};return R0(l,a,s.index,{mode:r})}updateRangeFromParsed(t,e,r,i){const s=r[e.axis];let a=s===null?NaN:s;const l=i&&r._stacks[e.axis];i&&l&&(i.values=l,a=R0(i,s,this._cachedMeta.index)),t.min=Math.min(t.min,a),t.max=Math.max(t.max,a)}getMinMax(t,e){const r=this._cachedMeta,i=r._parsed,s=r._sorted&&t===r.iScale,a=i.length,l=this._getOtherScale(t),c=dO(e,r,this.chart),h={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:f,max:g}=uO(l);let d,m;function p(){m=i[d];const v=m[l.axis];return!Le(m[t.axis])||f>v||g<v}for(d=0;d<a&&!(!p()&&(this.updateRangeFromParsed(h,t,m,c),s));++d);if(s){for(d=a-1;d>=0;--d)if(!p()){this.updateRangeFromParsed(h,t,m,c);break}}return h}getAllParsedValues(t){const e=this._cachedMeta._parsed,r=[];let i,s,a;for(i=0,s=e.length;i<s;++i)a=e[i][t.axis],Le(a)&&r.push(a);return r}getMaxOverflow(){return!1}getLabelAndValue(t){const e=this._cachedMeta,r=e.iScale,i=e.vScale,s=this.getParsed(t);return{label:r?""+r.getLabelForValue(s[r.axis]):"",value:i?""+i.getLabelForValue(s[i.axis]):""}}_update(t){const e=this._cachedMeta;this.update(t||"default"),e._clip=oO(Wt(this.options.clip,sO(e.xScale,e.yScale,this.getMaxOverflow())))}update(t){}draw(){const t=this._ctx,e=this.chart,r=this._cachedMeta,i=r.data||[],s=e.chartArea,a=[],l=this._drawStart||0,c=this._drawCount||i.length-l,h=this.options.drawActiveElementsOnTop;let f;for(r.dataset&&r.dataset.draw(t,s,l,c),f=l;f<l+c;++f){const g=i[f];g.hidden||(g.active&&h?a.push(g):g.draw(t,s))}for(f=0;f<a.length;++f)a[f].draw(t,s)}getStyle(t,e){const r=e?"active":"default";return t===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(r):this.resolveDataElementOptions(t||0,r)}getContext(t,e,r){const i=this.getDataset();let s;if(t>=0&&t<this._cachedMeta.data.length){const a=this._cachedMeta.data[t];s=a.$context||(a.$context=hO(this.getContext(),t,a)),s.parsed=this.getParsed(t),s.raw=i.data[t],s.index=s.dataIndex=t}else s=this.$context||(this.$context=fO(this.chart.getContext(),this.index)),s.dataset=i,s.index=s.datasetIndex=this.index;return s.active=!!e,s.mode=r,s}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,e){return this._resolveElementOptions(this.dataElementType.id,e,t)}_resolveElementOptions(t,e="default",r){const i=e==="active",s=this._cachedDataOpts,a=t+"-"+e,l=s[a],c=this.enableOptionSharing&&Zs(r);if(l)return P0(l,c);const h=this.chart.config,f=h.datasetElementScopeKeys(this._type,t),g=i?[`${t}Hover`,"hover",t,""]:[t,""],d=h.getOptionScopes(this.getDataset(),f),m=Object.keys(Ae.elements[t]),p=()=>this.getContext(r,i,e),v=h.resolveNamedOptions(d,m,p,g);return v.$shared&&(v.$shared=c,s[a]=Object.freeze(P0(v,c))),v}_resolveAnimations(t,e,r){const i=this.chart,s=this._cachedDataOpts,a=`animation-${e}`,l=s[a];if(l)return l;let c;if(i.options.animation!==!1){const f=this.chart.config,g=f.datasetAnimationScopeKeys(this._type,e),d=f.getOptionScopes(this.getDataset(),g);c=f.createResolver(d,this.getContext(t,r,e))}const h=new Zb(i,c&&c.animations);return c&&c._cacheable&&(s[a]=Object.freeze(h)),h}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||Bf(t)||this.chart._animationsDisabled}_getSharedOptions(t,e){const r=this.resolveDataElementOptions(t,e),i=this._sharedOptions,s=this.getSharedOptions(r),a=this.includeOptions(e,s)||s!==i;return this.updateSharedOptions(s,e,r),{sharedOptions:s,includeOptions:a}}updateElement(t,e,r,i){Bf(i)?Object.assign(t,r):this._resolveAnimations(e,i).update(t,r)}updateSharedOptions(t,e,r){t&&!Bf(e)&&this._resolveAnimations(void 0,e).update(t,r)}_setStyle(t,e,r,i){t.active=i;const s=this.getStyle(e,i);this._resolveAnimations(e,r,i).update(t,{options:!i&&this.getSharedOptions(s)||s})}removeHoverStyle(t,e,r){this._setStyle(t,r,"active",!1)}setHoverStyle(t,e,r){this._setStyle(t,r,"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,r=this._cachedMeta.data;for(const[l,c,h]of this._syncList)this[l](c,h);this._syncList=[];const i=r.length,s=e.length,a=Math.min(s,i);a&&this.parse(0,a),s>i?this._insertElements(i,s-i,t):s<i&&this._removeElements(s,i-s)}_insertElements(t,e,r=!0){const i=this._cachedMeta,s=i.data,a=t+e;let l;const c=h=>{for(h.length+=e,l=h.length-1;l>=a;l--)h[l]=h[l-e]};for(c(s),l=t;l<a;++l)s[l]=new this.dataElementType;this._parsing&&c(i._parsed),this.parse(t,e),r&&this.updateElements(s,t,e,"reset")}updateElements(t,e,r,i){}_removeElements(t,e){const r=this._cachedMeta;if(this._parsing){const i=r._parsed.splice(t,e);r._stacked&&As(r,i)}r.data.splice(t,e)}_sync(t){if(this._parsing)this._syncList.push(t);else{const[e,r,i]=t;this[e](r,i)}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 r=arguments.length-2;r&&this._sync(["_insertElements",t,r])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}At($n,"defaults",{}),At($n,"datasetElementType",null),At($n,"dataElementType",null);function pO(n,t){if(!n._cache.$bar){const e=n.getMatchingVisibleMetas(t);let r=[];for(let i=0,s=e.length;i<s;i++)r=r.concat(e[i].controller.getAllParsedValues(n));n._cache.$bar=Tb(r.sort((i,s)=>i-s))}return n._cache.$bar}function gO(n){const t=n.iScale,e=pO(t,n.type);let r=t._length,i,s,a,l;const c=()=>{a===32767||a===-32768||(Zs(l)&&(r=Math.min(r,Math.abs(a-l)||r)),l=a)};for(i=0,s=e.length;i<s;++i)a=t.getPixelForValue(e[i]),c();for(l=void 0,i=0,s=t.ticks.length;i<s;++i)a=t.getPixelForTick(i),c();return r}function mO(n,t,e,r){const i=e.barThickness;let s,a;return Kt(i)?(s=t.min*e.categoryPercentage,a=e.barPercentage):(s=i*r,a=1),{chunk:s/r,ratio:a,start:t.pixels[n]-s/2}}function yO(n,t,e,r){const i=t.pixels,s=i[n];let a=n>0?i[n-1]:null,l=n<i.length-1?i[n+1]:null;const c=e.categoryPercentage;a===null&&(a=s-(l===null?t.end-t.start:l-s)),l===null&&(l=s+s-a);const h=s-(s-Math.min(a,l))/2*c;return{chunk:Math.abs(l-a)/2*c/r,ratio:e.barPercentage,start:h}}function vO(n,t,e,r){const i=e.parse(n[0],r),s=e.parse(n[1],r),a=Math.min(i,s),l=Math.max(i,s);let c=a,h=l;Math.abs(a)>Math.abs(l)&&(c=l,h=a),t[e.axis]=h,t._custom={barStart:c,barEnd:h,start:i,end:s,min:a,max:l}}function t_(n,t,e,r){return Ee(n)?vO(n,t,e,r):t[e.axis]=e.parse(n,r),t}function O0(n,t,e,r){const i=n.iScale,s=n.vScale,a=i.getLabels(),l=i===s,c=[];let h,f,g,d;for(h=e,f=e+r;h<f;++h)d=t[h],g={},g[i.axis]=l||i.parse(a[h],h),c.push(t_(d,g,s,h));return c}function If(n){return n&&n.barStart!==void 0&&n.barEnd!==void 0}function bO(n,t,e){return n!==0?ar(n):(t.isHorizontal()?1:-1)*(t.min>=e?1:-1)}function _O(n){let t,e,r,i,s;return n.horizontal?(t=n.base>n.x,e="left",r="right"):(t=n.base<n.y,e="bottom",r="top"),t?(i="end",s="start"):(i="start",s="end"),{start:e,end:r,reverse:t,top:i,bottom:s}}function wO(n,t,e,r){let i=t.borderSkipped;const s={};if(!i){n.borderSkipped=s;return}if(i===!0){n.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}const{start:a,end:l,reverse:c,top:h,bottom:f}=_O(n);i==="middle"&&e&&(n.enableBorderRadius=!0,(e._top||0)===r?i=h:(e._bottom||0)===r?i=f:(s[L0(f,a,l,c)]=!0,i=h)),s[L0(i,a,l,c)]=!0,n.borderSkipped=s}function L0(n,t,e,r){return r?(n=xO(n,t,e),n=T0(n,e,t)):n=T0(n,t,e),n}function xO(n,t,e){return n===t?e:n===e?t:n}function T0(n,t,e){return n==="start"?t:n==="end"?e:n}function SO(n,{inflateAmount:t},e){n.inflateAmount=t==="auto"?e===1?.33:0:t}class sl extends $n{parsePrimitiveData(t,e,r,i){return O0(t,e,r,i)}parseArrayData(t,e,r,i){return O0(t,e,r,i)}parseObjectData(t,e,r,i){const{iScale:s,vScale:a}=t,{xAxisKey:l="x",yAxisKey:c="y"}=this._parsing,h=s.axis==="x"?l:c,f=a.axis==="x"?l:c,g=[];let d,m,p,v;for(d=r,m=r+i;d<m;++d)v=e[d],p={},p[s.axis]=s.parse(Yr(v,h),d),g.push(t_(Yr(v,f),p,a,d));return g}updateRangeFromParsed(t,e,r,i){super.updateRangeFromParsed(t,e,r,i);const s=r._custom;s&&e===this._cachedMeta.vScale&&(t.min=Math.min(t.min,s.min),t.max=Math.max(t.max,s.max))}getMaxOverflow(){return 0}getLabelAndValue(t){const e=this._cachedMeta,{iScale:r,vScale:i}=e,s=this.getParsed(t),a=s._custom,l=If(a)?"["+a.start+", "+a.end+"]":""+i.getLabelForValue(s[i.axis]);return{label:""+r.getLabelForValue(s[r.axis]),value:l}}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,r,i){const s=i==="reset",{index:a,_cachedMeta:{vScale:l}}=this,c=l.getBasePixel(),h=l.isHorizontal(),f=this._getRuler(),{sharedOptions:g,includeOptions:d}=this._getSharedOptions(e,i);for(let m=e;m<e+r;m++){const p=this.getParsed(m),v=s||Kt(p[l.axis])?{base:c,head:c}:this._calculateBarValuePixels(m),b=this._calculateBarIndexPixels(m,f),_=(p._stacks||{})[l.axis],A={horizontal:h,base:v.base,enableBorderRadius:!_||If(p._custom)||a===_._top||a===_._bottom,x:h?v.head:b.center,y:h?b.center:v.head,height:h?b.size:Math.abs(v.size),width:h?Math.abs(v.size):b.size};d&&(A.options=g||this.resolveDataElementOptions(m,t[m].active?"active":i));const C=A.options||t[m].options;wO(A,C,_,a),SO(A,C,f.ratio),this.updateElement(t[m],m,A,i)}}_getStacks(t,e){const{iScale:r}=this._cachedMeta,i=r.getMatchingVisibleMetas(this._type).filter(f=>f.controller.options.grouped),s=r.options.stacked,a=[],l=this._cachedMeta.controller.getParsed(e),c=l&&l[r.axis],h=f=>{const g=f._parsed.find(m=>m[r.axis]===c),d=g&&g[f.vScale.axis];if(Kt(d)||isNaN(d))return!0};for(const f of i)if(!(e!==void 0&&h(f))&&((s===!1||a.indexOf(f.stack)===-1||s===void 0&&f.stack===void 0)&&a.push(f.stack),f.index===t))break;return a.length||a.push(void 0),a}_getStackCount(t){return this._getStacks(void 0,t).length}_getStackIndex(t,e,r){const i=this._getStacks(t,r),s=e!==void 0?i.indexOf(e):-1;return s===-1?i.length-1:s}_getRuler(){const t=this.options,e=this._cachedMeta,r=e.iScale,i=[];let s,a;for(s=0,a=e.data.length;s<a;++s)i.push(r.getPixelForValue(this.getParsed(s)[r.axis],s));const l=t.barThickness;return{min:l||gO(e),pixels:i,start:r._startPixel,end:r._endPixel,stackCount:this._getStackCount(),scale:r,grouped:t.grouped,ratio:l?1:t.categoryPercentage*t.barPercentage}}_calculateBarValuePixels(t){const{_cachedMeta:{vScale:e,_stacked:r,index:i},options:{base:s,minBarLength:a}}=this,l=s||0,c=this.getParsed(t),h=c._custom,f=If(h);let g=c[e.axis],d=0,m=r?this.applyStack(e,c,r):g,p,v;m!==g&&(d=m-g,m=g),f&&(g=h.barStart,m=h.barEnd-h.barStart,g!==0&&ar(g)!==ar(h.barEnd)&&(d=0),d+=g);const b=!Kt(s)&&!f?s:d;let _=e.getPixelForValue(b);if(this.chart.getDataVisibility(t)?p=e.getPixelForValue(d+m):p=_,v=p-_,Math.abs(v)<a){v=bO(v,e,l)*a,g===l&&(_-=v/2);const A=e.getPixelForDecimal(0),C=e.getPixelForDecimal(1),w=Math.min(A,C),M=Math.max(A,C);_=Math.max(Math.min(_,M),w),p=_+v,r&&!f&&(c._stacks[e.axis]._visualValues[i]=e.getValueForPixel(p)-e.getValueForPixel(_))}if(_===e.getPixelForValue(l)){const A=ar(v)*e.getLineWidthForValue(l)/2;_+=A,v-=A}return{size:v,base:_,head:p,center:p+v/2}}_calculateBarIndexPixels(t,e){const r=e.scale,i=this.options,s=i.skipNull,a=Wt(i.maxBarThickness,1/0);let l,c;if(e.grouped){const h=s?this._getStackCount(t):e.stackCount,f=i.barThickness==="flex"?yO(t,e,i,h):mO(t,e,i,h),g=this._getStackIndex(this.index,this._cachedMeta.stack,s?t:void 0);l=f.start+f.chunk*g+f.chunk/2,c=Math.min(a,f.chunk*f.ratio)}else l=r.getPixelForValue(this.getParsed(t)[r.axis],t),c=Math.min(a,e.min*e.ratio);return{base:l-c/2,head:l+c/2,center:l,size:c}}draw(){const t=this._cachedMeta,e=t.vScale,r=t.data,i=r.length;let s=0;for(;s<i;++s)this.getParsed(s)[e.axis]!==null&&!r[s].hidden&&r[s].draw(this._ctx)}}At(sl,"id","bar"),At(sl,"defaults",{datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}}),At(sl,"overrides",{scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}});class ol extends $n{initialize(){this.enableOptionSharing=!0,super.initialize()}parsePrimitiveData(t,e,r,i){const s=super.parsePrimitiveData(t,e,r,i);for(let a=0;a<s.length;a++)s[a]._custom=this.resolveDataElementOptions(a+r).radius;return s}parseArrayData(t,e,r,i){const s=super.parseArrayData(t,e,r,i);for(let a=0;a<s.length;a++){const l=e[r+a];s[a]._custom=Wt(l[2],this.resolveDataElementOptions(a+r).radius)}return s}parseObjectData(t,e,r,i){const s=super.parseObjectData(t,e,r,i);for(let a=0;a<s.length;a++){const l=e[r+a];s[a]._custom=Wt(l&&l.r&&+l.r,this.resolveDataElementOptions(a+r).radius)}return s}getMaxOverflow(){const t=this._cachedMeta.data;let e=0;for(let r=t.length-1;r>=0;--r)e=Math.max(e,t[r].size(this.resolveDataElementOptions(r))/2);return e>0&&e}getLabelAndValue(t){const e=this._cachedMeta,r=this.chart.data.labels||[],{xScale:i,yScale:s}=e,a=this.getParsed(t),l=i.getLabelForValue(a.x),c=s.getLabelForValue(a.y),h=a._custom;return{label:r[t]||"",value:"("+l+", "+c+(h?", "+h:"")+")"}}update(t){const e=this._cachedMeta.data;this.updateElements(e,0,e.length,t)}updateElements(t,e,r,i){const s=i==="reset",{iScale:a,vScale:l}=this._cachedMeta,{sharedOptions:c,includeOptions:h}=this._getSharedOptions(e,i),f=a.axis,g=l.axis;for(let d=e;d<e+r;d++){const m=t[d],p=!s&&this.getParsed(d),v={},b=v[f]=s?a.getPixelForDecimal(.5):a.getPixelForValue(p[f]),_=v[g]=s?l.getBasePixel():l.getPixelForValue(p[g]);v.skip=isNaN(b)||isNaN(_),h&&(v.options=c||this.resolveDataElementOptions(d,m.active?"active":i),s&&(v.options.radius=0)),this.updateElement(m,d,v,i)}}resolveDataElementOptions(t,e){const r=this.getParsed(t);let i=super.resolveDataElementOptions(t,e);i.$shared&&(i=Object.assign({},i,{$shared:!1}));const s=i.radius;return e!=="active"&&(i.radius=0),i.radius+=Wt(r&&r._custom,s),i}}At(ol,"id","bubble"),At(ol,"defaults",{datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}}),At(ol,"overrides",{scales:{x:{type:"linear"},y:{type:"linear"}}});function EO(n,t,e){let r=1,i=1,s=0,a=0;if(t<be){const l=n,c=l+t,h=Math.cos(l),f=Math.sin(l),g=Math.cos(c),d=Math.sin(c),m=(C,w,M)=>Qs(C,l,c,!0)?1:Math.max(w,w*e,M,M*e),p=(C,w,M)=>Qs(C,l,c,!0)?-1:Math.min(w,w*e,M,M*e),v=m(0,h,g),b=m(Ie,f,d),_=p(_e,h,g),A=p(_e+Ie,f,d);r=(v-_)/2,i=(b-A)/2,s=-(v+_)/2,a=-(b+A)/2}return{ratioX:r,ratioY:i,offsetX:s,offsetY:a}}class gi extends $n{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 r=this.getDataset().data,i=this._cachedMeta;if(this._parsing===!1)i._parsed=r;else{let s=c=>+r[c];if(Jt(r[t])){const{key:c="value"}=this._parsing;s=h=>+Yr(r[h],c)}let a,l;for(a=t,l=t+e;a<l;++a)i._parsed[a]=s(a)}}_getRotation(){return Vn(this.options.rotation-90)}_getCircumference(){return Vn(this.options.circumference)}_getRotationExtents(){let t=be,e=-be;for(let r=0;r<this.chart.data.datasets.length;++r)if(this.chart.isDatasetVisible(r)&&this.chart.getDatasetMeta(r).type===this._type){const i=this.chart.getDatasetMeta(r).controller,s=i._getRotation(),a=i._getCircumference();t=Math.min(t,s),e=Math.max(e,s+a)}return{rotation:t,circumference:e-t}}update(t){const e=this.chart,{chartArea:r}=e,i=this._cachedMeta,s=i.data,a=this.getMaxBorderWidth()+this.getMaxOffset(s)+this.options.spacing,l=Math.max((Math.min(r.width,r.height)-a)/2,0),c=Math.min(FC(this.options.cutout,l),1),h=this._getRingWeight(this.index),{circumference:f,rotation:g}=this._getRotationExtents(),{ratioX:d,ratioY:m,offsetX:p,offsetY:v}=EO(g,f,c),b=(r.width-a)/d,_=(r.height-a)/m,A=Math.max(Math.min(b,_)/2,0),C=Mb(this.options.radius,A),w=Math.max(C*c,0),M=(C-w)/this._getVisibleDatasetWeightTotal();this.offsetX=p*C,this.offsetY=v*C,i.total=this.calculateTotal(),this.outerRadius=C-M*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-M*h,0),this.updateElements(s,0,s.length,t)}_circumference(t,e){const r=this.options,i=this._cachedMeta,s=this._getCircumference();return e&&r.animation.animateRotate||!this.chart.getDataVisibility(t)||i._parsed[t]===null||i.data[t].hidden?0:this.calculateCircumference(i._parsed[t]*s/be)}updateElements(t,e,r,i){const s=i==="reset",a=this.chart,l=a.chartArea,h=a.options.animation,f=(l.left+l.right)/2,g=(l.top+l.bottom)/2,d=s&&h.animateScale,m=d?0:this.innerRadius,p=d?0:this.outerRadius,{sharedOptions:v,includeOptions:b}=this._getSharedOptions(e,i);let _=this._getRotation(),A;for(A=0;A<e;++A)_+=this._circumference(A,s);for(A=e;A<e+r;++A){const C=this._circumference(A,s),w=t[A],M={x:f+this.offsetX,y:g+this.offsetY,startAngle:_,endAngle:_+C,circumference:C,outerRadius:p,innerRadius:m};b&&(M.options=v||this.resolveDataElementOptions(A,w.active?"active":i)),_+=C,this.updateElement(w,A,M,i)}}calculateTotal(){const t=this._cachedMeta,e=t.data;let r=0,i;for(i=0;i<e.length;i++){const s=t._parsed[i];s!==null&&!isNaN(s)&&this.chart.getDataVisibility(i)&&!e[i].hidden&&(r+=Math.abs(s))}return r}calculateCircumference(t){const e=this._cachedMeta.total;return e>0&&!isNaN(t)?be*(Math.abs(t)/e):0}getLabelAndValue(t){const e=this._cachedMeta,r=this.chart,i=r.data.labels||[],s=fo(e._parsed[t],r.options.locale);return{label:i[t]||"",value:s}}getMaxBorderWidth(t){let e=0;const r=this.chart;let i,s,a,l,c;if(!t){for(i=0,s=r.data.datasets.length;i<s;++i)if(r.isDatasetVisible(i)){a=r.getDatasetMeta(i),t=a.data,l=a.controller;break}}if(!t)return 0;for(i=0,s=t.length;i<s;++i)c=l.resolveDataElementOptions(i),c.borderAlign!=="inner"&&(e=Math.max(e,c.borderWidth||0,c.hoverBorderWidth||0));return e}getMaxOffset(t){let e=0;for(let r=0,i=t.length;r<i;++r){const s=this.resolveDataElementOptions(r);e=Math.max(e,s.offset||0,s.hoverOffset||0)}return e}_getRingWeightOffset(t){let e=0;for(let r=0;r<t;++r)this.chart.isDatasetVisible(r)&&(e+=this._getRingWeight(r));return e}_getRingWeight(t){return Math.max(Wt(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}At(gi,"id","doughnut"),At(gi,"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"}),At(gi,"descriptors",{_scriptable:t=>t!=="spacing",_indexable:t=>t!=="spacing"&&!t.startsWith("borderDash")&&!t.startsWith("hoverBorderDash")}),At(gi,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:r,color:i}}=t.legend.options;return e.labels.map((s,a)=>{const c=t.getDatasetMeta(0).controller.getStyle(a);return{text:s,fillStyle:c.backgroundColor,strokeStyle:c.borderColor,fontColor:i,lineWidth:c.borderWidth,pointStyle:r,hidden:!t.getDataVisibility(a),index:a}})}return[]}},onClick(t,e,r){r.chart.toggleDataVisibility(e.index),r.chart.update()}}}});class al extends $n{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){const e=this._cachedMeta,{dataset:r,data:i=[],_dataset:s}=e,a=this.chart._animationsDisabled;let{start:l,count:c}=Db(e,i,a);this._drawStart=l,this._drawCount=c,Fb(e)&&(l=0,c=i.length),r._chart=this.chart,r._datasetIndex=this.index,r._decimated=!!s._decimated,r.points=i;const h=this.resolveDatasetElementOptions(t);this.options.showLine||(h.borderWidth=0),h.segment=this.options.segment,this.updateElement(r,void 0,{animated:!a,options:h},t),this.updateElements(i,l,c,t)}updateElements(t,e,r,i){const s=i==="reset",{iScale:a,vScale:l,_stacked:c,_dataset:h}=this._cachedMeta,{sharedOptions:f,includeOptions:g}=this._getSharedOptions(e,i),d=a.axis,m=l.axis,{spanGaps:p,segment:v}=this.options,b=Xi(p)?p:Number.POSITIVE_INFINITY,_=this.chart._animationsDisabled||s||i==="none",A=e+r,C=t.length;let w=e>0&&this.getParsed(e-1);for(let M=0;M<C;++M){const O=t[M],L=_?O:{};if(M<e||M>=A){L.skip=!0;continue}const N=this.getParsed(M),Y=Kt(N[m]),z=L[d]=a.getPixelForValue(N[d],M),G=L[m]=s||Y?l.getBasePixel():l.getPixelForValue(c?this.applyStack(l,N,c):N[m],M);L.skip=isNaN(z)||isNaN(G)||Y,L.stop=M>0&&Math.abs(N[d]-w[d])>b,v&&(L.parsed=N,L.raw=h.data[M]),g&&(L.options=f||this.resolveDataElementOptions(M,O.active?"active":i)),_||this.updateElement(O,M,L,i),w=N}}getMaxOverflow(){const t=this._cachedMeta,e=t.dataset,r=e.options&&e.options.borderWidth||0,i=t.data||[];if(!i.length)return r;const s=i[0].size(this.resolveDataElementOptions(0)),a=i[i.length-1].size(this.resolveDataElementOptions(i.length-1));return Math.max(r,s,a)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}At(al,"id","line"),At(al,"defaults",{datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1}),At(al,"overrides",{scales:{_index_:{type:"category"},_value_:{type:"linear"}}});class Vs extends $n{constructor(t,e){super(t,e),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){const e=this._cachedMeta,r=this.chart,i=r.data.labels||[],s=fo(e._parsed[t].r,r.options.locale);return{label:i[t]||"",value:s}}parseObjectData(t,e,r,i){return Vb.bind(this)(t,e,r,i)}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((r,i)=>{const s=this.getParsed(i).r;!isNaN(s)&&this.chart.getDataVisibility(i)&&(s<e.min&&(e.min=s),s>e.max&&(e.max=s))}),e}_updateRadius(){const t=this.chart,e=t.chartArea,r=t.options,i=Math.min(e.right-e.left,e.bottom-e.top),s=Math.max(i/2,0),a=Math.max(r.cutoutPercentage?s/100*r.cutoutPercentage:1,0),l=(s-a)/t.getVisibleDatasetCount();this.outerRadius=s-l*this.index,this.innerRadius=this.outerRadius-l}updateElements(t,e,r,i){const s=i==="reset",a=this.chart,c=a.options.animation,h=this._cachedMeta.rScale,f=h.xCenter,g=h.yCenter,d=h.getIndexAngle(0)-.5*_e;let m=d,p;const v=360/this.countVisibleElements();for(p=0;p<e;++p)m+=this._computeAngle(p,i,v);for(p=e;p<e+r;p++){const b=t[p];let _=m,A=m+this._computeAngle(p,i,v),C=a.getDataVisibility(p)?h.getDistanceFromCenterForValue(this.getParsed(p).r):0;m=A,s&&(c.animateScale&&(C=0),c.animateRotate&&(_=A=d));const w={x:f,y:g,innerRadius:0,outerRadius:C,startAngle:_,endAngle:A,options:this.resolveDataElementOptions(p,b.active?"active":i)};this.updateElement(b,p,w,i)}}countVisibleElements(){const t=this._cachedMeta;let e=0;return t.data.forEach((r,i)=>{!isNaN(this.getParsed(i).r)&&this.chart.getDataVisibility(i)&&e++}),e}_computeAngle(t,e,r){return this.chart.getDataVisibility(t)?Vn(this.resolveDataElementOptions(t,e).angle||r):0}}At(Vs,"id","polarArea"),At(Vs,"defaults",{dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0}),At(Vs,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:r,color:i}}=t.legend.options;return e.labels.map((s,a)=>{const c=t.getDatasetMeta(0).controller.getStyle(a);return{text:s,fillStyle:c.backgroundColor,strokeStyle:c.borderColor,fontColor:i,lineWidth:c.borderWidth,pointStyle:r,hidden:!t.getDataVisibility(a),index:a}})}return[]}},onClick(t,e,r){r.chart.toggleDataVisibility(e.index),r.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}});class eh extends gi{}At(eh,"id","pie"),At(eh,"defaults",{cutout:0,rotation:0,circumference:360,radius:"100%"});class ll extends $n{getLabelAndValue(t){const e=this._cachedMeta.vScale,r=this.getParsed(t);return{label:e.getLabels()[t],value:""+e.getLabelForValue(r[e.axis])}}parseObjectData(t,e,r,i){return Vb.bind(this)(t,e,r,i)}update(t){const e=this._cachedMeta,r=e.dataset,i=e.data||[],s=e.iScale.getLabels();if(r.points=i,t!=="resize"){const a=this.resolveDatasetElementOptions(t);this.options.showLine||(a.borderWidth=0);const l={_loop:!0,_fullLoop:s.length===i.length,options:a};this.updateElement(r,void 0,l,t)}this.updateElements(i,0,i.length,t)}updateElements(t,e,r,i){const s=this._cachedMeta.rScale,a=i==="reset";for(let l=e;l<e+r;l++){const c=t[l],h=this.resolveDataElementOptions(l,c.active?"active":i),f=s.getPointPositionForValue(l,this.getParsed(l).r),g=a?s.xCenter:f.x,d=a?s.yCenter:f.y,m={x:g,y:d,angle:f.angle,skip:isNaN(g)||isNaN(d),options:h};this.updateElement(c,l,m,i)}}}At(ll,"id","radar"),At(ll,"defaults",{datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}}),At(ll,"overrides",{aspectRatio:1,scales:{r:{type:"radialLinear"}}});class ul extends $n{getLabelAndValue(t){const e=this._cachedMeta,r=this.chart.data.labels||[],{xScale:i,yScale:s}=e,a=this.getParsed(t),l=i.getLabelForValue(a.x),c=s.getLabelForValue(a.y);return{label:r[t]||"",value:"("+l+", "+c+")"}}update(t){const e=this._cachedMeta,{data:r=[]}=e,i=this.chart._animationsDisabled;let{start:s,count:a}=Db(e,r,i);if(this._drawStart=s,this._drawCount=a,Fb(e)&&(s=0,a=r.length),this.options.showLine){this.datasetElementType||this.addElements();const{dataset:l,_dataset:c}=e;l._chart=this.chart,l._datasetIndex=this.index,l._decimated=!!c._decimated,l.points=r;const h=this.resolveDatasetElementOptions(t);h.segment=this.options.segment,this.updateElement(l,void 0,{animated:!i,options:h},t)}else this.datasetElementType&&(delete e.dataset,this.datasetElementType=!1);this.updateElements(r,s,a,t)}addElements(){const{showLine:t}=this.options;!this.datasetElementType&&t&&(this.datasetElementType=this.chart.registry.getElement("line")),super.addElements()}updateElements(t,e,r,i){const s=i==="reset",{iScale:a,vScale:l,_stacked:c,_dataset:h}=this._cachedMeta,f=this.resolveDataElementOptions(e,i),g=this.getSharedOptions(f),d=this.includeOptions(i,g),m=a.axis,p=l.axis,{spanGaps:v,segment:b}=this.options,_=Xi(v)?v:Number.POSITIVE_INFINITY,A=this.chart._animationsDisabled||s||i==="none";let C=e>0&&this.getParsed(e-1);for(let w=e;w<e+r;++w){const M=t[w],O=this.getParsed(w),L=A?M:{},N=Kt(O[p]),Y=L[m]=a.getPixelForValue(O[m],w),z=L[p]=s||N?l.getBasePixel():l.getPixelForValue(c?this.applyStack(l,O,c):O[p],w);L.skip=isNaN(Y)||isNaN(z)||N,L.stop=w>0&&Math.abs(O[m]-C[m])>_,b&&(L.parsed=O,L.raw=h.data[w]),d&&(L.options=g||this.resolveDataElementOptions(w,M.active?"active":i)),A||this.updateElement(M,w,L,i),C=O}this.updateSharedOptions(g,i,f)}getMaxOverflow(){const t=this._cachedMeta,e=t.data||[];if(!this.options.showLine){let l=0;for(let c=e.length-1;c>=0;--c)l=Math.max(l,e[c].size(this.resolveDataElementOptions(c))/2);return l>0&&l}const r=t.dataset,i=r.options&&r.options.borderWidth||0;if(!e.length)return i;const s=e[0].size(this.resolveDataElementOptions(0)),a=e[e.length-1].size(this.resolveDataElementOptions(e.length-1));return Math.max(i,s,a)/2}}At(ul,"id","scatter"),At(ul,"defaults",{datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1}),At(ul,"overrides",{interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}});var AO=Object.freeze({__proto__:null,BarController:sl,BubbleController:ol,DoughnutController:gi,LineController:al,PieController:eh,PolarAreaController:Vs,RadarController:ll,ScatterController:ul});function ui(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class $h{constructor(t){At(this,"options");this.options=t||{}}static override(t){Object.assign($h.prototype,t)}init(){}formats(){return ui()}parse(){return ui()}format(){return ui()}add(){return ui()}diff(){return ui()}startOf(){return ui()}endOf(){return ui()}}var kO={_date:$h};function RO(n,t,e,r){const{controller:i,data:s,_sorted:a}=n,l=i._cachedMeta.iScale,c=n.dataset&&n.dataset.options?n.dataset.options.spanGaps:null;if(l&&t===l.axis&&t!=="r"&&a&&s.length){const h=l._reversePixels?XC:Mr;if(r){if(i._sharedOptions){const f=s[0],g=typeof f.getRange=="function"&&f.getRange(t);if(g){const d=h(s,t,e-g),m=h(s,t,e+g);return{lo:d.lo,hi:m.hi}}}}else{const f=h(s,t,e);if(c){const{vScale:g}=i._cachedMeta,{_parsed:d}=n,m=d.slice(0,f.lo+1).reverse().findIndex(v=>!Kt(v[g.axis]));f.lo-=Math.max(0,m);const p=d.slice(f.hi).findIndex(v=>!Kt(v[g.axis]));f.hi+=Math.max(0,p)}return f}}return{lo:0,hi:s.length-1}}function Dl(n,t,e,r,i){const s=n.getSortedVisibleDatasetMetas(),a=e[t];for(let l=0,c=s.length;l<c;++l){const{index:h,data:f}=s[l],{lo:g,hi:d}=RO(s[l],t,a,i);for(let m=g;m<=d;++m){const p=f[m];p.skip||r(p,h,m)}}}function MO(n){const t=n.indexOf("x")!==-1,e=n.indexOf("y")!==-1;return function(r,i){const s=t?Math.abs(r.x-i.x):0,a=e?Math.abs(r.y-i.y):0;return Math.sqrt(Math.pow(s,2)+Math.pow(a,2))}}function Df(n,t,e,r,i){const s=[];return!i&&!n.isPointInArea(t)||Dl(n,e,t,function(l,c,h){!i&&!Cr(l,n.chartArea,0)||l.inRange(t.x,t.y,r)&&s.push({element:l,datasetIndex:c,index:h})},!0),s}function CO(n,t,e,r){let i=[];function s(a,l,c){const{startAngle:h,endAngle:f}=a.getProps(["startAngle","endAngle"],r),{angle:g}=Ob(a,{x:t.x,y:t.y});Qs(g,h,f)&&i.push({element:a,datasetIndex:l,index:c})}return Dl(n,e,t,s),i}function PO(n,t,e,r,i,s){let a=[];const l=MO(e);let c=Number.POSITIVE_INFINITY;function h(f,g,d){const m=f.inRange(t.x,t.y,i);if(r&&!m)return;const p=f.getCenterPoint(i);if(!(!!s||n.isPointInArea(p))&&!m)return;const b=l(t,p);b<c?(a=[{element:f,datasetIndex:g,index:d}],c=b):b===c&&a.push({element:f,datasetIndex:g,index:d})}return Dl(n,e,t,h),a}function Ff(n,t,e,r,i,s){return!s&&!n.isPointInArea(t)?[]:e==="r"&&!r?CO(n,t,e,i):PO(n,t,e,r,i,s)}function B0(n,t,e,r,i){const s=[],a=e==="x"?"inXRange":"inYRange";let l=!1;return Dl(n,e,t,(c,h,f)=>{c[a]&&c[a](t[e],i)&&(s.push({element:c,datasetIndex:h,index:f}),l=l||c.inRange(t.x,t.y,i))}),r&&!l?[]:s}var OO={modes:{index(n,t,e,r){const i=fi(t,n),s=e.axis||"x",a=e.includeInvisible||!1,l=e.intersect?Df(n,i,s,r,a):Ff(n,i,s,!1,r,a),c=[];return l.length?(n.getSortedVisibleDatasetMetas().forEach(h=>{const f=l[0].index,g=h.data[f];g&&!g.skip&&c.push({element:g,datasetIndex:h.index,index:f})}),c):[]},dataset(n,t,e,r){const i=fi(t,n),s=e.axis||"xy",a=e.includeInvisible||!1;let l=e.intersect?Df(n,i,s,r,a):Ff(n,i,s,!1,r,a);if(l.length>0){const c=l[0].datasetIndex,h=n.getDatasetMeta(c).data;l=[];for(let f=0;f<h.length;++f)l.push({element:h[f],datasetIndex:c,index:f})}return l},point(n,t,e,r){const i=fi(t,n),s=e.axis||"xy",a=e.includeInvisible||!1;return Df(n,i,s,r,a)},nearest(n,t,e,r){const i=fi(t,n),s=e.axis||"xy",a=e.includeInvisible||!1;return Ff(n,i,s,e.intersect,r,a)},x(n,t,e,r){const i=fi(t,n);return B0(n,i,"x",e.intersect,r)},y(n,t,e,r){const i=fi(t,n);return B0(n,i,"y",e.intersect,r)}}};const e_=["left","top","right","bottom"];function ks(n,t){return n.filter(e=>e.pos===t)}function I0(n,t){return n.filter(e=>e_.indexOf(e.pos)===-1&&e.box.axis===t)}function Rs(n,t){return n.sort((e,r)=>{const i=t?r:e,s=t?e:r;return i.weight===s.weight?i.index-s.index:i.weight-s.weight})}function LO(n){const t=[];let e,r,i,s,a,l;for(e=0,r=(n||[]).length;e<r;++e)i=n[e],{position:s,options:{stack:a,stackWeight:l=1}}=i,t.push({index:e,box:i,pos:s,horizontal:i.isHorizontal(),weight:i.weight,stack:a&&s+a,stackWeight:l});return t}function TO(n){const t={};for(const e of n){const{stack:r,pos:i,stackWeight:s}=e;if(!r||!e_.includes(i))continue;const a=t[r]||(t[r]={count:0,placed:0,weight:0,size:0});a.count++,a.weight+=s}return t}function BO(n,t){const e=TO(n),{vBoxMaxWidth:r,hBoxMaxHeight:i}=t;let s,a,l;for(s=0,a=n.length;s<a;++s){l=n[s];const{fullSize:c}=l.box,h=e[l.stack],f=h&&l.stackWeight/h.weight;l.horizontal?(l.width=f?f*r:c&&t.availableWidth,l.height=i):(l.width=r,l.height=f?f*i:c&&t.availableHeight)}return e}function IO(n){const t=LO(n),e=Rs(t.filter(h=>h.box.fullSize),!0),r=Rs(ks(t,"left"),!0),i=Rs(ks(t,"right")),s=Rs(ks(t,"top"),!0),a=Rs(ks(t,"bottom")),l=I0(t,"x"),c=I0(t,"y");return{fullSize:e,leftAndTop:r.concat(s),rightAndBottom:i.concat(c).concat(a).concat(l),chartArea:ks(t,"chartArea"),vertical:r.concat(i).concat(c),horizontal:s.concat(a).concat(l)}}function D0(n,t,e,r){return Math.max(n[e],t[e])+Math.max(n[r],t[r])}function n_(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 DO(n,t,e,r){const{pos:i,box:s}=e,a=n.maxPadding;if(!Jt(i)){e.size&&(n[i]-=e.size);const g=r[e.stack]||{size:0,count:1};g.size=Math.max(g.size,e.horizontal?s.height:s.width),e.size=g.size/g.count,n[i]+=e.size}s.getPadding&&n_(a,s.getPadding());const l=Math.max(0,t.outerWidth-D0(a,n,"left","right")),c=Math.max(0,t.outerHeight-D0(a,n,"top","bottom")),h=l!==n.w,f=c!==n.h;return n.w=l,n.h=c,e.horizontal?{same:h,other:f}:{same:f,other:h}}function FO(n){const t=n.maxPadding;function e(r){const i=Math.max(t[r]-n[r],0);return n[r]+=i,i}n.y+=e("top"),n.x+=e("left"),e("right"),e("bottom")}function NO(n,t){const e=t.maxPadding;function r(i){const s={left:0,top:0,right:0,bottom:0};return i.forEach(a=>{s[a]=Math.max(t[a],e[a])}),s}return r(n?["left","right"]:["top","bottom"])}function Bs(n,t,e,r){const i=[];let s,a,l,c,h,f;for(s=0,a=n.length,h=0;s<a;++s){l=n[s],c=l.box,c.update(l.width||t.w,l.height||t.h,NO(l.horizontal,t));const{same:g,other:d}=DO(t,e,l,r);h|=g&&i.length,f=f||d,c.fullSize||i.push(l)}return h&&Bs(i,t,e,r)||f}function Va(n,t,e,r,i){n.top=e,n.left=t,n.right=t+r,n.bottom=e+i,n.width=r,n.height=i}function F0(n,t,e,r){const i=e.padding;let{x:s,y:a}=t;for(const l of n){const c=l.box,h=r[l.stack]||{placed:0,weight:1},f=l.stackWeight/h.weight||1;if(l.horizontal){const g=t.w*f,d=h.size||c.height;Zs(h.start)&&(a=h.start),c.fullSize?Va(c,i.left,a,e.outerWidth-i.right-i.left,d):Va(c,t.left+h.placed,a,g,d),h.start=a,h.placed+=g,a=c.bottom}else{const g=t.h*f,d=h.size||c.width;Zs(h.start)&&(s=h.start),c.fullSize?Va(c,s,i.top,d,e.outerHeight-i.bottom-i.top):Va(c,s,t.top+h.placed,d,g),h.start=s,h.placed+=g,s=c.right}}t.x=s,t.y=a}var tn={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,r){if(!n)return;const i=en(n.options.layout.padding),s=Math.max(t-i.width,0),a=Math.max(e-i.height,0),l=IO(n.boxes),c=l.vertical,h=l.horizontal;le(n.boxes,v=>{typeof v.beforeLayout=="function"&&v.beforeLayout()});const f=c.reduce((v,b)=>b.box.options&&b.box.options.display===!1?v:v+1,0)||1,g=Object.freeze({outerWidth:t,outerHeight:e,padding:i,availableWidth:s,availableHeight:a,vBoxMaxWidth:s/2/f,hBoxMaxHeight:a/2}),d=Object.assign({},i);n_(d,en(r));const m=Object.assign({maxPadding:d,w:s,h:a,x:i.left,y:i.top},i),p=BO(c.concat(h),g);Bs(l.fullSize,m,g,p),Bs(c,m,g,p),Bs(h,m,g,p)&&Bs(c,m,g,p),FO(m),F0(l.leftAndTop,m,g,p),m.x+=m.w,m.y+=m.h,F0(l.rightAndBottom,m,g,p),n.chartArea={left:m.left,top:m.top,right:m.left+m.w,bottom:m.top+m.h,height:m.h,width:m.w},le(l.chartArea,v=>{const b=v.box;Object.assign(b,n.chartArea),b.update(m.w,m.h,{left:0,top:0,right:0,bottom:0})})}};class r_{acquireContext(t,e){}releaseContext(t){return!1}addEventListener(t,e,r){}removeEventListener(t,e,r){}getDevicePixelRatio(){return 1}getMaximumSize(t,e,r,i){return e=Math.max(0,e||t.width),r=r||t.height,{width:e,height:Math.max(0,i?Math.floor(e/i):r)}}isAttached(t){return!0}updateConfig(t){}}class jO extends r_{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const cl="$chartjs",UO={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},N0=n=>n===null||n==="";function qO(n,t){const e=n.style,r=n.getAttribute("height"),i=n.getAttribute("width");if(n[cl]={initial:{height:r,width:i,style:{display:e.display,height:e.height,width:e.width}}},e.display=e.display||"block",e.boxSizing=e.boxSizing||"border-box",N0(i)){const s=w0(n,"width");s!==void 0&&(n.width=s)}if(N0(r))if(n.style.height==="")n.height=n.width/(t||2);else{const s=w0(n,"height");s!==void 0&&(n.height=s)}return n}const i_=HP?{passive:!0}:!1;function WO(n,t,e){n&&n.addEventListener(t,e,i_)}function HO(n,t,e){n&&n.canvas&&n.canvas.removeEventListener(t,e,i_)}function zO(n,t){const e=UO[n.type]||n.type,{x:r,y:i}=fi(n,t);return{type:e,chart:t,native:n,x:r!==void 0?r:null,y:i!==void 0?i:null}}function _l(n,t){for(const e of n)if(e===t||e.contains(t))return!0}function VO(n,t,e){const r=n.canvas,i=new MutationObserver(s=>{let a=!1;for(const l of s)a=a||_l(l.addedNodes,r),a=a&&!_l(l.removedNodes,r);a&&e()});return i.observe(document,{childList:!0,subtree:!0}),i}function $O(n,t,e){const r=n.canvas,i=new MutationObserver(s=>{let a=!1;for(const l of s)a=a||_l(l.removedNodes,r),a=a&&!_l(l.addedNodes,r);a&&e()});return i.observe(document,{childList:!0,subtree:!0}),i}const eo=new Map;let j0=0;function s_(){const n=window.devicePixelRatio;n!==j0&&(j0=n,eo.forEach((t,e)=>{e.currentDevicePixelRatio!==n&&t()}))}function GO(n,t){eo.size||window.addEventListener("resize",s_),eo.set(n,t)}function YO(n){eo.delete(n),eo.size||window.removeEventListener("resize",s_)}function KO(n,t,e){const r=n.canvas,i=r&&Vh(r);if(!i)return;const s=Ib((l,c)=>{const h=i.clientWidth;e(l,c),h<i.clientWidth&&e()},window),a=new ResizeObserver(l=>{const c=l[0],h=c.contentRect.width,f=c.contentRect.height;h===0&&f===0||s(h,f)});return a.observe(i),GO(n,s),a}function Nf(n,t,e){e&&e.disconnect(),t==="resize"&&YO(n)}function XO(n,t,e){const r=n.canvas,i=Ib(s=>{n.ctx!==null&&e(zO(s,n))},n);return WO(r,t,i),i}class JO extends r_{acquireContext(t,e){const r=t&&t.getContext&&t.getContext("2d");return r&&r.canvas===t?(qO(t,e),r):null}releaseContext(t){const e=t.canvas;if(!e[cl])return!1;const r=e[cl].initial;["height","width"].forEach(s=>{const a=r[s];Kt(a)?e.removeAttribute(s):e.setAttribute(s,a)});const i=r.style||{};return Object.keys(i).forEach(s=>{e.style[s]=i[s]}),e.width=e.width,delete e[cl],!0}addEventListener(t,e,r){this.removeEventListener(t,e);const i=t.$proxies||(t.$proxies={}),a={attach:VO,detach:$O,resize:KO}[e]||XO;i[e]=a(t,e,r)}removeEventListener(t,e){const r=t.$proxies||(t.$proxies={}),i=r[e];if(!i)return;({attach:Nf,detach:Nf,resize:Nf}[e]||HO)(t,e,i),r[e]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,r,i){return WP(t,e,r,i)}isAttached(t){const e=t&&Vh(t);return!!(e&&e.isConnected)}}function ZO(n){return!zh()||typeof OffscreenCanvas<"u"&&n instanceof OffscreenCanvas?jO:JO}class Gn{constructor(){At(this,"x");At(this,"y");At(this,"active",!1);At(this,"options");At(this,"$animations")}tooltipPosition(t){const{x:e,y:r}=this.getProps(["x","y"],t);return{x:e,y:r}}hasValue(){return Xi(this.x)&&Xi(this.y)}getProps(t,e){const r=this.$animations;if(!e||!r)return this;const i={};return t.forEach(s=>{i[s]=r[s]&&r[s].active()?r[s]._to:this[s]}),i}}At(Gn,"defaults",{}),At(Gn,"defaultRoutes");function QO(n,t){const e=n.options.ticks,r=tL(n),i=Math.min(e.maxTicksLimit||r,r),s=e.major.enabled?nL(t):[],a=s.length,l=s[0],c=s[a-1],h=[];if(a>i)return rL(t,h,s,a/i),h;const f=eL(s,t,i);if(a>0){let g,d;const m=a>1?Math.round((c-l)/(a-1)):null;for($a(t,h,f,Kt(m)?0:l-m,l),g=0,d=a-1;g<d;g++)$a(t,h,f,s[g],s[g+1]);return $a(t,h,f,c,Kt(m)?t.length:c+m),h}return $a(t,h,f),h}function tL(n){const t=n.options.offset,e=n._tickSize(),r=n._length/e+(t?0:1),i=n._maxLength/e;return Math.floor(Math.min(r,i))}function eL(n,t,e){const r=iL(n),i=t.length/e;if(!r)return Math.max(i,1);const s=VC(r);for(let a=0,l=s.length-1;a<l;a++){const c=s[a];if(c>i)return c}return Math.max(i,1)}function nL(n){const t=[];let e,r;for(e=0,r=n.length;e<r;e++)n[e].major&&t.push(e);return t}function rL(n,t,e,r){let i=0,s=e[0],a;for(r=Math.ceil(r),a=0;a<n.length;a++)a===s&&(t.push(n[a]),i++,s=e[i*r])}function $a(n,t,e,r,i){const s=Wt(r,0),a=Math.min(Wt(i,n.length),n.length);let l=0,c,h,f;for(e=Math.ceil(e),i&&(c=i-r,e=c/Math.floor(c/e)),f=s;f<0;)l++,f=Math.round(s+l*e);for(h=Math.max(s,0);h<a;h++)h===f&&(t.push(n[h]),l++,f=Math.round(s+l*e))}function iL(n){const t=n.length;let e,r;if(t<2)return!1;for(r=n[0],e=1;e<t;++e)if(n[e]-n[e-1]!==r)return!1;return r}const sL=n=>n==="left"?"right":n==="right"?"left":n,U0=(n,t,e)=>t==="top"||t==="left"?n[t]+e:n[t]-e,q0=(n,t)=>Math.min(t||n,n);function W0(n,t){const e=[],r=n.length/t,i=n.length;let s=0;for(;s<i;s+=r)e.push(n[Math.floor(s)]);return e}function oL(n,t,e){const r=n.ticks.length,i=Math.min(t,r-1),s=n._startPixel,a=n._endPixel,l=1e-6;let c=n.getPixelForTick(i),h;if(!(e&&(r===1?h=Math.max(c-s,a-c):t===0?h=(n.getPixelForTick(1)-c)/2:h=(c-n.getPixelForTick(i-1))/2,c+=i<t?h:-h,c<s-l||c>a+l)))return c}function aL(n,t){le(n,e=>{const r=e.gc,i=r.length/2;let s;if(i>t){for(s=0;s<i;++s)delete e.data[r[s]];r.splice(0,i)}})}function Ms(n){return n.drawTicks?n.tickLength:0}function H0(n,t){if(!n.display)return 0;const e=ze(n.font,t),r=en(n.padding);return(Ee(n.text)?n.text.length:1)*e.lineHeight+r.height}function lL(n,t){return Xr(n,{scale:t,type:"scale"})}function uL(n,t,e){return Xr(n,{tick:e,index:t,type:"tick"})}function cL(n,t,e){let r=Nh(n);return(e&&t!=="right"||!e&&t==="right")&&(r=sL(r)),r}function fL(n,t,e,r){const{top:i,left:s,bottom:a,right:l,chart:c}=n,{chartArea:h,scales:f}=c;let g=0,d,m,p;const v=a-i,b=l-s;if(n.isHorizontal()){if(m=Qe(r,s,l),Jt(e)){const _=Object.keys(e)[0],A=e[_];p=f[_].getPixelForValue(A)+v-t}else e==="center"?p=(h.bottom+h.top)/2+v-t:p=U0(n,e,t);d=l-s}else{if(Jt(e)){const _=Object.keys(e)[0],A=e[_];m=f[_].getPixelForValue(A)-b+t}else e==="center"?m=(h.left+h.right)/2-b+t:m=U0(n,e,t);p=Qe(r,a,i),g=e==="left"?-Ie:Ie}return{titleX:m,titleY:p,maxWidth:d,rotation:g}}class xi extends Gn{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:r,_suggestedMax:i}=this;return t=En(t,Number.POSITIVE_INFINITY),e=En(e,Number.NEGATIVE_INFINITY),r=En(r,Number.POSITIVE_INFINITY),i=En(i,Number.NEGATIVE_INFINITY),{min:En(t,r),max:En(e,i),minDefined:Le(t),maxDefined:Le(e)}}getMinMax(t){let{min:e,max:r,minDefined:i,maxDefined:s}=this.getUserBounds(),a;if(i&&s)return{min:e,max:r};const l=this.getMatchingVisibleMetas();for(let c=0,h=l.length;c<h;++c)a=l[c].controller.getMinMax(this,t),i||(e=Math.min(e,a.min)),s||(r=Math.max(r,a.max));return e=s&&e>r?r:e,r=i&&e>r?e:r,{min:En(e,En(r,e)),max:En(r,En(e,r))}}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(){me(this.options.beforeUpdate,[this])}update(t,e,r){const{beginAtZero:i,grace:s,ticks:a}=this.options,l=a.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=e,this._margins=r=Object.assign({left:0,right:0,top:0,bottom:0},r),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+r.left+r.right:this.height+r.top+r.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=_P(this,s,i),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const c=l<this.ticks.length;this._convertTicksToLabels(c?W0(this.ticks,l):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),a.display&&(a.autoSkip||a.source==="auto")&&(this.ticks=QO(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),c&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let t=this.options.reverse,e,r;this.isHorizontal()?(e=this.left,r=this.right):(e=this.top,r=this.bottom,t=!t),this._startPixel=e,this._endPixel=r,this._reversePixels=t,this._length=r-e,this._alignToPixels=this.options.alignToPixels}afterUpdate(){me(this.options.afterUpdate,[this])}beforeSetDimensions(){me(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(){me(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),me(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){me(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){const e=this.options.ticks;let r,i,s;for(r=0,i=t.length;r<i;r++)s=t[r],s.label=me(e.callback,[s.value,r,t],this)}afterTickToLabelConversion(){me(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){me(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this.options,e=t.ticks,r=q0(this.ticks.length,t.ticks.maxTicksLimit),i=e.minRotation||0,s=e.maxRotation;let a=i,l,c,h;if(!this._isVisible()||!e.display||i>=s||r<=1||!this.isHorizontal()){this.labelRotation=i;return}const f=this._getLabelSizes(),g=f.widest.width,d=f.highest.height,m=Ge(this.chart.width-g,0,this.maxWidth);l=t.offset?this.maxWidth/r:m/(r-1),g+6>l&&(l=m/(r-(t.offset?.5:1)),c=this.maxHeight-Ms(t.grid)-e.padding-H0(t.title,this.chart.options.font),h=Math.sqrt(g*g+d*d),a=Dh(Math.min(Math.asin(Ge((f.highest.height+6)/l,-1,1)),Math.asin(Ge(c/h,-1,1))-Math.asin(Ge(d/h,-1,1)))),a=Math.max(i,Math.min(s,a))),this.labelRotation=a}afterCalculateLabelRotation(){me(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){me(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:e,options:{ticks:r,title:i,grid:s}}=this,a=this._isVisible(),l=this.isHorizontal();if(a){const c=H0(i,e.options.font);if(l?(t.width=this.maxWidth,t.height=Ms(s)+c):(t.height=this.maxHeight,t.width=Ms(s)+c),r.display&&this.ticks.length){const{first:h,last:f,widest:g,highest:d}=this._getLabelSizes(),m=r.padding*2,p=Vn(this.labelRotation),v=Math.cos(p),b=Math.sin(p);if(l){const _=r.mirror?0:b*g.width+v*d.height;t.height=Math.min(this.maxHeight,t.height+_+m)}else{const _=r.mirror?0:v*g.width+b*d.height;t.width=Math.min(this.maxWidth,t.width+_+m)}this._calculatePadding(h,f,b,v)}}this._handleMargins(),l?(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,r,i){const{ticks:{align:s,padding:a},position:l}=this.options,c=this.labelRotation!==0,h=l!=="top"&&this.axis==="x";if(this.isHorizontal()){const f=this.getPixelForTick(0)-this.left,g=this.right-this.getPixelForTick(this.ticks.length-1);let d=0,m=0;c?h?(d=i*t.width,m=r*e.height):(d=r*t.height,m=i*e.width):s==="start"?m=e.width:s==="end"?d=t.width:s!=="inner"&&(d=t.width/2,m=e.width/2),this.paddingLeft=Math.max((d-f+a)*this.width/(this.width-f),0),this.paddingRight=Math.max((m-g+a)*this.width/(this.width-g),0)}else{let f=e.height/2,g=t.height/2;s==="start"?(f=0,g=t.height):s==="end"&&(f=e.height,g=0),this.paddingTop=f+a,this.paddingBottom=g+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(){me(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,r;for(e=0,r=t.length;e<r;e++)Kt(t[e].label)&&(t.splice(e,1),r--,e--);this.afterTickToLabelConversion()}_getLabelSizes(){let t=this._labelSizes;if(!t){const e=this.options.ticks.sampleSize;let r=this.ticks;e<r.length&&(r=W0(r,e)),this._labelSizes=t=this._computeLabelSizes(r,r.length,this.options.ticks.maxTicksLimit)}return t}_computeLabelSizes(t,e,r){const{ctx:i,_longestTextCache:s}=this,a=[],l=[],c=Math.floor(e/q0(e,r));let h=0,f=0,g,d,m,p,v,b,_,A,C,w,M;for(g=0;g<e;g+=c){if(p=t[g].label,v=this._resolveTickFontOptions(g),i.font=b=v.string,_=s[b]=s[b]||{data:{},gc:[]},A=v.lineHeight,C=w=0,!Kt(p)&&!Ee(p))C=vl(i,_.data,_.gc,C,p),w=A;else if(Ee(p))for(d=0,m=p.length;d<m;++d)M=p[d],!Kt(M)&&!Ee(M)&&(C=vl(i,_.data,_.gc,C,M),w+=A);a.push(C),l.push(w),h=Math.max(C,h),f=Math.max(w,f)}aL(s,e);const O=a.indexOf(h),L=l.indexOf(f),N=Y=>({width:a[Y]||0,height:l[Y]||0});return{first:N(0),last:N(e-1),widest:N(O),highest:N(L),widths:a,heights:l}}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 KC(this._alignToPixels?li(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 r=e[t];return r.$context||(r.$context=uL(this.getContext(),t,r))}return this.$context||(this.$context=lL(this.chart.getContext(),this))}_tickSize(){const t=this.options.ticks,e=Vn(this.labelRotation),r=Math.abs(Math.cos(e)),i=Math.abs(Math.sin(e)),s=this._getLabelSizes(),a=t.autoSkipPadding||0,l=s?s.widest.width+a:0,c=s?s.highest.height+a:0;return this.isHorizontal()?c*r>l*i?l/r:c/i:c*i<l*r?c/r:l/i}_isVisible(){const t=this.options.display;return t!=="auto"?!!t:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){const e=this.axis,r=this.chart,i=this.options,{grid:s,position:a,border:l}=i,c=s.offset,h=this.isHorizontal(),g=this.ticks.length+(c?1:0),d=Ms(s),m=[],p=l.setContext(this.getContext()),v=p.display?p.width:0,b=v/2,_=function(at){return li(r,at,v)};let A,C,w,M,O,L,N,Y,z,G,U,xt;if(a==="top")A=_(this.bottom),L=this.bottom-d,Y=A-b,G=_(t.top)+b,xt=t.bottom;else if(a==="bottom")A=_(this.top),G=t.top,xt=_(t.bottom)-b,L=A+b,Y=this.top+d;else if(a==="left")A=_(this.right),O=this.right-d,N=A-b,z=_(t.left)+b,U=t.right;else if(a==="right")A=_(this.left),z=t.left,U=_(t.right)-b,O=A+b,N=this.left+d;else if(e==="x"){if(a==="center")A=_((t.top+t.bottom)/2+.5);else if(Jt(a)){const at=Object.keys(a)[0],_t=a[at];A=_(this.chart.scales[at].getPixelForValue(_t))}G=t.top,xt=t.bottom,L=A+b,Y=L+d}else if(e==="y"){if(a==="center")A=_((t.left+t.right)/2);else if(Jt(a)){const at=Object.keys(a)[0],_t=a[at];A=_(this.chart.scales[at].getPixelForValue(_t))}O=A-b,N=O-d,z=t.left,U=t.right}const dt=Wt(i.ticks.maxTicksLimit,g),st=Math.max(1,Math.ceil(g/dt));for(C=0;C<g;C+=st){const at=this.getContext(C),_t=s.setContext(at),bt=l.setContext(at),Et=_t.lineWidth,kt=_t.color,Ot=bt.dash||[],Lt=bt.dashOffset,Q=_t.tickWidth,et=_t.tickColor,ot=_t.tickBorderDash||[],V=_t.tickBorderDashOffset;w=oL(this,C,c),w!==void 0&&(M=li(r,w,Et),h?O=N=z=U=M:L=Y=G=xt=M,m.push({tx1:O,ty1:L,tx2:N,ty2:Y,x1:z,y1:G,x2:U,y2:xt,width:Et,color:kt,borderDash:Ot,borderDashOffset:Lt,tickWidth:Q,tickColor:et,tickBorderDash:ot,tickBorderDashOffset:V}))}return this._ticksLength=g,this._borderValue=A,m}_computeLabelItems(t){const e=this.axis,r=this.options,{position:i,ticks:s}=r,a=this.isHorizontal(),l=this.ticks,{align:c,crossAlign:h,padding:f,mirror:g}=s,d=Ms(r.grid),m=d+f,p=g?-f:m,v=-Vn(this.labelRotation),b=[];let _,A,C,w,M,O,L,N,Y,z,G,U,xt="middle";if(i==="top")O=this.bottom-p,L=this._getXAxisLabelAlignment();else if(i==="bottom")O=this.top+p,L=this._getXAxisLabelAlignment();else if(i==="left"){const st=this._getYAxisLabelAlignment(d);L=st.textAlign,M=st.x}else if(i==="right"){const st=this._getYAxisLabelAlignment(d);L=st.textAlign,M=st.x}else if(e==="x"){if(i==="center")O=(t.top+t.bottom)/2+m;else if(Jt(i)){const st=Object.keys(i)[0],at=i[st];O=this.chart.scales[st].getPixelForValue(at)+m}L=this._getXAxisLabelAlignment()}else if(e==="y"){if(i==="center")M=(t.left+t.right)/2-m;else if(Jt(i)){const st=Object.keys(i)[0],at=i[st];M=this.chart.scales[st].getPixelForValue(at)}L=this._getYAxisLabelAlignment(d).textAlign}e==="y"&&(c==="start"?xt="top":c==="end"&&(xt="bottom"));const dt=this._getLabelSizes();for(_=0,A=l.length;_<A;++_){C=l[_],w=C.label;const st=s.setContext(this.getContext(_));N=this.getPixelForTick(_)+s.labelOffset,Y=this._resolveTickFontOptions(_),z=Y.lineHeight,G=Ee(w)?w.length:1;const at=G/2,_t=st.color,bt=st.textStrokeColor,Et=st.textStrokeWidth;let kt=L;a?(M=N,L==="inner"&&(_===A-1?kt=this.options.reverse?"left":"right":_===0?kt=this.options.reverse?"right":"left":kt="center"),i==="top"?h==="near"||v!==0?U=-G*z+z/2:h==="center"?U=-dt.highest.height/2-at*z+z:U=-dt.highest.height+z/2:h==="near"||v!==0?U=z/2:h==="center"?U=dt.highest.height/2-at*z:U=dt.highest.height-G*z,g&&(U*=-1),v!==0&&!st.showLabelBackdrop&&(M+=z/2*Math.sin(v))):(O=N,U=(1-G)*z/2);let Ot;if(st.showLabelBackdrop){const Lt=en(st.backdropPadding),Q=dt.heights[_],et=dt.widths[_];let ot=U-Lt.top,V=0-Lt.left;switch(xt){case"middle":ot-=Q/2;break;case"bottom":ot-=Q;break}switch(L){case"center":V-=et/2;break;case"right":V-=et;break;case"inner":_===A-1?V-=et:_>0&&(V-=et/2);break}Ot={left:V,top:ot,width:et+Lt.width,height:Q+Lt.height,color:st.backdropColor}}b.push({label:w,font:Y,textOffset:U,options:{rotation:v,color:_t,strokeColor:bt,strokeWidth:Et,textAlign:kt,textBaseline:xt,translation:[M,O],backdrop:Ot}})}return b}_getXAxisLabelAlignment(){const{position:t,ticks:e}=this.options;if(-Vn(this.labelRotation))return t==="top"?"left":"right";let i="center";return e.align==="start"?i="left":e.align==="end"?i="right":e.align==="inner"&&(i="inner"),i}_getYAxisLabelAlignment(t){const{position:e,ticks:{crossAlign:r,mirror:i,padding:s}}=this.options,a=this._getLabelSizes(),l=t+s,c=a.widest.width;let h,f;return e==="left"?i?(f=this.right+s,r==="near"?h="left":r==="center"?(h="center",f+=c/2):(h="right",f+=c)):(f=this.right-l,r==="near"?h="right":r==="center"?(h="center",f-=c/2):(h="left",f=this.left)):e==="right"?i?(f=this.left+s,r==="near"?h="right":r==="center"?(h="center",f-=c/2):(h="left",f-=c)):(f=this.left+l,r==="near"?h="left":r==="center"?(h="center",f+=c/2):(h="right",f=this.right)):h="right",{textAlign:h,x:f}}_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:r,top:i,width:s,height:a}=this;e&&(t.save(),t.fillStyle=e,t.fillRect(r,i,s,a),t.restore())}getLineWidthForValue(t){const e=this.options.grid;if(!this._isVisible()||!e.display)return 0;const i=this.ticks.findIndex(s=>s.value===t);return i>=0?e.setContext(this.getContext(i)).lineWidth:0}drawGrid(t){const e=this.options.grid,r=this.ctx,i=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let s,a;const l=(c,h,f)=>{!f.width||!f.color||(r.save(),r.lineWidth=f.width,r.strokeStyle=f.color,r.setLineDash(f.borderDash||[]),r.lineDashOffset=f.borderDashOffset,r.beginPath(),r.moveTo(c.x,c.y),r.lineTo(h.x,h.y),r.stroke(),r.restore())};if(e.display)for(s=0,a=i.length;s<a;++s){const c=i[s];e.drawOnChartArea&&l({x:c.x1,y:c.y1},{x:c.x2,y:c.y2},c),e.drawTicks&&l({x:c.tx1,y:c.ty1},{x:c.tx2,y:c.ty2},{color:c.tickColor,width:c.tickWidth,borderDash:c.tickBorderDash,borderDashOffset:c.tickBorderDashOffset})}}drawBorder(){const{chart:t,ctx:e,options:{border:r,grid:i}}=this,s=r.setContext(this.getContext()),a=r.display?s.width:0;if(!a)return;const l=i.setContext(this.getContext(0)).lineWidth,c=this._borderValue;let h,f,g,d;this.isHorizontal()?(h=li(t,this.left,a)-a/2,f=li(t,this.right,l)+l/2,g=d=c):(g=li(t,this.top,a)-a/2,d=li(t,this.bottom,l)+l/2,h=f=c),e.save(),e.lineWidth=s.width,e.strokeStyle=s.color,e.beginPath(),e.moveTo(h,g),e.lineTo(f,d),e.stroke(),e.restore()}drawLabels(t){if(!this.options.ticks.display)return;const r=this.ctx,i=this._computeLabelArea();i&&Tl(r,i);const s=this.getLabelItems(t);for(const a of s){const l=a.options,c=a.font,h=a.label,f=a.textOffset;bi(r,h,0,f,c,l)}i&&Bl(r)}drawTitle(){const{ctx:t,options:{position:e,title:r,reverse:i}}=this;if(!r.display)return;const s=ze(r.font),a=en(r.padding),l=r.align;let c=s.lineHeight/2;e==="bottom"||e==="center"||Jt(e)?(c+=a.bottom,Ee(r.text)&&(c+=s.lineHeight*(r.text.length-1))):c+=a.top;const{titleX:h,titleY:f,maxWidth:g,rotation:d}=fL(this,c,e,l);bi(t,r.text,0,0,s,{color:r.color,maxWidth:g,rotation:d,textAlign:cL(l,e,i),textBaseline:"middle",translation:[h,f]})}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,r=Wt(t.grid&&t.grid.z,-1),i=Wt(t.border&&t.border.z,0);return!this._isVisible()||this.draw!==xi.prototype.draw?[{z:e,draw:s=>{this.draw(s)}}]:[{z:r,draw:s=>{this.drawBackground(),this.drawGrid(s),this.drawTitle()}},{z:i,draw:()=>{this.drawBorder()}},{z:e,draw:s=>{this.drawLabels(s)}}]}getMatchingVisibleMetas(t){const e=this.chart.getSortedVisibleDatasetMetas(),r=this.axis+"AxisID",i=[];let s,a;for(s=0,a=e.length;s<a;++s){const l=e[s];l[r]===this.id&&(!t||l.type===t)&&i.push(l)}return i}_resolveTickFontOptions(t){const e=this.options.ticks.setContext(this.getContext(t));return ze(e.font)}_maxDigits(){const t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}}class Ga{constructor(t,e,r){this.type=t,this.scope=e,this.override=r,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 r;pL(e)&&(r=this.register(e));const i=this.items,s=t.id,a=this.scope+"."+s;if(!s)throw new Error("class does not have id: "+t);return s in i||(i[s]=t,hL(t,a,r),this.override&&Ae.override(t.id,t.overrides)),a}get(t){return this.items[t]}unregister(t){const e=this.items,r=t.id,i=this.scope;r in e&&delete e[r],i&&r in Ae[i]&&(delete Ae[i][r],this.override&&delete vi[r])}}function hL(n,t,e){const r=Js(Object.create(null),[e?Ae.get(e):{},Ae.get(t),n.defaults]);Ae.set(t,r),n.defaultRoutes&&dL(t,n.defaultRoutes),n.descriptors&&Ae.describe(t,n.descriptors)}function dL(n,t){Object.keys(t).forEach(e=>{const r=e.split("."),i=r.pop(),s=[n].concat(r).join("."),a=t[e].split("."),l=a.pop(),c=a.join(".");Ae.route(s,i,c,l)})}function pL(n){return"id"in n&&"defaults"in n}class gL{constructor(){this.controllers=new Ga($n,"datasets",!0),this.elements=new Ga(Gn,"elements"),this.plugins=new Ga(Object,"plugins"),this.scales=new Ga(xi,"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,r){[...e].forEach(i=>{const s=r||this._getRegistryForType(i);r||s.isForType(i)||s===this.plugins&&i.id?this._exec(t,s,i):le(i,a=>{const l=r||this._getRegistryForType(a);this._exec(t,l,a)})})}_exec(t,e,r){const i=Ih(t);me(r["before"+i],[],r),e[t](r),me(r["after"+i],[],r)}_getRegistryForType(t){for(let e=0;e<this._typedRegistries.length;e++){const r=this._typedRegistries[e];if(r.isForType(t))return r}return this.plugins}_get(t,e,r){const i=e.get(t);if(i===void 0)throw new Error('"'+t+'" is not a registered '+r+".");return i}}var er=new gL;class mL{constructor(){this._init=[]}notify(t,e,r,i){e==="beforeInit"&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install"));const s=i?this._descriptors(t).filter(i):this._descriptors(t),a=this._notify(s,t,e,r);return e==="afterDestroy"&&(this._notify(s,t,"stop"),this._notify(this._init,t,"uninstall")),a}_notify(t,e,r,i){i=i||{};for(const s of t){const a=s.plugin,l=a[r],c=[e,i,s.options];if(me(l,c,a)===!1&&i.cancelable)return!1}return!0}invalidate(){Kt(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 r=t&&t.config,i=Wt(r.options&&r.options.plugins,{}),s=yL(r);return i===!1&&!e?[]:bL(t,s,i,e)}_notifyStateChanges(t){const e=this._oldCache||[],r=this._cache,i=(s,a)=>s.filter(l=>!a.some(c=>l.plugin.id===c.plugin.id));this._notify(i(e,r),t,"stop"),this._notify(i(r,e),t,"start")}}function yL(n){const t={},e=[],r=Object.keys(er.plugins.items);for(let s=0;s<r.length;s++)e.push(er.getPlugin(r[s]));const i=n.plugins||[];for(let s=0;s<i.length;s++){const a=i[s];e.indexOf(a)===-1&&(e.push(a),t[a.id]=!0)}return{plugins:e,localIds:t}}function vL(n,t){return!t&&n===!1?null:n===!0?{}:n}function bL(n,{plugins:t,localIds:e},r,i){const s=[],a=n.getContext();for(const l of t){const c=l.id,h=vL(r[c],i);h!==null&&s.push({plugin:l,options:_L(n.config,{plugin:l,local:e[c]},h,a)})}return s}function _L(n,{plugin:t,local:e},r,i){const s=n.pluginScopeKeys(t),a=n.getOptionScopes(r,s);return e&&t.defaults&&a.push(t.defaults),n.createResolver(a,i,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function nh(n,t){const e=Ae.datasets[n]||{};return((t.datasets||{})[n]||{}).indexAxis||t.indexAxis||e.indexAxis||"x"}function wL(n,t){let e=n;return n==="_index_"?e=t:n==="_value_"&&(e=t==="x"?"y":"x"),e}function xL(n,t){return n===t?"_index_":"_value_"}function z0(n){if(n==="x"||n==="y"||n==="r")return n}function SL(n){if(n==="top"||n==="bottom")return"x";if(n==="left"||n==="right")return"y"}function rh(n,...t){if(z0(n))return n;for(const e of t){const r=e.axis||SL(e.position)||n.length>1&&z0(n[0].toLowerCase());if(r)return r}throw new Error(`Cannot determine type of '${n}' axis. Please provide 'axis' or 'position' option.`)}function V0(n,t,e){if(e[t+"AxisID"]===n)return{axis:t}}function EL(n,t){if(t.data&&t.data.datasets){const e=t.data.datasets.filter(r=>r.xAxisID===n||r.yAxisID===n);if(e.length)return V0(n,"x",e[0])||V0(n,"y",e[0])}return{}}function AL(n,t){const e=vi[n.type]||{scales:{}},r=t.scales||{},i=nh(n.type,t),s=Object.create(null);return Object.keys(r).forEach(a=>{const l=r[a];if(!Jt(l))return console.error(`Invalid scale configuration for scale: ${a}`);if(l._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${a}`);const c=rh(a,l,EL(a,n),Ae.scales[l.type]),h=xL(c,i),f=e.scales||{};s[a]=qs(Object.create(null),[{axis:c},l,f[c],f[h]])}),n.data.datasets.forEach(a=>{const l=a.type||n.type,c=a.indexAxis||nh(l,t),f=(vi[l]||{}).scales||{};Object.keys(f).forEach(g=>{const d=wL(g,c),m=a[d+"AxisID"]||d;s[m]=s[m]||Object.create(null),qs(s[m],[{axis:d},r[m],f[g]])})}),Object.keys(s).forEach(a=>{const l=s[a];qs(l,[Ae.scales[l.type],Ae.scale])}),s}function o_(n){const t=n.options||(n.options={});t.plugins=Wt(t.plugins,{}),t.scales=AL(n,t)}function a_(n){return n=n||{},n.datasets=n.datasets||[],n.labels=n.labels||[],n}function kL(n){return n=n||{},n.data=a_(n.data),o_(n),n}const $0=new Map,l_=new Set;function Ya(n,t){let e=$0.get(n);return e||(e=t(),$0.set(n,e),l_.add(e)),e}const Cs=(n,t,e)=>{const r=Yr(t,e);r!==void 0&&n.add(r)};class RL{constructor(t){this._config=kL(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=a_(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(),o_(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return Ya(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,e){return Ya(`${t}.transition.${e}`,()=>[[`datasets.${t}.transitions.${e}`,`transitions.${e}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,e){return Ya(`${t}-${e}`,()=>[[`datasets.${t}.elements.${e}`,`datasets.${t}`,`elements.${e}`,""]])}pluginScopeKeys(t){const e=t.id,r=this.type;return Ya(`${r}-plugin-${e}`,()=>[[`plugins.${e}`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,e){const r=this._scopeCache;let i=r.get(t);return(!i||e)&&(i=new Map,r.set(t,i)),i}getOptionScopes(t,e,r){const{options:i,type:s}=this,a=this._cachedScopes(t,r),l=a.get(e);if(l)return l;const c=new Set;e.forEach(f=>{t&&(c.add(t),f.forEach(g=>Cs(c,t,g))),f.forEach(g=>Cs(c,i,g)),f.forEach(g=>Cs(c,vi[s]||{},g)),f.forEach(g=>Cs(c,Ae,g)),f.forEach(g=>Cs(c,Qf,g))});const h=Array.from(c);return h.length===0&&h.push(Object.create(null)),l_.has(e)&&a.set(e,h),h}chartOptionScopes(){const{options:t,type:e}=this;return[t,vi[e]||{},Ae.datasets[e]||{},{type:e},Ae,Qf]}resolveNamedOptions(t,e,r,i=[""]){const s={$shared:!0},{resolver:a,subPrefixes:l}=G0(this._resolverCache,t,i);let c=a;if(CL(a,e)){s.$shared=!1,r=Kr(r)?r():r;const h=this.createResolver(t,r,l);c=Ji(a,r,h)}for(const h of e)s[h]=c[h];return s}createResolver(t,e,r=[""],i){const{resolver:s}=G0(this._resolverCache,t,r);return Jt(e)?Ji(s,e,void 0,i):s}}function G0(n,t,e){let r=n.get(t);r||(r=new Map,n.set(t,r));const i=e.join();let s=r.get(i);return s||(s={resolver:qh(t,e),subPrefixes:e.filter(l=>!l.toLowerCase().includes("hover"))},r.set(i,s)),s}const ML=n=>Jt(n)&&Object.getOwnPropertyNames(n).some(t=>Kr(n[t]));function CL(n,t){const{isScriptable:e,isIndexable:r}=qb(n);for(const i of t){const s=e(i),a=r(i),l=(a||s)&&n[i];if(s&&(Kr(l)||ML(l))||a&&Ee(l))return!0}return!1}var PL="4.4.8";const OL=["top","bottom","left","right","chartArea"];function Y0(n,t){return n==="top"||n==="bottom"||OL.indexOf(n)===-1&&t==="x"}function K0(n,t){return function(e,r){return e[n]===r[n]?e[t]-r[t]:e[n]-r[n]}}function X0(n){const t=n.chart,e=t.options.animation;t.notifyPlugins("afterRender"),me(e&&e.onComplete,[n],t)}function LL(n){const t=n.chart,e=t.options.animation;me(e&&e.onProgress,[n],t)}function u_(n){return zh()&&typeof n=="string"?n=document.getElementById(n):n&&n.length&&(n=n[0]),n&&n.canvas&&(n=n.canvas),n}const fl={},J0=n=>{const t=u_(n);return Object.values(fl).filter(e=>e.canvas===t).pop()};function TL(n,t,e){const r=Object.keys(n);for(const i of r){const s=+i;if(s>=t){const a=n[i];delete n[i],(e>0||s>t)&&(n[s+e]=a)}}}function BL(n,t,e,r){return!e||n.type==="mouseout"?null:r?t:n}function Ka(n,t,e){return n.options.clip?n[e]:t[e]}function IL(n,t){const{xScale:e,yScale:r}=n;return e&&r?{left:Ka(e,t,"left"),right:Ka(e,t,"right"),top:Ka(r,t,"top"),bottom:Ka(r,t,"bottom")}:t}class Sr{static register(...t){er.add(...t),Z0()}static unregister(...t){er.remove(...t),Z0()}constructor(t,e){const r=this.config=new RL(e),i=u_(t),s=J0(i);if(s)throw new Error("Canvas is already in use. Chart with ID '"+s.id+"' must be destroyed before the canvas with ID '"+s.canvas.id+"' can be reused.");const a=r.createResolver(r.chartOptionScopes(),this.getContext());this.platform=new(r.platform||ZO(i)),this.platform.updateConfig(r);const l=this.platform.acquireContext(i,a.aspectRatio),c=l&&l.canvas,h=c&&c.height,f=c&&c.width;if(this.id=DC(),this.ctx=l,this.canvas=c,this.width=f,this.height=h,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 mL,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=QC(g=>this.update(g),a.resizeDelay||0),this._dataChanges=[],fl[this.id]=this,!l||!c){console.error("Failed to create chart: can't acquire context from the given item");return}_r.listen(this,"complete",X0),_r.listen(this,"progress",LL),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:e},width:r,height:i,_aspectRatio:s}=this;return Kt(t)?e&&s?s:i?r/i: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 er}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():_0(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return y0(this.canvas,this.ctx),this}stop(){return _r.stop(this),this}resize(t,e){_r.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}_resize(t,e){const r=this.options,i=this.canvas,s=r.maintainAspectRatio&&this.aspectRatio,a=this.platform.getMaximumSize(i,t,e,s),l=r.devicePixelRatio||this.platform.getDevicePixelRatio(),c=this.width?"resize":"attach";this.width=a.width,this.height=a.height,this._aspectRatio=this.aspectRatio,_0(this,l,!0)&&(this.notifyPlugins("resize",{size:a}),me(r.onResize,[this,a],this),this.attached&&this._doResize(c)&&this.render())}ensureScalesHaveIDs(){const e=this.options.scales||{};le(e,(r,i)=>{r.id=i})}buildOrUpdateScales(){const t=this.options,e=t.scales,r=this.scales,i=Object.keys(r).reduce((a,l)=>(a[l]=!1,a),{});let s=[];e&&(s=s.concat(Object.keys(e).map(a=>{const l=e[a],c=rh(a,l),h=c==="r",f=c==="x";return{options:l,dposition:h?"chartArea":f?"bottom":"left",dtype:h?"radialLinear":f?"category":"linear"}}))),le(s,a=>{const l=a.options,c=l.id,h=rh(c,l),f=Wt(l.type,a.dtype);(l.position===void 0||Y0(l.position,h)!==Y0(a.dposition))&&(l.position=a.dposition),i[c]=!0;let g=null;if(c in r&&r[c].type===f)g=r[c];else{const d=er.getScale(f);g=new d({id:c,type:f,ctx:this.ctx,chart:this}),r[g.id]=g}g.init(l,t)}),le(i,(a,l)=>{a||delete r[l]}),le(r,a=>{tn.configure(this,a,a.options),tn.addBox(this,a)})}_updateMetasets(){const t=this._metasets,e=this.data.datasets.length,r=t.length;if(t.sort((i,s)=>i.index-s.index),r>e){for(let i=e;i<r;++i)this._destroyDatasetMeta(i);t.splice(e,r-e)}this._sortedMetasets=t.slice(0).sort(K0("order","index"))}_removeUnreferencedMetasets(){const{_metasets:t,data:{datasets:e}}=this;t.length>e.length&&delete this._stacks,t.forEach((r,i)=>{e.filter(s=>s===r._dataset).length===0&&this._destroyDatasetMeta(i)})}buildOrUpdateControllers(){const t=[],e=this.data.datasets;let r,i;for(this._removeUnreferencedMetasets(),r=0,i=e.length;r<i;r++){const s=e[r];let a=this.getDatasetMeta(r);const l=s.type||this.config.type;if(a.type&&a.type!==l&&(this._destroyDatasetMeta(r),a=this.getDatasetMeta(r)),a.type=l,a.indexAxis=s.indexAxis||nh(l,this.options),a.order=s.order||0,a.index=r,a.label=""+s.label,a.visible=this.isDatasetVisible(r),a.controller)a.controller.updateIndex(r),a.controller.linkScales();else{const c=er.getController(l),{datasetElementType:h,dataElementType:f}=Ae.datasets[l];Object.assign(c,{dataElementType:er.getElement(f),datasetElementType:h&&er.getElement(h)}),a.controller=new c(this,r),t.push(a.controller)}}return this._updateMetasets(),t}_resetElements(){le(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 r=this._options=e.createResolver(e.chartOptionScopes(),this.getContext()),i=this._animationsDisabled=!r.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0})===!1)return;const s=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let a=0;for(let h=0,f=this.data.datasets.length;h<f;h++){const{controller:g}=this.getDatasetMeta(h),d=!i&&s.indexOf(g)===-1;g.buildOrUpdateElements(d),a=Math.max(+g.getMaxOverflow(),a)}a=this._minPadding=r.layout.autoPadding?a:0,this._updateLayout(a),i||le(s,h=>{h.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(K0("z","_idx"));const{_active:l,_lastEvent:c}=this;c?this._eventHandler(c,!0):l.length&&this._updateHoverStyles(l,l,!0),this.render()}_updateScales(){le(this.scales,t=>{tn.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,e=new Set(Object.keys(this._listeners)),r=new Set(t.events);(!l0(e,r)||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,e=this._getUniformDataChanges()||[];for(const{method:r,start:i,count:s}of e){const a=r==="_removeElements"?-s:s;TL(t,i,a)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const e=this.data.datasets.length,r=s=>new Set(t.filter(a=>a[0]===s).map((a,l)=>l+","+a.splice(1).join(","))),i=r(0);for(let s=1;s<e;s++)if(!l0(i,r(s)))return;return Array.from(i).map(s=>s.split(",")).map(s=>({method:s[1],start:+s[2],count:+s[3]}))}_updateLayout(t){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;tn.update(this,this.width,this.height,t);const e=this.chartArea,r=e.width<=0||e.height<=0;this._layers=[],le(this.boxes,i=>{r&&i.position==="chartArea"||(i.configure&&i.configure(),this._layers.push(...i._layers()))},this),this._layers.forEach((i,s)=>{i._idx=s}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})!==!1){for(let e=0,r=this.data.datasets.length;e<r;++e)this.getDatasetMeta(e).controller.configure();for(let e=0,r=this.data.datasets.length;e<r;++e)this._updateDataset(e,Kr(t)?t({datasetIndex:e}):t);this.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,e){const r=this.getDatasetMeta(t),i={meta:r,index:t,mode:e,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",i)!==!1&&(r.controller._update(e),i.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",i))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(_r.has(this)?this.attached&&!_r.running(this)&&_r.start(this):(this.draw(),X0({chart:this})))}draw(){let t;if(this._resizeBeforeDraw){const{width:r,height:i}=this._resizeBeforeDraw;this._resizeBeforeDraw=null,this._resize(r,i)}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,r=[];let i,s;for(i=0,s=e.length;i<s;++i){const a=e[i];(!t||a.visible)&&r.push(a)}return r}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,r=t._clip,i=!r.disabled,s=IL(t,this.chartArea),a={meta:t,index:t.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",a)!==!1&&(i&&Tl(e,{left:r.left===!1?0:s.left-r.left,right:r.right===!1?this.width:s.right+r.right,top:r.top===!1?0:s.top-r.top,bottom:r.bottom===!1?this.height:s.bottom+r.bottom}),t.controller.draw(),i&&Bl(e),a.cancelable=!1,this.notifyPlugins("afterDatasetDraw",a))}isPointInArea(t){return Cr(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,e,r,i){const s=OO.modes[e];return typeof s=="function"?s(this,t,r,i):[]}getDatasetMeta(t){const e=this.data.datasets[t],r=this._metasets;let i=r.filter(s=>s&&s._dataset===e).pop();return i||(i={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},r.push(i)),i}getContext(){return this.$context||(this.$context=Xr(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const e=this.data.datasets[t];if(!e)return!1;const r=this.getDatasetMeta(t);return typeof r.hidden=="boolean"?!r.hidden:!e.hidden}setDatasetVisibility(t,e){const r=this.getDatasetMeta(t);r.hidden=!e}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,e,r){const i=r?"show":"hide",s=this.getDatasetMeta(t),a=s.controller._resolveAnimations(void 0,i);Zs(e)?(s.data[e].hidden=!r,this.update()):(this.setDatasetVisibility(t,r),a.update(s,{visible:r}),this.update(l=>l.datasetIndex===t?i: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(),_r.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(),y0(t,e),this.platform.releaseContext(e),this.canvas=null,this.ctx=null),delete fl[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,r=(s,a)=>{e.addEventListener(this,s,a),t[s]=a},i=(s,a,l)=>{s.offsetX=a,s.offsetY=l,this._eventHandler(s)};le(this.options.events,s=>r(s,i))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,e=this.platform,r=(c,h)=>{e.addEventListener(this,c,h),t[c]=h},i=(c,h)=>{t[c]&&(e.removeEventListener(this,c,h),delete t[c])},s=(c,h)=>{this.canvas&&this.resize(c,h)};let a;const l=()=>{i("attach",l),this.attached=!0,this.resize(),r("resize",s),r("detach",a)};a=()=>{this.attached=!1,i("resize",s),this._stop(),this._resize(0,0),r("attach",l)},e.isAttached(this.canvas)?l():a()}unbindEvents(){le(this._listeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._listeners={},le(this._responsiveListeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,e,r){const i=r?"set":"remove";let s,a,l,c;for(e==="dataset"&&(s=this.getDatasetMeta(t[0].datasetIndex),s.controller["_"+i+"DatasetHoverStyle"]()),l=0,c=t.length;l<c;++l){a=t[l];const h=a&&this.getDatasetMeta(a.datasetIndex).controller;h&&h[i+"HoverStyle"](a.element,a.datasetIndex,a.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){const e=this._active||[],r=t.map(({datasetIndex:s,index:a})=>{const l=this.getDatasetMeta(s);if(!l)throw new Error("No dataset found at index "+s);return{datasetIndex:s,element:l.data[a],index:a}});!gl(r,e)&&(this._active=r,this._lastEvent=null,this._updateHoverStyles(r,e))}notifyPlugins(t,e,r){return this._plugins.notify(this,t,e,r)}isPluginEnabled(t){return this._plugins._cache.filter(e=>e.plugin.id===t).length===1}_updateHoverStyles(t,e,r){const i=this.options.hover,s=(c,h)=>c.filter(f=>!h.some(g=>f.datasetIndex===g.datasetIndex&&f.index===g.index)),a=s(e,t),l=r?t:s(t,e);a.length&&this.updateHoverStyle(a,i.mode,!1),l.length&&i.mode&&this.updateHoverStyle(l,i.mode,!0)}_eventHandler(t,e){const r={event:t,replay:e,cancelable:!0,inChartArea:this.isPointInArea(t)},i=a=>(a.options.events||this.options.events).includes(t.native.type);if(this.notifyPlugins("beforeEvent",r,i)===!1)return;const s=this._handleEvent(t,e,r.inChartArea);return r.cancelable=!1,this.notifyPlugins("afterEvent",r,i),(s||r.changed)&&this.render(),this}_handleEvent(t,e,r){const{_active:i=[],options:s}=this,a=e,l=this._getActiveElements(t,i,r,a),c=WC(t),h=BL(t,this._lastEvent,r,c);r&&(this._lastEvent=null,me(s.onHover,[t,l,this],this),c&&me(s.onClick,[t,l,this],this));const f=!gl(l,i);return(f||e)&&(this._active=l,this._updateHoverStyles(l,i,e)),this._lastEvent=h,f}_getActiveElements(t,e,r,i){if(t.type==="mouseout")return[];if(!r)return e;const s=this.options.hover;return this.getElementsAtEventForMode(t,s.mode,s,i)}}At(Sr,"defaults",Ae),At(Sr,"instances",fl),At(Sr,"overrides",vi),At(Sr,"registry",er),At(Sr,"version",PL),At(Sr,"getChart",J0);function Z0(){return le(Sr.instances,n=>n._plugins.invalidate())}function DL(n,t,e){const{startAngle:r,pixelMargin:i,x:s,y:a,outerRadius:l,innerRadius:c}=t;let h=i/l;n.beginPath(),n.arc(s,a,l,r-h,e+h),c>i?(h=i/c,n.arc(s,a,c,e+h,r-h,!0)):n.arc(s,a,i,e+Ie,r-Ie),n.closePath(),n.clip()}function FL(n){return Uh(n,["outerStart","outerEnd","innerStart","innerEnd"])}function NL(n,t,e,r){const i=FL(n.options.borderRadius),s=(e-t)/2,a=Math.min(s,r*t/2),l=c=>{const h=(e-Math.min(s,c))*r/2;return Ge(c,0,Math.min(s,h))};return{outerStart:l(i.outerStart),outerEnd:l(i.outerEnd),innerStart:Ge(i.innerStart,0,a),innerEnd:Ge(i.innerEnd,0,a)}}function Hi(n,t,e,r){return{x:e+n*Math.cos(t),y:r+n*Math.sin(t)}}function wl(n,t,e,r,i,s){const{x:a,y:l,startAngle:c,pixelMargin:h,innerRadius:f}=t,g=Math.max(t.outerRadius+r+e-h,0),d=f>0?f+r+e+h:0;let m=0;const p=i-c;if(r){const st=f>0?f-r:0,at=g>0?g-r:0,_t=(st+at)/2,bt=_t!==0?p*_t/(_t+r):p;m=(p-bt)/2}const v=Math.max(.001,p*g-e/_e)/g,b=(p-v)/2,_=c+b+m,A=i-b-m,{outerStart:C,outerEnd:w,innerStart:M,innerEnd:O}=NL(t,d,g,A-_),L=g-C,N=g-w,Y=_+C/L,z=A-w/N,G=d+M,U=d+O,xt=_+M/G,dt=A-O/U;if(n.beginPath(),s){const st=(Y+z)/2;if(n.arc(a,l,g,Y,st),n.arc(a,l,g,st,z),w>0){const Et=Hi(N,z,a,l);n.arc(Et.x,Et.y,w,z,A+Ie)}const at=Hi(U,A,a,l);if(n.lineTo(at.x,at.y),O>0){const Et=Hi(U,dt,a,l);n.arc(Et.x,Et.y,O,A+Ie,dt+Math.PI)}const _t=(A-O/d+(_+M/d))/2;if(n.arc(a,l,d,A-O/d,_t,!0),n.arc(a,l,d,_t,_+M/d,!0),M>0){const Et=Hi(G,xt,a,l);n.arc(Et.x,Et.y,M,xt+Math.PI,_-Ie)}const bt=Hi(L,_,a,l);if(n.lineTo(bt.x,bt.y),C>0){const Et=Hi(L,Y,a,l);n.arc(Et.x,Et.y,C,_-Ie,Y)}}else{n.moveTo(a,l);const st=Math.cos(Y)*g+a,at=Math.sin(Y)*g+l;n.lineTo(st,at);const _t=Math.cos(z)*g+a,bt=Math.sin(z)*g+l;n.lineTo(_t,bt)}n.closePath()}function jL(n,t,e,r,i){const{fullCircles:s,startAngle:a,circumference:l}=t;let c=t.endAngle;if(s){wl(n,t,e,r,c,i);for(let h=0;h<s;++h)n.fill();isNaN(l)||(c=a+(l%be||be))}return wl(n,t,e,r,c,i),n.fill(),c}function UL(n,t,e,r,i){const{fullCircles:s,startAngle:a,circumference:l,options:c}=t,{borderWidth:h,borderJoinStyle:f,borderDash:g,borderDashOffset:d}=c,m=c.borderAlign==="inner";if(!h)return;n.setLineDash(g||[]),n.lineDashOffset=d,m?(n.lineWidth=h*2,n.lineJoin=f||"round"):(n.lineWidth=h,n.lineJoin=f||"bevel");let p=t.endAngle;if(s){wl(n,t,e,r,p,i);for(let v=0;v<s;++v)n.stroke();isNaN(l)||(p=a+(l%be||be))}m&&DL(n,t,p),s||(wl(n,t,e,r,p,i),n.stroke())}class Is extends Gn{constructor(e){super();At(this,"circumference");At(this,"endAngle");At(this,"fullCircles");At(this,"innerRadius");At(this,"outerRadius");At(this,"pixelMargin");At(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,r,i){const s=this.getProps(["x","y"],i),{angle:a,distance:l}=Ob(s,{x:e,y:r}),{startAngle:c,endAngle:h,innerRadius:f,outerRadius:g,circumference:d}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],i),m=(this.options.spacing+this.options.borderWidth)/2,p=Wt(d,h-c),v=Qs(a,c,h)&&c!==h,b=p>=be||v,_=Rr(l,f+m,g+m);return b&&_}getCenterPoint(e){const{x:r,y:i,startAngle:s,endAngle:a,innerRadius:l,outerRadius:c}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],e),{offset:h,spacing:f}=this.options,g=(s+a)/2,d=(l+c+f+h)/2;return{x:r+Math.cos(g)*d,y:i+Math.sin(g)*d}}tooltipPosition(e){return this.getCenterPoint(e)}draw(e){const{options:r,circumference:i}=this,s=(r.offset||0)/4,a=(r.spacing||0)/2,l=r.circular;if(this.pixelMargin=r.borderAlign==="inner"?.33:0,this.fullCircles=i>be?Math.floor(i/be):0,i===0||this.innerRadius<0||this.outerRadius<0)return;e.save();const c=(this.startAngle+this.endAngle)/2;e.translate(Math.cos(c)*s,Math.sin(c)*s);const h=1-Math.sin(Math.min(_e,i||0)),f=s*h;e.fillStyle=r.backgroundColor,e.strokeStyle=r.borderColor,jL(e,this,f,a,l),UL(e,this,f,a,l),e.restore()}}At(Is,"id","arc"),At(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}),At(Is,"defaultRoutes",{backgroundColor:"backgroundColor"}),At(Is,"descriptors",{_scriptable:!0,_indexable:e=>e!=="borderDash"});function c_(n,t,e=t){n.lineCap=Wt(e.borderCapStyle,t.borderCapStyle),n.setLineDash(Wt(e.borderDash,t.borderDash)),n.lineDashOffset=Wt(e.borderDashOffset,t.borderDashOffset),n.lineJoin=Wt(e.borderJoinStyle,t.borderJoinStyle),n.lineWidth=Wt(e.borderWidth,t.borderWidth),n.strokeStyle=Wt(e.borderColor,t.borderColor)}function qL(n,t,e){n.lineTo(e.x,e.y)}function WL(n){return n.stepped?fP:n.tension||n.cubicInterpolationMode==="monotone"?hP:qL}function f_(n,t,e={}){const r=n.length,{start:i=0,end:s=r-1}=e,{start:a,end:l}=t,c=Math.max(i,a),h=Math.min(s,l),f=i<a&&s<a||i>l&&s>l;return{count:r,start:c,loop:t.loop,ilen:h<c&&!f?r+h-c:h-c}}function HL(n,t,e,r){const{points:i,options:s}=t,{count:a,start:l,loop:c,ilen:h}=f_(i,e,r),f=WL(s);let{move:g=!0,reverse:d}=r||{},m,p,v;for(m=0;m<=h;++m)p=i[(l+(d?h-m:m))%a],!p.skip&&(g?(n.moveTo(p.x,p.y),g=!1):f(n,v,p,d,s.stepped),v=p);return c&&(p=i[(l+(d?h:0))%a],f(n,v,p,d,s.stepped)),!!c}function zL(n,t,e,r){const i=t.points,{count:s,start:a,ilen:l}=f_(i,e,r),{move:c=!0,reverse:h}=r||{};let f=0,g=0,d,m,p,v,b,_;const A=w=>(a+(h?l-w:w))%s,C=()=>{v!==b&&(n.lineTo(f,b),n.lineTo(f,v),n.lineTo(f,_))};for(c&&(m=i[A(0)],n.moveTo(m.x,m.y)),d=0;d<=l;++d){if(m=i[A(d)],m.skip)continue;const w=m.x,M=m.y,O=w|0;O===p?(M<v?v=M:M>b&&(b=M),f=(g*f+w)/++g):(C(),n.lineTo(w,M),p=O,g=0,v=b=M),_=M}C()}function ih(n){const t=n.options,e=t.borderDash&&t.borderDash.length;return!n._decimated&&!n._loop&&!t.tension&&t.cubicInterpolationMode!=="monotone"&&!t.stepped&&!e?zL:HL}function VL(n){return n.stepped?zP:n.tension||n.cubicInterpolationMode==="monotone"?VP:hi}function $L(n,t,e,r){let i=t._path;i||(i=t._path=new Path2D,t.path(i,e,r)&&i.closePath()),c_(n,t.options),n.stroke(i)}function GL(n,t,e,r){const{segments:i,options:s}=t,a=ih(t);for(const l of i)c_(n,s,l.style),n.beginPath(),a(n,t,l,{start:e,end:e+r-1})&&n.closePath(),n.stroke()}const YL=typeof Path2D=="function";function KL(n,t,e,r){YL&&!t.options.segment?$L(n,t,e,r):GL(n,t,e,r)}class zr extends Gn{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 r=this.options;if((r.tension||r.cubicInterpolationMode==="monotone")&&!r.stepped&&!this._pointsUpdated){const i=r.spanGaps?this._loop:this._fullLoop;DP(this._points,r,t,i,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=JP(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,r=t.length;return r&&e[t[r-1].end]}interpolate(t,e){const r=this.options,i=t[e],s=this.points,a=Jb(this,{property:e,start:i,end:i});if(!a.length)return;const l=[],c=VL(r);let h,f;for(h=0,f=a.length;h<f;++h){const{start:g,end:d}=a[h],m=s[g],p=s[d];if(m===p){l.push(m);continue}const v=Math.abs((i-m[e])/(p[e]-m[e])),b=c(m,p,v,r.stepped);b[e]=t[e],l.push(b)}return l.length===1?l[0]:l}pathSegment(t,e,r){return ih(this)(t,this,e,r)}path(t,e,r){const i=this.segments,s=ih(this);let a=this._loop;e=e||0,r=r||this.points.length-e;for(const l of i)a&=s(t,this,l,{start:e,end:e+r-1});return!!a}draw(t,e,r,i){const s=this.options||{};(this.points||[]).length&&s.borderWidth&&(t.save(),KL(t,this,r,i),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}At(zr,"id","line"),At(zr,"defaults",{borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0}),At(zr,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"}),At(zr,"descriptors",{_scriptable:!0,_indexable:t=>t!=="borderDash"&&t!=="fill"});function Q0(n,t,e,r){const i=n.options,{[e]:s}=n.getProps([e],r);return Math.abs(t-s)<i.radius+i.hitRadius}class hl extends Gn{constructor(e){super();At(this,"parsed");At(this,"skip");At(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,r,i){const s=this.options,{x:a,y:l}=this.getProps(["x","y"],i);return Math.pow(e-a,2)+Math.pow(r-l,2)<Math.pow(s.hitRadius+s.radius,2)}inXRange(e,r){return Q0(this,e,"x",r)}inYRange(e,r){return Q0(this,e,"y",r)}getCenterPoint(e){const{x:r,y:i}=this.getProps(["x","y"],e);return{x:r,y:i}}size(e){e=e||this.options||{};let r=e.radius||0;r=Math.max(r,r&&e.hoverRadius||0);const i=r&&e.borderWidth||0;return(r+i)*2}draw(e,r){const i=this.options;this.skip||i.radius<.1||!Cr(this,r,this.size(i)/2)||(e.strokeStyle=i.borderColor,e.lineWidth=i.borderWidth,e.fillStyle=i.backgroundColor,th(e,i,this.x,this.y))}getRange(){const e=this.options||{};return e.radius+e.hitRadius}}At(hl,"id","point"),At(hl,"defaults",{borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0}),At(hl,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});function h_(n,t){const{x:e,y:r,base:i,width:s,height:a}=n.getProps(["x","y","base","width","height"],t);let l,c,h,f,g;return n.horizontal?(g=a/2,l=Math.min(e,i),c=Math.max(e,i),h=r-g,f=r+g):(g=s/2,l=e-g,c=e+g,h=Math.min(r,i),f=Math.max(r,i)),{left:l,top:h,right:c,bottom:f}}function Vr(n,t,e,r){return n?0:Ge(t,e,r)}function XL(n,t,e){const r=n.options.borderWidth,i=n.borderSkipped,s=Ub(r);return{t:Vr(i.top,s.top,0,e),r:Vr(i.right,s.right,0,t),b:Vr(i.bottom,s.bottom,0,e),l:Vr(i.left,s.left,0,t)}}function JL(n,t,e){const{enableBorderRadius:r}=n.getProps(["enableBorderRadius"]),i=n.options.borderRadius,s=mi(i),a=Math.min(t,e),l=n.borderSkipped,c=r||Jt(i);return{topLeft:Vr(!c||l.top||l.left,s.topLeft,0,a),topRight:Vr(!c||l.top||l.right,s.topRight,0,a),bottomLeft:Vr(!c||l.bottom||l.left,s.bottomLeft,0,a),bottomRight:Vr(!c||l.bottom||l.right,s.bottomRight,0,a)}}function ZL(n){const t=h_(n),e=t.right-t.left,r=t.bottom-t.top,i=XL(n,e/2,r/2),s=JL(n,e/2,r/2);return{outer:{x:t.left,y:t.top,w:e,h:r,radius:s},inner:{x:t.left+i.l,y:t.top+i.t,w:e-i.l-i.r,h:r-i.t-i.b,radius:{topLeft:Math.max(0,s.topLeft-Math.max(i.t,i.l)),topRight:Math.max(0,s.topRight-Math.max(i.t,i.r)),bottomLeft:Math.max(0,s.bottomLeft-Math.max(i.b,i.l)),bottomRight:Math.max(0,s.bottomRight-Math.max(i.b,i.r))}}}}function jf(n,t,e,r){const i=t===null,s=e===null,l=n&&!(i&&s)&&h_(n,r);return l&&(i||Rr(t,l.left,l.right))&&(s||Rr(e,l.top,l.bottom))}function QL(n){return n.topLeft||n.topRight||n.bottomLeft||n.bottomRight}function tT(n,t){n.rect(t.x,t.y,t.w,t.h)}function Uf(n,t,e={}){const r=n.x!==e.x?-t:0,i=n.y!==e.y?-t:0,s=(n.x+n.w!==e.x+e.w?t:0)-r,a=(n.y+n.h!==e.y+e.h?t:0)-i;return{x:n.x+r,y:n.y+i,w:n.w+s,h:n.h+a,radius:n.radius}}class dl extends Gn{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:r,backgroundColor:i}}=this,{inner:s,outer:a}=ZL(this),l=QL(a.radius)?to:tT;t.save(),(a.w!==s.w||a.h!==s.h)&&(t.beginPath(),l(t,Uf(a,e,s)),t.clip(),l(t,Uf(s,-e,a)),t.fillStyle=r,t.fill("evenodd")),t.beginPath(),l(t,Uf(s,e)),t.fillStyle=i,t.fill(),t.restore()}inRange(t,e,r){return jf(this,t,e,r)}inXRange(t,e){return jf(this,t,null,e)}inYRange(t,e){return jf(this,null,t,e)}getCenterPoint(t){const{x:e,y:r,base:i,horizontal:s}=this.getProps(["x","y","base","horizontal"],t);return{x:s?(e+i)/2:e,y:s?r:(r+i)/2}}getRange(t){return t==="x"?this.width/2:this.height/2}}At(dl,"id","bar"),At(dl,"defaults",{borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0}),At(dl,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});var eT=Object.freeze({__proto__:null,ArcElement:Is,BarElement:dl,LineElement:zr,PointElement:hl});const sh=["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)"],tv=sh.map(n=>n.replace("rgb(","rgba(").replace(")",", 0.5)"));function d_(n){return sh[n%sh.length]}function p_(n){return tv[n%tv.length]}function nT(n,t){return n.borderColor=d_(t),n.backgroundColor=p_(t),++t}function rT(n,t){return n.backgroundColor=n.data.map(()=>d_(t++)),t}function iT(n,t){return n.backgroundColor=n.data.map(()=>p_(t++)),t}function sT(n){let t=0;return(e,r)=>{const i=n.getDatasetMeta(r).controller;i instanceof gi?t=rT(e,t):i instanceof Vs?t=iT(e,t):i&&(t=nT(e,t))}}function ev(n){let t;for(t in n)if(n[t].borderColor||n[t].backgroundColor)return!0;return!1}function oT(n){return n&&(n.borderColor||n.backgroundColor)}function aT(){return Ae.borderColor!=="rgba(0,0,0,0.1)"||Ae.backgroundColor!=="rgba(0,0,0,0.1)"}var lT={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(n,t,e){if(!e.enabled)return;const{data:{datasets:r},options:i}=n.config,{elements:s}=i,a=ev(r)||oT(i)||s&&ev(s)||aT();if(!e.forceOverride&&a)return;const l=sT(n);r.forEach(l)}};function uT(n,t,e,r,i){const s=i.samples||r;if(s>=e)return n.slice(t,t+e);const a=[],l=(e-2)/(s-2);let c=0;const h=t+e-1;let f=t,g,d,m,p,v;for(a[c++]=n[f],g=0;g<s-2;g++){let b=0,_=0,A;const C=Math.floor((g+1)*l)+1+t,w=Math.min(Math.floor((g+2)*l)+1,e)+t,M=w-C;for(A=C;A<w;A++)b+=n[A].x,_+=n[A].y;b/=M,_/=M;const O=Math.floor(g*l)+1+t,L=Math.min(Math.floor((g+1)*l)+1,e)+t,{x:N,y:Y}=n[f];for(m=p=-1,A=O;A<L;A++)p=.5*Math.abs((N-b)*(n[A].y-Y)-(N-n[A].x)*(_-Y)),p>m&&(m=p,d=n[A],v=A);a[c++]=d,f=v}return a[c++]=n[h],a}function cT(n,t,e,r){let i=0,s=0,a,l,c,h,f,g,d,m,p,v;const b=[],_=t+e-1,A=n[t].x,w=n[_].x-A;for(a=t;a<t+e;++a){l=n[a],c=(l.x-A)/w*r,h=l.y;const M=c|0;if(M===f)h<p?(p=h,g=a):h>v&&(v=h,d=a),i=(s*i+l.x)/++s;else{const O=a-1;if(!Kt(g)&&!Kt(d)){const L=Math.min(g,d),N=Math.max(g,d);L!==m&&L!==O&&b.push({...n[L],x:i}),N!==m&&N!==O&&b.push({...n[N],x:i})}a>0&&O!==m&&b.push(n[O]),b.push(l),f=M,s=0,p=v=h,g=d=m=a}}return b}function g_(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 nv(n){n.data.datasets.forEach(t=>{g_(t)})}function fT(n,t){const e=t.length;let r=0,i;const{iScale:s}=n,{min:a,max:l,minDefined:c,maxDefined:h}=s.getUserBounds();return c&&(r=Ge(Mr(t,s.axis,a).lo,0,e-1)),h?i=Ge(Mr(t,s.axis,l).hi+1,r,e)-r:i=e-r,{start:r,count:i}}var hT={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(n,t,e)=>{if(!e.enabled){nv(n);return}const r=n.width;n.data.datasets.forEach((i,s)=>{const{_data:a,indexAxis:l}=i,c=n.getDatasetMeta(s),h=a||i.data;if(Ts([l,n.options.indexAxis])==="y"||!c.controller.supportsDecimation)return;const f=n.scales[c.xAxisID];if(f.type!=="linear"&&f.type!=="time"||n.options.parsing)return;let{start:g,count:d}=fT(c,h);const m=e.threshold||4*r;if(d<=m){g_(i);return}Kt(a)&&(i._data=h,delete i.data,Object.defineProperty(i,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(v){this._data=v}}));let p;switch(e.algorithm){case"lttb":p=uT(h,g,d,r,e);break;case"min-max":p=cT(h,g,d,r);break;default:throw new Error(`Unsupported decimation algorithm '${e.algorithm}'`)}i._decimated=p})},destroy(n){nv(n)}};function dT(n,t,e){const r=n.segments,i=n.points,s=t.points,a=[];for(const l of r){let{start:c,end:h}=l;h=Gh(c,h,i);const f=oh(e,i[c],i[h],l.loop);if(!t.segments){a.push({source:l,target:f,start:i[c],end:i[h]});continue}const g=Jb(t,f);for(const d of g){const m=oh(e,s[d.start],s[d.end],d.loop),p=Xb(l,i,m);for(const v of p)a.push({source:v,target:d,start:{[e]:rv(f,m,"start",Math.max)},end:{[e]:rv(f,m,"end",Math.min)}})}}return a}function oh(n,t,e,r){if(r)return;let i=t[n],s=e[n];return n==="angle"&&(i=An(i),s=An(s)),{property:n,start:i,end:s}}function pT(n,t){const{x:e=null,y:r=null}=n||{},i=t.points,s=[];return t.segments.forEach(({start:a,end:l})=>{l=Gh(a,l,i);const c=i[a],h=i[l];r!==null?(s.push({x:c.x,y:r}),s.push({x:h.x,y:r})):e!==null&&(s.push({x:e,y:c.y}),s.push({x:e,y:h.y}))}),s}function Gh(n,t,e){for(;t>n;t--){const r=e[t];if(!isNaN(r.x)&&!isNaN(r.y))break}return t}function rv(n,t,e,r){return n&&t?r(n[e],t[e]):n?n[e]:t?t[e]:0}function m_(n,t){let e=[],r=!1;return Ee(n)?(r=!0,e=n):e=pT(n,t),e.length?new zr({points:e,options:{tension:0},_loop:r,_fullLoop:r}):null}function iv(n){return n&&n.fill!==!1}function gT(n,t,e){let i=n[t].fill;const s=[t];let a;if(!e)return i;for(;i!==!1&&s.indexOf(i)===-1;){if(!Le(i))return i;if(a=n[i],!a)return!1;if(a.visible)return i;s.push(i),i=a.fill}return!1}function mT(n,t,e){const r=_T(n);if(Jt(r))return isNaN(r.value)?!1:r;let i=parseFloat(r);return Le(i)&&Math.floor(i)===i?yT(r[0],t,i,e):["origin","start","end","stack","shape"].indexOf(r)>=0&&r}function yT(n,t,e,r){return(n==="-"||n==="+")&&(e=t+e),e===t||e<0||e>=r?!1:e}function vT(n,t){let e=null;return n==="start"?e=t.bottom:n==="end"?e=t.top:Jt(n)?e=t.getPixelForValue(n.value):t.getBasePixel&&(e=t.getBasePixel()),e}function bT(n,t,e){let r;return n==="start"?r=e:n==="end"?r=t.options.reverse?t.min:t.max:Jt(n)?r=n.value:r=t.getBaseValue(),r}function _T(n){const t=n.options,e=t.fill;let r=Wt(e&&e.target,e);return r===void 0&&(r=!!t.backgroundColor),r===!1||r===null?!1:r===!0?"origin":r}function wT(n){const{scale:t,index:e,line:r}=n,i=[],s=r.segments,a=r.points,l=xT(t,e);l.push(m_({x:null,y:t.bottom},r));for(let c=0;c<s.length;c++){const h=s[c];for(let f=h.start;f<=h.end;f++)ST(i,a[f],l)}return new zr({points:i,options:{}})}function xT(n,t){const e=[],r=n.getMatchingVisibleMetas("line");for(let i=0;i<r.length;i++){const s=r[i];if(s.index===t)break;s.hidden||e.unshift(s.dataset)}return e}function ST(n,t,e){const r=[];for(let i=0;i<e.length;i++){const s=e[i],{first:a,last:l,point:c}=ET(s,t,"x");if(!(!c||a&&l)){if(a)r.unshift(c);else if(n.push(c),!l)break}}n.push(...r)}function ET(n,t,e){const r=n.interpolate(t,e);if(!r)return{};const i=r[e],s=n.segments,a=n.points;let l=!1,c=!1;for(let h=0;h<s.length;h++){const f=s[h],g=a[f.start][e],d=a[f.end][e];if(Rr(i,g,d)){l=i===g,c=i===d;break}}return{first:l,last:c,point:r}}class y_{constructor(t){this.x=t.x,this.y=t.y,this.radius=t.radius}pathSegment(t,e,r){const{x:i,y:s,radius:a}=this;return e=e||{start:0,end:be},t.arc(i,s,a,e.end,e.start,!0),!r.bounds}interpolate(t){const{x:e,y:r,radius:i}=this,s=t.angle;return{x:e+Math.cos(s)*i,y:r+Math.sin(s)*i,angle:s}}}function AT(n){const{chart:t,fill:e,line:r}=n;if(Le(e))return kT(t,e);if(e==="stack")return wT(n);if(e==="shape")return!0;const i=RT(n);return i instanceof y_?i:m_(i,r)}function kT(n,t){const e=n.getDatasetMeta(t);return e&&n.isDatasetVisible(t)?e.dataset:null}function RT(n){return(n.scale||{}).getPointPositionForValue?CT(n):MT(n)}function MT(n){const{scale:t={},fill:e}=n,r=vT(e,t);if(Le(r)){const i=t.isHorizontal();return{x:i?r:null,y:i?null:r}}return null}function CT(n){const{scale:t,fill:e}=n,r=t.options,i=t.getLabels().length,s=r.reverse?t.max:t.min,a=bT(e,t,s),l=[];if(r.grid.circular){const c=t.getPointPositionForValue(0,s);return new y_({x:c.x,y:c.y,radius:t.getDistanceFromCenterForValue(a)})}for(let c=0;c<i;++c)l.push(t.getPointPositionForValue(c,a));return l}function qf(n,t,e){const r=AT(t),{line:i,scale:s,axis:a}=t,l=i.options,c=l.fill,h=l.backgroundColor,{above:f=h,below:g=h}=c||{};r&&i.points.length&&(Tl(n,e),PT(n,{line:i,target:r,above:f,below:g,area:e,scale:s,axis:a}),Bl(n))}function PT(n,t){const{line:e,target:r,above:i,below:s,area:a,scale:l}=t,c=e._loop?"angle":t.axis;n.save(),c==="x"&&s!==i&&(sv(n,r,a.top),ov(n,{line:e,target:r,color:i,scale:l,property:c}),n.restore(),n.save(),sv(n,r,a.bottom)),ov(n,{line:e,target:r,color:s,scale:l,property:c}),n.restore()}function sv(n,t,e){const{segments:r,points:i}=t;let s=!0,a=!1;n.beginPath();for(const l of r){const{start:c,end:h}=l,f=i[c],g=i[Gh(c,h,i)];s?(n.moveTo(f.x,f.y),s=!1):(n.lineTo(f.x,e),n.lineTo(f.x,f.y)),a=!!t.pathSegment(n,l,{move:a}),a?n.closePath():n.lineTo(g.x,e)}n.lineTo(t.first().x,e),n.closePath(),n.clip()}function ov(n,t){const{line:e,target:r,property:i,color:s,scale:a}=t,l=dT(e,r,i);for(const{source:c,target:h,start:f,end:g}of l){const{style:{backgroundColor:d=s}={}}=c,m=r!==!0;n.save(),n.fillStyle=d,OT(n,a,m&&oh(i,f,g)),n.beginPath();const p=!!e.pathSegment(n,c);let v;if(m){p?n.closePath():av(n,r,g,i);const b=!!r.pathSegment(n,h,{move:p,reverse:!0});v=p&&b,v||av(n,r,f,i)}n.closePath(),n.fill(v?"evenodd":"nonzero"),n.restore()}}function OT(n,t,e){const{top:r,bottom:i}=t.chart.chartArea,{property:s,start:a,end:l}=e||{};s==="x"&&(n.beginPath(),n.rect(a,r,l-a,i-r),n.clip())}function av(n,t,e,r){const i=t.interpolate(e,r);i&&n.lineTo(i.x,i.y)}var LT={id:"filler",afterDatasetsUpdate(n,t,e){const r=(n.data.datasets||[]).length,i=[];let s,a,l,c;for(a=0;a<r;++a)s=n.getDatasetMeta(a),l=s.dataset,c=null,l&&l.options&&l instanceof zr&&(c={visible:n.isDatasetVisible(a),index:a,fill:mT(l,a,r),chart:n,axis:s.controller.options.indexAxis,scale:s.vScale,line:l}),s.$filler=c,i.push(c);for(a=0;a<r;++a)c=i[a],!(!c||c.fill===!1)&&(c.fill=gT(i,a,e.propagate))},beforeDraw(n,t,e){const r=e.drawTime==="beforeDraw",i=n.getSortedVisibleDatasetMetas(),s=n.chartArea;for(let a=i.length-1;a>=0;--a){const l=i[a].$filler;l&&(l.line.updateControlPoints(s,l.axis),r&&l.fill&&qf(n.ctx,l,s))}},beforeDatasetsDraw(n,t,e){if(e.drawTime!=="beforeDatasetsDraw")return;const r=n.getSortedVisibleDatasetMetas();for(let i=r.length-1;i>=0;--i){const s=r[i].$filler;iv(s)&&qf(n.ctx,s,n.chartArea)}},beforeDatasetDraw(n,t,e){const r=t.meta.$filler;!iv(r)||e.drawTime!=="beforeDatasetDraw"||qf(n.ctx,r,n.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const lv=(n,t)=>{let{boxHeight:e=t,boxWidth:r=t}=n;return n.usePointStyle&&(e=Math.min(e,t),r=n.pointStyleWidth||Math.min(r,t)),{boxWidth:r,boxHeight:e,itemHeight:Math.max(t,e)}},TT=(n,t)=>n!==null&&t!==null&&n.datasetIndex===t.datasetIndex&&n.index===t.index;class uv extends Gn{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,r){this.maxWidth=t,this.maxHeight=e,this._margins=r,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=me(t.generateLabels,[this.chart],this)||[];t.filter&&(e=e.filter(r=>t.filter(r,this.chart.data))),t.sort&&(e=e.sort((r,i)=>t.sort(r,i,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 r=t.labels,i=ze(r.font),s=i.size,a=this._computeTitleHeight(),{boxWidth:l,itemHeight:c}=lv(r,s);let h,f;e.font=i.string,this.isHorizontal()?(h=this.maxWidth,f=this._fitRows(a,s,l,c)+10):(f=this.maxHeight,h=this._fitCols(a,i,l,c)+10),this.width=Math.min(h,t.maxWidth||this.maxWidth),this.height=Math.min(f,t.maxHeight||this.maxHeight)}_fitRows(t,e,r,i){const{ctx:s,maxWidth:a,options:{labels:{padding:l}}}=this,c=this.legendHitBoxes=[],h=this.lineWidths=[0],f=i+l;let g=t;s.textAlign="left",s.textBaseline="middle";let d=-1,m=-f;return this.legendItems.forEach((p,v)=>{const b=r+e/2+s.measureText(p.text).width;(v===0||h[h.length-1]+b+2*l>a)&&(g+=f,h[h.length-(v>0?0:1)]=0,m+=f,d++),c[v]={left:0,top:m,row:d,width:b,height:i},h[h.length-1]+=b+l}),g}_fitCols(t,e,r,i){const{ctx:s,maxHeight:a,options:{labels:{padding:l}}}=this,c=this.legendHitBoxes=[],h=this.columnSizes=[],f=a-t;let g=l,d=0,m=0,p=0,v=0;return this.legendItems.forEach((b,_)=>{const{itemWidth:A,itemHeight:C}=BT(r,e,s,b,i);_>0&&m+C+2*l>f&&(g+=d+l,h.push({width:d,height:m}),p+=d+l,v++,d=m=0),c[_]={left:p,top:m,col:v,width:A,height:C},d=Math.max(d,A),m+=C+l}),g+=d,h.push({width:d,height:m}),g}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:e,options:{align:r,labels:{padding:i},rtl:s}}=this,a=Yi(s,this.left,this.width);if(this.isHorizontal()){let l=0,c=Qe(r,this.left+i,this.right-this.lineWidths[l]);for(const h of e)l!==h.row&&(l=h.row,c=Qe(r,this.left+i,this.right-this.lineWidths[l])),h.top+=this.top+t+i,h.left=a.leftForLtr(a.x(c),h.width),c+=h.width+i}else{let l=0,c=Qe(r,this.top+t+i,this.bottom-this.columnSizes[l].height);for(const h of e)h.col!==l&&(l=h.col,c=Qe(r,this.top+t+i,this.bottom-this.columnSizes[l].height)),h.top=c,h.left+=this.left+i,h.left=a.leftForLtr(a.x(h.left),h.width),c+=h.height+i}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const t=this.ctx;Tl(t,this),this._draw(),Bl(t)}}_draw(){const{options:t,columnSizes:e,lineWidths:r,ctx:i}=this,{align:s,labels:a}=t,l=Ae.color,c=Yi(t.rtl,this.left,this.width),h=ze(a.font),{padding:f}=a,g=h.size,d=g/2;let m;this.drawTitle(),i.textAlign=c.textAlign("left"),i.textBaseline="middle",i.lineWidth=.5,i.font=h.string;const{boxWidth:p,boxHeight:v,itemHeight:b}=lv(a,g),_=function(O,L,N){if(isNaN(p)||p<=0||isNaN(v)||v<0)return;i.save();const Y=Wt(N.lineWidth,1);if(i.fillStyle=Wt(N.fillStyle,l),i.lineCap=Wt(N.lineCap,"butt"),i.lineDashOffset=Wt(N.lineDashOffset,0),i.lineJoin=Wt(N.lineJoin,"miter"),i.lineWidth=Y,i.strokeStyle=Wt(N.strokeStyle,l),i.setLineDash(Wt(N.lineDash,[])),a.usePointStyle){const z={radius:v*Math.SQRT2/2,pointStyle:N.pointStyle,rotation:N.rotation,borderWidth:Y},G=c.xPlus(O,p/2),U=L+d;jb(i,z,G,U,a.pointStyleWidth&&p)}else{const z=L+Math.max((g-v)/2,0),G=c.leftForLtr(O,p),U=mi(N.borderRadius);i.beginPath(),Object.values(U).some(xt=>xt!==0)?to(i,{x:G,y:z,w:p,h:v,radius:U}):i.rect(G,z,p,v),i.fill(),Y!==0&&i.stroke()}i.restore()},A=function(O,L,N){bi(i,N.text,O,L+b/2,h,{strikethrough:N.hidden,textAlign:c.textAlign(N.textAlign)})},C=this.isHorizontal(),w=this._computeTitleHeight();C?m={x:Qe(s,this.left+f,this.right-r[0]),y:this.top+f+w,line:0}:m={x:this.left+f,y:Qe(s,this.top+w+f,this.bottom-e[0].height),line:0},Gb(this.ctx,t.textDirection);const M=b+f;this.legendItems.forEach((O,L)=>{i.strokeStyle=O.fontColor,i.fillStyle=O.fontColor;const N=i.measureText(O.text).width,Y=c.textAlign(O.textAlign||(O.textAlign=a.textAlign)),z=p+d+N;let G=m.x,U=m.y;c.setWidth(this.width),C?L>0&&G+z+f>this.right&&(U=m.y+=M,m.line++,G=m.x=Qe(s,this.left+f,this.right-r[m.line])):L>0&&U+M>this.bottom&&(G=m.x=G+e[m.line].width+f,m.line++,U=m.y=Qe(s,this.top+w+f,this.bottom-e[m.line].height));const xt=c.x(G);if(_(xt,U,O),G=tP(Y,G+p+d,C?G+z:this.right,t.rtl),A(c.x(G),U,O),C)m.x+=z+f;else if(typeof O.text!="string"){const dt=h.lineHeight;m.y+=v_(O,dt)+f}else m.y+=M}),Yb(this.ctx,t.textDirection)}drawTitle(){const t=this.options,e=t.title,r=ze(e.font),i=en(e.padding);if(!e.display)return;const s=Yi(t.rtl,this.left,this.width),a=this.ctx,l=e.position,c=r.size/2,h=i.top+c;let f,g=this.left,d=this.width;if(this.isHorizontal())d=Math.max(...this.lineWidths),f=this.top+h,g=Qe(t.align,g,this.right-d);else{const p=this.columnSizes.reduce((v,b)=>Math.max(v,b.height),0);f=h+Qe(t.align,this.top,this.bottom-p-t.labels.padding-this._computeTitleHeight())}const m=Qe(l,g,g+d);a.textAlign=s.textAlign(Nh(l)),a.textBaseline="middle",a.strokeStyle=e.color,a.fillStyle=e.color,a.font=r.string,bi(a,e.text,m,f,r)}_computeTitleHeight(){const t=this.options.title,e=ze(t.font),r=en(t.padding);return t.display?e.lineHeight+r.height:0}_getLegendItemAt(t,e){let r,i,s;if(Rr(t,this.left,this.right)&&Rr(e,this.top,this.bottom)){for(s=this.legendHitBoxes,r=0;r<s.length;++r)if(i=s[r],Rr(t,i.left,i.left+i.width)&&Rr(e,i.top,i.top+i.height))return this.legendItems[r]}return null}handleEvent(t){const e=this.options;if(!FT(t.type,e))return;const r=this._getLegendItemAt(t.x,t.y);if(t.type==="mousemove"||t.type==="mouseout"){const i=this._hoveredItem,s=TT(i,r);i&&!s&&me(e.onLeave,[t,i,this],this),this._hoveredItem=r,r&&!s&&me(e.onHover,[t,r,this],this)}else r&&me(e.onClick,[t,r,this],this)}}function BT(n,t,e,r,i){const s=IT(r,n,t,e),a=DT(i,r,t.lineHeight);return{itemWidth:s,itemHeight:a}}function IT(n,t,e,r){let i=n.text;return i&&typeof i!="string"&&(i=i.reduce((s,a)=>s.length>a.length?s:a)),t+e.size/2+r.measureText(i).width}function DT(n,t,e){let r=n;return typeof t.text!="string"&&(r=v_(t,e)),r}function v_(n,t){const e=n.text?n.text.length:0;return t*e}function FT(n,t){return!!((n==="mousemove"||n==="mouseout")&&(t.onHover||t.onLeave)||t.onClick&&(n==="click"||n==="mouseup"))}var NT={id:"legend",_element:uv,start(n,t,e){const r=n.legend=new uv({ctx:n.ctx,options:e,chart:n});tn.configure(n,r,e),tn.addBox(n,r)},stop(n){tn.removeBox(n,n.legend),delete n.legend},beforeUpdate(n,t,e){const r=n.legend;tn.configure(n,r,e),r.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 r=t.datasetIndex,i=e.chart;i.isDatasetVisible(r)?(i.hide(r),t.hidden=!0):(i.show(r),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:r,textAlign:i,color:s,useBorderRadius:a,borderRadius:l}}=n.legend.options;return n._getSortedDatasetMetas().map(c=>{const h=c.controller.getStyle(e?0:void 0),f=en(h.borderWidth);return{text:t[c.index].label,fillStyle:h.backgroundColor,fontColor:s,hidden:!c.visible,lineCap:h.borderCapStyle,lineDash:h.borderDash,lineDashOffset:h.borderDashOffset,lineJoin:h.borderJoinStyle,lineWidth:(f.width+f.height)/4,strokeStyle:h.borderColor,pointStyle:r||h.pointStyle,rotation:h.rotation,textAlign:i||h.textAlign,borderRadius:a&&(l||h.borderRadius),datasetIndex:c.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 Yh extends Gn{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 r=this.options;if(this.left=0,this.top=0,!r.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=t,this.height=this.bottom=e;const i=Ee(r.text)?r.text.length:1;this._padding=en(r.padding);const s=i*ze(r.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=s:this.width=s}isHorizontal(){const t=this.options.position;return t==="top"||t==="bottom"}_drawArgs(t){const{top:e,left:r,bottom:i,right:s,options:a}=this,l=a.align;let c=0,h,f,g;return this.isHorizontal()?(f=Qe(l,r,s),g=e+t,h=s-r):(a.position==="left"?(f=r+t,g=Qe(l,i,e),c=_e*-.5):(f=s-t,g=Qe(l,e,i),c=_e*.5),h=i-e),{titleX:f,titleY:g,maxWidth:h,rotation:c}}draw(){const t=this.ctx,e=this.options;if(!e.display)return;const r=ze(e.font),s=r.lineHeight/2+this._padding.top,{titleX:a,titleY:l,maxWidth:c,rotation:h}=this._drawArgs(s);bi(t,e.text,0,0,r,{color:e.color,maxWidth:c,rotation:h,textAlign:Nh(e.align),textBaseline:"middle",translation:[a,l]})}}function jT(n,t){const e=new Yh({ctx:n.ctx,options:t,chart:n});tn.configure(n,e,t),tn.addBox(n,e),n.titleBlock=e}var UT={id:"title",_element:Yh,start(n,t,e){jT(n,e)},stop(n){const t=n.titleBlock;tn.removeBox(n,t),delete n.titleBlock},beforeUpdate(n,t,e){const r=n.titleBlock;tn.configure(n,r,e),r.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 Xa=new WeakMap;var qT={id:"subtitle",start(n,t,e){const r=new Yh({ctx:n.ctx,options:e,chart:n});tn.configure(n,r,e),tn.addBox(n,r),Xa.set(n,r)},stop(n){tn.removeBox(n,Xa.get(n)),Xa.delete(n)},beforeUpdate(n,t,e){const r=Xa.get(n);tn.configure(n,r,e),r.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 Ds={average(n){if(!n.length)return!1;let t,e,r=new Set,i=0,s=0;for(t=0,e=n.length;t<e;++t){const l=n[t].element;if(l&&l.hasValue()){const c=l.tooltipPosition();r.add(c.x),i+=c.y,++s}}return s===0||r.size===0?!1:{x:[...r].reduce((l,c)=>l+c)/r.size,y:i/s}},nearest(n,t){if(!n.length)return!1;let e=t.x,r=t.y,i=Number.POSITIVE_INFINITY,s,a,l;for(s=0,a=n.length;s<a;++s){const c=n[s].element;if(c&&c.hasValue()){const h=c.getCenterPoint(),f=Zf(t,h);f<i&&(i=f,l=c)}}if(l){const c=l.tooltipPosition();e=c.x,r=c.y}return{x:e,y:r}}};function tr(n,t){return t&&(Ee(t)?Array.prototype.push.apply(n,t):n.push(t)),n}function wr(n){return(typeof n=="string"||n instanceof String)&&n.indexOf(`
457
+ `)>-1?n.split(`
458
+ `):n}function WT(n,t){const{element:e,datasetIndex:r,index:i}=t,s=n.getDatasetMeta(r).controller,{label:a,value:l}=s.getLabelAndValue(i);return{chart:n,label:a,parsed:s.getParsed(i),raw:n.data.datasets[r].data[i],formattedValue:l,dataset:s.getDataset(),dataIndex:i,datasetIndex:r,element:e}}function cv(n,t){const e=n.chart.ctx,{body:r,footer:i,title:s}=n,{boxWidth:a,boxHeight:l}=t,c=ze(t.bodyFont),h=ze(t.titleFont),f=ze(t.footerFont),g=s.length,d=i.length,m=r.length,p=en(t.padding);let v=p.height,b=0,_=r.reduce((w,M)=>w+M.before.length+M.lines.length+M.after.length,0);if(_+=n.beforeBody.length+n.afterBody.length,g&&(v+=g*h.lineHeight+(g-1)*t.titleSpacing+t.titleMarginBottom),_){const w=t.displayColors?Math.max(l,c.lineHeight):c.lineHeight;v+=m*w+(_-m)*c.lineHeight+(_-1)*t.bodySpacing}d&&(v+=t.footerMarginTop+d*f.lineHeight+(d-1)*t.footerSpacing);let A=0;const C=function(w){b=Math.max(b,e.measureText(w).width+A)};return e.save(),e.font=h.string,le(n.title,C),e.font=c.string,le(n.beforeBody.concat(n.afterBody),C),A=t.displayColors?a+2+t.boxPadding:0,le(r,w=>{le(w.before,C),le(w.lines,C),le(w.after,C)}),A=0,e.font=f.string,le(n.footer,C),e.restore(),b+=p.width,{width:b,height:v}}function HT(n,t){const{y:e,height:r}=t;return e<r/2?"top":e>n.height-r/2?"bottom":"center"}function zT(n,t,e,r){const{x:i,width:s}=r,a=e.caretSize+e.caretPadding;if(n==="left"&&i+s+a>t.width||n==="right"&&i-s-a<0)return!0}function VT(n,t,e,r){const{x:i,width:s}=e,{width:a,chartArea:{left:l,right:c}}=n;let h="center";return r==="center"?h=i<=(l+c)/2?"left":"right":i<=s/2?h="left":i>=a-s/2&&(h="right"),zT(h,n,t,e)&&(h="center"),h}function fv(n,t,e){const r=e.yAlign||t.yAlign||HT(n,e);return{xAlign:e.xAlign||t.xAlign||VT(n,t,e,r),yAlign:r}}function $T(n,t){let{x:e,width:r}=n;return t==="right"?e-=r:t==="center"&&(e-=r/2),e}function GT(n,t,e){let{y:r,height:i}=n;return t==="top"?r+=e:t==="bottom"?r-=i+e:r-=i/2,r}function hv(n,t,e,r){const{caretSize:i,caretPadding:s,cornerRadius:a}=n,{xAlign:l,yAlign:c}=e,h=i+s,{topLeft:f,topRight:g,bottomLeft:d,bottomRight:m}=mi(a);let p=$T(t,l);const v=GT(t,c,h);return c==="center"?l==="left"?p+=h:l==="right"&&(p-=h):l==="left"?p-=Math.max(f,d)+i:l==="right"&&(p+=Math.max(g,m)+i),{x:Ge(p,0,r.width-t.width),y:Ge(v,0,r.height-t.height)}}function Ja(n,t,e){const r=en(e.padding);return t==="center"?n.x+n.width/2:t==="right"?n.x+n.width-r.right:n.x+r.left}function dv(n){return tr([],wr(n))}function YT(n,t,e){return Xr(n,{tooltip:t,tooltipItems:e,type:"tooltip"})}function pv(n,t){const e=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return e?n.override(e):n}const b_={beforeTitle:br,title(n){if(n.length>0){const t=n[0],e=t.chart.data.labels,r=e?e.length:0;if(this&&this.options&&this.options.mode==="dataset")return t.dataset.label||"";if(t.label)return t.label;if(r>0&&t.dataIndex<r)return e[t.dataIndex]}return""},afterTitle:br,beforeBody:br,beforeLabel:br,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 Kt(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:br,afterBody:br,beforeFooter:br,footer:br,afterFooter:br};function hn(n,t,e,r){const i=n[t].call(e,r);return typeof i>"u"?b_[t].call(e,r):i}class ah extends Gn{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,r=this.options.setContext(this.getContext()),i=r.enabled&&e.options.animation&&r.animations,s=new Zb(this.chart,i);return i._cacheable&&(this._cachedAnimations=Object.freeze(s)),s}getContext(){return this.$context||(this.$context=YT(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,e){const{callbacks:r}=e,i=hn(r,"beforeTitle",this,t),s=hn(r,"title",this,t),a=hn(r,"afterTitle",this,t);let l=[];return l=tr(l,wr(i)),l=tr(l,wr(s)),l=tr(l,wr(a)),l}getBeforeBody(t,e){return dv(hn(e.callbacks,"beforeBody",this,t))}getBody(t,e){const{callbacks:r}=e,i=[];return le(t,s=>{const a={before:[],lines:[],after:[]},l=pv(r,s);tr(a.before,wr(hn(l,"beforeLabel",this,s))),tr(a.lines,hn(l,"label",this,s)),tr(a.after,wr(hn(l,"afterLabel",this,s))),i.push(a)}),i}getAfterBody(t,e){return dv(hn(e.callbacks,"afterBody",this,t))}getFooter(t,e){const{callbacks:r}=e,i=hn(r,"beforeFooter",this,t),s=hn(r,"footer",this,t),a=hn(r,"afterFooter",this,t);let l=[];return l=tr(l,wr(i)),l=tr(l,wr(s)),l=tr(l,wr(a)),l}_createItems(t){const e=this._active,r=this.chart.data,i=[],s=[],a=[];let l=[],c,h;for(c=0,h=e.length;c<h;++c)l.push(WT(this.chart,e[c]));return t.filter&&(l=l.filter((f,g,d)=>t.filter(f,g,d,r))),t.itemSort&&(l=l.sort((f,g)=>t.itemSort(f,g,r))),le(l,f=>{const g=pv(t.callbacks,f);i.push(hn(g,"labelColor",this,f)),s.push(hn(g,"labelPointStyle",this,f)),a.push(hn(g,"labelTextColor",this,f))}),this.labelColors=i,this.labelPointStyles=s,this.labelTextColors=a,this.dataPoints=l,l}update(t,e){const r=this.options.setContext(this.getContext()),i=this._active;let s,a=[];if(!i.length)this.opacity!==0&&(s={opacity:0});else{const l=Ds[r.position].call(this,i,this._eventPosition);a=this._createItems(r),this.title=this.getTitle(a,r),this.beforeBody=this.getBeforeBody(a,r),this.body=this.getBody(a,r),this.afterBody=this.getAfterBody(a,r),this.footer=this.getFooter(a,r);const c=this._size=cv(this,r),h=Object.assign({},l,c),f=fv(this.chart,r,h),g=hv(r,h,f,this.chart);this.xAlign=f.xAlign,this.yAlign=f.yAlign,s={opacity:1,x:g.x,y:g.y,width:c.width,height:c.height,caretX:l.x,caretY:l.y}}this._tooltipItems=a,this.$context=void 0,s&&this._resolveAnimations().update(this,s),t&&r.external&&r.external.call(this,{chart:this.chart,tooltip:this,replay:e})}drawCaret(t,e,r,i){const s=this.getCaretPosition(t,r,i);e.lineTo(s.x1,s.y1),e.lineTo(s.x2,s.y2),e.lineTo(s.x3,s.y3)}getCaretPosition(t,e,r){const{xAlign:i,yAlign:s}=this,{caretSize:a,cornerRadius:l}=r,{topLeft:c,topRight:h,bottomLeft:f,bottomRight:g}=mi(l),{x:d,y:m}=t,{width:p,height:v}=e;let b,_,A,C,w,M;return s==="center"?(w=m+v/2,i==="left"?(b=d,_=b-a,C=w+a,M=w-a):(b=d+p,_=b+a,C=w-a,M=w+a),A=b):(i==="left"?_=d+Math.max(c,f)+a:i==="right"?_=d+p-Math.max(h,g)-a:_=this.caretX,s==="top"?(C=m,w=C-a,b=_-a,A=_+a):(C=m+v,w=C+a,b=_+a,A=_-a),M=C),{x1:b,x2:_,x3:A,y1:C,y2:w,y3:M}}drawTitle(t,e,r){const i=this.title,s=i.length;let a,l,c;if(s){const h=Yi(r.rtl,this.x,this.width);for(t.x=Ja(this,r.titleAlign,r),e.textAlign=h.textAlign(r.titleAlign),e.textBaseline="middle",a=ze(r.titleFont),l=r.titleSpacing,e.fillStyle=r.titleColor,e.font=a.string,c=0;c<s;++c)e.fillText(i[c],h.x(t.x),t.y+a.lineHeight/2),t.y+=a.lineHeight+l,c+1===s&&(t.y+=r.titleMarginBottom-l)}}_drawColorBox(t,e,r,i,s){const a=this.labelColors[r],l=this.labelPointStyles[r],{boxHeight:c,boxWidth:h}=s,f=ze(s.bodyFont),g=Ja(this,"left",s),d=i.x(g),m=c<f.lineHeight?(f.lineHeight-c)/2:0,p=e.y+m;if(s.usePointStyle){const v={radius:Math.min(h,c)/2,pointStyle:l.pointStyle,rotation:l.rotation,borderWidth:1},b=i.leftForLtr(d,h)+h/2,_=p+c/2;t.strokeStyle=s.multiKeyBackground,t.fillStyle=s.multiKeyBackground,th(t,v,b,_),t.strokeStyle=a.borderColor,t.fillStyle=a.backgroundColor,th(t,v,b,_)}else{t.lineWidth=Jt(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 v=i.leftForLtr(d,h),b=i.leftForLtr(i.xPlus(d,1),h-2),_=mi(a.borderRadius);Object.values(_).some(A=>A!==0)?(t.beginPath(),t.fillStyle=s.multiKeyBackground,to(t,{x:v,y:p,w:h,h:c,radius:_}),t.fill(),t.stroke(),t.fillStyle=a.backgroundColor,t.beginPath(),to(t,{x:b,y:p+1,w:h-2,h:c-2,radius:_}),t.fill()):(t.fillStyle=s.multiKeyBackground,t.fillRect(v,p,h,c),t.strokeRect(v,p,h,c),t.fillStyle=a.backgroundColor,t.fillRect(b,p+1,h-2,c-2))}t.fillStyle=this.labelTextColors[r]}drawBody(t,e,r){const{body:i}=this,{bodySpacing:s,bodyAlign:a,displayColors:l,boxHeight:c,boxWidth:h,boxPadding:f}=r,g=ze(r.bodyFont);let d=g.lineHeight,m=0;const p=Yi(r.rtl,this.x,this.width),v=function(N){e.fillText(N,p.x(t.x+m),t.y+d/2),t.y+=d+s},b=p.textAlign(a);let _,A,C,w,M,O,L;for(e.textAlign=a,e.textBaseline="middle",e.font=g.string,t.x=Ja(this,b,r),e.fillStyle=r.bodyColor,le(this.beforeBody,v),m=l&&b!=="right"?a==="center"?h/2+f:h+2+f:0,w=0,O=i.length;w<O;++w){for(_=i[w],A=this.labelTextColors[w],e.fillStyle=A,le(_.before,v),C=_.lines,l&&C.length&&(this._drawColorBox(e,t,w,p,r),d=Math.max(g.lineHeight,c)),M=0,L=C.length;M<L;++M)v(C[M]),d=g.lineHeight;le(_.after,v)}m=0,d=g.lineHeight,le(this.afterBody,v),t.y-=s}drawFooter(t,e,r){const i=this.footer,s=i.length;let a,l;if(s){const c=Yi(r.rtl,this.x,this.width);for(t.x=Ja(this,r.footerAlign,r),t.y+=r.footerMarginTop,e.textAlign=c.textAlign(r.footerAlign),e.textBaseline="middle",a=ze(r.footerFont),e.fillStyle=r.footerColor,e.font=a.string,l=0;l<s;++l)e.fillText(i[l],c.x(t.x),t.y+a.lineHeight/2),t.y+=a.lineHeight+r.footerSpacing}}drawBackground(t,e,r,i){const{xAlign:s,yAlign:a}=this,{x:l,y:c}=t,{width:h,height:f}=r,{topLeft:g,topRight:d,bottomLeft:m,bottomRight:p}=mi(i.cornerRadius);e.fillStyle=i.backgroundColor,e.strokeStyle=i.borderColor,e.lineWidth=i.borderWidth,e.beginPath(),e.moveTo(l+g,c),a==="top"&&this.drawCaret(t,e,r,i),e.lineTo(l+h-d,c),e.quadraticCurveTo(l+h,c,l+h,c+d),a==="center"&&s==="right"&&this.drawCaret(t,e,r,i),e.lineTo(l+h,c+f-p),e.quadraticCurveTo(l+h,c+f,l+h-p,c+f),a==="bottom"&&this.drawCaret(t,e,r,i),e.lineTo(l+m,c+f),e.quadraticCurveTo(l,c+f,l,c+f-m),a==="center"&&s==="left"&&this.drawCaret(t,e,r,i),e.lineTo(l,c+g),e.quadraticCurveTo(l,c,l+g,c),e.closePath(),e.fill(),i.borderWidth>0&&e.stroke()}_updateAnimationTarget(t){const e=this.chart,r=this.$animations,i=r&&r.x,s=r&&r.y;if(i||s){const a=Ds[t.position].call(this,this._active,this._eventPosition);if(!a)return;const l=this._size=cv(this,t),c=Object.assign({},a,this._size),h=fv(e,t,c),f=hv(t,c,h,e);(i._to!==f.x||s._to!==f.y)&&(this.xAlign=h.xAlign,this.yAlign=h.yAlign,this.width=l.width,this.height=l.height,this.caretX=a.x,this.caretY=a.y,this._resolveAnimations().update(this,f))}}_willRender(){return!!this.opacity}draw(t){const e=this.options.setContext(this.getContext());let r=this.opacity;if(!r)return;this._updateAnimationTarget(e);const i={width:this.width,height:this.height},s={x:this.x,y:this.y};r=Math.abs(r)<.001?0:r;const a=en(e.padding),l=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;e.enabled&&l&&(t.save(),t.globalAlpha=r,this.drawBackground(s,t,i,e),Gb(t,e.textDirection),s.y+=a.top,this.drawTitle(s,t,e),this.drawBody(s,t,e),this.drawFooter(s,t,e),Yb(t,e.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,e){const r=this._active,i=t.map(({datasetIndex:l,index:c})=>{const h=this.chart.getDatasetMeta(l);if(!h)throw new Error("Cannot find a dataset at index "+l);return{datasetIndex:l,element:h.data[c],index:c}}),s=!gl(r,i),a=this._positionChanged(i,e);(s||a)&&(this._active=i,this._eventPosition=e,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,e,r=!0){if(e&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const i=this.options,s=this._active||[],a=this._getActiveElements(t,s,e,r),l=this._positionChanged(a,t),c=e||!gl(a,s)||l;return c&&(this._active=a,(i.enabled||i.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,e))),c}_getActiveElements(t,e,r,i){const s=this.options;if(t.type==="mouseout")return[];if(!i)return e.filter(l=>this.chart.data.datasets[l.datasetIndex]&&this.chart.getDatasetMeta(l.datasetIndex).controller.getParsed(l.index)!==void 0);const a=this.chart.getElementsAtEventForMode(t,s.mode,s,r);return s.reverse&&a.reverse(),a}_positionChanged(t,e){const{caretX:r,caretY:i,options:s}=this,a=Ds[s.position].call(this,t,e);return a!==!1&&(r!==a.x||i!==a.y)}}At(ah,"positioners",Ds);var KT={id:"tooltip",_element:ah,positioners:Ds,afterInit(n,t,e){e&&(n.tooltip=new ah({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:b_},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"]},XT=Object.freeze({__proto__:null,Colors:lT,Decimation:hT,Filler:LT,Legend:NT,SubTitle:qT,Title:UT,Tooltip:KT});const JT=(n,t,e,r)=>(typeof t=="string"?(e=n.push(t)-1,r.unshift({index:e,label:t})):isNaN(t)&&(e=null),e);function ZT(n,t,e,r){const i=n.indexOf(t);if(i===-1)return JT(n,t,e,r);const s=n.lastIndexOf(t);return i!==s?e:i}const QT=(n,t)=>n===null?null:Ge(Math.round(n),0,t);function gv(n){const t=this.getLabels();return n>=0&&n<t.length?t[n]:n}class lh extends xi{constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const e=this._addedLabels;if(e.length){const r=this.getLabels();for(const{index:i,label:s}of e)r[i]===s&&r.splice(i,1);this._addedLabels=[]}super.init(t)}parse(t,e){if(Kt(t))return null;const r=this.getLabels();return e=isFinite(e)&&r[e]===t?e:ZT(r,t,Wt(e,t),this._addedLabels),QT(e,r.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let{min:r,max:i}=this.getMinMax(!0);this.options.bounds==="ticks"&&(t||(r=0),e||(i=this.getLabels().length-1)),this.min=r,this.max=i}buildTicks(){const t=this.min,e=this.max,r=this.options.offset,i=[];let s=this.getLabels();s=t===0&&e===s.length-1?s:s.slice(t,e+1),this._valueRange=Math.max(s.length-(r?0:1),1),this._startValue=this.min-(r?.5:0);for(let a=t;a<=e;a++)i.push({value:a});return i}getLabelForValue(t){return gv.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}}At(lh,"id","category"),At(lh,"defaults",{ticks:{callback:gv}});function t3(n,t){const e=[],{bounds:i,step:s,min:a,max:l,precision:c,count:h,maxTicks:f,maxDigits:g,includeBounds:d}=n,m=s||1,p=f-1,{min:v,max:b}=t,_=!Kt(a),A=!Kt(l),C=!Kt(h),w=(b-v)/(g+1);let M=c0((b-v)/p/m)*m,O,L,N,Y;if(M<1e-14&&!_&&!A)return[{value:v},{value:b}];Y=Math.ceil(b/M)-Math.floor(v/M),Y>p&&(M=c0(Y*M/p/m)*m),Kt(c)||(O=Math.pow(10,c),M=Math.ceil(M*O)/O),i==="ticks"?(L=Math.floor(v/M)*M,N=Math.ceil(b/M)*M):(L=v,N=b),_&&A&&s&&GC((l-a)/s,M/1e3)?(Y=Math.round(Math.min((l-a)/M,f)),M=(l-a)/Y,L=a,N=l):C?(L=_?a:L,N=A?l:N,Y=h-1,M=(N-L)/Y):(Y=(N-L)/M,Ws(Y,Math.round(Y),M/1e3)?Y=Math.round(Y):Y=Math.ceil(Y));const z=Math.max(f0(M),f0(L));O=Math.pow(10,Kt(c)?z:c),L=Math.round(L*O)/O,N=Math.round(N*O)/O;let G=0;for(_&&(d&&L!==a?(e.push({value:a}),L<a&&G++,Ws(Math.round((L+G*M)*O)/O,a,mv(a,w,n))&&G++):L<a&&G++);G<Y;++G){const U=Math.round((L+G*M)*O)/O;if(A&&U>l)break;e.push({value:U})}return A&&d&&N!==l?e.length&&Ws(e[e.length-1].value,l,mv(l,w,n))?e[e.length-1].value=l:e.push({value:l}):(!A||N===l)&&e.push({value:N}),e}function mv(n,t,{horizontal:e,minRotation:r}){const i=Vn(r),s=(e?Math.sin(i):Math.cos(i))||.001,a=.75*t*(""+n).length;return Math.min(t/s,a)}class xl extends xi{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 Kt(t)||(typeof t=="number"||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:e,maxDefined:r}=this.getUserBounds();let{min:i,max:s}=this;const a=c=>i=e?i:c,l=c=>s=r?s:c;if(t){const c=ar(i),h=ar(s);c<0&&h<0?l(0):c>0&&h>0&&a(0)}if(i===s){let c=s===0?1:Math.abs(s*.05);l(s+c),t||a(i-c)}this.min=i,this.max=s}getTickLimit(){const t=this.options.ticks;let{maxTicksLimit:e,stepSize:r}=t,i;return r?(i=Math.ceil(this.max/r)-Math.floor(this.min/r)+1,i>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${r} would result generating up to ${i} ticks. Limiting to 1000.`),i=1e3)):(i=this.computeTickLimit(),e=e||11),e&&(i=Math.min(e,i)),i}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,e=t.ticks;let r=this.getTickLimit();r=Math.max(2,r);const i={maxTicks:r,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},s=this._range||this,a=t3(i,s);return t.bounds==="ticks"&&Pb(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,r=this.max;if(super.configure(),this.options.offset&&t.length){const i=(r-e)/Math.max(t.length-1,1)/2;e-=i,r+=i}this._startValue=e,this._endValue=r,this._valueRange=r-e}getLabelForValue(t){return fo(t,this.chart.options.locale,this.options.ticks.format)}}class uh extends xl{determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=Le(t)?t:0,this.max=Le(e)?e:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),e=t?this.width:this.height,r=Vn(this.options.ticks.minRotation),i=(t?Math.sin(r):Math.cos(r))||.001,s=this._resolveTickFontOptions(0);return Math.ceil(e/Math.min(40,s.lineHeight/i))}getPixelForValue(t){return t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}At(uh,"id","linear"),At(uh,"defaults",{ticks:{callback:Ll.formatters.numeric}});const no=n=>Math.floor(Hr(n)),ci=(n,t)=>Math.pow(10,no(n)+t);function yv(n){return n/Math.pow(10,no(n))===1}function vv(n,t,e){const r=Math.pow(10,e),i=Math.floor(n/r);return Math.ceil(t/r)-i}function e3(n,t){const e=t-n;let r=no(e);for(;vv(n,t,r)>10;)r++;for(;vv(n,t,r)<10;)r--;return Math.min(r,no(n))}function n3(n,{min:t,max:e}){t=En(n.min,t);const r=[],i=no(t);let s=e3(t,e),a=s<0?Math.pow(10,Math.abs(s)):1;const l=Math.pow(10,s),c=i>s?Math.pow(10,i):0,h=Math.round((t-c)*a)/a,f=Math.floor((t-c)/l/10)*l*10;let g=Math.floor((h-f)/Math.pow(10,s)),d=En(n.min,Math.round((c+f+g*Math.pow(10,s))*a)/a);for(;d<e;)r.push({value:d,major:yv(d),significand:g}),g>=10?g=g<15?15:20:g++,g>=20&&(s++,g=2,a=s>=0?1:a),d=Math.round((c+f+g*Math.pow(10,s))*a)/a;const m=En(n.max,d);return r.push({value:m,major:yv(m),significand:g}),r}class ch extends xi{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,e){const r=xl.prototype.parse.apply(this,[t,e]);if(r===0){this._zero=!0;return}return Le(r)&&r>0?r:null}determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=Le(t)?Math.max(0,t):null,this.max=Le(e)?Math.max(0,e):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!Le(this._userMin)&&(this.min=t===ci(this.min,0)?ci(this.min,-1):ci(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let r=this.min,i=this.max;const s=l=>r=t?r:l,a=l=>i=e?i:l;r===i&&(r<=0?(s(1),a(10)):(s(ci(r,-1)),a(ci(i,1)))),r<=0&&s(ci(i,-1)),i<=0&&a(ci(r,1)),this.min=r,this.max=i}buildTicks(){const t=this.options,e={min:this._userMin,max:this._userMax},r=n3(e,this);return t.bounds==="ticks"&&Pb(r,this,"value"),t.reverse?(r.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),r}getLabelForValue(t){return t===void 0?"0":fo(t,this.chart.options.locale,this.options.ticks.format)}configure(){const t=this.min;super.configure(),this._startValue=Hr(t),this._valueRange=Hr(this.max)-Hr(t)}getPixelForValue(t){return(t===void 0||t===0)&&(t=this.min),t===null||isNaN(t)?NaN:this.getPixelForDecimal(t===this.min?0:(Hr(t)-this._startValue)/this._valueRange)}getValueForPixel(t){const e=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+e*this._valueRange)}}At(ch,"id","logarithmic"),At(ch,"defaults",{ticks:{callback:Ll.formatters.logarithmic,major:{enabled:!0}}});function fh(n){const t=n.ticks;if(t.display&&n.display){const e=en(t.backdropPadding);return Wt(t.font&&t.font.size,Ae.font.size)+e.height}return 0}function r3(n,t,e){return e=Ee(e)?e:[e],{w:cP(n,t.string,e),h:e.length*t.lineHeight}}function bv(n,t,e,r,i){return n===r||n===i?{start:t-e/2,end:t+e/2}:n<r||n>i?{start:t-e,end:t}:{start:t,end:t+e}}function i3(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),r=[],i=[],s=n._pointLabels.length,a=n.options.pointLabels,l=a.centerPointLabels?_e/s:0;for(let c=0;c<s;c++){const h=a.setContext(n.getPointLabelContext(c));i[c]=h.padding;const f=n.getPointPosition(c,n.drawingArea+i[c],l),g=ze(h.font),d=r3(n.ctx,g,n._pointLabels[c]);r[c]=d;const m=An(n.getIndexAngle(c)+l),p=Math.round(Dh(m)),v=bv(p,f.x,d.w,0,180),b=bv(p,f.y,d.h,90,270);s3(e,t,m,v,b)}n.setCenterPoint(t.l-e.l,e.r-t.r,t.t-e.t,e.b-t.b),n._pointLabelItems=l3(n,r,i)}function s3(n,t,e,r,i){const s=Math.abs(Math.sin(e)),a=Math.abs(Math.cos(e));let l=0,c=0;r.start<t.l?(l=(t.l-r.start)/s,n.l=Math.min(n.l,t.l-l)):r.end>t.r&&(l=(r.end-t.r)/s,n.r=Math.max(n.r,t.r+l)),i.start<t.t?(c=(t.t-i.start)/a,n.t=Math.min(n.t,t.t-c)):i.end>t.b&&(c=(i.end-t.b)/a,n.b=Math.max(n.b,t.b+c))}function o3(n,t,e){const r=n.drawingArea,{extra:i,additionalAngle:s,padding:a,size:l}=e,c=n.getPointPosition(t,r+i+a,s),h=Math.round(Dh(An(c.angle+Ie))),f=f3(c.y,l.h,h),g=u3(h),d=c3(c.x,l.w,g);return{visible:!0,x:c.x,y:f,textAlign:g,left:d,top:f,right:d+l.w,bottom:f+l.h}}function a3(n,t){if(!t)return!0;const{left:e,top:r,right:i,bottom:s}=n;return!(Cr({x:e,y:r},t)||Cr({x:e,y:s},t)||Cr({x:i,y:r},t)||Cr({x:i,y:s},t))}function l3(n,t,e){const r=[],i=n._pointLabels.length,s=n.options,{centerPointLabels:a,display:l}=s.pointLabels,c={extra:fh(s)/2,additionalAngle:a?_e/i:0};let h;for(let f=0;f<i;f++){c.padding=e[f],c.size=t[f];const g=o3(n,f,c);r.push(g),l==="auto"&&(g.visible=a3(g,h),g.visible&&(h=g))}return r}function u3(n){return n===0||n===180?"center":n<180?"left":"right"}function c3(n,t,e){return e==="right"?n-=t:e==="center"&&(n-=t/2),n}function f3(n,t,e){return e===90||e===270?n-=t/2:(e>270||e<90)&&(n-=t),n}function h3(n,t,e){const{left:r,top:i,right:s,bottom:a}=e,{backdropColor:l}=t;if(!Kt(l)){const c=mi(t.borderRadius),h=en(t.backdropPadding);n.fillStyle=l;const f=r-h.left,g=i-h.top,d=s-r+h.width,m=a-i+h.height;Object.values(c).some(p=>p!==0)?(n.beginPath(),to(n,{x:f,y:g,w:d,h:m,radius:c}),n.fill()):n.fillRect(f,g,d,m)}}function d3(n,t){const{ctx:e,options:{pointLabels:r}}=n;for(let i=t-1;i>=0;i--){const s=n._pointLabelItems[i];if(!s.visible)continue;const a=r.setContext(n.getPointLabelContext(i));h3(e,a,s);const l=ze(a.font),{x:c,y:h,textAlign:f}=s;bi(e,n._pointLabels[i],c,h+l.lineHeight/2,l,{color:a.color,textAlign:f,textBaseline:"middle"})}}function __(n,t,e,r){const{ctx:i}=n;if(e)i.arc(n.xCenter,n.yCenter,t,0,be);else{let s=n.getPointPosition(0,t);i.moveTo(s.x,s.y);for(let a=1;a<r;a++)s=n.getPointPosition(a,t),i.lineTo(s.x,s.y)}}function p3(n,t,e,r,i){const s=n.ctx,a=t.circular,{color:l,lineWidth:c}=t;!a&&!r||!l||!c||e<0||(s.save(),s.strokeStyle=l,s.lineWidth=c,s.setLineDash(i.dash||[]),s.lineDashOffset=i.dashOffset,s.beginPath(),__(n,e,a,r),s.closePath(),s.stroke(),s.restore())}function g3(n,t,e){return Xr(n,{label:e,index:t,type:"pointLabel"})}class Fs extends xl{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=en(fh(this.options)/2),e=this.width=this.maxWidth-t.width,r=this.height=this.maxHeight-t.height;this.xCenter=Math.floor(this.left+e/2+t.left),this.yCenter=Math.floor(this.top+r/2+t.top),this.drawingArea=Math.floor(Math.min(e,r)/2)}determineDataLimits(){const{min:t,max:e}=this.getMinMax(!1);this.min=Le(t)&&!isNaN(t)?t:0,this.max=Le(e)&&!isNaN(e)?e:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/fh(this.options))}generateTickLabels(t){xl.prototype.generateTickLabels.call(this,t),this._pointLabels=this.getLabels().map((e,r)=>{const i=me(this.options.pointLabels.callback,[e,r],this);return i||i===0?i:""}).filter((e,r)=>this.chart.getDataVisibility(r))}fit(){const t=this.options;t.display&&t.pointLabels.display?i3(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(t,e,r,i){this.xCenter+=Math.floor((t-e)/2),this.yCenter+=Math.floor((r-i)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(t,e,r,i))}getIndexAngle(t){const e=be/(this._pointLabels.length||1),r=this.options.startAngle||0;return An(t*e+Vn(r))}getDistanceFromCenterForValue(t){if(Kt(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(Kt(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 r=e[t];return g3(this.getContext(),t,r)}}getPointPosition(t,e,r=0){const i=this.getIndexAngle(t)-Ie+r;return{x:Math.cos(i)*e+this.xCenter,y:Math.sin(i)*e+this.yCenter,angle:i}}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:r,right:i,bottom:s}=this._pointLabelItems[t];return{left:e,top:r,right:i,bottom:s}}drawBackground(){const{backgroundColor:t,grid:{circular:e}}=this.options;if(t){const r=this.ctx;r.save(),r.beginPath(),__(this,this.getDistanceFromCenterForValue(this._endValue),e,this._pointLabels.length),r.closePath(),r.fillStyle=t,r.fill(),r.restore()}}drawGrid(){const t=this.ctx,e=this.options,{angleLines:r,grid:i,border:s}=e,a=this._pointLabels.length;let l,c,h;if(e.pointLabels.display&&d3(this,a),i.display&&this.ticks.forEach((f,g)=>{if(g!==0||g===0&&this.min<0){c=this.getDistanceFromCenterForValue(f.value);const d=this.getContext(g),m=i.setContext(d),p=s.setContext(d);p3(this,m,c,a,p)}}),r.display){for(t.save(),l=a-1;l>=0;l--){const f=r.setContext(this.getPointLabelContext(l)),{color:g,lineWidth:d}=f;!d||!g||(t.lineWidth=d,t.strokeStyle=g,t.setLineDash(f.borderDash),t.lineDashOffset=f.borderDashOffset,c=this.getDistanceFromCenterForValue(e.reverse?this.min:this.max),h=this.getPointPosition(l,c),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(h.x,h.y),t.stroke())}t.restore()}}drawBorder(){}drawLabels(){const t=this.ctx,e=this.options,r=e.ticks;if(!r.display)return;const i=this.getIndexAngle(0);let s,a;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(i),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach((l,c)=>{if(c===0&&this.min>=0&&!e.reverse)return;const h=r.setContext(this.getContext(c)),f=ze(h.font);if(s=this.getDistanceFromCenterForValue(this.ticks[c].value),h.showLabelBackdrop){t.font=f.string,a=t.measureText(l.label).width,t.fillStyle=h.backdropColor;const g=en(h.backdropPadding);t.fillRect(-a/2-g.left,-s-f.size/2-g.top,a+g.width,f.size+g.height)}bi(t,l.label,0,-s,f,{color:h.color,strokeColor:h.textStrokeColor,strokeWidth:h.textStrokeWidth})}),t.restore()}drawTitle(){}}At(Fs,"id","radialLinear"),At(Fs,"defaults",{display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:Ll.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(t){return t},padding:5,centerPointLabels:!1}}),At(Fs,"defaultRoutes",{"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"}),At(Fs,"descriptors",{angleLines:{_fallback:"grid"}});const Fl={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}},gn=Object.keys(Fl);function _v(n,t){return n-t}function wv(n,t){if(Kt(t))return null;const e=n._adapter,{parser:r,round:i,isoWeekday:s}=n._parseOpts;let a=t;return typeof r=="function"&&(a=r(a)),Le(a)||(a=typeof r=="string"?e.parse(a,r):e.parse(a)),a===null?null:(i&&(a=i==="week"&&(Xi(s)||s===!0)?e.startOf(a,"isoWeek",s):e.startOf(a,i)),+a)}function xv(n,t,e,r){const i=gn.length;for(let s=gn.indexOf(n);s<i-1;++s){const a=Fl[gn[s]],l=a.steps?a.steps:Number.MAX_SAFE_INTEGER;if(a.common&&Math.ceil((e-t)/(l*a.size))<=r)return gn[s]}return gn[i-1]}function m3(n,t,e,r,i){for(let s=gn.length-1;s>=gn.indexOf(e);s--){const a=gn[s];if(Fl[a].common&&n._adapter.diff(i,r,a)>=t-1)return a}return gn[e?gn.indexOf(e):0]}function y3(n){for(let t=gn.indexOf(n)+1,e=gn.length;t<e;++t)if(Fl[gn[t]].common)return gn[t]}function Sv(n,t,e){if(!e)n[t]=!0;else if(e.length){const{lo:r,hi:i}=Fh(e,t),s=e[r]>=t?e[r]:e[i];n[s]=!0}}function v3(n,t,e,r){const i=n._adapter,s=+i.startOf(t[0].value,r),a=t[t.length-1].value;let l,c;for(l=s;l<=a;l=+i.add(l,1,r))c=e[l],c>=0&&(t[c].major=!0);return t}function Ev(n,t,e){const r=[],i={},s=t.length;let a,l;for(a=0;a<s;++a)l=t[a],i[l]=a,r.push({value:l,major:!1});return s===0||!e?r:v3(n,r,i,e)}class ro extends xi{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 r=t.time||(t.time={}),i=this._adapter=new kO._date(t.adapters.date);i.init(e),qs(r.displayFormats,i.formats()),this._parseOpts={parser:r.parser,round:r.round,isoWeekday:r.isoWeekday},super.init(t),this._normalized=e.normalized}parse(t,e){return t===void 0?null:wv(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,e=this._adapter,r=t.time.unit||"day";let{min:i,max:s,minDefined:a,maxDefined:l}=this.getUserBounds();function c(h){!a&&!isNaN(h.min)&&(i=Math.min(i,h.min)),!l&&!isNaN(h.max)&&(s=Math.max(s,h.max))}(!a||!l)&&(c(this._getLabelBounds()),(t.bounds!=="ticks"||t.ticks.source!=="labels")&&c(this.getMinMax(!1))),i=Le(i)&&!isNaN(i)?i:+e.startOf(Date.now(),r),s=Le(s)&&!isNaN(s)?s:+e.endOf(Date.now(),r)+1,this.min=Math.min(i,s-1),this.max=Math.max(i+1,s)}_getLabelBounds(){const t=this.getLabelTimestamps();let e=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY;return t.length&&(e=t[0],r=t[t.length-1]),{min:e,max:r}}buildTicks(){const t=this.options,e=t.time,r=t.ticks,i=r.source==="labels"?this.getLabelTimestamps():this._generate();t.bounds==="ticks"&&i.length&&(this.min=this._userMin||i[0],this.max=this._userMax||i[i.length-1]);const s=this.min,a=this.max,l=JC(i,s,a);return this._unit=e.unit||(r.autoSkip?xv(e.minUnit,this.min,this.max,this._getLabelCapacity(s)):m3(this,l.length,e.minUnit,this.min,this.max)),this._majorUnit=!r.major.enabled||this._unit==="year"?void 0:y3(this._unit),this.initOffsets(i),t.reverse&&l.reverse(),Ev(this,l,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(t=>+t.value))}initOffsets(t=[]){let e=0,r=0,i,s;this.options.offset&&t.length&&(i=this.getDecimalForValue(t[0]),t.length===1?e=1-i:e=(this.getDecimalForValue(t[1])-i)/2,s=this.getDecimalForValue(t[t.length-1]),t.length===1?r=s:r=(s-this.getDecimalForValue(t[t.length-2]))/2);const a=t.length<3?.5:.25;e=Ge(e,0,a),r=Ge(r,0,a),this._offsets={start:e,end:r,factor:1/(e+1+r)}}_generate(){const t=this._adapter,e=this.min,r=this.max,i=this.options,s=i.time,a=s.unit||xv(s.minUnit,e,r,this._getLabelCapacity(e)),l=Wt(i.ticks.stepSize,1),c=a==="week"?s.isoWeekday:!1,h=Xi(c)||c===!0,f={};let g=e,d,m;if(h&&(g=+t.startOf(g,"isoWeek",c)),g=+t.startOf(g,h?"day":a),t.diff(r,e,a)>1e5*l)throw new Error(e+" and "+r+" are too far apart with stepSize of "+l+" "+a);const p=i.ticks.source==="data"&&this.getDataTimestamps();for(d=g,m=0;d<r;d=+t.add(d,l,a),m++)Sv(f,d,p);return(d===r||i.bounds==="ticks"||m===1)&&Sv(f,d,p),Object.keys(f).sort(_v).map(v=>+v)}getLabelForValue(t){const e=this._adapter,r=this.options.time;return r.tooltipFormat?e.format(t,r.tooltipFormat):e.format(t,r.displayFormats.datetime)}format(t,e){const i=this.options.time.displayFormats,s=this._unit,a=e||i[s];return this._adapter.format(t,a)}_tickFormatFunction(t,e,r,i){const s=this.options,a=s.ticks.callback;if(a)return me(a,[t,e,r],this);const l=s.time.displayFormats,c=this._unit,h=this._majorUnit,f=c&&l[c],g=h&&l[h],d=r[e],m=h&&g&&d&&d.major;return this._adapter.format(t,i||(m?g:f))}generateTickLabels(t){let e,r,i;for(e=0,r=t.length;e<r;++e)i=t[e],i.label=this._tickFormatFunction(i.value,e,t)}getDecimalForValue(t){return t===null?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){const e=this._offsets,r=this.getDecimalForValue(t);return this.getPixelForDecimal((e.start+r)*e.factor)}getValueForPixel(t){const e=this._offsets,r=this.getDecimalForPixel(t)/e.factor-e.end;return this.min+r*(this.max-this.min)}_getLabelSize(t){const e=this.options.ticks,r=this.ctx.measureText(t).width,i=Vn(this.isHorizontal()?e.maxRotation:e.minRotation),s=Math.cos(i),a=Math.sin(i),l=this._resolveTickFontOptions(0).size;return{w:r*s+l*a,h:r*a+l*s}}_getLabelCapacity(t){const e=this.options.time,r=e.displayFormats,i=r[e.unit]||r.millisecond,s=this._tickFormatFunction(t,0,Ev(this,[t],this._majorUnit),i),a=this._getLabelSize(s),l=Math.floor(this.isHorizontal()?this.width/a.w:this.height/a.h)-1;return l>0?l:1}getDataTimestamps(){let t=this._cache.data||[],e,r;if(t.length)return t;const i=this.getMatchingVisibleMetas();if(this._normalized&&i.length)return this._cache.data=i[0].controller.getAllParsedValues(this);for(e=0,r=i.length;e<r;++e)t=t.concat(i[e].controller.getAllParsedValues(this));return this._cache.data=this.normalize(t)}getLabelTimestamps(){const t=this._cache.labels||[];let e,r;if(t.length)return t;const i=this.getLabels();for(e=0,r=i.length;e<r;++e)t.push(wv(this,i[e]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return Tb(t.sort(_v))}}At(ro,"id","time"),At(ro,"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 Za(n,t,e){let r=0,i=n.length-1,s,a,l,c;e?(t>=n[r].pos&&t<=n[i].pos&&({lo:r,hi:i}=Mr(n,"pos",t)),{pos:s,time:l}=n[r],{pos:a,time:c}=n[i]):(t>=n[r].time&&t<=n[i].time&&({lo:r,hi:i}=Mr(n,"time",t)),{time:s,pos:l}=n[r],{time:a,pos:c}=n[i]);const h=a-s;return h?l+(c-l)*(t-s)/h:l}class hh extends ro{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=Za(e,this.min),this._tableRange=Za(e,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:e,max:r}=this,i=[],s=[];let a,l,c,h,f;for(a=0,l=t.length;a<l;++a)h=t[a],h>=e&&h<=r&&i.push(h);if(i.length<2)return[{time:e,pos:0},{time:r,pos:1}];for(a=0,l=i.length;a<l;++a)f=i[a+1],c=i[a-1],h=i[a],Math.round((f+c)/2)!==h&&s.push({time:h,pos:a/(l-1)});return s}_generate(){const t=this.min,e=this.max;let r=super.getDataTimestamps();return(!r.includes(t)||!r.length)&&r.splice(0,0,t),(!r.includes(e)||r.length===1)&&r.push(e),r.sort((i,s)=>i-s)}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const e=this.getDataTimestamps(),r=this.getLabelTimestamps();return e.length&&r.length?t=this.normalize(e.concat(r)):t=e.length?e:r,t=this._cache.all=t,t}getDecimalForValue(t){return(Za(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const e=this._offsets,r=this.getDecimalForPixel(t)/e.factor-e.end;return Za(this._table,r*this._tableRange+this._minPos,!0)}}At(hh,"id","timeseries"),At(hh,"defaults",ro.defaults);var b3=Object.freeze({__proto__:null,CategoryScale:lh,LinearScale:uh,LogarithmicScale:ch,RadialLinearScale:Fs,TimeScale:ro,TimeSeriesScale:hh});const _3=[AO,eT,XT,b3];Sr.register(..._3);const w3=n=>sr({L:20,M:10,S:7,XS:5})[n],x3=n=>sr({L:200,M:100,S:60,XS:40})[n];class $i extends Oe{constructor(t){super(),this.provided=t,this.counter=sM(),this.aliases={},this.stack=[],this.points=new Map,this.labels=new Set,this.limits={legend:w3(this.provided.width??"L"),point:this.provided.limit??x3(this.provided.width??"L")},this.source=new Sr(document.createElement("canvas"),{type:"line",data:{labels:sr([]),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=Ar.build({...this.provided,class:"chart"}).replace(this.source.canvas),this.replace(this.panel)}provide(t){t.forEach(r=>{if(this.provided.mode==="aggregation"){const s=this.aliases[r.legend]??this.counter(),a=this.points.get(s)??sr({legend:r.legend,values:{}});return this.aliases[r.legend]||(this.aliases[r.legend]=s,this.points.set(s,a),this.stack.push(s)),Object.entries(r.values).forEach(([l,c])=>{a.values[l]=(a.values[l]??0)+c,this.labels.add(l)})}const i=this.counter();this.stack.push(i),this.points.set(i,r),Object.keys(r.values).forEach(s=>this.labels.add(s))}),this.stack.slice(0,kn.clamp(this.stack.length-this.limits.point,0,1/0)).forEach(r=>{const i=this.points.get(r);i&&kn.unset(this.aliases,i.legend),this.points.delete(r),this.stack.shift()});const e=[...this.points.values()];return this.source.data={labels:e.map(r=>r.legend),datasets:[...this.labels.values()].map(r=>({label:r,data:Array(e.length).fill(null).map((i,s)=>e[s].values[r]??null),tension:.3,pointRadius:2,pointHitRadius:20,pointHoverRadius:5,borderWidth:1,borderColor:pl(r),backgroundColor:pl(r)}))},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 $i(t)}}const S3=`
459
+ <section id="expectations">
460
+ <div class="storage"></div>
461
+
462
+ <div class="controls">
463
+ <div class="main">
464
+ <button class="icon-only" id="expand"><i class="fas fa-chevron-down"></i></button>
465
+ </div>
466
+
467
+ <div class="additional container hidden"></div>
468
+ </div>
469
+
470
+ <div class="content"></div>
471
+ </section>
472
+ `,E3=Fe.compile(S3),Er=new Map,dh=Ol.build(),Me={state:{filters:{search:sr(null),groups:sr(null)}},search:Pl.build({title:"Search expectations"}).on("clear",()=>{Me.state.filters.search=null,di()}).on("input",n=>{Me.state.filters.search=n,di()}),filter:Ks.build({title:{text:"Groups filter",icon:"fas fa-filter",description:"shows/hides items in the list below"},width:"M"}),switcher:Ks.build({title:{text:"Groups switcher",icon:"fas fa-power-off",description:"turnes on/off items in the list below"},width:"M"})},A3=n=>{let t=n;return Me.state.filters.groups&&(t=t.filter(e=>Me.state.filters.groups.includes(e.data.group))),Me.state.filters.search&&(t=t.filter(e=>e.match(Me.state.filters.search))),t},di=(n=[...Er.values()])=>{const t=A3(n.map(e=>e.hide())).map(e=>e.show());n.length===Er.size&&(t.length?dh.hide():dh.show())},Wf=n=>(n??Nt.shared.groups).forEach(t=>{var r,i;[...Er.values()].filter(s=>s.data.group===t).every(s=>!s.data.isEnabled)?(r=Me.switcher.buttons.provided[t])==null||r.disable("silent"):(i=Me.switcher.buttons.provided[t])==null||i.enable("silent")}),Kh=ts.build(E3({})).assignMeta({name:"Expectations",icon:"fas fa-magic"}).once("initialize",n=>{n.append(dh),n.controls.main.append(Me.search),n.controls.additional.append(Me.filter),n.controls.additional.append(Me.switcher),Nt.on("group:register",t=>{Me.switcher.provide({name:t,isEnabled:!0,colorify:!0}),Me.filter.provide({name:t,isEnabled:!0,colorify:!0})}),Me.switcher.on("enable",t=>Nt.services.io.exec("expectations:group:update",{name:t.name,set:{isEnabled:!0}})),Me.switcher.on("disable",t=>Nt.services.io.exec("expectations:group:update",{name:t.name,set:{isEnabled:!1}})),Me.filter.on("enable",()=>{Me.state.filters.groups=Me.filter.extract().filter(t=>t.isEnabled).map(t=>t.name),di()}),Me.filter.on("disable",()=>{Me.state.filters.groups=Me.filter.extract().filter(t=>t.isEnabled).map(t=>t.name),di()}),Nt.services.io.subscribe("expectation:added",t=>{const e=js.build(t);Er.set(t.id,e),n.content.append(e),Nt.shared.groups.has(t.group)||(Nt.shared.groups.add(t.group),Nt.emit("group:register",t.group)),di([e]),Wf([e.data.group])}),Nt.services.io.subscribe("expectation:updated",t=>{const e=Er.get(t.id)??js.build(t);Er.has(t.id)&&e.provide(t).refresh(),n.content.element.querySelector(`div.expectation[id="${t.id}"]`)||(n.content.append(e),di([e])),Nt.shared.groups.has(t.group)||(Nt.shared.groups.add(t.group),Nt.emit("group:register",t.group)),Er.set(t.id,e),Wf([e.data.group])})}).on("initialize",async n=>{Nt.shared.groups.clear(),n.content.clear(),Me.switcher.clear(),Me.filter.clear(),Er.clear();const{data:t}=await Nt.services.io.exec("expectations:get-list");t.forEach(e=>{const r=js.build(e);Nt.shared.groups.has(e.group)||(Nt.shared.groups.add(e.group),Nt.emit("group:register",e.group)),Er.set(e.id,r),n.content.append(r)}),di(),Wf()}),k3=`
473
+ <section id="analytics">
474
+ <div class="storage"></div>
475
+ <div class="content container"></div>
476
+ </section>
477
+ `,R3=Fe.compile(k3),dn={memory:$i.build({title:{text:"Server memory usage",icon:"fas fa-memory",description:"updates every 5 seconds"},width:"M"}),cache:$i.build({title:{text:"Cache memory usage",icon:"fas fa-database",description:"updates every 10 minutes"},width:"M"}),containers:$i.build({title:{text:"Registered containers",icon:"fas fa-box",description:"updates every 5 seconds"},width:"S"}),rate:$i.build({title:{text:"Requests rate",icon:"fas fa-rocket",description:"updates instantly"},mode:"aggregation",width:"S"})},w_=ts.build(R3({})).assignMeta({icon:"fas fa-chart-line"}).once("initialize",n=>{n.content.append(dn.memory),n.content.append(dn.cache),n.content.append(dn.containers),n.content.append(dn.rate),Nt.services.io.subscribe("metric:registered",({name:t,point:{timestamp:e,values:r}})=>t in dn?dn[t].provide([{values:r,legend:zi(e).format("HH:mm")}]):null)}).on("initialize",async()=>{dn.containers.clear(),dn.memory.clear(),dn.cache.clear(),dn.rate.clear();const{data:n}=await Nt.services.io.exec("metrics:get");dn.memory.provide(n.memory.map(({timestamp:t,values:e})=>({values:e,legend:zi(t).format("HH:mm")}))),dn.cache.provide(n.cache.map(({timestamp:t,values:e})=>({values:e,legend:zi(t).format("HH:mm")}))),dn.rate.provide(n.rate.map(({timestamp:t,values:e})=>({values:e,legend:zi(t).format("HH:mm")}))),dn.containers.provide(n.containers.map(({timestamp:t,values:e})=>({values:e,legend:zi(t).format("HH:mm")})))}),M3=`
478
+ <div class="content">
479
+ <div class="input size-M" title="Backup file"><input type="file" data-key="files"></div>
480
+ <div class="input size-XS" title="TTL (seconds)"><input type="text" data-key="ttl" value="3600"></div>
481
+
482
+ <button id="restore"><i class="fas fa-undo"></i>Restore</button>
483
+ </div>
484
+ `,C3=`
485
+ <div class="content">
486
+ <div class="input size-L" title="prefix"><input type="text" data-key="prefix" value="*"></div>
487
+ <button id="delete"><i class="fas fa-trash-alt"></i>Delete</button>
488
+ </div>
489
+ `,P3=`
490
+ <div class="content">
491
+ <button id="backup"><i class="fas fa-save"></i>Backup</button>
492
+ </div>
493
+ `,O3=`
494
+ <section id="settings">
495
+ <div class="storage"></div>
496
+ <div class="content container"></div>
497
+ </section>
498
+ `,L3=`
499
+ <div class="content">
500
+ <p class="version"><span>Version</span><b>{{version}}</b></p>
501
+ <p class="version"><span>Uptime</span><b>{{uptime}}</b></p>
502
+ </div>
503
+ `,$s={cacheRestoration:Fe.compile(M3),cacheDeletion:Fe.compile(C3),cacheBackup:Fe.compile(P3),section:Fe.compile(O3),stats:Fe.compile(L3)},Qn={stats:Ar.build({title:{text:"Stats",icon:"fas fa-server"},class:"stats",height:"XS",width:"M"}),cacheDeletion:Ar.build({title:{text:"Cache deletion",icon:"fas fa-database"},class:"cache",height:"XS",width:"M"}).replace($s.cacheDeletion({})),cacheBackup:Ar.build({title:{text:"Cache backup",icon:"fas fa-database"},class:"cache",height:"XS",width:"M"}).replace($s.cacheBackup({})),cacheRestoration:Ar.build({title:{text:"Cache restoration",icon:"fas fa-database"},class:"cache",height:"XS",width:"M"}).replace($s.cacheRestoration({}))},x_=ts.build($s.section({})).assignMeta({icon:"fas fa-cog"}).once("initialize",async n=>{n.content.append(Qn.stats),n.content.append(Qn.cacheDeletion),n.content.append(Qn.cacheBackup),n.content.append(Qn.cacheRestoration),$r.build(Qn.cacheDeletion.element.querySelector("button#delete")).handle(async()=>{var r;const t=await Gs.build(Qn.cacheDeletion).extract(),{data:e}=await Nt.services.io.exec("cache:delete",{prefix:t.prefix});Nt.shared.popups.push(`Deleted <b>${((r=e.redis)==null?void 0:r.count)??0}</b> cache keys`)}),$r.build(Qn.cacheBackup.element.querySelector("button#backup")).handle(async()=>{const{data:t}=await Nt.services.io.exec("cache:backup"),e=document.createElement("a"),r=new Date;e.download=`mock-server-cache-backup-${r.toLocaleDateString()}-${r.getTime()}.txt`,e.href=URL.createObjectURL(new Blob([t],{type:"text"})),e.click()}),$r.build(Qn.cacheRestoration.element.querySelector("button#restore")).handle(async()=>{var s;const t=await Gs.build(Qn.cacheRestoration).extract();if(!((s=t.files)!=null&&s.length))return Nt.shared.popups.push("File is not provided",{level:"warning"});const e=1024*1024*300,r=t.files[0],i=Mf.createStream({highWaterMark:e});Mf(Nt.instances.io).emit("cache:restore:stream",i,{ttl:t.ttl}),Mf.createBlobReadStream(r.source,{highWaterMark:e}).pipe(i),await new Promise(a=>i.once("finish",a)),Nt.shared.popups.push("Restored")})}).on("select",async()=>{const{data:n}=await Nt.services.io.exec("stats");Qn.stats.replace($s.stats(n))}),T3=`
504
+ <section id="history">
505
+ <div class="storage"></div>
506
+
507
+ <div class="controls">
508
+ <div class="main">
509
+ <button class="icon-only" id="expand"><i class="fas fa-chevron-down"></i></button>
510
+ </div>
511
+
512
+ <div class="additional container hidden"></div>
513
+ </div>
514
+
515
+ <div class="content"></div>
516
+ </section>
517
+ `,B3=`
518
+ <div class="buttons">
519
+ <button id="clear"><i class="fas fa-trash-alt"></i>Clear list</button>
520
+ </div>
521
+ `,S_={section:Fe.compile(T3),actions:Fe.compile(B3)},ph=Ol.build(),Yt={state:{storage:new Map,stack:sr([]),filters:{search:sr(null),groups:sr(null)}},search:Pl.build({title:"Search history"}).on("clear",()=>{Yt.state.filters.search=null,Ur()}).on("input",n=>{Yt.state.filters.search=n,Ur()}),filter:Ks.build({title:{text:"Groups filter",icon:"fas fa-filter",description:"shows/hides items in the list below"},width:"M"}),actions:Ar.build({title:{text:"Actions",icon:"fas fa-sliders-h"},class:"actions",width:"M"}).append(S_.actions({}))},I3=n=>{let t=n;return Yt.state.filters.groups&&(t=t.filter(e=>Yt.state.filters.groups.includes(e.data.group))),Yt.state.filters.search&&(t=t.filter(e=>e.match(Yt.state.filters.search))),t},Ur=(n=[...Yt.state.storage.values()])=>{const t=I3(n.map(e=>e.hide())).map(e=>e.show());n.length===Yt.state.storage.size&&(t.length?ph.hide():ph.show())},E_=ts.build(S_.section({})).assignMeta({name:"History",icon:"fas fa-history"}).once("initialize",n=>{n.append(ph),n.controls.main.append(Yt.search),n.controls.additional.append(Yt.filter),n.controls.additional.append(Yt.actions),$r.build(Yt.actions.element.querySelector("button#clear")).handle(async()=>{if(!Yt.state.stack.length)return Nt.shared.popups.push("Nothing to clear",{level:"warning"});await Nt.services.io.exec("history:delete"),Yt.state.storage.clear(),Yt.state.stack=[],n.content.clear(),Nt.shared.popups.push("History has cleared"),Ur()}),Nt.on("group:register",t=>Yt.filter.provide({name:t,isEnabled:!0,colorify:!0})),Yt.filter.on("enable",()=>{Yt.state.filters.groups=Yt.filter.extract().filter(t=>t.isEnabled).map(t=>t.name),Ur()}),Yt.filter.on("disable",()=>{Yt.state.filters.groups=Yt.filter.extract().filter(t=>t.isEnabled).map(t=>t.name),Ur()}),Nt.services.io.subscribe("history:added",t=>{var r;const e=Us.build(t);if(Yt.state.storage.set(t.id,e),Yt.state.stack.push(t.id),Yt.state.stack.length>Nt.config.history.limit*Nt.shared.groups.size){const i=Yt.state.stack.shift();(r=Yt.state.storage.get(i))==null||r.delete(),Yt.state.storage.delete(i)}n.content.prepend(e),Ur([e])}),Nt.services.io.subscribe("history:updated",t=>{const e=Yt.state.storage.get(t.id)??Us.build(t);Yt.state.storage.has(t.id)?e.provide(t).refresh():Yt.state.stack.push(t.id),Yt.state.storage.set(t.id,e),n.element.querySelector(`div.history[id="${t.id}"]`)||(n.content.prepend(e),Ur([e]))})}).on("initialize",async n=>{Yt.filter.clear(),Yt.state.stack=[],n.content.clear(),Yt.state.storage.clear();const{data:t}=await Nt.services.io.exec("history:get-list");t.forEach(e=>{const r=Us.build(e);Yt.state.storage.set(e.id,r),Yt.state.stack.push(e.id),n.content.append(r)}),Ur()}),A_=Object.freeze(Object.defineProperty({__proto__:null,analytics:w_,expectations:Kh,history:E_,settings:x_},Symbol.toStringTag,{value:"Module"})),k_=Ch.build().show(),D3=Oh.build([{type:"section",entity:x_.hide()},{type:"section",entity:w_.hide()},{type:"separator"},{type:"section",entity:Kh},{type:"section",entity:E_.hide()}]);Nt.switchStorage(Kh.storage).share({popups:Ph.build(),groups:new Set});document.body.prepend(D3.element);document.body.append(k_.element);document.body.append(Nt.shared.popups.element);Object.values(A_).forEach(n=>document.body.append(n.element));Nt.instances.io.on("connect",async()=>{console.log("WebSocket has connected"),await Nt.services.io.exec("ping");const{data:n}=await Nt.services.io.exec("config:get");Nt.assignConfig(n),Nt.shared.popups.push("Connected!"),Object.values(A_).forEach(t=>t.initialize()),k_.hide()});