dsh-thoughtdag 0.5.19 → 0.5.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-app/assets/abnfDiagram-VCTEODGH-BmlsnR28.js +1 -0
- package/dist-app/assets/arc-4k4Kddh9.js +1 -0
- package/dist-app/assets/architectureDiagram-5GKGNRK7-BuacmIpL.js +36 -0
- package/dist-app/assets/blockDiagram-I7D4REHJ-JX7h4WWl.js +129 -0
- package/dist-app/assets/c4Diagram-7LVT6UL2-Cp3pP9V9.js +38 -0
- package/dist-app/assets/{canonical-bSxBmsm7.js → canonical-B-X5o-6D.js} +2 -2
- package/dist-app/assets/{canvas-record-qO1KINUh.js → canvas-record-CxDxerX8.js} +1 -1
- package/dist-app/assets/channel-GKL8NncG.js +1 -0
- package/dist-app/assets/chunk-2Q5K7J3B-mR0xNUcf.js +1 -0
- package/dist-app/assets/chunk-5VM5RSS4-B3FJnk33.js +15 -0
- package/dist-app/assets/chunk-F27PBJKO-GG0xbyKU.js +1 -0
- package/dist-app/assets/chunk-IMKFNOWR-CK5rKklp.js +231 -0
- package/dist-app/assets/chunk-JWPE2WC7-CnjfwwXP.js +1 -0
- package/dist-app/assets/chunk-POPQ4Y6H-ISG0Axt5.js +1 -0
- package/dist-app/assets/chunk-SVP7TREG-Di8Y7pYg.js +88 -0
- package/dist-app/assets/chunk-TICWLB2K-DlYo009w.js +206 -0
- package/dist-app/assets/chunk-XXDRQBXY-DSu27P5i.js +1 -0
- package/dist-app/assets/classDiagram-ZZMXUADV-CfiMnbJv.js +1 -0
- package/dist-app/assets/classDiagram-v2-VYDZK3BY-CfiMnbJv.js +1 -0
- package/dist-app/assets/{claude-code-session-DkNDRQp8.js → claude-code-session-BYx2_4G1.js} +4 -4
- package/dist-app/assets/{codex-session-B2hAZ_ax.js → codex-session-BH6Ogwin.js} +1 -1
- package/dist-app/assets/cose-bilkent-JH36ORCC-2jNLoiin.js +1 -0
- package/dist-app/assets/cynefin-OW5HDTMX-CYtWRYx6.js +166 -0
- package/dist-app/assets/cynefinDiagram-5FMLGOSQ-Dht0kBaK.js +62 -0
- package/dist-app/assets/cytoscape.esm-BDkkwuE4.js +321 -0
- package/dist-app/assets/dagre-GXQ25YYZ-CdJwfp-j.js +4 -0
- package/dist-app/assets/defaultLocale-DX6XiGOO.js +1 -0
- package/dist-app/assets/diagram-S7CK7UJ4-DvVIz9wN.js +30 -0
- package/dist-app/assets/diagram-UQ7AKVKN-zaxruSox.js +41 -0
- package/dist-app/assets/diagram-VSXAHHWV-BpisZmMI.js +3 -0
- package/dist-app/assets/diagram-VX7I27RA-CEC2DdCe.js +24 -0
- package/dist-app/assets/diagram-Z3DM3KII-BccyzzPj.js +24 -0
- package/dist-app/assets/{dsh-session-AQk-ryCb.js → dsh-session-Bgvf-2ie.js} +2 -2
- package/dist-app/assets/ebnfDiagram-PWID7BFC-iAT6gvfL.js +1 -0
- package/dist-app/assets/erDiagram-RLTQ6QDP-Zixusc5i.js +99 -0
- package/dist-app/assets/{experiment-loop-BzzzDlbH.js → experiment-loop-gxZgdQ3u.js} +1 -1
- package/dist-app/assets/flowDiagram-HODETNUW-B_X_09yE.js +168 -0
- package/dist-app/assets/ganttDiagram-EL5Y4UJY-BcvE7rsg.js +292 -0
- package/dist-app/assets/gitGraphDiagram-WWUBYQGX-hxOTtQbp.js +106 -0
- package/dist-app/assets/{http-bridge-BnYAV4lB.js → http-bridge-J5k9wd7t.js} +1 -1
- package/dist-app/assets/index-CTPL9Dm_.css +1 -0
- package/dist-app/assets/{index-BH9ozg79.js → index-CaJu4U8U.js} +251 -241
- package/dist-app/assets/{index-YWyx765g.js → index-DqAUkEeY.js} +3 -3
- package/dist-app/assets/{index-aOSCk5D-.js → index-Mh4X9Asm.js} +1 -1
- package/dist-app/assets/{index-BmwffA_p.js → index-Tx9fHuzW.js} +35 -35
- package/dist-app/assets/infoDiagram-27XIBGKW-BOyfWDQh.js +2 -0
- package/dist-app/assets/init-Gi6I4Gst.js +1 -0
- package/dist-app/assets/ishikawaDiagram-5VMMS53U-ubN-F3uw.js +70 -0
- package/dist-app/assets/journeyDiagram-3NMN7TZE-EEUt8KFZ.js +139 -0
- package/dist-app/assets/kanban-definition-UXKFOSKX-BHoTyZ-H.js +89 -0
- package/dist-app/assets/layout-CQ6ZrisW.js +1 -0
- package/dist-app/assets/linear-LOsR28TU.js +1 -0
- package/dist-app/assets/mermaid.core-C0BcALIm.js +308 -0
- package/dist-app/assets/mindmap-definition-YA3MSWOX-C9OJtKZo.js +96 -0
- package/dist-app/assets/ordinal-Cboi1Yqb.js +1 -0
- package/dist-app/assets/pegDiagram-XKGWAZYB-BVaiwlYa.js +1 -0
- package/dist-app/assets/{pi-session-CNcLBGJ1.js → pi-session-C1TO9XXu.js} +2 -2
- package/dist-app/assets/pieDiagram-E7YTZNPT-Cl7s5yat.js +39 -0
- package/dist-app/assets/quadrantDiagram-AXDQQJYC-D1468IWb.js +7 -0
- package/dist-app/assets/railroadDiagram-O6MQD6OU-Qrp26LKj.js +1 -0
- package/dist-app/assets/requirementDiagram-BXWQKSXE-DbN5V886.js +84 -0
- package/dist-app/assets/sankeyDiagram-P5KCCOFB-LbmTEAz2.js +40 -0
- package/dist-app/assets/{sensitive-scan-Cs2TuwIB.js → sensitive-scan-Bra40lYM.js} +1 -1
- package/dist-app/assets/sequenceDiagram-WJ2MYXX4-CPXoMkcM.js +162 -0
- package/dist-app/assets/{session-handoff-CLQ0ZIYD.js → session-handoff-CScqkePm.js} +2 -2
- package/dist-app/assets/{shared-LHIg0YHa.js → shared-Dli4ryBj.js} +1 -1
- package/dist-app/assets/sizeCapture-INFHLROL-Ver6XJXZ.js +1 -0
- package/dist-app/assets/stateDiagram-D77RDMKH-CoTk522r.js +1 -0
- package/dist-app/assets/stateDiagram-v2-MP3YSRHH-DJacHmOW.js +1 -0
- package/dist-app/assets/swimlanes-42K2YHIH-CxnYRWCO.js +1 -0
- package/dist-app/assets/swimlanesDiagram-VR7AAH4N-BgesyEx1.js +8 -0
- package/dist-app/assets/timeline-definition-24CTP7MA-BPTTWz0t.js +120 -0
- package/dist-app/assets/{turndown-plugin-gfm.cjs-j992pbuV.js → turndown-plugin-gfm.cjs-BOuki0om.js} +1 -1
- package/dist-app/assets/{update-check-3zMP9HL5.js → update-check-BsnTW6VR.js} +1 -1
- package/dist-app/assets/vennDiagram-4TSXK5OY-KQ0VCvz7.js +34 -0
- package/dist-app/assets/wardleyDiagram-VM6X3IG4-DoiF8Mk5.js +78 -0
- package/dist-app/assets/xychartDiagram-S5SC5T6Z-CiO0NJVo.js +7 -0
- package/dist-app/index.html +2 -2
- package/package.json +1 -1
- package/dist-app/assets/index-YkjjqQPO.css +0 -1
|
@@ -0,0 +1,308 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-CaJu4U8U.js","assets/index-CTPL9Dm_.css","assets/sizeCapture-INFHLROL-Ver6XJXZ.js","assets/purify.es-Cz4mVeUR.js","assets/dagre-GXQ25YYZ-CdJwfp-j.js","assets/layout-CQ6ZrisW.js","assets/swimlanes-42K2YHIH-CxnYRWCO.js","assets/cose-bilkent-JH36ORCC-2jNLoiin.js","assets/cytoscape.esm-BDkkwuE4.js","assets/c4Diagram-7LVT6UL2-Cp3pP9V9.js","assets/chunk-F27PBJKO-GG0xbyKU.js","assets/flowDiagram-HODETNUW-B_X_09yE.js","assets/chunk-5VM5RSS4-B3FJnk33.js","assets/chunk-XXDRQBXY-DSu27P5i.js","assets/chunk-POPQ4Y6H-ISG0Axt5.js","assets/channel-GKL8NncG.js","assets/swimlanesDiagram-VR7AAH4N-BgesyEx1.js","assets/erDiagram-RLTQ6QDP-Zixusc5i.js","assets/gitGraphDiagram-WWUBYQGX-hxOTtQbp.js","assets/chunk-2Q5K7J3B-mR0xNUcf.js","assets/chunk-JWPE2WC7-CnjfwwXP.js","assets/cynefin-OW5HDTMX-CYtWRYx6.js","assets/ganttDiagram-EL5Y4UJY-BcvE7rsg.js","assets/linear-LOsR28TU.js","assets/init-Gi6I4Gst.js","assets/defaultLocale-DX6XiGOO.js","assets/infoDiagram-27XIBGKW-BOyfWDQh.js","assets/pieDiagram-E7YTZNPT-Cl7s5yat.js","assets/arc-4k4Kddh9.js","assets/ordinal-Cboi1Yqb.js","assets/quadrantDiagram-AXDQQJYC-D1468IWb.js","assets/xychartDiagram-S5SC5T6Z-CiO0NJVo.js","assets/requirementDiagram-BXWQKSXE-DbN5V886.js","assets/sequenceDiagram-WJ2MYXX4-CPXoMkcM.js","assets/classDiagram-ZZMXUADV-CfiMnbJv.js","assets/chunk-TICWLB2K-DlYo009w.js","assets/classDiagram-v2-VYDZK3BY-CfiMnbJv.js","assets/stateDiagram-D77RDMKH-CoTk522r.js","assets/chunk-IMKFNOWR-CK5rKklp.js","assets/stateDiagram-v2-MP3YSRHH-DJacHmOW.js","assets/journeyDiagram-3NMN7TZE-EEUt8KFZ.js","assets/timeline-definition-24CTP7MA-BPTTWz0t.js","assets/mindmap-definition-YA3MSWOX-C9OJtKZo.js","assets/kanban-definition-UXKFOSKX-BHoTyZ-H.js","assets/sankeyDiagram-P5KCCOFB-LbmTEAz2.js","assets/diagram-Z3DM3KII-BccyzzPj.js","assets/diagram-UQ7AKVKN-zaxruSox.js","assets/blockDiagram-I7D4REHJ-JX7h4WWl.js","assets/diagram-S7CK7UJ4-DvVIz9wN.js","assets/architectureDiagram-5GKGNRK7-BuacmIpL.js","assets/diagram-VSXAHHWV-BpisZmMI.js","assets/ishikawaDiagram-5VMMS53U-ubN-F3uw.js","assets/vennDiagram-4TSXK5OY-KQ0VCvz7.js","assets/diagram-VX7I27RA-CEC2DdCe.js","assets/wardleyDiagram-VM6X3IG4-DoiF8Mk5.js","assets/cynefinDiagram-5FMLGOSQ-Dht0kBaK.js","assets/railroadDiagram-O6MQD6OU-Qrp26LKj.js","assets/chunk-SVP7TREG-Di8Y7pYg.js","assets/ebnfDiagram-PWID7BFC-iAT6gvfL.js","assets/abnfDiagram-VCTEODGH-BmlsnR28.js","assets/pegDiagram-XKGWAZYB-BVaiwlYa.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{B as _a,_ as Bt,A as Tt}from"./index-CaJu4U8U.js";import Ur from"./purify.es-Cz4mVeUR.js";var lc=Object.defineProperty,u=(e,t)=>lc(e,"name",{value:t,configurable:!0}),Sf=(e,t)=>{for(var r in t)lc(e,r,{get:t[r],enumerable:!0})},is={exports:{}},Tf=is.exports,Vn;function Bf(){return Vn||(Vn=1,(function(e,t){(function(r,i){e.exports=i()})(Tf,(function(){var r=1e3,i=6e4,s=36e5,o="millisecond",a="second",n="minute",l="hour",c="day",h="week",d="month",g="quarter",f="year",m="date",y="Invalid Date",C=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,x=/\[([^\]]+)]|YYYY|YY|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,k={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(E){var O=["th","st","nd","rd"],_=E%100;return"["+E+(O[(_-20)%10]||O[_]||O[0])+"]"}},S=function(E,O,_){var R=String(E);return!R||R.length>=O?E:""+Array(O+1-R.length).join(_)+E},T={s:S,z:function(E){var O=-E.utcOffset(),_=Math.abs(O),R=Math.floor(_/60),$=_%60;return(O<=0?"+":"-")+S(R,2,"0")+":"+S($,2,"0")},m:function E(O,_){if(O.date()<_.date())return-E(_,O);var R=12*(_.year()-O.year())+(_.month()-O.month()),$=O.clone().add(R,d),J=_-$<0,Z=O.clone().add(R+(J?-1:1),d);return+(-(R+(_-$)/(J?$-Z:Z-$))||0)},a:function(E){return E<0?Math.ceil(E)||0:Math.floor(E)},p:function(E){return{M:d,y:f,w:h,d:c,D:m,h:l,m:n,s:a,ms:o,Q:g}[E]||String(E||"").toLowerCase().replace(/s$/,"")},u:function(E){return E===void 0}},B="en",L={};L[B]=k;var M="$isDayjsObject",v=function(E){return E instanceof et||!(!E||!E[M])},X=function E(O,_,R){var $;if(!O)return B;if(typeof O=="string"){var J=O.toLowerCase();L[J]&&($=J),_&&(L[J]=_,$=J);var Z=O.split("-");if(!$&&Z.length>1)return E(Z[0])}else{var ut=O.name;L[ut]=O,$=ut}return!R&&$&&(B=$),$||!R&&B},z=function(E,O){if(v(E))return E.clone();var _=typeof O=="object"?O:{};return _.date=E,_.args=arguments,new et(_)},I=T;I.l=X,I.i=v,I.w=function(E,O){return z(E,{locale:O.$L,utc:O.$u,x:O.$x,$offset:O.$offset})};var et=(function(){function E(_){this.$L=X(_.locale,null,!0),this.parse(_),this.$x=this.$x||_.x||{},this[M]=!0}var O=E.prototype;return O.parse=function(_){this.$d=(function(R){var $=R.date,J=R.utc;if($===null)return new Date(NaN);if(I.u($))return new Date;if($ instanceof Date)return new Date($);if(typeof $=="string"&&!/Z$/i.test($)){var Z=$.match(C);if(Z){var ut=Z[2]-1||0,xt=(Z[7]||"0").substring(0,3);return J?new Date(Date.UTC(Z[1],ut,Z[3]||1,Z[4]||0,Z[5]||0,Z[6]||0,xt)):new Date(Z[1],ut,Z[3]||1,Z[4]||0,Z[5]||0,Z[6]||0,xt)}}return new Date($)})(_),this.init()},O.init=function(){var _=this.$d;this.$y=_.getFullYear(),this.$M=_.getMonth(),this.$D=_.getDate(),this.$W=_.getDay(),this.$H=_.getHours(),this.$m=_.getMinutes(),this.$s=_.getSeconds(),this.$ms=_.getMilliseconds()},O.$utils=function(){return I},O.isValid=function(){return this.$d.toString()!==y},O.isSame=function(_,R){var $=z(_);return this.startOf(R)<=$&&$<=this.endOf(R)},O.isAfter=function(_,R){return z(_)<this.startOf(R)},O.isBefore=function(_,R){return this.endOf(R)<z(_)},O.$g=function(_,R,$){return I.u(_)?this[R]:this.set($,_)},O.unix=function(){return Math.floor(this.valueOf()/1e3)},O.valueOf=function(){return this.$d.getTime()},O.startOf=function(_,R){var $=this,J=!!I.u(R)||R,Z=I.p(_),ut=function(kt,Et){var Ot=I.w($.$u?Date.UTC($.$y,Et,kt):new Date($.$y,Et,kt),$);return J?Ot:Ot.endOf(c)},xt=function(kt,Et){return I.w($.toDate()[kt].apply($.toDate("s"),(J?[0,0,0,0]:[23,59,59,999]).slice(Et)),$)},Ct=this.$W,St=this.$M,wt=this.$D,ht="set"+(this.$u?"UTC":"");switch(Z){case f:return J?ut(1,0):ut(31,11);case d:return J?ut(1,St):ut(0,St+1);case h:var ft=this.$locale().weekStart||0,vt=(Ct<ft?Ct+7:Ct)-ft;return ut(J?wt-vt:wt+(6-vt),St);case c:case m:return xt(ht+"Hours",0);case l:return xt(ht+"Minutes",1);case n:return xt(ht+"Seconds",2);case a:return xt(ht+"Milliseconds",3);default:return this.clone()}},O.endOf=function(_){return this.startOf(_,!1)},O.$set=function(_,R){var $,J=I.p(_),Z="set"+(this.$u?"UTC":""),ut=($={},$[c]=Z+"Date",$[m]=Z+"Date",$[d]=Z+"Month",$[f]=Z+"FullYear",$[l]=Z+"Hours",$[n]=Z+"Minutes",$[a]=Z+"Seconds",$[o]=Z+"Milliseconds",$)[J],xt=J===c?this.$D+(R-this.$W):R;if(J===d||J===f){var Ct=this.clone().set(m,1);Ct.$d[ut](xt),Ct.init(),this.$d=Ct.set(m,Math.min(this.$D,Ct.daysInMonth())).$d}else ut&&this.$d[ut](xt);return this.init(),this},O.set=function(_,R){return this.clone().$set(_,R)},O.get=function(_){return this[I.p(_)]()},O.add=function(_,R){var $,J=this;_=Number(_);var Z=I.p(R),ut=function(St){var wt=z(J);return I.w(wt.date(wt.date()+Math.round(St*_)),J)};if(Z===d)return this.set(d,this.$M+_);if(Z===f)return this.set(f,this.$y+_);if(Z===c)return ut(1);if(Z===h)return ut(7);var xt=($={},$[n]=i,$[l]=s,$[a]=r,$)[Z]||1,Ct=this.$d.getTime()+_*xt;return I.w(Ct,this)},O.subtract=function(_,R){return this.add(-1*_,R)},O.format=function(_){var R=this,$=this.$locale();if(!this.isValid())return $.invalidDate||y;var J=_||"YYYY-MM-DDTHH:mm:ssZ",Z=I.z(this),ut=this.$H,xt=this.$m,Ct=this.$M,St=$.weekdays,wt=$.months,ht=$.meridiem,ft=function(Et,Ot,Jt,he){return Et&&(Et[Ot]||Et(R,J))||Jt[Ot].slice(0,he)},vt=function(Et){return I.s(ut%12||12,Et,"0")},kt=ht||function(Et,Ot,Jt){var he=Et<12?"AM":"PM";return Jt?he.toLowerCase():he};return J.replace(x,(function(Et,Ot){return Ot||(function(Jt){switch(Jt){case"YY":return String(R.$y).slice(-2);case"YYYY":return I.s(R.$y,4,"0");case"M":return Ct+1;case"MM":return I.s(Ct+1,2,"0");case"MMM":return ft($.monthsShort,Ct,wt,3);case"MMMM":return ft(wt,Ct);case"D":return R.$D;case"DD":return I.s(R.$D,2,"0");case"d":return String(R.$W);case"dd":return ft($.weekdaysMin,R.$W,St,2);case"ddd":return ft($.weekdaysShort,R.$W,St,3);case"dddd":return St[R.$W];case"H":return String(ut);case"HH":return I.s(ut,2,"0");case"h":return vt(1);case"hh":return vt(2);case"a":return kt(ut,xt,!0);case"A":return kt(ut,xt,!1);case"m":return String(xt);case"mm":return I.s(xt,2,"0");case"s":return String(R.$s);case"ss":return I.s(R.$s,2,"0");case"SSS":return I.s(R.$ms,3,"0");case"Z":return Z}return null})(Et)||Z.replace(":","")}))},O.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},O.diff=function(_,R,$){var J,Z=this,ut=I.p(R),xt=z(_),Ct=(xt.utcOffset()-this.utcOffset())*i,St=this-xt,wt=function(){return I.m(Z,xt)};switch(ut){case f:J=wt()/12;break;case d:J=wt();break;case g:J=wt()/3;break;case h:J=(St-Ct)/6048e5;break;case c:J=(St-Ct)/864e5;break;case l:J=St/s;break;case n:J=St/i;break;case a:J=St/r;break;default:J=St}return $?J:I.a(J)},O.daysInMonth=function(){return this.endOf(d).$D},O.$locale=function(){return L[this.$L]},O.locale=function(_,R){if(!_)return this.$L;var $=this.clone(),J=X(_,R,!0);return J&&($.$L=J),$},O.clone=function(){return I.w(this.$d,this)},O.toDate=function(){return new Date(this.valueOf())},O.toJSON=function(){return this.isValid()?this.toISOString():null},O.toISOString=function(){return this.$d.toISOString()},O.toString=function(){return this.$d.toUTCString()},E})(),H=et.prototype;return z.prototype=H,[["$ms",o],["$s",a],["$m",n],["$H",l],["$W",c],["$M",d],["$y",f],["$D",m]].forEach((function(E){H[E[1]]=function(O){return this.$g(O,E[0],E[1])}})),z.extend=function(E,O){return E.$i||(E(O,et,z),E.$i=!0),z},z.locale=X,z.isDayjs=v,z.unix=function(E){return z(1e3*E)},z.en=L[B],z.Ls=L,z.p={},z}))})(is)),is.exports}var _f=Bf();const vf=_a(_f);var Me={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},D={trace:u((...e)=>{},"trace"),debug:u((...e)=>{},"debug"),info:u((...e)=>{},"info"),warn:u((...e)=>{},"warn"),error:u((...e)=>{},"error"),fatal:u((...e)=>{},"fatal")},va=u(function(e="fatal"){let t=Me.fatal;typeof e=="string"?e.toLowerCase()in Me&&(t=Me[e]):typeof e=="number"&&(t=e),D.trace=()=>{},D.debug=()=>{},D.info=()=>{},D.warn=()=>{},D.error=()=>{},D.fatal=()=>{},t<=Me.fatal&&(D.fatal=console.error?console.error.bind(console,oe("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",oe("FATAL"))),t<=Me.error&&(D.error=console.error?console.error.bind(console,oe("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",oe("ERROR"))),t<=Me.warn&&(D.warn=console.warn?console.warn.bind(console,oe("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",oe("WARN"))),t<=Me.info&&(D.info=console.info?console.info.bind(console,oe("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",oe("INFO"))),t<=Me.debug&&(D.debug=console.debug?console.debug.bind(console,oe("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",oe("DEBUG"))),t<=Me.trace&&(D.trace=console.debug?console.debug.bind(console,oe("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",oe("TRACE")))},"setLogLevel"),oe=u(e=>`%c${vf().format("ss.SSS")} : ${e} : `,"format");const ss={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:e=>e>=255?255:e<0?0:e,g:e=>e>=255?255:e<0?0:e,b:e=>e>=255?255:e<0?0:e,h:e=>e%360,s:e=>e>=100?100:e<0?0:e,l:e=>e>=100?100:e<0?0:e,a:e=>e>=1?1:e<0?0:e},toLinear:e=>{const t=e/255;return e>.03928?Math.pow((t+.055)/1.055,2.4):t/12.92},hue2rgb:(e,t,r)=>(r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e),hsl2rgb:({h:e,s:t,l:r},i)=>{if(!t)return r*2.55;e/=360,t/=100,r/=100;const s=r<.5?r*(1+t):r+t-r*t,o=2*r-s;switch(i){case"r":return ss.hue2rgb(o,s,e+1/3)*255;case"g":return ss.hue2rgb(o,s,e)*255;case"b":return ss.hue2rgb(o,s,e-1/3)*255}},rgb2hsl:({r:e,g:t,b:r},i)=>{e/=255,t/=255,r/=255;const s=Math.max(e,t,r),o=Math.min(e,t,r),a=(s+o)/2;if(i==="l")return a*100;if(s===o)return 0;const n=s-o,l=a>.5?n/(2-s-o):n/(s+o);if(i==="s")return l*100;switch(s){case e:return((t-r)/n+(t<r?6:0))*60;case t:return((r-e)/n+2)*60;case r:return((e-t)/n+4)*60;default:return-1}}},Lf={clamp:(e,t,r)=>t>r?Math.min(t,Math.max(r,e)):Math.min(r,Math.max(t,e)),round:e=>Math.round(e*1e10)/1e10},Ff={dec2hex:e=>{const t=Math.round(e).toString(16);return t.length>1?t:`0${t}`}},bt={channel:ss,lang:Lf,unit:Ff},ze={};for(let e=0;e<=255;e++)ze[e]=bt.unit.dec2hex(e);const Xt={ALL:0,RGB:1,HSL:2};let Mf=class{constructor(){this.type=Xt.ALL}get(){return this.type}set(t){if(this.type&&this.type!==t)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=t}reset(){this.type=Xt.ALL}is(t){return this.type===t}};class Af{constructor(t,r){this.color=r,this.changed=!1,this.data=t,this.type=new Mf}set(t,r){return this.color=r,this.changed=!1,this.data=t,this.type.type=Xt.ALL,this}_ensureHSL(){const t=this.data,{h:r,s:i,l:s}=t;r===void 0&&(t.h=bt.channel.rgb2hsl(t,"h")),i===void 0&&(t.s=bt.channel.rgb2hsl(t,"s")),s===void 0&&(t.l=bt.channel.rgb2hsl(t,"l"))}_ensureRGB(){const t=this.data,{r,g:i,b:s}=t;r===void 0&&(t.r=bt.channel.hsl2rgb(t,"r")),i===void 0&&(t.g=bt.channel.hsl2rgb(t,"g")),s===void 0&&(t.b=bt.channel.hsl2rgb(t,"b"))}get r(){const t=this.data,r=t.r;return!this.type.is(Xt.HSL)&&r!==void 0?r:(this._ensureHSL(),bt.channel.hsl2rgb(t,"r"))}get g(){const t=this.data,r=t.g;return!this.type.is(Xt.HSL)&&r!==void 0?r:(this._ensureHSL(),bt.channel.hsl2rgb(t,"g"))}get b(){const t=this.data,r=t.b;return!this.type.is(Xt.HSL)&&r!==void 0?r:(this._ensureHSL(),bt.channel.hsl2rgb(t,"b"))}get h(){const t=this.data,r=t.h;return!this.type.is(Xt.RGB)&&r!==void 0?r:(this._ensureRGB(),bt.channel.rgb2hsl(t,"h"))}get s(){const t=this.data,r=t.s;return!this.type.is(Xt.RGB)&&r!==void 0?r:(this._ensureRGB(),bt.channel.rgb2hsl(t,"s"))}get l(){const t=this.data,r=t.l;return!this.type.is(Xt.RGB)&&r!==void 0?r:(this._ensureRGB(),bt.channel.rgb2hsl(t,"l"))}get a(){return this.data.a}set r(t){this.type.set(Xt.RGB),this.changed=!0,this.data.r=t}set g(t){this.type.set(Xt.RGB),this.changed=!0,this.data.g=t}set b(t){this.type.set(Xt.RGB),this.changed=!0,this.data.b=t}set h(t){this.type.set(Xt.HSL),this.changed=!0,this.data.h=t}set s(t){this.type.set(Xt.HSL),this.changed=!0,this.data.s=t}set l(t){this.type.set(Xt.HSL),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}}const Os=new Af({r:0,g:0,b:0,a:0},"transparent"),Lr={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:e=>{if(e.charCodeAt(0)!==35)return;const t=e.match(Lr.re);if(!t)return;const r=t[1],i=parseInt(r,16),s=r.length,o=s%4===0,a=s>4,n=a?1:17,l=a?8:4,c=o?0:-1,h=a?255:15;return Os.set({r:(i>>l*(c+3)&h)*n,g:(i>>l*(c+2)&h)*n,b:(i>>l*(c+1)&h)*n,a:o?(i&h)*n/255:1},e)},stringify:e=>{const{r:t,g:r,b:i,a:s}=e;return s<1?`#${ze[Math.round(t)]}${ze[Math.round(r)]}${ze[Math.round(i)]}${ze[Math.round(s*255)]}`:`#${ze[Math.round(t)]}${ze[Math.round(r)]}${ze[Math.round(i)]}`}},er={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:e=>{const t=e.match(er.hueRe);if(t){const[,r,i]=t;switch(i){case"grad":return bt.channel.clamp.h(parseFloat(r)*.9);case"rad":return bt.channel.clamp.h(parseFloat(r)*180/Math.PI);case"turn":return bt.channel.clamp.h(parseFloat(r)*360)}}return bt.channel.clamp.h(parseFloat(e))},parse:e=>{const t=e.charCodeAt(0);if(t!==104&&t!==72)return;const r=e.match(er.re);if(!r)return;const[,i,s,o,a,n]=r;return Os.set({h:er._hue2deg(i),s:bt.channel.clamp.s(parseFloat(s)),l:bt.channel.clamp.l(parseFloat(o)),a:a?bt.channel.clamp.a(n?parseFloat(a)/100:parseFloat(a)):1},e)},stringify:e=>{const{h:t,s:r,l:i,a:s}=e;return s<1?`hsla(${bt.lang.round(t)}, ${bt.lang.round(r)}%, ${bt.lang.round(i)}%, ${s})`:`hsl(${bt.lang.round(t)}, ${bt.lang.round(r)}%, ${bt.lang.round(i)}%)`}},Bi={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:e=>{e=e.toLowerCase();const t=Bi.colors[e];if(t)return Lr.parse(t)},stringify:e=>{const t=Lr.stringify(e);for(const r in Bi.colors)if(Bi.colors[r]===t)return r}},Ci={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:e=>{const t=e.charCodeAt(0);if(t!==114&&t!==82)return;const r=e.match(Ci.re);if(!r)return;const[,i,s,o,a,n,l,c,h]=r;return Os.set({r:bt.channel.clamp.r(s?parseFloat(i)*2.55:parseFloat(i)),g:bt.channel.clamp.g(a?parseFloat(o)*2.55:parseFloat(o)),b:bt.channel.clamp.b(l?parseFloat(n)*2.55:parseFloat(n)),a:c?bt.channel.clamp.a(h?parseFloat(c)/100:parseFloat(c)):1},e)},stringify:e=>{const{r:t,g:r,b:i,a:s}=e;return s<1?`rgba(${bt.lang.round(t)}, ${bt.lang.round(r)}, ${bt.lang.round(i)}, ${bt.lang.round(s)})`:`rgb(${bt.lang.round(t)}, ${bt.lang.round(r)}, ${bt.lang.round(i)})`}},Te={format:{keyword:Bi,hex:Lr,rgb:Ci,rgba:Ci,hsl:er,hsla:er},parse:e=>{if(typeof e!="string")return e;const t=Lr.parse(e)||Ci.parse(e)||er.parse(e)||Bi.parse(e);if(t)return t;throw new Error(`Unsupported color format: "${e}"`)},stringify:e=>!e.changed&&e.color?e.color:e.type.is(Xt.HSL)||e.data.r===void 0?er.stringify(e):e.a<1||!Number.isInteger(e.r)||!Number.isInteger(e.g)||!Number.isInteger(e.b)?Ci.stringify(e):Lr.stringify(e)},hc=(e,t)=>{const r=Te.parse(e);for(const i in t)r[i]=bt.channel.clamp[i](t[i]);return Te.stringify(r)},Ye=(e,t,r=0,i=1)=>{if(typeof e!="number")return hc(e,{a:t});const s=Os.set({r:bt.channel.clamp.r(e),g:bt.channel.clamp.g(t),b:bt.channel.clamp.b(r),a:bt.channel.clamp.a(i)});return Te.stringify(s)},Ef=e=>{const{r:t,g:r,b:i}=Te.parse(e),s=.2126*bt.channel.toLinear(t)+.7152*bt.channel.toLinear(r)+.0722*bt.channel.toLinear(i);return bt.lang.round(s)},$f=e=>Ef(e)>=.5,fe=e=>!$f(e),cc=(e,t,r)=>{const i=Te.parse(e),s=i[t],o=bt.channel.clamp[t](s+r);return s!==o&&(i[t]=o),Te.stringify(i)},q=(e,t)=>cc(e,"l",t),N=(e,t)=>cc(e,"l",-t),b=(e,t)=>{const r=Te.parse(e),i={};for(const s in t)t[s]&&(i[s]=r[s]+t[s]);return hc(e,i)},Of=(e,t,r=50)=>{const{r:i,g:s,b:o,a}=Te.parse(e),{r:n,g:l,b:c,a:h}=Te.parse(t),d=r/100,g=d*2-1,f=a-h,y=((g*f===-1?g:(g+f)/(1+g*f))+1)/2,C=1-y,x=i*y+n*C,k=s*y+l*C,S=o*y+c*C,T=a*d+h*(1-d);return Ye(x,k,S,T)},F=(e,t=100)=>{const r=Te.parse(e);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,Of(r,e,t)};var Yo=u((e,t,{depth:r=2}={})=>{const i={depth:r};if(Array.isArray(t)&&!Array.isArray(e))return t.forEach(s=>Yo(e,s,i)),e;if(Array.isArray(t)&&Array.isArray(e))return t.forEach(s=>{e.includes(s)||e.push(s)}),e;if(e==null||r<=0)return e!=null&&typeof e=="object"&&typeof t=="object"?Object.assign(e,t):t;if(t!=null&&typeof e=="object"&&typeof t=="object"){const s=e;Object.entries(t).forEach(([o,a])=>{if(typeof a=="object"){if(a===null)return;Object.hasOwn(e,o)||Object.defineProperty(e,o,{value:void 0,writable:!0,enumerable:!0,configurable:!0}),s[o]===void 0&&(s[o]=Array.isArray(a)?[]:{}),typeof s[o]=="object"&&(s[o]=Yo(s[o],a,{depth:r-1}))}else typeof s[o]!="object"&&(Object.hasOwn(e,o)?s[o]=a:Object.defineProperty(e,o,{value:a,writable:!0,enumerable:!0,configurable:!0}))})}return e},"assignWithDepth"),jt=Yo,_e="#ffffff",ve="#f2f2f2",mt=u((e,t)=>t?b(e,{s:-40,l:10}):b(e,{s:-40,l:-10}),"mkBorder"),Ar,Pf=(Ar=class{constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.useGradient=!0,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||b(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||b(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||mt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||mt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||mt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||mt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||F(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||F(this.tertiaryColor),this.lineColor=this.lineColor||F(this.background),this.arrowheadColor=this.arrowheadColor||F(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||F(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,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||q(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.vertLineColor=this.vertLineColor||"navy",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.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal",this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.darkMode?(this.rowOdd=this.rowOdd||N(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||N(this.mainBkg,10)):(this.rowOdd=this.rowOdd||q(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||q(this.mainBkg,5)),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||b(this.primaryColor,{h:30}),this.cScale4=this.cScale4||b(this.primaryColor,{h:60}),this.cScale5=this.cScale5||b(this.primaryColor,{h:90}),this.cScale6=this.cScale6||b(this.primaryColor,{h:120}),this.cScale7=this.cScale7||b(this.primaryColor,{h:150}),this.cScale8=this.cScale8||b(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||b(this.primaryColor,{h:270}),this.cScale10=this.cScale10||b(this.primaryColor,{h:300}),this.cScale11=this.cScale11||b(this.primaryColor,{h:330}),this.darkMode)for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScale"+r]=N(this["cScale"+r],75);else for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScale"+r]=N(this["cScale"+r],25);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleInv"+r]=this["cScaleInv"+r]||F(this["cScale"+r]);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this.darkMode?this["cScalePeer"+r]=this["cScalePeer"+r]||q(this["cScale"+r],10):this["cScalePeer"+r]=this["cScalePeer"+r]||N(this["cScale"+r],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleLabel"+r]=this["cScaleLabel"+r]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let r=0;r<5;r++)this["surface"+r]=this["surface"+r]||b(this.mainBkg,{h:180,s:-15,l:t*(5+r*3)}),this["surfacePeer"+r]=this["surfacePeer"+r]||b(this.mainBkg,{h:180,s:-15,l:t*(8+r*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||b(this.primaryColor,{h:64}),this.fillType3=this.fillType3||b(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||b(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||b(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||b(this.primaryColor,{h:128}),this.fillType7=this.fillType7||b(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||b(this.primaryColor,{l:-10}),this.pie5=this.pie5||b(this.secondaryColor,{l:-10}),this.pie6=this.pie6||b(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||b(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||b(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||b(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||b(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||b(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||b(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.venn1=this.venn1??b(this.primaryColor,{l:-30}),this.venn2=this.venn2??b(this.secondaryColor,{l:-30}),this.venn3=this.venn3??b(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??b(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??b(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??b(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??b(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??b(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:this.cynefin?.domainFontSize||16,itemFontSize:this.cynefin?.itemFontSize||12,boundaryColor:this.cynefin?.boundaryColor||this.lineColor,boundaryWidth:this.cynefin?.boundaryWidth||2,cliffColor:this.cynefin?.cliffColor||"#8B0000",cliffWidth:this.cynefin?.cliffWidth||4,arrowColor:this.cynefin?.arrowColor||this.lineColor,arrowWidth:this.cynefin?.arrowWidth||2,complexBg:this.cynefin?.complexBg||"#E8F5E9",complicatedBg:this.cynefin?.complicatedBg||"#E3F2FD",chaoticBg:this.cynefin?.chaoticBg||"#FBE9E7",clearBg:this.cynefin?.clearBg||"#FFF8E1",confusionBg:this.cynefin?.confusionBg||"#F3E5F5",textColor:this.cynefin?.textColor||this.textColor,labelColor:this.cynefin?.labelColor||this.primaryTextColor},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.background,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.background},this.archEdgeColor=this.archEdgeColor||"#777",this.archEdgeArrowColor=this.archEdgeArrowColor||"#777",this.archEdgeWidth=this.archEdgeWidth||"3",this.archGroupBorderColor=this.archGroupBorderColor||"#000",this.archGroupBorderWidth=this.archGroupBorderWidth||"2px",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||b(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||b(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||b(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||b(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||b(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||b(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||fe(this.quadrant1Fill)?q(this.quadrant1Fill):N(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?N(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||b(this.primaryColor,{h:-30}),this.git4=this.git4||b(this.primaryColor,{h:-60}),this.git5=this.git5||b(this.primaryColor,{h:-90}),this.git6=this.git6||b(this.primaryColor,{h:60}),this.git7=this.git7||b(this.primaryColor,{h:120}),this.darkMode?(this.git0=q(this.git0,25),this.git1=q(this.git1,25),this.git2=q(this.git2,25),this.git3=q(this.git3,25),this.git4=q(this.git4,25),this.git5=q(this.git5,25),this.git6=q(this.git6,25),this.git7=q(this.git7,25)):(this.git0=N(this.git0,25),this.git1=N(this.git1,25),this.git2=N(this.git2,25),this.git3=N(this.git3,25),this.git4=N(this.git4,25),this.git5=N(this.git5,25),this.git6=N(this.git6,25),this.git7=N(this.git7,25)),this.gitInv0=this.gitInv0||F(this.git0),this.gitInv1=this.gitInv1||F(this.git1),this.gitInv2=this.gitInv2||F(this.git2),this.gitInv3=this.gitInv3||F(this.git3),this.gitInv4=this.gitInv4||F(this.git4),this.gitInv5=this.gitInv5||F(this.git5),this.gitInv6=this.gitInv6||F(this.git6),this.gitInv7=this.gitInv7||F(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||_e,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ve,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},u(Ar,"Theme"),Ar),Df=u(e=>{const t=new Pf;return t.calculate(e),t},"getThemeVariables"),Er,If=(Er=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=q(this.primaryColor,16),this.tertiaryColor=b(this.primaryColor,{h:-160}),this.primaryBorderColor=F(this.background),this.secondaryBorderColor=mt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=mt(this.tertiaryColor,this.darkMode),this.primaryTextColor=F(this.primaryColor),this.secondaryTextColor=F(this.secondaryColor),this.tertiaryTextColor=F(this.tertiaryColor),this.lineColor=F(this.background),this.textColor=F(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=q(F("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=Ye(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.radius=5,this.strokeWidth=1,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.clusterBkg="#302F3D",this.sectionBkgColor=N("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=N(this.sectionBkgColor,10),this.taskBorderColor=Ye(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=Ye(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.vertLineColor="#00BFFF",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.rowOdd=this.rowOdd||q(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||N(this.mainBkg,10),this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal"}updateColors(){this.secondBkg=q(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=q(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.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.background,this.taskBkgColor=q(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=F(this.doneTaskBkgColor),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=b(this.primaryColor,{h:64}),this.fillType3=b(this.secondaryColor,{h:64}),this.fillType4=b(this.primaryColor,{h:-64}),this.fillType5=b(this.secondaryColor,{h:-64}),this.fillType6=b(this.primaryColor,{h:128}),this.fillType7=b(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||b(this.primaryColor,{h:30}),this.cScale4=this.cScale4||b(this.primaryColor,{h:60}),this.cScale5=this.cScale5||b(this.primaryColor,{h:90}),this.cScale6=this.cScale6||b(this.primaryColor,{h:120}),this.cScale7=this.cScale7||b(this.primaryColor,{h:150}),this.cScale8=this.cScale8||b(this.primaryColor,{h:210}),this.cScale9=this.cScale9||b(this.primaryColor,{h:270}),this.cScale10=this.cScale10||b(this.primaryColor,{h:300}),this.cScale11=this.cScale11||b(this.primaryColor,{h:330});for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||F(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScalePeer"+t]=this["cScalePeer"+t]||q(this["cScale"+t],10);for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||b(this.mainBkg,{h:30,s:-30,l:-(-10+t*4)}),this["surfacePeer"+t]=this["surfacePeer"+t]||b(this.mainBkg,{h:30,s:-30,l:-(-7+t*4)});this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["pie"+t]=this["cScale"+t];this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.mainContrastColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.mainContrastColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7";for(let t=0;t<8;t++)this["venn"+(t+1)]=this["venn"+(t+1)]??q(this["cScale"+t],30);this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:this.cynefin?.domainFontSize||16,itemFontSize:this.cynefin?.itemFontSize||12,boundaryColor:this.cynefin?.boundaryColor||this.lineColor,boundaryWidth:this.cynefin?.boundaryWidth||2,cliffColor:this.cynefin?.cliffColor||"#FF6B6B",cliffWidth:this.cynefin?.cliffWidth||4,arrowColor:this.cynefin?.arrowColor||this.lineColor,arrowWidth:this.cynefin?.arrowWidth||2,complexBg:this.cynefin?.complexBg||"#1B5E20",complicatedBg:this.cynefin?.complicatedBg||"#0D47A1",chaoticBg:this.cynefin?.chaoticBg||"#BF360C",clearBg:this.cynefin?.clearBg||"#F57F17",confusionBg:this.cynefin?.confusionBg||"#4A148C",textColor:this.cynefin?.textColor||this.textColor,labelColor:this.cynefin?.labelColor||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||b(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||b(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||b(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||b(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||b(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||b(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||fe(this.quadrant1Fill)?q(this.quadrant1Fill):N(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#3498db,#2ecc71,#e74c3c,#f1c40f,#bdc3c7,#ffffff,#34495e,#9b59b6,#1abc9c,#e67e22"},this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.background},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#ff6b6b",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.mainBkg,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.mainBkg},this.classText=this.primaryTextColor,this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?N(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=q(this.secondaryColor,20),this.git1=q(this.pie2||this.secondaryColor,20),this.git2=q(this.pie3||this.tertiaryColor,20),this.git3=q(this.pie4||b(this.primaryColor,{h:-30}),20),this.git4=q(this.pie5||b(this.primaryColor,{h:-60}),20),this.git5=q(this.pie6||b(this.primaryColor,{h:-90}),10),this.git6=q(this.pie7||b(this.primaryColor,{h:60}),10),this.git7=q(this.pie8||b(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||F(this.git0),this.gitInv1=this.gitInv1||F(this.git1),this.gitInv2=this.gitInv2||F(this.git2),this.gitInv3=this.gitInv3||F(this.git3),this.gitInv4=this.gitInv4||F(this.git4),this.gitInv5=this.gitInv5||F(this.git5),this.gitInv6=this.gitInv6||F(this.git6),this.gitInv7=this.gitInv7||F(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||F(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||F(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"#2d2d2d",this.emUiStroke=this.emUiStroke||"#555",this.emProcessorFill=this.emProcessorFill||q("#5a3d5c",10),this.emProcessorStroke=this.emProcessorStroke||"#8a6d8c",this.emReadModelFill=this.emReadModelFill||q("#3d5a2d",10),this.emReadModelStroke=this.emReadModelStroke||"#6d8c5c",this.emCommandFill=this.emCommandFill||q("#2d3d5a",10),this.emCommandStroke=this.emCommandStroke||"#5c6d8c",this.emEventFill=this.emEventFill||q("#5a452d",10),this.emEventStroke=this.emEventStroke||"#8c755c",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||q(this.background,5),this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||q(this.background,12),this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||q(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||q(this.background,2),this.nodeBorder=this.nodeBorder||"#999"}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},u(Er,"Theme"),Er),Rf=u(e=>{const t=new If;return t.calculate(e),t},"getThemeVariables"),$r,qf=($r=class{constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=b(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=b(this.primaryColor,{h:-160}),this.primaryBorderColor=mt(this.primaryColor,this.darkMode),this.secondaryBorderColor=mt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=mt(this.tertiaryColor,this.darkMode),this.primaryTextColor=F(this.primaryColor),this.secondaryTextColor=F(this.secondaryColor),this.tertiaryTextColor=F(this.tertiaryColor),this.lineColor=F(this.background),this.textColor=F(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.primaryBorderColor=mt(this.primaryColor,this.darkMode),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.radius=5,this.strokeWidth=1,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.clusterBkg="#FBFBFF",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.vertLineColor="calculated",this.sectionBkgColor=Ye(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.vertLineColor="navy",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal",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.rowOdd="calculated",this.rowEven="calculated",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!1,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow(1px 2px 2px rgba(185, 185, 185, 1))",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||b(this.primaryColor,{h:30}),this.cScale4=this.cScale4||b(this.primaryColor,{h:60}),this.cScale5=this.cScale5||b(this.primaryColor,{h:90}),this.cScale6=this.cScale6||b(this.primaryColor,{h:120}),this.cScale7=this.cScale7||b(this.primaryColor,{h:150}),this.cScale8=this.cScale8||b(this.primaryColor,{h:210}),this.cScale9=this.cScale9||b(this.primaryColor,{h:270}),this.cScale10=this.cScale10||b(this.primaryColor,{h:300}),this.cScale11=this.cScale11||b(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.THEME_COLOR_LIMIT;t++)this["cScale"+t]=N(this["cScale"+t],10),this["cScalePeer"+t]=this["cScalePeer"+t]||N(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||b(this["cScale"+t],{h:180});for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||b(this.mainBkg,{h:30,l:-(5+t*5)}),this["surfacePeer"+t]=this["surfacePeer"+t]||b(this.mainBkg,{h:30,l:-(7+t*5)});if(this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,this.labelTextColor!=="calculated"){this.cScaleLabel0=this.cScaleLabel0||F(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||F(this.labelTextColor);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.labelTextColor}this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.textColor,this.edgeLabelBackground=this.labelBackground,this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.signalColor=this.textColor,this.signalTextColor=this.textColor,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||q(this.primaryColor,75)||"#ffffff",this.rowEven=this.rowEven||q(this.primaryColor,1),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||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=b(this.primaryColor,{h:64}),this.fillType3=b(this.secondaryColor,{h:64}),this.fillType4=b(this.primaryColor,{h:-64}),this.fillType5=b(this.secondaryColor,{h:-64}),this.fillType6=b(this.primaryColor,{h:128}),this.fillType7=b(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||b(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||b(this.primaryColor,{l:-10}),this.pie5=this.pie5||b(this.secondaryColor,{l:-30}),this.pie6=this.pie6||b(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||b(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||b(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||b(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||b(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||b(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||b(this.primaryColor,{h:120,l:-30}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.venn1=this.venn1??b(this.primaryColor,{l:-30}),this.venn2=this.venn2??b(this.secondaryColor,{l:-30}),this.venn3=this.venn3??b(this.tertiaryColor,{l:-40}),this.venn4=this.venn4??b(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??b(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??b(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??b(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??b(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:this.cynefin?.domainFontSize||16,itemFontSize:this.cynefin?.itemFontSize||12,boundaryColor:this.cynefin?.boundaryColor||this.lineColor,boundaryWidth:this.cynefin?.boundaryWidth||2,cliffColor:this.cynefin?.cliffColor||"#8B0000",cliffWidth:this.cynefin?.cliffWidth||4,arrowColor:this.cynefin?.arrowColor||this.lineColor,arrowWidth:this.cynefin?.arrowWidth||2,complexBg:this.cynefin?.complexBg||"#E8F5E9",complicatedBg:this.cynefin?.complicatedBg||"#E3F2FD",chaoticBg:this.cynefin?.chaoticBg||"#FBE9E7",clearBg:this.cynefin?.clearBg||"#FFF8E1",confusionBg:this.cynefin?.confusionBg||"#F3E5F5",textColor:this.cynefin?.textColor||this.textColor,labelColor:this.cynefin?.labelColor||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||b(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||b(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||b(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||b(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||b(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||b(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||fe(this.quadrant1Fill)?q(this.quadrant1Fill):N(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.background,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.background},this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#ECECFF,#8493A6,#FFC3A0,#DCDDE1,#B8E994,#D1A36F,#C3CDE6,#FFB6C1,#496078,#F8F3E3"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.labelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||b(this.primaryColor,{h:-30}),this.git4=this.git4||b(this.primaryColor,{h:-60}),this.git5=this.git5||b(this.primaryColor,{h:-90}),this.git6=this.git6||b(this.primaryColor,{h:60}),this.git7=this.git7||b(this.primaryColor,{h:120}),this.darkMode?(this.git0=q(this.git0,25),this.git1=q(this.git1,25),this.git2=q(this.git2,25),this.git3=q(this.git3,25),this.git4=q(this.git4,25),this.git5=q(this.git5,25),this.git6=q(this.git6,25),this.git7=q(this.git7,25)):(this.git0=N(this.git0,25),this.git1=N(this.git1,25),this.git2=N(this.git2,25),this.git3=N(this.git3,25),this.git4=N(this.git4,25),this.git5=N(this.git5,25),this.git6=N(this.git6,25),this.git7=N(this.git7,25)),this.gitInv0=this.gitInv0||N(F(this.git0),25),this.gitInv1=this.gitInv1||F(this.git1),this.gitInv2=this.gitInv2||F(this.git2),this.gitInv3=this.gitInv3||F(this.git3),this.gitInv4=this.gitInv4||F(this.git4),this.gitInv5=this.gitInv5||F(this.git5),this.gitInv6=this.gitInv6||F(this.git6),this.gitInv7=this.gitInv7||F(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||F(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||F(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||_e,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ve}calculate(t){if(Object.keys(this).forEach(i=>{this[i]==="calculated"&&(this[i]=void 0)}),typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},u($r,"Theme"),$r),Nf=u(e=>{const t=new qf;return t.calculate(e),t},"getThemeVariables"),Or,Wf=(Or=class{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=q("#cde498",10),this.primaryBorderColor=mt(this.primaryColor,this.darkMode),this.secondaryBorderColor=mt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=mt(this.tertiaryColor,this.darkMode),this.primaryTextColor=F(this.primaryColor),this.secondaryTextColor=F(this.secondaryColor),this.tertiaryTextColor=F(this.primaryColor),this.lineColor=F(this.background),this.textColor=F(this.background),this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,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.vertLineColor="#00BFFF",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.noteFontWeight="normal",this.fontWeight="normal",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,0.5))"}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.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||b(this.primaryColor,{h:30}),this.cScale4=this.cScale4||b(this.primaryColor,{h:60}),this.cScale5=this.cScale5||b(this.primaryColor,{h:90}),this.cScale6=this.cScale6||b(this.primaryColor,{h:120}),this.cScale7=this.cScale7||b(this.primaryColor,{h:150}),this.cScale8=this.cScale8||b(this.primaryColor,{h:210}),this.cScale9=this.cScale9||b(this.primaryColor,{h:270}),this.cScale10=this.cScale10||b(this.primaryColor,{h:300}),this.cScale11=this.cScale11||b(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.THEME_COLOR_LIMIT;t++)this["cScale"+t]=N(this["cScale"+t],10),this["cScalePeer"+t]=this["cScalePeer"+t]||N(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||b(this["cScale"+t],{h:180});this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||b(this.mainBkg,{h:30,s:-30,l:-(5+t*5)}),this["surfacePeer"+t]=this["surfacePeer"+t]||b(this.mainBkg,{h:30,s:-30,l:-(8+t*5)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.taskBorderColor=this.border1,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||q(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||q(this.mainBkg,20),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||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=b(this.primaryColor,{h:64}),this.fillType3=b(this.secondaryColor,{h:64}),this.fillType4=b(this.primaryColor,{h:-64}),this.fillType5=b(this.secondaryColor,{h:-64}),this.fillType6=b(this.primaryColor,{h:128}),this.fillType7=b(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||b(this.primaryColor,{l:-30}),this.pie5=this.pie5||b(this.secondaryColor,{l:-30}),this.pie6=this.pie6||b(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||b(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||b(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||b(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||b(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||b(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||b(this.primaryColor,{h:120,l:-50}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.venn1=this.venn1??b(this.primaryColor,{l:-30}),this.venn2=this.venn2??b(this.secondaryColor,{l:-30}),this.venn3=this.venn3??b(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??b(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??b(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??b(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??b(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??b(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:this.cynefin?.domainFontSize||16,itemFontSize:this.cynefin?.itemFontSize||12,boundaryColor:this.cynefin?.boundaryColor||this.lineColor,boundaryWidth:this.cynefin?.boundaryWidth||2,cliffColor:this.cynefin?.cliffColor||"#8B4513",cliffWidth:this.cynefin?.cliffWidth||4,arrowColor:this.cynefin?.arrowColor||this.lineColor,arrowWidth:this.cynefin?.arrowWidth||2,complexBg:this.cynefin?.complexBg||"#C8E6C9",complicatedBg:this.cynefin?.complicatedBg||"#DCEDC8",chaoticBg:this.cynefin?.chaoticBg||"#FFE0B2",clearBg:this.cynefin?.clearBg||"#FFF9C4",confusionBg:this.cynefin?.confusionBg||"#D7CCC8",textColor:this.cynefin?.textColor||this.textColor,labelColor:this.cynefin?.labelColor||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||b(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||b(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||b(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||b(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||b(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||b(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||fe(this.quadrant1Fill)?q(this.quadrant1Fill):N(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.mainBkg},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.background,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.background},this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#CDE498,#FF6B6B,#A0D2DB,#D7BDE2,#F0F0F0,#FFC3A0,#7FD8BE,#FF9A8B,#FAF3E0,#FFF176"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||b(this.primaryColor,{h:-30}),this.git4=this.git4||b(this.primaryColor,{h:-60}),this.git5=this.git5||b(this.primaryColor,{h:-90}),this.git6=this.git6||b(this.primaryColor,{h:60}),this.git7=this.git7||b(this.primaryColor,{h:120}),this.darkMode?(this.git0=q(this.git0,25),this.git1=q(this.git1,25),this.git2=q(this.git2,25),this.git3=q(this.git3,25),this.git4=q(this.git4,25),this.git5=q(this.git5,25),this.git6=q(this.git6,25),this.git7=q(this.git7,25)):(this.git0=N(this.git0,25),this.git1=N(this.git1,25),this.git2=N(this.git2,25),this.git3=N(this.git3,25),this.git4=N(this.git4,25),this.git5=N(this.git5,25),this.git6=N(this.git6,25),this.git7=N(this.git7,25)),this.gitInv0=this.gitInv0||F(this.git0),this.gitInv1=this.gitInv1||F(this.git1),this.gitInv2=this.gitInv2||F(this.git2),this.gitInv3=this.gitInv3||F(this.git3),this.gitInv4=this.gitInv4||F(this.git4),this.gitInv5=this.gitInv5||F(this.git5),this.gitInv6=this.gitInv6||F(this.git6),this.gitInv7=this.gitInv7||F(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||F(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||F(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||_e,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ve}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},u(Or,"Theme"),Or),zf=u(e=>{const t=new Wf;return t.calculate(e),t},"getThemeVariables"),Pr,Hf=(Pr=class{constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=q(this.contrast,55),this.background="#ffffff",this.tertiaryColor=b(this.primaryColor,{h:-160}),this.primaryBorderColor=mt(this.primaryColor,this.darkMode),this.secondaryBorderColor=mt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=mt(this.tertiaryColor,this.darkMode),this.primaryTextColor=F(this.primaryColor),this.secondaryTextColor=F(this.secondaryColor),this.tertiaryTextColor=F(this.tertiaryColor),this.lineColor=F(this.background),this.textColor=F(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.radius=5,this.strokeWidth=1,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.vertLineColor="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.noteFontWeight="normal",this.fontWeight="normal",this.rowOdd=this.rowOdd||q(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||"#f4f4f4",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))"}updateColors(){this.secondBkg=q(this.contrast,55),this.border2=this.contrast,this.actorBorder=q(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.actorBorder,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,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.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||F(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this.darkMode?this["cScalePeer"+t]=this["cScalePeer"+t]||q(this["cScale"+t],10):this["cScalePeer"+t]=this["cScalePeer"+t]||N(this["cScale"+t],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||b(this.mainBkg,{l:-(5+t*5)}),this["surfacePeer"+t]=this["surfacePeer"+t]||b(this.mainBkg,{l:-(8+t*5)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.text,this.sectionBkgColor=q(this.contrast,30),this.sectionBkgColor2=q(this.contrast,30),this.taskBorderColor=N(this.contrast,10),this.taskBkgColor=this.contrast,this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor=this.text,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.gridColor=q(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=N(this.critBkgColor,10),this.todayLineColor=this.critBkgColor,this.vertLineColor=this.critBkgColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||"#000",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||"#f4f4f4",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.stateBorder=this.stateBorder||"#000",this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#222",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=b(this.primaryColor,{h:64}),this.fillType3=b(this.secondaryColor,{h:64}),this.fillType4=b(this.primaryColor,{h:-64}),this.fillType5=b(this.secondaryColor,{h:-64}),this.fillType6=b(this.primaryColor,{h:128}),this.fillType7=b(this.secondaryColor,{h:128});for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["pie"+t]=this["cScale"+t];this.pie12=this.pie0,this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7";for(let t=0;t<8;t++)this["venn"+(t+1)]=this["venn"+(t+1)]??this["cScale"+t];this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:this.cynefin?.domainFontSize||16,itemFontSize:this.cynefin?.itemFontSize||12,boundaryColor:this.cynefin?.boundaryColor||this.lineColor,boundaryWidth:this.cynefin?.boundaryWidth||2,cliffColor:this.cynefin?.cliffColor||"#8B0000",cliffWidth:this.cynefin?.cliffWidth||4,arrowColor:this.cynefin?.arrowColor||this.lineColor,arrowWidth:this.cynefin?.arrowWidth||2,complexBg:this.cynefin?.complexBg||"#E8F5E9",complicatedBg:this.cynefin?.complicatedBg||"#E3F2FD",chaoticBg:this.cynefin?.chaoticBg||"#FBE9E7",clearBg:this.cynefin?.clearBg||"#FFF8E1",confusionBg:this.cynefin?.confusionBg||"#F3E5F5",textColor:this.cynefin?.textColor||this.textColor,labelColor:this.cynefin?.labelColor||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||b(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||b(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||b(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||b(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||b(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||b(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||fe(this.quadrant1Fill)?q(this.quadrant1Fill):N(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#EEE,#6BB8E4,#8ACB88,#C7ACD6,#E8DCC2,#FFB2A8,#FFF380,#7E8D91,#FFD8B1,#FAF3E0"},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.background,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.background},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=N(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||b(this.primaryColor,{h:-30}),this.git4=this.pie5||b(this.primaryColor,{h:-60}),this.git5=this.pie6||b(this.primaryColor,{h:-90}),this.git6=this.pie7||b(this.primaryColor,{h:60}),this.git7=this.pie8||b(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||F(this.git0),this.gitInv1=this.gitInv1||F(this.git1),this.gitInv2=this.gitInv2||F(this.git2),this.gitInv3=this.gitInv3||F(this.git3),this.gitInv4=this.gitInv4||F(this.git4),this.gitInv5=this.gitInv5||F(this.git5),this.gitInv6=this.gitInv6||F(this.git6),this.gitInv7=this.gitInv7||F(this.git7),this.branchLabelColor=this.branchLabelColor||this.labelTextColor,this.gitBranchLabel0=this.branchLabelColor,this.gitBranchLabel1="white",this.gitBranchLabel2=this.branchLabelColor,this.gitBranchLabel3="white",this.gitBranchLabel4=this.branchLabelColor,this.gitBranchLabel5=this.branchLabelColor,this.gitBranchLabel6=this.branchLabelColor,this.gitBranchLabel7=this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||_e,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ve}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},u(Pr,"Theme"),Pr),jf=u(e=>{const t=new Hf;return t.calculate(e),t},"getThemeVariables"),Dr,Yf=(Dr=class{constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=2,this.primaryBorderColor=mt(this.primaryColor,this.darkMode),this.fontFamily="arial, sans-serif",this.fontSize="14px",this.nodeBorder="#000000",this.stateBorder="#000000",this.useGradient=!0,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="drop-shadow( 0px 1px 2px rgba(0, 0, 0, 0.25));",this.tertiaryColor="#ffffff",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||b(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||b(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||mt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||mt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||mt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||mt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||F(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||F(this.tertiaryColor),this.lineColor=this.lineColor||F(this.background),this.arrowheadColor=this.arrowheadColor||F(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||F(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;const t="#ECECFE",r="#E9E9F1",i=b(t,{h:180,l:5});if(this.sectionBkgColor=this.sectionBkgColor||i,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||r,this.sectionBkgColor2=this.sectionBkgColor2||t,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||t,this.activeTaskBorderColor=this.activeTaskBorderColor||t,this.activeTaskBkgColor=this.activeTaskBkgColor||q(t,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.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,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||"#f0f0f0",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||t,this.cScale1=this.cScale1||r,this.cScale2=this.cScale2||i,this.cScale3=this.cScale3||b(t,{h:30}),this.cScale4=this.cScale4||b(t,{h:60}),this.cScale5=this.cScale5||b(t,{h:90}),this.cScale6=this.cScale6||b(t,{h:120}),this.cScale7=this.cScale7||b(t,{h:150}),this.cScale8=this.cScale8||b(t,{h:210,l:150}),this.cScale9=this.cScale9||b(t,{h:270}),this.cScale10=this.cScale10||b(t,{h:300}),this.cScale11=this.cScale11||b(t,{h:330}),this.darkMode)for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScale"+o]=N(this["cScale"+o],75);else for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScale"+o]=N(this["cScale"+o],25);for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScaleInv"+o]=this["cScaleInv"+o]||F(this["cScale"+o]);for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this.darkMode?this["cScalePeer"+o]=this["cScalePeer"+o]||q(this["cScale"+o],10):this["cScalePeer"+o]=this["cScalePeer"+o]||N(this["cScale"+o],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScaleLabel"+o]=this["cScaleLabel"+o]||this.scaleLabelColor;const s=this.darkMode?-4:-1;for(let o=0;o<5;o++)this["surface"+o]=this["surface"+o]||b(this.mainBkg,{h:180,s:-15,l:s*(5+o*3)}),this["surfacePeer"+o]=this["surfacePeer"+o]||b(this.mainBkg,{h:180,s:-15,l:s*(8+o*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||r,this.fillType2=this.fillType2||b(t,{h:64}),this.fillType3=this.fillType3||b(r,{h:64}),this.fillType4=this.fillType4||b(t,{h:-64}),this.fillType5=this.fillType5||b(r,{h:-64}),this.fillType6=this.fillType6||b(t,{h:128}),this.fillType7=this.fillType7||b(r,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||r,this.pie3=this.pie3||i,this.pie4=this.pie4||b(t,{l:-10}),this.pie5=this.pie5||b(r,{l:-10}),this.pie6=this.pie6||b(i,{l:-10}),this.pie7=this.pie7||b(t,{h:60,l:-10}),this.pie8=this.pie8||b(t,{h:-60,l:-10}),this.pie9=this.pie9||b(t,{h:120,l:0}),this.pie10=this.pie10||b(t,{h:60,l:-20}),this.pie11=this.pie11||b(t,{h:-60,l:-20}),this.pie12=this.pie12||b(t,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||t,this.quadrant2Fill=this.quadrant2Fill||b(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||b(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||b(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||b(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||b(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||b(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||fe(this.quadrant1Fill)?q(this.quadrant1Fill):N(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||t,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?N(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||t,this.git1=this.git1||r,this.git2=this.git2||i,this.git3=this.git3||b(t,{h:-30}),this.git4=this.git4||b(t,{h:-60}),this.git5=this.git5||b(t,{h:-90}),this.git6=this.git6||b(t,{h:60}),this.git7=this.git7||b(t,{h:120}),this.darkMode?(this.git0=q(this.git0,25),this.git1=q(this.git1,25),this.git2=q(this.git2,25),this.git3=q(this.git3,25),this.git4=q(this.git4,25),this.git5=q(this.git5,25),this.git6=q(this.git6,25),this.git7=q(this.git7,25)):(this.git0=N(this.git0,25),this.git1=N(this.git1,25),this.git2=N(this.git2,25),this.git3=N(this.git3,25),this.git4=N(this.git4,25),this.git5=N(this.git5,25),this.git6=N(this.git6,25),this.git7=N(this.git7,25)),this.gitInv0=this.gitInv0||F(this.git0),this.gitInv1=this.gitInv1||F(this.git1),this.gitInv2=this.gitInv2||F(this.git2),this.gitInv3=this.gitInv3||F(this.git3),this.gitInv4=this.gitInv4||F(this.git4),this.gitInv5=this.gitInv5||F(this.git5),this.gitInv6=this.gitInv6||F(this.git6),this.gitInv7=this.gitInv7||F(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||_e,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ve}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},u(Dr,"Theme"),Dr),Uf=u(e=>{const t=new Yf;return t.calculate(e),t},"getThemeVariables"),Ir,Gf=(Ir=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=q(this.primaryColor,16),this.tertiaryColor=b(this.primaryColor,{h:-160}),this.primaryBorderColor=F(this.background),this.secondaryBorderColor=mt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=mt(this.tertiaryColor,this.darkMode),this.primaryTextColor=F(this.primaryColor),this.secondaryTextColor=F(this.secondaryColor),this.tertiaryTextColor=F(this.tertiaryColor),this.mainBkg="#2a2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=q(F("#323D47"),10),this.border1="#ccc",this.border2=Ye(255,255,255,.25),this.arrowheadColor=F(this.background),this.fontFamily="arial, sans-serif",this.fontSize="14px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=1,this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily="arial, sans-serif",this.fontSize="14px",this.useGradient=!0,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,0.2))",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||b(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||b(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||mt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||mt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||mt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||mt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||F(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||F(this.tertiaryColor),this.lineColor=this.lineColor||F(this.background),this.arrowheadColor=this.arrowheadColor||F(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.border1,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||F(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,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||q(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.vertLineColor=this.vertLineColor||this.primaryBorderColor,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.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,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||"#f0f0f0",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||b(this.primaryColor,{h:30}),this.cScale4=this.cScale4||b(this.primaryColor,{h:60}),this.cScale5=this.cScale5||b(this.primaryColor,{h:90}),this.cScale6=this.cScale6||b(this.primaryColor,{h:120}),this.cScale7=this.cScale7||b(this.primaryColor,{h:150}),this.cScale8=this.cScale8||b(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||b(this.primaryColor,{h:270}),this.cScale10=this.cScale10||b(this.primaryColor,{h:300}),this.cScale11=this.cScale11||b(this.primaryColor,{h:330}),this.darkMode)for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScale"+r]=N(this["cScale"+r],75);else for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScale"+r]=N(this["cScale"+r],25);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleInv"+r]=this["cScaleInv"+r]||F(this["cScale"+r]);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this.darkMode?this["cScalePeer"+r]=this["cScalePeer"+r]||q(this["cScale"+r],10):this["cScalePeer"+r]=this["cScalePeer"+r]||N(this["cScale"+r],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleLabel"+r]=this["cScaleLabel"+r]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let r=0;r<5;r++)this["surface"+r]=this["surface"+r]||b(this.mainBkg,{h:180,s:-15,l:t*(5+r*3)}),this["surfacePeer"+r]=this["surfacePeer"+r]||b(this.mainBkg,{h:180,s:-15,l:t*(8+r*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||b(this.primaryColor,{h:64}),this.fillType3=this.fillType3||b(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||b(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||b(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||b(this.primaryColor,{h:128}),this.fillType7=this.fillType7||b(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||b(this.primaryColor,{l:-10}),this.pie5=this.pie5||b(this.secondaryColor,{l:-10}),this.pie6=this.pie6||b(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||b(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||b(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||b(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||b(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||b(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||b(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||b(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||b(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||b(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||b(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||b(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||b(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||fe(this.quadrant1Fill)?q(this.quadrant1Fill):N(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?N(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||"#0b0000",this.git1=this.git1||"#4d1037",this.git2=this.git2||"#3f5258",this.git3=this.git3||"#4f2f1b",this.git4=this.git4||"#6e0a0a",this.git5=this.git5||"#3b0048",this.git6=this.git6||"#995a01",this.git7=this.git7||"#154706",this.gitDarkMode=!0,this.gitDarkMode?(this.git0=q(this.git0,25),this.git1=q(this.git1,25),this.git2=q(this.git2,25),this.git3=q(this.git3,25),this.git4=q(this.git4,25),this.git5=q(this.git5,25),this.git6=q(this.git6,25),this.git7=q(this.git7,25)):(this.git0=N(this.git0,25),this.git1=N(this.git1,25),this.git2=N(this.git2,25),this.git3=N(this.git3,25),this.git4=N(this.git4,25),this.git5=N(this.git5,25),this.git6=N(this.git6,25),this.git7=N(this.git7,25)),this.gitInv0=this.gitInv0||F(this.git0),this.gitInv1=this.gitInv1||F(this.git1),this.gitInv2=this.gitInv2||F(this.git2),this.gitInv3=this.gitInv3||F(this.git3),this.gitInv4=this.gitInv4||F(this.git4),this.gitInv5=this.gitInv5||F(this.git5),this.gitInv6=this.gitInv6||F(this.git6),this.gitInv7=this.gitInv7||F(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||_e,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ve}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},u(Ir,"Theme"),Ir),Xf=u(e=>{const t=new Gf;return t.calculate(e),t},"getThemeVariables"),Rr,Vf=(Rr=class{constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#28253D",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=mt("#28253D",this.darkMode),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#28253D",this.stateBorder="#28253D",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.tertiaryColor="#ffffff",this.clusterBkg="#F9F9FB",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.actorBorder="#28253D",this.filterColor="#000000"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||b(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||b(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||mt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||mt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||mt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||mt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#FEF9C3",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||F(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||F(this.tertiaryColor),this.lineColor=this.lineColor||F(this.background),this.arrowheadColor=this.arrowheadColor||F(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.noteFontWeight=600,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||F(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;const t="#ECECFE",r="#E9E9F1",i=b(t,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||i,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||r,this.sectionBkgColor2=this.sectionBkgColor2||t,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||t,this.activeTaskBorderColor=this.activeTaskBorderColor||t,this.activeTaskBkgColor=this.activeTaskBkgColor||q(t,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.vertLineColor=this.vertLineColor||this.primaryBorderColor,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.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,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.compositeTitleBackground="#F9F9FB",this.altBackground="#F9F9FB",this.stateEdgeLabelBackground="#FFFFFF",this.fontWeight=600,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",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;for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScale"+o]=this.mainBkg;if(this.darkMode)for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScale"+o]=N(this["cScale"+o],75);else for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScale"+o]=N(this["cScale"+o],25);for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScaleInv"+o]=this["cScaleInv"+o]||F(this["cScale"+o]);for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this.darkMode?this["cScalePeer"+o]=this["cScalePeer"+o]||q(this["cScale"+o],10):this["cScalePeer"+o]=this["cScalePeer"+o]||N(this["cScale"+o],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScaleLabel"+o]=this["cScaleLabel"+o]||this.scaleLabelColor;const s=this.darkMode?-4:-1;for(let o=0;o<5;o++)this["surface"+o]=this["surface"+o]||b(this.mainBkg,{h:180,s:-15,l:s*(5+o*3)}),this["surfacePeer"+o]=this["surfacePeer"+o]||b(this.mainBkg,{h:180,s:-15,l:s*(8+o*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||r,this.fillType2=this.fillType2||b(t,{h:64}),this.fillType3=this.fillType3||b(r,{h:64}),this.fillType4=this.fillType4||b(t,{h:-64}),this.fillType5=this.fillType5||b(r,{h:-64}),this.fillType6=this.fillType6||b(t,{h:128}),this.fillType7=this.fillType7||b(r,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||r,this.pie3=this.pie3||i,this.pie4=this.pie4||b(t,{l:-10}),this.pie5=this.pie5||b(r,{l:-10}),this.pie6=this.pie6||b(i,{l:-10}),this.pie7=this.pie7||b(t,{h:60,l:-10}),this.pie8=this.pie8||b(t,{h:-60,l:-10}),this.pie9=this.pie9||b(t,{h:120,l:0}),this.pie10=this.pie10||b(t,{h:60,l:-20}),this.pie11=this.pie11||b(t,{h:-60,l:-20}),this.pie12=this.pie12||b(t,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||t,this.quadrant2Fill=this.quadrant2Fill||b(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||b(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||b(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||b(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||b(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||b(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||fe(this.quadrant1Fill)?q(this.quadrant1Fill):N(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||t,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?N(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground="#FFFFFF",this.git0=this.git0||t,this.git1=this.git1||r,this.git2=this.git2||i,this.git3=this.git3||b(t,{h:-30}),this.git4=this.git4||b(t,{h:-60}),this.git5=this.git5||b(t,{h:-90}),this.git6=this.git6||b(t,{h:60}),this.git7=this.git7||b(t,{h:120}),this.darkMode?(this.git0=q(this.git0,25),this.git1=q(this.git1,25),this.git2=q(this.git2,25),this.git3=q(this.git3,25),this.git4=q(this.git4,25),this.git5=q(this.git5,25),this.git6=q(this.git6,25),this.git7=q(this.git7,25)):(this.git0=N(this.git0,25),this.git1=N(this.git1,25),this.git2=N(this.git2,25),this.git3=N(this.git3,25),this.git4=N(this.git4,25),this.git5=N(this.git5,25),this.git6=N(this.git6,25),this.git7=N(this.git7,25)),this.gitInv0=this.gitInv0||F(this.git0),this.gitInv1=this.gitInv1||F(this.git1),this.gitInv2=this.gitInv2||F(this.git2),this.gitInv3=this.gitInv3||F(this.git3),this.gitInv4=this.gitInv4||F(this.git4),this.gitInv5=this.gitInv5||F(this.git5),this.gitInv6=this.gitInv6||F(this.git6),this.gitInv7=this.gitInv7||F(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.commitLineColor=this.commitLineColor??"#BDBCCC",this.erEdgeLabelBackground="#FFFFFF",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||_e,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ve}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},u(Rr,"Theme"),Rr),Zf=u(e=>{const t=new Vf;return t.calculate(e),t},"getThemeVariables"),qr,Kf=(qr=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=q(this.primaryColor,16),this.tertiaryColor=b(this.primaryColor,{h:-160}),this.primaryBorderColor=F(this.background),this.secondaryBorderColor=mt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=mt(this.tertiaryColor,this.darkMode),this.primaryTextColor=F(this.primaryColor),this.secondaryTextColor=F(this.secondaryColor),this.tertiaryTextColor=F(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=q(F("#323D47"),10),this.border1="#ccc",this.border2=Ye(255,255,255,.25),this.arrowheadColor=F(this.background),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.labelBackground="#111113",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??"#FEF9C3",this.noteTextColor=this.noteTextColor??"#28253D",this.THEME_COLOR_LIMIT=12,this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#FFFFFF",this.stateBorder="#FFFFFF",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.clusterBkg="#1E1A2E",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.filterColor="#FFFFFF"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||b(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||b(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||mt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||mt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||mt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||mt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||F(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||F(this.tertiaryColor),this.lineColor=this.lineColor||F(this.background),this.arrowheadColor=this.arrowheadColor||F(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.border1,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="#FFFFFF",this.signalColor="#FFFFFF",this.labelBoxBorderColor="#BDBCCC",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||F(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,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||q(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.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,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.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.compositeBackground="#16141F",this.altBackground="#16141F",this.compositeTitleBackground="#16141F",this.stateEdgeLabelBackground="#16141F",this.fontWeight=600,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",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||b(this.primaryColor,{h:30}),this.cScale4=this.cScale4||b(this.primaryColor,{h:60}),this.cScale5=this.cScale5||b(this.primaryColor,{h:90}),this.cScale6=this.cScale6||b(this.primaryColor,{h:120}),this.cScale7=this.cScale7||b(this.primaryColor,{h:150}),this.cScale8=this.cScale8||b(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||b(this.primaryColor,{h:270}),this.cScale10=this.cScale10||b(this.primaryColor,{h:300}),this.cScale11=this.cScale11||b(this.primaryColor,{h:330}),this.darkMode)for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScale"+r]=N(this["cScale"+r],75);else for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScale"+r]=N(this["cScale"+r],25);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleInv"+r]=this["cScaleInv"+r]||F(this["cScale"+r]);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this.darkMode?this["cScalePeer"+r]=this["cScalePeer"+r]||q(this["cScale"+r],10):this["cScalePeer"+r]=this["cScalePeer"+r]||N(this["cScale"+r],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleLabel"+r]=this["cScaleLabel"+r]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let r=0;r<5;r++)this["surface"+r]=this["surface"+r]||b(this.mainBkg,{h:180,s:-15,l:t*(5+r*3)}),this["surfacePeer"+r]=this["surfacePeer"+r]||b(this.mainBkg,{h:180,s:-15,l:t*(8+r*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||b(this.primaryColor,{h:64}),this.fillType3=this.fillType3||b(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||b(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||b(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||b(this.primaryColor,{h:128}),this.fillType7=this.fillType7||b(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||b(this.primaryColor,{l:-10}),this.pie5=this.pie5||b(this.secondaryColor,{l:-10}),this.pie6=this.pie6||b(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||b(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||b(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||b(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||b(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||b(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||b(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||b(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||b(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||b(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||b(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||b(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||b(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||fe(this.quadrant1Fill)?q(this.quadrant1Fill):N(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?N(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground="#16141F",this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||b(this.primaryColor,{h:-30}),this.git4=this.git4||b(this.primaryColor,{h:-60}),this.git5=this.git5||b(this.primaryColor,{h:-90}),this.git6=this.git6||b(this.primaryColor,{h:60}),this.git7=this.git7||b(this.primaryColor,{h:120}),this.darkMode?(this.git0=q(this.git0,25),this.git1=q(this.git1,25),this.git2=q(this.git2,25),this.git3=q(this.git3,25),this.git4=q(this.git4,25),this.git5=q(this.git5,25),this.git6=q(this.git6,25),this.git7=q(this.git7,25)):(this.git0=N(this.git0,25),this.git1=N(this.git1,25),this.git2=N(this.git2,25),this.git3=N(this.git3,25),this.git4=N(this.git4,25),this.git5=N(this.git5,25),this.git6=N(this.git6,25),this.git7=N(this.git7,25)),this.gitInv0=this.gitInv0||F(this.git0),this.gitInv1=this.gitInv1||F(this.git1),this.gitInv2=this.gitInv2||F(this.git2),this.gitInv3=this.gitInv3||F(this.git3),this.gitInv4=this.gitInv4||F(this.git4),this.gitInv5=this.gitInv5||F(this.git5),this.gitInv6=this.gitInv6||F(this.git6),this.gitInv7=this.gitInv7||F(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.commitLineColor=this.commitLineColor??"#BDBCCC",this.erEdgeLabelBackground="#16141F",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||_e,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ve}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},u(qr,"Theme"),qr),Qf=u(e=>{const t=new Kf;return t.calculate(e),t},"getThemeVariables"),Nr,Jf=(Nr=class{constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#28253D",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=mt(this.primaryColor,this.darkMode),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#28253D",this.stateBorder="#28253D",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.tertiaryColor="#ffffff",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.actorBorder="#28253D",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.borderColorArray=["#E879F9","#2DD4BF","#FB923C","#22D3EE","#4ADE80","#A78BFA","#F87171","#FACC15","#818CF8","#A3E635 ","#38BDF8","#FB7185"],this.bkgColorArray=["#FDF4FF","#F0FDFA","#FFF7ED","#ECFEFF","#F0FDF4","#F5F3FF","#FEF2F2","#FEFCE8","#EEF2FF","#F7FEE7","#F0F9FF","#FFF1F2"],this.filterColor="#000000"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||b(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||b(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||mt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||mt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||mt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||mt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||F(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||F(this.tertiaryColor),this.lineColor=this.lineColor||F(this.background),this.arrowheadColor=this.arrowheadColor||F(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||F(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;const t="#ECECFE",r="#E9E9F1",i=b(t,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||i,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||r,this.sectionBkgColor2=this.sectionBkgColor2||t,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||t,this.activeTaskBorderColor=this.activeTaskBorderColor||t,this.activeTaskBkgColor=this.activeTaskBkgColor||q(t,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.vertLineColor=this.vertLineColor||this.primaryBorderColor,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.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,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||"#f0f0f0",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||"#f4a8ff",this.cScale1=this.cScale1||"#46ecd5",this.cScale2=this.cScale2||"#ffb86a",this.cScale3=this.cScale3||"#dab2ff",this.cScale4=this.cScale4||"#7bf1a8",this.cScale5=this.cScale5||"#c4b4ff",this.cScale6=this.cScale6||"#ffa2a2",this.cScale7=this.cScale7||"#ffdf20",this.cScale8=this.cScale8||"#a3b3ff",this.cScale9=this.cScale9||"#bbf451",this.cScale10=this.cScale10||"#74d4ff",this.cScale11=this.cScale11||"#ffa1ad";for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScaleInv"+o]=this["cScaleInv"+o]||F(this["cScale"+o]);for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this.darkMode?this["cScalePeer"+o]=this["cScalePeer"+o]||q(this["cScale"+o],10):this["cScalePeer"+o]=this["cScalePeer"+o]||N(this["cScale"+o],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScaleLabel"+o]=this["cScaleLabel"+o]||this.scaleLabelColor;const s=this.darkMode?-4:-1;for(let o=0;o<5;o++)this["surface"+o]=this["surface"+o]||b(this.mainBkg,{h:180,s:-15,l:s*(5+o*3)}),this["surfacePeer"+o]=this["surfacePeer"+o]||b(this.mainBkg,{h:180,s:-15,l:s*(8+o*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||r,this.fillType2=this.fillType2||b(t,{h:64}),this.fillType3=this.fillType3||b(r,{h:64}),this.fillType4=this.fillType4||b(t,{h:-64}),this.fillType5=this.fillType5||b(r,{h:-64}),this.fillType6=this.fillType6||b(t,{h:128}),this.fillType7=this.fillType7||b(r,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||r,this.pie3=this.pie3||i,this.pie4=this.pie4||b(t,{l:-10}),this.pie5=this.pie5||b(r,{l:-10}),this.pie6=this.pie6||b(i,{l:-10}),this.pie7=this.pie7||b(t,{h:60,l:-10}),this.pie8=this.pie8||b(t,{h:-60,l:-10}),this.pie9=this.pie9||b(t,{h:120,l:0}),this.pie10=this.pie10||b(t,{h:60,l:-20}),this.pie11=this.pie11||b(t,{h:-60,l:-20}),this.pie12=this.pie12||b(t,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||t,this.quadrant2Fill=this.quadrant2Fill||b(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||b(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||b(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||b(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||b(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||b(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||fe(this.quadrant1Fill)?q(this.quadrant1Fill):N(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||t,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?N(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||t,this.git1=this.git1||r,this.git2=this.git2||i,this.git3=this.git3||b(t,{h:-30}),this.git4=this.git4||b(t,{h:-60}),this.git5=this.git5||b(t,{h:-90}),this.git6=this.git6||b(t,{h:60}),this.git7=this.git7||b(t,{h:120}),this.darkMode?(this.git0=q(this.git0,25),this.git1=q(this.git1,25),this.git2=q(this.git2,25),this.git3=q(this.git3,25),this.git4=q(this.git4,25),this.git5=q(this.git5,25),this.git6=q(this.git6,25),this.git7=q(this.git7,25)):(this.git0=N(this.git0,25),this.git1=N(this.git1,25),this.git2=N(this.git2,25),this.git3=N(this.git3,25),this.git4=N(this.git4,25),this.git5=N(this.git5,25),this.git6=N(this.git6,25),this.git7=N(this.git7,25)),this.gitInv0=this.gitInv0||F(this.git0),this.gitInv1=this.gitInv1||F(this.git1),this.gitInv2=this.gitInv2||F(this.git2),this.gitInv3=this.gitInv3||F(this.git3),this.gitInv4=this.gitInv4||F(this.git4),this.gitInv5=this.gitInv5||F(this.git5),this.gitInv6=this.gitInv6||F(this.git6),this.gitInv7=this.gitInv7||F(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLineColor=this.commitLineColor??"#BDBCCC",this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.fontWeight=600,this.erEdgeLabelBackground="#FFFFFF",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||_e,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ve}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},u(Nr,"Theme"),Nr),ty=u(e=>{const t=new Jf;return t.calculate(e),t},"getThemeVariables"),Wr,ey=(Wr=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=q(this.primaryColor,16),this.tertiaryColor=b(this.primaryColor,{h:-160}),this.primaryBorderColor=F(this.background),this.secondaryBorderColor=mt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=mt(this.tertiaryColor,this.darkMode),this.primaryTextColor=F(this.primaryColor),this.secondaryTextColor=F(this.secondaryColor),this.tertiaryTextColor=F(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=q(F("#323D47"),10),this.border1="#ccc",this.border2=Ye(255,255,255,.25),this.arrowheadColor=F(this.background),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.labelBackground="#111113",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??"#FEF9C3",this.noteTextColor=this.noteTextColor??"#28253D",this.THEME_COLOR_LIMIT=12,this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#FFFFFF",this.stateBorder="#FFFFFF",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.clusterBkg="#1E1A2E",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.borderColorArray=["#E879F9","#2DD4BF","#FB923C","#22D3EE","#4ADE80","#A78BFA","#F87171","#FACC15","#818CF8","#A3E635 ","#38BDF8","#FB7185"],this.bkgColorArray=[],this.filterColor="#FFFFFF"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||b(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||b(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||mt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||mt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||mt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||mt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||F(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||F(this.tertiaryColor),this.lineColor=this.lineColor||F(this.background),this.arrowheadColor=this.arrowheadColor||F(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.border1,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="#FFFFFF",this.signalColor="#FFFFFF",this.labelBoxBorderColor="#BDBCCC",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||F(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.rootLabelColor="#FFFFFF",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||q(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.vertLineColor=this.vertLineColor||this.primaryBorderColor,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.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,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||"#f0f0f0",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||"#f4a8ff",this.cScale1=this.cScale1||"#46ecd5",this.cScale2=this.cScale2||"#ffb86a",this.cScale3=this.cScale3||"#dab2ff",this.cScale4=this.cScale4||"#7bf1a8",this.cScale5=this.cScale5||"#c4b4ff",this.cScale6=this.cScale6||"#ffa2a2",this.cScale7=this.cScale7||"#ffdf20",this.cScale8=this.cScale8||"#a3b3ff",this.cScale9=this.cScale9||"#bbf451",this.cScale10=this.cScale10||"#74d4ff",this.cScale11=this.cScale11||"#ffa1ad";for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleInv"+r]=this["cScaleInv"+r]||F(this["cScale"+r]);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this.darkMode?this["cScalePeer"+r]=this["cScalePeer"+r]||q(this["cScale"+r],10):this["cScalePeer"+r]=this["cScalePeer"+r]||N(this["cScale"+r],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleLabel"+r]=N(this["cScale"+r],75);const t=this.darkMode?-4:-1;for(let r=0;r<5;r++)this["surface"+r]=this["surface"+r]||b(this.mainBkg,{h:180,s:-15,l:t*(5+r*3)}),this["surfacePeer"+r]=this["surfacePeer"+r]||b(this.mainBkg,{h:180,s:-15,l:t*(8+r*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||b(this.primaryColor,{h:64}),this.fillType3=this.fillType3||b(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||b(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||b(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||b(this.primaryColor,{h:128}),this.fillType7=this.fillType7||b(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||b(this.primaryColor,{l:-10}),this.pie5=this.pie5||b(this.secondaryColor,{l:-10}),this.pie6=this.pie6||b(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||b(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||b(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||b(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||b(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||b(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||b(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||b(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||b(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||b(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||b(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||b(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||b(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||fe(this.quadrant1Fill)?q(this.quadrant1Fill):N(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?N(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||b(this.primaryColor,{h:-30}),this.git4=this.git4||b(this.primaryColor,{h:-60}),this.git5=this.git5||b(this.primaryColor,{h:-90}),this.git6=this.git6||b(this.primaryColor,{h:60}),this.git7=this.git7||b(this.primaryColor,{h:120}),this.darkMode?(this.git0=q(this.git0,25),this.git1=q(this.git1,25),this.git2=q(this.git2,25),this.git3=q(this.git3,25),this.git4=q(this.git4,25),this.git5=q(this.git5,25),this.git6=q(this.git6,25),this.git7=q(this.git7,25)):(this.git0=N(this.git0,25),this.git1=N(this.git1,25),this.git2=N(this.git2,25),this.git3=N(this.git3,25),this.git4=N(this.git4,25),this.git5=N(this.git5,25),this.git6=N(this.git6,25),this.git7=N(this.git7,25)),this.gitInv0=this.gitInv0||F(this.git0),this.gitInv1=this.gitInv1||F(this.git1),this.gitInv2=this.gitInv2||F(this.git2),this.gitInv3=this.gitInv3||F(this.git3),this.gitInv4=this.gitInv4||F(this.git4),this.gitInv5=this.gitInv5||F(this.git5),this.gitInv6=this.gitInv6||F(this.git6),this.gitInv7=this.gitInv7||F(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.commitLineColor=this.commitLineColor??"#BDBCCC",this.fontWeight=600,this.erEdgeLabelBackground="#16141F",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||_e,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ve}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},u(Wr,"Theme"),Wr),ry=u(e=>{const t=new ey;return t.calculate(e),t},"getThemeVariables"),Oe={base:{getThemeVariables:Df},dark:{getThemeVariables:Rf},default:{getThemeVariables:Nf},forest:{getThemeVariables:zf},neutral:{getThemeVariables:jf},neo:{getThemeVariables:Uf},"neo-dark":{getThemeVariables:Xf},redux:{getThemeVariables:Zf},"redux-dark":{getThemeVariables:Qf},"redux-color":{getThemeVariables:ty},"redux-dark-color":{getThemeVariables:ry}},Yt={flowchart:{useMaxWidth:!0,titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:null,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,defaultRenderer:"dagre-wrapper",wrappingWidth:200,inheritDir:!1},swimlane:{useMaxWidth:!0,lineHops:"arc",ignoreCrossLaneEdges:!0,optimizeRanksByCrossings:!0,automaticLaneOrdering:!1},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,maxLabelWidth:360,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"],titleColor:"",titleFontFamily:'"trebuchet ms", verdana, arial, sans-serif',titleFontSize:"4ex"},class:{useMaxWidth:!0,titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,defaultRenderer:"dagre-wrapper",htmlLabels:!1,hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},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,nodeSpacing:140,rankSpacing:80,stroke:"gray",fill:"honeydew",fontSize:12},pie:{useMaxWidth:!0,textPosition:.75,donutHole:0,legendPosition:"right",highlightSlice:""},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,showDataLabel:!1,showDataLabelOutsideBar:!1,showTitle:!0,showLegend:!0,legendFontSize:14,legendPadding:10,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,labelRotation:0},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,labelRotation:0},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,layoutAlgorithm:"cose-bilkent"},ishikawa:{useMaxWidth:!0,diagramPadding:20},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:"",nodeWidth:10,nodePadding:12,labelStyle:"legacy"},block:{useMaxWidth:!0,padding:8},packet:{useMaxWidth:!0,rowHeight:32,bitWidth:32,bitsPerRow:32,showBits:!0,paddingX:5,paddingY:5},treeView:{useMaxWidth:!0,rowIndent:10,paddingX:5,paddingY:5,lineThickness:1,showIcons:!1,defaultIconPack:"",filenameIcons:{},extensionIcons:{}},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16,randomize:!1,nodeSeparation:75,idealEdgeLengthMultiplier:1.5,edgeElasticity:.45,numIter:2500,seed:1},eventmodeling:{useMaxWidth:!0,padding:30,rowHeight:32},radar:{useMaxWidth:!0,width:600,height:600,marginTop:50,marginRight:50,marginBottom:50,marginLeft:50,axisScaleFactor:1,axisLabelFactor:1.05,curveTension:.17},venn:{useMaxWidth:!0,width:800,height:450,padding:8,useDebugLayout:!1},cynefin:{useMaxWidth:!0,width:800,height:600,padding:40,showDomainDescriptions:!0,boundaryAmplitude:8,seed:0},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},dc={...Yt,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF",nodePlacementAlignment:"NONE",forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES",keepEntryNodeOnTop:!1},themeCSS:void 0,themeVariables:Oe.default.getThemeVariables(),sequence:{...Yt.sequence,messageFont:u(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:u(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:u(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{defaultRenderer:"dagre-wrapper",hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},gantt:{...Yt.gantt,tickInterval:void 0,useWidth:void 0},c4:{...Yt.c4,useWidth:void 0,personFont:u(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...Yt.flowchart,inheritDir:!1},external_personFont:u(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:u(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:u(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:u(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:u(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:u(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:u(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:u(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:u(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:u(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:u(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:u(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:u(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:u(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:u(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:u(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:u(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:u(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:u(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:u(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:u(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...Yt.pie,useWidth:984},xyChart:{...Yt.xyChart,useWidth:void 0},requirement:{...Yt.requirement,useWidth:void 0},packet:{...Yt.packet},eventmodeling:{...Yt.eventmodeling},treeView:{...Yt.treeView,useWidth:void 0},radar:{...Yt.radar},railroad:{...Yt.railroad,fontSize:void 0,fontFamily:void 0,terminalFill:void 0,terminalStroke:void 0,terminalTextColor:void 0,nonTerminalFill:void 0,nonTerminalStroke:void 0,nonTerminalTextColor:void 0,lineColor:void 0,markerFill:void 0,commentFill:void 0,commentStroke:void 0,commentTextColor:void 0,specialFill:void 0,specialStroke:void 0,ruleNameColor:void 0},ishikawa:{...Yt.ishikawa},sankey:{...Yt.sankey,nodeColors:void 0},treemap:{useMaxWidth:!0,padding:10,diagramPadding:8,showValues:!0,nodeWidth:100,nodeHeight:40,borderWidth:1,valueFontSize:12,labelFontSize:14,valueFormat:","},venn:{...Yt.venn},cynefin:{...Yt.cynefin}},uc=u((e,t="")=>Object.keys(e).reduce((r,i)=>Array.isArray(e[i])?r:typeof e[i]=="object"&&e[i]!==null?[...r,t+i,...uc(e[i],"")]:[...r,t+i],[]),"keyify"),iy=new Set(uc(dc,"")),gc=dc,sy={nodeColors:/^#[\da-f]{3,8}$|^rgb\([\d\s%,.]+\)$|^hsl\([\d\s%,.]+\)$|^[a-z]+$/i,filenameIcons:/^[\w-]+(?::[\w-]+)?$/,extensionIcons:/^[\w-]+(?::[\w-]+)?$/},oy=u((e,t)=>{for(const r of Object.keys(e)){const i=e[r];(r.startsWith("__")||r.includes("proto")||r.includes("constr")||typeof i!="string"||!t.test(i))&&(D.debug("sanitize deleting dictionary entry:",r,i),delete e[r])}},"sanitizeDictionaryConfig"),gs=u(e=>{if(D.debug("sanitizeDirective called with",e),!(typeof e!="object"||e==null)){if(Array.isArray(e)){e.forEach(t=>gs(t));return}for(const t of Object.keys(e)){if(D.debug("Checking key",t),t.startsWith("__")||t.includes("proto")||t.includes("constr")||!iy.has(t)||e[t]==null){D.debug("sanitize deleting key: ",t),delete e[t];continue}if(typeof e[t]=="object"){const i=sy[t];i?oy(e[t],i):(D.debug("sanitizing object",t),gs(e[t]));continue}const r=["themeCSS","fontFamily","altFontFamily"];for(const i of r)t.includes(i)&&(D.debug("sanitizing css option",t),e[t]=pc(e[t]))}if(e.themeVariables)for(const t of Object.keys(e.themeVariables)){const r=e.themeVariables[t];r?.match&&!r.match(/^[\d "#%(),.;A-Za-z]+$/)&&(e.themeVariables[t]="")}D.debug("After sanitization",e)}},"sanitizeDirective"),pc=u(e=>{let t=0,r=0;for(const i of e){if(t<r)return"{ /* ERROR: Unbalanced CSS */ }";i==="{"?t++:i==="}"&&r++}return t!==r?"{ /* ERROR: Unbalanced CSS */ }":e},"sanitizeCss"),Gr=Object.freeze(gc),Le=u(e=>!(e===!1||["false","null","0"].includes(String(e).trim().toLowerCase())),"evaluate"),re=jt({},Gr),ps,sr=[],_i=jt({},Gr),qi=u((e,t)=>{let r=jt({},e),i={};for(const s of t)mc(s),i=jt(i,s);if(r=jt(r,i),i.theme&&i.theme in Oe){const s=jt({},ps),o=jt(s.themeVariables||{},i.themeVariables);r.theme&&r.theme in Oe&&(r.themeVariables=Oe[r.theme].getThemeVariables(o))}return _i=r,dy(_i),_i},"updateCurrentConfig"),ay=u(e=>(re=jt({},Gr),re=jt(re,e),e.theme&&Oe[e.theme]&&(re.themeVariables=Oe[e.theme].getThemeVariables(e.themeVariables)),qi(re,sr),re),"setSiteConfig"),ny=u(e=>{ps=jt({},e)},"saveConfigFromInitialize"),ly=u(e=>(re=jt(re,e),qi(re,sr),re),"updateSiteConfig"),fc=u(()=>jt({},re),"getSiteConfig"),yc=u(e=>(qi(_i,[e]),Rt()),"setConfig"),Rt=u(()=>jt({},_i),"getConfig"),mc=u(e=>{e&&(["secure",...re.secure??[]].forEach(t=>{Object.hasOwn(e,t)&&(D.debug(`Denied attempt to modify a secure key ${t}`,e[t]),delete e[t])}),Object.keys(e).forEach(t=>{t.startsWith("__")&&delete e[t]}),Object.keys(e).forEach(t=>{typeof e[t]=="string"&&(e[t].includes("<")||e[t].includes(">")||e[t].includes("url(data:"))&&delete e[t],typeof e[t]=="object"&&mc(e[t])}))},"sanitize"),hy=u(e=>{gs(e),e.fontFamily&&!e.themeVariables?.fontFamily&&(e.themeVariables={...e.themeVariables,fontFamily:e.fontFamily}),sr.push(e),qi(re,sr)},"addDirective"),fs=u((e=re)=>{sr=[],qi(e,sr)},"reset"),cy={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead.",FLOWCHART_HTML_LABELS_DEPRECATED:"flowchart.htmlLabels is deprecated. Please use global htmlLabels instead."},Zn={},Cc=u(e=>{Zn[e]||(D.warn(cy[e]),Zn[e]=!0)},"issueWarning"),dy=u(e=>{e&&(e.lazyLoadedDiagrams||e.loadExternalDiagramsAtStartup)&&Cc("LAZY_LOAD_DEPRECATED")},"checkConfig"),YB=u(()=>{let e={};ps&&(e=jt(e,ps));for(const t of sr)e=jt(e,t);return e},"getUserDefinedConfig"),Kt=u(e=>(e.flowchart?.htmlLabels!=null&&Cc("FLOWCHART_HTML_LABELS_DEPRECATED"),Le(e.htmlLabels??e.flowchart?.htmlLabels??!0)),"getEffectiveHtmlLabels"),xc=/^([^\S\n\r]*)-{3}\s*[\n\r](.*?)[\n\r]\1-{3}\s*[\n\r]+/s,vi=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,uy=/\s*%%.*\n/gm,zr,bc=(zr=class extends Error{constructor(t){super(t),this.name="UnknownDiagramError"}},u(zr,"UnknownDiagramError"),zr),or={},La=u(function(e,t){e=e.replace(xc,"").replace(vi,"").replace(uy,`
|
|
3
|
+
`);for(const[r,{detector:i}]of Object.entries(or))if(i(e,t))return r;throw new bc(`No diagram type detected matching given configuration for text: ${e}`)},"detectType"),Uo=u((...e)=>{for(const{id:t,detector:r,loader:i}of e)kc(t,r,i)},"registerLazyLoadedDiagrams"),kc=u((e,t,r)=>{or[e]&&D.warn(`Detector with key ${e} already exists. Overwriting.`),or[e]={detector:t,loader:r},D.debug(`Detector with key ${e} added${r?" with loader":""}`)},"addDetector"),gy=u(e=>or[e].loader,"getDiagramLoader"),Ni=/<br\s*\/?>/gi,py=u(e=>e?Tc(e).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),fy=(()=>{let e=!1;return()=>{e||(wc(),e=!0)}})();function wc(){const e="data-temp-href-target";Ur.addHook("beforeSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute("target")&&t.setAttribute(e,t.getAttribute("target")??"")}),Ur.addHook("afterSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute(e)&&(t.setAttribute("target",t.getAttribute(e)??""),t.removeAttribute(e),t.getAttribute("target")==="_blank"&&t.setAttribute("rel","noopener"))})}u(wc,"setupDompurifyHooks");var Sc=u(e=>(fy(),Ur.sanitize(e)),"removeScript"),Kn=u((e,t)=>{if(Kt(t)){const r=t.securityLevel;r==="antiscript"||r==="strict"||r==="sandbox"?e=Sc(e):r!=="loose"&&(e=Tc(e),e=e.replace(/</g,"<").replace(/>/g,">"),e=e.replace(/=/g,"="),e=xy(e))}return e},"sanitizeMore"),ae=u((e,t)=>e&&(t.dompurifyConfig?e=Ur.sanitize(Kn(e,t),t.dompurifyConfig).toString():e=Ur.sanitize(Kn(e,t),{FORBID_TAGS:["style"]}).toString(),e),"sanitizeText"),yy=u((e,t)=>typeof e=="string"?ae(e,t):e.flat().map(r=>ae(r,t)),"sanitizeTextOrArray"),my=u(e=>Ni.test(e),"hasBreaks"),Cy=u(e=>e.split(Ni),"splitBreaks"),xy=u(e=>e.replace(/#br#/g,"<br/>"),"placeholderToBreak"),Tc=u(e=>e.replace(Ni,"#br#"),"breakToPlaceholder"),by=u(e=>{let t="";return e&&(t=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,t=CSS.escape(t)),t},"getUrl"),ky=u(function(...e){const t=e.filter(r=>!isNaN(r));return Math.max(...t)},"getMax"),wy=u(function(...e){const t=e.filter(r=>!isNaN(r));return Math.min(...t)},"getMin"),Qn=u(function(e){const t=e.split(/(,)/),r=[];for(let i=0;i<t.length;i++){let s=t[i];if(s===","&&i>0&&i+1<t.length){const o=t[i-1],a=t[i+1];Sy(o,a)&&(s=o+","+a,i++,r.pop())}r.push(Ty(s))}return r.join("")},"parseGenericTypes"),Go=u((e,t)=>Math.max(0,e.split(t).length-1),"countOccurrence"),Sy=u((e,t)=>{const r=Go(e,"~"),i=Go(t,"~");return r===1&&i===1},"shouldCombineSets"),Ty=u(e=>{const t=Go(e,"~");let r=!1;if(t<=1)return e;t%2!==0&&e.startsWith("~")&&(e=e.substring(1),r=!0);const i=[...e];let s=i.indexOf("~"),o=i.lastIndexOf("~");for(;s!==-1&&o!==-1&&s!==o;)i[s]="<",i[o]=">",s=i.indexOf("~"),o=i.lastIndexOf("~");return r&&i.unshift("~"),i.join("")},"processSet"),Jn=u(()=>window.MathMLElement!==void 0,"isMathMLSupported"),Xo=/\$\$(.*?)\$\$/g,Ei=u(e=>(e.match(Xo)?.length??0)>0,"hasKatex"),UB=u(async(e,t)=>{const r=document.createElement("div");r.innerHTML=await Bc(e,t),r.id="katex-temp",r.style.visibility="hidden",r.style.position="absolute",r.style.top="0",document.querySelector("body")?.insertAdjacentElement("beforeend",r);const s={width:r.clientWidth,height:r.clientHeight};return r.remove(),s},"calculateMathMLDimensions"),By=u(async(e,t)=>{if(!Ei(e))return e;if(!(Jn()||t.legacyMathML||t.forceLegacyMathML))return e.replace(Xo,"MathML is unsupported in this environment.");{const{default:r}=await Bt(async()=>{const{default:s}=await import("./index-CaJu4U8U.js").then(o=>o.Q);return{default:s}},__vite__mapDeps([0,1])),i=t.forceLegacyMathML||!Jn()&&t.legacyMathML?"htmlAndMathml":"mathml";return e.split(Ni).map(s=>Ei(s)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${s}</div>`:`<div>${s}</div>`).join("").replace(Xo,(s,o)=>r.renderToString(o,{throwOnError:!0,displayMode:!0,output:i}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))}},"renderKatexUnsanitized"),Bc=u(async(e,t)=>ae(await By(e,t),t),"renderKatexSanitized"),Wi={getRows:py,sanitizeText:ae,sanitizeTextOrArray:yy,hasBreaks:my,splitBreaks:Cy,lineBreakRegex:Ni,removeScript:Sc,getUrl:by,evaluate:Le,getMax:ky,getMin:wy},_y=u(function(e,t){for(let r of t)e.attr(r[0],r[1])},"d3Attrs"),vy=u(function(e,t,r){let i=new Map;return r?(i.set("width","100%"),i.set("style",`max-width: ${t}px;`)):(i.set("height",e),i.set("width",t)),i},"calculateSvgSizeAttrs"),_c=u(function(e,t,r,i){const s=vy(t,r,i);_y(e,s)},"configureSvgSize"),Ly=u(function(e,t,r,i){const s=t.node().getBBox(),o=s.width,a=s.height;D.info(`SVG bounds: ${o}x${a}`,s);let n=0,l=0;D.info(`Graph bounds: ${n}x${l}`,e),n=o+r*2,l=a+r*2,D.info(`Calculated bounds: ${n}x${l}`),_c(t,l,n,i);const c=`${s.x-r} ${s.y-r} ${s.width+2*r} ${s.height+2*r}`;t.attr("viewBox",c)},"setupGraphViewbox"),os={};function Vo(e){return[...e.cssRules].map(t=>t.cssText).join(`
|
|
4
|
+
`)}u(Vo,"cssStyleSheetToString");var Fy=u((e,t,r,i)=>{let s="";return e in os&&os[e]?s=os[e]({...r,svgId:i}):D.warn(`No theme found for ${e}`),`& {
|
|
5
|
+
font-family: ${r.fontFamily};
|
|
6
|
+
font-size: ${r.fontSize};
|
|
7
|
+
fill: ${r.textColor}
|
|
8
|
+
}
|
|
9
|
+
@keyframes edge-animation-frame {
|
|
10
|
+
from {
|
|
11
|
+
stroke-dashoffset: 0;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
@keyframes dash {
|
|
15
|
+
to {
|
|
16
|
+
stroke-dashoffset: 0;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
& .edge-animation-slow {
|
|
20
|
+
stroke-dasharray: 9,5 !important;
|
|
21
|
+
stroke-dashoffset: 900;
|
|
22
|
+
animation: dash 50s linear infinite;
|
|
23
|
+
stroke-linecap: round;
|
|
24
|
+
}
|
|
25
|
+
& .edge-animation-fast {
|
|
26
|
+
stroke-dasharray: 9,5 !important;
|
|
27
|
+
stroke-dashoffset: 900;
|
|
28
|
+
animation: dash 20s linear infinite;
|
|
29
|
+
stroke-linecap: round;
|
|
30
|
+
}
|
|
31
|
+
/* Classes common for multiple diagrams */
|
|
32
|
+
|
|
33
|
+
& .error-icon {
|
|
34
|
+
fill: ${r.errorBkgColor};
|
|
35
|
+
}
|
|
36
|
+
& .error-text {
|
|
37
|
+
fill: ${r.errorTextColor};
|
|
38
|
+
stroke: ${r.errorTextColor};
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
& .edge-thickness-normal {
|
|
42
|
+
stroke-width: ${r.strokeWidth??1}px;
|
|
43
|
+
}
|
|
44
|
+
& .edge-thickness-thick {
|
|
45
|
+
stroke-width: 3.5px
|
|
46
|
+
}
|
|
47
|
+
& .edge-pattern-solid {
|
|
48
|
+
stroke-dasharray: 0;
|
|
49
|
+
}
|
|
50
|
+
& .edge-thickness-invisible {
|
|
51
|
+
stroke-width: 0;
|
|
52
|
+
fill: none;
|
|
53
|
+
}
|
|
54
|
+
& .edge-pattern-dashed{
|
|
55
|
+
stroke-dasharray: 3;
|
|
56
|
+
}
|
|
57
|
+
.edge-pattern-dotted {
|
|
58
|
+
stroke-dasharray: 2;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
& .marker {
|
|
62
|
+
fill: ${r.lineColor};
|
|
63
|
+
stroke: ${r.lineColor};
|
|
64
|
+
}
|
|
65
|
+
& .marker.cross {
|
|
66
|
+
stroke: ${r.lineColor};
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
& svg {
|
|
70
|
+
font-family: ${r.fontFamily};
|
|
71
|
+
font-size: ${r.fontSize};
|
|
72
|
+
}
|
|
73
|
+
& p {
|
|
74
|
+
margin: 0
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
${s}
|
|
78
|
+
.node .neo-node {
|
|
79
|
+
stroke: ${r.nodeBorder};
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
[data-look="neo"].node rect, [data-look="neo"].cluster rect, [data-look="neo"].node polygon {
|
|
83
|
+
stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
|
|
84
|
+
filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
|
|
85
|
+
}
|
|
86
|
+
[data-look="neo"].swimlane.cluster rect {
|
|
87
|
+
filter: none;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
[data-look="neo"].node path {
|
|
92
|
+
stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
|
|
93
|
+
stroke-width: ${r.strokeWidth??1}px;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
[data-look="neo"].node .outer-path {
|
|
97
|
+
filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
[data-look="neo"].node .neo-line path {
|
|
101
|
+
stroke: ${r.nodeBorder};
|
|
102
|
+
filter: none;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
[data-look="neo"].node circle{
|
|
106
|
+
stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
|
|
107
|
+
filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
[data-look="neo"].node circle .state-start{
|
|
111
|
+
fill: #000000;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
[data-look="neo"].icon-shape .icon {
|
|
115
|
+
fill: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
|
|
116
|
+
filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
[data-look="neo"].icon-shape .icon-neo path {
|
|
120
|
+
stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
|
|
121
|
+
filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
${t}
|
|
125
|
+
`},"getStyles"),My=u((e,t)=>{t!==void 0&&(os[e]=t)},"addStylesForDiagram"),Ay=Fy,vc={};Sf(vc,{clear:()=>Ey,getAccDescription:()=>Dy,getAccTitle:()=>Oy,getDiagramTitle:()=>Ry,setAccDescription:()=>Py,setAccTitle:()=>$y,setDiagramTitle:()=>Iy});var Fa="",Ma="",Aa="",Ea=u(e=>ae(e,Rt()),"sanitizeText"),Ey=u(()=>{Fa="",Aa="",Ma=""},"clear"),$y=u(e=>{Fa=Ea(e).replace(/^\s+/g,"")},"setAccTitle"),Oy=u(()=>Fa,"getAccTitle"),Py=u(e=>{Aa=Ea(e).replace(/\n\s+/g,`
|
|
126
|
+
`)},"setAccDescription"),Dy=u(()=>Aa,"getAccDescription"),Iy=u(e=>{Ma=Ea(e)},"setDiagramTitle"),Ry=u(()=>Ma,"getDiagramTitle"),tl=D,qy=va,_t=Rt,GB=yc,XB=Gr,$a=u(e=>ae(e,_t()),"sanitizeText"),Ny=Ly,Wy=u(()=>vc,"getCommonDb"),ys={},ms=u((e,t,r)=>{ys[e]&&tl.warn(`Diagram with id ${e} already registered. Overwriting.`),ys[e]=t,r&&kc(e,r),My(e,t.styles),t.injectUtils?.(tl,qy,_t,$a,Ny,Wy(),()=>{})},"registerDiagram"),Zo=u(e=>{if(e in ys)return ys[e];throw new zy(e)},"getDiagram"),Hr,zy=(Hr=class extends Error{constructor(t){super(`Diagram ${t} not found.`)}},u(Hr,"DiagramNotFoundError"),Hr);const Ko=Math.PI,Qo=2*Ko,Je=1e-6,Hy=Qo-Je;function Lc(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function jy(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return Lc;const r=10**t;return function(i){this._+=i[0];for(let s=1,o=i.length;s<o;++s)this._+=Math.round(arguments[s]*r)/r+i[s]}}class Yy{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?Lc:jy(t)}moveTo(t,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,r){this._append`L${this._x1=+t},${this._y1=+r}`}quadraticCurveTo(t,r,i,s){this._append`Q${+t},${+r},${this._x1=+i},${this._y1=+s}`}bezierCurveTo(t,r,i,s,o,a){this._append`C${+t},${+r},${+i},${+s},${this._x1=+o},${this._y1=+a}`}arcTo(t,r,i,s,o){if(t=+t,r=+r,i=+i,s=+s,o=+o,o<0)throw new Error(`negative radius: ${o}`);let a=this._x1,n=this._y1,l=i-t,c=s-r,h=a-t,d=n-r,g=h*h+d*d;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(g>Je)if(!(Math.abs(d*l-c*h)>Je)||!o)this._append`L${this._x1=t},${this._y1=r}`;else{let f=i-a,m=s-n,y=l*l+c*c,C=f*f+m*m,x=Math.sqrt(y),k=Math.sqrt(g),S=o*Math.tan((Ko-Math.acos((y+g-C)/(2*x*k)))/2),T=S/k,B=S/x;Math.abs(T-1)>Je&&this._append`L${t+T*h},${r+T*d}`,this._append`A${o},${o},0,0,${+(d*f>h*m)},${this._x1=t+B*l},${this._y1=r+B*c}`}}arc(t,r,i,s,o,a){if(t=+t,r=+r,i=+i,a=!!a,i<0)throw new Error(`negative radius: ${i}`);let n=i*Math.cos(s),l=i*Math.sin(s),c=t+n,h=r+l,d=1^a,g=a?s-o:o-s;this._x1===null?this._append`M${c},${h}`:(Math.abs(this._x1-c)>Je||Math.abs(this._y1-h)>Je)&&this._append`L${c},${h}`,i&&(g<0&&(g=g%Qo+Qo),g>Hy?this._append`A${i},${i},0,1,${d},${t-n},${r-l}A${i},${i},0,1,${d},${this._x1=c},${this._y1=h}`:g>Je&&this._append`A${i},${i},0,${+(g>=Ko)},${d},${this._x1=t+i*Math.cos(o)},${this._y1=r+i*Math.sin(o)}`)}rect(t,r,i,s){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${i=+i}v${+s}h${-i}Z`}toString(){return this._}}function br(e){return function(){return e}}const VB=Math.abs,ZB=Math.atan2,KB=Math.cos,QB=Math.max,JB=Math.min,t_=Math.sin,e_=Math.sqrt,el=1e-12,Oa=Math.PI,rl=Oa/2,r_=2*Oa;function i_(e){return e>1?0:e<-1?Oa:Math.acos(e)}function s_(e){return e>=1?rl:e<=-1?-rl:Math.asin(e)}function Uy(e){let t=3;return e.digits=function(r){if(!arguments.length)return t;if(r==null)t=null;else{const i=Math.floor(r);if(!(i>=0))throw new RangeError(`invalid digits: ${r}`);t=i}return e},()=>new Yy(t)}function Gy(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Fc(e){this._context=e}Fc.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function Li(e){return new Fc(e)}function Xy(e){return e[0]}function Vy(e){return e[1]}function Zy(e,t){var r=br(!0),i=null,s=Li,o=null,a=Uy(n);e=typeof e=="function"?e:e===void 0?Xy:br(e),t=typeof t=="function"?t:t===void 0?Vy:br(t);function n(l){var c,h=(l=Gy(l)).length,d,g=!1,f;for(i==null&&(o=s(f=a())),c=0;c<=h;++c)!(c<h&&r(d=l[c],c,l))===g&&((g=!g)?o.lineStart():o.lineEnd()),g&&o.point(+e(d,c,l),+t(d,c,l));if(f)return o=null,f+""||null}return n.x=function(l){return arguments.length?(e=typeof l=="function"?l:br(+l),n):e},n.y=function(l){return arguments.length?(t=typeof l=="function"?l:br(+l),n):t},n.defined=function(l){return arguments.length?(r=typeof l=="function"?l:br(!!l),n):r},n.curve=function(l){return arguments.length?(s=l,i!=null&&(o=s(i)),n):s},n.context=function(l){return arguments.length?(l==null?i=o=null:o=s(i=l),n):i},n}class Mc{constructor(t,r){this._context=t,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(t,r){switch(t=+t,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,r):this._context.moveTo(t,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,r,t,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,t,this._y0,t,r);break}}this._x0=t,this._y0=r}}function Ac(e){return new Mc(e,!0)}function Ec(e){return new Mc(e,!1)}function Ue(){}function Cs(e,t,r){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+r)/6)}function Ps(e){this._context=e}Ps.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:Cs(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(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);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:Cs(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Jo(e){return new Ps(e)}function $c(e){this._context=e}$c.prototype={areaStart:Ue,areaEnd:Ue,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(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:Cs(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Ky(e){return new $c(e)}function Oc(e){this._context=e}Oc.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(e,t){switch(e=+e,t=+t,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+e)/6,i=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,i):this._context.moveTo(r,i);break;case 3:this._point=4;default:Cs(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Qy(e){return new Oc(e)}function Pc(e,t){this._basis=new Ps(e),this._beta=t}Pc.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,r=e.length-1;if(r>0)for(var i=e[0],s=t[0],o=e[r]-i,a=t[r]-s,n=-1,l;++n<=r;)l=n/r,this._basis.point(this._beta*e[n]+(1-this._beta)*(i+l*o),this._beta*t[n]+(1-this._beta)*(s+l*a));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};const Jy=(function e(t){function r(i){return t===1?new Ps(i):new Pc(i,t)}return r.beta=function(i){return e(+i)},r})(.85);function xs(e,t,r){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-r),e._x2,e._y2)}function Pa(e,t){this._context=e,this._k=(1-t)/6}Pa.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:xs(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:xs(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Dc=(function e(t){function r(i){return new Pa(i,t)}return r.tension=function(i){return e(+i)},r})(0);function Da(e,t){this._context=e,this._k=(1-t)/6}Da.prototype={areaStart:Ue,areaEnd:Ue,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(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:xs(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const tm=(function e(t){function r(i){return new Da(i,t)}return r.tension=function(i){return e(+i)},r})(0);function Ia(e,t){this._context=e,this._k=(1-t)/6}Ia.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(e,t){switch(e=+e,t=+t,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:xs(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const em=(function e(t){function r(i){return new Ia(i,t)}return r.tension=function(i){return e(+i)},r})(0);function Ra(e,t,r){var i=e._x1,s=e._y1,o=e._x2,a=e._y2;if(e._l01_a>el){var n=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,l=3*e._l01_a*(e._l01_a+e._l12_a);i=(i*n-e._x0*e._l12_2a+e._x2*e._l01_2a)/l,s=(s*n-e._y0*e._l12_2a+e._y2*e._l01_2a)/l}if(e._l23_a>el){var c=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,h=3*e._l23_a*(e._l23_a+e._l12_a);o=(o*c+e._x1*e._l23_2a-t*e._l12_2a)/h,a=(a*c+e._y1*e._l23_2a-r*e._l12_2a)/h}e._context.bezierCurveTo(i,s,o,a,e._x2,e._y2)}function Ic(e,t){this._context=e,this._alpha=t}Ic.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(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,i=this._y2-t;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(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:Ra(this,e,t);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=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Rc=(function e(t){function r(i){return t?new Ic(i,t):new Pa(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function qc(e,t){this._context=e,this._alpha=t}qc.prototype={areaStart:Ue,areaEnd:Ue,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(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,i=this._y2-t;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=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:Ra(this,e,t);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=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const rm=(function e(t){function r(i){return t?new qc(i,t):new Da(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function Nc(e,t){this._context=e,this._alpha=t}Nc.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(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,i=this._y2-t;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:Ra(this,e,t);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=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const im=(function e(t){function r(i){return t?new Nc(i,t):new Ia(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function Wc(e){this._context=e}Wc.prototype={areaStart:Ue,areaEnd:Ue,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function sm(e){return new Wc(e)}function il(e){return e<0?-1:1}function sl(e,t,r){var i=e._x1-e._x0,s=t-e._x1,o=(e._y1-e._y0)/(i||s<0&&-0),a=(r-e._y1)/(s||i<0&&-0),n=(o*s+a*i)/(i+s);return(il(o)+il(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(n))||0}function ol(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function ro(e,t,r){var i=e._x0,s=e._y0,o=e._x1,a=e._y1,n=(o-i)/3;e._context.bezierCurveTo(i+n,s+n*t,o-n,a-n*r,o,a)}function bs(e){this._context=e}bs.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:ro(this,this._t0,ol(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var r=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,ro(this,ol(this,r=sl(this,e,t)),r);break;default:ro(this,this._t0,r=sl(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function zc(e){this._context=new Hc(e)}(zc.prototype=Object.create(bs.prototype)).point=function(e,t){bs.prototype.point.call(this,t,e)};function Hc(e){this._context=e}Hc.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,r,i,s,o){this._context.bezierCurveTo(t,e,i,r,o,s)}};function jc(e){return new bs(e)}function Yc(e){return new zc(e)}function Uc(e){this._context=e}Uc.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),r===2)this._context.lineTo(e[1],t[1]);else for(var i=al(e),s=al(t),o=0,a=1;a<r;++o,++a)this._context.bezierCurveTo(i[0][o],s[0][o],i[1][o],s[1][o],e[a],t[a]);(this._line||this._line!==0&&r===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function al(e){var t,r=e.length-1,i,s=new Array(r),o=new Array(r),a=new Array(r);for(s[0]=0,o[0]=2,a[0]=e[0]+2*e[1],t=1;t<r-1;++t)s[t]=1,o[t]=4,a[t]=4*e[t]+2*e[t+1];for(s[r-1]=2,o[r-1]=7,a[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)i=s[t]/o[t-1],o[t]-=i,a[t]-=i*a[t-1];for(s[r-1]=a[r-1]/o[r-1],t=r-2;t>=0;--t)s[t]=(a[t]-s[t+1])/o[t];for(o[r-1]=(e[r]+s[r-1])/2,t=0;t<r-1;++t)o[t]=2*e[t+1]-s[t+1];return[s,o]}function Gc(e){return new Uc(e)}function Ds(e,t){this._context=e,this._t=t}Ds.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}break}}this._x=e,this._y=t}};function Xc(e){return new Ds(e,.5)}function Vc(e){return new Ds(e,0)}function Zc(e){return new Ds(e,1)}var om=u(e=>{const{securityLevel:t}=_t();let r=Tt("body");if(t==="sandbox"){const o=Tt(`#i${e}`).node()?.contentDocument??document;r=Tt(o.body)}return r.select(`#${e}`)},"selectSvgElement"),am=u(e=>{const{handDrawnSeed:t}=_t();return{fill:e,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:e,seed:t}},"solidStateFill"),nm=u(e=>Array.isArray(e)?e:e?e.split(";").map(t=>t.trim()).filter(Boolean):[],"normalizeStyleList"),Kr=u(e=>{const t=lm([...e.cssCompiledStyles||[],...e.cssStyles||[],...nm(e.labelStyle)]);return{stylesMap:t,stylesArray:[...t]}},"compileStyles"),lm=u(e=>{const t=new Map;return e.forEach(r=>{const[i,s]=r.split(":");t.set(i.trim(),s?.trim())}),t},"styles2Map"),Kc=u(e=>e==="color"||e==="font-size"||e==="font-family"||e==="font-weight"||e==="font-style"||e==="text-decoration"||e==="text-align"||e==="text-transform"||e==="line-height"||e==="letter-spacing"||e==="word-spacing"||e==="text-shadow"||e==="text-overflow"||e==="white-space"||e==="word-wrap"||e==="word-break"||e==="overflow-wrap"||e==="hyphens","isLabelStyle"),nt=u(e=>{const{stylesArray:t}=Kr(e),r=[],i=[],s=[],o=[];return t.forEach(a=>{const n=a[0];Kc(n)?r.push(a.join(":")+" !important"):(i.push(a.join(":")+" !important"),n.includes("stroke")&&s.push(a.join(":")+" !important"),n==="fill"&&o.push(a.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:i.join(";"),stylesArray:t,borderStyles:s,backgroundStyles:o}},"styles2String"),it=u((e,t)=>{const{themeVariables:r,handDrawnSeed:i}=_t(),{nodeBorder:s,mainBkg:o}=r,{stylesMap:a}=Kr(e);return Object.assign({roughness:.7,fill:a.get("fill")||o,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:a.get("stroke")||s,seed:i,strokeWidth:a.get("stroke-width")?.replace("px","")||1.3,fillLineDash:[0,0],strokeLineDash:hm(a.get("stroke-dasharray"))},t)},"userNodeOverrides"),hm=u(e=>{if(!e)return[0,0];const t=e.trim().split(/\s+/).map(Number);if(t.length===1){const s=isNaN(t[0])?0:t[0];return[s,s]}const r=isNaN(t[0])?0:t[0],i=isNaN(t[1])?0:t[1];return[r,i]},"getStrokeDashArray");const cm=Object.freeze({left:0,top:0,width:16,height:16}),ks=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),Qc=Object.freeze({...cm,...ks}),dm=Object.freeze({...Qc,body:"",hidden:!1}),um=Object.freeze({width:null,height:null}),gm=Object.freeze({...um,...ks}),pm=(e,t,r,i="")=>{const s=e.split(":");if(e.slice(0,1)==="@"){if(s.length<2||s.length>3)return null;i=s.shift().slice(1)}if(s.length>3||!s.length)return null;if(s.length>1){const n=s.pop(),l=s.pop(),c={provider:s.length>0?s[0]:i,prefix:l,name:n};return io(c)?c:null}const o=s[0],a=o.split("-");if(a.length>1){const n={provider:i,prefix:a.shift(),name:a.join("-")};return io(n)?n:null}if(r&&i===""){const n={provider:i,prefix:"",name:o};return io(n,r)?n:null}return null},io=(e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1;function fm(e,t){const r={};!e.hFlip!=!t.hFlip&&(r.hFlip=!0),!e.vFlip!=!t.vFlip&&(r.vFlip=!0);const i=((e.rotate||0)+(t.rotate||0))%4;return i&&(r.rotate=i),r}function nl(e,t){const r=fm(e,t);for(const i in dm)i in ks?i in e&&!(i in r)&&(r[i]=ks[i]):i in t?r[i]=t[i]:i in e&&(r[i]=e[i]);return r}function ym(e,t){const r=e.icons,i=e.aliases||Object.create(null),s=Object.create(null);function o(a){if(r[a])return s[a]=[];if(!(a in s)){s[a]=null;const n=i[a]&&i[a].parent,l=n&&o(n);l&&(s[a]=[n].concat(l))}return s[a]}return(t||Object.keys(r).concat(Object.keys(i))).forEach(o),s}function ll(e,t,r){const i=e.icons,s=e.aliases||Object.create(null);let o={};function a(n){o=nl(i[n]||s[n],o)}return a(t),r.forEach(a),nl(e,o)}function mm(e,t){if(e.icons[t])return ll(e,t,[]);const r=ym(e,[t])[t];return r?ll(e,t,r):null}const Cm=/(-?[0-9.]*[0-9]+[0-9.]*)/g,xm=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function hl(e,t,r){if(t===1)return e;if(r=r||100,typeof e=="number")return Math.ceil(e*t*r)/r;if(typeof e!="string")return e;const i=e.split(Cm);if(i===null||!i.length)return e;const s=[];let o=i.shift(),a=xm.test(o);for(;;){if(a){const n=parseFloat(o);isNaN(n)?s.push(o):s.push(Math.ceil(n*t*r)/r)}else s.push(o);if(o=i.shift(),o===void 0)return s.join("");a=!a}}function bm(e,t="defs"){let r="";const i=e.indexOf("<"+t);for(;i>=0;){const s=e.indexOf(">",i),o=e.indexOf("</"+t);if(s===-1||o===-1)break;const a=e.indexOf(">",o);if(a===-1)break;r+=e.slice(s+1,o).trim(),e=e.slice(0,i).trim()+e.slice(a+1)}return{defs:r,content:e}}function km(e,t){return e?"<defs>"+e+"</defs>"+t:t}function wm(e,t,r){const i=bm(e);return km(i.defs,t+i.content+r)}const Sm=e=>e==="unset"||e==="undefined"||e==="none";function Tm(e,t){const r={...Qc,...e},i={...gm,...t},s={left:r.left,top:r.top,width:r.width,height:r.height};let o=r.body;[r,i].forEach(y=>{const C=[],x=y.hFlip,k=y.vFlip;let S=y.rotate;x?k?S+=2:(C.push("translate("+(s.width+s.left).toString()+" "+(0-s.top).toString()+")"),C.push("scale(-1 1)"),s.top=s.left=0):k&&(C.push("translate("+(0-s.left).toString()+" "+(s.height+s.top).toString()+")"),C.push("scale(1 -1)"),s.top=s.left=0);let T;switch(S<0&&(S-=Math.floor(S/4)*4),S=S%4,S){case 1:T=s.height/2+s.top,C.unshift("rotate(90 "+T.toString()+" "+T.toString()+")");break;case 2:C.unshift("rotate(180 "+(s.width/2+s.left).toString()+" "+(s.height/2+s.top).toString()+")");break;case 3:T=s.width/2+s.left,C.unshift("rotate(-90 "+T.toString()+" "+T.toString()+")")}S%2===1&&(s.left!==s.top&&(T=s.left,s.left=s.top,s.top=T),s.width!==s.height&&(T=s.width,s.width=s.height,s.height=T)),C.length&&(o=wm(o,'<g transform="'+C.join(" ")+'">',"</g>"))});const a=i.width,n=i.height,l=s.width,c=s.height;let h,d;a===null?(d=n===null?"1em":n==="auto"?c:n,h=hl(d,l/c)):(h=a==="auto"?l:a,d=n===null?hl(h,c/l):n==="auto"?c:n);const g={},f=(y,C)=>{Sm(C)||(g[y]=C.toString())};f("width",h),f("height",d);const m=[s.left,s.top,l,c];return g.viewBox=m.join(" "),{attributes:g,viewBox:m,body:o}}const Bm=/\sid="(\S+)"/g,cl=new Map;function _m(e){e=e.replace(/[0-9]+$/,"")||"a";const t=cl.get(e)||0;return cl.set(e,t+1),t?`${e}${t}`:e}function vm(e){const t=[];let r;for(;r=Bm.exec(e);)t.push(r[1]);if(!t.length)return e;const i="suffix"+(Math.random()*16777216|Date.now()).toString(16);return t.forEach(s=>{const o=_m(s),a=s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+a+')([")]|\\.[a-z])',"g"),"$1"+o+i+"$3")}),e=e.replace(new RegExp(i,"g"),""),e}function Lm(e,t){let r=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const i in t)r+=" "+i+'="'+t[i]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+r+">"+e+"</svg>"}var Fm={body:'<g><rect width="80" height="80" style="fill: #087ebf; stroke-width: 0px;"/><text transform="translate(21.16 64.67)" style="fill: #fff; font-family: ArialMT, Arial; font-size: 67.75px;"><tspan x="0" y="0">?</tspan></text></g>',height:80,width:80},ta=new Map,Jc=new Map,Mm=u(e=>{for(const t of e){if(!t.name)throw new Error('Invalid icon loader. Must have a "name" property with non-empty string value.');if(D.debug("Registering icon pack:",t.name),"loader"in t)Jc.set(t.name,t.loader);else if("icons"in t)ta.set(t.name,t.icons);else throw D.error("Invalid icon loader:",t),new Error('Invalid icon loader. Must have either "icons" or "loader" property.')}},"registerIconPacks"),td=u(async(e,t)=>{const r=pm(e,!0,t!==void 0);if(!r)throw new Error(`Invalid icon name: ${e}`);const i=r.prefix||t;if(!i)throw new Error(`Icon name must contain a prefix: ${e}`);let s=ta.get(i);if(!s){const a=Jc.get(i);if(!a)throw new Error(`Icon set not found: ${r.prefix}`);try{s={...await a(),prefix:i},ta.set(i,s)}catch(n){throw D.error(n),new Error(`Failed to load icon set: ${r.prefix}`)}}const o=mm(s,r.name);if(!o)throw new Error(`Icon not found: ${e}`);return o},"getRegisteredIconData"),Am=u(async e=>{try{return await td(e),!0}catch{return!1}},"isIconAvailable"),zi=u(async(e,t,r)=>{let i;try{i=await td(e,t?.fallbackPrefix)}catch(a){D.error(a),i=Fm}const s=Tm(i,t),o=Lm(vm(s.body),{...s.attributes,...r});return ae(o,Rt())},"getIconSVG"),Ui={},Ht={},dl;function Em(){return dl||(dl=1,Object.defineProperty(Ht,"__esModule",{value:!0}),Ht.BLANK_URL=Ht.relativeFirstCharacters=Ht.whitespaceEscapeCharsRegex=Ht.urlSchemeRegex=Ht.ctrlCharactersRegex=Ht.htmlCtrlEntityRegex=Ht.htmlEntitiesRegex=Ht.invalidProtocolRegex=void 0,Ht.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,Ht.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,Ht.htmlCtrlEntityRegex=/&(newline|tab);/gi,Ht.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,Ht.urlSchemeRegex=/^.+(:|:)/gim,Ht.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,Ht.relativeFirstCharacters=[".","/"],Ht.BLANK_URL="about:blank"),Ht}var ul;function $m(){if(ul)return Ui;ul=1,Object.defineProperty(Ui,"__esModule",{value:!0}),Ui.sanitizeUrl=o;var e=Em();function t(a){return e.relativeFirstCharacters.indexOf(a[0])>-1}function r(a){var n=a.replace(e.ctrlCharactersRegex,"");return n.replace(e.htmlEntitiesRegex,function(l,c){return String.fromCharCode(c)})}function i(a){return URL.canParse(a)}function s(a){try{return decodeURIComponent(a)}catch{return a}}function o(a){if(!a)return e.BLANK_URL;var n,l=s(a.trim());do l=r(l).replace(e.htmlCtrlEntityRegex,"").replace(e.ctrlCharactersRegex,"").replace(e.whitespaceEscapeCharsRegex,"").trim(),l=s(l),n=l.match(e.ctrlCharactersRegex)||l.match(e.htmlEntitiesRegex)||l.match(e.htmlCtrlEntityRegex)||l.match(e.whitespaceEscapeCharsRegex);while(n&&n.length>0);var c=l;if(!c)return e.BLANK_URL;if(t(c))return c;var h=c.trimStart(),d=h.match(e.urlSchemeRegex);if(!d)return c;var g=d[0].toLowerCase().trim();if(e.invalidProtocolRegex.test(g))return e.BLANK_URL;var f=h.replace(/\\/g,"/");if(g==="mailto:"||g.includes("://"))return f;if(g==="http:"||g==="https:"){if(!i(f))return e.BLANK_URL;var m=new URL(f);return m.protocol=m.protocol.toLowerCase(),m.hostname=m.hostname.toLowerCase(),m.toString()}return f}return Ui}var Om=$m();function so(e){if(typeof e!="object"||e==null)return!1;if(Object.getPrototypeOf(e)===null)return!0;if(Object.prototype.toString.call(e)!=="[object Object]"){const r=e[Symbol.toStringTag];return r==null||!Object.getOwnPropertyDescriptor(e,Symbol.toStringTag)?.writable?!1:e.toString()===`[object ${r}]`}let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function Pm(){}function ed(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}function qa(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const Dm="[object RegExp]",rd="[object String]",id="[object Number]",sd="[object Boolean]",od="[object Arguments]",Im="[object Symbol]",Rm="[object Date]",qm="[object Map]",Nm="[object Set]",Wm="[object Array]",zm="[object ArrayBuffer]",Hm="[object Object]",jm="[object DataView]",Ym="[object Uint8Array]",Um="[object Uint8ClampedArray]",Gm="[object Uint16Array]",Xm="[object Uint32Array]",Vm="[object Int8Array]",Zm="[object Int16Array]",Km="[object Int32Array]",Qm="[object Float32Array]",Jm="[object Float64Array]",gl=typeof globalThis=="object"&&globalThis||typeof window=="object"&&window||typeof self=="object"&&self||typeof global=="object"&&global||(function(){return this})();function Na(e){return typeof gl.Buffer<"u"&&gl.Buffer.isBuffer(e)}function tC(e){return Number.isSafeInteger(e)&&e>=0}function ad(e){return e!=null&&typeof e!="function"&&tC(e.length)}function eC(e){return e==="__proto__"}function Wa(e){return e==null||typeof e!="object"&&typeof e!="function"}function za(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function rC(e,t){return vr(e,void 0,e,new Map,t)}function vr(e,t,r,i=new Map,s=void 0){const o=s?.(e,t,r,i);if(o!==void 0)return o;if(Wa(e))return e;if(i.has(e))return i.get(e);if(Array.isArray(e)){const a=new Array(e.length);i.set(e,a);for(let n=0;n<e.length;n++)a[n]=vr(e[n],n,r,i,s);return Object.hasOwn(e,"index")&&(a.index=e.index),Object.hasOwn(e,"input")&&(a.input=e.input),a}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp){const a=new RegExp(e.source,e.flags);return a.lastIndex=e.lastIndex,a}if(e instanceof Map){const a=new Map;i.set(e,a);for(const[n,l]of e)a.set(n,vr(l,n,r,i,s));return a}if(e instanceof Set){const a=new Set;i.set(e,a);for(const n of e)a.add(vr(n,void 0,r,i,s));return a}if(Na(e))return e.subarray();if(za(e)){const a=new(Object.getPrototypeOf(e)).constructor(e.length);i.set(e,a);for(let n=0;n<e.length;n++)a[n]=vr(e[n],n,r,i,s);return a}if(e instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer)return e.slice(0);if(e instanceof DataView){const a=new DataView(e.buffer.slice(0),e.byteOffset,e.byteLength);return i.set(e,a),de(a,e,r,i,s),a}if(typeof File<"u"&&e instanceof File){const a=new File([e],e.name,{type:e.type});return i.set(e,a),de(a,e,r,i,s),a}if(typeof Blob<"u"&&e instanceof Blob){const a=new Blob([e],{type:e.type});return i.set(e,a),de(a,e,r,i,s),a}if(e instanceof Error){const a=structuredClone(e);return i.set(e,a),a.message=e.message,a.name=e.name,a.stack=e.stack,a.cause=e.cause,a.constructor=e.constructor,de(a,e,r,i,s),a}if(e instanceof Boolean){const a=new Boolean(e.valueOf());return i.set(e,a),de(a,e,r,i,s),a}if(e instanceof Number){const a=new Number(e.valueOf());return i.set(e,a),de(a,e,r,i,s),a}if(e instanceof String){const a=new String(e.valueOf());return i.set(e,a),de(a,e,r,i,s),a}if(typeof e=="object"&&iC(e)){const a=Object.create(Object.getPrototypeOf(e));return i.set(e,a),de(a,e,r,i,s),a}return e}function de(e,t,r=e,i,s){const o=[...Object.keys(t),...ed(t)];for(let a=0;a<o.length;a++){const n=o[a],l=Object.getOwnPropertyDescriptor(e,n);(l==null||l.writable)&&(e[n]=vr(t[n],n,r,i,s))}}function iC(e){switch(qa(e)){case od:case Wm:case zm:case jm:case sd:case Rm:case Qm:case Jm:case Vm:case Zm:case Km:case qm:case id:case Hm:case Dm:case Nm:case rd:case Im:case Ym:case Um:case Gm:case Xm:return!0;default:return!1}}function sC(e,t){return rC(e,(r,i,s,o)=>{if(typeof e=="object"){if(qa(e)==="[object Object]"&&typeof e.constructor!="function"){const a={};return o.set(e,a),de(a,e,s,o),a}switch(Object.prototype.toString.call(e)){case id:case rd:case sd:{const a=new e.constructor(e?.valueOf());return de(a,e),a}case od:{const a={};return de(a,e),a.length=e.length,a[Symbol.iterator]=e[Symbol.iterator],a}default:return}}})}function pl(e){return sC(e)}function ea(e){return e!==null&&typeof e=="object"&&qa(e)==="[object Arguments]"}function ra(e){return typeof e=="object"&&e!==null}function oC(e){return ra(e)&&ad(e)}function as(e){return za(e)}function aC(e){const t=e?.constructor;return e===(typeof t=="function"?t.prototype:Object.prototype)}function Hi(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError("Expected a function");const r=function(...i){const s=t?t.apply(this,i):i[0],o=r.cache;if(o.has(s))return o.get(s);const a=e.apply(this,i);return r.cache=o.set(s,a)||o,a};return r.cache=new(Hi.Cache||Map),r}Hi.Cache=Map;function nC(e){if(Wa(e))return e;if(Array.isArray(e)||za(e)||e instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer)return e.slice(0);const t=Object.getPrototypeOf(e);if(t==null)return Object.assign(Object.create(t),e);const r=t.constructor;if(e instanceof Date||e instanceof Map||e instanceof Set)return new r(e);if(e instanceof RegExp){const i=new r(e);return i.lastIndex=e.lastIndex,i}if(e instanceof DataView)return new r(e.buffer.slice(0));if(e instanceof Error){let i;return e instanceof AggregateError?i=new r(e.errors,e.message,{cause:e.cause}):i=new r(e.message,{cause:e.cause}),i.stack=e.stack,Object.assign(i,e),i}return typeof File<"u"&&e instanceof File?new r([e],e.name,{type:e.type,lastModified:e.lastModified}):typeof e=="object"?Object.assign(Object.create(t),e):e}function lC(e,...t){const r=t.slice(0,-1),i=t[t.length-1];let s=e;for(let o=0;o<r.length;o++){const a=r[o];s=ns(s,a,i,new Map)}return s}function ns(e,t,r,i){if(Wa(e)&&(e=Object(e)),t==null||typeof t!="object")return e;if(i.has(t))return nC(i.get(t));if(i.set(t,e),Array.isArray(t)){t=t.slice();for(let o=0;o<t.length;o++)o in t||(t[o]=void 0)}const s=[...Object.keys(t),...ed(t)];for(let o=0;o<s.length;o++){const a=s[o];if(eC(a))continue;let n=t[a],l=e[a];if(ea(n)&&(n={...n}),ea(l)&&(l={...l}),Na(n)&&(n=pl(n)),Array.isArray(n))if(Array.isArray(l)){const h=[],d=Reflect.ownKeys(l);for(let g=0;g<d.length;g++){const f=d[g];h[f]=l[f]}l=h}else if(oC(l)){const h=[];for(let d=0;d<l.length;d++)h[d]=l[d];l=h}else l=[];const c=r(l,n,a,e,t,i);c!==void 0?e[a]=c:Array.isArray(n)||ra(l)&&ra(n)&&(so(l)||so(n)||as(l)||as(n))?e[a]=ns(l,n,r,i):l==null&&so(n)?e[a]=ns({},n,r,i):l==null&&as(n)?e[a]=pl(n):(l===void 0||n!==void 0)&&(e[a]=n)}return e}function hC(e,...t){return lC(e,...t,Pm)}function fl(e){if(e==null)return!0;if(ad(e))return typeof e.splice!="function"&&typeof e!="string"&&!Na(e)&&!as(e)&&!ea(e)?!1:e.length===0;if(typeof e=="object"||typeof e=="function"){if(e instanceof Map||e instanceof Set)return e.size===0;const t=Object.keys(e);return aC(e)?t.filter(r=>r!=="constructor").length===0:t.length===0}return!0}var cC="",dC={curveBasis:Jo,curveBasisClosed:Ky,curveBasisOpen:Qy,curveBumpX:Ac,curveBumpY:Ec,curveBundle:Jy,curveCardinalClosed:tm,curveCardinalOpen:em,curveCardinal:Dc,curveCatmullRomClosed:rm,curveCatmullRomOpen:im,curveCatmullRom:Rc,curveLinear:Li,curveLinearClosed:sm,curveMonotoneX:jc,curveMonotoneY:Yc,curveNatural:Gc,curveStep:Xc,curveStepAfter:Zc,curveStepBefore:Vc},uC=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,gC=u(function(e,t){const r=nd(e,/(?:init\b)|(?:initialize\b)/);let i={};if(Array.isArray(r)){const a=r.map(n=>n.args);gs(a),i=jt(i,[...a])}else i=r.args;if(!i)return;let s=La(e,t);const o="config";return i[o]!==void 0&&(s==="flowchart-v2"&&(s="flowchart"),i[s]=i[o],delete i[o]),i},"detectInit"),nd=u(function(e,t=null){try{const r=new RegExp(`[%]{2}(?![{]${uC.source})(?=[}][%]{2}).*
|
|
127
|
+
`,"ig");e=e.trim().replace(r,"").replace(/'/gm,'"'),D.debug(`Detecting diagram directive${t!==null?" type:"+t:""} based on the text:${e}`);let i;const s=[];for(;(i=vi.exec(e))!==null;)if(i.index===vi.lastIndex&&vi.lastIndex++,i&&!t||t&&i[1]?.match(t)||t&&i[2]?.match(t)){const o=i[1]?i[1]:i[2],a=i[3]?i[3].trim():i[4]?JSON.parse(i[4].trim()):null;s.push({type:o,args:a})}return s.length===0?{type:e,args:null}:s.length===1?s[0]:s}catch(r){return D.error(`ERROR: ${r.message} - Unable to parse directive type: '${t}' based on the text: '${e}'`),{type:void 0,args:null}}},"detectDirective"),pC=u(function(e){return e.replace(vi,"")},"removeDirectives"),fC=u(function(e,t){for(const[r,i]of t.entries())if(i.match(e))return r;return-1},"isSubstringInArray");function Ha(e,t){if(!e)return t;const r=`curve${e.charAt(0).toUpperCase()+e.slice(1)}`;return dC[r]??t}u(Ha,"interpolateToCurve");function ld(e,t){const r=e.trim();if(r)return t.securityLevel!=="loose"?Om.sanitizeUrl(r):r}u(ld,"formatUrl");var yC=u((e,...t)=>{const r=e.split("."),i=r.length-1,s=r[i];let o=window;for(let a=0;a<i;a++)if(o=o[r[a]],!o){D.error(`Function name: ${e} not found in window`);return}o[s](...t)},"runFunc");function ja(e,t){return!e||!t?0:Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}u(ja,"distance");function hd(e){let t,r=0;e.forEach(s=>{r+=ja(s,t),t=s});const i=r/2;return Ya(e,i)}u(hd,"traverseEdge");function cd(e){return e.length===1?e[0]:hd(e)}u(cd,"calcLabelPosition");var yl=u((e,t=2)=>{const r=Math.pow(10,t);return Math.round(e*r)/r},"roundNumber"),Ya=u((e,t)=>{let r,i=t;for(const s of e){if(r){const o=ja(s,r);if(o===0)return r;if(o<i)i-=o;else{const a=i/o;if(a<=0)return r;if(a>=1)return{x:s.x,y:s.y};if(a>0&&a<1)return{x:yl((1-a)*r.x+a*s.x,5),y:yl((1-a)*r.y+a*s.y,5)}}}r=s}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),mC=u((e,t,r)=>{D.info(`our points ${JSON.stringify(t)}`),t[0]!==r&&(t=t.reverse());const s=Ya(t,25),o=e?10:5,a=Math.atan2(t[0].y-s.y,t[0].x-s.x),n={x:0,y:0};return n.x=Math.sin(a)*o+(t[0].x+s.x)/2,n.y=-Math.cos(a)*o+(t[0].y+s.y)/2,n},"calcCardinalityPosition");function dd(e,t,r){const i=structuredClone(r);D.info("our points",i),t!=="start_left"&&t!=="start_right"&&i.reverse();const s=25+e,o=Ya(i,s),a=10+e*.5,n=Math.atan2(i[0].y-o.y,i[0].x-o.x),l={x:0,y:0};return t==="start_left"?(l.x=Math.sin(n+Math.PI)*a+(i[0].x+o.x)/2,l.y=-Math.cos(n+Math.PI)*a+(i[0].y+o.y)/2):t==="end_right"?(l.x=Math.sin(n-Math.PI)*a+(i[0].x+o.x)/2-5,l.y=-Math.cos(n-Math.PI)*a+(i[0].y+o.y)/2-5):t==="end_left"?(l.x=Math.sin(n)*a+(i[0].x+o.x)/2-5,l.y=-Math.cos(n)*a+(i[0].y+o.y)/2-5):(l.x=Math.sin(n)*a+(i[0].x+o.x)/2,l.y=-Math.cos(n)*a+(i[0].y+o.y)/2),l}u(dd,"calcTerminalLabelPosition");function ud(e){let t="",r="";for(const i of e)i!==void 0&&(i.startsWith("color:")||i.startsWith("text-align:")?r=r+i+";":t=t+i+";");return{style:t,labelStyle:r}}u(ud,"getStylesFromArray");var ml=0,CC=u(()=>(ml++,"id-"+Math.random().toString(36).substr(2,12)+"-"+ml),"generateId");function gd(e){let t="";const r="0123456789abcdef",i=r.length;for(let s=0;s<e;s++)t+=r.charAt(Math.floor(Math.random()*i));return t}u(gd,"makeRandomHex");var xC=u(e=>gd(e.length),"random"),bC=u(function(){return{x:0,y:0,fill:void 0,anchor:"start",style:"#666",width:100,height:100,textMargin:0,rx:0,ry:0,valign:void 0,text:""}},"getTextObj"),kC=u(function(e,t){const r=t.text.replace(Wi.lineBreakRegex," "),[,i]=Is(t.fontSize),s=e.append("text");s.attr("x",t.x),s.attr("y",t.y),s.style("text-anchor",t.anchor),s.style("font-family",t.fontFamily),s.style("font-size",i),s.style("font-weight",t.fontWeight),s.attr("fill",t.fill),t.class!==void 0&&s.attr("class",t.class);const o=s.append("tspan");return o.attr("x",t.x+t.textMargin*2),o.attr("fill",t.fill),o.text(r),s},"drawSimpleText"),wC=Hi((e,t,r)=>{if(!e||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},r),Wi.lineBreakRegex.test(e)))return e;const i=e.split(" ").filter(Boolean),s=[];let o="";return i.forEach((a,n)=>{const l=De(`${a} `,r),c=De(o,r);if(l>t){const{hyphenatedStrings:g,remainingWord:f}=SC(a,t,"-",r);s.push(o,...g),o=f}else c+l>=t?(s.push(o),o=a):o=[o,a].filter(Boolean).join(" ");n+1===i.length&&s.push(o)}),s.filter(a=>a!=="").join(r.joinWith)},(e,t,r)=>`${e}${t}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),SC=Hi((e,t,r="-",i)=>{i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},i);const s=[...e],o=[];let a="";return s.forEach((n,l)=>{const c=`${a}${n}`;if(De(c,i)>=t){const d=l+1,g=s.length===d,f=`${c}${r}`;o.push(g?c:f),a=""}else a=c}),{hyphenatedStrings:o,remainingWord:a}},(e,t,r="-",i)=>`${e}${t}${r}${i.fontSize}${i.fontWeight}${i.fontFamily}`);function pd(e,t){return Ua(e,t).height}u(pd,"calculateTextHeight");function De(e,t){return Ua(e,t).width}u(De,"calculateTextWidth");var Ua=Hi((e,t)=>{const{fontSize:r=12,fontFamily:i="Arial",fontWeight:s=400}=t;if(!e)return{width:0,height:0};const[,o]=Is(r),a=["sans-serif",i],n=e.split(Wi.lineBreakRegex),l=[],c=Tt("body");if(!c.remove)return{width:0,height:0,lineHeight:0};const h=c.append("svg");for(const g of a){let f=0;const m={width:0,height:0,lineHeight:0};for(const y of n){const C=bC();C.text=y||cC;const x=kC(h,C).style("font-size",o).style("font-weight",s).style("font-family",g),k=(x._groups||x)[0][0].getBBox();if(k.width===0&&k.height===0)throw new Error("svg element not in render tree");m.width=Math.round(Math.max(m.width,k.width)),f=Math.round(k.height),m.height+=f,m.lineHeight=Math.round(Math.max(m.lineHeight,f))}l.push(m)}h.remove();const d=isNaN(l[1].height)||isNaN(l[1].width)||isNaN(l[1].lineHeight)||l[0].height>l[1].height&&l[0].width>l[1].width&&l[0].lineHeight>l[1].lineHeight?0:1;return l[d]},(e,t)=>`${e}${t.fontSize}${t.fontWeight}${t.fontFamily}`),jr,TC=(jr=class{constructor(t=!1,r){this.count=0,this.count=r?r.length:0,this.next=t?()=>this.count++:()=>Date.now()}},u(jr,"InitIDGenerator"),jr),Gi,BC=u(function(e){return Gi=Gi||document.createElement("div"),e=escape(e).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),Gi.innerHTML=e,unescape(Gi.textContent)},"entityDecode");function Ga(e){return"str"in e}u(Ga,"isDetailedError");var _C=u((e,t,r,i)=>{if(!i)return;const s=e.node()?.getBBox();s&&e.append("text").text(i).attr("text-anchor","middle").attr("x",s.x+s.width/2).attr("y",-r).attr("class",t)},"insertTitle"),Is=u(e=>{if(typeof e=="number")return[e,e+"px"];const t=parseInt(e??"",10);return Number.isNaN(t)?[void 0,void 0]:e===String(t)?[t,e+"px"]:[t,e]},"parseFontSize");function Xa(e,t){return hC({},e,t)}u(Xa,"cleanAndMerge");var Zt={assignWithDepth:jt,wrapLabel:wC,calculateTextHeight:pd,calculateTextWidth:De,calculateTextDimensions:Ua,cleanAndMerge:Xa,detectInit:gC,detectDirective:nd,isSubstringInArray:fC,interpolateToCurve:Ha,calcLabelPosition:cd,calcCardinalityPosition:mC,calcTerminalLabelPosition:dd,formatUrl:ld,getStylesFromArray:ud,generateId:CC,random:xC,runFunc:yC,entityDecode:BC,insertTitle:_C,isLabelCoordinateInPath:fd,parseFontSize:Is,InitIDGenerator:TC},vC=u(function(e){let t=e;return t=t.replace(/style.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),t=t.replace(/classDef.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),t=t.replace(/#\w+;/g,function(r){const i=r.substring(1,r.length-1);return/^\+?\d+$/.test(i)?"fl°°"+i+"¶ß":"fl°"+i+"¶ß"}),t},"encodeEntities"),Ge=u(function(e){return e.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),o_=u((e,t,{counter:r=0,prefix:i,suffix:s},o)=>o||`${i?`${i}_`:""}${e}_${t}_${r}${s?`_${s}`:""}`,"getEdgeId");function zt(e){return e??null}u(zt,"handleUndefinedAttr");function fd(e,t){const r=Math.round(e.x),i=Math.round(e.y),s=t.replace(/(\d+\.\d+)/g,o=>Math.round(parseFloat(o)).toString());return s.includes(r.toString())||s.includes(i.toString())}u(fd,"isLabelCoordinateInPath");var ls={exports:{}},Cl=ls.exports,xl;function LC(){return xl||(xl=1,(function(e){(function(t){var r=function(){},i=t.requestAnimationFrame||t.webkitRequestAnimationFrame||t.mozRequestAnimationFrame||t.msRequestAnimationFrame||function(h){return setTimeout(h,16)};function s(){var h=this;h.reads=[],h.writes=[],h.raf=i.bind(t)}s.prototype={constructor:s,runTasks:function(h){for(var d;d=h.shift();)d()},measure:function(h,d){var g=d?h.bind(d):h;return this.reads.push(g),o(this),g},mutate:function(h,d){var g=d?h.bind(d):h;return this.writes.push(g),o(this),g},clear:function(h){return n(this.reads,h)||n(this.writes,h)},extend:function(h){if(typeof h!="object")throw new Error("expected object");var d=Object.create(this);return l(d,h),d.fastdom=this,d.initialize&&d.initialize(),d},catch:null};function o(h){h.scheduled||(h.scheduled=!0,h.raf(a.bind(null,h)))}function a(h){var d=h.writes,g=h.reads,f;try{r("flushing reads",g.length),h.runTasks(g),r("flushing writes",d.length),h.runTasks(d)}catch(m){f=m}if(h.scheduled=!1,(g.length||d.length)&&o(h),f)if(r("task errored",f.message),h.catch)h.catch(f);else throw f}function n(h,d){var g=h.indexOf(d);return!!~g&&!!h.splice(g,1)}function l(h,d){for(var g in d)d.hasOwnProperty(g)&&(h[g]=d[g])}var c=t.fastdom=t.fastdom||new s;e.exports=c})(typeof window<"u"?window:typeof Cl<"u"?Cl:globalThis)})(ls)),ls.exports}var FC=LC();const MC=_a(FC);var oo={exports:{}},bl;function AC(){return bl||(bl=1,(function(e){(function(){var t={initialize:function(){this._tasks=new Map},mutate:function(i,s){return r(this,"mutate",i,s)},measure:function(i,s){return r(this,"measure",i,s)},clear:function(i){var s=this._tasks,o=s.get(i);this.fastdom.clear(o),s.delete(i)}};function r(i,s,o,a){var n=i._tasks,l=i.fastdom,c,h=new Promise(function(d,g){c=l[s](function(){n.delete(h);try{d(a?o.call(a):o())}catch(f){g(f)}},a)});return n.set(h,c),h}e.exports=t})()})(oo)),oo.exports}var EC=AC();const $C=_a(EC);function Va(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var dr=Va();function yd(e){dr=e}var Fi={exec:()=>null};function At(e,t=""){let r=typeof e=="string"?e:e.source,i={replace:(s,o)=>{let a=typeof o=="string"?o:o.source;return a=a.replace(te.caret,"$1"),r=r.replace(s,a),i},getRegex:()=>new RegExp(r,t)};return i}var OC=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),te={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i")},PC=/^(?:[ \t]*(?:\n|$))+/,DC=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,IC=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,ji=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,RC=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Za=/(?:[*+-]|\d{1,9}[.)])/,md=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Cd=At(md).replace(/bull/g,Za).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),qC=At(md).replace(/bull/g,Za).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Ka=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,NC=/^[^\n]+/,Qa=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,WC=At(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Qa).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),zC=At(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Za).getRegex(),Rs="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Ja=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,HC=At("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",Ja).replace("tag",Rs).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),xd=At(Ka).replace("hr",ji).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Rs).getRegex(),jC=At(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",xd).getRegex(),tn={blockquote:jC,code:DC,def:WC,fences:IC,heading:RC,hr:ji,html:HC,lheading:Cd,list:zC,newline:PC,paragraph:xd,table:Fi,text:NC},kl=At("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",ji).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Rs).getRegex(),YC={...tn,lheading:qC,table:kl,paragraph:At(Ka).replace("hr",ji).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",kl).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Rs).getRegex()},UC={...tn,html:At(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Ja).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Fi,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:At(Ka).replace("hr",ji).replace("heading",` *#{1,6} *[^
|
|
128
|
+
]`).replace("lheading",Cd).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},GC=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,XC=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,bd=/^( {2,}|\\)\n(?!\s*$)/,VC=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,qs=/[\p{P}\p{S}]/u,en=/[\s\p{P}\p{S}]/u,kd=/[^\s\p{P}\p{S}]/u,ZC=At(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,en).getRegex(),wd=/(?!~)[\p{P}\p{S}]/u,KC=/(?!~)[\s\p{P}\p{S}]/u,QC=/(?:[^\s\p{P}\p{S}]|~)/u,JC=At(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",OC?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),Sd=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,t0=At(Sd,"u").replace(/punct/g,qs).getRegex(),e0=At(Sd,"u").replace(/punct/g,wd).getRegex(),Td="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",r0=At(Td,"gu").replace(/notPunctSpace/g,kd).replace(/punctSpace/g,en).replace(/punct/g,qs).getRegex(),i0=At(Td,"gu").replace(/notPunctSpace/g,QC).replace(/punctSpace/g,KC).replace(/punct/g,wd).getRegex(),s0=At("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,kd).replace(/punctSpace/g,en).replace(/punct/g,qs).getRegex(),o0=At(/\\(punct)/,"gu").replace(/punct/g,qs).getRegex(),a0=At(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),n0=At(Ja).replace("(?:-->|$)","-->").getRegex(),l0=At("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",n0).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),ws=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,h0=At(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",ws).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Bd=At(/^!?\[(label)\]\[(ref)\]/).replace("label",ws).replace("ref",Qa).getRegex(),_d=At(/^!?\[(ref)\](?:\[\])?/).replace("ref",Qa).getRegex(),c0=At("reflink|nolink(?!\\()","g").replace("reflink",Bd).replace("nolink",_d).getRegex(),wl=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,rn={_backpedal:Fi,anyPunctuation:o0,autolink:a0,blockSkip:JC,br:bd,code:XC,del:Fi,emStrongLDelim:t0,emStrongRDelimAst:r0,emStrongRDelimUnd:s0,escape:GC,link:h0,nolink:_d,punctuation:ZC,reflink:Bd,reflinkSearch:c0,tag:l0,text:VC,url:Fi},d0={...rn,link:At(/^!?\[(label)\]\((.*?)\)/).replace("label",ws).getRegex(),reflink:At(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",ws).getRegex()},ia={...rn,emStrongRDelimAst:i0,emStrongLDelim:e0,url:At(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",wl).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:At(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",wl).getRegex()},u0={...ia,br:At(bd).replace("{2,}","*").getRegex(),text:At(ia.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Xi={normal:tn,gfm:YC,pedantic:UC},di={normal:rn,gfm:ia,breaks:u0,pedantic:d0},g0={"&":"&","<":"<",">":">",'"':""","'":"'"},Sl=e=>g0[e];function xe(e,t){if(t){if(te.escapeTest.test(e))return e.replace(te.escapeReplace,Sl)}else if(te.escapeTestNoEncode.test(e))return e.replace(te.escapeReplaceNoEncode,Sl);return e}function Tl(e){try{e=encodeURI(e).replace(te.percentDecode,"%")}catch{return null}return e}function Bl(e,t){let r=e.replace(te.findPipe,(o,a,n)=>{let l=!1,c=a;for(;--c>=0&&n[c]==="\\";)l=!l;return l?"|":" |"}),i=r.split(te.splitPipe),s=0;if(i[0].trim()||i.shift(),i.length>0&&!i.at(-1)?.trim()&&i.pop(),t)if(i.length>t)i.splice(t);else for(;i.length<t;)i.push("");for(;s<i.length;s++)i[s]=i[s].trim().replace(te.slashPipe,"|");return i}function ui(e,t,r){let i=e.length;if(i===0)return"";let s=0;for(;s<i&&e.charAt(i-s-1)===t;)s++;return e.slice(0,i-s)}function p0(e,t){if(e.indexOf(t[1])===-1)return-1;let r=0;for(let i=0;i<e.length;i++)if(e[i]==="\\")i++;else if(e[i]===t[0])r++;else if(e[i]===t[1]&&(r--,r<0))return i;return r>0?-2:-1}function _l(e,t,r,i,s){let o=t.href,a=t.title||null,n=e[1].replace(s.other.outputLinkReplace,"$1");i.state.inLink=!0;let l={type:e[0].charAt(0)==="!"?"image":"link",raw:r,href:o,title:a,text:n,tokens:i.inlineTokens(n)};return i.state.inLink=!1,l}function f0(e,t,r){let i=e.match(r.other.indentCodeCompensation);if(i===null)return t;let s=i[1];return t.split(`
|
|
129
|
+
`).map(o=>{let a=o.match(r.other.beginningSpace);if(a===null)return o;let[n]=a;return n.length>=s.length?o.slice(s.length):o}).join(`
|
|
130
|
+
`)}var Ss=class{options;rules;lexer;constructor(t){this.options=t||dr}space(t){let r=this.rules.block.newline.exec(t);if(r&&r[0].length>0)return{type:"space",raw:r[0]}}code(t){let r=this.rules.block.code.exec(t);if(r){let i=r[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:r[0],codeBlockStyle:"indented",text:this.options.pedantic?i:ui(i,`
|
|
131
|
+
`)}}}fences(t){let r=this.rules.block.fences.exec(t);if(r){let i=r[0],s=f0(i,r[3]||"",this.rules);return{type:"code",raw:i,lang:r[2]?r[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):r[2],text:s}}}heading(t){let r=this.rules.block.heading.exec(t);if(r){let i=r[2].trim();if(this.rules.other.endingHash.test(i)){let s=ui(i,"#");(this.options.pedantic||!s||this.rules.other.endingSpaceChar.test(s))&&(i=s.trim())}return{type:"heading",raw:r[0],depth:r[1].length,text:i,tokens:this.lexer.inline(i)}}}hr(t){let r=this.rules.block.hr.exec(t);if(r)return{type:"hr",raw:ui(r[0],`
|
|
132
|
+
`)}}blockquote(t){let r=this.rules.block.blockquote.exec(t);if(r){let i=ui(r[0],`
|
|
133
|
+
`).split(`
|
|
134
|
+
`),s="",o="",a=[];for(;i.length>0;){let n=!1,l=[],c;for(c=0;c<i.length;c++)if(this.rules.other.blockquoteStart.test(i[c]))l.push(i[c]),n=!0;else if(!n)l.push(i[c]);else break;i=i.slice(c);let h=l.join(`
|
|
135
|
+
`),d=h.replace(this.rules.other.blockquoteSetextReplace,`
|
|
136
|
+
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");s=s?`${s}
|
|
137
|
+
${h}`:h,o=o?`${o}
|
|
138
|
+
${d}`:d;let g=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(d,a,!0),this.lexer.state.top=g,i.length===0)break;let f=a.at(-1);if(f?.type==="code")break;if(f?.type==="blockquote"){let m=f,y=m.raw+`
|
|
139
|
+
`+i.join(`
|
|
140
|
+
`),C=this.blockquote(y);a[a.length-1]=C,s=s.substring(0,s.length-m.raw.length)+C.raw,o=o.substring(0,o.length-m.text.length)+C.text;break}else if(f?.type==="list"){let m=f,y=m.raw+`
|
|
141
|
+
`+i.join(`
|
|
142
|
+
`),C=this.list(y);a[a.length-1]=C,s=s.substring(0,s.length-f.raw.length)+C.raw,o=o.substring(0,o.length-m.raw.length)+C.raw,i=y.substring(a.at(-1).raw.length).split(`
|
|
143
|
+
`);continue}}return{type:"blockquote",raw:s,tokens:a,text:o}}}list(t){let r=this.rules.block.list.exec(t);if(r){let i=r[1].trim(),s=i.length>1,o={type:"list",raw:"",ordered:s,start:s?+i.slice(0,-1):"",loose:!1,items:[]};i=s?`\\d{1,9}\\${i.slice(-1)}`:`\\${i}`,this.options.pedantic&&(i=s?i:"[*+-]");let a=this.rules.other.listItemRegex(i),n=!1;for(;t;){let c=!1,h="",d="";if(!(r=a.exec(t))||this.rules.block.hr.test(t))break;h=r[0],t=t.substring(h.length);let g=r[2].split(`
|
|
144
|
+
`,1)[0].replace(this.rules.other.listReplaceTabs,k=>" ".repeat(3*k.length)),f=t.split(`
|
|
145
|
+
`,1)[0],m=!g.trim(),y=0;if(this.options.pedantic?(y=2,d=g.trimStart()):m?y=r[1].length+1:(y=r[2].search(this.rules.other.nonSpaceChar),y=y>4?1:y,d=g.slice(y),y+=r[1].length),m&&this.rules.other.blankLine.test(f)&&(h+=f+`
|
|
146
|
+
`,t=t.substring(f.length+1),c=!0),!c){let k=this.rules.other.nextBulletRegex(y),S=this.rules.other.hrRegex(y),T=this.rules.other.fencesBeginRegex(y),B=this.rules.other.headingBeginRegex(y),L=this.rules.other.htmlBeginRegex(y);for(;t;){let M=t.split(`
|
|
147
|
+
`,1)[0],v;if(f=M,this.options.pedantic?(f=f.replace(this.rules.other.listReplaceNesting," "),v=f):v=f.replace(this.rules.other.tabCharGlobal," "),T.test(f)||B.test(f)||L.test(f)||k.test(f)||S.test(f))break;if(v.search(this.rules.other.nonSpaceChar)>=y||!f.trim())d+=`
|
|
148
|
+
`+v.slice(y);else{if(m||g.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||T.test(g)||B.test(g)||S.test(g))break;d+=`
|
|
149
|
+
`+f}!m&&!f.trim()&&(m=!0),h+=M+`
|
|
150
|
+
`,t=t.substring(M.length+1),g=v.slice(y)}}o.loose||(n?o.loose=!0:this.rules.other.doubleBlankLine.test(h)&&(n=!0));let C=null,x;this.options.gfm&&(C=this.rules.other.listIsTask.exec(d),C&&(x=C[0]!=="[ ] ",d=d.replace(this.rules.other.listReplaceTask,""))),o.items.push({type:"list_item",raw:h,task:!!C,checked:x,loose:!1,text:d,tokens:[]}),o.raw+=h}let l=o.items.at(-1);if(l)l.raw=l.raw.trimEnd(),l.text=l.text.trimEnd();else return;o.raw=o.raw.trimEnd();for(let c=0;c<o.items.length;c++)if(this.lexer.state.top=!1,o.items[c].tokens=this.lexer.blockTokens(o.items[c].text,[]),!o.loose){let h=o.items[c].tokens.filter(g=>g.type==="space"),d=h.length>0&&h.some(g=>this.rules.other.anyLine.test(g.raw));o.loose=d}if(o.loose)for(let c=0;c<o.items.length;c++)o.items[c].loose=!0;return o}}html(t){let r=this.rules.block.html.exec(t);if(r)return{type:"html",block:!0,raw:r[0],pre:r[1]==="pre"||r[1]==="script"||r[1]==="style",text:r[0]}}def(t){let r=this.rules.block.def.exec(t);if(r){let i=r[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),s=r[2]?r[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",o=r[3]?r[3].substring(1,r[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):r[3];return{type:"def",tag:i,raw:r[0],href:s,title:o}}}table(t){let r=this.rules.block.table.exec(t);if(!r||!this.rules.other.tableDelimiter.test(r[2]))return;let i=Bl(r[1]),s=r[2].replace(this.rules.other.tableAlignChars,"").split("|"),o=r[3]?.trim()?r[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
|
151
|
+
`):[],a={type:"table",raw:r[0],header:[],align:[],rows:[]};if(i.length===s.length){for(let n of s)this.rules.other.tableAlignRight.test(n)?a.align.push("right"):this.rules.other.tableAlignCenter.test(n)?a.align.push("center"):this.rules.other.tableAlignLeft.test(n)?a.align.push("left"):a.align.push(null);for(let n=0;n<i.length;n++)a.header.push({text:i[n],tokens:this.lexer.inline(i[n]),header:!0,align:a.align[n]});for(let n of o)a.rows.push(Bl(n,a.header.length).map((l,c)=>({text:l,tokens:this.lexer.inline(l),header:!1,align:a.align[c]})));return a}}lheading(t){let r=this.rules.block.lheading.exec(t);if(r)return{type:"heading",raw:r[0],depth:r[2].charAt(0)==="="?1:2,text:r[1],tokens:this.lexer.inline(r[1])}}paragraph(t){let r=this.rules.block.paragraph.exec(t);if(r){let i=r[1].charAt(r[1].length-1)===`
|
|
152
|
+
`?r[1].slice(0,-1):r[1];return{type:"paragraph",raw:r[0],text:i,tokens:this.lexer.inline(i)}}}text(t){let r=this.rules.block.text.exec(t);if(r)return{type:"text",raw:r[0],text:r[0],tokens:this.lexer.inline(r[0])}}escape(t){let r=this.rules.inline.escape.exec(t);if(r)return{type:"escape",raw:r[0],text:r[1]}}tag(t){let r=this.rules.inline.tag.exec(t);if(r)return!this.lexer.state.inLink&&this.rules.other.startATag.test(r[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(r[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(r[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(r[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:r[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:r[0]}}link(t){let r=this.rules.inline.link.exec(t);if(r){let i=r[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(i)){if(!this.rules.other.endAngleBracket.test(i))return;let a=ui(i.slice(0,-1),"\\");if((i.length-a.length)%2===0)return}else{let a=p0(r[2],"()");if(a===-2)return;if(a>-1){let n=(r[0].indexOf("!")===0?5:4)+r[1].length+a;r[2]=r[2].substring(0,a),r[0]=r[0].substring(0,n).trim(),r[3]=""}}let s=r[2],o="";if(this.options.pedantic){let a=this.rules.other.pedanticHrefTitle.exec(s);a&&(s=a[1],o=a[3])}else o=r[3]?r[3].slice(1,-1):"";return s=s.trim(),this.rules.other.startAngleBracket.test(s)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(i)?s=s.slice(1):s=s.slice(1,-1)),_l(r,{href:s&&s.replace(this.rules.inline.anyPunctuation,"$1"),title:o&&o.replace(this.rules.inline.anyPunctuation,"$1")},r[0],this.lexer,this.rules)}}reflink(t,r){let i;if((i=this.rules.inline.reflink.exec(t))||(i=this.rules.inline.nolink.exec(t))){let s=(i[2]||i[1]).replace(this.rules.other.multipleSpaceGlobal," "),o=r[s.toLowerCase()];if(!o){let a=i[0].charAt(0);return{type:"text",raw:a,text:a}}return _l(i,o,i[0],this.lexer,this.rules)}}emStrong(t,r,i=""){let s=this.rules.inline.emStrongLDelim.exec(t);if(!(!s||s[3]&&i.match(this.rules.other.unicodeAlphaNumeric))&&(!(s[1]||s[2])||!i||this.rules.inline.punctuation.exec(i))){let o=[...s[0]].length-1,a,n,l=o,c=0,h=s[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(h.lastIndex=0,r=r.slice(-1*t.length+o);(s=h.exec(r))!=null;){if(a=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!a)continue;if(n=[...a].length,s[3]||s[4]){l+=n;continue}else if((s[5]||s[6])&&o%3&&!((o+n)%3)){c+=n;continue}if(l-=n,l>0)continue;n=Math.min(n,n+l+c);let d=[...s[0]][0].length,g=t.slice(0,o+s.index+d+n);if(Math.min(o,n)%2){let m=g.slice(1,-1);return{type:"em",raw:g,text:m,tokens:this.lexer.inlineTokens(m)}}let f=g.slice(2,-2);return{type:"strong",raw:g,text:f,tokens:this.lexer.inlineTokens(f)}}}}codespan(t){let r=this.rules.inline.code.exec(t);if(r){let i=r[2].replace(this.rules.other.newLineCharGlobal," "),s=this.rules.other.nonSpaceChar.test(i),o=this.rules.other.startingSpaceChar.test(i)&&this.rules.other.endingSpaceChar.test(i);return s&&o&&(i=i.substring(1,i.length-1)),{type:"codespan",raw:r[0],text:i}}}br(t){let r=this.rules.inline.br.exec(t);if(r)return{type:"br",raw:r[0]}}del(t){let r=this.rules.inline.del.exec(t);if(r)return{type:"del",raw:r[0],text:r[2],tokens:this.lexer.inlineTokens(r[2])}}autolink(t){let r=this.rules.inline.autolink.exec(t);if(r){let i,s;return r[2]==="@"?(i=r[1],s="mailto:"+i):(i=r[1],s=i),{type:"link",raw:r[0],text:i,href:s,tokens:[{type:"text",raw:i,text:i}]}}}url(t){let r;if(r=this.rules.inline.url.exec(t)){let i,s;if(r[2]==="@")i=r[0],s="mailto:"+i;else{let o;do o=r[0],r[0]=this.rules.inline._backpedal.exec(r[0])?.[0]??"";while(o!==r[0]);i=r[0],r[1]==="www."?s="http://"+r[0]:s=r[0]}return{type:"link",raw:r[0],text:i,href:s,tokens:[{type:"text",raw:i,text:i}]}}}inlineText(t){let r=this.rules.inline.text.exec(t);if(r){let i=this.lexer.state.inRawBlock;return{type:"text",raw:r[0],text:r[0],escaped:i}}}},ue=class sa{tokens;options;state;tokenizer;inlineQueue;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||dr,this.options.tokenizer=this.options.tokenizer||new Ss,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let r={other:te,block:Xi.normal,inline:di.normal};this.options.pedantic?(r.block=Xi.pedantic,r.inline=di.pedantic):this.options.gfm&&(r.block=Xi.gfm,this.options.breaks?r.inline=di.breaks:r.inline=di.gfm),this.tokenizer.rules=r}static get rules(){return{block:Xi,inline:di}}static lex(t,r){return new sa(r).lex(t)}static lexInline(t,r){return new sa(r).inlineTokens(t)}lex(t){t=t.replace(te.carriageReturn,`
|
|
153
|
+
`),this.blockTokens(t,this.tokens);for(let r=0;r<this.inlineQueue.length;r++){let i=this.inlineQueue[r];this.inlineTokens(i.src,i.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,r=[],i=!1){for(this.options.pedantic&&(t=t.replace(te.tabCharGlobal," ").replace(te.spaceLine,""));t;){let s;if(this.options.extensions?.block?.some(a=>(s=a.call({lexer:this},t,r))?(t=t.substring(s.raw.length),r.push(s),!0):!1))continue;if(s=this.tokenizer.space(t)){t=t.substring(s.raw.length);let a=r.at(-1);s.raw.length===1&&a!==void 0?a.raw+=`
|
|
154
|
+
`:r.push(s);continue}if(s=this.tokenizer.code(t)){t=t.substring(s.raw.length);let a=r.at(-1);a?.type==="paragraph"||a?.type==="text"?(a.raw+=(a.raw.endsWith(`
|
|
155
|
+
`)?"":`
|
|
156
|
+
`)+s.raw,a.text+=`
|
|
157
|
+
`+s.text,this.inlineQueue.at(-1).src=a.text):r.push(s);continue}if(s=this.tokenizer.fences(t)){t=t.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.heading(t)){t=t.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.hr(t)){t=t.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.blockquote(t)){t=t.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.list(t)){t=t.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.html(t)){t=t.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.def(t)){t=t.substring(s.raw.length);let a=r.at(-1);a?.type==="paragraph"||a?.type==="text"?(a.raw+=(a.raw.endsWith(`
|
|
158
|
+
`)?"":`
|
|
159
|
+
`)+s.raw,a.text+=`
|
|
160
|
+
`+s.raw,this.inlineQueue.at(-1).src=a.text):this.tokens.links[s.tag]||(this.tokens.links[s.tag]={href:s.href,title:s.title},r.push(s));continue}if(s=this.tokenizer.table(t)){t=t.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.lheading(t)){t=t.substring(s.raw.length),r.push(s);continue}let o=t;if(this.options.extensions?.startBlock){let a=1/0,n=t.slice(1),l;this.options.extensions.startBlock.forEach(c=>{l=c.call({lexer:this},n),typeof l=="number"&&l>=0&&(a=Math.min(a,l))}),a<1/0&&a>=0&&(o=t.substring(0,a+1))}if(this.state.top&&(s=this.tokenizer.paragraph(o))){let a=r.at(-1);i&&a?.type==="paragraph"?(a.raw+=(a.raw.endsWith(`
|
|
161
|
+
`)?"":`
|
|
162
|
+
`)+s.raw,a.text+=`
|
|
163
|
+
`+s.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):r.push(s),i=o.length!==t.length,t=t.substring(s.raw.length);continue}if(s=this.tokenizer.text(t)){t=t.substring(s.raw.length);let a=r.at(-1);a?.type==="text"?(a.raw+=(a.raw.endsWith(`
|
|
164
|
+
`)?"":`
|
|
165
|
+
`)+s.raw,a.text+=`
|
|
166
|
+
`+s.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):r.push(s);continue}if(t){let a="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(a);break}else throw new Error(a)}}return this.state.top=!0,r}inline(t,r=[]){return this.inlineQueue.push({src:t,tokens:r}),r}inlineTokens(t,r=[]){let i=t,s=null;if(this.tokens.links){let l=Object.keys(this.tokens.links);if(l.length>0)for(;(s=this.tokenizer.rules.inline.reflinkSearch.exec(i))!=null;)l.includes(s[0].slice(s[0].lastIndexOf("[")+1,-1))&&(i=i.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(s=this.tokenizer.rules.inline.anyPunctuation.exec(i))!=null;)i=i.slice(0,s.index)+"++"+i.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let o;for(;(s=this.tokenizer.rules.inline.blockSkip.exec(i))!=null;)o=s[2]?s[2].length:0,i=i.slice(0,s.index+o)+"["+"a".repeat(s[0].length-o-2)+"]"+i.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);i=this.options.hooks?.emStrongMask?.call({lexer:this},i)??i;let a=!1,n="";for(;t;){a||(n=""),a=!1;let l;if(this.options.extensions?.inline?.some(h=>(l=h.call({lexer:this},t,r))?(t=t.substring(l.raw.length),r.push(l),!0):!1))continue;if(l=this.tokenizer.escape(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.tag(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.link(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(l.raw.length);let h=r.at(-1);l.type==="text"&&h?.type==="text"?(h.raw+=l.raw,h.text+=l.text):r.push(l);continue}if(l=this.tokenizer.emStrong(t,i,n)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.codespan(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.br(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.del(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.autolink(t)){t=t.substring(l.raw.length),r.push(l);continue}if(!this.state.inLink&&(l=this.tokenizer.url(t))){t=t.substring(l.raw.length),r.push(l);continue}let c=t;if(this.options.extensions?.startInline){let h=1/0,d=t.slice(1),g;this.options.extensions.startInline.forEach(f=>{g=f.call({lexer:this},d),typeof g=="number"&&g>=0&&(h=Math.min(h,g))}),h<1/0&&h>=0&&(c=t.substring(0,h+1))}if(l=this.tokenizer.inlineText(c)){t=t.substring(l.raw.length),l.raw.slice(-1)!=="_"&&(n=l.raw.slice(-1)),a=!0;let h=r.at(-1);h?.type==="text"?(h.raw+=l.raw,h.text+=l.text):r.push(l);continue}if(t){let h="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(h);break}else throw new Error(h)}}return r}},Ts=class{options;parser;constructor(t){this.options=t||dr}space(t){return""}code({text:t,lang:r,escaped:i}){let s=(r||"").match(te.notSpaceStart)?.[0],o=t.replace(te.endingNewline,"")+`
|
|
167
|
+
`;return s?'<pre><code class="language-'+xe(s)+'">'+(i?o:xe(o,!0))+`</code></pre>
|
|
168
|
+
`:"<pre><code>"+(i?o:xe(o,!0))+`</code></pre>
|
|
169
|
+
`}blockquote({tokens:t}){return`<blockquote>
|
|
170
|
+
${this.parser.parse(t)}</blockquote>
|
|
171
|
+
`}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:r}){return`<h${r}>${this.parser.parseInline(t)}</h${r}>
|
|
172
|
+
`}hr(t){return`<hr>
|
|
173
|
+
`}list(t){let r=t.ordered,i=t.start,s="";for(let n=0;n<t.items.length;n++){let l=t.items[n];s+=this.listitem(l)}let o=r?"ol":"ul",a=r&&i!==1?' start="'+i+'"':"";return"<"+o+a+`>
|
|
174
|
+
`+s+"</"+o+`>
|
|
175
|
+
`}listitem(t){let r="";if(t.task){let i=this.checkbox({checked:!!t.checked});t.loose?t.tokens[0]?.type==="paragraph"?(t.tokens[0].text=i+" "+t.tokens[0].text,t.tokens[0].tokens&&t.tokens[0].tokens.length>0&&t.tokens[0].tokens[0].type==="text"&&(t.tokens[0].tokens[0].text=i+" "+xe(t.tokens[0].tokens[0].text),t.tokens[0].tokens[0].escaped=!0)):t.tokens.unshift({type:"text",raw:i+" ",text:i+" ",escaped:!0}):r+=i+" "}return r+=this.parser.parse(t.tokens,!!t.loose),`<li>${r}</li>
|
|
176
|
+
`}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>
|
|
177
|
+
`}table(t){let r="",i="";for(let o=0;o<t.header.length;o++)i+=this.tablecell(t.header[o]);r+=this.tablerow({text:i});let s="";for(let o=0;o<t.rows.length;o++){let a=t.rows[o];i="";for(let n=0;n<a.length;n++)i+=this.tablecell(a[n]);s+=this.tablerow({text:i})}return s&&(s=`<tbody>${s}</tbody>`),`<table>
|
|
178
|
+
<thead>
|
|
179
|
+
`+r+`</thead>
|
|
180
|
+
`+s+`</table>
|
|
181
|
+
`}tablerow({text:t}){return`<tr>
|
|
182
|
+
${t}</tr>
|
|
183
|
+
`}tablecell(t){let r=this.parser.parseInline(t.tokens),i=t.header?"th":"td";return(t.align?`<${i} align="${t.align}">`:`<${i}>`)+r+`</${i}>
|
|
184
|
+
`}strong({tokens:t}){return`<strong>${this.parser.parseInline(t)}</strong>`}em({tokens:t}){return`<em>${this.parser.parseInline(t)}</em>`}codespan({text:t}){return`<code>${xe(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:r,tokens:i}){let s=this.parser.parseInline(i),o=Tl(t);if(o===null)return s;t=o;let a='<a href="'+t+'"';return r&&(a+=' title="'+xe(r)+'"'),a+=">"+s+"</a>",a}image({href:t,title:r,text:i,tokens:s}){s&&(i=this.parser.parseInline(s,this.parser.textRenderer));let o=Tl(t);if(o===null)return xe(i);t=o;let a=`<img src="${t}" alt="${i}"`;return r&&(a+=` title="${xe(r)}"`),a+=">",a}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:xe(t.text)}},sn=class{strong({text:t}){return t}em({text:t}){return t}codespan({text:t}){return t}del({text:t}){return t}html({text:t}){return t}text({text:t}){return t}link({text:t}){return""+t}image({text:t}){return""+t}br(){return""}},ge=class oa{options;renderer;textRenderer;constructor(t){this.options=t||dr,this.options.renderer=this.options.renderer||new Ts,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new sn}static parse(t,r){return new oa(r).parse(t)}static parseInline(t,r){return new oa(r).parseInline(t)}parse(t,r=!0){let i="";for(let s=0;s<t.length;s++){let o=t[s];if(this.options.extensions?.renderers?.[o.type]){let n=o,l=this.options.extensions.renderers[n.type].call({parser:this},n);if(l!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(n.type)){i+=l||"";continue}}let a=o;switch(a.type){case"space":{i+=this.renderer.space(a);continue}case"hr":{i+=this.renderer.hr(a);continue}case"heading":{i+=this.renderer.heading(a);continue}case"code":{i+=this.renderer.code(a);continue}case"table":{i+=this.renderer.table(a);continue}case"blockquote":{i+=this.renderer.blockquote(a);continue}case"list":{i+=this.renderer.list(a);continue}case"html":{i+=this.renderer.html(a);continue}case"def":{i+=this.renderer.def(a);continue}case"paragraph":{i+=this.renderer.paragraph(a);continue}case"text":{let n=a,l=this.renderer.text(n);for(;s+1<t.length&&t[s+1].type==="text";)n=t[++s],l+=`
|
|
185
|
+
`+this.renderer.text(n);r?i+=this.renderer.paragraph({type:"paragraph",raw:l,text:l,tokens:[{type:"text",raw:l,text:l,escaped:!0}]}):i+=l;continue}default:{let n='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(n),"";throw new Error(n)}}}return i}parseInline(t,r=this.renderer){let i="";for(let s=0;s<t.length;s++){let o=t[s];if(this.options.extensions?.renderers?.[o.type]){let n=this.options.extensions.renderers[o.type].call({parser:this},o);if(n!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(o.type)){i+=n||"";continue}}let a=o;switch(a.type){case"escape":{i+=r.text(a);break}case"html":{i+=r.html(a);break}case"link":{i+=r.link(a);break}case"image":{i+=r.image(a);break}case"strong":{i+=r.strong(a);break}case"em":{i+=r.em(a);break}case"codespan":{i+=r.codespan(a);break}case"br":{i+=r.br(a);break}case"del":{i+=r.del(a);break}case"text":{i+=r.text(a);break}default:{let n='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(n),"";throw new Error(n)}}}return i}},xi=class{options;block;constructor(t){this.options=t||dr}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}emStrongMask(t){return t}provideLexer(){return this.block?ue.lex:ue.lexInline}provideParser(){return this.block?ge.parse:ge.parseInline}},y0=class{defaults=Va();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=ge;Renderer=Ts;TextRenderer=sn;Lexer=ue;Tokenizer=Ss;Hooks=xi;constructor(...t){this.use(...t)}walkTokens(t,r){let i=[];for(let s of t)switch(i=i.concat(r.call(this,s)),s.type){case"table":{let o=s;for(let a of o.header)i=i.concat(this.walkTokens(a.tokens,r));for(let a of o.rows)for(let n of a)i=i.concat(this.walkTokens(n.tokens,r));break}case"list":{let o=s;i=i.concat(this.walkTokens(o.items,r));break}default:{let o=s;this.defaults.extensions?.childTokens?.[o.type]?this.defaults.extensions.childTokens[o.type].forEach(a=>{let n=o[a].flat(1/0);i=i.concat(this.walkTokens(n,r))}):o.tokens&&(i=i.concat(this.walkTokens(o.tokens,r)))}}return i}use(...t){let r=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(i=>{let s={...i};if(s.async=this.defaults.async||s.async||!1,i.extensions&&(i.extensions.forEach(o=>{if(!o.name)throw new Error("extension name required");if("renderer"in o){let a=r.renderers[o.name];a?r.renderers[o.name]=function(...n){let l=o.renderer.apply(this,n);return l===!1&&(l=a.apply(this,n)),l}:r.renderers[o.name]=o.renderer}if("tokenizer"in o){if(!o.level||o.level!=="block"&&o.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let a=r[o.level];a?a.unshift(o.tokenizer):r[o.level]=[o.tokenizer],o.start&&(o.level==="block"?r.startBlock?r.startBlock.push(o.start):r.startBlock=[o.start]:o.level==="inline"&&(r.startInline?r.startInline.push(o.start):r.startInline=[o.start]))}"childTokens"in o&&o.childTokens&&(r.childTokens[o.name]=o.childTokens)}),s.extensions=r),i.renderer){let o=this.defaults.renderer||new Ts(this.defaults);for(let a in i.renderer){if(!(a in o))throw new Error(`renderer '${a}' does not exist`);if(["options","parser"].includes(a))continue;let n=a,l=i.renderer[n],c=o[n];o[n]=(...h)=>{let d=l.apply(o,h);return d===!1&&(d=c.apply(o,h)),d||""}}s.renderer=o}if(i.tokenizer){let o=this.defaults.tokenizer||new Ss(this.defaults);for(let a in i.tokenizer){if(!(a in o))throw new Error(`tokenizer '${a}' does not exist`);if(["options","rules","lexer"].includes(a))continue;let n=a,l=i.tokenizer[n],c=o[n];o[n]=(...h)=>{let d=l.apply(o,h);return d===!1&&(d=c.apply(o,h)),d}}s.tokenizer=o}if(i.hooks){let o=this.defaults.hooks||new xi;for(let a in i.hooks){if(!(a in o))throw new Error(`hook '${a}' does not exist`);if(["options","block"].includes(a))continue;let n=a,l=i.hooks[n],c=o[n];xi.passThroughHooks.has(a)?o[n]=h=>{if(this.defaults.async&&xi.passThroughHooksRespectAsync.has(a))return(async()=>{let g=await l.call(o,h);return c.call(o,g)})();let d=l.call(o,h);return c.call(o,d)}:o[n]=(...h)=>{if(this.defaults.async)return(async()=>{let g=await l.apply(o,h);return g===!1&&(g=await c.apply(o,h)),g})();let d=l.apply(o,h);return d===!1&&(d=c.apply(o,h)),d}}s.hooks=o}if(i.walkTokens){let o=this.defaults.walkTokens,a=i.walkTokens;s.walkTokens=function(n){let l=[];return l.push(a.call(this,n)),o&&(l=l.concat(o.call(this,n))),l}}this.defaults={...this.defaults,...s}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,r){return ue.lex(t,r??this.defaults)}parser(t,r){return ge.parse(t,r??this.defaults)}parseMarkdown(t){return(r,i)=>{let s={...i},o={...this.defaults,...s},a=this.onError(!!o.silent,!!o.async);if(this.defaults.async===!0&&s.async===!1)return a(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof r>"u"||r===null)return a(new Error("marked(): input parameter is undefined or null"));if(typeof r!="string")return a(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));if(o.hooks&&(o.hooks.options=o,o.hooks.block=t),o.async)return(async()=>{let n=o.hooks?await o.hooks.preprocess(r):r,l=await(o.hooks?await o.hooks.provideLexer():t?ue.lex:ue.lexInline)(n,o),c=o.hooks?await o.hooks.processAllTokens(l):l;o.walkTokens&&await Promise.all(this.walkTokens(c,o.walkTokens));let h=await(o.hooks?await o.hooks.provideParser():t?ge.parse:ge.parseInline)(c,o);return o.hooks?await o.hooks.postprocess(h):h})().catch(a);try{o.hooks&&(r=o.hooks.preprocess(r));let n=(o.hooks?o.hooks.provideLexer():t?ue.lex:ue.lexInline)(r,o);o.hooks&&(n=o.hooks.processAllTokens(n)),o.walkTokens&&this.walkTokens(n,o.walkTokens);let l=(o.hooks?o.hooks.provideParser():t?ge.parse:ge.parseInline)(n,o);return o.hooks&&(l=o.hooks.postprocess(l)),l}catch(n){return a(n)}}}onError(t,r){return i=>{if(i.message+=`
|
|
186
|
+
Please report this to https://github.com/markedjs/marked.`,t){let s="<p>An error occurred:</p><pre>"+xe(i.message+"",!0)+"</pre>";return r?Promise.resolve(s):s}if(r)return Promise.reject(i);throw i}}},ar=new y0;function $t(e,t){return ar.parse(e,t)}$t.options=$t.setOptions=function(e){return ar.setOptions(e),$t.defaults=ar.defaults,yd($t.defaults),$t};$t.getDefaults=Va;$t.defaults=dr;$t.use=function(...e){return ar.use(...e),$t.defaults=ar.defaults,yd($t.defaults),$t};$t.walkTokens=function(e,t){return ar.walkTokens(e,t)};$t.parseInline=ar.parseInline;$t.Parser=ge;$t.parser=ge.parse;$t.Renderer=Ts;$t.TextRenderer=sn;$t.Lexer=ue;$t.lexer=ue.lex;$t.Tokenizer=Ss;$t.Hooks=xi;$t.parse=$t;$t.options;$t.setOptions;$t.use;$t.walkTokens;$t.parseInline;ge.parse;ue.lex;function vd(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var i=Array.from(typeof e=="string"?[e]:e);i[i.length-1]=i[i.length-1].replace(/\r?\n([\t ]*)$/,"");var s=i.reduce(function(n,l){var c=l.match(/\n([\t ]+|(?!\s).)/g);return c?n.concat(c.map(function(h){var d,g;return(g=(d=h.match(/[\t ]/g))===null||d===void 0?void 0:d.length)!==null&&g!==void 0?g:0})):n},[]);if(s.length){var o=new RegExp(`
|
|
187
|
+
[ ]{`.concat(Math.min.apply(Math,s),"}"),"g");i=i.map(function(n){return n.replace(o,`
|
|
188
|
+
`)})}i[0]=i[0].replace(/^\r?\n/,"");var a=i[0];return t.forEach(function(n,l){var c=a.match(/(?:^|\n)( *)$/),h=c?c[1]:"",d=n;typeof n=="string"&&n.includes(`
|
|
189
|
+
`)&&(d=String(n).split(`
|
|
190
|
+
`).map(function(g,f){return f===0?g:"".concat(h).concat(g)}).join(`
|
|
191
|
+
`)),a+=d+i[l+1]}),a}var aa=typeof performance<"u"&&typeof performance.now=="function",kr=u(()=>aa?performance.now():0,"now"),ao="🧜 ",m0="Mermaid render",C0="Mermaid",x0={parse:"tertiary",prepare:"secondary",measure:"primary",layout:"primary-dark",layoutCore:"error",draw:"primary-light",paint:"secondary-dark",serialize:"tertiary-dark",render:"primary-light"},Yr;Yr=class{constructor(){this.enabled=!1,this.autoPrint=!0,this.records=[],this.maxRecords=200,this.roots=[],this.stack=[],this.buckets={}}enable(){return this.enabled=!0,this}disable(){return this.enabled=!1,this}start(t){this.enabled&&(this.roots=[],this.stack=[],this.buckets={},this.begin(t))}tickSync(t,r){if(!this.enabled)return r();const i=kr();try{return r()}finally{this.buckets[t]=(this.buckets[t]??0)+(kr()-i)}}async tick(t,r){if(!this.enabled)return r();const i=kr();try{return await r()}finally{this.buckets[t]=(this.buckets[t]??0)+(kr()-i)}}stop(){if(!this.enabled)return;for(;this.stack.length>0;)this.end();const t=this.roots.at(-1),r=this.runLabel??t?.name;return t&&(this.records.push({label:r??t.name,tree:t,buckets:{...this.buckets}}),this.records.length>this.maxRecords&&this.records.splice(0,this.records.length-this.maxRecords),this.autoPrint&&this.printSummary(t,r)),this.runLabel=void 0,t}begin(t){if(!this.enabled)return;const r={name:t,start:kr(),duration:-1,children:[]},i=this.stack.at(-1);if(i?i.children.push(r):this.roots.push(r),this.stack.push(r),aa&&typeof performance.mark=="function")try{performance.mark(`${ao}${t} ▶`)}catch{}}end(){if(!this.enabled)return;const t=this.stack.pop();if(!t)return;const r=kr();if(t.duration=r-t.start,aa&&typeof performance.measure=="function")try{performance.measure(`${ao}${t.name}`,{start:t.start,end:r,detail:{devtools:{dataType:"track-entry",track:m0,trackGroup:C0,color:x0[t.name]??"primary",tooltipText:`${t.name} — ${t.duration.toFixed(1)} ms`}}})}catch{}}async span(t,r){if(!this.enabled)return r();this.begin(t);try{return await r()}finally{this.end()}}report(){return this.records.at(-1)?.tree??this.roots.at(-1)}clear(){this.records.length=0,this.roots=[],this.stack=[],this.runLabel=void 0}reset(){this.roots=[],this.stack=[]}printSummary(t=this.report(),r){if(!t)return;const i=t.duration,s=r&&r!==t.name?`${t.name} [${r}]`:t.name,o=["ms % phase"],a=u((l,c)=>{const h=" ".repeat(c),d=l.duration.toFixed(1).padStart(8),g=i>0?`${(l.duration/i*100).toFixed(0).padStart(3)}%`:" -";o.push(`${d} ${g} ${h}${l.name}`);for(const f of l.children)a(f,c+1);if(l.children.length>0){const f=l.children.reduce((y,C)=>y+C.duration,0),m=l.duration-f;if(m>.5){const y=m.toFixed(1).padStart(8);o.push(`${y} ${h} (self)`)}}},"walk");a(t,0);const n=Object.keys(this.buckets);if(n.length>0){o.push("—— buckets (summed) ——");for(const l of n)o.push(`${this.buckets[l].toFixed(1).padStart(8)} ${l}`)}console.log(`${ao}mermaid render profile · ${s}
|
|
192
|
+
${o.join(`
|
|
193
|
+
`)}`)}},u(Yr,"Profiler");globalThis.injected??={includeLargeFeatures:!0,profiling:!1,version:"0.0.0"};var b0=MC.extend({raf(e){typeof queueMicrotask=="function"?queueMicrotask(e):setTimeout(e,0)}}).extend($C),nr=b0;function Ld(e,{markdownAutoWrap:t}){const i=e.replace(/<br\/>/g,`
|
|
194
|
+
`).replace(/\n{2,}/g,`
|
|
195
|
+
`);return vd(i)}u(Ld,"preprocessMarkdown");function Fd(e){return e.split(/\\n|\n|<br\s*\/?>/gi).map(t=>t.trim().match(/<[^>]+>|[^\s<>]+/g)?.map(r=>({content:r,type:"normal"}))??[])}u(Fd,"nonMarkdownToLines");function Md(e,t={}){const r=Ld(e,t),i=$t.lexer(r),s=[[]];let o=0;function a(n,l="normal"){n.type==="text"?n.text.split(`
|
|
196
|
+
`).forEach((h,d)=>{d!==0&&(o++,s.push([])),h.split(" ").forEach(g=>{g=g.replace(/'/g,"'"),g&&s[o].push({content:g,type:l})})}):n.type==="strong"||n.type==="em"?n.tokens.forEach(c=>{a(c,n.type)}):n.type==="html"&&s[o].push({content:n.text,type:"normal"})}return u(a,"processNode"),i.forEach(n=>{n.type==="paragraph"?n.tokens?.forEach(l=>{a(l)}):n.type==="html"?s[o].push({content:n.text,type:"normal"}):s[o].push({content:n.raw,type:"normal"})}),s}u(Md,"markdownToLines");function Ad(e){return e?`<p>${e.replace(/\\n|\n/g,"<br />")}</p>`:""}u(Ad,"nonMarkdownToHTML");function Ed(e,{markdownAutoWrap:t}={}){const r=$t.lexer(e);function i(s){return s.type==="text"?t===!1?s.text.replace(/\n */g,"<br/>").replace(/ /g," "):s.text.replace(/\n */g,"<br/>"):s.type==="strong"?`<strong>${s.tokens?.map(i).join("")}</strong>`:s.type==="em"?`<em>${s.tokens?.map(i).join("")}</em>`:s.type==="paragraph"?`<p>${s.tokens?.map(i).join("")}</p>`:s.type==="space"?"":s.type==="html"?`${s.text}`:s.type==="escape"?s.text:(D.warn(`Unsupported markdown: ${s.type}`),s.raw)}return u(i,"output"),r.map(i).join("")}u(Ed,"markdownToHTML");function $d(e){return Intl.Segmenter?[...new Intl.Segmenter().segment(e)].map(t=>t.segment):[...e]}u($d,"splitTextToChars");function Od(e,t){const r=$d(t.content);return on(e,[],r,t.type)}u(Od,"splitWordToFitWidth");function on(e,t,r,i){if(r.length===0)return[{content:t.join(""),type:i},{content:"",type:i}];const[s,...o]=r,a=[...t,s];return e([{content:a.join(""),type:i}])?on(e,a,o,i):(t.length===0&&s&&(t.push(s),r.shift()),[{content:t.join(""),type:i},{content:r.join(""),type:i}])}u(on,"splitWordToFitWidthRecursion");function Pd(e,t){if(e.some(({content:r})=>r.includes(`
|
|
197
|
+
`)))throw new Error("splitLineToFitWidth does not support newlines in the line");return Bs(e,t)}u(Pd,"splitLineToFitWidth");function Bs(e,t,r=[],i=[]){if(e.length===0)return i.length>0&&r.push(i),r.length>0?r:[];let s="";e[0].content===" "&&(s=" ",e.shift());const o=e.shift()??{content:" ",type:"normal"},a=[...i];if(s!==""&&a.push({content:s,type:"normal"}),a.push(o),t(a))return Bs(e,t,r,a);if(i.length>0)r.push(i),e.unshift(o);else if(o.content){const[n,l]=Od(t,o);r.push([n]),l.content&&e.unshift(l)}return Bs(e,t,r)}u(Bs,"splitLineToFitWidthRecursion");function na(e,t){t&&e.attr("style",t)}u(na,"applyStyle");var vl=16384;async function Dd(e,t,r,i,s=!1,o=Rt()){const a=e.append("foreignObject");a.attr("width",`${Math.min(10*r,vl)}px`),a.attr("height",`${Math.min(10*r,vl)}px`);const n=a.append("xhtml:div"),l=Ei(t.label)?await Bc(t.label.replace(Wi.lineBreakRegex,`
|
|
198
|
+
`),o):ae(t.label,o),c=t.isNode?"nodeLabel":"edgeLabel",h=n.append("span");return h.html(l),na(h,t.labelStyle),h.attr("class",`${c} ${i}`),na(n,t.labelStyle),n.style("display","table-cell"),n.style("white-space","nowrap"),n.style("line-height","1.5"),r!==Number.POSITIVE_INFINITY&&(n.style("max-width",r+"px"),n.style("text-align","center")),n.attr("xmlns","http://www.w3.org/1999/xhtml"),s&&n.attr("class","labelBkg"),(await nr.measure(()=>n.node().getBoundingClientRect())).width===r&&(n.style("display","table"),n.style("white-space","break-spaces"),n.style("width",r+"px")),a.node()}u(Dd,"addHtmlSpan");function Ns(e,t,r,i=!1){const s=e.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",t*r-.1+"em").attr("dy",r+"em");return i&&s.attr("text-anchor","middle"),s}u(Ns,"createTspan");function Id(e,t,r){const i=e.append("text"),s=Ns(i,1,t);Ws(s,r);const o=s.node().getComputedTextLength();return i.remove(),o}u(Id,"computeWidthOfText");function k0(e,t,r){const i=e.append("text"),s=Ns(i,1,t);Ws(s,[{content:r,type:"normal"}]);const o=s.node()?.getBoundingClientRect();return o&&i.remove(),o}u(k0,"computeDimensionOfText");function Rd(e,t,r,i=!1,s=!1){const a=t.append("g"),n=a.insert("rect").attr("class","background").attr("style","stroke: none"),l=a.append("text").attr("y","-10.1");s&&l.attr("text-anchor","middle");let c=0;for(const h of r){const d=u(f=>Id(a,1.1,f)<=e,"checkWidth"),g=d(h)?[h]:Pd(h,d);for(const f of g){const m=Ns(l,c,1.1,s);Ws(m,f),c++}}if(i){const h=l.node().getBBox(),d=2;return n.attr("x",h.x-d).attr("y",h.y-d).attr("width",h.width+2*d).attr("height",h.height+2*d),a.node()}else return l.node()}u(Rd,"createFormattedText");function la(e){const t=/&(amp|lt|gt);/g;return e.replace(t,(r,i)=>{switch(i){case"amp":return"&";case"lt":return"<";case"gt":return">";default:return r}})}u(la,"decodeHTMLEntities");function Ws(e,t){e.text(""),t.forEach((r,i)=>{const s=e.append("tspan").attr("font-style",r.type==="em"?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight",r.type==="strong"?"bold":"normal");i===0?s.text(la(r.content)):s.text(" "+la(r.content))})}u(Ws,"updateTextContentAndStyles");async function qd(e,t={}){const r=[];e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(s,o,a)=>(r.push((async()=>{const n=`${o}:${a}`;return await Am(n)?await zi(n,void 0,{class:"label-icon"}):`<i class='${ae(s,t).replace(":"," ")}'></i>`})()),s));const i=await Promise.all(r);return e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>i.shift()??"")}u(qd,"replaceIconSubstring");var ye=u(async(e,t="",{style:r="",isTitle:i=!1,classes:s="",useHtmlLabels:o=!0,markdown:a=!0,isNode:n=!0,width:l=200,addSvgBackground:c=!1}={},h)=>{if(D.debug("XYZ createText",t,r,i,s,o,n,"addSvgBackground: ",c),o){const d=a?Ed(t,h):Ad(t),g=await qd(Ge(d),h),f=t.replace(/\\\\/g,"\\"),m={isNode:n,label:Ei(t)?f:g,labelStyle:r.replace("fill:","color:")};return await Dd(e,m,l,s,c,h)}else{const d=Ge(t.replace(/<br\s*\/?>/g,"<br/>")),g=a?Md(d.replace("<br>","<br/>"),h):Fd(d),f=Rd(l,e,g,t?c:!1,!n);if(n){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));const m=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");Tt(f).attr("style",m)}else{const m=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");Tt(f).select("rect").attr("style",m.replace(/background:/g,"fill:"));const y=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");Tt(f).select("text").attr("style",y)}return i?Tt(f).selectAll("tspan.text-outer-tspan").classed("title-row",!0):Tt(f).selectAll("tspan.text-outer-tspan").classed("row",!0),f}},"createText");function no(e,t,r){if(e&&e.length){const[i,s]=t,o=Math.PI/180*r,a=Math.cos(o),n=Math.sin(o);for(const l of e){const[c,h]=l;l[0]=(c-i)*a-(h-s)*n+i,l[1]=(c-i)*n+(h-s)*a+s}}}function w0(e,t){return e[0]===t[0]&&e[1]===t[1]}function S0(e,t,r,i=1){const s=r,o=Math.max(t,.1),a=e[0]&&e[0][0]&&typeof e[0][0]=="number"?[e]:e,n=[0,0];if(s)for(const c of a)no(c,n,s);const l=(function(c,h,d){const g=[];for(const k of c){const S=[...k];w0(S[0],S[S.length-1])||S.push([S[0][0],S[0][1]]),S.length>2&&g.push(S)}const f=[];h=Math.max(h,.1);const m=[];for(const k of g)for(let S=0;S<k.length-1;S++){const T=k[S],B=k[S+1];if(T[1]!==B[1]){const L=Math.min(T[1],B[1]);m.push({ymin:L,ymax:Math.max(T[1],B[1]),x:L===T[1]?T[0]:B[0],islope:(B[0]-T[0])/(B[1]-T[1])})}}if(m.sort(((k,S)=>k.ymin<S.ymin?-1:k.ymin>S.ymin?1:k.x<S.x?-1:k.x>S.x?1:k.ymax===S.ymax?0:(k.ymax-S.ymax)/Math.abs(k.ymax-S.ymax))),!m.length)return f;let y=[],C=m[0].ymin,x=0;for(;y.length||m.length;){if(m.length){let k=-1;for(let S=0;S<m.length&&!(m[S].ymin>C);S++)k=S;m.splice(0,k+1).forEach((S=>{y.push({s:C,edge:S})}))}if(y=y.filter((k=>!(k.edge.ymax<=C))),y.sort(((k,S)=>k.edge.x===S.edge.x?0:(k.edge.x-S.edge.x)/Math.abs(k.edge.x-S.edge.x))),(d!==1||x%h==0)&&y.length>1)for(let k=0;k<y.length;k+=2){const S=k+1;if(S>=y.length)break;const T=y[k].edge,B=y[S].edge;f.push([[Math.round(T.x),C],[Math.round(B.x),C]])}C+=d,y.forEach((k=>{k.edge.x=k.edge.x+d*k.edge.islope})),x++}return f})(a,o,i);if(s){for(const c of a)no(c,n,-s);(function(c,h,d){const g=[];c.forEach((f=>g.push(...f))),no(g,h,d)})(l,n,-s)}return l}function Yi(e,t){var r;const i=t.hachureAngle+90;let s=t.hachureGap;s<0&&(s=4*t.strokeWidth),s=Math.round(Math.max(s,.1));let o=1;return t.roughness>=1&&(((r=t.randomizer)===null||r===void 0?void 0:r.next())||Math.random())>.7&&(o=s),S0(e,s,i,o||1)}class an{constructor(t){this.helper=t}fillPolygons(t,r){return this._fillPolygons(t,r)}_fillPolygons(t,r){const i=Yi(t,r);return{type:"fillSketch",ops:this.renderLines(i,r)}}renderLines(t,r){const i=[];for(const s of t)i.push(...this.helper.doubleLineOps(s[0][0],s[0][1],s[1][0],s[1][1],r));return i}}function zs(e){const t=e[0],r=e[1];return Math.sqrt(Math.pow(t[0]-r[0],2)+Math.pow(t[1]-r[1],2))}class T0 extends an{fillPolygons(t,r){let i=r.hachureGap;i<0&&(i=4*r.strokeWidth),i=Math.max(i,.1);const s=Yi(t,Object.assign({},r,{hachureGap:i})),o=Math.PI/180*r.hachureAngle,a=[],n=.5*i*Math.cos(o),l=.5*i*Math.sin(o);for(const[c,h]of s)zs([c,h])&&a.push([[c[0]-n,c[1]+l],[...h]],[[c[0]+n,c[1]-l],[...h]]);return{type:"fillSketch",ops:this.renderLines(a,r)}}}class B0 extends an{fillPolygons(t,r){const i=this._fillPolygons(t,r),s=Object.assign({},r,{hachureAngle:r.hachureAngle+90}),o=this._fillPolygons(t,s);return i.ops=i.ops.concat(o.ops),i}}class _0{constructor(t){this.helper=t}fillPolygons(t,r){const i=Yi(t,r=Object.assign({},r,{hachureAngle:0}));return this.dotsOnLines(i,r)}dotsOnLines(t,r){const i=[];let s=r.hachureGap;s<0&&(s=4*r.strokeWidth),s=Math.max(s,.1);let o=r.fillWeight;o<0&&(o=r.strokeWidth/2);const a=s/4;for(const n of t){const l=zs(n),c=l/s,h=Math.ceil(c)-1,d=l-h*s,g=(n[0][0]+n[1][0])/2-s/4,f=Math.min(n[0][1],n[1][1]);for(let m=0;m<h;m++){const y=f+d+m*s,C=g-a+2*Math.random()*a,x=y-a+2*Math.random()*a,k=this.helper.ellipse(C,x,o,o,r);i.push(...k.ops)}}return{type:"fillSketch",ops:i}}}class v0{constructor(t){this.helper=t}fillPolygons(t,r){const i=Yi(t,r);return{type:"fillSketch",ops:this.dashedLine(i,r)}}dashedLine(t,r){const i=r.dashOffset<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashOffset,s=r.dashGap<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashGap,o=[];return t.forEach((a=>{const n=zs(a),l=Math.floor(n/(i+s)),c=(n+s-l*(i+s))/2;let h=a[0],d=a[1];h[0]>d[0]&&(h=a[1],d=a[0]);const g=Math.atan((d[1]-h[1])/(d[0]-h[0]));for(let f=0;f<l;f++){const m=f*(i+s),y=m+i,C=[h[0]+m*Math.cos(g)+c*Math.cos(g),h[1]+m*Math.sin(g)+c*Math.sin(g)],x=[h[0]+y*Math.cos(g)+c*Math.cos(g),h[1]+y*Math.sin(g)+c*Math.sin(g)];o.push(...this.helper.doubleLineOps(C[0],C[1],x[0],x[1],r))}})),o}}class L0{constructor(t){this.helper=t}fillPolygons(t,r){const i=r.hachureGap<0?4*r.strokeWidth:r.hachureGap,s=r.zigzagOffset<0?i:r.zigzagOffset,o=Yi(t,r=Object.assign({},r,{hachureGap:i+s}));return{type:"fillSketch",ops:this.zigzagLines(o,s,r)}}zigzagLines(t,r,i){const s=[];return t.forEach((o=>{const a=zs(o),n=Math.round(a/(2*r));let l=o[0],c=o[1];l[0]>c[0]&&(l=o[1],c=o[0]);const h=Math.atan((c[1]-l[1])/(c[0]-l[0]));for(let d=0;d<n;d++){const g=2*d*r,f=2*(d+1)*r,m=Math.sqrt(2*Math.pow(r,2)),y=[l[0]+g*Math.cos(h),l[1]+g*Math.sin(h)],C=[l[0]+f*Math.cos(h),l[1]+f*Math.sin(h)],x=[y[0]+m*Math.cos(h+Math.PI/4),y[1]+m*Math.sin(h+Math.PI/4)];s.push(...this.helper.doubleLineOps(y[0],y[1],x[0],x[1],i),...this.helper.doubleLineOps(x[0],x[1],C[0],C[1],i))}})),s}}const ee={};class F0{constructor(t){this.seed=t}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}}const M0=0,lo=1,Ll=2,Vi={A:7,a:7,C:6,c:6,H:1,h:1,L:2,l:2,M:2,m:2,Q:4,q:4,S:4,s:4,T:2,t:2,V:1,v:1,Z:0,z:0};function ho(e,t){return e.type===t}function nn(e){const t=[],r=(function(a){const n=new Array;for(;a!=="";)if(a.match(/^([ \t\r\n,]+)/))a=a.substr(RegExp.$1.length);else if(a.match(/^([aAcChHlLmMqQsStTvVzZ])/))n[n.length]={type:M0,text:RegExp.$1},a=a.substr(RegExp.$1.length);else{if(!a.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];n[n.length]={type:lo,text:`${parseFloat(RegExp.$1)}`},a=a.substr(RegExp.$1.length)}return n[n.length]={type:Ll,text:""},n})(e);let i="BOD",s=0,o=r[s];for(;!ho(o,Ll);){let a=0;const n=[];if(i==="BOD"){if(o.text!=="M"&&o.text!=="m")return nn("M0,0"+e);s++,a=Vi[o.text],i=o.text}else ho(o,lo)?a=Vi[i]:(s++,a=Vi[o.text],i=o.text);if(!(s+a<r.length))throw new Error("Path data ended short");for(let l=s;l<s+a;l++){const c=r[l];if(!ho(c,lo))throw new Error("Param not a number: "+i+","+c.text);n[n.length]=+c.text}if(typeof Vi[i]!="number")throw new Error("Bad segment: "+i);{const l={key:i,data:n};t.push(l),s+=a,o=r[s],i==="M"&&(i="L"),i==="m"&&(i="l")}}return t}function Nd(e){let t=0,r=0,i=0,s=0;const o=[];for(const{key:a,data:n}of e)switch(a){case"M":o.push({key:"M",data:[...n]}),[t,r]=n,[i,s]=n;break;case"m":t+=n[0],r+=n[1],o.push({key:"M",data:[t,r]}),i=t,s=r;break;case"L":o.push({key:"L",data:[...n]}),[t,r]=n;break;case"l":t+=n[0],r+=n[1],o.push({key:"L",data:[t,r]});break;case"C":o.push({key:"C",data:[...n]}),t=n[4],r=n[5];break;case"c":{const l=n.map(((c,h)=>h%2?c+r:c+t));o.push({key:"C",data:l}),t=l[4],r=l[5];break}case"Q":o.push({key:"Q",data:[...n]}),t=n[2],r=n[3];break;case"q":{const l=n.map(((c,h)=>h%2?c+r:c+t));o.push({key:"Q",data:l}),t=l[2],r=l[3];break}case"A":o.push({key:"A",data:[...n]}),t=n[5],r=n[6];break;case"a":t+=n[5],r+=n[6],o.push({key:"A",data:[n[0],n[1],n[2],n[3],n[4],t,r]});break;case"H":o.push({key:"H",data:[...n]}),t=n[0];break;case"h":t+=n[0],o.push({key:"H",data:[t]});break;case"V":o.push({key:"V",data:[...n]}),r=n[0];break;case"v":r+=n[0],o.push({key:"V",data:[r]});break;case"S":o.push({key:"S",data:[...n]}),t=n[2],r=n[3];break;case"s":{const l=n.map(((c,h)=>h%2?c+r:c+t));o.push({key:"S",data:l}),t=l[2],r=l[3];break}case"T":o.push({key:"T",data:[...n]}),t=n[0],r=n[1];break;case"t":t+=n[0],r+=n[1],o.push({key:"T",data:[t,r]});break;case"Z":case"z":o.push({key:"Z",data:[]}),t=i,r=s}return o}function Wd(e){const t=[];let r="",i=0,s=0,o=0,a=0,n=0,l=0;for(const{key:c,data:h}of e){switch(c){case"M":t.push({key:"M",data:[...h]}),[i,s]=h,[o,a]=h;break;case"C":t.push({key:"C",data:[...h]}),i=h[4],s=h[5],n=h[2],l=h[3];break;case"L":t.push({key:"L",data:[...h]}),[i,s]=h;break;case"H":i=h[0],t.push({key:"L",data:[i,s]});break;case"V":s=h[0],t.push({key:"L",data:[i,s]});break;case"S":{let d=0,g=0;r==="C"||r==="S"?(d=i+(i-n),g=s+(s-l)):(d=i,g=s),t.push({key:"C",data:[d,g,...h]}),n=h[0],l=h[1],i=h[2],s=h[3];break}case"T":{const[d,g]=h;let f=0,m=0;r==="Q"||r==="T"?(f=i+(i-n),m=s+(s-l)):(f=i,m=s);const y=i+2*(f-i)/3,C=s+2*(m-s)/3,x=d+2*(f-d)/3,k=g+2*(m-g)/3;t.push({key:"C",data:[y,C,x,k,d,g]}),n=f,l=m,i=d,s=g;break}case"Q":{const[d,g,f,m]=h,y=i+2*(d-i)/3,C=s+2*(g-s)/3,x=f+2*(d-f)/3,k=m+2*(g-m)/3;t.push({key:"C",data:[y,C,x,k,f,m]}),n=d,l=g,i=f,s=m;break}case"A":{const d=Math.abs(h[0]),g=Math.abs(h[1]),f=h[2],m=h[3],y=h[4],C=h[5],x=h[6];d===0||g===0?(t.push({key:"C",data:[i,s,C,x,C,x]}),i=C,s=x):(i!==C||s!==x)&&(zd(i,s,C,x,d,g,f,m,y).forEach((function(k){t.push({key:"C",data:k})})),i=C,s=x);break}case"Z":t.push({key:"Z",data:[]}),i=o,s=a}r=c}return t}function gi(e,t,r){return[e*Math.cos(r)-t*Math.sin(r),e*Math.sin(r)+t*Math.cos(r)]}function zd(e,t,r,i,s,o,a,n,l,c){const h=(d=a,Math.PI*d/180);var d;let g=[],f=0,m=0,y=0,C=0;if(c)[f,m,y,C]=c;else{[e,t]=gi(e,t,-h),[r,i]=gi(r,i,-h);const H=(e-r)/2,E=(t-i)/2;let O=H*H/(s*s)+E*E/(o*o);O>1&&(O=Math.sqrt(O),s*=O,o*=O);const _=s*s,R=o*o,$=_*R-_*E*E-R*H*H,J=_*E*E+R*H*H,Z=(n===l?-1:1)*Math.sqrt(Math.abs($/J));y=Z*s*E/o+(e+r)/2,C=Z*-o*H/s+(t+i)/2,f=Math.asin(parseFloat(((t-C)/o).toFixed(9))),m=Math.asin(parseFloat(((i-C)/o).toFixed(9))),e<y&&(f=Math.PI-f),r<y&&(m=Math.PI-m),f<0&&(f=2*Math.PI+f),m<0&&(m=2*Math.PI+m),l&&f>m&&(f-=2*Math.PI),!l&&m>f&&(m-=2*Math.PI)}let x=m-f;if(Math.abs(x)>120*Math.PI/180){const H=m,E=r,O=i;m=l&&m>f?f+120*Math.PI/180*1:f+120*Math.PI/180*-1,g=zd(r=y+s*Math.cos(m),i=C+o*Math.sin(m),E,O,s,o,a,0,l,[m,H,y,C])}x=m-f;const k=Math.cos(f),S=Math.sin(f),T=Math.cos(m),B=Math.sin(m),L=Math.tan(x/4),M=4/3*s*L,v=4/3*o*L,X=[e,t],z=[e+M*S,t-v*k],I=[r+M*B,i-v*T],et=[r,i];if(z[0]=2*X[0]-z[0],z[1]=2*X[1]-z[1],c)return[z,I,et].concat(g);{g=[z,I,et].concat(g);const H=[];for(let E=0;E<g.length;E+=3){const O=gi(g[E][0],g[E][1],h),_=gi(g[E+1][0],g[E+1][1],h),R=gi(g[E+2][0],g[E+2][1],h);H.push([O[0],O[1],_[0],_[1],R[0],R[1]])}return H}}const A0={randOffset:function(e,t){return yt(e,t)},randOffsetWithRange:function(e,t,r){return _s(e,t,r)},ellipse:function(e,t,r,i,s){const o=jd(r,i,s);return ha(e,t,s,o).opset},doubleLineOps:function(e,t,r,i,s){return Xe(e,t,r,i,s,!0)}};function Hd(e,t,r,i,s){return{type:"path",ops:Xe(e,t,r,i,s)}}function hs(e,t,r){const i=(e||[]).length;if(i>2){const s=[];for(let o=0;o<i-1;o++)s.push(...Xe(e[o][0],e[o][1],e[o+1][0],e[o+1][1],r));return t&&s.push(...Xe(e[i-1][0],e[i-1][1],e[0][0],e[0][1],r)),{type:"path",ops:s}}return i===2?Hd(e[0][0],e[0][1],e[1][0],e[1][1],r):{type:"path",ops:[]}}function E0(e,t,r,i,s){return(function(o,a){return hs(o,!0,a)})([[e,t],[e+r,t],[e+r,t+i],[e,t+i]],s)}function Fl(e,t){if(e.length){const r=typeof e[0][0]=="number"?[e]:e,i=Zi(r[0],1*(1+.2*t.roughness),t),s=t.disableMultiStroke?[]:Zi(r[0],1.5*(1+.22*t.roughness),El(t));for(let o=1;o<r.length;o++){const a=r[o];if(a.length){const n=Zi(a,1*(1+.2*t.roughness),t),l=t.disableMultiStroke?[]:Zi(a,1.5*(1+.22*t.roughness),El(t));for(const c of n)c.op!=="move"&&i.push(c);for(const c of l)c.op!=="move"&&s.push(c)}}return{type:"path",ops:i.concat(s)}}return{type:"path",ops:[]}}function jd(e,t,r){const i=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(e/2,2)+Math.pow(t/2,2))/2)),s=Math.ceil(Math.max(r.curveStepCount,r.curveStepCount/Math.sqrt(200)*i)),o=2*Math.PI/s;let a=Math.abs(e/2),n=Math.abs(t/2);const l=1-r.curveFitting;return a+=yt(a*l,r),n+=yt(n*l,r),{increment:o,rx:a,ry:n}}function ha(e,t,r,i){const[s,o]=$l(i.increment,e,t,i.rx,i.ry,1,i.increment*_s(.1,_s(.4,1,r),r),r);let a=vs(s,null,r);if(!r.disableMultiStroke&&r.roughness!==0){const[n]=$l(i.increment,e,t,i.rx,i.ry,1.5,0,r),l=vs(n,null,r);a=a.concat(l)}return{estimatedPoints:o,opset:{type:"path",ops:a}}}function Ml(e,t,r,i,s,o,a,n,l){const c=e,h=t;let d=Math.abs(r/2),g=Math.abs(i/2);d+=yt(.01*d,l),g+=yt(.01*g,l);let f=s,m=o;for(;f<0;)f+=2*Math.PI,m+=2*Math.PI;m-f>2*Math.PI&&(f=0,m=2*Math.PI);const y=2*Math.PI/l.curveStepCount,C=Math.min(y/2,(m-f)/2),x=Ol(C,c,h,d,g,f,m,1,l);if(!l.disableMultiStroke){const k=Ol(C,c,h,d,g,f,m,1.5,l);x.push(...k)}return a&&(n?x.push(...Xe(c,h,c+d*Math.cos(f),h+g*Math.sin(f),l),...Xe(c,h,c+d*Math.cos(m),h+g*Math.sin(m),l)):x.push({op:"lineTo",data:[c,h]},{op:"lineTo",data:[c+d*Math.cos(f),h+g*Math.sin(f)]})),{type:"path",ops:x}}function Al(e,t){const r=Wd(Nd(nn(e))),i=[];let s=[0,0],o=[0,0];for(const{key:a,data:n}of r)switch(a){case"M":o=[n[0],n[1]],s=[n[0],n[1]];break;case"L":i.push(...Xe(o[0],o[1],n[0],n[1],t)),o=[n[0],n[1]];break;case"C":{const[l,c,h,d,g,f]=n;i.push(...$0(l,c,h,d,g,f,o,t)),o=[g,f];break}case"Z":i.push(...Xe(o[0],o[1],s[0],s[1],t)),o=[s[0],s[1]]}return{type:"path",ops:i}}function co(e,t){const r=[];for(const i of e)if(i.length){const s=t.maxRandomnessOffset||0,o=i.length;if(o>2){r.push({op:"move",data:[i[0][0]+yt(s,t),i[0][1]+yt(s,t)]});for(let a=1;a<o;a++)r.push({op:"lineTo",data:[i[a][0]+yt(s,t),i[a][1]+yt(s,t)]})}}return{type:"fillPath",ops:r}}function wr(e,t){return(function(r,i){let s=r.fillStyle||"hachure";if(!ee[s])switch(s){case"zigzag":ee[s]||(ee[s]=new T0(i));break;case"cross-hatch":ee[s]||(ee[s]=new B0(i));break;case"dots":ee[s]||(ee[s]=new _0(i));break;case"dashed":ee[s]||(ee[s]=new v0(i));break;case"zigzag-line":ee[s]||(ee[s]=new L0(i));break;default:s="hachure",ee[s]||(ee[s]=new an(i))}return ee[s]})(t,A0).fillPolygons(e,t)}function El(e){const t=Object.assign({},e);return t.randomizer=void 0,e.seed&&(t.seed=e.seed+1),t}function Yd(e){return e.randomizer||(e.randomizer=new F0(e.seed||0)),e.randomizer.next()}function _s(e,t,r,i=1){return r.roughness*i*(Yd(r)*(t-e)+e)}function yt(e,t,r=1){return _s(-e,e,t,r)}function Xe(e,t,r,i,s,o=!1){const a=o?s.disableMultiStrokeFill:s.disableMultiStroke,n=ca(e,t,r,i,s,!0,!1);if(a)return n;const l=ca(e,t,r,i,s,!0,!0);return n.concat(l)}function ca(e,t,r,i,s,o,a){const n=Math.pow(e-r,2)+Math.pow(t-i,2),l=Math.sqrt(n);let c=1;c=l<200?1:l>500?.4:-.0016668*l+1.233334;let h=s.maxRandomnessOffset||0;h*h*100>n&&(h=l/10);const d=h/2,g=.2+.2*Yd(s);let f=s.bowing*s.maxRandomnessOffset*(i-t)/200,m=s.bowing*s.maxRandomnessOffset*(e-r)/200;f=yt(f,s,c),m=yt(m,s,c);const y=[],C=()=>yt(d,s,c),x=()=>yt(h,s,c),k=s.preserveVertices;return a?y.push({op:"move",data:[e+(k?0:C()),t+(k?0:C())]}):y.push({op:"move",data:[e+(k?0:yt(h,s,c)),t+(k?0:yt(h,s,c))]}),a?y.push({op:"bcurveTo",data:[f+e+(r-e)*g+C(),m+t+(i-t)*g+C(),f+e+2*(r-e)*g+C(),m+t+2*(i-t)*g+C(),r+(k?0:C()),i+(k?0:C())]}):y.push({op:"bcurveTo",data:[f+e+(r-e)*g+x(),m+t+(i-t)*g+x(),f+e+2*(r-e)*g+x(),m+t+2*(i-t)*g+x(),r+(k?0:x()),i+(k?0:x())]}),y}function Zi(e,t,r){if(!e.length)return[];const i=[];i.push([e[0][0]+yt(t,r),e[0][1]+yt(t,r)]),i.push([e[0][0]+yt(t,r),e[0][1]+yt(t,r)]);for(let s=1;s<e.length;s++)i.push([e[s][0]+yt(t,r),e[s][1]+yt(t,r)]),s===e.length-1&&i.push([e[s][0]+yt(t,r),e[s][1]+yt(t,r)]);return vs(i,null,r)}function vs(e,t,r){const i=e.length,s=[];if(i>3){const o=[],a=1-r.curveTightness;s.push({op:"move",data:[e[1][0],e[1][1]]});for(let n=1;n+2<i;n++){const l=e[n];o[0]=[l[0],l[1]],o[1]=[l[0]+(a*e[n+1][0]-a*e[n-1][0])/6,l[1]+(a*e[n+1][1]-a*e[n-1][1])/6],o[2]=[e[n+1][0]+(a*e[n][0]-a*e[n+2][0])/6,e[n+1][1]+(a*e[n][1]-a*e[n+2][1])/6],o[3]=[e[n+1][0],e[n+1][1]],s.push({op:"bcurveTo",data:[o[1][0],o[1][1],o[2][0],o[2][1],o[3][0],o[3][1]]})}}else i===3?(s.push({op:"move",data:[e[1][0],e[1][1]]}),s.push({op:"bcurveTo",data:[e[1][0],e[1][1],e[2][0],e[2][1],e[2][0],e[2][1]]})):i===2&&s.push(...ca(e[0][0],e[0][1],e[1][0],e[1][1],r,!0,!0));return s}function $l(e,t,r,i,s,o,a,n){const l=[],c=[];if(n.roughness===0){e/=4,c.push([t+i*Math.cos(-e),r+s*Math.sin(-e)]);for(let h=0;h<=2*Math.PI;h+=e){const d=[t+i*Math.cos(h),r+s*Math.sin(h)];l.push(d),c.push(d)}c.push([t+i*Math.cos(0),r+s*Math.sin(0)]),c.push([t+i*Math.cos(e),r+s*Math.sin(e)])}else{const h=yt(.5,n)-Math.PI/2;c.push([yt(o,n)+t+.9*i*Math.cos(h-e),yt(o,n)+r+.9*s*Math.sin(h-e)]);const d=2*Math.PI+h-.01;for(let g=h;g<d;g+=e){const f=[yt(o,n)+t+i*Math.cos(g),yt(o,n)+r+s*Math.sin(g)];l.push(f),c.push(f)}c.push([yt(o,n)+t+i*Math.cos(h+2*Math.PI+.5*a),yt(o,n)+r+s*Math.sin(h+2*Math.PI+.5*a)]),c.push([yt(o,n)+t+.98*i*Math.cos(h+a),yt(o,n)+r+.98*s*Math.sin(h+a)]),c.push([yt(o,n)+t+.9*i*Math.cos(h+.5*a),yt(o,n)+r+.9*s*Math.sin(h+.5*a)])}return[c,l]}function Ol(e,t,r,i,s,o,a,n,l){const c=o+yt(.1,l),h=[];h.push([yt(n,l)+t+.9*i*Math.cos(c-e),yt(n,l)+r+.9*s*Math.sin(c-e)]);for(let d=c;d<=a;d+=e)h.push([yt(n,l)+t+i*Math.cos(d),yt(n,l)+r+s*Math.sin(d)]);return h.push([t+i*Math.cos(a),r+s*Math.sin(a)]),h.push([t+i*Math.cos(a),r+s*Math.sin(a)]),vs(h,null,l)}function $0(e,t,r,i,s,o,a,n){const l=[],c=[n.maxRandomnessOffset||1,(n.maxRandomnessOffset||1)+.3];let h=[0,0];const d=n.disableMultiStroke?1:2,g=n.preserveVertices;for(let f=0;f<d;f++)f===0?l.push({op:"move",data:[a[0],a[1]]}):l.push({op:"move",data:[a[0]+(g?0:yt(c[0],n)),a[1]+(g?0:yt(c[0],n))]}),h=g?[s,o]:[s+yt(c[f],n),o+yt(c[f],n)],l.push({op:"bcurveTo",data:[e+yt(c[f],n),t+yt(c[f],n),r+yt(c[f],n),i+yt(c[f],n),h[0],h[1]]});return l}function pi(e){return[...e]}function Pl(e,t=0){const r=e.length;if(r<3)throw new Error("A curve must have at least three points.");const i=[];if(r===3)i.push(pi(e[0]),pi(e[1]),pi(e[2]),pi(e[2]));else{const s=[];s.push(e[0],e[0]);for(let n=1;n<e.length;n++)s.push(e[n]),n===e.length-1&&s.push(e[n]);const o=[],a=1-t;i.push(pi(s[0]));for(let n=1;n+2<s.length;n++){const l=s[n];o[0]=[l[0],l[1]],o[1]=[l[0]+(a*s[n+1][0]-a*s[n-1][0])/6,l[1]+(a*s[n+1][1]-a*s[n-1][1])/6],o[2]=[s[n+1][0]+(a*s[n][0]-a*s[n+2][0])/6,s[n+1][1]+(a*s[n][1]-a*s[n+2][1])/6],o[3]=[s[n+1][0],s[n+1][1]],i.push(o[1],o[2],o[3])}}return i}function cs(e,t){return Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)}function O0(e,t,r){const i=cs(t,r);if(i===0)return cs(e,t);let s=((e[0]-t[0])*(r[0]-t[0])+(e[1]-t[1])*(r[1]-t[1]))/i;return s=Math.max(0,Math.min(1,s)),cs(e,tr(t,r,s))}function tr(e,t,r){return[e[0]+(t[0]-e[0])*r,e[1]+(t[1]-e[1])*r]}function da(e,t,r,i){const s=i||[];if((function(n,l){const c=n[l+0],h=n[l+1],d=n[l+2],g=n[l+3];let f=3*h[0]-2*c[0]-g[0];f*=f;let m=3*h[1]-2*c[1]-g[1];m*=m;let y=3*d[0]-2*g[0]-c[0];y*=y;let C=3*d[1]-2*g[1]-c[1];return C*=C,f<y&&(f=y),m<C&&(m=C),f+m})(e,t)<r){const n=e[t+0];s.length?(o=s[s.length-1],a=n,Math.sqrt(cs(o,a))>1&&s.push(n)):s.push(n),s.push(e[t+3])}else{const l=e[t+0],c=e[t+1],h=e[t+2],d=e[t+3],g=tr(l,c,.5),f=tr(c,h,.5),m=tr(h,d,.5),y=tr(g,f,.5),C=tr(f,m,.5),x=tr(y,C,.5);da([l,g,y,x],0,r,s),da([x,C,m,d],0,r,s)}var o,a;return s}function P0(e,t){return Ls(e,0,e.length,t)}function Ls(e,t,r,i,s){const o=s||[],a=e[t],n=e[r-1];let l=0,c=1;for(let h=t+1;h<r-1;++h){const d=O0(e[h],a,n);d>l&&(l=d,c=h)}return Math.sqrt(l)>i?(Ls(e,t,c+1,i,o),Ls(e,c,r,i,o)):(o.length||o.push(a),o.push(n)),o}function uo(e,t=.15,r){const i=[],s=(e.length-1)/3;for(let o=0;o<s;o++)da(e,3*o,t,i);return r&&r>0?Ls(i,0,i.length,r):i}const se="none";class Fs{constructor(t){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:"#000",strokeWidth:1,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:"hachure",fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,seed:0,disableMultiStroke:!1,disableMultiStrokeFill:!1,preserveVertices:!1,fillShapeRoughnessGain:.8},this.config=t||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Math.floor(Math.random()*2**31)}_o(t){return t?Object.assign({},this.defaultOptions,t):this.defaultOptions}_d(t,r,i){return{shape:t,sets:r||[],options:i||this.defaultOptions}}line(t,r,i,s,o){const a=this._o(o);return this._d("line",[Hd(t,r,i,s,a)],a)}rectangle(t,r,i,s,o){const a=this._o(o),n=[],l=E0(t,r,i,s,a);if(a.fill){const c=[[t,r],[t+i,r],[t+i,r+s],[t,r+s]];a.fillStyle==="solid"?n.push(co([c],a)):n.push(wr([c],a))}return a.stroke!==se&&n.push(l),this._d("rectangle",n,a)}ellipse(t,r,i,s,o){const a=this._o(o),n=[],l=jd(i,s,a),c=ha(t,r,a,l);if(a.fill)if(a.fillStyle==="solid"){const h=ha(t,r,a,l).opset;h.type="fillPath",n.push(h)}else n.push(wr([c.estimatedPoints],a));return a.stroke!==se&&n.push(c.opset),this._d("ellipse",n,a)}circle(t,r,i,s){const o=this.ellipse(t,r,i,i,s);return o.shape="circle",o}linearPath(t,r){const i=this._o(r);return this._d("linearPath",[hs(t,!1,i)],i)}arc(t,r,i,s,o,a,n=!1,l){const c=this._o(l),h=[],d=Ml(t,r,i,s,o,a,n,!0,c);if(n&&c.fill)if(c.fillStyle==="solid"){const g=Object.assign({},c);g.disableMultiStroke=!0;const f=Ml(t,r,i,s,o,a,!0,!1,g);f.type="fillPath",h.push(f)}else h.push((function(g,f,m,y,C,x,k){const S=g,T=f;let B=Math.abs(m/2),L=Math.abs(y/2);B+=yt(.01*B,k),L+=yt(.01*L,k);let M=C,v=x;for(;M<0;)M+=2*Math.PI,v+=2*Math.PI;v-M>2*Math.PI&&(M=0,v=2*Math.PI);const X=(v-M)/k.curveStepCount,z=[];for(let I=M;I<=v;I+=X)z.push([S+B*Math.cos(I),T+L*Math.sin(I)]);return z.push([S+B*Math.cos(v),T+L*Math.sin(v)]),z.push([S,T]),wr([z],k)})(t,r,i,s,o,a,c));return c.stroke!==se&&h.push(d),this._d("arc",h,c)}curve(t,r){const i=this._o(r),s=[],o=Fl(t,i);if(i.fill&&i.fill!==se)if(i.fillStyle==="solid"){const a=Fl(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));s.push({type:"fillPath",ops:this._mergedShape(a.ops)})}else{const a=[],n=t;if(n.length){const l=typeof n[0][0]=="number"?[n]:n;for(const c of l)c.length<3?a.push(...c):c.length===3?a.push(...uo(Pl([c[0],c[0],c[1],c[2]]),10,(1+i.roughness)/2)):a.push(...uo(Pl(c),10,(1+i.roughness)/2))}a.length&&s.push(wr([a],i))}return i.stroke!==se&&s.push(o),this._d("curve",s,i)}polygon(t,r){const i=this._o(r),s=[],o=hs(t,!0,i);return i.fill&&(i.fillStyle==="solid"?s.push(co([t],i)):s.push(wr([t],i))),i.stroke!==se&&s.push(o),this._d("polygon",s,i)}path(t,r){const i=this._o(r),s=[];if(!t)return this._d("path",s,i);t=(t||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const o=i.fill&&i.fill!=="transparent"&&i.fill!==se,a=i.stroke!==se,n=!!(i.simplification&&i.simplification<1),l=(function(h,d,g){const f=Wd(Nd(nn(h))),m=[];let y=[],C=[0,0],x=[];const k=()=>{x.length>=4&&y.push(...uo(x,d)),x=[]},S=()=>{k(),y.length&&(m.push(y),y=[])};for(const{key:B,data:L}of f)switch(B){case"M":S(),C=[L[0],L[1]],y.push(C);break;case"L":k(),y.push([L[0],L[1]]);break;case"C":if(!x.length){const M=y.length?y[y.length-1]:C;x.push([M[0],M[1]])}x.push([L[0],L[1]]),x.push([L[2],L[3]]),x.push([L[4],L[5]]);break;case"Z":k(),y.push([C[0],C[1]])}if(S(),!g)return m;const T=[];for(const B of m){const L=P0(B,g);L.length&&T.push(L)}return T})(t,1,n?4-4*(i.simplification||1):(1+i.roughness)/2),c=Al(t,i);if(o)if(i.fillStyle==="solid")if(l.length===1){const h=Al(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));s.push({type:"fillPath",ops:this._mergedShape(h.ops)})}else s.push(co(l,i));else s.push(wr(l,i));return a&&(n?l.forEach((h=>{s.push(hs(h,!1,i))})):s.push(c)),this._d("path",s,i)}opsToPath(t,r){let i="";for(const s of t.ops){const o=typeof r=="number"&&r>=0?s.data.map((a=>+a.toFixed(r))):s.data;switch(s.op){case"move":i+=`M${o[0]} ${o[1]} `;break;case"bcurveTo":i+=`C${o[0]} ${o[1]}, ${o[2]} ${o[3]}, ${o[4]} ${o[5]} `;break;case"lineTo":i+=`L${o[0]} ${o[1]} `}}return i.trim()}toPaths(t){const r=t.sets||[],i=t.options||this.defaultOptions,s=[];for(const o of r){let a=null;switch(o.type){case"path":a={d:this.opsToPath(o),stroke:i.stroke,strokeWidth:i.strokeWidth,fill:se};break;case"fillPath":a={d:this.opsToPath(o),stroke:se,strokeWidth:0,fill:i.fill||se};break;case"fillSketch":a=this.fillSketch(o,i)}a&&s.push(a)}return s}fillSketch(t,r){let i=r.fillWeight;return i<0&&(i=r.strokeWidth/2),{d:this.opsToPath(t),stroke:r.fill||se,strokeWidth:i,fill:se}}_mergedShape(t){return t.filter(((r,i)=>i===0||r.op!=="move"))}}class D0{constructor(t,r){this.canvas=t,this.ctx=this.canvas.getContext("2d"),this.gen=new Fs(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),s=this.ctx,o=t.options.fixedDecimalPlaceDigits;for(const a of r)switch(a.type){case"path":s.save(),s.strokeStyle=i.stroke==="none"?"transparent":i.stroke,s.lineWidth=i.strokeWidth,i.strokeLineDash&&s.setLineDash(i.strokeLineDash),i.strokeLineDashOffset&&(s.lineDashOffset=i.strokeLineDashOffset),this._drawToContext(s,a,o),s.restore();break;case"fillPath":{s.save(),s.fillStyle=i.fill||"";const n=t.shape==="curve"||t.shape==="polygon"||t.shape==="path"?"evenodd":"nonzero";this._drawToContext(s,a,o,n),s.restore();break}case"fillSketch":this.fillSketch(s,a,i)}}fillSketch(t,r,i){let s=i.fillWeight;s<0&&(s=i.strokeWidth/2),t.save(),i.fillLineDash&&t.setLineDash(i.fillLineDash),i.fillLineDashOffset&&(t.lineDashOffset=i.fillLineDashOffset),t.strokeStyle=i.fill||"",t.lineWidth=s,this._drawToContext(t,r,i.fixedDecimalPlaceDigits),t.restore()}_drawToContext(t,r,i,s="nonzero"){t.beginPath();for(const o of r.ops){const a=typeof i=="number"&&i>=0?o.data.map((n=>+n.toFixed(i))):o.data;switch(o.op){case"move":t.moveTo(a[0],a[1]);break;case"bcurveTo":t.bezierCurveTo(a[0],a[1],a[2],a[3],a[4],a[5]);break;case"lineTo":t.lineTo(a[0],a[1])}}r.type==="fillPath"?t.fill(s):t.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(t,r,i,s,o){const a=this.gen.line(t,r,i,s,o);return this.draw(a),a}rectangle(t,r,i,s,o){const a=this.gen.rectangle(t,r,i,s,o);return this.draw(a),a}ellipse(t,r,i,s,o){const a=this.gen.ellipse(t,r,i,s,o);return this.draw(a),a}circle(t,r,i,s){const o=this.gen.circle(t,r,i,s);return this.draw(o),o}linearPath(t,r){const i=this.gen.linearPath(t,r);return this.draw(i),i}polygon(t,r){const i=this.gen.polygon(t,r);return this.draw(i),i}arc(t,r,i,s,o,a,n=!1,l){const c=this.gen.arc(t,r,i,s,o,a,n,l);return this.draw(c),c}curve(t,r){const i=this.gen.curve(t,r);return this.draw(i),i}path(t,r){const i=this.gen.path(t,r);return this.draw(i),i}}const Ki="http://www.w3.org/2000/svg";class I0{constructor(t,r){this.svg=t,this.gen=new Fs(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),s=this.svg.ownerDocument||window.document,o=s.createElementNS(Ki,"g"),a=t.options.fixedDecimalPlaceDigits;for(const n of r){let l=null;switch(n.type){case"path":l=s.createElementNS(Ki,"path"),l.setAttribute("d",this.opsToPath(n,a)),l.setAttribute("stroke",i.stroke),l.setAttribute("stroke-width",i.strokeWidth+""),l.setAttribute("fill","none"),i.strokeLineDash&&l.setAttribute("stroke-dasharray",i.strokeLineDash.join(" ").trim()),i.strokeLineDashOffset&&l.setAttribute("stroke-dashoffset",`${i.strokeLineDashOffset}`);break;case"fillPath":l=s.createElementNS(Ki,"path"),l.setAttribute("d",this.opsToPath(n,a)),l.setAttribute("stroke","none"),l.setAttribute("stroke-width","0"),l.setAttribute("fill",i.fill||""),t.shape!=="curve"&&t.shape!=="polygon"||l.setAttribute("fill-rule","evenodd");break;case"fillSketch":l=this.fillSketch(s,n,i)}l&&o.appendChild(l)}return o}fillSketch(t,r,i){let s=i.fillWeight;s<0&&(s=i.strokeWidth/2);const o=t.createElementNS(Ki,"path");return o.setAttribute("d",this.opsToPath(r,i.fixedDecimalPlaceDigits)),o.setAttribute("stroke",i.fill||""),o.setAttribute("stroke-width",s+""),o.setAttribute("fill","none"),i.fillLineDash&&o.setAttribute("stroke-dasharray",i.fillLineDash.join(" ").trim()),i.fillLineDashOffset&&o.setAttribute("stroke-dashoffset",`${i.fillLineDashOffset}`),o}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(t,r){return this.gen.opsToPath(t,r)}line(t,r,i,s,o){const a=this.gen.line(t,r,i,s,o);return this.draw(a)}rectangle(t,r,i,s,o){const a=this.gen.rectangle(t,r,i,s,o);return this.draw(a)}ellipse(t,r,i,s,o){const a=this.gen.ellipse(t,r,i,s,o);return this.draw(a)}circle(t,r,i,s){const o=this.gen.circle(t,r,i,s);return this.draw(o)}linearPath(t,r){const i=this.gen.linearPath(t,r);return this.draw(i)}polygon(t,r){const i=this.gen.polygon(t,r);return this.draw(i)}arc(t,r,i,s,o,a,n=!1,l){const c=this.gen.arc(t,r,i,s,o,a,n,l);return this.draw(c)}curve(t,r){const i=this.gen.curve(t,r);return this.draw(i)}path(t,r){const i=this.gen.path(t,r);return this.draw(i)}}var st={canvas:(e,t)=>new D0(e,t),svg:(e,t)=>new I0(e,t),generator:e=>new Fs(e),newSeed:()=>Fs.newSeed()},R0=1,q0=3;async function ln(e){const t=e.getElementsByTagName("img");if(!t||t.length===0)return;const r=!hn(e);await Promise.all([...t].map(i=>new Promise(s=>{function o(){if(i.style.display="flex",i.style.flexDirection="column",r){const a=_t().fontSize?_t().fontSize:window.getComputedStyle(document.body).fontSize,n=5,[l=gc.fontSize]=Is(a),c=l*n+"px";i.style.minWidth=c,i.style.maxWidth=c}else i.style.width="100%";s(i)}u(o,"setupImage"),setTimeout(()=>{i.complete&&o()}),i.addEventListener("error",o),i.addEventListener("load",o)})))}u(ln,"configureLabelImages");function hn(e){return e.nodeType===q0?e.textContent?.trim()!=="":e.nodeType!==R0||e.tagName.toLowerCase()==="img"?!1:[...e.childNodes].some(hn)}u(hn,"hasTextBesidesImages");var Dl=3,N0=32,W0=u(async(e,t,r)=>{const i=_t(),s=e.insert("g").attr("class",r??"node default").attr("id",t.domId||t.id),o=s.insert("g").attr("class","label").attr("style",zt(t.labelStyle)),n=[{text:typeof t.label=="string"?t.label:t.label?.[0]??"",cssClass:"c4-name"},{text:t.stereotype,cssClass:"c4-type"},...(t.description??[]).map(x=>({text:x,cssClass:"c4-descr"}))].filter(x=>x.text),l=t.width?Math.max(t.width-2*(t.padding??0),N0):_t().flowchart?.wrappingWidth??200,h=i.c4?.wrap??!0?l:Number.POSITIVE_INFINITY,d=await Promise.all(n.map(async x=>{const k=o.append("g").attr("class",x.cssClass),S=await ye(k,ae(Ge(x.text??""),i),{useHtmlLabels:!1,markdown:!1,isNode:!0,width:h,style:t.labelStyle},i);return Tt(S).selectAll("tspan.text-outer-tspan").attr("text-anchor","middle"),Tt(S).selectAll("tspan.text-inner-tspan").attr("font-weight",null).attr("font-style",null),{el:k,box:k.node().getBBox()}})),g=Math.max(...d.map(({box:x})=>x.width),0);let f=0;for(const{el:x,box:k}of d)x.attr("transform",`translate(${g/2-k.x-k.width/2}, ${f-k.y})`),f+=k.height+Dl;const m=d.length>0?f-Dl:0;o.insert("rect",":first-child"),o.attr("transform",`translate(${-g/2}, ${-m/2})`);const y=o.node().getBBox(),C=(t.padding??0)/2;return{shapeSvg:s,bbox:y,halfPadding:C,label:o}},"c4LabelHelper"),ct=u(async(e,t,r)=>{if(t.stereotype!==void 0)return W0(e,t,r);let i;const s=t.useHtmlLabels||Le(_t()?.htmlLabels);r?i=r:i="node default";const o=e.insert("g").attr("class",i).attr("id",t.domId||t.id),a=o.insert("g").attr("class","label").attr("style",zt(t.labelStyle));let n;t.label===void 0?n="":n=typeof t.label=="string"?t.label:t.label[0];const l=!!t.icon||!!t.img,c=t.labelType==="markdown",h=await ye(a,ae(Ge(n),_t()),{useHtmlLabels:s,width:t.width||t.wrappingWidth||_t().flowchart?.wrappingWidth,classes:c?"markdown-node-label":"",style:t.labelStyle,addSvgBackground:l,markdown:c},_t()),d=(t?.padding??0)/2;let g;if(s){const f=h.children[0],m=Tt(h);await ln(f),g=await nr.measure(()=>f.getBoundingClientRect()),m.attr("width",g.width),m.attr("height",g.height)}else g=await nr.measure(()=>h.getBBox());return s?a.attr("transform","translate("+-g.width/2+", "+-g.height/2+")"):a.attr("transform","translate(0, "+-g.height/2+")"),t.centerLabel&&a.attr("transform","translate("+-g.width/2+", "+-g.height/2+")"),a.insert("rect",":first-child"),{shapeSvg:o,bbox:g,halfPadding:d,label:a}},"labelHelper"),go=u(async(e,t,r)=>{const i=r.useHtmlLabels??Kt(_t()),s=e.insert("g").attr("class","label").attr("style",r.labelStyle||""),o=await ye(s,ae(Ge(t),_t()),{useHtmlLabels:i,width:r.width||_t()?.flowchart?.wrappingWidth,style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img}),a=r.padding/2;let n;if(Kt(_t())){const l=o.children[0],c=Tt(o);n=await nr.measure(()=>l.getBoundingClientRect()),c.attr("width",n.width),c.attr("height",n.height)}else n=await nr.measure(()=>o.getBBox());return i?s.attr("transform","translate("+-n.width/2+", "+-n.height/2+")"):s.attr("transform","translate(0, "+-n.height/2+")"),r.centerLabel&&s.attr("transform","translate("+-n.width/2+", "+-n.height/2+")"),s.insert("rect",":first-child"),{shapeSvg:e,bbox:n,halfPadding:a,label:s}},"insertLabel"),at=u((e,t,r)=>{if(r){e.width=r.width,e.height=r.height;return}const i=t.node().getBBox();e.width=i.width,e.height=i.height},"updateNodeBounds"),dt=u((e,t)=>(e.look==="handDrawn"?"rough-node":"node")+" "+e.cssClasses+" "+(t||""),"getNodeClasses");function Mt(e){const t=e.map((r,i)=>`${i===0?"M":"L"}${r.x},${r.y}`);return t.push("Z"),t.join(" ")}u(Mt,"createPathFromPoints");function Ve(e,t,r,i,s,o){const a=[],l=r-e,c=i-t,h=l/o,d=2*Math.PI/h,g=t+c/2;for(let f=0;f<=50;f++){const m=f/50,y=e+m*l,C=g+s*Math.sin(d*(y-e));a.push({x:y,y:C})}return a}u(Ve,"generateFullSineWavePoints");function Se(e,t,r,i,s,o){const a=[],n=s*Math.PI/180,h=(o*Math.PI/180-n)/(i-1);for(let d=0;d<i;d++){const g=n+d*h,f=e+r*Math.cos(g),m=t+r*Math.sin(g);a.push({x:-f,y:-m})}return a}u(Se,"generateCirclePoints");function ua(e){const t=Array.from(e.childNodes).filter(l=>l.tagName==="path"),r=document.createElementNS("http://www.w3.org/2000/svg","path"),i=t.map(l=>l.getAttribute("d")).filter(l=>l!==null).join(" ");r.setAttribute("d",i);const s=t.find(l=>l.getAttribute("fill")!=="none"),o=t.find(l=>l.getAttribute("stroke")!=="none"),a=u((l,c)=>l?.getAttribute(c)??void 0,"getAttr");if(s){const l={fill:a(s,"fill"),"fill-opacity":a(s,"fill-opacity")??"1"};Object.entries(l).forEach(([c,h])=>{h&&r.setAttribute(c,h)})}if(o){const l={stroke:a(o,"stroke"),"stroke-width":a(o,"stroke-width")??"1","stroke-opacity":a(o,"stroke-opacity")??"1"};Object.entries(l).forEach(([c,h])=>{h&&r.setAttribute(c,h)})}const n=document.createElementNS("http://www.w3.org/2000/svg","g");return n.appendChild(r),n}u(ua,"mergePaths");var z0=u((e,t)=>{var r=e.x,i=e.y,s=t.x-r,o=t.y-i,a=e.width/2,n=e.height/2,l,c;return Math.abs(o)*a>Math.abs(s)*n?(o<0&&(n=-n),l=o===0?0:n*s/o,c=n):(s<0&&(a=-a),l=a,c=s===0?0:a*o/s),{x:r+l,y:i+c}},"intersectRect"),ur=z0,le=u((e,t,r,i,s)=>["M",e+s,t,"H",e+r-s,"A",s,s,0,0,1,e+r,t+s,"V",t+i-s,"A",s,s,0,0,1,e+r-s,t+i,"H",e+s,"A",s,s,0,0,1,e,t+i-s,"V",t+s,"A",s,s,0,0,1,e+s,t,"Z"].join(" "),"createRoundedRectPathD"),H0=u(async(e,t,r,i=!1,s=!1)=>{let o=t||"";typeof o=="object"&&(o=o[0]);const a=_t(),n=Kt(a);return await ye(e,o,{style:r,isTitle:i,useHtmlLabels:n,markdown:!1,isNode:s,width:Number.POSITIVE_INFINITY},a)},"createLabel"),He=H0;function Ud(e,t){return e.intersect(t)}u(Ud,"intersectNode");var j0=Ud;function Gd(e,t,r,i){var s=e.x,o=e.y,a=s-i.x,n=o-i.y,l=Math.sqrt(t*t*n*n+r*r*a*a),c=Math.abs(t*r*a/l);i.x<s&&(c=-c);var h=Math.abs(t*r*n/l);return i.y<o&&(h=-h),{x:s+c,y:o+h}}u(Gd,"intersectEllipse");var Xd=Gd;function Vd(e,t,r){return Xd(e,t,t,r)}u(Vd,"intersectCircle");var Y0=Vd;function Zd(e,t,r,i){{const s=t.y-e.y,o=e.x-t.x,a=t.x*e.y-e.x*t.y,n=s*r.x+o*r.y+a,l=s*i.x+o*i.y+a,c=1e-6;if(n!==0&&l!==0&&ga(n,l))return;const h=i.y-r.y,d=r.x-i.x,g=i.x*r.y-r.x*i.y,f=h*e.x+d*e.y+g,m=h*t.x+d*t.y+g;if(Math.abs(f)<c&&Math.abs(m)<c&&ga(f,m))return;const y=s*d-h*o;if(y===0)return;const C=Math.abs(y/2);let x=o*g-d*a;const k=x<0?(x-C)/y:(x+C)/y;x=h*a-s*g;const S=x<0?(x-C)/y:(x+C)/y;return{x:k,y:S}}}u(Zd,"intersectLine");function ga(e,t){return e*t>0}u(ga,"sameSign");var U0=Zd;function Kd(e,t,r){let i=e.x,s=e.y,o=[],a=Number.POSITIVE_INFINITY,n=Number.POSITIVE_INFINITY;typeof t.forEach=="function"?t.forEach(function(h){a=Math.min(a,h.x),n=Math.min(n,h.y)}):(a=Math.min(a,t.x),n=Math.min(n,t.y));let l=i-e.width/2-a,c=s-e.height/2-n;for(let h=0;h<t.length;h++){let d=t[h],g=t[h<t.length-1?h+1:0],f=U0(e,r,{x:l+d.x,y:c+d.y},{x:l+g.x,y:c+g.y});f&&o.push(f)}return o.length?(o.length>1&&o.sort(function(h,d){let g=h.x-r.x,f=h.y-r.y,m=Math.sqrt(g*g+f*f),y=d.x-r.x,C=d.y-r.y,x=Math.sqrt(y*y+C*C);return m<x?-1:m===x?0:1}),o[0]):e}u(Kd,"intersectPolygon");var G0=Kd,rt={node:j0,circle:Y0,ellipse:Xd,polygon:G0,rect:ur};function Qd(e,t){const{labelStyles:r}=nt(t);t.labelStyle=r;const i=dt(t);let s=i;i||(s="anchor");const o=e.insert("g").attr("class",s).attr("id",t.domId||t.id),a=1,{cssStyles:n}=t,l=st.svg(o),c=it(t,{fill:"black",stroke:"none",fillStyle:"solid"});t.look!=="handDrawn"&&(c.roughness=0);const h=l.circle(0,0,a*2,c),d=o.insert(()=>h,":first-child");return d.attr("class","anchor").attr("style",zt(n)),at(t,d),t.intersect=function(g){return D.info("Circle intersect",t,a,g),rt.circle(t,a,g)},o}u(Qd,"anchor");function pa(e,t,r,i,s,o,a){const l=(e+r)/2,c=(t+i)/2,h=Math.atan2(i-t,r-e),d=(r-e)/2,g=(i-t)/2,f=d/s,m=g/o,y=Math.sqrt(f**2+m**2);if(y>1)throw new Error("The given radii are too small to create an arc between the points.");const C=Math.sqrt(1-y**2),x=l+C*o*Math.sin(h)*(a?-1:1),k=c-C*s*Math.cos(h)*(a?-1:1),S=Math.atan2((t-k)/o,(e-x)/s);let B=Math.atan2((i-k)/o,(r-x)/s)-S;a&&B<0&&(B+=2*Math.PI),!a&&B>0&&(B-=2*Math.PI);const L=[];for(let M=0;M<20;M++){const v=M/19,X=S+v*B,z=x+s*Math.cos(X),I=k+o*Math.sin(X);L.push({x:z,y:I})}return L}u(pa,"generateArcPoints");function Jd(e,t,r){const[i,s]=[t,r].sort((o,a)=>a-o);return s*(1-Math.sqrt(1-(e/i/2)**2))}u(Jd,"calculateArcSagitta");async function tu(e,t){const{labelStyles:r,nodeStyles:i}=nt(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?16:s,a=t.look==="neo"?12:s,n=u(X=>X+a,"calcTotalHeight"),l=u(X=>{const z=X/2;return[z/(2.5+X/50),z]},"calcEllipseRadius"),{shapeSvg:c,bbox:h}=await ct(e,t,dt(t)),d=n(t?.height?t?.height:h.height),[g,f]=l(d),m=Jd(d,g,f),C=(t?.width?t?.width:h.width)+o*2+m-m,x=d,{cssStyles:k}=t,S=[{x:C/2,y:-x/2},{x:-C/2,y:-x/2},...pa(-C/2,-x/2,-C/2,x/2,g,f,!1),{x:C/2,y:x/2},...pa(C/2,x/2,C/2,-x/2,g,f,!0)],T=st.svg(c),B=it(t,{});t.look!=="handDrawn"&&(B.roughness=0,B.fillStyle="solid");const L=Mt(S),M=T.path(L,B),v=c.insert(()=>M,":first-child");return v.attr("class","basic label-container outer-path"),k&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",k),i&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",i),v.attr("transform",`translate(${g/2}, 0)`),at(t,v),t.intersect=function(X){return rt.polygon(t,S,X)},c}u(tu,"bowTieRect");async function eu(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:s}=nt(t);t.labelStyle=i;const{shapeSvg:o,bbox:a,label:n}=await ct(e,t,dt(t)),l=r?.nodeBorder??r?.lineColor??"currentColor",c=t.padding??12,h=Math.max(a.width+c*2,t.width??0,80),d=Math.max(Math.min(h*.08,12),5),g=Math.max(a.height+c*2+d,t.height??0),f=-g/2+d,m=g/2,y=h*.72,C=[`M${-h/2},${f}`,`L${-y/2},${m}`,`A${y/2},${d} 0 0 0 ${y/2},${m}`,`L${h/2},${f}`,`A${h/2},${d} 0 0 0 ${-h/2},${f}`,"Z"].join(" "),{cssStyles:x}=t,k=o.insert("g",":first-child").attr("class","basic label-container");if(t.look==="handDrawn"){const v=st.svg(o).path(C,it(t,{}));k.node()?.appendChild(v),x&&k.attr("style",x)}else k.append("path").attr("d",C).attr("style",s);k.append("ellipse").attr("cx",0).attr("cy",f).attr("rx",h/2).attr("ry",d).attr("style",`fill:none;stroke:${l};stroke-width:1px`),at(t,k);const S=f+(m-f)/2;n.attr("transform",`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${S-a.height/2-(a.y-(a.top??0))})`);const T=12,B=u((M,v,X)=>Array.from({length:T+1},(z,I)=>{const et=Math.PI-I*Math.PI/T;return{x:M*Math.cos(et),y:v+X*d*Math.sin(et)}}),"arc"),L=[...B(h/2,f,-1),...B(y/2,m,1).reverse()];return t.intersect=function(M){return rt.polygon(t,L,M)},o}u(eu,"bucket");var Il=20,Rl=8,X0=80,po=8;async function ru(e,t){const{themeVariables:r}=_t(),i=r.clusterBkg,s=r.clusterBorder,{nodeStyles:o}=nt(t),{shapeSvg:a,bbox:n}=await ct(e,t,dt(t)),l=t.padding??8,c=n.height,h=Math.max(n.width+l*2,X0,t?.width??0),d=Math.max(c+Rl+Il+l*2,t?.height??0),g=-h/2,f=-d/2,m=-28/2,y=a.select(".label");y&&(t.useHtmlLabels??Kt(_t())?y.attr("transform",`translate(${-n.width/2}, ${-n.height/2+m})`):y.attr("transform",`translate(0, ${-n.height/2+m})`));let C;if(t.look==="handDrawn"){const B=st.svg(a),L=it(t,{fill:i,stroke:s,fillStyle:"solid"}),M=B.path(le(g,f,h,d,po),L);C=a.insert(()=>M,":first-child"),C.attr("class","basic label-container collapsed-group").attr("style",zt(t.cssStyles))}else C=a.insert("rect",":first-child"),C.attr("class","basic label-container collapsed-group").attr("style",o).attr("rx",po).attr("ry",po).attr("x",g).attr("y",f).attr("width",h).attr("height",d).attr("fill",i).attr("stroke",s);const x=f+l+c+Rl;a.append("line").attr("class","collapsed-separator").attr("x1",g+8).attr("y1",x).attr("x2",g+h-8).attr("y2",x).attr("stroke",s).attr("stroke-dasharray","3, 3");const k=x+Il/2,S=2.5,T=10;for(let B=-1;B<=1;B++)a.append("circle").attr("class","collapsed-indicator").attr("cx",B*T).attr("cy",k).attr("r",S).attr("fill",s);return at(t,C),t.calcIntersect=function(B,L){return rt.rect(B,L)},t.intersect=function(B){return rt.rect(t,B)},a}u(ru,"collapsedGroup");function Fe(e,t,r,i){return e.insert("polygon",":first-child").attr("points",i.map(function(s){return s.x+","+s.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+r/2+")")}u(Fe,"insertPolygonShape");var V0=["right","left","up","down"],cn="point",Z0=u(e=>{const t=new Set;for(const r of e)switch(r){case"x":t.add("right"),t.add("left");break;case"y":t.add("up"),t.add("down");break;default:t.add(r);break}return t},"expandAndDeduplicateDirections"),K0=u(e=>V0.filter(t=>e.has(t)).join("|")||cn,"getDirectionKey"),ql={"right|left|up|down":u(({height:e,midpoint:t,padding:r,width:i})=>[{x:0,y:0},{x:t,y:0},{x:i/2,y:2*r},{x:i-t,y:0},{x:i,y:0},{x:i,y:-e/3},{x:i+2*r,y:-e/2},{x:i,y:-2*e/3},{x:i,y:-e},{x:i-t,y:-e},{x:i/2,y:-e-2*r},{x:t,y:-e},{x:0,y:-e},{x:0,y:-2*e/3},{x:-2*r,y:-e/2},{x:0,y:-e/3}],"right|left|up|down"),"right|left|up":u(({height:e,midpoint:t,width:r})=>[{x:t,y:0},{x:r-t,y:0},{x:r,y:-e/2},{x:r-t,y:-e},{x:t,y:-e},{x:0,y:-e/2}],"right|left|up"),"right|left|down":u(({height:e,midpoint:t,width:r})=>[{x:0,y:0},{x:t,y:-e},{x:r-t,y:-e},{x:r,y:0}],"right|left|down"),"right|up|down":u(({height:e,midpoint:t,width:r})=>[{x:0,y:0},{x:r,y:-t},{x:r,y:-e+t},{x:0,y:-e}],"right|up|down"),"left|up|down":u(({height:e,midpoint:t,width:r})=>[{x:r,y:0},{x:0,y:-t},{x:0,y:-e+t},{x:r,y:-e}],"left|up|down"),"right|left":u(({height:e,midpoint:t,padding:r,width:i})=>[{x:t,y:0},{x:t,y:-r},{x:i-t,y:-r},{x:i-t,y:0},{x:i,y:-e/2},{x:i-t,y:-e},{x:i-t,y:-e+r},{x:t,y:-e+r},{x:t,y:-e},{x:0,y:-e/2}],"right|left"),"up|down":u(({height:e,midpoint:t,padding:r,width:i})=>[{x:i/2,y:0},{x:0,y:-r},{x:t,y:-r},{x:t,y:-e+r},{x:0,y:-e+r},{x:i/2,y:-e},{x:i,y:-e+r},{x:i-t,y:-e+r},{x:i-t,y:-r},{x:i,y:-r}],"up|down"),"right|up":u(({height:e,midpoint:t,width:r})=>[{x:0,y:0},{x:r,y:-t},{x:0,y:-e}],"right|up"),"right|down":u(({height:e,width:t})=>[{x:0,y:0},{x:t,y:0},{x:0,y:-e}],"right|down"),"left|up":u(({height:e,midpoint:t,width:r})=>[{x:r,y:0},{x:0,y:-t},{x:r,y:-e}],"left|up"),"left|down":u(({height:e,width:t})=>[{x:t,y:0},{x:0,y:0},{x:t,y:-e}],"left|down"),right:u(({height:e,midpoint:t,padding:r,width:i})=>[{x:t,y:-r},{x:t,y:-r},{x:i-t,y:-r},{x:i-t,y:0},{x:i,y:-e/2},{x:i-t,y:-e},{x:i-t,y:-e+r},{x:t,y:-e+r},{x:t,y:-e+r}],"right"),left:u(({height:e,midpoint:t,padding:r,width:i})=>[{x:t,y:0},{x:t,y:-r},{x:i-t,y:-r},{x:i-t,y:-e+r},{x:t,y:-e+r},{x:t,y:-e},{x:0,y:-e/2}],"left"),up:u(({height:e,midpoint:t,padding:r,width:i})=>[{x:t,y:-r},{x:t,y:-e+r},{x:0,y:-e+r},{x:i/2,y:-e},{x:i,y:-e+r},{x:i-t,y:-e+r},{x:i-t,y:-r}],"up"),down:u(({height:e,midpoint:t,padding:r,width:i})=>[{x:i/2,y:0},{x:0,y:-r},{x:t,y:-r},{x:t,y:-e+r},{x:i-t,y:-e+r},{x:i-t,y:-r},{x:i,y:-r}],"down"),[cn]:()=>[{x:0,y:0}]},Q0=u((e,t,r,i)=>{const s=Z0(e),o=(r.padding??0)/2,a=t.height+4*o,n=a/2,l=i??t.width+2*n+2*o,c=K0(s);return(ql[c]??ql[cn])({height:a,midpoint:n,padding:o,width:l})},"getArrowPoints");async function iu(e,t){const r=t,{shapeSvg:i,bbox:s}=await ct(e,r,dt(r)),o=r.padding??0,a=s.height+2*o,n=a/2,l=s.width+2*n+o,c=r.width??0,d=r.positioned&&(r.widthInColumns??1)>1&&c>l?c:l,g=Q0(r.directions??[],s,r,d),f=Fe(i,d,a,g);return f.attr("style",r.style??null),at(r,f),r.intersect=function(m){return rt.polygon(r,g,m)},i}u(iu,"block_arrow");async function su(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:s}=nt(t);t.labelStyle=i;const{shapeSvg:o,bbox:a,label:n}=await ct(e,t,dt(t)),l=r?.nodeBorder??r?.lineColor??"currentColor",c=t.padding??12,h=18,d=12,g=Math.max(a.width+c*2,t.width??0,90),f=Math.max(a.height+c*2+h,t.height??0),m=-f/2,{cssStyles:y}=t,C=o.insert("g",":first-child").attr("class","basic label-container");if(t.look==="handDrawn"){const S=st.svg(o).path(le(-g/2,m,g,f,d),it(t,{}));C.node()?.appendChild(S),y&&C.attr("style",y)}else C.append("rect").attr("x",-g/2).attr("y",m).attr("width",g).attr("height",f).attr("rx",d).attr("ry",d).attr("style",s);C.append("line").attr("x1",-g/2).attr("y1",m+h).attr("x2",g/2).attr("y2",m+h).attr("style",`stroke:${l};stroke-width:1px`);for(let k=0;k<3;k++)C.append("circle").attr("cx",-g/2+12+k*9).attr("cy",m+h/2).attr("r",2.5).attr("style",`fill:${l};stroke:none`);C.append("rect").attr("class","browser-address-bar").attr("x",-g/2+44).attr("y",m+4).attr("width",Math.max(g-56,10)).attr("height",h-8).attr("rx",3).attr("ry",3).attr("style",`fill:none;stroke:${l};stroke-width:1px;opacity:0.6`),at(t,C);const x=m+h+(f-h)/2;return n.attr("transform",`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${x-a.height/2-(a.y-(a.top??0))})`),t.intersect=function(k){return rt.rect(t,k)},o}u(su,"browser");var Qi=12;async function ou(e,t){const{labelStyles:r,nodeStyles:i}=nt(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?28:s,a=t.look==="neo"?24:s,{shapeSvg:n,bbox:l}=await ct(e,t,dt(t)),c=(t?.width??l.width)+(t.look==="neo"?o*2:o+Qi),h=(t?.height??l.height)+(t.look==="neo"?a*2:a),d=0,g=c,f=-h,m=0,y=[{x:d+Qi,y:f},{x:g,y:f},{x:g,y:m},{x:d,y:m},{x:d,y:f+Qi},{x:d+Qi,y:f}];let C;const{cssStyles:x}=t;if(t.look==="handDrawn"){const k=st.svg(n),S=it(t,{}),T=Mt(y),B=k.path(T,S);C=n.insert(()=>B,":first-child").attr("transform",`translate(${-c/2}, ${h/2})`),x&&C.attr("style",x)}else C=Fe(n,c,h,y);return i&&C.attr("style",i),at(t,C),t.intersect=function(k){return rt.polygon(t,y,k)},n}u(ou,"card");function au(e,t){const{nodeStyles:r}=nt(t);t.label="";const i=e.insert("g").attr("class",dt(t)).attr("id",t.domId??t.id),{cssStyles:s}=t,o=Math.max(28,t.width??0),a=[{x:0,y:o/2},{x:o/2,y:0},{x:0,y:-o/2},{x:-o/2,y:0}],n=st.svg(i),l=it(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const c=Mt(a),h=n.path(c,l),d=i.insert(()=>h,":first-child");return s&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",s),r&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",r),t.width=28,t.height=28,t.intersect=function(g){return rt.polygon(t,a,g)},i}u(au,"choice");async function dn(e,t,r){const{labelStyles:i,nodeStyles:s}=nt(t);t.labelStyle=i;const{shapeSvg:o,bbox:a,halfPadding:n}=await ct(e,t,dt(t)),l=16,c=r?.padding??n,h=t.look==="neo"?a.width/2+l*2:a.width/2+c;let d;const{cssStyles:g}=t;if(t.look==="handDrawn"){const f=st.svg(o),m=it(t,{}),y=f.circle(0,0,h*2,m);d=o.insert(()=>y,":first-child"),d.attr("class","basic label-container").attr("style",zt(g))}else d=o.insert("circle",":first-child").attr("class","basic label-container").attr("style",s).attr("r",h).attr("cx",0).attr("cy",0);return at(t,d),t.calcIntersect=function(f,m){const y=f.width/2;return rt.circle(f,y,m)},t.intersect=function(f){return D.info("Circle intersect",t,h,f),rt.circle(t,h,f)},o}u(dn,"circle");async function nu(e,t){const r=t,i=["node",r.cssClasses,r.class].filter(Boolean).join(" "),{shapeSvg:s,bbox:o,halfPadding:a}=await ct(e,r,i),n=s.insert("rect",":first-child"),l=r.padding??0,c=r.positioned?r.width??0:o.width+l,h=r.positioned?r.height??0:o.height+l,d=r.positioned?-c/2:-o.width/2-a,g=r.positioned?-h/2:-o.height/2-a;return n.attr("class","basic cluster composite label-container").attr("style",r.style??null).attr("rx",r.rx??null).attr("ry",r.ry??null).attr("x",d).attr("y",g).attr("width",c).attr("height",h),at(r,n),r.intersect=function(f){return rt.rect(r,f)},s}u(nu,"composite");async function lu(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:s}=nt(t);t.labelStyle=i;const{shapeSvg:o,bbox:a,label:n}=await ct(e,t,dt(t)),l=r?.nodeBorder??r?.lineColor??"currentColor",c=t.padding??12,h=20,d=12,g=Math.max(a.width+c*2,t.width??0,90),f=Math.max(a.height+c*2+h,t.height??0),m=-f/2,{cssStyles:y}=t,C=o.insert("g",":first-child").attr("class","basic label-container");if(t.look==="handDrawn"){const S=st.svg(o).path(le(-g/2,m,g,f,d),it(t,{}));C.node()?.appendChild(S),y&&C.attr("style",y)}else C.append("rect").attr("x",-g/2).attr("y",m).attr("width",g).attr("height",f).attr("rx",d).attr("ry",d).attr("style",s);C.append("text").attr("x",-g/2+12).attr("y",m+16).attr("class","console-glyph").attr("style",`font-family:monospace;font-weight:bold;font-size:14px;fill:${l}`).text(">_"),at(t,C);const x=m+h+(f-h)/2;return n.attr("transform",`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${x-a.height/2-(a.y-(a.top??0))})`),t.intersect=function(k){return rt.rect(t,k)},o}u(lu,"consoleWindow");function hu(e){const t=Math.cos(Math.PI/4),r=Math.sin(Math.PI/4),i=e*2,s={x:i/2*t,y:i/2*r},o={x:-(i/2)*t,y:i/2*r},a={x:-(i/2)*t,y:-(i/2)*r},n={x:i/2*t,y:-(i/2)*r};return`M ${o.x},${o.y} L ${n.x},${n.y}
|
|
199
|
+
M ${s.x},${s.y} L ${a.x},${a.y}`}u(hu,"createLine");function cu(e,t){const{labelStyles:r,nodeStyles:i}=nt(t);t.labelStyle=r,t.label="";const s=e.insert("g").attr("class",dt(t)).attr("id",t.domId??t.id),o=Math.max(30,t?.width??0),{cssStyles:a}=t,n=st.svg(s),l=it(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const c=n.circle(0,0,o*2,l),h=hu(o),d=n.path(h,l),g=s.insert(()=>c,":first-child");return g.insert(()=>d),g.attr("class","outer-path"),a&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",a),i&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",i),at(t,g),t.intersect=function(f){return D.info("crossedCircle intersect",t,{radius:o,point:f}),rt.circle(t,o,f)},s}u(cu,"crossedCircle");function Ae(e,t,r,i=100,s=0,o=180){const a=[],n=s*Math.PI/180,h=(o*Math.PI/180-n)/(i-1);for(let d=0;d<i;d++){const g=n+d*h,f=e+r*Math.cos(g),m=t+r*Math.sin(g);a.push({x:-f,y:-m})}return a}u(Ae,"generateCirclePoints");async function du(e,t){const{labelStyles:r,nodeStyles:i}=nt(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,label:a}=await ct(e,t,dt(t)),n=t.look==="neo"?18:t.padding??0,l=t.look==="neo"?12:t.padding??0,c=o.width+n,h=o.height+l,d=Math.max(5,h*.1),{cssStyles:g}=t,f=[...Ae(c/2,-h/2,d,30,-90,0),{x:-c/2-d,y:d},...Ae(c/2+d*2,-d,d,20,-180,-270),...Ae(c/2+d*2,d,d,20,-90,-180),{x:-c/2-d,y:-h/2},...Ae(c/2,h/2,d,20,0,90)],m=[{x:c/2,y:-h/2-d},{x:-c/2,y:-h/2-d},...Ae(c/2,-h/2,d,20,-90,0),{x:-c/2-d,y:-d},...Ae(c/2+c*.1,-d,d,20,-180,-270),...Ae(c/2+c*.1,d,d,20,-90,-180),{x:-c/2-d,y:h/2},...Ae(c/2,h/2,d,20,0,90),{x:-c/2,y:h/2+d},{x:c/2,y:h/2+d}],y=st.svg(s),C=it(t,{fill:"none"});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const k=Mt(f).replace("Z",""),S=y.path(k,C),T=Mt(m),B=y.path(T,{...C}),L=s.insert("g",":first-child");return L.insert(()=>B,":first-child").attr("stroke-opacity",0),L.insert(()=>S,":first-child"),L.attr("class","text"),g&&t.look!=="handDrawn"&&L.selectAll("path").attr("style",g),i&&t.look!=="handDrawn"&&L.selectAll("path").attr("style",i),L.attr("transform",`translate(${d}, 0)`),a.attr("transform",`translate(${-c/2+d-(o.x-(o.left??0))},${-h/2+(t.padding??0)/2-(o.y-(o.top??0))})`),at(t,L),t.intersect=function(M){return rt.polygon(t,m,M)},s}u(du,"curlyBraceLeft");function Ee(e,t,r,i=100,s=0,o=180){const a=[],n=s*Math.PI/180,h=(o*Math.PI/180-n)/(i-1);for(let d=0;d<i;d++){const g=n+d*h,f=e+r*Math.cos(g),m=t+r*Math.sin(g);a.push({x:f,y:m})}return a}u(Ee,"generateCirclePoints");async function uu(e,t){const{labelStyles:r,nodeStyles:i}=nt(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,label:a}=await ct(e,t,dt(t)),n=t.look==="neo"?18:t.padding??0,l=t.look==="neo"?12:t.padding??0,c=o.width+(t.look==="neo"?n*2:n),h=o.height+(t.look==="neo"?l*2:l),d=Math.max(5,h*.1),{cssStyles:g}=t,f=[...Ee(c/2,-h/2,d,20,-90,0),{x:c/2+d,y:-d},...Ee(c/2+d*2,-d,d,20,-180,-270),...Ee(c/2+d*2,d,d,20,-90,-180),{x:c/2+d,y:h/2},...Ee(c/2,h/2,d,20,0,90)],m=[{x:-c/2,y:-h/2-d},{x:c/2,y:-h/2-d},...Ee(c/2,-h/2,d,20,-90,0),{x:c/2+d,y:-d},...Ee(c/2+d*2,-d,d,20,-180,-270),...Ee(c/2+d*2,d,d,20,-90,-180),{x:c/2+d,y:h/2},...Ee(c/2,h/2,d,20,0,90),{x:c/2,y:h/2+d},{x:-c/2,y:h/2+d}],y=st.svg(s),C=it(t,{fill:"none"});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const k=Mt(f).replace("Z",""),S=y.path(k,C),T=Mt(m),B=y.path(T,{...C}),L=s.insert("g",":first-child");return L.insert(()=>B,":first-child").attr("stroke-opacity",0),L.insert(()=>S,":first-child"),L.attr("class","text"),g&&t.look!=="handDrawn"&&L.selectAll("path").attr("style",g),i&&t.look!=="handDrawn"&&L.selectAll("path").attr("style",i),L.attr("transform",`translate(${-d}, 0)`),a.attr("transform",`translate(${-c/2+(t.padding??0)/2-(o.x-(o.left??0))},${-h/2+(t.padding??0)/2-(o.y-(o.top??0))})`),at(t,L),t.intersect=function(M){return rt.polygon(t,m,M)},s}u(uu,"curlyBraceRight");function Ut(e,t,r,i=100,s=0,o=180){const a=[],n=s*Math.PI/180,h=(o*Math.PI/180-n)/(i-1);for(let d=0;d<i;d++){const g=n+d*h,f=e+r*Math.cos(g),m=t+r*Math.sin(g);a.push({x:-f,y:-m})}return a}u(Ut,"generateCirclePoints");async function gu(e,t){const{labelStyles:r,nodeStyles:i}=nt(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,label:a}=await ct(e,t,dt(t)),n=t.look==="neo"?18:t.padding??0,l=t.look==="neo"?12:t.padding??0,c=o.width+(t.look==="neo"?n*2:n),h=o.height+(t.look==="neo"?l*2:l),d=Math.max(5,h*.1),{cssStyles:g}=t,f=[...Ut(c/2,-h/2,d,30,-90,0),{x:-c/2-d,y:d},...Ut(c/2+d*2,-d,d,20,-180,-270),...Ut(c/2+d*2,d,d,20,-90,-180),{x:-c/2-d,y:-h/2},...Ut(c/2,h/2,d,20,0,90)],m=[...Ut(-c/2+d+d/2,-h/2,d,20,-90,-180),{x:c/2-d/2,y:d},...Ut(-c/2-d/2,-d,d,20,0,90),...Ut(-c/2-d/2,d,d,20,-90,0),{x:c/2-d/2,y:-d},...Ut(-c/2+d+d/2,h/2,d,30,-180,-270)],y=[{x:c/2,y:-h/2-d},{x:-c/2,y:-h/2-d},...Ut(c/2,-h/2,d,20,-90,0),{x:-c/2-d,y:-d},...Ut(c/2+d*2,-d,d,20,-180,-270),...Ut(c/2+d*2,d,d,20,-90,-180),{x:-c/2-d,y:h/2},...Ut(c/2,h/2,d,20,0,90),{x:-c/2,y:h/2+d},{x:c/2-d-d/2,y:h/2+d},...Ut(-c/2+d+d/2,-h/2,d,20,-90,-180),{x:c/2-d/2,y:d},...Ut(-c/2-d/2,-d,d,20,0,90),...Ut(-c/2-d/2,d,d,20,-90,0),{x:c/2-d/2,y:-d},...Ut(-c/2+d+d/2,h/2,d,30,-180,-270)],C=st.svg(s),x=it(t,{fill:"none"});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const S=Mt(f).replace("Z",""),T=C.path(S,x),L=Mt(m).replace("Z",""),M=C.path(L,x),v=Mt(y),X=C.path(v,{...x}),z=s.insert("g",":first-child");return z.insert(()=>X,":first-child").attr("stroke-opacity",0),z.insert(()=>T,":first-child"),z.insert(()=>M,":first-child"),z.attr("class","text"),g&&t.look!=="handDrawn"&&z.selectAll("path").attr("style",g),i&&t.look!=="handDrawn"&&z.selectAll("path").attr("style",i),z.attr("transform",`translate(${d-d/4}, 0)`),a.attr("transform",`translate(${-c/2+(t.padding??0)/2-(o.x-(o.left??0))},${-h/2+(t.padding??0)/2-(o.y-(o.top??0))})`),at(t,z),t.intersect=function(I){return rt.polygon(t,y,I)},s}u(gu,"curlyBraces");async function pu(e,t){const{labelStyles:r,nodeStyles:i}=nt(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?16:s,a=t.look==="neo"?12:s,n=20,l=5,{shapeSvg:c,bbox:h}=await ct(e,t,dt(t)),d=Math.max(n,(h.width+o*2)*1.25,t?.width??0),g=Math.max(l,h.height+a*2,t?.height??0),f=g/2,{cssStyles:m}=t,y=st.svg(c),C=it(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const x=d,k=g,S=x-f,T=k/4,B=[{x:S,y:0},{x:T,y:0},{x:0,y:k/2},{x:T,y:k},{x:S,y:k},...Se(-S,-k/2,f,50,270,90)],L=Mt(B),M=y.path(L,C),v=c.insert(()=>M,":first-child");return v.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&v.selectChildren("path").attr("style",m),i&&t.look!=="handDrawn"&&v.selectChildren("path").attr("style",i),v.attr("transform",`translate(${-d/2}, ${-g/2})`),at(t,v),t.intersect=function(X){return rt.polygon(t,B,X)},c}u(pu,"curvedTrapezoid");async function fu(e,t){const{labelStyles:r,nodeStyles:i}=nt(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,label:a}=await ct(e,t,dt(t)),n=t.padding??20,l=Math.max(o.width+n*2,t.width??0,100),c=Math.min(Math.max(l*.23,16),56),h=c*.27,d=Math.max(o.height+n*2,t.height?t.height-(2*c-h):0),g=Math.min(l*.177,d*.45),f=d+2*c-h,m=-f/2,y=m+2*c-h,C=s.insert("g",":first-child").attr("class","basic label-container"),{cssStyles:x}=t;if(t.look==="handDrawn"){const v=st.svg(s),X=it(t,{}),z=v.path(le(-l/2,y,l,d,g),X),I=v.circle(0,m+c,c*2,X);C.insert(()=>I,":first-child"),C.insert(()=>z,":first-child"),x&&C.attr("style",x)}else C.append("rect").attr("x",-l/2).attr("y",y).attr("width",l).attr("height",d).attr("rx",g).attr("ry",g).attr("style",i),C.append("circle").attr("cx",0).attr("cy",m+c).attr("r",c).attr("style",i);at(t,C);const k=y+d/2;a.attr("transform",`translate(${-(o.width/2)-(o.x-(o.left??0))}, ${k-o.height/2-(o.y-(o.top??0))})`);const S=m+c,T=Math.asin(Math.min(1,(y-S)/c))*180/Math.PI,M=[...Se(0,-S,c,24,180+T,-T),...Se(-(-l/2+g),-(y+g),g,12,90,0),...Se(-(-l/2+g),-(f/2-g),g,12,360,270),...Se(-(l/2-g),-(f/2-g),g,12,270,180),...Se(-(l/2-g),-(y+g),g,12,180,90)];return t.intersect=function(v){return rt.polygon(t,M,v)},s}u(fu,"person");var J0=u((e,t,r,i,s,o)=>[`M${e},${t+o}`,`a${s},${o} 0,0,0 ${r},0`,`a${s},${o} 0,0,0 ${-r},0`,`l0,${i}`,`a${s},${o} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createCylinderPathD"),tx=u((e,t,r,i,s,o)=>[`M${e},${t+o}`,`M${e+r},${t+o}`,`a${s},${o} 0,0,0 ${-r},0`,`l0,${i}`,`a${s},${o} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createOuterCylinderPathD"),ex=u((e,t,r,i,s,o)=>[`M${e-r/2},${-i/2}`,`a${s},${o} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),Nl=8,Wl=8;async function yu(e,t){const{labelStyles:r,nodeStyles:i}=nt(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?24:s,a=t.look==="neo"?24:s,n=t.width??0;if(t.width&&(t.width=t.width-a,t.width<Wl&&(t.width=Wl)),t.height){const k=n/2/(2.5+n/50);t.height=t.height-o-k*3,t.height<Nl&&(t.height=Nl)}const{shapeSvg:l,bbox:c,label:h}=await ct(e,t,dt(t)),d=Math.max(t.width??0,c.width)+a,g=d/2,f=g/(2.5+d/50),m=Math.max(t.height??0,c.height)+o+f;let y;const{cssStyles:C}=t;if(t.look==="handDrawn"){const x=st.svg(l),k=tx(0,0,d,m,g,f),S=ex(0,f,d,m,g,f),T=it(t,{}),B=x.path(k,T),L=x.path(S,it(t,{fill:"none"}));y=l.insert(()=>L,":first-child"),y=l.insert(()=>B,":first-child"),y.attr("class","basic label-container"),C&&y.attr("style",C)}else{const x=J0(0,0,d,m,g,f);y=l.insert("path",":first-child").attr("d",x).attr("class","basic label-container outer-path").attr("style",zt(C)).attr("style",i)}return y.attr("label-offset-y",f),y.attr("transform",`translate(${-d/2}, ${-(m/2+f)})`),at(t,y),h.attr("transform",`translate(${-(c.width/2)-(c.x-(c.left??0))}, ${-(c.height/2)+(t.padding??0)/1.5-(c.y-(c.top??0))})`),t.intersect=function(x){const k=rt.rect(t,x),S=k.x-(t.x??0);if(g!=0&&(Math.abs(S)<(t.width??0)/2||Math.abs(S)==(t.width??0)/2&&Math.abs(k.y-(t.y??0))>(t.height??0)/2-f)){let T=f*f*(1-S*S/(g*g));T>0&&(T=Math.sqrt(T)),T=f-T,x.y-(t.y??0)>0&&(T=-T),k.y+=T}return k},l}u(yu,"cylinder");async function Qr(e,t,r){const{labelStyles:i,nodeStyles:s}=nt(t);t.labelStyle=i;const{shapeSvg:o,bbox:a}=await ct(e,t,dt(t)),n=Math.max(a.width+r.labelPaddingX*2,t?.width||0),l=Math.max(a.height+r.labelPaddingY*2,t?.height||0),c=-n/2,h=-l/2;let d,{rx:g,ry:f}=t;const{cssStyles:m}=t;if(r?.rx&&r.ry&&(g=r.rx,f=r.ry),t.look==="handDrawn"){const y=st.svg(o),C=it(t,{}),x=g||f?y.path(le(c,h,n,l,g||0),C):y.rectangle(c,h,n,l,C);d=o.insert(()=>x,":first-child"),d.attr("class","basic label-container").attr("style",zt(m))}else d=o.insert("rect",":first-child"),d.attr("class","basic label-container").attr("style",s).attr("rx",zt(g)).attr("ry",zt(f)).attr("x",c).attr("y",h).attr("width",n).attr("height",l);return at(t,d,t.look==="handDrawn"?void 0:{width:n,height:l}),t.calcIntersect=function(y,C){return rt.rect(y,C)},t.intersect=function(y){return rt.rect(t,y)},o}u(Qr,"drawRect");async function mu(e,t){const{cssClasses:r,labelPaddingX:i,labelPaddingY:s,padding:o,width:a,height:n}=t,l={rx:0,ry:0,labelPaddingX:i??(o??0)*2,labelPaddingY:s??o??0},c=await Qr(e,t,l);if(t.look==="handDrawn"){const f=st.svg(c),m=it(t,{}),y=c.select(".basic.label-container > path:nth-child(2)"),C=y.node();if(!C)return c;let x=null;if(C instanceof SVGGraphicsElement)x=C.getBBox();else return c;return c.insert(()=>f.line(x.x,x.y,x.x+x.width,x.y,m),".basic.label-container g.label"),c.insert(()=>f.line(x.x,x.y+x.height,x.x+x.width,x.y+x.height,m),".basic.label-container g.label"),y.remove(),c}const h=c.select(".basic.label-container"),d=(Number(h.attr("width"))||a)??0,g=(Number(h.attr("height"))||n)??0;return d>0&&g>0&&h.attr("stroke-dasharray",`${d} ${g}`),c}u(mu,"datastore");async function Cu(e,t){const{labelStyles:r,nodeStyles:i}=nt(t);t.labelStyle=r;const s=t.look==="neo"?16:t.padding??0,o=t.look==="neo"?16:t.padding??0,{shapeSvg:a,bbox:n,label:l}=await ct(e,t,dt(t)),c=n.width+s,h=n.height+o,d=h*.2,g=-c/2,f=-h/2-d/2,{cssStyles:m}=t,y=st.svg(a),C=it(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const x=[{x:g,y:f+d},{x:-g,y:f+d},{x:-g,y:-f},{x:g,y:-f},{x:g,y:f},{x:-g,y:f},{x:-g,y:f+d}],k=y.polygon(x.map(T=>[T.x,T.y]),C),S=a.insert(()=>k,":first-child");return S.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",m),i&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",i),l.attr("transform",`translate(${g+(t.padding??0)/2-(n.x-(n.left??0))}, ${f+d+(t.padding??0)/2-(n.y-(n.top??0))})`),at(t,S),t.intersect=function(T){return rt.rect(t,T)},a}u(Cu,"dividedRectangle");async function xu(e,t){const{labelStyles:r,nodeStyles:i}=nt(t),s=t.look==="neo"?12:5;t.labelStyle=r;const o=t.padding??0,a=t.look==="neo"?16:o,{shapeSvg:n,bbox:l}=await ct(e,t,dt(t)),c=(t?.width?t?.width/2:l.width/2)+(a??0),h=c-s;let d;const{cssStyles:g}=t;if(t.look==="handDrawn"){const f=st.svg(n),m=it(t,{roughness:.2,strokeWidth:2.5}),y=it(t,{roughness:.2,strokeWidth:1.5}),C=f.circle(0,0,c*2,m),x=f.circle(0,0,h*2,y);d=n.insert("g",":first-child"),d.attr("class",zt(t.cssClasses)).attr("style",zt(g)),d.node()?.appendChild(C),d.node()?.appendChild(x)}else{d=n.insert("g",":first-child");const f=d.insert("circle",":first-child"),m=d.insert("circle");d.attr("class","basic label-container").attr("style",i),f.attr("class","outer-circle").attr("style",i).attr("r",c).attr("cx",0).attr("cy",0),m.attr("class","inner-circle").attr("style",i).attr("r",h).attr("cx",0).attr("cy",0)}return at(t,d),t.intersect=function(f){return D.info("DoubleCircle intersect",t,c,f),rt.circle(t,c,f)},n}u(xu,"doublecircle");function bu(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:s}=nt(t);t.label="",t.labelStyle=i;const o=e.insert("g").attr("class",dt(t)).attr("id",t.domId??t.id),a=7,{cssStyles:n}=t,l=st.svg(o),{nodeBorder:c}=r,h=it(t,{fillStyle:"solid"});t.look!=="handDrawn"&&(h.roughness=0);const d=l.circle(0,0,a*2,h),g=o.insert(()=>d,":first-child");return g.selectAll("path").attr("style",`fill: ${c} !important;`),n&&n.length>0&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",n),s&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",s),at(t,g),t.intersect=function(f){return D.info("filledCircle intersect",t,{radius:a,point:f}),rt.circle(t,a,f)},o}u(bu,"filledCircle");var zl=10,Hl=10;async function ku(e,t){const{labelStyles:r,nodeStyles:i}=nt(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?s*2:s;(t.width||t.height)&&(t.height=t?.height??0,t.height<zl&&(t.height=zl),t.width=(t?.width??0)-o-o/2,t.width<Hl&&(t.width=Hl));const{shapeSvg:a,bbox:n,label:l}=await ct(e,t,dt(t)),c=(t?.width?t?.width:n.width)+(o??0),h=t?.height?t?.height:c+n.height,d=h,g=[{x:0,y:-h},{x:d,y:-h},{x:d/2,y:0}],{cssStyles:f}=t,m=st.svg(a),y=it(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const C=Mt(g),x=m.path(C,y),k=a.insert(()=>x,":first-child").attr("transform",`translate(${-h/2}, ${h/2})`).attr("class","outer-path");return f&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",f),i&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",i),t.width=c,t.height=h,at(t,k),l.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${-h/2+(t.padding??0)/2+(n.y-(n.top??0))})`),t.intersect=function(S){return D.info("Triangle intersect",t,g,S),rt.polygon(t,g,S)},a}u(ku,"flippedTriangle");async function wu(e,t){const{labelStyles:r,nodeStyles:i}=nt(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,label:a}=await ct(e,t,dt(t)),n=t.padding??12,l=Math.max(o.width+n*2,t.width??0,90),c=o.height+n*2,h=Math.max(Math.min(c*.16,14),8),d=Math.max(c+h,t.height??0),g=d-h,f=Math.max(l*.38,28),m=-d/2,y=[{x:-l/2,y:m},{x:-l/2+f,y:m},{x:-l/2+f,y:m+h},{x:l/2,y:m+h},{x:l/2,y:d/2},{x:-l/2,y:d/2}],C=[`M${y[0].x},${y[0].y}`,...y.slice(1).map(T=>`L${T.x},${T.y}`),"Z"].join(" "),{cssStyles:x}=t;let k;if(t.look==="handDrawn"){const B=st.svg(s).path(C,it(t,{}));k=s.insert(()=>B,":first-child").attr("class","basic label-container"),x&&k.attr("style",x)}else k=s.insert("path",":first-child").attr("d",C).attr("class","basic label-container").attr("style",i);t.look==="handDrawn"?at(t,k):at(t,k,{width:l,height:d});const S=m+h+g/2;return a.attr("transform",`translate(${-(o.width/2)-(o.x-(o.left??0))}, ${S-o.height/2-(o.y-(o.top??0))})`),t.intersect=function(T){return rt.polygon(t,y,T)},s}u(wu,"folder");function Su(e,t,{dir:r,config:{state:i,themeVariables:s}}){const{nodeStyles:o}=nt(t);t.label="";const a=e.insert("g").attr("class",dt(t)).attr("id",t.domId??t.id),{cssStyles:n}=t;let l=Math.max(70,t?.width??0),c=Math.max(10,t?.height??0);r==="LR"&&(l=Math.max(10,t?.width??0),c=Math.max(70,t?.height??0));const h=-1*l/2,d=-1*c/2,g=st.svg(a),f=it(t,{stroke:s.lineColor,fill:s.lineColor});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const m=g.rectangle(h,d,l,c,f),y=a.insert(()=>m,":first-child");n&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",n),o&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",o),at(t,y);const C=i?.padding??0;return t.width&&t.height&&(t.width+=C/2||0,t.height+=C/2||0),t.intersect=function(x){return rt.rect(t,x)},a}u(Su,"forkJoin");async function Tu(e,t){const{labelStyles:r,nodeStyles:i}=nt(t);t.labelStyle=r;const s=15,o=10,a=t.look==="neo"?16:t.padding??0,n=t.look==="neo"?12:t.padding??0;(t.width||t.height)&&(t.height=(t?.height??0)-n*2,t.height<o&&(t.height=o),t.width=(t?.width??0)-a*2,t.width<s&&(t.width=s));const{shapeSvg:l,bbox:c}=await ct(e,t,dt(t)),h=(t?.width?t?.width:Math.max(s,c.width))+a*2,d=(t?.height?t?.height:Math.max(o,c.height))+n*2,g=d/2,{cssStyles:f}=t,m=st.svg(l),y=it(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const C=[{x:-h/2,y:-d/2},{x:h/2-g,y:-d/2},...Se(-h/2+g,0,g,50,90,270),{x:h/2-g,y:d/2},{x:-h/2,y:d/2}],x=Mt(C),k=m.path(x,y),S=l.insert(()=>k,":first-child");return S.attr("class","basic label-container outer-path"),f&&t.look!=="handDrawn"&&S.selectChildren("path").attr("style",f),i&&t.look!=="handDrawn"&&S.selectChildren("path").attr("style",i),at(t,S),t.intersect=function(T){return D.info("Pill intersect",t,{radius:g,point:T}),rt.polygon(t,C,T)},l}u(Tu,"halfRoundedRectangle");var rx=u((e,t,r,i,s)=>[`M${e+s},${t}`,`L${e+r-s},${t}`,`L${e+r},${t-i/2}`,`L${e+r-s},${t-i}`,`L${e+s},${t-i}`,`L${e},${t-i/2}`,"Z"].join(" "),"createHexagonPathD");async function Bu(e,t){const{labelStyles:r,nodeStyles:i}=nt(t),s=t.look==="neo"?3.5:4;t.labelStyle=r;const o=t.padding??0,a=70,n=32,l=t.look==="neo"?a:o,c=t.look==="neo"?n:o;if(t.width||t.height){const S=(t.height??0)/s;t.width=(t?.width??0)-2*S-c,t.height=(t.height??0)-l}const{shapeSvg:h,bbox:d}=await ct(e,t,dt(t)),g=(t?.height?t?.height:d.height)+l,f=g/s,m=(t?.width?t?.width:d.width)+2*f+c,y=[{x:f,y:0},{x:m-f,y:0},{x:m,y:-g/2},{x:m-f,y:-g},{x:f,y:-g},{x:0,y:-g/2}];let C;const{cssStyles:x}=t;if(t.look==="handDrawn"){const k=st.svg(h),S=it(t,{}),T=rx(0,0,m,g,f),B=k.path(T,S);C=h.insert(()=>B,":first-child").attr("transform",`translate(${-m/2}, ${g/2})`),x&&C.attr("style",x)}else C=Fe(h,m,g,y);return i&&C.attr("style",i),t.width=m,t.height=g,at(t,C),t.intersect=function(k){return rt.polygon(t,y,k)},h}u(Bu,"hexagon");async function _u(e,t){const{labelStyles:r,nodeStyles:i}=nt(t);t.label="",t.labelStyle=r;const{shapeSvg:s}=await ct(e,t,dt(t)),o=Math.max(30,t?.width??0),a=Math.max(30,t?.height??0),{cssStyles:n}=t,l=st.svg(s),c=it(t,{});t.look!=="handDrawn"&&(c.roughness=0,c.fillStyle="solid");const h=[{x:0,y:0},{x:o,y:0},{x:0,y:a},{x:o,y:a}],d=Mt(h),g=l.path(d,c),f=s.insert(()=>g,":first-child");return f.attr("class","basic label-container outer-path"),n&&t.look!=="handDrawn"&&f.selectChildren("path").attr("style",n),i&&t.look!=="handDrawn"&&f.selectChildren("path").attr("style",i),f.attr("transform",`translate(${-o/2}, ${-a/2})`),at(t,f),t.intersect=function(m){return D.info("Pill intersect",t,{points:h}),rt.polygon(t,h,m)},s}u(_u,"hourglass");async function vu(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=nt(t);t.labelStyle=s;const o=t.assetHeight??48,a=t.assetWidth??48,n=Math.max(o,a),l=i?.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:c,bbox:h,label:d}=await ct(e,t,"icon-shape default"),g=t.pos==="t",f=n,m=n,{nodeBorder:y}=r,{stylesMap:C}=Kr(t),x=-m/2,k=-f/2,S=t.label?8:0,T=st.svg(c),B=it(t,{stroke:"none",fill:"none"});t.look!=="handDrawn"&&(B.roughness=0,B.fillStyle="solid");const L=T.rectangle(x,k,m,f,B),M=Math.max(m,h.width),v=f+h.height+S,X=T.rectangle(-M/2,-v/2,M,v,{...B,fill:"transparent",stroke:"none"}),z=c.insert(()=>L,":first-child"),I=c.insert(()=>X);if(t.icon){const et=c.append("g");et.html(`<g>${await zi(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const H=et.node().getBBox(),E=H.width,O=H.height,_=H.x,R=H.y;et.attr("transform",`translate(${-E/2-_},${g?h.height/2+S/2-O/2-R:-h.height/2-S/2-O/2-R})`),et.attr("style",`color: ${C.get("stroke")??y};`)}return d.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${g?-v/2:v/2-h.height})`),z.attr("transform",`translate(0,${g?h.height/2+S/2:-h.height/2-S/2})`),at(t,I),t.intersect=function(et){if(D.info("iconSquare intersect",t,et),!t.label)return rt.rect(t,et);const H=t.x??0,E=t.y??0,O=t.height??0;let _=[];return g?_=[{x:H-h.width/2,y:E-O/2},{x:H+h.width/2,y:E-O/2},{x:H+h.width/2,y:E-O/2+h.height+S},{x:H+m/2,y:E-O/2+h.height+S},{x:H+m/2,y:E+O/2},{x:H-m/2,y:E+O/2},{x:H-m/2,y:E-O/2+h.height+S},{x:H-h.width/2,y:E-O/2+h.height+S}]:_=[{x:H-m/2,y:E-O/2},{x:H+m/2,y:E-O/2},{x:H+m/2,y:E-O/2+f},{x:H+h.width/2,y:E-O/2+f},{x:H+h.width/2/2,y:E+O/2},{x:H-h.width/2,y:E+O/2},{x:H-h.width/2,y:E-O/2+f},{x:H-m/2,y:E-O/2+f}],rt.polygon(t,_,et)},c}u(vu,"icon");async function Lu(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=nt(t);t.labelStyle=s;const o=t.assetHeight??48,a=t.assetWidth??48,n=Math.max(o,a),l=i?.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:c,bbox:h,label:d}=await ct(e,t,"icon-shape default"),g=20,f=t.label?8:0,m=t.pos==="t",{nodeBorder:y,mainBkg:C}=r,{stylesMap:x}=Kr(t),k=st.svg(c),S=it(t,{});t.look!=="handDrawn"&&(S.roughness=0,S.fillStyle="solid");const T=x.get("fill");S.stroke=T??C;const B=c.append("g");t.icon&&B.html(`<g>${await zi(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const L=B.node().getBBox(),M=L.width,v=L.height,X=L.x,z=L.y,I=Math.max(M,v)*Math.SQRT2+g*2,et=k.circle(0,0,I,S),H=Math.max(I,h.width),E=I+h.height+f,O=k.rectangle(-H/2,-E/2,H,E,{...S,fill:"transparent",stroke:"none"}),_=c.insert(()=>et,":first-child"),R=c.insert(()=>O);return B.attr("transform",`translate(${-M/2-X},${m?h.height/2+f/2-v/2-z:-h.height/2-f/2-v/2-z})`),B.attr("style",`color: ${x.get("stroke")??y};`),d.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${m?-E/2:E/2-h.height})`),_.attr("transform",`translate(0,${m?h.height/2+f/2:-h.height/2-f/2})`),at(t,R),t.intersect=function($){return D.info("iconSquare intersect",t,$),rt.rect(t,$)},c}u(Lu,"iconCircle");async function Fu(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=nt(t);t.labelStyle=s;const o=t.assetHeight??48,a=t.assetWidth??48,n=Math.max(o,a),l=i?.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:c,bbox:h,halfPadding:d,label:g}=await ct(e,t,"icon-shape default"),f=t.pos==="t",m=n+d*2,y=n+d*2,{nodeBorder:C,mainBkg:x}=r,{stylesMap:k}=Kr(t),S=-y/2,T=-m/2,B=t.label?8:0,L=st.svg(c),M=it(t,{});t.look!=="handDrawn"&&(M.roughness=0,M.fillStyle="solid");const v=k.get("fill");M.stroke=v??x;const X=L.path(le(S,T,y,m,5),M),z=Math.max(y,h.width),I=m+h.height+B,et=L.rectangle(-z/2,-I/2,z,I,{...M,fill:"transparent",stroke:"none"}),H=c.insert(()=>X,":first-child").attr("class","icon-shape2"),E=c.insert(()=>et);if(t.icon){const O=c.append("g");O.html(`<g>${await zi(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const _=O.node().getBBox(),R=_.width,$=_.height,J=_.x,Z=_.y;O.attr("transform",`translate(${-R/2-J},${f?h.height/2+B/2-$/2-Z:-h.height/2-B/2-$/2-Z})`),O.attr("style",`color: ${k.get("stroke")??C};`)}return g.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${f?-I/2:I/2-h.height})`),H.attr("transform",`translate(0,${f?h.height/2+B/2:-h.height/2-B/2})`),at(t,E),t.intersect=function(O){if(D.info("iconSquare intersect",t,O),!t.label)return rt.rect(t,O);const _=t.x??0,R=t.y??0,$=t.height??0;let J=[];return f?J=[{x:_-h.width/2,y:R-$/2},{x:_+h.width/2,y:R-$/2},{x:_+h.width/2,y:R-$/2+h.height+B},{x:_+y/2,y:R-$/2+h.height+B},{x:_+y/2,y:R+$/2},{x:_-y/2,y:R+$/2},{x:_-y/2,y:R-$/2+h.height+B},{x:_-h.width/2,y:R-$/2+h.height+B}]:J=[{x:_-y/2,y:R-$/2},{x:_+y/2,y:R-$/2},{x:_+y/2,y:R-$/2+m},{x:_+h.width/2,y:R-$/2+m},{x:_+h.width/2/2,y:R+$/2},{x:_-h.width/2,y:R+$/2},{x:_-h.width/2,y:R-$/2+m},{x:_-y/2,y:R-$/2+m}],rt.polygon(t,J,O)},c}u(Fu,"iconRounded");async function Mu(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=nt(t);t.labelStyle=s;const o=t.assetHeight??48,a=t.assetWidth??48,n=Math.max(o,a),l=i?.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:c,bbox:h,halfPadding:d,label:g}=await ct(e,t,"icon-shape default"),f=t.pos==="t",m=n+d*2,y=n+d*2,{nodeBorder:C,mainBkg:x}=r,{stylesMap:k}=Kr(t),S=-y/2,T=-m/2,B=t.label?8:0,L=st.svg(c),M=it(t,{});t.look!=="handDrawn"&&(M.roughness=0,M.fillStyle="solid");const v=k.get("fill");M.stroke=v??x;const X=L.path(le(S,T,y,m,.1),M),z=Math.max(y,h.width),I=m+h.height+B,et=L.rectangle(-z/2,-I/2,z,I,{...M,fill:"transparent",stroke:"none"}),H=c.insert(()=>X,":first-child"),E=c.insert(()=>et);if(t.icon){const O=c.append("g");O.html(`<g>${await zi(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const _=O.node().getBBox(),R=_.width,$=_.height,J=_.x,Z=_.y;O.attr("transform",`translate(${-R/2-J},${f?h.height/2+B/2-$/2-Z:-h.height/2-B/2-$/2-Z})`),O.attr("style",`color: ${k.get("stroke")??C};`)}return g.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${f?-I/2:I/2-h.height})`),H.attr("transform",`translate(0,${f?h.height/2+B/2:-h.height/2-B/2})`),at(t,E),t.intersect=function(O){if(D.info("iconSquare intersect",t,O),!t.label)return rt.rect(t,O);const _=t.x??0,R=t.y??0,$=t.height??0;let J=[];return f?J=[{x:_-h.width/2,y:R-$/2},{x:_+h.width/2,y:R-$/2},{x:_+h.width/2,y:R-$/2+h.height+B},{x:_+y/2,y:R-$/2+h.height+B},{x:_+y/2,y:R+$/2},{x:_-y/2,y:R+$/2},{x:_-y/2,y:R-$/2+h.height+B},{x:_-h.width/2,y:R-$/2+h.height+B}]:J=[{x:_-y/2,y:R-$/2},{x:_+y/2,y:R-$/2},{x:_+y/2,y:R-$/2+m},{x:_+h.width/2,y:R-$/2+m},{x:_+h.width/2/2,y:R+$/2},{x:_-h.width/2,y:R+$/2},{x:_-h.width/2,y:R-$/2+m},{x:_-y/2,y:R-$/2+m}],rt.polygon(t,J,O)},c}u(Mu,"iconSquare");async function Au(e,t,{config:{flowchart:r}}){const i=new Image;i.src=t?.img??"",await i.decode();const s=Number(i.naturalWidth.toString().replace("px","")),o=Number(i.naturalHeight.toString().replace("px",""));t.imageAspectRatio=s/o;const{labelStyles:a}=nt(t);t.labelStyle=a;const n=r?.wrappingWidth;t.defaultWidth=r?.wrappingWidth;const l=Math.max(t.label?n??0:0,t?.assetWidth??s),c=t.constraint==="on"&&t?.assetHeight?t.assetHeight*t.imageAspectRatio:l,h=t.constraint==="on"?c/t.imageAspectRatio:t?.assetHeight??o;t.width=Math.max(c,n??0);const{shapeSvg:d,bbox:g,label:f}=await ct(e,t,"image-shape default"),m=t.pos==="t",y=-c/2,C=-h/2,x=t.label?8:0,k=st.svg(d),S=it(t,{});t.look!=="handDrawn"&&(S.roughness=0,S.fillStyle="solid");const T=k.rectangle(y,C,c,h,S),B=Math.max(c,g.width),L=h+g.height+x,M=k.rectangle(-B/2,-L/2,B,L,{...S,fill:"none",stroke:"none"}),v=d.insert(()=>T,":first-child"),X=d.insert(()=>M);if(t.img){const z=d.append("image");z.attr("href",t.img),z.attr("width",c),z.attr("height",h),z.attr("preserveAspectRatio","none"),z.attr("transform",`translate(${-c/2},${m?L/2-h:-L/2})`)}return f.attr("transform",`translate(${-g.width/2-(g.x-(g.left??0))},${m?-h/2-g.height/2-x/2:h/2-g.height/2+x/2})`),v.attr("transform",`translate(0,${m?g.height/2+x/2:-g.height/2-x/2})`),at(t,X),t.intersect=function(z){if(D.info("iconSquare intersect",t,z),!t.label)return rt.rect(t,z);const I=t.x??0,et=t.y??0,H=t.height??0;let E=[];return m?E=[{x:I-g.width/2,y:et-H/2},{x:I+g.width/2,y:et-H/2},{x:I+g.width/2,y:et-H/2+g.height+x},{x:I+c/2,y:et-H/2+g.height+x},{x:I+c/2,y:et+H/2},{x:I-c/2,y:et+H/2},{x:I-c/2,y:et-H/2+g.height+x},{x:I-g.width/2,y:et-H/2+g.height+x}]:E=[{x:I-c/2,y:et-H/2},{x:I+c/2,y:et-H/2},{x:I+c/2,y:et-H/2+h},{x:I+g.width/2,y:et-H/2+h},{x:I+g.width/2/2,y:et+H/2},{x:I-g.width/2,y:et+H/2},{x:I-g.width/2,y:et-H/2+h},{x:I-c/2,y:et-H/2+h}],rt.polygon(t,E,z)},d}u(Au,"imageSquare");async function Eu(e,t){const{labelStyles:r,nodeStyles:i}=nt(t);t.labelStyle=r;const s=t.padding??0,o=s,a=t.look==="neo"?s*2:s,{shapeSvg:n,bbox:l}=await ct(e,t,dt(t)),c=Math.max(l.height+o*2,t.height??0),h=Math.max(l.width+a*2,(t.width??0)-c),d=[{x:0,y:0},{x:h,y:0},{x:h+3*c/6,y:-c},{x:-3*c/6,y:-c}];let g;const{cssStyles:f}=t;if(t.look==="handDrawn"){const m=st.svg(n),y=it(t,{}),C=Mt(d),x=m.path(C,y);g=n.insert(()=>x,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),f&&g.attr("style",f)}else g=Fe(n,h,c,d);return i&&g.attr("style",i),t.width=h,t.height=c,at(t,g),t.intersect=function(m){return rt.polygon(t,d,m)},n}u(Eu,"inv_trapezoid");async function $u(e,t){const{shapeSvg:r,bbox:i,label:s}=await ct(e,t,"label"),o=r.insert("rect",":first-child");return o.attr("width",.1).attr("height",.1),r.attr("class","label edgeLabel"),s.attr("transform",`translate(${-(i.width/2)-(i.x-(i.left??0))}, ${-(i.height/2)-(i.y-(i.top??0))})`),at(t,o),t.intersect=function(l){return rt.rect(t,l)},r}u($u,"labelRect");async function Ou(e,t){const{labelStyles:r,nodeStyles:i}=nt(t);t.labelStyle=r;const s=t.padding??0,o=s,a=t.look==="neo"?s*2:s,{shapeSvg:n,bbox:l}=await ct(e,t,dt(t)),c=Math.max(l.height+o,t.height??0),h=Math.max(l.width+a,(t.width??0)-c),d=[{x:0,y:0},{x:h+3*c/6,y:0},{x:h,y:-c},{x:-(3*c)/6,y:-c}];let g;const{cssStyles:f}=t;if(t.look==="handDrawn"){const m=st.svg(n),y=it(t,{}),C=Mt(d),x=m.path(C,y);g=n.insert(()=>x,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),f&&g.attr("style",f)}else g=Fe(n,h,c,d);return i&&g.attr("style",i),t.width=h,t.height=c,at(t,g),t.intersect=function(m){return rt.polygon(t,d,m)},n}u(Ou,"lean_left");async function Pu(e,t){const{labelStyles:r,nodeStyles:i}=nt(t);t.labelStyle=r;const s=t.padding??0,o=s,a=t.look==="neo"?s*2:s,{shapeSvg:n,bbox:l}=await ct(e,t,dt(t)),c=Math.max(l.height+o,t.height??0),h=Math.max(l.width+a,(t.width??0)-c),d=[{x:-3*c/6,y:0},{x:h,y:0},{x:h+3*c/6,y:-c},{x:0,y:-c}];let g;const{cssStyles:f}=t;if(t.look==="handDrawn"){const m=st.svg(n),y=it(t,{}),C=Mt(d),x=m.path(C,y);g=n.insert(()=>x,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),f&&g.attr("style",f)}else g=Fe(n,h,c,d);return i&&g.attr("style",i),t.width=h,t.height=c,at(t,g),t.intersect=function(m){return rt.polygon(t,d,m)},n}u(Pu,"lean_right");function Du(e,t){const{labelStyles:r,nodeStyles:i}=nt(t);t.label="",t.labelStyle=r;const s=e.insert("g").attr("class",dt(t)).attr("id",t.domId??t.id),{cssStyles:o}=t,a=Math.max(35,t?.width??0),n=Math.max(35,t?.height??0),l=7,c=[{x:a,y:0},{x:0,y:n+l/2},{x:a-2*l,y:n+l/2},{x:0,y:2*n},{x:a,y:n-l/2},{x:2*l,y:n-l/2}],h=st.svg(s),d=it(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const g=Mt(c),f=h.path(g,d),m=s.insert(()=>f,":first-child");return m.attr("class","outer-path"),o&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",o),i&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",i),m.attr("transform",`translate(-${a/2},${-n})`),at(t,m),t.intersect=function(y){return D.info("lightningBolt intersect",t,y),rt.polygon(t,c,y)},s}u(Du,"lightningBolt");var ix=u((e,t,r,i,s,o,a)=>[`M${e},${t+o}`,`a${s},${o} 0,0,0 ${r},0`,`a${s},${o} 0,0,0 ${-r},0`,`l0,${i}`,`a${s},${o} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+o+a}`,`a${s},${o} 0,0,0 ${r},0`].join(" "),"createCylinderPathD"),sx=u((e,t,r,i,s,o,a)=>[`M${e},${t+o}`,`M${e+r},${t+o}`,`a${s},${o} 0,0,0 ${-r},0`,`l0,${i}`,`a${s},${o} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+o+a}`,`a${s},${o} 0,0,0 ${r},0`].join(" "),"createOuterCylinderPathD"),ox=u((e,t,r,i,s,o)=>[`M${e-r/2},${-i/2}`,`a${s},${o} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),jl=10,Yl=10;async function Iu(e,t){const{labelStyles:r,nodeStyles:i}=nt(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?16:s,a=t.look==="neo"?24:s;if(t.width||t.height){const x=t.width??0;t.width=(t.width??0)-o,t.width<Yl&&(t.width=Yl);const S=x/2/(2.5+x/50);t.height=(t.height??0)-a-S*3,t.height<jl&&(t.height=jl)}const{shapeSvg:n,bbox:l,label:c}=await ct(e,t,dt(t)),h=(t?.width?t?.width:l.width)+o*2,d=h/2,g=d/(2.5+h/50),f=(t?.height?t?.height:l.height)+g+a*2,m=f*.1;let y;const{cssStyles:C}=t;if(t.look==="handDrawn"){const x=st.svg(n),k=sx(0,0,h,f,d,g,m),S=ox(0,g,h,f,d,g),T=it(t,{}),B=x.path(k,T),L=x.path(S,T);n.insert(()=>L,":first-child").attr("class","line"),y=n.insert(()=>B,":first-child"),y.attr("class","basic label-container"),C&&y.attr("style",C)}else{const x=ix(0,0,h,f,d,g,m);y=n.insert("path",":first-child").attr("d",x).attr("class","basic label-container outer-path").attr("style",zt(C)).attr("style",i)}return y.attr("label-offset-y",g),y.attr("transform",`translate(${-h/2}, ${-(f/2+g)})`),at(t,y),c.attr("transform",`translate(${-(l.width/2)-(l.x-(l.left??0))}, ${-(l.height/2)+g-(l.y-(l.top??0))})`),t.intersect=function(x){const k=rt.rect(t,x),S=k.x-(t.x??0);if(d!=0&&(Math.abs(S)<(t.width??0)/2||Math.abs(S)==(t.width??0)/2&&Math.abs(k.y-(t.y??0))>(t.height??0)/2-g)){let T=g*g*(1-S*S/(d*d));T>0&&(T=Math.sqrt(T)),T=g-T,x.y-(t.y??0)>0&&(T=-T),k.y+=T}return k},n}u(Iu,"linedCylinder");async function Ru(e,t){const{labelStyles:r,nodeStyles:i}=nt(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?16:s,a=t.look==="neo"?12:s;if(t.width||t.height){const T=t.width;t.width=(T??0)*10/11-o*2,t.width<10&&(t.width=10),t.height=(t?.height??0)-a*2,t.height<10&&(t.height=10)}const{shapeSvg:n,bbox:l,label:c}=await ct(e,t,dt(t)),h=(t?.width?t?.width:l.width)+(o??0)*2,d=(t?.height?t?.height:l.height)+(a??0)*2,g=t.look==="neo"?d/4:d/8,f=d+g,{cssStyles:m}=t,y=st.svg(n),C=it(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const x=[{x:-h/2-h/2*.1,y:-f/2},{x:-h/2-h/2*.1,y:f/2},...Ve(-h/2-h/2*.1,f/2,h/2+h/2*.1,f/2,g,.8),{x:h/2+h/2*.1,y:-f/2},{x:-h/2-h/2*.1,y:-f/2},{x:-h/2,y:-f/2},{x:-h/2,y:f/2*1.1},{x:-h/2,y:-f/2}],k=y.polygon(x.map(T=>[T.x,T.y]),C),S=n.insert(()=>k,":first-child");return S.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",m),i&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",i),S.attr("transform",`translate(0,${-g/2})`),c.attr("transform",`translate(${-h/2+(t.padding??0)+h/2*.1/2-(l.x-(l.left??0))},${-d/2+(t.padding??0)-g/2-(l.y-(l.top??0))})`),at(t,S),t.intersect=function(T){return rt.polygon(t,x,T)},n}u(Ru,"linedWaveEdgedRect");async function qu(e,t){const{labelStyles:r,nodeStyles:i}=nt(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?16:s,a=t.look==="neo"?12:s,n=t.look==="neo"?10:5;(t.width||t.height)&&(t.width=Math.max((t?.width??0)-o*2-2*n,10),t.height=Math.max((t?.height??0)-a*2-2*n,10));const{shapeSvg:l,bbox:c,label:h}=await ct(e,t,dt(t)),d=(t?.width?t?.width:c.width)+o*2+2*n,g=(t?.height?t?.height:c.height)+a*2+2*n,f=d-2*n,m=g-2*n,y=-f/2,C=-m/2,{cssStyles:x}=t,k=st.svg(l),S=it(t,{}),T=[{x:y-n,y:C+n},{x:y-n,y:C+m+n},{x:y+f-n,y:C+m+n},{x:y+f-n,y:C+m},{x:y+f,y:C+m},{x:y+f,y:C+m-n},{x:y+f+n,y:C+m-n},{x:y+f+n,y:C-n},{x:y+n,y:C-n},{x:y+n,y:C},{x:y,y:C},{x:y,y:C+n}],B=[{x:y,y:C+n},{x:y+f-n,y:C+n},{x:y+f-n,y:C+m},{x:y+f,y:C+m},{x:y+f,y:C},{x:y,y:C}];t.look!=="handDrawn"&&(S.roughness=0,S.fillStyle="solid");const L=Mt(T);let M=k.path(L,S);const v=Mt(B);let X=k.path(v,S);t.look!=="handDrawn"&&(M=ua(M),X=ua(X));const z=l.insert("g",":first-child");return z.insert(()=>M),z.insert(()=>X),z.attr("class","basic label-container outer-path"),x&&t.look!=="handDrawn"&&z.selectAll("path").attr("style",x),i&&t.look!=="handDrawn"&&z.selectAll("path").attr("style",i),h.attr("transform",`translate(${-(c.width/2)-n-(c.x-(c.left??0))}, ${-(c.height/2)+n-(c.y-(c.top??0))})`),at(t,z),t.intersect=function(I){return rt.polygon(t,T,I)},l}u(qu,"multiRect");async function Nu(e,t){const{labelStyles:r,nodeStyles:i}=nt(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,label:a}=await ct(e,t,dt(t)),n=t.padding??0,l=t.look==="neo"?16:n,c=t.look==="neo"?12:n;let h=!0;(t.width||t.height)&&(h=!1,t.width=(t?.width??0)-l*2,t.height=(t?.height??0)-c*3);const d=Math.max(o.width,t?.width??0)+l*2,g=Math.max(o.height,t?.height??0)+c*3,f=t.look==="neo"?g/4:g/8,m=g+(h?f/2:-f/2),y=-d/2,C=-m/2,x=10,{cssStyles:k}=t,S=Ve(y-x,C+m+x,y+d-x,C+m+x,f,.8),T=S?.[S.length-1],B=[{x:y-x,y:C+x},{x:y-x,y:C+m+x},...S,{x:y+d-x,y:T.y-x},{x:y+d,y:T.y-x},{x:y+d,y:T.y-2*x},{x:y+d+x,y:T.y-2*x},{x:y+d+x,y:C-x},{x:y+x,y:C-x},{x:y+x,y:C},{x:y,y:C},{x:y,y:C+x}],L=[{x:y,y:C+x},{x:y+d-x,y:C+x},{x:y+d-x,y:T.y-x},{x:y+d,y:T.y-x},{x:y+d,y:C},{x:y,y:C}],M=st.svg(s),v=it(t,{});t.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const X=Mt(B),z=M.path(X,v),I=Mt(L),et=M.path(I,v),H=s.insert(()=>z,":first-child");return H.insert(()=>et),H.attr("class","basic label-container outer-path"),k&&t.look!=="handDrawn"&&H.selectAll("path").attr("style",k),i&&t.look!=="handDrawn"&&H.selectAll("path").attr("style",i),H.attr("transform",`translate(0,${-f/2})`),a.attr("transform",`translate(${-(o.width/2)-x-(o.x-(o.left??0))}, ${-(o.height/2)+x-f/2-(o.y-(o.top??0))})`),at(t,H),t.intersect=function(E){return rt.polygon(t,B,E)},s}u(Nu,"multiWaveEdgedRectangle");async function Wu(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:s}=nt(t);t.labelStyle=i,t.useHtmlLabels||Kt(Rt())||(t.centerLabel=!0);const{shapeSvg:a,bbox:n,label:l}=await ct(e,t,dt(t)),c=Math.max(n.width+(t.padding??0)*2,t?.width??0),h=Math.max(n.height+(t.padding??0)*2,t?.height??0),d=-c/2,g=-h/2,{cssStyles:f}=t,m=st.svg(a),y=it(t,{fill:r.noteBkgColor,stroke:r.noteBorderColor});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const C=m.rectangle(d,g,c,h,y),x=a.insert(()=>C,":first-child");return x.attr("class","basic label-container outer-path"),l.attr("class","label noteLabel"),f&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",f),s&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",s),l.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),at(t,x),t.intersect=function(k){return rt.rect(t,k)},a}u(Wu,"note");var ax=u((e,t,r)=>[`M${e+r/2},${t}`,`L${e+r},${t-r/2}`,`L${e+r/2},${t-r}`,`L${e},${t-r/2}`,"Z"].join(" "),"createDecisionBoxPathD");async function zu(e,t){const{labelStyles:r,nodeStyles:i}=nt(t);t.labelStyle=r;const{shapeSvg:s,bbox:o}=await ct(e,t,dt(t)),a=o.width+(t.padding??0),n=o.height+(t.padding??0),l=a+n,c=.5,h=[{x:l/2,y:0},{x:l,y:-l/2},{x:l/2,y:-l},{x:0,y:-l/2}];let d;const{cssStyles:g}=t;if(t.look==="handDrawn"){const f=st.svg(s),m=it(t,{}),y=ax(0,0,l),C=f.path(y,m);d=s.insert(()=>C,":first-child").attr("transform",`translate(${-l/2+c}, ${l/2})`),g&&d.attr("style",g)}else d=Fe(s,l,l,h),d.attr("transform",`translate(${-l/2+c}, ${l/2})`);return i&&d.attr("style",i),at(t,d),t.calcIntersect=function(f,m){const y=f.width,C=[{x:y/2,y:0},{x:y,y:-y/2},{x:y/2,y:-y},{x:0,y:-y/2}],x=rt.polygon(f,C,m);return{x:x.x-.5,y:x.y-.5}},t.intersect=function(f){return this.calcIntersect(t,f)},s}u(zu,"question");async function Hu(e,t){const{labelStyles:r,nodeStyles:i}=nt(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?21:s??0,a=t.look==="neo"?12:s??0,{shapeSvg:n,bbox:l,label:c}=await ct(e,t,dt(t)),h=l.width+(t.look==="neo"?o*2:o),d=Math.max(l.height+(t.look==="neo"?a*2:a),t.height??0),g=d/4,m=-Math.max(h,(t.width??0)-g)/2,y=-d/2,C=y/2,x=[{x:m+C,y},{x:m,y:0},{x:m+C,y:-y},{x:-m,y:-y},{x:-m,y}],{cssStyles:k}=t,S=st.svg(n),T=it(t,{});t.look!=="handDrawn"&&(T.roughness=0,T.fillStyle="solid");const B=Mt(x),L=S.path(B,T),M=n.insert(()=>L,":first-child");return M.attr("class","basic label-container outer-path"),k&&t.look!=="handDrawn"&&M.selectAll("path").attr("style",k),i&&t.look!=="handDrawn"&&M.selectAll("path").attr("style",i),M.attr("transform",`translate(${-C/2},0)`),c.attr("transform",`translate(${-C/2-l.width/2-(l.x-(l.left??0))}, ${-(l.height/2)-(l.y-(l.top??0))})`),at(t,M),t.intersect=function(v){return rt.polygon(t,x,v)},n}u(Hu,"rect_left_inv_arrow");async function ju(e,t){const{labelStyles:r,nodeStyles:i}=nt(t);t.labelStyle=r;let s;t.cssClasses?s="node "+t.cssClasses:s="node default";const o=e.insert("g").attr("class",s).attr("id",t.domId||t.id),a=o.insert("g"),n=o.insert("g").attr("class","label").attr("style",i),l=t.description,c=t.label,h=await He(n,c,t.labelStyle,!0,!0);let d={width:0,height:0};if(Kt(_t())){const v=h.children[0],X=Tt(h);d=v.getBoundingClientRect(),X.attr("width",d.width),X.attr("height",d.height)}D.info("Text 2",l);const g=l||[],f=h.getBBox(),m=await He(n,Array.isArray(g)?g.join("<br/>"):g,t.labelStyle,!0,!0),y=m.children[0],C=Tt(m);d=y.getBoundingClientRect(),C.attr("width",d.width),C.attr("height",d.height);const x=(t.padding||0)/2;Tt(m).attr("transform","translate( "+(d.width>f.width?0:(f.width-d.width)/2)+", "+(f.height+x+5)+")"),Tt(h).attr("transform","translate( "+(d.width<f.width?0:-(f.width-d.width)/2)+", 0)"),d=n.node().getBBox(),n.attr("transform","translate("+-d.width/2+", "+(-d.height/2-x+3)+")");const k=d.width+(t.padding||0),S=d.height+(t.padding||0),T=-d.width/2-x,B=-d.height/2-x;let L,M;if(t.look==="handDrawn"){const v=st.svg(o),X=it(t,{}),z=v.path(le(T,B,k,S,t.rx||0),X),I=v.line(-d.width/2-x,-d.height/2-x+f.height+x,d.width/2+x,-d.height/2-x+f.height+x,X);M=o.insert(()=>(D.debug("Rough node insert CXC",z),I),":first-child"),L=o.insert(()=>(D.debug("Rough node insert CXC",z),z),":first-child")}else L=a.insert("rect",":first-child"),M=a.insert("line"),L.attr("class","outer title-state").attr("style",i).attr("x",-d.width/2-x).attr("y",-d.height/2-x).attr("width",d.width+(t.padding||0)).attr("height",d.height+(t.padding||0)),M.attr("class","divider").attr("x1",-d.width/2-x).attr("x2",d.width/2+x).attr("y1",-d.height/2-x+f.height+x).attr("y2",-d.height/2-x+f.height+x);return at(t,L),t.intersect=function(v){return rt.rect(t,v)},o}u(ju,"rectWithTitle");async function Yu(e,t,{config:{themeVariables:r}}){const i=r?.radius??5,s={rx:i,ry:i,labelPaddingX:(t?.padding??0)*1,labelPaddingY:(t?.padding??0)*1};return Qr(e,t,s)}u(Yu,"roundedRect");var Ze=8;async function Uu(e,t){const{labelStyles:r,nodeStyles:i}=nt(t);t.labelStyle=r;const s=t.look==="neo"?16:t.padding??0,o=t.look==="neo"?12:t.padding??0,{shapeSvg:a,bbox:n,label:l}=await ct(e,t,dt(t)),c=(t?.width??n.width)+s*2+(t.look==="neo"?Ze:Ze*2),h=(t?.height??n.height)+o*2,d=c-Ze,g=h,f=Ze-c/2,m=-h/2,{cssStyles:y}=t,C=st.svg(a),x=it(t,{});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const k=[{x:f,y:m},{x:f+d,y:m},{x:f+d,y:m+g},{x:f-Ze,y:m+g},{x:f-Ze,y:m},{x:f,y:m},{x:f,y:m+g}],S=C.polygon(k.map(B=>[B.x,B.y]),x),T=a.insert(()=>S,":first-child");return T.attr("class","basic label-container outer-path").attr("style",zt(y)),i&&t.look!=="handDrawn"&&T.selectAll("path").attr("style",i),y&&t.look!=="handDrawn"&&T.selectAll("path").attr("style",i),l.attr("transform",`translate(${Ze/2-n.width/2-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),at(t,T),t.intersect=function(B){return rt.rect(t,B)},a}u(Uu,"shadedProcess");async function Gu(e,t){const{labelStyles:r,nodeStyles:i}=nt(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?16:s,a=t.look==="neo"?12:s;(t.width||t.height)&&(t.width=Math.max((t?.width??0)-o*2,10),t.height=Math.max((t?.height??0)/1.5-a*2,10));const{shapeSvg:n,bbox:l,label:c}=await ct(e,t,dt(t)),h=(t?.width?t?.width:l.width)+o*2,d=((t?.height?t?.height:l.height)+a*2)*1.5,g=h,f=d/1.5,m=-g/2,y=-f/2,{cssStyles:C}=t,x=st.svg(n),k=it(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const S=[{x:m,y},{x:m,y:y+f},{x:m+g,y:y+f},{x:m+g,y:y-f/2}],T=Mt(S),B=x.path(T,k),L=n.insert(()=>B,":first-child");return L.attr("class","basic label-container outer-path"),C&&t.look!=="handDrawn"&&L.selectChildren("path").attr("style",C),i&&t.look!=="handDrawn"&&L.selectChildren("path").attr("style",i),L.attr("transform",`translate(0, ${f/4})`),c.attr("transform",`translate(${-g/2+(t.padding??0)-(l.x-(l.left??0))}, ${-f/4+(t.padding??0)-(l.y-(l.top??0))})`),at(t,L),t.intersect=function(M){return rt.polygon(t,S,M)},n}u(Gu,"slopedRect");async function Xu(e,t){const r=t.padding??0,i=t.look==="neo"?16:r*2,s=t.look==="neo"?12:r,o={rx:0,ry:0,labelPaddingX:t.labelPaddingX??i,labelPaddingY:s};return Qr(e,t,o)}u(Xu,"squareRect");async function Vu(e,t){const{labelStyles:r,nodeStyles:i}=nt(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?20:s,a=t.look==="neo"?12:s,{shapeSvg:n,bbox:l}=await ct(e,t,dt(t)),c=l.height+(t.look==="neo"?a*2:a),h=l.width+c/4+(t.look==="neo"?o*2:o),d=c/2,{cssStyles:g}=t,f=st.svg(n),m=it(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=[{x:-h/2+d,y:-c/2},{x:h/2-d,y:-c/2},...Se(-h/2+d,0,d,50,90,270),{x:h/2-d,y:c/2},...Se(h/2-d,0,d,50,270,450)],C=Mt(y),x=f.path(C,m),k=n.insert(()=>x,":first-child");return k.attr("class","basic label-container outer-path"),g&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",g),i&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",i),at(t,k),t.intersect=function(S){return rt.polygon(t,y,S)},n}u(Vu,"stadium");async function Zu(e,t){const r={rx:t.look==="neo"?3:5,ry:t.look==="neo"?3:5};return Qr(e,t,r)}u(Zu,"state");function Ku(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:s}=nt(t);t.labelStyle=i;const{cssStyles:o}=t,{lineColor:a,stateBorder:n,nodeBorder:l,nodeShadow:c}=r;(t.width||t.height)&&((t.width??0)<14&&(t.width=14),(t.height??0)<14&&(t.height=14)),t.width||(t.width=14),t.height||(t.height=14);const h=e.insert("g").attr("class","node default").attr("id",t.domId??t.id),d=st.svg(h),g=it(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const f=d.circle(0,0,t.width,{...g,stroke:a,strokeWidth:2}),m=n??l,y=(t.width??0)*5/14,C=d.circle(0,0,y,{...g,fill:m,stroke:m,strokeWidth:2,fillStyle:"solid"}),x=h.insert(()=>f,":first-child");if(x.insert(()=>C),t.look!=="handDrawn"&&x.attr("class","outer-path"),o&&x.selectAll("path").attr("style",o),s&&x.selectAll("path").attr("style",s),t.width<25&&c&&t.look!=="handDrawn"){const k=e.node()?.ownerSVGElement?.id??"",S=k?`${k}-drop-shadow-small`:"drop-shadow-small";x.attr("style",`filter:url(#${S})`)}return at(t,x),t.intersect=function(k){return rt.circle(t,(t.width??0)/2,k)},h}u(Ku,"stateEnd");function Qu(e,t,{config:{themeVariables:r}}){const{lineColor:i,nodeShadow:s}=r;(t.width||t.height)&&((t.width??0)<14&&(t.width=14),(t.height??0)<14&&(t.height=14)),t.width||(t.width=14),t.height||(t.height=14);const o=e.insert("g").attr("class","node default").attr("id",t.domId||t.id);let a;if(t.look==="handDrawn"){const l=st.svg(o).circle(0,0,t.width,am(i));a=o.insert(()=>l),a.attr("class","state-start").attr("r",(t.width??7)/2).attr("width",t.width??14).attr("height",t.height??14)}else a=o.insert("circle",":first-child"),a.attr("class","state-start").attr("r",(t.width??7)/2).attr("width",t.width??14).attr("height",t.height??14);if(t.width<25&&s&&t.look!=="handDrawn"){const n=e.node()?.ownerSVGElement?.id??"",l=n?`${n}-drop-shadow-small`:"drop-shadow-small";a.attr("style",`filter:url(#${l})`)}return at(t,a),t.intersect=function(n){return rt.circle(t,(t.width??7)/2,n)},o}u(Qu,"stateStart");var Sr=8;async function Ju(e,t){const{labelStyles:r,nodeStyles:i}=nt(t);t.labelStyle=r;const s=t?.padding??8,o=t.look==="neo"?28:s,a=t.look==="neo"?12:s,{shapeSvg:n,bbox:l}=await ct(e,t,dt(t)),c=Math.max(l.width+2*Sr+o,t.width??0),h=Math.max(l.height+a,t.height??0),d=c-2*Sr,g=h,f=-c/2,m=-h/2,y=[{x:0,y:0},{x:d,y:0},{x:d,y:-g},{x:0,y:-g},{x:0,y:0},{x:-8,y:0},{x:d+8,y:0},{x:d+8,y:-g},{x:-8,y:-g},{x:-8,y:0}];if(t.look==="handDrawn"){const C=st.svg(n),x=it(t,{}),k=C.rectangle(f,m,d+16,g,x),S=C.line(f+Sr,m,f+Sr,m+g,x),T=C.line(f+Sr+d,m,f+Sr+d,m+g,x);n.insert(()=>S,":first-child"),n.insert(()=>T,":first-child");const B=n.insert(()=>k,":first-child"),{cssStyles:L}=t;B.attr("class","basic label-container").attr("style",zt(L)),at(t,B)}else{const C=Fe(n,d,g,y);i&&C.attr("style",i),at(t,C)}return t.intersect=function(C){return rt.polygon(t,y,C)},n}u(Ju,"subroutine");var fo=.2;async function tg(e,t){const{labelStyles:r,nodeStyles:i}=nt(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?16:s,a=t.look==="neo"?12:s;(t.width||t.height)&&(t.height=Math.max((t?.height??0)-a*2,10),t.width=Math.max((t?.width??0)-o*2-fo*(t.height+a*2),10));const{shapeSvg:n,bbox:l}=await ct(e,t,dt(t)),c=(t?.height?t?.height:l.height)+a*2,h=fo*c,d=fo*c,f=(t?.width?t?.width:l.width)+o*2+h-h,m=c,y=-f/2,C=-m/2,{cssStyles:x}=t,k=st.svg(n),S=it(t,{}),T=[{x:y-h/2,y:C},{x:y+f+h/2,y:C},{x:y+f+h/2,y:C+m},{x:y-h/2,y:C+m}],B=[{x:y+f-h/2,y:C+m},{x:y+f+h/2,y:C+m},{x:y+f+h/2,y:C+m-d}];t.look!=="handDrawn"&&(S.roughness=0,S.fillStyle="solid");const L=Mt(T),M=k.path(L,S),v=Mt(B),X=k.path(v,{...S,fillStyle:"solid"}),z=n.insert(()=>X,":first-child");return z.insert(()=>M,":first-child"),z.attr("class","basic label-container outer-path"),x&&t.look!=="handDrawn"&&z.selectAll("path").attr("style",x),i&&t.look!=="handDrawn"&&z.selectAll("path").attr("style",i),at(t,z),t.intersect=function(I){return rt.polygon(t,T,I)},n}u(tg,"taggedRect");async function eg(e,t){const{labelStyles:r,nodeStyles:i}=nt(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,label:a}=await ct(e,t,dt(t)),n=Math.max(o.width+(t.padding??0)*2,t?.width??0),l=Math.max(o.height+(t.padding??0)*2,t?.height??0),c=l/8,h=.2*n,d=.2*l,g=l+c,{cssStyles:f}=t,m=st.svg(s),y=it(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const C=[{x:-n/2-n/2*.1,y:g/2},...Ve(-n/2-n/2*.1,g/2,n/2+n/2*.1,g/2,c,.8),{x:n/2+n/2*.1,y:-g/2},{x:-n/2-n/2*.1,y:-g/2}],x=-n/2+n/2*.1,k=-g/2-d*.4,S=[{x:x+n-h,y:(k+l)*1.3},{x:x+n,y:k+l-d},{x:x+n,y:(k+l)*.9},...Ve(x+n,(k+l)*1.25,x+n-h,(k+l)*1.3,-l*.02,.5)],T=Mt(C),B=m.path(T,y),L=Mt(S),M=m.path(L,{...y,fillStyle:"solid"}),v=s.insert(()=>M,":first-child");return v.insert(()=>B,":first-child"),v.attr("class","basic label-container outer-path"),f&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",i),v.attr("transform",`translate(0,${-c/2})`),a.attr("transform",`translate(${-n/2+(t.padding??0)-(o.x-(o.left??0))},${-l/2+(t.padding??0)-c/2-(o.y-(o.top??0))})`),at(t,v),t.intersect=function(X){return rt.polygon(t,C,X)},s}u(eg,"taggedWaveEdgedRectangle");async function rg(e,t){const{labelStyles:r,nodeStyles:i}=nt(t);t.labelStyle=r;const{shapeSvg:s,bbox:o}=await ct(e,t,dt(t)),a=Math.max(o.width+(t.padding??0),t?.width||0),n=Math.max(o.height+(t.padding??0),t?.height||0),l=-a/2,c=-n/2,h=s.insert("rect",":first-child");return h.attr("class","text").attr("style",i).attr("rx",0).attr("ry",0).attr("x",l).attr("y",c).attr("width",a).attr("height",n),at(t,h),t.intersect=function(d){return rt.rect(t,d)},s}u(rg,"text");var nx=u((e,t,r,i,s,o)=>`M${e},${t}
|
|
200
|
+
a${s},${o} 0,0,1 0,${-i}
|
|
201
|
+
l${r},0
|
|
202
|
+
a${s},${o} 0,0,1 0,${i}
|
|
203
|
+
M${r},${-i}
|
|
204
|
+
a${s},${o} 0,0,0 0,${i}
|
|
205
|
+
l${-r},0`,"createCylinderPathD"),lx=u((e,t,r,i,s,o)=>[`M${e},${t}`,`M${e+r},${t}`,`a${s},${o} 0,0,0 0,${-i}`,`l${-r},0`,`a${s},${o} 0,0,0 0,${i}`,`l${r},0`].join(" "),"createOuterCylinderPathD"),hx=u((e,t,r,i,s,o)=>[`M${e+r/2},${-i/2}`,`a${s},${o} 0,0,0 0,${i}`].join(" "),"createInnerCylinderPathD"),Ul=5,Gl=10;async function ig(e,t){const{labelStyles:r,nodeStyles:i}=nt(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?12:s/2,a=t.height??0;if(t.height&&(t.height=t.height-o,t.height<Ul&&(t.height=Ul)),t.width){const x=a/2/(2.5+a/50);t.width=t.width-o-x*3,t.width<Gl&&(t.width=Gl)}const{shapeSvg:n,bbox:l,label:c}=await ct(e,t,dt(t)),h=Math.max(t.height??0,l.height)+o,d=h/2,g=d/(2.5+h/50),f=Math.max(t.width??0,l.width)+g+o,{cssStyles:m}=t;let y;if(t.look==="handDrawn"){const C=st.svg(n),x=lx(0,0,f,h,g,d),k=hx(0,0,f,h,g,d),S=C.path(x,it(t,{})),T=C.path(k,it(t,{fill:"none"}));y=n.insert(()=>T,":first-child"),y=n.insert(()=>S,":first-child"),y.attr("class","basic label-container"),m&&y.attr("style",m)}else{const C=nx(0,0,f,h,g,d);y=n.insert("path",":first-child").attr("d",C).attr("class","basic label-container").attr("style",zt(m)).attr("style",i),y.attr("class","basic label-container outer-path"),m&&y.selectAll("path").attr("style",m),i&&y.selectAll("path").attr("style",i)}return y.attr("label-offset-x",g),y.attr("transform",`translate(${-f/2}, ${h/2} )`),c.attr("transform",`translate(${-(l.width/2)-g-(l.x-(l.left??0))}, ${-(l.height/2)-(l.y-(l.top??0))})`),at(t,y),t.intersect=function(C){const x=rt.rect(t,C),k=x.y-(t.y??0);if(d!=0&&(Math.abs(k)<(t.height??0)/2||Math.abs(k)==(t.height??0)/2&&Math.abs(x.x-(t.x??0))>(t.width??0)/2-g)){let S=g*g*(1-k*k/(d*d));S!=0&&(S=Math.sqrt(Math.abs(S))),S=g-S,C.x-(t.x??0)>0&&(S=-S),x.x+=S}return x},n}u(ig,"tiltedCylinder");async function sg(e,t){const{labelStyles:r,nodeStyles:i}=nt(t);t.labelStyle=r;const s=t.padding??0,o=(t.look==="neo",s),a=t.look==="neo"?s*2:s,{shapeSvg:n,bbox:l}=await ct(e,t,dt(t)),c=Math.max(l.height+o,t.height??0),h=Math.max(l.width+a,(t.width??0)-c),d=[{x:-3*c/6,y:0},{x:h+3*c/6,y:0},{x:h,y:-c},{x:0,y:-c}];let g;const{cssStyles:f}=t;if(t.look==="handDrawn"){const m=st.svg(n),y=it(t,{}),C=Mt(d),x=m.path(C,y);g=n.insert(()=>x,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),f&&g.attr("style",f)}else g=Fe(n,h,c,d);return i&&g.attr("style",i),t.width=h,t.height=c,at(t,g),t.intersect=function(m){return rt.polygon(t,d,m)},n}u(sg,"trapezoid");async function og(e,t){const{labelStyles:r,nodeStyles:i}=nt(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?16:s,a=t.look==="neo"?12:s,n=15,l=5;(t.width||t.height)&&(t.height=(t.height??0)-a*2,t.height<l&&(t.height=l),t.width=(t.width??0)-o*2,t.width<n&&(t.width=n));const{shapeSvg:c,bbox:h}=await ct(e,t,dt(t)),d=(t?.width?t?.width:h.width)+o*2,g=(t?.height?t?.height:h.height)+a*2,{cssStyles:f}=t,m=st.svg(c),y=it(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const C=[{x:-d/2*.8,y:-g/2},{x:d/2*.8,y:-g/2},{x:d/2,y:-g/2*.6},{x:d/2,y:g/2},{x:-d/2,y:g/2},{x:-d/2,y:-g/2*.6}],x=Mt(C),k=m.path(x,y),S=c.insert(()=>k,":first-child");return S.attr("class","basic label-container outer-path"),f&&t.look!=="handDrawn"&&S.selectChildren("path").attr("style",f),i&&t.look!=="handDrawn"&&S.selectChildren("path").attr("style",i),at(t,S),t.intersect=function(T){return rt.polygon(t,C,T)},c}u(og,"trapezoidalPentagon");var Xl=10,Vl=10;async function ag(e,t){const{labelStyles:r,nodeStyles:i}=nt(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?s*2:s;(t.width||t.height)&&(t.width=((t?.width??0)-o)/2,t.width<Vl&&(t.width=Vl),t.height=t?.height??0,t.height<Xl&&(t.height=Xl));const{shapeSvg:a,bbox:n,label:l}=await ct(e,t,dt(t)),c=Le(_t().flowchart?.htmlLabels),h=(t?.width?t?.width:n.width)+o,d=t?.height?t?.height:h+n.height,g=d,f=[{x:0,y:0},{x:g,y:0},{x:g/2,y:-d}],{cssStyles:m}=t,y=st.svg(a),C=it(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const x=Mt(f),k=y.path(x,C),S=a.insert(()=>k,":first-child").attr("transform",`translate(${-d/2}, ${d/2})`).attr("class","outer-path");return m&&t.look!=="handDrawn"&&S.selectChildren("path").attr("style",m),i&&t.look!=="handDrawn"&&S.selectChildren("path").attr("style",i),t.width=h,t.height=d,at(t,S),l.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${d/2-(n.height+(t.padding??0)/(c?2:1)-(n.y-(n.top??0)))})`),t.intersect=function(T){return D.info("Triangle intersect",t,f,T),rt.polygon(t,f,T)},a}u(ag,"triangle");async function ng(e,t){const{labelStyles:r,nodeStyles:i}=nt(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?16:s,a=t.look==="neo"?12:s;let n=!0;(t.width||t.height)&&(n=!1,t.width=(t?.width??0)-o*2,t.width<10&&(t.width=10),t.height=(t?.height??0)-a*2,t.height<10&&(t.height=10));const{shapeSvg:l,bbox:c,label:h}=await ct(e,t,dt(t)),d=(t?.width?t?.width:c.width)+(o??0)*2,g=(t?.height?t?.height:c.height)+(a??0)*2,f=t.look==="neo"?g/4:g/8,m=g+(n?f:-f),{cssStyles:y}=t,x=14-d,k=x>0?x/2:0,S=st.svg(l),T=it(t,{});t.look!=="handDrawn"&&(T.roughness=0,T.fillStyle="solid");const B=[{x:-d/2-k,y:m/2},...Ve(-d/2-k,m/2,d/2+k,m/2,f,.8),{x:d/2+k,y:-m/2},{x:-d/2-k,y:-m/2}],L=Mt(B),M=S.path(L,T),v=l.insert(()=>M,":first-child");return v.attr("class","basic label-container outer-path"),y&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",y),i&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",i),v.attr("transform",`translate(0,${-f/2})`),h.attr("transform",`translate(${-d/2+(t.padding??0)-(c.x-(c.left??0))},${-g/2+(t.padding??0)-f-(c.y-(c.top??0))})`),at(t,v),t.intersect=function(X){return rt.polygon(t,B,X)},l}u(ng,"waveEdgedRectangle");async function lg(e,t){const{labelStyles:r,nodeStyles:i}=nt(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?16:s,a=t.look==="neo"?20:s;if(t.width||t.height){t.width=t?.width??0,t.width<20&&(t.width=20),t.height=t?.height??0,t.height<10&&(t.height=10);const T=Math.min(t.height*.2,t.height/4);t.height=Math.ceil(t.height-a-T*(20/9)),t.width=t.width-o*2}const{shapeSvg:n,bbox:l}=await ct(e,t,dt(t)),c=(t?.width?t?.width:l.width)+o*2,h=(t?.height?t?.height:l.height)+a,d=h/8,g=h+d*2,{cssStyles:f}=t,m=st.svg(n),y=it(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const C=[{x:-c/2,y:g/2},...Ve(-c/2,g/2,c/2,g/2,d,1),{x:c/2,y:-g/2},...Ve(c/2,-g/2,-c/2,-g/2,d,-1)],x=Mt(C),k=m.path(x,y),S=n.insert(()=>k,":first-child");return S.attr("class","basic label-container"),f&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",i),at(t,S),t.intersect=function(T){return rt.polygon(t,C,T)},n}u(lg,"waveRectangle");var qt=10;async function hg(e,t){const{labelStyles:r,nodeStyles:i}=nt(t);t.labelStyle=r;const s=t.look==="neo"?16:t.padding??0,o=t.look==="neo"?12:t.padding??0;(t.width||t.height)&&(t.width=Math.max((t?.width??0)-s*2-qt,10),t.height=Math.max((t?.height??0)-o*2-qt,10));const{shapeSvg:a,bbox:n,label:l}=await ct(e,t,dt(t)),c=(t?.width?t?.width:n.width)+s*2+qt,h=(t?.height?t?.height:n.height)+o*2+qt,d=c-qt,g=h-qt,f=-d/2,m=-g/2,{cssStyles:y}=t,C=st.svg(a),x=it(t,{}),k=[{x:f-qt,y:m-qt},{x:f-qt,y:m+g},{x:f+d,y:m+g},{x:f+d,y:m-qt}],S=`M${f-qt},${m-qt} L${f+d},${m-qt} L${f+d},${m+g} L${f-qt},${m+g} L${f-qt},${m-qt}
|
|
206
|
+
M${f-qt},${m} L${f+d},${m}
|
|
207
|
+
M${f},${m-qt} L${f},${m+g}`;t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const T=C.path(S,x),B=a.insert(()=>T,":first-child");return B.attr("transform",`translate(${qt/2}, ${qt/2})`),B.attr("class","basic label-container outer-path"),y&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",y),i&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",i),l.attr("transform",`translate(${-(n.width/2)+qt/2-(n.x-(n.left??0))}, ${-(n.height/2)+qt/2-(n.y-(n.top??0))})`),at(t,B),t.intersect=function(L){return rt.polygon(t,k,L)},a}u(hg,"windowPane");var Zl=new Set(["redux-color","redux-dark-color"]),cx=new Set(["redux","redux-dark","redux-color","redux-dark-color"]);async function un(e,t){const r=t;r.alias&&(t.label=r.alias);const{theme:i,themeVariables:s}=Rt(),{rowEven:o,rowOdd:a,nodeBorder:n,borderColorArray:l}=s;if(t.look==="handDrawn"){const{themeVariables:ht}=Rt(),{background:ft}=ht,vt={...t,id:t.id+"-background",domId:(t.domId||t.id)+"-background",look:"default",cssStyles:["stroke: none",`fill: ${ft}`]};await un(e,vt)}const c=Rt();t.useHtmlLabels=c.htmlLabels;let h=c.er?.diagramPadding??10,d=c.er?.entityPadding??6;const{cssStyles:g}=t,{labelStyles:f,nodeStyles:m}=nt(t);if(r.attributes.length===0&&t.label){const ht={rx:0,ry:0,labelPaddingX:h,labelPaddingY:h*1.5};De(t.label,c)+ht.labelPaddingX*2<c.er.minEntityWidth&&(t.width=c.er.minEntityWidth);const ft=await Qr(e,t,ht);if(i!=null&&Zl.has(i)){const vt=r.colorIndex??0;ft.attr("data-color-id",`color-${vt%l.length}`)}if(!Le(c.htmlLabels)){const vt=ft.select("text"),kt=vt.node()?.getBBox();vt.attr("transform",`translate(${-kt.width/2}, 0)`)}return ft}c.htmlLabels||(h*=1.25,d*=1.25);let y=dt(t);y||(y="node default");const C=e.insert("g").attr("class",y).attr("id",t.domId||t.id),x=await Tr(C,t.label??"",c,0,0,["name"],f);x.height+=d;let k=0;const S=[],T=[];let B=0,L=0,M=0,v=0,X=!0,z=!0;for(const ht of r.attributes){const ft=await Tr(C,ht.type,c,0,k,["attribute-type"],f);B=Math.max(B,ft.width+h);const vt=await Tr(C,ht.name,c,0,k,["attribute-name"],f);L=Math.max(L,vt.width+h);const kt=await Tr(C,ht.keys.join(),c,0,k,["attribute-keys"],f);M=Math.max(M,kt.width+h);const Et=await Tr(C,ht.comment,c,0,k,["attribute-comment"],f);v=Math.max(v,Et.width+h);const Ot=Math.max(ft.height,vt.height,kt.height,Et.height)+d;T.push({yOffset:k,rowHeight:Ot}),k+=Ot}let I=4;M<=h&&(X=!1,M=0,I--),v<=h&&(z=!1,v=0,I--);const et=C.node().getBBox();if(x.width+h*2-(B+L+M+v)>0){const ht=x.width+h*2-(B+L+M+v);B+=ht/I,L+=ht/I,M>0&&(M+=ht/I),v>0&&(v+=ht/I)}const H=B+L+M+v,E=st.svg(C),O=it(t,{});t.look!=="handDrawn"&&(O.roughness=0,O.fillStyle="solid");let _=0;T.length>0&&(_=T.reduce((ht,ft)=>ht+(ft?.rowHeight??0),0));const R=Math.max(et.width+h*2,t?.width||0,H),$=Math.max((_??0)+x.height,t?.height||0),J=-R/2,Z=-$/2;if(C.selectAll("g:not(:first-child)").each((ht,ft,vt)=>{const kt=Tt(vt[ft]),Et=kt.attr("transform");let Ot=0,Jt=0;if(Et){const me=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(Et);me&&(Ot=parseFloat(me[1]),Jt=parseFloat(me[2]),kt.attr("class").includes("attribute-name")?Ot+=B:kt.attr("class").includes("attribute-keys")?Ot+=B+L:kt.attr("class").includes("attribute-comment")&&(Ot+=B+L+M))}kt.attr("transform",`translate(${J+h/2+Ot}, ${Jt+Z+x.height+d/2})`)}),C.select(".name").attr("transform","translate("+-x.width/2+", "+(Z+d/2)+")"),i!=null&&Zl.has(i)){const ht=r.colorIndex??0;C.attr("data-color-id",`color-${ht%l.length}`)}const ut=E.rectangle(J,Z,R,$,O),xt=C.insert(()=>ut,":first-child").attr("class","outer-path").attr("style",g.join(""));S.push(0);for(const[ht,ft]of T.entries()){const kt=(ht+1)%2===0&&ft.yOffset!==0,Et=E.rectangle(J,x.height+Z+ft?.yOffset,R,ft?.rowHeight,{...O,fill:kt?o:a,stroke:n});C.insert(()=>Et,"g.label").attr("style",g.join("")).attr("class",`row-rect-${kt?"even":"odd"}`)}const Ct=1e-4;let St=Br(J,x.height+Z,R+J,x.height+Z,Ct),wt=E.polygon(St.map(ht=>[ht.x,ht.y]),O);if(C.insert(()=>wt).attr("class","divider"),St=Br(B+J,x.height+Z,B+J,$+Z,Ct),wt=E.polygon(St.map(ht=>[ht.x,ht.y]),O),C.insert(()=>wt).attr("class","divider"),X){const ht=B+L+J;St=Br(ht,x.height+Z,ht,$+Z,Ct),wt=E.polygon(St.map(ft=>[ft.x,ft.y]),O),C.insert(()=>wt).attr("class","divider")}if(z){const ht=B+L+M+J;St=Br(ht,x.height+Z,ht,$+Z,Ct),wt=E.polygon(St.map(ft=>[ft.x,ft.y]),O),C.insert(()=>wt).attr("class","divider")}for(const ht of S){const ft=x.height+Z+ht;St=Br(J,ft,R+J,ft,Ct),wt=E.polygon(St.map(vt=>[vt.x,vt.y]),O),C.insert(()=>wt).attr("class","divider")}if(at(t,xt),m&&t.look!=="handDrawn")if(i!=null&&cx.has(i))C.selectAll("path").attr("style",m);else{const ft=m.split(";")?.filter(vt=>vt.includes("stroke"))?.map(vt=>`${vt}`).join("; ");C.selectAll("path").attr("style",ft??""),C.selectAll(".row-rect-even path").attr("style",m)}return t.intersect=function(ht){return rt.rect(t,ht)},C}u(un,"erBox");async function Tr(e,t,r,i=0,s=0,o=[],a=""){const n=e.insert("g").attr("class",`label ${o.join(" ")}`).attr("transform",`translate(${i}, ${s})`).attr("style",a);t!==Qn(t)&&(t=Qn(t),t=t.replaceAll("<","<").replaceAll(">",">"));const l=n.node().appendChild(await ye(n,t,{width:De(t,r)+100,style:a,useHtmlLabels:r.htmlLabels},r));if(t.includes("<")||t.includes(">")){let h=l.children[0];for(h.textContent=h.textContent.replaceAll("<","<").replaceAll(">",">");h.childNodes[0];)h=h.childNodes[0],h.textContent=h.textContent.replaceAll("<","<").replaceAll(">",">")}let c=l.getBBox();if(Le(r.htmlLabels)){const h=l.children[0];h.style.textAlign="start";const d=Tt(l);c=h.getBoundingClientRect(),d.attr("width",c.width),d.attr("height",c.height)}return c}u(Tr,"addText");function Br(e,t,r,i,s){return e===r?[{x:e-s/2,y:t},{x:e+s/2,y:t},{x:r+s/2,y:i},{x:r-s/2,y:i}]:[{x:e,y:t-s/2},{x:e,y:t+s/2},{x:r,y:i+s/2},{x:r,y:i-s/2}]}u(Br,"lineToPolygon");async function cg(e,t,r,i,s=r.class.padding??12){const o=i?0:3,a=e.insert("g").attr("class",dt(t)).attr("id",t.domId||t.id);let n=null,l=null,c=null,h=null,d=0,g=0,f=0;if(n=a.insert("g").attr("class","annotation-group text"),t.annotations.length>0){const k=t.annotations[0];await bi(n,{text:`«${k}»`},0),d=n.node().getBBox().height}l=a.insert("g").attr("class","label-group text"),await bi(l,t,0,["font-weight: bolder"]);const m=l.node().getBBox();g=m.height,c=a.insert("g").attr("class","members-group text");let y=0;for(const k of t.members){const S=await bi(c,k,y,[k.parseClassifier()]);y+=S+o}f=c.node().getBBox().height,f<=0&&(f=s/2),h=a.insert("g").attr("class","methods-group text");let C=0;for(const k of t.methods){const S=await bi(h,k,C,[k.parseClassifier()]);C+=S+o}let x=a.node().getBBox();if(n!==null){const k=n.node().getBBox();n.attr("transform",`translate(${-k.width/2})`)}return l.attr("transform",`translate(${-m.width/2}, ${d})`),x=a.node().getBBox(),c.attr("transform",`translate(0, ${d+g+s*2})`),x=a.node().getBBox(),h.attr("transform",`translate(0, ${d+g+(f?f+s*4:s*2)})`),x=a.node().getBBox(),{shapeSvg:a,bbox:x}}u(cg,"textHelper");async function bi(e,t,r,i=[]){const s=e.insert("g").attr("class","label").attr("style",i.join("; ")),o=Rt();let a="useHtmlLabels"in t?t.useHtmlLabels:Le(o.htmlLabels)??!0,n="";"text"in t?n=t.text:n=t.label,!a&&n.startsWith("\\")&&(n=n.substring(1)),Ei(n)&&(a=!0);const l=await ye(s,$a(Ge(n)),{width:De(n,o)+50,classes:"markdown-node-label",useHtmlLabels:a},o);let c,h=1;if(a){const d=l.children[0],g=Tt(l);h=d.innerHTML.split("<br>").length,d.innerHTML.includes("</math>")&&(h+=d.innerHTML.split("<mrow>").length-1),await ln(d),c=d.getBoundingClientRect(),g.attr("width",c.width),g.attr("height",c.height)}else{i.includes("font-weight: bolder")&&Tt(l).selectAll("tspan").attr("font-weight",""),h=l.children.length;const d=l.children[0];(l.textContent===""||l.textContent.includes(">"))&&(d.textContent=n[0]+n.substring(1).replaceAll(">",">").replaceAll("<","<").trim(),n[1]===" "&&(d.textContent=d.textContent[0]+" "+d.textContent.substring(1))),d.textContent==="undefined"&&(d.textContent=""),c=l.getBBox()}return s.attr("transform","translate(0,"+(-c.height/(2*h)+r)+")"),c.height}u(bi,"addText");async function dg(e,t){const r=_t(),{themeVariables:i}=r,{useGradient:s}=i,o=r.class.padding??12,a=o,n=t.useHtmlLabels??Le(r.htmlLabels)??!0,l=t;l.annotations=l.annotations??[],l.members=l.members??[],l.methods=l.methods??[];const{shapeSvg:c,bbox:h}=await cg(e,t,r,n,a),{labelStyles:d,nodeStyles:g}=nt(t);t.labelStyle=d,t.cssStyles=l.styles||"";const f=l.styles?.join(";")||g||"";t.cssStyles||(t.cssStyles=f.replaceAll("!important","").split(";"));const m=l.members.length===0&&l.methods.length===0&&!r.class?.hideEmptyMembersBox,y=st.svg(c),C=it(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const x=Math.max(t.width??0,h.width);let k=Math.max(t.height??0,h.height);const S=(t.height??0)>h.height;l.members.length===0&&l.methods.length===0?k+=a:l.members.length>0&&l.methods.length===0&&(k+=a*2);const T=-x/2,B=-k/2;let L=m?o*2:l.members.length===0&&l.methods.length===0?-o:0;S&&(L=o*2);const M=y.rectangle(T-o,B-o-(m?o:l.members.length===0&&l.methods.length===0?-o/2:0),x+2*o,k+2*o+L,C),v=c.insert(()=>M,":first-child");v.attr("class","basic label-container outer-path");const X=v.node().getBBox(),z=c.select(".annotation-group").node().getBBox().height-(m?o/2:0)||0,I=c.select(".label-group").node().getBBox().height-(m?o/2:0)||0,et=c.select(".members-group").node().getBBox().height-(m?o/2:0)||0,H=(z+I+B+o-(B-o-(m?o:l.members.length===0&&l.methods.length===0?-o/2:0)))/2;if(c.selectAll(".text").each((E,O,_)=>{const R=Tt(_[O]),$=R.attr("transform");let J=0;if($){const Ct=RegExp(/translate\(([^,]+),([^)]+)\)/).exec($);Ct&&(J=parseFloat(Ct[2]))}let Z=J+B+o-(m?o:l.members.length===0&&l.methods.length===0?-o/2:0);if(R.attr("class").includes("methods-group")){const xt=Math.max(et,a/2);S?Z=Math.max(H,z+I+xt+B+a*2+o)+a*2:Z=z+I+xt+B+a*4+o}l.members.length===0&&l.methods.length===0&&r.class?.hideEmptyMembersBox&&(l.annotations.length>0?Z=J-a:Z=J),n||(Z-=4);let ut=T;(R.attr("class").includes("label-group")||R.attr("class").includes("annotation-group"))&&(ut=-R.node()?.getBBox().width/2||0,c.selectAll("text").each(function(xt,Ct,St){window.getComputedStyle(St[Ct]).textAnchor==="middle"&&(ut=0)})),R.attr("transform",`translate(${ut}, ${Z})`)}),l.members.length>0||l.methods.length>0||m){const E=z+I+B+o,O=y.line(X.x,E,X.x+X.width,E+.001,C);c.insert(()=>O).attr("class",`divider${t.look==="neo"&&!s?" neo-line":""}`).attr("style",f)}if(m||l.members.length>0||l.methods.length>0){const E=z+I+et+B+a*2+o,O=y.line(X.x,S?Math.max(H,E):E,X.x+X.width,(S?Math.max(H,E):E)+.001,C);c.insert(()=>O).attr("class",`divider${t.look==="neo"&&!s?" neo-line":""}`).attr("style",f)}if(l.look!=="handDrawn"&&c.selectAll("path").attr("style",f),v.select(":nth-child(2)").attr("style",f),c.selectAll(".divider").select("path").attr("style",f),t.labelStyle?c.selectAll("span").attr("style",t.labelStyle):c.selectAll("span").attr("style",f),!n){const E=RegExp(/color\s*:\s*([^;]*)/),O=E.exec(f);if(O){const _=O[0].replace("color","fill");c.selectAll("tspan").attr("style",_)}else if(d){const _=E.exec(d);if(_){const R=_[0].replace("color","fill");c.selectAll("tspan").attr("style",R)}}}return at(t,v),t.intersect=function(E){return rt.rect(t,E)},c}u(dg,"classBox");async function ug(e,t){const{labelStyles:r,nodeStyles:i}=nt(t);t.labelStyle=r;const s=t,o=t,a=20,n=20,l="verifyMethod"in t,c=dt(t),h=_t(),{themeVariables:d}=h,{borderColorArray:g,requirementEdgeLabelBackground:f}=d,m=h.layout==="elk"?"start":"center",y=e.insert("g").attr("class",c).attr("id",t.domId??t.id);let C;l?C=await be(y,`<<${s.type}>>`,0,t.labelStyle):C=await be(y,"<<Element>>",0,t.labelStyle);let x=C;const k=await be(y,s.name,x,t.labelStyle+"; font-weight: bold;");if(x+=k+n,l){const I=await be(y,`${s.requirementId?`ID: ${s.requirementId}`:""}`,x,t.labelStyle,m);x+=I;const et=await be(y,`${s.text?`Text: ${s.text}`:""}`,x,t.labelStyle,m);x+=et;const H=await be(y,`${s.risk?`Risk: ${s.risk}`:""}`,x,t.labelStyle,m);x+=H,await be(y,`${s.verifyMethod?`Verification: ${s.verifyMethod}`:""}`,x,t.labelStyle,m)}else{const I=await be(y,`${o.type?`Type: ${o.type}`:""}`,x,t.labelStyle,m);x+=I,await be(y,`${o.docRef?`Doc Ref: ${o.docRef}`:""}`,x,t.labelStyle,m)}const S=(y.node()?.getBBox().width??200)+a,T=(y.node()?.getBBox().height??200)+a,B=-S/2,L=-T/2,M=st.svg(y),v=it(t,{});t.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const X=M.rectangle(B,L,S,T,v),z=y.insert(()=>X,":first-child");if(z.attr("class","basic label-container outer-path").attr("style",i),g?.length){const I=t.colorIndex??0;y.attr("data-color-id",`color-${I%g.length}`)}if(y.selectAll(".label").each((I,et,H)=>{const E=Tt(H[et]),O=E.attr("transform");let _=0,R=0;if(O){const ut=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(O);ut&&(_=parseFloat(ut[1]),R=parseFloat(ut[2]))}const $=R-T/2;let J=B+a/2;(et===0||et===1)&&(J=_),E.attr("transform",`translate(${J}, ${$+a})`)}),x>C+k+n){const I=L+C+k+n;let et;if(t.look==="neo"){const O=[[B,I],[B+S,I],[B+S,I+.001],[B,I+.001]];et=M.polygon(O,v)}else et=M.line(B,I,B+S,I,v);y.insert(()=>et).attr("class","divider")}return at(t,z),t.intersect=function(I){return rt.rect(t,I)},i&&t.look!=="handDrawn"&&(f||g?.length)&&y.selectAll("path").attr("style",i),y}u(ug,"requirementBox");async function be(e,t,r,i="",s="center"){if(t==="")return 0;const o=e.insert("g").attr("class","label").attr("style",i),a=_t(),n=a.htmlLabels??!0,l=await ye(o,$a(Ge(t)),{width:De(t,a)+50,classes:"markdown-node-label",useHtmlLabels:n,style:i},a);let c;if(n){const h=l.children[0],d=Tt(l);s==="start"&&Tt(h).style("text-align","left"),c=h.getBoundingClientRect(),d.attr("width",c.width),d.attr("height",c.height)}else{const h=l.children[0];for(const d of h.children)i&&d.setAttribute("style",i);if(s==="start"){h.setAttribute("text-anchor","start");for(const d of h.children)d.setAttribute("text-anchor","start")}c=l.getBBox(),c.height+=6}return o.attr("transform",`translate(${-c.width/2},${-c.height/2+r})`),c.height}u(be,"addText");var dx=u(e=>{switch(e){case"Very High":return"red";case"High":return"orange";case"Medium":return null;case"Low":return"blue";case"Very Low":return"lightblue"}},"colorFromPriority");async function gg(e,t,{config:r}){const{labelStyles:i,nodeStyles:s}=nt(t);t.labelStyle=i||"";const o=10,a=t.width;t.width=(t.width??200)-10;const{shapeSvg:n,bbox:l,label:c}=await ct(e,t,dt(t)),h=t.padding||10;let d="",g;"ticket"in t&&t.ticket&&r?.kanban?.ticketBaseUrl&&(d=r?.kanban?.ticketBaseUrl.replace("#TICKET#",t.ticket),g=n.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",d).attr("target","_blank"));const f={useHtmlLabels:t.useHtmlLabels,labelStyle:t.labelStyle||"",width:t.width,img:t.img,padding:t.padding||8,centerLabel:!1};let m,y;g?{label:m,bbox:y}=await go(g,"ticket"in t&&t.ticket||"",f):{label:m,bbox:y}=await go(n,"ticket"in t&&t.ticket||"",f);const{label:C,bbox:x}=await go(n,"assigned"in t&&t.assigned||"",f);t.width=a;const k=10,S=t?.width||0,T=Math.max(y.height,x.height)/2,B=Math.max(l.height+k*2,t?.height||0)+T,L=-S/2,M=-B/2;c.attr("transform","translate("+(h-S/2)+", "+(-T-l.height/2)+")"),m.attr("transform","translate("+(h-S/2)+", "+(-T+l.height/2)+")"),C.attr("transform","translate("+(h+S/2-x.width-2*o)+", "+(-T+l.height/2)+")");let v;const{rx:X,ry:z}=t,{cssStyles:I}=t;if(t.look==="handDrawn"){const et=st.svg(n),H=it(t,{}),E=X||z?et.path(le(L,M,S,B,X||0),H):et.rectangle(L,M,S,B,H);v=n.insert(()=>E,":first-child"),v.attr("class","basic label-container").attr("style",I||null)}else{v=n.insert("rect",":first-child"),v.attr("class","basic label-container __APA__").attr("style",s).attr("rx",X??5).attr("ry",z??5).attr("x",L).attr("y",M).attr("width",S).attr("height",B);const et="priority"in t&&t.priority;if(et){const H=n.append("line"),E=L+2,O=M+Math.floor((X??0)/2),_=M+B-Math.floor((X??0)/2);H.attr("x1",E).attr("y1",O).attr("x2",E).attr("y2",_).attr("stroke-width","4").attr("stroke",dx(et))}}return at(t,v),t.height=B,t.intersect=function(et){return rt.rect(t,et)},n}u(gg,"kanbanItem");async function pg(e,t){const{labelStyles:r,nodeStyles:i}=nt(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,halfPadding:a,label:n}=await ct(e,t,dt(t)),l=o.width+10*a,c=o.height+8*a,h=.15*l,{cssStyles:d}=t,g=o.width+20,f=o.height+20,m=Math.max(l,g),y=Math.max(c,f);n.attr("transform",`translate(${-o.width/2}, ${-o.height/2})`);let C;const x=`M0 0
|
|
208
|
+
a${h},${h} 1 0,0 ${m*.25},${-1*y*.1}
|
|
209
|
+
a${h},${h} 1 0,0 ${m*.25},0
|
|
210
|
+
a${h},${h} 1 0,0 ${m*.25},0
|
|
211
|
+
a${h},${h} 1 0,0 ${m*.25},${y*.1}
|
|
212
|
+
|
|
213
|
+
a${h},${h} 1 0,0 ${m*.15},${y*.33}
|
|
214
|
+
a${h*.8},${h*.8} 1 0,0 0,${y*.34}
|
|
215
|
+
a${h},${h} 1 0,0 ${-1*m*.15},${y*.33}
|
|
216
|
+
|
|
217
|
+
a${h},${h} 1 0,0 ${-1*m*.25},${y*.15}
|
|
218
|
+
a${h},${h} 1 0,0 ${-1*m*.25},0
|
|
219
|
+
a${h},${h} 1 0,0 ${-1*m*.25},0
|
|
220
|
+
a${h},${h} 1 0,0 ${-1*m*.25},${-1*y*.15}
|
|
221
|
+
|
|
222
|
+
a${h},${h} 1 0,0 ${-1*m*.1},${-1*y*.33}
|
|
223
|
+
a${h*.8},${h*.8} 1 0,0 0,${-1*y*.34}
|
|
224
|
+
a${h},${h} 1 0,0 ${m*.1},${-1*y*.33}
|
|
225
|
+
H0 V0 Z`;if(t.look==="handDrawn"){const k=st.svg(s),S=it(t,{}),T=k.path(x,S);C=s.insert(()=>T,":first-child"),C.attr("class","basic label-container").attr("style",zt(d))}else C=s.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",x);return C.attr("transform",`translate(${-m/2}, ${-y/2})`),at(t,C),t.calcIntersect=function(k,S){return rt.rect(k,S)},t.intersect=function(k){return D.info("Bang intersect",t,k),rt.rect(t,k)},s}u(pg,"bang");async function fg(e,t){const{labelStyles:r,nodeStyles:i}=nt(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,halfPadding:a,label:n}=await ct(e,t,dt(t)),l=o.width+2*a,c=o.height+2*a,h=.15*l,d=.25*l,g=.35*l,f=.2*l,{cssStyles:m}=t;let y;const C=`M0 0
|
|
226
|
+
a${h},${h} 0 0,1 ${l*.25},${-1*l*.1}
|
|
227
|
+
a${g},${g} 1 0,1 ${l*.4},${-1*l*.1}
|
|
228
|
+
a${d},${d} 1 0,1 ${l*.35},${l*.2}
|
|
229
|
+
|
|
230
|
+
a${h},${h} 1 0,1 ${l*.15},${c*.35}
|
|
231
|
+
a${f},${f} 1 0,1 ${-1*l*.15},${c*.65}
|
|
232
|
+
|
|
233
|
+
a${d},${h} 1 0,1 ${-1*l*.25},${l*.15}
|
|
234
|
+
a${g},${g} 1 0,1 ${-1*l*.5},0
|
|
235
|
+
a${h},${h} 1 0,1 ${-1*l*.25},${-1*l*.15}
|
|
236
|
+
|
|
237
|
+
a${h},${h} 1 0,1 ${-1*l*.1},${-1*c*.35}
|
|
238
|
+
a${f},${f} 1 0,1 ${l*.1},${-1*c*.65}
|
|
239
|
+
H0 V0 Z`;if(t.look==="handDrawn"){const x=st.svg(s),k=it(t,{}),S=x.path(C,k);y=s.insert(()=>S,":first-child"),y.attr("class","basic label-container").attr("style",zt(m))}else y=s.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",C);return n.attr("transform",`translate(${-o.width/2}, ${-o.height/2})`),y.attr("transform",`translate(${-l/2}, ${-c/2})`),at(t,y),t.calcIntersect=function(x,k){return rt.rect(x,k)},t.intersect=function(x){return D.info("Cloud intersect",t,x),rt.rect(t,x)},s}u(fg,"cloud");async function yg(e,t){const{labelStyles:r,nodeStyles:i}=nt(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,halfPadding:a,label:n}=await ct(e,t,dt(t)),l=o.width+8*a,c=o.height+2*a,h=5,d=t.look==="neo"?`
|
|
240
|
+
M${-l/2} ${c/2-h}
|
|
241
|
+
v${-c+2*h}
|
|
242
|
+
q0,-${h} ${h},-${h}
|
|
243
|
+
h${l-2*h}
|
|
244
|
+
q${h},0 ${h},${h}
|
|
245
|
+
v${c-h}
|
|
246
|
+
H${-l/2}
|
|
247
|
+
Z
|
|
248
|
+
`:`
|
|
249
|
+
M${-l/2} ${c/2-h}
|
|
250
|
+
v${-c+2*h}
|
|
251
|
+
q0,-${h} ${h},-${h}
|
|
252
|
+
h${l-2*h}
|
|
253
|
+
q${h},0 ${h},${h}
|
|
254
|
+
v${c-2*h}
|
|
255
|
+
q0,${h} ${-h},${h}
|
|
256
|
+
h${-(l-2*h)}
|
|
257
|
+
q${-h},0 ${-h},${-h}
|
|
258
|
+
Z
|
|
259
|
+
`;if(!t.domId)throw new Error(`defaultMindmapNode: node "${t.id}" is missing a domId — was render.ts domId prefixing skipped?`);const g=s.append("path").attr("id",t.domId).attr("class","node-bkg node-"+t.type).attr("style",i).attr("d",d);return s.append("line").attr("class","node-line-").attr("x1",-l/2).attr("y1",c/2).attr("x2",l/2).attr("y2",c/2),n.attr("transform",`translate(${-o.width/2}, ${-o.height/2})`),s.append(()=>n.node()),at(t,g),t.calcIntersect=function(f,m){return rt.rect(f,m)},t.intersect=function(f){return rt.rect(t,f)},s}u(yg,"defaultMindmapNode");async function mg(e,t){const r={padding:t.padding??0};return dn(e,t,r)}u(mg,"mindmapCircle");var ux=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:Xu},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:Yu},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:Vu},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:Ju},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:yu},{semanticName:"Data Store",name:"Data Store",shortName:"datastore",description:"Data flow diagram data store",aliases:["data-store"],handler:mu},{semanticName:"Folder",name:"Folder",shortName:"folder",description:"Folder or directory",aliases:["directory"],handler:wu},{semanticName:"Bucket",name:"Bucket",shortName:"bucket",description:"Object storage bucket",handler:eu},{semanticName:"Console",name:"Console (terminal window)",shortName:"console",description:"Terminal or console window",handler:lu},{semanticName:"Browser",name:"Browser",shortName:"browser",description:"Browser window",handler:su},{semanticName:"Person",name:"Person",shortName:"person",description:"Person (circular head above a rounded body)",handler:fu},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:dn},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:pg},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:fg},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:zu},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:Bu},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:Pu},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:Ou},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:sg},{semanticName:"Manual Operation",name:"Trapezoid Base Top",shortName:"trap-t",description:"Represents a manual task",aliases:["manual","trapezoid-top","inv-trapezoid"],internalAliases:["inv_trapezoid"],handler:Eu},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:xu},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:rg},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:ou},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:Uu},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:Qu},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:Ku},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:Su},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:_u},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:du},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:uu},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:gu},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:Du},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:ng},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:Tu},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:ig},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:Iu},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:pu},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:Cu},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:ag},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:hg},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:bu},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:og},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:ku},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:Gu},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:Nu},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:qu},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:tu},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:cu},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:eg},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:tg},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:lg},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:Hu},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:Ru}],gx=u(()=>{const t=[...Object.entries({state:Zu,choice:au,note:Wu,composite:nu,rectWithTitle:ju,labelRect:$u,block_arrow:iu,collapsedGroup:ru,iconSquare:Mu,iconCircle:Lu,icon:vu,iconRounded:Fu,imageSquare:Au,anchor:Qd,kanbanItem:gg,mindmapCircle:mg,defaultMindmapNode:yg,classBox:dg,erBox:un,requirementBox:ug}),...ux.flatMap(r=>[r.shortName,..."aliases"in r?r.aliases:[],..."internalAliases"in r?r.internalAliases:[]].map(s=>[s,r.handler]))];return Object.fromEntries(t)},"generateShapeMap"),Cg=gx();function px(e){return e in Cg}u(px,"isValidShape");var Hs=u(({flowchart:e})=>{const t=e?.subGraphTitleMargin?.top??0,r=e?.subGraphTitleMargin?.bottom??0,i=t+r;return{subGraphTitleTopMargin:t,subGraphTitleBottomMargin:r,subGraphTitleTotalMargin:i}},"getSubGraphTitleMargins"),js=new Map;async function gn(e,t,r){let i,s;t.shape==="rect"&&(t.rx&&t.ry?t.shape="roundedRect":t.shape="squareRect");const o=t.shape?Cg[t.shape]:void 0;if(!o)throw new Error(`No such shape: ${t.shape}. Please check your syntax.`);if(t.link){let a;r.config.securityLevel==="sandbox"?a="_top":t.linkTarget&&(a=t.linkTarget||"_blank"),i=e.insert("svg:a").attr("xlink:href",t.link).attr("target",a??null),s=await o(i,t,r)}else s=await o(e,t,r),i=s;return i.attr("data-look",zt(t.look)),t.tooltip&&s.attr("title",t.tooltip),js.set(t.id,i),t.haveCallback&&i.attr("class",i.attr("class")+" clickable"),i}u(gn,"insertNode");var d_=u((e,t)=>{js.set(t.id,e)},"setNodeElem"),fx=u(()=>{js.clear()},"clear"),Kl=u(e=>{const t=js.get(e.id);D.trace("Transforming node",e.diff,e,"translate("+(e.x-e.width/2-5)+", "+e.width/2+")");const r=8,i=e.diff||0;return e.clusterNode?t.attr("transform","translate("+(e.x+i-e.width/2)+", "+(e.y-e.height/2-r)+")"):t.attr("transform","translate("+e.x+", "+e.y+")"),i},"positionNode"),yx=u(async(e,t)=>{const r=_t(),{themeVariables:i,handDrawnSeed:s}=r,{clusterBkg:o,clusterBorder:a}=i,n=a,{labelStyles:l,nodeStyles:c,borderStyles:h,backgroundStyles:d}=nt(t),g=e.insert("g").attr("class","cluster swimlane "+(t.cssClasses||"")).attr("id",t.id).attr("data-id",t.id).attr("data-et","cluster").attr("data-look",t.look),f=Le(r.flowchart.htmlLabels),m=t.direction==="LR",y=g.insert("g").attr("class","cluster-label swimlane-label"),C=await ye(y,t.label,{style:t.labelStyle,useHtmlLabels:f,isNode:!0,width:t.width});let x=C.getBBox();if(f){const H=C.children[0],E=Tt(C);x=H.getBoundingClientRect(),E.attr("width",x.width),E.attr("height",x.height)}const k=t.padding??0,S=t.width<=x.width+k?x.width+k:t.width;t.width<=x.width+k?t.diff=(S-t.width)/2-k:t.diff=-k;const T=t.height,B=t.y-T/2,L=t.y+T/2,M=t.x-S/2,v=t.swimlaneContentTop!==void 0?t.swimlaneContentTop:B+T/3,X=m?4:0,z=x.height+2*X;let I,et;if(m){const H=Math.max(z,x.height+2*X),E=M+H,O=Math.max(0,S-H);if(t.look==="handDrawn"){const $=st.svg(g),J=it(t,{roughness:.7,fill:o,stroke:n,fillWeight:3,seed:s}),Z=it(t,{roughness:.7,fill:"none",stroke:n,seed:s}),ut=$.rectangle(M,B,H,T,J);I=g.insert(()=>ut,":first-child");const xt=$.rectangle(E,B,O,T,Z);et=g.insert(()=>xt,":first-child"),I.select("path:nth-child(2)").attr("style",h.join(";")),I.select("path").attr("style",d.join(";").replace("fill","stroke"))}else I=g.insert("rect",":first-child"),et=g.insert("rect",":first-child"),I.attr("class","swimlane-title").attr("style",c).attr("x",M).attr("y",B).attr("width",H).attr("height",T).attr("fill",o).attr("stroke",n),et.attr("class","swimlane-body").attr("style",c).attr("x",E).attr("y",B).attr("width",O).attr("height",T).attr("fill","none").attr("stroke",n);const _=M+H/2,R=t.y;y.attr("transform",`translate(${_}, ${R}) rotate(-90) translate(${-x.width/2}, ${-x.height/2})`)}else{const H=Math.max(0,v-B),E=Math.min(z,H),O=B+E,_=Math.max(0,L-O),R=t.x-S/2;if(t.look==="handDrawn"){const Z=st.svg(g),ut=it(t,{roughness:.7,fill:o,stroke:n,fillWeight:3,seed:s}),xt=it(t,{roughness:.7,fill:"none",stroke:n,seed:s}),Ct=Z.rectangle(R,B,S,E,ut);I=g.insert(()=>Ct,":first-child");const St=Z.rectangle(R,O,S,_,xt);et=g.insert(()=>St,":first-child"),I.select("path:nth-child(2)").attr("style",h.join(";")),I.select("path").attr("style",d.join(";").replace("fill","stroke"))}else I=g.insert("rect",":first-child"),et=g.insert("rect",":first-child"),I.attr("class","swimlane-title").attr("style",c).attr("x",R).attr("y",B).attr("width",S).attr("height",E).attr("fill",o).attr("stroke",n),et.attr("class","swimlane-body").attr("style",c).attr("x",R).attr("y",O).attr("width",S).attr("height",_).attr("fill","none").attr("stroke",n);const $=t.x-x.width/2,J=B+(E-x.height)/2;y.attr("transform",`translate(${$}, ${J})`)}if(D.trace("Swimlane data ",t,JSON.stringify(t)),l){const H=y.select("span");H&&H.attr("style",l)}return t.offsetX=0,t.width=S,t.height=T,t.offsetY=x.height-k/2,t.intersect=function(H){return ur(t,H)},{cluster:g,labelBBox:x}},"swimlane"),xg=u(async(e,t)=>{D.info("Creating subgraph rect for ",t.id,t);const r=_t(),{themeVariables:i,handDrawnSeed:s}=r,{clusterBkg:o,clusterBorder:a}=i,{labelStyles:n,nodeStyles:l,borderStyles:c,backgroundStyles:h}=nt(t),d=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.domId).attr("data-look",t.look),g=Kt(r),f=d.insert("g").attr("class","cluster-label ");let m;t.labelType==="markdown"?m=await ye(f,t.label,{style:t.labelStyle,useHtmlLabels:g,isNode:!0,width:t.width}):m=await He(f,t.label,t.labelStyle||"",!1,!0);let y=m.getBBox();if(Kt(r)){const M=m.children[0],v=Tt(m);y=M.getBoundingClientRect(),v.attr("width",y.width),v.attr("height",y.height)}const C=t.width<=y.width+t.padding?y.width+t.padding:t.width;t.width<=y.width+t.padding?t.diff=(C-t.width)/2-t.padding:t.diff=-t.padding;const x=t.height,k=t.x-C/2,S=t.y-x/2;D.trace("Data ",t,JSON.stringify(t));let T;if(t.look==="handDrawn"){const M=st.svg(d),v=it(t,{roughness:.7,fill:o,stroke:a,fillWeight:3,seed:s}),X=M.path(le(k,S,C,x,0),v);T=d.insert(()=>(D.debug("Rough node insert CXC",X),X),":first-child"),T.select("path:nth-child(2)").attr("style",c.join(";")),T.select("path").attr("style",h.join(";").replace("fill","stroke"))}else T=d.insert("rect",":first-child"),T.attr("style",l).attr("rx",t.rx).attr("ry",t.ry).attr("x",k).attr("y",S).attr("width",C).attr("height",x);const{subGraphTitleTopMargin:B}=Hs(r);if(f.attr("transform",`translate(${t.x-y.width/2}, ${t.y-t.height/2+B})`),n){const M=f.select("span");M&&M.attr("style",n)}const L=T.node().getBBox();return t.offsetX=0,t.width=L.width,t.height=L.height,t.offsetY=y.height-t.padding/2,t.intersect=function(M){return ur(t,M)},{cluster:d,labelBBox:y}},"rect"),mx=u((e,t)=>{const r=e.insert("g").attr("class","note-cluster").attr("id",t.domId),i=r.insert("rect",":first-child"),s=0*t.padding,o=s/2;i.attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-t.width/2-o).attr("y",t.y-t.height/2-o).attr("width",t.width+s).attr("height",t.height+s).attr("fill","none");const a=i.node().getBBox();return t.width=a.width,t.height=a.height,t.intersect=function(n){return ur(t,n)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),Cx=u(async(e,t)=>{const r=_t(),{themeVariables:i,handDrawnSeed:s}=r,{altBackground:o,compositeBackground:a,compositeTitleBackground:n,nodeBorder:l}=i,c=e.insert("g").attr("class",t.cssClasses).attr("id",t.domId).attr("data-id",t.id).attr("data-look",t.look),h=c.insert("g",":first-child"),d=c.insert("g").attr("class","cluster-label");let g=c.append("rect");const f=await He(d,t.label,t.labelStyle,void 0,!0);let m=f.getBBox();if(Kt(r)){const X=f.children[0],z=Tt(f);m=X.getBoundingClientRect(),z.attr("width",m.width),z.attr("height",m.height)}const y=0*t.padding,C=y/2,x=(t.width<=m.width+t.padding?m.width+t.padding:t.width)+y;t.width<=m.width+t.padding?t.diff=(x-t.width)/2-t.padding:t.diff=-t.padding;const k=t.height+y,S=t.height+y-m.height-6,T=t.x-x/2,B=t.y-k/2;t.width=x;const L=t.y-t.height/2-C+m.height+2;let M;if(t.look==="handDrawn"){const X=t.cssClasses.includes("statediagram-cluster-alt"),z=st.svg(c),I=t.rx||t.ry?z.path(le(T,B,x,k,10),{roughness:.7,fill:n,fillStyle:"solid",stroke:l,seed:s}):z.rectangle(T,B,x,k,{seed:s});M=c.insert(()=>I,":first-child");const et=z.rectangle(T,L,x,S,{fill:X?o:a,fillStyle:X?"hachure":"solid",stroke:l,seed:s});M=c.insert(()=>I,":first-child"),g=c.insert(()=>et)}else M=h.insert("rect",":first-child"),M.attr("class","outer").attr("x",T).attr("y",B).attr("width",x).attr("height",k).attr("data-look",t.look),g.attr("class","inner").attr("x",T).attr("y",L).attr("width",x).attr("height",S);d.attr("transform",`translate(${t.x-m.width/2}, ${B+1-(Kt(r)?0:3)})`);const v=M.node().getBBox();return t.height=v.height,t.offsetX=0,t.offsetY=m.height-t.padding/2,t.labelBBox=m,t.intersect=function(X){return ur(t,X)},{cluster:c,labelBBox:m}},"roundedWithTitle"),xx=u(async(e,t)=>{D.info("Creating subgraph rect for ",t.id,t);const r=_t(),{themeVariables:i,handDrawnSeed:s}=r,{clusterBkg:o,clusterBorder:a}=i,{labelStyles:n,nodeStyles:l,borderStyles:c,backgroundStyles:h}=nt(t),d=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.domId).attr("data-look",t.look),g=Kt(r),f=d.insert("g").attr("class","cluster-label "),m=await ye(f,t.label,{style:t.labelStyle,useHtmlLabels:g,isNode:!0,width:t.width});let y=m.getBBox();if(Kt(r)){const M=m.children[0],v=Tt(m);y=M.getBoundingClientRect(),v.attr("width",y.width),v.attr("height",y.height)}const C=t.width<=y.width+t.padding?y.width+t.padding:t.width;t.width<=y.width+t.padding?t.diff=(C-t.width)/2-t.padding:t.diff=-t.padding;const x=t.height,k=t.x-C/2,S=t.y-x/2;D.trace("Data ",t,JSON.stringify(t));let T;if(t.look==="handDrawn"){const M=st.svg(d),v=it(t,{roughness:.7,fill:o,stroke:a,fillWeight:4,seed:s}),X=M.path(le(k,S,C,x,t.rx),v);T=d.insert(()=>(D.debug("Rough node insert CXC",X),X),":first-child"),T.select("path:nth-child(2)").attr("style",c.join(";")),T.select("path").attr("style",h.join(";").replace("fill","stroke"))}else T=d.insert("rect",":first-child"),T.attr("style",l).attr("rx",t.rx).attr("ry",t.ry).attr("x",k).attr("y",S).attr("width",C).attr("height",x);const{subGraphTitleTopMargin:B}=Hs(r);if(f.attr("transform",`translate(${t.x-y.width/2}, ${t.y-t.height/2+B})`),n){const M=f.select("span");M&&M.attr("style",n)}const L=T.node().getBBox();return t.offsetX=0,t.width=L.width,t.height=L.height,t.offsetY=y.height-t.padding/2,t.intersect=function(M){return ur(t,M)},{cluster:d,labelBBox:y}},"kanbanSection"),bx=u((e,t)=>{const r=_t(),{themeVariables:i,handDrawnSeed:s}=r,{nodeBorder:o}=i,a=e.insert("g").attr("class",t.cssClasses).attr("id",t.domId).attr("data-look",t.look),n=a.insert("g",":first-child"),l=0*t.padding,c=t.width+l;t.diff=-t.padding;const h=t.height+l,d=t.x-c/2,g=t.y-h/2;t.width=c;let f;if(t.look==="handDrawn"){const C=st.svg(a).rectangle(d,g,c,h,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:o,seed:s});f=a.insert(()=>C,":first-child")}else{f=n.insert("rect",":first-child");let y="outer";t.look,y="divider",f.attr("class",y).attr("x",d).attr("y",g).attr("width",c).attr("height",h).attr("data-look",t.look)}const m=f.node().getBBox();return t.height=m.height,t.offsetX=0,t.offsetY=0,t.intersect=function(y){return ur(t,y)},{cluster:a,labelBBox:{}}},"divider"),kx=xg,wx={rect:xg,squareRect:kx,roundedWithTitle:Cx,noteGroup:mx,divider:bx,kanbanSection:xx,swimlane:yx},bg=new Map,kg=u(async(e,t)=>{const r=t.shape||"rect",i=await wx[r](e,t);return bg.set(t.id,i),i},"insertCluster"),Sx=u(()=>{bg=new Map},"clear"),fi=u((e,t)=>{if(t)return"translate("+-e.width/2+", "+-e.height/2+")";const r=e.x??0,i=e.y??0;return"translate("+-(r+e.width/2)+", "+-(i+e.height/2)+")"},"computeLabelTransform"),Vt={aggregation:17.25,extension:17.25,composition:17.25,dependency:6,lollipop:13.5,arrow_point:4,arrow_barb:0,arrow_barb_neo:5.5},Ql={arrow_point:4,arrow_cross:12.5,arrow_circle:12.5};function ki(e,t){if(e===void 0||t===void 0)return{angle:0,deltaX:0,deltaY:0};e=It(e),t=It(t);const[r,i]=[e.x,e.y],[s,o]=[t.x,t.y],a=s-r,n=o-i;return{angle:Math.atan(n/a),deltaX:a,deltaY:n}}u(ki,"calculateDeltaAndAngle");var It=u(e=>Array.isArray(e)?{x:e[0],y:e[1]}:e,"pointTransformer"),Tx=u(e=>({x:u(function(t,r,i){let s=0;const o=It(i[0]).x<It(i[i.length-1]).x?"left":"right";if(r===0&&Object.hasOwn(Vt,e.arrowTypeStart)){const{angle:f,deltaX:m}=ki(i[0],i[1]);s=Vt[e.arrowTypeStart]*Math.cos(f)*(m>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(Vt,e.arrowTypeEnd)){const{angle:f,deltaX:m}=ki(i[i.length-1],i[i.length-2]);s=Vt[e.arrowTypeEnd]*Math.cos(f)*(m>=0?1:-1)}const a=Math.abs(It(t).x-It(i[i.length-1]).x),n=Math.abs(It(t).y-It(i[i.length-1]).y),l=Math.abs(It(t).x-It(i[0]).x),c=Math.abs(It(t).y-It(i[0]).y),h=Vt[e.arrowTypeStart],d=Vt[e.arrowTypeEnd],g=1;if(a<d&&a>0&&n<d){let f=d+g-a;f*=o==="right"?-1:1,s-=f}if(l<h&&l>0&&c<h){let f=h+g-l;f*=o==="right"?-1:1,s+=f}return It(t).x+s},"x"),y:u(function(t,r,i){let s=0;const o=It(i[0]).y<It(i[i.length-1]).y?"down":"up";if(r===0&&Object.hasOwn(Vt,e.arrowTypeStart)){const{angle:f,deltaY:m}=ki(i[0],i[1]);s=Vt[e.arrowTypeStart]*Math.abs(Math.sin(f))*(m>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(Vt,e.arrowTypeEnd)){const{angle:f,deltaY:m}=ki(i[i.length-1],i[i.length-2]);s=Vt[e.arrowTypeEnd]*Math.abs(Math.sin(f))*(m>=0?1:-1)}const a=Math.abs(It(t).y-It(i[i.length-1]).y),n=Math.abs(It(t).x-It(i[i.length-1]).x),l=Math.abs(It(t).y-It(i[0]).y),c=Math.abs(It(t).x-It(i[0]).x),h=Vt[e.arrowTypeStart],d=Vt[e.arrowTypeEnd],g=1;if(a<d&&a>0&&n<d){let f=d+g-a;f*=o==="up"?-1:1,s-=f}if(l<h&&l>0&&c<h){let f=h+g-l;f*=o==="up"?-1:1,s+=f}return It(t).y+s},"y")}),"getLineFunctionsWithOffset"),Bx=u((e,t,r,i,s,o=!1,a)=>{t.arrowTypeStart&&Jl(e,"start",t.arrowTypeStart,r,i,s,o,a),t.arrowTypeEnd&&Jl(e,"end",t.arrowTypeEnd,r,i,s,o,a)},"addEdgeMarkers"),_x={arrow_cross:{type:"cross",fill:!1},arrow_point:{type:"point",fill:!0},arrow_barb:{type:"barb",fill:!0},arrow_barb_neo:{type:"barb",fill:!0},arrow_circle:{type:"circle",fill:!1},aggregation:{type:"aggregation",fill:!1},extension:{type:"extension",fill:!1},composition:{type:"composition",fill:!0},dependency:{type:"dependency",fill:!0},lollipop:{type:"lollipop",fill:!1},only_one:{type:"onlyOne",fill:!1},zero_or_one:{type:"zeroOrOne",fill:!1},one_or_more:{type:"oneOrMore",fill:!1},zero_or_more:{type:"zeroOrMore",fill:!1},requirement_arrow:{type:"requirement_arrow",fill:!1},requirement_contains:{type:"requirement_contains",fill:!1}},vx=["cross","point","circle","lollipop","aggregation","extension","composition","dependency","barb"],Jl=u((e,t,r,i,s,o,a=!1,n)=>{if(!r||r==="none")return;const l=_x[r],c=l&&vx.includes(l.type);if(!l){D.warn(`Unknown arrow type: ${r}`);return}const h=l.type,f=`${s}_${o}-${h}${t==="start"?"Start":"End"}${a&&c?"-margin":""}`;if(n&&n.trim()!==""){const m=n.replace(/[^\dA-Za-z]/g,"_"),y=`${f}_${m}`;if(!document.getElementById(y)){const C=document.getElementById(f);if(C){const x=C.cloneNode(!0);x.id=y,x.querySelectorAll("path, circle, line").forEach(S=>{S.setAttribute("stroke",n),l.fill&&S.setAttribute("fill",n)}),C.parentNode?.appendChild(x)}}e.attr(`marker-${t}`,`url(${i}#${y})`)}else e.attr(`marker-${t}`,`url(${i}#${f})`)},"addEdgeMarker"),Lx=u(e=>typeof e=="string"?e:_t()?.flowchart?.curve,"resolveEdgeCurveType"),Xr=new Map,Nt=new Map,Fx=u(()=>{Xr.clear(),Nt.clear()},"clear"),wg=u(e=>!!(e.label||e.startLabelLeft||e.startLabelRight||e.endLabelLeft||e.endLabelRight),"hasEdgeLabel"),yi=u(e=>e?typeof e=="string"?e:e.reduce((t,r)=>t+";"+r,""):"","getLabelStyles"),pn=u(async(e,t)=>{const r=_t();let i=Kt(r);const{labelStyles:s}=nt(t);t.labelStyle=s;const o=e.insert("g").attr("class","edgeLabel"),a=o.insert("g").attr("class","label").attr("data-id",t.id),n=t.labelType==="markdown",c=await ye(e,t.label,{style:yi(t.labelStyle),useHtmlLabels:i,addSvgBackground:!0,isNode:!1,markdown:n,width:n?void 0:void 0},r);a.node().appendChild(c),D.info("abc82",t,t.labelType);let h,d;if(i){const f=c.children[0],m=Tt(c);h=await nr.measure(()=>f.getBoundingClientRect()),d=h,m.attr("width",h.width),m.attr("height",h.height)}else{const f=Tt(c).select("text").node();await nr.measure(()=>{h=c.getBBox(),f&&typeof f.getBBox=="function"?d=f.getBBox():d=h})}a.attr("transform",fi(d,i)),Xr.set(t.id,o),t.width=h.width,t.height=h.height;let g;if(t.startLabelLeft){const f=e.insert("g").attr("class","edgeTerminals"),m=f.insert("g").attr("class","inner"),y=await He(m,t.startLabelLeft,yi(t.labelStyle)||"",!1,!1);g=y;let C=y.getBBox();if(i){const x=y.children[0],k=Tt(y);C=x.getBoundingClientRect(),k.attr("width",C.width),k.attr("height",C.height)}m.attr("transform",fi(C,i)),Nt.get(t.id)||Nt.set(t.id,{}),Nt.get(t.id).startLeft=f,wi(g,t.startLabelLeft)}if(t.startLabelRight){const f=e.insert("g").attr("class","edgeTerminals"),m=f.insert("g").attr("class","inner"),y=await He(m,t.startLabelRight,yi(t.labelStyle)||"",!1,!1);g=y;let C=y.getBBox();if(i){const x=y.children[0],k=Tt(y);C=x.getBoundingClientRect(),k.attr("width",C.width),k.attr("height",C.height)}m.attr("transform",fi(C,i)),Nt.get(t.id)||Nt.set(t.id,{}),Nt.get(t.id).startRight=f,wi(g,t.startLabelRight)}if(t.endLabelLeft){const f=e.insert("g").attr("class","edgeTerminals"),m=f.insert("g").attr("class","inner"),y=await He(f,t.endLabelLeft,yi(t.labelStyle)||"",!1,!1);g=y;let C=y.getBBox();if(i){const x=y.children[0],k=Tt(y);C=x.getBoundingClientRect(),k.attr("width",C.width),k.attr("height",C.height)}m.attr("transform",fi(C,i)),Nt.get(t.id)||Nt.set(t.id,{}),Nt.get(t.id).endLeft=f,wi(g,t.endLabelLeft)}if(t.endLabelRight){const f=e.insert("g").attr("class","edgeTerminals"),m=f.insert("g").attr("class","inner"),y=await He(f,t.endLabelRight,yi(t.labelStyle)||"",!1,!1);g=y;let C=y.getBBox();if(i){const x=y.children[0],k=Tt(y);C=x.getBoundingClientRect(),k.attr("width",C.width),k.attr("height",C.height)}m.attr("transform",fi(C,i)),Nt.get(t.id)||Nt.set(t.id,{}),Nt.get(t.id).endRight=f,wi(g,t.endLabelRight)}return c},"insertEdgeLabel");function wi(e,t){Kt(_t())&&e&&(e.style.width=t.length*9+"px",e.style.height="12px")}u(wi,"setTerminalWidth");var Mx=u((e,t)=>{D.debug("Moving label abc88 ",e.id,e.label,Xr.get(e.id),t);let r=t.updatedPath?t.updatedPath:t.originalPath;const i=_t(),{subGraphTitleTotalMargin:s}=Hs(i);if(e.label){const o=Xr.get(e.id);let a=e.x,n=e.y;if(r){const l=Zt.calcLabelPosition(r);D.debug("Moving label "+e.label+" from (",a,",",n,") to (",l.x,",",l.y,") abc88"),t.updatedPath&&(a=l.x,n=l.y)}o.attr("transform",`translate(${a}, ${n+s/2})`)}if(e.startLabelLeft){const o=Nt.get(e.id).startLeft;let a=e.x,n=e.y;if(r){const l=Zt.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",r);a=l.x,n=l.y}o.attr("transform",`translate(${a}, ${n})`)}if(e.startLabelRight){const o=Nt.get(e.id).startRight;let a=e.x,n=e.y;if(r){const l=Zt.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",r);a=l.x,n=l.y}o.attr("transform",`translate(${a}, ${n})`)}if(e.endLabelLeft){const o=Nt.get(e.id).endLeft;let a=e.x,n=e.y;if(r){const l=Zt.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",r);a=l.x,n=l.y}o.attr("transform",`translate(${a}, ${n})`)}if(e.endLabelRight){const o=Nt.get(e.id).endRight;let a=e.x,n=e.y;if(r){const l=Zt.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",r);a=l.x,n=l.y}o.attr("transform",`translate(${a}, ${n})`)}},"positionEdgeLabel"),Ax=u((e,t)=>{if(!e?.isLabelEdge||!e?.id?.endsWith("-to-label")||!Array.isArray(t)||t.length!==2)return t;const[r,i]=t,s=Math.abs(i.x-r.x),o=Math.abs(i.y-r.y);return s<.001||o<.001?t:o>=s?[r,{x:r.x,y:i.y},i]:[r,{x:i.x,y:r.y},i]},"orthogonalizeToLabelClippedPoints"),Ex=u((e,t)=>{const r=e.x,i=e.y,s=Math.abs(t.x-r),o=Math.abs(t.y-i),a=e.width/2,n=e.height/2;return s>=a||o>=n},"outsideNode"),$x=u((e,t,r)=>{D.debug(`intersection calc abc89:
|
|
260
|
+
outsidePoint: ${JSON.stringify(t)}
|
|
261
|
+
insidePoint : ${JSON.stringify(r)}
|
|
262
|
+
node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);const i=e.x,s=e.y,o=Math.abs(i-r.x),a=e.width/2;let n=r.x<t.x?a-o:a+o;const l=e.height/2,c=Math.abs(t.y-r.y),h=Math.abs(t.x-r.x);if(Math.abs(s-t.y)*a>Math.abs(i-t.x)*l){let d=r.y<t.y?t.y-l-s:s-l-t.y;n=h*d/c;const g={x:r.x<t.x?r.x+n:r.x-h+n,y:r.y<t.y?r.y+c-d:r.y-c+d};return n===0&&(g.x=t.x,g.y=t.y),h===0&&(g.x=t.x),c===0&&(g.y=t.y),D.debug(`abc89 top/bottom calc, Q ${c}, q ${d}, R ${h}, r ${n}`,g),g}else{r.x<t.x?n=t.x-a-i:n=i-a-t.x;let d=c*n/h,g=r.x<t.x?r.x+h-n:r.x-h+n,f=r.y<t.y?r.y+d:r.y-d;return D.debug(`sides calc abc89, Q ${c}, q ${d}, R ${h}, r ${n}`,{_x:g,_y:f}),n===0&&(g=t.x,f=t.y),h===0&&(g=t.x),c===0&&(f=t.y),{x:g,y:f}}},"intersection"),th=u((e,t)=>{D.warn("abc88 cutPathAtIntersect",e,t);let r=[],i=e[0],s=!1;return e.forEach(o=>{if(D.info("abc88 checking point",o,t),!Ex(t,o)&&!s){const a=$x(t,i,o);D.debug("abc88 inside",o,i,a),D.debug("abc88 intersection",a,t);let n=!1;r.forEach(l=>{n=n||l.x===a.x&&l.y===a.y}),r.some(l=>l.x===a.x&&l.y===a.y)?D.warn("abc88 no intersect",a,r):r.push(a),s=!0}else D.warn("abc88 outside",o,i),i=o,s||r.push(o)}),D.debug("returning points",r),r},"cutPathAtIntersect");function Sg(e){const t=[],r=[];for(let i=1;i<e.length-1;i++){const s=e[i-1],o=e[i],a=e[i+1];(s.x===o.x&&o.y===a.y&&Math.abs(o.x-a.x)>5&&Math.abs(o.y-s.y)>5||s.y===o.y&&o.x===a.x&&Math.abs(o.x-s.x)>5&&Math.abs(o.y-a.y)>5)&&(t.push(o),r.push(i))}return{cornerPoints:t,cornerPointPositions:r}}u(Sg,"extractCornerPoints");var eh=u(function(e,t,r){const i=t.x-e.x,s=t.y-e.y,o=Math.sqrt(i*i+s*s),a=r/o;return{x:t.x-a*i,y:t.y-a*s}},"findAdjacentPoint"),Ox=u(function(e){const{cornerPointPositions:t}=Sg(e),r=[];for(let i=0;i<e.length;i++)if(t.includes(i)){const s=e[i-1],o=e[i+1],a=e[i],n=eh(s,a,5),l=eh(o,a,5),c=l.x-n.x,h=l.y-n.y;r.push(n);const d=Math.sqrt(2)*2;let g={x:a.x,y:a.y};if(Math.abs(o.x-s.x)>10&&Math.abs(o.y-s.y)>=10){D.debug("Corner point fixing",Math.abs(o.x-s.x),Math.abs(o.y-s.y));const f=5;a.x===n.x?g={x:c<0?n.x-f+d:n.x+f-d,y:h<0?n.y-d:n.y+d}:g={x:c<0?n.x-d:n.x+d,y:h<0?n.y-f+d:n.y+f-d}}else D.debug("Corner point skipping fixing",Math.abs(o.x-s.x),Math.abs(o.y-s.y));r.push(g,l)}else r.push(e[i]);return r},"fixCorners"),Px=u((e,t,r)=>{const i=e-t-r,s=2,o=2,a=s+o,n=Math.floor(i/a),l=Number.isFinite(n)?Math.max(0,n):0,c=Array(l).fill(`${s} ${o}`).join(" ");return`0 ${t} ${c} ${r}`},"generateDashArray"),Tg=u(function(e,t,r,i,s,o,a,n=!1){if(!a)throw new Error(`insertEdge: missing diagramId for edge "${t.id}" — edge IDs require a diagram prefix for uniqueness`);const{handDrawnSeed:l,layout:c}=_t();let h=t.points,d=!1;const g=s;var f=o;const m=[];for(const $ in t.cssCompiledStyles)Kc($)||m.push(t.cssCompiledStyles[$]);if(c==="swimlane"){if(f.intersect&&g.intersect&&Array.isArray(h)&&h.length>=2)if(h.length===2)h=[g.intersect(h[0]),f.intersect(h[1])];else{const $=h.slice(1,-1),J=$[0],Z=$[$.length-1],ut=.5,xt=Math.abs(h[h.length-1].x-Z.x)<ut&&Math.abs(h[h.length-1].y-Z.y)<ut,Ct=g.intersect(J),St=xt?Z:f.intersect(Z),wt=Math.abs(St.x-Z.x)<ut&&Math.abs(St.y-Z.y)<ut,ft=Math.abs(Ct.x-J.x)<ut&&Math.abs(Ct.y-J.y)<ut?[]:[Ct],vt=wt?[]:[St];h=[...ft,...$,...vt]}h=Ax(t,h)}else f.intersect&&g.intersect&&!n&&(h=h.slice(1,t.points.length-1),h.unshift(g.intersect(h[0])),h.push(f.intersect(h[h.length-1])));const y=btoa(JSON.stringify(h));t.toCluster&&(D.info("to cluster abc88",r.get(t.toCluster)),h=th(t.points,r.get(t.toCluster).node),d=!0),t.fromCluster&&(D.debug("from cluster abc88",r.get(t.fromCluster),JSON.stringify(h,null,2)),h=th(h.reverse(),r.get(t.fromCluster).node).reverse(),d=!0);let C=h.filter($=>!Number.isNaN($.y));const x=Lx(t.curve);x!=="rounded"&&(C=Ox(C));let k=Li;switch(x){case"linear":k=Li;break;case"basis":k=Jo;break;case"cardinal":k=Dc;break;case"bumpX":k=Ac;break;case"bumpY":k=Ec;break;case"catmullRom":k=Rc;break;case"monotoneX":k=jc;break;case"monotoneY":k=Yc;break;case"natural":k=Gc;break;case"step":k=Xc;break;case"stepAfter":k=Zc;break;case"stepBefore":k=Vc;break;case"rounded":k=Li;break;default:k=Jo}const{x:S,y:T}=Tx(t),B=Zy().x(S).y(T).curve(k);let L;switch(t.thickness){case"normal":L="edge-thickness-normal";break;case"thick":L="edge-thickness-thick";break;case"invisible":L="edge-thickness-invisible";break;default:L="edge-thickness-normal"}switch(t.pattern){case"solid":L+=" edge-pattern-solid";break;case"dotted":L+=" edge-pattern-dotted";break;case"dashed":L+=" edge-pattern-dashed";break;default:L+=" edge-pattern-solid"}let M,v=x==="rounded"?Bg(_g(C,t),5):B(C);const X=Array.isArray(t.style)?t.style:[t.style];let z=X.find($=>$?.startsWith("stroke:")),I="";t.animate&&(I="edge-animation-fast"),t.animation&&(I="edge-animation-"+t.animation);let et=!1;if(t.look==="handDrawn"){const $=st.svg(e);Object.assign([],C);const J=$.path(v,{roughness:.3,seed:l});L+=" transition",M=Tt(J).select("path").attr("id",`${a}-${t.id}`).attr("class"," "+L+(t.classes?" "+t.classes:"")+(I?" "+I:"")).attr("style",X?X.reduce((ut,xt)=>ut+";"+xt,""):"");let Z=M.attr("d");M.attr("d",Z),e.node().appendChild(M.node())}else{const $=m.join(";"),J=X?X.reduce((wt,ht)=>wt+ht+";",""):"",Z=($?$+";"+J+";":J)+";"+(X?X.reduce((wt,ht)=>wt+";"+ht,""):"");M=e.append("path").attr("d",v).attr("id",`${a}-${t.id}`).attr("class"," "+L+(t.classes?" "+t.classes:"")+(I?" "+I:"")).attr("style",Z),z=Z.match(/stroke:([^;]+)/)?.[1],et=t.animate===!0||!!t.animation||$.includes("animation");const ut=M.node(),xt=typeof ut.getTotalLength=="function"?ut.getTotalLength():0,Ct=Ql[t.arrowTypeStart]||0,St=Ql[t.arrowTypeEnd]||0;if(t.look==="neo"&&!et){const ht=`stroke-dasharray: ${t.pattern==="dotted"||t.pattern==="dashed"?Px(xt,Ct,St):`0 ${Ct} ${xt-Ct-St} ${St}`}; stroke-dashoffset: 0;`;M.attr("style",ht+M.attr("style"))}}M.attr("data-edge",!0),M.attr("data-et","edge"),M.attr("data-id",t.id),M.attr("data-points",y),M.attr("data-look",zt(t.look)),t.showPoints&&C.forEach($=>{e.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",$.x).attr("cy",$.y)});let H="";(_t().flowchart.arrowMarkerAbsolute||_t().state.arrowMarkerAbsolute)&&(H=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,H=H.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),D.info("arrowTypeStart",t.arrowTypeStart),D.info("arrowTypeEnd",t.arrowTypeEnd);const E=!et&&t?.look==="neo";Bx(M,t,H,a,i,E,z);const O=Math.floor(h.length/2),_=h[O];Zt.isLabelCoordinateInPath(_,M.attr("d"))||(d=!0);let R={};return d&&(R.updatedPath=h),R.originalPath=t.points,R},"insertEdge");function Bg(e,t){if(e.length<2)return"";let r="";const i=e.length,s=1e-5;for(let o=0;o<i;o++){const a=e[o],n=e[o-1],l=e[o+1];if(o===0)r+=`M${a.x},${a.y}`;else if(o===i-1)r+=`L${a.x},${a.y}`;else{const c=a.x-n.x,h=a.y-n.y,d=l.x-a.x,g=l.y-a.y,f=Math.hypot(c,h),m=Math.hypot(d,g);if(f<s||m<s){r+=`L${a.x},${a.y}`;continue}const y=c/f,C=h/f,x=d/m,k=g/m,S=y*x+C*k,T=Math.max(-1,Math.min(1,S)),B=Math.acos(T);if(B<s||Math.abs(Math.PI-B)<s){r+=`L${a.x},${a.y}`;continue}const L=Math.min(t/Math.sin(B/2),f/2,m/2),M=a.x-y*L,v=a.y-C*L,X=a.x+x*L,z=a.y+k*L;r+=`L${M},${v}`,r+=`Q${a.x},${a.y} ${X},${z}`}}return r}u(Bg,"generateRoundedPath");function fa(e,t){if(!e||!t)return{angle:0,deltaX:0,deltaY:0};const r=t.x-e.x,i=t.y-e.y;return{angle:Math.atan2(i,r),deltaX:r,deltaY:i}}u(fa,"calculateDeltaAndAngle");function _g(e,t){const r=e.map(s=>({...s}));if(e.length>=2&&Vt[t.arrowTypeStart]){const s=Vt[t.arrowTypeStart],o=e[0],a=e[1],{angle:n}=fa(o,a),l=s*Math.cos(n),c=s*Math.sin(n);r[0].x=o.x+l,r[0].y=o.y+c}const i=e.length;if(i>=2&&Vt[t.arrowTypeEnd]){const s=Vt[t.arrowTypeEnd],o=e[i-1],a=e[i-2],{angle:n}=fa(a,o),l=s*Math.cos(n),c=s*Math.sin(n);r[i-1].x=o.x-l,r[i-1].y=o.y-c}return r}u(_g,"applyMarkerOffsetsToPoints");var Dx=u((e,t,r,i)=>{t.forEach(s=>{ob[s](e,r,i)})},"insertMarkers"),Ix=u((e,t,r)=>{D.trace("Making markers for ",r),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionStart").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 1,7 L18,13 V 1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionEnd").attr("class","marker extension "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 1,1 V 13 L18,7 Z"),e.append("marker").attr("id",r+"_"+t+"-extensionStart-margin").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("viewBox","0 0 20 14").append("polygon").attr("points","10,7 18,13 18,1").style("stroke-width",2).style("stroke-dasharray","0"),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionEnd-margin").attr("class","marker extension "+t).attr("refX",9).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("viewBox","0 0 20 14").append("polygon").attr("points","10,1 10,13 18,7").style("stroke-width",2).style("stroke-dasharray","0")},"extension"),Rx=u((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionStart").attr("class","marker composition "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionEnd").attr("class","marker composition "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionStart-margin").attr("class","marker composition "+t).attr("refX",15).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("viewBox","0 0 15 15").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionEnd-margin").attr("class","marker composition "+t).attr("refX",3.5).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),qx=u((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationStart").attr("class","marker aggregation "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationEnd").attr("class","marker aggregation "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationStart-margin").attr("class","marker aggregation "+t).attr("refX",15).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",2).attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationEnd-margin").attr("class","marker aggregation "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",2).attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),Nx=u((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyStart").attr("class","marker dependency "+t).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyEnd").attr("class","marker dependency "+t).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyStart-margin").attr("class","marker dependency "+t).attr("refX",4).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyEnd-margin").attr("class","marker dependency "+t).attr("refX",16).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),Wx=u((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopStart").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopEnd").attr("class","marker lollipop "+t).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopStart-margin").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6).attr("stroke-width",2),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopEnd-margin").attr("class","marker lollipop "+t).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6).attr("stroke-width",2)},"lollipop"),zx=u((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-pointEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointEnd-margin").attr("class","marker "+t).attr("viewBox","0 0 11.5 14").attr("refX",11.5).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",10.5).attr("markerHeight",14).attr("orient","auto").append("path").attr("d","M 0 0 L 11.5 7 L 0 14 z").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointStart-margin").attr("class","marker "+t).attr("viewBox","0 0 11.5 14").attr("refX",1).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11.5).attr("markerHeight",14).attr("orient","auto").append("polygon").attr("points","0,7 11.5,14 11.5,0").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0")},"point"),Hx=u((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-circleEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleEnd-margin").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refY",5).attr("refX",12.25).attr("markerUnits","userSpaceOnUse").attr("markerWidth",14).attr("markerHeight",14).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleStart-margin").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-2).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",14).attr("markerHeight",14).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0")},"circle"),jx=u((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-crossEnd").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-crossStart").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-crossEnd-margin").attr("class","marker cross "+t).attr("viewBox","0 0 15 15").attr("refX",17.7).attr("refY",7.5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 1,1 L 14,14 M 1,14 L 14,1").attr("class","arrowMarkerPath").style("stroke-width",2.5),e.append("marker").attr("id",r+"_"+t+"-crossStart-margin").attr("class","marker cross "+t).attr("viewBox","0 0 15 15").attr("refX",-3.5).attr("refY",7.5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 1,1 L 14,14 M 1,14 L 14,1").attr("class","arrowMarkerPath").style("stroke-width",2.5).style("stroke-dasharray","1,0")},"cross"),Yx=u((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb"),Ux=u((e,t,r)=>{const i=Rt(),{themeVariables:s}=i,{transitionColor:o}=s;e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","strokeWidth").attr("orient","auto").append("path").attr("d","M 19,7 L11,14 L13,7 L11,0 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd-margin").attr("refX",17).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L11,14 L13,7 L11,0 Z").attr("fill",`${o}`)},"barbNeo"),Gx=u((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneStart").attr("class","marker onlyOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M9,0 L9,18 M15,0 L15,18"),e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneEnd").attr("class","marker onlyOne "+t).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M3,0 L3,18 M9,0 L9,18")},"only_one"),Xx=u((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneStart").attr("class","marker zeroOrOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),i.append("path").attr("d","M9,0 L9,18");const s=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+t).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");s.append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),s.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),Vx=u((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreStart").attr("class","marker oneOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"),e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreEnd").attr("class","marker oneOrMore "+t).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18")},"one_or_more"),Zx=u((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),i.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18");const s=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+t).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");s.append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),s.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),Kx=u((e,t,r)=>{const i=Rt(),{themeVariables:s}=i,{strokeWidth:o}=s;e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneStart").attr("class","marker onlyOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M9,0 L9,18 M15,0 L15,18").attr("stroke-width",`${o}`),e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneEnd").attr("class","marker onlyOne "+t).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M3,0 L3,18 M9,0 L9,18").attr("stroke-width",`${o}`)},"only_one_neo"),Qx=u((e,t,r)=>{const i=Rt(),{themeVariables:s}=i,{strokeWidth:o,mainBkg:a}=s,n=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneStart").attr("class","marker zeroOrOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse");n.append("circle").attr("fill",a??"white").attr("cx",21).attr("cy",9).attr("stroke-width",`${o}`).attr("r",6),n.append("path").attr("d","M9,0 L9,18").attr("stroke-width",`${o}`);const l=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+t).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("markerUnits","userSpaceOnUse").attr("orient","auto");l.append("circle").attr("fill",a??"white").attr("cx",9).attr("cy",9).attr("stroke-width",`${o}`).attr("r",6),l.append("path").attr("d","M21,0 L21,18").attr("stroke-width",`${o}`)},"zero_or_one_neo"),Jx=u((e,t,r)=>{const i=Rt(),{themeVariables:s}=i,{strokeWidth:o}=s;e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreStart").attr("class","marker oneOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27").attr("stroke-width",`${o}`),e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreEnd").attr("class","marker oneOrMore "+t).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18").attr("stroke-width",`${o}`)},"one_or_more_neo"),tb=u((e,t,r)=>{const i=Rt(),{themeVariables:s}=i,{strokeWidth:o,mainBkg:a}=s,n=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("markerUnits","userSpaceOnUse").attr("orient","auto");n.append("circle").attr("fill",a??"white").attr("cx",45.5).attr("cy",18).attr("r",6).attr("stroke-width",`${o}`),n.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18").attr("stroke-width",`${o}`);const l=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+t).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto").attr("markerUnits","userSpaceOnUse");l.append("circle").attr("fill",a??"white").attr("cx",11).attr("cy",18).attr("r",6).attr("stroke-width",`${o}`),l.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18").attr("stroke-width",`${o}`)},"zero_or_more_neo"),eb=u((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("path").attr("d",`M0,0
|
|
263
|
+
L20,10
|
|
264
|
+
M20,10
|
|
265
|
+
L0,20`)},"requirement_arrow"),rb=u((e,t,r)=>{const i=Rt(),{themeVariables:s}=i,{strokeWidth:o}=s;e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("stroke-width",`${o}`).attr("viewBox","0 0 25 20").append("path").attr("d",`M0,0
|
|
266
|
+
L20,10
|
|
267
|
+
M20,10
|
|
268
|
+
L0,20`).attr("stroke-linejoin","miter")},"requirement_arrow_neo"),ib=u((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g");i.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),i.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),i.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains"),sb=u((e,t,r)=>{const i=Rt(),{themeVariables:s}=i,{strokeWidth:o}=s,a=e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("g");a.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),a.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),a.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10),a.selectAll("*").attr("stroke-width",`${o}`)},"requirement_contains_neo"),ob={extension:Ix,composition:Rx,aggregation:qx,dependency:Nx,lollipop:Wx,point:zx,circle:Hx,cross:jx,barb:Yx,barbNeo:Ux,only_one:Gx,zero_or_one:Xx,one_or_more:Vx,zero_or_more:Zx,only_one_neo:Kx,zero_or_one_neo:Qx,one_or_more_neo:Jx,zero_or_more_neo:tb,requirement_arrow:eb,requirement_contains:ib,requirement_arrow_neo:rb,requirement_contains_neo:sb},vg=Dx,Lg=typeof global=="object"&&global&&global.Object===Object&&global,ab=typeof self=="object"&&self&&self.Object===Object&&self,Re=Lg||ab||Function("return this")(),Be=Re.Symbol,Fg=Object.prototype,nb=Fg.hasOwnProperty,lb=Fg.toString,mi=Be?Be.toStringTag:void 0;function hb(e){var t=nb.call(e,mi),r=e[mi];try{e[mi]=void 0;var i=!0}catch{}var s=lb.call(e);return i&&(t?e[mi]=r:delete e[mi]),s}var cb=Object.prototype,db=cb.toString;function ub(e){return db.call(e)}var gb="[object Null]",pb="[object Undefined]",rh=Be?Be.toStringTag:void 0;function Jr(e){return e==null?e===void 0?pb:gb:rh&&rh in Object(e)?hb(e):ub(e)}function lr(e){return e!=null&&typeof e=="object"}var fb="[object Symbol]";function fn(e){return typeof e=="symbol"||lr(e)&&Jr(e)==fb}function Mg(e,t){for(var r=-1,i=e==null?0:e.length,s=Array(i);++r<i;)s[r]=t(e[r],r,e);return s}var ie=Array.isArray,ih=Be?Be.prototype:void 0,sh=ih?ih.toString:void 0;function Ag(e){if(typeof e=="string")return e;if(ie(e))return Mg(e,Ag)+"";if(fn(e))return sh?sh.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function yn(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}function Ys(e){return e}var yb="[object AsyncFunction]",mb="[object Function]",Cb="[object GeneratorFunction]",xb="[object Proxy]";function Ms(e){if(!yn(e))return!1;var t=Jr(e);return t==mb||t==Cb||t==yb||t==xb}var yo=Re["__core-js_shared__"],oh=(function(){var e=/[^.]+$/.exec(yo&&yo.keys&&yo.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""})();function bb(e){return!!oh&&oh in e}var kb=Function.prototype,wb=kb.toString;function gr(e){if(e!=null){try{return wb.call(e)}catch{}try{return e+""}catch{}}return""}var Sb=/[\\^$.*+?()[\]{}|]/g,Tb=/^\[object .+?Constructor\]$/,Bb=Function.prototype,_b=Object.prototype,vb=Bb.toString,Lb=_b.hasOwnProperty,Fb=RegExp("^"+vb.call(Lb).replace(Sb,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Mb(e){if(!yn(e)||bb(e))return!1;var t=Ms(e)?Fb:Tb;return t.test(gr(e))}function Ab(e,t){return e?.[t]}function pr(e,t){var r=Ab(e,t);return Mb(r)?r:void 0}var ya=pr(Re,"WeakMap");function Eb(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}function $b(){}var Ob=800,Pb=16,Db=Date.now;function Ib(e){var t=0,r=0;return function(){var i=Db(),s=Pb-(i-r);if(r=i,s>0){if(++t>=Ob)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function Si(e){return function(){return e}}var ah=(function(){try{var e=pr(Object,"defineProperty");return e({},"",{}),e}catch{}})(),Rb=ah?function(e,t){return ah(e,"toString",{configurable:!0,enumerable:!1,value:Si(t),writable:!0})}:Ys,qb=Ib(Rb);function Nb(e,t){for(var r=-1,i=e==null?0:e.length;++r<i&&t(e[r],r,e)!==!1;);return e}function Wb(e,t,r,i){for(var s=e.length,o=r+-1;++o<s;)if(t(e[o],o,e))return o;return-1}function zb(e){return e!==e}function Hb(e,t,r){for(var i=r-1,s=e.length;++i<s;)if(e[i]===t)return i;return-1}function jb(e,t,r){return t===t?Hb(e,t,r):Wb(e,zb,r)}function Yb(e,t){var r=e==null?0:e.length;return!!r&&jb(e,t,0)>-1}var Ub=9007199254740991,Gb=/^(?:0|[1-9]\d*)$/;function Eg(e,t){var r=typeof e;return t=t??Ub,!!t&&(r=="number"||r!="symbol"&&Gb.test(e))&&e>-1&&e%1==0&&e<t}function $g(e,t){return e===t||e!==e&&t!==t}var nh=Math.max;function Xb(e,t,r){return t=nh(t===void 0?e.length-1:t,0),function(){for(var i=arguments,s=-1,o=nh(i.length-t,0),a=Array(o);++s<o;)a[s]=i[t+s];s=-1;for(var n=Array(t+1);++s<t;)n[s]=i[s];return n[t]=r(a),Eb(e,this,n)}}function Vb(e,t){return qb(Xb(e,t,Ys),e+"")}var Zb=9007199254740991;function mn(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Zb}function Us(e){return e!=null&&mn(e.length)&&!Ms(e)}var Kb=Object.prototype;function Og(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||Kb;return e===r}function Qb(e,t){for(var r=-1,i=Array(e);++r<e;)i[r]=t(r);return i}var Jb="[object Arguments]";function lh(e){return lr(e)&&Jr(e)==Jb}var Pg=Object.prototype,t1=Pg.hasOwnProperty,e1=Pg.propertyIsEnumerable,Gs=lh((function(){return arguments})())?lh:function(e){return lr(e)&&t1.call(e,"callee")&&!e1.call(e,"callee")};function r1(){return!1}var Dg=typeof exports=="object"&&exports&&!exports.nodeType&&exports,hh=Dg&&typeof module=="object"&&module&&!module.nodeType&&module,i1=hh&&hh.exports===Dg,ch=i1?Re.Buffer:void 0,s1=ch?ch.isBuffer:void 0,As=s1||r1,o1="[object Arguments]",a1="[object Array]",n1="[object Boolean]",l1="[object Date]",h1="[object Error]",c1="[object Function]",d1="[object Map]",u1="[object Number]",g1="[object Object]",p1="[object RegExp]",f1="[object Set]",y1="[object String]",m1="[object WeakMap]",C1="[object ArrayBuffer]",x1="[object DataView]",b1="[object Float32Array]",k1="[object Float64Array]",w1="[object Int8Array]",S1="[object Int16Array]",T1="[object Int32Array]",B1="[object Uint8Array]",_1="[object Uint8ClampedArray]",v1="[object Uint16Array]",L1="[object Uint32Array]",Dt={};Dt[b1]=Dt[k1]=Dt[w1]=Dt[S1]=Dt[T1]=Dt[B1]=Dt[_1]=Dt[v1]=Dt[L1]=!0;Dt[o1]=Dt[a1]=Dt[C1]=Dt[n1]=Dt[x1]=Dt[l1]=Dt[h1]=Dt[c1]=Dt[d1]=Dt[u1]=Dt[g1]=Dt[p1]=Dt[f1]=Dt[y1]=Dt[m1]=!1;function F1(e){return lr(e)&&mn(e.length)&&!!Dt[Jr(e)]}function M1(e){return function(t){return e(t)}}var Ig=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Mi=Ig&&typeof module=="object"&&module&&!module.nodeType&&module,A1=Mi&&Mi.exports===Ig,mo=A1&&Lg.process,dh=(function(){try{var e=Mi&&Mi.require&&Mi.require("util").types;return e||mo&&mo.binding&&mo.binding("util")}catch{}})(),uh=dh&&dh.isTypedArray,Cn=uh?M1(uh):F1,E1=Object.prototype,$1=E1.hasOwnProperty;function O1(e,t){var r=ie(e),i=!r&&Gs(e),s=!r&&!i&&As(e),o=!r&&!i&&!s&&Cn(e),a=r||i||s||o,n=a?Qb(e.length,String):[],l=n.length;for(var c in e)(t||$1.call(e,c))&&!(a&&(c=="length"||s&&(c=="offset"||c=="parent")||o&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||Eg(c,l)))&&n.push(c);return n}function P1(e,t){return function(r){return e(t(r))}}var D1=P1(Object.keys,Object),I1=Object.prototype,R1=I1.hasOwnProperty;function Rg(e){if(!Og(e))return D1(e);var t=[];for(var r in Object(e))R1.call(e,r)&&r!="constructor"&&t.push(r);return t}function we(e){return Us(e)?O1(e):Rg(e)}var q1=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,N1=/^\w*$/;function xn(e,t){if(ie(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||fn(e)?!0:N1.test(e)||!q1.test(e)||t!=null&&e in Object(t)}var $i=pr(Object,"create");function W1(){this.__data__=$i?$i(null):{},this.size=0}function z1(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var H1="__lodash_hash_undefined__",j1=Object.prototype,Y1=j1.hasOwnProperty;function U1(e){var t=this.__data__;if($i){var r=t[e];return r===H1?void 0:r}return Y1.call(t,e)?t[e]:void 0}var G1=Object.prototype,X1=G1.hasOwnProperty;function V1(e){var t=this.__data__;return $i?t[e]!==void 0:X1.call(t,e)}var Z1="__lodash_hash_undefined__";function K1(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=$i&&t===void 0?Z1:t,this}function hr(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}hr.prototype.clear=W1;hr.prototype.delete=z1;hr.prototype.get=U1;hr.prototype.has=V1;hr.prototype.set=K1;function Q1(){this.__data__=[],this.size=0}function Xs(e,t){for(var r=e.length;r--;)if($g(e[r][0],t))return r;return-1}var J1=Array.prototype,tk=J1.splice;function ek(e){var t=this.__data__,r=Xs(t,e);if(r<0)return!1;var i=t.length-1;return r==i?t.pop():tk.call(t,r,1),--this.size,!0}function rk(e){var t=this.__data__,r=Xs(t,e);return r<0?void 0:t[r][1]}function ik(e){return Xs(this.__data__,e)>-1}function sk(e,t){var r=this.__data__,i=Xs(r,e);return i<0?(++this.size,r.push([e,t])):r[i][1]=t,this}function qe(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}qe.prototype.clear=Q1;qe.prototype.delete=ek;qe.prototype.get=rk;qe.prototype.has=ik;qe.prototype.set=sk;var Oi=pr(Re,"Map");function ok(){this.size=0,this.__data__={hash:new hr,map:new(Oi||qe),string:new hr}}function ak(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Vs(e,t){var r=e.__data__;return ak(t)?r[typeof t=="string"?"string":"hash"]:r.map}function nk(e){var t=Vs(this,e).delete(e);return this.size-=t?1:0,t}function lk(e){return Vs(this,e).get(e)}function hk(e){return Vs(this,e).has(e)}function ck(e,t){var r=Vs(this,e),i=r.size;return r.set(e,t),this.size+=r.size==i?0:1,this}function Ne(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}Ne.prototype.clear=ok;Ne.prototype.delete=nk;Ne.prototype.get=lk;Ne.prototype.has=hk;Ne.prototype.set=ck;var dk="Expected a function";function bn(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(dk);var r=function(){var i=arguments,s=t?t.apply(this,i):i[0],o=r.cache;if(o.has(s))return o.get(s);var a=e.apply(this,i);return r.cache=o.set(s,a)||o,a};return r.cache=new(bn.Cache||Ne),r}bn.Cache=Ne;var uk=500;function gk(e){var t=bn(e,function(i){return r.size===uk&&r.clear(),i}),r=t.cache;return t}var pk=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,fk=/\\(\\)?/g,yk=gk(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(pk,function(r,i,s,o){t.push(s?o.replace(fk,"$1"):i||r)}),t});function mk(e){return e==null?"":Ag(e)}function qg(e,t){return ie(e)?e:xn(e,t)?[e]:yk(mk(e))}function Zs(e){if(typeof e=="string"||fn(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function Ng(e,t){t=qg(t,e);for(var r=0,i=t.length;e!=null&&r<i;)e=e[Zs(t[r++])];return r&&r==i?e:void 0}function Ck(e,t,r){var i=e==null?void 0:Ng(e,t);return i===void 0?r:i}function Wg(e,t){for(var r=-1,i=t.length,s=e.length;++r<i;)e[s+r]=t[r];return e}var gh=Be?Be.isConcatSpreadable:void 0;function xk(e){return ie(e)||Gs(e)||!!(gh&&e&&e[gh])}function bk(e,t,r,i,s){var o=-1,a=e.length;for(r||(r=xk),s||(s=[]);++o<a;){var n=e[o];r(n)?Wg(s,n):i||(s[s.length]=n)}return s}function kk(e,t,r,i){var s=-1,o=e==null?0:e.length;for(i&&o&&(r=e[++s]);++s<o;)r=t(r,e[s],s,e);return r}function wk(){this.__data__=new qe,this.size=0}function Sk(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function Tk(e){return this.__data__.get(e)}function Bk(e){return this.__data__.has(e)}var _k=200;function vk(e,t){var r=this.__data__;if(r instanceof qe){var i=r.__data__;if(!Oi||i.length<_k-1)return i.push([e,t]),this.size=++r.size,this;r=this.__data__=new Ne(i)}return r.set(e,t),this.size=r.size,this}function Pe(e){var t=this.__data__=new qe(e);this.size=t.size}Pe.prototype.clear=wk;Pe.prototype.delete=Sk;Pe.prototype.get=Tk;Pe.prototype.has=Bk;Pe.prototype.set=vk;function zg(e,t){for(var r=-1,i=e==null?0:e.length,s=0,o=[];++r<i;){var a=e[r];t(a,r,e)&&(o[s++]=a)}return o}function Lk(){return[]}var Fk=Object.prototype,Mk=Fk.propertyIsEnumerable,ph=Object.getOwnPropertySymbols,Ak=ph?function(e){return e==null?[]:(e=Object(e),zg(ph(e),function(t){return Mk.call(e,t)}))}:Lk;function Ek(e,t,r){var i=t(e);return ie(e)?i:Wg(i,r(e))}function fh(e){return Ek(e,we,Ak)}var ma=pr(Re,"DataView"),Ca=pr(Re,"Promise"),Fr=pr(Re,"Set"),yh="[object Map]",$k="[object Object]",mh="[object Promise]",Ch="[object Set]",xh="[object WeakMap]",bh="[object DataView]",Ok=gr(ma),Pk=gr(Oi),Dk=gr(Ca),Ik=gr(Fr),Rk=gr(ya),$e=Jr;(ma&&$e(new ma(new ArrayBuffer(1)))!=bh||Oi&&$e(new Oi)!=yh||Ca&&$e(Ca.resolve())!=mh||Fr&&$e(new Fr)!=Ch||ya&&$e(new ya)!=xh)&&($e=function(e){var t=Jr(e),r=t==$k?e.constructor:void 0,i=r?gr(r):"";if(i)switch(i){case Ok:return bh;case Pk:return yh;case Dk:return mh;case Ik:return Ch;case Rk:return xh}return t});var kh=Re.Uint8Array,qk="__lodash_hash_undefined__";function Nk(e){return this.__data__.set(e,qk),this}function Wk(e){return this.__data__.has(e)}function Pi(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new Ne;++t<r;)this.add(e[t])}Pi.prototype.add=Pi.prototype.push=Nk;Pi.prototype.has=Wk;function zk(e,t){for(var r=-1,i=e==null?0:e.length;++r<i;)if(t(e[r],r,e))return!0;return!1}function Hg(e,t){return e.has(t)}var Hk=1,jk=2;function jg(e,t,r,i,s,o){var a=r&Hk,n=e.length,l=t.length;if(n!=l&&!(a&&l>n))return!1;var c=o.get(e),h=o.get(t);if(c&&h)return c==t&&h==e;var d=-1,g=!0,f=r&jk?new Pi:void 0;for(o.set(e,t),o.set(t,e);++d<n;){var m=e[d],y=t[d];if(i)var C=a?i(y,m,d,t,e,o):i(m,y,d,e,t,o);if(C!==void 0){if(C)continue;g=!1;break}if(f){if(!zk(t,function(x,k){if(!Hg(f,k)&&(m===x||s(m,x,r,i,o)))return f.push(k)})){g=!1;break}}else if(!(m===y||s(m,y,r,i,o))){g=!1;break}}return o.delete(e),o.delete(t),g}function Yk(e){var t=-1,r=Array(e.size);return e.forEach(function(i,s){r[++t]=[s,i]}),r}function kn(e){var t=-1,r=Array(e.size);return e.forEach(function(i){r[++t]=i}),r}var Uk=1,Gk=2,Xk="[object Boolean]",Vk="[object Date]",Zk="[object Error]",Kk="[object Map]",Qk="[object Number]",Jk="[object RegExp]",t2="[object Set]",e2="[object String]",r2="[object Symbol]",i2="[object ArrayBuffer]",s2="[object DataView]",wh=Be?Be.prototype:void 0,Co=wh?wh.valueOf:void 0;function o2(e,t,r,i,s,o,a){switch(r){case s2:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case i2:return!(e.byteLength!=t.byteLength||!o(new kh(e),new kh(t)));case Xk:case Vk:case Qk:return $g(+e,+t);case Zk:return e.name==t.name&&e.message==t.message;case Jk:case e2:return e==t+"";case Kk:var n=Yk;case t2:var l=i&Uk;if(n||(n=kn),e.size!=t.size&&!l)return!1;var c=a.get(e);if(c)return c==t;i|=Gk,a.set(e,t);var h=jg(n(e),n(t),i,s,o,a);return a.delete(e),h;case r2:if(Co)return Co.call(e)==Co.call(t)}return!1}var a2=1,n2=Object.prototype,l2=n2.hasOwnProperty;function h2(e,t,r,i,s,o){var a=r&a2,n=fh(e),l=n.length,c=fh(t),h=c.length;if(l!=h&&!a)return!1;for(var d=l;d--;){var g=n[d];if(!(a?g in t:l2.call(t,g)))return!1}var f=o.get(e),m=o.get(t);if(f&&m)return f==t&&m==e;var y=!0;o.set(e,t),o.set(t,e);for(var C=a;++d<l;){g=n[d];var x=e[g],k=t[g];if(i)var S=a?i(k,x,g,t,e,o):i(x,k,g,e,t,o);if(!(S===void 0?x===k||s(x,k,r,i,o):S)){y=!1;break}C||(C=g=="constructor")}if(y&&!C){var T=e.constructor,B=t.constructor;T!=B&&"constructor"in e&&"constructor"in t&&!(typeof T=="function"&&T instanceof T&&typeof B=="function"&&B instanceof B)&&(y=!1)}return o.delete(e),o.delete(t),y}var c2=1,Sh="[object Arguments]",Th="[object Array]",Ji="[object Object]",d2=Object.prototype,Bh=d2.hasOwnProperty;function u2(e,t,r,i,s,o){var a=ie(e),n=ie(t),l=a?Th:$e(e),c=n?Th:$e(t);l=l==Sh?Ji:l,c=c==Sh?Ji:c;var h=l==Ji,d=c==Ji,g=l==c;if(g&&As(e)){if(!As(t))return!1;a=!0,h=!1}if(g&&!h)return o||(o=new Pe),a||Cn(e)?jg(e,t,r,i,s,o):o2(e,t,l,r,i,s,o);if(!(r&c2)){var f=h&&Bh.call(e,"__wrapped__"),m=d&&Bh.call(t,"__wrapped__");if(f||m){var y=f?e.value():e,C=m?t.value():t;return o||(o=new Pe),s(y,C,r,i,o)}}return g?(o||(o=new Pe),h2(e,t,r,i,s,o)):!1}function wn(e,t,r,i,s){return e===t?!0:e==null||t==null||!lr(e)&&!lr(t)?e!==e&&t!==t:u2(e,t,r,i,wn,s)}var g2=1,p2=2;function f2(e,t,r,i){var s=r.length,o=s;if(e==null)return!o;for(e=Object(e);s--;){var a=r[s];if(a[2]?a[1]!==e[a[0]]:!(a[0]in e))return!1}for(;++s<o;){a=r[s];var n=a[0],l=e[n],c=a[1];if(a[2]){if(l===void 0&&!(n in e))return!1}else{var h=new Pe,d;if(!(d===void 0?wn(c,l,g2|p2,i,h):d))return!1}}return!0}function Yg(e){return e===e&&!yn(e)}function y2(e){for(var t=we(e),r=t.length;r--;){var i=t[r],s=e[i];t[r]=[i,s,Yg(s)]}return t}function Ug(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}function m2(e){var t=y2(e);return t.length==1&&t[0][2]?Ug(t[0][0],t[0][1]):function(r){return r===e||f2(r,e,t)}}function C2(e,t){return e!=null&&t in Object(e)}function x2(e,t,r){t=qg(t,e);for(var i=-1,s=t.length,o=!1;++i<s;){var a=Zs(t[i]);if(!(o=e!=null&&r(e,a)))break;e=e[a]}return o||++i!=s?o:(s=e==null?0:e.length,!!s&&mn(s)&&Eg(a,s)&&(ie(e)||Gs(e)))}function b2(e,t){return e!=null&&x2(e,t,C2)}var k2=1,w2=2;function S2(e,t){return xn(e)&&Yg(t)?Ug(Zs(e),t):function(r){var i=Ck(r,e);return i===void 0&&i===t?b2(r,e):wn(t,i,k2|w2)}}function T2(e){return function(t){return t?.[e]}}function B2(e){return function(t){return Ng(t,e)}}function _2(e){return xn(e)?T2(Zs(e)):B2(e)}function Gg(e){return typeof e=="function"?e:e==null?Ys:typeof e=="object"?ie(e)?S2(e[0],e[1]):m2(e):_2(e)}function v2(e){return function(t,r,i){for(var s=-1,o=Object(t),a=i(t),n=a.length;n--;){var l=a[++s];if(r(o[l],l,o)===!1)break}return t}}var L2=v2();function F2(e,t){return e&&L2(e,t,we)}function M2(e,t){return function(r,i){if(r==null)return r;if(!Us(r))return e(r,i);for(var s=r.length,o=-1,a=Object(r);++o<s&&i(a[o],o,a)!==!1;);return r}}var Sn=M2(F2);function A2(e){return lr(e)&&Us(e)}function E2(e){return typeof e=="function"?e:Ys}function Ke(e,t){var r=ie(e)?Nb:Sn;return r(e,E2(t))}function $2(e,t){var r=[];return Sn(e,function(i,s,o){t(i,s,o)&&r.push(i)}),r}function ts(e,t){var r=ie(e)?zg:$2;return r(e,Gg(t))}function O2(e,t){return Mg(t,function(r){return e[r]})}function xo(e){return e==null?[]:O2(e,we(e))}var P2="[object Map]",D2="[object Set]",I2=Object.prototype,R2=I2.hasOwnProperty;function _h(e){if(e==null)return!0;if(Us(e)&&(ie(e)||typeof e=="string"||typeof e.splice=="function"||As(e)||Cn(e)||Gs(e)))return!e.length;var t=$e(e);if(t==P2||t==D2)return!e.size;if(Og(e))return!Rg(e).length;for(var r in e)if(R2.call(e,r))return!1;return!0}function _r(e){return e===void 0}function q2(e,t,r,i,s){return s(e,function(o,a,n){r=i?(i=!1,o):t(r,o,a,n)}),r}function N2(e,t,r){var i=ie(e)?kk:q2,s=arguments.length<3;return i(e,Gg(t),r,s,Sn)}var W2=1/0,z2=Fr&&1/kn(new Fr([,-0]))[1]==W2?function(e){return new Fr(e)}:$b,H2=200;function j2(e,t,r){var i=-1,s=Yb,o=e.length,a=!0,n=[],l=n;if(o>=H2){var c=z2(e);if(c)return kn(c);a=!1,s=Hg,l=new Pi}else l=n;t:for(;++i<o;){var h=e[i],d=h;if(h=h!==0?h:0,a&&d===d){for(var g=l.length;g--;)if(l[g]===d)continue t;n.push(h)}else s(l,d,r)||(l!==n&&l.push(d),n.push(h))}return n}var Y2=Vb(function(e){return j2(bk(e,1,A2,!0))}),U2="\0",Qe="\0",vh="";class Ks{constructor(t={}){this._isDirected=Object.prototype.hasOwnProperty.call(t,"directed")?t.directed:!0,this._isMultigraph=Object.prototype.hasOwnProperty.call(t,"multigraph")?t.multigraph:!1,this._isCompound=Object.prototype.hasOwnProperty.call(t,"compound")?t.compound:!1,this._label=void 0,this._defaultNodeLabelFn=Si(void 0),this._defaultEdgeLabelFn=Si(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[Qe]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(t){return this._label=t,this}graph(){return this._label}setDefaultNodeLabel(t){return Ms(t)||(t=Si(t)),this._defaultNodeLabelFn=t,this}nodeCount(){return this._nodeCount}nodes(){return we(this._nodes)}sources(){var t=this;return ts(this.nodes(),function(r){return _h(t._in[r])})}sinks(){var t=this;return ts(this.nodes(),function(r){return _h(t._out[r])})}setNodes(t,r){var i=arguments,s=this;return Ke(t,function(o){i.length>1?s.setNode(o,r):s.setNode(o)}),this}setNode(t,r){return Object.prototype.hasOwnProperty.call(this._nodes,t)?(arguments.length>1&&(this._nodes[t]=r),this):(this._nodes[t]=arguments.length>1?r:this._defaultNodeLabelFn(t),this._isCompound&&(this._parent[t]=Qe,this._children[t]={},this._children[Qe][t]=!0),this._in[t]={},this._preds[t]={},this._out[t]={},this._sucs[t]={},++this._nodeCount,this)}node(t){return this._nodes[t]}hasNode(t){return Object.prototype.hasOwnProperty.call(this._nodes,t)}removeNode(t){if(Object.prototype.hasOwnProperty.call(this._nodes,t)){var r=i=>this.removeEdge(this._edgeObjs[i]);delete this._nodes[t],this._isCompound&&(this._removeFromParentsChildList(t),delete this._parent[t],Ke(this.children(t),i=>{this.setParent(i)}),delete this._children[t]),Ke(we(this._in[t]),r),delete this._in[t],delete this._preds[t],Ke(we(this._out[t]),r),delete this._out[t],delete this._sucs[t],--this._nodeCount}return this}setParent(t,r){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(_r(r))r=Qe;else{r+="";for(var i=r;!_r(i);i=this.parent(i))if(i===t)throw new Error("Setting "+r+" as parent of "+t+" would create a cycle");this.setNode(r)}return this.setNode(t),this._removeFromParentsChildList(t),this._parent[t]=r,this._children[r][t]=!0,this}_removeFromParentsChildList(t){delete this._children[this._parent[t]][t]}parent(t){if(this._isCompound){var r=this._parent[t];if(r!==Qe)return r}}children(t){if(_r(t)&&(t=Qe),this._isCompound){var r=this._children[t];if(r)return we(r)}else{if(t===Qe)return this.nodes();if(this.hasNode(t))return[]}}predecessors(t){var r=this._preds[t];if(r)return we(r)}successors(t){var r=this._sucs[t];if(r)return we(r)}neighbors(t){var r=this.predecessors(t);if(r)return Y2(r,this.successors(t))}isLeaf(t){var r;return this.isDirected()?r=this.successors(t):r=this.neighbors(t),r.length===0}filterNodes(t){var r=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});r.setGraph(this.graph());var i=this;Ke(this._nodes,function(a,n){t(n)&&r.setNode(n,a)}),Ke(this._edgeObjs,function(a){r.hasNode(a.v)&&r.hasNode(a.w)&&r.setEdge(a,i.edge(a))});var s={};function o(a){var n=i.parent(a);return n===void 0||r.hasNode(n)?(s[a]=n,n):n in s?s[n]:o(n)}return this._isCompound&&Ke(r.nodes(),function(a){r.setParent(a,o(a))}),r}setDefaultEdgeLabel(t){return Ms(t)||(t=Si(t)),this._defaultEdgeLabelFn=t,this}edgeCount(){return this._edgeCount}edges(){return xo(this._edgeObjs)}setPath(t,r){var i=this,s=arguments;return N2(t,function(o,a){return s.length>1?i.setEdge(o,a,r):i.setEdge(o,a),a}),this}setEdge(){var t,r,i,s,o=!1,a=arguments[0];typeof a=="object"&&a!==null&&"v"in a?(t=a.v,r=a.w,i=a.name,arguments.length===2&&(s=arguments[1],o=!0)):(t=a,r=arguments[1],i=arguments[3],arguments.length>2&&(s=arguments[2],o=!0)),t=""+t,r=""+r,_r(i)||(i=""+i);var n=Ti(this._isDirected,t,r,i);if(Object.prototype.hasOwnProperty.call(this._edgeLabels,n))return o&&(this._edgeLabels[n]=s),this;if(!_r(i)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(t),this.setNode(r),this._edgeLabels[n]=o?s:this._defaultEdgeLabelFn(t,r,i);var l=G2(this._isDirected,t,r,i);return t=l.v,r=l.w,Object.freeze(l),this._edgeObjs[n]=l,Lh(this._preds[r],t),Lh(this._sucs[t],r),this._in[r][n]=l,this._out[t][n]=l,this._edgeCount++,this}edge(t,r,i){var s=arguments.length===1?bo(this._isDirected,arguments[0]):Ti(this._isDirected,t,r,i);return this._edgeLabels[s]}hasEdge(t,r,i){var s=arguments.length===1?bo(this._isDirected,arguments[0]):Ti(this._isDirected,t,r,i);return Object.prototype.hasOwnProperty.call(this._edgeLabels,s)}removeEdge(t,r,i){var s=arguments.length===1?bo(this._isDirected,arguments[0]):Ti(this._isDirected,t,r,i),o=this._edgeObjs[s];return o&&(t=o.v,r=o.w,delete this._edgeLabels[s],delete this._edgeObjs[s],Fh(this._preds[r],t),Fh(this._sucs[t],r),delete this._in[r][s],delete this._out[t][s],this._edgeCount--),this}inEdges(t,r){var i=this._in[t];if(i){var s=xo(i);return r?ts(s,function(o){return o.v===r}):s}}outEdges(t,r){var i=this._out[t];if(i){var s=xo(i);return r?ts(s,function(o){return o.w===r}):s}}nodeEdges(t,r){var i=this.inEdges(t,r);if(i)return i.concat(this.outEdges(t,r))}}Ks.prototype._nodeCount=0;Ks.prototype._edgeCount=0;function Lh(e,t){e[t]?e[t]++:e[t]=1}function Fh(e,t){--e[t]||delete e[t]}function Ti(e,t,r,i){var s=""+t,o=""+r;if(!e&&s>o){var a=s;s=o,o=a}return s+vh+o+vh+(_r(i)?U2:i)}function G2(e,t,r,i){var s=""+t,o=""+r;if(!e&&s>o){var a=s;s=o,o=a}var n={v:s,w:o};return i&&(n.name=i),n}function bo(e,t){return Ti(e,t.v,t.w,t.name)}function Xg(e,{edgePathsClass:t="edges edgePaths"}={}){const r=e.insert("g").attr("class","root"),i=r.insert("g").attr("class","clusters"),s=r.insert("g").attr("class",t),o=r.insert("g").attr("class","edgeLabels"),a=r.insert("g").attr("class","nodes");return{clusters:i,edgePaths:s,edgeLabels:o,nodes:a,rootGroups:r}}u(Xg,"createLayoutElementGroups");async function Vg(e,t){if(t.label){const{shapeSvg:r,bbox:i}=await ct(e,t);t.labelBBox={width:i.width,height:i.height},r.remove()}else t.labelBBox={width:0,height:0}}u(Vg,"measureGroupLabel");async function Zg(e,t,r){const i=await gn(e,t,r),s=i.node()?.getBBox()??{width:0,height:0};return t.width=s.width,t.height=s.height,i}u(Zg,"insertMeasuredNode");async function Kg(e,t){const r=new Ks({multigraph:!0,compound:!0}),i=[...t.edges],s=_t(),o=Xg(e),{edgeLabels:a,nodes:n}=o,l=new Map,c=e.node()!=null;await Promise.all(t.nodes.map(async h=>{if(h.isGroup)c&&await Vg(n,h),r.setNode(h.id,{...h});else{if(c){const d=await Zg(n,h,{config:s,dir:h.dir});l.set(h.id,d)}r.setNode(h.id,{...h})}}));for(const h of i)c&&wg(h)&&await pn(a,h),r.setEdge(h.start,h.end,{...h},h.id),t.edges.some(g=>g.id===h.id)||t.edges.push(h);if(globalThis.mermaidCaptureSizes){const{captureNodeSizes:h}=await Bt(async()=>{const{captureNodeSizes:d}=await import("./sizeCapture-INFHLROL-Ver6XJXZ.js");return{captureNodeSizes:d}},__vite__mapDeps([2,0,1,3]));h(e,t)}return{graph:r,groups:o,nodeElements:l}}u(Kg,"createGraphWithElements");var Ft=new Map,rr=new Map,Qg=new Map,X2=u(()=>{rr.clear(),Qg.clear(),Ft.clear()},"clear"),Di=u((e,t)=>{const r=rr.get(t)||[];return D.trace("In isDescendant",t," ",e," = ",r.includes(e)),r.includes(e)},"isDescendant"),V2=u((e,t)=>{const r=rr.get(t)||[];return D.info("Descendants of ",t," is ",r),D.info("Edge is ",e),e.v===t||e.w===t?!1:r?r.includes(e.v)||Di(e.v,t)||Di(e.w,t)||r.includes(e.w):(D.debug("Tilt, ",t,",not in descendants"),!1)},"edgeInCluster"),Jg=u((e,t,r,i)=>{D.debug("Copying children of ",e,"root",i,"data",t.node(e),i);const s=t.children(e)||[];e!==i&&s.push(e),D.debug("Copying (nodes) clusterId",e,"nodes",s),s.forEach(o=>{if(t.children(o).length>0)Jg(o,t,r,i);else{const a=t.node(o);D.info("cp ",o," to ",i," with parent ",e),r.setNode(o,a),i!==t.parent(o)&&(D.debug("Setting parent",o,t.parent(o)),r.setParent(o,t.parent(o))),e!==i&&o!==e?(D.debug("Setting parent",o,e),r.setParent(o,e)):(D.info("In copy ",e,"root",i,"data",t.node(e),i),D.debug("Not Setting parent for node=",o,"cluster!==rootId",e!==i,"node!==clusterId",o!==e));const n=t.edges(o);D.debug("Copying Edges",n),n.forEach(l=>{D.info("Edge",l);const c=t.edge(l.v,l.w,l.name);D.info("Edge data",c,i);try{V2(l,i)?(D.info("Copying as ",l.v,l.w,c,l.name),r.setEdge(l.v,l.w,c,l.name),D.info("newGraph edges ",r.edges(),r.edge(r.edges()[0]))):D.info("Skipping copy of edge ",l.v,"-->",l.w," rootId: ",i," clusterId:",e)}catch(h){D.error(h)}})}D.debug("Removing node",o),t.removeNode(o)})},"copy"),tp=u((e,t)=>{const r=t.children(e);let i=[...r];for(const s of r)Qg.set(s,e),i=[...i,...tp(s,t)];return i},"extractDescendants"),Z2=u((e,t,r)=>{const i=e.edges().filter(l=>l.v===t||l.w===t),s=e.edges().filter(l=>l.v===r||l.w===r),o=i.map(l=>({v:l.v===t?r:l.v,w:l.w===t?t:l.w})),a=s.map(l=>({v:l.v,w:l.w}));return o.filter(l=>a.some(c=>l.v===c.v&&l.w===c.w))},"findCommonEdges"),Es=u((e,t,r)=>{const i=t.children(e);if(D.trace("Searching children of id ",e,i),i.length<1)return e;let s;for(const o of i){const a=Es(o,t,r),n=Z2(t,r,a);if(a)if(n.length>0)s=a;else return a}return s},"findNonClusterChild"),Mh=u(e=>!Ft.has(e)||!Ft.get(e).externalConnections?e:Ft.has(e)?Ft.get(e).id:e,"getAnchorId"),u_=u((e,t)=>{if(!e||t>10){D.debug("Opting out, no graph ");return}else D.debug("Opting in, graph ");e.nodes().forEach(function(r){e.children(r).length>0&&(D.debug("Cluster identified",r," Replacement id in edges: ",Es(r,e,r)),rr.set(r,tp(r,e)),Ft.set(r,{id:Es(r,e,r),clusterData:e.node(r)}))}),e.nodes().forEach(function(r){const i=e.children(r),s=e.edges();i.length>0?(D.debug("Cluster identified",r,rr),s.forEach(o=>{const a=Di(o.v,r),n=Di(o.w,r);a^n&&(D.debug("Edge: ",o," leaves cluster ",r),D.debug("Descendants of XXX ",r,": ",rr.get(r)),Ft.get(r).externalConnections=!0)})):D.debug("Not a cluster ",r,rr)});for(let r of Ft.keys()){const i=Ft.get(r).id,s=e.parent(i);s!==r&&Ft.has(s)&&!Ft.get(s).externalConnections&&(Ft.get(r).id=s);const o=e.edges().some(a=>a.v===r);if(i&&Ft.get(r)?.externalConnections&&o&&ip(e,i,r)){const a=K2(e,r,e.parent(i));a&&(Ft.get(r).id=a)}}e.edges().forEach(function(r){const i=e.edge(r);D.debug("Edge "+r.v+" -> "+r.w+": "+JSON.stringify(r)),D.debug("Edge "+r.v+" -> "+r.w+": "+JSON.stringify(e.edge(r)));let s=r.v,o=r.w;if(D.debug("Fix XXX",Ft,"ids:",r.v,r.w,"Translating: ",Ft.get(r.v)," --- ",Ft.get(r.w)),Ft.get(r.v)||Ft.get(r.w)){if(D.debug("Fixing and trying - removing XXX",r.v,r.w,r.name),s=Mh(r.v),o=Mh(r.w),e.removeEdge(r.v,r.w,r.name),s!==r.v){const a=e.parent(s);Ft.get(a).externalConnections=!0,i.fromCluster=r.v}if(o!==r.w){const a=e.parent(o);Ft.get(a).externalConnections=!0,i.toCluster=r.w}D.debug("Fix Replacing with XXX",s,o,r.name),e.setEdge(s,o,i,r.name)}}),ep(e,0),D.trace(Ft)},"adjustClustersAndEdges"),ep=u((e,t)=>{if(t>10){D.error("Bailing out");return}let r=e.nodes(),i=!1;for(const s of r){const o=e.children(s);i=i||o.length>0}if(!i){D.debug("Done, no node has children",e.nodes());return}D.debug("Nodes = ",r,t);for(const s of r)if(D.debug("Extracting node",s,Ft,Ft.has(s)&&!Ft.get(s).externalConnections,!e.parent(s),e.node(s),e.children("D")," Depth ",t),!Ft.has(s))D.debug("Not a cluster",s,t);else if(!Ft.get(s).externalConnections&&e.children(s)&&e.children(s).length>0){D.debug("Cluster without external connections, without a parent and with children",s,t);let a=e.graph().rankdir==="TB"?"LR":"TB";Ft.get(s)?.clusterData?.dir&&(a=Ft.get(s).clusterData.dir,D.debug("Fixing dir",Ft.get(s).clusterData.dir,a));const n=new Ks({multigraph:!0,compound:!0}).setGraph({rankdir:a,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});Jg(s,e,n,s),e.setNode(s,{clusterNode:!0,id:s,clusterData:Ft.get(s).clusterData,label:Ft.get(s).label,graph:n})}else D.debug("Cluster ** ",s," **not meeting the criteria !externalConnections:",!Ft.get(s).externalConnections," no parent: ",!e.parent(s)," children ",e.children(s)&&e.children(s).length>0,e.children("D"),t),D.debug(Ft);r=e.nodes(),D.debug("New list of nodes",r);for(const s of r){const o=e.node(s);D.debug(" Now next level",s,o),o?.clusterNode&&ep(o.graph,t+1)}},"extractor"),rp=u((e,t)=>{if(t.length===0)return[];let r=Object.assign([],t);return t.forEach(i=>{const s=e.children(i),o=rp(e,s);r=[...r,...o]}),r},"sorter"),g_=u(e=>rp(e,e.children()),"sortNodesByHierarchy"),ip=u((e,t,r)=>{let i=e.parent(t);for(;i&&i!==r;){const s=Ft.get(i);if(s&&!s.externalConnections)return!0;i=e.parent(i)}return!1},"isNodeInExtractableCluster"),K2=u((e,t,r)=>{const i=e.children(t)??[];for(const s of i){if(s===r||Di(s,r))continue;const o=Es(s,e,t);if(o&&!ip(e,o,t))return o}return null},"findSafeAnchorNode");function sp({prepareLayout:e,measureLayout:t,runLayoutCore:r,paintLayout:i,afterPaint:s,paintOptions:o}){const a=t??Bn;return u(async function(l,c,h,d){const g=c.select("g");(h?.insertMarkers??vg)(g,l.markers,l.type,l.diagramId),Tn();const f={element:g,helpers:h,options:d};f.preparedLayout=await e?.(l,f);const m=await a(l,f),y=await r(l,f),C={...f,measure:m};i?await i(l,C,y):await _n(l,C,o),await s?.(l,C,y)},"render")}u(sp,"createCommonLayoutRenderer");function Tn(){fx(),Fx(),Sx(),X2()}u(Tn,"clearLayoutRenderState");async function Bn(e,{element:t}){return await Kg(t,e)}u(Bn,"defaultMeasureLayout");async function _n(e,t,r={}){const{measure:i}=t,{groups:s}=i;for(const a of r.getNodes?.(e,t)??e.nodes)r.skipNode?.(a,t)||await op(s,a,t,r);const o=np(e.nodes);for(const a of e.edges)lp(a,r)||await hp(s,a,o,e,r,t)}u(_n,"paintLayoutData");async function op(e,t,r,i){t.clusterNode?Kl(t):ap(t,r,i)?await kg(e.clusters,t):Kl(t)}u(op,"paintLayoutNode");function ap(e,t,r){return e.isGroup===!0&&(r.isCluster?.(e,t)??!0)}u(ap,"shouldPaintAsCluster");function np(e){const t=new Map;for(const r of e)r?.id&&t.set(r.id,r);return t}u(np,"buildNodeLookup");function lp(e,t){return e.isLayoutOnly||!!t.skipEdge?.(e)}u(lp,"shouldSkipPaintEdge");async function hp(e,t,r,i,s,o){const a=Tg(e.edgePaths,{...t},s.clusterDb??new Map,i.type,xa(t.start,t,r,o,s),xa(t.end,t,r,o,s),i.diagramId,cp(t,s));wg(t)&&(Xr.has(t.id)||await pn(e.edgeLabels,t),dp(t,a))}u(hp,"paintLayoutEdge");function xa(e,t,r,i,s){return s.getEdgeNode?.(e,t,i)??(e?r.get(e)??{}:{})}u(xa,"getRenderedNode");function cp(e,t){return typeof t.skipIntersect=="function"?t.skipIntersect(e):t.skipIntersect??!1}u(cp,"shouldSkipIntersect");function dp(e,t){const r=t?.updatedPath??t?.originalPath,i=Rt(),{subGraphTitleTotalMargin:s}=Hs({flowchart:i.flowchart??{}});if(e.label){const o=Xr.get(e.id);let a=e.x,n=e.y;if(r){const l=Zt.calcLabelPosition(r);D.debug("Moving label "+e.label+" from (",a,",",n,") to (",l.x,",",l.y,") abc88"),t?.updatedPath&&(a=l.x,n=l.y)}o.attr("transform",`translate(${a}, ${n+s/2})`)}if(e?.startLabelLeft){const o=Nt.get(e.id).startLeft;let a=e?.x,n=e?.y;if(r){const l=Zt.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",r);a=l.x,n=l.y}o.attr("transform",`translate(${a}, ${n})`)}if(e.startLabelRight){const o=Nt.get(e.id).startRight;let a=e.x,n=e.y;if(r){const l=Zt.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",r);a=l.x,n=l.y}o.attr("transform",`translate(${a}, ${n})`)}if(e.endLabelLeft){const o=Nt.get(e.id).endLeft;let a=e.x,n=e.y;if(r){const l=Zt.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",r);a=l.x,n=l.y}o.attr("transform",`translate(${a}, ${n})`)}if(e.endLabelRight){const o=Nt.get(e.id).endRight;let a=e.x,n=e.y;if(r){const l=Zt.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",r);a=l.x,n=l.y}o.attr("transform",`translate(${a}, ${n})`)}}u(dp,"positionRenderedEdgeLabel");function up(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}u(up,"getDefaultExportFromCjs");var Gt={},es={},We={},Ah;function ti(){if(Ah)return We;Ah=1;function e(a){return typeof a>"u"||a===null}u(e,"isNothing");function t(a){return typeof a=="object"&&a!==null}u(t,"isObject");function r(a){return Array.isArray(a)?a:e(a)?[]:[a]}u(r,"toArray");function i(a,n){if(n){const l=Object.keys(n);for(let c=0,h=l.length;c<h;c+=1){const d=l[c];a[d]=n[d]}}return a}u(i,"extend");function s(a,n){let l="";for(let c=0;c<n;c+=1)l+=a;return l}u(s,"repeat");function o(a){return a===0&&Number.NEGATIVE_INFINITY===1/a}return u(o,"isNegativeZero"),We.isNothing=e,We.isObject=t,We.toArray=r,We.repeat=s,We.isNegativeZero=o,We.extend=i,We}u(ti,"requireCommon");var ko,Eh;function ei(){if(Eh)return ko;Eh=1;function e(r,i){let s="";const o=r.reason||"(unknown reason)";return r.mark?(r.mark.name&&(s+='in "'+r.mark.name+'" '),s+="("+(r.mark.line+1)+":"+(r.mark.column+1)+")",!i&&r.mark.snippet&&(s+=`
|
|
269
|
+
|
|
270
|
+
`+r.mark.snippet),o+" "+s):o}u(e,"formatError");function t(r,i){Error.call(this),this.name="YAMLException",this.reason=r,this.mark=i,this.message=e(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}return u(t,"YAMLException2"),t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t.prototype.toString=u(function(i){return this.name+": "+e(this,i)},"toString"),ko=t,ko}u(ei,"requireException");var wo,$h;function gp(){if($h)return wo;$h=1;const e=ti();function t(s,o,a,n,l){let c="",h="";const d=Math.floor(l/2)-1;return n-o>d&&(c=" ... ",o=n-d+c.length),a-n>d&&(h=" ...",a=n+d-h.length),{str:c+s.slice(o,a).replace(/\t/g,"→")+h,pos:n-o+c.length}}u(t,"getLine");function r(s,o){return e.repeat(" ",o-s.length)+s}u(r,"padStart");function i(s,o){if(o=Object.create(o||null),!s.buffer)return null;o.maxLength||(o.maxLength=79),typeof o.indent!="number"&&(o.indent=1),typeof o.linesBefore!="number"&&(o.linesBefore=3),typeof o.linesAfter!="number"&&(o.linesAfter=2);const a=/\r?\n|\r|\0/g,n=[0],l=[];let c,h=-1;for(;c=a.exec(s.buffer);)l.push(c.index),n.push(c.index+c[0].length),s.position<=c.index&&h<0&&(h=n.length-2);h<0&&(h=n.length-1);let d="";const g=Math.min(s.line+o.linesAfter,l.length).toString().length,f=o.maxLength-(o.indent+g+3);for(let y=1;y<=o.linesBefore&&!(h-y<0);y++){const C=t(s.buffer,n[h-y],l[h-y],s.position-(n[h]-n[h-y]),f);d=e.repeat(" ",o.indent)+r((s.line-y+1).toString(),g)+" | "+C.str+`
|
|
271
|
+
`+d}const m=t(s.buffer,n[h],l[h],s.position,f);d+=e.repeat(" ",o.indent)+r((s.line+1).toString(),g)+" | "+m.str+`
|
|
272
|
+
`,d+=e.repeat("-",o.indent+g+3+m.pos)+`^
|
|
273
|
+
`;for(let y=1;y<=o.linesAfter&&!(h+y>=l.length);y++){const C=t(s.buffer,n[h+y],l[h+y],s.position-(n[h]-n[h+y]),f);d+=e.repeat(" ",o.indent)+r((s.line+y+1).toString(),g)+" | "+C.str+`
|
|
274
|
+
`}return d.replace(/\n$/,"")}return u(i,"makeSnippet"),wo=i,wo}u(gp,"requireSnippet");var So,Oh;function Qt(){if(Oh)return So;Oh=1;const e=ei(),t=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],r=["scalar","sequence","mapping"];function i(o){const a={};return o!==null&&Object.keys(o).forEach(function(n){o[n].forEach(function(l){a[String(l)]=n})}),a}u(i,"compileStyleAliases");function s(o,a){if(a=a||{},Object.keys(a).forEach(function(n){if(t.indexOf(n)===-1)throw new e('Unknown option "'+n+'" is met in definition of "'+o+'" YAML type.')}),this.options=a,this.tag=o,this.kind=a.kind||null,this.resolve=a.resolve||function(){return!0},this.construct=a.construct||function(n){return n},this.instanceOf=a.instanceOf||null,this.predicate=a.predicate||null,this.represent=a.represent||null,this.representName=a.representName||null,this.defaultStyle=a.defaultStyle||null,this.multi=a.multi||!1,this.styleAliases=i(a.styleAliases||null),r.indexOf(this.kind)===-1)throw new e('Unknown kind "'+this.kind+'" is specified for "'+o+'" YAML type.')}return u(s,"Type2"),So=s,So}u(Qt,"requireType");var To,Ph;function vn(){if(Ph)return To;Ph=1;const e=ei(),t=Qt();function r(o,a){const n=[];return o[a].forEach(function(l){let c=n.length;n.forEach(function(h,d){h.tag===l.tag&&h.kind===l.kind&&h.multi===l.multi&&(c=d)}),n[c]=l}),n}u(r,"compileList");function i(){const o={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function a(n){n.multi?(o.multi[n.kind].push(n),o.multi.fallback.push(n)):o[n.kind][n.tag]=o.fallback[n.tag]=n}u(a,"collectType");for(let n=0,l=arguments.length;n<l;n+=1)arguments[n].forEach(a);return o}u(i,"compileMap");function s(o){return this.extend(o)}return u(s,"Schema2"),s.prototype.extend=u(function(a){let n=[],l=[];if(a instanceof t)l.push(a);else if(Array.isArray(a))l=l.concat(a);else if(a&&(Array.isArray(a.implicit)||Array.isArray(a.explicit)))a.implicit&&(n=n.concat(a.implicit)),a.explicit&&(l=l.concat(a.explicit));else throw new e("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");n.forEach(function(h){if(!(h instanceof t))throw new e("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(h.loadKind&&h.loadKind!=="scalar")throw new e("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(h.multi)throw new e("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),l.forEach(function(h){if(!(h instanceof t))throw new e("Specified list of YAML types (or a single Type object) contains a non-Type object.")});const c=Object.create(s.prototype);return c.implicit=(this.implicit||[]).concat(n),c.explicit=(this.explicit||[]).concat(l),c.compiledImplicit=r(c,"implicit"),c.compiledExplicit=r(c,"explicit"),c.compiledTypeMap=i(c.compiledImplicit,c.compiledExplicit),c},"extend"),To=s,To}u(vn,"requireSchema");var Bo,Dh;function Ln(){if(Dh)return Bo;Dh=1;const e=Qt();return Bo=new e("tag:yaml.org,2002:str",{kind:"scalar",construct:u(function(t){return t!==null?t:""},"construct")}),Bo}u(Ln,"requireStr");var _o,Ih;function Fn(){if(Ih)return _o;Ih=1;const e=Qt();return _o=new e("tag:yaml.org,2002:seq",{kind:"sequence",construct:u(function(t){return t!==null?t:[]},"construct")}),_o}u(Fn,"requireSeq");var vo,Rh;function Mn(){if(Rh)return vo;Rh=1;const e=Qt();return vo=new e("tag:yaml.org,2002:map",{kind:"mapping",construct:u(function(t){return t!==null?t:{}},"construct")}),vo}u(Mn,"requireMap");var Lo,qh;function An(){if(qh)return Lo;qh=1;const e=vn();return Lo=new e({explicit:[Ln(),Fn(),Mn()]}),Lo}u(An,"requireFailsafe");var Fo,Nh;function En(){if(Nh)return Fo;Nh=1;const e=Qt();function t(s){if(s===null)return!0;const o=s.length;return o===1&&s==="~"||o===4&&(s==="null"||s==="Null"||s==="NULL")}u(t,"resolveYamlNull");function r(){return null}u(r,"constructYamlNull");function i(s){return s===null}return u(i,"isNull"),Fo=new e("tag:yaml.org,2002:null",{kind:"scalar",resolve:t,construct:r,predicate:i,represent:{canonical:u(function(){return"~"},"canonical"),lowercase:u(function(){return"null"},"lowercase"),uppercase:u(function(){return"NULL"},"uppercase"),camelcase:u(function(){return"Null"},"camelcase"),empty:u(function(){return""},"empty")},defaultStyle:"lowercase"}),Fo}u(En,"require_null");var Mo,Wh;function $n(){if(Wh)return Mo;Wh=1;const e=Qt();function t(s){if(s===null)return!1;const o=s.length;return o===4&&(s==="true"||s==="True"||s==="TRUE")||o===5&&(s==="false"||s==="False"||s==="FALSE")}u(t,"resolveYamlBoolean");function r(s){return s==="true"||s==="True"||s==="TRUE"}u(r,"constructYamlBoolean");function i(s){return Object.prototype.toString.call(s)==="[object Boolean]"}return u(i,"isBoolean"),Mo=new e("tag:yaml.org,2002:bool",{kind:"scalar",resolve:t,construct:r,predicate:i,represent:{lowercase:u(function(s){return s?"true":"false"},"lowercase"),uppercase:u(function(s){return s?"TRUE":"FALSE"},"uppercase"),camelcase:u(function(s){return s?"True":"False"},"camelcase")},defaultStyle:"lowercase"}),Mo}u($n,"requireBool");var Ao,zh;function On(){if(zh)return Ao;zh=1;const e=ti(),t=Qt();function r(c){return c>=48&&c<=57||c>=65&&c<=70||c>=97&&c<=102}u(r,"isHexCode");function i(c){return c>=48&&c<=55}u(i,"isOctCode");function s(c){return c>=48&&c<=57}u(s,"isDecCode");function o(c){if(c===null)return!1;const h=c.length;let d=0,g=!1;if(!h)return!1;let f=c[d];if((f==="-"||f==="+")&&(f=c[++d]),f==="0"){if(d+1===h)return!0;if(f=c[++d],f==="b"){for(d++;d<h;d++){if(f=c[d],f!=="0"&&f!=="1")return!1;g=!0}return g&&isFinite(a(c))}if(f==="x"){for(d++;d<h;d++){if(!r(c.charCodeAt(d)))return!1;g=!0}return g&&isFinite(a(c))}if(f==="o"){for(d++;d<h;d++){if(!i(c.charCodeAt(d)))return!1;g=!0}return g&&isFinite(a(c))}}for(;d<h;d++){if(!s(c.charCodeAt(d)))return!1;g=!0}return g?isFinite(a(c)):!1}u(o,"resolveYamlInteger");function a(c){let h=c,d=1,g=h[0];if((g==="-"||g==="+")&&(g==="-"&&(d=-1),h=h.slice(1),g=h[0]),h==="0")return 0;if(g==="0"){if(h[1]==="b")return d*parseInt(h.slice(2),2);if(h[1]==="x")return d*parseInt(h.slice(2),16);if(h[1]==="o")return d*parseInt(h.slice(2),8)}return d*parseInt(h,10)}u(a,"parseYamlInteger");function n(c){return a(c)}u(n,"constructYamlInteger");function l(c){return Object.prototype.toString.call(c)==="[object Number]"&&c%1===0&&!e.isNegativeZero(c)}return u(l,"isInteger"),Ao=new t("tag:yaml.org,2002:int",{kind:"scalar",resolve:o,construct:n,predicate:l,represent:{binary:u(function(c){return c>=0?"0b"+c.toString(2):"-0b"+c.toString(2).slice(1)},"binary"),octal:u(function(c){return c>=0?"0o"+c.toString(8):"-0o"+c.toString(8).slice(1)},"octal"),decimal:u(function(c){return c.toString(10)},"decimal"),hexadecimal:u(function(c){return c>=0?"0x"+c.toString(16).toUpperCase():"-0x"+c.toString(16).toUpperCase().slice(1)},"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),Ao}u(On,"requireInt");var Eo,Hh;function Pn(){if(Hh)return Eo;Hh=1;const e=ti(),t=Qt(),r=new RegExp("^(?:[-+]?(?:[0-9]+)(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),i=new RegExp("^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function s(c){return c===null||!r.test(c)?!1:isFinite(parseFloat(c,10))?!0:i.test(c)}u(s,"resolveYamlFloat");function o(c){let h=c.toLowerCase();const d=h[0]==="-"?-1:1;return"+-".indexOf(h[0])>=0&&(h=h.slice(1)),h===".inf"?d===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:h===".nan"?NaN:d*parseFloat(h,10)}u(o,"constructYamlFloat");const a=/^[-+]?[0-9]+e/;function n(c,h){if(isNaN(c))switch(h){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===c)switch(h){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===c)switch(h){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(e.isNegativeZero(c))return"-0.0";const d=c.toString(10);return a.test(d)?d.replace("e",".e"):d}u(n,"representYamlFloat");function l(c){return Object.prototype.toString.call(c)==="[object Number]"&&(c%1!==0||e.isNegativeZero(c))}return u(l,"isFloat"),Eo=new t("tag:yaml.org,2002:float",{kind:"scalar",resolve:s,construct:o,predicate:l,represent:n,defaultStyle:"lowercase"}),Eo}u(Pn,"requireFloat");var $o,jh;function Dn(){return jh||(jh=1,$o=An().extend({implicit:[En(),$n(),On(),Pn()]})),$o}u(Dn,"requireJson");var Oo,Yh;function In(){return Yh||(Yh=1,Oo=Dn()),Oo}u(In,"requireCore");var Po,Uh;function Rn(){if(Uh)return Po;Uh=1;const e=Qt(),t=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),r=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function i(a){return a===null?!1:t.exec(a)!==null||r.exec(a)!==null}u(i,"resolveYamlTimestamp");function s(a){let n=0,l=null,c=t.exec(a);if(c===null&&(c=r.exec(a)),c===null)throw new Error("Date resolve error");const h=+c[1],d=+c[2]-1,g=+c[3];if(!c[4])return new Date(Date.UTC(h,d,g));const f=+c[4],m=+c[5],y=+c[6];if(c[7]){for(n=c[7].slice(0,3);n.length<3;)n+="0";n=+n}if(c[9]){const x=+c[10],k=+(c[11]||0);l=(x*60+k)*6e4,c[9]==="-"&&(l=-l)}const C=new Date(Date.UTC(h,d,g,f,m,y,n));return l&&C.setTime(C.getTime()-l),C}u(s,"constructYamlTimestamp");function o(a){return a.toISOString()}return u(o,"representYamlTimestamp"),Po=new e("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:i,construct:s,instanceOf:Date,represent:o}),Po}u(Rn,"requireTimestamp");var Do,Gh;function qn(){if(Gh)return Do;Gh=1;const e=Qt();function t(r){return r==="<<"||r===null}return u(t,"resolveYamlMerge"),Do=new e("tag:yaml.org,2002:merge",{kind:"scalar",resolve:t}),Do}u(qn,"requireMerge");var Io,Xh;function Nn(){if(Xh)return Io;Xh=1;const e=Qt(),t=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
275
|
+
\r`;function r(a){if(a===null)return!1;let n=0;const l=a.length,c=t;for(let h=0;h<l;h++){const d=c.indexOf(a.charAt(h));if(!(d>64)){if(d<0)return!1;n+=6}}return n%8===0}u(r,"resolveYamlBinary");function i(a){const n=a.replace(/[\r\n=]/g,""),l=n.length,c=t;let h=0;const d=[];for(let f=0;f<l;f++)f%4===0&&f&&(d.push(h>>16&255),d.push(h>>8&255),d.push(h&255)),h=h<<6|c.indexOf(n.charAt(f));const g=l%4*6;return g===0?(d.push(h>>16&255),d.push(h>>8&255),d.push(h&255)):g===18?(d.push(h>>10&255),d.push(h>>2&255)):g===12&&d.push(h>>4&255),new Uint8Array(d)}u(i,"constructYamlBinary");function s(a){let n="",l=0;const c=a.length,h=t;for(let g=0;g<c;g++)g%3===0&&g&&(n+=h[l>>18&63],n+=h[l>>12&63],n+=h[l>>6&63],n+=h[l&63]),l=(l<<8)+a[g];const d=c%3;return d===0?(n+=h[l>>18&63],n+=h[l>>12&63],n+=h[l>>6&63],n+=h[l&63]):d===2?(n+=h[l>>10&63],n+=h[l>>4&63],n+=h[l<<2&63],n+=h[64]):d===1&&(n+=h[l>>2&63],n+=h[l<<4&63],n+=h[64],n+=h[64]),n}u(s,"representYamlBinary");function o(a){return Object.prototype.toString.call(a)==="[object Uint8Array]"}return u(o,"isBinary"),Io=new e("tag:yaml.org,2002:binary",{kind:"scalar",resolve:r,construct:i,predicate:o,represent:s}),Io}u(Nn,"requireBinary");var Ro,Vh;function Wn(){if(Vh)return Ro;Vh=1;const e=Qt(),t=Object.prototype.hasOwnProperty,r=Object.prototype.toString;function i(o){if(o===null)return!0;const a=[],n=o;for(let l=0,c=n.length;l<c;l+=1){const h=n[l];let d=!1;if(r.call(h)!=="[object Object]")return!1;let g;for(g in h)if(t.call(h,g))if(!d)d=!0;else return!1;if(!d)return!1;if(a.indexOf(g)===-1)a.push(g);else return!1}return!0}u(i,"resolveYamlOmap");function s(o){return o!==null?o:[]}return u(s,"constructYamlOmap"),Ro=new e("tag:yaml.org,2002:omap",{kind:"sequence",resolve:i,construct:s}),Ro}u(Wn,"requireOmap");var qo,Zh;function zn(){if(Zh)return qo;Zh=1;const e=Qt(),t=Object.prototype.toString;function r(s){if(s===null)return!0;const o=s,a=new Array(o.length);for(let n=0,l=o.length;n<l;n+=1){const c=o[n];if(t.call(c)!=="[object Object]")return!1;const h=Object.keys(c);if(h.length!==1)return!1;a[n]=[h[0],c[h[0]]]}return!0}u(r,"resolveYamlPairs");function i(s){if(s===null)return[];const o=s,a=new Array(o.length);for(let n=0,l=o.length;n<l;n+=1){const c=o[n],h=Object.keys(c);a[n]=[h[0],c[h[0]]]}return a}return u(i,"constructYamlPairs"),qo=new e("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:r,construct:i}),qo}u(zn,"requirePairs");var No,Kh;function Hn(){if(Kh)return No;Kh=1;const e=Qt(),t=Object.prototype.hasOwnProperty;function r(s){if(s===null)return!0;const o=s;for(const a in o)if(t.call(o,a)&&o[a]!==null)return!1;return!0}u(r,"resolveYamlSet");function i(s){return s!==null?s:{}}return u(i,"constructYamlSet"),No=new e("tag:yaml.org,2002:set",{kind:"mapping",resolve:r,construct:i}),No}u(Hn,"requireSet");var Wo,Qh;function Qs(){return Qh||(Qh=1,Wo=In().extend({implicit:[Rn(),qn()],explicit:[Nn(),Wn(),zn(),Hn()]})),Wo}u(Qs,"require_default");var Jh;function pp(){if(Jh)return es;Jh=1;const e=ti(),t=ei(),r=gp(),i=Qs(),s=Object.prototype.hasOwnProperty,o=1,a=2,n=3,l=4,c=1,h=2,d=3,g=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,f=/[\x85\u2028\u2029]/,m=/[,\[\]{}]/,y=/^(?:!|!!|![0-9A-Za-z-]+!)$/,C=/^(?:!|[^,\[\]{}])(?:%[0-9a-f]{2}|[0-9a-z\-#;/?:@&=+$,_.!~*'()\[\]])*$/i;function x(p){return Object.prototype.toString.call(p)}u(x,"_class");function k(p){return p===10||p===13}u(k,"isEol");function S(p){return p===9||p===32}u(S,"isWhiteSpace");function T(p){return p===9||p===32||p===10||p===13}u(T,"isWsOrEol");function B(p){return p===44||p===91||p===93||p===123||p===125}u(B,"isFlowIndicator");function L(p){if(p>=48&&p<=57)return p-48;const A=p|32;return A>=97&&A<=102?A-97+10:-1}u(L,"fromHexCode");function M(p){return p===120?2:p===117?4:p===85?8:0}u(M,"escapedHexLen");function v(p){return p>=48&&p<=57?p-48:-1}u(v,"fromDecimalCode");function X(p){switch(p){case 48:return"\0";case 97:return"\x07";case 98:return"\b";case 116:return" ";case 9:return" ";case 110:return`
|
|
276
|
+
`;case 118:return"\v";case 102:return"\f";case 114:return"\r";case 101:return"\x1B";case 32:return" ";case 34:return'"';case 47:return"/";case 92:return"\\";case 78:return"
";case 95:return" ";case 76:return"\u2028";case 80:return"\u2029";default:return""}}u(X,"simpleEscapeSequence");function z(p){return p<=65535?String.fromCharCode(p):String.fromCharCode((p-65536>>10)+55296,(p-65536&1023)+56320)}u(z,"charFromCodepoint");function I(p,A,j){A==="__proto__"?Object.defineProperty(p,A,{configurable:!0,enumerable:!0,writable:!0,value:j}):p[A]=j}u(I,"setProperty");const et=new Array(256),H=new Array(256);for(let p=0;p<256;p++)et[p]=X(p)?1:0,H[p]=X(p);function E(p,A){this.input=p,this.filename=A.filename||null,this.schema=A.schema||i,this.onWarning=A.onWarning||null,this.legacy=A.legacy||!1,this.json=A.json||!1,this.listener=A.listener||null,this.maxDepth=typeof A.maxDepth=="number"?A.maxDepth:100,this.maxTotalMergeKeys=typeof A.maxTotalMergeKeys=="number"?A.maxTotalMergeKeys:1e4,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=p.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.depth=0,this.totalMergeKeys=0,this.firstTabInLine=-1,this.documents=[],this.anchorMapTransactions=[]}u(E,"State");function O(p,A){const j={name:p.filename,buffer:p.input.slice(0,-1),position:p.position,line:p.line,column:p.position-p.lineStart};return j.snippet=r(j),new t(A,j)}u(O,"generateError");function _(p,A){throw O(p,A)}u(_,"throwError");function R(p,A){p.onWarning&&p.onWarning.call(null,O(p,A))}u(R,"throwWarning");function $(p,A,j){const G=p.anchorMapTransactions;if(G.length!==0){const W=G[G.length-1];s.call(W,A)||(W[A]={existed:s.call(p.anchorMap,A),value:p.anchorMap[A]})}p.anchorMap[A]=j}u($,"storeAnchor");function J(p){p.anchorMapTransactions.push(Object.create(null))}u(J,"beginAnchorTransaction");function Z(p){const A=p.anchorMapTransactions.pop(),j=p.anchorMapTransactions;if(j.length===0)return;const G=j[j.length-1],W=Object.keys(A);for(let tt=0,w=W.length;tt<w;tt+=1){const P=W[tt];s.call(G,P)||(G[P]=A[P])}}u(Z,"commitAnchorTransaction");function ut(p){const A=p.anchorMapTransactions.pop(),j=Object.keys(A);for(let G=j.length-1;G>=0;G-=1){const W=A[j[G]];W.existed?p.anchorMap[j[G]]=W.value:delete p.anchorMap[j[G]]}}u(ut,"rollbackAnchorTransaction");function xt(p){return{position:p.position,line:p.line,lineStart:p.lineStart,lineIndent:p.lineIndent,firstTabInLine:p.firstTabInLine,tag:p.tag,anchor:p.anchor,kind:p.kind,result:p.result}}u(xt,"snapshotState");function Ct(p,A){p.position=A.position,p.line=A.line,p.lineStart=A.lineStart,p.lineIndent=A.lineIndent,p.firstTabInLine=A.firstTabInLine,p.tag=A.tag,p.anchor=A.anchor,p.kind=A.kind,p.result=A.result}u(Ct,"restoreState");const St={YAML:u(function(A,j,G){A.version!==null&&_(A,"duplication of %YAML directive"),G.length!==1&&_(A,"YAML directive accepts exactly one argument");const W=/^([0-9]+)\.([0-9]+)$/.exec(G[0]);W===null&&_(A,"ill-formed argument of the YAML directive");const tt=parseInt(W[1],10),w=parseInt(W[2],10);tt!==1&&_(A,"unacceptable YAML version of the document"),A.version=G[0],A.checkLineBreaks=w<2,w!==1&&w!==2&&R(A,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:u(function(A,j,G){let W;G.length!==2&&_(A,"TAG directive accepts exactly two arguments");const tt=G[0];W=G[1],y.test(tt)||_(A,"ill-formed tag handle (first argument) of the TAG directive"),s.call(A.tagMap,tt)&&_(A,'there is a previously declared suffix for "'+tt+'" tag handle'),C.test(W)||_(A,"ill-formed tag prefix (second argument) of the TAG directive");try{W=decodeURIComponent(W)}catch{_(A,"tag prefix is malformed: "+W)}A.tagMap[tt]=W},"handleTagDirective")};function wt(p,A,j,G){if(A<j){const W=p.input.slice(A,j);if(G)for(let tt=0,w=W.length;tt<w;tt+=1){const P=W.charCodeAt(tt);P===9||P>=32&&P<=1114111||_(p,"expected valid JSON character")}else g.test(W)&&_(p,"the stream contains non-printable characters");p.result+=W}}u(wt,"captureSegment");function ht(p,A,j,G){e.isObject(j)||_(p,"cannot merge mappings; the provided source object is unacceptable");const W=Object.keys(j);for(let tt=0,w=W.length;tt<w;tt+=1){const P=W[tt];p.maxTotalMergeKeys!==-1&&++p.totalMergeKeys>p.maxTotalMergeKeys&&_(p,"merge keys exceeded maxTotalMergeKeys ("+p.maxTotalMergeKeys+")"),s.call(A,P)||(I(A,P,j[P]),G[P]=!0)}}u(ht,"mergeMappings");function ft(p,A,j,G,W,tt,w,P,K){if(Array.isArray(W)){W=Array.prototype.slice.call(W);for(let Y=0,U=W.length;Y<U;Y+=1)Array.isArray(W[Y])&&_(p,"nested arrays are not supported inside keys"),typeof W=="object"&&x(W[Y])==="[object Object]"&&(W[Y]="[object Object]")}if(typeof W=="object"&&x(W)==="[object Object]"&&(W="[object Object]"),W=String(W),A===null&&(A={}),G==="tag:yaml.org,2002:merge")if(Array.isArray(tt))for(let Y=0,U=tt.length;Y<U;Y+=1)ht(p,A,tt[Y],j);else ht(p,A,tt,j);else!p.json&&!s.call(j,W)&&s.call(A,W)&&(p.line=w||p.line,p.lineStart=P||p.lineStart,p.position=K||p.position,_(p,"duplicated mapping key")),I(A,W,tt),delete j[W];return A}u(ft,"storeMappingPair");function vt(p){const A=p.input.charCodeAt(p.position);A===10?p.position++:A===13?(p.position++,p.input.charCodeAt(p.position)===10&&p.position++):_(p,"a line break is expected"),p.line+=1,p.lineStart=p.position,p.firstTabInLine=-1}u(vt,"readLineBreak");function kt(p,A,j){let G=0,W=p.input.charCodeAt(p.position);for(;W!==0;){for(;S(W);)W===9&&p.firstTabInLine===-1&&(p.firstTabInLine=p.position),W=p.input.charCodeAt(++p.position);if(A&&W===35)do W=p.input.charCodeAt(++p.position);while(W!==10&&W!==13&&W!==0);if(k(W))for(vt(p),W=p.input.charCodeAt(p.position),G++,p.lineIndent=0;W===32;)p.lineIndent++,W=p.input.charCodeAt(++p.position);else break}return j!==-1&&G!==0&&p.lineIndent<j&&R(p,"deficient indentation"),G}u(kt,"skipSeparationSpace");function Et(p){let A=p.position,j=p.input.charCodeAt(A);return!!((j===45||j===46)&&j===p.input.charCodeAt(A+1)&&j===p.input.charCodeAt(A+2)&&(A+=3,j=p.input.charCodeAt(A),j===0||T(j)))}u(Et,"testDocumentSeparator");function Ot(p,A){A===1?p.result+=" ":A>1&&(p.result+=e.repeat(`
|
|
277
|
+
`,A-1))}u(Ot,"writeFoldedLines");function Jt(p,A,j){let G,W,tt,w,P,K;const Y=p.kind,U=p.result;let Q=p.input.charCodeAt(p.position);if(T(Q)||B(Q)||Q===35||Q===38||Q===42||Q===33||Q===124||Q===62||Q===39||Q===34||Q===37||Q===64||Q===96)return!1;if(Q===63||Q===45){const V=p.input.charCodeAt(p.position+1);if(T(V)||j&&B(V))return!1}for(p.kind="scalar",p.result="",G=W=p.position,tt=!1;Q!==0;){if(Q===58){const V=p.input.charCodeAt(p.position+1);if(T(V)||j&&B(V))break}else if(Q===35){const V=p.input.charCodeAt(p.position-1);if(T(V))break}else{if(p.position===p.lineStart&&Et(p)||j&&B(Q))break;if(k(Q))if(w=p.line,P=p.lineStart,K=p.lineIndent,kt(p,!1,-1),p.lineIndent>=A){tt=!0,Q=p.input.charCodeAt(p.position);continue}else{p.position=W,p.line=w,p.lineStart=P,p.lineIndent=K;break}}tt&&(wt(p,G,W,!1),Ot(p,p.line-w),G=W=p.position,tt=!1),S(Q)||(W=p.position+1),Q=p.input.charCodeAt(++p.position)}return wt(p,G,W,!1),p.result?!0:(p.kind=Y,p.result=U,!1)}u(Jt,"readPlainScalar");function he(p,A){let j,G,W=p.input.charCodeAt(p.position);if(W!==39)return!1;for(p.kind="scalar",p.result="",p.position++,j=G=p.position;(W=p.input.charCodeAt(p.position))!==0;)if(W===39)if(wt(p,j,p.position,!0),W=p.input.charCodeAt(++p.position),W===39)j=p.position,p.position++,G=p.position;else return!0;else k(W)?(wt(p,j,G,!0),Ot(p,kt(p,!1,A)),j=G=p.position):p.position===p.lineStart&&Et(p)?_(p,"unexpected end of the document within a single quoted scalar"):(p.position++,S(W)||(G=p.position));_(p,"unexpected end of the stream within a single quoted scalar")}u(he,"readSingleQuotedScalar");function me(p,A){let j,G,W,tt=p.input.charCodeAt(p.position);if(tt!==34)return!1;for(p.kind="scalar",p.result="",p.position++,j=G=p.position;(tt=p.input.charCodeAt(p.position))!==0;){if(tt===34)return wt(p,j,p.position,!0),p.position++,!0;if(tt===92){if(wt(p,j,p.position,!0),tt=p.input.charCodeAt(++p.position),k(tt))kt(p,!1,A);else if(tt<256&&et[tt])p.result+=H[tt],p.position++;else if((W=M(tt))>0){let w=W,P=0;for(;w>0;w--)tt=p.input.charCodeAt(++p.position),(W=L(tt))>=0?P=(P<<4)+W:_(p,"expected hexadecimal character");p.result+=z(P),p.position++}else _(p,"unknown escape sequence");j=G=p.position}else k(tt)?(wt(p,j,G,!0),Ot(p,kt(p,!1,A)),j=G=p.position):p.position===p.lineStart&&Et(p)?_(p,"unexpected end of the document within a double quoted scalar"):(p.position++,S(tt)||(G=p.position))}_(p,"unexpected end of the stream within a double quoted scalar")}u(me,"readDoubleQuotedScalar");function ii(p,A){let j=!0,G,W,tt;const w=p.tag;let P;const K=p.anchor;let Y,U,Q,V;const lt=Object.create(null);let ot,gt,pt,Lt=p.input.charCodeAt(p.position);if(Lt===91)Y=93,V=!1,P=[];else if(Lt===123)Y=125,V=!0,P={};else return!1;for(p.anchor!==null&&$(p,p.anchor,P),Lt=p.input.charCodeAt(++p.position);Lt!==0;){if(kt(p,!0,A),Lt=p.input.charCodeAt(p.position),Lt===Y)return p.position++,p.tag=w,p.anchor=K,p.kind=V?"mapping":"sequence",p.result=P,!0;if(j?Lt===44&&_(p,"expected the node content, but found ','"):_(p,"missed comma between flow collection entries"),gt=ot=pt=null,U=Q=!1,Lt===63){const Pt=p.input.charCodeAt(p.position+1);T(Pt)&&(U=Q=!0,p.position++,kt(p,!0,A))}G=p.line,W=p.lineStart,tt=p.position,ce(p,A,o,!1,!0),gt=p.tag,ot=p.result,kt(p,!0,A),Lt=p.input.charCodeAt(p.position),(Q||p.line===G)&&Lt===58&&(U=!0,Lt=p.input.charCodeAt(++p.position),kt(p,!0,A),ce(p,A,o,!1,!0),pt=p.result),V?ft(p,P,lt,gt,ot,pt,G,W,tt):U?P.push(ft(p,null,lt,gt,ot,pt,G,W,tt)):P.push(ot),kt(p,!0,A),Lt=p.input.charCodeAt(p.position),Lt===44?(j=!0,Lt=p.input.charCodeAt(++p.position)):j=!1}_(p,"unexpected end of the stream within a flow collection")}u(ii,"readFlowCollection");function si(p,A){let j,G=c,W=!1,tt=!1,w=A,P=0,K=!1,Y,U=p.input.charCodeAt(p.position);if(U===124)j=!1;else if(U===62)j=!0;else return!1;for(p.kind="scalar",p.result="";U!==0;)if(U=p.input.charCodeAt(++p.position),U===43||U===45)c===G?G=U===43?d:h:_(p,"repeat of a chomping mode identifier");else if((Y=v(U))>=0)Y===0?_(p,"bad explicit indentation width of a block scalar; it cannot be less than one"):tt?_(p,"repeat of an indentation width identifier"):(w=A+Y-1,tt=!0);else break;if(S(U)){do U=p.input.charCodeAt(++p.position);while(S(U));if(U===35)do U=p.input.charCodeAt(++p.position);while(!k(U)&&U!==0)}for(;U!==0;){for(vt(p),p.lineIndent=0,U=p.input.charCodeAt(p.position);(!tt||p.lineIndent<w)&&U===32;)p.lineIndent++,U=p.input.charCodeAt(++p.position);if(!tt&&p.lineIndent>w&&(w=p.lineIndent),k(U)){P++;continue}if(!tt&&w===0&&_(p,"missing indentation for block scalar"),p.lineIndent<w){G===d?p.result+=e.repeat(`
|
|
278
|
+
`,W?1+P:P):G===c&&W&&(p.result+=`
|
|
279
|
+
`);break}j?S(U)?(K=!0,p.result+=e.repeat(`
|
|
280
|
+
`,W?1+P:P)):K?(K=!1,p.result+=e.repeat(`
|
|
281
|
+
`,P+1)):P===0?W&&(p.result+=" "):p.result+=e.repeat(`
|
|
282
|
+
`,P):p.result+=e.repeat(`
|
|
283
|
+
`,W?1+P:P),W=!0,tt=!0,P=0;const Q=p.position;for(;!k(U)&&U!==0;)U=p.input.charCodeAt(++p.position);wt(p,Q,p.position,!1)}return!0}u(si,"readBlockScalar");function Ce(p,A){const j=p.tag,G=p.anchor,W=[];let tt=!1;if(p.firstTabInLine!==-1)return!1;p.anchor!==null&&$(p,p.anchor,W);let w=p.input.charCodeAt(p.position);for(;w!==0&&(p.firstTabInLine!==-1&&(p.position=p.firstTabInLine,_(p,"tab characters must not be used in indentation")),w===45);){const P=p.input.charCodeAt(p.position+1);if(!T(P))break;if(tt=!0,p.position++,kt(p,!0,-1)&&p.lineIndent<=A){W.push(null),w=p.input.charCodeAt(p.position);continue}const K=p.line;if(ce(p,A,n,!1,!0),W.push(p.result),kt(p,!0,-1),w=p.input.charCodeAt(p.position),(p.line===K||p.lineIndent>A)&&w!==0)_(p,"bad indentation of a sequence entry");else if(p.lineIndent<A)break}return tt?(p.tag=j,p.anchor=G,p.kind="sequence",p.result=W,!0):!1}u(Ce,"readBlockSequence");function fr(p,A,j){let G,W,tt,w;const P=p.tag,K=p.anchor,Y={},U=Object.create(null);let Q=null,V=null,lt=null,ot=!1,gt=!1;if(p.firstTabInLine!==-1)return!1;p.anchor!==null&&$(p,p.anchor,Y);let pt=p.input.charCodeAt(p.position);for(;pt!==0;){!ot&&p.firstTabInLine!==-1&&(p.position=p.firstTabInLine,_(p,"tab characters must not be used in indentation"));const Lt=p.input.charCodeAt(p.position+1),Pt=p.line;if((pt===63||pt===58)&&T(Lt))pt===63?(ot&&(ft(p,Y,U,Q,V,null,W,tt,w),Q=V=lt=null),gt=!0,ot=!0,G=!0):ot?(ot=!1,G=!0):_(p,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),p.position+=1,pt=Lt;else{if(W=p.line,tt=p.lineStart,w=p.position,!ce(p,j,a,!1,!0))break;if(p.line===Pt){for(pt=p.input.charCodeAt(p.position);S(pt);)pt=p.input.charCodeAt(++p.position);if(pt===58)pt=p.input.charCodeAt(++p.position),T(pt)||_(p,"a whitespace character is expected after the key-value separator within a block mapping"),ot&&(ft(p,Y,U,Q,V,null,W,tt,w),Q=V=lt=null),gt=!0,ot=!1,G=!1,Q=p.tag,V=p.result;else if(gt)_(p,"can not read an implicit mapping pair; a colon is missed");else return p.tag=P,p.anchor=K,!0}else if(gt)_(p,"can not read a block mapping entry; a multiline key may not be an implicit key");else return p.tag=P,p.anchor=K,!0}if((p.line===Pt||p.lineIndent>A)&&(ot&&(W=p.line,tt=p.lineStart,w=p.position),ce(p,A,l,!0,G)&&(ot?V=p.result:lt=p.result),ot||(ft(p,Y,U,Q,V,lt,W,tt,w),Q=V=lt=null),kt(p,!0,-1),pt=p.input.charCodeAt(p.position)),(p.line===Pt||p.lineIndent>A)&&pt!==0)_(p,"bad indentation of a mapping entry");else if(p.lineIndent<A)break}return ot&&ft(p,Y,U,Q,V,null,W,tt,w),gt&&(p.tag=P,p.anchor=K,p.kind="mapping",p.result=Y),gt}u(fr,"readBlockMapping");function oi(p){let A=!1,j=!1,G,W,tt=p.input.charCodeAt(p.position);if(tt!==33)return!1;p.tag!==null&&_(p,"duplication of a tag property"),tt=p.input.charCodeAt(++p.position),tt===60?(A=!0,tt=p.input.charCodeAt(++p.position)):tt===33?(j=!0,G="!!",tt=p.input.charCodeAt(++p.position)):G="!";let w=p.position;if(A){do tt=p.input.charCodeAt(++p.position);while(tt!==0&&tt!==62);p.position<p.length?(W=p.input.slice(w,p.position),tt=p.input.charCodeAt(++p.position)):_(p,"unexpected end of the stream within a verbatim tag")}else{for(;tt!==0&&!T(tt);)tt===33&&(j?_(p,"tag suffix cannot contain exclamation marks"):(G=p.input.slice(w-1,p.position+1),y.test(G)||_(p,"named tag handle cannot contain such characters"),j=!0,w=p.position+1)),tt=p.input.charCodeAt(++p.position);W=p.input.slice(w,p.position),m.test(W)&&_(p,"tag suffix cannot contain flow indicator characters")}W&&!C.test(W)&&_(p,"tag name cannot contain such characters: "+W);try{W=decodeURIComponent(W)}catch{_(p,"tag name is malformed: "+W)}return A?p.tag=W:s.call(p.tagMap,G)?p.tag=p.tagMap[G]+W:G==="!"?p.tag="!"+W:G==="!!"?p.tag="tag:yaml.org,2002:"+W:_(p,'undeclared tag handle "'+G+'"'),!0}u(oi,"readTagProperty");function yr(p){let A=p.input.charCodeAt(p.position);if(A!==38)return!1;p.anchor!==null&&_(p,"duplication of an anchor property"),A=p.input.charCodeAt(++p.position);const j=p.position;for(;A!==0&&!T(A)&&!B(A);)A=p.input.charCodeAt(++p.position);return p.position===j&&_(p,"name of an anchor node must contain at least one character"),p.anchor=p.input.slice(j,p.position),!0}u(yr,"readAnchorProperty");function mr(p){let A=p.input.charCodeAt(p.position);if(A!==42)return!1;A=p.input.charCodeAt(++p.position);const j=p.position;for(;A!==0&&!T(A)&&!B(A);)A=p.input.charCodeAt(++p.position);p.position===j&&_(p,"name of an alias node must contain at least one character");const G=p.input.slice(j,p.position);return s.call(p.anchorMap,G)||_(p,'unidentified alias "'+G+'"'),p.result=p.anchorMap[G],kt(p,!0,-1),!0}u(mr,"readAlias");function ai(p,A,j,G){const W=xt(p);return J(p),Ct(p,A),p.tag=null,p.anchor=null,p.kind=null,p.result=null,fr(p,j,G)&&p.kind==="mapping"?(Z(p),!0):(ut(p),Ct(p,W),!1)}u(ai,"tryReadBlockMappingFromProperty");function ce(p,A,j,G,W){let tt,w,P=1,K=!1,Y=!1,U=null,Q,V,lt;p.depth>=p.maxDepth&&_(p,"nesting exceeded maxDepth ("+p.maxDepth+")"),p.depth+=1,p.listener!==null&&p.listener("open",p),p.tag=null,p.anchor=null,p.kind=null,p.result=null;const ot=tt=w=l===j||n===j;if(G&&kt(p,!0,-1)&&(K=!0,p.lineIndent>A?P=1:p.lineIndent===A?P=0:p.lineIndent<A&&(P=-1)),P===1)for(;;){const gt=p.input.charCodeAt(p.position),pt=xt(p);if(K&&(gt===33&&p.tag!==null||gt===38&&p.anchor!==null)||!oi(p)&&!yr(p))break;U===null&&(U=pt),kt(p,!0,-1)?(K=!0,w=ot,p.lineIndent>A?P=1:p.lineIndent===A?P=0:p.lineIndent<A&&(P=-1)):w=!1}if(w&&(w=K||W),P===1||l===j)if(o===j||a===j?V=A:V=A+1,lt=p.position-p.lineStart,P===1)if(w&&(Ce(p,lt)||fr(p,lt,V))||ii(p,V))Y=!0;else{const gt=p.input.charCodeAt(p.position);U!==null&&ot&&!w&>!==124&>!==62&&ai(p,U,U.position-U.lineStart,V)||tt&&si(p,V)||he(p,V)||me(p,V)?Y=!0:mr(p)?(Y=!0,(p.tag!==null||p.anchor!==null)&&_(p,"alias node should not have any properties")):Jt(p,V,o===j)&&(Y=!0,p.tag===null&&(p.tag="?")),p.anchor!==null&&$(p,p.anchor,p.result)}else P===0&&(Y=w&&Ce(p,lt));if(p.tag===null)p.anchor!==null&&$(p,p.anchor,p.result);else if(p.tag==="?"){p.result!==null&&p.kind!=="scalar"&&_(p,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+p.kind+'"');for(let gt=0,pt=p.implicitTypes.length;gt<pt;gt+=1)if(Q=p.implicitTypes[gt],Q.resolve(p.result)){p.result=Q.construct(p.result),p.tag=Q.tag,p.anchor!==null&&$(p,p.anchor,p.result);break}}else if(p.tag!=="!"){if(s.call(p.typeMap[p.kind||"fallback"],p.tag))Q=p.typeMap[p.kind||"fallback"][p.tag];else{Q=null;const gt=p.typeMap.multi[p.kind||"fallback"];for(let pt=0,Lt=gt.length;pt<Lt;pt+=1)if(p.tag.slice(0,gt[pt].tag.length)===gt[pt].tag){Q=gt[pt];break}}Q||_(p,"unknown tag !<"+p.tag+">"),p.result!==null&&Q.kind!==p.kind&&_(p,"unacceptable node kind for !<"+p.tag+'> tag; it should be "'+Q.kind+'", not "'+p.kind+'"'),Q.resolve(p.result,p.tag)?(p.result=Q.construct(p.result,p.tag),p.anchor!==null&&$(p,p.anchor,p.result)):_(p,"cannot resolve a node with !<"+p.tag+"> explicit tag")}return p.listener!==null&&p.listener("close",p),p.depth-=1,p.tag!==null||p.anchor!==null||Y}u(ce,"composeNode");function ni(p){const A=p.position;let j=!1,G;for(p.version=null,p.checkLineBreaks=p.legacy,p.tagMap=Object.create(null),p.anchorMap=Object.create(null);(G=p.input.charCodeAt(p.position))!==0&&(kt(p,!0,-1),G=p.input.charCodeAt(p.position),!(p.lineIndent>0||G!==37));){j=!0,G=p.input.charCodeAt(++p.position);let W=p.position;for(;G!==0&&!T(G);)G=p.input.charCodeAt(++p.position);const tt=p.input.slice(W,p.position),w=[];for(tt.length<1&&_(p,"directive name must not be less than one character in length");G!==0;){for(;S(G);)G=p.input.charCodeAt(++p.position);if(G===35){do G=p.input.charCodeAt(++p.position);while(G!==0&&!k(G));break}if(k(G))break;for(W=p.position;G!==0&&!T(G);)G=p.input.charCodeAt(++p.position);w.push(p.input.slice(W,p.position))}G!==0&&vt(p),s.call(St,tt)?St[tt](p,tt,w):R(p,'unknown document directive "'+tt+'"')}if(kt(p,!0,-1),p.lineIndent===0&&p.input.charCodeAt(p.position)===45&&p.input.charCodeAt(p.position+1)===45&&p.input.charCodeAt(p.position+2)===45?(p.position+=3,kt(p,!0,-1)):j&&_(p,"directives end mark is expected"),ce(p,p.lineIndent-1,l,!1,!0),kt(p,!0,-1),p.checkLineBreaks&&f.test(p.input.slice(A,p.position))&&R(p,"non-ASCII line breaks are interpreted as content"),p.documents.push(p.result),p.position===p.lineStart&&Et(p)){p.input.charCodeAt(p.position)===46&&(p.position+=3,kt(p,!0,-1));return}p.position<p.length-1&&_(p,"end of the stream or a document separator is expected")}u(ni,"readDocument");function Cr(p,A){p=String(p),A=A||{},p.length!==0&&(p.charCodeAt(p.length-1)!==10&&p.charCodeAt(p.length-1)!==13&&(p+=`
|
|
284
|
+
`),p.charCodeAt(0)===65279&&(p=p.slice(1)));const j=new E(p,A),G=p.indexOf("\0");for(G!==-1&&(j.position=G,_(j,"null byte is not allowed in input")),j.input+="\0";j.input.charCodeAt(j.position)===32;)j.lineIndent+=1,j.position+=1;for(;j.position<j.length-1;)ni(j);return j.documents}u(Cr,"loadDocuments");function xr(p,A,j){A!==null&&typeof A=="object"&&typeof j>"u"&&(j=A,A=null);const G=Cr(p,j);if(typeof A!="function")return G;for(let W=0,tt=G.length;W<tt;W+=1)A(G[W])}u(xr,"loadAll2");function li(p,A){const j=Cr(p,A);if(j.length!==0){if(j.length===1)return j[0];throw new t("expected a single document in the stream, but found more")}}return u(li,"load2"),es.loadAll=xr,es.load=li,es}u(pp,"requireLoader");var zo={},tc;function fp(){if(tc)return zo;tc=1;const e=ti(),t=ei(),r=Qs(),i=Object.prototype.toString,s=Object.prototype.hasOwnProperty,o=65279,a=9,n=10,l=13,c=32,h=33,d=34,g=35,f=37,m=38,y=39,C=42,x=44,k=45,S=58,T=61,B=62,L=63,M=64,v=91,X=93,z=96,I=123,et=124,H=125,E={};E[0]="\\0",E[7]="\\a",E[8]="\\b",E[9]="\\t",E[10]="\\n",E[11]="\\v",E[12]="\\f",E[13]="\\r",E[27]="\\e",E[34]='\\"',E[92]="\\\\",E[133]="\\N",E[160]="\\_",E[8232]="\\L",E[8233]="\\P";const O=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],_=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function R(w,P){if(P===null)return{};const K={},Y=Object.keys(P);for(let U=0,Q=Y.length;U<Q;U+=1){let V=Y[U],lt=String(P[V]);V.slice(0,2)==="!!"&&(V="tag:yaml.org,2002:"+V.slice(2));const ot=w.compiledTypeMap.fallback[V];ot&&s.call(ot.styleAliases,lt)&&(lt=ot.styleAliases[lt]),K[V]=lt}return K}u(R,"compileStyleMap");function $(w){let P,K;const Y=w.toString(16).toUpperCase();if(w<=255)P="x",K=2;else if(w<=65535)P="u",K=4;else if(w<=4294967295)P="U",K=8;else throw new t("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+P+e.repeat("0",K-Y.length)+Y}u($,"encodeHex");const J=1,Z=2;function ut(w){this.schema=w.schema||r,this.indent=Math.max(1,w.indent||2),this.noArrayIndent=w.noArrayIndent||!1,this.skipInvalid=w.skipInvalid||!1,this.flowLevel=e.isNothing(w.flowLevel)?-1:w.flowLevel,this.styleMap=R(this.schema,w.styles||null),this.sortKeys=w.sortKeys||!1,this.lineWidth=w.lineWidth||80,this.noRefs=w.noRefs||!1,this.noCompatMode=w.noCompatMode||!1,this.condenseFlow=w.condenseFlow||!1,this.quotingType=w.quotingType==='"'?Z:J,this.forceQuotes=w.forceQuotes||!1,this.replacer=typeof w.replacer=="function"?w.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}u(ut,"State");function xt(w,P){const K=e.repeat(" ",P);let Y=0,U="";const Q=w.length;for(;Y<Q;){let V;const lt=w.indexOf(`
|
|
285
|
+
`,Y);lt===-1?(V=w.slice(Y),Y=Q):(V=w.slice(Y,lt+1),Y=lt+1),V.length&&V!==`
|
|
286
|
+
`&&(U+=K),U+=V}return U}u(xt,"indentString");function Ct(w,P){return`
|
|
287
|
+
`+e.repeat(" ",w.indent*P)}u(Ct,"generateNextLine");function St(w,P){for(let K=0,Y=w.implicitTypes.length;K<Y;K+=1)if(w.implicitTypes[K].resolve(P))return!0;return!1}u(St,"testImplicitResolving");function wt(w){return w===c||w===a}u(wt,"isWhitespace");function ht(w){return w>=32&&w<=126||w>=161&&w<=55295&&w!==8232&&w!==8233||w>=57344&&w<=65533&&w!==o||w>=65536&&w<=1114111}u(ht,"isPrintable");function ft(w){return ht(w)&&w!==o&&w!==l&&w!==n}u(ft,"isNsCharOrWhitespace");function vt(w,P,K){const Y=ft(w),U=Y&&!wt(w);return(K?Y:Y&&w!==x&&w!==v&&w!==X&&w!==I&&w!==H)&&w!==g&&!(P===S&&!U)||ft(P)&&!wt(P)&&w===g||P===S&&U}u(vt,"isPlainSafe");function kt(w){return ht(w)&&w!==o&&!wt(w)&&w!==k&&w!==L&&w!==S&&w!==x&&w!==v&&w!==X&&w!==I&&w!==H&&w!==g&&w!==m&&w!==C&&w!==h&&w!==et&&w!==T&&w!==B&&w!==y&&w!==d&&w!==f&&w!==M&&w!==z}u(kt,"isPlainSafeFirst");function Et(w){return!wt(w)&&w!==S}u(Et,"isPlainSafeLast");function Ot(w,P){const K=w.charCodeAt(P);let Y;return K>=55296&&K<=56319&&P+1<w.length&&(Y=w.charCodeAt(P+1),Y>=56320&&Y<=57343)?(K-55296)*1024+Y-56320+65536:K}u(Ot,"codePointAt");function Jt(w){return/^\n* /.test(w)}u(Jt,"needIndentIndicator");const he=1,me=2,ii=3,si=4,Ce=5;function fr(w,P,K,Y,U,Q,V,lt){let ot,gt=0,pt=null,Lt=!1,Pt=!1;const Xn=Y!==-1;let hi=-1,ci=kt(Ot(w,0))&&Et(Ot(w,w.length-1));if(P||V)for(ot=0;ot<w.length;gt>=65536?ot+=2:ot++){if(gt=Ot(w,ot),!ht(gt))return Ce;ci=ci&&vt(gt,pt,lt),pt=gt}else{for(ot=0;ot<w.length;gt>=65536?ot+=2:ot++){if(gt=Ot(w,ot),gt===n)Lt=!0,Xn&&(Pt=Pt||ot-hi-1>Y&&w[hi+1]!==" ",hi=ot);else if(!ht(gt))return Ce;ci=ci&&vt(gt,pt,lt),pt=gt}Pt=Pt||Xn&&ot-hi-1>Y&&w[hi+1]!==" "}return!Lt&&!Pt?ci&&!V&&!U(w)?he:Q===Z?Ce:me:K>9&&Jt(w)?Ce:V?Q===Z?Ce:me:Pt?si:ii}u(fr,"chooseScalarStyle");function oi(w,P,K,Y,U){w.dump=(function(){if(P.length===0)return w.quotingType===Z?'""':"''";if(!w.noCompatMode&&(O.indexOf(P)!==-1||_.test(P)))return w.quotingType===Z?'"'+P+'"':"'"+P+"'";const Q=w.indent*Math.max(1,K),V=w.lineWidth===-1?-1:Math.max(Math.min(w.lineWidth,40),w.lineWidth-Q),lt=Y||w.flowLevel>-1&&K>=w.flowLevel;function ot(gt){return St(w,gt)}switch(u(ot,"testAmbiguity"),fr(P,lt,w.indent,V,ot,w.quotingType,w.forceQuotes&&!Y,U)){case he:return P;case me:return"'"+P.replace(/'/g,"''")+"'";case ii:return"|"+yr(P,w.indent)+mr(xt(P,Q));case si:return">"+yr(P,w.indent)+mr(xt(ai(P,V),Q));case Ce:return'"'+ni(P)+'"';default:throw new t("impossible error: invalid scalar style")}})()}u(oi,"writeScalar");function yr(w,P){const K=Jt(w)?String(P):"",Y=w[w.length-1]===`
|
|
288
|
+
`,Q=Y&&(w[w.length-2]===`
|
|
289
|
+
`||w===`
|
|
290
|
+
`)?"+":Y?"":"-";return K+Q+`
|
|
291
|
+
`}u(yr,"blockHeader");function mr(w){return w[w.length-1]===`
|
|
292
|
+
`?w.slice(0,-1):w}u(mr,"dropEndingNewline");function ai(w,P){const K=/(\n+)([^\n]*)/g;let Y=(function(){let lt=w.indexOf(`
|
|
293
|
+
`);return lt=lt!==-1?lt:w.length,K.lastIndex=lt,ce(w.slice(0,lt),P)})(),U=w[0]===`
|
|
294
|
+
`||w[0]===" ",Q,V;for(;V=K.exec(w);){const lt=V[1],ot=V[2];Q=ot[0]===" ",Y+=lt+(!U&&!Q&&ot!==""?`
|
|
295
|
+
`:"")+ce(ot,P),U=Q}return Y}u(ai,"foldString");function ce(w,P){if(w===""||w[0]===" ")return w;const K=/ [^ ]/g;let Y,U=0,Q,V=0,lt=0,ot="";for(;Y=K.exec(w);)lt=Y.index,lt-U>P&&(Q=V>U?V:lt,ot+=`
|
|
296
|
+
`+w.slice(U,Q),U=Q+1),V=lt;return ot+=`
|
|
297
|
+
`,w.length-U>P&&V>U?ot+=w.slice(U,V)+`
|
|
298
|
+
`+w.slice(V+1):ot+=w.slice(U),ot.slice(1)}u(ce,"foldLine");function ni(w){let P="",K=0;for(let Y=0;Y<w.length;K>=65536?Y+=2:Y++){K=Ot(w,Y);const U=E[K];!U&&ht(K)?(P+=w[Y],K>=65536&&(P+=w[Y+1])):P+=U||$(K)}return P}u(ni,"escapeString");function Cr(w,P,K){let Y="";const U=w.tag;for(let Q=0,V=K.length;Q<V;Q+=1){let lt=K[Q];w.replacer&&(lt=w.replacer.call(K,String(Q),lt)),(j(w,P,lt,!1,!1)||typeof lt>"u"&&j(w,P,null,!1,!1))&&(Y!==""&&(Y+=","+(w.condenseFlow?"":" ")),Y+=w.dump)}w.tag=U,w.dump="["+Y+"]"}u(Cr,"writeFlowSequence");function xr(w,P,K,Y){let U="";const Q=w.tag;for(let V=0,lt=K.length;V<lt;V+=1){let ot=K[V];w.replacer&&(ot=w.replacer.call(K,String(V),ot)),(j(w,P+1,ot,!0,!0,!1,!0)||typeof ot>"u"&&j(w,P+1,null,!0,!0,!1,!0))&&((!Y||U!=="")&&(U+=Ct(w,P)),w.dump&&n===w.dump.charCodeAt(0)?U+="-":U+="- ",U+=w.dump)}w.tag=Q,w.dump=U||"[]"}u(xr,"writeBlockSequence");function li(w,P,K){let Y="";const U=w.tag,Q=Object.keys(K);for(let V=0,lt=Q.length;V<lt;V+=1){let ot="";Y!==""&&(ot+=", "),w.condenseFlow&&(ot+='"');const gt=Q[V];let pt=K[gt];w.replacer&&(pt=w.replacer.call(K,gt,pt)),j(w,P,gt,!1,!1)&&(w.dump.length>1024&&(ot+="? "),ot+=w.dump+(w.condenseFlow?'"':"")+":"+(w.condenseFlow?"":" "),j(w,P,pt,!1,!1)&&(ot+=w.dump,Y+=ot))}w.tag=U,w.dump="{"+Y+"}"}u(li,"writeFlowMapping");function p(w,P,K,Y){let U="";const Q=w.tag,V=Object.keys(K);if(w.sortKeys===!0)V.sort();else if(typeof w.sortKeys=="function")V.sort(w.sortKeys);else if(w.sortKeys)throw new t("sortKeys must be a boolean or a function");for(let lt=0,ot=V.length;lt<ot;lt+=1){let gt="";(!Y||U!=="")&&(gt+=Ct(w,P));const pt=V[lt];let Lt=K[pt];if(w.replacer&&(Lt=w.replacer.call(K,pt,Lt)),!j(w,P+1,pt,!0,!0,!0))continue;const Pt=w.tag!==null&&w.tag!=="?"||w.dump&&w.dump.length>1024;Pt&&(w.dump&&n===w.dump.charCodeAt(0)?gt+="?":gt+="? "),gt+=w.dump,Pt&&(gt+=Ct(w,P)),j(w,P+1,Lt,!0,Pt)&&(w.dump&&n===w.dump.charCodeAt(0)?gt+=":":gt+=": ",gt+=w.dump,U+=gt)}w.tag=Q,w.dump=U||"{}"}u(p,"writeBlockMapping");function A(w,P,K){const Y=K?w.explicitTypes:w.implicitTypes;for(let U=0,Q=Y.length;U<Q;U+=1){const V=Y[U];if((V.instanceOf||V.predicate)&&(!V.instanceOf||typeof P=="object"&&P instanceof V.instanceOf)&&(!V.predicate||V.predicate(P))){if(K?V.multi&&V.representName?w.tag=V.representName(P):w.tag=V.tag:w.tag="?",V.represent){const lt=w.styleMap[V.tag]||V.defaultStyle;let ot;if(i.call(V.represent)==="[object Function]")ot=V.represent(P,lt);else if(s.call(V.represent,lt))ot=V.represent[lt](P,lt);else throw new t("!<"+V.tag+'> tag resolver accepts not "'+lt+'" style');w.dump=ot}return!0}}return!1}u(A,"detectType");function j(w,P,K,Y,U,Q,V){w.tag=null,w.dump=K,A(w,K,!1)||A(w,K,!0);const lt=i.call(w.dump),ot=Y;Y&&(Y=w.flowLevel<0||w.flowLevel>P);const gt=lt==="[object Object]"||lt==="[object Array]";let pt,Lt;if(gt&&(pt=w.duplicates.indexOf(K),Lt=pt!==-1),(w.tag!==null&&w.tag!=="?"||Lt||w.indent!==2&&P>0)&&(U=!1),Lt&&w.usedDuplicates[pt])w.dump="*ref_"+pt;else{if(gt&&Lt&&!w.usedDuplicates[pt]&&(w.usedDuplicates[pt]=!0),lt==="[object Object]")Y&&Object.keys(w.dump).length!==0?(p(w,P,w.dump,U),Lt&&(w.dump="&ref_"+pt+w.dump)):(li(w,P,w.dump),Lt&&(w.dump="&ref_"+pt+" "+w.dump));else if(lt==="[object Array]")Y&&w.dump.length!==0?(w.noArrayIndent&&!V&&P>0?xr(w,P-1,w.dump,U):xr(w,P,w.dump,U),Lt&&(w.dump="&ref_"+pt+w.dump)):(Cr(w,P,w.dump),Lt&&(w.dump="&ref_"+pt+" "+w.dump));else if(lt==="[object String]")w.tag!=="?"&&oi(w,w.dump,P,Q,ot);else{if(lt==="[object Undefined]")return!1;if(w.skipInvalid)return!1;throw new t("unacceptable kind of an object to dump "+lt)}if(w.tag!==null&&w.tag!=="?"){let Pt=encodeURI(w.tag[0]==="!"?w.tag.slice(1):w.tag).replace(/!/g,"%21");w.tag[0]==="!"?Pt="!"+Pt:Pt.slice(0,18)==="tag:yaml.org,2002:"?Pt="!!"+Pt.slice(18):Pt="!<"+Pt+">",w.dump=Pt+" "+w.dump}}return!0}u(j,"writeNode");function G(w,P){const K=[],Y=[];W(w,K,Y);const U=Y.length;for(let Q=0;Q<U;Q+=1)P.duplicates.push(K[Y[Q]]);P.usedDuplicates=new Array(U)}u(G,"getDuplicateReferences");function W(w,P,K){if(w!==null&&typeof w=="object"){const Y=P.indexOf(w);if(Y!==-1)K.indexOf(Y)===-1&&K.push(Y);else if(P.push(w),Array.isArray(w))for(let U=0,Q=w.length;U<Q;U+=1)W(w[U],P,K);else{const U=Object.keys(w);for(let Q=0,V=U.length;Q<V;Q+=1)W(w[U[Q]],P,K)}}}u(W,"inspectNode");function tt(w,P){P=P||{};const K=new ut(P);K.noRefs||G(w,K);let Y=w;return K.replacer&&(Y=K.replacer.call({"":Y},"",Y)),j(K,0,Y,!0,!0)?K.dump+`
|
|
299
|
+
`:""}return u(tt,"dump2"),zo.dump=tt,zo}u(fp,"requireDumper");var ec;function yp(){if(ec)return Gt;ec=1;const e=pp(),t=fp();function r(i,s){return function(){throw new Error("Function yaml."+i+" is removed in js-yaml 4. Use yaml."+s+" instead, which is now safe by default.")}}return u(r,"renamed"),Gt.Type=Qt(),Gt.Schema=vn(),Gt.FAILSAFE_SCHEMA=An(),Gt.JSON_SCHEMA=Dn(),Gt.CORE_SCHEMA=In(),Gt.DEFAULT_SCHEMA=Qs(),Gt.load=e.load,Gt.loadAll=e.loadAll,Gt.dump=t.dump,Gt.YAMLException=ei(),Gt.types={binary:Nn(),float:Pn(),map:Mn(),null:En(),pairs:zn(),set:Hn(),timestamp:Rn(),bool:$n(),int:On(),merge:qn(),omap:Wn(),seq:Fn(),str:Ln()},Gt.safeLoad=r("safeLoad","load"),Gt.safeLoadAll=r("safeLoadAll","loadAll"),Gt.safeDump=r("safeDump","dump"),Gt}u(yp,"requireJsYaml");var Q2=yp(),J2=up(Q2),{Type:p_,Schema:f_,FAILSAFE_SCHEMA:y_,JSON_SCHEMA:tw,CORE_SCHEMA:m_,DEFAULT_SCHEMA:C_,load:ew,loadAll:x_,dump:b_,YAMLException:k_,types:w_,safeLoad:S_,safeLoadAll:T_,safeDump:B_}=J2,rw={common:Wi,getConfig:Rt,insertCluster:kg,insertEdge:Tg,insertEdgeLabel:pn,insertMarkers:vg,insertNode:gn,interpolateToCurve:Ha,labelHelper:ct,log:D,positionEdgeLabel:Mx},Ii={},mp=u(e=>{for(const t of e)Ii[t.name]=t},"registerLayoutLoaders"),iw=u(()=>{mp([{name:"dagre",loader:u(async()=>await Bt(()=>import("./dagre-GXQ25YYZ-CdJwfp-j.js"),__vite__mapDeps([4,5,0,1,3])),"loader")},{name:"swimlane",loader:u(async()=>await Bt(()=>import("./swimlanes-42K2YHIH-CxnYRWCO.js"),__vite__mapDeps([6,0,1,3])),"loader")},{name:"cose-bilkent",loader:u(async()=>await Bt(()=>import("./cose-bilkent-JH36ORCC-2jNLoiin.js"),__vite__mapDeps([7,8,0,1,3])),"loader")}])},"registerDefaultLayoutLoaders");iw();var __=u(async(e,t)=>{if(!(e.layoutAlgorithm in Ii))throw new Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);if(e.diagramId)for(const h of e.nodes){const d=h.domId||h.id;h.domId=`${e.diagramId}-${d}`}const r=Ii[e.layoutAlgorithm],i=await r.loader(),{theme:s,themeVariables:o}=e.config,{useGradient:a,gradientStart:n,gradientStop:l}=o,c=t.attr("id");if(t.append("defs").append("filter").attr("id",`${c}-drop-shadow`).attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${s?.includes("dark")?"#FFFFFF":"#000000"}`),t.append("defs").append("filter").attr("id",`${c}-drop-shadow-small`).attr("height","150%").attr("width","150%").append("feDropShadow").attr("dx","2").attr("dy","2").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${s?.includes("dark")?"#FFFFFF":"#000000"}`),a){const h=t.append("linearGradient").attr("id",t.attr("id")+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");h.append("svg:stop").attr("offset","0%").attr("stop-color",n).attr("stop-opacity",1),h.append("svg:stop").attr("offset","100%").attr("stop-color",l).attr("stop-opacity",1)}return i.render(e,t,rw,{algorithm:r.algorithm})},"render"),v_=u((e="",{fallback:t="dagre"}={})=>{if(e in Ii)return e;if(t in Ii)return D.warn(`Layout algorithm ${e} is not registered. Using ${t} as fallback.`),t;throw new Error(`Both layout algorithms ${e} and ${t} are not registered.`)},"getRegisteredLayoutAlgorithm"),jn="comm",Cp="rule",xp="decl",sw="@media",ow="@import",aw="@supports",nw="@namespace",ba="@keyframes",bp="@layer",lw="@scope",hw=Math.abs,Ai=String.fromCharCode;function kp(e){return e.trim()}function ka(e,t,r){return e.replace(t,r)}function Mr(e,t){return e.charCodeAt(t)|0}function Vr(e,t,r){return e.slice(t,r)}function ke(e){return e.length}function wp(e){return e.length}function rs(e,t){return t.push(e),e}var Js=1,Zr=1,Sp=0,ne=0,Wt=0,ri="";function Yn(e,t,r,i,s,o,a,n){return{value:e,root:t,parent:r,type:i,props:s,children:o,line:Js,column:Zr,length:a,return:"",siblings:n}}function cw(){return Wt}function dw(){return Wt=ne>0?Mr(ri,--ne):0,Zr--,Wt===10&&(Zr=1,Js--),Wt}function pe(){return Wt=ne<Sp?Mr(ri,ne++):0,Zr++,Wt===10&&(Zr=1,Js++),Wt}function je(){return Mr(ri,ne)}function ds(){return ne}function to(e,t){return Vr(ri,e,t)}function Ri(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function uw(e){return Js=Zr=1,Sp=ke(ri=e),ne=0,[]}function gw(e){return ri="",e}function Ho(e){return kp(to(ne-1,wa(e===91?e+2:e===40?e+1:e)))}function pw(e){for(;(Wt=je())&&Wt<33;)pe();return Ri(e)>2||Ri(Wt)>3?"":" "}function fw(e,t){for(;--t&&pe()&&!(Wt<48||Wt>102||Wt>57&&Wt<65||Wt>70&&Wt<97););return to(e,ds()+(t<6&&je()==32&&pe()==32))}function wa(e){for(;pe();)switch(Wt){case e:return ne;case 34:case 39:e!==34&&e!==39&&wa(Wt);break;case 40:e===41&&wa(e);break;case 92:pe();break}return ne}function yw(e,t){for(;pe()&&e+Wt!==57;)if(e+Wt===84&&je()===47)break;return"/*"+to(t,ne-1)+"*"+Ai(e===47?e:pe())}function mw(e){for(;!Ri(je());)pe();return to(e,ne)}function Cw(e){return gw(us("",null,null,null,[""],e=uw(e),0,[0],e))}function us(e,t,r,i,s,o,a,n,l){for(var c=0,h=0,d=a,g=0,f=0,m=0,y=1,C=1,x=1,k=0,S=0,T="",B=s,L=o,M=i,v=T;C;)switch(m=S,S=pe()){case 40:m!=108&&Mr(v,d-1)==58?(k++,v+="("):v+=Ho(S);break;case 41:k--,v+=")";break;case 34:case 39:case 91:v+=Ho(S);break;case 9:case 10:case 13:case 32:if(k>0){v+=Ai(S);break}v+=pw(m);break;case 92:v+=fw(ds()-1,7);continue;case 47:switch(je()){case 42:case 47:rs(xw(yw(pe(),ds()),t,r,l),l),(Ri(m||1)==5||Ri(je()||1)==5)&&ke(v)&&Vr(v,-1,void 0)!==" "&&(v+=" ");break;default:v+="/"}break;case 123*y:n[c++]=ke(v)*x;case 125*y:case 59:case 0:if(k>0&&S){v+=Ai(S);break}switch(S){case 0:case 125:C=0;case 59+h:x==-1&&(v=ka(v,/\f/g,"")),f>0&&(ke(v)-d||y===0)&&rs(f>32?ic(v+";",i,r,d-1,l):ic(ka(v," ","")+";",i,r,d-2,l),l);break;case 59:v+=";";default:if(rs(M=rc(v,t,r,c,h,s,n,T,B=[],L=[],d,o),o),S===123)if(h===0)us(v,t,M,M,B,o,d,n,L);else{switch(g){case 99:if(Mr(v,3)===110)break;case 108:if(Mr(v,2)===97)break;default:h=0;case 100:case 109:case 115:}h?us(e,M,M,i&&rs(rc(e,M,M,0,0,s,n,T,s,B=[],d,L),L),s,L,d,n,i?B:L):us(v,M,M,M,[""],L,0,n,L)}}c=h=f=0,y=x=1,T=v="",d=a;break;case 58:d=1+ke(v),f=m;default:if(y<1){if(S==123)--y;else if(S==125&&y++==0&&dw()==125)continue}switch(v+=Ai(S),S*y){case 38:x=h>0?1:(v+="\f",-1);break;case 44:if(k>0)break;n[c++]=(ke(v)-1)*x,x=1;break;case 64:je()===45&&(v+=Ho(pe())),g=je(),h=d=ke(T=v+=mw(ds())),S++;break;case 45:m===45&&ke(v)==2&&(y=0)}}return o}function rc(e,t,r,i,s,o,a,n,l,c,h,d){for(var g=s-1,f=s===0?o:[""],m=wp(f),y=0,C=0,x=0;y<i;++y)for(var k=0,S=Vr(e,g+1,g=hw(C=a[y])),T=e;k<m;++k)(T=kp(C>0?f[k]+" "+S:ka(S,/&\f/g,f[k])))&&(l[x++]=T);return Yn(e,t,r,s===0?Cp:n,l,c,h,d)}function xw(e,t,r,i){return Yn(e,t,r,jn,Ai(cw()),Vr(e,2,-2),0,i)}function ic(e,t,r,i,s){return Yn(e,t,r,xp,Vr(e,0,i),Vr(e,i+1,-1),i,s)}function Sa(e,t){for(var r="",i=0;i<e.length;i++)r+=t(e[i],i,e,t)||"";return r}function bw(e,t,r,i){switch(e.type){case bp:if(e.children.length)break;case ow:case nw:case xp:return e.return=e.return||e.value;case jn:return"";case ba:return e.return=e.value+"{"+Sa(e.children,i)+"}";case Cp:if(!ke(e.value=e.props.join(",")))return""}return ke(r=Sa(e.children,i))?e.return=e.value+"{"+r+"}":""}function kw(e){var t=wp(e);return function(r,i,s,o){for(var a="",n=0;n<t;n++)a+=e[n](r,i,s,o)||"";return a}}var Tp="c4",ww=u(e=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),"detector"),Sw=u(async()=>{const{diagram:e}=await Bt(async()=>{const{diagram:t}=await import("./c4Diagram-7LVT6UL2-Cp3pP9V9.js");return{diagram:t}},__vite__mapDeps([9,10,0,1,3]));return{id:Tp,diagram:e}},"loader"),Tw={id:Tp,detector:ww,loader:Sw},Bw=Tw,Bp="flowchart",_w=u((e,t)=>t?.flowchart?.defaultRenderer==="dagre-wrapper"||t?.flowchart?.defaultRenderer==="elk"?!1:/^\s*graph/.test(e),"detector"),vw=u(async()=>{const{diagram:e}=await Bt(async()=>{const{diagram:t}=await import("./flowDiagram-HODETNUW-B_X_09yE.js").then(r=>r.f);return{diagram:t}},__vite__mapDeps([11,12,13,0,1,14,10,3,15]));return{id:Bp,diagram:e}},"loader"),Lw={id:Bp,detector:_w,loader:vw},Fw=Lw,_p="flowchart-v2",Mw=u((e,t)=>t?.flowchart?.defaultRenderer==="dagre-d3"?!1:(t?.flowchart?.defaultRenderer==="elk"&&(t.layout="elk"),/^\s*graph/.test(e)&&t?.flowchart?.defaultRenderer==="dagre-wrapper"?!0:/^\s*flowchart/.test(e)),"detector"),Aw=u(async()=>{const{diagram:e}=await Bt(async()=>{const{diagram:t}=await import("./flowDiagram-HODETNUW-B_X_09yE.js").then(r=>r.f);return{diagram:t}},__vite__mapDeps([11,12,13,0,1,14,10,3,15]));return{id:_p,diagram:e}},"loader"),Ew={id:_p,detector:Mw,loader:Aw},$w=Ew,vp="swimlane",Ow=u(e=>/^\s*swimlane-beta\b/.test(e),"detector"),Pw=u(async()=>{const{diagram:e}=await Bt(async()=>{const{diagram:t}=await import("./swimlanesDiagram-VR7AAH4N-BgesyEx1.js");return{diagram:t}},__vite__mapDeps([16,11,12,13,0,1,14,10,3,15]));return{id:vp,diagram:e}},"loader"),Dw={id:vp,detector:Ow,loader:Pw},Iw=Dw,Lp="er",Rw=u(e=>/^\s*erDiagram/.test(e),"detector"),qw=u(async()=>{const{diagram:e}=await Bt(async()=>{const{diagram:t}=await import("./erDiagram-RLTQ6QDP-Zixusc5i.js");return{diagram:t}},__vite__mapDeps([17,13,0,1,14,15,3]));return{id:Lp,diagram:e}},"loader"),Nw={id:Lp,detector:Rw,loader:qw},Ww=Nw,Fp="gitGraph",zw=u(e=>/^\s*gitGraph/.test(e),"detector"),Hw=u(async()=>{const{diagram:e}=await Bt(async()=>{const{diagram:t}=await import("./gitGraphDiagram-WWUBYQGX-hxOTtQbp.js");return{diagram:t}},__vite__mapDeps([18,19,20,21,0,1,3]));return{id:Fp,diagram:e}},"loader"),jw={id:Fp,detector:zw,loader:Hw},Yw=jw,Mp="gantt",Uw=u(e=>/^\s*gantt/.test(e),"detector"),Gw=u(async()=>{const{diagram:e}=await Bt(async()=>{const{diagram:t}=await import("./ganttDiagram-EL5Y4UJY-BcvE7rsg.js");return{diagram:t}},__vite__mapDeps([22,0,1,23,24,25,3]));return{id:Mp,diagram:e}},"loader"),Xw={id:Mp,detector:Uw,loader:Gw},Vw=Xw,Ap="info",Zw=u(e=>/^\s*info/.test(e),"detector"),Kw=u(async()=>{const{diagram:e}=await Bt(async()=>{const{diagram:t}=await import("./infoDiagram-27XIBGKW-BOyfWDQh.js");return{diagram:t}},__vite__mapDeps([26,21,0,1,3]));return{id:Ap,diagram:e}},"loader"),Qw={id:Ap,detector:Zw,loader:Kw},Ep="pie",Jw=u(e=>/^\s*pie/.test(e),"detector"),tS=u(async()=>{const{diagram:e}=await Bt(async()=>{const{diagram:t}=await import("./pieDiagram-E7YTZNPT-Cl7s5yat.js");return{diagram:t}},__vite__mapDeps([27,20,21,0,1,28,29,24,3]));return{id:Ep,diagram:e}},"loader"),eS={id:Ep,detector:Jw,loader:tS},$p="quadrantChart",rS=u(e=>/^\s*quadrantChart/.test(e),"detector"),iS=u(async()=>{const{diagram:e}=await Bt(async()=>{const{diagram:t}=await import("./quadrantDiagram-AXDQQJYC-D1468IWb.js");return{diagram:t}},__vite__mapDeps([30,0,1,23,24,25,3]));return{id:$p,diagram:e}},"loader"),sS={id:$p,detector:rS,loader:iS},oS=sS,Op="xychart",aS=u(e=>/^\s*xychart(-beta)?/.test(e),"detector"),nS=u(async()=>{const{diagram:e}=await Bt(async()=>{const{diagram:t}=await import("./xychartDiagram-S5SC5T6Z-CiO0NJVo.js");return{diagram:t}},__vite__mapDeps([31,0,1,24,29,23,25,3]));return{id:Op,diagram:e}},"loader"),lS={id:Op,detector:aS,loader:nS},hS=lS,Pp="requirement",cS=u(e=>/^\s*requirement(Diagram)?/.test(e),"detector"),dS=u(async()=>{const{diagram:e}=await Bt(async()=>{const{diagram:t}=await import("./requirementDiagram-BXWQKSXE-DbN5V886.js");return{diagram:t}},__vite__mapDeps([32,13,0,1,14,3]));return{id:Pp,diagram:e}},"loader"),uS={id:Pp,detector:cS,loader:dS},gS=uS,Dp="sequence",pS=u(e=>/^\s*sequenceDiagram/.test(e),"detector"),fS=u(async()=>{const{diagram:e}=await Bt(async()=>{const{diagram:t}=await import("./sequenceDiagram-WJ2MYXX4-CPXoMkcM.js");return{diagram:t}},__vite__mapDeps([33,19,10,0,1,3]));return{id:Dp,diagram:e}},"loader"),yS={id:Dp,detector:pS,loader:fS},mS=yS,Ip="class",CS=u((e,t)=>t?.class?.defaultRenderer==="dagre-wrapper"?!1:/^\s*classDiagram/.test(e),"detector"),xS=u(async()=>{const{diagram:e}=await Bt(async()=>{const{diagram:t}=await import("./classDiagram-ZZMXUADV-CfiMnbJv.js");return{diagram:t}},__vite__mapDeps([34,35,12,13,0,1,14,10,3]));return{id:Ip,diagram:e}},"loader"),bS={id:Ip,detector:CS,loader:xS},kS=bS,Rp="classDiagram",wS=u((e,t)=>/^\s*classDiagram/.test(e)&&t?.class?.defaultRenderer==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(e),"detector"),SS=u(async()=>{const{diagram:e}=await Bt(async()=>{const{diagram:t}=await import("./classDiagram-v2-VYDZK3BY-CfiMnbJv.js");return{diagram:t}},__vite__mapDeps([36,35,12,13,0,1,14,10,3]));return{id:Rp,diagram:e}},"loader"),TS={id:Rp,detector:wS,loader:SS},BS=TS,qp="state",_S=u((e,t)=>t?.state?.defaultRenderer==="dagre-wrapper"?!1:/^\s*stateDiagram/.test(e),"detector"),vS=u(async()=>{const{diagram:e}=await Bt(async()=>{const{diagram:t}=await import("./stateDiagram-D77RDMKH-CoTk522r.js");return{diagram:t}},__vite__mapDeps([37,38,13,0,1,14,10,3,5]));return{id:qp,diagram:e}},"loader"),LS={id:qp,detector:_S,loader:vS},FS=LS,Np="stateDiagram",MS=u((e,t)=>!!(/^\s*stateDiagram-v2/.test(e)||/^\s*stateDiagram/.test(e)&&t?.state?.defaultRenderer==="dagre-wrapper"),"detector"),AS=u(async()=>{const{diagram:e}=await Bt(async()=>{const{diagram:t}=await import("./stateDiagram-v2-MP3YSRHH-DJacHmOW.js");return{diagram:t}},__vite__mapDeps([39,38,13,0,1,14,10,3]));return{id:Np,diagram:e}},"loader"),ES={id:Np,detector:MS,loader:AS},$S=ES,Wp="journey",OS=u(e=>/^\s*journey/.test(e),"detector"),PS=u(async()=>{const{diagram:e}=await Bt(async()=>{const{diagram:t}=await import("./journeyDiagram-3NMN7TZE-EEUt8KFZ.js");return{diagram:t}},__vite__mapDeps([40,12,10,0,1,28,3]));return{id:Wp,diagram:e}},"loader"),DS={id:Wp,detector:OS,loader:PS},IS=DS,RS=u((e,t,r)=>{D.debug(`rendering svg for syntax error
|
|
300
|
+
`);const i=om(t),s=i.append("g");i.attr("viewBox","0 0 2412 512"),_c(i,100,512,!0),s.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),s.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),s.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),s.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),s.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),s.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),s.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in text"),s.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${r}`)},"draw"),zp={draw:RS},qS=zp,NS={db:{},renderer:zp,parser:{parse:u(()=>{},"parse")}},WS=NS,Hp="flowchart-elk",zS=u((e,t={})=>/^\s*flowchart-elk/.test(e)||/^\s*(flowchart|graph)/.test(e)&&t?.flowchart?.defaultRenderer==="elk"?(t.layout="elk",!0):!1,"detector"),HS=u(async()=>{const{diagram:e}=await Bt(async()=>{const{diagram:t}=await import("./flowDiagram-HODETNUW-B_X_09yE.js").then(r=>r.f);return{diagram:t}},__vite__mapDeps([11,12,13,0,1,14,10,3,15]));return{id:Hp,diagram:e}},"loader"),jS={id:Hp,detector:zS,loader:HS},YS=jS,jp="timeline",US=u(e=>/^\s*timeline/.test(e),"detector"),GS=u(async()=>{const{diagram:e}=await Bt(async()=>{const{diagram:t}=await import("./timeline-definition-24CTP7MA-BPTTWz0t.js");return{diagram:t}},__vite__mapDeps([41,0,1,28,3]));return{id:jp,diagram:e}},"loader"),XS={id:jp,detector:US,loader:GS},VS=XS,Yp="mindmap",ZS=u(e=>/^\s*mindmap/.test(e),"detector"),KS=u(async()=>{const{diagram:e}=await Bt(async()=>{const{diagram:t}=await import("./mindmap-definition-YA3MSWOX-C9OJtKZo.js");return{diagram:t}},__vite__mapDeps([42,13,0,1,14,3]));return{id:Yp,diagram:e}},"loader"),QS={id:Yp,detector:ZS,loader:KS},JS=QS,Up="kanban",tT=u(e=>/^\s*kanban/.test(e),"detector"),eT=u(async()=>{const{diagram:e}=await Bt(async()=>{const{diagram:t}=await import("./kanban-definition-UXKFOSKX-BHoTyZ-H.js");return{diagram:t}},__vite__mapDeps([43,12,0,1,3]));return{id:Up,diagram:e}},"loader"),rT={id:Up,detector:tT,loader:eT},iT=rT,Gp="sankey",sT=u(e=>/^\s*sankey(-beta)?/.test(e),"detector"),oT=u(async()=>{const{diagram:e}=await Bt(async()=>{const{diagram:t}=await import("./sankeyDiagram-P5KCCOFB-LbmTEAz2.js");return{diagram:t}},__vite__mapDeps([44,0,1,29,24,3]));return{id:Gp,diagram:e}},"loader"),aT={id:Gp,detector:sT,loader:oT},nT=aT,Xp="packet",lT=u(e=>/^\s*packet(-beta)?/.test(e),"detector"),hT=u(async()=>{const{diagram:e}=await Bt(async()=>{const{diagram:t}=await import("./diagram-Z3DM3KII-BccyzzPj.js");return{diagram:t}},__vite__mapDeps([45,20,21,0,1,3]));return{id:Xp,diagram:e}},"loader"),cT={id:Xp,detector:lT,loader:hT},Vp="radar",dT=u(e=>/^\s*radar-beta/.test(e),"detector"),uT=u(async()=>{const{diagram:e}=await Bt(async()=>{const{diagram:t}=await import("./diagram-UQ7AKVKN-zaxruSox.js");return{diagram:t}},__vite__mapDeps([46,20,21,0,1,3]));return{id:Vp,diagram:e}},"loader"),gT={id:Vp,detector:dT,loader:uT},Zp="block",pT=u(e=>/^\s*block(-beta)?/.test(e),"detector"),fT=u(async()=>{const{diagram:e}=await Bt(async()=>{const{diagram:t}=await import("./blockDiagram-I7D4REHJ-JX7h4WWl.js");return{diagram:t}},__vite__mapDeps([47,12,0,1,15,3]));return{id:Zp,diagram:e}},"loader"),yT={id:Zp,detector:pT,loader:fT},mT=yT,Kp="treeView",CT=u(e=>/^\s*treeView-beta/.test(e),"detector"),xT=u(async()=>{const{diagram:e}=await Bt(async()=>{const{diagram:t}=await import("./diagram-S7CK7UJ4-DvVIz9wN.js");return{diagram:t}},__vite__mapDeps([48,19,20,21,0,1,3]));return{id:Kp,diagram:e}},"loader"),bT={id:Kp,detector:CT,loader:xT},kT=bT,Qp="architecture",wT=u(e=>/^\s*architecture/.test(e),"detector"),ST=u(async()=>{const{diagram:e}=await Bt(async()=>{const{diagram:t}=await import("./architectureDiagram-5GKGNRK7-BuacmIpL.js");return{diagram:t}},__vite__mapDeps([49,20,21,0,1,8,3]));return{id:Qp,diagram:e}},"loader"),TT={id:Qp,detector:wT,loader:ST},BT=TT,Jp="eventmodeling",_T=u(e=>/^\s*eventmodeling/.test(e),"detector"),vT=u(async()=>{const{diagram:e}=await Bt(async()=>{const{diagram:t}=await import("./diagram-VSXAHHWV-BpisZmMI.js");return{diagram:t}},__vite__mapDeps([50,20,21,0,1,3]));return{id:Jp,diagram:e}},"loader"),LT={id:Jp,detector:_T,loader:vT},FT=LT,tf="ishikawa",MT=u(e=>/^\s*ishikawa(-beta)?\b/i.test(e),"detector"),AT=u(async()=>{const{diagram:e}=await Bt(async()=>{const{diagram:t}=await import("./ishikawaDiagram-5VMMS53U-ubN-F3uw.js");return{diagram:t}},__vite__mapDeps([51,0,1,3]));return{id:tf,diagram:e}},"loader"),ET={id:tf,detector:MT,loader:AT},ef="venn",$T=u(e=>/^\s*venn-beta/.test(e),"detector"),OT=u(async()=>{const{diagram:e}=await Bt(async()=>{const{diagram:t}=await import("./vennDiagram-4TSXK5OY-KQ0VCvz7.js");return{diagram:t}},__vite__mapDeps([52,0,1,3]));return{id:ef,diagram:e}},"loader"),PT={id:ef,detector:$T,loader:OT},DT=PT,rf="treemap",IT=u(e=>/^\s*treemap/.test(e),"detector"),RT=u(async()=>{const{diagram:e}=await Bt(async()=>{const{diagram:t}=await import("./diagram-VX7I27RA-CEC2DdCe.js");return{diagram:t}},__vite__mapDeps([53,20,14,21,0,1,25,29,24,3]));return{id:rf,diagram:e}},"loader"),qT={id:rf,detector:IT,loader:RT},sf="wardley",NT=u(e=>/^\s*wardley-beta/i.test(e),"detector"),WT=u(async()=>{const{diagram:e}=await Bt(async()=>{const{diagram:t}=await import("./wardleyDiagram-VM6X3IG4-DoiF8Mk5.js");return{diagram:t}},__vite__mapDeps([54,20,21,0,1,3]));return{id:sf,diagram:e}},"loader"),zT={id:sf,detector:NT,loader:WT},HT=zT,of="cynefin",jT=u(e=>/^\s*cynefin-beta(?:[\s:]|$)/.test(e),"detector"),YT=u(async()=>{const{diagram:e}=await Bt(async()=>{const{diagram:t}=await import("./cynefinDiagram-5FMLGOSQ-Dht0kBaK.js");return{diagram:t}},__vite__mapDeps([55,20,21,0,1,3]));return{id:of,diagram:e}},"loader"),UT={id:of,detector:jT,loader:YT},af="railroad",GT=u(e=>/^\s*railroad-beta/i.test(e),"detector"),XT=u(async()=>{const{diagram:e}=await Bt(async()=>{const{diagram:t}=await import("./railroadDiagram-O6MQD6OU-Qrp26LKj.js");return{diagram:t}},__vite__mapDeps([56,57,20,0,1,21,3]));return{id:af,diagram:e}},"loader"),VT={id:af,detector:GT,loader:XT},nf="railroadEbnf",ZT=u(e=>/^\s*railroad-ebnf-beta/i.test(e),"detector"),KT=u(async()=>{const{diagram:e}=await Bt(async()=>{const{diagram:t}=await import("./ebnfDiagram-PWID7BFC-iAT6gvfL.js");return{diagram:t}},__vite__mapDeps([58,57,20,0,1,21,3]));return{id:nf,diagram:e}},"loader"),QT={id:nf,detector:ZT,loader:KT},lf="railroadAbnf",JT=u(e=>/^\s*railroad-abnf-beta/i.test(e),"detector"),tB=u(async()=>{const{diagram:e}=await Bt(async()=>{const{diagram:t}=await import("./abnfDiagram-VCTEODGH-BmlsnR28.js");return{diagram:t}},__vite__mapDeps([59,57,20,0,1,21,3]));return{id:lf,diagram:e}},"loader"),eB={id:lf,detector:JT,loader:tB},hf="railroadPeg",rB=u(e=>/^\s*railroad-peg-beta/i.test(e),"detector"),iB=u(async()=>{const{diagram:e}=await Bt(async()=>{const{diagram:t}=await import("./pegDiagram-XKGWAZYB-BVaiwlYa.js");return{diagram:t}},__vite__mapDeps([60,57,20,0,1,21,3]));return{id:hf,diagram:e}},"loader"),sB={id:hf,detector:rB,loader:iB},sc=!1,eo=u(()=>{sc||(sc=!0,ms("error",WS,e=>e.toLowerCase().trim()==="error"),ms("---",{db:{clear:u(()=>{},"clear")},styles:{},renderer:{draw:u(()=>{},"draw")},parser:{parse:u(()=>{throw new Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks")},"parse")},init:u(()=>null,"init")},e=>e.toLowerCase().trimStart().startsWith("---")),Uo(YS,JS,BT),Uo(Bw,iT,BS,kS,Ww,Vw,Qw,eS,gS,mS,Iw,$w,Fw,VS,Yw,$S,FS,IS,oS,nT,cT,hS,mT,FT,kT,gT,ET,qT,VT,QT,eB,sB,DT,HT,UT))},"addDiagrams"),oB=u(async()=>{D.debug("Loading registered diagrams");const t=(await Promise.allSettled(Object.entries(or).map(async([r,{detector:i,loader:s}])=>{if(s)try{Zo(r)}catch{try{const{diagram:o,id:a}=await s();ms(a,o,i)}catch(o){throw D.error(`Failed to load external diagram with key ${r}. Removing from detectors.`),delete or[r],o}}}))).filter(r=>r.status==="rejected");if(t.length>0){D.error(`Failed to load ${t.length} external diagrams`);for(const r of t)D.error(r);throw new Error(`Failed to load ${t.length} external diagrams`)}},"loadRegisteredDiagrams"),aB="graphics-document document";function cf(e,t){e.attr("role",aB),t!==""&&e.attr("aria-roledescription",t)}u(cf,"setA11yDiagramInfo");function df(e,t,r,i){if(e.insert!==void 0){if(r){const s=`chart-desc-${i}`;e.attr("aria-describedby",s),e.insert("desc",":first-child").attr("id",s).text(r)}if(t){const s=`chart-title-${i}`;e.attr("aria-labelledby",s),e.insert("title",":first-child").attr("id",s).text(t)}}}u(df,"addSVGa11yTitleDescription");var ir,Ta=(ir=class{constructor(t,r,i,s,o){this.type=t,this.text=r,this.db=i,this.parser=s,this.renderer=o}static async fromText(t,r={}){const i=Rt(),s=La(t,i);t=vC(t)+`
|
|
301
|
+
`;try{Zo(s)}catch{const c=gy(s);if(!c)throw new bc(`Diagram ${s} not found.`);const{id:h,diagram:d}=await c();ms(h,d)}const{db:o,parser:a,renderer:n,init:l}=Zo(s);return a.parser&&(a.parser.yy=o),o.clear?.(),l?.(i),r.title&&o.setDiagramTitle?.(r.title),await a.parse(t),new ir(s,t,o,a,n)}async render(t,r){await this.renderer.draw(this.text,t,r,this)}getParser(){return this.parser}getType(){return this.type}},u(ir,"Diagram"),ir),oc=[],nB=u(()=>{oc.forEach(e=>{e()}),oc=[]},"attachFunctions"),lB=u(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function uf(e){const t=e.match(xc);if(!t)return{text:e,metadata:{}};const r=t[1],i=r?t[2].split(`
|
|
302
|
+
`).map(a=>a.startsWith(r)?a.slice(r.length):a).join(`
|
|
303
|
+
`):t[2];let s=ew(i,{schema:tw})??{};s=typeof s=="object"&&!Array.isArray(s)?s:{};const o={};return s.displayMode&&(o.displayMode=s.displayMode.toString()),s.title&&(o.title=s.title.toString()),s.config&&(o.config=s.config),{text:e.slice(t[0].length),metadata:o}}u(uf,"extractFrontMatter");var hB=u(e=>e.replace(/\r\n?/g,`
|
|
304
|
+
`).replace(/<(\w+)([^>]*)>/g,(t,r,i)=>"<"+r+i.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),cB=u(e=>{const{text:t,metadata:r}=uf(e),{displayMode:i,title:s,config:o={}}=r;return i&&(o.gantt||(o.gantt={}),o.gantt.displayMode=i),{title:s,config:o,text:t}},"processFrontmatter"),dB=u(e=>{const t=Zt.detectInit(e)??{},r=Zt.detectDirective(e,"wrap");return Array.isArray(r)?t.wrap=r.some(({type:i})=>i==="wrap"):r?.type==="wrap"&&(t.wrap=!0),{text:pC(e),directive:t}},"processDirectives");function Un(e){const t=hB(e),r=cB(t),i=dB(r.text),s=Xa(r.config,i.directive);return e=lB(i.text),{code:e,title:r.title,config:s}}u(Un,"preprocessDiagram");function gf(e){const t=new TextEncoder().encode(e),r=Array.from(t,i=>String.fromCodePoint(i)).join("");return btoa(r)}u(gf,"toBase64");var uB=5e4,gB="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",pB="sandbox",fB="loose",yB="http://www.w3.org/2000/svg",mB="http://www.w3.org/1999/xlink",CB="http://www.w3.org/1999/xhtml",xB="100%",bB="100%",kB="border:0;margin:0;",wB="margin:0",SB="allow-top-navigation-by-user-activation allow-popups",TB='The "iframe" tag is not supported by your browser.',BB=["foreignobject"],_B=["dominant-baseline"];function Gn(e){const t=Un(e);return fs(),hy(t.config??{}),t}u(Gn,"processAndSetConfigs");async function pf(e,t){eo();try{const{code:r,config:i}=Gn(e);return{diagramType:(await yf(r)).type,config:i}}catch(r){if(t?.suppressErrors)return!1;throw r}}u(pf,"parse");var ac=u((e,t,r=[])=>{const i=pc(`{ ${r.join(" !important; ")} !important; }`);return`.${e} ${t} ${i}`},"cssImportantStyles"),vB=u((e,t=new Map)=>{const r=new CSSStyleSheet;if(e.fontFamily!==void 0&&r.insertRule(`:root { --mermaid-font-family: ${e.fontFamily}}`,r.cssRules.length),e.altFontFamily!==void 0&&r.insertRule(`:root { --mermaid-alt-font-family: ${e.altFontFamily}}`,r.cssRules.length),t instanceof Map){const n=Kt(e)?["> *","span"]:["rect","polygon","ellipse","circle","path"];t.forEach(l=>{fl(l.styles)||n.forEach(c=>{r.insertRule(ac(l.id,c,l.styles),r.cssRules.length)}),fl(l.textStyles)||r.insertRule(ac(l.id,"tspan",(l?.textStyles||[]).map(c=>c.replace("color","fill"))),r.cssRules.length)})}let i="";if(e.themeCSS!==void 0)if(typeof r.replaceSync=="function"){const s=new CSSStyleSheet;s.replaceSync(e.themeCSS),i=Vo(s)+`
|
|
305
|
+
`}else i+=`${e.themeCSS}
|
|
306
|
+
`;return i+Vo(r)},"createCssStyles"),LB=u((e,t)=>Sa(Cw(`${e}{${t}}`),kw([u(function(i,s,o,a){if(i.type==="rule"&&Array.isArray(i.props)){if(i.parent&&i.parent.type===ba)return;i.props=i.props.map(n=>n===e&&Array.isArray(i.children)&&i.children.every(c=>c.type!=="decl"?!1:new Set(["font-family","font-size","fill"]).has(c.props))||(n.startsWith(`${e} `)||n.startsWith(`${e}>`))&&!n.startsWith(`${e} ||`)?n:`${e} ${n}`)}else i.type.startsWith("@")&&([...[sw,aw,bp,lw,"@container","@starting-style"],ba].includes(i.type)||(D.warn(`Removing unsupported at-rule ${i.type} from CSS`),i.type=jn))},"addNamespace"),bw])),"compileCSS"),FB=u((e,t,r,i)=>{const s=vB(e,r),o=Ay(t,s,{...e.themeVariables,theme:e.theme,look:e.look},i);return LB(i,o)},"createUserStyles"),MB=u((e="",t,r)=>{let i=e;return!r&&!t&&(i=i.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),i=Ge(i),i=i.replace(/<br>/g,"<br/>"),i},"cleanUpSvgCode"),AB=u((e="",t)=>{const r=t?.viewBox?.baseVal?.height?t.viewBox.baseVal.height+"px":bB,i=gf(`<body style="${wB}">${e}</body>`);return`<iframe style="width:${xB};height:${r};${kB}" src="data:text/html;charset=UTF-8;base64,${i}" sandbox="${SB}">
|
|
307
|
+
${TB}
|
|
308
|
+
</iframe>`},"putIntoIFrame"),nc=u((e,t,r,i,s)=>{const o=e.append("div");o.attr("id",r),i&&o.attr("style",i);const a=o.append("svg").attr("id",t).attr("width","100%").attr("xmlns",yB);return s&&a.attr("xmlns:xlink",s),a.append("g"),e},"appendDivSvgG");function Ba(e,t){return e.append("iframe").attr("id",t).attr("style","width: 100%; height: 100%;").attr("sandbox","")}u(Ba,"sandboxedIframe");var EB=u((e,t,r,i)=>{e.getElementById(t)?.remove(),e.getElementById(r)?.remove(),e.getElementById(i)?.remove()},"removeExistingElements"),$B=u(async function(e,t,r){eo();const i=Gn(t);t=i.code;const s=Rt();D.debug(s),t.length>(s?.maxTextSize??uB)&&(t=gB);const o=`#${e}`,a="i"+e,n="#"+a,l="d"+e,c="#"+l,h=u(()=>{const E=Tt(g?n:c).node();E&&"remove"in E&&E.remove()},"removeTempElements");let d=Tt(document.body);const g=s.securityLevel===pB,f=s.securityLevel===fB,m=s.fontFamily;if(r!==void 0){if(r&&(r.innerHTML=""),g){const H=Ba(Tt(r),a);d=Tt(H.nodes()[0].contentDocument.body),d.node().style.margin="0"}else d=Tt(r);nc(d,e,l,`font-family: ${m}`,mB)}else{if(EB(document,e,l,a),g){const H=Ba(Tt(document.body),a);d=Tt(H.nodes()[0].contentDocument.body),d.node().style.margin="0"}else d=Tt("body");nc(d,e,l)}let y,C;try{y=await Ta.fromText(t,{title:i.title})}catch(H){if(s.suppressErrorRendering)throw h(),H;y=await Ta.fromText("error"),C=H}const x=d.select(c).node(),k=y.type,S=x.firstChild,T=S.firstChild,B=y.renderer.getClasses?.(t,y),L=FB(s,k,B,o),M=document.createElement("style");M.innerHTML=L,S.insertBefore(M,T);try{await y.renderer.draw(t,e,"11.17.2",y)}catch(H){throw s.suppressErrorRendering?h():qS.draw(t,e,"11.17.2"),H}const v=d.select(`${c} svg`),X=y.db.getAccTitle?.(),z=y.db.getAccDescription?.();mf(k,v,X,z);const et=u(()=>{d.select(`[id="${e}"]`).selectAll("foreignobject > *").attr("xmlns",CB);let H=d.select(c).node().innerHTML;if(D.debug("config.arrowMarkerAbsolute",s.arrowMarkerAbsolute),H=MB(H,g,Le(s.arrowMarkerAbsolute)),g){const E=d.select(c+" svg").node();H=AB(H,E)}else f||(H=Ur.sanitize(H,{ADD_TAGS:BB,ADD_ATTR:_B,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));return nB(),H},"serializeSvg")();if(C)throw C;return h(),{diagramType:k,svg:et,bindFunctions:y.db.bindFunctions}},"render");function ff(e={}){const t=jt({},e);t?.fontFamily&&!t.themeVariables?.fontFamily&&(t.themeVariables||(t.themeVariables={}),t.themeVariables.fontFamily=t.fontFamily),ny(t),t?.theme&&t.theme in Oe?t.themeVariables=Oe[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=Oe.default.getThemeVariables(t.themeVariables));const r=typeof t=="object"?ay(t):fc();va(r.logLevel),eo()}u(ff,"initialize");var yf=u((e,t={})=>{const{code:r}=Un(e);return Ta.fromText(r,t)},"getDiagramFromText");function mf(e,t,r,i){cf(t,e),df(t,r,i,t.attr("id"))}u(mf,"addA11yInfo");var cr=Object.freeze({render:$B,parse:pf,getDiagramFromText:yf,initialize:ff,getConfig:Rt,setConfig:yc,getSiteConfig:fc,updateSiteConfig:ly,reset:u(()=>{fs()},"reset"),globalReset:u(()=>{fs(Gr)},"globalReset"),defaultConfig:Gr});va(Rt().logLevel);fs(Rt());var OB=u((e,t,r)=>{D.warn(e),Ga(e)?(r&&r(e.str,e.hash),t.push({...e,message:e.str,error:e})):(r&&r(e),e instanceof Error&&t.push({str:e.message,message:e.message,hash:e.name,error:e}))},"handleError"),Cf=u(async function(e={querySelector:".mermaid"}){try{await PB(e)}catch(t){if(Ga(t)&&D.error(t.str),Ie.parseError&&Ie.parseError(t),!e.suppressErrors)throw D.error("Use the suppressErrors option to suppress these errors"),t}},"run"),PB=u(async function({postRenderCallback:e,querySelector:t,nodes:r}={querySelector:".mermaid"}){const i=cr.getConfig();D.debug(`${e?"":"No "}Callback function found`);let s;if(r)s=r;else if(t)s=document.querySelectorAll(t);else throw new Error("Nodes and querySelector are both undefined");D.debug(`Found ${s.length} diagrams`),i?.startOnLoad!==void 0&&(D.debug("Start On Load: "+i?.startOnLoad),cr.updateSiteConfig({startOnLoad:i?.startOnLoad}));const o=new Zt.InitIDGenerator(i.deterministicIds,i.deterministicIDSeed);let a;const n=[];for(const l of Array.from(s)){if(D.info("Rendering diagram: "+l.id),l.getAttribute("data-processed"))continue;l.setAttribute("data-processed","true");const c=`mermaid-${o.next()}`;a=l.innerHTML,a=vd(Zt.entityDecode(a)).trim().replace(/<br\s*\/?>/gi,"<br/>");const h=Zt.detectInit(a);h&&D.debug("Detected early reinit: ",h);try{const{svg:d,bindFunctions:g}=await wf(c,a,l);l.innerHTML=d,e&&await e(c),g&&g(l)}catch(d){OB(d,n,Ie.parseError)}}if(n.length>0)throw n[0]},"runThrowsErrors"),xf=u(function(e){cr.initialize(e)},"initialize"),DB=u(async function(e,t,r){D.warn("mermaid.init is deprecated. Please use run instead."),e&&xf(e);const i={postRenderCallback:r,querySelector:".mermaid"};typeof t=="string"?i.querySelector=t:t&&(t instanceof HTMLElement?i.nodes=[t]:i.nodes=t),await Cf(i)},"init"),IB=u(async(e,{lazyLoad:t=!0}={})=>{eo(),Uo(...e),t===!1&&await oB()},"registerExternalDiagrams"),bf=u(function(){if(Ie.startOnLoad){const{startOnLoad:e}=cr.getConfig();e&&Ie.run().catch(t=>D.error("Mermaid failed to initialize",t))}},"contentLoaded");typeof document<"u"&&window.addEventListener("load",bf,!1);var RB=u(function(e){Ie.parseError=e},"setParseErrorHandler"),$s=[],jo=!1,kf=u(async()=>{if(!jo){for(jo=!0;$s.length>0;){const e=$s.shift();if(e)try{await e()}catch(t){D.error("Error executing queue",t)}}jo=!1}},"executeQueue"),qB=u(async(e,t)=>new Promise((r,i)=>{const s=u(()=>new Promise((o,a)=>{cr.parse(e,t).then(n=>{o(n),r(n)},n=>{D.error("Error parsing",n),Ie.parseError?.(n),a(n),i(n)})}),"performCall");$s.push(s),kf().catch(i)}),"parse"),wf=u((e,t,r)=>new Promise((i,s)=>{const o=u(()=>new Promise((a,n)=>{cr.render(e,t,r).then(l=>{a(l),i(l)},l=>{D.error("Error parsing",l),Ie.parseError?.(l),n(l),s(l)})}),"performCall");$s.push(o),kf().catch(s)}),"render"),NB=u(()=>Object.keys(or).map(e=>({id:e})),"getRegisteredDiagramsMetadata"),Ie={startOnLoad:!0,mermaidAPI:cr,parse:qB,render:wf,init:DB,run:Cf,registerExternalDiagrams:IB,registerLayoutLoaders:mp,initialize:xf,parseError:void 0,contentLoaded:bf,setParseErrorHandler:RB,detectType:La,registerIconPacks:Mm,getRegisteredDiagramsMetadata:NB},WB=Ie;const L_=Object.freeze(Object.defineProperty({__proto__:null,clearLayoutRenderState:Tn,createCommonLayoutRenderer:sp,default:WB,defaultMeasureLayout:Bn,paintLayoutData:_n},Symbol.toStringTag,{value:"Module"}));export{Ei as $,Ny as A,Xa as B,Te as C,gc as D,xC as E,om as F,Uy as G,rl as H,el as I,r_ as J,KB as K,t_ as L,JB as M,VB as N,Oa as O,e_ as P,ZB as Q,br as R,s_ as S,i_ as T,bt as U,QB as V,Nf as W,GB as X,ew as Y,tw as Z,u as _,Oy as a,ud as a$,UB as a0,Is as a1,cC as a2,by as a3,Bc as a4,Qn as a5,Ks as a6,Zy as a7,Jo as a8,CC as a9,k0 as aA,Wa as aB,qa as aC,as as aD,Xm as aE,Gm as aF,Um as aG,Ym as aH,Im as aI,rd as aJ,Nm as aK,Dm as aL,Hm as aM,id as aN,qm as aO,Km as aP,Zm as aQ,Vm as aR,Jm as aS,Qm as aT,Rm as aU,sd as aV,jm as aW,zm as aX,Wm as aY,od as aZ,vg as a_,fe as aa,q as ab,N as ac,Ly as ad,vc as ae,kg as af,gn as ag,Kl as ah,zi as ai,Mm as aj,Ua as ak,st as al,g_ as am,u_ as an,sp as ao,Ft as ap,Xg as aq,at as ar,d_ as as,Es as at,Zg as au,Hs as av,pn as aw,Tg as ax,Mx as ay,Vt as az,$y as b,cc as b0,Gy as b1,YB as b2,ye as b3,Fm as b4,XB as b5,nt as b6,Kc as b7,vf as b8,fn as b9,A2 as bA,Gs as bB,Ms as bC,L2 as bD,Gg as bE,we as bF,Wb as bG,Sn as bH,Mg as bI,E2 as bJ,F2 as bK,x2 as bL,Ys as bM,qg as bN,Zs as bO,Ng as bP,b2 as bQ,mk as bR,Ke as bS,Si as bT,_r as bU,ts as bV,xo as bW,N2 as bX,px as bY,L_ as bZ,yn as ba,ah as bb,$g as bc,Us as bd,Eg as be,Vb as bf,Og as bg,O1 as bh,bk as bi,qb as bj,Xb as bk,P1 as bl,lr as bm,Jr as bn,Re as bo,kh as bp,Be as bq,$e as br,M1 as bs,dh as bt,As as bu,Pe as bv,Nb as bw,ie as bx,fh as by,Cn as bz,_t as c,_c as d,jt as e,De as f,Dy as g,Cg as h,ae as i,Wi as j,pd as k,D as l,Ni as m,Om as n,Iy as o,Ry as p,Ey as q,o_ as r,Py as s,Ye as t,Sf as u,v_ as v,wC as w,__ as x,Zt as y,Rt as z};
|