!function(){var t={906:function(t){t.exports=function(t,n,i){var r=!1;return i=i||e,a.count=t,0===t?n():a;function a(t,e){if(a.count<=0)throw Error("after called too many times");--a.count,t?(r=!0,n(t),n=i):0===a.count&&!r&&n(null,e)}};function e(){}},718:function(t){t.exports=function(t,e,n){var i=t.byteLength;if(e=e||0,n=n||i,t.slice)return t.slice(e,n);if(e<0&&(e+=i),n<0&&(n+=i),n>i&&(n=i),e>=i||e>=n||0===i)return new ArrayBuffer(0);for(var r=new Uint8Array(t),a=new Uint8Array(n-e),o=e,s=0;o<n;o++,s++)a[s]=r[o];return a.buffer}},10:function(t){function e(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}t.exports=e,e.prototype.duration=function(){var t=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var e=Math.random(),n=Math.floor(e*this.jitter*t);t=(1&Math.floor(10*e))==0?t-n:t+n}return 0|Math.min(t,this.max)},e.prototype.reset=function(){this.attempts=0},e.prototype.setMin=function(t){this.ms=t},e.prototype.setMax=function(t){this.max=t},e.prototype.setJitter=function(t){this.jitter=t}},704:function(t,e){var n;n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",e.encode=function(t){var e,i=new Uint8Array(t),r=i.length,a="";for(e=0;e<r;e+=3)a+=n[i[e]>>2],a+=n[(3&i[e])<<4|i[e+1]>>4],a+=n[(15&i[e+1])<<2|i[e+2]>>6],a+=n[63&i[e+2]];return r%3==2?a=a.substring(0,a.length-1)+"=":r%3==1&&(a=a.substring(0,a.length-2)+"=="),a},e.decode=function(t){var e,i,r,a,o,s=.75*t.length,l=t.length,c=0;"="===t[t.length-1]&&(s--,"="===t[t.length-2]&&s--);var u=new ArrayBuffer(s),h=new Uint8Array(u);for(e=0;e<l;e+=4)i=n.indexOf(t[e]),r=n.indexOf(t[e+1]),a=n.indexOf(t[e+2]),o=n.indexOf(t[e+3]),h[c++]=i<<2|r>>4,h[c++]=(15&r)<<4|a>>2,h[c++]=(3&a)<<6|63&o;return u}},548:function(t){var e=void 0!==e?e:"undefined"!=typeof WebKitBlobBuilder?WebKitBlobBuilder:"undefined"!=typeof MSBlobBuilder?MSBlobBuilder:"undefined"!=typeof MozBlobBuilder&&MozBlobBuilder,n=function(){try{var t=new Blob(["hi"]);return 2===t.size}catch(t){return!1}}(),i=n&&function(){try{var t=new Blob([new Uint8Array([1,2])]);return 2===t.size}catch(t){return!1}}(),r=e&&e.prototype.append&&e.prototype.getBlob;function a(t){return t.map(function(t){if(t.buffer instanceof ArrayBuffer){var e=t.buffer;if(t.byteLength!==e.byteLength){var n=new Uint8Array(t.byteLength);n.set(new Uint8Array(e,t.byteOffset,t.byteLength)),e=n.buffer}return e}return t})}function o(t,n){n=n||{};var i=new e;return a(t).forEach(function(t){i.append(t)}),n.type?i.getBlob(n.type):i.getBlob()}function s(t,e){return new Blob(a(t),e||{})}"undefined"!=typeof Blob&&(o.prototype=Blob.prototype,s.prototype=Blob.prototype),t.exports=n?i?Blob:s:r?o:void 0},77:function(t){var e=[].slice;t.exports=function(t,n){if("string"==typeof n&&(n=t[n]),"function"!=typeof n)throw Error("bind() requires a function");var i=e.call(arguments,2);return function(){return n.apply(t,i.concat(e.call(arguments)))}}},767:function(t){function e(t){if(t)return function(t){for(var n in e.prototype)t[n]=e.prototype[n];return t}(t)}t.exports=e;e.prototype.on=e.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this},e.prototype.once=function(t,e){function n(){this.off(t,n),e.apply(this,arguments)}return n.fn=e,this.on(t,n),this},e.prototype.off=e.prototype.removeListener=e.prototype.removeAllListeners=e.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n,i=this._callbacks["$"+t];if(!i)return this;if(1==arguments.length)return delete this._callbacks["$"+t],this;for(var r=0;r<i.length;r++)if((n=i[r])===e||n.fn===e){i.splice(r,1);break}return 0===i.length&&delete this._callbacks["$"+t],this},e.prototype.emit=function(t){this._callbacks=this._callbacks||{};for(var e=Array(arguments.length-1),n=this._callbacks["$"+t],i=1;i<arguments.length;i++)e[i-1]=arguments[i];if(n){n=n.slice(0);for(var i=0,r=n.length;i<r;++i)n[i].apply(this,e)}return this},e.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]},e.prototype.hasListeners=function(t){return!!this.listeners(t).length}},861:function(t){t.exports=function(t,e){var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t}},549:function(t){t.exports="undefined"!=typeof self?self:"undefined"!=typeof window?window:Function("return this")()},983:function(t,e,n){t.exports=n(192),t.exports.parser=n(345)},192:function(t,e,n){var i=n(352),r=n(767),a=n(802)("engine.io-client:socket"),o=n(355),s=n(345),l=n(187),c=n(830);function u(t,e){if(!(this instanceof u))return new u(t,e);e=e||{},t&&"object"==typeof t&&(e=t,t=null),t?(t=l(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=l(e.host).host),this.secure=null!=e.secure?e.secure:"undefined"!=typeof location&&"https:"===location.protocol,e.hostname&&!e.port&&(e.port=this.secure?"443":"80"),this.agent=e.agent||!1,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.query=e.query||{},"string"==typeof this.query&&(this.query=c.decode(this.query)),this.upgrade=!1!==e.upgrade,this.path=(e.path||"/engine.io").replace(/\/$/,"")+"/",this.forceJSONP=!!e.forceJSONP,this.jsonp=!1!==e.jsonp,this.forceBase64=!!e.forceBase64,this.enablesXDR=!!e.enablesXDR,this.withCredentials=!1!==e.withCredentials,this.timestampParam=e.timestampParam||"t",this.timestampRequests=e.timestampRequests,this.transports=e.transports||["polling","websocket"],this.transportOptions=e.transportOptions||{},this.readyState="",this.writeBuffer=[],this.prevBufferLen=0,this.policyPort=e.policyPort||843,this.rememberUpgrade=e.rememberUpgrade||!1,this.binaryType=null,this.onlyBinaryUpgrades=e.onlyBinaryUpgrades,this.perMessageDeflate=!1!==e.perMessageDeflate&&(e.perMessageDeflate||{}),!0===this.perMessageDeflate&&(this.perMessageDeflate={}),this.perMessageDeflate&&null==this.perMessageDeflate.threshold&&(this.perMessageDeflate.threshold=1024),this.pfx=e.pfx||void 0,this.key=e.key||void 0,this.passphrase=e.passphrase||void 0,this.cert=e.cert||void 0,this.ca=e.ca||void 0,this.ciphers=e.ciphers||void 0,this.rejectUnauthorized=void 0===e.rejectUnauthorized||e.rejectUnauthorized,this.forceNode=!!e.forceNode,this.isReactNative="undefined"!=typeof navigator&&"string"==typeof navigator.product&&"reactnative"===navigator.product.toLowerCase(),("undefined"==typeof self||this.isReactNative)&&(e.extraHeaders&&Object.keys(e.extraHeaders).length>0&&(this.extraHeaders=e.extraHeaders),e.localAddress&&(this.localAddress=e.localAddress)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingIntervalTimer=null,this.pingTimeoutTimer=null,this.open()}t.exports=u,u.priorWebsocketSuccess=!1,r(u.prototype),u.protocol=s.protocol,u.Socket=u,u.Transport=n(496),u.transports=n(352),u.parser=n(345),u.prototype.createTransport=function(t){a('creating transport "%s"',t);var e=function(t){var e={};for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}(this.query);e.EIO=s.protocol,e.transport=t;var n=this.transportOptions[t]||{};return this.id&&(e.sid=this.id),new i[t]({query:e,socket:this,agent:n.agent||this.agent,hostname:n.hostname||this.hostname,port:n.port||this.port,secure:n.secure||this.secure,path:n.path||this.path,forceJSONP:n.forceJSONP||this.forceJSONP,jsonp:n.jsonp||this.jsonp,forceBase64:n.forceBase64||this.forceBase64,enablesXDR:n.enablesXDR||this.enablesXDR,withCredentials:n.withCredentials||this.withCredentials,timestampRequests:n.timestampRequests||this.timestampRequests,timestampParam:n.timestampParam||this.timestampParam,policyPort:n.policyPort||this.policyPort,pfx:n.pfx||this.pfx,key:n.key||this.key,passphrase:n.passphrase||this.passphrase,cert:n.cert||this.cert,ca:n.ca||this.ca,ciphers:n.ciphers||this.ciphers,rejectUnauthorized:n.rejectUnauthorized||this.rejectUnauthorized,perMessageDeflate:n.perMessageDeflate||this.perMessageDeflate,extraHeaders:n.extraHeaders||this.extraHeaders,forceNode:n.forceNode||this.forceNode,localAddress:n.localAddress||this.localAddress,requestTimeout:n.requestTimeout||this.requestTimeout,protocols:n.protocols||void 0,isReactNative:this.isReactNative})};u.prototype.open=function(){var t;if(this.rememberUpgrade&&u.priorWebsocketSuccess&&-1!==this.transports.indexOf("websocket"))t="websocket";else if(0===this.transports.length){var e=this;setTimeout(function(){e.emit("error","No transports available")},0);return}else t=this.transports[0];this.readyState="opening";try{t=this.createTransport(t)}catch(t){this.transports.shift(),this.open();return}t.open(),this.setTransport(t)},u.prototype.setTransport=function(t){a("setting transport %s",t.name);var e=this;this.transport&&(a("clearing existing transport %s",this.transport.name),this.transport.removeAllListeners()),this.transport=t,t.on("drain",function(){e.onDrain()}).on("packet",function(t){e.onPacket(t)}).on("error",function(t){e.onError(t)}).on("close",function(){e.onClose("transport close")})},u.prototype.probe=function(t){a('probing transport "%s"',t);var e=this.createTransport(t,{probe:1}),n=!1,i=this;function r(){if(i.onlyBinaryUpgrades){var r=!this.supportsBinary&&i.transport.supportsBinary;n=n||r}!n&&(a('probe transport "%s" opened',t),e.send([{type:"ping",data:"probe"}]),e.once("packet",function(r){if(!n){if("pong"===r.type&&"probe"===r.data){if(a('probe transport "%s" pong',t),i.upgrading=!0,i.emit("upgrading",e),!!e)u.priorWebsocketSuccess="websocket"===e.name,a('pausing current transport "%s"',i.transport.name),i.transport.pause(function(){if(!n)"closed"!==i.readyState&&(a("changing transport and sending upgrade packet"),d(),i.setTransport(e),e.send([{type:"upgrade"}]),i.emit("upgrade",e),e=null,i.upgrading=!1,i.flush())})}else{a('probe transport "%s" failed',t);var o=Error("probe error");o.transport=e.name,i.emit("upgradeError",o)}}}))}function o(){!n&&(n=!0,d(),e.close(),e=null)}function s(n){var r=Error("probe error: "+n);r.transport=e.name,o(),a('probe transport "%s" failed because of error: %s',t,n),i.emit("upgradeError",r)}function l(){s("transport closed")}function c(){s("socket closed")}function h(t){e&&t.name!==e.name&&(a('"%s" works - aborting "%s"',t.name,e.name),o())}function d(){e.removeListener("open",r),e.removeListener("error",s),e.removeListener("close",l),i.removeListener("close",c),i.removeListener("upgrading",h)}u.priorWebsocketSuccess=!1,e.once("open",r),e.once("error",s),e.once("close",l),this.once("close",c),this.once("upgrading",h),e.open()},u.prototype.onOpen=function(){if(a("socket open"),this.readyState="open",u.priorWebsocketSuccess="websocket"===this.transport.name,this.emit("open"),this.flush(),"open"===this.readyState&&this.upgrade&&this.transport.pause){a("starting upgrade probes");for(var t=0,e=this.upgrades.length;t<e;t++)this.probe(this.upgrades[t])}},u.prototype.onPacket=function(t){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState)switch(a('socket receive: type "%s", data "%s"',t.type,t.data),this.emit("packet",t),this.emit("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"pong":this.setPing(),this.emit("pong");break;case"error":var e=Error("server error");e.code=t.data,this.onError(e);break;case"message":this.emit("data",t.data),this.emit("message",t.data)}else a('packet received with socket readyState "%s"',this.readyState)},u.prototype.onHandshake=function(t){this.emit("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.onOpen(),"closed"!==this.readyState&&(this.setPing(),this.removeListener("heartbeat",this.onHeartbeat),this.on("heartbeat",this.onHeartbeat))},u.prototype.onHeartbeat=function(t){clearTimeout(this.pingTimeoutTimer);var e=this;e.pingTimeoutTimer=setTimeout(function(){"closed"!==e.readyState&&e.onClose("ping timeout")},t||e.pingInterval+e.pingTimeout)},u.prototype.setPing=function(){var t=this;clearTimeout(t.pingIntervalTimer),t.pingIntervalTimer=setTimeout(function(){a("writing ping packet - expecting pong within %sms",t.pingTimeout),t.ping(),t.onHeartbeat(t.pingTimeout)},t.pingInterval)},u.prototype.ping=function(){var t=this;this.sendPacket("ping",function(){t.emit("ping")})},u.prototype.onDrain=function(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,0===this.writeBuffer.length?this.emit("drain"):this.flush()},u.prototype.flush=function(){"closed"!==this.readyState&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length&&(a("flushing %d packets in socket",this.writeBuffer.length),this.transport.send(this.writeBuffer),this.prevBufferLen=this.writeBuffer.length,this.emit("flush"))},u.prototype.write=u.prototype.send=function(t,e,n){return this.sendPacket("message",t,e,n),this},u.prototype.sendPacket=function(t,e,n,i){if("function"==typeof e&&(i=e,e=void 0),"function"==typeof n&&(i=n,n=null),"closing"!==this.readyState&&"closed"!==this.readyState){(n=n||{}).compress=!1!==n.compress;var r={type:t,data:e,options:n};this.emit("packetCreate",r),this.writeBuffer.push(r),i&&this.once("flush",i),this.flush()}},u.prototype.close=function(){if("opening"===this.readyState||"open"===this.readyState){this.readyState="closing";var t=this;this.writeBuffer.length?this.once("drain",function(){this.upgrading?i():e()}):this.upgrading?i():e()}function e(){t.onClose("forced close"),a("socket closing - telling transport to close"),t.transport.close()}function n(){t.removeListener("upgrade",n),t.removeListener("upgradeError",n),e()}function i(){t.once("upgrade",n),t.once("upgradeError",n)}return this},u.prototype.onError=function(t){a("socket error %j",t),u.priorWebsocketSuccess=!1,this.emit("error",t),this.onClose("transport error",t)},u.prototype.onClose=function(t,e){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState){a('socket close with reason: "%s"',t);clearTimeout(this.pingIntervalTimer),clearTimeout(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),this.readyState="closed",this.id=null,this.emit("close",t,e),this.writeBuffer=[],this.prevBufferLen=0}},u.prototype.filterUpgrades=function(t){for(var e=[],n=0,i=t.length;n<i;n++)~o(this.transports,t[n])&&e.push(t[n]);return e}},496:function(t,e,n){var i=n(345),r=n(767);function a(t){this.path=t.path,this.hostname=t.hostname,this.port=t.port,this.secure=t.secure,this.query=t.query,this.timestampParam=t.timestampParam,this.timestampRequests=t.timestampRequests,this.readyState="",this.agent=t.agent||!1,this.socket=t.socket,this.enablesXDR=t.enablesXDR,this.withCredentials=t.withCredentials,this.pfx=t.pfx,this.key=t.key,this.passphrase=t.passphrase,this.cert=t.cert,this.ca=t.ca,this.ciphers=t.ciphers,this.rejectUnauthorized=t.rejectUnauthorized,this.forceNode=t.forceNode,this.isReactNative=t.isReactNative,this.extraHeaders=t.extraHeaders,this.localAddress=t.localAddress}t.exports=a,r(a.prototype),a.prototype.onError=function(t,e){var n=Error(t);return n.type="TransportError",n.description=e,this.emit("error",n),this},a.prototype.open=function(){return("closed"===this.readyState||""===this.readyState)&&(this.readyState="opening",this.doOpen()),this},a.prototype.close=function(){return("opening"===this.readyState||"open"===this.readyState)&&(this.doClose(),this.onClose()),this},a.prototype.send=function(t){if("open"===this.readyState)this.write(t);else throw Error("Transport not open")},a.prototype.onOpen=function(){this.readyState="open",this.writable=!0,this.emit("open")},a.prototype.onData=function(t){var e=i.decodePacket(t,this.socket.binaryType);this.onPacket(e)},a.prototype.onPacket=function(t){this.emit("packet",t)},a.prototype.onClose=function(){this.readyState="closed",this.emit("close")}},352:function(t,e,n){var i=n(199),r=n(416),a=n(785),o=n(442);e.polling=function(t){var e=!1,n=!1,o=!1!==t.jsonp;if("undefined"!=typeof location){var s="https:"===location.protocol,l=location.port;!l&&(l=s?443:80),e=t.hostname!==location.hostname||l!==t.port,n=t.secure!==s}if(t.xdomain=e,t.xscheme=n,"open"in new i(t)&&!t.forceJSONP)return new r(t);if(!o)throw Error("JSONP disabled");return new a(t)},e.websocket=o},785:function(t,e,n){var i,r=n(15),a=n(861),o=n(549);t.exports=u;var s=/\n/g,l=/\\n/g;function c(){}function u(t){r.call(this,t),this.query=this.query||{},!i&&(i=o.___eio=o.___eio||[]),this.index=i.length;var e=this;i.push(function(t){e.onData(t)}),this.query.j=this.index,"function"==typeof addEventListener&&addEventListener("beforeunload",function(){e.script&&(e.script.onerror=c)},!1)}a(u,r),u.prototype.supportsBinary=!1,u.prototype.doClose=function(){this.script&&(this.script.parentNode.removeChild(this.script),this.script=null),this.form&&(this.form.parentNode.removeChild(this.form),this.form=null,this.iframe=null),r.prototype.doClose.call(this)},u.prototype.doPoll=function(){var t=this,e=document.createElement("script");this.script&&(this.script.parentNode.removeChild(this.script),this.script=null),e.async=!0,e.src=this.uri(),e.onerror=function(e){t.onError("jsonp poll error",e)};var n=document.getElementsByTagName("script")[0];n?n.parentNode.insertBefore(e,n):(document.head||document.body).appendChild(e),this.script=e,"undefined"!=typeof navigator&&/gecko/i.test(navigator.userAgent)&&setTimeout(function(){var t=document.createElement("iframe");document.body.appendChild(t),document.body.removeChild(t)},100)},u.prototype.doWrite=function(t,e){var n=this;if(!this.form){var i,r=document.createElement("form"),a=document.createElement("textarea"),o=this.iframeId="eio_iframe_"+this.index;r.className="socketio",r.style.position="absolute",r.style.top="-1000px",r.style.left="-1000px",r.target=o,r.method="POST",r.setAttribute("accept-charset","utf-8"),a.name="d",r.appendChild(a),document.body.appendChild(r),this.form=r,this.area=a}function c(){u(),e()}function u(){if(n.iframe)try{n.form.removeChild(n.iframe)}catch(t){n.onError("jsonp polling iframe removal error",t)}try{var t='<iframe src="javascript:0" name="'+n.iframeId+'">';i=document.createElement(t)}catch(t){(i=document.createElement("iframe")).name=n.iframeId,i.src="javascript:0"}i.id=n.iframeId,n.form.appendChild(i),n.iframe=i}this.form.action=this.uri(),u(),t=t.replace(l,"\\\n"),this.area.value=t.replace(s,"\\n");try{this.form.submit()}catch(t){}this.iframe.attachEvent?this.iframe.onreadystatechange=function(){"complete"===n.iframe.readyState&&c()}:this.iframe.onload=c}},416:function(t,e,n){var i=n(199),r=n(15),a=n(767),o=n(861),s=n(802)("engine.io-client:polling-xhr"),l=n(549);function c(){}function u(t){if(r.call(this,t),this.requestTimeout=t.requestTimeout,this.extraHeaders=t.extraHeaders,"undefined"!=typeof location){var e="https:"===location.protocol,n=location.port;!n&&(n=e?443:80),this.xd="undefined"!=typeof location&&t.hostname!==location.hostname||n!==t.port,this.xs=t.secure!==e}}function h(t){this.method=t.method||"GET",this.uri=t.uri,this.xd=!!t.xd,this.xs=!!t.xs,this.async=!1!==t.async,this.data=void 0!==t.data?t.data:null,this.agent=t.agent,this.isBinary=t.isBinary,this.supportsBinary=t.supportsBinary,this.enablesXDR=t.enablesXDR,this.withCredentials=t.withCredentials,this.requestTimeout=t.requestTimeout,this.pfx=t.pfx,this.key=t.key,this.passphrase=t.passphrase,this.cert=t.cert,this.ca=t.ca,this.ciphers=t.ciphers,this.rejectUnauthorized=t.rejectUnauthorized,this.extraHeaders=t.extraHeaders,this.create()}function d(){for(var t in h.requests)h.requests.hasOwnProperty(t)&&h.requests[t].abort()}t.exports=u,t.exports.Request=h,o(u,r),u.prototype.supportsBinary=!0,u.prototype.request=function(t){return(t=t||{}).uri=this.uri(),t.xd=this.xd,t.xs=this.xs,t.agent=this.agent||!1,t.supportsBinary=this.supportsBinary,t.enablesXDR=this.enablesXDR,t.withCredentials=this.withCredentials,t.pfx=this.pfx,t.key=this.key,t.passphrase=this.passphrase,t.cert=this.cert,t.ca=this.ca,t.ciphers=this.ciphers,t.rejectUnauthorized=this.rejectUnauthorized,t.requestTimeout=this.requestTimeout,t.extraHeaders=this.extraHeaders,new h(t)},u.prototype.doWrite=function(t,e){var n=this.request({method:"POST",data:t,isBinary:"string"!=typeof t&&void 0!==t}),i=this;n.on("success",e),n.on("error",function(t){i.onError("xhr post error",t)}),this.sendXhr=n},u.prototype.doPoll=function(){s("xhr poll");var t=this.request(),e=this;t.on("data",function(t){e.onData(t)}),t.on("error",function(t){e.onError("xhr poll error",t)}),this.pollXhr=t},a(h.prototype),h.prototype.create=function(){var t={agent:this.agent,xdomain:this.xd,xscheme:this.xs,enablesXDR:this.enablesXDR};t.pfx=this.pfx,t.key=this.key,t.passphrase=this.passphrase,t.cert=this.cert,t.ca=this.ca,t.ciphers=this.ciphers,t.rejectUnauthorized=this.rejectUnauthorized;var e=this.xhr=new i(t),n=this;try{s("xhr open %s: %s",this.method,this.uri),e.open(this.method,this.uri,this.async);try{if(this.extraHeaders)for(var r in e.setDisableHeaderCheck&&e.setDisableHeaderCheck(!0),this.extraHeaders)this.extraHeaders.hasOwnProperty(r)&&e.setRequestHeader(r,this.extraHeaders[r])}catch(t){}if("POST"===this.method)try{this.isBinary?e.setRequestHeader("Content-type","application/octet-stream"):e.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(t){}try{e.setRequestHeader("Accept","*/*")}catch(t){}"withCredentials"in e&&(e.withCredentials=this.withCredentials),this.requestTimeout&&(e.timeout=this.requestTimeout),this.hasXDR()?(e.onload=function(){n.onLoad()},e.onerror=function(){n.onError(e.responseText)}):e.onreadystatechange=function(){if(2===e.readyState)try{var t=e.getResponseHeader("Content-Type");(n.supportsBinary&&"application/octet-stream"===t||"application/octet-stream; charset=UTF-8"===t)&&(e.responseType="arraybuffer")}catch(t){}4===e.readyState&&(200===e.status||1223===e.status?n.onLoad():setTimeout(function(){n.onError("number"==typeof e.status?e.status:0)},0))},s("xhr data %s",this.data),e.send(this.data)}catch(t){setTimeout(function(){n.onError(t)},0);return}"undefined"!=typeof document&&(this.index=h.requestsCount++,h.requests[this.index]=this)},h.prototype.onSuccess=function(){this.emit("success"),this.cleanup()},h.prototype.onData=function(t){this.emit("data",t),this.onSuccess()},h.prototype.onError=function(t){this.emit("error",t),this.cleanup(!0)},h.prototype.cleanup=function(t){if(void 0!==this.xhr&&null!==this.xhr){if(this.hasXDR()?this.xhr.onload=this.xhr.onerror=c:this.xhr.onreadystatechange=c,t)try{this.xhr.abort()}catch(t){}"undefined"!=typeof document&&delete h.requests[this.index],this.xhr=null}},h.prototype.onLoad=function(){var t,e;try{try{e=this.xhr.getResponseHeader("Content-Type")}catch(t){}t=("application/octet-stream"===e||"application/octet-stream; charset=UTF-8"===e)&&this.xhr.response||this.xhr.responseText}catch(t){this.onError(t)}null!=t&&this.onData(t)},h.prototype.hasXDR=function(){return"undefined"!=typeof XDomainRequest&&!this.xs&&this.enablesXDR},h.prototype.abort=function(){this.cleanup()},h.requestsCount=0,h.requests={},"undefined"!=typeof document&&("function"==typeof attachEvent?attachEvent("onunload",d):"function"==typeof addEventListener&&addEventListener("onpagehide"in l?"pagehide":"unload",d,!1))},15:function(t,e,n){var i=n(496),r=n(830),a=n(345),o=n(861),s=n(281),l=n(802)("engine.io-client:polling");t.exports=u;var c=null!=new(n(199))({xdomain:!1}).responseType;function u(t){var e=t&&t.forceBase64;(!c||e)&&(this.supportsBinary=!1),i.call(this,t)}o(u,i),u.prototype.name="polling",u.prototype.doOpen=function(){this.poll()},u.prototype.pause=function(t){var e=this;function n(){l("paused"),e.readyState="paused",t()}if(this.readyState="pausing",this.polling||!this.writable){var i=0;this.polling&&(l("we are currently polling - waiting to pause"),i++,this.once("pollComplete",function(){l("pre-pause polling complete"),--i||n()})),!this.writable&&(l("we are currently writing - waiting to pause"),i++,this.once("drain",function(){l("pre-pause writing complete"),--i||n()}))}else n()},u.prototype.poll=function(){l("polling"),this.polling=!0,this.doPoll(),this.emit("poll")},u.prototype.onData=function(t){var e=this;l("polling got data %s",t);a.decodePayload(t,this.socket.binaryType,function(t,n,i){if("opening"===e.readyState&&"open"===t.type&&e.onOpen(),"close"===t.type)return e.onClose(),!1;e.onPacket(t)}),"closed"!==this.readyState&&(this.polling=!1,this.emit("pollComplete"),"open"===this.readyState?this.poll():l('ignoring poll - transport state "%s"',this.readyState))},u.prototype.doClose=function(){var t=this;function e(){l("writing close packet"),t.write([{type:"close"}])}"open"===this.readyState?(l("transport open - closing"),e()):(l("transport not open - deferring close"),this.once("open",e))},u.prototype.write=function(t){var e=this;this.writable=!1;var n=function(){e.writable=!0,e.emit("drain")};a.encodePayload(t,this.supportsBinary,function(t){e.doWrite(t,n)})},u.prototype.uri=function(){var t=this.query||{},e=this.secure?"https":"http",n="";return!1!==this.timestampRequests&&(t[this.timestampParam]=s()),!this.supportsBinary&&!t.sid&&(t.b64=1),t=r.encode(t),this.port&&("https"===e&&443!==Number(this.port)||"http"===e&&80!==Number(this.port))&&(n=":"+this.port),t.length&&(t="?"+t),e+"://"+(-1!==this.hostname.indexOf(":")?"["+this.hostname+"]":this.hostname)+n+this.path+t}},442:function(t,e,n){var i,r,a=n(496),o=n(345),s=n(830),l=n(861),c=n(281),u=n(802)("engine.io-client:websocket");if("undefined"!=typeof WebSocket?i=WebSocket:"undefined"!=typeof self&&(i=self.WebSocket||self.MozWebSocket),"undefined"==typeof window)try{r=n(969)}catch(t){}var h=i||r;function d(t){t&&t.forceBase64&&(this.supportsBinary=!1),this.perMessageDeflate=t.perMessageDeflate,this.usingBrowserWebSocket=i&&!t.forceNode,this.protocols=t.protocols,!this.usingBrowserWebSocket&&(h=r),a.call(this,t)}t.exports=d,l(d,a),d.prototype.name="websocket",d.prototype.supportsBinary=!0,d.prototype.doOpen=function(){if(!!this.check()){var t=this.uri(),e=this.protocols,n={};!this.isReactNative&&(n.agent=this.agent,n.perMessageDeflate=this.perMessageDeflate,n.pfx=this.pfx,n.key=this.key,n.passphrase=this.passphrase,n.cert=this.cert,n.ca=this.ca,n.ciphers=this.ciphers,n.rejectUnauthorized=this.rejectUnauthorized),this.extraHeaders&&(n.headers=this.extraHeaders),this.localAddress&&(n.localAddress=this.localAddress);try{this.ws=this.usingBrowserWebSocket&&!this.isReactNative?e?new h(t,e):new h(t):new h(t,e,n)}catch(t){return this.emit("error",t)}void 0===this.ws.binaryType&&(this.supportsBinary=!1),this.ws.supports&&this.ws.supports.binary?(this.supportsBinary=!0,this.ws.binaryType="nodebuffer"):this.ws.binaryType="arraybuffer",this.addEventListeners()}},d.prototype.addEventListeners=function(){var t=this;this.ws.onopen=function(){t.onOpen()},this.ws.onclose=function(){t.onClose()},this.ws.onmessage=function(e){t.onData(e.data)},this.ws.onerror=function(e){t.onError("websocket error",e)}},d.prototype.write=function(t){var e=this;this.writable=!1;for(var n=t.length,i=0,r=n;i<r;i++)!function(t){o.encodePacket(t,e.supportsBinary,function(i){if(!e.usingBrowserWebSocket){var r={};t.options&&(r.compress=t.options.compress),e.perMessageDeflate&&("string"==typeof i?Buffer.byteLength(i):i.length)<e.perMessageDeflate.threshold&&(r.compress=!1)}try{e.usingBrowserWebSocket?e.ws.send(i):e.ws.send(i,r)}catch(t){u("websocket closed before onclose event")}--n||function(){e.emit("flush"),setTimeout(function(){e.writable=!0,e.emit("drain")},0)}()})}(t[i])},d.prototype.onClose=function(){a.prototype.onClose.call(this)},d.prototype.doClose=function(){void 0!==this.ws&&this.ws.close()},d.prototype.uri=function(){var t=this.query||{},e=this.secure?"wss":"ws",n="";return this.port&&("wss"===e&&443!==Number(this.port)||"ws"===e&&80!==Number(this.port))&&(n=":"+this.port),this.timestampRequests&&(t[this.timestampParam]=c()),!this.supportsBinary&&(t.b64=1),(t=s.encode(t)).length&&(t="?"+t),e+"://"+(-1!==this.hostname.indexOf(":")?"["+this.hostname+"]":this.hostname)+n+this.path+t},d.prototype.check=function(){return!!h&&!("__initialize"in h&&this.name===d.prototype.name)}},199:function(t,e,n){var i=n(58),r=n(549);t.exports=function(t){var e=t.xdomain,n=t.xscheme,a=t.enablesXDR;try{if("undefined"!=typeof XMLHttpRequest&&(!e||i))return new XMLHttpRequest}catch(t){}try{if("undefined"!=typeof XDomainRequest&&!n&&a)return new XDomainRequest}catch(t){}if(!e)try{return new r[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch(t){}}},802:function(t,e,n){(e=t.exports=n(616)).log=function(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},e.formatArgs=function(t){var n=this.useColors;if(t[0]=(n?"%c":"")+this.namespace+(n?" %c":" ")+t[0]+(n?"%c ":" ")+"+"+e.humanize(this.diff),n){var i="color: "+this.color;t.splice(1,0,i,"color: inherit");var r=0,a=0;t[0].replace(/%[a-zA-Z%]/g,function(t){"%%"!==t&&(r++,"%c"===t&&(a=r))}),t.splice(a,0,i)}},e.save=function(t){try{null==t?e.storage.removeItem("debug"):e.storage.debug=t}catch(t){}},e.load=i,e.useColors=function(){return"undefined"!=typeof window&&!!window.process&&"renderer"===window.process.type||!("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="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(t){}}(),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.formatters.j=function(t){try{return JSON.stringify(t)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}};function i(){var t;try{t=e.storage.debug}catch(t){}return!t&&"undefined"!=typeof process&&"env"in process&&(t=process.env.DEBUG),t}e.enable(i())},616:function(t,e,n){(e=t.exports=i.debug=i.default=i).coerce=function(t){return t instanceof Error?t.stack||t.message:t},e.disable=function(){e.enable("")},e.enable=function(t){e.save(t),e.names=[],e.skips=[];var n,i=("string"==typeof t?t:"").split(/[\s,]+/),r=i.length;for(n=0;n<r;n++)i[n]&&("-"===(t=i[n].replace(/\*/g,".*?"))[0]?e.skips.push(RegExp("^"+t.substr(1)+"$")):e.names.push(RegExp("^"+t+"$")));for(n=0;n<e.instances.length;n++){var a=e.instances[n];a.enabled=e.enabled(a.namespace)}},e.enabled=function(t){var n,i;if("*"===t[t.length-1])return!0;for(n=0,i=e.skips.length;n<i;n++)if(e.skips[n].test(t))return!1;for(n=0,i=e.names.length;n<i;n++)if(e.names[n].test(t))return!0;return!1},e.humanize=n(824),e.instances=[],e.names=[],e.skips=[],e.formatters={};function i(t){var n;function i(){if(i.enabled){var t=+new Date,r=t-(n||t);i.diff=r,i.prev=n,i.curr=t,n=t;for(var a=Array(arguments.length),o=0;o<a.length;o++)a[o]=arguments[o];a[0]=e.coerce(a[0]),"string"!=typeof a[0]&&a.unshift("%O");var s=0;a[0]=a[0].replace(/%([a-zA-Z%])/g,function(t,n){if("%%"===t)return t;s++;var r=e.formatters[n];if("function"==typeof r){var o=a[s];t=r.call(i,o),a.splice(s,1),s--}return t}),e.formatArgs.call(i,a),(i.log||e.log||console.log.bind(console)).apply(i,a)}}return i.namespace=t,i.enabled=e.enabled(t),i.useColors=e.useColors(),i.color=function(t){var n,i=0;for(n in t)i=(i<<5)-i+t.charCodeAt(n)|0;return e.colors[Math.abs(i)%e.colors.length]}(t),i.destroy=r,"function"==typeof e.init&&e.init(i),e.instances.push(i),i}function r(){var t=e.instances.indexOf(this);return -1!==t&&(e.instances.splice(t,1),!0)}},345:function(t,e,n){var i,r=n(905),a=n(466),o=n(718),s=n(906),l=n(346);"undefined"!=typeof ArrayBuffer&&(i=n(704));var c="undefined"!=typeof navigator&&/Android/i.test(navigator.userAgent),u="undefined"!=typeof navigator&&/PhantomJS/i.test(navigator.userAgent),h=c||u;e.protocol=3;var d=e.packets={open:0,close:1,ping:2,pong:3,message:4,upgrade:5,noop:6},f=r(d),p={type:"error",data:"parser error"},g=n(548);e.encodePacket=function(t,n,i,r){"function"==typeof n&&(r=n,n=!1),"function"==typeof i&&(r=i,i=null);var a=void 0===t.data?void 0:t.data.buffer||t.data;if("undefined"!=typeof ArrayBuffer&&a instanceof ArrayBuffer)return function(t,n,i){if(!n)return e.encodeBase64Packet(t,i);var r=t.data,a=new Uint8Array(r),o=new Uint8Array(1+r.byteLength);o[0]=d[t.type];for(var s=0;s<a.length;s++)o[s+1]=a[s];return i(o.buffer)}(t,n,r);if(void 0!==g&&a instanceof g)return function(t,n,i){if(!n)return e.encodeBase64Packet(t,i);if(h)return function(t,n,i){if(!n)return e.encodeBase64Packet(t,i);var r=new FileReader;return r.onload=function(){e.encodePacket({type:t.type,data:r.result},n,!0,i)},r.readAsArrayBuffer(t.data)}(t,n,i);var r=new Uint8Array(1);return r[0]=d[t.type],i(new g([r.buffer,t.data]))}(t,n,r);if(a&&a.base64)return function(t,n){return n("b"+e.packets[t.type]+t.data.data)}(t,r);var o=d[t.type];return void 0!==t.data&&(o+=i?l.encode(String(t.data),{strict:!1}):String(t.data)),r(""+o)};e.encodeBase64Packet=function(t,n){var i,r="b"+e.packets[t.type];if(void 0!==g&&t.data instanceof g){var a=new FileReader;return a.onload=function(){var t=a.result.split(",")[1];n(r+t)},a.readAsDataURL(t.data)}try{i=String.fromCharCode.apply(null,new Uint8Array(t.data))}catch(e){for(var o=new Uint8Array(t.data),s=Array(o.length),l=0;l<o.length;l++)s[l]=o[l];i=String.fromCharCode.apply(null,s)}return n(r+=btoa(i))},e.decodePacket=function(t,n,i){if(void 0===t)return p;if("string"==typeof t){if("b"===t.charAt(0))return e.decodeBase64Packet(t.substr(1),n);if(i&&!1===(t=function(t){try{t=l.decode(t,{strict:!1})}catch(t){return!1}return t}(t)))return p;var r=t.charAt(0);return Number(r)==r&&f[r]?t.length>1?{type:f[r],data:t.substring(1)}:{type:f[r]}:p}var r=new Uint8Array(t)[0],a=o(t,1);return g&&"blob"===n&&(a=new g([a])),{type:f[r],data:a}};function m(t,e,n){for(var i=Array(t.length),r=s(t.length,n),a=function(t,n,r){e(n,function(e,n){i[t]=n,r(e,i)})},o=0;o<t.length;o++)a(o,t[o],r)}e.decodeBase64Packet=function(t,e){var n=f[t.charAt(0)];if(!i)return{type:n,data:{base64:!0,data:t.substr(1)}};var r=i.decode(t.substr(1));return"blob"===e&&g&&(r=new g([r])),{type:n,data:r}},e.encodePayload=function(t,n,i){"function"==typeof n&&(i=n,n=null);var r=a(t);if(n&&r)return g&&!h?e.encodePayloadAsBlob(t,i):e.encodePayloadAsArrayBuffer(t,i);if(!t.length)return i("0:");m(t,function(t,i){e.encodePacket(t,!!r&&n,!1,function(t){var e;i(null,(e=t).length+":"+e)})},function(t,e){return i(e.join(""))})},e.decodePayload=function(t,n,i){if("string"!=typeof t)return e.decodePayloadAsBinary(t,n,i);if("function"==typeof n&&(i=n,n=null),""===t)return i(p,0,1);for(var r,a,o,s="",l=0,c=t.length;l<c;l++){var u=t.charAt(l);if(":"!==u){s+=u;continue}if(""===s||s!=(a=Number(s))||s!=(o=t.substr(l+1,a)).length)return i(p,0,1);if(o.length){if(r=e.decodePacket(o,n,!1),p.type===r.type&&p.data===r.data)return i(p,0,1);if(!1===i(r,l+a,c))return}l+=a,s=""}if(""!==s)return i(p,0,1)},e.encodePayloadAsArrayBuffer=function(t,n){if(!t.length)return n(new ArrayBuffer(0));m(t,function(t,n){e.encodePacket(t,!0,!0,function(t){return n(null,t)})},function(t,e){var i=new Uint8Array(e.reduce(function(t,e){var n;return t+(n="string"==typeof e?e.length:e.byteLength).toString().length+n+2},0)),r=0;return e.forEach(function(t){var e="string"==typeof t,n=t;if(e){for(var a=new Uint8Array(t.length),o=0;o<t.length;o++)a[o]=t.charCodeAt(o);n=a.buffer}e?i[r++]=0:i[r++]=1;for(var s=n.byteLength.toString(),o=0;o<s.length;o++)i[r++]=parseInt(s[o]);i[r++]=255;for(var a=new Uint8Array(n),o=0;o<a.length;o++)i[r++]=a[o]}),n(i.buffer)})},e.encodePayloadAsBlob=function(t,n){m(t,function(t,n){e.encodePacket(t,!0,!0,function(t){var e=new Uint8Array(1);if(e[0]=1,"string"==typeof t){for(var i=new Uint8Array(t.length),r=0;r<t.length;r++)i[r]=t.charCodeAt(r);t=i.buffer,e[0]=0}for(var a=(t instanceof ArrayBuffer?t.byteLength:t.size).toString(),o=new Uint8Array(a.length+1),r=0;r<a.length;r++)o[r]=parseInt(a[r]);o[a.length]=255,g&&n(null,new g([e.buffer,o.buffer,t]))})},function(t,e){return n(new g(e))})},e.decodePayloadAsBinary=function(t,n,i){"function"==typeof n&&(i=n,n=null);for(var r=t,a=[];r.byteLength>0;){for(var s=new Uint8Array(r),l=0===s[0],c="",u=1;255!==s[u];u++){if(c.length>310)return i(p,0,1);c+=s[u]}r=o(r,2+c.length);var h=o(r,0,c=parseInt(c));if(l)try{h=String.fromCharCode.apply(null,new Uint8Array(h))}catch(t){var d=new Uint8Array(h);h="";for(var u=0;u<d.length;u++)h+=String.fromCharCode(d[u])}a.push(h),r=o(r,c)}var f=a.length;a.forEach(function(t,r){i(e.decodePacket(t,n,!0),r,f)})}},905:function(t){t.exports=Object.keys||function(t){var e=[],n=Object.prototype.hasOwnProperty;for(var i in t)n.call(t,i)&&e.push(i);return e}},346:function(t){var e,n,i,r=String.fromCharCode;function a(t){for(var e,n,i=[],r=0,a=t.length;r<a;)(e=t.charCodeAt(r++))>=55296&&e<=56319&&r<a?(64512&(n=t.charCodeAt(r++)))==56320?i.push(((1023&e)<<10)+(1023&n)+65536):(i.push(e),r--):i.push(e);return i}function o(t,e){if(t>=55296&&t<=57343){if(e)throw Error("Lone surrogate U+"+t.toString(16).toUpperCase()+" is not a scalar value");return!1}return!0}function s(t,e){return r(t>>e&63|128)}function l(){if(i>=n)throw Error("Invalid byte index");var t=255&e[i];if(i++,(192&t)==128)return 63&t;throw Error("Invalid continuation byte")}t.exports={version:"2.1.2",encode:function(t,e){for(var n=!1!==(e=e||{}).strict,i=a(t),l=i.length,c=-1,u="";++c<l;)u+=function(t,e){if((0xffffff80&t)==0)return r(t);var n="";return(0xfffff800&t)==0?n=r(t>>6&31|192):(0xffff0000&t)==0?(!o(t,e)&&(t=65533),n=r(t>>12&15|224)+s(t,6)):(0xffe00000&t)==0&&(n=r(t>>18&7|240)+s(t,12)+s(t,6)),n+=r(63&t|128)}(i[c],n);return u},decode:function(t,s){var c,u=!1!==(s=s||{}).strict;n=(e=a(t)).length,i=0;for(var h=[];!1!==(c=function(t){var r,a,s,c;if(i>n)throw Error("Invalid byte index");if(i==n)return!1;if(r=255&e[i],i++,(128&r)==0)return r;if((224&r)==192){if((c=(31&r)<<6|(a=l()))>=128)return c;throw Error("Invalid continuation byte")}if((240&r)==224){if(a=l(),(c=(15&r)<<12|a<<6|(s=l()))>=2048)return o(c,t)?c:65533;throw Error("Invalid continuation byte")}if((248&r)==240&&(a=l(),s=l(),(c=(7&r)<<18|a<<12|s<<6|l())>=65536&&c<=1114111))return c;throw Error("Invalid UTF-8 detected")}(u));)h.push(c);return function(t){for(var e,n=t.length,i=-1,a="";++i<n;)(e=t[i])>65535&&(e-=65536,a+=r(e>>>10&1023|55296),e=56320|1023&e),a+=r(e);return a}(h)}}},466:function(t,e,n){var i=n(579),r=Object.prototype.toString,a="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===r.call(Blob),o="function"==typeof File||"undefined"!=typeof File&&"[object FileConstructor]"===r.call(File);t.exports=function t(e){if(!e||"object"!=typeof e)return!1;if(i(e)){for(var n=0,r=e.length;n<r;n++)if(t(e[n]))return!0;return!1}if("function"==typeof Buffer&&Buffer.isBuffer&&Buffer.isBuffer(e)||"function"==typeof ArrayBuffer&&e instanceof ArrayBuffer||a&&e instanceof Blob||o&&e instanceof File)return!0;if(e.toJSON&&"function"==typeof e.toJSON&&1==arguments.length)return t(e.toJSON(),!0);for(var s in e)if(Object.prototype.hasOwnProperty.call(e,s)&&t(e[s]))return!0;return!1}},579:function(t){var e={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==e.call(t)}},58:function(t){try{t.exports="undefined"!=typeof XMLHttpRequest&&"withCredentials"in new XMLHttpRequest}catch(e){t.exports=!1}},355:function(t){var e=[].indexOf;t.exports=function(t,n){if(e)return t.indexOf(n);for(var i=0;i<t.length;++i)if(t[i]===n)return i;return -1}},90:function(t){var e,n;n=function(t,e,n){"use strict";if(!function(){var e,n={lazyClass:"lazyload",loadedClass:"lazyloaded",loadingClass:"lazyloading",preloadClass:"lazypreload",errorClass:"lazyerror",autosizesClass:"lazyautosizes",fastLoadedClass:"ls-is-cached",iframeLoadMode:0,srcAttr:"data-src",srcsetAttr:"data-srcset",sizesAttr:"data-sizes",minSize:40,customMedia:{},init:!0,expFactor:1.5,hFac:.8,loadMode:2,loadHidden:!0,ricTimeout:0,throttleDelay:125};for(e in X=t.lazySizesConfig||t.lazysizesConfig||{},n)!(e in X)&&(X[e]=n[e])}(),!e||!e.getElementsByClassName)return{init:function(){},cfg:X,noSupport:!0};var i,r,a,o,s,l,c,u,h,d,f,p,g,m,v,y,b,x,w,_,k,S,C,M,A,L,E,T,O,P,D,I,j,F,N,R,z,B,H,W,U,q,V,Y,J,X,G=e.documentElement,K=t.HTMLPictureElement,Z="addEventListener",Q="getAttribute",tt=t[Z].bind(t),te=t.setTimeout,tn=t.requestAnimationFrame||te,ti=t.requestIdleCallback,tr=/^picture$/i,ta=["load","error","lazyincluded","_lazyloaded"],to={},ts=Array.prototype.forEach,tl=function(t,e){return!to[e]&&(to[e]=RegExp("(\\s|^)"+e+"(\\s|$)")),to[e].test(t[Q]("class")||"")&&to[e]},tc=function(t,e){!tl(t,e)&&t.setAttribute("class",(t[Q]("class")||"").trim()+" "+e)},tu=function(t,e){var n;(n=tl(t,e))&&t.setAttribute("class",(t[Q]("class")||"").replace(n," "))},th=function(t,e,n){var i=n?Z:"removeEventListener";n&&th(t,e),ta.forEach(function(n){t[i](n,e)})},td=function(t,n,i,r,a){var o=e.createEvent("Event");return!i&&(i={}),i.instance=J,o.initEvent(n,!r,!a),o.detail=i,t.dispatchEvent(o),o},tf=function(e,n){var i;!K&&(i=t.picturefill||X.pf)?(n&&n.src&&!e[Q]("srcset")&&e.setAttribute("srcset",n.src),i({reevaluate:!0,elements:[e]})):n&&n.src&&(e.src=n.src)},tp=function(t,e){return(getComputedStyle(t,null)||{})[e]},tg=function(t,e,n){for(n=n||t.offsetWidth;n<X.minSize&&e&&!t._lazysizesWidth;)n=e.offsetWidth,e=e.parentNode;return n};var tm=(o=[],s=a=[],l=function(){var t=s;for(s=a.length?o:a,i=!0,r=!1;t.length;)t.shift()();i=!1},(c=function(t,n){i&&!n?t.apply(this,arguments):(s.push(t),!r&&(r=!0,(e.hidden?te:tn)(l)))})._lsFlush=l,c),tv=function(t,e){return e?function(){tm(t)}:function(){var e=this,n=arguments;tm(function(){t.apply(e,n)})}},ty=function(t){var e,i=0,r=X.throttleDelay,a=X.ricTimeout,o=function(){e=!1,i=n.now(),t()},s=ti&&a>49?function(){ti(o,{timeout:a}),a!==X.ricTimeout&&(a=X.ricTimeout)}:tv(function(){te(o)},!0);return function(t){var o;if((t=!0===t)&&(a=33),!e)e=!0,(o=r-(n.now()-i))<0&&(o=0),t||o<9?s():te(s,o)}},tb=function(t){var e,i,r=function(){e=null,t()},a=function(){var t=n.now()-i;t<99?te(a,99-t):(ti||r)(r)};return function(){i=n.now(),!e&&(e=te(a,99))}};var tx=(_=/^img$/i,k=/^iframe$/i,S="onscroll"in t&&!/(gle|ing)bot/.test(navigator.userAgent),C=0,M=0,A=-1,L=function(t){M--,(!t||M<0||!t.target)&&(M=0)},E=function(t){return null==w&&(w="hidden"==tp(e.body,"visibility")),w||!("hidden"==tp(t.parentNode,"visibility")&&"hidden"==tp(t,"visibility"))},T=function(t,n){var i,r=t,a=E(t);for(v-=n,x+=n,y-=n,b+=n;a&&(r=r.offsetParent)&&r!=e.body&&r!=G;)(a=(tp(r,"opacity")||1)>0)&&"visible"!=tp(r,"overflow")&&(i=r.getBoundingClientRect(),a=b>i.left&&y<i.right&&x>i.top-1&&v<i.bottom+1);return a},P=ty(O=function(){var t,n,i,r,a,o,s,l,c,d,p,_,k=J.elements;if((f=X.loadMode)&&M<8&&(t=k.length)){for(n=0,A++;n<t;n++){if(!!k[n]&&!k[n]._lazyRace){if(!S||J.prematureUnveil&&J.prematureUnveil(k[n])){z(k[n]);continue}if((!(l=k[n][Q]("data-expand"))||!(o=1*l))&&(o=C),!d&&(d=!X.expand||X.expand<1?G.clientHeight>500&&G.clientWidth>500?500:370:X.expand,J._defEx=d,p=d*X.expFactor,_=X.hFac,w=null,C<p&&M<1&&A>2&&f>2&&!e.hidden?(C=p,A=0):C=f>1&&A>1&&M<6?d:0),c!==o&&(g=innerWidth+o*_,m=innerHeight+o,s=-1*o,c=o),(x=(i=k[n].getBoundingClientRect()).bottom)>=s&&(v=i.top)<=m&&(b=i.right)>=s*_&&(y=i.left)<=g&&(x||b||y||v)&&(X.loadHidden||E(k[n]))&&(h&&M<3&&!l&&(f<3||A<4)||T(k[n],o))){if(z(k[n]),a=!0,M>9)break}else!a&&h&&!r&&M<4&&A<4&&f>2&&(u[0]||X.preloadAfterLoad)&&(u[0]||!l&&(x||b||y||v||"auto"!=k[n][Q](X.sizesAttr)))&&(r=u[0]||k[n])}}r&&!a&&z(r)}}),I=tv(D=function(t){var e=t.target;if(e._lazyCache){delete e._lazyCache;return}L(t),tc(e,X.loadedClass),tu(e,X.loadingClass),th(e,j),td(e,"lazyloaded")}),j=function(t){I({target:t.target})},F=function(t,e){var n=t.getAttribute("data-load-mode")||X.iframeLoadMode;0==n?t.contentWindow.location.replace(e):1==n&&(t.src=e)},N=function(t){var e,n=t[Q](X.srcsetAttr);(e=X.customMedia[t[Q]("data-media")||t[Q]("media")])&&t.setAttribute("media",e),n&&t.setAttribute("srcset",n)},R=tv(function(t,e,n,i,r){var a,o,s,l,c,u;!(c=td(t,"lazybeforeunveil",e)).defaultPrevented&&(i&&(n?tc(t,X.autosizesClass):t.setAttribute("sizes",i)),o=t[Q](X.srcsetAttr),a=t[Q](X.srcAttr),r&&(l=(s=t.parentNode)&&tr.test(s.nodeName||"")),u=e.firesLoad||"src"in t&&(o||a||l),c={target:t},tc(t,X.loadingClass),u&&(clearTimeout(d),d=te(L,2500),th(t,j,!0)),l&&ts.call(s.getElementsByTagName("source"),N),o?t.setAttribute("srcset",o):a&&!l&&(k.test(t.nodeName)?F(t,a):t.src=a),r&&(o||l)&&tf(t,{src:a})),t._lazyRace&&delete t._lazyRace,tu(t,X.lazyClass),tm(function(){var e=t.complete&&t.naturalWidth>1;(!u||e)&&(e&&tc(t,X.fastLoadedClass),D(c),t._lazyCache=!0,te(function(){"_lazyCache"in t&&delete t._lazyCache},9)),"lazy"==t.loading&&M--},!0)}),z=function(t){if(t._lazyRace)return;var e,n=_.test(t.nodeName),i=n&&(t[Q](X.sizesAttr)||t[Q]("sizes")),r="auto"==i;if(!((r||!h)&&n&&(t[Q]("src")||t.srcset)&&!t.complete&&!tl(t,X.errorClass)&&tl(t,X.lazyClass)))e=td(t,"lazyunveilread").detail,r&&tw.updateElem(t,!0,t.offsetWidth),t._lazyRace=!0,M++,R(t,e,r,i,n)},B=tb(function(){X.loadMode=3,P()}),H=function(){3==X.loadMode&&(X.loadMode=2),B()},W=function(){if(!h){if(n.now()-p<999){te(W,999);return}h=!0,X.loadMode=3,P(),tt("scroll",H,!0)}},{_:function(){p=n.now(),J.elements=e.getElementsByClassName(X.lazyClass),u=e.getElementsByClassName(X.lazyClass+" "+X.preloadClass),tt("scroll",P,!0),tt("resize",P,!0),tt("pageshow",function(t){if(t.persisted){var n=e.querySelectorAll("."+X.loadingClass);n.length&&n.forEach&&tn(function(){n.forEach(function(t){t.complete&&z(t)})})}}),t.MutationObserver?new MutationObserver(P).observe(G,{childList:!0,subtree:!0,attributes:!0}):(G[Z]("DOMNodeInserted",P,!0),G[Z]("DOMAttrModified",P,!0),setInterval(P,999)),tt("hashchange",P,!0),["focus","mouseover","click","load","transitionend","animationend"].forEach(function(t){e[Z](t,P,!0)}),/d$|^c/.test(e.readyState)?W():(tt("load",W),e[Z]("DOMContentLoaded",P),te(W,2e4)),J.elements.length?(O(),tm._lsFlush()):P()},checkElems:P,unveil:z,_aLSL:H});var tw=(q=tv(function(t,e,n,i){var r,a,o;if(t._lazysizesWidth=i,i+="px",t.setAttribute("sizes",i),tr.test(e.nodeName||""))for(a=0,o=(r=e.getElementsByTagName("source")).length;a<o;a++)r[a].setAttribute("sizes",i);!n.detail.dataAttr&&tf(t,n.detail)}),V=function(t,e,n){var i,r=t.parentNode;r&&(n=tg(t,r,n),!(i=td(t,"lazybeforesizes",{width:n,dataAttr:!!e})).defaultPrevented&&(n=i.detail.width)&&n!==t._lazysizesWidth&&q(t,r,i,n))},{_:function(){U=e.getElementsByClassName(X.autosizesClass),tt("resize",Y)},checkElems:Y=tb(function(){var t,e=U.length;if(e)for(t=0;t<e;t++)V(U[t])}),updateElem:V}),t_=function(){!t_.i&&e.getElementsByClassName&&(t_.i=!0,tw._(),tx._())};return te(function(){X.init&&t_()}),J={cfg:X,autoSizer:tw,loader:tx,init:t_,uP:tf,aC:tc,rC:tu,hC:tl,fire:td,gW:tg,rAF:tm}}(e="undefined"!=typeof window?window:{},e.document,Date),e.lazySizes=n,t.exports&&(t.exports=n)},824:function(t){var e=6e4,n=36e5,i=864e5,r=315576e5;t.exports=function(t,o){o=o||{};var s=typeof t;if("string"===s&&t.length>0)return function(t){if((t=String(t)).length>100)return;var a=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(t);if(!!a){var o=parseFloat(a[1]);switch((a[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return o*r;case"days":case"day":case"d":return o*i;case"hours":case"hour":case"hrs":case"hr":case"h":return o*n;case"minutes":case"minute":case"mins":case"min":case"m":return o*e;case"seconds":case"second":case"secs":case"sec":case"s":return 1e3*o;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return o;default:return}}}(t);if("number"===s&&!1===isNaN(t))return o.long?function(t){return a(t,i,"day")||a(t,n,"hour")||a(t,e,"minute")||a(t,1e3,"second")||t+" ms"}(t):function(t){return t>=i?Math.round(t/i)+"d":t>=n?Math.round(t/n)+"h":t>=e?Math.round(t/e)+"m":t>=1e3?Math.round(t/1e3)+"s":t+"ms"}(t);throw Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function a(t,e,n){return t<e?void 0:t<1.5*e?Math.floor(t/e)+" "+n:Math.ceil(t/e)+" "+n+"s"}},382:function(){!function(t,e){void 0===e&&a("Pagination requires jQuery.");var n="pagination",i="__pagination-";e.fn.pagination&&a('plugin conflicted, the name "pagination" has been taken by another jQuery plugin.'),e.fn[n]=function(s){if(void 0===s)return this;var l=e(this),c=e.extend({},e.fn[n].defaults,s);if(l.data("pagination")&&!0===l.data("pagination").initialized){if(o(s))return l.trigger.call(this,i+"go",s,arguments[1]),this;if("string"==typeof s){var u=Array.prototype.slice.apply(arguments);switch(u[0]=i+u[0],s){case"previous":case"next":case"go":case"disable":case"enable":case"refresh":case"show":case"hide":case"destroy":l.trigger.apply(this,u);break;case"getSelectedPageNum":case"getCurrentPageNum":if(l.data("pagination").model)return l.data("pagination").model.pageNumber;return l.data("pagination").attributes.pageNumber;case"getTotalPage":return Math.ceil(l.data("pagination").model.totalNumber/l.data("pagination").model.pageSize);case"getSelectedPageData":case"getCurrentPageData":return l.data("pagination").currentPageData;case"isDisabled":return!0===l.data("pagination").model.disabled;default:a("Unknown action: "+s)}return this}else(function(t){e.each(["go","previous","next","disable","enable","refresh","show","hide","destroy"],function(e,n){t.off(i+n)}),t.data("pagination",{}),e(".paginationjs",t).remove()})(l)}else!r.isObject(s)&&a("Illegal options");return function(t){!t.dataSource&&a('"dataSource" is required.'),"string"==typeof t.dataSource?void 0===t.totalNumberLocator?void 0===t.totalNumber?a('"totalNumber" is required.'):!o(t.totalNumber)&&a('"totalNumber" is incorrect. Expect numberic type'):"function"!=typeof t.totalNumberLocator&&a('"totalNumberLocator" should be a Function.'):r.isObject(t.dataSource)&&(void 0===t.locator?a('"dataSource" is an Object, please specify a "locator".'):"string"!=typeof t.locator&&"function"!=typeof t.locator&&a(""+t.locator+" is incorrect. Expect string or function type")),void 0!==t.formatResult&&"function"!=typeof t.formatResult&&a('"formatResult" should be a Function.'),void 0!==t.onError&&"function"!=typeof t.onError&&a('"onError" should be a Function.')}(c),({initialize:function(){var t=this;if(!l.data("pagination")&&l.data("pagination",{}),!1!==t.callHook("beforeInit")){l.data("pagination").initialized&&e(".paginationjs",l).remove(),t.disabled=!!c.disabled;var n=t.model={pageRange:c.pageRange,pageSize:c.pageSize};t.parseDataSource(c.dataSource,function(e){t.isAsync=r.isString(e),r.isArray(e)&&(n.totalNumber=c.totalNumber=e.length),t.isDynamicTotalNumber=t.isAsync&&c.totalNumberLocator;var i=t.render(!0);c.className&&i.addClass(c.className),n.el=i,l["bottom"===c.position?"append":"prepend"](i),t.observer(),l.data("pagination").initialized=!0,t.callHook("afterInit",i)})}},render:function(t){var n=this.model,i=n.el||e('<div class="paginationjs"></div>'),r=!0!==t;this.callHook("beforeRender",r);var a=n.pageNumber||c.pageNumber,o=c.pageRange||0,s=this.getTotalPage(),l=a-o,u=a+o;return u>s&&(u=s,l=(l=s-2*o)<1?1:l),l<=1&&(l=1,u=Math.min(2*o+1,s)),i.html(this.generateHTML({currentPage:a,pageRange:o,rangeStart:l,rangeEnd:u})),c.hideOnlyOnePage&&i[s<=1?"hide":"show"](),this.callHook("afterRender",r),i},getPageLinkTag:function(t){var e=c.pageLink;return e?`<a href="${e}">${t}</a>`:`<a>${t}</a>`},generatePageNumbersHTML:function(t){var e,n=t.currentPage,i=this.getTotalPage(),r=this.getPageLinkTag,a=t.rangeStart,o=t.rangeEnd,s="",l=c.ellipsisText,u=c.classPrefix,h=c.pageClassName||"",d=c.activeClassName||"",f=c.disableClassName||"";if(null===c.pageRange){for(e=1;e<=i;e++)e==n?s+=`<li class="${u}-page J-paginationjs-page ${h} ${d}" data-num="${e}"><a>${e}</a></li>`:s+=`<li class="${u}-page J-paginationjs-page ${h}" data-num="${e}">${r(e)}</li>`;return s}if(a<=3)for(e=1;e<a;e++)e==n?s+=`<li class="${u}-page J-paginationjs-page ${h} ${d}" data-num="${e}"><a>${e}</a></li>`:s+=`<li class="${u}-page J-paginationjs-page ${h}" data-num="${e}">${r(e)}</li>`;else!c.hideFirstOnEllipsisShow&&(s+=`<li class="${u}-page ${u}-first J-paginationjs-page ${h}" data-num="1">${r(1)}</li>`),s+=`<li class="${u}-ellipsis ${f}"><a>${l}</a></li>`;for(e=a;e<=o;e++)e==n?s+=`<li class="${u}-page J-paginationjs-page ${h} ${d}" data-num="${e}"><a>${e}</a></li>`:s+=`<li class="${u}-page J-paginationjs-page ${h}" data-num="${e}">${r(e)}</li>`;if(o>=i-2)for(e=o+1;e<=i;e++)s+=`<li class="${u}-page J-paginationjs-page ${h}" data-num="${e}">${r(e)}</li>`;else s+=`<li class="${u}-ellipsis ${f}"><a>${l}</a></li>`,!c.hideLastOnEllipsisShow&&(s+=`<li class="${u}-page ${u}-last J-paginationjs-page ${h}" data-num="${i}">${r(i)}</li>`);return s},generateHTML:function(t){var e,n=t.currentPage,i=this.getTotalPage(),a=this.getPageLinkTag,o=this.getTotalNumber(),s=c.pageSize,l=c.showPrevious,u=c.showNext,h=c.showPageNumbers,d=c.showNavigator,f=c.showSizeChanger,p=c.sizeChangerOptions,g=c.showGoInput,m=c.showGoButton,v=c.prevText,y=c.nextText,b=c.goButtonText,x=c.classPrefix,w=c.disableClassName||"",_=c.ulClassName||"",k=c.prevClassName||"",S=c.nextClassName||"",C="",M='<select class="J-paginationjs-size-select">',A='<input type="text" class="J-paginationjs-go-pagenumber">',L=`<input type="button" class="J-paginationjs-go-button" value="${b}">`,E="function"==typeof c.formatSizeChanger?c.formatSizeChanger(n,i,o):c.formatSizeChanger,T="function"==typeof c.formatNavigator?c.formatNavigator(n,i,o):c.formatNavigator,O="function"==typeof c.formatGoInput?c.formatGoInput(A,n,i,o):c.formatGoInput,P="function"==typeof c.formatGoButton?c.formatGoButton(L,n,i,o):c.formatGoButton,D="function"==typeof c.autoHidePrevious?c.autoHidePrevious():c.autoHidePrevious,I="function"==typeof c.autoHideNext?c.autoHideNext():c.autoHideNext,j="function"==typeof c.header?c.header(n,i,o):c.header,F="function"==typeof c.footer?c.footer(n,i,o):c.footer;if(j&&(C+=e=this.replaceVariables(j,{currentPage:n,totalPage:i,totalNumber:o})),d&&T&&(e=this.replaceVariables(T,{currentPage:n,totalPage:i,totalNumber:o,rangeStart:(n-1)*s+1,rangeEnd:Math.min(n*s,o)}),C+=`<div class="${x}-nav J-paginationjs-nav">${e}</div>`),(l||h||u)&&(C+='<div class="paginationjs-pages">',_?C+=`<ul class="${_}">`:C+="<ul>",l&&(n<=1?!D&&(C+=`<li class="${x}-prev ${w} ${k}"><a>${v}</a></li>`):C+=`<li class="${x}-prev J-paginationjs-previous ${k}" data-num="${n-1}" title="Previous page">${a(v)}</li>`),h&&(C+=this.generatePageNumbersHTML(t)),u&&(n>=i?!I&&(C+=`<li class="${x}-next ${w} ${S}"><a>${y}</a></li>`):C+=`<li class="${x}-next J-paginationjs-next ${S}" data-num="${n+1}" title="Next page">${a(y)}</li>`),C+="</ul></div>"),f&&r.isArray(p)){-1===p.indexOf(s)&&(p.unshift(s),p.sort((t,e)=>t-e));for(let t=0;t<p.length;t++)M+=`<option value="${p[t]}"${p[t]===s?" selected":""}>${p[t]} / page</option>`;M+="</select>",e=M,E&&(e=this.replaceVariables(E,{length:M,total:o})),C+=`<div class="paginationjs-size-changer">${e}</div>`}return g&&O&&(e=this.replaceVariables(O,{currentPage:n,totalPage:i,totalNumber:o,input:A}),C+=`<div class="${x}-go-input">${e}</div>`),m&&P&&(e=this.replaceVariables(P,{currentPage:n,totalPage:i,totalNumber:o,button:L}),C+=`<div class="${x}-go-button">${e}</div>`),F&&(C+=e=this.replaceVariables(F,{currentPage:n,totalPage:i,totalNumber:o})),C},findTotalNumberFromRemoteResponse:function(t){this.model.totalNumber=c.totalNumberLocator(t)},go:function(t,n){var i=this,a=i.model;if(i.disabled)return;var o=t;if(!!(o=parseInt(o))&&!(o<1)){var s=c.pageSize,u=i.getTotalNumber(),h=i.getTotalPage();if(!(u>0)||!(o>h)){if(!i.isAsync){y(i.getPagingData(o));return}var d={},f=c.alias||{},p=f.pageSize?f.pageSize:"pageSize",g=f.pageNumber?f.pageNumber:"pageNumber";d[p]=s,d[g]=o;var m="function"==typeof c.ajax?c.ajax():c.ajax;m&&m.pageNumberStartWithZero&&(d[g]=o-1);var v={type:"get",cache:!1,data:{},contentType:"application/x-www-form-urlencoded; charset=UTF-8",dataType:"json",async:!0};e.extend(!0,v,m),e.extend(v.data,d),v.url=c.dataSource,v.success=function(t){try{i.model.originalResponse=t,i.isDynamicTotalNumber?i.findTotalNumberFromRemoteResponse(t):i.model.totalNumber=c.totalNumber;var e=i.filterDataWithLocator(t);y(e)}catch(t){if("function"==typeof c.onError)c.onError(t,"ajaxSuccessHandlerError");else throw t}},v.error=function(t,e,n){c.formatAjaxError&&c.formatAjaxError(t,e,n),i.enable()},i.disable(),c.ajaxFunction?c.ajaxFunction(v):e.ajax(v)}}function y(t){if(!1===i.callHook("beforePaging",o))return!1;if(a.direction=void 0===a.pageNumber?0:o>a.pageNumber?1:-1,a.pageNumber=o,i.render(),i.disabled&&i.isAsync&&i.enable(),l.data("pagination").model=a,c.formatResult){var s=e.extend(!0,[],t);!r.isArray(t=c.formatResult(s))&&(t=s)}l.data("pagination").currentPageData=t,i.doCallback(t,n),i.callHook("afterPaging",o),1==o?i.callHook("afterIsFirstPage"):o==i.getTotalPage()&&i.callHook("afterIsLastPage")}},doCallback:function(t,e){var n=this.model;"function"==typeof e?e(t,n):"function"==typeof c.callback&&c.callback(t,n)},destroy:function(){!1!==this.callHook("beforeDestroy")&&(this.model.el.remove(),l.off(),e("#paginationjs-style").remove(),this.callHook("afterDestroy"))},previous:function(t){this.go(this.model.pageNumber-1,t)},next:function(t){this.go(this.model.pageNumber+1,t)},disable:function(){var t=this.isAsync?"async":"sync";!1!==this.callHook("beforeDisable",t)&&(this.disabled=!0,this.model.disabled=!0,this.callHook("afterDisable",t))},enable:function(){var t=this.isAsync?"async":"sync";!1!==this.callHook("beforeEnable",t)&&(this.disabled=!1,this.model.disabled=!1,this.callHook("afterEnable",t))},refresh:function(t){this.go(this.model.pageNumber,t)},show:function(){!this.model.el.is(":visible")&&this.model.el.show()},hide:function(){this.model.el.is(":visible")&&this.model.el.hide()},replaceVariables:function(t,e){var n;for(var i in e){var r=e[i],a=RegExp("<%=\\s*"+i+"\\s*%>","img");n=(n||t).replace(a,r)}return n},getPagingData:function(t){var e=c.pageSize,n=c.dataSource,i=this.getTotalNumber(),r=Math.min(t*e,i);return n.slice(e*(t-1)+1-1,r)},getTotalNumber:function(){return this.model.totalNumber||c.totalNumber||0},getTotalPage:function(){return Math.ceil(this.getTotalNumber()/c.pageSize)},getLocator:function(t){var e;return"string"==typeof t?e=t:"function"==typeof t?e=t():a('"locator" is incorrect. Expect string or function type.'),e},filterDataWithLocator:function(t){var n,i=this.getLocator(c.locator);if(r.isObject(t)){try{e.each(i.split("."),function(e,i){n=(n||t)[i]})}catch(t){}n?!r.isArray(n)&&a("dataSource."+i+" should be an Array."):a("dataSource."+i+" is undefined.")}return n||t},parseDataSource:function(t,e){var n=this;r.isObject(t)?e(c.dataSource=n.filterDataWithLocator(t)):r.isArray(t)?e(c.dataSource=t):"function"==typeof t?c.dataSource(function(t){!r.isArray(t)&&a('The parameter of "done" Function should be an Array.'),n.parseDataSource.call(n,t,e)}):"string"==typeof t?(/^https?|file:/.test(t)&&(c.ajaxDataType="jsonp"),e(t)):a("Unexpected dataSource type")},callHook:function(n){var i,r=l.data("pagination")||{},a=Array.prototype.slice.apply(arguments);return a.shift(),c[n]&&"function"==typeof c[n]&&!1===c[n].apply(t,a)&&(i=!1),r.hooks&&r.hooks[n]&&e.each(r.hooks[n],function(e,n){!1===n.apply(t,a)&&(i=!1)}),!1!==i},observer:function(){var t=this,n=t.model.el;l.on(i+"go",function(e,n,i){"string"==typeof n&&(n=parseInt(n.trim())),n&&("number"!=typeof n&&a('"pageNumber" is incorrect. (Number)'),t.go(n,i))}),n.on("click",".J-paginationjs-page",function(n){var i=e(n.currentTarget),r=i.attr("data-num").trim();if(!(!r||i.hasClass(c.disableClassName)||i.hasClass(c.activeClassName))){if(!1===t.callHook("beforePageOnClick",n,r))return!1;if(t.go(r),t.callHook("afterPageOnClick",n,r),!c.pageLink)return!1}}),n.on("click",".J-paginationjs-previous",function(n){var i=e(n.currentTarget),r=i.attr("data-num").trim();if(!(!r||i.hasClass(c.disableClassName))){if(!1===t.callHook("beforePreviousOnClick",n,r))return!1;if(t.go(r),t.callHook("afterPreviousOnClick",n,r),!c.pageLink)return!1}}),n.on("click",".J-paginationjs-next",function(n){var i=e(n.currentTarget),r=i.attr("data-num").trim();if(!(!r||i.hasClass(c.disableClassName))){if(!1===t.callHook("beforeNextOnClick",n,r))return!1;if(t.go(r),t.callHook("afterNextOnClick",n,r),!c.pageLink)return!1}}),n.on("click",".J-paginationjs-go-button",function(r){var a=e(".J-paginationjs-go-pagenumber",n).val();if(!1===t.callHook("beforeGoButtonOnClick",r,a))return!1;l.trigger(i+"go",a),t.callHook("afterGoButtonOnClick",r,a)}),n.on("keyup",".J-paginationjs-go-pagenumber",function(r){if(13===r.which){var a=e(r.currentTarget).val();if(!1===t.callHook("beforeGoInputOnEnter",r,a))return!1;l.trigger(i+"go",a),e(".J-paginationjs-go-pagenumber",n).focus(),t.callHook("afterGoInputOnEnter",r,a)}}),n.on("change",".J-paginationjs-size-select",function(n){var i=parseInt(e(n.currentTarget).val()),r=t.model.pageNumber||c.pageNumber;if("number"==typeof i){if(!1===t.callHook("beforeSizeSelectorChange",n,i))return!1;if(c.pageSize=i,t.model.pageSize=i,t.model.totalPage=t.getTotalPage(),r>t.model.totalPage&&(r=t.model.totalPage),t.go(r),t.callHook("afterSizeSelectorChange",n,i),!c.pageLink)return!1}}),l.on(i+"previous",function(e,n){t.previous(n)}),l.on(i+"next",function(e,n){t.next(n)}),l.on(i+"disable",function(){t.disable()}),l.on(i+"enable",function(){t.enable()}),l.on(i+"refresh",function(e,n){t.refresh(n)}),l.on(i+"show",function(){t.show()}),l.on(i+"hide",function(){t.hide()}),l.on(i+"destroy",function(){t.destroy()});var r=Math.max(t.getTotalPage(),1),o=c.pageNumber;t.isDynamicTotalNumber&&c.resetPageNumberOnInit&&(o=1),c.triggerPagingOnInit&&l.trigger(i+"go",Math.min(o,r))}}).initialize(),this},e.fn[n].defaults={totalNumber:0,pageNumber:1,pageSize:10,pageRange:2,showPrevious:!0,showNext:!0,showPageNumbers:!0,showNavigator:!1,showGoInput:!1,showGoButton:!1,showSizeChanger:!1,sizeChangerOptions:[10,20,50,100],pageLink:"",prevText:"&lsaquo;",nextText:"&rsaquo;",ellipsisText:"...",goButtonText:"Go",classPrefix:"paginationjs",activeClassName:"active",disableClassName:"disabled",formatNavigator:"Total <%= totalNumber %> items",formatGoInput:"<%= input %>",formatGoButton:"<%= button %>",position:"bottom",autoHidePrevious:!1,autoHideNext:!1,triggerPagingOnInit:!0,resetPageNumberOnInit:!0,hideOnlyOnePage:!1,hideFirstOnEllipsisShow:!1,hideLastOnEllipsisShow:!1,callback:function(){}},e.fn.addHook=function(t,n){arguments.length<2&&a("Expect 2 arguments at least."),"function"!=typeof n&&a("callback should be a function.");var i=e(this),r=i.data("pagination");!r&&(i.data("pagination",{}),r=i.data("pagination")),r.hooks||(r.hooks={}),r.hooks[t]=r.hooks[t]||[],r.hooks[t].push(n)},e[n]=function(t,n){var i;if(arguments.length<2&&a("Requires two parameters."),"string"!=typeof t&&t instanceof jQuery?i=t:i=e(t),i.length)return i.pagination(n),i};var r={};function a(t){throw Error("Pagination: "+t)}function o(t){return!isNaN(parseFloat(t))&&isFinite(t)}e.each(["Object","Array","String"],function(t,e){r["is"+e]=function(t){var n,i;return("object"==(i=typeof(n=t))?null==n&&"null"||Object.prototype.toString.call(n).slice(8,-1):i).toLowerCase()===e.toLowerCase()}}),"function"==typeof define&&define.amd&&define(function(){return e})}(this,window.jQuery)},830:function(t,e){e.encode=function(t){var e="";for(var n in t)t.hasOwnProperty(n)&&(e.length&&(e+="&"),e+=encodeURIComponent(n)+"="+encodeURIComponent(t[n]));return e},e.decode=function(t){for(var e={},n=t.split("&"),i=0,r=n.length;i<r;i++){var a=n[i].split("=");e[decodeURIComponent(a[0])]=decodeURIComponent(a[1])}return e}},187:function(t){var e=/^(?:(?![^:@]+:[^:@\/]*@)(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"];t.exports=function(t){var i=t,r=t.indexOf("["),a=t.indexOf("]");-1!=r&&-1!=a&&(t=t.substring(0,r)+t.substring(r,a).replace(/:/g,";")+t.substring(a,t.length));for(var o=e.exec(t||""),s={},l=14;l--;)s[n[l]]=o[l]||"";return -1!=r&&-1!=a&&(s.source=i,s.host=s.host.substring(1,s.host.length-1).replace(/;/g,":"),s.authority=s.authority.replace("[","").replace("]","").replace(/;/g,":"),s.ipv6uri=!0),s.pathNames=function(t,e){var n=e.replace(/\/{2,9}/g,"/").split("/");return("/"==e.substr(0,1)||0===e.length)&&n.splice(0,1),"/"==e.substr(e.length-1,1)&&n.splice(n.length-1,1),n}(s,s.path),s.queryKey=function(t,e){var n={};return e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(t,e,i){e&&(n[e]=i)}),n}(s,s.query),s}},809:function(t,e,n){var i=n(678),r=n(875),a=n(739),o=n(669)("socket.io-client");t.exports=e=l;var s=e.managers={};function l(t,e){"object"==typeof t&&(e=t,t=void 0),e=e||{};var n,r=i(t),l=r.source,c=r.id,u=r.path,h=s[c]&&u in s[c].nsps;return e.forceNew||e["force new connection"]||!1===e.multiplex||h?(o("ignoring socket cache for %s",l),n=a(l,e)):(!s[c]&&(o("new io instance for %s",l),s[c]=a(l,e)),n=s[c]),r.query&&!e.query&&(e.query=r.query),n.socket(r.path,e)}e.protocol=r.protocol,e.connect=l,e.Manager=n(739),e.Socket=n(584)},739:function(t,e,n){var i=n(983),r=n(584),a=n(767),o=n(875),s=n(464),l=n(77),c=n(669)("socket.io-client:manager"),u=n(355),h=n(10),d=Object.prototype.hasOwnProperty;function f(t,e){if(!(this instanceof f))return new f(t,e);t&&"object"==typeof t&&(e=t,t=void 0),(e=e||{}).path=e.path||"/socket.io",this.nsps={},this.subs=[],this.opts=e,this.reconnection(!1!==e.reconnection),this.reconnectionAttempts(e.reconnectionAttempts||1/0),this.reconnectionDelay(e.reconnectionDelay||1e3),this.reconnectionDelayMax(e.reconnectionDelayMax||5e3),this.randomizationFactor(e.randomizationFactor||.5),this.backoff=new h({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(null==e.timeout?2e4:e.timeout),this.readyState="closed",this.uri=t,this.connecting=[],this.lastPing=null,this.encoding=!1,this.packetBuffer=[];var n=e.parser||o;this.encoder=new n.Encoder,this.decoder=new n.Decoder,this.autoConnect=!1!==e.autoConnect,this.autoConnect&&this.open()}t.exports=f,f.prototype.emitAll=function(){for(var t in this.emit.apply(this,arguments),this.nsps)d.call(this.nsps,t)&&this.nsps[t].emit.apply(this.nsps[t],arguments)},f.prototype.updateSocketIds=function(){for(var t in this.nsps)d.call(this.nsps,t)&&(this.nsps[t].id=this.generateId(t))},f.prototype.generateId=function(t){return("/"===t?"":t+"#")+this.engine.id},a(f.prototype),f.prototype.reconnection=function(t){return arguments.length?(this._reconnection=!!t,this):this._reconnection},f.prototype.reconnectionAttempts=function(t){return arguments.length?(this._reconnectionAttempts=t,this):this._reconnectionAttempts},f.prototype.reconnectionDelay=function(t){return arguments.length?(this._reconnectionDelay=t,this.backoff&&this.backoff.setMin(t),this):this._reconnectionDelay},f.prototype.randomizationFactor=function(t){return arguments.length?(this._randomizationFactor=t,this.backoff&&this.backoff.setJitter(t),this):this._randomizationFactor},f.prototype.reconnectionDelayMax=function(t){return arguments.length?(this._reconnectionDelayMax=t,this.backoff&&this.backoff.setMax(t),this):this._reconnectionDelayMax},f.prototype.timeout=function(t){return arguments.length?(this._timeout=t,this):this._timeout},f.prototype.maybeReconnectOnOpen=function(){!this.reconnecting&&this._reconnection&&0===this.backoff.attempts&&this.reconnect()},f.prototype.open=f.prototype.connect=function(t,e){if(c("readyState %s",this.readyState),~this.readyState.indexOf("open"))return this;c("opening %s",this.uri),this.engine=i(this.uri,this.opts);var n=this.engine,r=this;this.readyState="opening",this.skipReconnect=!1;var a=s(n,"open",function(){r.onopen(),t&&t()}),o=s(n,"error",function(e){if(c("connect_error"),r.cleanup(),r.readyState="closed",r.emitAll("connect_error",e),t){var n=Error("Connection error");n.data=e,t(n)}else r.maybeReconnectOnOpen()});if(!1!==this._timeout){var l=this._timeout;c("connect attempt will timeout after %d",l),0===l&&a.destroy();var u=setTimeout(function(){c("connect attempt timed out after %d",l),a.destroy(),n.close(),n.emit("error","timeout"),r.emitAll("connect_timeout",l)},l);this.subs.push({destroy:function(){clearTimeout(u)}})}return this.subs.push(a),this.subs.push(o),this},f.prototype.onopen=function(){c("open"),this.cleanup(),this.readyState="open",this.emit("open");var t=this.engine;this.subs.push(s(t,"data",l(this,"ondata"))),this.subs.push(s(t,"ping",l(this,"onping"))),this.subs.push(s(t,"pong",l(this,"onpong"))),this.subs.push(s(t,"error",l(this,"onerror"))),this.subs.push(s(t,"close",l(this,"onclose"))),this.subs.push(s(this.decoder,"decoded",l(this,"ondecoded")))},f.prototype.onping=function(){this.lastPing=new Date,this.emitAll("ping")},f.prototype.onpong=function(){this.emitAll("pong",new Date-this.lastPing)},f.prototype.ondata=function(t){this.decoder.add(t)},f.prototype.ondecoded=function(t){this.emit("packet",t)},f.prototype.onerror=function(t){c("error",t),this.emitAll("error",t)},f.prototype.socket=function(t,e){var n=this.nsps[t];if(!n){n=new r(this,t,e),this.nsps[t]=n;var i=this;n.on("connecting",a),n.on("connect",function(){n.id=i.generateId(t)}),this.autoConnect&&a()}function a(){!~u(i.connecting,n)&&i.connecting.push(n)}return n},f.prototype.destroy=function(t){var e=u(this.connecting,t);~e&&this.connecting.splice(e,1),!this.connecting.length&&this.close()},f.prototype.packet=function(t){c("writing packet %j",t);var e=this;t.query&&0===t.type&&(t.nsp+="?"+t.query),e.encoding?e.packetBuffer.push(t):(e.encoding=!0,this.encoder.encode(t,function(n){for(var i=0;i<n.length;i++)e.engine.write(n[i],t.options);e.encoding=!1,e.processPacketQueue()}))},f.prototype.processPacketQueue=function(){if(this.packetBuffer.length>0&&!this.encoding){var t=this.packetBuffer.shift();this.packet(t)}},f.prototype.cleanup=function(){c("cleanup");for(var t=this.subs.length,e=0;e<t;e++)this.subs.shift().destroy();this.packetBuffer=[],this.encoding=!1,this.lastPing=null,this.decoder.destroy()},f.prototype.close=f.prototype.disconnect=function(){c("disconnect"),this.skipReconnect=!0,this.reconnecting=!1,"opening"===this.readyState&&this.cleanup(),this.backoff.reset(),this.readyState="closed",this.engine&&this.engine.close()},f.prototype.onclose=function(t){c("onclose"),this.cleanup(),this.backoff.reset(),this.readyState="closed",this.emit("close",t),this._reconnection&&!this.skipReconnect&&this.reconnect()},f.prototype.reconnect=function(){if(this.reconnecting||this.skipReconnect)return this;var t=this;if(this.backoff.attempts>=this._reconnectionAttempts)c("reconnect failed"),this.backoff.reset(),this.emitAll("reconnect_failed"),this.reconnecting=!1;else{var e=this.backoff.duration();c("will wait %dms before reconnect attempt",e),this.reconnecting=!0;var n=setTimeout(function(){if(!t.skipReconnect)c("attempting reconnect"),t.emitAll("reconnect_attempt",t.backoff.attempts),t.emitAll("reconnecting",t.backoff.attempts),!t.skipReconnect&&t.open(function(e){e?(c("reconnect attempt error"),t.reconnecting=!1,t.reconnect(),t.emitAll("reconnect_error",e.data)):(c("reconnect success"),t.onreconnect())})},e);this.subs.push({destroy:function(){clearTimeout(n)}})}},f.prototype.onreconnect=function(){var t=this.backoff.attempts;this.reconnecting=!1,this.backoff.reset(),this.updateSocketIds(),this.emitAll("reconnect",t)}},464:function(t){t.exports=function(t,e,n){return t.on(e,n),{destroy:function(){t.removeListener(e,n)}}}},584:function(t,e,n){var i=n(875),r=n(767),a=n(42),o=n(464),s=n(77),l=n(669)("socket.io-client:socket"),c=n(830),u=n(466);t.exports=e=f;var h={connect:1,connect_error:1,connect_timeout:1,connecting:1,disconnect:1,error:1,reconnect:1,reconnect_attempt:1,reconnect_failed:1,reconnect_error:1,reconnecting:1,ping:1,pong:1},d=r.prototype.emit;function f(t,e,n){this.io=t,this.nsp=e,this.json=this,this.ids=0,this.acks={},this.receiveBuffer=[],this.sendBuffer=[],this.connected=!1,this.disconnected=!0,this.flags={},n&&n.query&&(this.query=n.query),this.io.autoConnect&&this.open()}r(f.prototype),f.prototype.subEvents=function(){if(!this.subs){var t=this.io;this.subs=[o(t,"open",s(this,"onopen")),o(t,"packet",s(this,"onpacket")),o(t,"close",s(this,"onclose"))]}},f.prototype.open=f.prototype.connect=function(){return this.connected?this:(this.subEvents(),!this.io.reconnecting&&this.io.open(),"open"===this.io.readyState&&this.onopen(),this.emit("connecting"),this)},f.prototype.send=function(){var t=a(arguments);return t.unshift("message"),this.emit.apply(this,t),this},f.prototype.emit=function(t){if(h.hasOwnProperty(t))return d.apply(this,arguments),this;var e=a(arguments),n={type:(void 0!==this.flags.binary?this.flags.binary:u(e))?i.BINARY_EVENT:i.EVENT,data:e};return n.options={},n.options.compress=!this.flags||!1!==this.flags.compress,"function"==typeof e[e.length-1]&&(l("emitting packet with ack id %d",this.ids),this.acks[this.ids]=e.pop(),n.id=this.ids++),this.connected?this.packet(n):this.sendBuffer.push(n),this.flags={},this},f.prototype.packet=function(t){t.nsp=this.nsp,this.io.packet(t)},f.prototype.onopen=function(){if(l("transport is open - connecting"),"/"!==this.nsp){if(this.query){var t="object"==typeof this.query?c.encode(this.query):this.query;l("sending connect packet with query %s",t),this.packet({type:i.CONNECT,query:t})}else this.packet({type:i.CONNECT})}},f.prototype.onclose=function(t){l("close (%s)",t),this.connected=!1,this.disconnected=!0,delete this.id,this.emit("disconnect",t)},f.prototype.onpacket=function(t){var e=t.nsp===this.nsp,n=t.type===i.ERROR&&"/"===t.nsp;if(e||n)switch(t.type){case i.CONNECT:this.onconnect();break;case i.EVENT:case i.BINARY_EVENT:this.onevent(t);break;case i.ACK:case i.BINARY_ACK:this.onack(t);break;case i.DISCONNECT:this.ondisconnect();break;case i.ERROR:this.emit("error",t.data)}},f.prototype.onevent=function(t){var e=t.data||[];l("emitting event %j",e),null!=t.id&&(l("attaching ack callback to event"),e.push(this.ack(t.id))),this.connected?d.apply(this,e):this.receiveBuffer.push(e)},f.prototype.ack=function(t){var e=this,n=!1;return function(){if(!n){n=!0;var r=a(arguments);l("sending ack %j",r),e.packet({type:u(r)?i.BINARY_ACK:i.ACK,id:t,data:r})}}},f.prototype.onack=function(t){var e=this.acks[t.id];"function"==typeof e?(l("calling ack %s with %j",t.id,t.data),e.apply(this,t.data),delete this.acks[t.id]):l("bad ack %s",t.id)},f.prototype.onconnect=function(){this.connected=!0,this.disconnected=!1,this.emitBuffered(),this.emit("connect")},f.prototype.emitBuffered=function(){var t;for(t=0;t<this.receiveBuffer.length;t++)d.apply(this,this.receiveBuffer[t]);for(t=0,this.receiveBuffer=[];t<this.sendBuffer.length;t++)this.packet(this.sendBuffer[t]);this.sendBuffer=[]},f.prototype.ondisconnect=function(){l("server disconnect (%s)",this.nsp),this.destroy(),this.onclose("io server disconnect")},f.prototype.destroy=function(){if(this.subs){for(var t=0;t<this.subs.length;t++)this.subs[t].destroy();this.subs=null}this.io.destroy(this)},f.prototype.close=f.prototype.disconnect=function(){return this.connected&&(l("performing disconnect (%s)",this.nsp),this.packet({type:i.DISCONNECT})),this.destroy(),this.connected&&this.onclose("io client disconnect"),this},f.prototype.compress=function(t){return this.flags.compress=t,this},f.prototype.binary=function(t){return this.flags.binary=t,this}},678:function(t,e,n){var i=n(187),r=n(669)("socket.io-client:url");t.exports=function(t,e){var n=t;e=e||"undefined"!=typeof location&&location,null==t&&(t=e.protocol+"//"+e.host),"string"==typeof t&&("/"===t.charAt(0)&&(t="/"===t.charAt(1)?e.protocol+t:e.host+t),!/^(https?|wss?):\/\//.test(t)&&(r("protocol-less url %s",t),t=void 0!==e?e.protocol+"//"+t:"https://"+t),r("parse %s",t),n=i(t)),!n.port&&(/^(http|ws)$/.test(n.protocol)?n.port="80":/^(http|ws)s$/.test(n.protocol)&&(n.port="443")),n.path=n.path||"/";var a=-1!==n.host.indexOf(":")?"["+n.host+"]":n.host;return n.id=n.protocol+"://"+a+":"+n.port,n.href=n.protocol+"://"+a+(e&&e.port===n.port?"":":"+n.port),n}},669:function(t,e,n){(e=t.exports=n(350)).log=function(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},e.formatArgs=function(t){var n=this.useColors;if(t[0]=(n?"%c":"")+this.namespace+(n?" %c":" ")+t[0]+(n?"%c ":" ")+"+"+e.humanize(this.diff),n){var i="color: "+this.color;t.splice(1,0,i,"color: inherit");var r=0,a=0;t[0].replace(/%[a-zA-Z%]/g,function(t){"%%"!==t&&(r++,"%c"===t&&(a=r))}),t.splice(a,0,i)}},e.save=function(t){try{null==t?e.storage.removeItem("debug"):e.storage.debug=t}catch(t){}},e.load=i,e.useColors=function(){return"undefined"!=typeof window&&!!window.process&&"renderer"===window.process.type||!("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="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(t){}}(),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.formatters.j=function(t){try{return JSON.stringify(t)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}};function i(){var t;try{t=e.storage.debug}catch(t){}return!t&&"undefined"!=typeof process&&"env"in process&&(t=process.env.DEBUG),t}e.enable(i())},350:function(t,e,n){(e=t.exports=i.debug=i.default=i).coerce=function(t){return t instanceof Error?t.stack||t.message:t},e.disable=function(){e.enable("")},e.enable=function(t){e.save(t),e.names=[],e.skips=[];var n,i=("string"==typeof t?t:"").split(/[\s,]+/),r=i.length;for(n=0;n<r;n++)i[n]&&("-"===(t=i[n].replace(/\*/g,".*?"))[0]?e.skips.push(RegExp("^"+t.substr(1)+"$")):e.names.push(RegExp("^"+t+"$")));for(n=0;n<e.instances.length;n++){var a=e.instances[n];a.enabled=e.enabled(a.namespace)}},e.enabled=function(t){var n,i;if("*"===t[t.length-1])return!0;for(n=0,i=e.skips.length;n<i;n++)if(e.skips[n].test(t))return!1;for(n=0,i=e.names.length;n<i;n++)if(e.names[n].test(t))return!0;return!1},e.humanize=n(824),e.instances=[],e.names=[],e.skips=[],e.formatters={};function i(t){var n;function i(){if(i.enabled){var t=+new Date,r=t-(n||t);i.diff=r,i.prev=n,i.curr=t,n=t;for(var a=Array(arguments.length),o=0;o<a.length;o++)a[o]=arguments[o];a[0]=e.coerce(a[0]),"string"!=typeof a[0]&&a.unshift("%O");var s=0;a[0]=a[0].replace(/%([a-zA-Z%])/g,function(t,n){if("%%"===t)return t;s++;var r=e.formatters[n];if("function"==typeof r){var o=a[s];t=r.call(i,o),a.splice(s,1),s--}return t}),e.formatArgs.call(i,a),(i.log||e.log||console.log.bind(console)).apply(i,a)}}return i.namespace=t,i.enabled=e.enabled(t),i.useColors=e.useColors(),i.color=function(t){var n,i=0;for(n in t)i=(i<<5)-i+t.charCodeAt(n)|0;return e.colors[Math.abs(i)%e.colors.length]}(t),i.destroy=r,"function"==typeof e.init&&e.init(i),e.instances.push(i),i}function r(){var t=e.instances.indexOf(this);return -1!==t&&(e.instances.splice(t,1),!0)}},259:function(t){var e={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==e.call(t)}},555:function(t,e,n){var i=n(259),r=n(70),a=Object.prototype.toString,o="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===a.call(Blob),s="function"==typeof File||"undefined"!=typeof File&&"[object FileConstructor]"===a.call(File);e.deconstructPacket=function(t){var e=[],n=t.data;return t.data=function t(e,n){if(!e)return e;if(r(e)){var a={_placeholder:!0,num:n.length};return n.push(e),a}if(i(e)){for(var o=Array(e.length),s=0;s<e.length;s++)o[s]=t(e[s],n);return o}if("object"==typeof e&&!(e instanceof Date)){var o={};for(var l in e)o[l]=t(e[l],n);return o}return e}(n,e),t.attachments=e.length,{packet:t,buffers:e}};e.reconstructPacket=function(t,e){return t.data=function t(e,n){if(!e)return e;if(e&&!0===e._placeholder){if("number"==typeof e.num&&e.num>=0&&e.num<n.length)return n[e.num];throw Error("illegal attachments")}if(i(e))for(var r=0;r<e.length;r++)e[r]=t(e[r],n);else if("object"==typeof e)for(var a in e)e[a]=t(e[a],n);return e}(t.data,e),t.attachments=void 0,t};e.removeBlobs=function(t,e){var n=0,a=t;!function t(l,c,u){if(!l)return l;if(o&&l instanceof Blob||s&&l instanceof File){n++;var h=new FileReader;h.onload=function(){u?u[c]=this.result:a=this.result,!--n&&e(a)},h.readAsArrayBuffer(l)}else if(i(l))for(var d=0;d<l.length;d++)t(l[d],d,l);else if("object"==typeof l&&!r(l))for(var f in l)t(l[f],f,l)}(a),!n&&e(a)}},875:function(t,e,n){var i=n(669)("socket.io-parser"),r=n(767),a=n(555),o=n(259),s=n(70);function l(){}e.protocol=4,e.types=["CONNECT","DISCONNECT","EVENT","ACK","ERROR","BINARY_EVENT","BINARY_ACK"],e.CONNECT=0,e.DISCONNECT=1,e.EVENT=2,e.ACK=3,e.ERROR=4,e.BINARY_EVENT=5,e.BINARY_ACK=6,e.Encoder=l,e.Decoder=h;var c=e.ERROR+'"encode error"';function u(t){var n=""+t.type;if((e.BINARY_EVENT===t.type||e.BINARY_ACK===t.type)&&(n+=t.attachments+"-"),t.nsp&&"/"!==t.nsp&&(n+=t.nsp+","),null!=t.id&&(n+=t.id),null!=t.data){var r=function(t){try{return JSON.stringify(t)}catch(t){return!1}}(t.data);if(!1===r)return c;n+=r}return i("encoded %j as %s",t,n),n}l.prototype.encode=function(t,n){i("encoding packet %j",t),e.BINARY_EVENT===t.type||e.BINARY_ACK===t.type?function(t,e){a.removeBlobs(t,function(t){var n=a.deconstructPacket(t),i=u(n.packet),r=n.buffers;r.unshift(i),e(r)})}(t,n):n([u(t)])};function h(){this.reconstructor=null}r(h.prototype),h.prototype.add=function(t){var n;if("string"==typeof t){if(this.reconstructor)throw Error("got plaintext data when reconstructing a packet");n=function(t){var n=0,r={type:Number(t.charAt(0))};if(null==e.types[r.type])return function(t){return{type:e.ERROR,data:"parser error: "+t}}("unknown packet type "+r.type);if(e.BINARY_EVENT===r.type||e.BINARY_ACK===r.type){for(var a=n+1;"-"!==t.charAt(++n)&&n!=t.length;);var s=t.substring(a,n);if(s!=Number(s)||"-"!==t.charAt(n))throw Error("Illegal attachments");r.attachments=Number(s)}if("/"===t.charAt(n+1)){for(var a=n+1;++n;){var l=t.charAt(n);if(","===l||n===t.length)break}r.nsp=t.substring(a,n)}else r.nsp="/";var c=t.charAt(n+1);if(""!==c&&Number(c)==c){for(var a=n+1;++n;){var l=t.charAt(n);if(null==l||Number(l)!=l){--n;break}if(n===t.length)break}r.id=Number(t.substring(a,n+1))}if(t.charAt(++n)){var u=function(t){try{return JSON.parse(t)}catch(t){return!1}}(t.substr(n));if(function(t,e){switch(t){case 0:return"object"==typeof e;case 1:return void 0===e;case 4:return"string"==typeof e||"object"==typeof e;case 2:case 5:return o(e)&&("string"==typeof e[0]||"number"==typeof e[0]);case 3:case 6:return o(e)}}(r.type,u))r.data=u;else throw Error("invalid payload")}return i("decoded %s as %j",t,r),r}(t),e.BINARY_EVENT===n.type||e.BINARY_ACK===n.type?(this.reconstructor=new d(n),0===this.reconstructor.reconPack.attachments&&this.emit("decoded",n)):this.emit("decoded",n)}else if(s(t)||t.base64){if(this.reconstructor)(n=this.reconstructor.takeBinaryData(t))&&(this.reconstructor=null,this.emit("decoded",n));else throw Error("got binary data when not reconstructing a packet")}else throw Error("Unknown type: "+t)};function d(t){this.reconPack=t,this.buffers=[]}h.prototype.destroy=function(){this.reconstructor&&this.reconstructor.finishedReconstruction()},d.prototype.takeBinaryData=function(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){var e=a.reconstructPacket(this.reconPack,this.buffers);return this.finishedReconstruction(),e}return null},d.prototype.finishedReconstruction=function(){this.reconPack=null,this.buffers=[]}},70:function(t){t.exports=function(t){var i;return e&&Buffer.isBuffer(t)||n&&(t instanceof ArrayBuffer||(i=t,"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(i):i.buffer instanceof ArrayBuffer))};var e="function"==typeof Buffer&&"function"==typeof Buffer.isBuffer,n="function"==typeof ArrayBuffer},42:function(t){t.exports=function(t,e){var n=[];e=e||0;for(var i=e||0;i<t.length;i++)n[i-e]=t[i];return n}},281:function(t){"use strict";var e,n="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),i={},r=0,a=0;function o(t){var e="";do e=n[t%64]+e,t=Math.floor(t/64);while(t>0);return e}function s(){var t=o(+new Date);return t!==e?(r=0,e=t):t+"."+o(r++)}for(;a<64;a++)i[n[a]]=a;s.encode=o,s.decode=function(t){var e=0;for(a=0;a<t.length;a++)e=64*e+i[t.charAt(a)];return e},t.exports=s},821:function(){"ontouchstart"in window&&document.addEventListener("touchstart",function(){return!0})},562:function(){var t,e=document.querySelector(".scrollToIt");if(e){;t=e.offsetTop,window.scrollTo({top:t,behavior:"smooth"})}document.addEventListener("DOMContentLoaded",function(){var t=document.querySelector(".menu_categories");if(!!t){var e=t.querySelector(".item.active");if(e){var n=e.offsetLeft-(t.offsetWidth/2-e.offsetWidth/2);t.scrollTo({left:n,behavior:"smooth"})}}})},969:function(){}},e={};function n(i){var r=e[i];if(void 0!==r)return r.exports;var a=e[i]={exports:{}};return t[i].call(a.exports,a,a.exports,n),a.exports}n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,{a:e}),e},n.d=function(t,e){for(var i in e)n.o(e,i)&&!n.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.rv=function(){return"1.1.6"},n.ruid="bundler=rspack@1.1.6",!function(){"use strict";let t,e;var i,r,a,o,s,l,c={};n.r(c);var u=window.$,h=n.n(u);h().fn.disable=function(t){var e=h()(this);return t&&(e.addClass(t),e.data("disabled-extraClass",t)),e.addClass("disabled"),e.attr("disabled",!0),e=null,this},h().fn.enable=function(){var t=h()(this);t.removeClass("disabled"),t.attr("disabled",!1);var e=t.data("disabled-extraClass");return e&&(t.data("disabled-extraClass",null),t.removeClass(e)),t=null,this},h().fn.addLoader=function(){var t=h()(app.LOADER_HTML||'\n<div class="loader_overlay">\n  <div class="loader"></div>\n</div>\n');return h()(this).data("loader",t).append(t),h()(this).addClass("modal_loading"),this},h().fn.removeLoader=function(){var t=h()(this).data("loader");return t&&t.remove(),h()(this).data("loader",null),h()(this).removeClass("modal_loading"),this},h().fn.showLoader=h().fn.addLoader,h().fn.hideLoader=h().fn.removeLoader,h().fn.countdown=function(t){t=h().extend({useHrs:!1},t||null);var e=h()(this);if(1!==e.length)return e.length>1&&e.each(function(){h()(this).countdown(t)}),this;var n=function(e){e<0&&(e=0);var n=""+Math.floor(e/60);n<10&&(n="0"+n);var i=""+e%60;1===i.length&&(i="0"+i);var r=[n,i];if(t.useHrs){var a=parseInt(n/60);(n%=60)<10&&(n="0"+n),r=[a,n,i]}return r.join(":")},i=t.seconds||function(t){var e=/(?:(\d+):)?(\d+):(\d\d)/.exec(t);if(!e)return 0;var n=parseInt(e[1]);return isNaN(n)&&(n=0),3600*n+60*parseInt(e[2])+parseInt(e[3])}(e.text()),r=null;return i>0?r=setInterval(function(t){i=Math.max(0,i-1),e.trigger("countdown:tick",i),e.text(n(i)),i<=0&&e.trigger("countdown:end"),(i<=0||!e.is(":visible"))&&(clearInterval(r),r=null,e=null)},1e3):e.trigger("countdown:end"),e.text(n(i)),this},h().fn.focusEnd=function(){var t=h()(this).eq(0);if(!!t.is("input")){t.focus();var e=t.get(0);if("number"==typeof e.selectionStart)e.selectionStart=e.selectionEnd=e.value.length;else if(void 0!==e.createTextRange){e.focus();var n=e.createTextRange();n.collapse(!1),n.select()}}};var d=window.app&&window.app.CHECK_MAINTENANCE_URL||"/api/maintenance",f=window.app&&window.app.CHECK_MAINTENANCE_INTERVAL||6e4,p=_env.maintenanceUrl,g=_env.errorUrl,m=_env.homeUrl;window.location.pathname!==g&&setInterval(function(){var t=window.location.pathname===p,e=_env.language;h().ajax({url:d,data:{isMaintenancePage:t,language:e},success:function(e){e.maintenance?!t&&window.location.replace(p):t&&window.location.replace(m)}})},f);var v={},y=[];function b(t){h()(document).on("modal:show",w),h()(document).on("modal:update",w),h()(document).on("shown.bs.modal",w),w()}function x(){var t=h()(this),e=t.attr("data-href")||t.attr("href");if(!!e){t.attr("data-href",e);var n=[];for(var i in v){var r=v[i];n.push(i+"="+encodeURIComponent(r))}e+=(e.indexOf("?")>0?"&":"?")+n.join("&"),t.attr("href",e)}}function w(){y.length&&h()(y.join(", ")).each(x)}function _(t){v=h().extend(v,t),w()}h().socials={init:b,update:_};try{_({timezone:window.Intl.DateTimeFormat().resolvedOptions().timeZone})}catch(t){}y.push('a[href^="/sign-in/social/"]'),_env.language&&y.push('a[href^="/'+_env.language+'/sign-in/social/"]'),b();function k(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=Array(e);n<e;n++)i[n]=t[n];return i}function S(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n,i,r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var a=[],o=!0,s=!1;try{for(r=r.call(t);!(o=(n=r.next()).done)&&(a.push(n.value),!e||a.length!==e);o=!0);}catch(t){s=!0,i=t}finally{try{!o&&null!=r.return&&r.return()}finally{if(s)throw i}}return a}}(t,e)||function(t,e){if(t){if("string"==typeof t)return k(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if("Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return k(t,e)}}(t,e)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var C=function(t){var e=JSON.stringify,n=JSON.parse;function i(e){try{return n(window.localStorage.getItem(t))[e]||null}catch(t){}return null}return{get:i,set:function(i,r){var a=null;try{(a=n(window.localStorage.getItem(t)))[i]=r}catch(t){(a={})[i]=r}window.localStorage.setItem(t,e(a))},has:function(t){return null!==i(t)},remove:function(i){var r=n(window.localStorage.getItem(t));delete r[i],window.localStorage.setItem(t,e(r))},clear:function(){window.localStorage.removeItem(t)}}}((window._env&&window._env.playerUUID||"_")+"/cd/"),M={};function A(){return parseInt(new Date().valueOf()/1e3)}function L(t){var e=A();if(t.cd){var n=S(t.cd,2),i=n[0],r=n[1];C.set(i,e),C.set(i+"*",e+r)}}function E(t){if(t.cd){var e=S(t.cd,2),n=e[0];e[1],C.remove(n),C.remove(n+"*")}}h()(document).on("change",'[data-toggle="cooldown-checkbox"]',function(){var t=h()(this),e=null;try{e=t.attr("data-cooldown"),e=JSON.parse(e)||{}}catch(t){e={}}t.prop("checked")?L(e):E(e)});var T={has:function(t){if(t.group&&M[t.group])return!0;var e=A();if(t.depends){var n=S(t.depends,2),i=n[0],r=n[1],a=r?C.get(i)+r:C.get(i+"*");if(isNaN(a)&&(a=0),a>e)return!0}if(!t.cd||t.ignore_cd)return!1;var o=S(t.cd,2),s=o[0],l=o[1];return!(C.get(s)+l<e)&&!0},trigger:function(t){var e=A();if(t.cd){var n=S(t.cd,2),i=n[0],r=n[1];C.set(i,e),C.set(i+"*",e+r)}if(t.setCd){var a=S(t.setCd,2),o=a[0],s=a[1];C.set(o,e),C.set(o+"*",e+s)}t.group&&(M[t.group]=1)}};function O(t){var e,n,i,r,a,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10,s=!1,l=!1,c=0,u=0,h=0,d=0,f={current:["input"],closest:["[data-stop-scroll]"]};t.addEventListener("mousedown",function(t){(function(t,e){var n=!0;return e.current&&(n=!e.current.some(function(e){return t.classList.contains(e.split(".")[1])||t.hasAttribute(e)||t.tagName===e.toLocaleUpperCase()||t.id===e.split("#")[1]})),e.closest&&n&&(n=!e.closest.some(function(e){return t.closest(e)})),n})(t.target,f)&&(s=!0,l=!1,e=t.clientX,n=t.clientY,t.currentTarget.scrollLeft,t.currentTarget.scrollTop,c=0,u=0,h=0,d=0,document.activeElement.blur(),P(t))}),t.addEventListener("mouseleave",function(){s=!1,l=!1}),t.addEventListener("mouseup",function(){!0===l&&t.addEventListener("click",function(t){return P(t)},{once:!0}),s=!1,l=!1}),t.addEventListener("mousemove",function(t){if(s){var i=t.clientX,r=t.clientY;h=c,d=u;var a=h-(c=i-e),f=d-(u=r-n);l=!(Math.sqrt(Math.pow(c,2)+Math.pow(u,2))<o)&&!0,t.currentTarget.scrollLeft+=a,t.currentTarget.scrollTop+=f}}),t.addEventListener("scroll",function(e){t.classList.add("scrolling"),t.classList.contains("scrolling")&&(clearTimeout(a),a=setTimeout(function(){t.classList.remove("scrolling")},100))})}h()(function(){h()("[data-click-onready]").each(function(){var t=h()(this),e=null;try{e=t.attr("data-click-onready"),e=JSON.parse(e)||{}}catch(t){e={}}if(!T.has(e))t.click(),T.trigger(e)})});function P(t){t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation()}i=function(){var t=document.querySelectorAll(".mdrag"),e=!0,n=!1,i=void 0;try{for(var r,a=t[Symbol.iterator]();!(e=(r=a.next()).done);e=!0){var o=r.value;!o.dataset.mdrag&&(O(o),o.dataset.mdrag="active")}}catch(t){n=!0,i=t}finally{try{!e&&null!=a.return&&a.return()}finally{if(n)throw i}}},h()(i),h()(document).on("modal:show",i),h()(document).on("modal:update",i),h()(document).on("content:loaded",i),h()(document).on("content:updated",i),document.addEventListener("DOMContentLoaded",function(){"undefined"!=typeof LiveChatWidget&&function(){LiveChatWidget.on("ready",function(){h()("#chat-widget-container").removeClass("open")}),LiveChatWidget.on("visibility_changed",function(t){switch(t.visibility){case"maximized":h()("#chat-widget-container").addClass("open");break;case"minimized":h()("#chat-widget-container").removeClass("open");break;case"hidden":h()("#chat-widget-container").removeClass("open")}})}()});function D(){if(window.askwidget)return window.askwidget.open(),!0;if(window.webim&&window.webim.api&&window.webim.api.chat)return window.webim.api.chat.start(),!0;if("undefined"!=typeof LiveChatWidget)return LiveChatWidget.call("maximize"),!0;else if("undefined"!=typeof olark)return olark("api.box.expand"),!0;else if("undefined"!=typeof zE)return zE("webWidget","toggle"),!0;else if("undefined"!=typeof Tawk_API)return Tawk_API.maximize(),!0;return!1}h()(document).on("click",".open_support_chat",function(t){t.preventDefault(),D()}),h()(function(){var t=null,e=50;"1"===function(t){for(var e,n=/[?&]([^=#]+)=([^&#]*)/g,i={};e=n.exec(t);){;i[e[1]]=decodeURIComponent(e[2])}return i}(location.href).linkOpenChat&&(t=setInterval(function(){e--,(D()||e<0)&&(t&&clearInterval(t),t=null)},200))}),h()(document).on("change",'input[type="file"]',function(t){if(this.id&&this.form){var e=h()(this.form),n=this.files;e.find('[for="'.concat(this.id,'"]')).each(function(){var t=h()(this);if(0===n.length&&t.is("[data-label-empty]")){var e=t.attr("data-label-empty");t.html(e)}else if(1===n.length&&t.is("[data-label-one]")){var i=t.attr("data-label-one");t.html(i.replace("{file}",n[0].name))}else if(t.is("[data-label-many]")){var r=t.attr("data-label-many");t.html(r.replace("{count}",n.length))}})}});var I=h()(".minimize_able");function j(){I.each(function(t,e){var n=h()(e);n.css("--max-height",n.data("minimized-size")),e.scrollHeight>=e.dataset.minimizedSize?(!n.hasClass("user-manual")&&n.addClass("minimized"),n.removeClass("no_minimized")):(n.removeClass("minimized"),n.addClass("no_minimized")),n.find("input")[0].value.length>0?n.removeClass("minimized"):!n.hasClass("user-manual")&&n.addClass("minimized")})}h()(document).on("click",".toggle_text",function(){console.log("click"),h()(this).closest(I).toggleClass("user-manual")}),h()(document).on("content:updated",j),h()(document).on("modal:show",j),j();var F=h()(document);function N(t){if(!t)return!1;if("#"!==t[0]&&(t="#"+t),window.location.hash!==t){window.location.hash=t;return}if(!t)return!1;var e=null,n=t.indexOf("?");n>=0&&(e=t.substr(n),t=t.substr(0,n));var i=F.find('[href="'+t+'"][data-href]').eq(0);if(!i.length)return!1;if(e){e=e.replace(/^[?&]/,"").split("&").map(function(t){return t.split("=")}).filter(function(t){return"http_referer"!==t[0]}).map(function(t){return t.join("=")}).join("&");var r=i.attr("data-href");r&&i.attr("data-href",r+(r.indexOf("?")>=0?"&":"?")+e)}return i.trigger("click"),!0}h()(window).on("hashchange",function(t){var e=t.originalEvent.newURL,n=e.substr(e.indexOf("#"));if(!n||"#Sport"!==n.split("/")[0])N(n)}).on("load",function(){var t=window.location.hash;t&&N(t)});function R(t){var e=document.createElement("div");e.innerHTML=t;var n=!0,i=!1,r=void 0;try{for(var a,o=e.querySelectorAll('link:not([rel="stylesheet"]), meta')[Symbol.iterator]();!(n=(a=o.next()).done);n=!0)a.value.remove()}catch(t){i=!0,r=t}finally{try{!n&&null!=o.return&&o.return()}finally{if(i)throw r}}var s=new Set(Array.from(document.scripts).map(function(t){return t.src}).filter(function(t){return t&&t.length})),l=!0,c=!1,u=void 0;try{for(var h,d=e.querySelectorAll("script[src]")[Symbol.iterator]();!(l=(h=d.next()).done);l=!0){var f=h.value;s.has(f.src)&&f.remove()}}catch(t){c=!0,u=t}finally{try{!l&&null!=d.return&&d.return()}finally{if(c)throw u}}return e.innerHTML}var z=h()(document);function B(t,e){e=void 0===t||e;var n=null;return(t&&0===(n=z.find("#"+t)).length&&(n=null),null===n&&e&&(n=h()('<div class="modal"></div>')),null===n)?null:(n.addClass("no_animation"),t&&n.attr("id",t),z.find("body").append(n),n)}function H(t,e){var n=h()(t),i=n.is(".modal")?n:n.closest(".modal");if(i.hide(),i.trigger("modal:close",i),e&&i.trigger("modal:close:target",e),U(),!i.attr("data-modal-keep")&&(i.remove(),i.trigger("modal:remove",i)),window.location.hash&&0===z.find(".modal:visible:last").length){var r=window.location.href;history.pushState({},"",r.substr(0,r.indexOf("#")))}}function W(){var t=z.find("#modal_overlay");return!t.length&&(t=h()('<div id="modal_overlay" class="modal_overlay"></div>')),h()(document.body).append(t),h()(document.body).addClass("modal_open"),t.show(),t}function U(){var t=z.find("#modal_overlay"),e=z.find(".modal:visible:last");e.length?(t.show(),t.insertBefore(e),h()(document.body).addClass("modal_open")):(t.hide(),h()(document.body).removeClass("modal_open"))}function q(){var t=document.title;document.title="",document.title=t}z.on("click",".modal .close_modal",function(t){H(this,t),q(),"#"===h()(this).attr("href")&&t.preventDefault()}),z.on("click",'button[data-toggle="ajax-modal"], a[data-toggle="ajax-modal"]:not(.disabled)',function(t){t.preventDefault();var e=h()(this);e.is("[data-fields]")&&(t.stopPropagation(),t.stopImmediatePropagation());var n=e.attr("data-href")||e.attr("href");if(!n){console.error("Undefined url");return}var i=e.attr("href");i&&"#"===i[0]&&"#"!==i&&history.pushState({},"",i);var r=e.attr("data-method")||"get";r=r.toLowerCase();var a=e.attr("data-modal-id")||!1;"true"!==e.attr("data-loader-hide")&&W();var o=!1;e.is("[data-error-inside]")&&(o=!0);var s=e.is("[data-toggle-bonus]"),l=B(a,!0),c=e.attr("data-loader-container")?l.find(e.attr("data-loader-container")):l.find(".popup");0===c.length&&(c=l),l.show(),c.length&&e.attr("data-clear-container")&&c.empty(),"true"!==e.attr("data-loader-hide")&&c.addLoader&&c.addLoader(),e.disable&&e.disable();var u={method:r,url:n,success:function(t){if("string"==typeof t){s&&z.trigger("bonus:update");var n,i=h()(R(t));l.replaceWith(i),n=l=i,window.setTimeout(function(){var t=null;h()(["input[autofocus]",".has-error input"]).each(function(e,i){return 0===(t=n.find(i)).length}),t.eq(0).focus(),t=null},100),z.trigger("modal:show",l),U(),q();return}o&&t||(l.hide(),U(),q());var r=z.find(e.attr("data-error-placeholder")),a=r.closest(".form-group, .contact_info_item");t.error?(a.addClass("has-error"),r.text(t.error),a.removeClass("has-success").find(".has-success").removeClass("has-success").addClass("has-error")):(a.removeClass("has-error"),r.text(""))},error:function(t,e,n){console.error("ajax-modal",n),l.remove(),U()},complete:function(){c.removeLoader&&c.removeLoader(),e.enable&&e.enable()}};if("post"===r)try{for(var d in u.data=JSON.parse(e.attr("data-fields"))||{},u.data)("undefined"===u.data[d]||"null"===u.data[d])&&delete u.data[d];if(e.is("form *")){for(var f=e.closest("form").serializeArray(),p=0;p<f.length;p++){var g=f[p].name,m=f[p].value,v=g.match(/^[\w\d]+\[([\w\d]+)\]$/);v&&(g=v[1]),void 0!==u.data[g]&&(u.data[g]=m)}}}catch(t){u.data={}}h().ajax(u)}),z.on("click",'button[data-toggle="show-modal"], a[data-toggle="show-modal"]',function(t){var e=h()(this),n=e.attr("data-target")||e.attr("href");if(!!n){t.preventDefault(),"#"===n[0]&&(n=n.substr(1));var i=B(n,!1);if(!i){console.error("Modal #"+n+" not found.");return}W(),i.show(),z.trigger("modal:show",i),U()}}),z.on("submit",'form[data-toggle="ajax-modal"]',function(t){t.preventDefault();var e,n=h()(this);e=t.submitter&&t.submitter.getAttribute("formaction")?t.explicitOriginalTarget.formaction:t.originalEvent&&t.originalEvent.submitter&&t.originalEvent.submitter.getAttribute("formaction")?t.originalEvent.submitter.getAttribute("formaction"):n.attr("action");var i=n.attr("method"),r=n.serialize(),a=n.attr("data-modal-id")||!1,o=a?B(a,!0):n.closest(".modal");W(),o.addLoader&&o.addLoader(),o.show(),U(),o.trigger("modal:beforeSubmit",o);var s={method:i,url:e,data:r,success:function(t){var e;if(o.trigger("modal:afterSubmit",t),(void 0===t?"undefined":(e=t)&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e)=="object"){if(t.modalUpdate){var n=h()(R(t.modalUpdate));o.replaceWith(n),o=n,z.trigger("modal:show",o),q()}if(t.modal){var i=B(!1,!0);i.replaceWith(h()(R(t.modal))),i.show(),z.trigger("modal:show",i),U(),q()}if(t.update&&(o.replaceWith(h()(R(t.update))),z.trigger("modal:update",o),q()),t.alert){var r=B(!1,!0);r.replaceWith(h()(R(t.alert))),r.show(),z.trigger("modal:show",r),U(),q()}if(t.user&&h()('[data-attribute="user.username"]').text(t.user.username),t.windowUrl){var a=document.createElement("a");a.href=t.windowUrl,a.target="_blank",a.style.display="none",document.body.appendChild(a),a.click(),a.remove(),H(".modal")}return}o.replaceWith(h()(R(t))),z.trigger("modal:update",o),U(),q()},error:function(t,e,n){if(![301,302].includes(t.status))o.remove(),U(),console.error("ajax-modal",n)},complete:function(t){if(![301,302].includes(t.status))o.removeLoader&&o.removeLoader()}};"multipart/form-data"===n.attr("enctype")&&(s.cache=!1,s.contentType=!1,s.processData=!1,s.data=new FormData(n.get(0))),h().ajax(s)}),h().fn.modal=function(t){var e=h()(this);if(1!==e.length)return e.each(function(){h()(this).modal(t)}),this;z.find("body").append(e),e.show(),W(),U()},h().modal_alert=function(t){var e=B(!1,!0);e.replaceWith(h()(R(t))),e.show(),z.trigger("modal:show",e),W(),U()};var V=h()(document);V.on("click",'[data-toggle="ajax-bonus"]',function(t){t.preventDefault();var e,n=h()(this);e=n.closest("[activate-target-overlay]").length?n.closest("[activate-target-overlay]"):n.closest("[activate-none-overlay]").length?void 0:n.closest(".modal").length>0?n.closest(".modal"):h()("body");var i=n.attr("data-target")||n.attr("data-href")||n.attr("href"),r=n.data("fields"),a=n.attr("data-card"),o=a?n.closest(a):null;(!o||!o.length)&&(o=n.parent()),n.disable("loading"),e&&e.addLoader(),h().ajax({url:i,method:"post",data:r,success:function(t){if("string"==typeof t){console.error("typeof data == string");return}if(t.redirectUrl){var e=n.closest(".modal");!e.attr("id")&&H(e),"#"===t.redirectUrl[0]&&window.location.hash===t.redirectUrl?N(t.redirectUrl):"false"!==t.redirectUrl&&window.location.replace(t.redirectUrl)}if(t.status&&V.trigger("bonus:update",{status:t.status}),t.alert||t.modal){var i=t.alert||t.modal,r=B();r.replaceWith(h()(R(i))),r.show(),W(),U(),V.trigger("modal:show",r)}else if(t.errorMessage){var a=n.next();if((!a.length||!a.is("div,span"))&&!(a=o.find(".bonus_error")).length&&(a=h()('<div class="bonus_error"></div>'),o.append(a)),a.html(t.errorMessage),o.addClass("has_error"),o.attr("error-manual")){var s=o.siblings(".text_bonus"),l=h()('<div class="error_close"></div>');s.addClass("has_error"),l.on("click",function(){a.remove(),o.removeClass("has_error"),s.removeClass("has_error")}),a.append(l)}}},error:console.error,complete:function(){n.enable(),e.removeLoader()}})});var Y=h()(document);Y.on("submit",'form[data-type="ajax-cashbox"]',function(t){t.preventDefault();var e=h()(this),n=e.attr("action"),i=e.attr("method"),r=e.parents(".profile_cashbox");0===r.length&&(r=e);var a=e.serializeArray().reduce(function(t,e){return t[e.name]=e.value,t},{});h()(["data-fields","data-fields-once"]).each(function(t,n){var i=e.attr(n);if(i)try{i=JSON.parse(i),a=h().extend(a,i)}catch(t){console.error(t)}}),e.attr("data-fields-once",null);var o=e.find('[type="submit"]');o.disable&&o.disable("loading"),r.addLoader&&r.addLoader(),e.find(".error").hide(),h().ajax({method:i,url:n,data:a,success:function(t){if(t.success,t.data||t.modal||t.alert){var n=B();n.replaceWith(h()(R(t.data||t.modal||t.alert))),n.show(),U(),o.enable&&o.enable(),r.removeLoader&&r.removeLoader();return}if(t.redirectUrl){window.location.replace(t.redirectUrl);return}if(t.windowUrl){var i=document.createElement("a");i.href=t.windowUrl,i.target="_blank",i.style.display="none",document.body.appendChild(i),i.click(),i.remove(),H(".modal_cashbox");return}if(t.error){var a=e.find(".error").show().find(".text");a.hasClass("to-html")?a.html(t.error):a.text(t.error),o.enable&&o.enable(),r.removeLoader&&r.removeLoader();return}if(t.warning){var s=e.find(".form_overlay");s.length&&(s.show(),s.find(".text").html(t.warning)),o.enable&&o.enable(),r.removeLoader&&r.removeLoader()}},error:function(t,e,n){console.error("ajax-cashbox",t),console.error("ajax-cashbox",n),o.enable&&o.enable(),r.removeLoader&&r.removeLoader()}})}),h()(document).on("afterValidateAttribute",function(t,e,n){var i=h()(t.target),r=i.attr("data-submit-button");if(!r)return;var a=i.find(r);if(0!==a.length)0===n.length&&i.find(".form-group").length===i.find(".form-group.has-success, .form-group.no-validation").length?a.enable&&a.enable():a.disable&&a.disable()}),n("821");h()(document).on("click",'[data-toggle="tag_ad"]',function(t){t.preventDefault();var e=h()(this),n=e.attr("href"),i=e.closest(".modal"),r=i&&i.length;h().ajax({url:n,success:function(t){"success"===t.status&&t.messages?location.replace(t.messages):(console.error(t),e.disable())},error:function(t){console.error(t),e.disable()},complete:function(){e.removeClass("loading"),r&&(i.removeLoader(),H(i)),U()}}),e.addClass("loading"),r&&i.addLoader()});var J=h()(document);J.on("click",'[data-toggle="ajax-action"]',function(t){t.preventDefault();var e=h()(this),n=e.attr("data-target")||e.attr("data-href")||e.attr("href"),i=e.data("fields"),r=e.data("loader");r&&h()("body").addLoader(),e.disable("loading");var a={url:n,method:"get"};i&&(a.method="POST",a.data=i),h().ajax(a).done(function(t){if("string"==typeof t){console.error("typeof data == string");return}if(null==t){console.error("data == null");return}if(t.hideAction&&e.remove(),t.refresh||t.reload){window.location.reload();return}if(t.redirectUrl){"#"===t.redirectUrl[0]&&window.location.hash===t.redirectUrl?N(t.redirectUrl):t.newWindow?!function(t,e){var n,i=new Set(["jpg","jpeg","png","bmp"]),r=new Set(["pdf"]);if(i.has(e)){;(n=new Image).src=t,setTimeout(function(){window.open("","_blank").document.body.insertAdjacentElement("afterbegin",n)})}r.has(e)&&setTimeout(function(){window.open(t,"_blank")})}(t.redirectUrl,t.format):window.location.replace(t.redirectUrl);return}if(t.alert||t.modal){var n=t.alert||t.modal,i=B();W(),i.replaceWith(h()(R(n))),i.show(),U(),e.removeClass("loading disabled"),e.disabled=!1,J.trigger("modal:show",i)}}).fail(function(t,e){console.log("ajax-action: %c".concat(e),"color: red"),console.log(t)}).always(function(){r&&h()("body").removeLoader()})});var X=h()(document);X.on("content:loaded",function(t){var e=h()(t.target),n=h().parseHTML(e.attr("data-overlay-content")),i=1e3*parseInt(e.attr("data-overlay-timeout"));i&&0!==n.length&&(clearTimeout(e[0].timeoutTimer),e[0].timeoutTimer=setTimeout(function(){e.append(n)},i))}),X.on("click",'[data-toggle="ajax-content"]',function(t){t.preventDefault();var e=h()(this),n=e.attr("data-target")||e.attr("data-href")||e.attr("href"),i=e.attr("data-container");if(!i)throw Error("Container not defined");var r=h()(i);if(0===r.length)throw Error("Container not found");var a=e.attr("data-ajax-content");try{a=JSON.parse(a)||{}}catch(t){a={}}var o=r.attr("data-loaded")||0;if(!!e.attr("data-load-nocache")||o!==a.id&&(!!a.id||!o)){var s={url:n,method:a.method||"get",success:function(t){if(e.attr("data-ajax-replace")){var n=h()(R(t));r.replaceWith(n),console.log(r=n)}else r.empty().append(h()(R(t)));r.attr("data-loaded",a.id||1),r.addClass("loaded"),e.addClass("loaded"),r.trigger("content:loaded",r.get(0))},error:console.error,complete:function(){r.removeLoader&&r.removeLoader()}};r.addLoader&&r.addLoader(),h().ajax(s)}});var G=h()(document);function K(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=Array(e);n<e;n++)i[n]=t[n];return i}h().fn.updateContainer=function(t){var e=h()(this);if(1!==e.length)return e.each(function(){h()(this).updateContainer(t)}),this;var n=t.url;!t.noLoader&&e.addLoader(),h().ajax({url:n,success:function(t){t=R(t),e.empty().append(t)},error:console.error,complete:function(){e.removeLoader()}})},G.on("bonus:update",function(){h()("[data-update-url]").each(function(){var t=h()(this),e=t.attr("data-update-url"),n=t.is("[data-no-loader]");t.updateContainer({url:e,noLoader:n})})});var Z=h()(document);function Q(){h()("body").removeClass("aside_open"),function(){var t,e=function(t){if(Array.isArray(t))return K(t)}(t=document.querySelectorAll("[data-fake-aside]"))||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return K(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if("Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return K(t,e)}}(t)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}();0!==e.length&&(e=e.filter(function(t){return t.classList.contains("open")})).forEach(function(t){t.classList.contains("elMenu")?t.querySelector(".elClose").click():t.classList.remove("open")})}(),h()(".aside.open").removeClass("open").trigger("aside:close")}function tt(){var t,e,n=h()(this).attr("data-aside-id");if(!!n){"#"!==n[0]&&(n="#".concat(n));var i=Z.find(n);if(i.length){if(document.body.classList.contains("aside_open"))Q();else{;Q(),t=i,(e=h()("body")).addClass("aside_open"),"false"===t.attr("data-aside-overlay")&&e.addClass("no_overlay"),t.addClass("open").trigger("aside:open")}}}}(r=h()(".aside_overlay")).length||(r=h()('<div class="aside_overlay close_aside"></div>'),h()("body").append(r)),Z.on("click",'[data-toggle="aside"]',tt),Z.on("click",'[data-toggle-aside="aside"]',tt),Z.on("click",".close_aside",function(){Q()});function te(t){t+=":";var e=JSON.stringify,n=JSON.parse;function i(e){return t+":"+e}function r(e){try{var i;return n(window.localStorage.getItem((i=e,t+":"+i)))||null}catch(t){}return null}function a(e){window.localStorage.removeItem(t+":"+e)}return{get:r,set:function(n,i){if(null===i){a(n);return}window.localStorage.setItem(t+":"+n,e(i))},has:function(t){return null!==r(t)},remove:a,clear:function(){console.log("clear is not supported")}}}h()(".aside_overlay").on("swipeleft swiperight",Q),Z.on("click",'[data-toggle="ajax-modal"]',Q),Z.on("click",".close_aside",Q),Z.on("form:afterSubmit",function(t){var e=document.getElementById(t.target.getAttribute("data-container-id"));e&&e.hasAttribute("data-fake-aside")&&Q()}),Z.on("elMenu:open",Q),Z.on("modal:open",Q),Z.on("close_aside",Q);var tn="0000000000000000",ti=window._env&&window._env.brandId||"",tr=window._env&&window._env.playerUUID||"",ta=window._env&&window._env.affiliateId||null;tn===ta&&(ta=null);var to=window._env&&window._env.affiliateUrl||"",ts="".concat(to,"/visitor?brandId=").concat(ti),tl="".concat(to,"/guest-page-view/{visitor}?brandId=").concat(ti),tc="".concat(to,"/page-view/{uuid}?brandId=").concat(ti),tu={utm_source:"",utm_campaign:"",utm_medium:"",utm_content:"",utm_term:"",extra_param:"",pid:"",promo:"",saff_id:"",clickid:""},th={utm_source:"",utm_campaign:"",utm_medium:"",utm_content:"",utm_term:"",extra_param:"",clickid:"",pid:"",saff_id:"",promo_code:"",uid:""},td=te(ti);h().fn.initBtag=function(){var t=h()(this);if(1!==t.length)return t.each(function(){h()(this).initBtag()}),this;try{var e=window._env.btag||JSON.stringify(td.get("utms"))||null;e&&t.val(e),h()(document).on("btag",function(e,n){t.val(n)})}catch(t){console.error(t)}},h()(document).on("btag",function(){var t=tf(),e={};t&&(t.promo_code&&(e.affiliateId=t.promo_code),t.referrerUserId&&(e.referrerUserId=t.referrerUserId)),_env.btag&&(e.btag=_env.btag),h().socials&&h().socials.update(e)});function tf(){var t=td.get("utms"),e=t&&t.promo_code||null,n=null;try{n=decodeURIComponent(/m_click_o=([^;]+)/.exec(document.cookie)[1])}catch(t){}if(null===n)try{n=decodeURIComponent(/m_click=([^;]+)/.exec(document.cookie)[1])}catch(t){}if(!e&&!n)return null;var i={};if(e){for(var r in th)i[r]=t[r];i.referrerUserId=td.get("visitor")}else i.promo_code=tn;return n&&(i.m_click=n),i}function tp(){var t=tf();if(!!t){var e=JSON.stringify(t);window._env.btag=e,h()(document).trigger("btag",e)}}function tg(t){var e,n,i=td.get("utms"),r=td.get("visitor"),a=function(t){for(var e,n=/[?&]([^=#]+)=([^&#]*)/g,i={};e=n.exec(t);)e[1]in tu&&(i[e[1]]=decodeURIComponent(e[2]));return i}(t),o=a.promo;if((e=o)&&"string"==typeof e&&e.length>=30)a.http_referer=document.referrer,a.aff_landing=o.substr(0,4),a.aff_token=o.substr(4,10),a.promo_code=o.substr(14,16),!function(t,e){if(null===t&&null===e)return!0;if(null===t||null===e)return!1;for(var n in t)if(t[n]!==e[n])return!1;for(var i in e)if(t[i]!==e[i])return!1;return!0}(i,a)&&(td.set("utms",a),i=a,r=null);if(tr){if(ta){var s=tc.replace("{uuid}",tr);h().ajax({url:s,method:"POST",headers:{"Content-Type":"application/json"}})}tp();return}if(!i){tp();return}if(r){var l=tl.replace("{visitor}",r);h().ajax({url:l,method:"POST",headers:{"Content-Type":"application/json"}}),tp();return}var c=tf();if(!c||(void 0===c?"undefined":(n=c)&&"undefined"!=typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)!="object"||JSON.stringify(c)===JSON.stringify({})){tp();return}c.http_referer=document.referrer,h().ajax({url:ts,method:"POST",headers:{"Content-Type":"application/json"},data:JSON.stringify(c),success:function(t){r=t.referrerUserId,td.set("visitor",r);var e=tl.replace("{visitor}",r);h().ajax({url:e,method:"POST",headers:{"Content-Type":"application/json"}}),tp()},error:function(t){console.log(t),tp()}})}tg(document.location.href);function tm(t,e,n,i,r,a,o){try{var s=t[a](o),l=s.value}catch(t){n(t);return}s.done?e(l):Promise.resolve(l).then(i,r)}function tv(t){return function(){var e=this,n=arguments;return new Promise(function(i,r){var a=t.apply(e,n);function o(t){tm(a,i,r,o,s,"next",t)}function s(t){tm(a,i,r,o,s,"throw",t)}o(void 0)})}}function ty(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function tb(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function tx(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable}))),i.forEach(function(e){tb(t,e,n[e])})}return t}function tw(t,e){var n,i,r,a,o={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){return function(a){if(n)throw TypeError("Generator is already executing.");for(;o;)try{if(n=1,i&&(r=2&a[0]?i.return:a[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,a[1])).done)return r;switch(i=0,r&&(a=[2&a[0],r.value]),a[0]){case 0:case 1:r=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,i=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(r=(r=o.trys).length>0&&r[r.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!r||a[1]>r[0]&&a[1]<r[3])){o.label=a[1];break}if(6===a[0]&&o.label<r[1]){o.label=r[1],r=a;break}if(r&&o.label<r[2]){o.label=r[2],o.ops.push(a);break}r[2]&&o.ops.pop(),o.trys.pop();continue}a=e.call(t,o)}catch(t){a=[6,t],i=0}finally{n=r=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,s])}}}var t_=h()(document),tk=function(){var t,e,n;function i(t,e,n){!function(t,e){if(!(t instanceof e))throw TypeError("Cannot call a class as a function")}(this,i),tb(this,"DEFAULT",{userOnly:!0,debug:!1}),this.socket=null,this.name=t,this.url=e,this.url_wss="",this.stoped=!1,this.errors=0,this.options=tx({},this.DEFAULT,n),this.debug=this.options.debug,this.userOnly=this.options.userOnly,this.initResolve=null,this.init()}return t=i,e=[{key:"urlCheck",value:function(){var t=this;return tv(function(){return tw(this,function(e){switch(e.label){case 0:if(t.errors>=10&&(t.url_wss=""),t.url_wss)return[2,t.url_wss];if(-1!==t.url.search("wss:"))return[3,2];return[4,h().ajax({url:t.url,data:{},success:function(t){return t}})];case 1:return[2,e.sent()];case 2:return[2,t.url];case 3:return[2]}})})()}},{key:"globalStorage",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};!window._WScasino&&(window._WScasino={});var n=window._WScasino[this.name],i={name:this.name,socket:this.socket,socketStatus:1==this.socket.readyState?"ONLINE":"CLOSED",errors:this.errors,action:{setStop:function(e){return t.stop(e)}}};window._WScasino[this.name]=tx({},n,i,e)}},{key:"checkConnection",value:function(){this.globalStorage(),this.debug&&(this.stoped?this.debugLog("stoped.❗","red"):0==this.socket.readyState?this.debugLog("connecting... \uD83D\uDD03"):1==this.socket.readyState?(this.errors=0,this.debugLog("connected. ✅","green")):this.debugLog("closed.❗","red"))}},{key:"stop",value:function(t){this.stoped=t,t?this.socket.close():this.init()}},{key:"debugLog",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"grey";this.debug&&(console.groupCollapsed("WebSocket - %c ".concat(this.name,": %c ").concat(t),"color: orange","color: ".concat(e)),console.log("Name:",this.name),console.log(window._WScasino),console.groupEnd())}},{key:"init",value:function(){var t=this;return tv(function(){return tw(this,function(e){switch(e.label){case 0:if(t.userOnly&&!window._env.playerUUID)return t.debugLog("stop (only for user)."),[2];if(!t.url)return t.debugLog("url undefined. ❗","red"),[2,!1];return[4,t.urlCheck()];case 1:return t.url_wss=e.sent(),t.socket=new WebSocket(t.url_wss),t.globalStorage(),t.socket.onmessage=function(e){try{var n=JSON.parse(e.data);t.globalStorage({lastData:n}),t.debug&&console.log("Socket data:",n);var i=new CustomEvent(t.name,{bubbles:!0,detail:n});if(document.dispatchEvent(i),n.type){var r=n.type?n.type:t.name;t_.trigger(r,n),console.log("Socket data:",n)}}catch(e){t.debugLog("ERROR!","red"),console.error("".concat(t.name," > Socket message error: "),e.message)}},t.socket.onopen=function(e){t.checkConnection(),t.initResolve&&t.initResolve();var n=new CustomEvent("".concat(t.name,":open"),{bubbles:!0});document.dispatchEvent(n)},t.socket.onclose=function(e){t.checkConnection(),!t.stoped&&(t.errors++,setTimeout(function(){t.debugLog("reconnect try... ".concat(t.errors,"\uD83D\uDD03")),t.init()},1e3*(t.errors>9?10:t.errors)))},t.socket.onerror=function(e){t.debugLog("error ".concat(t.errors,"\uD83D\uDD03"))},[2]}})})()}},{key:"onInit",value:function(){var t=this;return tv(function(){return tw(this,function(e){return[2,new Promise(function(e){t.initResolve=e}).then(function(e){return t.socket})]})})()}}],ty(t.prototype,e),i}();function tS(t){!window.socketDataStorage&&(window.socketDataStorage={}),window.socketDataStorage[t.type]=t}var tC=n("809"),tM=n.n(tC);function tA(t,e,n,i,r,a,o){try{var s=t[a](o),l=s.value}catch(t){n(t);return}s.done?e(l):Promise.resolve(l).then(i,r)}function tL(t){return function(){var e=this,n=arguments;return new Promise(function(i,r){var a=t.apply(e,n);function o(t){tA(a,i,r,o,s,"next",t)}function s(t){tA(a,i,r,o,s,"throw",t)}o(void 0)})}}function tE(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function tT(t,e){var n,i,r,a,o={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){return function(a){if(n)throw TypeError("Generator is already executing.");for(;o;)try{if(n=1,i&&(r=2&a[0]?i.return:a[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,a[1])).done)return r;switch(i=0,r&&(a=[2&a[0],r.value]),a[0]){case 0:case 1:r=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,i=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(r=(r=o.trys).length>0&&r[r.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!r||a[1]>r[0]&&a[1]<r[3])){o.label=a[1];break}if(6===a[0]&&o.label<r[1]){o.label=r[1],r=a;break}if(r&&o.label<r[2]){o.label=r[2],o.ops.push(a);break}r[2]&&o.ops.pop(),o.trys.pop();continue}a=e.call(t,o)}catch(t){a=[6,t],i=0}finally{n=r=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,s])}}}var tO={userOnly:!0,debug:!1,env:window._env},tP=function(){var t,e,n;function i(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:tO;!function(t,e){if(!(t instanceof e))throw TypeError("Cannot call a class as a function")}(this,i),this.socket=null,this.name=t,this.url=this.url||_env.notificationUrl,this.options=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable}))),i.forEach(function(e){var i,r,a;i=t,r=e,a=n[e],r in i?Object.defineProperty(i,r,{value:a,enumerable:!0,configurable:!0,writable:!0}):i[r]=a})}return t}({},tO,n),this.init()}return t=i,e=[{key:"getUrl",value:function(){var t=this;return tL(function(){return tT(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,h().ajax({url:t.url,type:"GET"})];case 1:return[2,new URL(e.sent())];case 2:return console.error(e.sent()),[3,3];case 3:return[2]}})})()}},{key:"triggerEvent",value:function(t){var e=new CustomEvent(this.name,{bubbles:!0,detail:t});document.dispatchEvent(e),this.debugLog("data received. \uD83D\uDCDC","grey",[t])}},{key:"debugLog",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"grey",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];if(this.options.debug){console.groupCollapsed("WebSocketIO - %c ".concat(this.name,": %c ").concat(t),"color: orange","color: ".concat(e)),console.log("Event name:",this.name),console.log(this);var i=!0,r=!1,a=void 0;try{for(var o,s=n[Symbol.iterator]();!(i=(o=s.next()).done);i=!0){var l,c=o.value;var u=void 0===c?"undefined":(l=c)&&"undefined"!=typeof Symbol&&l.constructor===Symbol?"symbol":typeof l;console.log("Data: ",u,c)}}catch(t){r=!0,a=t}finally{try{!i&&null!=s.return&&s.return()}finally{if(r)throw a}}console.groupEnd()}}},{key:"init",value:function(){var t=this;return tL(function(){var e,n,i;return tT(this,function(r){switch(r.label){case 0:if(t.options.userOnly&&!t.options.env.playerUUID)return t.debugLog("stop (only for user)."),[2];if(!t.url)return t.debugLog("url undefined. ❗","red"),[2,!1];return[4,t.getUrl()];case 1:if(console.log("socketUrl: ",e=r.sent()),!e)return[2];return n={path:"/"!==e.pathname?e.pathname:"/socket.io/"},t.socket=tM()(e.origin,n),console.log(t.socket),i=function(){t.socket.emit("add user",{uuid:t.options.env.playerUUID,brandId:t.options.env.brandId,userOS:JSON.parse(t.options.env.device).params.navigator_platform,userAgent:window.navigator.userAgent})},t.socket.on("connect",i),t.socket.on("reconnect",i),t.socket.on("notification",function(e){return t.triggerEvent(e)}),t.socket.on("login",function(){return t.debugLog("connected. ✅","green")}),t.socket.on("disconnect",function(){return t.debugLog("closed.❗","red")}),t.socket.on("reconnect_error",function(e){return t.debugLog("reconnect error ❗: ".concat(e),"red")}),t.socket.on("connect_error",function(e){return t.debugLog("connect error ❗: ".concat(e),"red")}),[2]}})})()}}],tE(t.prototype,e),i}();function tD(t){if(!!(t=document.querySelector(t||window.app.fullscreenElement||"#game-iframe")))document.fullscreenElement?document.exitFullscreen():t.requestFullscreen().catch(function(t){return alert("Error attempting to enable full-screen mode! =(")})}function tI(){document.fullscreenElement&&document.exitFullscreen()}document.addEventListener("fullscreenchange",function(t){document.body.classList.toggle("fullscreen_elements",!!document.fullscreenElement)});var tj=h()(document);function tF(t,e){var n=Math.pow(10,e);return Math.floor(t*n)/n}function tN(){setTimeout(function(){"#cashbox-deposit"!==location.hash&&N("#cashbox-deposit")},2e3)}tj.on("NonWagerableBet",function(t,e){var n,i,r,a;tI(),n=e.payload,i=h()("#non-wage-modal_link").eq(0),r=!0,a=Date.now()/1e3,window.localStorage.getItem("dateHideNonWagerBetModal")&&window.localStorage.getItem("dateHideNonWagerBetModal")>a&&(r=!1),i.length&&r&&i.attr("data-method","post").attr("data-fields",JSON.stringify(n)).click()});tj.on("RewardPlanUpdated",function(t,e){var n=parseFloat(e.payload.reward_amount),i=e.payload.type.toLowerCase();h()('[data-attribute="reward.amount"]').each(function(){var t=h()(this),e=n;"money"===t.attr("data-attribute-type")&&(e=e.toFixed(2)),t.is("[data-reward-type]")?t.attr("data-reward-type").toLowerCase()===i&&h()(this).text(e):h()(this).text(e)}),h()('[data-attribute="reward.progress"]').each(function(){var t=h()(this),n=parseFloat(t.attr("data-foramount")),r=parseInt(parseFloat(e.payload.wagered_amount)/n*100);t.is("[data-reward-type]")?t.attr("data-reward-type").toLowerCase()===i&&(t.attr("value",r),t.attr("stroke-dasharray",r+", 100")):(t.attr("value",r),t.attr("stroke-dasharray",r+", 100"))}),h()('[data-attribute="reward.percentage"]').each(function(){var t=h()(this),n=parseFloat(h()(this).attr("data-foramount")),r=parseInt(parseFloat(e.payload.wagered_amount)/n*100);t.is("[data-reward-type]")?t.attr("data-reward-type").toLowerCase()===i&&h()(this).text(r):h()(this).text(r)})}),tj.on("RealityCheck",function(t,e){var n=e.payload.action;if("Asked"===n){var i=h()("#reality_check_button");i.attr("data-fields",JSON.stringify(e.payload)),i.click()}("Continued"===n||"Canceled"===n)&&H(h()("#reality_check_modal"))}),tj.on("PlayerBonusChanged",function(t,e,n){!n&&tS(e);var i=parseFloat(e.payload.wagering_requirement.amount||1).toFixed(2),r=parseFloat(e.payload.amount_wagered.amount||0).toFixed(2),a=tF(Math.max(0,i-r),8).toFixed(2),o=tF(100*Math.min(r/i,1),0);if(h()('[data-attribute="active_bonus.progress"]').each(function(){var t=h()(this);if(t.is("progress")){t.attr("value",o);return}t.hasClass("vertical_progress")?t.css("height",o+"%"):t.css("width",o+"%"),t.is(".animate")&&(t.toggleClass("animate"),setTimeout(function(){t.toggleClass("animate")},50))}),h()('[data-attribute="active_bonus.all.amount"]').each(function(){var t=h()(this);t.is('[type="int"')?t.text(Math.round(i)):t.text(i)}),h()('[data-attribute="active_bonus.left.amount"]').each(function(){var t=h()(this);t.is('[type="int"')?t.text(Math.round(a)):t.text(a)}),h()('[data-attribute="active_bonus.value"]').each(function(){var t=h()(this);t.is('[type="int"')?t.text(Math.round(r)):t.text(r)}),h()('[data-attribute="active_bonus.percent"]').each(function(){h()(this).text(o)}),"COMPLETED"===e.payload.action_type&&"CONVERTED"===e.payload.status){var s=h()("#bonus_converted_button");s.attr("data-fields",JSON.stringify(e.payload)),s.click(),setTimeout(function(){h()('[data-attribute="active_bonus.block"]').hide()},1e3)}});var tR=null,tz=null,tB=null,t$=null,tH=!0;function tW(){h()('[data-attribute="balance.real.amount"]').each(function(){var t,e=h()(this).data("currency")||{},n=null!==(t=e.precision)&&void 0!==t?t:2,i=e.factor||1;h()(this).text((tz*i).toFixed(n))}),h()('[data-attribute="balance.bonus.amount"]').each(function(){var t,e=h()(this).data("currency")||{},n=null!==(t=e.precision)&&void 0!==t?t:2,i=e.factor||1;h()(this).text((tB*i).toFixed(n))}),h()('[data-attribute="balance.total.amount"]').each(function(){var t,e=h()(this).data("currency")||{},n=null!==(t=e.precision)&&void 0!==t?t:2,i=e.factor||1;h()(this).text((t$*i).toFixed(n))})}function tU(){window.location=window.location.pathname}tj.on("PlayerBalanceChanged",function(t,e,n){if(!n&&tS(e),tz=parseFloat(e.payload.real.amount),tB=parseFloat(e.payload.bonus.amount),t$=parseFloat(e.payload.total.amount),tB>0&&app.gameData&&app.gameData.disabledOnActiveBonus&&(h().active>0?h()(document).ajaxStop(function(){tU()}):tU()),i=i||1e3,tR&&clearTimeout(tR),tR=null,tR=setTimeout(tW,i),!!tH){var i,r="number"==typeof window._env.realGameMinAmount?window._env.realGameMinAmount:20,a=window._env.isGamePage;e.payload.total.amount<r&&a&&(tI(),tN(),tH=!1)}}),tj.on("_BalanceUpdate",function(t,e){tz=parseFloat(e.real.amount),tB=parseFloat(e.bonus.amount),t$=parseFloat(e.total.amount),tW()});function tq(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function tV(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=Array(e);n<e;n++)i[n]=t[n];return i}function tY(t){return function(t){if(Array.isArray(t))return tV(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return tV(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if("Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return tV(t,e)}}(t)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function tJ(t){var e,n=document.createElement("div"),i=t.split(" ");return(e=n.classList).add.apply(e,tY(i)),n}function tX(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=Array(e);n<e;n++)i[n]=t[n];return i}function tG(t){return function(t){if(Array.isArray(t))return tX(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return tX(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if("Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return tX(t,e)}}(t)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var tK=function(t,e,n){var i=tZ(t,e,n);return function(t){t&&(t=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=new Set(tG(document.head.querySelectorAll("link")).map(function(t){return t.href}));return t.filter(function(t){return!e.has(t.href)})}(tG(t))).forEach(function(t){var e=document.createElement("link");e.rel=t.rel,e.href=t.href,document.head.append(e)})}(i.links),function(t){if(t){var e=(t=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=new Set(tG(document.scripts).filter(function(t){return t.src}).map(function(t){return t.src}));return t.filter(function(t){return!e.has(t.src)})}(tG(t))).filter(function(t){return t.src}),n=t.filter(function(t){return!t.src});Promise.allSettled(e.map(function(t){return function(t){return new Promise(function(e,n){var i=document.createElement("script");i.src=t.src,document.body.append(i),i.addEventListener("load",function(){e(i)})})}(t)})).then(function(t){var e=!0,i=!1,r=void 0;try{for(var a,o=n[Symbol.iterator]();!(e=(a=o.next()).done);e=!0){var s=a.value;(function(t){var e=document.createElement("script");e.type="text/javascript",e.append(t.textContent),document.body.append(e)})(s)}}catch(t){i=!0,r=t}finally{try{!e&&null!=o.return&&o.return()}finally{if(i)throw r}}}).catch(function(t){console.log(t)})}}(i.scripts),i},tZ=function(t,e){var n,i,r,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"parseToHtml error!.";var o=new DOMParser().parseFromString(t,"text/html"),s=o.querySelectorAll("script"),l=o.querySelectorAll("link"),c=e?(n=o,i=e,(r=n.querySelector(i))?r:(console.log("parseToHtml: ",n,"".concat(i," - content is not found.")),!1)):o.body.firstElementChild;return{content:c,scripts:s,links:l,error:a}};function tQ(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=Array(e);n<e;n++)i[n]=t[n];return i}var t0="loading",t1=function(t,e,n,i,r){var a,o=i.url,s=i.num,l=i.nocache;var c=function(t){if(Array.isArray(t))return tQ(t)}(a=e.children)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(a)||function(t,e){if(t){if("string"==typeof t)return tQ(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if("Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return tQ(t,e)}}(a)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}();if(!c[s].hasChildNodes()||1==l){if(c[s].classList.contains(t0))return;t.classList.add(t0),c[s].classList.add(t0),$.ajax({url:o}).done(function(t){t=tK(t,r,n),c[s].innerHTML="",c[s].append(t.content)}).always(function(){t.classList.remove(t0),c[s].classList.remove(t0)})}};function t2(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=Array(e);n<e;n++)i[n]=t[n];return i}function t3(t){return function(t){if(Array.isArray(t))return t2(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return t2(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if("Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return t2(t,e)}}(t)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var t5={open:new Event("elMenu:open")};function t6(t,e){var n=t?t.toString():"",i=Math.random().toString(36).replace(/[\s.]/g,"").slice(0,"number"==typeof e?e:6);return n+i}function t4(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}var t8=function(){var t,e,n;function i(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:".elMenu",e=arguments.length>1?arguments[1]:void 0;!function(t,e){if(!(t instanceof e))throw TypeError("Cannot call a class as a function")}(this,i),this.container=t,this.content=e,this.init()}return t=i,e=[{key:"init",value:function(){var t,e,n,i,r,a,o,s,l,u,h,d,f,p,g,m,v,y,b,x,w,_,k,S,C="string"==typeof this.container?document.querySelector(this.container):this.container,M=C.id?C.id:t6("elMenu_",6);t=C,e=this.content,d=(h=(n=t,i=tJ("elItems ".concat(n.dataset.menuItemsClass)),r=tJ("elContent"),a=tJ("elClose"),o=tJ("elError"),s=tJ("elPreloader"),l=tJ("elClock"),u=tJ("elSearch"),tY(n.children).forEach(function(t,e){if(t.classList.contains("close"))return a.append(t.lastElementChild),t;if(t.classList.contains("error"))return o.append(t.textContent),t;if(t.classList.contains("preloader"))return s.append(t.lastElementChild),t;else if(t.classList.contains("clock")){var h=tJ("clock");return(0,c.realClock)(h),l.append(h),n.classList.add("clock-on"),t}else{if(t.classList.contains("search"))return u.append(t.lastElementChild),n.classList.add("search-on"),t;var d=tJ("item"),f=tJ("content");d.dataset.num="".concat(e),d.append(t),f.dataset.num="".concat(e),i.append(d),r.append(f)}}),n.innerHTML="",n.append(i),n.append(r),n.append(a),n.append(s),n.append(l),n.append(u),function(t){tY(t.children).forEach(function(t){!t.hasChildNodes()&&t.remove()})}(n),n.style.height="".concat(i.offsetHeight,"px"),{elContainer:n,elMenuItems:i,elContent:r,elClose:a,elSearch:u,elPreloader:s,elError:o,elClock:l})).elContainer,f=h.elMenuItems,p=h.elContent,g=h.elClose,m=h.elSearch,v=h.elPreloader,y=h.elError,b=h.elClock,x=f.querySelectorAll("a"),w=f.querySelectorAll(".item"),x.forEach(function(t){t.addEventListener("click",function(t){var n=t.target.closest(".item"),i=t.currentTarget,r={url:i.dataset.href,num:n.dataset.num,nocache:i.dataset.nocache,contentBlock:p.querySelector('[data-num="'.concat(n.dataset.num,'"]'))};if(!f.classList.contains("scrolling")&&!!n)n.classList.contains("search")&&n.classList.contains("active")?t1(d,p,y,r,e):n.classList.contains("active")?_():(document.dispatchEvent(t5.open),_(),d.classList.add("open"),n.classList.add("active"),r.contentBlock.classList.add("active"),S(v),t1(d,p,y,r,e)),k(),P(t)})}),g.addEventListener("click",function(t){_(),k()}),m.hasChildNodes()&&m.querySelector("form").addEventListener("submit",function(t){t.preventDefault();var e,n,i,r,a,o,s,l=new URL(t.target.action);l.searchParams.append(t.target.term.name,t.target.term.value);var c='<a class="link" href="'.concat(l,'" data-href="').concat(l,'" data-nocache=1>Search results</a>'),u=f.querySelector(".search");if(u)u.innerHTML="",u.insertAdjacentHTML("beforeend",c);else{;e=f,n=p,i=c,r="search",a=e.children.length,o=tJ("item ".concat(r)),s=tJ("content"),o.dataset.num=a,s.dataset.num=a,o.insertAdjacentHTML("beforeend",i),e.append(o),n.append(s),u=o}!d.classList.contains("loading")&&u.click()}),document.addEventListener("keyup",function(t){"Escape"==t.key&&(_(),k())}),_=function(){d.classList.remove("open"),t3(w).concat(t3(p.children)).forEach(function(t){t.classList.remove("active")})},k=function(){var t=!0==d.classList.contains("open")?f.offsetHeight+p.offsetHeight:f.offsetHeight;d.style.height="".concat(t,"px")},S=function(t){t.style.top="".concat(f.offsetHeight,"px"),t.style.marginTop=window.getComputedStyle(d).paddingTop,t.style.height="".concat(p.offsetHeight,"px")},b&&(b.style.top=window.getComputedStyle(d).paddingTop),O(f),t.classList.add("loaded"),dispatchEvent(new CustomEvent("elMenu:loaded",{detail:{id:M,container:C}}))}}],t4(t.prototype,e),i}();function t9(t){var e=t?h()(t):h()(this),n=e.find("[data-pagination-dots]"),i=e.find("[data-pagination-items] > *"),r=e.find("[data-pagination-content]"),a=parseInt(e.attr("data-pagination-range")),o=e.attr("data-pagination-prev-text"),s=e.attr("data-pagination-next-text"),l=e.attr("data-pagination-navigator-format");n.length&&i.length&&r.length&&(i.each(function(t){h()(this).attr("data-pagination-index",t)}),n.pagination({dataSource:i.toArray(),pageSize:1,autoHidePrevious:!0,autoHideNext:!0,showPrevious:!!o,prevText:o,showNext:!!o,nextText:s,hideWhenLessThanOnePage:!0,pageRange:isNaN(a)?2:a,showNavigator:!!l,formatNavigator:l,callback:function(t){r.html(t)}}))}function t7(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=Array(e);n<e;n++)i[n]=t[n];return i}window.elMenu=t8,n("90"),n("382"),window.init_pagination=t9,document.addEventListener("DOMContentLoaded",function(){h()('[data-toggle="pagination"]').each(t9)}),h()(document).on("modal:show",function(t){for(var e=arguments.length,n=Array(e>1?e-1:0),i=1;i<e;i++)n[i-1]=arguments[i];h()(n).find('[data-toggle="pagination"]').each(t9)}),h()(document).on("modal:update",function(t){for(var e=arguments.length,n=Array(e>1?e-1:0),i=1;i<e;i++)n[i-1]=arguments[i];h()(n).find('[data-toggle="pagination"]').each(t9)}),h()(document).on("content:loaded",function(t){for(var e=arguments.length,n=Array(e>1?e-1:0),i=1;i<e;i++)n[i-1]=arguments[i];h()(n).find('[data-toggle="pagination"]').each(t9)});function et(t){return function(t){if(Array.isArray(t))return t7(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return t7(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if("Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return t7(t,e)}}(t)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ee(t,e,n,i,r,a,o){try{var s=t[a](o),l=s.value}catch(t){n(t);return}s.done?e(l):Promise.resolve(l).then(i,r)}function en(){var t;return t=function(t){var e,n,i;return function(t,e){var n,i,r,a,o={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){return function(a){if(n)throw TypeError("Generator is already executing.");for(;o;)try{if(n=1,i&&(r=2&a[0]?i.return:a[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,a[1])).done)return r;switch(i=0,r&&(a=[2&a[0],r.value]),a[0]){case 0:case 1:r=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,i=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(r=(r=o.trys).length>0&&r[r.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!r||a[1]>r[0]&&a[1]<r[3])){o.label=a[1];break}if(6===a[0]&&o.label<r[1]){o.label=r[1],r=a;break}if(r&&o.label<r[2]){o.label=r[2],o.ops.push(a);break}r[2]&&o.ops.pop(),o.trys.pop();continue}a=e.call(t,o)}catch(t){a=[6,t],i=0}finally{n=r=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,s])}}}(this,function(r){switch(r.label){case 0:if(e=t.dataset.copy,navigator.clipboard)return[3,1];(n=document.createElement("input")).type="text",n.value=e,document.body.appendChild(n),n.select(),document.execCommand("copy");try{document.execCommand("copy"),document.body.removeChild(n)}catch(t){throw document.body.removeChild(n),console.error("Fallback: Oops, unable to copy",t),t}return[3,4];case 1:return r.trys.push([1,3,,4]),[4,navigator.clipboard.writeText(e)];case 2:return[2,r.sent()];case 3:throw console.error("Clipboard error: ",i=r.sent()),i;case 4:return[2]}})},(en=function(){var e=this,n=arguments;return new Promise(function(i,r){var a=t.apply(e,n);function o(t){ee(a,i,r,o,s,"next",t)}function s(t){ee(a,i,r,o,s,"throw",t)}o(void 0)})}).apply(this,arguments)}function ei(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=Array(e);n<e;n++)i[n]=t[n];return i}function er(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function ea(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n,i,r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var a=[],o=!0,s=!1;try{for(r=r.call(t);!(o=(n=r.next()).done)&&(a.push(n.value),!e||a.length!==e);o=!0);}catch(t){s=!0,i=t}finally{try{!o&&null!=r.return&&r.return()}finally{if(s)throw i}}return a}}(t,e)||function(t,e){if(t){if("string"==typeof t)return ei(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if("Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ei(t,e)}}(t,e)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var eo={KZ:["733","77"],CA:["1","1204","1226","1236","1249","1250","1289","1306","1343","1365","1387","1403","1416","1418","1431","1437","1438","1450","1506","1514","1519","1548","1579","1581","1587","1604","1613","1639","1647","1672","1705","1709","1742","1778","1780","1782","1807","1819","1825","1867","1873","1902","1905"]};function es(t){var e=ea(t,3),n=e[0],i=e[1],r=e[2];return"<code>".concat(n,"</code> <code>").concat(i,"</code> <label>").concat(r,"</label>")}function el(t,e){var n=ec(t.value,e);n!==t.value&&(t.value=n)}function ec(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"no",n="no"!==e&&t&&"+"===t[0]||t&&"yes"===e;return t=t.replace(/[^\d]/g,""),n&&(t="+"+t),t}var eu=function(){var t,e,n;function i(t,e){var n=this;!function(t,e){if(!(t instanceof e))throw TypeError("Cannot call a class as a function")}(this,i),this.$input=h()(t),this.options=e,this.$container=h()('<div class="ipn" />');var r=h()('<input class="ipn-input" type="tel" autocomplete="tel" />');this.$input2=r,t.placeholder&&r.attr("placeholder",t.placeholder),t.value&&r.attr("value",t.value),this.$hidden=h()('<div class="ipn-hidden" style="display: none !important;" />'),this.$code=null;var a=e.codeInput?h()(e.codeInput):null;a&&1===a.length&&(this.$code=a),this.$container.append(this.$hidden),this.$container.addClass(this.$input.attr("class")),this.$container.insertBefore(this.$input),this.$hidden.append(this.$input),this.$code&&this.$hidden.append(this.$code),this.$dropdown=h()('<div class="ipn-dropdown" style="display: none;"><div class="ipn-slide"><div class="ipn-items"></div></div></div>'),this.$button=h()('<button class="ipn-button" type="button"></button>'),this.$items=this.$dropdown.find(".ipn-items"),this.$container.append([this.$button,this.$dropdown,this.$input2]);var o=!0,s=!1,l=void 0;try{for(var c,u=this.options.items[Symbol.iterator]();!(o=(c=u.next()).done);o=!0){var d=c.value,f=h()('<div class="ipn-item"></div>');f.attr("data-value",d[0]),f.attr("data-country",d[1]),f.html(this.options.formatItemContent(d)),this.$items.append(f)}}catch(t){s=!0,l=t}finally{try{!o&&null!=u.return&&u.return()}finally{if(s)throw l}}this.$input2.on("change input",function(t){return n.onChange(t)}),this.$input2.on("keypress keyup",function(t){return function(t,e,n){switch(t.key){case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"ArrowDown":case"Delete":case"Backspace":return;case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":break;case"+":e.value}e.value.length,el(e,n)}(t,t.target,n.options.plus)}),h()([this.$input,this.$code].filter(function(t){return t})).on("change",function(t){var e=n.$input.val();n.$code&&(e=n.$code.val()+e),n.$input2.val(e),n.$input2.trigger("change")}),this.$button.on("click",function(t){return n.toggle()}),this.$items.on("click",".ipn-item",function(t){var e=t.currentTarget,i=h()(e).attr("data-value");i=ec(i,n.options.plus),n.$input2.val(i),n.$input2.focus(),n.$input2.trigger("change"),n.close()}),this.$input2.on("focus blur",function(t){return n.updateFocus()}),this.$input2.trigger("change"),h()(window).on("mousedown",function(t){!h()(t.target).is(".ipn-dropdown, .ipn-dropdown *, .ipn-button, .ipn-button *")&&n.close()})}return t=i,e=[{key:"detectCode",value:function(){var t=ec(this.$input2.val());if(!t)return null;var e=null,n=0,i=!0,r=!1,a=void 0;try{for(var o,s=this.options.items[Symbol.iterator]();!(i=(o=s.next()).done);i=!0){var l=o.value,c=ea(l,2),u=c[0],h=c[1];if(h&&(h=h.toUpperCase()),u=ec(u),t.substr(0,u.length)===u&&u.length>=n){if(h&&eo[h]){var d=!0,f=!1,p=void 0;try{for(var g,m=eo[h][Symbol.iterator]();!(d=(g=m.next()).done);d=!0){var v=g.value;if(t.substr(0,v.length)===v){e=l,n=v.length;break}}}catch(t){f=!0,p=t}finally{try{!d&&null!=m.return&&m.return()}finally{if(f)throw p}}}else e=l,n=u.length}}}catch(t){r=!0,a=t}finally{try{!i&&null!=s.return&&s.return()}finally{if(r)throw a}}return e}},{key:"onChange",value:function(t){el(this.$input2.get(0),this.options.plus),this.update()}},{key:"updateFocus",value:function(){this.isOpen()||document.activeElement===this.$input2.get(0)||document.activeElement===this.$button.get(0)?this.$container.addClass("ipn-focus"):this.$container.removeClass("ipn-focus")}},{key:"update",value:function(){var t=this.detectCode(),e=this.$input2.val();if(!t&&(t=["","",""]),this.$button.html(this.options.formatButtonContent(t)),this.$items.find(".ipn-item").each(function(){var e=h()(this),n=e.attr("data-value"),i=e.attr("data-country");n!==t[0]||i&&i!==t[1]?e.removeClass("active"):e.addClass("active")}),this.$code){e=ec(e);var n=t[0];e=e.substr(n.length),this.$code.attr("value",n),n=n.replace(/[^\d]/g,""),this.$code.val(n)}this.$input.attr("value",e),this.$input.val(e),this.isOpen()&&this.scrollToActive()}},{key:"toggle",value:function(){this.isOpen()?this.close():this.open()}},{key:"isOpen",value:function(){return this.$container.hasClass("open")}},{key:"scrollToActive",value:function(){var t=this.$dropdown.get(0).querySelector(".ipn-slide");if(!!t){var e=t.querySelector(".ipn-item.active");e&&(t.scrollTop=Math.max(0,Math.round(e.offsetTop-(t.offsetHeight-e.offsetHeight)/2)))}}},{key:"open",value:function(){this.$container.addClass("open"),this.$dropdown.show(),this.scrollToActive(),this.updateFocus()}},{key:"close",value:function(){this.$container.removeClass("open"),this.$dropdown.hide(),this.updateFocus()}}],er(t.prototype,e),i}(),eh={items:null,formatButtonContent:es,formatItemContent:es,showDropdown:!0,plus:"auto",codeInput:null};h().fn.ipn=function(t){if(1!==this.length)return this.each(function(){h()(this).ipn(t)}),this;var e=h()(this),n=e.get(0);if("INPUT"!==n.tagName)throw Error("Tag <input> required.");var i=new eu(n,t=h().extend({},eh,t));e.data("ipn",i)};function ed(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}var ef=function(){var t,e,n;function i(t){var e=this;!function(t,e){if(!(t instanceof e))throw TypeError("Cannot call a class as a function")}(this,i),this.selector=t,this.tracks=new Set,this.resizeObserver=new ResizeObserver(function(){e.tracks.forEach(function(t){return e.updateTranslucentSides(t)})}),this.initObserver()}return t=i,e=[{key:"updateTranslucentSides",value:function(t){var e=t.scrollLeft,n=t.scrollWidth,i=t.offsetWidth;t.classList.toggle("left-translucent",!(e<3)),t.classList.toggle("right-translucent",!(n-i-e<3))}},{key:"observeTrack",value:function(t){var e=this;this.updateTranslucentSides(t),t.addEventListener("scroll",function(){return e.updateTranslucentSides(t)}),this.resizeObserver.observe(t),this.tracks.add(t)}},{key:"checkTracks",value:function(){var t=this;this.selector&&document.querySelectorAll(this.selector).forEach(function(e){!t.tracks.has(e)&&t.observeTrack(e)})}},{key:"initObserver",value:function(){var t=this;new MutationObserver(function(){return t.checkTracks()}).observe(document.body,{childList:!0,subtree:!0}),this.checkTracks()}}],ed(t.prototype,e),i}();function ep(t){let e=0,n=0,i=t;do e+=i.offsetTop||0,n+=i.offsetLeft||0,i=i.offsetParent;while(i);return{top:e,left:n}}class eg{constructor(t){this.element=t}getHorizontalScroll(){return this.element.scrollLeft}getVerticalScroll(){return this.element.scrollTop}getMaxHorizontalScroll(){return this.element.scrollWidth-this.element.clientWidth}getMaxVerticalScroll(){return this.element.scrollHeight-this.element.clientHeight}getHorizontalElementScrollOffset(t,e){return ep(t).left-ep(e).left}getVerticalElementScrollOffset(t,e){return ep(t).top-ep(e).top}scrollTo(t,e){this.element.scrollLeft=t,this.element.scrollTop=e}}class em{constructor(){this.element=window}getHorizontalScroll(){return window.scrollX||document.documentElement.scrollLeft}getVerticalScroll(){return window.scrollY||document.documentElement.scrollTop}getMaxHorizontalScroll(){return Math.max(document.body.scrollWidth,document.documentElement.scrollWidth,document.body.offsetWidth,document.documentElement.offsetWidth,document.body.clientWidth,document.documentElement.clientWidth)-window.innerWidth}getMaxVerticalScroll(){return Math.max(document.body.scrollHeight,document.documentElement.scrollHeight,document.body.offsetHeight,document.documentElement.offsetHeight,document.body.clientHeight,document.documentElement.clientHeight)-window.innerHeight}getHorizontalElementScrollOffset(t){return(window.scrollX||document.documentElement.scrollLeft)+t.getBoundingClientRect().left}getVerticalElementScrollOffset(t){return(window.scrollY||document.documentElement.scrollTop)+t.getBoundingClientRect().top}scrollTo(t,e){window.scrollTo(t,e)}}let ev={elements:[],cancelMethods:[],add:(t,e)=>{ev.elements.push(t),ev.cancelMethods.push(e)},remove:(t,e)=>{let n=ev.elements.indexOf(t);n>-1&&(e&&ev.cancelMethods[n](),ev.elements.splice(n,1),ev.cancelMethods.splice(n,1))}},ey="undefined"!=typeof window,eb={cancelOnUserAction:!0,easing:t=>--t*t*t+1,elementToScroll:ey?window:null,horizontalOffset:0,maxDuration:3e3,minDuration:250,speed:500,verticalOffset:0};var ex=function(t,e={}){var n,i,r,a;return n=this,i=void 0,r=void 0,a=function*(){let n,i;if(!ey)return new Promise(t=>{t(!1)});if(!window.Promise)throw"Browser doesn't support Promises, and animated-scroll-to depends on it, please provide a polyfill.";let r=Object.assign(Object.assign({},eb),e),a=r.elementToScroll===window,o=!!r.elementToScroll.nodeName;if(!a&&!o)throw"Element to scroll needs to be either window or DOM element.";let s=a?document.documentElement:r.elementToScroll;"smooth"===getComputedStyle(s).getPropertyValue("scroll-behavior")&&console.warn(`${s.tagName} has "scroll-behavior: smooth" which can mess up with animated-scroll-to's animations`);let l=a?new em:new eg(r.elementToScroll);if(t instanceof Element){if(o&&(!r.elementToScroll.contains(t)||r.elementToScroll.isSameNode(t)))throw"options.elementToScroll has to be a parent of scrollToElement";n=l.getHorizontalElementScrollOffset(t,r.elementToScroll),i=l.getVerticalElementScrollOffset(t,r.elementToScroll)}else if("number"==typeof t)n=l.getHorizontalScroll(),i=t;else if(Array.isArray(t)&&2===t.length)n=null===t[0]?l.getHorizontalScroll():t[0],i=null===t[1]?l.getVerticalScroll():t[1];else throw"Wrong function signature. Check documentation.\nAvailable method signatures are:\n  animateScrollTo(y:number, options)\n  animateScrollTo([x:number | null, y:number | null], options)\n  animateScrollTo(scrollToElement:Element, options)";n+=r.horizontalOffset,i+=r.verticalOffset;let c=l.getMaxHorizontalScroll(),u=l.getHorizontalScroll();n>c&&(n=c);let h=n-u,d=l.getMaxVerticalScroll(),f=l.getVerticalScroll();i>d&&(i=d);let p=i-f,g=Math.abs(Math.round(h/1e3*r.speed)),m=Math.abs(Math.round(p/1e3*r.speed)),v=g>m?g:m;return v<r.minDuration?v=r.minDuration:v>r.maxDuration&&(v=r.maxDuration),new Promise((t,e)=>{let a;0===h&&0===p&&t(!0),ev.remove(l.element,!0);let o=()=>{g(),cancelAnimationFrame(a),t(!1)};ev.add(l.element,o);let s=r.cancelOnUserAction?o:t=>t.preventDefault(),c=r.cancelOnUserAction?{passive:!0}:{passive:!1},d=["wheel","touchstart","keydown","mousedown"],g=()=>{d.forEach(t=>{l.element.removeEventListener(t,s,c)})};d.forEach(t=>{l.element.addEventListener(t,s,c)});let m=Date.now(),y=()=>{var e=Date.now()-m,o=e/v;let s=Math.round(u+h*r.easing(o)),c=Math.round(f+p*r.easing(o));e<v&&(s!==n||c!==i)?(l.scrollTo(s,c),a=requestAnimationFrame(y)):(l.scrollTo(n,i),cancelAnimationFrame(a),g(),ev.remove(l.element,!1),t(!0))};a=requestAnimationFrame(y)})},new(r||(r=Promise))(function(t,e){function o(t){try{l(a.next(t))}catch(t){e(t)}}function s(t){try{l(a.throw(t))}catch(t){e(t)}}function l(e){var n;e.done?t(e.value):((n=e.value)instanceof r?n:new r(function(t){t(n)})).then(o,s)}l((a=a.apply(n,i||[])).next())})},ew=h()(document);function e_(t){t.preventDefault();var e=h()(this),n=e.find('[type="submit"]'),i=e.attr("action"),r=e.attr("method"),a=e.serialize(),o=e.attr("loader"),s=e.attr("loader-on-btn"),l=e.attr("modal-loader")?e.closest(".modal"):e;e.addClass("loading"),!0==o?l.addLoader&&l.addLoader():"string"==typeof o&&l.addLoader(),s&&n.addClass("loading"),e.trigger("form:beforeSubmit",e);var c=e.attr("data-container-id"),u=c?h()("#"+c):e,d={method:r,url:i,data:a,success:function(t){var n;if(e.trigger("form:afterSubmit",t),(void 0===t?"undefined":(n=t)&&"undefined"!=typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)=="object"){if(t.modal){W();var i=B(!1,!0);i.replaceWith(h()(R(t.modal))),i.show(),ew.trigger("modal:show",i),U()}if(t.update&&e.replaceWith(h()(R(t.update))),t.alert){W();var r=B(!1,!0);r.replaceWith(h()(R(t.alert))),r.show(),ew.trigger("modal:show",r),U()}return}u.replaceWith(h()(R(t))),ew.trigger("content:loaded")},error:function(t,e,n){if(![301,302].includes(t.status))console.error("ajax-form",n)},complete:function(t){if(![301,302].includes(t.status))e.removeClass("loading"),n.removeClass("loading"),l.removeLoader&&l.removeLoader(),"string"==typeof o&&(h()(o).removeClass("loading"),h()(o).removeLoader())}};"multipart/form-data"===e.attr("enctype")&&(d.cache=!1,d.contentType=!1,d.processData=!1,d.data=new FormData(e.get(0))),h().ajax(d),e.trigger("form:submit",e)}function ek(t,e,n,i,r,a,o){try{var s=t[a](o),l=s.value}catch(t){n(t);return}s.done?e(l):Promise.resolve(l).then(i,r)}ew.on("submit",'[data-toggle="ajax-form"]',e_),ew.on("click",'a[data-toggle="ajax-form"]:not(.disabled)',e_);function eS(){var t;return t=function(t,e,n){var i,r,a,o=arguments;return function(t,e){var n,i,r,a,o={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){return function(a){if(n)throw TypeError("Generator is already executing.");for(;o;)try{if(n=1,i&&(r=2&a[0]?i.return:a[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,a[1])).done)return r;switch(i=0,r&&(a=[2&a[0],r.value]),a[0]){case 0:case 1:r=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,i=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(r=(r=o.trys).length>0&&r[r.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!r||a[1]>r[0]&&a[1]<r[3])){o.label=a[1];break}if(6===a[0]&&o.label<r[1]){o.label=r[1],r=a;break}if(r&&o.label<r[2]){o.label=r[2],o.ops.push(a);break}r[2]&&o.ops.pop(),o.trys.pop();continue}a=e.call(t,o)}catch(t){a=[6,t],i=0}finally{n=r=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,s])}}}(this,function(s){switch(s.label){case 0:i=o.length>3&&void 0!==o[3]&&o[3],r={},r=i?{title:e,text:"".concat(n||e," ").concat(t)}:{title:e,text:null!=n?n:e,url:t},s.label=1;case 1:return s.trys.push([1,3,,4]),[4,navigator.share(r)];case 2:return s.sent(),console.log("Shared successfully",r),[3,4];case 3:return a=s.sent(),console.log("Error: ".concat(a)),[3,4];case 4:return[2]}})},(eS=function(){var e=this,n=arguments;return new Promise(function(i,r){var a=t.apply(e,n);function o(t){ek(a,i,r,o,s,"next",t)}function s(t){ek(a,i,r,o,s,"throw",t)}o(void 0)})}).apply(this,arguments)}function eC(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=Array(e);n<e;n++)i[n]=t[n];return i}var eM=function(t){var e=document.getElementById(t.sliderId);if(!e)return!1;var n=e.querySelector(".ds-track"),i=e.querySelectorAll(".ds-item");i=function(t,e){var n;return((function(t){if(Array.isArray(t))return eC(t)})(n=e)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(n)||function(t,e){if(t){if("string"==typeof t)return eC(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if("Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return eC(t,e)}}(n)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).map(function(e,n){return{el:e,i:n,w:e.offsetWidth,h:e.offsetHeight,t:e.offsetTop,l:e.offsetLeft,sT:e.offsetTop-t.scrollTop,sL:e.offsetLeft-t.scrollLeft}})}(n,i);var r=e.querySelector(".ds-prev"),a=e.querySelector(".ds-next"),o=e.querySelector(".ds-dots"),s=function(t){var e=t.slice().reverse().find(function(t){return t.sL<=1});return t[0].sL>0&&(e=t[0]),e}(i);return{slider:e,track:n,items:i,activeSlide:s,navP:r,navN:a,dots:o}};function eA(t){if(eM(t).slider){var e=eM(t);e.track.scrollWidth<=e.track.offsetWidth?e.slider.classList.add("less"):e.slider.classList.remove("less")}}function eL(t){var e,n,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r="#".concat(t.sliderId);i?((n=document.createElement("style")).setAttribute("data-media","".concat(i)),n.media="screen and (max-width: ".concat(i-.2,"px)"),e=t.stylesMedia[i]):((n=(n=t.slider.querySelector("[data-main]"))||document.createElement("style")).setAttribute("data-media","main"),n.innerHTML="",e=t.styles),e.navOver&&"string"!=typeof e.navOver&&(e.navOver="0px");var a="\n        ".concat(r," .ds-item {\n            min-width: ").concat(e.min,";\n            max-width: ").concat(e.max,";\n        }"),o="\n        ".concat(r," .ds-track {\n            grid-auto-columns: calc((100% / ").concat(e.col,") - (").concat(e.gap," - (").concat(e.gap," / ").concat(e.col,")));\n            grid-template-columns: unset;\n        }"),s="\n        ".concat(r," .ds-prev {\n            transform: translateX(").concat(e.navOver,");\n        }\n        ").concat(r," .ds-next{\n            transform: translateX(calc(-100% - ").concat(e.navOver,"));\n        }"),l="\n        ".concat(r," .ds-nav {\n            height: ").concat(e.navHeight,";\n        }"),c="\n        ".concat(r," .ds-nav {\n            align-self: ").concat(e.navPosition,";\n        }"),u="\n        ".concat(r," .ds-track {\n            gap: ").concat(e.gap,";\n        }"),h="\n        ".concat(r," .ds-track:before, ").concat(r," .ds-track:after {\n            display: block;\n            width: ").concat(e.sideGap,";\n        }"),d="\n        ".concat(r," .ds-track {\n            grid-template-rows: ").concat(e.rows,";\n        }"),f="\n        ".concat(r,".less .ds-track {\n            justify-content: ").concat(e.less,";\n        }");e.min&&e.max&&n.insertAdjacentText("beforeend",a),e.col&&n.insertAdjacentText("beforeend",o),e.navOver&&(n.insertAdjacentText("beforeend",s),t.slider.classList.add("nav-over")),e.navHeight&&n.insertAdjacentText("beforeend",l),e.navPosition&&n.insertAdjacentText("beforeend",c),e.gap&&n.insertAdjacentText("beforeend",u),e.sideGap&&n.insertAdjacentText("beforeend",h),e.rows&&n.insertAdjacentText("beforeend",d),e.less&&n.insertAdjacentText("beforeend",f),t.slider.prepend(n)}function eE(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{left:!1,right:!1,to:null},n=eM(t),i=n.slider,r=n.track,a=n.items,o=n.activeSlide,s,l=0,c=new Event("".concat(t.sliderId,"-scroll-end"),{bubbles:!0});if(t.center){var u=r.offsetWidth/a[0].w,h=u-Math.trunc(u);l=a[0].w*(1-h)/2+a[0].w/2,console.log(u,h,l)}if(e.right||e.left){var d=e.right?o.i+t.scrollStep:o.i-t.scrollStep;s=d<0?a[0].el:d<=0&&!t.loop?[0,0]:d>=a.length?a[a.length-1].el:a[d].el}e.to&&a[e.to]&&(s=a[e.to].el),ex(s,{elementToScroll:r,maxDuration:t.scrollTime+100,minDuration:t.scrollTime,easing:function(t){var e;return(e=t)<.5?4*e*e*e:1-Math.pow(-2*e+2,3)/2},cancelOnUserAction:!1,horizontalOffset:l}).then(function(t){t?i.dispatchEvent(c):r.classList.remove("scrolling")})}function eT(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=Array(e);n<e;n++)i[n]=t[n];return i}function eO(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function eP(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable}))),i.forEach(function(e){var i,r,a;i=t,r=e,a=n[e],r in i?Object.defineProperty(i,r,{value:a,enumerable:!0,configurable:!0,writable:!0}):i[r]=a})}return t}var eD={rebuild:!0,screens:{all:[],wd:[],d:[],t:[],p:[]},styles:{col:null,min:"unset",max:"unset",gap:null,sideGap:null,rows:null,navOver:!1,navHeight:"100%",navPosition:"center",less:null},stylesMedia:{},navIcons:{prev:null,next:null},drag:!0,scrollStep:1,scrollTime:1e3,autoScroll:{active:!1,interval:1},loop:!1},eI=function(){var t,e,n;function i(t,e){var n;if(!function(t,e){if(!(t instanceof e))throw TypeError("Cannot call a class as a function")}(this,i),this.slider=t,(void 0===e?"undefined":(n=e)&&"undefined"!=typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)=="object")this.config=eP({},eD,e),this.init();"string"==typeof e&&(this.config=e,this.usePreset())}return t=i,e=[{key:"usePreset",value:function(){var t=this.__proto__.constructor.preset,e=!0,n=!1,i=void 0;try{for(var r,a=Object.entries(t)[Symbol.iterator]();!(e=(r=a.next()).done);e=!0){var o,s,l=(o=r.value,s=2,function(t){if(Array.isArray(t))return t}(o)||function(t,e){var n,i,r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var a=[],o=!0,s=!1;try{for(r=r.call(t);!(o=(n=r.next()).done)&&(a.push(n.value),!e||a.length!==e);o=!0);}catch(t){s=!0,i=t}finally{try{!o&&null!=r.return&&r.return()}finally{if(s)throw i}}return a}}(o,2)||function(t,e){if(t){if("string"==typeof t)return eT(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if("Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return eT(t,e)}}(o,s)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),c=l[0],u=l[1];c===this.config&&(this.config=eP({},eD,u))}}catch(t){n=!0,i=t}finally{try{!e&&null!=a.return&&a.return()}finally{if(n)throw i}}this.init()}},{key:"init",value:function(){var t="string"==typeof this.slider?document.querySelector(this.slider):this.slider;if(!!t){var e={slider:t,sliderId:t.id?t.id:t6("DS2_",6),rebuild:this.config.rebuild,screens:this.config.screens,styles:this.config.styles,stylesMedia:this.config.stylesMedia,navIcons:this.config.navIcons,dotsStep:this.config.dotsStep,initDrag:this.config.drag,scrollStep:this.config.scrollStep,scrollTime:this.config.scrollTime,autoScroll:this.config.autoScroll,loop:this.config.loop,center:this.config.center},n=function(){var t,n,i,r,a,o,s,l,c,u,h,d;!function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:mainConfig,e=t.slider,n=t.sliderId;if(!0===t.rebuild&&null!=e){e.classList.add("drag-slider"),e.id=n;var i=document.createElement("div");e.children;var r=0;do i.insertAdjacentHTML("beforeend",'<div class="ds-item" num="'.concat(r,'"></div>')),i.lastElementChild.append(e.firstElementChild),r+=1;while(e.firstElementChild);i.classList.add("ds-track"),e.append(i)}}(e),!function(t){var e,n,i=eM(t),r=i.slider,a=i.track,o=t.navIcons,s={prev:'<i class="icon"><<</i>',next:'<i class="icon">>></i>'};if(!1!==t.initNav)null!==o.prev&&null!==o.next&&(s=o),function(){a.insertAdjacentHTML("beforebegin",'<div class="ds-prev ds-nav">'.concat(s.prev,"</div>")),a.insertAdjacentHTML("afterend",'<div class="ds-next ds-nav">'.concat(s.next,"</div>")),a.addEventListener("scroll",function(){l()}),e=t.slider.querySelector(".ds-prev"),n=t.slider.querySelector(".ds-next"),e.addEventListener("click",function(){if(!e.classList.contains("disabled"))a.classList.add("nav-scrolling-left"),eE(t,{left:!0})}),n.addEventListener("click",function(){if(!n.classList.contains("disabled"))a.classList.add("nav-scrolling-right"),eE(t,{right:!0})}),r.addEventListener("".concat(t.sliderId,"-scroll-end"),function(t){a.classList.remove("nav-scrolling-left","nav-scrolling-right")})}(),l();function l(){var t=a.scrollLeft,i=a.scrollWidth-a.offsetWidth;t<=3?e.classList.add("disabled"):e.classList.remove("disabled"),i-t<3&&t>3?n.classList.add("disabled"):n.classList.remove("disabled")}}(e),!function(t){var e=function(e){t.screens[e].forEach(function(n){var i=e+"-"+n;n.length>0&&t.slider.classList.add(i),t.initNav="nav"===n,t.initDots="dots"===n})};for(var n in t.screens)e(n);for(var i in!0===t.loop&&t.slider.classList.add("loop"),eA(t),t.stylesMedia)eL(t,i);eL(t)}(e),!0==(t=e).initDrag&&O(eM(t).track),!0===(n=e).autoScroll.active&&function t(e){var n,i,r=eM(e),a=r.slider;r.track,r.items,n=setInterval(function(){eE(e,{right:e.scrollStep})},1e3*e.autoScroll.interval),a.addEventListener("mouseover",function(){clearInterval(n),clearInterval(i)}),a.addEventListener("touchstart",function(){clearInterval(n),clearInterval(i)}),a.addEventListener("mouseout",function(){clearInterval(i),i=setTimeout(function(){t(e)},5e3)}),a.addEventListener("touchend",function(){clearInterval(i),i=setTimeout(function(){t(e)},5e3)})}(n),!function(t){if(!1!==t.loop){var e=eM(t),n=e.slider,i=e.track,r=e.items;(function(t){do{var e;e=0,r.map(function(t){return t.el.cloneNode(!0)}).forEach(function(t,e){i.append(t)})}while(i.scrollWidth<2.5*n.offsetWidth)})(t),i.scrollLeft=a(t),function(t){i.addEventListener("scroll",function(e){if(i.scrollLeft<=t.scrollStep*eM(t).items[0].w){if(i.classList.contains("nav-scrolling-left"))return;i.scrollLeft+=a(t)}if(i.scrollLeft>=i.scrollWidth-i.offsetWidth-t.scrollStep*eM(t).items[0].w){if(i.classList.contains("nav-scrolling-right"))return;i.scrollLeft-=a(t)}}),n.addEventListener("".concat(t.sliderId,"-scroll-end"),function(e){i.classList.contains("nav-scrolling-left")&&(i.scrollLeft+=a(t)),i.classList.contains("nav-scrolling-right")&&(i.scrollLeft-=a(t))})}(t),eA(t)}function a(t){return r[0].w*r.length}}(e),a=(r=eM(i=e)).slider,o=r.items,s=!a.classList.contains("active"),l=0!==o.childElementCount,s&&l&&a.classList.add("active"),function(t){t.center&&(e(t),!function(t,e){var n;function i(){clearTimeout(n),n=setTimeout(function(){clearTimeout(n),t(e)},200)}window.removeEventListener("resize",i),window.addEventListener("resize",i)}(e,t));function e(t){var e=eM(t);eE(t,{to:(e.slider,e.track,e.items,e.activeSlide).i}),console.log("center")}}(i),!function(t){if(eM(t).slider){var e=eM(t).slider,n=new MutationObserver(function(e,n){var i=!0,r=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(i=(o=s.next()).done);i=!0){var l=o.value;"childList"===l.type&&"ds-track"===l.target.className&&eA(t)}}catch(t){r=!0,a=t}finally{try{!i&&null!=s.return&&s.return()}finally{if(r)throw a}}}),i=new ResizeObserver(function(n){var i=!0,r=!1,a=void 0;try{for(var o,s=n[Symbol.iterator]();!(i=(o=s.next()).done);i=!0){var l=o.value.contentRect;eA(t),l.height>0&&l.width>0?e.classList.add("visible"):e.classList.remove("visible")}}catch(t){r=!0,a=t}finally{try{!i&&null!=s.return&&s.return()}finally{if(r)throw a}}});n.observe(e,{childList:!0,subtree:!0}),i.observe(e)}}(e),h=(u=eM(c=e)).slider,d=u.items,document.addEventListener("DS2event",function(t){if(t.detail.id===h.id)t.detail.filter&&!function(t,e,n){var i=!0,r=!1,a=void 0;try{for(var o,s=t[Symbol.iterator]();!(i=(o=s.next()).done);i=!0){var l=o.value,c=l.el.querySelector(e).textContent.toLowerCase();n=n.toLowerCase(),c.includes(n)?l.el.classList.remove("hiden"):l.el.classList.add("hiden")}}catch(t){r=!0,a=t}finally{try{!i&&null!=s.return&&s.return()}finally{if(r)throw a}}}(d,t.detail.filter.element,t.detail.filter.text),eA(c)}),console.groupCollapsed("DS2 - %c ".concat(e.sliderId,": %c loaded ✔"),"color: orange","color: green"),console.log("id:",e.sliderId),console.log("styles:",e.styles),console.log("stylesMedia:",e.stylesMedia),console.log(e),console.groupEnd()},i=t.getClientRects();if(0==i.length)var r=setInterval(function(e){(i=t.getClientRects()).length>0&&(clearInterval(r),n())},500);else n()}}}],eO(t.prototype,e),i}();eI.preset={};var ej={prev:'<i class="icon icon-arrow-circle-left"></i>',next:'<i class="icon icon-arrow-circle-right"></i>'},eF={prev:'<i class="icon icon-arrow-left"></i>',next:'<i class="icon icon-arrow-right"></i>'};eI.preset={promoCards:{styles:{min:"320px",max:"320px",gap:"30px",sideGap:"1px"}},lottoPrizes:{styles:{min:"320px",max:"320px",gap:"15px",sideGap:"1px"}},gamePageMenu:{screens:{all:["nav"]},styles:{min:"190px",max:"200px",gap:"15px",navOver:"20px",sideGap:"0"},drag:!0,scrollStep:3,scrollTime:600,navIcons:eF},games:{screens:{all:["nav"]},styles:{min:"250px",max:"250px",gap:"20px",sideGap:"15px"},stylesMedia:{992:{gap:"15px",sideGap:"0px"},576:{min:"156px",max:"156px",gap:"10px",sideGap:"0px"}},navIcons:eF,scrollStep:3},winners:{screens:{all:["nav"]},styles:{min:"130px",max:"130px",gap:"12px",sideGap:"23px"},stylesMedia:{992:{sideGap:"3px"},576:{gap:"8px",sideGap:"0px"}},navIcons:eF,scrollStep:3},gamesJackpot:{screens:{all:["nav"]},styles:{min:"248px",max:"250px",gap:"8px"},navIcons:ej,scrollStep:3},gamesJackpotSmall:{screens:{all:["nav"]},styles:{min:"168px",max:"168px",gap:"10px",sideGap:"1px",navOver:!0},navIcons:ej,scrollStep:3}};function eN(t,e){var n=null,i=[],r=!0,a=!1,o=void 0;try{for(var s,l=e[Symbol.iterator]();!(r=(s=l.next()).done);r=!0){var c=s.value,u=c.name,h=c.value;if(!!h){if("provider"===u){n=h;continue}i.push({name:u,value:h})}}}catch(t){a=!0,o=t}finally{try{!r&&null!=l.return&&l.return()}finally{if(a)throw o}}n&&(t+="/"+n);var d=!0,f=!1,p=void 0;try{for(var g,m=i[Symbol.iterator]();!(d=(g=m.next()).done);d=!0){var v=g.value,y=v.name,b=v.value;t+=(0>t.indexOf("?")?"?":"&")+encodeURIComponent(y)+"="+encodeURIComponent(b)}}catch(t){f=!0,p=t}finally{try{!d&&null!=m.return&&m.return()}finally{if(f)throw p}}return t}var eR={divider:"_",searchDelay:1e3,ajaxSync:["#games_list"],buildUrl:eN,form:"#search_games",gamesList:"#games_list",selectedTags:"#tags_container",hasSelectedTags:"#tags_container",enteredInputs:"#tags_container",classActive:"active",classDisabled:"disabled",classHasSelectedTags:"active",syncInputs:!1,searchTags:!0,pushState:!0,selectedTagTemplate:'<div class="item"><div class="game_tag"><span class="caption">{label}</span> <span class="remove" data-form-attribute="{name}" data-remove-value="{value}"><i class="icon-close5"></i></span></div></div>'},ez=null;function eB(t,e,n,i,r,a,o){try{var s=t[a](o),l=s.value}catch(t){n(t);return}s.done?e(l):Promise.resolve(l).then(i,r)}function e$(t){return function(){var e=this,n=arguments;return new Promise(function(i,r){var a=t.apply(e,n);function o(t){eB(a,i,r,o,s,"next",t)}function s(t){eB(a,i,r,o,s,"throw",t)}o(void 0)})}}function eH(t,e){var n,i,r,a,o={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){return function(a){if(n)throw TypeError("Generator is already executing.");for(;o;)try{if(n=1,i&&(r=2&a[0]?i.return:a[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,a[1])).done)return r;switch(i=0,r&&(a=[2&a[0],r.value]),a[0]){case 0:case 1:r=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,i=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(r=(r=o.trys).length>0&&r[r.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!r||a[1]>r[0]&&a[1]<r[3])){o.label=a[1];break}if(6===a[0]&&o.label<r[1]){o.label=r[1],r=a;break}if(r&&o.label<r[2]){o.label=r[2],o.ops.push(a);break}r[2]&&o.ops.pop(),o.trys.pop();continue}a=e.call(t,o)}catch(t){a=[6,t],i=0}finally{n=r=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,s])}}}function eW(t,e){return eU.apply(this,arguments)}function eU(){return(eU=e$(function(t,e){var n,i=arguments;return eH(this,function(r){switch(r.label){case 0:return n=i.length>2&&void 0!==i[2]?i[2]:"in",[4,new Map([["fade",eq]]).get(e)(t,n)];case 1:return[2,r.sent()]}})})).apply(this,arguments)}function eq(t){return eV.apply(this,arguments)}function eV(){return(eV=e$(function(t){var e,n,i,r,a=arguments;return eH(this,function(o){return(e=a.length>1&&void 0!==a[1]?a[1]:"in",n=t.animation.split(" ")[0],i=t.animation.split(" ")[1]||700,r="in"===e?{from:0,to:1}:{from:1,to:0},t.showTime<i||t.animationType===n+e)?[2,!1]:(t.animationType=n+e,[2,new Promise(function(e){t.html.style.opacity=r.from,t.html.style.transition="opacity ".concat(i,"ms ease-out"),setTimeout(function(){requestAnimationFrame(function(){t.html.style.opacity=r.to})},10),t.html.addEventListener("transitionend",function n(r){t.html.removeEventListener("transitionend",n),1e3*r.elapsedTime===i&&e(!0)})})])})})).apply(this,arguments)}function eY(t,e,n,i,r,a,o){try{var s=t[a](o),l=s.value}catch(t){n(t);return}s.done?e(l):Promise.resolve(l).then(i,r)}function eJ(t){return function(){var e=this,n=arguments;return new Promise(function(i,r){var a=t.apply(e,n);function o(t){eY(a,i,r,o,s,"next",t)}function s(t){eY(a,i,r,o,s,"throw",t)}o(void 0)})}}function eX(t,e){var n,i,r,a,o={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){return function(a){if(n)throw TypeError("Generator is already executing.");for(;o;)try{if(n=1,i&&(r=2&a[0]?i.return:a[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,a[1])).done)return r;switch(i=0,r&&(a=[2&a[0],r.value]),a[0]){case 0:case 1:r=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,i=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(r=(r=o.trys).length>0&&r[r.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!r||a[1]>r[0]&&a[1]<r[3])){o.label=a[1];break}if(6===a[0]&&o.label<r[1]){o.label=r[1],r=a;break}if(r&&o.label<r[2]){o.label=r[2],o.ops.push(a);break}r[2]&&o.ops.pop(),o.trys.pop();continue}a=e.call(t,o)}catch(t){a=[6,t],i=0}finally{n=r=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,s])}}}!function(t){if(t=Object.assign({},eR,t),!h()(t.gamesList).length)return;var e,n,i,r=h()(t.form);if(!r.length)return;var a=h()(t.selectedTags);!a.length&&(t.selectedTags=null);var o=h()(t.hasSelectedTags);!o.length&&(t.hasSelectedTags=null);var s=(e=function(){r.trigger("submit")},n=t.searchDelay,i=null,function(){i&&clearTimeout(i),i=setTimeout(e,n)});function l(e){return new Set(e.split(t.divider).filter(function(t){return t}))}function c(e,n,i,r,a){var o=t.selectedTagTemplate.replace("{label}",i).replace("{name}",e).replaceAll("{value}",n).replace("{imgUrl}",r?'<img src="'.concat(r,'" alt="" title="').concat(n,'">'):"").replace("{type}",a);return h()(o)}function u(){var e=[],n=!0,i=!1,s=void 0;try{for(var u,d=r.serializeArray()[Symbol.iterator]();!(n=(u=d.next()).done);n=!0)!function(){var n=u.value,i=n.name,r=n.value,a=h()('[data-form-attribute="'+i+'"][data-toggle-value]');if(a.length){var o=l(r);a.each(function(n,r){var a=h()(r),s=a.attr("data-toggle-value"),l=a.find("img").attr("data-src");o.has(s)?(a.addClass(t.classActive),t.selectedTags&&e.push(c(i,s,a.attr("data-tag-label"),l))):a.removeClass(t.classActive)})}a=null,h()('[data-form-attribute="'.concat(i,'"][data-set-value]')).each(function(){var n=h()(this),a=n.attr("data-set-value"),o=n.attr("data-tag-label");if(""===a)r?n.enable(t.classDisabled):n.disable(t.classDisabled);else{var s=n.attr("data-active-class")||t.classActive;r===a?(l(r).has(r)&&o&&t.selectedTags&&e.push(c(i,a,o)),n.addClass(s)):n.removeClass(s)}}),h()('[data-form-attribute="'.concat(i,'"][data-range]')).each(function(){var n=h()(this),a=n.attr("data-form-attribute"),o=n.attr("data-tag-label");r?(n.val(r),l(a).has(a)&&o&&t.selectedTags&&e.push(c(i,a,o.replace("{value}",r),"","input"))):n.val(n.attr("data-base-value")||"")}),t.syncInputs&&h()('input[data-sync][name="'+i+'"]').val(r)}()}catch(t){i=!0,s=t}finally{try{!n&&null!=d.return&&d.return()}finally{if(i)throw s}}t.selectedTags&&a.length&&a.empty().append(e),t.hasSelectedTags&&(e.length?o.addClass(t.classHasSelectedTags):o.removeClass(t.classHasSelectedTags)),h()(document).trigger("content:updated")}r.on("change",function(t){s(),u()}),r.on("submit",function(e){var n;e.preventDefault(),n=eN(r.get(0).action,r.serializeArray()),t.pushState&&window.history.pushState({},document.title,n),ez&&(ez.abort(),ez=null),ez=h().ajax({url:n,success:function(e){!function(e){var n=h()("<div>"+e+"</div>"),i=!0,r=!1,a=void 0;try{for(var o,s=t.ajaxSync[Symbol.iterator]();!(i=(o=s.next()).done);i=!0){var l=o.value;if(l){var c=n.find(l);c.length&&h()(l).html(c.html())}}}catch(t){r=!0,a=t}finally{try{!i&&null!=s.return&&s.return()}finally{if(r)throw a}}}(e),u()},complete:function(){ez=null}})}),h()(document).on("input:customChange",function(t){if(t.detail.data.formAttribute){var e=t.detail.element,n=t.detail.data.formAttribute,i=t.detail.getValue(),a=r.find("input").filter(function(t,e){return"*"===n||e.name===n}),o=!1!==t.detail.allowRequest;if(!i&&(i=null,o&&a.val(i).trigger("change")),i){if(String(i).match(/[^\d\.\,]/g)&&(i=i.replace(/[^\d\.\,]/,""),e.value=i),String(i).match(/\,/g)&&(i=i.replace(/\,/,"."),e.value=i),String(i).match(/^(\,|\.)/g)&&(i="0.",e.value=i),String(i).match(/[\d]{1,2}\.[\d]{1,2}/g)&&String(i).split(".")[1].length>2&&(i=Number(i).toFixed(2),e.value=i,o&&a.val(i).trigger("change")),String(i).match(/[\d]{1,3}/)){var s=i.split("");if(s.length>2&&"."!==s[1]&&"."!==s[2]){var l=e.dataset.baseMax?e.dataset.baseMax:"100";(i=Number(String(i).slice(0,3)))>l&&(i=l),e.value=i}}if(String(i).match(/[\d]{1,2}\.[\d]{1,2}/g)||String(i).match(/[\d]{1,2}/g)){var c=String(i).split("");"."!==c[c.length-1]&&o&&a.val(i).trigger("change")}if(String(i).match(/\./g)&&String(i).match(/\./g).length>1){var u=i.split("");"."===u[u.length-1]&&(i=i.slice(0,-1),e.value=i)}}}}),h()(document).on("click","[data-form-attribute]",function(e){e.preventDefault();var n=h()(this),i=n.attr("data-form-attribute");if(n.is("[data-reset]")){var a=r.find("input"),o=h()("input[data-form-attribute]");"*"!==i&&(a=a.filter(function(t,e){return e.name===i})),o.each(function(t,e){var n=h()(e);n.val(n.attr("data-base-value")||"")}),a.each(function(t,e){var n=h()(e),i=n.attr("data-default-value")||"";n.val(i)}).trigger("change")}else if(n.is("[data-set-value]")){var s=n.attr("data-set-value");r.find("input").filter(function(t,e){return"*"===i||e.name===i}).val(s).trigger("change")}else if(n.is("[data-toggle-value]")||n.is("[data-remove-value]")){var c,u=n.is("[data-remove-value]"),d=u?n.attr("data-remove-value"):n.attr("data-toggle-value");n.is("[data-remove-type]")&&(c=n.attr("data-remove-type"));var f=r.find('input[name="'+i+'"]'),p=l(f.val());u||p.has(d)?(p.delete(d),"input"===c&&p.clear()):p.add(d),f.val(Array.from(p).sort().join(t.divider)),f.trigger("change"),f=null}}),t.syncInputs&&h()("input[data-sync][name]").on("input change",function(t){t.preventDefault(),r.find('[name="'+this.name+'"]').val(this.value).trigger("change")}),t.searchTags&&h()(document).on("input change","[data-search-tag]",function(){var t=h()(this).attr("data-search-tag");if(t){var e=h()(this).val().toLowerCase(),n=new Set;h()('[data-form-attribute="'+t+'"][data-toggle-value]').each(function(t,i){var r=h()(i),a=r,o=a.parent();o.is(".item")&&(a=o),n.add(a.parent().get(0)),r.attr("data-toggle-value").toLowerCase().indexOf(e)>=0||r.attr("data-tag-label").toLowerCase().indexOf(e)>=0?a.show():a.hide()});var i=!0,r=!1,a=void 0;try{for(var o,s=n[Symbol.iterator]();!(i=(o=s.next()).done);i=!0){var l=o.value,c=h()(l);c.find("> :visible:not(.empty)").length?c.find("> .empty").hide():c.find("> .empty").show()}}catch(t){r=!0,a=t}finally{try{!i&&null!=s.return&&s.return()}finally{if(r)throw a}}h()(document).trigger("content:updated")}}),u()}({syncInputs:!0,ajaxSync:["#games_list","#aside_block_provider","#aside_block_tag_type","#aside_block_tag_feature","#aside_block_tag_genre"]}),n("562");function eG(t){return t.html.remove(),t.active=!1,t.visible=!1,t.closed=!0,t}function eK(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!e)return new Promise(function(e,n){var i;t.timeout.close=setTimeout((i=eJ(function(n){return eX(this,function(n){switch(n.label){case 0:return[4,eW(t,"fade","out")];case 1:return n.sent()&&e(eG(t)),[2]}})}),function(t){return i.apply(this,arguments)}),t.showTime)});clearTimeout(t.timeout.close),eW(t,"fade","in")}function eZ(){return(eZ=eJ(function(t){return eX(this,function(e){return[2,new Promise(function(e,n){t.html.addEventListener("click",function(n){n.target.closest(".close")&&(eG(t),e(t))}),t.html.addEventListener("mouseover",function(e){eK(t,!0)}),t.html.addEventListener("mouseout",function(n){eK(t,!1).then(function(n){e(t)})})})]})})).apply(this,arguments)}function eQ(){return(eQ=eJ(function(t,e){return eX(this,function(n){switch(n.label){case 0:return[4,(function(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(e.active=!0,!n)return new Promise(function(n,i){e.timeout.showTimeout=setTimeout(function(i){!function t(e,n){var i,r,a,o=!(arguments.length>2)||void 0===arguments[2]||arguments[2];return"custom"==n.position?((a=e.line.custom).insertAdjacentElement("beforeend",n.html),n):(i=n.position.split("-")[0],r=n.position.split("-")[1],e.mobile&&"right"!==r&&(i=n.positionMobile,r="right"),(a=e.line[r]).classList.remove("top","bottom"),a.classList.add(i),a.insertAdjacentElement("beforeend",n.html),o&&e.element.addEventListener("noty-resize",function(){!n.closed&&t(e,n,!1)}),n)}(t,e),eW(e,"fade","in"),e.visible=!0,n(e)},e.showTimeout)});clearTimeout(e.timeout.show)})(t,e).then(function(t){return Promise.any([function(t){return eZ.apply(this,arguments)}(e),eK(e)])})];case 1:return[2,n.sent()]}})})).apply(this,arguments)}function e0(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=Array(e);n<e;n++)i[n]=t[n];return i}function e1(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}var e2=function(){var t,e,n;function i(){!function(t,e){if(!(t instanceof e))throw TypeError("Cannot call a class as a function")}(this,i),this.store=new Map,this.paused=!1}return t=i,e=[{key:"recordItem",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.container,i=e.position,r=e.positionMobile,a=e.showTime,o=e.showTimeout,s=e.animation,l=e.group,c={id:t.id,html:t,active:!1,visible:!1,closed:!1,group:l,showTime:a,showTimeout:o,animation:s,timeout:{show:!1,close:!1},position:i,positionMobile:r,container:n};this.store.set(t.id,c)}},{key:"getItems",value:function(){var t=[],e=[],n=[];if(this.paused)return[];var i=!0,r=!1,a=void 0;try{for(var o,s=this.store[Symbol.iterator]();!(i=(o=s.next()).done);i=!0)!function(){var i,r,a=(i=o.value,r=2,function(t){if(Array.isArray(t))return t}(i)||function(t,e){var n,i,r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var a=[],o=!0,s=!1;try{for(r=r.call(t);!(o=(n=r.next()).done)&&(a.push(n.value),!e||a.length!==e);o=!0);}catch(t){s=!0,i=t}finally{try{!o&&null!=r.return&&r.return()}finally{if(s)throw i}}return a}}(i,2)||function(t,e){if(t){if("string"==typeof t)return e0(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if("Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return e0(t,e)}}(i,r)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),s=(a[0],a[1]),l=s.active||s.closed,c=s.group>0,u=t.some(function(t){return t.group==s.group}),h=e.some(function(t){return t.group==s.group&&t.active});!c&&!l&&t.push(s),c&&s.active&&e.push(s),c&&s.closed&&n.push(s),c&&!l&&!u&&!h&&t.push(s)}()}catch(t){r=!0,a=t}finally{try{!i&&null!=s.return&&s.return()}finally{if(r)throw a}}return t}},{key:"pauseShow",value:function(t){this.paused=t}}],e1(t.prototype,e),i}();function e3(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}var e5={position:"bottom-right",positionMobile:"bottom",showTime:5e5,showTimeout:1e3,animation:"fade",group:0},e6=function(){var t,e,n;function i(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{containerClass:"",paused:!1,mobileWidth:760,debug:!1},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e5;!function(t,e){if(!(t instanceof e))throw TypeError("Cannot call a class as a function")}(this,i),this.options=t,this.itemOptions=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable}))),i.forEach(function(e){var i,r,a;i=t,r=e,a=n[e],r in i?Object.defineProperty(i,r,{value:a,enumerable:!0,configurable:!0,writable:!0}):i[r]=a})}return t}({},e5,e),this.container=function(t,e,n){var i=document.createElement("div");i.id=t6("noty-container-",5),i.classList.add("noty","noty-container"),i.classList.add(t),n&&i.classList.add("debug");var r=document.createElement("div");r.classList.add("noty-line","left");var a=document.createElement("div");a.classList.add("noty-line","center");var o=document.createElement("div");o.classList.add("noty-line","right");var s=document.createElement("div");s.classList.add("noty-line","custom");for(var l=0,c=[r,a,o,s];l<c.length;l++){var u=c[l];i.append(u)}var h={element:i,line:{left:r,center:a,right:o,custom:s},mobile:!1,mobileWidth:e};return window.innerWidth<=e&&(h.element.classList.add("mobile"),h.mobile=!0),window.addEventListener("resize",function(t){var n=new CustomEvent("noty-resize");window.innerWidth<=e&&!h.mobile?(h.mobile=!0,h.element.classList.add("mobile"),h.element.dispatchEvent(n)):window.innerWidth>e&&h.mobile&&(h.mobile=!1,h.element.classList.remove("mobile"),h.element.dispatchEvent(n))}),document.body.append(i),h}(this.options.containerClass,this.options.mobileWidth,this.options.debug),this.store=new e2,this.init(),console.log(this)}return t=i,e=[{key:"show",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=n.position,r=void 0===i?this.itemOptions.position:i,a=n.positionMobile,o=void 0===a?this.itemOptions.positionMobile:a,s=n.showTime,l=void 0===s?this.itemOptions.showTime:s,c=n.showTimeout,u=void 0===c?this.itemOptions.showTimeout:c,h=n.animation,d=void 0===h?this.itemOptions.animation:h,f=n.group,p=void 0===f?this.itemOptions.group:f;if(t){var g,m,v,y=(g=t,m=p,(v=document.createElement("div")).id=t6("noty-id-",5),v.classList.add("noty-item"),v.dataset.notyGroup=m,"string"==typeof g?v.insertAdjacentText("beforeend",g):v.insertAdjacentElement("beforeend",g),v);this.store.recordItem(y,{container:this.container,position:r,positionMobile:o,showTime:l,showTimeout:u,animation:d,group:p})}var b=!0,x=!1,w=void 0;try{for(var _,k=this.store.getItems()[Symbol.iterator]();!(b=(_=k.next()).done);b=!0){var S=_.value;(function(t,e){return eQ.apply(this,arguments)})(this.container,S).then(function(t){e.show(),console.log("Noty: item close",t)})}}catch(t){x=!0,w=t}finally{try{!b&&null!=k.return&&k.return()}finally{if(x)throw w}}}},{key:"pause",value:function(t){t?this.store.pauseShow(t):(this.store.pauseShow(t),this.show())}},{key:"init",value:function(){this.pause(this.options.paused)}}],e3(t.prototype,e),i}();function e4(t){var e=t.cookieName,n=t.cookieExpires,i=t.resetOnLogout,r=t.notificationStoredName,a=t.eventName,o=t.displayType,s=document.cookie.match(RegExp("(^| )"+e+"=([^;]+)")),l=te("notification").get(r);if(s&&l){if(!window._env.playerUUID&&i){c(e);return}document.dispatchEvent(new CustomEvent(a,{detail:l}))}!s&&document.addEventListener(a,function(t){t.detail.data.template.display_type==o&&function(){var t=new Date;t.setTime(t.getTime()+6e4*n);var i="expires="+t.toUTCString();document.cookie="".concat(e,"=true;").concat(i,";path=/")}()});function c(t){document.cookie="".concat(t,"=true;").concat("expires=Thu, 01 Jan 1970 00:00:00 GMT",";path=/")}window.removeNotificationCookie=c}function e8(t,e){return t.hasOwnProperty(e)?t[e]:""}function e9(t,e){return t.hasOwnProperty(e)?t[e]:""}function e7(t,e){return t.hasOwnProperty(e)?t[e]:""}function nt(t,e){return t.hasOwnProperty(e)?t[e]:""}var ne=new e6({containerClass:"main_notifications",mobileWidth:1200});!function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=!0,n=!1,i=void 0;try{for(var r,a=t[Symbol.iterator]();!(e=(r=a.next()).done);e=!0)!function(){var t=r.value;t.eventName?document.addEventListener(t.eventName,function(e){t.eventData=e.detail,t.triggerCheck&&ne.show(t.notificationContent,t.notificationOptions)}):t.triggerCheck&&ne.show(t.notificationContent,t.notificationOptions)}()}catch(t){n=!0,i=t}finally{try{!e&&null!=a.return&&a.return()}finally{if(n)throw i}}}([{name:"notification_promo",eventName:"ws_main_io",eventData:{data:{template:{title:{uk:""},text:{uk:""},image:"",url:"",button_text:{uk:""},source:"",display_type:0},notify_type:9,lock_time:3,active_time:15,page_rule:"/promo",player_uuid:"",created_at:""}},get triggerCheck(){var nn=0==this.eventData.data.template.display_type,ni=!this.eventData.data.page_rule||document.location.pathname.includes(this.eventData.data.page_rule);return nn&&ni},get notificationOptions(){return{showTime:15e3,showTimeout:1e3*this.eventData.data.lock_time,position:"bottom-right",group:1}},get notificationContent(){var nr=this.eventData.data.template,na=nr.image,no=nr.title,ns=nr.text,nl=nr.button_text,nc=nr.url,nu=nr.source,nh=this.eventData.data.notify_type,nd=window._env.language;no=e8(no,nd)||"",ns=e8(ns,nd)||"",nl=e8(nl,nd)||"";var nf="";if(nc&&nl){var np=nc.indexOf("?"),ng=encodeURIComponent(nc),nm=nc.split("#"),nv=(np>-1?"&":"?")+"notify_type=".concat(nh,"&source=").concat(nu,"&link=")+ng,ny=nm[0]+nv+(nm[1]?"#"+nm[1]:"");nf='\n                <a href="'.concat(ny,'" class="notification_button" target="_blank">\n                    <span>').concat(nl,'</span>\n                    <i class="icon icon-arrow-right"></i>\n                </a>\n            ')}var nb=document.createElement("div");nb.classList.add("notification","notification_1","notification_promo");var nx='\n            <div class="notification_close close"><i class="icon icon-close"></i></div>\n            <div class="notification_content">\n                <img src="'.concat(na,'" alt="" class="notification_image">\n                <div class="notification_title">').concat(no,'</div>\n                <div class="notification_text">').concat(ns,"</div>\n                ").concat(nf,'\n            </div>\n            <div class="notification_settings close"><i class="icon icon-settings"></i></div>\n	    ');return nb.insertAdjacentHTML("beforeend",nx),nb}},{name:"notification_prize",eventName:"ws_main_io",eventData:{data:{template:{title:{uk:""},text:{uk:""},image:"",url:"",button_text:{uk:""},source:"",display_type:2},notify_type:9,lock_time:3,active_time:15,page_rule:"/promo",player_uuid:"",created_at:""}},get triggerCheck(){var nw=2==this.eventData.data.template.display_type,n_=!this.eventData.data.page_rule||document.location.pathname.includes(this.eventData.data.page_rule);return nw&&n_},get notificationOptions(){return{showTime:18e5,showTimeout:1e3*this.eventData.data.lock_time,position:"custom",group:3}},get notificationContent(){var nk=this.eventData.data.template,nS=nk.image,nC=nk.title,nM=nk.text,nA=nk.button_text,nL=nk.button_text_1,nE=window._env.language;nC=e9(nC,nE)||"",nM=e9(nM,nE)||"",nA=e9(nA,nE)||"",nL=e9(nL,nE)||"";var nT=window._env.pageUrl.gifts,nO=document.createElement("div"),nP='\n            <div class="notification_close close"><i class="icon icon-close"></i></div>\n            <div class="notification_img"><img src="'.concat(nS,'" alt="').concat(nC,'"></div>\n            <div class="notification_content">\n                <div class="notification_title">').concat(nC,'</div>\n                <div class="notification_text">').concat(nM,'</div>\n                <a class="button secondary medium wide notification_button" href="').concat(nT,'">\n                    <span class="caption">').concat(nA,"</span>\n                </a>\n            </div>\n	    ");nO.classList.add("notification_prize"),nO.insertAdjacentHTML("beforeend",nP);var nD=document.createElement("div"),nI='\n            <i class="icon icon-arrow-right-2"></i>\n            <span>'.concat(nL,"</span>\n        ");nD.classList.add("card_button","open"),nD.insertAdjacentHTML("beforeend",nI),nD.addEventListener("click",function(t){nO.classList.toggle("open"),nD.classList.toggle("open")});var nj=document.createElement("div");return nj.classList.add("notification_prize_wrap"),nj.insertAdjacentElement("beforeend",nO),nj.insertAdjacentElement("beforeend",nD),te("notification").set("prize_eventData",this.eventData),nj}},{name:"notification_promo_center",eventName:"ws_main_io",eventData:{data:{template:{title:{uk:""},text:{uk:""},image:"",url:"",button_text:{uk:""},source:"",display_type:3},notify_type:9,lock_time:3,active_time:15,page_rule:"/promo",player_uuid:"",created_at:""}},get triggerCheck(){var nF=3==this.eventData.data.template.display_type,nN=!this.eventData.data.page_rule||document.location.pathname.includes(this.eventData.data.page_rule);return nF&&nN},get notificationOptions(){return{showTime:18e5,showTimeout:1e3*this.eventData.data.lock_time,position:"bottom-center",group:2}},get notificationContent(){var nR=this.eventData.data.template,nz=nR.image,nB=nR.title,n$=nR.text,nH=nR.button_text,nW=nR.url,nU=nR.source,nq=this.eventData.data.notify_type,nV=window._env.language;nB=e7(nB,nV)||"",n$=e7(n$,nV)||"",nH=e7(nH,nV)||"";var nY="";if(nW&&nH){var nJ=nW.indexOf("?"),nX=encodeURIComponent(nW),nG=nW.split("#"),nK=(nJ>-1?"&":"?")+"notify_type=".concat(nq,"&source=").concat(nU,"&link=")+nX,nZ=nG[0]+nK+(nG[1]?"#"+nG[1]:"");nY='\n                <a href="'.concat(nZ,'" class="button secondary big-text notification_button close" target="_blank">\n                    <span class="caption">').concat(nH,"</span>\n                </a>")}var nQ=document.createElement("div");nQ.classList.add("notification","notification_3");var n0='\n            <div class="notification_content">\n                <img class="notification_image gift" src="'.concat(nz,'" alt="').concat(nB,'">\n                <div class="notification_content_wrap">\n                    <div class="notification_title">').concat(nB,'</div>\n                    <div class="notification_text">').concat(n$,"</div>\n                </div>\n                ").concat(nY,'\n            </div>\n            <div class="notification_close close"><i class="icon icon-close"></i></div>\n	    ');return nQ.insertAdjacentHTML("beforeend",n0),nQ.addEventListener("click",function(t){t.target.closest(".close")&&window.removeNotificationCookie("notification_promo_center")},{once:!0}),te("notification").set("promoCenter_eventData",this.eventData),nQ}},{name:"notification_questionnaire",eventName:"ws_main_io",eventData:{data:{template:{title:{uk:""},text:{uk:""},image:"",url:"",button_text:{uk:""},source:"",display_type:1},notify_type:9,lock_time:3,active_time:15,page_rule:"/promo",player_uuid:"",created_at:""}},get triggerCheck(){var n1=1==this.eventData.data.template.display_type,n2=!this.eventData.data.page_rule||document.location.pathname.includes(this.eventData.data.page_rule);return n1&&n2},get notificationOptions(){return{showTime:15e3,showTimeout:1e3*this.eventData.data.lock_time,position:"bottom-center",group:2}},get notificationContent(){var n3=this.eventData.data.template,n5=n3.image,n6=n3.title,n4=n3.text,n8=n3.button_text,n9=window._env.language;n6=nt(n6,n9)||"",n4=nt(n4,n9)||"",n8=nt(n8,n9)||"";var n7={url:window._env.pageUrl.questionnaire,params:{source:this.eventData.data.template.source,type:this.eventData.data.template.display_type,notify_type:this.eventData.data.notify_type}};this.eventData.data.template.url&&(n7.params.link=encodeURIComponent(this.eventData.data.template.url));var it=new URL(window.location.origin),ie=new URLSearchParams(n7.params);it.pathname=n7.url,it.search=ie;var ii=document.createElement("div");ii.classList.add("notification","notification_3");var ir='\n            <div class="notification_content">\n                <img class="notification_image gift" src="'.concat(n5,'" alt="').concat(n6,'">\n                <div class="notification_content_wrap">\n                    <div class="notification_title">').concat(n6,'</div>\n                    <div class="notification_text">').concat(n4,'</div>\n                </div>\n                <a class="button secondary big-text notification_button close close_questionnaire" href="').concat(it.href,'">\n                    <span class="caption">').concat(n8,'</span>\n                </a>\n            </div>\n            <div class="notification_close close"><i class="icon icon-close"></i></div>\n	    ');return ii.insertAdjacentHTML("beforeend",ir),ii}},{name:"notification_recommended_games",eventName:"ws_main",eventData:"",get triggerCheck(){var ia="GameRecommendationsNotification"==this.eventData.type;if(ia&&!this.eventData.payload.generated)return!1;if(ia&&document.location.pathname.includes(window._env.pageUrl.recommendedGamesPage))return document.location.reload(),!1;return ia},get notificationOptions(){return{showTime:15e3,position:"bottom-right"}},get notificationContent(){var io=window._env.recommendedValues,is=document.createElement("div");is.classList.add("notification","notification_2","notification_recommended_games");var il='\n		<div class="notification_content">\n			<div class="notification_close close"><i class="icon icon-close"></i></div>\n			<div class="notification_content_wrap">\n				<div class="notification_title">'.concat(io.title,'</div>\n				<div class="notification_text">').concat(io.text,'</div>\n			</div>\n			<div class="notification_img"></div>\n			<a class="button secondary big-text notification_button" href="').concat(window._env.pageUrl.recommendedGamesPage,'">\n				<span class="caption">').concat(io.btn,"</span>\n			</a>\n		</div>");return is.insertAdjacentHTML("beforeend",il),is}}]),document.addEventListener("click",function(t){t.target.closest(".notification_settings")&&N("notification-settings")});e4({cookieName:"notification_promo_center",cookieExpires:30,resetOnLogout:!0,notificationStoredName:"promoCenter_eventData",eventName:"ws_main_io",displayType:3}),e4({cookieName:"notification_prize",cookieExpires:30,resetOnLogout:!0,notificationStoredName:"prize_eventData",eventName:"ws_main_io",displayType:2});function ic(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=Array(e);n<e;n++)i[n]=t[n];return i}function iu(t){return function(t){if(Array.isArray(t))return ic(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return ic(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if("Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ic(t,e)}}(t)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ih(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=Array(e);n<e;n++)i[n]=t[n];return i}function id(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=Array(e);n<e;n++)i[n]=t[n];return i}function ip(t){return function(t){if(Array.isArray(t))return id(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return id(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if("Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return id(t,e)}}(t)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ig(t){return t&&"undefined"!=typeof Symbol&&t.constructor===Symbol?"symbol":typeof t}function im(t){var e=[];return(void 0===t?"undefined":ig(t))==="object"&&!Array.isArray(t)&&e.push(t),"string"==typeof t&&(e=ip(document.querySelectorAll(t))),Array.isArray(t)&&t.forEach(function(t){var n,i=[];"string"==typeof t&&i.push.apply(i,ip(document.querySelectorAll(t))),(void 0===t?"undefined":ig(t))==="object"&&i.push(t),(n=e).push.apply(n,ip(i))}),e}function iv(t,e){im(e).forEach(function(e){var n,i;n=e,i=t,n&&n.classList.toggle(i)})}var iy=function(t){do t=t.parentElement;while(t&&!ib(t)&&t!==document.body);return t===document.body&&(t=window),t},ib=function(t){return null!==t&&"hidden"!==getComputedStyle(t)["overflow-y"]&&t.scrollHeight>t.offsetHeight};function ix(t,e){if("string"==typeof(e=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable}))),i.forEach(function(e){var i,r,a;i=t,r=e,a=n[e],r in i?Object.defineProperty(i,r,{value:a,enumerable:!0,configurable:!0,writable:!0}):i[r]=a})}return t}({maxDuration:1e3},e)).elementToScroll&&(e.elementToScroll=document.querySelector(e.elementToScroll)),"string"==typeof t&&!(t=document.querySelector(t)))return;if("number"==typeof t&&!e.elementToScroll&&(e.elementToScroll=window),!!e.elementToScroll||(e.elementToScroll=iy(t),!!e.elementToScroll))ex(t,e)}function iw(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=Array(e);n<e;n++)i[n]=t[n];return i}function i_(t,e){var n=new CustomEvent("PaymentGallery:".concat(t),{bubbles:!0,detail:e});document.dispatchEvent(n)}function ik(t){var e,n,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];switch(void 0===t?"undefined":(e=t)&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e){case"object":n=t;break;case"string":(n=document.querySelectorAll(t)).length<=1&&(n=n[0]);default:i&&(console.group("elFind"),console.log("look:",t),console.log("find:",n),console.groupEnd())}return n}function iS(t,e){var n=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(t=ik(t),e=ik(e),t&&e){if(!n)return e.replaceWith(t),t;else{var i=t.cloneNode(!0);return e.replaceWith(i),i}}}function iC(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}var iM=function(){var t,e,n;function i(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{debug:!1};!function(t,e){if(!(t instanceof e))throw TypeError("Cannot call a class as a function")}(this,i),this.debug=e.debug,this.container=ik(t,this.debug)}return t=i,e=[{key:"initItems",value:function(){var t=!0,e=!1,n=void 0;try{for(var i,r=this.container.querySelectorAll("[data-item-id]")[Symbol.iterator]();!(t=(i=r.next()).done);t=!0){var a=i.value,o=a.dataset.itemId,s=a.querySelector("[data-card-id]"),l=a.querySelector("[data-info-id]");s&&(s.dataset.cardId=o),l&&(l.dataset.infoId=o)}}catch(t){e=!0,n=t}finally{try{!t&&null!=r.return&&r.return()}finally{if(e)throw n}}this.debug&&console.log("items: ",this.items)}},{key:"items",get:function(){var t=[],e=this.container.querySelectorAll(".item"),n=!0,i=!1,r=void 0;try{for(var a,o,s=e[Symbol.iterator]();!(n=(o=s.next()).done);n=!0)a=this,function(){var e=o.value,n={container:a.container,element:e,id:e.dataset.itemId,get card(){return this.container.querySelector('[data-card-id="'.concat(this.id,'"]'))},get info(){return this.container.querySelector('[data-info-id="'.concat(this.id,'"]'))},get position(){return e.getBoundingClientRect()},get isActive(){return e.classList.contains("active")},setActive:function(){this.info&&(this.element.classList.add("active"),this.element.after(this.info)),i_("item:active",this)},resetActive:function(){this.info&&(this.element.classList.remove("active"),this.element.appendChild(this.info)),i_("item:reset",this)}};t.push(n)}()}catch(t){i=!0,r=t}finally{try{!n&&null!=s.return&&s.return()}finally{if(i)throw r}}return t}},{key:"resetAll",value:function(){this.items.forEach(function(t){return t.resetActive()}),this.container.removeAttribute("data-active")}},{key:"activeAction",value:function(){var t=this,e=!0,n=!1,i=void 0;try{for(var r,a=this.items[Symbol.iterator]();!(e=(r=a.next()).done);e=!0)!function(){var e=r.value;e.element.addEventListener("click",function(n){!1==e.isActive?(t.resetAll(),e.setActive(),t.container.dataset.active="1"):t.resetAll()})}()}catch(t){n=!0,i=t}finally{try{!e&&null!=a.return&&a.return()}finally{if(n)throw i}}}},{key:"init",value:function(){this.initItems(),this.activeAction(),document.dispatchEvent(new CustomEvent("module:ready:payment_gallery"))}}],iC(t.prototype,e),i}();function iA(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=Array(e);n<e;n++)i[n]=t[n];return i}function iL(t){return function(t){if(Array.isArray(t))return iA(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return iA(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if("Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return iA(t,e)}}(t)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function iE(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=Array(e);n<e;n++)i[n]=t[n];return i}function iT(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=Array(e);n<e;n++)i[n]=t[n];return i}function iO(t,e,n,i,r,a,o){try{var s=t[a](o),l=s.value}catch(t){n(t);return}s.done?e(l):Promise.resolve(l).then(i,r)}function iP(t){return function(t){if(Array.isArray(t))return iT(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||iD(t)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function iD(t,e){if(t){if("string"==typeof t)return iT(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if("Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return iT(t,e)}}function iI(){var t;return t=function(t,e){var n,i,r=arguments;return function(t,e){var n,i,r,a,o={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){return function(a){if(n)throw TypeError("Generator is already executing.");for(;o;)try{if(n=1,i&&(r=2&a[0]?i.return:a[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,a[1])).done)return r;switch(i=0,r&&(a=[2&a[0],r.value]),a[0]){case 0:case 1:r=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,i=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(r=(r=o.trys).length>0&&r[r.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!r||a[1]>r[0]&&a[1]<r[3])){o.label=a[1];break}if(6===a[0]&&o.label<r[1]){o.label=r[1],r=a;break}if(r&&o.label<r[2]){o.label=r[2],o.ops.push(a);break}r[2]&&o.ops.pop(),o.trys.pop();continue}a=e.call(t,o)}catch(t){a=[6,t],i=0}finally{n=r=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,s])}}}(this,function(n){switch(n.label){case 0:return r.length>2&&void 0!==r[2]&&r[2],t.preventDefault(),t.stopImmediatePropagation(),e.querySelector('[type="submit"]').classList.add("loading"),[4,fetch(e.action,{method:e.method,body:new FormData(e),headers:{"X-Requested-With":"XMLHttpRequest"}})];case 1:return[4,n.sent().json()];case 2:switch(i=n.sent(),e.querySelector('[type="submit"]').classList.remove("loading"),i.status){case"success":iF(e),function(t,e){if(!e.error){var n=iP(t.querySelectorAll(".form-group")),i=!0,r=!1,a=void 0;try{for(var o,s=n[Symbol.iterator]();!(i=(o=s.next()).done);i=!0)o.value.classList.add("has-success")}catch(t){r=!0,a=t}finally{try{!i&&null!=s.return&&s.return()}finally{if(r)throw a}}t.classList.add("done"),t.addEventListener("animationend",function(){t.remove(),function(t){var e=document.querySelector(".questionnaire_form"),n=document.querySelector(".questionnaire_item");if(!e&&t){var i=tZ(t);n.textContent="",n.appendChild(i.content),ix(0)}}(e.html)})}}(e,i),function(t){var e=document.querySelector(".question_count"),n=document.querySelector(".question_count_all");e&&n&&Number(e.textContent)<Number(n.textContent)&&(e.textContent=t+1)}(i.result.completed);break;case"error":iF(e),function(t,e){var n=iP(t.querySelectorAll(".form-group")),i=!0,r=!1,a=void 0;try{for(var o,s=Object.entries(e)[Symbol.iterator]();!(i=(o=s.next()).done);i=!0){var l,c=function(){var e,i,r=(e=o.value,i=2,function(t){if(Array.isArray(t))return t}(e)||function(t,e){var n,i,r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var a=[],o=!0,s=!1;try{for(r=r.call(t);!(o=(n=r.next()).done)&&(a.push(n.value),!e||a.length!==e);o=!0);}catch(t){s=!0,i=t}finally{try{!o&&null!=r.return&&r.return()}finally{if(s)throw i}}return a}}(e,2)||iD(e,i)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),a=r[0],s=r[1];if("no_field"==a){var l=t.querySelector("button"),c=document.createElement("span");return c.classList.add("help-block"),c.textContent=s,l.classList.add("disabled"),l.after(c),{v:void 0}}var u=n.find(function(t){return t.classList.contains("group-name-"+a)});u.classList.add("has-error"),u.querySelector(".help-block").textContent=s[0],u.addEventListener("click",function(t){ij(u)},{once:!0})}();if("object"==((l=c)&&"undefined"!=typeof Symbol&&l.constructor===Symbol?"symbol":typeof l))return c.v}}catch(t){r=!0,a=t}finally{try{!i&&null!=s.return&&s.return()}finally{if(r)throw a}}}(e,i.error);break;default:console.log(i)}return[2]}})},(iI=function(){var e=this,n=arguments;return new Promise(function(i,r){var a=t.apply(e,n);function o(t){iO(a,i,r,o,s,"next",t)}function s(t){iO(a,i,r,o,s,"throw",t)}o(void 0)})}).apply(this,arguments)}function ij(t){t.classList.remove("has-error","has-success"),t.querySelector(".help-block").textContent=""}function iF(t){var e=t.querySelectorAll(".form-group"),n=!0,i=!1,r=void 0;try{for(var a,o=e[Symbol.iterator]();!(n=(a=o.next()).done);n=!0){var s=a.value;ij(s)}}catch(t){i=!0,r=t}finally{try{!n&&null!=o.return&&o.return()}finally{if(i)throw r}}}function iN(t){return t+.5|0}let iR=(t,e,n)=>Math.max(Math.min(t,n),e);function iz(t){return iR(iN(2.55*t),0,255)}function iB(t){return iR(iN(255*t),0,255)}function i$(t){return iR(iN(t/2.55)/100,0,1)}function iH(t){return iR(iN(100*t),0,100)}let iW={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},iU=[..."0123456789ABCDEF"],iq=t=>iU[15&t],iV=t=>iU[(240&t)>>4]+iU[15&t],iY=t=>(240&t)>>4==(15&t),iJ=t=>iY(t.r)&&iY(t.g)&&iY(t.b)&&iY(t.a),iX=(t,e)=>t<255?e(t):"",iG=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function iK(t,e,n){let i=e*Math.min(n,1-n),r=(e,r=(e+t/30)%12)=>n-i*Math.max(Math.min(r-3,9-r,1),-1);return[r(0),r(8),r(4)]}function iZ(t,e,n){let i=(i,r=(i+t/60)%6)=>n-n*e*Math.max(Math.min(r,4-r,1),0);return[i(5),i(3),i(1)]}function iQ(t,e,n){let i;let r=iK(t,1,.5);for(e+n>1&&(i=1/(e+n),e*=i,n*=i),i=0;i<3;i++)r[i]*=1-e-n,r[i]+=e;return r}function i0(t){let e,n,i;let r=t.r/255,a=t.g/255,o=t.b/255,s=Math.max(r,a,o),l=Math.min(r,a,o),c=(s+l)/2;if(s!==l){var u,h,d,f,p;i=s-l,n=c>.5?i/(2-s-l):i/(s+l),u=r,h=a,d=o,f=i,e=60*(e=u===(p=s)?(h-d)/f+(h<d?6:0):h===p?(d-u)/f+2:(u-h)/f+4)+.5}return[0|e,n||0,c]}function i1(t,e,n,i){return(Array.isArray(e)?t(e[0],e[1],e[2]):t(e,n,i)).map(iB)}function i2(t,e,n){return i1(iK,t,e,n)}function i3(t){return(t%360+360)%360}let i5={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"},i6={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"},i4=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/,i8=t=>t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055,i9=t=>t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4);function i7(t,e,n){if(t){var i,r;let a=i0(t);a[e]=Math.max(0,Math.min(a[e]+a[e]*n,0===e?360:1)),a=i1(iK,a,void 0,void 0),t.r=a[0],t.g=a[1],t.b=a[2]}}function rt(t,e){return t?Object.assign(e||{},t):t}function re(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=iB(t[3]))):(e=rt(t,{r:0,g:0,b:0,a:1})).a=iB(e.a),e}class rn{constructor(e){let n;if(e instanceof rn)return e;let i=typeof e;if("object"===i)n=re(e);else if("string"===i){var r,a,o,s;n=(o=(r=e).length,"#"===r[0]&&(4===o||5===o?a={r:255&17*iW[r[1]],g:255&17*iW[r[2]],b:255&17*iW[r[3]],a:5===o?17*iW[r[4]]:255}:(7===o||9===o)&&(a={r:iW[r[1]]<<4|iW[r[2]],g:iW[r[3]]<<4|iW[r[4]],b:iW[r[5]]<<4|iW[r[6]],a:9===o?iW[r[7]]<<4|iW[r[8]]:255})),a||function(e){!t&&((t=function(){let t,e,n,i,r;let a={},o=Object.keys(i6),s=Object.keys(i5);for(t=0;t<o.length;t++){for(e=0,i=r=o[t];e<s.length;e++)n=s[e],r=r.replace(n,i5[n]);n=parseInt(i6[i],16),a[r]=[n>>16&255,n>>8&255,255&n]}return a}()).transparent=[0,0,0,0]);let n=t[e.toLowerCase()];return n&&{r:n[0],g:n[1],b:n[2],a:4===n.length?n[3]:255}}(e)||("r"===(s=e).charAt(0)?function(t){let e,n,i;let r=i4.exec(t),a=255;if(!!r){if(r[7]!==e){let t=+r[7];a=r[8]?iz(t):iR(255*t,0,255)}return e=+r[1],n=+r[3],i=+r[5],e=255&(r[2]?iz(e):iR(e,0,255)),n=255&(r[4]?iz(n):iR(n,0,255)),{r:e,g:n,b:i=255&(r[6]?iz(i):iR(i,0,255)),a:a}}}(s):function(t){let e;let n=iG.exec(t),i=255;if(!n)return;n[5]!==e&&(i=n[6]?iz(+n[5]):iB(+n[5]));let r=i3(+n[2]),a=+n[3]/100,o=+n[4]/100;if("hwb"===n[1])e=i1(iQ,r,a,o);else if("hsv"===n[1])e=i1(iZ,r,a,o);else e=i1(iK,r,a,o);return{r:e[0],g:e[1],b:e[2],a:i}}(s)))}this._rgb=n,this._valid=!!n}get valid(){return this._valid}get rgb(){var t=rt(this._rgb);return t&&(t.a=i$(t.a)),t}set rgb(t){this._rgb=re(t)}rgbString(){var t;return this._valid?(t=this._rgb)&&(t.a<255?`rgba(${t.r}, ${t.g}, ${t.b}, ${i$(t.a)})`:`rgb(${t.r}, ${t.g}, ${t.b})`):void 0}hexString(){var t,e;return this._valid?(e=iJ(t=this._rgb)?iq:iV,t?"#"+e(t.r)+e(t.g)+e(t.b)+iX(t.a,e):void 0):void 0}hslString(){return this._valid?function(t){if(!t)return;let e=i0(t),n=e[0],i=iH(e[1]),r=iH(e[2]);return t.a<255?`hsla(${n}, ${i}%, ${r}%, ${i$(t.a)})`:`hsl(${n}, ${i}%, ${r}%)`}(this._rgb):void 0}mix(t,e){if(t){let n;let i=this.rgb,r=t.rgb,a=e===n?.5:e,o=2*a-1,s=i.a-r.a,l=((o*s==-1?o:(o+s)/(1+o*s))+1)/2;n=1-l,i.r=255&l*i.r+n*r.r+.5,i.g=255&l*i.g+n*r.g+.5,i.b=255&l*i.b+n*r.b+.5,i.a=a*i.a+(1-a)*r.a,this.rgb=i}return this}interpolate(t,e){return t&&(this._rgb=function(t,e,n){let i=i9(i$(t.r)),r=i9(i$(t.g)),a=i9(i$(t.b));return{r:iB(i8(i+n*(i9(i$(e.r))-i))),g:iB(i8(r+n*(i9(i$(e.g))-r))),b:iB(i8(a+n*(i9(i$(e.b))-a))),a:t.a+n*(e.a-t.a)}}(this._rgb,t._rgb,e)),this}clone(){return new rn(this.rgb)}alpha(t){return this._rgb.a=iB(t),this}clearer(t){let e=this._rgb;return e.a*=1-t,this}greyscale(){let t=this._rgb,e=iN(.3*t.r+.59*t.g+.11*t.b);return t.r=t.g=t.b=e,this}opaquer(t){let e=this._rgb;return e.a*=1+t,this}negate(){let t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return i7(this._rgb,2,t),this}darken(t){return i7(this._rgb,2,-t),this}saturate(t){return i7(this._rgb,1,t),this}desaturate(t){return i7(this._rgb,1,-t),this}rotate(t){var e,n,i,r,a;return e=this._rgb,n=t,(i=i0(e))[0]=i3(i[0]+n),i=i1(iK,i,void 0,void 0),e.r=i[0],e.g=i[1],e.b=i[2],this}}function ri(){}let rr=(e=0,()=>e++);function ra(t){return null==t}function ro(t){if(Array.isArray&&Array.isArray(t))return!0;let e=Object.prototype.toString.call(t);return"[object"===e.slice(0,7)&&"Array]"===e.slice(-6)||!1}function rs(t){return null!==t&&"[object Object]"===Object.prototype.toString.call(t)}function rl(t){return("number"==typeof t||t instanceof Number)&&isFinite(+t)}function rc(t,e){return rl(t)?t:e}function ru(t,e){return void 0===t?e:t}let rh=(t,e)=>"string"==typeof t&&t.endsWith("%")?parseFloat(t)/100:+t/e,rd=(t,e)=>"string"==typeof t&&t.endsWith("%")?parseFloat(t)/100*e:+t;function rf(t,e,n){if(t&&"function"==typeof t.call)return t.apply(n,e)}function rp(t,e,n,i){let r,a,o;if(ro(t)){if(a=t.length,i)for(r=a-1;r>=0;r--)e.call(n,t[r],r);else for(r=0;r<a;r++)e.call(n,t[r],r)}else if(rs(t))for(r=0,a=(o=Object.keys(t)).length;r<a;r++)e.call(n,t[o[r]],o[r])}function rg(t,e){let n,i,r,a;if(!t||!e||t.length!==e.length)return!1;for(n=0,i=t.length;n<i;++n)if(r=t[n],a=e[n],r.datasetIndex!==a.datasetIndex||r.index!==a.index)return!1;return!0}function rm(t){if(ro(t))return t.map(rm);if(rs(t)){let e=Object.create(null),n=Object.keys(t),i=n.length,r=0;for(;r<i;++r)e[n[r]]=rm(t[n[r]]);return e}return t}function rv(t){return -1===["__proto__","prototype","constructor"].indexOf(t)}function ry(t,e,n,i){if(!rv(t))return;let r=e[t],a=n[t];rs(r)&&rs(a)?rb(r,a,i):e[t]=rm(a)}function rb(t,e,n){let i;let r=ro(e)?e:[e],a=r.length;if(!rs(t))return t;let o=(n=n||{}).merger||ry;for(let e=0;e<a;++e){if(!rs(i=r[e]))continue;let a=Object.keys(i);for(let e=0,r=a.length;e<r;++e)o(a[e],t,i,n)}return t}function rx(t,e){return rb(t,e,{merger:rw})}function rw(t,e,n){if(!rv(t))return;let i=e[t],r=n[t];rs(i)&&rs(r)?rx(i,r):!Object.prototype.hasOwnProperty.call(e,t)&&(e[t]=rm(r))}let r_={"":t=>t,x:t=>t.x,y:t=>t.y};function rk(t,e){return(r_[e]||(r_[e]=function(t){let e=function(t){let e=t.split("."),n=[],i="";for(let t of e)(i+=t).endsWith("\\")?i=i.slice(0,-1)+".":(n.push(i),i="");return n}(t);return t=>{for(let n of e){if(""===n)break;t=t&&t[n]}return t}}(e)))(t)}function rS(t){return t.charAt(0).toUpperCase()+t.slice(1)}let rC=t=>void 0!==t,rM=t=>"function"==typeof t,rA=(t,e)=>{if(t.size!==e.size)return!1;for(let n of t)if(!e.has(n))return!1;return!0},rL=Math.PI,rE=2*rL,rT=rE+rL,rO=Number.POSITIVE_INFINITY,rP=rL/180,rD=rL/2,rI=rL/4,rj=2*rL/3,rF=Math.log10,rN=Math.sign;function rR(t,e,n){return Math.abs(t-e)<n}function rz(t){let e=Math.round(t),n=Math.pow(10,Math.floor(rF(t=rR(t,e,t/1e3)?e:t))),i=t/n;return(i<=1?1:i<=2?2:i<=5?5:10)*n}function rB(t){return!isNaN(parseFloat(t))&&isFinite(t)}function r$(t,e,n){let i,r,a;for(i=0,r=t.length;i<r;i++)!isNaN(a=t[i][n])&&(e.min=Math.min(e.min,a),e.max=Math.max(e.max,a))}function rH(t){return rL/180*t}function rW(t){return 180/rL*t}function rU(t){if(!rl(t))return;let e=1,n=0;for(;Math.round(t*e)/e!==t;)e*=10,n++;return n}function rq(t,e){let n=e.x-t.x,i=e.y-t.y,r=Math.sqrt(n*n+i*i),a=Math.atan2(i,n);return a<-.5*rL&&(a+=rE),{angle:a,distance:r}}function rV(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function rY(t,e){return(t-e+rT)%rE-rL}function rJ(t){return(t%rE+rE)%rE}function rX(t,e,n,i){let r=rJ(t),a=rJ(e),o=rJ(n),s=rJ(a-r),l=rJ(o-r),c=rJ(r-a),u=rJ(r-o);return r===a||r===o||i&&a===o||s>l&&c<u}function rG(t,e,n){return Math.max(e,Math.min(n,t))}function rK(t,e,n,i=1e-6){return t>=Math.min(e,n)-i&&t<=Math.max(e,n)+i}function rZ(t,e,n){let i;n=n||(n=>t[n]<e);let r=t.length-1,a=0;for(;r-a>1;)n(i=a+r>>1)?a=i:r=i;return{lo:a,hi:r}}let rQ=(t,e,n,i)=>rZ(t,n,i?i=>{let r=t[i][e];return r<n||r===n&&t[i+1][e]===n}:i=>t[i][e]<n),r0=(t,e,n)=>rZ(t,n,i=>t[i][e]>=n),r1=["push","pop","shift","splice","unshift"];function r2(t,e){let n=t._chartjs;if(!n)return;let i=n.listeners,r=i.indexOf(e);if(-1!==r&&i.splice(r,1),!(i.length>0))r1.forEach(e=>{delete t[e]}),delete t._chartjs}function r3(t){let e=new Set(t);return e.size===t.length?t:Array.from(e)}let r5="undefined"==typeof window?function(t){return t()}:window.requestAnimationFrame;function r6(t,e){let n=[],i=!1;return function(...r){n=r,!i&&(i=!0,r5.call(window,()=>{i=!1,t.apply(e,n)}))}}let r4=t=>"start"===t?"left":"end"===t?"right":"center",r8=(t,e,n)=>"start"===t?e:"end"===t?n:(e+n)/2,r9=(t,e,n,i)=>t===(i?"left":"right")?n:"center"===t?(e+n)/2:e,r7=t=>0===t||1===t,at=(t,e,n)=>-(Math.pow(2,10*(t-=1))*Math.sin((t-e)*rE/n)),ae=(t,e,n)=>Math.pow(2,-10*t)*Math.sin((t-e)*rE/n)+1,an={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=>-Math.cos(t*rD)+1,easeOutSine:t=>Math.sin(t*rD),easeInOutSine:t=>-.5*(Math.cos(rL*t)-1),easeInExpo:t=>0===t?0:Math.pow(2,10*(t-1)),easeOutExpo:t=>1===t?1:-Math.pow(2,-10*t)+1,easeInOutExpo:t=>r7(t)?t:t<.5?.5*Math.pow(2,10*(2*t-1)):.5*(-Math.pow(2,-10*(2*t-1))+2),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=>r7(t)?t:at(t,.075,.3),easeOutElastic:t=>r7(t)?t:ae(t,.075,.3),easeInOutElastic:t=>r7(t)?t:t<.5?.5*at(2*t,.1125,.45):.5+.5*ae(2*t-1,.1125,.45),easeInBack:t=>t*t*(2.70158*t-1.70158),easeOutBack:t=>(t-=1)*t*(2.70158*t+1.70158)+1,easeInOutBack(t){let e=1.70158;return(t/=.5)<1?.5*(t*t*(((e*=1.525)+1)*t-e)):.5*((t-=2)*t*(((e*=1.525)+1)*t+e)+2)},easeInBounce:t=>1-an.easeOutBounce(1-t),easeOutBounce:t=>t<.36363636363636365?7.5625*t*t:t<.7272727272727273?7.5625*(t-=.5454545454545454)*t+.75:t<.9090909090909091?7.5625*(t-=.8181818181818182)*t+.9375:7.5625*(t-=.9545454545454546)*t+.984375,easeInOutBounce:t=>t<.5?.5*an.easeInBounce(2*t):.5*an.easeOutBounce(2*t-1)+.5};function ai(t){if(t&&"object"==typeof t){let e=t.toString();return"[object CanvasPattern]"===e||"[object CanvasGradient]"===e}return!1}function ar(t){return ai(t)?t:new rn(t)}function aa(t){return ai(t)?t:new rn(t).saturate(.5).darken(.1).hexString()}let ao=["x","y","borderWidth","radius","tension"],as=["color","borderColor","backgroundColor"],al=new Map;function ac(t,e,n){return(function(t,e){let n=t+JSON.stringify(e=e||{}),i=al.get(n);return!i&&(i=new Intl.NumberFormat(t,e),al.set(n,i)),i})(e,n).format(t)}let au={values:t=>ro(t)?t:""+t,numeric(t,e,n){let i;if(0===t)return"0";let r=this.chart.options.locale,a=t;if(n.length>1){let e=Math.max(Math.abs(n[0].value),Math.abs(n[n.length-1].value));(e<1e-4||e>1e15)&&(i="scientific"),a=function(t,e){let n=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;return Math.abs(n)>=1&&t!==Math.floor(t)&&(n=t-Math.floor(t)),n}(t,n)}let o=rF(Math.abs(a)),s=isNaN(o)?1:Math.max(Math.min(-1*Math.floor(o),20),0),l={notation:i,minimumFractionDigits:s,maximumFractionDigits:s};return Object.assign(l,this.options.ticks.format),ac(t,r,l)},logarithmic(t,e,n){return 0===t?"0":[1,2,3,5,10,15].includes(n[e].significand||t/Math.pow(10,Math.floor(rF(t))))||e>.8*n.length?au.numeric.call(this,t,e,n):""}};var ah=au;let ad=Object.create(null),af=Object.create(null);function ap(t,e){if(!e)return t;let n=e.split(".");for(let e=0,i=n.length;e<i;++e){let i=n[e];t=t[i]||(t[i]=Object.create(null))}return t}function ag(t,e,n){return"string"==typeof e?rb(ap(t,e),n):rb(ap(t,""),e)}var am=new class t{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)=>aa(e.backgroundColor),this.hoverBorderColor=(t,e)=>aa(e.borderColor),this.hoverColor=(t,e)=>aa(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 ag(this,t,e)}get(t){return ap(this,t)}describe(t,e){return ag(af,t,e)}override(t,e){return ag(ad,t,e)}route(t,e,n,i){let r=ap(this,t),a=ap(this,n),o="_"+e;Object.defineProperties(r,{[o]:{value:r[e],writable:!0},[e]:{enumerable:!0,get(){let t=this[o],e=a[i];return rs(t)?Object.assign({},e,t):ru(t,e)},set(t){this[o]=t}}})}apply(t){t.forEach(t=>t(this))}}({_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:as},numbers:{type:"number",properties:ao}}),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:ah.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 av(t,e,n,i,r){let a=e[r];return!a&&(a=e[r]=t.measureText(r).width,n.push(r)),a>i&&(i=a),i}function ay(t,e,n){let i=t.currentDevicePixelRatio,r=0!==n?Math.max(n/2,.5):0;return Math.round((e-r)*i)/i+r}function ab(t,e){if(!!e||!!t)(e=e||t.getContext("2d")).save(),e.resetTransform(),e.clearRect(0,0,t.width,t.height),e.restore()}function ax(t,e,n,i){aw(t,e,n,i,null)}function aw(t,e,n,i,r){let a,o,s,l,c,u,h,d;let f=e.pointStyle,p=e.rotation,g=e.radius,m=(p||0)*rP;if(f&&"object"==typeof f&&("[object HTMLImageElement]"===(a=f.toString())||"[object HTMLCanvasElement]"===a)){t.save(),t.translate(n,i),t.rotate(m),t.drawImage(f,-f.width/2,-f.height/2,f.width,f.height),t.restore();return}if(!isNaN(g)&&!(g<=0)){switch(t.beginPath(),f){default:r?t.ellipse(n,i,r/2,g,0,0,rE):t.arc(n,i,g,0,rE),t.closePath();break;case"triangle":u=r?r/2:g,t.moveTo(n+Math.sin(m)*u,i-Math.cos(m)*g),m+=rj,t.lineTo(n+Math.sin(m)*u,i-Math.cos(m)*g),m+=rj,t.lineTo(n+Math.sin(m)*u,i-Math.cos(m)*g),t.closePath();break;case"rectRounded":c=.516*g,o=Math.cos(m+rI)*(l=g-c),h=Math.cos(m+rI)*(r?r/2-c:l),s=Math.sin(m+rI)*l,d=Math.sin(m+rI)*(r?r/2-c:l),t.arc(n-h,i-s,c,m-rL,m-rD),t.arc(n+d,i-o,c,m-rD,m),t.arc(n+h,i+s,c,m,m+rD),t.arc(n-d,i+o,c,m+rD,m+rL),t.closePath();break;case"rect":if(!p){l=Math.SQRT1_2*g,u=r?r/2:l,t.rect(n-u,i-l,2*u,2*l);break}m+=rI;case"rectRot":h=Math.cos(m)*(r?r/2:g),o=Math.cos(m)*g,s=Math.sin(m)*g,d=Math.sin(m)*(r?r/2:g),t.moveTo(n-h,i-s),t.lineTo(n+d,i-o),t.lineTo(n+h,i+s),t.lineTo(n-d,i+o),t.closePath();break;case"crossRot":m+=rI;case"cross":h=Math.cos(m)*(r?r/2:g),o=Math.cos(m)*g,s=Math.sin(m)*g,d=Math.sin(m)*(r?r/2:g),t.moveTo(n-h,i-s),t.lineTo(n+h,i+s),t.moveTo(n+d,i-o),t.lineTo(n-d,i+o);break;case"star":h=Math.cos(m)*(r?r/2:g),o=Math.cos(m)*g,s=Math.sin(m)*g,d=Math.sin(m)*(r?r/2:g),t.moveTo(n-h,i-s),t.lineTo(n+h,i+s),t.moveTo(n+d,i-o),t.lineTo(n-d,i+o),m+=rI,h=Math.cos(m)*(r?r/2:g),o=Math.cos(m)*g,s=Math.sin(m)*g,d=Math.sin(m)*(r?r/2:g),t.moveTo(n-h,i-s),t.lineTo(n+h,i+s),t.moveTo(n+d,i-o),t.lineTo(n-d,i+o);break;case"line":o=r?r/2:Math.cos(m)*g,s=Math.sin(m)*g,t.moveTo(n-o,i-s),t.lineTo(n+o,i+s);break;case"dash":t.moveTo(n,i),t.lineTo(n+Math.cos(m)*(r?r/2:g),i+Math.sin(m)*g);break;case!1:t.closePath()}t.fill(),e.borderWidth>0&&t.stroke()}}function a_(t,e,n){return n=n||.5,!e||t&&t.x>e.left-n&&t.x<e.right+n&&t.y>e.top-n&&t.y<e.bottom+n}function ak(t,e){t.save(),t.beginPath(),t.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),t.clip()}function aS(t){t.restore()}function aC(t,e,n,i,r){if(!e)return t.lineTo(n.x,n.y);if("middle"===r){let i=(e.x+n.x)/2;t.lineTo(i,e.y),t.lineTo(i,n.y)}else"after"===r!=!!i?t.lineTo(e.x,n.y):t.lineTo(n.x,e.y);t.lineTo(n.x,n.y)}function aM(t,e,n,i){if(!e)return t.lineTo(n.x,n.y);t.bezierCurveTo(i?e.cp1x:e.cp2x,i?e.cp1y:e.cp2y,i?n.cp2x:n.cp1x,i?n.cp2y:n.cp1y,n.x,n.y)}function aA(t,e,n,i,r,a={}){var o,s;let l,c;let u=ro(e)?e:[e],h=a.strokeWidth>0&&""!==a.strokeColor;for(t.save(),t.font=r.string,o=t,(s=a).translation&&o.translate(s.translation[0],s.translation[1]),ra(s.rotation)||o.rotate(s.rotation),s.color&&(o.fillStyle=s.color),s.textAlign&&(o.textAlign=s.textAlign),s.textBaseline&&(o.textBaseline=s.textBaseline),l=0;l<u.length;++l)c=u[l],a.backdrop&&!function(t,e){let n=t.fillStyle;t.fillStyle=e.color,t.fillRect(e.left,e.top,e.width,e.height),t.fillStyle=n}(t,a.backdrop),h&&(a.strokeColor&&(t.strokeStyle=a.strokeColor),!ra(a.strokeWidth)&&(t.lineWidth=a.strokeWidth),t.strokeText(c,n,i,a.maxWidth)),t.fillText(c,n,i,a.maxWidth),!function(t,e,n,i,r){if(r.strikethrough||r.underline){let a=t.measureText(i),o=e-a.actualBoundingBoxLeft,s=e+a.actualBoundingBoxRight,l=n-a.actualBoundingBoxAscent,c=n+a.actualBoundingBoxDescent,u=r.strikethrough?(l+c)/2:c;t.strokeStyle=t.fillStyle,t.beginPath(),t.lineWidth=r.decorationWidth||2,t.moveTo(o,u),t.lineTo(s,u),t.stroke()}}(t,n,i,c,a),i+=Number(r.lineHeight);t.restore()}function aL(t,e){let{x:n,y:i,w:r,h:a,radius:o}=e;t.arc(n+o.topLeft,i+o.topLeft,o.topLeft,1.5*rL,rL,!0),t.lineTo(n,i+a-o.bottomLeft),t.arc(n+o.bottomLeft,i+a-o.bottomLeft,o.bottomLeft,rL,rD,!0),t.lineTo(n+r-o.bottomRight,i+a),t.arc(n+r-o.bottomRight,i+a-o.bottomRight,o.bottomRight,rD,0,!0),t.lineTo(n+r,i+o.topRight),t.arc(n+r-o.topRight,i+o.topRight,o.topRight,0,-rD,!0),t.lineTo(n+o.topLeft,i)}let aE=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,aT=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/,aO=t=>+t||0;function aP(t,e){let n={},i=rs(e),r=i?Object.keys(e):e,a=rs(t)?i?n=>ru(t[n],t[e[n]]):e=>t[e]:()=>t;for(let t of r)n[t]=aO(a(t));return n}function aD(t){return aP(t,{top:"y",right:"x",bottom:"y",left:"x"})}function aI(t){return aP(t,["topLeft","topRight","bottomLeft","bottomRight"])}function aj(t){let e=aD(t);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function aF(t,e){var n;t=t||{},e=e||am.font;let i=ru(t.size,e.size);"string"==typeof i&&(i=parseInt(i,10));let r=ru(t.style,e.style);r&&!(""+r).match(aT)&&(console.warn('Invalid font style specified: "'+r+'"'),r=void 0);let a={family:ru(t.family,e.family),lineHeight:function(t,e){let n=(""+t).match(aE);if(!n||"normal"===n[1])return 1.2*e;switch(t=+n[2],n[3]){case"px":return t;case"%":t/=100}return e*t}(ru(t.lineHeight,e.lineHeight),i),size:i,style:r,weight:ru(t.weight,e.weight),string:""};return a.string=!(n=a)||ra(n.size)||ra(n.family)?null:(n.style?n.style+" ":"")+(n.weight?n.weight+" ":"")+n.size+"px "+n.family,a}function aN(t,e,n,i){let r,a,o,s=!0;for(r=0,a=t.length;r<a;++r){if(void 0!==(o=t[r])){if(void 0!==e&&"function"==typeof o&&(o=o(e),s=!1),void 0!==n&&ro(o)&&(o=o[n%o.length],s=!1),void 0!==o)return i&&!s&&(i.cacheable=!1),o}}}function aR(t,e){return Object.assign(Object.create(t),e)}function az(t,e=[""],n,i,r=()=>t[0]){let a=n||t;return void 0===i&&(i=aX("_fallback",t)),new Proxy({[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:t,_rootScopes:a,_fallback:i,_getTarget:r,override:n=>az([n,...t],e,a,i)},{deleteProperty:(e,n)=>(delete e[n],delete e._keys,delete t[0][n],!0),get:(n,i)=>aU(n,i,()=>(function(t,e,n,i){let r;for(let a of e)if(void 0!==(r=aX(aH(a,t),n)))return aW(t,r)?aY(n,i,t,r):r})(i,e,t,n)),getOwnPropertyDescriptor:(t,e)=>Reflect.getOwnPropertyDescriptor(t._scopes[0],e),getPrototypeOf:()=>Reflect.getPrototypeOf(t[0]),has:(t,e)=>aG(t).includes(e),ownKeys:t=>aG(t),set(t,e,n){let i=t._storage||(t._storage=r());return t[e]=i[e]=n,delete t._keys,!0}})}function aB(t,e,n,i){return new Proxy({_cacheable:!1,_proxy:t,_context:e,_subProxy:n,_stack:new Set,_descriptors:a$(t,i),setContext:e=>aB(t,e,n,i),override:r=>aB(t.override(r),e,n,i)},{deleteProperty:(e,n)=>(delete e[n],delete t[n],!0),get:(t,e,n)=>aU(t,e,()=>(function(t,e,n){let{_proxy:i,_context:r,_subProxy:a,_descriptors:o}=t,s=i[e];return rM(s)&&o.isScriptable(e)&&(s=function(t,e,n,i){let{_proxy:r,_context:a,_subProxy:o,_stack:s}=n;if(s.has(t))throw Error("Recursion detected: "+Array.from(s).join("->")+"->"+t);s.add(t);let l=e(a,o||i);return s.delete(t),aW(t,l)&&(l=aY(r._scopes,r,t,l)),l}(e,s,t,n)),ro(s)&&s.length&&(s=function(t,e,n,i){let{_proxy:r,_context:a,_subProxy:o,_descriptors:s}=n;if(void 0!==a.index&&i(t))return e[a.index%e.length];if(rs(e[0])){let n=e,i=r._scopes.filter(t=>t!==n);for(let l of(e=[],n)){let n=aY(i,r,t,l);e.push(aB(n,a,o&&o[t],s))}}return e}(e,s,t,o.isIndexable)),aW(e,s)&&(s=aB(s,r,a&&a[e],o)),s})(t,e,n)),getOwnPropertyDescriptor:(e,n)=>e._descriptors.allKeys?Reflect.has(t,n)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(t,n),getPrototypeOf:()=>Reflect.getPrototypeOf(t),has:(e,n)=>Reflect.has(t,n),ownKeys:()=>Reflect.ownKeys(t),set:(e,n,i)=>(t[n]=i,delete e[n],!0)})}function a$(t,e={scriptable:!0,indexable:!0}){let{_scriptable:n=e.scriptable,_indexable:i=e.indexable,_allKeys:r=e.allKeys}=t;return{allKeys:r,scriptable:n,indexable:i,isScriptable:rM(n)?n:()=>n,isIndexable:rM(i)?i:()=>i}}let aH=(t,e)=>t?t+rS(e):e,aW=(t,e)=>rs(e)&&"adapters"!==t&&(null===Object.getPrototypeOf(e)||e.constructor===Object);function aU(t,e,n){if(Object.prototype.hasOwnProperty.call(t,e)||"constructor"===e)return t[e];let i=n();return t[e]=i,i}function aq(t,e,n){return rM(t)?t(e,n):t}let aV=(t,e)=>!0===t?e:"string"==typeof t?rk(e,t):void 0;function aY(t,e,n,i){var r,a,o;let s=e._rootScopes;let l=(r=e._fallback,a=n,o=i,rM(r)?r(a,o):r),c=[...t,...s],u=new Set;u.add(i);let h=aJ(u,c,n,l||n,i);return null!==h&&(void 0===l||l===n||null!==(h=aJ(u,c,l,h,i)))&&az(Array.from(u),[""],s,l,()=>(function(t,e,n){let i=t._getTarget();!(e in i)&&(i[e]={});let r=i[e];return ro(r)&&rs(n)?n:r||{}})(e,n,i))}function aJ(t,e,n,i,r){for(;n;)n=function(t,e,n,i,r){for(let l of e){let e=aV(n,l);if(e){var a,o,s;t.add(e);let l=(a=e._fallback,o=n,s=r,rM(a)?a(o,s):a);if(void 0!==l&&l!==n&&l!==i)return l}else if(!1===e&&void 0!==i&&n!==i)return null}return!1}(t,e,n,i,r);return n}function aX(t,e){for(let n of e){if(!n)continue;let e=n[t];if(void 0!==e)return e}}function aG(t){let e=t._keys;return!e&&(e=t._keys=function(t){let e=new Set;for(let n of t)for(let t of Object.keys(n).filter(t=>!t.startsWith("_")))e.add(t);return Array.from(e)}(t._scopes)),e}function aK(t,e,n,i){let r,a,o;let{iScale:s}=t,{key:l="r"}=this._parsing,c=Array(i);for(r=0;r<i;++r)o=e[a=r+n],c[r]={r:s.parse(rk(o,l),a)};return c}let aZ=Number.EPSILON||1e-14,aQ=(t,e)=>e<t.length&&!t[e].skip&&t[e],a0=t=>"x"===t?"y":"x";function a1(t,e,n){return Math.max(Math.min(t,n),e)}function a2(){return"undefined"!=typeof window&&"undefined"!=typeof document}function a3(t){let e=t.parentNode;return e&&"[object ShadowRoot]"===e.toString()&&(e=e.host),e}function a5(t,e,n){let i;return"string"==typeof t?(i=parseInt(t,10),-1!==t.indexOf("%")&&(i=i/100*e.parentNode[n])):i=t,i}let a6=t=>t.ownerDocument.defaultView.getComputedStyle(t,null),a4=["top","right","bottom","left"];function a8(t,e,n){let i={};n=n?"-"+n:"";for(let r=0;r<4;r++){let a=a4[r];i[a]=parseFloat(t[e+"-"+a+n])||0}return i.width=i.left+i.right,i.height=i.top+i.bottom,i}let a9=(t,e,n)=>(t>0||e>0)&&(!n||!n.shadowRoot);function a7(t,e){if("native"in t)return t;let{canvas:n,currentDevicePixelRatio:i}=e,r=a6(n),a="border-box"===r.boxSizing,o=a8(r,"padding"),s=a8(r,"border","width"),{x:l,y:c,box:u}=function(t,e){let n,i;let r=t.touches,a=r&&r.length?r[0]:t,{offsetX:o,offsetY:s}=a,l=!1;if(a9(o,s,t.target))n=o,i=s;else{let t=e.getBoundingClientRect();n=a.clientX-t.left,i=a.clientY-t.top,l=!0}return{x:n,y:i,box:l}}(t,n),h=o.left+(u&&s.left),d=o.top+(u&&s.top),{width:f,height:p}=e;return a&&(f-=o.width+s.width,p-=o.height+s.height),{x:Math.round((l-h)/f*n.width/i),y:Math.round((c-d)/p*n.height/i)}}let ot=t=>Math.round(10*t)/10;function oe(t,e,n){let i=e||1,r=Math.floor(t.height*i),a=Math.floor(t.width*i);t.height=Math.floor(t.height),t.width=Math.floor(t.width);let o=t.canvas;return o.style&&(n||!o.style.height&&!o.style.width)&&(o.style.height=`${t.height}px`,o.style.width=`${t.width}px`),(t.currentDevicePixelRatio!==i||o.height!==r||o.width!==a)&&(t.currentDevicePixelRatio=i,o.height=r,o.width=a,t.ctx.setTransform(i,0,0,i,0,0),!0)}let on=function(){let t=!1;try{let e={get passive(){return t=!0,!1}};a2()&&(window.addEventListener("test",null,e),window.removeEventListener("test",null,e))}catch(t){}return t}();function oi(t,e){var n,i;let r=(n=t,i=e,a6(n).getPropertyValue(i)),a=r&&r.match(/^(\d+)(\.\d+)?px$/);return a?+a[1]:void 0}function or(t,e,n,i){return{x:t.x+n*(e.x-t.x),y:t.y+n*(e.y-t.y)}}function oa(t,e,n,i){return{x:t.x+n*(e.x-t.x),y:"middle"===i?n<.5?t.y:e.y:"after"===i?n<1?t.y:e.y:n>0?e.y:t.y}}function oo(t,e,n,i){let r={x:t.cp2x,y:t.cp2y},a={x:e.cp1x,y:e.cp1y},o=or(t,r,n),s=or(r,a,n),l=or(a,e,n),c=or(o,s,n),u=or(s,l,n);return or(c,u,n)}function os(t,e,n){var i,r;return t?(i=e,r=n,{x:t=>i+i+r-t,setWidth(t){r=t},textAlign:t=>"center"===t?t:"right"===t?"left":"right",xPlus:(t,e)=>t-e,leftForLtr:(t,e)=>t-e}):{x:t=>t,setWidth(t){},textAlign:t=>t,xPlus:(t,e)=>t+e,leftForLtr:(t,e)=>t}}function ol(t,e){let n,i;("ltr"===e||"rtl"===e)&&(i=[(n=t.canvas.style).getPropertyValue("direction"),n.getPropertyPriority("direction")],n.setProperty("direction",e,"important"),t.prevTextDirection=i)}function oc(t,e){void 0!==e&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}function ou(t){return"angle"===t?{between:rX,compare:rY,normalize:rJ}:{between:rK,compare:(t,e)=>t-e,normalize:t=>t}}function oh({start:t,end:e,count:n,loop:i,style:r}){return{start:t%n,end:e%n,loop:i&&(e-t+1)%n==0,style:r}}function od(t,e,n,i){return i&&i.setContext&&n?function(t,e,n,i){let r=t._chart.getContext(),a=of(t.options),{_datasetIndex:o,options:{spanGaps:s}}=t,l=n.length,c=[],u=a,h=e[0].start,d=h;function f(t,e,i,r){let a=s?-1:1;if(t!==e){for(t+=l;n[t%l].skip;)t-=a;for(;n[e%l].skip;)e+=a;t%l!=e%l&&(c.push({start:t%l,end:e%l,loop:i,style:r}),u=r,h=e%l)}}for(let t of e){let e;let a=n[(h=s?h:t.start)%l];for(d=h+1;d<=t.end;d++){let s=n[d%l];(function(t,e){if(!e)return!1;let n=[],i=function(t,e){return ai(e)?(!n.includes(e)&&n.push(e),n.indexOf(e)):e};return JSON.stringify(t,i)!==JSON.stringify(e,i)})(e=of(i.setContext(aR(r,{type:"segment",p0:a,p1:s,p0DataIndex:(d-1)%l,p1DataIndex:d%l,datasetIndex:o}))),u)&&f(h,d-1,t.loop,u),a=s,u=e}h<d-1&&f(h,d-1,t.loop,u)}return c}(t,e,n,i):e}function of(t){return{backgroundColor:t.backgroundColor,borderCapStyle:t.borderCapStyle,borderDash:t.borderDash,borderDashOffset:t.borderDashOffset,borderJoinStyle:t.borderJoinStyle,borderWidth:t.borderWidth,borderColor:t.borderColor}}var op=new class t{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,e,n,i){let r=e.listeners[i],a=e.duration;r.forEach(i=>i({chart:t,initial:e.initial,numSteps:a,currentStep:Math.min(n-e.start,a)}))}_refresh(){if(!this._request)this._running=!0,this._request=r5.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()})}_update(t=Date.now()){let e=0;this._charts.forEach((n,i)=>{let r;if(!n.running||!n.items.length)return;let a=n.items,o=a.length-1,s=!1;for(;o>=0;--o)(r=a[o])._active?(r._total>n.duration&&(n.duration=r._total),r.tick(t),s=!0):(a[o]=a[a.length-1],a.pop());s&&(i.draw(),this._notify(i,n,t,"progress")),!a.length&&(n.running=!1,this._notify(i,n,t,"complete"),n.initial=!1),e+=a.length}),this._lastDate=t,0===e&&(this._running=!1)}_getAnims(t){let e=this._charts,n=e.get(t);return!n&&(n={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(t,n)),n}listen(t,e,n){this._getAnims(t).listeners[e].push(n)}add(t,e){if(!!e&&!!e.length)this._getAnims(t).items.push(...e)}has(t){return this._getAnims(t).items.length>0}start(t){let e=this._charts.get(t);if(!!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;let e=this._charts.get(t);return!!e&&!!e.running&&!!e.items.length||!1}stop(t){let e=this._charts.get(t);if(!e||!e.items.length)return;let n=e.items,i=n.length-1;for(;i>=0;--i)n[i].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}remove(t){return this._charts.delete(t)}};let og="transparent",om={boolean:(t,e,n)=>n>.5?e:t,color(t,e,n){let i=ar(t||og),r=i.valid&&ar(e||og);return r&&r.valid?r.mix(i,n).hexString():e},number:(t,e,n)=>t+(e-t)*n};class ov{constructor(t,e,n,i){let r=e[n];i=aN([t.to,i,r,t.from]);let a=aN([t.from,r,i]);this._active=!0,this._fn=t.fn||om[t.type||typeof a],this._easing=an[t.easing]||an.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=n,this._from=a,this._to=i,this._promises=void 0}active(){return this._active}update(t,e,n){if(this._active){this._notify(!1);let i=this._target[this._prop],r=n-this._start,a=this._duration-r;this._start=n,this._duration=Math.floor(Math.max(a,t.duration)),this._total+=r,this._loop=!!t.loop,this._to=aN([t.to,e,i,t.from]),this._from=aN([t.from,i,e])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){let e;let n=t-this._start,i=this._duration,r=this._prop,a=this._from,o=this._loop,s=this._to;if(this._active=a!==s&&(o||n<i),!this._active){this._target[r]=s,this._notify(!0);return}if(n<0){this._target[r]=a;return}e=n/i%2,e=o&&e>1?2-e:e,e=this._easing(Math.min(1,Math.max(0,e))),this._target[r]=this._fn(a,s,e)}wait(){let t=this._promises||(this._promises=[]);return new Promise((e,n)=>{t.push({res:e,rej:n})})}_notify(t){let e=t?"res":"rej",n=this._promises||[];for(let t=0;t<n.length;t++)n[t][e]()}}class oy{constructor(t,e){this._chart=t,this._properties=new Map,this.configure(e)}configure(t){if(!rs(t))return;let e=Object.keys(am.animation),n=this._properties;Object.getOwnPropertyNames(t).forEach(i=>{let r=t[i];if(!rs(r))return;let a={};for(let t of e)a[t]=r[t];(ro(r.properties)&&r.properties||[i]).forEach(t=>{(t===i||!n.has(t))&&n.set(t,a)})})}_animateOptions(t,e){let n=e.options,i=function(t,e){if(!e)return;let n=t.options;if(!n){t.options=e;return}return n.$shared&&(t.options=n=Object.assign({},n,{$shared:!1,$animations:{}})),n}(t,n);if(!i)return[];let r=this._createAnimations(i,n);return n.$shared&&(function(t,e){let n=[],i=Object.keys(e);for(let e=0;e<i.length;e++){let r=t[i[e]];r&&r.active()&&n.push(r.wait())}return Promise.all(n)})(t.options.$animations,n).then(()=>{t.options=n},()=>{}),r}_createAnimations(t,e){let n;let i=this._properties,r=[],a=t.$animations||(t.$animations={}),o=Object.keys(e),s=Date.now();for(n=o.length-1;n>=0;--n){let l=o[n];if("$"===l.charAt(0))continue;if("options"===l){r.push(...this._animateOptions(t,e));continue}let c=e[l],u=a[l],h=i.get(l);if(u){if(h&&u.active()){u.update(h,c,s);continue}u.cancel()}if(!h||!h.duration){t[l]=c;continue}a[l]=u=new ov(h,t,l,c),r.push(u)}return r}update(t,e){if(0===this._properties.size){Object.assign(t,e);return}let n=this._createAnimations(t,e);if(n.length)return op.add(this._chart,n),!0}}function ob(t,e){let n=t&&t.options||{},i=n.reverse,r=void 0===n.min?e:0,a=void 0===n.max?e:0;return{start:i?a:r,end:i?r:a}}function ox(t,e){let n,i;let r=[],a=t._getSortedDatasetMetas(e);for(n=0,i=a.length;n<i;++n)r.push(a[n].index);return r}function ow(t,e,n,i={}){let r,a,o,s;let l=t.keys,c="single"===i.mode;if(null===e)return;let u=!1;for(r=0,a=l.length;r<a;++r){if((o=+l[r])===n){if(u=!0,i.all)continue;break}rl(s=t.values[o])&&(c||0===e||rN(e)===rN(s))&&(e+=s)}return u||i.all?e:0}function o_(t,e){let n=t&&t.options.stacked;return n||void 0===n&&void 0!==e.stack}function ok(t,e,n,i){for(let r of e.getMatchingVisibleMetas(i).reverse()){let e=t[r.index];if(n&&e>0||!n&&e<0)return r.index}return null}function oS(t,e){var n,i,r;let a;let{chart:o,_cachedMeta:s}=t,l=o._stacks||(o._stacks={}),{iScale:c,vScale:u,index:h}=s,d=c.axis,f=u.axis;let p=(n=c,i=u,r=s,`${n.id}.${i.id}.${r.stack||r.type}`),g=e.length;for(let t=0;t<g;++t){let n=e[t],{[d]:i,[f]:r}=n;(a=(n._stacks||(n._stacks={}))[f]=function(t,e,n){let i=t[e]||(t[e]={});return i[n]||(i[n]={})}(l,p,i))[h]=r,a._top=ok(a,u,!0,s.type),a._bottom=ok(a,u,!1,s.type),(a._visualValues||(a._visualValues={}))[h]=r}}function oC(t,e){let n=t.scales;return Object.keys(n).filter(t=>n[t].axis===e).shift()}function oM(t,e){let n=t.controller.index,i=t.vScale&&t.vScale.axis;if(!!i)for(let r of e=e||t._parsed){let t=r._stacks;if(!t||void 0===t[i]||void 0===t[i][n])return;delete t[i][n],void 0!==t[i]._visualValues&&void 0!==t[i]._visualValues[n]&&delete t[i]._visualValues[n]}}let oA=t=>"reset"===t||"none"===t,oL=(t,e)=>e?t:Object.assign({},t),oE=(t,e,n)=>t&&!e.hidden&&e._stacked&&{keys:ox(n,!0),values:null};class oT{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(){let t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=o_(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&&oM(this._cachedMeta),this.index=t}linkScales(){let t=this.chart,e=this._cachedMeta,n=this.getDataset(),i=(t,e,n,i)=>"x"===t?e:"r"===t?i:n,r=e.xAxisID=ru(n.xAxisID,oC(t,"x")),a=e.yAxisID=ru(n.yAxisID,oC(t,"y")),o=e.rAxisID=ru(n.rAxisID,oC(t,"r")),s=e.indexAxis,l=e.iAxisID=i(s,r,a,o),c=e.vAxisID=i(s,a,r,o);e.xScale=this.getScaleForId(r),e.yScale=this.getScaleForId(a),e.rScale=this.getScaleForId(o),e.iScale=this.getScaleForId(l),e.vScale=this.getScaleForId(c)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){let e=this._cachedMeta;return t===e.iScale?e.vScale:e.iScale}reset(){this._update("reset")}_destroy(){let t=this._cachedMeta;this._data&&r2(this._data,this),t._stacked&&oM(t)}_dataCheck(){let t=this.getDataset(),e=t.data||(t.data=[]),n=this._data;if(rs(e)){let t=this._cachedMeta;this._data=function(t,e){let n,i,r;let{iScale:a,vScale:o}=e,s="x"===a.axis?"x":"y",l="x"===o.axis?"x":"y",c=Object.keys(t),u=Array(c.length);for(n=0,i=c.length;n<i;++n)r=c[n],u[n]={[s]:r,[l]:t[r]};return u}(e,t)}else if(n!==e){if(n){r2(n,this);let t=this._cachedMeta;oM(t),t._parsed=[]}e&&Object.isExtensible(e)&&!function(t,e){if(t._chartjs){t._chartjs.listeners.push(e);return}Object.defineProperty(t,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[e]}}),r1.forEach(e=>{let n="_onData"+rS(e),i=t[e];Object.defineProperty(t,e,{configurable:!0,enumerable:!1,value(...e){let r=i.apply(this,e);return t._chartjs.listeners.forEach(t=>{"function"==typeof t[n]&&t[n](...e)}),r}})})}(e,this),this._syncList=[],this._data=e}}addElements(){let t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){let e=this._cachedMeta,n=this.getDataset(),i=!1;this._dataCheck();let r=e._stacked;e._stacked=o_(e.vScale,e),e.stack!==n.stack&&(i=!0,oM(e),e.stack=n.stack),this._resyncElements(t),(i||r!==e._stacked)&&(oS(this,e._parsed),e._stacked=o_(e.vScale,e))}configure(){let t=this.chart.config,e=t.datasetScopeKeys(this._type),n=t.getOptionScopes(this.getDataset(),e,!0);this.options=t.createResolver(n,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,e){let n,i,r;let{_cachedMeta:a,_data:o}=this,{iScale:s,_stacked:l}=a,c=s.axis,u=0===t&&e===o.length||a._sorted,h=t>0&&a._parsed[t-1];if(!1===this._parsing)a._parsed=o,a._sorted=!0,r=o;else{r=ro(o[t])?this.parseArrayData(a,o,t,e):rs(o[t])?this.parseObjectData(a,o,t,e):this.parsePrimitiveData(a,o,t,e);let s=()=>null===i[c]||h&&i[c]<h[c];for(n=0;n<e;++n)a._parsed[n+t]=i=r[n],u&&(s()&&(u=!1),h=i);a._sorted=u}l&&oS(this,r)}parsePrimitiveData(t,e,n,i){let r,a;let{iScale:o,vScale:s}=t,l=o.axis,c=s.axis,u=o.getLabels(),h=o===s,d=Array(i);for(r=0;r<i;++r)a=r+n,d[r]={[l]:h||o.parse(u[a],a),[c]:s.parse(e[a],a)};return d}parseArrayData(t,e,n,i){let r,a,o;let{xScale:s,yScale:l}=t,c=Array(i);for(r=0;r<i;++r)o=e[a=r+n],c[r]={x:s.parse(o[0],a),y:l.parse(o[1],a)};return c}parseObjectData(t,e,n,i){let r,a,o;let{xScale:s,yScale:l}=t,{xAxisKey:c="x",yAxisKey:u="y"}=this._parsing,h=Array(i);for(r=0;r<i;++r)o=e[a=r+n],h[r]={x:s.parse(rk(o,c),a),y:l.parse(rk(o,u),a)};return h}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,e,n){let i=this.chart,r=this._cachedMeta,a=e[t.axis];return ow({keys:ox(i,!0),values:e._stacks[t.axis]._visualValues},a,r.index,{mode:n})}updateRangeFromParsed(t,e,n,i){let r=n[e.axis],a=null===r?NaN:r,o=i&&n._stacks[e.axis];i&&o&&(i.values=o,a=ow(i,r,this._cachedMeta.index)),t.min=Math.min(t.min,a),t.max=Math.max(t.max,a)}getMinMax(t,e){let n,i;let r=this._cachedMeta,a=r._parsed,o=r._sorted&&t===r.iScale,s=a.length,l=this._getOtherScale(t),c=oE(e,r,this.chart),u={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:h,max:d}=function(t){let{min:e,max:n,minDefined:i,maxDefined:r}=t.getUserBounds();return{min:i?e:Number.NEGATIVE_INFINITY,max:r?n:Number.POSITIVE_INFINITY}}(l);function f(){let e=(i=a[n])[l.axis];return!rl(i[t.axis])||h>e||d<e}for(n=0;n<s;++n){if(!f()){if(this.updateRangeFromParsed(u,t,i,c),o)break}}if(o)for(n=s-1;n>=0;--n){if(!f()){this.updateRangeFromParsed(u,t,i,c);break}}return u}getAllParsedValues(t){let e,n,i;let r=this._cachedMeta._parsed,a=[];for(e=0,n=r.length;e<n;++e)rl(i=r[e][t.axis])&&a.push(i);return a}getMaxOverflow(){return!1}getLabelAndValue(t){let e=this._cachedMeta,n=e.iScale,i=e.vScale,r=this.getParsed(t);return{label:n?""+n.getLabelForValue(r[n.axis]):"",value:i?""+i.getLabelForValue(r[i.axis]):""}}_update(t){var e;let n,i,r,a,o=this._cachedMeta;this.update(t||"default");o._clip=(rs(e=ru(this.options.clip,function(t,e,n){if(!1===n)return!1;let i=ob(t,n),r=ob(e,n);return{top:r.end,right:i.end,bottom:r.start,left:i.start}}(o.xScale,o.yScale,this.getMaxOverflow())))?(n=e.top,i=e.right,r=e.bottom,a=e.left):n=i=r=a=e,{top:n,right:i,bottom:r,left:a,disabled:!1===e})}update(t){}draw(){let t;let e=this._ctx,n=this.chart,i=this._cachedMeta,r=i.data||[],a=n.chartArea,o=[],s=this._drawStart||0,l=this._drawCount||r.length-s,c=this.options.drawActiveElementsOnTop;for(i.dataset&&i.dataset.draw(e,a,s,l),t=s;t<s+l;++t){let n=r[t];if(!n.hidden)n.active&&c?o.push(n):n.draw(e,a)}for(t=0;t<o.length;++t)o[t].draw(e,a)}getStyle(t,e){let n=e?"active":"default";return void 0===t&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(n):this.resolveDataElementOptions(t||0,n)}getContext(t,e,n){var i,r,a,o;let s;let l=this.getDataset();if(t>=0&&t<this._cachedMeta.data.length){;let e=this._cachedMeta.data[t];(s=e.$context||(e.$context=(i=this.getContext(),r=t,aR(i,{active:!1,dataIndex:r,parsed:void 0,raw:void 0,element:e,index:r,mode:"default",type:"data"})))).parsed=this.getParsed(t),s.raw=l.data[t],s.index=s.dataIndex=t}else{;(s=this.$context||(this.$context=(a=this.chart.getContext(),aR(a,{active:!1,dataset:void 0,datasetIndex:o=this.index,index:o,mode:"default",type:"dataset"})))).dataset=l,s.index=s.datasetIndex=this.index}return s.active=!!e,s.mode=n,s}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,e){return this._resolveElementOptions(this.dataElementType.id,e,t)}_resolveElementOptions(t,e="default",n){let i="active"===e,r=this._cachedDataOpts,a=t+"-"+e,o=r[a],s=this.enableOptionSharing&&rC(n);if(o)return oL(o,s);let l=this.chart.config,c=l.datasetElementScopeKeys(this._type,t),u=i?[`${t}Hover`,"hover",t,""]:[t,""],h=l.getOptionScopes(this.getDataset(),c),d=Object.keys(am.elements[t]),f=l.resolveNamedOptions(h,d,()=>this.getContext(n,i,e),u);return f.$shared&&(f.$shared=s,r[a]=Object.freeze(oL(f,s))),f}_resolveAnimations(t,e,n){let i;let r=this.chart,a=this._cachedDataOpts,o=`animation-${e}`,s=a[o];if(s)return s;if(!1!==r.options.animation){let r=this.chart.config,a=r.datasetAnimationScopeKeys(this._type,e),o=r.getOptionScopes(this.getDataset(),a);i=r.createResolver(o,this.getContext(t,n,e))}let l=new oy(r,i&&i.animations);return i&&i._cacheable&&(a[o]=Object.freeze(l)),l}getSharedOptions(t){if(!!t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||oA(t)||this.chart._animationsDisabled}_getSharedOptions(t,e){let n=this.resolveDataElementOptions(t,e),i=this._sharedOptions,r=this.getSharedOptions(n),a=this.includeOptions(e,r)||r!==i;return this.updateSharedOptions(r,e,n),{sharedOptions:r,includeOptions:a}}updateElement(t,e,n,i){oA(i)?Object.assign(t,n):this._resolveAnimations(e,i).update(t,n)}updateSharedOptions(t,e,n){t&&!oA(e)&&this._resolveAnimations(void 0,e).update(t,n)}_setStyle(t,e,n,i){t.active=i;let r=this.getStyle(e,i);this._resolveAnimations(e,n,i).update(t,{options:!i&&this.getSharedOptions(r)||r})}removeHoverStyle(t,e,n){this._setStyle(t,n,"active",!1)}setHoverStyle(t,e,n){this._setStyle(t,n,"active",!0)}_removeDatasetHoverStyle(){let t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){let t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){let e=this._data,n=this._cachedMeta.data;for(let[t,e,n]of this._syncList)this[t](e,n);this._syncList=[];let i=n.length,r=e.length,a=Math.min(r,i);a&&this.parse(0,a),r>i?this._insertElements(i,r-i,t):r<i&&this._removeElements(r,i-r)}_insertElements(t,e,n=!0){let i;let r=this._cachedMeta,a=r.data,o=t+e,s=t=>{for(t.length+=e,i=t.length-1;i>=o;i--)t[i]=t[i-e]};for(s(a),i=t;i<o;++i)a[i]=new this.dataElementType;this._parsing&&s(r._parsed),this.parse(t,e),n&&this.updateElements(a,t,e,"reset")}updateElements(t,e,n,i){}_removeElements(t,e){let n=this._cachedMeta;if(this._parsing){let i=n._parsed.splice(t,e);n._stacked&&oM(n,i)}n.data.splice(t,e)}_sync(t){if(this._parsing)this._syncList.push(t);else{let[e,n,i]=t;this[e](n,i)}this.chart._dataChanges.push([this.index,...t])}_onDataPush(){let 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]);let n=arguments.length-2;n&&this._sync(["_insertElements",t,n])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}function oO(t,e,n,i){return ro(t)?!function(t,e,n,i){let r=n.parse(t[0],i),a=n.parse(t[1],i),o=Math.min(r,a),s=Math.max(r,a),l=o,c=s;Math.abs(o)>Math.abs(s)&&(l=s,c=o),e[n.axis]=c,e._custom={barStart:l,barEnd:c,start:r,end:a,min:o,max:s}}(t,e,n,i):e[n.axis]=n.parse(t,i),e}function oP(t,e,n,i){let r,a,o,s;let l=t.iScale,c=t.vScale,u=l.getLabels(),h=l===c,d=[];for(r=n,a=n+i;r<a;++r)s=e[r],(o={})[l.axis]=h||l.parse(u[r],r),d.push(oO(s,o,c,r));return d}function oD(t){return t&&void 0!==t.barStart&&void 0!==t.barEnd}function oI(t,e,n,i){return t=i?oj(t=function(t,e,n){return t===e?n:t===n?e:t}(t,e,n),n,e):oj(t,e,n)}function oj(t,e,n){return"start"===t?e:"end"===t?n:t}class oF extends null{static id=null;static defaults=null;static overrides=null;initialize(){this.enableOptionSharing=!0,super.initialize()}parsePrimitiveData(t,e,n,i){let r=super.parsePrimitiveData(t,e,n,i);for(let t=0;t<r.length;t++)r[t]._custom=this.resolveDataElementOptions(t+n).radius;return r}parseArrayData(t,e,n,i){let r=super.parseArrayData(t,e,n,i);for(let t=0;t<r.length;t++){let i=e[n+t];r[t]._custom=valueOrDefault(i[2],this.resolveDataElementOptions(t+n).radius)}return r}parseObjectData(t,e,n,i){let r=super.parseObjectData(t,e,n,i);for(let t=0;t<r.length;t++){let i=e[n+t];r[t]._custom=valueOrDefault(i&&i.r&&+i.r,this.resolveDataElementOptions(t+n).radius)}return r}getMaxOverflow(){let t=this._cachedMeta.data,e=0;for(let n=t.length-1;n>=0;--n)e=Math.max(e,t[n].size(this.resolveDataElementOptions(n))/2);return e>0&&e}getLabelAndValue(t){let e=this._cachedMeta,n=this.chart.data.labels||[],{xScale:i,yScale:r}=e,a=this.getParsed(t),o=i.getLabelForValue(a.x),s=r.getLabelForValue(a.y),l=a._custom;return{label:n[t]||"",value:"("+o+", "+s+(l?", "+l:"")+")"}}update(t){let e=this._cachedMeta.data;this.updateElements(e,0,e.length,t)}updateElements(t,e,n,i){let r="reset"===i,{iScale:a,vScale:o}=this._cachedMeta,{sharedOptions:s,includeOptions:l}=this._getSharedOptions(e,i),c=a.axis,u=o.axis;for(let h=e;h<e+n;h++){let e=t[h],n=!r&&this.getParsed(h),d={},f=d[c]=r?a.getPixelForDecimal(.5):a.getPixelForValue(n[c]),p=d[u]=r?o.getBasePixel():o.getPixelForValue(n[u]);d.skip=isNaN(f)||isNaN(p),l&&(d.options=s||this.resolveDataElementOptions(h,e.active?"active":i),r&&(d.options.radius=0)),this.updateElement(e,h,d,i)}}resolveDataElementOptions(t,e){let n=this.getParsed(t),i=super.resolveDataElementOptions(t,e);i.$shared&&(i=Object.assign({},i,{$shared:!1}));let r=i.radius;return"active"!==e&&(i.radius=0),i.radius+=valueOrDefault(n&&n._custom,r),i}}class oN extends oT{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){let e=t.data;if(e.labels.length&&e.datasets.length){let{labels:{pointStyle:n,color:i}}=t.legend.options;return e.labels.map((e,r)=>{let a=t.getDatasetMeta(0).controller.getStyle(r);return{text:e,fillStyle:a.backgroundColor,strokeStyle:a.borderColor,fontColor:i,lineWidth:a.borderWidth,pointStyle:n,hidden:!t.getDataVisibility(r),index:r}})}return[]}},onClick(t,e,n){n.chart.toggleDataVisibility(e.index),n.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){let n=this.getDataset().data,i=this._cachedMeta;if(!1===this._parsing)i._parsed=n;else{let r,a,o=t=>+n[t];if(rs(n[t])){let{key:t="value"}=this._parsing;o=e=>+rk(n[e],t)}for(r=t,a=t+e;r<a;++r)i._parsed[r]=o(r)}}_getRotation(){return rH(this.options.rotation-90)}_getCircumference(){return rH(this.options.circumference)}_getRotationExtents(){let t=rE,e=-rE;for(let n=0;n<this.chart.data.datasets.length;++n)if(this.chart.isDatasetVisible(n)&&this.chart.getDatasetMeta(n).type===this._type){let i=this.chart.getDatasetMeta(n).controller,r=i._getRotation(),a=i._getCircumference();t=Math.min(t,r),e=Math.max(e,r+a)}return{rotation:t,circumference:e-t}}update(t){let{chartArea:e}=this.chart,n=this._cachedMeta,i=n.data,r=this.getMaxBorderWidth()+this.getMaxOffset(i)+this.options.spacing,a=Math.max((Math.min(e.width,e.height)-r)/2,0),o=Math.min(rh(this.options.cutout,a),1),s=this._getRingWeight(this.index),{circumference:l,rotation:c}=this._getRotationExtents(),{ratioX:u,ratioY:h,offsetX:d,offsetY:f}=function(t,e,n){let i=1,r=1,a=0,o=0;if(e<rE){let s=t+e,l=Math.cos(t),c=Math.sin(t),u=Math.cos(s),h=Math.sin(s),d=(e,i,r)=>rX(e,t,s,!0)?1:Math.max(i,i*n,r,r*n),f=(e,i,r)=>rX(e,t,s,!0)?-1:Math.min(i,i*n,r,r*n),p=d(0,l,u),g=d(rD,c,h),m=f(rL,l,u),v=f(rL+rD,c,h);i=(p-m)/2,r=(g-v)/2,a=-(p+m)/2,o=-(g+v)/2}return{ratioX:i,ratioY:r,offsetX:a,offsetY:o}}(c,l,o),p=(e.width-r)/u,g=Math.max(Math.min(p,(e.height-r)/h)/2,0),m=rd(this.options.radius,g),v=Math.max(m*o,0),y=(m-v)/this._getVisibleDatasetWeightTotal();this.offsetX=d*m,this.offsetY=f*m,n.total=this.calculateTotal(),this.outerRadius=m-y*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-y*s,0),this.updateElements(i,0,i.length,t)}_circumference(t,e){let n=this.options,i=this._cachedMeta,r=this._getCircumference();return e&&n.animation.animateRotate||!this.chart.getDataVisibility(t)||null===i._parsed[t]||i.data[t].hidden?0:this.calculateCircumference(i._parsed[t]*r/rE)}updateElements(t,e,n,i){let r;let a="reset"===i,o=this.chart,s=o.chartArea,l=o.options.animation,c=(s.left+s.right)/2,u=(s.top+s.bottom)/2,h=a&&l.animateScale,d=h?0:this.innerRadius,f=h?0:this.outerRadius,{sharedOptions:p,includeOptions:g}=this._getSharedOptions(e,i),m=this._getRotation();for(r=0;r<e;++r)m+=this._circumference(r,a);for(r=e;r<e+n;++r){let e=this._circumference(r,a),n=t[r],o={x:c+this.offsetX,y:u+this.offsetY,startAngle:m,endAngle:m+e,circumference:e,outerRadius:f,innerRadius:d};g&&(o.options=p||this.resolveDataElementOptions(r,n.active?"active":i)),m+=e,this.updateElement(n,r,o,i)}}calculateTotal(){let t;let e=this._cachedMeta,n=e.data,i=0;for(t=0;t<n.length;t++){let r=e._parsed[t];null!==r&&!isNaN(r)&&this.chart.getDataVisibility(t)&&!n[t].hidden&&(i+=Math.abs(r))}return i}calculateCircumference(t){let e=this._cachedMeta.total;return e>0&&!isNaN(t)?Math.abs(t)/e*rE:0}getLabelAndValue(t){let e=this._cachedMeta,n=this.chart,i=n.data.labels||[],r=ac(e._parsed[t],n.options.locale);return{label:i[t]||"",value:r}}getMaxBorderWidth(t){let e,n,i,r,a,o=0,s=this.chart;if(!t){for(e=0,n=s.data.datasets.length;e<n;++e)if(s.isDatasetVisible(e)){t=(i=s.getDatasetMeta(e)).data,r=i.controller;break}}if(!t)return 0;for(e=0,n=t.length;e<n;++e)"inner"!==(a=r.resolveDataElementOptions(e)).borderAlign&&(o=Math.max(o,a.borderWidth||0,a.hoverBorderWidth||0));return o}getMaxOffset(t){let e=0;for(let n=0,i=t.length;n<i;++n){let t=this.resolveDataElementOptions(n);e=Math.max(e,t.offset||0,t.hoverOffset||0)}return e}_getRingWeightOffset(t){let e=0;for(let n=0;n<t;++n)this.chart.isDatasetVisible(n)&&(e+=this._getRingWeight(n));return e}_getRingWeight(t){return Math.max(ru(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}class oR extends null{static id=null;static defaults=null;static overrides=null;initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){let e=this._cachedMeta,{dataset:n,data:i=[],_dataset:r}=e,a=this.chart._animationsDisabled,{start:o,count:s}=_getStartAndCountOfVisiblePoints(e,i,a);this._drawStart=o,this._drawCount=s,_scaleRangesChanged(e)&&(o=0,s=i.length),n._chart=this.chart,n._datasetIndex=this.index,n._decimated=!!r._decimated,n.points=i;let l=this.resolveDatasetElementOptions(t);!this.options.showLine&&(l.borderWidth=0),l.segment=this.options.segment,this.updateElement(n,void 0,{animated:!a,options:l},t),this.updateElements(i,o,s,t)}updateElements(t,e,n,i){let r="reset"===i,{iScale:a,vScale:o,_stacked:s,_dataset:l}=this._cachedMeta,{sharedOptions:c,includeOptions:u}=this._getSharedOptions(e,i),h=a.axis,d=o.axis,{spanGaps:f,segment:p}=this.options,g=isNumber(f)?f:Number.POSITIVE_INFINITY,m=this.chart._animationsDisabled||r||"none"===i,v=e+n,y=t.length,b=e>0&&this.getParsed(e-1);for(let n=0;n<y;++n){let f=t[n],y=m?f:{};if(n<e||n>=v){y.skip=!0;continue}let x=this.getParsed(n),w=isNullOrUndef(x[d]),_=y[h]=a.getPixelForValue(x[h],n),k=y[d]=r||w?o.getBasePixel():o.getPixelForValue(s?this.applyStack(o,x,s):x[d],n);y.skip=isNaN(_)||isNaN(k)||w,y.stop=n>0&&Math.abs(x[h]-b[h])>g,p&&(y.parsed=x,y.raw=l.data[n]),u&&(y.options=c||this.resolveDataElementOptions(n,f.active?"active":i)),!m&&this.updateElement(f,n,y,i),b=x}}getMaxOverflow(){let t=this._cachedMeta,e=t.dataset,n=e.options&&e.options.borderWidth||0,i=t.data||[];if(!i.length)return n;let r=i[0].size(this.resolveDataElementOptions(0));return Math.max(n,r,i[i.length-1].size(this.resolveDataElementOptions(i.length-1)))/2}draw(){let t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}class oz extends oT{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){let e=t.data;if(e.labels.length&&e.datasets.length){let{labels:{pointStyle:n,color:i}}=t.legend.options;return e.labels.map((e,r)=>{let a=t.getDatasetMeta(0).controller.getStyle(r);return{text:e,fillStyle:a.backgroundColor,strokeStyle:a.borderColor,fontColor:i,lineWidth:a.borderWidth,pointStyle:n,hidden:!t.getDataVisibility(r),index:r}})}return[]}},onClick(t,e,n){n.chart.toggleDataVisibility(e.index),n.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){let e=this._cachedMeta,n=this.chart,i=n.data.labels||[],r=ac(e._parsed[t].r,n.options.locale);return{label:i[t]||"",value:r}}parseObjectData(t,e,n,i){return aK.bind(this)(t,e,n,i)}update(t){let e=this._cachedMeta.data;this._updateRadius(),this.updateElements(e,0,e.length,t)}getMinMax(){let t=this._cachedMeta,e={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return t.data.forEach((t,n)=>{let i=this.getParsed(n).r;!isNaN(i)&&this.chart.getDataVisibility(n)&&(i<e.min&&(e.min=i),i>e.max&&(e.max=i))}),e}_updateRadius(){let t=this.chart,e=t.chartArea,n=t.options,i=Math.max(Math.min(e.right-e.left,e.bottom-e.top)/2,0),r=Math.max(n.cutoutPercentage?i/100*n.cutoutPercentage:1,0),a=(i-r)/t.getVisibleDatasetCount();this.outerRadius=i-a*this.index,this.innerRadius=this.outerRadius-a}updateElements(t,e,n,i){let r;let a="reset"===i,o=this.chart,s=o.options.animation,l=this._cachedMeta.rScale,c=l.xCenter,u=l.yCenter,h=l.getIndexAngle(0)-.5*rL,d=h,f=360/this.countVisibleElements();for(r=0;r<e;++r)d+=this._computeAngle(r,i,f);for(r=e;r<e+n;r++){let e=t[r],n=d,p=d+this._computeAngle(r,i,f),g=o.getDataVisibility(r)?l.getDistanceFromCenterForValue(this.getParsed(r).r):0;d=p,a&&(s.animateScale&&(g=0),s.animateRotate&&(n=p=h));let m={x:c,y:u,innerRadius:0,outerRadius:g,startAngle:n,endAngle:p,options:this.resolveDataElementOptions(r,e.active?"active":i)};this.updateElement(e,r,m,i)}}countVisibleElements(){let t=this._cachedMeta,e=0;return t.data.forEach((t,n)=>{!isNaN(this.getParsed(n).r)&&this.chart.getDataVisibility(n)&&e++}),e}_computeAngle(t,e,n){return this.chart.getDataVisibility(t)?rH(this.resolveDataElementOptions(t,e).angle||n):0}}class oB extends null{static id=null;static defaults=null;static overrides=null;getLabelAndValue(t){let e=this._cachedMeta.vScale,n=this.getParsed(t);return{label:e.getLabels()[t],value:""+e.getLabelForValue(n[e.axis])}}parseObjectData(t,e,n,i){return _parseObjectDataRadialScale.bind(this)(t,e,n,i)}update(t){let e=this._cachedMeta,n=e.dataset,i=e.data||[],r=e.iScale.getLabels();if(n.points=i,"resize"!==t){let e=this.resolveDatasetElementOptions(t);!this.options.showLine&&(e.borderWidth=0);let a={_loop:!0,_fullLoop:r.length===i.length,options:e};this.updateElement(n,void 0,a,t)}this.updateElements(i,0,i.length,t)}updateElements(t,e,n,i){let r=this._cachedMeta.rScale,a="reset"===i;for(let o=e;o<e+n;o++){let e=t[o],n=this.resolveDataElementOptions(o,e.active?"active":i),s=r.getPointPositionForValue(o,this.getParsed(o).r),l=a?r.xCenter:s.x,c=a?r.yCenter:s.y,u={x:l,y:c,angle:s.angle,skip:isNaN(l)||isNaN(c),options:n};this.updateElement(e,o,u,i)}}}class o$ extends null{static id=null;static defaults=null;static overrides=null;getLabelAndValue(t){let e=this._cachedMeta,n=this.chart.data.labels||[],{xScale:i,yScale:r}=e,a=this.getParsed(t),o=i.getLabelForValue(a.x),s=r.getLabelForValue(a.y);return{label:n[t]||"",value:"("+o+", "+s+")"}}update(t){let e=this._cachedMeta,{data:n=[]}=e,i=this.chart._animationsDisabled,{start:r,count:a}=_getStartAndCountOfVisiblePoints(e,n,i);if(this._drawStart=r,this._drawCount=a,_scaleRangesChanged(e)&&(r=0,a=n.length),this.options.showLine){!this.datasetElementType&&this.addElements();let{dataset:r,_dataset:a}=e;r._chart=this.chart,r._datasetIndex=this.index,r._decimated=!!a._decimated,r.points=n;let o=this.resolveDatasetElementOptions(t);o.segment=this.options.segment,this.updateElement(r,void 0,{animated:!i,options:o},t)}else this.datasetElementType&&(delete e.dataset,this.datasetElementType=!1);this.updateElements(n,r,a,t)}addElements(){let{showLine:t}=this.options;!this.datasetElementType&&t&&(this.datasetElementType=this.chart.registry.getElement("line")),super.addElements()}updateElements(t,e,n,i){let r="reset"===i,{iScale:a,vScale:o,_stacked:s,_dataset:l}=this._cachedMeta,c=this.resolveDataElementOptions(e,i),u=this.getSharedOptions(c),h=this.includeOptions(i,u),d=a.axis,f=o.axis,{spanGaps:p,segment:g}=this.options,m=isNumber(p)?p:Number.POSITIVE_INFINITY,v=this.chart._animationsDisabled||r||"none"===i,y=e>0&&this.getParsed(e-1);for(let c=e;c<e+n;++c){let e=t[c],n=this.getParsed(c),p=v?e:{},b=isNullOrUndef(n[f]),x=p[d]=a.getPixelForValue(n[d],c),w=p[f]=r||b?o.getBasePixel():o.getPixelForValue(s?this.applyStack(o,n,s):n[f],c);p.skip=isNaN(x)||isNaN(w)||b,p.stop=c>0&&Math.abs(n[d]-y[d])>m,g&&(p.parsed=n,p.raw=l.data[c]),h&&(p.options=u||this.resolveDataElementOptions(c,e.active?"active":i)),!v&&this.updateElement(e,c,p,i),y=n}this.updateSharedOptions(u,i,c)}getMaxOverflow(){let t=this._cachedMeta,e=t.data||[];if(!this.options.showLine){let t=0;for(let n=e.length-1;n>=0;--n)t=Math.max(t,e[n].size(this.resolveDataElementOptions(n))/2);return t>0&&t}let n=t.dataset,i=n.options&&n.options.borderWidth||0;if(!e.length)return i;let r=e[0].size(this.resolveDataElementOptions(0));return Math.max(i,r,e[e.length-1].size(this.resolveDataElementOptions(e.length-1)))/2}}function oH(){throw Error("This method is not implemented: Check that a complete date adapter is provided.")}class oW{static override(t){Object.assign(oW.prototype,t)}options;constructor(t){this.options=t||{}}init(){}formats(){return oH()}parse(){return oH()}format(){return oH()}add(){return oH()}diff(){return oH()}startOf(){return oH()}endOf(){return oH()}}var oU=oW;function oq(t,e,n,i,r){let a=t.getSortedVisibleDatasetMetas(),o=n[e];for(let t=0,n=a.length;t<n;++t){let{index:n,data:s}=a[t],{lo:l,hi:c}=function(t,e,n,i){let{controller:r,data:a,_sorted:o}=t,s=r._cachedMeta.iScale;if(s&&e===s.axis&&"r"!==e&&o&&a.length){let t=s._reversePixels?r0:rQ;if(!i)return t(a,e,n);if(r._sharedOptions){let i=a[0],r="function"==typeof i.getRange&&i.getRange(e);if(r){let i=t(a,e,n-r),o=t(a,e,n+r);return{lo:i.lo,hi:o.hi}}}}return{lo:0,hi:a.length-1}}(a[t],e,o,r);for(let t=l;t<=c;++t){let e=s[t];!e.skip&&i(e,n,t)}}}function oV(t,e,n,i,r){let a=[];return r||t.isPointInArea(e)?(oq(t,n,e,function(n,o,s){if(!!r||!!a_(n,t.chartArea,0))n.inRange(e.x,e.y,i)&&a.push({element:n,datasetIndex:o,index:s})},!0),a):a}function oY(t,e,n,i,r,a){var o,s,l,c;let u;if(!a&&!t.isPointInArea(e))return[];return"r"!==n||i?function(t,e,n,i,r,a){let o=[],s=function(t){let e=-1!==t.indexOf("x"),n=-1!==t.indexOf("y");return function(t,i){let r=e?Math.abs(t.x-i.x):0;return Math.sqrt(Math.pow(r,2)+Math.pow(n?Math.abs(t.y-i.y):0,2))}}(n),l=Number.POSITIVE_INFINITY;return oq(t,n,e,function(n,c,u){let h=n.inRange(e.x,e.y,r);if(i&&!h)return;let d=n.getCenterPoint(r);if(!(a||t.isPointInArea(d))&&!h)return;let f=s(e,d);f<l?(o=[{element:n,datasetIndex:c,index:u}],l=f):f===l&&o.push({element:n,datasetIndex:c,index:u})}),o}(t,e,n,i,r,a):(o=t,s=e,l=n,c=r,u=[],oq(o,l,s,function(t,e,n){let{startAngle:i,endAngle:r}=t.getProps(["startAngle","endAngle"],c),{angle:a}=rq(t,{x:s.x,y:s.y});rX(a,i,r)&&u.push({element:t,datasetIndex:e,index:n})}),u)}function oJ(t,e,n,i,r){let a=[],o="x"===n?"inXRange":"inYRange",s=!1;return(oq(t,n,e,(t,i,l)=>{t[o]&&t[o](e[n],r)&&(a.push({element:t,datasetIndex:i,index:l}),s=s||t.inRange(e.x,e.y,r))}),i&&!s)?[]:a}var oX={modes:{index(t,e,n,i){let r=a7(e,t),a=n.axis||"x",o=n.includeInvisible||!1,s=n.intersect?oV(t,r,a,i,o):oY(t,r,a,!1,i,o),l=[];return s.length?(t.getSortedVisibleDatasetMetas().forEach(t=>{let e=s[0].index,n=t.data[e];n&&!n.skip&&l.push({element:n,datasetIndex:t.index,index:e})}),l):[]},dataset(t,e,n,i){let r=a7(e,t),a=n.axis||"xy",o=n.includeInvisible||!1,s=n.intersect?oV(t,r,a,i,o):oY(t,r,a,!1,i,o);if(s.length>0){let e=s[0].datasetIndex,n=t.getDatasetMeta(e).data;s=[];for(let t=0;t<n.length;++t)s.push({element:n[t],datasetIndex:e,index:t})}return s},point(t,e,n,i){let r=a7(e,t),a=n.axis||"xy";return oV(t,r,a,i,n.includeInvisible||!1)},nearest(t,e,n,i){let r=a7(e,t),a=n.axis||"xy",o=n.includeInvisible||!1;return oY(t,r,a,n.intersect,i,o)},x(t,e,n,i){let r=a7(e,t);return oJ(t,r,"x",n.intersect,i)},y(t,e,n,i){let r=a7(e,t);return oJ(t,r,"y",n.intersect,i)}}};let oG=["left","top","right","bottom"];function oK(t,e){return t.filter(t=>t.pos===e)}function oZ(t,e){return t.filter(t=>-1===oG.indexOf(t.pos)&&t.box.axis===e)}function oQ(t,e){return t.sort((t,n)=>{let i=e?n:t,r=e?t:n;return i.weight===r.weight?i.index-r.index:i.weight-r.weight})}function o0(t,e,n,i){return Math.max(t[n],e[n])+Math.max(t[i],e[i])}function o1(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 o2(t,e,n,i){let r,a,o,s,l,c;let u=[];for(r=0,a=t.length,l=0;r<a;++r){(s=(o=t[r]).box).update(o.width||e.w,o.height||e.h,function(t,e){let n=e.maxPadding;function i(t){let i={left:0,top:0,right:0,bottom:0};return t.forEach(t=>{i[t]=Math.max(e[t],n[t])}),i}return i(t?["left","right"]:["top","bottom"])}(o.horizontal,e));let{same:a,other:h}=function(t,e,n,i){let{pos:r,box:a}=n,o=t.maxPadding;if(!rs(r)){n.size&&(t[r]-=n.size);let e=i[n.stack]||{size:0,count:1};e.size=Math.max(e.size,n.horizontal?a.height:a.width),n.size=e.size/e.count,t[r]+=n.size}a.getPadding&&o1(o,a.getPadding());let s=Math.max(0,e.outerWidth-o0(o,t,"left","right")),l=Math.max(0,e.outerHeight-o0(o,t,"top","bottom")),c=s!==t.w,u=l!==t.h;return t.w=s,t.h=l,n.horizontal?{same:c,other:u}:{same:u,other:c}}(e,n,o,i);l|=a&&u.length,c=c||h,!s.fullSize&&u.push(o)}return l&&o2(u,e,n,i)||c}function o3(t,e,n,i,r){t.top=n,t.left=e,t.right=e+i,t.bottom=n+r,t.width=i,t.height=r}function o5(t,e,n,i){let r=n.padding,{x:a,y:o}=e;for(let s of t){let t=s.box,l=i[s.stack]||{count:1,placed:0,weight:1},c=s.stackWeight/l.weight||1;if(s.horizontal){let i=e.w*c,a=l.size||t.height;rC(l.start)&&(o=l.start),t.fullSize?o3(t,r.left,o,n.outerWidth-r.right-r.left,a):o3(t,e.left+l.placed,o,i,a),l.start=o,l.placed+=i,o=t.bottom}else{let i=e.h*c,o=l.size||t.width;rC(l.start)&&(a=l.start),t.fullSize?o3(t,a,r.top,o,n.outerHeight-r.bottom-r.top):o3(t,a,e.top+l.placed,o,i),l.start=a,l.placed+=i,a=t.right}}e.x=a,e.y=o}var o6={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){let n=t.boxes?t.boxes.indexOf(e):-1;-1!==n&&t.boxes.splice(n,1)},configure(t,e,n){e.fullSize=n.fullSize,e.position=n.position,e.weight=n.weight},update(t,e,n,i){if(!t)return;let r=aj(t.options.layout.padding),a=Math.max(e-r.width,0),o=Math.max(n-r.height,0),s=function(t){let e=function(t){let e,n,i,r,a,o;let s=[];for(e=0,n=(t||[]).length;e<n;++e)i=t[e],({position:r,options:{stack:a,stackWeight:o=1}}=i),s.push({index:e,box:i,pos:r,horizontal:i.isHorizontal(),weight:i.weight,stack:a&&r+a,stackWeight:o});return s}(t),n=oQ(e.filter(t=>t.box.fullSize),!0),i=oQ(oK(e,"left"),!0),r=oQ(oK(e,"right")),a=oQ(oK(e,"top"),!0),o=oQ(oK(e,"bottom")),s=oZ(e,"x"),l=oZ(e,"y");return{fullSize:n,leftAndTop:i.concat(a),rightAndBottom:r.concat(l).concat(o).concat(s),chartArea:oK(e,"chartArea"),vertical:i.concat(r).concat(l),horizontal:a.concat(o).concat(s)}}(t.boxes),l=s.vertical,c=s.horizontal;rp(t.boxes,t=>{"function"==typeof t.beforeLayout&&t.beforeLayout()});let u=Object.freeze({outerWidth:e,outerHeight:n,padding:r,availableWidth:a,availableHeight:o,vBoxMaxWidth:a/2/(l.reduce((t,e)=>e.box.options&&!1===e.box.options.display?t:t+1,0)||1),hBoxMaxHeight:o/2}),h=Object.assign({},r);o1(h,aj(i));let d=Object.assign({maxPadding:h,w:a,h:o,x:r.left,y:r.top},r),f=function(t,e){let n,i,r;let a=function(t){let e={};for(let n of t){let{stack:t,pos:i,stackWeight:r}=n;if(!t||!oG.includes(i))continue;let a=e[t]||(e[t]={count:0,placed:0,weight:0,size:0});a.count++,a.weight+=r}return e}(t),{vBoxMaxWidth:o,hBoxMaxHeight:s}=e;for(n=0,i=t.length;n<i;++n){let{fullSize:i}=(r=t[n]).box,l=a[r.stack],c=l&&r.stackWeight/l.weight;r.horizontal?(r.width=c?c*o:i&&e.availableWidth,r.height=s):(r.width=o,r.height=c?c*s:i&&e.availableHeight)}return a}(l.concat(c),u);o2(s.fullSize,d,u,f),o2(l,d,u,f),o2(c,d,u,f)&&o2(l,d,u,f),!function(t){let e=t.maxPadding;function n(n){let i=Math.max(e[n]-t[n],0);return t[n]+=i,i}t.y+=n("top"),t.x+=n("left"),n("right"),n("bottom")}(d),o5(s.leftAndTop,d,u,f),d.x+=d.w,d.y+=d.h,o5(s.rightAndBottom,d,u,f),t.chartArea={left:d.left,top:d.top,right:d.left+d.w,bottom:d.top+d.h,height:d.h,width:d.w},rp(s.chartArea,e=>{let n=e.box;Object.assign(n,t.chartArea),n.update(d.w,d.h,{left:0,top:0,right:0,bottom:0})})}};class o4{acquireContext(t,e){}releaseContext(t){return!1}addEventListener(t,e,n){}removeEventListener(t,e,n){}getDevicePixelRatio(){return 1}getMaximumSize(t,e,n,i){return e=Math.max(0,e||t.width),n=n||t.height,{width:e,height:Math.max(0,i?Math.floor(e/i):n)}}isAttached(t){return!0}updateConfig(t){}}class o8 extends o4{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}let o9="$chartjs",o7={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},st=t=>null===t||""===t,se=!!on&&{passive:!0};function sn(t,e,n){t&&t.canvas&&t.canvas.removeEventListener(e,n,se)}function si(t,e){for(let n of t)if(n===e||n.contains(e))return!0}function sr(t,e,n){let i=t.canvas,r=new MutationObserver(t=>{let e=!1;for(let n of t)e=(e=e||si(n.addedNodes,i))&&!si(n.removedNodes,i);e&&n()});return r.observe(document,{childList:!0,subtree:!0}),r}function sa(t,e,n){let i=t.canvas,r=new MutationObserver(t=>{let e=!1;for(let n of t)e=(e=e||si(n.removedNodes,i))&&!si(n.addedNodes,i);e&&n()});return r.observe(document,{childList:!0,subtree:!0}),r}let so=new Map,ss=0;function sl(){let t=window.devicePixelRatio;if(t!==ss)ss=t,so.forEach((e,n)=>{n.currentDevicePixelRatio!==t&&e()})}function sc(t,e,n){var i,r;let a=t.canvas,o=a&&a3(a);if(!o)return;let s=r6((t,e)=>{let i=o.clientWidth;n(t,e),i<o.clientWidth&&n()},window),l=new ResizeObserver(t=>{let e=t[0],n=e.contentRect.width,i=e.contentRect.height;if(0!==n||0!==i)s(n,i)});return l.observe(o),i=t,r=s,so.size||window.addEventListener("resize",sl),so.set(i,r),l}function su(t,e,n){if(n&&n.disconnect(),"resize"===e){var i;i=t,so.delete(i),so.size||window.removeEventListener("resize",sl)}}function sh(t,e,n){var i,r,a;let o=t.canvas,s=r6(e=>{null!==t.ctx&&n(function(t,e){let n=o7[t.type]||t.type,{x:i,y:r}=a7(t,e);return{type:n,chart:e,native:t,x:void 0!==i?i:null,y:void 0!==r?r:null}}(e,t))},t);return i=o,r=e,a=s,i&&i.addEventListener(r,a,se),s}class sd extends o4{acquireContext(t,e){let n=t&&t.getContext&&t.getContext("2d");return n&&n.canvas===t?(!function(t,e){let n=t.style,i=t.getAttribute("height"),r=t.getAttribute("width");if(t[o9]={initial:{height:i,width:r,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",n.boxSizing=n.boxSizing||"border-box",st(r)){let e=oi(t,"width");void 0!==e&&(t.width=e)}if(st(i)){if(""===t.style.height)t.height=t.width/(e||2);else{let e=oi(t,"height");void 0!==e&&(t.height=e)}};}(t,e),n):null}releaseContext(t){let e=t.canvas;if(!e[o9])return!1;let n=e[o9].initial;["height","width"].forEach(t=>{let i=n[t];ra(i)?e.removeAttribute(t):e.setAttribute(t,i)});let i=n.style||{};return Object.keys(i).forEach(t=>{e.style[t]=i[t]}),e.width=e.width,delete e[o9],!0}addEventListener(t,e,n){this.removeEventListener(t,e);let i=t.$proxies||(t.$proxies={}),r={attach:sr,detach:sa,resize:sc}[e]||sh;i[e]=r(t,e,n)}removeEventListener(t,e){let n=t.$proxies||(t.$proxies={}),i=n[e];if(!!i)(({attach:su,detach:su,resize:su})[e]||sn)(t,e,i),n[e]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,n,i){return function(t,e,n,i){let r=a6(t),a=a8(r,"margin"),o=a5(r.maxWidth,t,"clientWidth")||rO,s=a5(r.maxHeight,t,"clientHeight")||rO,l=function(t,e,n){let i,r;if(void 0===e||void 0===n){let a=t&&a3(t);if(a){let t=a.getBoundingClientRect(),o=a6(a),s=a8(o,"border","width"),l=a8(o,"padding");e=t.width-l.width-s.width,n=t.height-l.height-s.height,i=a5(o.maxWidth,a,"clientWidth"),r=a5(o.maxHeight,a,"clientHeight")}else e=t.clientWidth,n=t.clientHeight}return{width:e,height:n,maxWidth:i||rO,maxHeight:r||rO}}(t,e,n),{width:c,height:u}=l;if("content-box"===r.boxSizing){let t=a8(r,"border","width"),e=a8(r,"padding");c-=e.width+t.width,u-=e.height+t.height}return c=Math.max(0,c-a.width),u=Math.max(0,i?c/i:u-a.height),c=ot(Math.min(c,o,l.maxWidth)),u=ot(Math.min(u,s,l.maxHeight)),c&&!u&&(u=ot(c/2)),(void 0!==e||void 0!==n)&&i&&l.height&&u>l.height&&(c=ot(Math.floor((u=l.height)*i))),{width:c,height:u}}(t,e,n,i)}isAttached(t){let e=t&&a3(t);return!!(e&&e.isConnected)}}class sf{static defaults={};static defaultRoutes=void 0;x;y;active=!1;options;$animations;tooltipPosition(t){let{x:e,y:n}=this.getProps(["x","y"],t);return{x:e,y:n}}hasValue(){return rB(this.x)&&rB(this.y)}getProps(t,e){let n=this.$animations;if(!e||!n)return this;let i={};return t.forEach(t=>{i[t]=n[t]&&n[t].active()?n[t]._to:this[t]}),i}}function sp(t,e,n,i,r){let a,o,s;let l=ru(i,0),c=Math.min(ru(r,t.length),t.length),u=0;for(n=Math.ceil(n),r&&(n=(a=r-i)/Math.floor(a/n)),s=l;s<0;)s=Math.round(l+ ++u*n);for(o=Math.max(l,0);o<c;o++)o===s&&(e.push(t[o]),s=Math.round(l+ ++u*n))}let sg=t=>"left"===t?"right":"right"===t?"left":t,sm=(t,e,n)=>"top"===e||"left"===e?t[e]+n:t[e]-n,sv=(t,e)=>Math.min(e||t,t);function sy(t,e){let n=[],i=t.length/e,r=t.length,a=0;for(;a<r;a+=i)n.push(t[Math.floor(a)]);return n}function sb(t){return t.drawTicks?t.tickLength:0}function sx(t,e){if(!t.display)return 0;let n=aF(t.font,e),i=aj(t.padding);return(ro(t.text)?t.text.length:1)*n.lineHeight+i.height}class sw extends sf{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:n,_suggestedMax:i}=this;return t=rc(t,Number.POSITIVE_INFINITY),e=rc(e,Number.NEGATIVE_INFINITY),n=rc(n,Number.POSITIVE_INFINITY),i=rc(i,Number.NEGATIVE_INFINITY),{min:rc(t,n),max:rc(e,i),minDefined:rl(t),maxDefined:rl(e)}}getMinMax(t){let e,{min:n,max:i,minDefined:r,maxDefined:a}=this.getUserBounds();if(r&&a)return{min:n,max:i};let o=this.getMatchingVisibleMetas();for(let s=0,l=o.length;s<l;++s)e=o[s].controller.getMinMax(this,t),!r&&(n=Math.min(n,e.min)),!a&&(i=Math.max(i,e.max));return n=a&&n>i?i:n,i=r&&n>i?n:i,{min:rc(n,rc(i,n)),max:rc(i,rc(n,i))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){let 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(){rf(this.options.beforeUpdate,[this])}update(t,e,n){let{beginAtZero:i,grace:r,ticks:a}=this.options,o=a.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=e,this._margins=n=Object.assign({left:0,right:0,top:0,bottom:0},n),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+n.left+n.right:this.height+n.top+n.bottom,!this._dataLimitsCached&&(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=function(t,e,n){let{min:i,max:r}=t,a=rd(e,(r-i)/2),o=(t,e)=>n&&0===t?0:t+e;return{min:o(i,-Math.abs(a)),max:o(r,a)}}(this,r,i),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();let s=o<this.ticks.length;this._convertTicksToLabels(s?sy(this.ticks,o):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),a.display&&(a.autoSkip||"auto"===a.source)&&(this.ticks=function(t,e){let n=t.options.ticks,i=function(t){let e=t.options.offset,n=t._tickSize(),i=t._length/n+(e?0:1);return Math.floor(Math.min(i,t._maxLength/n))}(t),r=Math.min(n.maxTicksLimit||i,i),a=n.major.enabled?function(t){let e,n;let i=[];for(e=0,n=t.length;e<n;e++)t[e].major&&i.push(e);return i}(e):[],o=a.length,s=a[0],l=a[o-1],c=[];if(o>r)return function(t,e,n,i){let r,a=0,o=n[0];for(r=0,i=Math.ceil(i);r<t.length;r++)r===o&&(e.push(t[r]),o=n[++a*i])}(e,c,a,o/r),c;let u=function(t,e,n){let i=function(t){let e,n;let i=t.length;if(i<2)return!1;for(n=t[0],e=1;e<i;++e)if(t[e]-t[e-1]!==n)return!1;return n}(t),r=e.length/n;if(!i)return Math.max(r,1);let a=function(t){let e;let n=[],i=Math.sqrt(t);for(e=1;e<i;e++)t%e==0&&(n.push(e),n.push(t/e));return i===(0|i)&&n.push(i),n.sort((t,e)=>t-e).pop(),n}(i);for(let t=0,e=a.length-1;t<e;t++){let e=a[t];if(e>r)return e}return Math.max(r,1)}(a,e,r);if(o>0){let t,n;let i=o>1?Math.round((l-s)/(o-1)):null;for(sp(e,c,u,ra(i)?0:s-i,s),t=0,n=o-1;t<n;t++)sp(e,c,u,a[t],a[t+1]);return sp(e,c,u,l,ra(i)?e.length:l+i),c}return sp(e,c,u),c}(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),s&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let t,e,n=this.options.reverse;this.isHorizontal()?(t=this.left,e=this.right):(t=this.top,e=this.bottom,n=!n),this._startPixel=t,this._endPixel=e,this._reversePixels=n,this._length=e-t,this._alignToPixels=this.options.alignToPixels}afterUpdate(){rf(this.options.afterUpdate,[this])}beforeSetDimensions(){rf(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(){rf(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),rf(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){rf(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){let e,n,i;let r=this.options.ticks;for(e=0,n=t.length;e<n;e++)(i=t[e]).label=rf(r.callback,[i.value,e,t],this)}afterTickToLabelConversion(){rf(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){rf(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){let t,e,n;let i=this.options,r=i.ticks,a=sv(this.ticks.length,i.ticks.maxTicksLimit),o=r.minRotation||0,s=r.maxRotation,l=o;if(!this._isVisible()||!r.display||o>=s||a<=1||!this.isHorizontal()){this.labelRotation=o;return}let c=this._getLabelSizes(),u=c.widest.width,h=c.highest.height,d=rG(this.chart.width-u,0,this.maxWidth);if(u+6>(t=i.offset?this.maxWidth/a:d/(a-1)))t=d/(a-(i.offset?.5:1)),e=this.maxHeight-sb(i.grid)-r.padding-sx(i.title,this.chart.options.font),n=Math.sqrt(u*u+h*h),l=Math.max(o,Math.min(s,l=180/rL*Math.min(Math.asin(rG((c.highest.height+6)/t,-1,1)),Math.asin(rG(e/n,-1,1))-Math.asin(rG(h/n,-1,1)))));this.labelRotation=l}afterCalculateLabelRotation(){rf(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){rf(this.options.beforeFit,[this])}fit(){let t={width:0,height:0},{chart:e,options:{ticks:n,title:i,grid:r}}=this,a=this._isVisible(),o=this.isHorizontal();if(a){let a=sx(i,e.options.font);if(o?(t.width=this.maxWidth,t.height=sb(r)+a):(t.height=this.maxHeight,t.width=sb(r)+a),n.display&&this.ticks.length){let{first:e,last:i,widest:r,highest:a}=this._getLabelSizes(),s=2*n.padding,l=rH(this.labelRotation),c=Math.cos(l),u=Math.sin(l);if(o){let e=n.mirror?0:u*r.width+c*a.height;t.height=Math.min(this.maxHeight,t.height+e+s)}else{let e=n.mirror?0:c*r.width+u*a.height;t.width=Math.min(this.maxWidth,t.width+e+s)}this._calculatePadding(e,i,u,c)}}this._handleMargins(),o?(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,n,i){let{ticks:{align:r,padding:a},position:o}=this.options,s=0!==this.labelRotation,l="top"!==o&&"x"===this.axis;if(this.isHorizontal()){let o=this.getPixelForTick(0)-this.left,c=this.right-this.getPixelForTick(this.ticks.length-1),u=0,h=0;s?l?(u=i*t.width,h=n*e.height):(u=n*t.height,h=i*e.width):"start"===r?h=e.width:"end"===r?u=t.width:"inner"!==r&&(u=t.width/2,h=e.width/2),this.paddingLeft=Math.max((u-o+a)*this.width/(this.width-o),0),this.paddingRight=Math.max((h-c+a)*this.width/(this.width-c),0)}else{let n=e.height/2,i=t.height/2;"start"===r?(n=0,i=t.height):"end"===r&&(n=e.height,i=0),this.paddingTop=n+a,this.paddingBottom=i+a}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){rf(this.options.afterFit,[this])}isHorizontal(){let{axis:t,position:e}=this.options;return"top"===e||"bottom"===e||"x"===t}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){let e,n;for(this.beforeTickToLabelConversion(),this.generateTickLabels(t),e=0,n=t.length;e<n;e++)ra(t[e].label)&&(t.splice(e,1),n--,e--);this.afterTickToLabelConversion()}_getLabelSizes(){let t=this._labelSizes;if(!t){let e=this.options.ticks.sampleSize,n=this.ticks;e<n.length&&(n=sy(n,e)),this._labelSizes=t=this._computeLabelSizes(n,n.length,this.options.ticks.maxTicksLimit)}return t}_computeLabelSizes(t,e,n){var i,r;let a,o,s,l,c,u,h,d,f,p,g;let{ctx:m,_longestTextCache:v}=this,y=[],b=[],x=Math.floor(e/sv(e,n)),w=0,_=0;for(a=0;a<e;a+=x){if(l=t[a].label,c=this._resolveTickFontOptions(a),m.font=u=c.string,h=v[u]=v[u]||{data:{},gc:[]},d=c.lineHeight,f=p=0,ra(l)||ro(l)){if(ro(l))for(o=0,s=l.length;o<s;++o)!ra(g=l[o])&&!ro(g)&&(f=av(m,h.data,h.gc,f,g),p+=d)}else f=av(m,h.data,h.gc,f,l),p=d;y.push(f),b.push(p),w=Math.max(f,w),_=Math.max(p,_)}i=v,r=e,rp(i,t=>{let e;let n=t.gc,i=n.length/2;if(i>r){for(e=0;e<i;++e)delete t.data[n[e]];n.splice(0,i)}});let k=y.indexOf(w),S=b.indexOf(_),C=t=>({width:y[t]||0,height:b[t]||0});return{first:C(0),last:C(e-1),widest:C(k),highest:C(S),widths:y,heights:b}}getLabelForValue(t){return t}getPixelForValue(t,e){return NaN}getValueForPixel(t){}getPixelForTick(t){let e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);let e=this._startPixel+t*this._length;return rG(this._alignToPixels?ay(this.chart,e,0):e,-32768,32767)}getDecimalForPixel(t){let e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){let{min:t,max:e}=this;return t<0&&e<0?e:t>0&&e>0?t:0}getContext(t){var e,n,i,r;let a=this.ticks||[];if(t>=0&&t<a.length){;let i=a[t];return i.$context||(i.$context=(e=this.getContext(),n=t,aR(e,{tick:i,index:n,type:"tick"})))}return this.$context||(this.$context=(i=this.chart.getContext(),r=this,aR(i,{scale:r,type:"scale"})))}_tickSize(){let t=this.options.ticks,e=rH(this.labelRotation),n=Math.abs(Math.cos(e)),i=Math.abs(Math.sin(e)),r=this._getLabelSizes(),a=t.autoSkipPadding||0,o=r?r.widest.width+a:0,s=r?r.highest.height+a:0;return this.isHorizontal()?s*n>o*i?o/n:s/i:s*i<o*n?s/n:o/i}_isVisible(){let t=this.options.display;return"auto"!==t?!!t:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){let e,n,i,r,a,o,s,l,c,u,h,d;let f=this.axis,p=this.chart,g=this.options,{grid:m,position:v,border:y}=g,b=m.offset,x=this.isHorizontal(),w=this.ticks.length+(b?1:0),_=sb(m),k=[],S=y.setContext(this.getContext()),C=S.display?S.width:0,M=C/2,A=function(t){return ay(p,t,C)};if("top"===v)e=A(this.bottom),o=this.bottom-_,l=e-M,u=A(t.top)+M,d=t.bottom;else if("bottom"===v)e=A(this.top),u=t.top,d=A(t.bottom)-M,o=e+M,l=this.top+_;else if("left"===v)e=A(this.right),a=this.right-_,s=e-M,c=A(t.left)+M,h=t.right;else if("right"===v)e=A(this.left),c=t.left,h=A(t.right)-M,a=e+M,s=this.left+_;else if("x"===f){if("center"===v)e=A((t.top+t.bottom)/2+.5);else if(rs(v)){let t=Object.keys(v)[0],n=v[t];e=A(this.chart.scales[t].getPixelForValue(n))}u=t.top,d=t.bottom,l=(o=e+M)+_}else if("y"===f){if("center"===v)e=A((t.left+t.right)/2);else if(rs(v)){let t=Object.keys(v)[0],n=v[t];e=A(this.chart.scales[t].getPixelForValue(n))}s=(a=e-M)-_,c=t.left,h=t.right}let L=ru(g.ticks.maxTicksLimit,w),E=Math.max(1,Math.ceil(w/L));for(n=0;n<w;n+=E){let t=this.getContext(n),e=m.setContext(t),f=y.setContext(t),g=e.lineWidth,v=e.color,w=f.dash||[],_=f.dashOffset,S=e.tickWidth,C=e.tickColor,M=e.tickBorderDash||[],A=e.tickBorderDashOffset;if(void 0!==(i=function(t,e,n){let i;let r=t.ticks.length,a=Math.min(e,r-1),o=t._startPixel,s=t._endPixel,l=t.getPixelForTick(a);if(!n||(i=1===r?Math.max(l-o,s-l):0===e?(t.getPixelForTick(1)-l)/2:(l-t.getPixelForTick(a-1))/2,!((l+=a<e?i:-i)<o-1e-6)&&!(l>s+1e-6)))return l}(this,n,b)))r=ay(p,i,g),x?a=s=c=h=r:o=l=u=d=r,k.push({tx1:a,ty1:o,tx2:s,ty2:l,x1:c,y1:u,x2:h,y2:d,width:g,color:v,borderDash:w,borderDashOffset:_,tickWidth:S,tickColor:C,tickBorderDash:M,tickBorderDashOffset:A})}return this._ticksLength=w,this._borderValue=e,k}_computeLabelItems(t){let e,n,i,r,a,o,s,l,c,u,h;let d=this.axis,f=this.options,{position:p,ticks:g}=f,m=this.isHorizontal(),v=this.ticks,{align:y,crossAlign:b,padding:x,mirror:w}=g,_=sb(f.grid),k=_+x,S=w?-x:k,C=-rH(this.labelRotation),M=[],A="middle";if("top"===p)a=this.bottom-S,o=this._getXAxisLabelAlignment();else if("bottom"===p)a=this.top+S,o=this._getXAxisLabelAlignment();else if("left"===p){let t=this._getYAxisLabelAlignment(_);o=t.textAlign,r=t.x}else if("right"===p){let t=this._getYAxisLabelAlignment(_);o=t.textAlign,r=t.x}else if("x"===d){if("center"===p)a=(t.top+t.bottom)/2+k;else if(rs(p)){let t=Object.keys(p)[0],e=p[t];a=this.chart.scales[t].getPixelForValue(e)+k}o=this._getXAxisLabelAlignment()}else if("y"===d){if("center"===p)r=(t.left+t.right)/2-k;else if(rs(p)){let t=Object.keys(p)[0],e=p[t];r=this.chart.scales[t].getPixelForValue(e)}o=this._getYAxisLabelAlignment(_).textAlign}"y"===d&&("start"===y?A="top":"end"===y&&(A="bottom"));let L=this._getLabelSizes();for(e=0,n=v.length;e<n;++e){let t;i=v[e].label;let d=g.setContext(this.getContext(e));s=this.getPixelForTick(e)+g.labelOffset,c=(l=this._resolveTickFontOptions(e)).lineHeight;let f=(u=ro(i)?i.length:1)/2,y=d.color,x=d.textStrokeColor,_=d.textStrokeWidth,k=o;if(m?(r=s,"inner"===o&&(k=e===n-1?this.options.reverse?"left":"right":0===e?this.options.reverse?"right":"left":"center"),h="top"===p?"near"===b||0!==C?-u*c+c/2:"center"===b?-L.highest.height/2-f*c+c:-L.highest.height+c/2:"near"===b||0!==C?c/2:"center"===b?L.highest.height/2-f*c:L.highest.height-u*c,w&&(h*=-1),0!==C&&!d.showLabelBackdrop&&(r+=c/2*Math.sin(C))):(a=s,h=(1-u)*c/2),d.showLabelBackdrop){let i=aj(d.backdropPadding),r=L.heights[e],a=L.widths[e],s=h-i.top,l=0-i.left;switch(A){case"middle":s-=r/2;break;case"bottom":s-=r}switch(o){case"center":l-=a/2;break;case"right":l-=a;break;case"inner":e===n-1?l-=a:e>0&&(l-=a/2)}t={left:l,top:s,width:a+i.width,height:r+i.height,color:d.backdropColor}}M.push({label:i,font:l,textOffset:h,options:{rotation:C,color:y,strokeColor:x,strokeWidth:_,textAlign:k,textBaseline:A,translation:[r,a],backdrop:t}})}return M}_getXAxisLabelAlignment(){let{position:t,ticks:e}=this.options;if(-rH(this.labelRotation))return"top"===t?"left":"right";let n="center";return"start"===e.align?n="left":"end"===e.align?n="right":"inner"===e.align&&(n="inner"),n}_getYAxisLabelAlignment(t){let e,n;let{position:i,ticks:{crossAlign:r,mirror:a,padding:o}}=this.options,s=this._getLabelSizes(),l=t+o,c=s.widest.width;return"left"===i?a?(n=this.right+o,"near"===r?e="left":"center"===r?(e="center",n+=c/2):(e="right",n+=c)):(n=this.right-l,"near"===r?e="right":"center"===r?(e="center",n-=c/2):(e="left",n=this.left)):"right"===i?a?(n=this.left+o,"near"===r?e="right":"center"===r?(e="center",n-=c/2):(e="left",n-=c)):(n=this.left+l,"near"===r?e="left":"center"===r?(e="center",n+=c/2):(e="right",n=this.right)):e="right",{textAlign:e,x:n}}_computeLabelArea(){if(this.options.ticks.mirror)return;let 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(){let{ctx:t,options:{backgroundColor:e},left:n,top:i,width:r,height:a}=this;e&&(t.save(),t.fillStyle=e,t.fillRect(n,i,r,a),t.restore())}getLineWidthForValue(t){let e=this.options.grid;if(!this._isVisible()||!e.display)return 0;let n=this.ticks.findIndex(e=>e.value===t);return n>=0?e.setContext(this.getContext(n)).lineWidth:0}drawGrid(t){let e,n;let i=this.options.grid,r=this.ctx,a=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t)),o=(t,e,n)=>{if(!!n.width&&!!n.color)r.save(),r.lineWidth=n.width,r.strokeStyle=n.color,r.setLineDash(n.borderDash||[]),r.lineDashOffset=n.borderDashOffset,r.beginPath(),r.moveTo(t.x,t.y),r.lineTo(e.x,e.y),r.stroke(),r.restore()};if(i.display)for(e=0,n=a.length;e<n;++e){let t=a[e];i.drawOnChartArea&&o({x:t.x1,y:t.y1},{x:t.x2,y:t.y2},t),i.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(){let t,e,n,i;let{chart:r,ctx:a,options:{border:o,grid:s}}=this,l=o.setContext(this.getContext()),c=o.display?l.width:0;if(!c)return;let u=s.setContext(this.getContext(0)).lineWidth,h=this._borderValue;this.isHorizontal()?(t=ay(r,this.left,c)-c/2,e=ay(r,this.right,u)+u/2,n=i=h):(n=ay(r,this.top,c)-c/2,i=ay(r,this.bottom,u)+u/2,t=e=h),a.save(),a.lineWidth=l.width,a.strokeStyle=l.color,a.beginPath(),a.moveTo(t,n),a.lineTo(e,i),a.stroke(),a.restore()}drawLabels(t){if(!this.options.ticks.display)return;let e=this.ctx,n=this._computeLabelArea();for(let i of(n&&ak(e,n),this.getLabelItems(t))){let t=i.options,n=i.font,r=i.label;aA(e,r,0,i.textOffset,n,t)}n&&aS(e)}drawTitle(){var t,e,n;let i,{ctx:r,options:{position:a,title:o,reverse:s}}=this;if(!o.display)return;let l=aF(o.font),c=aj(o.padding),u=o.align,h=l.lineHeight/2;"bottom"===a||"center"===a||rs(a)?(h+=c.bottom,ro(o.text)&&(h+=l.lineHeight*(o.text.length-1))):h+=c.top;let{titleX:d,titleY:f,maxWidth:p,rotation:g}=function(t,e,n,i){let r,a,o;let{top:s,left:l,bottom:c,right:u,chart:h}=t,{chartArea:d,scales:f}=h,p=0,g=c-s,m=u-l;if(t.isHorizontal()){if(a=r8(i,l,u),rs(n)){let t=Object.keys(n)[0],i=n[t];o=f[t].getPixelForValue(i)+g-e}else o="center"===n?(d.bottom+d.top)/2+g-e:sm(t,n,e);r=u-l}else{if(rs(n)){let t=Object.keys(n)[0],i=n[t];a=f[t].getPixelForValue(i)-m+e}else a="center"===n?(d.left+d.right)/2-m+e:sm(t,n,e);o=r8(i,c,s),p="left"===n?-rD:rD}return{titleX:a,titleY:o,maxWidth:r,rotation:p}}(this,h,a,u);aA(r,o.text,0,0,l,{color:o.color,maxWidth:p,rotation:g,textAlign:(t=u,e=a,n=s,i=r4(t),(n&&"right"!==e||!n&&"right"===e)&&(i=sg(i)),i),textBaseline:"middle",translation:[d,f]})}draw(t){if(!!this._isVisible())this.drawBackground(),this.drawGrid(t),this.drawBorder(),this.drawTitle(),this.drawLabels(t)}_layers(){let t=this.options,e=t.ticks&&t.ticks.z||0,n=ru(t.grid&&t.grid.z,-1),i=ru(t.border&&t.border.z,0);return this._isVisible()&&this.draw===sw.prototype.draw?[{z:n,draw:t=>{this.drawBackground(),this.drawGrid(t),this.drawTitle()}},{z:i,draw:()=>{this.drawBorder()}},{z:e,draw:t=>{this.drawLabels(t)}}]:[{z:e,draw:t=>{this.draw(t)}}]}getMatchingVisibleMetas(t){let e,n;let i=this.chart.getSortedVisibleDatasetMetas(),r=this.axis+"AxisID",a=[];for(e=0,n=i.length;e<n;++e){let n=i[e];n[r]===this.id&&(!t||n.type===t)&&a.push(n)}return a}_resolveTickFontOptions(t){return aF(this.options.ticks.setContext(this.getContext(t)).font)}_maxDigits(){let t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}}class s_{constructor(t,e,n){this.type=t,this.scope=e,this.override=n,this.items=Object.create(null)}isForType(t){return Object.prototype.isPrototypeOf.call(this.type.prototype,t.prototype)}register(t){let e;let n=Object.getPrototypeOf(t);(function(t){return"id"in t&&"defaults"in t})(n)&&(e=this.register(n));let i=this.items,r=t.id,a=this.scope+"."+r;if(!r)throw Error("class does not have id: "+t);return r in i?a:(i[r]=t,function(t,e,n){let i=rb(Object.create(null),[n?am.get(n):{},am.get(e),t.defaults]);am.set(e,i),t.defaultRoutes&&function(t,e){Object.keys(e).forEach(n=>{let i=n.split("."),r=i.pop(),a=[t].concat(i).join("."),o=e[n].split("."),s=o.pop(),l=o.join(".");am.route(a,r,l,s)})}(e,t.defaultRoutes),t.descriptors&&am.describe(e,t.descriptors)}(t,a,e),this.override&&am.override(t.id,t.overrides),a)}get(t){return this.items[t]}unregister(t){let e=this.items,n=t.id,i=this.scope;n in e&&delete e[n],i&&n in am[i]&&(delete am[i][n],this.override&&delete ad[n])}}var sk=new class t{constructor(){this.controllers=new s_(oT,"datasets",!0),this.elements=new s_(sf,"elements"),this.plugins=new s_(Object,"plugins"),this.scales=new s_(sw,"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,n){[...e].forEach(e=>{let i=n||this._getRegistryForType(e);n||i.isForType(e)||i===this.plugins&&e.id?this._exec(t,i,e):rp(e,e=>{let i=n||this._getRegistryForType(e);this._exec(t,i,e)})})}_exec(t,e,n){let i=rS(t);rf(n["before"+i],[],n),e[t](n),rf(n["after"+i],[],n)}_getRegistryForType(t){for(let e=0;e<this._typedRegistries.length;e++){let n=this._typedRegistries[e];if(n.isForType(t))return n}return this.plugins}_get(t,e,n){let i=e.get(t);if(void 0===i)throw Error('"'+t+'" is not a registered '+n+".");return i}};class sS{constructor(){this._init=[]}notify(t,e,n,i){"beforeInit"===e&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install"));let r=i?this._descriptors(t).filter(i):this._descriptors(t),a=this._notify(r,t,e,n);return"afterDestroy"===e&&(this._notify(r,t,"stop"),this._notify(this._init,t,"uninstall")),a}_notify(t,e,n,i){for(let r of(i=i||{},t)){let t=r.plugin,a=t[n];if(!1===rf(a,[e,i,r.options],t)&&i.cancelable)return!1}return!0}invalidate(){!ra(this._cache)&&(this._oldCache=this._cache,this._cache=void 0)}_descriptors(t){if(this._cache)return this._cache;let e=this._cache=this._createDescriptors(t);return this._notifyStateChanges(t),e}_createDescriptors(t,e){let n=t&&t.config,i=ru(n.options&&n.options.plugins,{}),r=function(t){let e={},n=[],i=Object.keys(sk.plugins.items);for(let t=0;t<i.length;t++)n.push(sk.getPlugin(i[t]));let r=t.plugins||[];for(let t=0;t<r.length;t++){let i=r[t];-1===n.indexOf(i)&&(n.push(i),e[i.id]=!0)}return{plugins:n,localIds:e}}(n);return!1!==i||e?function(t,{plugins:e,localIds:n},i,r){let a=[],o=t.getContext();for(let l of e){var s;let e=l.id;let c=(s=i[e],r||!1!==s?!0===s?{}:s:null);if(null!==c)a.push({plugin:l,options:function(t,{plugin:e,local:n},i,r){let a=t.pluginScopeKeys(e),o=t.getOptionScopes(i,a);return n&&e.defaults&&o.push(e.defaults),t.createResolver(o,r,[""],{scriptable:!1,indexable:!1,allKeys:!0})}(t.config,{plugin:l,local:n[e]},c,o)})}return a}(t,r,i,e):[]}_notifyStateChanges(t){let e=this._oldCache||[],n=this._cache,i=(t,e)=>t.filter(t=>!e.some(e=>t.plugin.id===e.plugin.id));this._notify(i(e,n),t,"stop"),this._notify(i(n,e),t,"start")}}function sC(t,e){let n=am.datasets[t]||{};return((e.datasets||{})[t]||{}).indexAxis||e.indexAxis||n.indexAxis||"x"}function sM(t){if("x"===t||"y"===t||"r"===t)return t}function sA(t,...e){if(sM(t))return t;for(let i of e){var n;let e=i.axis||("top"===(n=i.position)||"bottom"===n?"x":"left"===n||"right"===n?"y":void 0)||t.length>1&&sM(t[0].toLowerCase());if(e)return e}throw Error(`Cannot determine type of '${t}' axis. Please provide 'axis' or 'position' option.`)}function sL(t,e,n){if(n[e+"AxisID"]===t)return{axis:e}}function sE(t){let e=t.options||(t.options={});e.plugins=ru(e.plugins,{}),e.scales=function(t,e){let n=ad[t.type]||{scales:{}},i=e.scales||{},r=sC(t.type,e),a=Object.create(null);return Object.keys(i).forEach(e=>{let o=i[e];if(!rs(o))return console.error(`Invalid scale configuration for scale: ${e}`);if(o._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${e}`);let s=sA(e,o,function(t,e){if(e.data&&e.data.datasets){let n=e.data.datasets.filter(e=>e.xAxisID===t||e.yAxisID===t);if(n.length)return sL(t,"x",n[0])||sL(t,"y",n[0])}return{}}(e,t),am.scales[o.type]),l=s===r?"_index_":"_value_",c=n.scales||{};a[e]=rx(Object.create(null),[{axis:s},o,c[s],c[l]])}),t.data.datasets.forEach(n=>{let r=n.type||t.type,o=n.indexAxis||sC(r,e),s=(ad[r]||{}).scales||{};Object.keys(s).forEach(t=>{var e,r;let l;let c=(e=t,r=o,l=e,"_index_"===e?l=r:"_value_"===e&&(l="x"===r?"y":"x"),l),u=n[c+"AxisID"]||c;a[u]=a[u]||Object.create(null),rx(a[u],[{axis:c},i[u],s[t]])})}),Object.keys(a).forEach(t=>{let e=a[t];rx(e,[am.scales[e.type],am.scale])}),a}(t,e)}function sT(t){return(t=t||{}).datasets=t.datasets||[],t.labels=t.labels||[],t}let sO=new Map,sP=new Set;function sD(t,e){let n=sO.get(t);return!n&&(n=e(),sO.set(t,n),sP.add(n)),n}let sI=(t,e,n)=>{let i=rk(e,n);void 0!==i&&t.add(i)};class sj{constructor(t){var e;this._config=((e=(e=t)||{}).data=sT(e.data),sE(e),e),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=sT(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){let t=this._config;this.clearCache(),sE(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return sD(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,e){return sD(`${t}.transition.${e}`,()=>[[`datasets.${t}.transitions.${e}`,`transitions.${e}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,e){return sD(`${t}-${e}`,()=>[[`datasets.${t}.elements.${e}`,`datasets.${t}`,`elements.${e}`,""]])}pluginScopeKeys(t){let e=t.id,n=this.type;return sD(`${n}-plugin-${e}`,()=>[[`plugins.${e}`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,e){let n=this._scopeCache,i=n.get(t);return(!i||e)&&(i=new Map,n.set(t,i)),i}getOptionScopes(t,e,n){let{options:i,type:r}=this,a=this._cachedScopes(t,n),o=a.get(e);if(o)return o;let s=new Set;e.forEach(e=>{t&&(s.add(t),e.forEach(e=>sI(s,t,e))),e.forEach(t=>sI(s,i,t)),e.forEach(t=>sI(s,ad[r]||{},t)),e.forEach(t=>sI(s,am,t)),e.forEach(t=>sI(s,af,t))});let l=Array.from(s);return 0===l.length&&l.push(Object.create(null)),sP.has(e)&&a.set(e,l),l}chartOptionScopes(){let{options:t,type:e}=this;return[t,ad[e]||{},am.datasets[e]||{},{type:e},am,af]}resolveNamedOptions(t,e,n,i=[""]){let r={$shared:!0},{resolver:a,subPrefixes:o}=sF(this._resolverCache,t,i),s=a;if(function(t,e){let{isScriptable:n,isIndexable:i}=a$(t);for(let r of e){let e=n(r),a=i(r),o=(a||e)&&t[r];if(e&&(rM(o)||sN(o))||a&&ro(o))return!0}return!1}(a,e)){r.$shared=!1,n=rM(n)?n():n;let e=this.createResolver(t,n,o);s=aB(a,n,e)}for(let t of e)r[t]=s[t];return r}createResolver(t,e,n=[""],i){let{resolver:r}=sF(this._resolverCache,t,n);return rs(e)?aB(r,e,void 0,i):r}}function sF(t,e,n){let i=t.get(e);!i&&(i=new Map,t.set(e,i));let r=n.join(),a=i.get(r);return!a&&(a={resolver:az(e,n),subPrefixes:n.filter(t=>!t.toLowerCase().includes("hover"))},i.set(r,a)),a}let sN=t=>rs(t)&&Object.getOwnPropertyNames(t).some(e=>rM(t[e])),sR=["top","bottom","left","right","chartArea"];function sz(t,e){return"top"===t||"bottom"===t||-1===sR.indexOf(t)&&"x"===e}function sB(t,e){return function(n,i){return n[t]===i[t]?n[e]-i[e]:n[t]-i[t]}}function s$(t){let e=t.chart,n=e.options.animation;e.notifyPlugins("afterRender"),rf(n&&n.onComplete,[t],e)}function sH(t){let e=t.chart,n=e.options.animation;rf(n&&n.onProgress,[t],e)}function sW(t){return a2()&&"string"==typeof t?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}let sU={},sq=t=>{let e=sW(t);return Object.values(sU).filter(t=>t.canvas===e).pop()};function sV(t,e,n){return t.options.clip?t[n]:e[n]}class sY{static defaults=am;static instances=sU;static overrides=ad;static registry=sk;static version="4.4.7";static getChart=sq;static register(...t){sk.add(...t),sJ()}static unregister(...t){sk.remove(...t),sJ()}constructor(t,e){var n,i,r;let a,o=this.config=new sj(e),s=sW(t),l=sq(s);if(l)throw Error("Canvas is already in use. Chart with ID '"+l.id+"' must be destroyed before the canvas with ID '"+l.canvas.id+"' can be reused.");let c=o.createResolver(o.chartOptionScopes(),this.getContext());this.platform=new(o.platform||(n=s,!a2()||"undefined"!=typeof OffscreenCanvas&&n instanceof OffscreenCanvas?o8:sd)),this.platform.updateConfig(o);let u=this.platform.acquireContext(s,c.aspectRatio),h=u&&u.canvas,d=h&&h.height,f=h&&h.width;this.id=rr(),this.ctx=u,this.canvas=h,this.width=f,this.height=d,this._options=c,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 sS,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0;if(this._doResize=(i=t=>this.update(t),r=c.resizeDelay||0,function(...t){return r?(clearTimeout(a),a=setTimeout(i,r,t)):i.apply(this,t),r}),this._dataChanges=[],sU[this.id]=this,!u||!h){console.error("Failed to create chart: can't acquire context from the given item");return}op.listen(this,"complete",s$),op.listen(this,"progress",sH),this._initialize(),this.attached&&this.update()}get aspectRatio(){let{options:{aspectRatio:t,maintainAspectRatio:e},width:n,height:i,_aspectRatio:r}=this;return ra(t)?e&&r?r:i?n/i:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}get registry(){return sk}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():oe(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return ab(this.canvas,this.ctx),this}stop(){return op.stop(this),this}resize(t,e){op.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}_resize(t,e){let n=this.options,i=this.canvas,r=n.maintainAspectRatio&&this.aspectRatio,a=this.platform.getMaximumSize(i,t,e,r),o=n.devicePixelRatio||this.platform.getDevicePixelRatio(),s=this.width?"resize":"attach";if(this.width=a.width,this.height=a.height,this._aspectRatio=this.aspectRatio,!!oe(this,o,!0))this.notifyPlugins("resize",{size:a}),rf(n.onResize,[this,a],this),this.attached&&this._doResize(s)&&this.render()}ensureScalesHaveIDs(){rp(this.options.scales||{},(t,e)=>{t.id=e})}buildOrUpdateScales(){let t=this.options,e=t.scales,n=this.scales,i=Object.keys(n).reduce((t,e)=>(t[e]=!1,t),{}),r=[];e&&(r=r.concat(Object.keys(e).map(t=>{let n=e[t],i=sA(t,n),r="r"===i,a="x"===i;return{options:n,dposition:r?"chartArea":a?"bottom":"left",dtype:r?"radialLinear":a?"category":"linear"}}))),rp(r,e=>{let r=e.options,a=r.id,o=sA(a,r),s=ru(r.type,e.dtype);(void 0===r.position||sz(r.position,o)!==sz(e.dposition))&&(r.position=e.dposition),i[a]=!0;let l=null;a in n&&n[a].type===s?l=n[a]:n[(l=new(sk.getScale(s))({id:a,type:s,ctx:this.ctx,chart:this})).id]=l,l.init(r,t)}),rp(i,(t,e)=>{!t&&delete n[e]}),rp(n,t=>{o6.configure(this,t,t.options),o6.addBox(this,t)})}_updateMetasets(){let t=this._metasets,e=this.data.datasets.length,n=t.length;if(t.sort((t,e)=>t.index-e.index),n>e){for(let t=e;t<n;++t)this._destroyDatasetMeta(t);t.splice(e,n-e)}this._sortedMetasets=t.slice(0).sort(sB("order","index"))}_removeUnreferencedMetasets(){let{_metasets:t,data:{datasets:e}}=this;t.length>e.length&&delete this._stacks,t.forEach((t,n)=>{0===e.filter(e=>e===t._dataset).length&&this._destroyDatasetMeta(n)})}buildOrUpdateControllers(){let t,e;let n=[],i=this.data.datasets;for(this._removeUnreferencedMetasets(),t=0,e=i.length;t<e;t++){let e=i[t],r=this.getDatasetMeta(t),a=e.type||this.config.type;if(r.type&&r.type!==a&&(this._destroyDatasetMeta(t),r=this.getDatasetMeta(t)),r.type=a,r.indexAxis=e.indexAxis||sC(a,this.options),r.order=e.order||0,r.index=t,r.label=""+e.label,r.visible=this.isDatasetVisible(t),r.controller)r.controller.updateIndex(t),r.controller.linkScales();else{let e=sk.getController(a),{datasetElementType:i,dataElementType:o}=am.datasets[a];Object.assign(e,{dataElementType:sk.getElement(o),datasetElementType:i&&sk.getElement(i)}),r.controller=new e(this,t),n.push(r.controller)}}return this._updateMetasets(),n}_resetElements(){rp(this.data.datasets,(t,e)=>{this.getDatasetMeta(e).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){let e=this.config;e.update();let n=this._options=e.createResolver(e.chartOptionScopes(),this.getContext()),i=this._animationsDisabled=!n.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),!1===this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0}))return;let r=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let a=0;for(let t=0,e=this.data.datasets.length;t<e;t++){let{controller:e}=this.getDatasetMeta(t),n=!i&&-1===r.indexOf(e);e.buildOrUpdateElements(n),a=Math.max(+e.getMaxOverflow(),a)}a=this._minPadding=n.layout.autoPadding?a:0,this._updateLayout(a),!i&&rp(r,t=>{t.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(sB("z","_idx"));let{_active:o,_lastEvent:s}=this;s?this._eventHandler(s,!0):o.length&&this._updateHoverStyles(o,o,!0),this.render()}_updateScales(){rp(this.scales,t=>{o6.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){let t=this.options,e=new Set(Object.keys(this._listeners));(!rA(e,new Set(t.events))||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){let{_hiddenIndices:t}=this;for(let{method:e,start:n,count:i}of this._getUniformDataChanges()||[])!function(t,e,n){for(let i of Object.keys(t)){let r=+i;if(r>=e){let a=t[i];delete t[i],(n>0||r>e)&&(t[r+n]=a)}}}(t,n,"_removeElements"===e?-i:i)}_getUniformDataChanges(){let t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];let e=this.data.datasets.length,n=e=>new Set(t.filter(t=>t[0]===e).map((t,e)=>e+","+t.splice(1).join(","))),i=n(0);for(let t=1;t<e;t++)if(!rA(i,n(t)))return;return Array.from(i).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;o6.update(this,this.width,this.height,t);let e=this.chartArea,n=e.width<=0||e.height<=0;this._layers=[],rp(this.boxes,t=>{if(!n||"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,n=this.data.datasets.length;e<n;++e)this._updateDataset(e,rM(t)?t({datasetIndex:e}):t);this.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,e){let n=this.getDatasetMeta(t),i={meta:n,index:t,mode:e,cancelable:!0};if(!1!==this.notifyPlugins("beforeDatasetUpdate",i))n.controller._update(e),i.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",i)}render(){if(!1!==this.notifyPlugins("beforeRender",{cancelable:!0}))op.has(this)?this.attached&&!op.running(this)&&op.start(this):(this.draw(),s$({chart:this}))}draw(){let t;if(this._resizeBeforeDraw){let{width:t,height:e}=this._resizeBeforeDraw;this._resizeBeforeDraw=null,this._resize(t,e)}if(this.clear(),this.width<=0||this.height<=0||!1===this.notifyPlugins("beforeDraw",{cancelable:!0}))return;let 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){let e,n;let i=this._sortedMetasets,r=[];for(e=0,n=i.length;e<n;++e){let n=i[e];(!t||n.visible)&&r.push(n)}return r}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(!1===this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0}))return;let t=this.getSortedVisibleDatasetMetas();for(let e=t.length-1;e>=0;--e)this._drawDataset(t[e]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){let e=this.ctx,n=t._clip,i=!n.disabled,r=function(t,e){let{xScale:n,yScale:i}=t;return n&&i?{left:sV(n,e,"left"),right:sV(n,e,"right"),top:sV(i,e,"top"),bottom:sV(i,e,"bottom")}:e}(t,this.chartArea),a={meta:t,index:t.index,cancelable:!0};if(!1!==this.notifyPlugins("beforeDatasetDraw",a))i&&ak(e,{left:!1===n.left?0:r.left-n.left,right:!1===n.right?this.width:r.right+n.right,top:!1===n.top?0:r.top-n.top,bottom:!1===n.bottom?this.height:r.bottom+n.bottom}),t.controller.draw(),i&&aS(e),a.cancelable=!1,this.notifyPlugins("afterDatasetDraw",a)}isPointInArea(t){return a_(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,e,n,i){let r=oX.modes[e];return"function"==typeof r?r(this,t,n,i):[]}getDatasetMeta(t){let e=this.data.datasets[t],n=this._metasets,i=n.filter(t=>t&&t._dataset===e).pop();return!i&&(i={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e&&e.order||0,index:t,_dataset:e,_parsed:[],_sorted:!1},n.push(i)),i}getContext(){return this.$context||(this.$context=aR(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){let e=this.data.datasets[t];if(!e)return!1;let n=this.getDatasetMeta(t);return"boolean"==typeof n.hidden?!n.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,n){let i=n?"show":"hide",r=this.getDatasetMeta(t),a=r.controller._resolveAnimations(void 0,i);rC(e)?(r.data[e].hidden=!n,this.update()):(this.setDatasetVisibility(t,n),a.update(r,{visible:n}),this.update(e=>e.datasetIndex===t?i:void 0))}hide(t,e){this._updateVisibility(t,e,!1)}show(t,e){this._updateVisibility(t,e,!0)}_destroyDatasetMeta(t){let e=this._metasets[t];e&&e.controller&&e.controller._destroy(),delete this._metasets[t]}_stop(){let t,e;for(this.stop(),op.remove(this),t=0,e=this.data.datasets.length;t<e;++t)this._destroyDatasetMeta(t)}destroy(){this.notifyPlugins("beforeDestroy");let{canvas:t,ctx:e}=this;this._stop(),this.config.clearCache(),t&&(this.unbindEvents(),ab(t,e),this.platform.releaseContext(e),this.canvas=null,this.ctx=null),delete sU[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...t){return this.canvas.toDataURL(...t)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){let t=this._listeners,e=this.platform,n=(n,i)=>{e.addEventListener(this,n,i),t[n]=i},i=(t,e,n)=>{t.offsetX=e,t.offsetY=n,this._eventHandler(t)};rp(this.options.events,t=>n(t,i))}bindResponsiveEvents(){let t;!this._responsiveListeners&&(this._responsiveListeners={});let e=this._responsiveListeners,n=this.platform,i=(t,i)=>{n.addEventListener(this,t,i),e[t]=i},r=(t,i)=>{e[t]&&(n.removeEventListener(this,t,i),delete e[t])},a=(t,e)=>{this.canvas&&this.resize(t,e)},o=()=>{r("attach",o),this.attached=!0,this.resize(),i("resize",a),i("detach",t)};t=()=>{this.attached=!1,r("resize",a),this._stop(),this._resize(0,0),i("attach",o)},n.isAttached(this.canvas)?o():t()}unbindEvents(){rp(this._listeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._listeners={},rp(this._responsiveListeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,e,n){let i,r,a;let o=n?"set":"remove";for("dataset"===e&&this.getDatasetMeta(t[0].datasetIndex).controller["_"+o+"DatasetHoverStyle"](),r=0,a=t.length;r<a;++r){let e=(i=t[r])&&this.getDatasetMeta(i.datasetIndex).controller;e&&e[o+"HoverStyle"](i.element,i.datasetIndex,i.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){let e=this._active||[],n=t.map(({datasetIndex:t,index:e})=>{let n=this.getDatasetMeta(t);if(!n)throw Error("No dataset found at index "+t);return{datasetIndex:t,element:n.data[e],index:e}});!rg(n,e)&&(this._active=n,this._lastEvent=null,this._updateHoverStyles(n,e))}notifyPlugins(t,e,n){return this._plugins.notify(this,t,e,n)}isPluginEnabled(t){return 1===this._plugins._cache.filter(e=>e.plugin.id===t).length}_updateHoverStyles(t,e,n){let i=this.options.hover,r=(t,e)=>t.filter(t=>!e.some(e=>t.datasetIndex===e.datasetIndex&&t.index===e.index)),a=r(e,t),o=n?t:r(t,e);a.length&&this.updateHoverStyle(a,i.mode,!1),o.length&&i.mode&&this.updateHoverStyle(o,i.mode,!0)}_eventHandler(t,e){let n={event:t,replay:e,cancelable:!0,inChartArea:this.isPointInArea(t)},i=e=>(e.options.events||this.options.events).includes(t.native.type);if(!1===this.notifyPlugins("beforeEvent",n,i))return;let r=this._handleEvent(t,e,n.inChartArea);return n.cancelable=!1,this.notifyPlugins("afterEvent",n,i),(r||n.changed)&&this.render(),this}_handleEvent(t,e,n){var i,r,a,o,s;let{_active:l=[],options:c}=this,u=this._getActiveElements(t,l,n,e);let h="mouseup"===(i=t).type||"click"===i.type||"contextmenu"===i.type;let d=(r=t,a=this._lastEvent,o=n,s=h,o&&"mouseout"!==r.type?s?a:r:null);n&&(this._lastEvent=null,rf(c.onHover,[t,u,this],this),h&&rf(c.onClick,[t,u,this],this));let f=!rg(u,l);return(f||e)&&(this._active=u,this._updateHoverStyles(u,l,e)),this._lastEvent=d,f}_getActiveElements(t,e,n,i){if("mouseout"===t.type)return[];if(!n)return e;let r=this.options.hover;return this.getElementsAtEventForMode(t,r.mode,r,i)}}function sJ(){return rp(sY.instances,t=>t._plugins.invalidate())}function sX(t,e,n,i){return{x:n+t*Math.cos(e),y:i+t*Math.sin(e)}}function sG(t,e,n,i,r,a){let{x:o,y:s,startAngle:l,pixelMargin:c,innerRadius:u}=e,h=Math.max(e.outerRadius+i+n-c,0),d=u>0?u+i+n+c:0,f=0,p=r-l;if(i){let t=h>0?h-i:0,e=((u>0?u-i:0)+t)/2;f=(p-(0!==e?p*e/(e+i):p))/2}let g=Math.max(.001,p*h-n/rL)/h,m=(p-g)/2,v=l+m+f,y=r-m-f,{outerStart:b,outerEnd:x,innerStart:w,innerEnd:_}=function(t,e,n,i){let r=aP(t.options.borderRadius,["outerStart","outerEnd","innerStart","innerEnd"]),a=(n-e)/2,o=Math.min(a,i*e/2),s=t=>{let e=(n-Math.min(a,t))*i/2;return rG(t,0,Math.min(a,e))};return{outerStart:s(r.outerStart),outerEnd:s(r.outerEnd),innerStart:rG(r.innerStart,0,o),innerEnd:rG(r.innerEnd,0,o)}}(e,d,h,y-v),k=h-b,S=h-x,C=v+b/k,M=y-x/S,A=d+w,L=d+_,E=v+w/A,T=y-_/L;if(t.beginPath(),a){let e=(C+M)/2;if(t.arc(o,s,h,C,e),t.arc(o,s,h,e,M),x>0){let e=sX(S,M,o,s);t.arc(e.x,e.y,x,M,y+rD)}let n=sX(L,y,o,s);if(t.lineTo(n.x,n.y),_>0){let e=sX(L,T,o,s);t.arc(e.x,e.y,_,y+rD,T+Math.PI)}let i=(y-_/d+(v+w/d))/2;if(t.arc(o,s,d,y-_/d,i,!0),t.arc(o,s,d,i,v+w/d,!0),w>0){let e=sX(A,E,o,s);t.arc(e.x,e.y,w,E+Math.PI,v-rD)}let r=sX(k,v,o,s);if(t.lineTo(r.x,r.y),b>0){let e=sX(k,C,o,s);t.arc(e.x,e.y,b,v-rD,C)}}else{t.moveTo(o,s);let e=Math.cos(C)*h+o,n=Math.sin(C)*h+s;t.lineTo(e,n);let i=Math.cos(M)*h+o,r=Math.sin(M)*h+s;t.lineTo(i,r)}t.closePath()}class sK extends sf{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,n){let{angle:i,distance:r}=rq(this.getProps(["x","y"],n),{x:t,y:e}),{startAngle:a,endAngle:o,innerRadius:s,outerRadius:l,circumference:c}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],n),u=(this.options.spacing+this.options.borderWidth)/2,h=ru(c,o-a),d=rX(i,a,o)&&a!==o,f=h>=rE||d,p=rK(r,s+u,l+u);return f&&p}getCenterPoint(t){let{x:e,y:n,startAngle:i,endAngle:r,innerRadius:a,outerRadius:o}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],t),{offset:s,spacing:l}=this.options,c=(i+r)/2,u=(a+o+l+s)/2;return{x:e+Math.cos(c)*u,y:n+Math.sin(c)*u}}tooltipPosition(t){return this.getCenterPoint(t)}draw(t){let{options:e,circumference:n}=this,i=(e.offset||0)/4,r=(e.spacing||0)/2,a=e.circular;if(this.pixelMargin="inner"===e.borderAlign?.33:0,this.fullCircles=n>rE?Math.floor(n/rE):0,0===n||this.innerRadius<0||this.outerRadius<0)return;t.save();let o=(this.startAngle+this.endAngle)/2;t.translate(Math.cos(o)*i,Math.sin(o)*i);let s=i*(1-Math.sin(Math.min(rL,n||0)));t.fillStyle=e.backgroundColor,t.strokeStyle=e.borderColor,!function(t,e,n,i,r){let{fullCircles:a,startAngle:o,circumference:s}=e,l=e.endAngle;if(a){sG(t,e,n,i,l,r);for(let e=0;e<a;++e)t.fill();!isNaN(s)&&(l=o+(s%rE||rE))}sG(t,e,n,i,l,r),t.fill()}(t,this,s,r,a),!function(t,e,n,i,r){let{fullCircles:a,startAngle:o,circumference:s,options:l}=e,{borderWidth:c,borderJoinStyle:u,borderDash:h,borderDashOffset:d}=l,f="inner"===l.borderAlign;if(!c)return;t.setLineDash(h||[]),t.lineDashOffset=d,f?(t.lineWidth=2*c,t.lineJoin=u||"round"):(t.lineWidth=c,t.lineJoin=u||"bevel");let p=e.endAngle;if(a){sG(t,e,n,i,p,r);for(let e=0;e<a;++e)t.stroke();!isNaN(s)&&(p=o+(s%rE||rE))}f&&!function(t,e,n){let{startAngle:i,pixelMargin:r,x:a,y:o,outerRadius:s,innerRadius:l}=e,c=r/s;t.beginPath(),t.arc(a,o,s,i-c,n+c),l>r?(c=r/l,t.arc(a,o,l,n+c,i-c,!0)):t.arc(a,o,r,n+rD,i-rD),t.closePath(),t.clip()}(t,e,p),!a&&(sG(t,e,n,i,p,r),t.stroke())}(t,this,s,r,a),t.restore()}}function sZ(t,e,n=e){t.lineCap=ru(n.borderCapStyle,e.borderCapStyle),t.setLineDash(ru(n.borderDash,e.borderDash)),t.lineDashOffset=ru(n.borderDashOffset,e.borderDashOffset),t.lineJoin=ru(n.borderJoinStyle,e.borderJoinStyle),t.lineWidth=ru(n.borderWidth,e.borderWidth),t.strokeStyle=ru(n.borderColor,e.borderColor)}function sQ(t,e,n){t.lineTo(n.x,n.y)}function s0(t,e,n={}){let i=t.length,{start:r=0,end:a=i-1}=n,{start:o,end:s}=e,l=Math.max(r,o),c=Math.min(a,s);return{count:i,start:l,loop:e.loop,ilen:c<l&&!(r<o&&a<o||r>s&&a>s)?i+c-l:c-l}}function s1(t,e,n,i){var r;let a,o,s;let{points:l,options:c}=e,{count:u,start:h,loop:d,ilen:f}=s0(l,n,i);let p=(r=c).stepped?aC:r.tension||"monotone"===r.cubicInterpolationMode?aM:sQ,{move:g=!0,reverse:m}=i||{};for(a=0;a<=f;++a){if(!(o=l[(h+(m?f-a:a))%u]).skip){g?(t.moveTo(o.x,o.y),g=!1):p(t,s,o,m,c.stepped);s=o}}return d&&p(t,s,o=l[(h+(m?f:0))%u],m,c.stepped),!!d}function s2(t,e,n,i){let r,a,o,s,l,c;let u=e.points,{count:h,start:d,ilen:f}=s0(u,n,i),{move:p=!0,reverse:g}=i||{},m=0,v=0,y=t=>(d+(g?f-t:t))%h,b=()=>{s!==l&&(t.lineTo(m,l),t.lineTo(m,s),t.lineTo(m,c))};for(p&&(a=u[y(0)],t.moveTo(a.x,a.y)),r=0;r<=f;++r){if((a=u[y(r)]).skip)continue;let e=a.x,n=a.y,i=0|e;i===o?(n<s?s=n:n>l&&(l=n),m=(v*m+e)/++v):(b(),t.lineTo(e,n),o=i,v=0,s=l=n),c=n}b()}function s3(t){let e=t.options,n=e.borderDash&&e.borderDash.length;return t._decimated||t._loop||e.tension||"monotone"===e.cubicInterpolationMode||e.stepped||n?s1:s2}let s5="function"==typeof Path2D;class s6 extends sf{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){let n=this.options;if((n.tension||"monotone"===n.cubicInterpolationMode)&&!n.stepped&&!this._pointsUpdated){let i=n.spanGaps?this._loop:this._fullLoop;!function(t,e,n,i,r){let a,o,s,l;if(e.spanGaps&&(t=t.filter(t=>!t.skip)),"monotone"===e.cubicInterpolationMode)!function(t,e="x"){let n,i,r;let a=a0(e),o=t.length,s=Array(o).fill(0),l=Array(o),c=aQ(t,0);for(n=0;n<o;++n){if(i=r,r=c,c=aQ(t,n+1),!!r){if(c){let t=c[e]-r[e];s[n]=0!==t?(c[a]-r[a])/t:0}l[n]=i?c?rN(s[n-1])!==rN(s[n])?0:(s[n-1]+s[n])/2:s[n-1]:s[n]}}!function(t,e,n){let i,r,a,o,s;let l=t.length,c=aQ(t,0);for(let u=0;u<l-1;++u){if(s=c,c=aQ(t,u+1),!s||!c)continue;if(rR(e[u],0,aZ)){n[u]=n[u+1]=0;continue}if(i=n[u]/e[u],!((o=Math.pow(i,2)+Math.pow(r=n[u+1]/e[u],2))<=9))a=3/Math.sqrt(o),n[u]=i*a*e[u],n[u+1]=r*a*e[u]}}(t,s,l),!function(t,e,n="x"){let i,r,a;let o=a0(n),s=t.length,l=aQ(t,0);for(let c=0;c<s;++c){if(r=a,a=l,l=aQ(t,c+1),!a)continue;let s=a[n],u=a[o];r&&(i=(s-r[n])/3,a[`cp1${n}`]=s-i,a[`cp1${o}`]=u-i*e[c]),l&&(i=(l[n]-s)/3,a[`cp2${n}`]=s+i,a[`cp2${o}`]=u+i*e[c])}}(t,l,e)}(t,r);else{let n=i?t[t.length-1]:t[0];for(a=0,o=t.length;a<o;++a)l=function(t,e,n,i){let r=t.skip?e:t,a=n.skip?e:n,o=rV(e,r),s=rV(a,e),l=o/(o+s),c=s/(o+s);l=isNaN(l)?0:l,c=isNaN(c)?0:c;let u=i*l,h=i*c;return{previous:{x:e.x-u*(a.x-r.x),y:e.y-u*(a.y-r.y)},next:{x:e.x+h*(a.x-r.x),y:e.y+h*(a.y-r.y)}}}(n,s=t[a],t[Math.min(a+1,o-(i?0:1))%o],e.tension),s.cp1x=l.previous.x,s.cp1y=l.previous.y,s.cp2x=l.next.x,s.cp2y=l.next.y,n=s}e.capBezierPoints&&!function(t,e){let n,i,r,a,o;let s=a_(t[0],e);for(n=0,i=t.length;n<i;++n){if(o=a,a=s,s=n<i-1&&a_(t[n+1],e),!!a)r=t[n],o&&(r.cp1x=a1(r.cp1x,e.left,e.right),r.cp1y=a1(r.cp1y,e.top,e.bottom)),s&&(r.cp2x=a1(r.cp2x,e.left,e.right),r.cp2y=a1(r.cp2y,e.top,e.bottom))}}(t,n)}(this._points,n,t,i,e),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=function(t,e){let n=t.points,i=t.options.spanGaps,r=n.length;if(!r)return[];let a=!!t._loop,{start:o,end:s}=function(t,e,n,i){let r=0,a=e-1;if(n&&!i)for(;r<e&&!t[r].skip;)r++;for(;r<e&&t[r].skip;)r++;for(r%=e,n&&(a+=r);a>r&&t[a%e].skip;)a--;return{start:r,end:a%=e}}(n,r,a,i);if(!0===i)return od(t,[{start:o,end:s,loop:a}],n,e);let l=s<o?s+r:s,c=!!t._fullLoop&&0===o&&s===r-1;return od(t,function(t,e,n,i){let r;let a=t.length,o=[],s=e,l=t[e];for(r=e+1;r<=n;++r){let n=t[r%a];n.skip||n.stop?!l.skip&&(i=!1,o.push({start:e%a,end:(r-1)%a,loop:i}),e=s=n.stop?r:null):(s=r,l.skip&&(e=r)),l=n}return null!==s&&o.push({start:e%a,end:s%a,loop:i}),o}(n,o,l,c),n,e)}(this,this.options.segment))}first(){let t=this.segments,e=this.points;return t.length&&e[t[0].start]}last(){let t=this.segments,e=this.points,n=t.length;return n&&e[t[n-1].end]}interpolate(t,e){var n;let i,r;let a=this.options,o=t[e],s=this.points,l=function(t,e){let n=[],i=t.segments;for(let r=0;r<i.length;r++){let a=function(t,e,n){let i,r,a;if(!n)return[t];let{property:o,start:s,end:l}=n,c=e.length,{compare:u,between:h,normalize:d}=ou(o),{start:f,end:p,loop:g,style:m}=function(t,e,n){let i;let{property:r,start:a,end:o}=n,{between:s,normalize:l}=ou(r),c=e.length,{start:u,end:h,loop:d}=t;if(d){for(u+=c,h+=c,i=0;i<c&&s(l(e[u%c][r]),a,o);++i){;u--,h--}u%=c,h%=c}return h<u&&(h+=c),{start:u,end:h,loop:d,style:t.style}}(t,e,n),v=[],y=!1,b=null,x=()=>h(s,a,i)&&0!==u(s,a),w=()=>0===u(l,i)||h(l,a,i),_=()=>y||x(),k=()=>!y||w();for(let t=f,n=f;t<=p;++t){if(!(r=e[t%c]).skip&&(i=d(r[o]))!==a)y=h(i,s,l),null===b&&_()&&(b=0===u(i,s)?t:n),null!==b&&k()&&(v.push(oh({start:b,end:t,loop:g,count:c,style:m})),b=null),n=t,a=i}return null!==b&&v.push(oh({start:b,end:p,loop:g,count:c,style:m})),v}(i[r],t.points,e);a.length&&n.push(...a)}return n}(this,{property:e,start:o,end:o});if(!l.length)return;let c=[];let u=(n=a).stepped?oa:n.tension||"monotone"===n.cubicInterpolationMode?oo:or;for(i=0,r=l.length;i<r;++i){let{start:n,end:r}=l[i],h=s[n],d=s[r];if(h===d){c.push(h);continue}let f=Math.abs((o-h[e])/(d[e]-h[e])),p=u(h,d,f,a.stepped);p[e]=t[e],c.push(p)}return 1===c.length?c[0]:c}pathSegment(t,e,n){return s3(this)(t,this,e,n)}path(t,e,n){let i=this.segments,r=s3(this),a=this._loop;for(let o of(e=e||0,n=n||this.points.length-e,i))a&=r(t,this,o,{start:e,end:e+n-1});return!!a}draw(t,e,n,i){let r=this.options||{};(this.points||[]).length&&r.borderWidth&&(t.save(),!function(t,e,n,i){if(s5&&!e.options.segment){var r,a,o,s;let l;r=t,a=e,o=n,s=i,(l=a._path)||(l=a._path=new Path2D,a.path(l,o,s)&&l.closePath()),sZ(r,a.options),r.stroke(l)}else!function(t,e,n,i){let{segments:r,options:a}=e,o=s3(e);for(let s of r)sZ(t,a,s.style),t.beginPath(),o(t,e,s,{start:n,end:n+i-1})&&t.closePath(),t.stroke()}(t,e,n,i)}(t,this,n,i),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}function s4(t,e,n,i){let r=t.options,{[n]:a}=t.getProps([n],i);return Math.abs(e-a)<r.radius+r.hitRadius}class s8 extends sf{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,n){let i=this.options,{x:r,y:a}=this.getProps(["x","y"],n);return Math.pow(t-r,2)+Math.pow(e-a,2)<Math.pow(i.hitRadius+i.radius,2)}inXRange(t,e){return s4(this,t,"x",e)}inYRange(t,e){return s4(this,t,"y",e)}getCenterPoint(t){let{x:e,y:n}=this.getProps(["x","y"],t);return{x:e,y:n}}size(t){let e=(t=t||this.options||{}).radius||0,n=(e=Math.max(e,e&&t.hoverRadius||0))&&t.borderWidth||0;return(e+n)*2}draw(t,e){let n=this.options;if(!this.skip&&!(n.radius<.1)&&!!a_(this,e,this.size(n)/2))t.strokeStyle=n.borderColor,t.lineWidth=n.borderWidth,t.fillStyle=n.backgroundColor,ax(t,n,this.x,this.y)}getRange(){let t=this.options||{};return t.radius+t.hitRadius}}function s9(t,e){let n,i,r,a,o;let{x:s,y:l,base:c,width:u,height:h}=t.getProps(["x","y","base","width","height"],e);return t.horizontal?(o=h/2,n=Math.min(s,c),i=Math.max(s,c),r=l-o,a=l+o):(n=s-(o=u/2),i=s+o,r=Math.min(l,c),a=Math.max(l,c)),{left:n,top:r,right:i,bottom:a}}function s7(t,e,n,i){return t?0:rG(e,n,i)}function lt(t,e,n,i){let r=null===e,a=null===n,o=t&&!(r&&a)&&s9(t,i);return o&&(r||rK(e,o.left,o.right))&&(a||rK(n,o.top,o.bottom))}function le(t,e){t.rect(e.x,e.y,e.w,e.h)}function ln(t,e,n={}){let i=t.x!==n.x?-e:0,r=t.y!==n.y?-e:0,a=(t.x+t.w!==n.x+n.w?e:0)-i,o=(t.y+t.h!==n.y+n.h?e:0)-r;return{x:t.x+i,y:t.y+r,w:t.w+a,h:t.h+o,radius:t.radius}}class li extends sf{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){var e;let{inflateAmount:n,options:{borderColor:i,backgroundColor:r}}=this,{inner:a,outer:o}=function(t){let e=s9(t),n=e.right-e.left,i=e.bottom-e.top,r=function(t,e,n){let i=t.options.borderWidth,r=t.borderSkipped,a=aD(i);return{t:s7(r.top,a.top,0,n),r:s7(r.right,a.right,0,e),b:s7(r.bottom,a.bottom,0,n),l:s7(r.left,a.left,0,e)}}(t,n/2,i/2),a=function(t,e,n){let{enableBorderRadius:i}=t.getProps(["enableBorderRadius"]),r=t.options.borderRadius,a=aI(r),o=Math.min(e,n),s=t.borderSkipped,l=i||rs(r);return{topLeft:s7(!l||s.top||s.left,a.topLeft,0,o),topRight:s7(!l||s.top||s.right,a.topRight,0,o),bottomLeft:s7(!l||s.bottom||s.left,a.bottomLeft,0,o),bottomRight:s7(!l||s.bottom||s.right,a.bottomRight,0,o)}}(t,n/2,i/2);return{outer:{x:e.left,y:e.top,w:n,h:i,radius:a},inner:{x:e.left+r.l,y:e.top+r.t,w:n-r.l-r.r,h:i-r.t-r.b,radius:{topLeft:Math.max(0,a.topLeft-Math.max(r.t,r.l)),topRight:Math.max(0,a.topRight-Math.max(r.t,r.r)),bottomLeft:Math.max(0,a.bottomLeft-Math.max(r.b,r.l)),bottomRight:Math.max(0,a.bottomRight-Math.max(r.b,r.r))}}}}(this);let s=(e=o.radius).topLeft||e.topRight||e.bottomLeft||e.bottomRight?aL:le;t.save(),(o.w!==a.w||o.h!==a.h)&&(t.beginPath(),s(t,ln(o,n,a)),t.clip(),s(t,ln(a,-n,o)),t.fillStyle=i,t.fill("evenodd")),t.beginPath(),s(t,ln(a,n)),t.fillStyle=r,t.fill(),t.restore()}inRange(t,e,n){return lt(this,t,e,n)}inXRange(t,e){return lt(this,t,null,e)}inYRange(t,e){return lt(this,null,t,e)}getCenterPoint(t){let{x:e,y:n,base:i,horizontal:r}=this.getProps(["x","y","base","horizontal"],t);return{x:r?(e+i)/2:e,y:r?n:(n+i)/2}}getRange(t){return"x"===t?this.width/2:this.height/2}}function lr(t){return null[t%null.length]}function la(t){return null[t%null.length]}function lo(t,e,n,i){if(i)return;let r=e[t],a=n[t];return"angle"===t&&(r=_normalizeAngle(r),a=_normalizeAngle(a)),{property:t,start:r,end:a}}function ls(t,e,n){for(;e>t;e--){let t=n[e];if(!isNaN(t.x)&&!isNaN(t.y))break}return e}function ll(t,e,n,i){return t&&e?i(t[n],e[n]):t?t[n]:e?e[n]:0}function lc(t,e){let n=[],i=!1;return isArray(t)?(i=!0,n=t):n=function(t,e){let{x:n=null,y:i=null}=t||{},r=e.points,a=[];return e.segments.forEach(({start:t,end:e})=>{e=ls(t,e,r);let o=r[t],s=r[e];null!==i?(a.push({x:o.x,y:i}),a.push({x:s.x,y:i})):null!==n&&(a.push({x:n,y:o.y}),a.push({x:n,y:s.y}))}),a}(t,e),n.length?new s6({points:n,options:{tension:0},_loop:i,_fullLoop:i}):null}class lu{constructor(t){this.x=t.x,this.y=t.y,this.radius=t.radius}pathSegment(t,e,n){let{x:i,y:r,radius:a}=this;return e=e||{start:0,end:TAU},t.arc(i,r,a,e.end,e.start,!0),!n.bounds}interpolate(t){let{x:e,y:n,radius:i}=this,r=t.angle;return{x:e+Math.cos(r)*i,y:n+Math.sin(r)*i,angle:r}}}function lh(t,e,n){let{segments:i,points:r}=e,a=!0,o=!1;for(let s of(t.beginPath(),i)){let{start:i,end:l}=s,c=r[i],u=r[ls(i,l,r)];a?(t.moveTo(c.x,c.y),a=!1):(t.lineTo(c.x,n),t.lineTo(c.x,c.y)),(o=!!e.pathSegment(t,s,{move:o}))?t.closePath():t.lineTo(u.x,n)}t.lineTo(e.first().x,n),t.closePath(),t.clip()}function ld(t,e){let{line:n,target:i,property:r,color:a,scale:o}=e;for(let{source:e,target:s,start:l,end:c}of function(t,e,n){let i=t.segments,r=t.points,a=e.points,o=[];for(let t of i){let{start:i,end:s}=t;s=ls(i,s,r);let l=lo(n,r[i],r[s],t.loop);if(!e.segments){o.push({source:t,target:l,start:r[i],end:r[s]});continue}for(let i of _boundSegments(e,l)){let e=lo(n,a[i.start],a[i.end],i.loop);for(let a of _boundSegment(t,r,e))o.push({source:a,target:i,start:{[n]:ll(l,e,"start",Math.max)},end:{[n]:ll(l,e,"end",Math.min)}})}}return o}(n,i,r)){let u;let{style:{backgroundColor:h=a}={}}=e,d=!0!==i;t.save(),t.fillStyle=h,function(t,e,n){let{top:i,bottom:r}=e.chart.chartArea,{property:a,start:o,end:s}=n||{};"x"===a&&(t.beginPath(),t.rect(o,i,s-o,r-i),t.clip())}(t,o,d&&lo(r,l,c)),t.beginPath();let f=!!n.pathSegment(t,e);if(d){f?t.closePath():lf(t,i,c,r);let e=!!i.pathSegment(t,s,{move:f,reverse:!0});!(u=f&&e)&&lf(t,i,l,r)}t.closePath(),t.fill(u?"evenodd":"nonzero"),t.restore()}}function lf(t,e,n,i){let r=e.interpolate(n,i);r&&t.lineTo(r.x,r.y)}let lp=(t,e)=>{let{boxHeight:n=e,boxWidth:i=e}=t;return t.usePointStyle&&(n=Math.min(n,e),i=t.pointStyleWidth||Math.min(i,e)),{boxWidth:i,boxHeight:n,itemHeight:Math.max(e,n)}},lg=(t,e)=>null!==t&&null!==e&&t.datasetIndex===e.datasetIndex&&t.index===e.index;function lm(t,e){return e*(t.text?t.text.length:0)}class lv extends sf{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){let n=this.options;if(this.left=0,this.top=0,!n.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=t,this.height=this.bottom=e;let i=ro(n.text)?n.text.length:1;this._padding=aj(n.padding);let r=i*aF(n.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=r:this.width=r}isHorizontal(){let t=this.options.position;return"top"===t||"bottom"===t}_drawArgs(t){let e,n,i;let{top:r,left:a,bottom:o,right:s,options:l}=this,c=l.align,u=0;return this.isHorizontal()?(n=r8(c,a,s),i=r+t,e=s-a):("left"===l.position?(n=a+t,i=r8(c,o,r),u=-.5*rL):(n=s-t,i=r8(c,r,o),u=.5*rL),e=o-r),{titleX:n,titleY:i,maxWidth:e,rotation:u}}draw(){let t=this.ctx,e=this.options;if(!e.display)return;let n=aF(e.font),i=n.lineHeight/2+this._padding.top,{titleX:r,titleY:a,maxWidth:o,rotation:s}=this._drawArgs(i);aA(t,e.text,0,0,n,{color:e.color,maxWidth:o,rotation:s,textAlign:r4(e.align),textBaseline:"middle",translation:[r,a]})}}new WeakMap;let ly={average(t){let e,n;if(!t.length)return!1;let i=new Set,r=0,a=0;for(e=0,n=t.length;e<n;++e){let n=t[e].element;if(n&&n.hasValue()){let t=n.tooltipPosition();i.add(t.x),r+=t.y,++a}}return 0!==a&&0!==i.size&&{x:[...i].reduce((t,e)=>t+e)/i.size,y:r/a}},nearest(t,e){let n,i,r;if(!t.length)return!1;let a=e.x,o=e.y,s=Number.POSITIVE_INFINITY;for(n=0,i=t.length;n<i;++n){let i=t[n].element;if(i&&i.hasValue()){let t=rV(e,i.getCenterPoint());t<s&&(s=t,r=i)}}if(r){let t=r.tooltipPosition();a=t.x,o=t.y}return{x:a,y:o}}};function lb(t,e){return e&&(ro(e)?Array.prototype.push.apply(t,e):t.push(e)),t}function lx(t){return("string"==typeof t||t instanceof String)&&t.indexOf("\n")>-1?t.split("\n"):t}function lw(t,e){let n=t.chart.ctx,{body:i,footer:r,title:a}=t,{boxWidth:o,boxHeight:s}=e,l=aF(e.bodyFont),c=aF(e.titleFont),u=aF(e.footerFont),h=a.length,d=r.length,f=i.length,p=aj(e.padding),g=p.height,m=0,v=i.reduce((t,e)=>t+e.before.length+e.lines.length+e.after.length,0);v+=t.beforeBody.length+t.afterBody.length,h&&(g+=h*c.lineHeight+(h-1)*e.titleSpacing+e.titleMarginBottom),v&&(g+=f*(e.displayColors?Math.max(s,l.lineHeight):l.lineHeight)+(v-f)*l.lineHeight+(v-1)*e.bodySpacing),d&&(g+=e.footerMarginTop+d*u.lineHeight+(d-1)*e.footerSpacing);let y=0,b=function(t){m=Math.max(m,n.measureText(t).width+y)};return n.save(),n.font=c.string,rp(t.title,b),n.font=l.string,rp(t.beforeBody.concat(t.afterBody),b),y=e.displayColors?o+2+e.boxPadding:0,rp(i,t=>{rp(t.before,b),rp(t.lines,b),rp(t.after,b)}),y=0,n.font=u.string,rp(t.footer,b),n.restore(),{width:m+=p.width,height:g}}function l_(t,e,n){let i=n.yAlign||e.yAlign||function(t,e){let{y:n,height:i}=e;return n<i/2?"top":n>t.height-i/2?"bottom":"center"}(t,n);return{xAlign:n.xAlign||e.xAlign||function(t,e,n,i){let{x:r,width:a}=n,{width:o,chartArea:{left:s,right:l}}=t,c="center";return"center"===i?c=r<=(s+l)/2?"left":"right":r<=a/2?c="left":r>=o-a/2&&(c="right"),function(t,e,n,i){let{x:r,width:a}=i,o=n.caretSize+n.caretPadding;if("left"===t&&r+a+o>e.width||"right"===t&&r-a-o<0)return!0}(c,t,e,n)&&(c="center"),c}(t,e,n,i),yAlign:i}}function lk(t,e,n,i){let{caretSize:r,caretPadding:a,cornerRadius:o}=t,{xAlign:s,yAlign:l}=n,c=r+a,{topLeft:u,topRight:h,bottomLeft:d,bottomRight:f}=aI(o),p=function(t,e){let{x:n,width:i}=t;return"right"===e?n-=i:"center"===e&&(n-=i/2),n}(e,s),g=function(t,e,n){let{y:i,height:r}=t;return"top"===e?i+=n:"bottom"===e?i-=r+n:i-=r/2,i}(e,l,c);return"center"===l?"left"===s?p+=c:"right"===s&&(p-=c):"left"===s?p-=Math.max(u,d)+r:"right"===s&&(p+=Math.max(h,f)+r),{x:rG(p,0,i.width-e.width),y:rG(g,0,i.height-e.height)}}function lS(t,e,n){let i=aj(n.padding);return"center"===e?t.x+t.width/2:"right"===e?t.x+t.width-i.right:t.x+i.left}function lC(t){return lb([],lx(t))}function lM(t,e){let n=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return n?t.override(n):t}let lA={beforeTitle:ri,title(t){if(t.length>0){let e=t[0],n=e.chart.data.labels,i=n?n.length:0;if(this&&this.options&&"dataset"===this.options.mode)return e.dataset.label||"";if(e.label)return e.label;else if(i>0&&e.dataIndex<i)return n[e.dataIndex]}return""},afterTitle:ri,beforeBody:ri,beforeLabel:ri,label(t){if(this&&this.options&&"dataset"===this.options.mode)return t.label+": "+t.formattedValue||t.formattedValue;let e=t.dataset.label||"";e&&(e+=": ");let n=t.formattedValue;return!ra(n)&&(e+=n),e},labelColor(t){let 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){let e=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{pointStyle:e.pointStyle,rotation:e.rotation}},afterLabel:ri,afterBody:ri,beforeFooter:ri,footer:ri,afterFooter:ri};function lL(t,e,n,i){let r=t[e].call(n,i);return void 0===r?lA[e].call(n,i):r}class lE extends sf{static positioners=ly;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(){let t=this._cachedAnimations;if(t)return t;let e=this.chart,n=this.options.setContext(this.getContext()),i=n.enabled&&e.options.animation&&n.animations,r=new oy(this.chart,i);return i._cacheable&&(this._cachedAnimations=Object.freeze(r)),r}getContext(){var t,e;return this.$context||(this.$context=(t=this.chart.getContext(),e=this,aR(t,{tooltip:e,tooltipItems:this._tooltipItems,type:"tooltip"})))}getTitle(t,e){let{callbacks:n}=e,i=lL(n,"beforeTitle",this,t),r=lL(n,"title",this,t),a=lL(n,"afterTitle",this,t),o=[];return o=lb(o,lx(i)),o=lb(o,lx(r)),o=lb(o,lx(a))}getBeforeBody(t,e){return lb([],lx(lL(e.callbacks,"beforeBody",this,t)))}getBody(t,e){let{callbacks:n}=e,i=[];return rp(t,t=>{let e={before:[],lines:[],after:[]},r=lM(n,t);lb(e.before,lx(lL(r,"beforeLabel",this,t))),lb(e.lines,lL(r,"label",this,t)),lb(e.after,lx(lL(r,"afterLabel",this,t))),i.push(e)}),i}getAfterBody(t,e){return lb([],lx(lL(e.callbacks,"afterBody",this,t)))}getFooter(t,e){let{callbacks:n}=e,i=lL(n,"beforeFooter",this,t),r=lL(n,"footer",this,t),a=lL(n,"afterFooter",this,t),o=[];return o=lb(o,lx(i)),o=lb(o,lx(r)),o=lb(o,lx(a))}_createItems(t){let e,n;let i=this._active,r=this.chart.data,a=[],o=[],s=[],l=[];for(e=0,n=i.length;e<n;++e)l.push(function(t,e){let{element:n,datasetIndex:i,index:r}=e,a=t.getDatasetMeta(i).controller,{label:o,value:s}=a.getLabelAndValue(r);return{chart:t,label:o,parsed:a.getParsed(r),raw:t.data.datasets[i].data[r],formattedValue:s,dataset:a.getDataset(),dataIndex:r,datasetIndex:i,element:n}}(this.chart,i[e]));return t.filter&&(l=l.filter((e,n,i)=>t.filter(e,n,i,r))),t.itemSort&&(l=l.sort((e,n)=>t.itemSort(e,n,r))),rp(l,e=>{let n=lM(t.callbacks,e);a.push(lL(n,"labelColor",this,e)),o.push(lL(n,"labelPointStyle",this,e)),s.push(lL(n,"labelTextColor",this,e))}),this.labelColors=a,this.labelPointStyles=o,this.labelTextColors=s,this.dataPoints=l,l}update(t,e){let n;let i=this.options.setContext(this.getContext()),r=this._active,a=[];if(r.length){let t=ly[i.position].call(this,r,this._eventPosition);a=this._createItems(i),this.title=this.getTitle(a,i),this.beforeBody=this.getBeforeBody(a,i),this.body=this.getBody(a,i),this.afterBody=this.getAfterBody(a,i),this.footer=this.getFooter(a,i);let e=this._size=lw(this,i),o=Object.assign({},t,e),s=l_(this.chart,i,o),l=lk(i,o,s,this.chart);this.xAlign=s.xAlign,this.yAlign=s.yAlign,n={opacity:1,x:l.x,y:l.y,width:e.width,height:e.height,caretX:t.x,caretY:t.y}}else 0!==this.opacity&&(n={opacity:0});this._tooltipItems=a,this.$context=void 0,n&&this._resolveAnimations().update(this,n),t&&i.external&&i.external.call(this,{chart:this.chart,tooltip:this,replay:e})}drawCaret(t,e,n,i){let r=this.getCaretPosition(t,n,i);e.lineTo(r.x1,r.y1),e.lineTo(r.x2,r.y2),e.lineTo(r.x3,r.y3)}getCaretPosition(t,e,n){let i,r,a,o,s,l;let{xAlign:c,yAlign:u}=this,{caretSize:h,cornerRadius:d}=n,{topLeft:f,topRight:p,bottomLeft:g,bottomRight:m}=aI(d),{x:v,y:y}=t,{width:b,height:x}=e;return"center"===u?(s=y+x/2,"left"===c?(r=(i=v)-h,o=s+h,l=s-h):(r=(i=v+b)+h,o=s-h,l=s+h),a=i):(r="left"===c?v+Math.max(f,g)+h:"right"===c?v+b-Math.max(p,m)-h:this.caretX,"top"===u?(s=(o=y)-h,i=r-h,a=r+h):(s=(o=y+x)+h,i=r+h,a=r-h),l=o),{x1:i,x2:r,x3:a,y1:o,y2:s,y3:l}}drawTitle(t,e,n){let i,r,a;let o=this.title,s=o.length;if(s){let l=os(n.rtl,this.x,this.width);for(a=0,t.x=lS(this,n.titleAlign,n),e.textAlign=l.textAlign(n.titleAlign),e.textBaseline="middle",i=aF(n.titleFont),r=n.titleSpacing,e.fillStyle=n.titleColor,e.font=i.string;a<s;++a)e.fillText(o[a],l.x(t.x),t.y+i.lineHeight/2),t.y+=i.lineHeight+r,a+1===s&&(t.y+=n.titleMarginBottom-r)}}_drawColorBox(t,e,n,i,r){let a=this.labelColors[n],o=this.labelPointStyles[n],{boxHeight:s,boxWidth:l}=r,c=aF(r.bodyFont),u=lS(this,"left",r),h=i.x(u),d=s<c.lineHeight?(c.lineHeight-s)/2:0,f=e.y+d;if(r.usePointStyle){let e={radius:Math.min(l,s)/2,pointStyle:o.pointStyle,rotation:o.rotation,borderWidth:1},n=i.leftForLtr(h,l)+l/2,c=f+s/2;t.strokeStyle=r.multiKeyBackground,t.fillStyle=r.multiKeyBackground,ax(t,e,n,c),t.strokeStyle=a.borderColor,t.fillStyle=a.backgroundColor,ax(t,e,n,c)}else{t.lineWidth=rs(a.borderWidth)?Math.max(...Object.values(a.borderWidth)):a.borderWidth||1,t.strokeStyle=a.borderColor,t.setLineDash(a.borderDash||[]),t.lineDashOffset=a.borderDashOffset||0;let e=i.leftForLtr(h,l),n=i.leftForLtr(i.xPlus(h,1),l-2),o=aI(a.borderRadius);Object.values(o).some(t=>0!==t)?(t.beginPath(),t.fillStyle=r.multiKeyBackground,aL(t,{x:e,y:f,w:l,h:s,radius:o}),t.fill(),t.stroke(),t.fillStyle=a.backgroundColor,t.beginPath(),aL(t,{x:n,y:f+1,w:l-2,h:s-2,radius:o}),t.fill()):(t.fillStyle=r.multiKeyBackground,t.fillRect(e,f,l,s),t.strokeRect(e,f,l,s),t.fillStyle=a.backgroundColor,t.fillRect(n,f+1,l-2,s-2))}t.fillStyle=this.labelTextColors[n]}drawBody(t,e,n){let i,r,a,o,s,l,c;let{body:u}=this,{bodySpacing:h,bodyAlign:d,displayColors:f,boxHeight:p,boxWidth:g,boxPadding:m}=n,v=aF(n.bodyFont),y=v.lineHeight,b=0,x=os(n.rtl,this.x,this.width),w=function(n){e.fillText(n,x.x(t.x+b),t.y+y/2),t.y+=y+h},_=x.textAlign(d);for(e.textAlign=d,e.textBaseline="middle",e.font=v.string,t.x=lS(this,_,n),e.fillStyle=n.bodyColor,rp(this.beforeBody,w),b=f&&"right"!==_?"center"===d?g/2+m:g+2+m:0,o=0,l=u.length;o<l;++o){for(i=u[o],r=this.labelTextColors[o],e.fillStyle=r,rp(i.before,w),a=i.lines,f&&a.length&&(this._drawColorBox(e,t,o,x,n),y=Math.max(v.lineHeight,p)),s=0,c=a.length;s<c;++s)w(a[s]),y=v.lineHeight;rp(i.after,w)}b=0,y=v.lineHeight,rp(this.afterBody,w),t.y-=h}drawFooter(t,e,n){let i,r;let a=this.footer,o=a.length;if(o){let s=os(n.rtl,this.x,this.width);for(t.x=lS(this,n.footerAlign,n),t.y+=n.footerMarginTop,e.textAlign=s.textAlign(n.footerAlign),e.textBaseline="middle",i=aF(n.footerFont),e.fillStyle=n.footerColor,e.font=i.string,r=0;r<o;++r)e.fillText(a[r],s.x(t.x),t.y+i.lineHeight/2),t.y+=i.lineHeight+n.footerSpacing}}drawBackground(t,e,n,i){let{xAlign:r,yAlign:a}=this,{x:o,y:s}=t,{width:l,height:c}=n,{topLeft:u,topRight:h,bottomLeft:d,bottomRight:f}=aI(i.cornerRadius);e.fillStyle=i.backgroundColor,e.strokeStyle=i.borderColor,e.lineWidth=i.borderWidth,e.beginPath(),e.moveTo(o+u,s),"top"===a&&this.drawCaret(t,e,n,i),e.lineTo(o+l-h,s),e.quadraticCurveTo(o+l,s,o+l,s+h),"center"===a&&"right"===r&&this.drawCaret(t,e,n,i),e.lineTo(o+l,s+c-f),e.quadraticCurveTo(o+l,s+c,o+l-f,s+c),"bottom"===a&&this.drawCaret(t,e,n,i),e.lineTo(o+d,s+c),e.quadraticCurveTo(o,s+c,o,s+c-d),"center"===a&&"left"===r&&this.drawCaret(t,e,n,i),e.lineTo(o,s+u),e.quadraticCurveTo(o,s,o+u,s),e.closePath(),e.fill(),i.borderWidth>0&&e.stroke()}_updateAnimationTarget(t){let e=this.chart,n=this.$animations,i=n&&n.x,r=n&&n.y;if(i||r){let n=ly[t.position].call(this,this._active,this._eventPosition);if(!n)return;let a=this._size=lw(this,t),o=Object.assign({},n,this._size),s=l_(e,t,o),l=lk(t,o,s,e);(i._to!==l.x||r._to!==l.y)&&(this.xAlign=s.xAlign,this.yAlign=s.yAlign,this.width=a.width,this.height=a.height,this.caretX=n.x,this.caretY=n.y,this._resolveAnimations().update(this,l))}}_willRender(){return!!this.opacity}draw(t){let e=this.options.setContext(this.getContext()),n=this.opacity;if(!n)return;this._updateAnimationTarget(e);let i={width:this.width,height:this.height},r={x:this.x,y:this.y};n=.001>Math.abs(n)?0:n;let a=aj(e.padding),o=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;e.enabled&&o&&(t.save(),t.globalAlpha=n,this.drawBackground(r,t,i,e),ol(t,e.textDirection),r.y+=a.top,this.drawTitle(r,t,e),this.drawBody(r,t,e),this.drawFooter(r,t,e),oc(t,e.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,e){let n=this._active,i=t.map(({datasetIndex:t,index:e})=>{let n=this.chart.getDatasetMeta(t);if(!n)throw Error("Cannot find a dataset at index "+t);return{datasetIndex:t,element:n.data[e],index:e}}),r=!rg(n,i),a=this._positionChanged(i,e);(r||a)&&(this._active=i,this._eventPosition=e,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,e,n=!0){if(e&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;let i=this.options,r=this._active||[],a=this._getActiveElements(t,r,e,n),o=this._positionChanged(a,t),s=e||!rg(a,r)||o;return s&&(this._active=a,(i.enabled||i.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,e))),s}_getActiveElements(t,e,n,i){let r=this.options;if("mouseout"===t.type)return[];if(!i)return e.filter(t=>this.chart.data.datasets[t.datasetIndex]&&void 0!==this.chart.getDatasetMeta(t.datasetIndex).controller.getParsed(t.index));let a=this.chart.getElementsAtEventForMode(t,r.mode,r,n);return r.reverse&&a.reverse(),a}_positionChanged(t,e){let{caretX:n,caretY:i,options:r}=this,a=ly[r.position].call(this,t,e);return!1!==a&&(n!==a.x||i!==a.y)}}let lT=(t,e,n,i)=>("string"==typeof e?(n=t.push(e)-1,i.unshift({index:n,label:e})):isNaN(e)&&(n=null),n),lO=(t,e)=>null===t?null:rG(Math.round(t),0,e);function lP(t){let e=this.getLabels();return t>=0&&t<e.length?e[t]:t}function lD(t,e,{horizontal:n,minRotation:i}){let r=rH(i),a=(n?Math.sin(r):Math.cos(r))||.001,o=.75*e*(""+t).length;return Math.min(e/a,o)}class lI extends sw{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 ra(t)||("number"==typeof t||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){let{beginAtZero:t}=this.options,{minDefined:e,maxDefined:n}=this.getUserBounds(),{min:i,max:r}=this,a=t=>i=e?i:t,o=t=>r=n?r:t;if(t){let t=rN(i),e=rN(r);t<0&&e<0?o(0):t>0&&e>0&&a(0)}if(i===r){let e=0===r?1:Math.abs(.05*r);o(r+e),!t&&a(i-e)}this.min=i,this.max=r}getTickLimit(){let t;let{maxTicksLimit:e,stepSize:n}=this.options.ticks;return n?(t=Math.ceil(this.max/n)-Math.floor(this.min/n)+1)>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${n} would result generating up to ${t} ticks. Limiting to 1000.`),t=1e3):(t=this.computeTickLimit(),e=e||11),e&&(t=Math.min(e,t)),t}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){let t=this.options,e=t.ticks,n=this.getTickLimit(),i={maxTicks:n=Math.max(2,n),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},r=function(t,e){let n,i,r,a;let o=[],{bounds:s,step:l,min:c,max:u,precision:h,count:d,maxTicks:f,maxDigits:p,includeBounds:g}=t,m=l||1,v=f-1,{min:y,max:b}=e,x=!ra(c),w=!ra(u),_=!ra(d),k=(b-y)/(p+1),S=rz((b-y)/v/m)*m;if(S<1e-14&&!x&&!w)return[{value:y},{value:b}];(a=Math.ceil(b/S)-Math.floor(y/S))>v&&(S=rz(a*S/v/m)*m),!ra(h)&&(S=Math.ceil(S*(n=Math.pow(10,h)))/n),"ticks"===s?(i=Math.floor(y/S)*S,r=Math.ceil(b/S)*S):(i=y,r=b),x&&w&&l&&function(t,e){let n=Math.round(t);return n-e<=t&&n+e>=t}((u-c)/l,S/1e3)?(a=Math.round(Math.min((u-c)/S,f)),S=(u-c)/a,i=c,r=u):_?(i=x?c:i,S=((r=w?u:r)-i)/(a=d-1)):a=rR(a=(r-i)/S,Math.round(a),S/1e3)?Math.round(a):Math.ceil(a);let C=Math.max(rU(S),rU(i));i=Math.round(i*(n=Math.pow(10,ra(h)?C:h)))/n,r=Math.round(r*n)/n;let M=0;for(x&&(g&&i!==c?(o.push({value:c}),i<c&&M++,rR(Math.round((i+M*S)*n)/n,c,lD(c,k,t))&&M++):i<c&&M++);M<a;++M){let t=Math.round((i+M*S)*n)/n;if(w&&t>u)break;o.push({value:t})}return w&&g&&r!==u?o.length&&rR(o[o.length-1].value,u,lD(u,k,t))?o[o.length-1].value=u:o.push({value:u}):(!w||r===u)&&o.push({value:r}),o}(i,this._range||this);return"ticks"===t.bounds&&r$(r,this,"value"),t.reverse?(r.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),r}configure(){let t=this.ticks,e=this.min,n=this.max;if(super.configure(),this.options.offset&&t.length){let i=(n-e)/Math.max(t.length-1,1)/2;e-=i,n+=i}this._startValue=e,this._endValue=n,this._valueRange=n-e}getLabelForValue(t){return ac(t,this.chart.options.locale,this.options.ticks.format)}}class lj extends lI{static id="linear";static defaults={ticks:{callback:ah.numeric}};determineDataLimits(){let{min:t,max:e}=this.getMinMax(!0);this.min=rl(t)?t:0,this.max=rl(e)?e:1,this.handleTickRangeOptions()}computeTickLimit(){let t=this.isHorizontal(),e=t?this.width:this.height,n=rH(this.options.ticks.minRotation),i=(t?Math.sin(n):Math.cos(n))||.001;return Math.ceil(e/Math.min(40,this._resolveTickFontOptions(0).lineHeight/i))}getPixelForValue(t){return null===t?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}let lF=t=>Math.floor(rF(t)),lN=(t,e)=>Math.pow(10,lF(t)+e);function lR(t){return 1==t/Math.pow(10,lF(t))}function lz(t,e,n){let i=Math.pow(10,n),r=Math.floor(t/i);return Math.ceil(e/i)-r}class lB extends sw{static id="logarithmic";static defaults={ticks:{callback:ah.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){let n=lI.prototype.parse.apply(this,[t,e]);if(0===n){this._zero=!0;return}return rl(n)&&n>0?n:null}determineDataLimits(){let{min:t,max:e}=this.getMinMax(!0);this.min=rl(t)?Math.max(0,t):null,this.max=rl(e)?Math.max(0,e):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!rl(this._userMin)&&(this.min=t===lN(this.min,0)?lN(this.min,-1):lN(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){let{minDefined:t,maxDefined:e}=this.getUserBounds(),n=this.min,i=this.max,r=e=>n=t?n:e,a=t=>i=e?i:t;n===i&&(n<=0?(r(1),a(10)):(r(lN(n,-1)),a(lN(i,1)))),n<=0&&r(lN(i,-1)),i<=0&&a(lN(n,1)),this.min=n,this.max=i}buildTicks(){let t=this.options,e=function(t,{min:e,max:n}){e=rc(t.min,e);let i=[],r=lF(e),a=function(t,e){let n=lF(e-t);for(;lz(t,e,n)>10;)n++;for(;10>lz(t,e,n);)n--;return Math.min(n,lF(t))}(e,n),o=a<0?Math.pow(10,Math.abs(a)):1,s=Math.pow(10,a),l=r>a?Math.pow(10,r):0,c=Math.round((e-l)*o)/o,u=Math.floor((e-l)/s/10)*s*10,h=Math.floor((c-u)/Math.pow(10,a)),d=rc(t.min,Math.round((l+u+h*Math.pow(10,a))*o)/o);for(;d<n;)i.push({value:d,major:lR(d),significand:h}),h>=10?h=h<15?15:20:h++,h>=20&&(h=2,o=++a>=0?1:o),d=Math.round((l+u+h*Math.pow(10,a))*o)/o;let f=rc(t.max,d);return i.push({value:f,major:lR(f),significand:h}),i}({min:this._userMin,max:this._userMax},this);return"ticks"===t.bounds&&r$(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":ac(t,this.chart.options.locale,this.options.ticks.format)}configure(){let t=this.min;super.configure(),this._startValue=rF(t),this._valueRange=rF(this.max)-rF(t)}getPixelForValue(t){return((void 0===t||0===t)&&(t=this.min),null===t||isNaN(t))?NaN:this.getPixelForDecimal(t===this.min?0:(rF(t)-this._startValue)/this._valueRange)}getValueForPixel(t){let e=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+e*this._valueRange)}}function l$(t){let e=t.ticks;if(e.display&&t.display){let t=aj(e.backdropPadding);return ru(e.font&&e.font.size,am.font.size)+t.height}return 0}function lH(t,e,n,i,r){return t===i||t===r?{start:e-n/2,end:e+n/2}:t<i||t>r?{start:e-n,end:e}:{start:e,end:e+n}}function lW(t,e,n,i){let{ctx:r}=t;if(n)r.arc(t.xCenter,t.yCenter,e,0,rE);else{let n=t.getPointPosition(0,e);r.moveTo(n.x,n.y);for(let a=1;a<i;a++)n=t.getPointPosition(a,e),r.lineTo(n.x,n.y)}}class lU extends lI{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:ah.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(){let t=this._padding=aj(l$(this.options)/2),e=this.width=this.maxWidth-t.width,n=this.height=this.maxHeight-t.height;this.xCenter=Math.floor(this.left+e/2+t.left),this.yCenter=Math.floor(this.top+n/2+t.top),this.drawingArea=Math.floor(Math.min(e,n)/2)}determineDataLimits(){let{min:t,max:e}=this.getMinMax(!1);this.min=rl(t)&&!isNaN(t)?t:0,this.max=rl(e)&&!isNaN(e)?e:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/l$(this.options))}generateTickLabels(t){lI.prototype.generateTickLabels.call(this,t),this._pointLabels=this.getLabels().map((t,e)=>{let n=rf(this.options.pointLabels.callback,[t,e],this);return n||0===n?n:""}).filter((t,e)=>this.chart.getDataVisibility(e))}fit(){let t=this.options;t.display&&t.pointLabels.display?!function(t){let 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},n=Object.assign({},e),i=[],r=[],a=t._pointLabels.length,o=t.options.pointLabels,s=o.centerPointLabels?rL/a:0;for(let h=0;h<a;h++){var l,c,u;let a=o.setContext(t.getPointLabelContext(h));r[h]=a.padding;let d=t.getPointPosition(h,t.drawingArea+r[h],s),f=aF(a.font);let p=(l=t.ctx,c=f,u=ro(u=t._pointLabels[h])?u:[u],{w:function(t,e,n,i){let r,a,o,s,l;let c=(i=i||{}).data=i.data||{},u=i.garbageCollect=i.garbageCollect||[];i.font!==e&&(c=i.data={},u=i.garbageCollect=[],i.font=e),t.save(),t.font=e;let h=0,d=n.length;for(r=0;r<d;r++)if(null==(s=n[r])||ro(s)){if(ro(s))for(a=0,o=s.length;a<o;a++)null!=(l=s[a])&&!ro(l)&&(h=av(t,c,u,h,l))}else h=av(t,c,u,h,s);t.restore();let f=u.length/2;if(f>n.length){for(r=0;r<f;r++)delete c[u[r]];u.splice(0,f)}return h}(l,c.string,u),h:u.length*c.lineHeight});i[h]=p;let g=rJ(t.getIndexAngle(h)+s),m=Math.round(180/rL*g),v=lH(m,d.x,p.w,0,180);(function(t,e,n,i,r){let a=Math.abs(Math.sin(n)),o=Math.abs(Math.cos(n)),s=0,l=0;i.start<e.l?(s=(e.l-i.start)/a,t.l=Math.min(t.l,e.l-s)):i.end>e.r&&(s=(i.end-e.r)/a,t.r=Math.max(t.r,e.r+s)),r.start<e.t?(l=(e.t-r.start)/o,t.t=Math.min(t.t,e.t-l)):r.end>e.b&&(l=(r.end-e.b)/o,t.b=Math.max(t.b,e.b+l))})(n,e,g,v,lH(m,d.y,p.h,90,270))}t.setCenterPoint(e.l-n.l,n.r-e.r,e.t-n.t,n.b-e.b),t._pointLabelItems=function(t,e,n){let i;let r=[],a=t._pointLabels.length,o=t.options,{centerPointLabels:s,display:l}=o.pointLabels,c={extra:l$(o)/2,additionalAngle:s?rL/a:0};for(let o=0;o<a;o++){c.padding=n[o],c.size=e[o];let a=function(t,e,n){let i=t.drawingArea,{extra:r,additionalAngle:a,padding:o,size:s}=n,l=t.getPointPosition(e,i+r+o,a),c=Math.round(180/rL*rJ(l.angle+rD)),u=function(t,e,n){return 90===n||270===n?t-=e/2:(n>270||n<90)&&(t-=e),t}(l.y,s.h,c),h=function(t){return 0===t||180===t?"center":t<180?"left":"right"}(c),d=function(t,e,n){return"right"===n?t-=e:"center"===n&&(t-=e/2),t}(l.x,s.w,h);return{visible:!0,x:l.x,y:u,textAlign:h,left:d,top:u,right:d+s.w,bottom:u+s.h}}(t,o,c);r.push(a),"auto"===l&&(a.visible=function(t,e){if(!e)return!0;let{left:n,top:i,right:r,bottom:a}=t;return!(a_({x:n,y:i},e)||a_({x:n,y:a},e)||a_({x:r,y:i},e)||a_({x:r,y:a},e))}(a,i),a.visible&&(i=a))}return r}(t,i,r)}(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(t,e,n,i){this.xCenter+=Math.floor((t-e)/2),this.yCenter+=Math.floor((n-i)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(t,e,n,i))}getIndexAngle(t){let e=rE/(this._pointLabels.length||1);return rJ(t*e+rH(this.options.startAngle||0))}getDistanceFromCenterForValue(t){if(ra(t))return NaN;let e=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-t)*e:(t-this.min)*e}getValueForDistanceFromCenter(t){if(ra(t))return NaN;let e=t/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-e:this.min+e}getPointLabelContext(t){let e=this._pointLabels||[];if(t>=0&&t<e.length){var n,i;let r=e[t];return n=this.getContext(),i=t,aR(n,{label:r,index:i,type:"pointLabel"})}}getPointPosition(t,e,n=0){let i=this.getIndexAngle(t)-rD+n;return{x:Math.cos(i)*e+this.xCenter,y:Math.sin(i)*e+this.yCenter,angle:i}}getPointPositionForValue(t,e){return this.getPointPosition(t,this.getDistanceFromCenterForValue(e))}getBasePosition(t){return this.getPointPositionForValue(t||0,this.getBaseValue())}getPointLabelPosition(t){let{left:e,top:n,right:i,bottom:r}=this._pointLabelItems[t];return{left:e,top:n,right:i,bottom:r}}drawBackground(){let{backgroundColor:t,grid:{circular:e}}=this.options;if(t){let n=this.ctx;n.save(),n.beginPath(),lW(this,this.getDistanceFromCenterForValue(this._endValue),e,this._pointLabels.length),n.closePath(),n.fillStyle=t,n.fill(),n.restore()}}drawGrid(){let t,e,n;let i=this.ctx,r=this.options,{angleLines:a,grid:o,border:s}=r,l=this._pointLabels.length;if(r.pointLabels.display&&!function(t,e){let{ctx:n,options:{pointLabels:i}}=t;for(let r=e-1;r>=0;r--){let e=t._pointLabelItems[r];if(!e.visible)continue;let a=i.setContext(t.getPointLabelContext(r));!function(t,e,n){let{left:i,top:r,right:a,bottom:o}=n,{backdropColor:s}=e;if(!ra(s)){let n=aI(e.borderRadius),l=aj(e.backdropPadding);t.fillStyle=s;let c=i-l.left,u=r-l.top,h=a-i+l.width,d=o-r+l.height;Object.values(n).some(t=>0!==t)?(t.beginPath(),aL(t,{x:c,y:u,w:h,h:d,radius:n}),t.fill()):t.fillRect(c,u,h,d)}}(n,a,e);let o=aF(a.font),{x:s,y:l,textAlign:c}=e;aA(n,t._pointLabels[r],s,l+o.lineHeight/2,o,{color:a.color,textAlign:c,textBaseline:"middle"})}}(this,l),o.display&&this.ticks.forEach((t,n)=>{if(0!==n||0===n&&this.min<0){e=this.getDistanceFromCenterForValue(t.value);let i=this.getContext(n),r=o.setContext(i),a=s.setContext(i);!function(t,e,n,i,r){let a=t.ctx,o=e.circular,{color:s,lineWidth:l}=e;if((!!o||!!i)&&!!s&&!!l&&!(n<0))a.save(),a.strokeStyle=s,a.lineWidth=l,a.setLineDash(r.dash||[]),a.lineDashOffset=r.dashOffset,a.beginPath(),lW(t,n,o,i),a.closePath(),a.stroke(),a.restore()}(this,r,e,l,a)}}),a.display){for(i.save(),t=l-1;t>=0;t--){let o=a.setContext(this.getPointLabelContext(t)),{color:s,lineWidth:l}=o;if(!!l&&!!s)i.lineWidth=l,i.strokeStyle=s,i.setLineDash(o.borderDash),i.lineDashOffset=o.borderDashOffset,e=this.getDistanceFromCenterForValue(r.reverse?this.min:this.max),n=this.getPointPosition(t,e),i.beginPath(),i.moveTo(this.xCenter,this.yCenter),i.lineTo(n.x,n.y),i.stroke()}i.restore()}}drawBorder(){}drawLabels(){let t,e;let n=this.ctx,i=this.options,r=i.ticks;if(!r.display)return;let a=this.getIndexAngle(0);n.save(),n.translate(this.xCenter,this.yCenter),n.rotate(a),n.textAlign="center",n.textBaseline="middle",this.ticks.forEach((a,o)=>{if(0===o&&this.min>=0&&!i.reverse)return;let s=r.setContext(this.getContext(o)),l=aF(s.font);if(t=this.getDistanceFromCenterForValue(this.ticks[o].value),s.showLabelBackdrop){n.font=l.string,e=n.measureText(a.label).width,n.fillStyle=s.backdropColor;let i=aj(s.backdropPadding);n.fillRect(-e/2-i.left,-t-l.size/2-i.top,e+i.width,l.size+i.height)}aA(n,a.label,0,-t,l,{color:s.color,strokeColor:s.textStrokeColor,strokeWidth:s.textStrokeWidth})}),n.restore()}drawTitle(){}}let lq={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}},lV=Object.keys(lq);function lY(t,e){return t-e}function lJ(t,e){if(ra(e))return null;let n=t._adapter,{parser:i,round:r,isoWeekday:a}=t._parseOpts,o=e;return("function"==typeof i&&(o=i(o)),!rl(o)&&(o="string"==typeof i?n.parse(o,i):n.parse(o)),null===o)?null:(r&&(o="week"===r&&(rB(a)||!0===a)?n.startOf(o,"isoWeek",a):n.startOf(o,r)),+o)}function lX(t,e,n,i){let r=lV.length;for(let a=lV.indexOf(t);a<r-1;++a){let t=lq[lV[a]],r=t.steps?t.steps:Number.MAX_SAFE_INTEGER;if(t.common&&Math.ceil((n-e)/(r*t.size))<=i)return lV[a]}return lV[r-1]}function lG(t,e,n){if(n){if(n.length){let{lo:i,hi:r}=rZ(n,e);t[n[i]>=e?n[i]:n[r]]=!0}}else t[e]=!0}function lK(t,e,n){let i,r;let a=[],o={},s=e.length;for(i=0;i<s;++i)o[r=e[i]]=i,a.push({value:r,major:!1});return 0!==s&&n?function(t,e,n,i){let r,a;let o=t._adapter,s=+o.startOf(e[0].value,i),l=e[e.length-1].value;for(r=s;r<=l;r=+o.add(r,1,i))(a=n[r])>=0&&(e[a].major=!0);return e}(t,a,o,n):a}class lZ extends sw{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={}){let n=t.time||(t.time={}),i=this._adapter=new oU(t.adapters.date);i.init(e),rx(n.displayFormats,i.formats()),this._parseOpts={parser:n.parser,round:n.round,isoWeekday:n.isoWeekday},super.init(t),this._normalized=e.normalized}parse(t,e){return void 0===t?null:lJ(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){let t=this.options,e=this._adapter,n=t.time.unit||"day",{min:i,max:r,minDefined:a,maxDefined:o}=this.getUserBounds();function s(t){!a&&!isNaN(t.min)&&(i=Math.min(i,t.min)),!o&&!isNaN(t.max)&&(r=Math.max(r,t.max))}(!a||!o)&&(s(this._getLabelBounds()),("ticks"!==t.bounds||"labels"!==t.ticks.source)&&s(this.getMinMax(!1))),i=rl(i)&&!isNaN(i)?i:+e.startOf(Date.now(),n),r=rl(r)&&!isNaN(r)?r:+e.endOf(Date.now(),n)+1,this.min=Math.min(i,r-1),this.max=Math.max(i+1,r)}_getLabelBounds(){let t=this.getLabelTimestamps(),e=Number.POSITIVE_INFINITY,n=Number.NEGATIVE_INFINITY;return t.length&&(e=t[0],n=t[t.length-1]),{min:e,max:n}}buildTicks(){let t=this.options,e=t.time,n=t.ticks,i="labels"===n.source?this.getLabelTimestamps():this._generate();"ticks"===t.bounds&&i.length&&(this.min=this._userMin||i[0],this.max=this._userMax||i[i.length-1]);let r=this.min,a=function(t,e,n){let i=0,r=t.length;for(;i<r&&t[i]<e;)i++;for(;r>i&&t[r-1]>n;)r--;return i>0||r<t.length?t.slice(i,r):t}(i,r,this.max);return this._unit=e.unit||(n.autoSkip?lX(e.minUnit,this.min,this.max,this._getLabelCapacity(r)):function(t,e,n,i,r){for(let a=lV.length-1;a>=lV.indexOf(n);a--){let n=lV[a];if(lq[n].common&&t._adapter.diff(r,i,n)>=e-1)return n}return lV[n?lV.indexOf(n):0]}(this,a.length,e.minUnit,this.min,this.max)),this._majorUnit=n.major.enabled&&"year"!==this._unit?function(t){for(let e=lV.indexOf(t)+1,n=lV.length;e<n;++e)if(lq[lV[e]].common)return lV[e]}(this._unit):void 0,this.initOffsets(i),t.reverse&&a.reverse(),lK(this,a,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(t=>+t.value))}initOffsets(t=[]){let e,n,i=0,r=0;this.options.offset&&t.length&&(e=this.getDecimalForValue(t[0]),i=1===t.length?1-e:(this.getDecimalForValue(t[1])-e)/2,n=this.getDecimalForValue(t[t.length-1]),r=1===t.length?n:(n-this.getDecimalForValue(t[t.length-2]))/2);let a=t.length<3?.5:.25;i=rG(i,0,a),r=rG(r,0,a),this._offsets={start:i,end:r,factor:1/(i+1+r)}}_generate(){let t,e;let n=this._adapter,i=this.min,r=this.max,a=this.options,o=a.time,s=o.unit||lX(o.minUnit,i,r,this._getLabelCapacity(i)),l=ru(a.ticks.stepSize,1),c="week"===s&&o.isoWeekday,u=rB(c)||!0===c,h={},d=i;if(u&&(d=+n.startOf(d,"isoWeek",c)),d=+n.startOf(d,u?"day":s),n.diff(r,i,s)>1e5*l)throw Error(i+" and "+r+" are too far apart with stepSize of "+l+" "+s);let f="data"===a.ticks.source&&this.getDataTimestamps();for(t=d,e=0;t<r;t=+n.add(t,l,s),e++)lG(h,t,f);return(t===r||"ticks"===a.bounds||1===e)&&lG(h,t,f),Object.keys(h).sort(lY).map(t=>+t)}getLabelForValue(t){let e=this._adapter,n=this.options.time;return n.tooltipFormat?e.format(t,n.tooltipFormat):e.format(t,n.displayFormats.datetime)}format(t,e){let n=this.options.time.displayFormats,i=this._unit,r=e||n[i];return this._adapter.format(t,r)}_tickFormatFunction(t,e,n,i){let r=this.options,a=r.ticks.callback;if(a)return rf(a,[t,e,n],this);let o=r.time.displayFormats,s=this._unit,l=this._majorUnit,c=s&&o[s],u=l&&o[l],h=n[e],d=l&&u&&h&&h.major;return this._adapter.format(t,i||(d?u:c))}generateTickLabels(t){let e,n,i;for(e=0,n=t.length;e<n;++e)(i=t[e]).label=this._tickFormatFunction(i.value,e,t)}getDecimalForValue(t){return null===t?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){let e=this._offsets,n=this.getDecimalForValue(t);return this.getPixelForDecimal((e.start+n)*e.factor)}getValueForPixel(t){let e=this._offsets,n=this.getDecimalForPixel(t)/e.factor-e.end;return this.min+n*(this.max-this.min)}_getLabelSize(t){let e=this.options.ticks,n=this.ctx.measureText(t).width,i=rH(this.isHorizontal()?e.maxRotation:e.minRotation),r=Math.cos(i),a=Math.sin(i),o=this._resolveTickFontOptions(0).size;return{w:n*r+o*a,h:n*a+o*r}}_getLabelCapacity(t){let e=this.options.time,n=e.displayFormats,i=n[e.unit]||n.millisecond,r=this._tickFormatFunction(t,0,lK(this,[t],this._majorUnit),i),a=this._getLabelSize(r),o=Math.floor(this.isHorizontal()?this.width/a.w:this.height/a.h)-1;return o>0?o:1}getDataTimestamps(){let t,e,n=this._cache.data||[];if(n.length)return n;let i=this.getMatchingVisibleMetas();if(this._normalized&&i.length)return this._cache.data=i[0].controller.getAllParsedValues(this);for(t=0,e=i.length;t<e;++t)n=n.concat(i[t].controller.getAllParsedValues(this));return this._cache.data=this.normalize(n)}getLabelTimestamps(){let t,e;let n=this._cache.labels||[];if(n.length)return n;let i=this.getLabels();for(t=0,e=i.length;t<e;++t)n.push(lJ(this,i[t]));return this._cache.labels=this._normalized?n:this.normalize(n)}normalize(t){return r3(t.sort(lY))}}function lQ(t,e,n){let i,r,a,o,s=0,l=t.length-1;n?(e>=t[s].pos&&e<=t[l].pos&&({lo:s,hi:l}=rQ(t,"pos",e)),{pos:i,time:a}=t[s],{pos:r,time:o}=t[l]):(e>=t[s].time&&e<=t[l].time&&({lo:s,hi:l}=rQ(t,"time",e)),{time:i,pos:a}=t[s],{time:r,pos:o}=t[l]);let c=r-i;return c?a+(o-a)*(e-i)/c:a}class l0 extends lZ{static id="timeseries";static defaults=lZ.defaults;constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){let t=this._getTimestampsForTable(),e=this._table=this.buildLookupTable(t);this._minPos=lQ(e,this.min),this._tableRange=lQ(e,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){let e,n,i,r,a;let{min:o,max:s}=this,l=[],c=[];for(e=0,n=t.length;e<n;++e)(r=t[e])>=o&&r<=s&&l.push(r);if(l.length<2)return[{time:o,pos:0},{time:s,pos:1}];for(e=0,n=l.length;e<n;++e)a=l[e+1],i=l[e-1],Math.round((a+i)/2)!==(r=l[e])&&c.push({time:r,pos:e/(n-1)});return c}_generate(){let t=this.min,e=this.max,n=super.getDataTimestamps();return(!n.includes(t)||!n.length)&&n.splice(0,0,t),(!n.includes(e)||1===n.length)&&n.push(e),n.sort((t,e)=>t-e)}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;let e=this.getDataTimestamps(),n=this.getLabelTimestamps();return t=e.length&&n.length?this.normalize(e.concat(n)):e.length?e:n,t=this._cache.all=t}getDecimalForValue(t){return(lQ(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){let e=this._offsets,n=this.getDecimalForPixel(t)/e.factor-e.end;return lQ(this._table,n*this._tableRange+this._minPos,!0)}}var l1=function(){if("undefined"!=typeof window){if(window.devicePixelRatio)return window.devicePixelRatio;var t=window.screen;if(t)return(t.deviceXDPI||1)/(t.logicalXDPI||1)}return 1}(),l2={toTextLines:function(t){var e,n=[];for(t=[].concat(t);t.length;)"string"==typeof(e=t.pop())?n.unshift.apply(n,e.split("\n")):Array.isArray(e)?t.push.apply(t,e):!ra(t)&&n.unshift(""+e);return n},textSize:function(t,e,n){var i,r=[].concat(e),a=r.length,o=t.font,s=0;for(i=0,t.font=n.string;i<a;++i)s=Math.max(t.measureText(r[i]).width,s);return t.font=o,{height:a*n.lineHeight,width:s}},bound:function(t,e,n){return Math.max(t,Math.min(e,n))},arrayDiff:function(t,e){var n,i,r,a,o=t.slice(),s=[];for(n=0,r=e.length;n<r;++n)a=e[n],-1===(i=o.indexOf(a))?s.push([a,1]):o.splice(i,1);for(n=0,r=o.length;n<r;++n)s.push([o[n],-1]);return s},rasterize:function(t){return Math.round(t*l1)/l1}};function l3(t,e){var n=e.x,i=e.y;if(null===n)return{x:0,y:-1};if(null===i)return{x:1,y:0};var r=t.x-n,a=t.y-i,o=Math.sqrt(r*r+a*a);return{x:o?r/o:0,y:o?a/o:-1}}function l5(t,e,n){var i=0;return t<n.left?i|=1:t>n.right&&(i|=2),e<n.top?i|=8:e>n.bottom&&(i|=4),i}function l6(t,e){var n,i,r=e.anchor,a=t;return e.clamp&&(a=function(t,e){for(var n,i,r,a=t.x0,o=t.y0,s=t.x1,l=t.y1,c=l5(a,o,e),u=l5(s,l,e);c|u&&!(c&u);){;8&(n=c||u)?(i=a+(s-a)*(e.top-o)/(l-o),r=e.top):4&n?(i=a+(s-a)*(e.bottom-o)/(l-o),r=e.bottom):2&n?(r=o+(l-o)*(e.right-a)/(s-a),i=e.right):1&n&&(r=o+(l-o)*(e.left-a)/(s-a),i=e.left),n===c?c=l5(a=i,o=r,e):u=l5(s=i,l=r,e)}return{x0:a,x1:s,y0:o,y1:l}}(a,e.area)),"start"===r?(n=a.x0,i=a.y0):"end"===r?(n=a.x1,i=a.y1):(n=(a.x0+a.x1)/2,i=(a.y0+a.y1)/2),function(t,e,n,i,r){switch(r){case"center":n=i=0;break;case"bottom":n=0,i=1;break;case"right":n=1,i=0;break;case"left":n=-1,i=0;break;case"top":n=0,i=-1;break;case"start":n=-n,i=-i;break;case"end":break;default:r*=Math.PI/180,n=Math.cos(r),i=Math.sin(r)}return{x:t,y:e,vx:n,vy:i}}(n,i,t.vx,t.vy,e.align)}var l4={arc:function(t,e){var n=(t.startAngle+t.endAngle)/2,i=Math.cos(n),r=Math.sin(n),a=t.innerRadius,o=t.outerRadius;return l6({x0:t.x+i*a,y0:t.y+r*a,x1:t.x+i*o,y1:t.y+r*o,vx:i,vy:r},e)},point:function(t,e){var n=l3(t,e.origin),i=n.x*t.options.radius,r=n.y*t.options.radius;return l6({x0:t.x-i,y0:t.y-r,x1:t.x+i,y1:t.y+r,vx:n.x,vy:n.y},e)},bar:function(t,e){var n=l3(t,e.origin),i=t.x,r=t.y,a=0,o=0;return t.horizontal?(i=Math.min(t.x,t.base),a=Math.abs(t.base-t.x)):(r=Math.min(t.y,t.base),o=Math.abs(t.base-t.y)),l6({x0:i,y0:r+o,x1:i+a,y1:r,vx:n.x,vy:n.y},e)},fallback:function(t,e){var n=l3(t,e.origin);return l6({x0:t.x,y0:t.y,x1:t.x+(t.width||0),y1:t.y+(t.height||0),vx:n.x,vy:n.y},e)}},l8=l2.rasterize,l9=function(t,e,n,i){this._config=t,this._index=i,this._model=null,this._rects=null,this._ctx=e,this._el=n};rb(l9.prototype,{_modelize:function(t,e,n,i){var r,a=this._index,o=aF(aN([n.font,{}],i,a)),s=aN([n.color,am.color],i,a);return{align:aN([n.align,"center"],i,a),anchor:aN([n.anchor,"center"],i,a),area:i.chart.chartArea,backgroundColor:aN([n.backgroundColor,null],i,a),borderColor:aN([n.borderColor,null],i,a),borderRadius:aN([n.borderRadius,0],i,a),borderWidth:aN([n.borderWidth,0],i,a),clamp:aN([n.clamp,!1],i,a),clip:aN([n.clip,!1],i,a),color:s,display:t,font:o,lines:e,offset:aN([n.offset,4],i,a),opacity:aN([n.opacity,1],i,a),origin:function(t,e){var n=e.chart.getDatasetMeta(e.datasetIndex).vScale;if(!n)return null;if(void 0!==n.xCenter&&void 0!==n.yCenter)return{x:n.xCenter,y:n.yCenter};var i=n.getBasePixel();return t.horizontal?{x:i,y:null}:{x:null,y:i}}(this._el,i),padding:aj(aN([n.padding,4],i,a)),positioner:(r=this._el)instanceof sK?l4.arc:r instanceof s8?l4.point:r instanceof li?l4.bar:l4.fallback,rotation:aN([n.rotation,0],i,a)*(Math.PI/180),size:l2.textSize(this._ctx,e,o),textAlign:aN([n.textAlign,"start"],i,a),textShadowBlur:aN([n.textShadowBlur,0],i,a),textShadowColor:aN([n.textShadowColor,s],i,a),textStrokeColor:aN([n.textStrokeColor,s],i,a),textStrokeWidth:aN([n.textStrokeWidth,0],i,a)}},update:function(t){var e,n,i,r,a,o,s,l,c,u,h=null,d=null,f=this._index,p=this._config,g=aN([p.display,!0],t,f);if(g&&(e=t.dataset.data[f],(i=ra(n=ru(rf(p.formatter,[e,t]),e))?[]:l2.toTextLines(n)).length)){;a=(r=h=this._modelize(g,i,p,t)).borderWidth||0,o=r.padding,s=r.size.height,c=-(l=r.size.width)/2,u=-s/2,d={frame:{x:c-o.left-a,y:u-o.top-a,w:l+o.width+2*a,h:s+o.height+2*a},text:{x:c,y:u,w:l,h:s}}}this._model=h,this._rects=d},geometry:function(){return this._rects?this._rects.frame:{}},rotation:function(){return this._model?this._model.rotation:0},visible:function(){return this._model&&this._model.opacity},model:function(){return this._model},draw:function(t,e){var n,i=t.ctx,r=this._model,a=this._rects;if(!!this.visible())i.save(),r.clip&&(n=r.area,i.beginPath(),i.rect(n.left,n.top,n.right-n.left,n.bottom-n.top),i.clip()),i.globalAlpha=l2.bound(0,r.opacity,1),i.translate(l8(e.x),l8(e.y)),i.rotate(r.rotation),!function(t,e,n){var i=n.backgroundColor,r=n.borderColor,a=n.borderWidth;if(!!i||!!r&&!!a)t.beginPath(),!function(t,e,n,i,r,a){var o=Math.PI/2;if(a){var s=Math.min(a,r/2,i/2),l=e+s,c=n+s,u=e+i-s,h=n+r-s;t.moveTo(e,c),l<u&&c<h?(t.arc(l,c,s,-Math.PI,-o),t.arc(u,c,s,-o,0),t.arc(u,h,s,0,o),t.arc(l,h,s,o,Math.PI)):l<u?(t.moveTo(l,n),t.arc(u,c,s,-o,o),t.arc(l,c,s,o,Math.PI+o)):c<h?(t.arc(l,c,s,-Math.PI,0),t.arc(l,h,s,0,Math.PI)):t.arc(l,c,s,-Math.PI,Math.PI),t.closePath(),t.moveTo(e,n)}else t.rect(e,n,i,r)}(t,l8(e.x)+a/2,l8(e.y)+a/2,l8(e.w)-a,l8(e.h)-a,n.borderRadius),t.closePath(),i&&(t.fillStyle=i,t.fill()),r&&a&&(t.strokeStyle=r,t.lineWidth=a,t.lineJoin="miter",t.stroke())}(i,a.frame,r),!function(t,e,n,i){var r,a,o,s,l,c,u,h=i.textAlign,d=i.color,f=!!d,p=i.font,g=e.length,m=i.textStrokeColor,v=i.textStrokeWidth,y=m&&v;if(!!g&&(!!f||!!y))for(r=n,a=h,o=p.lineHeight,s=r.w,l=r.x,c=r.y+o/2,"center"===a?l+=s/2:("end"===a||"right"===a)&&(l+=s),n={h:o,w:s,x:l,y:c},t.font=p.string,t.textAlign=h,t.textBaseline="middle",t.shadowBlur=i.textShadowBlur,t.shadowColor=i.textShadowColor,f&&(t.fillStyle=d),y&&(t.lineJoin="round",t.lineWidth=v,t.strokeStyle=m),u=0,g=e.length;u<g;++u)!function(t,e,n){var i=t.shadowBlur,r=n.stroked,a=l8(n.x),o=l8(n.y),s=l8(n.w);r&&t.strokeText(e,a,o,s),n.filled&&(i&&r&&(t.shadowBlur=0),t.fillText(e,a,o,s),i&&r&&(t.shadowBlur=i))}(t,e[u],{stroked:y,filled:f,w:n.w,x:n.x,y:n.y+n.h*u})}(i,r.lines,a.text,r),i.restore()}});var l7=Number.MIN_SAFE_INTEGER||-0x1fffffffffffff,ct=Number.MAX_SAFE_INTEGER||0x1fffffffffffff;function ce(t,e,n){var i=Math.cos(n),r=Math.sin(n),a=e.x,o=e.y;return{x:a+i*(t.x-a)-r*(t.y-o),y:o+r*(t.x-a)+i*(t.y-o)}}function cn(t,e){var n,i,r,a,o,s=ct,l=l7,c=e.origin;for(n=0;n<t.length;++n)r=(i=t[n]).x-c.x,a=i.y-c.y,s=Math.min(s,o=e.vx*r+e.vy*a),l=Math.max(l,o);return{min:s,max:l}}function ci(t,e){var n=e.x-t.x,i=e.y-t.y,r=Math.sqrt(n*n+i*i);return{vx:(e.x-t.x)/r,vy:(e.y-t.y)/r,origin:t,ln:r}}var cr=function(){this._rotation=0,this._rect={x:0,y:0,w:0,h:0}};function ca(t,e,n){var i=e.positioner(t,e),r=i.vx,a=i.vy;if(!r&&!a)return{x:i.x,y:i.y};var o=n.w,s=n.h,l=e.rotation,c=Math.abs(o/2*Math.cos(l))+Math.abs(s/2*Math.sin(l)),u=Math.abs(o/2*Math.sin(l))+Math.abs(s/2*Math.cos(l)),h=1/Math.max(Math.abs(r),Math.abs(a));return c*=r*h,u*=a*h,c+=e.offset*r,u+=e.offset*a,{x:i.x+c,y:i.y+u}}rb(cr.prototype,{center:function(){var t=this._rect;return{x:t.x+t.w/2,y:t.y+t.h/2}},update:function(t,e,n){this._rotation=n,this._rect={x:e.x+t.x,y:e.y+t.y,w:e.w,h:e.h}},contains:function(t){var e=this._rect;return!((t=ce(t,this.center(),-this._rotation)).x<e.x-1||t.y<e.y-1||t.x>e.x+e.w+2||t.y>e.y+e.h+2)},intersects:function(t){var e,n,i,r=this._points(),a=t._points(),o=[ci(r[0],r[1]),ci(r[0],r[3])];for(this._rotation!==t._rotation&&o.push(ci(a[0],a[1]),ci(a[0],a[3])),e=0;e<o.length;++e)if(n=cn(r,o[e]),i=cn(a,o[e]),n.max<i.min||i.max<n.min)return!1;return!0},_points:function(){var t=this._rect,e=this._rotation,n=this.center();return[ce({x:t.x,y:t.y},n,e),ce({x:t.x+t.w,y:t.y},n,e),ce({x:t.x+t.w,y:t.y+t.h},n,e),ce({x:t.x,y:t.y+t.h},n,e)]}});var co={prepare:function(t){var e,n,i,r,a,o=[];for(e=0,i=t.length;e<i;++e)for(n=0,r=t[e].length;n<r;++n)a=t[e][n],o.push(a),a.$layout={_box:new cr,_hidable:!1,_visible:!0,_set:e,_idx:a._index};return o.sort(function(t,e){var n=t.$layout,i=e.$layout;return n._idx===i._idx?i._set-n._set:i._idx-n._idx}),this.update(o),o},update:function(t){var e,n,i,r,a,o=!1;for(e=0,n=t.length;e<n;++e)r=(i=t[e]).model(),(a=i.$layout)._hidable=r&&"auto"===r.display,a._visible=i.visible(),o|=a._hidable;o&&!function(t){var e,n,i,r,a,o,s;for(e=0,n=t.length;e<n;++e)(r=(i=t[e]).$layout)._visible&&(s=new Proxy(i._el,{get:(t,e)=>t.getProps([e],!0)[e]}),a=i.geometry(),o=ca(s,i.model(),a),r._box.update(o,a,i.rotation()));(function(t,e){var n,i,r,a;for(n=t.length-1;n>=0;--n)for(r=t[n].$layout,i=n-1;i>=0&&r._visible;--i)(a=t[i].$layout)._visible&&r._box.intersects(a._box)&&e(r,a);})(t,function(t,e){var n=t._hidable,i=e._hidable;n&&i||i?e._visible=!1:n&&(t._visible=!1)})}(t)},lookup:function(t,e){var n,i;for(n=t.length-1;n>=0;--n)if((i=t[n].$layout)&&i._visible&&i._box.contains(e))return t[n];return null},draw:function(t,e){var n,i,r,a,o,s;for(n=0,i=e.length;n<i;++n)(a=(r=e[n]).$layout)._visible&&(o=r.geometry(),s=ca(r._el,r.model(),o),a._box.update(s,o,r.rotation()),r.draw(t,s))}},cs="$datalabels",cl="$default";function cc(t,e,n,i){if(!e)return;var r,a=n.$context,o=n.$groups;if(!!e[o._set]&&!!(r=e[o._set][o._key]))!0===rf(r,[a,i])&&(t[cs]._dirty=!0,n.update(a))}var cu={id:"datalabels",defaults:{align:"center",anchor:"center",backgroundColor:null,borderColor:null,borderRadius:0,borderWidth:0,clamp:!1,clip:!1,color:void 0,display:!0,font:{family:void 0,lineHeight:1.2,size:void 0,style:void 0,weight:null},formatter:function(t){if(ra(t))return null;var e,n,i,r=t;if(rs(t)){if(ra(t.label)){if(ra(t.r))for(i=0,r="",n=(e=Object.keys(t)).length;i<n;++i)r+=(0!==i?", ":"")+e[i]+": "+t[e[i]];else r=t.r}else r=t.label}return""+r},labels:void 0,listeners:{},offset:4,opacity:1,padding:{top:4,right:4,bottom:4,left:4},rotation:0,textAlign:"start",textStrokeColor:void 0,textStrokeWidth:0,textShadowBlur:0,textShadowColor:void 0},beforeInit:function(t){t[cs]={_actives:[]}},beforeUpdate:function(t){var e=t[cs];e._listened=!1,e._listeners={},e._datasets=[],e._labels=[]},afterDatasetUpdate:function(t,e,n){var i,r,a,o,s,l,c,u,h,d,f,p,g,m,v,y=e.index,b=t[cs],x=b._datasets[y]=[],w=t.isDatasetVisible(y),_=t.data.datasets[y];var k=(i=_,r=n,s=i.datalabels,l={},c=[],!1===s?null:(!0===s&&(s={}),o=Object.keys(a=(r=rb({},[r,s])).labels||{}),delete r.labels,o.length?o.forEach(function(t){a[t]&&c.push(rb({},[r,a[t],{_key:t}]))}):c.push(r),l=c.reduce(function(t,e){return rp(e.listeners||{},function(n,i){t[i]=t[i]||{},t[i][e._key||cl]=n}),delete e.listeners,t},{}),{labels:c,listeners:l})),S=e.meta.data||[],C=t.ctx;for(C.save(),u=0,d=S.length;u<d;++u)if((m=S[u])[cs]=[],w&&m&&t.getDataVisibility(u)&&!m.skip)for(h=0,f=k.labels.length;h<f;++h)g=(p=k.labels[h])._key,(v=new l9(p,C,m,u)).$groups={_set:y,_key:g||cl},v.$context={active:!1,chart:t,dataIndex:u,dataset:_,datasetIndex:y},v.update(v.$context),m[cs].push(v),x.push(v);C.restore(),rb(b._listeners,k.listeners,{merger:function(t,n,i){n[t]=n[t]||{},n[t][e.index]=i[t],b._listened=!0}})},afterUpdate:function(t){t[cs]._labels=co.prepare(t[cs]._datasets)},afterDatasetsDraw:function(t){co.draw(t,t[cs]._labels)},beforeEvent:function(t,e){if(t[cs]._listened){var n,i,r,a,o,s=e.event;switch(s.type){case"mousemove":case"mouseout":!function(t,e){var n,i,r=t[cs],a=r._listeners;if(!!a.enter||!!a.leave){if("mousemove"===e.type)i=co.lookup(r._labels,e);else if("mouseout"!==e.type)return;n=r._hovered,r._hovered=i,!function(t,e,n,i,r){var a,o;if(!!n||!!i)n?i?n!==i&&(o=a=!0):o=!0:a=!0,o&&cc(t,e.leave,n,r),a&&cc(t,e.enter,i,r)}(t,a,n,i,e)}}(t,s);break;case"click":;n=t,i=s,(o=(a=(r=n[cs])._listeners.click)&&co.lookup(r._labels,i))&&cc(n,a,o,i)}}},afterEvent:function(t){var e,n,i,r,a,o,s,l=t[cs],c=l._actives,u=l._actives=t.getActiveElements(),h=l2.arrayDiff(c,u);for(e=0,n=h.length;e<n;++e)if((a=h[e])[1])for(i=0,r=(s=a[0].element[cs]||[]).length;i<r;++i)(o=s[i]).$context.active=1===a[1],o.update(o.$context);(l._dirty||h.length)&&(co.update(l._labels),t.render()),delete l._dirty}};function ch(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable}))),i.forEach(function(e){var i,r,a;i=t,r=e,a=n[e],r in i?Object.defineProperty(i,r,{value:a,enumerable:!0,configurable:!0,writable:!0}):i[r]=a})}return t}function cd(t,e){return e=null!=e?e:{},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):(function(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);n.push.apply(n,i)}return n})(Object(e)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))}),t}sY.register(class t extends oN{static id="pie";static defaults={cutout:0,rotation:0,circumference:360,radius:"100%"}},sK);var cf={first:["rgb(255, 149, 45)","rgb(255, 255, 98)"],second:["rgb(249, 0, 254)","rgb(255, 108, 108)"],third:["rgb(186, 0, 255)","rgb(115, 8, 165)"],fourth:["rgb(254, 206, 81)","rgb(255, 77, 0)"],fifth:["rgb(0, 255, 0)","rgb(44, 150, 44)"],sixth:["rgb(112, 237, 222)","rgb(62, 137, 213)"],seventh:["rgb(250, 144, 146)","rgb(226, 38, 38)"]},cp=null,cg=null,cm=new Map;sY.register(class t extends oT{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,n,i){return oP(t,e,n,i)}parseArrayData(t,e,n,i){return oP(t,e,n,i)}parseObjectData(t,e,n,i){let r,a,o,s;let{iScale:l,vScale:c}=t,{xAxisKey:u="x",yAxisKey:h="y"}=this._parsing,d="x"===l.axis?u:h,f="x"===c.axis?u:h,p=[];for(r=n,a=n+i;r<a;++r)s=e[r],(o={})[l.axis]=l.parse(rk(s,d),r),p.push(oO(rk(s,f),o,c,r));return p}updateRangeFromParsed(t,e,n,i){super.updateRangeFromParsed(t,e,n,i);let r=n._custom;r&&e===this._cachedMeta.vScale&&(t.min=Math.min(t.min,r.min),t.max=Math.max(t.max,r.max))}getMaxOverflow(){return 0}getLabelAndValue(t){let{iScale:e,vScale:n}=this._cachedMeta,i=this.getParsed(t),r=i._custom,a=oD(r)?"["+r.start+", "+r.end+"]":""+n.getLabelForValue(i[n.axis]);return{label:""+e.getLabelForValue(i[e.axis]),value:a}}initialize(){this.enableOptionSharing=!0,super.initialize(),this._cachedMeta.stack=this.getDataset().stack}update(t){let e=this._cachedMeta;this.updateElements(e.data,0,e.data.length,t)}updateElements(t,e,n,i){let r="reset"===i,{index:a,_cachedMeta:{vScale:o}}=this,s=o.getBasePixel(),l=o.isHorizontal(),c=this._getRuler(),{sharedOptions:u,includeOptions:h}=this._getSharedOptions(e,i);for(let d=e;d<e+n;d++){let e=this.getParsed(d),n=r||ra(e[o.axis])?{base:s,head:s}:this._calculateBarValuePixels(d),f=this._calculateBarIndexPixels(d,c),p=(e._stacks||{})[o.axis],g={horizontal:l,base:n.base,enableBorderRadius:!p||oD(e._custom)||a===p._top||a===p._bottom,x:l?n.head:f.center,y:l?f.center:n.head,height:l?f.size:Math.abs(n.size),width:l?Math.abs(n.size):f.size};h&&(g.options=u||this.resolveDataElementOptions(d,t[d].active?"active":i));let m=g.options||t[d].options;!function(t,e,n,i){var r;let a,o,s,l,c,u=e.borderSkipped,h={};if(!u){t.borderSkipped=h;return}if(!0===u){t.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}let{start:d,end:f,reverse:p,top:g,bottom:m}=((r=t).horizontal?(a=r.base>r.x,o="left",s="right"):(a=r.base<r.y,o="bottom",s="top"),a?(l="end",c="start"):(l="start",c="end"),{start:o,end:s,reverse:a,top:l,bottom:c});"middle"===u&&n&&(t.enableBorderRadius=!0,(n._top||0)===i?u=g:(n._bottom||0)===i?u=m:(h[oI(m,d,f,p)]=!0,u=g)),h[oI(u,d,f,p)]=!0,t.borderSkipped=h}(g,m,p,a),!function(t,{inflateAmount:e},n){t.inflateAmount="auto"===e?1===n?.33:0:e}(g,m,c.ratio),this.updateElement(t[d],d,g,i)}}_getStacks(t,e){let{iScale:n}=this._cachedMeta,i=n.getMatchingVisibleMetas(this._type).filter(t=>t.controller.options.grouped),r=n.options.stacked,a=[],o=this._cachedMeta.controller.getParsed(e),s=o&&o[n.axis],l=t=>{let e=t._parsed.find(t=>t[n.axis]===s),i=e&&e[t.vScale.axis];if(ra(i)||isNaN(i))return!0};for(let n of i){if(!(void 0!==e&&l(n))){if((!1===r||-1===a.indexOf(n.stack)||void 0===r&&void 0===n.stack)&&a.push(n.stack),n.index===t)break}}return!a.length&&a.push(void 0),a}_getStackCount(t){return this._getStacks(void 0,t).length}_getStackIndex(t,e,n){let i=this._getStacks(t,n),r=void 0!==e?i.indexOf(e):-1;return -1===r?i.length-1:r}_getRuler(){let t,e;let n=this.options,i=this._cachedMeta,r=i.iScale,a=[];for(t=0,e=i.data.length;t<e;++t)a.push(r.getPixelForValue(this.getParsed(t)[r.axis],t));let o=n.barThickness;return{min:o||function(t){let e,n,i,r;let a=t.iScale,o=function(t,e){if(!t._cache.$bar){let n=t.getMatchingVisibleMetas(e),i=[];for(let e=0,r=n.length;e<r;e++)i=i.concat(n[e].controller.getAllParsedValues(t));t._cache.$bar=r3(i.sort((t,e)=>t-e))}return t._cache.$bar}(a,t.type),s=a._length,l=()=>{if(32767!==i&&-32768!==i)rC(r)&&(s=Math.min(s,Math.abs(i-r)||s)),r=i};for(e=0,n=o.length;e<n;++e)i=a.getPixelForValue(o[e]),l();for(e=0,r=void 0,n=a.ticks.length;e<n;++e)i=a.getPixelForTick(e),l();return s}(i),pixels:a,start:r._startPixel,end:r._endPixel,stackCount:this._getStackCount(),scale:r,grouped:n.grouped,ratio:o?1:n.categoryPercentage*n.barPercentage}}_calculateBarValuePixels(t){let e,n;let{_cachedMeta:{vScale:i,_stacked:r,index:a},options:{base:o,minBarLength:s}}=this,l=o||0,c=this.getParsed(t),u=c._custom,h=oD(u),d=c[i.axis],f=0,p=r?this.applyStack(i,c,r):d;p!==d&&(f=p-d,p=d),h&&(d=u.barStart,p=u.barEnd-u.barStart,0!==d&&rN(d)!==rN(u.barEnd)&&(f=0),f+=d);let g=ra(o)||h?f:o,m=i.getPixelForValue(g);if(Math.abs(n=(e=this.chart.getDataVisibility(t)?i.getPixelForValue(f+p):m)-m)<s){var v,y,b;n=(v=n,y=i,b=l,(0!==v?rN(v):(y.isHorizontal()?1:-1)*(y.min>=b?1:-1))*s),d===l&&(m-=n/2);let t=i.getPixelForDecimal(0),o=i.getPixelForDecimal(1),u=Math.min(t,o);e=(m=Math.max(Math.min(m,Math.max(t,o)),u))+n,r&&!h&&(c._stacks[i.axis]._visualValues[a]=i.getValueForPixel(e)-i.getValueForPixel(m))}if(m===i.getPixelForValue(l)){let t=rN(n)*i.getLineWidthForValue(l)/2;m+=t,n-=t}return{size:n,base:m,head:e,center:e+n/2}}_calculateBarIndexPixels(t,e){let n,i;let r=e.scale,a=this.options,o=a.skipNull,s=ru(a.maxBarThickness,1/0);if(e.grouped){let r=o?this._getStackCount(t):e.stackCount,l="flex"===a.barThickness?function(t,e,n,i){let r=e.pixels,a=r[t],o=t>0?r[t-1]:null,s=t<r.length-1?r[t+1]:null,l=n.categoryPercentage;null===o&&(o=a-(null===s?e.end-e.start:s-a)),null===s&&(s=a+a-o);let c=a-(a-Math.min(o,s))/2*l;return{chunk:Math.abs(s-o)/2*l/i,ratio:n.barPercentage,start:c}}(t,e,a,r):function(t,e,n,i){let r,a;let o=n.barThickness;return ra(o)?(r=e.min*n.categoryPercentage,a=n.barPercentage):(r=o*i,a=1),{chunk:r/i,ratio:a,start:e.pixels[t]-r/2}}(t,e,a,r),c=this._getStackIndex(this.index,this._cachedMeta.stack,o?t:void 0);n=l.start+l.chunk*c+l.chunk/2,i=Math.min(s,l.chunk*l.ratio)}else n=r.getPixelForValue(this.getParsed(t)[r.axis],t),i=Math.min(s,e.min*e.ratio);return{base:n-i/2,head:n+i/2,center:n,size:i}}draw(){let t=this._cachedMeta,e=t.vScale,n=t.data,i=n.length,r=0;for(;r<i;++r)null!==this.getParsed(r)[e.axis]&&!n[r].hidden&&n[r].draw(this._ctx)}},li,class t extends sw{static id="category";static defaults={ticks:{callback:lP}};constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){let e=this._addedLabels;if(e.length){let t=this.getLabels();for(let{index:n,label:i}of e)t[n]===i&&t.splice(n,1);this._addedLabels=[]}super.init(t)}parse(t,e){if(ra(t))return null;let n=this.getLabels();return lO(e=isFinite(e)&&n[e]===t?e:function(t,e,n,i){let r=t.indexOf(e);return -1===r?lT(t,e,n,i):r!==t.lastIndexOf(e)?n:r}(n,t,ru(e,t),this._addedLabels),n.length-1)}determineDataLimits(){let{minDefined:t,maxDefined:e}=this.getUserBounds(),{min:n,max:i}=this.getMinMax(!0);"ticks"===this.options.bounds&&(!t&&(n=0),!e&&(i=this.getLabels().length-1)),this.min=n,this.max=i}buildTicks(){let t=this.min,e=this.max,n=this.options.offset,i=[],r=this.getLabels();r=0===t&&e===r.length-1?r:r.slice(t,e+1),this._valueRange=Math.max(r.length-(n?0:1),1),this._startValue=this.min-(n?.5:0);for(let n=t;n<=e;n++)i.push({value:n});return i}getLabelForValue(t){return lP.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){let 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}},lj);window.app=Object.assign({},window.app,{LOADER_HTML:'\n<div class="loader_overlay">\n  <div class="loader">\n    <div class="item"></div>\n    <div class="item"></div>\n    <div class="item"></div>\n    <div class="item"></div>\n  </div>\n</div>\n',changeHash:N,closeModal:H,WScasino:tk,fullscreenElement:".game_wrap",gameFrame:"#game-iframe",fullScreen:tD,fullScreenCancel:tI,showNoMoneyModal:tN,registerExitLobbyModal:function(){var t=1;tj.on("click","a",function(e){var n=h()(this);if(t>0){if(n.is(".no_exit"))return;(n.is(".show_exit_lobby_modal")||n.is('[href^="/"]')&&!(n.is('[href*="/game/"]')||n.is('[href*="/games/"]')||n.is('[href$="/logout"]')))&&(t--,function(t){for(var e=h()("#exit-lobby-modal_link, .exit-lobby-modal_link"),n=0;n<e.length;n++){var i=e.eq(n),r=null;try{r=i.attr("data-cooldown"),r=JSON.parse(r)||{}}catch(t){r={}}if(!T.has(r))return T.trigger(r),i.attr("data-method","post").attr("data-fields",JSON.stringify({url:t})).click(),!0}return!1}(n.attr("href"))&&e.preventDefault())}})},scrollBanners:function(){var t=h()("#header_banners"),e=h()(".js-header-mobile");setTimeout(function(){var n=0;t.is(":visible")&&(n+=t.height(),e&&("none"===e.css("display")||"fixed"!==e.css("position"))&&(n+=t.offset().top)),ex(n,{elementToScroll:document.querySelector("html")})},0)},DragSlider2:eI,switchTabs:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:["active"],i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:["active"],r="string"==typeof t?document.querySelector(t):t;if(r){if(r.hasAttribute("switch-tabs")){console.info("SwitchTabs is active:",t,r);return}}else{console.info("SwitchTabs container undefind:",t,r);return}r.classList.add("switch_tabs"),r.setAttribute("switch-tabs","active");var a=r.querySelectorAll(".s-tab"),o=r.querySelectorAll(".s-content"),s=h(a,r),l=h(o,r),c=r.querySelectorAll(".s-toggle");function u(t){if(t.classList.contains("s-tab-reset")){s.forEach(function(t){return(u=t.classList).remove.apply(u,iu(n))}),l.forEach(function(t){return(h=t.classList).remove.apply(h,iu(i))});return}s.forEach(function(t){return(o=t.classList).remove.apply(o,iu(n))}),(c=t.classList).add.apply(c,iu(n));var e=!0,r=!1,a=void 0;try{for(var o,c,u,h,d,f=l[Symbol.iterator]();!(e=(d=f.next()).done);e=!0){var p,g,m=d.value;(p=m.classList).remove.apply(p,iu(i)),t.dataset.stab===m.dataset.scontent&&((g=m.classList).add.apply(g,iu(i)),!function(t,e){var n=t.href?t.href:t.dataset.href,i=t.dataset.nocashe;if(!(!n||!i&&e.classList.contains("loaded")))e.classList.contains("ajax-load")&&(e.innerHTML="",$(e).addLoader(),$.ajax({url:n}).done(function(t){var n=tK(t).content;e.innerHTML="",e.append(n),e.classList.add("ajax-done"),$(document).trigger("content:loaded")}).fail(function(){e.innerHTML="",e.insertAdjacentHTML("afterbegin",'<div class="empty_content">-</div>'),e.classList.add("ajax-error")}).always(function(){e.classList.add("loaded")}))}(t,m))}}catch(t){r=!0,a=t}finally{try{!e&&null!=f.return&&f.return()}finally{if(r)throw a}}}function h(t,e){return iu(t).filter(function(t){return t.closest(".switch_tabs").id==e.id})}e>=0&&u(s[e]),s.forEach(function(t){return t.addEventListener("click",function(e){e.target.closest("[href]")&&P(e),u(t)})});var d=!0,f=!1,p=void 0;try{for(var g,m=c[Symbol.iterator]();!(d=(g=m.next()).done);d=!0)!function(){var t=g.value,e=iu(s).map(function(t){return t.dataset.stab}),i=t.dataset.stoggle.split("-"),r=i.map(function(t,n){return s[e.indexOf(i[n])]}),a=function(e){var i;t.dataset.active=e,(i=t.classList).toggle.apply(i,iu(n).concat([1==e]))},o=new MutationObserver(function(t){var e=t[t.length-1].target,n=i.indexOf(e.dataset.stab);a(n)}),l=!0,c=!1,h=void 0;try{for(var d,f=r[Symbol.iterator]();!(l=(d=f.next()).done);l=!0){var p=d.value;o.observe(p,{attributes:!0})}}catch(t){c=!0,h=t}finally{try{!l&&null!=f.return&&f.return()}finally{if(c)throw h}}t.addEventListener("click",function(t){var e=0==t.target.dataset.active?1:0;u(r[e])}),t.dataset.active="0"}()}catch(t){f=!0,p=t}finally{try{!d&&null!=m.return&&m.return()}finally{if(f)throw p}}!function(t,e){var n="tabs-auto-play-interval";if(t.hasAttribute(n)&&!(e.length<=1)){var i=t.getAttribute(n)||20,r=setInterval(a,1e3*i);t.addEventListener("mouseover",function(t){clearTimeout(r)}),t.addEventListener("mouseleave",function(t){clearTimeout(r),r=setInterval(a,1e3*i)})}function a(){var t=e.findIndex(function(t){return t.classList.contains("active")});++t>=e.length&&(t=0),e[t].click()}}(r,s)},checkSocialTerms:function(){var t=h()(".modal_signup"),e=t.find("[data-scontent='social'] .help-block"),n=t.find("[data-scontent='social'] input[type='checkbox']"),i=t.find("[data-scontent='social'] .reg-links a"),r=function(t){t.preventDefault(),e.addClass("show")};!1==n.is(":checked")&&i.on("click",r),n.on("click",function(){n.is(":checked")?(i.off("click",r),e.removeClass("show")):(e.addClass("show"),i.on("click",r))})},tableAddRow:function(t){if(!!t)t.addEventListener("click",function(t){var i,r,a,o,s,l,c,u,h=e(t.target);if(t.target.closest("[data-row-add]")){if(h.row.classList.contains("parent_row"))n(h);else{;a=(i=h).column||i.row.querySelectorAll("td").length,o=document.createElement("tr"),s=i.add.getAttribute("data-row-add-class"),l=document.createElement("td"),c=i.add.getAttribute("data-row-add"),s=s?s.split(" "):[],(r=o.classList).add.apply(r,["new_row"].concat(function(t){if(Array.isArray(t))return ih(t)}(u=s)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(u)||function(t,e){if(t){if("string"==typeof t)return ih(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if("Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ih(t,e)}}(u)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())),o.append(l),l.setAttribute("colspan",a),l.innerHTML=c,i.row.classList.add("parent_row"),c.length&&i.row.after(o)}}if(t.target.closest("[data-row-remove]"))n(e(h.row.previousElementSibling))});function e(t){return{row:t.closest("tr"),add:t.closest("[data-row-add]"),rm:t.closest("[data-row-remove]"),column:t.getAttribute("data-row-colspan")}}function n(t){var e=t.row.nextElementSibling;e&&e.classList.contains("new_row")&&e.remove(),t.row.classList.remove("parent_row")}},imageView:function(t){var e=document.querySelector(t),n=document.querySelector("body");if(!!e)e.addEventListener("click",function(t){var i,r,a,o,s,l=t.target;if(l.closest("[data-src-image]")){;i=l.getAttribute("data-src-image"),r=document.createElement("div"),a=document.createElement("i"),o=document.createElement("div"),r.classList.add("pv-wrap"),a.classList.add("pv-close","icon","icon-close"),o.classList.add("pv-content"),r.append(o),o.innerHTML=i,o.append(a),e.append(r),setTimeout(function(){n.classList.add("overflow-hidden"),r.classList.add("animate")},300)}else{;(s=document.querySelector(".pv-wrap"))&&(s.classList.remove("animate"),setTimeout(function(){s.remove(),n.classList.remove("overflow-hidden")},300))}})},showPassword:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable}))),i.forEach(function(e){var i,r,a;i=t,r=e,a=n[e],r in i?Object.defineProperty(i,r,{value:a,enumerable:!0,configurable:!0,writable:!0}):i[r]=a})}return t}({},{container:".group-name-password",toggleClass:"toggle-password",openedIcon:"icon-eye",hiddenIcon:"icon-eye-o"},t),n=e.container;function i(t){t.forEach(function(t){var n=t.querySelector("input"),i=document.createElement("div");i.className="".concat(e.toggleClass," empty-password"),i.innerHTML='<i class="icon '.concat(e.openedIcon,' visible_icon"></i><i class="icon ').concat(e.hiddenIcon,' hidden_icon"></i>'),t.append(i),i.addEventListener("click",function(){"text"===n.getAttribute("type")?(t.classList.remove("show_password"),i.classList.remove("visible"),n.setAttribute("type","password")):(t.classList.add("show_password"),i.classList.add("visible"),n.setAttribute("type","text"))}),n.addEventListener("input",function(){""!==n.value?i.classList.remove("empty-password"):i.classList.add("empty-password")})})}Array.isArray(n)?n.forEach(function(t){i("string"==typeof t?et(document.querySelectorAll(t)):t)}):i("string"==typeof n?et(document.querySelectorAll(n)):n)},toggleClassParent:function(t,e,n){im(t).forEach(function(t){t.addEventListener("click",function(t){t.stopPropagation();var i=[];i.push(t.currentTarget,t.target.closest(n)),iv(e,i)})})},toggleClasses:iv,inputFilesList:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:".files_list",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=n.itemTemplate,r=n.customDeleteLabel,a=void 0===r?"X":r,o=n.addFilesOption,s=void 0!==o&&o,l="string"==typeof t?document.querySelector(t):t;if(!l){console.error("inputFilesList: не знайдено input:",t);return}var c=new DataTransfer,u=document.querySelector(e);if(!u){console.error("inputFilesList: не знайдено контейнер списку файлів:",e);return}i=i||u.dataset.itemTemplate||'\n    <div class="item file">\n        <span class="name">{name}</span>\n        <span class="file-delete">{deleteLabel}</span>\n    </div>';var d=["image/jpg","image/jpeg","image/png","image/bmp","application/pdf"];function f(t){var e=[],n=!0,i=!1,r=void 0;try{for(var a,o=t[Symbol.iterator]();!(n=(a=o.next()).done);n=!0){var s=a.value;d.includes(s.type)?e.push(s):console.warn("Файл ".concat(s.name," пропущено: недозволений тип (").concat(s.type,")"))}}catch(t){i=!0,r=t}finally{try{!n&&null!=o.return&&o.return()}finally{if(i)throw r}}return e}function p(t){var e=new Set(t);u.textContent="",u.classList.toggle("has-files",e.size>0);var n=!0,r=!1,o=void 0;try{for(var s,h=e[Symbol.iterator]();!(n=(s=h.next()).done);n=!0)!function(){var t=s.value.name,e=i.replace("{name}",t).replace("{deleteLabel}",a);u.insertAdjacentHTML("beforeend",e),u.lastElementChild.addEventListener("click",function(e){e.target.closest(".file-delete")&&function(t){for(var e=new DataTransfer,n=0;n<c.files.length;n++){var i=c.files[n];i.name!==t&&e.items.add(i)}c=e,l.files=c.files,p(c.files),m()}(t)})}()}catch(t){r=!0,o=t}finally{try{!n&&null!=h.return&&h.return()}finally{if(r)throw o}}}function g(t,e){var n;return!((function(t){if(Array.isArray(t))return iw(t)})(n=t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(n)||function(t,e){if(t){if("string"==typeof t)return iw(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if("Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return iw(t,e)}}(n)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).some(function(t){return t.name===e})}l.addEventListener("change",function(t){var e=f(l.files);if(s){var n=!0,i=!1,r=void 0;try{for(var a,o=e[Symbol.iterator]();!(n=(a=o.next()).done);n=!0){var u=a.value;g(c.files,u.name)&&c.items.add(u)}}catch(t){i=!0,r=t}finally{try{!n&&null!=o.return&&o.return()}finally{if(i)throw r}}l.files=c.files}else{var h=new DataTransfer;e.forEach(function(t){return h.items.add(t)}),l.files=h.files}p(l.files),m()});function m(){var t=h()(l).closest("form"),e=l.id;t.length&&e&&t.data("yiiActiveForm")&&t.yiiActiveForm("validateAttribute",e)}var v=document.getElementById("file-drop-area");v&&(v.addEventListener("dragover",function(t){t.preventDefault(),v.classList.add("dragover")}),v.addEventListener("dragleave",function(){v.classList.remove("dragover")}),v.addEventListener("drop",function(t){t.preventDefault(),v.classList.remove("dragover");var e=f(t.dataTransfer.files);if(s){var n=!0,i=!1,r=void 0;try{for(var a,o=e[Symbol.iterator]();!(n=(a=o.next()).done);n=!0){var u=a.value;g(c.files,u.name)&&c.items.add(u)}}catch(t){i=!0,r=t}finally{try{!n&&null!=o.return&&o.return()}finally{if(i)throw r}}l.files=c.files}else{var d=new DataTransfer;e.forEach(function(t){return d.items.add(t)}),l.files=d.files}p(l.files),h()(l).trigger("change"),m()}))},buttonGoTop:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"scrollUp",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=document.getElementById(t);function i(){window.scrollY>0?n.classList.add("active"):n.classList.remove("active")}i(),n.addEventListener("click",function(){ix(e)}),document.addEventListener("scroll",function(t){window.requestAnimationFrame(i)})},copyDataToClipboard:function(t){return en.apply(this,arguments)},copyHintToggle:function(t,e,n){var i=Object.assign({},{text:void 0,class:"success",time:0,triggerItem:""},e),r="string"==typeof t?document.querySelector(t):t;r&&(i.text&&(r.innerHTML=i.text),r.classList.add(i.class),n&&(n="string"==typeof n?document.querySelector(n):n).classList.add(i.class),i.time&&(r.timeoutId&&clearTimeout(r.timeoutId),r.timeoutId=setTimeout(function(){r.classList.remove(i.class),i.text&&(r.innerHTML=""),n&&n.classList.remove(i.class),r.timeoutId=null},1e3*Number(i.time))))},NewPaymentGallery:iM,depositChoice:function(t,e,n){var i=ik(t);if(i){var r=i.id.split("_")[2],a={defaultInputs:i.querySelectorAll("[data-pm-default-input]"),customCheckbox:i.querySelector("#pm_".concat(r,"_custom_checkbox")),customInput:i.querySelector("#pm_".concat(r,"_custom_amount")),valuePointers:i.querySelectorAll("[data-deposit-value]")};a.customCheckbox.hasAttribute("checked")?x(a.customInput.value):iL(a.defaultInputs).forEach(function(t){t.hasAttribute("checked")&&x(t.value)});for(var o=0,s=["input","click"];o<s.length;o++){var l=s[o];a.customInput.addEventListener(l,function(t){x(t.target.value)})}if(iL(a.defaultInputs).forEach(function(t){t.addEventListener("input",function(t){x(t.target.value)})}),e){var c,u,d=function(t){if(t.querySelector("[data-pm-default-input]").checked){var e=t.querySelector("[data-bonus-summary-wrap]");e&&iS(e,p.summaryWrap)}},f=function(t,e){for(var i in t.classList.add("ajax_loading"),e.ajaxLoadingToggleClass){var r=t.querySelector(i);r&&r.classList.add(e.ajaxLoadingToggleClass[i])}c&&c.abort(),c=h().ajax({url:e.url,method:"post",data:e}).fail(function(t,e){"abort"!==e&&(u='<div class="empty_content">-</div>'),n&&console.log("fail",e)}).done(function(t){u=t.text,b(t.amountBonus),h()(document).trigger("content:loaded"),n&&console.log("done",u)}).always(function(i,r){var a=tZ(e.htmlContainer.replace("{content}",u)).content;if(iS(a,p.summaryWrap),i_(p.customInput.id,a),"abort"!==r)for(var o in t.classList.remove("ajax_loading"),e.ajaxLoadingToggleClass){var s=t.querySelector(o);s&&s.classList.remove(e.ajaxLoadingToggleClass[o])}n&&console.log("finish",r)})},p={formContainer:i.closest(".payment_form"),variants:i.querySelectorAll("[data-bonus-variant-wrap]"),submitWrap:i.querySelector("[data-bonus-submit-wrap]"),customInput:a.customInput,get summaryWrap(){return this.submitWrap.querySelector("[data-bonus-summary-wrap]")}};if(p.customInput.classList.contains("checked")){var g=JSON.parse(p.customInput.dataset.params);g.amount=p.customInput.value,f(p.formContainer,g)}iL(p.variants).forEach(function(t){d(t)});for(var m=0,v=["input","click"];m<v.length;m++){var y=v[m];p.customInput.addEventListener(y,function(t){var e=JSON.parse(t.target.dataset.params);e.amount=t.target.value,f(p.formContainer,e)}),i.addEventListener(y,function(t){t.target.closest("[data-bonus-info-button]")&&p.customInput.click()})}iL(p.variants).forEach(function(t){t.addEventListener("click",function(){d(t)})});var b=function(t){var e=i.querySelector("[data-bonus-value]");e&&(e.textContent=t)}}}function x(t){var e=parseInt(t);iL(a.valuePointers).forEach(function(t){return t.innerText=e||0})}},withdrawTipsChoice:function(t){var e=ik(t);if(e){for(var n=e.id.split("_")[2],i={amount:0,get input(){return e.querySelector("#pm_".concat(n,"_amount"))}},r={amount:0,variants:e.querySelectorAll("[data-tips-value]"),input:e.querySelector("[data-tips-input]"),resetButton:e.querySelector("[data-tips-reset]"),get summary(){return e.querySelector("[data-tips-summary]")},get summaryAmount(){return e.querySelector("[data-tips-summary-value]")},get info(){return e.querySelector("[data-tips-info]")},get infoAmount(){return e.querySelector("[data-tips-info-value]")}},a=0,o=["click","input"];a<o.length;a++)!function(t,e){var n,a=e[t];i.input.addEventListener(a,function(t){i.amount=s(i.input),c()}),((function(t){if(Array.isArray(t))return iE(t)})(n=r.variants)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(n)||function(t,e){if(t){if("string"==typeof t)return iE(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if("Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return iE(t,e)}}(n)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).forEach(function(t){t.addEventListener(a,function(t){r.amount=Number(t.target.dataset.tipsValue),l(r.amount),c()})}),r.input.addEventListener(a,function(t){r.amount=s(r.input),l(r.amount),c()})}(a,o);r.resetButton&&r.resetButton.addEventListener("click",function(){return function(){r.input.value=0,r.input.click(),l(0)}()})}function s(t){var e=parseInt(t.value);return e||0}function l(t){r.info&&(t>0?r.info.classList.remove("hiden"):r.info.classList.add("hiden"))}function c(){var t=i.amount+r.amount;r.summaryAmount&&(r.summaryAmount.textContent=t),r.infoAmount&&(r.infoAmount.textContent=r.amount)}},table_extend:function(t,e){var n=document.querySelector(t).querySelectorAll("tbody tr"),i=!0,r=!1,a=void 0;try{for(var o,s=n[Symbol.iterator]();!(i=(o=s.next()).done);i=!0)!function(){var t=o.value;t.addEventListener("click",function(e){t.classList.toggle("row_expanded"),t.classList.contains("row_expanded")?t.style.height=t.scrollHeight+"px":t.style.removeProperty("height")})}()}catch(t){r=!0,a=t}finally{try{!i&&null!=s.return&&s.return()}finally{if(r)throw a}}window.addEventListener("resize",function(t){if(window.innerWidth>=e){var i=!0,r=!1,a=void 0;try{for(var o,s=n[Symbol.iterator]();!(i=(o=s.next()).done);i=!0){var l=o.value;l.classList.remove("row_expanded"),l.style.removeProperty("height")}}catch(t){r=!0,a=t}finally{try{!i&&null!=s.return&&s.return()}finally{if(r)throw a}}}})},fixedVh:function(){var t=window.visualViewport||!1,e=function(){var e=t?window.visualViewport.height:window.innerHeight;document.documentElement.style.setProperty("--vh","".concat(.01*e,"px"))};e(),t?window.visualViewport.addEventListener("resize",function(){window.requestAnimationFrame(e)}):window.addEventListener("resize",function(){window.requestAnimationFrame(e)})},floatPanel:function(t){var e,n,i=document.querySelector(t),r=i.offsetHeight,a=function(){e=i.getBoundingClientRect().top+window.scrollY},o=function(){var t=window.scrollY;if(window.innerWidth<=576){if(t<=e-25&&i.classList.remove("visible","hidden"),t>e+r){var a=t>n;i.classList.toggle("hidden",a),i.classList.toggle("visible",!a)}n=t}else(i.classList.contains("visible")||i.classList.contains("hidden"))&&i.classList.remove("visible","hidden")};window.addEventListener("load",a),a(),o(),window.addEventListener("scroll",function(){requestAnimationFrame(o)})},questionnaireForm:function(t,e){return iI.apply(this,arguments)},pieChart:function(t,e){var n;if(void 0!==e){var i=document.getElementById(t);if(!i)return;var r={datasets:[{data:e.data,borderWidth:0,borderRadius:0}]};new sY(i,{type:"pie",data:r,options:{responsive:!0,maintainAspectRatio:!1,layout:{padding:20},plugins:{datalabels:{color:"#FFFFFF",borderRadius:30,padding:function(t){return t.dataset.data[t.dataIndex]<100?{top:11,bottom:11,left:6,right:6}:{top:12,bottom:10,left:4,right:4}},anchor:"end",align:"start",offset:-15,formatter:function(t){return t<13?"":"".concat(t,"%")},backgroundColor:function(t){if(!(t.dataset.data[t.dataIndex]<13))return"#161A1F"},font:function(t){var e=t.dataset.data[t.dataIndex],n={weight:500,family:"Rubik"};return e<100?cd(ch({},n),{size:14}):cd(ch({},n),{size:12})}}},elements:{arc:{backgroundColor:function(t){var e=[cf.first[0],cf.second[0],cf.third[0],cf.fourth[0],cf.fifth[0],cf.sixth[0],cf.seventh[0]],n=[cf.first[1],cf.second[1],cf.third[1],cf.fourth[1],cf.fifth[1],cf.sixth[1],cf.seventh[1]],i=e[t.dataIndex],r=n[t.dataIndex];if(!!i||!!r){var a=ar(i).rgbString();return function(t,e,n,i){var r=t.chart.chartArea;if(!!r){var a=r.right-r.left,o=r.bottom-r.top;(cp!==a||cg!==o)&&cm.clear();var s=cm.get(e+n+i);if(!s){cp=a,cg=o;var l=(r.left+r.right)/2,c=(r.top+r.bottom)/2,u=Math.min((r.right-r.left)/2,(r.bottom-r.top)/2);(s=t.chart.ctx.createRadialGradient(l,c,0,l,c,u)).addColorStop(0,e),s.addColorStop(.1,n),s.addColorStop(1,i),cm.set(e+n+i,s)}return s}}(t,ar(i).rgbString(),a,ar(r).rgbString())}}}}},plugins:[cu]})}else{console.error("Chart error, data undefined");return}},barChart:function(t,e){var n;if(void 0!==e){var i=document.getElementById(t);if(!i)return;var r={labels:["","","","3","","","6","","","9","","","12","","","15","","","18","","","21","",""],datasets:[{data:e.data,backgroundColor:"#FFF500",minBarLength:3,categoryPercentage:1,barPercentage:1,borderWidth:1,borderRadius:4}]};n=new sY(i,{type:"bar",data:r,options:{responsive:!0,maintainAspectRatio:!1,scales:{x:{grid:{drawOnChartArea:!1,tickColor:"rgba(255, 255, 255, 0)"},border:{color:"rgba(255, 255, 255, 0.1)"},ticks:{color:"#FFFFFF",font:{size:12}}},y:{beginAtZero:!0,grid:{color:"rgba(255, 255, 255, 0.1)"},border:{display:!1},ticks:{color:"#FFFFFF",font:{size:12}}}}}}),document.addEventListener("visibilitychange",function(){"visible"===document.visibilityState&&n.update()})}else{console.error("Chart error, data undefined");return}},loadTimezoneHtml:function(t,e){if(!!t&&!!e){var n=document.getElementById(t),i=n.getAttribute("data-href");if(i){$(n).addLoader();var r,a,o,s="timezone=".concat(encodeURIComponent((o=Math.floor((a=Math.abs(r=new Date().getTimezoneOffset()))/60),"".concat(r<=0?"+":"-").concat(String(o).padStart(2,"0"),":").concat(String(a%60).padStart(2,"0")))));$.ajax({url:i,type:"GET",data:s,success:function(t){var i=tK(t,"#".concat(e));n.innerHTML="",n.append(i.content),$(document).trigger("content:loaded"),$(n).removeLoader(),ix(0)},error:function(t,e,n){console.error("Error:",n)}})}}},statisticsListScroll:function(t){var e=document.getElementById(t);if(!!e)e.addEventListener("click",function(){this.classList.contains("open")&&ix(this.closest(".activities_block_statistics"))})},persistUtms:function(t){var e=window._env&&window._env.brandId||"";localStorage.setItem(e+"::utms",JSON.stringify(t)),!localStorage.getItem(e+"::visitor")&&tg(document.location.href)},shareTelegram:function(t,e){var n="https://t.me/share/url?url=".concat(encodeURIComponent(t),"&text=").concat(encodeURIComponent(e));console.log(n),window.open(n,"_blank")},shareFacebook:function(t){var e="https://www.facebook.com/sharer/sharer.php?u=".concat(encodeURIComponent(t));window.open(e,"_blank","width=600,height=400")},shareWhatsApp:function(t,e){var n="https://wa.me/?text=".concat(encodeURIComponent(e),"%20").concat(encodeURIComponent(t));window.open(n,"_blank")},shareViber:function(t,e){var n="viber://forward?text=".concat(encodeURIComponent(t),"%20").concat(encodeURIComponent(e));console.log(n),window.open(n,"_blank")},shareNavigator:function(t,e,n){return eS.apply(this,arguments)},TranslucentSides:ef,inputWithControlButtons:function(t,e,n){var i=document.getElementById(t),r=document.getElementById(n),a=document.getElementById(e);if(!!i&&!!r&&!!a)i.addEventListener("input",function(t){this.value=this.value.replace(/[^0-9]/g,""),this.value.length>1&&"0"===this.value[0]&&(this.value=this.value.slice(1))}),i.addEventListener("paste",function(t){var e=(t.clipboardData||window.clipboardData).getData("text");if(!/^[0-9]*$/.test(e)){t.preventDefault();return}e.length>1&&"0"===e[0]?this.value=e.slice(1):this.value=e}),i.addEventListener("keydown",function(t){("+"===t.key||"-"===t.key)&&t.preventDefault()}),r.addEventListener("click",function(){i.stepUp(),""===i.value&&(i.value="0"),i.dispatchEvent(new Event("change"))}),a.addEventListener("click",function(){i.stepDown(),""===i.value&&(i.value="0"),i.dispatchEvent(new Event("change"))}),""===i.value&&(i.value="0")}});var cv=h()(document);function cy(){h()(".slick-slider").each(function(){if(!h()(this).is("#banners_slick"))h()(this).slick("refresh")})}cv.on("payments:open","#payment__gallery",function(t,e){var n=h()(this),i=h()(e),r=n.closest(".modal");r.animate({scrollTop:i.offset().top-r.offset().top+r.get(0).scrollTop-10},200)}),cv.on("pjax:send",function(t){h()(t.target).addLoader()}),cv.on("pjax:complete",function(t){h()(t.target).removeLoader()}),cv.on("click",".open_support_chat",function(t){t.preventDefault(),h()("body.menu_open").removeClass("menu_open")}),!(a=document.querySelector(app.fullscreenElement))||(a.addEventListener("fullscreenchange",function(t){document.fullscreenElement?a.classList.add("on_fs"):a.classList.remove("on_fs")}),h()("#full-screen-button").on("click",function(){tD()}),h()("#full-screen-off-button").on("click",function(){tI()})),h()(window).on("resize",cy),h()(document).on("click","#show_list_button",cy),_env.isMobile&&h()(window).on("hashchange",function(t){h()("body").removeClass("menu_open"),h()("#languages_bar").hide()}),cv.on("click",'body.sport [href*="popup"]',function(){ex(0,{elementToScroll:document.body,maxDuration:0})}),new tk("ws_main",_env.getSocketUrl,"dev"===_env.env?{debug:!0}:{});var cb=new tP("ws_main_io",_env.notificationUrl,"dev"===_env.env?{debug:!0}:{});"dev"===_env.env&&(window.ws_main_io=cb,window.setDebug=function(t){document.cookie="debug=".concat(t,"; path=/;"),console.log("\uD83D\uDCE6","debug set: ",t),console.log("\uD83D\uDCE6","page reload..."),setTimeout(function(t){document.location.reload()},1e3)}),s=new URL(o=null!=o?o:document.location),l=["promo","utm_campaign","utm_medium","utm_source","utm_term","utm_content"],s.search&l.some(function(t){return s.search.includes(t)})&&history.pushState({},null,s.origin+s.pathname+s.hash),!s.search&s.hash.split("?").length>1&&l.some(function(t){return s.hash.split("?")[1].includes(t)})&&history.pushState({},null,s.origin+s.pathname+s.hash.split("?")[0]),!function(){function t(){if(!localStorage.getItem("pwa_run_tracking")&&["standalone","fullscreen","minimal-ui"].some(function(t){return window.matchMedia("(display-mode: ".concat(t,")")).matches})){var t,e,n,i;i={event:"pwa_running",userId:(null===(e=window._env)||void 0===e?void 0:e.playerUUID)||"guest",client_id:((t=document.cookie.match(/(^|;\s*)_ga=([^;]+)/))?t[2]:null)||"undefined",device:(null===(n=window._env)||void 0===n?void 0:n.device)||"unknown"},window.dataLayer=window.dataLayer||[],window.dataLayer.push(i),localStorage.setItem("pwa_run_tracking","true")}}t(),["standalone","fullscreen","minimal-ui"].forEach(function(e){window.matchMedia("(display-mode: ".concat(e,")")).addEventListener("change",function(e){e.matches&&t()})})}()}()}();