PageSourceSearch

https://joinqatch.com/scripts.563bcddde258a8f7.js

js joinqatch.com collected 2026-09-28 05:49:41 UTC 393,187 bytes, 2 lines download raw bytes

1!function(o,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.AOS=t():(void 0).AOS=t()}(0,function(){return function(o){function t(i){if(e[i])return e[i].exports;var s=e[i]={exports:{},id:i,loaded:!1};return o[i].call(s.exports,s,s.exports,t),s.loaded=!0,s.exports}var e={};return t.m=o,t.c=e,t.p="dist/",t(0)}([function(o,t,e){"use strict";function i(q){return q&&q.__esModule?q:{default:q}}var s=Object.assign||function(q){for(var Z=1;Z<arguments.length;Z++){var at=arguments[Z];for(var nt in at)Object.prototype.hasOwnProperty.call(at,nt)&&(q[nt]=at[nt])}return q},n=(i(e(1)),e(6)),a=i(n),c=i(e(7)),d=i(e(8)),p=i(e(9)),y=i(e(10)),g=i(e(11)),L=i(e(14)),M=[],j=!1,H={offset:120,delay:0,easing:"ease",duration:400,disable:!1,once:!1,startEvent:"DOMContentLoaded",throttleDelay:99,debounceDelay:50,disableMutationObserver:!1},X=function(){if(arguments.length>0&&void 0!==arguments[0]&&arguments[0]&&(j=!0),j)return M=(0,g.default)(M,H),(0,y.default)(M,H.once),M},U=function(){M=(0,L.default)(),X()};o.exports={init:function(q){H=s(H,q),M=(0,L.default)();var Z=document.all&&!window.atob;return function(q){return!0===q||"mobile"===q&&p.default.mobile()||"phone"===q&&p.default.phone()||"tablet"===q&&p.default.tablet()||"function"==typeof q&&!0===q()}(H.disable)||Z?void M.forEach(function(q,Z){q.node.removeAttribute("data-aos"),q.node.removeAttribute("data-aos-easing"),q.node.removeAttribute("data-aos-duration"),q.node.removeAttribute("data-aos-delay")}):(H.disableMutationObserver||d.default.isSupported()||(console.info('\n      aos: MutationObserver is not supported on this browser,\n      code mutations observing has been disabled.\n      You may have to call "refreshHard()" by yourself.\n    '),H.disableMutationObserver=!0),document.querySelector("body").setAttribute("data-aos-easing",H.easing),document.querySelector("body").setAttribute("data-aos-duration",H.duration),document.querySelector("body").setAttribute("data-aos-delay",H.delay),"DOMContentLoaded"===H.startEvent&&["complete","interactive"].indexOf(document.readyState)>-1?X(!0):"load"===H.startEvent?window.addEventListener(H.startEvent,function(){X(!0)}):document.addEventListener(H.startEvent,function(){X(!0)}),window.addEventListener("resize",(0,c.default)(X,H.debounceDelay,!0)),window.addEventListener("orientationchange",(0,c.default)(X,H.debounceDelay,!0)),window.addEventListener("scroll",(0,a.default)(function(){(0,y.default)(M,H.once)},H.throttleDelay)),H.disableMutationObserver||d.default.ready("[data-aos]",U),M)},refresh:X,refreshHard:U}},function(o,t){},,,,,function(o,t){(function(e){"use strict";function r(C){var W=typeof C>"u"?"undefined":c(C);return!!C&&("object"==W||"function"==W)}function l(C){if("number"==typeof C)return C;if(function a(C){return"symbol"==(typeof C>"u"?"undefined":c(C))||function n(C){return!!C&&"object"==(typeof C>"u"?"undefined":c(C))}(C)&&H.call(C)==u}(C))return d;if(r(C)){var W="function"==typeof C.valueOf?C.valueOf():C;C=r(W)?W+"":W}if("string"!=typeof C)return 0===C?C:+C;C=C.replace(p,"");var q=y.test(C);return q||w.test(C)?g(C.slice(2),q?2:8):f.test(C)?d:+C}var c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(C){return typeof C}:function(C){return C&&"function"==typeof Symbol&&C.constructor===Symbol&&C!==Symbol.prototype?"symbol":typeof C},h="Expected a function",d=NaN,u="[object Symbol]",p=/^\s+|\s+$/g,f=/^[-+]0x[0-9a-f]+$/i,y=/^0b[01]+$/i,w=/^0o[0-7]+$/i,g=parseInt,_="object"==(typeof e>"u"?"undefined":c(e))&&e&&e.Object===Object&&e,L="object"==(typeof self>"u"?"undefined":c(self))&&self&&self.Object===Object&&self,M=_||L||Function("return this")(),H=Object.prototype.toString,X=Math.max,U=Math.min,A=function(){return M.Date.now()};o.exports=function s(C,W,q){var Z=!0,at=!0;if("function"!=typeof C)throw new TypeError(h);return r(q)&&(Z="leading"in q?!!q.leading:Z,at="trailing"in q?!!q.trailing:at),function i(C,W,q){function Z(S){var N=m,I=x;return m=x=void 0,z=S,B=C.apply(I,N)}function ct(S){var N=S-O;return void 0===O||N>=W||N<0||D&&S-z>=b}function pt(){var S=A();return ct(S)?st(S):void(E=setTimeout(pt,function nt(S){var V=W-(S-O);return D?U(V,b-(S-z)):V}(S)))}
1function st(S){return E=void 0,v&&m?Z(S):(m=x=void 0,B)}function P(){var S=A(),N=ct(S);if(m=arguments,x=this,O=S,N){if(void 0===E)return function at(S){return z=S,E=setTimeout(pt,W),F?Z(S):B}(O);if(D)return E=setTimeout(pt,W),Z(O)}return void 0===E&&(E=setTimeout(pt,W)),B}var m,x,b,B,E,O,z=0,F=!1,D=!1,v=!0;if("function"!=typeof C)throw new TypeError(h);return W=l(W)||0,r(q)&&(F=!!q.leading,b=(D="maxWait"in q)?X(l(q.maxWait)||0,W):b,v="trailing"in q?!!q.trailing:v),P.cancel=function J(){void 0!==E&&clearTimeout(E),z=0,m=O=x=E=void 0},P.flush=function lt(){return void 0===E?B:st(A())},P}(C,W,{leading:Z,maxWait:W,trailing:at})}}).call(t,function(){return this}())},function(o,t){(function(e){"use strict";function s(A){var C=typeof A>"u"?"undefined":l(A);return!!A&&("object"==C||"function"==C)}function a(A){if("number"==typeof A)return A;if(function n(A){return"symbol"==(typeof A>"u"?"undefined":l(A))||function r(A){return!!A&&"object"==(typeof A>"u"?"undefined":l(A))}(A)&&j.call(A)==d}(A))return h;if(s(A)){var C="function"==typeof A.valueOf?A.valueOf():A;A=s(C)?C+"":C}if("string"!=typeof A)return 0===A?A:+A;A=A.replace(u,"");var W=f.test(A);return W||y.test(A)?w(A.slice(2),W?2:8):p.test(A)?h:+A}var l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(A){return typeof A}:function(A){return A&&"function"==typeof Symbol&&A.constructor===Symbol&&A!==Symbol.prototype?"symbol":typeof A},h=NaN,d="[object Symbol]",u=/^\s+|\s+$/g,p=/^[-+]0x[0-9a-f]+$/i,f=/^0b[01]+$/i,y=/^0o[0-7]+$/i,w=parseInt,g="object"==(typeof e>"u"?"undefined":l(e))&&e&&e.Object===Object&&e,_="object"==(typeof self>"u"?"undefined":l(self))&&self&&self.Object===Object&&self,L=g||_||Function("return this")(),j=Object.prototype.toString,H=Math.max,X=Math.min,U=function(){return L.Date.now()};o.exports=function i(A,C,W){function q(v){var S=P,N=m;return P=m=void 0,O=v,b=A.apply(N,S)}function nt(v){var S=v-E;return void 0===E||S>=C||S<0||F&&v-O>=x}function ct(){var v=U();return nt(v)?pt(v):void(B=setTimeout(ct,function at(v){var I=C-(v-E);return F?X(I,x-(v-O)):I}(v)))}function pt(v){return B=void 0,D&&P?q(v):(P=m=void 0,b)}function lt(){var v=U(),S=nt(v);if(P=arguments,m=this,E=v,S){if(void 0===B)return function Z(v){return O=v,B=setTimeout(ct,C),z?q(v):b}(E);if(F)return B=setTimeout(ct,C),q(E)}return void 0===B&&(B=setTimeout(ct,C)),b}var P,m,x,b,B,E,O=0,z=!1,F=!1,D=!0;if("function"!=typeof A)throw new TypeError("Expected a function");return C=a(C)||0,s(W)&&(z=!!W.leading,x=(F="maxWait"in W)?H(a(W.maxWait)||0,C):x,D="trailing"in W?!!W.trailing:D),lt.cancel=function st(){void 0!==B&&clearTimeout(B),O=0,P=E=m=B=void 0},lt.flush=function J(){return void 0===B?b:pt(U())},lt}}).call(t,function(){return this}())},function(o,t){"use strict";function e(l){var c=void 0,h=void 0;for(c=0;c<l.length;c+=1)if((h=l[c]).dataset&&h.dataset.aos||h.children&&e(h.children))return!0;return!1}function i(){return window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver}function n(l){l&&l.forEach(function(c){var h=Array.prototype.slice.call(c.addedNodes),d=Array.prototype.slice.call(c.removedNodes);if(e(h.concat(d)))return a()})}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){};t.default={isSupported:function s(){return!!i()},ready:function r(l,c){var h=window.document,u=new(i())(n);a=c,u.observe(h.documentElement,{childList:!0,subtree:!0,removedNodes:!0})}}},function(o,t){"use strict";function i(){return navigator.userAgent||navigator.vendor||window.opera||""}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function h(d,u){for(var p=0;p<u.length;p++){var f=u[p];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(d,f.key,f)}}return function(d,u,p){return u&&h(d.prototype,u),p&&h(d,p),d}}(),r=/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i,n=/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|
1sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i,a=/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i,l=/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i,c=function(){function h(){!function e(h,d){if(!(h instanceof d))throw new TypeError("Cannot call a class as a function")}(this,h)}return s(h,[{key:"phone",value:function(){var d=i();return!(!r.test(d)&&!n.test(d.substr(0,4)))}},{key:"mobile",value:function(){var d=i();return!(!a.test(d)&&!l.test(d.substr(0,4)))}},{key:"tablet",value:function(){return this.mobile()&&!this.phone()}}]),h}();t.default=new c},function(o,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(s,r){var n=window.pageYOffset,a=window.innerHeight;
1s.forEach(function(l,c){!function(s,r,n){var a=s.node.getAttribute("data-aos-once");r>s.position?s.node.classList.add("aos-animate"):typeof a<"u"&&("false"===a||!n&&"true"!==a)&&s.node.classList.remove("aos-animate")}(l,a+n,r)})}},function(o,t,e){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function i(a){return a&&a.__esModule?a:{default:a}}(e(12));t.default=function(a,l){return a.forEach(function(c,h){c.node.classList.add("aos-init"),c.position=(0,r.default)(c.node,l.offset)}),a}},function(o,t,e){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function i(a){return a&&a.__esModule?a:{default:a}}(e(13));t.default=function(a,l){var c=0,h=0,d=window.innerHeight,u={offset:a.getAttribute("data-aos-offset"),anchor:a.getAttribute("data-aos-anchor"),anchorPlacement:a.getAttribute("data-aos-anchor-placement")};switch(u.offset&&!isNaN(u.offset)&&(h=parseInt(u.offset)),u.anchor&&document.querySelectorAll(u.anchor)&&(a=document.querySelectorAll(u.anchor)[0]),c=(0,r.default)(a).top,u.anchorPlacement){case"top-bottom":break;case"center-bottom":c+=a.offsetHeight/2;break;case"bottom-bottom":c+=a.offsetHeight;break;case"top-center":c+=d/2;break;case"bottom-center":c+=d/2+a.offsetHeight;break;case"center-center":c+=d/2+a.offsetHeight/2;break;case"top-top":c+=d;break;case"bottom-top":c+=a.offsetHeight+d;break;case"center-top":c+=a.offsetHeight/2+d}return u.anchorPlacement||u.offset||isNaN(l)||(h=l),c+h}},function(o,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(i){for(var s=0,r=0;i&&!isNaN(i.offsetLeft)&&!isNaN(i.offsetTop);)s+=i.offsetLeft-("BODY"!=i.tagName?i.scrollLeft:0),r+=i.offsetTop-("BODY"!=i.tagName?i.scrollTop:0),i=i.offsetParent;return{top:r,left:s}}},function(o,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(i){return i=i||document.querySelectorAll("[data-aos]"),Array.prototype.map.call(i,function(s){return{node:s}})}}])}),function(o,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.Quill=t():o.Quill=t()}(self,function(){return function(){var o={9698:function(s,r,n){"use strict";n.d(r,{Ay:function(){return p},Ji:function(){return w},mG:function(){return y},zo:function(){return f}});var a=n(6003),l=n(5232),c=n.n(l),h=n(3036),d=n(4850),u=n(5508);class p extends a.BlockBlot{cache={};delta(){return null==this.cache.delta&&(this.cache.delta=y(this)),this.cache.delta}deleteAt(_,L){super.deleteAt(_,L),this.cache={}}formatAt(_,L,M,j){L<=0||(this.scroll.query(M,a.Scope.BLOCK)?_+L===this.length()&&this.format(M,j):super.formatAt(_,Math.min(L,this.length()-_-1),M,j),this.cache={})}insertAt(_,L,M){if(null!=M)return super.insertAt(_,L,M),void(this.cache={});if(0===L.length)return;const j=L.split("\n"),H=j.shift();H.length>0&&(_<this.length()-1||null==this.children.tail?super.insertAt(Math.min(_,this.length()-1),H):this.children.tail.insertAt(this.children.tail.length(),H),this.cache={});let X=this;j.reduce((U,A)=>(X=X.split(U,!0),X.insertAt(0,A),A.length),_+H.length)}insertBefore(_,L){const{head:M}=this.children;super.insertBefore(_,L),M instanceof h.A&&M.remove(),this.cache={}}length(){return null==this.cache.length&&(this.cache.length=super.length()+1),this.cache.length}moveChildren(_,L){super.moveChildren(_,L),this.cache={}}optimize(_){super.optimize(_),this.cache={}}path(_){return super.path(_,!0)}removeChild(_){super.removeChild(_),this.cache={}}split(_){let L=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(L&&(0===_||_>=this.length()-1)){const j=this.clone();return 0===_?(this.parent.insertBefore(j,this),this):(this.parent.insertBefore(j,this.next),j)}const M=super.split(_,L);return this.cache={},M}}p.blotName="block",p.tagName="P",p.defaultChild=h.A,p.allowedChildren=[h.A,d.A,a.EmbedBlot,u.A];class f extends a.EmbedBlot{attach(){super.attach(),this.attributes=new a.AttributorStore(this.domNode)}delta(){return(new(c())).insert(this.value(),{...this.formats(),...this.attributes.values()})}format(_,L){const M=this.scroll.query(_,a.Scope.BLOCK_ATTRIBUTE);null!=M&&this.attributes.attribute(M,L)}formatAt(_,L,M,j){this.format(M,j)}insertAt(_,L,M){if(null!=M)return void super.insertAt(_,L,M);const j=L.split("\n"),H=j.pop(),X=j.map(A=>{const C=this.scroll.create(p.blotName);return C.insertAt(0,A),C}),U=this.split(_);
vendor: 6,290 bytes, line 1
1X.forEach(A=>{this.parent.insertBefore(A,U)}),H&&this.parent.insertBefore(this.scroll.create("text",H),U)}}function y(g){let _=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return g.descendants(a.LeafBlot).reduce((L,M)=>0===M.length()?L:L.insert(M.value(),w(M,{},_)),new(c())).insert("\n",w(g))}function w(g){let _=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},L=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return null==g?_:("formats"in g&&"function"==typeof g.formats&&(_={..._,...g.formats()},L&&delete _["code-token"]),null==g.parent||"scroll"===g.parent.statics.blotName||g.parent.statics.scope!==g.statics.scope?_:w(g.parent,_,L))}f.scope=a.Scope.BLOCK_BLOT},3036:function(s,r,n){"use strict";var a=n(6003);class l extends a.EmbedBlot{static value(){}optimize(){(this.prev||this.next)&&this.remove()}length(){return 0}value(){return""}}l.blotName="break",l.tagName="BR",r.A=l},580:function(s,r,n){"use strict";var a=n(6003);r.A=class l extends a.ContainerBlot{}},4541:function(s,r,n){"use strict";var a=n(6003),l=n(5508);class c extends a.EmbedBlot{static blotName="cursor";static className="ql-cursor";static tagName="span";static CONTENTS="\ufeff";static value(){}constructor(d,u,p){super(d,u),this.selection=p,this.textNode=document.createTextNode(c.CONTENTS),this.domNode.appendChild(this.textNode),this.savedLength=0}detach(){null!=this.parent&&this.parent.removeChild(this)}format(d,u){if(0!==this.savedLength)return void super.format(d,u);let p=this,f=0;for(;null!=p&&p.statics.scope!==a.Scope.BLOCK_BLOT;)f+=p.offset(p.parent),p=p.parent;null!=p&&(this.savedLength=c.CONTENTS.length,p.optimize(),p.formatAt(f,c.CONTENTS.length,d,u),this.savedLength=0)}index(d,u){return d===this.textNode?0:super.index(d,u)}length(){return this.savedLength}position(){return[this.textNode,this.textNode.data.length]}remove(){super.remove(),this.parent=null}restore(){if(this.selection.composing||null==this.parent)return null;const d=this.selection.getNativeRange();for(;null!=this.domNode.lastChild&&this.domNode.lastChild!==this.textNode;)this.domNode.parentNode.insertBefore(this.domNode.lastChild,this.domNode);const u=this.prev instanceof l.A?this.prev:null,p=u?u.length():0,f=this.next instanceof l.A?this.next:null,y=f?f.text:"",{textNode:w}=this,g=w.data.split(c.CONTENTS).join("");let _;if(w.data=c.CONTENTS,u)_=u,(g||f)&&(u.insertAt(u.length(),g+y),f&&f.remove());else if(f)_=f,f.insertAt(0,g);else{const L=document.createTextNode(g);_=this.scroll.create(L),this.parent.insertBefore(_,this)}if(this.remove(),d){const L=(H,X)=>u&&H===u.domNode?X:H===w?p+X-1:f&&H===f.domNode?p+g.length+X:null,M=L(d.start.node,d.start.offset),j=L(d.end.node,d.end.offset);if(null!==M&&null!==j)return{startNode:_.domNode,startOffset:M,endNode:_.domNode,endOffset:j}}return null}update(d,u){if(d.some(p=>"characterData"===p.type&&p.target===this.textNode)){const p=this.restore();p&&(u.range=p)}}optimize(d){super.optimize(d);let{parent:u}=this;for(;u;){if("A"===u.domNode.tagName){this.savedLength=c.CONTENTS.length,u.isolate(this.offset(u),this.length()).unwrap(),this.savedLength=0;break}u=u.parent}}value(){return""}}r.A=c},746:function(s,r,n){"use strict";var a=n(6003),l=n(5508);const c="\ufeff";r.A=class h extends a.EmbedBlot{constructor(u,p){super(u,p),this.contentNode=document.createElement("span"),this.contentNode.setAttribute("contenteditable","false"),Array.from(this.domNode.childNodes).forEach(f=>{this.contentNode.appendChild(f)}),this.leftGuard=document.createTextNode(c),this.rightGuard=document.createTextNode(c),this.domNode.appendChild(this.leftGuard),this.domNode.appendChild(this.contentNode),this.domNode.appendChild(this.rightGuard)}index(u,p){return u===this.leftGuard?0:u===this.rightGuard?1:super.index(u,p)}restore(u){let p,f=null;const y=u.data.split(c).join("");if(u===this.leftGuard)if(this.prev instanceof l.A){const w=this.prev.length();this.prev.insertAt(w,y),f={startNode:this.prev.domNode,startOffset:w+y.length}}else p=document.createTextNode(y),this.parent.insertBefore(this.scroll.create(p),this),f={startNode:p,startOffset:y.length};else u===this.rightGuard&&(this.next instanceof l.A?(this.next.insertAt(0,y),f={startNode:this.next.domNode,startOffset:y.length}):(p=document.createTextNode(y),this.parent.insertBefore(this.scroll.create(p),this.next),f={startNode:p,startOffset:y.length}));return u.data=c,f}update(u,p){u.forEach(f=>{if("characterData"===f.type&&(f.target===this.leftGuard||f.target===this.rightGuard)){const y=this.restore(f.target);y&&(p.range=y)}})}}},4850:function(s,r,n){"use strict";var a=n(6003),l=n(3036),c=n(5508);class h extends a.InlineBlot{static allowedChildren=[h,l.A,a.EmbedBlot,c.A];static order=["cursor","inline","link","underline","strike","italic","bold","script","code"];static compare(u,p){const f=h.order.indexOf(u),y=h.order.indexOf(p);return f>=0||y>=0?f-y:u===p?0:u<p?-1:1}formatAt(u,p,f,y){if(h.compare(this.statics.blotName,f)<0&&this.scroll.query(f,a.Scope.BLOT)){const w=this.isolate(u,p);y&&w.wrap(f,y)}else super.formatAt(u,p,f,y)}optimize(u){if(super.optimize(u),this.parent instanceof h&&h.compare(this.statics.blotName,this.parent.statics.blotName)>0){const p=this.parent.isolate(this.offset(),this.length());this.moveChildren(p),p.wrap(this)}}}r.A=h},5508:function(s,r,n){"use strict";n.d(r,{A:function(){return l},X:function(){return c}});var a=n(6003);class l extends a.TextBlot{}function c(h){return h.replace(/[&<>"']/g,d=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"}[d]))}},3729:function(s,r,n){"use strict";n.d(r,{default:function(){return m}});var a=n(6142),l=n(9698),c=n(3036),h=n(580),d=n(4541),u=n(746),p=n(4850),f=n(6003),y=n(5232),w=n.n(y),g=n(5374);function _(x){return x instanceof l.Ay||x instanceof l.zo}function L(x){return"function"==typeof x.updateContent}function j(x,b,B){B.reduce((E,O)=>{const z=y.Op.length(O);let F=O.attributes||{};if(null!=O.insert)if("string"==typeof O.insert){x.insertAt(E,O.insert);const[v]=x.descendant(f.LeafBlot,E),S=(0,l.Ji)(v);F=y.AttributeMap.diff(S,F)||{}}else if("object"==typeof O.insert){const D=Object.keys(O.insert)[0];if(null==D)return E;if(x.insertAt(E,D,O.insert[D]),null!=x.scroll.query(D,f.Scope.INLINE)){const[v]=x.descendant(f.LeafBlot,E),S=(0,l.Ji)(v);F=y.AttributeMap.diff(S,F)||{}}}
1return Object.keys(F).forEach(D=>{x.formatAt(E,z,D,F[D])}),E+z},b)}var X=n(5508),U=n(584),A=n(4266);function W(x,b){let B=b;for(let E=x.length-1;E>=0;E-=1){const O=x[E];x[E]={delta:B.transform(O.delta,!0),range:O.range&&q(O.range,B)},B=O.delta.transform(B),0===x[E].delta.length()&&x.splice(E,1)}}function q(x,b){if(!x)return x;const B=b.transformPosition(x.index);return{index:B,length:b.transformPosition(x.index+x.length)-B}}var Z=n(8123);class at extends A.A{constructor(b,B){super(b,B),b.root.addEventListener("drop",E=>{E.preventDefault();let O=null;if(document.caretRangeFromPoint)O=document.caretRangeFromPoint(E.clientX,E.clientY);else if(document.caretPositionFromPoint){const F=document.caretPositionFromPoint(E.clientX,E.clientY);O=document.createRange(),O.setStart(F.offsetNode,F.offset),O.setEnd(F.offsetNode,F.offset)}const z=O&&b.selection.normalizeNative(O);if(z){const F=b.selection.normalizedToRange(z);E.dataTransfer?.files&&this.upload(F,E.dataTransfer.files)}})}upload(b,B){const E=[];Array.from(B).forEach(O=>{O&&this.options.mimetypes?.includes(O.type)&&E.push(O)}),E.length>0&&this.options.handler.call(this,b,E)}}at.DEFAULTS={mimetypes:["image/png","image/jpeg"],handler(x,b){if(!this.quill.scroll.query("image"))return;const B=b.map(E=>new Promise(O=>{const z=new FileReader;z.onload=()=>{O(z.result)},z.readAsDataURL(E)}));Promise.all(B).then(E=>{const O=E.reduce((z,F)=>z.insert({image:F}),(new(w())).retain(x.index).delete(x.length));this.quill.updateContents(O,g.A.sources.USER),this.quill.setSelection(x.index+E.length,g.A.sources.SILENT)})}};var nt=at;const ct=["insertText","insertReplacementText"];const J=/Mac/i.test(navigator.platform);a.Ay.register({"blots/block":l.Ay,"blots/block/embed":l.zo,"blots/break":c.A,"blots/container":h.A,"blots/cursor":d.A,"blots/embed":u.A,"blots/inline":p.A,"blots/scroll":class M extends f.ScrollBlot{static blotName="scroll";static className="ql-editor";static tagName="DIV";static defaultChild=l.Ay;static allowedChildren=[l.Ay,l.zo,h.A];constructor(b,B,E){let{emitter:O}=E;super(b,B),this.emitter=O,this.batch=!1,this.optimize(),this.enable(),this.domNode.addEventListener("dragstart",z=>this.handleDragStart(z))}batchStart(){Array.isArray(this.batch)||(this.batch=[])}batchEnd(){if(!this.batch)return;const b=this.batch;this.batch=!1,this.update(b)}emitMount(b){this.emitter.emit(g.A.events.SCROLL_BLOT_MOUNT,b)}emitUnmount(b){this.emitter.emit(g.A.events.SCROLL_BLOT_UNMOUNT,b)}emitEmbedUpdate(b,B){this.emitter.emit(g.A.events.SCROLL_EMBED_UPDATE,b,B)}deleteAt(b,B){const[E,O]=this.line(b),[z]=this.line(b+B);if(super.deleteAt(b,B),null!=z&&E!==z&&O>0){if(E instanceof l.zo||z instanceof l.zo)return void this.optimize();E.moveChildren(z,z.children.head instanceof c.A?null:z.children.head),E.remove()}this.optimize()}enable(){this.domNode.setAttribute("contenteditable",arguments.length>0&&void 0!==arguments[0]&&!arguments[0]?"false":"true")}formatAt(b,B,E,O){super.formatAt(b,B,E,O),this.optimize()}insertAt(b,B,E){if(b>=this.length())if(null==E||null==this.scroll.query(B,f.Scope.BLOCK)){const O=this.scroll.create(this.statics.defaultChild.blotName);this.appendChild(O),null==E&&B.endsWith("\n")?O.insertAt(0,B.slice(0,-1),E):O.insertAt(0,B,E)}else{const O=this.scroll.create(B,E);this.appendChild(O)}else super.insertAt(b,B,E);this.optimize()}insertBefore(b,B){if(b.statics.scope===f.Scope.INLINE_BLOT){const E=this.scroll.create(this.statics.defaultChild.blotName);E.appendChild(b),super.insertBefore(E,B)}else super.insertBefore(b,B)}insertContents(b,B){const E=this.deltaToRenderBlocks(B.concat((new(w())).insert("\n"))),O=E.pop();if(null==O)return;this.batchStart();const z=E.shift();if(z){const v="block"===z.type&&(0===z.delta.length()||!this.descendant(l.zo,b)[0]&&b<this.length()),S="block"===z.type?z.delta:(new(w())).insert({[z.key]:z.value});j(this,b,S);const N="block"===z.type?1:0,I=b+S.length()+N;v&&this.insertAt(I-1,"\n");const V=(0,l.Ji)(this.line(b)[0]),K=y.AttributeMap.diff(V,z.attributes)||{};Object.keys(K).forEach(et=>{this.formatAt(I-1,1,et,K[et])}),b=I}let[F,D]=this.children.find(b);
1E.length&&(F&&(F=F.split(D),D=0),E.forEach(v=>{if("block"===v.type)j(this.createBlock(v.attributes,F||void 0),0,v.delta);else{const S=this.create(v.key,v.value);this.insertBefore(S,F||void 0),Object.keys(v.attributes).forEach(N=>{S.format(N,v.attributes[N])})}})),"block"===O.type&&O.delta.length()&&j(this,F?F.offset(F.scroll)+D:this.length(),O.delta),this.batchEnd(),this.optimize()}isEnabled(){return"true"===this.domNode.getAttribute("contenteditable")}leaf(b){const B=this.path(b).pop();if(!B)return[null,-1];const[E,O]=B;return E instanceof f.LeafBlot?[E,O]:[null,-1]}line(b){return b===this.length()?this.line(b-1):this.descendant(_,b)}lines(){const E=(O,z,F)=>{let D=[],v=F;return O.children.forEachAt(z,F,(S,N,I)=>{_(S)?D.push(S):S instanceof f.ContainerBlot&&(D=D.concat(E(S,N,v))),v-=I}),D};return E(this,arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.MAX_VALUE)}optimize(){let b=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],B=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.batch||(super.optimize(b,B),b.length>0&&this.emitter.emit(g.A.events.SCROLL_OPTIMIZE,b,B))}path(b){return super.path(b).slice(1)}remove(){}update(b){if(this.batch)return void(Array.isArray(b)&&(this.batch=this.batch.concat(b)));let B=g.A.sources.USER;"string"==typeof b&&(B=b),Array.isArray(b)||(b=this.observer.takeRecords()),(b=b.filter(E=>{let{target:O}=E;const z=this.find(O,!0);return z&&!L(z)})).length>0&&this.emitter.emit(g.A.events.SCROLL_BEFORE_UPDATE,B,b),super.update(b.concat([])),b.length>0&&this.emitter.emit(g.A.events.SCROLL_UPDATE,B,b)}updateEmbedAt(b,B,E){const[O]=this.descendant(z=>z instanceof l.zo,b);O&&O.statics.blotName===B&&L(O)&&O.updateContent(E)}handleDragStart(b){b.preventDefault()}deltaToRenderBlocks(b){const B=[];let E=new(w());return b.forEach(O=>{const z=O?.insert;if(z)if("string"==typeof z){const F=z.split("\n");F.slice(0,-1).forEach(v=>{E.insert(v,O.attributes),B.push({type:"block",delta:E,attributes:O.attributes??{}}),E=new(w())});const D=F[F.length-1];D&&E.insert(D,O.attributes)}else{const F=Object.keys(z)[0];if(!F)return;this.query(F,f.Scope.INLINE)?E.push(O):(E.length()&&B.push({type:"block",delta:E,attributes:{}}),E=new(w()),B.push({type:"blockEmbed",key:F,value:z[F],attributes:O.attributes??{}}))}}),E.length()&&B.push({type:"block",delta:E,attributes:{}}),B}createBlock(b,B){let E;const O={};Object.entries(b).forEach(D=>{let[v,S]=D;null!=this.query(v,f.Scope.BLOCK&f.Scope.BLOT)?E=v:O[v]=S});const z=this.create(E||this.statics.defaultChild.blotName,E?b[E]:void 0);this.insertBefore(z,B||void 0);const F=z.length();return Object.entries(O).forEach(D=>{let[v,S]=D;z.formatAt(0,F,v,S)}),z}},"blots/text":X.A,"modules/clipboard":U.Ay,"modules/history":class C extends A.A{static DEFAULTS={delay:1e3,maxStack:100,userOnly:!1};lastRecorded=0;ignoreChange=!1;stack={undo:[],redo:[]};currentRange=null;constructor(b,B){super(b,B),this.quill.on(a.Ay.events.EDITOR_CHANGE,(E,O,z,F)=>{E===a.Ay.events.SELECTION_CHANGE?O&&F!==a.Ay.sources.SILENT&&(this.currentRange=O):E===a.Ay.events.TEXT_CHANGE&&(this.ignoreChange||(this.options.userOnly&&F!==a.Ay.sources.USER?this.transform(O):this.record(O,z)),this.currentRange=q(this.currentRange,O))}),this.quill.keyboard.addBinding({key:"z",shortKey:!0},this.undo.bind(this)),this.quill.keyboard.addBinding({key:["z","Z"],shortKey:!0,shiftKey:!0},this.redo.bind(this)),/Win/i.test(navigator.platform)&&this.quill.keyboard.addBinding({key:"y",shortKey:!0},this.redo.bind(this)),this.quill.root.addEventListener("beforeinput",E=>{"historyUndo"===E.inputType?(this.undo(),E.preventDefault()):"historyRedo"===E.inputType&&(this.redo(),E.preventDefault())})}change(b,B){if(0===this.stack[b].length)return;const E=this.stack[b].pop();if(!E)return;const O=this.quill.getContents(),z=E.delta.invert(O);this.stack[B].push({delta:z,range:q(E.range,z)}),this.lastRecorded=0,this.ignoreChange=!0,this.quill.updateContents(E.delta,a.Ay.sources.USER),this.ignoreChange=!1,this.restoreSelection(E)}clear(){this.stack={undo:[],redo:[]}}cutoff(){this.lastRecorded=0}record(b,B){if(0===b.ops.length)return;this.stack.redo=[];let E=b.invert(B),O=this.currentRange;const z=Date.now();if(this.lastRecorded+this.options.delay>z&&this.stack.undo.length>0){const F=this.stack.undo.pop();F&&(E=E.compose(F.delta),O=F.range)}else this.lastRecorded=z;0!==E.length()&&(this.stack.undo.push({delta:E,range:O}),this.stack.undo.length>this.options.maxStack&&this.stack.undo.shift())}redo(){this.change("redo","undo")}transform(b){W(this.stack.undo,b),W(this.stack.redo,b)}undo(){this.change("undo","redo")}restoreSelection(b){if(b.range)this.quill.setSelection(b.range,a.Ay.sources.USER);else{const B=function(E,O){const z=O.reduce((D,v)=>D+(v.delete||0),0);let F=O.length()-z;return function(D,v){const S=v.ops[v.ops.length-1];return null!=S&&(null!=S.insert?"string"==typeof S.insert&&S.insert.endsWith("\n"):null!=S.attributes&&Object.keys(S.attributes).some(N=>null!=D.query(N,f.Scope.BLOCK)))}(E,O)&&(F-=1),F}(this.quill.scroll,b.delta);this.quill.setSelection(B,a.Ay.sources.USER)}}},"modules/keyboard":Z.Ay,"modules/uploader":nt,"modules/input":class pt extends A.A{constructor(b,B){super(b,B),b.root.addEventListener("beforeinput",E=>{this.handleBeforeInput(E)}),/Android/i.test(navigator.userAgent)||b.on(a.Ay.events.COMPOSITION_BEFORE_START,()=>{this.handleCompositionStart()})}deleteRange(b){(0,Z.Xo)({range:b,quill:this.quill})}replaceText(b){let B=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(0===b.length)return!1;if(B){const E=this.quill.getFormat(b.index,1);this.deleteRange(b),this.quill.updateContents((new(w())).retain(b.index).insert(B,E),a.Ay.sources.USER)}else this.deleteRange(b);return this.quill.setSelection(b.index+B.length,0,a.Ay.sources.SILENT),!0}handleBeforeInput(b){if(this.quill.composition.isComposing||b.defaultPrevented||!ct.includes(b.inputType))return;const B=b.getTargetRanges?b.getTargetRanges()[0]:null;if(!B||!0===B.collapsed)return;const E="string"==typeof(F=b).data?F.data:F.dataTransfer?.types.includes("text/plain")?F.dataTransfer.getData("text/plain"):null;var F;if(null==E)return;const O=this.quill.selection.normalizeNative(B),z=O?this.quill.selection.normalizedToRange(O):null;z&&this.replaceText(z,E)&&b.preventDefault()}handleCompositionStart(){const b=this.quill.getSelection();b&&this.replaceText(b)}},"modules/uiNode":class lt extends A.A{isListening=!1;selectionChangeDeadline=0;constructor(b,B){super(b,B),this.handleArrowKeys(),this.handleNavigationShortcuts()}handleArrowKeys(){this.quill.keyboard.addBinding({key:["ArrowLeft","ArrowRight"],offset:0,shiftKey:null,handler(b,B){let{line:E,event:O}=B;if(!(E instanceof f.ParentBlot&&E.uiNode))return!0;const z="rtl"===getComputedStyle(E.domNode).direction;return!!(z&&"ArrowRight"!==O.key||!z&&"ArrowLeft"!==O.key)||(this.quill.setSelection(b.index-1,b.length+(O.shiftKey?1:0),a.Ay.sources.USER),!1)}})}handleNavigationShortcuts(){this.quill.root.addEventListener("keydown",b=>{var B;!b.defaultPrevented&&("ArrowLeft"===(B=b).key||"ArrowRight"===B.key||"ArrowUp"===B.key||"ArrowDown"===B.key||"Home"===B.key||J&&"a"===B.key&&!0===B.ctrlKey)&&this.ensureListeningToSelectionChange()})}ensureListeningToSelectionChange(){this.selectionChangeDeadline=Date.now()+100,this.isListening||(this.isListening=!0,document.addEventListener("selectionchange",()=>{this.isListening=!1,Date.now()<=this.selectionChangeDeadline&&this.handleSelectionChange()},{once:!0}))}handleSelectionChange(){const b=document.getSelection();if(!b)return;const B=b.getRangeAt(0);if(!0!==B.collapsed||0!==B.startOffset)return;const E=this.quill.scroll.find(B.startContainer);if(!(E instanceof f.ParentBlot&&E.uiNode))return;const O=document.createRange();O.setStartAfter(E.uiNode),O.setEndAfter(E.uiNode),b.removeAllRanges(),b.addRange(O)}}});var m=a.Ay},5374:function(s,r,n){"use strict";n.d(r,{A:function(){return h}});var a=n(8920),l=n(7356);const c=(0,n(6078).A)("quill:events");["selectionchange","mousedown","mouseup","click"].forEach(d=>{document.addEventListener(d,function(){for(var u=arguments.length,p=new Array(u),f=0;f<u;f++)p[f]=arguments[f];
1Array.from(document.querySelectorAll(".ql-container")).forEach(y=>{const w=l.A.get(y);w&&w.emitter&&w.emitter.handleDOM(...p)})})});var h=class extends a{static events={EDITOR_CHANGE:"editor-change",SCROLL_BEFORE_UPDATE:"scroll-before-update",SCROLL_BLOT_MOUNT:"scroll-blot-mount",SCROLL_BLOT_UNMOUNT:"scroll-blot-unmount",SCROLL_OPTIMIZE:"scroll-optimize",SCROLL_UPDATE:"scroll-update",SCROLL_EMBED_UPDATE:"scroll-embed-update",SELECTION_CHANGE:"selection-change",TEXT_CHANGE:"text-change",COMPOSITION_BEFORE_START:"composition-before-start",COMPOSITION_START:"composition-start",COMPOSITION_BEFORE_END:"composition-before-end",COMPOSITION_END:"composition-end"};static sources={API:"api",SILENT:"silent",USER:"user"};constructor(){super(),this.domListeners={},this.on("error",c.error)}emit(){for(var d=arguments.length,u=new Array(d),p=0;p<d;p++)u[p]=arguments[p];return c.log.call(c,...u),super.emit(...u)}handleDOM(d){for(var u=arguments.length,p=new Array(u>1?u-1:0),f=1;f<u;f++)p[f-1]=arguments[f];(this.domListeners[d.type]||[]).forEach(y=>{let{node:w,handler:g}=y;(d.target===w||w.contains(d.target))&&g(d,...p)})}listenDOM(d,u,p){this.domListeners[d]||(this.domListeners[d]=[]),this.domListeners[d].push({node:u,handler:p})}}},7356:function(s,r){"use strict";r.A=new WeakMap},6078:function(s,r){"use strict";const n=["error","warn","log","info"];let a="warn";function l(h){if(a&&n.indexOf(h)<=n.indexOf(a)){for(var d=arguments.length,u=new Array(d>1?d-1:0),p=1;p<d;p++)u[p-1]=arguments[p];console[h](...u)}}function c(h){return n.reduce((d,u)=>(d[u]=l.bind(console,u,h),d),{})}l.level=c.level=h=>{a=h},r.A=c},4266:function(s,r){"use strict";r.A=class{static DEFAULTS={};constructor(n){let a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.quill=n,this.options=a}}},6142:function(s,r,n){"use strict";n.d(r,{Ay:function(){return x}});var a=n(8347),l=n(6003),c=n(5232),h=n.n(c),d=n(3707),u=n(5123),p=n(9698),f=n(3036),y=n(4541),w=n(5508),g=n(8298);const _=/^[ -~]*$/;function L(D,v,S){if(0===D.length){const[vt]=H(S.pop());return v<=0?`</li></${vt}>`:`</li></${vt}>${L([],v-1,S)}`}const[{child:N,offset:I,length:V,indent:K,type:et},...it]=D,[rt,ht]=H(et);if(K>v)return S.push(et),K===v+1?`<${rt}><li${ht}>${M(N,I,V)}${L(it,K,S)}`:`<${rt}><li>${L(D,v+1,S)}`;if(K===v&&et===S[S.length-1])return`</li><li${ht}>${M(N,I,V)}${L(it,K,S)}`;const[dt]=H(S.pop());return`</li></${dt}>${L(D,v-1,S)}`}function M(D,v,S){let N=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if("html"in D&&"function"==typeof D.html)return D.html(v,S);if(D instanceof w.A)return(0,w.X)(D.value().slice(v,v+S));if(D instanceof l.ParentBlot){if("list-container"===D.statics.blotName){const rt=[];return D.children.forEachAt(v,S,(ht,ft,dt)=>{const vt="formats"in ht&&"function"==typeof ht.formats?ht.formats():{};rt.push({child:ht,offset:ft,length:dt,indent:vt.indent||0,type:vt.list})}),L(rt,-1,[])}const I=[];if(D.children.forEachAt(v,S,(rt,ht,ft)=>{I.push(M(rt,ht,ft))}),N||"list"===D.statics.blotName)return I.join("");const{outerHTML:V,innerHTML:K}=D.domNode,[et,it]=V.split(`>${K}<`);return"<table"===et?`<table style="border: 1px solid #000;">${I.join("")}<${it}`:`${et}>${I.join("")}<${it}`}return D.domNode instanceof oe?D.domNode.outerHTML:""}function j(D,v){return Object.keys(v).reduce((S,N)=>{if(null==D[N])return S;const I=v[N];return S[N]=I===D[N]?I:Array.isArray(I)?I.indexOf(D[N])<0?I.concat([D[N]]):I:[I,D[N]],S},{})}function H(D){const v="ordered"===D?"ol":"ul";switch(D){case"checked":return[v,' data-list="checked"'];case"unchecked":return[v,' data-list="unchecked"'];default:return[v,""]}}function X(D){return D.reduce((v,S)=>{if("string"==typeof S.insert){const N=S.insert.replace(/\r\n/g,"\n").replace(/\r/g,"\n");return v.insert(N,S.attributes)}return v.push(S)},new(h()))}function U(D,v){let{index:S,length:N}=D;return new g.Q(S+v,N)}var A=class{constructor(D){this.scroll=D,this.delta=this.getDelta()}applyDelta(D){this.scroll.update();let v=this.scroll.length();this.scroll.batchStart();const S=X(D),N=new(h());return function(I){const V=[];return I.forEach(K=>{"string"==typeof K.insert?K.insert.split("\n").forEach((et,it)=>{it&&V.push({insert:"\n",attributes:K.attributes}),et&&V.push({insert:et,attributes:K.attributes})}):V.push(K)}),V}(S.ops.slice()).reduce((I,V)=>{const K=c.Op.length(V);let et=V.attributes||{},it=!1,rt=!1;if(null!=V.insert){if(N.retain(K),"string"==typeof V.insert){const dt=V.insert;rt=!dt.endsWith("\n")&&(v<=I||!!this.scroll.descendant(p.zo,I)[0]),this.scroll.insertAt(I,dt);const[vt,bt]=this.scroll.line(I);let yt=(0,a.A)({},(0,p.Ji)(vt));
1if(vt instanceof p.Ay){const[Lt]=vt.descendant(l.LeafBlot,bt);Lt&&(yt=(0,a.A)(yt,(0,p.Ji)(Lt)))}et=c.AttributeMap.diff(yt,et)||{}}else if("object"==typeof V.insert){const dt=Object.keys(V.insert)[0];if(null==dt)return I;const vt=null!=this.scroll.query(dt,l.Scope.INLINE);if(vt)(v<=I||this.scroll.descendant(p.zo,I)[0])&&(rt=!0);else if(I>0){const[bt,yt]=this.scroll.descendant(l.LeafBlot,I-1);bt instanceof w.A?"\n"!==bt.value()[yt]&&(it=!0):bt instanceof l.EmbedBlot&&bt.statics.scope===l.Scope.INLINE_BLOT&&(it=!0)}if(this.scroll.insertAt(I,dt,V.insert[dt]),vt){const[bt]=this.scroll.descendant(l.LeafBlot,I);if(bt){const yt=(0,a.A)({},(0,p.Ji)(bt));et=c.AttributeMap.diff(yt,et)||{}}}}v+=K}else if(N.push(V),null!==V.retain&&"object"==typeof V.retain){const dt=Object.keys(V.retain)[0];if(null==dt)return I;this.scroll.updateEmbedAt(I,dt,V.retain[dt])}Object.keys(et).forEach(dt=>{this.scroll.formatAt(I,K,dt,et[dt])});const ht=it?1:0,ft=rt?1:0;return v+=ht+ft,N.retain(ht),N.delete(ft),I+K+ht+ft},0),N.reduce((I,V)=>"number"==typeof V.delete?(this.scroll.deleteAt(I,V.delete),I):I+c.Op.length(V),0),this.scroll.batchEnd(),this.scroll.optimize(),this.update(S)}deleteText(D,v){return this.scroll.deleteAt(D,v),this.update((new(h())).retain(D).delete(v))}formatLine(D,v){let S=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.scroll.update(),Object.keys(S).forEach(I=>{this.scroll.lines(D,Math.max(v,1)).forEach(V=>{V.format(I,S[I])})}),this.scroll.optimize();const N=(new(h())).retain(D).retain(v,(0,d.A)(S));return this.update(N)}formatText(D,v){let S=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.keys(S).forEach(I=>{this.scroll.formatAt(D,v,I,S[I])});const N=(new(h())).retain(D).retain(v,(0,d.A)(S));return this.update(N)}getContents(D,v){return this.delta.slice(D,D+v)}getDelta(){return this.scroll.lines().reduce((D,v)=>D.concat(v.delta()),new(h()))}getFormat(D){let v=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,S=[],N=[];0===v?this.scroll.path(D).forEach(K=>{const[et]=K;et instanceof p.Ay?S.push(et):et instanceof l.LeafBlot&&N.push(et)}):(S=this.scroll.lines(D,v),N=this.scroll.descendants(l.LeafBlot,D,v));const[I,V]=[S,N].map(K=>{const et=K.shift();if(null==et)return{};let it=(0,p.Ji)(et);for(;Object.keys(it).length>0;){const rt=K.shift();if(null==rt)return it;it=j((0,p.Ji)(rt),it)}return it});return{...I,...V}}getHTML(D,v){const[S,N]=this.scroll.line(D);if(S){const I=S.length();return S.length()>=N+v&&(0!==N||v!==I)?M(S,N,v,!0):M(this.scroll,D,v,!0)}return""}getText(D,v){return this.getContents(D,v).filter(S=>"string"==typeof S.insert).map(S=>S.insert).join("")}insertContents(D,v){const S=X(v),N=(new(h())).retain(D).concat(S);return this.scroll.insertContents(D,S),this.update(N)}insertEmbed(D,v,S){return this.scroll.insertAt(D,v,S),this.update((new(h())).retain(D).insert({[v]:S}))}insertText(D,v){let S=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return v=v.replace(/\r\n/g,"\n").replace(/\r/g,"\n"),this.scroll.insertAt(D,v),Object.keys(S).forEach(N=>{this.scroll.formatAt(D,v.length,N,S[N])}),this.update((new(h())).retain(D).insert(v,(0,d.A)(S)))}isBlank(){if(0===this.scroll.children.length)return!0;if(this.scroll.children.length>1)return!1;const D=this.scroll.children.head;return D?.statics.blotName===p.Ay.blotName&&(!(D.children.length>1)&&D.children.head instanceof f.A)}removeFormat(D,v){const S=this.getText(D,v),[N,I]=this.scroll.line(D+v);let V=0,K=new(h());null!=N&&(V=N.length()-I,K=N.delta().slice(I,I+V-1).insert("\n"));const et=this.getContents(D,v+V).diff((new(h())).insert(S).concat(K)),it=(new(h())).retain(D).concat(et);return this.applyDelta(it)}update(D){let v=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],S=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;const N=this.delta;if(1===v.length&&"characterData"===v[0].type&&v[0].target.data.match(_)&&this.scroll.find(v[0].target)){const I=this.scroll.find(v[0].target),V=(0,p.Ji)(I),K=I.offset(this.scroll),et=v[0].oldValue.replace(y.A.CONTENTS,""),it=(new(h())).insert(et),rt=(new(h())).insert(I.value()),ht=S&&{oldRange:U(S.oldRange,-K),newRange:U(S.newRange,-K)};D=(new(h())).retain(K).concat(it.diff(rt,ht)).reduce((ft,dt)=>dt.insert?ft.insert(dt.insert,V):ft.push(dt),new(h())),this.delta=N.compose(D)}else this.delta=this.getDelta(),D&&(0,u.A)(N.compose(D),this.delta)||(D=N.diff(this.delta,S));return D}},C=n(5374),W=n(7356),q=n(6078),Z=n(4266),at=n(746),nt=class{isComposing=!1;constructor(D,v){this.scroll=D,this.emitter=v,this.setupListeners()}setupListeners(){this.scroll.domNode.addEventListener("compositionstart",D=>{this.isComposing||this.handleCompositionStart(D)}),this.scroll.domNode.addEventListener("compositionend",D=>{this.isComposing&&queueMicrotask(()=>{this.handleCompositionEnd(D)})})}handleCompositionStart(D){const v=D.target instanceof Node?this.scroll.find(D.target,!0):null;!v||v instanceof at.A||(this.emitter.emit(C.A.events.COMPOSITION_BEFORE_START,D),this.scroll.batchStart(),this.emitter.emit(C.A.events.COMPOSITION_START,D),this.isComposing=!0)}handleCompositionEnd(D){this.emitter.emit(C.A.events.COMPOSITION_BEFORE_END,D),this.scroll.batchEnd(),this.emitter.emit(C.A.events.COMPOSITION_END,D),this.isComposing=!1}},ct=n(9609);const pt=D=>{const v=D.getBoundingClientRect(),S="offsetWidth"in D&&Math.abs(v.width)/D.offsetWidth||1,N="offsetHeight"in D&&Math.abs(v.height)/D.offsetHeight||1;return{top:v.top,right:v.left+D.clientWidth*S,bottom:v.top+D.clientHeight*N,left:v.left}},st=D=>{const v=parseInt(D,10);return Number.isNaN(v)?0:v},J=(D,v,S,N,I,V)=>D<S&&v>N?0:D<S?-(S-D+I):v>N?v-D>N-S?D+I-S:v-N+V:0,lt=["block","break","cursor","inline","scroll","text"],P=(0,q.A)("quill"),m=new l.Registry;l.ParentBlot.uiClass="ql-ui";class x{static DEFAULTS={bounds:null,modules:{clipboard:!0,keyboard:!0,history:!0,uploader:!0},placeholder:"",readOnly:!1,registry:m,theme:"default"};static events=C.A.events;static sources=C.A.sources;static version="2.0.2";static imports={delta:h(),parchment:l,"core/module":Z.A,"core/theme":ct.A};static debug(v){!0===v&&(v="log"),q.A.level(v)}static find(v){let S=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return W.A.get(v)||m.find(v,S)}static import(v){return null==this.imports[v]&&P.error(`Cannot import ${v}. Are you sure it was registered?`),this.imports[v]}static register(){if("string"!=typeof(arguments.length<=0?void 0:arguments[0])){const v=arguments.length<=0?void 0:arguments[0],S=!(arguments.length<=1||!arguments[1]),N="attrName"in v?v.attrName:v.blotName;"string"==typeof N?this.register(`formats/${N}`,v,S):Object.keys(v).forEach(I=>{this.register(I,v[I],S)})}else{const v=arguments.length<=0?void 0:arguments[0],S=arguments.length<=1?void 0:arguments[1];null==this.imports[v]||!(arguments.length<=2||!arguments[2])||P.warn(`Overwriting ${v} with`,S),this.imports[v]=S,(v.startsWith("blots/")||v.startsWith("formats/"))&&S&&"boolean"!=typeof S&&"abstract"!==S.blotName&&m.register(S),"function"==typeof S.register&&S.register(m)}}constructor(v){if(this.options=function(K,et){const it=b(K);if(!it)throw new Error("Invalid Quill container");const rt=et.theme&&et.theme!==x.DEFAULTS.theme?x.import(`themes/${et.theme}`):ct.A;if(!rt)throw new Error(`Invalid theme ${et.theme}. Did you register it?`);const{modules:ht,...ft}=x.DEFAULTS,{modules:dt,...vt}=rt.DEFAULTS;let bt=B(et.modules);null!=bt&&bt.toolbar&&bt.toolbar.constructor!==Object&&(bt={...bt,toolbar:{container:bt.toolbar}});const yt=(0,a.A)({},B(ht),B(dt),bt),Lt={...ft,...E(vt),...E(et)};let Rt=et.registry;return Rt?et.formats&&P.warn('Ignoring "formats" option because "registry" is specified'):Rt=et.formats?((Ct,mt,_t)=>{const St=new l.Registry;return lt.forEach(Tt=>{const Et=mt.query(Tt);Et&&St.register(Et)}),Ct.forEach(Tt=>{let Et=mt.query(Tt);Et||_t.error(`Cannot register "${Tt}" specified in "formats" config. Are you sure it was registered?`);let qt=0;for(;Et;)if(St.register(Et),Et="blotName"in Et?Et.requiredContainer??null:null,qt+=1,qt>100){_t.error(`Cycle detected in registering blot requiredContainer: "${Tt}"`);break}}),St})(et.formats,Lt.registry,P):Lt.registry,{...Lt,registry:Rt,container:it,theme:rt,modules:Object.entries(yt).reduce((Ct,mt)=>{let[_t,St]=mt;if(!St)return Ct;const Tt=x.import(`modules/${_t}`);return null==Tt?(P.error(`Cannot load ${_t} module. Are you sure you registered it?`),Ct):{...Ct,[_t]:(0,a.A)({},Tt.DEFAULTS||{},St)}},{}),bounds:b(Lt.bounds)}}(v,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}),this.container=this.options.container,null==this.container)return void P.error("Invalid Quill container",v);this.options.debug&&x.debug(this.options.debug);const N=this.container.innerHTML.trim();this.container.classList.add("ql-container"),this.container.innerHTML="",W.A.set(this.container,this),this.root=this.addContainer("ql-editor"),this.root.classList.add("ql-blank"),this.emitter=new C.A;const I=l.ScrollBlot.blotName,V=this.options.registry.query(I);if(!V||!("blotName"in V))throw new Error(`Cannot initialize Quill without "${I}" blot`);
1if(this.scroll=new V(this.options.registry,this.root,{emitter:this.emitter}),this.editor=new A(this.scroll),this.selection=new g.A(this.scroll,this.emitter),this.composition=new nt(this.scroll,this.emitter),this.theme=new this.options.theme(this,this.options),this.keyboard=this.theme.addModule("keyboard"),this.clipboard=this.theme.addModule("clipboard"),this.history=this.theme.addModule("history"),this.uploader=this.theme.addModule("uploader"),this.theme.addModule("input"),this.theme.addModule("uiNode"),this.theme.init(),this.emitter.on(C.A.events.EDITOR_CHANGE,K=>{K===C.A.events.TEXT_CHANGE&&this.root.classList.toggle("ql-blank",this.editor.isBlank())}),this.emitter.on(C.A.events.SCROLL_UPDATE,(K,et)=>{const it=this.selection.lastRange,[rt]=this.selection.getRange(),ht=it&&rt?{oldRange:it,newRange:rt}:void 0;O.call(this,()=>this.editor.update(null,et,ht),K)}),this.emitter.on(C.A.events.SCROLL_EMBED_UPDATE,(K,et)=>{const it=this.selection.lastRange,[rt]=this.selection.getRange(),ht=it&&rt?{oldRange:it,newRange:rt}:void 0;O.call(this,()=>{const ft=(new(h())).retain(K.offset(this)).retain({[K.statics.blotName]:et});return this.editor.update(ft,[],ht)},x.sources.USER)}),N){const K=this.clipboard.convert({html:`${N}<p><br></p>`,text:"\n"});this.setContents(K)}this.history.clear(),this.options.placeholder&&this.root.setAttribute("data-placeholder",this.options.placeholder),this.options.readOnly&&this.disable(),this.allowReadOnlyEdits=!1}addContainer(v){let S=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if("string"==typeof v){const N=v;(v=document.createElement("div")).classList.add(N)}return this.container.insertBefore(v,S),v}blur(){this.selection.setRange(null)}deleteText(v,S,N){return[v,S,,N]=z(v,S,N),O.call(this,()=>this.editor.deleteText(v,S),N,v,-1*S)}disable(){this.enable(!1)}editReadOnly(v){this.allowReadOnlyEdits=!0;const S=v();return this.allowReadOnlyEdits=!1,S}enable(){let v=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.scroll.enable(v),this.container.classList.toggle("ql-disabled",!v)}focus(){let v=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.selection.focus(),v.preventScroll||this.scrollSelectionIntoView()}format(v,S){return O.call(this,()=>{const I=this.getSelection(!0);let V=new(h());if(null==I)return V;if(this.scroll.query(v,l.Scope.BLOCK))V=this.editor.formatLine(I.index,I.length,{[v]:S});else{if(0===I.length)return this.selection.format(v,S),V;V=this.editor.formatText(I.index,I.length,{[v]:S})}return this.setSelection(I,C.A.sources.SILENT),V},arguments.length>2&&void 0!==arguments[2]?arguments[2]:C.A.sources.API)}formatLine(v,S,N,I,V){let K;return[v,S,K,V]=z(v,S,N,I,V),O.call(this,()=>this.editor.formatLine(v,S,K),V,v,0)}formatText(v,S,N,I,V){let K;return[v,S,K,V]=z(v,S,N,I,V),O.call(this,()=>this.editor.formatText(v,S,K),V,v,0)}getBounds(v){let N=null;if(N="number"==typeof v?this.selection.getBounds(v,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0):this.selection.getBounds(v.index,v.length),!N)return null;const I=this.container.getBoundingClientRect();return{bottom:N.bottom-I.top,height:N.height,left:N.left-I.left,right:N.right-I.left,top:N.top-I.top,width:N.width}}getContents(){let v=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,S=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getLength()-v;return[v,S]=z(v,S),this.editor.getContents(v,S)}getFormat(){let v=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getSelection(!0);return"number"==typeof v?this.editor.getFormat(v,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0):this.editor.getFormat(v.index,v.length)}getIndex(v){return v.offset(this.scroll)}getLength(){return this.scroll.length()}getLeaf(v){return this.scroll.leaf(v)}getLine(v){return this.scroll.line(v)}getLines(){let v=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,S=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.MAX_VALUE;return"number"!=typeof v?this.scroll.lines(v.index,v.length):this.scroll.lines(v,S)}getModule(v){return this.theme.modules[v]}getSelection(){return arguments.length>0&&void 0!==arguments[0]&&arguments[0]&&this.focus(),this.update(),this.selection.getRange()[0]}getSemanticHTML(){let v=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,S=arguments.length>1?arguments[1]:void 0;return"number"==typeof v&&(S=S??this.getLength()-v),[v,S]=z(v,S),this.editor.getHTML(v,S)}getText(){let v=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,S=arguments.length>1?arguments[1]:void 0;return"number"==typeof v&&(S=S??this.getLength()-v),[v,S]=z(v,S),this.editor.getText(v,S)}hasFocus(){return this.selection.hasFocus()}insertEmbed(v,S,N){return O.call(this,()=>this.editor.insertEmbed(v,S,N),arguments.length>3&&void 0!==arguments[3]?arguments[3]:x.sources.API,v)}insertText(v,S,N,I,V){let K;return[v,,K,V]=z(v,0,N,I,V),O.call(this,()=>this.editor.insertText(v,S,K),V,v,S.length)}isEnabled(){return this.scroll.isEnabled()}off(){return this.emitter.off(...arguments)}on(){return this.emitter.on(...arguments)}once(){return this.emitter.once(...arguments)}removeFormat(v,S,N){return[v,S,,N]=z(v,S,N),O.call(this,()=>this.editor.removeFormat(v,S),N,v)}scrollRectIntoView(v){((S,N)=>{const I=S.ownerDocument;let V=N,K=S;for(;K;
1){const it=K===I.body,rt=it?{top:0,right:window.visualViewport?.width??I.documentElement.clientWidth,bottom:window.visualViewport?.height??I.documentElement.clientHeight,left:0}:pt(K),ht=getComputedStyle(K),ft=J(V.left,V.right,rt.left,rt.right,st(ht.scrollPaddingLeft),st(ht.scrollPaddingRight)),dt=J(V.top,V.bottom,rt.top,rt.bottom,st(ht.scrollPaddingTop),st(ht.scrollPaddingBottom));if(ft||dt)if(it)I.defaultView?.scrollBy(ft,dt);else{const{scrollLeft:vt,scrollTop:bt}=K;dt&&(K.scrollTop+=dt),ft&&(K.scrollLeft+=ft);const yt=K.scrollLeft-vt,Lt=K.scrollTop-bt;V={left:V.left-yt,top:V.top-Lt,right:V.right-yt,bottom:V.bottom-Lt}}K=it||"fixed"===ht.position?null:(et=K).parentElement||et.getRootNode().host||null}var et})(this.root,v)}scrollIntoView(){console.warn("Quill#scrollIntoView() has been deprecated and will be removed in the near future. Please use Quill#scrollSelectionIntoView() instead."),this.scrollSelectionIntoView()}scrollSelectionIntoView(){const v=this.selection.lastRange,S=v&&this.selection.getBounds(v.index,v.length);S&&this.scrollRectIntoView(S)}setContents(v){return O.call(this,()=>{v=new(h())(v);const N=this.getLength(),I=this.editor.deleteText(0,N),V=this.editor.insertContents(0,v),K=this.editor.deleteText(this.getLength()-1,1);return I.compose(V).compose(K)},arguments.length>1&&void 0!==arguments[1]?arguments[1]:C.A.sources.API)}setSelection(v,S,N){null==v?this.selection.setRange(null,S||x.sources.API):([v,S,,N]=z(v,S,N),this.selection.setRange(new g.Q(Math.max(0,v),S),N),N!==C.A.sources.SILENT&&this.scrollSelectionIntoView())}setText(v){let S=arguments.length>1&&void 0!==arguments[1]?arguments[1]:C.A.sources.API;const N=(new(h())).insert(v);return this.setContents(N,S)}update(){let v=arguments.length>0&&void 0!==arguments[0]?arguments[0]:C.A.sources.USER;const S=this.scroll.update(v);return this.selection.update(v),S}updateContents(v){return O.call(this,()=>(v=new(h())(v),this.editor.applyDelta(v)),arguments.length>1&&void 0!==arguments[1]?arguments[1]:C.A.sources.API,!0)}}function b(D){return"string"==typeof D?document.querySelector(D):D}function B(D){return Object.entries(D??{}).reduce((v,S)=>{let[N,I]=S;return{...v,[N]:!0===I?{}:I}},{})}function E(D){return Object.fromEntries(Object.entries(D).filter(v=>void 0!==v[1]))}function O(D,v,S,N){if(!this.isEnabled()&&v===C.A.sources.USER&&!this.allowReadOnlyEdits)return new(h());let I=null==S?null:this.getSelection();const V=this.editor.delta,K=D();if(null!=I&&(!0===S&&(S=I.index),null==N?I=F(I,K,v):0!==N&&(I=F(I,S,N,v)),this.setSelection(I,C.A.sources.SILENT)),K.length()>0){const et=[C.A.events.TEXT_CHANGE,K,V,v];this.emitter.emit(C.A.events.EDITOR_CHANGE,...et),v!==C.A.sources.SILENT&&this.emitter.emit(...et)}return K}function z(D,v,S,N,I){let V={};return"number"==typeof D.index&&"number"==typeof D.length?"number"!=typeof v?(I=N,N=S,S=v,v=D.length,D=D.index):(v=D.length,D=D.index):"number"!=typeof v&&(I=N,N=S,S=v,v=0),"object"==typeof S?(V=S,I=N):"string"==typeof S&&(null!=N?V[S]=N:I=S),[D,v,V,I=I||C.A.sources.API]}function F(D,v,S,N){const I="number"==typeof S?S:0;if(null==D)return null;let V,K;return[V,K]=[D.index,D.index+D.length].map(v&&"function"==typeof v.transformPosition?et=>v.transformPosition(et,N!==C.A.sources.USER):et=>et<v||et===v&&N===C.A.sources.USER?et:I>=0?et+I:Math.max(v,et+I)),new g.Q(V,K-V)}},8298:function(s,r,n){"use strict";n.d(r,{Q:function(){return u}});var a=n(6003),l=n(5123),c=n(3707),h=n(5374);const d=(0,n(6078).A)("quill:selection");class u{constructor(y){let w=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this.index=y,this.length=w}}function p(f,y){return f.contains(y)}r.A=class{constructor(f,y){this.emitter=y,this.scroll=f,this.composing=!1,this.mouseDown=!1,this.root=this.scroll.domNode,this.cursor=this.scroll.create("cursor",this),this.savedRange=new u(0,0),this.lastRange=this.savedRange,this.lastNative=null,this.handleComposition(),this.handleDragging(),this.emitter.listenDOM("selectionchange",document,()=>{this.mouseDown||this.composing||setTimeout(this.update.bind(this,h.A.sources.USER),1)}),this.emitter.on(h.A.events.SCROLL_BEFORE_UPDATE,()=>{if(!this.hasFocus())return;const w=this.getNativeRange();null!=w&&w.start.node!==this.cursor.textNode&&this.emitter.once(h.A.events.SCROLL_UPDATE,(g,_)=>{try{this.root.contains(w.start.node)&&this.root.contains(w.end.node)&&this.setNativeRange(w.start.node,w.start.offset,w.end.node,w.end.offset);const L=_.some(M=>"characterData"===M.type||"childList"===M.type||"attributes"===M.type&&M.target===this.root);this.update(L?h.A.sources.SILENT:g)}catch{}})}),this.emitter.on(h.A.events.SCROLL_OPTIMIZE,(w,g)=>{if(g.range){const{startNode:_,startOffset:L,endNode:M,endOffset:j}=g.range;this.setNativeRange(_,L,M,j),this.update(h.A.sources.SILENT)}}),this.update(h.A.sources.SILENT)}handleComposition(){this.emitter.on(h.A.events.COMPOSITION_BEFORE_START,()=>{this.composing=!0}),this.emitter.on(h.A.events.COMPOSITION_END,()=>{if(this.composing=!1,this.cursor.parent){const f=this.cursor.restore(
vendor: 5,016 bytes, line 1
1);if(!f)return;setTimeout(()=>{this.setNativeRange(f.startNode,f.startOffset,f.endNode,f.endOffset)},1)}})}handleDragging(){this.emitter.listenDOM("mousedown",document.body,()=>{this.mouseDown=!0}),this.emitter.listenDOM("mouseup",document.body,()=>{this.mouseDown=!1,this.update(h.A.sources.USER)})}focus(){this.hasFocus()||(this.root.focus({preventScroll:!0}),this.setRange(this.savedRange))}format(f,y){this.scroll.update();const w=this.getNativeRange();if(null!=w&&w.native.collapsed&&!this.scroll.query(f,a.Scope.BLOCK)){if(w.start.node!==this.cursor.textNode){const g=this.scroll.find(w.start.node,!1);if(null==g)return;if(g instanceof a.LeafBlot){const _=g.split(w.start.offset);g.parent.insertBefore(this.cursor,_)}else g.insertBefore(this.cursor,w.start.node);this.cursor.attach()}this.cursor.format(f,y),this.scroll.optimize(),this.setNativeRange(this.cursor.textNode,this.cursor.textNode.data.length),this.update()}}getBounds(f){let y=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;const w=this.scroll.length();let g;f=Math.min(f,w-1),y=Math.min(f+y,w-1)-f;let[_,L]=this.scroll.leaf(f);if(null==_)return null;if(y>0&&L===_.length()){const[X]=this.scroll.leaf(f+1);if(X){const[U]=this.scroll.line(f),[A]=this.scroll.line(f+1);U===A&&(_=X,L=0)}}[g,L]=_.position(L,!0);const M=document.createRange();if(y>0)return M.setStart(g,L),[_,L]=this.scroll.leaf(f+y),null==_?null:([g,L]=_.position(L,!0),M.setEnd(g,L),M.getBoundingClientRect());let j,H="left";if(g instanceof Text){if(!g.data.length)return null;L<g.data.length?(M.setStart(g,L),M.setEnd(g,L+1)):(M.setStart(g,L-1),M.setEnd(g,L),H="right"),j=M.getBoundingClientRect()}else{if(!(_.domNode instanceof oe))return null;j=_.domNode.getBoundingClientRect(),L>0&&(H="right")}return{bottom:j.top+j.height,height:j.height,left:j[H],right:j[H],top:j.top,width:0}}getNativeRange(){const f=document.getSelection();if(null==f||f.rangeCount<=0)return null;const y=f.getRangeAt(0);if(null==y)return null;const w=this.normalizeNative(y);return d.info("getNativeRange",w),w}getRange(){const f=this.scroll.domNode;if("isConnected"in f&&!f.isConnected)return[null,null];const y=this.getNativeRange();return null==y?[null,null]:[this.normalizedToRange(y),y]}hasFocus(){return document.activeElement===this.root||null!=document.activeElement&&p(this.root,document.activeElement)}normalizedToRange(f){const y=[[f.start.node,f.start.offset]];f.native.collapsed||y.push([f.end.node,f.end.offset]);const w=y.map(L=>{const[M,j]=L,H=this.scroll.find(M,!0),X=H.offset(this.scroll);return 0===j?X:H instanceof a.LeafBlot?X+H.index(M,j):X+H.length()}),g=Math.min(Math.max(...w),this.scroll.length()-1),_=Math.min(g,...w);return new u(_,g-_)}normalizeNative(f){if(!p(this.root,f.startContainer)||!f.collapsed&&!p(this.root,f.endContainer))return null;const y={start:{node:f.startContainer,offset:f.startOffset},end:{node:f.endContainer,offset:f.endOffset},native:f};return[y.start,y.end].forEach(w=>{let{node:g,offset:_}=w;for(;!(g instanceof Text)&&g.childNodes.length>0;)if(g.childNodes.length>_)g=g.childNodes[_],_=0;else{if(g.childNodes.length!==_)break;g=g.lastChild,_=g instanceof Text?g.data.length:g.childNodes.length>0?g.childNodes.length:g.childNodes.length+1}w.node=g,w.offset=_}),y}rangeToNative(f){const y=this.scroll.length(),w=(g,_)=>{g=Math.min(y-1,g);const[L,M]=this.scroll.leaf(g);return L?L.position(M,_):[null,-1]};return[...w(f.index,!1),...w(f.index+f.length,!0)]}setNativeRange(f,y){let w=arguments.length>2&&void 0!==arguments[2]?arguments[2]:f,g=arguments.length>3&&void 0!==arguments[3]?arguments[3]:y,_=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(d.info("setNativeRange",f,y,w,g),null!=f&&(null==this.root.parentNode||null==f.parentNode||null==w.parentNode))return;const L=document.getSelection();if(null!=L)if(null!=f){this.hasFocus()||this.root.focus({preventScroll:!0});const{native:M}=this.getNativeRange()||{};if(null==M||_||f!==M.startContainer||y!==M.startOffset||w!==M.endContainer||g!==M.endOffset){f instanceof oe&&"BR"===f.tagName&&(y=Array.from(f.parentNode.childNodes).indexOf(f),f=f.parentNode),w instanceof oe&&"BR"===w.tagName&&(g=Array.from(w.parentNode.childNodes).indexOf(w),w=w.parentNode);const j=document.createRange();j.setStart(f,y),j.setEnd(w,g),L.removeAllRanges(),L.addRange(j)}}else L.removeAllRanges(),this.root.blur()}setRange(f){let y=arguments.length>1&&void 0!==arguments[1]&&arguments[1],w=arguments.length>2&&void 0!==arguments[2]?arguments[2]:h.A.sources.API;if("string"==typeof y&&(w=y,y=!1),d.info("setRange",f),null!=f){const g=this.rangeToNative(f);this.setNativeRange(...g,y)}else this.setNativeRange(null);this.update(w)}update(){let f=arguments.length>0&&void 0!==arguments[0]?arguments[0]:h.A.sources.USER;const y=this.lastRange,[w,g]=this.getRange();if(this.lastRange=w,this.lastNative=g,null!=this.lastRange&&(this.savedRange=this.lastRange),!(0,l.A)(y,this.lastRange)){if(!this.composing&&null!=g&&g.native.collapsed&&g.start.node!==this.cursor.textNode){const L=this.cursor.restore(
1);L&&this.setNativeRange(L.startNode,L.startOffset,L.endNode,L.endOffset)}const _=[h.A.events.SELECTION_CHANGE,(0,c.A)(this.lastRange),(0,c.A)(y),f];this.emitter.emit(h.A.events.EDITOR_CHANGE,..._),f!==h.A.sources.SILENT&&this.emitter.emit(..._)}}}},9609:function(s,r){"use strict";class n{static DEFAULTS={modules:{}};static themes={default:n};modules={};constructor(l,c){this.quill=l,this.options=c}init(){Object.keys(this.options.modules).forEach(l=>{null==this.modules[l]&&this.addModule(l)})}addModule(l){const c=this.quill.constructor.import(`modules/${l}`);return this.modules[l]=new c(this.quill,this.options.modules[l]||{}),this.modules[l]}}r.A=n},8276:function(s,r,n){"use strict";n.d(r,{Hu:function(){return d},gS:function(){return c},qh:function(){return h}});var a=n(6003);const l={scope:a.Scope.BLOCK,whitelist:["right","center","justify"]},c=new a.Attributor("align","align",l),h=new a.ClassAttributor("align","ql-align",l),d=new a.StyleAttributor("align","text-align",l)},9541:function(s,r,n){"use strict";n.d(r,{l:function(){return c},s:function(){return h}});var a=n(6003),l=n(8638);const c=new a.ClassAttributor("background","ql-bg",{scope:a.Scope.INLINE}),h=new l.a2("background","background-color",{scope:a.Scope.INLINE})},9404:function(s,r,n){"use strict";n.d(r,{Ay:function(){return y},Cy:function(){return w},EJ:function(){return f}});var a=n(9698),l=n(3036),c=n(4541),h=n(4850),d=n(5508),u=n(580),p=n(6142);class f extends u.A{static create(_){const L=super.create(_);return L.setAttribute("spellcheck","false"),L}code(_,L){return this.children.map(M=>M.length()<=1?"":M.domNode.innerText).join("\n").slice(_,_+L)}html(_,L){return`<pre>\n${(0,d.X)(this.code(_,L))}\n</pre>`}}class y extends a.Ay{static TAB="  ";static register(){p.Ay.register(f)}}class w extends h.A{}w.blotName="code",w.tagName="CODE",y.blotName="code-block",y.className="ql-code-block",y.tagName="DIV",f.blotName="code-block-container",f.className="ql-code-block-container",f.tagName="DIV",f.allowedChildren=[y],y.allowedChildren=[d.A,l.A,c.A],y.requiredContainer=f},8638:function(s,r,n){"use strict";n.d(r,{JM:function(){return h},a2:function(){return l},g3:function(){return c}});var a=n(6003);class l extends a.StyleAttributor{value(u){let p=super.value(u);return p.startsWith("rgb(")?(p=p.replace(/^[^\d]+/,"").replace(/[^\d]+$/,""),`#${p.split(",").map(f=>`00${parseInt(f,10).toString(16)}`.slice(-2)).join("")}`):p}}const c=new a.ClassAttributor("color","ql-color",{scope:a.Scope.INLINE}),h=new l("color","color",{scope:a.Scope.INLINE})},7912:function(s,r,n){"use strict";n.d(r,{Mc:function(){return c},VL:function(){return d},sY:function(){return h}});var a=n(6003);const l={scope:a.Scope.BLOCK,whitelist:["rtl"]},c=new a.Attributor("direction","dir",l),h=new a.ClassAttributor("direction","ql-direction",l),d=new a.StyleAttributor("direction","direction",l)},6772:function(s,r,n){"use strict";n.d(r,{q:function(){return c},z:function(){return d}});var a=n(6003);const l={scope:a.Scope.INLINE,whitelist:["serif","monospace"]},c=new a.ClassAttributor("font","ql-font",l),d=new class h extends a.StyleAttributor{value(p){return super.value(p).replace(/["']/g,"")}}("font","font-family",l)},664:function(s,r,n){"use strict";n.d(r,{U:function(){return l},r:function(){return c}});var a=n(6003);const l=new a.ClassAttributor("size","ql-size",{scope:a.Scope.INLINE,whitelist:["small","large","huge"]}),c=new a.StyleAttributor("size","font-size",{scope:a.Scope.INLINE,whitelist:["10px","18px","32px"]})},584:function(s,r,n){"use strict";n.d(r,{Ay:function(){return pt},hV:function(){return x}});var a=n(6003),l=n(5232),c=n.n(l),h=n(9698),d=n(6078),u=n(4266),p=n(6142),f=n(8276),y=n(9541),w=n(9404),g=n(8638),_=n(7912),L=n(6772),M=n(664),j=n(8123);const H=/font-weight:\s*normal/,X=["P","OL","UL"],U=E=>E&&X.includes(E.tagName),A=/\bmso-list:[^;]*ignore/i,C=/\bmso-list:[^;]*\bl(\d+)/i,W=/\bmso-list:[^;]*\blevel(\d+)/i,q=[function(E){"urn:schemas-microsoft-com:office:word"===E.documentElement.getAttribute("xmlns:w")&&(O=>{const z=Array.from(O.querySelectorAll("[style*=mso-list]")),F=[],D=[];z.forEach(N=>{(N.getAttribute("style")||"").match(A)?F.push(N):D.push(N)}),F.forEach(N=>N.parentNode?.removeChild(N));const v=O.documentElement.innerHTML,S=D.map(N=>((I,V)=>{const K=I.getAttribute("style"),et=K?.match(C);if(!et)return null;const it=Number(et[1]),rt=K?.match(W),ht=rt?Number(rt[1]):1,ft=new RegExp(`@list l${it}:level${ht}\\s*\\{[^\\}]*mso-level-number-format:\\s*([\\w-]+)`,"i"),dt=V.match(ft);return{id:it,indent:ht,type:dt&&"bullet"===dt[1]?"bullet":"ordered",element:I}})(N,v)).filter(N=>N);for(;S.length;){const N=[];let I=S.shift();for(;I;)N.push(I),I=S.length&&S[0]?.element===I.element.nextElementSibling&&S[0].id===I.id?S.shift():null;const V=document.createElement("ul");
1N.forEach(it=>{const rt=document.createElement("li");rt.setAttribute("data-list",it.type),it.indent>1&&rt.setAttribute("class","ql-indent-"+(it.indent-1)),rt.innerHTML=it.element.innerHTML,V.appendChild(rt)});const K=N[0]?.element,{parentNode:et}=K??{};K&&et?.replaceChild(V,K),N.slice(1).forEach(it=>{let{element:rt}=it;et?.removeChild(rt)})}})(E)},function(E){var O;E.querySelector('[id^="docs-internal-guid-"]')&&(O=E,Array.from(O.querySelectorAll('b[style*="font-weight"]')).filter(z=>z.getAttribute("style")?.match(H)).forEach(z=>{const F=O.createDocumentFragment();F.append(...z.childNodes),z.parentNode?.replaceChild(F,z)}),(O=>{Array.from(O.querySelectorAll("br")).filter(z=>U(z.previousElementSibling)&&U(z.nextElementSibling)).forEach(z=>{z.parentNode?.removeChild(z)})})(E))}],Z=(0,d.A)("quill:clipboard"),at=[[Node.TEXT_NODE,function(E,O,z){let F=E.data;if("O:P"===E.parentElement?.tagName)return O.insert(F.trim());if(!m(E)){if(0===F.trim().length&&F.includes("\n")&&(S=z,!(v=E).previousElementSibling||!v.nextElementSibling||lt(v.previousElementSibling,S)||lt(v.nextElementSibling,S)))return O;const D=(v,S)=>
1{const N=S.replace(/[^\u00a0]/g,"");return N.length<1&&v?" ":N};F=F.replace(/\r\n/g," ").replace(/\n/g," "),F=F.replace(/\s\s+/g,D.bind(D,!0)),(null==E.previousSibling&&null!=E.parentElement&&lt(E.parentElement,z)||E.previousSibling instanceof oe&&lt(E.previousSibling,z))&&(F=F.replace(/^\s+/,D.bind(D,!1))),(null==E.nextSibling&&null!=E.parentElement&&lt(E.parentElement,z)||E.nextSibling instanceof oe&&lt(E.nextSibling,z))&&(F=F.replace(/\s+$/,D.bind(D,!1)))}var v,S;return O.insert(F)}],[Node.TEXT_NODE,B],["br",function(E,O){return J(O,"\n")||O.insert("\n"),O}],[Node.ELEMENT_NODE,B],[Node.ELEMENT_NODE,function(E,O,z){const F=z.query(E);if(null==F)return O;if(F.prototype instanceof a.EmbedBlot){const D={},v=F.value(E);if(null!=v)return D[F.blotName]=v,(new(c())).insert(D,F.formats(E,z))}else if(F.prototype instanceof a.BlockBlot&&!J(O,"\n")&&O.insert("\n"),"blotName"in F&&"formats"in F&&"function"==typeof F.formats)return st(O,F.blotName,F.formats(E,z),z);return O}],[Node.ELEMENT_NODE,function(E,O,z){const F=a.Attributor.keys(E),D=a.
1ClassAttributor.keys(E),v=a.StyleAttributor.keys(E),S={};return F.concat(D).concat(v).forEach(N=>{let I=z.query(N,a.Scope.ATTRIBUTE);null!=I&&(S[I.attrName]=I.value(E),S[I.attrName])||(I=nt[N],null==I||I.attrName!==N&&I.keyName!==N||(S[I.attrName]=I.value(E)||void 0),I=ct[N],null==I||I.attrName!==N&&I.keyName!==N||(I=ct[N],S[I.attrName]=I.value(E)||void 0))}),Object.entries(S).reduce((N,I)=>{let[V,K]=I;return st(N,V,K,z)},O)}],[Node.ELEMENT_NODE,function(E,O,z){const F={},D=E.style||{};return"italic"===D.fontStyle&&(F.italic=!0),"underline"===D.textDecoration&&(F.underline=!0),"line-through"===D.textDecoration&&(F.strike=!0),(D.fontWeight?.startsWith("bold")||parseInt(D.fontWeight,10)>=700)&&(F.bold=!0),O=Object.entries(F).reduce((v,S)=>{let[N,I]=S;return st(v,N,I,z)},O),parseFloat(D.textIndent||0)>0?(new(c())).insert("\t").concat(O):O}],["li",function(E,O,z){const F=z.query(E);if(null==F||"list"!==F.blotName||!J(O,"\n"))return O;let D=-1,v=E.parentNode;for(;null!=v;)["OL","UL"].includes(v.tagName)&&(D+=1),v=v.parentNode;return D<=0?O:O.reduce((S,N)=>N.insert?N.attributes&&"number"==typeof N.attributes.indent?S.push(N):S.insert(N.insert,{indent:D,...N.attributes||{}}):S,new(c()))}],["ol, ul",function(E,O,z){let D="OL"===E.tagName?"ordered":"bullet";const v=E.getAttribute("data-checked");return v&&(D="true"===v?"checked":"unchecked"),st(O,"list",D,z)}],["pre",function(E,O,z){const F=z.query("code-block");return st(O,"code-block",!F||!("formats"in F)||"function"!=typeof F.formats||F.formats(E,z),z)}],["tr",function(E,O,z){const F="TABLE"===E.parentElement?.tagName?E.parentElement:E.parentElement?.parentElement;return null!=F?st(O,"table",Array.from(F.querySelectorAll("tr")).indexOf(E)+1,z):O}],["b",b("bold")],["i",b("italic")],["strike",b("strike")],["style",function(){return new(c())}]],nt=[f.gS,_.Mc].reduce((E,O)=>(E[O.keyName]=O,E),{}),ct=[f.Hu,y.s,g.JM,_.VL,L.z,M.r].reduce((E,O)=>(E[O.keyName]=O,E),{});class pt extends u.A{static DEFAULTS={matchers:[]};constructor(O,z){super(O,z),this.quill.root.addEventListener("copy",F=>this.onCaptureCopy(F,!1)),this.quill.root.addEventListener("cut",F=>this.onCaptureCopy(F,!0)),this.quill.root.addEventListener("paste",this.onCapturePaste.bind(this)),this.matchers=[],at.concat(this.options.matchers??[]).forEach(F=>{let[D,v]=F;this.addMatcher(D,v)})}addMatcher(O,z){this.matchers.push([O,z])}convert(O){let{html:z,text:F}=O,D=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(D[w.Ay.blotName])return(new(c())).insert(F||"",{[w.Ay.blotName]:D[w.Ay.blotName]});if(!z)return(new(c())).insert(F||"",D);const v=this.convertHTML(z);return J(v,"\n")&&(null==v.ops[v.ops.length-1].attributes||D.table)?v.compose((new(c())).retain(v.length()-1).delete(1)):v}normalizeHTML(O){var z;(z=O).documentElement&&q.forEach(F=>{F(z)})}convertHTML(O){const z=(new DOMParser).parseFromString(O,"text/html");this.normalizeHTML(z);const F=z.body,D=new WeakMap,[v,S]=this.prepareMatching(F,D);return x(this.quill.scroll,F,v,S,D)}dangerouslyPasteHTML(O,z){let F=arguments.length>2&&void 0!==arguments[2]?arguments[2]:p.Ay.sources.API;if("string"==typeof O){const D=this.convert({html:O,text:""});this.quill.setContents(D,z),this.quill.setSelection(0,p.Ay.sources.SILENT)}else{const D=this.convert({html:z,text:""});this.quill.updateContents((new(c())).retain(O).concat(D),F),this.quill.setSelection(O+D.length(),p.Ay.sources.SILENT)}}onCaptureCopy(O){let z=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(O.defaultPrevented)return;O.preventDefault();const[F]=this.quill.selection.getRange();if(null==F)return;const{html:D,text:v}=this.onCopy(F,z);O.clipboardData?.setData("text/plain",v),O.clipboardData?.setData("text/html",D),z&&(0,j.Xo)({range:F,quill:this.quill})}normalizeURIList(O){return O.split(/\r?\n/).filter(z=>"#"!==z[0]).join("\n")}onCapturePaste(O){if(O.defaultPrevented||!this.quill.isEnabled())return;O.preventDefault();const z=this.quill.getSelection(!0);if(null==z)return;const F=O.clipboardData?.getData("text/html");let D=O.clipboardData?.getData("text/plain");
1if(!F&&!D){const S=O.clipboardData?.getData("text/uri-list");S&&(D=this.normalizeURIList(S))}const v=Array.from(O.clipboardData?.files||[]);if(!F&&v.length>0)this.quill.uploader.upload(z,v);else{if(F&&v.length>0){const S=(new DOMParser).parseFromString(F,"text/html");if(1===S.body.childElementCount&&"IMG"===S.body.firstElementChild?.tagName)return void this.quill.uploader.upload(z,v)}this.onPaste(z,{html:F,text:D})}}onCopy(O){const z=this.quill.getText(O);return{html:this.quill.getSemanticHTML(O),text:z}}onPaste(O,z){let{text:F,html:D}=z;const v=this.quill.getFormat(O.index),S=this.convert({text:F,html:D},v);Z.log("onPaste",S,{text:F,html:D});const N=(new(c())).retain(O.index).delete(O.length).concat(S);this.quill.updateContents(N,p.Ay.sources.USER),this.quill.setSelection(N.length()-O.length,p.Ay.sources.SILENT),this.quill.scrollSelectionIntoView()}prepareMatching(O,z){const F=[],D=[];return this.matchers.forEach(v=>{const[S,N]=v;switch(S){case Node.TEXT_NODE:D.push(N);break;case Node.ELEMENT_NODE:F.push(N);break;default:Array.from(O.querySelectorAll(S)).forEach(I=>{z.has(I)?z.get(I)?.push(N):z.set(I,[N])})}}),[F,D]}}function st(E,O,z,F){return F.query(O)?E.reduce((D,v)=>v.insert?v.attributes&&v.attributes[O]?D.push(v):D.insert(v.insert,{...z?{[O]:z}:{},...v.attributes}):D,new(c())):E}function J(E,O){let z="";for(let F=E.ops.length-1;F>=0&&z.length<O.length;--F){const D=E.ops[F];if("string"!=typeof D.insert)break;z=D.insert+z}return z.slice(-1*O.length)===O}function lt(E,O){if(!(E instanceof oe))return!1;const z=O.query(E);return!(z&&z.prototype instanceof a.EmbedBlot)&&["address","article","blockquote","canvas","dd","div","dl","dt","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","iframe","li","main","nav","ol","output","p","pre","section","table","td","tr","ul","video"].includes(E.tagName.toLowerCase())}const P=new WeakMap;function m(E){return null!=E&&(P.has(E)||P.set(E,"PRE"===E.tagName||m(E.parentNode)),P.get(E))}function x(E,O,z,F,D){return O.nodeType===O.TEXT_NODE?F.reduce((v,S)=>S(O,v,E),new(c())):O.nodeType===O.ELEMENT_NODE?Array.from(O.childNodes||[]).reduce((v,S)=>{let N=x(E,S,z,F,D);return S.nodeType===O.ELEMENT_NODE&&(N=z.reduce((I,V)=>V(S,I,E),N),N=(D.get(S)||[]).reduce((I,V)=>V(S,I,E),N)),v.concat(N)},new(c())):new(c())}function b(E){return(O,z,F)=>st(z,E,!0,F)}function B(E,O,z){if(!J(O,"\n")){if(lt(E,z)&&(E.childNodes.length>0||E instanceof HTMLParagraphElement))return O.insert("\n");if(O.length()>0&&E.nextSibling){let F=E.nextSibling;for(;null!=F;){if(lt(F,z))return O.insert("\n");const D=z.query(F);if(D&&D.prototype instanceof h.zo)return O.insert("\n");F=F.firstChild}}}return O}},8123:function(s,r,n){"use strict";n.d(r,{Ay:function(){return g},Xo:function(){return X}});var a=n(5123),l=n(3707),c=n(5232),h=n.n(c),d=n(6003),u=n(6142),p=n(6078),f=n(4266);const y=(0,p.A)("quill:keyboard"),w=/Mac/i.test(navigator.platform)?"metaKey":"ctrlKey";class g extends f.A{static match(A,C){return!["altKey","ctrlKey","metaKey","shiftKey"].some(W=>!!C[W]!==A[W]&&null!==C[W])&&(C.key===A.key||C.key===A.which)}constructor(A,C){super(A,C),this.bindings={},Object.keys(this.options.bindings).forEach(W=>{this.options.bindings[W]&&this.addBinding(this.options.bindings[W])}),this.addBinding({key:"Enter",shiftKey:null},this.handleEnter),this.addBinding({key:"Enter",metaKey:null,ctrlKey:null,altKey:null},()=>{}),/Firefox/i.test(navigator.userAgent)?(this.addBinding({key:"Backspace"},{collapsed:!0},this.handleBackspace),this.addBinding({key:"Delete"},{collapsed:!0},this.handleDelete)):(this.addBinding({key:"Backspace"},{collapsed:!0,prefix:/^.?$/},this.handleBackspace),this.addBinding({key:"Delete"},{collapsed:!0,suffix:/^.?$/},this.handleDelete)),this.addBinding({key:"Backspace"},{collapsed:!1},this.handleDeleteRange),this.addBinding({key:"Delete"},{collapsed:!1},this.handleDeleteRange),this.addBinding({key:"Backspace",altKey:null,ctrlKey:null,metaKey:null,shiftKey:null},{collapsed:!0,offset:0},this.handleBackspace),this.listen()}addBinding(A){let C=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}
vendor: 21,429 bytes, line 1
1,W=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const q=function(Z){if("string"==typeof Z||"number"==typeof Z)Z={key:Z};else{if("object"!=typeof Z)return null;Z=(0,l.A)(Z)}return Z.shortKey&&(Z[w]=Z.shortKey,delete Z.shortKey),Z}(A);null!=q?("function"==typeof C&&(C={handler:C}),"function"==typeof W&&(W={handler:W}),(Array.isArray(q.key)?q.key:[q.key]).forEach(Z=>{const at={...q,key:Z,...C,...W};this.bindings[at.key]=this.bindings[at.key]||[],this.bindings[at.key].push(at)})):y.warn("Attempted to add invalid keyboard binding",q)}listen(){this.quill.root.addEventListener("keydown",A=>{if(A.defaultPrevented||A.isComposing||229===A.keyCode&&("Enter"===A.key||"Backspace"===A.key))return;const C=(this.bindings[A.key]||[]).concat(this.bindings[A.which]||[]).filter(m=>g.match(A,m));if(0===C.length)return;const W=u.Ay.find(A.target,!0);if(W&&W.scroll!==this.quill.scroll)return;const q=this.quill.getSelection();if(null==q||!this.quill.hasFocus())return;const[Z,at]=this.quill.getLine(q.index),[nt,ct]=this.quill.getLeaf(q.index),[pt,st]=0===q.length?[nt,ct]:this.quill.getLeaf(q.index+q.length),J=nt instanceof d.TextBlot?nt.value().slice(0,ct):"",lt=pt instanceof d.TextBlot?pt.value().slice(st):"",P={collapsed:0===q.length,empty:0===q.length&&Z.length()<=1,format:this.quill.getFormat(q),line:Z,offset:at,prefix:J,suffix:lt,event:A};C.some(m=>{if(null!=m.collapsed&&m.collapsed!==P.collapsed||null!=m.empty&&m.empty!==P.empty||null!=m.offset&&m.offset!==P.offset)return!1;if(Array.isArray(m.format)){if(m.format.every(x=>null==P.format[x]))return!1}else if("object"==typeof m.format&&!Object.keys(m.format).every(x=>!0===m.format[x]?null!=P.format[x]:!1===m.format[x]?null==P.format[x]:(0,a.A)(m.format[x],P.format[x])))return!1;return!(null!=m.prefix&&!m.prefix.test(P.prefix)||null!=m.suffix&&!m.suffix.test(P.suffix)||!0===m.handler.call(this,q,P,m))})&&A.preventDefault()})}handleBackspace(A,C){const W=/[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(C.prefix)?2:1;if(0===A.index||this.quill.getLength()<=1)return;let q={};const[Z]=this.quill.getLine(A.index);let at=(new(h())).retain(A.index-W).delete(W);if(0===C.offset){const[nt]=this.quill.getLine(A.index-1);if(nt&&!("block"===nt.statics.blotName&&nt.length()<=1)){const ct=Z.formats(),pt=this.quill.getFormat(A.index-1,1);if(q=c.AttributeMap.diff(ct,pt)||{},Object.keys(q).length>0){const st=(new(h())).retain(A.index+Z.length()-2).retain(1,q);at=at.compose(st)}}}this.quill.updateContents(at,u.Ay.sources.USER),this.quill.focus()}handleDelete(A,C){const W=/^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(C.suffix)?2:1;if(A.index>=this.quill.getLength()-W)return;let q={};const[Z]=this.quill.getLine(A.index);let at=(new(h())).retain(A.index).delete(W);if(C.offset>=Z.length()-1){const[nt]=this.quill.getLine(A.index+1);if(nt){const ct=Z.formats(),pt=this.quill.getFormat(A.index,1);q=c.AttributeMap.diff(ct,pt)||{},Object.keys(q).length>0&&(at=at.retain(nt.length()-1).retain(1,q))}}this.quill.updateContents(at,u.Ay.sources.USER),this.quill.focus()}handleDeleteRange(A){X({range:A,quill:this.quill}),this.quill.focus()}handleEnter(A,C){const W=Object.keys(C.format).reduce((Z,at)=>(this.quill.scroll.query(at,d.Scope.BLOCK)&&!Array.isArray(C.format[at])&&(Z[at]=C.format[at]),Z),{}),q=(new(h())).retain(A.index).delete(A.length).insert("\n",W);this.quill.updateContents(q,u.Ay.sources.USER),this.quill.setSelection(A.index+1,u.Ay.sources.SILENT),this.quill.focus()}}const _={bindings:{bold:j("bold"),italic:j("italic"),underline:j("underline"),indent:{key:"Tab",format:["blockquote","indent","list"],handler(U,A){return!(!A.collapsed||0===A.offset)||(this.quill.format("indent","+1",u.Ay.sources.USER),!1)}},outdent:{key:"Tab",shiftKey:!0,format:["blockquote","indent","list"],handler(U,A){return!(!A.collapsed||0===A.offset)||(this.quill.format("indent","-1",u.Ay.sources.USER),!1)}},"outdent backspace":{key:"Backspace",collapsed:!0,shiftKey:null,metaKey:null,ctrlKey:null,altKey:null,format:["indent","list"],offset:0,handler(U,A){null!=A.format.indent?this.quill.format("indent","-1",u.Ay.sources.USER):null!=A.format.list&&this.quill.format("list",!1,u.Ay.sources.USER)}},"indent code-block":L(!0),"outdent code-block":L(!1),"remove tab":{key:"Tab",shiftKey:!0,collapsed:!0,prefix:/\t$/,handler(U){this.quill.deleteText(U.index-1,1,u.Ay.sources.USER)}},tab:{key:"Tab",handler(U,A){if(A.format.table)return!0;this.quill.history.cutoff();const C=(new(h())).retain(U.index).delete(U.length).insert("\t");return this.quill.updateContents(C,u.Ay.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(U.index+1,u.Ay.sources.SILENT),!1}},"blockquote empty enter":{key:"Enter",collapsed:!0,format:["blockquote"],empty:!0,handler(){this.quill.format("blockquote",!1,u.Ay.sources.USER)}},"list empty enter":{key:"Enter",collapsed:!0,format:["list"],empty:!0,handler(U,A){const C={list:!1};A.format.indent&&(C.indent=!1),this.quill.formatLine(U.index,U.length,C,u.Ay.sources.USER)}},"checklist enter":{key:"Enter",collapsed:!0,format:{list:"checked"},handler(U){const[A,C]=this.quill.getLine(U.index),W={...A.formats(),list:"checked"},q=(new(h())).retain(U.index).insert("\n",W).retain(A.length()-C-1).retain(1,{list:"unchecked"});this.quill.updateContents(q,u.Ay.sources.USER),this.quill.setSelection(U.index+1,u.Ay.sources.SILENT),this.quill.scrollSelectionIntoView()}},"header enter":{key:"Enter",collapsed:!0,format:["header"],suffix:/^$/,handler(U,A){const[C,W]=this.quill.getLine(U.index),q=(new(h())).retain(U.index).insert("\n",A.format).retain(C.length()-W-1).retain(1,{header:null});this.quill.updateContents(q,u.Ay.sources.USER),this.quill.setSelection(U.index+1,u.Ay.sources.SILENT),this.quill.scrollSelectionIntoView()}},"table backspace":{key:"Backspace",format:["table"],collapsed:!0,offset:0,handler(){}},"table delete":{key:"Delete",format:["table"],collapsed:!0,suffix:/^$/,handler(){}},"table enter":{key:"Enter",shiftKey:null,format:["table"],handler(U){const A=this.quill.getModule("table");if(A){const[C,W,q,Z]=A.getTable(U),at=(st=q,null==(pt=W).prev&&null==pt.next?null==st.prev&&null==st.next?0===Z?-1:1:null==st.prev?-1:1:null==pt.prev?-1:null==pt.next?1:null);if(null==at)return;let nt=C.offset();if(at<0){const ct=(new(h())).retain(nt).insert("\n");this.quill.updateContents(ct,u.Ay.sources.USER),this.quill.setSelection(U.index+1,U.length,u.Ay.sources.SILENT)}else if(at>0){nt+=C.length();const ct=(new(h())).retain(nt).insert("\n");this.quill.updateContents(ct,u.Ay.sources.USER),this.quill.setSelection(nt,u.Ay.sources.USER)}}var pt,st}},"table tab":{key:"Tab",shiftKey:null,format:["table"],handler(U,A){const{event:C,line:W}=A,q=W.offset(this.quill.scroll);this.quill.setSelection(C.shiftKey?q-1:q+W.length(),u.Ay.sources.USER)}},"list autofill":{key:" ",shiftKey:null,collapsed:!0,format:{"code-block":!1,blockquote:!1,table:!1},prefix:/^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,handler(U,A){if(null==this.quill.scroll.query("list"))return!0;const{length:C}=A.prefix,[W,q]=this.quill.getLine(U.index);if(q>C)return!0;let Z;switch(A.prefix.trim()){case"[]":case"[ ]":Z="unchecked";break;case"[x]":Z="checked";break;case"-":case"*":Z="bullet";break;default:Z="ordered"}this.quill.insertText(U.index," ",u.Ay.sources.USER),this.quill.history.cutoff();const at=(new(h())).retain(U.index-q).delete(C+1).retain(W.length()-2-q).retain(1,{list:Z});return this.quill.updateContents(at,u.Ay.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(U.index-C,u.Ay.sources.SILENT),!1}},"code exit":{key:"Enter",collapsed:!0,format:["code-block"],prefix:/^$/,suffix:/^\s*$/,handler(U){const[A,C]=this.quill.getLine(U.index);let W=2,q=A;for(;null!=q&&q.length()<=1&&q.formats()["code-block"];)if(q=q.prev,W-=1,W<=0){const Z=(new(h())).retain(U.index+A.length()-C-2).retain(1,{"code-block":null}).delete(1);return this.quill.updateContents(Z,u.Ay.sources.USER),this.quill.setSelection(U.index-1,u.Ay.sources.SILENT),!1}return!0}},"embed left":M("ArrowLeft",!1),"embed left shift":M("ArrowLeft",!0),"embed right":M("ArrowRight",!1),"embed right shift":M("ArrowRight",!0),"table down":H(!1),"table up":H(!0)}};function L(U){return{key:"Tab",shiftKey:!U,format:{"code-block":!0},handler(A,C){let{event:W}=C;const q=this.quill.scroll.query("code-block"),{TAB:Z}=q;if(0===A.length&&!W.shiftKey)return this.quill.insertText(A.index,Z,u.Ay.sources.USER),void this.quill.setSelection(A.index+Z.length,u.Ay.sources.SILENT);const at=0===A.length?this.quill.getLines(A.index,1):this.quill.getLines(A);let{index:nt,length:ct}=A;at.forEach((pt,st)=>{U?(pt.insertAt(0,Z),0===st?nt+=Z.length:ct+=Z.length):pt.domNode.textContent.startsWith(Z)&&(pt.deleteAt(0,Z.length),0===st?nt-=Z.length:ct-=Z.length)}),this.quill.update(u.Ay.sources.USER),this.quill.setSelection(nt,ct,u.Ay.sources.SILENT)}}}function M(U,A){return{key:U,shiftKey:A,altKey:null,["ArrowLeft"===U?"prefix":"suffix"]:/^$/,handler(C){let{index:W}=C;"ArrowRight"===U&&(W+=C.length+1);const[q]=this.quill.getLeaf(W);return!(q instanceof d.EmbedBlot&&("ArrowLeft"===U?A?this.quill.setSelection(C.index-1,C.length+1,u.Ay.sources.USER):this.quill.setSelection(C.index-1,u.Ay.sources.USER):A?this.quill.setSelection(C.index,C.length+1,u.Ay.sources.USER):this.quill.setSelection(C.index+C.length+1,u.Ay.sources.USER),1))}}}function j(U){return{key:U[0],shortKey:!0,handler(A,C){this.quill.format(U,!C.format[U],u.Ay.sources.USER)}}}function H(U){return{key:U?"ArrowUp":"ArrowDown",collapsed:!0,format:["table"],handler(A,C){const W=U?"prev":"next",q=C.line,Z=q.parent[W];if(null!=Z){if("table-row"===Z.statics.blotName){let at=Z.children.head,nt=q;for(;null!=nt.prev;)nt=nt.prev,at=at.next;const ct=at.offset(this.quill.scroll)+Math.min(C.offset,at.length()-1);this.quill.setSelection(ct,0,u.Ay.sources.USER)}}else{const at=q.table()[W];null!=at&&this.quill.setSelection(U?at.offset(this.quill.scroll)+at.length()-1:at.offset(this.quill.scroll),0,u.Ay.sources.USER)}return!1}}}function X(U){let{quill:A,range:C}=U;const W=A.getLines(C);let q={};if(W.length>1){const Z=W[0].formats(),at=W[W.length-1].formats();q=c.AttributeMap.diff(at,Z)||{}}A.deleteText(C,u.Ay.sources.USER),Object.keys(q).length>0&&A.formatLine(C.index,1,q,u.Ay.sources.USER),A.setSelection(C.index,u.Ay.sources.SILENT)}g.DEFAULTS=_},8920:function(s){"use strict";var r=Object.prototype.hasOwnProperty,n="~";function a(){}function l(u,p,f){this.fn=u,this.context=p,this.once=f||!1}function c(u,p,f,y,w){if("function"!=typeof f)throw new TypeError("The listener must be a function");var g=new l(f,y||u,w),_=n?n+p:p;return u._events[_]?u._events[_].fn?u._events[_]=[u._events[_],g]:u._events[_].push(g):(u._events[_]=g,u._eventsCount++),u}function h(u,p){0==--u._eventsCount?u._events=new a:delete u._events[p]}function d(){this._events=new a,this._eventsCount=0}Object.create&&(a.prototype=Object.create(null),(new a).__proto__||(n=!1)),d.prototype.eventNames=function(){var u,p,f=[];if(0===this._eventsCount)return f;for(p in u=this._events)r.call(u,p)&&f.push(n?p.slice(1):p);return Object.getOwnPropertySymbols?f.concat(Object.getOwnPropertySymbols(u)):f},d.prototype.listeners=function(u){var f=this._events[n?n+u:u];if(!f)return[];if(f.fn)return[f.fn];for(var y=0,w=f.length,g=new Array(w);y<w;y++)g[y]=f[y].fn;return g},d.prototype.listenerCount=function(u){var f=this._events[n?n+u:u];return f?f.fn?1:f.length:0},d.prototype.emit=function(u,p,f,y,w,g){var _=n?n+u:u;if(!this._events[_])return!1;var L,M,j=this._events[_],H=arguments.length;if(j.fn){switch(j.once&&this.removeListener(u,j.fn,void 0,!0),H){case 1:return j.fn.call(j.context),!0;case 2:return j.fn.call(j.context,p),!0;case 3:return j.fn.call(j.context,p,f),!0;case 4:return j.fn.call(j.context,p,f,y),!0;case 5:return j.fn.call(j.context,p,f,y,w),!0;case 6:return j.fn.call(j.context,p,f,y,w,g),!0}for(M=1,L=new Array(H-1);M<H;M++)L[M-1]=arguments[M];j.fn.apply(j.context,L)}else{var X,U=j.length;for(M=0;M<U;M++)switch(j[M].once&&this.removeListener(u,j[M].fn,void 0,!0),H){case 1:j[M].fn.call(j[M].context);break;case 2:j[M].fn.call(j[M].context,p);break;case 3:j[M].fn.call(j[M].context,p,f);break;case 4:j[M].fn.call(j[M].context,p,f,y);break;default:if(!L)for(X=1,L=new Array(H-1);X<H;X++)L[X-1]=arguments[X];j[M].fn.apply(j[M].context,L)}}return!0},d.prototype.on=function(u,p,f){return c(this,u,p,f,!1)},d.prototype.once=function(u,p,f){return c(this,u,p,f,!0)},d.prototype.removeListener=function(u,p,f,y){var w=n?n+u:u;if(!this._events[w])return this;if(!p)return h(this,w),this;var g=this._events[w];if(g.fn)g.fn!==p||y&&!g.once||f&&g.context!==f||h(this,w);else{for(var _=0,L=[],M=g.length;_<M;_++)(g[_].fn!==p||y&&!g[_].once||f&&g[_].context!==f)&&L.push(g[_]);L.length?this._events[w]=1===L.length?L[0]:L:h(this,w)}return this},d.prototype.removeAllListeners=function(u){var p;return u?this._events[p=n?n+u:u]&&h(this,p):(this._events=new a,this._eventsCount=0),this},d.prototype.off=d.prototype.removeListener,d.prototype.addListener=d.prototype.on,d.prefixed=n,d.EventEmitter=d,s.exports=d},5090:function(s){var r=-1,n=1,a=0;function l(A,C,W,q,Z){if(A===C)return A?[[a,A]]:[];if(null!=W){var at=function(J,lt,P){var m="number"==typeof P?{index:P,length:0}:P.oldRange,x="number"==typeof P?null:P.newRange,b=J.length,B=lt.length;if(0===m.length&&(null===x||0===x.length)){var E=m.index,O=J.slice(0,E),z=J.slice(E),F=x?x.index:null,D=E+B-b;if((null===F||F===D)&&!(D<0||D>B)){var v=lt.slice(0,D);if((I=lt.slice(D))===z){var S=Math.min(E,D);if((K=O.slice(0,S))===(it=v.slice(0,S)))return X(K,O.slice(S),v.slice(S),z)}}if(null===F||F===E){var N=E,I=(v=lt.slice(0,N),lt.slice(N));if(v===O){var V=Math.min(b-N,B-N);if((et=z.slice(z.length-V))===(rt=I.slice(I.length-V)))return X(O,z.slice(0,z.length-V),I.slice(0,I.length-V),et)}}}if(m.length>0&&x&&0===x.length){var K=J.slice(0,m.index),et=J.slice(m.index+m.length);if(!(B<(S=K.length)+(V=et.length))){var it=lt.slice(0,S),rt=lt.slice(B-V);if(K===it&&et===rt)return X(K,J.slice(S,b-V),lt.slice(S,B-V),et)}}return null}(A,C,W);if(at)return at}var nt=h(A,C),ct=A.substring(0,nt);nt=u(A=A.substring(nt),C=C.substring(nt));var pt=A.substring(A.length-nt),st=function(J,lt){var P;if(!J)return[[n,lt]];if(!lt)return[[r,J]];var m=J.length>lt.length?J:lt,x=J.length>lt.length?lt:J,b=m.indexOf(x);if(-1!==b)return P=[[n,m.substring(0,b)],[a,x],[n,m.substring(b+x.length)]],J.length>lt.length&&(P[0][0]=P[2][0]=r),P;if(1===x.length)return[[r,J],[n,lt]];var B=function(N,I){var V=N.length>I.length?N:I,K=N.length>I.length?I:N;if(V.length<4||2*K.length<V.length)return null;function et(yt,Lt,Rt){for(var Ct,mt,_t,St,Tt=yt.substring(Rt,Rt+Math.floor(yt.length/4)),Et=-1,qt="";-1!==(Et=Lt.indexOf(Tt,Et+1));){var Ht=h(yt.substring(Rt),Lt.substring(Et)),Kt=u(yt.substring(0,Rt),Lt.substring(0,Et));qt.length<Kt+Ht&&(qt=Lt.substring(Et-Kt,Et)+Lt.substring(Et,Et+Ht),Ct=yt.substring(0,Rt-Kt),mt=yt.substring(Rt+Ht),_t=Lt.substring(0,Et-Kt),St=Lt.substring(Et+Ht))}return 2*qt.length>=yt.length?[Ct,mt,_t,St,qt]:null}var it,rt,ht,ft,dt,vt=et(V,K,Math.ceil(V.length/4)),bt=et(V,K,Math.ceil(V.length/2));return vt||bt?(it=bt?vt&&vt[4].length>bt[4].length?vt:bt:vt,N.length>I.length?(rt=it[0],ht=it[1],ft=it[2],dt=it[3]):(ft=it[0],dt=it[1],rt=it[2],ht=it[3]),[rt,ht,ft,dt,it[4]]):null}(J,lt);if(B){var O=B[1],F=B[3],D=B[4],v=l(B[0],B[2]),S=l(O,F);return v.concat([[a,D]],S)}return function(N,I){for(var V=N.length,K=I.length,et=Math.ceil((V+K)/2),it=et,rt=2*et,ht=new Array(rt),ft=new Array(rt),dt=0;dt<rt;dt++)ht[dt]=-1,ft[dt]=-1;ht[it+1]=0,ft[it+1]=0;for(var vt=V-K,bt=vt%2!=0,yt=0,Lt=0,Rt=0,Ct=0,mt=0;mt<et;mt++){for(var _t=-mt+yt;_t<=mt-Lt;_t+=2){for(var St=it+_t,Tt=(Dt=_t===-mt||_t!==mt&&ht[St-1]<ht[St+1]?ht[St+1]:ht[St-1]+1)-_t;Dt<V&&Tt<K&&N.charAt(Dt)===I.charAt(Tt);)Dt++,Tt++;if(ht[St]=Dt,Dt>V)Lt+=2;else if(Tt>K)yt+=2;else if(bt&&(Ht=it+vt-_t)>=0&&Ht<rt&&-1!==ft[Ht]&&Dt>=(qt=V-ft[Ht]))return c(N,I,Dt,Tt)}for(var Et=-mt+Rt;Et<=mt-Ct;Et+=2){for(var qt,Ht=it+Et,Kt=(qt=Et===-mt||Et!==mt&&ft[Ht-1]<ft[Ht+1]?ft[Ht+1]:ft[Ht-1]+1)-Et;qt<V&&Kt<K&&N.charAt(V-qt-1)===I.charAt(K-Kt-1);)qt++,Kt++;if(ft[Ht]=qt,qt>V)Ct+=2;else if(Kt>K)Rt+=2;else if(!bt){var Dt;if((St=it+vt-Et)>=0&&St<rt&&-1!==ht[St]&&(Tt=it+(Dt=ht[St])-St,Dt>=(qt=V-qt)))return c(N,I,Dt,Tt)}}}return[[r,N],[n,I]]}(J,lt)}(A=A.substring(0,A.length-nt),C=C.substring(0,C.length-nt));return ct&&st.unshift([a,ct]),pt&&st.push([a,pt]),_(st,Z),q&&function(J){for(var lt=!1,P=[],m=0,x=null,b=0,B=0,E=0,O=0,z=0;b<J.length;)J[b][0]==a?(P[m++]=b,B=O,E=z,O=0,z=0,x=J[b][1]):(J[b][0]==n?O+=J[b][1].length:z+=J[b][1].length,x&&x.length<=Math.max(B,E)&&x.length<=Math.max(O,z)&&(J.splice(P[m-1],0,[r,x]),J[P[m-1]+1][0]=n,m--,b=--m>0?P[m-1]:-1,B=0,E=0,O=0,z=0,x=null,lt=!0)),b++;for(lt&&_(J),function(N){function I(Lt,Rt){if(!Lt||!Rt)return 6;var Ct=Lt.charAt(Lt.length-1),mt=Rt.charAt(0),_t=Ct.match(p),St=mt.match(p),Tt=_t&&Ct.match(f),Et=St&&mt.match(f),qt=Tt&&Ct.match(y),Ht=Et&&mt.match(y),Kt=qt&&Lt.match(w),Dt=Ht&&Rt.match(g);return Kt||Dt?5:qt||Ht?4:_t&&!Tt&&Et?3:Tt||Et?2:_t||St?1:0}for(var V=1;V<N.length-1;){if(N[V-1][0]==a&&N[V+1][0]==a){var K=N[V-1][1],et=N[V][1],it=N[V+1][1],rt=u(K,et);if(rt){var ht=et.substring(et.length-rt);K=K.substring(0,K.length-rt),et=ht+et.substring(0,et.length-rt),it=ht+it}for(var ft=K,dt=et,vt=it,bt=I(K,et)+I(et,it);et.charAt(0)===it.charAt(0);){K+=et.charAt(0),et=et.substring(1)+it.charAt(0),it=it.substring(1);var yt=I(K,et)+I(et,it);yt>=bt&&(bt=yt,ft=K,dt=et,vt=it)}N[V-1][1]!=ft&&(ft?N[V-1][1]=ft:(N.splice(V-1,1),V--),N[V][1]=dt,vt?N[V+1][1]=vt:(N.splice(V+1,1),V--))}V++}}(J),b=1;b<J.length;){if(J[b-1][0]==r&&J[b][0]==n){var F=J[b-1][1],D=J[b][1],v=d(F,D),S=d(D,F);v>=S?(v>=F.length/2||v>=D.length/2)&&(J.splice(b,0,[a,D.substring(0,v)]),J[b-1][1]=F.substring(0,F.length-v),J[b+1][1]=D.substring(v),b++):(S>=F.length/2||S>=D.length/2)&&(J.splice(b,0,[a,F.substring(0,S)]),J[b-1][0]=n,J[b-1][1]=D.substring(0,D.length-S),J[b+1][0]=r,J[b+1][1]=F.substring(S),b++),b++}b++}}(st),st}function c(A,C,W,q){var Z=A.substring(0,W),at=C.substring(0,q),nt=A.substring(W),ct=C.substring(q),pt=l(Z,at),st=l(nt,ct);return pt.concat(st)}function h(A,C){if(!A||!C||A.charAt(0)!==C.charAt(0))return 0;for(var W=0,q=Math.min(A.length,C.length),Z=q,at=0;W<Z;)A.substring(at,Z)==C.substring(at,Z)?at=W=Z:q=Z,Z=Math.floor((q-W)/2+W);return L(A.charCodeAt(Z-1))&&Z--,Z}function d(A,C){var W=A.length,q=C.length;if(0==W||0==q)return 0;W>q?A=A.substring(W-q):W<q&&(C=C.substring(0,W));var Z=Math.min(W,q);if(A==C)return Z;for(var at=0,nt=1;;){var ct=A.substring(Z-nt),pt=C.indexOf(ct);if(-1==pt)return at;nt+=pt,0!=pt&&A.substring(Z-nt)!=C.substring(0,nt)||(at=nt,nt++)}}function u(A,C){if(!A||!C||A.slice(-1)!==C.slice(-1))return 0;for(var W=0,q=Math.min(A.length,C.length),Z=q,at=0;W<Z;)A.substring(A.length-Z,A.length-at)==C.substring(C.length-Z,C.length-at)?at=W=Z:q=Z,Z=Math.floor((q-W)/2+W);return M(A.charCodeAt(A.length-Z))&&Z--,Z}var p=/[^a-zA-Z0-9]/,f=/\s/,y=/[\r\n]/,w=/\n\r?\n$/,g=/^\r?\n\r?\n/;function _(A,C){A.push([a,""]);for(var W,q=0,Z=0,at=0,nt="",ct="";q<A.length;)if(q<A.length-1&&!A[q][1])A.splice(q,1);else switch(A[q][0]){case n:at++,ct+=A[q][1],q++;break;case r:Z++,nt+=A[q][1],q++;break;case a:var pt=q-at-Z-1;if(C){if(pt>=0&&H(A[pt][1])){var st=A[pt][1].slice(-1);if(A[pt][1]=A[pt][1].slice(0,-1),nt=st+nt,ct=st+ct,!A[pt][1]){A.splice(pt,1),q--;var J=pt-1;A[J]&&A[J][0]===n&&(at++,ct=A[J][1]+ct,J--),A[J]&&A[J][0]===r&&(Z++,nt=A[J][1]+nt,J--),pt=J}}j(A[q][1])&&(st=A[q][1].charAt(0),A[q][1]=A[q][1].slice(1),nt+=st,ct+=st)}if(q<A.length-1&&!A[q][1]){A.splice(q,1);break}if(nt.length>0||ct.length>0){nt.length>0&&ct.length>0&&(0!==(W=h(ct,nt))&&(pt>=0?A[pt][1]+=ct.substring(0,W):(A.splice(0,0,[a,ct.substring(0,W)]),q++),ct=ct.substring(W),nt=nt.substring(W)),0!==(W=u(ct,nt))&&(A[q][1]=ct.substring(ct.length-W)+A[q][1],ct=ct.substring(0,ct.length-W),nt=nt.substring(0,nt.length-W)));var lt=at+Z;0===nt.length&&0===ct.length?(A.splice(q-lt,lt),q-=lt):0===nt.length?(A.splice(q-lt,lt,[n,ct]),q=q-lt+1):0===ct.length?(A.splice(q-lt,lt,[r,nt]),q=q-lt+1):(A.splice(q-lt,lt,[r,nt],[n,ct]),q=q-lt+2)}0!==q&&A[q-1][0]===a?(A[q-1][1]+=A[q][1],A.splice(q,1)):q++,at=0,Z=0,nt="",ct=""}""===A[A.length-1][1]&&A.pop();var P=!1;for(q=1;q<A.length-1;)A[q-1][0]===a&&A[q+1][0]===a&&(A[q][1].substring(A[q][1].length-A[q-1][1].length)===A[q-1][1]?(A[q][1]=A[q-1][1]+A[q][1].substring(0,A[q][1].length-A[q-1][1].length),A[q+1][1]=A[q-1][1]+A[q+1][1],A.splice(q-1,1),P=!0):A[q][1].substring(0,A[q+1][1].length)==A[q+1][1]&&(A[q-1][1]+=A[q+1][1],A[q][1]=A[q][1].substring(A[q+1][1].length)+A[q+1][1],A.splice(q+1,1),P=!0)),q++;P&&_(A,C)}function L(A){return A>=55296&&A<=56319}function M(A){return A>=56320&&A<=57343}function j(A){return M(A.charCodeAt(0))}function H(A){return L(A.charCodeAt(A.length-1))}function X(A,C,W,q){return H(A)||j(q)?null:function(Z){for(var at=[],nt=0;nt<Z.length;nt++)Z[nt][1].length>0&&at.push(Z[nt]);return at}([[a,A],[r,C],[n,W],[a,q]])}function U(A,C,W,q){return l(A,C,W,q,!0)}U.INSERT=n,U.DELETE=r,U.EQUAL=a,s.exports=U},9629:function(s,r,n){s=n.nmd(s);var a="__lodash_hash_undefined__",l=9007199254740991,c="[object Arguments]",h="[object Boolean]",d="[object Date]",u="[object Function]",p="[object GeneratorFunction]",f="[object Map]",y="[object Number]",w="[object Object]",g="[object Promise]",_="[object RegExp]",L="[object Set]",M="[object String]",j="[object Symbol]",H="[object WeakMap]",X="[object ArrayBuffer]",U="[object DataView]",A="[object Float32Array]",C="[object Float64Array
1]",W="[object Int8Array]",q="[object Int16Array]",Z="[object Int32Array]",at="[object Uint8Array]",nt="[object Uint8ClampedArray]",ct="[object Uint16Array]",pt="[object Uint32Array]",st=/\w*$/,J=/^\[object .+?Constructor\]$/,lt=/^(?:0|[1-9]\d*)$/,P={};P[c]=P["[object Array]"]=P[X]=P[U]=P[h]=P[d]=P[A]=P[C]=P[W]=P[q]=P[Z]=P[f]=P[y]=P[w]=P[_]=P[L]=P[M]=P[j]=P[at]=P[nt]=P[ct]=P[pt]=!0,P["[object Error]"]=P[u]=P[H]=!1;var x="object"==typeof self&&self&&self.Object===Object&&self,b="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g||x||Function("return this")(),B=r&&!r.nodeType&&r,E=B&&s&&!s.nodeType&&s,O=E&&E.exports===B;function z(G,R){return G.set(R[0],R[1]),G}function F(G,R){return G.add(R),G}function D(G,R,$,Q){var gt=-1,Mt=G?G.length:0;for(Q&&Mt&&($=G[++gt]);++gt<Mt;)$=R($,G[gt],gt,G);return $}function v(G){var R=!1;if(null!=G&&"function"!=typeof G.toString)try{R=!!(G+"")}catch{}return R}function S(G){var R=-1,$=Array(G.size);return G.forEach(function(Q,gt){$[++R]=[gt,Q]}),$}function N(G,R){return function($){return G(R($))}}function I(G){var R=-1,$=Array(G.size);return G.forEach(function(Q){$[++R]=Q}),$}var V,K=Array.prototype,et=Function.prototype,it=Object.prototype,rt=b["__core-js_shared__"],ht=(V=/[^.]+$/.exec(rt&&rt.keys&&rt.keys.IE_PROTO||""))?"Symbol(src)_1."+V:"",ft=et.toString,dt=it.hasOwnProperty,vt=it.toString,bt=RegExp("^"+ft.call(dt).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),yt=O?b.Buffer:void 0,Lt=b.Symbol,Rt=b.Uint8Array,Ct=N(Object.getPrototypeOf,Object),mt=Object.create,_t=it.propertyIsEnumerable,St=K.splice,Tt=Object.getOwnPropertySymbols,Et=yt?yt.isBuffer:void 0,qt=N(Object.keys,Object),Ht=T(b,"DataView"),Kt=T(b,"Map"),Dt=T(b,"Promise"),Ue=T(b,"Set"),ei=T(b,"WeakMap"),Ie=T(Object,"create"),vi=Nt(Ht),_i=Nt(Kt),fi=Nt(Dt),Oe=Nt(Ue),Se=Nt(ei),ne=Lt?Lt.prototype:void 0,_e=ne?ne.valueOf:void 0;function ge(G){var R=-1,$=G?G.length:0;for(this.clear();++R<$;){var Q=G[R];this.set(Q[0],Q[1])}}function te(G){var R=-1,$=G?G.length:0;for(this.clear();++R<$;){var Q=G[R];this.set(Q[0],Q[1])}}function me(G){var R=-1,$=G?G.length:0;for(this.clear();++R<$;){var Q=G[R];this.set(Q[0],Q[1])}}function be(G){this.__data__=new te(G)}function ii(G,R,$){var Q=G[R];dt.call(G,R)&&Yt(Q,$)&&(void 0!==$||R in G)||(G[R]=$)}function De(G,R){for(var $=G.length;$--;)if(Yt(G[$][0],R))return $;return-1}function We(G,R,$,Q,gt,Mt,At){var kt;if(Q&&(kt=Mt?Q(G,gt,Mt,At):Q(G)),void 0!==kt)return kt;if(!Ee(G))return G;var wt,Ot,jt,Ut=re(G);if(Ut){if(jt=(wt=G).constructor(Ot=wt.length),Ot&&"string"==typeof wt[0]&&dt.call(wt,"index")&&(jt.index=wt.index,jt.input=wt.input),kt=jt,!R)return function(wt,Ot){var jt=-1,Qt=wt.length;for(Ot||(Ot=Array(Qt));++jt<Qt;)Ot[jt]=wt[jt];return Ot}(G,kt)}else{var zt=ot(G),ie=zt==u||zt==p;if(Ae(G))return function(wt,Ot){if(Ot)return wt.slice();var jt=new wt.constructor(wt.length);return wt.copy(jt),jt}(G,R);if(zt==w||zt==c||ie&&!Mt){if(v(G))return Mt?G:{};if(kt=function(wt){return"function"!=typeof wt.constructor||xt(wt)?{}:Ee(Ot=Ct(wt))?mt(Ot):{};var Ot}(ie?{}:G),!R)return function(wt,Ot){return tt(wt,Y(wt),Ot)}(G,function(wt,Ot){return wt&&tt(Ot,Pe(Ot),wt)}(kt,G))}else{if(!P[zt])return Mt?G:{};kt=function(wt,Ot,jt,Qt){var It,Me,we=wt.constructor;switch(Ot){case X:return $e(wt);case h:case d:return new we(+wt);case U:return It=wt,Me=Qt?$e(It.buffer):It.buffer,new It.constructor(Me,It.byteOffset,It.byteLength);case A:case C:case W:case q:case Z:case at:case nt:case ct:case pt:return function(It,ae){var Me=ae?$e(It.buffer):It.buffer;return new It.constructor(Me,It.byteOffset,It.length)}(wt,Qt);case f:return function(It,ae,Me){return D(ae?Me(S(It),!0):S(It),z,new It.constructor)}(wt,Qt,jt);case y:case M:return new we(wt);case _:return function(It){var ae=new It.constructor(It.source,st.exec(It));return ae.lastIndex=It.lastIndex,ae}(wt);case L:return function(It,ae,Me){return D(ae?Me(I(It),!0):I(It),F,new It.constructor)}(wt,Qt,jt);case j:return _e?Object(_e.call(wt)):{}}}(G,zt,We,R)}}At||(At=new be);var Zt=At.get(G);if(Zt)return Zt;if(At.set(G,kt),!Ut)var Jt=$?function(wt){return function(Ot,jt,Qt){var Re=jt(Ot);return re(Ot)?Re:function(we,It){for(var ae=-1,Me=It.length,gs=we.length;++ae<Me;)we[gs+ae]=It[ae];return we}(Re,Qt(Ot))}(wt,Pe,Y)}(G):Pe(G);return function(wt,Ot){for(var jt=-1,Qt=wt?wt.length:0;++jt<Qt&&!1!==Ot(wt[jt],jt););}(Jt||G,function(wt,Ot){Jt&&(wt=G[Ot=wt]),ii(kt,Ot,We(wt,R,$,Q,Ot,G,At))}),kt}function $e(G){var R=new G.constructor(G.byteLength);return new Rt(R).set(new Rt(G)),R}function tt(G,R,$,Q){$||($={});for(var gt=-1,Mt=R.length;++gt<Mt;){var At=R[gt],kt=Q?Q($[At],G[At],At,$,G):void 0;ii($,At,void 0===kt?G[At]:kt)}return $}function k(G,R){var $,Q,gt=G.__data__;return("string"==(Q=typeof($=R))||"number"==Q||"symbol"==Q||"boolean"==Q?"__proto__"!==$:null===$)?gt["string"==typeof R?"string":"hash"]:gt.map}function T(G,R){var Q,gt,$=(Q=G,gt=R,Q?.[gt]);return function(Q){return!(!Ee(Q)||(gt=Q,ht&&ht in gt))&&(si(Q)||v(Q)?bt:J).test(Nt(Q));var gt}($)?$:void 0}ge.prototype.clear=function(){this.__data__=Ie?Ie(null):{}},ge.prototype.delete=function(G){return this.has(G)&&delete this.__data__[G]},ge.prototype.get=function(G){var R=this.__data__;if(Ie){var $=R[G];return $===a?void 0:$}return dt.call(R,G)?R[G]:void 0},ge.prototype.has=function(G){var R=this.__data__;return Ie?void 0!==R[G]:dt.call(R,G)},ge.prototype.set=function(G,R){return this.__data__[G]=Ie&&void 0===R?a:R,this},te.prototype.clear=function(){this.__data__=[]},te.prototype.delete=function(G){var R=this.__data__,$=De(R,G);return!($<0||($==R.length-1?R.pop():St.call(R,$,1),0))},te.prototype.get=function(G){var R=this.__data__,$=De(R,G);return $<0?void 0:R[$][1]},te.prototype.has=function(G){return De(this.__data__,G)>-1}
vendor: 4,678 bytes, line 1
1,te.prototype.set=function(G,R){var $=this.__data__,Q=De($,G);return Q<0?$.push([G,R]):$[Q][1]=R,this},me.prototype.clear=function(){this.__data__={hash:new ge,map:new(Kt||te),string:new ge}},me.prototype.delete=function(G){return k(this,G).delete(G)},me.prototype.get=function(G){return k(this,G).get(G)},me.prototype.has=function(G){return k(this,G).has(G)},me.prototype.set=function(G,R){return k(this,G).set(G,R),this},be.prototype.clear=function(){this.__data__=new te},be.prototype.delete=function(G){return this.__data__.delete(G)},be.prototype.get=function(G){return this.__data__.get(G)},be.prototype.has=function(G){return this.__data__.has(G)},be.prototype.set=function(G,R){var $=this.__data__;if($ instanceof te){var Q=$.__data__;if(!Kt||Q.length<199)return Q.push([G,R]),this;$=this.__data__=new me(Q)}return $.set(G,R),this};var Y=Tt?N(Tt,Object):function(){return[]},ot=function(G){return vt.call(G)};function ut(G,R){return!!(R=R??l)&&("number"==typeof G||lt.test(G))&&G>-1&&G%1==0&&G<R}function xt(G){var R=G&&G.constructor;return G===("function"==typeof R&&R.prototype||it)}function Nt(G){if(null!=G){try{return ft.call(G)}catch{}try{return G+""}catch{}}return""}function Yt(G,R){return G===R||G!=G&&R!=R}(Ht&&ot(new Ht(new ArrayBuffer(1)))!=U||Kt&&ot(new Kt)!=f||Dt&&ot(Dt.resolve())!=g||Ue&&ot(new Ue)!=L||ei&&ot(new ei)!=H)&&(ot=function(G){var R=vt.call(G),$=R==w?G.constructor:void 0,Q=$?Nt($):void 0;if(Q)switch(Q){case vi:return U;case _i:return f;case fi:return g;case Oe:return L;case Se:return H}return R});var re=Array.isArray;function de(G){return null!=G&&"number"==typeof(R=G.length)&&R>-1&&R%1==0&&R<=l&&!si(G);var R}var Ae=Et||function(){return!1};function si(G){var R=Ee(G)?vt.call(G):"";return R==u||R==p}function Ee(G){var R=typeof G;return!!G&&("object"==R||"function"==R)}function Pe(G){return de(G)?function(R,$){var kt,Ut,Q=re(R)||function(zt){return!!zt&&"object"==typeof zt}(Ut=kt=R)&&de(Ut)&&dt.call(kt,"callee")&&(!_t.call(kt,"callee")||vt.call(kt)==c)?function(kt,Ut){for(var zt=-1,ie=Array(kt);++zt<kt;)ie[zt]=Ut(zt);return ie}(R.length,String):[],gt=Q.length,Mt=!!gt;for(var At in R)!dt.call(R,At)||Mt&&("length"==At||ut(At,gt))||Q.push(At);return Q}(G):function(R){if(!xt(R))return qt(R);var $=[];for(var Q in Object(R))dt.call(R,Q)&&"constructor"!=Q&&$.push(Q);return $}(G)}s.exports=function(G){return We(G,!0,!0)}},4162:function(s,r,n){s=n.nmd(s);var a="__lodash_hash_undefined__",l=1,c=2,h=9007199254740991,d="[object Arguments]",u="[object Array]",p="[object AsyncFunction]",f="[object Boolean]",y="[object Date]",w="[object Error]",g="[object Function]",_="[object GeneratorFunction]",L="[object Map]",M="[object Number]",j="[object Null]",H="[object Object]",X="[object Promise]",U="[object Proxy]",A="[object RegExp]",C="[object Set]",W="[object String]",q="[object Undefined]",Z="[object WeakMap]",at="[object ArrayBuffer]",nt="[object DataView]",ct=/^\[object .+?Constructor\]$/,pt=/^(?:0|[1-9]\d*)$/,st={};st["[object Float32Array]"]=st["[object Float64Array]"]=st["[object Int8Array]"]=st["[object Int16Array]"]=st["[object Int32Array]"]=st["[object Uint8Array]"]=st["[object Uint8ClampedArray]"]=st["[object Uint16Array]"]=st["[object Uint32Array]"]=!0,st[d]=st[u]=st[at]=st[f]=st[nt]=st[y]=st[w]=st[g]=st[L]=st[M]=st[H]=st[A]=st[C]=st[W]=st[Z]=!1;var J="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,lt="object"==typeof self&&self&&self.Object===Object&&self,P=J||lt||Function("return this")(),m=r&&!r.nodeType&&r,x=m&&s&&!s.nodeType&&s,b=x&&x.exports===m,B=b&&J.process,E=function(){try{return B&&B.binding&&B.binding("util")}catch{}}(),O=E&&E.isTypedArray;function z(R,$){for(var Q=-1,gt=null==R?0:R.length;++Q<gt;)if($(R[Q],Q,R))return!0;return!1}function F(R){var $=-1,Q=Array(R.size);return R.forEach(function(gt,Mt){Q[++$]=[Mt,gt]}),Q}function D(R){var $=-1,Q=Array(R.size);return R.forEach(function(gt){Q[++$]=gt}),Q}var v,S,N,I=Array.prototype,K=Object.prototype,et=P["__core-js_shared__"],it=Function.prototype.toString,rt=K.hasOwnProperty,ht=(v=/[^.]+$/.exec(et&&et.keys&&et.keys.IE_PROTO||""))?"Symbol(src)_1."+v:"",ft=K.toString,dt=RegExp("^"+it.call(rt).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),vt=b?P.Buffer:void 0,bt=P.Symbol,yt=P.Uint8Array,Lt=K.propertyIsEnumerable,Rt=I.splice,Ct=bt?bt.toStringTag:void 0,mt=Object.getOwnPropertySymbols,_t=vt?vt.isBuffer:void 0,St=(S=Object.keys,N=Object,function(R){return S(N(R))}),Tt=k(P,"DataView"),Et=k(P,"Map"),qt=k(P,"Promise"),Ht=k(P,"Set"),Kt=k(P,"WeakMap"),Dt=k(Object,"create"),Ue=ut(Tt),ei=ut(Et),Ie=ut(qt),vi=ut(Ht),_i=ut(Kt),fi=bt?bt.prototype:void 0,Oe=fi?fi.valueOf
1:void 0;function Se(R){var $=-1,Q=null==R?0:R.length;for(this.clear();++$<Q;){var gt=R[$];this.set(gt[0],gt[1])}}function ne(R){var $=-1,Q=null==R?0:R.length;for(this.clear();++$<Q;){var gt=R[$];this.set(gt[0],gt[1])}}function _e(R){var $=-1,Q=null==R?0:R.length;for(this.clear();++$<Q;){var gt=R[$];this.set(gt[0],gt[1])}}function ge(R){var $=-1,Q=null==R?0:R.length;for(this.__data__=new _e;++$<Q;)this.add(R[$])}function te(R){var $=this.__data__=new ne(R);this.size=$.size}function me(R,$){for(var Q=R.length;Q--;)if(xt(R[Q][0],$))return Q;return-1}function be(R){return null==R?void 0===R?q:j:Ct&&Ct in Object(R)?function($){var Q=rt.call($,Ct),gt=$[Ct];try{$[Ct]=void 0;var Mt=!0}catch{}var At=ft.call($);return Mt&&(Q?$[Ct]=gt:delete $[Ct]),At}(R):ft.call(R)}function ii(R){return Ee(R)&&be(R)==d}function De(R,$,Q,gt,Mt){return R===$||(null==R||null==$||!Ee(R)&&!Ee($)?R!=R&&$!=$:function(At,kt,Ut,zt,ie,Zt){var Jt=Yt(At),wt=Yt(kt),Ot=Jt?u:Y(At),jt=wt?u:Y(kt),Qt=(Ot=Ot==d?H:Ot)==H,Re=(jt=jt==d?H:jt)==H,we=Ot==jt;if(we&&re(At)){if(!re(kt))return!1;Jt=!0,Qt=!1}if(we&&!Qt)return Zt||(Zt=new te),Jt||Pe(At)?We(At,kt,Ut,zt,ie,Zt):function(Wt,Ft,Bi,Ke,ms,Ne,Be){switch(Bi){case nt:if(Wt.byteLength!=Ft.byteLength||Wt.byteOffset!=Ft.byteOffset)return!1;Wt=Wt.buffer,Ft=Ft.buffer;case at:return!(Wt.byteLength!=Ft.byteLength||!Ne(new yt(Wt),new yt(Ft)));case f:case y:case M:return xt(+Wt,+Ft);case w:return Wt.name==Ft.name&&Wt.message==Ft.message;case A:case W:return Wt==Ft+"";case L:var Ye=F;case C:if(Ye||(Ye=D),Wt.size!=Ft.size&&!(Ke&l))return!1;var ni=Be.get(Wt);if(ni)return ni==Ft;Ke|=c,Be.set(Wt,Ft);var ze=We(Ye(Wt),Ye(Ft),Ke,ms,Ne,Be);return Be.delete(Wt),ze;case"[object Symbol]":if(Oe)return Oe.call(Wt)==Oe.call(Ft)}return!1}(At,kt,Ot,Ut,zt,ie,Zt);if(!(Ut&l)){var It=Qt&&rt.call(At,"__wrapped__"),ae=Re&&rt.call(kt,"__wrapped__");
vendor: 5,160 bytes, line 1
1if(It||ae){var Me=It?At.value():At,gs=ae?kt.value():kt;return Zt||(Zt=new te),ie(Me,gs,Ut,zt,Zt)}}return!!we&&(Zt||(Zt=new te),function(Wt,Ft,Bi,Ke,ms,Ne){var Be=Bi&l,Ye=$e(Wt),Ai=Ye.length;if(Ai!=$e(Ft).length&&!Be)return!1;for(var ni=Ai;ni--;){var ze=Ye[ni];if(!(Be?ze in Ft:rt.call(Ft,ze)))return!1}var $s=Ne.get(Wt);if($s&&Ne.get(Ft))return $s==Ft;var zi=!0;Ne.set(Wt,Ft),Ne.set(Ft,Wt);for(var bs=Be;++ni<Ai;){var Fi=Wt[ze=Ye[ni]],Vi=Ft[ze];if(Ke)var Ks=Be?Ke(Vi,Fi,ze,Ft,Wt,Ne):Ke(Fi,Vi,ze,Wt,Ft,Ne);if(!(void 0===Ks?Fi===Vi||ms(Fi,Vi,Bi,Ke,Ne):Ks)){zi=!1;break}bs||(bs="constructor"==ze)}if(zi&&!bs){var Hi=Wt.constructor,Ui=Ft.constructor;Hi==Ui||!("constructor"in Wt)||!("constructor"in Ft)||"function"==typeof Hi&&Hi instanceof Hi&&"function"==typeof Ui&&Ui instanceof Ui||(zi=!1)}return Ne.delete(Wt),Ne.delete(Ft),zi}(At,kt,Ut,zt,ie,Zt))}(R,$,Q,gt,De,Mt))}function We(R,$,Q,gt,Mt,At){var kt=Q&l,Ut=R.length,zt=$.length;if(Ut!=zt&&!(kt&&zt>Ut))return!1;var ie=At.get(R);if(ie&&At.get($))return ie==$;var Zt=-1,Jt=!0,wt=Q&c?new ge:void 0;for(At.set(R,$),At.set($,R);++Zt<Ut;){var Ot=R[Zt],jt=$[Zt];if(gt)var Qt=kt?gt(jt,Ot,Zt,$,R,At):gt(Ot,jt,Zt,R,$,At);if(void 0!==Qt){if(Qt)continue;Jt=!1;break}if(wt){if(!z($,function(Re,we){if(!wt.has(we)&&(Ot===Re||Mt(Ot,Re,Q,gt,At)))return wt.push(we)})){Jt=!1;break}}else if(Ot!==jt&&!Mt(Ot,jt,Q,gt,At)){Jt=!1;break}}return At.delete(R),At.delete($),Jt}function $e(R){return gt=T,Mt=function G(R){return null!=($=R)&&Ae($.length)&&!de($)?function(Q,gt){var Mt=Yt(Q),At=!Mt&&Nt(Q),kt=!Mt&&!At&&re(Q),Ut=!Mt&&!At&&!kt&&Pe(Q),zt=Mt||At||kt||Ut,ie=zt?function(wt,Ot){for(var jt=-1,Qt=Array(wt);++jt<wt;)Qt[jt]=Ot(jt);return Qt}(Q.length,String):[],Zt=ie.length;for(var Jt in Q)!rt.call(Q,Jt)||zt&&("length"==Jt||kt&&("offset"==Jt||"parent"==Jt)||Ut&&("buffer"==Jt||"byteLength"==Jt||"byteOffset"==Jt)||ot(Jt,Zt))||ie.push(Jt);return ie}(R):function(Q){if(Mt=(gt=Q)&&gt.constructor,gt!==("function"==typeof Mt&&Mt.prototype||K))return St(Q);var gt,Mt,At=[];for(var kt in Object(Q))rt.call(Q,kt)&&"constructor"!=kt&&At.push(kt);return At}(R);var $}($=R),Yt($)?Mt:function(At,kt){for(var Ut=-1,zt=kt.length,ie=At.length;++Ut<zt;)At[ie+Ut]=kt[Ut];return At}(Mt,gt($));var $,gt,Mt}function tt(R,$){var Q,gt,Mt=R.__data__;return("string"==(gt=typeof(Q=$))||"number"==gt||"symbol"==gt||"boolean"==gt?"__proto__"!==Q:null===Q)?Mt["string"==typeof $?"string":"hash"]:Mt.map}function k(R,$){var gt,Mt,Q=(gt=R,Mt=$,gt?.[Mt]);return function(gt){return!(!si(gt)||function(Mt){return!!ht&&ht in Mt}(gt))&&(de(gt)?dt:ct).test(ut(gt))}(Q)?Q:void 0}Se.prototype.clear=function(){this.__data__=Dt?Dt(null):{},this.size=0},Se.prototype.delete=function(R){var $=this.has(R)&&delete this.__data__[R];return this.size-=$?1:0,$},Se.prototype.get=function(R){var $=this.__data__;if(Dt){var Q=$[R];return Q===a?void 0:Q}return rt.call($,R)?$[R]:void 0},Se.prototype.has=function(R){var $=this.__data__;return Dt?void 0!==$[R]:rt.call($,R)},Se.prototype.set=function(R,$){var Q=this.__data__;return this.size+=this.has(R)?0:1,Q[R]=Dt&&void 0===$?a:$,this},ne.prototype.clear=function(){this.__data__=[],this.size=0},ne.prototype.delete=function(R){var $=this.__data__,Q=me($,R);return!(Q<0||(Q==$.length-1?$.pop():Rt.call($,Q,1),--this.size,0))},ne.prototype.get=function(R){var $=this.__data__,Q=me($,R);return Q<0?void 0:$[Q][1]},ne.prototype.has=function(R){return me(this.__data__,R)>-1},ne.prototype.set=function(R,$){var Q=this.__data__,gt=me(Q,R);return gt<0?(++this.size,Q.push([R,$])):Q[gt][1]=$,this},_e.prototype.clear=function(){this.size=0,this.__data__={hash:new Se,map:new(Et||ne),string:new Se}},_e.prototype.delete=function(R){var $=tt(this,R).delete(R);return this.size-=$?1:0,$},_e.prototype.get=function(R){return tt(this,R).get(R)},_e.prototype.has=function(R){return tt(this,R).has(R)},_e.prototype.set=function(R,$){var Q=tt(this,R),gt=Q.size;return Q.set(R,$),this.size+=Q.size==gt?0:1,this},ge.prototype.add=ge.prototype.push=function(R){return this.__data__.set(R,a),this},ge.prototype.has=function(R){return this.__data__.has(R)},te.prototype.clear=function(){this.__data__=new ne,this.size=0},te.prototype.delete=function(R){var $=this.__data__,Q=$.delete(R);return this.size=$.size,Q},te.prototype.get=function(R){return this.__data__.get(R)},te.prototype.has=function(R){return this.__data__.has(R)},te.prototype.set=function(R,$){var Q=this.__data__;if(Q instanceof ne){var gt=Q.__data__;if(!Et||gt.length<199)return gt.push([R,$]),this.size=++Q.size,this;Q=this.__data__=new _e(gt)}return Q.set(R,$),this.size=Q.size,this};var T=mt?function(R){return null==R?[]:(R=Object(R),function($,Q){for(var gt=-1,Mt=null==$?0:$.length,At=0,kt=[];++gt<Mt;){var Ut=$[gt];Lt.call(R,Ut)&&(kt[At++]=Ut)}return kt}(mt(R)))}:function(){return[]},Y=be;function ot(R,$){return!!($=$??h)&&("number"==typeof R||pt.test(R))&&R>-1&&R%1==0&&R<$}function ut(R){if(null!=R){try{return it.call(R)}catch{}try{return R+""}catch{}}return""}function xt(R,$){return R===$||R!=R&&$!=$}(Tt&&Y(new Tt(new ArrayBuffer(1)))!=nt||Et&&Y(new Et)!=L||qt&&Y(qt.resolve())!=X||Ht&&Y(new Ht)!=C||Kt&&Y(new Kt)!=Z)&&(Y=function(R){var $=be(R),Q=$==H?R.
vendor: 5,745 bytes, line 1
1constructor:void 0,gt=Q?ut(Q):"";if(gt)switch(gt){case Ue:return nt;case ei:return L;case Ie:return X;case vi:return C;case _i:return Z}return $});var Nt=ii(function(){return arguments}())?ii:function(R){return Ee(R)&&rt.call(R,"callee")&&!Lt.call(R,"callee")},Yt=Array.isArray,re=_t||function(){return!1};function de(R){if(!si(R))return!1;var $=be(R);return $==g||$==_||$==p||$==U}function Ae(R){return"number"==typeof R&&R>-1&&R%1==0&&R<=h}function si(R){var $=typeof R;return null!=R&&("object"==$||"function"==$)}function Ee(R){return null!=R&&"object"==typeof R}var Pe=O?function(R){return function($){return R($)}}(O):function(R){return Ee(R)&&Ae(R.length)&&!!st[be(R)]};s.exports=function(R,$){return De(R,$)}},1270:function(s,r,n){"use strict";Object.defineProperty(r,"__esModule",{value:!0});const a=n(9629),l=n(4162);var c,h;(h=c||(c={})).compose=function(d={},u={},p=!1){"object"!=typeof d&&(d={}),"object"!=typeof u&&(u={});let f=a(u);p||(f=Object.keys(f).reduce((y,w)=>(null!=f[w]&&(y[w]=f[w]),y),{}));for(const y in d)void 0!==d[y]&&void 0===u[y]&&(f[y]=d[y]);return Object.keys(f).length>0?f:void 0},h.diff=function(d={},u={}){"object"!=typeof d&&(d={}),"object"!=typeof u&&(u={});const p=Object.keys(d).concat(Object.keys(u)).reduce((f,y)=>(l(d[y],u[y])||(f[y]=void 0===u[y]?null:u[y]),f),{});return Object.keys(p).length>0?p:void 0},h.invert=function(d={},u={}){d=d||{};const p=Object.keys(u).reduce((f,y)=>(u[y]!==d[y]&&void 0!==d[y]&&(f[y]=u[y]),f),{});return Object.keys(d).reduce((f,y)=>(d[y]!==u[y]&&void 0===u[y]&&(f[y]=null),f),p)},h.transform=function(d,u,p=!1){if("object"!=typeof d)return u;if("object"!=typeof u)return;if(!p)return u;const f=Object.keys(u).reduce((y,w)=>(void 0===d[w]&&(y[w]=u[w]),y),{});return Object.keys(f).length>0?f:void 0},r.default=c},5232:function(s,r,n){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.AttributeMap=r.OpIterator=r.Op=void 0;const a=n(5090),l=n(9629),c=n(4162),h=n(1270);r.AttributeMap=h.default;const d=n(4123);r.Op=d.default;const u=n(7033);r.OpIterator=u.default;const f=(w,g)=>{if("object"!=typeof w||null===w)throw new Error("cannot retain a "+typeof w);if("object"!=typeof g||null===g)throw new Error("cannot retain a "+typeof g);const _=Object.keys(w)[0];if(!_||_!==Object.keys(g)[0])throw new Error(`embed types not matched: ${_} != ${Object.keys(g)[0]}`);return[_,w[_],g[_]]};class y{constructor(g){this.ops=Array.isArray(g)?g:null!=g&&Array.isArray(g.ops)?g.ops:[]}static registerEmbed(g,_){this.handlers[g]=_}static unregisterEmbed(g){delete this.handlers[g]}static getHandler(g){const _=this.handlers[g];if(!_)throw new Error(`no handlers for embed type "${g}"`);return _}insert(g,_){const L={};return"string"==typeof g&&0===g.length?this:(L.insert=g,null!=_&&"object"==typeof _&&Object.keys(_).length>0&&(L.attributes=_),this.push(L))}delete(g){return g<=0?this:this.push({delete:g})}retain(g,_){if("number"==typeof g&&g<=0)return this;const L={retain:g};return null!=_&&"object"==typeof _&&Object.keys(_).length>0&&(L.attributes=_),this.push(L)}push(g){let _=this.ops.length,L=this.ops[_-1];if(g=l(g),"object"==typeof L){if("number"==typeof g.delete&&"number"==typeof L.delete)return this.ops[_-1]={delete:L.delete+g.delete},this;if("number"==typeof L.delete&&null!=g.insert&&(_-=1,L=this.ops[_-1],"object"!=typeof L))return this.ops.unshift(g),this;if(c(g.attributes,L.attributes)){if("string"==typeof g.insert&&"string"==typeof L.insert)return this.ops[_-1]={insert:L.insert+g.insert},"object"==typeof g.attributes&&(this.ops[_-1].attributes=g.attributes),this;if("number"==typeof g.retain&&"number"==typeof L.retain)return this.ops[_-1]={retain:L.retain+g.retain},"object"==typeof g.attributes&&(this.ops[_-1].attributes=g.attributes),this}}return _===this.ops.length?this.ops.push(g):this.ops.splice(_,0,g),this}chop(){const g=this.ops[this.ops.length-1];return g&&"number"==typeof g.retain&&!g.attributes&&this.ops.pop(),this}filter(g){return this.ops.filter(g)}forEach(g){this.ops.forEach(g)}map(g){return this.ops.map(g)}partition(g){const _=[],L=[];return this.forEach(M=>{(g(M)?_:L).push(M)}),[_,L]}reduce(g,_){return this.ops.reduce(g,_)}changeLength(){return this.reduce((g,_)=>_.insert?g+d.default.length(_):_.delete?g-_.delete:g,0)}length(){return this.reduce((g,_)=>g+d.default.length(_),0)}slice(g=0,_=1/0){const L=[],M=new u.default(this.ops);let j=0;for(;j<_&&M.hasNext();){let H;j<g?H=M.next(g-j):(H=M.next(_-j),L.push(H)),j+=d.default.length(H)}return new y(L)}compose(g){const _=new u.default(this.ops),L=new u.default(g.ops),M=[],j=L.peek();if(null!=j&&"number"==typeof j.retain&&null==j.attributes){let X=j.retain;for(;"insert"===_.peekType()&&_.peekLength()<=X;)X-=_.peekLength(),M.push(_.next());j.retain-X>0&&L.next(j.retain-X)}const H=new y(M);for(;_.hasNext()||L.hasNext();)if("insert"===L.peekType())H.push(L.next());else if("delete"===_.peekType())H.push(_.next());else{const X=Math.min(_.peekLength(),L.peekLength()),U=_.next(X),A=L.next(X);if(A.retain){const C={};if("number"==typeof U.retain)C.retain="number"==typeof A.retain?X:A.retain;else if("number"==typeof A.retain)null==U.retain?C.insert=U.insert:C.retain=U.retain;else{const q=null==U.retain?"insert":"retain",[Z,at,nt]=f(U[q],A.retain),ct=y.getHandler(Z);C[q]={[Z]:ct.compose(at,nt,"retain"===q)}}const W=h.default.compose(U.attributes,A.attributes,"number"==typeof U.retain);if(W&&(C.attributes=W),H.push(C),!L.hasNext()&&c(H.ops[H.ops.length-1],C)){const q=new y(_.rest());return H.concat(q).chop()}}else"number"==typeof A.delete&&("number"==typeof U.retain||"object"==typeof U.retain&&null!==U.retain)&&H.push(A)}return H.chop()}concat(g){const _=new y(this.ops.slice());return g.ops.length>0&&(_.push(g.ops[0]),_.ops=_.ops.concat(g.ops.slice(1))),_}
vendor: 8,872 bytes, line 1
1diff(g,_){if(this.ops===g.ops)return new y;const L=[this,g].map(U=>U.map(A=>{if(null!=A.insert)return"string"==typeof A.insert?A.insert:"\0";throw new Error("diff() called "+(U===g?"on":"with")+" non-document")}).join("")),M=new y,j=a(L[0],L[1],_,!0),H=new u.default(this.ops),X=new u.default(g.ops);return j.forEach(U=>{let A=U[1].length;for(;A>0;){let C=0;switch(U[0]){case a.INSERT:C=Math.min(X.peekLength(),A),M.push(X.next(C));break;case a.DELETE:C=Math.min(A,H.peekLength()),H.next(C),M.delete(C);break;case a.EQUAL:C=Math.min(H.peekLength(),X.peekLength(),A);const W=H.next(C),q=X.next(C);c(W.insert,q.insert)?M.retain(C,h.default.diff(W.attributes,q.attributes)):M.push(q).delete(C)}A-=C}}),M.chop()}eachLine(g,_="\n"){const L=new u.default(this.ops);let M=new y,j=0;for(;L.hasNext();){if("insert"!==L.peekType())return;const H=L.peek(),X=d.default.length(H)-L.peekLength(),U="string"==typeof H.insert?H.insert.indexOf(_,X)-X:-1;if(U<0)M.push(L.next());else if(U>0)M.push(L.next(U));else{if(!1===g(M,L.next(1).attributes||{},j))return;j+=1,M=new y}}M.length()>0&&g(M,{},j)}invert(g){const _=new y;return this.reduce((L,M)=>{if(M.insert)_.delete(d.default.length(M));else{if("number"==typeof M.retain&&null==M.attributes)return _.retain(M.retain),L+M.retain;if(M.delete||"number"==typeof M.retain){const j=M.delete||M.retain;return g.slice(L,L+j).forEach(H=>{M.delete?_.push(H):M.retain&&M.attributes&&_.retain(d.default.length(H),h.default.invert(M.attributes,H.attributes))}),L+j}if("object"==typeof M.retain&&null!==M.retain){const j=g.slice(L,L+1),H=new u.default(j.ops).next(),[X,U,A]=f(M.retain,H.insert),C=y.getHandler(X);return _.retain({[X]:C.invert(U,A)},h.default.invert(M.attributes,H.attributes)),L+1}}return L},0),_.chop()}transform(g,_=!1){if(_=!!_,"number"==typeof g)return this.transformPosition(g,_);const L=g,M=new u.default(this.ops),j=new u.default(L.ops),H=new y;for(;M.hasNext()||j.hasNext();)if("insert"!==M.peekType()||!_&&"insert"===j.peekType())if("insert"===j.peekType())H.push(j.next());else{const X=Math.min(M.peekLength(),j.peekLength()),U=M.next(X),A=j.next(X);if(U.delete)continue;if(A.delete)H.push(A);else{const C=U.retain,W=A.retain;let q="object"==typeof W&&null!==W?W:X;if("object"==typeof C&&null!==C&&"object"==typeof W&&null!==W){const Z=Object.keys(C)[0];if(Z===Object.keys(W)[0]){const at=y.getHandler(Z);at&&(q={[Z]:at.transform(C[Z],W[Z],_)})}}H.retain(q,h.default.transform(U.attributes,A.attributes,_))}}else H.retain(d.default.length(M.next()));return H.chop()}transformPosition(g,_=!1){_=!!_;const L=new u.default(this.ops);let M=0;for(;L.hasNext()&&M<=g;){const j=L.peekLength(),H=L.peekType();L.next(),"delete"!==H?("insert"===H&&(M<g||!_)&&(g+=j),M+=j):g-=Math.min(j,g-M)}return g}}y.Op=d.default,y.OpIterator=u.default,y.AttributeMap=h.default,y.handlers={},r.default=y,s.exports=y,s.exports.default=y},4123:function(s,r){"use strict";var n;Object.defineProperty(r,"__esModule",{value:!0}),(n||(n={})).length=function(l){return"number"==typeof l.delete?l.delete:"number"==typeof l.retain?l.retain:"object"==typeof l.retain&&null!==l.retain?1:"string"==typeof l.insert?l.insert.length:1},r.default=n},7033:function(s,r,n){"use strict";Object.defineProperty(r,"__esModule",{value:!0});const a=n(4123);r.default=class{constructor(l){this.ops=l,this.index=0,this.offset=0}hasNext(){return this.peekLength()<1/0}next(l){l||(l=1/0);const c=this.ops[this.index];if(c){const h=this.offset,d=a.default.length(c);if(l>=d-h?(l=d-h,this.index+=1,this.offset=0):this.offset+=l,"number"==typeof c.delete)return{delete:l};{const u={};return c.attributes&&(u.attributes=c.attributes),"number"==typeof c.retain?u.retain=l:"object"==typeof c.retain&&null!==c.retain?u.retain=c.retain:u.insert="string"==typeof c.insert?c.insert.substr(h,l):c.insert,u}}return{retain:1/0}}peek(){return this.ops[this.index]}peekLength(){return this.ops[this.index]?a.default.length(this.ops[this.index])-this.offset:1/0}peekType(){const l=this.ops[this.index];return l?"number"==typeof l.delete?"delete":"number"==typeof l.retain||"object"==typeof l.retain&&null!==l.retain?"retain":"insert":"retain"}rest(){if(this.hasNext()){if(0===this.offset)return this.ops.slice(this.index);{const l=this.offset,c=this.index,h=this.next(),d=this.ops.slice(this.index);return this.offset=l,this.index=c,[h].concat(d)}}return[]}}},8820:function(s,r,n){"use strict";n.d(r,{A:function(){return d}});var a=n(8138),l=function(u,p){for(var f=u.length;f--;)if((0,a.A)(u[f][0],p))return f;return-1},c=Array.prototype.splice;function h(u){var p=-1,f=null==u?0:u.length;for(this.clear();++p<f;){var y=u[p];this.set(y[0],y[1])}}h.prototype.clear=function(){this.__data__=[],this.size=0},h.prototype.delete=function(u){var p=this.__data__,f=l(p,u);return!(f<0||(f==p.length-1?p.pop():c.call(p,f,1),--this.size,0))},h.prototype.get=function(u){var p=this.__data__,f=l(p,u);return f<0?void 0:p[f][1]},h.prototype.has=function(u){return l(this.__data__,u)>-1},h.prototype.set=function(u,p){var f=this.__data__,y=l(f,u);return y<0?(++this.size,f.push([u,p])):f[y][1]=p,this};var d=h},2461:function(s,r,n){"use strict";var a=n(2281),l=n(5507),c=(0,a.A)(l.A,"Map");r.A=c},3558:function(s,r,n){"use strict";n.d(r,{A:function(){return w}});var a=(0,n(2281).A)(Object,"create"),l=Object.prototype.hasOwnProperty,c=Object.prototype.hasOwnProperty;function h(g){var _=-1,L=null==g?0:g.length;for(this.clear();++_<L;){var M=g[_];this.set(M[0],M[1])}}h.prototype.clear=function(){this.__data__=a?a(null):{},this.size=0},h.prototype.delete=function(g){var _=this.has(g)&&delete this.__data__[g];return this.size-=_?1:0,_},h.prototype.get=function(g){var _=this.__data__;if(a){var L=_[g];return"__lodash_hash_undefined__"===L?void 0:L}return l.call(_,g)?_[g]:void 0},h.prototype.has=function(g){var _=this.__data__;return a?void 0!==_[g]:c.call(_,g)},h.prototype.set=function(g,_){var L=this.__data__;return this.size+=this.has(g)?0:1,L[g]=a&&void 0===_?"__lodash_hash_undefined__":_,this};var d=h,u=n(8820),p=n(2461),f=function(g,_){var L,M,j=g.__data__;return("string"==(M=typeof(L=_))||"number"==M||"symbol"==M||"boolean"==M?"__proto__"!==L:null===L)?j["string"==typeof _?"string":"hash"]:j.map};function y(g){var _=-1,L=null==g?0:g.length;for(this.clear();++_<L;){var M=g[_];this.set(M[0],M[1])}}y.prototype.clear=function(){this.size=0,this.__data__={hash:new d,map:new(p.A||u.A),string:new d}},y.prototype.delete=function(g){var _=f(this,g).delete(g);return this.size-=_?1:0,_},y.prototype.get=function(g){return f(this,g).get(g)},y.prototype.has=function(g){return f(this,g).has(g)},y.prototype.set=function(g,_){var L=f(this,g),M=L.size;return L.set(g,_),this.size+=L.size==M?0:1,this};var w=y},2673:function(s,r,n){"use strict";n.d(r,{A:function(){return d}});var a=n(8820),l=n(2461),c=n(3558);function h(u){var p=this.__data__=new a.A(u);this.size=p.size}h.prototype.clear=function(){this.__data__=new a.A,this.size=0},h.prototype.delete=function(u){var p=this.__data__,f=p.delete(u);return this.size=p.size,f},h.prototype.get=function(u){return this.__data__.get(u)},h.prototype.has=function(u){return this.__data__.has(u)},h.prototype.set=function(u,p){var f=this.__data__;if(f instanceof a.A){var y=f.__data__;if(!l.A||y.length<199)return y.push([u,p]),this.size=++f.size,this;f=this.__data__=new c.A(y)}return f.set(u,p),this.size=f.size,this};var d=h},439:function(s,r,n){"use strict";var a=n(5507).A.Symbol;r.A=a},7218:function(s,r,n){"use strict";var a=n(5507).A.Uint8Array;r.A=a},6753:function(s,r,n){"use strict";n.d(r,{A:function(){return p}});var a=n(8412),l=n(723),c=n(776),h=n(3767),d=n(5755),u=Object.prototype.hasOwnProperty,p=function(f,y){var w=(0,l.A)(f),g=!w&&(0,a.A)(f),_=!w&&!g&&(0,c.A)(f),L=!w&&!g&&!_&&(0,d.A)(f),M=w||g||_||L,j=M?function(U,A){for(var C=-1,W=Array(U);++C<U;)W[C]=A(C);return W}(f.length,String):[],H=j.length;for(var X in f)!y&&!u.call(f,X)||M&&("length"==X||_&&("offset"==X||"parent"==X)||L&&("buffer"==X||"byteLength"==X||"byteOffset"==X)||(0,h.A)(X,H))||j.push(X);return j}},802:function(s,r){"use strict";r.A=function(n,a){for(var l=-1,c=a.length,h=n.length;++l<c;)n[h+l]=a[l];return n}},6437:function(s,r,n){"use strict";var a=n(6770),l=n(8138),c=Object.prototype.hasOwnProperty;r.A=function(h,d,u){var p=h[d];c.call(h,d)&&(0,l.A)(p,u)&&(void 0!==u||d in h)||(0,a.A)(h,d,u)}},6770:function(s,r,n){"use strict";var a=n(7889);r.A=function(l,c,h){"__proto__"==c&&a.A?(0,a.A)(l,c,{configurable:!0,enumerable:!0,value:h,writable:!0}):l[c]=h}},1381:function(s,r,n){"use strict";var a=n(802),l=n(723);r.A=function(c,h,d){var u=h(c);return(0,l.A)(c)?u:(0,a.A)(u,d(c))}},2159:function(s,r,n){"use strict";n.d(r,{A:function(){return f}});var a=n(439),l=Object.prototype,c=l.hasOwnProperty,h=l.toString,d=a.A?a.A.toStringTag:void 0,u=Object.prototype.toString,p=a.A?a.A.toStringTag:void 0,f=function(y){return null==y?void 0===y?"[object Undef
1ined]":"[object Null]":p&&p in Object(y)?function(w){var g=c.call(w,d),_=w[d];try{w[d]=void 0;var L=!0}catch{}var M=h.call(w);return L&&(g?w[d]=_:delete w[d]),M}(y):u.call(y)}},5771:function(s,r){"use strict";r.A=function(n){return function(a){return n(a)}}},2899:function(s,r,n){"use strict";var a=n(7218);r.A=function(l){var c=new l.constructor(l.byteLength);return new a.A(c).set(new a.A(l)),c}},3812:function(s,r,n){"use strict";var a=n(5507),l="object"==typeof exports&&exports&&!exports.nodeType&&exports,c=l&&"object"==typeof module&&module&&!module.nodeType&&module,h=c&&c.exports===l?a.A.Buffer:void 0,d=h?h.allocUnsafe:void 0;r.A=function(u,p){if(p)return u.slice();var f=u.length,y=d?d(f):new u.constructor(f);return u.copy(y),y}},1827:function(s,r,n){"use strict";var a=n(2899);r.A=function(l,c){var h=c?(0,a.A)(l.buffer):l.buffer;return new l.constructor(h,l.byteOffset,l.length)}},4405:function(s,r){"use strict";r.A=function(n,a){var l=-1,c=n.length;for(a||(a=Array(c));++l<c;)a[l]=n[l];return a}},9601:function(s,r,n){"use strict";var a=n(6437),l=n(6770);r.A=function(c,h,d,u){var p=!d;d||(d={});for(var f=-1,y=h.length;++f<y;){var w=h[f],g=u?u(d[w],c[w],w,d,c):void 0;void 0===g&&(g=c[w]),p?(0,l.A)(d,w,g):(0,a.A)(d,w,g)}return d}},7889:function(s,r,n){"use strict";var a=n(2281),l=function(){try{var c=(0,a.A)(Object,"defineProperty");return c({},"",{}),c}catch{}}();r.A=l},9646:function(s,r){"use strict";var n="object"==typeof global&&global&&global.Object===Object&&global;r.A=n},2816:function(s,r,n){"use strict";var a=n(1381),l=n(9844),c=n(3169);r.A=function(h){return(0,a.A)(h,c.A,l.A)}},2281:function(s,r,n){"use strict";n.d(r,{A:function(){return M}});var a,l=n(7572),c=n(5507).A["__core-js_shared__"],h=(a=/[^.]+$/.exec(c&&c.keys&&c.keys.IE_PROTO||""))?"Symbol(src)_1."+a:"",d=n(659),u=n(1543),p=/^\[object .+?Constructor\]$/,_=RegExp("^"+Function.prototype.toString.call(Object.prototype.hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),M=function(j,H){var U,A,X=(U=j,A=H,U?.[A]);return function(j){return!(!(0,d.A)(j)||(H=j,h&&h in H))&&((0,l.A)(j)?_:p).test((0,u.A)(j));var H}(X)?X:void 0}},8769:function(s,r,n){"use strict";var a=(0,n(2217).A)(Object.getPrototypeOf,Object);r.A=a},9844:function(s,r,n){"use strict";n.d(r,{A:function(){return h}});var a=n(6935),l=Object.prototype.propertyIsEnumerable,c=Object.getOwnPropertySymbols,h=c?function(d){return null==d?[]:(d=Object(d),function(u,p){for(var f=-1,y=null==u?0:u.length,w=0,g=[];++f<y;){var _=u[f];p(_)&&(g[w++]=_)}return g}(c(d),function(u){return l.call(d,u)}))}:a.A},7995:function(s,r,n){"use strict";n.d(r,{A:function(){return W}});var a=n(2281),l=n(5507),c=(0,a.A)(l.A,"DataView"),h=n(2461),d=(0,a.A)(l.A,"Promise"),u=(0,a.A)(l.A,"Set"),p=(0,a.A)(l.A,"WeakMap"),f=n(2159),y=n(1543),w="[object Map]",g="[object Promise]",_="[object Set]",L="[object WeakMap]",M="[object DataView]",j=(0,y.A)(c),H=(0,y.A)(h.A),X=(0,y.A)(d),U=(0,y.A)(u),A=(0,y.A)(p),C=f.A;(c&&C(new c(new ArrayBuffer(1)))!=M||h.A&&C(new h.A)!=w||d&&C(d.resolve())!=g||u&&C(new u)!=_||p&&C(new p)!=L)&&(C=function(q){var Z=(0,f.A)(q),at="[object Object]"==Z?q.constructor:void 0,nt=at?(0,y.A)(at):"";if(nt)switch(nt){case j:return M;case H:return w;case X:return g;case U:return _;case A:return L}return Z});var W=C},1683:function(s,r,n){"use strict";n.d(r,{A:function(){return u}});var a=n(659),l=Object.create,c=function(){function p(){}return function(f){if(!(0,a.A)(f))return{};if(l)return l(f);p.prototype=f;var y=new p;return p.prototype=void 0,y}}(),h=n(8769),d=n(501),u=function(p){return"function"!=typeof p.constructor||(0,d.A)(p)?{}:c((0,h.A)(p))}},3767:function(s,r){"use strict";var n=/^(?:0|[1-9]\d*)$/;r.A=function(a,l){var c=typeof a;return!!(l=l??9007199254740991)&&("number"==c||"symbol"!=c&&n.test(a))&&a>-1&&a%1==0&&a<l}},501:function(s,r){"use strict";var n=Object.prototype;r.A=function(a){var l=a&&a.constructor;return a===("function"==typeof l&&l.prototype||n)}},8795:function(s,r,n){"use strict";var a=n(9646),l="object"==typeof exports&&exports&&!exports.nodeType&&exports,c=l&&"object"==typeof module&&module&&!module.nodeType&&module,h=c&&c.exports===l&&a.A.process,d=function(){try{return c&&c.require&&c.require("util").t
1ypes||h&&h.binding&&h.binding("util")}catch{}}();r.A=d},2217:function(s,r){"use strict";r.A=function(n,a){return function(l){return n(a(l))}}},5507:function(s,r,n){"use strict";var a=n(9646),l="object"==typeof self&&self&&self.Object===Object&&self,c=a.A||l||Function("return this")();r.A=c},1543:function(s,r){"use strict";var n=Function.prototype.toString;r.A=function(a){if(null!=a){try{return n.call(a)}catch{}try{return a+""}catch{}}return""}},3707:function(s,r,n){"use strict";n.d(r,{A:function(){return v}});var a=n(2673),l=n(6437),c=n(9601),h=n(3169),d=n(2624),u=n(3812),p=n(4405),f=n(9844),y=n(802),w=n(8769),g=n(6935),_=Object.getOwnPropertySymbols?function(S){for(var N=[];S;)(0,y.A)(N,(0,f.A)(S)),S=(0,w.A)(S);return N}:g.A,L=n(2816),M=n(1381),j=function(S){return(0,M.A)(S,d.A,_)},H=n(7995),X=Object.prototype.hasOwnProperty,U=n(2899),A=/\w*$/,C=n(439),W=C.A?C.A.prototype:void 0,q=W?W.valueOf:void 0,Z=n(1827),nt=n(1683),ct=n(723),pt=n(776),st=n(7948),J=n(5771),lt=n(8795),P=lt.A&&lt.A.isMap,m=P?(0,J.A)(P):function(S){return(0,st.A)(S)&&"[object Map]"==(0,H.A)(S)},x=n(659),b=lt.A&&lt.A.isSet,B=b?(0,J.A)(b):function(S){return(0,st.A)(S)&&"[object Set]"==(0,H.A)(S)},E="[object Arguments]",O="[object Function]",z="[object Object]",F={};F[E]=F["[object Array]"]=F["[object ArrayBuffer]"]=F["[object DataView]"]=F["[object Boolean]"]=F["[object Date]"]=F["[object Float32Array]"]=F["[object Float64Array]"]=F["[object Int8Array]"]=F["[object Int16Array]"]=F["[object Int32Array]"]=F["[object Map]"]=F["[object Number]"]=F[z]=F["[object RegExp]"]=F["[object Set]"]=F["[object String]"]=F["[object Symbol]"]=F["[object Uint8Array]"]=F["[object Uint8ClampedArray]"]=F["[object Uint16Array]"]=F["[object Uint32Array]"]=!0,F["[object Error]"]=F[O]=F["[object WeakMap]"]=!1;var D=function S(N,I,V,K,et,it){var rt,ht=1&I,ft=2&I,dt=4&I;if(V&&(rt=et?V(N,K,et,it):V(N)),void 0!==rt)return rt;if(!(0,x.A)(N))return N;var mt,_t,St,vt=(0,ct.A)(N);if(vt){if(St=new(mt=N).constructor(_t=mt.length),_t&&"string"==typeof mt[0]&&X.call(mt,"index")&&(St.index=mt.index,St.input=mt.input),rt=St,!ht)return(0,p.A)(N,rt)}else{var bt=(0,H.A)(N),yt=bt==O||"[object GeneratorFunction]"==bt;if((0,pt.A)(N))return(0,u.A)(N,ht);if(bt==z||bt==E||yt&&!et){if(rt=ft||yt?{}:(0,nt.A)(N),!ht)return ft?function(mt,_t){return(0,c.A)(mt,_(mt),_t)}(N,function(mt,_t){return mt&&(0,c.A)(_t,(0,d.A)(_t),mt)}(rt,N)):function(mt,_t){return(0,c.A)(mt,(0,f.A)(mt),_t)}(N,function(mt,_t){return mt&&(0,c.A)(_t,(0,h.A)(_t),mt)}(rt,N))}else{if(!F[bt])return et?N:{};rt=function(S,N,I){var K,et,rt,ft,it=S.constructor;switch(N){case"[object ArrayBuffer]":return(0,U.A)(S);case"[object Boolean]":case"[object Date]":return new it(+S);case"[object DataView]":return rt=S,ft=I?(0,U.A)(rt.buffer):rt.buffer,new rt.constructor(ft,rt.byteOffset,rt.byteLength);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return(0,Z.A)(S,I);case"[object Map]":case"[object Set]":return new it;case"[object Number]":case"[object String]":return new it(S);case"[object RegExp]":return(et=new(K=S).constructor(K.source,A.exec(K))).lastIndex=K.lastIndex,et;case"[object Symbol]":return q?Object(q.call(S)):{}}}(N,bt,ht)}}it||(it=new a.A);var Lt=it.get(N);if(Lt)return Lt;it.set(N,rt),B(N)?N.forEach(function(mt){rt.add(S(mt,I,V,mt,N,it))}):m(N)&&N.forEach(function(mt,_t){rt.set(_t,S(mt,I,V,_t,N,it))});var Ct=vt?void 0:(dt?ft?j:L.A:ft?d.A:h.A)(N);return function(mt,_t){for(var St=-1,Tt=null==mt?0:mt.length;++St<Tt&&!1!==_t(mt[St],St););}(Ct||N,function(mt,_t){Ct&&(mt=N[_t=mt]),(0,l.A)(rt,_t,S(mt,I,V,_t,N,it))}),rt},v=function(S){return D(S,5)}},8138:function(s,r){"use strict";r.A=function(n,a){return n===a||n!=n&&a!=a}},8412:function(s,r,n){"use strict";n.d(r,{A:function(){return f}});var a=n(2159),l=n(7948),c=function(y){return(0,l.A)(y)&&"[object Arguments]"==(0,a.A)(y)},h=Object.prototype,d=h.hasOwnProperty,u=h.propertyIsEnumerable,p=c(function(){return arguments}())?c:function(y){return(0,l.A)(y)&&d.call(y,"callee")&&!u.call(y,"callee")},f=p},723:function(s,r){"use strict";r.A=Array.isArray},3628:function(s,r,n){"use strict";var a=n(7572),l=n(1628);r.A=function(c){return null!=c&&(0,l.A)(c.length)&&!(0,a.A)(c)}},776:function(s,r,n){"use strict";n.d(r,{A:function(){return d}});var a=n(5507),l="object"==typeof exports&&exports&&!exports.nodeType&&exports,c=l&&"object"==typeof module&&module&&!module.nodeType&&module,h=c&&c.exports===l?a.A.Buffer:void 0,d=(h?h.isBuffer:void 0)||function(){return!1}},5123:function(s,r,n){"use strict";n.d(r,{A:function(){return pt}});var a=n(2673),l=n(3558);function c(st){var J=-1,lt=null==st?0:st.length;for(this.__data__=new l.A;++J<lt;)this.add(st[J])}c.prototype.add=c.prototype.push=function(st){return this.__data__.set(st,"__lodash_hash_undefined__"),this},c.prototype.has=function(st){return this.__data__.has(st)};var h=c,d=function(st,J){for(var lt=-1,P=null==st?0:st.length;++lt<P;)if(J(st[lt],lt,st))return!0;return!1},u=function(st,J,lt,P,m,x){var b=1&lt,B=st.length,E=J.length;if(B!=E&&!(b&&E>B))return!1;var O=x.get(st),z=x.get(J);
1if(O&&z)return O==J&&z==st;var F=-1,D=!0,v=2&lt?new h:void 0;for(x.set(st,J),x.set(J,st);++F<B;){var S=st[F],N=J[F];if(P)var I=b?P(N,S,F,J,st,x):P(S,N,F,st,J,x);if(void 0!==I){if(I)continue;D=!1;break}if(v){if(!d(J,function(V,K){if(!v.has(K)&&(S===V||m(S,V,lt,P,x)))return v.push(K)})){D=!1;break}}else if(S!==N&&!m(S,N,lt,P,x)){D=!1;break}}return x.delete(st),x.delete(J),D},p=n(439),f=n(7218),y=n(8138),w=function(st){var J=-1,lt=Array(st.size);return st.forEach(function(P,m){lt[++J]=[m,P]}),lt},g=function(st){var J=-1,lt=Array(st.size);return st.forEach(function(P){lt[++J]=P}),lt},_=p.A?p.A.prototype:void 0,L=_?_.valueOf:void 0,M=n(2816),j=Object.prototype.hasOwnProperty,H=n(7995),X=n(723),U=n(776),A=n(5755),C="[object Arguments]",W="[object Array]",q="[object Object]",Z=Object.prototype.hasOwnProperty,nt=n(7948),ct=function st(J,lt,P,m,x){return J===lt||(null==J||null==lt||!(0,nt.A)(J)&&!(0,nt.A)(lt)?J!=J&&lt!=lt:function(st,J,lt,P,m,x){var b=(0,X.A)(st),B=(0,X.A)(J),E=b?W:(0,H.A)(st),O=B?W:(0,H.A)(J),z=(E=E==C?q:E)==q,F=(O=O==C?q:O)==q,D=E==O;if(D&&(0,U.A)(st)){if(!(0,U.A)(J))return!1;b=!0,z=!1}if(D&&!z)return x||(x=new a.A),b||(0,A.A)(st)?u(st,J,lt,P,m,x):function(V,K,et,it,rt,ht,ft){switch(et){case"[object DataView]":if(V.byteLength!=K.byteLength||V.byteOffset!=K.byteOffset)return!1;V=V.buffer,K=K.buffer;case"[object ArrayBuffer]":return!(V.byteLength!=K.byteLength||!ht(new f.A(V),new f.A(K)));case"[object Boolean]":case"[object Date]":case"[object Number]":return(0,y.A)(+V,+K);case"[object Error]":return V.name==K.name&&V.message==K.message;case"[object RegExp]":case"[object String]":return V==K+"";case"[object Map]":var dt=w;case"[object Set]":if(dt||(dt=g),V.size!=K.size&&!(1&it))return!1;var bt=ft.get(V);if(bt)return bt==K;it|=2,ft.set(V,K);var yt=u(dt(V),dt(K),it,rt,ht,ft);return ft.delete(V),yt;case"[object Symbol]":if(L)return L.call(V)==L.call(K)}return!1}(st,J,E,lt,P,m,x);if(!(1&lt)){var v=z&&Z.call(st,"__wrapped__"),S=F&&Z.call(J,"__wrapped__");
vendor: 4,806 bytes, line 1
1if(v||S){var N=v?st.value():st,I=S?J.value():J;return x||(x=new a.A),m(N,I,lt,P,x)}}return!!D&&(x||(x=new a.A),function(V,K,et,it,rt,ht){var ft=1&et,dt=(0,M.A)(V),vt=dt.length;if(vt!=(0,M.A)(K).length&&!ft)return!1;for(var bt=vt;bt--;){var yt=dt[bt];if(!(ft?yt in K:j.call(K,yt)))return!1}var Lt=ht.get(V),Rt=ht.get(K);if(Lt&&Rt)return Lt==K&&Rt==V;var Ct=!0;ht.set(V,K),ht.set(K,V);for(var mt=ft;++bt<vt;){var _t=V[yt=dt[bt]],St=K[yt];if(it)var Tt=ft?it(St,_t,yt,K,V,ht):it(_t,St,yt,V,K,ht);if(!(void 0===Tt?_t===St||rt(_t,St,et,it,ht):Tt)){Ct=!1;break}mt||(mt="constructor"==yt)}if(Ct&&!mt){var Et=V.constructor,qt=K.constructor;Et==qt||!("constructor"in V)||!("constructor"in K)||"function"==typeof Et&&Et instanceof Et&&"function"==typeof qt&&qt instanceof qt||(Ct=!1)}return ht.delete(V),ht.delete(K),Ct}(st,J,lt,P,m,x))}(J,lt,P,m,st,x))},pt=function(st,J){return ct(st,J)}},7572:function(s,r,n){"use strict";var a=n(2159),l=n(659);r.A=function(c){if(!(0,l.A)(c))return!1;var h=(0,a.A)(c);return"[object Function]"==h||"[object GeneratorFunction]"==h||"[object AsyncFunction]"==h||"[object Proxy]"==h}},1628:function(s,r){"use strict";r.A=function(n){return"number"==typeof n&&n>-1&&n%1==0&&n<=9007199254740991}},659:function(s,r){"use strict";r.A=function(n){var a=typeof n;return null!=n&&("object"==a||"function"==a)}},7948:function(s,r){"use strict";r.A=function(n){return null!=n&&"object"==typeof n}},5755:function(s,r,n){"use strict";n.d(r,{A:function(){return f}});var a=n(2159),l=n(1628),c=n(7948),h={};h["[object Float32Array]"]=h["[object Float64Array]"]=h["[object Int8Array]"]=h["[object Int16Array]"]=h["[object Int32Array]"]=h["[object Uint8Array]"]=h["[object Uint8ClampedArray]"]=h["[object Uint16Array]"]=h["[object Uint32Array]"]=!0,h["[object Arguments]"]=h["[object Array]"]=h["[object ArrayBuffer]"]=h["[object Boolean]"]=h["[object DataView]"]=h["[object Date]"]=h["[object Error]"]=h["[object Function]"]=h["[object Map]"]=h["[object Number]"]=h["[object Object]"]=h["[object RegExp]"]=h["[object Set]"]=h["[object String]"]=h["[object WeakMap]"]=!1;var d=n(5771),u=n(8795),p=u.A&&u.A.isTypedArray,f=p?(0,d.A)(p):function(y){return(0,c.A)(y)&&(0,l.A)(y.length)&&!!h[(0,a.A)(y)]}},3169:function(s,r,n){"use strict";n.d(r,{A:function(){return u}});var a=n(6753),l=n(501),c=(0,n(2217).A)(Object.keys,Object),h=Object.prototype.hasOwnProperty,d=n(3628),u=function(p){return(0,d.A)(p)?(0,a.A)(p):function(f){if(!(0,l.A)(f))return c(f);var y=[];for(var w in Object(f))h.call(f,w)&&"constructor"!=w&&y.push(w);return y}(p)}},2624:function(s,r,n){"use strict";n.d(r,{A:function(){return p}});var a=n(6753),l=n(659),c=n(501),h=Object.prototype.hasOwnProperty,u=n(3628),p=function(f){return(0,u.A)(f)?(0,a.A)(f,!0):function(f){if(!(0,l.A)(f))return function(_){var L=[];if(null!=_)for(var M in Object(_))L.push(M);return L}(f);var y=(0,c.A)(f),w=[];for(var g in f)("constructor"!=g||!y&&h.call(f,g))&&w.push(g);return w}(f)}},8347:function(s,r,n){"use strict";n.d(r,{A:function(){return S}});var a,l,c,h,N,V,K,et,d=n(2673),u=n(6770),p=n(8138),f=function(N,I,V){(void 0!==V&&!(0,p.A)(N[I],V)||void 0===V&&!(I in N))&&(0,u.A)(N,I,V)},w=n(3812),g=n(1827),_=n(4405),L=n(1683),M=n(8412),j=n(723),H=n(3628),X=n(7948),U=n(776),A=n(7572),C=n(659),W=n(2159),q=n(8769),nt=Function.prototype.toString,ct=Object.prototype.hasOwnProperty,pt=nt.call(Object),st=n(5755),J=function(N,I){if(("constructor"!==I||"function"!=typeof N[I])&&"__proto__"!=I)return N[I]},lt=n(9601),P=n(2624),x=function N(I,V,K,et,it){I!==V&&function(N,I,V){for(var K=-1,et=Object(N),it=V(N),rt=it.length;rt--;){var ht=it[++K];if(!1===I(et[ht],ht))break}}(V,function(rt,ht){if(it||(it=new d.A),(0,C.A)(rt))!function(N,I,V,K,et,it,rt){var ht,mt,ft=J(N,V),dt=J(I,V),vt=rt.get(dt);if(vt)f(N,V,vt);else{var bt=it?it(ft,dt,V+"",N,I,rt):void 0,yt=void 0===bt;if(yt){var Lt=(0,j.A)(dt),Rt=!Lt&&(0,U.A)(dt),Ct=!Lt&&!Rt&&(0,st.A)(dt);bt=dt,Lt||Rt||Ct?(0,j.A)(ft)?bt=ft:(0,X.A)(ht=ft)&&(0,H.A)(ht)?bt=(0,_.A)(ft):Rt?(yt=!1,bt=(0,w.A)(dt,!0)):Ct?(yt=!1,bt=(0,g.A)(dt,!0)):bt=[]:function(mt){if(!(0,X.A)(mt)||"[object Object]"!=(0,W.A)(mt))return!1;var _t=(0,q.A)(mt);if(null===_t)return!0;var St=ct.call(_t,"constructor")&&_t.constructor;return"function"==typeof St&&St instanceof St&&nt.call(St)==pt}(dt)||(0,M.A)(dt)?(bt=ft,(0,M.A)(ft)?bt=(0,lt.A)(mt=ft,(0,P.A)(mt)):(0,C.A)(ft)&&!(0,A.A)(ft)||(bt=(0,L.A)(dt))):yt=!1}yt&&(rt.set(dt,bt),et(bt,dt,K,it,rt),rt.delete(dt)),f(N,V,bt)}}(I,V,ht,K,N,et,it);else{var ft=et?et(J(I,ht),rt,ht+"",I,V,it):void 0;void 0===ft&&(ft=rt),f(I,ht,ft)}},P.A)},b=function(N){return N},B=Math.max,E=n(7889),O=E.A?function(N,I){return(0,E.A)(N,"toString",{configurable:!0,enumerable:!1,value:(V=I,function(){return V}),writable:!0});var V}:b,z=Date.now,F=(a=O,l=0,c=0,function(){var N=z(),I=16-(N-c);if(c=N,I>
10){if(++l>=800)return arguments[0]}else l=0;return a.apply(void 0,arguments)}),v=n(3767),S=(h=function(N,I,V){x(N,I,V)},N=function(N,I){var V=-1,K=I.length,et=K>1?I[K-1]:void 0,it=K>2?I[2]:void 0;for(et=h.length>3&&"function"==typeof et?(K--,et):void 0,it&&function(ht,ft,dt){if(!(0,C.A)(dt))return!1;var vt=typeof ft;return!!("number"==vt?(0,H.A)(dt)&&(0,v.A)(ft,dt.length):"string"==vt&&ft in dt)&&(0,p.A)(dt[ft],ht)}(I[0],I[1],it)&&(et=K<3?void 0:et,K=1),N=Object(N);++V<K;){var rt=I[V];rt&&h(N,rt,V)}return N},F((V=N,et=b,K=B(void 0===(K=undefined)?V.length-1:K,0),function(){for(var it=arguments,rt=-1,ht=B(it.length-K,0),ft=Array(ht);++rt<ht;)ft[rt]=it[K+rt];rt=-1;for(var dt=Array(K+1);++rt<K;)dt[rt]=it[rt];return dt[K]=et(ft),function(vt,bt,yt){switch(yt.length){case 0:return vt.call(bt);case 1:return vt.call(bt,yt[0]);case 2:return vt.call(bt,yt[0],yt[1]);case 3:return vt.call(bt,yt[0],yt[1],yt[2])}return vt.apply(bt,yt)}(V,this,dt)}),N+""))},6935:function(s,r){"use strict";r.A=function(){return[]}},6003:function(s,r,n){"use strict";n.r(r),n.d(r,{Attributor:function(){return l},AttributorStore:function(){return w},BlockBlot:function(){return q},ClassAttributor:function(){return p},ContainerBlot:function(){return at},EmbedBlot:function(){return nt},InlineBlot:function(){return C},LeafBlot:function(){return M},ParentBlot:function(){return U},Registry:function(){return d},Scope:function(){return a},ScrollBlot:function(){return st},StyleAttributor:function(){return y},TextBlot:function(){return lt}});var P,a=((P=a||{})[P.TYPE=3]="TYPE",P[P.LEVEL=12]="LEVEL",P[P.ATTRIBUTE=13]="ATTRIBUTE",P[P.BLOT=14]="BLOT",P[P.INLINE=7]="INLINE",P[P.BLOCK=11]="BLOCK",P[P.BLOCK_BLOT=10]="BLOCK_BLOT",P[P.INLINE_BLOT=6]="INLINE_BLOT",P[P.BLOCK_ATTRIBUTE=9]="BLOCK_ATTRIBUTE",P[P.INLINE_ATTRIBUTE=5]="INLINE_ATTRIBUTE",P[P.ANY=15]="ANY",P);class l{constructor(m,x,b={}){this.attrName=m,this.keyName=x,this.scope=null!=b.scope?b.scope&a.LEVEL|a.TYPE&a.ATTRIBUTE:a.ATTRIBUTE,null!=b.whitelist&&(this.whitelist=b.whitelist)}static keys(m){return Array.from(m.attributes).map(x=>x.name)}add(m,x){return!!this.canAdd(m,x)&&(m.setAttribute(this.keyName,x),!0)}canAdd(m,x){return null==this.whitelist||("string"==typeof x?this.whitelist.indexOf(x.replace(/["']/g,""))>-1:this.whitelist.indexOf(x)>-1)}remove(m){m.removeAttribute(this.keyName)}value(m){const x=m.getAttribute(this.keyName);return this.canAdd(m,x)&&x?x:""}}class c extends Error{constructor(m){super(m="[Parchment] "+m),this.message=m,this.name=this.constructor.name}}const h=class Hs{constructor(){this.attributes={},this.classes={},this.tags={},this.types={}}static find(m,x=!1){if(null==m)return null;if(this.blots.has(m))return this.blots.get(m)||null;if(x){let b=null;try{b=m.parentNode}catch{return null}return this.find(b,x)}return null}create(m,x,b){const B=this.query(x);if(null==B)throw new c(`Unable to create ${x} blot`);const E=B,O=x instanceof Node||x.nodeType===Node.TEXT_NODE?x:E.create(b),z=new E(m,O,b);return Hs.blots.set(z.domNode,z),z}find(m,x=!1){return Hs.find(m,x)}query(m,x=a.ANY){let b;return"string"==typeof m?b=this.types[m]||this.attributes[m]:m instanceof Text||m.nodeType===Node.TEXT_NODE?b=this.types.text:"number"==typeof m?m&a.LEVEL&a.BLOCK?b=this.types.block:m&a.LEVEL&a.INLINE&&(b=this.types.inline):m instanceof oe&&((m.getAttribute("class")||"").split(/\s+/).some(B=>(b=this.classes[B],!!b)),b=b||this.tags[m.tagName]),null==b?null:"scope"in b&&x&a.LEVEL&b.scope&&x&a.TYPE&b.scope?b:null}register(...m){return m.map(x=>{const b="blotName"in x,B="attrName"in x;if(!b&&!B)throw new c("Invalid definition");if(b&&"abstract"===x.blotName)throw new c("Cannot register abstract class");return this.types[b?x.blotName:B?x.attrName:void 0]=x,B?"string"==typeof x.keyName&&(this.attributes[x.keyName]=x):b&&(x.className&&(this.classes[x.className]=x),x.tagName&&(x.tagName=Array.isArray(x.tagName)?x.tagName.map(O=>O.toUpperCase()):x.tagName.toUpperCase(),(Array.isArray(x.tagName)?x.tagName:[x.tagName]).forEach(O=>{(null==this.tags[O]||null==x.className)&&(this.tags[O]=x)}))),x})}};h.blots=new WeakMap;let d=h;function u(P,m){return(P.getAttribute("class")||"").split(/\s+/).filter(x=>0===x.indexOf(`${m}-`))}const p=class extends l{static keys(P){return(P.getAttribute("class")||"").split(/\s+/).map(m=>m.split("-").slice(0,-1).join("-"))}add(P,m){return!!this.canAdd(P,m)&&(this.remove(P),P.classList.add(`${this.keyName}-${m}
1`),!0)}remove(P){u(P,this.keyName).forEach(m=>{P.classList.remove(m)}),0===P.classList.length&&P.removeAttribute("class")}value(P){const m=(u(P,this.keyName)[0]||"").slice(this.keyName.length+1);return this.canAdd(P,m)?m:""}};function f(P){const m=P.split("-"),x=m.slice(1).map(b=>b[0].toUpperCase()+b.slice(1)).join("");return m[0]+x}const y=class extends l{static keys(P){return(P.getAttribute("style")||"").split(";").map(m=>m.split(":")[0].trim())}add(P,m){return!!this.canAdd(P,m)&&(P.style[f(this.keyName)]=m,!0)}remove(P){P.style[f(this.keyName)]="",P.getAttribute("style")||P.removeAttribute("style")}value(P){const m=P.style[f(this.keyName)];return this.canAdd(P,m)?m:""}},w=class{constructor(P){this.attributes={},this.domNode=P,this.build()}attribute(P,m){m?P.add(this.domNode,m)&&(null!=P.value(this.domNode)?this.attributes[P.attrName]=P:delete this.attributes[P.attrName]):(P.remove(this.domNode),delete this.attributes[P.attrName])}build(){this.attributes={};const P=d.find(this.domNode);if(null==P)return;const m=l.keys(this.domNode),x=p.keys(this.domNode),b=y.keys(this.domNode);m.concat(x).concat(b).forEach(B=>{const E=P.scroll.query(B,a.ATTRIBUTE);E instanceof l&&(this.attributes[E.attrName]=E)})}copy(P){Object.keys(this.attributes).forEach(m=>{const x=this.attributes[m].value(this.domNode);P.format(m,x)})}move(P){this.copy(P),Object.keys(this.attributes).forEach(m=>{this.attributes[m].remove(this.domNode)}),this.attributes={}}values(){return Object.keys(this.attributes).reduce((P,m)=>(P[m]=this.attributes[m].value(this.domNode),P),{})}},g=class{constructor(P,m){this.scroll=P,this.domNode=m,d.blots.set(m,this),this.prev=null,this.next=null}static create(P){if(null==this.tagName)throw new c("Blot definition missing tagName");let m,x;return Array.isArray(this.tagName)?("string"==typeof P?(x=P.toUpperCase(),parseInt(x,10).toString()===x&&(x=parseInt(x,10))):"number"==typeof P&&(x=P),m="number"==typeof x?document.createElement(this.tagName[x-1]):x&&this.tagName.indexOf(x)>-1?document.createElement(x):document.createElement(this.tagName[0])):m=document.createElement(this.tagName),this.className&&m.classList.add(this.className),m}get statics(){return this.constructor}attach(){}clone(){const P=this.domNode.cloneNode(!1);return this.scroll.create(P)}detach(){null!=this.parent&&this.parent.removeChild(this),d.blots.delete(this.domNode)}deleteAt(P,m){this.isolate(P,m).remove()}formatAt(P,m,x,b){const B=this.isolate(P,m);if(null!=this.scroll.query(x,a.BLOT)&&b)B.wrap(x,b);else if(null!=this.scroll.query(x,a.ATTRIBUTE)){const E=this.scroll.create(this.statics.scope);B.wrap(E),E.format(x,b)}}insertAt(P,m,x){const b=null==x?this.scroll.create("text",m):this.scroll.create(m,x),B=this.split(P);this.parent.insertBefore(b,B||void 0)}isolate(P,m){const x=this.split(P);if(null==x)throw new Error("Attempt to isolate at end");return x.split(m),x}length(){return 1}offset(P=this.parent){return null==this.parent||this===P?0:this.parent.children.offset(this)+this.parent.offset(P)}optimize(P){this.statics.requiredContainer&&!(this.parent instanceof this.statics.requiredContainer)&&this.wrap(this.statics.requiredContainer.blotName)}remove(){null!=this.domNode.parentNode&&this.domNode.parentNode.removeChild(this.domNode),this.detach()}replaceWith(P,m){const x="string"==typeof P?this.scroll.create(P,m):P;return null!=this.parent&&(this.parent.insertBefore(x,this.next||void 0),this.remove()),x}split(P,m){return 0===P?this:this.next}update(P,m){}wrap(P,m){const x="string"==typeof P?this.scroll.create(P,m):P;if(null!=this.parent&&this.parent.insertBefore(x,this.next||void 0),"function"!=typeof x.appendChild)throw new c(`Cannot wrap ${P}`);return x.appendChild(this),x}};g.blotName="abstract";let _=g;const L=class extends _{static value(P){return!0}index(P,m){return this.domNode===P||this.domNode.compareDocumentPosition(P)&Node.DOCUMENT_POSITION_CONTAINED_BY?Math.min(m,1):-1}position(P,m){let x=Array.from(this.parent.domNode.childNodes).indexOf(this.domNode);return P>0&&(x+=1),[this.parent.domNode,x]}value(){return{[this.statics.blotName]:this.statics.value(this.domNode)||!0}}};L.scope=a.INLINE_BLOT;const M=L;class j{constructor(){this.head=null,this.tail=null,this.length=0}append(...m){if(this.insertBefore(m[0],null),m.length>1){const x=m.slice(1);this.append(...x)}}at(m){const x=this.iterator();let b=x();for(;b&&m>0;)m-=1,b=x();return b}contains(m){const x=this.iterator();let b=x();for(;b;){if(b===m)return!0;b=x()}return!1}indexOf(m){const x=this.iterator();let b=x(),B=0;for(;b;){if(b===m)return B;B+=1,b=x()}return-1}insertBefore(m,x){null!=m&&(this.remove(m),m.next=x,null!=x?(m.prev=x.prev,null!=x.prev&&(x.prev.next=m),x.prev=m,x===this.head&&(this.head=m)):null!=this.tail?(this.tail.next=m,m.prev=this.tail,this.tail=m):(m.prev=null,this.head=this.tail=m),this.length+=1)}offset(m){let x=0,b=this.head;for(;null!=b;){if(b===m)return x;x+=b.length(),b=b.next}return-1}remove(m){this.contains(m)&&(null!=m.prev&&(m.prev.next=m.next),null!=m.next&&(m.next.prev=m.prev),m===this.head&&(this.head=m.next),m===this.tail&&(this.tail=m.prev),this.length-=1)}iterator(m=this.head){return()=>{const x=m;return null!=m&&(m=m.next),x}}find(m,x=!1){const b=this.iterator();let B=b();for(;B;){const E=B.length();if(m<E||x&&m===E&&(null==B.next||0!==B.next.length()))return[B,m];m-=E,B=b()}return[null,0]}forEach(m){const x=this.iterator();let b=x();for(;b;)m(b),b=x()}forEachAt(m,x,b){if(x<=0)return;const[B,E]=this.find(m);let O=m-E;const z=this.iterator(B);let F=z();for(;F&&O<m+x;){const D=F.length();m>O?b(F,m-O,Math.min(x,O+D-m)):b(F,0,Math.min(D,m+x-O)),O+=D,F=z()}}map(m){return this.reduce((x,b)=>(x.push(m(b)),x),[])}reduce(m,x){const b=this.iterator();let B=b();for(;B;)x=m(x,B),B=b();return x}}
vendor: 8,778 bytes, line 1
1function H(P,m){const x=m.find(P);if(x)return x;try{return m.create(P)}catch{const b=m.create(a.INLINE);return Array.from(P.childNodes).forEach(B=>{b.domNode.appendChild(B)}),P.parentNode&&P.parentNode.replaceChild(b.domNode,P),b.attach(),b}}const X=class Qe extends _{constructor(m,x){super(m,x),this.uiNode=null,this.build()}appendChild(m){this.insertBefore(m)}attach(){super.attach(),this.children.forEach(m=>{m.attach()})}attachUI(m){null!=this.uiNode&&this.uiNode.remove(),this.uiNode=m,Qe.uiClass&&this.uiNode.classList.add(Qe.uiClass),this.uiNode.setAttribute("contenteditable","false"),this.domNode.insertBefore(this.uiNode,this.domNode.firstChild)}build(){this.children=new j,Array.from(this.domNode.childNodes).filter(m=>m!==this.uiNode).reverse().forEach(m=>{try{const x=H(m,this.scroll);this.insertBefore(x,this.children.head||void 0)}catch(x){if(x instanceof c)return;throw x}})}deleteAt(m,x){if(0===m&&x===this.length())return this.remove();this.children.forEachAt(m,x,(b,B,E)=>{b.deleteAt(B,E)})}descendant(m,x=0){const[b,B]=this.children.find(x);return null==m.blotName&&m(b)||null!=m.blotName&&b instanceof m?[b,B]:b instanceof Qe?b.descendant(m,B):[null,-1]}descendants(m,x=0,b=Number.MAX_VALUE){let B=[],E=b;return this.children.forEachAt(x,b,(O,z,F)=>{(null==m.blotName&&m(O)||null!=m.blotName&&O instanceof m)&&B.push(O),O instanceof Qe&&(B=B.concat(O.descendants(m,z,E))),E-=F}),B}detach(){this.children.forEach(m=>{m.detach()}),super.detach()}enforceAllowedChildren(){let m=!1;this.children.forEach(x=>{m||this.statics.allowedChildren.some(b=>x instanceof b)||(x.statics.scope===a.BLOCK_BLOT?(null!=x.next&&this.splitAfter(x),null!=x.prev&&this.splitAfter(x.prev),x.parent.unwrap(),m=!0):x instanceof Qe?x.unwrap():x.remove())})}formatAt(m,x,b,B){this.children.forEachAt(m,x,(E,O,z)=>{E.formatAt(O,z,b,B)})}insertAt(m,x,b){const[B,E]=this.children.find(m);if(B)B.insertAt(E,x,b);else{const O=null==b?this.scroll.create("text",x):this.scroll.create(x,b);this.appendChild(O)}}insertBefore(m,x){null!=m.parent&&m.parent.children.remove(m);let b=null;this.children.insertBefore(m,x||null),m.parent=this,null!=x&&(b=x.domNode),(this.domNode.parentNode!==m.domNode||this.domNode.nextSibling!==b)&&this.domNode.insertBefore(m.domNode,b),m.attach()}length(){return this.children.reduce((m,x)=>m+x.length(),0)}moveChildren(m,x){this.children.forEach(b=>{m.insertBefore(b,x)})}optimize(m){if(super.optimize(m),this.enforceAllowedChildren(),null!=this.uiNode&&this.uiNode!==this.domNode.firstChild&&this.domNode.insertBefore(this.uiNode,this.domNode.firstChild),0===this.children.length)if(null!=this.statics.defaultChild){const x=this.scroll.create(this.statics.defaultChild.blotName);this.appendChild(x)}else this.remove()}path(m,x=!1){const[b,B]=this.children.find(m,x),E=[[this,m]];return b instanceof Qe?E.concat(b.path(B,x)):(null!=b&&E.push([b,B]),E)}removeChild(m){this.children.remove(m)}replaceWith(m,x){const b="string"==typeof m?this.scroll.create(m,x):m;return b instanceof Qe&&this.moveChildren(b),super.replaceWith(b)}split(m,x=!1){if(!x){if(0===m)return this;if(m===this.length())return this.next}const b=this.clone();return this.parent&&this.parent.insertBefore(b,this.next||void 0),this.children.forEachAt(m,this.length(),(B,E,O)=>{const z=B.split(E,x);null!=z&&b.appendChild(z)}),b}splitAfter(m){const x=this.clone();for(;null!=m.next;)x.appendChild(m.next);return this.parent&&this.parent.insertBefore(x,this.next||void 0),x}unwrap(){this.parent&&this.moveChildren(this.parent,this.next||void 0),this.remove()}update(m,x){const b=[],B=[];m.forEach(E=>{E.target===this.domNode&&"childList"===E.type&&(b.push(...E.addedNodes),B.push(...E.removedNodes))}),B.forEach(E=>{if(null!=E.parentNode&&"IFRAME"!==E.tagName&&document.body.compareDocumentPosition(E)&Node.DOCUMENT_POSITION_CONTAINED_BY)return;const O=this.scroll.find(E);null!=O&&(null==O.domNode.parentNode||O.domNode.parentNode===this.domNode)&&O.detach()}),b.filter(E=>E.parentNode===this.domNode&&E!==this.uiNode).sort((E,O)=>E===O?0:E.compareDocumentPosition(O)&Node.DOCUMENT_POSITION_FOLLOWING?1:-1).forEach(E=>{let O=null;null!=E.nextSibling&&(O=this.scroll.find(E.nextSibling));const z=H(E,this.scroll);(z.next!==O||null==z.next)&&(null!=z.parent&&z.parent.removeChild(this),this.insertBefore(z,O||void 0))}),this.enforceAllowedChildren()}};X.uiClass="";const U=X,A=class xi extends U{static create(m){return super.create(m)}static formats(m,x){const b=x.query(xi.blotName);if(null==b||m.tagName!==b.tagName){if("string"==typeof this.tagName)return!0;if(Array.isArray(this.tagName))return m.tagName.toLowerCase()}}constructor(m,x){super(m,x),this.attributes=new w(this.domNode)}format(m,x){if(m!==this.statics.blotName||x){const b=this.scroll.query(m,a.INLINE);if(null==b)return;b instanceof l?this.attributes.attribute(b,x):x&&(m!==this.statics.blotName||this.formats()[m]!==x)&&this.replaceWith(m,x)}else this.children.forEach(b=>{b instanceof xi||(b=b.wrap(xi.blotName,!0)),this.attributes.copy(b)}),this.unwrap()}formats(){const m=this.attributes.values(),x=this.statics.formats(this.domNode,this.scroll);return null!=x&&(m[this.statics.blotName]=x),m}formatAt(m,x,b,B){null!=this.formats()[b]||this.scroll.query(b,a.ATTRIBUTE)?this.isolate(m,x).format(b,B):super.formatAt(m,x,b,B)}optimize(m){super.optimize(m);const x=this.formats();if(0===Object.keys(x).length)return this.unwrap();const b=this.next;b instanceof xi&&b.prev===this&&function(B,E){if(Object.keys(B).length!==Object.keys(E).length)return!1;for(const O in B)if(B[O]!==E[O])return!1;return!0}(x,b.formats())&&(b.moveChildren(this),b.remove())}replaceWith(m,x){const b=super.replaceWith(m,x);return this.attributes.copy(b),b}update(m,x){super.update(m,x),m.some(b=>b.target===this.domNode&&"attributes"===b.type)&&this.attributes.build()}wrap(m,x){const b=super.wrap(m,x);return b instanceof xi&&this.attributes.move(b),b}};A.allowedChildren=[A,M],A.blotName="inline",A.scope=a.INLINE_BLOT,A.tagName="SPAN";const C=A,W=class Us extends U{static create(m){return super.create(m)}static formats(m,x){const b=x.query(Us.blotName);if(null==b||m.tagName!==b.tagName){if("string"==typeof this.tagName)return!0;if(Array.isArray(this.tagName))return m.tagName.toLowerCase()}}constructor(m,x){super(m,x),this.attributes=new w(this.domNode)}format(m,x){const b=this.scroll.query(m,a.BLOCK);null!=b&&(b instanceof l?this.attributes.attribute(b,x):m!==this.statics.blotName||x?x&&(m!==this.statics.blotName||this.formats()[m]!==x)&&this.replaceWith(m,x):this.replaceWith(Us.blotName))}formats(){const m=this.attributes.values(),x=this.statics.formats(this.domNode,this.scroll);return null!=x&&(m[this.statics.blotName]=x),m}formatAt(m,x,b,B){null!=this.scroll.query(b,a.BLOCK)?this.format(b,B):super.formatAt(m,x,b,B)}insertAt(m,x,b){if(null==b||null!=this.scroll.query(x,a.INLINE))super.insertAt(m,x,b);else{const B=this.split(m);if(null==B)throw new Error("Attempt to insertAt after block boundaries");{const E=this.scroll.create(x,b);B.parent.insertBefore(E,B)}}}replaceWith(m,x){const b=super.replaceWith(m,x);return this.attributes.copy(b),b}update(m,x){super.update(m,x),m.some(b=>b.target===this.domNode&&"attributes"===b.type)&&this.attributes.build()}};W.blotName="block",W.scope=a.BLOCK_BLOT,W.tagName="P",W.allowedChildren=[C,W,M];const q=W,Z=class extends U{checkMerge(){return null!==this.next&&this.next.statics.blotName===this.statics.blotName}deleteAt(P,m){super.deleteAt(P,m),this.enforceAllowedChildren()}formatAt(P,m,x,b){super.formatAt(P,m,x,b),this.enforceAllowedChildren()}insertAt(P,m,x){super.insertAt(P,m,x),this.enforceAllowedChildren()}optimize(P){super.optimize(P),this.children.length>0&&null!=this.next&&this.checkMerge()&&(this.next.moveChildren(this),this.next.remove())}};Z.blotName="container",Z.scope=a.BLOCK_BLOT;const at=Z,nt=class extends M{static formats(P,m){}format(P,m){super.formatAt(0,this.length(),P,m)}formatAt(P,m,x,b){0===P&&m===this.length()?this.format(x,b):super.formatAt(P,m,x,b)}formats(){return this.statics.formats(this.domNode,this.scroll)}},ct={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},pt=class extends U{constructor(P,m){super(null,m),this.registry=P,this.scroll=this,this.build(),this.observer=new MutationObserver(x=>{this.update(x)}),this.observer.observe(this.domNode,ct),this.attach()}create(P,m){return this.registry.create(this,P,m)}find(P,m=!1){const x=this.registry.find(P,m);return x?x.scroll===this?x:m?this.find(x.scroll.domNode.parentNode,!0):null:null}query(P,m=a.ANY){return this.registry.query(P,m)}register(...P){return this.registry.register(...P)}build(){null!=this.scroll&&super.build()}detach(){super.detach(),this.observer.disconnect()}deleteAt(P,m){this.update(),0===P&&m===this.length()?this.children.forEac
1h(x=>{x.remove()}):super.deleteAt(P,m)}formatAt(P,m,x,b){this.update(),super.formatAt(P,m,x,b)}insertAt(P,m,x){this.update(),super.insertAt(P,m,x)}optimize(P=[],m={}){super.optimize(m);const x=m.mutationsMap||new WeakMap;let b=Array.from(this.observer.takeRecords());for(;b.length>0;)P.push(b.pop());const B=(z,F=!0)=>{null==z||z===this||null!=z.domNode.parentNode&&(x.has(z.domNode)||x.set(z.domNode,[]),F&&B(z.parent))},E=z=>{x.has(z.domNode)&&(z instanceof U&&z.children.forEach(E),x.delete(z.domNode),z.optimize(m))};let O=P;for(let z=0;O.length>0;z+=1){if(z>=100)throw new Error("[Parchment] Maximum optimize iterations reached");for(O.forEach(F=>{const D=this.find(F.target,!0);null!=D&&(D.domNode===F.target&&("childList"===F.type?(B(this.find(F.previousSibling,!1)),Array.from(F.addedNodes).forEach(v=>{const S=this.find(v,!1);B(S,!1),S instanceof U&&S.children.forEach(N=>{B(N,!1)})})):"attributes"===F.type&&B(D.prev)),B(D))}),this.children.forEach(E),O=Array.from(this.observer.takeRecords()),b=O.slice();b.length>0;)P.push(b.pop())}}update(P,m={}){P=P||this.observer.takeRecords();const x=new WeakMap;P.map(b=>{const B=this.find(b.target,!0);return null==B?null:x.has(B.domNode)?(x.get(B.domNode).push(b),null):(x.set(B.domNode,[b]),B)}).forEach(b=>{null!=b&&b!==this&&x.has(b.domNode)&&b.update(x.get(b.domNode)||[],m)}),m.mutationsMap=x,x.has(this.domNode)&&super.update(x.get(this.domNode),m),this.optimize(P,m)}};pt.blotName="scroll",pt.defaultChild=q,pt.allowedChildren=[q,at],pt.scope=a.BLOCK_BLOT,pt.tagName="DIV";const st=pt,J=class _o extends M{static create(m){return document.createTextNode(m)}static value(m){return m.data}constructor(m,x){super(m,x),this.text=this.statics.value(this.domNode)}deleteAt(m,x){this.domNode.data=this.text=this.text.slice(0,m)+this.text.slice(m+x)}index(m,x){return this.domNode===m?x:-1}insertAt(m,x,b){null==b?(this.text=this.text.slice(0,m)+x+this.text.slice(m),this.domNode.data=this.text):super.insertAt(m,x,b)}length(){return this.text.length}optimize(m){super.optimize(m),this.text=this.statics.value(this.domNode),0===this.text.length?this.remove():this.next instanceof _o&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())}position(m,x=!1){return[this.domNode,m]}split(m,x=!1){if(!x){if(0===m)return this;if(m===this.length())return this.next}const b=this.scroll.create(this.domNode.splitText(m));return this.parent.insertBefore(b,this.next||void 0),this.text=this.statics.value(this.domNode),b}update(m,x){m.some(b=>"characterData"===b.type&&b.target===this.domNode)&&(this.text=this.statics.value(this.domNode))}value(){return this.text}};J.blotName="text",J.scope=a.INLINE_BLOT;const lt=J}},t={};function e(s){var r=t[s];if(void 0!==r)return r.exports;var n=t[s]={id:s,loaded:!1,exports:{}};return o[s](n,n.exports,e),n.loaded=!0,n.exports}e.n=function(s){var r=s&&s.__esModule?function(){return s.default}:function(){return s};return e.d(r,{a:r}),r},e.d=function(s,r){for(var n in r)e.o(r,n)&&!e.o(s,n)&&Object.defineProperty(s,n,{enumerable:!0,get:r[n]})},e.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch{if("object"==typeof window)return window}}(),e.o=function(s,r){return Object.prototype.hasOwnProperty.call(s,r)},e.r=function(s){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(s,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(s,"__esModule",{value:!0})},e.nmd=function(s){return s.paths=[],s.children||(s.children=[]),s};var i={};return function(){"use strict";e.d(i,{default:function(){return $e}});var s=e(3729),r=e(8276),n=e(7912),a=e(6003),c=new class l extends a.ClassAttributor{add(k,T){let Y=0;if("+1"===T||"-1"===T){const ot=this.value(k)||0;Y="+1"===T?ot+1:ot-1}else"number"==typeof T&&(Y=T);return 0===Y?(this.remove(k),!0):super.add(k,Y.toString())}canAdd(k,T){return super.canAdd(k,T)||super.canAdd(k,parseInt(T,10))}value(k){return parseInt(super.value(k),10)||void 0}}("indent","ql-indent",{scope:a.Scope.BLOCK,whitelist:[1,2,3,4,5,6,7,8]}),h=e(9698),y=e(580),w=e(6142);class g extends y.A{}g.blotName="list-container",g.tagName="OL";class _ extends h.Ay{static create(k){const T=super.create();
vendor: 4,761 bytes, line 1
1return T.setAttribute("data-list",k),T}static formats(k){return k.getAttribute("data-list")||void 0}static register(){w.Ay.register(g)}constructor(k,T){super(k,T);const Y=T.ownerDocument.createElement("span"),ot=ut=>{if(!k.isEnabled())return;const xt=this.statics.formats(T,k);"checked"===xt?(this.format("list","unchecked"),ut.preventDefault()):"unchecked"===xt&&(this.format("list","checked"),ut.preventDefault())};Y.addEventListener("mousedown",ot),Y.addEventListener("touchstart",ot),this.attachUI(Y)}format(k,T){k===this.statics.blotName&&T?this.domNode.setAttribute("data-list",T):super.format(k,T)}}_.blotName="list",_.tagName="LI",g.allowedChildren=[_],_.requiredContainer=g;var L=e(9541),M=e(8638),j=e(6772),H=e(664),X=e(4850),A=class U extends X.A{static blotName="bold";static tagName=["STRONG","B"];static create(){return super.create()}static formats(){return!0}optimize(k){super.optimize(k),this.domNode.tagName!==this.statics.tagName[0]&&this.replaceWith(this.statics.blotName)}};class C extends X.A{static blotName="link";static tagName="A";static SANITIZED_URL="about:blank";static PROTOCOL_WHITELIST=["http","https","mailto","tel","sms"];static create(k){const T=super.create(k);return T.setAttribute("href",this.sanitize(k)),T.setAttribute("rel","noopener noreferrer"),T.setAttribute("target","_blank"),T}static formats(k){return k.getAttribute("href")}static sanitize(k){return W(k,this.PROTOCOL_WHITELIST)?k:this.SANITIZED_URL}format(k,T){k===this.statics.blotName&&T?this.domNode.setAttribute("href",this.constructor.sanitize(T)):super.format(k,T)}}function W(tt,k){const T=document.createElement("a");T.href=tt;const Y=T.href.slice(0,T.href.indexOf(":"));return k.indexOf(Y)>-1}var ct=e(746);const J=["alt","height","width"];const m=["height","width"];var B=e(9404),E=e(5232),O=e.n(E),z=e(4266),F=e(3036),D=e(4541),v=e(5508),S=e(584);const N=new a.ClassAttributor("code-token","hljs",{scope:a.Scope.INLINE});class I extends X.A{static formats(k,T){for(;null!=k&&k!==T.domNode;){if(k.classList&&k.classList.contains(B.Ay.className))return super.formats(k,T);k=k.parentNode}}constructor(k,T,Y){super(k,T,Y),N.add(this.domNode,Y)}format(k,T){k!==I.blotName?super.format(k,T):T?N.add(this.domNode,T):(N.remove(this.domNode),this.domNode.classList.remove(this.statics.className))}optimize(){super.optimize(...arguments),N.value(this.domNode)||this.unwrap()}}I.blotName="code-token",I.className="ql-token";class V extends B.Ay{static create(k){const T=super.create(k);return"string"==typeof k&&T.setAttribute("data-language",k),T}static formats(k){return k.getAttribute("data-language")||"plain"}static register(){}format(k,T){k===this.statics.blotName&&T?this.domNode.setAttribute("data-language",T):super.format(k,T)}replaceWith(k,T){return this.formatAt(0,this.length(),I.blotName,!1),super.replaceWith(k,T)}}class K extends B.EJ{attach(){super.attach(),this.forceNext=!1,this.scroll.emitMount(this)}format(k,T){k===V.blotName&&(this.forceNext=!0,this.children.forEach(Y=>{Y.format(k,T)}))}formatAt(k,T,Y,ot){Y===V.blotName&&(this.forceNext=!0),super.formatAt(k,T,Y,ot)}highlight(k){let T=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(null==this.children.head)return;const Y=`${Array.from(this.domNode.childNodes).filter(ut=>ut!==this.uiNode).map(ut=>ut.textContent).join("\n")}\n`,ot=V.formats(this.children.head.domNode);if(T||this.forceNext||this.cachedText!==Y){if(Y.trim().length>0||null==this.cachedText){const ut=this.children.reduce((Nt,Yt)=>Nt.concat((0,h.mG)(Yt,!1)),new(O())),xt=k(Y,ot);ut.diff(xt).reduce((Nt,Yt)=>{let{retain:re,attributes:de}=Yt;return re?(de&&Object.keys(de).forEach(Ae=>{[V.blotName,I.blotName].includes(Ae)&&this.formatAt(Nt,re,Ae,de[Ae])}),Nt+re):Nt},0)}this.cachedText=Y,this.forceNext=!1}}html(k,T){const[Y]=this.children.find(k);return`<pre data-language="${Y?V.formats(Y.domNode):"plain"}">\n${(0,v.X)(this.code(k,T))}\n</pre>`}optimize(k){if(super.optimize(k),null!=this.parent&&null!=this.children.head&&null!=this.uiNode){const T=V.formats(this.children.head.domNode);T!==this.uiNode.value&&(this.uiNode.value=T)}}}K.allowedChildren=[V],V.requiredContainer=K,V.allowedChildren=[I,D.A,v.A,F.A];class et extends z.A{static register(){w.Ay.register(I,!0),w.Ay.register(V,!0),w.Ay.register(K,!0)}constructor(k,T){if(super(k,T),null==this.options.hljs)throw new Error("Syntax module requires highlight.js. Please include the library on the page before Quill.");this.languages=this.options.languages.reduce((Y,ot)=>{let{key:ut}=ot;return Y[ut]=!0,Y},{}),this.highlightBlot=this.highlightBlot.bind(this),this.initListener(),this.initTimer()}initListener(){this.quill.on(w.Ay.events.SCROLL_BLOT_MOUNT,k=>{if(!(k instanceof K))return;const T=this.quill.root.ownerDocument.createElement("select");
1this.options.languages.forEach(Y=>{let{key:ot,label:ut}=Y;const xt=T.ownerDocument.createElement("option");xt.textContent=ut,xt.setAttribute("value",ot),T.appendChild(xt)}),T.addEventListener("change",()=>{k.format(V.blotName,T.value),this.quill.root.focus(),this.highlight(k,!0)}),null==k.uiNode&&(k.attachUI(T),k.children.head&&(T.value=V.formats(k.children.head.domNode)))})}initTimer(){let k=null;this.quill.on(w.Ay.events.SCROLL_OPTIMIZE,()=>{k&&clearTimeout(k),k=setTimeout(()=>{this.highlight(),k=null},this.options.interval)})}highlight(){let k=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,T=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(this.quill.selection.composing)return;this.quill.update(w.Ay.sources.USER);const Y=this.quill.getSelection();(null==k?this.quill.scroll.descendants(K):[k]).forEach(ot=>{ot.highlight(this.highlightBlot,T)}),this.quill.update(w.Ay.sources.SILENT),null!=Y&&this.quill.setSelection(Y,w.Ay.sources.SILENT)}highlightBlot(k){let T=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"plain";if(T=this.languages[T]?T:"plain","plain"===T)return(0,v.X)(k).split("\n").reduce((ot,ut,xt)=>(0!==xt&&ot.insert("\n",{[B.Ay.blotName]:T}),ot.insert(ut)),new(O()));const Y=this.quill.root.ownerDocument.createElement("div");return Y.classList.add(B.Ay.className),Y.innerHTML=((ot,ut,xt)=>{if("string"==typeof ot.versionString){const Nt=ot.versionString.split(".")[0];if(parseInt(Nt,10)>=11)return ot.highlight(xt,{language:ut}).value}return ot.highlight(ut,xt).value})(this.options.hljs,T,k),(0,S.hV)(this.quill.scroll,Y,[(ot,ut)=>{const xt=N.value(ot);return xt?ut.compose((new(O())).retain(ut.length(),{[I.blotName]:xt})):ut}],[(ot,ut)=>ot.data.split("\n").reduce((xt,Nt,Yt)=>(0!==Yt&&xt.insert("\n",{[B.Ay.blotName]:T}),xt.insert(Nt)),ut)],new WeakMap)}}et.DEFAULTS={hljs:window.hljs,interval:1e3,languages:[{key:"plain",label:"Plain"},{key:"bash",label:"Bash"},{key:"cpp",label:"C++"},{key:"cs",label:"C#"},{key:"css",label:"CSS"},{key:"diff",label:"Diff"},{key:"xml",label:"HTML/XML"},{key:"java",label:"Java"},{key:"javascript",label:"JavaScript"},{key:"markdown",label:"Markdown"},{key:"php",label:"PHP"},{key:"python",label:"Python"},{key:"ruby",label:"Ruby"},{key:"sql",label:"SQL"}]};class it extends h.Ay{static blotName="table";static tagName="TD";static create(k){const T=super.create();return T.setAttribute("data-row",k||dt()),T}static formats(k){if(k.hasAttribute("data-row"))return k.getAttribute("data-row")}cellOffset(){return this.parent?this.parent.children.indexOf(this):-1}format(k,T){k===it.blotName&&T?this.domNode.setAttribute("data-row",T):super.format(k,T)}row(){return this.parent}rowOffset(){return this.row()?this.row().rowOffset():-1}table(){return this.row()&&this.row().table()}}class rt extends y.A{static blotName="table-row";static tagName="TR";checkMerge(){if(super.checkMerge()&&null!=this.next.children.head){const k=this.children.head.formats(),T=this.children.tail.formats(),Y=this.next.children.head.formats(),ot=this.next.children.tail.formats();return k.table===T.table&&k.table===Y.table&&k.table===ot.table}return!1}optimize(k){super.optimize(k),this.children.forEach(T=>{if(null==T.next)return;const Y=T.formats(),ot=T.next.formats();if(Y.table!==ot.table){const ut=this.splitAfter(T);ut&&ut.optimize(),this.prev&&this.prev.optimize()}})}rowOffset(){return this.parent?this.parent.children.indexOf(this):-1}table(){return this.parent&&this.parent.parent}}class ht extends y.A{static blotName="table-body";static tagName="TBODY"}class ft extends y.A{static blotName="table-container";static tagName="TABLE";balanceCells(){const k=this.descendants(rt),T=k.reduce((Y,ot)=>Math.max(ot.children.length,Y),0);k.forEach(Y=>{new Array(T-Y.children.length).fill(0).forEach(()=>{let ot;null!=Y.children.head&&(ot=it.formats(Y.children.head.domNode));const ut=this.scroll.create(it.blotName,ot);Y.appendChild(ut),ut.optimize()})})}cells(k){return this.rows().map(T=>T.children.at(k))}deleteColumn(k){const[T]=this.descendant(ht);null!=T&&null!=T.children.head&&T.children.forEach(Y=>{const ot=Y.children.at(k);ot?.remove()})}insertColumn(k){const[T]=this.descendant(ht);
1null!=T&&null!=T.children.head&&T.children.forEach(Y=>{const ot=Y.children.at(k),ut=it.formats(Y.children.head.domNode),xt=this.scroll.create(it.blotName,ut);Y.insertBefore(xt,ot)})}insertRow(k){const[T]=this.descendant(ht);if(null==T||null==T.children.head)return;const Y=dt(),ot=this.scroll.create(rt.blotName);T.children.head.children.forEach(()=>{const xt=this.scroll.create(it.blotName,Y);ot.appendChild(xt)});const ut=T.children.at(k);T.insertBefore(ot,ut)}rows(){const k=this.children.head;return null==k?[]:k.children.map(T=>T)}}function dt(){return`row-${Math.random().toString(36).slice(2,6)}`}ft.allowedChildren=[ht],ht.requiredContainer=ft,ht.allowedChildren=[rt],rt.requiredContainer=ht,rt.allowedChildren=[it],it.requiredContainer=rt;const yt=(0,e(6078).A)("quill:toolbar");class Lt extends z.A{constructor(k,T){if(super(k,T),Array.isArray(this.options.container)){const Y=document.createElement("div");Y.setAttribute("role","toolbar"),ot=Y,ut=this.options.container,Array.isArray(ut[0])||(ut=[ut]),ut.forEach(xt=>{const Nt=document.createElement("span");Nt.classList.add("ql-formats"),xt.forEach(Yt=>{if("string"==typeof Yt)Rt(Nt,Yt);else{const re=Object.keys(Yt)[0],de=Yt[re];Array.isArray(de)?function(Ae,si,Ee){const Pe=document.createElement("select");Pe.classList.add(`ql-${si}`),Ee.forEach(G=>{const R=document.createElement("option");!1!==G?R.setAttribute("value",String(G)):R.setAttribute("selected","selected"),Pe.appendChild(R)}),Ae.appendChild(Pe)}(Nt,re,de):Rt(Nt,re,de)}}),ot.appendChild(Nt)}),k.container?.parentNode?.insertBefore(Y,k.container),this.container=Y}else this.container="string"==typeof this.options.container?document.querySelector(this.options.container):this.options.container;var ot,ut;this.container instanceof HTMLElement?(this.container.classList.add("ql-toolbar"),this.controls=[],this.handlers={},this.options.handlers&&Object.keys(this.options.handlers).forEach(Y=>{const ot=this.options.handlers?.[Y];ot&&this.addHandler(Y,ot)}),Array.from(this.container.querySelectorAll("button, select")).forEac
1h(Y=>{this.attach(Y)}),this.quill.on(w.Ay.events.EDITOR_CHANGE,()=>{const[Y]=this.quill.selection.getRange();this.update(Y)})):yt.error("Container required for toolbar",this.options)}addHandler(k,T){this.handlers[k]=T}attach(k){let T=Array.from(k.classList).find(ot=>0===ot.indexOf("ql-"));T&&(T=T.slice(3),"BUTTON"===k.tagName&&k.setAttribute("type","button"),null!=this.handlers[T]||null!=this.quill.scroll.query(T)?(k.addEventListener("SELECT"===k.tagName?"change":"click",ot=>{let ut;if("SELECT"===k.tagName){if(k.selectedIndex<0)return;const Nt=k.options[k.selectedIndex];ut=!Nt.hasAttribute("selected")&&(Nt.value||!1)}else ut=!k.classList.contains("ql-active")&&(k.value||!k.hasAttribute("value")),ot.preventDefault();this.quill.focus();const[xt]=this.quill.selection.getRange();if(null!=this.handlers[T])this.handlers[T].call(this,ut);else if(this.quill.scroll.query(T).prototype instanceof a.EmbedBlot){if(ut=prompt(`Enter ${T}`),!ut)return;this.quill.updateContents((new(O())).retain(xt.index).delete(xt.length).insert({[T]:ut}),w.Ay.sources.USER)}else this.quill.format(T,ut,w.Ay.sources.USER);this.update(xt)}),this.controls.push([T,k])):yt.warn("ignoring attaching to nonexistent format",T,k))}update(k){const T=null==k?{}:this.quill.getFormat(k);this.controls.forEach(Y=>{const[ot,ut]=Y;if("SELECT"===ut.tagName){let xt=null;if(null==k)xt=null;else if(null==T[ot])xt=ut.querySelector("option[selected]");else if(!Array.isArray(T[ot])){let Nt=T[ot];"string"==typeof Nt&&(Nt=Nt.replace(/"/g,'\\"')),xt=ut.querySelector(`option[value="${Nt}"]`)}null==xt?(ut.value="",ut.selectedIndex=-1):xt.selected=!0}else if(null==k)ut.classList.remove("ql-active"),ut.setAttribute("aria-pressed","false");else if(ut.hasAttribute("value")){const xt=T[ot],Nt=xt===ut.getAttribute("value")||null!=xt&&xt.toString()===ut.getAttribute("value")||null==xt&&!ut.getAttribute("value");ut.classList.toggle("ql-active",Nt),ut.setAttribute("aria-pressed",Nt.toString())}else{const xt=null!=T[ot];ut.classList.toggle("ql-active",xt),ut.setAttribute("aria-pressed",xt.toString())}})}}function Rt(tt,k,T){const Y=document.createElement("button");Y.setAttribute("type","button"),Y.classList.add(`ql-${k}`),Y.setAttribute("aria-pressed","false"),null!=T?(Y.value=T,Y.setAttribute("aria-label",`${k}: ${T}`)):Y.setAttribute("aria-label",k),tt.appendChild(Y)}Lt.DEFAULTS={},Lt.DEFAULTS={container:null,handlers:{clean(){const tt=this.quill.getSelection();if(null!=tt)if(0===tt.length){const k=this.quill.getFormat();Object.keys(k).forEach(T=>{null!=this.quill.scroll.query(T,a.Scope.INLINE)&&this.quill.format(T,!1,w.Ay.sources.USER)})}else this.quill.removeFormat(tt.index,tt.length,w.Ay.sources.USER)},direction(tt){const{align:k}=this.quill.getFormat();"rtl"===tt&&null==k?this.quill.format("align","right",w.Ay.sources.USER):tt||"right"!==k||this.quill.format("align",!1,w.Ay.sources.USER),this.quill.format("direction",tt,w.Ay.sources.USER)},indent(tt){const k=this.quill.getSelection(),T=this.quill.getFormat(k),Y=parseInt(T.indent||0,10);if("+1"===tt||"-1"===tt){let ot="+1"===tt?1:-1;"rtl"===T.direction&&(ot*=-1),this.quill.format("indent",Y+ot,w.Ay.sources.USER)}},link(tt){!0===tt&&(tt=prompt("Enter link URL:")),this.quill.format("link",tt,w.Ay.sources.USER)},list(tt){const k=this.quill.getSelection(),T=this.quill.getFormat(k);this.quill.format("list","check"===tt?"checked"!==T.list&&"unchecked"!==T.list&&"unchecked":tt,w.Ay.sources.USER)}}};const Ct='<svg viewbox="0 0 18 18"><polyline class="ql-even ql-stroke" points="5 7 3 9 5 11"/><polyline class="ql-even ql-stroke" points="13 7 15 9 13 11"/><line class="ql-stroke" x1="10" x2="8" y1="5" y2="13"/></svg>';var mt={align:{"":'<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="3" x2="15" y1="9" y2="9"/><line class="ql-stroke" x1="3" x2="13" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="9" y1="4" y2="4"/></svg>',center:'<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="15" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="14" x2="4" y1="14" y2="14"/><line class="ql-stroke" x1="12" x2="6" y1="4" y2="4"/></svg>',right:'<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="15" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="15" x2="5" y1="14" y2="14"/><line class="ql-stroke" x1="15" x2="9" y1="4" y2="4"/></svg>',justify:'<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="15" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="15" x2="3" y1="14" y2="14"/><line class="ql-stroke" x1="15" x2="3" y1="4" y2="4"/></svg>'},background:'<svg viewbox="0 0 18 18"><g class="ql-fill ql-color-label"><polygon points="6 6.868 6 6 5 6 5 7 5.942 7 6 6.868"/><rect height="1" width="1" x="4" y="4"/><polygon points="6.817 5 6 5 6 6 6.38 6 6.817 5"/><rect height="1" width="1" x="2" y="6"/><rect height="1" width="1" x="3" y="5"/><rect height="1" width="1" x="4" y="7"/><polygon points="4 11.439 4 11 3 11 3 12 3.755 12 4 11.439"/><rect height="1" width="1" x="2" y="12"/><rect height="1" width="1" x="2" y="9"/><rect height="1" width="1" x="2" y="15"/><polygon points="4.63 10 4 10 4 11 4.192 11 4.63 10"/><rect height="1" width="1" x="3" y="8"/><path d="M10.832,4.2L11,4.582V4H10.708A1.948,1.948,0,0,1,10.832,4.2Z"/><path d="M7,4.582L7.168,4.2A1.929,1.929,0,0,1,7.292,4H7V4.582Z"/><path d="M8,13H7.683l-0.351.8a1.933,1.933,0,0,1-.124.2H8V13Z"/><rect height="1" width="1" x="12" y="2"/><rect height="1" width="1" x="11" y="3"/><path d="M9,3H8V3.282A1.985,1.985,0,0,1,9,3Z"/><rect height="1" width="1" x="2" y="3"/><rect height="1" width="1" x="6" y="2"/><rect height="1" width="1" x="3" y="2"/><rect height="1" width="1" x="5" y="3"/><rect height="1" width="1" x="9" y="2"/><rect height="1" width="1" x="15" y="14"/><polygon points="13.447 10.174 13.469 10.225 13.472 10.232 13.808 11 14 11 14 10 13.37 10 13.447 10.174"/><rect height="1" width="1" x="13" y="7"/><rect height="1" width="1" x="15" y="5"/><rect height="1" width="1" x="14" y="6"/><rect height="1" width="1" x="15" y="8"/><rect height="1" width="1" x="14" y="9"/><path d="M3.775,14H3v1H4V14.314A1.97,1.97,0,0,1,3.775,14Z"/><rect height="1" width="1" x="14" y="3"/><polygon points="12 6.868 12 6 11.62 6 12 6.868"/><rect height="1" width="1" x="15" y="2"/><rect height="1" width="1" x="12" y="5"/><rect height="1" width="1" x="13" y="4"/><polygon points="12.933 9 13 9 13 8 12.495 8 12.933 9"/><rect height="1" width="1" x="9" y="14"/><rect height="1" width="1" x="8" y="15"/>
1<path d="M6,14.926V15H7V14.316A1.993,1.993,0,0,1,6,14.926Z"/><rect height="1" width="1" x="5" y="15"/><path d="M10.668,13.8L10.317,13H10v1h0.792A1.947,1.947,0,0,1,10.668,13.8Z"/><rect height="1" width="1" x="11" y="15"/><path d="M14.332,12.2a1.99,1.99,0,0,1,.166.8H15V12H14.245Z"/><rect height="1" width="1" x="14" y="15"/><rect height="1" width="1" x="15" y="11"/></g><polyline class="ql-stroke" points="5.5 13 9 5 12.5 13"/><line class="ql-stroke" x1="11.63" x2="6.38" y1="11" y2="11"/></svg>',blockquote:'<svg viewbox="0 0 18 18"><rect class="ql-fill ql-stroke" height="3" width="3" x="4" y="5"/><rect class="ql-fill ql-stroke" height="3" width="3" x="11" y="5"/><path class="ql-even ql-fill ql-stroke" d="M7,8c0,4.031-3,5-3,5"/><path class="ql-even ql-fill ql-stroke" d="M14,8c0,4.031-3,5-3,5"/></svg>',bold:'<svg viewbox="0 0 18 18"><path class="ql-stroke" d="M5,4H9.5A2.5,2.5,0,0,1,12,6.5v0A2.5,2.5,0,0,1,9.5,9H5A0,0,0,0,1,5,9V4A0,0,0,0,1,5,4Z"/><path class="ql-stroke" d="M5,9h5.5A2.5,2.5,0,0,1,13,11.5v0A2.5,2.5,0,0,1,10.5,14H5a0,0,0,0,1,0,0V9A0,0,0,0,1,5,9Z"/></svg>',clean:'<svg class="" viewbox="0 0 18 18"><line class="ql-stroke" x1="5" x2="13" y1="3" y2="3"/><line class="ql-stroke" x1="6" x2="9.35" y1="12" y2="3"/><line class="ql-stroke" x1="11" x2="15" y1="11" y2="15"/><line class="ql-stroke" x1="15" x2="11" y1="11" y2="15"/><rect class="ql-fill" height="1" rx="0.5" ry="0.5" width="7" x="2" y="14"/></svg>',code:Ct,"code-block":Ct
vendor: 12,565 bytes, line 1
1,color:'<svg viewbox="0 0 18 18"><line class="ql-color-label ql-stroke ql-transparent" x1="3" x2="15" y1="15" y2="15"/><polyline class="ql-stroke" points="5.5 11 9 3 12.5 11"/><line class="ql-stroke" x1="11.63" x2="6.38" y1="9" y2="9"/></svg>',direction:{"":'<svg viewbox="0 0 18 18"><polygon class="ql-stroke ql-fill" points="3 11 5 9 3 7 3 11"/><line class="ql-stroke ql-fill" x1="15" x2="11" y1="4" y2="4"/><path class="ql-fill" d="M11,3a3,3,0,0,0,0,6h1V3H11Z"/><rect class="ql-fill" height="11" width="1" x="11" y="4"/><rect class="ql-fill" height="11" width="1" x="13" y="4"/></svg>',rtl:'<svg viewbox="0 0 18 18"><polygon class="ql-stroke ql-fill" points="15 12 13 10 15 8 15 12"/><line class="ql-stroke ql-fill" x1="9" x2="5" y1="4" y2="4"/><path class="ql-fill" d="M5,3A3,3,0,0,0,5,9H6V3H5Z"/><rect class="ql-fill" height="11" width="1" x="5" y="4"/><rect class="ql-fill" height="11" width="1" x="7" y="4"/></svg>'},formula:'<svg viewbox="0 0 18 18"><path class="ql-fill" d="M11.759,2.482a2.561,2.561,0,0,0-3.53.607A7.656,7.656,0,0,0,6.8,6.2C6.109,9.188,5.275,14.677,4.15,14.927a1.545,1.545,0,0,0-1.3-.933A0.922,0.922,0,0,0,2,15.036S1.954,16,4.119,16s3.091-2.691,3.7-5.553c0.177-.826.36-1.726,0.554-2.6L8.775,6.2c0.381-1.421.807-2.521,1.306-2.676a1.014,1.014,0,0,0,1.02.56A0.966,0.966,0,0,0,11.759,2.482Z"/><rect class="ql-fill" height="1.6" rx="0.8" ry="0.8" width="5" x="5.15" y="6.2"/><path class="ql-fill" d="M13.663,12.027a1.662,1.662,0,0,1,.266-0.276q0.193,0.069.456,0.138a2.1,2.1,0,0,0,.535.069,1.075,1.075,0,0,0,.767-0.3,1.044,1.044,0,0,0,.314-0.8,0.84,0.84,0,0,0-.238-0.619,0.8,0.8,0,0,0-.594-0.239,1.154,1.154,0,0,0-.781.3,4.607,4.607,0,0,0-.781,1q-0.091.15-.218,0.346l-0.246.38c-0.068-.288-0.137-0.582-0.212-0.885-0.459-1.847-2.494-.984-2.941-0.8-0.482.2-.353,0.647-0.094,0.529a0.869,0.869,0,0,1,1.281.585c0.217,0.751.377,1.436,0.527,2.038a5.688,5.688,0,0,1-.362.467,2.69,2.69,0,0,1-.264.271q-0.221-.08-0.471-0.147a2.029,2.029,0,0,0-.522-0.066,1.079,1.079,0,0,0-.768.3A1.058,1.058,0,0,0,9,15.131a0.82,0.82,0,0,0,.832.852,1.134,1.134,0,0,0,.787-0.3,5.11,5.11,0,0,0,.776-0.993q0.141-.219.215-0.34c0.046-.076.122-0.194,0.223-0.346a2.786,2.786,0,0,0,.918,1.726,2.582,2.582,0,0,0,2.376-.185c0.317-.181.212-0.565,0-0.494A0.807,0.807,0,0,1,14.176,15a5.159,5.159,0,0,1-.913-2.446l0,0Q13.487,12.24,13.663,12.027Z"/></svg>',header:{1:'<svg viewBox="0 0 18 18"><path class="ql-fill" d="M10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Zm6.06787,9.209H14.98975V7.59863a.54085.54085,0,0,0-.605-.60547h-.62744a1.01119,1.01119,0,0,0-.748.29688L11.645,8.56641a.5435.5435,0,0,0-.022.8584l.28613.30762a.53861.53861,0,0,0,.84717.0332l.09912-.08789a1.2137,1.2137,0,0,0,.2417-.35254h.02246s-.01123.30859-.01123.60547V13.209H12.041a.54085.54085,0,0,0-.605.60547v.43945a.54085.54085,0,0,0,.605.60547h4.02686a.54085.54085,0,0,0,.605-.60547v-.43945A.54085.54085,0,0,0,16.06787,13.209Z"/></svg>',2:'<svg viewBox="0 0 18 18"><path class="ql-fill" d="M16.73975,13.81445v.43945a.54085.54085,0,0,1-.605.60547H11.855a.58392.58392,0,0,1-.64893-.60547V14.0127c0-2.90527,3.39941-3.42187,3.39941-4.55469a.77675.77675,0,0,0-.84717-.78125,1.17684,1.17684,0,0,0-.83594.38477c-.2749.26367-.561.374-.85791.13184l-.4292-.34082c-.30811-.24219-.38525-.51758-.1543-.81445a2.97155,2.97155,0,0,1,2.45361-1.17676,2.45393,2.45393,0,0,1,2.68408,2.40918c0,2.45312-3.1792,2.92676-3.27832,3.93848h2.79443A.54085.54085,0,0,1,16.73975,13.81445ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z"/></svg>',3:'<svg viewBox="0 0 18 18"><path class="ql-fill" d="M16.65186,12.30664a2.6742,2.6742,0,0,1-2.915,2.68457,3.96592,3.96592,0,0,1-2.25537-.6709.56007.56007,0,0,1-.13232-.83594L11.64648,13c.209-.34082.48389-.36328.82471-.1543a2.32654,2.32654,0,0,0,1.12256.33008c.71484,0,1.12207-.35156,1.12207-.78125,0-.61523-.61621-.86816-1.46338-.86816H13.2085a.65159.65159,0,0,1-.68213-.41895l-.05518-.10937a.67114.67114,0,0,1,.14307-.78125l.71533-.86914a8.55289,8.55289,0,0,1,.68213-.7373V8.58887a3.93913,3.93913,0,0,1-.748.05469H11.9873a.54085.54085,0,0,1-.605-.60547V7.59863a.54085.54085,0,0,1,.605-.60547h3.75146a.53773.53773,0,0,1,.60547.59375v.17676a1.03723,1.03723,0,0,1-.27539.748L14.74854,10.0293A2.31132,2.31132,0,0,1,16.65186,12.30664ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z"/></svg>',4:'<svg viewBox="0 0 18 18"><path class="ql-fill" d="M10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Zm7.05371,7.96582v.38477c0,.39648-.165.60547-.46191.60547h-.47314v1.29785a.54085.54085,0,0,1-.605.60547h-.69336a.54085.54085,0,0,1-.605-.60547V12.95605H11.333a.5412.5412,0,0,1-.60547-.60547v-.15332a1.199,1.199,0,0,1,.22021-.748l2.56348-4.05957a.7819.7819,0,0,1,.72607-.39648h1.27637a.54085.54085,0,0,1,.605.60547v3.7627h.33008A.54055.54055,0,0,1,17.05371,11.96582ZM14.28125,8.7207h-.022a4.18969,4.18969,0,0,1-.38525.81348l-1.188,1.80469v.02246h1.5293V9.60059A7.04058,7.04058,0,0,1,14.28125,8.7207Z"/></svg>',5:'<svg viewBox="0 0 18 18"><path class="ql-fill" d="M16.74023,12.18555a2.75131,2.75131,0,0,1-2.91553,2.80566,3.908,3.908,0,0,1-2.25537-.68164.54809.54809,0,0,1-.13184-.8252L11.73438,13c.209-.34082.48389-.36328.8252-.1543a2.23757,2.23757,0,0,0,1.1001.33008,1.01827,1.01827,0,0,0,1.1001-.96777c0-.61621-.53906-.97949-1.25439-.97949a2.15554,2.15554,0,0,0-.64893.09961,1.15209,1.15209,0,0,1-.814.01074l-.12109-.04395a.64116.64116,0,0,1-.45117-.71484l.231-3.00391a.56666.56666,0,0,1,.62744-.583H15.541a.54085.54085,0,0,1,.605.60547v.43945a.54085.54085,0,0,1-.605.60547H13.41748l-.04395.72559a1.29306,1.29306,0,0,1-.04395.30859h.022a2.39776,2.39776,0,0,1,.57227-.07715A2.53266,2.53266,0,0,1,16.74023,12.18555ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z"/></svg>',6:'<svg viewBox="0 0 18 18"><path class="ql-fill" d="M14.51758,9.64453a1.85627,1.85627,0,0,0-1.24316.38477H13.252a1.73532,1.73532,0,0,1,1.72754-1.4082,2.66491,2.66491,0,0,1,.5498.06641c.35254.05469.57227.01074.70508-.40723l.16406-.5166a.53393.53393,0,0,0-.373-.75977,4.83723,4.83723,0,0,0-1.17773-.14258c-2.43164,0-3.7627,2.17773-3.7627,4.43359,0,2.47559,1.60645,3.69629,3.19043,3.69629A2.70585,2.70585,0,0,0,16.96,12.19727,2.43861,2.43861,0,0,0,14.51758,9.64453Zm-.23047,3.58691c-.67187,0-1.22168-.81445-1.22168-1.45215,0-.47363.30762-.583.72559-.583.96875,0,1.27734.59375,1.27734,1.12207A.82182.82182,0,0,1,14.28711,13.23145ZM10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Z"/></svg>'},italic:'<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="7" x2="13" y1="4" y2="4"/><line class="ql-stroke" x1="5" x2="11" y1="14" y2="14"/><line class="ql-stroke" x1="8" x2="10" y1="14" y2="4"/></svg>',image:'<svg viewbox="0 0 18 18"><rect class="ql-stroke" height="10" width="12" x="3" y="4"/><circle class="ql-fill" cx="6" cy="7" r="1"/><polyline class="ql-even ql-fill" points="5 12 5 11 7 9 8 10 11 7 13 9 13 12 5 12"/></svg>',indent:{"+1":'<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="3" x2="15" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="9" x2="15" y1="9" y2="9"/><polyline class="ql-fill ql-stroke" points="3 7 3 11 5 9 3 7"/></svg>',"-1":'<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="3" x2="15" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="9" x2="15" y1="9" y2="9"/><polyline class="ql-stroke" points="5 7 5 11 3 9 5 7"/></svg>'},link:'<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="7" x2="11" y1="7" y2="11"/><path class="ql-even ql-stroke" d="M8.9,4.577a3.476,3.476,0,0,1,.36,4.679A3.476,3.476,0,0,1,4.577,8.9C3.185,7.5,2.035,6.4,4.217,4.217S7.5,3.185,8.9,4.577Z"/><path class="ql-even ql-stroke" d="M13.423,9.1a3.476,3.476,0,0,0-4.679-.36,3.476,3.476,0,0,0,.36,4.679c1.392,1.392,2.5,2.542,4.679.36S14.815,10.5,13.423,9.1Z"/></svg>',list:{bullet:'<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="6" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="6" x2="15" y1="9" y2="9"/><line class="ql-stroke" x1="6" x2="15" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="3" y1="4" y2="4"/><line class="ql-stroke" x1="3" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="3" x2="3" y1="14" y2="14"/></svg>',check:'<svg class="" viewbox="0 0 18 18"><line class="ql-stroke" x1="9" x2="15" y1="4" y2="4"/><polyline class="ql-stroke" points="3 4 4 5 6 3"/><line class="ql-stroke" x1="9" x2="15" y1="14" y2="14"/><polyline class="ql-stroke" points="3 14 4 15 6 13"/><line class="ql-stroke" x1="9" x2="15" y1="9" y2="9"/><polyline class="ql-stroke" points="3 9 4 10 6 8"/></svg>',ordered:'<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="7" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="7" x2="15" y1="9" y2="9"/><line class="ql-stroke" x1="7" x2="15" y1="14" y2="14"/><line class="ql-stroke ql-thin" x1="2.5" x2="4.5" y1="5.5" y2="5.5"/><path class="ql-fill" d="M3.5,6A0.5,0.5,0,0,1,3,5.5V3.085l-0.276.138A0.5,0.5,0,0,1,2.053,3c-0.124-.247-0.023-0.324.224-0.447l1-.5A0.5,0.5,0,0,1,4,2.5v3A0.5,0.5,0,0,1,3.5,6Z"/><path class="ql-stroke ql-thin" d="M4.5,10.5h-2c0-.234,1.85-1.076,1.85-2.234A0.959,0.959,0,0,0,2.5,8.156"/><path class="ql-stroke ql-thin" d="M2.5,14.846a0.959,0.959,0,0,0,1.85-.109A0.7,0.7,0,0,0,3.75,14a0.688,0.688,0,0,0,.6-0.736,0.959,0.959,0,0,0-1.85-.109"/></svg>'},script:{sub:'<svg viewbox="0 0 18 18"><path class="ql-fill" d="M15.5,15H13.861a3.858,3.858,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.921,1.921,0,0,0,12.021,11.7a0.50013,0.50013,0,1,0,.957.291h0a0.914,0.914,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.076-1.16971,1.86982-1.93971,2.43082A1.45639,1.45639,0,0,0,12,15.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,15Z"/><path class="ql-fill" d="M9.65,5.241a1,1,0,0,0-1.409.108L6,7.964,3.759,5.349A1,1,0,0,0,2.192,6.59178Q2.21541,6.6213,2.241,6.649L4.684,9.5,2.241,12.35A1,1,0,0,0,3.71,13.70722q0.02557-.02768.049-0.05722L6,11.036,8.241,13.65a1,1,0,1,0,1.567-1.24277Q9.78459,12.3777,9.759,12.35L7.316,9.5,9.759,6.651A1,1,0,0,0,9.65,5.241Z"/></svg>',super:'<svg viewbox="0 0 18 18"><path class="ql-fill" d="M15.5,7H13.861a4.015,4.015,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.922,1.922,0,0,0,12.021,3.7a0.5,0.5,0,1,0,.957.291,0.917,0.917,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.077-1.164,1.925-1.934,2.486A1.423,1.423,0,0,0,12,7.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,7Z"/><path class="ql-fill" d="M9.651,5.241a1,1,0,0,0-1.41.108L6,7.964,3.759,5.349a1,1,0,1,0-1.519,1.3L4.683,9.5,2.241,12.35a1,1,0,1,0,1.519,1.3L6,11.036,8.241,13.65a1,1,0,0,0,1.519-1.3L7.317,9.5,9.759,6.651A1,1,0,0,0,9.651,5.241Z"/></svg>'},strike:'<svg viewbox="0 0 18 18"><line class="ql-stroke ql-thin" x1="15.5" x2="2.5" y1="8.5" y2="9.5"/><path class="ql-fill" d="M9.007,8C6.542,7.791,6,7.519,6,6.5,6,5.792,7.283,5,9,5c1.571,0,2.765.679,2.969,1.309a1,1,0,0,0,1.9-.617C13.356,4.106,11.354,3,9,3,6.2,3,4,4.538,4,6.5a3.2,3.2,0,0,0,.5,1.843Z"/><path class="ql-fill" d="M8.984,10C11.457,10.208,12,10.479,12,11.5c0,0.708-1.283,1.5-3,1.5-1.571,0-2.765-.679-2.969-1.309a1,1,0,1,0-1.9.617C4.644,13.894,6.646,15,9,15c2.8,0,5-1.538,5-3.5a3.2,3.2,0,0,0-.5-1.843Z"/></svg>',table:'<svg viewbox="0 0 18 18"><rect class="ql-stroke" height="12" width="12" x="3" y="3"/><rect class="ql-fill" height="2" width="3" x="5" y="5"/><rect class="ql-fill" height="2" width="4" x="9" y="5"/><g class="ql-fill ql-transparent"><rect height="2" width="3" x="5" y="8"/><rect height="2" width="4" x="9" y="8"/><rect height="2" width="3" x="5" y="11"/><rect height="2" width="4" x="9" y="11"/></g></svg>',underline:'<svg viewbox="0 0 18 18"><path class="ql-stroke" d="M5,3V9a4.012,4.012,0,0,0,4,4H9a4.012,4.012,0,0,0,4-4V3"/><rect class="ql-fill" height="1" rx="0.5" ry="0.5" width="12" x="3" y="15"/></svg>',video:'<svg viewbox="0 0 18 18"><rect class="ql-stroke" height="12" width="12" x="3" y="3"/><rect class="ql-fill" height="12" width="1" x="5" y="3"/><rect class="ql-fill" height="12" width="1" x="12" y="3"/><rect class="ql-fill" height="2" width="8" x="5" y="8"/><rect class="ql-fill" height="1" width="3" x="3" y="5"/><rect class="ql-fill" height="1" width="3" x="3" y="7"/><rect class="ql-fill" height="1" width="3" x="3" y="10"/><rect class="ql-fill" height="1" width="3" x="3" y="12"/><rect class="ql-fill" height="1" width="3" x="12" y="5"/><rect class="ql-fill" height="1" width="3" x="12" y="7"/><rect class="ql-fill" height="1" width="3" x="12" y="10"/><rect class="ql-fill" height="1" width="3" x="12" y="12"/></svg>'};let 
vendor: 1,498 bytes, line 1
1_t=0;function St(tt,k){tt.setAttribute(k,`${"true"!==tt.getAttribute(k)}`)}var Tt=class{constructor(tt){this.select=tt,this.container=document.createElement("span"),this.buildPicker(),this.select.style.display="none",this.select.parentNode.insertBefore(this.container,this.select),this.label.addEventListener("mousedown",()=>{this.togglePicker()}),this.label.addEventListener("keydown",k=>{switch(k.key){case"Enter":this.togglePicker();break;case"Escape":this.escape(),k.preventDefault()}}),this.select.addEventListener("change",this.update.bind(this))}togglePicker(){this.container.classList.toggle("ql-expanded"),St(this.label,"aria-expanded"),St(this.options,"aria-hidden")}buildItem(tt){const k=document.createElement("span");k.tabIndex="0",k.setAttribute("role","button"),k.classList.add("ql-picker-item");const T=tt.getAttribute("value");return T&&k.setAttribute("data-value",T),tt.textContent&&k.setAttribute("data-label",tt.textContent),k.addEventListener("click",()=>{this.selectItem(k,!0)}),k.addEventListener("keydown",Y=>{switch(Y.key){case"Enter":this.selectItem(k,!0),Y.preventDefault();break;case"Escape":this.escape(),Y.preventDefault()}}),k}buildLabel(){const tt=document.createElement("span");return tt.classList.add("ql-picker-label"),tt.innerHTML='<svg viewbox="0 0 18 18"><polygon class="ql-stroke" points="7 11 9 13 11 11 7 11"/><polygon class="ql-stroke" points="7 7 9 5 11 7 7 7"/></svg>',tt.tabIndex="0",tt.setAttribute("role","button"),tt.setAttribute("aria-expanded","fal
1se"),this.container.appendChild(tt),tt}buildOptions(){const tt=document.createElement("span");tt.classList.add("ql-picker-options"),tt.setAttribute("aria-hidden","true"),tt.tabIndex="-1",tt.id=`ql-picker-options-${_t}`,_t+=1,this.label.setAttribute("aria-controls",tt.id),this.options=tt,Array.from(this.select.options).forEach(k=>{const T=this.buildItem(k);tt.appendChild(T),!0===k.selected&&this.selectItem(T)}),this.container.appendChild(tt)}buildPicker(){Array.from(this.select.attributes).forEach(tt=>{this.container.setAttribute(tt.name,tt.value)}),this.container.classList.add("ql-picker"),this.label=this.buildLabel(),this.buildOptions()}escape(){this.close(),setTimeout(()=>this.label.focus(),1)}close(){this.container.classList.remove("ql-expanded"),this.label.setAttribute("aria-expanded","false"),this.options.setAttribute("aria-hidden","true")}selectItem(tt){let k=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const T=this.container.querySelector(".ql-selected");tt!==T&&(T?.classList.remove("ql-selected"),null!=tt&&(tt.classList.add("ql-selected"),this.select.selectedIndex=Array.from(tt.parentNode.children).indexOf(tt),tt.hasAttribute("data-value")?this.label.setAttribute("data-value",tt.getAttribute("data-value")):this.label.removeAttribute("data-value"),tt.hasAttribute("data-label")?this.label.setAttribute("data-label",tt.getAttribute("data-label")):this.label.removeAttribute("data-label"),k&&(this.select.dispatchEvent(new Event("change")),this.close())))}update(){let tt;if(this.select.selectedIndex>-1){const T=this.container.querySelector(".ql-picker-options").children[this.select.selectedIndex];tt=this.select.options[this.select.selectedIndex],this.selectItem(T)}else this.selectItem(null);const k=null!=tt&&tt!==this.select.querySelector("option[selected]");this.label.classList.toggle("ql-active",k)}},Et=class extends Tt{constructor(tt,k){super(tt),this.label.innerHTML=k,this.container.classList.add("ql-color-picker"),Array.from(this.container.querySelectorAll(".ql-picker-item")).slice(0,7).forEach(T=>{T.classList.add("ql-primary")})}buildItem(tt){const k=super.buildItem(tt);return k.style.backgroundColor=tt.getAttribute("value")||"",k}selectItem(tt,k){super.selectItem(tt,k);const T=this.label.querySelector(".ql-color-label"),Y=tt&&tt.getAttribute("data-value")||"";T&&("line"===T.tagName?T.style.stroke=Y:T.style.fill=Y)}},qt=class extends Tt{constructor(tt,k){super(tt),this.container.classList.add("ql-icon-picker"),Array.from(this.container.querySelectorAll(".ql-picker-item")).forEach(T=>{T.innerHTML=k[T.getAttribute("data-value")||""]}),this.defaultItem=this.container.querySelector(".ql-selected"),this.selectItem(this.defaultItem)}selectItem(tt,k){super.selectItem(tt,k);const T=tt||this.defaultItem;if(null!=T){if(this.label.innerHTML===T.innerHTML)return;this.label.innerHTML=T.innerHTML}}},Ht=class{constructor(tt,k){this.quill=tt,this.boundsContainer=k||document.body,this.root=tt.addContainer("ql-tooltip"),this.root.innerHTML=this.constructor.TEMPLATE,(T=>{const{overflowY:Y}=getComputedStyle(T,null);return"visible"!==Y&&"clip"!==Y})(this.quill.root)&&this.quill.root.addEventListener("scroll",()=>{this.root.style.marginTop=-1*this.quill.root.scrollTop+"px"}),this.hide()}hide(){this.root.classList.add("ql-hidden")}position(tt){const k=tt.left+tt.width/2-this.root.offsetWidth/2,T=tt.bottom+this.quill.root.scrollTop;this.root.style.left=`${k}px`,this.root.style.top=`${T}px`,this.root.classList.remove("ql-flip");const Y=this.boundsContainer.getBoundingClientRect(),ot=this.root.getBoundingClientRect();let ut=0;return ot.right>Y.right&&(ut=Y.right-ot.right,this.root.style.left=`${k+ut}px`),ot.left<Y.left&&(ut=Y.left-ot.left,this.root.style.left=`${k+ut}px`),ot.bottom>Y.bottom&&(this.root.style.top=T-(tt.bottom-tt.top+(ot.bottom-ot.top))+"px",this.root.classList.add("ql-flip")),ut}show(){this.root.classList.remove("ql-editing"),this.root.classList.remove("ql-hidden")}},Kt=e(8347),Dt=e(5374),Ue=e(9609);const ei=[!1,"center","right","justify"],Ie=["#000000","#e60000","#ff9900","#ffff00","#008a00","#0066cc","#9933ff","#ffffff","#facccc","#ffebcc","#ffffcc","#cce8cc","#cce0f5","#ebd6ff","#bbbbbb","#f06666","#ffc266","#ffff66","#66b966","#66a3e0","#c285ff","#888888","#a10000","#b26b00","#b2b200","#006100","#0047b2","#6b24b2","#444444","#5c0000","#663d00","#666600","#003700","#002966","#3d1466"],vi=[!1,"serif","monospace"],_i=["1","2","3",!1],fi=["small",!1,"large","huge"];class Oe extends Ue.A{constructor(k,T){super(k,T);const Y=ot=>{document.body.contains(k.root)?(null==this.tooltip||this.tooltip.root.contains(ot.target)||document.activeElement===this.tooltip.textbox||this.quill.hasFocus()||this.tooltip.hide(),null!=this.pickers&&this.pickers.forEac
vendor: 4,958 bytes, line 1
1h(ut=>{ut.container.contains(ot.target)||ut.close()})):document.body.removeEventListener("click",Y)};k.emitter.listenDOM("click",document.body,Y)}addModule(k){const T=super.addModule(k);return"toolbar"===k&&this.extendToolbar(T),T}buildButtons(k,T){Array.from(k).forEach(Y=>{(Y.getAttribute("class")||"").split(/\s+/).forEach(ot=>{if(ot.startsWith("ql-")&&(ot=ot.slice(3),null!=T[ot]))if("direction"===ot)Y.innerHTML=T[ot][""]+T[ot].rtl;else if("string"==typeof T[ot])Y.innerHTML=T[ot];else{const ut=Y.value||"";null!=ut&&T[ot][ut]&&(Y.innerHTML=T[ot][ut])}})})}buildPickers(k,T){this.pickers=Array.from(k).map(Y=>{if(Y.classList.contains("ql-align")&&(null==Y.querySelector("option")&&ne(Y,ei),"object"==typeof T.align))return new qt(Y,T.align);if(Y.classList.contains("ql-background")||Y.classList.contains("ql-color")){const ot=Y.classList.contains("ql-background")?"background":"color";return null==Y.querySelector("option")&&ne(Y,Ie,"background"===ot?"#ffffff":"#000000"),new Et(Y,T[ot])}return null==Y.querySelector("option")&&(Y.classList.contains("ql-font")?ne(Y,vi):Y.classList.contains("ql-header")?ne(Y,_i):Y.classList.contains("ql-size")&&ne(Y,fi)),new Tt(Y)}),this.quill.on(Dt.A.events.EDITOR_CHANGE,()=>{this.pickers.forEach(Y=>{Y.update()})})}}Oe.DEFAULTS=(0,Kt.A)({},Ue.A.DEFAULTS,{modules:{toolbar:{handlers:{formula(){this.quill.theme.tooltip.edit("formula")},image(){let tt=this.container.querySelector("input.ql-image[type=file]");null==tt&&(tt=document.createElement("input"),tt.setAttribute("type","file"),tt.setAttribute("accept",this.quill.uploader.options.mimetypes.join(", ")),tt.classList.add("ql-image"),tt.addEventListener("change",()=>{const k=this.quill.getSelection(!0);this.quill.uploader.upload(k,tt.files),tt.value=""}),this.container.appendChild(tt)),tt.click()},video(){this.quill.theme.tooltip.edit("video")}}}}});class Se extends Ht{constructor(k,T){super(k,T),this.textbox=this.root.querySelector('input[type="text"]'),this.listen()}listen(){this.textbox.addEventListener("keydown",k=>{"Enter"===k.key?(this.save(),k.preventDefault()):"Escape"===k.key&&(this.cancel(),k.preventDefault())})}cancel(){this.hide(),this.restoreFocus()}edit(){let k=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"link",T=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(this.root.classList.remove("ql-hidden"),this.root.classList.add("ql-editing"),null==this.textbox)return;null!=T?this.textbox.value=T:k!==this.root.getAttribute("data-mode")&&(this.textbox.value="");const Y=this.quill.getBounds(this.quill.selection.savedRange);null!=Y&&this.position(Y),this.textbox.select(),this.textbox.setAttribute("placeholder",this.textbox.getAttribute(`data-${k}`)||""),this.root.setAttribute("data-mode",k)}restoreFocus(){this.quill.focus({preventScroll:!0})}save(){let{value:k}=this.textbox;switch(this.root.getAttribute("data-mode")){case"link":{const{scrollTop:T}=this.quill.root;this.linkRange?(this.quill.formatText(this.linkRange,"link",k,Dt.A.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",k,Dt.A.sources.USER)),this.quill.root.scrollTop=T;break}case"video":k=function(T){let Y=T.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/)||T.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/);return Y?`${Y[1]||"https"}://www.youtube.com/embed/${Y[2]}?showinfo=0`:(Y=T.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/))?`${Y[1]||"https"}://player.vimeo.com/video/${Y[2]}/`:T}(k);case"formula":{if(!k)break;const T=this.quill.getSelection(!0);if(null!=T){const Y=T.index+T.length;this.quill.insertEmbed(Y,this.root.getAttribute("data-mode"),k,Dt.A.sources.USER),"formula"===this.root.getAttribute("data-mode")&&this.quill.insertText(Y+1," ",Dt.A.sources.USER),this.quill.setSelection(Y+2,Dt.A.sources.USER)}break}}this.textbox.value="",this.hide()}}function ne(tt,k){let T=arguments.length>2&&void 0!==arguments[2]&&arguments[2];k.forEach(Y=>{const ot=document.createElement("option");Y===T?ot.setAttribute("selected","selected"):ot.setAttribute("value",String(Y)),tt.appendChild(ot)})}var _e=e(8298);const ge=[["bold","italic","link"],[{header:1},{header:2},"blockquote"]];class te extends Se{static TEMPLATE=['<span class="ql-tooltip-arrow"></span>','<div class="ql-tooltip-editor">','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-close"></a>',"</div>"].join("");constructor(k,T){super(k,T),this.quill.on(Dt.A.events.EDITOR_CHANGE,(Y,ot,ut,xt)=>{if(Y===Dt.A.events.SELECTION_CHANGE)if(null!=ot&&ot.length>0&&xt===Dt.A.sources.USER){this.show(),this.root.style.left="0px",this.root.style.width="",this.root.style.width=`${this.root.offsetWidth}px`;const Nt=this.quill.getLines(ot.index,ot.length);if(1===Nt.length){const Yt=this.quill.getBounds(ot);null!=Yt&&this.position(Yt)}else{const Yt=Nt[Nt.length-1],re=this.quill.getIndex(Yt),de=Math.min(Yt.length()-1,ot.
1index+ot.length-re),Ae=this.quill.getBounds(new _e.Q(re,de));null!=Ae&&this.position(Ae)}}else document.activeElement!==this.textbox&&this.quill.hasFocus()&&this.hide()})}listen(){super.listen(),this.root.querySelector(".ql-close").addEventListener("click",()=>{this.root.classList.remove("ql-editing")}),this.quill.on(Dt.A.events.SCROLL_OPTIMIZE,()=>{setTimeout(()=>{if(this.root.classList.contains("ql-hidden"))return;const k=this.quill.getSelection();if(null!=k){const T=this.quill.getBounds(k);null!=T&&this.position(T)}},1)})}cancel(){this.show()}position(k){const T=super.position(k),Y=this.root.querySelector(".ql-tooltip-arrow");return Y.style.marginLeft="",0!==T&&(Y.style.marginLeft=-1*T-Y.offsetWidth/2+"px"),T}}class me extends Oe{constructor(k,T){null!=T.modules.toolbar&&null==T.modules.toolbar.container&&(T.modules.toolbar.container=ge),super(k,T),this.quill.container.classList.add("ql-bubble")}extendToolbar(k){this.tooltip=new te(this.quill,this.options.bounds),null!=k.container&&(this.tooltip.root.appendChild(k.container),this.buildButtons(k.container.querySelectorAll("button"),mt),this.buildPickers(k.container.querySelectorAll("select"),mt))}}me.DEFAULTS=(0,Kt.A)({},Oe.DEFAULTS,{modules:{toolbar:{handlers:{link(tt){tt?this.quill.theme.tooltip.edit():this.quill.format("link",!1,w.Ay.sources.USER)}}}}});const be=[[{header:["1","2","3",!1]}],["bold","italic","underline","link"],[{list:"ordered"},{list:"bullet"}],["clean"]];class ii extends Se{static TEMPLATE=['<a class="ql-preview" rel="noopener noreferrer" target="_blank" href="about:blank"></a>','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-action"></a>','<a class="ql-remove"></a>'].join("");preview=this.root.querySelector("a.ql-preview");listen(){super.listen(),this.root.querySelector("a.ql-action").addEventListener("click",k=>{this.root.classList.contains("ql-editing")?this.save():this.edit("link",this.preview.textContent),k.preventDefault()}),this.root.querySelector("a.ql-remove").addEventListener("click",k=>{if(null!=this.linkRange){const T=this.linkRange;this.restoreFocus(),this.quill.formatText(T,"link",!1,Dt.A.sources.USER),delete this.linkRange}k.preventDefault(),this.hide()}),this.quill.on(Dt.A.events.SELECTION_CHANGE,(k,T,Y)=>{if(null!=k){if(0===k.length&&Y===Dt.A.sources.USER){const[ot,ut]=this.quill.scroll.descendant(C,k.index);if(null!=ot){this.linkRange=new _e.Q(k.index-ut,ot.length());const xt=C.formats(ot.domNode);this.preview.textContent=xt,this.preview.setAttribute("href",xt),this.show();const Nt=this.quill.getBounds(this.linkRange);return void(null!=Nt&&this.position(Nt))}}else delete this.linkRange;this.hide()}})}show(){super.show(),this.root.removeAttribute("data-mode")}}class De extends Oe{constructor(k,T){null!=T.modules.toolbar&&null==T.modules.toolbar.container&&(T.modules.toolbar.container=be),super(k,T),this.quill.container.classList.add("ql-snow")}extendToolbar(k){null!=k.container&&(k.container.classList.add("ql-snow"),this.buildButtons(k.container.querySelectorAll("button"),mt),this.buildPickers(k.container.querySelectorAll("select"),mt),this.tooltip=new ii(this.quill,this.options.bounds),k.container.querySelector(".ql-link")&&this.quill.keyboard.addBinding({key:"k",shortKey:!0},(T,Y)=>{k.handlers.link.call(k,!Y.format.link)}))}}De.DEFAULTS=(0,Kt.A)({},Oe.DEFAULTS,{modules:{toolbar:{handlers:{link(tt){if(tt){const k=this.quill.getSelection();if(null==k||0===k.length)return;let T=this.quill.getText(k);/^\S+@\S+\.\S+$/.test(T)&&0!==T.indexOf("mailto:")&&(T=`mailto:${T}`);const{tooltip:Y}=this.quill.theme;Y.edit("link",T)}else this.quill.format("link",!1,w.Ay.sources.USER)}}}}});var We=De;s.default.register({"attributors/attribute/direction":n.Mc,"attributors/class/align":r.qh,"attributors/class/background":L.l,"attributors/class/color":M.g3,"attributors/class/direction":n.sY,"attributors/class/font":j.q,"attributors/class/size":H.U,"attributors/style/align":r.Hu,"attributors/style/background":L.s,"attributors/style/color":M.JM,"attributors/style/direction":n.VL,"attributors/style/font":j.z,"attributors/style/size":H.r},!0),s.default.register({"formats/align":r.qh,"formats/direction":n.sY,"formats/indent":c,"formats/background":L.s,"formats/color":M.JM,"formats/font":j.q,"formats/size":H.U,"formats/blockquote":class d extends h.Ay{static blotName="blockquote";static tagName="blockquote"},"formats/code-block":B.Ay,"formats/header":class p extends h.Ay{static blotName="header";static tagName=["H1","H2","H3","H4","H5","H6"];static formats(k){return this.tagName.indexOf(k.tagName)+1}},"formats/list":_,"formats/bold":A,"formats/code":B.Cy,"formats/ital
1ic":class extends A{static blotName="italic";static tagName=["EM","I"]},"formats/link":C,"formats/script":class q extends X.A{static blotName="script";static tagName=["SUB","SUP"];static create(k){return"super"===k?document.createElement("sup"):"sub"===k?document.createElement("sub"):super.create(k)}static formats(k){return"SUB"===k.tagName?"sub":"SUP"===k.tagName?"super":void 0}},"formats/strike":class extends A{static blotName="strike";static tagName=["S","STRIKE"]},"formats/underline":class at extends X.A{static blotName="underline";static tagName="U"},"formats/formula":class pt extends ct.A{static blotName="formula";static className="ql-formula";static tagName="SPAN";static create(k){if(null==window.katex)throw new Error("Formula module requires KaTeX.");const T=super.create(k);return"string"==typeof k&&(window.katex.render(k,T,{throwOnError:!1,errorColor:"#f00"}),T.setAttribute("data-value",k)),T}static value(k){return k.getAttribute("data-value")}html(){const{formula:k}=this.value();return`<span>${k}</span>`}},"formats/image":class lt extends a.EmbedBlot{static blotName="image";static tagName="IMG";static create(k){const T=super.create(k);return"string"==typeof k&&T.setAttribute("src",this.sanitize(k)),T}static formats(k){return J.reduce((T,Y)=>(k.hasAttribute(Y)&&(T[Y]=k.getAttribute(Y)),T),{})}static match(k){return/\.(jpe?g|gif|png)$/.test(k)||/^data:image\/.+;base64/.test(k)}static sanitize(k){return W(k,["http","https","data"])?k:"//:0"}static value(k){return k.getAttribute("src")}format(k,T){J.indexOf(k)>-1?T?this.domNode.setAttribute(k,T):this.domNode.removeAttribute(k):super.format(k,T)}},"formats/video":class x extends h.zo{static blotName="video";static className="ql-video";static tagName="IFRAME";static create(k){const T=super.create(k);return T.setAttribute("frameborder","0"),T.setAttribute("allowfullscreen","true"),T.setAttribute("src",this.sanitize(k)),T}static formats(k){return m.reduce((T,Y)=>(k.hasAttribute(Y)&&(T[Y]=k.getAttribute(Y)),T),{})}static sanitize(k){return C.sanitize(k)}static value(k){return k.getAttribute("src")}format(k,T){m.indexOf(k)>-1?T?this.domNode.setAttribute(k,T):this.domNode.removeAttribute(k):super.format(k,T)}html(){const{video:k}=this.value();return`<a href="${k}">${k}</a>`}},"modules/syntax":et,"modules/table":class vt extends z.A{static register(){w.Ay.register(it),w.Ay.register(rt),w.Ay.register(ht),w.Ay.register(ft)}constructor(){super(...arguments),this.listenBalanceCells()}balanceTables(){this.quill.scroll.descendants(ft).forEach(k=>{k.balanceCells()})}deleteColumn(){const[k,,T]=this.getTable();null!=T&&(k.deleteColumn(T.cellOffset()),this.quill.update(w.Ay.sources.USER))}deleteRow(){const[,k]=this.getTable();null!=k&&(k.remove(),this.quill.update(w.Ay.sources.USER))}deleteTable(){const[k]=this.getTable();if(null==k)return;const T=k.offset();k.remove(),this.quill.update(w.Ay.sources.USER),this.quill.setSelection(T,w.Ay.sources.SILENT)}getTable(){let k=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.quill.getSelection();if(null==k)return[null,null,null,-1];const[T,Y]=this.quill.getLine(k.index);if(null==T||T.statics.blotName!==it.blotName)return[null,null,null,-1];const ot=T.parent;return[ot.parent.parent,ot,T,Y]}insertColumn(k){const T=this.quill.getSelection();if(!T)return;const[Y,ot,ut]=this.getTable(T);if(null==ut)return;const xt=ut.cellOffset();Y.insertColumn(xt+k),this.quill.update(w.Ay.sources.USER);let Nt=ot.rowOffset();0===k&&(Nt+=1),this.quill.setSelection(T.index+Nt,T.length,w.Ay.sources.SILENT)}insertColumnLeft(){this.insertColumn(0)}insertColumnRight(){this.insertColumn(1)}insertRow(k){const T=this.quill.getSelection();if(!T)return;const[Y,ot,ut]=this.getTable(T);if(null==ut)return;const xt=ot.rowOffset();Y.insertRow(xt+k),this.quill.update(w.Ay.sources.USER),k>0?this.quill.setSelection(T,w.Ay.sources.SILENT):this.quill.setSelection(T.index+ot.children.length,T.length,w.Ay.sources.SILENT)}insertRowAbove(){this.insertRow(0)}insertRowBelow(){this.insertRow(1)}insertTable(k,T){const Y=this.quill.getSelection();if(null==Y)return;const ot=new Array(k).fill(0).reduce(ut=>{const xt=new Array(T).fill("\n").join("");return ut.insert(xt,{table:dt()})}
1,(new(O())).retain(Y.index));this.quill.updateContents(ot,w.Ay.sources.USER),this.quill.setSelection(Y.index,w.Ay.sources.SILENT),this.balanceTables()}listenBalanceCells(){this.quill.on(w.Ay.events.SCROLL_OPTIMIZE,k=>{k.some(T=>!!["TD","TR","TBODY","TABLE"].includes(T.target.tagName)&&(this.quill.once(w.Ay.events.TEXT_CHANGE,(Y,ot,ut)=>{ut===w.Ay.sources.USER&&this.balanceTables()}),!0))})}},"modules/toolbar":Lt,"themes/bubble":me,"themes/snow":We,"ui/icons":mt,"ui/picker":Tt,"ui/icon-picker":qt,"ui/color-picker":Et,"ui/tooltip":Ht},!0);var $e=s.default}(),i.default}()});import{r as Ao,a as wi,e as Ys,c as Xs,i as Gt,d as Xt,b as ye,v as Pt,u as Gs,l as wo,f as pi,g as ee,h as ki,s as Xe,j as ri,k as Bt,_ as Zs,t as Ce,m as ko,n as So,T as fe,o as Wi,p as $i,H as Le,P as ce,q as Js,w as Qs,x as gi,y as tn,z as oi,A as Eo,B as Si,C as ai,D as en,E as he,F as Vt,G as No,I as sn,J as nn,K as Lo,L as rn,M as on,N as Oo,O as ke,Q as $t,R as Mo,S as pe,U as ys,V as an,W as Co,X as li,Y as Ki,Z as ci,$ as Yi,a0 as se,a1 as xs,a2 as ue,a3 as mi,a4 as To,a5 as Do,a6 as ln,a7 as Xi,a8 as cn,a9 as Po,aa as Ro,ab as Gi,ac as qo,ad as jo,ae as hn,af as un,ag as dn,ah as fn,ai as Zi,aj as Io,ak as Ge,al as Ze,am as Bo,an as zo,ao as Fo,ap as pn,aq as Vo,ar as Ho,as as Uo,at as Wo,au as $o,av as vs,aw as Ei,ax as Ko,ay as hi,az as Yo,aA as bi,aB as gn,aC as Xo,aD as mn,aE as Go,aF as Zo,aG as Fe,aH as bn,aI as yn,aJ as Jo,aK as _s,aL as xn,aM as Ji,aN as Ni,aO as Qo,aP as ta,aQ as ea}from"./chunks/helpers.dataset.js";import"@kurkle/color";class ia{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,e,i,s){const n=e.duration;e.listeners[s].forEach(a=>a({chart:t,initial:e.initial,numSteps:n,currentStep:Math.min(i-e.start,n)}))}_refresh(){this._request||(this._running=!0,this._request=Ao.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let e=0;this._charts.forEach((i,s)=>{if(!i.running||!i.items.length)return;const r=i.items;let l,n=r.length-1,a=!1;for(;n>=0;--n)l=r[n],l._active?(l._total>i.duration&&(i.duration=l._total),l.tick(t),a=!0):(r[n]=r[r.length-1],r.pop());a&&(s.draw(),this._notify(s,i,t,"progress")),r.length||(i.running=!1,this._notify(s,i,t,"complete"),i.initial=!1),e+=r.length}),this._lastDate=t,0===e&&(this._running=!1)}_getAnims(t){const e=this._charts;let i=e.get(t);return i||(i={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(t,i)),i}listen(t,e,i){this._getAnims(t).listeners[e].push(i)}add(t,e){!e||!e.length||this._getAnims(t).items.push(...e)}has(t){return this._getAnims(t).items.length>0}start(t){const e=this._charts.get(t);e&&(e.running=!0,e.start=Date.now(),e.duration=e.items.reduce((i,s)=>Math.max(i,s._duration),0),this._refresh())}running(t){if(!this._running)return!1;const e=this._charts.get(t);return!(!e||!e.running||!e.items.length)}stop(t){const e=this._charts.get(t);if(!e||!e.items.length)return;const i=e.items;let s=i.length-1;for(;s>=0;--s)i[s].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var qe=new ia;const vn="transparent",sa={boolean:(o,t,e)=>e>.5?t:o,color(o,t,e){const i=Xs(o||vn),s=i.valid&&Xs(t||vn);return s&&s.valid?s.mix(i,e).hexString():t},number:(o,t,e)=>o+(t-o)*e};class _n{constructor(t,e,i,s){const r=e[i];s=wi([t.to,s,r,t.from]);const n=wi([t.from,r,s]);this._active=!0,this._fn=t.fn||sa[t.type||typeof n],this._easing=Ys[t.easing]||Ys.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=e,this._prop=i,this._from=n,this._to=s,this._promises=void 0}active(){return this._active}update(t,e,i){if(this._active){this._notify(!1);const s=this._target[this._prop],r=i-this._start,n=this._duration-r;this._start=i,this._duration=Math.floor(Math.max(n,t.duration)),this._total+=r,this._loop=!!t.loop,this._to=wi([t.to,e,s,t.from]),this._from=wi([t.from,s,e])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const e=t-this._start,i=this._duration,s=this._prop,r=this._from,n=this._loop,a=this._to;let l;if(this._active=r!==a&&(n||e<i),!this._active)return this._target[s]=a,void this._notify(!0);e<0?this._target[s]=r:(l=e/i%2,l=n&&l>1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[s]=this._fn(r,a,l))}wait(){const t=this._promises||(this._promises=[]);return new Promise((e,i)=>{t.push({res:e,rej:i})})}_notify(t){const e=t?"res":"rej",i=this._promises||[];for(let s=0;s<i.length;s++)i[s][e]()}}class As{constructor(t,e){this._chart=t,this._properties=new Map,this.configure(e)}configure(t){if(!Gt(t))return;const e=Object.keys(Xt.animation),i=this._properties;Object.getOwnPropertyNames(t).forEach(s=>{const r=t[s];if(!Gt(r))return;const n={};for(const a of e)n[a]=r[a];
1(ye(r.properties)&&r.properties||[s]).forEach(a=>{(a===s||!i.has(a))&&i.set(a,n)})})}_animateOptions(t,e){const i=e.options,s=ra(t,i);if(!s)return[];const r=this._createAnimations(s,i);return i.$shared&&na(t.options.$animations,i).then(()=>{t.options=i},()=>{}),r}_createAnimations(t,e){const i=this._properties,s=[],r=t.$animations||(t.$animations={}),n=Object.keys(e),a=Date.now();let l;for(l=n.length-1;l>=0;--l){const c=n[l];if("$"===c.charAt(0))continue;if("options"===c){s.push(...this._animateOptions(t,e));continue}const h=e[c];let d=r[c];const u=i.get(c);if(d){if(u&&d.active()){d.update(u,h,a);continue}d.cancel()}u&&u.duration?(r[c]=d=new _n(u,t,c,h),s.push(d)):t[c]=h}return s}update(t,e){if(0===this._properties.size)return void Object.assign(t,e);const i=this._createAnimations(t,e);return i.length?(qe.add(this._chart,i),!0):void 0}}function na(o,t){const e=[],i=Object.keys(t);for(let s=0;s<i.length;s++){const r=o[i[s]];r&&r.active()&&e.push(r.wait())}return Promise.all(e)}function ra(o,t){if(!t)return;let e=o.options;if(e)return e.$shared&&(o.options=e=Object.assign({},e,{$shared:!1,$animations:{}})),e;o.options=t}function An(o,t){const e=o&&o.options||{},i=e.reverse,s=void 0===e.min?t:0,r=void 0===e.max?t:0;return{start:i?r:s,end:i?s:r}}function oa(o,t,e){if(!1===e)return!1;const i=An(o,e),s=An(t,e);return{top:s.end,right:i.end,bottom:s.start,left:i.start}}function aa(o){let t,e,i,s;return Gt(o)?(t=o.top,e=o.right,i=o.bottom,s=o.left):t=e=i=s=o,{top:t,right:e,bottom:i,left:s,disabled:!1===o}}function wn(o,t){const e=[],i=o._getSortedDatasetMetas(t);let s,r;for(s=0,r=i.length;s<r;++s)e.push(i[s].index);return e}function kn(o,t,e,i={}){const s=o.keys,r="single"===i.mode;let n,a,l,c;if(null===t)return;let h=!1;for(n=0,a=s.length;n<a;++n){if(l=+s[n],l===e){if(h=!0,i.all)continue;break}c=o.values[l],ee(c)&&(r||0===t||Xe(t)===Xe(c))&&(t+=c)}return h||i.all?t:0}function la(o,t){const{iScale:e,vScale:i}=t,s="x"===e.axis?"x":"y",r="x"===i.axis?"x":"y",n=Object.keys(o),a=new Array(n.length);let l,c,h;for(l=0,c=n.length;l<c;++l)h=n[l],a[l]={[s]:h,[r]:o[h]};return a}function ws(o,t){const e=o&&o.options.stacked;return e||void 0===e&&void 0!==t.stack}function ca(o,t,e){return`${o.id}.${t.id}.${e.stack||e.type}`}function ha(o){const{min:t,max:e,minDefined:i,maxDefined:s}=o.getUserBounds();return{min:i?t:Number.NEGATIVE_INFINITY,max:s?e:Number.POSITIVE_INFINITY}}function ua(o,t,e){const i=o[t]||(o[t]={});return i[e]||(i[e]={})}function Sn(o,t,e,i){for(const s of t.getMatchingVisibleMetas(i).reverse()){const r=o[s.index];if(e&&r>0||!e&&r<0)return s.index}return null}function En(o,t){const{chart:e,_cachedMeta:i}=o,s=e._stacks||(e._stacks={}),{iScale:r,vScale:n,index:a}=i,l=r.axis,c=n.axis,h=ca(r,n,i),d=t.length;let u;for(let p=0;p<d;++p){const f=t[p],{[l]:y,[c]:w}=f;u=(f._stacks||(f._stacks={}))[c]=ua(s,h,y),u[a]=w,u._top=Sn(u,n,!0,i.type),u._bottom=Sn(u,n,!1,i.type),(u._visualValues||(u._visualValues={}))[a]=w}}function ks(o,t){const e=o.scales;return Object.keys(e).filter(i=>e[i].axis===t).shift()}function da(o,t){return ri(o,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function fa(o,t,e){return ri(o,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:e,index:t,mode:"default",type:"data"})}function Li(o,t){const e=o.controller.index,i=o.vScale&&o.vScale.axis;if(i){t=t||o._parsed;for(const s of t){const r=s._stacks;if(!r||void 0===r[i]||void 0===r[i][e])return;delete r[i][e],void 0!==r[i]._visualValues&&void 0!==r[i]._visualValues[e]&&delete r[i]._visualValues[e]}}}const Ss=o=>"reset"===o||"none"===o,Nn=(o,t)=>t?o:Object.assign({},o),pa=(o,t,e)=>o&&!t.hidden&&t._stacked&&{keys:wn(e,!0),values:null};class Ve{static defaults={};static datasetElementType=null;static dataElementType=null;constructor(t,e){this.chart=t,this._ctx=t.ctx,this.index=e,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=ws(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&&Li(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,e=this._cachedMeta,i=this.getDataset(),s=(d,u,p,f)=>"x"===d?u:"r"===d?f:p,r=e.xAxisID=Pt(i.xAxisID,ks(t,"x")),n=e.yAxisID=Pt(i.yAxisID,ks(t,"y")),a=e.rAxisID=Pt(i.rAxisID,ks(t,"r")),l=e.indexAxis,c=e.iAxisID=s(l,r,n,a),h=e.vAxisID=s(l,n,r,a);e.xScale=this.getScaleForId(r),e.yScale=this.getScaleForId(n),e.rScale=this.getScaleForId(a),e.
vendor: 6,257 bytes, line 1
1iScale=this.getScaleForId(c),e.vScale=this.getScaleForId(h)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const e=this._cachedMeta;return t===e.iScale?e.vScale:e.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&Gs(this._data,this),t._stacked&&Li(t)}_dataCheck(){const t=this.getDataset(),e=t.data||(t.data=[]),i=this._data;if(Gt(e))this._data=la(e,this._cachedMeta);else if(i!==e){if(i){Gs(i,this);const s=this._cachedMeta;Li(s),s._parsed=[]}e&&Object.isExtensible(e)&&wo(e,this),this._syncList=[],this._data=e}}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const e=this._cachedMeta,i=this.getDataset();let s=!1;this._dataCheck();const r=e._stacked;e._stacked=ws(e.vScale,e),e.stack!==i.stack&&(s=!0,Li(e),e.stack=i.stack),this._resyncElements(t),(s||r!==e._stacked)&&(En(this,e._parsed),e._stacked=ws(e.vScale,e))}configure(){const t=this.chart.config,e=t.datasetScopeKeys(this._type),i=t.getOptionScopes(this.getDataset(),e,!0);this.options=t.createResolver(i,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,e){const{_cachedMeta:i,_data:s}=this,{iScale:r,_stacked:n}=i,a=r.axis;let h,d,u,l=0===t&&e===s.length||i._sorted,c=t>0&&i._parsed[t-1];if(!1===this._parsing)i._parsed=s,i._sorted=!0,u=s;else{u=ye(s[t])?this.parseArrayData(i,s,t,e):Gt(s[t])?this.parseObjectData(i,s,t,e):this.parsePrimitiveData(i,s,t,e);const p=()=>null===d[a]||c&&d[a]<c[a];for(h=0;h<e;++h)i._parsed[h+t]=d=u[h],l&&(p()&&(l=!1),c=d);i._sorted=l}n&&En(this,u)}parsePrimitiveData(t,e,i,s){const{iScale:r,vScale:n}=t,a=r.axis,l=n.axis,c=r.getLabels(),h=r===n,d=new Array(s);let u,p,f;for(u=0,p=s;u<p;++u)f=u+i,d[u]={[a]:h||r.parse(c[f],f),[l]:n.parse(e[f],f)};return d}parseArrayData(t,e,i,s){const{xScale:r,yScale:n}=t,a=new Array(s);let l,c,h,d;for(l=0,c=s;l<c;++l)h=l+i,d=e[h],a[l]={x:r.parse(d[0],h),y:n.parse(d[1],h)};return a}parseObjectData(t,e,i,s){const{xScale:r,yScale:n}=t,{xAxisKey:a="x",yAxisKey:l="y"}=this._parsing,c=new Array(s);let h,d,u,p;for(h=0,d=s;h<d;++h)u=h+i,p=e[u],c[h]={x:r.parse(pi(p,a),u),y:n.parse(pi(p,l),u)};return c}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,e,i){const r=this._cachedMeta,n=e[t.axis];return kn({keys:wn(this.chart,!0),values:e._stacks[t.axis]._visualValues},n,r.index,{mode:i})}updateRangeFromParsed(t,e,i,s){const r=i[e.axis];let n=null===r?NaN:r;const a=s&&i._stacks[e.axis];s&&a&&(s.values=a,n=kn(s,r,this._cachedMeta.index)),t.min=Math.min(t.min,n),t.max=Math.max(t.max,n)}getMinMax(t,e){const i=this._cachedMeta,s=i._parsed,r=i._sorted&&t===i.iScale,n=s.length,a=this._getOtherScale(t),l=pa(e,i,this.chart),c={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:h,max:d}=ha(a);let u,p;function f(){p=s[u];const y=p[a.axis];return!ee(p[t.axis])||h>y||d<y}for(u=0;u<n&&(f()||(this.updateRangeFromParsed(c,t,p,l),!r));++u);if(r)for(u=n-1;u>=0;--u)if(!f()){this.updateRangeFromParsed(c,t,p,l);break}return c}getAllParsedValues(t){const e=this._cachedMeta._parsed,i=[];let s,r,n;for(s=0,r=e.length;s<r;++s)n=e[s][t.axis],ee(n)&&i.push(n);return i}getMaxOverflow(){return!1}getLabelAndValue(t){const e=this._cachedMeta,i=e.iScale,s=e.vScale,r=this.getParsed(t);return{label:i?""+i.getLabelForValue(r[i.axis]):"",value:s?""+s.getLabelForValue(r[s.axis]):""}}_update(t){const e=this._cachedMeta;this.update(t||"default"),e._clip=aa(Pt(this.options.clip,oa(e.xScale,e.yScale,this.getMaxOverflow())))}update(t){}draw(){const t=this._ctx,i=this._cachedMeta,s=i.data||[],r=this.chart.chartArea,n=[],a=this._drawStart||0,l=this._drawCount||s.length-a,c=this.options.drawActiveElementsOnTop;let h;for(i.dataset&&i.dataset.draw(t,r,a,l),h=a;h<a+l;++h){const d=s[h];d.hidden||(d.active&&c?n.push(d):d.draw(t,r))}for(h=0;h<n.length;++h)n[h].draw(t,r)}getStyle(t,e){const i=e?"active":"default";return void 0===t&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(i):this.resolveDataElementOptions(t||0,i)}getContext(t,e,i){const s=this.getDataset();let r;if(t>=0&&t<this._cachedMeta.data.length){const n=this._cachedMeta.data[t];r=n.$context||(n.$context=fa(this.getContext(),t,n)),r.parsed=this.getParsed(t),r.raw=s.data[t],r.index=r.dataIndex=t}else r=this.$context||(this.$context=da(this.chart.getContext(),this.index)),r.dataset=s,r.index=r.datasetIndex=this.index;return r.active=!!e,r.mode=i,r}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,e){return this._resolveElementOptions(this.dataElementType.id,e,t)}_resolveElementOptions(t,e="default",i){const s="active"===e,r=this._cachedDataOpts,n=t+"-"+e,a=r[n],l=this.enableOptionSharing&&ki(i);if(a)return Nn(a,l);const c=this.chart.config,h=c.datasetElementScopeKeys(this._type,t),d=s?[`${t}Hover`,"hover",t,""]:[t,""],u=c.getOptionScopes(this.getDataset(),h),p=Object.keys(Xt.elements[t]),y=c.resolveNamedOptions(u,p,()=>this.getContext(i,s,e),d);return y.$shared&&(y.$shared=l,r[n]=Object.freeze(Nn(y,l))),y}_resolveAnimations(t,e,i){const s=this.chart,r=this._cachedDataOpts,n=`animation-${e}`,a=r[n];if(a)return a;let l;if(!1!==s.options.animation){const h=this.chart.config,d=h.datasetAnimationScopeKeys(this._type,e),u=h.getOptionScopes(this.getDataset(),d);l=h.createResolver(u,this.getContext(t,i,e))}const c=new As(s,l&&l.animations);return l&&l._cacheable&&(r[n]=Object.freeze(c)),c}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||Ss(t)||this.chart._animationsDisabled}_getSharedOptions(t,e){const i=this.resolveDataElementOptions(t,e),s=this._sharedOptions,r=this.getSharedOptions(i),n=this.includeOptions(e,r)||r!==s;return this.updateSharedOptions(r,e,i),{sharedOptions:r,includeOptions:n}}updateElement(t,e,i,s){Ss(s)?Object.assign(t,i):this._resolveAnimations(e,s).update(t,i)}updateSharedOptions(t,e,i){t&&!Ss(e)&&this._resolveAnimations(void 0,e).update(t,i)}_setStyle(t,e,i,s){t.active=s;const r=this.getStyle(e,s);
vendor: 2,804 bytes, line 1
1this._resolveAnimations(e,i,s).update(t,{options:!s&&this.getSharedOptions(r)||r})}removeHoverStyle(t,e,i){this._setStyle(t,i,"active",!1)}setHoverStyle(t,e,i){this._setStyle(t,i,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const e=this._data,i=this._cachedMeta.data;for(const[a,l,c]of this._syncList)this[a](l,c);this._syncList=[];const s=i.length,r=e.length,n=Math.min(r,s);n&&this.parse(0,n),r>s?this._insertElements(s,r-s,t):r<s&&this._removeElements(r,s-r)}_insertElements(t,e,i=!0){const s=this._cachedMeta,r=s.data,n=t+e;let a;const l=c=>{for(c.length+=e,a=c.length-1;a>=n;a--)c[a]=c[a-e]};for(l(r),a=t;a<n;++a)r[a]=new this.dataElementType;this._parsing&&l(s._parsed),this.parse(t,e),i&&this.updateElements(r,t,e,"reset")}updateElements(t,e,i,s){}_removeElements(t,e){const i=this._cachedMeta;if(this._parsing){const s=i._parsed.splice(t,e);i._stacked&&Li(i,s)}i.data.splice(t,e)}_sync(t){if(this._parsing)this._syncList.push(t);else{const[e,i,s]=t;this[e](i,s)}this.chart._dataChanges.push([this.index,...t])}_onDataPush(){const t=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-t,t])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(t,e){e&&this._sync(["_removeElements",t,e]);const i=arguments.length-2;i&&this._sync(["_insertElements",t,i])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}function ga(o,t){if(!o._cache.$bar){const e=o.getMatchingVisibleMetas(t);let i=[];for(let s=0,r=e.length;s<r;s++)i=i.concat(e[s].controller.getAllParsedValues(o));o._cache.$bar=Zs(i.sort((s,r)=>s-r))}return o._cache.$bar}function ma(o){const t=o.iScale,e=ga(t,o.type);let s,r,n,a,i=t._length;const l=()=>{32767===n||-32768===n||(ki(a)&&(i=Math.min(i,Math.abs(n-a)||i)),a=n)};for(s=0,r=e.length;s<r;++s)n=t.getPixelForValue(e[s]),l();for(a=void 0,s=0,r=t.ticks.length;s<r;++s)n=t.getPixelForTick(s),l();return i}function ba(o,t,e,i){const s=e.barThickness;let r,n;return Bt(s)?(r=t.min*e.categoryPercentage,n=e.barPercentage):(r=s*i,n=1),{chunk:r/i,ratio:n,start:t.pixels[o]-r/2}}function ya(o,t,e,i){const s=t.pixels,r=s[o];let n=o>0?s[o-1]:null,a=o<s.length-1?s[o+1]:null;const l=e.categoryPercentage;null===n&&(n=r-(null===a?t.end-t.start:a-r)),null===a&&(a=r+r-n);const c=r-(r-Math.min(n,a))/2*l;return{chunk:Math.abs(a-n)/2*l/i,ratio:e.barPercentage,start:c}}function xa(o,t,e,i){const s=e.parse(o[0],i),r=e.parse(o[1],i),n=Math.min(s,r),a=Math.max(s,r);let l=n,c=a;Math.abs(n)>Math.abs(a)&&(l=a,c=n),t[e.axis]=c,t._custom={barStart:l,barEnd:c,start:s,end:r,min:n,max:a}}
vendor: 6,572 bytes, line 1
1function Ln(o,t,e,i){return ye(o)?xa(o,t,e,i):t[e.axis]=e.parse(o,i),t}function On(o,t,e,i){const s=o.iScale,r=o.vScale,n=s.getLabels(),a=s===r,l=[];let c,h,d,u;for(c=e,h=e+i;c<h;++c)u=t[c],d={},d[s.axis]=a||s.parse(n[c],c),l.push(Ln(u,d,r,c));return l}function Es(o){return o&&void 0!==o.barStart&&void 0!==o.barEnd}function va(o,t,e){return 0!==o?Xe(o):(t.isHorizontal()?1:-1)*(t.min>=e?1:-1)}function _a(o){let t,e,i,s,r;return o.horizontal?(t=o.base>o.x,e="left",i="right"):(t=o.base<o.y,e="bottom",i="top"),t?(s="end",r="start"):(s="start",r="end"),{start:e,end:i,reverse:t,top:s,bottom:r}}function Aa(o,t,e,i){let s=t.borderSkipped;const r={};if(!s)return void(o.borderSkipped=r);if(!0===s)return void(o.borderSkipped={top:!0,right:!0,bottom:!0,left:!0});const{start:n,end:a,reverse:l,top:c,bottom:h}=_a(o);"middle"===s&&e&&(o.enableBorderRadius=!0,(e._top||0)===i?s=c:(e._bottom||0)===i?s=h:(r[Mn(h,n,a,l)]=!0,s=c)),r[Mn(s,n,a,l)]=!0,o.borderSkipped=r}function Mn(o,t,e,i){return o=i?Cn(o=wa(o,t,e),e,t):Cn(o,t,e)}function wa(o,t,e){return o===t?e:o===e?t:o}function Cn(o,t,e){return"start"===o?t:"end"===o?e:o}function ka(o,{inflateAmount:t},e){o.inflateAmount="auto"===t?1===e?.33:0:t}class Tn extends Ve{static id="bar";static defaults={datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}};static overrides={scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}};parsePrimitiveData(t,e,i,s){return On(t,e,i,s)}parseArrayData(t,e,i,s){return On(t,e,i,s)}parseObjectData(t,e,i,s){const{iScale:r,vScale:n}=t,{xAxisKey:a="x",yAxisKey:l="y"}=this._parsing,c="x"===r.axis?a:l,h="x"===n.axis?a:l,d=[];let u,p,f,y;for(u=i,p=i+s;u<p;++u)y=e[u],f={},f[r.axis]=r.parse(pi(y,c),u),d.push(Ln(pi(y,h),f,n,u));return d}updateRangeFromParsed(t,e,i,s){super.updateRangeFromParsed(t,e,i,s);const r=i._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){const e=this._cachedMeta,{iScale:i,vScale:s}=e,r=this.getParsed(t),n=r._custom,a=Es(n)?"["+n.start+", "+n.end+"]":""+s.getLabelForValue(r[s.axis]);return{label:""+i.getLabelForValue(r[i.axis]),value:a}}initialize(){this.enableOptionSharing=!0,super.initialize(),this._cachedMeta.stack=this.getDataset().stack}update(t){const e=this._cachedMeta;this.updateElements(e.data,0,e.data.length,t)}updateElements(t,e,i,s){const r="reset"===s,{index:n,_cachedMeta:{vScale:a}}=this,l=a.getBasePixel(),c=a.isHorizontal(),h=this._getRuler(),{sharedOptions:d,includeOptions:u}=this._getSharedOptions(e,s);for(let p=e;p<e+i;p++){const f=this.getParsed(p),y=r||Bt(f[a.axis])?{base:l,head:l}:this._calculateBarValuePixels(p),w=this._calculateBarIndexPixels(p,h),g=(f._stacks||{})[a.axis],_={horizontal:c,base:y.base,enableBorderRadius:!g||Es(f._custom)||n===g._top||n===g._bottom,x:c?y.head:w.center,y:c?w.center:y.head,height:c?w.size:Math.abs(y.size),width:c?Math.abs(y.size):w.size};u&&(_.options=d||this.resolveDataElementOptions(p,t[p].active?"active":s));const L=_.options||t[p].options;Aa(_,L,g,n),ka(_,L,h.ratio),this.updateElement(t[p],p,_,s)}}_getStacks(t,e){const{iScale:i}=this._cachedMeta,s=i.getMatchingVisibleMetas(this._type).filter(h=>h.controller.options.grouped),r=i.options.stacked,n=[],a=this._cachedMeta.controller.getParsed(e),l=a&&a[i.axis],c=h=>{const d=h._parsed.find(p=>p[i.axis]===l),u=d&&d[h.vScale.axis];if(Bt(u)||isNaN(u))return!0};for(const h of s)if((void 0===e||!c(h))&&((!1===r||-1===n.indexOf(h.stack)||void 0===r&&void 0===h.stack)&&n.push(h.stack),h.index===t))break;return n.length||n.push(void 0),n}_getStackCount(t){return this._getStacks(void 0,t).length}_getAxisCount(){return this._getAxis().length}getFirstScaleIdForIndexAxis(){const t=this.chart.scales,e=this.chart.options.indexAxis;return Object.keys(t).filter(i=>t[i].axis===e).shift()}_getAxis(){const t={},e=this.getFirstScaleIdForIndexAxis();for(const i of this.chart.data.datasets)t[Pt("x"===this.chart.options.indexAxis?i.xAxisID:i.yAxisID,e)]=!0;return Object.keys(t)}_getStackIndex(t,e,i){const s=this._getStacks(t,i),r=void 0!==e?s.indexOf(e):-1;return-1===r?s.length-1:r}_getRuler(){const t=this.options,e=this._cachedMeta,i=e.iScale,s=[];let r,n;for(r=0,n=e.data.length;r<n;++r)s.push(i.getPixelForValue(this.getParsed(r)[i.axis],r));const a=t.barThickness;return{min:a||ma(e),pixels:s,start:i._startPixel,end:i._endPixel,stackCount:this._getStackCount(),scale:i,grouped:t.grouped,ratio:a?1:t.categoryPercentage*t.barPercentage}}_calculateBarValuePixels(t){const{_cachedMeta:{vScale:e,_stacked:i,index:s},options:{base:r,minBarLength:n}}=this,a=r||0,l=this.getParsed(t),c=l._custom,h=Es(c);let f,y,d=l[e.axis],u=0,p=i?this.applyStack(e,l,i):d;p!==d&&(u=p-d,p=d),h&&(d=c.barStart,p=c.barEnd-c.barStart,0!==d&&Xe(d)!==Xe(c.barEnd)&&(u=0),u+=d);const w=Bt(r)||h?u:r;let g=e.getPixelForValue(w);if(f=this.chart.getDataVisibility(t)?e.getPixelForValue(u+p):g,y=f-g,Math.abs(y)<n){y=va(y,e,a)*n,d===a&&(g-=y/2);const _=e.getPixelForDecimal(0),L=e.getPixelForDecimal(1),M=Math.min(_,L),j=Math.max(_,L);g=Math.max(Math.min(g,j),M),f=g+y,i&&!h&&(l._stacks[e.axis]._visualValues[s]=e.getValueForPixel(f)-e.getValueForPixel(g))}if(g===e.getPixelForValue(a)){const _=Xe(y)*e.getLineWidthForValue(a)/2;g+=_,y-=_}return{size:y,base:g,head:f,center:f+y/2}}_calculateBarIndexPixels(t,e){const i=e.scale,s=this.options,r=s.skipNull,n=Pt(s.maxBarThickness,1/0);let a,l;const c=this._getAxisCount();if(e.grouped){const h=r?this._getStackCount(t):e.stackCount,d="flex"===s.barThickness?ya(t,e,s,h*c):ba(t,e,s,h*c),u="x"===this.chart.options.indexAxis?this.getDataset().xAxisID:this.getDataset().yAxisID,p=this._getAxis().indexOf(Pt(u,this.getFirstScaleIdForIndexAxis())),f=this._getStackIndex(this.index,this._cachedMeta.stack,r?t:void 0)+p;a=d.start+d.chunk*f+d.chunk/2,l=Math.min(n,d.chunk*d.ratio)}else a=i.getPixelForValue(this.getParsed(t)[i.axis],t),l=Math.min(n,e.min*e.ratio);return{base:a-l/2,head:a+l/2,center:a,size:l}}draw(){const t=this._cachedMeta,e=t.vScale,i=t.data,s=i.length;let r=0;for(;r<s;++r)null!==this.getParsed(r)[e.axis]&&!i[r].hidden&&i[r].draw(this._ctx)}}class Dn extends Ve{static id="bubble";static defaults={datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}};static overrides={scales:{x:{type:"linear"},y:{type:"linear"}}};initialize(){this.enableOptionSharing=!0,super.initialize()}
vendor: 16,473 bytes, line 1
1parsePrimitiveData(t,e,i,s){const r=super.parsePrimitiveData(t,e,i,s);for(let n=0;n<r.length;n++)r[n]._custom=this.resolveDataElementOptions(n+i).radius;return r}parseArrayData(t,e,i,s){const r=super.parseArrayData(t,e,i,s);for(let n=0;n<r.length;n++)r[n]._custom=Pt(e[i+n][2],this.resolveDataElementOptions(n+i).radius);return r}parseObjectData(t,e,i,s){const r=super.parseObjectData(t,e,i,s);for(let n=0;n<r.length;n++){const a=e[i+n];r[n]._custom=Pt(a&&a.r&&+a.r,this.resolveDataElementOptions(n+i).radius)}return r}getMaxOverflow(){const t=this._cachedMeta.data;let e=0;for(let i=t.length-1;i>=0;--i)e=Math.max(e,t[i].size(this.resolveDataElementOptions(i))/2);return e>0&&e}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart.data.labels||[],{xScale:s,yScale:r}=e,n=this.getParsed(t),a=s.getLabelForValue(n.x),l=r.getLabelForValue(n.y),c=n._custom;return{label:i[t]||"",value:"("+a+", "+l+(c?", "+c:"")+")"}}update(t){const e=this._cachedMeta.data;this.updateElements(e,0,e.length,t)}updateElements(t,e,i,s){const r="reset"===s,{iScale:n,vScale:a}=this._cachedMeta,{sharedOptions:l,includeOptions:c}=this._getSharedOptions(e,s),h=n.axis,d=a.axis;for(let u=e;u<e+i;u++){const p=t[u],f=!r&&this.getParsed(u),y={},w=y[h]=r?n.getPixelForDecimal(.5):n.getPixelForValue(f[h]),g=y[d]=r?a.getBasePixel():a.getPixelForValue(f[d]);y.skip=isNaN(w)||isNaN(g),c&&(y.options=l||this.resolveDataElementOptions(u,p.active?"active":s),r&&(y.options.radius=0)),this.updateElement(p,u,y,s)}}resolveDataElementOptions(t,e){const i=this.getParsed(t);let s=super.resolveDataElementOptions(t,e);s.$shared&&(s=Object.assign({},s,{$shared:!1}));const r=s.radius;return"active"!==e&&(s.radius=0),s.radius+=Pt(i&&i._custom,r),s}}function Sa(o,t,e){let i=1,s=1,r=0,n=0;if(t<fe){const a=o,l=a+t,c=Math.cos(a),h=Math.sin(a),d=Math.cos(l),u=Math.sin(l),p=(L,M,j)=>$i(L,a,l,!0)?1:Math.max(M,M*e,j,j*e),f=(L,M,j)=>$i(L,a,l,!0)?-1:Math.min(M,M*e,j,j*e),y=p(0,c,d),w=p(Le,h,u),g=f(ce,c,d),_=f(ce+Le,h,u);i=(y-g)/2,s=(w-_)/2,r=-(y+g)/2,n=-(w+_)/2}return{ratioX:i,ratioY:s,offsetX:r,offsetY:n}}class Qi extends Ve{static id="doughnut";static defaults={datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"};static descriptors={_scriptable:t=>"spacing"!==t,_indexable:t=>"spacing"!==t&&!t.startsWith("borderDash")&&!t.startsWith("hoverBorderDash")};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data,{labels:{pointStyle:i,textAlign:s,color:r,useBorderRadius:n,borderRadius:a}}=t.legend.options;return e.labels.length&&e.datasets.length?e.labels.map((l,c)=>{const d=t.getDatasetMeta(0).controller.getStyle(c);return{text:l,fillStyle:d.backgroundColor,fontColor:r,hidden:!t.getDataVisibility(c),lineDash:d.borderDash,lineDashOffset:d.borderDashOffset,lineJoin:d.borderJoinStyle,lineWidth:d.borderWidth,strokeStyle:d.borderColor,textAlign:s,pointStyle:i,borderRadius:n&&(a||d.borderRadius),index:c}}):[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}}}};constructor(t,e){super(t,e),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,e){const i=this.getDataset().data,s=this._cachedMeta;if(!1===this._parsing)s._parsed=i;else{let n,a,r=l=>+i[l];if(Gt(i[t])){const{key:l="value"}=this._parsing;r=c=>+pi(i[c],l)}for(n=t,a=t+e;n<a;++n)s._parsed[n]=r(n)}}_getRotation(){return Ce(this.options.rotation-90)}_getCircumference(){return Ce(this.options.circumference)}_getRotationExtents(){let t=fe,e=-fe;for(let i=0;i<this.chart.data.datasets.length;++i)if(this.chart.isDatasetVisible(i)&&this.chart.getDatasetMeta(i).type===this._type){const s=this.chart.getDatasetMeta(i).controller,r=s._getRotation(),n=s._getCircumference();t=Math.min(t,r),e=Math.max(e,r+n)}return{rotation:t,circumference:e-t}}update(t){const e=this.chart,{chartArea:i}=e,s=this._cachedMeta,r=s.data,n=this.getMaxBorderWidth()+this.getMaxOffset(r)+this.options.spacing,a=Math.max((Math.min(i.width,i.height)-n)/2,0),l=Math.min(ko(this.options.cutout,a),1),c=this._getRingWeight(this.index),{circumference:h,rotation:d}=this._getRotationExtents(),{ratioX:u,ratioY:p,offsetX:f,offsetY:y}=Sa(d,h,l),_=Math.max(Math.min((i.width-n)/u,(i.height-n)/p)/2,0),L=So(this.options.radius,_),j=(L-Math.max(L*l,0))/this._getVisibleDatasetWeightTotal();this.offsetX=f*L,this.offsetY=y*L,s.total=this.calculateTotal(),this.outerRadius=L-j*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-j*c,0),this.updateElements(r,0,r.length,t)}_circumference(t,e){const i=this.options,s=this._cachedMeta,r=this._getCircumference();return e&&i.animation.animateRotate||!this.chart.getDataVisibility(t)||null===s._parsed[t]||s.data[t].hidden?0:this.calculateCircumference(s._parsed[t]*r/fe)}updateElements(t,e,i,s){const r="reset"===s,n=this.chart,a=n.chartArea,h=(a.left+a.right)/2,d=(a.top+a.bottom)/2,u=r&&n.options.animation.animateScale,p=u?0:this.innerRadius,f=u?0:this.outerRadius,{sharedOptions:y,includeOptions:w}=this._getSharedOptions(e,s);let _,g=this._getRotation();for(_=0;_<e;++_)g+=this._circumference(_,r);for(_=e;_<e+i;++_){const L=this._circumference(_,r),M=t[_],j={x:h+this.offsetX,y:d+this.offsetY,startAngle:g,endAngle:g+L,circumference:L,outerRadius:f,innerRadius:p};w&&(j.options=y||this.resolveDataElementOptions(_,M.active?"active":s)),g+=L,this.updateElement(M,_,j,s)}}calculateTotal(){const t=this._cachedMeta,e=t.data;let s,i=0;for(s=0;s<e.length;s++){const r=t._parsed[s];null!==r&&!isNaN(r)&&this.chart.getDataVisibility(s)&&!e[s].hidden&&(i+=Math.abs(r))}return i}calculateCircumference(t){const e=this._cachedMeta.total;return e>0&&!isNaN(t)?fe*(Math.abs(t)/e):0}getLabelAndValue(t){const i=this.chart,s=i.data.labels||[],r=Wi(this._cachedMeta._parsed[t],i.options.locale);return{label:s[t]||"",value:r}}getMaxBorderWidth(t){let e=0;const i=this.chart;let s,r,n,a,l;if(!t)for(s=0,r=i.data.datasets.length;s<r;++s)if(i.isDatasetVisible(s)){n=i.getDatasetMeta(s),t=n.data,a=n.controller;break}if(!t)return 0;for(s=0,r=t.length;s<r;++s)l=a.resolveDataElementOptions(s),"inner"!==l.borderAlign&&(e=Math.max(e,l.borderWidth||0,l.hoverBorderWidth||0));return e}getMaxOffset(t){let e=0;for(let i=0,s=t.length;i<s;++i){const r=this.resolveDataElementOptions(i);e=Math.max(e,r.offset||0,r.hoverOffset||0)}return e}_getRingWeightOffset(t){let e=0;for(let i=0;i<t;++i)this.chart.isDatasetVisible(i)&&(e+=this._getRingWeight(i));return e}_getRingWeight(t){return Math.max(Pt(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}class Pn extends Ve{static id="line";static defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1};static overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){const e=this._cachedMeta,{dataset:i,data:s=[],_dataset:r}=e,n=this.chart._animationsDisabled;let{start:a,count:l}=Js(e,s,n);this._drawStart=a,this._drawCount=l,Qs(e)&&(a=0,l=s.length),i._chart=this.chart,i._datasetIndex=this.index,i._decimated=!!r._decimated,i.points=s;const c=this.resolveDatasetElementOptions(t);this.options.showLine||(c.borderWidth=0),c.segment=this.options.segment,this.updateElement(i,void 0,{animated:!n,options:c},t),this.updateElements(s,a,l,t)}updateElements(t,e,i,s){const r="reset"===s,{iScale:n,vScale:a,_stacked:l,_dataset:c}=this._cachedMeta,{sharedOptions:h,includeOptions:d}=this._getSharedOptions(e,s),u=n.axis,p=a.axis,{spanGaps:f,segment:y}=this.options,w=gi(f)?f:Number.POSITIVE_INFINITY,g=this.chart._animationsDisabled||r||"none"===s,_=e+i,L=t.length;let M=e>0&&this.getParsed(e-1);for(let j=0;j<L;++j){const H=t[j],X=g?H:{};if(j<e||j>=_){X.skip=!0;continue}const U=this.getParsed(j),A=Bt(U[p]),C=X[u]=n.getPixelForValue(U[u],j),W=X[p]=r||A?a.getBasePixel():a.getPixelForValue(l?this.applyStack(a,U,l):U[p],j);X.skip=isNaN(C)||isNaN(W)||A,X.stop=j>0&&Math.abs(U[u]-M[u])>w,y&&(X.parsed=U,X.raw=c.data[j]),d&&(X.options=h||this.resolveDataElementOptions(j,H.active?"active":s)),g||this.updateElement(H,j,X,s),M=U}}getMaxOverflow(){const t=this._cachedMeta,e=t.dataset,i=e.options&&e.options.borderWidth||0,s=t.data||[];if(!s.length)return i;const r=s[0].size(this.resolveDataElementOptions(0)),n=s[s.length-1].size(this.resolveDataElementOptions(s.length-1));return Math.max(i,r,n)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}class Ns extends Ve{static id="polarArea";static defaults={dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:i,color:s}}=t.legend.options;return e.labels.map((r,n)=>{const l=t.getDatasetMeta(0).controller.getStyle(n);return{text:r,fillStyle:l.backgroundColor,strokeStyle:l.borderColor,fontColor:s,lineWidth:l.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(n),index:n}})}return[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}};constructor(t,e){super(t,e),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){const i=this.chart,s=i.data.labels||[],r=Wi(this._cachedMeta._parsed[t].r,i.options.locale);return{label:s[t]||"",value:r}}parseObjectData(t,e,i,s){return tn.bind(this)(t,e,i,s)}update(t){const e=this._cachedMeta.data;this._updateRadius(),this.updateElements(e,0,e.length,t)}getMinMax(){const e={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return this._cachedMeta.data.forEach((i,s)=>{const r=this.getParsed(s).r;!isNaN(r)&&this.chart.getDataVisibility(s)&&(r<e.min&&(e.min=r),r>e.max&&(e.max=r))}),e}_updateRadius(){const t=this.chart,e=t.chartArea,i=t.options,s=Math.min(e.right-e.left,e.bottom-e.top),r=Math.max(s/2,0),a=(r-Math.max(i.cutoutPercentage?r/100*i.cutoutPercentage:1,0))/t.getVisibleDatasetCount();this.outerRadius=r-a*this.index,this.innerRadius=this.outerRadius-a}updateElements(t,e,i,s){const r="reset"===s,n=this.chart,l=n.options.animation,c=this._cachedMeta.rScale,h=c.xCenter,d=c.yCenter,u=c.getIndexAngle(0)-.5*ce;let f,p=u;const y=360/this.countVisibleElements();for(f=0;f<e;++f)p+=this._computeAngle(f,s,y);for(f=e;f<e+i;f++){const w=t[f];let g=p,_=p+this._computeAngle(f,s,y),L=n.getDataVisibility(f)?c.getDistanceFromCenterForValue(this.getParsed(f).r):0;p=_,r&&(l.animateScale&&(L=0),l.animateRotate&&(g=_=u));const M={x:h,y:d,innerRadius:0,outerRadius:L,startAngle:g,endAngle:_,options:this.resolveDataElementOptions(f,w.active?"active":s)};this.updateElement(w,f,M,s)}}countVisibleElements(){let e=0;return this._cachedMeta.data.forEach((i,s)=>{!isNaN(this.getParsed(s).r)&&this.chart.getDataVisibility(s)&&e++}),e}_computeAngle(t,e,i){return this.chart.getDataVisibility(t)?Ce(this.resolveDataElementOptions(t,e).angle||i):0}}class Rn extends Qi{static id="pie";static defaults={cutout:0,rotation:0,circumference:360,radius:"100%"}}class qn extends Ve{static id="radar";static defaults={datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}};static overrides={aspectRatio:1,scales:{r:{type:"radialLinear"}}};getLabelAndValue(t){const e=this._cachedMeta.vScale,i=this.getParsed(t);return{label:e.getLabels()[t],value:""+e.getLabelForValue(i[e.axis])}}parseObjectData(t,e,i,s){return tn.bind(this)(t,e,i,s)}update(t){const e=this._cachedMeta,i=e.dataset,s=e.data||[],r=e.iScale.getLabels();if(i.points=s,"resize"!==t){const n=this.resolveDatasetElementOptions(t);this.options.showLine||(n.borderWidth=0),this.updateElement(i,void 0,{_loop:!0,_fullLoop:r.length===s.length,options:n},t)}this.updateElements(s,0,s.length,t)}updateElements(t,e,i,s){const r=this._cachedMeta.rScale,n="reset"===s;for(let a=e;a<e+i;a++){const l=t[a],c=this.resolveDataElementOptions(a,l.active?"active":s),h=r.getPointPositionForValue(a,this.getParsed(a).r),d=n?r.xCenter:h.x,u=n?r.yCenter:h.y,p={x:d,y:u,angle:h.angle,skip:isNaN(d)||isNaN(u),options:c};this.updateElement(l,a,p,s)}}}class jn extends Ve{static id="scatter";static defaults={datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1};static overrides={interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}};getLabelAndValue(t){const e=this._cachedMeta,i=this.chart.data.labels||[],{xScale:s,yScale:r}=e,n=this.getParsed(t),a=s.getLabelForValue(n.x),l=r.getLabelForValue(n.y);return{label:i[t]||"",value:"("+a+", "+l+")"}}update(t){const e=this._cachedMeta,{data:i=[]}=e,s=this.chart._animationsDisabled;let{start:r,count:n}=Js(e,i,s);if(this._drawStart=r,this._drawCount=n,Qs(e)&&(r=0,n=i.length),this.options.showLine){this.datasetElementType||this.addElements();const{dataset:a,_dataset:l}=e;a._chart=this.chart,a._datasetIndex=this.index,a._decimated=!!l._decimated,a.points=i;const c=this.resolveDatasetElementOptions(t);c.segment=this.options.segment,this.updateElement(a,void 0,{animated:!s,options:c},t)}else this.datasetElementType&&(delete e.dataset,this.datasetElementType=!1);this.updateElements(i,r,n,t)}addElements(){const{showLine:t}=this.options;!this.datasetElementType&&t&&(this.datasetElementType=this.chart.registry.getElement("line")),super.addElements()}updateElements(t,e,i,s){const r="reset"===s,{iScale:n,vScale:a,_stacked:l,_dataset:c}=this._cachedMeta,h=this.resolveDataElementOptions(e,s),d=this.getSharedOptions(h),u=this.includeOptions(s,d),p=n.axis,f=a.axis,{spanGaps:y,segment:w}=this.options,g=gi(y)?y:Number.POSITIVE_INFINITY,_=this.chart._animationsDisabled||r||"none"===s;let L=e>0&&this.getParsed(e-1);for(let M=e;M<e+i;++M){const j=t[M],H=this.getParsed(M),X=_?j:{},U=Bt(H[f]),A=X[p]=n.getPixelForValue(H[p],M),C=X[f]=r||U?a.getBasePixel():a.getPixelForValue(l?this.applyStack(a,H,l):H[f],M);X.skip=isNaN(A)||isNaN(C)||U,X.stop=M>0&&Math.abs(H[p]-L[p])>g,w&&(X.parsed=H,X.raw=c.data[M]),u&&(X.options=d||this.resolveDataElementOptions(M,j.active?"active":s)),_||this.updateElement(j,M,X,s),L=H}this.updateSharedOptions(d,s,h)}getMaxOverflow(){const t=this._cachedMeta,e=t.data||[];if(!this.options.showLine){let a=0;for(let l=e.length-1;l>=0;--l)a=Math.max(a,e[l].size(this.resolveDataElementOptions(l))/2);return a>0&&a}const i=t.dataset,s=i.options&&i.options.borderWidth||0;if(!e.length)return s;const r=e[0].size(this.resolveDataElementOptions(0)),n=e[e.length-1].size(this.resolveDataElementOptions(e.length-1));return Math.max(s,r,n)/2}}var In=Object.freeze({__proto__:null,BarController:Tn,BubbleController:Dn,DoughnutController:Qi,LineController:Pn,PieController:Rn,PolarAreaController:Ns,RadarController:qn,ScatterController:jn});function ui(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class Ws{static override(t){Object.assign(Ws.prototype,t)}options;constructor(t){this.options=t||{}}init(){}formats(){return ui()}parse(){return ui()}format(){return ui()}add(){return ui()}diff(){return ui()}startOf(){return ui()}endOf(){return ui()}}var Bn={_date:Ws};function Ea(o,t,e,i){const{controller:s,data:r,_sorted:n}=o,a=s._cachedMeta.iScale,l=o.dataset&&o.dataset.options?o.dataset.options.spanGaps:null;if(a&&t===a.axis&&"r"!==t&&n&&r.length){const c=a._reversePixels?Eo:Si;if(!i){const h=c(r,t,e);if(l){const{vScale:d}=s._cachedMeta,{_parsed:u}=o,p=u.slice(0,h.lo+1).reverse().findIndex(y=>!Bt(y[d.axis]));h.lo-=Math.max(0,p);const f=u.slice(h.hi).findIndex(y=>!Bt(y[d.axis]));h.hi+=Math.max(0,f)}return h}if(s._sharedOptions){const h=r[0],d="function"==typeof h.getRange&&h.getRange(t);if(d){const u=c(r,t,e-d),p=c(r,t,e+d);return{lo:u.lo,hi:p.hi}}}}return{lo:0,hi:r.length-1}}function Oi(o,t,e,i,s){const r=o.getSortedVisibleDatasetMetas(),n=e[t];for(let a=0,l=r.length;a<l;++a){const{index:c,data:h}=r[a],{lo:d,hi:u}=Ea(r[a],t,n,s);for(let p=d;p<=u;++p){const f=h[p];
1f.skip||i(f,c,p)}}}function Na(o){const t=-1!==o.indexOf("x"),e=-1!==o.indexOf("y");return function(i,s){const r=t?Math.abs(i.x-s.x):0,n=e?Math.abs(i.y-s.y):0;return Math.sqrt(Math.pow(r,2)+Math.pow(n,2))}}function Ls(o,t,e,i,s){const r=[];return!s&&!o.isPointInArea(t)||Oi(o,e,t,function(a,l,c){!s&&!ai(a,o.chartArea,0)||a.inRange(t.x,t.y,i)&&r.push({element:a,datasetIndex:l,index:c})},!0),r}function La(o,t,e,i){let s=[];return Oi(o,e,t,function r(n,a,l){const{startAngle:c,endAngle:h}=n.getProps(["startAngle","endAngle"],i),{angle:d}=en(n,{x:t.x,y:t.y});$i(d,c,h)&&s.push({element:n,datasetIndex:a,index:l})}),s}function Oa(o,t,e,i,s,r){let n=[];const a=Na(e);let l=Number.POSITIVE_INFINITY;return Oi(o,e,t,function c(h,d,u){const p=h.inRange(t.x,t.y,s);if(i&&!p)return;const f=h.getCenterPoint(s);if(!r&&!o.isPointInArea(f)&&!p)return;const w=a(t,f);w<l?(n=[{element:h,datasetIndex:d,index:u}],l=w):w===l&&n.push({element:h,datasetIndex:d,index:u})}),n}function Os(o,t,e,i,s,r){return r||o.isPointInArea(t)?"r"!==e||i?Oa(o,t,e,i,s,r):La(o,t,e,s):[]}function zn(o,t,e,i,s){const r=[],n="x"===e?"inXRange":"inYRange";let a=!1;return Oi(o,e,t,(l,c,h)=>{l[n]&&l[n](t[e],s)&&(r.push({element:l,datasetIndex:c,index:h}),a=a||l.inRange(t.x,t.y,s))}),i&&!a?[]:r}var Fn={evaluateInteractionItems:Oi,modes:{index(o,t,e,i){const s=oi(t,o),r=e.axis||"x",n=e.includeInvisible||!1,a=e.intersect?Ls(o,s,r,i,n):Os(o,s,r,!1,i,n),l=[];return a.length?(o.getSortedVisibleDatasetMetas().forEach(c=>{const h=a[0].index,d=c.data[h];d&&!d.skip&&l.push({element:d,datasetIndex:c.index,index:h})}),l):[]},dataset(o,t,e,i){const s=oi(t,o),r=e.axis||"xy",n=e.includeInvisible||!1;let a=e.intersect?Ls(o,s,r,i,n):Os(o,s,r,!1,i,n);if(a.length>0){const l=a[0].datasetIndex,c=o.getDatasetMeta(l).data;a=[];for(let h=0;h<c.length;++h)a.push({element:c[h],datasetIndex:l,index:h})}return a},point:(o,t,e,i)=>Ls(o,oi(t,o),e.axis||"xy",i,e.includeInvisible||!1),nearest:(o,t,e,i)=>Os(o,oi(t,o),e.axis||"xy",e.intersect,i,e.includeInvisible||!1),x:(o,t,e,i)=>zn(o,oi(t,o),"x",e.intersect,i),y:(o,t,e,i)=>zn(o,oi(t,o),"y",e.intersect,i)}};const Vn=["left","top","right","bottom"];function Mi(o,t){return o.filter(e=>e.pos===t)}function Hn(o,t){return o.filter(e=>-1===Vn.indexOf(e.pos)&&e.box.axis===t)}function Ci(o,t){return o.sort((e,i)=>{const s=t?i:e,r=t?e:i;return s.weight===r.weight?s.index-r.index:s.weight-r.weight})}function Ma(o){const t=[];let e,i,s,r,n,a;for(e=0,i=(o||[]).length;e<i;++e)s=o[e],({position:r,options:{stack:n,stackWeight:a=1}}=s),t.push({index:e,box:s,pos:r,horizontal:s.isHorizontal(),weight:s.weight,stack:n&&r+n,stackWeight:a});return t}function Ca(o){const t={};for(const e of o){const{stack:i,pos:s,stackWeight:r}=e;if(!i||!Vn.includes(s))continue;const n=t[i]||(t[i]={count:0,placed:0,weight:0,size:0});n.count++,n.weight+=r}return t}function Ta(o,t){const e=Ca(o),{vBoxMaxWidth:i,hBoxMaxHeight:s}=t;let r,n,a;for(r=0,n=o.length;r<n;++r){a=o[r];const{fullSize:l}=a.box,c=e[a.stack],h=c&&a.stackWeight/c.weight;a.horizontal?(a.width=h?h*i:l&&t.availableWidth,a.height=s):(a.width=i,a.height=h?h*s:l&&t.availableHeight)}return e}function Da(o){const t=Ma(o),e=Ci(t.filter(c=>c.box.fullSize),!0),i=Ci(Mi(t,"left"),!0),s=Ci(Mi(t,"right")),r=Ci(Mi(t,"top"),!0),n=Ci(Mi(t,"bottom")),a=Hn(t,"x"),l=Hn(t,"y");return{fullSize:e,leftAndTop:i.concat(r),rightAndBottom:s.concat(l).concat(n).concat(a),chartArea:Mi(t,"chartArea"),vertical:i.concat(s).concat(l),horizontal:r.concat(n).concat(a)}}function Un(o,t,e,i){return Math.max(o[e],t[e])+Math.max(o[i],t[i])}function Wn(o,t){o.top=Math.max(o.top,t.top),o.left=Math.max(o.left,t.left),o.bottom=Math.max(o.bottom,t.bottom),o.right=Math.max(o.right,t.right)}function Pa(o,t,e,i){const{pos:s,box:r}=e,n=o.maxPadding;if(!Gt(s)){e.size&&(o[s]-=e.size);const d=i[e.stack]||{size:0,count:1};d.size=Math.max(d.size,e.horizontal?r.height:r.width),e.size=d.size/d.count,o[s]+=e.size}r.getPadding&&Wn(n,r.getPadding());const a=Math.max(0,t.outerWidth-Un(n,o,"left","right")),l=Math.max(0,t.outerHeight-Un(n,o,"top","bottom")),c=a!==o.w,h=l!==o.h;return o.w=a,o.h=l,e.horizontal?{same:c,other:h}:{same:h,other:c}}function Ra(o){const t=o.maxPadding;function e(i){const s=Math.max(t[i]-o[i],0);return o[i]+=s,s}o.y+=e("top"),o.x+=e("left"),e("right"),e("bottom")}function qa(o,t){const e=t.maxPadding;return function i(s){const r={left:0,top:0,right:0,bottom:0};
vendor: 5,104 bytes, line 1
1return s.forEach(n=>{r[n]=Math.max(t[n],e[n])}),r}(o?["left","right"]:["top","bottom"])}function Ti(o,t,e,i){const s=[];let r,n,a,l,c,h;for(r=0,n=o.length,c=0;r<n;++r){a=o[r],l=a.box,l.update(a.width||t.w,a.height||t.h,qa(a.horizontal,t));const{same:d,other:u}=Pa(t,e,a,i);c|=d&&s.length,h=h||u,l.fullSize||s.push(a)}return c&&Ti(s,t,e,i)||h}function ts(o,t,e,i,s){o.top=e,o.left=t,o.right=t+i,o.bottom=e+s,o.width=i,o.height=s}function $n(o,t,e,i){const s=e.padding;let{x:r,y:n}=t;for(const a of o){const l=a.box,c=i[a.stack]||{count:1,placed:0,weight:1},h=a.stackWeight/c.weight||1;if(a.horizontal){const d=t.w*h,u=c.size||l.height;ki(c.start)&&(n=c.start),l.fullSize?ts(l,s.left,n,e.outerWidth-s.right-s.left,u):ts(l,t.left+c.placed,n,d,u),c.start=n,c.placed+=d,n=l.bottom}else{const d=t.h*h,u=c.size||l.width;ki(c.start)&&(r=c.start),l.fullSize?ts(l,r,s.top,u,e.outerHeight-s.bottom-s.top):ts(l,r,t.top+c.placed,u,d),c.start=r,c.placed+=d,r=l.right}}t.x=r,t.y=n}var le={addBox(o,t){o.boxes||(o.boxes=[]),t.fullSize=t.fullSize||!1,t.position=t.position||"top",t.weight=t.weight||0,t._layers=t._layers||function(){return[{z:0,draw(e){t.draw(e)}}]},o.boxes.push(t)},removeBox(o,t){const e=o.boxes?o.boxes.indexOf(t):-1;-1!==e&&o.boxes.splice(e,1)},configure(o,t,e){t.fullSize=e.fullSize,t.position=e.position,t.weight=e.weight},update(o,t,e,i){if(!o)return;const s=he(o.options.layout.padding),r=Math.max(t-s.width,0),n=Math.max(e-s.height,0),a=Da(o.boxes),l=a.vertical,c=a.horizontal;Vt(o.boxes,y=>{"function"==typeof y.beforeLayout&&y.beforeLayout()});const h=l.reduce((y,w)=>w.box.options&&!1===w.box.options.display?y:y+1,0)||1,d=Object.freeze({outerWidth:t,outerHeight:e,padding:s,availableWidth:r,availableHeight:n,vBoxMaxWidth:r/2/h,hBoxMaxHeight:n/2}),u=Object.assign({},s);Wn(u,he(i));const p=Object.assign({maxPadding:u,w:r,h:n,x:s.left,y:s.top},s),f=Ta(l.concat(c),d);Ti(a.fullSize,p,d,f),Ti(l,p,d,f),Ti(c,p,d,f)&&Ti(l,p,d,f),Ra(p),$n(a.leftAndTop,p,d,f),p.x+=p.w,p.y+=p.h,$n(a.rightAndBottom,p,d,f),o.chartArea={left:p.left,top:p.top,right:p.left+p.w,bottom:p.top+p.h,height:p.h,width:p.w},Vt(a.chartArea,y=>{const w=y.box;Object.assign(w,o.chartArea),w.update(p.w,p.h,{left:0,top:0,right:0,bottom:0})})}};class Ms{acquireContext(t,e){}releaseContext(t){return!1}addEventListener(t,e,i){}removeEventListener(t,e,i){}getDevicePixelRatio(){return 1}getMaximumSize(t,e,i,s){return e=Math.max(0,e||t.width),i=i||t.height,{width:e,height:Math.max(0,s?Math.floor(e/s):i)}}isAttached(t){return!0}updateConfig(t){}}class Kn extends Ms{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const es="$chartjs",ja={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},Yn=o=>null===o||""===o;function Ia(o,t){const e=o.style,i=o.getAttribute("height"),s=o.getAttribute("width");if(o[es]={initial:{height:i,width:s,style:{display:e.display,height:e.height,width:e.width}}},e.display=e.display||"block",e.boxSizing=e.boxSizing||"border-box",Yn(s)){const r=nn(o,"width");void 0!==r&&(o.width=r)}if(Yn(i))if(""===o.style.height)o.height=o.width/(t||2);else{const r=nn(o,"height");void 0!==r&&(o.height=r)}return o}const Xn=!!Lo&&{passive:!0};function Ba(o,t,e){o&&o.addEventListener(t,e,Xn)}function za(o,t,e){o&&o.canvas&&o.canvas.removeEventListener(t,e,Xn)}function Fa(o,t){const e=ja[o.type]||o.type,{x:i,y:s}=oi(o,t);return{type:e,chart:t,native:o,x:void 0!==i?i:null,y:void 0!==s?s:null}}function is(o,t){for(const e of o)if(e===t||e.contains(t))return!0}function Va(o,t,e){const i=o.canvas,s=new MutationObserver(r=>{let n=!1;for(const a of r)n=n||is(a.addedNodes,i),n=n&&!is(a.removedNodes,i);n&&e()});return s.observe(document,{childList:!0,subtree:!0}),s}function Ha(o,t,e){const i=o.canvas,s=new MutationObserver(r=>{let n=!1;for(const a of r)n=n||is(a.removedNodes,i),n=n&&!is(a.addedNodes,i);n&&e()});return s.observe(document,{childList:!0,subtree:!0}),s}const Di=new Map;let Gn=0;function Zn(){const o=window.devicePixelRatio;o!==Gn&&(Gn=o,Di.forEach((t,e)=>{e.currentDevicePixelRatio!==o&&t()}))}function Ua(o,t){Di.size||window.addEventListener("resize",Zn),Di.set(o,t)}function Wa(o){Di.delete(o),Di.size||window.removeEventListener("resize",Zn)}function $a(o,t,e){const i=o.canvas,s=i&&sn(i);if(!s)return;const r=rn((a,l)=>{const c=s.clientWidth;e(a,l),c<s.clientWidth&&e()},window),n=new ResizeObserver(a=>{const l=a[0],c=l.contentRect.width,h=l.contentRect.height;0===c&&0===h||r(c,h)});return n.observe(s),Ua(o,r),n}function Cs(o,t,e){e&&e.disconnect(),"resize"===t&&Wa(o)}function Ka(o,t,e){const i=o.canvas,s=rn(r=>{null!==o.ctx&&e(Fa(r,o))},o);return Ba(i,t,s),s}class Jn extends Ms{acquireContext(t,e){const i=t&&t.getContext&&t.getContext("2d");return i&&i.canvas===t?(Ia(t,e),i):null}releaseContext(t){const e=t.canvas;if(!e[es])return!1;const i=e[es].initial;["height","width"].forEach(r=>{const n=i[r];Bt(n)?e.removeAttribute(r):e.setAttribute(r,n)});const s=i.style||{};
1return Object.keys(s).forEach(r=>{e.style[r]=s[r]}),e.width=e.width,delete e[es],!0}addEventListener(t,e,i){this.removeEventListener(t,e),(t.$proxies||(t.$proxies={}))[e]=({attach:Va,detach:Ha,resize:$a}[e]||Ka)(t,e,i)}removeEventListener(t,e){const i=t.$proxies||(t.$proxies={}),s=i[e];s&&(({attach:Cs,detach:Cs,resize:Cs}[e]||za)(t,e,s),i[e]=void 0)}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,i,s){return No(t,e,i,s)}isAttached(t){const e=t&&sn(t);return!(!e||!e.isConnected)}}function Qn(o){return!on()||typeof OffscreenCanvas<"u"&&o instanceof OffscreenCanvas?Kn:Jn}class oe{static defaults={};static defaultRoutes=void 0;x;y;active=!1;options;$animations;tooltipPosition(t){const{x:e,y:i}=this.getProps(["x","y"],t);return{x:e,y:i}}hasValue(){return gi(this.x)&&gi(this.y)}getProps(t,e){const i=this.$animations;if(!e||!i)return this;const s={};return t.forEach(r=>{s[r]=i[r]&&i[r].active()?i[r]._to:this[r]}),s}}function Ya(o,t){const e=o.options.ticks,i=Xa(o),s=Math.min(e.maxTicksLimit||i,i),r=e.major.enabled?Za(t):[],n=r.length,a=r[0],l=r[n-1],c=[];if(n>s)return Ja(t,c,r,n/s),c;const h=Ga(r,t,s);if(n>0){let d,u;const p=n>1?Math.round((l-a)/(n-1)):null;for(ss(t,c,h,Bt(p)?0:a-p,a),d=0,u=n-1;d<u;d++)ss(t,c,h,r[d],r[d+1]);return ss(t,c,h,l,Bt(p)?t.length:l+p),c}return ss(t,c,h),c}function Xa(o){const t=o.options.offset,e=o._tickSize();return Math.floor(Math.min(o._length/e+(t?0:1),o._maxLength/e))}function Ga(o,t,e){const i=Qa(o),s=t.length/e;if(!i)return Math.max(s,1);const r=Oo(i);for(let n=0,a=r.length-1;n<a;n++){const l=r[n];if(l>s)return l}return Math.max(s,1)}function Za(o){const t=[];let e,i;for(e=0,i=o.length;e<i;e++)o[e].major&&t.push(e);return t}function Ja(o,t,e,i){let n,s=0,r=e[0];for(i=Math.ceil(i),n=0;n<o.length;n++)n===r&&(t.push(o[n]),s++,r=e[s*i])}function ss(o,t,e,i,s){const r=Pt(i,0),n=Math.min(Pt(s,o.length),o.length);let l,c,h,a=0;for(e=Math.ceil(e),s&&(l=s-i,e=l/Math.floor(l/e)),h=r;h<0;)a++,h=Math.round(r+a*e);for(c=Math.max(r,0);c<n;c++)c===h&&(t.push(o[c]),a++,h=Math.round(r+a*e))}function Qa(o){const t=o.length;let e,i;if(t<2)return!1;for(i=o[0],e=1;e<t;++e)if(o[e]-o[e-1]!==i)return!1;return i}const tl=o=>"left"===o?"right":"right"===o?"left":o,tr=(o,t,e)=>"top"===t||"left"===t?o[t]+e:o[t]-e,er=(o,t)=>Math.min(t||o,o);function ir(o,t){const e=[],i=o.length/t,s=o.length;let r=0;for(;r<s;r+=i)e.push(o[Math.floor(r)]);return e}function el(o,t,e){const i=o.ticks.length,s=Math.min(t,i-1),r=o._startPixel,n=o._endPixel,a=1e-6;let c,l=o.getPixelForTick(s);if(!(e&&(c=1===i?Math.max(l-r,n-l):0===t?(o.getPixelForTick(1)-l)/2:(l-o.getPixelForTick(s-1))/2,l+=s<t?c:-c,l<r-a||l>n+a)))return l}function il(o,t){Vt(o,e=>{const i=e.gc,s=i.length/2;let r;if(s>t){for(r=0;r<s;++r)delete e.data[i[r]];i.splice(0,s)}})}function Pi(o){return o.drawTicks?o.tickLength:0}function sr(o,t){if(!o.display)return 0;const e=se(o.font,t),i=he(o.padding);return(ye(o.text)?o.text.length:1)*e.lineHeight+i.height}function sl(o,t){return ri(o,{scale:t,type:"scale"})}function nl(o,t,e){return ri(o,{tick:e,index:t,type:"tick"})}function rl(o,t,e){let i=xs(o);return(e&&"right"!==t||!e&&"right"===t)&&(i=tl(i)),i}function ol(o,t,e,i){const{top:s,left:r,bottom:n,right:a,chart:l}=o,{chartArea:c,scales:h}=l;let u,p,f,d=0;const y=n-s,w=a-r;if(o.isHorizontal()){if(p=ue(i,r,a),Gt(e)){const g=Object.keys(e)[0];f=h[g].getPixelForValue(e[g])+y-t}else f="center"===e?(c.bottom+c.top)/2+y-t:tr(o,e,t);u=a-r}else{if(Gt(e)){const g=Object.keys(e)[0];p=h[g].getPixelForValue(e[g])-w+t}else p="center"===e?(c.left+c.right)/2-w+t:tr(o,e,t);f=ue(i,n,s),d="left"===e?-Le:Le}return{titleX:p,titleY:f,maxWidth:u,rotation:d}}class ti extends oe{constructor(t){super(),this.id=t.id,this.type=t.type,this.options=void 0,this.ctx=t.ctx,this.chart=t.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(t){this.options=t.setContext(this.getContext()),this.axis=t.axis,this._userMin=this.parse(t.min),this._userMax=this.parse(t.max),this._suggestedMin=this.parse(t.suggestedMin),this._suggestedMax=this.parse(t.suggestedMax)}parse(t,e){return t}getUserBounds(){let{_userMin:t,_userMax:e,_suggestedMin:i,_suggestedMax:s}=this;return t=ke(t,Number.POSITIVE_INFINITY),e=ke(e,Number.NEGATIVE_INFINITY),i=ke(i,Number.POSITIVE_INFINITY),s=ke(s,Number.NEGATIVE_INFINITY),{min:ke(t,i),max:ke(e,s),minDefined:ee(t),maxDefined:ee(e)}}getMinMax(t){let n,{min:e,max:i,minDefined:s,maxDefined:r}=this.getUserBounds();if(s&&r)return{min:e,max:i};const a=this.getMatchingVisibleMetas();for(let l=0,c=a.length;l<c;++l)n=a[l].controller.getMinMax(this,t),s||(e=Math.min(e,n.min)),r||(i=Math.max(i,n.max));return e=r&&e>i?i:e,i=s&&e>i?e:i,{min:ke(e,ke(i,e)),max:ke(i,ke(e,i))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}
vendor: 4,918 bytes, line 1
1getLabelItems(t=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(t))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){$t(this.options.beforeUpdate,[this])}update(t,e,i){const{beginAtZero:s,grace:r,ticks:n}=this.options,a=n.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=e,this._margins=i=Object.assign({left:0,right:0,top:0,bottom:0},i),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+i.left+i.right:this.height+i.top+i.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=Mo(this,r,s),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const l=a<this.ticks.length;this._convertTicksToLabels(l?ir(this.ticks,a):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),n.display&&(n.autoSkip||"auto"===n.source)&&(this.ticks=Ya(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),l&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let e,i,t=this.options.reverse;this.isHorizontal()?(e=this.left,i=this.right):(e=this.top,i=this.bottom,t=!t),this._startPixel=e,this._endPixel=i,this._reversePixels=t,this._length=i-e,this._alignToPixels=this.options.alignToPixels}afterUpdate(){$t(this.options.afterUpdate,[this])}beforeSetDimensions(){$t(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(){$t(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),$t(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){$t(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){const e=this.options.ticks;let i,s,r;for(i=0,s=t.length;i<s;i++)r=t[i],r.label=$t(e.callback,[r.value,i,t],this)}afterTickToLabelConversion(){$t(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){$t(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this.options,e=t.ticks,i=er(this.ticks.length,t.ticks.maxTicksLimit),s=e.minRotation||0,r=e.maxRotation;let a,l,c,n=s;if(!this._isVisible()||!e.display||s>=r||i<=1||!this.isHorizontal())return void(this.labelRotation=s);const h=this._getLabelSizes(),d=h.widest.width,u=h.highest.height,p=pe(this.chart.width-d,0,this.maxWidth);a=t.offset?this.maxWidth/i:p/(i-1),d+6>a&&(a=p/(i-(t.offset?.5:1)),l=this.maxHeight-Pi(t.grid)-e.padding-sr(t.title,this.chart.options.font),c=Math.sqrt(d*d+u*u),n=ys(Math.min(Math.asin(pe((h.highest.height+6)/a,-1,1)),Math.asin(pe(l/c,-1,1))-Math.asin(pe(u/c,-1,1)))),n=Math.max(s,Math.min(r,n))),this.labelRotation=n}afterCalculateLabelRotation(){$t(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){$t(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:e,options:{ticks:i,title:s,grid:r}}=this,n=this._isVisible(),a=this.isHorizontal();if(n){const l=sr(s,e.options.font);if(a?(t.width=this.maxWidth,t.height=Pi(r)+l):(t.height=this.maxHeight,t.width=Pi(r)+l),i.display&&this.ticks.length){const{first:c,last:h,widest:d,highest:u}=this._getLabelSizes(),p=2*i.padding,f=Ce(this.labelRotation),y=Math.cos(f),w=Math.sin(f);a?t.height=Math.min(this.maxHeight,t.height+(i.mirror?0:w*d.width+y*u.height)+p):t.width=Math.min(this.maxWidth,t.width+(i.mirror?0:y*d.width+w*u.height)+p),this._calculatePadding(c,h,w,y)}}this._handleMargins(),a?(this.width=this._length=e.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=e.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,e,i,s){const{ticks:{align:r,padding:n},position:a}=this.options,l=0!==this.labelRotation,c="top"!==a&&"x"===this.axis;if(this.isHorizontal()){const h=this.getPixelForTick(0)-this.left,d=this.right-this.getPixelForTick(this.ticks.length-1);let u=0,p=0;l?c?(u=s*t.width,p=i*e.height):(u=i*t.height,p=s*e.width):"start"===r?p=e.width:"end"===r?u=t.width:"inner"!==r&&(u=t.width/2,p=e.width/2),this.paddingLeft=Math.max((u-h+n)*this.width/(this.width-h),0),this.paddingRight=Math.max((p-d+n)*this.width/(this.width-d),0)}else{let h=e.height/2,d=t.height/2;
vendor: 1,312 bytes, line 1
1"start"===r?(h=0,d=t.height):"end"===r&&(h=e.height,d=0),this.paddingTop=h+n,this.paddingBottom=d+n}}_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(){$t(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:e}=this.options;return"top"===e||"bottom"===e||"x"===t}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){let e,i;for(this.beforeTickToLabelConversion(),this.generateTickLabels(t),e=0,i=t.length;e<i;e++)Bt(t[e].label)&&(t.splice(e,1),i--,e--);this.afterTickToLabelConversion()}_getLabelSizes(){let t=this._labelSizes;if(!t){const e=this.options.ticks.sampleSize;let i=this.ticks;e<i.length&&(i=ir(i,e)),this._labelSizes=t=this._computeLabelSizes(i,i.length,this.options.ticks.maxTicksLimit)}return t}_computeLabelSizes(t,e,i){const{ctx:s,_longestTextCache:r}=this,n=[],a=[],l=Math.floor(e/er(e,i));let d,u,p,f,y,w,g,_,L,M,j,c=0,h=0;for(d=0;d<e;d+=l){if(f=t[d].label,y=this._resolveTickFontOptions(d),s.font=w=y.string,g=r[w]=r[w]||{data:{},gc:[]},_=y.lineHeight,L=M=0,Bt(f)||ye(f)){if(ye(f))for(u=0,p=f.length;u<p;
vendor: 6,131 bytes, line 1
1++u)j=f[u],!Bt(j)&&!ye(j)&&(L=an(s,g.data,g.gc,L,j),M+=_)}else L=an(s,g.data,g.gc,L,f),M=_;n.push(L),a.push(M),c=Math.max(L,c),h=Math.max(M,h)}il(r,e);const H=n.indexOf(c),X=a.indexOf(h),U=A=>({width:n[A]||0,height:a[A]||0});return{first:U(0),last:U(e-1),widest:U(H),highest:U(X),widths:n,heights:a}}getLabelForValue(t){return t}getPixelForValue(t,e){return NaN}getValueForPixel(t){}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const e=this._startPixel+t*this._length;return Co(this._alignToPixels?li(this.chart,e,0):e)}getDecimalForPixel(t){const e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:e}=this;return t<0&&e<0?e:t>0&&e>0?t:0}getContext(t){const e=this.ticks||[];if(t>=0&&t<e.length){const i=e[t];return i.$context||(i.$context=nl(this.getContext(),t,i))}return this.$context||(this.$context=sl(this.chart.getContext(),this))}_tickSize(){const t=this.options.ticks,e=Ce(this.labelRotation),i=Math.abs(Math.cos(e)),s=Math.abs(Math.sin(e)),r=this._getLabelSizes(),n=t.autoSkipPadding||0,a=r?r.widest.width+n:0,l=r?r.highest.height+n:0;return this.isHorizontal()?l*i>a*s?a/i:l/s:l*s<a*i?l/i:a/s}_isVisible(){const t=this.options.display;return"auto"!==t?!!t:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){const e=this.axis,i=this.chart,s=this.options,{grid:r,position:n,border:a}=s,l=r.offset,c=this.isHorizontal(),d=this.ticks.length+(l?1:0),u=Pi(r),p=[],f=a.setContext(this.getContext()),y=f.display?f.width:0,w=y/2,g=function(ct){return li(i,ct,y)};let _,L,M,j,H,X,U,A,C,W,q,Z;if("top"===n)_=g(this.bottom),X=this.bottom-u,A=_-w,W=g(t.top)+w,Z=t.bottom;else if("bottom"===n)_=g(this.top),W=t.top,Z=g(t.bottom)-w,X=_+w,A=this.top+u;else if("left"===n)_=g(this.right),H=this.right-u,U=_-w,C=g(t.left)+w,q=t.right;else if("right"===n)_=g(this.left),C=t.left,q=g(t.right)-w,H=_+w,U=this.left+u;else if("x"===e){if("center"===n)_=g((t.top+t.bottom)/2+.5);else if(Gt(n)){const ct=Object.keys(n)[0];_=g(this.chart.scales[ct].getPixelForValue(n[ct]))}W=t.top,Z=t.bottom,X=_+w,A=X+u}else if("y"===e){if("center"===n)_=g((t.left+t.right)/2);else if(Gt(n)){const ct=Object.keys(n)[0];_=g(this.chart.scales[ct].getPixelForValue(n[ct]))}H=_-w,U=H-u,C=t.left,q=t.right}const at=Pt(s.ticks.maxTicksLimit,d),nt=Math.max(1,Math.ceil(d/at));for(L=0;L<d;L+=nt){const ct=this.getContext(L),pt=r.setContext(ct),st=a.setContext(ct),J=pt.lineWidth,lt=pt.color,P=st.dash||[],m=st.dashOffset,x=pt.tickWidth,b=pt.tickColor,B=pt.tickBorderDash||[],E=pt.tickBorderDashOffset;M=el(this,L,l),void 0!==M&&(j=li(i,M,J),c?H=U=C=q=j:X=A=W=Z=j,p.push({tx1:H,ty1:X,tx2:U,ty2:A,x1:C,y1:W,x2:q,y2:Z,width:J,color:lt,borderDash:P,borderDashOffset:m,tickWidth:x,tickColor:b,tickBorderDash:B,tickBorderDashOffset:E}))}return this._ticksLength=d,this._borderValue=_,p}_computeLabelItems(t){const e=this.axis,i=this.options,{position:s,ticks:r}=i,n=this.isHorizontal(),a=this.ticks,{align:l,crossAlign:c,padding:h,mirror:d}=r,u=Pi(i.grid),p=u+h,f=d?-h:p,y=-Ce(this.labelRotation),w=[];let g,_,L,M,j,H,X,U,A,C,W,q,Z="middle";if("top"===s)H=this.bottom-f,X=this._getXAxisLabelAlignment();else if("bottom"===s)H=this.top+f,X=this._getXAxisLabelAlignment();else if("left"===s){const nt=this._getYAxisLabelAlignment(u);X=nt.textAlign,j=nt.x}else if("right"===s){const nt=this._getYAxisLabelAlignment(u);X=nt.textAlign,j=nt.x}else if("x"===e){if("center"===s)H=(t.top+t.bottom)/2+p;else if(Gt(s)){const nt=Object.keys(s)[0];H=this.chart.scales[nt].getPixelForValue(s[nt])+p}X=this._getXAxisLabelAlignment()}else if("y"===e){if("center"===s)j=(t.left+t.right)/2-p;else if(Gt(s)){const nt=Object.keys(s)[0];j=this.chart.scales[nt].getPixelForValue(s[nt])}X=this._getYAxisLabelAlignment(u).textAlign}"y"===e&&("start"===l?Z="top":"end"===l&&(Z="bottom"));const at=this._getLabelSizes();for(g=0,_=a.length;g<_;++g){L=a[g],M=L.label;const nt=r.setContext(this.getContext(g));U=this.getPixelForTick(g)+r.labelOffset,A=this._resolveTickFontOptions(g),C=A.lineHeight,W=ye(M)?M.length:1;const ct=W/2,pt=nt.color,st=nt.textStrokeColor,J=nt.textStrokeWidth;let P,lt=X;if(n?(j=U,"inner"===X&&(lt=g===_-1?this.options.reverse?"left":"right":0===g?this.options.reverse?"right":"left":"center"),q="top"===s?"near"===c||0!==y?-W*C+C/2:"center"===c?-at.highest.height/2-ct*C+C:C/2-at.highest.height:"near"===c||0!==y?C/2:"center"===c?at.highest.height/2-ct*C:at.highest.height-W*C,d&&(q*=-1),0!==y&&!nt.showLabelBackdrop&&(j+=C/2*Math.sin(y))):(H=U,q=(1-W)*C/2),nt.showLabelBackdrop){const m=he(nt.backdropPadding),x=at.heights[g],b=at.widths[g];let B=q-m.top,E=0-m.left;switch(Z){case"middle":B-=x/2;break;case"bottom":B-=x}switch(X){case"center":E-=b/2;break;case"right":E-=b;break;case"inner":g===_-1?E-=b:g>0&&(E-=b/2)}P={left:E,top:B,width:b+m.width,height:x+m.height,color:nt.backdropColor}}w.push({label:M,font:A,textOffset:q,options:{rotation:y,color:pt,strokeColor:st,strokeWidth:J,textAlign:lt,textBaseline:Z,translation:[j,H],backdrop:P}})}return w}_getXAxisLabelAlignment(){const{position:t,ticks:e}=this.options;if(-Ce(this.labelRotation))return"top"===t?"left":"right";let s="center";return"start"===e.align?s="left":"end"===e.align?s="right":"inner"===e.align&&(s="inner"),s}_getYAxisLabelAlignment(t){const{position:e,ticks:{crossAlign:i,mirror:s,padding:r}}=this.options,a=t+r,l=this._getLabelSizes().widest.width;let c,h;return"left"===e?s?(h=this.right+r,"near"===i?c="left":"center"===i?(c="center",h+=l/2):(c="right",h+=l)):(h=this.right-a,"near"===i?c="right":"center"===i?(c="center",h-=l/2):(c="left",h=this.left)):"right"===e?s?(h=this.left+r,"near"===i?c="right":"center"===i?(c="center",h-=l/2):(c="left",h-=l)):(h=this.left+a,"near"===i?c="left":"center"===i?(c="center",h+=l/2):(c="right",h=this.right)):c="right",{textAlign:c,x:h}}_computeLabelArea(){if(this.options.ticks.mirror)return;const t=this.chart,e=this.options.position;return"left"===e||"right"===e?{top:0,left:this.left,bottom:t.height,right:this.right}
vendor: 4,849 bytes, line 1
1:"top"===e||"bottom"===e?{top:this.top,left:0,bottom:this.bottom,right:t.width}:void 0}drawBackground(){const{ctx:t,options:{backgroundColor:e},left:i,top:s,width:r,height:n}=this;e&&(t.save(),t.fillStyle=e,t.fillRect(i,s,r,n),t.restore())}getLineWidthForValue(t){const e=this.options.grid;if(!this._isVisible()||!e.display)return 0;const s=this.ticks.findIndex(r=>r.value===t);return s>=0?e.setContext(this.getContext(s)).lineWidth:0}drawGrid(t){const e=this.options.grid,i=this.ctx,s=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let r,n;const a=(l,c,h)=>{!h.width||!h.color||(i.save(),i.lineWidth=h.width,i.strokeStyle=h.color,i.setLineDash(h.borderDash||[]),i.lineDashOffset=h.borderDashOffset,i.beginPath(),i.moveTo(l.x,l.y),i.lineTo(c.x,c.y),i.stroke(),i.restore())};if(e.display)for(r=0,n=s.length;r<n;++r){const l=s[r];e.drawOnChartArea&&a({x:l.x1,y:l.y1},{x:l.x2,y:l.y2},l),e.drawTicks&&a({x:l.tx1,y:l.ty1},{x:l.tx2,y:l.ty2},{color:l.tickColor,width:l.tickWidth,borderDash:l.tickBorderDash,borderDashOffset:l.tickBorderDashOffset})}}drawBorder(){const{chart:t,ctx:e,options:{border:i,grid:s}}=this,r=i.setContext(this.getContext()),n=i.display?r.width:0;if(!n)return;const a=s.setContext(this.getContext(0)).lineWidth,l=this._borderValue;let c,h,d,u;this.isHorizontal()?(c=li(t,this.left,n)-n/2,h=li(t,this.right,a)+a/2,d=u=l):(d=li(t,this.top,n)-n/2,u=li(t,this.bottom,a)+a/2,c=h=l),e.save(),e.lineWidth=r.width,e.strokeStyle=r.color,e.beginPath(),e.moveTo(c,d),e.lineTo(h,u),e.stroke(),e.restore()}drawLabels(t){if(!this.options.ticks.display)return;const i=this.ctx,s=this._computeLabelArea();s&&Ki(i,s);const r=this.getLabelItems(t);for(const n of r)ci(i,n.label,0,n.textOffset,n.font,n.options);s&&Yi(i)}drawTitle(){const{ctx:t,options:{position:e,title:i,reverse:s}}=this;if(!i.display)return;const r=se(i.font),n=he(i.padding),a=i.align;let l=r.lineHeight/2;"bottom"===e||"center"===e||Gt(e)?(l+=n.bottom,ye(i.text)&&(l+=r.lineHeight*(i.text.length-1))):l+=n.top;const{titleX:c,titleY:h,maxWidth:d,rotation:u}=ol(this,l,e,a);ci(t,i.text,0,0,r,{color:i.color,maxWidth:d,rotation:u,textAlign:rl(a,e,s),textBaseline:"middle",translation:[c,h]})}draw(t){this._isVisible()&&(this.drawBackground(),this.drawGrid(t),this.drawBorder(),this.drawTitle(),this.drawLabels(t))}_layers(){const t=this.options,e=t.ticks&&t.ticks.z||0,i=Pt(t.grid&&t.grid.z,-1),s=Pt(t.border&&t.border.z,0);return this._isVisible()&&this.draw===ti.prototype.draw?[{z:i,draw:r=>{this.drawBackground(),this.drawGrid(r),this.drawTitle()}},{z:s,draw:()=>{this.drawBorder()}},{z:e,draw:r=>{this.drawLabels(r)}}]:[{z:e,draw:r=>{this.draw(r)}}]}getMatchingVisibleMetas(t){const e=this.chart.getSortedVisibleDatasetMetas(),i=this.axis+"AxisID",s=[];let r,n;for(r=0,n=e.length;r<n;++r){const a=e[r];a[i]===this.id&&(!t||a.type===t)&&s.push(a)}return s}_resolveTickFontOptions(t){const e=this.options.ticks.setContext(this.getContext(t));return se(e.font)}_maxDigits(){const t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}}class ns{constructor(t,e,i){this.type=t,this.scope=e,this.override=i,this.items=Object.create(null)}isForType(t){return Object.prototype.isPrototypeOf.call(this.type.prototype,t.prototype)}register(t){const e=Object.getPrototypeOf(t);let i;cl(e)&&(i=this.register(e));const s=this.items,r=t.id,n=this.scope+"."+r;if(!r)throw new Error("class does not have id: "+t);return r in s||(s[r]=t,al(t,n,i),this.override&&Xt.override(t.id,t.overrides)),n}get(t){return this.items[t]}unregister(t){const e=this.items,i=t.id,s=this.scope;i in e&&delete e[i],s&&i in Xt[s]&&(delete Xt[s][i],this.override&&delete mi[i])}}function al(o,t,e){const i=To(Object.create(null),[e?Xt.get(e):{},Xt.get(t),o.defaults]);Xt.set(t,i),o.defaultRoutes&&ll(t,o.defaultRoutes),o.descriptors&&Xt.describe(t,o.descriptors)}function ll(o,t){Object.keys(t).forEach(e=>{const i=e.split("."),s=i.pop(),r=[o].concat(i).join("."),n=t[e].split("."),a=n.pop(),l=n.join(".");Xt.route(r,s,l,a)})}function cl(o){return"id"in o&&"defaults"in o}class hl{constructor(){this.controllers=new ns(Ve,"datasets",!0),this.elements=new ns(oe,"elements"),this.plugins=new ns(Object,"plugins"),this.scales=new ns(ti,"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")}
1removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,e,i){[...e].forEach(s=>{const r=i||this._getRegistryForType(s);i||r.isForType(s)||r===this.plugins&&s.id?this._exec(t,r,s):Vt(s,n=>{const a=i||this._getRegistryForType(n);this._exec(t,a,n)})})}_exec(t,e,i){const s=Do(t);$t(i["before"+s],[],i),e[t](i),$t(i["after"+s],[],i)}_getRegistryForType(t){for(let e=0;e<this._typedRegistries.length;e++){const i=this._typedRegistries[e];if(i.isForType(t))return i}return this.plugins}_get(t,e,i){const s=e.get(t);if(void 0===s)throw new Error('"'+t+'" is not a registered '+i+".");return s}}var Te=new hl;class ul{constructor(){this._init=void 0}notify(t,e,i,s){if("beforeInit"===e&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install")),void 0===this._init)return;const r=s?this._descriptors(t).filter(s):this._descriptors(t),n=this._notify(r,t,e,i);return"afterDestroy"===e&&(this._notify(r,t,"stop"),this._notify(this._init,t,"uninstall"),this._init=void 0),n}_notify(t,e,i,s){s=s||{};for(const r of t){const n=r.plugin;if(!1===$t(n[i],[e,s,r.options],n)&&s.cancelable)return!1}return!0}invalidate(){Bt(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(t){if(this._cache)return this._cache;const e=this._cache=this._createDescriptors(t);return this._notifyStateChanges(t),e}_createDescriptors(t,e){const i=t&&t.config,s=Pt(i.options&&i.options.plugins,{}),r=dl(i);return!1!==s||e?pl(t,r,s,e):[]}_notifyStateChanges(t){const e=this._oldCache||[],i=this._cache,s=(r,n)=>r.filter(a=>!n.some(l=>a.plugin.id===l.plugin.id));this._notify(s(e,i),t,"stop"),this._notify(s(i,e),t,"start")}}function dl(o){const t={},e=[],i=Object.keys(Te.plugins.items);for(let r=0;r<i.length;r++)e.push(Te.getPlugin(i[r]));const s=o.plugins||[];for(let r=0;r<s.length;r++){const n=s[r];-1===e.indexOf(n)&&(e.push(n),t[n.id]=!0)}return{plugins:e,localIds:t}}function fl(o,t){return t||!1!==o?!0===o?{}:o:null}function pl(o,{plugins:t,localIds:e},i,s){const r=[],n=o.getContext();for(const a of t){const l=a.id,c=fl(i[l],s);null!==c&&r.push({plugin:a,options:gl(o.config,{plugin:a,local:e[l]},c,n)})}return r}function gl(o,{plugin:t,local:e},i,s){const r=o.pluginScopeKeys(t),n=o.getOptionScopes(i,r);return e&&t.defaults&&n.push(t.defaults),o.createResolver(n,s,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function Ts(o,t){return((t.datasets||{})[o]||{}).indexAxis||t.indexAxis||(Xt.datasets[o]||{}).indexAxis||"x"}function ml(o,t){let e=o;return"_index_"===o?e=t:"_value_"===o&&(e="x"===t?"y":"x"),e}function bl(o,t){return o===t?"_index_":"_value_"}function nr(o){if("x"===o||"y"===o||"r"===o)return o}function yl(o){return"top"===o||"bottom"===o?"x":"left"===o||"right"===o?"y":void 0}function Ds(o,...t){if(nr(o))return o;for(const e of t){const i=e.axis||yl(e.position)||o.length>1&&nr(o[0].toLowerCase());if(i)return i}throw new Error(`Cannot determine type of '${o}' axis. Please provide 'axis' or 'position' option.`)}function rr(o,t,e){if(e[t+"AxisID"]===o)return{axis:t}}function xl(o,t){if(t.data&&t.data.datasets){const e=t.data.datasets.filter(i=>i.xAxisID===o||i.yAxisID===o);if(e.length)return rr(o,"x",e[0])||rr(o,"y",e[0])}return{}}function vl(o,t){const e=mi[o.type]||{scales:{}},i=t.scales||{},s=Ts(o.type,t),r=Object.create(null);
vendor: 3,019 bytes, line 1
1return Object.keys(i).forEach(n=>{const a=i[n];if(!Gt(a))return console.error(`Invalid scale configuration for scale: ${n}`);if(a._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${n}`);const l=Ds(n,a,xl(n,o),Xt.scales[a.type]),c=bl(l,s),h=e.scales||{};r[n]=Gi(Object.create(null),[{axis:l},a,h[l],h[c]])}),o.data.datasets.forEach(n=>{const a=n.type||o.type,l=n.indexAxis||Ts(a,t),h=(mi[a]||{}).scales||{};Object.keys(h).forEach(d=>{const u=ml(d,l),p=n[u+"AxisID"]||u;r[p]=r[p]||Object.create(null),Gi(r[p],[{axis:u},i[p],h[d]])})}),Object.keys(r).forEach(n=>{const a=r[n];Gi(a,[Xt.scales[a.type],Xt.scale])}),r}function or(o){const t=o.options||(o.options={});t.plugins=Pt(t.plugins,{}),t.scales=vl(o,t)}function ar(o){return(o=o||{}).datasets=o.datasets||[],o.labels=o.labels||[],o}function _l(o){return(o=o||{}).data=ar(o.data),or(o),o}const lr=new Map,cr=new Set;function rs(o,t){let e=lr.get(o);return e||(e=t(),lr.set(o,e),cr.add(e)),e}const Ri=(o,t,e)=>{const i=pi(t,e);void 0!==i&&o.add(i)};class Al{constructor(t){this._config=_l(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=ar(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){const t=this._config;this.clearCache(),or(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return rs(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,e){return rs(`${t}.transition.${e}`,()=>[[`datasets.${t}.transitions.${e}`,`transitions.${e}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,e){return rs(`${t}-${e}`,()=>[[`datasets.${t}.elements.${e}`,`datasets.${t}`,`elements.${e}`,""]])}pluginScopeKeys(t){const e=t.id;return rs(`${this.type}-plugin-${e}`,()=>[[`plugins.${e}`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,e){const i=this._scopeCache;let s=i.get(t);return(!s||e)&&(s=new Map,i.set(t,s)),s}getOptionScopes(t,e,i){const{options:s,type:r}=this,n=this._cachedScopes(t,i),a=n.get(e);if(a)return a;const l=new Set;e.forEach(h=>{t&&(l.add(t),h.forEach(d=>Ri(l,t,d))),h.forEach(d=>Ri(l,s,d)),h.forEach(d=>Ri(l,mi[r]||{},d)),h.forEach(d=>Ri(l,Xt,d)),h.forEach(d=>Ri(l,ln,d))});const c=Array.from(l);return 0===c.length&&c.push(Object.create(null)),cr.has(e)&&n.set(e,c),c}chartOptionScopes(){const{options:t,type:e}=this;return[t,mi[e]||{},Xt.datasets[e]||{},{type:e},Xt,ln]}resolveNamedOptions(t,e,i,s=[""]){const r={$shared:!0},{resolver:n,subPrefixes:a}=hr(this._resolverCache,t,s);let l=n;if(kl(n,e)){r.$shared=!1,i=Xi(i)?i():i;const c=this.createResolver(t,i,a);l=cn(n,i,c)}for(const c of e)r[c]=l[c];return r}createResolver(t,e,i=[""],s){const{resolver:r}=hr(this._resolverCache,t,i);return Gt(e)?cn(r,e,void 0,s):r}}function hr(o,t,e){let i=o.get(t);i||(i=new Map,o.set(t,i));const s=e.join();let r=i.get(s);
1return r||(r={resolver:Po(t,e),subPrefixes:e.filter(a=>!a.toLowerCase().includes("hover"))},i.set(s,r)),r}const wl=o=>Gt(o)&&Object.getOwnPropertyNames(o).some(t=>Xi(o[t]));function kl(o,t){const{isScriptable:e,isIndexable:i}=Ro(o);for(const s of t){const r=e(s),n=i(s),a=(n||r)&&o[s];if(r&&(Xi(a)||wl(a))||n&&ye(a))return!0}return!1}var Sl="4.5.1";const El=["top","bottom","left","right","chartArea"];function ur(o,t){return"top"===o||"bottom"===o||-1===El.indexOf(o)&&"x"===t}function dr(o,t){return function(e,i){return e[o]===i[o]?e[t]-i[t]:e[o]-i[o]}}function fr(o){const t=o.chart,e=t.options.animation;t.notifyPlugins("afterRender"),$t(e&&e.onComplete,[o],t)}function Nl(o){const t=o.chart,e=t.options.animation;$t(e&&e.onProgress,[o],t)}function pr(o){return on()&&"string"==typeof o?o=document.getElementById(o):o&&o.length&&(o=o[0]),o&&o.canvas&&(o=o.canvas),o}const os={},gr=o=>{const t=pr(o);return Object.values(os).filter(e=>e.canvas===t).pop()};function Ll(o,t,e){const i=Object.keys(o);for(const s of i){const r=+s;if(r>=t){const n=o[s];delete o[s],(e>0||r>t)&&(o[r+e]=n)}}}function Ol(o,t,e,i){return e&&"mouseout"!==o.type?i?t:o:null}class mr{static defaults=Xt;static instances=os;static overrides=mi;static registry=Te;static version=Sl;static getChart=gr;static register(...t){Te.add(...t),br()}static unregister(...t){Te.remove(...t),br()}constructor(t,e){const i=this.config=new Al(e),s=pr(t),r=gr(s);if(r)throw new Error("Canvas is already in use. Chart with ID '"+r.id+"' must be destroyed before the canvas with ID '"+r.canvas.id+"' can be reused.");const n=i.createResolver(i.chartOptionScopes(),this.getContext());this.platform=new(i.platform||Qn(s)),this.platform.updateConfig(i);const a=this.platform.acquireContext(s,n.aspectRatio),l=a&&a.canvas,c=l&&l.height,h=l&&l.width;this.id=qo(),this.ctx=a,this.canvas=l,this.width=h,this.height=c,this._options=n,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 ul,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=jo(d=>this.update(d),n.resizeDelay||0),this._dataChanges=[],os[this.id]=this,a&&l?(qe.listen(this,"complete",fr),qe.listen(this,"progress",Nl),this._initialize(),this.attached&&this.update()):console.error("Failed to create chart: can't acquire context from the given item")}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:e},width:i,height:s,_aspectRatio:r}=this;return Bt(t)?e&&r?r:s?i/s:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}get registry(){return Te}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():hn(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return un(this.canvas,this.ctx),this}stop(){return qe.stop(this),this}resize(t,e){qe.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}_resize(t,e){const i=this.options,n=this.platform.getMaximumSize(this.canvas,t,e,i.maintainAspectRatio&&this.aspectRatio),a=i.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=n.width,this.height=n.height,this._aspectRatio=this.aspectRatio,hn(this,a,!0)&&(this.notifyPlugins("resize",{size:n}),$t(i.onResize,[this,n],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){Vt(this.options.scales||{},(i,s)=>{i.id=s})}buildOrUpdateScales(){const t=this.options,e=t.scales,i=this.scales,s=Object.keys(i).reduce((n,a)=>(n[a]=!1,n),{});let r=[];e&&(r=r.concat(Object.keys(e).map(n=>{const a=e[n],l=Ds(n,a),c="r"===l,h="x"===l;return{options:a,dposition:c?"chartArea":h?"bottom":"left",dtype:c?"radialLinear":h?"category":"linear"}}))),Vt(r,n=>{const a=n.options,l=a.id,c=Ds(l,a),h=Pt(a.type,n.dtype);(void 0===a.position||ur(a.position,c)!==ur(n.dposition))&&(a.position=n.dposition),s[l]=!0;let d=null;l in i&&i[l].type===h?d=i[l]:(d=new(Te.getScale(h))({id:l,type:h,ctx:this.ctx,
vendor: 5,930 bytes, line 1
1chart:this}),i[d.id]=d),d.init(a,t)}),Vt(s,(n,a)=>{n||delete i[a]}),Vt(i,n=>{le.configure(this,n,n.options),le.addBox(this,n)})}_updateMetasets(){const t=this._metasets,e=this.data.datasets.length,i=t.length;if(t.sort((s,r)=>s.index-r.index),i>e){for(let s=e;s<i;++s)this._destroyDatasetMeta(s);t.splice(e,i-e)}this._sortedMetasets=t.slice(0).sort(dr("order","index"))}_removeUnreferencedMetasets(){const{_metasets:t,data:{datasets:e}}=this;t.length>e.length&&delete this._stacks,t.forEach((i,s)=>{0===e.filter(r=>r===i._dataset).length&&this._destroyDatasetMeta(s)})}buildOrUpdateControllers(){const t=[],e=this.data.datasets;let i,s;for(this._removeUnreferencedMetasets(),i=0,s=e.length;i<s;i++){const r=e[i];let n=this.getDatasetMeta(i);const a=r.type||this.config.type;if(n.type&&n.type!==a&&(this._destroyDatasetMeta(i),n=this.getDatasetMeta(i)),n.type=a,n.indexAxis=r.indexAxis||Ts(a,this.options),n.order=r.order||0,n.index=i,n.label=""+r.label,n.visible=this.isDatasetVisible(i),n.controller)n.controller.updateIndex(i),n.controller.linkScales();else{const l=Te.getController(a),{datasetElementType:c,dataElementType:h}=Xt.datasets[a];Object.assign(l,{dataElementType:Te.getElement(h),datasetElementType:c&&Te.getElement(c)}),n.controller=new l(this,i),t.push(n.controller)}}return this._updateMetasets(),t}_resetElements(){Vt(this.data.datasets,(t,e)=>{this.getDatasetMeta(e).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const e=this.config;e.update();const i=this._options=e.createResolver(e.chartOptionScopes(),this.getContext()),s=this._animationsDisabled=!i.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),!1===this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0}))return;const r=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let n=0;for(let c=0,h=this.data.datasets.length;c<h;c++){const{controller:d}=this.getDatasetMeta(c),u=!s&&-1===r.indexOf(d);d.buildOrUpdateElements(u),n=Math.max(+d.getMaxOverflow(),n)}n=this._minPadding=i.layout.autoPadding?n:0,this._updateLayout(n),s||Vt(r,c=>{c.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(dr("z","_idx"));const{_active:a,_lastEvent:l}=this;l?this._eventHandler(l,!0):a.length&&this._updateHoverStyles(a,a,!0),this.render()}_updateScales(){Vt(this.scales,t=>{le.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,e=new Set(Object.keys(this._listeners)),i=new Set(t.events);(!dn(e,i)||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,e=this._getUniformDataChanges()||[];for(const{method:i,start:s,count:r}of e)Ll(t,s,"_removeElements"===i?-r:r)}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const e=this.data.datasets.length,i=r=>new Set(t.filter(n=>n[0]===r).map((n,a)=>a+","+n.splice(1).join(","))),s=i(0);for(let r=1;r<e;r++)if(!dn(s,i(r)))return;return Array.from(s).map(r=>r.split(",")).map(r=>({method:r[1],start:+r[2],count:+r[3]}))}_updateLayout(t){if(!1===this.notifyPlugins("beforeLayout",{cancelable:!0}))return;le.update(this,this.width,this.height,t);const e=this.chartArea,i=e.width<=0||e.height<=0;this._layers=[],Vt(this.boxes,s=>{i&&"chartArea"===s.position||(s.configure&&s.configure(),this._layers.push(...s._layers()))},this),this._layers.forEach((s,r)=>{s._idx=r}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(!1!==this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})){for(let e=0,i=this.data.datasets.length;e<i;++e)this.getDatasetMeta(e).controller.configure();for(let e=0,i=this.data.datasets.length;e<i;++e)this._updateDataset(e,Xi(t)?t({datasetIndex:e}):t);this.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,e){const i=this.getDatasetMeta(t),s={meta:i,index:t,mode:e,cancelable:!0};!1!==this.notifyPlugins("beforeDatasetUpdate",s)&&(i.controller._update(e),s.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",s))}render(){!1!==this.notifyPlugins("beforeRender",{cancelable:!0})&&(qe.has(this)?this.attached&&!qe.running(this)&&qe.start(this):(this.draw(),fr({chart:this})))}draw(){let t;if(this._resizeBeforeDraw){const{width:i,height:s}=this._resizeBeforeDraw;this._resizeBeforeDraw=null,this._resize(i,s)}if(this.clear(),this.width<=0||this.height<=0||!1===this.notifyPlugins("beforeDraw",{cancelable:!0}))return;const e=this._layers;for(t=0;t<e.length&&e[t].z<=0;++t)e[t].draw(this.chartArea);for(this._drawDatasets();t<e.length;++t)e[t].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(t){const e=this._sortedMetasets,i=[];let s,r;for(s=0,r=e.length;s<r;++s){const n=e[s];(!t||n.visible)&&i.push(n)}return i}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(!1===this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0}))return;const t=this.getSortedVisibleDatasetMetas();for(let e=t.length-1;e>=0;--e)this._drawDataset(t[e]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const e=this.ctx,i={meta:t,index:t.index,cancelable:!0},s=fn(this,t);!1!==this.notifyPlugins("beforeDatasetDraw",i)&&(s&&Ki(e,s),t.controller.draw(),s&&Yi(e),i.cancelable=!1,this.notifyPlugins("afterDatasetDraw",i))}isPointInArea(t){return ai(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,e,i,s){const r=Fn.modes[e];return"function"==typeof r?r(this,t,i,s):[]}getDatasetMeta(t){const e=this.data.datasets[t],i=this._metasets;let s=i.filter(r=>r&&r._dataset===e).pop();return s||(s={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e&&e.order||0,index:t,_dataset:e,_parsed:[],_sorted:!1},i.push(s)),s}getContext(){return this.$context||(this.$context=ri(null,{chart:this,type:"chart"}))}
vendor: 4,936 bytes, line 1
1getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const e=this.data.datasets[t];if(!e)return!1;const i=this.getDatasetMeta(t);return"boolean"==typeof i.hidden?!i.hidden:!e.hidden}setDatasetVisibility(t,e){this.getDatasetMeta(t).hidden=!e}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,e,i){const s=i?"show":"hide",r=this.getDatasetMeta(t),n=r.controller._resolveAnimations(void 0,s);ki(e)?(r.data[e].hidden=!i,this.update()):(this.setDatasetVisibility(t,i),n.update(r,{visible:i}),this.update(a=>a.datasetIndex===t?s:void 0))}hide(t,e){this._updateVisibility(t,e,!1)}show(t,e){this._updateVisibility(t,e,!0)}_destroyDatasetMeta(t){const e=this._metasets[t];e&&e.controller&&e.controller._destroy(),delete this._metasets[t]}_stop(){let t,e;for(this.stop(),qe.remove(this),t=0,e=this.data.datasets.length;t<e;++t)this._destroyDatasetMeta(t)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:t,ctx:e}=this;this._stop(),this.config.clearCache(),t&&(this.unbindEvents(),un(t,e),this.platform.releaseContext(e),this.canvas=null,this.ctx=null),delete os[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...t){return this.canvas.toDataURL(...t)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const t=this._listeners,e=this.platform,i=(r,n)=>{e.addEventListener(this,r,n),t[r]=n},s=(r,n,a)=>{r.offsetX=n,r.offsetY=a,this._eventHandler(r)};Vt(this.options.events,r=>i(r,s))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,e=this.platform,i=(l,c)=>{e.addEventListener(this,l,c),t[l]=c},s=(l,c)=>{t[l]&&(e.removeEventListener(this,l,c),delete t[l])},r=(l,c)=>{this.canvas&&this.resize(l,c)};let n;const a=()=>{s("attach",a),this.attached=!0,this.resize(),i("resize",r),i("detach",n)};n=()=>{this.attached=!1,s("resize",r),this._stop(),this._resize(0,0),i("attach",a)},e.isAttached(this.canvas)?a():n()}unbindEvents(){Vt(this._listeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._listeners={},Vt(this._responsiveListeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,e,i){const s=i?"set":"remove";let r,n,a,l;for("dataset"===e&&(r=this.getDatasetMeta(t[0].datasetIndex),r.controller["_"+s+"DatasetHoverStyle"]()),a=0,l=t.length;a<l;++a){n=t[a];const c=n&&this.getDatasetMeta(n.datasetIndex).controller;c&&c[s+"HoverStyle"](n.element,n.datasetIndex,n.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){const e=this._active||[],i=t.map(({datasetIndex:r,index:n})=>{const a=this.getDatasetMeta(r);if(!a)throw new Error("No dataset found at index "+r);return{datasetIndex:r,element:a.data[n],index:n}});!Zi(i,e)&&(this._active=i,this._lastEvent=null,this._updateHoverStyles(i,e))}notifyPlugins(t,e,i){return this._plugins.notify(this,t,e,i)}isPluginEnabled(t){return 1===this._plugins._cache.filter(e=>e.plugin.id===t).length}_updateHoverStyles(t,e,i){const s=this.options.hover,r=(l,c)=>l.filter(h=>!c.some(d=>h.datasetIndex===d.datasetIndex&&h.index===d.index)),n=r(e,t),a=i?t:r(t,e);n.length&&this.updateHoverStyle(n,s.mode,!1),a.length&&s.mode&&this.updateHoverStyle(a,s.mode,!0)}_eventHandler(t,e){const i={event:t,replay:e,cancelable:!0,inChartArea:this.isPointInArea(t)},s=n=>(n.options.events||this.options.events).includes(t.native.type);if(!1===this.notifyPlugins("beforeEvent",i,s))return;const r=this._handleEvent(t,e,i.inChartArea);return i.cancelable=!1,this.notifyPlugins("afterEvent",i,s),(r||i.changed)&&this.render(),this}_handleEvent(t,e,i){const{_active:s=[],options:r}=this,a=this._getActiveElements(t,s,i,e),l=Io(t),c=Ol(t,this._lastEvent,i,l);i&&(this._lastEvent=null,$t(r.onHover,[t,a,this],this),l&&$t(r.onClick,[t,a,this],this));const h=!Zi(a,s);return(h||e)&&(this._active=a,this._updateHoverStyles(a,s,e)),this._lastEvent=c,h}_getActiveElements(t,e,i,s){if("mouseout"===t.type)return[];if(!i)return e;const r=this.options.hover;return this.getElementsAtEventForMode(t,r.mode,r,s)}}function br(){return Vt(mr.instances,o=>o._plugins.invalidate())}function Ml(o,t,e){const{startAngle:i,x:s,y:r,outerRadius:n,innerRadius:a,options:l}=t,{borderWidth:c,borderJoinStyle:h}=l,d=Math.min(c/n,Ze(i-e));if(o.beginPath(),o.arc(s,r,n-c/2,i+d/2,e-d/2),a>0){const u=Math.min(c/a,Ze(i-e));o.arc(s,r,a+c/2,e-u/2,i+u/2,!0)}else{const u=Math.min(c/2,n*Ze(i-e));if("round"===h)o.arc(s,r,u,e-ce/2,i+ce/2,!0);else if("bevel"===h){const p=2*u*u,f=-p*Math.cos(e+ce/2)+s,y=-p*Math.sin(e+ce/2)+r,w=p*Math.cos(i+ce/2)+s,g=p*Math.sin(i+ce/2)+r;o.lineTo(f,y),o.lineTo(w,g)}}o.closePath(),o.moveTo(0,0),o.rect(0,0,o.canvas.width,o.canvas.height),o.clip("evenodd")}function Cl(o,t,e){const{startAngle:i,pixelMargin:s,x:r,y:n,outerRadius:a,innerRadius:l}=t;
vendor: 4,102 bytes, line 1
1let c=s/a;o.beginPath(),o.arc(r,n,a,i-c,e+c),l>s?(c=s/l,o.arc(r,n,l,e+c,i-c,!0)):o.arc(r,n,s,e+Le,i-Le),o.closePath(),o.clip()}function Tl(o){return Bo(o,["outerStart","outerEnd","innerStart","innerEnd"])}function Dl(o,t,e,i){const s=Tl(o.options.borderRadius),r=(e-t)/2,n=Math.min(r,i*t/2),a=l=>{const c=(e-Math.min(r,l))*i/2;return pe(l,0,Math.min(r,c))};return{outerStart:a(s.outerStart),outerEnd:a(s.outerEnd),innerStart:pe(s.innerStart,0,n),innerEnd:pe(s.innerEnd,0,n)}}function yi(o,t,e,i){return{x:e+o*Math.cos(t),y:i+o*Math.sin(t)}}function as(o,t,e,i,s,r){const{x:n,y:a,startAngle:l,pixelMargin:c,innerRadius:h}=t,d=Math.max(t.outerRadius+i+e-c,0),u=h>0?h+i+e+c:0;let p=0;const f=s-l;if(i){const pt=((h>0?h-i:0)+(d>0?d-i:0))/2;p=(f-(0!==pt?f*pt/(pt+i):f))/2}const w=(f-Math.max(.001,f*d-e/ce)/d)/2,g=l+w+p,_=s-w-p,{outerStart:L,outerEnd:M,innerStart:j,innerEnd:H}=Dl(t,u,d,_-g),X=d-L,U=d-M,A=g+L/X,C=_-M/U,W=u+j,q=u+H,Z=g+j/W,at=_-H/q;if(o.beginPath(),r){const nt=(A+C)/2;if(o.arc(n,a,d,A,nt),o.arc(n,a,d,nt,C),M>0){const J=yi(U,C,n,a);o.arc(J.x,J.y,M,C,_+Le)}const ct=yi(q,_,n,a);if(o.lineTo(ct.x,ct.y),H>0){const J=yi(q,at,n,a);o.arc(J.x,J.y,H,_+Le,at+Math.PI)}const pt=(_-H/u+(g+j/u))/2;if(o.arc(n,a,u,_-H/u,pt,!0),o.arc(n,a,u,pt,g+j/u,!0),j>0){const J=yi(W,Z,n,a);o.arc(J.x,J.y,j,Z+Math.PI,g-Le)}const st=yi(X,g,n,a);if(o.lineTo(st.x,st.y),L>0){const J=yi(X,A,n,a);o.arc(J.x,J.y,L,g-Le,A)}}else{o.moveTo(n,a);const nt=Math.cos(A)*d+n,ct=Math.sin(A)*d+a;o.lineTo(nt,ct);const pt=Math.cos(C)*d+n,st=Math.sin(C)*d+a;o.lineTo(pt,st)}o.closePath()}function Pl(o,t,e,i,s){const{fullCircles:r,startAngle:n,circumference:a}=t;let l=t.endAngle;if(r){as(o,t,e,i,l,s);for(let c=0;c<r;++c)o.fill();isNaN(a)||(l=n+(a%fe||fe))}return as(o,t,e,i,l,s),o.fill(),l}function Rl(o,t,e,i,s){const{fullCircles:r,startAngle:n,circumference:a,options:l}=t,{borderWidth:c,borderJoinStyle:h,borderDash:d,borderDashOffset:u,borderRadius:p}=l,f="inner"===l.borderAlign;if(!c)return;o.setLineDash(d||[]),o.lineDashOffset=u,f?(o.lineWidth=2*c,o.lineJoin=h||"round"):(o.lineWidth=c,o.lineJoin=h||"bevel");let y=t.endAngle;if(r){as(o,t,e,i,y,s);for(let w=0;w<r;++w)o.stroke();isNaN(a)||(y=n+(a%fe||fe))}f&&Cl(o,t,y),l.selfJoin&&y-n>=ce&&0===p&&"miter"!==h&&Ml(o,t,y),r||(as(o,t,e,i,y,s),o.stroke())}class yr extends oe{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,selfJoin:!1};static defaultRoutes={backgroundColor:"backgroundColor"};static descriptors={_scriptable:!0,_indexable:t=>"borderDash"!==t};circumference;endAngle;fullCircles;innerRadius;outerRadius;pixelMargin;startAngle;constructor(t){super(),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,t&&Object.assign(this,t)}inRange(t,e,i){const s=this.getProps(["x","y"],i),{angle:r,distance:n}=en(s,{x:t,y:e}),{startAngle:a,endAngle:l,innerRadius:c,outerRadius:h,circumference:d}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],i),u=(this.options.spacing+this.options.borderWidth)/2,p=Pt(d,l-a),f=$i(r,a,l)&&a!==l,y=p>=fe||f,w=Ge(n,c+u,h+u);return y&&w}getCenterPoint(t){const{x:e,y:i,startAngle:s,endAngle:r,innerRadius:n,outerRadius:a}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],t),{offset:l,spacing:c}=this.options,h=(s+r)/2,d=(n+a+c+l)/2;return{x:e+Math.cos(h)*d,y:i+Math.sin(h)*d}}tooltipPosition(t){return this.getCenterPoint(t)}draw(t){const{options:e,circumference:i}=this,s=(e.offset||0)/4,r=(e.spacing||0)/2,n=e.circular;if(this.pixelMargin="inner"===e.borderAlign?.33:0,this.fullCircles=i>fe?Math.floor(i/fe):0,0===i||this.innerRadius<0||this.outerRadius<0)return;t.save();const a=(this.startAngle+this.endAngle)/2;t.translate(Math.cos(a)*s,Math.sin(a)*s);const c=s*(1-Math.sin(Math.min(ce,i||0)));t.fillStyle=e.backgroundColor,t.strokeStyle=e.borderColor,Pl(t,this,c,r,n),Rl(t,this,c,r,n),t.restore(
vendor: 5,809 bytes, line 1
1)}}function xr(o,t,e=t){o.lineCap=Pt(e.borderCapStyle,t.borderCapStyle),o.setLineDash(Pt(e.borderDash,t.borderDash)),o.lineDashOffset=Pt(e.borderDashOffset,t.borderDashOffset),o.lineJoin=Pt(e.borderJoinStyle,t.borderJoinStyle),o.lineWidth=Pt(e.borderWidth,t.borderWidth),o.strokeStyle=Pt(e.borderColor,t.borderColor)}function ql(o,t,e){o.lineTo(e.x,e.y)}function jl(o){return o.stepped?Wo:o.tension||"monotone"===o.cubicInterpolationMode?$o:ql}function vr(o,t,e={}){const i=o.length,{start:s=0,end:r=i-1}=e,{start:n,end:a}=t,l=Math.max(s,n),c=Math.min(r,a);return{count:i,start:l,loop:t.loop,ilen:c<l&&!(s<n&&r<n||s>a&&r>a)?i+c-l:c-l}}function Il(o,t,e,i){const{points:s,options:r}=t,{count:n,start:a,loop:l,ilen:c}=vr(s,e,i),h=jl(r);let p,f,y,{move:d=!0,reverse:u}=i||{};for(p=0;p<=c;++p)f=s[(a+(u?c-p:p))%n],!f.skip&&(d?(o.moveTo(f.x,f.y),d=!1):h(o,y,f,u,r.stepped),y=f);return l&&(f=s[(a+(u?c:0))%n],h(o,y,f,u,r.stepped)),!!l}function Bl(o,t,e,i){const s=t.points,{count:r,start:n,ilen:a}=vr(s,e,i),{move:l=!0,reverse:c}=i||{};let u,p,f,y,w,g,h=0,d=0;const _=M=>(n+(c?a-M:M))%r,L=()=>{y!==w&&(o.lineTo(h,w),o.lineTo(h,y),o.lineTo(h,g))};for(l&&(p=s[_(0)],o.moveTo(p.x,p.y)),u=0;u<=a;++u){if(p=s[_(u)],p.skip)continue;const M=p.x,j=p.y,H=0|M;H===f?(j<y?y=j:j>w&&(w=j),h=(d*h+M)/++d):(L(),o.lineTo(M,j),f=H,d=0,y=w=j),g=j}L()}function Ps(o){const t=o.options;return o._decimated||o._loop||t.tension||"monotone"===t.cubicInterpolationMode||t.stepped||t.borderDash&&t.borderDash.length?Il:Bl}function zl(o){return o.stepped?Vo:o.tension||"monotone"===o.cubicInterpolationMode?Ho:Uo}function Fl(o,t,e,i){let s=t._path;s||(s=t._path=new Path2D,t.path(s,e,i)&&s.closePath()),xr(o,t.options),o.stroke(s)}function Vl(o,t,e,i){const{segments:s,options:r}=t,n=Ps(t);for(const a of s)xr(o,r,a.style),o.beginPath(),n(o,t,a,{start:e,end:e+i-1})&&o.closePath(),o.stroke()}const Hl="function"==typeof Path2D;function Ul(o,t,e,i){Hl&&!t.options.segment?Fl(o,t,e,i):Vl(o,t,e,i)}class qi extends oe{static id="line";static defaults={borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};static descriptors={_scriptable:!0,_indexable:t=>"borderDash"!==t&&"fill"!==t};constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,e){const i=this.options;!i.tension&&"monotone"!==i.cubicInterpolationMode||i.stepped||this._pointsUpdated||(zo(this._points,i,t,i.spanGaps?this._loop:this._fullLoop,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=Fo(this,this.options.segment))}first(){const t=this.segments;return t.length&&this.points[t[0].start]}last(){const t=this.segments,i=t.length;return i&&this.points[t[i-1].end]}interpolate(t,e){const i=this.options,s=t[e],r=this.points,n=pn(this,{property:e,start:s,end:s});if(!n.length)return;const a=[],l=zl(i);let c,h;for(c=0,h=n.length;c<h;++c){const{start:d,end:u}=n[c],p=r[d],f=r[u];if(p===f){a.push(p);continue}const w=l(p,f,Math.abs((s-p[e])/(f[e]-p[e])),i.stepped);w[e]=t[e],a.push(w)}return 1===a.length?a[0]:a}pathSegment(t,e,i){return Ps(this)(t,this,e,i)}path(t,e,i){const s=this.segments,r=Ps(this);let n=this._loop;e=e||0,i=i||this.points.length-e;for(const a of s)n&=r(t,this,a,{start:e,end:e+i-1});return!!n}draw(t,e,i,s){(this.points||[]).length&&(this.options||{}).borderWidth&&(t.save(),Ul(t,this,i,s),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}function _r(o,t,e,i){const s=o.options,{[e]:r}=o.getProps([e],i);return Math.abs(t-r)<s.radius+s.hitRadius}class Ar extends oe{static id="point";parsed;skip;stop;static defaults={borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};constructor(t){super(),this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,t&&Object.assign(this,t)}inRange(t,e,i){const s=this.options,{x:r,y:n}=this.getProps(["x","y"],i);return Math.pow(t-r,2)+Math.pow(e-n,2)<Math.pow(s.hitRadius+s.radius,2)}inXRange(t,e){return _r(this,t,"x",e)}inYRange(t,e){return _r(this,t,"y",e)}getCenterPoint(t){const{x:e,y:i}=this.getProps(["x","y"],t);return{x:e,y:i}}size(t){let e=(t=t||this.options||{}).radius||0;return e=Math.max(e,e&&t.hoverRadius||0),2*(e+(e&&t.borderWidth||0))}draw(t,e){const i=this.options;this.skip||i.radius<.1||!ai(this,e,this.size(i)/2)||(t.strokeStyle=i.borderColor,t.lineWidth=i.borderWidth,t.fillStyle=i.backgroundColor,vs(t,i,this.x,this.y))}getRange(){const t=this.options||{};return t.radius+t.hitRadius}}function wr(o,t){const{x:e,y:i,base:s,width:r,height:n}=o.getProps(["x","y","base","width","height"],t);let a,l,c,h,d;return o.horizontal?(d=n/2,a=Math.min(e,s),l=Math.max(e,s),c=i-d,h=i+d):(d=r/2,a=e-d,l=e+d,c=Math.min(i,s),h=Math.max(i,s)),{left:a,top:c,right:l,bottom:h}}function Je(o,t,e,i){return o?0:pe(t,e,i)}function Wl(o,t,e){const s=o.borderSkipped,r=Ko(o.options.borderWidth);return{t:Je(s.top,r.top,0,e),r:Je(s.right,r.right,0,t),b:Je(s.bottom,r.bottom,0,e),l:Je(s.left,r.left,0,t)}}function $l(o,t,e){const{enableBorderRadius:i}=o.getProps(["enableBorderRadius"]),s=o.options.borderRadius,r=hi(s),n=Math.min(t,e),a=o.borderSkipped,l=i||Gt(s);return{topLeft:Je(!l||a.top||a.left,r.topLeft,0,n),topRight:Je(!l||a.top||a.r
1ight,r.topRight,0,n),bottomLeft:Je(!l||a.bottom||a.left,r.bottomLeft,0,n),bottomRight:Je(!l||a.bottom||a.right,r.bottomRight,0,n)}}function Kl(o){const t=wr(o),e=t.right-t.left,i=t.bottom-t.top,s=Wl(o,e/2,i/2),r=$l(o,e/2,i/2);return{outer:{x:t.left,y:t.top,w:e,h:i,radius:r},inner:{x:t.left+s.l,y:t.top+s.t,w:e-s.l-s.r,h:i-s.t-s.b,radius:{topLeft:Math.max(0,r.topLeft-Math.max(s.t,s.l)),topRight:Math.max(0,r.topRight-Math.max(s.t,s.r)),bottomLeft:Math.max(0,r.bottomLeft-Math.max(s.b,s.l)),bottomRight:Math.max(0,r.bottomRight-Math.max(s.b,s.r))}}}}function Rs(o,t,e,i){const s=null===t,r=null===e,a=o&&!(s&&r)&&wr(o,i);return a&&(s||Ge(t,a.left,a.right))&&(r||Ge(e,a.top,a.bottom))}function Yl(o){return o.topLeft||o.topRight||o.bottomLeft||o.bottomRight}function Xl(o,t){o.rect(t.x,t.y,t.w,t.h)}function qs(o,t,e={}){const i=o.x!==e.x?-t:0,s=o.y!==e.y?-t:0;return{x:o.x+i,y:o.y+s,w:o.w+((o.x+o.w!==e.x+e.w?t:0)-i),h:o.h+((o.y+o.h!==e.y+e.h?t:0)-s),radius:o.radius}}class kr extends oe{static id="bar";static defaults={borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};constructor(t){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,t&&Object.assign(this,t)}draw(t){const{inflateAmount:e,options:{borderColor:i,backgroundColor:s}}=this,{inner:r,outer:n}=Kl(this),a=Yl(n.radius)?Ei:Xl;t.save(),(n.w!==r.w||n.h!==r.h)&&(t.beginPath(),a(t,qs(n,e,r)),t.clip(),a(t,qs(r,-e,n)),t.fillStyle=i,t.fill("evenodd")),t.beginPath(),a(t,qs(r,e)),t.fillStyle=s,t.fill(),t.restore()}inRange(t,e,i){return Rs(this,t,e,i)}inXRange(t,e){return Rs(this,t,null,e)}inYRange(t,e){return Rs(this,null,t,e)}getCenterPoint(t){const{x:e,y:i,base:s,horizontal:r}=this.getProps(["x","y","base","horizontal"],t);return{x:r?(e+s)/2:e,y:r?i:(i+s)/2}}getRange(t){return"x"===t?this.width/2:this.height/2}}var Sr=Object.freeze({__proto__:null,ArcElement:yr,BarElement:kr,LineElement:qi,PointElement:Ar});const js=["rgb(54, 162, 235)","rgb(255, 99, 132)","rgb(255, 159, 64)","rgb(255, 205, 86)","rgb(75, 192, 192)","rgb(153, 102, 255)","rgb(201, 203, 207)"],Er=js.map(o=>o.replace("rgb(","rgba(").replace(")",", 0.5)"));function Nr(o){return js[o%js.length]}function Lr(o){return Er[o%Er.length]}function Gl(o,t){return o.borderColor=Nr(t),o.backgroundColor=Lr(t),++t}function Zl(o,t){return o.backgroundColor=o.data.map(()=>Nr(t++)),t}function Jl(o,t){return o.backgroundColor=o.data.map(()=>Lr(t++)),t}function Ql(o){let t=0;return(e,i)=>{const s=o.getDatasetMeta(i).controller;s instanceof Qi?t=Zl(e,t):s instanceof Ns?t=Jl(e,t):s&&(t=Gl(e,t))}}function Or(o){let t;for(t in o)if(o[t].borderColor||o[t].backgroundColor)return!0;return!1}function tc(o){return o&&(o.borderColor||o.backgroundColor)}function ec(){return"rgba(0,0,0,0.1)"!==Xt.borderColor||"rgba(0,0,0,0.1)"!==Xt.backgroundColor}var Mr={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(o,t,e){if(!e.enabled)return;const{data:{datasets:i},options:s}=o.config,{elements:r}=s,n=Or(i)||tc(s)||r&&Or(r)||ec();if(!e.forceOverride&&n)return;const a=Ql(o);i.forEach(a)}};function ic(o,t,e,i,s){const r=s.samples||i;if(r>=e)return o.slice(t,t+e);const n=[],a=(e-2)/(r-2);let l=0;const c=t+e-1;let d,u,p,f,y,h=t;for(n[l++]=o[h],d=0;d<r-2;d++){let _,w=0,g=0;const L=Math.floor((d+1)*a)+1+t,M=Math.min(Math.floor((d+2)*a)+1,e)+t,j=M-L;for(_=L;_<M;_++)w+=o[_].x,g+=o[_].y;w/=j,g/=j;const H=Math.floor(d*a)+1+t,X=Math.min(Math.floor((d+1)*a)+1,e)+t,{x:U,y:A}=o[h];for(p=f=-1,_=H;_<X;_++)f=.5*Math.abs((U-w)*(o[_].y-A)-(U-o[_].x)*(g-A)),f>p&&(p=f,u=o[_],y=_);n[l++]=u,h=y}return n[l++]=o[c],n}function sc(o,t,e,i){let n,a,l,c,h,d,u,p,f,y,s=0,r=0;const w=[],_=o[t].x,M=o[t+e-1].x-_;for(n=t;n<t+e;++n){a=o[n],l=(a.x-_)/M*i,c=a.y;const j=0|l;if(j===h)c<f?(f=c,d=n):c>y&&(y=c,u=n),s=(r*s+a.x)/++r;else{const H=n-1;if(!Bt(d)&&!Bt(u)){const X=Math.min(d,u),U=Math.max(d,u);X!==p&&X!==H&&w.push({...o[X],x:s}),U!==p&&U!==H&&w.push({...o[U],x:s})}n>0&&H!==p&&w.push(o[H]),w.push(a),h=j,r=0,f=y=c,d=u=p=n}}return w}function Cr(o){if(o._decimated){const t=o._data;delete o._decimated,delete o._data,Object.defineProperty(o,"data",{configurable:!0,enumerable:!0,writable:!0,value:t})}}
1function Tr(o){o.data.datasets.forEach(t=>{Cr(t)})}function nc(o,t){const e=t.length;let s,i=0;const{iScale:r}=o,{min:n,max:a,minDefined:l,maxDefined:c}=r.getUserBounds();return l&&(i=pe(Si(t,r.axis,n).lo,0,e-1)),s=c?pe(Si(t,r.axis,a).hi+1,i,e)-i:e-i,{start:i,count:s}}var Dr={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(o,t,e)=>{if(!e.enabled)return void Tr(o);const i=o.width;o.data.datasets.forEach((s,r)=>{const{_data:n,indexAxis:a}=s,l=o.getDatasetMeta(r),c=n||s.data;if("y"===wi([a,o.options.indexAxis])||!l.controller.supportsDecimation)return;const h=o.scales[l.xAxisID];if("linear"!==h.type&&"time"!==h.type||o.options.parsing)return;let f,{start:d,count:u}=nc(l,c);if(u<=(e.threshold||4*i))Cr(s);else{switch(Bt(n)&&(s._data=c,delete s.data,Object.defineProperty(s,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(y){this._data=y}})),e.algorithm){case"lttb":f=ic(c,d,u,i,e);break;case"min-max":f=sc(c,d,u,i);break;default:throw new Error(`Unsupported decimation algorithm '${e.algorithm}'`)}s._decimated=f}})},destroy(o){Tr(o)}};function rc(o,t,e){const i=o.segments,s=o.points,r=t.points,n=[];for(const a of i){let{start:l,end:c}=a;c=ls(l,c,s);const h=Is(e,s[l],s[c],a.loop);if(!t.segments){n.push({source:a,target:h,start:s[l],end:s[c]});continue}const d=pn(t,h);for(const u of d){const p=Is(e,r[u.start],r[u.end],u.loop),f=Yo(a,s,p);for(const y of f)n.push({source:y,target:u,start:{[e]:Pr(h,p,"start",Math.max)},end:{[e]:Pr(h,p,"end",Math.min)}})}}return n}function Is(o,t,e,i){if(i)return;let s=t[o],r=e[o];return"angle"===o&&(s=Ze(s),r=Ze(r)),{property:o,start:s,end:r}}function oc(o,t){const{x:e=null,y:i=null}=o||{},s=t.points,r=[];return t.segments.forEach(({start:n,end:a})=>{a=ls(n,a,s);const l=s[n],c=s[a];null!==i?(r.push({x:l.x,y:i}),r.push({x:c.x,y:i})):null!==e&&(r.push({x:e,y:l.y}),r.push({x:e,y:c.y}))}),r}function ls(o,t,e){for(;t>o;t--){const i=e[t];if(!isNaN(i.x)&&!isNaN(i.y))break}return t}function Pr(o,t,e,i){return o&&t?i(o[e],t[e]):o?o[e]:t?t[e]:0}function Rr(o,t){let e=[],i=!1;return ye(o)?(i=!0,e=o):e=oc(o,t),e.length?new qi({points:e,options:{tension:0},_loop:i,_fullLoop:i}):null}function qr(o){return o&&!1!==o.fill}function ac(o,t,e){let s=o[t].fill;const r=[t];let n;if(!e)return s;for(;!1!==s&&-1===r.indexOf(s);){if(!ee(s))return s;if(n=o[s],!n)return!1;if(n.visible)return s;r.push(s),s=n.fill}return!1}function lc(o,t,e){const i=dc(o);if(Gt(i))return!isNaN(i.value)&&i;let s=parseFloat(i);return ee(s)&&Math.floor(s)===s?cc(i[0],t,s,e):["origin","start","end","stack","shape"].indexOf(i)>=0&&i}function cc(o,t,e,i){return("-"===o||"+"===o)&&(e=t+e),!(e===t||e<0||e>=i)&&e}function hc(o,t){let e=null;return"start"===o?e=t.bottom:"end"===o?e=t.top:Gt(o)?e=t.getPixelForValue(o.value):t.getBasePixel&&(e=t.getBasePixel()),e}function uc(o,t,e){let i;return i="start"===o?e:"end"===o?t.options.reverse?t.min:t.max:Gt(o)?o.value:t.getBaseValue(),i}function dc(o){const t=o.options,e=t.fill;let i=Pt(e&&e.target,e);return void 0===i&&(i=!!t.backgroundColor),!1!==i&&null!==i&&(!0===i?"origin":i)}function fc(o){const{scale:t,index:e,line:i}=o,s=[],r=i.segments,n=i.points,a=pc(t,e);a.push(Rr({x:null,y:t.bottom},i));for(let l=0;l<r.length;l++){const c=r[l];for(let h=c.start;h<=c.end;h++)gc(s,n[h],a)}return new qi({points:s,options:{}})}function pc(o,t){const e=[],i=o.getMatchingVisibleMetas("line");for(let s=0;s<i.length;s++){const r=i[s];if(r.index===t)break;r.hidden||e.unshift(r.dataset)}return e}function gc(o,t,e){const i=[];for(let s=0;s<e.length;s++){const r=e[s],{first:n,last:a,point:l}=mc(r,t,"x");if(!(!l||n&&a))if(n)i.unshift(l);else if(o.push(l),!a)break}o.push(...i)}function mc(o,t,e){const i=o.interpolate(t,e);if(!i)return{};const s=i[e],r=o.segments,n=o.points;let a=!1,l=!1;for(let c=0;c<r.length;c++){const h=r[c],d=n[h.start][e],u=n[h.end][e];if(Ge(s,d,u)){a=s===d,l=s===u;break}}return{first:a,last:l,point:i}}class jr{constructor(t){this.x=t.x,this.y=t.y,this.radius=t.radius}pathSegment(t,e,i){const{x:s,y:r,radius:n}=this;return t.arc(s,r,n,(e=e||{start:0,end:fe}).end,e.start,!0),!i.bounds}interpolate(t){const{x:e,y:i,radius:s}=this,r=t.angle;return{x:e+Math.cos(r)*s,y:i+Math.sin(r)*s,angle:r}}}function bc(o){const{chart:t,fill:e,line:i}=o;if(ee(e))return yc(t,e);if("stack"===e)return fc(o);if("shape"===e)return!0;const s=xc(o);return s instanceof jr?s:Rr(s,i)}function yc(o,t){const e=o.getDatasetMeta(t);return e&&o.isDatasetVisible(t)?e.dataset:null}function xc(o){return(o.scale||{}).getPointPositionForValue?_c(o):vc(o)}function vc(o){const{scale:t={},fill:e}=o,i=hc(e,t);if(ee(i)){const s=t.isHorizontal();return{x:s?i:null,y:s?null:i}}return null}function _c(o){const{scale:t,fill:e}=o,i=t.options,s=t.getLabels().length,r=i.reverse?t.max:t.min,n=uc(e,t,r),a=[];if(i.grid.circular){const l=t.getPointPositionForValue(0,r);return new jr({x:l.x,y:l.y,radius:t.getDistanceFromCenterForValue(n)})}for(let l=0;l<s;++l)a.push(t.getPointPositionForValue(l,n));return a}function Bs(o,t,e){const i=bc(t),{chart:s,index:r,line:n,scale:a,axis:l}=t,c=n.options,h=c.fill,d=c.backgroundColor,{above:u=d,below:p=d}=h||{},f=s.getDatasetMeta(r),y=fn(s,f);i&&n.points.length&&(Ki(o,e),Ac(o,{line:n,target:i,above:u,below:p,area:e,scale:a,axis:l,clip:y}
vendor: 4,829 bytes, line 1
1),Yi(o))}function Ac(o,t){const{line:e,target:i,above:s,below:r,area:n,scale:a,clip:l}=t,c=e._loop?"angle":t.axis;o.save();let h=r;r!==s&&("x"===c?(Ir(o,i,n.top),zs(o,{line:e,target:i,color:s,scale:a,property:c,clip:l}),o.restore(),o.save(),Ir(o,i,n.bottom)):"y"===c&&(Br(o,i,n.left),zs(o,{line:e,target:i,color:r,scale:a,property:c,clip:l}),o.restore(),o.save(),Br(o,i,n.right),h=s)),zs(o,{line:e,target:i,color:h,scale:a,property:c,clip:l}),o.restore()}function Ir(o,t,e){const{segments:i,points:s}=t;let r=!0,n=!1;o.beginPath();for(const a of i){const{start:l,end:c}=a,h=s[l],d=s[ls(l,c,s)];r?(o.moveTo(h.x,h.y),r=!1):(o.lineTo(h.x,e),o.lineTo(h.x,h.y)),n=!!t.pathSegment(o,a,{move:n}),n?o.closePath():o.lineTo(d.x,e)}o.lineTo(t.first().x,e),o.closePath(),o.clip()}function Br(o,t,e){const{segments:i,points:s}=t;let r=!0,n=!1;o.beginPath();for(const a of i){const{start:l,end:c}=a,h=s[l],d=s[ls(l,c,s)];r?(o.moveTo(h.x,h.y),r=!1):(o.lineTo(e,h.y),o.lineTo(h.x,h.y)),n=!!t.pathSegment(o,a,{move:n}),n?o.closePath():o.lineTo(e,d.y)}o.lineTo(e,t.first().y),o.closePath(),o.clip()}function zs(o,t){const{line:e,target:i,property:s,color:r,scale:n,clip:a}=t,l=rc(e,i,s);for(const{source:c,target:h,start:d,end:u}of l){const{style:{backgroundColor:p=r}={}}=c,f=!0!==i;o.save(),o.fillStyle=p,wc(o,n,a,f&&Is(s,d,u)),o.beginPath();const y=!!e.pathSegment(o,c);let w;if(f){y?o.closePath():zr(o,i,u,s);const g=!!i.pathSegment(o,h,{move:y,reverse:!0});w=y&&g,w||zr(o,i,d,s)}o.closePath(),o.fill(w?"evenodd":"nonzero"),o.restore()}}function wc(o,t,e,i){const s=t.chart.chartArea,{property:r,start:n,end:a}=i||{};if("x"===r||"y"===r){let l,c,h,d;"x"===r?(l=n,c=s.top,h=a,d=s.bottom):(l=s.left,c=n,h=s.right,d=a),o.beginPath(),e&&(l=Math.max(l,e.left),h=Math.min(h,e.right),c=Math.max(c,e.top),d=Math.min(d,e.bottom)),o.rect(l,c,h-l,d-c),o.clip()}}function zr(o,t,e,i){const s=t.interpolate(e,i);s&&o.lineTo(s.x,s.y)}var Fr={id:"filler",afterDatasetsUpdate(o,t,e){const i=(o.data.datasets||[]).length,s=[];let r,n,a,l;for(n=0;n<i;++n)r=o.getDatasetMeta(n),a=r.dataset,l=null,a&&a.options&&a instanceof qi&&(l={visible:o.isDatasetVisible(n),index:n,fill:lc(a,n,i),chart:o,axis:r.controller.options.indexAxis,scale:r.vScale,line:a}),r.$filler=l,s.push(l);for(n=0;n<i;++n)l=s[n],l&&!1!==l.fill&&(l.fill=ac(s,n,e.propagate))},beforeDraw(o,t,e){const i="beforeDraw"===e.drawTime,s=o.getSortedVisibleDatasetMetas(),r=o.chartArea;for(let n=s.length-1;n>=0;--n){const a=s[n].$filler;a&&(a.line.updateControlPoints(r,a.axis),i&&a.fill&&Bs(o.ctx,a,r))}},beforeDatasetsDraw(o,t,e){if("beforeDatasetsDraw"!==e.drawTime)return;const i=o.getSortedVisibleDatasetMetas();for(let s=i.length-1;s>=0;--s){const r=i[s].$filler;qr(r)&&Bs(o.ctx,r,o.chartArea)}},beforeDatasetDraw(o,t,e){const i=t.meta.$filler;!qr(i)||"beforeDatasetDraw"!==e.drawTime||Bs(o.ctx,i,o.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const Vr=(o,t)=>{let{boxHeight:e=t,boxWidth:i=t}=o;return o.usePointStyle&&(e=Math.min(e,t),i=o.pointStyleWidth||Math.min(i,t)),{boxWidth:i,boxHeight:e,itemHeight:Math.max(t,e)}},kc=(o,t)=>null!==o&&null!==t&&o.datasetIndex===t.datasetIndex&&o.index===t.index;class Hr extends oe{constructor(t){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e,i){this.maxWidth=t,this.maxHeight=e,this._margins=i,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const t=this.options.labels||{};let e=$t(t.generateLabels,[this.chart],this)||[];t.filter&&(e=e.filter(i=>t.filter(i,this.chart.data))),t.sort&&(e=e.sort((i,s)=>t.sort(i,s,this.chart.data))),this.options.reverse&&e.reverse(),this.legendItems=e}fit(){const{options:t,ctx:e}=this;if(!t.display)return void(this.width=this.height=0);const i=t.labels,s=se(i.font),r=s.size,n=this._computeTitleHeight(),{boxWidth:a,itemHeight:l}=Vr(i,r);let c,h;e.font=s.string,this.isHorizontal()?(c=this.maxWidth,h=this._fitRows(n,r,a,l)+10):(h=this.maxHeight,c=this._fitCols(n,s,a,l)+10),this.width=Math.min(c,t.maxWidth||this.maxWidth),this.height=Math.min(h,t.maxHeight||this.maxHeight)}_fitRows(t,e,i,s){const{ctx:r,maxWidth:n,options:{labels:{padding:a}}}=this,l=this.legendHitBoxes=[],c=this.lineWidths=[0],h=s+a;let d=t;r.textAlign="left",r.textBaseline="middle";let u=-1,p=-h;
1return this.legendItems.forEach((f,y)=>{const w=i+e/2+r.measureText(f.text).width;(0===y||c[c.length-1]+w+2*a>n)&&(d+=h,c[c.length-(y>0?0:1)]=0,p+=h,u++),l[y]={left:0,top:p,row:u,width:w,height:s},c[c.length-1]+=w+a}),d}_fitCols(t,e,i,s){const{ctx:r,maxHeight:n,options:{labels:{padding:a}}}=this,l=this.legendHitBoxes=[],c=this.columnSizes=[],h=n-t;let d=a,u=0,p=0,f=0,y=0;return this.legendItems.forEach((w,g)=>{const{itemWidth:_,itemHeight:L}=Sc(i,e,r,w,s);g>0&&p+L+2*a>h&&(d+=u+a,c.push({width:u,height:p}),f+=u+a,y++,u=p=0),l[g]={left:f,top:p,col:y,width:_,height:L},u=Math.max(u,_),p+=L+a}),d+=u,c.push({width:u,height:p}),d}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:e,options:{align:i,labels:{padding:s},rtl:r}}=this,n=bi(r,this.left,this.width);if(this.isHorizontal()){let a=0,l=ue(i,this.left+s,this.right-this.lineWidths[a]);for(const c of e)a!==c.row&&(a=c.row,l=ue(i,this.left+s,this.right-this.lineWidths[a])),c.top+=this.top+t+s,c.left=n.leftForLtr(n.x(l),c.width),l+=c.width+s}else{let a=0,l=ue(i,this.top+t+s,this.bottom-this.columnSizes[a].height);for(const c of e)c.col!==a&&(a=c.col,l=ue(i,this.top+t+s,this.bottom-this.columnSizes[a].height)),c.top=l,c.left+=this.left+s,c.left=n.leftForLtr(n.x(c.left),c.width),l+=c.height+s}}isHorizontal(){return"top"===this.options.position||"bottom"===this.options.position}draw(){if(this.options.display){const t=this.ctx;Ki(t,this),this._draw(),Yi(t)}}_draw(){const{options:t,columnSizes:e,lineWidths:i,ctx:s}=this,{align:r,labels:n}=t,a=Xt.color,l=bi(t.rtl,this.left,this.width),c=se(n.font),{padding:h}=n,d=c.size,u=d/2;let p;this.drawTitle(),s.textAlign=l.textAlign("left"),s.textBaseline="middle",s.lineWidth=.5,s.font=c.string;const{boxWidth:f,boxHeight:y,itemHeight:w}=Vr(n,d),L=this.isHorizontal(),M=this._computeTitleHeight();p=L?{x:ue(r,this.left+h,this.right-i[0]),y:this.top+h+M,line:0}:{x:this.left+h,y:ue(r,this.top+M+h,this.bottom-e[0].height),line:0},gn(this.ctx,t.textDirection);const j=w+h;this.legendItems.forEach((H,X)=>{s.strokeStyle=H.fontColor,s.fillStyle=H.fontColor;const U=s.measureText(H.text).width,A=l.textAlign(H.textAlign||(H.textAlign=n.textAlign)),C=f+u+U;let W=p.x,q=p.y;l.setWidth(this.width),L?X>0&&W+C+h>this.right&&(q=p.y+=j,p.line++,W=p.x=ue(r,this.left+h,this.right-i[p.line])):X>0&&q+j>this.bottom&&(W=p.x=W+e[p.line].width+h,p.line++,q=p.y=ue(r,this.top+M+h,this.bottom-e[p.line].height)),function(H,X,U){if(isNaN(f)||f<=0||isNaN(y)||y<0)return;s.save();const A=Pt(U.lineWidth,1);if(s.fillStyle=Pt(U.fillStyle,a),s.lineCap=Pt(U.lineCap,"butt"),s.lineDashOffset=Pt(U.lineDashOffset,0),s.lineJoin=Pt(U.lineJoin,"miter"),s.lineWidth=A,s.strokeStyle=Pt(U.strokeStyle,a),s.setLineDash(Pt(U.lineDash,[])),n.usePointStyle){const C={radius:y*Math.SQRT2/2,pointStyle:U.pointStyle,rotation:U.rotation,borderWidth:A},W=l.xPlus(H,f/2);Go(s,C,W,X+u,n.pointStyleWidth&&f)}else{const C=X+Math.max((d-y)/2,0),W=l.leftForLtr(H,f),q=hi(U.borderRadius);s.beginPath(),Object.values(q).some(Z=>0!==Z)?Ei(s,{x:W,y:C,w:f,h:y,radius:q}):s.rect(W,C,f,y),s.fill(),0!==A&&s.stroke()}s.restore()}(l.x(W),q,H),W=Xo(A,W+f+u,L?W+C:this.right,t.rtl),function(H,X,U){ci(s,U.text,H,X+w/2,c,{strikethrough:U.hidden,textAlign:l.textAlign(U.textAlign)})}(l.x(W),q,H),L?p.x+=C+h:p.y+="string"!=typeof H.text?Ur(H,c.lineHeight)+h:j}),mn(this.ctx,t.textDirection)}drawTitle(){const t=this.options,e=t.title,i=se(e.font),s=he(e.padding);if(!e.display)return;const r=bi(t.rtl,this.left,this.width),n=this.ctx,a=e.position,c=s.top+i.size/2;let h,d=this.left,u=this.width;if(this.isHorizontal())u=Math.max(...this.lineWidths),h=this.top+c,d=ue(t.align,d,this.right-u);else{const f=this.columnSizes.reduce((y,w)=>Math.max(y,w.height),0);h=c+ue(t.align,this.top,this.bottom-f-t.labels.padding-this._computeTitleHeight())}const p=ue(a,d,d+u);n.textAlign=r.textAlign(xs(a)),n.textBaseline="middle",n.strokeStyle=e.color,n.fillStyle=e.color,n.font=i.string,ci(n,e.text,p,h,i)}_computeTitleHeight(){const t=this.options.title,e=se(t.font),i=he(t.padding);return t.display?e.lineHeight+i.height:0}_getLegendItemAt(t,e){let i,s,r;if(Ge(t,this.left,this.right)&&Ge(e,this.top,this.bottom))for(r=this.legendHitBoxes,i=0;i<r.length;++i)if(s=r[i],Ge(t,s.left,s.left+s.width)&&Ge(e,s.top,s.top+s.height))return this.legendItems[i];return null}handleEvent(t){const e=this.options;if(!Lc(t.type,e))return;const i=this._getLegendItemAt(t.x,t.y);if("mousemove"===t.type||"mouseout"===t.type){const s=this._hoveredItem,r=kc(s,i);s&&!r&&$t(e.onLeave,[t,s,this],this),this._hoveredItem=i,i&&!r&&$t(e.onHover,[t,i,this],this)}else i&&$t(e.onClick,[t,i,this],this)}}function Sc(o,t,e,i,s){return{itemWidth:Ec(i,o,t,e),itemHeight:Nc(s,i,t.lineHeight)}}function Ec(o,t,e,i){let s=o.text;return s&&"string"!=typeof s&&(s=s.reduce((r,n)=>r.length>n.length?r:n)),t+e.size/2+i.measureText(s).width}function Nc(o,t,e){let i=o;return"string"!=typeof t.text&&(i=Ur(t,e)),i}function Ur(o,t){return t*(o.text?o.text.length:0)}function Lc(o,t){return!(("mousemove"!==o&&"mouseout"!==o||!t.onHover&&!t.onLeave)&&(!t.onClick||"click"!==o&&"mouseup"!==o))}var Wr={id:"legend",_element:Hr,start(o,t,e){const i=o.legend=new Hr({ctx:o.ctx,options:e,chart:o});le.configure(o,i,e),le.addBox(o,i)},stop(o){le.removeBox(o,o.legend),delete o.legend},beforeUpdate(o,t,e){const i=o.legend;le.configure(o,i,e),i.options=e},afterUpdate(o){const t=o.legend;t.buildLabels(),t.adjustHitBoxes()},afterEvent(o,t){t.replay||o.legend.handleEvent(t.event)}
vendor: 10,653 bytes, line 1
1,defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(o,t,e){const i=t.datasetIndex,s=e.chart;s.isDatasetVisible(i)?(s.hide(i),t.hidden=!0):(s.show(i),t.hidden=!1)},onHover:null,onLeave:null,labels:{color:o=>o.chart.options.color,boxWidth:40,padding:10,generateLabels(o){const t=o.data.datasets,{labels:{usePointStyle:e,pointStyle:i,textAlign:s,color:r,useBorderRadius:n,borderRadius:a}}=o.legend.options;return o._getSortedDatasetMetas().map(l=>{const c=l.controller.getStyle(e?0:void 0),h=he(c.borderWidth);return{text:t[l.index].label,fillStyle:c.backgroundColor,fontColor:r,hidden:!l.visible,lineCap:c.borderCapStyle,lineDash:c.borderDash,lineDashOffset:c.borderDashOffset,lineJoin:c.borderJoinStyle,lineWidth:(h.width+h.height)/4,strokeStyle:c.borderColor,pointStyle:i||c.pointStyle,rotation:c.rotation,textAlign:s||c.textAlign,borderRadius:n&&(a||c.borderRadius),datasetIndex:l.index}},this)}},title:{color:o=>o.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:o=>!o.startsWith("on"),labels:{_scriptable:o=>!["generateLabels","filter","sort"].includes(o)}}};class Fs extends oe{constructor(t){super(),this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e){const i=this.options;if(this.left=0,this.top=0,!i.display)return void(this.width=this.height=this.right=this.bottom=0);this.width=this.right=t,this.height=this.bottom=e;const s=ye(i.text)?i.text.length:1;this._padding=he(i.padding);const r=s*se(i.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=r:this.width=r}isHorizontal(){const t=this.options.position;return"top"===t||"bottom"===t}_drawArgs(t){const{top:e,left:i,bottom:s,right:r,options:n}=this,a=n.align;let c,h,d,l=0;return this.isHorizontal()?(h=ue(a,i,r),d=e+t,c=r-i):("left"===n.position?(h=i+t,d=ue(a,s,e),l=-.5*ce):(h=r-t,d=ue(a,e,s),l=.5*ce),c=s-e),{titleX:h,titleY:d,maxWidth:c,rotation:l}}draw(){const t=this.ctx,e=this.options;if(!e.display)return;const i=se(e.font),r=i.lineHeight/2+this._padding.top,{titleX:n,titleY:a,maxWidth:l,rotation:c}=this._drawArgs(r);ci(t,e.text,0,0,i,{color:e.color,maxWidth:l,rotation:c,textAlign:xs(e.align),textBaseline:"middle",translation:[n,a]})}}function Oc(o,t){const e=new Fs({ctx:o.ctx,options:t,chart:o});le.configure(o,e,t),le.addBox(o,e),o.titleBlock=e}var $r={id:"title",_element:Fs,start(o,t,e){Oc(o,e)},stop(o){le.removeBox(o,o.titleBlock),delete o.titleBlock},beforeUpdate(o,t,e){const i=o.titleBlock;le.configure(o,i,e),i.options=e},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const cs=new WeakMap;var Kr={id:"subtitle",start(o,t,e){const i=new Fs({ctx:o.ctx,options:e,chart:o});le.configure(o,i,e),le.addBox(o,i),cs.set(o,i)},stop(o){le.removeBox(o,cs.get(o)),cs.delete(o)},beforeUpdate(o,t,e){const i=cs.get(o);le.configure(o,i,e),i.options=e},defaults:{align:"center",display:!1,font:{weight:"normal"},fullSize:!0,padding:0,position:"top",text:"",weight:1500},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const ji={average(o){if(!o.length)return!1;let t,e,i=new Set,s=0,r=0;for(t=0,e=o.length;t<e;++t){const a=o[t].element;if(a&&a.hasValue()){const l=a.tooltipPosition();i.add(l.x),s+=l.y,++r}}return 0!==r&&0!==i.size&&{x:[...i].reduce((a,l)=>a+l)/i.size,y:s/r}},nearest(o,t){if(!o.length)return!1;let r,n,a,e=t.x,i=t.y,s=Number.POSITIVE_INFINITY;for(r=0,n=o.length;r<n;++r){const l=o[r].element;if(l&&l.hasValue()){const c=l.getCenterPoint(),h=Zo(t,c);h<s&&(s=h,a=l)}}if(a){const l=a.tooltipPosition();e=l.x,i=l.y}return{x:e,y:i}}};function je(o,t){return t&&(ye(t)?Array.prototype.push.apply(o,t):o.push(t)),o}function He(o){return("string"==typeof o||o instanceof String)&&o.indexOf("\n")>-1?o.split("\n"):o}function Mc(o,t){const{element:e,datasetIndex:i,index:s}=t,r=o.getDatasetMeta(i).controller,{label:n,value:a}=r.getLabelAndValue(s);return{chart:o,label:n,parsed:r.getParsed(s),raw:o.data.datasets[i].data[s],formattedValue:a,dataset:r.getDataset(),dataIndex:s,datasetIndex:i,element:e}}function Yr(o,t){const e=o.chart.ctx,{body:i,footer:s,title:r}=o,{boxWidth:n,boxHeight:a}=t,l=se(t.bodyFont),c=se(t.titleFont),h=se(t.footerFont),d=r.length,u=s.length,p=i.length,f=he(t.padding);let y=f.height,w=0,g=i.reduce((M,j)=>M+j.before.length+j.lines.length+j.after.length,0);g+=o.beforeBody.length+o.afterBody.length,d&&(y+=d*c.lineHeight+(d-1)*t.titleSpacing+t.titleMarginBottom),g&&(y+=p*(t.displayColors?Math.max(a,l.lineHeight):l.lineHeight)+(g-p)*l.lineHeight+(g-1)*t.bodySpacing),u&&(y+=t.footerMarginTop+u*h.lineHeight+(u-1)*t.footerSpacing);let _=0;const L=function(M){w=Math.max(w,e.measureText(M).width+_)};return e.save(),e.font=c.string,Vt(o.title,L),e.font=l.string,Vt(o.beforeBody.concat(o.afterBody),L),_=t.displayColors?n+2+t.boxPadding:0,Vt(i,M=>{Vt(M.before,L),Vt(M.lines,L),Vt(M.after,L)}),_=0,e.font=h.string,Vt(o.footer,L),e.restore(),w+=f.width,{width:w,height:y}}function Cc(o,t){const{y:e,height:i}=t;return e<i/2?"top":e>o.height-i/2?"bottom":"center"}function Tc(o,t,e,i){const{x:s,width:r}=i,n=e.caretSize+e.caretPadding;if("left"===o&&s+r+n>t.width||"right"===o&&s-r-n<0)return!0}function Dc(o,t,e,i){const{x:s,width:r}=e,{width:n,chartArea:{left:a,right:l}}=o;let c="center";return"center"===i?c=s<=(a+l)/2?"left":"right":s<=r/2?c="left":s>=n-r/2&&(c="right"),Tc(c,o,t,e)&&(c="center"),c}function Xr(o,t,e){const i=e.yAlign||t.yAlign||Cc(o,e);return{xAlign:e.xAlign||t.xAlign||Dc(o,t,e,i),yAlign:i}}function Pc(o,t){let{x:e,width:i}=o;return"right"===t?e-=i:"center"===t&&(e-=i/2),e}function Rc(o,t,e){let{y:i,height:s}=o;return"top"===t?i+=e:i-="bottom"===t?s+e:s/2,i}function Gr(o,t,e,i){const{caretSize:s,caretPadding:r,cornerRadius:n}=o,{xAlign:a,yAlign:l}=e,c=s+r,{topLeft:h,topRight:d,bottomLeft:u,bottomRight:p}=hi(n);let f=Pc(t,a);const y=Rc(t,l,c);return"center"===l?"left"===a?f+=c:"right"===a&&(f-=c):"left"===a?f-=Math.max(h,u)+s:"right"===a&&(f+=Math.max(d,p)+s),{x:pe(f,0,i.width-t.width),y:pe(y,0,i.height-t.height)}}function hs(o,t,e){const i=he(e.padding);return"center"===t?o.x+o.width/2:"right"===t?o.x+o.width-i.right:o.x+i.left}function Zr(o){return je([],He(o))}function qc(o,t,e){return ri(o,{tooltip:t,tooltipItems:e,type:"tooltip"})}function Jr(o,t){const e=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return e?o.override(e):o}const Qr={beforeTitle:Fe,title(o){if(o.length>0){const t=o[0],e=t.chart.data.labels,i=e?e.length:0;if(this&&this.options&&"dataset"===this.options.mode)return t.dataset.label||"";if(t.label)return t.label;if(i>0&&t.dataIndex<i)return e[t.dataIndex]}return""},afterTitle:Fe,beforeBody:Fe,beforeLabel:Fe,label(o){if(this&&this.options&&"dataset"===this.options.mode)return o.label+": "+o.formattedValue||o.formattedValue;let t=o.dataset.label||"";t&&(t+=": ");const e=o.formattedValue;return Bt(e)||(t+=e),t},labelColor(o){const e=o.chart.getDatasetMeta(o.datasetIndex).controller.getStyle(o.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(o){const e=o.chart.getDatasetMeta(o.datasetIndex).controller.getStyle(o.dataIndex);return{pointStyle:e.pointStyle,rotation:e.rotation}},afterLabel:Fe,afterBody:Fe,beforeFooter:Fe,footer:Fe,afterFooter:Fe};function xe(o,t,e,i){const s=o[t].call(e,i);return typeof s>"u"?Qr[t].call(e,i):s}class to extends oe{static positioners=ji;constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const e=this.chart,i=this.options.setContext(this.getContext()),s=i.enabled&&e.options.animation&&i.animations,r=new As(this.chart,s);return s._cacheable&&(this._cachedAnimations=Object.freeze(r)),r}getContext(){return this.$context||(this.$context=qc(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,e){const{callbacks:i}=e,s=xe(i,"beforeTitle",this,t),r=xe(i,"title",this,t),n=xe(i,"afterTitle",this,t);let a=[];return a=je(a,He(s)),a=je(a,He(r)),a=je(a,He(n)),a}getBeforeBody(t,e){return Zr(xe(e.callbacks,"beforeBody",this,t))}getBody(t,e){const{callbacks:i}=e,s=[];return Vt(t,r=>{const n={before:[],lines:[],after:[]},a=Jr(i,r);je(n.before,He(xe(a,"beforeLabel",this,r))),je(n.lines,xe(a,"label",this,r)),je(n.after,He(xe(a,"afterLabel",this,r))),s.push(n)}),s}getAfterBody(t,e){return Zr(xe(e.callbacks,"afterBody",this,t))}getFooter(t,e){const{callbacks:i}=e,s=xe(i,"beforeFooter",this,t),r=xe(i,"footer",this,t),n=xe(i,"afterFooter",this,t);let a=[];return a=je(a,He(s)),a=je(a,He(r)),a=je(a,He(n)),a}_createItems(t){const e=this._active,i=this.chart.data,s=[],r=[],n=[];let l,c,a=[];for(l=0,c=e.length;l<c;++l)a.push(Mc(this.chart,e[l]));return t.filter&&(a=a.filter((h,d,u)=>t.filter(h,d,u,i))),t.itemSort&&(a=a.sort((h,d)=>t.itemSort(h,d,i))),Vt(a,h=>{const d=Jr(t.callbacks,h);s.push(xe(d,"labelColor",this,h)),r.push(xe(d,"labelPointStyle",this,h)),n.push(xe(d,"labelTextColor",this,h))}),this.labelColors=s,this.labelPointStyles=r,this.labelTextColors=n,this.dataPoints=a,a}update(t,e){const i=this.options.setContext(this.getContext()),s=this._active;let r,n=[];if(s.length){const a=ji[i.position].call(this,s,this._eventPosition);n=this._createItems(i),this.title=this.getTitle(n,i),this.beforeBody=this.getBeforeBody(n,i),this.body=this.getBody(n,i),this.afterBody=this.getAfterBody(n,i),this.footer=this.getFooter(n,i);const l=this._size=Yr(this,i),c=Object.assign({},a,l),h=Xr(this.chart,i,c),d=Gr(i,c,h,this.chart);this.xAlign=h.xAlign,this.yAlign=h.yAlign,r={opacity:1,x:d.x,y:d.y,width:l.width,height:l.height,caretX:a.x,caretY:a.y}}else 0!==this.opacity&&(r={opacity:0}
vendor: 4,962 bytes, line 1
1);this._tooltipItems=n,this.$context=void 0,r&&this._resolveAnimations().update(this,r),t&&i.external&&i.external.call(this,{chart:this.chart,tooltip:this,replay:e})}drawCaret(t,e,i,s){const r=this.getCaretPosition(t,i,s);e.lineTo(r.x1,r.y1),e.lineTo(r.x2,r.y2),e.lineTo(r.x3,r.y3)}getCaretPosition(t,e,i){const{xAlign:s,yAlign:r}=this,{caretSize:n,cornerRadius:a}=i,{topLeft:l,topRight:c,bottomLeft:h,bottomRight:d}=hi(a),{x:u,y:p}=t,{width:f,height:y}=e;let w,g,_,L,M,j;return"center"===r?(M=p+y/2,"left"===s?(w=u,g=w-n,L=M+n,j=M-n):(w=u+f,g=w+n,L=M-n,j=M+n),_=w):(g="left"===s?u+Math.max(l,h)+n:"right"===s?u+f-Math.max(c,d)-n:this.caretX,"top"===r?(L=p,M=L-n,w=g-n,_=g+n):(L=p+y,M=L+n,w=g+n,_=g-n),j=L),{x1:w,x2:g,x3:_,y1:L,y2:M,y3:j}}drawTitle(t,e,i){const s=this.title,r=s.length;let n,a,l;if(r){const c=bi(i.rtl,this.x,this.width);for(t.x=hs(this,i.titleAlign,i),e.textAlign=c.textAlign(i.titleAlign),e.textBaseline="middle",n=se(i.titleFont),a=i.titleSpacing,e.fillStyle=i.titleColor,e.font=n.string,l=0;l<r;++l)e.fillText(s[l],c.x(t.x),t.y+n.lineHeight/2),t.y+=n.lineHeight+a,l+1===r&&(t.y+=i.titleMarginBottom-a)}}_drawColorBox(t,e,i,s,r){const n=this.labelColors[i],a=this.labelPointStyles[i],{boxHeight:l,boxWidth:c}=r,h=se(r.bodyFont),d=hs(this,"left",r),u=s.x(d),f=e.y+(l<h.lineHeight?(h.lineHeight-l)/2:0);if(r.usePointStyle){const y={radius:Math.min(c,l)/2,pointStyle:a.pointStyle,rotation:a.rotation,borderWidth:1},w=s.leftForLtr(u,c)+c/2,g=f+l/2;t.strokeStyle=r.multiKeyBackground,t.fillStyle=r.multiKeyBackground,vs(t,y,w,g),t.strokeStyle=n.borderColor,t.fillStyle=n.backgroundColor,vs(t,y,w,g)}else{t.lineWidth=Gt(n.borderWidth)?Math.max(...Object.values(n.borderWidth)):n.borderWidth||1,t.strokeStyle=n.borderColor,t.setLineDash(n.borderDash||[]),t.lineDashOffset=n.borderDashOffset||0;const y=s.leftForLtr(u,c),w=s.leftForLtr(s.xPlus(u,1),c-2),g=hi(n.borderRadius);Object.values(g).some(_=>0!==_)?(t.beginPath(),t.fillStyle=r.multiKeyBackground,Ei(t,{x:y,y:f,w:c,h:l,radius:g}),t.fill(),t.stroke(),t.fillStyle=n.backgroundColor,t.beginPath(),Ei(t,{x:w,y:f+1,w:c-2,h:l-2,radius:g}),t.fill()):(t.fillStyle=r.multiKeyBackground,t.fillRect(y,f,c,l),t.strokeRect(y,f,c,l),t.fillStyle=n.backgroundColor,t.fillRect(w,f+1,c-2,l-2))}t.fillStyle=this.labelTextColors[i]}drawBody(t,e,i){const{body:s}=this,{bodySpacing:r,bodyAlign:n,displayColors:a,boxHeight:l,boxWidth:c,boxPadding:h}=i,d=se(i.bodyFont);let u=d.lineHeight,p=0;const f=bi(i.rtl,this.x,this.width),y=function(U){e.fillText(U,f.x(t.x+p),t.y+u/2),t.y+=u+r},w=f.textAlign(n);let g,_,L,M,j,H,X;for(e.textAlign=n,e.textBaseline="middle",e.font=d.string,t.x=hs(this,w,i),e.fillStyle=i.bodyColor,Vt(this.beforeBody,y),p=a&&"right"!==w?"center"===n?c/2+h:c+2+h:0,M=0,H=s.length;M<H;++M){for(g=s[M],_=this.labelTextColors[M],e.fillStyle=_,Vt(g.before,y),L=g.lines,a&&L.length&&(this._drawColorBox(e,t,M,f,i),u=Math.max(d.lineHeight,l)),j=0,X=L.length;j<X;++j)y(L[j]),u=d.lineHeight;Vt(g.after,y)}p=0,u=d.lineHeight,Vt(this.afterBody,y),t.y-=r}drawFooter(t,e,i){const s=this.footer,r=s.length;let n,a;if(r){const l=bi(i.rtl,this.x,this.width);for(t.x=hs(this,i.footerAlign,i),t.y+=i.footerMarginTop,e.textAlign=l.textAlign(i.footerAlign),e.textBaseline="middle",n=se(i.footerFont),e.fillStyle=i.footerColor,e.font=n.string,a=0;a<r;++a)e.fillText(s[a],l.x(t.x),t.y+n.lineHeight/2),t.y+=n.lineHeight+i.footerSpacing}}drawBackground(t,e,i,s){const{xAlign:r,yAlign:n}=this,{x:a,y:l}=t,{width:c,height:h}=i,{topLeft:d,topRight:u,bottomLeft:p,bottomRight:f}=hi(s.cornerRadius);e.fillStyle=s.backgroundColor,e.strokeStyle=s.borderColor,e.lineWidth=s.borderWidth,e.beginPath(),e.moveTo(a+d,l),"top"===n&&this.drawCaret(t,e,i,s),e.lineTo(a+c-u,l),e.quadraticCurveTo(a+c,l,a+c,l+u),"center"===n&&"right"===r&&this.drawCaret(t,e,i,s),e.lineTo(a+c,l+h-f),e.quadraticCurveTo(a+c,l+h,a+c-f,l+h),"bottom"===n&&this.drawCaret(t,e,i,s),e.lineTo(a+p,l+h),e.quadraticCurveTo(a,l+h,a,l+h-p),"center"===n&&"left"===r&&this.drawCaret(t,e,i,s),e.lineTo(a,l+d),e.quadraticCurveTo(a,l,a+d,l),e.closePath(),e.fill(),s.borderWidth>0&&e.stroke()}_updateAnimationTarget(t){const e=this.chart,i=this.$animations,s=i&&i.x,r=i&&i.y;if(s||r){const n=ji[t.position].call(this,this._active,this._eventPosition);if(!n)return;const a=this._size=Yr(this,t),l=Object.assign({},n,this._size),c=Xr(e,t,l),h=Gr(t,l,c,e);(s._to!==h.x||r._to!==h.y)&&(this.xAlign=c.xAlign,this.yAlign=c.yAlign,this.width=a.width,this.height=a.height,this.caretX=n.x,this.caretY=n.y,this._resolveAnimations().update(this,h))}}_willRender(){return!!this.opacity}draw(t){const e=this.options.setContext(this.getContext());let i=this.opacity;if(!i)return;this._updateAnimationTarget(e);const s={width:this.width,height:this.height},r={x:this.x,y:this.y};i=Math.abs(i)<.001?0:i;const n=he(e.padding);e.enabled&&(this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length)&&(t.save(),t.globalAlpha=i,this.drawBackgroun
vendor: 16,939 bytes, line 1
1d(r,t,s,e),gn(t,e.textDirection),r.y+=n.top,this.drawTitle(r,t,e),this.drawBody(r,t,e),this.drawFooter(r,t,e),mn(t,e.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,e){const i=this._active,s=t.map(({datasetIndex:a,index:l})=>{const c=this.chart.getDatasetMeta(a);if(!c)throw new Error("Cannot find a dataset at index "+a);return{datasetIndex:a,element:c.data[l],index:l}}),r=!Zi(i,s),n=this._positionChanged(s,e);(r||n)&&(this._active=s,this._eventPosition=e,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,e,i=!0){if(e&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const s=this.options,r=this._active||[],n=this._getActiveElements(t,r,e,i),a=this._positionChanged(n,t),l=e||!Zi(n,r)||a;return l&&(this._active=n,(s.enabled||s.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,e))),l}_getActiveElements(t,e,i,s){const r=this.options;if("mouseout"===t.type)return[];if(!s)return e.filter(a=>this.chart.data.datasets[a.datasetIndex]&&void 0!==this.chart.getDatasetMeta(a.datasetIndex).controller.getParsed(a.index));const n=this.chart.getElementsAtEventForMode(t,r.mode,r,i);return r.reverse&&n.reverse(),n}_positionChanged(t,e){const{caretX:i,caretY:s,options:r}=this,n=ji[r.position].call(this,t,e);return!1!==n&&(i!==n.x||s!==n.y)}}var eo={id:"tooltip",_element:to,positioners:ji,afterInit(o,t,e){e&&(o.tooltip=new to({chart:o,options:e}))},beforeUpdate(o,t,e){o.tooltip&&o.tooltip.initialize(e)},reset(o,t,e){o.tooltip&&o.tooltip.initialize(e)},afterDraw(o){const t=o.tooltip;if(t&&t._willRender()){const e={tooltip:t};if(!1===o.notifyPlugins("beforeTooltipDraw",{...e,cancelable:!0}))return;t.draw(o.ctx),o.notifyPlugins("afterTooltipDraw",e)}},afterEvent(o,t){o.tooltip&&o.tooltip.handleEvent(t.event,t.replay,t.inChartArea)&&(t.changed=!0)},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(o,t)=>t.bodyFont.size,boxWidth:(o,t)=>t.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:Qr},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:o=>"filter"!==o&&"itemSort"!==o&&"external"!==o,_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},io=Object.freeze({__proto__:null,Colors:Mr,Decimation:Dr,Filler:Fr,Legend:Wr,SubTitle:Kr,Title:$r,Tooltip:eo});const jc=(o,t,e,i)=>("string"==typeof t?(e=o.push(t)-1,i.unshift({index:e,label:t})):isNaN(t)&&(e=null),e);function Ic(o,t,e,i){const s=o.indexOf(t);return-1===s?jc(o,t,e,i):s!==o.lastIndexOf(t)?e:s}const Bc=(o,t)=>null===o?null:pe(Math.round(o),0,t);function so(o){const t=this.getLabels();return o>=0&&o<t.length?t[o]:o}class no extends ti{static id="category";static defaults={ticks:{callback:so}};constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const e=this._addedLabels;if(e.length){const i=this.getLabels();for(const{index:s,label:r}of e)i[s]===r&&i.splice(s,1);this._addedLabels=[]}super.init(t)}parse(t,e){if(Bt(t))return null;const i=this.getLabels();return e=isFinite(e)&&i[e]===t?e:Ic(i,t,Pt(e,t),this._addedLabels),Bc(e,i.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let{min:i,max:s}=this.getMinMax(!0);"ticks"===this.options.bounds&&(t||(i=0),e||(s=this.getLabels().length-1)),this.min=i,this.max=s}buildTicks(){const t=this.min,e=this.max,i=this.options.offset,s=[];let r=this.getLabels();r=0===t&&e===r.length-1?r:r.slice(t,e+1),this._valueRange=Math.max(r.length-(i?0:1),1),this._startValue=this.min-(i?.5:0);for(let n=t;n<=e;n++)s.push({value:n});return s}getLabelForValue(t){return so.call(this,t)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return"number"!=typeof t&&(t=this.parse(t)),null===t?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}function zc(o,t){const e=[],{bounds:s,step:r,min:n,max:a,precision:l,count:c,maxTicks:h,maxDigits:d,includeBounds:u}=o,p=r||1,f=h-1,{min:y,max:w}=t,g=!Bt(n),_=!Bt(a),L=!Bt(c),M=(w-y)/(d+1);let H,X,U,A,j=yn((w-y)/f/p)*p;if(j<1e-14&&!g&&!_)return[{value:y},{value:w}];A=Math.ceil(w/j)-Math.floor(y/j),A>f&&(j=yn(A*j/f/p)*p),Bt(l)||(H=Math.pow(10,l),j=Math.ceil(j*H)/H),"ticks"===s?(X=Math.floor(y/j)*j,U=Math.ceil(w/j)*j):(X=y,U=w),g&&_&&r&&Jo((a-n)/r,j/1e3)?(A=Math.round(Math.min((a-n)/j,h)),j=(a-n)/A,X=n,U=a):L?(X=g?n:X,U=_?a:U,A=c-1,j=(U-X)/A):(A=(U-X)/j,A=_s(A,Math.round(A),j/1e3)?Math.round(A):Math.ceil(A));const C=Math.max(xn(j),xn(X));H=Math.pow(10,Bt(l)?C:l),X=Math.round(X*H)/H,U=Math.round(U*H)/H;let W=0;for(g&&(u&&X!==n?(e.push({value:n}),X<n&&W++,_s(Math.round((X+W*j)*H)/H,n,ro(n,M,o))&&W++):X<n&&W++);W<A;++W){const q=Math.round((X+W*j)*H)/H;if(_&&q>a)break;e.push({value:q})}return _&&u&&U!==a?e.length&&_s(e[e.length-1].value,a,ro(a,M,o))?e[e.length-1].value=a:e.push({value:a}):(!_||U===a)&&e.push({value:U}),e}function ro(o,t,{horizontal:e,minRotation:i}){const s=Ce(i),r=(e?Math.sin(s):Math.cos(s))||.001;return Math.min(t/r,.75*t*(""+o).length)}class us extends ti{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 Bt(t)||("number"==typeof t||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:e,maxDefined:i}=this.getUserBounds();let{min:s,max:r}=this;const n=l=>s=e?s:l,a=l=>r=i?r:l;if(t){const l=Xe(s),c=Xe(r);l<0&&c<0?a(0):l>0&&c>0&&n(0)}if(s===r){let l=0===r?1:Math.abs(.05*r);a(r+l),t||n(s-l)}this.min=s,this.max=r}getTickLimit(){const t=this.options.ticks;let s,{maxTicksLimit:e,stepSize:i}=t;return i?(s=Math.ceil(this.max/i)-Math.floor(this.min/i)+1,s>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${i} would result generating up to ${s} ticks. Limiting to 1000.`),s=1e3)):(s=this.computeTickLimit(),e=e||11),e&&(s=Math.min(e,s)),s}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,e=t.ticks;let i=this.getTickLimit();i=Math.max(2,i);const n=zc({maxTicks:i,bounds:t.bounds,min:t.min,max:t.max,precision:e.precision,step:e.stepSize,count:e.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:e.minRotation||0,includeBounds:!1!==e.includeBounds},this._range||this);return"ticks"===t.bounds&&bn(n,this,"value"),t.reverse?(n.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),n}configure(){const t=this.ticks;let e=this.min,i=this.max;if(super.configure(),this.options.offset&&t.length){const s=(i-e)/Math.max(t.length-1,1)/2;e-=s,i+=s}this._startValue=e,this._endValue=i,this._valueRange=i-e}getLabelForValue(t){return Wi(t,this.chart.options.locale,this.options.ticks.format)}}class oo extends us{static id="linear";static defaults={ticks:{callback:Ji.formatters.numeric}};determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=ee(t)?t:0,this.max=ee(e)?e:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),e=t?this.width:this.height,i=Ce(this.options.ticks.minRotation),s=(t?Math.sin(i):Math.cos(i))||.001,r=this._resolveTickFontOptions(0);return Math.ceil(e/Math.min(40,r.lineHeight/s))}getPixelForValue(t){return null===t?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}const Ii=o=>Math.floor(Ni(o)),di=(o,t)=>Math.pow(10,Ii(o)+t);function ao(o){return o/Math.pow(10,Ii(o))==1}function lo(o,t,e){const i=Math.pow(10,e),s=Math.floor(o/i);return Math.ceil(t/i)-s}function Fc(o,t){let i=Ii(t-o);for(;lo(o,t,i)>10;)i++;for(;lo(o,t,i)<10;)i--;return Math.min(i,Ii(o))}function Vc(o,{min:t,max:e}){t=ke(o.min,t);const i=[],s=Ii(t);let r=Fc(t,e),n=r<0?Math.pow(10,Math.abs(r)):1;const a=Math.pow(10,r),l=s>r?Math.pow(10,s):0,c=Math.round((t-l)*n)/n,h=Math.floor((t-l)/a/10)*a*10;let d=Math.floor((c-h)/Math.pow(10,r)),u=ke(o.min,Math.round((l+h+d*Math.pow(10,r))*n)/n);for(;u<e;)i.push({value:u,major:ao(u),significand:d}),d>=10?d=d<15?15:20:d++,d>=20&&(r++,d=2,n=r>=0?1:n),u=Math.round((l+h+d*Math.pow(10,r))*n)/n;const p=ke(o.max,u);return i.push({value:p,major:ao(p),significand:d}),i}class co extends ti{static id="logarithmic";static defaults={ticks:{callback:Ji.formatters.logarithmic,major:{enabled:!0}}};constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,e){const i=us.prototype.parse.apply(this,[t,e]);if(0!==i)return ee(i)&&i>0?i:null;this._zero=!0}determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=ee(t)?Math.max(0,t):null,this.max=ee(e)?Math.max(0,e):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!ee(this._userMin)&&(this.min=t===di(this.min,0)?di(this.min,-1):di(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let i=this.min,s=this.max;const r=a=>i=t?i:a,n=a=>s=e?s:a;i===s&&(i<=0?(r(1),n(10)):(r(di(i,-1)),n(di(s,1)))),i<=0&&r(di(s,-1)),s<=0&&n(di(i,1)),this.min=i,this.max=s}buildTicks(){const t=this.options,i=Vc({min:this._userMin,max:this._userMax},this);return"ticks"===t.bounds&&bn(i,this,"value"),t.reverse?(i.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),i}getLabelForValue(t){return void 0===t?"0":Wi(t,this.chart.options.locale,this.options.ticks.format)}configure(){const t=this.min;super.configure(),this._startValue=Ni(t),this._valueRange=Ni(this.max)-Ni(t)}getPixelForValue(t){return(void 0===t||0===t)&&(t=this.min),null===t||isNaN(t)?NaN:this.getPixelForDecimal(t===this.min?0:(Ni(t)-this._startValue)/this._valueRange)}getValueForPixel(t){const e=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+e*this._valueRange)}}function Vs(o){const t=o.ticks;if(t.display&&o.display){const e=he(t.backdropPadding);return Pt(t.font&&t.font.size,Xt.font.size)+e.height}return 0}function Hc(o,t,e){return e=ye(e)?e:[e],{w:Qo(o,t.string,e),h:e.length*t.lineHeight}}function ho(o,t,e,i,s){return o===i||o===s?{start:t-e/2,end:t+e/2}:o<i||o>s?{start:t-e,end:t}:{start:t,end:t+e}}function Uc(o){const t={l:o.left+o._padding.left,r:o.right-o._padding.right,t:o.top+o._padding.top,b:o.bottom-o._padding.bottom},e=Object.assign({},t),i=[],s=[],r=o._pointLabels.length,n=o.options.pointLabels,a=n.centerPointLabels?ce/r:0;for(let l=0;l<r;l++){const c=n.setContext(o.getPointLabelContext(l));s[l]=c.padding;const h=o.getPointPosition(l,o.drawingArea+s[l],a),d=se(c.font),u=Hc(o.ctx,d,o._pointLabels[l]);i[l]=u;const p=Ze(o.getIndexAngle(l)+a),f=Math.round(ys(p));Wc(e,t,p,ho(f,h.x,u.w,0,180),ho(f,h.y,u.h,90,270))}o.setCenterPoint(t.l-e.l,e.r-t.r,t.t-e.t,e.b-t.b),o._pointLabelItems=Yc(o,i,s)}function Wc(o,t,e,i,s){const r=Math.abs(Math.sin(e)),n=Math.abs(Math.cos(e));let a=0,l=0;i.start<t.l?(a=(t.l-i.start)/r,o.l=Math.min(o.l,t.l-a)):i.end>t.r&&(a=(i.end-t.r)/r,o.r=Math.max(o.r,t.r+a)),s.start<t.t?(l=(t.t-s.start)/n,o.t=Math.min(o.t,t.t-l)):s.end>t.b&&(l=(s.end-t.b)/n,o.b=Math.max(o.b,t.b+l))}function $c(o,t,e){const i=o.drawingArea,{extra:s,additionalAngle:r,padding:n,size:a}=e,l=o.getPointPosition(t,i+s+n,r),c=Math.round(ys(Ze(l.angle+Le))),h=Zc(l.y,a.h,c),d=Xc(c),u=Gc(l.x,a.w,d);return{visible:!0,x:l.x,y:h,textAlign:d,left:u,top:h,right:u+a.w,bottom:h+a.h}}function Kc(o,t){if(!t)return!0;const{left:e,top:i,right:s,bottom:r}=o;return!(ai({x:e,y:i},t)||ai({x:e,y:r},t)||ai({x:s,y:i},t)||ai({x:s,y:r},t))}function Yc(o,t,e){const i=[],s=o._pointLabels.length,r=o.options,{centerPointLabels:n,display:a}=r.pointLabels,l={extra:Vs(r)/2,additionalAngle:n?ce/s:0};let c;for(let h=0;h<s;h++){l.padding=e[h],l.size=t[h];const d=$c(o,h,l);i.push(d),"auto"===a&&(d.visible=Kc(d,c),d.visible&&(c=d))}return i}function Xc(o){return 0===o||180===o?"center":o<180?"left":"right"}function Gc(o,t,e){return"right"===e?o-=t:"center"===e&&(o-=t/2),o}function Zc(o,t,e){return 90===e||270===e?o-=t/2:(e>270||e<90)&&(o-=t),o}function Jc(o,t,e){const{left:i,top:s,right:r,bottom:n}=e,{backdropColor:a}=t;if(!Bt(a)){const l=hi(t.borderRadius),c=he(t.backdropPadding);o.fillStyle=a;const h=i-c.left,d=s-c.top,u=r-i+c.width,p=n-s+c.height;Object.values(l).some(f=>0!==f)?(o.beginPath(),Ei(o,{x:h,y:d,w:u,h:p,radius:l}),o.fill()):o.fillRect(h,d,u,p)}}function Qc(o,t){const{ctx:e,options:{pointLabels:i}}=o;for(let s=t-1;s>=0;s--){const r=o._pointLabelItems[s];if(!r.visible)continue;const n=i.setContext(o.getPointLabelContext(s));Jc(e,n,r);const a=se(n.font),{x:l,y:c,textAlign:h}=r;ci(e,o._pointLabels[s],l,c+a.lineHeight/2,a,{color:n.color,textAlign:h,textBaseline:"middle"})}}function uo(o,t,e,i){const{ctx:s}=o;if(e)s.arc(o.xCenter,o.yCenter,t,0,fe);else{let r=o.getPointPosition(0,t);s.moveTo(r.x,r.y);for(let n=1;n<i;n++)r=o.getPointPosition(n,t),s.lineTo(r.x,r.y)}}function th(o,t,e,i,s){const r=o.ctx,n=t.circular,{color:a,lineWidth:l}=t;!n&&!i||!a||!l||e<0||(r.save(),r.strokeStyle=a,r.lineWidth=l,r.setLineDash(s.dash||[]),r.lineDashOffset=s.dashOffset,r.beginPath(),uo(o,e,n,i),r.closePath(),r.stroke(),r.restore())}function eh(o,t,e){return ri(o,{label:e,index:t,type:"pointLabel"})}class fo extends us{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:Ji.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback:t=>t,padding:5,centerPointLabels:!1}};static defaultRoutes={"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"};static descriptors={angleLines:{_fallback:"grid"}};constructor(t){super(t),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){const t=this._padding=he(Vs(this.options)/2),e=this.width=this.maxWidth-t.width,i=this.height=this.maxHeight-t.height;this.xCenter=Math.floor(this.left+e/2+t.left),this.yCenter=Math.floor(this.top+i/2+t.top),this.drawingArea=Math.floor(Math.min(e,i)/2)}determineDataLimits(){const{min:t,max:e}=this.getMinMax(!1);this.min=ee(t)&&!isNaN(t)?t:0,this.max=ee(e)&&!isNaN(e)?e:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/Vs(this.options))}generateTickLabels(t){us.prototype.generateTickLabels.call(this,t),this._pointLabels=this.getLabels().map((e,i)=>{const s=$t(this.options.pointLabels.callback,[e,i],this);return s||0===s?s:""}).filter((e,i)=>this.chart.getDataVisibility(i))}fit(){const t=this.options;t.display&&t.pointLabels.display?Uc(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(t,e,i,s){this.xCenter+=Math.floor((t-e)/2),this.yCenter+=Math.floor((i-s)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(t,e,i,s))}getIndexAngle(t){return Ze(t*(fe/(this._pointLabels.length||1))+Ce(this.options.startAngle||0))}getDistanceFromCenterForValue(t){if(Bt(t))return NaN;const e=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-t)*e:(t-this.min)*e}getValueForDistanceFromCenter(t){if(Bt(t))return NaN;const e=t/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-e:this.min+e}getPointLabelContext(t){const e=this._pointLabels||[];if(t>=0&&t<e.length){const i=e[t];return eh(this.getContext(),t,i)}}getPointPosition(t,e,i=0){const s=this.getIndexAngle(t)-Le+i;return{x:Math.cos(s)*e+this.xCenter,y:Math.sin(s)*e+this.yCenter,angle:s}}getPointPositionForValue(t,e){return this.getPointPosition(t,this.getDistanceFromCenterForValue(e))}getBasePosition(t){return this.getPointPositionForValue(t||0,this.getBaseValue())}getPointLabelPosition(t){const{left:e,top:i,right:s,bottom:r}=this._pointLabelItems[t];return{left:e,top:i,right:s,bottom:r}}drawBackground(){const{backgroundColor:t,grid:{circular:e}}=this.options;if(t){const i=this.ctx;i.save(),i.beginPath(),uo(this,this.getDistanceFromCenterForValue(this._endValue),e,this._pointLabels.length),i.closePath(),i.fillStyle=t,i.fill(),i.restore(
1)}}drawGrid(){const t=this.ctx,e=this.options,{angleLines:i,grid:s,border:r}=e,n=this._pointLabels.length;let a,l,c;if(e.pointLabels.display&&Qc(this,n),s.display&&this.ticks.forEach((h,d)=>{if(0!==d||0===d&&this.min<0){l=this.getDistanceFromCenterForValue(h.value);const u=this.getContext(d),p=s.setContext(u),f=r.setContext(u);th(this,p,l,n,f)}}),i.display){for(t.save(),a=n-1;a>=0;a--){const h=i.setContext(this.getPointLabelContext(a)),{color:d,lineWidth:u}=h;!u||!d||(t.lineWidth=u,t.strokeStyle=d,t.setLineDash(h.borderDash),t.lineDashOffset=h.borderDashOffset,l=this.getDistanceFromCenterForValue(e.reverse?this.min:this.max),c=this.getPointPosition(a,l),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(c.x,c.y),t.stroke())}t.restore()}}drawBorder(){}drawLabels(){const t=this.ctx,e=this.options,i=e.ticks;if(!i.display)return;const s=this.getIndexAngle(0);let r,n;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(s),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach((a,l)=>{if(0===l&&this.min>=0&&!e.reverse)return;const c=i.setContext(this.getContext(l)),h=se(c.font);if(r=this.getDistanceFromCenterForValue(this.ticks[l].value),c.showLabelBackdrop){t.font=h.string,n=t.measureText(a.label).width,t.fillStyle=c.backdropColor;const d=he(c.backdropPadding);t.fillRect(-n/2-d.left,-r-h.size/2-d.top,n+d.width,h.size+d.height)}ci(t,a.label,0,-r,h,{color:c.color,strokeColor:c.textStrokeColor,strokeWidth:c.textStrokeWidth})}),t.restore()}drawTitle(){}}const ds={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}},ve=Object.keys(ds);function po(o,t){return o-t}function go(o,t){if(Bt(t))return null;const e=o._adapter,{parser:i,round:s,isoWeekday:r}=o._parseOpts;let n=t;return"function"==typeof i&&(n=i(n)),ee(n)||(n="string"==typeof i?e.parse(n,i):e.parse(n)),null===n?null:(s&&(n="week"!==s||!gi(r)&&!0!==r?e.startOf(n,s):e.startOf(n,"isoWeek",r)),+n)}function mo(o,t,e,i){const s=ve.length;for(let r=ve.indexOf(o);r<s-1;++r){const n=ds[ve[r]];if(n.common&&Math.ceil((e-t)/((n.steps?n.steps:Number.MAX_SAFE_INTEGER)*n.size))<=i)return ve[r]}return ve[s-1]}function ih(o,t,e,i,s){for(let r=ve.length-1;r>=ve.indexOf(e);r--){const n=ve[r];if(ds[n].common&&o._adapter.diff(s,i,n)>=t-1)return n}return ve[e?ve.indexOf(e):0]}function sh(o){for(let t=ve.indexOf(o)+1,e=ve.length;t<e;++t)if(ds[ve[t]].common)return ve[t]}function bo(o,t,e){if(e){if(e.length){const{lo:i,hi:s}=ea(e,t);o[e[i]>=t?e[i]:e[s]]=!0}}else o[t]=!0}function nh(o,t,e,i){const s=o._adapter,r=+s.startOf(t[0].value,i),n=t[t.length-1].value;let a,l;for(a=r;a<=n;a=+s.add(a,1,i))l=e[a],l>=0&&(t[l].major=!0);return t}function yo(o,t,e){const i=[],s={},r=t.length;let n,a;for(n=0;n<r;++n)a=t[n],s[a]=n,i.push({value:a,major:!1});return 0!==r&&e?nh(o,i,s,e):i}class fs extends ti{static id="time";static defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}};constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,e={}){const i=t.time||(t.time={}),s=this._adapter=new Bn._date(t.adapters.date);s.init(e),Gi(i.displayFormats,s.formats()),this._parseOpts={parser:i.parser,round:i.round,isoWeekday:i.isoWeekday},super.init(t),this._normalized=e.normalized}parse(t,e){return void 0===t?null:go(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,e=this._adapter,i=t.time.unit||"day";let{min:s,max:r,minDefined:n,maxDefined:a}=this.getUserBounds();function l(c){!n&&!isNaN(c.min)&&(s=Math.min(s,c.min)),!a&&!isNaN(c.max)&&(r=Math.max(r,c.max))}(!n||!a)&&(l(this._getLabelBounds()),("ticks"!==t.bounds||"labels"!==t.ticks.source)&&l(this.getMinMax(!1))),s=ee(s)&&!isNaN(s)?s:+e.startOf(Date.now(),i),r=ee(r)&&!isNaN(r)?r:+e.endOf(Date.now(),i)+1,this.min=Math.min(s,r-1),this.max=Math.max(s+1,r)}_getLabelBounds(){const t=this.getLabelTimestamps();let e=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;return t.length&&(e=t[0],i=t[t.length-1]),{min:e,max:i}}buildTicks(){const t=this.options,e=t.time,i=t.ticks,s="labels"===i.source?this.getLabelTimestamps():this._generate();"ticks"===t.bounds&&s.length&&(this.min=this._userMin||s[0],this.max=this._userMax||s[s.length-1]);const r=this.min,a=ta(s,r,this.max);return this._unit=e.unit||(i.autoSkip?mo(e.minUnit,this.min,this.max,this._getLabelCapacity(r)):ih(this,a.length,e.minUnit,this.min,this.max)),this._majorUnit=i.major.enabled&&"year"!==this._unit?sh(this._unit):void 0,this.initOffsets(s),t.reverse&&a.reverse(),yo(this,a,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(t=>+t.value))}initOffsets(t=[]){let s,r,e=0,i=0;this.options.offset&&t.length&&(s=this.getDecimalForValue(t[0]),e=1===t.length?1-s:(this.getDecimalForValue(t[1])-s)/2,r=this.getDecimalForValue(t[t.length-1]),i=1===t.length?r:(r-this.getDecimalForValue(t[t.length-2]))/2);const n=t.length<3?.5:.25;e=pe(e,0,n),i=pe(i,0,n),this._offsets={start:e,end:i,factor:1/(e+1+i)}}_generate(){const t=this._adapter,e=this.min,i=this.max,s=this.options,r=s.time,n=r.unit||mo(r.minUnit,e,i,this._getLabelCapacity(e)),a=Pt(s.ticks.stepSize,1),l="week"===n&&r.isoWeekday,c=gi(l)||!0===l,h={};let u,p,d=e;if(c&&(d=+t.startOf(d,"isoWeek",l)),d=+t.startOf(d,c?"day":n),t.diff(i,e,n)>1e5*a)throw new Error(e+" and "+i+" are too far apart with stepSize of "+a+" "+n);const f="data"===s.ticks.source&&this.getDataTimestamps();for(u=d,p=0;u<i;u=+t.add(u,a,n),p++)bo(h,u,f);return(u===i||"ticks"===s.bounds||1===p)&&bo(h,u,f),Object.keys(h).sort(po).map(y=>+y)}getLabelForValue(t){const i=this.options.time;return this._adapter.format(t,i.tooltipFormat?i.tooltipFormat:i.displayFormats.datetime)}format(t,e){return this._adapter.format(t,e||this.options.time.displayFormats[this._unit])}
vendor: 4,357 bytes, lines 1-2
1_tickFormatFunction(t,e,i,s){const r=this.options,n=r.ticks.callback;if(n)return $t(n,[t,e,i],this);const a=r.time.displayFormats,l=this._unit,c=this._majorUnit,d=c&&a[c],u=i[e];return this._adapter.format(t,s||(c&&d&&u&&u.major?d:l&&a[l]))}generateTickLabels(t){let e,i,s;for(e=0,i=t.length;e<i;++e)s=t[e],s.label=this._tickFormatFunction(s.value,e,t)}getDecimalForValue(t){return null===t?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){const e=this._offsets,i=this.getDecimalForValue(t);return this.getPixelForDecimal((e.start+i)*e.factor)}getValueForPixel(t){const e=this._offsets,i=this.getDecimalForPixel(t)/e.factor-e.end;return this.min+i*(this.max-this.min)}_getLabelSize(t){const e=this.options.ticks,i=this.ctx.measureText(t).width,s=Ce(this.isHorizontal()?e.maxRotation:e.minRotation),r=Math.cos(s),n=Math.sin(s),a=this._resolveTickFontOptions(0).size;return{w:i*r+a*n,h:i*n+a*r}}_getLabelCapacity(t){const e=this.options.time,i=e.displayFormats,s=i[e.unit]||i.millisecond,r=this._tickFormatFunction(t,0,yo(this,[t],this._majorUnit),s),n=this._getLabelSize(r),a=Math.floor(this.isHorizontal()?this.width/n.w:this.height/n.h)-1;return a>0?a:1}getDataTimestamps(){let e,i,t=this._cache.data||[];if(t.length)return t;const s=this.getMatchingVisibleMetas();if(this._normalized&&s.length)return this._cache.data=s[0].controller.getAllParsedValues(this);for(e=0,i=s.length;e<i;++e)t=t.concat(s[e].controller.getAllParsedValues(this));return this._cache.data=this.normalize(t)}getLabelTimestamps(){const t=this._cache.labels||[];let e,i;if(t.length)return t;const s=this.getLabels();for(e=0,i=s.length;e<i;++e)t.push(go(this,s[e]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return Zs(t.sort(po))}}function ps(o,t,e){let r,n,a,l,i=0,s=o.length-1;e?(t>=o[i].pos&&t<=o[s].pos&&({lo:i,hi:s}=Si(o,"pos",t)),({pos:r,time:a}=o[i]),({pos:n,time:l}=o[s])):(t>=o[i].time&&t<=o[s].time&&({lo:i,hi:s}=Si(o,"time",t)),({time:r,pos:a}=o[i]),({time:n,pos:l}=o[s]));const c=n-r;return c?a+(l-a)*(t-r)/c:a}class xo extends fs{static id="timeseries";static defaults=fs.defaults;constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),e=this._table=this.buildLookupTable(t);this._minPos=ps(e,this.min),this._tableRange=ps(e,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:e,max:i}=this,s=[],r=[];let n,a,l,c,h;for(n=0,a=t.length;n<a;++n)c=t[n],c>=e&&c<=i&&s.push(c);if(s.length<2)return[{time:e,pos:0},{time:i,pos:1}];for(n=0,a=s.length;n<a;++n)h=s[n+1],l=s[n-1],c=s[n],Math.round((h+l)/2)!==c&&r.push({time:c,pos:n/(a-1)});return r}_generate(){const t=this.min,e=this.max;let i=super.getDataTimestamps();return(!i.includes(t)||!i.length)&&i.splice(0,0,t),(!i.includes(e)||1===i.length)&&i.push(e),i.sort((s,r)=>s-r)}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const e=this.getDataTimestamps(),i=this.getLabelTimestamps();return t=e.length&&i.length?this.normalize(e.concat(i)):e.length?e:i,t=this._cache.all=t,t}getDecimalForValue(t){return(ps(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const e=this._offsets,i=this.getDecimalForPixel(t)/e.factor-e.end;return ps(this._table,i*this._tableRange+this._minPos,!0)}}var vo=Object.freeze({__proto__:null,CategoryScale:no,LinearScale:oo,LogarithmicScale:co,RadialLinearScale:fo,TimeScale:fs,TimeSeriesScale:xo});const rh=[In,Sr,io,vo];export{_n as Animation,As as Animations,yr as ArcElement,Tn as BarController,kr as BarElement,Ms as BasePlatform,Kn as BasicPlatform,Dn as BubbleController,no as CategoryScale,mr as Chart,Mr as Colors,Ve as DatasetController,Dr as Decimation,Jn as DomPlatform,Qi as DoughnutController,oe as Element,Fr as Filler,Fn as Interaction,Wr as Legend,Pn as LineController,qi as LineElement,oo as LinearScale,co as LogarithmicScale,Rn as PieController,Ar as PointElement,Ns as PolarAreaController,qn as RadarController,fo as RadialLinearScale,ti as Scale,jn as ScatterController,Kr as SubTitle,Ji as Ticks,fs as TimeScale,xo as TimeSeriesScale,$r as Title,eo as Tooltip,Bn as _adapters,Qn as _detectPlatform,qe as animator,In as controllers,Xt as defaults,Sr as elements,le as layouts,io as plugins,rh as registerables,Te as registry,vo as scales};
2//# sourceMappingURL=scripts.563bcddde258a8f7.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.