import{a as qa,d as za}from"./chunk-OSRY5VT3.min.js";var Pa=qa((Wo,Uo)=>{(function(t,e){typeof Wo=="object"&&typeof Uo<"u"?Uo.exports=e():typeof define=="function"&&define.amd?define(e):(t=typeof globalThis<"u"?globalThis:t||self).dayjs=e()})(Wo,function(){"use strict";var t=1e3,e=6e4,r=36e5,i="millisecond",o="second",n="minute",a="hour",s="day",h="week",l="month",c="quarter",d="year",u="date",p="Invalid Date",S=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,A=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,W={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(v){var g=["th","st","nd","rd"],x=v%100;return"["+v+(g[(x-20)%10]||g[x]||g[0])+"]"}},$=function(v,g,x){var L=String(v);return!L||L.length>=g?v:""+Array(g+1-L.length).join(x)+v},V={s:$,z:function(v){var g=-v.utcOffset(),x=Math.abs(g),L=Math.floor(x/60),k=x%60;return(g<=0?"+":"-")+$(L,2,"0")+":"+$(k,2,"0")},m:function v(g,x){if(g.date()1)return v(I[0])}else{var G=g.name;F[G]=g,k=G}return!L&&k&&(M=k),k||!L&&M},w=function(v,g){if(T(v))return v.clone();var x=typeof g=="object"?g:{};return x.date=v,x.args=arguments,new K(x)},H=V;H.l=j,H.i=T,H.w=function(v,g){return w(v,{locale:g.$L,utc:g.$u,x:g.$x,$offset:g.$offset})};var K=function(){function v(x){this.$L=j(x.locale,null,!0),this.parse(x),this.$x=this.$x||x.x||{},this[U]=!0}var g=v.prototype;return g.parse=function(x){this.$d=function(L){var k=L.date,R=L.utc;if(k===null)return new Date(NaN);if(H.u(k))return new Date;if(k instanceof Date)return new Date(k);if(typeof k=="string"&&!/Z$/i.test(k)){var I=k.match(S);if(I){var G=I[2]-1||0,J=(I[7]||"0").substring(0,3);return R?new Date(Date.UTC(I[1],G,I[3]||1,I[4]||0,I[5]||0,I[6]||0,J)):new Date(I[1],G,I[3]||1,I[4]||0,I[5]||0,I[6]||0,J)}}return new Date(k)}(x),this.init()},g.init=function(){var x=this.$d;this.$y=x.getFullYear(),this.$M=x.getMonth(),this.$D=x.getDate(),this.$W=x.getDay(),this.$H=x.getHours(),this.$m=x.getMinutes(),this.$s=x.getSeconds(),this.$ms=x.getMilliseconds()},g.$utils=function(){return H},g.isValid=function(){return this.$d.toString()!==p},g.isSame=function(x,L){var k=w(x);return this.startOf(L)<=k&&k<=this.endOf(L)},g.isAfter=function(x,L){return w(x){(function(t,e){typeof Vo=="object"&&typeof Xo<"u"?Xo.exports=e():typeof define=="function"&&define.amd?define(e):(t=typeof globalThis<"u"?globalThis:t||self,t.DOMPurify=e())})(Vo,function(){"use strict";let{entries:t,setPrototypeOf:e,isFrozen:r,getPrototypeOf:i,getOwnPropertyDescriptor:o}=Object,{freeze:n,seal:a,create:s}=Object,{apply:h,construct:l}=typeof Reflect<"u"&&Reflect;n||(n=function(z){return z}),a||(a=function(z){return z}),h||(h=function(z,et,Z){return z.apply(et,Z)}),l||(l=function(z,et){return new z(...et)});let c=T(Array.prototype.forEach),d=T(Array.prototype.pop),u=T(Array.prototype.push),p=T(String.prototype.toLowerCase),S=T(String.prototype.toString),A=T(String.prototype.match),W=T(String.prototype.replace),$=T(String.prototype.indexOf),V=T(String.prototype.trim),M=T(Object.prototype.hasOwnProperty),F=T(RegExp.prototype.test),U=j(TypeError);function T(Q){return function(z){for(var et=arguments.length,Z=new Array(et>1?et-1:0),Ft=1;Ft2&&arguments[2]!==void 0?arguments[2]:p;e&&e(Q,null);let Z=z.length;for(;Z--;){let Ft=z[Z];if(typeof Ft=="string"){let ne=et(Ft);ne!==Ft&&(r(z)||(z[Z]=ne),Ft=ne)}Q[Ft]=!0}return Q}function H(Q){for(let z=0;z/gm),ut=a(/\${[\w\W]*}/gm),$t=a(/^data-[\-\w.\u00B7-\uFFFF]/),Mt=a(/^aria-[\-\w]+$/),ht=a(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),B=a(/^(?:\w+script|data):/i),Y=a(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),X=a(/^html$/i),C=a(/^[a-z][.\w]*(-[.\w]+)+$/i);var Tt=Object.freeze({__proto__:null,MUSTACHE_EXPR:mt,ERB_EXPR:Rt,TMPLIT_EXPR:ut,DATA_ATTR:$t,ARIA_ATTR:Mt,IS_ALLOWED_URI:ht,IS_SCRIPT_OR_DATA:B,ATTR_WHITESPACE:Y,DOCTYPE_NAME:X,CUSTOM_ELEMENT:C});let tt={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},At=function(){return typeof window>"u"?null:window},Et=function(z,et){if(typeof z!="object"||typeof z.createPolicy!="function")return null;let Z=null,Ft="data-tt-policy-suffix";et&&et.hasAttribute(Ft)&&(Z=et.getAttribute(Ft));let ne="dompurify"+(Z?"#"+Z:"");try{return z.createPolicy(ne,{createHTML(Ze){return Ze},createScriptURL(Ze){return Ze}})}catch{return console.warn("TrustedTypes policy "+ne+" could not be created."),null}};function Zt(){let Q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:At(),z=P=>Zt(P);if(z.version="3.1.6",z.removed=[],!Q||!Q.document||Q.document.nodeType!==tt.document)return z.isSupported=!1,z;let{document:et}=Q,Z=et,Ft=Z.currentScript,{DocumentFragment:ne,HTMLTemplateElement:Ze,Node:Bo,Element:ha,NodeFilter:wr,NamedNodeMap:zc=Q.NamedNodeMap||Q.MozNamedAttrMap,HTMLFormElement:Pc,DOMParser:$c,trustedTypes:ui}=Q,Br=ha.prototype,Wc=E(Br,"cloneNode"),Uc=E(Br,"remove"),Hc=E(Br,"nextSibling"),Yc=E(Br,"childNodes"),fi=E(Br,"parentNode");if(typeof Ze=="function"){let P=et.createElement("template");P.content&&P.content.ownerDocument&&(et=P.content.ownerDocument)}let Dt,Fr="",{implementation:Fo,createNodeIterator:Gc,createDocumentFragment:Vc,getElementsByTagName:Xc}=et,{importNode:jc}=Z,Kt={};z.isSupported=typeof t=="function"&&typeof fi=="function"&&Fo&&Fo.createHTMLDocument!==void 0;let{MUSTACHE_EXPR:Lo,ERB_EXPR:Mo,TMPLIT_EXPR:Ao,DATA_ATTR:Zc,ARIA_ATTR:Kc,IS_SCRIPT_OR_DATA:Qc,ATTR_WHITESPACE:ca,CUSTOM_ELEMENT:Jc}=Tt,{IS_ALLOWED_URI:ua}=Tt,xt=null,fa=w({},[...v,...g,...x,...k,...I]),yt=null,ma=w({},[...G,...J,...it,...ot]),ft=Object.seal(s(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}})),Lr=null,Eo=null,da=!0,Do=!0,pa=!1,ga=!0,Ke=!1,Oo=!0,Le=!1,Io=!1,No=!1,Qe=!1,mi=!1,di=!1,xa=!0,ya=!1,tu="user-content-",Ro=!0,Mr=!1,Je={},tr=null,Ca=w({},["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"]),_a=null,ba=w({},["audio","video","img","source","image","track"]),qo=null,Ta=w({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),pi="http://www.w3.org/1998/Math/MathML",gi="http://www.w3.org/2000/svg",ae="http://www.w3.org/1999/xhtml",er=ae,zo=!1,Po=null,eu=w({},[pi,gi,ae],S),Ar=null,ru=["application/xhtml+xml","text/html"],iu="text/html",Ct=null,rr=null,ou=et.createElement("form"),ka=function(f){return f instanceof RegExp||f instanceof Function},$o=function(){let f=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(rr&&rr===f)){if((!f||typeof f!="object")&&(f={}),f=K(f),Ar=ru.indexOf(f.PARSER_MEDIA_TYPE)===-1?iu:f.PARSER_MEDIA_TYPE,Ct=Ar==="application/xhtml+xml"?S:p,xt=M(f,"ALLOWED_TAGS")?w({},f.ALLOWED_TAGS,Ct):fa,yt=M(f,"ALLOWED_ATTR")?w({},f.ALLOWED_ATTR,Ct):ma,Po=M(f,"ALLOWED_NAMESPACES")?w({},f.ALLOWED_NAMESPACES,S):eu,qo=M(f,"ADD_URI_SAFE_ATTR")?w(K(Ta),f.ADD_URI_SAFE_ATTR,Ct):Ta,_a=M(f,"ADD_DATA_URI_TAGS")?w(K(ba),f.ADD_DATA_URI_TAGS,Ct):ba,tr=M(f,"FORBID_CONTENTS")?w({},f.FORBID_CONTENTS,Ct):Ca,Lr=M(f,"FORBID_TAGS")?w({},f.FORBID_TAGS,Ct):{},Eo=M(f,"FORBID_ATTR")?w({},f.FORBID_ATTR,Ct):{},Je=M(f,"USE_PROFILES")?f.USE_PROFILES:!1,da=f.ALLOW_ARIA_ATTR!==!1,Do=f.ALLOW_DATA_ATTR!==!1,pa=f.ALLOW_UNKNOWN_PROTOCOLS||!1,ga=f.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Ke=f.SAFE_FOR_TEMPLATES||!1,Oo=f.SAFE_FOR_XML!==!1,Le=f.WHOLE_DOCUMENT||!1,Qe=f.RETURN_DOM||!1,mi=f.RETURN_DOM_FRAGMENT||!1,di=f.RETURN_TRUSTED_TYPE||!1,No=f.FORCE_BODY||!1,xa=f.SANITIZE_DOM!==!1,ya=f.SANITIZE_NAMED_PROPS||!1,Ro=f.KEEP_CONTENT!==!1,Mr=f.IN_PLACE||!1,ua=f.ALLOWED_URI_REGEXP||ht,er=f.NAMESPACE||ae,ft=f.CUSTOM_ELEMENT_HANDLING||{},f.CUSTOM_ELEMENT_HANDLING&&ka(f.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(ft.tagNameCheck=f.CUSTOM_ELEMENT_HANDLING.tagNameCheck),f.CUSTOM_ELEMENT_HANDLING&&ka(f.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(ft.attributeNameCheck=f.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),f.CUSTOM_ELEMENT_HANDLING&&typeof f.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(ft.allowCustomizedBuiltInElements=f.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Ke&&(Do=!1),mi&&(Qe=!0),Je&&(xt=w({},I),yt=[],Je.html===!0&&(w(xt,v),w(yt,G)),Je.svg===!0&&(w(xt,g),w(yt,J),w(yt,ot)),Je.svgFilters===!0&&(w(xt,x),w(yt,J),w(yt,ot)),Je.mathMl===!0&&(w(xt,k),w(yt,it),w(yt,ot))),f.ADD_TAGS&&(xt===fa&&(xt=K(xt)),w(xt,f.ADD_TAGS,Ct)),f.ADD_ATTR&&(yt===ma&&(yt=K(yt)),w(yt,f.ADD_ATTR,Ct)),f.ADD_URI_SAFE_ATTR&&w(qo,f.ADD_URI_SAFE_ATTR,Ct),f.FORBID_CONTENTS&&(tr===Ca&&(tr=K(tr)),w(tr,f.FORBID_CONTENTS,Ct)),Ro&&(xt["#text"]=!0),Le&&w(xt,["html","head","body"]),xt.table&&(w(xt,["tbody"]),delete Lr.tbody),f.TRUSTED_TYPES_POLICY){if(typeof f.TRUSTED_TYPES_POLICY.createHTML!="function")throw U('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof f.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw U('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');Dt=f.TRUSTED_TYPES_POLICY,Fr=Dt.createHTML("")}else Dt===void 0&&(Dt=Et(ui,Ft)),Dt!==null&&typeof Fr=="string"&&(Fr=Dt.createHTML(""));n&&n(f),rr=f}},Sa=w({},["mi","mo","mn","ms","mtext"]),va=w({},["foreignobject","annotation-xml"]),nu=w({},["title","style","font","a","script"]),wa=w({},[...g,...x,...L]),Ba=w({},[...k,...R]),au=function(f){let _=fi(f);(!_||!_.tagName)&&(_={namespaceURI:er,tagName:"template"});let O=p(f.tagName),st=p(_.tagName);return Po[f.namespaceURI]?f.namespaceURI===gi?_.namespaceURI===ae?O==="svg":_.namespaceURI===pi?O==="svg"&&(st==="annotation-xml"||Sa[st]):!!wa[O]:f.namespaceURI===pi?_.namespaceURI===ae?O==="math":_.namespaceURI===gi?O==="math"&&va[st]:!!Ba[O]:f.namespaceURI===ae?_.namespaceURI===gi&&!va[st]||_.namespaceURI===pi&&!Sa[st]?!1:!Ba[O]&&(nu[O]||!wa[O]):!!(Ar==="application/xhtml+xml"&&Po[f.namespaceURI]):!1},Qt=function(f){u(z.removed,{element:f});try{fi(f).removeChild(f)}catch{Uc(f)}},xi=function(f,_){try{u(z.removed,{attribute:_.getAttributeNode(f),from:_})}catch{u(z.removed,{attribute:null,from:_})}if(_.removeAttribute(f),f==="is"&&!yt[f])if(Qe||mi)try{Qt(_)}catch{}else try{_.setAttribute(f,"")}catch{}},Fa=function(f){let _=null,O=null;if(No)f=""+f;else{let kt=A(f,/^[\r\n\t ]+/);O=kt&&kt[0]}Ar==="application/xhtml+xml"&&er===ae&&(f=''+f+"");let st=Dt?Dt.createHTML(f):f;if(er===ae)try{_=new $c().parseFromString(st,Ar)}catch{}if(!_||!_.documentElement){_=Fo.createDocument(er,"template",null);try{_.documentElement.innerHTML=zo?Fr:st}catch{}}let Lt=_.body||_.documentElement;return f&&O&&Lt.insertBefore(et.createTextNode(O),Lt.childNodes[0]||null),er===ae?Xc.call(_,Le?"html":"body")[0]:Le?_.documentElement:Lt},La=function(f){return Gc.call(f.ownerDocument||f,f,wr.SHOW_ELEMENT|wr.SHOW_COMMENT|wr.SHOW_TEXT|wr.SHOW_PROCESSING_INSTRUCTION|wr.SHOW_CDATA_SECTION,null)},Ma=function(f){return f instanceof Pc&&(typeof f.nodeName!="string"||typeof f.textContent!="string"||typeof f.removeChild!="function"||!(f.attributes instanceof zc)||typeof f.removeAttribute!="function"||typeof f.setAttribute!="function"||typeof f.namespaceURI!="string"||typeof f.insertBefore!="function"||typeof f.hasChildNodes!="function")},Aa=function(f){return typeof Bo=="function"&&f instanceof Bo},se=function(f,_,O){Kt[f]&&c(Kt[f],st=>{st.call(z,_,O,rr)})},Ea=function(f){let _=null;if(se("beforeSanitizeElements",f,null),Ma(f))return Qt(f),!0;let O=Ct(f.nodeName);if(se("uponSanitizeElement",f,{tagName:O,allowedTags:xt}),f.hasChildNodes()&&!Aa(f.firstElementChild)&&F(/<[/\w]/g,f.innerHTML)&&F(/<[/\w]/g,f.textContent)||f.nodeType===tt.progressingInstruction||Oo&&f.nodeType===tt.comment&&F(/<[/\w]/g,f.data))return Qt(f),!0;if(!xt[O]||Lr[O]){if(!Lr[O]&&Oa(O)&&(ft.tagNameCheck instanceof RegExp&&F(ft.tagNameCheck,O)||ft.tagNameCheck instanceof Function&&ft.tagNameCheck(O)))return!1;if(Ro&&!tr[O]){let st=fi(f)||f.parentNode,Lt=Yc(f)||f.childNodes;if(Lt&&st){let kt=Lt.length;for(let qt=kt-1;qt>=0;--qt){let Jt=Wc(Lt[qt],!0);Jt.__removalCount=(f.__removalCount||0)+1,st.insertBefore(Jt,Hc(f))}}}return Qt(f),!0}return f instanceof ha&&!au(f)||(O==="noscript"||O==="noembed"||O==="noframes")&&F(/<\/no(script|embed|frames)/i,f.innerHTML)?(Qt(f),!0):(Ke&&f.nodeType===tt.text&&(_=f.textContent,c([Lo,Mo,Ao],st=>{_=W(_,st," ")}),f.textContent!==_&&(u(z.removed,{element:f.cloneNode()}),f.textContent=_)),se("afterSanitizeElements",f,null),!1)},Da=function(f,_,O){if(xa&&(_==="id"||_==="name")&&(O in et||O in ou))return!1;if(!(Do&&!Eo[_]&&F(Zc,_))){if(!(da&&F(Kc,_))){if(!yt[_]||Eo[_]){if(!(Oa(f)&&(ft.tagNameCheck instanceof RegExp&&F(ft.tagNameCheck,f)||ft.tagNameCheck instanceof Function&&ft.tagNameCheck(f))&&(ft.attributeNameCheck instanceof RegExp&&F(ft.attributeNameCheck,_)||ft.attributeNameCheck instanceof Function&&ft.attributeNameCheck(_))||_==="is"&&ft.allowCustomizedBuiltInElements&&(ft.tagNameCheck instanceof RegExp&&F(ft.tagNameCheck,O)||ft.tagNameCheck instanceof Function&&ft.tagNameCheck(O))))return!1}else if(!qo[_]){if(!F(ua,W(O,ca,""))){if(!((_==="src"||_==="xlink:href"||_==="href")&&f!=="script"&&$(O,"data:")===0&&_a[f])){if(!(pa&&!F(Qc,W(O,ca,"")))){if(O)return!1}}}}}}return!0},Oa=function(f){return f!=="annotation-xml"&&A(f,Jc)},Ia=function(f){se("beforeSanitizeAttributes",f,null);let{attributes:_}=f;if(!_)return;let O={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:yt},st=_.length;for(;st--;){let Lt=_[st],{name:kt,namespaceURI:qt,value:Jt}=Lt,Er=Ct(kt),Ot=kt==="value"?Jt:V(Jt);if(O.attrName=Er,O.attrValue=Ot,O.keepAttr=!0,O.forceKeepAttr=void 0,se("uponSanitizeAttribute",f,O),Ot=O.attrValue,Oo&&F(/((--!?|])>)|<\/(style|title)/i,Ot)){xi(kt,f);continue}if(O.forceKeepAttr||(xi(kt,f),!O.keepAttr))continue;if(!ga&&F(/\/>/i,Ot)){xi(kt,f);continue}Ke&&c([Lo,Mo,Ao],Ra=>{Ot=W(Ot,Ra," ")});let Na=Ct(f.nodeName);if(Da(Na,Er,Ot)){if(ya&&(Er==="id"||Er==="name")&&(xi(kt,f),Ot=tu+Ot),Dt&&typeof ui=="object"&&typeof ui.getAttributeType=="function"&&!qt)switch(ui.getAttributeType(Na,Er)){case"TrustedHTML":{Ot=Dt.createHTML(Ot);break}case"TrustedScriptURL":{Ot=Dt.createScriptURL(Ot);break}}try{qt?f.setAttributeNS(qt,kt,Ot):f.setAttribute(kt,Ot),Ma(f)?Qt(f):d(z.removed)}catch{}}}se("afterSanitizeAttributes",f,null)},su=function P(f){let _=null,O=La(f);for(se("beforeSanitizeShadowDOM",f,null);_=O.nextNode();)se("uponSanitizeShadowNode",_,null),!Ea(_)&&(_.content instanceof ne&&P(_.content),Ia(_));se("afterSanitizeShadowDOM",f,null)};return z.sanitize=function(P){let f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},_=null,O=null,st=null,Lt=null;if(zo=!P,zo&&(P=""),typeof P!="string"&&!Aa(P))if(typeof P.toString=="function"){if(P=P.toString(),typeof P!="string")throw U("dirty is not a string, aborting")}else throw U("toString is not a function");if(!z.isSupported)return P;if(Io||$o(f),z.removed=[],typeof P=="string"&&(Mr=!1),Mr){if(P.nodeName){let Jt=Ct(P.nodeName);if(!xt[Jt]||Lr[Jt])throw U("root node is forbidden and cannot be sanitized in-place")}}else if(P instanceof Bo)_=Fa(""),O=_.ownerDocument.importNode(P,!0),O.nodeType===tt.element&&O.nodeName==="BODY"||O.nodeName==="HTML"?_=O:_.appendChild(O);else{if(!Qe&&!Ke&&!Le&&P.indexOf("<")===-1)return Dt&&di?Dt.createHTML(P):P;if(_=Fa(P),!_)return Qe?null:di?Fr:""}_&&No&&Qt(_.firstChild);let kt=La(Mr?P:_);for(;st=kt.nextNode();)Ea(st)||(st.content instanceof ne&&su(st.content),Ia(st));if(Mr)return P;if(Qe){if(mi)for(Lt=Vc.call(_.ownerDocument);_.firstChild;)Lt.appendChild(_.firstChild);else Lt=_;return(yt.shadowroot||yt.shadowrootmode)&&(Lt=jc.call(Z,Lt,!0)),Lt}let qt=Le?_.outerHTML:_.innerHTML;return Le&&xt["!doctype"]&&_.ownerDocument&&_.ownerDocument.doctype&&_.ownerDocument.doctype.name&&F(X,_.ownerDocument.doctype.name)&&(qt=" `+qt),Ke&&c([Lo,Mo,Ao],Jt=>{qt=W(qt,Jt," ")}),Dt&&di?Dt.createHTML(qt):qt},z.setConfig=function(){let P=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};$o(P),Io=!0},z.clearConfig=function(){rr=null,Io=!1},z.isValidAttribute=function(P,f,_){rr||$o({});let O=Ct(P),st=Ct(f);return Da(O,st,_)},z.addHook=function(P,f){typeof f=="function"&&(Kt[P]=Kt[P]||[],u(Kt[P],f))},z.removeHook=function(P){if(Kt[P])return d(Kt[P])},z.removeHooks=function(P){Kt[P]&&(Kt[P]=[])},z.removeAllHooks=function(){Kt={}},z}var ci=Zt();return ci})});var yi={min:{r:0,g:0,b:0,s:0,l:0,a:0},max:{r:255,g:255,b:255,h:360,s:100,l:100,a:1},clamp:{r:t=>t>=255?255:t<0?0:t,g:t=>t>=255?255:t<0?0:t,b:t=>t>=255?255:t<0?0:t,h:t=>t%360,s:t=>t>=100?100:t<0?0:t,l:t=>t>=100?100:t<0?0:t,a:t=>t>=1?1:t<0?0:t},toLinear:t=>{let e=t/255;return t>.03928?Math.pow((e+.055)/1.055,2.4):e/12.92},hue2rgb:(t,e,r)=>(r<0&&(r+=1),r>1&&(r-=1),r<.16666666666666666?t+(e-t)*6*r:r<.5?e:r<.6666666666666666?t+(e-t)*(.6666666666666666-r)*6:t),hsl2rgb:({h:t,s:e,l:r},i)=>{if(!e)return r*2.55;t/=360,e/=100,r/=100;let o=r<.5?r*(1+e):r+e-r*e,n=2*r-o;switch(i){case"r":return yi.hue2rgb(n,o,t+.3333333333333333)*255;case"g":return yi.hue2rgb(n,o,t)*255;case"b":return yi.hue2rgb(n,o,t-.3333333333333333)*255}},rgb2hsl:({r:t,g:e,b:r},i)=>{t/=255,e/=255,r/=255;let o=Math.max(t,e,r),n=Math.min(t,e,r),a=(o+n)/2;if(i==="l")return a*100;if(o===n)return 0;let s=o-n,h=a>.5?s/(2-o-n):s/(o+n);if(i==="s")return h*100;switch(o){case t:return((e-r)/s+(ee>r?Math.min(e,Math.max(r,t)):Math.min(r,Math.max(e,t)),round:t=>Math.round(t*1e10)/1e10},Wa=lu;var hu={dec2hex:t=>{let e=Math.round(t).toString(16);return e.length>1?e:`0${e}`}},Ua=hu;var cu={channel:$a,lang:Wa,unit:Ua},q=cu;var le={};for(let t=0;t<=255;t++)le[t]=q.unit.dec2hex(t);var dt={ALL:0,RGB:1,HSL:2};var Ho=class{constructor(){this.type=dt.ALL}get(){return this.type}set(e){if(this.type&&this.type!==e)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=e}reset(){this.type=dt.ALL}is(e){return this.type===e}},Ha=Ho;var Yo=class{constructor(e,r){this.color=r,this.changed=!1,this.data=e,this.type=new Ha}set(e,r){return this.color=r,this.changed=!1,this.data=e,this.type.type=dt.ALL,this}_ensureHSL(){let e=this.data,{h:r,s:i,l:o}=e;r===void 0&&(e.h=q.channel.rgb2hsl(e,"h")),i===void 0&&(e.s=q.channel.rgb2hsl(e,"s")),o===void 0&&(e.l=q.channel.rgb2hsl(e,"l"))}_ensureRGB(){let e=this.data,{r,g:i,b:o}=e;r===void 0&&(e.r=q.channel.hsl2rgb(e,"r")),i===void 0&&(e.g=q.channel.hsl2rgb(e,"g")),o===void 0&&(e.b=q.channel.hsl2rgb(e,"b"))}get r(){let e=this.data,r=e.r;return!this.type.is(dt.HSL)&&r!==void 0?r:(this._ensureHSL(),q.channel.hsl2rgb(e,"r"))}get g(){let e=this.data,r=e.g;return!this.type.is(dt.HSL)&&r!==void 0?r:(this._ensureHSL(),q.channel.hsl2rgb(e,"g"))}get b(){let e=this.data,r=e.b;return!this.type.is(dt.HSL)&&r!==void 0?r:(this._ensureHSL(),q.channel.hsl2rgb(e,"b"))}get h(){let e=this.data,r=e.h;return!this.type.is(dt.RGB)&&r!==void 0?r:(this._ensureRGB(),q.channel.rgb2hsl(e,"h"))}get s(){let e=this.data,r=e.s;return!this.type.is(dt.RGB)&&r!==void 0?r:(this._ensureRGB(),q.channel.rgb2hsl(e,"s"))}get l(){let e=this.data,r=e.l;return!this.type.is(dt.RGB)&&r!==void 0?r:(this._ensureRGB(),q.channel.rgb2hsl(e,"l"))}get a(){return this.data.a}set r(e){this.type.set(dt.RGB),this.changed=!0,this.data.r=e}set g(e){this.type.set(dt.RGB),this.changed=!0,this.data.g=e}set b(e){this.type.set(dt.RGB),this.changed=!0,this.data.b=e}set h(e){this.type.set(dt.HSL),this.changed=!0,this.data.h=e}set s(e){this.type.set(dt.HSL),this.changed=!0,this.data.s=e}set l(e){this.type.set(dt.HSL),this.changed=!0,this.data.l=e}set a(e){this.changed=!0,this.data.a=e}},Ya=Yo;var uu=new Ya({r:0,g:0,b:0,a:0},"transparent"),ye=uu;var Ga={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:t=>{if(t.charCodeAt(0)!==35)return;let e=t.match(Ga.re);if(!e)return;let r=e[1],i=parseInt(r,16),o=r.length,n=o%4===0,a=o>4,s=a?1:17,h=a?8:4,l=n?0:-1,c=a?255:15;return ye.set({r:(i>>h*(l+3)&c)*s,g:(i>>h*(l+2)&c)*s,b:(i>>h*(l+1)&c)*s,a:n?(i&c)*s/255:1},t)},stringify:t=>{let{r:e,g:r,b:i,a:o}=t;return o<1?`#${le[Math.round(e)]}${le[Math.round(r)]}${le[Math.round(i)]}${le[Math.round(o*255)]}`:`#${le[Math.round(e)]}${le[Math.round(r)]}${le[Math.round(i)]}`}},Me=Ga;var Ci={re:/^hsla?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(?:deg|grad|rad|turn)?)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(%)?))?\s*?\)$/i,hueRe:/^(.+?)(deg|grad|rad|turn)$/i,_hue2deg:t=>{let e=t.match(Ci.hueRe);if(e){let[,r,i]=e;switch(i){case"grad":return q.channel.clamp.h(parseFloat(r)*.9);case"rad":return q.channel.clamp.h(parseFloat(r)*180/Math.PI);case"turn":return q.channel.clamp.h(parseFloat(r)*360)}}return q.channel.clamp.h(parseFloat(t))},parse:t=>{let e=t.charCodeAt(0);if(e!==104&&e!==72)return;let r=t.match(Ci.re);if(!r)return;let[,i,o,n,a,s]=r;return ye.set({h:Ci._hue2deg(i),s:q.channel.clamp.s(parseFloat(o)),l:q.channel.clamp.l(parseFloat(n)),a:a?q.channel.clamp.a(s?parseFloat(a)/100:parseFloat(a)):1},t)},stringify:t=>{let{h:e,s:r,l:i,a:o}=t;return o<1?`hsla(${q.lang.round(e)}, ${q.lang.round(r)}%, ${q.lang.round(i)}%, ${o})`:`hsl(${q.lang.round(e)}, ${q.lang.round(r)}%, ${q.lang.round(i)}%)`}},Dr=Ci;var _i={colors:{aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyanaqua:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",transparent:"#00000000",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},parse:t=>{t=t.toLowerCase();let e=_i.colors[t];if(e)return Me.parse(e)},stringify:t=>{let e=Me.stringify(t);for(let r in _i.colors)if(_i.colors[r]===e)return r}},Go=_i;var Va={re:/^rgba?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?)))?\s*?\)$/i,parse:t=>{let e=t.charCodeAt(0);if(e!==114&&e!==82)return;let r=t.match(Va.re);if(!r)return;let[,i,o,n,a,s,h,l,c]=r;return ye.set({r:q.channel.clamp.r(o?parseFloat(i)*2.55:parseFloat(i)),g:q.channel.clamp.g(a?parseFloat(n)*2.55:parseFloat(n)),b:q.channel.clamp.b(h?parseFloat(s)*2.55:parseFloat(s)),a:l?q.channel.clamp.a(c?parseFloat(l)/100:parseFloat(l)):1},t)},stringify:t=>{let{r:e,g:r,b:i,a:o}=t;return o<1?`rgba(${q.lang.round(e)}, ${q.lang.round(r)}, ${q.lang.round(i)}, ${q.lang.round(o)})`:`rgb(${q.lang.round(e)}, ${q.lang.round(r)}, ${q.lang.round(i)})`}},Or=Va;var fu={format:{keyword:Go,hex:Me,rgb:Or,rgba:Or,hsl:Dr,hsla:Dr},parse:t=>{if(typeof t!="string")return t;let e=Me.parse(t)||Or.parse(t)||Dr.parse(t)||Go.parse(t);if(e)return e;throw new Error(`Unsupported color format: "${t}"`)},stringify:t=>!t.changed&&t.color?t.color:t.type.is(dt.HSL)||t.data.r===void 0?Dr.stringify(t):t.a<1||!Number.isInteger(t.r)||!Number.isInteger(t.g)||!Number.isInteger(t.b)?Or.stringify(t):Me.stringify(t)},pt=fu;var mu=(t,e)=>{let r=pt.parse(t);for(let i in e)r[i]=q.channel.clamp[i](e[i]);return pt.stringify(r)},bi=mu;var du=(t,e,r=0,i=1)=>{if(typeof t!="number")return bi(t,{a:e});let o=ye.set({r:q.channel.clamp.r(t),g:q.channel.clamp.g(e),b:q.channel.clamp.b(r),a:q.channel.clamp.a(i)});return pt.stringify(o)},he=du;var pu=(t,e)=>q.lang.round(pt.parse(t)[e]),gu=pu;var xu=t=>{let{r:e,g:r,b:i}=pt.parse(t),o=.2126*q.channel.toLinear(e)+.7152*q.channel.toLinear(r)+.0722*q.channel.toLinear(i);return q.lang.round(o)},Xa=xu;var yu=t=>Xa(t)>=.5,ja=yu;var Cu=t=>!ja(t),Yt=Cu;var _u=(t,e,r)=>{let i=pt.parse(t),o=i[e],n=q.channel.clamp[e](o+r);return o!==n&&(i[e]=n),pt.stringify(i)},Ti=_u;var bu=(t,e)=>Ti(t,"l",e),D=bu;var Tu=(t,e)=>Ti(t,"l",-e),N=Tu;var ku=(t,e)=>{let r=pt.parse(t),i={};for(let o in e)e[o]&&(i[o]=r[o]+e[o]);return bi(t,i)},m=ku;var Su=(t,e,r=50)=>{let{r:i,g:o,b:n,a}=pt.parse(t),{r:s,g:h,b:l,a:c}=pt.parse(e),d=r/100,u=d*2-1,p=a-c,A=((u*p===-1?u:(u+p)/(1+u*p))+1)/2,W=1-A,$=i*A+s*W,V=o*A+h*W,M=n*A+l*W,F=a*d+c*(1-d);return he($,V,M,F)},Za=Su;var vu=(t,e=100)=>{let r=pt.parse(t);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,Za(r,t,e)},b=vu;var os=za(Pa(),1);var nr=za(Ka(),1),is=Object.defineProperty,y=(t,e)=>is(t,"name",{value:e,configurable:!0}),wu=(t,e)=>{for(var r in e)is(t,r,{get:e[r],enumerable:!0})},ce={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},nt={trace:y((...t)=>{},"trace"),debug:y((...t)=>{},"debug"),info:y((...t)=>{},"info"),warn:y((...t)=>{},"warn"),error:y((...t)=>{},"error"),fatal:y((...t)=>{},"fatal")},Bu=y(function(t="fatal"){let e=ce.fatal;typeof t=="string"?t.toLowerCase()in ce&&(e=ce[t]):typeof t=="number"&&(e=t),nt.trace=()=>{},nt.debug=()=>{},nt.info=()=>{},nt.warn=()=>{},nt.error=()=>{},nt.fatal=()=>{},e<=ce.fatal&&(nt.fatal=console.error?console.error.bind(console,Ut("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",Ut("FATAL"))),e<=ce.error&&(nt.error=console.error?console.error.bind(console,Ut("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",Ut("ERROR"))),e<=ce.warn&&(nt.warn=console.warn?console.warn.bind(console,Ut("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",Ut("WARN"))),e<=ce.info&&(nt.info=console.info?console.info.bind(console,Ut("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",Ut("INFO"))),e<=ce.debug&&(nt.debug=console.debug?console.debug.bind(console,Ut("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",Ut("DEBUG"))),e<=ce.trace&&(nt.trace=console.debug?console.debug.bind(console,Ut("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",Ut("TRACE")))},"setLogLevel"),Ut=y(t=>`%c${(0,os.default)().format("ss.SSS")} : ${t} : `,"format"),Fu=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,Lu=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,Mu=/\s*%%.*\n/gm,Au=class extends Error{static{y(this,"UnknownDiagramError")}constructor(t){super(t),this.name="UnknownDiagramError"}},Si={},B0=y(function(t,e){t=t.replace(Fu,"").replace(Lu,"").replace(Mu,` `);for(let[r,{detector:i}]of Object.entries(Si))if(i(t,e))return r;throw new Au(`No diagram type detected matching given configuration for text: ${t}`)},"detectType"),F0=y((...t)=>{for(let{id:e,detector:r,loader:i}of t)ns(e,r,i)},"registerLazyLoadedDiagrams"),ns=y((t,e,r)=>{Si[t]&&nt.warn(`Detector with key ${t} already exists. Overwriting.`),Si[t]={detector:e,loader:r},nt.debug(`Detector with key ${t} added${r?" with loader":""}`)},"addDetector"),L0=y(t=>Si[t].loader,"getDiagramLoader"),jo=y((t,e,{depth:r=2,clobber:i=!1}={})=>{let o={depth:r,clobber:i};return Array.isArray(e)&&!Array.isArray(t)?(e.forEach(n=>jo(t,n,o)),t):Array.isArray(e)&&Array.isArray(t)?(e.forEach(n=>{t.includes(n)||t.push(n)}),t):t===void 0||r<=0?t!=null&&typeof t=="object"&&typeof e=="object"?Object.assign(t,e):e:(e!==void 0&&typeof t=="object"&&typeof e=="object"&&Object.keys(e).forEach(n=>{typeof e[n]=="object"&&(t[n]===void 0||typeof t[n]=="object")?(t[n]===void 0&&(t[n]=Array.isArray(e[n])?[]:{}),t[n]=jo(t[n],e[n],{depth:r-1,clobber:i})):(i||typeof t[n]!="object"&&typeof e[n]!="object")&&(t[n]=e[n])}),t)},"assignWithDepth"),Pt=jo,wi="#ffffff",Bi="#f2f2f2",It=y((t,e)=>e?m(t,{s:-40,l:10}):m(t,{s:-40,l:-10}),"mkBorder"),Eu=class{static{y(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||m(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||m(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||It(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||It(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||It(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||It(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||b(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||b(this.tertiaryColor),this.lineColor=this.lineColor||b(this.background),this.arrowheadColor=this.arrowheadColor||b(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?N(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||N(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||b(this.lineColor),this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||D(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||this.tertiaryColor,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||m(this.primaryColor,{h:30}),this.cScale4=this.cScale4||m(this.primaryColor,{h:60}),this.cScale5=this.cScale5||m(this.primaryColor,{h:90}),this.cScale6=this.cScale6||m(this.primaryColor,{h:120}),this.cScale7=this.cScale7||m(this.primaryColor,{h:150}),this.cScale8=this.cScale8||m(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||m(this.primaryColor,{h:270}),this.cScale10=this.cScale10||m(this.primaryColor,{h:300}),this.cScale11=this.cScale11||m(this.primaryColor,{h:330}),this.darkMode)for(let e=0;e{this[r]=t[r]}),this.updateColors(),e.forEach(r=>{this[r]=t[r]})}},Du=y(t=>{let e=new Eu;return e.calculate(t),e},"getThemeVariables"),Ou=class{static{y(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=D(this.primaryColor,16),this.tertiaryColor=m(this.primaryColor,{h:-160}),this.primaryBorderColor=b(this.background),this.secondaryBorderColor=It(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=It(this.tertiaryColor,this.darkMode),this.primaryTextColor=b(this.primaryColor),this.secondaryTextColor=b(this.secondaryColor),this.tertiaryTextColor=b(this.tertiaryColor),this.lineColor=b(this.background),this.textColor=b(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=D(b("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=he(255,255,255,.25),this.arrowheadColor="calculated",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#F9FFFE",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="calculated",this.activationBkgColor="calculated",this.sequenceNumberColor="black",this.sectionBkgColor=N("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=N(this.sectionBkgColor,10),this.taskBorderColor=he(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=he(255,255,255,50),this.activeTaskBkgColor="#81B1DB",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="grey",this.critBorderColor="#E83737",this.critBkgColor="#E83737",this.taskTextDarkColor="calculated",this.todayLineColor="#DB5757",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd"}updateColors(){this.secondBkg=D(this.mainBkg,16),this.lineColor=this.mainContrastColor,this.arrowheadColor=this.mainContrastColor,this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.edgeLabelBackground=D(this.labelBackground,25),this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.actorTextColor=this.mainContrastColor,this.actorLineColor=this.actorBorder,this.signalColor=this.mainContrastColor,this.signalTextColor=this.mainContrastColor,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.mainContrastColor,this.loopTextColor=this.mainContrastColor,this.noteBorderColor=this.secondaryBorderColor,this.noteBkgColor=this.secondBkg,this.noteTextColor=this.secondaryTextColor,this.activationBorderColor=this.border1,this.activationBkgColor=this.secondBkg,this.altSectionBkgColor=this.background,this.taskBkgColor=D(this.mainBkg,23),this.taskTextColor=this.darkTextColor,this.taskTextLightColor=this.mainContrastColor,this.taskTextOutsideColor=this.taskTextLightColor,this.gridColor=this.mainContrastColor,this.doneTaskBkgColor=this.mainContrastColor,this.taskTextDarkColor=this.darkTextColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#555",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#f4f4f4",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=m(this.primaryColor,{h:64}),this.fillType3=m(this.secondaryColor,{h:64}),this.fillType4=m(this.primaryColor,{h:-64}),this.fillType5=m(this.secondaryColor,{h:-64}),this.fillType6=m(this.primaryColor,{h:128}),this.fillType7=m(this.secondaryColor,{h:128}),this.cScale1=this.cScale1||"#0b0000",this.cScale2=this.cScale2||"#4d1037",this.cScale3=this.cScale3||"#3f5258",this.cScale4=this.cScale4||"#4f2f1b",this.cScale5=this.cScale5||"#6e0a0a",this.cScale6=this.cScale6||"#3b0048",this.cScale7=this.cScale7||"#995a01",this.cScale8=this.cScale8||"#154706",this.cScale9=this.cScale9||"#161722",this.cScale10=this.cScale10||"#00296f",this.cScale11=this.cScale11||"#01629c",this.cScale12=this.cScale12||"#010029",this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||m(this.primaryColor,{h:30}),this.cScale4=this.cScale4||m(this.primaryColor,{h:60}),this.cScale5=this.cScale5||m(this.primaryColor,{h:90}),this.cScale6=this.cScale6||m(this.primaryColor,{h:120}),this.cScale7=this.cScale7||m(this.primaryColor,{h:150}),this.cScale8=this.cScale8||m(this.primaryColor,{h:210}),this.cScale9=this.cScale9||m(this.primaryColor,{h:270}),this.cScale10=this.cScale10||m(this.primaryColor,{h:300}),this.cScale11=this.cScale11||m(this.primaryColor,{h:330});for(let t=0;t{this[r]=t[r]}),this.updateColors(),e.forEach(r=>{this[r]=t[r]})}},Iu=y(t=>{let e=new Ou;return e.calculate(t),e},"getThemeVariables"),Nu=class{static{y(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=m(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=m(this.primaryColor,{h:-160}),this.primaryBorderColor=It(this.primaryColor,this.darkMode),this.secondaryBorderColor=It(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=It(this.tertiaryColor,this.darkMode),this.primaryTextColor=b(this.primaryColor),this.secondaryTextColor=b(this.secondaryColor),this.tertiaryTextColor=b(this.tertiaryColor),this.lineColor=b(this.background),this.textColor=b(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.border2="#aaaa33",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="rgba(232,232,232, 0.8)",this.textColor="#333",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="calculated",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="calculated",this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor="calculated",this.taskTextOutsideColor=this.taskTextDarkColor,this.taskTextClickableColor="calculated",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBorderColor="calculated",this.critBkgColor="calculated",this.todayLineColor="calculated",this.sectionBkgColor=he(102,102,255,.49),this.altSectionBkgColor="white",this.sectionBkgColor2="#fff400",this.taskBorderColor="#534fbc",this.taskBkgColor="#8a90dd",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="#534fbc",this.activeTaskBkgColor="#bfc7ff",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.updateColors()}updateColors(){this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||m(this.primaryColor,{h:30}),this.cScale4=this.cScale4||m(this.primaryColor,{h:60}),this.cScale5=this.cScale5||m(this.primaryColor,{h:90}),this.cScale6=this.cScale6||m(this.primaryColor,{h:120}),this.cScale7=this.cScale7||m(this.primaryColor,{h:150}),this.cScale8=this.cScale8||m(this.primaryColor,{h:210}),this.cScale9=this.cScale9||m(this.primaryColor,{h:270}),this.cScale10=this.cScale10||m(this.primaryColor,{h:300}),this.cScale11=this.cScale11||m(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||N(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||N(this.tertiaryColor,40);for(let t=0;t{this[r]=t[r]}),this.updateColors(),e.forEach(r=>{this[r]=t[r]})}},Ru=y(t=>{let e=new Nu;return e.calculate(t),e},"getThemeVariables"),qu=class{static{y(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#cde498",this.secondaryColor="#cdffb2",this.background="white",this.mainBkg="#cde498",this.secondBkg="#cdffb2",this.lineColor="green",this.border1="#13540c",this.border2="#6eaa49",this.arrowheadColor="green",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.tertiaryColor=D("#cde498",10),this.primaryBorderColor=It(this.primaryColor,this.darkMode),this.secondaryBorderColor=It(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=It(this.tertiaryColor,this.darkMode),this.primaryTextColor=b(this.primaryColor),this.secondaryTextColor=b(this.secondaryColor),this.tertiaryTextColor=b(this.primaryColor),this.lineColor=b(this.background),this.textColor=b(this.background),this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#333",this.edgeLabelBackground="#e8e8e8",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="#333",this.signalTextColor="#333",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="#326932",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="#6eaa49",this.altSectionBkgColor="white",this.sectionBkgColor2="#6eaa49",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="#487e3a",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){this.actorBorder=N(this.mainBkg,20),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||m(this.primaryColor,{h:30}),this.cScale4=this.cScale4||m(this.primaryColor,{h:60}),this.cScale5=this.cScale5||m(this.primaryColor,{h:90}),this.cScale6=this.cScale6||m(this.primaryColor,{h:120}),this.cScale7=this.cScale7||m(this.primaryColor,{h:150}),this.cScale8=this.cScale8||m(this.primaryColor,{h:210}),this.cScale9=this.cScale9||m(this.primaryColor,{h:270}),this.cScale10=this.cScale10||m(this.primaryColor,{h:300}),this.cScale11=this.cScale11||m(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||N(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||N(this.tertiaryColor,40);for(let t=0;t{this[r]=t[r]}),this.updateColors(),e.forEach(r=>{this[r]=t[r]})}},zu=y(t=>{let e=new qu;return e.calculate(t),e},"getThemeVariables"),Pu=class{static{y(this,"Theme")}constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=D(this.contrast,55),this.background="#ffffff",this.tertiaryColor=m(this.primaryColor,{h:-160}),this.primaryBorderColor=It(this.primaryColor,this.darkMode),this.secondaryBorderColor=It(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=It(this.tertiaryColor,this.darkMode),this.primaryTextColor=b(this.primaryColor),this.secondaryTextColor=b(this.secondaryColor),this.tertiaryTextColor=b(this.tertiaryColor),this.lineColor=b(this.background),this.textColor=b(this.background),this.mainBkg="#eee",this.secondBkg="calculated",this.lineColor="#666",this.border1="#999",this.border2="calculated",this.note="#ffa",this.text="#333",this.critical="#d42",this.done="#bbb",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="white",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor=this.actorBorder,this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="calculated",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="white",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBkgColor="calculated",this.critBorderColor="calculated",this.todayLineColor="calculated",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){this.secondBkg=D(this.contrast,55),this.border2=this.contrast,this.actorBorder=D(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.actorBorder,this.signalColor=this.text,this.signalTextColor=this.text,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.text,this.loopTextColor=this.text,this.noteBorderColor="#999",this.noteBkgColor="#666",this.noteTextColor="#fff",this.cScale0=this.cScale0||"#555",this.cScale1=this.cScale1||"#F4F4F4",this.cScale2=this.cScale2||"#555",this.cScale3=this.cScale3||"#BBB",this.cScale4=this.cScale4||"#777",this.cScale5=this.cScale5||"#999",this.cScale6=this.cScale6||"#DDD",this.cScale7=this.cScale7||"#FFF",this.cScale8=this.cScale8||"#DDD",this.cScale9=this.cScale9||"#BBB",this.cScale10=this.cScale10||"#999",this.cScale11=this.cScale11||"#777";for(let t=0;t{this[r]=t[r]}),this.updateColors(),e.forEach(r=>{this[r]=t[r]})}},$u=y(t=>{let e=new Pu;return e.calculate(t),e},"getThemeVariables"),ir={base:{getThemeVariables:Du},dark:{getThemeVariables:Iu},default:{getThemeVariables:Ru},forest:{getThemeVariables:zu},neutral:{getThemeVariables:$u}},Ce={flowchart:{useMaxWidth:!0,titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:!0,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,defaultRenderer:"dagre-wrapper",wrappingWidth:200},sequence:{useMaxWidth:!0,hideUnusedParticipants:!1,activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",mirrorActors:!0,forceMenus:!1,bottomMarginAdj:1,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:400,noteFontSize:14,noteFontFamily:'"trebuchet ms", verdana, arial, sans-serif',noteFontWeight:400,noteAlign:"center",messageFontSize:16,messageFontFamily:'"trebuchet ms", verdana, arial, sans-serif',messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20},gantt:{useMaxWidth:!0,titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d",topAxis:!1,displayMode:"",weekday:"sunday"},journey:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"]},class:{useMaxWidth:!0,titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,defaultRenderer:"dagre-wrapper",htmlLabels:!1,hideEmptyMembersBox:!1},state:{useMaxWidth:!0,titleTopMargin:25,dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:"20",compositTitleSize:35,radius:5,defaultRenderer:"dagre-wrapper"},er:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,stroke:"gray",fill:"honeydew",fontSize:12},pie:{useMaxWidth:!0,textPosition:.75},quadrantChart:{useMaxWidth:!0,chartWidth:500,chartHeight:500,titleFontSize:20,titlePadding:10,quadrantPadding:5,xAxisLabelPadding:5,yAxisLabelPadding:5,xAxisLabelFontSize:16,yAxisLabelFontSize:16,quadrantLabelFontSize:16,quadrantTextTopPadding:5,pointTextPadding:5,pointLabelFontSize:12,pointRadius:5,xAxisPosition:"top",yAxisPosition:"left",quadrantInternalBorderStrokeWidth:1,quadrantExternalBorderStrokeWidth:2},xyChart:{useMaxWidth:!0,width:700,height:500,titleFontSize:20,titlePadding:10,showTitle:!0,xAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},yAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},chartOrientation:"vertical",plotReservedSpacePercent:50},requirement:{useMaxWidth:!0,rect_fill:"#f9f9f9",text_color:"#333",rect_border_size:"0.5px",rect_border_color:"#bbb",rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200},kanban:{useMaxWidth:!0,padding:8,sectionWidth:200,ticketBaseUrl:""},timeline:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],disableMulticolor:!1},gitGraph:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:"main",mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0,parallelCommits:!1,arrowMarkerAbsolute:!1},c4:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,c4ShapeInRow:4,nextLinePaddingX:0,c4BoundaryInRow:2,personFontSize:14,personFontFamily:'"Open Sans", sans-serif',personFontWeight:"normal",external_personFontSize:14,external_personFontFamily:'"Open Sans", sans-serif',external_personFontWeight:"normal",systemFontSize:14,systemFontFamily:'"Open Sans", sans-serif',systemFontWeight:"normal",external_systemFontSize:14,external_systemFontFamily:'"Open Sans", sans-serif',external_systemFontWeight:"normal",system_dbFontSize:14,system_dbFontFamily:'"Open Sans", sans-serif',system_dbFontWeight:"normal",external_system_dbFontSize:14,external_system_dbFontFamily:'"Open Sans", sans-serif',external_system_dbFontWeight:"normal",system_queueFontSize:14,system_queueFontFamily:'"Open Sans", sans-serif',system_queueFontWeight:"normal",external_system_queueFontSize:14,external_system_queueFontFamily:'"Open Sans", sans-serif',external_system_queueFontWeight:"normal",boundaryFontSize:14,boundaryFontFamily:'"Open Sans", sans-serif',boundaryFontWeight:"normal",messageFontSize:12,messageFontFamily:'"Open Sans", sans-serif',messageFontWeight:"normal",containerFontSize:14,containerFontFamily:'"Open Sans", sans-serif',containerFontWeight:"normal",external_containerFontSize:14,external_containerFontFamily:'"Open Sans", sans-serif',external_containerFontWeight:"normal",container_dbFontSize:14,container_dbFontFamily:'"Open Sans", sans-serif',container_dbFontWeight:"normal",external_container_dbFontSize:14,external_container_dbFontFamily:'"Open Sans", sans-serif',external_container_dbFontWeight:"normal",container_queueFontSize:14,container_queueFontFamily:'"Open Sans", sans-serif',container_queueFontWeight:"normal",external_container_queueFontSize:14,external_container_queueFontFamily:'"Open Sans", sans-serif',external_container_queueFontWeight:"normal",componentFontSize:14,componentFontFamily:'"Open Sans", sans-serif',componentFontWeight:"normal",external_componentFontSize:14,external_componentFontFamily:'"Open Sans", sans-serif',external_componentFontWeight:"normal",component_dbFontSize:14,component_dbFontFamily:'"Open Sans", sans-serif',component_dbFontWeight:"normal",external_component_dbFontSize:14,external_component_dbFontFamily:'"Open Sans", sans-serif',external_component_dbFontWeight:"normal",component_queueFontSize:14,component_queueFontFamily:'"Open Sans", sans-serif',component_queueFontWeight:"normal",external_component_queueFontSize:14,external_component_queueFontFamily:'"Open Sans", sans-serif',external_component_queueFontWeight:"normal",wrap:!0,wrapPadding:10,person_bg_color:"#08427B",person_border_color:"#073B6F",external_person_bg_color:"#686868",external_person_border_color:"#8A8A8A",system_bg_color:"#1168BD",system_border_color:"#3C7FC0",system_db_bg_color:"#1168BD",system_db_border_color:"#3C7FC0",system_queue_bg_color:"#1168BD",system_queue_border_color:"#3C7FC0",external_system_bg_color:"#999999",external_system_border_color:"#8A8A8A",external_system_db_bg_color:"#999999",external_system_db_border_color:"#8A8A8A",external_system_queue_bg_color:"#999999",external_system_queue_border_color:"#8A8A8A",container_bg_color:"#438DD5",container_border_color:"#3C7FC0",container_db_bg_color:"#438DD5",container_db_border_color:"#3C7FC0",container_queue_bg_color:"#438DD5",container_queue_border_color:"#3C7FC0",external_container_bg_color:"#B3B3B3",external_container_border_color:"#A6A6A6",external_container_db_bg_color:"#B3B3B3",external_container_db_border_color:"#A6A6A6",external_container_queue_bg_color:"#B3B3B3",external_container_queue_border_color:"#A6A6A6",component_bg_color:"#85BBF0",component_border_color:"#78A8D8",component_db_bg_color:"#85BBF0",component_db_border_color:"#78A8D8",component_queue_bg_color:"#85BBF0",component_queue_border_color:"#78A8D8",external_component_bg_color:"#CCCCCC",external_component_border_color:"#BFBFBF",external_component_db_bg_color:"#CCCCCC",external_component_db_border_color:"#BFBFBF",external_component_queue_bg_color:"#CCCCCC",external_component_queue_border_color:"#BFBFBF"},sankey:{useMaxWidth:!0,width:600,height:400,linkColor:"gradient",nodeAlignment:"justify",showValues:!0,prefix:"",suffix:""},block:{useMaxWidth:!0,padding:8},packet:{useMaxWidth:!0,rowHeight:32,bitWidth:32,bitsPerRow:32,showBits:!0,paddingX:5,paddingY:5},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16},theme:"default",look:"classic",handDrawnSeed:0,layout:"dagre",maxTextSize:5e4,maxEdges:500,darkMode:!1,fontFamily:'"trebuchet ms", verdana, arial, sans-serif;',logLevel:5,securityLevel:"strict",startOnLoad:!0,arrowMarkerAbsolute:!1,secure:["secure","securityLevel","startOnLoad","maxTextSize","suppressErrorRendering","maxEdges"],legacyMathML:!1,forceLegacyMathML:!1,deterministicIds:!1,fontSize:16,markdownAutoWrap:!0,suppressErrorRendering:!1},as={...Ce,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF"},themeCSS:void 0,themeVariables:ir.default.getThemeVariables(),sequence:{...Ce.sequence,messageFont:y(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:y(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:y(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{hideEmptyMembersBox:!1},gantt:{...Ce.gantt,tickInterval:void 0,useWidth:void 0},c4:{...Ce.c4,useWidth:void 0,personFont:y(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),external_personFont:y(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:y(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:y(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:y(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:y(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:y(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:y(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:y(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:y(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:y(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:y(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:y(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:y(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:y(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:y(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:y(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:y(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:y(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:y(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:y(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:y(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...Ce.pie,useWidth:984},xyChart:{...Ce.xyChart,useWidth:void 0},requirement:{...Ce.requirement,useWidth:void 0},packet:{...Ce.packet}},ss=y((t,e="")=>Object.keys(t).reduce((r,i)=>Array.isArray(t[i])?r:typeof t[i]=="object"&&t[i]!==null?[...r,e+i,...ss(t[i],"")]:[...r,e+i],[]),"keyify"),Wu=new Set(ss(as,"")),Uu=as,Zo=y(t=>{if(nt.debug("sanitizeDirective called with",t),!(typeof t!="object"||t==null)){if(Array.isArray(t)){t.forEach(e=>Zo(e));return}for(let e of Object.keys(t)){if(nt.debug("Checking key",e),e.startsWith("__")||e.includes("proto")||e.includes("constr")||!Wu.has(e)||t[e]==null){nt.debug("sanitize deleting key: ",e),delete t[e];continue}if(typeof t[e]=="object"){nt.debug("sanitizing object",e),Zo(t[e]);continue}let r=["themeCSS","fontFamily","altFontFamily"];for(let i of r)e.includes(i)&&(nt.debug("sanitizing css option",e),t[e]=Hu(t[e]))}if(t.themeVariables)for(let e of Object.keys(t.themeVariables)){let r=t.themeVariables[e];r?.match&&!r.match(/^[\d "#%(),.;A-Za-z]+$/)&&(t.themeVariables[e]="")}nt.debug("After sanitization",t)}},"sanitizeDirective"),Hu=y(t=>{let e=0,r=0;for(let i of t){if(e{let r=Pt({},t),i={};for(let o of e)hs(o),i=Pt(i,o);if(r=Pt(r,i),i.theme&&i.theme in ir){let o=Pt({},ls),n=Pt(o.themeVariables||{},i.themeVariables);r.theme&&r.theme in ir&&(r.themeVariables=ir[r.theme].getThemeVariables(n))}return Ir=r,cs(Ir),Ir},"updateCurrentConfig"),N0=y(t=>(zt=Pt({},Fi),zt=Pt(zt,t),t.theme&&ir[t.theme]&&(zt.themeVariables=ir[t.theme].getThemeVariables(t.themeVariables)),Li(zt,or),zt),"setSiteConfig"),R0=y(t=>{ls=Pt({},t)},"saveConfigFromInitialize"),q0=y(t=>(zt=Pt(zt,t),Li(zt,or),zt),"updateSiteConfig"),z0=y(()=>Pt({},zt),"getSiteConfig"),Yu=y(t=>(cs(t),Pt(Ir,t),Jo()),"setConfig"),Jo=y(()=>Pt({},Ir),"getConfig"),hs=y(t=>{t&&(["secure",...zt.secure??[]].forEach(e=>{Object.hasOwn(t,e)&&(nt.debug(`Denied attempt to modify a secure key ${e}`,t[e]),delete t[e])}),Object.keys(t).forEach(e=>{e.startsWith("__")&&delete t[e]}),Object.keys(t).forEach(e=>{typeof t[e]=="string"&&(t[e].includes("<")||t[e].includes(">")||t[e].includes("url(data:"))&&delete t[e],typeof t[e]=="object"&&hs(t[e])}))},"sanitize"),P0=y(t=>{Zo(t),t.fontFamily&&!t.themeVariables?.fontFamily&&(t.themeVariables={...t.themeVariables,fontFamily:t.fontFamily}),or.push(t),Li(zt,or)},"addDirective"),$0=y((t=zt)=>{or=[],Li(t,or)},"reset"),Gu={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead."},Qa={},Vu=y(t=>{Qa[t]||(nt.warn(Gu[t]),Qa[t]=!0)},"issueWarning"),cs=y(t=>{t&&(t.lazyLoadedDiagrams||t.loadExternalDiagramsAtStartup)&&Vu("LAZY_LOAD_DEPRECATED")},"checkConfig"),Rr=//gi,Xu=y(t=>t?ms(t).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),ju=(()=>{let t=!1;return()=>{t||(us(),t=!0)}})();function us(){let t="data-temp-href-target";nr.default.addHook("beforeSanitizeAttributes",e=>{e.tagName==="A"&&e.hasAttribute("target")&&e.setAttribute(t,e.getAttribute("target")??"")}),nr.default.addHook("afterSanitizeAttributes",e=>{e.tagName==="A"&&e.hasAttribute(t)&&(e.setAttribute("target",e.getAttribute(t)??""),e.removeAttribute(t),e.getAttribute("target")==="_blank"&&e.setAttribute("rel","noopener"))})}y(us,"setupDompurifyHooks");var fs=y(t=>(ju(),nr.default.sanitize(t)),"removeScript"),Ja=y((t,e)=>{if(e.flowchart?.htmlLabels!==!1){let r=e.securityLevel;r==="antiscript"||r==="strict"?t=fs(t):r!=="loose"&&(t=ms(t),t=t.replace(//g,">"),t=t.replace(/=/g,"="),t=Ju(t))}return t},"sanitizeMore"),Nr=y((t,e)=>t&&(e.dompurifyConfig?t=nr.default.sanitize(Ja(t,e),e.dompurifyConfig).toString():t=nr.default.sanitize(Ja(t,e),{FORBID_TAGS:["style"]}).toString(),t),"sanitizeText"),Zu=y((t,e)=>typeof t=="string"?Nr(t,e):t.flat().map(r=>Nr(r,e)),"sanitizeTextOrArray"),Ku=y(t=>Rr.test(t),"hasBreaks"),Qu=y(t=>t.split(Rr),"splitBreaks"),Ju=y(t=>t.replace(/#br#/g,"
"),"placeholderToBreak"),ms=y(t=>t.replace(Rr,"#br#"),"breakToPlaceholder"),tf=y(t=>{let e="";return t&&(e=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,e=e.replaceAll(/\(/g,"\\("),e=e.replaceAll(/\)/g,"\\)")),e},"getUrl"),ef=y(t=>!(t===!1||["false","null","0"].includes(String(t).trim().toLowerCase())),"evaluate"),rf=y(function(...t){let e=t.filter(r=>!isNaN(r));return Math.max(...e)},"getMax"),of=y(function(...t){let e=t.filter(r=>!isNaN(r));return Math.min(...e)},"getMin"),W0=y(function(t){let e=t.split(/(,)/),r=[];for(let i=0;i0&&i+1Math.max(0,t.split(e).length-1),"countOccurrence"),nf=y((t,e)=>{let r=Ko(t,"~"),i=Ko(e,"~");return r===1&&i===1},"shouldCombineSets"),af=y(t=>{let e=Ko(t,"~"),r=!1;if(e<=1)return t;e%2!==0&&t.startsWith("~")&&(t=t.substring(1),r=!0);let i=[...t],o=i.indexOf("~"),n=i.lastIndexOf("~");for(;o!==-1&&n!==-1&&o!==n;)i[o]="<",i[n]=">",o=i.indexOf("~"),n=i.lastIndexOf("~");return r&&i.unshift("~"),i.join("")},"processSet"),ts=y(()=>window.MathMLElement!==void 0,"isMathMLSupported"),Qo=/\$\$(.*)\$\$/g,es=y(t=>(t.match(Qo)?.length??0)>0,"hasKatex"),U0=y(async(t,e)=>{t=await sf(t,e);let r=document.createElement("div");r.innerHTML=t,r.id="katex-temp",r.style.visibility="hidden",r.style.position="absolute",r.style.top="0",document.querySelector("body")?.insertAdjacentElement("beforeend",r);let o={width:r.clientWidth,height:r.clientHeight};return r.remove(),o},"calculateMathMLDimensions"),sf=y(async(t,e)=>{if(!es(t))return t;if(!(ts()||e.legacyMathML||e.forceLegacyMathML))return t.replace(Qo,"MathML is unsupported in this environment.");let{default:r}=await import("./katex-NVDEX37K.min.js"),i=e.forceLegacyMathML||!ts()&&e.legacyMathML?"htmlAndMathml":"mathml";return t.split(Rr).map(o=>es(o)?`
${o}
`:`
${o}
`).join("").replace(Qo,(o,n)=>r.renderToString(n,{throwOnError:!0,displayMode:!0,output:i}).replace(/\n/g," ").replace(//g,""))},"renderKatex"),H0={getRows:Xu,sanitizeText:Nr,sanitizeTextOrArray:Zu,hasBreaks:Ku,splitBreaks:Qu,lineBreakRegex:Rr,removeScript:fs,getUrl:tf,evaluate:ef,getMax:rf,getMin:of},lf=y(function(t,e){for(let r of e)t.attr(r[0],r[1])},"d3Attrs"),hf=y(function(t,e,r){let i=new Map;return r?(i.set("width","100%"),i.set("style",`max-width: ${e}px;`)):(i.set("height",t),i.set("width",e)),i},"calculateSvgSizeAttrs"),cf=y(function(t,e,r,i){let o=hf(e,r,i);lf(t,o)},"configureSvgSize"),uf=y(function(t,e,r,i){let o=e.node().getBBox(),n=o.width,a=o.height;nt.info(`SVG bounds: ${n}x${a}`,o);let s=0,h=0;nt.info(`Graph bounds: ${s}x${h}`,t),s=n+r*2,h=a+r*2,nt.info(`Calculated bounds: ${s}x${h}`),cf(e,h,s,i);let l=`${o.x-r} ${o.y-r} ${o.width+2*r} ${o.height+2*r}`;e.attr("viewBox",l)},"setupGraphViewbox"),ki={},ff=y((t,e,r)=>{let i="";return t in ki&&ki[t]?i=ki[t](r):nt.warn(`No theme found for ${t}`),` & { font-family: ${r.fontFamily}; font-size: ${r.fontSize}; fill: ${r.textColor} } /* Classes common for multiple diagrams */ & .error-icon { fill: ${r.errorBkgColor}; } & .error-text { fill: ${r.errorTextColor}; stroke: ${r.errorTextColor}; } & .edge-thickness-normal { stroke-width: 1px; } & .edge-thickness-thick { stroke-width: 3.5px } & .edge-pattern-solid { stroke-dasharray: 0; } & .edge-thickness-invisible { stroke-width: 0; fill: none; } & .edge-pattern-dashed{ stroke-dasharray: 3; } .edge-pattern-dotted { stroke-dasharray: 2; } & .marker { fill: ${r.lineColor}; stroke: ${r.lineColor}; } & .marker.cross { stroke: ${r.lineColor}; } & svg { font-family: ${r.fontFamily}; font-size: ${r.fontSize}; } & p { margin: 0 } ${i} ${e} `},"getStyles"),mf=y((t,e)=>{e!==void 0&&(ki[t]=e)},"addStylesForDiagram"),Y0=ff,ds={};wu(ds,{clear:()=>df,getAccDescription:()=>yf,getAccTitle:()=>gf,getDiagramTitle:()=>_f,setAccDescription:()=>xf,setAccTitle:()=>pf,setDiagramTitle:()=>Cf});var tn="",en="",rn="",on=y(t=>Nr(t,Jo()),"sanitizeText"),df=y(()=>{tn="",rn="",en=""},"clear"),pf=y(t=>{tn=on(t).replace(/^\s+/g,"")},"setAccTitle"),gf=y(()=>tn,"getAccTitle"),xf=y(t=>{rn=on(t).replace(/\n\s+/g,` `)},"setAccDescription"),yf=y(()=>rn,"getAccDescription"),Cf=y(t=>{en=on(t)},"setDiagramTitle"),_f=y(()=>en,"getDiagramTitle"),rs=nt,bf=Bu,ps=Jo,G0=Yu,V0=Fi,Tf=y(t=>Nr(t,ps()),"sanitizeText"),kf=uf,Sf=y(()=>ds,"getCommonDb"),vi={},X0=y((t,e,r)=>{vi[t]&&rs.warn(`Diagram with id ${t} already registered. Overwriting.`),vi[t]=e,r&&ns(t,r),mf(t,e.styles),e.injectUtils?.(rs,bf,ps,Tf,kf,Sf(),()=>{})},"registerDiagram"),j0=y(t=>{if(t in vi)return vi[t];throw new vf(t)},"getDiagram"),vf=class extends Error{static{y(this,"DiagramNotFoundError")}constructor(t){super(`Diagram ${t} not found.`)}};function gs(t,e){let r;if(e===void 0)for(let i of t)i!=null&&(r=i)&&(r=i);else{let i=-1;for(let o of t)(o=e(o,++i,t))!=null&&(r=o)&&(r=o)}return r}function xs(t,e){let r;if(e===void 0)for(let i of t)i!=null&&(r>i||r===void 0&&i>=i)&&(r=i);else{let i=-1;for(let o of t)(o=e(o,++i,t))!=null&&(r>o||r===void 0&&o>=o)&&(r=o)}return r}function Ae(t,e){return t==null||e==null?NaN:te?1:t>=e?0:NaN}function nn(t,e){return t==null||e==null?NaN:et?1:e>=t?0:NaN}function Ee(t){let e,r,i;t.length!==2?(e=Ae,r=(s,h)=>Ae(t(s),h),i=(s,h)=>t(s)-h):(e=t===Ae||t===nn?t:wf,r=t,i=t);function o(s,h,l=0,c=s.length){if(l>>1;r(s[d],h)<0?l=d+1:c=d}while(l>>1;r(s[d],h)<=0?l=d+1:c=d}while(ll&&i(s[d-1],h)>-i(s[d],h)?d-1:d}return{left:o,center:a,right:n}}function wf(){return 0}function an(t){return t===null?NaN:+t}var ys=Ee(Ae),Cs=ys.right,Bf=ys.left,Ff=Ee(an).center,sn=Cs;var ar=class extends Map{constructor(e,r=Af){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),e!=null)for(let[i,o]of e)this.set(i,o)}get(e){return super.get(_s(this,e))}has(e){return super.has(_s(this,e))}set(e,r){return super.set(Lf(this,e),r)}delete(e){return super.delete(Mf(this,e))}};function _s({_intern:t,_key:e},r){let i=e(r);return t.has(i)?t.get(i):r}function Lf({_intern:t,_key:e},r){let i=e(r);return t.has(i)?t.get(i):(t.set(i,r),r)}function Mf({_intern:t,_key:e},r){let i=e(r);return t.has(i)&&(r=t.get(i),t.delete(i)),r}function Af(t){return t!==null&&typeof t=="object"?t.valueOf():t}var Ef=Math.sqrt(50),Df=Math.sqrt(10),Of=Math.sqrt(2);function Mi(t,e,r){let i=(e-t)/Math.max(0,r),o=Math.floor(Math.log10(i)),n=i/Math.pow(10,o),a=n>=Ef?10:n>=Df?5:n>=Of?2:1,s,h,l;return o<0?(l=Math.pow(10,-o)/a,s=Math.round(t*l),h=Math.round(e*l),s/le&&--h,l=-l):(l=Math.pow(10,o)*a,s=Math.round(t/l),h=Math.round(e/l),s*le&&--h),h0))return[];if(t===e)return[t];let i=e=o))return[];let s=n-o+1,h=new Array(s);if(i)if(a<0)for(let l=0;l+t(e)}function qf(t,e){return e=Math.max(0,t.bandwidth()-e*2)/2,t.round()&&(e=Math.round(e)),r=>+t(r)+e}function zf(){return!this.__axis}function ks(t,e){var r=[],i=null,o=null,n=6,a=6,s=3,h=typeof window<"u"&&window.devicePixelRatio>1?0:.5,l=t===Oi||t===Di?-1:1,c=t===Di||t===ln?"x":"y",d=t===Oi||t===hn?If:Nf;function u(p){var S=i??(e.ticks?e.ticks.apply(e,r):e.domain()),A=o??(e.tickFormat?e.tickFormat.apply(e,r):bs),W=Math.max(n,0)+s,$=e.range(),V=+$[0]+h,M=+$[$.length-1]+h,F=(e.bandwidth?qf:Rf)(e.copy(),h),U=p.selection?p.selection():p,T=U.selectAll(".domain").data([null]),j=U.selectAll(".tick").data(S,e).order(),w=j.exit(),H=j.enter().append("g").attr("class","tick"),K=j.select("line"),E=j.select("text");T=T.merge(T.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),j=j.merge(H),K=K.merge(H.append("line").attr("stroke","currentColor").attr(c+"2",l*n)),E=E.merge(H.append("text").attr("fill","currentColor").attr(c,l*W).attr("dy",t===Oi?"0em":t===hn?"0.71em":"0.32em")),p!==U&&(T=T.transition(p),j=j.transition(p),K=K.transition(p),E=E.transition(p),w=w.transition(p).attr("opacity",Ts).attr("transform",function(v){return isFinite(v=F(v))?d(v+h):this.getAttribute("transform")}),H.attr("opacity",Ts).attr("transform",function(v){var g=this.parentNode.__axis;return d((g&&isFinite(g=g(v))?g:F(v))+h)})),w.remove(),T.attr("d",t===Di||t===ln?a?"M"+l*a+","+V+"H"+h+"V"+M+"H"+l*a:"M"+h+","+V+"V"+M:a?"M"+V+","+l*a+"V"+h+"H"+M+"V"+l*a:"M"+V+","+h+"H"+M),j.attr("opacity",1).attr("transform",function(v){return d(F(v)+h)}),K.attr(c+"2",l*n),E.attr(c,l*W).text(A),U.filter(zf).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===ln?"start":t===Di?"end":"middle"),U.each(function(){this.__axis=F})}return u.scale=function(p){return arguments.length?(e=p,u):e},u.ticks=function(){return r=Array.from(arguments),u},u.tickArguments=function(p){return arguments.length?(r=p==null?[]:Array.from(p),u):r.slice()},u.tickValues=function(p){return arguments.length?(i=p==null?null:Array.from(p),u):i&&i.slice()},u.tickFormat=function(p){return arguments.length?(o=p,u):o},u.tickSize=function(p){return arguments.length?(n=a=+p,u):n},u.tickSizeInner=function(p){return arguments.length?(n=+p,u):n},u.tickSizeOuter=function(p){return arguments.length?(a=+p,u):a},u.tickPadding=function(p){return arguments.length?(s=+p,u):s},u.offset=function(p){return arguments.length?(h=+p,u):h},u}function Pf(t){return ks(Oi,t)}function $f(t){return ks(hn,t)}function Wf(){}function De(t){return t==null?Wf:function(){return this.querySelector(t)}}function Ss(t){typeof t!="function"&&(t=De(t));for(var e=this._groups,r=e.length,i=new Array(r),o=0;o=M&&(M=V+1);!(U=W[M])&&++M=0;)(a=i[o])&&(n&&a.compareDocumentPosition(n)^4&&n.parentNode.insertBefore(a,n),n=a);return this}function Ns(t){t||(t=em);function e(d,u){return d&&u?t(d.__data__,u.__data__):!d-!u}for(var r=this._groups,i=r.length,o=new Array(i),n=0;ne?1:t>=e?0:NaN}function Rs(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function qs(){return Array.from(this)}function zs(){for(var t=this._groups,e=0,r=t.length;e=0&&(e=t.slice(0,r))!=="xmlns"&&(t=t.slice(r+1)),un.hasOwnProperty(e)?{space:un[e],local:t}:t}function rm(t){return function(){this.removeAttribute(t)}}function im(t){return function(){this.removeAttributeNS(t.space,t.local)}}function om(t,e){return function(){this.setAttribute(t,e)}}function nm(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function am(t,e){return function(){var r=e.apply(this,arguments);r==null?this.removeAttribute(t):this.setAttribute(t,r)}}function sm(t,e){return function(){var r=e.apply(this,arguments);r==null?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,r)}}function Us(t,e){var r=ue(t);if(arguments.length<2){var i=this.node();return r.local?i.getAttributeNS(r.space,r.local):i.getAttribute(r)}return this.each((e==null?r.local?im:rm:typeof e=="function"?r.local?sm:am:r.local?nm:om)(r,e))}function qi(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function lm(t){return function(){this.style.removeProperty(t)}}function hm(t,e,r){return function(){this.style.setProperty(t,e,r)}}function cm(t,e,r){return function(){var i=e.apply(this,arguments);i==null?this.style.removeProperty(t):this.style.setProperty(t,i,r)}}function Hs(t,e,r){return arguments.length>1?this.each((e==null?lm:typeof e=="function"?cm:hm)(t,e,r??"")):_e(this.node(),t)}function _e(t,e){return t.style.getPropertyValue(e)||qi(t).getComputedStyle(t,null).getPropertyValue(e)}function um(t){return function(){delete this[t]}}function fm(t,e){return function(){this[t]=e}}function mm(t,e){return function(){var r=e.apply(this,arguments);r==null?delete this[t]:this[t]=r}}function Ys(t,e){return arguments.length>1?this.each((e==null?um:typeof e=="function"?mm:fm)(t,e)):this.node()[t]}function Gs(t){return t.trim().split(/^|\s+/)}function fn(t){return t.classList||new Vs(t)}function Vs(t){this._node=t,this._names=Gs(t.getAttribute("class")||"")}Vs.prototype={add:function(t){var e=this._names.indexOf(t);e<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function Xs(t,e){for(var r=fn(t),i=-1,o=e.length;++i=0&&(r=e.slice(i+1),e=e.slice(0,i)),{type:e,name:r}})}function Dm(t){return function(){var e=this.__on;if(e){for(var r=0,i=-1,o=e.length,n;r>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):r===8?Pi(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):r===4?Pi(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=Pm.exec(t))?new St(e[1],e[2],e[3],1):(e=$m.exec(t))?new St(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=Wm.exec(t))?Pi(e[1],e[2],e[3],e[4]):(e=Um.exec(t))?Pi(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=Hm.exec(t))?xl(e[1],e[2]/100,e[3]/100,1):(e=Ym.exec(t))?xl(e[1],e[2]/100,e[3]/100,e[4]):ul.hasOwnProperty(t)?dl(ul[t]):t==="transparent"?new St(NaN,NaN,NaN,0):null}function dl(t){return new St(t>>16&255,t>>8&255,t&255,1)}function Pi(t,e,r,i){return i<=0&&(t=e=r=NaN),new St(t,e,r,i)}function pn(t){return t instanceof be||(t=Vt(t)),t?(t=t.rgb(),new St(t.r,t.g,t.b,t.opacity)):new St}function cr(t,e,r,i){return arguments.length===1?pn(t):new St(t,e,r,i??1)}function St(t,e,r,i){this.r=+t,this.g=+e,this.b=+r,this.opacity=+i}Oe(St,cr,lr(be,{brighter(t){return t=t==null?Wi:Math.pow(Wi,t),new St(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?Wr:Math.pow(Wr,t),new St(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new St(Ne(this.r),Ne(this.g),Ne(this.b),Ui(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:pl,formatHex:pl,formatHex8:Xm,formatRgb:gl,toString:gl}));function pl(){return`#${Ie(this.r)}${Ie(this.g)}${Ie(this.b)}`}function Xm(){return`#${Ie(this.r)}${Ie(this.g)}${Ie(this.b)}${Ie((isNaN(this.opacity)?1:this.opacity)*255)}`}function gl(){let t=Ui(this.opacity);return`${t===1?"rgb(":"rgba("}${Ne(this.r)}, ${Ne(this.g)}, ${Ne(this.b)}${t===1?")":`, ${t})`}`}function Ui(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function Ne(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Ie(t){return t=Ne(t),(t<16?"0":"")+t.toString(16)}function xl(t,e,r,i){return i<=0?t=e=r=NaN:r<=0||r>=1?t=e=NaN:e<=0&&(t=NaN),new Gt(t,e,r,i)}function Cl(t){if(t instanceof Gt)return new Gt(t.h,t.s,t.l,t.opacity);if(t instanceof be||(t=Vt(t)),!t)return new Gt;if(t instanceof Gt)return t;t=t.rgb();var e=t.r/255,r=t.g/255,i=t.b/255,o=Math.min(e,r,i),n=Math.max(e,r,i),a=NaN,s=n-o,h=(n+o)/2;return s?(e===n?a=(r-i)/s+(r0&&h<1?0:a,new Gt(a,s,h,t.opacity)}function _l(t,e,r,i){return arguments.length===1?Cl(t):new Gt(t,e,r,i??1)}function Gt(t,e,r,i){this.h=+t,this.s=+e,this.l=+r,this.opacity=+i}Oe(Gt,_l,lr(be,{brighter(t){return t=t==null?Wi:Math.pow(Wi,t),new Gt(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?Wr:Math.pow(Wr,t),new Gt(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,r=this.l,i=r+(r<.5?r:1-r)*e,o=2*r-i;return new St(dn(t>=240?t-240:t+120,o,i),dn(t,o,i),dn(t<120?t+240:t-120,o,i),this.opacity)},clamp(){return new Gt(yl(this.h),$i(this.s),$i(this.l),Ui(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(){let t=Ui(this.opacity);return`${t===1?"hsl(":"hsla("}${yl(this.h)}, ${$i(this.s)*100}%, ${$i(this.l)*100}%${t===1?")":`, ${t})`}`}}));function yl(t){return t=(t||0)%360,t<0?t+360:t}function $i(t){return Math.max(0,Math.min(1,t||0))}function dn(t,e,r){return(t<60?e+(r-e)*t/60:t<180?r:t<240?e+(r-e)*(240-t)/60:e)*255}var bl=Math.PI/180,Tl=180/Math.PI;var Hi=18,kl=.96422,Sl=1,vl=.82521,wl=4/29,ur=6/29,Bl=3*ur*ur,jm=ur*ur*ur;function Fl(t){if(t instanceof ee)return new ee(t.l,t.a,t.b,t.opacity);if(t instanceof me)return Ll(t);t instanceof St||(t=pn(t));var e=Cn(t.r),r=Cn(t.g),i=Cn(t.b),o=gn((.2225045*e+.7168786*r+.0606169*i)/Sl),n,a;return e===r&&r===i?n=a=o:(n=gn((.4360747*e+.3850649*r+.1430804*i)/kl),a=gn((.0139322*e+.0971045*r+.7141733*i)/vl)),new ee(116*o-16,500*(n-o),200*(o-a),t.opacity)}function _n(t,e,r,i){return arguments.length===1?Fl(t):new ee(t,e,r,i??1)}function ee(t,e,r,i){this.l=+t,this.a=+e,this.b=+r,this.opacity=+i}Oe(ee,_n,lr(be,{brighter(t){return new ee(this.l+Hi*(t??1),this.a,this.b,this.opacity)},darker(t){return new ee(this.l-Hi*(t??1),this.a,this.b,this.opacity)},rgb(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,r=isNaN(this.b)?t:t-this.b/200;return e=kl*xn(e),t=Sl*xn(t),r=vl*xn(r),new St(yn(3.1338561*e-1.6168667*t-.4906146*r),yn(-.9787684*e+1.9161415*t+.033454*r),yn(.0719453*e-.2289914*t+1.4052427*r),this.opacity)}}));function gn(t){return t>jm?Math.pow(t,1/3):t/Bl+wl}function xn(t){return t>ur?t*t*t:Bl*(t-wl)}function yn(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function Cn(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function Zm(t){if(t instanceof me)return new me(t.h,t.c,t.l,t.opacity);if(t instanceof ee||(t=Fl(t)),t.a===0&&t.b===0)return new me(NaN,0()=>t;function Ml(t,e){return function(r){return t+r*e}}function Km(t,e,r){return t=Math.pow(t,r),e=Math.pow(e,r)-t,r=1/r,function(i){return Math.pow(t+i*e,r)}}function Al(t,e){var r=e-t;return r?Ml(t,r>180||r<-180?r-360*Math.round(r/360):r):fr(isNaN(t)?e:t)}function El(t){return(t=+t)==1?de:function(e,r){return r-e?Km(e,r,t):fr(isNaN(e)?r:e)}}function de(t,e){var r=e-t;return r?Ml(t,r):fr(isNaN(t)?e:t)}function Dl(t){return function(e,r){var i=t((e=Hr(e)).h,(r=Hr(r)).h),o=de(e.c,r.c),n=de(e.l,r.l),a=de(e.opacity,r.opacity);return function(s){return e.h=i(s),e.c=o(s),e.l=n(s),e.opacity=a(s),e+""}}}var Qm=Dl(Al),Jm=Dl(de);function bn(t,e,r,i,o){var n=t*t,a=n*t;return((1-3*t+3*n-a)*e+(4-6*n+3*a)*r+(1+3*t+3*n-3*a)*i+a*o)/6}function Ol(t){var e=t.length-1;return function(r){var i=r<=0?r=0:r>=1?(r=1,e-1):Math.floor(r*e),o=t[i],n=t[i+1],a=i>0?t[i-1]:2*o-n,s=ir&&(n=e.slice(r,n),s[a]?s[a]+=n:s[++a]=n),(i=i[0])===(o=o[0])?s[a]?s[a]+=o:s[++a]=o:(s[++a]=null,h.push({i:a,x:vt(i,o)})),r=Tn.lastIndex;return r180?c+=360:c-l>180&&(l+=360),u.push({i:d.push(o(d)+"rotate(",null,i)-2,x:vt(l,c)})):c&&d.push(o(d)+"rotate("+c+i)}function s(l,c,d,u){l!==c?u.push({i:d.push(o(d)+"skewX(",null,i)-2,x:vt(l,c)}):c&&d.push(o(d)+"skewX("+c+i)}function h(l,c,d,u,p,S){if(l!==d||c!==u){var A=p.push(o(p)+"scale(",null,",",null,")");S.push({i:A-4,x:vt(l,d)},{i:A-2,x:vt(c,u)})}else(d!==1||u!==1)&&p.push(o(p)+"scale("+d+","+u+")")}return function(l,c){var d=[],u=[];return l=t(l),c=t(c),n(l.translateX,l.translateY,c.translateX,c.translateY,d,u),a(l.rotate,c.rotate,d,u),s(l.skewX,c.skewX,d,u),h(l.scaleX,l.scaleY,c.scaleX,c.scaleY,d,u),l=c=null,function(p){for(var S=-1,A=u.length,W;++Se&&(r=t,t=e,e=r),function(i){return Math.max(t,Math.min(e,i))}}function nd(t,e,r){var i=t[0],o=t[1],n=e[0],a=e[1];return o2?ad:nd,h=l=null,d}function d(u){return u==null||isNaN(u=+u)?n:(h||(h=s(t.map(i),e,r)))(i(a(u)))}return d.invert=function(u){return a(o((l||(l=s(e,t.map(i),vt)))(u)))},d.domain=function(u){return arguments.length?(t=Array.from(u,An),c()):t.slice()},d.range=function(u){return arguments.length?(e=Array.from(u),c()):e.slice()},d.rangeRound=function(u){return e=Array.from(u),r=Sn,c()},d.clamp=function(u){return arguments.length?(a=u?!0:mr,c()):a!==mr},d.interpolate=function(u){return arguments.length?(r=u,c()):r},d.unknown=function(u){return arguments.length?(n=u,d):n},function(u,p){return i=u,o=p,c()}}function Vr(){return sd()(mr,mr)}function Vl(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function ze(t,e){if((r=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var r,i=t.slice(0,r);return[i.length>1?i[0]+i.slice(2):i,+t.slice(r+1)]}function re(t){return t=ze(Math.abs(t)),t?t[1]:NaN}function Xl(t,e){return function(r,i){for(var o=r.length,n=[],a=0,s=t[0],h=0;o>0&&s>0&&(h+s+1>i&&(s=Math.max(1,i-h)),n.push(r.substring(o-=s,o+s)),!((h+=s+1)>i));)s=t[a=(a+1)%t.length];return n.reverse().join(e)}}function jl(t){return function(e){return e.replace(/[0-9]/g,function(r){return t[+r]})}}var ld=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function ke(t){if(!(e=ld.exec(t)))throw new Error("invalid format: "+t);var e;return new Xi({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]})}ke.prototype=Xi.prototype;function Xi(t){this.fill=t.fill===void 0?" ":t.fill+"",this.align=t.align===void 0?">":t.align+"",this.sign=t.sign===void 0?"-":t.sign+"",this.symbol=t.symbol===void 0?"":t.symbol+"",this.zero=!!t.zero,this.width=t.width===void 0?void 0:+t.width,this.comma=!!t.comma,this.precision=t.precision===void 0?void 0:+t.precision,this.trim=!!t.trim,this.type=t.type===void 0?"":t.type+""}Xi.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function Zl(t){t:for(var e=t.length,r=1,i=-1,o;r0&&(i=0);break}return i>0?t.slice(0,i)+t.slice(o+1):t}var Dn;function Kl(t,e){var r=ze(t,e);if(!r)return t+"";var i=r[0],o=r[1],n=o-(Dn=Math.max(-8,Math.min(8,Math.floor(o/3)))*3)+1,a=i.length;return n===a?i:n>a?i+new Array(n-a+1).join("0"):n>0?i.slice(0,n)+"."+i.slice(n):"0."+new Array(1-n).join("0")+ze(t,Math.max(0,e+n-1))[0]}function On(t,e){var r=ze(t,e);if(!r)return t+"";var i=r[0],o=r[1];return o<0?"0."+new Array(-o).join("0")+i:i.length>o+1?i.slice(0,o+1)+"."+i.slice(o+1):i+new Array(o-i.length+2).join("0")}var In={"%":(t,e)=>(t*100).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:Vl,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)=>On(t*100,e),r:On,s:Kl,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function Nn(t){return t}var Ql=Array.prototype.map,Jl=["y","z","a","f","p","n","\xB5","m","","k","M","G","T","P","E","Z","Y"];function th(t){var e=t.grouping===void 0||t.thousands===void 0?Nn:Xl(Ql.call(t.grouping,Number),t.thousands+""),r=t.currency===void 0?"":t.currency[0]+"",i=t.currency===void 0?"":t.currency[1]+"",o=t.decimal===void 0?".":t.decimal+"",n=t.numerals===void 0?Nn:jl(Ql.call(t.numerals,String)),a=t.percent===void 0?"%":t.percent+"",s=t.minus===void 0?"\u2212":t.minus+"",h=t.nan===void 0?"NaN":t.nan+"";function l(d){d=ke(d);var u=d.fill,p=d.align,S=d.sign,A=d.symbol,W=d.zero,$=d.width,V=d.comma,M=d.precision,F=d.trim,U=d.type;U==="n"?(V=!0,U="g"):In[U]||(M===void 0&&(M=12),F=!0,U="g"),(W||u==="0"&&p==="=")&&(W=!0,u="0",p="=");var T=A==="$"?r:A==="#"&&/[boxX]/.test(U)?"0"+U.toLowerCase():"",j=A==="$"?i:/[%p]/.test(U)?a:"",w=In[U],H=/[defgprs%]/.test(U);M=M===void 0?6:/[gprs]/.test(U)?Math.max(1,Math.min(21,M)):Math.max(0,Math.min(20,M));function K(E){var v=T,g=j,x,L,k;if(U==="c")g=w(E)+g,E="";else{E=+E;var R=E<0||1/E<0;if(E=isNaN(E)?h:w(Math.abs(E),M),F&&(E=Zl(E)),R&&+E==0&&S!=="+"&&(R=!1),v=(R?S==="("?S:s:S==="-"||S==="("?"":S)+v,g=(U==="s"?Jl[8+Dn/3]:"")+g+(R&&S==="("?")":""),H){for(x=-1,L=E.length;++xk||k>57){g=(k===46?o+E.slice(x+1):E.slice(x))+g,E=E.slice(0,x);break}}}V&&!W&&(E=e(E,1/0));var I=v.length+E.length+g.length,G=I<$?new Array($-I+1).join(u):"";switch(V&&W&&(E=e(G+E,G.length?$-g.length:1/0),G=""),p){case"<":E=v+E+g+G;break;case"=":E=v+G+E+g;break;case"^":E=G.slice(0,I=G.length>>1)+v+E+g+G.slice(I);break;default:E=G+v+E+g;break}return n(E)}return K.toString=function(){return d+""},K}function c(d,u){var p=l((d=ke(d),d.type="f",d)),S=Math.max(-8,Math.min(8,Math.floor(re(u)/3)))*3,A=Math.pow(10,-S),W=Jl[8+S/3];return function($){return p(A*$)+W}}return{format:l,formatPrefix:c}}var ji,Zi,Ki;Rn({thousands:",",grouping:[3],currency:["$",""]});function Rn(t){return ji=th(t),Zi=ji.format,Ki=ji.formatPrefix,ji}function qn(t){return Math.max(0,-re(Math.abs(t)))}function zn(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(re(e)/3)))*3-re(Math.abs(t)))}function Pn(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,re(e)-re(t))+1}function $n(t,e,r,i){var o=sr(t,e,r),n;switch(i=ke(i??",f"),i.type){case"s":{var a=Math.max(Math.abs(t),Math.abs(e));return i.precision==null&&!isNaN(n=zn(o,a))&&(i.precision=n),Ki(i,a)}case"":case"e":case"g":case"p":case"r":{i.precision==null&&!isNaN(n=Pn(o,Math.max(Math.abs(t),Math.abs(e))))&&(i.precision=n-(i.type==="e"));break}case"f":case"%":{i.precision==null&&!isNaN(n=qn(o))&&(i.precision=n-(i.type==="%")*2);break}}return Zi(i)}function hd(t){var e=t.domain;return t.ticks=function(r){var i=e();return Ai(i[0],i[i.length-1],r??10)},t.tickFormat=function(r,i){var o=e();return $n(o[0],o[o.length-1],r??10,i)},t.nice=function(r){r==null&&(r=10);var i=e(),o=0,n=i.length-1,a=i[o],s=i[n],h,l,c=10;for(s0;){if(l=qr(a,s,r),l===h)return i[o]=a,i[n]=s,e(i);if(l>0)a=Math.floor(a/l)*l,s=Math.ceil(s/l)*l;else if(l<0)a=Math.ceil(a*l)/l,s=Math.floor(s*l)/l;else break;h=l}return t},t}function Wn(){var t=Vr();return t.copy=function(){return Vi(t,Wn())},Te.apply(t,arguments),hd(t)}var Un=new Date,Hn=new Date;function at(t,e,r,i){function o(n){return t(n=arguments.length===0?new Date:new Date(+n)),n}return o.floor=n=>(t(n=new Date(+n)),n),o.ceil=n=>(t(n=new Date(n-1)),e(n,1),t(n),n),o.round=n=>{let a=o(n),s=o.ceil(n);return n-a(e(n=new Date(+n),a==null?1:Math.floor(a)),n),o.range=(n,a,s)=>{let h=[];if(n=o.ceil(n),s=s==null?1:Math.floor(s),!(n0))return h;let l;do h.push(l=new Date(+n)),e(n,s),t(n);while(lat(a=>{if(a>=a)for(;t(a),!n(a);)a.setTime(a-1)},(a,s)=>{if(a>=a)if(s<0)for(;++s<=0;)for(;e(a,-1),!n(a););else for(;--s>=0;)for(;e(a,1),!n(a););}),r&&(o.count=(n,a)=>(Un.setTime(+n),Hn.setTime(+a),t(Un),t(Hn),Math.floor(r(Un,Hn))),o.every=n=>(n=Math.floor(n),!isFinite(n)||!(n>0)?null:n>1?o.filter(i?a=>i(a)%n===0:a=>o.count(0,a)%n===0):o)),o}var Pe=at(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);Pe.every=t=>(t=Math.floor(t),!isFinite(t)||!(t>0)?null:t>1?at(e=>{e.setTime(Math.floor(e/t)*t)},(e,r)=>{e.setTime(+e+r*t)},(e,r)=>(r-e)/t):Pe);var eh=Pe.range;var ie=at(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*1e3)},(t,e)=>(e-t)/1e3,t=>t.getUTCSeconds()),rh=ie.range;var dr=at(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*1e3)},(t,e)=>{t.setTime(+t+e*6e4)},(t,e)=>(e-t)/6e4,t=>t.getMinutes()),cd=dr.range,Qi=at(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*6e4)},(t,e)=>(e-t)/6e4,t=>t.getUTCMinutes()),ud=Qi.range;var pr=at(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*1e3-t.getMinutes()*6e4)},(t,e)=>{t.setTime(+t+e*36e5)},(t,e)=>(e-t)/36e5,t=>t.getHours()),fd=pr.range,Ji=at(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*36e5)},(t,e)=>(e-t)/36e5,t=>t.getUTCHours()),md=Ji.range;var pe=at(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*6e4)/864e5,t=>t.getDate()-1),dd=pe.range,jr=at(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/864e5,t=>t.getUTCDate()-1),pd=jr.range,to=at(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/864e5,t=>Math.floor(t/864e5)),gd=to.range;function Ue(t){return at(e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},(e,r)=>{e.setDate(e.getDate()+r*7)},(e,r)=>(r-e-(r.getTimezoneOffset()-e.getTimezoneOffset())*6e4)/6048e5)}var ge=Ue(0),gr=Ue(1),oh=Ue(2),nh=Ue(3),Se=Ue(4),ah=Ue(5),sh=Ue(6),lh=ge.range,xd=gr.range,yd=oh.range,Cd=nh.range,_d=Se.range,bd=ah.range,Td=sh.range;function He(t){return at(e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},(e,r)=>{e.setUTCDate(e.getUTCDate()+r*7)},(e,r)=>(r-e)/6048e5)}var Ye=He(0),xr=He(1),hh=He(2),ch=He(3),ve=He(4),uh=He(5),fh=He(6),mh=Ye.range,kd=xr.range,Sd=hh.range,vd=ch.range,wd=ve.range,Bd=uh.range,Fd=fh.range;var yr=at(t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e)=>{t.setMonth(t.getMonth()+e)},(t,e)=>e.getMonth()-t.getMonth()+(e.getFullYear()-t.getFullYear())*12,t=>t.getMonth()),Ld=yr.range,eo=at(t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)},(t,e)=>e.getUTCMonth()-t.getUTCMonth()+(e.getUTCFullYear()-t.getUTCFullYear())*12,t=>t.getUTCMonth()),Md=eo.range;var Wt=at(t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e)=>{t.setFullYear(t.getFullYear()+e)},(t,e)=>e.getFullYear()-t.getFullYear(),t=>t.getFullYear());Wt.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:at(e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)},(e,r)=>{e.setFullYear(e.getFullYear()+r*t)});var Ad=Wt.range,Xt=at(t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e)},(t,e)=>e.getUTCFullYear()-t.getUTCFullYear(),t=>t.getUTCFullYear());Xt.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:at(e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,r)=>{e.setUTCFullYear(e.getUTCFullYear()+r*t)});var Ed=Xt.range;function ph(t,e,r,i,o,n){let a=[[ie,1,1e3],[ie,5,5*1e3],[ie,15,15*1e3],[ie,30,30*1e3],[n,1,6e4],[n,5,5*6e4],[n,15,15*6e4],[n,30,30*6e4],[o,1,36e5],[o,3,3*36e5],[o,6,6*36e5],[o,12,12*36e5],[i,1,864e5],[i,2,2*864e5],[r,1,6048e5],[e,1,2592e6],[e,3,3*2592e6],[t,1,31536e6]];function s(l,c,d){let u=cW).right(a,u);if(p===a.length)return t.every(sr(l/31536e6,c/31536e6,d));if(p===0)return Pe.every(Math.max(sr(l,c,d),1));let[S,A]=a[u/a[p-1][2]53)return null;"w"in C||(C.w=1),"Z"in C?(tt=Xn(Zr(C.y,0,1)),At=tt.getUTCDay(),tt=At>4||At===0?xr.ceil(tt):xr(tt),tt=jr.offset(tt,(C.V-1)*7),C.y=tt.getUTCFullYear(),C.m=tt.getUTCMonth(),C.d=tt.getUTCDate()+(C.w+6)%7):(tt=Vn(Zr(C.y,0,1)),At=tt.getDay(),tt=At>4||At===0?gr.ceil(tt):gr(tt),tt=pe.offset(tt,(C.V-1)*7),C.y=tt.getFullYear(),C.m=tt.getMonth(),C.d=tt.getDate()+(C.w+6)%7)}else("W"in C||"U"in C)&&("w"in C||(C.w="u"in C?C.u%7:"W"in C?1:0),At="Z"in C?Xn(Zr(C.y,0,1)).getUTCDay():Vn(Zr(C.y,0,1)).getDay(),C.m=0,C.d="W"in C?(C.w+6)%7+C.W*7-(At+5)%7:C.w+C.U*7-(At+6)%7);return"Z"in C?(C.H+=C.Z/100|0,C.M+=C.Z%100,Xn(C)):Vn(C)}}function w(B,Y,X,C){for(var Tt=0,tt=Y.length,At=X.length,Et,Zt;Tt=At)return-1;if(Et=Y.charCodeAt(Tt++),Et===37){if(Et=Y.charAt(Tt++),Zt=U[Et in gh?Y.charAt(Tt++):Et],!Zt||(C=Zt(B,X,C))<0)return-1}else if(Et!=X.charCodeAt(C++))return-1}return C}function H(B,Y,X){var C=l.exec(Y.slice(X));return C?(B.p=c.get(C[0].toLowerCase()),X+C[0].length):-1}function K(B,Y,X){var C=p.exec(Y.slice(X));return C?(B.w=S.get(C[0].toLowerCase()),X+C[0].length):-1}function E(B,Y,X){var C=d.exec(Y.slice(X));return C?(B.w=u.get(C[0].toLowerCase()),X+C[0].length):-1}function v(B,Y,X){var C=$.exec(Y.slice(X));return C?(B.m=V.get(C[0].toLowerCase()),X+C[0].length):-1}function g(B,Y,X){var C=A.exec(Y.slice(X));return C?(B.m=W.get(C[0].toLowerCase()),X+C[0].length):-1}function x(B,Y,X){return w(B,e,Y,X)}function L(B,Y,X){return w(B,r,Y,X)}function k(B,Y,X){return w(B,i,Y,X)}function R(B){return a[B.getDay()]}function I(B){return n[B.getDay()]}function G(B){return h[B.getMonth()]}function J(B){return s[B.getMonth()]}function it(B){return o[+(B.getHours()>=12)]}function ot(B){return 1+~~(B.getMonth()/3)}function mt(B){return a[B.getUTCDay()]}function Rt(B){return n[B.getUTCDay()]}function ut(B){return h[B.getUTCMonth()]}function $t(B){return s[B.getUTCMonth()]}function Mt(B){return o[+(B.getUTCHours()>=12)]}function ht(B){return 1+~~(B.getUTCMonth()/3)}return{format:function(B){var Y=T(B+="",M);return Y.toString=function(){return B},Y},parse:function(B){var Y=j(B+="",!1);return Y.toString=function(){return B},Y},utcFormat:function(B){var Y=T(B+="",F);return Y.toString=function(){return B},Y},utcParse:function(B){var Y=j(B+="",!0);return Y.toString=function(){return B},Y}}}var gh={"-":"",_:" ",0:"0"},_t=/^\s*\d+/,Nd=/^%/,Rd=/[\\^$*+?|[\]().{}]/g;function rt(t,e,r){var i=t<0?"-":"",o=(i?-t:t)+"",n=o.length;return i+(n[e.toLowerCase(),r]))}function zd(t,e,r){var i=_t.exec(e.slice(r,r+1));return i?(t.w=+i[0],r+i[0].length):-1}function Pd(t,e,r){var i=_t.exec(e.slice(r,r+1));return i?(t.u=+i[0],r+i[0].length):-1}function $d(t,e,r){var i=_t.exec(e.slice(r,r+2));return i?(t.U=+i[0],r+i[0].length):-1}function Wd(t,e,r){var i=_t.exec(e.slice(r,r+2));return i?(t.V=+i[0],r+i[0].length):-1}function Ud(t,e,r){var i=_t.exec(e.slice(r,r+2));return i?(t.W=+i[0],r+i[0].length):-1}function xh(t,e,r){var i=_t.exec(e.slice(r,r+4));return i?(t.y=+i[0],r+i[0].length):-1}function yh(t,e,r){var i=_t.exec(e.slice(r,r+2));return i?(t.y=+i[0]+(+i[0]>68?1900:2e3),r+i[0].length):-1}function Hd(t,e,r){var i=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(r,r+6));return i?(t.Z=i[1]?0:-(i[2]+(i[3]||"00")),r+i[0].length):-1}function Yd(t,e,r){var i=_t.exec(e.slice(r,r+1));return i?(t.q=i[0]*3-3,r+i[0].length):-1}function Gd(t,e,r){var i=_t.exec(e.slice(r,r+2));return i?(t.m=i[0]-1,r+i[0].length):-1}function Ch(t,e,r){var i=_t.exec(e.slice(r,r+2));return i?(t.d=+i[0],r+i[0].length):-1}function Vd(t,e,r){var i=_t.exec(e.slice(r,r+3));return i?(t.m=0,t.d=+i[0],r+i[0].length):-1}function _h(t,e,r){var i=_t.exec(e.slice(r,r+2));return i?(t.H=+i[0],r+i[0].length):-1}function Xd(t,e,r){var i=_t.exec(e.slice(r,r+2));return i?(t.M=+i[0],r+i[0].length):-1}function jd(t,e,r){var i=_t.exec(e.slice(r,r+2));return i?(t.S=+i[0],r+i[0].length):-1}function Zd(t,e,r){var i=_t.exec(e.slice(r,r+3));return i?(t.L=+i[0],r+i[0].length):-1}function Kd(t,e,r){var i=_t.exec(e.slice(r,r+6));return i?(t.L=Math.floor(i[0]/1e3),r+i[0].length):-1}function Qd(t,e,r){var i=Nd.exec(e.slice(r,r+1));return i?r+i[0].length:-1}function Jd(t,e,r){var i=_t.exec(e.slice(r));return i?(t.Q=+i[0],r+i[0].length):-1}function tp(t,e,r){var i=_t.exec(e.slice(r));return i?(t.s=+i[0],r+i[0].length):-1}function bh(t,e){return rt(t.getDate(),e,2)}function ep(t,e){return rt(t.getHours(),e,2)}function rp(t,e){return rt(t.getHours()%12||12,e,2)}function ip(t,e){return rt(1+pe.count(Wt(t),t),e,3)}function wh(t,e){return rt(t.getMilliseconds(),e,3)}function op(t,e){return wh(t,e)+"000"}function np(t,e){return rt(t.getMonth()+1,e,2)}function ap(t,e){return rt(t.getMinutes(),e,2)}function sp(t,e){return rt(t.getSeconds(),e,2)}function lp(t){var e=t.getDay();return e===0?7:e}function hp(t,e){return rt(ge.count(Wt(t)-1,t),e,2)}function Bh(t){var e=t.getDay();return e>=4||e===0?Se(t):Se.ceil(t)}function cp(t,e){return t=Bh(t),rt(Se.count(Wt(t),t)+(Wt(t).getDay()===4),e,2)}function up(t){return t.getDay()}function fp(t,e){return rt(gr.count(Wt(t)-1,t),e,2)}function mp(t,e){return rt(t.getFullYear()%100,e,2)}function dp(t,e){return t=Bh(t),rt(t.getFullYear()%100,e,2)}function pp(t,e){return rt(t.getFullYear()%1e4,e,4)}function gp(t,e){var r=t.getDay();return t=r>=4||r===0?Se(t):Se.ceil(t),rt(t.getFullYear()%1e4,e,4)}function xp(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+rt(e/60|0,"0",2)+rt(e%60,"0",2)}function Th(t,e){return rt(t.getUTCDate(),e,2)}function yp(t,e){return rt(t.getUTCHours(),e,2)}function Cp(t,e){return rt(t.getUTCHours()%12||12,e,2)}function _p(t,e){return rt(1+jr.count(Xt(t),t),e,3)}function Fh(t,e){return rt(t.getUTCMilliseconds(),e,3)}function bp(t,e){return Fh(t,e)+"000"}function Tp(t,e){return rt(t.getUTCMonth()+1,e,2)}function kp(t,e){return rt(t.getUTCMinutes(),e,2)}function Sp(t,e){return rt(t.getUTCSeconds(),e,2)}function vp(t){var e=t.getUTCDay();return e===0?7:e}function wp(t,e){return rt(Ye.count(Xt(t)-1,t),e,2)}function Lh(t){var e=t.getUTCDay();return e>=4||e===0?ve(t):ve.ceil(t)}function Bp(t,e){return t=Lh(t),rt(ve.count(Xt(t),t)+(Xt(t).getUTCDay()===4),e,2)}function Fp(t){return t.getUTCDay()}function Lp(t,e){return rt(xr.count(Xt(t)-1,t),e,2)}function Mp(t,e){return rt(t.getUTCFullYear()%100,e,2)}function Ap(t,e){return t=Lh(t),rt(t.getUTCFullYear()%100,e,2)}function Ep(t,e){return rt(t.getUTCFullYear()%1e4,e,4)}function Dp(t,e){var r=t.getUTCDay();return t=r>=4||r===0?ve(t):ve.ceil(t),rt(t.getUTCFullYear()%1e4,e,4)}function Op(){return"+0000"}function kh(){return"%"}function Sh(t){return+t}function vh(t){return Math.floor(+t/1e3)}var Cr,ro,Mh,Ah,Eh;Zn({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function Zn(t){return Cr=jn(t),ro=Cr.format,Mh=Cr.parse,Ah=Cr.utcFormat,Eh=Cr.utcParse,Cr}function Kn(t,e){t=t.slice();var r=0,i=t.length-1,o=t[r],n=t[i],a;return n1?0:t<-1?_r:Math.acos(t)}function Jn(t){return t>=1?Jr:t<=-1?-Jr:Math.asin(t)}var ta=Math.PI,ea=2*ta,Ve=1e-6,qp=ea-Ve;function qh(t){this._+=t[0];for(let e=1,r=t.length;e=0))throw new Error(`invalid digits: ${t}`);if(e>15)return qh;let r=10**e;return function(i){this._+=i[0];for(let o=1,n=i.length;oVe)if(!(Math.abs(d*h-l*c)>Ve)||!n)this._append`L${this._x1=e},${this._y1=r}`;else{let p=i-a,S=o-s,A=h*h+l*l,W=p*p+S*S,$=Math.sqrt(A),V=Math.sqrt(u),M=n*Math.tan((ta-Math.acos((A+u-W)/(2*$*V)))/2),F=M/V,U=M/$;Math.abs(F-1)>Ve&&this._append`L${e+F*c},${r+F*d}`,this._append`A${n},${n},0,0,${+(d*p>c*S)},${this._x1=e+U*h},${this._y1=r+U*l}`}}arc(e,r,i,o,n,a){if(e=+e,r=+r,i=+i,a=!!a,i<0)throw new Error(`negative radius: ${i}`);let s=i*Math.cos(o),h=i*Math.sin(o),l=e+s,c=r+h,d=1^a,u=a?o-n:n-o;this._x1===null?this._append`M${l},${c}`:(Math.abs(this._x1-l)>Ve||Math.abs(this._y1-c)>Ve)&&this._append`L${l},${c}`,i&&(u<0&&(u=u%ea+ea),u>qp?this._append`A${i},${i},0,1,${d},${e-s},${r-h}A${i},${i},0,1,${d},${this._x1=l},${this._y1=c}`:u>Ve&&this._append`A${i},${i},0,${+(u>=ta)},${d},${this._x1=e+i*Math.cos(n)},${this._y1=r+i*Math.sin(n)}`)}rect(e,r,i,o){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+r}h${i=+i}v${+o}h${-i}Z`}toString(){return this._}};function zh(){return new Xe}zh.prototype=Xe.prototype;function oo(t){let e=3;return t.digits=function(r){if(!arguments.length)return e;if(r==null)e=null;else{let i=Math.floor(r);if(!(i>=0))throw new RangeError(`invalid digits: ${r}`);e=i}return t},()=>new Xe(e)}function Pp(t){return t.innerRadius}function $p(t){return t.outerRadius}function Wp(t){return t.startAngle}function Up(t){return t.endAngle}function Hp(t){return t&&t.padAngle}function Yp(t,e,r,i,o,n,a,s){var h=r-t,l=i-e,c=a-o,d=s-n,u=d*h-c*l;if(!(u*ux*x+L*L&&(w=K,H=E),{cx:w,cy:H,x01:-c,y01:-d,x11:w*(o/U-1),y11:H*(o/U-1)}}function Gp(){var t=Pp,e=$p,r=lt(0),i=null,o=Wp,n=Up,a=Hp,s=null,h=oo(l);function l(){var c,d,u=+t.apply(this,arguments),p=+e.apply(this,arguments),S=o.apply(this,arguments)-Jr,A=n.apply(this,arguments)-Jr,W=Qn(A-S),$=A>S;if(s||(s=c=h()),pbt))s.moveTo(0,0);else if(W>br-bt)s.moveTo(p*we(S),p*jt(S)),s.arc(0,0,p,S,A,!$),u>bt&&(s.moveTo(u*we(A),u*jt(A)),s.arc(0,0,u,A,S,$));else{var V=S,M=A,F=S,U=A,T=W,j=W,w=a.apply(this,arguments)/2,H=w>bt&&(i?+i.apply(this,arguments):Ge(u*u+p*p)),K=io(Qn(p-u)/2,+r.apply(this,arguments)),E=K,v=K,g,x;if(H>bt){var L=Jn(H/u*jt(w)),k=Jn(H/p*jt(w));(T-=L*2)>bt?(L*=$?1:-1,F+=L,U-=L):(T=0,F=U=(S+A)/2),(j-=k*2)>bt?(k*=$?1:-1,V+=k,M-=k):(j=0,V=M=(S+A)/2)}var R=p*we(V),I=p*jt(V),G=u*we(U),J=u*jt(U);if(K>bt){var it=p*we(M),ot=p*jt(M),mt=u*we(F),Rt=u*jt(F),ut;if(W<_r)if(ut=Yp(R,I,mt,Rt,it,ot,G,J)){var $t=R-ut[0],Mt=I-ut[1],ht=it-ut[0],B=ot-ut[1],Y=1/jt(Rh(($t*ht+Mt*B)/(Ge($t*$t+Mt*Mt)*Ge(ht*ht+B*B)))/2),X=Ge(ut[0]*ut[0]+ut[1]*ut[1]);E=io(K,(u-X)/(Y-1)),v=io(K,(p-X)/(Y+1))}else E=v=0}j>bt?v>bt?(g=no(mt,Rt,R,I,p,v,$),x=no(it,ot,G,J,p,v,$),s.moveTo(g.cx+g.x01,g.cy+g.y01),vbt)||!(T>bt)?s.lineTo(G,J):E>bt?(g=no(G,J,it,ot,u,-E,$),x=no(R,I,mt,Rt,u,-E,$),s.lineTo(g.cx+g.x01,g.cy+g.y01),Et?1:e>=t?0:NaN}function Hh(t){return t}function Xp(){var t=Hh,e=Uh,r=null,i=lt(0),o=lt(br),n=lt(0);function a(s){var h,l=(s=ao(s)).length,c,d,u=0,p=new Array(l),S=new Array(l),A=+i.apply(this,arguments),W=Math.min(br,Math.max(-br,o.apply(this,arguments)-A)),$,V=Math.min(Math.abs(W)/l,n.apply(this,arguments)),M=V*(W<0?-1:1),F;for(h=0;h0&&(u+=F);for(e!=null?p.sort(function(U,T){return e(S[U],S[T])}):r!=null&&p.sort(function(U,T){return r(s[U],s[T])}),h=0,d=u?(W-l*M)/u:0;h0?F*d:0)+M,S[c]={data:s[c],index:h,value:F,startAngle:A,endAngle:$,padAngle:V};return S}return a.value=function(s){return arguments.length?(t=typeof s=="function"?s:lt(+s),a):t},a.sortValues=function(s){return arguments.length?(e=s,r=null,a):e},a.sort=function(s){return arguments.length?(r=s,e=null,a):r},a.startAngle=function(s){return arguments.length?(i=typeof s=="function"?s:lt(+s),a):i},a.endAngle=function(s){return arguments.length?(o=typeof s=="function"?s:lt(+s),a):o},a.padAngle=function(s){return arguments.length?(n=typeof s=="function"?s:lt(+s),a):n},a}function Tr(t,e,r){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+r)/6)}function ti(t){this._context=t}ti.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:Tr(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&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:Tr(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function jp(t){return new ti(t)}var so=class{constructor(e,r){this._context=e,this._x=r}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(e,r){switch(e=+e,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(e,r):this._context.moveTo(e,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,r,e,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,e,this._y0,e,r);break}}this._x0=e,this._y0=r}};function Zp(t){return new so(t,!0)}function Kp(t){return new so(t,!1)}function Ht(){}function Yh(t){this._context=t}Yh.prototype={areaStart:Ht,areaEnd:Ht,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);break}}},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:Tr(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function Qp(t){return new Yh(t)}function Gh(t){this._context=t}Gh.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||this._line!==0&&this._point===3)&&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 r=(this._x0+4*this._x1+t)/6,i=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(r,i):this._context.moveTo(r,i);break;case 3:this._point=4;default:Tr(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function Jp(t){return new Gh(t)}function Vh(t,e){this._basis=new ti(t),this._beta=e}Vh.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,e=this._y,r=t.length-1;if(r>0)for(var i=t[0],o=e[0],n=t[r]-i,a=e[r]-o,s=-1,h;++s<=r;)h=s/r,this._basis.point(this._beta*t[s]+(1-this._beta)*(i+h*n),this._beta*e[s]+(1-this._beta)*(o+h*a));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};var tg=function t(e){function r(i){return e===1?new ti(i):new Vh(i,e)}return r.beta=function(i){return t(+i)},r}(.85);function kr(t,e,r){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-r),t._x2,t._y2)}function lo(t,e){this._context=t,this._k=(1-e)/6}lo.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:kr(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&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:kr(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var eg=function t(e){function r(i){return new lo(i,e)}return r.tension=function(i){return t(+i)},r}(0);function ho(t,e){this._context=t,this._k=(1-e)/6}ho.prototype={areaStart:Ht,areaEnd:Ht,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);break}}},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:kr(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var rg=function t(e){function r(i){return new ho(i,e)}return r.tension=function(i){return t(+i)},r}(0);function co(t,e){this._context=t,this._k=(1-e)/6}co.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||this._line!==0&&this._point===3)&&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:kr(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var ig=function t(e){function r(i){return new co(i,e)}return r.tension=function(i){return t(+i)},r}(0);function ei(t,e,r){var i=t._x1,o=t._y1,n=t._x2,a=t._y2;if(t._l01_a>bt){var s=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,h=3*t._l01_a*(t._l01_a+t._l12_a);i=(i*s-t._x0*t._l12_2a+t._x2*t._l01_2a)/h,o=(o*s-t._y0*t._l12_2a+t._y2*t._l01_2a)/h}if(t._l23_a>bt){var l=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,c=3*t._l23_a*(t._l23_a+t._l12_a);n=(n*l+t._x1*t._l23_2a-e*t._l12_2a)/c,a=(a*l+t._y1*t._l23_2a-r*t._l12_2a)/c}t._context.bezierCurveTo(i,o,n,a,t._x2,t._y2)}function Xh(t,e){this._context=t,this._alpha=e}Xh.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);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var r=this._x2-t,i=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+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:ei(this,t,e);break}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}};var og=function t(e){function r(i){return e?new Xh(i,e):new lo(i,0)}return r.alpha=function(i){return t(+i)},r}(.5);function jh(t,e){this._context=t,this._alpha=e}jh.prototype={areaStart:Ht,areaEnd:Ht,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);break}}},point:function(t,e){if(t=+t,e=+e,this._point){var r=this._x2-t,i=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+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:ei(this,t,e);break}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}};var ng=function t(e){function r(i){return e?new jh(i,e):new ho(i,0)}return r.alpha=function(i){return t(+i)},r}(.5);function Zh(t,e){this._context=t,this._alpha=e}Zh.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||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var r=this._x2-t,i=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+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:ei(this,t,e);break}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}};var ag=function t(e){function r(i){return e?new Zh(i,e):new co(i,0)}return r.alpha=function(i){return t(+i)},r}(.5);function Kh(t){this._context=t}Kh.prototype={areaStart:Ht,areaEnd:Ht,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,e){t=+t,e=+e,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e))}};function sg(t){return new Kh(t)}function Qh(t){return t<0?-1:1}function Jh(t,e,r){var i=t._x1-t._x0,o=e-t._x1,n=(t._y1-t._y0)/(i||o<0&&-0),a=(r-t._y1)/(o||i<0&&-0),s=(n*o+a*i)/(i+o);return(Qh(n)+Qh(a))*Math.min(Math.abs(n),Math.abs(a),.5*Math.abs(s))||0}function tc(t,e){var r=t._x1-t._x0;return r?(3*(t._y1-t._y0)/r-e)/2:e}function ia(t,e,r){var i=t._x0,o=t._y0,n=t._x1,a=t._y1,s=(n-i)/3;t._context.bezierCurveTo(i+s,o+s*e,n-s,a-s*r,n,a)}function uo(t){this._context=t}uo.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:ia(this,this._t0,tc(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var r=NaN;if(t=+t,e=+e,!(t===this._x1&&e===this._y1)){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,ia(this,tc(this,r=Jh(this,t,e)),r);break;default:ia(this,this._t0,r=Jh(this,t,e));break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=r}}};function ec(t){this._context=new rc(t)}(ec.prototype=Object.create(uo.prototype)).point=function(t,e){uo.prototype.point.call(this,e,t)};function rc(t){this._context=t}rc.prototype={moveTo:function(t,e){this._context.moveTo(e,t)},closePath:function(){this._context.closePath()},lineTo:function(t,e){this._context.lineTo(e,t)},bezierCurveTo:function(t,e,r,i,o,n){this._context.bezierCurveTo(e,t,i,r,n,o)}};function lg(t){return new uo(t)}function hg(t){return new ec(t)}function oc(t){this._context=t}oc.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,e=this._y,r=t.length;if(r)if(this._line?this._context.lineTo(t[0],e[0]):this._context.moveTo(t[0],e[0]),r===2)this._context.lineTo(t[1],e[1]);else for(var i=ic(t),o=ic(e),n=0,a=1;a=0;--e)o[e]=(a[e]-o[e+1])/n[e];for(n[r-1]=(t[r]+o[r-1])/2,e=0;e=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 r=this._x*(1-this._t)+t*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,e)}break}}this._x=t,this._y=e}};function ug(t){return new fo(t,.5)}function fg(t){return new fo(t,0)}function mg(t){return new fo(t,1)}var dg={value:()=>{}};function ac(){for(var t=0,e=arguments.length,r={},i;t=0&&(i=r.slice(o+1),r=r.slice(0,o)),r&&!e.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:i}})}mo.prototype=ac.prototype={constructor:mo,on:function(t,e){var r=this._,i=pg(t+"",r),o,n=-1,a=i.length;if(arguments.length<2){for(;++n0)for(var r=new Array(o),i=0,o,n;i=0&&t._call.call(void 0,e),t=t._next;--Sr}function sc(){je=(go=ni.now())+xo,Sr=ii=0;try{cc()}finally{Sr=0,Cg(),je=0}}function yg(){var t=ni.now(),e=t-go;e>lc&&(xo-=e,go=t)}function Cg(){for(var t,e=po,r,i=1/0;e;)e._call?(i>e._time&&(i=e._time),t=e,e=e._next):(r=e._next,e._next=null,e=t?t._next=r:po=r);oi=t,na(i)}function na(t){if(!Sr){ii&&(ii=clearTimeout(ii));var e=t-je;e>24?(t<1/0&&(ii=setTimeout(sc,t-ni.now()-xo)),ri&&(ri=clearInterval(ri))):(ri||(go=ni.now(),ri=setInterval(yg,lc)),Sr=1,hc(sc))}}function Co(t,e,r){var i=new ai;return e=e==null?0:+e,i.restart(o=>{i.stop(),t(o+e)},e,r),i}var _g=oa("start","end","cancel","interrupt"),bg=[],mc=0,uc=1,bo=2,_o=3,fc=4,To=5,li=6;function Be(t,e,r,i,o,n){var a=t.__transition;if(!a)t.__transition={};else if(r in a)return;Tg(t,r,{name:e,index:i,group:o,on:_g,tween:bg,time:n.time,delay:n.delay,duration:n.duration,ease:n.ease,timer:null,state:mc})}function hi(t,e){var r=gt(t,e);if(r.state>mc)throw new Error("too late; already scheduled");return r}function Bt(t,e){var r=gt(t,e);if(r.state>_o)throw new Error("too late; already running");return r}function gt(t,e){var r=t.__transition;if(!r||!(r=r[e]))throw new Error("transition not found");return r}function Tg(t,e,r){var i=t.__transition,o;i[e]=r,r.timer=yo(n,0,r.time);function n(l){r.state=uc,r.timer.restart(a,r.delay,r.time),r.delay<=l&&a(l-r.delay)}function a(l){var c,d,u,p;if(r.state!==uc)return h();for(c in i)if(p=i[c],p.name===r.name){if(p.state===_o)return Co(a);p.state===fc?(p.state=li,p.timer.stop(),p.on.call("interrupt",t,t.__data__,p.index,p.group),delete i[c]):+cbo&&i.state=0&&(e=e.slice(0,r)),!e||e==="start"})}function Wg(t,e,r){var i,o,n=$g(e)?hi:Bt;return function(){var a=n(this,t),s=a.on;s!==i&&(o=(i=s).copy()).on(e,r),a.on=o}}function Sc(t,e){var r=this._id;return arguments.length<2?gt(this.node(),r).on.on(t):this.each(Wg(r,t,e))}function Ug(t){return function(){var e=this.parentNode;for(var r in this.__transition)if(+r!==t)return;e&&e.removeChild(this)}}function vc(){return this.on("end.remove",Ug(this._id))}function wc(t){var e=this._name,r=this._id;typeof t!="function"&&(t=De(t));for(var i=this._groups,o=i.length,n=new Array(o),a=0;a