(function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('ckeditor5')) : typeof define === 'function' && define.amd ? define(['exports', 'ckeditor5'], factory) : (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["@ckeditor/ckeditor5-mermaid"] = {}, global.CKEDITOR)); })(this, (function (exports, ckeditor5) { 'use strict'; var a,o,s='\n',u='\n',l='\n',h='\n',f='\n',d="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},g={exports:{}};o=g.exports,(a=g).exports=function(){function t(t){for(var e=[],n=1;n=e?t:""+Array(e+1-i.length).join(n)+t},y={s:w,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),i=Math.floor(n/60),r=n%60;return (e<=0?"+":"-")+w(i,2,"0")+":"+w(r,2,"0")},m:function t(e,n){if(e.date()1)return t(o[0])}else {var s=e.name;v[s]=e,r=s;}return !i&&r&&(m=r),r||!i&&m},_=function(t,e){if(x(t))return t.clone();var n="object"==typeof e?e:{};return n.date=t,n.args=arguments,new T(n)},E=y;E.l=k,E.i=x,E.w=function(t,e){return _(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var T=function(){function b(t){this.$L=k(t.locale,null,!0),this.parse(t);}var w=b.prototype;return w.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(E.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var i=e.match(g);if(i){var r=i[2]-1||0,a=(i[7]||"0").substring(0,3);return n?new Date(Date.UTC(i[1],r,i[3]||1,i[4]||0,i[5]||0,i[6]||0,a)):new Date(i[1],r,i[3]||1,i[4]||0,i[5]||0,i[6]||0,a)}}return new Date(e)}(t),this.$x=t.x||{},this.init();},w.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds();},w.$utils=function(){return E},w.isValid=function(){return !(this.$d.toString()===d)},w.isSame=function(t,e){var n=_(t);return this.startOf(e)<=n&&n<=this.endOf(e)},w.isAfter=function(t,e){return _(t){},debug:(...t)=>{},info:(...t)=>{},warn:(...t)=>{},error:(...t)=>{},fatal:(...t)=>{}},h=function(t="fatal"){let e=u.fatal;"string"==typeof t?(t=t.toLowerCase())in u&&(e=u[t]):"number"==typeof t&&(e=t),l.trace=()=>{},l.debug=()=>{},l.info=()=>{},l.warn=()=>{},l.error=()=>{},l.fatal=()=>{},e<=u.fatal&&(l.fatal=console.error?console.error.bind(console,f("FATAL"),"color: orange"):console.log.bind(console,"",f("FATAL"))),e<=u.error&&(l.error=console.error?console.error.bind(console,f("ERROR"),"color: orange"):console.log.bind(console,"",f("ERROR"))),e<=u.warn&&(l.warn=console.warn?console.warn.bind(console,f("WARN"),"color: orange"):console.log.bind(console,"",f("WARN"))),e<=u.info&&(l.info=console.info?console.info.bind(console,f("INFO"),"color: lightblue"):console.log.bind(console,"",f("INFO"))),e<=u.debug&&(l.debug=console.debug?console.debug.bind(console,f("DEBUG"),"color: lightgreen"):console.log.bind(console,"",f("DEBUG"))),e<=u.trace&&(l.trace=console.debug?console.debug.bind(console,f("TRACE"),"color: lightgreen"):console.log.bind(console,"",f("TRACE")));},f=t=>`%c${s().format("ss.SSS")} : ${t} : `;var g={};Object.defineProperty(g,"__esModule",{value:!0});var p=g.sanitizeUrl=void 0,b=/^([^\w]*)(javascript|data|vbscript)/im,w=/&#(\w+)(^\w|;)?/g,y=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,m=/^([^:]+):/gm,v=[".","/"];function x(t){return v.indexOf(t[0])>-1}function k(t){return t.replace(w,(function(t,e){return String.fromCharCode(e)}))}function _(t){var e=k(t||"").replace(y,"").trim();if(!e)return "about:blank";if(x(e))return e;var n=e.match(m);if(!n)return e;var i=n[0];return b.test(i)?"about:blank":e}function E(t,e){return null==t||null==e?NaN:te?1:t>=e?0:NaN}function T(t,e){return null==t||null==e?NaN:et?1:e>=t?0:NaN}function C(t){let e,n,i;function r(t,i,r=0,a=t.length){if(r>>1;n(t[e],i)<0?r=e+1:a=e;}while(r>>1;n(t[e],i)<=0?r=e+1:a=e;}while(rn&&i(t[o-1],e)>-i(t[o],e)?o-1:o}return 2!==t.length?(e=E,n=(e,n)=>E(t(e),n),i=(e,n)=>t(e)-n):(e=t===E||t===T?t:S,n=t,i=t),{left:r,center:o,right:a}}function S(){return 0}function A(t){return null===t?NaN:+t}p=g.sanitizeUrl=_;const M=C(E).right;C(A).center;const I=M;class O extends Map{constructor(t,e=P){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:e}}),null!=t)for(const[e,n]of t)this.set(e,n);}get(t){return super.get(L(this,t))}has(t){return super.has(L(this,t))}set(t,e){return super.set(D(this,t),e)}delete(t){return super.delete(N(this,t))}}function L({_intern:t,_key:e},n){const i=e(n);return t.has(i)?t.get(i):n}function D({_intern:t,_key:e},n){const i=e(n);return t.has(i)?t.get(i):(t.set(i,n),n)}function N({_intern:t,_key:e},n){const i=e(n);return t.has(i)&&(n=t.get(i),t.delete(i)),n}function P(t){return null!==t&&"object"==typeof t?t.valueOf():t}var B=Math.sqrt(50),R=Math.sqrt(10),j=Math.sqrt(2);function $(t,e,n){var i,r,a,o,s=-1;if(n=+n,(t=+t)==(e=+e)&&n>0)return [t];if((i=e0){let n=Math.round(t/o),i=Math.round(e/o);for(n*oe&&--i,a=new Array(r=i-n+1);++se&&--i,a=new Array(r=i-n+1);++s=0?(a>=B?10:a>=R?5:a>=j?2:1)*Math.pow(10,r):-Math.pow(10,-r)/(a>=B?10:a>=R?5:a>=j?2:1)}function z(t,e,n){var i=Math.abs(e-t)/Math.max(0,n),r=Math.pow(10,Math.floor(Math.log(i)/Math.LN10)),a=i/r;return a>=B?r*=10:a>=R?r*=5:a>=j&&(r*=2),e=e)&&(n=e);else {let i=-1;for(let r of t)null!=(r=e(r,++i,t))&&(n=r)&&(n=r);}return n}function U(t,e){let n;if(void 0===e)for(const e of t)null!=e&&(n>e||void 0===n&&e>=e)&&(n=e);else {let i=-1;for(let r of t)null!=(r=e(r,++i,t))&&(n>r||void 0===n&&r>=r)&&(n=r);}return n}function G(t){return t}var q=1,K=2,Y=3,W=4,X=1e-6;function V(t){return "translate("+t+",0)"}function Z(t){return "translate(0,"+t+")"}function Q(t){return e=>+t(e)}function J(t,e){return e=Math.max(0,t.bandwidth()-2*e)/2,t.round()&&(e=Math.round(e)),n=>+t(n)+e}function tt(){return !this.__axis}function et(t,e){var n=[],i=null,r=null,a=6,o=6,s=3,c="undefined"!=typeof window&&window.devicePixelRatio>1?0:.5,u=t===q||t===W?-1:1,l=t===W||t===K?"x":"y",h=t===q||t===Y?V:Z;function f(f){var d=null==i?e.ticks?e.ticks.apply(e,n):e.domain():i,g=null==r?e.tickFormat?e.tickFormat.apply(e,n):G:r,p=Math.max(a,0)+s,b=e.range(),w=+b[0]+c,y=+b[b.length-1]+c,m=(e.bandwidth?J:Q)(e.copy(),c),v=f.selection?f.selection():f,x=v.selectAll(".domain").data([null]),k=v.selectAll(".tick").data(d,e).order(),_=k.exit(),E=k.enter().append("g").attr("class","tick"),T=k.select("line"),C=k.select("text");x=x.merge(x.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),k=k.merge(E),T=T.merge(E.append("line").attr("stroke","currentColor").attr(l+"2",u*a)),C=C.merge(E.append("text").attr("fill","currentColor").attr(l,u*p).attr("dy",t===q?"0em":t===Y?"0.71em":"0.32em")),f!==v&&(x=x.transition(f),k=k.transition(f),T=T.transition(f),C=C.transition(f),_=_.transition(f).attr("opacity",X).attr("transform",(function(t){return isFinite(t=m(t))?h(t+c):this.getAttribute("transform")})),E.attr("opacity",X).attr("transform",(function(t){var e=this.parentNode.__axis;return h((e&&isFinite(e=e(t))?e:m(t))+c)}))),_.remove(),x.attr("d",t===W||t===K?o?"M"+u*o+","+w+"H"+c+"V"+y+"H"+u*o:"M"+c+","+w+"V"+y:o?"M"+w+","+u*o+"V"+c+"H"+y+"V"+u*o:"M"+w+","+c+"H"+y),k.attr("opacity",1).attr("transform",(function(t){return h(m(t)+c)})),T.attr(l+"2",u*a),C.attr(l,u*p).text(g),v.filter(tt).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===K?"start":t===W?"end":"middle"),v.each((function(){this.__axis=m;}));}return f.scale=function(t){return arguments.length?(e=t,f):e},f.ticks=function(){return n=Array.from(arguments),f},f.tickArguments=function(t){return arguments.length?(n=null==t?[]:Array.from(t),f):n.slice()},f.tickValues=function(t){return arguments.length?(i=null==t?null:Array.from(t),f):i&&i.slice()},f.tickFormat=function(t){return arguments.length?(r=t,f):r},f.tickSize=function(t){return arguments.length?(a=o=+t,f):a},f.tickSizeInner=function(t){return arguments.length?(a=+t,f):a},f.tickSizeOuter=function(t){return arguments.length?(o=+t,f):o},f.tickPadding=function(t){return arguments.length?(s=+t,f):s},f.offset=function(t){return arguments.length?(c=+t,f):c},f}function nt(t){return et(q,t)}function it(t){return et(Y,t)}var rt={value:()=>{}};function at(){for(var t,e=0,n=arguments.length,i={};e=0&&(n=t.slice(i+1),t=t.slice(0,i)),t&&!e.hasOwnProperty(t))throw new Error("unknown type: "+t);return {type:t,name:n}}))}function ct(t,e){for(var n,i=0,r=t.length;i0)for(var n,i,r=new Array(n),a=0;a=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),ht.hasOwnProperty(e)?{space:ht[e],local:t}:t}function dt(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===lt&&e.documentElement.namespaceURI===lt?e.createElement(t):e.createElementNS(n,t)}}function gt(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function pt(t){var e=ft(t);return (e.local?gt:dt)(e)}function bt(){}function wt(t){return null==t?bt:function(){return this.querySelector(t)}}function yt(t){"function"!=typeof t&&(t=wt(t));for(var e=this._groups,n=e.length,i=new Array(n),r=0;r=v&&(v=m+1);!(y=b[v])&&++v=0;)(i=r[a])&&(o&&4^i.compareDocumentPosition(o)&&o.parentNode.insertBefore(i,o),o=i);return this}function Wt(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=Xt);for(var n=this._groups,i=n.length,r=new Array(i),a=0;ae?1:t>=e?0:NaN}function Vt(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function Zt(){return Array.from(this)}function Qt(){for(var t=this._groups,e=0,n=t.length;e1?this.each((null==e?le:"function"==typeof e?fe:he)(t,e,null==n?"":n)):ge(this.node(),t)}function ge(t,e){return t.style.getPropertyValue(e)||ue(t).getComputedStyle(t,null).getPropertyValue(e)}function pe(t){return function(){delete this[t];}}function be(t,e){return function(){this[t]=e;}}function we(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n;}}function ye(t,e){return arguments.length>1?this.each((null==e?pe:"function"==typeof e?we:be)(t,e)):this.node()[t]}function me(t){return t.trim().split(/^|\s+/)}function ve(t){return t.classList||new xe(t)}function xe(t){this._node=t,this._names=me(t.getAttribute("class")||"");}function ke(t,e){for(var n=ve(t),i=-1,r=e.length;++i=0&&(e=t.slice(n+1),t=t.slice(0,n)),{type:t,name:e}}))}function Ze(t){return function(){var e=this.__on;if(e){for(var n,i=0,r=-1,a=e.length;i=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")));},contains:function(t){return this._names.indexOf(t)>=0}};var on=[null];function sn(t,e){this._groups=t,this._parents=e;}function cn(){return new sn([[document.documentElement]],on)}function un(){return this}function ln(t){return "string"==typeof t?new sn([[document.querySelector(t)]],[document.documentElement]):new sn([[t]],on)}function hn(t){return "string"==typeof t?new sn([document.querySelectorAll(t)],[document.documentElement]):new sn([mt(t)],on)}function fn(t,e,n){t.prototype=e.prototype=n,n.constructor=t;}function dn(t,e){var n=Object.create(t.prototype);for(var i in e)n[i]=e[i];return n}function gn(){}sn.prototype=cn.prototype={constructor:sn,select:yt,selectAll:_t,selectChild:Mt,selectChildren:Dt,filter:Nt,data:Ht,enter:Bt,exit:Gt,join:qt,merge:Kt,selection:un,order:Yt,sort:Wt,call:Vt,nodes:Zt,node:Qt,size:Jt,empty:te,each:ee,attr:ce,style:de,property:ye,classed:Se,text:Oe,html:Pe,raise:Re,lower:$e,append:Fe,insert:He,remove:Ge,clone:Ye,datum:We,on:Je,dispatch:rn,[Symbol.iterator]:an};var pn=.7,bn=1/pn,wn="\\s*([+-]?\\d+)\\s*",yn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",mn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",vn=/^#([0-9a-f]{3,8})$/,xn=new RegExp(`^rgb\\(${wn},${wn},${wn}\\)$`),kn=new RegExp(`^rgb\\(${mn},${mn},${mn}\\)$`),_n=new RegExp(`^rgba\\(${wn},${wn},${wn},${yn}\\)$`),En=new RegExp(`^rgba\\(${mn},${mn},${mn},${yn}\\)$`),Tn=new RegExp(`^hsl\\(${yn},${mn},${mn}\\)$`),Cn=new RegExp(`^hsla\\(${yn},${mn},${mn},${yn}\\)$`),Sn={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function An(){return this.rgb().formatHex()}function Mn(){return this.rgb().formatHex8()}function In(){return qn(this).formatHsl()}function On(){return this.rgb().formatRgb()}function Ln(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=vn.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?Dn(e):3===n?new Rn(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?Nn(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?Nn(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=xn.exec(t))?new Rn(e[1],e[2],e[3],1):(e=kn.exec(t))?new Rn(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=_n.exec(t))?Nn(e[1],e[2],e[3],e[4]):(e=En.exec(t))?Nn(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=Tn.exec(t))?Gn(e[1],e[2]/100,e[3]/100,1):(e=Cn.exec(t))?Gn(e[1],e[2]/100,e[3]/100,e[4]):Sn.hasOwnProperty(t)?Dn(Sn[t]):"transparent"===t?new Rn(NaN,NaN,NaN,0):null}function Dn(t){return new Rn(t>>16&255,t>>8&255,255&t,1)}function Nn(t,e,n,i){return i<=0&&(t=e=n=NaN),new Rn(t,e,n,i)}function Pn(t){return t instanceof gn||(t=Ln(t)),t?new Rn((t=t.rgb()).r,t.g,t.b,t.opacity):new Rn}function Bn(t,e,n,i){return 1===arguments.length?Pn(t):new Rn(t,e,n,null==i?1:i)}function Rn(t,e,n,i){this.r=+t,this.g=+e,this.b=+n,this.opacity=+i;}function jn(){return `#${Un(this.r)}${Un(this.g)}${Un(this.b)}`}function $n(){return `#${Un(this.r)}${Un(this.g)}${Un(this.b)}${Un(255*(isNaN(this.opacity)?1:this.opacity))}`}function Fn(){const t=zn(this.opacity);return `${1===t?"rgb(":"rgba("}${Hn(this.r)}, ${Hn(this.g)}, ${Hn(this.b)}${1===t?")":`, ${t})`}`}function zn(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function Hn(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Un(t){return ((t=Hn(t))<16?"0":"")+t.toString(16)}function Gn(t,e,n,i){return i<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new Yn(t,e,n,i)}function qn(t){if(t instanceof Yn)return new Yn(t.h,t.s,t.l,t.opacity);if(t instanceof gn||(t=Ln(t)),!t)return new Yn;if(t instanceof Yn)return t;var e=(t=t.rgb()).r/255,n=t.g/255,i=t.b/255,r=Math.min(e,n,i),a=Math.max(e,n,i),o=NaN,s=a-r,c=(a+r)/2;return s?(o=e===a?(n-i)/s+6*(n0&&c<1?0:o,new Yn(o,s,c,t.opacity)}function Kn(t,e,n,i){return 1===arguments.length?qn(t):new Yn(t,e,n,null==i?1:i)}function Yn(t,e,n,i){this.h=+t,this.s=+e,this.l=+n,this.opacity=+i;}function Wn(t){return (t=(t||0)%360)<0?t+360:t}function Xn(t){return Math.max(0,Math.min(1,t||0))}function Vn(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}fn(gn,Ln,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:An,formatHex:An,formatHex8:Mn,formatHsl:In,formatRgb:On,toString:On}),fn(Rn,Bn,dn(gn,{brighter(t){return t=null==t?bn:Math.pow(bn,t),new Rn(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=null==t?pn:Math.pow(pn,t),new Rn(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new Rn(Hn(this.r),Hn(this.g),Hn(this.b),zn(this.opacity))},displayable(){return -.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:jn,formatHex:jn,formatHex8:$n,formatRgb:Fn,toString:Fn})),fn(Yn,Kn,dn(gn,{brighter(t){return t=null==t?bn:Math.pow(bn,t),new Yn(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?pn:Math.pow(pn,t),new Yn(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,i=n+(n<.5?n:1-n)*e,r=2*n-i;return new Rn(Vn(t>=240?t-240:t+120,r,i),Vn(t,r,i),Vn(t<120?t+240:t-120,r,i),this.opacity)},clamp(){return new Yn(Wn(this.h),Xn(this.s),Xn(this.l),zn(this.opacity))},displayable(){return (0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=zn(this.opacity);return `${1===t?"hsl(":"hsla("}${Wn(this.h)}, ${100*Xn(this.s)}%, ${100*Xn(this.l)}%${1===t?")":`, ${t})`}`}}));const Zn=Math.PI/180,Qn=180/Math.PI,Jn=18,ti=.96422,ei=1,ni=.82521,ii=4/29,ri=6/29,ai=3*ri*ri,oi=ri*ri*ri;function si(t){if(t instanceof ui)return new ui(t.l,t.a,t.b,t.opacity);if(t instanceof bi)return wi(t);t instanceof Rn||(t=Pn(t));var e,n,i=di(t.r),r=di(t.g),a=di(t.b),o=li((.2225045*i+.7168786*r+.0606169*a)/ei);return i===r&&r===a?e=n=o:(e=li((.4360747*i+.3850649*r+.1430804*a)/ti),n=li((.0139322*i+.0971045*r+.7141733*a)/ni)),new ui(116*o-16,500*(e-o),200*(o-n),t.opacity)}function ci(t,e,n,i){return 1===arguments.length?si(t):new ui(t,e,n,null==i?1:i)}function ui(t,e,n,i){this.l=+t,this.a=+e,this.b=+n,this.opacity=+i;}function li(t){return t>oi?Math.pow(t,1/3):t/ai+ii}function hi(t){return t>ri?t*t*t:ai*(t-ii)}function fi(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function di(t){return (t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function gi(t){if(t instanceof bi)return new bi(t.h,t.c,t.l,t.opacity);if(t instanceof ui||(t=si(t)),0===t.a&&0===t.b)return new bi(NaN,0()=>t;function mi(t,e){return function(n){return t+n*e}}function vi(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(i){return Math.pow(t+i*e,n)}}function xi(t,e){var n=e-t;return n?mi(t,n>180||n<-180?n-360*Math.round(n/360):n):yi(isNaN(t)?e:t)}function ki(t){return 1==(t=+t)?_i:function(e,n){return n-e?vi(e,n,t):yi(isNaN(e)?n:e)}}function _i(t,e){var n=e-t;return n?mi(t,n):yi(isNaN(t)?e:t)}const Ei=function t(e){var n=ki(e);function i(t,e){var i=n((t=Bn(t)).r,(e=Bn(e)).r),r=n(t.g,e.g),a=n(t.b,e.b),o=_i(t.opacity,e.opacity);return function(e){return t.r=i(e),t.g=r(e),t.b=a(e),t.opacity=o(e),t+""}}return i.gamma=t,i}(1);function Ti(t,e){e||(e=[]);var n,i=t?Math.min(e.length,t.length):0,r=e.slice();return function(a){for(n=0;na&&(r=e.slice(a,r),s[o]?s[o]+=r:s[++o]=r),(n=n[0])===(i=i[0])?s[o]?s[o]+=i:s[++o]=i:(s[++o]=null,c.push({i:o,x:Mi(n,i)})),a=Li.lastIndex;return a180?e+=360:e-t>180&&(t+=360),a.push({i:n.push(r(n)+"rotate(",null,i)-2,x:Mi(t,e)})):e&&n.push(r(n)+"rotate("+e+i);}function s(t,e,n,a){t!==e?a.push({i:n.push(r(n)+"skewX(",null,i)-2,x:Mi(t,e)}):e&&n.push(r(n)+"skewX("+e+i);}function c(t,e,n,i,a,o){if(t!==n||e!==i){var s=a.push(r(a)+"scale(",null,",",null,")");o.push({i:s-4,x:Mi(t,n)},{i:s-2,x:Mi(e,i)});}else 1===n&&1===i||a.push(r(a)+"scale("+n+","+i+")");}return function(e,n){var i=[],r=[];return e=t(e),n=t(n),a(e.translateX,e.translateY,n.translateX,n.translateY,i,r),o(e.rotate,n.rotate,i,r),s(e.skewX,n.skewX,i,r),c(e.scaleX,e.scaleY,n.scaleX,n.scaleY,i,r),e=n=null,function(t){for(var e,n=-1,a=r.length;++n=0&&e._call.call(void 0,t),e=e._next;--Zi;}function hr(){nr=(er=rr.now())+ir,Zi=Qi=0;try{lr();}finally{Zi=0,dr(),nr=0;}}function fr(){var t=rr.now(),e=t-er;e>tr&&(ir-=e,er=t);}function dr(){for(var t,e,n=Xi,i=1/0;n;)n._call?(i>n._time&&(i=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:Xi=e);Vi=t,gr(i);}function gr(t){Zi||(Qi&&(Qi=clearTimeout(Qi)),t-nr>24?(t<1/0&&(Qi=setTimeout(hr,t-rr.now()-ir)),Ji&&(Ji=clearInterval(Ji))):(Ji||(er=rr.now(),Ji=setInterval(fr,tr)),Zi=1,ar(hr)));}function pr(t,e,n){var i=new cr;return e=null==e?0:+e,i.restart((n=>{i.stop(),t(n+e);}),e,n),i}cr.prototype=ur.prototype={constructor:cr,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?or():+n)+(null==e?0:+e),this._next||Vi===this||(Vi?Vi._next=this:Xi=this,Vi=this),this._call=t,this._time=n,gr();},stop:function(){this._call&&(this._call=null,this._time=1/0,gr());}};var br=at("start","end","cancel","interrupt"),wr=[],yr=0,mr=1,vr=2,xr=3,kr=4,_r=5,Er=6;function Tr(t,e,n,i,r,a){var o=t.__transition;if(o){if(n in o)return}else t.__transition={};Mr(t,n,{name:e,index:i,group:r,on:br,tween:wr,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:yr});}function Cr(t,e){var n=Ar(t,e);if(n.state>yr)throw new Error("too late; already scheduled");return n}function Sr(t,e){var n=Ar(t,e);if(n.state>xr)throw new Error("too late; already running");return n}function Ar(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function Mr(t,e,n){var i,r=t.__transition;function a(t){n.state=mr,n.timer.restart(o,n.delay,n.time),n.delay<=t&&o(t-n.delay);}function o(a){var u,l,h,f;if(n.state!==mr)return c();for(u in r)if((f=r[u]).name===n.name){if(f.state===xr)return pr(o);f.state===kr?(f.state=Er,f.timer.stop(),f.on.call("interrupt",t,t.__data__,f.index,f.group),delete r[u]):+uvr&&n.state<_r,n.state=Er,n.timer.stop(),n.on.call(i?"interrupt":"cancel",t,t.__data__,n.index,n.group),delete a[r]):o=!1;o&&delete t.__transition;}}function Or(t){return this.each((function(){Ir(this,t);}))}function Lr(t,e){var n,i;return function(){var r=Sr(this,t),a=r.tween;if(a!==n)for(var o=0,s=(i=n=a).length;o=0&&(t=t.slice(0,e)),!t||"start"===t}))}function ca(t,e,n){var i,r,a=sa(e)?Cr:Sr;return function(){var o=a(this,t),s=o.on;s!==i&&(r=(i=s).copy()).on(e,n),o.on=r;}}function ua(t,e){var n=this._id;return arguments.length<2?Ar(this.node(),n).on.on(t):this.each(ca(n,t,e))}function la(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this);}}function ha(){return this.on("end.remove",la(this._id))}function fa(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=wt(t));for(var i=this._groups,r=i.length,a=new Array(r),o=0;oWa(e,n).then((e=>(new DOMParser).parseFromString(e,t)))}qa.prototype=Ka.prototype={constructor:qa,moveTo:function(t,e){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e);},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z");},lineTo:function(t,e){this._+="L"+(this._x1=+t)+","+(this._y1=+e);},quadraticCurveTo:function(t,e,n,i){this._+="Q"+ +t+","+ +e+","+(this._x1=+n)+","+(this._y1=+i);},bezierCurveTo:function(t,e,n,i,r,a){this._+="C"+ +t+","+ +e+","+ +n+","+ +i+","+(this._x1=+r)+","+(this._y1=+a);},arcTo:function(t,e,n,i,r){t=+t,e=+e,n=+n,i=+i,r=+r;var a=this._x1,o=this._y1,s=n-t,c=i-e,u=a-t,l=o-e,h=u*u+l*l;if(r<0)throw new Error("negative radius: "+r);if(null===this._x1)this._+="M"+(this._x1=t)+","+(this._y1=e);else if(h>Ua)if(Math.abs(l*s-c*u)>Ua&&r){var f=n-a,d=i-o,g=s*s+c*c,p=f*f+d*d,b=Math.sqrt(g),w=Math.sqrt(h),y=r*Math.tan((za-Math.acos((g+h-p)/(2*b*w)))/2),m=y/w,v=y/b;Math.abs(m-1)>Ua&&(this._+="L"+(t+m*u)+","+(e+m*l)),this._+="A"+r+","+r+",0,0,"+ +(l*f>u*d)+","+(this._x1=t+v*s)+","+(this._y1=e+v*c);}else this._+="L"+(this._x1=t)+","+(this._y1=e);},arc:function(t,e,n,i,r,a){t=+t,e=+e,a=!!a;var o=(n=+n)*Math.cos(i),s=n*Math.sin(i),c=t+o,u=e+s,l=1^a,h=a?i-r:r-i;if(n<0)throw new Error("negative radius: "+n);null===this._x1?this._+="M"+c+","+u:(Math.abs(this._x1-c)>Ua||Math.abs(this._y1-u)>Ua)&&(this._+="L"+c+","+u),n&&(h<0&&(h=h%Ha+Ha),h>Ga?this._+="A"+n+","+n+",0,1,"+l+","+(t-o)+","+(e-s)+"A"+n+","+n+",0,1,"+l+","+(this._x1=c)+","+(this._y1=u):h>Ua&&(this._+="A"+n+","+n+",0,"+ +(h>=za)+","+l+","+(this._x1=t+n*Math.cos(r))+","+(this._y1=e+n*Math.sin(r))));},rect:function(t,e,n,i){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)+"h"+ +n+"v"+ +i+"h"+-n+"Z";},toString:function(){return this._}};var Va=Xa("image/svg+xml");function Za(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function Qa(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,i=t.slice(0,n);return [i.length>1?i[0]+i.slice(2):i,+t.slice(n+1)]}function Ja(t){return (t=Qa(Math.abs(t)))?t[1]:NaN}function to(t,e){return function(n,i){for(var r=n.length,a=[],o=0,s=t[0],c=0;r>0&&s>0&&(c+s+1>i&&(s=Math.max(1,i-c)),a.push(n.substring(r-=s,r+s)),!((c+=s+1)>i));)s=t[o=(o+1)%t.length];return a.reverse().join(e)}}function eo(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}var no,io=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function ro(t){if(!(e=io.exec(t)))throw new Error("invalid format: "+t);var e;return new ao({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}function ao(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+"";}function oo(t){t:for(var e,n=t.length,i=1,r=-1;i0&&(r=0);}return r>0?t.slice(0,r)+t.slice(e+1):t}function so(t,e){var n=Qa(t,e);if(!n)return t+"";var i=n[0],r=n[1],a=r-(no=3*Math.max(-8,Math.min(8,Math.floor(r/3))))+1,o=i.length;return a===o?i:a>o?i+new Array(a-o+1).join("0"):a>0?i.slice(0,a)+"."+i.slice(a):"0."+new Array(1-a).join("0")+Qa(t,Math.max(0,e+a-1))[0]}function co(t,e){var n=Qa(t,e);if(!n)return t+"";var i=n[0],r=n[1];return r<0?"0."+new Array(-r).join("0")+i:i.length>r+1?i.slice(0,r+1)+"."+i.slice(r+1):i+new Array(r-i.length+2).join("0")}ro.prototype=ao.prototype,ao.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};const uo={"%":(t,e)=>(100*t).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:Za,e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>co(100*t,e),r:co,s:so,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function lo(t){return t}var ho,fo,go,po=Array.prototype.map,bo=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function wo(t){var e=void 0===t.grouping||void 0===t.thousands?lo:to(po.call(t.grouping,Number),t.thousands+""),n=void 0===t.currency?"":t.currency[0]+"",i=void 0===t.currency?"":t.currency[1]+"",r=void 0===t.decimal?".":t.decimal+"",a=void 0===t.numerals?lo:eo(po.call(t.numerals,String)),o=void 0===t.percent?"%":t.percent+"",s=void 0===t.minus?"−":t.minus+"",c=void 0===t.nan?"NaN":t.nan+"";function u(t){var u=(t=ro(t)).fill,l=t.align,h=t.sign,f=t.symbol,d=t.zero,g=t.width,p=t.comma,b=t.precision,w=t.trim,y=t.type;"n"===y?(p=!0,y="g"):uo[y]||(void 0===b&&(b=12),w=!0,y="g"),(d||"0"===u&&"="===l)&&(d=!0,u="0",l="=");var m="$"===f?n:"#"===f&&/[boxX]/.test(y)?"0"+y.toLowerCase():"",v="$"===f?i:/[%p]/.test(y)?o:"",x=uo[y],k=/[defgprs%]/.test(y);function _(t){var n,i,o,f=m,_=v;if("c"===y)_=x(t)+_,t="";else {var E=(t=+t)<0||1/t<0;if(t=isNaN(t)?c:x(Math.abs(t),b),w&&(t=oo(t)),E&&0==+t&&"+"!==h&&(E=!1),f=(E?"("===h?h:s:"-"===h||"("===h?"":h)+f,_=("s"===y?bo[8+no/3]:"")+_+(E&&"("===h?")":""),k)for(n=-1,i=t.length;++n(o=t.charCodeAt(n))||o>57){_=(46===o?r+t.slice(n+1):t.slice(n))+_,t=t.slice(0,n);break}}p&&!d&&(t=e(t,1/0));var T=f.length+t.length+_.length,C=T>1)+f+t+_+C.slice(T);break;default:t=C+f+t+_;}return a(t)}return b=void 0===b?6:/[gprs]/.test(y)?Math.max(1,Math.min(21,b)):Math.max(0,Math.min(20,b)),_.toString=function(){return t+""},_}function l(t,e){var n=u(((t=ro(t)).type="f",t)),i=3*Math.max(-8,Math.min(8,Math.floor(Ja(e)/3))),r=Math.pow(10,-i),a=bo[8+i/3];return function(t){return n(r*t)+a}}return {format:u,formatPrefix:l}}function yo(t){return ho=wo(t),fo=ho.format,go=ho.formatPrefix,ho}function mo(t){return Math.max(0,-Ja(Math.abs(t)))}function vo(t,e){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(Ja(e)/3)))-Ja(Math.abs(t)))}function xo(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,Ja(e)-Ja(t))+1}function ko(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t);}return this}yo({thousands:",",grouping:[3],currency:["$",""]});const _o=Symbol("implicit");function Eo(){var t=new O,e=[],n=[],i=_o;function r(r){let a=t.get(r);if(void 0===a){if(i!==_o)return i;t.set(r,a=e.push(r)-1);}return n[a%n.length]}return r.domain=function(n){if(!arguments.length)return e.slice();e=[],t=new O;for(const i of n)t.has(i)||t.set(i,e.push(i)-1);return r},r.range=function(t){return arguments.length?(n=Array.from(t),r):n.slice()},r.unknown=function(t){return arguments.length?(i=t,r):i},r.copy=function(){return Eo(e,n).unknown(i)},ko.apply(r,arguments),r}function To(t){return function(){return t}}function Co(t){return +t}var So=[0,1];function Ao(t){return t}function Mo(t,e){return (e-=t=+t)?function(n){return (n-t)/e}:To(isNaN(e)?NaN:.5)}function Io(t,e){var n;return t>e&&(n=t,t=e,e=n),function(n){return Math.max(t,Math.min(e,n))}}function Oo(t,e,n){var i=t[0],r=t[1],a=e[0],o=e[1];return r2?Lo:Oo,r=a=null,h}function h(e){return null==e||isNaN(e=+e)?n:(r||(r=i(o.map(t),s,c)))(t(u(e)))}return h.invert=function(n){return u(e((a||(a=i(s,o.map(t),Mi)))(n)))},h.domain=function(t){return arguments.length?(o=Array.from(t,Co),l()):o.slice()},h.range=function(t){return arguments.length?(s=Array.from(t),l()):s.slice()},h.rangeRound=function(t){return s=Array.from(t),c=Ri,l()},h.clamp=function(t){return arguments.length?(u=!!t||Ao,l()):u!==Ao},h.interpolate=function(t){return arguments.length?(c=t,l()):c},h.unknown=function(t){return arguments.length?(n=t,h):n},function(n,i){return t=n,e=i,l()}}function Po(){return No()(Ao,Ao)}function Bo(t,e,n,i){var r,a=z(t,e,n);switch((i=ro(null==i?",f":i)).type){case"s":var o=Math.max(Math.abs(t),Math.abs(e));return null!=i.precision||isNaN(r=vo(a,o))||(i.precision=r),go(i,o);case"":case"e":case"g":case"p":case"r":null!=i.precision||isNaN(r=xo(a,Math.max(Math.abs(t),Math.abs(e))))||(i.precision=r-("e"===i.type));break;case"f":case"%":null!=i.precision||isNaN(r=mo(a))||(i.precision=r-2*("%"===i.type));}return fo(i)}function Ro(t){var e=t.domain;return t.ticks=function(t){var n=e();return $(n[0],n[n.length-1],null==t?10:t)},t.tickFormat=function(t,n){var i=e();return Bo(i[0],i[i.length-1],null==t?10:t,n)},t.nice=function(n){null==n&&(n=10);var i,r,a=e(),o=0,s=a.length-1,c=a[o],u=a[s],l=10;for(u0;){if((r=F(c,u,n))===i)return a[o]=c,a[s]=u,e(a);if(r>0)c=Math.floor(c/r)*r,u=Math.ceil(u/r)*r;else {if(!(r<0))break;c=Math.ceil(c*r)/r,u=Math.floor(u*r)/r;}i=r;}return t},t}function jo(){var t=Po();return t.copy=function(){return Do(t,jo())},ko.apply(t,arguments),Ro(t)}function $o(t,e){var n,i=0,r=(t=t.slice()).length-1,a=t[i],o=t[r];return o0))return s;do{s.push(o=new Date(+n)),e(n,a),t(n);}while(o=e)for(;t(e),!n(e);)e.setTime(e-1);}),(function(t,i){if(t>=t)if(i<0)for(;++i<=0;)for(;e(t,-1),!n(t););else for(;--i>=0;)for(;e(t,1),!n(t););}))},n&&(r.count=function(e,i){return Fo.setTime(+e),zo.setTime(+i),t(Fo),t(zo),Math.floor(n(Fo,zo))},r.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?r.filter(i?function(e){return i(e)%t==0}:function(e){return r.count(0,e)%t==0}):r:null}),r}var Uo=Ho((function(){}),(function(t,e){t.setTime(+t+e);}),(function(t,e){return e-t}));Uo.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?Ho((function(e){e.setTime(Math.floor(e/t)*t);}),(function(e,n){e.setTime(+e+n*t);}),(function(e,n){return (n-e)/t})):Uo:null};const Go=Uo;Uo.range;const qo=1e3,Ko=60*qo,Yo=60*Ko,Wo=24*Yo,Xo=7*Wo,Vo=30*Wo,Zo=365*Wo;var Qo=Ho((function(t){t.setTime(t-t.getMilliseconds());}),(function(t,e){t.setTime(+t+e*qo);}),(function(t,e){return (e-t)/qo}),(function(t){return t.getUTCSeconds()}));const Jo=Qo;Qo.range;var ts=Ho((function(t){t.setTime(t-t.getMilliseconds()-t.getSeconds()*qo);}),(function(t,e){t.setTime(+t+e*Ko);}),(function(t,e){return (e-t)/Ko}),(function(t){return t.getMinutes()}));const es=ts;ts.range;var ns=Ho((function(t){t.setTime(t-t.getMilliseconds()-t.getSeconds()*qo-t.getMinutes()*Ko);}),(function(t,e){t.setTime(+t+e*Yo);}),(function(t,e){return (e-t)/Yo}),(function(t){return t.getHours()}));const is=ns;ns.range;var rs=Ho((t=>t.setHours(0,0,0,0)),((t,e)=>t.setDate(t.getDate()+e)),((t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*Ko)/Wo),(t=>t.getDate()-1));const as=rs;function os(t){return Ho((function(e){e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0);}),(function(t,e){t.setDate(t.getDate()+7*e);}),(function(t,e){return (e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*Ko)/Xo}))}rs.range;var ss=os(0),cs=os(1),us=os(2),ls=os(3),hs=os(4),fs=os(5),ds=os(6);ss.range,cs.range,us.range,ls.range,hs.range,fs.range,ds.range;var gs=Ho((function(t){t.setDate(1),t.setHours(0,0,0,0);}),(function(t,e){t.setMonth(t.getMonth()+e);}),(function(t,e){return e.getMonth()-t.getMonth()+12*(e.getFullYear()-t.getFullYear())}),(function(t){return t.getMonth()}));const ps=gs;gs.range;var bs=Ho((function(t){t.setMonth(0,1),t.setHours(0,0,0,0);}),(function(t,e){t.setFullYear(t.getFullYear()+e);}),(function(t,e){return e.getFullYear()-t.getFullYear()}),(function(t){return t.getFullYear()}));bs.every=function(t){return isFinite(t=Math.floor(t))&&t>0?Ho((function(e){e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0);}),(function(e,n){e.setFullYear(e.getFullYear()+n*t);})):null};const ws=bs;bs.range,Ho((function(t){t.setUTCSeconds(0,0);}),(function(t,e){t.setTime(+t+e*Ko);}),(function(t,e){return (e-t)/Ko}),(function(t){return t.getUTCMinutes()})).range,Ho((function(t){t.setUTCMinutes(0,0,0);}),(function(t,e){t.setTime(+t+e*Yo);}),(function(t,e){return (e-t)/Yo}),(function(t){return t.getUTCHours()})).range;var ys=Ho((function(t){t.setUTCHours(0,0,0,0);}),(function(t,e){t.setUTCDate(t.getUTCDate()+e);}),(function(t,e){return (e-t)/Wo}),(function(t){return t.getUTCDate()-1}));const ms=ys;function vs(t){return Ho((function(e){e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0);}),(function(t,e){t.setUTCDate(t.getUTCDate()+7*e);}),(function(t,e){return (e-t)/Xo}))}ys.range;var xs=vs(0),ks=vs(1),_s=vs(2),Es=vs(3),Ts=vs(4),Cs=vs(5),Ss=vs(6);xs.range,ks.range,_s.range,Es.range,Ts.range,Cs.range,Ss.range,Ho((function(t){t.setUTCDate(1),t.setUTCHours(0,0,0,0);}),(function(t,e){t.setUTCMonth(t.getUTCMonth()+e);}),(function(t,e){return e.getUTCMonth()-t.getUTCMonth()+12*(e.getUTCFullYear()-t.getUTCFullYear())}),(function(t){return t.getUTCMonth()})).range;var As=Ho((function(t){t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0);}),(function(t,e){t.setUTCFullYear(t.getUTCFullYear()+e);}),(function(t,e){return e.getUTCFullYear()-t.getUTCFullYear()}),(function(t){return t.getUTCFullYear()}));As.every=function(t){return isFinite(t=Math.floor(t))&&t>0?Ho((function(e){e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0);}),(function(e,n){e.setUTCFullYear(e.getUTCFullYear()+n*t);})):null};const Ms=As;function Is(t,e,n,i,r,a){const o=[[Jo,1,qo],[Jo,5,5*qo],[Jo,15,15*qo],[Jo,30,30*qo],[a,1,Ko],[a,5,5*Ko],[a,15,15*Ko],[a,30,30*Ko],[r,1,Yo],[r,3,3*Yo],[r,6,6*Yo],[r,12,12*Yo],[i,1,Wo],[i,2,2*Wo],[n,1,Xo],[e,1,Vo],[e,3,3*Vo],[t,1,Zo]];function s(t,e,n){const i=et)).right(o,r);if(a===o.length)return t.every(z(e/Zo,n/Zo,i));if(0===a)return Go.every(Math.max(z(e,n,i),1));const[s,c]=o[r/o[a-1][2]53)return null;"w"in a||(a.w=1),"Z"in a?(r=(i=Ns(Ps(a.y,0,1))).getUTCDay(),i=r>4||0===r?ks.ceil(i):ks(i),i=ms.offset(i,7*(a.V-1)),a.y=i.getUTCFullYear(),a.m=i.getUTCMonth(),a.d=i.getUTCDate()+(a.w+6)%7):(r=(i=Ds(Ps(a.y,0,1))).getDay(),i=r>4||0===r?cs.ceil(i):cs(i),i=as.offset(i,7*(a.V-1)),a.y=i.getFullYear(),a.m=i.getMonth(),a.d=i.getDate()+(a.w+6)%7);}else ("W"in a||"U"in a)&&("w"in a||(a.w="u"in a?a.u%7:"W"in a?1:0),r="Z"in a?Ns(Ps(a.y,0,1)).getUTCDay():Ds(Ps(a.y,0,1)).getDay(),a.m=0,a.d="W"in a?(a.w+6)%7+7*a.W-(r+5)%7:a.w+7*a.U-(r+6)%7);return "Z"in a?(a.H+=a.Z/100|0,a.M+=a.Z%100,Ns(a)):Ds(a)}}function E(t,e,n,i){for(var r,a,o=0,s=e.length,c=n.length;o=c)return -1;if(37===(r=e.charCodeAt(o++))){if(r=e.charAt(o++),!(a=x[r in $s?e.charAt(o++):r])||(i=a(t,n,i))<0)return -1}else if(r!=n.charCodeAt(i++))return -1}return i}function T(t,e,n){var i=u.exec(e.slice(n));return i?(t.p=l.get(i[0].toLowerCase()),n+i[0].length):-1}function C(t,e,n){var i=d.exec(e.slice(n));return i?(t.w=g.get(i[0].toLowerCase()),n+i[0].length):-1}function S(t,e,n){var i=h.exec(e.slice(n));return i?(t.w=f.get(i[0].toLowerCase()),n+i[0].length):-1}function A(t,e,n){var i=w.exec(e.slice(n));return i?(t.m=y.get(i[0].toLowerCase()),n+i[0].length):-1}function M(t,e,n){var i=p.exec(e.slice(n));return i?(t.m=b.get(i[0].toLowerCase()),n+i[0].length):-1}function I(t,n,i){return E(t,e,n,i)}function O(t,e,i){return E(t,n,e,i)}function L(t,e,n){return E(t,i,e,n)}function D(t){return o[t.getDay()]}function N(t){return a[t.getDay()]}function P(t){return c[t.getMonth()]}function B(t){return s[t.getMonth()]}function R(t){return r[+(t.getHours()>=12)]}function j(t){return 1+~~(t.getMonth()/3)}function $(t){return o[t.getUTCDay()]}function F(t){return a[t.getUTCDay()]}function z(t){return c[t.getUTCMonth()]}function H(t){return s[t.getUTCMonth()]}function U(t){return r[+(t.getUTCHours()>=12)]}function G(t){return 1+~~(t.getUTCMonth()/3)}return m.x=k(n,m),m.X=k(i,m),m.c=k(e,m),v.x=k(n,v),v.X=k(i,v),v.c=k(e,v),{format:function(t){var e=k(t+="",m);return e.toString=function(){return t},e},parse:function(t){var e=_(t+="",!1);return e.toString=function(){return t},e},utcFormat:function(t){var e=k(t+="",v);return e.toString=function(){return t},e},utcParse:function(t){var e=_(t+="",!0);return e.toString=function(){return t},e}}}var Rs,js,$s={"-":"",_:" ",0:"0"},Fs=/^\s*\d+/,zs=/^%/,Hs=/[\\^$*+?|[\]().{}]/g;function Us(t,e,n){var i=t<0?"-":"",r=(i?-t:t)+"",a=r.length;return i+(a[t.toLowerCase(),e])))}function Ys(t,e,n){var i=Fs.exec(e.slice(n,n+1));return i?(t.w=+i[0],n+i[0].length):-1}function Ws(t,e,n){var i=Fs.exec(e.slice(n,n+1));return i?(t.u=+i[0],n+i[0].length):-1}function Xs(t,e,n){var i=Fs.exec(e.slice(n,n+2));return i?(t.U=+i[0],n+i[0].length):-1}function Vs(t,e,n){var i=Fs.exec(e.slice(n,n+2));return i?(t.V=+i[0],n+i[0].length):-1}function Zs(t,e,n){var i=Fs.exec(e.slice(n,n+2));return i?(t.W=+i[0],n+i[0].length):-1}function Qs(t,e,n){var i=Fs.exec(e.slice(n,n+4));return i?(t.y=+i[0],n+i[0].length):-1}function Js(t,e,n){var i=Fs.exec(e.slice(n,n+2));return i?(t.y=+i[0]+(+i[0]>68?1900:2e3),n+i[0].length):-1}function tc(t,e,n){var i=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return i?(t.Z=i[1]?0:-(i[2]+(i[3]||"00")),n+i[0].length):-1}function ec(t,e,n){var i=Fs.exec(e.slice(n,n+1));return i?(t.q=3*i[0]-3,n+i[0].length):-1}function nc(t,e,n){var i=Fs.exec(e.slice(n,n+2));return i?(t.m=i[0]-1,n+i[0].length):-1}function ic(t,e,n){var i=Fs.exec(e.slice(n,n+2));return i?(t.d=+i[0],n+i[0].length):-1}function rc(t,e,n){var i=Fs.exec(e.slice(n,n+3));return i?(t.m=0,t.d=+i[0],n+i[0].length):-1}function ac(t,e,n){var i=Fs.exec(e.slice(n,n+2));return i?(t.H=+i[0],n+i[0].length):-1}function oc(t,e,n){var i=Fs.exec(e.slice(n,n+2));return i?(t.M=+i[0],n+i[0].length):-1}function sc(t,e,n){var i=Fs.exec(e.slice(n,n+2));return i?(t.S=+i[0],n+i[0].length):-1}function cc(t,e,n){var i=Fs.exec(e.slice(n,n+3));return i?(t.L=+i[0],n+i[0].length):-1}function uc(t,e,n){var i=Fs.exec(e.slice(n,n+6));return i?(t.L=Math.floor(i[0]/1e3),n+i[0].length):-1}function lc(t,e,n){var i=zs.exec(e.slice(n,n+1));return i?n+i[0].length:-1}function hc(t,e,n){var i=Fs.exec(e.slice(n));return i?(t.Q=+i[0],n+i[0].length):-1}function fc(t,e,n){var i=Fs.exec(e.slice(n));return i?(t.s=+i[0],n+i[0].length):-1}function dc(t,e){return Us(t.getDate(),e,2)}function gc(t,e){return Us(t.getHours(),e,2)}function pc(t,e){return Us(t.getHours()%12||12,e,2)}function bc(t,e){return Us(1+as.count(ws(t),t),e,3)}function wc(t,e){return Us(t.getMilliseconds(),e,3)}function yc(t,e){return wc(t,e)+"000"}function mc(t,e){return Us(t.getMonth()+1,e,2)}function vc(t,e){return Us(t.getMinutes(),e,2)}function xc(t,e){return Us(t.getSeconds(),e,2)}function kc(t){var e=t.getDay();return 0===e?7:e}function _c(t,e){return Us(ss.count(ws(t)-1,t),e,2)}function Ec(t){var e=t.getDay();return e>=4||0===e?hs(t):hs.ceil(t)}function Tc(t,e){return t=Ec(t),Us(hs.count(ws(t),t)+(4===ws(t).getDay()),e,2)}function Cc(t){return t.getDay()}function Sc(t,e){return Us(cs.count(ws(t)-1,t),e,2)}function Ac(t,e){return Us(t.getFullYear()%100,e,2)}function Mc(t,e){return Us((t=Ec(t)).getFullYear()%100,e,2)}function Ic(t,e){return Us(t.getFullYear()%1e4,e,4)}function Oc(t,e){var n=t.getDay();return Us((t=n>=4||0===n?hs(t):hs.ceil(t)).getFullYear()%1e4,e,4)}function Lc(t){var e=t.getTimezoneOffset();return (e>0?"-":(e*=-1,"+"))+Us(e/60|0,"0",2)+Us(e%60,"0",2)}function Dc(t,e){return Us(t.getUTCDate(),e,2)}function Nc(t,e){return Us(t.getUTCHours(),e,2)}function Pc(t,e){return Us(t.getUTCHours()%12||12,e,2)}function Bc(t,e){return Us(1+ms.count(Ms(t),t),e,3)}function Rc(t,e){return Us(t.getUTCMilliseconds(),e,3)}function jc(t,e){return Rc(t,e)+"000"}function $c(t,e){return Us(t.getUTCMonth()+1,e,2)}function Fc(t,e){return Us(t.getUTCMinutes(),e,2)}function zc(t,e){return Us(t.getUTCSeconds(),e,2)}function Hc(t){var e=t.getUTCDay();return 0===e?7:e}function Uc(t,e){return Us(xs.count(Ms(t)-1,t),e,2)}function Gc(t){var e=t.getUTCDay();return e>=4||0===e?Ts(t):Ts.ceil(t)}function qc(t,e){return t=Gc(t),Us(Ts.count(Ms(t),t)+(4===Ms(t).getUTCDay()),e,2)}function Kc(t){return t.getUTCDay()}function Yc(t,e){return Us(ks.count(Ms(t)-1,t),e,2)}function Wc(t,e){return Us(t.getUTCFullYear()%100,e,2)}function Xc(t,e){return Us((t=Gc(t)).getUTCFullYear()%100,e,2)}function Vc(t,e){return Us(t.getUTCFullYear()%1e4,e,4)}function Zc(t,e){var n=t.getUTCDay();return Us((t=n>=4||0===n?Ts(t):Ts.ceil(t)).getUTCFullYear()%1e4,e,4)}function Qc(){return "+0000"}function Jc(){return "%"}function tu(t){return +t}function eu(t){return Math.floor(+t/1e3)}function nu(t){return Rs=Bs(t),js=Rs.format,Rs.parse,Rs.utcFormat,Rs.utcParse,Rs}function iu(t){return new Date(t)}function ru(t){return t instanceof Date?+t:+new Date(+t)}function au(t,e,n,i,r,a,o,s,c,u){var l=Po(),h=l.invert,f=l.domain,d=u(".%L"),g=u(":%S"),p=u("%I:%M"),b=u("%I %p"),w=u("%a %d"),y=u("%b %d"),m=u("%B"),v=u("%Y");function x(t){return (c(t)1?0:t<-1?bu:Math.acos(t)}function vu(t){return t>=1?wu:t<=-1?-wu:Math.asin(t)}function xu(t){return t.innerRadius}function ku(t){return t.outerRadius}function _u(t){return t.startAngle}function Eu(t){return t.endAngle}function Tu(t){return t&&t.padAngle}function Cu(t,e,n,i,r,a,o,s){var c=n-t,u=i-e,l=o-r,h=s-a,f=h*c-l*u;if(!(f*fI*I+O*O&&(E=C,T=S),{cx:E,cy:T,x01:-l,y01:-h,x11:E*(r/x-1),y11:T*(r/x-1)}}function Au(){var t=xu,e=ku,n=su(0),i=null,r=_u,a=Eu,o=Tu,s=null;function c(){var c,u,l=+t.apply(this,arguments),h=+e.apply(this,arguments),f=r.apply(this,arguments)-wu,d=a.apply(this,arguments)-wu,g=cu(d-f),p=d>f;if(s||(s=c=Ka()),hpu)if(g>yu-pu)s.moveTo(h*lu(f),h*du(f)),s.arc(0,0,h,f,d,!p),l>pu&&(s.moveTo(l*lu(d),l*du(d)),s.arc(0,0,l,d,f,p));else {var b,w,y=f,m=d,v=f,x=d,k=g,_=g,E=o.apply(this,arguments)/2,T=E>pu&&(i?+i.apply(this,arguments):gu(l*l+h*h)),C=fu(cu(h-l)/2,+n.apply(this,arguments)),S=C,A=C;if(T>pu){var M=vu(T/l*du(E)),I=vu(T/h*du(E));(k-=2*M)>pu?(v+=M*=p?1:-1,x-=M):(k=0,v=x=(f+d)/2),(_-=2*I)>pu?(y+=I*=p?1:-1,m-=I):(_=0,y=m=(f+d)/2);}var O=h*lu(y),L=h*du(y),D=l*lu(x),N=l*du(x);if(C>pu){var P,B=h*lu(m),R=h*du(m),j=l*lu(v),$=l*du(v);if(gpu?A>pu?(b=Su(j,$,O,L,h,A,p),w=Su(B,R,D,N,h,A,p),s.moveTo(b.cx+b.x01,b.cy+b.y01),Apu&&k>pu?S>pu?(b=Su(D,N,B,R,l,-S,p),w=Su(O,L,j,$,l,-S,p),s.lineTo(b.cx+b.x01,b.cy+b.y01),St?1:e>=t?0:NaN}function Bu(t){return t}function Ru(){var t=Bu,e=Pu,n=null,i=su(0),r=su(yu),a=su(0);function o(o){var s,c,u,l,h,f=(o=Mu(o)).length,d=0,g=new Array(f),p=new Array(f),b=+i.apply(this,arguments),w=Math.min(yu,Math.max(-yu,r.apply(this,arguments)-b)),y=Math.min(Math.abs(w)/f,a.apply(this,arguments)),m=y*(w<0?-1:1);for(s=0;s0&&(d+=h);for(null!=e?g.sort((function(t,n){return e(p[t],p[n])})):null!=n&&g.sort((function(t,e){return n(o[t],o[e])})),s=0,u=d?(w-f*m)/d:0;s0?h*u:0)+m,p[c]={data:o[c],index:s,value:h,startAngle:b,endAngle:l,padAngle:y};return p}return o.value=function(e){return arguments.length?(t="function"==typeof e?e:su(+e),o):t},o.sortValues=function(t){return arguments.length?(e=t,n=null,o):e},o.sort=function(t){return arguments.length?(n=t,e=null,o):n},o.startAngle=function(t){return arguments.length?(i="function"==typeof t?t:su(+t),o):i},o.endAngle=function(t){return arguments.length?(r="function"==typeof t?t:su(+t),o):r},o.padAngle=function(t){return arguments.length?(a="function"==typeof t?t:su(+t),o):a},o}Iu.prototype={areaStart:function(){this._line=0;},areaEnd:function(){this._line=NaN;},lineStart:function(){this._point=0;},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line;},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e);}}};class ju{constructor(t,e){this._context=t,this._x=e;}areaStart(){this._line=0;}areaEnd(){this._line=NaN;}lineStart(){this._point=0;}lineEnd(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line;}point(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,e,t,e):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+e)/2,t,this._y0,t,e);}this._x0=t,this._y0=e;}}function $u(t){return new ju(t,!0)}function Fu(t){return new ju(t,!1)}function zu(){}function Hu(t,e,n){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+e)/6,(t._y0+4*t._y1+n)/6);}function Uu(t){this._context=t;}function Gu(t){return new Uu(t)}function qu(t){this._context=t;}function Ku(t){return new qu(t)}function Yu(t){this._context=t;}function Wu(t){return new Yu(t)}function Xu(t,e){this._basis=new Uu(t),this._beta=e;}Uu.prototype={areaStart:function(){this._line=0;},areaEnd:function(){this._line=NaN;},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0;},lineEnd:function(){switch(this._point){case 3:Hu(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line;},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:Hu(this,t,e);}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e;}},qu.prototype={areaStart:zu,areaEnd:zu,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0;},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x2=t,this._y2=e;break;case 1:this._point=2,this._x3=t,this._y3=e;break;case 2:this._point=3,this._x4=t,this._y4=e,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+e)/6);break;default:Hu(this,t,e);}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e;}},Yu.prototype={areaStart:function(){this._line=0;},areaEnd:function(){this._line=NaN;},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0;},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line;},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+t)/6,i=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(n,i):this._context.moveTo(n,i);break;case 3:this._point=4;default:Hu(this,t,e);}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e;}},Xu.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart();},lineEnd:function(){var t=this._x,e=this._y,n=t.length-1;if(n>0)for(var i,r=t[0],a=e[0],o=t[n]-r,s=e[n]-a,c=-1;++c<=n;)i=c/n,this._basis.point(this._beta*t[c]+(1-this._beta)*(r+i*o),this._beta*e[c]+(1-this._beta)*(a+i*s));this._x=this._y=null,this._basis.lineEnd();},point:function(t,e){this._x.push(+t),this._y.push(+e);}};const Vu=function t(e){function n(t){return 1===e?new Uu(t):new Xu(t,e)}return n.beta=function(e){return t(+e)},n}(.85);function Zu(t,e,n){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-n),t._x2,t._y2);}function Qu(t,e){this._context=t,this._k=(1-e)/6;}Qu.prototype={areaStart:function(){this._line=0;},areaEnd:function(){this._line=NaN;},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0;},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:Zu(this,this._x1,this._y1);}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line;},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:Zu(this,t,e);}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e;}};const Ju=function t(e){function n(t){return new Qu(t,e)}return n.tension=function(e){return t(+e)},n}(0);function tl(t,e){this._context=t,this._k=(1-e)/6;}tl.prototype={areaStart:zu,areaEnd:zu,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0;},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:Zu(this,t,e);}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e;}};const el=function t(e){function n(t){return new tl(t,e)}return n.tension=function(e){return t(+e)},n}(0);function nl(t,e){this._context=t,this._k=(1-e)/6;}nl.prototype={areaStart:function(){this._line=0;},areaEnd:function(){this._line=NaN;},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0;},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line;},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Zu(this,t,e);}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e;}};const il=function t(e){function n(t){return new nl(t,e)}return n.tension=function(e){return t(+e)},n}(0);function rl(t,e,n){var i=t._x1,r=t._y1,a=t._x2,o=t._y2;if(t._l01_a>pu){var s=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,c=3*t._l01_a*(t._l01_a+t._l12_a);i=(i*s-t._x0*t._l12_2a+t._x2*t._l01_2a)/c,r=(r*s-t._y0*t._l12_2a+t._y2*t._l01_2a)/c;}if(t._l23_a>pu){var u=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,l=3*t._l23_a*(t._l23_a+t._l12_a);a=(a*u+t._x1*t._l23_2a-e*t._l12_2a)/l,o=(o*u+t._y1*t._l23_2a-n*t._l12_2a)/l;}t._context.bezierCurveTo(i,r,a,o,t._x2,t._y2);}function al(t,e){this._context=t,this._alpha=e;}al.prototype={areaStart:function(){this._line=0;},areaEnd:function(){this._line=NaN;},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0;},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line;},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,i=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+i*i,this._alpha));}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:rl(this,t,e);}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e;}};const ol=function t(e){function n(t){return e?new al(t,e):new Qu(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function sl(t,e){this._context=t,this._alpha=e;}sl.prototype={areaStart:zu,areaEnd:zu,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0;},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);}},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,i=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+i*i,this._alpha));}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:rl(this,t,e);}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e;}};const cl=function t(e){function n(t){return e?new sl(t,e):new tl(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function ul(t,e){this._context=t,this._alpha=e;}ul.prototype={areaStart:function(){this._line=0;},areaEnd:function(){this._line=NaN;},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0;},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line;},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,i=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+i*i,this._alpha));}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:rl(this,t,e);}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e;}};const ll=function t(e){function n(t){return e?new ul(t,e):new nl(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function hl(t){this._context=t;}function fl(t){return new hl(t)}function dl(t){return t<0?-1:1}function gl(t,e,n){var i=t._x1-t._x0,r=e-t._x1,a=(t._y1-t._y0)/(i||r<0&&-0),o=(n-t._y1)/(r||i<0&&-0),s=(a*r+o*i)/(i+r);return (dl(a)+dl(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function pl(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function bl(t,e,n){var i=t._x0,r=t._y0,a=t._x1,o=t._y1,s=(a-i)/3;t._context.bezierCurveTo(i+s,r+s*e,a-s,o-s*n,a,o);}function wl(t){this._context=t;}function yl(t){this._context=new ml(t);}function ml(t){this._context=t;}function vl(t){return new wl(t)}function xl(t){return new yl(t)}function kl(t){this._context=t;}function _l(t){var e,n,i=t.length-1,r=new Array(i),a=new Array(i),o=new Array(i);for(r[0]=0,a[0]=2,o[0]=t[0]+2*t[1],e=1;e=0;--e)r[e]=(o[e]-r[e+1])/a[e];for(a[i-1]=(t[i]+r[i-1])/2,e=0;et.length)&&(e=t.length);for(var n=0,i=new Array(e);n=0&&(this._t=1-this._t,this._line=1-this._line);},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else {var n=this._x*(1-this._t)+t*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,e);}}this._x=t,this._y=e;}},Ml.prototype={constructor:Ml,scale:function(t){return 1===t?this:new Ml(this.k*t,this.x,this.y)},translate:function(t,e){return 0===t&0===e?this:new Ml(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return [t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return [(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return (t-this.x)/this.k},invertY:function(t){return (t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return "translate("+this.x+","+this.y+") scale("+this.k+")"}},Ml.prototype;var Fl=Object.hasOwnProperty,zl=Object.setPrototypeOf,Hl=Object.isFrozen,Ul=Object.getPrototypeOf,Gl=Object.getOwnPropertyDescriptor,ql=Object.freeze,Kl=Object.seal,Yl=Object.create,Wl="undefined"!=typeof Reflect&&Reflect,Xl=Wl.apply,Vl=Wl.construct;Xl||(Xl=function(t,e,n){return t.apply(e,n)}),ql||(ql=function(t){return t}),Kl||(Kl=function(t){return t}),Vl||(Vl=function(t,e){return Dl(t,Nl(e))});var Zl=ch(Array.prototype.forEach),Ql=ch(Array.prototype.pop),Jl=ch(Array.prototype.push),th=ch(String.prototype.toLowerCase),eh=ch(String.prototype.toString),nh=ch(String.prototype.match),ih=ch(String.prototype.replace),rh=ch(String.prototype.indexOf),ah=ch(String.prototype.trim),oh=ch(RegExp.prototype.test),sh=uh(TypeError);function ch(t){return function(e){for(var n=arguments.length,i=new Array(n>1?n-1:0),r=1;r/gm),Ch=Kl(/\${[\w\W]*}/gm),Sh=Kl(/^data-[\-\w.\u00B7-\uFFFF]/),Ah=Kl(/^aria-[\-\w]+$/),Mh=Kl(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Ih=Kl(/^(?:\w+script|data):/i),Oh=Kl(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Lh=Kl(/^html$/i),Dh=function(){return "undefined"==typeof window?null:window},Nh=function(t,e){if("object"!==Il(t)||"function"!=typeof t.createPolicy)return null;var n=null,i="data-tt-policy-suffix";e.currentScript&&e.currentScript.hasAttribute(i)&&(n=e.currentScript.getAttribute(i));var r="dompurify"+(n?"#"+n:"");try{return t.createPolicy(r,{createHTML:function(t){return t},createScriptURL:function(t){return t}})}catch(t){return console.warn("TrustedTypes policy "+r+" could not be created."),null}};function Ph(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Dh(),e=function(t){return Ph(t)};if(e.version="2.4.3",e.removed=[],!t||!t.document||9!==t.document.nodeType)return e.isSupported=!1,e;var n=t.document,i=t.document,r=t.DocumentFragment,a=t.HTMLTemplateElement,o=t.Node,s=t.Element,c=t.NodeFilter,u=t.NamedNodeMap,l=void 0===u?t.NamedNodeMap||t.MozNamedAttrMap:u,h=t.HTMLFormElement,f=t.DOMParser,d=t.trustedTypes,g=s.prototype,p=fh(g,"cloneNode"),b=fh(g,"nextSibling"),w=fh(g,"childNodes"),y=fh(g,"parentNode");if("function"==typeof a){var m=i.createElement("template");m.content&&m.content.ownerDocument&&(i=m.content.ownerDocument);}var v=Nh(d,n),x=v?v.createHTML(""):"",k=i,_=k.implementation,E=k.createNodeIterator,T=k.createDocumentFragment,C=k.getElementsByTagName,S=n.importNode,A={};try{A=hh(i).documentMode?i.documentMode:{};}catch(t){}var M={};e.isSupported="function"==typeof y&&_&&void 0!==_.createHTMLDocument&&9!==A;var I,O,L=Eh,D=Th,N=Ch,P=Sh,B=Ah,R=Ih,j=Oh,$=Mh,F=null,z=lh({},[].concat(Nl(dh),Nl(gh),Nl(ph),Nl(wh),Nl(mh))),H=null,U=lh({},[].concat(Nl(vh),Nl(xh),Nl(kh),Nl(_h))),G=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),q=null,K=null,Y=!0,W=!0,X=!1,V=!1,Z=!1,Q=!1,J=!1,tt=!1,et=!1,nt=!1,it=!0,rt=!1,at="user-content-",ot=!0,st=!1,ct={},ut=null,lt=lh({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),ht=null,ft=lh({},["audio","video","img","source","image","track"]),dt=null,gt=lh({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),pt="http://www.w3.org/1998/Math/MathML",bt="http://www.w3.org/2000/svg",wt="http://www.w3.org/1999/xhtml",yt=wt,mt=!1,vt=null,xt=lh({},[pt,bt,wt],eh),kt=["application/xhtml+xml","text/html"],_t="text/html",Et=null,Tt=i.createElement("form"),Ct=function(t){return t instanceof RegExp||t instanceof Function},St=function(t){Et&&Et===t||(t&&"object"===Il(t)||(t={}),t=hh(t),I=I=-1===kt.indexOf(t.PARSER_MEDIA_TYPE)?_t:t.PARSER_MEDIA_TYPE,O="application/xhtml+xml"===I?eh:th,F="ALLOWED_TAGS"in t?lh({},t.ALLOWED_TAGS,O):z,H="ALLOWED_ATTR"in t?lh({},t.ALLOWED_ATTR,O):U,vt="ALLOWED_NAMESPACES"in t?lh({},t.ALLOWED_NAMESPACES,eh):xt,dt="ADD_URI_SAFE_ATTR"in t?lh(hh(gt),t.ADD_URI_SAFE_ATTR,O):gt,ht="ADD_DATA_URI_TAGS"in t?lh(hh(ft),t.ADD_DATA_URI_TAGS,O):ft,ut="FORBID_CONTENTS"in t?lh({},t.FORBID_CONTENTS,O):lt,q="FORBID_TAGS"in t?lh({},t.FORBID_TAGS,O):{},K="FORBID_ATTR"in t?lh({},t.FORBID_ATTR,O):{},ct="USE_PROFILES"in t&&t.USE_PROFILES,Y=!1!==t.ALLOW_ARIA_ATTR,W=!1!==t.ALLOW_DATA_ATTR,X=t.ALLOW_UNKNOWN_PROTOCOLS||!1,V=t.SAFE_FOR_TEMPLATES||!1,Z=t.WHOLE_DOCUMENT||!1,tt=t.RETURN_DOM||!1,et=t.RETURN_DOM_FRAGMENT||!1,nt=t.RETURN_TRUSTED_TYPE||!1,J=t.FORCE_BODY||!1,it=!1!==t.SANITIZE_DOM,rt=t.SANITIZE_NAMED_PROPS||!1,ot=!1!==t.KEEP_CONTENT,st=t.IN_PLACE||!1,$=t.ALLOWED_URI_REGEXP||$,yt=t.NAMESPACE||wt,t.CUSTOM_ELEMENT_HANDLING&&Ct(t.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(G.tagNameCheck=t.CUSTOM_ELEMENT_HANDLING.tagNameCheck),t.CUSTOM_ELEMENT_HANDLING&&Ct(t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(G.attributeNameCheck=t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),t.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(G.allowCustomizedBuiltInElements=t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),V&&(W=!1),et&&(tt=!0),ct&&(F=lh({},Nl(mh)),H=[],!0===ct.html&&(lh(F,dh),lh(H,vh)),!0===ct.svg&&(lh(F,gh),lh(H,xh),lh(H,_h)),!0===ct.svgFilters&&(lh(F,ph),lh(H,xh),lh(H,_h)),!0===ct.mathMl&&(lh(F,wh),lh(H,kh),lh(H,_h))),t.ADD_TAGS&&(F===z&&(F=hh(F)),lh(F,t.ADD_TAGS,O)),t.ADD_ATTR&&(H===U&&(H=hh(H)),lh(H,t.ADD_ATTR,O)),t.ADD_URI_SAFE_ATTR&&lh(dt,t.ADD_URI_SAFE_ATTR,O),t.FORBID_CONTENTS&&(ut===lt&&(ut=hh(ut)),lh(ut,t.FORBID_CONTENTS,O)),ot&&(F["#text"]=!0),Z&&lh(F,["html","head","body"]),F.table&&(lh(F,["tbody"]),delete q.tbody),ql&&ql(t),Et=t);},At=lh({},["mi","mo","mn","ms","mtext"]),Mt=lh({},["foreignobject","desc","title","annotation-xml"]),It=lh({},["title","style","font","a","script"]),Ot=lh({},gh);lh(Ot,ph),lh(Ot,bh);var Lt=lh({},wh);lh(Lt,yh);var Dt=function(t){var e=y(t);e&&e.tagName||(e={namespaceURI:yt,tagName:"template"});var n=th(t.tagName),i=th(e.tagName);return !!vt[t.namespaceURI]&&(t.namespaceURI===bt?e.namespaceURI===wt?"svg"===n:e.namespaceURI===pt?"svg"===n&&("annotation-xml"===i||At[i]):Boolean(Ot[n]):t.namespaceURI===pt?e.namespaceURI===wt?"math"===n:e.namespaceURI===bt?"math"===n&&Mt[i]:Boolean(Lt[n]):t.namespaceURI===wt?!(e.namespaceURI===bt&&!Mt[i])&&!(e.namespaceURI===pt&&!At[i])&&!Lt[n]&&(It[n]||!Ot[n]):!("application/xhtml+xml"!==I||!vt[t.namespaceURI]))},Nt=function(t){Jl(e.removed,{element:t});try{t.parentNode.removeChild(t);}catch(e){try{t.outerHTML=x;}catch(e){t.remove();}}},Pt=function(t,n){try{Jl(e.removed,{attribute:n.getAttributeNode(t),from:n});}catch(t){Jl(e.removed,{attribute:null,from:n});}if(n.removeAttribute(t),"is"===t&&!H[t])if(tt||et)try{Nt(n);}catch(t){}else try{n.setAttribute(t,"");}catch(t){}},Bt=function(t){var e,n;if(J)t=""+t;else {var r=nh(t,/^[\r\n\t ]+/);n=r&&r[0];}"application/xhtml+xml"===I&&yt===wt&&(t=''+t+"");var a=v?v.createHTML(t):t;if(yt===wt)try{e=(new f).parseFromString(a,I);}catch(t){}if(!e||!e.documentElement){e=_.createDocument(yt,"template",null);try{e.documentElement.innerHTML=mt?x:a;}catch(t){}}var o=e.body||e.documentElement;return t&&n&&o.insertBefore(i.createTextNode(n),o.childNodes[0]||null),yt===wt?C.call(e,Z?"html":"body")[0]:Z?e.documentElement:o},Rt=function(t){return E.call(t.ownerDocument||t,t,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT,null,!1)},jt=function(t){return t instanceof h&&("string"!=typeof t.nodeName||"string"!=typeof t.textContent||"function"!=typeof t.removeChild||!(t.attributes instanceof l)||"function"!=typeof t.removeAttribute||"function"!=typeof t.setAttribute||"string"!=typeof t.namespaceURI||"function"!=typeof t.insertBefore||"function"!=typeof t.hasChildNodes)},$t=function(t){return "object"===Il(o)?t instanceof o:t&&"object"===Il(t)&&"number"==typeof t.nodeType&&"string"==typeof t.nodeName},Ft=function(t,n,i){M[t]&&Zl(M[t],(function(t){t.call(e,n,i,Et);}));},zt=function(t){var n;if(Ft("beforeSanitizeElements",t,null),jt(t))return Nt(t),!0;if(oh(/[\u0080-\uFFFF]/,t.nodeName))return Nt(t),!0;var i=O(t.nodeName);if(Ft("uponSanitizeElement",t,{tagName:i,allowedTags:F}),t.hasChildNodes()&&!$t(t.firstElementChild)&&(!$t(t.content)||!$t(t.content.firstElementChild))&&oh(/<[/\w]/g,t.innerHTML)&&oh(/<[/\w]/g,t.textContent))return Nt(t),!0;if("select"===i&&oh(/