@n1k1t/mock-server 0.1.52 → 0.1.54

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2 +0,0 @@
1
- /*! For license information please see main.js.LICENSE.txt */
2
- (()=>{var t={41:function(t,e,i){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.ExpectationComponent=void 0;const s=n(i(4383)),r=n(i(7341)),o=i(1135),a=i(6881),l=n(i(5123)),c=r.default.compile(i(9699));class h extends o.Component{constructor(t){super(),this.data=t,this.viewer=a.ViewerComponent.build({depth:3}).hide(),this.refresh()}provide(t){return Object.assign(this,{data:t})}refresh(){return this.replace(c(this.data)).append(this.viewer),this.viewer.provide((0,s.default)(this.data,["id","type","transports","schema"])),o.Button.build(this.element.querySelector("button.activity")).handle((()=>l.default.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((t=>t?.classList?.contains("meta")))&&"BUTTON"!==t.target.nodeName?this.viewer.isHidden?this.viewer.show():this.viewer.hide():null)),this}match(t){return[this.data.group,this.data.name,this.data.schema.forward?.baseUrl,this.data.schema.forward?.url,this.data.meta.tags.map((({value:t})=>t)).join()].some((e=>e?.includes(t)))}static build(t){return new h(t)}}e.ExpectationComponent=h},49:t=>{t.exports='\n <div class="container history" id="{{id}}">\n <div class="meta">\n <div class="segment">\n <span class="time">{{#toLocaleTime timestamp}}{{/toLocaleTime}}</span>\n\n {{#if snapshot.error}}\n <span class="error">\n {{#compare snapshot.error.code.length \'lte\' 24}}{{snapshot.error.code}}{{/compare}}\n {{#compare snapshot.error.code.length \'gt\' 24}}Error{{/compare}}\n </span>\n {{/if}}\n\n {{#compare status \'eq\' \'pending\'}}\n <span class="pending"><i class="fas fa-hourglass-start"></i></span>\n {{/compare}}\n\n {{#compare status \'eq\' \'completed\'}}\n <span class="status\n {{#compare snapshot.transport \'eq\' \'http\'}}\n {{#compare snapshot.outgoing.status \'lt\' 400}}green{{/compare}}\n {{#compare snapshot.outgoing.status \'gte\' 400}}red{{/compare}}\n {{/compare}}\n "><b>{{snapshot.outgoing.status}}</b> {{toSeconds duration}}s</span>\n {{/compare}}\n\n <span class="method" style="color: {{toColor snapshot.incoming.method}};">{{snapshot.incoming.method}}</span>\n <span class="path">{{> truncated value=snapshot.incoming.path length=45}}</span>\n\n {{#if snapshot.seed}}<span class="seed">{{snapshot.seed}}</span>{{/if}}\n </div>\n\n <span class="arrow"><i class="fas fa-chevron-right"></i></span>\n\n {{#if expectation}}\n {{>expectationMeta expectation format=\'short\' isCached=snapshot.forwarded.isCached}}\n {{else}}\n <div class="segment"><span class="handled-with red">Nowhere</span></div>\n {{/if}}\n </div>\n\n {{!-- {{#if snapshot.messages}}\n <p class="messages-title">\n <span class="count">Total messages <b>{{snapshot.messages.length}}</b></span>\n </p>\n\n <div class="messages">\n {{#each snapshot.messages}}\n <div id="{{id}}" class="message {{location}}">\n <p class="header">\n {{#compare location \'eq\' \'incoming\'}}<i class="fas fa-angle-right"></i>{{/compare}}\n {{#compare location \'eq\' \'outgoing\'}}<i class="fas fa-angle-left"></i>{{/compare}}\n <span class="time">{{#toLocaleTime timestamp}}{{/toLocaleTime}}</span>\n </p>\n\n <pre class="panel hidden"></pre>\n </div>\n {{/each}}\n </div>\n {{/if}} --}}\n </div>\n'},79:(t,e,i)=>{var n=i(3702),s=i(80),r=i(4739),o=i(8655),a=i(1175);function l(t){var e=-1,i=null==t?0:t.length;for(this.clear();++e<i;){var n=t[e];this.set(n[0],n[1])}}l.prototype.clear=n,l.prototype.delete=s,l.prototype.get=r,l.prototype.has=o,l.prototype.set=a,t.exports=l},80:(t,e,i)=>{var n=i(6025),s=Array.prototype.splice;t.exports=function(t){var e=this.__data__,i=n(e,t);return!(i<0||(i==e.length-1?e.pop():s.call(e,i,1),--this.size,0))}},100:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ClientStorage=void 0;class i{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 i(t)}}e.ClientStorage=i},104:(t,e,i)=>{var n=i(3661);function s(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var i=function(){var n=arguments,s=e?e.apply(this,n):n[0],r=i.cache;if(r.has(s))return r.get(s);var o=t.apply(this,n);return i.cache=r.set(s,o)||r,o};return i.cache=new(s.Cache||n),i}s.Cache=n,t.exports=s},124:(t,e,i)=>{var n=i(9325);t.exports=function(){return n.Date.now()}},245:(t,e,i)=>{const n=i(8969),{Chart:s,registerables:r}=n;s.register(...r),t.exports=Object.assign(s,n)},261:(t,e,i)=>{"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function s(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e.default=t,e}e.__esModule=!0;var r=s(i(2871)),o=n(i(9613)),a=n(i(3769)),l=s(i(2849)),c=s(i(7624)),h=n(i(1148));function u(){var t=new r.HandlebarsEnvironment;return l.extend(t,r),t.SafeString=o.default,t.Exception=a.default,t.Utils=l,t.escapeExpression=l.escapeExpression,t.VM=c,t.template=function(e){return c.template(e,t)},t}var d=u();d.create=u,h.default(d),d.default=d,e.default=d,t.exports=e.default},289:(t,e,i)=>{var n=i(2651);t.exports=function(t){return n(this,t).get(t)}},294:t=>{t.exports=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}},346:t=>{t.exports=function(t){return null!=t&&"object"==typeof t}},361:t=>{var e=/^(?:0|[1-9]\d*)$/;t.exports=function(t,i){var n=typeof t;return!!(i=null==i?9007199254740991:i)&&("number"==n||"symbol"!=n&&e.test(t))&&t>-1&&t%1==0&&t<i}},392:t=>{t.exports=function(t,e){return null==t?void 0:t[e]}},528:function(t,e,i){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.Request=e.Polling=void 0;const s=i(4689),r=n(i(7833)),o=i(732),a=i(8661),l=i(6376),c=i(3519),h=i(7285),u=i(5374),d=i(6235),p=(0,r.default)("engine.io-client:polling");function f(){}const g=null!=new c.XHR({xdomain:!1}).responseType;class m extends s.Transport{constructor(t){if(super(t),this.polling=!1,"undefined"!=typeof location){const e="https:"===location.protocol;let i=location.port;i||(i=e?"443":"80"),this.xd="undefined"!=typeof location&&t.hostname!==location.hostname||i!==t.port,this.xs=t.secure!==e}const e=t&&t.forceBase64;this.supportsBinary=g&&!e}get name(){return"polling"}doOpen(){this.poll()}pause(t){this.readyState="pausing";const e=()=>{p("paused"),this.readyState="paused",t()};if(this.polling||!this.writable){let t=0;this.polling&&(p("we are currently polling - waiting to pause"),t++,this.once("pollComplete",(function(){p("pre-pause polling complete"),--t||e()}))),this.writable||(p("we are currently writing - waiting to pause"),t++,this.once("drain",(function(){p("pre-pause writing complete"),--t||e()})))}else e()}poll(){p("polling"),this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){p("polling got data %s",t),(0,l.decodePayload)(t,this.socket.binaryType).forEach((t=>{if("opening"===this.readyState&&"open"===t.type&&this.onOpen(),"close"===t.type)return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(t)})),"closed"!==this.readyState&&(this.polling=!1,this.emitReserved("pollComplete"),"open"===this.readyState?this.poll():p('ignoring poll - transport state "%s"',this.readyState))}doClose(){const t=()=>{p("writing close packet"),this.write([{type:"close"}])};"open"===this.readyState?(p("transport open - closing"),t()):(p("transport not open - deferring close"),this.once("open",t))}write(t){this.writable=!1,(0,l.encodePayload)(t,(t=>{this.doWrite(t,(()=>{this.writable=!0,this.emitReserved("drain")}))}))}uri(){let t=this.query||{};const e=this.opts.secure?"https":"http";let i="";!1!==this.opts.timestampRequests&&(t[this.opts.timestampParam]=(0,o.yeast)()),this.supportsBinary||t.sid||(t.b64=1),this.opts.port&&("https"===e&&443!==Number(this.opts.port)||"http"===e&&80!==Number(this.opts.port))&&(i=":"+this.opts.port);const n=(0,a.encode)(t);return e+"://"+(-1!==this.opts.hostname.indexOf(":")?"["+this.opts.hostname+"]":this.opts.hostname)+i+this.opts.path+(n.length?"?"+n:"")}request(t={}){return Object.assign(t,{xd:this.xd,xs:this.xs},this.opts),new b(this.uri(),t)}doWrite(t,e){const i=this.request({method:"POST",data:t});i.on("success",e),i.on("error",((t,e)=>{this.onError("xhr post error",t,e)}))}doPoll(){p("xhr poll");const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",((t,e)=>{this.onError("xhr poll error",t,e)})),this.pollXhr=t}}e.Polling=m;class b extends h.Emitter{constructor(t,e){super(),(0,u.installTimerFunctions)(this,e),this.opts=e,this.method=e.method||"GET",this.uri=t,this.async=!1!==e.async,this.data=void 0!==e.data?e.data:null,this.create()}create(){const t=(0,u.pick)(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 c.XHR(t);try{p("xhr open %s: %s",this.method,this.uri),e.open(this.method,this.uri,this.async);try{if(this.opts.extraHeaders){e.setDisableHeaderCheck&&e.setDisableHeaderCheck(!0);for(let t in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(t)&&e.setRequestHeader(t,this.opts.extraHeaders[t])}}catch(t){}if("POST"===this.method)try{e.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(t){}try{e.setRequestHeader("Accept","*/*")}catch(t){}"withCredentials"in e&&(e.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(e.timeout=this.opts.requestTimeout),e.onreadystatechange=()=>{4===e.readyState&&(200===e.status||1223===e.status?this.onLoad():this.setTimeoutFn((()=>{this.onError("number"==typeof e.status?e.status:0)}),0))},p("xhr data %s",this.data),e.send(this.data)}catch(t){return void this.setTimeoutFn((()=>{this.onError(t)}),0)}"undefined"!=typeof document&&(this.index=b.requestsCount++,b.requests[this.index]=this)}onError(t){this.emitReserved("error",t,this.xhr),this.cleanup(!0)}cleanup(t){if(void 0!==this.xhr&&null!==this.xhr){if(this.xhr.onreadystatechange=f,t)try{this.xhr.abort()}catch(t){}"undefined"!=typeof document&&delete b.requests[this.index],this.xhr=null}}onLoad(){const t=this.xhr.responseText;null!==t&&(this.emitReserved("data",t),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}}if(e.Request=b,b.requestsCount=0,b.requests={},"undefined"!=typeof document)if("function"==typeof attachEvent)attachEvent("onunload",y);else if("function"==typeof addEventListener){const t="onpagehide"in d.globalThisShim?"pagehide":"unload";addEventListener(t,y,!1)}function y(){for(let t in b.requests)b.requests.hasOwnProperty(t)&&b.requests[t].abort()}},566:(t,e,i)=>{"use strict";e.__esModule=!0;var n=i(2849),s={methodMap:["debug","info","warn","error"],level:"info",lookupLevel:function(t){if("string"==typeof t){var e=n.indexOf(s.methodMap,t.toLowerCase());t=e>=0?e:parseInt(t,10)}return t},log:function(t){if(t=s.lookupLevel(t),"undefined"!=typeof console&&s.lookupLevel(s.level)<=t){var e=s.methodMap[t];console[e]||(e="log");for(var i=arguments.length,n=Array(i>1?i-1:0),r=1;r<i;r++)n[r-1]=arguments[r];console[e].apply(console,n)}}};e.default=s,t.exports=e.default},604:function(t,e,i){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.Socket=void 0;const s=i(9419),r=i(5374),o=i(8661),a=i(1015),l=n(i(7833)),c=i(7285),h=i(6376),u=(0,l.default)("engine.io-client:socket");class d extends c.Emitter{constructor(t,e={}){super(),t&&"object"==typeof t&&(e=t,t=null),t?(t=(0,a.parse)(t),e.hostname=t.host,e.secure="https"===t.protocol||"wss"===t.protocol,e.port=t.port,t.query&&(e.query=t.query)):e.host&&(e.hostname=(0,a.parse)(e.host).host),(0,r.installTimerFunctions)(this,e),this.secure=null!=e.secure?e.secure:"undefined"!=typeof location&&"https:"===location.protocol,e.hostname&&!e.port&&(e.port=this.secure?"443":"80"),this.hostname=e.hostname||("undefined"!=typeof location?location.hostname:"localhost"),this.port=e.port||("undefined"!=typeof location&&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(/\/$/,"")+"/","string"==typeof this.opts.query&&(this.opts.query=(0,o.decode)(this.opts.query)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingTimeoutTimer=null,"function"==typeof addEventListener&&(this.opts.closeOnBeforeunload&&(this.beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this.beforeunloadEventListener,!1)),"localhost"!==this.hostname&&(this.offlineEventListener=()=>{this.onClose("transport close",{description:"network connection lost"})},addEventListener("offline",this.offlineEventListener,!1))),this.open()}createTransport(t){u('creating transport "%s"',t);const e=Object.assign({},this.opts.query);e.EIO=h.protocol,e.transport=t,this.id&&(e.sid=this.id);const i=Object.assign({},this.opts.transportOptions[t],this.opts,{query:e,socket:this,hostname:this.hostname,secure:this.secure,port:this.port});return u("options: %j",i),new s.transports[t](i)}open(){let t;if(this.opts.rememberUpgrade&&d.priorWebsocketSuccess&&-1!==this.transports.indexOf("websocket"))t="websocket";else{if(0===this.transports.length)return void this.setTimeoutFn((()=>{this.emitReserved("error","No transports available")}),0);t=this.transports[0]}this.readyState="opening";try{t=this.createTransport(t)}catch(t){return u("error while creating transport: %s",t),this.transports.shift(),void this.open()}t.open(),this.setTransport(t)}setTransport(t){u("setting transport %s",t.name),this.transport&&(u("clearing existing transport %s",this.transport.name),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",(t=>this.onClose("transport close",t)))}probe(t){u('probing transport "%s"',t);let e=this.createTransport(t),i=!1;d.priorWebsocketSuccess=!1;const n=()=>{i||(u('probe transport "%s" opened',t),e.send([{type:"ping",data:"probe"}]),e.once("packet",(n=>{if(!i)if("pong"===n.type&&"probe"===n.data){if(u('probe transport "%s" pong',t),this.upgrading=!0,this.emitReserved("upgrading",e),!e)return;d.priorWebsocketSuccess="websocket"===e.name,u('pausing current transport "%s"',this.transport.name),this.transport.pause((()=>{i||"closed"!==this.readyState&&(u("changing transport and sending upgrade packet"),c(),this.setTransport(e),e.send([{type:"upgrade"}]),this.emitReserved("upgrade",e),e=null,this.upgrading=!1,this.flush())}))}else{u('probe transport "%s" failed',t);const i=new Error("probe error");i.transport=e.name,this.emitReserved("upgradeError",i)}})))};function s(){i||(i=!0,c(),e.close(),e=null)}const r=i=>{const n=new Error("probe error: "+i);n.transport=e.name,s(),u('probe transport "%s" failed because of error: %s',t,i),this.emitReserved("upgradeError",n)};function o(){r("transport closed")}function a(){r("socket closed")}function l(t){e&&t.name!==e.name&&(u('"%s" works - aborting "%s"',t.name,e.name),s())}const c=()=>{e.removeListener("open",n),e.removeListener("error",r),e.removeListener("close",o),this.off("close",a),this.off("upgrading",l)};e.once("open",n),e.once("error",r),e.once("close",o),this.once("close",a),this.once("upgrading",l),e.open()}onOpen(){if(u("socket open"),this.readyState="open",d.priorWebsocketSuccess="websocket"===this.transport.name,this.emitReserved("open"),this.flush(),"open"===this.readyState&&this.opts.upgrade&&this.transport.pause){u("starting upgrade probes");let t=0;const e=this.upgrades.length;for(;t<e;t++)this.probe(this.upgrades[t])}}onPacket(t){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState)switch(u('socket receive: type "%s", data "%s"',t.type,t.data),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)}else u('packet received with socket readyState "%s"',this.readyState)}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(),"closed"!==this.readyState&&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,0===this.writeBuffer.length?this.emitReserved("drain"):this.flush()}flush(){if("closed"!==this.readyState&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this.getWritablePackets();u("flushing %d packets in socket",t.length),this.transport.send(t),this.prevBufferLen=t.length,this.emitReserved("flush")}}getWritablePackets(){if(!(this.maxPayload&&"polling"===this.transport.name&&this.writeBuffer.length>1))return this.writeBuffer;let t=1;for(let e=0;e<this.writeBuffer.length;e++){const i=this.writeBuffer[e].data;if(i&&(t+=(0,r.byteLength)(i)),e>0&&t>this.maxPayload)return u("only send %d out of %d packets",e,this.writeBuffer.length),this.writeBuffer.slice(0,e);t+=2}return u("payload size is %d (max: %d)",t,this.maxPayload),this.writeBuffer}write(t,e,i){return this.sendPacket("message",t,e,i),this}send(t,e,i){return this.sendPacket("message",t,e,i),this}sendPacket(t,e,i,n){if("function"==typeof e&&(n=e,e=void 0),"function"==typeof i&&(n=i,i=null),"closing"===this.readyState||"closed"===this.readyState)return;(i=i||{}).compress=!1!==i.compress;const s={type:t,data:e,options:i};this.emitReserved("packetCreate",s),this.writeBuffer.push(s),n&&this.once("flush",n),this.flush()}close(){const t=()=>{this.onClose("forced close"),u("socket closing - telling transport to close"),this.transport.close()},e=()=>{this.off("upgrade",e),this.off("upgradeError",e),t()},i=()=>{this.once("upgrade",e),this.once("upgradeError",e)};return"opening"!==this.readyState&&"open"!==this.readyState||(this.readyState="closing",this.writeBuffer.length?this.once("drain",(()=>{this.upgrading?i():t()})):this.upgrading?i():t()),this}onError(t){u("socket error %j",t),d.priorWebsocketSuccess=!1,this.emitReserved("error",t),this.onClose("transport error",t)}onClose(t,e){"opening"!==this.readyState&&"open"!==this.readyState&&"closing"!==this.readyState||(u('socket close with reason: "%s"',t),this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),"function"==typeof removeEventListener&&(removeEventListener("beforeunload",this.beforeunloadEventListener,!1),removeEventListener("offline",this.offlineEventListener,!1)),this.readyState="closed",this.id=null,this.emitReserved("close",t,e),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(t){const e=[];let i=0;const n=t.length;for(;i<n;i++)~this.transports.indexOf(t[i])&&e.push(t[i]);return e}}e.Socket=d,d.protocol=h.protocol},631:(t,e,i)=>{var n=i(8077),s=i(9326);t.exports=function(t,e){return null!=t&&s(t,e,n)}},639:(t,e,i)=>{"use strict";function n(t){return t&&t.__esModule?t:{default:t}}e.__esModule=!0;var s=n(i(261)),r=n(i(2300)),o=i(9027),a=i(1127),l=n(i(6727)),c=n(i(1350)),h=n(i(1148)),u=s.default.create;function d(){var t=u();return t.compile=function(e,i){return a.compile(e,i,t)},t.precompile=function(e,i){return a.precompile(e,i,t)},t.AST=r.default,t.Compiler=a.Compiler,t.JavaScriptCompiler=l.default,t.Parser=o.parser,t.parse=o.parse,t.parseWithoutProcessing=o.parseWithoutProcessing,t}var p=d();p.create=d,h.default(p),p.Visitor=c.default,p.default=p,e.default=p,t.exports=e.default},659:(t,e,i)=>{var n=i(1873),s=Object.prototype,r=s.hasOwnProperty,o=s.toString,a=n?n.toStringTag:void 0;t.exports=function(t){var e=r.call(t,a),i=t[a];try{t[a]=void 0;var n=!0}catch(t){}var s=o.call(t);return n&&(e?t[a]=i:delete t[a]),s}},716:function(t,e,i){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.toColor=e.toSeconds=e.toLocaleTime=e.truncate=e.compare=void 0;const s=n(i(2516)),r=i(8080),o=i(2285);e.compare=(0,r.buildHandlebarsHelper)((t=>(e,i,n,{fn:s,inverse:r})=>{const o=(()=>{switch(i){case"eq":return e===n;case"neq":return e!==n;case"lt":return e<n;case"lte":return e<=n;case"gt":return e>n;case"gte":return e>=n;default:return!1}})();return o?s?s(t):r?r(t):o:null})),e.truncate=(0,r.buildHandlebarsHelper)((()=>(t,e)=>(0,s.default)(t,{length:e}))),e.toLocaleTime=(0,r.buildHandlebarsHelper)((()=>t=>new Date(t).toLocaleTimeString())),e.toSeconds=(0,r.buildHandlebarsHelper)((()=>t=>(t/1e3).toFixed(3))),e.toColor=(0,r.buildHandlebarsHelper)((()=>t=>(0,o.calculateColor)(t)))},732:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.yeast=e.decode=e.encode=void 0;const i="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),n={};let s,r=0,o=0;function a(t){let e="";do{e=i[t%64]+e,t=Math.floor(t/64)}while(t>0);return e}for(e.encode=a,e.decode=function(t){let e=0;for(o=0;o<t.length;o++)e=64*e+n[t.charAt(o)];return e},e.yeast=function(){const t=a(+new Date);return t!==s?(r=0,s=t):t+"."+a(r++)};o<64;o++)n[i[o]]=o},736:(t,e,i)=>{t.exports=function(t){function e(t){let i,s,r,o=null;function a(...t){if(!a.enabled)return;const n=a,s=Number(new Date),r=s-(i||s);n.diff=r,n.prev=i,n.curr=s,i=s,t[0]=e.coerce(t[0]),"string"!=typeof t[0]&&t.unshift("%O");let o=0;t[0]=t[0].replace(/%([a-zA-Z%])/g,((i,s)=>{if("%%"===i)return"%";o++;const r=e.formatters[s];if("function"==typeof r){const e=t[o];i=r.call(n,e),t.splice(o,1),o--}return i})),e.formatArgs.call(n,t),(n.log||e.log).apply(n,t)}return a.namespace=t,a.useColors=e.useColors(),a.color=e.selectColor(t),a.extend=n,a.destroy=e.destroy,Object.defineProperty(a,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==o?o:(s!==e.namespaces&&(s=e.namespaces,r=e.enabled(t)),r),set:t=>{o=t}}),"function"==typeof e.init&&e.init(a),a}function n(t,i){const n=e(this.namespace+(void 0===i?":":i)+t);return n.log=this.log,n}function s(t){return t.toString().substring(2,t.toString().length-2).replace(/\.\*\?$/,"*")}return e.debug=e,e.default=e,e.coerce=function(t){return t instanceof Error?t.stack||t.message:t},e.disable=function(){const t=[...e.names.map(s),...e.skips.map(s).map((t=>"-"+t))].join(",");return e.enable(""),t},e.enable=function(t){let i;e.save(t),e.namespaces=t,e.names=[],e.skips=[];const n=("string"==typeof t?t:"").split(/[\s,]+/),s=n.length;for(i=0;i<s;i++)n[i]&&("-"===(t=n[i].replace(/\*/g,".*?"))[0]?e.skips.push(new RegExp("^"+t.slice(1)+"$")):e.names.push(new RegExp("^"+t+"$")))},e.enabled=function(t){if("*"===t[t.length-1])return!0;let i,n;for(i=0,n=e.skips.length;i<n;i++)if(e.skips[i].test(t))return!1;for(i=0,n=e.names.length;i<n;i++)if(e.names[i].test(t))return!0;return!1},e.humanize=i(6585),e.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(t).forEach((i=>{e[i]=t[i]})),e.names=[],e.skips=[],e.formatters={},e.selectColor=function(t){let i=0;for(let e=0;e<t.length;e++)i=(i<<5)-i+t.charCodeAt(e),i|=0;return e.colors[Math.abs(i)%e.colors.length]},e.enable(e.load()),e}},908:(t,e,i)=>{"use strict";e.__esModule=!0;var n,s=i(2849),r=(n=i(3769))&&n.__esModule?n:{default:n};e.default=function(t){t.registerHelper("with",(function(t,e){if(2!=arguments.length)throw new r.default("#with requires exactly one argument");s.isFunction(t)&&(t=t.call(this));var i=e.fn;if(s.isEmpty(t))return e.inverse(this);var n=e.data;return e.data&&e.ids&&((n=s.createFrame(e.data)).contextPath=s.appendContextPath(e.data.contextPath,e.ids[0])),i(t,{data:n,blockParams:s.blockParams([t],[n&&n.contextPath])})}))},t.exports=e.default},915:(t,e,i)=>{"use strict";e.__esModule=!0;var n,s=(n=i(1350))&&n.__esModule?n:{default:n};function r(){var t=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];this.options=t}function o(t,e,i){void 0===e&&(e=t.length);var n=t[e-1],s=t[e-2];return n?"ContentStatement"===n.type?(s||!i?/\r?\n\s*?$/:/(^|\r?\n)\s*?$/).test(n.original):void 0:i}function a(t,e,i){void 0===e&&(e=-1);var n=t[e+1],s=t[e+2];return n?"ContentStatement"===n.type?(s||!i?/^\s*?\r?\n/:/^\s*?(\r?\n|$)/).test(n.original):void 0:i}function l(t,e,i){var n=t[null==e?0:e+1];if(n&&"ContentStatement"===n.type&&(i||!n.rightStripped)){var s=n.value;n.value=n.value.replace(i?/^\s+/:/^[ \t]*\r?\n?/,""),n.rightStripped=n.value!==s}}function c(t,e,i){var n=t[null==e?t.length-1:e-1];if(n&&"ContentStatement"===n.type&&(i||!n.leftStripped)){var s=n.value;return n.value=n.value.replace(i?/\s+$/:/[ \t]+$/,""),n.leftStripped=n.value!==s,n.leftStripped}}r.prototype=new s.default,r.prototype.Program=function(t){var e=!this.options.ignoreStandalone,i=!this.isRootSeen;this.isRootSeen=!0;for(var n=t.body,s=0,r=n.length;s<r;s++){var h=n[s],u=this.accept(h);if(u){var d=o(n,s,i),p=a(n,s,i),f=u.openStandalone&&d,g=u.closeStandalone&&p,m=u.inlineStandalone&&d&&p;u.close&&l(n,s,!0),u.open&&c(n,s,!0),e&&m&&(l(n,s),c(n,s)&&"PartialStatement"===h.type&&(h.indent=/([ \t]+$)/.exec(n[s-1].original)[1])),e&&f&&(l((h.program||h.inverse).body),c(n,s)),e&&g&&(l(n,s),c((h.inverse||h.program).body))}}return t},r.prototype.BlockStatement=r.prototype.DecoratorBlock=r.prototype.PartialBlockStatement=function(t){this.accept(t.program),this.accept(t.inverse);var e=t.program||t.inverse,i=t.program&&t.inverse,n=i,s=i;if(i&&i.chained)for(n=i.body[0].program;s.chained;)s=s.body[s.body.length-1].program;var r={open:t.openStrip.open,close:t.closeStrip.close,openStandalone:a(e.body),closeStandalone:o((n||e).body)};if(t.openStrip.close&&l(e.body,null,!0),i){var h=t.inverseStrip;h.open&&c(e.body,null,!0),h.close&&l(n.body,null,!0),t.closeStrip.open&&c(s.body,null,!0),!this.options.ignoreStandalone&&o(e.body)&&a(n.body)&&(c(e.body),l(n.body))}else t.closeStrip.open&&c(e.body,null,!0);return r},r.prototype.Decorator=r.prototype.MustacheStatement=function(t){return t.strip},r.prototype.PartialStatement=r.prototype.CommentStatement=function(t){var e=t.strip||{};return{inlineStandalone:!0,open:e.open,close:e.close}},e.default=r,t.exports=e.default},1015:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.parse=void 0;const i=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,n=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];e.parse=function(t){const e=t,s=t.indexOf("["),r=t.indexOf("]");-1!=s&&-1!=r&&(t=t.substring(0,s)+t.substring(s,r).replace(/:/g,";")+t.substring(r,t.length));let o=i.exec(t||""),a={},l=14;for(;l--;)a[n[l]]=o[l]||"";return-1!=s&&-1!=r&&(a.source=e,a.host=a.host.substring(1,a.host.length-1).replace(/;/g,":"),a.authority=a.authority.replace("[","").replace("]","").replace(/;/g,":"),a.ipv6uri=!0),a.pathNames=function(t,e){const i=e.replace(/\/{2,9}/g,"/").split("/");return"/"!=e.slice(0,1)&&0!==e.length||i.splice(0,1),"/"==e.slice(-1)&&i.splice(i.length-1,1),i}(0,a.path),a.queryKey=function(t,e){const i={};return e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,(function(t,e,n){e&&(i[e]=n)})),i}(0,a.query),a}},1033:t=>{t.exports=function(t,e,i){switch(i.length){case 0:return t.call(e);case 1:return t.call(e,i[0]);case 2:return t.call(e,i[0],i[1]);case 3:return t.call(e,i[0],i[1],i[2])}return t.apply(e,i)}},1042:(t,e,i)=>{var n=i(6110)(Object,"create");t.exports=n},1074:t=>{t.exports=function(t){return t.split("")}},1127:(t,e,i)=>{"use strict";function n(t){return t&&t.__esModule?t:{default:t}}e.__esModule=!0,e.Compiler=l,e.precompile=function(t,e,i){if(null==t||"string"!=typeof t&&"Program"!==t.type)throw new s.default("You must pass a string or Handlebars AST to Handlebars.precompile. You passed "+t);"data"in(e=e||{})||(e.data=!0),e.compat&&(e.useDepths=!0);var n=i.parse(t,e),r=(new i.Compiler).compile(n,e);return(new i.JavaScriptCompiler).compile(r,e)},e.compile=function(t,e,i){if(void 0===e&&(e={}),null==t||"string"!=typeof t&&"Program"!==t.type)throw new s.default("You must pass a string or Handlebars AST to Handlebars.compile. You passed "+t);"data"in(e=r.extend({},e))||(e.data=!0),e.compat&&(e.useDepths=!0);var n=void 0;function o(){var n=i.parse(t,e),s=(new i.Compiler).compile(n,e),r=(new i.JavaScriptCompiler).compile(s,e,void 0,!0);return i.template(r)}function a(t,e){return n||(n=o()),n.call(this,t,e)}return a._setup=function(t){return n||(n=o()),n._setup(t)},a._child=function(t,e,i,s){return n||(n=o()),n._child(t,e,i,s)},a};var s=n(i(3769)),r=i(2849),o=n(i(2300)),a=[].slice;function l(){}function c(t,e){if(t===e)return!0;if(r.isArray(t)&&r.isArray(e)&&t.length===e.length){for(var i=0;i<t.length;i++)if(!c(t[i],e[i]))return!1;return!0}}function h(t){if(!t.path.parts){var e=t.path;t.path={type:"PathExpression",data:!1,depth:0,parts:[e.original+""],original:e.original+"",loc:e.loc}}}l.prototype={compiler:l,equals:function(t){var e=this.opcodes.length;if(t.opcodes.length!==e)return!1;for(var i=0;i<e;i++){var n=this.opcodes[i],s=t.opcodes[i];if(n.opcode!==s.opcode||!c(n.args,s.args))return!1}for(e=this.children.length,i=0;i<e;i++)if(!this.children[i].equals(t.children[i]))return!1;return!0},guid:0,compile:function(t,e){return this.sourceNode=[],this.opcodes=[],this.children=[],this.options=e,this.stringParams=e.stringParams,this.trackIds=e.trackIds,e.blockParams=e.blockParams||[],e.knownHelpers=r.extend(Object.create(null),{helperMissing:!0,blockHelperMissing:!0,each:!0,if:!0,unless:!0,with:!0,log:!0,lookup:!0},e.knownHelpers),this.accept(t)},compileProgram:function(t){var e=(new this.compiler).compile(t,this.options),i=this.guid++;return this.usePartial=this.usePartial||e.usePartial,this.children[i]=e,this.useDepths=this.useDepths||e.useDepths,i},accept:function(t){if(!this[t.type])throw new s.default("Unknown type: "+t.type,t);this.sourceNode.unshift(t);var e=this[t.type](t);return this.sourceNode.shift(),e},Program:function(t){this.options.blockParams.unshift(t.blockParams);for(var e=t.body,i=e.length,n=0;n<i;n++)this.accept(e[n]);return this.options.blockParams.shift(),this.isSimple=1===i,this.blockParams=t.blockParams?t.blockParams.length:0,this},BlockStatement:function(t){h(t);var e=t.program,i=t.inverse;e=e&&this.compileProgram(e),i=i&&this.compileProgram(i);var n=this.classifySexpr(t);"helper"===n?this.helperSexpr(t,e,i):"simple"===n?(this.simpleSexpr(t),this.opcode("pushProgram",e),this.opcode("pushProgram",i),this.opcode("emptyHash"),this.opcode("blockValue",t.path.original)):(this.ambiguousSexpr(t,e,i),this.opcode("pushProgram",e),this.opcode("pushProgram",i),this.opcode("emptyHash"),this.opcode("ambiguousBlockValue")),this.opcode("append")},DecoratorBlock:function(t){var e=t.program&&this.compileProgram(t.program),i=this.setupFullMustacheParams(t,e,void 0),n=t.path;this.useDecorators=!0,this.opcode("registerDecorator",i.length,n.original)},PartialStatement:function(t){this.usePartial=!0;var e=t.program;e&&(e=this.compileProgram(t.program));var i=t.params;if(i.length>1)throw new s.default("Unsupported number of partial arguments: "+i.length,t);i.length||(this.options.explicitPartialContext?this.opcode("pushLiteral","undefined"):i.push({type:"PathExpression",parts:[],depth:0}));var n=t.name.original,r="SubExpression"===t.name.type;r&&this.accept(t.name),this.setupFullMustacheParams(t,e,void 0,!0);var o=t.indent||"";this.options.preventIndent&&o&&(this.opcode("appendContent",o),o=""),this.opcode("invokePartial",r,n,o),this.opcode("append")},PartialBlockStatement:function(t){this.PartialStatement(t)},MustacheStatement:function(t){this.SubExpression(t),t.escaped&&!this.options.noEscape?this.opcode("appendEscaped"):this.opcode("append")},Decorator:function(t){this.DecoratorBlock(t)},ContentStatement:function(t){t.value&&this.opcode("appendContent",t.value)},CommentStatement:function(){},SubExpression:function(t){h(t);var e=this.classifySexpr(t);"simple"===e?this.simpleSexpr(t):"helper"===e?this.helperSexpr(t):this.ambiguousSexpr(t)},ambiguousSexpr:function(t,e,i){var n=t.path,s=n.parts[0],r=null!=e||null!=i;this.opcode("getContext",n.depth),this.opcode("pushProgram",e),this.opcode("pushProgram",i),n.strict=!0,this.accept(n),this.opcode("invokeAmbiguous",s,r)},simpleSexpr:function(t){var e=t.path;e.strict=!0,this.accept(e),this.opcode("resolvePossibleLambda")},helperSexpr:function(t,e,i){var n=this.setupFullMustacheParams(t,e,i),r=t.path,a=r.parts[0];if(this.options.knownHelpers[a])this.opcode("invokeKnownHelper",n.length,a);else{if(this.options.knownHelpersOnly)throw new s.default("You specified knownHelpersOnly, but used the unknown helper "+a,t);r.strict=!0,r.falsy=!0,this.accept(r),this.opcode("invokeHelper",n.length,r.original,o.default.helpers.simpleId(r))}},PathExpression:function(t){this.addDepth(t.depth),this.opcode("getContext",t.depth);var e=t.parts[0],i=o.default.helpers.scopedId(t),n=!t.depth&&!i&&this.blockParamIndex(e);n?this.opcode("lookupBlockParam",n,t.parts):e?t.data?(this.options.data=!0,this.opcode("lookupData",t.depth,t.parts,t.strict)):this.opcode("lookupOnContext",t.parts,t.falsy,t.strict,i):this.opcode("pushContext")},StringLiteral:function(t){this.opcode("pushString",t.value)},NumberLiteral:function(t){this.opcode("pushLiteral",t.value)},BooleanLiteral:function(t){this.opcode("pushLiteral",t.value)},UndefinedLiteral:function(){this.opcode("pushLiteral","undefined")},NullLiteral:function(){this.opcode("pushLiteral","null")},Hash:function(t){var e=t.pairs,i=0,n=e.length;for(this.opcode("pushHash");i<n;i++)this.pushParam(e[i].value);for(;i--;)this.opcode("assignToHash",e[i].key);this.opcode("popHash")},opcode:function(t){this.opcodes.push({opcode:t,args:a.call(arguments,1),loc:this.sourceNode[0].loc})},addDepth:function(t){t&&(this.useDepths=!0)},classifySexpr:function(t){var e=o.default.helpers.simpleId(t.path),i=e&&!!this.blockParamIndex(t.path.parts[0]),n=!i&&o.default.helpers.helperExpression(t),s=!i&&(n||e);if(s&&!n){var r=t.path.parts[0],a=this.options;a.knownHelpers[r]?n=!0:a.knownHelpersOnly&&(s=!1)}return n?"helper":s?"ambiguous":"simple"},pushParams:function(t){for(var e=0,i=t.length;e<i;e++)this.pushParam(t[e])},pushParam:function(t){var e=null!=t.value?t.value:t.original||"";if(this.stringParams)e.replace&&(e=e.replace(/^(\.?\.\/)*/g,"").replace(/\//g,".")),t.depth&&this.addDepth(t.depth),this.opcode("getContext",t.depth||0),this.opcode("pushStringParam",e,t.type),"SubExpression"===t.type&&this.accept(t);else{if(this.trackIds){var i=void 0;if(!t.parts||o.default.helpers.scopedId(t)||t.depth||(i=this.blockParamIndex(t.parts[0])),i){var n=t.parts.slice(1).join(".");this.opcode("pushId","BlockParam",i,n)}else(e=t.original||e).replace&&(e=e.replace(/^this(?:\.|$)/,"").replace(/^\.\//,"").replace(/^\.$/,"")),this.opcode("pushId",t.type,e)}this.accept(t)}},setupFullMustacheParams:function(t,e,i,n){var s=t.params;return this.pushParams(s),this.opcode("pushProgram",e),this.opcode("pushProgram",i),t.hash?this.accept(t.hash):this.opcode("emptyHash",n),s},blockParamIndex:function(t){for(var e=0,i=this.options.blockParams.length;e<i;e++){var n=this.options.blockParams[e],s=n&&r.indexOf(n,t);if(n&&s>=0)return[e,s]}}}},1135:function(t,e,i){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,i,n){void 0===n&&(n=i);var s=Object.getOwnPropertyDescriptor(e,i);s&&!("get"in s?!e.__esModule:s.writable||s.configurable)||(s={enumerable:!0,get:function(){return e[i]}}),Object.defineProperty(t,n,s)}:function(t,e,i,n){void 0===n&&(n=i),t[n]=e[i]}),s=this&&this.__exportStar||function(t,e){for(var i in t)"default"===i||Object.prototype.hasOwnProperty.call(e,i)||n(e,t,i)};Object.defineProperty(e,"__esModule",{value:!0}),s(i(8698),e),s(i(3224),e),s(i(9700),e),s(i(5635),e),s(i(6981),e)},1148:(t,e,i)=>{"use strict";e.__esModule=!0,e.default=function(t){var e=void 0!==i.g?i.g:window,n=e.Handlebars;t.noConflict=function(){return e.Handlebars===t&&(e.Handlebars=n),t}},t.exports=e.default},1175:(t,e,i)=>{var n=i(6025);t.exports=function(t,e){var i=this.__data__,s=n(i,t);return s<0?(++this.size,i.push([t,e])):i[s][1]=e,this}},1230:function(t,e,i){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.CheckboxAreaComponent=void 0;const s=n(i(7007)),r=n(i(7341)),o=i(3701),a=i(9874),l=i(1135),c=i(8769),h=r.default.compile(i(3348));class u extends l.Component{constructor(t){super(),this.provided=t,this.buttons={all:a.CheckboxAreaButtonComponent.build({name:"ALL",isEnabled:!0}),provided:(0,c.cast)({})},this.events=new s.default,this.panel=new o.PanelComponent({...this.provided,class:"checkbox-area"}).append(h(this.provided)),this.area=new l.Component(this.panel.element.querySelector("div.buttons")).append(this.buttons.all),this.replace(this.panel),this.buttons.all.on("enable",((t,e)=>"click"===e?this.extract().forEach((t=>t.enable())):null)),this.buttons.all.on("disable",((t,e)=>"click"===e?this.extract().forEach((t=>t.disable())):null))}extract(){return Object.values(this.buttons.provided)}provide(...t){return t.forEach((t=>{const e=t instanceof a.CheckboxAreaButtonComponent?t:a.CheckboxAreaButtonComponent.build(t);this.buttons.provided[e.name]=e,this.area.append(e),e.on("enable",((t,e)=>{this.extract().every((t=>t.isEnabled))&&this.buttons.all.enable(),"silent"!==e&&this.emit("enable",t)})),e.on("disable",((t,e)=>{this.extract().some((t=>!t.isEnabled))&&this.buttons.all.disable(),"silent"!==e&&this.emit("disable",t)}))})),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 u(t)}}e.CheckboxAreaComponent=u},1350:(t,e,i)=>{"use strict";e.__esModule=!0;var n,s=(n=i(3769))&&n.__esModule?n:{default:n};function r(){this.parents=[]}function o(t){this.acceptRequired(t,"path"),this.acceptArray(t.params),this.acceptKey(t,"hash")}function a(t){o.call(this,t),this.acceptKey(t,"program"),this.acceptKey(t,"inverse")}function l(t){this.acceptRequired(t,"name"),this.acceptArray(t.params),this.acceptKey(t,"hash")}r.prototype={constructor:r,mutating:!1,acceptKey:function(t,e){var i=this.accept(t[e]);if(this.mutating){if(i&&!r.prototype[i.type])throw new s.default('Unexpected node type "'+i.type+'" found when accepting '+e+" on "+t.type);t[e]=i}},acceptRequired:function(t,e){if(this.acceptKey(t,e),!t[e])throw new s.default(t.type+" requires "+e)},acceptArray:function(t){for(var e=0,i=t.length;e<i;e++)this.acceptKey(t,e),t[e]||(t.splice(e,1),e--,i--)},accept:function(t){if(t){if(!this[t.type])throw new s.default("Unknown type: "+t.type,t);this.current&&this.parents.unshift(this.current),this.current=t;var e=this[t.type](t);return this.current=this.parents.shift(),!this.mutating||e?e:!1!==e?t:void 0}},Program:function(t){this.acceptArray(t.body)},MustacheStatement:o,Decorator:o,BlockStatement:a,DecoratorBlock:a,PartialStatement:l,PartialBlockStatement:function(t){l.call(this,t),this.acceptKey(t,"program")},ContentStatement:function(){},CommentStatement:function(){},SubExpression:o,PathExpression:function(){},StringLiteral:function(){},NumberLiteral:function(){},BooleanLiteral:function(){},UndefinedLiteral:function(){},NullLiteral:function(){},Hash:function(t){this.acceptArray(t.pairs)},HashPair:function(t){this.acceptRequired(t,"value")}},e.default=r,t.exports=e.default},1437:(t,e,i)=>{var n=i(2552),s=i(346);t.exports=function(t){return s(t)&&"[object RegExp]"==n(t)}},1489:(t,e,i)=>{var n=i(7400);t.exports=function(t){var e=n(t),i=e%1;return e==e?i?e-i:e:0}},1549:(t,e,i)=>{var n=i(2032),s=i(3862),r=i(6721),o=i(2749),a=i(5749);function l(t){var e=-1,i=null==t?0:t.length;for(this.clear();++e<i;){var n=t[e];this.set(n[0],n[1])}}l.prototype.clear=n,l.prototype.delete=s,l.prototype.get=r,l.prototype.has=o,l.prototype.set=a,t.exports=l},1769:(t,e,i)=>{var n=i(6449),s=i(8586),r=i(1802),o=i(3222);t.exports=function(t,e){return n(t)?t:s(t,e)?[t]:r(o(t))}},1800:t=>{var e=/\s/;t.exports=function(t){for(var i=t.length;i--&&e.test(t.charAt(i)););return i}},1802:(t,e,i)=>{var n=i(2224),s=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,r=/\\(\\)?/g,o=n((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(s,(function(t,i,n,s){e.push(n?s.replace(r,"$1"):i||t)})),e}));t.exports=o},1811:t=>{var e=Date.now;t.exports=function(t){var i=0,n=0;return function(){var s=e(),r=16-(s-n);if(n=s,r>0){if(++i>=800)return arguments[0]}else i=0;return t.apply(void 0,arguments)}}},1873:(t,e,i)=>{var n=i(9325).Symbol;t.exports=n},1882:(t,e,i)=>{var n=i(2552),s=i(3805);t.exports=function(t){if(!s(t))return!1;var e=n(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}},1918:function(t,e,i){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.HeaderComponent=void 0;const s=n(i(7007)),r=n(i(3560)),o=n(i(7341)),a=i(1135),l=o.default.compile(i(5842));class c extends a.Component{constructor(t){super(l({tabs:t.map((t=>"section"===t.type?Object.assign(t,{id:t.entity.id,isSelected:!t.entity.isHidden}):t))})),this.tabs=t,this.events=new s.default,this.sections=this.tabs.map((t=>"section"===t.type?t.entity:null)).filter(Boolean).reduce(((t,e)=>(0,r.default)(t,e.id,e)),{}),this.element.querySelector("div#tabs").addEventListener("click",(t=>{const e=t;if("BUTTON"!==e.target?.nodeName||!this.sections[e.target.id])return null;e.target.parentNode?.querySelectorAll("button.checked").forEach((t=>t.classList.remove("checked"))),e.target.classList.add("checked"),this.emit("select",this.sections[e.target.id])}))}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 c(t)}}e.HeaderComponent=c},1993:(t,e,i)=>{var n=i(9811),s=i(9698),r=i(7927);t.exports=function(t){return s(t)?r(t):n(t)}},2032:(t,e,i)=>{var n=i(1042);t.exports=function(){this.__data__=n?n(null):{},this.size=0}},2046:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ERROR_PACKET=e.PACKET_TYPES_REVERSE=e.PACKET_TYPES=void 0;const i=Object.create(null);e.PACKET_TYPES=i,i.open="0",i.close="1",i.ping="2",i.pong="3",i.message="4",i.upgrade="5",i.noop="6";const n=Object.create(null);e.PACKET_TYPES_REVERSE=n,Object.keys(i).forEach((t=>{n[i[t]]=t})),e.ERROR_PACKET={type:"error",data:"parser error"}},2054:t=>{var e="\\ud800-\\udfff",i="["+e+"]",n="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",s="\\ud83c[\\udffb-\\udfff]",r="[^"+e+"]",o="(?:\\ud83c[\\udde6-\\uddff]){2}",a="[\\ud800-\\udbff][\\udc00-\\udfff]",l="(?:"+n+"|"+s+")?",c="[\\ufe0e\\ufe0f]?",h=c+l+"(?:\\u200d(?:"+[r,o,a].join("|")+")"+c+l+")*",u="(?:"+[r+n+"?",n,o,a,i].join("|")+")",d=RegExp(s+"(?="+s+")|"+u+h,"g");t.exports=function(t){return t.match(d)||[]}},2224:(t,e,i)=>{var n=i(104);t.exports=function(t){var e=n(t,(function(t){return 500===i.size&&i.clear(),t})),i=e.cache;return e}},2277:(t,e,i)=>{"use strict";function n(t){return t&&t.__esModule?t:{default:t}}e.__esModule=!0,e.registerDefaultHelpers=function(t){s.default(t),r.default(t),o.default(t),a.default(t),l.default(t),c.default(t),h.default(t)},e.moveHelperToHooks=function(t,e,i){t.helpers[e]&&(t.hooks[e]=t.helpers[e],i||delete t.helpers[e])};var s=n(i(6097)),r=n(i(6785)),o=n(i(6734)),a=n(i(2355)),l=n(i(5300)),c=n(i(7466)),h=n(i(908))},2285:function(t,e,i){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.calculateColor=e.buildCounter=e.convertObjectToKeyValueCouples=void 0;const s=n(i(3805)),r=n(i(9951));e.convertObjectToKeyValueCouples=(t,i,n="")=>Object.entries(t).reduce(((t,[r,o])=>{const a=`${n}${n?".":""}${r}`;return(0,s.default)(o)&&!i.includes(a)?t.concat((0,e.convertObjectToKeyValueCouples)(o,i,a)):t.concat([[a,o]])}),[]),e.buildCounter=(t=0,e=1)=>(i=e)=>t+=i,e.calculateColor=t=>`hsl(${Math.floor((0,r.default)(t))/5%360}, 100%, 74%)`},2298:function(t,e,i){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.EmptyComponent=void 0;const s=n(i(7341)),r=i(1135),o=s.default.compile(i(4208));class a extends r.Component{static build(){return new a(o({}))}}e.EmptyComponent=a},2300:(t,e)=>{"use strict";e.__esModule=!0;var i={helpers:{helperExpression:function(t){return"SubExpression"===t.type||("MustacheStatement"===t.type||"BlockStatement"===t.type)&&!!(t.params&&t.params.length||t.hash)},scopedId:function(t){return/^\.|this\b/.test(t.original)},simpleId:function(t){return 1===t.parts.length&&!i.helpers.scopedId(t)&&!t.depth}}};e.default=i,t.exports=e.default},2355:(t,e,i)=>{"use strict";e.__esModule=!0;var n,s=i(2849),r=(n=i(3769))&&n.__esModule?n:{default:n};e.default=function(t){t.registerHelper("if",(function(t,e){if(2!=arguments.length)throw new r.default("#if requires exactly one argument");return s.isFunction(t)&&(t=t.call(this)),!e.hash.includeZero&&!t||s.isEmpty(t)?e.inverse(this):e.fn(this)})),t.registerHelper("unless",(function(e,i){if(2!=arguments.length)throw new r.default("#unless requires exactly one argument");return t.helpers.if.call(this,e,{fn:i.inverse,inverse:i.fn,hash:i.hash})}))},t.exports=e.default},2428:(t,e,i)=>{var n=i(7534),s=i(346),r=Object.prototype,o=r.hasOwnProperty,a=r.propertyIsEnumerable,l=n(function(){return arguments}())?n:function(t){return s(t)&&o.call(t,"callee")&&!a.call(t,"callee")};t.exports=l},2516:(t,e,i)=>{var n=i(7556),s=i(8754),r=i(9698),o=i(3805),a=i(9607),l=i(1993),c=i(3912),h=i(1489),u=i(3222),d=/\w*$/;t.exports=function(t,e){var i=30,p="...";if(o(e)){var f="separator"in e?e.separator:f;i="length"in e?h(e.length):i,p="omission"in e?n(e.omission):p}var g=(t=u(t)).length;if(r(t)){var m=c(t);g=m.length}if(i>=g)return t;var b=i-l(p);if(b<1)return p;var y=m?s(m,0,b).join(""):t.slice(0,b);if(void 0===f)return y+p;if(m&&(b+=y.length-b),a(f)){if(t.slice(b).search(f)){var v,_=y;for(f.global||(f=RegExp(f.source,u(d.exec(f))+"g")),f.lastIndex=0;v=f.exec(_);)var x=v.index;y=y.slice(0,void 0===x?b:x)}}else if(t.indexOf(n(f),b)!=b){var w=y.lastIndexOf(f);w>-1&&(y=y.slice(0,w))}return y+p}},2552:(t,e,i)=>{var n=i(1873),s=i(659),r=i(9350),o=n?n.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":o&&o in Object(t)?s(t):r(t)}},2572:function(t,e,i){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const s=n(i(6279));n(i(4353)).default.extend(s.default)},2614:(t,e)=>{"use strict";e.__esModule=!0,e.wrapHelper=function(t,e){return"function"!=typeof t?t:function(){return arguments[arguments.length-1]=e(arguments[arguments.length-1]),t.apply(this,arguments)}}},2651:(t,e,i)=>{var n=i(4218);t.exports=function(t,e){var i=t.__data__;return n(e)?i["string"==typeof e?"string":"hash"]:i.map}},2662:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const n=i(2046),s=i(2745),r="function"==typeof ArrayBuffer,o=(t,e)=>{if(r){const i=(0,s.decode)(t);return a(i,e)}return{base64:!0,data:t}},a=(t,e)=>"blob"===e&&t instanceof ArrayBuffer?new Blob([t]):t;e.default=(t,e)=>{if("string"!=typeof t)return{type:"message",data:a(t,e)};const i=t.charAt(0);return"b"===i?{type:"message",data:o(t.substring(1),e)}:n.PACKET_TYPES_REVERSE[i]?t.length>1?{type:n.PACKET_TYPES_REVERSE[i],data:t.substring(1)}:{type:n.PACKET_TYPES_REVERSE[i]}:n.ERROR_PACKET}},2686:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const n=i(2046),s="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===Object.prototype.toString.call(Blob),r="function"==typeof ArrayBuffer,o=(t,e)=>{const i=new FileReader;return i.onload=function(){const t=i.result.split(",")[1];e("b"+t)},i.readAsDataURL(t)};e.default=({type:t,data:e},i,a)=>{return s&&e instanceof Blob?i?a(e):o(e,a):r&&(e instanceof ArrayBuffer||(l=e,"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(l):l&&l.buffer instanceof ArrayBuffer))?i?a(e):o(new Blob([e]),a):a(n.PACKET_TYPES[t]+(e||""));var l}},2745:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.decode=e.encode=void 0;const i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n="undefined"==typeof Uint8Array?[]:new Uint8Array(256);for(let t=0;t<64;t++)n[i.charCodeAt(t)]=t;e.encode=t=>{let e,n=new Uint8Array(t),s=n.length,r="";for(e=0;e<s;e+=3)r+=i[n[e]>>2],r+=i[(3&n[e])<<4|n[e+1]>>4],r+=i[(15&n[e+1])<<2|n[e+2]>>6],r+=i[63&n[e+2]];return s%3==2?r=r.substring(0,r.length-1)+"=":s%3==1&&(r=r.substring(0,r.length-2)+"=="),r},e.decode=t=>{let e,i,s,r,o,a=.75*t.length,l=t.length,c=0;"="===t[t.length-1]&&(a--,"="===t[t.length-2]&&a--);const h=new ArrayBuffer(a),u=new Uint8Array(h);for(e=0;e<l;e+=4)i=n[t.charCodeAt(e)],s=n[t.charCodeAt(e+1)],r=n[t.charCodeAt(e+2)],o=n[t.charCodeAt(e+3)],u[c++]=i<<2|s>>4,u[c++]=(15&s)<<4|r>>2,u[c++]=(3&r)<<6|63&o;return h}},2749:(t,e,i)=>{var n=i(1042),s=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;return n?void 0!==e[t]:s.call(e,t)}},2751:function(t,e,i){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.ChartComponent=void 0;const s=n(i(245)),r=n(i(8659)),o=n(i(3357)),a=i(3701),l=i(8769),c=i(2285),h=i(1135),u=t=>(0,l.cast)({L:200,M:100,S:60,XS:40})[t];class d extends h.Component{constructor(t){var e;super(),this.provided=t,this.counter=(0,l.buildCounter)(),this.aliases={},this.stack=[],this.points=new Map,this.labels=new Set,this.limits={legend:(e=this.provided.width??"L",(0,l.cast)({L:20,M:10,S:7,XS:5})[e]),point:this.provided.limit??u(this.provided.width??"L")},this.source=new s.default(document.createElement("canvas"),{type:"line",data:{labels:(0,l.cast)([]),datasets:[]},options:{scales:{y:{grid:{color:"rgba(255, 255, 255, 0.05)"},ticks:{maxTicksLimit:2*this.limits.legend}},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=a.PanelComponent.build({...this.provided,class:"chart"}).replace(this.source.canvas),this.replace(this.panel)}provide(t){t.forEach((t=>{if("aggregation"===this.provided.mode){const e=this.aliases[t.legend]??this.counter(),i=this.points.get(e)??(0,l.cast)({legend:t.legend,values:{}});return this.aliases[t.legend]||(this.aliases[t.legend]=e,this.points.set(e,i),this.stack.push(e)),Object.entries(t.values).forEach((([t,e])=>{i.values[t]=(i.values[t]??0)+e,this.labels.add(t)}))}const e=this.counter();this.stack.push(e),this.points.set(e,t),Object.keys(t.values).forEach((t=>this.labels.add(t)))})),this.stack.slice(0,(0,r.default)(this.stack.length-this.limits.point,0,1/0)).forEach((t=>{const e=this.points.get(t);e&&(0,o.default)(this.aliases,e.legend),this.points.delete(t),this.stack.shift()}));const e=[...this.points.values()];return this.source.data={labels:e.map((t=>t.legend)),datasets:[...this.labels.values()].map((t=>({label:t,data:Array(e.length).fill(null).map(((i,n)=>e[n].values[t]??null)),tension:.3,pointRadius:2,pointHitRadius:20,pointHoverRadius:5,borderWidth:1,borderColor:(0,c.calculateColor)(t),backgroundColor:(0,c.calculateColor)(t)})))},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 d(t)}}e.ChartComponent=d},2773:function(t,e,i){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,i,n){void 0===n&&(n=i);var s=Object.getOwnPropertyDescriptor(e,i);s&&!("get"in s?!e.__esModule:s.writable||s.configurable)||(s={enumerable:!0,get:function(){return e[i]}}),Object.defineProperty(t,n,s)}:function(t,e,i,n){void 0===n&&(n=i),t[n]=e[i]}),s=this&&this.__exportStar||function(t,e){for(var i in t)"default"===i||Object.prototype.hasOwnProperty.call(e,i)||n(e,t,i)};Object.defineProperty(e,"__esModule",{value:!0}),s(i(1230),e),s(i(41),e),s(i(5343),e),s(i(8305),e),s(i(6964),e),s(i(5036),e),s(i(8803),e),s(i(1918),e),s(i(2298),e),s(i(2751),e),s(i(3701),e)},2849:(t,e)=>{"use strict";e.__esModule=!0,e.extend=o,e.indexOf=function(t,e){for(var i=0,n=t.length;i<n;i++)if(t[i]===e)return i;return-1},e.escapeExpression=function(t){if("string"!=typeof t){if(t&&t.toHTML)return t.toHTML();if(null==t)return"";if(!t)return t+"";t=""+t}return s.test(t)?t.replace(n,r):t},e.isEmpty=function(t){return!t&&0!==t||!(!c(t)||0!==t.length)},e.createFrame=function(t){var e=o({},t);return e._parent=t,e},e.blockParams=function(t,e){return t.path=e,t},e.appendContextPath=function(t,e){return(t?t+".":"")+e};var i={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;","=":"&#x3D;"},n=/[&<>"'`=]/g,s=/[&<>"'`=]/;function r(t){return i[t]}function o(t){for(var e=1;e<arguments.length;e++)for(var i in arguments[e])Object.prototype.hasOwnProperty.call(arguments[e],i)&&(t[i]=arguments[e][i]);return t}var a=Object.prototype.toString;e.toString=a;var l=function(t){return"function"==typeof t};l(/x/)&&(e.isFunction=l=function(t){return"function"==typeof t&&"[object Function]"===a.call(t)}),e.isFunction=l;var c=Array.isArray||function(t){return!(!t||"object"!=typeof t)&&"[object Array]"===a.call(t)};e.isArray=c},2865:(t,e,i)=>{var n=i(9570),s=i(1811)(n);t.exports=s},2871:(t,e,i)=>{"use strict";function n(t){return t&&t.__esModule?t:{default:t}}e.__esModule=!0,e.HandlebarsEnvironment=u;var s=i(2849),r=n(i(3769)),o=i(2277),a=i(5940),l=n(i(566)),c=i(3865);e.VERSION="4.7.7",e.COMPILER_REVISION=8,e.LAST_COMPATIBLE_COMPILER_REVISION=7,e.REVISION_CHANGES={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"};var h="[object Object]";function u(t,e,i){this.helpers=t||{},this.partials=e||{},this.decorators=i||{},o.registerDefaultHelpers(this),a.registerDefaultDecorators(this)}u.prototype={constructor:u,logger:l.default,log:l.default.log,registerHelper:function(t,e){if(s.toString.call(t)===h){if(e)throw new r.default("Arg not supported with multiple helpers");s.extend(this.helpers,t)}else this.helpers[t]=e},unregisterHelper:function(t){delete this.helpers[t]},registerPartial:function(t,e){if(s.toString.call(t)===h)s.extend(this.partials,t);else{if(void 0===e)throw new r.default('Attempting to register a partial called "'+t+'" as undefined');this.partials[t]=e}},unregisterPartial:function(t){delete this.partials[t]},registerDecorator:function(t,e){if(s.toString.call(t)===h){if(e)throw new r.default("Arg not supported with multiple decorators");s.extend(this.decorators,t)}else this.decorators[t]=e},unregisterDecorator:function(t){delete this.decorators[t]},resetLoggedPropertyAccesses:function(){c.resetLoggedProperties()}};var d=l.default.log;e.log=d,e.createFrame=s.createFrame,e.logger=l.default},2901:t=>{t.exports='\n <section id="settings">\n <div class="storage"></div>\n <div class="content container"></div>\n </section>\n'},2922:t=>{t.exports='\n <div class="content">\n <div class="input size-L" title="prefix"><input type="text" data-key="cache.prefix" value="*"></div>\n <button id="delete"><i class="fas fa-trash-alt"></i>Delete</button>\n </div>\n'},2949:(t,e,i)=>{var n=i(2651);t.exports=function(t,e){var i=n(this,t),s=i.size;return i.set(t,e),this.size+=i.size==s?0:1,this}},3040:(t,e,i)=>{var n=i(1549),s=i(79),r=i(8223);t.exports=function(){this.size=0,this.__data__={hash:new n,map:new(r||s),string:new n}}},3120:(t,e,i)=>{var n=i(4528),s=i(5891);t.exports=function t(e,i,r,o,a){var l=-1,c=e.length;for(r||(r=s),a||(a=[]);++l<c;){var h=e[l];i>0&&r(h)?i>1?t(h,i-1,r,o,a):n(a,h):o||(a[a.length]=h)}return a}},3165:t=>{t.exports='\n <section id="analytics">\n <div class="storage"></div>\n <div class="content container"></div>\n </section>\n'},3170:(t,e,i)=>{var n=i(6547),s=i(1769),r=i(361),o=i(3805),a=i(7797);t.exports=function(t,e,i,l){if(!o(t))return t;for(var c=-1,h=(e=s(e,t)).length,u=h-1,d=t;null!=d&&++c<h;){var p=a(e[c]),f=i;if("__proto__"===p||"constructor"===p||"prototype"===p)return t;if(c!=u){var g=d[p];void 0===(f=l?l(g,p,d):void 0)&&(f=o(g)?g:r(e[c+1])?[]:{})}n(d,p,f),d=d[p]}return t}},3222:(t,e,i)=>{var n=i(7556);t.exports=function(t){return null==t?"":n(t)}},3224:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Component=void 0;class i{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 i?t.element:"string"==typeof t?this.compileHtmlStringToElement(t):t}compileHtmlStringToElement(t){return(new DOMParser).parseFromString(t,"text/html").body.firstElementChild}}e.Component=i},3243:(t,e,i)=>{var n=i(6110),s=function(){try{var t=n(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();t.exports=s},3271:function(t){t.exports=function(){"use strict";function t(t){return null===t?"null":typeof t}function e(t){return!!t&&"object"==typeof t}function i(t){if(void 0===t)return"";if(null===t)return"Object";if("object"==typeof t&&!t.constructor)return"Object";var e=/function ([^(]*)/.exec(t.constructor.toString());return e&&e.length>1?e[1]:""}function n(t,e,i){return"null"===t||"undefined"===t?t:("string"!==t&&"stringifiable"!==t||(i=i.replace(/"/g,'\\"')),"function"===t?e.toString().replace(/[\r\n]/g,"").replace(/\{.*\}/,"")+"{…}":i)}function s(s){var r="";return e(s)?(r=i(s),Array.isArray(s)&&(r+="["+s.length+"]")):r=n(t(s),s,s),"string"==typeof r?'"'+r+'"':r}function r(t){return"json-formatter-"+t}function o(t,e,i){var n=document.createElement(t);return e&&n.classList.add(r(e)),void 0!==i&&(i instanceof Node?n.appendChild(i):n.appendChild(document.createTextNode(String(i)))),n}!function(t){if(t&&"undefined"!=typeof window){var e=document.createElement("style");e.setAttribute("media","screen"),e.innerHTML=t,document.head.appendChild(e)}}('.json-formatter-row {\n font-family: monospace;\n}\n.json-formatter-row,\n.json-formatter-row a,\n.json-formatter-row a:hover {\n color: black;\n text-decoration: none;\n}\n.json-formatter-row .json-formatter-row {\n margin-left: 1rem;\n}\n.json-formatter-row .json-formatter-children.json-formatter-empty {\n opacity: 0.5;\n margin-left: 1rem;\n}\n.json-formatter-row .json-formatter-children.json-formatter-empty:after {\n display: none;\n}\n.json-formatter-row .json-formatter-children.json-formatter-empty.json-formatter-object:after {\n content: "No properties";\n}\n.json-formatter-row .json-formatter-children.json-formatter-empty.json-formatter-array:after {\n content: "[]";\n}\n.json-formatter-row .json-formatter-string,\n.json-formatter-row .json-formatter-stringifiable {\n color: green;\n white-space: pre;\n word-wrap: break-word;\n}\n.json-formatter-row .json-formatter-number {\n color: blue;\n}\n.json-formatter-row .json-formatter-boolean {\n color: red;\n}\n.json-formatter-row .json-formatter-null {\n color: #855A00;\n}\n.json-formatter-row .json-formatter-undefined {\n color: #ca0b69;\n}\n.json-formatter-row .json-formatter-function {\n color: #FF20ED;\n}\n.json-formatter-row .json-formatter-date {\n background-color: rgba(0, 0, 0, 0.05);\n}\n.json-formatter-row .json-formatter-url {\n text-decoration: underline;\n color: blue;\n cursor: pointer;\n}\n.json-formatter-row .json-formatter-bracket {\n color: blue;\n}\n.json-formatter-row .json-formatter-key {\n color: #00008B;\n padding-right: 0.2rem;\n}\n.json-formatter-row .json-formatter-toggler-link {\n cursor: pointer;\n}\n.json-formatter-row .json-formatter-toggler {\n line-height: 1.2rem;\n font-size: 0.7rem;\n vertical-align: middle;\n opacity: 0.6;\n cursor: pointer;\n padding-right: 0.2rem;\n}\n.json-formatter-row .json-formatter-toggler:after {\n display: inline-block;\n transition: transform 100ms ease-in;\n content: "►";\n}\n.json-formatter-row > a > .json-formatter-preview-text {\n opacity: 0;\n transition: opacity 0.15s ease-in;\n font-style: italic;\n}\n.json-formatter-row:hover > a > .json-formatter-preview-text {\n opacity: 0.6;\n}\n.json-formatter-row.json-formatter-open > .json-formatter-toggler-link .json-formatter-toggler:after {\n transform: rotate(90deg);\n}\n.json-formatter-row.json-formatter-open > .json-formatter-children:after {\n display: inline-block;\n}\n.json-formatter-row.json-formatter-open > a > .json-formatter-preview-text {\n display: none;\n}\n.json-formatter-row.json-formatter-open.json-formatter-empty:after {\n display: block;\n}\n.json-formatter-dark.json-formatter-row {\n font-family: monospace;\n}\n.json-formatter-dark.json-formatter-row,\n.json-formatter-dark.json-formatter-row a,\n.json-formatter-dark.json-formatter-row a:hover {\n color: white;\n text-decoration: none;\n}\n.json-formatter-dark.json-formatter-row .json-formatter-row {\n margin-left: 1rem;\n}\n.json-formatter-dark.json-formatter-row .json-formatter-children.json-formatter-empty {\n opacity: 0.5;\n margin-left: 1rem;\n}\n.json-formatter-dark.json-formatter-row .json-formatter-children.json-formatter-empty:after {\n display: none;\n}\n.json-formatter-dark.json-formatter-row .json-formatter-children.json-formatter-empty.json-formatter-object:after {\n content: "No properties";\n}\n.json-formatter-dark.json-formatter-row .json-formatter-children.json-formatter-empty.json-formatter-array:after {\n content: "[]";\n}\n.json-formatter-dark.json-formatter-row .json-formatter-string,\n.json-formatter-dark.json-formatter-row .json-formatter-stringifiable {\n color: #31F031;\n white-space: pre;\n word-wrap: break-word;\n}\n.json-formatter-dark.json-formatter-row .json-formatter-number {\n color: #66C2FF;\n}\n.json-formatter-dark.json-formatter-row .json-formatter-boolean {\n color: #EC4242;\n}\n.json-formatter-dark.json-formatter-row .json-formatter-null {\n color: #EEC97D;\n}\n.json-formatter-dark.json-formatter-row .json-formatter-undefined {\n color: #ef8fbe;\n}\n.json-formatter-dark.json-formatter-row .json-formatter-function {\n color: #FD48CB;\n}\n.json-formatter-dark.json-formatter-row .json-formatter-date {\n background-color: rgba(255, 255, 255, 0.05);\n}\n.json-formatter-dark.json-formatter-row .json-formatter-url {\n text-decoration: underline;\n color: #027BFF;\n cursor: pointer;\n}\n.json-formatter-dark.json-formatter-row .json-formatter-bracket {\n color: #9494FF;\n}\n.json-formatter-dark.json-formatter-row .json-formatter-key {\n color: #23A0DB;\n padding-right: 0.2rem;\n}\n.json-formatter-dark.json-formatter-row .json-formatter-toggler-link {\n cursor: pointer;\n}\n.json-formatter-dark.json-formatter-row .json-formatter-toggler {\n line-height: 1.2rem;\n font-size: 0.7rem;\n vertical-align: middle;\n opacity: 0.6;\n cursor: pointer;\n padding-right: 0.2rem;\n}\n.json-formatter-dark.json-formatter-row .json-formatter-toggler:after {\n display: inline-block;\n transition: transform 100ms ease-in;\n content: "►";\n}\n.json-formatter-dark.json-formatter-row > a > .json-formatter-preview-text {\n opacity: 0;\n transition: opacity 0.15s ease-in;\n font-style: italic;\n}\n.json-formatter-dark.json-formatter-row:hover > a > .json-formatter-preview-text {\n opacity: 0.6;\n}\n.json-formatter-dark.json-formatter-row.json-formatter-open > .json-formatter-toggler-link .json-formatter-toggler:after {\n transform: rotate(90deg);\n}\n.json-formatter-dark.json-formatter-row.json-formatter-open > .json-formatter-children:after {\n display: inline-block;\n}\n.json-formatter-dark.json-formatter-row.json-formatter-open > a > .json-formatter-preview-text {\n display: none;\n}\n.json-formatter-dark.json-formatter-row.json-formatter-open.json-formatter-empty:after {\n display: block;\n}\n');var a=/(^\d{1,4}[\.|\\/|-]\d{1,2}[\.|\\/|-]\d{1,4})(\s*(?:0?[1-9]:[0-5]|1(?=[012])\d:[0-5])\d\s*[ap]m)?$/,l=/\d{2}:\d{2}:\d{2} GMT-\d{4}/,c=/\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{3}Z/,h=window.requestAnimationFrame||function(t){return t(),0},u={hoverPreviewEnabled:!1,hoverPreviewArrayCount:10,hoverPreviewFieldCount:5,animateOpen:!0,animateClose:!0,theme:null,useToJSON:!0,sortPropertiesBy:null,maxArrayItems:100,exposePath:!1,afterCopyHandler:function(){}};return function(){function d(t,e,i,n,s,r,o,a){void 0===e&&(e=1),void 0===i&&(i=u),void 0===r&&(r=[]),void 0===a&&(a=1),this.json=t,this.open=e,this.config=i,this.key=n,this.displayKey=s,this.path=r,this.arrayRange=o,this.level=a,this._isOpen=null,void 0===this.config.hoverPreviewEnabled&&(this.config.hoverPreviewEnabled=u.hoverPreviewEnabled),void 0===this.config.hoverPreviewArrayCount&&(this.config.hoverPreviewArrayCount=u.hoverPreviewArrayCount),void 0===this.config.hoverPreviewFieldCount&&(this.config.hoverPreviewFieldCount=u.hoverPreviewFieldCount),void 0===this.config.useToJSON&&(this.config.useToJSON=u.useToJSON),void 0===this.config.maxArrayItems&&(this.config.maxArrayItems=u.maxArrayItems),""===this.key&&(this.key='""'),void 0===this.displayKey&&(this.displayKey=this.key)}return Object.defineProperty(d.prototype,"isOpen",{get:function(){return null!==this._isOpen?this._isOpen:this.open>0},set:function(t){this._isOpen=t},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"isDate",{get:function(){return this.json instanceof Date||"string"===this.type&&(a.test(this.json)||c.test(this.json)||l.test(this.json))},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"isUrl",{get:function(){return"string"===this.type&&0===this.json.indexOf("http")},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"isArray",{get:function(){return Array.isArray(this.json)},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"isLargeArray",{get:function(){return this.isArray&&this.json.length>this.config.maxArrayItems},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"isArrayRange",{get:function(){return this.isArray&&void 0!==this.arrayRange&&2==this.arrayRange.length},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"isObject",{get:function(){return e(this.json)},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"isEmptyObject",{get:function(){return!this.keys.length&&!this.isArray},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"isEmpty",{get:function(){return this.isEmptyObject||this.keys&&!this.keys.length&&this.isArray},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"useToJSON",{get:function(){return this.config.useToJSON&&"stringifiable"===this.type},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"hasKey",{get:function(){return void 0!==this.key},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"constructorName",{get:function(){return i(this.json)},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"type",{get:function(){return this.config.useToJSON&&this.json&&this.json.toJSON?"stringifiable":t(this.json)},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"keys",{get:function(){if(this.isObject){var t=Object.keys(this.json);if(this.isLargeArray){var e=Math.ceil(this.json.length/this.config.maxArrayItems);t=[];for(var i=0;i<e;i++){var n=i*this.config.maxArrayItems,s=Math.min(this.json.length-1,n+(this.config.maxArrayItems-1));t.push(n+" … "+s)}}return!this.isArray&&this.config.sortPropertiesBy?t.sort(this.config.sortPropertiesBy):t}return[]},enumerable:!1,configurable:!0}),d.prototype.toggleOpen=function(t){var e,i;if(null===(i=null===(e=t.target)||void 0===e?void 0:e.classList)||void 0===i?void 0:i.contains("json-formatter-copy"))return null;this.isOpen=!this.isOpen,this.element&&(this.isOpen?this.appendChildren(this.config.animateOpen):this.removeChildren(this.config.animateClose),this.element.classList.toggle(r("open")))},d.prototype.onCopy=function(t){var i,n,s,r,o;return s=this,o=function(){return function(t,e){var i,n,s,r,o={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return r={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function a(r){return function(a){return function(r){if(i)throw new TypeError("Generator is already executing.");for(;o;)try{if(i=1,n&&(s=2&r[0]?n.return:r[0]?n.throw||((s=n.return)&&s.call(n),0):n.next)&&!(s=s.call(n,r[1])).done)return s;switch(n=0,s&&(r=[2&r[0],s.value]),r[0]){case 0:case 1:s=r;break;case 4:return o.label++,{value:r[1],done:!1};case 5:o.label++,n=r[1],r=[0];continue;case 7:r=o.ops.pop(),o.trys.pop();continue;default:if(!((s=(s=o.trys).length>0&&s[s.length-1])||6!==r[0]&&2!==r[0])){o=0;continue}if(3===r[0]&&(!s||r[1]>s[0]&&r[1]<s[3])){o.label=r[1];break}if(6===r[0]&&o.label<s[1]){o.label=s[1],s=r;break}if(s&&o.label<s[2]){o.label=s[2],o.ops.push(r);break}s[2]&&o.ops.pop(),o.trys.pop();continue}r=e.call(t,o)}catch(t){r=[6,t],n=0}finally{i=s=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,a])}}}(this,(function(t){switch(t.label){case 0:return[4,navigator.clipboard.writeText(e(this.json)?JSON.stringify(this.json):this.json)];case 1:return t.sent(),null===(n=(i=this.config).afterCopyHandler)||void 0===n||n.call(i),[2]}}))},new((r=void 0)||(r=Promise))((function(t,e){function i(t){try{a(o.next(t))}catch(t){e(t)}}function n(t){try{a(o.throw(t))}catch(t){e(t)}}function a(e){e.done?t(e.value):new r((function(t){t(e.value)})).then(i,n)}a((o=o.apply(s,[])).next())}))},d.prototype.openAtDepth=function(t){void 0===t&&(t=1),t<0||(this.open=t,this.isOpen=0!==t,this.element&&(this.removeChildren(!1),0===t?this.element.classList.remove(r("open")):(this.appendChildren(this.config.animateOpen),this.element.classList.add(r("open")))))},d.prototype.getInlinepreview=function(){var t=this;if(this.isArray){var e=this.json.slice(0,this.config.hoverPreviewArrayCount).map(s);return e.length<this.json.length&&e.push("..."),"["+e.join(", ")+"]"}var i=this.keys,n=i.slice(0,this.config.hoverPreviewFieldCount).map((function(e){var i=(e+": "+s(t.json[e])).replace(/\n/g,"");return i.length>35?i.substring(0,32)+"...":i})),r=i.length>=this.config.hoverPreviewFieldCount?", …":"";return"{ "+n.join(", ")+r+" }"},d.prototype.render=function(){this.element=o("div","row");var t=this.isObject?o("a","toggler-link"):o("span");if(this.isArrayRange?t.appendChild(o("span","range","["+this.displayKey+"]")):this.hasKey&&(t.appendChild(o("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(o("span","toggler")),this.isObject&&!this.useToJSON){var e=o("span","value"),i=o("span");if(!this.isArrayRange){var s=o("span","constructor-name",this.constructorName);i.appendChild(s)}if(this.isArray&&!this.isArrayRange){var a=o("span");a.appendChild(o("span","bracket","[")),a.appendChild(o("span","number",this.json.length)),a.appendChild(o("span","bracket","]")),i.appendChild(a)}var l=o("span","preview",this.getInlinepreview());i.appendChild(l),e.appendChild(i),t.appendChild(e)}else{(e=this.isUrl?o("a"):o("span")).classList.add(r(this.type)),this.isDate&&e.classList.add(r("date")),this.isUrl&&(e.classList.add(r("url")),e.setAttribute("href",this.json));var c=n(this.type,this.json,this.useToJSON?this.json.toJSON():this.json);e.appendChild(document.createTextNode(c)),t.appendChild(e)}if(this.isObject&&this.config.hoverPreviewEnabled){var h=o("span","preview-text");h.appendChild(document.createTextNode(this.getInlinepreview())),t.appendChild(h)}var u=o("div","children");this.isObject&&u.classList.add(r("object")),this.isArray&&u.classList.add(r("array")),this.isEmpty&&u.classList.add(r("empty")),this.config&&this.config.theme&&this.element.classList.add(r(this.config.theme)),this.isOpen&&this.element.classList.add(r("open"));var d=o("button","copy");return d.classList.add("fas"),d.classList.add("fa-clone"),d.addEventListener("click",this.onCopy.bind(this)),t.prepend(d),this.element.appendChild(t),this.element.appendChild(u),this.isObject&&this.isOpen&&this.appendChildren(),this.isObject&&!this.useToJSON&&t.addEventListener("click",this.toggleOpen.bind(this)),this.element},d.prototype.appendChildren=function(t){var e=this;void 0===t&&(t=!1);var i=this.element.querySelector("div."+r("children"));if(i&&!this.isEmpty){var n=function(t,n){var s=e.isLargeArray?[n*e.config.maxArrayItems,Math.min(e.json.length-1,n*e.config.maxArrayItems+(e.config.maxArrayItems-1))]:void 0,r=e.isArrayRange?(e.arrayRange[0]+n).toString():t,o=new d(s?e.json.slice(s[0],s[1]+1):e.json[t],e.open-1,e.config,t,r,s?e.path:e.path.concat(r),s,e.level+1);i.appendChild(o.render())};if(t){var s=0,o=function(){var t=e.keys[s];n(t,s),(s+=1)<e.keys.length&&(s>10?o():h(o))};h(o)}else this.keys.forEach((function(t,e){return n(t,e)}))}},d.prototype.removeChildren=function(t){void 0===t&&(t=!1);var e=this.element.querySelector("div."+r("children"));if(t){var i=0,n=function(){e&&e.children.length&&(e.removeChild(e.children[0]),(i+=1)>10?n():h(n))};h(n)}else e&&(e.innerHTML="")},d}()}()},3348:t=>{t.exports='\n <div class="buttons"></div>\n'},3357:(t,e,i)=>{var n=i(9931);t.exports=function(t,e){return null==t||n(t,e)}},3360:(t,e,i)=>{var n=i(3243);t.exports=function(t,e,i){"__proto__"==e&&n?n(t,e,{configurable:!0,enumerable:!0,value:i,writable:!0}):t[e]=i}},3488:t=>{t.exports=function(t){return t}},3519:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.XHR=void 0;const n=i(4110),s=i(6235);e.XHR=function(t){const e=t.xdomain;try{if("undefined"!=typeof XMLHttpRequest&&(!e||n.hasCORS))return new XMLHttpRequest}catch(t){}if(!e)try{return new(s.globalThisShim[["Active"].concat("Object").join("X")])("Microsoft.XMLHTTP")}catch(t){}}},3560:(t,e,i)=>{var n=i(3170);t.exports=function(t,e,i){return null==t?t:n(t,e,i)}},3661:(t,e,i)=>{var n=i(3040),s=i(7670),r=i(289),o=i(4509),a=i(2949);function l(t){var e=-1,i=null==t?0:t.length;for(this.clear();++e<i;){var n=t[e];this.set(n[0],n[1])}}l.prototype.clear=n,l.prototype.delete=s,l.prototype.get=r,l.prototype.has=o,l.prototype.set=a,t.exports=l},3701:function(t,e,i){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.PanelComponent=void 0;const s=n(i(7341)),r=i(1135),o=s.default.compile(i(9567));class a extends r.Component{constructor(t){super(o(t)),this.content=new r.Component(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 a(t)}}e.PanelComponent=a},3702:t=>{t.exports=function(){this.__data__=[],this.size=0}},3731:(t,e,i)=>{var n=i(7422),s=i(5160);t.exports=function(t,e){return e.length<2?t:n(t,s(e,0,-1))}},3769:(t,e)=>{"use strict";e.__esModule=!0;var i=["description","fileName","lineNumber","endLineNumber","message","name","number","stack"];function n(t,e){var s=e&&e.loc,r=void 0,o=void 0,a=void 0,l=void 0;s&&(r=s.start.line,o=s.end.line,a=s.start.column,l=s.end.column,t+=" - "+r+":"+a);for(var c=Error.prototype.constructor.call(this,t),h=0;h<i.length;h++)this[i[h]]=c[i[h]];Error.captureStackTrace&&Error.captureStackTrace(this,n);try{s&&(this.lineNumber=r,this.endLineNumber=o,Object.defineProperty?(Object.defineProperty(this,"column",{value:a,enumerable:!0}),Object.defineProperty(this,"endColumn",{value:l,enumerable:!0})):(this.column=a,this.endColumn=l))}catch(t){}}n.prototype=new Error,e.default=n,t.exports=e.default},3776:function(t,e,i){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,i,n){void 0===n&&(n=i),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[i]}})}:function(t,e,i,n){void 0===n&&(n=i),t[n]=e[i]}),s=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),r=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var i in t)"default"!==i&&Object.prototype.hasOwnProperty.call(t,i)&&n(e,t,i);return s(e,t),e},o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.Manager=void 0;const a=i(4956),l=i(6214),c=r(i(4627)),h=i(5942),u=i(7743),d=i(7285),p=o(i(7833)).default("socket.io-client:manager");class f extends d.Emitter{constructor(t,e){var i;super(),this.nsps={},this.subs=[],t&&"object"==typeof t&&(e=t,t=void 0),(e=e||{}).path=e.path||"/socket.io",this.opts=e,a.installTimerFunctions(this,e),this.reconnection(!1!==e.reconnection),this.reconnectionAttempts(e.reconnectionAttempts||1/0),this.reconnectionDelay(e.reconnectionDelay||1e3),this.reconnectionDelayMax(e.reconnectionDelayMax||5e3),this.randomizationFactor(null!==(i=e.randomizationFactor)&&void 0!==i?i:.5),this.backoff=new u.Backoff({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(null==e.timeout?2e4:e.timeout),this._readyState="closed",this.uri=t;const n=e.parser||c;this.encoder=new n.Encoder,this.decoder=new n.Decoder,this._autoConnect=!1!==e.autoConnect,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,this):this._reconnection}reconnectionAttempts(t){return void 0===t?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var e;return void 0===t?this._reconnectionDelay:(this._reconnectionDelay=t,null===(e=this.backoff)||void 0===e||e.setMin(t),this)}randomizationFactor(t){var e;return void 0===t?this._randomizationFactor:(this._randomizationFactor=t,null===(e=this.backoff)||void 0===e||e.setJitter(t),this)}reconnectionDelayMax(t){var e;return void 0===t?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,null===(e=this.backoff)||void 0===e||e.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&0===this.backoff.attempts&&this.reconnect()}open(t){if(p("readyState %s",this._readyState),~this._readyState.indexOf("open"))return this;p("opening %s",this.uri),this.engine=new a.Socket(this.uri,this.opts);const e=this.engine,i=this;this._readyState="opening",this.skipReconnect=!1;const n=h.on(e,"open",(function(){i.onopen(),t&&t()})),s=h.on(e,"error",(e=>{p("error"),i.cleanup(),i._readyState="closed",this.emitReserved("error",e),t?t(e):i.maybeReconnectOnOpen()}));if(!1!==this._timeout){const t=this._timeout;p("connect attempt will timeout after %d",t),0===t&&n();const i=this.setTimeoutFn((()=>{p("connect attempt timed out after %d",t),n(),e.close(),e.emit("error",new Error("timeout"))}),t);this.opts.autoUnref&&i.unref(),this.subs.push((function(){clearTimeout(i)}))}return this.subs.push(n),this.subs.push(s),this}connect(t){return this.open(t)}onopen(){p("open"),this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(h.on(t,"ping",this.onping.bind(this)),h.on(t,"data",this.ondata.bind(this)),h.on(t,"error",this.onerror.bind(this)),h.on(t,"close",this.onclose.bind(this)),h.on(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(t){this.onclose("parse error",t)}}ondecoded(t){a.nextTick((()=>{this.emitReserved("packet",t)}),this.setTimeoutFn)}onerror(t){p("error",t),this.emitReserved("error",t)}socket(t,e){let i=this.nsps[t];return i||(i=new l.Socket(this,t,e),this.nsps[t]=i),i}_destroy(t){const e=Object.keys(this.nsps);for(const t of e)if(this.nsps[t].active)return void p("socket %s is still active, skipping close",t);this._close()}_packet(t){p("writing packet %j",t);const e=this.encoder.encode(t);for(let i=0;i<e.length;i++)this.engine.write(e[i],t.options)}cleanup(){p("cleanup"),this.subs.forEach((t=>t())),this.subs.length=0,this.decoder.destroy()}_close(){p("disconnect"),this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(t,e){p("closed due to %s",t),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)p("reconnect failed"),this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const e=this.backoff.duration();p("will wait %dms before reconnect attempt",e),this._reconnecting=!0;const i=this.setTimeoutFn((()=>{t.skipReconnect||(p("attempting reconnect"),this.emitReserved("reconnect_attempt",t.backoff.attempts),t.skipReconnect||t.open((e=>{e?(p("reconnect attempt error"),t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",e)):(p("reconnect success"),t.onreconnect())})))}),e);this.opts.autoUnref&&i.unref(),this.subs.push((function(){clearTimeout(i)}))}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}e.Manager=f},3805:t=>{t.exports=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},3862:t=>{t.exports=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}},3865:(t,e,i)=>{"use strict";e.__esModule=!0,e.createProtoAccessControl=function(t){var e=Object.create(null);e.constructor=!1,e.__defineGetter__=!1,e.__defineSetter__=!1,e.__lookupGetter__=!1;var i=Object.create(null);return i.__proto__=!1,{properties:{whitelist:n.createNewLookupObject(i,t.allowedProtoProperties),defaultValue:t.allowProtoPropertiesByDefault},methods:{whitelist:n.createNewLookupObject(e,t.allowedProtoMethods),defaultValue:t.allowProtoMethodsByDefault}}},e.resultIsAllowed=function(t,e,i){return function(t,e){return void 0!==t.whitelist[e]?!0===t.whitelist[e]:void 0!==t.defaultValue?t.defaultValue:(function(t){!0!==r[t]&&(r[t]=!0,s.log("error",'Handlebars: Access has been denied to resolve the property "'+t+'" because it is not an "own property" of its parent.\nYou can add a runtime option to disable the check or this warning:\nSee https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details'))}(e),!1)}("function"==typeof t?e.methods:e.properties,i)},e.resetLoggedProperties=function(){Object.keys(r).forEach((function(t){delete r[t]}))};var n=i(9726),s=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e.default=t,e}(i(566)),r=Object.create(null)},3912:(t,e,i)=>{var n=i(1074),s=i(9698),r=i(2054);t.exports=function(t){return s(t)?r(t):n(t)}},4001:function(t){t.exports=function(){"use strict";function t(t){return t+.5|0}const e=(t,e,i)=>Math.max(Math.min(t,i),e);function i(i){return e(t(2.55*i),0,255)}function n(i){return e(t(255*i),0,255)}function s(i){return e(t(i/2.55)/100,0,1)}function r(i){return e(t(100*i),0,100)}const o={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},a=[..."0123456789ABCDEF"],l=t=>a[15&t],c=t=>a[(240&t)>>4]+a[15&t],h=t=>(240&t)>>4==(15&t);function u(t){var e,i=t.length;return"#"===t[0]&&(4===i||5===i?e={r:255&17*o[t[1]],g:255&17*o[t[2]],b:255&17*o[t[3]],a:5===i?17*o[t[4]]:255}:7!==i&&9!==i||(e={r:o[t[1]]<<4|o[t[2]],g:o[t[3]]<<4|o[t[4]],b:o[t[5]]<<4|o[t[6]],a:9===i?o[t[7]]<<4|o[t[8]]:255})),e}function d(t){var e=(t=>h(t.r)&&h(t.g)&&h(t.b)&&h(t.a))(t)?l:c;return t?"#"+e(t.r)+e(t.g)+e(t.b)+((t,e)=>t<255?e(t):"")(t.a,e):void 0}const p=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function f(t,e,i){const n=e*Math.min(i,1-i),s=(e,s=(e+t/30)%12)=>i-n*Math.max(Math.min(s-3,9-s,1),-1);return[s(0),s(8),s(4)]}function g(t,e,i){const n=(n,s=(n+t/60)%6)=>i-i*e*Math.max(Math.min(s,4-s,1),0);return[n(5),n(3),n(1)]}function m(t,e,i){const n=f(t,1,.5);let s;for(e+i>1&&(s=1/(e+i),e*=s,i*=s),s=0;s<3;s++)n[s]*=1-e-i,n[s]+=e;return n}function b(t){const e=t.r/255,i=t.g/255,n=t.b/255,s=Math.max(e,i,n),r=Math.min(e,i,n),o=(s+r)/2;let a,l,c;return s!==r&&(c=s-r,l=o>.5?c/(2-s-r):c/(s+r),a=function(t,e,i,n,s){return t===s?(e-i)/n+(e<i?6:0):e===s?(i-t)/n+2:(t-e)/n+4}(e,i,n,c,s),a=60*a+.5),[0|a,l||0,o]}function y(t,e,i,s){return(Array.isArray(e)?t(e[0],e[1],e[2]):t(e,i,s)).map(n)}function v(t,e,i){return y(f,t,e,i)}function _(t,e,i){return y(m,t,e,i)}function x(t,e,i){return y(g,t,e,i)}function w(t){return(t%360+360)%360}function k(t){const e=p.exec(t);let s,r=255;if(!e)return;e[5]!==s&&(r=e[6]?i(+e[5]):n(+e[5]));const o=w(+e[2]),a=+e[3]/100,l=+e[4]/100;return s="hwb"===e[1]?_(o,a,l):"hsv"===e[1]?x(o,a,l):v(o,a,l),{r:s[0],g:s[1],b:s[2],a:r}}function S(t,e){var i=b(t);i[0]=w(i[0]+e),i=v(i),t.r=i[0],t.g=i[1],t.b=i[2]}function P(t){if(!t)return;const e=b(t),i=e[0],n=r(e[1]),o=r(e[2]);return t.a<255?`hsla(${i}, ${n}%, ${o}%, ${s(t.a)})`:`hsl(${i}, ${n}%, ${o}%)`}const O={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"},C={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"};let M;function E(t){M||(M=function(){const t={},e=Object.keys(C),i=Object.keys(O);let n,s,r,o,a;for(n=0;n<e.length;n++){for(o=a=e[n],s=0;s<i.length;s++)r=i[s],a=a.replace(r,O[r]);r=parseInt(C[o],16),t[a]=[r>>16&255,r>>8&255,255&r]}return t}(),M.transparent=[0,0,0,0]);const e=M[t.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:4===e.length?e[3]:255}}const A=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function L(t){const n=A.exec(t);let s,r,o,a=255;if(n){if(n[7]!==s){const t=+n[7];a=n[8]?i(t):e(255*t,0,255)}return s=+n[1],r=+n[3],o=+n[5],s=255&(n[2]?i(s):e(s,0,255)),r=255&(n[4]?i(r):e(r,0,255)),o=255&(n[6]?i(o):e(o,0,255)),{r:s,g:r,b:o,a}}}function D(t){return t&&(t.a<255?`rgba(${t.r}, ${t.g}, ${t.b}, ${s(t.a)})`:`rgb(${t.r}, ${t.g}, ${t.b})`)}const T=t=>t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055,j=t=>t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4);function R(t,e,i){if(t){let n=b(t);n[e]=Math.max(0,Math.min(n[e]+n[e]*i,0===e?360:1)),n=v(n),t.r=n[0],t.g=n[1],t.b=n[2]}}function I(t,e){return t?Object.assign(e||{},t):t}function N(t){var e={r:0,g:0,b:0,a:255};return Array.isArray(t)?t.length>=3&&(e={r:t[0],g:t[1],b:t[2],a:255},t.length>3&&(e.a=n(t[3]))):(e=I(t,{r:0,g:0,b:0,a:1})).a=n(e.a),e}class F{constructor(t){if(t instanceof F)return t;const e=typeof t;let i;var n;"object"===e?i=N(t):"string"===e&&(i=u(t)||E(t)||("r"===(n=t).charAt(0)?L(n):k(n))),this._rgb=i,this._valid=!!i}get valid(){return this._valid}get rgb(){var t=I(this._rgb);return t&&(t.a=s(t.a)),t}set rgb(t){this._rgb=N(t)}rgbString(){return this._valid?D(this._rgb):void 0}hexString(){return this._valid?d(this._rgb):void 0}hslString(){return this._valid?P(this._rgb):void 0}mix(t,e){if(t){const i=this.rgb,n=t.rgb;let s;const r=e===s?.5:e,o=2*r-1,a=i.a-n.a,l=((o*a==-1?o:(o+a)/(1+o*a))+1)/2;s=1-l,i.r=255&l*i.r+s*n.r+.5,i.g=255&l*i.g+s*n.g+.5,i.b=255&l*i.b+s*n.b+.5,i.a=r*i.a+(1-r)*n.a,this.rgb=i}return this}interpolate(t,e){return t&&(this._rgb=function(t,e,i){const r=j(s(t.r)),o=j(s(t.g)),a=j(s(t.b));return{r:n(T(r+i*(j(s(e.r))-r))),g:n(T(o+i*(j(s(e.g))-o))),b:n(T(a+i*(j(s(e.b))-a))),a:t.a+i*(e.a-t.a)}}(this._rgb,t._rgb,e)),this}clone(){return new F(this.rgb)}alpha(t){return this._rgb.a=n(t),this}clearer(t){return this._rgb.a*=1-t,this}greyscale(){const e=this._rgb,i=t(.3*e.r+.59*e.g+.11*e.b);return e.r=e.g=e.b=i,this}opaquer(t){return this._rgb.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 R(this._rgb,2,t),this}darken(t){return R(this._rgb,2,-t),this}saturate(t){return R(this._rgb,1,t),this}desaturate(t){return R(this._rgb,1,-t),this}rotate(t){return S(this._rgb,t),this}}function B(t){return new F(t)}var H=Object.freeze({__proto__:null,Color:F,b2n:s,b2p:function(i){return e(t(i/2.55),0,100)},default:B,hexParse:u,hexString:d,hsl2rgb:v,hslString:P,hsv2rgb:x,hueParse:k,hwb2rgb:_,lim:e,n2b:n,n2p:r,nameParse:E,p2b:i,rgb2hsl:b,rgbParse:L,rgbString:D,rotate:S,round:t});return Object.assign(B,H)}()},4087:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.defaultBinaryType=e.usingBrowserWebSocket=e.WebSocket=e.nextTick=void 0;const n=i(6235);e.nextTick="function"==typeof Promise&&"function"==typeof Promise.resolve?t=>Promise.resolve().then(t):(t,e)=>e(t,0),e.WebSocket=n.globalThisShim.WebSocket||n.globalThisShim.MozWebSocket,e.usingBrowserWebSocket=!0,e.defaultBinaryType="arraybuffer"},4089:function(t,e,i){"use strict";var n,s=this&&this.__createBinding||(Object.create?function(t,e,i,n){void 0===n&&(n=i);var s=Object.getOwnPropertyDescriptor(e,i);s&&!("get"in s?!e.__esModule:s.writable||s.configurable)||(s={enumerable:!0,get:function(){return e[i]}}),Object.defineProperty(t,n,s)}:function(t,e,i,n){void 0===n&&(n=i),t[n]=e[i]}),r=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),o=this&&this.__importStar||(n=function(t){return n=Object.getOwnPropertyNames||function(t){var e=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[e.length]=i);return e},n(t)},function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var i=n(t),o=0;o<i.length;o++)"default"!==i[o]&&s(e,t,i[o]);return r(e,t),e}),a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const l=a(i(7341)),c=o(i(716)),h=o(i(4156));e.default={init:()=>{Object.entries(c).forEach((([t,e])=>l.default.registerHelper(t,e))),Object.entries(h).forEach((([t,e])=>l.default.registerPartial(t,e)))}}},4110:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.hasCORS=void 0;let i=!1;try{i="undefined"!=typeof XMLHttpRequest&&"withCredentials"in new XMLHttpRequest}catch(t){}e.hasCORS=i},4128:(t,e,i)=>{var n=i(1800),s=/^\s+/;t.exports=function(t){return t?t.slice(0,n(t)+1).replace(s,""):t}},4138:t=>{t.exports='\n <section id="history">\n <div class="storage"></div>\n\n <div class="controls">\n <div class="main">\n <button class="icon-only" id="expand"><i class="fas fa-chevron-down"></i></button>\n </div>\n\n <div class="additional container hidden"></div>\n </div>\n\n <div class="content"></div>\n </section>\n'},4156:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.truncated=e.expectationMeta=void 0,e.expectationMeta=i(8392),e.truncated=i(8980)},4208:t=>{t.exports='\n <div class="empty">\n <i class="fas fa-hourglass-start"></i>\n <p>There\'s still nothing...</p>\n </div>\n'},4218:t=>{t.exports=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}},4353:function(t){t.exports=function(){"use strict";var t=6e4,e=36e5,i="millisecond",n="second",s="minute",r="hour",o="day",a="week",l="month",c="quarter",h="year",u="date",d="Invalid Date",p=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,f=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,g={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var e=["th","st","nd","rd"],i=t%100;return"["+t+(e[(i-20)%10]||e[i]||e[0])+"]"}},m=function(t,e,i){var n=String(t);return!n||n.length>=e?t:""+Array(e+1-n.length).join(i)+t},b={s:m,z:function(t){var e=-t.utcOffset(),i=Math.abs(e),n=Math.floor(i/60),s=i%60;return(e<=0?"+":"-")+m(n,2,"0")+":"+m(s,2,"0")},m:function t(e,i){if(e.date()<i.date())return-t(i,e);var n=12*(i.year()-e.year())+(i.month()-e.month()),s=e.clone().add(n,l),r=i-s<0,o=e.clone().add(n+(r?-1:1),l);return+(-(n+(i-s)/(r?s-o:o-s))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return{M:l,y:h,w:a,d:o,D:u,h:r,m:s,s:n,ms:i,Q:c}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},y="en",v={};v[y]=g;var _="$isDayjsObject",x=function(t){return t instanceof P||!(!t||!t[_])},w=function t(e,i,n){var s;if(!e)return y;if("string"==typeof e){var r=e.toLowerCase();v[r]&&(s=r),i&&(v[r]=i,s=r);var o=e.split("-");if(!s&&o.length>1)return t(o[0])}else{var a=e.name;v[a]=e,s=a}return!n&&s&&(y=s),s||!n&&y},k=function(t,e){if(x(t))return t.clone();var i="object"==typeof e?e:{};return i.date=t,i.args=arguments,new P(i)},S=b;S.l=w,S.i=x,S.w=function(t,e){return k(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var P=function(){function g(t){this.$L=w(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[_]=!0}var m=g.prototype;return m.parse=function(t){this.$d=function(t){var e=t.date,i=t.utc;if(null===e)return new Date(NaN);if(S.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var n=e.match(p);if(n){var s=n[2]-1||0,r=(n[7]||"0").substring(0,3);return i?new Date(Date.UTC(n[1],s,n[3]||1,n[4]||0,n[5]||0,n[6]||0,r)):new Date(n[1],s,n[3]||1,n[4]||0,n[5]||0,n[6]||0,r)}}return new Date(e)}(t),this.init()},m.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},m.$utils=function(){return S},m.isValid=function(){return!(this.$d.toString()===d)},m.isSame=function(t,e){var i=k(t);return this.startOf(e)<=i&&i<=this.endOf(e)},m.isAfter=function(t,e){return k(t)<this.startOf(e)},m.isBefore=function(t,e){return this.endOf(e)<k(t)},m.$g=function(t,e,i){return S.u(t)?this[e]:this.set(i,t)},m.unix=function(){return Math.floor(this.valueOf()/1e3)},m.valueOf=function(){return this.$d.getTime()},m.startOf=function(t,e){var i=this,c=!!S.u(e)||e,d=S.p(t),p=function(t,e){var n=S.w(i.$u?Date.UTC(i.$y,e,t):new Date(i.$y,e,t),i);return c?n:n.endOf(o)},f=function(t,e){return S.w(i.toDate()[t].apply(i.toDate("s"),(c?[0,0,0,0]:[23,59,59,999]).slice(e)),i)},g=this.$W,m=this.$M,b=this.$D,y="set"+(this.$u?"UTC":"");switch(d){case h:return c?p(1,0):p(31,11);case l:return c?p(1,m):p(0,m+1);case a:var v=this.$locale().weekStart||0,_=(g<v?g+7:g)-v;return p(c?b-_:b+(6-_),m);case o:case u:return f(y+"Hours",0);case r:return f(y+"Minutes",1);case s:return f(y+"Seconds",2);case n:return f(y+"Milliseconds",3);default:return this.clone()}},m.endOf=function(t){return this.startOf(t,!1)},m.$set=function(t,e){var a,c=S.p(t),d="set"+(this.$u?"UTC":""),p=(a={},a[o]=d+"Date",a[u]=d+"Date",a[l]=d+"Month",a[h]=d+"FullYear",a[r]=d+"Hours",a[s]=d+"Minutes",a[n]=d+"Seconds",a[i]=d+"Milliseconds",a)[c],f=c===o?this.$D+(e-this.$W):e;if(c===l||c===h){var g=this.clone().set(u,1);g.$d[p](f),g.init(),this.$d=g.set(u,Math.min(this.$D,g.daysInMonth())).$d}else p&&this.$d[p](f);return this.init(),this},m.set=function(t,e){return this.clone().$set(t,e)},m.get=function(t){return this[S.p(t)]()},m.add=function(i,c){var u,d=this;i=Number(i);var p=S.p(c),f=function(t){var e=k(d);return S.w(e.date(e.date()+Math.round(t*i)),d)};if(p===l)return this.set(l,this.$M+i);if(p===h)return this.set(h,this.$y+i);if(p===o)return f(1);if(p===a)return f(7);var g=(u={},u[s]=t,u[r]=e,u[n]=1e3,u)[p]||1,m=this.$d.getTime()+i*g;return S.w(m,this)},m.subtract=function(t,e){return this.add(-1*t,e)},m.format=function(t){var e=this,i=this.$locale();if(!this.isValid())return i.invalidDate||d;var n=t||"YYYY-MM-DDTHH:mm:ssZ",s=S.z(this),r=this.$H,o=this.$m,a=this.$M,l=i.weekdays,c=i.months,h=i.meridiem,u=function(t,i,s,r){return t&&(t[i]||t(e,n))||s[i].slice(0,r)},p=function(t){return S.s(r%12||12,t,"0")},g=h||function(t,e,i){var n=t<12?"AM":"PM";return i?n.toLowerCase():n};return n.replace(f,(function(t,n){return n||function(t){switch(t){case"YY":return String(e.$y).slice(-2);case"YYYY":return S.s(e.$y,4,"0");case"M":return a+1;case"MM":return S.s(a+1,2,"0");case"MMM":return u(i.monthsShort,a,c,3);case"MMMM":return u(c,a);case"D":return e.$D;case"DD":return S.s(e.$D,2,"0");case"d":return String(e.$W);case"dd":return u(i.weekdaysMin,e.$W,l,2);case"ddd":return u(i.weekdaysShort,e.$W,l,3);case"dddd":return l[e.$W];case"H":return String(r);case"HH":return S.s(r,2,"0");case"h":return p(1);case"hh":return p(2);case"a":return g(r,o,!0);case"A":return g(r,o,!1);case"m":return String(o);case"mm":return S.s(o,2,"0");case"s":return String(e.$s);case"ss":return S.s(e.$s,2,"0");case"SSS":return S.s(e.$ms,3,"0");case"Z":return s}return null}(t)||s.replace(":","")}))},m.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},m.diff=function(i,u,d){var p,f=this,g=S.p(u),m=k(i),b=(m.utcOffset()-this.utcOffset())*t,y=this-m,v=function(){return S.m(f,m)};switch(g){case h:p=v()/12;break;case l:p=v();break;case c:p=v()/3;break;case a:p=(y-b)/6048e5;break;case o:p=(y-b)/864e5;break;case r:p=y/e;break;case s:p=y/t;break;case n:p=y/1e3;break;default:p=y}return d?p:S.a(p)},m.daysInMonth=function(){return this.endOf(l).$D},m.$locale=function(){return v[this.$L]},m.locale=function(t,e){if(!t)return this.$L;var i=this.clone(),n=w(t,e,!0);return n&&(i.$L=n),i},m.clone=function(){return S.w(this.$d,this)},m.toDate=function(){return new Date(this.valueOf())},m.toJSON=function(){return this.isValid()?this.toISOString():null},m.toISOString=function(){return this.$d.toISOString()},m.toString=function(){return this.$d.toUTCString()},g}(),O=P.prototype;return k.prototype=O,[["$ms",i],["$s",n],["$m",s],["$H",r],["$W",o],["$M",l],["$y",h],["$D",u]].forEach((function(t){O[t[1]]=function(e){return this.$g(e,t[0],t[1])}})),k.extend=function(t,e){return t.$i||(t(e,P,k),t.$i=!0),k},k.locale=w,k.isDayjs=x,k.unix=function(t){return k(1e3*t)},k.en=v[y],k.Ls=v,k.p={},k}()},4383:(t,e,i)=>{var n=i(6001),s=i(8816)((function(t,e){return null==t?{}:n(t,e)}));t.exports=s},4394:(t,e,i)=>{var n=i(2552),s=i(346);t.exports=function(t){return"symbol"==typeof t||s(t)&&"[object Symbol]"==n(t)}},4509:(t,e,i)=>{var n=i(2651);t.exports=function(t){return n(this,t).has(t)}},4528:t=>{t.exports=function(t,e){for(var i=-1,n=e.length,s=t.length;++i<n;)t[s+i]=e[i];return t}},4627:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Decoder=e.Encoder=e.PacketType=e.protocol=void 0;const n=i(7285),s=i(4926),r=i(9133),o=i(7833).default("socket.io-parser");var a;e.protocol=5,function(t){t[t.CONNECT=0]="CONNECT",t[t.DISCONNECT=1]="DISCONNECT",t[t.EVENT=2]="EVENT",t[t.ACK=3]="ACK",t[t.CONNECT_ERROR=4]="CONNECT_ERROR",t[t.BINARY_EVENT=5]="BINARY_EVENT",t[t.BINARY_ACK=6]="BINARY_ACK"}(a=e.PacketType||(e.PacketType={})),e.Encoder=class{constructor(t){this.replacer=t}encode(t){return o("encoding packet %j",t),t.type!==a.EVENT&&t.type!==a.ACK||!r.hasBinary(t)?[this.encodeAsString(t)]:(t.type=t.type===a.EVENT?a.BINARY_EVENT:a.BINARY_ACK,this.encodeAsBinary(t))}encodeAsString(t){let e=""+t.type;return t.type!==a.BINARY_EVENT&&t.type!==a.BINARY_ACK||(e+=t.attachments+"-"),t.nsp&&"/"!==t.nsp&&(e+=t.nsp+","),null!=t.id&&(e+=t.id),null!=t.data&&(e+=JSON.stringify(t.data,this.replacer)),o("encoded %j as %s",t,e),e}encodeAsBinary(t){const e=s.deconstructPacket(t),i=this.encodeAsString(e.packet),n=e.buffers;return n.unshift(i),n}};class l extends n.Emitter{constructor(t){super(),this.reviver=t}add(t){let e;if("string"==typeof t){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");e=this.decodeString(t),e.type===a.BINARY_EVENT||e.type===a.BINARY_ACK?(this.reconstructor=new c(e),0===e.attachments&&super.emitReserved("decoded",e)):super.emitReserved("decoded",e)}else{if(!r.isBinary(t)&&!t.base64)throw new Error("Unknown type: "+t);if(!this.reconstructor)throw new Error("got binary data when not reconstructing a packet");e=this.reconstructor.takeBinaryData(t),e&&(this.reconstructor=null,super.emitReserved("decoded",e))}}decodeString(t){let e=0;const i={type:Number(t.charAt(0))};if(void 0===a[i.type])throw new Error("unknown packet type "+i.type);if(i.type===a.BINARY_EVENT||i.type===a.BINARY_ACK){const n=e+1;for(;"-"!==t.charAt(++e)&&e!=t.length;);const s=t.substring(n,e);if(s!=Number(s)||"-"!==t.charAt(e))throw new Error("Illegal attachments");i.attachments=Number(s)}if("/"===t.charAt(e+1)){const n=e+1;for(;++e&&","!==t.charAt(e)&&e!==t.length;);i.nsp=t.substring(n,e)}else i.nsp="/";const n=t.charAt(e+1);if(""!==n&&Number(n)==n){const n=e+1;for(;++e;){const i=t.charAt(e);if(null==i||Number(i)!=i){--e;break}if(e===t.length)break}i.id=Number(t.substring(n,e+1))}if(t.charAt(++e)){const n=this.tryParse(t.substr(e));if(!l.isPayloadValid(i.type,n))throw new Error("invalid payload");i.data=n}return o("decoded %s as %j",t,i),i}tryParse(t){try{return JSON.parse(t,this.reviver)}catch(t){return!1}}static isPayloadValid(t,e){switch(t){case a.CONNECT:return"object"==typeof e;case a.DISCONNECT:return void 0===e;case a.CONNECT_ERROR:return"string"==typeof e||"object"==typeof e;case a.EVENT:case a.BINARY_EVENT:return Array.isArray(e)&&e.length>0;case a.ACK:case a.BINARY_ACK:return Array.isArray(e)}}destroy(){this.reconstructor&&this.reconstructor.finishedReconstruction()}}e.Decoder=l;class c{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const t=s.reconstructPacket(this.reconPack,this.buffers);return this.finishedReconstruction(),t}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}},4689:function(t,e,i){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.Transport=void 0;const s=i(6376),r=i(7285),o=i(5374),a=(0,n(i(7833)).default)("engine.io-client:transport");class l extends Error{constructor(t,e,i){super(t),this.description=e,this.context=i,this.type="TransportError"}}class c extends r.Emitter{constructor(t){super(),this.writable=!1,(0,o.installTimerFunctions)(this,t),this.opts=t,this.query=t.query,this.readyState="",this.socket=t.socket}onError(t,e,i){return super.emitReserved("error",new l(t,e,i)),this}open(){return"closed"!==this.readyState&&""!==this.readyState||(this.readyState="opening",this.doOpen()),this}close(){return"opening"!==this.readyState&&"open"!==this.readyState||(this.doClose(),this.onClose()),this}send(t){"open"===this.readyState?this.write(t):a("transport is not open, discarding packets")}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const e=(0,s.decodePacket)(t,this.socket.binaryType);this.onPacket(e)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}}e.Transport=c},4739:(t,e,i)=>{var n=i(6025);t.exports=function(t){var e=this.__data__,i=n(e,t);return i<0?void 0:e[i][1]}},4822:t=>{t.exports='\n <section id="expectations">\n <div class="storage"></div>\n\n <div class="controls">\n <div class="main">\n <button class="icon-only" id="expand"><i class="fas fa-chevron-down"></i></button>\n </div>\n\n <div class="additional container hidden"></div>\n </div>\n\n <div class="content"></div>\n </section>\n'},4840:(t,e,i)=>{var n="object"==typeof i.g&&i.g&&i.g.Object===Object&&i.g;t.exports=n},4926:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.reconstructPacket=e.deconstructPacket=void 0;const n=i(9133);function s(t,e){if(!t)return t;if(n.isBinary(t)){const i={_placeholder:!0,num:e.length};return e.push(t),i}if(Array.isArray(t)){const i=new Array(t.length);for(let n=0;n<t.length;n++)i[n]=s(t[n],e);return i}if("object"==typeof t&&!(t instanceof Date)){const i={};for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&(i[n]=s(t[n],e));return i}return t}function r(t,e){if(!t)return t;if(t&&!0===t._placeholder){if("number"==typeof t.num&&t.num>=0&&t.num<e.length)return e[t.num];throw new Error("illegal attachments")}if(Array.isArray(t))for(let i=0;i<t.length;i++)t[i]=r(t[i],e);else if("object"==typeof t)for(const i in t)Object.prototype.hasOwnProperty.call(t,i)&&(t[i]=r(t[i],e));return t}e.deconstructPacket=function(t){const e=[],i=t.data,n=t;return n.data=s(i,e),n.attachments=e.length,{packet:n,buffers:e}},e.reconstructPacket=function(t,e){return t.data=r(t.data,e),t.attachments=void 0,t}},4932:t=>{t.exports=function(t,e){for(var i=-1,n=null==t?0:t.length,s=Array(n);++i<n;)s[i]=e(t[i],i,t);return s}},4956:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.nextTick=e.parse=e.installTimerFunctions=e.transports=e.Transport=e.protocol=e.Socket=void 0;const n=i(604);Object.defineProperty(e,"Socket",{enumerable:!0,get:function(){return n.Socket}}),e.protocol=n.Socket.protocol;var s=i(4689);Object.defineProperty(e,"Transport",{enumerable:!0,get:function(){return s.Transport}});var r=i(9419);Object.defineProperty(e,"transports",{enumerable:!0,get:function(){return r.transports}});var o=i(5374);Object.defineProperty(e,"installTimerFunctions",{enumerable:!0,get:function(){return o.installTimerFunctions}});var a=i(1015);Object.defineProperty(e,"parse",{enumerable:!0,get:function(){return a.parse}});var l=i(4087);Object.defineProperty(e,"nextTick",{enumerable:!0,get:function(){return l.nextTick}})},4983:t=>{t.exports='\n <div class="viewer container"></div>\n'},5036:function(t,e,i){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.PopupsComponent=void 0;const s=n(i(7341)),r=i(1135),o=s.default.compile(i(7006));class a extends r.Component{constructor(){super(),this.element.classList.add("popups")}push(t,e={}){const i=this.compileHtmlStringToElement(o({message:t,level:e.level??"info"}));this.element.prepend(i),setTimeout((()=>i.remove()),3e3)}static build(){return new a}}e.PopupsComponent=a},5083:(t,e,i)=>{var n=i(1882),s=i(7296),r=i(3805),o=i(7473),a=/^\[object .+?Constructor\]$/,l=Function.prototype,c=Object.prototype,h=l.toString,u=c.hasOwnProperty,d=RegExp("^"+h.call(u).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=function(t){return!(!r(t)||s(t))&&(n(t)?d:a).test(o(t))}},5123:function(t,e,i){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const s=i(8007),r=n(i(7007)),o=i(1135),a=i(8769),l=(0,s.io)({path:`${location.pathname.split("/").slice(0,-3).join("/")}/socket.io/`});e.default=new class{constructor(){this.config=(0,a.cast)({history:{limit:100}}),this.instances={io:l},this.services={io:{exec:(t,e)=>new Promise((i=>l.emit(t,e,i))),subscribe:(t,e)=>l.on(t,e)}},this.storage=o.DynamicStorage.build("void",document.body),this.shared={},this.events=new r.default}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})}share(t){return Object.assign(this,{shared:t})}switchStorage(t){return Object.assign(this,{storage:t})}}},5138:function(t,e,i){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const s=n(i(7341)),r=i(2773),o=i(1135),a=n(i(5123)),l={section:s.default.compile(i(2901)),cache:s.default.compile(i(2922)),stats:s.default.compile(i(7933))},c={stats:r.PanelComponent.build({title:"Stats",icon:"fas fa-server",class:"stats",height:"XS",width:"M"}),cache:r.PanelComponent.build({title:"Cache",icon:"fas fa-database",class:"cache",height:"XS",width:"M"}).replace(l.cache({}))};e.default=o.Section.build(l.section({})).assignMeta({icon:"fas fa-cog"}).once("initialize",(async t=>{const e=o.Form.build(t.content);t.content.append(c.stats),t.content.append(c.cache),o.Button.build(c.cache.element.querySelector("button#delete")).handle((async()=>{const{data:t}=await a.default.services.io.exec("cache:delete",e.extract().cache);a.default.shared.popups.push(`Deleted <b>${t.redis?.count??0}</b> cache keys`)}))})).on("select",(async()=>{const{data:t}=await a.default.services.io.exec("stats");c.stats.replace(l.stats(t))}))},5160:t=>{t.exports=function(t,e,i){var n=-1,s=t.length;e<0&&(e=-e>s?0:s+e),(i=i>s?s:i)<0&&(i+=s),s=e>i?0:i-e>>>0,e>>>=0;for(var r=Array(s);++n<s;)r[n]=t[n+e];return r}},5288:t=>{t.exports=function(t,e){return t===e||t!=t&&e!=e}},5300:(t,e)=>{"use strict";e.__esModule=!0,e.default=function(t){t.registerHelper("log",(function(){for(var e=[void 0],i=arguments[arguments.length-1],n=0;n<arguments.length-1;n++)e.push(arguments[n]);var s=1;null!=i.hash.level?s=i.hash.level:i.data&&null!=i.data.level&&(s=i.data.level),e[0]=s,t.log.apply(t,e)}))},t.exports=e.default},5343:function(t,e,i){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.HistoryComponent=void 0;const s=n(i(7341)),r=i(6881),o=i(1135),a=s.default.compile(i(49));class l extends o.Component{constructor(t){super(),this.data=t,this.viewer=r.ViewerComponent.build({depth:2}).hide(),this.refresh()}provide(t){return Object.assign(this,{data:t})}refresh(){return this.replace(a(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}}},...this.data.snapshot.cache?.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},..."completed"===this.data.status&&{outgoing:this.data.snapshot.outgoing},...this.data.snapshot.forwarded&&{forwarded:this.data.snapshot.forwarded},...this.data.snapshot.messages?.length&&{messages:this.data.snapshot.messages}}),this.element.querySelector("div.meta").addEventListener("click",(t=>t.composedPath().some((t=>t?.classList?.contains("meta")))?this.viewer.isHidden?this.viewer.show():this.viewer.hide():null)),this}match(t){return[this.data.group,this.data.expectation?.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((e=>e?.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((e=>JSON.stringify(e)?.includes(t)))}static build(t){return new l(t)}}e.HistoryComponent=l},5374:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.byteLength=e.installTimerFunctions=e.pick=void 0;const n=i(6235);e.pick=function(t,...e){return e.reduce(((e,i)=>(t.hasOwnProperty(i)&&(e[i]=t[i]),e)),{})};const s=setTimeout,r=clearTimeout;e.installTimerFunctions=function(t,e){e.useNativeTimers?(t.setTimeoutFn=s.bind(n.globalThisShim),t.clearTimeoutFn=r.bind(n.globalThisShim)):(t.setTimeoutFn=setTimeout.bind(n.globalThisShim),t.clearTimeoutFn=clearTimeout.bind(n.globalThisShim))},e.byteLength=function(t){return"string"==typeof t?function(t){let e=0,i=0;for(let n=0,s=t.length;n<s;n++)e=t.charCodeAt(n),e<128?i+=1:e<2048?i+=2:e<55296||e>=57344?i+=3:(n++,i+=4);return i}(t):Math.ceil(1.33*(t.byteLength||t.size))}},5481:(t,e,i)=>{var n=i(9325)["__core-js_shared__"];t.exports=n},5635:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Button=void 0;class i{constructor(t){this.element=t,this.handlers=[],t.addEventListener("click",(t=>this.trigger(t)))}handle(t){return this.handlers.push((async e=>{this.element.classList.add("processed");try{await t(e)}finally{this.element.classList.remove("processed")}})),this}async trigger(t=new Event("manual")){for(const e of this.handlers)await e(t)}static build(t){return new i(t)}}e.Button=i},5749:(t,e,i)=>{var n=i(1042);t.exports=function(t,e){var i=this.__data__;return this.size+=this.has(t)?0:1,i[t]=n&&void 0===e?"__lodash_hash_undefined__":e,this}},5842:t=>{t.exports="\n <header>\n <div id=\"tabs\">\n {{#each tabs}}\n {{#compare type 'eq' 'separator'}}<hr>{{/compare}}\n\n {{#compare type 'eq' 'section'}}\n <button class=\"{{#unless entity.meta.name}}icon-only{{/unless}} {{#if isSelected}}checked{{/if}}\" id=\"{{id}}\">\n <i class=\"{{entity.meta.icon}}\"></i>{{entity.meta.name}}\n </button>\n {{/compare}}\n {{/each}}\n </div>\n </header>\n"},5891:(t,e,i)=>{var n=i(1873),s=i(2428),r=i(6449),o=n?n.isConcatSpreadable:void 0;t.exports=function(t){return r(t)||s(t)||!!(o&&t&&t[o])}},5940:(t,e,i)=>{"use strict";e.__esModule=!0,e.registerDefaultDecorators=function(t){s.default(t)};var n,s=(n=i(7430))&&n.__esModule?n:{default:n}},5942:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.on=void 0,e.on=function(t,e,i){return t.on(e,i),function(){t.off(e,i)}}},5970:(t,e,i)=>{var n=i(3120);t.exports=function(t){return null!=t&&t.length?n(t,1):[]}},6001:(t,e,i)=>{var n=i(7420),s=i(631);t.exports=function(t,e){return n(t,e,(function(e,i){return s(t,i)}))}},6009:(t,e,i)=>{t=i.nmd(t);var n=i(4840),s=e&&!e.nodeType&&e,r=s&&t&&!t.nodeType&&t,o=r&&r.exports===s&&n.process,a=function(){try{return r&&r.require&&r.require("util").types||o&&o.binding&&o.binding("util")}catch(t){}}();t.exports=a},6025:(t,e,i)=>{var n=i(5288);t.exports=function(t,e){for(var i=t.length;i--;)if(n(t[i][0],e))return i;return-1}},6097:(t,e,i)=>{"use strict";e.__esModule=!0;var n=i(2849);e.default=function(t){t.registerHelper("blockHelperMissing",(function(e,i){var s=i.inverse,r=i.fn;if(!0===e)return r(this);if(!1===e||null==e)return s(this);if(n.isArray(e))return e.length>0?(i.ids&&(i.ids=[i.name]),t.helpers.each(e,i)):s(this);if(i.data&&i.ids){var o=n.createFrame(i.data);o.contextPath=n.appendContextPath(i.data.contextPath,i.name),i={data:o}}return r(e,i)}))},t.exports=e.default},6110:(t,e,i)=>{var n=i(5083),s=i(392);t.exports=function(t,e){var i=s(t,e);return n(i)?i:void 0}},6201:(t,e)=>{"use strict";e.__esModule=!0;var i=function(){var t={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(t,e,i,n,s,r,o){var a=r.length-1;switch(s){case 1:return r[a-1];case 2:this.$=n.prepareProgram(r[a]);break;case 3:case 4:case 5:case 6:case 7:case 8:case 20:case 27:case 28:case 33:case 34:case 40:case 41:this.$=r[a];break;case 9:this.$={type:"CommentStatement",value:n.stripComment(r[a]),strip:n.stripFlags(r[a],r[a]),loc:n.locInfo(this._$)};break;case 10:this.$={type:"ContentStatement",original:r[a],value:r[a],loc:n.locInfo(this._$)};break;case 11:this.$=n.prepareRawBlock(r[a-2],r[a-1],r[a],this._$);break;case 12:this.$={path:r[a-3],params:r[a-2],hash:r[a-1]};break;case 13:this.$=n.prepareBlock(r[a-3],r[a-2],r[a-1],r[a],!1,this._$);break;case 14:this.$=n.prepareBlock(r[a-3],r[a-2],r[a-1],r[a],!0,this._$);break;case 15:this.$={open:r[a-5],path:r[a-4],params:r[a-3],hash:r[a-2],blockParams:r[a-1],strip:n.stripFlags(r[a-5],r[a])};break;case 16:case 17:this.$={path:r[a-4],params:r[a-3],hash:r[a-2],blockParams:r[a-1],strip:n.stripFlags(r[a-5],r[a])};break;case 18:this.$={strip:n.stripFlags(r[a-1],r[a-1]),program:r[a]};break;case 19:var l=n.prepareBlock(r[a-2],r[a-1],r[a],r[a],!1,this._$),c=n.prepareProgram([l],r[a-1].loc);c.chained=!0,this.$={strip:r[a-2].strip,program:c,chain:!0};break;case 21:this.$={path:r[a-1],strip:n.stripFlags(r[a-2],r[a])};break;case 22:case 23:this.$=n.prepareMustache(r[a-3],r[a-2],r[a-1],r[a-4],n.stripFlags(r[a-4],r[a]),this._$);break;case 24:this.$={type:"PartialStatement",name:r[a-3],params:r[a-2],hash:r[a-1],indent:"",strip:n.stripFlags(r[a-4],r[a]),loc:n.locInfo(this._$)};break;case 25:this.$=n.preparePartialBlock(r[a-2],r[a-1],r[a],this._$);break;case 26:this.$={path:r[a-3],params:r[a-2],hash:r[a-1],strip:n.stripFlags(r[a-4],r[a])};break;case 29:this.$={type:"SubExpression",path:r[a-3],params:r[a-2],hash:r[a-1],loc:n.locInfo(this._$)};break;case 30:this.$={type:"Hash",pairs:r[a],loc:n.locInfo(this._$)};break;case 31:this.$={type:"HashPair",key:n.id(r[a-2]),value:r[a],loc:n.locInfo(this._$)};break;case 32:this.$=n.id(r[a-1]);break;case 35:this.$={type:"StringLiteral",value:r[a],original:r[a],loc:n.locInfo(this._$)};break;case 36:this.$={type:"NumberLiteral",value:Number(r[a]),original:Number(r[a]),loc:n.locInfo(this._$)};break;case 37:this.$={type:"BooleanLiteral",value:"true"===r[a],original:"true"===r[a],loc:n.locInfo(this._$)};break;case 38:this.$={type:"UndefinedLiteral",original:void 0,value:void 0,loc:n.locInfo(this._$)};break;case 39:this.$={type:"NullLiteral",original:null,value:null,loc:n.locInfo(this._$)};break;case 42:this.$=n.preparePath(!0,r[a],this._$);break;case 43:this.$=n.preparePath(!1,r[a],this._$);break;case 44:r[a-2].push({part:n.id(r[a]),original:r[a],separator:r[a-1]}),this.$=r[a-2];break;case 45:this.$=[{part:n.id(r[a]),original:r[a]}];break;case 46:case 48:case 50:case 58:case 64:case 70:case 78:case 82:case 86:case 90:case 94:this.$=[];break;case 47:case 49:case 51:case 59:case 65:case 71:case 79:case 83:case 87:case 91:case 95:case 99:case 101:r[a-1].push(r[a]);break;case 98:case 100:this.$=[r[a]]}},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(t,e){throw new Error(t)},parse:function(t){var e=[0],i=[null],n=[],s=this.table,r="",o=0,a=0,l=0;this.lexer.setInput(t),this.lexer.yy=this.yy,this.yy.lexer=this.lexer,this.yy.parser=this,void 0===this.lexer.yylloc&&(this.lexer.yylloc={});var c=this.lexer.yylloc;n.push(c);var h=this.lexer.options&&this.lexer.options.ranges;"function"==typeof this.yy.parseError&&(this.parseError=this.yy.parseError);for(var u,d,p,f,g,m,b,y,v,_,x={};;){if(p=e[e.length-1],this.defaultActions[p]?f=this.defaultActions[p]:(null==u&&(_=void 0,"number"!=typeof(_=this.lexer.lex()||1)&&(_=this.symbols_[_]||_),u=_),f=s[p]&&s[p][u]),void 0===f||!f.length||!f[0]){var w="";if(!l){for(m in v=[],s[p])this.terminals_[m]&&m>2&&v.push("'"+this.terminals_[m]+"'");w=this.lexer.showPosition?"Parse error on line "+(o+1)+":\n"+this.lexer.showPosition()+"\nExpecting "+v.join(", ")+", got '"+(this.terminals_[u]||u)+"'":"Parse error on line "+(o+1)+": Unexpected "+(1==u?"end of input":"'"+(this.terminals_[u]||u)+"'"),this.parseError(w,{text:this.lexer.match,token:this.terminals_[u]||u,line:this.lexer.yylineno,loc:c,expected:v})}}if(f[0]instanceof Array&&f.length>1)throw new Error("Parse Error: multiple actions possible at state: "+p+", token: "+u);switch(f[0]){case 1:e.push(u),i.push(this.lexer.yytext),n.push(this.lexer.yylloc),e.push(f[1]),u=null,d?(u=d,d=null):(a=this.lexer.yyleng,r=this.lexer.yytext,o=this.lexer.yylineno,c=this.lexer.yylloc,l>0&&l--);break;case 2:if(b=this.productions_[f[1]][1],x.$=i[i.length-b],x._$={first_line:n[n.length-(b||1)].first_line,last_line:n[n.length-1].last_line,first_column:n[n.length-(b||1)].first_column,last_column:n[n.length-1].last_column},h&&(x._$.range=[n[n.length-(b||1)].range[0],n[n.length-1].range[1]]),void 0!==(g=this.performAction.call(x,r,a,o,this.yy,f[1],i,n)))return g;b&&(e=e.slice(0,-1*b*2),i=i.slice(0,-1*b),n=n.slice(0,-1*b)),e.push(this.productions_[f[1]][0]),i.push(x.$),n.push(x._$),y=s[e[e.length-2]][e[e.length-1]],e.push(y);break;case 3:return!0}}return!0}},e={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t){return this._input=t,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 t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,i=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e-1),this.offset-=e;var n=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),i.length-1&&(this.yylineno-=i.length-1);var s=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:i?(i.length===n.length?this.yylloc.first_column:0)+n[n.length-i.length].length-i[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[s[0],s[0]+this.yyleng-e]),this},more:function(){return this._more=!0,this},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},next:function(){if(this.done)return this.EOF;var t,e,i,n,s;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var r=this._currentRules(),o=0;o<r.length&&(!(i=this._input.match(this.rules[r[o]]))||e&&!(i[0].length>e[0].length)||(e=i,n=o,this.options.flex));o++);return e?((s=e[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=s.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:s?s[s.length-1].length-s[s.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,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(e[0].length),this.matched+=e[0],t=this.performAction.call(this,this.yy,this,r[n],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),t||void 0):""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return void 0!==t?t:this.lex()},begin:function(t){this.conditionStack.push(t)},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(t){this.begin(t)},options:{},performAction:function(t,e,i,n){function s(t,i){return e.yytext=e.yytext.substring(t,e.yyleng-i+t)}switch(i){case 0:if("\\\\"===e.yytext.slice(-2)?(s(0,1),this.begin("mu")):"\\"===e.yytext.slice(-1)?(s(0,1),this.begin("emu")):this.begin("mu"),e.yytext)return 15;break;case 1:case 5:return 15;case 2:return this.popState(),15;case 3:return this.begin("raw"),15;case 4:return this.popState(),"raw"===this.conditionStack[this.conditionStack.length-1]?15:(s(5,9),"END_RAW_BLOCK");case 6:case 22: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:case 16:return this.popState(),44;case 17:return 34;case 18:return 39;case 19:return 51;case 20:case 23:return 48;case 21:this.unput(e.yytext),this.popState(),this.begin("com");break;case 24:return 73;case 25:case 26:case 41:return 72;case 27:return 87;case 28:break;case 29:return this.popState(),54;case 30:return this.popState(),33;case 31:return e.yytext=s(1,2).replace(/\\"/g,'"'),80;case 32:return e.yytext=s(1,2).replace(/\\'/g,"'"),80;case 33:return 85;case 34: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 42:return e.yytext=e.yytext.replace(/\\([\\\]])/g,"$1"),72;case 43:return"INVALID";case 44:return 5}},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\/.)|]))))/,/^(?:\[(\\\]|[^\]])*\])/,/^(?:.)/,/^(?:$)/],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}}};function i(){this.yy={}}return t.lexer=e,i.prototype=t,t.Parser=i,new i}();e.default=i,t.exports=e.default},6214:function(t,e,i){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.Socket=void 0;const s=i(4627),r=i(5942),o=i(7285),a=n(i(7833)).default("socket.io-client:socket"),l=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class c extends o.Emitter{constructor(t,e,i){super(),this.connected=!1,this.receiveBuffer=[],this.sendBuffer=[],this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=e,i&&i.auth&&(this.auth=i.auth),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[r.on(t,"open",this.onopen.bind(this)),r.on(t,"packet",this.onpacket.bind(this)),r.on(t,"error",this.onerror.bind(this)),r.on(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected||(this.subEvents(),this.io._reconnecting||this.io.open(),"open"===this.io._readyState&&this.onopen()),this}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...e){if(l.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');e.unshift(t);const i={type:s.PacketType.EVENT,data:e,options:{}};if(i.options.compress=!1!==this.flags.compress,"function"==typeof e[e.length-1]){const t=this.ids++;a("emitting packet with ack id %d",t);const n=e.pop();this._registerAckCallback(t,n),i.id=t}const n=this.io.engine&&this.io.engine.transport&&this.io.engine.transport.writable;return!this.flags.volatile||n&&this.connected?this.connected?(this.notifyOutgoingListeners(i),this.packet(i)):this.sendBuffer.push(i):a("discard packet as the transport is not currently writable"),this.flags={},this}_registerAckCallback(t,e){const i=this.flags.timeout;if(void 0===i)return void(this.acks[t]=e);const n=this.io.setTimeoutFn((()=>{delete this.acks[t];for(let e=0;e<this.sendBuffer.length;e++)this.sendBuffer[e].id===t&&(a("removing packet with ack id %d from the buffer",t),this.sendBuffer.splice(e,1));a("event with ack id %d has timed out after %d ms",t,i),e.call(this,new Error("operation has timed out"))}),i);this.acks[t]=(...t)=>{this.io.clearTimeoutFn(n),e.apply(this,[null,...t])}}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){a("transport is open - connecting"),"function"==typeof this.auth?this.auth((t=>{this.packet({type:s.PacketType.CONNECT,data:t})})):this.packet({type:s.PacketType.CONNECT,data:this.auth})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,e){a("close (%s)",t),this.connected=!1,delete this.id,this.emitReserved("disconnect",t,e)}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case s.PacketType.CONNECT:if(t.data&&t.data.sid){const e=t.data.sid;this.onconnect(e)}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 s.PacketType.EVENT:case s.PacketType.BINARY_EVENT:this.onevent(t);break;case s.PacketType.ACK:case s.PacketType.BINARY_ACK:this.onack(t);break;case s.PacketType.DISCONNECT:this.ondisconnect();break;case s.PacketType.CONNECT_ERROR:this.destroy();const e=new Error(t.data.message);e.data=t.data.data,this.emitReserved("connect_error",e)}}onevent(t){const e=t.data||[];a("emitting event %j",e),null!=t.id&&(a("attaching ack callback to event"),e.push(this.ack(t.id))),this.connected?this.emitEvent(e):this.receiveBuffer.push(Object.freeze(e))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const e=this._anyListeners.slice();for(const i of e)i.apply(this,t)}super.emit.apply(this,t)}ack(t){const e=this;let i=!1;return function(...n){i||(i=!0,a("sending ack %j",n),e.packet({type:s.PacketType.ACK,id:t,data:n}))}}onack(t){const e=this.acks[t.id];"function"==typeof e?(a("calling ack %s with %j",t.id,t.data),e.apply(this,t.data),delete this.acks[t.id]):a("bad ack %s",t.id)}onconnect(t){a("socket connected with id %s",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(){a("server disconnect (%s)",this.nsp),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&&(a("performing disconnect (%s)",this.nsp),this.packet({type:s.PacketType.DISCONNECT})),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const e=this._anyListeners;for(let i=0;i<e.length;i++)if(t===e[i])return e.splice(i,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(t),this}prependAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(t),this}offAnyOutgoing(t){if(!this._anyOutgoingListeners)return this;if(t){const e=this._anyOutgoingListeners;for(let i=0;i<e.length;i++)if(t===e[i])return e.splice(i,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(t){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const e=this._anyOutgoingListeners.slice();for(const i of e)i.apply(this,t.data)}}}e.Socket=c},6235:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.globalThisShim=void 0,e.globalThisShim="undefined"!=typeof self?self:"undefined"!=typeof window?window:Function("return this")()},6279:function(t){t.exports=function(){"use strict";return function(t,e,i){t=t||{};var n=e.prototype,s={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 r(t,e,i,s){return n.fromToBase(t,e,i,s)}i.en.relativeTime=s,n.fromToBase=function(e,n,r,o,a){for(var l,c,h,u=r.$locale().relativeTime||s,d=t.thresholds||[{l:"s",r:44,d:"second"},{l:"m",r:89},{l:"mm",r:44,d:"minute"},{l:"h",r:89},{l:"hh",r:21,d:"hour"},{l:"d",r:35},{l:"dd",r:25,d:"day"},{l:"M",r:45},{l:"MM",r:10,d:"month"},{l:"y",r:17},{l:"yy",d:"year"}],p=d.length,f=0;f<p;f+=1){var g=d[f];g.d&&(l=o?i(e).diff(r,g.d,!0):r.diff(e,g.d,!0));var m=(t.rounding||Math.round)(Math.abs(l));if(h=l>0,m<=g.r||!g.r){m<=1&&f>0&&(g=d[f-1]);var b=u[g.l];a&&(m=a(""+m)),c="string"==typeof b?b.replace("%d",m):b(m,n,g.l,h);break}}if(n)return c;var y=h?u.future:u.past;return"function"==typeof y?y(c):y.replace("%s",c)},n.to=function(t,e){return r(t,e,this,!0)},n.from=function(t,e){return r(t,e,this)};var o=function(t){return t.$u?i.utc():i()};n.toNow=function(t){return this.to(o(this),t)},n.fromNow=function(t){return this.from(o(this),t)}}}()},6376:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.decodePayload=e.decodePacket=e.encodePayload=e.encodePacket=e.protocol=void 0;const n=i(2686);e.encodePacket=n.default;const s=i(2662);e.decodePacket=s.default;const r=String.fromCharCode(30);e.encodePayload=(t,e)=>{const i=t.length,s=new Array(i);let o=0;t.forEach(((t,a)=>{(0,n.default)(t,!1,(t=>{s[a]=t,++o===i&&e(s.join(r))}))}))},e.decodePayload=(t,e)=>{const i=t.split(r),n=[];for(let t=0;t<i.length;t++){const r=(0,s.default)(i[t],e);if(n.push(r),"error"===r.type)break}return n},e.protocol=4},6449:t=>{var e=Array.isArray;t.exports=e},6547:(t,e,i)=>{var n=i(3360),s=i(5288),r=Object.prototype.hasOwnProperty;t.exports=function(t,e,i){var o=t[e];r.call(t,e)&&s(o,i)&&(void 0!==i||e in t)||n(t,e,i)}},6585:t=>{var e=1e3,i=60*e,n=60*i,s=24*n,r=7*s;function o(t,e,i,n){var s=e>=1.5*i;return Math.round(t/i)+" "+n+(s?"s":"")}t.exports=function(t,a){a=a||{};var l,c,h=typeof t;if("string"===h&&t.length>0)return function(t){if(!((t=String(t)).length>100)){var o=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(o){var a=parseFloat(o[1]);switch((o[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*a;case"weeks":case"week":case"w":return a*r;case"days":case"day":case"d":return a*s;case"hours":case"hour":case"hrs":case"hr":case"h":return a*n;case"minutes":case"minute":case"mins":case"min":case"m":return a*i;case"seconds":case"second":case"secs":case"sec":case"s":return a*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return a;default:return}}}}(t);if("number"===h&&isFinite(t))return a.long?(l=t,(c=Math.abs(l))>=s?o(l,c,s,"day"):c>=n?o(l,c,n,"hour"):c>=i?o(l,c,i,"minute"):c>=e?o(l,c,e,"second"):l+" ms"):function(t){var r=Math.abs(t);return r>=s?Math.round(t/s)+"d":r>=n?Math.round(t/n)+"h":r>=i?Math.round(t/i)+"m":r>=e?Math.round(t/e)+"s":t+"ms"}(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))}},6721:(t,e,i)=>{var n=i(1042),s=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;if(n){var i=e[t];return"__lodash_hash_undefined__"===i?void 0:i}return s.call(e,t)?e[t]:void 0}},6727:(t,e,i)=>{"use strict";function n(t){return t&&t.__esModule?t:{default:t}}e.__esModule=!0;var s=i(2871),r=n(i(3769)),o=i(2849),a=n(i(9632));function l(t){this.value=t}function c(){}c.prototype={nameLookup:function(t,e){return this.internalNameLookup(t,e)},depthedLookup:function(t){return[this.aliasable("container.lookup"),"(depths, ",JSON.stringify(t),")"]},compilerInfo:function(){var t=s.COMPILER_REVISION;return[t,s.REVISION_CHANGES[t]]},appendToBuffer:function(t,e,i){return o.isArray(t)||(t=[t]),t=this.source.wrap(t,e),this.environment.isSimple?["return ",t,";"]:i?["buffer += ",t,";"]:(t.appendToBuffer=!0,t)},initializeBuffer:function(){return this.quotedString("")},internalNameLookup:function(t,e){return this.lookupPropertyFunctionIsUsed=!0,["lookupProperty(",t,",",JSON.stringify(e),")"]},lookupPropertyFunctionIsUsed:!1,compile:function(t,e,i,n){this.environment=t,this.options=e,this.stringParams=this.options.stringParams,this.trackIds=this.options.trackIds,this.precompile=!n,this.name=this.environment.name,this.isChild=!!i,this.context=i||{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(t,e),this.useDepths=this.useDepths||t.useDepths||t.useDecorators||this.options.compat,this.useBlockParams=this.useBlockParams||t.useBlockParams;var s=t.opcodes,o=void 0,a=void 0,l=void 0,c=void 0;for(l=0,c=s.length;l<c;l++)o=s[l],this.source.currentLocation=o.loc,a=a||o.loc,this[o.opcode].apply(this,o.args);if(this.source.currentLocation=a,this.pushSource(""),this.stackSlot||this.inlineStack.length||this.compileStack.length)throw new r.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(),";\n"]),this.decorators.push("return fn;"),n?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) {\n"),this.decorators.push("}\n"),this.decorators=this.decorators.merge()));var h=this.createFunctionContext(n);if(this.isChild)return h;var u={compiler:this.compilerInfo(),main:h};this.decorators&&(u.main_d=this.decorators,u.useDecorators=!0);var d=this.context,p=d.programs,f=d.decorators;for(l=0,c=p.length;l<c;l++)p[l]&&(u[l]=p[l],f[l]&&(u[l+"_d"]=f[l],u.useDecorators=!0));return this.environment.usePartial&&(u.usePartial=!0),this.options.data&&(u.useData=!0),this.useDepths&&(u.useDepths=!0),this.useBlockParams&&(u.useBlockParams=!0),this.options.compat&&(u.compat=!0),n?u.compilerOptions=this.options:(u.compiler=JSON.stringify(u.compiler),this.source.currentLocation={start:{line:1,column:0}},u=this.objectLiteral(u),e.srcName?(u=u.toStringWithSourceMap({file:e.destName})).map=u.map&&u.map.toString():u=u.toString()),u},preamble:function(){this.lastContext=0,this.source=new a.default(this.options.srcName),this.decorators=new a.default(this.options.srcName)},createFunctionContext:function(t){var e=this,i="",n=this.stackVars.concat(this.registers.list);n.length>0&&(i+=", "+n.join(", "));var s=0;Object.keys(this.aliases).forEach((function(t){var n=e.aliases[t];n.children&&n.referenceCount>1&&(i+=", alias"+ ++s+"="+t,n.children[0]="alias"+s)})),this.lookupPropertyFunctionIsUsed&&(i+=", "+this.lookupPropertyFunctionVarDeclaration());var r=["container","depth0","helpers","partials","data"];(this.useBlockParams||this.useDepths)&&r.push("blockParams"),this.useDepths&&r.push("depths");var o=this.mergeSource(i);return t?(r.push(o),Function.apply(this,r)):this.source.wrap(["function(",r.join(","),") {\n ",o,"}"])},mergeSource:function(t){var e=this.environment.isSimple,i=!this.forceBuffer,n=void 0,s=void 0,r=void 0,o=void 0;return this.source.each((function(t){t.appendToBuffer?(r?t.prepend(" + "):r=t,o=t):(r&&(s?r.prepend("buffer += "):n=!0,o.add(";"),r=o=void 0),s=!0,e||(i=!1))})),i?r?(r.prepend("return "),o.add(";")):s||this.source.push('return "";'):(t+=", buffer = "+(n?"":this.initializeBuffer()),r?(r.prepend("return buffer + "),o.add(";")):this.source.push("return buffer;")),t&&this.source.prepend("var "+t.substring(2)+(n?"":";\n")),this.source.merge()},lookupPropertyFunctionVarDeclaration:function(){return"\n lookupProperty = container.lookupProperty || function(parent, propertyName) {\n if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {\n return parent[propertyName];\n }\n return undefined\n }\n ".trim()},blockValue:function(t){var e=this.aliasable("container.hooks.blockHelperMissing"),i=[this.contextName(0)];this.setupHelperArgs(t,0,i);var n=this.popStack();i.splice(1,0,n),this.push(this.source.functionCall(e,"call",i))},ambiguousBlockValue:function(){var t=this.aliasable("container.hooks.blockHelperMissing"),e=[this.contextName(0)];this.setupHelperArgs("",0,e,!0),this.flushInline();var i=this.topStack();e.splice(1,0,i),this.pushSource(["if (!",this.lastHelper,") { ",i," = ",this.source.functionCall(t,"call",e),"}"])},appendContent:function(t){this.pendingContent?t=this.pendingContent+t:this.pendingLocation=this.source.currentLocation,this.pendingContent=t},append:function(){if(this.isInline())this.replaceStack((function(t){return[" != null ? ",t,' : ""']})),this.pushSource(this.appendToBuffer(this.popStack()));else{var t=this.popStack();this.pushSource(["if (",t," != null) { ",this.appendToBuffer(t,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(t){this.lastContext=t},pushContext:function(){this.pushStackLiteral(this.contextName(this.lastContext))},lookupOnContext:function(t,e,i,n){var s=0;n||!this.options.compat||this.lastContext?this.pushContext():this.push(this.depthedLookup(t[s++])),this.resolvePath("context",t,s,e,i)},lookupBlockParam:function(t,e){this.useBlockParams=!0,this.push(["blockParams[",t[0],"][",t[1],"]"]),this.resolvePath("context",e,1)},lookupData:function(t,e,i){t?this.pushStackLiteral("container.data(data, "+t+")"):this.pushStackLiteral("data"),this.resolvePath("data",e,0,!0,i)},resolvePath:function(t,e,i,n,s){var r=this;if(this.options.strict||this.options.assumeObjects)this.push(function(t,e,i,n){var s=e.popStack(),r=0,o=i.length;for(t&&o--;r<o;r++)s=e.nameLookup(s,i[r],n);return t?[e.aliasable("container.strict"),"(",s,", ",e.quotedString(i[r]),", ",JSON.stringify(e.source.currentLocation)," )"]:s}(this.options.strict&&s,this,e,t));else for(var o=e.length;i<o;i++)this.replaceStack((function(s){var o=r.nameLookup(s,e[i],t);return n?[" && ",o]:[" != null ? ",o," : ",s]}))},resolvePossibleLambda:function(){this.push([this.aliasable("container.lambda"),"(",this.popStack(),", ",this.contextName(0),")"])},pushStringParam:function(t,e){this.pushContext(),this.pushString(e),"SubExpression"!==e&&("string"==typeof t?this.pushString(t):this.pushStackLiteral(t))},emptyHash:function(t){this.trackIds&&this.push("{}"),this.stringParams&&(this.push("{}"),this.push("{}")),this.pushStackLiteral(t?"undefined":"{}")},pushHash:function(){this.hash&&this.hashes.push(this.hash),this.hash={values:{},types:[],contexts:[],ids:[]}},popHash:function(){var t=this.hash;this.hash=this.hashes.pop(),this.trackIds&&this.push(this.objectLiteral(t.ids)),this.stringParams&&(this.push(this.objectLiteral(t.contexts)),this.push(this.objectLiteral(t.types))),this.push(this.objectLiteral(t.values))},pushString:function(t){this.pushStackLiteral(this.quotedString(t))},pushLiteral:function(t){this.pushStackLiteral(t)},pushProgram:function(t){null!=t?this.pushStackLiteral(this.programExpression(t)):this.pushStackLiteral(null)},registerDecorator:function(t,e){var i=this.nameLookup("decorators",e,"decorator"),n=this.setupHelperArgs(e,t);this.decorators.push(["fn = ",this.decorators.functionCall(i,"",["fn","props","container",n])," || fn;"])},invokeHelper:function(t,e,i){var n=this.popStack(),s=this.setupHelper(t,e),r=[];i&&r.push(s.name),r.push(n),this.options.strict||r.push(this.aliasable("container.hooks.helperMissing"));var o=["(",this.itemsSeparatedBy(r,"||"),")"],a=this.source.functionCall(o,"call",s.callParams);this.push(a)},itemsSeparatedBy:function(t,e){var i=[];i.push(t[0]);for(var n=1;n<t.length;n++)i.push(e,t[n]);return i},invokeKnownHelper:function(t,e){var i=this.setupHelper(t,e);this.push(this.source.functionCall(i.name,"call",i.callParams))},invokeAmbiguous:function(t,e){this.useRegister("helper");var i=this.popStack();this.emptyHash();var n=this.setupHelper(0,t,e),s=["(","(helper = ",this.lastHelper=this.nameLookup("helpers",t,"helper")," || ",i,")"];this.options.strict||(s[0]="(helper = ",s.push(" != null ? helper : ",this.aliasable("container.hooks.helperMissing"))),this.push(["(",s,n.paramsInit?["),(",n.paramsInit]:[],"),","(typeof helper === ",this.aliasable('"function"')," ? ",this.source.functionCall("helper","call",n.callParams)," : helper))"])},invokePartial:function(t,e,i){var n=[],s=this.setupParams(e,1,n);t&&(e=this.popStack(),delete s.name),i&&(s.indent=JSON.stringify(i)),s.helpers="helpers",s.partials="partials",s.decorators="container.decorators",t?n.unshift(e):n.unshift(this.nameLookup("partials",e,"partial")),this.options.compat&&(s.depths="depths"),s=this.objectLiteral(s),n.push(s),this.push(this.source.functionCall("container.invokePartial","",n))},assignToHash:function(t){var e=this.popStack(),i=void 0,n=void 0,s=void 0;this.trackIds&&(s=this.popStack()),this.stringParams&&(n=this.popStack(),i=this.popStack());var r=this.hash;i&&(r.contexts[t]=i),n&&(r.types[t]=n),s&&(r.ids[t]=s),r.values[t]=e},pushId:function(t,e,i){"BlockParam"===t?this.pushStackLiteral("blockParams["+e[0]+"].path["+e[1]+"]"+(i?" + "+JSON.stringify("."+i):"")):"PathExpression"===t?this.pushString(e):"SubExpression"===t?this.pushStackLiteral("true"):this.pushStackLiteral("null")},compiler:c,compileChildren:function(t,e){for(var i=t.children,n=void 0,s=void 0,r=0,o=i.length;r<o;r++){n=i[r],s=new this.compiler;var a=this.matchExistingProgram(n);if(null==a){this.context.programs.push("");var l=this.context.programs.length;n.index=l,n.name="program"+l,this.context.programs[l]=s.compile(n,e,this.context,!this.precompile),this.context.decorators[l]=s.decorators,this.context.environments[l]=n,this.useDepths=this.useDepths||s.useDepths,this.useBlockParams=this.useBlockParams||s.useBlockParams,n.useDepths=this.useDepths,n.useBlockParams=this.useBlockParams}else n.index=a.index,n.name="program"+a.index,this.useDepths=this.useDepths||a.useDepths,this.useBlockParams=this.useBlockParams||a.useBlockParams}},matchExistingProgram:function(t){for(var e=0,i=this.context.environments.length;e<i;e++){var n=this.context.environments[e];if(n&&n.equals(t))return n}},programExpression:function(t){var e=this.environment.children[t],i=[e.index,"data",e.blockParams];return(this.useBlockParams||this.useDepths)&&i.push("blockParams"),this.useDepths&&i.push("depths"),"container.program("+i.join(", ")+")"},useRegister:function(t){this.registers[t]||(this.registers[t]=!0,this.registers.list.push(t))},push:function(t){return t instanceof l||(t=this.source.wrap(t)),this.inlineStack.push(t),t},pushStackLiteral:function(t){this.push(new l(t))},pushSource:function(t){this.pendingContent&&(this.source.push(this.appendToBuffer(this.source.quotedString(this.pendingContent),this.pendingLocation)),this.pendingContent=void 0),t&&this.source.push(t)},replaceStack:function(t){var e=["("],i=void 0,n=void 0,s=void 0;if(!this.isInline())throw new r.default("replaceStack on non-inline");var o=this.popStack(!0);if(o instanceof l)e=["(",i=[o.value]],s=!0;else{n=!0;var a=this.incrStack();e=["((",this.push(a)," = ",o,")"],i=this.topStack()}var c=t.call(this,i);s||this.popStack(),n&&this.stackSlot--,this.push(e.concat(c,")"))},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 t=this.inlineStack;this.inlineStack=[];for(var e=0,i=t.length;e<i;e++){var n=t[e];if(n instanceof l)this.compileStack.push(n);else{var s=this.incrStack();this.pushSource([s," = ",n,";"]),this.compileStack.push(s)}}},isInline:function(){return this.inlineStack.length},popStack:function(t){var e=this.isInline(),i=(e?this.inlineStack:this.compileStack).pop();if(!t&&i instanceof l)return i.value;if(!e){if(!this.stackSlot)throw new r.default("Invalid stack pop");this.stackSlot--}return i},topStack:function(){var t=this.isInline()?this.inlineStack:this.compileStack,e=t[t.length-1];return e instanceof l?e.value:e},contextName:function(t){return this.useDepths&&t?"depths["+t+"]":"depth"+t},quotedString:function(t){return this.source.quotedString(t)},objectLiteral:function(t){return this.source.objectLiteral(t)},aliasable:function(t){var e=this.aliases[t];return e?(e.referenceCount++,e):((e=this.aliases[t]=this.source.wrap(t)).aliasable=!0,e.referenceCount=1,e)},setupHelper:function(t,e,i){var n=[];return{params:n,paramsInit:this.setupHelperArgs(e,t,n,i),name:this.nameLookup("helpers",e,"helper"),callParams:[this.aliasable(this.contextName(0)+" != null ? "+this.contextName(0)+" : (container.nullContext || {})")].concat(n)}},setupParams:function(t,e,i){var n={},s=[],r=[],o=[],a=!i,l=void 0;a&&(i=[]),n.name=this.quotedString(t),n.hash=this.popStack(),this.trackIds&&(n.hashIds=this.popStack()),this.stringParams&&(n.hashTypes=this.popStack(),n.hashContexts=this.popStack());var c=this.popStack(),h=this.popStack();(h||c)&&(n.fn=h||"container.noop",n.inverse=c||"container.noop");for(var u=e;u--;)l=this.popStack(),i[u]=l,this.trackIds&&(o[u]=this.popStack()),this.stringParams&&(r[u]=this.popStack(),s[u]=this.popStack());return a&&(n.args=this.source.generateArray(i)),this.trackIds&&(n.ids=this.source.generateArray(o)),this.stringParams&&(n.types=this.source.generateArray(r),n.contexts=this.source.generateArray(s)),this.options.data&&(n.data="data"),this.useBlockParams&&(n.blockParams="blockParams"),n},setupHelperArgs:function(t,e,i,n){var s=this.setupParams(t,e,i);return s.loc=JSON.stringify(this.source.currentLocation),s=this.objectLiteral(s),n?(this.useRegister("options"),i.push("options"),["options=",s]):i?(i.push(s),""):s}},function(){for(var t="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(" "),e=c.RESERVED_WORDS={},i=0,n=t.length;i<n;i++)e[t[i]]=!0}(),c.isValidJavaScriptVariableName=function(t){return!c.RESERVED_WORDS[t]&&/^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(t)},e.default=c,t.exports=e.default},6734:(t,e,i)=>{"use strict";e.__esModule=!0;var n,s=(n=i(3769))&&n.__esModule?n:{default:n};e.default=function(t){t.registerHelper("helperMissing",(function(){if(1!==arguments.length)throw new s.default('Missing helper: "'+arguments[arguments.length-1].name+'"')}))},t.exports=e.default},6757:(t,e,i)=>{var n=i(1033),s=Math.max;t.exports=function(t,e,i){return e=s(void 0===e?t.length-1:e,0),function(){for(var r=arguments,o=-1,a=s(r.length-e,0),l=Array(a);++o<a;)l[o]=r[e+o];o=-1;for(var c=Array(e+1);++o<e;)c[o]=r[o];return c[e]=i(l),n(t,this,c)}}},6785:(t,e,i)=>{"use strict";e.__esModule=!0;var n,s=i(2849),r=(n=i(3769))&&n.__esModule?n:{default:n};e.default=function(t){t.registerHelper("each",(function(t,e){if(!e)throw new r.default("Must pass iterator to #each");var n,o=e.fn,a=e.inverse,l=0,c="",h=void 0,u=void 0;function d(e,i,n){h&&(h.key=e,h.index=i,h.first=0===i,h.last=!!n,u&&(h.contextPath=u+e)),c+=o(t[e],{data:h,blockParams:s.blockParams([t[e],e],[u+e,null])})}if(e.data&&e.ids&&(u=s.appendContextPath(e.data.contextPath,e.ids[0])+"."),s.isFunction(t)&&(t=t.call(this)),e.data&&(h=s.createFrame(e.data)),t&&"object"==typeof t)if(s.isArray(t))for(var p=t.length;l<p;l++)l in t&&d(l,l,l===t.length-1);else if(i.g.Symbol&&t[i.g.Symbol.iterator]){for(var f=[],g=t[i.g.Symbol.iterator](),m=g.next();!m.done;m=g.next())f.push(m.value);for(p=(t=f).length;l<p;l++)d(l,l,l===t.length-1)}else n=void 0,Object.keys(t).forEach((function(t){void 0!==n&&d(n,l-1),n=t,l++})),void 0!==n&&d(n,l-1,!0);return 0===l&&(c=a(this)),c}))},t.exports=e.default},6881:function(t,e,i){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.ViewerComponent=void 0;const s=n(i(3271)),r=n(i(7341)),o=i(1135),a=n(i(5123)),l=r.default.compile(i(4983));class c extends o.Component{constructor(t){super(l({})),this.options=t,this.instance=new s.default({},this.options?.depth??3,{theme:"custom",afterCopyHandler:()=>a.default.shared.popups.push("Copied!")}),this.provide({})}provide(t){return this.instance.json=t,this.clear().append(this.instance.render())}static build(t){return new c(t)}}e.ViewerComponent=c},6894:function(t,e,i){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.url=void 0;const s=i(4956),r=n(i(7833)).default("socket.io-client:url");e.url=function(t,e="",i){let n=t;i=i||"undefined"!=typeof location&&location,null==t&&(t=i.protocol+"//"+i.host),"string"==typeof t&&("/"===t.charAt(0)&&(t="/"===t.charAt(1)?i.protocol+t:i.host+t),/^(https?|wss?):\/\//.test(t)||(r("protocol-less url %s",t),t=void 0!==i?i.protocol+"//"+t:"https://"+t),r("parse %s",t),n=s.parse(t)),n.port||(/^(http|ws)$/.test(n.protocol)?n.port="80":/^(http|ws)s$/.test(n.protocol)&&(n.port="443")),n.path=n.path||"/";const o=-1!==n.host.indexOf(":")?"["+n.host+"]":n.host;return n.id=n.protocol+"://"+o+":"+n.port+e,n.href=n.protocol+"://"+o+(i&&i.port===n.port?"":":"+n.port),n}},6964:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LoaderComponent=void 0;const n=i(8305);class s extends n.CurtainComponent{constructor(){super({isPreventedToManualClose:!0}),this.append('<div><p>Ping pong</p><div class="loader"></div></div>').assignId("loader")}static build(){return new s}}e.LoaderComponent=s},6981:function(t,e,i){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.Form=void 0;const s=n(i(3560)),r=i(2285),o=i(3224),a=(()=>{const t={password:String,number:Number,text:String};return(e,i)=>{if("checkbox"===e)return i||null;const n=i.trim();return n.length?(t[e]??String)(n):null}})();class l extends o.Component{get paths(){return[...this.element.querySelectorAll("*[data-key]")].map((t=>t.getAttribute("data-key"))).filter(Boolean)}extract(){return[...this.element.querySelectorAll("*[data-key]")].reduce(((t,e)=>{const i=e.getAttribute("data-key"),n=e.getAttribute("cast")??e.getAttribute("type")??"text";if(!i||"value"in e==0||"string"!=typeof e.value)return t;if(e.hasAttribute("list")){const r=e.getAttribute("list")??",",o=e.value.split(r).map((t=>a(n,t))).filter((t=>null!==t));return o.length?(0,s.default)(t,i,o):t}const r=a(n,e.value);return"checkbox"===n&&"checked"in e?e.checked?(0,s.default)(t,i,r??!0):t:null!==r?(0,s.default)(t,i,r):t}),{})}assign(t){return(0,r.convertObjectToKeyValueCouples)(t,this.paths).map((([t,e])=>[t,e,this.element.querySelector(`*[data-key="${t}"]`)])).forEach((([t,e,i])=>(0,s.default)(i,"value",Array.isArray(e)?e.join(i.getAttribute("list")??","):e??""))),this}static build(t){return new l(t)}}e.Form=l},7006:t=>{t.exports="\n <div class=\"popup-message {{level}}\">\n {{#compare level 'eq' 'info'}}<i class=\"fas fa-check\"></i>{{/compare}}\n {{#compare level 'eq' 'warning'}}<i class=\"fas fa-exclamation-triangle\"></i>{{/compare}}\n {{#compare level 'eq' 'error'}}<i class=\"fas fa-times\"></i>{{/compare}}\n\n <span>{{{message}}}</span>\n </div>\n"},7007:t=>{"use strict";var e,i="object"==typeof Reflect?Reflect:null,n=i&&"function"==typeof i.apply?i.apply:function(t,e,i){return Function.prototype.apply.call(t,e,i)};e=i&&"function"==typeof i.ownKeys?i.ownKeys:Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:function(t){return Object.getOwnPropertyNames(t)};var s=Number.isNaN||function(t){return t!=t};function r(){r.init.call(this)}t.exports=r,t.exports.once=function(t,e){return new Promise((function(i,n){function s(i){t.removeListener(e,r),n(i)}function r(){"function"==typeof t.removeListener&&t.removeListener("error",s),i([].slice.call(arguments))}g(t,e,r,{once:!0}),"error"!==e&&function(t,e){"function"==typeof t.on&&g(t,"error",e,{once:!0})}(t,s)}))},r.EventEmitter=r,r.prototype._events=void 0,r.prototype._eventsCount=0,r.prototype._maxListeners=void 0;var o=10;function a(t){if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}function l(t){return void 0===t._maxListeners?r.defaultMaxListeners:t._maxListeners}function c(t,e,i,n){var s,r,o,c;if(a(i),void 0===(r=t._events)?(r=t._events=Object.create(null),t._eventsCount=0):(void 0!==r.newListener&&(t.emit("newListener",e,i.listener?i.listener:i),r=t._events),o=r[e]),void 0===o)o=r[e]=i,++t._eventsCount;else if("function"==typeof o?o=r[e]=n?[i,o]:[o,i]:n?o.unshift(i):o.push(i),(s=l(t))>0&&o.length>s&&!o.warned){o.warned=!0;var h=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");h.name="MaxListenersExceededWarning",h.emitter=t,h.type=e,h.count=o.length,c=h,console&&console.warn&&console.warn(c)}return t}function h(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function u(t,e,i){var n={fired:!1,wrapFn:void 0,target:t,type:e,listener:i},s=h.bind(n);return s.listener=i,n.wrapFn=s,s}function d(t,e,i){var n=t._events;if(void 0===n)return[];var s=n[e];return void 0===s?[]:"function"==typeof s?i?[s.listener||s]:[s]:i?function(t){for(var e=new Array(t.length),i=0;i<e.length;++i)e[i]=t[i].listener||t[i];return e}(s):f(s,s.length)}function p(t){var e=this._events;if(void 0!==e){var i=e[t];if("function"==typeof i)return 1;if(void 0!==i)return i.length}return 0}function f(t,e){for(var i=new Array(e),n=0;n<e;++n)i[n]=t[n];return i}function g(t,e,i,n){if("function"==typeof t.on)n.once?t.once(e,i):t.on(e,i);else{if("function"!=typeof t.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof t);t.addEventListener(e,(function s(r){n.once&&t.removeEventListener(e,s),i(r)}))}}Object.defineProperty(r,"defaultMaxListeners",{enumerable:!0,get:function(){return o},set:function(t){if("number"!=typeof t||t<0||s(t))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+t+".");o=t}}),r.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},r.prototype.setMaxListeners=function(t){if("number"!=typeof t||t<0||s(t))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this},r.prototype.getMaxListeners=function(){return l(this)},r.prototype.emit=function(t){for(var e=[],i=1;i<arguments.length;i++)e.push(arguments[i]);var s="error"===t,r=this._events;if(void 0!==r)s=s&&void 0===r.error;else if(!s)return!1;if(s){var o;if(e.length>0&&(o=e[0]),o instanceof Error)throw o;var a=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw a.context=o,a}var l=r[t];if(void 0===l)return!1;if("function"==typeof l)n(l,this,e);else{var c=l.length,h=f(l,c);for(i=0;i<c;++i)n(h[i],this,e)}return!0},r.prototype.addListener=function(t,e){return c(this,t,e,!1)},r.prototype.on=r.prototype.addListener,r.prototype.prependListener=function(t,e){return c(this,t,e,!0)},r.prototype.once=function(t,e){return a(e),this.on(t,u(this,t,e)),this},r.prototype.prependOnceListener=function(t,e){return a(e),this.prependListener(t,u(this,t,e)),this},r.prototype.removeListener=function(t,e){var i,n,s,r,o;if(a(e),void 0===(n=this._events))return this;if(void 0===(i=n[t]))return this;if(i===e||i.listener===e)0==--this._eventsCount?this._events=Object.create(null):(delete n[t],n.removeListener&&this.emit("removeListener",t,i.listener||e));else if("function"!=typeof i){for(s=-1,r=i.length-1;r>=0;r--)if(i[r]===e||i[r].listener===e){o=i[r].listener,s=r;break}if(s<0)return this;0===s?i.shift():function(t,e){for(;e+1<t.length;e++)t[e]=t[e+1];t.pop()}(i,s),1===i.length&&(n[t]=i[0]),void 0!==n.removeListener&&this.emit("removeListener",t,o||e)}return this},r.prototype.off=r.prototype.removeListener,r.prototype.removeAllListeners=function(t){var e,i,n;if(void 0===(i=this._events))return this;if(void 0===i.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==i[t]&&(0==--this._eventsCount?this._events=Object.create(null):delete i[t]),this;if(0===arguments.length){var s,r=Object.keys(i);for(n=0;n<r.length;++n)"removeListener"!==(s=r[n])&&this.removeAllListeners(s);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(e=i[t]))this.removeListener(t,e);else if(void 0!==e)for(n=e.length-1;n>=0;n--)this.removeListener(t,e[n]);return this},r.prototype.listeners=function(t){return d(this,t,!0)},r.prototype.rawListeners=function(t){return d(this,t,!1)},r.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):p.call(t,e)},r.prototype.listenerCount=p,r.prototype.eventNames=function(){return this._eventsCount>0?e(this._events):[]}},7133:t=>{t.exports=function(t,e,i){return t==t&&(void 0!==i&&(t=t<=i?t:i),void 0!==e&&(t=t>=e?t:e)),t}},7237:t=>{t.exports=function(t){return function(e){return null==e?void 0:e[t]}}},7266:()=>{},7285:(t,e,i)=>{"use strict";function n(t){if(t)return function(t){for(var e in n.prototype)t[e]=n.prototype[e];return t}(t)}i.r(e),i.d(e,{Emitter:()=>n}),n.prototype.on=n.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this},n.prototype.once=function(t,e){function i(){this.off(t,i),e.apply(this,arguments)}return i.fn=e,this.on(t,i),this},n.prototype.off=n.prototype.removeListener=n.prototype.removeAllListeners=n.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var i,n=this._callbacks["$"+t];if(!n)return this;if(1==arguments.length)return delete this._callbacks["$"+t],this;for(var s=0;s<n.length;s++)if((i=n[s])===e||i.fn===e){n.splice(s,1);break}return 0===n.length&&delete this._callbacks["$"+t],this},n.prototype.emit=function(t){this._callbacks=this._callbacks||{};for(var e=new Array(arguments.length-1),i=this._callbacks["$"+t],n=1;n<arguments.length;n++)e[n-1]=arguments[n];if(i){n=0;for(var s=(i=i.slice(0)).length;n<s;++n)i[n].apply(this,e)}return this},n.prototype.emitReserved=n.prototype.emit,n.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]},n.prototype.hasListeners=function(t){return!!this.listeners(t).length}},7296:(t,e,i)=>{var n,s=i(5481),r=(n=/[^.]+$/.exec(s&&s.keys&&s.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"";t.exports=function(t){return!!r&&r in t}},7301:t=>{t.exports=function(t){return function(e){return t(e)}}},7334:t=>{t.exports=function(t){return function(){return t}}},7341:(t,e,i)=>{var n=i(639).default,s=i(9016);n.PrintVisitor=s.PrintVisitor,n.print=s.print,t.exports=n},7400:(t,e,i)=>{var n=i(9374),s=1/0;t.exports=function(t){return t?(t=n(t))===s||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}},7420:(t,e,i)=>{var n=i(7422),s=i(3170),r=i(1769);t.exports=function(t,e,i){for(var o=-1,a=e.length,l={};++o<a;){var c=e[o],h=n(t,c);i(h,c)&&s(l,r(c,t),h)}return l}},7422:(t,e,i)=>{var n=i(1769),s=i(7797);t.exports=function(t,e){for(var i=0,r=(e=n(e,t)).length;null!=t&&i<r;)t=t[s(e[i++])];return i&&i==r?t:void 0}},7430:(t,e,i)=>{"use strict";e.__esModule=!0;var n=i(2849);e.default=function(t){t.registerDecorator("inline",(function(t,e,i,s){var r=t;return e.partials||(e.partials={},r=function(s,r){var o=i.partials;i.partials=n.extend({},o,e.partials);var a=t(s,r);return i.partials=o,a}),e.partials[s.args[0]]=s.fn,r}))},t.exports=e.default},7466:(t,e)=>{"use strict";e.__esModule=!0,e.default=function(t){t.registerHelper("lookup",(function(t,e,i){return t?i.lookupProperty(t,e):t}))},t.exports=e.default},7473:t=>{var e=Function.prototype.toString;t.exports=function(t){if(null!=t){try{return e.call(t)}catch(t){}try{return t+""}catch(t){}}return""}},7534:(t,e,i)=>{var n=i(2552),s=i(346);t.exports=function(t){return s(t)&&"[object Arguments]"==n(t)}},7556:(t,e,i)=>{var n=i(1873),s=i(4932),r=i(6449),o=i(4394),a=n?n.prototype:void 0,l=a?a.toString:void 0;t.exports=function t(e){if("string"==typeof e)return e;if(r(e))return s(e,t)+"";if(o(e))return l?l.call(e):"";var i=e+"";return"0"==i&&1/e==-1/0?"-0":i}},7613:function(t,e,i){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.history=e.settings=e.analytics=e.expectations=void 0;var s=i(9060);Object.defineProperty(e,"expectations",{enumerable:!0,get:function(){return n(s).default}});var r=i(9603);Object.defineProperty(e,"analytics",{enumerable:!0,get:function(){return n(r).default}});var o=i(5138);Object.defineProperty(e,"settings",{enumerable:!0,get:function(){return n(o).default}});var a=i(9507);Object.defineProperty(e,"history",{enumerable:!0,get:function(){return n(a).default}})},7624:(t,e,i)=>{"use strict";e.__esModule=!0,e.checkRevision=function(t){var e=t&&t[0]||1,i=o.COMPILER_REVISION;if(!(e>=o.LAST_COMPATIBLE_COMPILER_REVISION&&e<=o.COMPILER_REVISION)){if(e<o.LAST_COMPATIBLE_COMPILER_REVISION){var n=o.REVISION_CHANGES[i],s=o.REVISION_CHANGES[e];throw new r.default("Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version ("+n+") or downgrade your runtime to an older version ("+s+").")}throw new r.default("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version ("+t[1]+").")}},e.template=function(t,e){if(!e)throw new r.default("No environment passed to template");if(!t||!t.main)throw new r.default("Unknown template object: "+typeof t);t.main.decorator=t.main_d,e.VM.checkRevision(t.compiler);var i=t.compiler&&7===t.compiler[0],n={strict:function(t,e,i){if(!t||!(e in t))throw new r.default('"'+e+'" not defined in '+t,{loc:i});return n.lookupProperty(t,e)},lookupProperty:function(t,e){var i=t[e];return null==i||Object.prototype.hasOwnProperty.call(t,e)||c.resultIsAllowed(i,n.protoAccessControl,e)?i:void 0},lookup:function(t,e){for(var i=t.length,s=0;s<i;s++)if(null!=(t[s]&&n.lookupProperty(t[s],e)))return t[s][e]},lambda:function(t,e){return"function"==typeof t?t.call(e):t},escapeExpression:s.escapeExpression,invokePartial:function(i,n,o){o.hash&&(n=s.extend({},n,o.hash),o.ids&&(o.ids[0]=!0)),i=e.VM.resolvePartial.call(this,i,n,o);var a=s.extend({},o,{hooks:this.hooks,protoAccessControl:this.protoAccessControl}),l=e.VM.invokePartial.call(this,i,n,a);if(null==l&&e.compile&&(o.partials[o.name]=e.compile(i,t.compilerOptions,e),l=o.partials[o.name](n,a)),null!=l){if(o.indent){for(var c=l.split("\n"),h=0,u=c.length;h<u&&(c[h]||h+1!==u);h++)c[h]=o.indent+c[h];l=c.join("\n")}return l}throw new r.default("The partial "+o.name+" could not be compiled when running in runtime-only mode")},fn:function(e){var i=t[e];return i.decorator=t[e+"_d"],i},programs:[],program:function(t,e,i,n,s){var r=this.programs[t],o=this.fn(t);return e||s||n||i?r=h(this,t,o,e,i,n,s):r||(r=this.programs[t]=h(this,t,o)),r},data:function(t,e){for(;t&&e--;)t=t._parent;return t},mergeIfNeeded:function(t,e){var i=t||e;return t&&e&&t!==e&&(i=s.extend({},e,t)),i},nullContext:Object.seal({}),noop:e.VM.noop,compilerInfo:t.compiler};function u(e){var i=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],s=i.data;u._setup(i),!i.partial&&t.useData&&(s=function(t,e){return e&&"root"in e||((e=e?o.createFrame(e):{}).root=t),e}(e,s));var r=void 0,a=t.useBlockParams?[]:void 0;function l(e){return""+t.main(n,e,n.helpers,n.partials,s,a,r)}return t.useDepths&&(r=i.depths?e!=i.depths[0]?[e].concat(i.depths):i.depths:[e]),(l=d(t.main,l,n,i.depths||[],s,a))(e,i)}return u.isTop=!0,u._setup=function(r){if(r.partial)n.protoAccessControl=r.protoAccessControl,n.helpers=r.helpers,n.partials=r.partials,n.decorators=r.decorators,n.hooks=r.hooks;else{var o=s.extend({},e.helpers,r.helpers);!function(t,e){Object.keys(t).forEach((function(i){var n=t[i];t[i]=function(t,e){var i=e.lookupProperty;return l.wrapHelper(t,(function(t){return s.extend({lookupProperty:i},t)}))}(n,e)}))}(o,n),n.helpers=o,t.usePartial&&(n.partials=n.mergeIfNeeded(r.partials,e.partials)),(t.usePartial||t.useDecorators)&&(n.decorators=s.extend({},e.decorators,r.decorators)),n.hooks={},n.protoAccessControl=c.createProtoAccessControl(r);var h=r.allowCallsToHelperMissing||i;a.moveHelperToHooks(n,"helperMissing",h),a.moveHelperToHooks(n,"blockHelperMissing",h)}},u._child=function(e,i,s,o){if(t.useBlockParams&&!s)throw new r.default("must pass block params");if(t.useDepths&&!o)throw new r.default("must pass parent depths");return h(n,e,t[e],i,0,s,o)},u},e.wrapProgram=h,e.resolvePartial=function(t,e,i){return t?t.call||i.name||(i.name=t,t=i.partials[t]):t="@partial-block"===i.name?i.data["partial-block"]:i.partials[i.name],t},e.invokePartial=function(t,e,i){var n=i.data&&i.data["partial-block"];i.partial=!0,i.ids&&(i.data.contextPath=i.ids[0]||i.data.contextPath);var a=void 0;if(i.fn&&i.fn!==u&&function(){i.data=o.createFrame(i.data);var t=i.fn;a=i.data["partial-block"]=function(e){var i=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return i.data=o.createFrame(i.data),i.data["partial-block"]=n,t(e,i)},t.partials&&(i.partials=s.extend({},i.partials,t.partials))}(),void 0===t&&a&&(t=a),void 0===t)throw new r.default("The partial "+i.name+" could not be found");if(t instanceof Function)return t(e,i)},e.noop=u;var n,s=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e.default=t,e}(i(2849)),r=(n=i(3769))&&n.__esModule?n:{default:n},o=i(2871),a=i(2277),l=i(2614),c=i(3865);function h(t,e,i,n,s,r,o){function a(e){var s=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],a=o;return!o||e==o[0]||e===t.nullContext&&null===o[0]||(a=[e].concat(o)),i(t,e,t.helpers,t.partials,s.data||n,r&&[s.blockParams].concat(r),a)}return(a=d(i,a,t,o,n,r)).program=e,a.depth=o?o.length:0,a.blockParams=s||0,a}function u(){return""}function d(t,e,i,n,r,o){if(t.decorator){var a={};e=t.decorator(e,a,i,n&&n[0],r,o,n),s.extend(e,a)}return e}},7670:(t,e,i)=>{var n=i(2651);t.exports=function(t){var e=n(this,t).delete(t);return this.size-=e?1:0,e}},7743:(t,e)=>{"use strict";function i(t){t=t||{},this.ms=t.min||100,this.max=t.max||1e4,this.factor=t.factor||2,this.jitter=t.jitter>0&&t.jitter<=1?t.jitter:0,this.attempts=0}Object.defineProperty(e,"__esModule",{value:!0}),e.Backoff=void 0,e.Backoff=i,i.prototype.duration=function(){var t=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var e=Math.random(),i=Math.floor(e*this.jitter*t);t=1&Math.floor(10*e)?t+i:t-i}return 0|Math.min(t,this.max)},i.prototype.reset=function(){this.attempts=0},i.prototype.setMin=function(t){this.ms=t},i.prototype.setMax=function(t){this.max=t},i.prototype.setJitter=function(t){this.jitter=t}},7797:(t,e,i)=>{var n=i(4394);t.exports=function(t){if("string"==typeof t||n(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}},7822:t=>{t.exports='\n <div class="buttons">\n <button id="clear"><i class="fas fa-trash-alt"></i>Clear list</button>\n </div>\n'},7833:(t,e,i)=>{e.formatArgs=function(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+t.exports.humanize(this.diff),!this.useColors)return;const i="color: "+this.color;e.splice(1,0,i,"color: inherit");let n=0,s=0;e[0].replace(/%[a-zA-Z%]/g,(t=>{"%%"!==t&&(n++,"%c"===t&&(s=n))})),e.splice(s,0,i)},e.save=function(t){try{t?e.storage.setItem("debug",t):e.storage.removeItem("debug")}catch(t){}},e.load=function(){let t;try{t=e.storage.getItem("debug")}catch(t){}return!t&&"undefined"!=typeof process&&"env"in process&&(t=process.env.DEBUG),t},e.useColors=function(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type&&!window.process.__nwjs)||("undefined"==typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},e.storage=function(){try{return localStorage}catch(t){}}(),e.destroy=(()=>{let t=!1;return()=>{t||(t=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),e.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],e.log=console.debug||console.log||(()=>{}),t.exports=i(736)(e);const{formatters:n}=t.exports;n.j=function(t){try{return JSON.stringify(t)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}},7927:t=>{var e="\\ud800-\\udfff",i="["+e+"]",n="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",s="\\ud83c[\\udffb-\\udfff]",r="[^"+e+"]",o="(?:\\ud83c[\\udde6-\\uddff]){2}",a="[\\ud800-\\udbff][\\udc00-\\udfff]",l="(?:"+n+"|"+s+")?",c="[\\ufe0e\\ufe0f]?",h=c+l+"(?:\\u200d(?:"+[r,o,a].join("|")+")"+c+l+")*",u="(?:"+[r+n+"?",n,o,a,i].join("|")+")",d=RegExp(s+"(?="+s+")|"+u+h,"g");t.exports=function(t){for(var e=d.lastIndex=0;d.test(t);)++e;return e}},7933:t=>{t.exports='\n <div class="content">\n <p class="version"><span>Version</span><b>{{version}}</b></p>\n <p class="version"><span>Uptime</span><b>{{uptime}}</b></p>\n </div>\n'},8007:function(t,e,i){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.connect=e.io=e.Socket=e.Manager=e.protocol=void 0;const s=i(6894),r=i(3776);Object.defineProperty(e,"Manager",{enumerable:!0,get:function(){return r.Manager}});const o=i(6214);Object.defineProperty(e,"Socket",{enumerable:!0,get:function(){return o.Socket}});const a=n(i(7833)).default("socket.io-client"),l={};function c(t,e){"object"==typeof t&&(e=t,t=void 0),e=e||{};const i=s.url(t,e.path||"/socket.io"),n=i.source,o=i.id,c=i.path,h=l[o]&&c in l[o].nsps;let u;return e.forceNew||e["force new connection"]||!1===e.multiplex||h?(a("ignoring socket cache for %s",n),u=new r.Manager(n,e)):(l[o]||(a("new io instance for %s",n),l[o]=new r.Manager(n,e)),u=l[o]),i.query&&!e.query&&(e.query=i.queryKey),u.socket(i.path,e)}e.io=c,e.connect=c,e.default=c,Object.assign(c,{Manager:r.Manager,Socket:o.Socket,io:c,connect:c});var h=i(4627);Object.defineProperty(e,"protocol",{enumerable:!0,get:function(){return h.protocol}}),t.exports=c},8077:t=>{t.exports=function(t,e){return null!=t&&e in Object(t)}},8080:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.buildHandlebarsHelper=void 0,e.buildHandlebarsHelper=t=>function(...e){return t(this)(...e)}},8090:t=>{t.exports=function(t){var e=null==t?0:t.length;return e?t[e-1]:void 0}},8221:(t,e,i)=>{var n=i(3805),s=i(124),r=i(9374),o=Math.max,a=Math.min;t.exports=function(t,e,i){var l,c,h,u,d,p,f=0,g=!1,m=!1,b=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function y(e){var i=l,n=c;return l=c=void 0,f=e,u=t.apply(n,i)}function v(t){var i=t-p;return void 0===p||i>=e||i<0||m&&t-f>=h}function _(){var t=s();if(v(t))return x(t);d=setTimeout(_,function(t){var i=e-(t-p);return m?a(i,h-(t-f)):i}(t))}function x(t){return d=void 0,b&&l?y(t):(l=c=void 0,u)}function w(){var t=s(),i=v(t);if(l=arguments,c=this,p=t,i){if(void 0===d)return function(t){return f=t,d=setTimeout(_,e),g?y(t):u}(p);if(m)return clearTimeout(d),d=setTimeout(_,e),y(p)}return void 0===d&&(d=setTimeout(_,e)),u}return e=r(e)||0,n(i)&&(g=!!i.leading,h=(m="maxWait"in i)?o(r(i.maxWait)||0,e):h,b="trailing"in i?!!i.trailing:b),w.cancel=function(){void 0!==d&&clearTimeout(d),f=0,l=p=c=d=void 0},w.flush=function(){return void 0===d?u:x(s())},w}},8223:(t,e,i)=>{var n=i(6110)(i(9325),"Map");t.exports=n},8305:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CurtainComponent=void 0;const n=i(1135);class s extends n.Component{constructor(t={}){super('<div class="curtain hidden"></div>'),this.options=t,t.isPreventedToManualClose||this.element.addEventListener("click",(t=>t.target===this.element?this.hide():null))}static build(t){return new s(t)}}e.CurtainComponent=s},8392:t=>{t.exports='\n <div class="segment">\n {{#compare format \'neq\' \'short\'}}\n <button class="activity">\n {{#if isEnabled}}\n <i class="fas fa-plug"></i>\n {{else}}\n <i class="fas fa-power-off"></i>\n {{/if}}\n </button>\n\n <span class="calls-count {{#compare meta.executionsCount \'gt\' 0}}active{{/compare}}">\n <i class="fas fa-undo-alt"></i>{{meta.executionsCount}}\n </span>\n {{/compare}}\n\n <span class="name"><b style="color: {{toColor group}};">{{group}}</b> {{name}}</span>\n </div>\n\n {{#compare format \'neq\' \'short\'}}\n {{#compare meta.tags.length \'gt\' 0}}<span class="arrow"><i class="fas fa-chevron-right"></i></span>{{/compare}}\n\n <div class="segment">\n {{#each transports}}<span class="transport">{{this}}</span>{{/each}}\n\n {{#each meta.tags}}\n {{#compare @index \'lte\' 5}}\n {{#if (compare location \'eq\' \'outgoing.status\')}}\n <span class="status\n {{#compare value \'lt\' 400}}green{{/compare}}\n {{#compare value \'gte\' 400}}red{{/compare}}\n "><b>{{value}}</b></span>\n {{else if (compare location \'eq\' \'method\')}}\n <span class="method" style="color: {{toColor value}};">{{value}}</span>\n {{else}}\n <span class="{{location}}">{{> truncated this length=45}}</span>\n {{/if}}\n {{/compare}}\n {{/each}}\n </div>\n {{/compare}}\n\n {{#with schema.forward}}\n <span class="arrow"><i class="fas fa-chevron-right"></i></span>\n\n <div class="segment">\n {{#if baseUrl}}<span class="forward">{{> truncated value=baseUrl length=45}}</span>{{/if}}\n {{#if url}}<span class="forward">{{> truncated value=url length=45}}</span>{{/if}}\n\n {{#if ../isCached}}<span class="cache"><i class="fas fa-database"></i></span>{{/if}}\n </div>\n {{/with}}\n'},8425:(t,e,i)=>{"use strict";e.__esModule=!0,e.SourceLocation=function(t,e){this.source=t,this.start={line:e.first_line,column:e.first_column},this.end={line:e.last_line,column:e.last_column}},e.id=function(t){return/^\[.*\]$/.test(t)?t.substring(1,t.length-1):t},e.stripFlags=function(t,e){return{open:"~"===t.charAt(2),close:"~"===e.charAt(e.length-3)}},e.stripComment=function(t){return t.replace(/^\{\{~?!-?-?/,"").replace(/-?-?~?\}\}$/,"")},e.preparePath=function(t,e,i){i=this.locInfo(i);for(var n=t?"@":"",r=[],o=0,a=0,l=e.length;a<l;a++){var c=e[a].part,h=e[a].original!==c;if(n+=(e[a].separator||"")+c,h||".."!==c&&"."!==c&&"this"!==c)r.push(c);else{if(r.length>0)throw new s.default("Invalid path: "+n,{loc:i});".."===c&&o++}}return{type:"PathExpression",data:t,depth:o,parts:r,original:n,loc:i}},e.prepareMustache=function(t,e,i,n,s,r){var o=n.charAt(3)||n.charAt(2),a="{"!==o&&"&"!==o;return{type:/\*/.test(n)?"Decorator":"MustacheStatement",path:t,params:e,hash:i,escaped:a,strip:s,loc:this.locInfo(r)}},e.prepareRawBlock=function(t,e,i,n){r(t,i);var s={type:"Program",body:e,strip:{},loc:n=this.locInfo(n)};return{type:"BlockStatement",path:t.path,params:t.params,hash:t.hash,program:s,openStrip:{},inverseStrip:{},closeStrip:{},loc:n}},e.prepareBlock=function(t,e,i,n,o,a){n&&n.path&&r(t,n);var l=/\*/.test(t.open);e.blockParams=t.blockParams;var c=void 0,h=void 0;if(i){if(l)throw new s.default("Unexpected inverse block on decorator",i);i.chain&&(i.program.body[0].closeStrip=n.strip),h=i.strip,c=i.program}return o&&(o=c,c=e,e=o),{type:l?"DecoratorBlock":"BlockStatement",path:t.path,params:t.params,hash:t.hash,program:e,inverse:c,openStrip:t.strip,inverseStrip:h,closeStrip:n&&n.strip,loc:this.locInfo(a)}},e.prepareProgram=function(t,e){if(!e&&t.length){var i=t[0].loc,n=t[t.length-1].loc;i&&n&&(e={source:i.source,start:{line:i.start.line,column:i.start.column},end:{line:n.end.line,column:n.end.column}})}return{type:"Program",body:t,strip:{},loc:e}},e.preparePartialBlock=function(t,e,i,n){return r(t,i),{type:"PartialBlockStatement",name:t.path,params:t.params,hash:t.hash,program:e,openStrip:t.strip,closeStrip:i&&i.strip,loc:this.locInfo(n)}};var n,s=(n=i(3769))&&n.__esModule?n:{default:n};function r(t,e){if(e=e.path?e.path.original:e,t.path.original!==e){var i={loc:t.path.loc};throw new s.default(t.path.original+" doesn't match "+e,i)}}},8586:(t,e,i)=>{var n=i(6449),s=i(4394),r=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,o=/^\w*$/;t.exports=function(t,e){if(n(t))return!1;var i=typeof t;return!("number"!=i&&"symbol"!=i&&"boolean"!=i&&null!=t&&!s(t))||o.test(t)||!r.test(t)||null!=e&&t in Object(e)}},8655:(t,e,i)=>{var n=i(6025);t.exports=function(t){return n(this.__data__,t)>-1}},8659:(t,e,i)=>{var n=i(7133),s=i(9374);t.exports=function(t,e,i){return void 0===i&&(i=e,e=void 0),void 0!==i&&(i=(i=s(i))==i?i:0),void 0!==e&&(e=(e=s(e))==e?e:0),n(s(t),e,i)}},8661:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.decode=e.encode=void 0,e.encode=function(t){let e="";for(let i in t)t.hasOwnProperty(i)&&(e.length&&(e+="&"),e+=encodeURIComponent(i)+"="+encodeURIComponent(t[i]));return e},e.decode=function(t){let e={},i=t.split("&");for(let t=0,n=i.length;t<n;t++){let n=i[t].split("=");e[decodeURIComponent(n[0])]=decodeURIComponent(n[1])}return e}},8698:function(t,e,i){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.DynamicStorage=void 0;const s=n(i(3560)),r=i(2285),o=i(100),a=i(6981);class l{constructor(t,e){this.key=t,this.element=e,this.form=a.Form.build(this.element),this.client=o.ClientStorage.build(this.key)}sync(){const t=this.client.extract()??[];return this.form.assign(t.reduce(((t,[e,i])=>(0,s.default)(t,e,i)),{})),this}save(){return this.client.store((0,r.convertObjectToKeyValueCouples)(this.form.extract(),this.form.paths)),this}clear(){return this.client.clear(),this}static build(t,e){return new l(t,e)}}e.DynamicStorage=l},8716:function(t,e,i){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.WS=void 0;const s=i(4689),r=i(8661),o=i(732),a=i(5374),l=i(4087),c=n(i(7833)),h=i(6376),u=(0,c.default)("engine.io-client:websocket"),d="undefined"!=typeof navigator&&"string"==typeof navigator.product&&"reactnative"===navigator.product.toLowerCase();class p extends s.Transport{constructor(t){super(t),this.supportsBinary=!t.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const t=this.uri(),e=this.opts.protocols,i=d?{}:(0,a.pick)(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(i.headers=this.opts.extraHeaders);try{this.ws=l.usingBrowserWebSocket&&!d?e?new l.WebSocket(t,e):new l.WebSocket(t):new l.WebSocket(t,e,i)}catch(t){return this.emitReserved("error",t)}this.ws.binaryType=this.socket.binaryType||l.defaultBinaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let e=0;e<t.length;e++){const i=t[e],n=e===t.length-1;(0,h.encodePacket)(i,this.supportsBinary,(t=>{const e={};!l.usingBrowserWebSocket&&(i.options&&(e.compress=i.options.compress),this.opts.perMessageDeflate)&&("string"==typeof t?Buffer.byteLength(t):t.length)<this.opts.perMessageDeflate.threshold&&(e.compress=!1);try{l.usingBrowserWebSocket?this.ws.send(t):this.ws.send(t,e)}catch(t){u("websocket closed before onclose event")}n&&(0,l.nextTick)((()=>{this.writable=!0,this.emitReserved("drain")}),this.setTimeoutFn)}))}}doClose(){void 0!==this.ws&&(this.ws.close(),this.ws=null)}uri(){let t=this.query||{};const e=this.opts.secure?"wss":"ws";let i="";this.opts.port&&("wss"===e&&443!==Number(this.opts.port)||"ws"===e&&80!==Number(this.opts.port))&&(i=":"+this.opts.port),this.opts.timestampRequests&&(t[this.opts.timestampParam]=(0,o.yeast)()),this.supportsBinary||(t.b64=1);const n=(0,r.encode)(t);return e+"://"+(-1!==this.opts.hostname.indexOf(":")?"["+this.opts.hostname+"]":this.opts.hostname)+i+this.opts.path+(n.length?"?"+n:"")}check(){return!!l.WebSocket}}e.WS=p},8754:(t,e,i)=>{var n=i(5160);t.exports=function(t,e,i){var s=t.length;return i=void 0===i?s:i,!e&&i>=s?t:n(t,e,i)}},8769:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.buildCounter=e.flattenArrayed=e.cast=e.wait=void 0,e.wait=t=>new Promise((e=>setTimeout(e,t))),e.cast=t=>t,e.flattenArrayed=t=>t?.every?.(Array.isArray)?t.reduce(((t,i)=>t.concat((0,e.flattenArrayed)(i))),[]):Array.isArray(t)?[t]:[[t]],e.buildCounter=(t=0,e=1)=>(i=e)=>t+=i},8803:function(t,e,i){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.SearchComponent=void 0;const s=i(7007),r=n(i(8221)),o=n(i(7341)),a=i(1135),l=o.default.compile(i(9705));class c extends a.Component{constructor(t){super(l({title:t?.title??"Type something"})),this.options=t,this.events=new s.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",(0,r.default)((()=>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 c(t)}}e.SearchComponent=c},8816:(t,e,i)=>{var n=i(5970),s=i(6757),r=i(2865);t.exports=function(t){return r(s(t,void 0,n),t+"")}},8955:function(t,e,i){"use strict";var n,s=this&&this.__createBinding||(Object.create?function(t,e,i,n){void 0===n&&(n=i);var s=Object.getOwnPropertyDescriptor(e,i);s&&!("get"in s?!e.__esModule:s.writable||s.configurable)||(s={enumerable:!0,get:function(){return e[i]}}),Object.defineProperty(t,n,s)}:function(t,e,i,n){void 0===n&&(n=i),t[n]=e[i]}),r=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),o=this&&this.__importStar||(n=function(t){return n=Object.getOwnPropertyNames||function(t){var e=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[e.length]=i);return e},n(t)},function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var i=n(t),o=0;o<i.length;o++)"default"!==i[o]&&s(e,t,i[o]);return r(e,t),e}),a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),i(2572);const l=o(i(2773)),c=o(i(7613)),h=a(i(4089)),u=a(i(5123));h.default.init();const d=l.LoaderComponent.build().show(),p=l.HeaderComponent.build([{type:"section",entity:c.settings.hide()},{type:"section",entity:c.analytics.hide()},{type:"separator"},{type:"section",entity:c.expectations},{type:"section",entity:c.history.hide()}]).on("select",(t=>{Object.values(p.sections).forEach((t=>t.hide())),u.default.switchStorage(t.storage),t.show().select()}));u.default.switchStorage(c.expectations.storage).share({popups:l.PopupsComponent.build(),groups:new Set}),document.body.prepend(p.element),document.body.append(d.element),document.body.append(u.default.shared.popups.element),Object.values(c).forEach((t=>document.body.append(t.element))),u.default.instances.io.on("connect",(async()=>{console.log("WebSocket has connected"),await u.default.services.io.exec("ping");const{data:t}=await u.default.services.io.exec("config:get");u.default.assignConfig(t),u.default.shared.popups.push("Connected!"),Object.values(c).forEach((t=>t.initialize())),d.hide()}))},8969:(t,e,i)=>{"use strict";var n=i(9878);i(4001);class s{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,e,i,n){const s=e.listeners[n],r=e.duration;s.forEach((n=>n({chart:t,initial:e.initial,numSteps:r,currentStep:Math.min(i-e.start,r)})))}_refresh(){this._request||(this._running=!0,this._request=n.requestAnimFrame.call(window,(()=>{this._update(),this._request=null,this._running&&this._refresh()})))}_update(t=Date.now()){let e=0;this._charts.forEach(((i,n)=>{if(!i.running||!i.items.length)return;const s=i.items;let r,o=s.length-1,a=!1;for(;o>=0;--o)r=s[o],r._active?(r._total>i.duration&&(i.duration=r._total),r.tick(t),a=!0):(s[o]=s[s.length-1],s.pop());a&&(n.draw(),this._notify(n,i,t,"progress")),s.length||(i.running=!1,this._notify(n,i,t,"complete"),i.initial=!1),e+=s.length})),this._lastDate=t,0===e&&(this._running=!1)}_getAnims(t){const e=this._charts;let i=e.get(t);return i||(i={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(t,i)),i}listen(t,e,i){this._getAnims(t).listeners[e].push(i)}add(t,e){e&&e.length&&this._getAnims(t).items.push(...e)}has(t){return this._getAnims(t).items.length>0}start(t){const e=this._charts.get(t);e&&(e.running=!0,e.start=Date.now(),e.duration=e.items.reduce(((t,e)=>Math.max(t,e._duration)),0),this._refresh())}running(t){if(!this._running)return!1;const e=this._charts.get(t);return!!(e&&e.running&&e.items.length)}stop(t){const e=this._charts.get(t);if(!e||!e.items.length)return;const i=e.items;let n=i.length-1;for(;n>=0;--n)i[n].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var r=new s;const o="transparent",a={boolean:(t,e,i)=>i>.5?e:t,color(t,e,i){const s=n.color(t||o),r=s.valid&&n.color(e||o);return r&&r.valid?r.mix(s,i).hexString():e},number:(t,e,i)=>t+(e-t)*i};class l{constructor(t,e,i,s){const r=e[i];s=n.resolve([t.to,s,r,t.from]);const o=n.resolve([t.from,r,s]);this._active=!0,this._fn=t.fn||a[t.type||typeof o],this._easing=n.effects[t.easing]||n.effects.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=e,this._prop=i,this._from=o,this._to=s,this._promises=void 0}active(){return this._active}update(t,e,i){if(this._active){this._notify(!1);const s=this._target[this._prop],r=i-this._start,o=this._duration-r;this._start=i,this._duration=Math.floor(Math.max(o,t.duration)),this._total+=r,this._loop=!!t.loop,this._to=n.resolve([t.to,e,s,t.from]),this._from=n.resolve([t.from,s,e])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const e=t-this._start,i=this._duration,n=this._prop,s=this._from,r=this._loop,o=this._to;let a;if(this._active=s!==o&&(r||e<i),!this._active)return this._target[n]=o,void this._notify(!0);e<0?this._target[n]=s:(a=e/i%2,a=r&&a>1?2-a:a,a=this._easing(Math.min(1,Math.max(0,a))),this._target[n]=this._fn(s,o,a))}wait(){const t=this._promises||(this._promises=[]);return new Promise(((e,i)=>{t.push({res:e,rej:i})}))}_notify(t){const e=t?"res":"rej",i=this._promises||[];for(let t=0;t<i.length;t++)i[t][e]()}}class c{constructor(t,e){this._chart=t,this._properties=new Map,this.configure(e)}configure(t){if(!n.isObject(t))return;const e=Object.keys(n.defaults.animation),i=this._properties;Object.getOwnPropertyNames(t).forEach((s=>{const r=t[s];if(!n.isObject(r))return;const o={};for(const t of e)o[t]=r[t];(n.isArray(r.properties)&&r.properties||[s]).forEach((t=>{t!==s&&i.has(t)||i.set(t,o)}))}))}_animateOptions(t,e){const i=e.options,n=function(t,e){if(!e)return;let i=t.options;if(i)return i.$shared&&(t.options=i=Object.assign({},i,{$shared:!1,$animations:{}})),i;t.options=e}(t,i);if(!n)return[];const s=this._createAnimations(n,i);return i.$shared&&function(t,e){const i=[],n=Object.keys(e);for(let e=0;e<n.length;e++){const s=t[n[e]];s&&s.active()&&i.push(s.wait())}return Promise.all(i)}(t.options.$animations,i).then((()=>{t.options=i}),(()=>{})),s}_createAnimations(t,e){const i=this._properties,n=[],s=t.$animations||(t.$animations={}),r=Object.keys(e),o=Date.now();let a;for(a=r.length-1;a>=0;--a){const c=r[a];if("$"===c.charAt(0))continue;if("options"===c){n.push(...this._animateOptions(t,e));continue}const h=e[c];let u=s[c];const d=i.get(c);if(u){if(d&&u.active()){u.update(d,h,o);continue}u.cancel()}d&&d.duration?(s[c]=u=new l(d,t,c,h),n.push(u)):t[c]=h}return n}update(t,e){if(0===this._properties.size)return void Object.assign(t,e);const i=this._createAnimations(t,e);return i.length?(r.add(this._chart,i),!0):void 0}}function h(t,e){const i=t&&t.options||{},n=i.reverse,s=void 0===i.min?e:0,r=void 0===i.max?e:0;return{start:n?r:s,end:n?s:r}}function u(t,e){const i=[],n=t._getSortedDatasetMetas(e);let s,r;for(s=0,r=n.length;s<r;++s)i.push(n[s].index);return i}function d(t,e,i,s={}){const r=t.keys,o="single"===s.mode;let a,l,c,h;if(null===e)return;let u=!1;for(a=0,l=r.length;a<l;++a){if(c=+r[a],c===i){if(u=!0,s.all)continue;break}h=t.values[c],n.isNumberFinite(h)&&(o||0===e||n.sign(e)===n.sign(h))&&(e+=h)}return u||s.all?e:0}function p(t,e){const i=t&&t.options.stacked;return i||void 0===i&&void 0!==e.stack}function f(t,e,i){const n=t[e]||(t[e]={});return n[i]||(n[i]={})}function g(t,e,i,n){for(const s of e.getMatchingVisibleMetas(n).reverse()){const e=t[s.index];if(i&&e>0||!i&&e<0)return s.index}return null}function m(t,e){const{chart:i,_cachedMeta:n}=t,s=i._stacks||(i._stacks={}),{iScale:r,vScale:o,index:a}=n,l=r.axis,c=o.axis,h=function(t,e,i){return`${t.id}.${e.id}.${i.stack||i.type}`}(r,o,n),u=e.length;let d;for(let t=0;t<u;++t){const i=e[t],{[l]:r,[c]:u}=i;d=(i._stacks||(i._stacks={}))[c]=f(s,h,r),d[a]=u,d._top=g(d,o,!0,n.type),d._bottom=g(d,o,!1,n.type),(d._visualValues||(d._visualValues={}))[a]=u}}function b(t,e){const i=t.scales;return Object.keys(i).filter((t=>i[t].axis===e)).shift()}function y(t,e){const i=t.controller.index,n=t.vScale&&t.vScale.axis;if(n){e=e||t._parsed;for(const t of e){const e=t._stacks;if(!e||void 0===e[n]||void 0===e[n][i])return;delete e[n][i],void 0!==e[n]._visualValues&&void 0!==e[n]._visualValues[i]&&delete e[n]._visualValues[i]}}}const v=t=>"reset"===t||"none"===t,_=(t,e)=>e?t:Object.assign({},t);class x{static defaults={};static datasetElementType=null;static dataElementType=null;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=p(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&&y(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,e=this._cachedMeta,i=this.getDataset(),s=(t,e,i,n)=>"x"===t?e:"r"===t?n:i,r=e.xAxisID=n.valueOrDefault(i.xAxisID,b(t,"x")),o=e.yAxisID=n.valueOrDefault(i.yAxisID,b(t,"y")),a=e.rAxisID=n.valueOrDefault(i.rAxisID,b(t,"r")),l=e.indexAxis,c=e.iAxisID=s(l,r,o,a),h=e.vAxisID=s(l,o,r,a);e.xScale=this.getScaleForId(r),e.yScale=this.getScaleForId(o),e.rScale=this.getScaleForId(a),e.iScale=this.getScaleForId(c),e.vScale=this.getScaleForId(h)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const e=this._cachedMeta;return t===e.iScale?e.vScale:e.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&n.unlistenArrayEvents(this._data,this),t._stacked&&y(t)}_dataCheck(){const t=this.getDataset(),e=t.data||(t.data=[]),i=this._data;if(n.isObject(e)){const t=this._cachedMeta;this._data=function(t,e){const{iScale:i,vScale:n}=e,s="x"===i.axis?"x":"y",r="x"===n.axis?"x":"y",o=Object.keys(t),a=new Array(o.length);let l,c,h;for(l=0,c=o.length;l<c;++l)h=o[l],a[l]={[s]:h,[r]:t[h]};return a}(e,t)}else if(i!==e){if(i){n.unlistenArrayEvents(i,this);const t=this._cachedMeta;y(t),t._parsed=[]}e&&Object.isExtensible(e)&&n.listenArrayEvents(e,this),this._syncList=[],this._data=e}}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const e=this._cachedMeta,i=this.getDataset();let n=!1;this._dataCheck();const s=e._stacked;e._stacked=p(e.vScale,e),e.stack!==i.stack&&(n=!0,y(e),e.stack=i.stack),this._resyncElements(t),(n||s!==e._stacked)&&(m(this,e._parsed),e._stacked=p(e.vScale,e))}configure(){const t=this.chart.config,e=t.datasetScopeKeys(this._type),i=t.getOptionScopes(this.getDataset(),e,!0);this.options=t.createResolver(i,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,e){const{_cachedMeta:i,_data:s}=this,{iScale:r,_stacked:o}=i,a=r.axis;let l,c,h,u=0===t&&e===s.length||i._sorted,d=t>0&&i._parsed[t-1];if(!1===this._parsing)i._parsed=s,i._sorted=!0,h=s;else{h=n.isArray(s[t])?this.parseArrayData(i,s,t,e):n.isObject(s[t])?this.parseObjectData(i,s,t,e):this.parsePrimitiveData(i,s,t,e);const r=()=>null===c[a]||d&&c[a]<d[a];for(l=0;l<e;++l)i._parsed[l+t]=c=h[l],u&&(r()&&(u=!1),d=c);i._sorted=u}o&&m(this,h)}parsePrimitiveData(t,e,i,n){const{iScale:s,vScale:r}=t,o=s.axis,a=r.axis,l=s.getLabels(),c=s===r,h=new Array(n);let u,d,p;for(u=0,d=n;u<d;++u)p=u+i,h[u]={[o]:c||s.parse(l[p],p),[a]:r.parse(e[p],p)};return h}parseArrayData(t,e,i,n){const{xScale:s,yScale:r}=t,o=new Array(n);let a,l,c,h;for(a=0,l=n;a<l;++a)c=a+i,h=e[c],o[a]={x:s.parse(h[0],c),y:r.parse(h[1],c)};return o}parseObjectData(t,e,i,s){const{xScale:r,yScale:o}=t,{xAxisKey:a="x",yAxisKey:l="y"}=this._parsing,c=new Array(s);let h,u,d,p;for(h=0,u=s;h<u;++h)d=h+i,p=e[d],c[h]={x:r.parse(n.resolveObjectKey(p,a),d),y:o.parse(n.resolveObjectKey(p,l),d)};return c}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,e,i){const n=this.chart,s=this._cachedMeta,r=e[t.axis];return d({keys:u(n,!0),values:e._stacks[t.axis]._visualValues},r,s.index,{mode:i})}updateRangeFromParsed(t,e,i,n){const s=i[e.axis];let r=null===s?NaN:s;const o=n&&i._stacks[e.axis];n&&o&&(n.values=o,r=d(n,s,this._cachedMeta.index)),t.min=Math.min(t.min,r),t.max=Math.max(t.max,r)}getMinMax(t,e){const i=this._cachedMeta,s=i._parsed,r=i._sorted&&t===i.iScale,o=s.length,a=this._getOtherScale(t),l=((t,e,i)=>t&&!e.hidden&&e._stacked&&{keys:u(i,!0),values:null})(e,i,this.chart),c={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:h,max:d}=function(t){const{min:e,max:i,minDefined:n,maxDefined:s}=t.getUserBounds();return{min:n?e:Number.NEGATIVE_INFINITY,max:s?i:Number.POSITIVE_INFINITY}}(a);let p,f;function g(){f=s[p];const e=f[a.axis];return!n.isNumberFinite(f[t.axis])||h>e||d<e}for(p=0;p<o&&(g()||(this.updateRangeFromParsed(c,t,f,l),!r));++p);if(r)for(p=o-1;p>=0;--p)if(!g()){this.updateRangeFromParsed(c,t,f,l);break}return c}getAllParsedValues(t){const e=this._cachedMeta._parsed,i=[];let s,r,o;for(s=0,r=e.length;s<r;++s)o=e[s][t.axis],n.isNumberFinite(o)&&i.push(o);return i}getMaxOverflow(){return!1}getLabelAndValue(t){const e=this._cachedMeta,i=e.iScale,n=e.vScale,s=this.getParsed(t);return{label:i?""+i.getLabelForValue(s[i.axis]):"",value:n?""+n.getLabelForValue(s[n.axis]):""}}_update(t){const e=this._cachedMeta;this.update(t||"default"),e._clip=function(t){let e,i,s,r;return n.isObject(t)?(e=t.top,i=t.right,s=t.bottom,r=t.left):e=i=s=r=t,{top:e,right:i,bottom:s,left:r,disabled:!1===t}}(n.valueOrDefault(this.options.clip,function(t,e,i){if(!1===i)return!1;const n=h(t,i),s=h(e,i);return{top:s.end,right:n.end,bottom:s.start,left:n.start}}(e.xScale,e.yScale,this.getMaxOverflow())))}update(t){}draw(){const t=this._ctx,e=this.chart,i=this._cachedMeta,n=i.data||[],s=e.chartArea,r=[],o=this._drawStart||0,a=this._drawCount||n.length-o,l=this.options.drawActiveElementsOnTop;let c;for(i.dataset&&i.dataset.draw(t,s,o,a),c=o;c<o+a;++c){const e=n[c];e.hidden||(e.active&&l?r.push(e):e.draw(t,s))}for(c=0;c<r.length;++c)r[c].draw(t,s)}getStyle(t,e){const i=e?"active":"default";return void 0===t&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(i):this.resolveDataElementOptions(t||0,i)}getContext(t,e,i){const s=this.getDataset();let r;if(t>=0&&t<this._cachedMeta.data.length){const e=this._cachedMeta.data[t];r=e.$context||(e.$context=function(t,e,i){return n.createContext(t,{active:!1,dataIndex:e,parsed:void 0,raw:void 0,element:i,index:e,mode:"default",type:"data"})}(this.getContext(),t,e)),r.parsed=this.getParsed(t),r.raw=s.data[t],r.index=r.dataIndex=t}else r=this.$context||(this.$context=function(t,e){return n.createContext(t,{active:!1,dataset:void 0,datasetIndex:e,index:e,mode:"default",type:"dataset"})}(this.chart.getContext(),this.index)),r.dataset=s,r.index=r.datasetIndex=this.index;return r.active=!!e,r.mode=i,r}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,e){return this._resolveElementOptions(this.dataElementType.id,e,t)}_resolveElementOptions(t,e="default",i){const s="active"===e,r=this._cachedDataOpts,o=t+"-"+e,a=r[o],l=this.enableOptionSharing&&n.defined(i);if(a)return _(a,l);const c=this.chart.config,h=c.datasetElementScopeKeys(this._type,t),u=s?[`${t}Hover`,"hover",t,""]:[t,""],d=c.getOptionScopes(this.getDataset(),h),p=Object.keys(n.defaults.elements[t]),f=c.resolveNamedOptions(d,p,(()=>this.getContext(i,s,e)),u);return f.$shared&&(f.$shared=l,r[o]=Object.freeze(_(f,l))),f}_resolveAnimations(t,e,i){const n=this.chart,s=this._cachedDataOpts,r=`animation-${e}`,o=s[r];if(o)return o;let a;if(!1!==n.options.animation){const n=this.chart.config,s=n.datasetAnimationScopeKeys(this._type,e),r=n.getOptionScopes(this.getDataset(),s);a=n.createResolver(r,this.getContext(t,i,e))}const l=new c(n,a&&a.animations);return a&&a._cacheable&&(s[r]=Object.freeze(l)),l}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||v(t)||this.chart._animationsDisabled}_getSharedOptions(t,e){const i=this.resolveDataElementOptions(t,e),n=this._sharedOptions,s=this.getSharedOptions(i),r=this.includeOptions(e,s)||s!==n;return this.updateSharedOptions(s,e,i),{sharedOptions:s,includeOptions:r}}updateElement(t,e,i,n){v(n)?Object.assign(t,i):this._resolveAnimations(e,n).update(t,i)}updateSharedOptions(t,e,i){t&&!v(e)&&this._resolveAnimations(void 0,e).update(t,i)}_setStyle(t,e,i,n){t.active=n;const s=this.getStyle(e,n);this._resolveAnimations(e,i,n).update(t,{options:!n&&this.getSharedOptions(s)||s})}removeHoverStyle(t,e,i){this._setStyle(t,i,"active",!1)}setHoverStyle(t,e,i){this._setStyle(t,i,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const e=this._data,i=this._cachedMeta.data;for(const[t,e,i]of this._syncList)this[t](e,i);this._syncList=[];const n=i.length,s=e.length,r=Math.min(s,n);r&&this.parse(0,r),s>n?this._insertElements(n,s-n,t):s<n&&this._removeElements(s,n-s)}_insertElements(t,e,i=!0){const n=this._cachedMeta,s=n.data,r=t+e;let o;const a=t=>{for(t.length+=e,o=t.length-1;o>=r;o--)t[o]=t[o-e]};for(a(s),o=t;o<r;++o)s[o]=new this.dataElementType;this._parsing&&a(n._parsed),this.parse(t,e),i&&this.updateElements(s,t,e,"reset")}updateElements(t,e,i,n){}_removeElements(t,e){const i=this._cachedMeta;if(this._parsing){const n=i._parsed.splice(t,e);i._stacked&&y(i,n)}i.data.splice(t,e)}_sync(t){if(this._parsing)this._syncList.push(t);else{const[e,i,n]=t;this[e](i,n)}this.chart._dataChanges.push([this.index,...t])}_onDataPush(){const t=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-t,t])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(t,e){e&&this._sync(["_removeElements",t,e]);const i=arguments.length-2;i&&this._sync(["_insertElements",t,i])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}function w(t){const e=t.iScale,i=function(t,e){if(!t._cache.$bar){const i=t.getMatchingVisibleMetas(e);let s=[];for(let e=0,n=i.length;e<n;e++)s=s.concat(i[e].controller.getAllParsedValues(t));t._cache.$bar=n._arrayUnique(s.sort(((t,e)=>t-e)))}return t._cache.$bar}(e,t.type);let s,r,o,a,l=e._length;const c=()=>{32767!==o&&-32768!==o&&(n.defined(a)&&(l=Math.min(l,Math.abs(o-a)||l)),a=o)};for(s=0,r=i.length;s<r;++s)o=e.getPixelForValue(i[s]),c();for(a=void 0,s=0,r=e.ticks.length;s<r;++s)o=e.getPixelForTick(s),c();return l}function k(t,e,i,s){return n.isArray(t)?function(t,e,i,n){const s=i.parse(t[0],n),r=i.parse(t[1],n),o=Math.min(s,r),a=Math.max(s,r);let l=o,c=a;Math.abs(o)>Math.abs(a)&&(l=a,c=o),e[i.axis]=c,e._custom={barStart:l,barEnd:c,start:s,end:r,min:o,max:a}}(t,e,i,s):e[i.axis]=i.parse(t,s),e}function S(t,e,i,n){const s=t.iScale,r=t.vScale,o=s.getLabels(),a=s===r,l=[];let c,h,u,d;for(c=i,h=i+n;c<h;++c)d=e[c],u={},u[s.axis]=a||s.parse(o[c],c),l.push(k(d,u,r,c));return l}function P(t){return t&&void 0!==t.barStart&&void 0!==t.barEnd}function O(t,e,i,n){let s=e.borderSkipped;const r={};if(!s)return void(t.borderSkipped=r);if(!0===s)return void(t.borderSkipped={top:!0,right:!0,bottom:!0,left:!0});const{start:o,end:a,reverse:l,top:c,bottom:h}=function(t){let e,i,n,s,r;return t.horizontal?(e=t.base>t.x,i="left",n="right"):(e=t.base<t.y,i="bottom",n="top"),e?(s="end",r="start"):(s="start",r="end"),{start:i,end:n,reverse:e,top:s,bottom:r}}(t);"middle"===s&&i&&(t.enableBorderRadius=!0,(i._top||0)===n?s=c:(i._bottom||0)===n?s=h:(r[C(h,o,a,l)]=!0,s=c)),r[C(s,o,a,l)]=!0,t.borderSkipped=r}function C(t,e,i,n){var s,r,o;return n?(o=i,t=M(t=(s=t)===(r=e)?o:s===o?r:s,i,e)):t=M(t,e,i),t}function M(t,e,i){return"start"===t?e:"end"===t?i:t}function E(t,{inflateAmount:e},i){t.inflateAmount="auto"===e?1===i?.33:0:e}class A extends x{static id="bar";static defaults={datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}};static overrides={scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}};parsePrimitiveData(t,e,i,n){return S(t,e,i,n)}parseArrayData(t,e,i,n){return S(t,e,i,n)}parseObjectData(t,e,i,s){const{iScale:r,vScale:o}=t,{xAxisKey:a="x",yAxisKey:l="y"}=this._parsing,c="x"===r.axis?a:l,h="x"===o.axis?a:l,u=[];let d,p,f,g;for(d=i,p=i+s;d<p;++d)g=e[d],f={},f[r.axis]=r.parse(n.resolveObjectKey(g,c),d),u.push(k(n.resolveObjectKey(g,h),f,o,d));return u}updateRangeFromParsed(t,e,i,n){super.updateRangeFromParsed(t,e,i,n);const s=i._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:i,vScale:n}=e,s=this.getParsed(t),r=s._custom,o=P(r)?"["+r.start+", "+r.end+"]":""+n.getLabelForValue(s[n.axis]);return{label:""+i.getLabelForValue(s[i.axis]),value:o}}initialize(){this.enableOptionSharing=!0,super.initialize(),this._cachedMeta.stack=this.getDataset().stack}update(t){const e=this._cachedMeta;this.updateElements(e.data,0,e.data.length,t)}updateElements(t,e,i,s){const r="reset"===s,{index:o,_cachedMeta:{vScale:a}}=this,l=a.getBasePixel(),c=a.isHorizontal(),h=this._getRuler(),{sharedOptions:u,includeOptions:d}=this._getSharedOptions(e,s);for(let p=e;p<e+i;p++){const e=this.getParsed(p),i=r||n.isNullOrUndef(e[a.axis])?{base:l,head:l}:this._calculateBarValuePixels(p),f=this._calculateBarIndexPixels(p,h),g=(e._stacks||{})[a.axis],m={horizontal:c,base:i.base,enableBorderRadius:!g||P(e._custom)||o===g._top||o===g._bottom,x:c?i.head:f.center,y:c?f.center:i.head,height:c?f.size:Math.abs(i.size),width:c?Math.abs(i.size):f.size};d&&(m.options=u||this.resolveDataElementOptions(p,t[p].active?"active":s));const b=m.options||t[p].options;O(m,b,g,o),E(m,b,h.ratio),this.updateElement(t[p],p,m,s)}}_getStacks(t,e){const{iScale:i}=this._cachedMeta,s=i.getMatchingVisibleMetas(this._type).filter((t=>t.controller.options.grouped)),r=i.options.stacked,o=[],a=this._cachedMeta.controller.getParsed(e),l=a&&a[i.axis],c=t=>{const e=t._parsed.find((t=>t[i.axis]===l)),s=e&&e[t.vScale.axis];if(n.isNullOrUndef(s)||isNaN(s))return!0};for(const i of s)if((void 0===e||!c(i))&&((!1===r||-1===o.indexOf(i.stack)||void 0===r&&void 0===i.stack)&&o.push(i.stack),i.index===t))break;return o.length||o.push(void 0),o}_getStackCount(t){return this._getStacks(void 0,t).length}_getStackIndex(t,e,i){const n=this._getStacks(t,i),s=void 0!==e?n.indexOf(e):-1;return-1===s?n.length-1:s}_getRuler(){const t=this.options,e=this._cachedMeta,i=e.iScale,n=[];let s,r;for(s=0,r=e.data.length;s<r;++s)n.push(i.getPixelForValue(this.getParsed(s)[i.axis],s));const o=t.barThickness;return{min:o||w(e),pixels:n,start:i._startPixel,end:i._endPixel,stackCount:this._getStackCount(),scale:i,grouped:t.grouped,ratio:o?1:t.categoryPercentage*t.barPercentage}}_calculateBarValuePixels(t){const{_cachedMeta:{vScale:e,_stacked:i,index:s},options:{base:r,minBarLength:o}}=this,a=r||0,l=this.getParsed(t),c=l._custom,h=P(c);let u,d,p=l[e.axis],f=0,g=i?this.applyStack(e,l,i):p;g!==p&&(f=g-p,g=p),h&&(p=c.barStart,g=c.barEnd-c.barStart,0!==p&&n.sign(p)!==n.sign(c.barEnd)&&(f=0),f+=p);const m=n.isNullOrUndef(r)||h?f:r;let b=e.getPixelForValue(m);if(u=this.chart.getDataVisibility(t)?e.getPixelForValue(f+g):b,d=u-b,Math.abs(d)<o){d=function(t,e,i){return 0!==t?n.sign(t):(e.isHorizontal()?1:-1)*(e.min>=i?1:-1)}(d,e,a)*o,p===a&&(b-=d/2);const t=e.getPixelForDecimal(0),r=e.getPixelForDecimal(1),c=Math.min(t,r),f=Math.max(t,r);b=Math.max(Math.min(b,f),c),u=b+d,i&&!h&&(l._stacks[e.axis]._visualValues[s]=e.getValueForPixel(u)-e.getValueForPixel(b))}if(b===e.getPixelForValue(a)){const t=n.sign(d)*e.getLineWidthForValue(a)/2;b+=t,d-=t}return{size:d,base:b,head:u,center:u+d/2}}_calculateBarIndexPixels(t,e){const i=e.scale,s=this.options,r=s.skipNull,o=n.valueOrDefault(s.maxBarThickness,1/0);let a,l;if(e.grouped){const i=r?this._getStackCount(t):e.stackCount,c="flex"===s.barThickness?function(t,e,i,n){const s=e.pixels,r=s[t];let o=t>0?s[t-1]:null,a=t<s.length-1?s[t+1]:null;const l=i.categoryPercentage;null===o&&(o=r-(null===a?e.end-e.start:a-r)),null===a&&(a=r+r-o);const c=r-(r-Math.min(o,a))/2*l;return{chunk:Math.abs(a-o)/2*l/n,ratio:i.barPercentage,start:c}}(t,e,s,i):function(t,e,i,s){const r=i.barThickness;let o,a;return n.isNullOrUndef(r)?(o=e.min*i.categoryPercentage,a=i.barPercentage):(o=r*s,a=1),{chunk:o/s,ratio:a,start:e.pixels[t]-o/2}}(t,e,s,i),h=this._getStackIndex(this.index,this._cachedMeta.stack,r?t:void 0);a=c.start+c.chunk*h+c.chunk/2,l=Math.min(o,c.chunk*c.ratio)}else a=i.getPixelForValue(this.getParsed(t)[i.axis],t),l=Math.min(o,e.min*e.ratio);return{base:a-l/2,head:a+l/2,center:a,size:l}}draw(){const t=this._cachedMeta,e=t.vScale,i=t.data,n=i.length;let s=0;for(;s<n;++s)null===this.getParsed(s)[e.axis]||i[s].hidden||i[s].draw(this._ctx)}}class L extends x{static id="bubble";static defaults={datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}};static overrides={scales:{x:{type:"linear"},y:{type:"linear"}}};initialize(){this.enableOptionSharing=!0,super.initialize()}parsePrimitiveData(t,e,i,n){const s=super.parsePrimitiveData(t,e,i,n);for(let t=0;t<s.length;t++)s[t]._custom=this.resolveDataElementOptions(t+i).radius;return s}parseArrayData(t,e,i,s){const r=super.parseArrayData(t,e,i,s);for(let t=0;t<r.length;t++){const s=e[i+t];r[t]._custom=n.valueOrDefault(s[2],this.resolveDataElementOptions(t+i).radius)}return r}parseObjectData(t,e,i,s){const r=super.parseObjectData(t,e,i,s);for(let t=0;t<r.length;t++){const s=e[i+t];r[t]._custom=n.valueOrDefault(s&&s.r&&+s.r,this.resolveDataElementOptions(t+i).radius)}return r}getMaxOverflow(){const t=this._cachedMeta.data;let e=0;for(let i=t.length-1;i>=0;--i)e=Math.max(e,t[i].size(this.resolveDataElementOptions(i))/2);return e>0&&e}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart.data.labels||[],{xScale:n,yScale:s}=e,r=this.getParsed(t),o=n.getLabelForValue(r.x),a=s.getLabelForValue(r.y),l=r._custom;return{label:i[t]||"",value:"("+o+", "+a+(l?", "+l:"")+")"}}update(t){const e=this._cachedMeta.data;this.updateElements(e,0,e.length,t)}updateElements(t,e,i,n){const s="reset"===n,{iScale:r,vScale:o}=this._cachedMeta,{sharedOptions:a,includeOptions:l}=this._getSharedOptions(e,n),c=r.axis,h=o.axis;for(let u=e;u<e+i;u++){const e=t[u],i=!s&&this.getParsed(u),d={},p=d[c]=s?r.getPixelForDecimal(.5):r.getPixelForValue(i[c]),f=d[h]=s?o.getBasePixel():o.getPixelForValue(i[h]);d.skip=isNaN(p)||isNaN(f),l&&(d.options=a||this.resolveDataElementOptions(u,e.active?"active":n),s&&(d.options.radius=0)),this.updateElement(e,u,d,n)}}resolveDataElementOptions(t,e){const i=this.getParsed(t);let s=super.resolveDataElementOptions(t,e);s.$shared&&(s=Object.assign({},s,{$shared:!1}));const r=s.radius;return"active"!==e&&(s.radius=0),s.radius+=n.valueOrDefault(i&&i._custom,r),s}}class D extends x{static id="doughnut";static 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"};static descriptors={_scriptable:t=>"spacing"!==t,_indexable:t=>"spacing"!==t&&!t.startsWith("borderDash")&&!t.startsWith("hoverBorderDash")};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:i,color:n}}=t.legend.options;return e.labels.map(((e,s)=>{const r=t.getDatasetMeta(0).controller.getStyle(s);return{text:e,fillStyle:r.backgroundColor,strokeStyle:r.borderColor,fontColor:n,lineWidth:r.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(s),index:s}}))}return[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}}}};constructor(t,e){super(t,e),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,e){const i=this.getDataset().data,s=this._cachedMeta;if(!1===this._parsing)s._parsed=i;else{let r,o,a=t=>+i[t];if(n.isObject(i[t])){const{key:t="value"}=this._parsing;a=e=>+n.resolveObjectKey(i[e],t)}for(r=t,o=t+e;r<o;++r)s._parsed[r]=a(r)}}_getRotation(){return n.toRadians(this.options.rotation-90)}_getCircumference(){return n.toRadians(this.options.circumference)}_getRotationExtents(){let t=n.TAU,e=-n.TAU;for(let i=0;i<this.chart.data.datasets.length;++i)if(this.chart.isDatasetVisible(i)&&this.chart.getDatasetMeta(i).type===this._type){const n=this.chart.getDatasetMeta(i).controller,s=n._getRotation(),r=n._getCircumference();t=Math.min(t,s),e=Math.max(e,s+r)}return{rotation:t,circumference:e-t}}update(t){const e=this.chart,{chartArea:i}=e,s=this._cachedMeta,r=s.data,o=this.getMaxBorderWidth()+this.getMaxOffset(r)+this.options.spacing,a=Math.max((Math.min(i.width,i.height)-o)/2,0),l=Math.min(n.toPercentage(this.options.cutout,a),1),c=this._getRingWeight(this.index),{circumference:h,rotation:u}=this._getRotationExtents(),{ratioX:d,ratioY:p,offsetX:f,offsetY:g}=function(t,e,i){let s=1,r=1,o=0,a=0;if(e<n.TAU){const l=t,c=l+e,h=Math.cos(l),u=Math.sin(l),d=Math.cos(c),p=Math.sin(c),f=(t,e,s)=>n._angleBetween(t,l,c,!0)?1:Math.max(e,e*i,s,s*i),g=(t,e,s)=>n._angleBetween(t,l,c,!0)?-1:Math.min(e,e*i,s,s*i),m=f(0,h,d),b=f(n.HALF_PI,u,p),y=g(n.PI,h,d),v=g(n.PI+n.HALF_PI,u,p);s=(m-y)/2,r=(b-v)/2,o=-(m+y)/2,a=-(b+v)/2}return{ratioX:s,ratioY:r,offsetX:o,offsetY:a}}(u,h,l),m=(i.width-o)/d,b=(i.height-o)/p,y=Math.max(Math.min(m,b)/2,0),v=n.toDimension(this.options.radius,y),_=(v-Math.max(v*l,0))/this._getVisibleDatasetWeightTotal();this.offsetX=f*v,this.offsetY=g*v,s.total=this.calculateTotal(),this.outerRadius=v-_*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-_*c,0),this.updateElements(r,0,r.length,t)}_circumference(t,e){const i=this.options,s=this._cachedMeta,r=this._getCircumference();return e&&i.animation.animateRotate||!this.chart.getDataVisibility(t)||null===s._parsed[t]||s.data[t].hidden?0:this.calculateCircumference(s._parsed[t]*r/n.TAU)}updateElements(t,e,i,n){const s="reset"===n,r=this.chart,o=r.chartArea,a=r.options.animation,l=(o.left+o.right)/2,c=(o.top+o.bottom)/2,h=s&&a.animateScale,u=h?0:this.innerRadius,d=h?0:this.outerRadius,{sharedOptions:p,includeOptions:f}=this._getSharedOptions(e,n);let g,m=this._getRotation();for(g=0;g<e;++g)m+=this._circumference(g,s);for(g=e;g<e+i;++g){const e=this._circumference(g,s),i=t[g],r={x:l+this.offsetX,y:c+this.offsetY,startAngle:m,endAngle:m+e,circumference:e,outerRadius:d,innerRadius:u};f&&(r.options=p||this.resolveDataElementOptions(g,i.active?"active":n)),m+=e,this.updateElement(i,g,r,n)}}calculateTotal(){const t=this._cachedMeta,e=t.data;let i,n=0;for(i=0;i<e.length;i++){const s=t._parsed[i];null===s||isNaN(s)||!this.chart.getDataVisibility(i)||e[i].hidden||(n+=Math.abs(s))}return n}calculateCircumference(t){const e=this._cachedMeta.total;return e>0&&!isNaN(t)?n.TAU*(Math.abs(t)/e):0}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart,s=i.data.labels||[],r=n.formatNumber(e._parsed[t],i.options.locale);return{label:s[t]||"",value:r}}getMaxBorderWidth(t){let e=0;const i=this.chart;let n,s,r,o,a;if(!t)for(n=0,s=i.data.datasets.length;n<s;++n)if(i.isDatasetVisible(n)){r=i.getDatasetMeta(n),t=r.data,o=r.controller;break}if(!t)return 0;for(n=0,s=t.length;n<s;++n)a=o.resolveDataElementOptions(n),"inner"!==a.borderAlign&&(e=Math.max(e,a.borderWidth||0,a.hoverBorderWidth||0));return e}getMaxOffset(t){let e=0;for(let i=0,n=t.length;i<n;++i){const t=this.resolveDataElementOptions(i);e=Math.max(e,t.offset||0,t.hoverOffset||0)}return e}_getRingWeightOffset(t){let e=0;for(let i=0;i<t;++i)this.chart.isDatasetVisible(i)&&(e+=this._getRingWeight(i));return e}_getRingWeight(t){return Math.max(n.valueOrDefault(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}class T extends x{static id="line";static defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1};static overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){const e=this._cachedMeta,{dataset:i,data:s=[],_dataset:r}=e,o=this.chart._animationsDisabled;let{start:a,count:l}=n._getStartAndCountOfVisiblePoints(e,s,o);this._drawStart=a,this._drawCount=l,n._scaleRangesChanged(e)&&(a=0,l=s.length),i._chart=this.chart,i._datasetIndex=this.index,i._decimated=!!r._decimated,i.points=s;const c=this.resolveDatasetElementOptions(t);this.options.showLine||(c.borderWidth=0),c.segment=this.options.segment,this.updateElement(i,void 0,{animated:!o,options:c},t),this.updateElements(s,a,l,t)}updateElements(t,e,i,s){const r="reset"===s,{iScale:o,vScale:a,_stacked:l,_dataset:c}=this._cachedMeta,{sharedOptions:h,includeOptions:u}=this._getSharedOptions(e,s),d=o.axis,p=a.axis,{spanGaps:f,segment:g}=this.options,m=n.isNumber(f)?f:Number.POSITIVE_INFINITY,b=this.chart._animationsDisabled||r||"none"===s,y=e+i,v=t.length;let _=e>0&&this.getParsed(e-1);for(let i=0;i<v;++i){const f=t[i],v=b?f:{};if(i<e||i>=y){v.skip=!0;continue}const x=this.getParsed(i),w=n.isNullOrUndef(x[p]),k=v[d]=o.getPixelForValue(x[d],i),S=v[p]=r||w?a.getBasePixel():a.getPixelForValue(l?this.applyStack(a,x,l):x[p],i);v.skip=isNaN(k)||isNaN(S)||w,v.stop=i>0&&Math.abs(x[d]-_[d])>m,g&&(v.parsed=x,v.raw=c.data[i]),u&&(v.options=h||this.resolveDataElementOptions(i,f.active?"active":s)),b||this.updateElement(f,i,v,s),_=x}}getMaxOverflow(){const t=this._cachedMeta,e=t.dataset,i=e.options&&e.options.borderWidth||0,n=t.data||[];if(!n.length)return i;const s=n[0].size(this.resolveDataElementOptions(0)),r=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(i,s,r)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}class j extends x{static id="polarArea";static defaults={dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:i,color:n}}=t.legend.options;return e.labels.map(((e,s)=>{const r=t.getDatasetMeta(0).controller.getStyle(s);return{text:e,fillStyle:r.backgroundColor,strokeStyle:r.borderColor,fontColor:n,lineWidth:r.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(s),index:s}}))}return[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}};constructor(t,e){super(t,e),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart,s=i.data.labels||[],r=n.formatNumber(e._parsed[t].r,i.options.locale);return{label:s[t]||"",value:r}}parseObjectData(t,e,i,s){return n._parseObjectDataRadialScale.bind(this)(t,e,i,s)}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(((t,i)=>{const n=this.getParsed(i).r;!isNaN(n)&&this.chart.getDataVisibility(i)&&(n<e.min&&(e.min=n),n>e.max&&(e.max=n))})),e}_updateRadius(){const t=this.chart,e=t.chartArea,i=t.options,n=Math.min(e.right-e.left,e.bottom-e.top),s=Math.max(n/2,0),r=(s-Math.max(i.cutoutPercentage?s/100*i.cutoutPercentage:1,0))/t.getVisibleDatasetCount();this.outerRadius=s-r*this.index,this.innerRadius=this.outerRadius-r}updateElements(t,e,i,s){const r="reset"===s,o=this.chart,a=o.options.animation,l=this._cachedMeta.rScale,c=l.xCenter,h=l.yCenter,u=l.getIndexAngle(0)-.5*n.PI;let d,p=u;const f=360/this.countVisibleElements();for(d=0;d<e;++d)p+=this._computeAngle(d,s,f);for(d=e;d<e+i;d++){const e=t[d];let i=p,n=p+this._computeAngle(d,s,f),g=o.getDataVisibility(d)?l.getDistanceFromCenterForValue(this.getParsed(d).r):0;p=n,r&&(a.animateScale&&(g=0),a.animateRotate&&(i=n=u));const m={x:c,y:h,innerRadius:0,outerRadius:g,startAngle:i,endAngle:n,options:this.resolveDataElementOptions(d,e.active?"active":s)};this.updateElement(e,d,m,s)}}countVisibleElements(){const t=this._cachedMeta;let e=0;return t.data.forEach(((t,i)=>{!isNaN(this.getParsed(i).r)&&this.chart.getDataVisibility(i)&&e++})),e}_computeAngle(t,e,i){return this.chart.getDataVisibility(t)?n.toRadians(this.resolveDataElementOptions(t,e).angle||i):0}}class R extends D{static id="pie";static defaults={cutout:0,rotation:0,circumference:360,radius:"100%"}}class I extends x{static id="radar";static defaults={datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}};static overrides={aspectRatio:1,scales:{r:{type:"radialLinear"}}};getLabelAndValue(t){const e=this._cachedMeta.vScale,i=this.getParsed(t);return{label:e.getLabels()[t],value:""+e.getLabelForValue(i[e.axis])}}parseObjectData(t,e,i,s){return n._parseObjectDataRadialScale.bind(this)(t,e,i,s)}update(t){const e=this._cachedMeta,i=e.dataset,n=e.data||[],s=e.iScale.getLabels();if(i.points=n,"resize"!==t){const e=this.resolveDatasetElementOptions(t);this.options.showLine||(e.borderWidth=0);const r={_loop:!0,_fullLoop:s.length===n.length,options:e};this.updateElement(i,void 0,r,t)}this.updateElements(n,0,n.length,t)}updateElements(t,e,i,n){const s=this._cachedMeta.rScale,r="reset"===n;for(let o=e;o<e+i;o++){const e=t[o],i=this.resolveDataElementOptions(o,e.active?"active":n),a=s.getPointPositionForValue(o,this.getParsed(o).r),l=r?s.xCenter:a.x,c=r?s.yCenter:a.y,h={x:l,y:c,angle:a.angle,skip:isNaN(l)||isNaN(c),options:i};this.updateElement(e,o,h,n)}}}class N extends x{static id="scatter";static defaults={datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1};static overrides={interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}};getLabelAndValue(t){const e=this._cachedMeta,i=this.chart.data.labels||[],{xScale:n,yScale:s}=e,r=this.getParsed(t),o=n.getLabelForValue(r.x),a=s.getLabelForValue(r.y);return{label:i[t]||"",value:"("+o+", "+a+")"}}update(t){const e=this._cachedMeta,{data:i=[]}=e,s=this.chart._animationsDisabled;let{start:r,count:o}=n._getStartAndCountOfVisiblePoints(e,i,s);if(this._drawStart=r,this._drawCount=o,n._scaleRangesChanged(e)&&(r=0,o=i.length),this.options.showLine){this.datasetElementType||this.addElements();const{dataset:n,_dataset:r}=e;n._chart=this.chart,n._datasetIndex=this.index,n._decimated=!!r._decimated,n.points=i;const o=this.resolveDatasetElementOptions(t);o.segment=this.options.segment,this.updateElement(n,void 0,{animated:!s,options:o},t)}else this.datasetElementType&&(delete e.dataset,this.datasetElementType=!1);this.updateElements(i,r,o,t)}addElements(){const{showLine:t}=this.options;!this.datasetElementType&&t&&(this.datasetElementType=this.chart.registry.getElement("line")),super.addElements()}updateElements(t,e,i,s){const r="reset"===s,{iScale:o,vScale:a,_stacked:l,_dataset:c}=this._cachedMeta,h=this.resolveDataElementOptions(e,s),u=this.getSharedOptions(h),d=this.includeOptions(s,u),p=o.axis,f=a.axis,{spanGaps:g,segment:m}=this.options,b=n.isNumber(g)?g:Number.POSITIVE_INFINITY,y=this.chart._animationsDisabled||r||"none"===s;let v=e>0&&this.getParsed(e-1);for(let h=e;h<e+i;++h){const e=t[h],i=this.getParsed(h),g=y?e:{},_=n.isNullOrUndef(i[f]),x=g[p]=o.getPixelForValue(i[p],h),w=g[f]=r||_?a.getBasePixel():a.getPixelForValue(l?this.applyStack(a,i,l):i[f],h);g.skip=isNaN(x)||isNaN(w)||_,g.stop=h>0&&Math.abs(i[p]-v[p])>b,m&&(g.parsed=i,g.raw=c.data[h]),d&&(g.options=u||this.resolveDataElementOptions(h,e.active?"active":s)),y||this.updateElement(e,h,g,s),v=i}this.updateSharedOptions(u,s,h)}getMaxOverflow(){const t=this._cachedMeta,e=t.data||[];if(!this.options.showLine){let t=0;for(let i=e.length-1;i>=0;--i)t=Math.max(t,e[i].size(this.resolveDataElementOptions(i))/2);return t>0&&t}const i=t.dataset,n=i.options&&i.options.borderWidth||0;if(!e.length)return n;const s=e[0].size(this.resolveDataElementOptions(0)),r=e[e.length-1].size(this.resolveDataElementOptions(e.length-1));return Math.max(n,s,r)/2}}var F=Object.freeze({__proto__:null,BarController:A,BubbleController:L,DoughnutController:D,LineController:T,PieController:R,PolarAreaController:j,RadarController:I,ScatterController:N});function B(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class H{static override(t){Object.assign(H.prototype,t)}options;constructor(t){this.options=t||{}}init(){}formats(){return B()}parse(){return B()}format(){return B()}add(){return B()}diff(){return B()}startOf(){return B()}endOf(){return B()}}var z={_date:H};function V(t,e,i,s){const{controller:r,data:o,_sorted:a}=t,l=r._cachedMeta.iScale,c=t.dataset&&t.dataset.options?t.dataset.options.spanGaps:null;if(l&&e===l.axis&&"r"!==e&&a&&o.length){const a=l._reversePixels?n._rlookupByKey:n._lookupByKey;if(!s){const s=a(o,e,i);if(c){const{vScale:e}=r._cachedMeta,{_parsed:i}=t,o=i.slice(0,s.lo+1).reverse().findIndex((t=>!n.isNullOrUndef(t[e.axis])));s.lo-=Math.max(0,o);const a=i.slice(s.hi).findIndex((t=>!n.isNullOrUndef(t[e.axis])));s.hi+=Math.max(0,a)}return s}if(r._sharedOptions){const t=o[0],n="function"==typeof t.getRange&&t.getRange(e);if(n){const t=a(o,e,i-n),s=a(o,e,i+n);return{lo:t.lo,hi:s.hi}}}}return{lo:0,hi:o.length-1}}function $(t,e,i,n,s){const r=t.getSortedVisibleDatasetMetas(),o=i[e];for(let t=0,i=r.length;t<i;++t){const{index:i,data:a}=r[t],{lo:l,hi:c}=V(r[t],e,o,s);for(let t=l;t<=c;++t){const e=a[t];e.skip||n(e,i,t)}}}function W(t,e,i,s,r){const o=[];return r||t.isPointInArea(e)?($(t,i,e,(function(i,a,l){(r||n._isPointInArea(i,t.chartArea,0))&&i.inRange(e.x,e.y,s)&&o.push({element:i,datasetIndex:a,index:l})}),!0),o):o}function U(t,e,i,s,r,o){return o||t.isPointInArea(e)?"r"!==i||s?function(t,e,i,n,s,r){let o=[];const a=function(t){const e=-1!==t.indexOf("x"),i=-1!==t.indexOf("y");return function(t,n){const s=e?Math.abs(t.x-n.x):0,r=i?Math.abs(t.y-n.y):0;return Math.sqrt(Math.pow(s,2)+Math.pow(r,2))}}(i);let l=Number.POSITIVE_INFINITY;return $(t,i,e,(function(i,c,h){const u=i.inRange(e.x,e.y,s);if(n&&!u)return;const d=i.getCenterPoint(s);if(!r&&!t.isPointInArea(d)&&!u)return;const p=a(e,d);p<l?(o=[{element:i,datasetIndex:c,index:h}],l=p):p===l&&o.push({element:i,datasetIndex:c,index:h})})),o}(t,e,i,s,r,o):function(t,e,i,s){let r=[];return $(t,i,e,(function(t,i,o){const{startAngle:a,endAngle:l}=t.getProps(["startAngle","endAngle"],s),{angle:c}=n.getAngleFromPoint(t,{x:e.x,y:e.y});n._angleBetween(c,a,l)&&r.push({element:t,datasetIndex:i,index:o})})),r}(t,e,i,r):[]}function q(t,e,i,n,s){const r=[],o="x"===i?"inXRange":"inYRange";let a=!1;return $(t,i,e,((t,n,l)=>{t[o]&&t[o](e[i],s)&&(r.push({element:t,datasetIndex:n,index:l}),a=a||t.inRange(e.x,e.y,s))})),n&&!a?[]:r}var Y={evaluateInteractionItems:$,modes:{index(t,e,i,s){const r=n.getRelativePosition(e,t),o=i.axis||"x",a=i.includeInvisible||!1,l=i.intersect?W(t,r,o,s,a):U(t,r,o,!1,s,a),c=[];return l.length?(t.getSortedVisibleDatasetMetas().forEach((t=>{const e=l[0].index,i=t.data[e];i&&!i.skip&&c.push({element:i,datasetIndex:t.index,index:e})})),c):[]},dataset(t,e,i,s){const r=n.getRelativePosition(e,t),o=i.axis||"xy",a=i.includeInvisible||!1;let l=i.intersect?W(t,r,o,s,a):U(t,r,o,!1,s,a);if(l.length>0){const e=l[0].datasetIndex,i=t.getDatasetMeta(e).data;l=[];for(let t=0;t<i.length;++t)l.push({element:i[t],datasetIndex:e,index:t})}return l},point:(t,e,i,s)=>W(t,n.getRelativePosition(e,t),i.axis||"xy",s,i.includeInvisible||!1),nearest(t,e,i,s){const r=n.getRelativePosition(e,t),o=i.axis||"xy",a=i.includeInvisible||!1;return U(t,r,o,i.intersect,s,a)},x:(t,e,i,s)=>q(t,n.getRelativePosition(e,t),"x",i.intersect,s),y:(t,e,i,s)=>q(t,n.getRelativePosition(e,t),"y",i.intersect,s)}};const K=["left","top","right","bottom"];function X(t,e){return t.filter((t=>t.pos===e))}function J(t,e){return t.filter((t=>-1===K.indexOf(t.pos)&&t.box.axis===e))}function G(t,e){return t.sort(((t,i)=>{const n=e?i:t,s=e?t:i;return n.weight===s.weight?n.index-s.index:n.weight-s.weight}))}function Z(t,e,i,n){return Math.max(t[i],e[i])+Math.max(t[n],e[n])}function Q(t,e){t.top=Math.max(t.top,e.top),t.left=Math.max(t.left,e.left),t.bottom=Math.max(t.bottom,e.bottom),t.right=Math.max(t.right,e.right)}function tt(t,e,i,s){const{pos:r,box:o}=i,a=t.maxPadding;if(!n.isObject(r)){i.size&&(t[r]-=i.size);const e=s[i.stack]||{size:0,count:1};e.size=Math.max(e.size,i.horizontal?o.height:o.width),i.size=e.size/e.count,t[r]+=i.size}o.getPadding&&Q(a,o.getPadding());const l=Math.max(0,e.outerWidth-Z(a,t,"left","right")),c=Math.max(0,e.outerHeight-Z(a,t,"top","bottom")),h=l!==t.w,u=c!==t.h;return t.w=l,t.h=c,i.horizontal?{same:h,other:u}:{same:u,other:h}}function et(t,e){const i=e.maxPadding;return function(t){const n={left:0,top:0,right:0,bottom:0};return t.forEach((t=>{n[t]=Math.max(e[t],i[t])})),n}(t?["left","right"]:["top","bottom"])}function it(t,e,i,n){const s=[];let r,o,a,l,c,h;for(r=0,o=t.length,c=0;r<o;++r){a=t[r],l=a.box,l.update(a.width||e.w,a.height||e.h,et(a.horizontal,e));const{same:o,other:u}=tt(e,i,a,n);c|=o&&s.length,h=h||u,l.fullSize||s.push(a)}return c&&it(s,e,i,n)||h}function nt(t,e,i,n,s){t.top=i,t.left=e,t.right=e+n,t.bottom=i+s,t.width=n,t.height=s}function st(t,e,i,s){const r=i.padding;let{x:o,y:a}=e;for(const l of t){const t=l.box,c=s[l.stack]||{count:1,placed:0,weight:1},h=l.stackWeight/c.weight||1;if(l.horizontal){const s=e.w*h,o=c.size||t.height;n.defined(c.start)&&(a=c.start),t.fullSize?nt(t,r.left,a,i.outerWidth-r.right-r.left,o):nt(t,e.left+c.placed,a,s,o),c.start=a,c.placed+=s,a=t.bottom}else{const s=e.h*h,a=c.size||t.width;n.defined(c.start)&&(o=c.start),t.fullSize?nt(t,o,r.top,a,i.outerHeight-r.bottom-r.top):nt(t,o,e.top+c.placed,a,s),c.start=o,c.placed+=s,o=t.right}}e.x=o,e.y=a}var rt={addBox(t,e){t.boxes||(t.boxes=[]),e.fullSize=e.fullSize||!1,e.position=e.position||"top",e.weight=e.weight||0,e._layers=e._layers||function(){return[{z:0,draw(t){e.draw(t)}}]},t.boxes.push(e)},removeBox(t,e){const i=t.boxes?t.boxes.indexOf(e):-1;-1!==i&&t.boxes.splice(i,1)},configure(t,e,i){e.fullSize=i.fullSize,e.position=i.position,e.weight=i.weight},update(t,e,i,s){if(!t)return;const r=n.toPadding(t.options.layout.padding),o=Math.max(e-r.width,0),a=Math.max(i-r.height,0),l=function(t){const e=function(t){const e=[];let i,n,s,r,o,a;for(i=0,n=(t||[]).length;i<n;++i)s=t[i],({position:r,options:{stack:o,stackWeight:a=1}}=s),e.push({index:i,box:s,pos:r,horizontal:s.isHorizontal(),weight:s.weight,stack:o&&r+o,stackWeight:a});return e}(t),i=G(e.filter((t=>t.box.fullSize)),!0),n=G(X(e,"left"),!0),s=G(X(e,"right")),r=G(X(e,"top"),!0),o=G(X(e,"bottom")),a=J(e,"x"),l=J(e,"y");return{fullSize:i,leftAndTop:n.concat(r),rightAndBottom:s.concat(l).concat(o).concat(a),chartArea:X(e,"chartArea"),vertical:n.concat(s).concat(l),horizontal:r.concat(o).concat(a)}}(t.boxes),c=l.vertical,h=l.horizontal;n.each(t.boxes,(t=>{"function"==typeof t.beforeLayout&&t.beforeLayout()}));const u=c.reduce(((t,e)=>e.box.options&&!1===e.box.options.display?t:t+1),0)||1,d=Object.freeze({outerWidth:e,outerHeight:i,padding:r,availableWidth:o,availableHeight:a,vBoxMaxWidth:o/2/u,hBoxMaxHeight:a/2}),p=Object.assign({},r);Q(p,n.toPadding(s));const f=Object.assign({maxPadding:p,w:o,h:a,x:r.left,y:r.top},r),g=function(t,e){const i=function(t){const e={};for(const i of t){const{stack:t,pos:n,stackWeight:s}=i;if(!t||!K.includes(n))continue;const r=e[t]||(e[t]={count:0,placed:0,weight:0,size:0});r.count++,r.weight+=s}return e}(t),{vBoxMaxWidth:n,hBoxMaxHeight:s}=e;let r,o,a;for(r=0,o=t.length;r<o;++r){a=t[r];const{fullSize:o}=a.box,l=i[a.stack],c=l&&a.stackWeight/l.weight;a.horizontal?(a.width=c?c*n:o&&e.availableWidth,a.height=s):(a.width=n,a.height=c?c*s:o&&e.availableHeight)}return i}(c.concat(h),d);it(l.fullSize,f,d,g),it(c,f,d,g),it(h,f,d,g)&&it(c,f,d,g),function(t){const e=t.maxPadding;function i(i){const n=Math.max(e[i]-t[i],0);return t[i]+=n,n}t.y+=i("top"),t.x+=i("left"),i("right"),i("bottom")}(f),st(l.leftAndTop,f,d,g),f.x+=f.w,f.y+=f.h,st(l.rightAndBottom,f,d,g),t.chartArea={left:f.left,top:f.top,right:f.left+f.w,bottom:f.top+f.h,height:f.h,width:f.w},n.each(l.chartArea,(e=>{const i=e.box;Object.assign(i,t.chartArea),i.update(f.w,f.h,{left:0,top:0,right:0,bottom:0})}))}};class ot{acquireContext(t,e){}releaseContext(t){return!1}addEventListener(t,e,i){}removeEventListener(t,e,i){}getDevicePixelRatio(){return 1}getMaximumSize(t,e,i,n){return e=Math.max(0,e||t.width),i=i||t.height,{width:e,height:Math.max(0,n?Math.floor(e/n):i)}}isAttached(t){return!0}updateConfig(t){}}class at extends ot{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const lt="$chartjs",ct={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},ht=t=>null===t||""===t,ut=!!n.supportsEventListenerOptions&&{passive:!0};function dt(t,e,i){t&&t.canvas&&t.canvas.removeEventListener(e,i,ut)}function pt(t,e){for(const i of t)if(i===e||i.contains(e))return!0}function ft(t,e,i){const n=t.canvas,s=new MutationObserver((t=>{let e=!1;for(const i of t)e=e||pt(i.addedNodes,n),e=e&&!pt(i.removedNodes,n);e&&i()}));return s.observe(document,{childList:!0,subtree:!0}),s}function gt(t,e,i){const n=t.canvas,s=new MutationObserver((t=>{let e=!1;for(const i of t)e=e||pt(i.removedNodes,n),e=e&&!pt(i.addedNodes,n);e&&i()}));return s.observe(document,{childList:!0,subtree:!0}),s}const mt=new Map;let bt=0;function yt(){const t=window.devicePixelRatio;t!==bt&&(bt=t,mt.forEach(((e,i)=>{i.currentDevicePixelRatio!==t&&e()})))}function vt(t,e,i){const s=t.canvas,r=s&&n._getParentNode(s);if(!r)return;const o=n.throttled(((t,e)=>{const n=r.clientWidth;i(t,e),n<r.clientWidth&&i()}),window),a=new ResizeObserver((t=>{const e=t[0],i=e.contentRect.width,n=e.contentRect.height;0===i&&0===n||o(i,n)}));return a.observe(r),function(t,e){mt.size||window.addEventListener("resize",yt),mt.set(t,e)}(t,o),a}function _t(t,e,i){i&&i.disconnect(),"resize"===e&&function(t){mt.delete(t),mt.size||window.removeEventListener("resize",yt)}(t)}function xt(t,e,i){const s=t.canvas,r=n.throttled((e=>{null!==t.ctx&&i(function(t,e){const i=ct[t.type]||t.type,{x:s,y:r}=n.getRelativePosition(t,e);return{type:i,chart:e,native:t,x:void 0!==s?s:null,y:void 0!==r?r:null}}(e,t))}),t);return function(t,e,i){t&&t.addEventListener(e,i,ut)}(s,e,r),r}class wt extends ot{acquireContext(t,e){const i=t&&t.getContext&&t.getContext("2d");return i&&i.canvas===t?(function(t,e){const i=t.style,s=t.getAttribute("height"),r=t.getAttribute("width");if(t[lt]={initial:{height:s,width:r,style:{display:i.display,height:i.height,width:i.width}}},i.display=i.display||"block",i.boxSizing=i.boxSizing||"border-box",ht(r)){const e=n.readUsedSize(t,"width");void 0!==e&&(t.width=e)}if(ht(s))if(""===t.style.height)t.height=t.width/(e||2);else{const e=n.readUsedSize(t,"height");void 0!==e&&(t.height=e)}}(t,e),i):null}releaseContext(t){const e=t.canvas;if(!e[lt])return!1;const i=e[lt].initial;["height","width"].forEach((t=>{const s=i[t];n.isNullOrUndef(s)?e.removeAttribute(t):e.setAttribute(t,s)}));const s=i.style||{};return Object.keys(s).forEach((t=>{e.style[t]=s[t]})),e.width=e.width,delete e[lt],!0}addEventListener(t,e,i){this.removeEventListener(t,e);const n=t.$proxies||(t.$proxies={}),s={attach:ft,detach:gt,resize:vt}[e]||xt;n[e]=s(t,e,i)}removeEventListener(t,e){const i=t.$proxies||(t.$proxies={}),n=i[e];n&&(({attach:_t,detach:_t,resize:_t}[e]||dt)(t,e,n),i[e]=void 0)}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,i,s){return n.getMaximumSize(t,e,i,s)}isAttached(t){const e=t&&n._getParentNode(t);return!(!e||!e.isConnected)}}function kt(t){return!n._isDomSupported()||"undefined"!=typeof OffscreenCanvas&&t instanceof OffscreenCanvas?at:wt}class St{static defaults={};static defaultRoutes=void 0;x;y;active=!1;options;$animations;tooltipPosition(t){const{x:e,y:i}=this.getProps(["x","y"],t);return{x:e,y:i}}hasValue(){return n.isNumber(this.x)&&n.isNumber(this.y)}getProps(t,e){const i=this.$animations;if(!e||!i)return this;const n={};return t.forEach((t=>{n[t]=i[t]&&i[t].active()?i[t]._to:this[t]})),n}}function Pt(t,e,i,s,r){const o=n.valueOrDefault(s,0),a=Math.min(n.valueOrDefault(r,t.length),t.length);let l,c,h,u=0;for(i=Math.ceil(i),r&&(l=r-s,i=l/Math.floor(l/i)),h=o;h<0;)u++,h=Math.round(o+u*i);for(c=Math.max(o,0);c<a;c++)c===h&&(e.push(t[c]),u++,h=Math.round(o+u*i))}const Ot=(t,e,i)=>"top"===e||"left"===e?t[e]+i:t[e]-i,Ct=(t,e)=>Math.min(e||t,t);function Mt(t,e){const i=[],n=t.length/e,s=t.length;let r=0;for(;r<s;r+=n)i.push(t[Math.floor(r)]);return i}function Et(t,e,i){const n=t.ticks.length,s=Math.min(e,n-1),r=t._startPixel,o=t._endPixel,a=1e-6;let l,c=t.getPixelForTick(s);if(!(i&&(l=1===n?Math.max(c-r,o-c):0===e?(t.getPixelForTick(1)-c)/2:(c-t.getPixelForTick(s-1))/2,c+=s<e?l:-l,c<r-a||c>o+a)))return c}function At(t){return t.drawTicks?t.tickLength:0}function Lt(t,e){if(!t.display)return 0;const i=n.toFont(t.font,e),s=n.toPadding(t.padding);return(n.isArray(t.text)?t.text.length:1)*i.lineHeight+s.height}function Dt(t,e,i){let s=n._toLeftRightCenter(t);return(i&&"right"!==e||!i&&"right"===e)&&(s=(t=>"left"===t?"right":"right"===t?"left":t)(s)),s}class Tt extends St{constructor(t){super(),this.id=t.id,this.type=t.type,this.options=void 0,this.ctx=t.ctx,this.chart=t.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(t){this.options=t.setContext(this.getContext()),this.axis=t.axis,this._userMin=this.parse(t.min),this._userMax=this.parse(t.max),this._suggestedMin=this.parse(t.suggestedMin),this._suggestedMax=this.parse(t.suggestedMax)}parse(t,e){return t}getUserBounds(){let{_userMin:t,_userMax:e,_suggestedMin:i,_suggestedMax:s}=this;return t=n.finiteOrDefault(t,Number.POSITIVE_INFINITY),e=n.finiteOrDefault(e,Number.NEGATIVE_INFINITY),i=n.finiteOrDefault(i,Number.POSITIVE_INFINITY),s=n.finiteOrDefault(s,Number.NEGATIVE_INFINITY),{min:n.finiteOrDefault(t,i),max:n.finiteOrDefault(e,s),minDefined:n.isNumberFinite(t),maxDefined:n.isNumberFinite(e)}}getMinMax(t){let e,{min:i,max:s,minDefined:r,maxDefined:o}=this.getUserBounds();if(r&&o)return{min:i,max:s};const a=this.getMatchingVisibleMetas();for(let n=0,l=a.length;n<l;++n)e=a[n].controller.getMinMax(this,t),r||(i=Math.min(i,e.min)),o||(s=Math.max(s,e.max));return i=o&&i>s?s:i,s=r&&i>s?i:s,{min:n.finiteOrDefault(i,n.finiteOrDefault(s,i)),max:n.finiteOrDefault(s,n.finiteOrDefault(i,s))}}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(){n.callback(this.options.beforeUpdate,[this])}update(t,e,i){const{beginAtZero:s,grace:r,ticks:o}=this.options,a=o.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=e,this._margins=i=Object.assign({left:0,right:0,top:0,bottom:0},i),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+i.left+i.right:this.height+i.top+i.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=n._addGrace(this,r,s),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const l=a<this.ticks.length;this._convertTicksToLabels(l?Mt(this.ticks,a):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),o.display&&(o.autoSkip||"auto"===o.source)&&(this.ticks=function(t,e){const i=t.options.ticks,s=function(t){const e=t.options.offset,i=t._tickSize(),n=t._length/i+(e?0:1),s=t._maxLength/i;return Math.floor(Math.min(n,s))}(t),r=Math.min(i.maxTicksLimit||s,s),o=i.major.enabled?function(t){const e=[];let i,n;for(i=0,n=t.length;i<n;i++)t[i].major&&e.push(i);return e}(e):[],a=o.length,l=o[0],c=o[a-1],h=[];if(a>r)return function(t,e,i,n){let s,r=0,o=i[0];for(n=Math.ceil(n),s=0;s<t.length;s++)s===o&&(e.push(t[s]),r++,o=i[r*n])}(e,h,o,a/r),h;const u=function(t,e,i){const s=function(t){const e=t.length;let i,n;if(e<2)return!1;for(n=t[0],i=1;i<e;++i)if(t[i]-t[i-1]!==n)return!1;return n}(t),r=e.length/i;if(!s)return Math.max(r,1);const o=n._factorize(s);for(let t=0,e=o.length-1;t<e;t++){const e=o[t];if(e>r)return e}return Math.max(r,1)}(o,e,r);if(a>0){let t,i;const s=a>1?Math.round((c-l)/(a-1)):null;for(Pt(e,h,u,n.isNullOrUndef(s)?0:l-s,l),t=0,i=a-1;t<i;t++)Pt(e,h,u,o[t],o[t+1]);return Pt(e,h,u,c,n.isNullOrUndef(s)?e.length:c+s),h}return Pt(e,h,u),h}(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),l&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let t,e,i=this.options.reverse;this.isHorizontal()?(t=this.left,e=this.right):(t=this.top,e=this.bottom,i=!i),this._startPixel=t,this._endPixel=e,this._reversePixels=i,this._length=e-t,this._alignToPixels=this.options.alignToPixels}afterUpdate(){n.callback(this.options.afterUpdate,[this])}beforeSetDimensions(){n.callback(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(){n.callback(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),n.callback(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){n.callback(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){const e=this.options.ticks;let i,s,r;for(i=0,s=t.length;i<s;i++)r=t[i],r.label=n.callback(e.callback,[r.value,i,t],this)}afterTickToLabelConversion(){n.callback(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){n.callback(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this.options,e=t.ticks,i=Ct(this.ticks.length,t.ticks.maxTicksLimit),s=e.minRotation||0,r=e.maxRotation;let o,a,l,c=s;if(!this._isVisible()||!e.display||s>=r||i<=1||!this.isHorizontal())return void(this.labelRotation=s);const h=this._getLabelSizes(),u=h.widest.width,d=h.highest.height,p=n._limitValue(this.chart.width-u,0,this.maxWidth);o=t.offset?this.maxWidth/i:p/(i-1),u+6>o&&(o=p/(i-(t.offset?.5:1)),a=this.maxHeight-At(t.grid)-e.padding-Lt(t.title,this.chart.options.font),l=Math.sqrt(u*u+d*d),c=n.toDegrees(Math.min(Math.asin(n._limitValue((h.highest.height+6)/o,-1,1)),Math.asin(n._limitValue(a/l,-1,1))-Math.asin(n._limitValue(d/l,-1,1)))),c=Math.max(s,Math.min(r,c))),this.labelRotation=c}afterCalculateLabelRotation(){n.callback(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){n.callback(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:e,options:{ticks:i,title:s,grid:r}}=this,o=this._isVisible(),a=this.isHorizontal();if(o){const o=Lt(s,e.options.font);if(a?(t.width=this.maxWidth,t.height=At(r)+o):(t.height=this.maxHeight,t.width=At(r)+o),i.display&&this.ticks.length){const{first:e,last:s,widest:r,highest:o}=this._getLabelSizes(),l=2*i.padding,c=n.toRadians(this.labelRotation),h=Math.cos(c),u=Math.sin(c);if(a){const e=i.mirror?0:u*r.width+h*o.height;t.height=Math.min(this.maxHeight,t.height+e+l)}else{const e=i.mirror?0:h*r.width+u*o.height;t.width=Math.min(this.maxWidth,t.width+e+l)}this._calculatePadding(e,s,u,h)}}this._handleMargins(),a?(this.width=this._length=e.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=e.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,e,i,n){const{ticks:{align:s,padding:r},position:o}=this.options,a=0!==this.labelRotation,l="top"!==o&&"x"===this.axis;if(this.isHorizontal()){const o=this.getPixelForTick(0)-this.left,c=this.right-this.getPixelForTick(this.ticks.length-1);let h=0,u=0;a?l?(h=n*t.width,u=i*e.height):(h=i*t.height,u=n*e.width):"start"===s?u=e.width:"end"===s?h=t.width:"inner"!==s&&(h=t.width/2,u=e.width/2),this.paddingLeft=Math.max((h-o+r)*this.width/(this.width-o),0),this.paddingRight=Math.max((u-c+r)*this.width/(this.width-c),0)}else{let i=e.height/2,n=t.height/2;"start"===s?(i=0,n=t.height):"end"===s&&(i=e.height,n=0),this.paddingTop=i+r,this.paddingBottom=n+r}}_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(){n.callback(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:e}=this.options;return"top"===e||"bottom"===e||"x"===t}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){let e,i;for(this.beforeTickToLabelConversion(),this.generateTickLabels(t),e=0,i=t.length;e<i;e++)n.isNullOrUndef(t[e].label)&&(t.splice(e,1),i--,e--);this.afterTickToLabelConversion()}_getLabelSizes(){let t=this._labelSizes;if(!t){const e=this.options.ticks.sampleSize;let i=this.ticks;e<i.length&&(i=Mt(i,e)),this._labelSizes=t=this._computeLabelSizes(i,i.length,this.options.ticks.maxTicksLimit)}return t}_computeLabelSizes(t,e,i){const{ctx:s,_longestTextCache:r}=this,o=[],a=[],l=Math.floor(e/Ct(e,i));let c,h,u,d,p,f,g,m,b,y,v,_=0,x=0;for(c=0;c<e;c+=l){if(d=t[c].label,p=this._resolveTickFontOptions(c),s.font=f=p.string,g=r[f]=r[f]||{data:{},gc:[]},m=p.lineHeight,b=y=0,n.isNullOrUndef(d)||n.isArray(d)){if(n.isArray(d))for(h=0,u=d.length;h<u;++h)v=d[h],n.isNullOrUndef(v)||n.isArray(v)||(b=n._measureText(s,g.data,g.gc,b,v),y+=m)}else b=n._measureText(s,g.data,g.gc,b,d),y=m;o.push(b),a.push(y),_=Math.max(b,_),x=Math.max(y,x)}!function(t,e){n.each(t,(t=>{const i=t.gc,n=i.length/2;let s;if(n>e){for(s=0;s<n;++s)delete t.data[i[s]];i.splice(0,n)}}))}(r,e);const w=o.indexOf(_),k=a.indexOf(x),S=t=>({width:o[t]||0,height:a[t]||0});return{first:S(0),last:S(e-1),widest:S(w),highest:S(k),widths:o,heights:a}}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 n._int16Range(this._alignToPixels?n._alignPixel(this.chart,e,0):e)}getDecimalForPixel(t){const e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:e}=this;return t<0&&e<0?e:t>0&&e>0?t:0}getContext(t){const e=this.ticks||[];if(t>=0&&t<e.length){const i=e[t];return i.$context||(i.$context=function(t,e,i){return n.createContext(t,{tick:i,index:e,type:"tick"})}(this.getContext(),t,i))}return this.$context||(this.$context=(i=this.chart.getContext(),n.createContext(i,{scale:this,type:"scale"})));var i}_tickSize(){const t=this.options.ticks,e=n.toRadians(this.labelRotation),i=Math.abs(Math.cos(e)),s=Math.abs(Math.sin(e)),r=this._getLabelSizes(),o=t.autoSkipPadding||0,a=r?r.widest.width+o:0,l=r?r.highest.height+o:0;return this.isHorizontal()?l*i>a*s?a/i:l/s:l*s<a*i?l/i:a/s}_isVisible(){const t=this.options.display;return"auto"!==t?!!t:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){const e=this.axis,i=this.chart,s=this.options,{grid:r,position:o,border:a}=s,l=r.offset,c=this.isHorizontal(),h=this.ticks.length+(l?1:0),u=At(r),d=[],p=a.setContext(this.getContext()),f=p.display?p.width:0,g=f/2,m=function(t){return n._alignPixel(i,t,f)};let b,y,v,_,x,w,k,S,P,O,C,M;if("top"===o)b=m(this.bottom),w=this.bottom-u,S=b-g,O=m(t.top)+g,M=t.bottom;else if("bottom"===o)b=m(this.top),O=t.top,M=m(t.bottom)-g,w=b+g,S=this.top+u;else if("left"===o)b=m(this.right),x=this.right-u,k=b-g,P=m(t.left)+g,C=t.right;else if("right"===o)b=m(this.left),P=t.left,C=m(t.right)-g,x=b+g,k=this.left+u;else if("x"===e){if("center"===o)b=m((t.top+t.bottom)/2+.5);else if(n.isObject(o)){const t=Object.keys(o)[0],e=o[t];b=m(this.chart.scales[t].getPixelForValue(e))}O=t.top,M=t.bottom,w=b+g,S=w+u}else if("y"===e){if("center"===o)b=m((t.left+t.right)/2);else if(n.isObject(o)){const t=Object.keys(o)[0],e=o[t];b=m(this.chart.scales[t].getPixelForValue(e))}x=b-g,k=x-u,P=t.left,C=t.right}const E=n.valueOrDefault(s.ticks.maxTicksLimit,h),A=Math.max(1,Math.ceil(h/E));for(y=0;y<h;y+=A){const t=this.getContext(y),e=r.setContext(t),s=a.setContext(t),o=e.lineWidth,h=e.color,u=s.dash||[],p=s.dashOffset,f=e.tickWidth,g=e.tickColor,m=e.tickBorderDash||[],b=e.tickBorderDashOffset;v=Et(this,y,l),void 0!==v&&(_=n._alignPixel(i,v,o),c?x=k=P=C=_:w=S=O=M=_,d.push({tx1:x,ty1:w,tx2:k,ty2:S,x1:P,y1:O,x2:C,y2:M,width:o,color:h,borderDash:u,borderDashOffset:p,tickWidth:f,tickColor:g,tickBorderDash:m,tickBorderDashOffset:b}))}return this._ticksLength=h,this._borderValue=b,d}_computeLabelItems(t){const e=this.axis,i=this.options,{position:s,ticks:r}=i,o=this.isHorizontal(),a=this.ticks,{align:l,crossAlign:c,padding:h,mirror:u}=r,d=At(i.grid),p=d+h,f=u?-h:p,g=-n.toRadians(this.labelRotation),m=[];let b,y,v,_,x,w,k,S,P,O,C,M,E="middle";if("top"===s)w=this.bottom-f,k=this._getXAxisLabelAlignment();else if("bottom"===s)w=this.top+f,k=this._getXAxisLabelAlignment();else if("left"===s){const t=this._getYAxisLabelAlignment(d);k=t.textAlign,x=t.x}else if("right"===s){const t=this._getYAxisLabelAlignment(d);k=t.textAlign,x=t.x}else if("x"===e){if("center"===s)w=(t.top+t.bottom)/2+p;else if(n.isObject(s)){const t=Object.keys(s)[0],e=s[t];w=this.chart.scales[t].getPixelForValue(e)+p}k=this._getXAxisLabelAlignment()}else if("y"===e){if("center"===s)x=(t.left+t.right)/2-p;else if(n.isObject(s)){const t=Object.keys(s)[0],e=s[t];x=this.chart.scales[t].getPixelForValue(e)}k=this._getYAxisLabelAlignment(d).textAlign}"y"===e&&("start"===l?E="top":"end"===l&&(E="bottom"));const A=this._getLabelSizes();for(b=0,y=a.length;b<y;++b){v=a[b],_=v.label;const t=r.setContext(this.getContext(b));S=this.getPixelForTick(b)+r.labelOffset,P=this._resolveTickFontOptions(b),O=P.lineHeight,C=n.isArray(_)?_.length:1;const e=C/2,i=t.color,l=t.textStrokeColor,h=t.textStrokeWidth;let d,p=k;if(o?(x=S,"inner"===k&&(p=b===y-1?this.options.reverse?"left":"right":0===b?this.options.reverse?"right":"left":"center"),M="top"===s?"near"===c||0!==g?-C*O+O/2:"center"===c?-A.highest.height/2-e*O+O:-A.highest.height+O/2:"near"===c||0!==g?O/2:"center"===c?A.highest.height/2-e*O:A.highest.height-C*O,u&&(M*=-1),0===g||t.showLabelBackdrop||(x+=O/2*Math.sin(g))):(w=S,M=(1-C)*O/2),t.showLabelBackdrop){const e=n.toPadding(t.backdropPadding),i=A.heights[b],s=A.widths[b];let r=M-e.top,o=0-e.left;switch(E){case"middle":r-=i/2;break;case"bottom":r-=i}switch(k){case"center":o-=s/2;break;case"right":o-=s;break;case"inner":b===y-1?o-=s:b>0&&(o-=s/2)}d={left:o,top:r,width:s+e.width,height:i+e.height,color:t.backdropColor}}m.push({label:_,font:P,textOffset:M,options:{rotation:g,color:i,strokeColor:l,strokeWidth:h,textAlign:p,textBaseline:E,translation:[x,w],backdrop:d}})}return m}_getXAxisLabelAlignment(){const{position:t,ticks:e}=this.options;if(-n.toRadians(this.labelRotation))return"top"===t?"left":"right";let i="center";return"start"===e.align?i="left":"end"===e.align?i="right":"inner"===e.align&&(i="inner"),i}_getYAxisLabelAlignment(t){const{position:e,ticks:{crossAlign:i,mirror:n,padding:s}}=this.options,r=t+s,o=this._getLabelSizes().widest.width;let a,l;return"left"===e?n?(l=this.right+s,"near"===i?a="left":"center"===i?(a="center",l+=o/2):(a="right",l+=o)):(l=this.right-r,"near"===i?a="right":"center"===i?(a="center",l-=o/2):(a="left",l=this.left)):"right"===e?n?(l=this.left+s,"near"===i?a="right":"center"===i?(a="center",l-=o/2):(a="left",l-=o)):(l=this.left+r,"near"===i?a="left":"center"===i?(a="center",l+=o/2):(a="right",l=this.right)):a="right",{textAlign:a,x:l}}_computeLabelArea(){if(this.options.ticks.mirror)return;const t=this.chart,e=this.options.position;return"left"===e||"right"===e?{top:0,left:this.left,bottom:t.height,right:this.right}:"top"===e||"bottom"===e?{top:this.top,left:0,bottom:this.bottom,right:t.width}:void 0}drawBackground(){const{ctx:t,options:{backgroundColor:e},left:i,top:n,width:s,height:r}=this;e&&(t.save(),t.fillStyle=e,t.fillRect(i,n,s,r),t.restore())}getLineWidthForValue(t){const e=this.options.grid;if(!this._isVisible()||!e.display)return 0;const i=this.ticks.findIndex((e=>e.value===t));return i>=0?e.setContext(this.getContext(i)).lineWidth:0}drawGrid(t){const e=this.options.grid,i=this.ctx,n=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let s,r;const o=(t,e,n)=>{n.width&&n.color&&(i.save(),i.lineWidth=n.width,i.strokeStyle=n.color,i.setLineDash(n.borderDash||[]),i.lineDashOffset=n.borderDashOffset,i.beginPath(),i.moveTo(t.x,t.y),i.lineTo(e.x,e.y),i.stroke(),i.restore())};if(e.display)for(s=0,r=n.length;s<r;++s){const t=n[s];e.drawOnChartArea&&o({x:t.x1,y:t.y1},{x:t.x2,y:t.y2},t),e.drawTicks&&o({x:t.tx1,y:t.ty1},{x:t.tx2,y:t.ty2},{color:t.tickColor,width:t.tickWidth,borderDash:t.tickBorderDash,borderDashOffset:t.tickBorderDashOffset})}}drawBorder(){const{chart:t,ctx:e,options:{border:i,grid:s}}=this,r=i.setContext(this.getContext()),o=i.display?r.width:0;if(!o)return;const a=s.setContext(this.getContext(0)).lineWidth,l=this._borderValue;let c,h,u,d;this.isHorizontal()?(c=n._alignPixel(t,this.left,o)-o/2,h=n._alignPixel(t,this.right,a)+a/2,u=d=l):(u=n._alignPixel(t,this.top,o)-o/2,d=n._alignPixel(t,this.bottom,a)+a/2,c=h=l),e.save(),e.lineWidth=r.width,e.strokeStyle=r.color,e.beginPath(),e.moveTo(c,u),e.lineTo(h,d),e.stroke(),e.restore()}drawLabels(t){if(!this.options.ticks.display)return;const e=this.ctx,i=this._computeLabelArea();i&&n.clipArea(e,i);const s=this.getLabelItems(t);for(const t of s){const i=t.options,s=t.font,r=t.label,o=t.textOffset;n.renderText(e,r,0,o,s,i)}i&&n.unclipArea(e)}drawTitle(){const{ctx:t,options:{position:e,title:i,reverse:s}}=this;if(!i.display)return;const r=n.toFont(i.font),o=n.toPadding(i.padding),a=i.align;let l=r.lineHeight/2;"bottom"===e||"center"===e||n.isObject(e)?(l+=o.bottom,n.isArray(i.text)&&(l+=r.lineHeight*(i.text.length-1))):l+=o.top;const{titleX:c,titleY:h,maxWidth:u,rotation:d}=function(t,e,i,s){const{top:r,left:o,bottom:a,right:l,chart:c}=t,{chartArea:h,scales:u}=c;let d,p,f,g=0;const m=a-r,b=l-o;if(t.isHorizontal()){if(p=n._alignStartEnd(s,o,l),n.isObject(i)){const t=Object.keys(i)[0],n=i[t];f=u[t].getPixelForValue(n)+m-e}else f="center"===i?(h.bottom+h.top)/2+m-e:Ot(t,i,e);d=l-o}else{if(n.isObject(i)){const t=Object.keys(i)[0],n=i[t];p=u[t].getPixelForValue(n)-b+e}else p="center"===i?(h.left+h.right)/2-b+e:Ot(t,i,e);f=n._alignStartEnd(s,a,r),g="left"===i?-n.HALF_PI:n.HALF_PI}return{titleX:p,titleY:f,maxWidth:d,rotation:g}}(this,l,e,a);n.renderText(t,i.text,0,0,r,{color:i.color,maxWidth:u,rotation:d,textAlign:Dt(a,e,s),textBaseline:"middle",translation:[c,h]})}draw(t){this._isVisible()&&(this.drawBackground(),this.drawGrid(t),this.drawBorder(),this.drawTitle(),this.drawLabels(t))}_layers(){const t=this.options,e=t.ticks&&t.ticks.z||0,i=n.valueOrDefault(t.grid&&t.grid.z,-1),s=n.valueOrDefault(t.border&&t.border.z,0);return this._isVisible()&&this.draw===Tt.prototype.draw?[{z:i,draw:t=>{this.drawBackground(),this.drawGrid(t),this.drawTitle()}},{z:s,draw:()=>{this.drawBorder()}},{z:e,draw:t=>{this.drawLabels(t)}}]:[{z:e,draw:t=>{this.draw(t)}}]}getMatchingVisibleMetas(t){const e=this.chart.getSortedVisibleDatasetMetas(),i=this.axis+"AxisID",n=[];let s,r;for(s=0,r=e.length;s<r;++s){const r=e[s];r[i]!==this.id||t&&r.type!==t||n.push(r)}return n}_resolveTickFontOptions(t){const e=this.options.ticks.setContext(this.getContext(t));return n.toFont(e.font)}_maxDigits(){const t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}}class jt{constructor(t,e,i){this.type=t,this.scope=e,this.override=i,this.items=Object.create(null)}isForType(t){return Object.prototype.isPrototypeOf.call(this.type.prototype,t.prototype)}register(t){const e=Object.getPrototypeOf(t);let i;(function(t){return"id"in t&&"defaults"in t})(e)&&(i=this.register(e));const s=this.items,r=t.id,o=this.scope+"."+r;if(!r)throw new Error("class does not have id: "+t);return r in s||(s[r]=t,function(t,e,i){const s=n.merge(Object.create(null),[i?n.defaults.get(i):{},n.defaults.get(e),t.defaults]);n.defaults.set(e,s),t.defaultRoutes&&function(t,e){Object.keys(e).forEach((i=>{const s=i.split("."),r=s.pop(),o=[t].concat(s).join("."),a=e[i].split("."),l=a.pop(),c=a.join(".");n.defaults.route(o,r,c,l)}))}(e,t.defaultRoutes),t.descriptors&&n.defaults.describe(e,t.descriptors)}(t,o,i),this.override&&n.defaults.override(t.id,t.overrides)),o}get(t){return this.items[t]}unregister(t){const e=this.items,i=t.id,s=this.scope;i in e&&delete e[i],s&&i in n.defaults[s]&&(delete n.defaults[s][i],this.override&&delete n.overrides[i])}}class Rt{constructor(){this.controllers=new jt(x,"datasets",!0),this.elements=new jt(St,"elements"),this.plugins=new jt(Object,"plugins"),this.scales=new jt(Tt,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,e,i){[...e].forEach((e=>{const s=i||this._getRegistryForType(e);i||s.isForType(e)||s===this.plugins&&e.id?this._exec(t,s,e):n.each(e,(e=>{const n=i||this._getRegistryForType(e);this._exec(t,n,e)}))}))}_exec(t,e,i){const s=n._capitalize(t);n.callback(i["before"+s],[],i),e[t](i),n.callback(i["after"+s],[],i)}_getRegistryForType(t){for(let e=0;e<this._typedRegistries.length;e++){const i=this._typedRegistries[e];if(i.isForType(t))return i}return this.plugins}_get(t,e,i){const n=e.get(t);if(void 0===n)throw new Error('"'+t+'" is not a registered '+i+".");return n}}var It=new Rt;class Nt{constructor(){this._init=[]}notify(t,e,i,n){"beforeInit"===e&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install"));const s=n?this._descriptors(t).filter(n):this._descriptors(t),r=this._notify(s,t,e,i);return"afterDestroy"===e&&(this._notify(s,t,"stop"),this._notify(this._init,t,"uninstall")),r}_notify(t,e,i,s){s=s||{};for(const r of t){const t=r.plugin,o=t[i],a=[e,s,r.options];if(!1===n.callback(o,a,t)&&s.cancelable)return!1}return!0}invalidate(){n.isNullOrUndef(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(t){if(this._cache)return this._cache;const e=this._cache=this._createDescriptors(t);return this._notifyStateChanges(t),e}_createDescriptors(t,e){const i=t&&t.config,s=n.valueOrDefault(i.options&&i.options.plugins,{}),r=function(t){const e={},i=[],n=Object.keys(It.plugins.items);for(let t=0;t<n.length;t++)i.push(It.getPlugin(n[t]));const s=t.plugins||[];for(let t=0;t<s.length;t++){const n=s[t];-1===i.indexOf(n)&&(i.push(n),e[n.id]=!0)}return{plugins:i,localIds:e}}(i);return!1!==s||e?function(t,{plugins:e,localIds:i},n,s){const r=[],o=t.getContext();for(const a of e){const e=a.id,l=Ft(n[e],s);null!==l&&r.push({plugin:a,options:Bt(t.config,{plugin:a,local:i[e]},l,o)})}return r}(t,r,s,e):[]}_notifyStateChanges(t){const e=this._oldCache||[],i=this._cache,n=(t,e)=>t.filter((t=>!e.some((e=>t.plugin.id===e.plugin.id))));this._notify(n(e,i),t,"stop"),this._notify(n(i,e),t,"start")}}function Ft(t,e){return e||!1!==t?!0===t?{}:t:null}function Bt(t,{plugin:e,local:i},n,s){const r=t.pluginScopeKeys(e),o=t.getOptionScopes(n,r);return i&&e.defaults&&o.push(e.defaults),t.createResolver(o,s,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function Ht(t,e){const i=n.defaults.datasets[t]||{};return((e.datasets||{})[t]||{}).indexAxis||e.indexAxis||i.indexAxis||"x"}function zt(t){if("x"===t||"y"===t||"r"===t)return t}function Vt(t,...e){if(zt(t))return t;for(const n of e){const e=n.axis||("top"===(i=n.position)||"bottom"===i?"x":"left"===i||"right"===i?"y":void 0)||t.length>1&&zt(t[0].toLowerCase());if(e)return e}var i;throw new Error(`Cannot determine type of '${t}' axis. Please provide 'axis' or 'position' option.`)}function $t(t,e,i){if(i[e+"AxisID"]===t)return{axis:e}}function Wt(t){const e=t.options||(t.options={});e.plugins=n.valueOrDefault(e.plugins,{}),e.scales=function(t,e){const i=n.overrides[t.type]||{scales:{}},s=e.scales||{},r=Ht(t.type,e),o=Object.create(null);return Object.keys(s).forEach((e=>{const a=s[e];if(!n.isObject(a))return console.error(`Invalid scale configuration for scale: ${e}`);if(a._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${e}`);const l=Vt(e,a,function(t,e){if(e.data&&e.data.datasets){const i=e.data.datasets.filter((e=>e.xAxisID===t||e.yAxisID===t));if(i.length)return $t(t,"x",i[0])||$t(t,"y",i[0])}return{}}(e,t),n.defaults.scales[a.type]),c=function(t,e){return t===e?"_index_":"_value_"}(l,r),h=i.scales||{};o[e]=n.mergeIf(Object.create(null),[{axis:l},a,h[l],h[c]])})),t.data.datasets.forEach((i=>{const r=i.type||t.type,a=i.indexAxis||Ht(r,e),l=(n.overrides[r]||{}).scales||{};Object.keys(l).forEach((t=>{const e=function(t,e){let i=t;return"_index_"===t?i=e:"_value_"===t&&(i="x"===e?"y":"x"),i}(t,a),r=i[e+"AxisID"]||e;o[r]=o[r]||Object.create(null),n.mergeIf(o[r],[{axis:e},s[r],l[t]])}))})),Object.keys(o).forEach((t=>{const e=o[t];n.mergeIf(e,[n.defaults.scales[e.type],n.defaults.scale])})),o}(t,e)}function Ut(t){return(t=t||{}).datasets=t.datasets||[],t.labels=t.labels||[],t}const qt=new Map,Yt=new Set;function Kt(t,e){let i=qt.get(t);return i||(i=e(),qt.set(t,i),Yt.add(i)),i}const Xt=(t,e,i)=>{const s=n.resolveObjectKey(e,i);void 0!==s&&t.add(s)};class Jt{constructor(t){this._config=function(t){return(t=t||{}).data=Ut(t.data),Wt(t),t}(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=Ut(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(),Wt(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return Kt(t,(()=>[[`datasets.${t}`,""]]))}datasetAnimationScopeKeys(t,e){return Kt(`${t}.transition.${e}`,(()=>[[`datasets.${t}.transitions.${e}`,`transitions.${e}`],[`datasets.${t}`,""]]))}datasetElementScopeKeys(t,e){return Kt(`${t}-${e}`,(()=>[[`datasets.${t}.elements.${e}`,`datasets.${t}`,`elements.${e}`,""]]))}pluginScopeKeys(t){const e=t.id;return Kt(`${this.type}-plugin-${e}`,(()=>[[`plugins.${e}`,...t.additionalOptionScopes||[]]]))}_cachedScopes(t,e){const i=this._scopeCache;let n=i.get(t);return n&&!e||(n=new Map,i.set(t,n)),n}getOptionScopes(t,e,i){const{options:s,type:r}=this,o=this._cachedScopes(t,i),a=o.get(e);if(a)return a;const l=new Set;e.forEach((e=>{t&&(l.add(t),e.forEach((e=>Xt(l,t,e)))),e.forEach((t=>Xt(l,s,t))),e.forEach((t=>Xt(l,n.overrides[r]||{},t))),e.forEach((t=>Xt(l,n.defaults,t))),e.forEach((t=>Xt(l,n.descriptors,t)))}));const c=Array.from(l);return 0===c.length&&c.push(Object.create(null)),Yt.has(e)&&o.set(e,c),c}chartOptionScopes(){const{options:t,type:e}=this;return[t,n.overrides[e]||{},n.defaults.datasets[e]||{},{type:e},n.defaults,n.descriptors]}resolveNamedOptions(t,e,i,s=[""]){const r={$shared:!0},{resolver:o,subPrefixes:a}=Gt(this._resolverCache,t,s);let l=o;if(function(t,e){const{isScriptable:i,isIndexable:s}=n._descriptors(t);for(const r of e){const e=i(r),o=s(r),a=(o||e)&&t[r];if(e&&(n.isFunction(a)||Zt(a))||o&&n.isArray(a))return!0}return!1}(o,e)){r.$shared=!1,i=n.isFunction(i)?i():i;const e=this.createResolver(t,i,a);l=n._attachContext(o,i,e)}for(const t of e)r[t]=l[t];return r}createResolver(t,e,i=[""],s){const{resolver:r}=Gt(this._resolverCache,t,i);return n.isObject(e)?n._attachContext(r,e,void 0,s):r}}function Gt(t,e,i){let s=t.get(e);s||(s=new Map,t.set(e,s));const r=i.join();let o=s.get(r);return o||(o={resolver:n._createResolver(e,i),subPrefixes:i.filter((t=>!t.toLowerCase().includes("hover")))},s.set(r,o)),o}const Zt=t=>n.isObject(t)&&Object.getOwnPropertyNames(t).some((e=>n.isFunction(t[e]))),Qt=["top","bottom","left","right","chartArea"];function te(t,e){return"top"===t||"bottom"===t||-1===Qt.indexOf(t)&&"x"===e}function ee(t,e){return function(i,n){return i[t]===n[t]?i[e]-n[e]:i[t]-n[t]}}function ie(t){const e=t.chart,i=e.options.animation;e.notifyPlugins("afterRender"),n.callback(i&&i.onComplete,[t],e)}function ne(t){const e=t.chart,i=e.options.animation;n.callback(i&&i.onProgress,[t],e)}function se(t){return n._isDomSupported()&&"string"==typeof t?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}const re={},oe=t=>{const e=se(t);return Object.values(re).filter((t=>t.canvas===e)).pop()};function ae(t,e,i){const n=Object.keys(t);for(const s of n){const n=+s;if(n>=e){const r=t[s];delete t[s],(i>0||n>e)&&(t[n+i]=r)}}}function le(t,e,i){return t.options.clip?t[i]:e[i]}class ce{static defaults=n.defaults;static instances=re;static overrides=n.overrides;static registry=It;static version="4.4.8";static getChart=oe;static register(...t){It.add(...t),he()}static unregister(...t){It.remove(...t),he()}constructor(t,e){const i=this.config=new Jt(e),s=se(t),o=oe(s);if(o)throw new Error("Canvas is already in use. Chart with ID '"+o.id+"' must be destroyed before the canvas with ID '"+o.canvas.id+"' can be reused.");const a=i.createResolver(i.chartOptionScopes(),this.getContext());this.platform=new(i.platform||kt(s)),this.platform.updateConfig(i);const l=this.platform.acquireContext(s,a.aspectRatio),c=l&&l.canvas,h=c&&c.height,u=c&&c.width;this.id=n.uid(),this.ctx=l,this.canvas=c,this.width=u,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 Nt,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=n.debounce((t=>this.update(t)),a.resizeDelay||0),this._dataChanges=[],re[this.id]=this,l&&c?(r.listen(this,"complete",ie),r.listen(this,"progress",ne),this._initialize(),this.attached&&this.update()):console.error("Failed to create chart: can't acquire context from the given item")}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:e},width:i,height:s,_aspectRatio:r}=this;return n.isNullOrUndef(t)?e&&r?r:s?i/s: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 It}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():n.retinaScale(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return n.clearCanvas(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 i=this.options,s=this.canvas,r=i.maintainAspectRatio&&this.aspectRatio,o=this.platform.getMaximumSize(s,t,e,r),a=i.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=o.width,this.height=o.height,this._aspectRatio=this.aspectRatio,n.retinaScale(this,a,!0)&&(this.notifyPlugins("resize",{size:o}),n.callback(i.onResize,[this,o],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){const t=this.options.scales||{};n.each(t,((t,e)=>{t.id=e}))}buildOrUpdateScales(){const t=this.options,e=t.scales,i=this.scales,s=Object.keys(i).reduce(((t,e)=>(t[e]=!1,t)),{});let r=[];e&&(r=r.concat(Object.keys(e).map((t=>{const i=e[t],n=Vt(t,i),s="r"===n,r="x"===n;return{options:i,dposition:s?"chartArea":r?"bottom":"left",dtype:s?"radialLinear":r?"category":"linear"}})))),n.each(r,(e=>{const r=e.options,o=r.id,a=Vt(o,r),l=n.valueOrDefault(r.type,e.dtype);void 0!==r.position&&te(r.position,a)===te(e.dposition)||(r.position=e.dposition),s[o]=!0;let c=null;o in i&&i[o].type===l?c=i[o]:(c=new(It.getScale(l))({id:o,type:l,ctx:this.ctx,chart:this}),i[c.id]=c),c.init(r,t)})),n.each(s,((t,e)=>{t||delete i[e]})),n.each(i,(t=>{rt.configure(this,t,t.options),rt.addBox(this,t)}))}_updateMetasets(){const t=this._metasets,e=this.data.datasets.length,i=t.length;if(t.sort(((t,e)=>t.index-e.index)),i>e){for(let t=e;t<i;++t)this._destroyDatasetMeta(t);t.splice(e,i-e)}this._sortedMetasets=t.slice(0).sort(ee("order","index"))}_removeUnreferencedMetasets(){const{_metasets:t,data:{datasets:e}}=this;t.length>e.length&&delete this._stacks,t.forEach(((t,i)=>{0===e.filter((e=>e===t._dataset)).length&&this._destroyDatasetMeta(i)}))}buildOrUpdateControllers(){const t=[],e=this.data.datasets;let i,s;for(this._removeUnreferencedMetasets(),i=0,s=e.length;i<s;i++){const s=e[i];let r=this.getDatasetMeta(i);const o=s.type||this.config.type;if(r.type&&r.type!==o&&(this._destroyDatasetMeta(i),r=this.getDatasetMeta(i)),r.type=o,r.indexAxis=s.indexAxis||Ht(o,this.options),r.order=s.order||0,r.index=i,r.label=""+s.label,r.visible=this.isDatasetVisible(i),r.controller)r.controller.updateIndex(i),r.controller.linkScales();else{const e=It.getController(o),{datasetElementType:s,dataElementType:a}=n.defaults.datasets[o];Object.assign(e,{dataElementType:It.getElement(a),datasetElementType:s&&It.getElement(s)}),r.controller=new e(this,i),t.push(r.controller)}}return this._updateMetasets(),t}_resetElements(){n.each(this.data.datasets,((t,e)=>{this.getDatasetMeta(e).controller.reset()}),this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const e=this.config;e.update();const i=this._options=e.createResolver(e.chartOptionScopes(),this.getContext()),s=this._animationsDisabled=!i.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),!1===this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0}))return;const r=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let o=0;for(let t=0,e=this.data.datasets.length;t<e;t++){const{controller:e}=this.getDatasetMeta(t),i=!s&&-1===r.indexOf(e);e.buildOrUpdateElements(i),o=Math.max(+e.getMaxOverflow(),o)}o=this._minPadding=i.layout.autoPadding?o:0,this._updateLayout(o),s||n.each(r,(t=>{t.reset()})),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(ee("z","_idx"));const{_active:a,_lastEvent:l}=this;l?this._eventHandler(l,!0):a.length&&this._updateHoverStyles(a,a,!0),this.render()}_updateScales(){n.each(this.scales,(t=>{rt.removeBox(this,t)})),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,e=new Set(Object.keys(this._listeners)),i=new Set(t.events);n.setsEqual(e,i)&&!!this._responsiveListeners===t.responsive||(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,e=this._getUniformDataChanges()||[];for(const{method:i,start:n,count:s}of e)ae(t,n,"_removeElements"===i?-s:s)}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const e=this.data.datasets.length,i=e=>new Set(t.filter((t=>t[0]===e)).map(((t,e)=>e+","+t.splice(1).join(",")))),s=i(0);for(let t=1;t<e;t++)if(!n.setsEqual(s,i(t)))return;return Array.from(s).map((t=>t.split(","))).map((t=>({method:t[1],start:+t[2],count:+t[3]})))}_updateLayout(t){if(!1===this.notifyPlugins("beforeLayout",{cancelable:!0}))return;rt.update(this,this.width,this.height,t);const e=this.chartArea,i=e.width<=0||e.height<=0;this._layers=[],n.each(this.boxes,(t=>{i&&"chartArea"===t.position||(t.configure&&t.configure(),this._layers.push(...t._layers()))}),this),this._layers.forEach(((t,e)=>{t._idx=e})),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(!1!==this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})){for(let t=0,e=this.data.datasets.length;t<e;++t)this.getDatasetMeta(t).controller.configure();for(let e=0,i=this.data.datasets.length;e<i;++e)this._updateDataset(e,n.isFunction(t)?t({datasetIndex:e}):t);this.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,e){const i=this.getDatasetMeta(t),n={meta:i,index:t,mode:e,cancelable:!0};!1!==this.notifyPlugins("beforeDatasetUpdate",n)&&(i.controller._update(e),n.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",n))}render(){!1!==this.notifyPlugins("beforeRender",{cancelable:!0})&&(r.has(this)?this.attached&&!r.running(this)&&r.start(this):(this.draw(),ie({chart:this})))}draw(){let t;if(this._resizeBeforeDraw){const{width:t,height:e}=this._resizeBeforeDraw;this._resizeBeforeDraw=null,this._resize(t,e)}if(this.clear(),this.width<=0||this.height<=0)return;if(!1===this.notifyPlugins("beforeDraw",{cancelable:!0}))return;const e=this._layers;for(t=0;t<e.length&&e[t].z<=0;++t)e[t].draw(this.chartArea);for(this._drawDatasets();t<e.length;++t)e[t].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(t){const e=this._sortedMetasets,i=[];let n,s;for(n=0,s=e.length;n<s;++n){const s=e[n];t&&!s.visible||i.push(s)}return i}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(!1===this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0}))return;const t=this.getSortedVisibleDatasetMetas();for(let e=t.length-1;e>=0;--e)this._drawDataset(t[e]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const e=this.ctx,i=t._clip,s=!i.disabled,r=function(t,e){const{xScale:i,yScale:n}=t;return i&&n?{left:le(i,e,"left"),right:le(i,e,"right"),top:le(n,e,"top"),bottom:le(n,e,"bottom")}:e}(t,this.chartArea),o={meta:t,index:t.index,cancelable:!0};!1!==this.notifyPlugins("beforeDatasetDraw",o)&&(s&&n.clipArea(e,{left:!1===i.left?0:r.left-i.left,right:!1===i.right?this.width:r.right+i.right,top:!1===i.top?0:r.top-i.top,bottom:!1===i.bottom?this.height:r.bottom+i.bottom}),t.controller.draw(),s&&n.unclipArea(e),o.cancelable=!1,this.notifyPlugins("afterDatasetDraw",o))}isPointInArea(t){return n._isPointInArea(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,e,i,n){const s=Y.modes[e];return"function"==typeof s?s(this,t,i,n):[]}getDatasetMeta(t){const e=this.data.datasets[t],i=this._metasets;let n=i.filter((t=>t&&t._dataset===e)).pop();return n||(n={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e&&e.order||0,index:t,_dataset:e,_parsed:[],_sorted:!1},i.push(n)),n}getContext(){return this.$context||(this.$context=n.createContext(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const e=this.data.datasets[t];if(!e)return!1;const i=this.getDatasetMeta(t);return"boolean"==typeof i.hidden?!i.hidden:!e.hidden}setDatasetVisibility(t,e){this.getDatasetMeta(t).hidden=!e}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,e,i){const s=i?"show":"hide",r=this.getDatasetMeta(t),o=r.controller._resolveAnimations(void 0,s);n.defined(e)?(r.data[e].hidden=!i,this.update()):(this.setDatasetVisibility(t,i),o.update(r,{visible:i}),this.update((e=>e.datasetIndex===t?s: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(),n.clearCanvas(t,e),this.platform.releaseContext(e),this.canvas=null,this.ctx=null),delete re[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...t){return this.canvas.toDataURL(...t)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const t=this._listeners,e=this.platform,i=(i,n)=>{e.addEventListener(this,i,n),t[i]=n},s=(t,e,i)=>{t.offsetX=e,t.offsetY=i,this._eventHandler(t)};n.each(this.options.events,(t=>i(t,s)))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,e=this.platform,i=(i,n)=>{e.addEventListener(this,i,n),t[i]=n},n=(i,n)=>{t[i]&&(e.removeEventListener(this,i,n),delete t[i])},s=(t,e)=>{this.canvas&&this.resize(t,e)};let r;const o=()=>{n("attach",o),this.attached=!0,this.resize(),i("resize",s),i("detach",r)};r=()=>{this.attached=!1,n("resize",s),this._stop(),this._resize(0,0),i("attach",o)},e.isAttached(this.canvas)?o():r()}unbindEvents(){n.each(this._listeners,((t,e)=>{this.platform.removeEventListener(this,e,t)})),this._listeners={},n.each(this._responsiveListeners,((t,e)=>{this.platform.removeEventListener(this,e,t)})),this._responsiveListeners=void 0}updateHoverStyle(t,e,i){const n=i?"set":"remove";let s,r,o,a;for("dataset"===e&&(s=this.getDatasetMeta(t[0].datasetIndex),s.controller["_"+n+"DatasetHoverStyle"]()),o=0,a=t.length;o<a;++o){r=t[o];const e=r&&this.getDatasetMeta(r.datasetIndex).controller;e&&e[n+"HoverStyle"](r.element,r.datasetIndex,r.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){const e=this._active||[],i=t.map((({datasetIndex:t,index:e})=>{const i=this.getDatasetMeta(t);if(!i)throw new Error("No dataset found at index "+t);return{datasetIndex:t,element:i.data[e],index:e}}));!n._elementsEqual(i,e)&&(this._active=i,this._lastEvent=null,this._updateHoverStyles(i,e))}notifyPlugins(t,e,i){return this._plugins.notify(this,t,e,i)}isPluginEnabled(t){return 1===this._plugins._cache.filter((e=>e.plugin.id===t)).length}_updateHoverStyles(t,e,i){const n=this.options.hover,s=(t,e)=>t.filter((t=>!e.some((e=>t.datasetIndex===e.datasetIndex&&t.index===e.index)))),r=s(e,t),o=i?t:s(t,e);r.length&&this.updateHoverStyle(r,n.mode,!1),o.length&&n.mode&&this.updateHoverStyle(o,n.mode,!0)}_eventHandler(t,e){const i={event:t,replay:e,cancelable:!0,inChartArea:this.isPointInArea(t)},n=e=>(e.options.events||this.options.events).includes(t.native.type);if(!1===this.notifyPlugins("beforeEvent",i,n))return;const s=this._handleEvent(t,e,i.inChartArea);return i.cancelable=!1,this.notifyPlugins("afterEvent",i,n),(s||i.changed)&&this.render(),this}_handleEvent(t,e,i){const{_active:s=[],options:r}=this,o=e,a=this._getActiveElements(t,s,i,o),l=n._isClickEvent(t),c=function(t,e,i,n){return i&&"mouseout"!==t.type?n?e:t:null}(t,this._lastEvent,i,l);i&&(this._lastEvent=null,n.callback(r.onHover,[t,a,this],this),l&&n.callback(r.onClick,[t,a,this],this));const h=!n._elementsEqual(a,s);return(h||e)&&(this._active=a,this._updateHoverStyles(a,s,e)),this._lastEvent=c,h}_getActiveElements(t,e,i,n){if("mouseout"===t.type)return[];if(!i)return e;const s=this.options.hover;return this.getElementsAtEventForMode(t,s.mode,s,n)}}function he(){return n.each(ce.instances,(t=>t._plugins.invalidate()))}function ue(t,e,i,n){return{x:i+t*Math.cos(e),y:n+t*Math.sin(e)}}function de(t,e,i,s,r,o){const{x:a,y:l,startAngle:c,pixelMargin:h,innerRadius:u}=e,d=Math.max(e.outerRadius+s+i-h,0),p=u>0?u+s+i+h:0;let f=0;const g=r-c;if(s){const t=((u>0?u-s:0)+(d>0?d-s:0))/2;f=(g-(0!==t?g*t/(t+s):g))/2}const m=(g-Math.max(.001,g*d-i/n.PI)/d)/2,b=c+m+f,y=r-m-f,{outerStart:v,outerEnd:_,innerStart:x,innerEnd:w}=function(t,e,i,s){const r=(o=t.options.borderRadius,n._readValueToProps(o,["outerStart","outerEnd","innerStart","innerEnd"]));var o;const a=(i-e)/2,l=Math.min(a,s*e/2),c=t=>{const e=(i-Math.min(a,t))*s/2;return n._limitValue(t,0,Math.min(a,e))};return{outerStart:c(r.outerStart),outerEnd:c(r.outerEnd),innerStart:n._limitValue(r.innerStart,0,l),innerEnd:n._limitValue(r.innerEnd,0,l)}}(e,p,d,y-b),k=d-v,S=d-_,P=b+v/k,O=y-_/S,C=p+x,M=p+w,E=b+x/C,A=y-w/M;if(t.beginPath(),o){const e=(P+O)/2;if(t.arc(a,l,d,P,e),t.arc(a,l,d,e,O),_>0){const e=ue(S,O,a,l);t.arc(e.x,e.y,_,O,y+n.HALF_PI)}const i=ue(M,y,a,l);if(t.lineTo(i.x,i.y),w>0){const e=ue(M,A,a,l);t.arc(e.x,e.y,w,y+n.HALF_PI,A+Math.PI)}const s=(y-w/p+(b+x/p))/2;if(t.arc(a,l,p,y-w/p,s,!0),t.arc(a,l,p,s,b+x/p,!0),x>0){const e=ue(C,E,a,l);t.arc(e.x,e.y,x,E+Math.PI,b-n.HALF_PI)}const r=ue(k,b,a,l);if(t.lineTo(r.x,r.y),v>0){const e=ue(k,P,a,l);t.arc(e.x,e.y,v,b-n.HALF_PI,P)}}else{t.moveTo(a,l);const e=Math.cos(P)*d+a,i=Math.sin(P)*d+l;t.lineTo(e,i);const n=Math.cos(O)*d+a,s=Math.sin(O)*d+l;t.lineTo(n,s)}t.closePath()}class pe extends St{static id="arc";static defaults={borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0};static defaultRoutes={backgroundColor:"backgroundColor"};static descriptors={_scriptable:!0,_indexable:t=>"borderDash"!==t};circumference;endAngle;fullCircles;innerRadius;outerRadius;pixelMargin;startAngle;constructor(t){super(),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,t&&Object.assign(this,t)}inRange(t,e,i){const s=this.getProps(["x","y"],i),{angle:r,distance:o}=n.getAngleFromPoint(s,{x:t,y:e}),{startAngle:a,endAngle:l,innerRadius:c,outerRadius:h,circumference:u}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],i),d=(this.options.spacing+this.options.borderWidth)/2,p=n.valueOrDefault(u,l-a),f=n._angleBetween(r,a,l)&&a!==l,g=p>=n.TAU||f,m=n._isBetween(o,c+d,h+d);return g&&m}getCenterPoint(t){const{x:e,y:i,startAngle:n,endAngle:s,innerRadius:r,outerRadius:o}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],t),{offset:a,spacing:l}=this.options,c=(n+s)/2,h=(r+o+l+a)/2;return{x:e+Math.cos(c)*h,y:i+Math.sin(c)*h}}tooltipPosition(t){return this.getCenterPoint(t)}draw(t){const{options:e,circumference:i}=this,s=(e.offset||0)/4,r=(e.spacing||0)/2,o=e.circular;if(this.pixelMargin="inner"===e.borderAlign?.33:0,this.fullCircles=i>n.TAU?Math.floor(i/n.TAU):0,0===i||this.innerRadius<0||this.outerRadius<0)return;t.save();const a=(this.startAngle+this.endAngle)/2;t.translate(Math.cos(a)*s,Math.sin(a)*s);const l=s*(1-Math.sin(Math.min(n.PI,i||0)));t.fillStyle=e.backgroundColor,t.strokeStyle=e.borderColor,function(t,e,i,s,r){const{fullCircles:o,startAngle:a,circumference:l}=e;let c=e.endAngle;if(o){de(t,e,i,s,c,r);for(let e=0;e<o;++e)t.fill();isNaN(l)||(c=a+(l%n.TAU||n.TAU))}de(t,e,i,s,c,r),t.fill()}(t,this,l,r,o),function(t,e,i,s,r){const{fullCircles:o,startAngle:a,circumference:l,options:c}=e,{borderWidth:h,borderJoinStyle:u,borderDash:d,borderDashOffset:p}=c,f="inner"===c.borderAlign;if(!h)return;t.setLineDash(d||[]),t.lineDashOffset=p,f?(t.lineWidth=2*h,t.lineJoin=u||"round"):(t.lineWidth=h,t.lineJoin=u||"bevel");let g=e.endAngle;if(o){de(t,e,i,s,g,r);for(let e=0;e<o;++e)t.stroke();isNaN(l)||(g=a+(l%n.TAU||n.TAU))}f&&function(t,e,i){const{startAngle:s,pixelMargin:r,x:o,y:a,outerRadius:l,innerRadius:c}=e;let h=r/l;t.beginPath(),t.arc(o,a,l,s-h,i+h),c>r?(h=r/c,t.arc(o,a,c,i+h,s-h,!0)):t.arc(o,a,r,i+n.HALF_PI,s-n.HALF_PI),t.closePath(),t.clip()}(t,e,g),o||(de(t,e,i,s,g,r),t.stroke())}(t,this,l,r,o),t.restore()}}function fe(t,e,i=e){t.lineCap=n.valueOrDefault(i.borderCapStyle,e.borderCapStyle),t.setLineDash(n.valueOrDefault(i.borderDash,e.borderDash)),t.lineDashOffset=n.valueOrDefault(i.borderDashOffset,e.borderDashOffset),t.lineJoin=n.valueOrDefault(i.borderJoinStyle,e.borderJoinStyle),t.lineWidth=n.valueOrDefault(i.borderWidth,e.borderWidth),t.strokeStyle=n.valueOrDefault(i.borderColor,e.borderColor)}function ge(t,e,i){t.lineTo(i.x,i.y)}function me(t,e,i={}){const n=t.length,{start:s=0,end:r=n-1}=i,{start:o,end:a}=e,l=Math.max(s,o),c=Math.min(r,a),h=s<o&&r<o||s>a&&r>a;return{count:n,start:l,loop:e.loop,ilen:c<l&&!h?n+c-l:c-l}}function be(t,e,i,s){const{points:r,options:o}=e,{count:a,start:l,loop:c,ilen:h}=me(r,i,s),u=function(t){return t.stepped?n._steppedLineTo:t.tension||"monotone"===t.cubicInterpolationMode?n._bezierCurveTo:ge}(o);let d,p,f,{move:g=!0,reverse:m}=s||{};for(d=0;d<=h;++d)p=r[(l+(m?h-d:d))%a],p.skip||(g?(t.moveTo(p.x,p.y),g=!1):u(t,f,p,m,o.stepped),f=p);return c&&(p=r[(l+(m?h:0))%a],u(t,f,p,m,o.stepped)),!!c}function ye(t,e,i,n){const s=e.points,{count:r,start:o,ilen:a}=me(s,i,n),{move:l=!0,reverse:c}=n||{};let h,u,d,p,f,g,m=0,b=0;const y=t=>(o+(c?a-t:t))%r,v=()=>{p!==f&&(t.lineTo(m,f),t.lineTo(m,p),t.lineTo(m,g))};for(l&&(u=s[y(0)],t.moveTo(u.x,u.y)),h=0;h<=a;++h){if(u=s[y(h)],u.skip)continue;const e=u.x,i=u.y,n=0|e;n===d?(i<p?p=i:i>f&&(f=i),m=(b*m+e)/++b):(v(),t.lineTo(e,i),d=n,b=0,p=f=i),g=i}v()}function ve(t){const e=t.options,i=e.borderDash&&e.borderDash.length;return t._decimated||t._loop||e.tension||"monotone"===e.cubicInterpolationMode||e.stepped||i?be:ye}const _e="function"==typeof Path2D;class xe extends St{static id="line";static defaults={borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};static descriptors={_scriptable:!0,_indexable:t=>"borderDash"!==t&&"fill"!==t};constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,e){const i=this.options;if((i.tension||"monotone"===i.cubicInterpolationMode)&&!i.stepped&&!this._pointsUpdated){const s=i.spanGaps?this._loop:this._fullLoop;n._updateBezierControlPoints(this._points,i,t,s,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=n._computeSegments(this,this.options.segment))}first(){const t=this.segments,e=this.points;return t.length&&e[t[0].start]}last(){const t=this.segments,e=this.points,i=t.length;return i&&e[t[i-1].end]}interpolate(t,e){const i=this.options,s=t[e],r=this.points,o=n._boundSegments(this,{property:e,start:s,end:s});if(!o.length)return;const a=[],l=function(t){return t.stepped?n._steppedInterpolation:t.tension||"monotone"===t.cubicInterpolationMode?n._bezierInterpolation:n._pointInLine}(i);let c,h;for(c=0,h=o.length;c<h;++c){const{start:n,end:h}=o[c],u=r[n],d=r[h];if(u===d){a.push(u);continue}const p=l(u,d,Math.abs((s-u[e])/(d[e]-u[e])),i.stepped);p[e]=t[e],a.push(p)}return 1===a.length?a[0]:a}pathSegment(t,e,i){return ve(this)(t,this,e,i)}path(t,e,i){const n=this.segments,s=ve(this);let r=this._loop;e=e||0,i=i||this.points.length-e;for(const o of n)r&=s(t,this,o,{start:e,end:e+i-1});return!!r}draw(t,e,i,n){const s=this.options||{};(this.points||[]).length&&s.borderWidth&&(t.save(),function(t,e,i,n){_e&&!e.options.segment?function(t,e,i,n){let s=e._path;s||(s=e._path=new Path2D,e.path(s,i,n)&&s.closePath()),fe(t,e.options),t.stroke(s)}(t,e,i,n):function(t,e,i,n){const{segments:s,options:r}=e,o=ve(e);for(const a of s)fe(t,r,a.style),t.beginPath(),o(t,e,a,{start:i,end:i+n-1})&&t.closePath(),t.stroke()}(t,e,i,n)}(t,this,i,n),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}function we(t,e,i,n){const s=t.options,{[i]:r}=t.getProps([i],n);return Math.abs(e-r)<s.radius+s.hitRadius}class ke extends St{static id="point";parsed;skip;stop;static defaults={borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};constructor(t){super(),this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,t&&Object.assign(this,t)}inRange(t,e,i){const n=this.options,{x:s,y:r}=this.getProps(["x","y"],i);return Math.pow(t-s,2)+Math.pow(e-r,2)<Math.pow(n.hitRadius+n.radius,2)}inXRange(t,e){return we(this,t,"x",e)}inYRange(t,e){return we(this,t,"y",e)}getCenterPoint(t){const{x:e,y:i}=this.getProps(["x","y"],t);return{x:e,y:i}}size(t){let e=(t=t||this.options||{}).radius||0;return e=Math.max(e,e&&t.hoverRadius||0),2*(e+(e&&t.borderWidth||0))}draw(t,e){const i=this.options;this.skip||i.radius<.1||!n._isPointInArea(this,e,this.size(i)/2)||(t.strokeStyle=i.borderColor,t.lineWidth=i.borderWidth,t.fillStyle=i.backgroundColor,n.drawPoint(t,i,this.x,this.y))}getRange(){const t=this.options||{};return t.radius+t.hitRadius}}function Se(t,e){const{x:i,y:n,base:s,width:r,height:o}=t.getProps(["x","y","base","width","height"],e);let a,l,c,h,u;return t.horizontal?(u=o/2,a=Math.min(i,s),l=Math.max(i,s),c=n-u,h=n+u):(u=r/2,a=i-u,l=i+u,c=Math.min(n,s),h=Math.max(n,s)),{left:a,top:c,right:l,bottom:h}}function Pe(t,e,i,s){return t?0:n._limitValue(e,i,s)}function Oe(t,e,i,s){const r=null===e,o=null===i,a=t&&!(r&&o)&&Se(t,s);return a&&(r||n._isBetween(e,a.left,a.right))&&(o||n._isBetween(i,a.top,a.bottom))}function Ce(t,e){t.rect(e.x,e.y,e.w,e.h)}function Me(t,e,i={}){const n=t.x!==i.x?-e:0,s=t.y!==i.y?-e:0,r=(t.x+t.w!==i.x+i.w?e:0)-n,o=(t.y+t.h!==i.y+i.h?e:0)-s;return{x:t.x+n,y:t.y+s,w:t.w+r,h:t.h+o,radius:t.radius}}class Ee extends St{static id="bar";static defaults={borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};constructor(t){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,t&&Object.assign(this,t)}draw(t){const{inflateAmount:e,options:{borderColor:i,backgroundColor:s}}=this,{inner:r,outer:o}=function(t){const e=Se(t),i=e.right-e.left,s=e.bottom-e.top,r=function(t,e,i){const s=t.options.borderWidth,r=t.borderSkipped,o=n.toTRBL(s);return{t:Pe(r.top,o.top,0,i),r:Pe(r.right,o.right,0,e),b:Pe(r.bottom,o.bottom,0,i),l:Pe(r.left,o.left,0,e)}}(t,i/2,s/2),o=function(t,e,i){const{enableBorderRadius:s}=t.getProps(["enableBorderRadius"]),r=t.options.borderRadius,o=n.toTRBLCorners(r),a=Math.min(e,i),l=t.borderSkipped,c=s||n.isObject(r);return{topLeft:Pe(!c||l.top||l.left,o.topLeft,0,a),topRight:Pe(!c||l.top||l.right,o.topRight,0,a),bottomLeft:Pe(!c||l.bottom||l.left,o.bottomLeft,0,a),bottomRight:Pe(!c||l.bottom||l.right,o.bottomRight,0,a)}}(t,i/2,s/2);return{outer:{x:e.left,y:e.top,w:i,h:s,radius:o},inner:{x:e.left+r.l,y:e.top+r.t,w:i-r.l-r.r,h:s-r.t-r.b,radius:{topLeft:Math.max(0,o.topLeft-Math.max(r.t,r.l)),topRight:Math.max(0,o.topRight-Math.max(r.t,r.r)),bottomLeft:Math.max(0,o.bottomLeft-Math.max(r.b,r.l)),bottomRight:Math.max(0,o.bottomRight-Math.max(r.b,r.r))}}}}(this),a=(l=o.radius).topLeft||l.topRight||l.bottomLeft||l.bottomRight?n.addRoundedRectPath:Ce;var l;t.save(),o.w===r.w&&o.h===r.h||(t.beginPath(),a(t,Me(o,e,r)),t.clip(),a(t,Me(r,-e,o)),t.fillStyle=i,t.fill("evenodd")),t.beginPath(),a(t,Me(r,e)),t.fillStyle=s,t.fill(),t.restore()}inRange(t,e,i){return Oe(this,t,e,i)}inXRange(t,e){return Oe(this,t,null,e)}inYRange(t,e){return Oe(this,null,t,e)}getCenterPoint(t){const{x:e,y:i,base:n,horizontal:s}=this.getProps(["x","y","base","horizontal"],t);return{x:s?(e+n)/2:e,y:s?i:(i+n)/2}}getRange(t){return"x"===t?this.width/2:this.height/2}}var Ae=Object.freeze({__proto__:null,ArcElement:pe,BarElement:Ee,LineElement:xe,PointElement:ke});const Le=["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)"],De=Le.map((t=>t.replace("rgb(","rgba(").replace(")",", 0.5)")));function Te(t){return Le[t%Le.length]}function je(t){return De[t%De.length]}function Re(t){let e;for(e in t)if(t[e].borderColor||t[e].backgroundColor)return!0;return!1}var Ie={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(t,e,i){if(!i.enabled)return;const{data:{datasets:s},options:r}=t.config,{elements:o}=r,a=Re(s)||(l=r)&&(l.borderColor||l.backgroundColor)||o&&Re(o)||"rgba(0,0,0,0.1)"!==n.defaults.borderColor||"rgba(0,0,0,0.1)"!==n.defaults.backgroundColor;var l;if(!i.forceOverride&&a)return;const c=function(t){let e=0;return(i,n)=>{const s=t.getDatasetMeta(n).controller;s instanceof D?e=function(t,e){return t.backgroundColor=t.data.map((()=>Te(e++))),e}(i,e):s instanceof j?e=function(t,e){return t.backgroundColor=t.data.map((()=>je(e++))),e}(i,e):s&&(e=function(t,e){return t.borderColor=Te(e),t.backgroundColor=je(e),++e}(i,e))}}(t);s.forEach(c)}};function Ne(t){if(t._decimated){const e=t._data;delete t._decimated,delete t._data,Object.defineProperty(t,"data",{configurable:!0,enumerable:!0,writable:!0,value:e})}}function Fe(t){t.data.datasets.forEach((t=>{Ne(t)}))}var Be={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(t,e,i)=>{if(!i.enabled)return void Fe(t);const s=t.width;t.data.datasets.forEach(((e,r)=>{const{_data:o,indexAxis:a}=e,l=t.getDatasetMeta(r),c=o||e.data;if("y"===n.resolve([a,t.options.indexAxis]))return;if(!l.controller.supportsDecimation)return;const h=t.scales[l.xAxisID];if("linear"!==h.type&&"time"!==h.type)return;if(t.options.parsing)return;let u,{start:d,count:p}=function(t,e){const i=e.length;let s,r=0;const{iScale:o}=t,{min:a,max:l,minDefined:c,maxDefined:h}=o.getUserBounds();return c&&(r=n._limitValue(n._lookupByKey(e,o.axis,a).lo,0,i-1)),s=h?n._limitValue(n._lookupByKey(e,o.axis,l).hi+1,r,i)-r:i-r,{start:r,count:s}}(l,c);if(p<=(i.threshold||4*s))Ne(e);else{switch(n.isNullOrUndef(o)&&(e._data=c,delete e.data,Object.defineProperty(e,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(t){this._data=t}})),i.algorithm){case"lttb":u=function(t,e,i,n,s){const r=s.samples||n;if(r>=i)return t.slice(e,e+i);const o=[],a=(i-2)/(r-2);let l=0;const c=e+i-1;let h,u,d,p,f,g=e;for(o[l++]=t[g],h=0;h<r-2;h++){let n,s=0,r=0;const c=Math.floor((h+1)*a)+1+e,m=Math.min(Math.floor((h+2)*a)+1,i)+e,b=m-c;for(n=c;n<m;n++)s+=t[n].x,r+=t[n].y;s/=b,r/=b;const y=Math.floor(h*a)+1+e,v=Math.min(Math.floor((h+1)*a)+1,i)+e,{x:_,y:x}=t[g];for(d=p=-1,n=y;n<v;n++)p=.5*Math.abs((_-s)*(t[n].y-x)-(_-t[n].x)*(r-x)),p>d&&(d=p,u=t[n],f=n);o[l++]=u,g=f}return o[l++]=t[c],o}(c,d,p,s,i);break;case"min-max":u=function(t,e,i,s){let r,o,a,l,c,h,u,d,p,f,g=0,m=0;const b=[],y=e+i-1,v=t[e].x,_=t[y].x-v;for(r=e;r<e+i;++r){o=t[r],a=(o.x-v)/_*s,l=o.y;const e=0|a;if(e===c)l<p?(p=l,h=r):l>f&&(f=l,u=r),g=(m*g+o.x)/++m;else{const i=r-1;if(!n.isNullOrUndef(h)&&!n.isNullOrUndef(u)){const e=Math.min(h,u),n=Math.max(h,u);e!==d&&e!==i&&b.push({...t[e],x:g}),n!==d&&n!==i&&b.push({...t[n],x:g})}r>0&&i!==d&&b.push(t[i]),b.push(o),c=e,m=0,p=f=l,h=u=d=r}}return b}(c,d,p,s);break;default:throw new Error(`Unsupported decimation algorithm '${i.algorithm}'`)}e._decimated=u}}))},destroy(t){Fe(t)}};function He(t,e,i,s){if(s)return;let r=e[t],o=i[t];return"angle"===t&&(r=n._normalizeAngle(r),o=n._normalizeAngle(o)),{property:t,start:r,end:o}}function ze(t,e,i){for(;e>t;e--){const t=i[e];if(!isNaN(t.x)&&!isNaN(t.y))break}return e}function Ve(t,e,i,n){return t&&e?n(t[i],e[i]):t?t[i]:e?e[i]:0}function $e(t,e){let i=[],s=!1;return n.isArray(t)?(s=!0,i=t):i=function(t,e){const{x:i=null,y:n=null}=t||{},s=e.points,r=[];return e.segments.forEach((({start:t,end:e})=>{e=ze(t,e,s);const o=s[t],a=s[e];null!==n?(r.push({x:o.x,y:n}),r.push({x:a.x,y:n})):null!==i&&(r.push({x:i,y:o.y}),r.push({x:i,y:a.y}))})),r}(t,e),i.length?new xe({points:i,options:{tension:0},_loop:s,_fullLoop:s}):null}function We(t){return t&&!1!==t.fill}function Ue(t,e,i){let s=t[e].fill;const r=[e];let o;if(!i)return s;for(;!1!==s&&-1===r.indexOf(s);){if(!n.isNumberFinite(s))return s;if(o=t[s],!o)return!1;if(o.visible)return s;r.push(s),s=o.fill}return!1}function qe(t,e,i){const s=function(t){const e=t.options,i=e.fill;let s=n.valueOrDefault(i&&i.target,i);return void 0===s&&(s=!!e.backgroundColor),!1!==s&&null!==s&&(!0===s?"origin":s)}(t);if(n.isObject(s))return!isNaN(s.value)&&s;let r=parseFloat(s);return n.isNumberFinite(r)&&Math.floor(r)===r?function(t,e,i,n){return"-"!==t&&"+"!==t||(i=e+i),!(i===e||i<0||i>=n)&&i}(s[0],e,r,i):["origin","start","end","stack","shape"].indexOf(s)>=0&&s}function Ye(t,e,i){const n=[];for(let s=0;s<i.length;s++){const r=i[s],{first:o,last:a,point:l}=Ke(r,e,"x");if(!(!l||o&&a))if(o)n.unshift(l);else if(t.push(l),!a)break}t.push(...n)}function Ke(t,e,i){const s=t.interpolate(e,i);if(!s)return{};const r=s[i],o=t.segments,a=t.points;let l=!1,c=!1;for(let t=0;t<o.length;t++){const e=o[t],s=a[e.start][i],h=a[e.end][i];if(n._isBetween(r,s,h)){l=r===s,c=r===h;break}}return{first:l,last:c,point:s}}class Xe{constructor(t){this.x=t.x,this.y=t.y,this.radius=t.radius}pathSegment(t,e,i){const{x:s,y:r,radius:o}=this;return e=e||{start:0,end:n.TAU},t.arc(s,r,o,e.end,e.start,!0),!i.bounds}interpolate(t){const{x:e,y:i,radius:n}=this,s=t.angle;return{x:e+Math.cos(s)*n,y:i+Math.sin(s)*n,angle:s}}}function Je(t,e,i){const s=function(t){const{chart:e,fill:i,line:s}=t;if(n.isNumberFinite(i))return function(t,e){const i=t.getDatasetMeta(e);return i&&t.isDatasetVisible(e)?i.dataset:null}(e,i);if("stack"===i)return function(t){const{scale:e,index:i,line:n}=t,s=[],r=n.segments,o=n.points,a=function(t,e){const i=[],n=t.getMatchingVisibleMetas("line");for(let t=0;t<n.length;t++){const s=n[t];if(s.index===e)break;s.hidden||i.unshift(s.dataset)}return i}(e,i);a.push($e({x:null,y:e.bottom},n));for(let t=0;t<r.length;t++){const e=r[t];for(let t=e.start;t<=e.end;t++)Ye(s,o[t],a)}return new xe({points:s,options:{}})}(t);if("shape"===i)return!0;const r=function(t){return(t.scale||{}).getPointPositionForValue?function(t){const{scale:e,fill:i}=t,s=e.options,r=e.getLabels().length,o=s.reverse?e.max:e.min,a=function(t,e,i){let s;return s="start"===t?i:"end"===t?e.options.reverse?e.min:e.max:n.isObject(t)?t.value:e.getBaseValue(),s}(i,e,o),l=[];if(s.grid.circular){const t=e.getPointPositionForValue(0,o);return new Xe({x:t.x,y:t.y,radius:e.getDistanceFromCenterForValue(a)})}for(let t=0;t<r;++t)l.push(e.getPointPositionForValue(t,a));return l}(t):function(t){const{scale:e={},fill:i}=t,s=function(t,e){let i=null;return"start"===t?i=e.bottom:"end"===t?i=e.top:n.isObject(t)?i=e.getPixelForValue(t.value):e.getBasePixel&&(i=e.getBasePixel()),i}(i,e);if(n.isNumberFinite(s)){const t=e.isHorizontal();return{x:t?s:null,y:t?null:s}}return null}(t)}(t);return r instanceof Xe?r:$e(r,s)}(e),{line:r,scale:o,axis:a}=e,l=r.options,c=l.fill,h=l.backgroundColor,{above:u=h,below:d=h}=c||{};s&&r.points.length&&(n.clipArea(t,i),function(t,e){const{line:i,target:n,above:s,below:r,area:o,scale:a}=e,l=i._loop?"angle":e.axis;t.save(),"x"===l&&r!==s&&(Ge(t,n,o.top),Ze(t,{line:i,target:n,color:s,scale:a,property:l}),t.restore(),t.save(),Ge(t,n,o.bottom)),Ze(t,{line:i,target:n,color:r,scale:a,property:l}),t.restore()}(t,{line:r,target:s,above:u,below:d,area:i,scale:o,axis:a}),n.unclipArea(t))}function Ge(t,e,i){const{segments:n,points:s}=e;let r=!0,o=!1;t.beginPath();for(const a of n){const{start:n,end:l}=a,c=s[n],h=s[ze(n,l,s)];r?(t.moveTo(c.x,c.y),r=!1):(t.lineTo(c.x,i),t.lineTo(c.x,c.y)),o=!!e.pathSegment(t,a,{move:o}),o?t.closePath():t.lineTo(h.x,i)}t.lineTo(e.first().x,i),t.closePath(),t.clip()}function Ze(t,e){const{line:i,target:s,property:r,color:o,scale:a}=e,l=function(t,e,i){const s=t.segments,r=t.points,o=e.points,a=[];for(const t of s){let{start:s,end:l}=t;l=ze(s,l,r);const c=He(i,r[s],r[l],t.loop);if(!e.segments){a.push({source:t,target:c,start:r[s],end:r[l]});continue}const h=n._boundSegments(e,c);for(const e of h){const s=He(i,o[e.start],o[e.end],e.loop),l=n._boundSegment(t,r,s);for(const t of l)a.push({source:t,target:e,start:{[i]:Ve(c,s,"start",Math.max)},end:{[i]:Ve(c,s,"end",Math.min)}})}}return a}(i,s,r);for(const{source:e,target:n,start:c,end:h}of l){const{style:{backgroundColor:l=o}={}}=e,u=!0!==s;t.save(),t.fillStyle=l,Qe(t,a,u&&He(r,c,h)),t.beginPath();const d=!!i.pathSegment(t,e);let p;if(u){d?t.closePath():ti(t,s,h,r);const e=!!s.pathSegment(t,n,{move:d,reverse:!0});p=d&&e,p||ti(t,s,c,r)}t.closePath(),t.fill(p?"evenodd":"nonzero"),t.restore()}}function Qe(t,e,i){const{top:n,bottom:s}=e.chart.chartArea,{property:r,start:o,end:a}=i||{};"x"===r&&(t.beginPath(),t.rect(o,n,a-o,s-n),t.clip())}function ti(t,e,i,n){const s=e.interpolate(i,n);s&&t.lineTo(s.x,s.y)}var ei={id:"filler",afterDatasetsUpdate(t,e,i){const n=(t.data.datasets||[]).length,s=[];let r,o,a,l;for(o=0;o<n;++o)r=t.getDatasetMeta(o),a=r.dataset,l=null,a&&a.options&&a instanceof xe&&(l={visible:t.isDatasetVisible(o),index:o,fill:qe(a,o,n),chart:t,axis:r.controller.options.indexAxis,scale:r.vScale,line:a}),r.$filler=l,s.push(l);for(o=0;o<n;++o)l=s[o],l&&!1!==l.fill&&(l.fill=Ue(s,o,i.propagate))},beforeDraw(t,e,i){const n="beforeDraw"===i.drawTime,s=t.getSortedVisibleDatasetMetas(),r=t.chartArea;for(let e=s.length-1;e>=0;--e){const i=s[e].$filler;i&&(i.line.updateControlPoints(r,i.axis),n&&i.fill&&Je(t.ctx,i,r))}},beforeDatasetsDraw(t,e,i){if("beforeDatasetsDraw"!==i.drawTime)return;const n=t.getSortedVisibleDatasetMetas();for(let e=n.length-1;e>=0;--e){const i=n[e].$filler;We(i)&&Je(t.ctx,i,t.chartArea)}},beforeDatasetDraw(t,e,i){const n=e.meta.$filler;We(n)&&"beforeDatasetDraw"===i.drawTime&&Je(t.ctx,n,t.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const ii=(t,e)=>{let{boxHeight:i=e,boxWidth:n=e}=t;return t.usePointStyle&&(i=Math.min(i,e),n=t.pointStyleWidth||Math.min(n,e)),{boxWidth:n,boxHeight:i,itemHeight:Math.max(e,i)}};class ni extends St{constructor(t){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e,i){this.maxWidth=t,this.maxHeight=e,this._margins=i,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const t=this.options.labels||{};let e=n.callback(t.generateLabels,[this.chart],this)||[];t.filter&&(e=e.filter((e=>t.filter(e,this.chart.data)))),t.sort&&(e=e.sort(((e,i)=>t.sort(e,i,this.chart.data)))),this.options.reverse&&e.reverse(),this.legendItems=e}fit(){const{options:t,ctx:e}=this;if(!t.display)return void(this.width=this.height=0);const i=t.labels,s=n.toFont(i.font),r=s.size,o=this._computeTitleHeight(),{boxWidth:a,itemHeight:l}=ii(i,r);let c,h;e.font=s.string,this.isHorizontal()?(c=this.maxWidth,h=this._fitRows(o,r,a,l)+10):(h=this.maxHeight,c=this._fitCols(o,s,a,l)+10),this.width=Math.min(c,t.maxWidth||this.maxWidth),this.height=Math.min(h,t.maxHeight||this.maxHeight)}_fitRows(t,e,i,n){const{ctx:s,maxWidth:r,options:{labels:{padding:o}}}=this,a=this.legendHitBoxes=[],l=this.lineWidths=[0],c=n+o;let h=t;s.textAlign="left",s.textBaseline="middle";let u=-1,d=-c;return this.legendItems.forEach(((t,p)=>{const f=i+e/2+s.measureText(t.text).width;(0===p||l[l.length-1]+f+2*o>r)&&(h+=c,l[l.length-(p>0?0:1)]=0,d+=c,u++),a[p]={left:0,top:d,row:u,width:f,height:n},l[l.length-1]+=f+o})),h}_fitCols(t,e,i,n){const{ctx:s,maxHeight:r,options:{labels:{padding:o}}}=this,a=this.legendHitBoxes=[],l=this.columnSizes=[],c=r-t;let h=o,u=0,d=0,p=0,f=0;return this.legendItems.forEach(((t,r)=>{const{itemWidth:g,itemHeight:m}=function(t,e,i,n,s){const r=function(t,e,i,n){let s=t.text;return s&&"string"!=typeof s&&(s=s.reduce(((t,e)=>t.length>e.length?t:e))),e+i.size/2+n.measureText(s).width}(n,t,e,i),o=function(t,e,i){let n=t;return"string"!=typeof e.text&&(n=si(e,i)),n}(s,n,e.lineHeight);return{itemWidth:r,itemHeight:o}}(i,e,s,t,n);r>0&&d+m+2*o>c&&(h+=u+o,l.push({width:u,height:d}),p+=u+o,f++,u=d=0),a[r]={left:p,top:d,col:f,width:g,height:m},u=Math.max(u,g),d+=m+o})),h+=u,l.push({width:u,height:d}),h}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:e,options:{align:i,labels:{padding:s},rtl:r}}=this,o=n.getRtlAdapter(r,this.left,this.width);if(this.isHorizontal()){let r=0,a=n._alignStartEnd(i,this.left+s,this.right-this.lineWidths[r]);for(const l of e)r!==l.row&&(r=l.row,a=n._alignStartEnd(i,this.left+s,this.right-this.lineWidths[r])),l.top+=this.top+t+s,l.left=o.leftForLtr(o.x(a),l.width),a+=l.width+s}else{let r=0,a=n._alignStartEnd(i,this.top+t+s,this.bottom-this.columnSizes[r].height);for(const l of e)l.col!==r&&(r=l.col,a=n._alignStartEnd(i,this.top+t+s,this.bottom-this.columnSizes[r].height)),l.top=a,l.left+=this.left+s,l.left=o.leftForLtr(o.x(l.left),l.width),a+=l.height+s}}isHorizontal(){return"top"===this.options.position||"bottom"===this.options.position}draw(){if(this.options.display){const t=this.ctx;n.clipArea(t,this),this._draw(),n.unclipArea(t)}}_draw(){const{options:t,columnSizes:e,lineWidths:i,ctx:s}=this,{align:r,labels:o}=t,a=n.defaults.color,l=n.getRtlAdapter(t.rtl,this.left,this.width),c=n.toFont(o.font),{padding:h}=o,u=c.size,d=u/2;let p;this.drawTitle(),s.textAlign=l.textAlign("left"),s.textBaseline="middle",s.lineWidth=.5,s.font=c.string;const{boxWidth:f,boxHeight:g,itemHeight:m}=ii(o,u),b=this.isHorizontal(),y=this._computeTitleHeight();p=b?{x:n._alignStartEnd(r,this.left+h,this.right-i[0]),y:this.top+h+y,line:0}:{x:this.left+h,y:n._alignStartEnd(r,this.top+y+h,this.bottom-e[0].height),line:0},n.overrideTextDirection(this.ctx,t.textDirection);const v=m+h;this.legendItems.forEach(((_,x)=>{s.strokeStyle=_.fontColor,s.fillStyle=_.fontColor;const w=s.measureText(_.text).width,k=l.textAlign(_.textAlign||(_.textAlign=o.textAlign)),S=f+d+w;let P=p.x,O=p.y;if(l.setWidth(this.width),b?x>0&&P+S+h>this.right&&(O=p.y+=v,p.line++,P=p.x=n._alignStartEnd(r,this.left+h,this.right-i[p.line])):x>0&&O+v>this.bottom&&(P=p.x=P+e[p.line].width+h,p.line++,O=p.y=n._alignStartEnd(r,this.top+y+h,this.bottom-e[p.line].height)),function(t,e,i){if(isNaN(f)||f<=0||isNaN(g)||g<0)return;s.save();const r=n.valueOrDefault(i.lineWidth,1);if(s.fillStyle=n.valueOrDefault(i.fillStyle,a),s.lineCap=n.valueOrDefault(i.lineCap,"butt"),s.lineDashOffset=n.valueOrDefault(i.lineDashOffset,0),s.lineJoin=n.valueOrDefault(i.lineJoin,"miter"),s.lineWidth=r,s.strokeStyle=n.valueOrDefault(i.strokeStyle,a),s.setLineDash(n.valueOrDefault(i.lineDash,[])),o.usePointStyle){const a={radius:g*Math.SQRT2/2,pointStyle:i.pointStyle,rotation:i.rotation,borderWidth:r},c=l.xPlus(t,f/2),h=e+d;n.drawPointLegend(s,a,c,h,o.pointStyleWidth&&f)}else{const o=e+Math.max((u-g)/2,0),a=l.leftForLtr(t,f),c=n.toTRBLCorners(i.borderRadius);s.beginPath(),Object.values(c).some((t=>0!==t))?n.addRoundedRectPath(s,{x:a,y:o,w:f,h:g,radius:c}):s.rect(a,o,f,g),s.fill(),0!==r&&s.stroke()}s.restore()}(l.x(P),O,_),P=n._textX(k,P+f+d,b?P+S:this.right,t.rtl),function(t,e,i){n.renderText(s,i.text,t,e+m/2,c,{strikethrough:i.hidden,textAlign:l.textAlign(i.textAlign)})}(l.x(P),O,_),b)p.x+=S+h;else if("string"!=typeof _.text){const t=c.lineHeight;p.y+=si(_,t)+h}else p.y+=v})),n.restoreTextDirection(this.ctx,t.textDirection)}drawTitle(){const t=this.options,e=t.title,i=n.toFont(e.font),s=n.toPadding(e.padding);if(!e.display)return;const r=n.getRtlAdapter(t.rtl,this.left,this.width),o=this.ctx,a=e.position,l=i.size/2,c=s.top+l;let h,u=this.left,d=this.width;if(this.isHorizontal())d=Math.max(...this.lineWidths),h=this.top+c,u=n._alignStartEnd(t.align,u,this.right-d);else{const e=this.columnSizes.reduce(((t,e)=>Math.max(t,e.height)),0);h=c+n._alignStartEnd(t.align,this.top,this.bottom-e-t.labels.padding-this._computeTitleHeight())}const p=n._alignStartEnd(a,u,u+d);o.textAlign=r.textAlign(n._toLeftRightCenter(a)),o.textBaseline="middle",o.strokeStyle=e.color,o.fillStyle=e.color,o.font=i.string,n.renderText(o,e.text,p,h,i)}_computeTitleHeight(){const t=this.options.title,e=n.toFont(t.font),i=n.toPadding(t.padding);return t.display?e.lineHeight+i.height:0}_getLegendItemAt(t,e){let i,s,r;if(n._isBetween(t,this.left,this.right)&&n._isBetween(e,this.top,this.bottom))for(r=this.legendHitBoxes,i=0;i<r.length;++i)if(s=r[i],n._isBetween(t,s.left,s.left+s.width)&&n._isBetween(e,s.top,s.top+s.height))return this.legendItems[i];return null}handleEvent(t){const e=this.options;if(!function(t,e){return!("mousemove"!==t&&"mouseout"!==t||!e.onHover&&!e.onLeave)||!(!e.onClick||"click"!==t&&"mouseup"!==t)}(t.type,e))return;const i=this._getLegendItemAt(t.x,t.y);if("mousemove"===t.type||"mouseout"===t.type){const o=this._hoveredItem,a=(r=i,null!==(s=o)&&null!==r&&s.datasetIndex===r.datasetIndex&&s.index===r.index);o&&!a&&n.callback(e.onLeave,[t,o,this],this),this._hoveredItem=i,i&&!a&&n.callback(e.onHover,[t,i,this],this)}else i&&n.callback(e.onClick,[t,i,this],this);var s,r}}function si(t,e){return e*(t.text?t.text.length:0)}var ri={id:"legend",_element:ni,start(t,e,i){const n=t.legend=new ni({ctx:t.ctx,options:i,chart:t});rt.configure(t,n,i),rt.addBox(t,n)},stop(t){rt.removeBox(t,t.legend),delete t.legend},beforeUpdate(t,e,i){const n=t.legend;rt.configure(t,n,i),n.options=i},afterUpdate(t){const e=t.legend;e.buildLabels(),e.adjustHitBoxes()},afterEvent(t,e){e.replay||t.legend.handleEvent(e.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(t,e,i){const n=e.datasetIndex,s=i.chart;s.isDatasetVisible(n)?(s.hide(n),e.hidden=!0):(s.show(n),e.hidden=!1)},onHover:null,onLeave:null,labels:{color:t=>t.chart.options.color,boxWidth:40,padding:10,generateLabels(t){const e=t.data.datasets,{labels:{usePointStyle:i,pointStyle:s,textAlign:r,color:o,useBorderRadius:a,borderRadius:l}}=t.legend.options;return t._getSortedDatasetMetas().map((t=>{const c=t.controller.getStyle(i?0:void 0),h=n.toPadding(c.borderWidth);return{text:e[t.index].label,fillStyle:c.backgroundColor,fontColor:o,hidden:!t.visible,lineCap:c.borderCapStyle,lineDash:c.borderDash,lineDashOffset:c.borderDashOffset,lineJoin:c.borderJoinStyle,lineWidth:(h.width+h.height)/4,strokeStyle:c.borderColor,pointStyle:s||c.pointStyle,rotation:c.rotation,textAlign:r||c.textAlign,borderRadius:a&&(l||c.borderRadius),datasetIndex:t.index}}),this)}},title:{color:t=>t.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:t=>!t.startsWith("on"),labels:{_scriptable:t=>!["generateLabels","filter","sort"].includes(t)}}};class oi extends St{constructor(t){super(),this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e){const i=this.options;if(this.left=0,this.top=0,!i.display)return void(this.width=this.height=this.right=this.bottom=0);this.width=this.right=t,this.height=this.bottom=e;const s=n.isArray(i.text)?i.text.length:1;this._padding=n.toPadding(i.padding);const r=s*n.toFont(i.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=r:this.width=r}isHorizontal(){const t=this.options.position;return"top"===t||"bottom"===t}_drawArgs(t){const{top:e,left:i,bottom:s,right:r,options:o}=this,a=o.align;let l,c,h,u=0;return this.isHorizontal()?(c=n._alignStartEnd(a,i,r),h=e+t,l=r-i):("left"===o.position?(c=i+t,h=n._alignStartEnd(a,s,e),u=-.5*n.PI):(c=r-t,h=n._alignStartEnd(a,e,s),u=.5*n.PI),l=s-e),{titleX:c,titleY:h,maxWidth:l,rotation:u}}draw(){const t=this.ctx,e=this.options;if(!e.display)return;const i=n.toFont(e.font),s=i.lineHeight/2+this._padding.top,{titleX:r,titleY:o,maxWidth:a,rotation:l}=this._drawArgs(s);n.renderText(t,e.text,0,0,i,{color:e.color,maxWidth:a,rotation:l,textAlign:n._toLeftRightCenter(e.align),textBaseline:"middle",translation:[r,o]})}}var ai={id:"title",_element:oi,start(t,e,i){!function(t,e){const i=new oi({ctx:t.ctx,options:e,chart:t});rt.configure(t,i,e),rt.addBox(t,i),t.titleBlock=i}(t,i)},stop(t){const e=t.titleBlock;rt.removeBox(t,e),delete t.titleBlock},beforeUpdate(t,e,i){const n=t.titleBlock;rt.configure(t,n,i),n.options=i},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 li=new WeakMap;var ci={id:"subtitle",start(t,e,i){const n=new oi({ctx:t.ctx,options:i,chart:t});rt.configure(t,n,i),rt.addBox(t,n),li.set(t,n)},stop(t){rt.removeBox(t,li.get(t)),li.delete(t)},beforeUpdate(t,e,i){const n=li.get(t);rt.configure(t,n,i),n.options=i},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 hi={average(t){if(!t.length)return!1;let e,i,n=new Set,s=0,r=0;for(e=0,i=t.length;e<i;++e){const i=t[e].element;if(i&&i.hasValue()){const t=i.tooltipPosition();n.add(t.x),s+=t.y,++r}}return 0!==r&&0!==n.size&&{x:[...n].reduce(((t,e)=>t+e))/n.size,y:s/r}},nearest(t,e){if(!t.length)return!1;let i,s,r,o=e.x,a=e.y,l=Number.POSITIVE_INFINITY;for(i=0,s=t.length;i<s;++i){const s=t[i].element;if(s&&s.hasValue()){const t=s.getCenterPoint(),i=n.distanceBetweenPoints(e,t);i<l&&(l=i,r=s)}}if(r){const t=r.tooltipPosition();o=t.x,a=t.y}return{x:o,y:a}}};function ui(t,e){return e&&(n.isArray(e)?Array.prototype.push.apply(t,e):t.push(e)),t}function di(t){return("string"==typeof t||t instanceof String)&&t.indexOf("\n")>-1?t.split("\n"):t}function pi(t,e){const{element:i,datasetIndex:n,index:s}=e,r=t.getDatasetMeta(n).controller,{label:o,value:a}=r.getLabelAndValue(s);return{chart:t,label:o,parsed:r.getParsed(s),raw:t.data.datasets[n].data[s],formattedValue:a,dataset:r.getDataset(),dataIndex:s,datasetIndex:n,element:i}}function fi(t,e){const i=t.chart.ctx,{body:s,footer:r,title:o}=t,{boxWidth:a,boxHeight:l}=e,c=n.toFont(e.bodyFont),h=n.toFont(e.titleFont),u=n.toFont(e.footerFont),d=o.length,p=r.length,f=s.length,g=n.toPadding(e.padding);let m=g.height,b=0,y=s.reduce(((t,e)=>t+e.before.length+e.lines.length+e.after.length),0);y+=t.beforeBody.length+t.afterBody.length,d&&(m+=d*h.lineHeight+(d-1)*e.titleSpacing+e.titleMarginBottom),y&&(m+=f*(e.displayColors?Math.max(l,c.lineHeight):c.lineHeight)+(y-f)*c.lineHeight+(y-1)*e.bodySpacing),p&&(m+=e.footerMarginTop+p*u.lineHeight+(p-1)*e.footerSpacing);let v=0;const _=function(t){b=Math.max(b,i.measureText(t).width+v)};return i.save(),i.font=h.string,n.each(t.title,_),i.font=c.string,n.each(t.beforeBody.concat(t.afterBody),_),v=e.displayColors?a+2+e.boxPadding:0,n.each(s,(t=>{n.each(t.before,_),n.each(t.lines,_),n.each(t.after,_)})),v=0,i.font=u.string,n.each(t.footer,_),i.restore(),b+=g.width,{width:b,height:m}}function gi(t,e,i,n){const{x:s,width:r}=i,{width:o,chartArea:{left:a,right:l}}=t;let c="center";return"center"===n?c=s<=(a+l)/2?"left":"right":s<=r/2?c="left":s>=o-r/2&&(c="right"),function(t,e,i,n){const{x:s,width:r}=n,o=i.caretSize+i.caretPadding;return"left"===t&&s+r+o>e.width||"right"===t&&s-r-o<0||void 0}(c,t,e,i)&&(c="center"),c}function mi(t,e,i){const n=i.yAlign||e.yAlign||function(t,e){const{y:i,height:n}=e;return i<n/2?"top":i>t.height-n/2?"bottom":"center"}(t,i);return{xAlign:i.xAlign||e.xAlign||gi(t,e,i,n),yAlign:n}}function bi(t,e,i,s){const{caretSize:r,caretPadding:o,cornerRadius:a}=t,{xAlign:l,yAlign:c}=i,h=r+o,{topLeft:u,topRight:d,bottomLeft:p,bottomRight:f}=n.toTRBLCorners(a);let g=function(t,e){let{x:i,width:n}=t;return"right"===e?i-=n:"center"===e&&(i-=n/2),i}(e,l);const m=function(t,e,i){let{y:n,height:s}=t;return"top"===e?n+=i:n-="bottom"===e?s+i:s/2,n}(e,c,h);return"center"===c?"left"===l?g+=h:"right"===l&&(g-=h):"left"===l?g-=Math.max(u,p)+r:"right"===l&&(g+=Math.max(d,f)+r),{x:n._limitValue(g,0,s.width-e.width),y:n._limitValue(m,0,s.height-e.height)}}function yi(t,e,i){const s=n.toPadding(i.padding);return"center"===e?t.x+t.width/2:"right"===e?t.x+t.width-s.right:t.x+s.left}function vi(t){return ui([],di(t))}function _i(t,e){const i=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return i?t.override(i):t}const xi={beforeTitle:n.noop,title(t){if(t.length>0){const e=t[0],i=e.chart.data.labels,n=i?i.length:0;if(this&&this.options&&"dataset"===this.options.mode)return e.dataset.label||"";if(e.label)return e.label;if(n>0&&e.dataIndex<n)return i[e.dataIndex]}return""},afterTitle:n.noop,beforeBody:n.noop,beforeLabel:n.noop,label(t){if(this&&this.options&&"dataset"===this.options.mode)return t.label+": "+t.formattedValue||t.formattedValue;let e=t.dataset.label||"";e&&(e+=": ");const i=t.formattedValue;return n.isNullOrUndef(i)||(e+=i),e},labelColor(t){const e=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.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(t){const e=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{pointStyle:e.pointStyle,rotation:e.rotation}},afterLabel:n.noop,afterBody:n.noop,beforeFooter:n.noop,footer:n.noop,afterFooter:n.noop};function wi(t,e,i,n){const s=t[e].call(i,n);return void 0===s?xi[e].call(i,n):s}class ki extends St{static positioners=hi;constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const e=this.chart,i=this.options.setContext(this.getContext()),n=i.enabled&&e.options.animation&&i.animations,s=new c(this.chart,n);return n._cacheable&&(this._cachedAnimations=Object.freeze(s)),s}getContext(){return this.$context||(this.$context=(t=this.chart.getContext(),e=this._tooltipItems,n.createContext(t,{tooltip:this,tooltipItems:e,type:"tooltip"})));var t,e}getTitle(t,e){const{callbacks:i}=e,n=wi(i,"beforeTitle",this,t),s=wi(i,"title",this,t),r=wi(i,"afterTitle",this,t);let o=[];return o=ui(o,di(n)),o=ui(o,di(s)),o=ui(o,di(r)),o}getBeforeBody(t,e){return vi(wi(e.callbacks,"beforeBody",this,t))}getBody(t,e){const{callbacks:i}=e,s=[];return n.each(t,(t=>{const e={before:[],lines:[],after:[]},n=_i(i,t);ui(e.before,di(wi(n,"beforeLabel",this,t))),ui(e.lines,wi(n,"label",this,t)),ui(e.after,di(wi(n,"afterLabel",this,t))),s.push(e)})),s}getAfterBody(t,e){return vi(wi(e.callbacks,"afterBody",this,t))}getFooter(t,e){const{callbacks:i}=e,n=wi(i,"beforeFooter",this,t),s=wi(i,"footer",this,t),r=wi(i,"afterFooter",this,t);let o=[];return o=ui(o,di(n)),o=ui(o,di(s)),o=ui(o,di(r)),o}_createItems(t){const e=this._active,i=this.chart.data,s=[],r=[],o=[];let a,l,c=[];for(a=0,l=e.length;a<l;++a)c.push(pi(this.chart,e[a]));return t.filter&&(c=c.filter(((e,n,s)=>t.filter(e,n,s,i)))),t.itemSort&&(c=c.sort(((e,n)=>t.itemSort(e,n,i)))),n.each(c,(e=>{const i=_i(t.callbacks,e);s.push(wi(i,"labelColor",this,e)),r.push(wi(i,"labelPointStyle",this,e)),o.push(wi(i,"labelTextColor",this,e))})),this.labelColors=s,this.labelPointStyles=r,this.labelTextColors=o,this.dataPoints=c,c}update(t,e){const i=this.options.setContext(this.getContext()),n=this._active;let s,r=[];if(n.length){const t=hi[i.position].call(this,n,this._eventPosition);r=this._createItems(i),this.title=this.getTitle(r,i),this.beforeBody=this.getBeforeBody(r,i),this.body=this.getBody(r,i),this.afterBody=this.getAfterBody(r,i),this.footer=this.getFooter(r,i);const e=this._size=fi(this,i),o=Object.assign({},t,e),a=mi(this.chart,i,o),l=bi(i,o,a,this.chart);this.xAlign=a.xAlign,this.yAlign=a.yAlign,s={opacity:1,x:l.x,y:l.y,width:e.width,height:e.height,caretX:t.x,caretY:t.y}}else 0!==this.opacity&&(s={opacity:0});this._tooltipItems=r,this.$context=void 0,s&&this._resolveAnimations().update(this,s),t&&i.external&&i.external.call(this,{chart:this.chart,tooltip:this,replay:e})}drawCaret(t,e,i,n){const s=this.getCaretPosition(t,i,n);e.lineTo(s.x1,s.y1),e.lineTo(s.x2,s.y2),e.lineTo(s.x3,s.y3)}getCaretPosition(t,e,i){const{xAlign:s,yAlign:r}=this,{caretSize:o,cornerRadius:a}=i,{topLeft:l,topRight:c,bottomLeft:h,bottomRight:u}=n.toTRBLCorners(a),{x:d,y:p}=t,{width:f,height:g}=e;let m,b,y,v,_,x;return"center"===r?(_=p+g/2,"left"===s?(m=d,b=m-o,v=_+o,x=_-o):(m=d+f,b=m+o,v=_-o,x=_+o),y=m):(b="left"===s?d+Math.max(l,h)+o:"right"===s?d+f-Math.max(c,u)-o:this.caretX,"top"===r?(v=p,_=v-o,m=b-o,y=b+o):(v=p+g,_=v+o,m=b+o,y=b-o),x=v),{x1:m,x2:b,x3:y,y1:v,y2:_,y3:x}}drawTitle(t,e,i){const s=this.title,r=s.length;let o,a,l;if(r){const c=n.getRtlAdapter(i.rtl,this.x,this.width);for(t.x=yi(this,i.titleAlign,i),e.textAlign=c.textAlign(i.titleAlign),e.textBaseline="middle",o=n.toFont(i.titleFont),a=i.titleSpacing,e.fillStyle=i.titleColor,e.font=o.string,l=0;l<r;++l)e.fillText(s[l],c.x(t.x),t.y+o.lineHeight/2),t.y+=o.lineHeight+a,l+1===r&&(t.y+=i.titleMarginBottom-a)}}_drawColorBox(t,e,i,s,r){const o=this.labelColors[i],a=this.labelPointStyles[i],{boxHeight:l,boxWidth:c}=r,h=n.toFont(r.bodyFont),u=yi(this,"left",r),d=s.x(u),p=l<h.lineHeight?(h.lineHeight-l)/2:0,f=e.y+p;if(r.usePointStyle){const e={radius:Math.min(c,l)/2,pointStyle:a.pointStyle,rotation:a.rotation,borderWidth:1},i=s.leftForLtr(d,c)+c/2,h=f+l/2;t.strokeStyle=r.multiKeyBackground,t.fillStyle=r.multiKeyBackground,n.drawPoint(t,e,i,h),t.strokeStyle=o.borderColor,t.fillStyle=o.backgroundColor,n.drawPoint(t,e,i,h)}else{t.lineWidth=n.isObject(o.borderWidth)?Math.max(...Object.values(o.borderWidth)):o.borderWidth||1,t.strokeStyle=o.borderColor,t.setLineDash(o.borderDash||[]),t.lineDashOffset=o.borderDashOffset||0;const e=s.leftForLtr(d,c),i=s.leftForLtr(s.xPlus(d,1),c-2),a=n.toTRBLCorners(o.borderRadius);Object.values(a).some((t=>0!==t))?(t.beginPath(),t.fillStyle=r.multiKeyBackground,n.addRoundedRectPath(t,{x:e,y:f,w:c,h:l,radius:a}),t.fill(),t.stroke(),t.fillStyle=o.backgroundColor,t.beginPath(),n.addRoundedRectPath(t,{x:i,y:f+1,w:c-2,h:l-2,radius:a}),t.fill()):(t.fillStyle=r.multiKeyBackground,t.fillRect(e,f,c,l),t.strokeRect(e,f,c,l),t.fillStyle=o.backgroundColor,t.fillRect(i,f+1,c-2,l-2))}t.fillStyle=this.labelTextColors[i]}drawBody(t,e,i){const{body:s}=this,{bodySpacing:r,bodyAlign:o,displayColors:a,boxHeight:l,boxWidth:c,boxPadding:h}=i,u=n.toFont(i.bodyFont);let d=u.lineHeight,p=0;const f=n.getRtlAdapter(i.rtl,this.x,this.width),g=function(i){e.fillText(i,f.x(t.x+p),t.y+d/2),t.y+=d+r},m=f.textAlign(o);let b,y,v,_,x,w,k;for(e.textAlign=o,e.textBaseline="middle",e.font=u.string,t.x=yi(this,m,i),e.fillStyle=i.bodyColor,n.each(this.beforeBody,g),p=a&&"right"!==m?"center"===o?c/2+h:c+2+h:0,_=0,w=s.length;_<w;++_){for(b=s[_],y=this.labelTextColors[_],e.fillStyle=y,n.each(b.before,g),v=b.lines,a&&v.length&&(this._drawColorBox(e,t,_,f,i),d=Math.max(u.lineHeight,l)),x=0,k=v.length;x<k;++x)g(v[x]),d=u.lineHeight;n.each(b.after,g)}p=0,d=u.lineHeight,n.each(this.afterBody,g),t.y-=r}drawFooter(t,e,i){const s=this.footer,r=s.length;let o,a;if(r){const l=n.getRtlAdapter(i.rtl,this.x,this.width);for(t.x=yi(this,i.footerAlign,i),t.y+=i.footerMarginTop,e.textAlign=l.textAlign(i.footerAlign),e.textBaseline="middle",o=n.toFont(i.footerFont),e.fillStyle=i.footerColor,e.font=o.string,a=0;a<r;++a)e.fillText(s[a],l.x(t.x),t.y+o.lineHeight/2),t.y+=o.lineHeight+i.footerSpacing}}drawBackground(t,e,i,s){const{xAlign:r,yAlign:o}=this,{x:a,y:l}=t,{width:c,height:h}=i,{topLeft:u,topRight:d,bottomLeft:p,bottomRight:f}=n.toTRBLCorners(s.cornerRadius);e.fillStyle=s.backgroundColor,e.strokeStyle=s.borderColor,e.lineWidth=s.borderWidth,e.beginPath(),e.moveTo(a+u,l),"top"===o&&this.drawCaret(t,e,i,s),e.lineTo(a+c-d,l),e.quadraticCurveTo(a+c,l,a+c,l+d),"center"===o&&"right"===r&&this.drawCaret(t,e,i,s),e.lineTo(a+c,l+h-f),e.quadraticCurveTo(a+c,l+h,a+c-f,l+h),"bottom"===o&&this.drawCaret(t,e,i,s),e.lineTo(a+p,l+h),e.quadraticCurveTo(a,l+h,a,l+h-p),"center"===o&&"left"===r&&this.drawCaret(t,e,i,s),e.lineTo(a,l+u),e.quadraticCurveTo(a,l,a+u,l),e.closePath(),e.fill(),s.borderWidth>0&&e.stroke()}_updateAnimationTarget(t){const e=this.chart,i=this.$animations,n=i&&i.x,s=i&&i.y;if(n||s){const i=hi[t.position].call(this,this._active,this._eventPosition);if(!i)return;const r=this._size=fi(this,t),o=Object.assign({},i,this._size),a=mi(e,t,o),l=bi(t,o,a,e);n._to===l.x&&s._to===l.y||(this.xAlign=a.xAlign,this.yAlign=a.yAlign,this.width=r.width,this.height=r.height,this.caretX=i.x,this.caretY=i.y,this._resolveAnimations().update(this,l))}}_willRender(){return!!this.opacity}draw(t){const e=this.options.setContext(this.getContext());let i=this.opacity;if(!i)return;this._updateAnimationTarget(e);const s={width:this.width,height:this.height},r={x:this.x,y:this.y};i=Math.abs(i)<.001?0:i;const o=n.toPadding(e.padding),a=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;e.enabled&&a&&(t.save(),t.globalAlpha=i,this.drawBackground(r,t,s,e),n.overrideTextDirection(t,e.textDirection),r.y+=o.top,this.drawTitle(r,t,e),this.drawBody(r,t,e),this.drawFooter(r,t,e),n.restoreTextDirection(t,e.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,e){const i=this._active,s=t.map((({datasetIndex:t,index:e})=>{const i=this.chart.getDatasetMeta(t);if(!i)throw new Error("Cannot find a dataset at index "+t);return{datasetIndex:t,element:i.data[e],index:e}})),r=!n._elementsEqual(i,s),o=this._positionChanged(s,e);(r||o)&&(this._active=s,this._eventPosition=e,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,e,i=!0){if(e&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const s=this.options,r=this._active||[],o=this._getActiveElements(t,r,e,i),a=this._positionChanged(o,t),l=e||!n._elementsEqual(o,r)||a;return l&&(this._active=o,(s.enabled||s.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,e))),l}_getActiveElements(t,e,i,n){const s=this.options;if("mouseout"===t.type)return[];if(!n)return e.filter((t=>this.chart.data.datasets[t.datasetIndex]&&void 0!==this.chart.getDatasetMeta(t.datasetIndex).controller.getParsed(t.index)));const r=this.chart.getElementsAtEventForMode(t,s.mode,s,i);return s.reverse&&r.reverse(),r}_positionChanged(t,e){const{caretX:i,caretY:n,options:s}=this,r=hi[s.position].call(this,t,e);return!1!==r&&(i!==r.x||n!==r.y)}}var Si={id:"tooltip",_element:ki,positioners:hi,afterInit(t,e,i){i&&(t.tooltip=new ki({chart:t,options:i}))},beforeUpdate(t,e,i){t.tooltip&&t.tooltip.initialize(i)},reset(t,e,i){t.tooltip&&t.tooltip.initialize(i)},afterDraw(t){const e=t.tooltip;if(e&&e._willRender()){const i={tooltip:e};if(!1===t.notifyPlugins("beforeTooltipDraw",{...i,cancelable:!0}))return;e.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",i)}},afterEvent(t,e){if(t.tooltip){const i=e.replay;t.tooltip.handleEvent(e.event,i,e.inChartArea)&&(e.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:(t,e)=>e.bodyFont.size,boxWidth:(t,e)=>e.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:xi},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:t=>"filter"!==t&&"itemSort"!==t&&"external"!==t,_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},Pi=Object.freeze({__proto__:null,Colors:Ie,Decimation:Be,Filler:ei,Legend:ri,SubTitle:ci,Title:ai,Tooltip:Si});function Oi(t){const e=this.getLabels();return t>=0&&t<e.length?e[t]:t}class Ci extends Tt{static id="category";static defaults={ticks:{callback:Oi}};constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const e=this._addedLabels;if(e.length){const t=this.getLabels();for(const{index:i,label:n}of e)t[i]===n&&t.splice(i,1);this._addedLabels=[]}super.init(t)}parse(t,e){if(n.isNullOrUndef(t))return null;const i=this.getLabels();return((t,e)=>null===t?null:n._limitValue(Math.round(t),0,e))(e=isFinite(e)&&i[e]===t?e:function(t,e,i,n){const s=t.indexOf(e);return-1===s?((t,e,i,n)=>("string"==typeof e?(i=t.push(e)-1,n.unshift({index:i,label:e})):isNaN(e)&&(i=null),i))(t,e,i,n):s!==t.lastIndexOf(e)?i:s}(i,t,n.valueOrDefault(e,t),this._addedLabels),i.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let{min:i,max:n}=this.getMinMax(!0);"ticks"===this.options.bounds&&(t||(i=0),e||(n=this.getLabels().length-1)),this.min=i,this.max=n}buildTicks(){const t=this.min,e=this.max,i=this.options.offset,n=[];let s=this.getLabels();s=0===t&&e===s.length-1?s:s.slice(t,e+1),this._valueRange=Math.max(s.length-(i?0:1),1),this._startValue=this.min-(i?.5:0);for(let i=t;i<=e;i++)n.push({value:i});return n}getLabelForValue(t){return Oi.call(this,t)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return"number"!=typeof t&&(t=this.parse(t)),null===t?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}}function Mi(t,e,{horizontal:i,minRotation:s}){const r=n.toRadians(s),o=(i?Math.sin(r):Math.cos(r))||.001,a=.75*e*(""+t).length;return Math.min(e/o,a)}class Ei extends Tt{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 n.isNullOrUndef(t)||("number"==typeof t||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:e,maxDefined:i}=this.getUserBounds();let{min:s,max:r}=this;const o=t=>s=e?s:t,a=t=>r=i?r:t;if(t){const t=n.sign(s),e=n.sign(r);t<0&&e<0?a(0):t>0&&e>0&&o(0)}if(s===r){let e=0===r?1:Math.abs(.05*r);a(r+e),t||o(s-e)}this.min=s,this.max=r}getTickLimit(){const t=this.options.ticks;let e,{maxTicksLimit:i,stepSize:n}=t;return n?(e=Math.ceil(this.max/n)-Math.floor(this.min/n)+1,e>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${n} would result generating up to ${e} ticks. Limiting to 1000.`),e=1e3)):(e=this.computeTickLimit(),i=i||11),i&&(e=Math.min(i,e)),e}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,e=t.ticks;let i=this.getTickLimit();i=Math.max(2,i);const s=function(t,e){const i=[],{bounds:s,step:r,min:o,max:a,precision:l,count:c,maxTicks:h,maxDigits:u,includeBounds:d}=t,p=r||1,f=h-1,{min:g,max:m}=e,b=!n.isNullOrUndef(o),y=!n.isNullOrUndef(a),v=!n.isNullOrUndef(c),_=(m-g)/(u+1);let x,w,k,S,P=n.niceNum((m-g)/f/p)*p;if(P<1e-14&&!b&&!y)return[{value:g},{value:m}];S=Math.ceil(m/P)-Math.floor(g/P),S>f&&(P=n.niceNum(S*P/f/p)*p),n.isNullOrUndef(l)||(x=Math.pow(10,l),P=Math.ceil(P*x)/x),"ticks"===s?(w=Math.floor(g/P)*P,k=Math.ceil(m/P)*P):(w=g,k=m),b&&y&&r&&n.almostWhole((a-o)/r,P/1e3)?(S=Math.round(Math.min((a-o)/P,h)),P=(a-o)/S,w=o,k=a):v?(w=b?o:w,k=y?a:k,S=c-1,P=(k-w)/S):(S=(k-w)/P,S=n.almostEquals(S,Math.round(S),P/1e3)?Math.round(S):Math.ceil(S));const O=Math.max(n._decimalPlaces(P),n._decimalPlaces(w));x=Math.pow(10,n.isNullOrUndef(l)?O:l),w=Math.round(w*x)/x,k=Math.round(k*x)/x;let C=0;for(b&&(d&&w!==o?(i.push({value:o}),w<o&&C++,n.almostEquals(Math.round((w+C*P)*x)/x,o,Mi(o,_,t))&&C++):w<o&&C++);C<S;++C){const t=Math.round((w+C*P)*x)/x;if(y&&t>a)break;i.push({value:t})}return y&&d&&k!==a?i.length&&n.almostEquals(i[i.length-1].value,a,Mi(a,_,t))?i[i.length-1].value=a:i.push({value:a}):y&&k!==a||i.push({value:k}),i}({maxTicks:i,bounds:t.bounds,min:t.min,max:t.max,precision:e.precision,step:e.stepSize,count:e.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:e.minRotation||0,includeBounds:!1!==e.includeBounds},this._range||this);return"ticks"===t.bounds&&n._setMinAndMaxByKey(s,this,"value"),t.reverse?(s.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),s}configure(){const t=this.ticks;let e=this.min,i=this.max;if(super.configure(),this.options.offset&&t.length){const n=(i-e)/Math.max(t.length-1,1)/2;e-=n,i+=n}this._startValue=e,this._endValue=i,this._valueRange=i-e}getLabelForValue(t){return n.formatNumber(t,this.chart.options.locale,this.options.ticks.format)}}class Ai extends Ei{static id="linear";static defaults={ticks:{callback:n.Ticks.formatters.numeric}};determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=n.isNumberFinite(t)?t:0,this.max=n.isNumberFinite(e)?e:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),e=t?this.width:this.height,i=n.toRadians(this.options.ticks.minRotation),s=(t?Math.sin(i):Math.cos(i))||.001,r=this._resolveTickFontOptions(0);return Math.ceil(e/Math.min(40,r.lineHeight/s))}getPixelForValue(t){return null===t?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}const Li=t=>Math.floor(n.log10(t)),Di=(t,e)=>Math.pow(10,Li(t)+e);function Ti(t){return 1==t/Math.pow(10,Li(t))}function ji(t,e,i){const n=Math.pow(10,i),s=Math.floor(t/n);return Math.ceil(e/n)-s}class Ri extends Tt{static id="logarithmic";static defaults={ticks:{callback:n.Ticks.formatters.logarithmic,major:{enabled:!0}}};constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,e){const i=Ei.prototype.parse.apply(this,[t,e]);if(0!==i)return n.isNumberFinite(i)&&i>0?i:null;this._zero=!0}determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=n.isNumberFinite(t)?Math.max(0,t):null,this.max=n.isNumberFinite(e)?Math.max(0,e):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!n.isNumberFinite(this._userMin)&&(this.min=t===Di(this.min,0)?Di(this.min,-1):Di(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let i=this.min,n=this.max;const s=e=>i=t?i:e,r=t=>n=e?n:t;i===n&&(i<=0?(s(1),r(10)):(s(Di(i,-1)),r(Di(n,1)))),i<=0&&s(Di(n,-1)),n<=0&&r(Di(i,1)),this.min=i,this.max=n}buildTicks(){const t=this.options,e=function(t,{min:e,max:i}){e=n.finiteOrDefault(t.min,e);const s=[],r=Li(e);let o=function(t,e){let i=Li(e-t);for(;ji(t,e,i)>10;)i++;for(;ji(t,e,i)<10;)i--;return Math.min(i,Li(t))}(e,i),a=o<0?Math.pow(10,Math.abs(o)):1;const l=Math.pow(10,o),c=r>o?Math.pow(10,r):0,h=Math.round((e-c)*a)/a,u=Math.floor((e-c)/l/10)*l*10;let d=Math.floor((h-u)/Math.pow(10,o)),p=n.finiteOrDefault(t.min,Math.round((c+u+d*Math.pow(10,o))*a)/a);for(;p<i;)s.push({value:p,major:Ti(p),significand:d}),d>=10?d=d<15?15:20:d++,d>=20&&(o++,d=2,a=o>=0?1:a),p=Math.round((c+u+d*Math.pow(10,o))*a)/a;const f=n.finiteOrDefault(t.max,p);return s.push({value:f,major:Ti(f),significand:d}),s}({min:this._userMin,max:this._userMax},this);return"ticks"===t.bounds&&n._setMinAndMaxByKey(e,this,"value"),t.reverse?(e.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),e}getLabelForValue(t){return void 0===t?"0":n.formatNumber(t,this.chart.options.locale,this.options.ticks.format)}configure(){const t=this.min;super.configure(),this._startValue=n.log10(t),this._valueRange=n.log10(this.max)-n.log10(t)}getPixelForValue(t){return void 0!==t&&0!==t||(t=this.min),null===t||isNaN(t)?NaN:this.getPixelForDecimal(t===this.min?0:(n.log10(t)-this._startValue)/this._valueRange)}getValueForPixel(t){const e=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+e*this._valueRange)}}function Ii(t){const e=t.ticks;if(e.display&&t.display){const t=n.toPadding(e.backdropPadding);return n.valueOrDefault(e.font&&e.font.size,n.defaults.font.size)+t.height}return 0}function Ni(t,e,i,n,s){return t===n||t===s?{start:e-i/2,end:e+i/2}:t<n||t>s?{start:e-i,end:e}:{start:e,end:e+i}}function Fi(t,e,i,n,s){const r=Math.abs(Math.sin(i)),o=Math.abs(Math.cos(i));let a=0,l=0;n.start<e.l?(a=(e.l-n.start)/r,t.l=Math.min(t.l,e.l-a)):n.end>e.r&&(a=(n.end-e.r)/r,t.r=Math.max(t.r,e.r+a)),s.start<e.t?(l=(e.t-s.start)/o,t.t=Math.min(t.t,e.t-l)):s.end>e.b&&(l=(s.end-e.b)/o,t.b=Math.max(t.b,e.b+l))}function Bi(t,e,i){const s=t.drawingArea,{extra:r,additionalAngle:o,padding:a,size:l}=i,c=t.getPointPosition(e,s+r+a,o),h=Math.round(n.toDegrees(n._normalizeAngle(c.angle+n.HALF_PI))),u=function(t,e,i){return 90===i||270===i?t-=e/2:(i>270||i<90)&&(t-=e),t}(c.y,l.h,h),d=function(t){return 0===t||180===t?"center":t<180?"left":"right"}(h),p=(f=c.x,g=l.w,"right"===(m=d)?f-=g:"center"===m&&(f-=g/2),f);var f,g,m;return{visible:!0,x:c.x,y:u,textAlign:d,left:p,top:u,right:p+l.w,bottom:u+l.h}}function Hi(t,e){if(!e)return!0;const{left:i,top:s,right:r,bottom:o}=t;return!(n._isPointInArea({x:i,y:s},e)||n._isPointInArea({x:i,y:o},e)||n._isPointInArea({x:r,y:s},e)||n._isPointInArea({x:r,y:o},e))}function zi(t,e,i){const{left:s,top:r,right:o,bottom:a}=i,{backdropColor:l}=e;if(!n.isNullOrUndef(l)){const i=n.toTRBLCorners(e.borderRadius),c=n.toPadding(e.backdropPadding);t.fillStyle=l;const h=s-c.left,u=r-c.top,d=o-s+c.width,p=a-r+c.height;Object.values(i).some((t=>0!==t))?(t.beginPath(),n.addRoundedRectPath(t,{x:h,y:u,w:d,h:p,radius:i}),t.fill()):t.fillRect(h,u,d,p)}}function Vi(t,e,i,s){const{ctx:r}=t;if(i)r.arc(t.xCenter,t.yCenter,e,0,n.TAU);else{let i=t.getPointPosition(0,e);r.moveTo(i.x,i.y);for(let n=1;n<s;n++)i=t.getPointPosition(n,e),r.lineTo(i.x,i.y)}}class $i extends Ei{static id="radialLinear";static defaults={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:n.Ticks.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback:t=>t,padding:5,centerPointLabels:!1}};static defaultRoutes={"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"};static descriptors={angleLines:{_fallback:"grid"}};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=n.toPadding(Ii(this.options)/2),e=this.width=this.maxWidth-t.width,i=this.height=this.maxHeight-t.height;this.xCenter=Math.floor(this.left+e/2+t.left),this.yCenter=Math.floor(this.top+i/2+t.top),this.drawingArea=Math.floor(Math.min(e,i)/2)}determineDataLimits(){const{min:t,max:e}=this.getMinMax(!1);this.min=n.isNumberFinite(t)&&!isNaN(t)?t:0,this.max=n.isNumberFinite(e)&&!isNaN(e)?e:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/Ii(this.options))}generateTickLabels(t){Ei.prototype.generateTickLabels.call(this,t),this._pointLabels=this.getLabels().map(((t,e)=>{const i=n.callback(this.options.pointLabels.callback,[t,e],this);return i||0===i?i:""})).filter(((t,e)=>this.chart.getDataVisibility(e)))}fit(){const t=this.options;t.display&&t.pointLabels.display?function(t){const e={l:t.left+t._padding.left,r:t.right-t._padding.right,t:t.top+t._padding.top,b:t.bottom-t._padding.bottom},i=Object.assign({},e),s=[],r=[],o=t._pointLabels.length,a=t.options.pointLabels,l=a.centerPointLabels?n.PI/o:0;for(let d=0;d<o;d++){const o=a.setContext(t.getPointLabelContext(d));r[d]=o.padding;const p=t.getPointPosition(d,t.drawingArea+r[d],l),f=n.toFont(o.font),g=(c=t.ctx,h=f,u=t._pointLabels[d],u=n.isArray(u)?u:[u],{w:n._longestText(c,h.string,u),h:u.length*h.lineHeight});s[d]=g;const m=n._normalizeAngle(t.getIndexAngle(d)+l),b=Math.round(n.toDegrees(m));Fi(i,e,m,Ni(b,p.x,g.w,0,180),Ni(b,p.y,g.h,90,270))}var c,h,u;t.setCenterPoint(e.l-i.l,i.r-e.r,e.t-i.t,i.b-e.b),t._pointLabelItems=function(t,e,i){const s=[],r=t._pointLabels.length,o=t.options,{centerPointLabels:a,display:l}=o.pointLabels,c={extra:Ii(o)/2,additionalAngle:a?n.PI/r:0};let h;for(let n=0;n<r;n++){c.padding=i[n],c.size=e[n];const r=Bi(t,n,c);s.push(r),"auto"===l&&(r.visible=Hi(r,h),r.visible&&(h=r))}return s}(t,s,r)}(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(t,e,i,n){this.xCenter+=Math.floor((t-e)/2),this.yCenter+=Math.floor((i-n)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(t,e,i,n))}getIndexAngle(t){const e=n.TAU/(this._pointLabels.length||1),i=this.options.startAngle||0;return n._normalizeAngle(t*e+n.toRadians(i))}getDistanceFromCenterForValue(t){if(n.isNullOrUndef(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(n.isNullOrUndef(t))return NaN;const e=t/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-e:this.min+e}getPointLabelContext(t){const e=this._pointLabels||[];if(t>=0&&t<e.length){const i=e[t];return function(t,e,i){return n.createContext(t,{label:i,index:e,type:"pointLabel"})}(this.getContext(),t,i)}}getPointPosition(t,e,i=0){const s=this.getIndexAngle(t)-n.HALF_PI+i;return{x:Math.cos(s)*e+this.xCenter,y:Math.sin(s)*e+this.yCenter,angle:s}}getPointPositionForValue(t,e){return this.getPointPosition(t,this.getDistanceFromCenterForValue(e))}getBasePosition(t){return this.getPointPositionForValue(t||0,this.getBaseValue())}getPointLabelPosition(t){const{left:e,top:i,right:n,bottom:s}=this._pointLabelItems[t];return{left:e,top:i,right:n,bottom:s}}drawBackground(){const{backgroundColor:t,grid:{circular:e}}=this.options;if(t){const i=this.ctx;i.save(),i.beginPath(),Vi(this,this.getDistanceFromCenterForValue(this._endValue),e,this._pointLabels.length),i.closePath(),i.fillStyle=t,i.fill(),i.restore()}}drawGrid(){const t=this.ctx,e=this.options,{angleLines:i,grid:s,border:r}=e,o=this._pointLabels.length;let a,l,c;if(e.pointLabels.display&&function(t,e){const{ctx:i,options:{pointLabels:s}}=t;for(let r=e-1;r>=0;r--){const e=t._pointLabelItems[r];if(!e.visible)continue;const o=s.setContext(t.getPointLabelContext(r));zi(i,o,e);const a=n.toFont(o.font),{x:l,y:c,textAlign:h}=e;n.renderText(i,t._pointLabels[r],l,c+a.lineHeight/2,a,{color:o.color,textAlign:h,textBaseline:"middle"})}}(this,o),s.display&&this.ticks.forEach(((t,e)=>{if(0!==e||0===e&&this.min<0){l=this.getDistanceFromCenterForValue(t.value);const i=this.getContext(e),n=s.setContext(i),a=r.setContext(i);!function(t,e,i,n,s){const r=t.ctx,o=e.circular,{color:a,lineWidth:l}=e;!o&&!n||!a||!l||i<0||(r.save(),r.strokeStyle=a,r.lineWidth=l,r.setLineDash(s.dash||[]),r.lineDashOffset=s.dashOffset,r.beginPath(),Vi(t,i,o,n),r.closePath(),r.stroke(),r.restore())}(this,n,l,o,a)}})),i.display){for(t.save(),a=o-1;a>=0;a--){const n=i.setContext(this.getPointLabelContext(a)),{color:s,lineWidth:r}=n;r&&s&&(t.lineWidth=r,t.strokeStyle=s,t.setLineDash(n.borderDash),t.lineDashOffset=n.borderDashOffset,l=this.getDistanceFromCenterForValue(e.reverse?this.min:this.max),c=this.getPointPosition(a,l),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(c.x,c.y),t.stroke())}t.restore()}}drawBorder(){}drawLabels(){const t=this.ctx,e=this.options,i=e.ticks;if(!i.display)return;const s=this.getIndexAngle(0);let r,o;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(s),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach(((s,a)=>{if(0===a&&this.min>=0&&!e.reverse)return;const l=i.setContext(this.getContext(a)),c=n.toFont(l.font);if(r=this.getDistanceFromCenterForValue(this.ticks[a].value),l.showLabelBackdrop){t.font=c.string,o=t.measureText(s.label).width,t.fillStyle=l.backdropColor;const e=n.toPadding(l.backdropPadding);t.fillRect(-o/2-e.left,-r-c.size/2-e.top,o+e.width,c.size+e.height)}n.renderText(t,s.label,0,-r,c,{color:l.color,strokeColor:l.textStrokeColor,strokeWidth:l.textStrokeWidth})})),t.restore()}drawTitle(){}}const Wi={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}},Ui=Object.keys(Wi);function qi(t,e){return t-e}function Yi(t,e){if(n.isNullOrUndef(e))return null;const i=t._adapter,{parser:s,round:r,isoWeekday:o}=t._parseOpts;let a=e;return"function"==typeof s&&(a=s(a)),n.isNumberFinite(a)||(a="string"==typeof s?i.parse(a,s):i.parse(a)),null===a?null:(r&&(a="week"!==r||!n.isNumber(o)&&!0!==o?i.startOf(a,r):i.startOf(a,"isoWeek",o)),+a)}function Ki(t,e,i,n){const s=Ui.length;for(let r=Ui.indexOf(t);r<s-1;++r){const t=Wi[Ui[r]],s=t.steps?t.steps:Number.MAX_SAFE_INTEGER;if(t.common&&Math.ceil((i-e)/(s*t.size))<=n)return Ui[r]}return Ui[s-1]}function Xi(t,e,i){if(i){if(i.length){const{lo:s,hi:r}=n._lookup(i,e);t[i[s]>=e?i[s]:i[r]]=!0}}else t[e]=!0}function Ji(t,e,i){const n=[],s={},r=e.length;let o,a;for(o=0;o<r;++o)a=e[o],s[a]=o,n.push({value:a,major:!1});return 0!==r&&i?function(t,e,i,n){const s=t._adapter,r=+s.startOf(e[0].value,n),o=e[e.length-1].value;let a,l;for(a=r;a<=o;a=+s.add(a,1,n))l=i[a],l>=0&&(e[l].major=!0);return e}(t,n,s,i):n}class Gi extends Tt{static id="time";static defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}};constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,e={}){const i=t.time||(t.time={}),s=this._adapter=new z._date(t.adapters.date);s.init(e),n.mergeIf(i.displayFormats,s.formats()),this._parseOpts={parser:i.parser,round:i.round,isoWeekday:i.isoWeekday},super.init(t),this._normalized=e.normalized}parse(t,e){return void 0===t?null:Yi(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,e=this._adapter,i=t.time.unit||"day";let{min:s,max:r,minDefined:o,maxDefined:a}=this.getUserBounds();function l(t){o||isNaN(t.min)||(s=Math.min(s,t.min)),a||isNaN(t.max)||(r=Math.max(r,t.max))}o&&a||(l(this._getLabelBounds()),"ticks"===t.bounds&&"labels"===t.ticks.source||l(this.getMinMax(!1))),s=n.isNumberFinite(s)&&!isNaN(s)?s:+e.startOf(Date.now(),i),r=n.isNumberFinite(r)&&!isNaN(r)?r:+e.endOf(Date.now(),i)+1,this.min=Math.min(s,r-1),this.max=Math.max(s+1,r)}_getLabelBounds(){const t=this.getLabelTimestamps();let e=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;return t.length&&(e=t[0],i=t[t.length-1]),{min:e,max:i}}buildTicks(){const t=this.options,e=t.time,i=t.ticks,s="labels"===i.source?this.getLabelTimestamps():this._generate();"ticks"===t.bounds&&s.length&&(this.min=this._userMin||s[0],this.max=this._userMax||s[s.length-1]);const r=this.min,o=this.max,a=n._filterBetween(s,r,o);return this._unit=e.unit||(i.autoSkip?Ki(e.minUnit,this.min,this.max,this._getLabelCapacity(r)):function(t,e,i,n,s){for(let r=Ui.length-1;r>=Ui.indexOf(i);r--){const i=Ui[r];if(Wi[i].common&&t._adapter.diff(s,n,i)>=e-1)return i}return Ui[i?Ui.indexOf(i):0]}(this,a.length,e.minUnit,this.min,this.max)),this._majorUnit=i.major.enabled&&"year"!==this._unit?function(t){for(let e=Ui.indexOf(t)+1,i=Ui.length;e<i;++e)if(Wi[Ui[e]].common)return Ui[e]}(this._unit):void 0,this.initOffsets(s),t.reverse&&a.reverse(),Ji(this,a,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map((t=>+t.value)))}initOffsets(t=[]){let e,i,s=0,r=0;this.options.offset&&t.length&&(e=this.getDecimalForValue(t[0]),s=1===t.length?1-e:(this.getDecimalForValue(t[1])-e)/2,i=this.getDecimalForValue(t[t.length-1]),r=1===t.length?i:(i-this.getDecimalForValue(t[t.length-2]))/2);const o=t.length<3?.5:.25;s=n._limitValue(s,0,o),r=n._limitValue(r,0,o),this._offsets={start:s,end:r,factor:1/(s+1+r)}}_generate(){const t=this._adapter,e=this.min,i=this.max,s=this.options,r=s.time,o=r.unit||Ki(r.minUnit,e,i,this._getLabelCapacity(e)),a=n.valueOrDefault(s.ticks.stepSize,1),l="week"===o&&r.isoWeekday,c=n.isNumber(l)||!0===l,h={};let u,d,p=e;if(c&&(p=+t.startOf(p,"isoWeek",l)),p=+t.startOf(p,c?"day":o),t.diff(i,e,o)>1e5*a)throw new Error(e+" and "+i+" are too far apart with stepSize of "+a+" "+o);const f="data"===s.ticks.source&&this.getDataTimestamps();for(u=p,d=0;u<i;u=+t.add(u,a,o),d++)Xi(h,u,f);return u!==i&&"ticks"!==s.bounds&&1!==d||Xi(h,u,f),Object.keys(h).sort(qi).map((t=>+t))}getLabelForValue(t){const e=this._adapter,i=this.options.time;return i.tooltipFormat?e.format(t,i.tooltipFormat):e.format(t,i.displayFormats.datetime)}format(t,e){const i=this.options.time.displayFormats,n=this._unit,s=e||i[n];return this._adapter.format(t,s)}_tickFormatFunction(t,e,i,s){const r=this.options,o=r.ticks.callback;if(o)return n.callback(o,[t,e,i],this);const a=r.time.displayFormats,l=this._unit,c=this._majorUnit,h=l&&a[l],u=c&&a[c],d=i[e],p=c&&u&&d&&d.major;return this._adapter.format(t,s||(p?u:h))}generateTickLabels(t){let e,i,n;for(e=0,i=t.length;e<i;++e)n=t[e],n.label=this._tickFormatFunction(n.value,e,t)}getDecimalForValue(t){return null===t?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){const e=this._offsets,i=this.getDecimalForValue(t);return this.getPixelForDecimal((e.start+i)*e.factor)}getValueForPixel(t){const e=this._offsets,i=this.getDecimalForPixel(t)/e.factor-e.end;return this.min+i*(this.max-this.min)}_getLabelSize(t){const e=this.options.ticks,i=this.ctx.measureText(t).width,s=n.toRadians(this.isHorizontal()?e.maxRotation:e.minRotation),r=Math.cos(s),o=Math.sin(s),a=this._resolveTickFontOptions(0).size;return{w:i*r+a*o,h:i*o+a*r}}_getLabelCapacity(t){const e=this.options.time,i=e.displayFormats,n=i[e.unit]||i.millisecond,s=this._tickFormatFunction(t,0,Ji(this,[t],this._majorUnit),n),r=this._getLabelSize(s),o=Math.floor(this.isHorizontal()?this.width/r.w:this.height/r.h)-1;return o>0?o:1}getDataTimestamps(){let t,e,i=this._cache.data||[];if(i.length)return i;const n=this.getMatchingVisibleMetas();if(this._normalized&&n.length)return this._cache.data=n[0].controller.getAllParsedValues(this);for(t=0,e=n.length;t<e;++t)i=i.concat(n[t].controller.getAllParsedValues(this));return this._cache.data=this.normalize(i)}getLabelTimestamps(){const t=this._cache.labels||[];let e,i;if(t.length)return t;const n=this.getLabels();for(e=0,i=n.length;e<i;++e)t.push(Yi(this,n[e]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return n._arrayUnique(t.sort(qi))}}function Zi(t,e,i){let s,r,o,a,l=0,c=t.length-1;i?(e>=t[l].pos&&e<=t[c].pos&&({lo:l,hi:c}=n._lookupByKey(t,"pos",e)),({pos:s,time:o}=t[l]),({pos:r,time:a}=t[c])):(e>=t[l].time&&e<=t[c].time&&({lo:l,hi:c}=n._lookupByKey(t,"time",e)),({time:s,pos:o}=t[l]),({time:r,pos:a}=t[c]));const h=r-s;return h?o+(a-o)*(e-s)/h:o}class Qi extends Gi{static id="timeseries";static defaults=Gi.defaults;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=Zi(e,this.min),this._tableRange=Zi(e,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:e,max:i}=this,n=[],s=[];let r,o,a,l,c;for(r=0,o=t.length;r<o;++r)l=t[r],l>=e&&l<=i&&n.push(l);if(n.length<2)return[{time:e,pos:0},{time:i,pos:1}];for(r=0,o=n.length;r<o;++r)c=n[r+1],a=n[r-1],l=n[r],Math.round((c+a)/2)!==l&&s.push({time:l,pos:r/(o-1)});return s}_generate(){const t=this.min,e=this.max;let i=super.getDataTimestamps();return i.includes(t)&&i.length||i.splice(0,0,t),i.includes(e)&&1!==i.length||i.push(e),i.sort(((t,e)=>t-e))}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const e=this.getDataTimestamps(),i=this.getLabelTimestamps();return t=e.length&&i.length?this.normalize(e.concat(i)):e.length?e:i,t=this._cache.all=t,t}getDecimalForValue(t){return(Zi(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const e=this._offsets,i=this.getDecimalForPixel(t)/e.factor-e.end;return Zi(this._table,i*this._tableRange+this._minPos,!0)}}var tn=Object.freeze({__proto__:null,CategoryScale:Ci,LinearScale:Ai,LogarithmicScale:Ri,RadialLinearScale:$i,TimeScale:Gi,TimeSeriesScale:Qi});const en=[F,Ae,Pi,tn];e.Ticks=n.Ticks,e.defaults=n.defaults,e.Animation=l,e.Animations=c,e.ArcElement=pe,e.BarController=A,e.BarElement=Ee,e.BasePlatform=ot,e.BasicPlatform=at,e.BubbleController=L,e.CategoryScale=Ci,e.Chart=ce,e.Colors=Ie,e.DatasetController=x,e.Decimation=Be,e.DomPlatform=wt,e.DoughnutController=D,e.Element=St,e.Filler=ei,e.Interaction=Y,e.Legend=ri,e.LineController=T,e.LineElement=xe,e.LinearScale=Ai,e.LogarithmicScale=Ri,e.PieController=R,e.PointElement=ke,e.PolarAreaController=j,e.RadarController=I,e.RadialLinearScale=$i,e.Scale=Tt,e.ScatterController=N,e.SubTitle=ci,e.TimeScale=Gi,e.TimeSeriesScale=Qi,e.Title=ai,e.Tooltip=Si,e._adapters=z,e._detectPlatform=kt,e.animator=r,e.controllers=F,e.elements=Ae,e.layouts=rt,e.plugins=Pi,e.registerables=en,e.registry=It,e.scales=tn},8980:t=>{t.exports='\n {{#if (compare value.length \'gt\' length)}}\n <span class="truncated">\n <span class="full">{{value}}</span>\n <span class="short">{{truncate value length}}</span>\n </span>\n {{else}}\n {{value}}\n {{/if}}\n'},9016:(t,e,i)=>{"use strict";e.__esModule=!0,e.print=function(t){return(new r).accept(t)},e.PrintVisitor=r;var n,s=(n=i(1350))&&n.__esModule?n:{default:n};function r(){this.padding=0}r.prototype=new s.default,r.prototype.pad=function(t){for(var e="",i=0,n=this.padding;i<n;i++)e+=" ";return e+(t+"\n")},r.prototype.Program=function(t){var e="",i=t.body,n=void 0,s=void 0;if(t.blockParams){var r="BLOCK PARAMS: [";for(n=0,s=t.blockParams.length;n<s;n++)r+=" "+t.blockParams[n];r+=" ]",e+=this.pad(r)}for(n=0,s=i.length;n<s;n++)e+=this.accept(i[n]);return this.padding--,e},r.prototype.MustacheStatement=function(t){return this.pad("{{ "+this.SubExpression(t)+" }}")},r.prototype.Decorator=function(t){return this.pad("{{ DIRECTIVE "+this.SubExpression(t)+" }}")},r.prototype.BlockStatement=r.prototype.DecoratorBlock=function(t){var e="";return e+=this.pad(("DecoratorBlock"===t.type?"DIRECTIVE ":"")+"BLOCK:"),this.padding++,e+=this.pad(this.SubExpression(t)),t.program&&(e+=this.pad("PROGRAM:"),this.padding++,e+=this.accept(t.program),this.padding--),t.inverse&&(t.program&&this.padding++,e+=this.pad("{{^}}"),this.padding++,e+=this.accept(t.inverse),this.padding--,t.program&&this.padding--),this.padding--,e},r.prototype.PartialStatement=function(t){var e="PARTIAL:"+t.name.original;return t.params[0]&&(e+=" "+this.accept(t.params[0])),t.hash&&(e+=" "+this.accept(t.hash)),this.pad("{{> "+e+" }}")},r.prototype.PartialBlockStatement=function(t){var e="PARTIAL BLOCK:"+t.name.original;return t.params[0]&&(e+=" "+this.accept(t.params[0])),t.hash&&(e+=" "+this.accept(t.hash)),e+=" "+this.pad("PROGRAM:"),this.padding++,e+=this.accept(t.program),this.padding--,this.pad("{{> "+e+" }}")},r.prototype.ContentStatement=function(t){return this.pad("CONTENT[ '"+t.value+"' ]")},r.prototype.CommentStatement=function(t){return this.pad("{{! '"+t.value+"' }}")},r.prototype.SubExpression=function(t){for(var e,i=t.params,n=[],s=0,r=i.length;s<r;s++)n.push(this.accept(i[s]));return i="["+n.join(", ")+"]",e=t.hash?" "+this.accept(t.hash):"",this.accept(t.path)+" "+i+e},r.prototype.PathExpression=function(t){var e=t.parts.join("/");return(t.data?"@":"")+"PATH:"+e},r.prototype.StringLiteral=function(t){return'"'+t.value+'"'},r.prototype.NumberLiteral=function(t){return"NUMBER{"+t.value+"}"},r.prototype.BooleanLiteral=function(t){return"BOOLEAN{"+t.value+"}"},r.prototype.UndefinedLiteral=function(){return"UNDEFINED"},r.prototype.NullLiteral=function(){return"NULL"},r.prototype.Hash=function(t){for(var e=t.pairs,i=[],n=0,s=e.length;n<s;n++)i.push(this.accept(e[n]));return"HASH{"+i.join(", ")+"}"},r.prototype.HashPair=function(t){return t.key+"="+this.accept(t.value)}},9027:(t,e,i)=>{"use strict";function n(t){return t&&t.__esModule?t:{default:t}}e.__esModule=!0,e.parseWithoutProcessing=c,e.parse=function(t,e){var i=c(t,e);return new r.default(e).accept(i)};var s=n(i(6201)),r=n(i(915)),o=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e.default=t,e}(i(8425)),a=i(2849);e.parser=s.default;var l={};function c(t,e){return"Program"===t.type?t:(s.default.yy=l,l.locInfo=function(t){return new l.SourceLocation(e&&e.srcName,t)},s.default.parse(t))}a.extend(l,o)},9060:function(t,e,i){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const s=n(i(7341)),r=i(2773),o=i(1135),a=i(8769),l=n(i(5123)),c=s.default.compile(i(4822)),h=new Map,u=r.EmptyComponent.build(),d={state:{filters:{search:(0,a.cast)(null),groups:(0,a.cast)(null)}},search:r.SearchComponent.build({title:"Search expectations"}).on("clear",(()=>{d.state.filters.search=null,p()})).on("input",(t=>{d.state.filters.search=t,p()})),filter:r.CheckboxAreaComponent.build({title:"Groups filter",description:"shows/hides items in the list below",width:"M",icon:"fas fa-filter"}),switcher:r.CheckboxAreaComponent.build({title:"Groups switcher",description:"turnes on/off items in the list below",width:"M",icon:"fas fa-power-off"})},p=(t=[...h.values()])=>{const e=(t=>{let e=t;return d.state.filters.groups&&(e=e.filter((t=>d.state.filters.groups.includes(t.data.group)))),d.state.filters.search&&(e=e.filter((t=>t.match(d.state.filters.search)))),e})(t.map((t=>t.hide()))).map((t=>t.show()));t.length===h.size&&(e.length?u.hide():u.show())},f=t=>(t??l.default.shared.groups).forEach((t=>{[...h.values()].filter((e=>e.data.group===t)).every((t=>!t.data.isEnabled))?d.switcher.buttons.provided[t]?.disable("silent"):d.switcher.buttons.provided[t]?.enable("silent")}));e.default=o.Section.build(c({})).assignMeta({name:"Expectations",icon:"fas fa-magic"}).once("initialize",(t=>{t.append(u),t.controls.main.append(d.search),t.controls.additional.append(d.filter),t.controls.additional.append(d.switcher),l.default.on("group:register",(t=>{d.switcher.provide({name:t,isEnabled:!0,colorify:!0}),d.filter.provide({name:t,isEnabled:!0,colorify:!0})})),d.switcher.on("enable",(t=>l.default.services.io.exec("expectations:group:update",{name:t.name,set:{isEnabled:!0}}))),d.switcher.on("disable",(t=>l.default.services.io.exec("expectations:group:update",{name:t.name,set:{isEnabled:!1}}))),d.filter.on("enable",(()=>{d.state.filters.groups=d.filter.extract().filter((t=>t.isEnabled)).map((t=>t.name)),p()})),d.filter.on("disable",(()=>{d.state.filters.groups=d.filter.extract().filter((t=>t.isEnabled)).map((t=>t.name)),p()})),l.default.services.io.subscribe("expectation:added",(e=>{const i=r.ExpectationComponent.build(e);h.set(e.id,i),t.content.append(i),l.default.shared.groups.has(e.group)||(l.default.shared.groups.add(e.group),l.default.emit("group:register",e.group)),p([i]),f([i.data.group])})),l.default.services.io.subscribe("expectation:updated",(e=>{const i=h.get(e.id)??r.ExpectationComponent.build(e);h.has(e.id)&&i.provide(e).refresh(),t.content.element.querySelector(`div.expectation[id="${e.id}"]`)||(t.content.append(i),p([i])),l.default.shared.groups.has(e.group)||(l.default.shared.groups.add(e.group),l.default.emit("group:register",e.group)),h.set(e.id,i),f([i.data.group])}))})).on("initialize",(async t=>{l.default.shared.groups.clear(),t.content.clear(),d.switcher.clear(),d.filter.clear(),h.clear();const{data:e}=await l.default.services.io.exec("expectations:get-list");e.forEach((e=>{const i=r.ExpectationComponent.build(e);l.default.shared.groups.has(e.group)||(l.default.shared.groups.add(e.group),l.default.emit("group:register",e.group)),h.set(e.id,i),t.content.append(i)})),p(),f()}))},9133:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.hasBinary=e.isBinary=void 0;const i="function"==typeof ArrayBuffer,n=Object.prototype.toString,s="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===n.call(Blob),r="function"==typeof File||"undefined"!=typeof File&&"[object FileConstructor]"===n.call(File);function o(t){return i&&(t instanceof ArrayBuffer||(t=>"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer)(t))||s&&t instanceof Blob||r&&t instanceof File}e.isBinary=o,e.hasBinary=function t(e,i){if(!e||"object"!=typeof e)return!1;if(Array.isArray(e)){for(let i=0,n=e.length;i<n;i++)if(t(e[i]))return!0;return!1}if(o(e))return!0;if(e.toJSON&&"function"==typeof e.toJSON&&1===arguments.length)return t(e.toJSON(),!0);for(const i in e)if(Object.prototype.hasOwnProperty.call(e,i)&&t(e[i]))return!0;return!1}},9325:(t,e,i)=>{var n=i(4840),s="object"==typeof self&&self&&self.Object===Object&&self,r=n||s||Function("return this")();t.exports=r},9326:(t,e,i)=>{var n=i(1769),s=i(2428),r=i(6449),o=i(361),a=i(294),l=i(7797);t.exports=function(t,e,i){for(var c=-1,h=(e=n(e,t)).length,u=!1;++c<h;){var d=l(e[c]);if(!(u=null!=t&&i(t,d)))break;t=t[d]}return u||++c!=h?u:!!(h=null==t?0:t.length)&&a(h)&&o(d,h)&&(r(t)||s(t))}},9350:t=>{var e=Object.prototype.toString;t.exports=function(t){return e.call(t)}},9374:(t,e,i)=>{var n=i(4128),s=i(3805),r=i(4394),o=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,l=/^0o[0-7]+$/i,c=parseInt;t.exports=function(t){if("number"==typeof t)return t;if(r(t))return NaN;if(s(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=s(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=n(t);var i=a.test(t);return i||l.test(t)?c(t.slice(2),i?2:8):o.test(t)?NaN:+t}},9419:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.transports=void 0;const n=i(528),s=i(8716);e.transports={websocket:s.WS,polling:n.Polling}},9507:function(t,e,i){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const s=n(i(7341)),r=i(1135),o=i(8769),a=i(2773),l=n(i(5123)),c={section:s.default.compile(i(4138)),actions:s.default.compile(i(7822))},h=a.EmptyComponent.build(),u={state:{storage:new Map,stack:(0,o.cast)([]),filters:{search:(0,o.cast)(null),groups:(0,o.cast)(null)}},search:a.SearchComponent.build({title:"Search history"}).on("clear",(()=>{u.state.filters.search=null,d()})).on("input",(t=>{u.state.filters.search=t,d()})),filter:a.CheckboxAreaComponent.build({title:"Groups filter",description:"shows/hides items in the list below",width:"M",icon:"fas fa-filter"}),actions:a.PanelComponent.build({title:"Actions",class:"actions",width:"M",icon:"fas fa-sliders-h"}).append(c.actions({}))},d=(t=[...u.state.storage.values()])=>{const e=(t=>{let e=t;return u.state.filters.groups&&(e=e.filter((t=>u.state.filters.groups.includes(t.data.group)))),u.state.filters.search&&(e=e.filter((t=>t.match(u.state.filters.search)))),e})(t.map((t=>t.hide()))).map((t=>t.show()));t.length===u.state.storage.size&&(e.length?h.hide():h.show())};e.default=r.Section.build(c.section({})).assignMeta({name:"History",icon:"fas fa-history"}).once("initialize",(t=>{t.append(h),t.controls.main.append(u.search),t.controls.additional.append(u.filter),t.controls.additional.append(u.actions),r.Button.build(u.actions.element.querySelector("button#clear")).handle((async()=>{if(!u.state.stack.length)return l.default.shared.popups.push("Nothing to clear",{level:"warning"});await l.default.services.io.exec("history:delete"),u.state.storage.clear(),u.state.stack=[],t.content.clear(),l.default.shared.popups.push("History has cleared"),d()})),l.default.on("group:register",(t=>u.filter.provide({name:t,isEnabled:!0,colorify:!0}))),u.filter.on("enable",(()=>{u.state.filters.groups=u.filter.extract().filter((t=>t.isEnabled)).map((t=>t.name)),d()})),u.filter.on("disable",(()=>{u.state.filters.groups=u.filter.extract().filter((t=>t.isEnabled)).map((t=>t.name)),d()})),l.default.services.io.subscribe("history:added",(e=>{const i=a.HistoryComponent.build(e);if(u.state.storage.set(e.id,i),u.state.stack.push(e.id),u.state.stack.length>l.default.config.history.limit*l.default.shared.groups.size){const t=u.state.stack.shift();u.state.storage.get(t)?.delete(),u.state.storage.delete(t)}t.content.prepend(i),d([i])})),l.default.services.io.subscribe("history:updated",(e=>{const i=u.state.storage.get(e.id)??a.HistoryComponent.build(e);u.state.storage.has(e.id)?i.provide(e).refresh():u.state.stack.push(e.id),u.state.storage.set(e.id,i),t.element.querySelector(`div.history[id="${e.id}"]`)||(t.content.prepend(i),d([i]))}))})).on("initialize",(async t=>{u.filter.clear(),u.state.stack=[],t.content.clear(),u.state.storage.clear();const{data:e}=await l.default.services.io.exec("history:get-list");e.forEach((e=>{const i=a.HistoryComponent.build(e);u.state.storage.set(e.id,i),u.state.stack.push(e.id),t.content.append(i)})),d()}))},9567:t=>{t.exports='\n <div class="panel {{class}} {{#if width}}width-{{width}}{{else}}width-L{{/if}} {{#if height}}height-{{height}}{{else}}height-L{{/if}}">\n <p class="title">\n {{#if icon}}<i class="{{icon}}"></i>{{/if}}\n <span class="title">{{{title}}}</span>\n {{#if description}}<span class="description">{{{description}}}</span>{{/if}}\n </p>\n\n <div class="content"></div>\n </div>\n'},9570:(t,e,i)=>{var n=i(7334),s=i(3243),r=i(3488),o=s?function(t,e){return s(t,"toString",{configurable:!0,enumerable:!1,value:n(e),writable:!0})}:r;t.exports=o},9603:function(t,e,i){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const s=n(i(4353)),r=n(i(7341)),o=i(2773),a=i(1135),l=n(i(5123)),c=r.default.compile(i(3165)),h={memory:o.ChartComponent.build({title:"Server memory usage",icon:"fas fa-memory",description:"updates every 5 seconds",width:"M"}),cache:o.ChartComponent.build({title:"Cache memory usage",icon:"fas fa-database",description:"updates every 10 minutes",width:"M"}),containers:o.ChartComponent.build({title:"Registred containers",icon:"fas fa-box",description:"updates every 5 seconds",width:"S"}),rate:o.ChartComponent.build({title:"Requests rate",icon:"fas fa-rocket",mode:"aggregation",description:"updates instantly",width:"S"})};e.default=a.Section.build(c({})).assignMeta({icon:"fas fa-chart-line"}).once("initialize",(t=>{t.content.append(h.memory),t.content.append(h.cache),t.content.append(h.containers),t.content.append(h.rate),l.default.services.io.subscribe("metric:registred",(({name:t,point:{timestamp:e,values:i}})=>t in h?h[t].provide([{values:i,legend:(0,s.default)(e).format("HH:mm")}]):null))})).on("initialize",(async()=>{h.containers.clear(),h.memory.clear(),h.cache.clear(),h.rate.clear();const{data:t}=await l.default.services.io.exec("metrics:get");h.memory.provide(t.memory.map((({timestamp:t,values:e})=>({values:e,legend:(0,s.default)(t).format("HH:mm")})))),h.cache.provide(t.cache.map((({timestamp:t,values:e})=>({values:e,legend:(0,s.default)(t).format("HH:mm")})))),h.rate.provide(t.rate.map((({timestamp:t,values:e})=>({values:e,legend:(0,s.default)(t).format("HH:mm")})))),h.containers.provide(t.containers.map((({timestamp:t,values:e})=>({values:e,legend:(0,s.default)(t).format("HH:mm")}))))}))},9607:(t,e,i)=>{var n=i(1437),s=i(7301),r=i(6009),o=r&&r.isRegExp,a=o?s(o):n;t.exports=a},9613:(t,e)=>{"use strict";function i(t){this.string=t}e.__esModule=!0,i.prototype.toString=i.prototype.toHTML=function(){return""+this.string},e.default=i,t.exports=e.default},9632:(t,e,i)=>{"use strict";e.__esModule=!0;var n=i(2849),s=void 0;function r(t,e,i){if(n.isArray(t)){for(var s=[],r=0,o=t.length;r<o;r++)s.push(e.wrap(t[r],i));return s}return"boolean"==typeof t||"number"==typeof t?t+"":t}function o(t){this.srcFile=t,this.source=[]}s||((s=function(t,e,i,n){this.src="",n&&this.add(n)}).prototype={add:function(t){n.isArray(t)&&(t=t.join("")),this.src+=t},prepend:function(t){n.isArray(t)&&(t=t.join("")),this.src=t+this.src},toStringWithSourceMap:function(){return{code:this.toString()}},toString:function(){return this.src}}),o.prototype={isEmpty:function(){return!this.source.length},prepend:function(t,e){this.source.unshift(this.wrap(t,e))},push:function(t,e){this.source.push(this.wrap(t,e))},merge:function(){var t=this.empty();return this.each((function(e){t.add([" ",e,"\n"])})),t},each:function(t){for(var e=0,i=this.source.length;e<i;e++)t(this.source[e])},empty:function(){var t=this.currentLocation||{start:{}};return new s(t.start.line,t.start.column,this.srcFile)},wrap:function(t){var e=arguments.length<=1||void 0===arguments[1]?this.currentLocation||{start:{}}:arguments[1];return t instanceof s?t:(t=r(t,this,e),new s(e.start.line,e.start.column,this.srcFile,t))},functionCall:function(t,e,i){return i=this.generateList(i),this.wrap([t,e?"."+e+"(":"(",i,")"])},quotedString:function(t){return'"'+(t+"").replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")+'"'},objectLiteral:function(t){var e=this,i=[];Object.keys(t).forEach((function(n){var s=r(t[n],e);"undefined"!==s&&i.push([e.quotedString(n),":",s])}));var n=this.generateList(i);return n.prepend("{"),n.add("}"),n},generateList:function(t){for(var e=this.empty(),i=0,n=t.length;i<n;i++)i&&e.add(","),e.add(r(t[i],this));return e},generateArray:function(t){var e=this.generateList(t);return e.prepend("["),e.add("]"),e}},e.default=o,t.exports=e.default},9698:t=>{var e=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");t.exports=function(t){return e.test(t)}},9699:t=>{t.exports='\n <div class="container expectation" id="{{id}}">\n <div class="meta">{{> expectationMeta this}}</div>\n </div>\n'},9700:function(t,e,i){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.Section=void 0;const s=n(i(7007)),r=i(8698),o=i(3224),a=i(5635);class l extends o.Component{constructor(t){super(),this.element=t,this.content=new o.Component(this.element.querySelector("div.content")),this.controls={main:new o.Component(this.element.querySelector("div.controls div.main")),additional:new o.Component(this.element.querySelector("div.controls div.additional"))},this.storage=r.DynamicStorage.build(`config:${this.element.id}`,this.element.querySelector("div.storage")),this.meta={},this.events=new s.default;const e=this.element.querySelector("div.controls button#expand");e&&a.Button.build(e).handle((()=>this.controls.additional.isHidden?(this.controls.additional.show(),e.classList.add("toggled")):(this.controls.additional.hide(),e.classList.remove("toggled"))))}assignMeta(t){return Object.assign(this,{meta:t})}initialize(){return 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 l("string"==typeof t?new o.Component(t).element:t)}}e.Section=l},9705:t=>{t.exports='\n <div class="search">\n <i class="fas fa-search"></i>\n <div class="input" title="{{title}}"><input data-key="search" type="text"></div>\n <button><i class="far fa-times-circle"></i></button>\n </div>\n'},9726:(t,e,i)=>{"use strict";e.__esModule=!0,e.createNewLookupObject=function(){for(var t=arguments.length,e=Array(t),i=0;i<t;i++)e[i]=arguments[i];return n.extend.apply(void 0,[Object.create(null)].concat(e))};var n=i(2849)},9811:(t,e,i)=>{var n=i(7237)("length");t.exports=n},9874:function(t,e,i){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.CheckboxAreaButtonComponent=void 0;const s=n(i(7007)),r=i(2285),o=i(1135);class a extends o.Component{constructor(t){super(`\n <button\n style="${t?.colorify?`color: ${(0,r.calculateColor)(t.name)}`:""}"\n class="${t.isEnabled?"checked":""}"\n >${t.name}</button>\n `),this.configuration=t,this.events=new s.default,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 a(t)}}e.CheckboxAreaButtonComponent=a},9878:(t,e,i)=>{"use strict";var n=i(4001);const s=(()=>{let t=0;return()=>t++})();function r(t){return null==t}function o(t){if(Array.isArray&&Array.isArray(t))return!0;const e=Object.prototype.toString.call(t);return"[object"===e.slice(0,7)&&"Array]"===e.slice(-6)}function a(t){return null!==t&&"[object Object]"===Object.prototype.toString.call(t)}function l(t){return("number"==typeof t||t instanceof Number)&&isFinite(+t)}function c(t,e){return void 0===t?e:t}const h=(t,e)=>"string"==typeof t&&t.endsWith("%")?parseFloat(t)/100*e:+t;function u(t){if(o(t))return t.map(u);if(a(t)){const e=Object.create(null),i=Object.keys(t),n=i.length;let s=0;for(;s<n;++s)e[i[s]]=u(t[i[s]]);return e}return t}function d(t){return-1===["__proto__","prototype","constructor"].indexOf(t)}function p(t,e,i,n){if(!d(t))return;const s=e[t],r=i[t];a(s)&&a(r)?f(s,r,n):e[t]=u(r)}function f(t,e,i){const n=o(e)?e:[e],s=n.length;if(!a(t))return t;const r=(i=i||{}).merger||p;let l;for(let e=0;e<s;++e){if(l=n[e],!a(l))continue;const s=Object.keys(l);for(let e=0,n=s.length;e<n;++e)r(s[e],t,l,i)}return t}function g(t,e){return f(t,e,{merger:m})}function m(t,e,i){if(!d(t))return;const n=e[t],s=i[t];a(n)&&a(s)?g(n,s):Object.prototype.hasOwnProperty.call(e,t)||(e[t]=u(s))}const b={"":t=>t,x:t=>t.x,y:t=>t.y};function y(t){const e=t.split("."),i=[];let n="";for(const t of e)n+=t,n.endsWith("\\")?n=n.slice(0,-1)+".":(i.push(n),n="");return i}function v(t,e){const i=b[e]||(b[e]=function(t){const e=y(t);return t=>{for(const i of e){if(""===i)break;t=t&&t[i]}return t}}(e));return i(t)}function _(t){return t.charAt(0).toUpperCase()+t.slice(1)}const x=t=>"function"==typeof t,w=Math.PI,k=2*w,S=k+w,P=Number.POSITIVE_INFINITY,O=w/180,C=w/2,M=w/4,E=2*w/3,A=Math.log10,L=Math.sign;function D(t,e,i){return Math.abs(t-e)<i}function T(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function j(t,e){return(t-e+S)%k-w}function R(t){return(t%k+k)%k}function I(t,e,i,n){const s=R(t),r=R(e),o=R(i),a=R(r-s),l=R(o-s),c=R(s-r),h=R(s-o);return s===r||s===o||n&&r===o||a>l&&c<h}function N(t,e,i){return Math.max(e,Math.min(i,t))}function F(t,e,i,n=1e-6){return t>=Math.min(e,i)-n&&t<=Math.max(e,i)+n}function B(t,e,i){i=i||(i=>t[i]<e);let n,s=t.length-1,r=0;for(;s-r>1;)n=r+s>>1,i(n)?r=n:s=n;return{lo:r,hi:s}}const H=(t,e,i,n)=>B(t,i,n?n=>{const s=t[n][e];return s<i||s===i&&t[n+1][e]===i}:n=>t[n][e]<i),z=["push","pop","shift","splice","unshift"],V="undefined"==typeof window?function(t){return t()}:window.requestAnimationFrame,$=t=>0===t||1===t,W=(t,e,i)=>-Math.pow(2,10*(t-=1))*Math.sin((t-e)*k/i),U=(t,e,i)=>Math.pow(2,-10*t)*Math.sin((t-e)*k/i)+1,q={linear:t=>t,easeInQuad:t=>t*t,easeOutQuad:t=>-t*(t-2),easeInOutQuad:t=>(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1),easeInCubic:t=>t*t*t,easeOutCubic:t=>(t-=1)*t*t+1,easeInOutCubic:t=>(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2),easeInQuart:t=>t*t*t*t,easeOutQuart:t=>-((t-=1)*t*t*t-1),easeInOutQuart:t=>(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2),easeInQuint:t=>t*t*t*t*t,easeOutQuint:t=>(t-=1)*t*t*t*t+1,easeInOutQuint:t=>(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2),easeInSine:t=>1-Math.cos(t*C),easeOutSine:t=>Math.sin(t*C),easeInOutSine:t=>-.5*(Math.cos(w*t)-1),easeInExpo:t=>0===t?0:Math.pow(2,10*(t-1)),easeOutExpo:t=>1===t?1:1-Math.pow(2,-10*t),easeInOutExpo:t=>$(t)?t:t<.5?.5*Math.pow(2,10*(2*t-1)):.5*(2-Math.pow(2,-10*(2*t-1))),easeInCirc:t=>t>=1?t:-(Math.sqrt(1-t*t)-1),easeOutCirc:t=>Math.sqrt(1-(t-=1)*t),easeInOutCirc:t=>(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1),easeInElastic:t=>$(t)?t:W(t,.075,.3),easeOutElastic:t=>$(t)?t:U(t,.075,.3),easeInOutElastic(t){const e=.1125;return $(t)?t:t<.5?.5*W(2*t,e,.45):.5+.5*U(2*t-1,e,.45)},easeInBack(t){const e=1.70158;return t*t*((e+1)*t-e)},easeOutBack(t){const e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},easeInOutBack(t){let e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},easeInBounce:t=>1-q.easeOutBounce(1-t),easeOutBounce(t){const e=7.5625,i=2.75;return t<1/i?e*t*t:t<2/i?e*(t-=1.5/i)*t+.75:t<2.5/i?e*(t-=2.25/i)*t+.9375:e*(t-=2.625/i)*t+.984375},easeInOutBounce:t=>t<.5?.5*q.easeInBounce(2*t):.5*q.easeOutBounce(2*t-1)+.5};function Y(t){if(t&&"object"==typeof t){const e=t.toString();return"[object CanvasPattern]"===e||"[object CanvasGradient]"===e}return!1}function K(t){return Y(t)?t:new n.Color(t).saturate(.5).darken(.1).hexString()}const X=["x","y","borderWidth","radius","tension"],J=["color","borderColor","backgroundColor"],G=new Map;function Z(t,e,i){return function(t,e){e=e||{};const i=t+JSON.stringify(e);let n=G.get(i);return n||(n=new Intl.NumberFormat(t,e),G.set(i,n)),n}(e,i).format(t)}const Q={values:t=>o(t)?t:""+t,numeric(t,e,i){if(0===t)return"0";const n=this.chart.options.locale;let s,r=t;if(i.length>1){const e=Math.max(Math.abs(i[0].value),Math.abs(i[i.length-1].value));(e<1e-4||e>1e15)&&(s="scientific"),r=function(t,e){let i=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;return Math.abs(i)>=1&&t!==Math.floor(t)&&(i=t-Math.floor(t)),i}(t,i)}const o=A(Math.abs(r)),a=isNaN(o)?1:Math.max(Math.min(-1*Math.floor(o),20),0),l={notation:s,minimumFractionDigits:a,maximumFractionDigits:a};return Object.assign(l,this.options.ticks.format),Z(t,n,l)},logarithmic(t,e,i){if(0===t)return"0";const n=i[e].significand||t/Math.pow(10,Math.floor(A(t)));return[1,2,3,5,10,15].includes(n)||e>.8*i.length?Q.numeric.call(this,t,e,i):""}};var tt={formatters:Q};const et=Object.create(null),it=Object.create(null);function nt(t,e){if(!e)return t;const i=e.split(".");for(let e=0,n=i.length;e<n;++e){const n=i[e];t=t[n]||(t[n]=Object.create(null))}return t}function st(t,e,i){return"string"==typeof e?f(nt(t,e),i):f(nt(t,""),e)}class rt{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=t=>t.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=(t,e)=>K(e.backgroundColor),this.hoverBorderColor=(t,e)=>K(e.borderColor),this.hoverColor=(t,e)=>K(e.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 st(this,t,e)}get(t){return nt(this,t)}describe(t,e){return st(it,t,e)}override(t,e){return st(et,t,e)}route(t,e,i,n){const s=nt(this,t),r=nt(this,i),o="_"+e;Object.defineProperties(s,{[o]:{value:s[e],writable:!0},[e]:{enumerable:!0,get(){const t=this[o],e=r[n];return a(t)?Object.assign({},e,t):c(t,e)},set(t){this[o]=t}}})}apply(t){t.forEach((t=>t(this)))}}var ot=new rt({_scriptable:t=>!t.startsWith("on"),_indexable:t=>"events"!==t,hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[function(t){t.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),t.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>"onProgress"!==t&&"onComplete"!==t&&"fn"!==t}),t.set("animations",{colors:{type:"color",properties:J},numbers:{type:"number",properties:X}}),t.describe("animations",{_fallback:"animation"}),t.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=>0|t}}}})},function(t){t.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})},function(t){t.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:tt.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),t.route("scale.ticks","color","","color"),t.route("scale.grid","color","","borderColor"),t.route("scale.border","color","","borderColor"),t.route("scale.title","color","","color"),t.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&"callback"!==t&&"parser"!==t,_indexable:t=>"borderDash"!==t&&"tickBorderDash"!==t&&"dash"!==t}),t.describe("scales",{_fallback:"scale"}),t.describe("scale.ticks",{_scriptable:t=>"backdropPadding"!==t&&"callback"!==t,_indexable:t=>"backdropPadding"!==t})}]);function at(t){return!t||r(t.size)||r(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}function lt(t,e,i,n,s){let r=e[s];return r||(r=e[s]=t.measureText(s).width,i.push(s)),r>n&&(n=r),n}function ct(t,e,i,n,s){let r,o,a,l,c,h,u,d;const p=e.pointStyle,f=e.rotation,g=e.radius;let m=(f||0)*O;if(p&&"object"==typeof p&&(r=p.toString(),"[object HTMLImageElement]"===r||"[object HTMLCanvasElement]"===r))return t.save(),t.translate(i,n),t.rotate(m),t.drawImage(p,-p.width/2,-p.height/2,p.width,p.height),void t.restore();if(!(isNaN(g)||g<=0)){switch(t.beginPath(),p){default:s?t.ellipse(i,n,s/2,g,0,0,k):t.arc(i,n,g,0,k),t.closePath();break;case"triangle":h=s?s/2:g,t.moveTo(i+Math.sin(m)*h,n-Math.cos(m)*g),m+=E,t.lineTo(i+Math.sin(m)*h,n-Math.cos(m)*g),m+=E,t.lineTo(i+Math.sin(m)*h,n-Math.cos(m)*g),t.closePath();break;case"rectRounded":c=.516*g,l=g-c,o=Math.cos(m+M)*l,u=Math.cos(m+M)*(s?s/2-c:l),a=Math.sin(m+M)*l,d=Math.sin(m+M)*(s?s/2-c:l),t.arc(i-u,n-a,c,m-w,m-C),t.arc(i+d,n-o,c,m-C,m),t.arc(i+u,n+a,c,m,m+C),t.arc(i-d,n+o,c,m+C,m+w),t.closePath();break;case"rect":if(!f){l=Math.SQRT1_2*g,h=s?s/2:l,t.rect(i-h,n-l,2*h,2*l);break}m+=M;case"rectRot":u=Math.cos(m)*(s?s/2:g),o=Math.cos(m)*g,a=Math.sin(m)*g,d=Math.sin(m)*(s?s/2:g),t.moveTo(i-u,n-a),t.lineTo(i+d,n-o),t.lineTo(i+u,n+a),t.lineTo(i-d,n+o),t.closePath();break;case"crossRot":m+=M;case"cross":u=Math.cos(m)*(s?s/2:g),o=Math.cos(m)*g,a=Math.sin(m)*g,d=Math.sin(m)*(s?s/2:g),t.moveTo(i-u,n-a),t.lineTo(i+u,n+a),t.moveTo(i+d,n-o),t.lineTo(i-d,n+o);break;case"star":u=Math.cos(m)*(s?s/2:g),o=Math.cos(m)*g,a=Math.sin(m)*g,d=Math.sin(m)*(s?s/2:g),t.moveTo(i-u,n-a),t.lineTo(i+u,n+a),t.moveTo(i+d,n-o),t.lineTo(i-d,n+o),m+=M,u=Math.cos(m)*(s?s/2:g),o=Math.cos(m)*g,a=Math.sin(m)*g,d=Math.sin(m)*(s?s/2:g),t.moveTo(i-u,n-a),t.lineTo(i+u,n+a),t.moveTo(i+d,n-o),t.lineTo(i-d,n+o);break;case"line":o=s?s/2:Math.cos(m)*g,a=Math.sin(m)*g,t.moveTo(i-o,n-a),t.lineTo(i+o,n+a);break;case"dash":t.moveTo(i,n),t.lineTo(i+Math.cos(m)*(s?s/2:g),n+Math.sin(m)*g);break;case!1:t.closePath()}t.fill(),e.borderWidth>0&&t.stroke()}}function ht(t,e,i){return i=i||.5,!e||t&&t.x>e.left-i&&t.x<e.right+i&&t.y>e.top-i&&t.y<e.bottom+i}function ut(t,e,i,n,s){if(s.strikethrough||s.underline){const r=t.measureText(n),o=e-r.actualBoundingBoxLeft,a=e+r.actualBoundingBoxRight,l=i-r.actualBoundingBoxAscent,c=i+r.actualBoundingBoxDescent,h=s.strikethrough?(l+c)/2:c;t.strokeStyle=t.fillStyle,t.beginPath(),t.lineWidth=s.decorationWidth||2,t.moveTo(o,h),t.lineTo(a,h),t.stroke()}}function dt(t,e){const i=t.fillStyle;t.fillStyle=e.color,t.fillRect(e.left,e.top,e.width,e.height),t.fillStyle=i}const pt=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,ft=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function gt(t,e){const i=(""+t).match(pt);if(!i||"normal"===i[1])return 1.2*e;switch(t=+i[2],i[3]){case"px":return t;case"%":t/=100}return e*t}function mt(t,e){const i={},n=a(e),s=n?Object.keys(e):e,r=a(t)?n?i=>c(t[i],t[e[i]]):e=>t[e]:()=>t;for(const t of s)i[t]=+r(t)||0;return i}function bt(t){return mt(t,{top:"y",right:"x",bottom:"y",left:"x"})}function yt(t,e){return Object.assign(Object.create(t),e)}function vt(t,e=[""],i,n,s=()=>t[0]){const r=i||t;void 0===n&&(n=Et("_fallback",t));const o={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:t,_rootScopes:r,_fallback:n,_getTarget:s,override:i=>vt([i,...t],e,r,n)};return new Proxy(o,{deleteProperty:(e,i)=>(delete e[i],delete e._keys,delete t[0][i],!0),get:(i,n)=>kt(i,n,(()=>function(t,e,i,n){let s;for(const r of e)if(s=Et(xt(r,t),i),void 0!==s)return wt(t,s)?Ct(i,n,t,s):s}(n,e,t,i))),getOwnPropertyDescriptor:(t,e)=>Reflect.getOwnPropertyDescriptor(t._scopes[0],e),getPrototypeOf:()=>Reflect.getPrototypeOf(t[0]),has:(t,e)=>At(t).includes(e),ownKeys:t=>At(t),set(t,e,i){const n=t._storage||(t._storage=s());return t[e]=n[e]=i,delete t._keys,!0}})}function _t(t,e={scriptable:!0,indexable:!0}){const{_scriptable:i=e.scriptable,_indexable:n=e.indexable,_allKeys:s=e.allKeys}=t;return{allKeys:s,scriptable:i,indexable:n,isScriptable:x(i)?i:()=>i,isIndexable:x(n)?n:()=>n}}const xt=(t,e)=>t?t+_(e):e,wt=(t,e)=>a(e)&&"adapters"!==t&&(null===Object.getPrototypeOf(e)||e.constructor===Object);function kt(t,e,i){if(Object.prototype.hasOwnProperty.call(t,e)||"constructor"===e)return t[e];const n=i();return t[e]=n,n}function St(t,e,i){return x(t)?t(e,i):t}const Pt=(t,e)=>!0===t?e:"string"==typeof t?v(e,t):void 0;function Ot(t,e,i,n,s){for(const r of e){const e=Pt(i,r);if(e){t.add(e);const r=St(e._fallback,i,s);if(void 0!==r&&r!==i&&r!==n)return r}else if(!1===e&&void 0!==n&&i!==n)return null}return!1}function Ct(t,e,i,n){const s=e._rootScopes,r=St(e._fallback,i,n),l=[...t,...s],c=new Set;c.add(n);let h=Mt(c,l,i,r||i,n);return null!==h&&(void 0===r||r===i||(h=Mt(c,l,r,h,n),null!==h))&&vt(Array.from(c),[""],s,r,(()=>function(t,e,i){const n=t._getTarget();e in n||(n[e]={});const s=n[e];return o(s)&&a(i)?i:s||{}}(e,i,n)))}function Mt(t,e,i,n,s){for(;i;)i=Ot(t,e,i,n,s);return i}function Et(t,e){for(const i of e){if(!i)continue;const e=i[t];if(void 0!==e)return e}}function At(t){let e=t._keys;return e||(e=t._keys=function(t){const e=new Set;for(const i of t)for(const t of Object.keys(i).filter((t=>!t.startsWith("_"))))e.add(t);return Array.from(e)}(t._scopes)),e}const Lt=Number.EPSILON||1e-14,Dt=(t,e)=>e<t.length&&!t[e].skip&&t[e],Tt=t=>"x"===t?"y":"x";function jt(t,e,i,n){const s=t.skip?e:t,r=e,o=i.skip?e:i,a=T(r,s),l=T(o,r);let c=a/(a+l),h=l/(a+l);c=isNaN(c)?0:c,h=isNaN(h)?0:h;const u=n*c,d=n*h;return{previous:{x:r.x-u*(o.x-s.x),y:r.y-u*(o.y-s.y)},next:{x:r.x+d*(o.x-s.x),y:r.y+d*(o.y-s.y)}}}function Rt(t,e="x"){const i=Tt(e),n=t.length,s=Array(n).fill(0),r=Array(n);let o,a,l,c=Dt(t,0);for(o=0;o<n;++o)if(a=l,l=c,c=Dt(t,o+1),l){if(c){const t=c[e]-l[e];s[o]=0!==t?(c[i]-l[i])/t:0}r[o]=a?c?L(s[o-1])!==L(s[o])?0:(s[o-1]+s[o])/2:s[o-1]:s[o]}!function(t,e,i){const n=t.length;let s,r,o,a,l,c=Dt(t,0);for(let h=0;h<n-1;++h)l=c,c=Dt(t,h+1),l&&c&&(D(e[h],0,Lt)?i[h]=i[h+1]=0:(s=i[h]/e[h],r=i[h+1]/e[h],a=Math.pow(s,2)+Math.pow(r,2),a<=9||(o=3/Math.sqrt(a),i[h]=s*o*e[h],i[h+1]=r*o*e[h])))}(t,s,r),function(t,e,i="x"){const n=Tt(i),s=t.length;let r,o,a,l=Dt(t,0);for(let c=0;c<s;++c){if(o=a,a=l,l=Dt(t,c+1),!a)continue;const s=a[i],h=a[n];o&&(r=(s-o[i])/3,a[`cp1${i}`]=s-r,a[`cp1${n}`]=h-r*e[c]),l&&(r=(l[i]-s)/3,a[`cp2${i}`]=s+r,a[`cp2${n}`]=h+r*e[c])}}(t,r,e)}function It(t,e,i){return Math.max(Math.min(t,i),e)}function Nt(){return"undefined"!=typeof window&&"undefined"!=typeof document}function Ft(t){let e=t.parentNode;return e&&"[object ShadowRoot]"===e.toString()&&(e=e.host),e}function Bt(t,e,i){let n;return"string"==typeof t?(n=parseInt(t,10),-1!==t.indexOf("%")&&(n=n/100*e.parentNode[i])):n=t,n}const Ht=t=>t.ownerDocument.defaultView.getComputedStyle(t,null);function zt(t,e){return Ht(t).getPropertyValue(e)}const Vt=["top","right","bottom","left"];function $t(t,e,i){const n={};i=i?"-"+i:"";for(let s=0;s<4;s++){const r=Vt[s];n[r]=parseFloat(t[e+"-"+r+i])||0}return n.width=n.left+n.right,n.height=n.top+n.bottom,n}const Wt=t=>Math.round(10*t)/10,Ut=function(){let t=!1;try{const e={get passive(){return t=!0,!1}};Nt()&&(window.addEventListener("test",null,e),window.removeEventListener("test",null,e))}catch(t){}return t}();function qt(t,e,i,n){return{x:t.x+i*(e.x-t.x),y:t.y+i*(e.y-t.y)}}function Yt(t){return"angle"===t?{between:I,compare:j,normalize:R}:{between:F,compare:(t,e)=>t-e,normalize:t=>t}}function Kt({start:t,end:e,count:i,loop:n,style:s}){return{start:t%i,end:e%i,loop:n&&(e-t+1)%i==0,style:s}}function Xt(t,e,i){if(!i)return[t];const{property:n,start:s,end:r}=i,o=e.length,{compare:a,between:l,normalize:c}=Yt(n),{start:h,end:u,loop:d,style:p}=function(t,e,i){const{property:n,start:s,end:r}=i,{between:o,normalize:a}=Yt(n),l=e.length;let c,h,{start:u,end:d,loop:p}=t;if(p){for(u+=l,d+=l,c=0,h=l;c<h&&o(a(e[u%l][n]),s,r);++c)u--,d--;u%=l,d%=l}return d<u&&(d+=l),{start:u,end:d,loop:p,style:t.style}}(t,e,i),f=[];let g,m,b,y=!1,v=null;for(let t=h,i=h;t<=u;++t)m=e[t%o],m.skip||(g=c(m[n]),g!==b&&(y=l(g,s,r),null===v&&(y||l(s,b,g)&&0!==a(s,b))&&(v=0===a(g,s)?t:i),null!==v&&(!y||0===a(r,g)||l(r,b,g))&&(f.push(Kt({start:v,end:t,loop:d,count:o,style:p})),v=null),i=t,b=g));return null!==v&&f.push(Kt({start:v,end:u,loop:d,count:o,style:p})),f}function Jt(t){return{backgroundColor:t.backgroundColor,borderCapStyle:t.borderCapStyle,borderDash:t.borderDash,borderDashOffset:t.borderDashOffset,borderJoinStyle:t.borderJoinStyle,borderWidth:t.borderWidth,borderColor:t.borderColor}}function Gt(t,e){if(!e)return!1;const i=[],n=function(t,e){return Y(e)?(i.includes(e)||i.push(e),i.indexOf(e)):e};return JSON.stringify(t,n)!==JSON.stringify(e,n)}e.HALF_PI=C,e.INFINITY=P,e.PI=w,e.PITAU=S,e.QUARTER_PI=M,e.RAD_PER_DEG=O,e.TAU=k,e.TWO_THIRDS_PI=E,e.Ticks=tt,e._addGrace=function(t,e,i){const{min:n,max:s}=t,r=h(e,(s-n)/2),o=(t,e)=>i&&0===t?0:t+e;return{min:o(n,-Math.abs(r)),max:o(s,r)}},e._alignPixel=function(t,e,i){const n=t.currentDevicePixelRatio,s=0!==i?Math.max(i/2,.5):0;return Math.round((e-s)*n)/n+s},e._alignStartEnd=(t,e,i)=>"start"===t?e:"end"===t?i:(e+i)/2,e._angleBetween=I,e._angleDiff=j,e._arrayUnique=function(t){const e=new Set(t);return e.size===t.length?t:Array.from(e)},e._attachContext=function t(e,i,n,s){const r={_cacheable:!1,_proxy:e,_context:i,_subProxy:n,_stack:new Set,_descriptors:_t(e,s),setContext:i=>t(e,i,n,s),override:r=>t(e.override(r),i,n,s)};return new Proxy(r,{deleteProperty:(t,i)=>(delete t[i],delete e[i],!0),get:(e,i,n)=>kt(e,i,(()=>function(e,i,n){const{_proxy:s,_context:r,_subProxy:l,_descriptors:c}=e;let h=s[i];return x(h)&&c.isScriptable(i)&&(h=function(t,e,i,n){const{_proxy:s,_context:r,_subProxy:o,_stack:a}=i;if(a.has(t))throw new Error("Recursion detected: "+Array.from(a).join("->")+"->"+t);a.add(t);let l=e(r,o||n);return a.delete(t),wt(t,l)&&(l=Ct(s._scopes,s,t,l)),l}(i,h,e,n)),o(h)&&h.length&&(h=function(e,i,n,s){const{_proxy:r,_context:o,_subProxy:l,_descriptors:c}=n;if(void 0!==o.index&&s(e))return i[o.index%i.length];if(a(i[0])){const n=i,s=r._scopes.filter((t=>t!==n));i=[];for(const a of n){const n=Ct(s,r,e,a);i.push(t(n,o,l&&l[e],c))}}return i}(i,h,e,c.isIndexable)),wt(i,h)&&(h=t(h,r,l&&l[i],c)),h}(e,i,n))),getOwnPropertyDescriptor:(t,i)=>t._descriptors.allKeys?Reflect.has(e,i)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(e,i),getPrototypeOf:()=>Reflect.getPrototypeOf(e),has:(t,i)=>Reflect.has(e,i),ownKeys:()=>Reflect.ownKeys(e),set:(t,i,n)=>(e[i]=n,delete t[i],!0)})},e._bezierCurveTo=function(t,e,i,n){if(!e)return t.lineTo(i.x,i.y);t.bezierCurveTo(n?e.cp1x:e.cp2x,n?e.cp1y:e.cp2y,n?i.cp2x:i.cp1x,n?i.cp2y:i.cp1y,i.x,i.y)},e._bezierInterpolation=function(t,e,i,n){const s={x:t.cp2x,y:t.cp2y},r={x:e.cp1x,y:e.cp1y},o=qt(t,s,i),a=qt(s,r,i),l=qt(r,e,i),c=qt(o,a,i),h=qt(a,l,i);return qt(c,h,i)},e._boundSegment=Xt,e._boundSegments=function(t,e){const i=[],n=t.segments;for(let s=0;s<n.length;s++){const r=Xt(n[s],t.points,e);r.length&&i.push(...r)}return i},e._capitalize=_,e._computeSegments=function(t,e){const i=t.points,n=t.options.spanGaps,s=i.length;if(!s)return[];const r=!!t._loop,{start:o,end:a}=function(t,e,i,n){let s=0,r=e-1;if(i&&!n)for(;s<e&&!t[s].skip;)s++;for(;s<e&&t[s].skip;)s++;for(s%=e,i&&(r+=s);r>s&&t[r%e].skip;)r--;return r%=e,{start:s,end:r}}(i,s,r,n);return function(t,e,i,n){return n&&n.setContext&&i?function(t,e,i,n){const s=t._chart.getContext(),r=Jt(t.options),{_datasetIndex:o,options:{spanGaps:a}}=t,l=i.length,c=[];let h=r,u=e[0].start,d=u;function p(t,e,n,s){const r=a?-1:1;if(t!==e){for(t+=l;i[t%l].skip;)t-=r;for(;i[e%l].skip;)e+=r;t%l!=e%l&&(c.push({start:t%l,end:e%l,loop:n,style:s}),h=s,u=e%l)}}for(const t of e){u=a?u:t.start;let e,r=i[u%l];for(d=u+1;d<=t.end;d++){const a=i[d%l];e=Jt(n.setContext(yt(s,{type:"segment",p0:r,p1:a,p0DataIndex:(d-1)%l,p1DataIndex:d%l,datasetIndex:o}))),Gt(e,h)&&p(u,d-1,t.loop,h),r=a,h=e}u<d-1&&p(u,d-1,t.loop,h)}return c}(t,e,i,n):e}(t,!0===n?[{start:o,end:a,loop:r}]:function(t,e,i,n){const s=t.length,r=[];let o,a=e,l=t[e];for(o=e+1;o<=i;++o){const i=t[o%s];i.skip||i.stop?l.skip||(n=!1,r.push({start:e%s,end:(o-1)%s,loop:n}),e=a=i.stop?o:null):(a=o,l.skip&&(e=o)),l=i}return null!==a&&r.push({start:e%s,end:a%s,loop:n}),r}(i,o,a<o?a+s:a,!!t._fullLoop&&0===o&&a===s-1),i,e)},e._createResolver=vt,e._decimalPlaces=function(t){if(!l(t))return;let e=1,i=0;for(;Math.round(t*e)/e!==t;)e*=10,i++;return i},e._deprecated=function(t,e,i,n){void 0!==e&&console.warn(t+': "'+i+'" is deprecated. Please use "'+n+'" instead')},e._descriptors=_t,e._elementsEqual=function(t,e){let i,n,s,r;if(!t||!e||t.length!==e.length)return!1;for(i=0,n=t.length;i<n;++i)if(s=t[i],r=e[i],s.datasetIndex!==r.datasetIndex||s.index!==r.index)return!1;return!0},e._factorize=function(t){const e=[],i=Math.sqrt(t);let n;for(n=1;n<i;n++)t%n==0&&(e.push(n),e.push(t/n));return i===(0|i)&&e.push(i),e.sort(((t,e)=>t-e)).pop(),e},e._filterBetween=function(t,e,i){let n=0,s=t.length;for(;n<s&&t[n]<e;)n++;for(;s>n&&t[s-1]>i;)s--;return n>0||s<t.length?t.slice(n,s):t},e._getParentNode=Ft,e._getStartAndCountOfVisiblePoints=function(t,e,i){const n=e.length;let s=0,o=n;if(t._sorted){const{iScale:a,vScale:l,_parsed:c}=t,h=t.dataset&&t.dataset.options?t.dataset.options.spanGaps:null,u=a.axis,{min:d,max:p,minDefined:f,maxDefined:g}=a.getUserBounds();if(f){if(s=Math.min(H(c,u,d).lo,i?n:H(e,u,a.getPixelForValue(d)).lo),h){const t=c.slice(0,s+1).reverse().findIndex((t=>!r(t[l.axis])));s-=Math.max(0,t)}s=N(s,0,n-1)}if(g){let t=Math.max(H(c,a.axis,p,!0).hi+1,i?0:H(e,u,a.getPixelForValue(p),!0).hi+1);if(h){const e=c.slice(t-1).findIndex((t=>!r(t[l.axis])));t+=Math.max(0,e)}o=N(t,s,n)-s}else o=n-s}return{start:s,count:o}},e._int16Range=function(t){return N(t,-32768,32767)},e._isBetween=F,e._isClickEvent=function(t){return"mouseup"===t.type||"click"===t.type||"contextmenu"===t.type},e._isDomSupported=Nt,e._isPointInArea=ht,e._limitValue=N,e._longestText=function(t,e,i,n){let s=(n=n||{}).data=n.data||{},r=n.garbageCollect=n.garbageCollect||[];n.font!==e&&(s=n.data={},r=n.garbageCollect=[],n.font=e),t.save(),t.font=e;let a=0;const l=i.length;let c,h,u,d,p;for(c=0;c<l;c++)if(d=i[c],null==d||o(d)){if(o(d))for(h=0,u=d.length;h<u;h++)p=d[h],null==p||o(p)||(a=lt(t,s,r,a,p))}else a=lt(t,s,r,a,d);t.restore();const f=r.length/2;if(f>i.length){for(c=0;c<f;c++)delete s[r[c]];r.splice(0,f)}return a},e._lookup=B,e._lookupByKey=H,e._measureText=lt,e._merger=p,e._mergerIf=m,e._normalizeAngle=R,e._parseObjectDataRadialScale=function(t,e,i,n){const{iScale:s}=t,{key:r="r"}=this._parsing,o=new Array(n);let a,l,c,h;for(a=0,l=n;a<l;++a)c=a+i,h=e[c],o[a]={r:s.parse(v(h,r),c)};return o},e._pointInLine=qt,e._readValueToProps=mt,e._rlookupByKey=(t,e,i)=>B(t,i,(n=>t[n][e]>=i)),e._scaleRangesChanged=function(t){const{xScale:e,yScale:i,_scaleRanges:n}=t,s={xmin:e.min,xmax:e.max,ymin:i.min,ymax:i.max};if(!n)return t._scaleRanges=s,!0;const r=n.xmin!==e.min||n.xmax!==e.max||n.ymin!==i.min||n.ymax!==i.max;return Object.assign(n,s),r},e._setMinAndMaxByKey=function(t,e,i){let n,s,r;for(n=0,s=t.length;n<s;n++)r=t[n][i],isNaN(r)||(e.min=Math.min(e.min,r),e.max=Math.max(e.max,r))},e._splitKey=y,e._steppedInterpolation=function(t,e,i,n){return{x:t.x+i*(e.x-t.x),y:"middle"===n?i<.5?t.y:e.y:"after"===n?i<1?t.y:e.y:i>0?e.y:t.y}},e._steppedLineTo=function(t,e,i,n,s){if(!e)return t.lineTo(i.x,i.y);if("middle"===s){const n=(e.x+i.x)/2;t.lineTo(n,e.y),t.lineTo(n,i.y)}else"after"===s!=!!n?t.lineTo(e.x,i.y):t.lineTo(i.x,e.y);t.lineTo(i.x,i.y)},e._textX=(t,e,i,n)=>t===(n?"left":"right")?i:"center"===t?(e+i)/2:e,e._toLeftRightCenter=t=>"start"===t?"left":"end"===t?"right":"center",e._updateBezierControlPoints=function(t,e,i,n,s){let r,o,a,l;if(e.spanGaps&&(t=t.filter((t=>!t.skip))),"monotone"===e.cubicInterpolationMode)Rt(t,s);else{let i=n?t[t.length-1]:t[0];for(r=0,o=t.length;r<o;++r)a=t[r],l=jt(i,a,t[Math.min(r+1,o-(n?0:1))%o],e.tension),a.cp1x=l.previous.x,a.cp1y=l.previous.y,a.cp2x=l.next.x,a.cp2y=l.next.y,i=a}e.capBezierPoints&&function(t,e){let i,n,s,r,o,a=ht(t[0],e);for(i=0,n=t.length;i<n;++i)o=r,r=a,a=i<n-1&&ht(t[i+1],e),r&&(s=t[i],o&&(s.cp1x=It(s.cp1x,e.left,e.right),s.cp1y=It(s.cp1y,e.top,e.bottom)),a&&(s.cp2x=It(s.cp2x,e.left,e.right),s.cp2y=It(s.cp2y,e.top,e.bottom)))}(t,i)},e.addRoundedRectPath=function(t,e){const{x:i,y:n,w:s,h:r,radius:o}=e;t.arc(i+o.topLeft,n+o.topLeft,o.topLeft,1.5*w,w,!0),t.lineTo(i,n+r-o.bottomLeft),t.arc(i+o.bottomLeft,n+r-o.bottomLeft,o.bottomLeft,w,C,!0),t.lineTo(i+s-o.bottomRight,n+r),t.arc(i+s-o.bottomRight,n+r-o.bottomRight,o.bottomRight,C,0,!0),t.lineTo(i+s,n+o.topRight),t.arc(i+s-o.topRight,n+o.topRight,o.topRight,0,-C,!0),t.lineTo(i+o.topLeft,n)},e.almostEquals=D,e.almostWhole=function(t,e){const i=Math.round(t);return i-e<=t&&i+e>=t},e.callback=function(t,e,i){if(t&&"function"==typeof t.call)return t.apply(i,e)},e.clearCanvas=function(t,e){(e||t)&&((e=e||t.getContext("2d")).save(),e.resetTransform(),e.clearRect(0,0,t.width,t.height),e.restore())},e.clipArea=function(t,e){t.save(),t.beginPath(),t.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),t.clip()},e.clone=u,e.color=function(t){return Y(t)?t:new n.Color(t)},e.createContext=yt,e.debounce=function(t,e){let i;return function(...n){return e?(clearTimeout(i),i=setTimeout(t,e,n)):t.apply(this,n),e}},e.defaults=ot,e.defined=t=>void 0!==t,e.descriptors=it,e.distanceBetweenPoints=T,e.drawPoint=function(t,e,i,n){ct(t,e,i,n,null)},e.drawPointLegend=ct,e.each=function(t,e,i,n){let s,r,l;if(o(t))if(r=t.length,n)for(s=r-1;s>=0;s--)e.call(i,t[s],s);else for(s=0;s<r;s++)e.call(i,t[s],s);else if(a(t))for(l=Object.keys(t),r=l.length,s=0;s<r;s++)e.call(i,t[l[s]],l[s])},e.effects=q,e.finiteOrDefault=function(t,e){return l(t)?t:e},e.fontString=function(t,e,i){return e+" "+t+"px "+i},e.formatNumber=Z,e.getAngleFromPoint=function(t,e){const i=e.x-t.x,n=e.y-t.y,s=Math.sqrt(i*i+n*n);let r=Math.atan2(n,i);return r<-.5*w&&(r+=k),{angle:r,distance:s}},e.getHoverColor=K,e.getMaximumSize=function(t,e,i,n){const s=Ht(t),r=$t(s,"margin"),o=Bt(s.maxWidth,t,"clientWidth")||P,a=Bt(s.maxHeight,t,"clientHeight")||P,l=function(t,e,i){let n,s;if(void 0===e||void 0===i){const r=t&&Ft(t);if(r){const t=r.getBoundingClientRect(),o=Ht(r),a=$t(o,"border","width"),l=$t(o,"padding");e=t.width-l.width-a.width,i=t.height-l.height-a.height,n=Bt(o.maxWidth,r,"clientWidth"),s=Bt(o.maxHeight,r,"clientHeight")}else e=t.clientWidth,i=t.clientHeight}return{width:e,height:i,maxWidth:n||P,maxHeight:s||P}}(t,e,i);let{width:c,height:h}=l;if("content-box"===s.boxSizing){const t=$t(s,"border","width"),e=$t(s,"padding");c-=e.width+t.width,h-=e.height+t.height}return c=Math.max(0,c-r.width),h=Math.max(0,n?c/n:h-r.height),c=Wt(Math.min(c,o,l.maxWidth)),h=Wt(Math.min(h,a,l.maxHeight)),c&&!h&&(h=Wt(c/2)),(void 0!==e||void 0!==i)&&n&&l.height&&h>l.height&&(h=l.height,c=Wt(Math.floor(h*n))),{width:c,height:h}},e.getRelativePosition=function(t,e){if("native"in t)return t;const{canvas:i,currentDevicePixelRatio:n}=e,s=Ht(i),r="border-box"===s.boxSizing,o=$t(s,"padding"),a=$t(s,"border","width"),{x:l,y:c,box:h}=function(t,e){const i=t.touches,n=i&&i.length?i[0]:t,{offsetX:s,offsetY:r}=n;let o,a,l=!1;if(((t,e,i)=>(t>0||e>0)&&(!i||!i.shadowRoot))(s,r,t.target))o=s,a=r;else{const t=e.getBoundingClientRect();o=n.clientX-t.left,a=n.clientY-t.top,l=!0}return{x:o,y:a,box:l}}(t,i),u=o.left+(h&&a.left),d=o.top+(h&&a.top);let{width:p,height:f}=e;return r&&(p-=o.width+a.width,f-=o.height+a.height),{x:Math.round((l-u)/p*i.width/n),y:Math.round((c-d)/f*i.height/n)}},e.getRtlAdapter=function(t,e,i){return t?function(t,e){return{x:i=>t+t+e-i,setWidth(t){e=t},textAlign:t=>"center"===t?t:"right"===t?"left":"right",xPlus:(t,e)=>t-e,leftForLtr:(t,e)=>t-e}}(e,i):{x:t=>t,setWidth(t){},textAlign:t=>t,xPlus:(t,e)=>t+e,leftForLtr:(t,e)=>t}},e.getStyle=zt,e.isArray=o,e.isFunction=x,e.isNullOrUndef=r,e.isNumber=function(t){return!function(t){return"symbol"==typeof t||"object"==typeof t&&null!==t&&!(Symbol.toPrimitive in t||"toString"in t||"valueOf"in t)}(t)&&!isNaN(parseFloat(t))&&isFinite(t)},e.isNumberFinite=l,e.isObject=a,e.isPatternOrGradient=Y,e.listenArrayEvents=function(t,e){t._chartjs?t._chartjs.listeners.push(e):(Object.defineProperty(t,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[e]}}),z.forEach((e=>{const i="_onData"+_(e),n=t[e];Object.defineProperty(t,e,{configurable:!0,enumerable:!1,value(...e){const s=n.apply(this,e);return t._chartjs.listeners.forEach((t=>{"function"==typeof t[i]&&t[i](...e)})),s}})})))},e.log10=A,e.merge=f,e.mergeIf=g,e.niceNum=function(t){const e=Math.round(t);t=D(t,e,t/1e3)?e:t;const i=Math.pow(10,Math.floor(A(t))),n=t/i;return(n<=1?1:n<=2?2:n<=5?5:10)*i},e.noop=function(){},e.overrideTextDirection=function(t,e){let i,n;"ltr"!==e&&"rtl"!==e||(i=t.canvas.style,n=[i.getPropertyValue("direction"),i.getPropertyPriority("direction")],i.setProperty("direction",e,"important"),t.prevTextDirection=n)},e.overrides=et,e.readUsedSize=function(t,e){const i=zt(t,e),n=i&&i.match(/^(\d+)(\.\d+)?px$/);return n?+n[1]:void 0},e.renderText=function(t,e,i,n,s,a={}){const l=o(e)?e:[e],c=a.strokeWidth>0&&""!==a.strokeColor;let h,u;for(t.save(),t.font=s.string,function(t,e){e.translation&&t.translate(e.translation[0],e.translation[1]),r(e.rotation)||t.rotate(e.rotation),e.color&&(t.fillStyle=e.color),e.textAlign&&(t.textAlign=e.textAlign),e.textBaseline&&(t.textBaseline=e.textBaseline)}(t,a),h=0;h<l.length;++h)u=l[h],a.backdrop&&dt(t,a.backdrop),c&&(a.strokeColor&&(t.strokeStyle=a.strokeColor),r(a.strokeWidth)||(t.lineWidth=a.strokeWidth),t.strokeText(u,i,n,a.maxWidth)),t.fillText(u,i,n,a.maxWidth),ut(t,i,n,u,a),n+=Number(s.lineHeight);t.restore()},e.requestAnimFrame=V,e.resolve=function(t,e,i,n){let s,r,a,l=!0;for(s=0,r=t.length;s<r;++s)if(a=t[s],void 0!==a&&(void 0!==e&&"function"==typeof a&&(a=a(e),l=!1),void 0!==i&&o(a)&&(a=a[i%a.length],l=!1),void 0!==a))return n&&!l&&(n.cacheable=!1),a},e.resolveObjectKey=v,e.restoreTextDirection=function(t,e){void 0!==e&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))},e.retinaScale=function(t,e,i){const n=e||1,s=Math.floor(t.height*n),r=Math.floor(t.width*n);t.height=Math.floor(t.height),t.width=Math.floor(t.width);const o=t.canvas;return o.style&&(i||!o.style.height&&!o.style.width)&&(o.style.height=`${t.height}px`,o.style.width=`${t.width}px`),(t.currentDevicePixelRatio!==n||o.height!==s||o.width!==r)&&(t.currentDevicePixelRatio=n,o.height=s,o.width=r,t.ctx.setTransform(n,0,0,n,0,0),!0)},e.setsEqual=(t,e)=>{if(t.size!==e.size)return!1;for(const i of t)if(!e.has(i))return!1;return!0},e.sign=L,e.splineCurve=jt,e.splineCurveMonotone=Rt,e.supportsEventListenerOptions=Ut,e.throttled=function(t,e){let i=[],n=!1;return function(...s){i=s,n||(n=!0,V.call(window,(()=>{n=!1,t.apply(e,i)})))}},e.toDegrees=function(t){return t*(180/w)},e.toDimension=h,e.toFont=function(t,e){t=t||{},e=e||ot.font;let i=c(t.size,e.size);"string"==typeof i&&(i=parseInt(i,10));let n=c(t.style,e.style);n&&!(""+n).match(ft)&&(console.warn('Invalid font style specified: "'+n+'"'),n=void 0);const s={family:c(t.family,e.family),lineHeight:gt(c(t.lineHeight,e.lineHeight),i),size:i,style:n,weight:c(t.weight,e.weight),string:""};return s.string=at(s),s},e.toFontString=at,e.toLineHeight=gt,e.toPadding=function(t){const e=bt(t);return e.width=e.left+e.right,e.height=e.top+e.bottom,e},e.toPercentage=(t,e)=>"string"==typeof t&&t.endsWith("%")?parseFloat(t)/100:+t/e,e.toRadians=function(t){return t*(w/180)},e.toTRBL=bt,e.toTRBLCorners=function(t){return mt(t,["topLeft","topRight","bottomLeft","bottomRight"])},e.uid=s,e.unclipArea=function(t){t.restore()},e.unlistenArrayEvents=function(t,e){const i=t._chartjs;if(!i)return;const n=i.listeners,s=n.indexOf(e);-1!==s&&n.splice(s,1),n.length>0||(z.forEach((e=>{delete t[e]})),delete t._chartjs)},e.valueOrDefault=c},9931:(t,e,i)=>{var n=i(1769),s=i(8090),r=i(3731),o=i(7797);t.exports=function(t,e){return e=n(e,t),null==(t=r(t,e))||delete t[o(s(e))]}},9951:(t,e)=>{"use strict";function i(t,e=i.BASE){const n=t.length;for(let i=0;i<n;i++)e^=t.charCodeAt(i),e+=(e<<1)+(e<<4)+(e<<7)+(e<<8)+(e<<24);return e>>>0}Object.defineProperty(e,"__esModule",{value:!0}),i.BASE=2166136261,e.default=i,t.exports=i}},e={};function i(n){var s=e[n];if(void 0!==s)return s.exports;var r=e[n]={id:n,loaded:!1,exports:{}};return t[n].call(r.exports,r,r.exports,i),r.loaded=!0,r.exports}i.d=(t,e)=>{for(var n in e)i.o(e,n)&&!i.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),i.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),i.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.nmd=t=>(t.paths=[],t.children||(t.children=[]),t),i(8955)})();