agentic-diff 0.1.9 → 0.1.10
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/THIRD-PARTY-LICENSES.txt +2476 -186
- package/dist/cli.js +357 -51
- package/dist/web/assets/{FileEditor-ySBcHrW6.js → FileEditor-C-89fTy9.js} +3 -3
- package/dist/web/assets/abnfDiagram-VCTEODGH-C49HvP8-.js +1 -0
- package/dist/web/assets/architecture-7GRP2DOG-CBx-Hahm.js +1 -0
- package/dist/web/assets/architectureDiagram-5GKGNRK7-Cz6oQJGV.js +36 -0
- package/dist/web/assets/blockDiagram-I7D4REHJ-DyavTEyC.js +129 -0
- package/dist/web/assets/c4Diagram-7LVT6UL2-C5YYMNh9.js +38 -0
- package/dist/web/assets/channel-BaeyAqOu.js +1 -0
- package/dist/web/assets/chunk-2Q5K7J3B-Cmy5RQpP.js +1 -0
- package/dist/web/assets/chunk-5VM5RSS4-Bl5su3lF.js +15 -0
- package/dist/web/assets/chunk-F27PBJKO-ClNflvco.js +1 -0
- package/dist/web/assets/chunk-IMKFNOWR-C-NKFJCn.js +231 -0
- package/dist/web/assets/chunk-JWPE2WC7-DL2sZ8xq.js +1 -0
- package/dist/web/assets/chunk-POPQ4Y6H-BBYxqD_7.js +1 -0
- package/dist/web/assets/chunk-SHT3W25Y-DqecC6IS.js +168 -0
- package/dist/web/assets/chunk-SVP7TREG-CykZJApb.js +88 -0
- package/dist/web/assets/chunk-TICWLB2K-tYRVcQZJ.js +206 -0
- package/dist/web/assets/chunk-XXDRQBXY-D1ybtwL8.js +1 -0
- package/dist/web/assets/classDiagram-ZZMXUADV-BfOlT7v5.js +1 -0
- package/dist/web/assets/classDiagram-v2-VYDZK3BY-BfOlT7v5.js +1 -0
- package/dist/web/assets/cose-bilkent-JH36ORCC-XcptgDNS.js +1 -0
- package/dist/web/assets/cynefin-OW5HDTMX-CrdM8CNN.js +1 -0
- package/dist/web/assets/cynefinDiagram-5FMLGOSQ-B2BjF2Np.js +62 -0
- package/dist/web/assets/cytoscape.esm-CFkBLF6F.js +321 -0
- package/dist/web/assets/d3-scale-okpWUcMn.js +1 -0
- package/dist/web/assets/dagre-CHqJHIuQ.js +1 -0
- package/dist/web/assets/dagre-GXQ25YYZ-BVwOMWlS.js +4 -0
- package/dist/web/assets/diagram-S7CK7UJ4-BbgOrdTP.js +30 -0
- package/dist/web/assets/diagram-UQ7AKVKN-dmEGfy18.js +41 -0
- package/dist/web/assets/diagram-VSXAHHWV-C1AAi9ds.js +3 -0
- package/dist/web/assets/diagram-VX7I27RA-CXE3jVhR.js +24 -0
- package/dist/web/assets/diagram-Z3DM3KII-CJmAyH70.js +24 -0
- package/dist/web/assets/ebnfDiagram-PWID7BFC-BfTsv3U-.js +1 -0
- package/dist/web/assets/erDiagram-RLTQ6QDP-DTCj-KOY.js +99 -0
- package/dist/web/assets/eventmodeling-NTZA5JFV-Bl6oaFeK.js +1 -0
- package/dist/web/assets/flowDiagram-HODETNUW-CFEMKVwu.js +1 -0
- package/dist/web/assets/ganttDiagram-EL5Y4UJY-DyGkH9mL.js +292 -0
- package/dist/web/assets/gitGraph-4MIJSDKK-B9_GxpLb.js +1 -0
- package/dist/web/assets/gitGraphDiagram-WWUBYQGX-B1D08k6k.js +106 -0
- package/dist/web/assets/{index-BsLHBrFu.css → index-CWSKyE-r.css} +1 -1
- package/dist/web/assets/index-DZKge1Ex.js +63 -0
- package/dist/web/assets/info-A6RAGUB7-JX_tOlLA.js +1 -0
- package/dist/web/assets/infoDiagram-27XIBGKW-Bf0m1pFs.js +2 -0
- package/dist/web/assets/ishikawaDiagram-5VMMS53U-BVrp2sns.js +70 -0
- package/dist/web/assets/journeyDiagram-3NMN7TZE-hOGZiS97.js +139 -0
- package/dist/web/assets/kanban-definition-UXKFOSKX-DS-3wdxe.js +89 -0
- package/dist/web/assets/katex-BreMo9lq.js +257 -0
- package/dist/web/assets/mermaid-parser.core-BX15ctWm.js +166 -0
- package/dist/web/assets/mermaid.core-DTGmDhfV.js +312 -0
- package/dist/web/assets/mindmap-definition-YA3MSWOX-6LNGKzRE.js +96 -0
- package/dist/web/assets/packet-AYTQ26CC-7xVJxDG1.js +1 -0
- package/dist/web/assets/pegDiagram-XKGWAZYB-DtH9gLh9.js +1 -0
- package/dist/web/assets/pie-WAS4IAKB-Bw4FZEO0.js +1 -0
- package/dist/web/assets/pieDiagram-E7YTZNPT-m4yruZNh.js +39 -0
- package/dist/web/assets/quadrantDiagram-AXDQQJYC-y4L1cf7l.js +7 -0
- package/dist/web/assets/radar-RG4KPBEZ-BW371lik.js +1 -0
- package/dist/web/assets/railroad-74A4TZTK-BgXIJFVf.js +1 -0
- package/dist/web/assets/railroad-abnf-HS5TGJTU-DnsEfmjU.js +1 -0
- package/dist/web/assets/railroad-ebnf-LZEXJU2U-CRCK52WR.js +1 -0
- package/dist/web/assets/railroad-peg-WCYAUIDC-D5HgIhmP.js +1 -0
- package/dist/web/assets/railroadDiagram-O6MQD6OU-BxEd5py5.js +1 -0
- package/dist/web/assets/requirementDiagram-BXWQKSXE-CwJ0sNiM.js +84 -0
- package/dist/web/assets/sankeyDiagram-P5KCCOFB-Da85_fPb.js +40 -0
- package/dist/web/assets/sequenceDiagram-WJ2MYXX4-CW_G65sH.js +162 -0
- package/dist/web/assets/sizeCapture-INFHLROL-2x3la0Bj.js +1 -0
- package/dist/web/assets/stateDiagram-D77RDMKH-CqdLpUep.js +1 -0
- package/dist/web/assets/stateDiagram-v2-MP3YSRHH-CZng7GId.js +1 -0
- package/dist/web/assets/swimlanes-42K2YHIH-DMh0NoSR.js +1 -0
- package/dist/web/assets/swimlanesDiagram-VR7AAH4N-CKaOPN8U.js +8 -0
- package/dist/web/assets/timeline-definition-24CTP7MA-DLGi-xy-.js +120 -0
- package/dist/web/assets/treeView-Q6P3EWNA-Cze9-s5B.js +1 -0
- package/dist/web/assets/treemap-WGGIJYW6-BZ9A7GPw.js +1 -0
- package/dist/web/assets/vennDiagram-4TSXK5OY-spL-BBOp.js +34 -0
- package/dist/web/assets/wardley-WFR3VGLG-DSwp5vCl.js +1 -0
- package/dist/web/assets/wardleyDiagram-VM6X3IG4-ubLr3NNH.js +78 -0
- package/dist/web/assets/xychartDiagram-S5SC5T6Z-CJnigrLu.js +7 -0
- package/dist/web/index.html +2 -2
- package/package.json +1 -1
- package/dist/web/assets/index-2aup9CVk.js +0 -62
|
@@ -0,0 +1,312 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/dagre-GXQ25YYZ-BVwOMWlS.js","assets/dagre-CHqJHIuQ.js","assets/cose-bilkent-JH36ORCC-XcptgDNS.js","assets/index-DZKge1Ex.js","assets/index-CWSKyE-r.css","assets/cytoscape.esm-CFkBLF6F.js","assets/c4Diagram-7LVT6UL2-C5YYMNh9.js","assets/chunk-F27PBJKO-ClNflvco.js","assets/flowDiagram-HODETNUW-CFEMKVwu.js","assets/chunk-SHT3W25Y-DqecC6IS.js","assets/chunk-5VM5RSS4-Bl5su3lF.js","assets/channel-BaeyAqOu.js","assets/chunk-XXDRQBXY-D1ybtwL8.js","assets/chunk-POPQ4Y6H-BBYxqD_7.js","assets/swimlanesDiagram-VR7AAH4N-CKaOPN8U.js","assets/erDiagram-RLTQ6QDP-DTCj-KOY.js","assets/gitGraphDiagram-WWUBYQGX-B1D08k6k.js","assets/chunk-2Q5K7J3B-Cmy5RQpP.js","assets/chunk-JWPE2WC7-DL2sZ8xq.js","assets/mermaid-parser.core-BX15ctWm.js","assets/ganttDiagram-EL5Y4UJY-DyGkH9mL.js","assets/d3-scale-okpWUcMn.js","assets/infoDiagram-27XIBGKW-Bf0m1pFs.js","assets/pieDiagram-E7YTZNPT-m4yruZNh.js","assets/quadrantDiagram-AXDQQJYC-y4L1cf7l.js","assets/xychartDiagram-S5SC5T6Z-CJnigrLu.js","assets/requirementDiagram-BXWQKSXE-CwJ0sNiM.js","assets/sequenceDiagram-WJ2MYXX4-CW_G65sH.js","assets/classDiagram-ZZMXUADV-BfOlT7v5.js","assets/chunk-TICWLB2K-tYRVcQZJ.js","assets/classDiagram-v2-VYDZK3BY-BfOlT7v5.js","assets/stateDiagram-D77RDMKH-CqdLpUep.js","assets/chunk-IMKFNOWR-C-NKFJCn.js","assets/stateDiagram-v2-MP3YSRHH-CZng7GId.js","assets/journeyDiagram-3NMN7TZE-hOGZiS97.js","assets/mindmap-definition-YA3MSWOX-6LNGKzRE.js","assets/kanban-definition-UXKFOSKX-DS-3wdxe.js","assets/sankeyDiagram-P5KCCOFB-Da85_fPb.js","assets/diagram-Z3DM3KII-CJmAyH70.js","assets/diagram-UQ7AKVKN-dmEGfy18.js","assets/blockDiagram-I7D4REHJ-DyavTEyC.js","assets/diagram-S7CK7UJ4-BbgOrdTP.js","assets/architectureDiagram-5GKGNRK7-Cz6oQJGV.js","assets/diagram-VSXAHHWV-C1AAi9ds.js","assets/diagram-VX7I27RA-CXE3jVhR.js","assets/wardleyDiagram-VM6X3IG4-ubLr3NNH.js","assets/cynefinDiagram-5FMLGOSQ-B2BjF2Np.js","assets/railroadDiagram-O6MQD6OU-BxEd5py5.js","assets/chunk-SVP7TREG-CykZJApb.js","assets/ebnfDiagram-PWID7BFC-BfTsv3U-.js","assets/abnfDiagram-VCTEODGH-C49HvP8-.js","assets/pegDiagram-XKGWAZYB-DtH9gLh9.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{_ as e,g as t,u as n}from"./index-DZKge1Ex.js";var r=Object.defineProperty,i=(e,t)=>r(e,`name`,{value:t,configurable:!0}),a=(e,t)=>{for(var n in t)r(e,n,{get:t[n],enumerable:!0})},o=t(((e,t,n)=>{var r;(function(n,i){typeof e==`object`&&t!==void 0?t.exports=i():typeof r==`function`&&r.amd?r(i):(n=typeof globalThis<`u`?globalThis:n||self).dayjs=i()})(n,(function(){var e=1e3,t=6e4,n=36e5,r=`millisecond`,i=`second`,a=`minute`,o=`hour`,s=`day`,c=`week`,l=`month`,u=`quarter`,d=`year`,f=`date`,p=`Invalid Date`,m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,h=/\[([^\]]+)]|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,g={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 t=[`th`,`st`,`nd`,`rd`],n=e%100;return`[`+e+(t[(n-20)%10]||t[n]||t[0])+`]`}},_=function(e,t,n){var r=String(e);return!r||r.length>=t?e:``+Array(t+1-r.length).join(n)+e},v={s:_,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),r=Math.floor(n/60),i=n%60;return(t<=0?`+`:`-`)+_(r,2,`0`)+`:`+_(i,2,`0`)},m:function e(t,n){if(t.date()<n.date())return-e(n,t);var r=12*(n.year()-t.year())+(n.month()-t.month()),i=t.clone().add(r,l),a=n-i<0,o=t.clone().add(r+(a?-1:1),l);return+(-(r+(n-i)/(a?i-o:o-i))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:l,y:d,w:c,d:s,D:f,h:o,m:a,s:i,ms:r,Q:u}[e]||String(e||``).toLowerCase().replace(/s$/,``)},u:function(e){return e===void 0}},y=`en`,b={};b[y]=g;var x=`$isDayjsObject`,S=function(e){return e instanceof E||!(!e||!e[x])},C=function e(t,n,r){var i;if(!t)return y;if(typeof t==`string`){var a=t.toLowerCase();b[a]&&(i=a),n&&(b[a]=n,i=a);var o=t.split(`-`);if(!i&&o.length>1)return e(o[0])}else{var s=t.name;b[s]=t,i=s}return!r&&i&&(y=i),i||!r&&y},w=function(e,t){if(S(e))return e.clone();var n=typeof t==`object`?t:{};return n.date=e,n.args=arguments,new E(n)},T=v;T.l=C,T.i=S,T.w=function(e,t){return w(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var E=function(){function g(e){this.$L=C(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[x]=!0}var _=g.prototype;return _.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(t===null)return new Date(NaN);if(T.u(t))return new Date;if(t instanceof Date)return new Date(t);if(typeof t==`string`&&!/Z$/i.test(t)){var r=t.match(m);if(r){var i=r[2]-1||0,a=(r[7]||`0`).substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)}}return new Date(t)}(e),this.init()},_.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},_.$utils=function(){return T},_.isValid=function(){return this.$d.toString()!==p},_.isSame=function(e,t){var n=w(e);return this.startOf(t)<=n&&n<=this.endOf(t)},_.isAfter=function(e,t){return w(e)<this.startOf(t)},_.isBefore=function(e,t){return this.endOf(t)<w(e)},_.$g=function(e,t,n){return T.u(e)?this[t]:this.set(n,e)},_.unix=function(){return Math.floor(this.valueOf()/1e3)},_.valueOf=function(){return this.$d.getTime()},_.startOf=function(e,t){var n=this,r=!!T.u(t)||t,u=T.p(e),p=function(e,t){var i=T.w(n.$u?Date.UTC(n.$y,t,e):new Date(n.$y,t,e),n);return r?i:i.endOf(s)},m=function(e,t){return T.w(n.toDate()[e].apply(n.toDate(`s`),(r?[0,0,0,0]:[23,59,59,999]).slice(t)),n)},h=this.$W,g=this.$M,_=this.$D,v=`set`+(this.$u?`UTC`:``);switch(u){case d:return r?p(1,0):p(31,11);case l:return r?p(1,g):p(0,g+1);case c:var y=this.$locale().weekStart||0,b=(h<y?h+7:h)-y;return p(r?_-b:_+(6-b),g);case s:case f:return m(v+`Hours`,0);case o:return m(v+`Minutes`,1);case a:return m(v+`Seconds`,2);case i:return m(v+`Milliseconds`,3);default:return this.clone()}},_.endOf=function(e){return this.startOf(e,!1)},_.$set=function(e,t){var n,c=T.p(e),u=`set`+(this.$u?`UTC`:``),p=(n={},n[s]=u+`Date`,n[f]=u+`Date`,n[l]=u+`Month`,n[d]=u+`FullYear`,n[o]=u+`Hours`,n[a]=u+`Minutes`,n[i]=u+`Seconds`,n[r]=u+`Milliseconds`,n)[c],m=c===s?this.$D+(t-this.$W):t;if(c===l||c===d){var h=this.clone().set(f,1);h.$d[p](m),h.init(),this.$d=h.set(f,Math.min(this.$D,h.daysInMonth())).$d}else p&&this.$d[p](m);return this.init(),this},_.set=function(e,t){return this.clone().$set(e,t)},_.get=function(e){return this[T.p(e)]()},_.add=function(r,u){var f,p=this;r=Number(r);var m=T.p(u),h=function(e){var t=w(p);return T.w(t.date(t.date()+Math.round(e*r)),p)};if(m===l)return this.set(l,this.$M+r);if(m===d)return this.set(d,this.$y+r);if(m===s)return h(1);if(m===c)return h(7);var g=(f={},f[a]=t,f[o]=n,f[i]=e,f)[m]||1,_=this.$d.getTime()+r*g;return T.w(_,this)},_.subtract=function(e,t){return this.add(-1*e,t)},_.format=function(e){var t=this,n=this.$locale();if(!this.isValid())return n.invalidDate||p;var r=e||`YYYY-MM-DDTHH:mm:ssZ`,i=T.z(this),a=this.$H,o=this.$m,s=this.$M,c=n.weekdays,l=n.months,u=n.meridiem,d=function(e,n,i,a){return e&&(e[n]||e(t,r))||i[n].slice(0,a)},f=function(e){return T.s(a%12||12,e,`0`)},m=u||function(e,t,n){var r=e<12?`AM`:`PM`;return n?r.toLowerCase():r};return r.replace(h,(function(e,r){return r||function(e){switch(e){case`YY`:return String(t.$y).slice(-2);case`YYYY`:return T.s(t.$y,4,`0`);case`M`:return s+1;case`MM`:return T.s(s+1,2,`0`);case`MMM`:return d(n.monthsShort,s,l,3);case`MMMM`:return d(l,s);case`D`:return t.$D;case`DD`:return T.s(t.$D,2,`0`);case`d`:return String(t.$W);case`dd`:return d(n.weekdaysMin,t.$W,c,2);case`ddd`:return d(n.weekdaysShort,t.$W,c,3);case`dddd`:return c[t.$W];case`H`:return String(a);case`HH`:return T.s(a,2,`0`);case`h`:return f(1);case`hh`:return f(2);case`a`:return m(a,o,!0);case`A`:return m(a,o,!1);case`m`:return String(o);case`mm`:return T.s(o,2,`0`);case`s`:return String(t.$s);case`ss`:return T.s(t.$s,2,`0`);case`SSS`:return T.s(t.$ms,3,`0`);case`Z`:return i}return null}(e)||i.replace(`:`,``)}))},_.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},_.diff=function(r,f,p){var m,h=this,g=T.p(f),_=w(r),v=(_.utcOffset()-this.utcOffset())*t,y=this-_,b=function(){return T.m(h,_)};switch(g){case d:m=b()/12;break;case l:m=b();break;case u:m=b()/3;break;case c:m=(y-v)/6048e5;break;case s:m=(y-v)/864e5;break;case o:m=y/n;break;case a:m=y/t;break;case i:m=y/e;break;default:m=y}return p?m:T.a(m)},_.daysInMonth=function(){return this.endOf(l).$D},_.$locale=function(){return b[this.$L]},_.locale=function(e,t){if(!e)return this.$L;var n=this.clone(),r=C(e,t,!0);return r&&(n.$L=r),n},_.clone=function(){return T.w(this.$d,this)},_.toDate=function(){return new Date(this.valueOf())},_.toJSON=function(){return this.isValid()?this.toISOString():null},_.toISOString=function(){return this.$d.toISOString()},_.toString=function(){return this.$d.toUTCString()},g}(),D=E.prototype;return w.prototype=D,[[`$ms`,r],[`$s`,i],[`$m`,a],[`$H`,o],[`$W`,s],[`$M`,l],[`$y`,d],[`$D`,f]].forEach((function(e){D[e[1]]=function(t){return this.$g(t,e[0],e[1])}})),w.extend=function(e,t){return e.$i||=(e(t,E,w),!0),w},w.locale=C,w.isDayjs=S,w.unix=function(e){return w(1e3*e)},w.en=b[y],w.Ls=b,w.p={},w}))})),s=e(o(),1),c={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},l={trace:i((...e)=>{},`trace`),debug:i((...e)=>{},`debug`),info:i((...e)=>{},`info`),warn:i((...e)=>{},`warn`),error:i((...e)=>{},`error`),fatal:i((...e)=>{},`fatal`)},u=i(function(e=`fatal`){let t=c.fatal;typeof e==`string`?e.toLowerCase()in c&&(t=c[e]):typeof e==`number`&&(t=e),l.trace=()=>{},l.debug=()=>{},l.info=()=>{},l.warn=()=>{},l.error=()=>{},l.fatal=()=>{},t<=c.fatal&&(l.fatal=console.error?console.error.bind(console,d(`FATAL`),`color: orange`):console.log.bind(console,`\x1B[35m`,d(`FATAL`))),t<=c.error&&(l.error=console.error?console.error.bind(console,d(`ERROR`),`color: orange`):console.log.bind(console,`\x1B[31m`,d(`ERROR`))),t<=c.warn&&(l.warn=console.warn?console.warn.bind(console,d(`WARN`),`color: orange`):console.log.bind(console,`\x1B[33m`,d(`WARN`))),t<=c.info&&(l.info=console.info?console.info.bind(console,d(`INFO`),`color: lightblue`):console.log.bind(console,`\x1B[34m`,d(`INFO`))),t<=c.debug&&(l.debug=console.debug?console.debug.bind(console,d(`DEBUG`),`color: lightgreen`):console.log.bind(console,`\x1B[32m`,d(`DEBUG`))),t<=c.trace&&(l.trace=console.debug?console.debug.bind(console,d(`TRACE`),`color: lightgreen`):console.log.bind(console,`\x1B[32m`,d(`TRACE`)))},`setLogLevel`),d=i(e=>`%c${(0,s.default)().format(`ss.SSS`)} : ${e} : `,`format`),f={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=>{let t=e/255;return e>.03928?((t+.055)/1.055)**2.4:t/12.92},hue2rgb:(e,t,n)=>(n<0&&(n+=1),n>1&&--n,n<1/6?e+(t-e)*6*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e),hsl2rgb:({h:e,s:t,l:n},r)=>{if(!t)return n*2.55;e/=360,t/=100,n/=100;let i=n<.5?n*(1+t):n+t-n*t,a=2*n-i;switch(r){case`r`:return f.hue2rgb(a,i,e+1/3)*255;case`g`:return f.hue2rgb(a,i,e)*255;case`b`:return f.hue2rgb(a,i,e-1/3)*255}},rgb2hsl:({r:e,g:t,b:n},r)=>{e/=255,t/=255,n/=255;let i=Math.max(e,t,n),a=Math.min(e,t,n),o=(i+a)/2;if(r===`l`)return o*100;if(i===a)return 0;let s=i-a,c=o>.5?s/(2-i-a):s/(i+a);if(r===`s`)return c*100;switch(i){case e:return((t-n)/s+(t<n?6:0))*60;case t:return((n-e)/s+2)*60;case n:return((e-t)/s+4)*60;default:return-1}}},p={channel:f,lang:{clamp:(e,t,n)=>t>n?Math.min(t,Math.max(n,e)):Math.min(n,Math.max(t,e)),round:e=>Math.round(e*1e10)/1e10},unit:{dec2hex:e=>{let t=Math.round(e).toString(16);return t.length>1?t:`0${t}`}}},m={};for(let e=0;e<=255;e++)m[e]=p.unit.dec2hex(e);var h={ALL:0,RGB:1,HSL:2},g=class{constructor(){this.type=h.ALL}get(){return this.type}set(e){if(this.type&&this.type!==e)throw Error(`Cannot change both RGB and HSL channels at the same time`);this.type=e}reset(){this.type=h.ALL}is(e){return this.type===e}},_=new class{constructor(e,t){this.color=t,this.changed=!1,this.data=e,this.type=new g}set(e,t){return this.color=t,this.changed=!1,this.data=e,this.type.type=h.ALL,this}_ensureHSL(){let e=this.data,{h:t,s:n,l:r}=e;t===void 0&&(e.h=p.channel.rgb2hsl(e,`h`)),n===void 0&&(e.s=p.channel.rgb2hsl(e,`s`)),r===void 0&&(e.l=p.channel.rgb2hsl(e,`l`))}_ensureRGB(){let e=this.data,{r:t,g:n,b:r}=e;t===void 0&&(e.r=p.channel.hsl2rgb(e,`r`)),n===void 0&&(e.g=p.channel.hsl2rgb(e,`g`)),r===void 0&&(e.b=p.channel.hsl2rgb(e,`b`))}get r(){let e=this.data,t=e.r;return!this.type.is(h.HSL)&&t!==void 0?t:(this._ensureHSL(),p.channel.hsl2rgb(e,`r`))}get g(){let e=this.data,t=e.g;return!this.type.is(h.HSL)&&t!==void 0?t:(this._ensureHSL(),p.channel.hsl2rgb(e,`g`))}get b(){let e=this.data,t=e.b;return!this.type.is(h.HSL)&&t!==void 0?t:(this._ensureHSL(),p.channel.hsl2rgb(e,`b`))}get h(){let e=this.data,t=e.h;return!this.type.is(h.RGB)&&t!==void 0?t:(this._ensureRGB(),p.channel.rgb2hsl(e,`h`))}get s(){let e=this.data,t=e.s;return!this.type.is(h.RGB)&&t!==void 0?t:(this._ensureRGB(),p.channel.rgb2hsl(e,`s`))}get l(){let e=this.data,t=e.l;return!this.type.is(h.RGB)&&t!==void 0?t:(this._ensureRGB(),p.channel.rgb2hsl(e,`l`))}get a(){return this.data.a}set r(e){this.type.set(h.RGB),this.changed=!0,this.data.r=e}set g(e){this.type.set(h.RGB),this.changed=!0,this.data.g=e}set b(e){this.type.set(h.RGB),this.changed=!0,this.data.b=e}set h(e){this.type.set(h.HSL),this.changed=!0,this.data.h=e}set s(e){this.type.set(h.HSL),this.changed=!0,this.data.s=e}set l(e){this.type.set(h.HSL),this.changed=!0,this.data.l=e}set a(e){this.changed=!0,this.data.a=e}}({r:0,g:0,b:0,a:0},`transparent`),v={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:e=>{if(e.charCodeAt(0)!==35)return;let t=e.match(v.re);if(!t)return;let n=t[1],r=parseInt(n,16),i=n.length,a=i%4==0,o=i>4,s=o?1:17,c=o?8:4,l=a?0:-1,u=o?255:15;return _.set({r:(r>>c*(l+3)&u)*s,g:(r>>c*(l+2)&u)*s,b:(r>>c*(l+1)&u)*s,a:a?(r&u)*s/255:1},e)},stringify:e=>{let{r:t,g:n,b:r,a:i}=e;return i<1?`#${m[Math.round(t)]}${m[Math.round(n)]}${m[Math.round(r)]}${m[Math.round(i*255)]}`:`#${m[Math.round(t)]}${m[Math.round(n)]}${m[Math.round(r)]}`}},y={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=>{let t=e.match(y.hueRe);if(t){let[,e,n]=t;switch(n){case`grad`:return p.channel.clamp.h(parseFloat(e)*.9);case`rad`:return p.channel.clamp.h(parseFloat(e)*180/Math.PI);case`turn`:return p.channel.clamp.h(parseFloat(e)*360)}}return p.channel.clamp.h(parseFloat(e))},parse:e=>{let t=e.charCodeAt(0);if(t!==104&&t!==72)return;let n=e.match(y.re);if(!n)return;let[,r,i,a,o,s]=n;return _.set({h:y._hue2deg(r),s:p.channel.clamp.s(parseFloat(i)),l:p.channel.clamp.l(parseFloat(a)),a:o?p.channel.clamp.a(s?parseFloat(o)/100:parseFloat(o)):1},e)},stringify:e=>{let{h:t,s:n,l:r,a:i}=e;return i<1?`hsla(${p.lang.round(t)}, ${p.lang.round(n)}%, ${p.lang.round(r)}%, ${i})`:`hsl(${p.lang.round(t)}, ${p.lang.round(n)}%, ${p.lang.round(r)}%)`}},b={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();let t=b.colors[e];if(t)return v.parse(t)},stringify:e=>{let t=v.stringify(e);for(let e in b.colors)if(b.colors[e]===t)return e}},x={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=>{let t=e.charCodeAt(0);if(t!==114&&t!==82)return;let n=e.match(x.re);if(!n)return;let[,r,i,a,o,s,c,l,u]=n;return _.set({r:p.channel.clamp.r(i?parseFloat(r)*2.55:parseFloat(r)),g:p.channel.clamp.g(o?parseFloat(a)*2.55:parseFloat(a)),b:p.channel.clamp.b(c?parseFloat(s)*2.55:parseFloat(s)),a:l?p.channel.clamp.a(u?parseFloat(l)/100:parseFloat(l)):1},e)},stringify:e=>{let{r:t,g:n,b:r,a:i}=e;return i<1?`rgba(${p.lang.round(t)}, ${p.lang.round(n)}, ${p.lang.round(r)}, ${p.lang.round(i)})`:`rgb(${p.lang.round(t)}, ${p.lang.round(n)}, ${p.lang.round(r)})`}},S={format:{keyword:b,hex:v,rgb:x,rgba:x,hsl:y,hsla:y},parse:e=>{if(typeof e!=`string`)return e;let t=v.parse(e)||x.parse(e)||y.parse(e)||b.parse(e);if(t)return t;throw Error(`Unsupported color format: "${e}"`)},stringify:e=>!e.changed&&e.color?e.color:e.type.is(h.HSL)||e.data.r===void 0?y.stringify(e):e.a<1||!Number.isInteger(e.r)||!Number.isInteger(e.g)||!Number.isInteger(e.b)?x.stringify(e):v.stringify(e)},C=(e,t)=>{let n=S.parse(e);for(let e in t)n[e]=p.channel.clamp[e](t[e]);return S.stringify(n)},w=(e,t,n=0,r=1)=>{if(typeof e!=`number`)return C(e,{a:t});let i=_.set({r:p.channel.clamp.r(e),g:p.channel.clamp.g(t),b:p.channel.clamp.b(n),a:p.channel.clamp.a(r)});return S.stringify(i)},T=e=>{let{r:t,g:n,b:r}=S.parse(e),i=.2126*p.channel.toLinear(t)+.7152*p.channel.toLinear(n)+.0722*p.channel.toLinear(r);return p.lang.round(i)},E=e=>T(e)>=.5,D=e=>!E(e),O=(e,t,n)=>{let r=S.parse(e),i=r[t],a=p.channel.clamp[t](i+n);return i!==a&&(r[t]=a),S.stringify(r)},k=(e,t)=>O(e,`l`,t),A=(e,t)=>O(e,`l`,-t),j=(e,t)=>{let n=S.parse(e),r={};for(let e in t)t[e]&&(r[e]=n[e]+t[e]);return C(e,r)},ee=(e,t,n=50)=>{let{r,g:i,b:a,a:o}=S.parse(e),{r:s,g:c,b:l,a:u}=S.parse(t),d=n/100,f=d*2-1,p=o-u,m=((f*p===-1?f:(f+p)/(1+f*p))+1)/2,h=1-m;return w(r*m+s*h,i*m+c*h,a*m+l*h,o*d+u*(1-d))},M=(e,t=100)=>{let n=S.parse(e);return n.r=255-n.r,n.g=255-n.g,n.b=255-n.b,ee(n,e,t)};function te(e,t){this.v=e,this.k=t}function N(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function P(e){if(Array.isArray(e))return e}function ne(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function re(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
3
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function F(e,t){return P(e)||ne(e,t)||ie(e,t)||re()}function ie(e,t){if(e){if(typeof e==`string`)return N(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?N(e,t):void 0}}function ae(e){var t,n;function r(t,n){try{var a=e[t](n),o=a.value,s=o instanceof te;Promise.resolve(s?o.v:o).then(function(n){if(s){var c=t===`return`&&o.k?t:`next`;if(!o.k||n.done)return r(c,n);n=e[c](n).value}i(!!a.done,n)},function(e){r(`throw`,e)})}catch(e){i(2,e)}}function i(e,i){e===2?t.reject(i):t.resolve({value:i,done:e}),(t=t.next)?r(t.key,t.arg):n=null}this._invoke=function(e,i){return new Promise(function(a,o){var s={key:e,arg:i,resolve:a,reject:o,next:null};n?n=n.next=s:(t=n=s,r(e,i))})},typeof e.return!=`function`&&(this.return=void 0)}ae.prototype[typeof Symbol==`function`&&Symbol.asyncIterator||`@@asyncIterator`]=function(){return this},ae.prototype.next=function(e){return this._invoke(`next`,e)},ae.prototype.throw=function(e){return this._invoke(`throw`,e)},ae.prototype.return=function(e){return this._invoke(`return`,e)};var oe=Object.entries,se=Object.keys,ce=Object.setPrototypeOf,le=Object.isFrozen,ue=Object.getPrototypeOf,de=Object.getOwnPropertyDescriptor,fe=Object.freeze,pe=Object.seal,me=Object.create,he=typeof Reflect<`u`&&Reflect,ge=he.apply,_e=he.construct;fe||=function(e){return e},pe||=function(e){return e},ge||=function(e,t){var n=[...arguments].slice(2);return e.apply(t,n)},_e||=function(e){return new e(...[...arguments].slice(1))};var ve=I(Array.prototype.forEach),ye=I(Array.prototype.lastIndexOf),be=I(Array.prototype.pop),xe=I(Array.prototype.push),Se=I(Array.prototype.slice),Ce=I(Array.prototype.splice),we=Array.isArray,Te=qe(Set),Ee=I(Set.prototype.add),De=I(Set.prototype.has),Oe=I(Set.prototype.delete),ke=qe(Map),Ae=I(Map.prototype.get),je=I(Map.prototype.set),Me=I(String.prototype.toLowerCase),Ne=I(String.prototype.toString),Pe=I(String.prototype.match),Fe=I(String.prototype.replace),Ie=I(String.prototype.indexOf),Le=I(String.prototype.trim),Re=I(Number.prototype.toString),ze=I(Boolean.prototype.toString),Be=typeof BigInt>`u`?null:I(BigInt.prototype.toString),Ve=typeof Symbol>`u`?null:I(Symbol.prototype.toString),He=I(Object.prototype.hasOwnProperty),Ue=I(Object.prototype.toString),We=RegExp.prototype.test,Ge=function(e,t){return e instanceof RegExp&&(e.lastIndex=0),ge(We,e,[t])},Ke=qe(TypeError);function I(e){return function(t){var n=[...arguments].slice(1);return ge(e,t,n)}}function qe(e){return function(){return _e(e,[...arguments])}}function L(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Me;if(ce&&ce(e,null),!we(t))return e;let r=t.length;for(;r--;){let i=t[r];if(typeof i==`string`){let e=n(i);e!==i&&(le(t)||(t[r]=e),i=e)}e[i]=!0}return e}function Je(e){for(let t=0;t<e.length;t++)He(e,t)||(e[t]=null);return e}function Ye(e){let t=me(null);for(let r of oe(e)){var n=F(r,2);let i=n[0],a=n[1];He(e,i)&&(t[i]=we(a)?Je(a):a&&typeof a==`object`&&a.constructor===Object?Ye(a):a)}return t}function Xe(e){let t=me(null),n=se(e),r=n.length;for(;r--;)t[n[r]]=e[n[r]];return t}function Ze(e){switch(typeof e){case`string`:return e;case`number`:return Re(e);case`boolean`:return ze(e);case`bigint`:return Be?Be(e):`0`;case`symbol`:return Ve?Ve(e):`Symbol()`;case`undefined`:return Ue(e);case`function`:case`object`:{if(e===null)return Ue(e);let t=e,n=Qe(t,`toString`);if(typeof n==`function`){let e=n(t);return typeof e==`string`?e:Ue(e)}return Ue(e)}default:return Ue(e)}}function Qe(e,t){for(;e!==null;){let n=de(e,t);if(n){if(n.get)return I(n.get);if(typeof n.value==`function`)return I(n.value)}e=ue(e)}function n(){return null}return n}function $e(e,t){for(;e!==null;){let n=de(e,t);if(n)return n.get?I(n.get):null;e=ue(e)}return null}function et(e){if(!e)return!1;try{return Ge(e,``),!0}catch{return!1}}var tt=fe(`a.abbr.acronym.address.area.article.aside.audio.b.bdi.bdo.big.blink.blockquote.body.br.button.canvas.caption.center.cite.code.col.colgroup.content.data.datalist.dd.decorator.del.details.dfn.dialog.dir.div.dl.dt.element.em.fieldset.figcaption.figure.font.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.img.input.ins.kbd.label.legend.li.main.map.mark.marquee.menu.menuitem.meter.nav.nobr.ol.optgroup.option.output.p.picture.pre.progress.q.rp.rt.ruby.s.samp.search.section.select.shadow.slot.small.source.spacer.span.strike.strong.style.sub.summary.sup.table.tbody.td.template.textarea.tfoot.th.thead.time.tr.track.tt.u.ul.var.video.wbr`.split(`.`)),nt=fe(`svg.a.altglyph.altglyphdef.altglyphitem.animatecolor.animatemotion.animatetransform.circle.clippath.defs.desc.ellipse.filter.font.g.glyph.glyphref.hkern.image.line.lineargradient.marker.mask.metadata.mpath.path.pattern.polygon.polyline.radialgradient.rect.stop.style.switch.symbol.text.textpath.title.tref.tspan.view.vkern`.split(`.`)),rt=fe([`feBlend`,`feColorMatrix`,`feComponentTransfer`,`feComposite`,`feConvolveMatrix`,`feDiffuseLighting`,`feDisplacementMap`,`feDistantLight`,`feDropShadow`,`feFlood`,`feFuncA`,`feFuncB`,`feFuncG`,`feFuncR`,`feGaussianBlur`,`feImage`,`feMerge`,`feMergeNode`,`feMorphology`,`feOffset`,`fePointLight`,`feSpecularLighting`,`feSpotLight`,`feTile`,`feTurbulence`]),it=fe([`animate`,`color-profile`,`cursor`,`discard`,`font-face`,`font-face-format`,`font-face-name`,`font-face-src`,`font-face-uri`,`foreignobject`,`hatch`,`hatchpath`,`mesh`,`meshgradient`,`meshpatch`,`meshrow`,`missing-glyph`,`script`,`set`,`solidcolor`,`unknown`,`use`]),at=fe(`math.menclose.merror.mfenced.mfrac.mglyph.mi.mlabeledtr.mmultiscripts.mn.mo.mover.mpadded.mphantom.mroot.mrow.ms.mspace.msqrt.mstyle.msub.msup.msubsup.mtable.mtd.mtext.mtr.munder.munderover.mprescripts`.split(`.`)),ot=fe([`maction`,`maligngroup`,`malignmark`,`mlongdiv`,`mscarries`,`mscarry`,`msgroup`,`mstack`,`msline`,`msrow`,`semantics`,`annotation`,`annotation-xml`,`mprescripts`,`none`]),st=fe([`#text`]),ct=fe(`accept.action.align.alt.autocapitalize.autocomplete.autopictureinpicture.autoplay.background.bgcolor.border.capture.cellpadding.cellspacing.checked.cite.class.clear.color.cols.colspan.command.commandfor.controls.controlslist.coords.crossorigin.datetime.decoding.default.dir.disabled.disablepictureinpicture.disableremoteplayback.download.draggable.enctype.enterkeyhint.exportparts.face.for.headers.height.hidden.high.href.hreflang.id.inert.inputmode.integrity.ismap.kind.label.lang.list.loading.loop.low.max.maxlength.media.method.min.minlength.multiple.muted.name.nonce.noshade.novalidate.nowrap.open.optimum.part.pattern.placeholder.playsinline.popover.popovertarget.popovertargetaction.poster.preload.pubdate.radiogroup.readonly.rel.required.rev.reversed.role.rows.rowspan.spellcheck.scope.selected.shape.size.sizes.slot.span.srclang.start.src.srcset.step.style.summary.tabindex.title.translate.type.usemap.valign.value.width.wrap.xmlns`.split(`.`)),lt=fe(`accent-height.accumulate.additive.alignment-baseline.amplitude.ascent.attributename.attributetype.azimuth.basefrequency.baseline-shift.begin.bias.by.class.clip.clippathunits.clip-path.clip-rule.color.color-interpolation.color-interpolation-filters.color-profile.color-rendering.cx.cy.d.dx.dy.diffuseconstant.direction.display.divisor.dominant-baseline.dur.edgemode.elevation.end.exponent.fill.fill-opacity.fill-rule.filter.filterunits.flood-color.flood-opacity.font-family.font-size.font-size-adjust.font-stretch.font-style.font-variant.font-weight.fx.fy.g1.g2.glyph-name.glyphref.gradientunits.gradienttransform.height.href.id.image-rendering.in.in2.intercept.k.k1.k2.k3.k4.kerning.keypoints.keysplines.keytimes.lang.lengthadjust.letter-spacing.kernelmatrix.kernelunitlength.lighting-color.local.marker-end.marker-mid.marker-start.markerheight.markerunits.markerwidth.maskcontentunits.maskunits.max.mask.mask-type.media.method.mode.min.name.numoctaves.offset.operator.opacity.order.orient.orientation.origin.overflow.paint-order.path.pathlength.patterncontentunits.patterntransform.patternunits.pointer-events.points.preservealpha.preserveaspectratio.primitiveunits.r.rx.ry.radius.refx.refy.repeatcount.repeatdur.restart.result.rotate.scale.seed.shape-rendering.slope.specularconstant.specularexponent.spreadmethod.startoffset.stddeviation.stitchtiles.stop-color.stop-opacity.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke.stroke-width.style.surfacescale.systemlanguage.tabindex.tablevalues.targetx.targety.transform.transform-origin.text-anchor.text-decoration.text-orientation.text-rendering.textlength.type.u1.u2.unicode.values.vector-effect.viewbox.visibility.version.vert-adv-y.vert-origin-x.vert-origin-y.width.word-spacing.wrap.writing-mode.xchannelselector.ychannelselector.x.x1.x2.xmlns.y.y1.y2.z.zoomandpan`.split(`.`)),ut=fe(`accent.accentunder.align.bevelled.close.columnalign.columnlines.columnspacing.columnspan.denomalign.depth.dir.display.displaystyle.encoding.fence.frame.height.href.id.largeop.length.linethickness.lquote.lspace.mathbackground.mathcolor.mathsize.mathvariant.maxsize.minsize.movablelimits.notation.numalign.open.rowalign.rowlines.rowspacing.rowspan.rspace.rquote.scriptlevel.scriptminsize.scriptsizemultiplier.selection.separator.separators.stretchy.subscriptshift.supscriptshift.symmetric.voffset.width.xmlns`.split(`.`)),dt=fe([`xlink:href`,`xml:id`,`xlink:title`,`xml:space`,`xmlns:xlink`]),ft=pe(/{{[\w\W]*|^[\w\W]*}}/g),pt=pe(/<%[\w\W]*|^[\w\W]*%>/g),mt=pe(/\${[\w\W]*/g),ht=pe(/{{|}}|\${|<%|%>/),gt=pe(/[^\t\n\f\r ]/),_t=pe(/\u0000/g),vt=pe(/^data-[\-\w.\u00B7-\uFFFF]+$/),yt=pe(/^aria-[\-\w]+$/),bt=pe(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),xt=pe(/^(?:\w+script|data):/i),St=pe(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Ct=pe(/^html$/i),wt=pe(/^[a-z][.\w]*(-[.\w]+)+$/i),Tt=pe(/<[/\w!]/g),Et=pe(/<[/\w]/g),Dt=pe(/<[/\w]|^-?>|--!?>|<!-$/g),Ot=pe(/<\/no(script|embed|frames)/i),kt=pe(/\/>/i),At=pe(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i),jt=pe(/^[\r\n\t ]+/),Mt={element:1,text:3,processingInstruction:7,comment:8,document:9,documentFragment:11},Nt=fe(L({},[`style`,`script`,`xmp`,`iframe`,`noembed`,`noframes`,`plaintext`,`noscript`])),Pt=fe(L({},[`textarea`,`title`])),Ft=fe(L({},[`area`,`base`,`basefont`,`bgsound`,`br`,`col`,`embed`,`frame`,`hr`,`img`,`input`,`keygen`,`link`,`meta`,`param`,`source`,`track`,`wbr`])),It=function(){return typeof window>`u`?null:window},Lt=function(e,t){if(typeof e!=`object`||typeof e.createPolicy!=`function`)return null;let n=null,r=`data-tt-policy-suffix`;t&&t.hasAttribute(r)&&(n=t.getAttribute(r));let i=`dompurify`+(n?`#`+n:``);try{return e.createPolicy(i,{createHTML(e){return e},createScriptURL(e){return e}})}catch{return console.warn(`TrustedTypes policy `+i+` could not be created.`),null}},Rt=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},zt=function(e,t,n,r){return He(e,t)&&we(e[t])?L(r.base?Xe(r.base):{},e[t],r.transform):n},Bt=function(e,t,n){let r=He(e,t)?e[t]:void 0;return r&&typeof r==`object`?Ye(r):n};function Vt(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:It(),t=e=>Vt(e);if(t.version=`3.5.0`,t.removed=[],!e||!e.document||e.document.nodeType!==Mt.document||!e.Element)return t.isSupported=!1,t;let n=e.document,r=n,i=r.currentScript,a=e.HTMLTemplateElement,o=e.Node,s=e.Element,c=e.NodeFilter,l=e.DOMParser,u=e.trustedTypes,d=s.prototype,f=Qe(d,`cloneNode`),p=Qe(d,`remove`),m=Qe(d,`removeChild`),h=Qe(d,`removeAttributeNode`),g=Qe(d,`nextSibling`),_=Qe(d,`childNodes`),v=Qe(d,`parentNode`),y=Qe(d,`shadowRoot`),b=Qe(d,`attributes`),x=o&&o.prototype?Qe(o.prototype,`nodeType`):null,S=o&&o.prototype?Qe(o.prototype,`nodeName`):null,C=o&&o.prototype?Qe(o.prototype,`ownerDocument`):null,w=function(e){return x?x(e):e.nodeType},T=function(e){return S?S(e):e.nodeName},E=$e(d,`namespaceURI`),D=function(e){return E?E(e):e.namespaceURI},O=function(e){return w(e)===Mt.element?b(e):null};if(typeof a==`function`){let e=n.createElement(`template`);e.content&&e.content.ownerDocument&&(n=e.content.ownerDocument)}let k,A=``,j,ee=!1,M=0,te=function(){if(M>0)throw Ke(`A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.`)},N=function(e){te(),M++;try{return k.createHTML(e)}finally{M--}},P=function(e){return k&&an?N(e):e},ne=function(e){te(),M++;try{return k.createScriptURL(e)}finally{M--}},re=function(){return ee||=(j=Lt(u,i),!0),j},F=n,ie=F.implementation,ae=F.createNodeIterator,se=F.createDocumentFragment,ce=F.getElementsByTagName,le=r.importNode,ue=Rt();t.isSupported=typeof oe==`function`&&typeof v==`function`&&ie&&ie.createHTMLDocument!==void 0;let de=ft,he=pt,ge=mt,_e=vt,Re=yt,ze=xt,Be=St,Ve=wt,Ue=bt,We=null,I=L({},[...tt,...nt,...rt,...at,...st]),qe=null,Je=L({},[...ct,...lt,...ut,...dt]),Ht=null,Ut=null,Wt=null,Gt=Object.seal(me(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),Kt=!0,R=!0,qt=!1,Jt=!0,Yt=!1,Xt=!0,Zt=!1,Qt=!1,$t=null,en=null,tn=!1,nn=!1,rn=!1,an=!1,on=!0,sn=!1,cn=`user-content-`,ln=!0,un=!1,dn=null,fn=null,pn=!1,mn=null,hn=L({},`annotation-xml.audio.colgroup.desc.foreignobject.head.iframe.math.mi.mn.mo.ms.mtext.noembed.noframes.noscript.plaintext.script.selectedcontent.style.svg.template.thead.title.video.xmp`.split(`.`)),gn=null,_n=L({},[`audio`,`video`,`img`,`source`,`image`,`track`]),vn=null,yn=L({},[`alt`,`class`,`for`,`id`,`label`,`name`,`pattern`,`placeholder`,`role`,`summary`,`title`,`value`,`style`,`xmlns`]),bn=`http://www.w3.org/1998/Math/MathML`,xn=`http://www.w3.org/2000/svg`,Sn=`http://www.w3.org/1999/xhtml`,Cn=Sn,wn=!1,Tn=null,En=L({},[bn,xn,Sn],Ne),Dn=fe(L({},[`mi`,`mo`,`mn`,`ms`,`mtext`])),On=null,kn=fe(L({},[`annotation-xml`])),An=null,jn=fe(me(null)),Mn=L({},[`title`,`style`,`font`,`a`,`script`]),Nn=null,Pn=[`application/xhtml+xml`,`text/html`],Fn=null,In=null,z=null,Ln=n.createElement(`form`),Rn=function(e){return e instanceof RegExp||e instanceof Function},zn=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};e&&typeof e==`object`||(e={}),e=Ye(e),Nn=Pn.indexOf(e.PARSER_MEDIA_TYPE)===-1?`text/html`:e.PARSER_MEDIA_TYPE,Fn=Nn===`application/xhtml+xml`?Ne:Me,We=zt(e,`ALLOWED_TAGS`,I,{transform:Fn}),qe=zt(e,`ALLOWED_ATTR`,Je,{transform:Fn}),Tn=zt(e,`ALLOWED_NAMESPACES`,En,{transform:Ne}),vn=zt(e,`ADD_URI_SAFE_ATTR`,yn,{transform:Fn,base:yn}),gn=zt(e,`ADD_DATA_URI_TAGS`,_n,{transform:Fn,base:_n}),mn=zt(e,`FORBID_CONTENTS`,hn,{transform:Fn}),Ut=zt(e,`FORBID_TAGS`,me(null),{transform:Fn}),Wt=zt(e,`FORBID_ATTR`,me(null),{transform:Fn}),pn=He(e,`USE_PROFILES`)?e.USE_PROFILES&&typeof e.USE_PROFILES==`object`?Ye(e.USE_PROFILES):e.USE_PROFILES:!1,Kt=e.ALLOW_ARIA_ATTR!==!1,R=e.ALLOW_DATA_ATTR!==!1,qt=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Jt=e.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Yt=e.SAFE_FOR_TEMPLATES||!1,Xt=e.SAFE_FOR_XML!==!1,Zt=e.WHOLE_DOCUMENT||!1,nn=e.RETURN_DOM||!1,rn=e.RETURN_DOM_FRAGMENT||!1,an=e.RETURN_TRUSTED_TYPE||!1,tn=e.FORCE_BODY||!1,on=e.SANITIZE_DOM!==!1,sn=e.SANITIZE_NAMED_PROPS||!1,ln=e.KEEP_CONTENT!==!1,un=e.IN_PLACE||!1,Ue=et(e.ALLOWED_URI_REGEXP)?e.ALLOWED_URI_REGEXP:bt,Cn=typeof e.NAMESPACE==`string`?e.NAMESPACE:Sn,On=Bt(e,`MATHML_TEXT_INTEGRATION_POINTS`,Dn),An=Bt(e,`HTML_INTEGRATION_POINTS`,kn);let t=Bt(e,`CUSTOM_ELEMENT_HANDLING`,jn);if(Ht=me(null),He(t,`tagNameCheck`)&&Rn(t.tagNameCheck)&&(Ht.tagNameCheck=t.tagNameCheck),He(t,`attributeNameCheck`)&&Rn(t.attributeNameCheck)&&(Ht.attributeNameCheck=t.attributeNameCheck),He(t,`allowCustomizedBuiltInElements`)&&typeof t.allowCustomizedBuiltInElements==`boolean`&&(Ht.allowCustomizedBuiltInElements=t.allowCustomizedBuiltInElements),pe(Ht),Yt&&(R=!1),rn&&(nn=!0),pn&&((He(e,`ALLOWED_TAGS`)||He(e,`ALLOWED_ATTR`))&&typeof console<`u`&&typeof console.warn==`function`&&console.warn(`DOMPurify: USE_PROFILES overrides ALLOWED_TAGS and ALLOWED_ATTR. Do not use these options together.`),We=L({},st),qe=me(null),pn.html===!0&&(L(We,tt),L(qe,ct)),pn.svg===!0&&(L(We,nt),L(qe,lt),L(qe,dt)),pn.svgFilters===!0&&(L(We,rt),L(qe,lt),L(qe,dt)),pn.mathMl===!0&&(L(We,at),L(qe,ut),L(qe,dt))),Gt.tagCheck=null,Gt.attributeCheck=null,He(e,`ADD_TAGS`)&&(typeof e.ADD_TAGS==`function`?Gt.tagCheck=e.ADD_TAGS:we(e.ADD_TAGS)&&(We===I&&(We=Xe(We)),L(We,e.ADD_TAGS,Fn))),He(e,`ADD_ATTR`)&&(typeof e.ADD_ATTR==`function`?Gt.attributeCheck=e.ADD_ATTR:we(e.ADD_ATTR)&&(qe===Je&&(qe=Xe(qe)),L(qe,e.ADD_ATTR,Fn))),He(e,`ADD_FORBID_CONTENTS`)&&we(e.ADD_FORBID_CONTENTS)&&(mn===hn&&(mn=Xe(mn)),L(mn,e.ADD_FORBID_CONTENTS,Fn)),ln&&(We[`#text`]=!0),Zt&&L(We,[`html`,`head`,`body`]),We.table&&(We.tbody=!0,delete Ut.tbody),e.TRUSTED_TYPES_POLICY){if(typeof e.TRUSTED_TYPES_POLICY.createHTML!=`function`)throw Ke(`TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.`);if(typeof e.TRUSTED_TYPES_POLICY.createScriptURL!=`function`)throw Ke(`TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.`);let t=k;k=e.TRUSTED_TYPES_POLICY;try{A=N(``)}catch(e){throw k=t,e}}else e.TRUSTED_TYPES_POLICY===null?(k=void 0,A=``):(k===void 0&&(k=re()),k&&typeof A==`string`&&(A=N(``)));In=fe(e)},Bn=L({},[...nt,...rt,...it]),Vn=L({},[...at,...ot]),Hn=function(e,t,n){return t===Sn?e===`svg`:t===bn?e===`svg`&&(n===`annotation-xml`||On[n]):!!Bn[e]},Un=function(e,t,n){return t===Sn?e===`math`:t===xn?e===`math`&&An[n]:!!Vn[e]},Wn=function(e,t,n){return t===xn&&!An[n]||t===bn&&!On[n]?!1:!Vn[e]&&(Mn[e]||!Bn[e])},Gn=function(e){let t=D(e),n=Me(T(e)),r=v(e),i=Cn,a=`template`;return r&&w(r)===Mt.element&&(i=D(r),a=Me(T(r))),Tn[t]?t===xn?Hn(n,i,a):t===bn?Un(n,i,a):t===Sn?Wn(n,i,a):Nn===`application/xhtml+xml`:!1},Kn=function(e){xe(t.removed,{element:e}),or(e);try{v(e).removeChild(e)}catch{if(p(e),!v(e))throw Ke(`a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place`)}},qn=function(e,t,n){try{h(e,t)}catch{try{e.removeAttribute(n)}catch{}}},Jn=function(e){Qn(e);let t=_(e);t&&ve(Se(t),t=>{try{m(e,t)}catch{}}),w(e)===Mt.element&&Xn(e,!1)},Yn=function(e,n,r){if(!r)try{r=n.getAttributeNode(e)}catch{r=null}if(xe(t.removed,{attribute:r||null,from:n}),r)qn(n,r,e);else try{n.removeAttribute(e)}catch{}if(e===`is`){if(nn||rn)try{Kn(n)}catch{}else try{n.setAttribute(e,``)}catch{}}},Xn=function(e,t){let n=b(e);if(n)for(let r=n.length-1;r>=0;--r){let i=n[r],a=i&&i.name;typeof a==`string`&&!(t&&qe[Fn(a)])&&qn(e,i,a)}},Zn=function(e,t){let n=arguments.length>2&&arguments[2]!==void 0&&arguments[2],r=[e];for(;r.length>0;){let e=r.pop();if(t(e)===!1)continue;if(n&&w(e)===Mt.element){let t=y(e);vr(t)&&r.push(t)}let i=_(e);if(i)for(let e=i.length-1;e>=0;--e)r.push(i[e])}},Qn=function(e){Zn(e,e=>{w(e)===Mt.element&&Xn(e,!0)})},$n=function(e){let t=[];return Zn(e,e=>{t.push(e)},!0),t},er=function(e,t){let n=Te();ve($n(e),e=>{w(e)===Mt.element&&Ee(n,e)}),ve(t,e=>{w(e)===Mt.element&&!De(n,e)&&Xn(e,!0)})},tr=function(e,n){let r=!1;return ve(t.removed,t=>{t.element&&(r||=t.element===e,Qn(t.element))}),er(e,n),r},nr=function(e,t){Jn(e),tr(e,t)},rr=function(e,t){let n=dn,r=null,i=()=>(r||(r=Te(),ve(t,e=>{Ee(r,e)})),r);for(let t=0;;t++){let r=$n(e),a=[e],o=!1;if(ve(r,e=>{w(e)===Mt.documentFragment?xe(a,e):!o&&!De(n,e)&&(o=De(i(),e))}),!o)return;if(t>=8)throw Ke(`the tree kept changing during in-place sanitization; refusing to return it`);ve(a,(t,n)=>{ir(t,n>0,e,i())})}},ir=function(e,t,n,r){let i=ur(e),a;for(;a=i.nextNode();)De(r,a)&&!De(dn,a)&&(t&&br(ue.uponSanitizeShadowNode,a,null),Fr(a,n))},ar=function(e){if(!dn)return;Ee(dn,e);let t=Ae(fn,e);if(t!==void 0){if(t>=8)throw Ke(`the tree kept changing during in-place sanitization; refusing to return it`);je(fn,e,t+1)}},or=function(e){dn&&(Oe(dn,e),Ae(fn,e)===void 0&&je(fn,e,0))},sr=function(e,t){return Xt?e===`patchsrc`||e===`for`&&t!==`label`&&t!==`output`:!1},cr=function(e){Xt&&Zn(e,e=>{let t=w(e);if(t===Mt.processingInstruction||t===Mt.comment&&Ge(Et,e.data)){try{p(e)}catch{}return!1}if(t===Mt.element){let t=e,n=Fn(T(e));try{t.hasAttribute&&t.hasAttribute(`patchsrc`)&&t.removeAttribute(`patchsrc`),t.hasAttribute&&t.hasAttribute(`for`)&&sr(`for`,n)&&t.removeAttribute(`for`)}catch{}}return!0})},lr=function(e){let t=null,r=null;if(tn)e=`<remove></remove>`+e;else{let t=Pe(e,jt);r=t&&t[0]}Nn===`application/xhtml+xml`&&Cn===Sn&&(e=`<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>`+e+`</body></html>`);let i=k?N(e):e;if(Cn===Sn)try{t=new l().parseFromString(i,Nn)}catch{}if(!t||!t.documentElement){t=ie.createDocument(Cn,`template`,null);try{t.documentElement.innerHTML=wn?A:i}catch{}}let a=t.body||t.documentElement;return e&&r&&a.insertBefore(n.createTextNode(r),a.childNodes[0]||null),Cn===Sn?ce.call(t,Zt?`html`:`body`)[0]:Zt?t.documentElement:a},ur=function(e){let t=arguments.length>1&&arguments[1]!==void 0&&arguments[1],n=C?C(e):e.ownerDocument;return ae.call(n||e,e,(t?0:c.SHOW_ELEMENT)|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},dr=function(e){return e=Fe(e,de,` `),e=Fe(e,he,` `),e=Fe(e,ge,` `),e},fr=function(e){hr(e);let t=e.querySelectorAll?.call(e,`template`);t&&ve(t,e=>{vr(e.content)&&fr(e.content)})},pr=L({},[`caption`,`colgroup`,`col`,`thead`,`tbody`,`tfoot`,`tr`,`td`,`th`,`style`,`script`,`template`]),mr=function(e){if(Nn===`application/xhtml+xml`)return;let t=e.querySelectorAll?.call(e,`table,tbody,thead,tfoot,tr,colgroup`);t&&t.length!==0&&ve(t,t=>{ve(Se(_(t)),n=>{let r=w(n);if(!(r===Mt.text?Ge(gt,n.data):r===Mt.element&&!pr[Me(T(n))]))return;let i=t;for(;i&&Me(T(i))!==`table`;)i=i===e?null:v(i);let a=i&&i!==e?v(i):null;if(a)try{a.insertBefore(n,i)}catch{}})})},hr=function(e){mr(e),e.normalize();let t=ur(e,!0),n=null,r=t.nextNode();for(;r;){let e=r.data;if(Ge(_t,e)&&(e=Fe(e,_t,``),r.data=e),Ge(ht,e)&&(e=dr(e),r.data=e),e&&w(r)===Mt.text){if(n){let t=n.data;Ge(ht,t[t.length-1]+e[0])&&(n.data=dr(t+e[0]))}n=r}r=t.nextNode()}},gr=function(e){let t=S?S(e):null;return typeof t!=`string`||Fn(t)!==`form`?!1:typeof e.nodeName!=`string`||typeof e.textContent!=`string`||typeof e.removeChild!=`function`||e.attributes!==b(e)||typeof e.removeAttribute!=`function`||typeof e.removeAttributeNode!=`function`||typeof e.getAttributeNode!=`function`||typeof e.setAttribute!=`function`||typeof e.namespaceURI!=`string`||typeof e.insertBefore!=`function`||typeof e.hasChildNodes!=`function`||e.nodeType!==x(e)||e.childNodes!==_(e)},_r=function(e){if(!x||typeof e!=`object`||!e)return null;try{let t=x(e);return typeof t==`number`?t:null}catch{return null}},vr=function(e){return _r(e)===Mt.documentFragment},yr=function(e){return _r(e)!==null};function br(e,n,r){e.length!==0&&ve(e,e=>{e.call(t,n,r,In)})}let xr=function(e,t){let n=!!Ft[t],r=!!Nt[t];return!n&&!r&&!Pt[t]||D(e)!==Sn?!1:n?e.hasChildNodes():yr(e.firstElementChild)?!0:r&&typeof e.textContent==`string`&&Ge(Tt,e.textContent)},Sr=function(e,t,n){return!!(Xt&&n===Mt.element&&e.hasChildNodes()&&!yr(e.firstElementChild)&&Ge(Tt,e.textContent)&&Ge(Tt,e.innerHTML)||Xt&&n===Mt.element&&xr(e,t)||n===Mt.processingInstruction||Xt&&n===Mt.comment&&Ge(Dt,e.data))},Cr=function(e,t){return e instanceof RegExp?Ge(e,t):e instanceof Function&&!!e(t,...[...arguments].slice(2))},wr=function(e,t,n){if(!Ut[t]&&Ar(t)&&Cr(Ht.tagNameCheck,t))return!1;if(ln&&!mn[t]&&!mn[Me(t)]){let t=v(e),r=_(e);if(r&&t){let i=r.length;for(let a=i-1;a>=0;--a){let i=e===n?f(r[a],!0):r[a];t.insertBefore(i,g(e))}}}return Kn(e),!0},Tr=function(e,t,n,r){return e.length===0?t:t===n||t===r?Xe(t):t},Er=function(e,t){return e===t||v(e)!==null?!1:(un&&Qn(e),or(e),!0)},Dr=function(e,n){if(ar(e),br(ue.beforeSanitizeElements,e,null),Er(e,n))return!0;if(gr(e))return Kn(e),!0;let r=Fn(T(e)),i=w(e);if(We=Tr(ue.uponSanitizeElement,We,I,$t),br(ue.uponSanitizeElement,e,{tagName:r,allowedTags:We}),Er(e,n))return!0;if(Sr(e,r,i))return Kn(e),!0;if((Ut[r]||!(Gt.tagCheck instanceof Function&&Gt.tagCheck(r))&&!We[r])&&wr(e,r,n))return!0;if(i===Mt.element&&!Gn(e)||(r===`noscript`||r===`noembed`||r===`noframes`)&&Ge(Ot,e.innerHTML))return Kn(e),!0;if(Yt&&i===Mt.text){let n=e.textContent,r=dr(n);n!==r&&(xe(t.removed,{element:e.cloneNode()}),e.textContent=r)}return br(ue.afterSanitizeElements,e,null),Er(e,n)},Or=function(e,t,r){if(Wt[t]||sr(t,e)||on&&(t===`id`||t===`name`)&&(r in n||r in Ln))return!1;let i=qe[t]||Gt.attributeCheck instanceof Function&&Gt.attributeCheck(t,e);if(R&&Ge(_e,t)||Kt&&Ge(Re,t))return!0;if(!i)return Ar(e)&&Cr(Ht.tagNameCheck,e)&&Cr(Ht.attributeNameCheck,t,e)||t===`is`&&Ht.allowCustomizedBuiltInElements&&Cr(Ht.tagNameCheck,r);if(vn[t])return!0;let a=Fe(r,Be,``);return Ge(Ue,a)||(t===`src`||t===`xlink:href`||t===`href`)&&e!==`script`&&Ie(r,`data:`)===0&&gn[e]||qt&&!Ge(ze,a)?!0:!r},kr=L({},[`annotation-xml`,`color-profile`,`font-face`,`font-face-format`,`font-face-name`,`font-face-src`,`font-face-uri`,`missing-glyph`]),Ar=function(e){return!kr[Me(e)]&&Ge(Ve,e)},jr=function(e,t,n,r){if(k&&typeof u==`object`&&typeof u.getAttributeType==`function`&&!n)switch(u.getAttributeType(e,t)){case`TrustedHTML`:return N(r);case`TrustedScriptURL`:return ne(r)}return r},Mr=function(e,t,n,r){try{return n?e.setAttributeNS(n,t,r):e.setAttribute(t,r),!gr(e)||(Kn(e),!1)}catch{return Yn(t,e),!1}},Nr=function(e,t){return Xt&&Ge(At,t)?!0:Me(e)===`attributename`&&Ie(t,`href`)!==-1},Pr=function(e,n){if(br(ue.beforeSanitizeAttributes,e,null),Er(e,n))return;let r=O(e);if(!r||gr(e))return;qe=Tr(ue.uponSanitizeAttribute,qe,Je,en);let i={attrName:``,attrValue:``,keepAttr:!0,allowedAttributes:qe,forceKeepAttr:void 0},a=r.length,o=Fn(T(e));for(;a--;){let n=r[a];if(!n)continue;let s=n.name,c=n.namespaceURI,l=n.value,u=Fn(s),d=l,f=s===`value`?d:Le(d),p=!1;i.attrName=u,i.attrValue=f,i.keepAttr=!0,i.forceKeepAttr=void 0,br(ue.uponSanitizeAttribute,e,i),f=i.attrValue,sn&&(u===`id`||u===`name`)&&Ie(f,cn)!==0&&(Yn(s,e,n),f=cn+f,p=!0),Nr(s,f)?Yn(s,e,n):i.forceKeepAttr||(i.keepAttr?!Jt&&Ge(kt,f)?Yn(s,e,n):(Yt&&(f=dr(f)),Or(o,u,f)?(f=jr(o,u,c,f),f!==d&&Mr(e,s,c,f)&&p&&be(t.removed)):Yn(s,e,n)):Yn(s,e,n))}br(ue.afterSanitizeAttributes,e,null),Er(e,n)},Fr=function(e,t){Dr(e,t),Pr(e,t),vr(e.content)&&Ir(e.content)},Ir=function(e){let t=null,n=ur(e);for(br(ue.beforeSanitizeShadowDOM,e,null);t=n.nextNode();)if(br(ue.uponSanitizeShadowNode,t,null),Fr(t,e),w(t)===Mt.element){let e=y(t);vr(e)&&(Lr(e),Ir(e))}Yt&&hr(e),br(ue.afterSanitizeShadowDOM,e,null)},Lr=function(e){let t=[{node:e,shadow:null}];for(;t.length>0;){let e=t.pop();if(e.shadow){Ir(e.shadow);continue}let n=e.node,r=w(n)===Mt.element,i=_(n);if(i)for(let e=i.length-1;e>=0;--e)t.push({node:i[e],shadow:null});if(r){let e=S?S(n):null;if(typeof e==`string`&&Fn(e)===`template`){let e=n.content;vr(e)&&t.push({node:e,shadow:null})}}if(r){let e=y(n);vr(e)&&t.push({node:null,shadow:e},{node:e,shadow:null})}}},Rr=function(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=null,a=null,o=null,s=null;if(wn=!e,wn&&(e=`<!-->`),typeof e!=`string`&&!yr(e)&&(e=Ze(e),typeof e!=`string`))throw Ke(`dirty is not a string, aborting`);if(!t.isSupported)return e;Qt?(We=$t,qe=en):zn(n),z=In,t.removed=[];let c=un&&typeof e!=`string`&&yr(e),l=[],u=dn,d=fn;if(c){cr(e),l=$n(e);let t=T(e);if(typeof t==`string`){let n=Fn(t);if(!We[n]||Ut[n])throw nr(e,l),Ke(`root node is forbidden and cannot be sanitized in-place`)}if(gr(e))throw nr(e,l),Ke(`root node is clobbered and cannot be sanitized in-place`);dn=Te(),fn=ke()}else if(yr(e))i=lr(`<!---->`),a=i.ownerDocument.importNode(e,!0),a.nodeType===Mt.element&&a.nodeName===`BODY`||a.nodeName===`HTML`?i=a:i.appendChild(a),Lr(i);else{if(!nn&&!Yt&&!Zt&&e.indexOf(`<`)===-1)return P(e);if(i=lr(e),!i)return nn?null:an?A:``}i&&tn&&Kn(i.firstChild);let f=c?e:i;try{c&&Lr(e);let t=ur(f);for(;o=t.nextNode();)Fr(o,f);c&&rr(e,l)}catch(t){throw c&&nr(e,l),t}finally{dn=u,fn=d}if(c){if(tr(e,l))throw Ke(`a node selected for removal could not be safely returned; refusing to sanitize in place`);return Yt&&fr(e),e}if(nn){if(Yt&&fr(i),rn)for(s=se.call(i.ownerDocument);i.firstChild;)s.appendChild(i.firstChild);else s=i;return(qe.shadowroot||qe.shadowrootmode)&&(s=le.call(r,s,!0)),s}Yt&&hr(i);let p=Zt?i.outerHTML:i.innerHTML;return Zt&&We[`!doctype`]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&Ge(Ct,i.ownerDocument.doctype.name)&&(p=`<!DOCTYPE `+i.ownerDocument.doctype.name+`>
|
|
4
|
+
`+p),P(p)};return t.sanitize=function(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=z,i=We,a=qe,o=t.removed;z=null;try{return Rr(e,n)}finally{z=r,r&&(Qt||zn(r),We=i,qe=a,t.removed=o)}},t.setConfig=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};zn(e),Qt=!0,$t=We,en=qe},t.clearConfig=function(){In=null,Qt=!1,$t=null,en=null,k=j,A=``},t.isValidAttribute=function(e,t,n){In||zn({});let r=Fn(e),i=Fn(t);return typeof n==`string`&&(Nr(t,n)||!Jt&&Ge(kt,n))?!1:Or(r,i,n)},t.addHook=function(e,t){typeof t==`function`&&He(ue,e)&&xe(ue[e],t)},t.removeHook=function(e,t){if(He(ue,e)){if(t!==void 0){let n=ye(ue[e],t);return n===-1?void 0:Ce(ue[e],n,1)[0]}return be(ue[e])}},t.removeHooks=function(e){He(ue,e)&&(ue[e]=[])},t.removeAllHooks=function(){ue=Rt()},t}var Ht=Vt(),Ut=i((e,t,{depth:n=2}={})=>{let r={depth:n};if(Array.isArray(t)&&!Array.isArray(e))return t.forEach(t=>Ut(e,t,r)),e;if(Array.isArray(t)&&Array.isArray(e))return t.forEach(t=>{e.includes(t)||e.push(t)}),e;if(e==null||n<=0)return typeof e==`object`&&e&&typeof t==`object`?Object.assign(e,t):t;if(t!=null&&typeof e==`object`&&typeof t==`object`){let r=e;Object.entries(t).forEach(([t,i])=>{if(typeof i==`object`){if(i===null)return;Object.hasOwn(e,t)||Object.defineProperty(e,t,{value:void 0,writable:!0,enumerable:!0,configurable:!0}),r[t]===void 0&&(r[t]=Array.isArray(i)?[]:{}),typeof r[t]==`object`&&(r[t]=Ut(r[t],i,{depth:n-1}))}else typeof r[t]!=`object`&&(Object.hasOwn(e,t)?r[t]=i:Object.defineProperty(e,t,{value:i,writable:!0,enumerable:!0,configurable:!0}))})}return e},`assignWithDepth`),Wt=Ut,Gt=`#ffffff`,Kt=`#f2f2f2`,R=i((e,t)=>t?j(e,{s:-40,l:10}):j(e,{s:-40,l:-10}),`mkBorder`),qt=class{static{i(this,`Theme`)}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||j(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||j(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||R(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||R(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||R(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||R(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||`#fff5ad`,this.noteTextColor=this.noteTextColor||`#333`,this.secondaryTextColor=this.secondaryTextColor||M(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||M(this.tertiaryColor),this.lineColor=this.lineColor||M(this.background),this.arrowheadColor=this.arrowheadColor||M(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?A(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||A(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||M(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||k(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||A(this.mainBkg,5)||`#ffffff`,this.rowEven=this.rowEven||A(this.mainBkg,10)):(this.rowOdd=this.rowOdd||k(this.mainBkg,75)||`#ffffff`,this.rowEven=this.rowEven||k(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||j(this.primaryColor,{h:30}),this.cScale4=this.cScale4||j(this.primaryColor,{h:60}),this.cScale5=this.cScale5||j(this.primaryColor,{h:90}),this.cScale6=this.cScale6||j(this.primaryColor,{h:120}),this.cScale7=this.cScale7||j(this.primaryColor,{h:150}),this.cScale8=this.cScale8||j(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||j(this.primaryColor,{h:270}),this.cScale10=this.cScale10||j(this.primaryColor,{h:300}),this.cScale11=this.cScale11||j(this.primaryColor,{h:330}),this.darkMode)for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScale`+e]=A(this[`cScale`+e],75);else for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScale`+e]=A(this[`cScale`+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScaleInv`+e]=this[`cScaleInv`+e]||M(this[`cScale`+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this.darkMode?this[`cScalePeer`+e]=this[`cScalePeer`+e]||k(this[`cScale`+e],10):this[`cScalePeer`+e]=this[`cScalePeer`+e]||A(this[`cScale`+e],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScaleLabel`+e]=this[`cScaleLabel`+e]||this.scaleLabelColor;let e=this.darkMode?-4:-1;for(let t=0;t<5;t++)this[`surface`+t]=this[`surface`+t]||j(this.mainBkg,{h:180,s:-15,l:e*(5+t*3)}),this[`surfacePeer`+t]=this[`surfacePeer`+t]||j(this.mainBkg,{h:180,s:-15,l:e*(8+t*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||j(this.primaryColor,{h:64}),this.fillType3=this.fillType3||j(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||j(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||j(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||j(this.primaryColor,{h:128}),this.fillType7=this.fillType7||j(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||j(this.primaryColor,{l:-10}),this.pie5=this.pie5||j(this.secondaryColor,{l:-10}),this.pie6=this.pie6||j(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||j(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||j(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||j(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||j(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||j(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||j(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??j(this.primaryColor,{l:-30}),this.venn2=this.venn2??j(this.secondaryColor,{l:-30}),this.venn3=this.venn3??j(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??j(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??j(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??j(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??j(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??j(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||j(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||j(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||j(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||j(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||j(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||j(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||D(this.quadrant1Fill)?k(this.quadrant1Fill):A(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?A(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||j(this.primaryColor,{h:-30}),this.git4=this.git4||j(this.primaryColor,{h:-60}),this.git5=this.git5||j(this.primaryColor,{h:-90}),this.git6=this.git6||j(this.primaryColor,{h:60}),this.git7=this.git7||j(this.primaryColor,{h:120}),this.darkMode?(this.git0=k(this.git0,25),this.git1=k(this.git1,25),this.git2=k(this.git2,25),this.git3=k(this.git3,25),this.git4=k(this.git4,25),this.git5=k(this.git5,25),this.git6=k(this.git6,25),this.git7=k(this.git7,25)):(this.git0=A(this.git0,25),this.git1=A(this.git1,25),this.git2=A(this.git2,25),this.git3=A(this.git3,25),this.git4=A(this.git4,25),this.git5=A(this.git5,25),this.git6=A(this.git6,25),this.git7=A(this.git7,25)),this.gitInv0=this.gitInv0||M(this.git0),this.gitInv1=this.gitInv1||M(this.git1),this.gitInv2=this.gitInv2||M(this.git2),this.gitInv3=this.gitInv3||M(this.git3),this.gitInv4=this.gitInv4||M(this.git4),this.gitInv5=this.gitInv5||M(this.git5),this.gitInv6=this.gitInv6||M(this.git6),this.gitInv7=this.gitInv7||M(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||Gt,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Kt,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor}calculate(e){if(typeof e!=`object`){this.updateColors();return}let t=Object.keys(e);t.forEach(t=>{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]})}},Jt=i(e=>{let t=new qt;return t.calculate(e),t},`getThemeVariables`),Yt=class{static{i(this,`Theme`)}constructor(){this.background=`#333`,this.primaryColor=`#1f2020`,this.secondaryColor=k(this.primaryColor,16),this.tertiaryColor=j(this.primaryColor,{h:-160}),this.primaryBorderColor=M(this.background),this.secondaryBorderColor=R(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=R(this.tertiaryColor,this.darkMode),this.primaryTextColor=M(this.primaryColor),this.secondaryTextColor=M(this.secondaryColor),this.tertiaryTextColor=M(this.tertiaryColor),this.lineColor=M(this.background),this.textColor=M(this.background),this.mainBkg=`#1f2020`,this.secondBkg=`calculated`,this.mainContrastColor=`lightgrey`,this.darkTextColor=k(M(`#323D47`),10),this.lineColor=`calculated`,this.border1=`#ccc`,this.border2=w(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=A(`#EAE8D9`,30),this.altSectionBkgColor=`calculated`,this.sectionBkgColor2=`#EAE8D9`,this.excludeBkgColor=A(this.sectionBkgColor,10),this.taskBorderColor=w(255,255,255,70),this.taskBkgColor=`calculated`,this.taskTextColor=`calculated`,this.taskTextLightColor=`calculated`,this.taskTextOutsideColor=`calculated`,this.taskTextClickableColor=`#003163`,this.activeTaskBorderColor=w(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||k(this.mainBkg,5)||`#ffffff`,this.rowEven=this.rowEven||A(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=k(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=k(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=k(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=M(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=j(this.primaryColor,{h:64}),this.fillType3=j(this.secondaryColor,{h:64}),this.fillType4=j(this.primaryColor,{h:-64}),this.fillType5=j(this.secondaryColor,{h:-64}),this.fillType6=j(this.primaryColor,{h:128}),this.fillType7=j(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||j(this.primaryColor,{h:30}),this.cScale4=this.cScale4||j(this.primaryColor,{h:60}),this.cScale5=this.cScale5||j(this.primaryColor,{h:90}),this.cScale6=this.cScale6||j(this.primaryColor,{h:120}),this.cScale7=this.cScale7||j(this.primaryColor,{h:150}),this.cScale8=this.cScale8||j(this.primaryColor,{h:210}),this.cScale9=this.cScale9||j(this.primaryColor,{h:270}),this.cScale10=this.cScale10||j(this.primaryColor,{h:300}),this.cScale11=this.cScale11||j(this.primaryColor,{h:330});for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScaleInv`+e]=this[`cScaleInv`+e]||M(this[`cScale`+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScalePeer`+e]=this[`cScalePeer`+e]||k(this[`cScale`+e],10);for(let e=0;e<5;e++)this[`surface`+e]=this[`surface`+e]||j(this.mainBkg,{h:30,s:-30,l:-(-10+e*4)}),this[`surfacePeer`+e]=this[`surfacePeer`+e]||j(this.mainBkg,{h:30,s:-30,l:-(-7+e*4)});this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?`black`:this.labelTextColor);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScaleLabel`+e]=this[`cScaleLabel`+e]||this.scaleLabelColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`pie`+e]=this[`cScale`+e];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 e=0;e<8;e++)this[`venn`+(e+1)]=this[`venn`+(e+1)]??k(this[`cScale`+e],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||j(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||j(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||j(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||j(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||j(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||j(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||D(this.quadrant1Fill)?k(this.quadrant1Fill):A(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?A(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=k(this.secondaryColor,20),this.git1=k(this.pie2||this.secondaryColor,20),this.git2=k(this.pie3||this.tertiaryColor,20),this.git3=k(this.pie4||j(this.primaryColor,{h:-30}),20),this.git4=k(this.pie5||j(this.primaryColor,{h:-60}),20),this.git5=k(this.pie6||j(this.primaryColor,{h:-90}),10),this.git6=k(this.pie7||j(this.primaryColor,{h:60}),10),this.git7=k(this.pie8||j(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||M(this.git0),this.gitInv1=this.gitInv1||M(this.git1),this.gitInv2=this.gitInv2||M(this.git2),this.gitInv3=this.gitInv3||M(this.git3),this.gitInv4=this.gitInv4||M(this.git4),this.gitInv5=this.gitInv5||M(this.git5),this.gitInv6=this.gitInv6||M(this.git6),this.gitInv7=this.gitInv7||M(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||M(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||M(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||k(`#5a3d5c`,10),this.emProcessorStroke=this.emProcessorStroke||`#8a6d8c`,this.emReadModelFill=this.emReadModelFill||k(`#3d5a2d`,10),this.emReadModelStroke=this.emReadModelStroke||`#6d8c5c`,this.emCommandFill=this.emCommandFill||k(`#2d3d5a`,10),this.emCommandStroke=this.emCommandStroke||`#5c6d8c`,this.emEventFill=this.emEventFill||k(`#5a452d`,10),this.emEventStroke=this.emEventStroke||`#8c755c`,this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||k(this.background,5),this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||k(this.background,12),this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||k(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||k(this.background,2),this.nodeBorder=this.nodeBorder||`#999`}calculate(e){if(typeof e!=`object`){this.updateColors();return}let t=Object.keys(e);t.forEach(t=>{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]})}},Xt=i(e=>{let t=new Yt;return t.calculate(e),t},`getThemeVariables`),Zt=class{static{i(this,`Theme`)}constructor(){this.background=`#f4f4f4`,this.primaryColor=`#ECECFF`,this.secondaryColor=j(this.primaryColor,{h:120}),this.secondaryColor=`#ffffde`,this.tertiaryColor=j(this.primaryColor,{h:-160}),this.primaryBorderColor=R(this.primaryColor,this.darkMode),this.secondaryBorderColor=R(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=R(this.tertiaryColor,this.darkMode),this.primaryTextColor=M(this.primaryColor),this.secondaryTextColor=M(this.secondaryColor),this.tertiaryTextColor=M(this.tertiaryColor),this.lineColor=M(this.background),this.textColor=M(this.background),this.background=`white`,this.mainBkg=`#ECECFF`,this.secondBkg=`#ffffde`,this.lineColor=`#333333`,this.border1=`#9370DB`,this.primaryBorderColor=R(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=w(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||j(this.primaryColor,{h:30}),this.cScale4=this.cScale4||j(this.primaryColor,{h:60}),this.cScale5=this.cScale5||j(this.primaryColor,{h:90}),this.cScale6=this.cScale6||j(this.primaryColor,{h:120}),this.cScale7=this.cScale7||j(this.primaryColor,{h:150}),this.cScale8=this.cScale8||j(this.primaryColor,{h:210}),this.cScale9=this.cScale9||j(this.primaryColor,{h:270}),this.cScale10=this.cScale10||j(this.primaryColor,{h:300}),this.cScale11=this.cScale11||j(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||A(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||A(this.tertiaryColor,40);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScale`+e]=A(this[`cScale`+e],10),this[`cScalePeer`+e]=this[`cScalePeer`+e]||A(this[`cScale`+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScaleInv`+e]=this[`cScaleInv`+e]||j(this[`cScale`+e],{h:180});for(let e=0;e<5;e++)this[`surface`+e]=this[`surface`+e]||j(this.mainBkg,{h:30,l:-(5+e*5)}),this[`surfacePeer`+e]=this[`surfacePeer`+e]||j(this.mainBkg,{h:30,l:-(7+e*5)});if(this.scaleLabelColor=this.scaleLabelColor!==`calculated`&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,this.labelTextColor!==`calculated`){this.cScaleLabel0=this.cScaleLabel0||M(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||M(this.labelTextColor);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScaleLabel`+e]=this[`cScaleLabel`+e]||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||k(this.primaryColor,75)||`#ffffff`,this.rowEven=this.rowEven||k(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=j(this.primaryColor,{h:64}),this.fillType3=j(this.secondaryColor,{h:64}),this.fillType4=j(this.primaryColor,{h:-64}),this.fillType5=j(this.secondaryColor,{h:-64}),this.fillType6=j(this.primaryColor,{h:128}),this.fillType7=j(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||j(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||j(this.primaryColor,{l:-10}),this.pie5=this.pie5||j(this.secondaryColor,{l:-30}),this.pie6=this.pie6||j(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||j(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||j(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||j(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||j(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||j(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||j(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??j(this.primaryColor,{l:-30}),this.venn2=this.venn2??j(this.secondaryColor,{l:-30}),this.venn3=this.venn3??j(this.tertiaryColor,{l:-40}),this.venn4=this.venn4??j(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??j(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??j(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??j(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??j(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||j(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||j(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||j(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||j(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||j(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||j(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||D(this.quadrant1Fill)?k(this.quadrant1Fill):A(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||j(this.primaryColor,{h:-30}),this.git4=this.git4||j(this.primaryColor,{h:-60}),this.git5=this.git5||j(this.primaryColor,{h:-90}),this.git6=this.git6||j(this.primaryColor,{h:60}),this.git7=this.git7||j(this.primaryColor,{h:120}),this.darkMode?(this.git0=k(this.git0,25),this.git1=k(this.git1,25),this.git2=k(this.git2,25),this.git3=k(this.git3,25),this.git4=k(this.git4,25),this.git5=k(this.git5,25),this.git6=k(this.git6,25),this.git7=k(this.git7,25)):(this.git0=A(this.git0,25),this.git1=A(this.git1,25),this.git2=A(this.git2,25),this.git3=A(this.git3,25),this.git4=A(this.git4,25),this.git5=A(this.git5,25),this.git6=A(this.git6,25),this.git7=A(this.git7,25)),this.gitInv0=this.gitInv0||A(M(this.git0),25),this.gitInv1=this.gitInv1||M(this.git1),this.gitInv2=this.gitInv2||M(this.git2),this.gitInv3=this.gitInv3||M(this.git3),this.gitInv4=this.gitInv4||M(this.git4),this.gitInv5=this.gitInv5||M(this.git5),this.gitInv6=this.gitInv6||M(this.git6),this.gitInv7=this.gitInv7||M(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||M(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||M(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||Gt,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Kt}calculate(e){if(Object.keys(this).forEach(e=>{this[e]===`calculated`&&(this[e]=void 0)}),typeof e!=`object`){this.updateColors();return}let t=Object.keys(e);t.forEach(t=>{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]})}},Qt=i(e=>{let t=new Zt;return t.calculate(e),t},`getThemeVariables`),$t=class{static{i(this,`Theme`)}constructor(){this.background=`#f4f4f4`,this.primaryColor=`#cde498`,this.secondaryColor=`#cdffb2`,this.background=`white`,this.mainBkg=`#cde498`,this.secondBkg=`#cdffb2`,this.lineColor=`green`,this.border1=`#13540c`,this.border2=`#6eaa49`,this.arrowheadColor=`green`,this.fontFamily=`"trebuchet ms", verdana, arial, sans-serif`,this.fontSize=`16px`,this.tertiaryColor=k(`#cde498`,10),this.primaryBorderColor=R(this.primaryColor,this.darkMode),this.secondaryBorderColor=R(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=R(this.tertiaryColor,this.darkMode),this.primaryTextColor=M(this.primaryColor),this.secondaryTextColor=M(this.secondaryColor),this.tertiaryTextColor=M(this.primaryColor),this.lineColor=M(this.background),this.textColor=M(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=A(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||j(this.primaryColor,{h:30}),this.cScale4=this.cScale4||j(this.primaryColor,{h:60}),this.cScale5=this.cScale5||j(this.primaryColor,{h:90}),this.cScale6=this.cScale6||j(this.primaryColor,{h:120}),this.cScale7=this.cScale7||j(this.primaryColor,{h:150}),this.cScale8=this.cScale8||j(this.primaryColor,{h:210}),this.cScale9=this.cScale9||j(this.primaryColor,{h:270}),this.cScale10=this.cScale10||j(this.primaryColor,{h:300}),this.cScale11=this.cScale11||j(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||A(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||A(this.tertiaryColor,40);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScale`+e]=A(this[`cScale`+e],10),this[`cScalePeer`+e]=this[`cScalePeer`+e]||A(this[`cScale`+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScaleInv`+e]=this[`cScaleInv`+e]||j(this[`cScale`+e],{h:180});this.scaleLabelColor=this.scaleLabelColor!==`calculated`&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScaleLabel`+e]=this[`cScaleLabel`+e]||this.scaleLabelColor;for(let e=0;e<5;e++)this[`surface`+e]=this[`surface`+e]||j(this.mainBkg,{h:30,s:-30,l:-(5+e*5)}),this[`surfacePeer`+e]=this[`surfacePeer`+e]||j(this.mainBkg,{h:30,s:-30,l:-(8+e*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||k(this.mainBkg,75)||`#ffffff`,this.rowEven=this.rowEven||k(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=j(this.primaryColor,{h:64}),this.fillType3=j(this.secondaryColor,{h:64}),this.fillType4=j(this.primaryColor,{h:-64}),this.fillType5=j(this.secondaryColor,{h:-64}),this.fillType6=j(this.primaryColor,{h:128}),this.fillType7=j(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||j(this.primaryColor,{l:-30}),this.pie5=this.pie5||j(this.secondaryColor,{l:-30}),this.pie6=this.pie6||j(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||j(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||j(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||j(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||j(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||j(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||j(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??j(this.primaryColor,{l:-30}),this.venn2=this.venn2??j(this.secondaryColor,{l:-30}),this.venn3=this.venn3??j(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??j(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??j(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??j(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??j(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??j(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||j(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||j(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||j(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||j(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||j(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||j(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||D(this.quadrant1Fill)?k(this.quadrant1Fill):A(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||j(this.primaryColor,{h:-30}),this.git4=this.git4||j(this.primaryColor,{h:-60}),this.git5=this.git5||j(this.primaryColor,{h:-90}),this.git6=this.git6||j(this.primaryColor,{h:60}),this.git7=this.git7||j(this.primaryColor,{h:120}),this.darkMode?(this.git0=k(this.git0,25),this.git1=k(this.git1,25),this.git2=k(this.git2,25),this.git3=k(this.git3,25),this.git4=k(this.git4,25),this.git5=k(this.git5,25),this.git6=k(this.git6,25),this.git7=k(this.git7,25)):(this.git0=A(this.git0,25),this.git1=A(this.git1,25),this.git2=A(this.git2,25),this.git3=A(this.git3,25),this.git4=A(this.git4,25),this.git5=A(this.git5,25),this.git6=A(this.git6,25),this.git7=A(this.git7,25)),this.gitInv0=this.gitInv0||M(this.git0),this.gitInv1=this.gitInv1||M(this.git1),this.gitInv2=this.gitInv2||M(this.git2),this.gitInv3=this.gitInv3||M(this.git3),this.gitInv4=this.gitInv4||M(this.git4),this.gitInv5=this.gitInv5||M(this.git5),this.gitInv6=this.gitInv6||M(this.git6),this.gitInv7=this.gitInv7||M(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||M(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||M(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||Gt,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Kt}calculate(e){if(typeof e!=`object`){this.updateColors();return}let t=Object.keys(e);t.forEach(t=>{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]})}},en=i(e=>{let t=new $t;return t.calculate(e),t},`getThemeVariables`),tn=class{static{i(this,`Theme`)}constructor(){this.primaryColor=`#eee`,this.contrast=`#707070`,this.secondaryColor=k(this.contrast,55),this.background=`#ffffff`,this.tertiaryColor=j(this.primaryColor,{h:-160}),this.primaryBorderColor=R(this.primaryColor,this.darkMode),this.secondaryBorderColor=R(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=R(this.tertiaryColor,this.darkMode),this.primaryTextColor=M(this.primaryColor),this.secondaryTextColor=M(this.secondaryColor),this.tertiaryTextColor=M(this.tertiaryColor),this.lineColor=M(this.background),this.textColor=M(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||k(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=k(this.contrast,55),this.border2=this.contrast,this.actorBorder=k(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 e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScaleInv`+e]=this[`cScaleInv`+e]||M(this[`cScale`+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this.darkMode?this[`cScalePeer`+e]=this[`cScalePeer`+e]||k(this[`cScale`+e],10):this[`cScalePeer`+e]=this[`cScalePeer`+e]||A(this[`cScale`+e],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?`black`:this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScaleLabel`+e]=this[`cScaleLabel`+e]||this.scaleLabelColor;for(let e=0;e<5;e++)this[`surface`+e]=this[`surface`+e]||j(this.mainBkg,{l:-(5+e*5)}),this[`surfacePeer`+e]=this[`surfacePeer`+e]||j(this.mainBkg,{l:-(8+e*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=k(this.contrast,30),this.sectionBkgColor2=k(this.contrast,30),this.taskBorderColor=A(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=k(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=A(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=j(this.primaryColor,{h:64}),this.fillType3=j(this.secondaryColor,{h:64}),this.fillType4=j(this.primaryColor,{h:-64}),this.fillType5=j(this.secondaryColor,{h:-64}),this.fillType6=j(this.primaryColor,{h:128}),this.fillType7=j(this.secondaryColor,{h:128});for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`pie`+e]=this[`cScale`+e];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 e=0;e<8;e++)this[`venn`+(e+1)]=this[`venn`+(e+1)]??this[`cScale`+e];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||j(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||j(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||j(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||j(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||j(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||j(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||D(this.quadrant1Fill)?k(this.quadrant1Fill):A(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=A(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||j(this.primaryColor,{h:-30}),this.git4=this.pie5||j(this.primaryColor,{h:-60}),this.git5=this.pie6||j(this.primaryColor,{h:-90}),this.git6=this.pie7||j(this.primaryColor,{h:60}),this.git7=this.pie8||j(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||M(this.git0),this.gitInv1=this.gitInv1||M(this.git1),this.gitInv2=this.gitInv2||M(this.git2),this.gitInv3=this.gitInv3||M(this.git3),this.gitInv4=this.gitInv4||M(this.git4),this.gitInv5=this.gitInv5||M(this.git5),this.gitInv6=this.gitInv6||M(this.git6),this.gitInv7=this.gitInv7||M(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||Gt,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Kt}calculate(e){if(typeof e!=`object`){this.updateColors();return}let t=Object.keys(e);t.forEach(t=>{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]})}},nn=i(e=>{let t=new tn;return t.calculate(e),t},`getThemeVariables`),rn=class{static{i(this,`Theme`)}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=R(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||j(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||j(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||R(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||R(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||R(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||R(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||`#fff5ad`,this.noteTextColor=this.noteTextColor||`#333`,this.secondaryTextColor=this.secondaryTextColor||M(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||M(this.tertiaryColor),this.lineColor=this.lineColor||M(this.background),this.arrowheadColor=this.arrowheadColor||M(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?A(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||A(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||M(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;let e=`#ECECFE`,t=`#E9E9F1`,n=j(e,{h:180,l:5});if(this.sectionBkgColor=this.sectionBkgColor||n,this.altSectionBkgColor=this.altSectionBkgColor||`white`,this.sectionBkgColor=this.sectionBkgColor||t,this.sectionBkgColor2=this.sectionBkgColor2||e,this.excludeBkgColor=this.excludeBkgColor||`#eeeeee`,this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||e,this.activeTaskBorderColor=this.activeTaskBorderColor||e,this.activeTaskBkgColor=this.activeTaskBkgColor||k(e,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||e,this.cScale1=this.cScale1||t,this.cScale2=this.cScale2||n,this.cScale3=this.cScale3||j(e,{h:30}),this.cScale4=this.cScale4||j(e,{h:60}),this.cScale5=this.cScale5||j(e,{h:90}),this.cScale6=this.cScale6||j(e,{h:120}),this.cScale7=this.cScale7||j(e,{h:150}),this.cScale8=this.cScale8||j(e,{h:210,l:150}),this.cScale9=this.cScale9||j(e,{h:270}),this.cScale10=this.cScale10||j(e,{h:300}),this.cScale11=this.cScale11||j(e,{h:330}),this.darkMode)for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScale`+e]=A(this[`cScale`+e],75);else for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScale`+e]=A(this[`cScale`+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScaleInv`+e]=this[`cScaleInv`+e]||M(this[`cScale`+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this.darkMode?this[`cScalePeer`+e]=this[`cScalePeer`+e]||k(this[`cScale`+e],10):this[`cScalePeer`+e]=this[`cScalePeer`+e]||A(this[`cScale`+e],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScaleLabel`+e]=this[`cScaleLabel`+e]||this.scaleLabelColor;let r=this.darkMode?-4:-1;for(let e=0;e<5;e++)this[`surface`+e]=this[`surface`+e]||j(this.mainBkg,{h:180,s:-15,l:r*(5+e*3)}),this[`surfacePeer`+e]=this[`surfacePeer`+e]||j(this.mainBkg,{h:180,s:-15,l:r*(8+e*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||e,this.fillType1=this.fillType1||t,this.fillType2=this.fillType2||j(e,{h:64}),this.fillType3=this.fillType3||j(t,{h:64}),this.fillType4=this.fillType4||j(e,{h:-64}),this.fillType5=this.fillType5||j(t,{h:-64}),this.fillType6=this.fillType6||j(e,{h:128}),this.fillType7=this.fillType7||j(t,{h:128}),this.pie1=this.pie1||e,this.pie2=this.pie2||t,this.pie3=this.pie3||n,this.pie4=this.pie4||j(e,{l:-10}),this.pie5=this.pie5||j(t,{l:-10}),this.pie6=this.pie6||j(n,{l:-10}),this.pie7=this.pie7||j(e,{h:60,l:-10}),this.pie8=this.pie8||j(e,{h:-60,l:-10}),this.pie9=this.pie9||j(e,{h:120,l:0}),this.pie10=this.pie10||j(e,{h:60,l:-20}),this.pie11=this.pie11||j(e,{h:-60,l:-20}),this.pie12=this.pie12||j(e,{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||e,this.quadrant2Fill=this.quadrant2Fill||j(e,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||j(e,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||j(e,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||j(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||j(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||j(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||D(this.quadrant1Fill)?k(this.quadrant1Fill):A(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||e,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?A(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||e,this.git1=this.git1||t,this.git2=this.git2||n,this.git3=this.git3||j(e,{h:-30}),this.git4=this.git4||j(e,{h:-60}),this.git5=this.git5||j(e,{h:-90}),this.git6=this.git6||j(e,{h:60}),this.git7=this.git7||j(e,{h:120}),this.darkMode?(this.git0=k(this.git0,25),this.git1=k(this.git1,25),this.git2=k(this.git2,25),this.git3=k(this.git3,25),this.git4=k(this.git4,25),this.git5=k(this.git5,25),this.git6=k(this.git6,25),this.git7=k(this.git7,25)):(this.git0=A(this.git0,25),this.git1=A(this.git1,25),this.git2=A(this.git2,25),this.git3=A(this.git3,25),this.git4=A(this.git4,25),this.git5=A(this.git5,25),this.git6=A(this.git6,25),this.git7=A(this.git7,25)),this.gitInv0=this.gitInv0||M(this.git0),this.gitInv1=this.gitInv1||M(this.git1),this.gitInv2=this.gitInv2||M(this.git2),this.gitInv3=this.gitInv3||M(this.git3),this.gitInv4=this.gitInv4||M(this.git4),this.gitInv5=this.gitInv5||M(this.git5),this.gitInv6=this.gitInv6||M(this.git6),this.gitInv7=this.gitInv7||M(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||Gt,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Kt}calculate(e){if(typeof e!=`object`){this.updateColors();return}let t=Object.keys(e);t.forEach(t=>{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]})}},an=i(e=>{let t=new rn;return t.calculate(e),t},`getThemeVariables`),on=class{static{i(this,`Theme`)}constructor(){this.background=`#333`,this.primaryColor=`#1f2020`,this.secondaryColor=k(this.primaryColor,16),this.tertiaryColor=j(this.primaryColor,{h:-160}),this.primaryBorderColor=M(this.background),this.secondaryBorderColor=R(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=R(this.tertiaryColor,this.darkMode),this.primaryTextColor=M(this.primaryColor),this.secondaryTextColor=M(this.secondaryColor),this.tertiaryTextColor=M(this.tertiaryColor),this.mainBkg=`#2a2020`,this.secondBkg=`calculated`,this.mainContrastColor=`lightgrey`,this.darkTextColor=k(M(`#323D47`),10),this.border1=`#ccc`,this.border2=w(255,255,255,.25),this.arrowheadColor=M(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||j(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||j(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||R(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||R(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||R(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||R(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||`#fff5ad`,this.noteTextColor=this.noteTextColor||`#333`,this.secondaryTextColor=this.secondaryTextColor||M(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||M(this.tertiaryColor),this.lineColor=this.lineColor||M(this.background),this.arrowheadColor=this.arrowheadColor||M(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?A(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||A(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||M(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||k(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||j(this.primaryColor,{h:30}),this.cScale4=this.cScale4||j(this.primaryColor,{h:60}),this.cScale5=this.cScale5||j(this.primaryColor,{h:90}),this.cScale6=this.cScale6||j(this.primaryColor,{h:120}),this.cScale7=this.cScale7||j(this.primaryColor,{h:150}),this.cScale8=this.cScale8||j(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||j(this.primaryColor,{h:270}),this.cScale10=this.cScale10||j(this.primaryColor,{h:300}),this.cScale11=this.cScale11||j(this.primaryColor,{h:330}),this.darkMode)for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScale`+e]=A(this[`cScale`+e],75);else for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScale`+e]=A(this[`cScale`+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScaleInv`+e]=this[`cScaleInv`+e]||M(this[`cScale`+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this.darkMode?this[`cScalePeer`+e]=this[`cScalePeer`+e]||k(this[`cScale`+e],10):this[`cScalePeer`+e]=this[`cScalePeer`+e]||A(this[`cScale`+e],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScaleLabel`+e]=this[`cScaleLabel`+e]||this.scaleLabelColor;let e=this.darkMode?-4:-1;for(let t=0;t<5;t++)this[`surface`+t]=this[`surface`+t]||j(this.mainBkg,{h:180,s:-15,l:e*(5+t*3)}),this[`surfacePeer`+t]=this[`surfacePeer`+t]||j(this.mainBkg,{h:180,s:-15,l:e*(8+t*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||j(this.primaryColor,{h:64}),this.fillType3=this.fillType3||j(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||j(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||j(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||j(this.primaryColor,{h:128}),this.fillType7=this.fillType7||j(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||j(this.primaryColor,{l:-10}),this.pie5=this.pie5||j(this.secondaryColor,{l:-10}),this.pie6=this.pie6||j(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||j(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||j(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||j(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||j(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||j(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||j(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||j(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||j(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||j(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||j(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||j(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||j(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||D(this.quadrant1Fill)?k(this.quadrant1Fill):A(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?A(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=k(this.git0,25),this.git1=k(this.git1,25),this.git2=k(this.git2,25),this.git3=k(this.git3,25),this.git4=k(this.git4,25),this.git5=k(this.git5,25),this.git6=k(this.git6,25),this.git7=k(this.git7,25)):(this.git0=A(this.git0,25),this.git1=A(this.git1,25),this.git2=A(this.git2,25),this.git3=A(this.git3,25),this.git4=A(this.git4,25),this.git5=A(this.git5,25),this.git6=A(this.git6,25),this.git7=A(this.git7,25)),this.gitInv0=this.gitInv0||M(this.git0),this.gitInv1=this.gitInv1||M(this.git1),this.gitInv2=this.gitInv2||M(this.git2),this.gitInv3=this.gitInv3||M(this.git3),this.gitInv4=this.gitInv4||M(this.git4),this.gitInv5=this.gitInv5||M(this.git5),this.gitInv6=this.gitInv6||M(this.git6),this.gitInv7=this.gitInv7||M(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||Gt,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Kt}calculate(e){if(typeof e!=`object`){this.updateColors();return}let t=Object.keys(e);t.forEach(t=>{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]})}},sn=i(e=>{let t=new on;return t.calculate(e),t},`getThemeVariables`),cn=class{static{i(this,`Theme`)}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=R(`#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||j(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||j(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||R(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||R(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||R(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||R(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||`#FEF9C3`,this.noteTextColor=this.noteTextColor||`#28253D`,this.secondaryTextColor=this.secondaryTextColor||M(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||M(this.tertiaryColor),this.lineColor=this.lineColor||M(this.background),this.arrowheadColor=this.arrowheadColor||M(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?A(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||A(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||M(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;let e=`#ECECFE`,t=`#E9E9F1`,n=j(e,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||n,this.altSectionBkgColor=this.altSectionBkgColor||`white`,this.sectionBkgColor=this.sectionBkgColor||t,this.sectionBkgColor2=this.sectionBkgColor2||e,this.excludeBkgColor=this.excludeBkgColor||`#eeeeee`,this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||e,this.activeTaskBorderColor=this.activeTaskBorderColor||e,this.activeTaskBkgColor=this.activeTaskBkgColor||k(e,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 e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScale`+e]=this.mainBkg;if(this.darkMode)for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScale`+e]=A(this[`cScale`+e],75);else for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScale`+e]=A(this[`cScale`+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScaleInv`+e]=this[`cScaleInv`+e]||M(this[`cScale`+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this.darkMode?this[`cScalePeer`+e]=this[`cScalePeer`+e]||k(this[`cScale`+e],10):this[`cScalePeer`+e]=this[`cScalePeer`+e]||A(this[`cScale`+e],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScaleLabel`+e]=this[`cScaleLabel`+e]||this.scaleLabelColor;let r=this.darkMode?-4:-1;for(let e=0;e<5;e++)this[`surface`+e]=this[`surface`+e]||j(this.mainBkg,{h:180,s:-15,l:r*(5+e*3)}),this[`surfacePeer`+e]=this[`surfacePeer`+e]||j(this.mainBkg,{h:180,s:-15,l:r*(8+e*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||e,this.fillType1=this.fillType1||t,this.fillType2=this.fillType2||j(e,{h:64}),this.fillType3=this.fillType3||j(t,{h:64}),this.fillType4=this.fillType4||j(e,{h:-64}),this.fillType5=this.fillType5||j(t,{h:-64}),this.fillType6=this.fillType6||j(e,{h:128}),this.fillType7=this.fillType7||j(t,{h:128}),this.pie1=this.pie1||e,this.pie2=this.pie2||t,this.pie3=this.pie3||n,this.pie4=this.pie4||j(e,{l:-10}),this.pie5=this.pie5||j(t,{l:-10}),this.pie6=this.pie6||j(n,{l:-10}),this.pie7=this.pie7||j(e,{h:60,l:-10}),this.pie8=this.pie8||j(e,{h:-60,l:-10}),this.pie9=this.pie9||j(e,{h:120,l:0}),this.pie10=this.pie10||j(e,{h:60,l:-20}),this.pie11=this.pie11||j(e,{h:-60,l:-20}),this.pie12=this.pie12||j(e,{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||e,this.quadrant2Fill=this.quadrant2Fill||j(e,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||j(e,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||j(e,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||j(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||j(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||j(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||D(this.quadrant1Fill)?k(this.quadrant1Fill):A(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||e,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?A(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground=`#FFFFFF`,this.git0=this.git0||e,this.git1=this.git1||t,this.git2=this.git2||n,this.git3=this.git3||j(e,{h:-30}),this.git4=this.git4||j(e,{h:-60}),this.git5=this.git5||j(e,{h:-90}),this.git6=this.git6||j(e,{h:60}),this.git7=this.git7||j(e,{h:120}),this.darkMode?(this.git0=k(this.git0,25),this.git1=k(this.git1,25),this.git2=k(this.git2,25),this.git3=k(this.git3,25),this.git4=k(this.git4,25),this.git5=k(this.git5,25),this.git6=k(this.git6,25),this.git7=k(this.git7,25)):(this.git0=A(this.git0,25),this.git1=A(this.git1,25),this.git2=A(this.git2,25),this.git3=A(this.git3,25),this.git4=A(this.git4,25),this.git5=A(this.git5,25),this.git6=A(this.git6,25),this.git7=A(this.git7,25)),this.gitInv0=this.gitInv0||M(this.git0),this.gitInv1=this.gitInv1||M(this.git1),this.gitInv2=this.gitInv2||M(this.git2),this.gitInv3=this.gitInv3||M(this.git3),this.gitInv4=this.gitInv4||M(this.git4),this.gitInv5=this.gitInv5||M(this.git5),this.gitInv6=this.gitInv6||M(this.git6),this.gitInv7=this.gitInv7||M(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||Gt,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Kt}calculate(e){if(typeof e!=`object`){this.updateColors();return}let t=Object.keys(e);t.forEach(t=>{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]})}},ln=i(e=>{let t=new cn;return t.calculate(e),t},`getThemeVariables`),un=class{static{i(this,`Theme`)}constructor(){this.background=`#333`,this.primaryColor=`#1f2020`,this.secondaryColor=k(this.primaryColor,16),this.tertiaryColor=j(this.primaryColor,{h:-160}),this.primaryBorderColor=M(this.background),this.secondaryBorderColor=R(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=R(this.tertiaryColor,this.darkMode),this.primaryTextColor=M(this.primaryColor),this.secondaryTextColor=M(this.secondaryColor),this.tertiaryTextColor=M(this.tertiaryColor),this.mainBkg=`#111113`,this.secondBkg=`calculated`,this.mainContrastColor=`lightgrey`,this.darkTextColor=k(M(`#323D47`),10),this.border1=`#ccc`,this.border2=w(255,255,255,.25),this.arrowheadColor=M(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||j(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||j(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||R(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||R(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||R(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||R(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||`#fff5ad`,this.noteTextColor=this.noteTextColor||`#FFFFFF`,this.secondaryTextColor=this.secondaryTextColor||M(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||M(this.tertiaryColor),this.lineColor=this.lineColor||M(this.background),this.arrowheadColor=this.arrowheadColor||M(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?A(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||A(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||M(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||k(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||j(this.primaryColor,{h:30}),this.cScale4=this.cScale4||j(this.primaryColor,{h:60}),this.cScale5=this.cScale5||j(this.primaryColor,{h:90}),this.cScale6=this.cScale6||j(this.primaryColor,{h:120}),this.cScale7=this.cScale7||j(this.primaryColor,{h:150}),this.cScale8=this.cScale8||j(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||j(this.primaryColor,{h:270}),this.cScale10=this.cScale10||j(this.primaryColor,{h:300}),this.cScale11=this.cScale11||j(this.primaryColor,{h:330}),this.darkMode)for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScale`+e]=A(this[`cScale`+e],75);else for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScale`+e]=A(this[`cScale`+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScaleInv`+e]=this[`cScaleInv`+e]||M(this[`cScale`+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this.darkMode?this[`cScalePeer`+e]=this[`cScalePeer`+e]||k(this[`cScale`+e],10):this[`cScalePeer`+e]=this[`cScalePeer`+e]||A(this[`cScale`+e],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScaleLabel`+e]=this[`cScaleLabel`+e]||this.scaleLabelColor;let e=this.darkMode?-4:-1;for(let t=0;t<5;t++)this[`surface`+t]=this[`surface`+t]||j(this.mainBkg,{h:180,s:-15,l:e*(5+t*3)}),this[`surfacePeer`+t]=this[`surfacePeer`+t]||j(this.mainBkg,{h:180,s:-15,l:e*(8+t*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||j(this.primaryColor,{h:64}),this.fillType3=this.fillType3||j(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||j(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||j(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||j(this.primaryColor,{h:128}),this.fillType7=this.fillType7||j(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||j(this.primaryColor,{l:-10}),this.pie5=this.pie5||j(this.secondaryColor,{l:-10}),this.pie6=this.pie6||j(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||j(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||j(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||j(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||j(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||j(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||j(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||j(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||j(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||j(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||j(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||j(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||j(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||D(this.quadrant1Fill)?k(this.quadrant1Fill):A(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?A(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||j(this.primaryColor,{h:-30}),this.git4=this.git4||j(this.primaryColor,{h:-60}),this.git5=this.git5||j(this.primaryColor,{h:-90}),this.git6=this.git6||j(this.primaryColor,{h:60}),this.git7=this.git7||j(this.primaryColor,{h:120}),this.darkMode?(this.git0=k(this.git0,25),this.git1=k(this.git1,25),this.git2=k(this.git2,25),this.git3=k(this.git3,25),this.git4=k(this.git4,25),this.git5=k(this.git5,25),this.git6=k(this.git6,25),this.git7=k(this.git7,25)):(this.git0=A(this.git0,25),this.git1=A(this.git1,25),this.git2=A(this.git2,25),this.git3=A(this.git3,25),this.git4=A(this.git4,25),this.git5=A(this.git5,25),this.git6=A(this.git6,25),this.git7=A(this.git7,25)),this.gitInv0=this.gitInv0||M(this.git0),this.gitInv1=this.gitInv1||M(this.git1),this.gitInv2=this.gitInv2||M(this.git2),this.gitInv3=this.gitInv3||M(this.git3),this.gitInv4=this.gitInv4||M(this.git4),this.gitInv5=this.gitInv5||M(this.git5),this.gitInv6=this.gitInv6||M(this.git6),this.gitInv7=this.gitInv7||M(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||Gt,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Kt}calculate(e){if(typeof e!=`object`){this.updateColors();return}let t=Object.keys(e);t.forEach(t=>{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]})}},dn=i(e=>{let t=new un;return t.calculate(e),t},`getThemeVariables`),fn=class{static{i(this,`Theme`)}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=R(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||j(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||j(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||R(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||R(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||R(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||R(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||`#fff5ad`,this.noteTextColor=this.noteTextColor||`#28253D`,this.secondaryTextColor=this.secondaryTextColor||M(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||M(this.tertiaryColor),this.lineColor=this.lineColor||M(this.background),this.arrowheadColor=this.arrowheadColor||M(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?A(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||A(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||M(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;let e=`#ECECFE`,t=`#E9E9F1`,n=j(e,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||n,this.altSectionBkgColor=this.altSectionBkgColor||`white`,this.sectionBkgColor=this.sectionBkgColor||t,this.sectionBkgColor2=this.sectionBkgColor2||e,this.excludeBkgColor=this.excludeBkgColor||`#eeeeee`,this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||e,this.activeTaskBorderColor=this.activeTaskBorderColor||e,this.activeTaskBkgColor=this.activeTaskBkgColor||k(e,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 e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScaleInv`+e]=this[`cScaleInv`+e]||M(this[`cScale`+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this.darkMode?this[`cScalePeer`+e]=this[`cScalePeer`+e]||k(this[`cScale`+e],10):this[`cScalePeer`+e]=this[`cScalePeer`+e]||A(this[`cScale`+e],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScaleLabel`+e]=this[`cScaleLabel`+e]||this.scaleLabelColor;let r=this.darkMode?-4:-1;for(let e=0;e<5;e++)this[`surface`+e]=this[`surface`+e]||j(this.mainBkg,{h:180,s:-15,l:r*(5+e*3)}),this[`surfacePeer`+e]=this[`surfacePeer`+e]||j(this.mainBkg,{h:180,s:-15,l:r*(8+e*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||e,this.fillType1=this.fillType1||t,this.fillType2=this.fillType2||j(e,{h:64}),this.fillType3=this.fillType3||j(t,{h:64}),this.fillType4=this.fillType4||j(e,{h:-64}),this.fillType5=this.fillType5||j(t,{h:-64}),this.fillType6=this.fillType6||j(e,{h:128}),this.fillType7=this.fillType7||j(t,{h:128}),this.pie1=this.pie1||e,this.pie2=this.pie2||t,this.pie3=this.pie3||n,this.pie4=this.pie4||j(e,{l:-10}),this.pie5=this.pie5||j(t,{l:-10}),this.pie6=this.pie6||j(n,{l:-10}),this.pie7=this.pie7||j(e,{h:60,l:-10}),this.pie8=this.pie8||j(e,{h:-60,l:-10}),this.pie9=this.pie9||j(e,{h:120,l:0}),this.pie10=this.pie10||j(e,{h:60,l:-20}),this.pie11=this.pie11||j(e,{h:-60,l:-20}),this.pie12=this.pie12||j(e,{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||e,this.quadrant2Fill=this.quadrant2Fill||j(e,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||j(e,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||j(e,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||j(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||j(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||j(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||D(this.quadrant1Fill)?k(this.quadrant1Fill):A(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||e,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?A(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||e,this.git1=this.git1||t,this.git2=this.git2||n,this.git3=this.git3||j(e,{h:-30}),this.git4=this.git4||j(e,{h:-60}),this.git5=this.git5||j(e,{h:-90}),this.git6=this.git6||j(e,{h:60}),this.git7=this.git7||j(e,{h:120}),this.darkMode?(this.git0=k(this.git0,25),this.git1=k(this.git1,25),this.git2=k(this.git2,25),this.git3=k(this.git3,25),this.git4=k(this.git4,25),this.git5=k(this.git5,25),this.git6=k(this.git6,25),this.git7=k(this.git7,25)):(this.git0=A(this.git0,25),this.git1=A(this.git1,25),this.git2=A(this.git2,25),this.git3=A(this.git3,25),this.git4=A(this.git4,25),this.git5=A(this.git5,25),this.git6=A(this.git6,25),this.git7=A(this.git7,25)),this.gitInv0=this.gitInv0||M(this.git0),this.gitInv1=this.gitInv1||M(this.git1),this.gitInv2=this.gitInv2||M(this.git2),this.gitInv3=this.gitInv3||M(this.git3),this.gitInv4=this.gitInv4||M(this.git4),this.gitInv5=this.gitInv5||M(this.git5),this.gitInv6=this.gitInv6||M(this.git6),this.gitInv7=this.gitInv7||M(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||Gt,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Kt}calculate(e){if(typeof e!=`object`){this.updateColors();return}let t=Object.keys(e);t.forEach(t=>{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]})}},pn=i(e=>{let t=new fn;return t.calculate(e),t},`getThemeVariables`),mn=class{static{i(this,`Theme`)}constructor(){this.background=`#333`,this.primaryColor=`#1f2020`,this.secondaryColor=k(this.primaryColor,16),this.tertiaryColor=j(this.primaryColor,{h:-160}),this.primaryBorderColor=M(this.background),this.secondaryBorderColor=R(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=R(this.tertiaryColor,this.darkMode),this.primaryTextColor=M(this.primaryColor),this.secondaryTextColor=M(this.secondaryColor),this.tertiaryTextColor=M(this.tertiaryColor),this.mainBkg=`#111113`,this.secondBkg=`calculated`,this.mainContrastColor=`lightgrey`,this.darkTextColor=k(M(`#323D47`),10),this.border1=`#ccc`,this.border2=w(255,255,255,.25),this.arrowheadColor=M(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||j(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||j(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||R(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||R(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||R(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||R(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||`#fff5ad`,this.noteTextColor=this.noteTextColor||`#FFFFFF`,this.secondaryTextColor=this.secondaryTextColor||M(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||M(this.tertiaryColor),this.lineColor=this.lineColor||M(this.background),this.arrowheadColor=this.arrowheadColor||M(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?A(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||A(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||M(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||k(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 e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScaleInv`+e]=this[`cScaleInv`+e]||M(this[`cScale`+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this.darkMode?this[`cScalePeer`+e]=this[`cScalePeer`+e]||k(this[`cScale`+e],10):this[`cScalePeer`+e]=this[`cScalePeer`+e]||A(this[`cScale`+e],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScaleLabel`+e]=A(this[`cScale`+e],75);let e=this.darkMode?-4:-1;for(let t=0;t<5;t++)this[`surface`+t]=this[`surface`+t]||j(this.mainBkg,{h:180,s:-15,l:e*(5+t*3)}),this[`surfacePeer`+t]=this[`surfacePeer`+t]||j(this.mainBkg,{h:180,s:-15,l:e*(8+t*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||j(this.primaryColor,{h:64}),this.fillType3=this.fillType3||j(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||j(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||j(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||j(this.primaryColor,{h:128}),this.fillType7=this.fillType7||j(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||j(this.primaryColor,{l:-10}),this.pie5=this.pie5||j(this.secondaryColor,{l:-10}),this.pie6=this.pie6||j(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||j(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||j(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||j(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||j(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||j(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||j(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||j(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||j(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||j(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||j(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||j(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||j(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||D(this.quadrant1Fill)?k(this.quadrant1Fill):A(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?A(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||j(this.primaryColor,{h:-30}),this.git4=this.git4||j(this.primaryColor,{h:-60}),this.git5=this.git5||j(this.primaryColor,{h:-90}),this.git6=this.git6||j(this.primaryColor,{h:60}),this.git7=this.git7||j(this.primaryColor,{h:120}),this.darkMode?(this.git0=k(this.git0,25),this.git1=k(this.git1,25),this.git2=k(this.git2,25),this.git3=k(this.git3,25),this.git4=k(this.git4,25),this.git5=k(this.git5,25),this.git6=k(this.git6,25),this.git7=k(this.git7,25)):(this.git0=A(this.git0,25),this.git1=A(this.git1,25),this.git2=A(this.git2,25),this.git3=A(this.git3,25),this.git4=A(this.git4,25),this.git5=A(this.git5,25),this.git6=A(this.git6,25),this.git7=A(this.git7,25)),this.gitInv0=this.gitInv0||M(this.git0),this.gitInv1=this.gitInv1||M(this.git1),this.gitInv2=this.gitInv2||M(this.git2),this.gitInv3=this.gitInv3||M(this.git3),this.gitInv4=this.gitInv4||M(this.git4),this.gitInv5=this.gitInv5||M(this.git5),this.gitInv6=this.gitInv6||M(this.git6),this.gitInv7=this.gitInv7||M(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||Gt,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Kt}calculate(e){if(typeof e!=`object`){this.updateColors();return}let t=Object.keys(e);t.forEach(t=>{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]})}},hn={base:{getThemeVariables:Jt},dark:{getThemeVariables:Xt},default:{getThemeVariables:Qt},forest:{getThemeVariables:en},neutral:{getThemeVariables:nn},neo:{getThemeVariables:an},"neo-dark":{getThemeVariables:sn},redux:{getThemeVariables:ln},"redux-dark":{getThemeVariables:dn},"redux-color":{getThemeVariables:pn},"redux-dark-color":{getThemeVariables:i(e=>{let t=new mn;return t.calculate(e),t},`getThemeVariables`)}},gn={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},_n={...gn,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:`BRANDES_KOEPF`,nodePlacementAlignment:`NONE`,forceNodeModelOrder:!1,considerModelOrder:`NODES_AND_EDGES`,keepEntryNodeOnTop:!1},themeCSS:void 0,themeVariables:hn.default.getThemeVariables(),sequence:{...gn.sequence,messageFont:i(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},`messageFont`),noteFont:i(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},`noteFont`),actorFont:i(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},`actorFont`)},class:{defaultRenderer:`dagre-wrapper`,hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},gantt:{...gn.gantt,tickInterval:void 0,useWidth:void 0},c4:{...gn.c4,useWidth:void 0,personFont:i(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},`personFont`),flowchart:{...gn.flowchart,inheritDir:!1},external_personFont:i(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},`external_personFont`),systemFont:i(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},`systemFont`),external_systemFont:i(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},`external_systemFont`),system_dbFont:i(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},`system_dbFont`),external_system_dbFont:i(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},`external_system_dbFont`),system_queueFont:i(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},`system_queueFont`),external_system_queueFont:i(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},`external_system_queueFont`),containerFont:i(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},`containerFont`),external_containerFont:i(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},`external_containerFont`),container_dbFont:i(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},`container_dbFont`),external_container_dbFont:i(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},`external_container_dbFont`),container_queueFont:i(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},`container_queueFont`),external_container_queueFont:i(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},`external_container_queueFont`),componentFont:i(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},`componentFont`),external_componentFont:i(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},`external_componentFont`),component_dbFont:i(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},`component_dbFont`),external_component_dbFont:i(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},`external_component_dbFont`),component_queueFont:i(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},`component_queueFont`),external_component_queueFont:i(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},`external_component_queueFont`),boundaryFont:i(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},`boundaryFont`),messageFont:i(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},`messageFont`)},pie:{...gn.pie,useWidth:984},xyChart:{...gn.xyChart,useWidth:void 0},requirement:{...gn.requirement,useWidth:void 0},packet:{...gn.packet},eventmodeling:{...gn.eventmodeling},treeView:{...gn.treeView,useWidth:void 0},radar:{...gn.radar},railroad:{...gn.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:{...gn.ishikawa},sankey:{...gn.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:{...gn.venn},cynefin:{...gn.cynefin}},vn=i((e,t=``)=>Object.keys(e).reduce((n,r)=>Array.isArray(e[r])?n:typeof e[r]==`object`&&e[r]!==null?[...n,t+r,...vn(e[r],``)]:[...n,t+r],[]),`keyify`),yn=new Set(vn(_n,``)),bn=_n,xn={nodeColors:/^#[\da-f]{3,8}$|^rgb\([\d\s%,.]+\)$|^hsl\([\d\s%,.]+\)$|^[a-z]+$/i,filenameIcons:/^[\w-]+(?::[\w-]+)?$/,extensionIcons:/^[\w-]+(?::[\w-]+)?$/},Sn=i((e,t)=>{for(let n of Object.keys(e)){let r=e[n];(n.startsWith(`__`)||n.includes(`proto`)||n.includes(`constr`)||typeof r!=`string`||!t.test(r))&&(l.debug(`sanitize deleting dictionary entry:`,n,r),delete e[n])}},`sanitizeDictionaryConfig`),Cn=i(e=>{if(l.debug(`sanitizeDirective called with`,e),typeof e==`object`&&e){if(Array.isArray(e))e.forEach(e=>Cn(e));else{for(let t of Object.keys(e))if(l.debug(`Checking key`,t),t.startsWith(`__`)||t.includes(`proto`)||t.includes(`constr`)||!yn.has(t)||e[t]==null)l.debug(`sanitize deleting key: `,t),delete e[t];else if(typeof e[t]==`object`){let n=xn[t];n?Sn(e[t],n):(l.debug(`sanitizing object`,t),Cn(e[t]))}else for(let n of[`themeCSS`,`fontFamily`,`altFontFamily`])t.includes(n)&&(l.debug(`sanitizing css option`,t),e[t]=wn(e[t]));if(e.themeVariables)for(let t of Object.keys(e.themeVariables)){let n=e.themeVariables[t];n?.match&&!n.match(/^[\d "#%(),.;A-Za-z]+$/)&&(e.themeVariables[t]=``)}l.debug(`After sanitization`,e)}}},`sanitizeDirective`),wn=i(e=>{let t=0,n=0;for(let r of e){if(t<n)return`{ /* ERROR: Unbalanced CSS */ }`;r===`{`?t++:r===`}`&&n++}return t===n?e:`{ /* ERROR: Unbalanced CSS */ }`},`sanitizeCss`),Tn=Object.freeze(bn),En=i(e=>!(e===!1||[`false`,`null`,`0`].includes(String(e).trim().toLowerCase())),`evaluate`),Dn=Wt({},Tn),On,kn=[],An=Wt({},Tn),jn=i((e,t)=>{let n=Wt({},e),r={};for(let e of t)Ln(e),r=Wt(r,e);if(n=Wt(n,r),r.theme&&r.theme in hn){let e=Wt(Wt({},On).themeVariables||{},r.themeVariables);n.theme&&n.theme in hn&&(n.themeVariables=hn[n.theme].getThemeVariables(e))}return An=n,Un(An),An},`updateCurrentConfig`),Mn=i(e=>(Dn=Wt({},Tn),Dn=Wt(Dn,e),e.theme&&hn[e.theme]&&(Dn.themeVariables=hn[e.theme].getThemeVariables(e.themeVariables)),jn(Dn,kn),Dn),`setSiteConfig`),Nn=i(e=>{On=Wt({},e)},`saveConfigFromInitialize`),Pn=i(e=>(Dn=Wt(Dn,e),jn(Dn,kn),Dn),`updateSiteConfig`),Fn=i(()=>Wt({},Dn),`getSiteConfig`),In=i(e=>(jn(An,[e]),z()),`setConfig`),z=i(()=>Wt({},An),`getConfig`),Ln=i(e=>{e&&([`secure`,...Dn.secure??[]].forEach(t=>{Object.hasOwn(e,t)&&(l.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`&&Ln(e[t])}))},`sanitize`),Rn=i(e=>{Cn(e),e.fontFamily&&!e.themeVariables?.fontFamily&&(e.themeVariables={...e.themeVariables,fontFamily:e.fontFamily}),kn.push(e),jn(Dn,kn)},`addDirective`),zn=i((e=Dn)=>{kn=[],jn(e,kn)},`reset`),Bn={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.`},Vn={},Hn=i(e=>{Vn[e]||(l.warn(Bn[e]),Vn[e]=!0)},`issueWarning`),Un=i(e=>{e&&(e.lazyLoadedDiagrams||e.loadExternalDiagramsAtStartup)&&Hn(`LAZY_LOAD_DEPRECATED`)},`checkConfig`),Wn=i(()=>{let e={};On&&(e=Wt(e,On));for(let t of kn)e=Wt(e,t);return e},`getUserDefinedConfig`),Gn=i(e=>(e.flowchart?.htmlLabels!=null&&Hn(`FLOWCHART_HTML_LABELS_DEPRECATED`),En(e.htmlLabels??e.flowchart?.htmlLabels??!0)),`getEffectiveHtmlLabels`),Kn=/^([^\S\n\r]*)-{3}\s*[\n\r](.*?)[\n\r]\1-{3}\s*[\n\r]+/s,qn=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,Jn=/\s*%%.*\n/gm,Yn=class extends Error{static{i(this,`UnknownDiagramError`)}constructor(e){super(e),this.name=`UnknownDiagramError`}},Xn={},Zn=i(function(e,t){e=e.replace(Kn,``).replace(qn,``).replace(Jn,`
|
|
5
|
+
`);for(let[n,{detector:r}]of Object.entries(Xn))if(r(e,t))return n;throw new Yn(`No diagram type detected matching given configuration for text: ${e}`)},`detectType`),Qn=i((...e)=>{for(let{id:t,detector:n,loader:r}of e)$n(t,n,r)},`registerLazyLoadedDiagrams`),$n=i((e,t,n)=>{Xn[e]&&l.warn(`Detector with key ${e} already exists. Overwriting.`),Xn[e]={detector:t,loader:n},l.debug(`Detector with key ${e} added${n?` with loader`:``}`)},`addDetector`),er=i(e=>Xn[e].loader,`getDiagramLoader`),tr=/<br\s*\/?>/gi,nr=i(e=>e?fr(e).replace(/\\n/g,`#br#`).split(`#br#`):[``],`getRows`),rr=(()=>{let e=!1;return()=>{e||=(ir(),!0)}})();function ir(){let e=`data-temp-href-target`;Ht.addHook(`beforeSanitizeAttributes`,t=>{t.tagName===`A`&&t.hasAttribute(`target`)&&t.setAttribute(e,t.getAttribute(`target`)??``)}),Ht.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`))})}i(ir,`setupDompurifyHooks`);var ar=i(e=>(rr(),Ht.sanitize(e)),`removeScript`),or=i((e,t)=>{if(Gn(t)){let n=t.securityLevel;n===`antiscript`||n===`strict`||n===`sandbox`?e=ar(e):n!==`loose`&&(e=fr(e),e=e.replace(/</g,`<`).replace(/>/g,`>`),e=e.replace(/=/g,`=`),e=dr(e))}return e},`sanitizeMore`),sr=i((e,t)=>e&&(e=t.dompurifyConfig?Ht.sanitize(or(e,t),t.dompurifyConfig).toString():Ht.sanitize(or(e,t),{FORBID_TAGS:[`style`]}).toString(),e),`sanitizeText`),cr=i((e,t)=>typeof e==`string`?sr(e,t):e.flat().map(e=>sr(e,t)),`sanitizeTextOrArray`),lr=i(e=>tr.test(e),`hasBreaks`),ur=i(e=>e.split(tr),`splitBreaks`),dr=i(e=>e.replace(/#br#/g,`<br/>`),`placeholderToBreak`),fr=i(e=>e.replace(tr,`#br#`),`breakToPlaceholder`),pr=i(e=>{let t=``;return e&&(t=window.location.protocol+`//`+window.location.host+window.location.pathname+window.location.search,t=CSS.escape(t)),t},`getUrl`),mr=i(function(...e){let t=e.filter(e=>!isNaN(e));return Math.max(...t)},`getMax`),hr=i(function(...e){let t=e.filter(e=>!isNaN(e));return Math.min(...t)},`getMin`),gr=i(function(e){let t=e.split(/(,)/),n=[];for(let e=0;e<t.length;e++){let r=t[e];if(r===`,`&&e>0&&e+1<t.length){let i=t[e-1],a=t[e+1];vr(i,a)&&(r=i+`,`+a,e++,n.pop())}n.push(yr(r))}return n.join(``)},`parseGenericTypes`),_r=i((e,t)=>Math.max(0,e.split(t).length-1),`countOccurrence`),vr=i((e,t)=>{let n=_r(e,`~`),r=_r(t,`~`);return n===1&&r===1},`shouldCombineSets`),yr=i(e=>{let t=_r(e,`~`),n=!1;if(t<=1)return e;t%2!=0&&e.startsWith(`~`)&&(e=e.substring(1),n=!0);let r=[...e],i=r.indexOf(`~`),a=r.lastIndexOf(`~`);for(;i!==-1&&a!==-1&&i!==a;)r[i]=`<`,r[a]=`>`,i=r.indexOf(`~`),a=r.lastIndexOf(`~`);return n&&r.unshift(`~`),r.join(``)},`processSet`),br=i(()=>window.MathMLElement!==void 0,`isMathMLSupported`),xr=/\$\$(.*?)\$\$/g,Sr=i(e=>(e.match(xr)?.length??0)>0,`hasKatex`),Cr=i(async(e,t)=>{let n=document.createElement(`div`);n.innerHTML=await Tr(e,t),n.id=`katex-temp`,n.style.visibility=`hidden`,n.style.position=`absolute`,n.style.top=`0`,document.querySelector(`body`)?.insertAdjacentElement(`beforeend`,n);let r={width:n.clientWidth,height:n.clientHeight};return n.remove(),r},`calculateMathMLDimensions`),wr=i(async(e,t)=>{if(!Sr(e))return e;if(!(br()||t.legacyMathML||t.forceLegacyMathML))return e.replace(xr,`MathML is unsupported in this environment.`);{let{default:r}=await n(async()=>{let{default:e}=await import(`./katex-BreMo9lq.js`);return{default:e}},[]),i=t.forceLegacyMathML||!br()&&t.legacyMathML?`htmlAndMathml`:`mathml`;return e.split(tr).map(e=>Sr(e)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${e}</div>`:`<div>${e}</div>`).join(``).replace(xr,(e,t)=>r.renderToString(t,{throwOnError:!0,displayMode:!0,output:i}).replace(/\n/g,` `).replace(/<annotation.*<\/annotation>/g,``))}},`renderKatexUnsanitized`),Tr=i(async(e,t)=>sr(await wr(e,t),t),`renderKatexSanitized`),Er={getRows:nr,sanitizeText:sr,sanitizeTextOrArray:cr,hasBreaks:lr,splitBreaks:ur,lineBreakRegex:tr,removeScript:ar,getUrl:pr,evaluate:En,getMax:mr,getMin:hr},Dr=i(function(e,t){for(let n of t)e.attr(n[0],n[1])},`d3Attrs`),Or=i(function(e,t,n){let r=new Map;return n?(r.set(`width`,`100%`),r.set(`style`,`max-width: ${t}px;`)):(r.set(`height`,e),r.set(`width`,t)),r},`calculateSvgSizeAttrs`),kr=i(function(e,t,n,r){Dr(e,Or(t,n,r))},`configureSvgSize`),Ar=i(function(e,t,n,r){let i=t.node().getBBox(),a=i.width,o=i.height;l.info(`SVG bounds: ${a}x${o}`,i);let s=0,c=0;l.info(`Graph bounds: ${s}x${c}`,e),s=a+n*2,c=o+n*2,l.info(`Calculated bounds: ${s}x${c}`),kr(t,c,s,r);let u=`${i.x-n} ${i.y-n} ${i.width+2*n} ${i.height+2*n}`;t.attr(`viewBox`,u)},`setupGraphViewbox`),jr={};function Mr(e){return[...e.cssRules].map(e=>e.cssText).join(`
|
|
6
|
+
`)}i(Mr,`cssStyleSheetToString`);var Nr=i((e,t,n,r)=>{let i=``;return e in jr&&jr[e]?i=jr[e]({...n,svgId:r}):l.warn(`No theme found for ${e}`),`& {
|
|
7
|
+
font-family: ${n.fontFamily};
|
|
8
|
+
font-size: ${n.fontSize};
|
|
9
|
+
fill: ${n.textColor}
|
|
10
|
+
}
|
|
11
|
+
@keyframes edge-animation-frame {
|
|
12
|
+
from {
|
|
13
|
+
stroke-dashoffset: 0;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
@keyframes dash {
|
|
17
|
+
to {
|
|
18
|
+
stroke-dashoffset: 0;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
& .edge-animation-slow {
|
|
22
|
+
stroke-dasharray: 9,5 !important;
|
|
23
|
+
stroke-dashoffset: 900;
|
|
24
|
+
animation: dash 50s linear infinite;
|
|
25
|
+
stroke-linecap: round;
|
|
26
|
+
}
|
|
27
|
+
& .edge-animation-fast {
|
|
28
|
+
stroke-dasharray: 9,5 !important;
|
|
29
|
+
stroke-dashoffset: 900;
|
|
30
|
+
animation: dash 20s linear infinite;
|
|
31
|
+
stroke-linecap: round;
|
|
32
|
+
}
|
|
33
|
+
/* Classes common for multiple diagrams */
|
|
34
|
+
|
|
35
|
+
& .error-icon {
|
|
36
|
+
fill: ${n.errorBkgColor};
|
|
37
|
+
}
|
|
38
|
+
& .error-text {
|
|
39
|
+
fill: ${n.errorTextColor};
|
|
40
|
+
stroke: ${n.errorTextColor};
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
& .edge-thickness-normal {
|
|
44
|
+
stroke-width: ${n.strokeWidth??1}px;
|
|
45
|
+
}
|
|
46
|
+
& .edge-thickness-thick {
|
|
47
|
+
stroke-width: 3.5px
|
|
48
|
+
}
|
|
49
|
+
& .edge-pattern-solid {
|
|
50
|
+
stroke-dasharray: 0;
|
|
51
|
+
}
|
|
52
|
+
& .edge-thickness-invisible {
|
|
53
|
+
stroke-width: 0;
|
|
54
|
+
fill: none;
|
|
55
|
+
}
|
|
56
|
+
& .edge-pattern-dashed{
|
|
57
|
+
stroke-dasharray: 3;
|
|
58
|
+
}
|
|
59
|
+
.edge-pattern-dotted {
|
|
60
|
+
stroke-dasharray: 2;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
& .marker {
|
|
64
|
+
fill: ${n.lineColor};
|
|
65
|
+
stroke: ${n.lineColor};
|
|
66
|
+
}
|
|
67
|
+
& .marker.cross {
|
|
68
|
+
stroke: ${n.lineColor};
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
& svg {
|
|
72
|
+
font-family: ${n.fontFamily};
|
|
73
|
+
font-size: ${n.fontSize};
|
|
74
|
+
}
|
|
75
|
+
& p {
|
|
76
|
+
margin: 0
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
${i}
|
|
80
|
+
.node .neo-node {
|
|
81
|
+
stroke: ${n.nodeBorder};
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
[data-look="neo"].node rect, [data-look="neo"].cluster rect, [data-look="neo"].node polygon {
|
|
85
|
+
stroke: ${n.useGradient?`url(`+r+`-gradient)`:n.nodeBorder};
|
|
86
|
+
filter: ${n.dropShadow?n.dropShadow.replace(`url(#drop-shadow)`,`url(${r}-drop-shadow)`):`none`};
|
|
87
|
+
}
|
|
88
|
+
[data-look="neo"].swimlane.cluster rect {
|
|
89
|
+
filter: none;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
[data-look="neo"].node path {
|
|
94
|
+
stroke: ${n.useGradient?`url(`+r+`-gradient)`:n.nodeBorder};
|
|
95
|
+
stroke-width: ${n.strokeWidth??1}px;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
[data-look="neo"].node .outer-path {
|
|
99
|
+
filter: ${n.dropShadow?n.dropShadow.replace(`url(#drop-shadow)`,`url(${r}-drop-shadow)`):`none`};
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
[data-look="neo"].node .neo-line path {
|
|
103
|
+
stroke: ${n.nodeBorder};
|
|
104
|
+
filter: none;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
[data-look="neo"].node circle{
|
|
108
|
+
stroke: ${n.useGradient?`url(`+r+`-gradient)`:n.nodeBorder};
|
|
109
|
+
filter: ${n.dropShadow?n.dropShadow.replace(`url(#drop-shadow)`,`url(${r}-drop-shadow)`):`none`};
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
[data-look="neo"].node circle .state-start{
|
|
113
|
+
fill: #000000;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
[data-look="neo"].icon-shape .icon {
|
|
117
|
+
fill: ${n.useGradient?`url(`+r+`-gradient)`:n.nodeBorder};
|
|
118
|
+
filter: ${n.dropShadow?n.dropShadow.replace(`url(#drop-shadow)`,`url(${r}-drop-shadow)`):`none`};
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
[data-look="neo"].icon-shape .icon-neo path {
|
|
122
|
+
stroke: ${n.useGradient?`url(`+r+`-gradient)`:n.nodeBorder};
|
|
123
|
+
filter: ${n.dropShadow?n.dropShadow.replace(`url(#drop-shadow)`,`url(${r}-drop-shadow)`):`none`};
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
${t}
|
|
127
|
+
`},`getStyles`),Pr=i((e,t)=>{t!==void 0&&(jr[e]=t)},`addStylesForDiagram`),Fr=Nr,Ir={};a(Ir,{clear:()=>Vr,getAccDescription:()=>Gr,getAccTitle:()=>Ur,getDiagramTitle:()=>qr,setAccDescription:()=>Wr,setAccTitle:()=>Hr,setDiagramTitle:()=>Kr});var Lr=``,Rr=``,zr=``,Br=i(e=>sr(e,z()),`sanitizeText`),Vr=i(()=>{Lr=``,zr=``,Rr=``},`clear`),Hr=i(e=>{Lr=Br(e).replace(/^\s+/g,``)},`setAccTitle`),Ur=i(()=>Lr,`getAccTitle`),Wr=i(e=>{zr=Br(e).replace(/\n\s+/g,`
|
|
128
|
+
`)},`setAccDescription`),Gr=i(()=>zr,`getAccDescription`),Kr=i(e=>{Rr=Br(e)},`setDiagramTitle`),qr=i(()=>Rr,`getDiagramTitle`),Jr=l,Yr=u,B=z,Xr=In,Zr=Tn,Qr=i(e=>sr(e,B()),`sanitizeText`),$r=Ar,ei=i(()=>Ir,`getCommonDb`),ti={},ni=i((e,t,n)=>{ti[e]&&Jr.warn(`Diagram with id ${e} already registered. Overwriting.`),ti[e]=t,n&&$n(e,n),Pr(e,t.styles),t.injectUtils?.(Jr,Yr,B,Qr,$r,ei(),()=>{})},`registerDiagram`),ri=i(e=>{if(e in ti)return ti[e];throw new ii(e)},`getDiagram`),ii=class extends Error{static{i(this,`DiagramNotFoundError`)}constructor(e){super(`Diagram ${e} not found.`)}},ai=`http://www.w3.org/1999/xhtml`,oi={svg:`http://www.w3.org/2000/svg`,xhtml:ai,xlink:`http://www.w3.org/1999/xlink`,xml:`http://www.w3.org/XML/1998/namespace`,xmlns:`http://www.w3.org/2000/xmlns/`};function si(e){var t=e+=``,n=t.indexOf(`:`);return n>=0&&(t=e.slice(0,n))!==`xmlns`&&(e=e.slice(n+1)),oi.hasOwnProperty(t)?{space:oi[t],local:e}:e}function ci(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===ai&&t.documentElement.namespaceURI===ai?t.createElement(e):t.createElementNS(n,e)}}function li(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function ui(e){var t=si(e);return(t.local?li:ci)(t)}function di(){}function fi(e){return e==null?di:function(){return this.querySelector(e)}}function pi(e){typeof e!=`function`&&(e=fi(e));for(var t=this._groups,n=t.length,r=Array(n),i=0;i<n;++i)for(var a=t[i],o=a.length,s=r[i]=Array(o),c,l,u=0;u<o;++u)(c=a[u])&&(l=e.call(c,c.__data__,u,a))&&(`__data__`in c&&(l.__data__=c.__data__),s[u]=l);return new to(r,this._parents)}function mi(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function hi(){return[]}function gi(e){return e==null?hi:function(){return this.querySelectorAll(e)}}function _i(e){return function(){return mi(e.apply(this,arguments))}}function vi(e){e=typeof e==`function`?_i(e):gi(e);for(var t=this._groups,n=t.length,r=[],i=[],a=0;a<n;++a)for(var o=t[a],s=o.length,c,l=0;l<s;++l)(c=o[l])&&(r.push(e.call(c,c.__data__,l,o)),i.push(c));return new to(r,i)}function yi(e){return function(){return this.matches(e)}}function bi(e){return function(t){return t.matches(e)}}var xi=Array.prototype.find;function Si(e){return function(){return xi.call(this.children,e)}}function Ci(){return this.firstElementChild}function wi(e){return this.select(e==null?Ci:Si(typeof e==`function`?e:bi(e)))}var Ti=Array.prototype.filter;function Ei(){return Array.from(this.children)}function Di(e){return function(){return Ti.call(this.children,e)}}function Oi(e){return this.selectAll(e==null?Ei:Di(typeof e==`function`?e:bi(e)))}function ki(e){typeof e!=`function`&&(e=yi(e));for(var t=this._groups,n=t.length,r=Array(n),i=0;i<n;++i)for(var a=t[i],o=a.length,s=r[i]=[],c,l=0;l<o;++l)(c=a[l])&&e.call(c,c.__data__,l,a)&&s.push(c);return new to(r,this._parents)}function Ai(e){return Array(e.length)}function ji(){return new to(this._enter||this._groups.map(Ai),this._parents)}function Mi(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}Mi.prototype={constructor:Mi,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function Ni(e){return function(){return e}}function Pi(e,t,n,r,i,a){for(var o=0,s,c=t.length,l=a.length;o<l;++o)(s=t[o])?(s.__data__=a[o],r[o]=s):n[o]=new Mi(e,a[o]);for(;o<c;++o)(s=t[o])&&(i[o]=s)}function Fi(e,t,n,r,i,a,o){var s,c,l=new Map,u=t.length,d=a.length,f=Array(u),p;for(s=0;s<u;++s)(c=t[s])&&(f[s]=p=o.call(c,c.__data__,s,t)+``,l.has(p)?i[s]=c:l.set(p,c));for(s=0;s<d;++s)p=o.call(e,a[s],s,a)+``,(c=l.get(p))?(r[s]=c,c.__data__=a[s],l.delete(p)):n[s]=new Mi(e,a[s]);for(s=0;s<u;++s)(c=t[s])&&l.get(f[s])===c&&(i[s]=c)}function Ii(e){return e.__data__}function Li(e,t){if(!arguments.length)return Array.from(this,Ii);var n=t?Fi:Pi,r=this._parents,i=this._groups;typeof e!=`function`&&(e=Ni(e));for(var a=i.length,o=Array(a),s=Array(a),c=Array(a),l=0;l<a;++l){var u=r[l],d=i[l],f=d.length,p=Ri(e.call(u,u&&u.__data__,l,r)),m=p.length,h=s[l]=Array(m),g=o[l]=Array(m);n(u,d,h,g,c[l]=Array(f),p,t);for(var _=0,v=0,y,b;_<m;++_)if(y=h[_]){for(_>=v&&(v=_+1);!(b=g[v])&&++v<m;);y._next=b||null}}return o=new to(o,r),o._enter=s,o._exit=c,o}function Ri(e){return typeof e==`object`&&`length`in e?e:Array.from(e)}function zi(){return new to(this._exit||this._groups.map(Ai),this._parents)}function Bi(e,t,n){var r=this.enter(),i=this,a=this.exit();return typeof e==`function`?(r=e(r),r&&=r.selection()):r=r.append(e+``),t!=null&&(i=t(i),i&&=i.selection()),n==null?a.remove():n(a),r&&i?r.merge(i).order():i}function Vi(e){for(var t=e.selection?e.selection():e,n=this._groups,r=t._groups,i=n.length,a=r.length,o=Math.min(i,a),s=Array(i),c=0;c<o;++c)for(var l=n[c],u=r[c],d=l.length,f=s[c]=Array(d),p,m=0;m<d;++m)(p=l[m]||u[m])&&(f[m]=p);for(;c<i;++c)s[c]=n[c];return new to(s,this._parents)}function Hi(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var r=e[t],i=r.length-1,a=r[i],o;--i>=0;)(o=r[i])&&(a&&o.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(o,a),a=o);return this}function Ui(e){e||=Wi;function t(t,n){return t&&n?e(t.__data__,n.__data__):!t-!n}for(var n=this._groups,r=n.length,i=Array(r),a=0;a<r;++a){for(var o=n[a],s=o.length,c=i[a]=Array(s),l,u=0;u<s;++u)(l=o[u])&&(c[u]=l);c.sort(t)}return new to(i,this._parents).order()}function Wi(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function Gi(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function Ki(){return Array.from(this)}function qi(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,a=r.length;i<a;++i){var o=r[i];if(o)return o}return null}function Ji(){let e=0;for(let t of this)++e;return e}function Yi(){return!this.node()}function Xi(e){for(var t=this._groups,n=0,r=t.length;n<r;++n)for(var i=t[n],a=0,o=i.length,s;a<o;++a)(s=i[a])&&e.call(s,s.__data__,a,i);return this}function Zi(e){return function(){this.removeAttribute(e)}}function Qi(e){return function(){this.removeAttributeNS(e.space,e.local)}}function $i(e,t){return function(){this.setAttribute(e,t)}}function ea(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function ta(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function na(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function ra(e,t){var n=si(e);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((t==null?n.local?Qi:Zi:typeof t==`function`?n.local?na:ta:n.local?ea:$i)(n,t))}function ia(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function aa(e){return function(){this.style.removeProperty(e)}}function oa(e,t,n){return function(){this.style.setProperty(e,t,n)}}function sa(e,t,n){return function(){var r=t.apply(this,arguments);r==null?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function ca(e,t,n){return arguments.length>1?this.each((t==null?aa:typeof t==`function`?sa:oa)(e,t,n??``)):la(this.node(),e)}function la(e,t){return e.style.getPropertyValue(t)||ia(e).getComputedStyle(e,null).getPropertyValue(t)}function ua(e){return function(){delete this[e]}}function da(e,t){return function(){this[e]=t}}function fa(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function pa(e,t){return arguments.length>1?this.each((t==null?ua:typeof t==`function`?fa:da)(e,t)):this.node()[e]}function ma(e){return e.trim().split(/^|\s+/)}function ha(e){return e.classList||new ga(e)}function ga(e){this._node=e,this._names=ma(e.getAttribute(`class`)||``)}ga.prototype={add:function(e){this._names.indexOf(e)<0&&(this._names.push(e),this._node.setAttribute(`class`,this._names.join(` `)))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute(`class`,this._names.join(` `)))},contains:function(e){return this._names.indexOf(e)>=0}};function _a(e,t){for(var n=ha(e),r=-1,i=t.length;++r<i;)n.add(t[r])}function va(e,t){for(var n=ha(e),r=-1,i=t.length;++r<i;)n.remove(t[r])}function ya(e){return function(){_a(this,e)}}function ba(e){return function(){va(this,e)}}function xa(e,t){return function(){(t.apply(this,arguments)?_a:va)(this,e)}}function Sa(e,t){var n=ma(e+``);if(arguments.length<2){for(var r=ha(this.node()),i=-1,a=n.length;++i<a;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof t==`function`?xa:t?ya:ba)(n,t))}function Ca(){this.textContent=``}function wa(e){return function(){this.textContent=e}}function Ta(e){return function(){var t=e.apply(this,arguments);this.textContent=t??``}}function Ea(e){return arguments.length?this.each(e==null?Ca:(typeof e==`function`?Ta:wa)(e)):this.node().textContent}function Da(){this.innerHTML=``}function Oa(e){return function(){this.innerHTML=e}}function ka(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??``}}function Aa(e){return arguments.length?this.each(e==null?Da:(typeof e==`function`?ka:Oa)(e)):this.node().innerHTML}function ja(){this.nextSibling&&this.parentNode.appendChild(this)}function Ma(){return this.each(ja)}function Na(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Pa(){return this.each(Na)}function Fa(e){var t=typeof e==`function`?e:ui(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function Ia(){return null}function La(e,t){var n=typeof e==`function`?e:ui(e),r=t==null?Ia:typeof t==`function`?t:fi(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function Ra(){var e=this.parentNode;e&&e.removeChild(this)}function za(){return this.each(Ra)}function Ba(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Va(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Ha(e){return this.select(e?Va:Ba)}function Ua(e){return arguments.length?this.property(`__data__`,e):this.node().__data__}function Wa(e){return function(t){e.call(this,t,this.__data__)}}function Ga(e){return e.trim().split(/^|\s+/).map(function(e){var t=``,n=e.indexOf(`.`);return n>=0&&(t=e.slice(n+1),e=e.slice(0,n)),{type:e,name:t}})}function Ka(e){return function(){var t=this.__on;if(t){for(var n=0,r=-1,i=t.length,a;n<i;++n)a=t[n],(!e.type||a.type===e.type)&&a.name===e.name?this.removeEventListener(a.type,a.listener,a.options):t[++r]=a;++r?t.length=r:delete this.__on}}}function qa(e,t,n){return function(){var r=this.__on,i,a=Wa(t);if(r){for(var o=0,s=r.length;o<s;++o)if((i=r[o]).type===e.type&&i.name===e.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=a,i.options=n),i.value=t;return}}this.addEventListener(e.type,a,n),i={type:e.type,name:e.name,value:t,listener:a,options:n},r?r.push(i):this.__on=[i]}}function Ja(e,t,n){var r=Ga(e+``),i,a=r.length,o;if(arguments.length<2){var s=this.node().__on;if(s){for(var c=0,l=s.length,u;c<l;++c)for(i=0,u=s[c];i<a;++i)if((o=r[i]).type===u.type&&o.name===u.name)return u.value}}else{for(s=t?qa:Ka,i=0;i<a;++i)this.each(s(r[i],t,n));return this}}function Ya(e,t,n){var r=ia(e),i=r.CustomEvent;typeof i==`function`?i=new i(t,n):(i=r.document.createEvent(`Event`),n?(i.initEvent(t,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(t,!1,!1)),e.dispatchEvent(i)}function Xa(e,t){return function(){return Ya(this,e,t)}}function Za(e,t){return function(){return Ya(this,e,t.apply(this,arguments))}}function Qa(e,t){return this.each((typeof t==`function`?Za:Xa)(e,t))}function*$a(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,a=r.length,o;i<a;++i)(o=r[i])&&(yield o)}var eo=[null];function to(e,t){this._groups=e,this._parents=t}function no(){return new to([[document.documentElement]],eo)}function ro(){return this}to.prototype=no.prototype={constructor:to,select:pi,selectAll:vi,selectChild:wi,selectChildren:Oi,filter:ki,data:Li,enter:ji,exit:zi,join:Bi,merge:Vi,selection:ro,order:Hi,sort:Ui,call:Gi,nodes:Ki,node:qi,size:Ji,empty:Yi,each:Xi,attr:ra,style:ca,property:pa,classed:Sa,text:Ea,html:Aa,raise:Ma,lower:Pa,append:Fa,insert:La,remove:za,clone:Ha,datum:Ua,on:Ja,dispatch:Qa,[Symbol.iterator]:$a};function V(e){return typeof e==`string`?new to([[document.querySelector(e)]],[document.documentElement]):new to([[e]],eo)}var io=0;function ao(){return new oo}function oo(){this._=`@`+(++io).toString(36)}oo.prototype=ao.prototype={constructor:oo,get:function(e){for(var t=this._;!(t in e);)if(!(e=e.parentNode))return;return e[t]},set:function(e,t){return e[this._]=t},remove:function(e){return this._ in e&&delete e[this._]},toString:function(){return this._}};var so=Math.PI,co=2*so,lo=1e-6,uo=co-lo;function fo(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function po(e){let t=Math.floor(e);if(!(t>=0))throw Error(`invalid digits: ${e}`);if(t>15)return fo;let n=10**t;return function(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=Math.round(arguments[t]*n)/n+e[t]}}function mo(e,t,n,r){return e===n&&t===r}function ho(e){let t=Math.floor(e);if(!(t<=15))return mo;let n=10**t,r=function(e){return Math.round(e*n)};return function(e,t,n,i){return r(e)===r(n)&&r(t)===r(i)}}var go=class{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._=``,this._append=e==null?fo:po(e),this._equal=e==null?mo:ho(e)}moveTo(e,t){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,t){this._append`L${this._x1=+e},${this._y1=+t}`}quadraticCurveTo(e,t,n,r){this._append`Q${+e},${+t},${this._x1=+n},${this._y1=+r}`}bezierCurveTo(e,t,n,r,i,a){this._append`C${+e},${+t},${+n},${+r},${this._x1=+i},${this._y1=+a}`}arcTo(e,t,n,r,i){if(e=+e,t=+t,n=+n,r=+r,i=+i,i<0)throw Error(`negative radius: ${i}`);let a=this._x1,o=this._y1,s=n-e,c=r-t,l=a-e,u=o-t,d=l*l+u*u;if(this._x1===null)this._append`M${this._x1=e},${this._y1=t}`;else if(d>lo){if(!(Math.abs(u*s-c*l)>lo)||!i)this._append`L${this._x1=e},${this._y1=t}`;else{let f=n-a,p=r-o,m=s*s+c*c,h=f*f+p*p,g=Math.sqrt(m),_=Math.sqrt(d),v=i*Math.tan((so-Math.acos((m+d-h)/(2*g*_)))/2),y=v/_,b=v/g;Math.abs(y-1)>lo&&this._append`L${e+y*l},${t+y*u}`,this._append`A${i},${i},0,0,${+(u*f>l*p)},${this._x1=e+b*s},${this._y1=t+b*c}`}}}arc(e,t,n,r,i,a){if(e=+e,t=+t,n=+n,a=!!a,n<0)throw Error(`negative radius: ${n}`);let o=n*Math.cos(r),s=n*Math.sin(r),c=e+o,l=t+s,u=1^a,d=a?r-i:i-r;if(this._x1===null?this._append`M${c},${l}`:(Math.abs(this._x1-c)>lo||Math.abs(this._y1-l)>lo)&&this._append`L${c},${l}`,n){if(d<0&&(d=d%co+co),d>uo)this._append`A${n},${n},0,1,${u},${e-o},${t-s}A${n},${n},0,1,${u},${this._x1=c},${this._y1=l}`;else if(d>lo){let a=e+n*Math.cos(i),o=t+n*Math.sin(i);if(d>=so&&this._equal(c,l,a,o)){d/=2;let i=r+d;this._append`A${n},${n},0,${+(d>=so)},${u},${e+n*Math.cos(i)},${t+n*Math.sin(i)}`}this._append`A${n},${n},0,${+(d>=so)},${u},${this._x1=a},${this._y1=o}`}}}rect(e,t,n,r){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}h${n=+n}v${+r}h${-n}Z`}toString(){return this._}};go.prototype;function _o(e){return function(){return e}}var vo=Math.abs,yo=Math.atan2,bo=Math.cos,xo=Math.max,So=Math.min,Co=Math.sin,wo=Math.sqrt,To=1e-12,Eo=Math.PI,Do=Eo/2,Oo=2*Eo;function ko(e){return e>1?0:e<-1?Eo:Math.acos(e)}function Ao(e){return e>=1?Do:e<=-1?-Do:Math.asin(e)}function jo(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{let e=Math.floor(n);if(!(e>=0))throw RangeError(`invalid digits: ${n}`);t=e}return e},()=>new go(t)}function Mo(e){return e.innerRadius}function No(e){return e.outerRadius}function Po(e){return e.startAngle}function Fo(e){return e.endAngle}function Io(e){return e&&e.padAngle}function Lo(e,t,n,r,i,a,o,s){var c=n-e,l=r-t,u=o-i,d=s-a,f=d*c-u*l;if(!(f*f<To))return f=(u*(t-a)-d*(e-i))/f,[e+f*c,t+f*l]}function Ro(e,t,n,r,i,a,o){var s=e-n,c=t-r,l=(o?a:-a)/wo(s*s+c*c),u=l*c,d=-l*s,f=e+u,p=t+d,m=n+u,h=r+d,g=(f+m)/2,_=(p+h)/2,v=m-f,y=h-p,b=v*v+y*y,x=i-a,S=f*h-m*p,C=(y<0?-1:1)*wo(xo(0,x*x*b-S*S)),w=(S*y-v*C)/b,T=(-S*v-y*C)/b,E=(S*y+v*C)/b,D=(-S*v+y*C)/b,O=w-g,k=T-_,A=E-g,j=D-_;return O*O+k*k>A*A+j*j&&(w=E,T=D),{cx:w,cy:T,x01:-u,y01:-d,x11:w*(i/x-1),y11:T*(i/x-1)}}function zo(){var e=Mo,t=No,n=_o(0),r=null,i=Po,a=Fo,o=Io,s=null,c=jo(l);function l(){var l,u,d=+e.apply(this,arguments),f=+t.apply(this,arguments),p=i.apply(this,arguments)-Do,m=a.apply(this,arguments)-Do,h=vo(m-p),g=m>p;if(s||=l=c(),f<d&&(u=f,f=d,d=u),!(f>To))s.moveTo(0,0);else if(h>Oo-To)s.moveTo(f*bo(p),f*Co(p)),s.arc(0,0,f,p,m,!g),d>To&&(s.moveTo(d*bo(m),d*Co(m)),s.arc(0,0,d,m,p,g));else{var _=p,v=m,y=p,b=m,x=h,S=h,C=o.apply(this,arguments)/2,w=C>To&&(r?+r.apply(this,arguments):wo(d*d+f*f)),T=So(vo(f-d)/2,+n.apply(this,arguments)),E=T,D=T,O,k;if(w>To){var A=Ao(w/d*Co(C)),j=Ao(w/f*Co(C));(x-=A*2)>To?(A*=g?1:-1,y+=A,b-=A):(x=0,y=b=(p+m)/2),(S-=j*2)>To?(j*=g?1:-1,_+=j,v-=j):(S=0,_=v=(p+m)/2)}var ee=f*bo(_),M=f*Co(_),te=d*bo(b),N=d*Co(b);if(T>To){var P=f*bo(v),ne=f*Co(v),re=d*bo(y),F=d*Co(y),ie;if(h<Eo){if(ie=Lo(ee,M,re,F,P,ne,te,N)){var ae=ee-ie[0],oe=M-ie[1],se=P-ie[0],ce=ne-ie[1],le=1/Co(ko((ae*se+oe*ce)/(wo(ae*ae+oe*oe)*wo(se*se+ce*ce)))/2),ue=wo(ie[0]*ie[0]+ie[1]*ie[1]);E=So(T,(d-ue)/(le-1)),D=So(T,(f-ue)/(le+1))}else E=D=0}}S>To?D>To?(O=Ro(re,F,ee,M,f,D,g),k=Ro(P,ne,te,N,f,D,g),s.moveTo(O.cx+O.x01,O.cy+O.y01),D<T?s.arc(O.cx,O.cy,D,yo(O.y01,O.x01),yo(k.y01,k.x01),!g):(s.arc(O.cx,O.cy,D,yo(O.y01,O.x01),yo(O.y11,O.x11),!g),s.arc(0,0,f,yo(O.cy+O.y11,O.cx+O.x11),yo(k.cy+k.y11,k.cx+k.x11),!g),s.arc(k.cx,k.cy,D,yo(k.y11,k.x11),yo(k.y01,k.x01),!g))):(s.moveTo(ee,M),s.arc(0,0,f,_,v,!g)):s.moveTo(ee,M),!(d>To)||!(x>To)?s.lineTo(te,N):E>To?(O=Ro(te,N,P,ne,d,-E,g),k=Ro(ee,M,re,F,d,-E,g),s.lineTo(O.cx+O.x01,O.cy+O.y01),E<T?s.arc(O.cx,O.cy,E,yo(O.y01,O.x01),yo(k.y01,k.x01),!g):(s.arc(O.cx,O.cy,E,yo(O.y01,O.x01),yo(O.y11,O.x11),!g),s.arc(0,0,d,yo(O.cy+O.y11,O.cx+O.x11),yo(k.cy+k.y11,k.cx+k.x11),g),s.arc(k.cx,k.cy,E,yo(k.y11,k.x11),yo(k.y01,k.x01),!g))):s.arc(0,0,d,b,y,g)}if(s.closePath(),l)return s=null,l+``||null}return l.centroid=function(){var n=(+e.apply(this,arguments)+ +t.apply(this,arguments))/2,r=(+i.apply(this,arguments)+ +a.apply(this,arguments))/2-Eo/2;return[bo(r)*n,Co(r)*n]},l.innerRadius=function(t){return arguments.length?(e=typeof t==`function`?t:_o(+t),l):e},l.outerRadius=function(e){return arguments.length?(t=typeof e==`function`?e:_o(+e),l):t},l.cornerRadius=function(e){return arguments.length?(n=typeof e==`function`?e:_o(+e),l):n},l.padRadius=function(e){return arguments.length?(r=e==null?null:typeof e==`function`?e:_o(+e),l):r},l.startAngle=function(e){return arguments.length?(i=typeof e==`function`?e:_o(+e),l):i},l.endAngle=function(e){return arguments.length?(a=typeof e==`function`?e:_o(+e),l):a},l.padAngle=function(e){return arguments.length?(o=typeof e==`function`?e:_o(+e),l):o},l.context=function(e){return arguments.length?(s=e??null,l):s},l}Array.prototype.slice;function Bo(e){return typeof e==`object`&&`length`in e?e:Array.from(e)}function Vo(e){this._context=e}Vo.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)}}};function Ho(e){return new Vo(e)}function Uo(e){return e[0]}function Wo(e){return e[1]}function Go(e,t){var n=_o(!0),r=null,i=Ho,a=null,o=jo(s);e=typeof e==`function`?e:e===void 0?Uo:_o(e),t=typeof t==`function`?t:t===void 0?Wo:_o(t);function s(s){var c,l=(s=Bo(s)).length,u,d=!1,f;for(r??(a=i(f=o())),c=0;c<=l;++c)!(c<l&&n(u=s[c],c,s))===d&&((d=!d)?a.lineStart():a.lineEnd()),d&&a.point(+e(u,c,s),+t(u,c,s));if(f)return a=null,f+``||null}return s.x=function(t){return arguments.length?(e=typeof t==`function`?t:_o(+t),s):e},s.y=function(e){return arguments.length?(t=typeof e==`function`?e:_o(+e),s):t},s.defined=function(e){return arguments.length?(n=typeof e==`function`?e:_o(!!e),s):n},s.curve=function(e){return arguments.length?(i=e,r!=null&&(a=i(r)),s):i},s.context=function(e){return arguments.length?(e==null?r=a=null:a=i(r=e),s):r},s}function Ko(e,t){return t<e?-1:t>e?1:t>=e?0:NaN}function qo(e){return e}function Jo(){var e=qo,t=Ko,n=null,r=_o(0),i=_o(Oo),a=_o(0);function o(o){var s,c=(o=Bo(o)).length,l,u,d=0,f=Array(c),p=Array(c),m=+r.apply(this,arguments),h=Math.min(Oo,Math.max(-Oo,i.apply(this,arguments)-m)),g,_=Math.min(Math.abs(h)/c,a.apply(this,arguments)),v=_*(h<0?-1:1),y;for(s=0;s<c;++s)(y=p[f[s]=s]=+e(o[s],s,o))>0&&(d+=y);for(t==null?n!=null&&f.sort(function(e,t){return n(o[e],o[t])}):f.sort(function(e,n){return t(p[e],p[n])}),s=0,u=d?(h-c*v)/d:0;s<c;++s,m=g)l=f[s],y=p[l],g=m+(y>0?y*u:0)+v,p[l]={data:o[l],index:s,value:y,startAngle:m,endAngle:g,padAngle:_};return p}return o.value=function(t){return arguments.length?(e=typeof t==`function`?t:_o(+t),o):e},o.sortValues=function(e){return arguments.length?(t=e,n=null,o):t},o.sort=function(e){return arguments.length?(n=e,t=null,o):n},o.startAngle=function(e){return arguments.length?(r=typeof e==`function`?e:_o(+e),o):r},o.endAngle=function(e){return arguments.length?(i=typeof e==`function`?e:_o(+e),o):i},o.padAngle=function(e){return arguments.length?(a=typeof e==`function`?e:_o(+e),o):a},o}Xo(Ho);function Yo(e){this._curve=e}Yo.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(e,t){this._curve.point(t*Math.sin(e),t*-Math.cos(e))}};function Xo(e){function t(t){return new Yo(e(t))}return t._curve=e,t}var Zo=class{constructor(e,t){this._context=e,this._x=t}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(e,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._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,t,e,t):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+t)/2,e,this._y0,e,t)}this._x0=e,this._y0=t}};function Qo(e){return new Zo(e,!0)}function $o(e){return new Zo(e,!1)}wo(3),wo(1/3)*2;var es=Co(Eo/10)/Co(7*Eo/10);Co(Oo/10)*es,-bo(Oo/10)*es,wo(3),wo(3),wo(3)/2,(1/wo(12)/2+1)*3;function ts(){}function ns(e,t,n){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+n)/6)}function rs(e){this._context=e}rs.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:ns(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(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:ns(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function is(e){return new rs(e)}function as(e){this._context=e}as.prototype={areaStart:ts,areaEnd:ts,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(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:ns(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function os(e){return new as(e)}function ss(e){this._context=e}ss.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 n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:ns(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function cs(e){return new ss(e)}function ls(e,t){this._basis=new rs(e),this._beta=t}ls.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,n=e.length-1;if(n>0)for(var r=e[0],i=t[0],a=e[n]-r,o=t[n]-i,s=-1,c;++s<=n;)c=s/n,this._basis.point(this._beta*e[s]+(1-this._beta)*(r+c*a),this._beta*t[s]+(1-this._beta)*(i+c*o));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};var us=(function e(t){function n(e){return t===1?new rs(e):new ls(e,t)}return n.beta=function(t){return e(+t)},n})(.85);function ds(e,t,n){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-n),e._x2,e._y2)}function fs(e,t){this._context=e,this._k=(1-t)/6}fs.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:ds(this,this._x1,this._y1)}(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:ds(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var ps=(function e(t){function n(e){return new fs(e,t)}return n.tension=function(t){return e(+t)},n})(0);function ms(e,t){this._context=e,this._k=(1-t)/6}ms.prototype={areaStart:ts,areaEnd:ts,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(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:ds(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var hs=(function e(t){function n(e){return new ms(e,t)}return n.tension=function(t){return e(+t)},n})(0);function gs(e,t){this._context=e,this._k=(1-t)/6}gs.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:ds(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var _s=(function e(t){function n(e){return new gs(e,t)}return n.tension=function(t){return e(+t)},n})(0);function vs(e,t,n){var r=e._x1,i=e._y1,a=e._x2,o=e._y2;if(e._l01_a>To){var s=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,c=3*e._l01_a*(e._l01_a+e._l12_a);r=(r*s-e._x0*e._l12_2a+e._x2*e._l01_2a)/c,i=(i*s-e._y0*e._l12_2a+e._y2*e._l01_2a)/c}if(e._l23_a>To){var l=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,u=3*e._l23_a*(e._l23_a+e._l12_a);a=(a*l+e._x1*e._l23_2a-t*e._l12_2a)/u,o=(o*l+e._y1*e._l23_2a-n*e._l12_2a)/u}e._context.bezierCurveTo(r,i,a,o,e._x2,e._y2)}function ys(e,t){this._context=e,this._alpha=t}ys.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||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 n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=(n*n+r*r)**+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:vs(this,e,t)}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}};var bs=(function e(t){function n(e){return t?new ys(e,t):new fs(e,0)}return n.alpha=function(t){return e(+t)},n})(.5);function xs(e,t){this._context=e,this._alpha=t}xs.prototype={areaStart:ts,areaEnd:ts,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=(n*n+r*r)**+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:vs(this,e,t)}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}};var Ss=(function e(t){function n(e){return t?new xs(e,t):new ms(e,0)}return n.alpha=function(t){return e(+t)},n})(.5);function Cs(e,t){this._context=e,this._alpha=t}Cs.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 n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=(n*n+r*r)**+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:vs(this,e,t)}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}};var ws=(function e(t){function n(e){return t?new Cs(e,t):new gs(e,0)}return n.alpha=function(t){return e(+t)},n})(.5);function Ts(e){this._context=e}Ts.prototype={areaStart:ts,areaEnd:ts,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 Es(e){return new Ts(e)}function Ds(e){return e<0?-1:1}function Os(e,t,n){var r=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(r||i<0&&-0),o=(n-e._y1)/(i||r<0&&-0),s=(a*i+o*r)/(r+i);return(Ds(a)+Ds(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function ks(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function As(e,t,n){var r=e._x0,i=e._y0,a=e._x1,o=e._y1,s=(a-r)/3;e._context.bezierCurveTo(r+s,i+s*t,a-s,o-s*n,a,o)}function js(e){this._context=e}js.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:As(this,this._t0,ks(this,this._t0))}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=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,As(this,ks(this,n=Os(this,e,t)),n);break;default:As(this,this._t0,n=Os(this,e,t))}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function Ms(e){this._context=new Ns(e)}(Ms.prototype=Object.create(js.prototype)).point=function(e,t){js.prototype.point.call(this,t,e)};function Ns(e){this._context=e}Ns.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,n,r,i,a){this._context.bezierCurveTo(t,e,r,n,a,i)}};function Ps(e){return new js(e)}function Fs(e){return new Ms(e)}function Is(e){this._context=e}Is.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,n=e.length;if(n){if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=Ls(e),i=Ls(t),a=0,o=1;o<n;++a,++o)this._context.bezierCurveTo(r[0][a],i[0][a],r[1][a],i[1][a],e[o],t[o])}(this._line||this._line!==0&&n===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 Ls(e){var t,n=e.length-1,r,i=Array(n),a=Array(n),o=Array(n);for(i[0]=0,a[0]=2,o[0]=e[0]+2*e[1],t=1;t<n-1;++t)i[t]=1,a[t]=4,o[t]=4*e[t]+2*e[t+1];for(i[n-1]=2,a[n-1]=7,o[n-1]=8*e[n-1]+e[n],t=1;t<n;++t)r=i[t]/a[t-1],a[t]-=r,o[t]-=r*o[t-1];for(i[n-1]=o[n-1]/a[n-1],t=n-2;t>=0;--t)i[t]=(o[t]-i[t+1])/a[t];for(a[n-1]=(e[n]+i[n-1])/2,t=0;t<n-1;++t)a[t]=2*e[t+1]-i[t+1];return[i,a]}function Rs(e){return new Is(e)}function zs(e,t){this._context=e,this._t=t}zs.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 n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}}this._x=e,this._y=t}};function Bs(e){return new zs(e,.5)}function Vs(e){return new zs(e,0)}function Hs(e){return new zs(e,1)}var Us=i(e=>{let{securityLevel:t}=B(),n=V(`body`);return t===`sandbox`&&(n=V((V(`#i${e}`).node()?.contentDocument??document).body)),n.select(`#${e}`)},`selectSvgElement`),Ws=Object.freeze({left:0,top:0,width:16,height:16}),Gs=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),Ks=Object.freeze({...Ws,...Gs}),qs=Object.freeze({...Ks,body:``,hidden:!1}),Js=Object.freeze({width:null,height:null}),Ys=Object.freeze({...Js,...Gs}),Xs=(e,t,n,r=``)=>{let i=e.split(`:`);if(e.slice(0,1)===`@`){if(i.length<2||i.length>3)return null;r=i.shift().slice(1)}if(i.length>3||!i.length)return null;if(i.length>1){let e=i.pop(),n=i.pop(),a={provider:i.length>0?i[0]:r,prefix:n,name:e};return t&&!Zs(a)?null:a}let a=i[0],o=a.split(`-`);if(o.length>1){let e={provider:r,prefix:o.shift(),name:o.join(`-`)};return t&&!Zs(e)?null:e}if(n&&r===``){let e={provider:r,prefix:``,name:a};return t&&!Zs(e,n)?null:e}return null},Zs=(e,t)=>e?!!((t&&e.prefix===``||e.prefix)&&e.name):!1;function Qs(e,t){let n={};!e.hFlip!=!t.hFlip&&(n.hFlip=!0),!e.vFlip!=!t.vFlip&&(n.vFlip=!0);let r=((e.rotate||0)+(t.rotate||0))%4;return r&&(n.rotate=r),n}function $s(e,t){let n=Qs(e,t);for(let r in qs)r in Gs?r in e&&!(r in n)&&(n[r]=Gs[r]):r in t?n[r]=t[r]:r in e&&(n[r]=e[r]);return n}function ec(e,t){let n=e.icons,r=e.aliases||Object.create(null),i=Object.create(null);function a(e){if(n[e])return i[e]=[];if(!(e in i)){i[e]=null;let t=r[e]&&r[e].parent,n=t&&a(t);n&&(i[e]=[t].concat(n))}return i[e]}return(t||Object.keys(n).concat(Object.keys(r))).forEach(a),i}function tc(e,t,n){let r=e.icons,i=e.aliases||Object.create(null),a={};function o(e){a=$s(r[e]||i[e],a)}return o(t),n.forEach(o),$s(e,a)}function nc(e,t){if(e.icons[t])return tc(e,t,[]);let n=ec(e,[t])[t];return n?tc(e,t,n):null}var rc=/(-?[0-9.]*[0-9]+[0-9.]*)/g,ic=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function ac(e,t,n){if(t===1)return e;if(n||=100,typeof e==`number`)return Math.ceil(e*t*n)/n;if(typeof e!=`string`)return e;let r=e.split(rc);if(r===null||!r.length)return e;let i=[],a=r.shift(),o=ic.test(a);for(;;){if(o){let e=parseFloat(a);isNaN(e)?i.push(a):i.push(Math.ceil(e*t*n)/n)}else i.push(a);if(a=r.shift(),a===void 0)return i.join(``);o=!o}}function oc(e,t=`defs`){let n=``,r=e.indexOf(`<`+t);for(;r>=0;){let i=e.indexOf(`>`,r),a=e.indexOf(`</`+t);if(i===-1||a===-1)break;let o=e.indexOf(`>`,a);if(o===-1)break;n+=e.slice(i+1,a).trim(),e=e.slice(0,r).trim()+e.slice(o+1)}return{defs:n,content:e}}function sc(e,t){return e?`<defs>`+e+`</defs>`+t:t}function cc(e,t,n){let r=oc(e);return sc(r.defs,t+r.content+n)}var lc=e=>e===`unset`||e===`undefined`||e===`none`;function uc(e,t){let n={...Ks,...e},r={...Ys,...t},i={left:n.left,top:n.top,width:n.width,height:n.height},a=n.body;[n,r].forEach(e=>{let t=[],n=e.hFlip,r=e.vFlip,o=e.rotate;n?r?o+=2:(t.push(`translate(`+(i.width+i.left).toString()+` `+(0-i.top).toString()+`)`),t.push(`scale(-1 1)`),i.top=i.left=0):r&&(t.push(`translate(`+(0-i.left).toString()+` `+(i.height+i.top).toString()+`)`),t.push(`scale(1 -1)`),i.top=i.left=0);let s;switch(o<0&&(o-=Math.floor(o/4)*4),o%=4,o){case 1:s=i.height/2+i.top,t.unshift(`rotate(90 `+s.toString()+` `+s.toString()+`)`);break;case 2:t.unshift(`rotate(180 `+(i.width/2+i.left).toString()+` `+(i.height/2+i.top).toString()+`)`);break;case 3:s=i.width/2+i.left,t.unshift(`rotate(-90 `+s.toString()+` `+s.toString()+`)`)}o%2==1&&(i.left!==i.top&&(s=i.left,i.left=i.top,i.top=s),i.width!==i.height&&(s=i.width,i.width=i.height,i.height=s)),t.length&&(a=cc(a,`<g transform="`+t.join(` `)+`">`,`</g>`))});let o=r.width,s=r.height,c=i.width,l=i.height,u,d;o===null?(d=s===null?`1em`:s===`auto`?l:s,u=ac(d,c/l)):(u=o===`auto`?c:o,d=s===null?ac(u,l/c):s===`auto`?l:s);let f={},p=(e,t)=>{lc(t)||(f[e]=t.toString())};p(`width`,u),p(`height`,d);let m=[i.left,i.top,c,l];return f.viewBox=m.join(` `),{attributes:f,viewBox:m,body:a}}var dc=/\sid="(\S+)"/g,fc=new Map;function pc(e){e=e.replace(/[0-9]+$/,``)||`a`;let t=fc.get(e)||0;return fc.set(e,t+1),t?`${e}${t}`:e}function mc(e){let t=[],n;for(;n=dc.exec(e);)t.push(n[1]);if(!t.length)return e;let r=`suffix`+(Math.random()*16777216|Date.now()).toString(16);return t.forEach(t=>{let n=pc(t),i=t.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`);e=e.replace(RegExp(`([#;"])(`+i+`)([")]|\\.[a-z])`,`g`),`$1`+n+r+`$3`)}),e=e.replace(new RegExp(r,`g`),``),e}function hc(e,t){let n=e.indexOf(`xlink:`)===-1?``:` xmlns:xlink="http://www.w3.org/1999/xlink"`;for(let e in t)n+=` `+e+`="`+t[e]+`"`;return`<svg xmlns="http://www.w3.org/2000/svg"`+n+`>`+e+`</svg>`}var gc={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},_c=new Map,vc=new Map,yc=i(e=>{for(let t of e){if(!t.name)throw Error(`Invalid icon loader. Must have a "name" property with non-empty string value.`);if(l.debug(`Registering icon pack:`,t.name),`loader`in t)vc.set(t.name,t.loader);else if(`icons`in t)_c.set(t.name,t.icons);else throw l.error(`Invalid icon loader:`,t),Error(`Invalid icon loader. Must have either "icons" or "loader" property.`)}},`registerIconPacks`),bc=i(async(e,t)=>{let n=Xs(e,!0,t!==void 0);if(!n)throw Error(`Invalid icon name: ${e}`);let r=n.prefix||t;if(!r)throw Error(`Icon name must contain a prefix: ${e}`);let i=_c.get(r);if(!i){let e=vc.get(r);if(!e)throw Error(`Icon set not found: ${n.prefix}`);try{i={...await e(),prefix:r},_c.set(r,i)}catch(e){throw l.error(e),Error(`Failed to load icon set: ${n.prefix}`)}}let a=nc(i,n.name);if(!a)throw Error(`Icon not found: ${e}`);return a},`getRegisteredIconData`),xc=i(async e=>{try{return await bc(e),!0}catch{return!1}},`isIconAvailable`),Sc=i(async(e,t,n)=>{let r;try{r=await bc(e,t?.fallbackPrefix)}catch(e){l.error(e),r=gc}let i=uc(r,t);return sr(hc(mc(i.body),{...i.attributes,...n}),z())},`getIconSVG`),Cc=t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.BLANK_URL=e.relativeFirstCharacters=e.whitespaceEscapeCharsRegex=e.urlSchemeRegex=e.ctrlCharactersRegex=e.htmlCtrlEntityRegex=e.htmlEntitiesRegex=e.invalidProtocolRegex=void 0,e.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,e.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,e.htmlCtrlEntityRegex=/&(newline|tab);/gi,e.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,e.urlSchemeRegex=/^.+(:|:)/gim,e.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,e.relativeFirstCharacters=[`.`,`/`],e.BLANK_URL=`about:blank`})),wc=t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.sanitizeUrl=o;var t=Cc();function n(e){return t.relativeFirstCharacters.indexOf(e[0])>-1}function r(e){return e.replace(t.ctrlCharactersRegex,``).replace(t.htmlEntitiesRegex,function(e,t){return String.fromCharCode(t)})}function i(e){return URL.canParse(e)}function a(e){try{return decodeURIComponent(e)}catch{return e}}function o(e){if(!e)return t.BLANK_URL;var o,s=a(e.trim());do s=r(s).replace(t.htmlCtrlEntityRegex,``).replace(t.ctrlCharactersRegex,``).replace(t.whitespaceEscapeCharsRegex,``).trim(),s=a(s),o=s.match(t.ctrlCharactersRegex)||s.match(t.htmlEntitiesRegex)||s.match(t.htmlCtrlEntityRegex)||s.match(t.whitespaceEscapeCharsRegex);while(o&&o.length>0);var c=s;if(!c)return t.BLANK_URL;if(n(c))return c;var l=c.trimStart(),u=l.match(t.urlSchemeRegex);if(!u)return c;var d=u[0].toLowerCase().trim();if(t.invalidProtocolRegex.test(d))return t.BLANK_URL;var f=l.replace(/\\/g,`/`);if(d===`mailto:`||d.includes(`://`))return f;if(d===`http:`||d===`https:`){if(!i(f))return t.BLANK_URL;var p=new URL(f);return p.protocol=p.protocol.toLowerCase(),p.hostname=p.hostname.toLowerCase(),p.toString()}return f}}));function Tc(e){if(typeof e!=`object`||!e)return!1;if(Object.getPrototypeOf(e)===null)return!0;if(Object.prototype.toString.call(e)!==`[object Object]`){let t=e[Symbol.toStringTag];return t==null||!Object.getOwnPropertyDescriptor(e,Symbol.toStringTag)?.writable?!1:e.toString()===`[object ${t}]`}let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function Ec(e){return Number.isSafeInteger(e)&&e>=0}function Dc(e){return e!=null&&typeof e!=`function`&&Ec(e.length)}function Oc(e){return e===`__proto__`}var kc=Object.prototype.hasOwnProperty;function Ac(e,t){return kc.call(e,t)}function jc(e){return e==null||typeof e!=`object`&&typeof e!=`function`}function Mc(e){return e==null?e===void 0?`[object Undefined]`:`[object Null]`:Object.prototype.toString.call(e)}var Nc=`[object RegExp]`,Pc=`[object String]`,Fc=`[object Number]`,Ic=`[object Boolean]`,Lc=`[object Arguments]`,Rc=`[object Symbol]`,zc=`[object Date]`,Bc=`[object Map]`,Vc=`[object Set]`,Hc=`[object Array]`,Uc=`[object ArrayBuffer]`,Wc=`[object Object]`,Gc=`[object DataView]`,Kc=`[object Uint8Array]`,qc=`[object Uint8ClampedArray]`,Jc=`[object Uint16Array]`,Yc=`[object Uint32Array]`,Xc=`[object Int8Array]`,Zc=`[object Int16Array]`,Qc=`[object Int32Array]`,$c=`[object Float32Array]`,el=`[object Float64Array]`,tl=typeof globalThis==`object`&&globalThis||typeof window==`object`&&window||typeof self==`object`&&self||typeof global==`object`&&global||(function(){return this})();function nl(e){return tl.Buffer!==void 0&&tl.Buffer.isBuffer(e)}function rl(e){return nl(e)}function il(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function al(e){return il(e)}function ol(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}function sl(e,t){return cl(e,void 0,e,new Map,t)}function cl(e,t,n,r,i){if(i!=null){let a=i(e,t,n,r);if(a!==void 0)return a}if(jc(e))return e;if(r.has(e))return r.get(e);if(Array.isArray(e)){let t=Array(e.length);r.set(e,t);for(let a=0;a<e.length;a++)t[a]=cl(e[a],a,n,r,i);return Ac(e,`index`)&&(t.index=e.index),Ac(e,`input`)&&(t.input=e.input),t}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp){let t=new RegExp(e.source,e.flags);return t.lastIndex=e.lastIndex,t}if(e instanceof Map){let t=new Map;return r.set(e,t),e.forEach((e,a)=>{t.set(a,cl(e,a,n,r,i))}),t}if(e instanceof Set){let t=new Set;return r.set(e,t),e.forEach(e=>{t.add(cl(e,void 0,n,r,i))}),t}if(rl(e))return e.subarray();if(al(e)){let t=new(Object.getPrototypeOf(e)).constructor(e.length);r.set(e,t);for(let a=0;a<e.length;a++)t[a]=cl(e[a],a,n,r,i);return t}if(e instanceof ArrayBuffer||typeof SharedArrayBuffer<`u`&&e instanceof SharedArrayBuffer)return e.slice(0);if(e instanceof DataView){let t=new DataView(e.buffer.slice(0),e.byteOffset,e.byteLength);return r.set(e,t),ll(t,e,n,r,i),t}if(typeof File<`u`&&e instanceof File){let t=new File([e],e.name,{type:e.type});return r.set(e,t),ll(t,e,n,r,i),t}if(typeof Blob<`u`&&e instanceof Blob){let t=new Blob([e],{type:e.type});return r.set(e,t),ll(t,e,n,r,i),t}let a=Mc(e);if(a===`[object Error]`)return e===n?{}:e;switch(a){case Fc:case Pc:case Ic:{let t=new e.constructor(e.valueOf());return r.set(e,t),ll(t,e,n,r,i),t}case Lc:{let t={};return r.set(e,t),ll(t,e,n,r,i),t.length=e.length,t[Symbol.iterator]=e[Symbol.iterator],t}}if(typeof e==`object`&&ul(a)){let t=a===`[object Object]`&&typeof e.constructor!=`function`?{}:Object.create(Object.getPrototypeOf(e));return r.set(e,t),ll(t,e,n,r,i),t}return e}function ll(e,t,n,r,i){let a=[...Object.keys(t),...ol(t)];for(let o=0;o<a.length;o++){let s=a[o],c=Object.getOwnPropertyDescriptor(e,s);(c==null||c.writable)&&(e[s]=cl(t[s],s,n,r,i))}}function ul(e){switch(e){case Lc:case Hc:case Uc:case Gc:case Ic:case zc:case $c:case el:case Xc:case Zc:case Qc:case Bc:case Fc:case Wc:case Nc:case Vc:case Pc:case Rc:case Kc:case qc:case Jc:case Yc:return!0;default:return!1}}function dl(e){return sl(e)}function fl(e){return typeof e==`object`&&!!e&&Mc(e)===`[object Arguments]`}function pl(e){return typeof e==`object`&&!!e}function ml(e){return pl(e)&&Dc(e)}function hl(e){let t=e?.constructor;return e===(typeof t==`function`?t.prototype:Object.prototype)}function gl(e,t){if(typeof e!=`function`||t!=null&&typeof t!=`function`)throw TypeError(`Expected a function`);let n=function(...r){let i=t?t.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);let o=e.apply(this,r);return n.cache=a.set(i,o)||a,o};return n.cache=new(gl.Cache||Map),n}gl.Cache=Map;function _l(e){if(jc(e))return e;if(Array.isArray(e)||il(e)||e instanceof ArrayBuffer||typeof SharedArrayBuffer<`u`&&e instanceof SharedArrayBuffer)return e.slice(0);let t=Object.getPrototypeOf(e);if(t==null)return Object.assign(Object.create(t),e);let n=t.constructor;if(e instanceof Date||e instanceof Map||e instanceof Set)return new n(e);if(e instanceof RegExp){let t=new n(e);return t.lastIndex=e.lastIndex,t}if(e instanceof DataView)return new n(e.buffer.slice(0));if(e instanceof Error){let t;return t=typeof AggregateError<`u`&&e instanceof AggregateError?new n(e.errors,e.message,{cause:e.cause}):new n(e.message,{cause:e.cause}),t.stack=e.stack,Object.assign(t,e),t}if(typeof File<`u`&&e instanceof File)return new n([e],e.name,{type:e.type,lastModified:e.lastModified});if(typeof e==`object`){let n=Object.create(t);return Object.assign(n,e)}return e}function vl(e,...t){let n=t.slice(0,-1),r=t[t.length-1],i=e;for(let e=0;e<n.length;e++){let t=n[e];i=yl(i,t,r,new Map)}return i}function yl(e,t,n,r){if(jc(e)&&(e=Object(e)),typeof t!=`object`||!t)return e;if(r.has(t))return _l(r.get(t));if(r.set(t,e),Array.isArray(t)){t=t.slice();for(let e=0;e<t.length;e++)e in t||(t[e]=void 0)}let i=[...Object.keys(t),...ol(t)];for(let a=0;a<i.length;a++){let o=i[a];if(Oc(o))continue;let s=t[o],c=e[o];if(fl(s)&&(s=Object.assign({},s)),fl(c)&&(c=Object.assign({},c)),nl(s)&&(s=dl(s)),Array.isArray(s)){if(Array.isArray(c)){let e=[],t=Reflect.ownKeys(c);for(let n=0;n<t.length;n++){let r=t[n];e[r]=c[r]}c=e}else if(ml(c)){let e=[];for(let t=0;t<c.length;t++)e[t]=c[t];c=e}else c=[]}let l=n(c,s,o,e,t,r);l===void 0?Array.isArray(s)||pl(c)&&pl(s)&&(Tc(c)||Tc(s)||al(c)||al(s))?e[o]=yl(c,s,n,r):c==null&&Tc(s)?e[o]=yl({},s,n,r):c==null&&al(s)?e[o]=dl(s):(c===void 0||s!==void 0)&&(e[o]=s):e[o]=l}return e}function bl(){}function xl(e,...t){return vl(e,...t,bl)}function Sl(e){if(e==null)return!0;if(Dc(e))return typeof e.splice!=`function`&&typeof e!=`string`&&!nl(e)&&!al(e)&&!fl(e)?!1:e.length===0;if(typeof e==`object`||typeof e==`function`){if(e instanceof Map||e instanceof Set)return e.size===0;let t=Object.keys(e);return hl(e)?t.filter(e=>e!==`constructor`).length===0:t.length===0}return!0}var Cl=wc(),wl={curveBasis:is,curveBasisClosed:os,curveBasisOpen:cs,curveBumpX:Qo,curveBumpY:$o,curveBundle:us,curveCardinalClosed:hs,curveCardinalOpen:_s,curveCardinal:ps,curveCatmullRomClosed:Ss,curveCatmullRomOpen:ws,curveCatmullRom:bs,curveLinear:Ho,curveLinearClosed:Es,curveMonotoneX:Ps,curveMonotoneY:Fs,curveNatural:Rs,curveStep:Bs,curveStepAfter:Hs,curveStepBefore:Vs},Tl=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,El=i(function(e,t){let n=Dl(e,/(?:init\b)|(?:initialize\b)/),r={};if(Array.isArray(n)){let e=n.map(e=>e.args);Cn(e),r=Wt(r,[...e])}else r=n.args;if(!r)return;let i=Zn(e,t),a=`config`;return r[a]!==void 0&&(i===`flowchart-v2`&&(i=`flowchart`),r[i]=r[a],delete r[a]),r},`detectInit`),Dl=i(function(e,t=null){try{let n=RegExp(`[%]{2}(?![{]${Tl.source})(?=[}][%]{2}).*
|
|
129
|
+
`,`ig`);e=e.trim().replace(n,``).replace(/'/gm,`"`),l.debug(`Detecting diagram directive${t===null?``:` type:`+t} based on the text:${e}`);let r,i=[];for(;(r=qn.exec(e))!==null;)if(r.index===qn.lastIndex&&qn.lastIndex++,r&&!t||t&&r[1]?.match(t)||t&&r[2]?.match(t)){let e=r[1]?r[1]:r[2],t=r[3]?r[3].trim():r[4]?JSON.parse(r[4].trim()):null;i.push({type:e,args:t})}return i.length===0?{type:e,args:null}:i.length===1?i[0]:i}catch(n){return l.error(`ERROR: ${n.message} - Unable to parse directive type: '${t}' based on the text: '${e}'`),{type:void 0,args:null}}},`detectDirective`),Ol=i(function(e){return e.replace(qn,``)},`removeDirectives`),kl=i(function(e,t){for(let[n,r]of t.entries())if(r.match(e))return n;return-1},`isSubstringInArray`);function Al(e,t){return e?wl[`curve${e.charAt(0).toUpperCase()+e.slice(1)}`]??t:t}i(Al,`interpolateToCurve`);function jl(e,t){let n=e.trim();if(n)return t.securityLevel===`loose`?n:(0,Cl.sanitizeUrl)(n)}i(jl,`formatUrl`);var Ml=i((e,...t)=>{let n=e.split(`.`),r=n.length-1,i=n[r],a=window;for(let t=0;t<r;t++)if(a=a[n[t]],!a){l.error(`Function name: ${e} not found in window`);return}a[i](...t)},`runFunc`);function Nl(e,t){return!e||!t?0:Math.sqrt((t.x-e.x)**2+(t.y-e.y)**2)}i(Nl,`distance`);function Pl(e){let t,n=0;return e.forEach(e=>{n+=Nl(e,t),t=e}),Ll(e,n/2)}i(Pl,`traverseEdge`);function Fl(e){return e.length===1?e[0]:Pl(e)}i(Fl,`calcLabelPosition`);var Il=i((e,t=2)=>{let n=10**t;return Math.round(e*n)/n},`roundNumber`),Ll=i((e,t)=>{let n,r=t;for(let t of e){if(n){let e=Nl(t,n);if(e===0)return n;if(e<r)r-=e;else{let i=r/e;if(i<=0)return n;if(i>=1)return{x:t.x,y:t.y};if(i>0&&i<1)return{x:Il((1-i)*n.x+i*t.x,5),y:Il((1-i)*n.y+i*t.y,5)}}}n=t}throw Error(`Could not find a suitable point for the given distance`)},`calculatePoint`),Rl=i((e,t,n)=>{l.info(`our points ${JSON.stringify(t)}`),t[0]!==n&&(t=t.reverse());let r=Ll(t,25),i=e?10:5,a=Math.atan2(t[0].y-r.y,t[0].x-r.x),o={x:0,y:0};return o.x=Math.sin(a)*i+(t[0].x+r.x)/2,o.y=-Math.cos(a)*i+(t[0].y+r.y)/2,o},`calcCardinalityPosition`);function zl(e,t,n){let r=structuredClone(n);l.info(`our points`,r),t!==`start_left`&&t!==`start_right`&&r.reverse();let i=Ll(r,25+e),a=10+e*.5,o=Math.atan2(r[0].y-i.y,r[0].x-i.x),s={x:0,y:0};return t===`start_left`?(s.x=Math.sin(o+Math.PI)*a+(r[0].x+i.x)/2,s.y=-Math.cos(o+Math.PI)*a+(r[0].y+i.y)/2):t===`end_right`?(s.x=Math.sin(o-Math.PI)*a+(r[0].x+i.x)/2-5,s.y=-Math.cos(o-Math.PI)*a+(r[0].y+i.y)/2-5):t===`end_left`?(s.x=Math.sin(o)*a+(r[0].x+i.x)/2-5,s.y=-Math.cos(o)*a+(r[0].y+i.y)/2-5):(s.x=Math.sin(o)*a+(r[0].x+i.x)/2,s.y=-Math.cos(o)*a+(r[0].y+i.y)/2),s}i(zl,`calcTerminalLabelPosition`);function Bl(e){let t=``,n=``;for(let r of e)r!==void 0&&(r.startsWith(`color:`)||r.startsWith(`text-align:`)?n=n+r+`;`:t=t+r+`;`);return{style:t,labelStyle:n}}i(Bl,`getStylesFromArray`);var Vl=0,Hl=i(()=>(Vl++,`id-`+Math.random().toString(36).substr(2,12)+`-`+Vl),`generateId`);function Ul(e){let t=``;for(let n=0;n<e;n++)t+=`0123456789abcdef`.charAt(Math.floor(Math.random()*16));return t}i(Ul,`makeRandomHex`);var Wl=i(e=>Ul(e.length),`random`),Gl=i(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`),Kl=i(function(e,t){let n=t.text.replace(Er.lineBreakRegex,` `),[,r]=ru(t.fontSize),i=e.append(`text`);i.attr(`x`,t.x),i.attr(`y`,t.y),i.style(`text-anchor`,t.anchor),i.style(`font-family`,t.fontFamily),i.style(`font-size`,r),i.style(`font-weight`,t.fontWeight),i.attr(`fill`,t.fill),t.class!==void 0&&i.attr(`class`,t.class);let a=i.append(`tspan`);return a.attr(`x`,t.x+t.textMargin*2),a.attr(`fill`,t.fill),a.text(n),i},`drawSimpleText`),ql=gl((e,t,n)=>{if(!e||(n=Object.assign({fontSize:12,fontWeight:400,fontFamily:`Arial`,joinWith:`<br/>`},n),Er.lineBreakRegex.test(e)))return e;let r=e.split(` `).filter(Boolean),i=[],a=``;return r.forEach((e,o)=>{let s=Xl(`${e} `,n),c=Xl(a,n);if(s>t){let{hyphenatedStrings:r,remainingWord:o}=Jl(e,t,`-`,n);i.push(a,...r),a=o}else c+s>=t?(i.push(a),a=e):a=[a,e].filter(Boolean).join(` `);o+1===r.length&&i.push(a)}),i.filter(e=>e!==``).join(n.joinWith)},(e,t,n)=>`${e}${t}${n.fontSize}${n.fontWeight}${n.fontFamily}${n.joinWith}`),Jl=gl((e,t,n=`-`,r)=>{r=Object.assign({fontSize:12,fontWeight:400,fontFamily:`Arial`,margin:0},r);let i=[...e],a=[],o=``;return i.forEach((e,s)=>{let c=`${o}${e}`;if(Xl(c,r)>=t){let e=s+1,t=i.length===e,r=`${c}${n}`;a.push(t?c:r),o=``}else o=c}),{hyphenatedStrings:a,remainingWord:o}},(e,t,n=`-`,r)=>`${e}${t}${n}${r.fontSize}${r.fontWeight}${r.fontFamily}`);function Yl(e,t){return Zl(e,t).height}i(Yl,`calculateTextHeight`);function Xl(e,t){return Zl(e,t).width}i(Xl,`calculateTextWidth`);var Zl=gl((e,t)=>{let{fontSize:n=12,fontFamily:r=`Arial`,fontWeight:i=400}=t;if(!e)return{width:0,height:0};let[,a]=ru(n),o=[`sans-serif`,r],s=e.split(Er.lineBreakRegex),c=[],l=V(`body`);if(!l.remove)return{width:0,height:0,lineHeight:0};let u=l.append(`svg`);for(let e of o){let t=0,n={width:0,height:0,lineHeight:0};for(let r of s){let o=Gl();o.text=r||``;let s=Kl(u,o).style(`font-size`,a).style(`font-weight`,i).style(`font-family`,e),c=(s._groups||s)[0][0].getBBox();if(c.width===0&&c.height===0)throw Error(`svg element not in render tree`);n.width=Math.round(Math.max(n.width,c.width)),t=Math.round(c.height),n.height+=t,n.lineHeight=Math.round(Math.max(n.lineHeight,t))}c.push(n)}return u.remove(),c[isNaN(c[1].height)||isNaN(c[1].width)||isNaN(c[1].lineHeight)||c[0].height>c[1].height&&c[0].width>c[1].width&&c[0].lineHeight>c[1].lineHeight?0:1]},(e,t)=>`${e}${t.fontSize}${t.fontWeight}${t.fontFamily}`),Ql=class{constructor(e=!1,t){this.count=0,this.count=t?t.length:0,this.next=e?()=>this.count++:()=>Date.now()}static{i(this,`InitIDGenerator`)}},$l,eu=i(function(e){return $l||=document.createElement(`div`),e=escape(e).replace(/%26/g,`&`).replace(/%23/g,`#`).replace(/%3B/g,`;`),$l.innerHTML=e,unescape($l.textContent)},`entityDecode`);function tu(e){return`str`in e}i(tu,`isDetailedError`);var nu=i((e,t,n,r)=>{if(!r)return;let i=e.node()?.getBBox();i&&e.append(`text`).text(r).attr(`text-anchor`,`middle`).attr(`x`,i.x+i.width/2).attr(`y`,-n).attr(`class`,t)},`insertTitle`),ru=i(e=>{if(typeof e==`number`)return[e,e+`px`];let t=parseInt(e??``,10);return Number.isNaN(t)?[void 0,void 0]:e===String(t)?[t,e+`px`]:[t,e]},`parseFontSize`);function iu(e,t){return xl({},e,t)}i(iu,`cleanAndMerge`);var au={assignWithDepth:Wt,wrapLabel:ql,calculateTextHeight:Yl,calculateTextWidth:Xl,calculateTextDimensions:Zl,cleanAndMerge:iu,detectInit:El,detectDirective:Dl,isSubstringInArray:kl,interpolateToCurve:Al,calcLabelPosition:Fl,calcCardinalityPosition:Rl,calcTerminalLabelPosition:zl,formatUrl:jl,getStylesFromArray:Bl,generateId:Hl,random:Wl,runFunc:Ml,entityDecode:eu,insertTitle:nu,isLabelCoordinateInPath:uu,parseFontSize:ru,InitIDGenerator:Ql},ou=i(function(e){let t=e;return t=t.replace(/style.*:\S*#.*;/g,function(e){return e.substring(0,e.length-1)}),t=t.replace(/classDef.*:\S*#.*;/g,function(e){return e.substring(0,e.length-1)}),t=t.replace(/#\w+;/g,function(e){let t=e.substring(1,e.length-1);return/^\+?\d+$/.test(t)?`fl°°`+t+`¶ß`:`fl°`+t+`¶ß`}),t},`encodeEntities`),su=i(function(e){return e.replace(/fl°°/g,`&#`).replace(/fl°/g,`&`).replace(/¶ß/g,`;`)},`decodeEntities`),cu=i((e,t,{counter:n=0,prefix:r,suffix:i},a)=>a||`${r?`${r}_`:``}${e}_${t}_${n}${i?`_${i}`:``}`,`getEdgeId`);function lu(e){return e??null}i(lu,`handleUndefinedAttr`);function uu(e,t){let n=Math.round(e.x),r=Math.round(e.y),i=t.replace(/(\d+\.\d+)/g,e=>Math.round(parseFloat(e)).toString());return i.includes(n.toString())||i.includes(r.toString())}i(uu,`isLabelCoordinateInPath`);var du=t(((e,t,n)=>{var r;(function(e){var n=e.requestAnimationFrame||e.webkitRequestAnimationFrame||e.mozRequestAnimationFrame||e.msRequestAnimationFrame||function(e){return setTimeout(e,16)};function i(){var t=this;t.reads=[],t.writes=[],t.raf=n.bind(e)}i.prototype={constructor:i,runTasks:function(e){for(var t;t=e.shift();)t()},measure:function(e,t){var n=t?e.bind(t):e;return this.reads.push(n),a(this),n},mutate:function(e,t){var n=t?e.bind(t):e;return this.writes.push(n),a(this),n},clear:function(e){return s(this.reads,e)||s(this.writes,e)},extend:function(e){if(typeof e!=`object`)throw Error(`expected object`);var t=Object.create(this);return c(t,e),t.fastdom=this,t.initialize&&t.initialize(),t},catch:null};function a(e){e.scheduled||(e.scheduled=!0,e.raf(o.bind(null,e)))}function o(e){var t=e.writes,n=e.reads,r;try{n.length,e.runTasks(n),t.length,e.runTasks(t)}catch(e){r=e}if(e.scheduled=!1,(n.length||t.length)&&a(e),r){if(r.message,e.catch)e.catch(r);else throw r}}function s(e,t){var n=e.indexOf(t);return!!~n&&!!e.splice(n,1)}function c(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])}var l=e.fastdom=e.fastdom||new i;typeof r==`function`?r(function(){return l}):typeof t==`object`&&(t.exports=l)})(typeof window<`u`?window:n===void 0?globalThis:n)})),fu=t(((e,t)=>{var n;(function(){var e={initialize:function(){this._tasks=new Map},mutate:function(e,t){return r(this,`mutate`,e,t)},measure:function(e,t){return r(this,`measure`,e,t)},clear:function(e){var t=this._tasks,n=t.get(e);this.fastdom.clear(n),t.delete(e)}};function r(e,t,n,r){var i=e._tasks,a=e.fastdom,o,s=new Promise(function(e,c){o=a[t](function(){i.delete(s);try{e(r?n.call(r):n())}catch(e){c(e)}},r)});return i.set(s,o),s}(typeof n)[0]==`f`?n(function(){return e}):(typeof t)[0]==`o`?t.exports=e:window.fastdomPromised=e})()})),pu=e(du(),1),mu=e(fu(),1);function hu(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var gu=hu();function _u(e){gu=e}var vu={exec:()=>null};function H(e,t=``){let n=typeof e==`string`?e:e.source,r={replace:(e,t)=>{let i=typeof t==`string`?t:t.source;return i=i.replace(bu.caret,`$1`),n=n.replace(e,i),r},getRegex:()=>new RegExp(n,t)};return r}var yu=(()=>{try{return!0}catch{return!1}})(),bu={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+));?/gi,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,`i`)},xu=/^(?:[ \t]*(?:\n|$))+/,Su=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Cu=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,wu=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Tu=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Eu=/(?:[*+-]|\d{1,9}[.)])/,Du=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Ou=H(Du).replace(/bull/g,Eu).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(),ku=H(Du).replace(/bull/g,Eu).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(),Au=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,ju=/^[^\n]+/,Mu=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Nu=H(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace(`label`,Mu).replace(`title`,/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Pu=H(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Eu).getRegex(),Fu=`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`,Iu=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Lu=H(`^ {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`,Iu).replace(`tag`,Fu).replace(`attribute`,/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Ru=H(Au).replace(`hr`,wu).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`,Fu).getRegex(),zu={blockquote:H(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace(`paragraph`,Ru).getRegex(),code:Su,def:Nu,fences:Cu,heading:Tu,hr:wu,html:Lu,lheading:Ou,list:Pu,newline:xu,paragraph:Ru,table:vu,text:ju},Bu=H(`^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)`).replace(`hr`,wu).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`,Fu).getRegex(),Vu={...zu,lheading:ku,table:Bu,paragraph:H(Au).replace(`hr`,wu).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`table`,Bu).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`,Fu).getRegex()},Hu={...zu,html:H(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace(`comment`,Iu).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:vu,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:H(Au).replace(`hr`,wu).replace(`heading`,` *#{1,6} *[^
|
|
130
|
+
]`).replace(`lheading`,Ou).replace(`|table`,``).replace(`blockquote`,` {0,3}>`).replace(`|fences`,``).replace(`|list`,``).replace(`|html`,``).replace(`|tag`,``).getRegex()},Uu=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Wu=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Gu=/^( {2,}|\\)\n(?!\s*$)/,Ku=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,qu=/[\p{P}\p{S}]/u,Ju=/[\s\p{P}\p{S}]/u,Yu=/[^\s\p{P}\p{S}]/u,Xu=H(/^((?![*_])punctSpace)/,`u`).replace(/punctSpace/g,Ju).getRegex(),Zu=/(?!~)[\p{P}\p{S}]/u,Qu=/(?!~)[\s\p{P}\p{S}]/u,$u=/(?:[^\s\p{P}\p{S}]|~)/u,ed=H(/link|precode-code|html/,`g`).replace(`link`,/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace(`precode-`,yu?"(?<!`)()":"(^^|[^`])").replace(`code`,/(?<b>`+)[^`]+\k<b>(?!`)/).replace(`html`,/<(?! )[^<>]*?>/).getRegex(),td=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,nd=H(td,`u`).replace(/punct/g,qu).getRegex(),rd=H(td,`u`).replace(/punct/g,Zu).getRegex(),id=`^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)`,ad=H(id,`gu`).replace(/notPunctSpace/g,Yu).replace(/punctSpace/g,Ju).replace(/punct/g,qu).getRegex(),od=H(id,`gu`).replace(/notPunctSpace/g,$u).replace(/punctSpace/g,Qu).replace(/punct/g,Zu).getRegex(),sd=H(`^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)`,`gu`).replace(/notPunctSpace/g,Yu).replace(/punctSpace/g,Ju).replace(/punct/g,qu).getRegex(),cd=H(/\\(punct)/,`gu`).replace(/punct/g,qu).getRegex(),ld=H(/^<(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(),ud=H(Iu).replace(`(?:-->|$)`,`-->`).getRegex(),dd=H(`^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`,ud).replace(`attribute`,/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),fd=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,pd=H(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace(`label`,fd).replace(`href`,/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace(`title`,/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),md=H(/^!?\[(label)\]\[(ref)\]/).replace(`label`,fd).replace(`ref`,Mu).getRegex(),hd=H(/^!?\[(ref)\](?:\[\])?/).replace(`ref`,Mu).getRegex(),gd=H(`reflink|nolink(?!\\()`,`g`).replace(`reflink`,md).replace(`nolink`,hd).getRegex(),_d=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,vd={_backpedal:vu,anyPunctuation:cd,autolink:ld,blockSkip:ed,br:Gu,code:Wu,del:vu,emStrongLDelim:nd,emStrongRDelimAst:ad,emStrongRDelimUnd:sd,escape:Uu,link:pd,nolink:hd,punctuation:Xu,reflink:md,reflinkSearch:gd,tag:dd,text:Ku,url:vu},yd={...vd,link:H(/^!?\[(label)\]\((.*?)\)/).replace(`label`,fd).getRegex(),reflink:H(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace(`label`,fd).getRegex()},bd={...vd,emStrongRDelimAst:od,emStrongLDelim:rd,url:H(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace(`protocol`,_d).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:H(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace(`protocol`,_d).getRegex()},xd={...bd,br:H(Gu).replace(`{2,}`,`*`).getRegex(),text:H(bd.text).replace(`\\b_`,`\\b_| {2,}\\n`).replace(/\{2,\}/g,`*`).getRegex()},Sd={normal:zu,gfm:Vu,pedantic:Hu},Cd={normal:vd,gfm:bd,breaks:xd,pedantic:yd},wd={"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`},Td=e=>wd[e];function Ed(e,t){if(t){if(bu.escapeTest.test(e))return e.replace(bu.escapeReplace,Td)}else if(bu.escapeTestNoEncode.test(e))return e.replace(bu.escapeReplaceNoEncode,Td);return e}function Dd(e){try{e=encodeURI(e).replace(bu.percentDecode,`%`)}catch{return null}return e}function Od(e,t){let n=e.replace(bu.findPipe,(e,t,n)=>{let r=!1,i=t;for(;--i>=0&&n[i]===`\\`;)r=!r;return r?`|`:` |`}).split(bu.splitPipe),r=0;if(n[0].trim()||n.shift(),n.length>0&&!n.at(-1)?.trim()&&n.pop(),t){if(n.length>t)n.splice(t);else for(;n.length<t;)n.push(``)}for(;r<n.length;r++)n[r]=n[r].trim().replace(bu.slashPipe,`|`);return n}function kd(e,t,n){let r=e.length;if(r===0)return``;let i=0;for(;i<r;){let a=e.charAt(r-i-1);if(a===t&&!n)i++;else if(a!==t&&n)i++;else break}return e.slice(0,r-i)}function Ad(e,t){if(e.indexOf(t[1])===-1)return-1;let n=0;for(let r=0;r<e.length;r++)if(e[r]===`\\`)r++;else if(e[r]===t[0])n++;else if(e[r]===t[1]&&(n--,n<0))return r;return n>0?-2:-1}function jd(e,t,n,r,i){let a=t.href,o=t.title||null,s=e[1].replace(i.other.outputLinkReplace,`$1`);r.state.inLink=!0;let c={type:e[0].charAt(0)===`!`?`image`:`link`,raw:n,href:a,title:o,text:s,tokens:r.inlineTokens(s)};return r.state.inLink=!1,c}function Md(e,t,n){let r=e.match(n.other.indentCodeCompensation);if(r===null)return t;let i=r[1];return t.split(`
|
|
131
|
+
`).map(e=>{let t=e.match(n.other.beginningSpace);if(t===null)return e;let[r]=t;return r.length>=i.length?e.slice(i.length):e}).join(`
|
|
132
|
+
`)}var Nd=class{options;rules;lexer;constructor(e){this.options=e||gu}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:`space`,raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let e=t[0].replace(this.rules.other.codeRemoveIndent,``);return{type:`code`,raw:t[0],codeBlockStyle:`indented`,text:this.options.pedantic?e:kd(e,`
|
|
133
|
+
`)}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let e=t[0],n=Md(e,t[3]||``,this.rules);return{type:`code`,raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,`$1`):t[2],text:n}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(this.rules.other.endingHash.test(e)){let t=kd(e,`#`);(this.options.pedantic||!t||this.rules.other.endingSpaceChar.test(t))&&(e=t.trim())}return{type:`heading`,raw:t[0],depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:`hr`,raw:kd(t[0],`
|
|
134
|
+
`)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let e=kd(t[0],`
|
|
135
|
+
`).split(`
|
|
136
|
+
`),n=``,r=``,i=[];for(;e.length>0;){let t=!1,a=[],o=0;for(;o<e.length;o++)if(this.rules.other.blockquoteStart.test(e[o]))a.push(e[o]),t=!0;else if(!t)a.push(e[o]);else break;e=e.slice(o);let s=a.join(`
|
|
137
|
+
`),c=s.replace(this.rules.other.blockquoteSetextReplace,`
|
|
138
|
+
$1`).replace(this.rules.other.blockquoteSetextReplace2,``);n=n?`${n}
|
|
139
|
+
${s}`:s,r=r?`${r}
|
|
140
|
+
${c}`:c;let l=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(c,i,!0),this.lexer.state.top=l,e.length===0)break;let u=i.at(-1);if(u?.type===`code`)break;if(u?.type===`blockquote`){let t=u,a=t.raw+`
|
|
141
|
+
`+e.join(`
|
|
142
|
+
`),o=this.blockquote(a);i[i.length-1]=o,n=n.substring(0,n.length-t.raw.length)+o.raw,r=r.substring(0,r.length-t.text.length)+o.text;break}if(u?.type===`list`){let t=u,a=t.raw+`
|
|
143
|
+
`+e.join(`
|
|
144
|
+
`),o=this.list(a);i[i.length-1]=o,n=n.substring(0,n.length-u.raw.length)+o.raw,r=r.substring(0,r.length-t.raw.length)+o.raw,e=a.substring(i.at(-1).raw.length).split(`
|
|
145
|
+
`)}}return{type:`blockquote`,raw:n,tokens:i,text:r}}}list(e){let t=this.rules.block.list.exec(e);if(t){let n=t[1].trim(),r=n.length>1,i={type:`list`,raw:``,ordered:r,start:r?+n.slice(0,-1):``,loose:!1,items:[]};n=r?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=r?n:`[*+-]`);let a=this.rules.other.listItemRegex(n),o=!1;for(;e;){let n=!1,r=``,s=``;if(!(t=a.exec(e))||this.rules.block.hr.test(e))break;r=t[0],e=e.substring(r.length);let c=t[2].split(`
|
|
146
|
+
`,1)[0].replace(this.rules.other.listReplaceTabs,e=>` `.repeat(3*e.length)),l=e.split(`
|
|
147
|
+
`,1)[0],u=!c.trim(),d=0;if(this.options.pedantic?(d=2,s=c.trimStart()):u?d=t[1].length+1:(d=t[2].search(this.rules.other.nonSpaceChar),d=d>4?1:d,s=c.slice(d),d+=t[1].length),u&&this.rules.other.blankLine.test(l)&&(r+=l+`
|
|
148
|
+
`,e=e.substring(l.length+1),n=!0),!n){let t=this.rules.other.nextBulletRegex(d),n=this.rules.other.hrRegex(d),i=this.rules.other.fencesBeginRegex(d),a=this.rules.other.headingBeginRegex(d),o=this.rules.other.htmlBeginRegex(d);for(;e;){let f=e.split(`
|
|
149
|
+
`,1)[0],p;if(l=f,this.options.pedantic?(l=l.replace(this.rules.other.listReplaceNesting,` `),p=l):p=l.replace(this.rules.other.tabCharGlobal,` `),i.test(l)||a.test(l)||o.test(l)||t.test(l)||n.test(l))break;if(p.search(this.rules.other.nonSpaceChar)>=d||!l.trim())s+=`
|
|
150
|
+
`+p.slice(d);else{if(u||c.replace(this.rules.other.tabCharGlobal,` `).search(this.rules.other.nonSpaceChar)>=4||i.test(c)||a.test(c)||n.test(c))break;s+=`
|
|
151
|
+
`+l}!u&&!l.trim()&&(u=!0),r+=f+`
|
|
152
|
+
`,e=e.substring(f.length+1),c=p.slice(d)}}i.loose||(o?i.loose=!0:this.rules.other.doubleBlankLine.test(r)&&(o=!0));let f=null,p;this.options.gfm&&(f=this.rules.other.listIsTask.exec(s),f&&(p=f[0]!==`[ ] `,s=s.replace(this.rules.other.listReplaceTask,``))),i.items.push({type:`list_item`,raw:r,task:!!f,checked:p,loose:!1,text:s,tokens:[]}),i.raw+=r}let s=i.items.at(-1);if(s)s.raw=s.raw.trimEnd(),s.text=s.text.trimEnd();else return;i.raw=i.raw.trimEnd();for(let e=0;e<i.items.length;e++)if(this.lexer.state.top=!1,i.items[e].tokens=this.lexer.blockTokens(i.items[e].text,[]),!i.loose){let t=i.items[e].tokens.filter(e=>e.type===`space`);i.loose=t.length>0&&t.some(e=>this.rules.other.anyLine.test(e.raw))}if(i.loose)for(let e=0;e<i.items.length;e++)i.items[e].loose=!0;return i}}html(e){let t=this.rules.block.html.exec(e);if(t)return{type:`html`,block:!0,raw:t[0],pre:t[1]===`pre`||t[1]===`script`||t[1]===`style`,text:t[0]}}def(e){let t=this.rules.block.def.exec(e);if(t){let e=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal,` `),n=t[2]?t[2].replace(this.rules.other.hrefBrackets,`$1`).replace(this.rules.inline.anyPunctuation,`$1`):``,r=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,`$1`):t[3];return{type:`def`,tag:e,raw:t[0],href:n,title:r}}}table(e){let t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;let n=Od(t[1]),r=t[2].replace(this.rules.other.tableAlignChars,``).split(`|`),i=t[3]?.trim()?t[3].replace(this.rules.other.tableRowBlankLine,``).split(`
|
|
153
|
+
`):[],a={type:`table`,raw:t[0],header:[],align:[],rows:[]};if(n.length===r.length){for(let e of r)this.rules.other.tableAlignRight.test(e)?a.align.push(`right`):this.rules.other.tableAlignCenter.test(e)?a.align.push(`center`):this.rules.other.tableAlignLeft.test(e)?a.align.push(`left`):a.align.push(null);for(let e=0;e<n.length;e++)a.header.push({text:n[e],tokens:this.lexer.inline(n[e]),header:!0,align:a.align[e]});for(let e of i)a.rows.push(Od(e,a.header.length).map((e,t)=>({text:e,tokens:this.lexer.inline(e),header:!1,align:a.align[t]})));return a}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t)return{type:`heading`,raw:t[0],depth:t[2].charAt(0)===`=`?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let e=t[1].charAt(t[1].length-1)===`
|
|
154
|
+
`?t[1].slice(0,-1):t[1];return{type:`paragraph`,raw:t[0],text:e,tokens:this.lexer.inline(e)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return{type:`text`,raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){let t=this.rules.inline.escape.exec(e);if(t)return{type:`escape`,raw:t[0],text:t[1]}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:`html`,raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){let t=this.rules.inline.link.exec(e);if(t){let e=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(e)){if(!this.rules.other.endAngleBracket.test(e))return;let t=kd(e.slice(0,-1),`\\`);if((e.length-t.length)%2==0)return}else{let e=Ad(t[2],`()`);if(e===-2)return;if(e>-1){let n=(t[0].indexOf(`!`)===0?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,n).trim(),t[3]=``}}let n=t[2],r=``;if(this.options.pedantic){let e=this.rules.other.pedanticHrefTitle.exec(n);e&&(n=e[1],r=e[3])}else r=t[3]?t[3].slice(1,-1):``;return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(n=this.options.pedantic&&!this.rules.other.endAngleBracket.test(e)?n.slice(1):n.slice(1,-1)),jd(t,{href:n&&n.replace(this.rules.inline.anyPunctuation,`$1`),title:r&&r.replace(this.rules.inline.anyPunctuation,`$1`)},t[0],this.lexer,this.rules)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let e=t[(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal,` `).toLowerCase()];if(!e){let e=n[0].charAt(0);return{type:`text`,raw:e,text:e}}return jd(n,e,n[0],this.lexer,this.rules)}}emStrong(e,t,n=``){let r=this.rules.inline.emStrongLDelim.exec(e);if(!(!r||r[3]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!(r[1]||r[2])||!n||this.rules.inline.punctuation.exec(n))){let n=[...r[0]].length-1,i,a,o=n,s=0,c=r[0][0]===`*`?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(c.lastIndex=0,t=t.slice(-1*e.length+n);(r=c.exec(t))!=null;){if(i=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!i)continue;if(a=[...i].length,r[3]||r[4]){o+=a;continue}if((r[5]||r[6])&&n%3&&!((n+a)%3)){s+=a;continue}if(o-=a,o>0)continue;a=Math.min(a,a+o+s);let t=[...r[0]][0].length,c=e.slice(0,n+r.index+t+a);if(Math.min(n,a)%2){let e=c.slice(1,-1);return{type:`em`,raw:c,text:e,tokens:this.lexer.inlineTokens(e)}}let l=c.slice(2,-2);return{type:`strong`,raw:c,text:l,tokens:this.lexer.inlineTokens(l)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(this.rules.other.newLineCharGlobal,` `),n=this.rules.other.nonSpaceChar.test(e),r=this.rules.other.startingSpaceChar.test(e)&&this.rules.other.endingSpaceChar.test(e);return n&&r&&(e=e.substring(1,e.length-1)),{type:`codespan`,raw:t[0],text:e}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:`br`,raw:t[0]}}del(e){let t=this.rules.inline.del.exec(e);if(t)return{type:`del`,raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let e,n;return t[2]===`@`?(e=t[1],n=`mailto:`+e):(e=t[1],n=e),{type:`link`,raw:t[0],text:e,href:n,tokens:[{type:`text`,raw:e,text:e}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let e,n;if(t[2]===`@`)e=t[0],n=`mailto:`+e;else{let r;do r=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??``;while(r!==t[0]);e=t[0],n=t[1]===`www.`?`http://`+t[0]:t[0]}return{type:`link`,raw:t[0],text:e,href:n,tokens:[{type:`text`,raw:e,text:e}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let e=this.lexer.state.inRawBlock;return{type:`text`,raw:t[0],text:t[0],escaped:e}}}},Pd=class e{tokens;options;state;tokenizer;inlineQueue;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||gu,this.options.tokenizer=this.options.tokenizer||new Nd,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 t={other:bu,block:Sd.normal,inline:Cd.normal};this.options.pedantic?(t.block=Sd.pedantic,t.inline=Cd.pedantic):this.options.gfm&&(t.block=Sd.gfm,t.inline=this.options.breaks?Cd.breaks:Cd.gfm),this.tokenizer.rules=t}static get rules(){return{block:Sd,inline:Cd}}static lex(t,n){return new e(n).lex(t)}static lexInline(t,n){return new e(n).inlineTokens(t)}lex(e){e=e.replace(bu.carriageReturn,`
|
|
155
|
+
`),this.blockTokens(e,this.tokens);for(let e=0;e<this.inlineQueue.length;e++){let t=this.inlineQueue[e];this.inlineTokens(t.src,t.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,t=[],n=!1){for(this.options.pedantic&&(e=e.replace(bu.tabCharGlobal,` `).replace(bu.spaceLine,``));e;){let r;if(this.options.extensions?.block?.some(n=>(r=n.call({lexer:this},e,t))?(e=e.substring(r.raw.length),t.push(r),!0):!1))continue;if(r=this.tokenizer.space(e)){e=e.substring(r.raw.length);let n=t.at(-1);r.raw.length===1&&n!==void 0?n.raw+=`
|
|
156
|
+
`:t.push(r);continue}if(r=this.tokenizer.code(e)){e=e.substring(r.raw.length);let n=t.at(-1);n?.type===`paragraph`||n?.type===`text`?(n.raw+=(n.raw.endsWith(`
|
|
157
|
+
`)?``:`
|
|
158
|
+
`)+r.raw,n.text+=`
|
|
159
|
+
`+r.text,this.inlineQueue.at(-1).src=n.text):t.push(r);continue}if((r=this.tokenizer.fences(e))||(r=this.tokenizer.heading(e))||(r=this.tokenizer.hr(e))||(r=this.tokenizer.blockquote(e))||(r=this.tokenizer.list(e))||(r=this.tokenizer.html(e))){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.def(e)){e=e.substring(r.raw.length);let n=t.at(-1);n?.type===`paragraph`||n?.type===`text`?(n.raw+=(n.raw.endsWith(`
|
|
160
|
+
`)?``:`
|
|
161
|
+
`)+r.raw,n.text+=`
|
|
162
|
+
`+r.raw,this.inlineQueue.at(-1).src=n.text):this.tokens.links[r.tag]||(this.tokens.links[r.tag]={href:r.href,title:r.title},t.push(r));continue}if((r=this.tokenizer.table(e))||(r=this.tokenizer.lheading(e))){e=e.substring(r.raw.length),t.push(r);continue}let i=e;if(this.options.extensions?.startBlock){let t=1/0,n=e.slice(1),r;this.options.extensions.startBlock.forEach(e=>{r=e.call({lexer:this},n),typeof r==`number`&&r>=0&&(t=Math.min(t,r))}),t<1/0&&t>=0&&(i=e.substring(0,t+1))}if(this.state.top&&(r=this.tokenizer.paragraph(i))){let a=t.at(-1);n&&a?.type===`paragraph`?(a.raw+=(a.raw.endsWith(`
|
|
163
|
+
`)?``:`
|
|
164
|
+
`)+r.raw,a.text+=`
|
|
165
|
+
`+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):t.push(r),n=i.length!==e.length,e=e.substring(r.raw.length)}else if(r=this.tokenizer.text(e)){e=e.substring(r.raw.length);let n=t.at(-1);n?.type===`text`?(n.raw+=(n.raw.endsWith(`
|
|
166
|
+
`)?``:`
|
|
167
|
+
`)+r.raw,n.text+=`
|
|
168
|
+
`+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=n.text):t.push(r)}else if(e){let t=`Infinite loop on byte: `+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw Error(t)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){let n=e,r=null;if(this.tokens.links){let e=Object.keys(this.tokens.links);if(e.length>0)for(;(r=this.tokenizer.rules.inline.reflinkSearch.exec(n))!=null;)e.includes(r[0].slice(r[0].lastIndexOf(`[`)+1,-1))&&(n=n.slice(0,r.index)+`[`+`a`.repeat(r[0].length-2)+`]`+n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(r=this.tokenizer.rules.inline.anyPunctuation.exec(n))!=null;)n=n.slice(0,r.index)+`++`+n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let i;for(;(r=this.tokenizer.rules.inline.blockSkip.exec(n))!=null;)i=r[2]?r[2].length:0,n=n.slice(0,r.index+i)+`[`+`a`.repeat(r[0].length-i-2)+`]`+n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);n=this.options.hooks?.emStrongMask?.call({lexer:this},n)??n;let a=!1,o=``;for(;e;){a||(o=``),a=!1;let r;if(this.options.extensions?.inline?.some(n=>(r=n.call({lexer:this},e,t))?(e=e.substring(r.raw.length),t.push(r),!0):!1))continue;if((r=this.tokenizer.escape(e))||(r=this.tokenizer.tag(e))||(r=this.tokenizer.link(e))){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(r.raw.length);let n=t.at(-1);r.type===`text`&&n?.type===`text`?(n.raw+=r.raw,n.text+=r.text):t.push(r);continue}if((r=this.tokenizer.emStrong(e,n,o))||(r=this.tokenizer.codespan(e))||(r=this.tokenizer.br(e))||(r=this.tokenizer.del(e))||(r=this.tokenizer.autolink(e))||!this.state.inLink&&(r=this.tokenizer.url(e))){e=e.substring(r.raw.length),t.push(r);continue}let i=e;if(this.options.extensions?.startInline){let t=1/0,n=e.slice(1),r;this.options.extensions.startInline.forEach(e=>{r=e.call({lexer:this},n),typeof r==`number`&&r>=0&&(t=Math.min(t,r))}),t<1/0&&t>=0&&(i=e.substring(0,t+1))}if(r=this.tokenizer.inlineText(i)){e=e.substring(r.raw.length),r.raw.slice(-1)!==`_`&&(o=r.raw.slice(-1)),a=!0;let n=t.at(-1);n?.type===`text`?(n.raw+=r.raw,n.text+=r.text):t.push(r)}else if(e){let t=`Infinite loop on byte: `+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw Error(t)}}return t}},Fd=class{options;parser;constructor(e){this.options=e||gu}space(e){return``}code({text:e,lang:t,escaped:n}){let r=(t||``).match(bu.notSpaceStart)?.[0],i=e.replace(bu.endingNewline,``)+`
|
|
169
|
+
`;return r?`<pre><code class="language-`+Ed(r)+`">`+(n?i:Ed(i,!0))+`</code></pre>
|
|
170
|
+
`:`<pre><code>`+(n?i:Ed(i,!0))+`</code></pre>
|
|
171
|
+
`}blockquote({tokens:e}){return`<blockquote>
|
|
172
|
+
${this.parser.parse(e)}</blockquote>
|
|
173
|
+
`}html({text:e}){return e}def(e){return``}heading({tokens:e,depth:t}){return`<h${t}>${this.parser.parseInline(e)}</h${t}>
|
|
174
|
+
`}hr(e){return`<hr>
|
|
175
|
+
`}list(e){let t=e.ordered,n=e.start,r=``;for(let t=0;t<e.items.length;t++){let n=e.items[t];r+=this.listitem(n)}let i=t?`ol`:`ul`,a=t&&n!==1?` start="`+n+`"`:``;return`<`+i+a+`>
|
|
176
|
+
`+r+`</`+i+`>
|
|
177
|
+
`}listitem(e){let t=``;if(e.task){let n=this.checkbox({checked:!!e.checked});e.loose?e.tokens[0]?.type===`paragraph`?(e.tokens[0].text=n+` `+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&e.tokens[0].tokens[0].type===`text`&&(e.tokens[0].tokens[0].text=n+` `+Ed(e.tokens[0].tokens[0].text),e.tokens[0].tokens[0].escaped=!0)):e.tokens.unshift({type:`text`,raw:n+` `,text:n+` `,escaped:!0}):t+=n+` `}return t+=this.parser.parse(e.tokens,!!e.loose),`<li>${t}</li>
|
|
178
|
+
`}checkbox({checked:e}){return`<input `+(e?`checked="" `:``)+`disabled="" type="checkbox">`}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>
|
|
179
|
+
`}table(e){let t=``,n=``;for(let t=0;t<e.header.length;t++)n+=this.tablecell(e.header[t]);t+=this.tablerow({text:n});let r=``;for(let t=0;t<e.rows.length;t++){let i=e.rows[t];n=``;for(let e=0;e<i.length;e++)n+=this.tablecell(i[e]);r+=this.tablerow({text:n})}return r&&=`<tbody>${r}</tbody>`,`<table>
|
|
180
|
+
<thead>
|
|
181
|
+
`+t+`</thead>
|
|
182
|
+
`+r+`</table>
|
|
183
|
+
`}tablerow({text:e}){return`<tr>
|
|
184
|
+
${e}</tr>
|
|
185
|
+
`}tablecell(e){let t=this.parser.parseInline(e.tokens),n=e.header?`th`:`td`;return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+`</${n}>
|
|
186
|
+
`}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${Ed(e,!0)}</code>`}br(e){return`<br>`}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,tokens:n}){let r=this.parser.parseInline(n),i=Dd(e);if(i===null)return r;e=i;let a=`<a href="`+e+`"`;return t&&(a+=` title="`+Ed(t)+`"`),a+=`>`+r+`</a>`,a}image({href:e,title:t,text:n,tokens:r}){r&&(n=this.parser.parseInline(r,this.parser.textRenderer));let i=Dd(e);if(i===null)return Ed(n);e=i;let a=`<img src="${e}" alt="${n}"`;return t&&(a+=` title="${Ed(t)}"`),a+=`>`,a}text(e){return`tokens`in e&&e.tokens?this.parser.parseInline(e.tokens):`escaped`in e&&e.escaped?e.text:Ed(e.text)}},Id=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return``+e}image({text:e}){return``+e}br(){return``}},Ld=class e{options;renderer;textRenderer;constructor(e){this.options=e||gu,this.options.renderer=this.options.renderer||new Fd,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Id}static parse(t,n){return new e(n).parse(t)}static parseInline(t,n){return new e(n).parseInline(t)}parse(e,t=!0){let n=``;for(let r=0;r<e.length;r++){let i=e[r];if(this.options.extensions?.renderers?.[i.type]){let e=i,t=this.options.extensions.renderers[e.type].call({parser:this},e);if(t!==!1||![`space`,`hr`,`heading`,`code`,`table`,`blockquote`,`list`,`html`,`def`,`paragraph`,`text`].includes(e.type)){n+=t||``;continue}}let a=i;switch(a.type){case`space`:n+=this.renderer.space(a);continue;case`hr`:n+=this.renderer.hr(a);continue;case`heading`:n+=this.renderer.heading(a);continue;case`code`:n+=this.renderer.code(a);continue;case`table`:n+=this.renderer.table(a);continue;case`blockquote`:n+=this.renderer.blockquote(a);continue;case`list`:n+=this.renderer.list(a);continue;case`html`:n+=this.renderer.html(a);continue;case`def`:n+=this.renderer.def(a);continue;case`paragraph`:n+=this.renderer.paragraph(a);continue;case`text`:{let i=a,o=this.renderer.text(i);for(;r+1<e.length&&e[r+1].type===`text`;)i=e[++r],o+=`
|
|
187
|
+
`+this.renderer.text(i);n+=t?this.renderer.paragraph({type:`paragraph`,raw:o,text:o,tokens:[{type:`text`,raw:o,text:o,escaped:!0}]}):o;continue}default:{let e=`Token with "`+a.type+`" type was not found.`;if(this.options.silent)return console.error(e),``;throw Error(e)}}}return n}parseInline(e,t=this.renderer){let n=``;for(let r=0;r<e.length;r++){let i=e[r];if(this.options.extensions?.renderers?.[i.type]){let e=this.options.extensions.renderers[i.type].call({parser:this},i);if(e!==!1||![`escape`,`html`,`link`,`image`,`strong`,`em`,`codespan`,`br`,`del`,`text`].includes(i.type)){n+=e||``;continue}}let a=i;switch(a.type){case`escape`:n+=t.text(a);break;case`html`:n+=t.html(a);break;case`link`:n+=t.link(a);break;case`image`:n+=t.image(a);break;case`strong`:n+=t.strong(a);break;case`em`:n+=t.em(a);break;case`codespan`:n+=t.codespan(a);break;case`br`:n+=t.br(a);break;case`del`:n+=t.del(a);break;case`text`:n+=t.text(a);break;default:{let e=`Token with "`+a.type+`" type was not found.`;if(this.options.silent)return console.error(e),``;throw Error(e)}}}return n}},Rd=class{options;block;constructor(e){this.options=e||gu}static passThroughHooks=new Set([`preprocess`,`postprocess`,`processAllTokens`,`emStrongMask`]);static passThroughHooksRespectAsync=new Set([`preprocess`,`postprocess`,`processAllTokens`]);preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(){return this.block?Pd.lex:Pd.lexInline}provideParser(){return this.block?Ld.parse:Ld.parseInline}},zd=new class{defaults=hu();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=Ld;Renderer=Fd;TextRenderer=Id;Lexer=Pd;Tokenizer=Nd;Hooks=Rd;constructor(...e){this.use(...e)}walkTokens(e,t){let n=[];for(let r of e)switch(n=n.concat(t.call(this,r)),r.type){case`table`:{let e=r;for(let r of e.header)n=n.concat(this.walkTokens(r.tokens,t));for(let r of e.rows)for(let e of r)n=n.concat(this.walkTokens(e.tokens,t));break}case`list`:{let e=r;n=n.concat(this.walkTokens(e.items,t));break}default:{let e=r;this.defaults.extensions?.childTokens?.[e.type]?this.defaults.extensions.childTokens[e.type].forEach(r=>{let i=e[r].flat(1/0);n=n.concat(this.walkTokens(i,t))}):e.tokens&&(n=n.concat(this.walkTokens(e.tokens,t)))}}return n}use(...e){let t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(e=>{let n={...e};if(n.async=this.defaults.async||n.async||!1,e.extensions&&(e.extensions.forEach(e=>{if(!e.name)throw Error(`extension name required`);if(`renderer`in e){let n=t.renderers[e.name];n?t.renderers[e.name]=function(...t){let r=e.renderer.apply(this,t);return r===!1&&(r=n.apply(this,t)),r}:t.renderers[e.name]=e.renderer}if(`tokenizer`in e){if(!e.level||e.level!==`block`&&e.level!==`inline`)throw Error(`extension level must be 'block' or 'inline'`);let n=t[e.level];n?n.unshift(e.tokenizer):t[e.level]=[e.tokenizer],e.start&&(e.level===`block`?t.startBlock?t.startBlock.push(e.start):t.startBlock=[e.start]:e.level===`inline`&&(t.startInline?t.startInline.push(e.start):t.startInline=[e.start]))}`childTokens`in e&&e.childTokens&&(t.childTokens[e.name]=e.childTokens)}),n.extensions=t),e.renderer){let t=this.defaults.renderer||new Fd(this.defaults);for(let n in e.renderer){if(!(n in t))throw Error(`renderer '${n}' does not exist`);if([`options`,`parser`].includes(n))continue;let r=n,i=e.renderer[r],a=t[r];t[r]=(...e)=>{let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n||``}}n.renderer=t}if(e.tokenizer){let t=this.defaults.tokenizer||new Nd(this.defaults);for(let n in e.tokenizer){if(!(n in t))throw Error(`tokenizer '${n}' does not exist`);if([`options`,`rules`,`lexer`].includes(n))continue;let r=n,i=e.tokenizer[r],a=t[r];t[r]=(...e)=>{let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n}}n.tokenizer=t}if(e.hooks){let t=this.defaults.hooks||new Rd;for(let n in e.hooks){if(!(n in t))throw Error(`hook '${n}' does not exist`);if([`options`,`block`].includes(n))continue;let r=n,i=e.hooks[r],a=t[r];t[r]=Rd.passThroughHooks.has(n)?e=>{if(this.defaults.async&&Rd.passThroughHooksRespectAsync.has(n))return(async()=>{let n=await i.call(t,e);return a.call(t,n)})();let r=i.call(t,e);return a.call(t,r)}:(...e)=>{if(this.defaults.async)return(async()=>{let n=await i.apply(t,e);return n===!1&&(n=await a.apply(t,e)),n})();let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n}}n.hooks=t}if(e.walkTokens){let t=this.defaults.walkTokens,r=e.walkTokens;n.walkTokens=function(e){let n=[];return n.push(r.call(this,e)),t&&(n=n.concat(t.call(this,e))),n}}this.defaults={...this.defaults,...n}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return Pd.lex(e,t??this.defaults)}parser(e,t){return Ld.parse(e,t??this.defaults)}parseMarkdown(e){return(t,n)=>{let r={...n},i={...this.defaults,...r},a=this.onError(!!i.silent,!!i.async);if(this.defaults.async===!0&&r.async===!1)return a(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 t>`u`||t===null)return a(Error(`marked(): input parameter is undefined or null`));if(typeof t!=`string`)return a(Error(`marked(): input parameter is of type `+Object.prototype.toString.call(t)+`, string expected`));if(i.hooks&&(i.hooks.options=i,i.hooks.block=e),i.async)return(async()=>{let n=i.hooks?await i.hooks.preprocess(t):t,r=await(i.hooks?await i.hooks.provideLexer():e?Pd.lex:Pd.lexInline)(n,i),a=i.hooks?await i.hooks.processAllTokens(r):r;i.walkTokens&&await Promise.all(this.walkTokens(a,i.walkTokens));let o=await(i.hooks?await i.hooks.provideParser():e?Ld.parse:Ld.parseInline)(a,i);return i.hooks?await i.hooks.postprocess(o):o})().catch(a);try{i.hooks&&(t=i.hooks.preprocess(t));let n=(i.hooks?i.hooks.provideLexer():e?Pd.lex:Pd.lexInline)(t,i);i.hooks&&(n=i.hooks.processAllTokens(n)),i.walkTokens&&this.walkTokens(n,i.walkTokens);let r=(i.hooks?i.hooks.provideParser():e?Ld.parse:Ld.parseInline)(n,i);return i.hooks&&(r=i.hooks.postprocess(r)),r}catch(e){return a(e)}}}onError(e,t){return n=>{if(n.message+=`
|
|
188
|
+
Please report this to https://github.com/markedjs/marked.`,e){let e=`<p>An error occurred:</p><pre>`+Ed(n.message+``,!0)+`</pre>`;return t?Promise.resolve(e):e}if(t)return Promise.reject(n);throw n}}};function U(e,t){return zd.parse(e,t)}U.options=U.setOptions=function(e){return zd.setOptions(e),U.defaults=zd.defaults,_u(U.defaults),U},U.getDefaults=hu,U.defaults=gu,U.use=function(...e){return zd.use(...e),U.defaults=zd.defaults,_u(U.defaults),U},U.walkTokens=function(e,t){return zd.walkTokens(e,t)},U.parseInline=zd.parseInline,U.Parser=Ld,U.parser=Ld.parse,U.Renderer=Fd,U.TextRenderer=Id,U.Lexer=Pd,U.lexer=Pd.lex,U.Tokenizer=Nd,U.Hooks=Rd,U.parse=U,U.options,U.setOptions,U.use,U.walkTokens,U.parseInline,Ld.parse,Pd.lex;function Bd(e){var t=[...arguments].slice(1),n=Array.from(typeof e==`string`?[e]:e);n[n.length-1]=n[n.length-1].replace(/\r?\n([\t ]*)$/,``);var r=n.reduce(function(e,t){var n=t.match(/\n([\t ]+|(?!\s).)/g);return n?e.concat(n.map(function(e){return e.match(/[\t ]/g)?.length??0})):e},[]);if(r.length){var i=RegExp(`
|
|
189
|
+
[ ]{${Math.min.apply(Math,r)}}`,`g`);n=n.map(function(e){return e.replace(i,`
|
|
190
|
+
`)})}n[0]=n[0].replace(/^\r?\n/,``);var a=n[0];return t.forEach(function(e,t){var r=a.match(/(?:^|\n)( *)$/),i=r?r[1]:``,o=e;typeof e==`string`&&e.includes(`
|
|
191
|
+
`)&&(o=String(e).split(`
|
|
192
|
+
`).map(function(e,t){return t===0?e:`${i}${e}`}).join(`
|
|
193
|
+
`)),a+=o+n[t+1]}),a}var Vd=typeof performance<`u`&&typeof performance.now==`function`,Hd=i(()=>Vd?performance.now():0,`now`),Ud=`🧜 `,Wd=`Mermaid render`,Gd=`Mermaid`,Kd={parse:`tertiary`,prepare:`secondary`,measure:`primary`,layout:`primary-dark`,layoutCore:`error`,draw:`primary-light`,paint:`secondary-dark`,serialize:`tertiary-dark`,render:`primary-light`};(class{constructor(){this.enabled=!1,this.autoPrint=!0,this.records=[],this.maxRecords=200,this.roots=[],this.stack=[],this.buckets={}}static{i(this,`Profiler`)}enable(){return this.enabled=!0,this}disable(){return this.enabled=!1,this}start(e){this.enabled&&(this.roots=[],this.stack=[],this.buckets={},this.begin(e))}tickSync(e,t){if(!this.enabled)return t();let n=Hd();try{return t()}finally{this.buckets[e]=(this.buckets[e]??0)+(Hd()-n)}}async tick(e,t){if(!this.enabled)return t();let n=Hd();try{return await t()}finally{this.buckets[e]=(this.buckets[e]??0)+(Hd()-n)}}stop(){if(!this.enabled)return;for(;this.stack.length>0;)this.end();let e=this.roots.at(-1),t=this.runLabel??e?.name;return e&&(this.records.push({label:t??e.name,tree:e,buckets:{...this.buckets}}),this.records.length>this.maxRecords&&this.records.splice(0,this.records.length-this.maxRecords),this.autoPrint&&this.printSummary(e,t)),this.runLabel=void 0,e}begin(e){if(!this.enabled)return;let t={name:e,start:Hd(),duration:-1,children:[]},n=this.stack.at(-1);if(n?n.children.push(t):this.roots.push(t),this.stack.push(t),Vd&&typeof performance.mark==`function`)try{performance.mark(`${Ud}${e} \u25B6`)}catch{}}end(){if(!this.enabled)return;let e=this.stack.pop();if(!e)return;let t=Hd();if(e.duration=t-e.start,Vd&&typeof performance.measure==`function`)try{performance.measure(`${Ud}${e.name}`,{start:e.start,end:t,detail:{devtools:{dataType:`track-entry`,track:Wd,trackGroup:Gd,color:Kd[e.name]??`primary`,tooltipText:`${e.name} \u2014 ${e.duration.toFixed(1)} ms`}}})}catch{}}async span(e,t){if(!this.enabled)return t();this.begin(e);try{return await t()}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(e=this.report(),t){if(!e)return;let n=e.duration,r=t&&t!==e.name?`${e.name} [${t}]`:e.name,a=[`ms % phase`],o=i((e,t)=>{let r=` `.repeat(t),i=e.duration.toFixed(1).padStart(8),s=n>0?`${(e.duration/n*100).toFixed(0).padStart(3)}%`:` -`;a.push(`${i} ${s} ${r}${e.name}`);for(let n of e.children)o(n,t+1);if(e.children.length>0){let t=e.children.reduce((e,t)=>e+t.duration,0),n=e.duration-t;if(n>.5){let e=n.toFixed(1).padStart(8);a.push(`${e} ${r} (self)`)}}},`walk`);o(e,0);let s=Object.keys(this.buckets);if(s.length>0){a.push(`—— buckets (summed) ——`);for(let e of s)a.push(`${this.buckets[e].toFixed(1).padStart(8)} ${e}`)}console.log(`${Ud}mermaid render profile \xB7 ${r}
|
|
194
|
+
${a.join(`
|
|
195
|
+
`)}`)}}),globalThis.injected??={includeLargeFeatures:!0,profiling:!1,version:`0.0.0`};var qd=pu.default.extend({raf(e){typeof queueMicrotask==`function`?queueMicrotask(e):setTimeout(e,0)}}).extend(mu.default);function Jd(e,{markdownAutoWrap:t}){return Bd(e.replace(/<br\/>/g,`
|
|
196
|
+
`).replace(/\n{2,}/g,`
|
|
197
|
+
`))}i(Jd,`preprocessMarkdown`);function Yd(e){return e.split(/\\n|\n|<br\s*\/?>/gi).map(e=>e.trim().match(/<[^>]+>|[^\s<>]+/g)?.map(e=>({content:e,type:`normal`}))??[])}i(Yd,`nonMarkdownToLines`);function Xd(e,t={}){let n=Jd(e,t),r=U.lexer(n),a=[[]],o=0;function s(e,t=`normal`){e.type===`text`?e.text.split(`
|
|
198
|
+
`).forEach((e,n)=>{n!==0&&(o++,a.push([])),e.split(` `).forEach(e=>{e=e.replace(/'/g,`'`),e&&a[o].push({content:e,type:t})})}):e.type===`strong`||e.type===`em`?e.tokens.forEach(t=>{s(t,e.type)}):e.type===`html`&&a[o].push({content:e.text,type:`normal`})}return i(s,`processNode`),r.forEach(e=>{e.type===`paragraph`?e.tokens?.forEach(e=>{s(e)}):e.type===`html`?a[o].push({content:e.text,type:`normal`}):a[o].push({content:e.raw,type:`normal`})}),a}i(Xd,`markdownToLines`);function Zd(e){return e?`<p>${e.replace(/\\n|\n/g,`<br />`)}</p>`:``}i(Zd,`nonMarkdownToHTML`);function Qd(e,{markdownAutoWrap:t}={}){let n=U.lexer(e);function r(e){return e.type===`text`?t===!1?e.text.replace(/\n */g,`<br/>`).replace(/ /g,` `):e.text.replace(/\n */g,`<br/>`):e.type===`strong`?`<strong>${e.tokens?.map(r).join(``)}</strong>`:e.type===`em`?`<em>${e.tokens?.map(r).join(``)}</em>`:e.type===`paragraph`?`<p>${e.tokens?.map(r).join(``)}</p>`:e.type===`space`?``:e.type===`html`?`${e.text}`:e.type===`escape`?e.text:(l.warn(`Unsupported markdown: ${e.type}`),e.raw)}return i(r,`output`),n.map(r).join(``)}i(Qd,`markdownToHTML`);function $d(e){return Intl.Segmenter?[...new Intl.Segmenter().segment(e)].map(e=>e.segment):[...e]}i($d,`splitTextToChars`);function ef(e,t){return tf(e,[],$d(t.content),t.type)}i(ef,`splitWordToFitWidth`);function tf(e,t,n,r){if(n.length===0)return[{content:t.join(``),type:r},{content:``,type:r}];let[i,...a]=n,o=[...t,i];return e([{content:o.join(``),type:r}])?tf(e,o,a,r):(t.length===0&&i&&(t.push(i),n.shift()),[{content:t.join(``),type:r},{content:n.join(``),type:r}])}i(tf,`splitWordToFitWidthRecursion`);function nf(e,t){if(e.some(({content:e})=>e.includes(`
|
|
199
|
+
`)))throw Error(`splitLineToFitWidth does not support newlines in the line`);return rf(e,t)}i(nf,`splitLineToFitWidth`);function rf(e,t,n=[],r=[]){if(e.length===0)return r.length>0&&n.push(r),n.length>0?n:[];let i=``;e[0].content===` `&&(i=` `,e.shift());let a=e.shift()??{content:` `,type:`normal`},o=[...r];if(i!==``&&o.push({content:i,type:`normal`}),o.push(a),t(o))return rf(e,t,n,o);if(r.length>0)n.push(r),e.unshift(a);else if(a.content){let[r,i]=ef(t,a);n.push([r]),i.content&&e.unshift(i)}return rf(e,t,n)}i(rf,`splitLineToFitWidthRecursion`);function af(e,t){t&&e.attr(`style`,t)}i(af,`applyStyle`);var of=16384;async function sf(e,t,n,r,i=!1,a=z()){let o=e.append(`foreignObject`);o.attr(`width`,`${Math.min(10*n,of)}px`),o.attr(`height`,`${Math.min(10*n,of)}px`);let s=o.append(`xhtml:div`),c=Sr(t.label)?await Tr(t.label.replace(Er.lineBreakRegex,`
|
|
200
|
+
`),a):sr(t.label,a),l=t.isNode?`nodeLabel`:`edgeLabel`,u=s.append(`span`);return u.html(c),af(u,t.labelStyle),u.attr(`class`,`${l} ${r}`),af(s,t.labelStyle),s.style(`display`,`table-cell`),s.style(`white-space`,`nowrap`),s.style(`line-height`,`1.5`),n!==1/0&&(s.style(`max-width`,n+`px`),s.style(`text-align`,`center`)),s.attr(`xmlns`,`http://www.w3.org/1999/xhtml`),i&&s.attr(`class`,`labelBkg`),(await qd.measure(()=>s.node().getBoundingClientRect())).width===n&&(s.style(`display`,`table`),s.style(`white-space`,`break-spaces`),s.style(`width`,n+`px`)),o.node()}i(sf,`addHtmlSpan`);function cf(e,t,n,r=!1){let i=e.append(`tspan`).attr(`class`,`text-outer-tspan`).attr(`x`,0).attr(`y`,t*n-.1+`em`).attr(`dy`,n+`em`);return r&&i.attr(`text-anchor`,`middle`),i}i(cf,`createTspan`);function lf(e,t,n){let r=e.append(`text`),i=cf(r,1,t);pf(i,n);let a=i.node().getComputedTextLength();return r.remove(),a}i(lf,`computeWidthOfText`);function uf(e,t,n){let r=e.append(`text`),i=cf(r,1,t);pf(i,[{content:n,type:`normal`}]);let a=i.node()?.getBoundingClientRect();return a&&r.remove(),a}i(uf,`computeDimensionOfText`);function df(e,t,n,r=!1,a=!1){let o=1.1,s=t.append(`g`),c=s.insert(`rect`).attr(`class`,`background`).attr(`style`,`stroke: none`),l=s.append(`text`).attr(`y`,`-10.1`);a&&l.attr(`text-anchor`,`middle`);let u=0;for(let t of n){let n=i(t=>lf(s,o,t)<=e,`checkWidth`),r=n(t)?[t]:nf(t,n);for(let e of r)pf(cf(l,u,o,a),e),u++}if(r){let e=l.node().getBBox();return c.attr(`x`,e.x-2).attr(`y`,e.y-2).attr(`width`,e.width+4).attr(`height`,e.height+4),s.node()}return l.node()}i(df,`createFormattedText`);function ff(e){return e.replace(/&(amp|lt|gt);/g,(e,t)=>{switch(t){case`amp`:return`&`;case`lt`:return`<`;case`gt`:return`>`;default:return e}})}i(ff,`decodeHTMLEntities`);function pf(e,t){e.text(``),t.forEach((t,n)=>{let r=e.append(`tspan`).attr(`font-style`,t.type===`em`?`italic`:`normal`).attr(`class`,`text-inner-tspan`).attr(`font-weight`,t.type===`strong`?`bold`:`normal`);n===0?r.text(ff(t.content)):r.text(` `+ff(t.content))})}i(pf,`updateTextContentAndStyles`);async function mf(e,t={}){let n=[];e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(e,r,i)=>(n.push((async()=>{let n=`${r}:${i}`;return await xc(n)?await Sc(n,void 0,{class:`label-icon`}):`<i class='${sr(e,t).replace(`:`,` `)}'></i>`})()),e));let r=await Promise.all(n);return e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>r.shift()??``)}i(mf,`replaceIconSubstring`);var hf=i(async(e,t=``,{style:n=``,isTitle:r=!1,classes:i=``,useHtmlLabels:a=!0,markdown:o=!0,isNode:s=!0,width:c=200,addSvgBackground:u=!1}={},d)=>{if(l.debug(`XYZ createText`,t,n,r,i,a,s,`addSvgBackground: `,u),a){let r=await mf(su(o?Qd(t,d):Zd(t)),d),a=t.replace(/\\\\/g,`\\`);return await sf(e,{isNode:s,label:Sr(t)?a:r,labelStyle:n.replace(`fill:`,`color:`)},c,i,u,d)}{let i=su(t.replace(/<br\s*\/?>/g,`<br/>`)),a=df(c,e,o?Xd(i.replace(`<br>`,`<br/>`),d):Yd(i),t?u:!1,!s);if(s){/stroke:/.exec(n)&&(n=n.replace(`stroke:`,`lineColor:`));let e=n.replace(/stroke:[^;]+;?/g,``).replace(/stroke-width:[^;]+;?/g,``).replace(/fill:[^;]+;?/g,``).replace(/color:/g,`fill:`);V(a).attr(`style`,e)}else{let e=n.replace(/stroke:[^;]+;?/g,``).replace(/stroke-width:[^;]+;?/g,``).replace(/fill:[^;]+;?/g,``).replace(/background:/g,`fill:`);V(a).select(`rect`).attr(`style`,e.replace(/background:/g,`fill:`));let t=n.replace(/stroke:[^;]+;?/g,``).replace(/stroke-width:[^;]+;?/g,``).replace(/fill:[^;]+;?/g,``).replace(/color:/g,`fill:`);V(a).select(`text`).attr(`style`,t)}return r?V(a).selectAll(`tspan.text-outer-tspan`).classed(`title-row`,!0):V(a).selectAll(`tspan.text-outer-tspan`).classed(`row`,!0),a}},`createText`),gf=i(e=>{let{handDrawnSeed:t}=B();return{fill:e,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:e,seed:t}},`solidStateFill`),_f=i(e=>Array.isArray(e)?e:e?e.split(`;`).map(e=>e.trim()).filter(Boolean):[],`normalizeStyleList`),vf=i(e=>{let t=yf([...e.cssCompiledStyles||[],...e.cssStyles||[],..._f(e.labelStyle)]);return{stylesMap:t,stylesArray:[...t]}},`compileStyles`),yf=i(e=>{let t=new Map;return e.forEach(e=>{let[n,r]=e.split(`:`);t.set(n.trim(),r?.trim())}),t},`styles2Map`),bf=i(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`),W=i(e=>{let{stylesArray:t}=vf(e),n=[],r=[],i=[],a=[];return t.forEach(e=>{let t=e[0];bf(t)?n.push(e.join(`:`)+` !important`):(r.push(e.join(`:`)+` !important`),t.includes(`stroke`)&&i.push(e.join(`:`)+` !important`),t===`fill`&&a.push(e.join(`:`)+` !important`))}),{labelStyles:n.join(`;`),nodeStyles:r.join(`;`),stylesArray:t,borderStyles:i,backgroundStyles:a}},`styles2String`),G=i((e,t)=>{let{themeVariables:n,handDrawnSeed:r}=B(),{nodeBorder:i,mainBkg:a}=n,{stylesMap:o}=vf(e);return Object.assign({roughness:.7,fill:o.get(`fill`)||a,fillStyle:`hachure`,fillWeight:4,hachureGap:5.2,stroke:o.get(`stroke`)||i,seed:r,strokeWidth:o.get(`stroke-width`)?.replace(`px`,``)||1.3,fillLineDash:[0,0],strokeLineDash:xf(o.get(`stroke-dasharray`))},t)},`userNodeOverrides`),xf=i(e=>{if(!e)return[0,0];let t=e.trim().split(/\s+/).map(Number);if(t.length===1){let e=isNaN(t[0])?0:t[0];return[e,e]}return[isNaN(t[0])?0:t[0],isNaN(t[1])?0:t[1]]},`getStrokeDashArray`);function Sf(e,t,n){if(e&&e.length){let[r,i]=t,a=Math.PI/180*n,o=Math.cos(a),s=Math.sin(a);for(let t of e){let[e,n]=t;t[0]=(e-r)*o-(n-i)*s+r,t[1]=(e-r)*s+(n-i)*o+i}}}function Cf(e,t){return e[0]===t[0]&&e[1]===t[1]}function wf(e,t,n,r=1){let i=n,a=Math.max(t,.1),o=e[0]&&e[0][0]&&typeof e[0][0]==`number`?[e]:e,s=[0,0];if(i)for(let e of o)Sf(e,s,i);let c=function(e,t,n){let r=[];for(let t of e){let e=[...t];Cf(e[0],e[e.length-1])||e.push([e[0][0],e[0][1]]),e.length>2&&r.push(e)}let i=[];t=Math.max(t,.1);let a=[];for(let e of r)for(let t=0;t<e.length-1;t++){let n=e[t],r=e[t+1];if(n[1]!==r[1]){let e=Math.min(n[1],r[1]);a.push({ymin:e,ymax:Math.max(n[1],r[1]),x:e===n[1]?n[0]:r[0],islope:(r[0]-n[0])/(r[1]-n[1])})}}if(a.sort(((e,t)=>e.ymin<t.ymin?-1:e.ymin>t.ymin?1:e.x<t.x?-1:e.x>t.x?1:e.ymax===t.ymax?0:(e.ymax-t.ymax)/Math.abs(e.ymax-t.ymax))),!a.length)return i;let o=[],s=a[0].ymin,c=0;for(;o.length||a.length;){if(a.length){let e=-1;for(let t=0;t<a.length&&!(a[t].ymin>s);t++)e=t;a.splice(0,e+1).forEach((e=>{o.push({s,edge:e})}))}if(o=o.filter((e=>!(e.edge.ymax<=s))),o.sort(((e,t)=>e.edge.x===t.edge.x?0:(e.edge.x-t.edge.x)/Math.abs(e.edge.x-t.edge.x))),(n!==1||c%t==0)&&o.length>1)for(let e=0;e<o.length;e+=2){let t=e+1;if(t>=o.length)break;let n=o[e].edge,r=o[t].edge;i.push([[Math.round(n.x),s],[Math.round(r.x),s]])}s+=n,o.forEach((e=>{e.edge.x=e.edge.x+n*e.edge.islope})),c++}return i}(o,a,r);if(i){for(let e of o)Sf(e,s,-i);(function(e,t,n){let r=[];e.forEach((e=>r.push(...e))),Sf(r,t,n)})(c,s,-i)}return c}function Tf(e,t){let n=t.hachureAngle+90,r=t.hachureGap;r<0&&(r=4*t.strokeWidth),r=Math.round(Math.max(r,.1));let i=1;return t.roughness>=1&&(t.randomizer?.next()||Math.random())>.7&&(i=r),wf(e,r,n,i||1)}var Ef=class{constructor(e){this.helper=e}fillPolygons(e,t){return this._fillPolygons(e,t)}_fillPolygons(e,t){let n=Tf(e,t);return{type:`fillSketch`,ops:this.renderLines(n,t)}}renderLines(e,t){let n=[];for(let r of e)n.push(...this.helper.doubleLineOps(r[0][0],r[0][1],r[1][0],r[1][1],t));return n}};function Df(e){let t=e[0],n=e[1];return Math.sqrt((t[0]-n[0])**2+(t[1]-n[1])**2)}var Of=class extends Ef{fillPolygons(e,t){let n=t.hachureGap;n<0&&(n=4*t.strokeWidth),n=Math.max(n,.1);let r=Tf(e,Object.assign({},t,{hachureGap:n})),i=Math.PI/180*t.hachureAngle,a=[],o=.5*n*Math.cos(i),s=.5*n*Math.sin(i);for(let[e,t]of r)Df([e,t])&&a.push([[e[0]-o,e[1]+s],[...t]],[[e[0]+o,e[1]-s],[...t]]);return{type:`fillSketch`,ops:this.renderLines(a,t)}}},kf=class extends Ef{fillPolygons(e,t){let n=this._fillPolygons(e,t),r=Object.assign({},t,{hachureAngle:t.hachureAngle+90}),i=this._fillPolygons(e,r);return n.ops=n.ops.concat(i.ops),n}},Af=class{constructor(e){this.helper=e}fillPolygons(e,t){let n=Tf(e,t=Object.assign({},t,{hachureAngle:0}));return this.dotsOnLines(n,t)}dotsOnLines(e,t){let n=[],r=t.hachureGap;r<0&&(r=4*t.strokeWidth),r=Math.max(r,.1);let i=t.fillWeight;i<0&&(i=t.strokeWidth/2);let a=r/4;for(let o of e){let e=Df(o),s=e/r,c=Math.ceil(s)-1,l=e-c*r,u=(o[0][0]+o[1][0])/2-r/4,d=Math.min(o[0][1],o[1][1]);for(let e=0;e<c;e++){let o=d+l+e*r,s=u-a+2*Math.random()*a,c=o-a+2*Math.random()*a,f=this.helper.ellipse(s,c,i,i,t);n.push(...f.ops)}}return{type:`fillSketch`,ops:n}}},jf=class{constructor(e){this.helper=e}fillPolygons(e,t){let n=Tf(e,t);return{type:`fillSketch`,ops:this.dashedLine(n,t)}}dashedLine(e,t){let n=t.dashOffset<0?t.hachureGap<0?4*t.strokeWidth:t.hachureGap:t.dashOffset,r=t.dashGap<0?t.hachureGap<0?4*t.strokeWidth:t.hachureGap:t.dashGap,i=[];return e.forEach((e=>{let a=Df(e),o=Math.floor(a/(n+r)),s=(a+r-o*(n+r))/2,c=e[0],l=e[1];c[0]>l[0]&&(c=e[1],l=e[0]);let u=Math.atan((l[1]-c[1])/(l[0]-c[0]));for(let e=0;e<o;e++){let a=e*(n+r),o=a+n,l=[c[0]+a*Math.cos(u)+s*Math.cos(u),c[1]+a*Math.sin(u)+s*Math.sin(u)],d=[c[0]+o*Math.cos(u)+s*Math.cos(u),c[1]+o*Math.sin(u)+s*Math.sin(u)];i.push(...this.helper.doubleLineOps(l[0],l[1],d[0],d[1],t))}})),i}},Mf=class{constructor(e){this.helper=e}fillPolygons(e,t){let n=t.hachureGap<0?4*t.strokeWidth:t.hachureGap,r=t.zigzagOffset<0?n:t.zigzagOffset,i=Tf(e,t=Object.assign({},t,{hachureGap:n+r}));return{type:`fillSketch`,ops:this.zigzagLines(i,r,t)}}zigzagLines(e,t,n){let r=[];return e.forEach((e=>{let i=Df(e),a=Math.round(i/(2*t)),o=e[0],s=e[1];o[0]>s[0]&&(o=e[1],s=e[0]);let c=Math.atan((s[1]-o[1])/(s[0]-o[0]));for(let e=0;e<a;e++){let i=2*e*t,a=2*(e+1)*t,s=Math.sqrt(2*t**2),l=[o[0]+i*Math.cos(c),o[1]+i*Math.sin(c)],u=[o[0]+a*Math.cos(c),o[1]+a*Math.sin(c)],d=[l[0]+s*Math.cos(c+Math.PI/4),l[1]+s*Math.sin(c+Math.PI/4)];r.push(...this.helper.doubleLineOps(l[0],l[1],d[0],d[1],n),...this.helper.doubleLineOps(d[0],d[1],u[0],u[1],n))}})),r}},Nf={},Pf=class{constructor(e){this.seed=e}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}},Ff=0,If=1,Lf=2,Rf={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 zf(e,t){return e.type===t}function Bf(e){let t=[],n=function(e){let t=[];for(;e!==``;)if(e.match(/^([ \t\r\n,]+)/))e=e.substr(RegExp.$1.length);else if(e.match(/^([aAcChHlLmMqQsStTvVzZ])/))t[t.length]={type:Ff,text:RegExp.$1},e=e.substr(RegExp.$1.length);else{if(!e.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];t[t.length]={type:If,text:`${parseFloat(RegExp.$1)}`},e=e.substr(RegExp.$1.length)}return t[t.length]={type:Lf,text:``},t}(e),r=`BOD`,i=0,a=n[i];for(;!zf(a,Lf);){let o=0,s=[];if(r===`BOD`){if(a.text!==`M`&&a.text!==`m`)return Bf(`M0,0`+e);i++,o=Rf[a.text],r=a.text}else zf(a,If)?o=Rf[r]:(i++,o=Rf[a.text],r=a.text);if(!(i+o<n.length))throw Error(`Path data ended short`);for(let e=i;e<i+o;e++){let t=n[e];if(!zf(t,If))throw Error(`Param not a number: `+r+`,`+t.text);s[s.length]=+t.text}if(typeof Rf[r]!=`number`)throw Error(`Bad segment: `+r);{let e={key:r,data:s};t.push(e),i+=o,a=n[i],r===`M`&&(r=`L`),r===`m`&&(r=`l`)}}return t}function Vf(e){let t=0,n=0,r=0,i=0,a=[];for(let{key:o,data:s}of e)switch(o){case`M`:a.push({key:`M`,data:[...s]}),[t,n]=s,[r,i]=s;break;case`m`:t+=s[0],n+=s[1],a.push({key:`M`,data:[t,n]}),r=t,i=n;break;case`L`:a.push({key:`L`,data:[...s]}),[t,n]=s;break;case`l`:t+=s[0],n+=s[1],a.push({key:`L`,data:[t,n]});break;case`C`:a.push({key:`C`,data:[...s]}),t=s[4],n=s[5];break;case`c`:{let e=s.map(((e,r)=>r%2?e+n:e+t));a.push({key:`C`,data:e}),t=e[4],n=e[5];break}case`Q`:a.push({key:`Q`,data:[...s]}),t=s[2],n=s[3];break;case`q`:{let e=s.map(((e,r)=>r%2?e+n:e+t));a.push({key:`Q`,data:e}),t=e[2],n=e[3];break}case`A`:a.push({key:`A`,data:[...s]}),t=s[5],n=s[6];break;case`a`:t+=s[5],n+=s[6],a.push({key:`A`,data:[s[0],s[1],s[2],s[3],s[4],t,n]});break;case`H`:a.push({key:`H`,data:[...s]}),t=s[0];break;case`h`:t+=s[0],a.push({key:`H`,data:[t]});break;case`V`:a.push({key:`V`,data:[...s]}),n=s[0];break;case`v`:n+=s[0],a.push({key:`V`,data:[n]});break;case`S`:a.push({key:`S`,data:[...s]}),t=s[2],n=s[3];break;case`s`:{let e=s.map(((e,r)=>r%2?e+n:e+t));a.push({key:`S`,data:e}),t=e[2],n=e[3];break}case`T`:a.push({key:`T`,data:[...s]}),t=s[0],n=s[1];break;case`t`:t+=s[0],n+=s[1],a.push({key:`T`,data:[t,n]});break;case`Z`:case`z`:a.push({key:`Z`,data:[]}),t=r,n=i}return a}function Hf(e){let t=[],n=``,r=0,i=0,a=0,o=0,s=0,c=0;for(let{key:l,data:u}of e){switch(l){case`M`:t.push({key:`M`,data:[...u]}),[r,i]=u,[a,o]=u;break;case`C`:t.push({key:`C`,data:[...u]}),r=u[4],i=u[5],s=u[2],c=u[3];break;case`L`:t.push({key:`L`,data:[...u]}),[r,i]=u;break;case`H`:r=u[0],t.push({key:`L`,data:[r,i]});break;case`V`:i=u[0],t.push({key:`L`,data:[r,i]});break;case`S`:{let e=0,a=0;n===`C`||n===`S`?(e=r+(r-s),a=i+(i-c)):(e=r,a=i),t.push({key:`C`,data:[e,a,...u]}),s=u[0],c=u[1],r=u[2],i=u[3];break}case`T`:{let[e,a]=u,o=0,l=0;n===`Q`||n===`T`?(o=r+(r-s),l=i+(i-c)):(o=r,l=i);let d=r+2*(o-r)/3,f=i+2*(l-i)/3,p=e+2*(o-e)/3,m=a+2*(l-a)/3;t.push({key:`C`,data:[d,f,p,m,e,a]}),s=o,c=l,r=e,i=a;break}case`Q`:{let[e,n,a,o]=u,l=r+2*(e-r)/3,d=i+2*(n-i)/3,f=a+2*(e-a)/3,p=o+2*(n-o)/3;t.push({key:`C`,data:[l,d,f,p,a,o]}),s=e,c=n,r=a,i=o;break}case`A`:{let e=Math.abs(u[0]),n=Math.abs(u[1]),a=u[2],o=u[3],s=u[4],c=u[5],l=u[6];e===0||n===0?(t.push({key:`C`,data:[r,i,c,l,c,l]}),r=c,i=l):(r!==c||i!==l)&&(Wf(r,i,c,l,e,n,a,o,s).forEach((function(e){t.push({key:`C`,data:e})})),r=c,i=l);break}case`Z`:t.push({key:`Z`,data:[]}),r=a,i=o}n=l}return t}function Uf(e,t,n){return[e*Math.cos(n)-t*Math.sin(n),e*Math.sin(n)+t*Math.cos(n)]}function Wf(e,t,n,r,i,a,o,s,c,l){let u=(d=o,Math.PI*d/180);var d;let f=[],p=0,m=0,h=0,g=0;if(l)[p,m,h,g]=l;else{[e,t]=Uf(e,t,-u),[n,r]=Uf(n,r,-u);let o=(e-n)/2,l=(t-r)/2,d=o*o/(i*i)+l*l/(a*a);d>1&&(d=Math.sqrt(d),i*=d,a*=d);let f=i*i,_=a*a,v=f*_-f*l*l-_*o*o,y=f*l*l+_*o*o,b=(s===c?-1:1)*Math.sqrt(Math.abs(v/y));h=b*i*l/a+(e+n)/2,g=b*-a*o/i+(t+r)/2,p=Math.asin(parseFloat(((t-g)/a).toFixed(9))),m=Math.asin(parseFloat(((r-g)/a).toFixed(9))),e<h&&(p=Math.PI-p),n<h&&(m=Math.PI-m),p<0&&(p=2*Math.PI+p),m<0&&(m=2*Math.PI+m),c&&p>m&&(p-=2*Math.PI),!c&&m>p&&(m-=2*Math.PI)}let _=m-p;if(Math.abs(_)>120*Math.PI/180){let e=m,t=n,s=r;m=c&&m>p?p+120*Math.PI/180:p+120*Math.PI/180*-1,f=Wf(n=h+i*Math.cos(m),r=g+a*Math.sin(m),t,s,i,a,o,0,c,[m,e,h,g])}_=m-p;let v=Math.cos(p),y=Math.sin(p),b=Math.cos(m),x=Math.sin(m),S=Math.tan(_/4),C=4/3*i*S,w=4/3*a*S,T=[e,t],E=[e+C*y,t-w*v],D=[n+C*x,r-w*b],O=[n,r];if(E[0]=2*T[0]-E[0],E[1]=2*T[1]-E[1],l)return[E,D,O].concat(f);{f=[E,D,O].concat(f);let e=[];for(let t=0;t<f.length;t+=3){let n=Uf(f[t][0],f[t][1],u),r=Uf(f[t+1][0],f[t+1][1],u),i=Uf(f[t+2][0],f[t+2][1],u);e.push([n[0],n[1],r[0],r[1],i[0],i[1]])}return e}}var Gf={randOffset:function(e,t){return K(e,t)},randOffsetWithRange:function(e,t,n){return ip(e,t,n)},ellipse:function(e,t,n,r,i){return Zf(e,t,i,Xf(n,r,i)).opset},doubleLineOps:function(e,t,n,r,i){return ap(e,t,n,r,i,!0)}};function Kf(e,t,n,r,i){return{type:`path`,ops:ap(e,t,n,r,i)}}function qf(e,t,n){let r=(e||[]).length;if(r>2){let i=[];for(let t=0;t<r-1;t++)i.push(...ap(e[t][0],e[t][1],e[t+1][0],e[t+1][1],n));return t&&i.push(...ap(e[r-1][0],e[r-1][1],e[0][0],e[0][1],n)),{type:`path`,ops:i}}return r===2?Kf(e[0][0],e[0][1],e[1][0],e[1][1],n):{type:`path`,ops:[]}}function Jf(e,t,n,r,i){return function(e,t){return qf(e,!0,t)}([[e,t],[e+n,t],[e+n,t+r],[e,t+r]],i)}function Yf(e,t){if(e.length){let n=typeof e[0][0]==`number`?[e]:e,r=sp(n[0],1+.2*t.roughness,t),i=t.disableMultiStroke?[]:sp(n[0],1.5*(1+.22*t.roughness),np(t));for(let e=1;e<n.length;e++){let a=n[e];if(a.length){let e=sp(a,1+.2*t.roughness,t),n=t.disableMultiStroke?[]:sp(a,1.5*(1+.22*t.roughness),np(t));for(let t of e)t.op!==`move`&&r.push(t);for(let e of n)e.op!==`move`&&i.push(e)}}return{type:`path`,ops:r.concat(i)}}return{type:`path`,ops:[]}}function Xf(e,t,n){let r=Math.sqrt(2*Math.PI*Math.sqrt(((e/2)**2+(t/2)**2)/2)),i=Math.ceil(Math.max(n.curveStepCount,n.curveStepCount/Math.sqrt(200)*r)),a=2*Math.PI/i,o=Math.abs(e/2),s=Math.abs(t/2),c=1-n.curveFitting;return o+=K(o*c,n),s+=K(s*c,n),{increment:a,rx:o,ry:s}}function Zf(e,t,n,r){let[i,a]=lp(r.increment,e,t,r.rx,r.ry,1,r.increment*ip(.1,ip(.4,1,n),n),n),o=cp(i,null,n);if(!n.disableMultiStroke&&n.roughness!==0){let[i]=lp(r.increment,e,t,r.rx,r.ry,1.5,0,n),a=cp(i,null,n);o=o.concat(a)}return{estimatedPoints:a,opset:{type:`path`,ops:o}}}function Qf(e,t,n,r,i,a,o,s,c){let l=e,u=t,d=Math.abs(n/2),f=Math.abs(r/2);d+=K(.01*d,c),f+=K(.01*f,c);let p=i,m=a;for(;p<0;)p+=2*Math.PI,m+=2*Math.PI;m-p>2*Math.PI&&(p=0,m=2*Math.PI);let h=2*Math.PI/c.curveStepCount,g=Math.min(h/2,(m-p)/2),_=up(g,l,u,d,f,p,m,1,c);if(!c.disableMultiStroke){let e=up(g,l,u,d,f,p,m,1.5,c);_.push(...e)}return o&&(s?_.push(...ap(l,u,l+d*Math.cos(p),u+f*Math.sin(p),c),...ap(l,u,l+d*Math.cos(m),u+f*Math.sin(m),c)):_.push({op:`lineTo`,data:[l,u]},{op:`lineTo`,data:[l+d*Math.cos(p),u+f*Math.sin(p)]})),{type:`path`,ops:_}}function $f(e,t){let n=Hf(Vf(Bf(e))),r=[],i=[0,0],a=[0,0];for(let{key:e,data:o}of n)switch(e){case`M`:a=[o[0],o[1]],i=[o[0],o[1]];break;case`L`:r.push(...ap(a[0],a[1],o[0],o[1],t)),a=[o[0],o[1]];break;case`C`:{let[e,n,i,s,c,l]=o;r.push(...dp(e,n,i,s,c,l,a,t)),a=[c,l];break}case`Z`:r.push(...ap(a[0],a[1],i[0],i[1],t)),a=[i[0],i[1]]}return{type:`path`,ops:r}}function ep(e,t){let n=[];for(let r of e)if(r.length){let e=t.maxRandomnessOffset||0,i=r.length;if(i>2){n.push({op:`move`,data:[r[0][0]+K(e,t),r[0][1]+K(e,t)]});for(let a=1;a<i;a++)n.push({op:`lineTo`,data:[r[a][0]+K(e,t),r[a][1]+K(e,t)]})}}return{type:`fillPath`,ops:n}}function tp(e,t){return function(e,t){let n=e.fillStyle||`hachure`;if(!Nf[n])switch(n){case`zigzag`:Nf[n]||(Nf[n]=new Of(t));break;case`cross-hatch`:Nf[n]||(Nf[n]=new kf(t));break;case`dots`:Nf[n]||(Nf[n]=new Af(t));break;case`dashed`:Nf[n]||(Nf[n]=new jf(t));break;case`zigzag-line`:Nf[n]||(Nf[n]=new Mf(t));break;default:n=`hachure`,Nf[n]||(Nf[n]=new Ef(t))}return Nf[n]}(t,Gf).fillPolygons(e,t)}function np(e){let t=Object.assign({},e);return t.randomizer=void 0,e.seed&&(t.seed=e.seed+1),t}function rp(e){return e.randomizer||=new Pf(e.seed||0),e.randomizer.next()}function ip(e,t,n,r=1){return n.roughness*r*(rp(n)*(t-e)+e)}function K(e,t,n=1){return ip(-e,e,t,n)}function ap(e,t,n,r,i,a=!1){let o=a?i.disableMultiStrokeFill:i.disableMultiStroke,s=op(e,t,n,r,i,!0,!1);if(o)return s;let c=op(e,t,n,r,i,!0,!0);return s.concat(c)}function op(e,t,n,r,i,a,o){let s=(e-n)**2+(t-r)**2,c=Math.sqrt(s),l=1;l=c<200?1:c>500?.4:-.0016668*c+1.233334;let u=i.maxRandomnessOffset||0;u*u*100>s&&(u=c/10);let d=u/2,f=.2+.2*rp(i),p=i.bowing*i.maxRandomnessOffset*(r-t)/200,m=i.bowing*i.maxRandomnessOffset*(e-n)/200;p=K(p,i,l),m=K(m,i,l);let h=[],g=()=>K(d,i,l),_=()=>K(u,i,l),v=i.preserveVertices;return a&&(o?h.push({op:`move`,data:[e+(v?0:g()),t+(v?0:g())]}):h.push({op:`move`,data:[e+(v?0:K(u,i,l)),t+(v?0:K(u,i,l))]})),o?h.push({op:`bcurveTo`,data:[p+e+(n-e)*f+g(),m+t+(r-t)*f+g(),p+e+2*(n-e)*f+g(),m+t+2*(r-t)*f+g(),n+(v?0:g()),r+(v?0:g())]}):h.push({op:`bcurveTo`,data:[p+e+(n-e)*f+_(),m+t+(r-t)*f+_(),p+e+2*(n-e)*f+_(),m+t+2*(r-t)*f+_(),n+(v?0:_()),r+(v?0:_())]}),h}function sp(e,t,n){if(!e.length)return[];let r=[];r.push([e[0][0]+K(t,n),e[0][1]+K(t,n)]),r.push([e[0][0]+K(t,n),e[0][1]+K(t,n)]);for(let i=1;i<e.length;i++)r.push([e[i][0]+K(t,n),e[i][1]+K(t,n)]),i===e.length-1&&r.push([e[i][0]+K(t,n),e[i][1]+K(t,n)]);return cp(r,null,n)}function cp(e,t,n){let r=e.length,i=[];if(r>3){let a=[],o=1-n.curveTightness;i.push({op:`move`,data:[e[1][0],e[1][1]]});for(let t=1;t+2<r;t++){let n=e[t];a[0]=[n[0],n[1]],a[1]=[n[0]+(o*e[t+1][0]-o*e[t-1][0])/6,n[1]+(o*e[t+1][1]-o*e[t-1][1])/6],a[2]=[e[t+1][0]+(o*e[t][0]-o*e[t+2][0])/6,e[t+1][1]+(o*e[t][1]-o*e[t+2][1])/6],a[3]=[e[t+1][0],e[t+1][1]],i.push({op:`bcurveTo`,data:[a[1][0],a[1][1],a[2][0],a[2][1],a[3][0],a[3][1]]})}if(t&&t.length===2){let e=n.maxRandomnessOffset;i.push({op:`lineTo`,data:[t[0]+K(e,n),t[1]+K(e,n)]})}}else r===3?(i.push({op:`move`,data:[e[1][0],e[1][1]]}),i.push({op:`bcurveTo`,data:[e[1][0],e[1][1],e[2][0],e[2][1],e[2][0],e[2][1]]})):r===2&&i.push(...op(e[0][0],e[0][1],e[1][0],e[1][1],n,!0,!0));return i}function lp(e,t,n,r,i,a,o,s){let c=[],l=[];if(s.roughness===0){e/=4,l.push([t+r*Math.cos(-e),n+i*Math.sin(-e)]);for(let a=0;a<=2*Math.PI;a+=e){let e=[t+r*Math.cos(a),n+i*Math.sin(a)];c.push(e),l.push(e)}l.push([t+r*Math.cos(0),n+i*Math.sin(0)]),l.push([t+r*Math.cos(e),n+i*Math.sin(e)])}else{let u=K(.5,s)-Math.PI/2;l.push([K(a,s)+t+.9*r*Math.cos(u-e),K(a,s)+n+.9*i*Math.sin(u-e)]);let d=2*Math.PI+u-.01;for(let o=u;o<d;o+=e){let e=[K(a,s)+t+r*Math.cos(o),K(a,s)+n+i*Math.sin(o)];c.push(e),l.push(e)}l.push([K(a,s)+t+r*Math.cos(u+2*Math.PI+.5*o),K(a,s)+n+i*Math.sin(u+2*Math.PI+.5*o)]),l.push([K(a,s)+t+.98*r*Math.cos(u+o),K(a,s)+n+.98*i*Math.sin(u+o)]),l.push([K(a,s)+t+.9*r*Math.cos(u+.5*o),K(a,s)+n+.9*i*Math.sin(u+.5*o)])}return[l,c]}function up(e,t,n,r,i,a,o,s,c){let l=a+K(.1,c),u=[];u.push([K(s,c)+t+.9*r*Math.cos(l-e),K(s,c)+n+.9*i*Math.sin(l-e)]);for(let a=l;a<=o;a+=e)u.push([K(s,c)+t+r*Math.cos(a),K(s,c)+n+i*Math.sin(a)]);return u.push([t+r*Math.cos(o),n+i*Math.sin(o)]),u.push([t+r*Math.cos(o),n+i*Math.sin(o)]),cp(u,null,c)}function dp(e,t,n,r,i,a,o,s){let c=[],l=[s.maxRandomnessOffset||1,(s.maxRandomnessOffset||1)+.3],u=[0,0],d=s.disableMultiStroke?1:2,f=s.preserveVertices;for(let p=0;p<d;p++)p===0?c.push({op:`move`,data:[o[0],o[1]]}):c.push({op:`move`,data:[o[0]+(f?0:K(l[0],s)),o[1]+(f?0:K(l[0],s))]}),u=f?[i,a]:[i+K(l[p],s),a+K(l[p],s)],c.push({op:`bcurveTo`,data:[e+K(l[p],s),t+K(l[p],s),n+K(l[p],s),r+K(l[p],s),u[0],u[1]]});return c}function fp(e){return[...e]}function pp(e,t=0){let n=e.length;if(n<3)throw Error(`A curve must have at least three points.`);let r=[];if(n===3)r.push(fp(e[0]),fp(e[1]),fp(e[2]),fp(e[2]));else{let n=[];n.push(e[0],e[0]);for(let t=1;t<e.length;t++)n.push(e[t]),t===e.length-1&&n.push(e[t]);let i=[],a=1-t;r.push(fp(n[0]));for(let e=1;e+2<n.length;e++){let t=n[e];i[0]=[t[0],t[1]],i[1]=[t[0]+(a*n[e+1][0]-a*n[e-1][0])/6,t[1]+(a*n[e+1][1]-a*n[e-1][1])/6],i[2]=[n[e+1][0]+(a*n[e][0]-a*n[e+2][0])/6,n[e+1][1]+(a*n[e][1]-a*n[e+2][1])/6],i[3]=[n[e+1][0],n[e+1][1]],r.push(i[1],i[2],i[3])}}return r}function mp(e,t){return(e[0]-t[0])**2+(e[1]-t[1])**2}function hp(e,t,n){let r=mp(t,n);if(r===0)return mp(e,t);let i=((e[0]-t[0])*(n[0]-t[0])+(e[1]-t[1])*(n[1]-t[1]))/r;return i=Math.max(0,Math.min(1,i)),mp(e,gp(t,n,i))}function gp(e,t,n){return[e[0]+(t[0]-e[0])*n,e[1]+(t[1]-e[1])*n]}function _p(e,t,n,r){let i=r||[];if(function(e,t){let n=e[t+0],r=e[t+1],i=e[t+2],a=e[t+3],o=3*r[0]-2*n[0]-a[0];o*=o;let s=3*r[1]-2*n[1]-a[1];s*=s;let c=3*i[0]-2*a[0]-n[0];c*=c;let l=3*i[1]-2*a[1]-n[1];return l*=l,o<c&&(o=c),s<l&&(s=l),o+s}(e,t)<n){let n=e[t+0];i.length?(a=i[i.length-1],o=n,Math.sqrt(mp(a,o))>1&&i.push(n)):i.push(n),i.push(e[t+3])}else{let r=.5,a=e[t+0],o=e[t+1],s=e[t+2],c=e[t+3],l=gp(a,o,r),u=gp(o,s,r),d=gp(s,c,r),f=gp(l,u,r),p=gp(u,d,r),m=gp(f,p,r);_p([a,l,f,m],0,n,i),_p([m,p,d,c],0,n,i)}var a,o;return i}function vp(e,t){return yp(e,0,e.length,t)}function yp(e,t,n,r,i){let a=i||[],o=e[t],s=e[n-1],c=0,l=1;for(let r=t+1;r<n-1;++r){let t=hp(e[r],o,s);t>c&&(c=t,l=r)}return Math.sqrt(c)>r?(yp(e,t,l+1,r,a),yp(e,l,n,r,a)):(a.length||a.push(o),a.push(s)),a}function bp(e,t=.15,n){let r=[],i=(e.length-1)/3;for(let n=0;n<i;n++)_p(e,3*n,t,r);return n&&n>0?yp(r,0,r.length,n):r}var xp=`none`,Sp=class{constructor(e){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=e||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Math.floor(Math.random()*2**31)}_o(e){return e?Object.assign({},this.defaultOptions,e):this.defaultOptions}_d(e,t,n){return{shape:e,sets:t||[],options:n||this.defaultOptions}}line(e,t,n,r,i){let a=this._o(i);return this._d(`line`,[Kf(e,t,n,r,a)],a)}rectangle(e,t,n,r,i){let a=this._o(i),o=[],s=Jf(e,t,n,r,a);if(a.fill){let i=[[e,t],[e+n,t],[e+n,t+r],[e,t+r]];a.fillStyle===`solid`?o.push(ep([i],a)):o.push(tp([i],a))}return a.stroke!==xp&&o.push(s),this._d(`rectangle`,o,a)}ellipse(e,t,n,r,i){let a=this._o(i),o=[],s=Xf(n,r,a),c=Zf(e,t,a,s);if(a.fill){if(a.fillStyle===`solid`){let n=Zf(e,t,a,s).opset;n.type=`fillPath`,o.push(n)}else o.push(tp([c.estimatedPoints],a))}return a.stroke!==xp&&o.push(c.opset),this._d(`ellipse`,o,a)}circle(e,t,n,r){let i=this.ellipse(e,t,n,n,r);return i.shape=`circle`,i}linearPath(e,t){let n=this._o(t);return this._d(`linearPath`,[qf(e,!1,n)],n)}arc(e,t,n,r,i,a,o=!1,s){let c=this._o(s),l=[],u=Qf(e,t,n,r,i,a,o,!0,c);if(o&&c.fill){if(c.fillStyle===`solid`){let o=Object.assign({},c);o.disableMultiStroke=!0;let s=Qf(e,t,n,r,i,a,!0,!1,o);s.type=`fillPath`,l.push(s)}else l.push(function(e,t,n,r,i,a,o){let s=e,c=t,l=Math.abs(n/2),u=Math.abs(r/2);l+=K(.01*l,o),u+=K(.01*u,o);let d=i,f=a;for(;d<0;)d+=2*Math.PI,f+=2*Math.PI;f-d>2*Math.PI&&(d=0,f=2*Math.PI);let p=(f-d)/o.curveStepCount,m=[];for(let e=d;e<=f;e+=p)m.push([s+l*Math.cos(e),c+u*Math.sin(e)]);return m.push([s+l*Math.cos(f),c+u*Math.sin(f)]),m.push([s,c]),tp([m],o)}(e,t,n,r,i,a,c))}return c.stroke!==xp&&l.push(u),this._d(`arc`,l,c)}curve(e,t){let n=this._o(t),r=[],i=Yf(e,n);if(n.fill&&n.fill!==xp){if(n.fillStyle===`solid`){let t=Yf(e,Object.assign(Object.assign({},n),{disableMultiStroke:!0,roughness:n.roughness?n.roughness+n.fillShapeRoughnessGain:0}));r.push({type:`fillPath`,ops:this._mergedShape(t.ops)})}else{let t=[],i=e;if(i.length){let e=typeof i[0][0]==`number`?[i]:i;for(let r of e)r.length<3?t.push(...r):r.length===3?t.push(...bp(pp([r[0],r[0],r[1],r[2]]),10,(1+n.roughness)/2)):t.push(...bp(pp(r),10,(1+n.roughness)/2))}t.length&&r.push(tp([t],n))}}return n.stroke!==xp&&r.push(i),this._d(`curve`,r,n)}polygon(e,t){let n=this._o(t),r=[],i=qf(e,!0,n);return n.fill&&(n.fillStyle===`solid`?r.push(ep([e],n)):r.push(tp([e],n))),n.stroke!==xp&&r.push(i),this._d(`polygon`,r,n)}path(e,t){let n=this._o(t),r=[];if(!e)return this._d(`path`,r,n);e=(e||``).replace(/\n/g,` `).replace(/(-\s)/g,`-`).replace(`/(ss)/g`,` `);let i=n.fill&&n.fill!==`transparent`&&n.fill!==xp,a=n.stroke!==xp,o=!!(n.simplification&&n.simplification<1),s=function(e,t,n){let r=Hf(Vf(Bf(e))),i=[],a=[],o=[0,0],s=[],c=()=>{s.length>=4&&a.push(...bp(s,t)),s=[]},l=()=>{c(),a.length&&(i.push(a),a=[])};for(let{key:e,data:t}of r)switch(e){case`M`:l(),o=[t[0],t[1]],a.push(o);break;case`L`:c(),a.push([t[0],t[1]]);break;case`C`:if(!s.length){let e=a.length?a[a.length-1]:o;s.push([e[0],e[1]])}s.push([t[0],t[1]]),s.push([t[2],t[3]]),s.push([t[4],t[5]]);break;case`Z`:c(),a.push([o[0],o[1]])}if(l(),!n)return i;let u=[];for(let e of i){let t=vp(e,n);t.length&&u.push(t)}return u}(e,1,o?4-4*(n.simplification||1):(1+n.roughness)/2),c=$f(e,n);if(i){if(n.fillStyle===`solid`){if(s.length===1){let t=$f(e,Object.assign(Object.assign({},n),{disableMultiStroke:!0,roughness:n.roughness?n.roughness+n.fillShapeRoughnessGain:0}));r.push({type:`fillPath`,ops:this._mergedShape(t.ops)})}else r.push(ep(s,n))}else r.push(tp(s,n))}return a&&(o?s.forEach((e=>{r.push(qf(e,!1,n))})):r.push(c)),this._d(`path`,r,n)}opsToPath(e,t){let n=``;for(let r of e.ops){let e=typeof t==`number`&&t>=0?r.data.map((e=>+e.toFixed(t))):r.data;switch(r.op){case`move`:n+=`M${e[0]} ${e[1]} `;break;case`bcurveTo`:n+=`C${e[0]} ${e[1]}, ${e[2]} ${e[3]}, ${e[4]} ${e[5]} `;break;case`lineTo`:n+=`L${e[0]} ${e[1]} `}}return n.trim()}toPaths(e){let t=e.sets||[],n=e.options||this.defaultOptions,r=[];for(let e of t){let t=null;switch(e.type){case`path`:t={d:this.opsToPath(e),stroke:n.stroke,strokeWidth:n.strokeWidth,fill:xp};break;case`fillPath`:t={d:this.opsToPath(e),stroke:xp,strokeWidth:0,fill:n.fill||xp};break;case`fillSketch`:t=this.fillSketch(e,n)}t&&r.push(t)}return r}fillSketch(e,t){let n=t.fillWeight;return n<0&&(n=t.strokeWidth/2),{d:this.opsToPath(e),stroke:t.fill||xp,strokeWidth:n,fill:xp}}_mergedShape(e){return e.filter(((e,t)=>t===0||e.op!==`move`))}},Cp=class{constructor(e,t){this.canvas=e,this.ctx=this.canvas.getContext(`2d`),this.gen=new Sp(t)}draw(e){let t=e.sets||[],n=e.options||this.getDefaultOptions(),r=this.ctx,i=e.options.fixedDecimalPlaceDigits;for(let a of t)switch(a.type){case`path`:r.save(),r.strokeStyle=n.stroke===`none`?`transparent`:n.stroke,r.lineWidth=n.strokeWidth,n.strokeLineDash&&r.setLineDash(n.strokeLineDash),n.strokeLineDashOffset&&(r.lineDashOffset=n.strokeLineDashOffset),this._drawToContext(r,a,i),r.restore();break;case`fillPath`:{r.save(),r.fillStyle=n.fill||``;let t=e.shape===`curve`||e.shape===`polygon`||e.shape===`path`?`evenodd`:`nonzero`;this._drawToContext(r,a,i,t),r.restore();break}case`fillSketch`:this.fillSketch(r,a,n)}}fillSketch(e,t,n){let r=n.fillWeight;r<0&&(r=n.strokeWidth/2),e.save(),n.fillLineDash&&e.setLineDash(n.fillLineDash),n.fillLineDashOffset&&(e.lineDashOffset=n.fillLineDashOffset),e.strokeStyle=n.fill||``,e.lineWidth=r,this._drawToContext(e,t,n.fixedDecimalPlaceDigits),e.restore()}_drawToContext(e,t,n,r=`nonzero`){e.beginPath();for(let r of t.ops){let t=typeof n==`number`&&n>=0?r.data.map((e=>+e.toFixed(n))):r.data;switch(r.op){case`move`:e.moveTo(t[0],t[1]);break;case`bcurveTo`:e.bezierCurveTo(t[0],t[1],t[2],t[3],t[4],t[5]);break;case`lineTo`:e.lineTo(t[0],t[1])}}t.type===`fillPath`?e.fill(r):e.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(e,t,n,r,i){let a=this.gen.line(e,t,n,r,i);return this.draw(a),a}rectangle(e,t,n,r,i){let a=this.gen.rectangle(e,t,n,r,i);return this.draw(a),a}ellipse(e,t,n,r,i){let a=this.gen.ellipse(e,t,n,r,i);return this.draw(a),a}circle(e,t,n,r){let i=this.gen.circle(e,t,n,r);return this.draw(i),i}linearPath(e,t){let n=this.gen.linearPath(e,t);return this.draw(n),n}polygon(e,t){let n=this.gen.polygon(e,t);return this.draw(n),n}arc(e,t,n,r,i,a,o=!1,s){let c=this.gen.arc(e,t,n,r,i,a,o,s);return this.draw(c),c}curve(e,t){let n=this.gen.curve(e,t);return this.draw(n),n}path(e,t){let n=this.gen.path(e,t);return this.draw(n),n}},wp=`http://www.w3.org/2000/svg`,Tp=class{constructor(e,t){this.svg=e,this.gen=new Sp(t)}draw(e){let t=e.sets||[],n=e.options||this.getDefaultOptions(),r=this.svg.ownerDocument||window.document,i=r.createElementNS(wp,`g`),a=e.options.fixedDecimalPlaceDigits;for(let o of t){let t=null;switch(o.type){case`path`:t=r.createElementNS(wp,`path`),t.setAttribute(`d`,this.opsToPath(o,a)),t.setAttribute(`stroke`,n.stroke),t.setAttribute(`stroke-width`,n.strokeWidth+``),t.setAttribute(`fill`,`none`),n.strokeLineDash&&t.setAttribute(`stroke-dasharray`,n.strokeLineDash.join(` `).trim()),n.strokeLineDashOffset&&t.setAttribute(`stroke-dashoffset`,`${n.strokeLineDashOffset}`);break;case`fillPath`:t=r.createElementNS(wp,`path`),t.setAttribute(`d`,this.opsToPath(o,a)),t.setAttribute(`stroke`,`none`),t.setAttribute(`stroke-width`,`0`),t.setAttribute(`fill`,n.fill||``),e.shape!==`curve`&&e.shape!==`polygon`||t.setAttribute(`fill-rule`,`evenodd`);break;case`fillSketch`:t=this.fillSketch(r,o,n)}t&&i.appendChild(t)}return i}fillSketch(e,t,n){let r=n.fillWeight;r<0&&(r=n.strokeWidth/2);let i=e.createElementNS(wp,`path`);return i.setAttribute(`d`,this.opsToPath(t,n.fixedDecimalPlaceDigits)),i.setAttribute(`stroke`,n.fill||``),i.setAttribute(`stroke-width`,r+``),i.setAttribute(`fill`,`none`),n.fillLineDash&&i.setAttribute(`stroke-dasharray`,n.fillLineDash.join(` `).trim()),n.fillLineDashOffset&&i.setAttribute(`stroke-dashoffset`,`${n.fillLineDashOffset}`),i}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(e,t){return this.gen.opsToPath(e,t)}line(e,t,n,r,i){let a=this.gen.line(e,t,n,r,i);return this.draw(a)}rectangle(e,t,n,r,i){let a=this.gen.rectangle(e,t,n,r,i);return this.draw(a)}ellipse(e,t,n,r,i){let a=this.gen.ellipse(e,t,n,r,i);return this.draw(a)}circle(e,t,n,r){let i=this.gen.circle(e,t,n,r);return this.draw(i)}linearPath(e,t){let n=this.gen.linearPath(e,t);return this.draw(n)}polygon(e,t){let n=this.gen.polygon(e,t);return this.draw(n)}arc(e,t,n,r,i,a,o=!1,s){let c=this.gen.arc(e,t,n,r,i,a,o,s);return this.draw(c)}curve(e,t){let n=this.gen.curve(e,t);return this.draw(n)}path(e,t){let n=this.gen.path(e,t);return this.draw(n)}},q={canvas:(e,t)=>new Cp(e,t),svg:(e,t)=>new Tp(e,t),generator:e=>new Sp(e),newSeed:()=>Sp.newSeed()},Ep=1,Dp=3;async function Op(e){let t=e.getElementsByTagName(`img`);if(!t||t.length===0)return;let n=!kp(e);await Promise.all([...t].map(e=>new Promise(t=>{function r(){if(e.style.display=`flex`,e.style.flexDirection=`column`,n){let[t=bn.fontSize]=ru(B().fontSize?B().fontSize:window.getComputedStyle(document.body).fontSize),n=t*5+`px`;e.style.minWidth=n,e.style.maxWidth=n}else e.style.width=`100%`;t(e)}i(r,`setupImage`),setTimeout(()=>{e.complete&&r()}),e.addEventListener(`error`,r),e.addEventListener(`load`,r)})))}i(Op,`configureLabelImages`);function kp(e){return e.nodeType===Dp?e.textContent?.trim()!==``:e.nodeType!==Ep||e.tagName.toLowerCase()===`img`?!1:[...e.childNodes].some(kp)}i(kp,`hasTextBesidesImages`);var Ap=3,jp=32,Mp=i(async(e,t,n)=>{let r=B(),i=e.insert(`g`).attr(`class`,n??`node default`).attr(`id`,t.domId||t.id),a=i.insert(`g`).attr(`class`,`label`).attr(`style`,lu(t.labelStyle)),o=[{text:typeof t.label==`string`?t.label:t.label?.[0]??``,cssClass:`c4-name`},{text:t.stereotype,cssClass:`c4-type`},...(t.description??[]).map(e=>({text:e,cssClass:`c4-descr`}))].filter(e=>e.text),s=t.width?Math.max(t.width-2*(t.padding??0),jp):B().flowchart?.wrappingWidth??200,c=r.c4?.wrap??!0?s:1/0,l=await Promise.all(o.map(async e=>{let n=a.append(`g`).attr(`class`,e.cssClass),i=await hf(n,sr(su(e.text??``),r),{useHtmlLabels:!1,markdown:!1,isNode:!0,width:c,style:t.labelStyle},r);return V(i).selectAll(`tspan.text-outer-tspan`).attr(`text-anchor`,`middle`),V(i).selectAll(`tspan.text-inner-tspan`).attr(`font-weight`,null).attr(`font-style`,null),{el:n,box:n.node().getBBox()}})),u=Math.max(...l.map(({box:e})=>e.width),0),d=0;for(let{el:e,box:t}of l)e.attr(`transform`,`translate(${u/2-t.x-t.width/2}, ${d-t.y})`),d+=t.height+Ap;let f=l.length>0?d-Ap:0;return a.insert(`rect`,`:first-child`),a.attr(`transform`,`translate(${-u/2}, ${-f/2})`),{shapeSvg:i,bbox:a.node().getBBox(),halfPadding:(t.padding??0)/2,label:a}},`c4LabelHelper`),J=i(async(e,t,n)=>{if(t.stereotype!==void 0)return Mp(e,t,n);let r,i=t.useHtmlLabels||En(B()?.htmlLabels);r=n||`node default`;let a=e.insert(`g`).attr(`class`,r).attr(`id`,t.domId||t.id),o=a.insert(`g`).attr(`class`,`label`).attr(`style`,lu(t.labelStyle)),s;s=t.label===void 0?``:typeof t.label==`string`?t.label:t.label[0];let c=!!t.icon||!!t.img,l=t.labelType===`markdown`,u=await hf(o,sr(su(s),B()),{useHtmlLabels:i,width:t.width||t.wrappingWidth||B().flowchart?.wrappingWidth,classes:l?`markdown-node-label`:``,style:t.labelStyle,addSvgBackground:c,markdown:l},B()),d=(t?.padding??0)/2,f;if(i){let e=u.children[0],t=V(u);await Op(e),f=await qd.measure(()=>e.getBoundingClientRect()),t.attr(`width`,f.width),t.attr(`height`,f.height)}else f=await qd.measure(()=>u.getBBox());return i?o.attr(`transform`,`translate(`+-f.width/2+`, `+-f.height/2+`)`):o.attr(`transform`,`translate(0, `+-f.height/2+`)`),t.centerLabel&&o.attr(`transform`,`translate(`+-f.width/2+`, `+-f.height/2+`)`),o.insert(`rect`,`:first-child`),{shapeSvg:a,bbox:f,halfPadding:d,label:o}},`labelHelper`),Np=i(async(e,t,n)=>{let r=n.useHtmlLabels??Gn(B()),i=e.insert(`g`).attr(`class`,`label`).attr(`style`,n.labelStyle||``),a=await hf(i,sr(su(t),B()),{useHtmlLabels:r,width:n.width||B()?.flowchart?.wrappingWidth,style:n.labelStyle,addSvgBackground:!!n.icon||!!n.img}),o=n.padding/2,s;if(Gn(B())){let e=a.children[0],t=V(a);s=await qd.measure(()=>e.getBoundingClientRect()),t.attr(`width`,s.width),t.attr(`height`,s.height)}else s=await qd.measure(()=>a.getBBox());return r?i.attr(`transform`,`translate(`+-s.width/2+`, `+-s.height/2+`)`):i.attr(`transform`,`translate(0, `+-s.height/2+`)`),n.centerLabel&&i.attr(`transform`,`translate(`+-s.width/2+`, `+-s.height/2+`)`),i.insert(`rect`,`:first-child`),{shapeSvg:e,bbox:s,halfPadding:o,label:i}},`insertLabel`),Y=i((e,t,n)=>{if(n){e.width=n.width,e.height=n.height;return}let r=t.node().getBBox();e.width=r.width,e.height=r.height},`updateNodeBounds`),X=i((e,t)=>(e.look===`handDrawn`?`rough-node`:`node`)+` `+e.cssClasses+` `+(t||``),`getNodeClasses`);function Z(e){let t=e.map((e,t)=>`${t===0?`M`:`L`}${e.x},${e.y}`);return t.push(`Z`),t.join(` `)}i(Z,`createPathFromPoints`);function Pp(e,t,n,r,i,a){let o=[],s=n-e,c=r-t,l=s/a,u=2*Math.PI/l,d=t+c/2;for(let t=0;t<=50;t++){let n=e+t/50*s,r=d+i*Math.sin(u*(n-e));o.push({x:n,y:r})}return o}i(Pp,`generateFullSineWavePoints`);function Fp(e,t,n,r,i,a){let o=[],s=i*Math.PI/180,c=(a*Math.PI/180-s)/(r-1);for(let i=0;i<r;i++){let r=s+i*c,a=e+n*Math.cos(r),l=t+n*Math.sin(r);o.push({x:-a,y:-l})}return o}i(Fp,`generateCirclePoints`);function Ip(e){let t=Array.from(e.childNodes).filter(e=>e.tagName===`path`),n=document.createElementNS(`http://www.w3.org/2000/svg`,`path`),r=t.map(e=>e.getAttribute(`d`)).filter(e=>e!==null).join(` `);n.setAttribute(`d`,r);let a=t.find(e=>e.getAttribute(`fill`)!==`none`),o=t.find(e=>e.getAttribute(`stroke`)!==`none`),s=i((e,t)=>e?.getAttribute(t)??void 0,`getAttr`);if(a){let e={fill:s(a,`fill`),"fill-opacity":s(a,`fill-opacity`)??`1`};Object.entries(e).forEach(([e,t])=>{t&&n.setAttribute(e,t)})}if(o){let e={stroke:s(o,`stroke`),"stroke-width":s(o,`stroke-width`)??`1`,"stroke-opacity":s(o,`stroke-opacity`)??`1`};Object.entries(e).forEach(([e,t])=>{t&&n.setAttribute(e,t)})}let c=document.createElementNS(`http://www.w3.org/2000/svg`,`g`);return c.appendChild(n),c}i(Ip,`mergePaths`);var Lp=i((e,t)=>{var n=e.x,r=e.y,i=t.x-n,a=t.y-r,o=e.width/2,s=e.height/2,c,l;return Math.abs(a)*o>Math.abs(i)*s?(a<0&&(s=-s),c=a===0?0:s*i/a,l=s):(i<0&&(o=-o),c=o,l=i===0?0:o*a/i),{x:n+c,y:r+l}},`intersectRect`),Rp=i((e,t,n,r,i)=>[`M`,e+i,t,`H`,e+n-i,`A`,i,i,0,0,1,e+n,t+i,`V`,t+r-i,`A`,i,i,0,0,1,e+n-i,t+r,`H`,e+i,`A`,i,i,0,0,1,e,t+r-i,`V`,t+i,`A`,i,i,0,0,1,e+i,t,`Z`].join(` `),`createRoundedRectPathD`),zp=i(async(e,t,n,r=!1,i=!1)=>{let a=t||``;typeof a==`object`&&(a=a[0]);let o=B(),s=Gn(o);return await hf(e,a,{style:n,isTitle:r,useHtmlLabels:s,markdown:!1,isNode:i,width:1/0},o)},`createLabel`);function Bp(e,t){return e.intersect(t)}i(Bp,`intersectNode`);var Vp=Bp;function Hp(e,t,n,r){var i=e.x,a=e.y,o=i-r.x,s=a-r.y,c=Math.sqrt(t*t*s*s+n*n*o*o),l=Math.abs(t*n*o/c);r.x<i&&(l=-l);var u=Math.abs(t*n*s/c);return r.y<a&&(u=-u),{x:i+l,y:a+u}}i(Hp,`intersectEllipse`);var Up=Hp;function Wp(e,t,n){return Up(e,t,t,n)}i(Wp,`intersectCircle`);var Gp=Wp;function Kp(e,t,n,r){{let i=t.y-e.y,a=e.x-t.x,o=t.x*e.y-e.x*t.y,s=i*n.x+a*n.y+o,c=i*r.x+a*r.y+o,l=1e-6;if(s!==0&&c!==0&&qp(s,c))return;let u=r.y-n.y,d=n.x-r.x,f=r.x*n.y-n.x*r.y,p=u*e.x+d*e.y+f,m=u*t.x+d*t.y+f;if(Math.abs(p)<l&&Math.abs(m)<l&&qp(p,m))return;let h=i*d-u*a;if(h===0)return;let g=Math.abs(h/2),_=a*f-d*o,v=_<0?(_-g)/h:(_+g)/h;return _=u*o-i*f,{x:v,y:_<0?(_-g)/h:(_+g)/h}}}i(Kp,`intersectLine`);function qp(e,t){return e*t>0}i(qp,`sameSign`);var Jp=Kp;function Yp(e,t,n){let r=e.x,i=e.y,a=[],o=1/0,s=1/0;typeof t.forEach==`function`?t.forEach(function(e){o=Math.min(o,e.x),s=Math.min(s,e.y)}):(o=Math.min(o,t.x),s=Math.min(s,t.y));let c=r-e.width/2-o,l=i-e.height/2-s;for(let r=0;r<t.length;r++){let i=t[r],o=t[r<t.length-1?r+1:0],s=Jp(e,n,{x:c+i.x,y:l+i.y},{x:c+o.x,y:l+o.y});s&&a.push(s)}return a.length?(a.length>1&&a.sort(function(e,t){let r=e.x-n.x,i=e.y-n.y,a=Math.sqrt(r*r+i*i),o=t.x-n.x,s=t.y-n.y,c=Math.sqrt(o*o+s*s);return a<c?-1:a===c?0:1}),a[0]):e}i(Yp,`intersectPolygon`);var Q={node:Vp,circle:Gp,ellipse:Up,polygon:Yp,rect:Lp};function Xp(e,t){let{labelStyles:n}=W(t);t.labelStyle=n;let r=X(t),i=r;r||(i=`anchor`);let a=e.insert(`g`).attr(`class`,i).attr(`id`,t.domId||t.id),{cssStyles:o}=t,s=q.svg(a),c=G(t,{fill:`black`,stroke:`none`,fillStyle:`solid`});t.look!==`handDrawn`&&(c.roughness=0);let u=s.circle(0,0,2,c),d=a.insert(()=>u,`:first-child`);return d.attr(`class`,`anchor`).attr(`style`,lu(o)),Y(t,d),t.intersect=function(e){return l.info(`Circle intersect`,t,1,e),Q.circle(t,1,e)},a}i(Xp,`anchor`);function Zp(e,t,n,r,i,a,o){let s=(e+n)/2,c=(t+r)/2,l=Math.atan2(r-t,n-e),u=(n-e)/2,d=(r-t)/2,f=u/i,p=d/a,m=Math.sqrt(f**2+p**2);if(m>1)throw Error(`The given radii are too small to create an arc between the points.`);let h=Math.sqrt(1-m**2),g=s+h*a*Math.sin(l)*(o?-1:1),_=c-h*i*Math.cos(l)*(o?-1:1),v=Math.atan2((t-_)/a,(e-g)/i),y=Math.atan2((r-_)/a,(n-g)/i)-v;o&&y<0&&(y+=2*Math.PI),!o&&y>0&&(y-=2*Math.PI);let b=[];for(let e=0;e<20;e++){let t=v+e/19*y,n=g+i*Math.cos(t),r=_+a*Math.sin(t);b.push({x:n,y:r})}return b}i(Zp,`generateArcPoints`);function Qp(e,t,n){let[r,i]=[t,n].sort((e,t)=>t-e);return i*(1-Math.sqrt(1-(e/r/2)**2))}i(Qp,`calculateArcSagitta`);async function $p(e,t){let{labelStyles:n,nodeStyles:r}=W(t);t.labelStyle=n;let a=t.padding??0,o=t.look===`neo`?16:a,s=t.look===`neo`?12:a,c=i(e=>e+s,`calcTotalHeight`),l=i(e=>{let t=e/2;return[t/(2.5+e/50),t]},`calcEllipseRadius`),{shapeSvg:u,bbox:d}=await J(e,t,X(t)),f=c(t?.height?t?.height:d.height),[p,m]=l(f),h=Qp(f,p,m),g=(t?.width?t?.width:d.width)+o*2+h-h,_=f,{cssStyles:v}=t,y=[{x:g/2,y:-_/2},{x:-g/2,y:-_/2},...Zp(-g/2,-_/2,-g/2,_/2,p,m,!1),{x:g/2,y:_/2},...Zp(g/2,_/2,g/2,-_/2,p,m,!0)],b=q.svg(u),x=G(t,{});t.look!==`handDrawn`&&(x.roughness=0,x.fillStyle=`solid`);let S=Z(y),C=b.path(S,x),w=u.insert(()=>C,`:first-child`);return w.attr(`class`,`basic label-container outer-path`),v&&t.look!==`handDrawn`&&w.selectAll(`path`).attr(`style`,v),r&&t.look!==`handDrawn`&&w.selectAll(`path`).attr(`style`,r),w.attr(`transform`,`translate(${p/2}, 0)`),Y(t,w),t.intersect=function(e){return Q.polygon(t,y,e)},u}i($p,`bowTieRect`);async function em(e,t,{config:{themeVariables:n}}){let{labelStyles:r,nodeStyles:a}=W(t);t.labelStyle=r;let{shapeSvg:o,bbox:s,label:c}=await J(e,t,X(t)),l=n?.nodeBorder??n?.lineColor??`currentColor`,u=t.padding??12,d=Math.max(s.width+u*2,t.width??0,80),f=Math.max(Math.min(d*.08,12),5),p=Math.max(s.height+u*2+f,t.height??0),m=-p/2+f,h=p/2,g=d*.72,_=[`M${-d/2},${m}`,`L${-g/2},${h}`,`A${g/2},${f} 0 0 0 ${g/2},${h}`,`L${d/2},${m}`,`A${d/2},${f} 0 0 0 ${-d/2},${m}`,`Z`].join(` `),{cssStyles:v}=t,y=o.insert(`g`,`:first-child`).attr(`class`,`basic label-container`);if(t.look===`handDrawn`){let e=q.svg(o).path(_,G(t,{}));y.node()?.appendChild(e),v&&y.attr(`style`,v)}else y.append(`path`).attr(`d`,_).attr(`style`,a);y.append(`ellipse`).attr(`cx`,0).attr(`cy`,m).attr(`rx`,d/2).attr(`ry`,f).attr(`style`,`fill:none;stroke:${l};stroke-width:1px`),Y(t,y);let b=m+(h-m)/2;c.attr(`transform`,`translate(${-(s.width/2)-(s.x-(s.left??0))}, ${b-s.height/2-(s.y-(s.top??0))})`);let x=i((e,t,n)=>Array.from({length:13},(r,i)=>{let a=Math.PI-i*Math.PI/12;return{x:e*Math.cos(a),y:t+n*f*Math.sin(a)}}),`arc`),S=[...x(d/2,m,-1),...x(g/2,h,1).reverse()];return t.intersect=function(e){return Q.polygon(t,S,e)},o}i(em,`bucket`);var tm=20,nm=8,rm=80,im=8;async function am(e,t){let{themeVariables:n}=B(),r=n.clusterBkg,i=n.clusterBorder,{nodeStyles:a}=W(t),{shapeSvg:o,bbox:s}=await J(e,t,X(t)),c=t.padding??8,l=s.height,u=Math.max(s.width+c*2,rm,t?.width??0),d=Math.max(l+nm+tm+c*2,t?.height??0),f=-u/2,p=-d/2,m=-(nm+tm)/2,h=o.select(`.label`);h&&(t.useHtmlLabels??Gn(B())?h.attr(`transform`,`translate(${-s.width/2}, ${-s.height/2+m})`):h.attr(`transform`,`translate(0, ${-s.height/2+m})`));let g;if(t.look===`handDrawn`){let e=q.svg(o),n=G(t,{fill:r,stroke:i,fillStyle:`solid`}),a=e.path(Rp(f,p,u,d,im),n);g=o.insert(()=>a,`:first-child`),g.attr(`class`,`basic label-container collapsed-group`).attr(`style`,lu(t.cssStyles))}else g=o.insert(`rect`,`:first-child`),g.attr(`class`,`basic label-container collapsed-group`).attr(`style`,a).attr(`rx`,im).attr(`ry`,im).attr(`x`,f).attr(`y`,p).attr(`width`,u).attr(`height`,d).attr(`fill`,r).attr(`stroke`,i);let _=p+c+l+nm;o.append(`line`).attr(`class`,`collapsed-separator`).attr(`x1`,f+8).attr(`y1`,_).attr(`x2`,f+u-8).attr(`y2`,_).attr(`stroke`,i).attr(`stroke-dasharray`,`3, 3`);let v=_+tm/2;for(let e=-1;e<=1;e++)o.append(`circle`).attr(`class`,`collapsed-indicator`).attr(`cx`,e*10).attr(`cy`,v).attr(`r`,2.5).attr(`fill`,i);return Y(t,g),t.calcIntersect=function(e,t){return Q.rect(e,t)},t.intersect=function(e){return Q.rect(t,e)},o}i(am,`collapsedGroup`);function om(e,t,n,r){return e.insert(`polygon`,`:first-child`).attr(`points`,r.map(function(e){return e.x+`,`+e.y}).join(` `)).attr(`class`,`label-container`).attr(`transform`,`translate(`+-t/2+`,`+n/2+`)`)}i(om,`insertPolygonShape`);var sm=[`right`,`left`,`up`,`down`],cm=`point`,lm=i(e=>{let t=new Set;for(let n of e)switch(n){case`x`:t.add(`right`),t.add(`left`);break;case`y`:t.add(`up`),t.add(`down`);break;default:t.add(n)}return t},`expandAndDeduplicateDirections`),um=i(e=>sm.filter(t=>e.has(t)).join(`|`)||cm,`getDirectionKey`),dm={"right|left|up|down":i(({height:e,midpoint:t,padding:n,width:r})=>[{x:0,y:0},{x:t,y:0},{x:r/2,y:2*n},{x:r-t,y:0},{x:r,y:0},{x:r,y:-e/3},{x:r+2*n,y:-e/2},{x:r,y:-2*e/3},{x:r,y:-e},{x:r-t,y:-e},{x:r/2,y:-e-2*n},{x:t,y:-e},{x:0,y:-e},{x:0,y:-2*e/3},{x:-2*n,y:-e/2},{x:0,y:-e/3}],`right|left|up|down`),"right|left|up":i(({height:e,midpoint:t,width:n})=>[{x:t,y:0},{x:n-t,y:0},{x:n,y:-e/2},{x:n-t,y:-e},{x:t,y:-e},{x:0,y:-e/2}],`right|left|up`),"right|left|down":i(({height:e,midpoint:t,width:n})=>[{x:0,y:0},{x:t,y:-e},{x:n-t,y:-e},{x:n,y:0}],`right|left|down`),"right|up|down":i(({height:e,midpoint:t,width:n})=>[{x:0,y:0},{x:n,y:-t},{x:n,y:-e+t},{x:0,y:-e}],`right|up|down`),"left|up|down":i(({height:e,midpoint:t,width:n})=>[{x:n,y:0},{x:0,y:-t},{x:0,y:-e+t},{x:n,y:-e}],`left|up|down`),"right|left":i(({height:e,midpoint:t,padding:n,width:r})=>[{x:t,y:0},{x:t,y:-n},{x:r-t,y:-n},{x:r-t,y:0},{x:r,y:-e/2},{x:r-t,y:-e},{x:r-t,y:-e+n},{x:t,y:-e+n},{x:t,y:-e},{x:0,y:-e/2}],`right|left`),"up|down":i(({height:e,midpoint:t,padding:n,width:r})=>[{x:r/2,y:0},{x:0,y:-n},{x:t,y:-n},{x:t,y:-e+n},{x:0,y:-e+n},{x:r/2,y:-e},{x:r,y:-e+n},{x:r-t,y:-e+n},{x:r-t,y:-n},{x:r,y:-n}],`up|down`),"right|up":i(({height:e,midpoint:t,width:n})=>[{x:0,y:0},{x:n,y:-t},{x:0,y:-e}],`right|up`),"right|down":i(({height:e,width:t})=>[{x:0,y:0},{x:t,y:0},{x:0,y:-e}],`right|down`),"left|up":i(({height:e,midpoint:t,width:n})=>[{x:n,y:0},{x:0,y:-t},{x:n,y:-e}],`left|up`),"left|down":i(({height:e,width:t})=>[{x:t,y:0},{x:0,y:0},{x:t,y:-e}],`left|down`),right:i(({height:e,midpoint:t,padding:n,width:r})=>[{x:t,y:-n},{x:t,y:-n},{x:r-t,y:-n},{x:r-t,y:0},{x:r,y:-e/2},{x:r-t,y:-e},{x:r-t,y:-e+n},{x:t,y:-e+n},{x:t,y:-e+n}],`right`),left:i(({height:e,midpoint:t,padding:n,width:r})=>[{x:t,y:0},{x:t,y:-n},{x:r-t,y:-n},{x:r-t,y:-e+n},{x:t,y:-e+n},{x:t,y:-e},{x:0,y:-e/2}],`left`),up:i(({height:e,midpoint:t,padding:n,width:r})=>[{x:t,y:-n},{x:t,y:-e+n},{x:0,y:-e+n},{x:r/2,y:-e},{x:r,y:-e+n},{x:r-t,y:-e+n},{x:r-t,y:-n}],`up`),down:i(({height:e,midpoint:t,padding:n,width:r})=>[{x:r/2,y:0},{x:0,y:-n},{x:t,y:-n},{x:t,y:-e+n},{x:r-t,y:-e+n},{x:r-t,y:-n},{x:r,y:-n}],`down`),[cm]:()=>[{x:0,y:0}]},fm=i((e,t,n,r)=>{let i=lm(e),a=(n.padding??0)/2,o=t.height+4*a,s=o/2,c=r??t.width+2*s+2*a;return(dm[um(i)]??dm[cm])({height:o,midpoint:s,padding:a,width:c})},`getArrowPoints`);async function pm(e,t){let n=t,{shapeSvg:r,bbox:i}=await J(e,n,X(n)),a=n.padding??0,o=i.height+2*a,s=o/2,c=i.width+2*s+a,l=n.width??0,u=n.positioned&&(n.widthInColumns??1)>1&&l>c?l:c,d=fm(n.directions??[],i,n,u),f=om(r,u,o,d);return f.attr(`style`,n.style??null),Y(n,f),n.intersect=function(e){return Q.polygon(n,d,e)},r}i(pm,`block_arrow`);async function mm(e,t,{config:{themeVariables:n}}){let{labelStyles:r,nodeStyles:i}=W(t);t.labelStyle=r;let{shapeSvg:a,bbox:o,label:s}=await J(e,t,X(t)),c=n?.nodeBorder??n?.lineColor??`currentColor`,l=t.padding??12,u=Math.max(o.width+l*2,t.width??0,90),d=Math.max(o.height+l*2+18,t.height??0),f=-d/2,{cssStyles:p}=t,m=a.insert(`g`,`:first-child`).attr(`class`,`basic label-container`);if(t.look===`handDrawn`){let e=q.svg(a).path(Rp(-u/2,f,u,d,12),G(t,{}));m.node()?.appendChild(e),p&&m.attr(`style`,p)}else m.append(`rect`).attr(`x`,-u/2).attr(`y`,f).attr(`width`,u).attr(`height`,d).attr(`rx`,12).attr(`ry`,12).attr(`style`,i);m.append(`line`).attr(`x1`,-u/2).attr(`y1`,f+18).attr(`x2`,u/2).attr(`y2`,f+18).attr(`style`,`stroke:${c};stroke-width:1px`);for(let e=0;e<3;e++)m.append(`circle`).attr(`cx`,-u/2+12+e*9).attr(`cy`,f+9).attr(`r`,2.5).attr(`style`,`fill:${c};stroke:none`);m.append(`rect`).attr(`class`,`browser-address-bar`).attr(`x`,-u/2+44).attr(`y`,f+4).attr(`width`,Math.max(u-56,10)).attr(`height`,10).attr(`rx`,3).attr(`ry`,3).attr(`style`,`fill:none;stroke:${c};stroke-width:1px;opacity:0.6`),Y(t,m);let h=f+18+(d-18)/2;return s.attr(`transform`,`translate(${-(o.width/2)-(o.x-(o.left??0))}, ${h-o.height/2-(o.y-(o.top??0))})`),t.intersect=function(e){return Q.rect(t,e)},a}i(mm,`browser`);var hm=12;async function gm(e,t){let{labelStyles:n,nodeStyles:r}=W(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?28:i,o=t.look===`neo`?24:i,{shapeSvg:s,bbox:c}=await J(e,t,X(t)),l=(t?.width??c.width)+(t.look===`neo`?a*2:a+hm),u=(t?.height??c.height)+(t.look===`neo`?o*2:o),d=l,f=-u,p=[{x:0+hm,y:f},{x:d,y:f},{x:d,y:0},{x:0,y:0},{x:0,y:f+hm},{x:0+hm,y:f}],m,{cssStyles:h}=t;if(t.look===`handDrawn`){let e=q.svg(s),n=G(t,{}),r=Z(p),i=e.path(r,n);m=s.insert(()=>i,`:first-child`).attr(`transform`,`translate(${-l/2}, ${u/2})`),h&&m.attr(`style`,h)}else m=om(s,l,u,p);return r&&m.attr(`style`,r),Y(t,m),t.intersect=function(e){return Q.polygon(t,p,e)},s}i(gm,`card`);function _m(e,t){let{nodeStyles:n}=W(t);t.label=``;let r=e.insert(`g`).attr(`class`,X(t)).attr(`id`,t.domId??t.id),{cssStyles:i}=t,a=Math.max(28,t.width??0),o=[{x:0,y:a/2},{x:a/2,y:0},{x:0,y:-a/2},{x:-a/2,y:0}],s=q.svg(r),c=G(t,{});t.look!==`handDrawn`&&(c.roughness=0,c.fillStyle=`solid`);let l=Z(o),u=s.path(l,c),d=r.insert(()=>u,`:first-child`);return i&&t.look!==`handDrawn`&&d.selectAll(`path`).attr(`style`,i),n&&t.look!==`handDrawn`&&d.selectAll(`path`).attr(`style`,n),t.width=28,t.height=28,t.intersect=function(e){return Q.polygon(t,o,e)},r}i(_m,`choice`);async function vm(e,t,n){let{labelStyles:r,nodeStyles:i}=W(t);t.labelStyle=r;let{shapeSvg:a,bbox:o,halfPadding:s}=await J(e,t,X(t)),c=n?.padding??s,u=t.look===`neo`?o.width/2+32:o.width/2+c,d,{cssStyles:f}=t;if(t.look===`handDrawn`){let e=q.svg(a),n=G(t,{}),r=e.circle(0,0,u*2,n);d=a.insert(()=>r,`:first-child`),d.attr(`class`,`basic label-container`).attr(`style`,lu(f))}else d=a.insert(`circle`,`:first-child`).attr(`class`,`basic label-container`).attr(`style`,i).attr(`r`,u).attr(`cx`,0).attr(`cy`,0);return Y(t,d),t.calcIntersect=function(e,t){let n=e.width/2;return Q.circle(e,n,t)},t.intersect=function(e){return l.info(`Circle intersect`,t,u,e),Q.circle(t,u,e)},a}i(vm,`circle`);async function ym(e,t){let n=t,{shapeSvg:r,bbox:i,halfPadding:a}=await J(e,n,[`node`,n.cssClasses,n.class].filter(Boolean).join(` `)),o=r.insert(`rect`,`:first-child`),s=n.padding??0,c=n.positioned?n.width??0:i.width+s,l=n.positioned?n.height??0:i.height+s,u=n.positioned?-c/2:-i.width/2-a,d=n.positioned?-l/2:-i.height/2-a;return o.attr(`class`,`basic cluster composite label-container`).attr(`style`,n.style??null).attr(`rx`,n.rx??null).attr(`ry`,n.ry??null).attr(`x`,u).attr(`y`,d).attr(`width`,c).attr(`height`,l),Y(n,o),n.intersect=function(e){return Q.rect(n,e)},r}i(ym,`composite`);async function bm(e,t,{config:{themeVariables:n}}){let{labelStyles:r,nodeStyles:i}=W(t);t.labelStyle=r;let{shapeSvg:a,bbox:o,label:s}=await J(e,t,X(t)),c=n?.nodeBorder??n?.lineColor??`currentColor`,l=t.padding??12,u=Math.max(o.width+l*2,t.width??0,90),d=Math.max(o.height+l*2+20,t.height??0),f=-d/2,{cssStyles:p}=t,m=a.insert(`g`,`:first-child`).attr(`class`,`basic label-container`);if(t.look===`handDrawn`){let e=q.svg(a).path(Rp(-u/2,f,u,d,12),G(t,{}));m.node()?.appendChild(e),p&&m.attr(`style`,p)}else m.append(`rect`).attr(`x`,-u/2).attr(`y`,f).attr(`width`,u).attr(`height`,d).attr(`rx`,12).attr(`ry`,12).attr(`style`,i);m.append(`text`).attr(`x`,-u/2+12).attr(`y`,f+16).attr(`class`,`console-glyph`).attr(`style`,`font-family:monospace;font-weight:bold;font-size:14px;fill:${c}`).text(`>_`),Y(t,m);let h=f+20+(d-20)/2;return s.attr(`transform`,`translate(${-(o.width/2)-(o.x-(o.left??0))}, ${h-o.height/2-(o.y-(o.top??0))})`),t.intersect=function(e){return Q.rect(t,e)},a}i(bm,`consoleWindow`);function xm(e){let t=Math.cos(Math.PI/4),n=Math.sin(Math.PI/4),r=e*2,i={x:r/2*t,y:r/2*n},a={x:-(r/2)*t,y:r/2*n},o={x:-(r/2)*t,y:-(r/2)*n},s={x:r/2*t,y:-(r/2)*n};return`M ${a.x},${a.y} L ${s.x},${s.y}
|
|
201
|
+
M ${i.x},${i.y} L ${o.x},${o.y}`}i(xm,`createLine`);function Sm(e,t){let{labelStyles:n,nodeStyles:r}=W(t);t.labelStyle=n,t.label=``;let i=e.insert(`g`).attr(`class`,X(t)).attr(`id`,t.domId??t.id),a=Math.max(30,t?.width??0),{cssStyles:o}=t,s=q.svg(i),c=G(t,{});t.look!==`handDrawn`&&(c.roughness=0,c.fillStyle=`solid`);let u=s.circle(0,0,a*2,c),d=xm(a),f=s.path(d,c),p=i.insert(()=>u,`:first-child`);return p.insert(()=>f),p.attr(`class`,`outer-path`),o&&t.look!==`handDrawn`&&p.selectAll(`path`).attr(`style`,o),r&&t.look!==`handDrawn`&&p.selectAll(`path`).attr(`style`,r),Y(t,p),t.intersect=function(e){return l.info(`crossedCircle intersect`,t,{radius:a,point:e}),Q.circle(t,a,e)},i}i(Sm,`crossedCircle`);function Cm(e,t,n,r=100,i=0,a=180){let o=[],s=i*Math.PI/180,c=(a*Math.PI/180-s)/(r-1);for(let i=0;i<r;i++){let r=s+i*c,a=e+n*Math.cos(r),l=t+n*Math.sin(r);o.push({x:-a,y:-l})}return o}i(Cm,`generateCirclePoints`);async function wm(e,t){let{labelStyles:n,nodeStyles:r}=W(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,label:o}=await J(e,t,X(t)),s=t.look===`neo`?18:t.padding??0,c=t.look===`neo`?12:t.padding??0,l=a.width+s,u=a.height+c,d=Math.max(5,u*.1),{cssStyles:f}=t,p=[...Cm(l/2,-u/2,d,30,-90,0),{x:-l/2-d,y:d},...Cm(l/2+d*2,-d,d,20,-180,-270),...Cm(l/2+d*2,d,d,20,-90,-180),{x:-l/2-d,y:-u/2},...Cm(l/2,u/2,d,20,0,90)],m=[{x:l/2,y:-u/2-d},{x:-l/2,y:-u/2-d},...Cm(l/2,-u/2,d,20,-90,0),{x:-l/2-d,y:-d},...Cm(l/2+l*.1,-d,d,20,-180,-270),...Cm(l/2+l*.1,d,d,20,-90,-180),{x:-l/2-d,y:u/2},...Cm(l/2,u/2,d,20,0,90),{x:-l/2,y:u/2+d},{x:l/2,y:u/2+d}],h=q.svg(i),g=G(t,{fill:`none`});t.look!==`handDrawn`&&(g.roughness=0,g.fillStyle=`solid`);let _=Z(p).replace(`Z`,``),v=h.path(_,g),y=Z(m),b=h.path(y,{...g}),x=i.insert(`g`,`:first-child`);return x.insert(()=>b,`:first-child`).attr(`stroke-opacity`,0),x.insert(()=>v,`:first-child`),x.attr(`class`,`text`),f&&t.look!==`handDrawn`&&x.selectAll(`path`).attr(`style`,f),r&&t.look!==`handDrawn`&&x.selectAll(`path`).attr(`style`,r),x.attr(`transform`,`translate(${d}, 0)`),o.attr(`transform`,`translate(${-l/2+d-(a.x-(a.left??0))},${-u/2+(t.padding??0)/2-(a.y-(a.top??0))})`),Y(t,x),t.intersect=function(e){return Q.polygon(t,m,e)},i}i(wm,`curlyBraceLeft`);function Tm(e,t,n,r=100,i=0,a=180){let o=[],s=i*Math.PI/180,c=(a*Math.PI/180-s)/(r-1);for(let i=0;i<r;i++){let r=s+i*c,a=e+n*Math.cos(r),l=t+n*Math.sin(r);o.push({x:a,y:l})}return o}i(Tm,`generateCirclePoints`);async function Em(e,t){let{labelStyles:n,nodeStyles:r}=W(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,label:o}=await J(e,t,X(t)),s=t.look===`neo`?18:t.padding??0,c=t.look===`neo`?12:t.padding??0,l=a.width+(t.look===`neo`?s*2:s),u=a.height+(t.look===`neo`?c*2:c),d=Math.max(5,u*.1),{cssStyles:f}=t,p=[...Tm(l/2,-u/2,d,20,-90,0),{x:l/2+d,y:-d},...Tm(l/2+d*2,-d,d,20,-180,-270),...Tm(l/2+d*2,d,d,20,-90,-180),{x:l/2+d,y:u/2},...Tm(l/2,u/2,d,20,0,90)],m=[{x:-l/2,y:-u/2-d},{x:l/2,y:-u/2-d},...Tm(l/2,-u/2,d,20,-90,0),{x:l/2+d,y:-d},...Tm(l/2+d*2,-d,d,20,-180,-270),...Tm(l/2+d*2,d,d,20,-90,-180),{x:l/2+d,y:u/2},...Tm(l/2,u/2,d,20,0,90),{x:l/2,y:u/2+d},{x:-l/2,y:u/2+d}],h=q.svg(i),g=G(t,{fill:`none`});t.look!==`handDrawn`&&(g.roughness=0,g.fillStyle=`solid`);let _=Z(p).replace(`Z`,``),v=h.path(_,g),y=Z(m),b=h.path(y,{...g}),x=i.insert(`g`,`:first-child`);return x.insert(()=>b,`:first-child`).attr(`stroke-opacity`,0),x.insert(()=>v,`:first-child`),x.attr(`class`,`text`),f&&t.look!==`handDrawn`&&x.selectAll(`path`).attr(`style`,f),r&&t.look!==`handDrawn`&&x.selectAll(`path`).attr(`style`,r),x.attr(`transform`,`translate(${-d}, 0)`),o.attr(`transform`,`translate(${-l/2+(t.padding??0)/2-(a.x-(a.left??0))},${-u/2+(t.padding??0)/2-(a.y-(a.top??0))})`),Y(t,x),t.intersect=function(e){return Q.polygon(t,m,e)},i}i(Em,`curlyBraceRight`);function Dm(e,t,n,r=100,i=0,a=180){let o=[],s=i*Math.PI/180,c=(a*Math.PI/180-s)/(r-1);for(let i=0;i<r;i++){let r=s+i*c,a=e+n*Math.cos(r),l=t+n*Math.sin(r);o.push({x:-a,y:-l})}return o}i(Dm,`generateCirclePoints`);async function Om(e,t){let{labelStyles:n,nodeStyles:r}=W(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,label:o}=await J(e,t,X(t)),s=t.look===`neo`?18:t.padding??0,c=t.look===`neo`?12:t.padding??0,l=a.width+(t.look===`neo`?s*2:s),u=a.height+(t.look===`neo`?c*2:c),d=Math.max(5,u*.1),{cssStyles:f}=t,p=[...Dm(l/2,-u/2,d,30,-90,0),{x:-l/2-d,y:d},...Dm(l/2+d*2,-d,d,20,-180,-270),...Dm(l/2+d*2,d,d,20,-90,-180),{x:-l/2-d,y:-u/2},...Dm(l/2,u/2,d,20,0,90)],m=[...Dm(-l/2+d+d/2,-u/2,d,20,-90,-180),{x:l/2-d/2,y:d},...Dm(-l/2-d/2,-d,d,20,0,90),...Dm(-l/2-d/2,d,d,20,-90,0),{x:l/2-d/2,y:-d},...Dm(-l/2+d+d/2,u/2,d,30,-180,-270)],h=[{x:l/2,y:-u/2-d},{x:-l/2,y:-u/2-d},...Dm(l/2,-u/2,d,20,-90,0),{x:-l/2-d,y:-d},...Dm(l/2+d*2,-d,d,20,-180,-270),...Dm(l/2+d*2,d,d,20,-90,-180),{x:-l/2-d,y:u/2},...Dm(l/2,u/2,d,20,0,90),{x:-l/2,y:u/2+d},{x:l/2-d-d/2,y:u/2+d},...Dm(-l/2+d+d/2,-u/2,d,20,-90,-180),{x:l/2-d/2,y:d},...Dm(-l/2-d/2,-d,d,20,0,90),...Dm(-l/2-d/2,d,d,20,-90,0),{x:l/2-d/2,y:-d},...Dm(-l/2+d+d/2,u/2,d,30,-180,-270)],g=q.svg(i),_=G(t,{fill:`none`});t.look!==`handDrawn`&&(_.roughness=0,_.fillStyle=`solid`);let v=Z(p).replace(`Z`,``),y=g.path(v,_),b=Z(m).replace(`Z`,``),x=g.path(b,_),S=Z(h),C=g.path(S,{..._}),w=i.insert(`g`,`:first-child`);return w.insert(()=>C,`:first-child`).attr(`stroke-opacity`,0),w.insert(()=>y,`:first-child`),w.insert(()=>x,`:first-child`),w.attr(`class`,`text`),f&&t.look!==`handDrawn`&&w.selectAll(`path`).attr(`style`,f),r&&t.look!==`handDrawn`&&w.selectAll(`path`).attr(`style`,r),w.attr(`transform`,`translate(${d-d/4}, 0)`),o.attr(`transform`,`translate(${-l/2+(t.padding??0)/2-(a.x-(a.left??0))},${-u/2+(t.padding??0)/2-(a.y-(a.top??0))})`),Y(t,w),t.intersect=function(e){return Q.polygon(t,h,e)},i}i(Om,`curlyBraces`);async function km(e,t){let{labelStyles:n,nodeStyles:r}=W(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?12:i,{shapeSvg:s,bbox:c}=await J(e,t,X(t)),l=Math.max(20,(c.width+a*2)*1.25,t?.width??0),u=Math.max(5,c.height+o*2,t?.height??0),d=u/2,{cssStyles:f}=t,p=q.svg(s),m=G(t,{});t.look!==`handDrawn`&&(m.roughness=0,m.fillStyle=`solid`);let h=l,g=u,_=h-d,v=g/4,y=[{x:_,y:0},{x:v,y:0},{x:0,y:g/2},{x:v,y:g},{x:_,y:g},...Fp(-_,-g/2,d,50,270,90)],b=Z(y),x=p.path(b,m),S=s.insert(()=>x,`:first-child`);return S.attr(`class`,`basic label-container outer-path`),f&&t.look!==`handDrawn`&&S.selectChildren(`path`).attr(`style`,f),r&&t.look!==`handDrawn`&&S.selectChildren(`path`).attr(`style`,r),S.attr(`transform`,`translate(${-l/2}, ${-u/2})`),Y(t,S),t.intersect=function(e){return Q.polygon(t,y,e)},s}i(km,`curvedTrapezoid`);async function Am(e,t){let{labelStyles:n,nodeStyles:r}=W(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,label:o}=await J(e,t,X(t)),s=t.padding??20,c=Math.max(a.width+s*2,t.width??0,100),l=Math.min(Math.max(c*.23,16),56),u=l*.27,d=Math.max(a.height+s*2,t.height?t.height-(2*l-u):0),f=Math.min(c*.177,d*.45),p=d+2*l-u,m=-p/2,h=m+2*l-u,g=i.insert(`g`,`:first-child`).attr(`class`,`basic label-container`),{cssStyles:_}=t;if(t.look===`handDrawn`){let e=q.svg(i),n=G(t,{}),r=e.path(Rp(-c/2,h,c,d,f),n),a=e.circle(0,m+l,l*2,n);g.insert(()=>a,`:first-child`),g.insert(()=>r,`:first-child`),_&&g.attr(`style`,_)}else g.append(`rect`).attr(`x`,-c/2).attr(`y`,h).attr(`width`,c).attr(`height`,d).attr(`rx`,f).attr(`ry`,f).attr(`style`,r),g.append(`circle`).attr(`cx`,0).attr(`cy`,m+l).attr(`r`,l).attr(`style`,r);Y(t,g);let v=h+d/2;o.attr(`transform`,`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${v-a.height/2-(a.y-(a.top??0))})`);let y=m+l,b=Math.asin(Math.min(1,(h-y)/l))*180/Math.PI,x=[...Fp(0,-y,l,24,180+b,-b),...Fp(-(-c/2+f),-(h+f),f,12,90,0),...Fp(-(-c/2+f),-(p/2-f),f,12,360,270),...Fp(-(c/2-f),-(p/2-f),f,12,270,180),...Fp(-(c/2-f),-(h+f),f,12,180,90)];return t.intersect=function(e){return Q.polygon(t,x,e)},i}i(Am,`person`);var jm=i((e,t,n,r,i,a)=>[`M${e},${t+a}`,`a${i},${a} 0,0,0 ${n},0`,`a${i},${a} 0,0,0 ${-n},0`,`l0,${r}`,`a${i},${a} 0,0,0 ${n},0`,`l0,${-r}`].join(` `),`createCylinderPathD`),Mm=i((e,t,n,r,i,a)=>[`M${e},${t+a}`,`M${e+n},${t+a}`,`a${i},${a} 0,0,0 ${-n},0`,`l0,${r}`,`a${i},${a} 0,0,0 ${n},0`,`l0,${-r}`].join(` `),`createOuterCylinderPathD`),Nm=i((e,t,n,r,i,a)=>[`M${e-n/2},${-r/2}`,`a${i},${a} 0,0,0 ${n},0`].join(` `),`createInnerCylinderPathD`),Pm=8,Fm=8;async function Im(e,t){let{labelStyles:n,nodeStyles:r}=W(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?24:i,o=t.look===`neo`?24:i,s=t.width??0;if(t.width&&(t.width-=o,t.width<Fm&&(t.width=Fm)),t.height){let e=s/2/(2.5+s/50);t.height=t.height-a-e*3,t.height<Pm&&(t.height=Pm)}let{shapeSvg:c,bbox:l,label:u}=await J(e,t,X(t)),d=Math.max(t.width??0,l.width)+o,f=d/2,p=f/(2.5+d/50),m=Math.max(t.height??0,l.height)+a+p,h,{cssStyles:g}=t;if(t.look===`handDrawn`){let e=q.svg(c),n=Mm(0,0,d,m,f,p),r=Nm(0,p,d,m,f,p),i=G(t,{}),a=e.path(n,i),o=e.path(r,G(t,{fill:`none`}));h=c.insert(()=>o,`:first-child`),h=c.insert(()=>a,`:first-child`),h.attr(`class`,`basic label-container`),g&&h.attr(`style`,g)}else{let e=jm(0,0,d,m,f,p);h=c.insert(`path`,`:first-child`).attr(`d`,e).attr(`class`,`basic label-container outer-path`).attr(`style`,lu(g)).attr(`style`,r)}return h.attr(`label-offset-y`,p),h.attr(`transform`,`translate(${-d/2}, ${-(m/2+p)})`),Y(t,h),u.attr(`transform`,`translate(${-(l.width/2)-(l.x-(l.left??0))}, ${-(l.height/2)+(t.padding??0)/1.5-(l.y-(l.top??0))})`),t.intersect=function(e){let n=Q.rect(t,e),r=n.x-(t.x??0);if(f!=0&&(Math.abs(r)<(t.width??0)/2||Math.abs(r)==(t.width??0)/2&&Math.abs(n.y-(t.y??0))>(t.height??0)/2-p)){let i=p*p*(1-r*r/(f*f));i>0&&(i=Math.sqrt(i)),i=p-i,e.y-(t.y??0)>0&&(i=-i),n.y+=i}return n},c}i(Im,`cylinder`);async function Lm(e,t,n){let{labelStyles:r,nodeStyles:i}=W(t);t.labelStyle=r;let{shapeSvg:a,bbox:o}=await J(e,t,X(t)),s=Math.max(o.width+n.labelPaddingX*2,t?.width||0),c=Math.max(o.height+n.labelPaddingY*2,t?.height||0),l=-s/2,u=-c/2,d,{rx:f,ry:p}=t,{cssStyles:m}=t;if(n?.rx&&n.ry&&(f=n.rx,p=n.ry),t.look===`handDrawn`){let e=q.svg(a),n=G(t,{}),r=f||p?e.path(Rp(l,u,s,c,f||0),n):e.rectangle(l,u,s,c,n);d=a.insert(()=>r,`:first-child`),d.attr(`class`,`basic label-container`).attr(`style`,lu(m))}else d=a.insert(`rect`,`:first-child`),d.attr(`class`,`basic label-container`).attr(`style`,i).attr(`rx`,lu(f)).attr(`ry`,lu(p)).attr(`x`,l).attr(`y`,u).attr(`width`,s).attr(`height`,c);return Y(t,d,t.look===`handDrawn`?void 0:{width:s,height:c}),t.calcIntersect=function(e,t){return Q.rect(e,t)},t.intersect=function(e){return Q.rect(t,e)},a}i(Lm,`drawRect`);async function Rm(e,t){let{cssClasses:n,labelPaddingX:r,labelPaddingY:i,padding:a,width:o,height:s}=t,c=await Lm(e,t,{rx:0,ry:0,classes:n??``,labelPaddingX:r??(a??0)*2,labelPaddingY:i??a??0});if(t.look===`handDrawn`){let e=q.svg(c),n=G(t,{}),r=c.select(`.basic.label-container > path:nth-child(2)`),i=r.node();if(!i)return c;let a=null;if(i instanceof SVGGraphicsElement)a=i.getBBox();else return c;return c.insert(()=>e.line(a.x,a.y,a.x+a.width,a.y,n),`.basic.label-container g.label`),c.insert(()=>e.line(a.x,a.y+a.height,a.x+a.width,a.y+a.height,n),`.basic.label-container g.label`),r.remove(),c}let l=c.select(`.basic.label-container`),u=(Number(l.attr(`width`))||o)??0,d=(Number(l.attr(`height`))||s)??0;return u>0&&d>0&&l.attr(`stroke-dasharray`,`${u} ${d}`),c}i(Rm,`datastore`);async function zm(e,t){let{labelStyles:n,nodeStyles:r}=W(t);t.labelStyle=n;let i=t.look===`neo`?16:t.padding??0,a=t.look===`neo`?16:t.padding??0,{shapeSvg:o,bbox:s,label:c}=await J(e,t,X(t)),l=s.width+i,u=s.height+a,d=u*.2,f=-l/2,p=-u/2-d/2,{cssStyles:m}=t,h=q.svg(o),g=G(t,{});t.look!==`handDrawn`&&(g.roughness=0,g.fillStyle=`solid`);let _=[{x:f,y:p+d},{x:-f,y:p+d},{x:-f,y:-p},{x:f,y:-p},{x:f,y:p},{x:-f,y:p},{x:-f,y:p+d}],v=h.polygon(_.map(e=>[e.x,e.y]),g),y=o.insert(()=>v,`:first-child`);return y.attr(`class`,`basic label-container outer-path`),m&&t.look!==`handDrawn`&&y.selectAll(`path`).attr(`style`,m),r&&t.look!==`handDrawn`&&y.selectAll(`path`).attr(`style`,r),c.attr(`transform`,`translate(${f+(t.padding??0)/2-(s.x-(s.left??0))}, ${p+d+(t.padding??0)/2-(s.y-(s.top??0))})`),Y(t,y),t.intersect=function(e){return Q.rect(t,e)},o}i(zm,`dividedRectangle`);async function Bm(e,t){let{labelStyles:n,nodeStyles:r}=W(t),i=t.look===`neo`?12:5;t.labelStyle=n;let a=t.padding??0,o=t.look===`neo`?16:a,{shapeSvg:s,bbox:c}=await J(e,t,X(t)),u=(t?.width?t?.width/2:c.width/2)+(o??0),d=u-i,f,{cssStyles:p}=t;if(t.look===`handDrawn`){let e=q.svg(s),n=G(t,{roughness:.2,strokeWidth:2.5}),r=G(t,{roughness:.2,strokeWidth:1.5}),i=e.circle(0,0,u*2,n),a=e.circle(0,0,d*2,r);f=s.insert(`g`,`:first-child`),f.attr(`class`,lu(t.cssClasses)).attr(`style`,lu(p)),f.node()?.appendChild(i),f.node()?.appendChild(a)}else{f=s.insert(`g`,`:first-child`);let e=f.insert(`circle`,`:first-child`),t=f.insert(`circle`);f.attr(`class`,`basic label-container`).attr(`style`,r),e.attr(`class`,`outer-circle`).attr(`style`,r).attr(`r`,u).attr(`cx`,0).attr(`cy`,0),t.attr(`class`,`inner-circle`).attr(`style`,r).attr(`r`,d).attr(`cx`,0).attr(`cy`,0)}return Y(t,f),t.intersect=function(e){return l.info(`DoubleCircle intersect`,t,u,e),Q.circle(t,u,e)},s}i(Bm,`doublecircle`);function Vm(e,t,{config:{themeVariables:n}}){let{labelStyles:r,nodeStyles:i}=W(t);t.label=``,t.labelStyle=r;let a=e.insert(`g`).attr(`class`,X(t)).attr(`id`,t.domId??t.id),{cssStyles:o}=t,s=q.svg(a),{nodeBorder:c}=n,u=G(t,{fillStyle:`solid`});t.look!==`handDrawn`&&(u.roughness=0);let d=s.circle(0,0,14,u),f=a.insert(()=>d,`:first-child`);return f.selectAll(`path`).attr(`style`,`fill: ${c} !important;`),o&&o.length>0&&t.look!==`handDrawn`&&f.selectAll(`path`).attr(`style`,o),i&&t.look!==`handDrawn`&&f.selectAll(`path`).attr(`style`,i),Y(t,f),t.intersect=function(e){return l.info(`filledCircle intersect`,t,{radius:7,point:e}),Q.circle(t,7,e)},a}i(Vm,`filledCircle`);var Hm=10,Um=10;async function Wm(e,t){let{labelStyles:n,nodeStyles:r}=W(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?i*2:i;(t.width||t.height)&&(t.height=t?.height??0,t.height<Hm&&(t.height=Hm),t.width=(t?.width??0)-a-a/2,t.width<Um&&(t.width=Um));let{shapeSvg:o,bbox:s,label:c}=await J(e,t,X(t)),u=(t?.width?t?.width:s.width)+(a??0),d=t?.height?t?.height:u+s.height,f=d,p=[{x:0,y:-d},{x:f,y:-d},{x:f/2,y:0}],{cssStyles:m}=t,h=q.svg(o),g=G(t,{});t.look!==`handDrawn`&&(g.roughness=0,g.fillStyle=`solid`);let _=Z(p),v=h.path(_,g),y=o.insert(()=>v,`:first-child`).attr(`transform`,`translate(${-d/2}, ${d/2})`).attr(`class`,`outer-path`);return m&&t.look!==`handDrawn`&&y.selectChildren(`path`).attr(`style`,m),r&&t.look!==`handDrawn`&&y.selectChildren(`path`).attr(`style`,r),t.width=u,t.height=d,Y(t,y),c.attr(`transform`,`translate(${-s.width/2-(s.x-(s.left??0))}, ${-d/2+(t.padding??0)/2+(s.y-(s.top??0))})`),t.intersect=function(e){return l.info(`Triangle intersect`,t,p,e),Q.polygon(t,p,e)},o}i(Wm,`flippedTriangle`);async function Gm(e,t){let{labelStyles:n,nodeStyles:r}=W(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,label:o}=await J(e,t,X(t)),s=t.padding??12,c=Math.max(a.width+s*2,t.width??0,90),l=a.height+s*2,u=Math.max(Math.min(l*.16,14),8),d=Math.max(l+u,t.height??0),f=d-u,p=Math.max(c*.38,28),m=-d/2,h=[{x:-c/2,y:m},{x:-c/2+p,y:m},{x:-c/2+p,y:m+u},{x:c/2,y:m+u},{x:c/2,y:d/2},{x:-c/2,y:d/2}],g=[`M${h[0].x},${h[0].y}`,...h.slice(1).map(e=>`L${e.x},${e.y}`),`Z`].join(` `),{cssStyles:_}=t,v;if(t.look===`handDrawn`){let e=q.svg(i).path(g,G(t,{}));v=i.insert(()=>e,`:first-child`).attr(`class`,`basic label-container`),_&&v.attr(`style`,_)}else v=i.insert(`path`,`:first-child`).attr(`d`,g).attr(`class`,`basic label-container`).attr(`style`,r);t.look===`handDrawn`?Y(t,v):Y(t,v,{width:c,height:d});let y=m+u+f/2;return o.attr(`transform`,`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${y-a.height/2-(a.y-(a.top??0))})`),t.intersect=function(e){return Q.polygon(t,h,e)},i}i(Gm,`folder`);function Km(e,t,{dir:n,config:{state:r,themeVariables:i}}){let{nodeStyles:a}=W(t);t.label=``;let o=e.insert(`g`).attr(`class`,X(t)).attr(`id`,t.domId??t.id),{cssStyles:s}=t,c=Math.max(70,t?.width??0),l=Math.max(10,t?.height??0);n===`LR`&&(c=Math.max(10,t?.width??0),l=Math.max(70,t?.height??0));let u=-1*c/2,d=-1*l/2,f=q.svg(o),p=G(t,{stroke:i.lineColor,fill:i.lineColor});t.look!==`handDrawn`&&(p.roughness=0,p.fillStyle=`solid`);let m=f.rectangle(u,d,c,l,p),h=o.insert(()=>m,`:first-child`);s&&t.look!==`handDrawn`&&h.selectAll(`path`).attr(`style`,s),a&&t.look!==`handDrawn`&&h.selectAll(`path`).attr(`style`,a),Y(t,h);let g=r?.padding??0;return t.width&&t.height&&(t.width+=g/2||0,t.height+=g/2||0),t.intersect=function(e){return Q.rect(t,e)},o}i(Km,`forkJoin`);async function qm(e,t){let{labelStyles:n,nodeStyles:r}=W(t);t.labelStyle=n;let i=t.look===`neo`?16:t.padding??0,a=t.look===`neo`?12:t.padding??0;(t.width||t.height)&&(t.height=(t?.height??0)-a*2,t.height<10&&(t.height=10),t.width=(t?.width??0)-i*2,t.width<15&&(t.width=15));let{shapeSvg:o,bbox:s}=await J(e,t,X(t)),c=(t?.width?t?.width:Math.max(15,s.width))+i*2,u=(t?.height?t?.height:Math.max(10,s.height))+a*2,d=u/2,{cssStyles:f}=t,p=q.svg(o),m=G(t,{});t.look!==`handDrawn`&&(m.roughness=0,m.fillStyle=`solid`);let h=[{x:-c/2,y:-u/2},{x:c/2-d,y:-u/2},...Fp(-c/2+d,0,d,50,90,270),{x:c/2-d,y:u/2},{x:-c/2,y:u/2}],g=Z(h),_=p.path(g,m),v=o.insert(()=>_,`:first-child`);return v.attr(`class`,`basic label-container outer-path`),f&&t.look!==`handDrawn`&&v.selectChildren(`path`).attr(`style`,f),r&&t.look!==`handDrawn`&&v.selectChildren(`path`).attr(`style`,r),Y(t,v),t.intersect=function(e){return l.info(`Pill intersect`,t,{radius:d,point:e}),Q.polygon(t,h,e)},o}i(qm,`halfRoundedRectangle`);var Jm=i((e,t,n,r,i)=>[`M${e+i},${t}`,`L${e+n-i},${t}`,`L${e+n},${t-r/2}`,`L${e+n-i},${t-r}`,`L${e+i},${t-r}`,`L${e},${t-r/2}`,`Z`].join(` `),`createHexagonPathD`);async function Ym(e,t){let{labelStyles:n,nodeStyles:r}=W(t),i=t.look===`neo`?3.5:4;t.labelStyle=n;let a=t.padding??0,o=t.look===`neo`?70:a,s=t.look===`neo`?32:a;if(t.width||t.height){let e=(t.height??0)/i;t.width=(t?.width??0)-2*e-s,t.height=(t.height??0)-o}let{shapeSvg:c,bbox:l}=await J(e,t,X(t)),u=(t?.height?t?.height:l.height)+o,d=u/i,f=(t?.width?t?.width:l.width)+2*d+s,p=[{x:d,y:0},{x:f-d,y:0},{x:f,y:-u/2},{x:f-d,y:-u},{x:d,y:-u},{x:0,y:-u/2}],m,{cssStyles:h}=t;if(t.look===`handDrawn`){let e=q.svg(c),n=G(t,{}),r=Jm(0,0,f,u,d),i=e.path(r,n);m=c.insert(()=>i,`:first-child`).attr(`transform`,`translate(${-f/2}, ${u/2})`),h&&m.attr(`style`,h)}else m=om(c,f,u,p);return r&&m.attr(`style`,r),t.width=f,t.height=u,Y(t,m),t.intersect=function(e){return Q.polygon(t,p,e)},c}i(Ym,`hexagon`);async function Xm(e,t){let{labelStyles:n,nodeStyles:r}=W(t);t.label=``,t.labelStyle=n;let{shapeSvg:i}=await J(e,t,X(t)),a=Math.max(30,t?.width??0),o=Math.max(30,t?.height??0),{cssStyles:s}=t,c=q.svg(i),u=G(t,{});t.look!==`handDrawn`&&(u.roughness=0,u.fillStyle=`solid`);let d=[{x:0,y:0},{x:a,y:0},{x:0,y:o},{x:a,y:o}],f=Z(d),p=c.path(f,u),m=i.insert(()=>p,`:first-child`);return m.attr(`class`,`basic label-container outer-path`),s&&t.look!==`handDrawn`&&m.selectChildren(`path`).attr(`style`,s),r&&t.look!==`handDrawn`&&m.selectChildren(`path`).attr(`style`,r),m.attr(`transform`,`translate(${-a/2}, ${-o/2})`),Y(t,m),t.intersect=function(e){return l.info(`Pill intersect`,t,{points:d}),Q.polygon(t,d,e)},i}i(Xm,`hourglass`);async function Zm(e,t,{config:{themeVariables:n,flowchart:r}}){let{labelStyles:i}=W(t);t.labelStyle=i;let a=t.assetHeight??48,o=t.assetWidth??48,s=Math.max(a,o),c=r?.wrappingWidth;t.width=Math.max(s,c??0);let{shapeSvg:u,bbox:d,label:f}=await J(e,t,`icon-shape default`),p=t.pos===`t`,m=s,h=s,{nodeBorder:g}=n,{stylesMap:_}=vf(t),v=-h/2,y=-m/2,b=t.label?8:0,x=q.svg(u),S=G(t,{stroke:`none`,fill:`none`});t.look!==`handDrawn`&&(S.roughness=0,S.fillStyle=`solid`);let C=x.rectangle(v,y,h,m,S),w=Math.max(h,d.width),T=m+d.height+b,E=x.rectangle(-w/2,-T/2,w,T,{...S,fill:`transparent`,stroke:`none`}),D=u.insert(()=>C,`:first-child`),O=u.insert(()=>E);if(t.icon){let e=u.append(`g`);e.html(`<g>${await Sc(t.icon,{height:s,width:s,fallbackPrefix:``})}</g>`);let n=e.node().getBBox(),r=n.width,i=n.height,a=n.x,o=n.y;e.attr(`transform`,`translate(${-r/2-a},${p?d.height/2+b/2-i/2-o:-d.height/2-b/2-i/2-o})`),e.attr(`style`,`color: ${_.get(`stroke`)??g};`)}return f.attr(`transform`,`translate(${-d.width/2-(d.x-(d.left??0))},${p?-T/2:T/2-d.height})`),D.attr(`transform`,`translate(0,${p?d.height/2+b/2:-d.height/2-b/2})`),Y(t,O),t.intersect=function(e){if(l.info(`iconSquare intersect`,t,e),!t.label)return Q.rect(t,e);let n=t.x??0,r=t.y??0,i=t.height??0,a=[];return a=p?[{x:n-d.width/2,y:r-i/2},{x:n+d.width/2,y:r-i/2},{x:n+d.width/2,y:r-i/2+d.height+b},{x:n+h/2,y:r-i/2+d.height+b},{x:n+h/2,y:r+i/2},{x:n-h/2,y:r+i/2},{x:n-h/2,y:r-i/2+d.height+b},{x:n-d.width/2,y:r-i/2+d.height+b}]:[{x:n-h/2,y:r-i/2},{x:n+h/2,y:r-i/2},{x:n+h/2,y:r-i/2+m},{x:n+d.width/2,y:r-i/2+m},{x:n+d.width/2/2,y:r+i/2},{x:n-d.width/2,y:r+i/2},{x:n-d.width/2,y:r-i/2+m},{x:n-h/2,y:r-i/2+m}],Q.polygon(t,a,e)},u}i(Zm,`icon`);async function Qm(e,t,{config:{themeVariables:n,flowchart:r}}){let{labelStyles:i}=W(t);t.labelStyle=i;let a=t.assetHeight??48,o=t.assetWidth??48,s=Math.max(a,o),c=r?.wrappingWidth;t.width=Math.max(s,c??0);let{shapeSvg:u,bbox:d,label:f}=await J(e,t,`icon-shape default`),p=t.label?8:0,m=t.pos===`t`,{nodeBorder:h,mainBkg:g}=n,{stylesMap:_}=vf(t),v=q.svg(u),y=G(t,{});t.look!==`handDrawn`&&(y.roughness=0,y.fillStyle=`solid`),y.stroke=_.get(`fill`)??g;let b=u.append(`g`);t.icon&&b.html(`<g>${await Sc(t.icon,{height:s,width:s,fallbackPrefix:``})}</g>`);let x=b.node().getBBox(),S=x.width,C=x.height,w=x.x,T=x.y,E=Math.max(S,C)*Math.SQRT2+40,D=v.circle(0,0,E,y),O=Math.max(E,d.width),k=E+d.height+p,A=v.rectangle(-O/2,-k/2,O,k,{...y,fill:`transparent`,stroke:`none`}),j=u.insert(()=>D,`:first-child`),ee=u.insert(()=>A);return b.attr(`transform`,`translate(${-S/2-w},${m?d.height/2+p/2-C/2-T:-d.height/2-p/2-C/2-T})`),b.attr(`style`,`color: ${_.get(`stroke`)??h};`),f.attr(`transform`,`translate(${-d.width/2-(d.x-(d.left??0))},${m?-k/2:k/2-d.height})`),j.attr(`transform`,`translate(0,${m?d.height/2+p/2:-d.height/2-p/2})`),Y(t,ee),t.intersect=function(e){return l.info(`iconSquare intersect`,t,e),Q.rect(t,e)},u}i(Qm,`iconCircle`);async function $m(e,t,{config:{themeVariables:n,flowchart:r}}){let{labelStyles:i}=W(t);t.labelStyle=i;let a=t.assetHeight??48,o=t.assetWidth??48,s=Math.max(a,o),c=r?.wrappingWidth;t.width=Math.max(s,c??0);let{shapeSvg:u,bbox:d,halfPadding:f,label:p}=await J(e,t,`icon-shape default`),m=t.pos===`t`,h=s+f*2,g=s+f*2,{nodeBorder:_,mainBkg:v}=n,{stylesMap:y}=vf(t),b=-g/2,x=-h/2,S=t.label?8:0,C=q.svg(u),w=G(t,{});t.look!==`handDrawn`&&(w.roughness=0,w.fillStyle=`solid`),w.stroke=y.get(`fill`)??v;let T=C.path(Rp(b,x,g,h,5),w),E=Math.max(g,d.width),D=h+d.height+S,O=C.rectangle(-E/2,-D/2,E,D,{...w,fill:`transparent`,stroke:`none`}),k=u.insert(()=>T,`:first-child`).attr(`class`,`icon-shape2`),A=u.insert(()=>O);if(t.icon){let e=u.append(`g`);e.html(`<g>${await Sc(t.icon,{height:s,width:s,fallbackPrefix:``})}</g>`);let n=e.node().getBBox(),r=n.width,i=n.height,a=n.x,o=n.y;e.attr(`transform`,`translate(${-r/2-a},${m?d.height/2+S/2-i/2-o:-d.height/2-S/2-i/2-o})`),e.attr(`style`,`color: ${y.get(`stroke`)??_};`)}return p.attr(`transform`,`translate(${-d.width/2-(d.x-(d.left??0))},${m?-D/2:D/2-d.height})`),k.attr(`transform`,`translate(0,${m?d.height/2+S/2:-d.height/2-S/2})`),Y(t,A),t.intersect=function(e){if(l.info(`iconSquare intersect`,t,e),!t.label)return Q.rect(t,e);let n=t.x??0,r=t.y??0,i=t.height??0,a=[];return a=m?[{x:n-d.width/2,y:r-i/2},{x:n+d.width/2,y:r-i/2},{x:n+d.width/2,y:r-i/2+d.height+S},{x:n+g/2,y:r-i/2+d.height+S},{x:n+g/2,y:r+i/2},{x:n-g/2,y:r+i/2},{x:n-g/2,y:r-i/2+d.height+S},{x:n-d.width/2,y:r-i/2+d.height+S}]:[{x:n-g/2,y:r-i/2},{x:n+g/2,y:r-i/2},{x:n+g/2,y:r-i/2+h},{x:n+d.width/2,y:r-i/2+h},{x:n+d.width/2/2,y:r+i/2},{x:n-d.width/2,y:r+i/2},{x:n-d.width/2,y:r-i/2+h},{x:n-g/2,y:r-i/2+h}],Q.polygon(t,a,e)},u}i($m,`iconRounded`);async function eh(e,t,{config:{themeVariables:n,flowchart:r}}){let{labelStyles:i}=W(t);t.labelStyle=i;let a=t.assetHeight??48,o=t.assetWidth??48,s=Math.max(a,o),c=r?.wrappingWidth;t.width=Math.max(s,c??0);let{shapeSvg:u,bbox:d,halfPadding:f,label:p}=await J(e,t,`icon-shape default`),m=t.pos===`t`,h=s+f*2,g=s+f*2,{nodeBorder:_,mainBkg:v}=n,{stylesMap:y}=vf(t),b=-g/2,x=-h/2,S=t.label?8:0,C=q.svg(u),w=G(t,{});t.look!==`handDrawn`&&(w.roughness=0,w.fillStyle=`solid`),w.stroke=y.get(`fill`)??v;let T=C.path(Rp(b,x,g,h,.1),w),E=Math.max(g,d.width),D=h+d.height+S,O=C.rectangle(-E/2,-D/2,E,D,{...w,fill:`transparent`,stroke:`none`}),k=u.insert(()=>T,`:first-child`),A=u.insert(()=>O);if(t.icon){let e=u.append(`g`);e.html(`<g>${await Sc(t.icon,{height:s,width:s,fallbackPrefix:``})}</g>`);let n=e.node().getBBox(),r=n.width,i=n.height,a=n.x,o=n.y;e.attr(`transform`,`translate(${-r/2-a},${m?d.height/2+S/2-i/2-o:-d.height/2-S/2-i/2-o})`),e.attr(`style`,`color: ${y.get(`stroke`)??_};`)}return p.attr(`transform`,`translate(${-d.width/2-(d.x-(d.left??0))},${m?-D/2:D/2-d.height})`),k.attr(`transform`,`translate(0,${m?d.height/2+S/2:-d.height/2-S/2})`),Y(t,A),t.intersect=function(e){if(l.info(`iconSquare intersect`,t,e),!t.label)return Q.rect(t,e);let n=t.x??0,r=t.y??0,i=t.height??0,a=[];return a=m?[{x:n-d.width/2,y:r-i/2},{x:n+d.width/2,y:r-i/2},{x:n+d.width/2,y:r-i/2+d.height+S},{x:n+g/2,y:r-i/2+d.height+S},{x:n+g/2,y:r+i/2},{x:n-g/2,y:r+i/2},{x:n-g/2,y:r-i/2+d.height+S},{x:n-d.width/2,y:r-i/2+d.height+S}]:[{x:n-g/2,y:r-i/2},{x:n+g/2,y:r-i/2},{x:n+g/2,y:r-i/2+h},{x:n+d.width/2,y:r-i/2+h},{x:n+d.width/2/2,y:r+i/2},{x:n-d.width/2,y:r+i/2},{x:n-d.width/2,y:r-i/2+h},{x:n-g/2,y:r-i/2+h}],Q.polygon(t,a,e)},u}i(eh,`iconSquare`);async function th(e,t,{config:{flowchart:n}}){let r=new Image;r.src=t?.img??``,await r.decode();let i=Number(r.naturalWidth.toString().replace(`px`,``)),a=Number(r.naturalHeight.toString().replace(`px`,``));t.imageAspectRatio=i/a;let{labelStyles:o}=W(t);t.labelStyle=o;let s=n?.wrappingWidth;t.defaultWidth=n?.wrappingWidth;let c=Math.max(t.label?s??0:0,t?.assetWidth??i),u=t.constraint===`on`&&t?.assetHeight?t.assetHeight*t.imageAspectRatio:c,d=t.constraint===`on`?u/t.imageAspectRatio:t?.assetHeight??a;t.width=Math.max(u,s??0);let{shapeSvg:f,bbox:p,label:m}=await J(e,t,`image-shape default`),h=t.pos===`t`,g=-u/2,_=-d/2,v=t.label?8:0,y=q.svg(f),b=G(t,{});t.look!==`handDrawn`&&(b.roughness=0,b.fillStyle=`solid`);let x=y.rectangle(g,_,u,d,b),S=Math.max(u,p.width),C=d+p.height+v,w=y.rectangle(-S/2,-C/2,S,C,{...b,fill:`none`,stroke:`none`}),T=f.insert(()=>x,`:first-child`),E=f.insert(()=>w);if(t.img){let e=f.append(`image`);e.attr(`href`,t.img),e.attr(`width`,u),e.attr(`height`,d),e.attr(`preserveAspectRatio`,`none`),e.attr(`transform`,`translate(${-u/2},${h?C/2-d:-C/2})`)}return m.attr(`transform`,`translate(${-p.width/2-(p.x-(p.left??0))},${h?-d/2-p.height/2-v/2:d/2-p.height/2+v/2})`),T.attr(`transform`,`translate(0,${h?p.height/2+v/2:-p.height/2-v/2})`),Y(t,E),t.intersect=function(e){if(l.info(`iconSquare intersect`,t,e),!t.label)return Q.rect(t,e);let n=t.x??0,r=t.y??0,i=t.height??0,a=[];return a=h?[{x:n-p.width/2,y:r-i/2},{x:n+p.width/2,y:r-i/2},{x:n+p.width/2,y:r-i/2+p.height+v},{x:n+u/2,y:r-i/2+p.height+v},{x:n+u/2,y:r+i/2},{x:n-u/2,y:r+i/2},{x:n-u/2,y:r-i/2+p.height+v},{x:n-p.width/2,y:r-i/2+p.height+v}]:[{x:n-u/2,y:r-i/2},{x:n+u/2,y:r-i/2},{x:n+u/2,y:r-i/2+d},{x:n+p.width/2,y:r-i/2+d},{x:n+p.width/2/2,y:r+i/2},{x:n-p.width/2,y:r+i/2},{x:n-p.width/2,y:r-i/2+d},{x:n-u/2,y:r-i/2+d}],Q.polygon(t,a,e)},f}i(th,`imageSquare`);async function nh(e,t){let{labelStyles:n,nodeStyles:r}=W(t);t.labelStyle=n;let i=t.padding??0,a=i,o=t.look===`neo`?i*2:i,{shapeSvg:s,bbox:c}=await J(e,t,X(t)),l=Math.max(c.height+a*2,t.height??0),u=Math.max(c.width+o*2,(t.width??0)-l),d=[{x:0,y:0},{x:u,y:0},{x:u+3*l/6,y:-l},{x:-3*l/6,y:-l}],f,{cssStyles:p}=t;if(t.look===`handDrawn`){let e=q.svg(s),n=G(t,{}),r=Z(d),i=e.path(r,n);f=s.insert(()=>i,`:first-child`).attr(`transform`,`translate(${-u/2}, ${l/2})`),p&&f.attr(`style`,p)}else f=om(s,u,l,d);return r&&f.attr(`style`,r),t.width=u,t.height=l,Y(t,f),t.intersect=function(e){return Q.polygon(t,d,e)},s}i(nh,`inv_trapezoid`);async function rh(e,t){let{shapeSvg:n,bbox:r,label:i}=await J(e,t,`label`),a=n.insert(`rect`,`:first-child`);return a.attr(`width`,.1).attr(`height`,.1),n.attr(`class`,`label edgeLabel`),i.attr(`transform`,`translate(${-(r.width/2)-(r.x-(r.left??0))}, ${-(r.height/2)-(r.y-(r.top??0))})`),Y(t,a),t.intersect=function(e){return Q.rect(t,e)},n}i(rh,`labelRect`);async function ih(e,t){let{labelStyles:n,nodeStyles:r}=W(t);t.labelStyle=n;let i=t.padding??0,a=i,o=t.look===`neo`?i*2:i,{shapeSvg:s,bbox:c}=await J(e,t,X(t)),l=Math.max(c.height+a,t.height??0),u=Math.max(c.width+o,(t.width??0)-l),d=[{x:0,y:0},{x:u+3*l/6,y:0},{x:u,y:-l},{x:-(3*l)/6,y:-l}],f,{cssStyles:p}=t;if(t.look===`handDrawn`){let e=q.svg(s),n=G(t,{}),r=Z(d),i=e.path(r,n);f=s.insert(()=>i,`:first-child`).attr(`transform`,`translate(${-u/2}, ${l/2})`),p&&f.attr(`style`,p)}else f=om(s,u,l,d);return r&&f.attr(`style`,r),t.width=u,t.height=l,Y(t,f),t.intersect=function(e){return Q.polygon(t,d,e)},s}i(ih,`lean_left`);async function ah(e,t){let{labelStyles:n,nodeStyles:r}=W(t);t.labelStyle=n;let i=t.padding??0,a=i,o=t.look===`neo`?i*2:i,{shapeSvg:s,bbox:c}=await J(e,t,X(t)),l=Math.max(c.height+a,t.height??0),u=Math.max(c.width+o,(t.width??0)-l),d=[{x:-3*l/6,y:0},{x:u,y:0},{x:u+3*l/6,y:-l},{x:0,y:-l}],f,{cssStyles:p}=t;if(t.look===`handDrawn`){let e=q.svg(s),n=G(t,{}),r=Z(d),i=e.path(r,n);f=s.insert(()=>i,`:first-child`).attr(`transform`,`translate(${-u/2}, ${l/2})`),p&&f.attr(`style`,p)}else f=om(s,u,l,d);return r&&f.attr(`style`,r),t.width=u,t.height=l,Y(t,f),t.intersect=function(e){return Q.polygon(t,d,e)},s}i(ah,`lean_right`);function oh(e,t){let{labelStyles:n,nodeStyles:r}=W(t);t.label=``,t.labelStyle=n;let i=e.insert(`g`).attr(`class`,X(t)).attr(`id`,t.domId??t.id),{cssStyles:a}=t,o=Math.max(35,t?.width??0),s=Math.max(35,t?.height??0),c=[{x:o,y:0},{x:0,y:s+3.5},{x:o-14,y:s+3.5},{x:0,y:2*s},{x:o,y:s-3.5},{x:14,y:s-3.5}],u=q.svg(i),d=G(t,{});t.look!==`handDrawn`&&(d.roughness=0,d.fillStyle=`solid`);let f=Z(c),p=u.path(f,d),m=i.insert(()=>p,`:first-child`);return m.attr(`class`,`outer-path`),a&&t.look!==`handDrawn`&&m.selectAll(`path`).attr(`style`,a),r&&t.look!==`handDrawn`&&m.selectAll(`path`).attr(`style`,r),m.attr(`transform`,`translate(-${o/2},${-s})`),Y(t,m),t.intersect=function(e){return l.info(`lightningBolt intersect`,t,e),Q.polygon(t,c,e)},i}i(oh,`lightningBolt`);var sh=i((e,t,n,r,i,a,o)=>[`M${e},${t+a}`,`a${i},${a} 0,0,0 ${n},0`,`a${i},${a} 0,0,0 ${-n},0`,`l0,${r}`,`a${i},${a} 0,0,0 ${n},0`,`l0,${-r}`,`M${e},${t+a+o}`,`a${i},${a} 0,0,0 ${n},0`].join(` `),`createCylinderPathD`),ch=i((e,t,n,r,i,a,o)=>[`M${e},${t+a}`,`M${e+n},${t+a}`,`a${i},${a} 0,0,0 ${-n},0`,`l0,${r}`,`a${i},${a} 0,0,0 ${n},0`,`l0,${-r}`,`M${e},${t+a+o}`,`a${i},${a} 0,0,0 ${n},0`].join(` `),`createOuterCylinderPathD`),lh=i((e,t,n,r,i,a)=>[`M${e-n/2},${-r/2}`,`a${i},${a} 0,0,0 ${n},0`].join(` `),`createInnerCylinderPathD`),uh=10,dh=10;async function fh(e,t){let{labelStyles:n,nodeStyles:r}=W(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?24:i;if(t.width||t.height){let e=t.width??0;t.width=(t.width??0)-a,t.width<dh&&(t.width=dh);let n=e/2/(2.5+e/50);t.height=(t.height??0)-o-n*3,t.height<uh&&(t.height=uh)}let{shapeSvg:s,bbox:c,label:l}=await J(e,t,X(t)),u=(t?.width?t?.width:c.width)+a*2,d=u/2,f=d/(2.5+u/50),p=(t?.height?t?.height:c.height)+f+o*2,m=p*.1,h,{cssStyles:g}=t;if(t.look===`handDrawn`){let e=q.svg(s),n=ch(0,0,u,p,d,f,m),r=lh(0,f,u,p,d,f),i=G(t,{}),a=e.path(n,i),o=e.path(r,i);s.insert(()=>o,`:first-child`).attr(`class`,`line`),h=s.insert(()=>a,`:first-child`),h.attr(`class`,`basic label-container`),g&&h.attr(`style`,g)}else{let e=sh(0,0,u,p,d,f,m);h=s.insert(`path`,`:first-child`).attr(`d`,e).attr(`class`,`basic label-container outer-path`).attr(`style`,lu(g)).attr(`style`,r)}return h.attr(`label-offset-y`,f),h.attr(`transform`,`translate(${-u/2}, ${-(p/2+f)})`),Y(t,h),l.attr(`transform`,`translate(${-(c.width/2)-(c.x-(c.left??0))}, ${-(c.height/2)+f-(c.y-(c.top??0))})`),t.intersect=function(e){let n=Q.rect(t,e),r=n.x-(t.x??0);if(d!=0&&(Math.abs(r)<(t.width??0)/2||Math.abs(r)==(t.width??0)/2&&Math.abs(n.y-(t.y??0))>(t.height??0)/2-f)){let i=f*f*(1-r*r/(d*d));i>0&&(i=Math.sqrt(i)),i=f-i,e.y-(t.y??0)>0&&(i=-i),n.y+=i}return n},s}i(fh,`linedCylinder`);async function ph(e,t){let{labelStyles:n,nodeStyles:r}=W(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?12:i;(t.width||t.height)&&(t.width=(t.width??0)*10/11-a*2,t.width<10&&(t.width=10),t.height=(t?.height??0)-o*2,t.height<10&&(t.height=10));let{shapeSvg:s,bbox:c,label:l}=await J(e,t,X(t)),u=(t?.width?t?.width:c.width)+(a??0)*2,d=(t?.height?t?.height:c.height)+(o??0)*2,f=t.look===`neo`?d/4:d/8,p=d+f,{cssStyles:m}=t,h=q.svg(s),g=G(t,{});t.look!==`handDrawn`&&(g.roughness=0,g.fillStyle=`solid`);let _=[{x:-u/2-u/2*.1,y:-p/2},{x:-u/2-u/2*.1,y:p/2},...Pp(-u/2-u/2*.1,p/2,u/2+u/2*.1,p/2,f,.8),{x:u/2+u/2*.1,y:-p/2},{x:-u/2-u/2*.1,y:-p/2},{x:-u/2,y:-p/2},{x:-u/2,y:p/2*1.1},{x:-u/2,y:-p/2}],v=h.polygon(_.map(e=>[e.x,e.y]),g),y=s.insert(()=>v,`:first-child`);return y.attr(`class`,`basic label-container outer-path`),m&&t.look!==`handDrawn`&&y.selectAll(`path`).attr(`style`,m),r&&t.look!==`handDrawn`&&y.selectAll(`path`).attr(`style`,r),y.attr(`transform`,`translate(0,${-f/2})`),l.attr(`transform`,`translate(${-u/2+(t.padding??0)+u/2*.1/2-(c.x-(c.left??0))},${-d/2+(t.padding??0)-f/2-(c.y-(c.top??0))})`),Y(t,y),t.intersect=function(e){return Q.polygon(t,_,e)},s}i(ph,`linedWaveEdgedRect`);async function mh(e,t){let{labelStyles:n,nodeStyles:r}=W(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?12:i,s=t.look===`neo`?10:5;(t.width||t.height)&&(t.width=Math.max((t?.width??0)-a*2-2*s,10),t.height=Math.max((t?.height??0)-o*2-2*s,10));let{shapeSvg:c,bbox:l,label:u}=await J(e,t,X(t)),d=(t?.width?t?.width:l.width)+a*2+2*s,f=(t?.height?t?.height:l.height)+o*2+2*s,p=d-2*s,m=f-2*s,h=-p/2,g=-m/2,{cssStyles:_}=t,v=q.svg(c),y=G(t,{}),b=[{x:h-s,y:g+s},{x:h-s,y:g+m+s},{x:h+p-s,y:g+m+s},{x:h+p-s,y:g+m},{x:h+p,y:g+m},{x:h+p,y:g+m-s},{x:h+p+s,y:g+m-s},{x:h+p+s,y:g-s},{x:h+s,y:g-s},{x:h+s,y:g},{x:h,y:g},{x:h,y:g+s}],x=[{x:h,y:g+s},{x:h+p-s,y:g+s},{x:h+p-s,y:g+m},{x:h+p,y:g+m},{x:h+p,y:g},{x:h,y:g}];t.look!==`handDrawn`&&(y.roughness=0,y.fillStyle=`solid`);let S=Z(b),C=v.path(S,y),w=Z(x),T=v.path(w,y);t.look!==`handDrawn`&&(C=Ip(C),T=Ip(T));let E=c.insert(`g`,`:first-child`);return E.insert(()=>C),E.insert(()=>T),E.attr(`class`,`basic label-container outer-path`),_&&t.look!==`handDrawn`&&E.selectAll(`path`).attr(`style`,_),r&&t.look!==`handDrawn`&&E.selectAll(`path`).attr(`style`,r),u.attr(`transform`,`translate(${-(l.width/2)-s-(l.x-(l.left??0))}, ${-(l.height/2)+s-(l.y-(l.top??0))})`),Y(t,E),t.intersect=function(e){return Q.polygon(t,b,e)},c}i(mh,`multiRect`);async function hh(e,t){let{labelStyles:n,nodeStyles:r}=W(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,label:o}=await J(e,t,X(t)),s=t.padding??0,c=t.look===`neo`?16:s,l=t.look===`neo`?12:s,u=!0;(t.width||t.height)&&(u=!1,t.width=(t?.width??0)-c*2,t.height=(t?.height??0)-l*3);let d=Math.max(a.width,t?.width??0)+c*2,f=Math.max(a.height,t?.height??0)+l*3,p=t.look===`neo`?f/4:f/8,m=f+(u?p/2:-p/2),h=-d/2,g=-m/2,{cssStyles:_}=t,v=Pp(h-10,g+m+10,h+d-10,g+m+10,p,.8),y=v?.[v.length-1],b=[{x:h-10,y:g+10},{x:h-10,y:g+m+10},...v,{x:h+d-10,y:y.y-10},{x:h+d,y:y.y-10},{x:h+d,y:y.y-20},{x:h+d+10,y:y.y-20},{x:h+d+10,y:g-10},{x:h+10,y:g-10},{x:h+10,y:g},{x:h,y:g},{x:h,y:g+10}],x=[{x:h,y:g+10},{x:h+d-10,y:g+10},{x:h+d-10,y:y.y-10},{x:h+d,y:y.y-10},{x:h+d,y:g},{x:h,y:g}],S=q.svg(i),C=G(t,{});t.look!==`handDrawn`&&(C.roughness=0,C.fillStyle=`solid`);let w=Z(b),T=S.path(w,C),E=Z(x),D=S.path(E,C),O=i.insert(()=>T,`:first-child`);return O.insert(()=>D),O.attr(`class`,`basic label-container outer-path`),_&&t.look!==`handDrawn`&&O.selectAll(`path`).attr(`style`,_),r&&t.look!==`handDrawn`&&O.selectAll(`path`).attr(`style`,r),O.attr(`transform`,`translate(0,${-p/2})`),o.attr(`transform`,`translate(${-(a.width/2)-10-(a.x-(a.left??0))}, ${-(a.height/2)+10-p/2-(a.y-(a.top??0))})`),Y(t,O),t.intersect=function(e){return Q.polygon(t,b,e)},i}i(hh,`multiWaveEdgedRectangle`);async function gh(e,t,{config:{themeVariables:n}}){let{labelStyles:r,nodeStyles:i}=W(t);t.labelStyle=r,t.useHtmlLabels||Gn(z())||(t.centerLabel=!0);let{shapeSvg:a,bbox:o,label:s}=await J(e,t,X(t)),c=Math.max(o.width+(t.padding??0)*2,t?.width??0),l=Math.max(o.height+(t.padding??0)*2,t?.height??0),u=-c/2,d=-l/2,{cssStyles:f}=t,p=q.svg(a),m=G(t,{fill:n.noteBkgColor,stroke:n.noteBorderColor});t.look!==`handDrawn`&&(m.roughness=0,m.fillStyle=`solid`);let h=p.rectangle(u,d,c,l,m),g=a.insert(()=>h,`:first-child`);return g.attr(`class`,`basic label-container outer-path`),s.attr(`class`,`label noteLabel`),f&&t.look!==`handDrawn`&&g.selectAll(`path`).attr(`style`,f),i&&t.look!==`handDrawn`&&g.selectAll(`path`).attr(`style`,i),s.attr(`transform`,`translate(${-o.width/2-(o.x-(o.left??0))}, ${-(o.height/2)-(o.y-(o.top??0))})`),Y(t,g),t.intersect=function(e){return Q.rect(t,e)},a}i(gh,`note`);var _h=i((e,t,n)=>[`M${e+n/2},${t}`,`L${e+n},${t-n/2}`,`L${e+n/2},${t-n}`,`L${e},${t-n/2}`,`Z`].join(` `),`createDecisionBoxPathD`);async function vh(e,t){let{labelStyles:n,nodeStyles:r}=W(t);t.labelStyle=n;let{shapeSvg:i,bbox:a}=await J(e,t,X(t)),o=a.width+(t.padding??0)+(a.height+(t.padding??0)),s=.5,c=[{x:o/2,y:0},{x:o,y:-o/2},{x:o/2,y:-o},{x:0,y:-o/2}],l,{cssStyles:u}=t;if(t.look===`handDrawn`){let e=q.svg(i),n=G(t,{}),r=_h(0,0,o),a=e.path(r,n);l=i.insert(()=>a,`:first-child`).attr(`transform`,`translate(${-o/2+s}, ${o/2})`),u&&l.attr(`style`,u)}else l=om(i,o,o,c),l.attr(`transform`,`translate(${-o/2+s}, ${o/2})`);return r&&l.attr(`style`,r),Y(t,l),t.calcIntersect=function(e,t){let n=e.width,r=[{x:n/2,y:0},{x:n,y:-n/2},{x:n/2,y:-n},{x:0,y:-n/2}],i=Q.polygon(e,r,t);return{x:i.x-.5,y:i.y-.5}},t.intersect=function(e){return this.calcIntersect(t,e)},i}i(vh,`question`);async function yh(e,t){let{labelStyles:n,nodeStyles:r}=W(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?21:i??0,o=t.look===`neo`?12:i??0,{shapeSvg:s,bbox:c,label:l}=await J(e,t,X(t)),u=c.width+(t.look===`neo`?a*2:a),d=Math.max(c.height+(t.look===`neo`?o*2:o),t.height??0),f=d/4,p=-Math.max(u,(t.width??0)-f)/2,m=-d/2,h=m/2,g=[{x:p+h,y:m},{x:p,y:0},{x:p+h,y:-m},{x:-p,y:-m},{x:-p,y:m}],{cssStyles:_}=t,v=q.svg(s),y=G(t,{});t.look!==`handDrawn`&&(y.roughness=0,y.fillStyle=`solid`);let b=Z(g),x=v.path(b,y),S=s.insert(()=>x,`:first-child`);return S.attr(`class`,`basic label-container outer-path`),_&&t.look!==`handDrawn`&&S.selectAll(`path`).attr(`style`,_),r&&t.look!==`handDrawn`&&S.selectAll(`path`).attr(`style`,r),S.attr(`transform`,`translate(${-h/2},0)`),l.attr(`transform`,`translate(${-h/2-c.width/2-(c.x-(c.left??0))}, ${-(c.height/2)-(c.y-(c.top??0))})`),Y(t,S),t.intersect=function(e){return Q.polygon(t,g,e)},s}i(yh,`rect_left_inv_arrow`);async function bh(e,t){let{labelStyles:n,nodeStyles:r}=W(t);t.labelStyle=n;let i;i=t.cssClasses?`node `+t.cssClasses:`node default`;let a=e.insert(`g`).attr(`class`,i).attr(`id`,t.domId||t.id),o=a.insert(`g`),s=a.insert(`g`).attr(`class`,`label`).attr(`style`,r),c=t.description,u=await zp(s,t.label,t.labelStyle,!0,!0),d={width:0,height:0};if(Gn(B())){let e=u.children[0],t=V(u);d=e.getBoundingClientRect(),t.attr(`width`,d.width),t.attr(`height`,d.height)}l.info(`Text 2`,c);let f=c||[],p=u.getBBox(),m=await zp(s,Array.isArray(f)?f.join(`<br/>`):f,t.labelStyle,!0,!0),h=m.children[0],g=V(m);d=h.getBoundingClientRect(),g.attr(`width`,d.width),g.attr(`height`,d.height);let _=(t.padding||0)/2;V(m).attr(`transform`,`translate( `+(d.width>p.width?0:(p.width-d.width)/2)+`, `+(p.height+_+5)+`)`),V(u).attr(`transform`,`translate( `+(d.width<p.width?0:-(p.width-d.width)/2)+`, 0)`),d=s.node().getBBox(),s.attr(`transform`,`translate(`+-d.width/2+`, `+(-d.height/2-_+3)+`)`);let v=d.width+(t.padding||0),y=d.height+(t.padding||0),b=-d.width/2-_,x=-d.height/2-_,S,C;if(t.look===`handDrawn`){let e=q.svg(a),n=G(t,{}),r=e.path(Rp(b,x,v,y,t.rx||0),n),i=e.line(-d.width/2-_,-d.height/2-_+p.height+_,d.width/2+_,-d.height/2-_+p.height+_,n);C=a.insert(()=>(l.debug(`Rough node insert CXC`,r),i),`:first-child`),S=a.insert(()=>(l.debug(`Rough node insert CXC`,r),r),`:first-child`)}else S=o.insert(`rect`,`:first-child`),C=o.insert(`line`),S.attr(`class`,`outer title-state`).attr(`style`,r).attr(`x`,-d.width/2-_).attr(`y`,-d.height/2-_).attr(`width`,d.width+(t.padding||0)).attr(`height`,d.height+(t.padding||0)),C.attr(`class`,`divider`).attr(`x1`,-d.width/2-_).attr(`x2`,d.width/2+_).attr(`y1`,-d.height/2-_+p.height+_).attr(`y2`,-d.height/2-_+p.height+_);return Y(t,S),t.intersect=function(e){return Q.rect(t,e)},a}i(bh,`rectWithTitle`);async function xh(e,t,{config:{themeVariables:n}}){let r=n?.radius??5;return Lm(e,t,{rx:r,ry:r,classes:``,labelPaddingX:(t?.padding??0)*1,labelPaddingY:(t?.padding??0)*1})}i(xh,`roundedRect`);var Sh=8;async function Ch(e,t){let{labelStyles:n,nodeStyles:r}=W(t);t.labelStyle=n;let i=t.look===`neo`?16:t.padding??0,a=t.look===`neo`?12:t.padding??0,{shapeSvg:o,bbox:s,label:c}=await J(e,t,X(t)),l=(t?.width??s.width)+i*2+(t.look===`neo`?Sh:Sh*2),u=(t?.height??s.height)+a*2,d=l-Sh,f=u,p=Sh-l/2,m=-u/2,{cssStyles:h}=t,g=q.svg(o),_=G(t,{});t.look!==`handDrawn`&&(_.roughness=0,_.fillStyle=`solid`);let v=[{x:p,y:m},{x:p+d,y:m},{x:p+d,y:m+f},{x:p-Sh,y:m+f},{x:p-Sh,y:m},{x:p,y:m},{x:p,y:m+f}],y=g.polygon(v.map(e=>[e.x,e.y]),_),b=o.insert(()=>y,`:first-child`);return b.attr(`class`,`basic label-container outer-path`).attr(`style`,lu(h)),r&&t.look!==`handDrawn`&&b.selectAll(`path`).attr(`style`,r),h&&t.look!==`handDrawn`&&b.selectAll(`path`).attr(`style`,r),c.attr(`transform`,`translate(${Sh/2-s.width/2-(s.x-(s.left??0))}, ${-(s.height/2)-(s.y-(s.top??0))})`),Y(t,b),t.intersect=function(e){return Q.rect(t,e)},o}i(Ch,`shadedProcess`);async function wh(e,t){let{labelStyles:n,nodeStyles:r}=W(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?12:i;(t.width||t.height)&&(t.width=Math.max((t?.width??0)-a*2,10),t.height=Math.max((t?.height??0)/1.5-o*2,10));let{shapeSvg:s,bbox:c,label:l}=await J(e,t,X(t)),u=(t?.width?t?.width:c.width)+a*2,d=((t?.height?t?.height:c.height)+o*2)*1.5,f=u,p=d/1.5,m=-f/2,h=-p/2,{cssStyles:g}=t,_=q.svg(s),v=G(t,{});t.look!==`handDrawn`&&(v.roughness=0,v.fillStyle=`solid`);let y=[{x:m,y:h},{x:m,y:h+p},{x:m+f,y:h+p},{x:m+f,y:h-p/2}],b=Z(y),x=_.path(b,v),S=s.insert(()=>x,`:first-child`);return S.attr(`class`,`basic label-container outer-path`),g&&t.look!==`handDrawn`&&S.selectChildren(`path`).attr(`style`,g),r&&t.look!==`handDrawn`&&S.selectChildren(`path`).attr(`style`,r),S.attr(`transform`,`translate(0, ${p/4})`),l.attr(`transform`,`translate(${-f/2+(t.padding??0)-(c.x-(c.left??0))}, ${-p/4+(t.padding??0)-(c.y-(c.top??0))})`),Y(t,S),t.intersect=function(e){return Q.polygon(t,y,e)},s}i(wh,`slopedRect`);async function Th(e,t){let n=t.padding??0,r=t.look===`neo`?16:n*2,i=t.look===`neo`?12:n;return Lm(e,t,{rx:0,ry:0,classes:``,labelPaddingX:t.labelPaddingX??r,labelPaddingY:i})}i(Th,`squareRect`);async function Eh(e,t){let{labelStyles:n,nodeStyles:r}=W(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?20:i,o=t.look===`neo`?12:i,{shapeSvg:s,bbox:c}=await J(e,t,X(t)),l=c.height+(t.look===`neo`?o*2:o),u=c.width+l/4+(t.look===`neo`?a*2:a),d=l/2,{cssStyles:f}=t,p=q.svg(s),m=G(t,{});t.look!==`handDrawn`&&(m.roughness=0,m.fillStyle=`solid`);let h=[{x:-u/2+d,y:-l/2},{x:u/2-d,y:-l/2},...Fp(-u/2+d,0,d,50,90,270),{x:u/2-d,y:l/2},...Fp(u/2-d,0,d,50,270,450)],g=Z(h),_=p.path(g,m),v=s.insert(()=>_,`:first-child`);return v.attr(`class`,`basic label-container outer-path`),f&&t.look!==`handDrawn`&&v.selectChildren(`path`).attr(`style`,f),r&&t.look!==`handDrawn`&&v.selectChildren(`path`).attr(`style`,r),Y(t,v),t.intersect=function(e){return Q.polygon(t,h,e)},s}i(Eh,`stadium`);async function Dh(e,t){return Lm(e,t,{rx:t.look===`neo`?3:5,ry:t.look===`neo`?3:5,classes:`flowchart-node`})}i(Dh,`state`);function Oh(e,t,{config:{themeVariables:n}}){let{labelStyles:r,nodeStyles:i}=W(t);t.labelStyle=r;let{cssStyles:a}=t,{lineColor:o,stateBorder:s,nodeBorder:c,nodeShadow:l}=n;(t.width||t.height)&&((t.width??0)<14&&(t.width=14),(t.height??0)<14&&(t.height=14)),t.width||=14,t.height||=14;let u=e.insert(`g`).attr(`class`,`node default`).attr(`id`,t.domId??t.id),d=q.svg(u),f=G(t,{});t.look!==`handDrawn`&&(f.roughness=0,f.fillStyle=`solid`);let p=d.circle(0,0,t.width,{...f,stroke:o,strokeWidth:2}),m=s??c,h=(t.width??0)*5/14,g=d.circle(0,0,h,{...f,fill:m,stroke:m,strokeWidth:2,fillStyle:`solid`}),_=u.insert(()=>p,`:first-child`);if(_.insert(()=>g),t.look!==`handDrawn`&&_.attr(`class`,`outer-path`),a&&_.selectAll(`path`).attr(`style`,a),i&&_.selectAll(`path`).attr(`style`,i),t.width<25&&l&&t.look!==`handDrawn`){let t=e.node()?.ownerSVGElement?.id??``,n=t?`${t}-drop-shadow-small`:`drop-shadow-small`;_.attr(`style`,`filter:url(#${n})`)}return Y(t,_),t.intersect=function(e){return Q.circle(t,(t.width??0)/2,e)},u}i(Oh,`stateEnd`);function kh(e,t,{config:{themeVariables:n}}){let{lineColor:r,nodeShadow:i}=n;(t.width||t.height)&&((t.width??0)<14&&(t.width=14),(t.height??0)<14&&(t.height=14)),t.width||=14,t.height||=14;let a=e.insert(`g`).attr(`class`,`node default`).attr(`id`,t.domId||t.id),o;if(t.look===`handDrawn`){let e=q.svg(a).circle(0,0,t.width,gf(r));o=a.insert(()=>e),o.attr(`class`,`state-start`).attr(`r`,(t.width??7)/2).attr(`width`,t.width??14).attr(`height`,t.height??14)}else o=a.insert(`circle`,`:first-child`),o.attr(`class`,`state-start`).attr(`r`,(t.width??7)/2).attr(`width`,t.width??14).attr(`height`,t.height??14);if(t.width<25&&i&&t.look!==`handDrawn`){let t=e.node()?.ownerSVGElement?.id??``,n=t?`${t}-drop-shadow-small`:`drop-shadow-small`;o.attr(`style`,`filter:url(#${n})`)}return Y(t,o),t.intersect=function(e){return Q.circle(t,(t.width??7)/2,e)},a}i(kh,`stateStart`);var Ah=8;async function jh(e,t){let{labelStyles:n,nodeStyles:r}=W(t);t.labelStyle=n;let i=t?.padding??8,a=t.look===`neo`?28:i,o=t.look===`neo`?12:i,{shapeSvg:s,bbox:c}=await J(e,t,X(t)),l=Math.max(c.width+2*Ah+a,t.width??0),u=Math.max(c.height+o,t.height??0),d=l-2*Ah,f=u,p=-l/2,m=-u/2,h=[{x:0,y:0},{x:d,y:0},{x:d,y:-f},{x:0,y:-f},{x:0,y:0},{x:-8,y:0},{x:d+8,y:0},{x:d+8,y:-f},{x:-8,y:-f},{x:-8,y:0}];if(t.look===`handDrawn`){let e=q.svg(s),n=G(t,{}),r=e.rectangle(p,m,d+16,f,n),i=e.line(p+Ah,m,p+Ah,m+f,n),a=e.line(p+Ah+d,m,p+Ah+d,m+f,n);s.insert(()=>i,`:first-child`),s.insert(()=>a,`:first-child`);let o=s.insert(()=>r,`:first-child`),{cssStyles:c}=t;o.attr(`class`,`basic label-container`).attr(`style`,lu(c)),Y(t,o)}else{let e=om(s,d,f,h);r&&e.attr(`style`,r),Y(t,e)}return t.intersect=function(e){return Q.polygon(t,h,e)},s}i(jh,`subroutine`);var Mh=.2;async function Nh(e,t){let{labelStyles:n,nodeStyles:r}=W(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?12:i;(t.width||t.height)&&(t.height=Math.max((t?.height??0)-o*2,10),t.width=Math.max((t?.width??0)-a*2-Mh*(t.height+o*2),10));let{shapeSvg:s,bbox:c}=await J(e,t,X(t)),l=(t?.height?t?.height:c.height)+o*2,u=Mh*l,d=Mh*l,f=(t?.width?t?.width:c.width)+a*2+u-u,p=l,m=-f/2,h=-p/2,{cssStyles:g}=t,_=q.svg(s),v=G(t,{}),y=[{x:m-u/2,y:h},{x:m+f+u/2,y:h},{x:m+f+u/2,y:h+p},{x:m-u/2,y:h+p}],b=[{x:m+f-u/2,y:h+p},{x:m+f+u/2,y:h+p},{x:m+f+u/2,y:h+p-d}];t.look!==`handDrawn`&&(v.roughness=0,v.fillStyle=`solid`);let x=Z(y),S=_.path(x,v),C=Z(b),w=_.path(C,{...v,fillStyle:`solid`}),T=s.insert(()=>w,`:first-child`);return T.insert(()=>S,`:first-child`),T.attr(`class`,`basic label-container outer-path`),g&&t.look!==`handDrawn`&&T.selectAll(`path`).attr(`style`,g),r&&t.look!==`handDrawn`&&T.selectAll(`path`).attr(`style`,r),Y(t,T),t.intersect=function(e){return Q.polygon(t,y,e)},s}i(Nh,`taggedRect`);async function Ph(e,t){let{labelStyles:n,nodeStyles:r}=W(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,label:o}=await J(e,t,X(t)),s=Math.max(a.width+(t.padding??0)*2,t?.width??0),c=Math.max(a.height+(t.padding??0)*2,t?.height??0),l=c/8,u=.2*s,d=.2*c,f=c+l,{cssStyles:p}=t,m=q.svg(i),h=G(t,{});t.look!==`handDrawn`&&(h.roughness=0,h.fillStyle=`solid`);let g=[{x:-s/2-s/2*.1,y:f/2},...Pp(-s/2-s/2*.1,f/2,s/2+s/2*.1,f/2,l,.8),{x:s/2+s/2*.1,y:-f/2},{x:-s/2-s/2*.1,y:-f/2}],_=-s/2+s/2*.1,v=-f/2-d*.4,y=[{x:_+s-u,y:(v+c)*1.3},{x:_+s,y:v+c-d},{x:_+s,y:(v+c)*.9},...Pp(_+s,(v+c)*1.25,_+s-u,(v+c)*1.3,-c*.02,.5)],b=Z(g),x=m.path(b,h),S=Z(y),C=m.path(S,{...h,fillStyle:`solid`}),w=i.insert(()=>C,`:first-child`);return w.insert(()=>x,`:first-child`),w.attr(`class`,`basic label-container outer-path`),p&&t.look!==`handDrawn`&&w.selectAll(`path`).attr(`style`,p),r&&t.look!==`handDrawn`&&w.selectAll(`path`).attr(`style`,r),w.attr(`transform`,`translate(0,${-l/2})`),o.attr(`transform`,`translate(${-s/2+(t.padding??0)-(a.x-(a.left??0))},${-c/2+(t.padding??0)-l/2-(a.y-(a.top??0))})`),Y(t,w),t.intersect=function(e){return Q.polygon(t,g,e)},i}i(Ph,`taggedWaveEdgedRectangle`);async function Fh(e,t){let{labelStyles:n,nodeStyles:r}=W(t);t.labelStyle=n;let{shapeSvg:i,bbox:a}=await J(e,t,X(t)),o=Math.max(a.width+(t.padding??0),t?.width||0),s=Math.max(a.height+(t.padding??0),t?.height||0),c=-o/2,l=-s/2,u=i.insert(`rect`,`:first-child`);return u.attr(`class`,`text`).attr(`style`,r).attr(`rx`,0).attr(`ry`,0).attr(`x`,c).attr(`y`,l).attr(`width`,o).attr(`height`,s),Y(t,u),t.intersect=function(e){return Q.rect(t,e)},i}i(Fh,`text`);var Ih=i((e,t,n,r,i,a)=>`M${e},${t}
|
|
202
|
+
a${i},${a} 0,0,1 0,${-r}
|
|
203
|
+
l${n},0
|
|
204
|
+
a${i},${a} 0,0,1 0,${r}
|
|
205
|
+
M${n},${-r}
|
|
206
|
+
a${i},${a} 0,0,0 0,${r}
|
|
207
|
+
l${-n},0`,`createCylinderPathD`),Lh=i((e,t,n,r,i,a)=>[`M${e},${t}`,`M${e+n},${t}`,`a${i},${a} 0,0,0 0,${-r}`,`l${-n},0`,`a${i},${a} 0,0,0 0,${r}`,`l${n},0`].join(` `),`createOuterCylinderPathD`),Rh=i((e,t,n,r,i,a)=>[`M${e+n/2},${-r/2}`,`a${i},${a} 0,0,0 0,${r}`].join(` `),`createInnerCylinderPathD`),zh=5,Bh=10;async function Vh(e,t){let{labelStyles:n,nodeStyles:r}=W(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?12:i/2,o=t.height??0;if(t.height&&(t.height-=a,t.height<zh&&(t.height=zh)),t.width){let e=o/2/(2.5+o/50);t.width=t.width-a-e*3,t.width<Bh&&(t.width=Bh)}let{shapeSvg:s,bbox:c,label:l}=await J(e,t,X(t)),u=Math.max(t.height??0,c.height)+a,d=u/2,f=d/(2.5+u/50),p=Math.max(t.width??0,c.width)+f+a,{cssStyles:m}=t,h;if(t.look===`handDrawn`){let e=q.svg(s),n=Lh(0,0,p,u,f,d),r=Rh(0,0,p,u,f,d),i=e.path(n,G(t,{})),a=e.path(r,G(t,{fill:`none`}));h=s.insert(()=>a,`:first-child`),h=s.insert(()=>i,`:first-child`),h.attr(`class`,`basic label-container`),m&&h.attr(`style`,m)}else{let e=Ih(0,0,p,u,f,d);h=s.insert(`path`,`:first-child`).attr(`d`,e).attr(`class`,`basic label-container`).attr(`style`,lu(m)).attr(`style`,r),h.attr(`class`,`basic label-container outer-path`),m&&h.selectAll(`path`).attr(`style`,m),r&&h.selectAll(`path`).attr(`style`,r)}return h.attr(`label-offset-x`,f),h.attr(`transform`,`translate(${-p/2}, ${u/2} )`),l.attr(`transform`,`translate(${-(c.width/2)-f-(c.x-(c.left??0))}, ${-(c.height/2)-(c.y-(c.top??0))})`),Y(t,h),t.intersect=function(e){let n=Q.rect(t,e),r=n.y-(t.y??0);if(d!=0&&(Math.abs(r)<(t.height??0)/2||Math.abs(r)==(t.height??0)/2&&Math.abs(n.x-(t.x??0))>(t.width??0)/2-f)){let i=f*f*(1-r*r/(d*d));i!=0&&(i=Math.sqrt(Math.abs(i))),i=f-i,e.x-(t.x??0)>0&&(i=-i),n.x+=i}return n},s}i(Vh,`tiltedCylinder`);async function Hh(e,t){let{labelStyles:n,nodeStyles:r}=W(t);t.labelStyle=n;let i=t.padding??0,a=(t.look,i),o=t.look===`neo`?i*2:i,{shapeSvg:s,bbox:c}=await J(e,t,X(t)),l=Math.max(c.height+a,t.height??0),u=Math.max(c.width+o,(t.width??0)-l),d=[{x:-3*l/6,y:0},{x:u+3*l/6,y:0},{x:u,y:-l},{x:0,y:-l}],f,{cssStyles:p}=t;if(t.look===`handDrawn`){let e=q.svg(s),n=G(t,{}),r=Z(d),i=e.path(r,n);f=s.insert(()=>i,`:first-child`).attr(`transform`,`translate(${-u/2}, ${l/2})`),p&&f.attr(`style`,p)}else f=om(s,u,l,d);return r&&f.attr(`style`,r),t.width=u,t.height=l,Y(t,f),t.intersect=function(e){return Q.polygon(t,d,e)},s}i(Hh,`trapezoid`);async function Uh(e,t){let{labelStyles:n,nodeStyles:r}=W(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?12:i;(t.width||t.height)&&(t.height=(t.height??0)-o*2,t.height<5&&(t.height=5),t.width=(t.width??0)-a*2,t.width<15&&(t.width=15));let{shapeSvg:s,bbox:c}=await J(e,t,X(t)),l=(t?.width?t?.width:c.width)+a*2,u=(t?.height?t?.height:c.height)+o*2,{cssStyles:d}=t,f=q.svg(s),p=G(t,{});t.look!==`handDrawn`&&(p.roughness=0,p.fillStyle=`solid`);let m=[{x:-l/2*.8,y:-u/2},{x:l/2*.8,y:-u/2},{x:l/2,y:-u/2*.6},{x:l/2,y:u/2},{x:-l/2,y:u/2},{x:-l/2,y:-u/2*.6}],h=Z(m),g=f.path(h,p),_=s.insert(()=>g,`:first-child`);return _.attr(`class`,`basic label-container outer-path`),d&&t.look!==`handDrawn`&&_.selectChildren(`path`).attr(`style`,d),r&&t.look!==`handDrawn`&&_.selectChildren(`path`).attr(`style`,r),Y(t,_),t.intersect=function(e){return Q.polygon(t,m,e)},s}i(Uh,`trapezoidalPentagon`);var Wh=10,Gh=10;async function Kh(e,t){let{labelStyles:n,nodeStyles:r}=W(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?i*2:i;(t.width||t.height)&&(t.width=((t?.width??0)-a)/2,t.width<Gh&&(t.width=Gh),t.height=t?.height??0,t.height<Wh&&(t.height=Wh));let{shapeSvg:o,bbox:s,label:c}=await J(e,t,X(t)),u=En(B().flowchart?.htmlLabels),d=(t?.width?t?.width:s.width)+a,f=t?.height?t?.height:d+s.height,p=f,m=[{x:0,y:0},{x:p,y:0},{x:p/2,y:-f}],{cssStyles:h}=t,g=q.svg(o),_=G(t,{});t.look!==`handDrawn`&&(_.roughness=0,_.fillStyle=`solid`);let v=Z(m),y=g.path(v,_),b=o.insert(()=>y,`:first-child`).attr(`transform`,`translate(${-f/2}, ${f/2})`).attr(`class`,`outer-path`);return h&&t.look!==`handDrawn`&&b.selectChildren(`path`).attr(`style`,h),r&&t.look!==`handDrawn`&&b.selectChildren(`path`).attr(`style`,r),t.width=d,t.height=f,Y(t,b),c.attr(`transform`,`translate(${-s.width/2-(s.x-(s.left??0))}, ${f/2-(s.height+(t.padding??0)/(u?2:1)-(s.y-(s.top??0)))})`),t.intersect=function(e){return l.info(`Triangle intersect`,t,m,e),Q.polygon(t,m,e)},o}i(Kh,`triangle`);async function qh(e,t){let{labelStyles:n,nodeStyles:r}=W(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?12:i,s=!0;(t.width||t.height)&&(s=!1,t.width=(t?.width??0)-a*2,t.width<10&&(t.width=10),t.height=(t?.height??0)-o*2,t.height<10&&(t.height=10));let{shapeSvg:c,bbox:l,label:u}=await J(e,t,X(t)),d=(t?.width?t?.width:l.width)+(a??0)*2,f=(t?.height?t?.height:l.height)+(o??0)*2,p=t.look===`neo`?f/4:f/8,m=f+(s?p:-p),{cssStyles:h}=t,g=14-d,_=g>0?g/2:0,v=q.svg(c),y=G(t,{});t.look!==`handDrawn`&&(y.roughness=0,y.fillStyle=`solid`);let b=[{x:-d/2-_,y:m/2},...Pp(-d/2-_,m/2,d/2+_,m/2,p,.8),{x:d/2+_,y:-m/2},{x:-d/2-_,y:-m/2}],x=Z(b),S=v.path(x,y),C=c.insert(()=>S,`:first-child`);return C.attr(`class`,`basic label-container outer-path`),h&&t.look!==`handDrawn`&&C.selectAll(`path`).attr(`style`,h),r&&t.look!==`handDrawn`&&C.selectAll(`path`).attr(`style`,r),C.attr(`transform`,`translate(0,${-p/2})`),u.attr(`transform`,`translate(${-d/2+(t.padding??0)-(l.x-(l.left??0))},${-f/2+(t.padding??0)-p-(l.y-(l.top??0))})`),Y(t,C),t.intersect=function(e){return Q.polygon(t,b,e)},c}i(qh,`waveEdgedRectangle`);async function Jh(e,t){let{labelStyles:n,nodeStyles:r}=W(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?20:i;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);let e=Math.min(t.height*.2,t.height/4);t.height=Math.ceil(t.height-o-20/9*e),t.width-=a*2}let{shapeSvg:s,bbox:c}=await J(e,t,X(t)),l=(t?.width?t?.width:c.width)+a*2,u=(t?.height?t?.height:c.height)+o,d=u/8,f=u+d*2,{cssStyles:p}=t,m=q.svg(s),h=G(t,{});t.look!==`handDrawn`&&(h.roughness=0,h.fillStyle=`solid`);let g=[{x:-l/2,y:f/2},...Pp(-l/2,f/2,l/2,f/2,d,1),{x:l/2,y:-f/2},...Pp(l/2,-f/2,-l/2,-f/2,d,-1)],_=Z(g),v=m.path(_,h),y=s.insert(()=>v,`:first-child`);return y.attr(`class`,`basic label-container`),p&&t.look!==`handDrawn`&&y.selectAll(`path`).attr(`style`,p),r&&t.look!==`handDrawn`&&y.selectAll(`path`).attr(`style`,r),Y(t,y),t.intersect=function(e){return Q.polygon(t,g,e)},s}i(Jh,`waveRectangle`);var Yh=10;async function Xh(e,t){let{labelStyles:n,nodeStyles:r}=W(t);t.labelStyle=n;let i=t.look===`neo`?16:t.padding??0,a=t.look===`neo`?12:t.padding??0;(t.width||t.height)&&(t.width=Math.max((t?.width??0)-i*2-Yh,10),t.height=Math.max((t?.height??0)-a*2-Yh,10));let{shapeSvg:o,bbox:s,label:c}=await J(e,t,X(t)),l=(t?.width?t?.width:s.width)+i*2+Yh,u=(t?.height?t?.height:s.height)+a*2+Yh,d=l-Yh,f=u-Yh,p=-d/2,m=-f/2,{cssStyles:h}=t,g=q.svg(o),_=G(t,{}),v=[{x:p-Yh,y:m-Yh},{x:p-Yh,y:m+f},{x:p+d,y:m+f},{x:p+d,y:m-Yh}],y=`M${p-Yh},${m-Yh} L${p+d},${m-Yh} L${p+d},${m+f} L${p-Yh},${m+f} L${p-Yh},${m-Yh}
|
|
208
|
+
M${p-Yh},${m} L${p+d},${m}
|
|
209
|
+
M${p},${m-Yh} L${p},${m+f}`;t.look!==`handDrawn`&&(_.roughness=0,_.fillStyle=`solid`);let b=g.path(y,_),x=o.insert(()=>b,`:first-child`);return x.attr(`transform`,`translate(${Yh/2}, ${Yh/2})`),x.attr(`class`,`basic label-container outer-path`),h&&t.look!==`handDrawn`&&x.selectAll(`path`).attr(`style`,h),r&&t.look!==`handDrawn`&&x.selectAll(`path`).attr(`style`,r),c.attr(`transform`,`translate(${-(s.width/2)+Yh/2-(s.x-(s.left??0))}, ${-(s.height/2)+Yh/2-(s.y-(s.top??0))})`),Y(t,x),t.intersect=function(e){return Q.polygon(t,v,e)},o}i(Xh,`windowPane`);var Zh=new Set([`redux-color`,`redux-dark-color`]),Qh=new Set([`redux`,`redux-dark`,`redux-color`,`redux-dark-color`]);async function $h(e,t){let n=t;n.alias&&(t.label=n.alias);let{theme:r,themeVariables:i}=z(),{rowEven:a,rowOdd:o,nodeBorder:s,borderColorArray:c}=i;if(t.look===`handDrawn`){let{themeVariables:n}=z(),{background:r}=n;await $h(e,{...t,id:t.id+`-background`,domId:(t.domId||t.id)+`-background`,look:`default`,cssStyles:[`stroke: none`,`fill: ${r}`]})}let l=z();t.useHtmlLabels=l.htmlLabels;let u=l.er?.diagramPadding??10,d=l.er?.entityPadding??6,{cssStyles:f}=t,{labelStyles:p,nodeStyles:m}=W(t);if(n.attributes.length===0&&t.label){let i={rx:0,ry:0,labelPaddingX:u,labelPaddingY:u*1.5,classes:``};Xl(t.label,l)+i.labelPaddingX*2<l.er.minEntityWidth&&(t.width=l.er.minEntityWidth);let a=await Lm(e,t,i);if(r!=null&&Zh.has(r)){let e=n.colorIndex??0;a.attr(`data-color-id`,`color-${e%c.length}`)}if(!En(l.htmlLabels)){let e=a.select(`text`),t=e.node()?.getBBox();e.attr(`transform`,`translate(${-t.width/2}, 0)`)}return a}l.htmlLabels||(u*=1.25,d*=1.25);let h=X(t);h||=`node default`;let g=e.insert(`g`).attr(`class`,h).attr(`id`,t.domId||t.id),_=await eg(g,t.label??``,l,0,0,[`name`],p);_.height+=d;let v=0,y=[],b=[],x=0,S=0,C=0,w=0,T=!0,E=!0;for(let e of n.attributes){let t=await eg(g,e.type,l,0,v,[`attribute-type`],p);x=Math.max(x,t.width+u);let n=await eg(g,e.name,l,0,v,[`attribute-name`],p);S=Math.max(S,n.width+u);let r=await eg(g,e.keys.join(),l,0,v,[`attribute-keys`],p);C=Math.max(C,r.width+u);let i=await eg(g,e.comment,l,0,v,[`attribute-comment`],p);w=Math.max(w,i.width+u);let a=Math.max(t.height,n.height,r.height,i.height)+d;b.push({yOffset:v,rowHeight:a}),v+=a}let D=4;C<=u&&(T=!1,C=0,D--),w<=u&&(E=!1,w=0,D--);let O=g.node().getBBox();if(_.width+u*2-(x+S+C+w)>0){let e=_.width+u*2-(x+S+C+w);x+=e/D,S+=e/D,C>0&&(C+=e/D),w>0&&(w+=e/D)}let k=x+S+C+w,A=q.svg(g),j=G(t,{});t.look!==`handDrawn`&&(j.roughness=0,j.fillStyle=`solid`);let ee=0;b.length>0&&(ee=b.reduce((e,t)=>e+(t?.rowHeight??0),0));let M=Math.max(O.width+u*2,t?.width||0,k),te=Math.max((ee??0)+_.height,t?.height||0),N=-M/2,P=-te/2;if(g.selectAll(`g:not(:first-child)`).each((e,t,n)=>{let r=V(n[t]),i=r.attr(`transform`),a=0,o=0;if(i){let e=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(i);e&&(a=parseFloat(e[1]),o=parseFloat(e[2]),r.attr(`class`).includes(`attribute-name`)?a+=x:r.attr(`class`).includes(`attribute-keys`)?a+=x+S:r.attr(`class`).includes(`attribute-comment`)&&(a+=x+S+C))}r.attr(`transform`,`translate(${N+u/2+a}, ${o+P+_.height+d/2})`)}),g.select(`.name`).attr(`transform`,`translate(`+-_.width/2+`, `+(P+d/2)+`)`),r!=null&&Zh.has(r)){let e=n.colorIndex??0;g.attr(`data-color-id`,`color-${e%c.length}`)}let ne=A.rectangle(N,P,M,te,j),re=g.insert(()=>ne,`:first-child`).attr(`class`,`outer-path`).attr(`style`,f.join(``));y.push(0);for(let[e,t]of b.entries()){let n=(e+1)%2==0&&t.yOffset!==0,r=A.rectangle(N,_.height+P+t?.yOffset,M,t?.rowHeight,{...j,fill:n?a:o,stroke:s});g.insert(()=>r,`g.label`).attr(`style`,f.join(``)).attr(`class`,`row-rect-${n?`even`:`odd`}`)}let F=1e-4,ie=tg(N,_.height+P,M+N,_.height+P,F),ae=A.polygon(ie.map(e=>[e.x,e.y]),j);if(g.insert(()=>ae).attr(`class`,`divider`),ie=tg(x+N,_.height+P,x+N,te+P,F),ae=A.polygon(ie.map(e=>[e.x,e.y]),j),g.insert(()=>ae).attr(`class`,`divider`),T){let e=x+S+N;ie=tg(e,_.height+P,e,te+P,F),ae=A.polygon(ie.map(e=>[e.x,e.y]),j),g.insert(()=>ae).attr(`class`,`divider`)}if(E){let e=x+S+C+N;ie=tg(e,_.height+P,e,te+P,F),ae=A.polygon(ie.map(e=>[e.x,e.y]),j),g.insert(()=>ae).attr(`class`,`divider`)}for(let e of y){let t=_.height+P+e;ie=tg(N,t,M+N,t,F),ae=A.polygon(ie.map(e=>[e.x,e.y]),j),g.insert(()=>ae).attr(`class`,`divider`)}if(Y(t,re),m&&t.look!==`handDrawn`){if(r!=null&&Qh.has(r))g.selectAll(`path`).attr(`style`,m);else{let e=m.split(`;`)?.filter(e=>e.includes(`stroke`))?.map(e=>`${e}`).join(`; `);g.selectAll(`path`).attr(`style`,e??``),g.selectAll(`.row-rect-even path`).attr(`style`,m)}}return t.intersect=function(e){return Q.rect(t,e)},g}i($h,`erBox`);async function eg(e,t,n,r=0,i=0,a=[],o=``){let s=e.insert(`g`).attr(`class`,`label ${a.join(` `)}`).attr(`transform`,`translate(${r}, ${i})`).attr(`style`,o);t!==gr(t)&&(t=gr(t),t=t.replaceAll(`<`,`<`).replaceAll(`>`,`>`));let c=s.node().appendChild(await hf(s,t,{width:Xl(t,n)+100,style:o,useHtmlLabels:n.htmlLabels},n));if(t.includes(`<`)||t.includes(`>`)){let e=c.children[0];for(e.textContent=e.textContent.replaceAll(`<`,`<`).replaceAll(`>`,`>`);e.childNodes[0];)e=e.childNodes[0],e.textContent=e.textContent.replaceAll(`<`,`<`).replaceAll(`>`,`>`)}let l=c.getBBox();if(En(n.htmlLabels)){let e=c.children[0];e.style.textAlign=`start`;let t=V(c);l=e.getBoundingClientRect(),t.attr(`width`,l.width),t.attr(`height`,l.height)}return l}i(eg,`addText`);function tg(e,t,n,r,i){return e===n?[{x:e-i/2,y:t},{x:e+i/2,y:t},{x:n+i/2,y:r},{x:n-i/2,y:r}]:[{x:e,y:t-i/2},{x:e,y:t+i/2},{x:n,y:r+i/2},{x:n,y:r-i/2}]}i(tg,`lineToPolygon`);async function ng(e,t,n,r,i=n.class.padding??12){let a=r?0:3,o=e.insert(`g`).attr(`class`,X(t)).attr(`id`,t.domId||t.id),s=null,c=null,l=null,u=null,d=0,f=0,p=0;if(s=o.insert(`g`).attr(`class`,`annotation-group text`),t.annotations.length>0){let e=t.annotations[0];await rg(s,{text:`\xAB${e}\xBB`},0),d=s.node().getBBox().height}c=o.insert(`g`).attr(`class`,`label-group text`),await rg(c,t,0,[`font-weight: bolder`]);let m=c.node().getBBox();f=m.height,l=o.insert(`g`).attr(`class`,`members-group text`);let h=0;for(let e of t.members){let t=await rg(l,e,h,[e.parseClassifier()]);h+=t+a}p=l.node().getBBox().height,p<=0&&(p=i/2),u=o.insert(`g`).attr(`class`,`methods-group text`);let g=0;for(let e of t.methods){let t=await rg(u,e,g,[e.parseClassifier()]);g+=t+a}let _=o.node().getBBox();if(s!==null){let e=s.node().getBBox();s.attr(`transform`,`translate(${-e.width/2})`)}return c.attr(`transform`,`translate(${-m.width/2}, ${d})`),_=o.node().getBBox(),l.attr(`transform`,`translate(0, ${d+f+i*2})`),_=o.node().getBBox(),u.attr(`transform`,`translate(0, ${d+f+(p?p+i*4:i*2)})`),_=o.node().getBBox(),{shapeSvg:o,bbox:_}}i(ng,`textHelper`);async function rg(e,t,n,r=[]){let i=e.insert(`g`).attr(`class`,`label`).attr(`style`,r.join(`; `)),a=z(),o=`useHtmlLabels`in t?t.useHtmlLabels:En(a.htmlLabels)??!0,s=``;s=`text`in t?t.text:t.label,!o&&s.startsWith(`\\`)&&(s=s.substring(1)),Sr(s)&&(o=!0);let c=await hf(i,Qr(su(s)),{width:Xl(s,a)+50,classes:`markdown-node-label`,useHtmlLabels:o},a),l,u=1;if(o){let e=c.children[0],t=V(c);u=e.innerHTML.split(`<br>`).length,e.innerHTML.includes(`</math>`)&&(u+=e.innerHTML.split(`<mrow>`).length-1),await Op(e),l=e.getBoundingClientRect(),t.attr(`width`,l.width),t.attr(`height`,l.height)}else{r.includes(`font-weight: bolder`)&&V(c).selectAll(`tspan`).attr(`font-weight`,``),u=c.children.length;let e=c.children[0];(c.textContent===``||c.textContent.includes(`>`))&&(e.textContent=s[0]+s.substring(1).replaceAll(`>`,`>`).replaceAll(`<`,`<`).trim(),s[1]===` `&&(e.textContent=e.textContent[0]+` `+e.textContent.substring(1))),e.textContent===`undefined`&&(e.textContent=``),l=c.getBBox()}return i.attr(`transform`,`translate(0,`+(-l.height/(2*u)+n)+`)`),l.height}i(rg,`addText`);async function ig(e,t){let n=B(),{themeVariables:r}=n,{useGradient:i}=r,a=n.class.padding??12,o=a,s=t.useHtmlLabels??En(n.htmlLabels)??!0,c=t;c.annotations=c.annotations??[],c.members=c.members??[],c.methods=c.methods??[];let{shapeSvg:l,bbox:u}=await ng(e,t,n,s,o),{labelStyles:d,nodeStyles:f}=W(t);t.labelStyle=d,t.cssStyles=c.styles||``;let p=c.styles?.join(`;`)||f||``;t.cssStyles||=p.replaceAll(`!important`,``).split(`;`);let m=c.members.length===0&&c.methods.length===0&&!n.class?.hideEmptyMembersBox,h=q.svg(l),g=G(t,{});t.look!==`handDrawn`&&(g.roughness=0,g.fillStyle=`solid`);let _=Math.max(t.width??0,u.width),v=Math.max(t.height??0,u.height),y=(t.height??0)>u.height;c.members.length===0&&c.methods.length===0?v+=o:c.members.length>0&&c.methods.length===0&&(v+=o*2);let b=-_/2,x=-v/2,S=m?a*2:c.members.length===0&&c.methods.length===0?-a:0;y&&(S=a*2);let C=h.rectangle(b-a,x-a-(m?a:c.members.length===0&&c.methods.length===0?-a/2:0),_+2*a,v+2*a+S,g),w=l.insert(()=>C,`:first-child`);w.attr(`class`,`basic label-container outer-path`);let T=w.node().getBBox(),E=l.select(`.annotation-group`).node().getBBox().height-(m?a/2:0)||0,D=l.select(`.label-group`).node().getBBox().height-(m?a/2:0)||0,O=l.select(`.members-group`).node().getBBox().height-(m?a/2:0)||0,k=(E+D+x+a-(x-a-(m?a:c.members.length===0&&c.methods.length===0?-a/2:0)))/2;if(l.selectAll(`.text`).each((e,t,r)=>{let i=V(r[t]),u=i.attr(`transform`),d=0;if(u){let e=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(u);e&&(d=parseFloat(e[2]))}let f=d+x+a-(m?a:c.members.length===0&&c.methods.length===0?-a/2:0);if(i.attr(`class`).includes(`methods-group`)){let e=Math.max(O,o/2);f=y?Math.max(k,E+D+e+x+o*2+a)+o*2:E+D+e+x+o*4+a}c.members.length===0&&c.methods.length===0&&n.class?.hideEmptyMembersBox&&(f=c.annotations.length>0?d-o:d),s||(f-=4);let p=b;(i.attr(`class`).includes(`label-group`)||i.attr(`class`).includes(`annotation-group`))&&(p=-i.node()?.getBBox().width/2||0,l.selectAll(`text`).each(function(e,t,n){window.getComputedStyle(n[t]).textAnchor===`middle`&&(p=0)})),i.attr(`transform`,`translate(${p}, ${f})`)}),c.members.length>0||c.methods.length>0||m){let e=E+D+x+a,n=h.line(T.x,e,T.x+T.width,e+.001,g);l.insert(()=>n).attr(`class`,`divider${t.look===`neo`&&!i?` neo-line`:``}`).attr(`style`,p)}if(m||c.members.length>0||c.methods.length>0){let e=E+D+O+x+o*2+a,n=h.line(T.x,y?Math.max(k,e):e,T.x+T.width,(y?Math.max(k,e):e)+.001,g);l.insert(()=>n).attr(`class`,`divider${t.look===`neo`&&!i?` neo-line`:``}`).attr(`style`,p)}if(c.look!==`handDrawn`&&l.selectAll(`path`).attr(`style`,p),w.select(`:nth-child(2)`).attr(`style`,p),l.selectAll(`.divider`).select(`path`).attr(`style`,p),t.labelStyle?l.selectAll(`span`).attr(`style`,t.labelStyle):l.selectAll(`span`).attr(`style`,p),!s){let e=RegExp(/color\s*:\s*([^;]*)/),t=e.exec(p);if(t){let e=t[0].replace(`color`,`fill`);l.selectAll(`tspan`).attr(`style`,e)}else if(d){let t=e.exec(d);if(t){let e=t[0].replace(`color`,`fill`);l.selectAll(`tspan`).attr(`style`,e)}}}return Y(t,w),t.intersect=function(e){return Q.rect(t,e)},l}i(ig,`classBox`);async function ag(e,t){let{labelStyles:n,nodeStyles:r}=W(t);t.labelStyle=n;let i=t,a=t,o=`verifyMethod`in t,s=X(t),c=B(),{themeVariables:l}=c,{borderColorArray:u,requirementEdgeLabelBackground:d}=l,f=c.layout===`elk`?`start`:`center`,p=e.insert(`g`).attr(`class`,s).attr(`id`,t.domId??t.id),m;m=o?await og(p,`<<${i.type}>>`,0,t.labelStyle):await og(p,`<<Element>>`,0,t.labelStyle);let h=m,g=await og(p,i.name,h,t.labelStyle+`; font-weight: bold;`);if(h+=g+20,o){let e=await og(p,`${i.requirementId?`ID: ${i.requirementId}`:``}`,h,t.labelStyle,f);h+=e;let n=await og(p,`${i.text?`Text: ${i.text}`:``}`,h,t.labelStyle,f);h+=n;let r=await og(p,`${i.risk?`Risk: ${i.risk}`:``}`,h,t.labelStyle,f);h+=r,await og(p,`${i.verifyMethod?`Verification: ${i.verifyMethod}`:``}`,h,t.labelStyle,f)}else{let e=await og(p,`${a.type?`Type: ${a.type}`:``}`,h,t.labelStyle,f);h+=e,await og(p,`${a.docRef?`Doc Ref: ${a.docRef}`:``}`,h,t.labelStyle,f)}let _=(p.node()?.getBBox().width??200)+20,v=(p.node()?.getBBox().height??200)+20,y=-_/2,b=-v/2,x=q.svg(p),S=G(t,{});t.look!==`handDrawn`&&(S.roughness=0,S.fillStyle=`solid`);let C=x.rectangle(y,b,_,v,S),w=p.insert(()=>C,`:first-child`);if(w.attr(`class`,`basic label-container outer-path`).attr(`style`,r),u?.length){let e=t.colorIndex??0;p.attr(`data-color-id`,`color-${e%u.length}`)}if(p.selectAll(`.label`).each((e,t,n)=>{let r=V(n[t]),i=r.attr(`transform`),a=0,o=0;if(i){let e=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(i);e&&(a=parseFloat(e[1]),o=parseFloat(e[2]))}let s=o-v/2,c=y+10;(t===0||t===1)&&(c=a),r.attr(`transform`,`translate(${c}, ${s+20})`)}),h>m+g+20){let e=b+m+g+20,n;if(t.look===`neo`){let t=.001,r=[[y,e],[y+_,e],[y+_,e+t],[y,e+t]];n=x.polygon(r,S)}else n=x.line(y,e,y+_,e,S);p.insert(()=>n).attr(`class`,`divider`)}return Y(t,w),t.intersect=function(e){return Q.rect(t,e)},r&&t.look!==`handDrawn`&&(d||u?.length)&&p.selectAll(`path`).attr(`style`,r),p}i(ag,`requirementBox`);async function og(e,t,n,r=``,i=`center`){if(t===``)return 0;let a=e.insert(`g`).attr(`class`,`label`).attr(`style`,r),o=B(),s=o.htmlLabels??!0,c=await hf(a,Qr(su(t)),{width:Xl(t,o)+50,classes:`markdown-node-label`,useHtmlLabels:s,style:r},o),l;if(s){let e=c.children[0],t=V(c);i===`start`&&V(e).style(`text-align`,`left`),l=e.getBoundingClientRect(),t.attr(`width`,l.width),t.attr(`height`,l.height)}else{let e=c.children[0];for(let t of e.children)r&&t.setAttribute(`style`,r);if(i===`start`){e.setAttribute(`text-anchor`,`start`);for(let t of e.children)t.setAttribute(`text-anchor`,`start`)}l=c.getBBox(),l.height+=6}return a.attr(`transform`,`translate(${-l.width/2},${-l.height/2+n})`),l.height}i(og,`addText`);var sg=i(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 cg(e,t,{config:n}){let{labelStyles:r,nodeStyles:i}=W(t);t.labelStyle=r||``;let a=t.width;t.width=(t.width??200)-10;let{shapeSvg:o,bbox:s,label:c}=await J(e,t,X(t)),l=t.padding||10,u=``,d;`ticket`in t&&t.ticket&&n?.kanban?.ticketBaseUrl&&(u=n?.kanban?.ticketBaseUrl.replace(`#TICKET#`,t.ticket),d=o.insert(`svg:a`,`:first-child`).attr(`class`,`kanban-ticket-link`).attr(`xlink:href`,u).attr(`target`,`_blank`));let f={useHtmlLabels:t.useHtmlLabels,labelStyle:t.labelStyle||``,width:t.width,img:t.img,padding:t.padding||8,centerLabel:!1},p,m;d?{label:p,bbox:m}=await Np(d,`ticket`in t&&t.ticket||``,f):{label:p,bbox:m}=await Np(o,`ticket`in t&&t.ticket||``,f);let{label:h,bbox:g}=await Np(o,`assigned`in t&&t.assigned||``,f);t.width=a;let _=t?.width||0,v=Math.max(m.height,g.height)/2,y=Math.max(s.height+20,t?.height||0)+v,b=-_/2,x=-y/2;c.attr(`transform`,`translate(`+(l-_/2)+`, `+(-v-s.height/2)+`)`),p.attr(`transform`,`translate(`+(l-_/2)+`, `+(-v+s.height/2)+`)`),h.attr(`transform`,`translate(`+(l+_/2-g.width-20)+`, `+(-v+s.height/2)+`)`);let S,{rx:C,ry:w}=t,{cssStyles:T}=t;if(t.look===`handDrawn`){let e=q.svg(o),n=G(t,{}),r=C||w?e.path(Rp(b,x,_,y,C||0),n):e.rectangle(b,x,_,y,n);S=o.insert(()=>r,`:first-child`),S.attr(`class`,`basic label-container`).attr(`style`,T||null)}else{S=o.insert(`rect`,`:first-child`),S.attr(`class`,`basic label-container __APA__`).attr(`style`,i).attr(`rx`,C??5).attr(`ry`,w??5).attr(`x`,b).attr(`y`,x).attr(`width`,_).attr(`height`,y);let e=`priority`in t&&t.priority;if(e){let t=o.append(`line`),n=b+2,r=x+Math.floor((C??0)/2),i=x+y-Math.floor((C??0)/2);t.attr(`x1`,n).attr(`y1`,r).attr(`x2`,n).attr(`y2`,i).attr(`stroke-width`,`4`).attr(`stroke`,sg(e))}}return Y(t,S),t.height=y,t.intersect=function(e){return Q.rect(t,e)},o}i(cg,`kanbanItem`);async function lg(e,t){let{labelStyles:n,nodeStyles:r}=W(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,halfPadding:o,label:s}=await J(e,t,X(t)),c=a.width+10*o,u=a.height+8*o,d=.15*c,{cssStyles:f}=t,p=a.width+20,m=a.height+20,h=Math.max(c,p),g=Math.max(u,m);s.attr(`transform`,`translate(${-a.width/2}, ${-a.height/2})`);let _,v=`M0 0
|
|
210
|
+
a${d},${d} 1 0,0 ${h*.25},${-1*g*.1}
|
|
211
|
+
a${d},${d} 1 0,0 ${h*.25},0
|
|
212
|
+
a${d},${d} 1 0,0 ${h*.25},0
|
|
213
|
+
a${d},${d} 1 0,0 ${h*.25},${g*.1}
|
|
214
|
+
|
|
215
|
+
a${d},${d} 1 0,0 ${h*.15},${g*.33}
|
|
216
|
+
a${d*.8},${d*.8} 1 0,0 0,${g*.34}
|
|
217
|
+
a${d},${d} 1 0,0 ${-1*h*.15},${g*.33}
|
|
218
|
+
|
|
219
|
+
a${d},${d} 1 0,0 ${-1*h*.25},${g*.15}
|
|
220
|
+
a${d},${d} 1 0,0 ${-1*h*.25},0
|
|
221
|
+
a${d},${d} 1 0,0 ${-1*h*.25},0
|
|
222
|
+
a${d},${d} 1 0,0 ${-1*h*.25},${-1*g*.15}
|
|
223
|
+
|
|
224
|
+
a${d},${d} 1 0,0 ${-1*h*.1},${-1*g*.33}
|
|
225
|
+
a${d*.8},${d*.8} 1 0,0 0,${-1*g*.34}
|
|
226
|
+
a${d},${d} 1 0,0 ${h*.1},${-1*g*.33}
|
|
227
|
+
H0 V0 Z`;if(t.look===`handDrawn`){let e=q.svg(i),n=G(t,{}),r=e.path(v,n);_=i.insert(()=>r,`:first-child`),_.attr(`class`,`basic label-container`).attr(`style`,lu(f))}else _=i.insert(`path`,`:first-child`).attr(`class`,`basic label-container`).attr(`style`,r).attr(`d`,v);return _.attr(`transform`,`translate(${-h/2}, ${-g/2})`),Y(t,_),t.calcIntersect=function(e,t){return Q.rect(e,t)},t.intersect=function(e){return l.info(`Bang intersect`,t,e),Q.rect(t,e)},i}i(lg,`bang`);async function ug(e,t){let{labelStyles:n,nodeStyles:r}=W(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,halfPadding:o,label:s}=await J(e,t,X(t)),c=a.width+2*o,u=a.height+2*o,d=.15*c,f=.25*c,p=.35*c,m=.2*c,{cssStyles:h}=t,g,_=`M0 0
|
|
228
|
+
a${d},${d} 0 0,1 ${c*.25},${-1*c*.1}
|
|
229
|
+
a${p},${p} 1 0,1 ${c*.4},${-1*c*.1}
|
|
230
|
+
a${f},${f} 1 0,1 ${c*.35},${c*.2}
|
|
231
|
+
|
|
232
|
+
a${d},${d} 1 0,1 ${c*.15},${u*.35}
|
|
233
|
+
a${m},${m} 1 0,1 ${-1*c*.15},${u*.65}
|
|
234
|
+
|
|
235
|
+
a${f},${d} 1 0,1 ${-1*c*.25},${c*.15}
|
|
236
|
+
a${p},${p} 1 0,1 ${-1*c*.5},0
|
|
237
|
+
a${d},${d} 1 0,1 ${-1*c*.25},${-1*c*.15}
|
|
238
|
+
|
|
239
|
+
a${d},${d} 1 0,1 ${-1*c*.1},${-1*u*.35}
|
|
240
|
+
a${m},${m} 1 0,1 ${c*.1},${-1*u*.65}
|
|
241
|
+
H0 V0 Z`;if(t.look===`handDrawn`){let e=q.svg(i),n=G(t,{}),r=e.path(_,n);g=i.insert(()=>r,`:first-child`),g.attr(`class`,`basic label-container`).attr(`style`,lu(h))}else g=i.insert(`path`,`:first-child`).attr(`class`,`basic label-container`).attr(`style`,r).attr(`d`,_);return s.attr(`transform`,`translate(${-a.width/2}, ${-a.height/2})`),g.attr(`transform`,`translate(${-c/2}, ${-u/2})`),Y(t,g),t.calcIntersect=function(e,t){return Q.rect(e,t)},t.intersect=function(e){return l.info(`Cloud intersect`,t,e),Q.rect(t,e)},i}i(ug,`cloud`);async function dg(e,t){let{labelStyles:n,nodeStyles:r}=W(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,halfPadding:o,label:s}=await J(e,t,X(t)),c=a.width+8*o,l=a.height+2*o,u=t.look===`neo`?`
|
|
242
|
+
M${-c/2} ${l/2-5}
|
|
243
|
+
v${-l+10}
|
|
244
|
+
q0,-5 5,-5
|
|
245
|
+
h${c-10}
|
|
246
|
+
q5,0 5,5
|
|
247
|
+
v${l-5}
|
|
248
|
+
H${-c/2}
|
|
249
|
+
Z
|
|
250
|
+
`:`
|
|
251
|
+
M${-c/2} ${l/2-5}
|
|
252
|
+
v${-l+10}
|
|
253
|
+
q0,-5 5,-5
|
|
254
|
+
h${c-10}
|
|
255
|
+
q5,0 5,5
|
|
256
|
+
v${l-10}
|
|
257
|
+
q0,5 -5,5
|
|
258
|
+
h${-(c-10)}
|
|
259
|
+
q-5,0 -5,-5
|
|
260
|
+
Z
|
|
261
|
+
`;if(!t.domId)throw Error(`defaultMindmapNode: node "${t.id}" is missing a domId \u2014 was render.ts domId prefixing skipped?`);let d=i.append(`path`).attr(`id`,t.domId).attr(`class`,`node-bkg node-`+t.type).attr(`style`,r).attr(`d`,u);return i.append(`line`).attr(`class`,`node-line-`).attr(`x1`,-c/2).attr(`y1`,l/2).attr(`x2`,c/2).attr(`y2`,l/2),s.attr(`transform`,`translate(${-a.width/2}, ${-a.height/2})`),i.append(()=>s.node()),Y(t,d),t.calcIntersect=function(e,t){return Q.rect(e,t)},t.intersect=function(e){return Q.rect(t,e)},i}i(dg,`defaultMindmapNode`);async function fg(e,t){return vm(e,t,{padding:t.padding??0})}i(fg,`mindmapCircle`);var pg=[{semanticName:`Process`,name:`Rectangle`,shortName:`rect`,description:`Standard process shape`,aliases:[`proc`,`process`,`rectangle`],internalAliases:[`squareRect`],handler:Th},{semanticName:`Event`,name:`Rounded Rectangle`,shortName:`rounded`,description:`Represents an event`,aliases:[`event`],internalAliases:[`roundedRect`],handler:xh},{semanticName:`Terminal Point`,name:`Stadium`,shortName:`stadium`,description:`Terminal point`,aliases:[`terminal`,`pill`],handler:Eh},{semanticName:`Subprocess`,name:`Framed Rectangle`,shortName:`fr-rect`,description:`Subprocess`,aliases:[`subprocess`,`subproc`,`framed-rectangle`,`subroutine`],handler:jh},{semanticName:`Database`,name:`Cylinder`,shortName:`cyl`,description:`Database storage`,aliases:[`db`,`database`,`cylinder`],handler:Im},{semanticName:`Data Store`,name:`Data Store`,shortName:`datastore`,description:`Data flow diagram data store`,aliases:[`data-store`],handler:Rm},{semanticName:`Folder`,name:`Folder`,shortName:`folder`,description:`Folder or directory`,aliases:[`directory`],handler:Gm},{semanticName:`Bucket`,name:`Bucket`,shortName:`bucket`,description:`Object storage bucket`,handler:em},{semanticName:`Console`,name:`Console (terminal window)`,shortName:`console`,description:`Terminal or console window`,handler:bm},{semanticName:`Browser`,name:`Browser`,shortName:`browser`,description:`Browser window`,handler:mm},{semanticName:`Person`,name:`Person`,shortName:`person`,description:`Person (circular head above a rounded body)`,handler:Am},{semanticName:`Start`,name:`Circle`,shortName:`circle`,description:`Starting point`,aliases:[`circ`],handler:vm},{semanticName:`Bang`,name:`Bang`,shortName:`bang`,description:`Bang`,aliases:[`bang`],handler:lg},{semanticName:`Cloud`,name:`Cloud`,shortName:`cloud`,description:`cloud`,aliases:[`cloud`],handler:ug},{semanticName:`Decision`,name:`Diamond`,shortName:`diam`,description:`Decision-making step`,aliases:[`decision`,`diamond`,`question`],handler:vh},{semanticName:`Prepare Conditional`,name:`Hexagon`,shortName:`hex`,description:`Preparation or condition step`,aliases:[`hexagon`,`prepare`],handler:Ym},{semanticName:`Data Input/Output`,name:`Lean Right`,shortName:`lean-r`,description:`Represents input or output`,aliases:[`lean-right`,`in-out`],internalAliases:[`lean_right`],handler:ah},{semanticName:`Data Input/Output`,name:`Lean Left`,shortName:`lean-l`,description:`Represents output or input`,aliases:[`lean-left`,`out-in`],internalAliases:[`lean_left`],handler:ih},{semanticName:`Priority Action`,name:`Trapezoid Base Bottom`,shortName:`trap-b`,description:`Priority action`,aliases:[`priority`,`trapezoid-bottom`,`trapezoid`],handler:Hh},{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:nh},{semanticName:`Stop`,name:`Double Circle`,shortName:`dbl-circ`,description:`Represents a stop point`,aliases:[`double-circle`],internalAliases:[`doublecircle`],handler:Bm},{semanticName:`Text Block`,name:`Text Block`,shortName:`text`,description:`Text block`,handler:Fh},{semanticName:`Card`,name:`Notched Rectangle`,shortName:`notch-rect`,description:`Represents a card`,aliases:[`card`,`notched-rectangle`],handler:gm},{semanticName:`Lined/Shaded Process`,name:`Lined Rectangle`,shortName:`lin-rect`,description:`Lined process shape`,aliases:[`lined-rectangle`,`lined-process`,`lin-proc`,`shaded-process`],handler:Ch},{semanticName:`Start`,name:`Small Circle`,shortName:`sm-circ`,description:`Small starting point`,aliases:[`start`,`small-circle`],internalAliases:[`stateStart`],handler:kh},{semanticName:`Stop`,name:`Framed Circle`,shortName:`fr-circ`,description:`Stop point`,aliases:[`stop`,`framed-circle`],internalAliases:[`stateEnd`],handler:Oh},{semanticName:`Fork/Join`,name:`Filled Rectangle`,shortName:`fork`,description:`Fork or join in process flow`,aliases:[`join`],internalAliases:[`forkJoin`],handler:Km},{semanticName:`Collate`,name:`Hourglass`,shortName:`hourglass`,description:`Represents a collate operation`,aliases:[`hourglass`,`collate`],handler:Xm},{semanticName:`Comment`,name:`Curly Brace`,shortName:`brace`,description:`Adds a comment`,aliases:[`comment`,`brace-l`],handler:wm},{semanticName:`Comment Right`,name:`Curly Brace`,shortName:`brace-r`,description:`Adds a comment`,handler:Em},{semanticName:`Comment with braces on both sides`,name:`Curly Braces`,shortName:`braces`,description:`Adds a comment`,handler:Om},{semanticName:`Com Link`,name:`Lightning Bolt`,shortName:`bolt`,description:`Communication link`,aliases:[`com-link`,`lightning-bolt`],handler:oh},{semanticName:`Document`,name:`Document`,shortName:`doc`,description:`Represents a document`,aliases:[`doc`,`document`],handler:qh},{semanticName:`Delay`,name:`Half-Rounded Rectangle`,shortName:`delay`,description:`Represents a delay`,aliases:[`half-rounded-rectangle`],handler:qm},{semanticName:`Direct Access Storage`,name:`Horizontal Cylinder`,shortName:`h-cyl`,description:`Direct access storage`,aliases:[`das`,`horizontal-cylinder`],handler:Vh},{semanticName:`Disk Storage`,name:`Lined Cylinder`,shortName:`lin-cyl`,description:`Disk storage`,aliases:[`disk`,`lined-cylinder`],handler:fh},{semanticName:`Display`,name:`Curved Trapezoid`,shortName:`curv-trap`,description:`Represents a display`,aliases:[`curved-trapezoid`,`display`],handler:km},{semanticName:`Divided Process`,name:`Divided Rectangle`,shortName:`div-rect`,description:`Divided process shape`,aliases:[`div-proc`,`divided-rectangle`,`divided-process`],handler:zm},{semanticName:`Extract`,name:`Triangle`,shortName:`tri`,description:`Extraction process`,aliases:[`extract`,`triangle`],handler:Kh},{semanticName:`Internal Storage`,name:`Window Pane`,shortName:`win-pane`,description:`Internal storage`,aliases:[`internal-storage`,`window-pane`],handler:Xh},{semanticName:`Junction`,name:`Filled Circle`,shortName:`f-circ`,description:`Junction point`,aliases:[`junction`,`filled-circle`],handler:Vm},{semanticName:`Loop Limit`,name:`Trapezoidal Pentagon`,shortName:`notch-pent`,description:`Loop limit step`,aliases:[`loop-limit`,`notched-pentagon`],handler:Uh},{semanticName:`Manual File`,name:`Flipped Triangle`,shortName:`flip-tri`,description:`Manual file operation`,aliases:[`manual-file`,`flipped-triangle`],handler:Wm},{semanticName:`Manual Input`,name:`Sloped Rectangle`,shortName:`sl-rect`,description:`Manual input step`,aliases:[`manual-input`,`sloped-rectangle`],handler:wh},{semanticName:`Multi-Document`,name:`Stacked Document`,shortName:`docs`,description:`Multiple documents`,aliases:[`documents`,`st-doc`,`stacked-document`],handler:hh},{semanticName:`Multi-Process`,name:`Stacked Rectangle`,shortName:`st-rect`,description:`Multiple processes`,aliases:[`procs`,`processes`,`stacked-rectangle`],handler:mh},{semanticName:`Stored Data`,name:`Bow Tie Rectangle`,shortName:`bow-rect`,description:`Stored data`,aliases:[`stored-data`,`bow-tie-rectangle`],handler:$p},{semanticName:`Summary`,name:`Crossed Circle`,shortName:`cross-circ`,description:`Summary`,aliases:[`summary`,`crossed-circle`],handler:Sm},{semanticName:`Tagged Document`,name:`Tagged Document`,shortName:`tag-doc`,description:`Tagged document`,aliases:[`tag-doc`,`tagged-document`],handler:Ph},{semanticName:`Tagged Process`,name:`Tagged Rectangle`,shortName:`tag-rect`,description:`Tagged process`,aliases:[`tagged-rectangle`,`tag-proc`,`tagged-process`],handler:Nh},{semanticName:`Paper Tape`,name:`Flag`,shortName:`flag`,description:`Paper tape`,aliases:[`paper-tape`],handler:Jh},{semanticName:`Odd`,name:`Odd`,shortName:`odd`,description:`Odd shape`,internalAliases:[`rect_left_inv_arrow`],handler:yh},{semanticName:`Lined Document`,name:`Lined Document`,shortName:`lin-doc`,description:`Lined document`,aliases:[`lined-document`],handler:ph}],mg=i(()=>{let e=[...Object.entries({state:Dh,choice:_m,note:gh,composite:ym,rectWithTitle:bh,labelRect:rh,block_arrow:pm,collapsedGroup:am,iconSquare:eh,iconCircle:Qm,icon:Zm,iconRounded:$m,imageSquare:th,anchor:Xp,kanbanItem:cg,mindmapCircle:fg,defaultMindmapNode:dg,classBox:ig,erBox:$h,requirementBox:ag}),...pg.flatMap(e=>[e.shortName,...`aliases`in e?e.aliases:[],...`internalAliases`in e?e.internalAliases:[]].map(t=>[t,e.handler]))];return Object.fromEntries(e)},`generateShapeMap`)();function hg(e){return e in mg}i(hg,`isValidShape`);var gg=i(({flowchart:e})=>{let t=e?.subGraphTitleMargin?.top??0,n=e?.subGraphTitleMargin?.bottom??0;return{subGraphTitleTopMargin:t,subGraphTitleBottomMargin:n,subGraphTitleTotalMargin:t+n}},`getSubGraphTitleMargins`),_g=new Map;async function vg(e,t,n){let r,i;t.shape===`rect`&&(t.shape=t.rx&&t.ry?`roundedRect`:`squareRect`);let a=t.shape?mg[t.shape]:void 0;if(!a)throw Error(`No such shape: ${t.shape}. Please check your syntax.`);if(t.link){let o;n.config.securityLevel===`sandbox`?o=`_top`:t.linkTarget&&(o=t.linkTarget||`_blank`),r=e.insert(`svg:a`).attr(`xlink:href`,t.link).attr(`target`,o??null),i=await a(r,t,n)}else i=await a(e,t,n),r=i;return r.attr(`data-look`,lu(t.look)),t.tooltip&&i.attr(`title`,t.tooltip),_g.set(t.id,r),t.haveCallback&&r.attr(`class`,r.attr(`class`)+` clickable`),r}i(vg,`insertNode`);var yg=i((e,t)=>{_g.set(t.id,e)},`setNodeElem`),bg=i(()=>{_g.clear()},`clear`),xg=i(e=>{let t=_g.get(e.id);l.trace(`Transforming node`,e.diff,e,`translate(`+(e.x-e.width/2-5)+`, `+e.width/2+`)`);let n=e.diff||0;return e.clusterNode?t.attr(`transform`,`translate(`+(e.x+n-e.width/2)+`, `+(e.y-e.height/2-8)+`)`):t.attr(`transform`,`translate(`+e.x+`, `+e.y+`)`),n},`positionNode`),Sg=i((e,t)=>{if(t)return`translate(`+-e.width/2+`, `+-e.height/2+`)`;let n=e.x??0,r=e.y??0;return`translate(`+-(n+e.width/2)+`, `+-(r+e.height/2)+`)`},`computeLabelTransform`),Cg={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},wg={arrow_point:4,arrow_cross:12.5,arrow_circle:12.5};function Tg(e,t){if(e===void 0||t===void 0)return{angle:0,deltaX:0,deltaY:0};e=Eg(e),t=Eg(t);let[n,r]=[e.x,e.y],[i,a]=[t.x,t.y],o=i-n,s=a-r;return{angle:Math.atan(s/o),deltaX:o,deltaY:s}}i(Tg,`calculateDeltaAndAngle`);var Eg=i(e=>Array.isArray(e)?{x:e[0],y:e[1]}:e,`pointTransformer`),Dg=i(e=>({x:i(function(t,n,r){let i=0,a=Eg(r[0]).x<Eg(r[r.length-1]).x?`left`:`right`;if(n===0&&Object.hasOwn(Cg,e.arrowTypeStart)){let{angle:t,deltaX:n}=Tg(r[0],r[1]);i=Cg[e.arrowTypeStart]*Math.cos(t)*(n>=0?1:-1)}else if(n===r.length-1&&Object.hasOwn(Cg,e.arrowTypeEnd)){let{angle:t,deltaX:n}=Tg(r[r.length-1],r[r.length-2]);i=Cg[e.arrowTypeEnd]*Math.cos(t)*(n>=0?1:-1)}let o=Math.abs(Eg(t).x-Eg(r[r.length-1]).x),s=Math.abs(Eg(t).y-Eg(r[r.length-1]).y),c=Math.abs(Eg(t).x-Eg(r[0]).x),l=Math.abs(Eg(t).y-Eg(r[0]).y),u=Cg[e.arrowTypeStart],d=Cg[e.arrowTypeEnd];if(o<d&&o>0&&s<d){let e=d+1-o;e*=a===`right`?-1:1,i-=e}if(c<u&&c>0&&l<u){let e=u+1-c;e*=a===`right`?-1:1,i+=e}return Eg(t).x+i},`x`),y:i(function(t,n,r){let i=0,a=Eg(r[0]).y<Eg(r[r.length-1]).y?`down`:`up`;if(n===0&&Object.hasOwn(Cg,e.arrowTypeStart)){let{angle:t,deltaY:n}=Tg(r[0],r[1]);i=Cg[e.arrowTypeStart]*Math.abs(Math.sin(t))*(n>=0?1:-1)}else if(n===r.length-1&&Object.hasOwn(Cg,e.arrowTypeEnd)){let{angle:t,deltaY:n}=Tg(r[r.length-1],r[r.length-2]);i=Cg[e.arrowTypeEnd]*Math.abs(Math.sin(t))*(n>=0?1:-1)}let o=Math.abs(Eg(t).y-Eg(r[r.length-1]).y),s=Math.abs(Eg(t).x-Eg(r[r.length-1]).x),c=Math.abs(Eg(t).y-Eg(r[0]).y),l=Math.abs(Eg(t).x-Eg(r[0]).x),u=Cg[e.arrowTypeStart],d=Cg[e.arrowTypeEnd];if(o<d&&o>0&&s<d){let e=d+1-o;e*=a===`up`?-1:1,i-=e}if(c<u&&c>0&&l<u){let e=u+1-c;e*=a===`up`?-1:1,i+=e}return Eg(t).y+i},`y`)}),`getLineFunctionsWithOffset`),Og=i((e,t,n,r,i,a=!1,o)=>{t.arrowTypeStart&&jg(e,`start`,t.arrowTypeStart,n,r,i,a,o),t.arrowTypeEnd&&jg(e,`end`,t.arrowTypeEnd,n,r,i,a,o)},`addEdgeMarkers`),kg={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}},Ag=[`cross`,`point`,`circle`,`lollipop`,`aggregation`,`extension`,`composition`,`dependency`,`barb`],jg=i((e,t,n,r,i,a,o=!1,s)=>{if(!n||n===`none`)return;let c=kg[n],u=c&&Ag.includes(c.type);if(!c){l.warn(`Unknown arrow type: ${n}`);return}let d=`${i}_${a}-${c.type}${t===`start`?`Start`:`End`}${o&&u?`-margin`:``}`;if(s&&s.trim()!==``){let n=`${d}_${s.replace(/[^\dA-Za-z]/g,`_`)}`;if(!document.getElementById(n)){let e=document.getElementById(d);if(e){let t=e.cloneNode(!0);t.id=n,t.querySelectorAll(`path, circle, line`).forEach(e=>{e.setAttribute(`stroke`,s),c.fill&&e.setAttribute(`fill`,s)}),e.parentNode?.appendChild(t)}}e.attr(`marker-${t}`,`url(${r}#${n})`)}else e.attr(`marker-${t}`,`url(${r}#${d})`)},`addEdgeMarker`),Mg=i(e=>typeof e==`string`?e:B()?.flowchart?.curve,`resolveEdgeCurveType`),Ng=new Map,Pg=new Map,Fg=i(()=>{Ng.clear(),Pg.clear()},`clear`),Ig=i(e=>!!(e.label||e.startLabelLeft||e.startLabelRight||e.endLabelLeft||e.endLabelRight),`hasEdgeLabel`),Lg=i(e=>e?typeof e==`string`?e:e.reduce((e,t)=>e+`;`+t,``):``,`getLabelStyles`),Rg=i(async(e,t)=>{let n=B(),r=Gn(n),{labelStyles:i}=W(t);t.labelStyle=i;let a=e.insert(`g`).attr(`class`,`edgeLabel`),o=a.insert(`g`).attr(`class`,`label`).attr(`data-id`,t.id),s=t.labelType===`markdown`,c=await hf(e,t.label,{style:Lg(t.labelStyle),useHtmlLabels:r,addSvgBackground:!0,isNode:!1,markdown:s,width:void 0},n);o.node().appendChild(c),l.info(`abc82`,t,t.labelType);let u,d;if(r){let e=c.children[0],t=V(c);u=await qd.measure(()=>e.getBoundingClientRect()),d=u,t.attr(`width`,u.width),t.attr(`height`,u.height)}else{let e=V(c).select(`text`).node();await qd.measure(()=>{u=c.getBBox(),d=e&&typeof e.getBBox==`function`?e.getBBox():u})}o.attr(`transform`,Sg(d,r)),Ng.set(t.id,a),t.width=u.width,t.height=u.height;let f;if(t.startLabelLeft){let n=e.insert(`g`).attr(`class`,`edgeTerminals`),i=n.insert(`g`).attr(`class`,`inner`),a=await zp(i,t.startLabelLeft,Lg(t.labelStyle)||``,!1,!1);f=a;let o=a.getBBox();if(r){let e=a.children[0],t=V(a);o=e.getBoundingClientRect(),t.attr(`width`,o.width),t.attr(`height`,o.height)}i.attr(`transform`,Sg(o,r)),Pg.get(t.id)||Pg.set(t.id,{}),Pg.get(t.id).startLeft=n,zg(f,t.startLabelLeft)}if(t.startLabelRight){let n=e.insert(`g`).attr(`class`,`edgeTerminals`),i=n.insert(`g`).attr(`class`,`inner`),a=await zp(i,t.startLabelRight,Lg(t.labelStyle)||``,!1,!1);f=a;let o=a.getBBox();if(r){let e=a.children[0],t=V(a);o=e.getBoundingClientRect(),t.attr(`width`,o.width),t.attr(`height`,o.height)}i.attr(`transform`,Sg(o,r)),Pg.get(t.id)||Pg.set(t.id,{}),Pg.get(t.id).startRight=n,zg(f,t.startLabelRight)}if(t.endLabelLeft){let n=e.insert(`g`).attr(`class`,`edgeTerminals`),i=n.insert(`g`).attr(`class`,`inner`),a=await zp(n,t.endLabelLeft,Lg(t.labelStyle)||``,!1,!1);f=a;let o=a.getBBox();if(r){let e=a.children[0],t=V(a);o=e.getBoundingClientRect(),t.attr(`width`,o.width),t.attr(`height`,o.height)}i.attr(`transform`,Sg(o,r)),Pg.get(t.id)||Pg.set(t.id,{}),Pg.get(t.id).endLeft=n,zg(f,t.endLabelLeft)}if(t.endLabelRight){let n=e.insert(`g`).attr(`class`,`edgeTerminals`),i=n.insert(`g`).attr(`class`,`inner`),a=await zp(n,t.endLabelRight,Lg(t.labelStyle)||``,!1,!1);f=a;let o=a.getBBox();if(r){let e=a.children[0],t=V(a);o=e.getBoundingClientRect(),t.attr(`width`,o.width),t.attr(`height`,o.height)}i.attr(`transform`,Sg(o,r)),Pg.get(t.id)||Pg.set(t.id,{}),Pg.get(t.id).endRight=n,zg(f,t.endLabelRight)}return c},`insertEdgeLabel`);function zg(e,t){Gn(B())&&e&&(e.style.width=t.length*9+`px`,e.style.height=`12px`)}i(zg,`setTerminalWidth`);var Bg=i((e,t)=>{l.debug(`Moving label abc88 `,e.id,e.label,Ng.get(e.id),t);let n=t.updatedPath?t.updatedPath:t.originalPath,{subGraphTitleTotalMargin:r}=gg(B());if(e.label){let i=Ng.get(e.id),a=e.x,o=e.y;if(n){let r=au.calcLabelPosition(n);l.debug(`Moving label `+e.label+` from (`,a,`,`,o,`) to (`,r.x,`,`,r.y,`) abc88`),t.updatedPath&&(a=r.x,o=r.y)}i.attr(`transform`,`translate(${a}, ${o+r/2})`)}if(e.startLabelLeft){let t=Pg.get(e.id).startLeft,r=e.x,i=e.y;if(n){let t=au.calcTerminalLabelPosition(e.arrowTypeStart?10:0,`start_left`,n);r=t.x,i=t.y}t.attr(`transform`,`translate(${r}, ${i})`)}if(e.startLabelRight){let t=Pg.get(e.id).startRight,r=e.x,i=e.y;if(n){let t=au.calcTerminalLabelPosition(e.arrowTypeStart?10:0,`start_right`,n);r=t.x,i=t.y}t.attr(`transform`,`translate(${r}, ${i})`)}if(e.endLabelLeft){let t=Pg.get(e.id).endLeft,r=e.x,i=e.y;if(n){let t=au.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,`end_left`,n);r=t.x,i=t.y}t.attr(`transform`,`translate(${r}, ${i})`)}if(e.endLabelRight){let t=Pg.get(e.id).endRight,r=e.x,i=e.y;if(n){let t=au.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,`end_right`,n);r=t.x,i=t.y}t.attr(`transform`,`translate(${r}, ${i})`)}},`positionEdgeLabel`),Vg=i((e,t)=>{if(!e?.isLabelEdge||!e?.id?.endsWith(`-to-label`)||!Array.isArray(t)||t.length!==2)return t;let[n,r]=t,i=Math.abs(r.x-n.x),a=Math.abs(r.y-n.y);return i<.001||a<.001?t:a>=i?[n,{x:n.x,y:r.y},r]:[n,{x:r.x,y:n.y},r]},`orthogonalizeToLabelClippedPoints`),Hg=i((e,t)=>{let n=e.x,r=e.y,i=Math.abs(t.x-n),a=Math.abs(t.y-r),o=e.width/2,s=e.height/2;return i>=o||a>=s},`outsideNode`),Ug=i((e,t,n)=>{l.debug(`intersection calc abc89:
|
|
262
|
+
outsidePoint: ${JSON.stringify(t)}
|
|
263
|
+
insidePoint : ${JSON.stringify(n)}
|
|
264
|
+
node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);let r=e.x,i=e.y,a=Math.abs(r-n.x),o=e.width/2,s=n.x<t.x?o-a:o+a,c=e.height/2,u=Math.abs(t.y-n.y),d=Math.abs(t.x-n.x);if(Math.abs(i-t.y)*o>Math.abs(r-t.x)*c){let e=n.y<t.y?t.y-c-i:i-c-t.y;s=d*e/u;let r={x:n.x<t.x?n.x+s:n.x-d+s,y:n.y<t.y?n.y+u-e:n.y-u+e};return s===0&&(r.x=t.x,r.y=t.y),d===0&&(r.x=t.x),u===0&&(r.y=t.y),l.debug(`abc89 top/bottom calc, Q ${u}, q ${e}, R ${d}, r ${s}`,r),r}{s=n.x<t.x?t.x-o-r:r-o-t.x;let e=u*s/d,i=n.x<t.x?n.x+d-s:n.x-d+s,a=n.y<t.y?n.y+e:n.y-e;return l.debug(`sides calc abc89, Q ${u}, q ${e}, R ${d}, r ${s}`,{_x:i,_y:a}),s===0&&(i=t.x,a=t.y),d===0&&(i=t.x),u===0&&(a=t.y),{x:i,y:a}}},`intersection`),Wg=i((e,t)=>{l.warn(`abc88 cutPathAtIntersect`,e,t);let n=[],r=e[0],i=!1;return e.forEach(e=>{if(l.info(`abc88 checking point`,e,t),!Hg(t,e)&&!i){let a=Ug(t,r,e);l.debug(`abc88 inside`,e,r,a),l.debug(`abc88 intersection`,a,t);let o=!1;n.forEach(e=>{o||=e.x===a.x&&e.y===a.y}),n.some(e=>e.x===a.x&&e.y===a.y)?l.warn(`abc88 no intersect`,a,n):n.push(a),i=!0}else l.warn(`abc88 outside`,e,r),r=e,i||n.push(e)}),l.debug(`returning points`,n),n},`cutPathAtIntersect`);function Gg(e){let t=[],n=[];for(let r=1;r<e.length-1;r++){let i=e[r-1],a=e[r],o=e[r+1];(i.x===a.x&&a.y===o.y&&Math.abs(a.x-o.x)>5&&Math.abs(a.y-i.y)>5||i.y===a.y&&a.x===o.x&&Math.abs(a.x-i.x)>5&&Math.abs(a.y-o.y)>5)&&(t.push(a),n.push(r))}return{cornerPoints:t,cornerPointPositions:n}}i(Gg,`extractCornerPoints`);var Kg=i(function(e,t,n){let r=t.x-e.x,i=t.y-e.y,a=n/Math.sqrt(r*r+i*i);return{x:t.x-a*r,y:t.y-a*i}},`findAdjacentPoint`),qg=i(function(e){let{cornerPointPositions:t}=Gg(e),n=[];for(let r=0;r<e.length;r++)if(t.includes(r)){let t=e[r-1],i=e[r+1],a=e[r],o=Kg(t,a,5),s=Kg(i,a,5),c=s.x-o.x,u=s.y-o.y;n.push(o);let d=Math.sqrt(2)*2,f={x:a.x,y:a.y};Math.abs(i.x-t.x)>10&&Math.abs(i.y-t.y)>=10?(l.debug(`Corner point fixing`,Math.abs(i.x-t.x),Math.abs(i.y-t.y)),f=a.x===o.x?{x:c<0?o.x-5+d:o.x+5-d,y:u<0?o.y-d:o.y+d}:{x:c<0?o.x-d:o.x+d,y:u<0?o.y-5+d:o.y+5-d}):l.debug(`Corner point skipping fixing`,Math.abs(i.x-t.x),Math.abs(i.y-t.y)),n.push(f,s)}else n.push(e[r]);return n},`fixCorners`),Jg=i((e,t,n)=>{let r=e-t-n,i=Math.floor(r/4);return`0 ${t} ${Array(Number.isFinite(i)?Math.max(0,i):0).fill(`2 2`).join(` `)} ${n}`},`generateDashArray`),Yg=i(function(e,t,n,r,i,a,o,s=!1){if(!o)throw Error(`insertEdge: missing diagramId for edge "${t.id}" \u2014 edge IDs require a diagram prefix for uniqueness`);let{handDrawnSeed:c,layout:u}=B(),d=t.points,f=!1,p=i;var m=a;let h=[];for(let e in t.cssCompiledStyles)bf(e)||h.push(t.cssCompiledStyles[e]);if(u===`swimlane`){if(m.intersect&&p.intersect&&Array.isArray(d)&&d.length>=2){if(d.length===2)d=[p.intersect(d[0]),m.intersect(d[1])];else{let e=d.slice(1,-1),t=e[0],n=e[e.length-1],r=.5,i=Math.abs(d[d.length-1].x-n.x)<r&&Math.abs(d[d.length-1].y-n.y)<r,a=p.intersect(t),o=i?n:m.intersect(n),s=Math.abs(o.x-n.x)<r&&Math.abs(o.y-n.y)<r,c=Math.abs(a.x-t.x)<r&&Math.abs(a.y-t.y)<r?[]:[a],l=s?[]:[o];d=[...c,...e,...l]}}d=Vg(t,d)}else m.intersect&&p.intersect&&!s&&(d=d.slice(1,t.points.length-1),d.unshift(p.intersect(d[0])),d.push(m.intersect(d[d.length-1])));let g=btoa(JSON.stringify(d));t.toCluster&&(l.info(`to cluster abc88`,n.get(t.toCluster)),d=Wg(t.points,n.get(t.toCluster).node),f=!0),t.fromCluster&&(l.debug(`from cluster abc88`,n.get(t.fromCluster),JSON.stringify(d,null,2)),d=Wg(d.reverse(),n.get(t.fromCluster).node).reverse(),f=!0);let _=d.filter(e=>!Number.isNaN(e.y)),v=Mg(t.curve);v!==`rounded`&&(_=qg(_));let y=Ho;switch(v){case`linear`:y=Ho;break;case`basis`:y=is;break;case`cardinal`:y=ps;break;case`bumpX`:y=Qo;break;case`bumpY`:y=$o;break;case`catmullRom`:y=bs;break;case`monotoneX`:y=Ps;break;case`monotoneY`:y=Fs;break;case`natural`:y=Rs;break;case`step`:y=Bs;break;case`stepAfter`:y=Hs;break;case`stepBefore`:y=Vs;break;case`rounded`:y=Ho;break;default:y=is}let{x:b,y:x}=Dg(t),S=Go().x(b).y(x).curve(y),C;switch(t.thickness){case`normal`:C=`edge-thickness-normal`;break;case`thick`:C=`edge-thickness-thick`;break;case`invisible`:C=`edge-thickness-invisible`;break;default:C=`edge-thickness-normal`}switch(t.pattern){case`solid`:C+=` edge-pattern-solid`;break;case`dotted`:C+=` edge-pattern-dotted`;break;case`dashed`:C+=` edge-pattern-dashed`;break;default:C+=` edge-pattern-solid`}let w,T=v===`rounded`?Xg(Qg(_,t),5):S(_),E=Array.isArray(t.style)?t.style:[t.style],D=E.find(e=>e?.startsWith(`stroke:`)),O=``;t.animate&&(O=`edge-animation-fast`),t.animation&&(O=`edge-animation-`+t.animation);let k=!1;if(t.look===`handDrawn`){let n=q.svg(e);Object.assign([],_);let r=n.path(T,{roughness:.3,seed:c});C+=` transition`,w=V(r).select(`path`).attr(`id`,`${o}-${t.id}`).attr(`class`,` `+C+(t.classes?` `+t.classes:``)+(O?` `+O:``)).attr(`style`,E?E.reduce((e,t)=>e+`;`+t,``):``);let i=w.attr(`d`);w.attr(`d`,i),e.node().appendChild(w.node())}else{let n=h.join(`;`),r=E?E.reduce((e,t)=>e+t+`;`,``):``,i=(n?n+`;`+r+`;`:r)+`;`+(E?E.reduce((e,t)=>e+`;`+t,``):``);w=e.append(`path`).attr(`d`,T).attr(`id`,`${o}-${t.id}`).attr(`class`,` `+C+(t.classes?` `+t.classes:``)+(O?` `+O:``)).attr(`style`,i),D=i.match(/stroke:([^;]+)/)?.[1],k=t.animate===!0||!!t.animation||n.includes(`animation`);let a=w.node(),s=typeof a.getTotalLength==`function`?a.getTotalLength():0,c=wg[t.arrowTypeStart]||0,l=wg[t.arrowTypeEnd]||0;if(t.look===`neo`&&!k){let e=`stroke-dasharray: ${t.pattern===`dotted`||t.pattern===`dashed`?Jg(s,c,l):`0 ${c} ${s-c-l} ${l}`}; stroke-dashoffset: 0;`;w.attr(`style`,e+w.attr(`style`))}}w.attr(`data-edge`,!0),w.attr(`data-et`,`edge`),w.attr(`data-id`,t.id),w.attr(`data-points`,g),w.attr(`data-look`,lu(t.look)),t.showPoints&&_.forEach(t=>{e.append(`circle`).style(`stroke`,`red`).style(`fill`,`red`).attr(`r`,1).attr(`cx`,t.x).attr(`cy`,t.y)});let A=``;(B().flowchart.arrowMarkerAbsolute||B().state.arrowMarkerAbsolute)&&(A=window.location.protocol+`//`+window.location.host+window.location.pathname+window.location.search,A=A.replace(/\(/g,`\\(`).replace(/\)/g,`\\)`)),l.info(`arrowTypeStart`,t.arrowTypeStart),l.info(`arrowTypeEnd`,t.arrowTypeEnd);let j=!k&&t?.look===`neo`;Og(w,t,A,o,r,j,D);let ee=Math.floor(d.length/2),M=d[ee];au.isLabelCoordinateInPath(M,w.attr(`d`))||(f=!0);let te={};return f&&(te.updatedPath=d),te.originalPath=t.points,te},`insertEdge`);function Xg(e,t){if(e.length<2)return``;let n=``,r=e.length,i=1e-5;for(let a=0;a<r;a++){let o=e[a],s=e[a-1],c=e[a+1];if(a===0)n+=`M${o.x},${o.y}`;else if(a===r-1)n+=`L${o.x},${o.y}`;else{let e=o.x-s.x,r=o.y-s.y,a=c.x-o.x,l=c.y-o.y,u=Math.hypot(e,r),d=Math.hypot(a,l);if(u<i||d<i){n+=`L${o.x},${o.y}`;continue}let f=e/u,p=r/u,m=a/d,h=l/d,g=f*m+p*h,_=Math.acos(Math.max(-1,Math.min(1,g)));if(_<i||Math.abs(Math.PI-_)<i){n+=`L${o.x},${o.y}`;continue}let v=Math.min(t/Math.sin(_/2),u/2,d/2),y=o.x-f*v,b=o.y-p*v,x=o.x+m*v,S=o.y+h*v;n+=`L${y},${b}`,n+=`Q${o.x},${o.y} ${x},${S}`}}return n}i(Xg,`generateRoundedPath`);function Zg(e,t){if(!e||!t)return{angle:0,deltaX:0,deltaY:0};let n=t.x-e.x,r=t.y-e.y;return{angle:Math.atan2(r,n),deltaX:n,deltaY:r}}i(Zg,`calculateDeltaAndAngle`);function Qg(e,t){let n=e.map(e=>({...e}));if(e.length>=2&&Cg[t.arrowTypeStart]){let r=Cg[t.arrowTypeStart],i=e[0],{angle:a}=Zg(i,e[1]),o=r*Math.cos(a),s=r*Math.sin(a);n[0].x=i.x+o,n[0].y=i.y+s}let r=e.length;if(r>=2&&Cg[t.arrowTypeEnd]){let i=Cg[t.arrowTypeEnd],a=e[r-1],{angle:o}=Zg(e[r-2],a),s=i*Math.cos(o),c=i*Math.sin(o);n[r-1].x=a.x-s,n[r-1].y=a.y-c}return n}i(Qg,`applyMarkerOffsetsToPoints`);var $g=i((e,t,n,r)=>{t.forEach(t=>{e_[t](e,n,r)})},`insertMarkers`),e_={extension:i((e,t,n)=>{l.trace(`Making markers for `,n),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+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`,n+`_`+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`,n+`_`+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`,n+`_`+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`),composition:i((e,t,n)=>{e.append(`defs`).append(`marker`).attr(`id`,n+`_`+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`,n+`_`+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`,n+`_`+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`,n+`_`+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`),aggregation:i((e,t,n)=>{e.append(`defs`).append(`marker`).attr(`id`,n+`_`+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`,n+`_`+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`,n+`_`+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`,n+`_`+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`),dependency:i((e,t,n)=>{e.append(`defs`).append(`marker`).attr(`id`,n+`_`+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`,n+`_`+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`,n+`_`+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`,n+`_`+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`),lollipop:i((e,t,n)=>{e.append(`defs`).append(`marker`).attr(`id`,n+`_`+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`,n+`_`+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`,n+`_`+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`,n+`_`+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`),point:i((e,t,n)=>{e.append(`marker`).attr(`id`,n+`_`+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`,n+`_`+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`,n+`_`+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`,n+`_`+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`),circle:i((e,t,n)=>{e.append(`marker`).attr(`id`,n+`_`+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`,n+`_`+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`,n+`_`+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`,n+`_`+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`),cross:i((e,t,n)=>{e.append(`marker`).attr(`id`,n+`_`+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`,n+`_`+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`,n+`_`+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`,n+`_`+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`),barb:i((e,t,n)=>{e.append(`defs`).append(`marker`).attr(`id`,n+`_`+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`),barbNeo:i((e,t,n)=>{let{themeVariables:r}=z(),{transitionColor:i}=r;e.append(`defs`).append(`marker`).attr(`id`,n+`_`+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`,n+`_`+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`,`${i}`)},`barbNeo`),only_one:i((e,t,n)=>{e.append(`defs`).append(`marker`).attr(`id`,n+`_`+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`,n+`_`+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`),zero_or_one:i((e,t,n)=>{let r=e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-zeroOrOneStart`).attr(`class`,`marker zeroOrOne `+t).attr(`refX`,0).attr(`refY`,9).attr(`markerWidth`,30).attr(`markerHeight`,18).attr(`orient`,`auto`);r.append(`circle`).attr(`fill`,`white`).attr(`cx`,21).attr(`cy`,9).attr(`r`,6),r.append(`path`).attr(`d`,`M9,0 L9,18`);let i=e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-zeroOrOneEnd`).attr(`class`,`marker zeroOrOne `+t).attr(`refX`,30).attr(`refY`,9).attr(`markerWidth`,30).attr(`markerHeight`,18).attr(`orient`,`auto`);i.append(`circle`).attr(`fill`,`white`).attr(`cx`,9).attr(`cy`,9).attr(`r`,6),i.append(`path`).attr(`d`,`M21,0 L21,18`)},`zero_or_one`),one_or_more:i((e,t,n)=>{e.append(`defs`).append(`marker`).attr(`id`,n+`_`+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`,n+`_`+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`),zero_or_more:i((e,t,n)=>{let r=e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-zeroOrMoreStart`).attr(`class`,`marker zeroOrMore `+t).attr(`refX`,18).attr(`refY`,18).attr(`markerWidth`,57).attr(`markerHeight`,36).attr(`orient`,`auto`);r.append(`circle`).attr(`fill`,`white`).attr(`cx`,48).attr(`cy`,18).attr(`r`,6),r.append(`path`).attr(`d`,`M0,18 Q18,0 36,18 Q18,36 0,18`);let i=e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-zeroOrMoreEnd`).attr(`class`,`marker zeroOrMore `+t).attr(`refX`,39).attr(`refY`,18).attr(`markerWidth`,57).attr(`markerHeight`,36).attr(`orient`,`auto`);i.append(`circle`).attr(`fill`,`white`).attr(`cx`,9).attr(`cy`,18).attr(`r`,6),i.append(`path`).attr(`d`,`M21,18 Q39,0 57,18 Q39,36 21,18`)},`zero_or_more`),only_one_neo:i((e,t,n)=>{let{themeVariables:r}=z(),{strokeWidth:i}=r;e.append(`defs`).append(`marker`).attr(`id`,n+`_`+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`,`${i}`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+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`,`${i}`)},`only_one_neo`),zero_or_one_neo:i((e,t,n)=>{let{themeVariables:r}=z(),{strokeWidth:i,mainBkg:a}=r,o=e.append(`defs`).append(`marker`).attr(`id`,n+`_`+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`);o.append(`circle`).attr(`fill`,a??`white`).attr(`cx`,21).attr(`cy`,9).attr(`stroke-width`,`${i}`).attr(`r`,6),o.append(`path`).attr(`d`,`M9,0 L9,18`).attr(`stroke-width`,`${i}`);let s=e.append(`defs`).append(`marker`).attr(`id`,n+`_`+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`);s.append(`circle`).attr(`fill`,a??`white`).attr(`cx`,9).attr(`cy`,9).attr(`stroke-width`,`${i}`).attr(`r`,6),s.append(`path`).attr(`d`,`M21,0 L21,18`).attr(`stroke-width`,`${i}`)},`zero_or_one_neo`),one_or_more_neo:i((e,t,n)=>{let{themeVariables:r}=z(),{strokeWidth:i}=r;e.append(`defs`).append(`marker`).attr(`id`,n+`_`+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`,`${i}`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+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`,`${i}`)},`one_or_more_neo`),zero_or_more_neo:i((e,t,n)=>{let{themeVariables:r}=z(),{strokeWidth:i,mainBkg:a}=r,o=e.append(`defs`).append(`marker`).attr(`id`,n+`_`+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`);o.append(`circle`).attr(`fill`,a??`white`).attr(`cx`,45.5).attr(`cy`,18).attr(`r`,6).attr(`stroke-width`,`${i}`),o.append(`path`).attr(`d`,`M0,18 Q18,0 36,18 Q18,36 0,18`).attr(`stroke-width`,`${i}`);let s=e.append(`defs`).append(`marker`).attr(`id`,n+`_`+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`);s.append(`circle`).attr(`fill`,a??`white`).attr(`cx`,11).attr(`cy`,18).attr(`r`,6).attr(`stroke-width`,`${i}`),s.append(`path`).attr(`d`,`M21,18 Q39,0 57,18 Q39,36 21,18`).attr(`stroke-width`,`${i}`)},`zero_or_more_neo`),requirement_arrow:i((e,t,n)=>{e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-requirement_arrowEnd`).attr(`refX`,20).attr(`refY`,10).attr(`markerWidth`,20).attr(`markerHeight`,20).attr(`orient`,`auto`).append(`path`).attr(`d`,`M0,0
|
|
265
|
+
L20,10
|
|
266
|
+
M20,10
|
|
267
|
+
L0,20`)},`requirement_arrow`),requirement_contains:i((e,t,n)=>{let r=e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-requirement_containsStart`).attr(`refX`,0).attr(`refY`,10).attr(`markerWidth`,20).attr(`markerHeight`,20).attr(`orient`,`auto`).append(`g`);r.append(`circle`).attr(`cx`,10).attr(`cy`,10).attr(`r`,9).attr(`fill`,`none`),r.append(`line`).attr(`x1`,1).attr(`x2`,19).attr(`y1`,10).attr(`y2`,10),r.append(`line`).attr(`y1`,1).attr(`y2`,19).attr(`x1`,10).attr(`x2`,10)},`requirement_contains`),requirement_arrow_neo:i((e,t,n)=>{let{themeVariables:r}=z(),{strokeWidth:i}=r;e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-requirement_arrowEnd`).attr(`refX`,20).attr(`refY`,10).attr(`markerWidth`,20).attr(`markerHeight`,20).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).attr(`stroke-width`,`${i}`).attr(`viewBox`,`0 0 25 20`).append(`path`).attr(`d`,`M0,0
|
|
268
|
+
L20,10
|
|
269
|
+
M20,10
|
|
270
|
+
L0,20`).attr(`stroke-linejoin`,`miter`)},`requirement_arrow_neo`),requirement_contains_neo:i((e,t,n)=>{let{themeVariables:r}=z(),{strokeWidth:i}=r,a=e.append(`defs`).append(`marker`).attr(`id`,n+`_`+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`,`${i}`)},`requirement_contains_neo`)},t_=$g,n_=typeof global==`object`&&global&&global.Object===Object&&global,r_=typeof self==`object`&&self&&self.Object===Object&&self,i_=n_||r_||Function(`return this`)(),a_=i_.Symbol,o_=Object.prototype,s_=o_.hasOwnProperty,c_=o_.toString,l_=a_?a_.toStringTag:void 0;function u_(e){var t=s_.call(e,l_),n=e[l_];try{e[l_]=void 0;var r=!0}catch{}var i=c_.call(e);return r&&(t?e[l_]=n:delete e[l_]),i}var d_=Object.prototype.toString;function f_(e){return d_.call(e)}var p_=`[object Null]`,m_=`[object Undefined]`,h_=a_?a_.toStringTag:void 0;function g_(e){return e==null?e===void 0?m_:p_:h_&&h_ in Object(e)?u_(e):f_(e)}function __(e){return typeof e==`object`&&!!e}var v_=`[object Symbol]`;function y_(e){return typeof e==`symbol`||__(e)&&g_(e)==v_}function b_(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}var x_=Array.isArray,S_=1/0,C_=a_?a_.prototype:void 0,w_=C_?C_.toString:void 0;function T_(e){if(typeof e==`string`)return e;if(x_(e))return b_(e,T_)+``;if(y_(e))return w_?w_.call(e):``;var t=e+``;return t==`0`&&1/e==-S_?`-0`:t}function E_(e){var t=typeof e;return e!=null&&(t==`object`||t==`function`)}function D_(e){return e}var O_=`[object AsyncFunction]`,k_=`[object Function]`,A_=`[object GeneratorFunction]`,j_=`[object Proxy]`;function M_(e){if(!E_(e))return!1;var t=g_(e);return t==k_||t==A_||t==O_||t==j_}var N_=i_[`__core-js_shared__`],P_=function(){var e=/[^.]+$/.exec(N_&&N_.keys&&N_.keys.IE_PROTO||``);return e?`Symbol(src)_1.`+e:``}();function F_(e){return!!P_&&P_ in e}var I_=Function.prototype.toString;function L_(e){if(e!=null){try{return I_.call(e)}catch{}try{return e+``}catch{}}return``}var R_=/[\\^$.*+?()[\]{}|]/g,z_=/^\[object .+?Constructor\]$/,B_=Function.prototype,V_=Object.prototype,H_=B_.toString,U_=V_.hasOwnProperty,W_=RegExp(`^`+H_.call(U_).replace(R_,`\\$&`).replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,`$1.*?`)+`$`);function G_(e){return!E_(e)||F_(e)?!1:(M_(e)?W_:z_).test(L_(e))}function K_(e,t){return e?.[t]}function q_(e,t){var n=K_(e,t);return G_(n)?n:void 0}var J_=q_(i_,`WeakMap`);function Y_(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function X_(){}var Z_=800,Q_=16,$_=Date.now;function e1(e){var t=0,n=0;return function(){var r=$_(),i=Q_-(r-n);if(n=r,i>0){if(++t>=Z_)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function t1(e){return function(){return e}}var n1=function(){try{var e=q_(Object,`defineProperty`);return e({},``,{}),e}catch{}}(),r1=e1(n1?function(e,t){return n1(e,`toString`,{configurable:!0,enumerable:!1,value:t1(t),writable:!0})}:D_);function i1(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}function a1(e,t,n,r){for(var i=e.length,a=n+(r?1:-1);r?a--:++a<i;)if(t(e[a],a,e))return a;return-1}function o1(e){return e!==e}function s1(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}function c1(e,t,n){return t===t?s1(e,t,n):a1(e,o1,n)}function l1(e,t){return!!(e!=null&&e.length)&&c1(e,t,0)>-1}var u1=0x1fffffffffffff,d1=/^(?:0|[1-9]\d*)$/;function f1(e,t){var n=typeof e;return t??=u1,!!t&&(n==`number`||n!=`symbol`&&d1.test(e))&&e>-1&&e%1==0&&e<t}function p1(e,t){return e===t||e!==e&&t!==t}var m1=Math.max;function h1(e,t,n){return t=m1(t===void 0?e.length-1:t,0),function(){for(var r=arguments,i=-1,a=m1(r.length-t,0),o=Array(a);++i<a;)o[i]=r[t+i];i=-1;for(var s=Array(t+1);++i<t;)s[i]=r[i];return s[t]=n(o),Y_(e,this,s)}}function g1(e,t){return r1(h1(e,t,D_),e+``)}var _1=0x1fffffffffffff;function v1(e){return typeof e==`number`&&e>-1&&e%1==0&&e<=_1}function y1(e){return e!=null&&v1(e.length)&&!M_(e)}var b1=Object.prototype;function x1(e){var t=e&&e.constructor;return e===(typeof t==`function`&&t.prototype||b1)}function S1(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var C1=`[object Arguments]`;function w1(e){return __(e)&&g_(e)==C1}var T1=Object.prototype,E1=T1.hasOwnProperty,D1=T1.propertyIsEnumerable,O1=w1(function(){return arguments}())?w1:function(e){return __(e)&&E1.call(e,`callee`)&&!D1.call(e,`callee`)};function k1(){return!1}var A1=typeof exports==`object`&&exports&&!exports.nodeType&&exports,j1=A1&&typeof module==`object`&&module&&!module.nodeType&&module,M1=j1&&j1.exports===A1?i_.Buffer:void 0,N1=(M1?M1.isBuffer:void 0)||k1,P1=`[object Arguments]`,F1=`[object Array]`,I1=`[object Boolean]`,L1=`[object Date]`,R1=`[object Error]`,z1=`[object Function]`,B1=`[object Map]`,V1=`[object Number]`,H1=`[object Object]`,U1=`[object RegExp]`,W1=`[object Set]`,G1=`[object String]`,K1=`[object WeakMap]`,q1=`[object ArrayBuffer]`,J1=`[object DataView]`,Y1=`[object Float32Array]`,X1=`[object Float64Array]`,Z1=`[object Int8Array]`,Q1=`[object Int16Array]`,$1=`[object Int32Array]`,e0=`[object Uint8Array]`,t0=`[object Uint8ClampedArray]`,n0=`[object Uint16Array]`,r0=`[object Uint32Array]`,i0={};i0[Y1]=i0[X1]=i0[Z1]=i0[Q1]=i0[$1]=i0[e0]=i0[t0]=i0[n0]=i0[r0]=!0,i0[P1]=i0[F1]=i0[q1]=i0[I1]=i0[J1]=i0[L1]=i0[R1]=i0[z1]=i0[B1]=i0[V1]=i0[H1]=i0[U1]=i0[W1]=i0[G1]=i0[K1]=!1;function a0(e){return __(e)&&v1(e.length)&&!!i0[g_(e)]}function o0(e){return function(t){return e(t)}}var s0=typeof exports==`object`&&exports&&!exports.nodeType&&exports,c0=s0&&typeof module==`object`&&module&&!module.nodeType&&module,l0=c0&&c0.exports===s0&&n_.process,u0=function(){try{return c0&&c0.require&&c0.require(`util`).types||l0&&l0.binding&&l0.binding(`util`)}catch{}}(),d0=u0&&u0.isTypedArray,f0=d0?o0(d0):a0,p0=Object.prototype.hasOwnProperty;function m0(e,t){var n=x_(e),r=!n&&O1(e),i=!n&&!r&&N1(e),a=!n&&!r&&!i&&f0(e),o=n||r||i||a,s=o?S1(e.length,String):[],c=s.length;for(var l in e)(t||p0.call(e,l))&&!(o&&(l==`length`||i&&(l==`offset`||l==`parent`)||a&&(l==`buffer`||l==`byteLength`||l==`byteOffset`)||f1(l,c)))&&s.push(l);return s}function h0(e,t){return function(n){return e(t(n))}}var g0=h0(Object.keys,Object),_0=Object.prototype.hasOwnProperty;function v0(e){if(!x1(e))return g0(e);var t=[];for(var n in Object(e))_0.call(e,n)&&n!=`constructor`&&t.push(n);return t}function y0(e){return y1(e)?m0(e):v0(e)}var b0=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,x0=/^\w*$/;function S0(e,t){if(x_(e))return!1;var n=typeof e;return n==`number`||n==`symbol`||n==`boolean`||e==null||y_(e)?!0:x0.test(e)||!b0.test(e)||t!=null&&e in Object(t)}var C0=q_(Object,`create`),w0=`__lodash_hash_undefined__`,T0=Object.prototype.hasOwnProperty,E0=Object.prototype.hasOwnProperty,D0=`__lodash_hash_undefined__`;function O0(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}O0.prototype.clear=function(){this.__data__=C0?C0(null):{},this.size=0},O0.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=+!!t,t},O0.prototype.get=function(e){var t=this.__data__;if(C0){var n=t[e];return n===w0?void 0:n}return T0.call(t,e)?t[e]:void 0},O0.prototype.has=function(e){var t=this.__data__;return C0?t[e]!==void 0:E0.call(t,e)},O0.prototype.set=function(e,t){var n=this.__data__;return this.size+=+!this.has(e),n[e]=C0&&t===void 0?D0:t,this};function k0(e,t){for(var n=e.length;n--;)if(p1(e[n][0],t))return n;return-1}var A0=Array.prototype.splice;function j0(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}j0.prototype.clear=function(){this.__data__=[],this.size=0},j0.prototype.delete=function(e){var t=this.__data__,n=k0(t,e);return n<0?!1:(n==t.length-1?t.pop():A0.call(t,n,1),--this.size,!0)},j0.prototype.get=function(e){var t=this.__data__,n=k0(t,e);return n<0?void 0:t[n][1]},j0.prototype.has=function(e){return k0(this.__data__,e)>-1},j0.prototype.set=function(e,t){var n=this.__data__,r=k0(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};var M0=q_(i_,`Map`);function N0(e){var t=typeof e;return t==`string`||t==`number`||t==`symbol`||t==`boolean`?e!==`__proto__`:e===null}function P0(e,t){var n=e.__data__;return N0(t)?n[typeof t==`string`?`string`:`hash`]:n.map}function F0(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}F0.prototype.clear=function(){this.size=0,this.__data__={hash:new O0,map:new(M0||j0),string:new O0}},F0.prototype.delete=function(e){var t=P0(this,e).delete(e);return this.size-=+!!t,t},F0.prototype.get=function(e){return P0(this,e).get(e)},F0.prototype.has=function(e){return P0(this,e).has(e)},F0.prototype.set=function(e,t){var n=P0(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};var I0=`Expected a function`;function L0(e,t){if(typeof e!=`function`||t!=null&&typeof t!=`function`)throw TypeError(I0);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);var o=e.apply(this,r);return n.cache=a.set(i,o)||a,o};return n.cache=new(L0.Cache||F0),n}L0.Cache=F0;var R0=500;function z0(e){var t=L0(e,function(e){return n.size===R0&&n.clear(),e}),n=t.cache;return t}var B0=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,V0=/\\(\\)?/g,H0=z0(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(``),e.replace(B0,function(e,n,r,i){t.push(r?i.replace(V0,`$1`):n||e)}),t});function U0(e){return e==null?``:T_(e)}function W0(e,t){return x_(e)?e:S0(e,t)?[e]:H0(U0(e))}var G0=1/0;function K0(e){if(typeof e==`string`||y_(e))return e;var t=e+``;return t==`0`&&1/e==-G0?`-0`:t}function q0(e,t){t=W0(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[K0(t[n++])];return n&&n==r?e:void 0}function J0(e,t,n){var r=e==null?void 0:q0(e,t);return r===void 0?n:r}function Y0(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}var X0=a_?a_.isConcatSpreadable:void 0;function Z0(e){return x_(e)||O1(e)||!!(X0&&e&&e[X0])}function Q0(e,t,n,r,i){var a=-1,o=e.length;for(n||=Z0,i||=[];++a<o;){var s=e[a];t>0&&n(s)?t>1?Q0(s,t-1,n,r,i):Y0(i,s):r||(i[i.length]=s)}return i}function $0(e,t,n,r){var i=-1,a=e==null?0:e.length;for(r&&a&&(n=e[++i]);++i<a;)n=t(n,e[i],i,e);return n}var ev=200;function tv(e){var t=this.__data__=new j0(e);this.size=t.size}tv.prototype.clear=function(){this.__data__=new j0,this.size=0},tv.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},tv.prototype.get=function(e){return this.__data__.get(e)},tv.prototype.has=function(e){return this.__data__.has(e)},tv.prototype.set=function(e,t){var n=this.__data__;if(n instanceof j0){var r=n.__data__;if(!M0||r.length<ev-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new F0(r)}return n.set(e,t),this.size=n.size,this};function nv(e,t){for(var n=-1,r=e==null?0:e.length,i=0,a=[];++n<r;){var o=e[n];t(o,n,e)&&(a[i++]=o)}return a}function rv(){return[]}var iv=Object.prototype.propertyIsEnumerable,av=Object.getOwnPropertySymbols,ov=av?function(e){return e==null?[]:(e=Object(e),nv(av(e),function(t){return iv.call(e,t)}))}:rv;function sv(e,t,n){var r=t(e);return x_(e)?r:Y0(r,n(e))}function cv(e){return sv(e,y0,ov)}var lv=q_(i_,`DataView`),uv=q_(i_,`Promise`),dv=q_(i_,`Set`),fv=`[object Map]`,pv=`[object Object]`,mv=`[object Promise]`,hv=`[object Set]`,gv=`[object WeakMap]`,_v=`[object DataView]`,vv=L_(lv),yv=L_(M0),bv=L_(uv),xv=L_(dv),Sv=L_(J_),Cv=g_;(lv&&Cv(new lv(new ArrayBuffer(1)))!=_v||M0&&Cv(new M0)!=fv||uv&&Cv(uv.resolve())!=mv||dv&&Cv(new dv)!=hv||J_&&Cv(new J_)!=gv)&&(Cv=function(e){var t=g_(e),n=t==pv?e.constructor:void 0,r=n?L_(n):``;if(r)switch(r){case vv:return _v;case yv:return fv;case bv:return mv;case xv:return hv;case Sv:return gv}return t});var wv=Cv,Tv=i_.Uint8Array,Ev=`__lodash_hash_undefined__`;function Dv(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new F0;++t<n;)this.add(e[t])}Dv.prototype.add=Dv.prototype.push=function(e){return this.__data__.set(e,Ev),this},Dv.prototype.has=function(e){return this.__data__.has(e)};function Ov(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function kv(e,t){return e.has(t)}var Av=1,jv=2;function Mv(e,t,n,r,i,a){var o=n&Av,s=e.length,c=t.length;if(s!=c&&!(o&&c>s))return!1;var l=a.get(e),u=a.get(t);if(l&&u)return l==t&&u==e;var d=-1,f=!0,p=n&jv?new Dv:void 0;for(a.set(e,t),a.set(t,e);++d<s;){var m=e[d],h=t[d];if(r)var g=o?r(h,m,d,t,e,a):r(m,h,d,e,t,a);if(g!==void 0){if(g)continue;f=!1;break}if(p){if(!Ov(t,function(e,t){if(!kv(p,t)&&(m===e||i(m,e,n,r,a)))return p.push(t)})){f=!1;break}}else if(!(m===h||i(m,h,n,r,a))){f=!1;break}}return a.delete(e),a.delete(t),f}function Nv(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}function Pv(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}var Fv=1,Iv=2,Lv=`[object Boolean]`,Rv=`[object Date]`,zv=`[object Error]`,Bv=`[object Map]`,Vv=`[object Number]`,Hv=`[object RegExp]`,Uv=`[object Set]`,Wv=`[object String]`,Gv=`[object Symbol]`,Kv=`[object ArrayBuffer]`,qv=`[object DataView]`,Jv=a_?a_.prototype:void 0,Yv=Jv?Jv.valueOf:void 0;function Xv(e,t,n,r,i,a,o){switch(n){case qv:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Kv:return!(e.byteLength!=t.byteLength||!a(new Tv(e),new Tv(t)));case Lv:case Rv:case Vv:return p1(+e,+t);case zv:return e.name==t.name&&e.message==t.message;case Hv:case Wv:return e==t+``;case Bv:var s=Nv;case Uv:var c=r&Fv;if(s||=Pv,e.size!=t.size&&!c)return!1;var l=o.get(e);if(l)return l==t;r|=Iv,o.set(e,t);var u=Mv(s(e),s(t),r,i,a,o);return o.delete(e),u;case Gv:if(Yv)return Yv.call(e)==Yv.call(t)}return!1}var Zv=1,Qv=Object.prototype.hasOwnProperty;function $v(e,t,n,r,i,a){var o=n&Zv,s=cv(e),c=s.length;if(c!=cv(t).length&&!o)return!1;for(var l=c;l--;){var u=s[l];if(!(o?u in t:Qv.call(t,u)))return!1}var d=a.get(e),f=a.get(t);if(d&&f)return d==t&&f==e;var p=!0;a.set(e,t),a.set(t,e);for(var m=o;++l<c;){u=s[l];var h=e[u],g=t[u];if(r)var _=o?r(g,h,u,t,e,a):r(h,g,u,e,t,a);if(!(_===void 0?h===g||i(h,g,n,r,a):_)){p=!1;break}m||=u==`constructor`}if(p&&!m){var v=e.constructor,y=t.constructor;v!=y&&`constructor`in e&&`constructor`in t&&!(typeof v==`function`&&v instanceof v&&typeof y==`function`&&y instanceof y)&&(p=!1)}return a.delete(e),a.delete(t),p}var ey=1,ty=`[object Arguments]`,ny=`[object Array]`,ry=`[object Object]`,iy=Object.prototype.hasOwnProperty;function ay(e,t,n,r,i,a){var o=x_(e),s=x_(t),c=o?ny:wv(e),l=s?ny:wv(t);c=c==ty?ry:c,l=l==ty?ry:l;var u=c==ry,d=l==ry,f=c==l;if(f&&N1(e)){if(!N1(t))return!1;o=!0,u=!1}if(f&&!u)return a||=new tv,o||f0(e)?Mv(e,t,n,r,i,a):Xv(e,t,c,n,r,i,a);if(!(n&ey)){var p=u&&iy.call(e,`__wrapped__`),m=d&&iy.call(t,`__wrapped__`);if(p||m){var h=p?e.value():e,g=m?t.value():t;return a||=new tv,i(h,g,n,r,a)}}return f?(a||=new tv,$v(e,t,n,r,i,a)):!1}function oy(e,t,n,r,i){return e===t?!0:e==null||t==null||!__(e)&&!__(t)?e!==e&&t!==t:ay(e,t,n,r,oy,i)}var sy=1,cy=2;function ly(e,t,n,r){var i=n.length,a=i,o=!r;if(e==null)return!a;for(e=Object(e);i--;){var s=n[i];if(o&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++i<a;){s=n[i];var c=s[0],l=e[c],u=s[1];if(o&&s[2]){if(l===void 0&&!(c in e))return!1}else{var d=new tv;if(r)var f=r(l,u,c,e,t,d);if(!(f===void 0?oy(u,l,sy|cy,r,d):f))return!1}}return!0}function uy(e){return e===e&&!E_(e)}function dy(e){for(var t=y0(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,uy(i)]}return t}function fy(e,t){return function(n){return n!=null&&n[e]===t&&(t!==void 0||e in Object(n))}}function py(e){var t=dy(e);return t.length==1&&t[0][2]?fy(t[0][0],t[0][1]):function(n){return n===e||ly(n,e,t)}}function my(e,t){return e!=null&&t in Object(e)}function hy(e,t,n){t=W0(t,e);for(var r=-1,i=t.length,a=!1;++r<i;){var o=K0(t[r]);if(!(a=e!=null&&n(e,o)))break;e=e[o]}return a||++r!=i?a:(i=e==null?0:e.length,!!i&&v1(i)&&f1(o,i)&&(x_(e)||O1(e)))}function gy(e,t){return e!=null&&hy(e,t,my)}var _y=1,vy=2;function yy(e,t){return S0(e)&&uy(t)?fy(K0(e),t):function(n){var r=J0(n,e);return r===void 0&&r===t?gy(n,e):oy(t,r,_y|vy)}}function by(e){return function(t){return t?.[e]}}function xy(e){return function(t){return q0(t,e)}}function Sy(e){return S0(e)?by(K0(e)):xy(e)}function Cy(e){return typeof e==`function`?e:e==null?D_:typeof e==`object`?x_(e)?yy(e[0],e[1]):py(e):Sy(e)}function wy(e){return function(t,n,r){for(var i=-1,a=Object(t),o=r(t),s=o.length;s--;){var c=o[e?s:++i];if(n(a[c],c,a)===!1)break}return t}}var Ty=wy();function Ey(e,t){return e&&Ty(e,t,y0)}function Dy(e,t){return function(n,r){if(n==null)return n;if(!y1(n))return e(n,r);for(var i=n.length,a=t?i:-1,o=Object(n);(t?a--:++a<i)&&r(o[a],a,o)!==!1;);return n}}var Oy=Dy(Ey);function ky(e){return __(e)&&y1(e)}function Ay(e,t,n){for(var r=-1,i=e==null?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}function jy(e){return typeof e==`function`?e:D_}function My(e,t){return(x_(e)?i1:Oy)(e,jy(t))}function Ny(e,t){var n=[];return Oy(e,function(e,r,i){t(e,r,i)&&n.push(e)}),n}function Py(e,t){return(x_(e)?nv:Ny)(e,Cy(t,3))}function Fy(e,t){return b_(t,function(t){return e[t]})}function Iy(e){return e==null?[]:Fy(e,y0(e))}var Ly=`[object Map]`,Ry=`[object Set]`,zy=Object.prototype.hasOwnProperty;function By(e){if(e==null)return!0;if(y1(e)&&(x_(e)||typeof e==`string`||typeof e.splice==`function`||N1(e)||f0(e)||O1(e)))return!e.length;var t=wv(e);if(t==Ly||t==Ry)return!e.size;if(x1(e))return!v0(e).length;for(var n in e)if(zy.call(e,n))return!1;return!0}function Vy(e){return e===void 0}function Hy(e,t,n,r,i){return i(e,function(e,i,a){n=r?(r=!1,e):t(n,e,i,a)}),n}function Uy(e,t,n){var r=x_(e)?$0:Hy,i=arguments.length<3;return r(e,Cy(t,4),n,i,Oy)}var Wy=dv&&1/Pv(new dv([,-0]))[1]==1/0?function(e){return new dv(e)}:X_,Gy=200;function Ky(e,t,n){var r=-1,i=l1,a=e.length,o=!0,s=[],c=s;if(n)o=!1,i=Ay;else if(a>=Gy){var l=t?null:Wy(e);if(l)return Pv(l);o=!1,i=kv,c=new Dv}else c=t?[]:s;e:for(;++r<a;){var u=e[r],d=t?t(u):u;if(u=n||u!==0?u:0,o&&d===d){for(var f=c.length;f--;)if(c[f]===d)continue e;t&&c.push(d),s.push(u)}else i(c,d,n)||(c!==s&&c.push(d),s.push(u))}return s}var qy=g1(function(e){return Ky(Q0(e,1,ky,!0))}),Jy=`\0`,Yy=`\0`,Xy=``,Zy=class{constructor(e={}){this._isDirected=!Object.prototype.hasOwnProperty.call(e,`directed`)||e.directed,this._isMultigraph=Object.prototype.hasOwnProperty.call(e,`multigraph`)?e.multigraph:!1,this._isCompound=Object.prototype.hasOwnProperty.call(e,`compound`)?e.compound:!1,this._label=void 0,this._defaultNodeLabelFn=t1(void 0),this._defaultEdgeLabelFn=t1(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[Yy]={}),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(e){return this._label=e,this}graph(){return this._label}setDefaultNodeLabel(e){return M_(e)||(e=t1(e)),this._defaultNodeLabelFn=e,this}nodeCount(){return this._nodeCount}nodes(){return y0(this._nodes)}sources(){var e=this;return Py(this.nodes(),function(t){return By(e._in[t])})}sinks(){var e=this;return Py(this.nodes(),function(t){return By(e._out[t])})}setNodes(e,t){var n=arguments,r=this;return My(e,function(e){n.length>1?r.setNode(e,t):r.setNode(e)}),this}setNode(e,t){return Object.prototype.hasOwnProperty.call(this._nodes,e)?(arguments.length>1&&(this._nodes[e]=t),this):(this._nodes[e]=arguments.length>1?t:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]=Yy,this._children[e]={},this._children[Yy][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount,this)}node(e){return this._nodes[e]}hasNode(e){return Object.prototype.hasOwnProperty.call(this._nodes,e)}removeNode(e){if(Object.prototype.hasOwnProperty.call(this._nodes,e)){var t=e=>this.removeEdge(this._edgeObjs[e]);delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],My(this.children(e),e=>{this.setParent(e)}),delete this._children[e]),My(y0(this._in[e]),t),delete this._in[e],delete this._preds[e],My(y0(this._out[e]),t),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this}setParent(e,t){if(!this._isCompound)throw Error(`Cannot set parent in a non-compound graph`);if(Vy(t))t=Yy;else{t+=``;for(var n=t;!Vy(n);n=this.parent(n))if(n===e)throw Error(`Setting `+t+` as parent of `+e+` would create a cycle`);this.setNode(t)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=t,this._children[t][e]=!0,this}_removeFromParentsChildList(e){delete this._children[this._parent[e]][e]}parent(e){if(this._isCompound){var t=this._parent[e];if(t!==Yy)return t}}children(e){if(Vy(e)&&(e=Yy),this._isCompound){var t=this._children[e];if(t)return y0(t)}else if(e===Yy)return this.nodes();else if(this.hasNode(e))return[]}predecessors(e){var t=this._preds[e];if(t)return y0(t)}successors(e){var t=this._sucs[e];if(t)return y0(t)}neighbors(e){var t=this.predecessors(e);if(t)return qy(t,this.successors(e))}isLeaf(e){return(this.isDirected()?this.successors(e):this.neighbors(e)).length===0}filterNodes(e){var t=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});t.setGraph(this.graph());var n=this;My(this._nodes,function(n,r){e(r)&&t.setNode(r,n)}),My(this._edgeObjs,function(e){t.hasNode(e.v)&&t.hasNode(e.w)&&t.setEdge(e,n.edge(e))});var r={};function i(e){var a=n.parent(e);return a===void 0||t.hasNode(a)?(r[e]=a,a):a in r?r[a]:i(a)}return this._isCompound&&My(t.nodes(),function(e){t.setParent(e,i(e))}),t}setDefaultEdgeLabel(e){return M_(e)||(e=t1(e)),this._defaultEdgeLabelFn=e,this}edgeCount(){return this._edgeCount}edges(){return Iy(this._edgeObjs)}setPath(e,t){var n=this,r=arguments;return Uy(e,function(e,i){return r.length>1?n.setEdge(e,i,t):n.setEdge(e,i),i}),this}setEdge(){var e,t,n,r,i=!1,a=arguments[0];typeof a==`object`&&a&&`v`in a?(e=a.v,t=a.w,n=a.name,arguments.length===2&&(r=arguments[1],i=!0)):(e=a,t=arguments[1],n=arguments[3],arguments.length>2&&(r=arguments[2],i=!0)),e=``+e,t=``+t,Vy(n)||(n=``+n);var o=e2(this._isDirected,e,t,n);if(Object.prototype.hasOwnProperty.call(this._edgeLabels,o))return i&&(this._edgeLabels[o]=r),this;if(!Vy(n)&&!this._isMultigraph)throw Error(`Cannot set a named edge when isMultigraph = false`);this.setNode(e),this.setNode(t),this._edgeLabels[o]=i?r:this._defaultEdgeLabelFn(e,t,n);var s=t2(this._isDirected,e,t,n);return e=s.v,t=s.w,Object.freeze(s),this._edgeObjs[o]=s,Qy(this._preds[t],e),Qy(this._sucs[e],t),this._in[t][o]=s,this._out[e][o]=s,this._edgeCount++,this}edge(e,t,n){var r=arguments.length===1?n2(this._isDirected,arguments[0]):e2(this._isDirected,e,t,n);return this._edgeLabels[r]}hasEdge(e,t,n){var r=arguments.length===1?n2(this._isDirected,arguments[0]):e2(this._isDirected,e,t,n);return Object.prototype.hasOwnProperty.call(this._edgeLabels,r)}removeEdge(e,t,n){var r=arguments.length===1?n2(this._isDirected,arguments[0]):e2(this._isDirected,e,t,n),i=this._edgeObjs[r];return i&&(e=i.v,t=i.w,delete this._edgeLabels[r],delete this._edgeObjs[r],$y(this._preds[t],e),$y(this._sucs[e],t),delete this._in[t][r],delete this._out[e][r],this._edgeCount--),this}inEdges(e,t){var n=this._in[e];if(n){var r=Iy(n);return t?Py(r,function(e){return e.v===t}):r}}outEdges(e,t){var n=this._out[e];if(n){var r=Iy(n);return t?Py(r,function(e){return e.w===t}):r}}nodeEdges(e,t){var n=this.inEdges(e,t);if(n)return n.concat(this.outEdges(e,t))}};Zy.prototype._nodeCount=0,Zy.prototype._edgeCount=0;function Qy(e,t){e[t]?e[t]++:e[t]=1}function $y(e,t){--e[t]||delete e[t]}function e2(e,t,n,r){var i=``+t,a=``+n;if(!e&&i>a){var o=i;i=a,a=o}return i+Xy+a+Xy+(Vy(r)?Jy:r)}function t2(e,t,n,r){var i=``+t,a=``+n;if(!e&&i>a){var o=i;i=a,a=o}var s={v:i,w:a};return r&&(s.name=r),s}function n2(e,t){return e2(e,t.v,t.w,t.name)}var r2=i(async(e,t)=>{let n=B(),{themeVariables:r,handDrawnSeed:i}=n,{clusterBkg:a,clusterBorder:o}=r,s=o,{labelStyles:c,nodeStyles:u,borderStyles:d,backgroundStyles:f}=W(t),p=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),m=En(n.flowchart.htmlLabels),h=t.direction===`LR`,g=p.insert(`g`).attr(`class`,`cluster-label swimlane-label`),_=await hf(g,t.label,{style:t.labelStyle,useHtmlLabels:m,isNode:!0,width:t.width}),v=_.getBBox();if(m){let e=_.children[0],t=V(_);v=e.getBoundingClientRect(),t.attr(`width`,v.width),t.attr(`height`,v.height)}let y=t.padding??0,b=t.width<=v.width+y?v.width+y:t.width;t.diff=t.width<=v.width+y?(b-t.width)/2-y:-y;let x=t.height,S=t.y-x/2,C=t.y+x/2,w=t.x-b/2,T=t.swimlaneContentTop===void 0?S+x/3:t.swimlaneContentTop,E=h?4:0,D=v.height+2*E,O,k;if(h){let e=Math.max(D,v.height+2*E),n=w+e,r=Math.max(0,b-e);if(t.look===`handDrawn`){let o=q.svg(p),c=G(t,{roughness:.7,fill:a,stroke:s,fillWeight:3,seed:i}),l=G(t,{roughness:.7,fill:`none`,stroke:s,seed:i}),u=o.rectangle(w,S,e,x,c);O=p.insert(()=>u,`:first-child`);let m=o.rectangle(n,S,r,x,l);k=p.insert(()=>m,`:first-child`),O.select(`path:nth-child(2)`).attr(`style`,d.join(`;`)),O.select(`path`).attr(`style`,f.join(`;`).replace(`fill`,`stroke`))}else O=p.insert(`rect`,`:first-child`),k=p.insert(`rect`,`:first-child`),O.attr(`class`,`swimlane-title`).attr(`style`,u).attr(`x`,w).attr(`y`,S).attr(`width`,e).attr(`height`,x).attr(`fill`,a).attr(`stroke`,s),k.attr(`class`,`swimlane-body`).attr(`style`,u).attr(`x`,n).attr(`y`,S).attr(`width`,r).attr(`height`,x).attr(`fill`,`none`).attr(`stroke`,s);let o=w+e/2,c=t.y;g.attr(`transform`,`translate(${o}, ${c}) rotate(-90) translate(${-v.width/2}, ${-v.height/2})`)}else{let e=Math.max(0,T-S),n=Math.min(D,e),r=S+n,o=Math.max(0,C-r),c=t.x-b/2;if(t.look===`handDrawn`){let e=q.svg(p),l=G(t,{roughness:.7,fill:a,stroke:s,fillWeight:3,seed:i}),u=G(t,{roughness:.7,fill:`none`,stroke:s,seed:i}),m=e.rectangle(c,S,b,n,l);O=p.insert(()=>m,`:first-child`);let h=e.rectangle(c,r,b,o,u);k=p.insert(()=>h,`:first-child`),O.select(`path:nth-child(2)`).attr(`style`,d.join(`;`)),O.select(`path`).attr(`style`,f.join(`;`).replace(`fill`,`stroke`))}else O=p.insert(`rect`,`:first-child`),k=p.insert(`rect`,`:first-child`),O.attr(`class`,`swimlane-title`).attr(`style`,u).attr(`x`,c).attr(`y`,S).attr(`width`,b).attr(`height`,n).attr(`fill`,a).attr(`stroke`,s),k.attr(`class`,`swimlane-body`).attr(`style`,u).attr(`x`,c).attr(`y`,r).attr(`width`,b).attr(`height`,o).attr(`fill`,`none`).attr(`stroke`,s);let l=t.x-v.width/2,m=S+(n-v.height)/2;g.attr(`transform`,`translate(${l}, ${m})`)}if(l.trace(`Swimlane data `,t,JSON.stringify(t)),c){let e=g.select(`span`);e&&e.attr(`style`,c)}return t.offsetX=0,t.width=b,t.height=x,t.offsetY=v.height-y/2,t.intersect=function(e){return Lp(t,e)},{cluster:p,labelBBox:v}},`swimlane`),i2=i(async(e,t)=>{l.info(`Creating subgraph rect for `,t.id,t);let n=B(),{themeVariables:r,handDrawnSeed:i}=n,{clusterBkg:a,clusterBorder:o}=r,{labelStyles:s,nodeStyles:c,borderStyles:u,backgroundStyles:d}=W(t),f=e.insert(`g`).attr(`class`,`cluster `+t.cssClasses).attr(`id`,t.domId).attr(`data-look`,t.look),p=Gn(n),m=f.insert(`g`).attr(`class`,`cluster-label `),h;h=t.labelType===`markdown`?await hf(m,t.label,{style:t.labelStyle,useHtmlLabels:p,isNode:!0,width:t.width}):await zp(m,t.label,t.labelStyle||``,!1,!0);let g=h.getBBox();if(Gn(n)){let e=h.children[0],t=V(h);g=e.getBoundingClientRect(),t.attr(`width`,g.width),t.attr(`height`,g.height)}let _=t.width<=g.width+t.padding?g.width+t.padding:t.width;t.diff=t.width<=g.width+t.padding?(_-t.width)/2-t.padding:-t.padding;let v=t.height,y=t.x-_/2,b=t.y-v/2;l.trace(`Data `,t,JSON.stringify(t));let x;if(t.look===`handDrawn`){let e=q.svg(f),n=G(t,{roughness:.7,fill:a,stroke:o,fillWeight:3,seed:i}),r=e.path(Rp(y,b,_,v,0),n);x=f.insert(()=>(l.debug(`Rough node insert CXC`,r),r),`:first-child`),x.select(`path:nth-child(2)`).attr(`style`,u.join(`;`)),x.select(`path`).attr(`style`,d.join(`;`).replace(`fill`,`stroke`))}else x=f.insert(`rect`,`:first-child`),x.attr(`style`,c).attr(`rx`,t.rx).attr(`ry`,t.ry).attr(`x`,y).attr(`y`,b).attr(`width`,_).attr(`height`,v);let{subGraphTitleTopMargin:S}=gg(n);if(m.attr(`transform`,`translate(${t.x-g.width/2}, ${t.y-t.height/2+S})`),s){let e=m.select(`span`);e&&e.attr(`style`,s)}let C=x.node().getBBox();return t.offsetX=0,t.width=C.width,t.height=C.height,t.offsetY=g.height-t.padding/2,t.intersect=function(e){return Lp(t,e)},{cluster:f,labelBBox:g}},`rect`),a2={rect:i2,squareRect:i2,roundedWithTitle:i(async(e,t)=>{let n=B(),{themeVariables:r,handDrawnSeed:i}=n,{altBackground:a,compositeBackground:o,compositeTitleBackground:s,nodeBorder:c}=r,l=e.insert(`g`).attr(`class`,t.cssClasses).attr(`id`,t.domId).attr(`data-id`,t.id).attr(`data-look`,t.look),u=l.insert(`g`,`:first-child`),d=l.insert(`g`).attr(`class`,`cluster-label`),f=l.append(`rect`),p=await zp(d,t.label,t.labelStyle,void 0,!0),m=p.getBBox();if(Gn(n)){let e=p.children[0],t=V(p);m=e.getBoundingClientRect(),t.attr(`width`,m.width),t.attr(`height`,m.height)}let h=0*t.padding,g=h/2,_=(t.width<=m.width+t.padding?m.width+t.padding:t.width)+h;t.diff=t.width<=m.width+t.padding?(_-t.width)/2-t.padding:-t.padding;let v=t.height+h,y=t.height+h-m.height-6,b=t.x-_/2,x=t.y-v/2;t.width=_;let S=t.y-t.height/2-g+m.height+2,C;if(t.look===`handDrawn`){let e=t.cssClasses.includes(`statediagram-cluster-alt`),n=q.svg(l),r=t.rx||t.ry?n.path(Rp(b,x,_,v,10),{roughness:.7,fill:s,fillStyle:`solid`,stroke:c,seed:i}):n.rectangle(b,x,_,v,{seed:i});C=l.insert(()=>r,`:first-child`);let u=n.rectangle(b,S,_,y,{fill:e?a:o,fillStyle:e?`hachure`:`solid`,stroke:c,seed:i});C=l.insert(()=>r,`:first-child`),f=l.insert(()=>u)}else C=u.insert(`rect`,`:first-child`),C.attr(`class`,`outer`).attr(`x`,b).attr(`y`,x).attr(`width`,_).attr(`height`,v).attr(`data-look`,t.look),f.attr(`class`,`inner`).attr(`x`,b).attr(`y`,S).attr(`width`,_).attr(`height`,y);return d.attr(`transform`,`translate(${t.x-m.width/2}, ${x+1-(Gn(n)?0:3)})`),t.height=C.node().getBBox().height,t.offsetX=0,t.offsetY=m.height-t.padding/2,t.labelBBox=m,t.intersect=function(e){return Lp(t,e)},{cluster:l,labelBBox:m}},`roundedWithTitle`),noteGroup:i((e,t)=>{let n=e.insert(`g`).attr(`class`,`note-cluster`).attr(`id`,t.domId),r=n.insert(`rect`,`:first-child`),i=0*t.padding,a=i/2;r.attr(`rx`,t.rx).attr(`ry`,t.ry).attr(`x`,t.x-t.width/2-a).attr(`y`,t.y-t.height/2-a).attr(`width`,t.width+i).attr(`height`,t.height+i).attr(`fill`,`none`);let o=r.node().getBBox();return t.width=o.width,t.height=o.height,t.intersect=function(e){return Lp(t,e)},{cluster:n,labelBBox:{width:0,height:0}}},`noteGroup`),divider:i((e,t)=>{let{themeVariables:n,handDrawnSeed:r}=B(),{nodeBorder:i}=n,a=e.insert(`g`).attr(`class`,t.cssClasses).attr(`id`,t.domId).attr(`data-look`,t.look),o=a.insert(`g`,`:first-child`),s=0*t.padding,c=t.width+s;t.diff=-t.padding;let l=t.height+s,u=t.x-c/2,d=t.y-l/2;t.width=c;let f;if(t.look===`handDrawn`){let e=q.svg(a).rectangle(u,d,c,l,{fill:`lightgrey`,roughness:.5,strokeLineDash:[5],stroke:i,seed:r});f=a.insert(()=>e,`:first-child`)}else{f=o.insert(`rect`,`:first-child`);let e=`outer`;e=(t.look,`divider`),f.attr(`class`,e).attr(`x`,u).attr(`y`,d).attr(`width`,c).attr(`height`,l).attr(`data-look`,t.look)}return t.height=f.node().getBBox().height,t.offsetX=0,t.offsetY=0,t.intersect=function(e){return Lp(t,e)},{cluster:a,labelBBox:{}}},`divider`),kanbanSection:i(async(e,t)=>{l.info(`Creating subgraph rect for `,t.id,t);let n=B(),{themeVariables:r,handDrawnSeed:i}=n,{clusterBkg:a,clusterBorder:o}=r,{labelStyles:s,nodeStyles:c,borderStyles:u,backgroundStyles:d}=W(t),f=e.insert(`g`).attr(`class`,`cluster `+t.cssClasses).attr(`id`,t.domId).attr(`data-look`,t.look),p=Gn(n),m=f.insert(`g`).attr(`class`,`cluster-label `),h=await hf(m,t.label,{style:t.labelStyle,useHtmlLabels:p,isNode:!0,width:t.width}),g=h.getBBox();if(Gn(n)){let e=h.children[0],t=V(h);g=e.getBoundingClientRect(),t.attr(`width`,g.width),t.attr(`height`,g.height)}let _=t.width<=g.width+t.padding?g.width+t.padding:t.width;t.diff=t.width<=g.width+t.padding?(_-t.width)/2-t.padding:-t.padding;let v=t.height,y=t.x-_/2,b=t.y-v/2;l.trace(`Data `,t,JSON.stringify(t));let x;if(t.look===`handDrawn`){let e=q.svg(f),n=G(t,{roughness:.7,fill:a,stroke:o,fillWeight:4,seed:i}),r=e.path(Rp(y,b,_,v,t.rx),n);x=f.insert(()=>(l.debug(`Rough node insert CXC`,r),r),`:first-child`),x.select(`path:nth-child(2)`).attr(`style`,u.join(`;`)),x.select(`path`).attr(`style`,d.join(`;`).replace(`fill`,`stroke`))}else x=f.insert(`rect`,`:first-child`),x.attr(`style`,c).attr(`rx`,t.rx).attr(`ry`,t.ry).attr(`x`,y).attr(`y`,b).attr(`width`,_).attr(`height`,v);let{subGraphTitleTopMargin:S}=gg(n);if(m.attr(`transform`,`translate(${t.x-g.width/2}, ${t.y-t.height/2+S})`),s){let e=m.select(`span`);e&&e.attr(`style`,s)}let C=x.node().getBBox();return t.offsetX=0,t.width=C.width,t.height=C.height,t.offsetY=g.height-t.padding/2,t.intersect=function(e){return Lp(t,e)},{cluster:f,labelBBox:g}},`kanbanSection`),swimlane:r2},o2=new Map,s2=i(async(e,t)=>{let n=await a2[t.shape||`rect`](e,t);return o2.set(t.id,n),n},`insertCluster`),c2=i(()=>{o2=new Map},`clear`),l2={common:Er,getConfig:z,insertCluster:s2,insertEdge:Yg,insertEdgeLabel:Rg,insertMarkers:t_,insertNode:vg,interpolateToCurve:Al,labelHelper:J,log:l,positionEdgeLabel:Bg},u2={},d2=i(e=>{for(let t of e)u2[t.name]=t},`registerLayoutLoaders`);i(()=>{d2([{name:`dagre`,loader:i(async()=>await n(()=>import(`./dagre-GXQ25YYZ-BVwOMWlS.js`),__vite__mapDeps([0,1])),`loader`)},{name:`swimlane`,loader:i(async()=>await n(()=>import(`./swimlanes-42K2YHIH-DMh0NoSR.js`),[]),`loader`)},{name:`cose-bilkent`,loader:i(async()=>await n(()=>import(`./cose-bilkent-JH36ORCC-XcptgDNS.js`),__vite__mapDeps([2,3,4,5])),`loader`)}])},`registerDefaultLayoutLoaders`)();var f2=i(async(e,t)=>{if(!(e.layoutAlgorithm in u2))throw Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);if(e.diagramId)for(let t of e.nodes){let n=t.domId||t.id;t.domId=`${e.diagramId}-${n}`}let n=u2[e.layoutAlgorithm],r=await n.loader(),{theme:i,themeVariables:a}=e.config,{useGradient:o,gradientStart:s,gradientStop:c}=a,l=t.attr(`id`);if(t.append(`defs`).append(`filter`).attr(`id`,`${l}-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`,`${i?.includes(`dark`)?`#FFFFFF`:`#000000`}`),t.append(`defs`).append(`filter`).attr(`id`,`${l}-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`,`${i?.includes(`dark`)?`#FFFFFF`:`#000000`}`),o){let e=t.append(`linearGradient`).attr(`id`,t.attr(`id`)+`-gradient`).attr(`gradientUnits`,`objectBoundingBox`).attr(`x1`,`0%`).attr(`y1`,`0%`).attr(`x2`,`100%`).attr(`y2`,`0%`);e.append(`svg:stop`).attr(`offset`,`0%`).attr(`stop-color`,s).attr(`stop-opacity`,1),e.append(`svg:stop`).attr(`offset`,`100%`).attr(`stop-color`,c).attr(`stop-opacity`,1)}return r.render(e,t,l2,{algorithm:n.algorithm})},`render`),p2=i((e=``,{fallback:t=`dagre`}={})=>{if(e in u2)return e;if(t in u2)return l.warn(`Layout algorithm ${e} is not registered. Using ${t} as fallback.`),t;throw Error(`Both layout algorithms ${e} and ${t} are not registered.`)},`getRegisteredLayoutAlgorithm`);function m2(e,{edgePathsClass:t=`edges edgePaths`}={}){let n=e.insert(`g`).attr(`class`,`root`);return{clusters:n.insert(`g`).attr(`class`,`clusters`),edgePaths:n.insert(`g`).attr(`class`,t),edgeLabels:n.insert(`g`).attr(`class`,`edgeLabels`),nodes:n.insert(`g`).attr(`class`,`nodes`),rootGroups:n}}i(m2,`createLayoutElementGroups`);async function h2(e,t){if(t.label){let{shapeSvg:n,bbox:r}=await J(e,t);t.labelBBox={width:r.width,height:r.height},n.remove()}else t.labelBBox={width:0,height:0}}i(h2,`measureGroupLabel`);async function g2(e,t,n){let r=await vg(e,t,n),i=r.node()?.getBBox()??{width:0,height:0};return t.width=i.width,t.height=i.height,r}i(g2,`insertMeasuredNode`);async function _2(e,t){let r=new Zy({multigraph:!0,compound:!0}),i=[...t.edges],a=B(),o=m2(e),{edgeLabels:s,nodes:c}=o,l=new Map,u=e.node()!=null;await Promise.all(t.nodes.map(async e=>{if(e.isGroup)u&&await h2(c,e),r.setNode(e.id,{...e});else{if(u){let t=await g2(c,e,{config:a,dir:e.dir});l.set(e.id,t)}r.setNode(e.id,{...e})}}));for(let e of i)u&&Ig(e)&&await Rg(s,e),r.setEdge(e.start,e.end,{...e},e.id),t.edges.some(t=>t.id===e.id)||t.edges.push(e);if(globalThis.mermaidCaptureSizes){let{captureNodeSizes:r}=await n(async()=>{let{captureNodeSizes:e}=await import(`./sizeCapture-INFHLROL-2x3la0Bj.js`);return{captureNodeSizes:e}},[]);r(e,t)}return{graph:r,groups:o,nodeElements:l}}i(_2,`createGraphWithElements`);var $=new Map,v2=new Map,y2=new Map,b2=i(()=>{v2.clear(),y2.clear(),$.clear()},`clear`),x2=i((e,t)=>{let n=v2.get(t)||[];return l.trace(`In isDescendant`,t,` `,e,` = `,n.includes(e)),n.includes(e)},`isDescendant`),S2=i((e,t)=>{let n=v2.get(t)||[];return l.info(`Descendants of `,t,` is `,n),l.info(`Edge is `,e),e.v===t||e.w===t?!1:n?n.includes(e.v)||x2(e.v,t)||x2(e.w,t)||n.includes(e.w):(l.debug(`Tilt, `,t,`,not in descendants`),!1)},`edgeInCluster`),C2=i((e,t,n,r)=>{l.debug(`Copying children of `,e,`root`,r,`data`,t.node(e),r);let i=t.children(e)||[];e!==r&&i.push(e),l.debug(`Copying (nodes) clusterId`,e,`nodes`,i),i.forEach(i=>{if(t.children(i).length>0)C2(i,t,n,r);else{let a=t.node(i);l.info(`cp `,i,` to `,r,` with parent `,e),n.setNode(i,a),r!==t.parent(i)&&(l.debug(`Setting parent`,i,t.parent(i)),n.setParent(i,t.parent(i))),e!==r&&i!==e?(l.debug(`Setting parent`,i,e),n.setParent(i,e)):(l.info(`In copy `,e,`root`,r,`data`,t.node(e),r),l.debug(`Not Setting parent for node=`,i,`cluster!==rootId`,e!==r,`node!==clusterId`,i!==e));let o=t.edges(i);l.debug(`Copying Edges`,o),o.forEach(i=>{l.info(`Edge`,i);let a=t.edge(i.v,i.w,i.name);l.info(`Edge data`,a,r);try{S2(i,r)?(l.info(`Copying as `,i.v,i.w,a,i.name),n.setEdge(i.v,i.w,a,i.name),l.info(`newGraph edges `,n.edges(),n.edge(n.edges()[0]))):l.info(`Skipping copy of edge `,i.v,`-->`,i.w,` rootId: `,r,` clusterId:`,e)}catch(e){l.error(e)}})}l.debug(`Removing node`,i),t.removeNode(i)})},`copy`),w2=i((e,t)=>{let n=t.children(e),r=[...n];for(let i of n)y2.set(i,e),r=[...r,...w2(i,t)];return r},`extractDescendants`),T2=i((e,t,n)=>{let r=e.edges().filter(e=>e.v===t||e.w===t),i=e.edges().filter(e=>e.v===n||e.w===n),a=r.map(e=>({v:e.v===t?n:e.v,w:e.w===t?t:e.w})),o=i.map(e=>({v:e.v,w:e.w}));return a.filter(e=>o.some(t=>e.v===t.v&&e.w===t.w))},`findCommonEdges`),E2=i((e,t,n)=>{let r=t.children(e);if(l.trace(`Searching children of id `,e,r),r.length<1)return e;let i;for(let e of r){let r=E2(e,t,n),a=T2(t,n,r);if(r){if(a.length>0)i=r;else return r}}return i},`findNonClusterChild`),D2=i(e=>!$.has(e)||!$.get(e).externalConnections?e:$.has(e)?$.get(e).id:e,`getAnchorId`),O2=i((e,t)=>{if(!e||t>10)l.debug(`Opting out, no graph `);else{l.debug(`Opting in, graph `),e.nodes().forEach(function(t){e.children(t).length>0&&(l.debug(`Cluster identified`,t,` Replacement id in edges: `,E2(t,e,t)),v2.set(t,w2(t,e)),$.set(t,{id:E2(t,e,t),clusterData:e.node(t)}))}),e.nodes().forEach(function(t){let n=e.children(t),r=e.edges();n.length>0?(l.debug(`Cluster identified`,t,v2),r.forEach(e=>{x2(e.v,t)^x2(e.w,t)&&(l.debug(`Edge: `,e,` leaves cluster `,t),l.debug(`Descendants of XXX `,t,`: `,v2.get(t)),$.get(t).externalConnections=!0)})):l.debug(`Not a cluster `,t,v2)});for(let t of $.keys()){let n=$.get(t).id,r=e.parent(n);r!==t&&$.has(r)&&!$.get(r).externalConnections&&($.get(t).id=r);let i=e.edges().some(e=>e.v===t);if(n&&$.get(t)?.externalConnections&&i&&M2(e,n,t)){let r=N2(e,t,e.parent(n));r&&($.get(t).id=r)}}e.edges().forEach(function(t){let n=e.edge(t);l.debug(`Edge `+t.v+` -> `+t.w+`: `+JSON.stringify(t)),l.debug(`Edge `+t.v+` -> `+t.w+`: `+JSON.stringify(e.edge(t)));let r=t.v,i=t.w;if(l.debug(`Fix XXX`,$,`ids:`,t.v,t.w,`Translating: `,$.get(t.v),` --- `,$.get(t.w)),$.get(t.v)||$.get(t.w)){if(l.debug(`Fixing and trying - removing XXX`,t.v,t.w,t.name),r=D2(t.v),i=D2(t.w),e.removeEdge(t.v,t.w,t.name),r!==t.v){let i=e.parent(r);$.get(i).externalConnections=!0,n.fromCluster=t.v}if(i!==t.w){let r=e.parent(i);$.get(r).externalConnections=!0,n.toCluster=t.w}l.debug(`Fix Replacing with XXX`,r,i,t.name),e.setEdge(r,i,n,t.name)}}),k2(e,0),l.trace($)}},`adjustClustersAndEdges`),k2=i((e,t)=>{if(t>10){l.error(`Bailing out`);return}let n=e.nodes(),r=!1;for(let t of n){let n=e.children(t);r||=n.length>0}if(!r)l.debug(`Done, no node has children`,e.nodes());else{l.debug(`Nodes = `,n,t);for(let r of n)if(l.debug(`Extracting node`,r,$,$.has(r)&&!$.get(r).externalConnections,!e.parent(r),e.node(r),e.children(`D`),` Depth `,t),!$.has(r))l.debug(`Not a cluster`,r,t);else if(!$.get(r).externalConnections&&e.children(r)&&e.children(r).length>0){l.debug(`Cluster without external connections, without a parent and with children`,r,t);let n=e.graph().rankdir===`TB`?`LR`:`TB`;$.get(r)?.clusterData?.dir&&(n=$.get(r).clusterData.dir,l.debug(`Fixing dir`,$.get(r).clusterData.dir,n));let i=new Zy({multigraph:!0,compound:!0}).setGraph({rankdir:n,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});C2(r,e,i,r),e.setNode(r,{clusterNode:!0,id:r,clusterData:$.get(r).clusterData,label:$.get(r).label,graph:i})}else l.debug(`Cluster ** `,r,` **not meeting the criteria !externalConnections:`,!$.get(r).externalConnections,` no parent: `,!e.parent(r),` children `,e.children(r)&&e.children(r).length>0,e.children(`D`),t),l.debug($);n=e.nodes(),l.debug(`New list of nodes`,n);for(let r of n){let n=e.node(r);l.debug(` Now next level`,r,n),n?.clusterNode&&k2(n.graph,t+1)}}},`extractor`),A2=i((e,t)=>{if(t.length===0)return[];let n=Object.assign([],t);return t.forEach(t=>{let r=A2(e,e.children(t));n=[...n,...r]}),n},`sorter`),j2=i(e=>A2(e,e.children()),`sortNodesByHierarchy`),M2=i((e,t,n)=>{let r=e.parent(t);for(;r&&r!==n;){let t=$.get(r);if(t&&!t.externalConnections)return!0;r=e.parent(r)}return!1},`isNodeInExtractableCluster`),N2=i((e,t,n)=>{let r=e.children(t)??[];for(let i of r){if(i===n||x2(i,n))continue;let r=E2(i,e,t);if(r&&!M2(e,r,t))return r}return null},`findSafeAnchorNode`);function P2({prepareLayout:e,measureLayout:t,runLayoutCore:n,paintLayout:r,afterPaint:a,paintOptions:o}){let s=t??I2;return i(async function(t,i,c,l){let u=i.select(`g`);(c?.insertMarkers??t_)(u,t.markers,t.type,t.diagramId),F2();let d={element:u,helpers:c,options:l};d.preparedLayout=await e?.(t,d);let f=await s(t,d),p=await n(t,d),m={...d,measure:f};r?await r(t,m,p):await L2(t,m,o),await a?.(t,m,p)},`render`)}i(P2,`createCommonLayoutRenderer`);function F2(){bg(),Fg(),c2(),b2()}i(F2,`clearLayoutRenderState`);async function I2(e,{element:t}){return await _2(t,e)}i(I2,`defaultMeasureLayout`);async function L2(e,t,n={}){let{measure:r}=t,{groups:i}=r;for(let r of n.getNodes?.(e,t)??e.nodes)n.skipNode?.(r,t)||await R2(i,r,t,n);let a=B2(e.nodes);for(let r of e.edges)V2(r,n)||await H2(i,r,a,e,n,t)}i(L2,`paintLayoutData`);async function R2(e,t,n,r){t.clusterNode?xg(t):z2(t,n,r)?await s2(e.clusters,t):xg(t)}i(R2,`paintLayoutNode`);function z2(e,t,n){return e.isGroup===!0&&(n.isCluster?.(e,t)??!0)}i(z2,`shouldPaintAsCluster`);function B2(e){let t=new Map;for(let n of e)n?.id&&t.set(n.id,n);return t}i(B2,`buildNodeLookup`);function V2(e,t){return e.isLayoutOnly||!!t.skipEdge?.(e)}i(V2,`shouldSkipPaintEdge`);async function H2(e,t,n,r,i,a){let o=Yg(e.edgePaths,{...t},i.clusterDb??new Map,r.type,U2(t.start,t,n,a,i),U2(t.end,t,n,a,i),r.diagramId,W2(t,i));Ig(t)&&(Ng.has(t.id)||await Rg(e.edgeLabels,t),G2(t,o))}i(H2,`paintLayoutEdge`);function U2(e,t,n,r,i){return i.getEdgeNode?.(e,t,r)??(e?n.get(e)??{}:{})}i(U2,`getRenderedNode`);function W2(e,t){return typeof t.skipIntersect==`function`?t.skipIntersect(e):t.skipIntersect??!1}i(W2,`shouldSkipIntersect`);function G2(e,t){let n=t?.updatedPath??t?.originalPath,{subGraphTitleTotalMargin:r}=gg({flowchart:z().flowchart??{}});if(e.label){let i=Ng.get(e.id),a=e.x,o=e.y;if(n){let r=au.calcLabelPosition(n);l.debug(`Moving label `+e.label+` from (`,a,`,`,o,`) to (`,r.x,`,`,r.y,`) abc88`),t?.updatedPath&&(a=r.x,o=r.y)}i.attr(`transform`,`translate(${a}, ${o+r/2})`)}if(e?.startLabelLeft){let t=Pg.get(e.id).startLeft,r=e?.x,i=e?.y;if(n){let t=au.calcTerminalLabelPosition(e.arrowTypeStart?10:0,`start_left`,n);r=t.x,i=t.y}t.attr(`transform`,`translate(${r}, ${i})`)}if(e.startLabelRight){let t=Pg.get(e.id).startRight,r=e.x,i=e.y;if(n){let t=au.calcTerminalLabelPosition(e.arrowTypeStart?10:0,`start_right`,n);r=t.x,i=t.y}t.attr(`transform`,`translate(${r}, ${i})`)}if(e.endLabelLeft){let t=Pg.get(e.id).endLeft,r=e.x,i=e.y;if(n){let t=au.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,`end_left`,n);r=t.x,i=t.y}t.attr(`transform`,`translate(${r}, ${i})`)}if(e.endLabelRight){let t=Pg.get(e.id).endRight,r=e.x,i=e.y;if(n){let t=au.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,`end_right`,n);r=t.x,i=t.y}t.attr(`transform`,`translate(${r}, ${i})`)}}i(G2,`positionRenderedEdgeLabel`);function K2(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,`default`)?e.default:e}i(K2,`getDefaultExportFromCjs`);var q2={},J2={},Y2={},X2;function Z2(){if(X2)return Y2;X2=1;function e(e){return e==null}i(e,`isNothing`);function t(e){return typeof e==`object`&&!!e}i(t,`isObject`);function n(t){return Array.isArray(t)?t:e(t)?[]:[t]}i(n,`toArray`);function r(e,t){if(t){let n=Object.keys(t);for(let r=0,i=n.length;r<i;r+=1){let i=n[r];e[i]=t[i]}}return e}i(r,`extend`);function a(e,t){let n=``;for(let r=0;r<t;r+=1)n+=e;return n}i(a,`repeat`);function o(e){return e===0&&1/e==-1/0}return i(o,`isNegativeZero`),Y2.isNothing=e,Y2.isObject=t,Y2.toArray=n,Y2.repeat=a,Y2.isNegativeZero=o,Y2.extend=r,Y2}i(Z2,`requireCommon`);var Q2,$2;function e4(){if($2)return Q2;$2=1;function e(e,t){let n=``,r=e.reason||`(unknown reason)`;return e.mark?(e.mark.name&&(n+=`in "`+e.mark.name+`" `),n+=`(`+(e.mark.line+1)+`:`+(e.mark.column+1)+`)`,!t&&e.mark.snippet&&(n+=`
|
|
271
|
+
|
|
272
|
+
`+e.mark.snippet),r+` `+n):r}i(e,`formatError`);function t(t,n){Error.call(this),this.name=`YAMLException`,this.reason=t,this.mark=n,this.message=e(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=Error().stack||``}return i(t,`YAMLException2`),t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t.prototype.toString=i(function(t){return this.name+`: `+e(this,t)},`toString`),Q2=t,Q2}i(e4,`requireException`);var t4,n4;function r4(){if(n4)return t4;n4=1;let e=Z2();function t(e,t,n,r,i){let a=``,o=``,s=Math.floor(i/2)-1;return r-t>s&&(a=` ... `,t=r-s+a.length),n-r>s&&(o=` ...`,n=r+s-o.length),{str:a+e.slice(t,n).replace(/\t/g,`→`)+o,pos:r-t+a.length}}i(t,`getLine`);function n(t,n){return e.repeat(` `,n-t.length)+t}i(n,`padStart`);function r(r,i){if(i=Object.create(i||null),!r.buffer)return null;i.maxLength||(i.maxLength=79),typeof i.indent!=`number`&&(i.indent=1),typeof i.linesBefore!=`number`&&(i.linesBefore=3),typeof i.linesAfter!=`number`&&(i.linesAfter=2);let a=/\r?\n|\r|\0/g,o=[0],s=[],c,l=-1;for(;c=a.exec(r.buffer);)s.push(c.index),o.push(c.index+c[0].length),r.position<=c.index&&l<0&&(l=o.length-2);l<0&&(l=o.length-1);let u=``,d=Math.min(r.line+i.linesAfter,s.length).toString().length,f=i.maxLength-(i.indent+d+3);for(let a=1;a<=i.linesBefore&&!(l-a<0);a++){let c=t(r.buffer,o[l-a],s[l-a],r.position-(o[l]-o[l-a]),f);u=e.repeat(` `,i.indent)+n((r.line-a+1).toString(),d)+` | `+c.str+`
|
|
273
|
+
`+u}let p=t(r.buffer,o[l],s[l],r.position,f);u+=e.repeat(` `,i.indent)+n((r.line+1).toString(),d)+` | `+p.str+`
|
|
274
|
+
`,u+=e.repeat(`-`,i.indent+d+3+p.pos)+`^
|
|
275
|
+
`;for(let a=1;a<=i.linesAfter&&!(l+a>=s.length);a++){let c=t(r.buffer,o[l+a],s[l+a],r.position-(o[l]-o[l+a]),f);u+=e.repeat(` `,i.indent)+n((r.line+a+1).toString(),d)+` | `+c.str+`
|
|
276
|
+
`}return u.replace(/\n$/,``)}return i(r,`makeSnippet`),t4=r,t4}i(r4,`requireSnippet`);var i4,a4;function o4(){if(a4)return i4;a4=1;let e=e4(),t=[`kind`,`multi`,`resolve`,`construct`,`instanceOf`,`predicate`,`represent`,`representName`,`defaultStyle`,`styleAliases`],n=[`scalar`,`sequence`,`mapping`];function r(e){let t={};return e!==null&&Object.keys(e).forEach(function(n){e[n].forEach(function(e){t[String(e)]=n})}),t}i(r,`compileStyleAliases`);function a(i,a){if(a||={},Object.keys(a).forEach(function(n){if(t.indexOf(n)===-1)throw new e(`Unknown option "`+n+`" is met in definition of "`+i+`" YAML type.`)}),this.options=a,this.tag=i,this.kind=a.kind||null,this.resolve=a.resolve||function(){return!0},this.construct=a.construct||function(e){return e},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=r(a.styleAliases||null),n.indexOf(this.kind)===-1)throw new e(`Unknown kind "`+this.kind+`" is specified for "`+i+`" YAML type.`)}return i(a,`Type2`),i4=a,i4}i(o4,`requireType`);var s4,c4;function l4(){if(c4)return s4;c4=1;let e=e4(),t=o4();function n(e,t){let n=[];return e[t].forEach(function(e){let t=n.length;n.forEach(function(n,r){n.tag===e.tag&&n.kind===e.kind&&n.multi===e.multi&&(t=r)}),n[t]=e}),n}i(n,`compileList`);function r(){let e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function t(t){t.multi?(e.multi[t.kind].push(t),e.multi.fallback.push(t)):e[t.kind][t.tag]=e.fallback[t.tag]=t}i(t,`collectType`);for(let e=0,n=arguments.length;e<n;e+=1)arguments[e].forEach(t);return e}i(r,`compileMap`);function a(e){return this.extend(e)}return i(a,`Schema2`),a.prototype.extend=i(function(i){let o=[],s=[];if(i instanceof t)s.push(i);else if(Array.isArray(i))s=s.concat(i);else if(i&&(Array.isArray(i.implicit)||Array.isArray(i.explicit)))i.implicit&&(o=o.concat(i.implicit)),i.explicit&&(s=s.concat(i.explicit));else throw new e(`Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })`);o.forEach(function(n){if(!(n instanceof t))throw new e(`Specified list of YAML types (or a single Type object) contains a non-Type object.`);if(n.loadKind&&n.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(n.multi)throw new e(`There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.`)}),s.forEach(function(n){if(!(n instanceof t))throw new e(`Specified list of YAML types (or a single Type object) contains a non-Type object.`)});let c=Object.create(a.prototype);return c.implicit=(this.implicit||[]).concat(o),c.explicit=(this.explicit||[]).concat(s),c.compiledImplicit=n(c,`implicit`),c.compiledExplicit=n(c,`explicit`),c.compiledTypeMap=r(c.compiledImplicit,c.compiledExplicit),c},`extend`),s4=a,s4}i(l4,`requireSchema`);var u4,d4;function f4(){return d4||(d4=1,u4=new(o4())(`tag:yaml.org,2002:str`,{kind:`scalar`,construct:i(function(e){return e===null?``:e},`construct`)})),u4}i(f4,`requireStr`);var p4,m4;function h4(){return m4||(m4=1,p4=new(o4())(`tag:yaml.org,2002:seq`,{kind:`sequence`,construct:i(function(e){return e===null?[]:e},`construct`)})),p4}i(h4,`requireSeq`);var g4,_4;function v4(){return _4||(_4=1,g4=new(o4())(`tag:yaml.org,2002:map`,{kind:`mapping`,construct:i(function(e){return e===null?{}:e},`construct`)})),g4}i(v4,`requireMap`);var y4,b4;function x4(){return b4||(b4=1,y4=new(l4())({explicit:[f4(),h4(),v4()]})),y4}i(x4,`requireFailsafe`);var S4,C4;function w4(){if(C4)return S4;C4=1;let e=o4();function t(e){if(e===null)return!0;let t=e.length;return t===1&&e===`~`||t===4&&(e===`null`||e===`Null`||e===`NULL`)}i(t,`resolveYamlNull`);function n(){return null}i(n,`constructYamlNull`);function r(e){return e===null}return i(r,`isNull`),S4=new e(`tag:yaml.org,2002:null`,{kind:`scalar`,resolve:t,construct:n,predicate:r,represent:{canonical:i(function(){return`~`},`canonical`),lowercase:i(function(){return`null`},`lowercase`),uppercase:i(function(){return`NULL`},`uppercase`),camelcase:i(function(){return`Null`},`camelcase`),empty:i(function(){return``},`empty`)},defaultStyle:`lowercase`}),S4}i(w4,`require_null`);var T4,E4;function D4(){if(E4)return T4;E4=1;let e=o4();function t(e){if(e===null)return!1;let t=e.length;return t===4&&(e===`true`||e===`True`||e===`TRUE`)||t===5&&(e===`false`||e===`False`||e===`FALSE`)}i(t,`resolveYamlBoolean`);function n(e){return e===`true`||e===`True`||e===`TRUE`}i(n,`constructYamlBoolean`);function r(e){return Object.prototype.toString.call(e)===`[object Boolean]`}return i(r,`isBoolean`),T4=new e(`tag:yaml.org,2002:bool`,{kind:`scalar`,resolve:t,construct:n,predicate:r,represent:{lowercase:i(function(e){return e?`true`:`false`},`lowercase`),uppercase:i(function(e){return e?`TRUE`:`FALSE`},`uppercase`),camelcase:i(function(e){return e?`True`:`False`},`camelcase`)},defaultStyle:`lowercase`}),T4}i(D4,`requireBool`);var O4,k4;function A4(){if(k4)return O4;k4=1;let e=Z2(),t=o4();function n(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}i(n,`isHexCode`);function r(e){return e>=48&&e<=55}i(r,`isOctCode`);function a(e){return e>=48&&e<=57}i(a,`isDecCode`);function o(e){if(e===null)return!1;let t=e.length,i=0,o=!1;if(!t)return!1;let c=e[i];if((c===`-`||c===`+`)&&(c=e[++i]),c===`0`){if(i+1===t)return!0;if(c=e[++i],c===`b`){for(i++;i<t;i++){if(c=e[i],c!==`0`&&c!==`1`)return!1;o=!0}return o&&isFinite(s(e))}if(c===`x`){for(i++;i<t;i++){if(!n(e.charCodeAt(i)))return!1;o=!0}return o&&isFinite(s(e))}if(c===`o`){for(i++;i<t;i++){if(!r(e.charCodeAt(i)))return!1;o=!0}return o&&isFinite(s(e))}}for(;i<t;i++){if(!a(e.charCodeAt(i)))return!1;o=!0}return o?isFinite(s(e)):!1}i(o,`resolveYamlInteger`);function s(e){let t=e,n=1,r=t[0];if((r===`-`||r===`+`)&&(r===`-`&&(n=-1),t=t.slice(1),r=t[0]),t===`0`)return 0;if(r===`0`){if(t[1]===`b`)return n*parseInt(t.slice(2),2);if(t[1]===`x`)return n*parseInt(t.slice(2),16);if(t[1]===`o`)return n*parseInt(t.slice(2),8)}return n*parseInt(t,10)}i(s,`parseYamlInteger`);function c(e){return s(e)}i(c,`constructYamlInteger`);function l(t){return Object.prototype.toString.call(t)===`[object Number]`&&t%1==0&&!e.isNegativeZero(t)}return i(l,`isInteger`),O4=new t(`tag:yaml.org,2002:int`,{kind:`scalar`,resolve:o,construct:c,predicate:l,represent:{binary:i(function(e){return e>=0?`0b`+e.toString(2):`-0b`+e.toString(2).slice(1)},`binary`),octal:i(function(e){return e>=0?`0o`+e.toString(8):`-0o`+e.toString(8).slice(1)},`octal`),decimal:i(function(e){return e.toString(10)},`decimal`),hexadecimal:i(function(e){return e>=0?`0x`+e.toString(16).toUpperCase():`-0x`+e.toString(16).toUpperCase().slice(1)},`hexadecimal`)},defaultStyle:`decimal`,styleAliases:{binary:[2,`bin`],octal:[8,`oct`],decimal:[10,`dec`],hexadecimal:[16,`hex`]}}),O4}i(A4,`requireInt`);var j4,M4;function N4(){if(M4)return j4;M4=1;let e=Z2(),t=o4(),n=RegExp(`^(?:[-+]?(?:[0-9]+)(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$`),r=RegExp(`^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$`);function a(e){return e===null||!n.test(e)?!1:isFinite(parseFloat(e,10))?!0:r.test(e)}i(a,`resolveYamlFloat`);function o(e){let t=e.toLowerCase(),n=t[0]===`-`?-1:1;return`+-`.indexOf(t[0])>=0&&(t=t.slice(1)),t===`.inf`?n===1?1/0:-1/0:t===`.nan`?NaN:n*parseFloat(t,10)}i(o,`constructYamlFloat`);let s=/^[-+]?[0-9]+e/;function c(t,n){if(isNaN(t))switch(n){case`lowercase`:return`.nan`;case`uppercase`:return`.NAN`;case`camelcase`:return`.NaN`}else if(t===1/0)switch(n){case`lowercase`:return`.inf`;case`uppercase`:return`.INF`;case`camelcase`:return`.Inf`}else if(t===-1/0)switch(n){case`lowercase`:return`-.inf`;case`uppercase`:return`-.INF`;case`camelcase`:return`-.Inf`}else if(e.isNegativeZero(t))return`-0.0`;let r=t.toString(10);return s.test(r)?r.replace(`e`,`.e`):r}i(c,`representYamlFloat`);function l(t){return Object.prototype.toString.call(t)===`[object Number]`&&(t%1!=0||e.isNegativeZero(t))}return i(l,`isFloat`),j4=new t(`tag:yaml.org,2002:float`,{kind:`scalar`,resolve:a,construct:o,predicate:l,represent:c,defaultStyle:`lowercase`}),j4}i(N4,`requireFloat`);var P4,F4;function I4(){return F4||(F4=1,P4=x4().extend({implicit:[w4(),D4(),A4(),N4()]})),P4}i(I4,`requireJson`);var L4,R4;function z4(){return R4||(R4=1,L4=I4()),L4}i(z4,`requireCore`);var B4,V4;function H4(){if(V4)return B4;V4=1;let e=o4(),t=RegExp(`^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$`),n=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 r(e){return e===null?!1:t.exec(e)!==null||n.exec(e)!==null}i(r,`resolveYamlTimestamp`);function a(e){let r=0,i=null,a=t.exec(e);if(a===null&&(a=n.exec(e)),a===null)throw Error(`Date resolve error`);let o=+a[1],s=a[2]-1,c=+a[3];if(!a[4])return new Date(Date.UTC(o,s,c));let l=+a[4],u=+a[5],d=+a[6];if(a[7]){for(r=a[7].slice(0,3);r.length<3;)r+=`0`;r=+r}if(a[9]){let e=+a[10],t=+(a[11]||0);i=(e*60+t)*6e4,a[9]===`-`&&(i=-i)}let f=new Date(Date.UTC(o,s,c,l,u,d,r));return i&&f.setTime(f.getTime()-i),f}i(a,`constructYamlTimestamp`);function o(e){return e.toISOString()}return i(o,`representYamlTimestamp`),B4=new e(`tag:yaml.org,2002:timestamp`,{kind:`scalar`,resolve:r,construct:a,instanceOf:Date,represent:o}),B4}i(H4,`requireTimestamp`);var U4,W4;function G4(){if(W4)return U4;W4=1;let e=o4();function t(e){return e===`<<`||e===null}return i(t,`resolveYamlMerge`),U4=new e(`tag:yaml.org,2002:merge`,{kind:`scalar`,resolve:t}),U4}i(G4,`requireMerge`);var K4,q4;function J4(){if(q4)return K4;q4=1;let e=o4();function t(e){if(e===null)return!1;let t=0,n=e.length;for(let r=0;r<n;r++){let n=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
277
|
+
\r`.indexOf(e.charAt(r));if(!(n>64)){if(n<0)return!1;t+=6}}return t%8==0}i(t,`resolveYamlBinary`);function n(e){let t=e.replace(/[\r\n=]/g,``),n=t.length,r=0,i=[];for(let e=0;e<n;e++)e%4==0&&e&&(i.push(r>>16&255),i.push(r>>8&255),i.push(r&255)),r=r<<6|`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
278
|
+
\r`.indexOf(t.charAt(e));let a=n%4*6;return a===0?(i.push(r>>16&255),i.push(r>>8&255),i.push(r&255)):a===18?(i.push(r>>10&255),i.push(r>>2&255)):a===12&&i.push(r>>4&255),new Uint8Array(i)}i(n,`constructYamlBinary`);function r(e){let t=``,n=0,r=e.length,i=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
279
|
+
\r`;for(let a=0;a<r;a++)a%3==0&&a&&(t+=i[n>>18&63],t+=i[n>>12&63],t+=i[n>>6&63],t+=i[n&63]),n=(n<<8)+e[a];let a=r%3;return a===0?(t+=i[n>>18&63],t+=i[n>>12&63],t+=i[n>>6&63],t+=i[n&63]):a===2?(t+=i[n>>10&63],t+=i[n>>4&63],t+=i[n<<2&63],t+=i[64]):a===1&&(t+=i[n>>2&63],t+=i[n<<4&63],t+=i[64],t+=i[64]),t}i(r,`representYamlBinary`);function a(e){return Object.prototype.toString.call(e)===`[object Uint8Array]`}return i(a,`isBinary`),K4=new e(`tag:yaml.org,2002:binary`,{kind:`scalar`,resolve:t,construct:n,predicate:a,represent:r}),K4}i(J4,`requireBinary`);var Y4,X4;function Z4(){if(X4)return Y4;X4=1;let e=o4(),t=Object.prototype.hasOwnProperty,n=Object.prototype.toString;function r(e){if(e===null)return!0;let r=[],i=e;for(let e=0,a=i.length;e<a;e+=1){let a=i[e],o=!1;if(n.call(a)!==`[object Object]`)return!1;let s;for(s in a)if(t.call(a,s)){if(!o)o=!0;else return!1}if(!o)return!1;if(r.indexOf(s)===-1)r.push(s);else return!1}return!0}i(r,`resolveYamlOmap`);function a(e){return e===null?[]:e}return i(a,`constructYamlOmap`),Y4=new e(`tag:yaml.org,2002:omap`,{kind:`sequence`,resolve:r,construct:a}),Y4}i(Z4,`requireOmap`);var Q4,$4;function e3(){if($4)return Q4;$4=1;let e=o4(),t=Object.prototype.toString;function n(e){if(e===null)return!0;let n=e,r=Array(n.length);for(let e=0,i=n.length;e<i;e+=1){let i=n[e];if(t.call(i)!==`[object Object]`)return!1;let a=Object.keys(i);if(a.length!==1)return!1;r[e]=[a[0],i[a[0]]]}return!0}i(n,`resolveYamlPairs`);function r(e){if(e===null)return[];let t=e,n=Array(t.length);for(let e=0,r=t.length;e<r;e+=1){let r=t[e],i=Object.keys(r);n[e]=[i[0],r[i[0]]]}return n}return i(r,`constructYamlPairs`),Q4=new e(`tag:yaml.org,2002:pairs`,{kind:`sequence`,resolve:n,construct:r}),Q4}i(e3,`requirePairs`);var t3,n3;function r3(){if(n3)return t3;n3=1;let e=o4(),t=Object.prototype.hasOwnProperty;function n(e){if(e===null)return!0;let n=e;for(let e in n)if(t.call(n,e)&&n[e]!==null)return!1;return!0}i(n,`resolveYamlSet`);function r(e){return e===null?{}:e}return i(r,`constructYamlSet`),t3=new e(`tag:yaml.org,2002:set`,{kind:`mapping`,resolve:n,construct:r}),t3}i(r3,`requireSet`);var i3,a3;function o3(){return a3||(a3=1,i3=z4().extend({implicit:[H4(),G4()],explicit:[J4(),Z4(),e3(),r3()]})),i3}i(o3,`require_default`);var s3;function c3(){if(s3)return J2;s3=1;let e=Z2(),t=e4(),n=r4(),r=o3(),a=Object.prototype.hasOwnProperty,o=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,s=/[\x85\u2028\u2029]/,c=/[,\[\]{}]/,l=/^(?:!|!!|![0-9A-Za-z-]+!)$/,u=/^(?:!|[^,\[\]{}])(?:%[0-9a-f]{2}|[0-9a-z\-#;/?:@&=+$,_.!~*'()\[\]])*$/i;function d(e){return Object.prototype.toString.call(e)}i(d,`_class`);function f(e){return e===10||e===13}i(f,`isEol`);function p(e){return e===9||e===32}i(p,`isWhiteSpace`);function m(e){return e===9||e===32||e===10||e===13}i(m,`isWsOrEol`);function h(e){return e===44||e===91||e===93||e===123||e===125}i(h,`isFlowIndicator`);function g(e){if(e>=48&&e<=57)return e-48;let t=e|32;return t>=97&&t<=102?t-97+10:-1}i(g,`fromHexCode`);function _(e){return e===120?2:e===117?4:e===85?8:0}i(_,`escapedHexLen`);function v(e){return e>=48&&e<=57?e-48:-1}i(v,`fromDecimalCode`);function y(e){switch(e){case 48:return`\0`;case 97:return`\x07`;case 98:return`\b`;case 116:case 9:return` `;case 110:return`
|
|
280
|
+
`;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`\xA0`;case 76:return`\u2028`;case 80:return`\u2029`;default:return``}}i(y,`simpleEscapeSequence`);function b(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}i(b,`charFromCodepoint`);function x(e,t,n){t===`__proto__`?Object.defineProperty(e,t,{configurable:!0,enumerable:!0,writable:!0,value:n}):e[t]=n}i(x,`setProperty`);let S=Array(256),C=Array(256);for(let e=0;e<256;e++)S[e]=+!!y(e),C[e]=y(e);function w(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||r,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.maxDepth=typeof t.maxDepth==`number`?t.maxDepth:100,this.maxTotalMergeKeys=typeof t.maxTotalMergeKeys==`number`?t.maxTotalMergeKeys:1e4,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.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=[]}i(w,`State`);function T(e,r){let i={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return i.snippet=n(i),new t(r,i)}i(T,`generateError`);function E(e,t){throw T(e,t)}i(E,`throwError`);function D(e,t){e.onWarning&&e.onWarning.call(null,T(e,t))}i(D,`throwWarning`);function O(e,t,n){let r=e.anchorMapTransactions;if(r.length!==0){let n=r[r.length-1];a.call(n,t)||(n[t]={existed:a.call(e.anchorMap,t),value:e.anchorMap[t]})}e.anchorMap[t]=n}i(O,`storeAnchor`);function k(e){e.anchorMapTransactions.push(Object.create(null))}i(k,`beginAnchorTransaction`);function A(e){let t=e.anchorMapTransactions.pop(),n=e.anchorMapTransactions;if(n.length===0)return;let r=n[n.length-1],i=Object.keys(t);for(let e=0,n=i.length;e<n;e+=1){let n=i[e];a.call(r,n)||(r[n]=t[n])}}i(A,`commitAnchorTransaction`);function j(e){let t=e.anchorMapTransactions.pop(),n=Object.keys(t);for(let r=n.length-1;r>=0;--r){let i=t[n[r]];i.existed?e.anchorMap[n[r]]=i.value:delete e.anchorMap[n[r]]}}i(j,`rollbackAnchorTransaction`);function ee(e){return{position:e.position,line:e.line,lineStart:e.lineStart,lineIndent:e.lineIndent,firstTabInLine:e.firstTabInLine,tag:e.tag,anchor:e.anchor,kind:e.kind,result:e.result}}i(ee,`snapshotState`);function M(e,t){e.position=t.position,e.line=t.line,e.lineStart=t.lineStart,e.lineIndent=t.lineIndent,e.firstTabInLine=t.firstTabInLine,e.tag=t.tag,e.anchor=t.anchor,e.kind=t.kind,e.result=t.result}i(M,`restoreState`);let te={YAML:i(function(e,t,n){e.version!==null&&E(e,`duplication of %YAML directive`),n.length!==1&&E(e,`YAML directive accepts exactly one argument`);let r=/^([0-9]+)\.([0-9]+)$/.exec(n[0]);r===null&&E(e,`ill-formed argument of the YAML directive`);let i=parseInt(r[1],10),a=parseInt(r[2],10);i!==1&&E(e,`unacceptable YAML version of the document`),e.version=n[0],e.checkLineBreaks=a<2,a!==1&&a!==2&&D(e,`unsupported YAML version of the document`)},`handleYamlDirective`),TAG:i(function(e,t,n){let r;n.length!==2&&E(e,`TAG directive accepts exactly two arguments`);let i=n[0];r=n[1],l.test(i)||E(e,`ill-formed tag handle (first argument) of the TAG directive`),a.call(e.tagMap,i)&&E(e,`there is a previously declared suffix for "`+i+`" tag handle`),u.test(r)||E(e,`ill-formed tag prefix (second argument) of the TAG directive`);try{r=decodeURIComponent(r)}catch{E(e,`tag prefix is malformed: `+r)}e.tagMap[i]=r},`handleTagDirective`)};function N(e,t,n,r){if(t<n){let i=e.input.slice(t,n);if(r)for(let t=0,n=i.length;t<n;t+=1){let n=i.charCodeAt(t);n===9||n>=32&&n<=1114111||E(e,`expected valid JSON character`)}else o.test(i)&&E(e,`the stream contains non-printable characters`);e.result+=i}}i(N,`captureSegment`);function P(t,n,r,i){e.isObject(r)||E(t,`cannot merge mappings; the provided source object is unacceptable`);let o=Object.keys(r);for(let e=0,s=o.length;e<s;e+=1){let s=o[e];t.maxTotalMergeKeys!==-1&&++t.totalMergeKeys>t.maxTotalMergeKeys&&E(t,`merge keys exceeded maxTotalMergeKeys (`+t.maxTotalMergeKeys+`)`),a.call(n,s)||(x(n,s,r[s]),i[s]=!0)}}i(P,`mergeMappings`);function ne(e,t,n,r,i,o,s,c,l){if(Array.isArray(i)){i=Array.prototype.slice.call(i);for(let t=0,n=i.length;t<n;t+=1)Array.isArray(i[t])&&E(e,`nested arrays are not supported inside keys`),typeof i==`object`&&d(i[t])===`[object Object]`&&(i[t]=`[object Object]`)}if(typeof i==`object`&&d(i)===`[object Object]`&&(i=`[object Object]`),i=String(i),t===null&&(t={}),r===`tag:yaml.org,2002:merge`){if(Array.isArray(o))for(let r=0,i=o.length;r<i;r+=1)P(e,t,o[r],n);else P(e,t,o,n)}else!e.json&&!a.call(n,i)&&a.call(t,i)&&(e.line=s||e.line,e.lineStart=c||e.lineStart,e.position=l||e.position,E(e,`duplicated mapping key`)),x(t,i,o),delete n[i];return t}i(ne,`storeMappingPair`);function re(e){let t=e.input.charCodeAt(e.position);t===10?e.position++:t===13?(e.position++,e.input.charCodeAt(e.position)===10&&e.position++):E(e,`a line break is expected`),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}i(re,`readLineBreak`);function F(e,t,n){let r=0,i=e.input.charCodeAt(e.position);for(;i!==0;){for(;p(i);)i===9&&e.firstTabInLine===-1&&(e.firstTabInLine=e.position),i=e.input.charCodeAt(++e.position);if(t&&i===35)do i=e.input.charCodeAt(++e.position);while(i!==10&&i!==13&&i!==0);if(f(i))for(re(e),i=e.input.charCodeAt(e.position),r++,e.lineIndent=0;i===32;)e.lineIndent++,i=e.input.charCodeAt(++e.position);else break}return n!==-1&&r!==0&&e.lineIndent<n&&D(e,`deficient indentation`),r}i(F,`skipSeparationSpace`);function ie(e){let t=e.position,n=e.input.charCodeAt(t);return!!((n===45||n===46)&&n===e.input.charCodeAt(t+1)&&n===e.input.charCodeAt(t+2)&&(t+=3,n=e.input.charCodeAt(t),n===0||m(n)))}i(ie,`testDocumentSeparator`);function ae(t,n){n===1?t.result+=` `:n>1&&(t.result+=e.repeat(`
|
|
281
|
+
`,n-1))}i(ae,`writeFoldedLines`);function oe(e,t,n){let r,i,a,o,s,c,l=e.kind,u=e.result,d=e.input.charCodeAt(e.position);if(m(d)||h(d)||d===35||d===38||d===42||d===33||d===124||d===62||d===39||d===34||d===37||d===64||d===96)return!1;if(d===63||d===45){let t=e.input.charCodeAt(e.position+1);if(m(t)||n&&h(t))return!1}for(e.kind=`scalar`,e.result=``,r=i=e.position,a=!1;d!==0;){if(d===58){let t=e.input.charCodeAt(e.position+1);if(m(t)||n&&h(t))break}else if(d===35){if(m(e.input.charCodeAt(e.position-1)))break}else if(e.position===e.lineStart&&ie(e)||n&&h(d))break;else if(f(d)){if(o=e.line,s=e.lineStart,c=e.lineIndent,F(e,!1,-1),e.lineIndent>=t){a=!0,d=e.input.charCodeAt(e.position);continue}e.position=i,e.line=o,e.lineStart=s,e.lineIndent=c;break}a&&=(N(e,r,i,!1),ae(e,e.line-o),r=i=e.position,!1),p(d)||(i=e.position+1),d=e.input.charCodeAt(++e.position)}return N(e,r,i,!1),e.result?!0:(e.kind=l,e.result=u,!1)}i(oe,`readPlainScalar`);function se(e,t){let n,r,i=e.input.charCodeAt(e.position);if(i!==39)return!1;for(e.kind=`scalar`,e.result=``,e.position++,n=r=e.position;(i=e.input.charCodeAt(e.position))!==0;)if(i===39){if(N(e,n,e.position,!0),i=e.input.charCodeAt(++e.position),i===39)n=e.position,e.position++,r=e.position;else return!0}else f(i)?(N(e,n,r,!0),ae(e,F(e,!1,t)),n=r=e.position):e.position===e.lineStart&&ie(e)?E(e,`unexpected end of the document within a single quoted scalar`):(e.position++,p(i)||(r=e.position));E(e,`unexpected end of the stream within a single quoted scalar`)}i(se,`readSingleQuotedScalar`);function ce(e,t){let n,r,i,a=e.input.charCodeAt(e.position);if(a!==34)return!1;for(e.kind=`scalar`,e.result=``,e.position++,n=r=e.position;(a=e.input.charCodeAt(e.position))!==0;)if(a===34)return N(e,n,e.position,!0),e.position++,!0;else if(a===92){if(N(e,n,e.position,!0),a=e.input.charCodeAt(++e.position),f(a))F(e,!1,t);else if(a<256&&S[a])e.result+=C[a],e.position++;else if((i=_(a))>0){let t=i,n=0;for(;t>0;t--)a=e.input.charCodeAt(++e.position),(i=g(a))>=0?n=(n<<4)+i:E(e,`expected hexadecimal character`);e.result+=b(n),e.position++}else E(e,`unknown escape sequence`);n=r=e.position}else f(a)?(N(e,n,r,!0),ae(e,F(e,!1,t)),n=r=e.position):e.position===e.lineStart&&ie(e)?E(e,`unexpected end of the document within a double quoted scalar`):(e.position++,p(a)||(r=e.position));E(e,`unexpected end of the stream within a double quoted scalar`)}i(ce,`readDoubleQuotedScalar`);function le(e,t){let n=!0,r,i,a,o=e.tag,s,c=e.anchor,l,u,d,f,p=Object.create(null),h,g,_,v=e.input.charCodeAt(e.position);if(v===91)l=93,f=!1,s=[];else if(v===123)l=125,f=!0,s={};else return!1;for(e.anchor!==null&&O(e,e.anchor,s),v=e.input.charCodeAt(++e.position);v!==0;){if(F(e,!0,t),v=e.input.charCodeAt(e.position),v===l)return e.position++,e.tag=o,e.anchor=c,e.kind=f?`mapping`:`sequence`,e.result=s,!0;n?v===44&&E(e,`expected the node content, but found ','`):E(e,`missed comma between flow collection entries`),g=h=_=null,u=d=!1,v===63&&m(e.input.charCodeAt(e.position+1))&&(u=d=!0,e.position++,F(e,!0,t)),r=e.line,i=e.lineStart,a=e.position,_e(e,t,1,!1,!0),g=e.tag,h=e.result,F(e,!0,t),v=e.input.charCodeAt(e.position),(d||e.line===r)&&v===58&&(u=!0,v=e.input.charCodeAt(++e.position),F(e,!0,t),_e(e,t,1,!1,!0),_=e.result),f?ne(e,s,p,g,h,_,r,i,a):u?s.push(ne(e,null,p,g,h,_,r,i,a)):s.push(h),F(e,!0,t),v=e.input.charCodeAt(e.position),v===44?(n=!0,v=e.input.charCodeAt(++e.position)):n=!1}E(e,`unexpected end of the stream within a flow collection`)}i(le,`readFlowCollection`);function ue(t,n){let r,i=1,a=!1,o=!1,s=n,c=0,l=!1,u,d=t.input.charCodeAt(t.position);if(d===124)r=!1;else if(d===62)r=!0;else return!1;for(t.kind=`scalar`,t.result=``;d!==0;)if(d=t.input.charCodeAt(++t.position),d===43||d===45)i===1?i=d===43?3:2:E(t,`repeat of a chomping mode identifier`);else if((u=v(d))>=0)u===0?E(t,`bad explicit indentation width of a block scalar; it cannot be less than one`):o?E(t,`repeat of an indentation width identifier`):(s=n+u-1,o=!0);else break;if(p(d)){do d=t.input.charCodeAt(++t.position);while(p(d));if(d===35)do d=t.input.charCodeAt(++t.position);while(!f(d)&&d!==0)}for(;d!==0;){for(re(t),t.lineIndent=0,d=t.input.charCodeAt(t.position);(!o||t.lineIndent<s)&&d===32;)t.lineIndent++,d=t.input.charCodeAt(++t.position);if(!o&&t.lineIndent>s&&(s=t.lineIndent),f(d)){c++;continue}if(!o&&s===0&&E(t,`missing indentation for block scalar`),t.lineIndent<s){i===3?t.result+=e.repeat(`
|
|
282
|
+
`,a?1+c:c):i===1&&a&&(t.result+=`
|
|
283
|
+
`);break}r?p(d)?(l=!0,t.result+=e.repeat(`
|
|
284
|
+
`,a?1+c:c)):l?(l=!1,t.result+=e.repeat(`
|
|
285
|
+
`,c+1)):c===0?a&&(t.result+=` `):t.result+=e.repeat(`
|
|
286
|
+
`,c):t.result+=e.repeat(`
|
|
287
|
+
`,a?1+c:c),a=!0,o=!0,c=0;let n=t.position;for(;!f(d)&&d!==0;)d=t.input.charCodeAt(++t.position);N(t,n,t.position,!1)}return!0}i(ue,`readBlockScalar`);function de(e,t){let n=e.tag,r=e.anchor,i=[],a=!1;if(e.firstTabInLine!==-1)return!1;e.anchor!==null&&O(e,e.anchor,i);let o=e.input.charCodeAt(e.position);for(;o!==0&&(e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,E(e,`tab characters must not be used in indentation`)),o===45&&m(e.input.charCodeAt(e.position+1)));){if(a=!0,e.position++,F(e,!0,-1)&&e.lineIndent<=t){i.push(null),o=e.input.charCodeAt(e.position);continue}let n=e.line;if(_e(e,t,3,!1,!0),i.push(e.result),F(e,!0,-1),o=e.input.charCodeAt(e.position),(e.line===n||e.lineIndent>t)&&o!==0)E(e,`bad indentation of a sequence entry`);else if(e.lineIndent<t)break}return a?(e.tag=n,e.anchor=r,e.kind=`sequence`,e.result=i,!0):!1}i(de,`readBlockSequence`);function fe(e,t,n){let r,i,a,o,s=e.tag,c=e.anchor,l={},u=Object.create(null),d=null,f=null,h=null,g=!1,_=!1;if(e.firstTabInLine!==-1)return!1;e.anchor!==null&&O(e,e.anchor,l);let v=e.input.charCodeAt(e.position);for(;v!==0;){!g&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,E(e,`tab characters must not be used in indentation`));let y=e.input.charCodeAt(e.position+1),b=e.line;if((v===63||v===58)&&m(y))v===63?(g&&(ne(e,l,u,d,f,null,i,a,o),d=f=h=null),_=!0,g=!0,r=!0):g?(g=!1,r=!0):E(e,`incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line`),e.position+=1,v=y;else{if(i=e.line,a=e.lineStart,o=e.position,!_e(e,n,2,!1,!0))break;if(e.line===b){for(v=e.input.charCodeAt(e.position);p(v);)v=e.input.charCodeAt(++e.position);if(v===58)v=e.input.charCodeAt(++e.position),m(v)||E(e,`a whitespace character is expected after the key-value separator within a block mapping`),g&&(ne(e,l,u,d,f,null,i,a,o),d=f=h=null),_=!0,g=!1,r=!1,d=e.tag,f=e.result;else if(_)E(e,`can not read an implicit mapping pair; a colon is missed`);else return e.tag=s,e.anchor=c,!0}else if(_)E(e,`can not read a block mapping entry; a multiline key may not be an implicit key`);else return e.tag=s,e.anchor=c,!0}if((e.line===b||e.lineIndent>t)&&(g&&(i=e.line,a=e.lineStart,o=e.position),_e(e,t,4,!0,r)&&(g?f=e.result:h=e.result),g||(ne(e,l,u,d,f,h,i,a,o),d=f=h=null),F(e,!0,-1),v=e.input.charCodeAt(e.position)),(e.line===b||e.lineIndent>t)&&v!==0)E(e,`bad indentation of a mapping entry`);else if(e.lineIndent<t)break}return g&&ne(e,l,u,d,f,null,i,a,o),_&&(e.tag=s,e.anchor=c,e.kind=`mapping`,e.result=l),_}i(fe,`readBlockMapping`);function pe(e){let t=!1,n=!1,r,i,o=e.input.charCodeAt(e.position);if(o!==33)return!1;e.tag!==null&&E(e,`duplication of a tag property`),o=e.input.charCodeAt(++e.position),o===60?(t=!0,o=e.input.charCodeAt(++e.position)):o===33?(n=!0,r=`!!`,o=e.input.charCodeAt(++e.position)):r=`!`;let s=e.position;if(t){do o=e.input.charCodeAt(++e.position);while(o!==0&&o!==62);e.position<e.length?(i=e.input.slice(s,e.position),o=e.input.charCodeAt(++e.position)):E(e,`unexpected end of the stream within a verbatim tag`)}else{for(;o!==0&&!m(o);)o===33&&(n?E(e,`tag suffix cannot contain exclamation marks`):(r=e.input.slice(s-1,e.position+1),l.test(r)||E(e,`named tag handle cannot contain such characters`),n=!0,s=e.position+1)),o=e.input.charCodeAt(++e.position);i=e.input.slice(s,e.position),c.test(i)&&E(e,`tag suffix cannot contain flow indicator characters`)}i&&!u.test(i)&&E(e,`tag name cannot contain such characters: `+i);try{i=decodeURIComponent(i)}catch{E(e,`tag name is malformed: `+i)}return t?e.tag=i:a.call(e.tagMap,r)?e.tag=e.tagMap[r]+i:r===`!`?e.tag=`!`+i:r===`!!`?e.tag=`tag:yaml.org,2002:`+i:E(e,`undeclared tag handle "`+r+`"`),!0}i(pe,`readTagProperty`);function me(e){let t=e.input.charCodeAt(e.position);if(t!==38)return!1;e.anchor!==null&&E(e,`duplication of an anchor property`),t=e.input.charCodeAt(++e.position);let n=e.position;for(;t!==0&&!m(t)&&!h(t);)t=e.input.charCodeAt(++e.position);return e.position===n&&E(e,`name of an anchor node must contain at least one character`),e.anchor=e.input.slice(n,e.position),!0}i(me,`readAnchorProperty`);function he(e){let t=e.input.charCodeAt(e.position);if(t!==42)return!1;t=e.input.charCodeAt(++e.position);let n=e.position;for(;t!==0&&!m(t)&&!h(t);)t=e.input.charCodeAt(++e.position);e.position===n&&E(e,`name of an alias node must contain at least one character`);let r=e.input.slice(n,e.position);return a.call(e.anchorMap,r)||E(e,`unidentified alias "`+r+`"`),e.result=e.anchorMap[r],F(e,!0,-1),!0}i(he,`readAlias`);function ge(e,t,n,r){let i=ee(e);return k(e),M(e,t),e.tag=null,e.anchor=null,e.kind=null,e.result=null,fe(e,n,r)&&e.kind===`mapping`?(A(e),!0):(j(e),M(e,i),!1)}i(ge,`tryReadBlockMappingFromProperty`);function _e(e,t,n,r,i){let o,s,c=1,l=!1,u=!1,d=null,f,p,m;e.depth>=e.maxDepth&&E(e,`nesting exceeded maxDepth (`+e.maxDepth+`)`),e.depth+=1,e.listener!==null&&e.listener(`open`,e),e.tag=null,e.anchor=null,e.kind=null,e.result=null;let h=o=s=n===4||n===3;if(r&&F(e,!0,-1)&&(l=!0,e.lineIndent>t?c=1:e.lineIndent===t?c=0:e.lineIndent<t&&(c=-1)),c===1)for(;;){let n=e.input.charCodeAt(e.position),r=ee(e);if(l&&(n===33&&e.tag!==null||n===38&&e.anchor!==null)||!pe(e)&&!me(e))break;d===null&&(d=r),F(e,!0,-1)?(l=!0,s=h,e.lineIndent>t?c=1:e.lineIndent===t?c=0:e.lineIndent<t&&(c=-1)):s=!1}if(s&&=l||i,c===1||n===4){if(p=n===1||n===2?t:t+1,m=e.position-e.lineStart,c===1){if(s&&(de(e,m)||fe(e,m,p))||le(e,p))u=!0;else{let t=e.input.charCodeAt(e.position);d!==null&&h&&!s&&t!==124&&t!==62&&ge(e,d,d.position-d.lineStart,p)||o&&ue(e,p)||se(e,p)||ce(e,p)?u=!0:he(e)?(u=!0,(e.tag!==null||e.anchor!==null)&&E(e,`alias node should not have any properties`)):oe(e,p,n===1)&&(u=!0,e.tag===null&&(e.tag=`?`)),e.anchor!==null&&O(e,e.anchor,e.result)}}else c===0&&(u=s&&de(e,m))}if(e.tag===null)e.anchor!==null&&O(e,e.anchor,e.result);else if(e.tag===`?`){e.result!==null&&e.kind!==`scalar`&&E(e,`unacceptable node kind for !<?> tag; it should be "scalar", not "`+e.kind+`"`);for(let t=0,n=e.implicitTypes.length;t<n;t+=1)if(f=e.implicitTypes[t],f.resolve(e.result)){e.result=f.construct(e.result),e.tag=f.tag,e.anchor!==null&&O(e,e.anchor,e.result);break}}else if(e.tag!==`!`){if(a.call(e.typeMap[e.kind||`fallback`],e.tag))f=e.typeMap[e.kind||`fallback`][e.tag];else{f=null;let t=e.typeMap.multi[e.kind||`fallback`];for(let n=0,r=t.length;n<r;n+=1)if(e.tag.slice(0,t[n].tag.length)===t[n].tag){f=t[n];break}}f||E(e,`unknown tag !<`+e.tag+`>`),e.result!==null&&f.kind!==e.kind&&E(e,`unacceptable node kind for !<`+e.tag+`> tag; it should be "`+f.kind+`", not "`+e.kind+`"`),f.resolve(e.result,e.tag)?(e.result=f.construct(e.result,e.tag),e.anchor!==null&&O(e,e.anchor,e.result)):E(e,`cannot resolve a node with !<`+e.tag+`> explicit tag`)}return e.listener!==null&&e.listener(`close`,e),--e.depth,e.tag!==null||e.anchor!==null||u}i(_e,`composeNode`);function ve(e){let t=e.position,n=!1,r;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);(r=e.input.charCodeAt(e.position))!==0&&(F(e,!0,-1),r=e.input.charCodeAt(e.position),!(e.lineIndent>0||r!==37));){n=!0,r=e.input.charCodeAt(++e.position);let t=e.position;for(;r!==0&&!m(r);)r=e.input.charCodeAt(++e.position);let i=e.input.slice(t,e.position),o=[];for(i.length<1&&E(e,`directive name must not be less than one character in length`);r!==0;){for(;p(r);)r=e.input.charCodeAt(++e.position);if(r===35){do r=e.input.charCodeAt(++e.position);while(r!==0&&!f(r));break}if(f(r))break;for(t=e.position;r!==0&&!m(r);)r=e.input.charCodeAt(++e.position);o.push(e.input.slice(t,e.position))}r!==0&&re(e),a.call(te,i)?te[i](e,i,o):D(e,`unknown document directive "`+i+`"`)}F(e,!0,-1),e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45?(e.position+=3,F(e,!0,-1)):n&&E(e,`directives end mark is expected`),_e(e,e.lineIndent-1,4,!1,!0),F(e,!0,-1),e.checkLineBreaks&&s.test(e.input.slice(t,e.position))&&D(e,`non-ASCII line breaks are interpreted as content`),e.documents.push(e.result),e.position===e.lineStart&&ie(e)?e.input.charCodeAt(e.position)===46&&(e.position+=3,F(e,!0,-1)):e.position<e.length-1&&E(e,`end of the stream or a document separator is expected`)}i(ve,`readDocument`);function ye(e,t){e=String(e),t||={},e.length!==0&&(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13&&(e+=`
|
|
288
|
+
`),e.charCodeAt(0)===65279&&(e=e.slice(1)));let n=new w(e,t),r=e.indexOf(`\0`);for(r!==-1&&(n.position=r,E(n,`null byte is not allowed in input`)),n.input+=`\0`;n.input.charCodeAt(n.position)===32;)n.lineIndent+=1,n.position+=1;for(;n.position<n.length-1;)ve(n);return n.documents}i(ye,`loadDocuments`);function be(e,t,n){typeof t==`object`&&t&&n===void 0&&(n=t,t=null);let r=ye(e,n);if(typeof t!=`function`)return r;for(let e=0,n=r.length;e<n;e+=1)t(r[e])}i(be,`loadAll2`);function xe(e,n){let r=ye(e,n);if(r.length!==0){if(r.length===1)return r[0];throw new t(`expected a single document in the stream, but found more`)}}return i(xe,`load2`),J2.loadAll=be,J2.load=xe,J2}i(c3,`requireLoader`);var l3={},u3;function d3(){if(u3)return l3;u3=1;let e=Z2(),t=e4(),n=o3(),r=Object.prototype.toString,a=Object.prototype.hasOwnProperty,o=65279,s={};s[0]=`\\0`,s[7]=`\\a`,s[8]=`\\b`,s[9]=`\\t`,s[10]=`\\n`,s[11]=`\\v`,s[12]=`\\f`,s[13]=`\\r`,s[27]=`\\e`,s[34]=`\\"`,s[92]=`\\\\`,s[133]=`\\N`,s[160]=`\\_`,s[8232]=`\\L`,s[8233]=`\\P`;let c=[`y`,`Y`,`yes`,`Yes`,`YES`,`on`,`On`,`ON`,`n`,`N`,`no`,`No`,`NO`,`off`,`Off`,`OFF`],l=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function u(e,t){if(t===null)return{};let n={},r=Object.keys(t);for(let i=0,o=r.length;i<o;i+=1){let o=r[i],s=String(t[o]);o.slice(0,2)===`!!`&&(o=`tag:yaml.org,2002:`+o.slice(2));let c=e.compiledTypeMap.fallback[o];c&&a.call(c.styleAliases,s)&&(s=c.styleAliases[s]),n[o]=s}return n}i(u,`compileStyleMap`);function d(n){let r,i,a=n.toString(16).toUpperCase();if(n<=255)r=`x`,i=2;else if(n<=65535)r=`u`,i=4;else if(n<=0xffffffff)r=`U`,i=8;else throw new t(`code point within a string may not be greater than 0xFFFFFFFF`);return`\\`+r+e.repeat(`0`,i-a.length)+a}i(d,`encodeHex`);function f(t){this.schema=t.schema||n,this.indent=Math.max(1,t.indent||2),this.noArrayIndent=t.noArrayIndent||!1,this.skipInvalid=t.skipInvalid||!1,this.flowLevel=e.isNothing(t.flowLevel)?-1:t.flowLevel,this.styleMap=u(this.schema,t.styles||null),this.sortKeys=t.sortKeys||!1,this.lineWidth=t.lineWidth||80,this.noRefs=t.noRefs||!1,this.noCompatMode=t.noCompatMode||!1,this.condenseFlow=t.condenseFlow||!1,this.quotingType=t.quotingType===`"`?2:1,this.forceQuotes=t.forceQuotes||!1,this.replacer=typeof t.replacer==`function`?t.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result=``,this.duplicates=[],this.usedDuplicates=null}i(f,`State`);function p(t,n){let r=e.repeat(` `,n),i=0,a=``,o=t.length;for(;i<o;){let e,n=t.indexOf(`
|
|
289
|
+
`,i);n===-1?(e=t.slice(i),i=o):(e=t.slice(i,n+1),i=n+1),e.length&&e!==`
|
|
290
|
+
`&&(a+=r),a+=e}return a}i(p,`indentString`);function m(t,n){return`
|
|
291
|
+
`+e.repeat(` `,t.indent*n)}i(m,`generateNextLine`);function h(e,t){for(let n=0,r=e.implicitTypes.length;n<r;n+=1)if(e.implicitTypes[n].resolve(t))return!0;return!1}i(h,`testImplicitResolving`);function g(e){return e===32||e===9}i(g,`isWhitespace`);function _(e){return e>=32&&e<=126||e>=161&&e<=55295&&e!==8232&&e!==8233||e>=57344&&e<=65533&&e!==o||e>=65536&&e<=1114111}i(_,`isPrintable`);function v(e){return _(e)&&e!==o&&e!==13&&e!==10}i(v,`isNsCharOrWhitespace`);function y(e,t,n){let r=v(e),i=r&&!g(e);return(n?r:r&&e!==44&&e!==91&&e!==93&&e!==123&&e!==125)&&e!==35&&!(t===58&&!i)||v(t)&&!g(t)&&e===35||t===58&&i}i(y,`isPlainSafe`);function b(e){return _(e)&&e!==o&&!g(e)&&e!==45&&e!==63&&e!==58&&e!==44&&e!==91&&e!==93&&e!==123&&e!==125&&e!==35&&e!==38&&e!==42&&e!==33&&e!==124&&e!==61&&e!==62&&e!==39&&e!==34&&e!==37&&e!==64&&e!==96}i(b,`isPlainSafeFirst`);function x(e){return!g(e)&&e!==58}i(x,`isPlainSafeLast`);function S(e,t){let n=e.charCodeAt(t),r;return n>=55296&&n<=56319&&t+1<e.length&&(r=e.charCodeAt(t+1),r>=56320&&r<=57343)?(n-55296)*1024+r-56320+65536:n}i(S,`codePointAt`);function C(e){return/^\n* /.test(e)}i(C,`needIndentIndicator`);function w(e,t,n,r,i,a,o,s){let c,l=0,u=null,d=!1,f=!1,p=r!==-1,m=-1,h=b(S(e,0))&&x(S(e,e.length-1));if(t||o)for(c=0;c<e.length;l>=65536?c+=2:c++){if(l=S(e,c),!_(l))return 5;h&&=y(l,u,s),u=l}else{for(c=0;c<e.length;l>=65536?c+=2:c++){if(l=S(e,c),l===10)d=!0,p&&(f||=c-m-1>r&&e[m+1]!==` `,m=c);else if(!_(l))return 5;h&&=y(l,u,s),u=l}f||=p&&c-m-1>r&&e[m+1]!==` `}return!d&&!f?h&&!o&&!i(e)?1:a===2?5:2:n>9&&C(e)?5:o?a===2?5:2:f?4:3}i(w,`chooseScalarStyle`);function T(e,n,r,a,o){e.dump=(function(){if(n.length===0)return e.quotingType===2?`""`:`''`;if(!e.noCompatMode&&(c.indexOf(n)!==-1||l.test(n)))return e.quotingType===2?`"`+n+`"`:`'`+n+`'`;let s=e.indent*Math.max(1,r),u=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-s),d=a||e.flowLevel>-1&&r>=e.flowLevel;function f(t){return h(e,t)}switch(i(f,`testAmbiguity`),w(n,d,e.indent,u,f,e.quotingType,e.forceQuotes&&!a,o)){case 1:return n;case 2:return`'`+n.replace(/'/g,`''`)+`'`;case 3:return`|`+E(n,e.indent)+D(p(n,s));case 4:return`>`+E(n,e.indent)+D(p(O(n,u),s));case 5:return`"`+A(n)+`"`;default:throw new t(`impossible error: invalid scalar style`)}})()}i(T,`writeScalar`);function E(e,t){let n=C(e)?String(t):``,r=e[e.length-1]===`
|
|
292
|
+
`;return n+(r&&(e[e.length-2]===`
|
|
293
|
+
`||e===`
|
|
294
|
+
`)?`+`:r?``:`-`)+`
|
|
295
|
+
`}i(E,`blockHeader`);function D(e){return e[e.length-1]===`
|
|
296
|
+
`?e.slice(0,-1):e}i(D,`dropEndingNewline`);function O(e,t){let n=/(\n+)([^\n]*)/g,r=(function(){let r=e.indexOf(`
|
|
297
|
+
`);return r=r===-1?e.length:r,n.lastIndex=r,k(e.slice(0,r),t)})(),i=e[0]===`
|
|
298
|
+
`||e[0]===` `,a,o;for(;o=n.exec(e);){let e=o[1],n=o[2];a=n[0]===` `,r+=e+(!i&&!a&&n!==``?`
|
|
299
|
+
`:``)+k(n,t),i=a}return r}i(O,`foldString`);function k(e,t){if(e===``||e[0]===` `)return e;let n=/ [^ ]/g,r,i=0,a,o=0,s=0,c=``;for(;r=n.exec(e);)s=r.index,s-i>t&&(a=o>i?o:s,c+=`
|
|
300
|
+
`+e.slice(i,a),i=a+1),o=s;return c+=`
|
|
301
|
+
`,e.length-i>t&&o>i?c+=e.slice(i,o)+`
|
|
302
|
+
`+e.slice(o+1):c+=e.slice(i),c.slice(1)}i(k,`foldLine`);function A(e){let t=``,n=0;for(let r=0;r<e.length;n>=65536?r+=2:r++){n=S(e,r);let i=s[n];!i&&_(n)?(t+=e[r],n>=65536&&(t+=e[r+1])):t+=i||d(n)}return t}i(A,`escapeString`);function j(e,t,n){let r=``,i=e.tag;for(let i=0,a=n.length;i<a;i+=1){let a=n[i];e.replacer&&(a=e.replacer.call(n,String(i),a)),(P(e,t,a,!1,!1)||a===void 0&&P(e,t,null,!1,!1))&&(r!==``&&(r+=`,`+(e.condenseFlow?``:` `)),r+=e.dump)}e.tag=i,e.dump=`[`+r+`]`}i(j,`writeFlowSequence`);function ee(e,t,n,r){let i=``,a=e.tag;for(let a=0,o=n.length;a<o;a+=1){let o=n[a];e.replacer&&(o=e.replacer.call(n,String(a),o)),(P(e,t+1,o,!0,!0,!1,!0)||o===void 0&&P(e,t+1,null,!0,!0,!1,!0))&&(r&&i===``||(i+=m(e,t)),e.dump&&e.dump.charCodeAt(0)===10?i+=`-`:i+=`- `,i+=e.dump)}e.tag=a,e.dump=i||`[]`}i(ee,`writeBlockSequence`);function M(e,t,n){let r=``,i=e.tag,a=Object.keys(n);for(let i=0,o=a.length;i<o;i+=1){let o=``;r!==``&&(o+=`, `),e.condenseFlow&&(o+=`"`);let s=a[i],c=n[s];e.replacer&&(c=e.replacer.call(n,s,c)),P(e,t,s,!1,!1)&&(e.dump.length>1024&&(o+=`? `),o+=e.dump+(e.condenseFlow?`"`:``)+`:`+(e.condenseFlow?``:` `),P(e,t,c,!1,!1)&&(o+=e.dump,r+=o))}e.tag=i,e.dump=`{`+r+`}`}i(M,`writeFlowMapping`);function te(e,n,r,i){let a=``,o=e.tag,s=Object.keys(r);if(e.sortKeys===!0)s.sort();else if(typeof e.sortKeys==`function`)s.sort(e.sortKeys);else if(e.sortKeys)throw new t(`sortKeys must be a boolean or a function`);for(let t=0,o=s.length;t<o;t+=1){let o=``;i&&a===``||(o+=m(e,n));let c=s[t],l=r[c];if(e.replacer&&(l=e.replacer.call(r,c,l)),!P(e,n+1,c,!0,!0,!0))continue;let u=e.tag!==null&&e.tag!==`?`||e.dump&&e.dump.length>1024;u&&(e.dump&&e.dump.charCodeAt(0)===10?o+=`?`:o+=`? `),o+=e.dump,u&&(o+=m(e,n)),P(e,n+1,l,!0,u)&&(e.dump&&e.dump.charCodeAt(0)===10?o+=`:`:o+=`: `,o+=e.dump,a+=o)}e.tag=o,e.dump=a||`{}`}i(te,`writeBlockMapping`);function N(e,n,i){let o=i?e.explicitTypes:e.implicitTypes;for(let s=0,c=o.length;s<c;s+=1){let c=o[s];if((c.instanceOf||c.predicate)&&(!c.instanceOf||typeof n==`object`&&n instanceof c.instanceOf)&&(!c.predicate||c.predicate(n))){if(e.tag=i?c.multi&&c.representName?c.representName(n):c.tag:`?`,c.represent){let i=e.styleMap[c.tag]||c.defaultStyle,o;if(r.call(c.represent)===`[object Function]`)o=c.represent(n,i);else if(a.call(c.represent,i))o=c.represent[i](n,i);else throw new t(`!<`+c.tag+`> tag resolver accepts not "`+i+`" style`);e.dump=o}return!0}}return!1}i(N,`detectType`);function P(e,n,i,a,o,s,c){e.tag=null,e.dump=i,N(e,i,!1)||N(e,i,!0);let l=r.call(e.dump),u=a;a&&=e.flowLevel<0||e.flowLevel>n;let d=l===`[object Object]`||l===`[object Array]`,f,p;if(d&&(f=e.duplicates.indexOf(i),p=f!==-1),(e.tag!==null&&e.tag!==`?`||p||e.indent!==2&&n>0)&&(o=!1),p&&e.usedDuplicates[f])e.dump=`*ref_`+f;else{if(d&&p&&!e.usedDuplicates[f]&&(e.usedDuplicates[f]=!0),l===`[object Object]`)a&&Object.keys(e.dump).length!==0?(te(e,n,e.dump,o),p&&(e.dump=`&ref_`+f+e.dump)):(M(e,n,e.dump),p&&(e.dump=`&ref_`+f+` `+e.dump));else if(l===`[object Array]`)a&&e.dump.length!==0?(e.noArrayIndent&&!c&&n>0?ee(e,n-1,e.dump,o):ee(e,n,e.dump,o),p&&(e.dump=`&ref_`+f+e.dump)):(j(e,n,e.dump),p&&(e.dump=`&ref_`+f+` `+e.dump));else if(l===`[object String]`)e.tag!==`?`&&T(e,e.dump,n,s,u);else if(l===`[object Undefined]`)return!1;else{if(e.skipInvalid)return!1;throw new t(`unacceptable kind of an object to dump `+l)}if(e.tag!==null&&e.tag!==`?`){let t=encodeURI(e.tag[0]===`!`?e.tag.slice(1):e.tag).replace(/!/g,`%21`);t=e.tag[0]===`!`?`!`+t:t.slice(0,18)===`tag:yaml.org,2002:`?`!!`+t.slice(18):`!<`+t+`>`,e.dump=t+` `+e.dump}}return!0}i(P,`writeNode`);function ne(e,t){let n=[],r=[];re(e,n,r);let i=r.length;for(let e=0;e<i;e+=1)t.duplicates.push(n[r[e]]);t.usedDuplicates=Array(i)}i(ne,`getDuplicateReferences`);function re(e,t,n){if(typeof e==`object`&&e){let r=t.indexOf(e);if(r!==-1)n.indexOf(r)===-1&&n.push(r);else if(t.push(e),Array.isArray(e))for(let r=0,i=e.length;r<i;r+=1)re(e[r],t,n);else{let r=Object.keys(e);for(let i=0,a=r.length;i<a;i+=1)re(e[r[i]],t,n)}}}i(re,`inspectNode`);function F(e,t){t||={};let n=new f(t);n.noRefs||ne(e,n);let r=e;return n.replacer&&(r=n.replacer.call({"":r},``,r)),P(n,0,r,!0,!0)?n.dump+`
|
|
303
|
+
`:``}return i(F,`dump2`),l3.dump=F,l3}i(d3,`requireDumper`);var f3;function p3(){if(f3)return q2;f3=1;let e=c3(),t=d3();function n(e,t){return function(){throw Error(`Function yaml.`+e+` is removed in js-yaml 4. Use yaml.`+t+` instead, which is now safe by default.`)}}return i(n,`renamed`),q2.Type=o4(),q2.Schema=l4(),q2.FAILSAFE_SCHEMA=x4(),q2.JSON_SCHEMA=I4(),q2.CORE_SCHEMA=z4(),q2.DEFAULT_SCHEMA=o3(),q2.load=e.load,q2.loadAll=e.loadAll,q2.dump=t.dump,q2.YAMLException=e4(),q2.types={binary:J4(),float:N4(),map:v4(),null:w4(),pairs:e3(),set:r3(),timestamp:H4(),bool:D4(),int:A4(),merge:G4(),omap:Z4(),seq:h4(),str:f4()},q2.safeLoad=n(`safeLoad`,`load`),q2.safeLoadAll=n(`safeLoadAll`,`loadAll`),q2.safeDump=n(`safeDump`,`dump`),q2}i(p3,`requireJsYaml`);var{Type:m3,Schema:h3,FAILSAFE_SCHEMA:g3,JSON_SCHEMA:_3,CORE_SCHEMA:v3,DEFAULT_SCHEMA:y3,load:b3,loadAll:x3,dump:S3,YAMLException:C3,types:w3,safeLoad:T3,safeLoadAll:E3,safeDump:D3}=K2(p3()),O3=`comm`,k3=`rule`,A3=`decl`,j3=`@import`,M3=`@namespace`,N3=`@keyframes`,P3=`@layer`,F3=Math.abs,I3=String.fromCharCode;function L3(e){return e.trim()}function R3(e,t,n){return e.replace(t,n)}function z3(e,t){return e.charCodeAt(t)|0}function B3(e,t,n){return e.slice(t,n)}function V3(e){return e.length}function H3(e){return e.length}function U3(e,t){return t.push(e),e}var W3=1,G3=1,K3=0,q3=0,J3=0,Y3=``;function X3(e,t,n,r,i,a,o,s){return{value:e,root:t,parent:n,type:r,props:i,children:a,line:W3,column:G3,length:o,return:``,siblings:s}}function Z3(){return J3}function Q3(){return J3=q3>0?z3(Y3,--q3):0,G3--,J3===10&&(G3=1,W3--),J3}function $3(){return J3=q3<K3?z3(Y3,q3++):0,G3++,J3===10&&(G3=1,W3++),J3}function e6(){return z3(Y3,q3)}function t6(){return q3}function n6(e,t){return B3(Y3,e,t)}function r6(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 i6(e){return W3=G3=1,K3=V3(Y3=e),q3=0,[]}function a6(e){return Y3=``,e}function o6(e){return L3(n6(q3-1,l6(e===91?e+2:e===40?e+1:e)))}function s6(e){for(;(J3=e6())&&J3<33;)$3();return r6(e)>2||r6(J3)>3?``:` `}function c6(e,t){for(;--t&&$3()&&!(J3<48||J3>102||J3>57&&J3<65||J3>70&&J3<97););return n6(e,t6()+(t<6&&e6()==32&&$3()==32))}function l6(e){for(;$3();)switch(J3){case e:return q3;case 34:case 39:e!==34&&e!==39&&l6(J3);break;case 40:e===41&&l6(e);break;case 92:$3()}return q3}function u6(e,t){for(;$3()&&e+J3!==57&&(e+J3!==84||e6()!==47););return`/*`+n6(t,q3-1)+`*`+I3(e===47?e:$3())}function d6(e){for(;!r6(e6());)$3();return n6(e,q3)}function f6(e){return a6(p6(``,null,null,null,[``],e=i6(e),0,[0],e))}function p6(e,t,n,r,i,a,o,s,c){for(var l=0,u=0,d=o,f=0,p=0,m=0,h=1,g=1,_=1,v=0,y=0,b=``,x=i,S=a,C=r,w=b;g;)switch(m=y,y=$3()){case 40:m!=108&&z3(w,d-1)==58?(v++,w+=`(`):w+=o6(y);break;case 41:v--,w+=`)`;break;case 34:case 39:case 91:w+=o6(y);break;case 9:case 10:case 13:case 32:if(v>0){w+=I3(y);break}w+=s6(m);break;case 92:w+=c6(t6()-1,7);continue;case 47:switch(e6()){case 42:case 47:U3(h6(u6($3(),t6()),t,n,c),c),(r6(m||1)==5||r6(e6()||1)==5)&&V3(w)&&B3(w,-1,void 0)!==` `&&(w+=` `);break;default:w+=`/`}break;case 123*h:s[l++]=V3(w)*_;case 125*h:case 59:case 0:if(v>0&&y){w+=I3(y);break}switch(y){case 0:case 125:g=0;case 59+u:_==-1&&(w=R3(w,/\f/g,``)),p>0&&(V3(w)-d||h===0)&&U3(p>32?g6(w+`;`,r,n,d-1,c):g6(R3(w,` `,``)+`;`,r,n,d-2,c),c);break;case 59:w+=`;`;default:if(U3(C=m6(w,t,n,l,u,i,s,b,x=[],S=[],d,a),a),y===123){if(u===0)p6(w,t,C,C,x,a,d,s,S);else{switch(f){case 99:if(z3(w,3)===110)break;case 108:if(z3(w,2)===97)break;default:u=0;case 100:case 109:case 115:}u?p6(e,C,C,r&&U3(m6(e,C,C,0,0,i,s,b,i,x=[],d,S),S),i,S,d,s,r?x:S):p6(w,C,C,C,[``],S,0,s,S)}}}l=u=p=0,h=_=1,b=w=``,d=o;break;case 58:d=1+V3(w),p=m;default:if(h<1){if(y==123)--h;else if(y==125&&h++==0&&Q3()==125)continue}switch(w+=I3(y),y*h){case 38:_=u>0?1:(w+=`\f`,-1);break;case 44:if(v>0)break;s[l++]=(V3(w)-1)*_,_=1;break;case 64:e6()===45&&(w+=o6($3())),f=e6(),u=d=V3(b=w+=d6(t6())),y++;break;case 45:m===45&&V3(w)==2&&(h=0)}}return a}function m6(e,t,n,r,i,a,o,s,c,l,u,d){for(var f=i-1,p=i===0?a:[``],m=H3(p),h=0,g=0,_=0;h<r;++h)for(var v=0,y=B3(e,f+1,f=F3(g=o[h])),b=e;v<m;++v)(b=L3(g>0?p[v]+` `+y:R3(y,/&\f/g,p[v])))&&(c[_++]=b);return X3(e,t,n,i===0?k3:s,c,l,u,d)}function h6(e,t,n,r){return X3(e,t,n,O3,I3(Z3()),B3(e,2,-2),0,r)}function g6(e,t,n,r,i){return X3(e,t,n,A3,B3(e,0,r),B3(e,r+1,-1),r,i)}function _6(e,t){for(var n=``,r=0;r<e.length;r++)n+=t(e[r],r,e,t)||``;return n}function v6(e,t,n,r){switch(e.type){case P3:if(e.children.length)break;case j3:case M3:case A3:return e.return=e.return||e.value;case O3:return``;case N3:return e.return=e.value+`{`+_6(e.children,r)+`}`;case k3:if(!V3(e.value=e.props.join(`,`)))return``}return V3(n=_6(e.children,r))?e.return=e.value+`{`+n+`}`:``}function y6(e){var t=H3(e);return function(n,r,i,a){for(var o=``,s=0;s<t;s++)o+=e[s](n,r,i,a)||``;return o}}var b6=`c4`,x6={id:b6,detector:i(e=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),`detector`),loader:i(async()=>{let{diagram:e}=await n(async()=>{let{diagram:e}=await import(`./c4Diagram-7LVT6UL2-C5YYMNh9.js`);return{diagram:e}},__vite__mapDeps([6,7]));return{id:b6,diagram:e}},`loader`)},S6=`flowchart`,C6={id:S6,detector:i((e,t)=>t?.flowchart?.defaultRenderer===`dagre-wrapper`||t?.flowchart?.defaultRenderer===`elk`?!1:/^\s*graph/.test(e),`detector`),loader:i(async()=>{let{diagram:e}=await n(async()=>{let{diagram:e}=await import(`./flowDiagram-HODETNUW-CFEMKVwu.js`);return{diagram:e}},__vite__mapDeps([8,9,10,11,12,13,7]));return{id:S6,diagram:e}},`loader`)},w6=`flowchart-v2`,T6={id:w6,detector:i((e,t)=>t?.flowchart?.defaultRenderer!==`dagre-d3`&&(t?.flowchart?.defaultRenderer===`elk`&&(t.layout=`elk`),/^\s*graph/.test(e)&&t?.flowchart?.defaultRenderer===`dagre-wrapper`?!0:/^\s*flowchart/.test(e)),`detector`),loader:i(async()=>{let{diagram:e}=await n(async()=>{let{diagram:e}=await import(`./flowDiagram-HODETNUW-CFEMKVwu.js`);return{diagram:e}},__vite__mapDeps([8,9,10,11,12,13,7]));return{id:w6,diagram:e}},`loader`)},E6=`swimlane`,D6={id:E6,detector:i(e=>/^\s*swimlane-beta\b/.test(e),`detector`),loader:i(async()=>{let{diagram:e}=await n(async()=>{let{diagram:e}=await import(`./swimlanesDiagram-VR7AAH4N-CKaOPN8U.js`);return{diagram:e}},__vite__mapDeps([14,9,10,11,12,13,7]));return{id:E6,diagram:e}},`loader`)},O6=`er`,k6={id:O6,detector:i(e=>/^\s*erDiagram/.test(e),`detector`),loader:i(async()=>{let{diagram:e}=await n(async()=>{let{diagram:e}=await import(`./erDiagram-RLTQ6QDP-DTCj-KOY.js`);return{diagram:e}},__vite__mapDeps([15,12,11,13]));return{id:O6,diagram:e}},`loader`)},A6=`gitGraph`,j6={id:A6,detector:i(e=>/^\s*gitGraph/.test(e),`detector`),loader:i(async()=>{let{diagram:e}=await n(async()=>{let{diagram:e}=await import(`./gitGraphDiagram-WWUBYQGX-B1D08k6k.js`);return{diagram:e}},__vite__mapDeps([16,17,18,19,3,4]));return{id:A6,diagram:e}},`loader`)},M6=`gantt`,N6={id:M6,detector:i(e=>/^\s*gantt/.test(e),`detector`),loader:i(async()=>{let{diagram:e}=await n(async()=>{let{diagram:e}=await import(`./ganttDiagram-EL5Y4UJY-DyGkH9mL.js`);return{diagram:e}},__vite__mapDeps([20,3,4,21]));return{id:M6,diagram:e}},`loader`)},P6=`info`,F6={id:P6,detector:i(e=>/^\s*info/.test(e),`detector`),loader:i(async()=>{let{diagram:e}=await n(async()=>{let{diagram:e}=await import(`./infoDiagram-27XIBGKW-Bf0m1pFs.js`);return{diagram:e}},__vite__mapDeps([22,19,3,4]));return{id:P6,diagram:e}},`loader`)},I6=`pie`,L6={id:I6,detector:i(e=>/^\s*pie/.test(e),`detector`),loader:i(async()=>{let{diagram:e}=await n(async()=>{let{diagram:e}=await import(`./pieDiagram-E7YTZNPT-m4yruZNh.js`);return{diagram:e}},__vite__mapDeps([23,18,19,3,4,21]));return{id:I6,diagram:e}},`loader`)},R6=`quadrantChart`,z6={id:R6,detector:i(e=>/^\s*quadrantChart/.test(e),`detector`),loader:i(async()=>{let{diagram:e}=await n(async()=>{let{diagram:e}=await import(`./quadrantDiagram-AXDQQJYC-y4L1cf7l.js`);return{diagram:e}},__vite__mapDeps([24,21]));return{id:R6,diagram:e}},`loader`)},B6=`xychart`,V6={id:B6,detector:i(e=>/^\s*xychart(-beta)?/.test(e),`detector`),loader:i(async()=>{let{diagram:e}=await n(async()=>{let{diagram:e}=await import(`./xychartDiagram-S5SC5T6Z-CJnigrLu.js`);return{diagram:e}},__vite__mapDeps([25,21]));return{id:B6,diagram:e}},`loader`)},H6=`requirement`,U6={id:H6,detector:i(e=>/^\s*requirement(Diagram)?/.test(e),`detector`),loader:i(async()=>{let{diagram:e}=await n(async()=>{let{diagram:e}=await import(`./requirementDiagram-BXWQKSXE-CwJ0sNiM.js`);return{diagram:e}},__vite__mapDeps([26,12,13]));return{id:H6,diagram:e}},`loader`)},W6=`sequence`,G6={id:W6,detector:i(e=>/^\s*sequenceDiagram/.test(e),`detector`),loader:i(async()=>{let{diagram:e}=await n(async()=>{let{diagram:e}=await import(`./sequenceDiagram-WJ2MYXX4-CW_G65sH.js`);return{diagram:e}},__vite__mapDeps([27,17,7]));return{id:W6,diagram:e}},`loader`)},K6=`class`,q6={id:K6,detector:i((e,t)=>t?.class?.defaultRenderer!==`dagre-wrapper`&&/^\s*classDiagram/.test(e),`detector`),loader:i(async()=>{let{diagram:e}=await n(async()=>{let{diagram:e}=await import(`./classDiagram-ZZMXUADV-BfOlT7v5.js`);return{diagram:e}},__vite__mapDeps([28,29,10,12,13,7]));return{id:K6,diagram:e}},`loader`)},J6=`classDiagram`,Y6={id:J6,detector:i((e,t)=>/^\s*classDiagram/.test(e)&&t?.class?.defaultRenderer===`dagre-wrapper`?!0:/^\s*classDiagram-v2/.test(e),`detector`),loader:i(async()=>{let{diagram:e}=await n(async()=>{let{diagram:e}=await import(`./classDiagram-v2-VYDZK3BY-BfOlT7v5.js`);return{diagram:e}},__vite__mapDeps([30,29,10,12,13,7]));return{id:J6,diagram:e}},`loader`)},X6=`state`,Z6={id:X6,detector:i((e,t)=>t?.state?.defaultRenderer!==`dagre-wrapper`&&/^\s*stateDiagram/.test(e),`detector`),loader:i(async()=>{let{diagram:e}=await n(async()=>{let{diagram:e}=await import(`./stateDiagram-D77RDMKH-CqdLpUep.js`);return{diagram:e}},__vite__mapDeps([31,32,12,13,7,1]));return{id:X6,diagram:e}},`loader`)},Q6=`stateDiagram`,$6={id:Q6,detector:i((e,t)=>!!(/^\s*stateDiagram-v2/.test(e)||/^\s*stateDiagram/.test(e)&&t?.state?.defaultRenderer===`dagre-wrapper`),`detector`),loader:i(async()=>{let{diagram:e}=await n(async()=>{let{diagram:e}=await import(`./stateDiagram-v2-MP3YSRHH-CZng7GId.js`);return{diagram:e}},__vite__mapDeps([33,32,12,13,7]));return{id:Q6,diagram:e}},`loader`)},eb=`journey`,tb={id:eb,detector:i(e=>/^\s*journey/.test(e),`detector`),loader:i(async()=>{let{diagram:e}=await n(async()=>{let{diagram:e}=await import(`./journeyDiagram-3NMN7TZE-hOGZiS97.js`);return{diagram:e}},__vite__mapDeps([34,10,7]));return{id:eb,diagram:e}},`loader`)},nb={draw:i((e,t,n)=>{l.debug(`rendering svg for syntax error
|
|
304
|
+
`);let r=Us(t),i=r.append(`g`);r.attr(`viewBox`,`0 0 2412 512`),kr(r,100,512,!0),i.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`),i.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`),i.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`),i.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`),i.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`),i.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`),i.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`),i.append(`text`).attr(`class`,`error-text`).attr(`x`,1250).attr(`y`,400).attr(`font-size`,`100px`).style(`text-anchor`,`middle`).text(`mermaid version ${n}`)},`draw`)},rb=nb,ib={db:{},renderer:nb,parser:{parse:i(()=>{},`parse`)}},ab=`flowchart-elk`,ob={id:ab,detector:i((e,t={})=>/^\s*flowchart-elk/.test(e)||/^\s*(flowchart|graph)/.test(e)&&t?.flowchart?.defaultRenderer===`elk`?(t.layout=`elk`,!0):!1,`detector`),loader:i(async()=>{let{diagram:e}=await n(async()=>{let{diagram:e}=await import(`./flowDiagram-HODETNUW-CFEMKVwu.js`);return{diagram:e}},__vite__mapDeps([8,9,10,11,12,13,7]));return{id:ab,diagram:e}},`loader`)},sb=`timeline`,cb={id:sb,detector:i(e=>/^\s*timeline/.test(e),`detector`),loader:i(async()=>{let{diagram:e}=await n(async()=>{let{diagram:e}=await import(`./timeline-definition-24CTP7MA-DLGi-xy-.js`);return{diagram:e}},[]);return{id:sb,diagram:e}},`loader`)},lb=`mindmap`,ub={id:lb,detector:i(e=>/^\s*mindmap/.test(e),`detector`),loader:i(async()=>{let{diagram:e}=await n(async()=>{let{diagram:e}=await import(`./mindmap-definition-YA3MSWOX-6LNGKzRE.js`);return{diagram:e}},__vite__mapDeps([35,12,13]));return{id:lb,diagram:e}},`loader`)},db=`kanban`,fb={id:db,detector:i(e=>/^\s*kanban/.test(e),`detector`),loader:i(async()=>{let{diagram:e}=await n(async()=>{let{diagram:e}=await import(`./kanban-definition-UXKFOSKX-DS-3wdxe.js`);return{diagram:e}},__vite__mapDeps([36,10]));return{id:db,diagram:e}},`loader`)},pb=`sankey`,mb={id:pb,detector:i(e=>/^\s*sankey(-beta)?/.test(e),`detector`),loader:i(async()=>{let{diagram:e}=await n(async()=>{let{diagram:e}=await import(`./sankeyDiagram-P5KCCOFB-Da85_fPb.js`);return{diagram:e}},__vite__mapDeps([37,21]));return{id:pb,diagram:e}},`loader`)},hb=`packet`,gb={id:hb,detector:i(e=>/^\s*packet(-beta)?/.test(e),`detector`),loader:i(async()=>{let{diagram:e}=await n(async()=>{let{diagram:e}=await import(`./diagram-Z3DM3KII-CJmAyH70.js`);return{diagram:e}},__vite__mapDeps([38,18,19,3,4]));return{id:hb,diagram:e}},`loader`)},_b=`radar`,vb={id:_b,detector:i(e=>/^\s*radar-beta/.test(e),`detector`),loader:i(async()=>{let{diagram:e}=await n(async()=>{let{diagram:e}=await import(`./diagram-UQ7AKVKN-dmEGfy18.js`);return{diagram:e}},__vite__mapDeps([39,18,19,3,4]));return{id:_b,diagram:e}},`loader`)},yb=`block`,bb={id:yb,detector:i(e=>/^\s*block(-beta)?/.test(e),`detector`),loader:i(async()=>{let{diagram:e}=await n(async()=>{let{diagram:e}=await import(`./blockDiagram-I7D4REHJ-DyavTEyC.js`);return{diagram:e}},__vite__mapDeps([40,10,11]));return{id:yb,diagram:e}},`loader`)},xb=`treeView`,Sb={id:xb,detector:i(e=>/^\s*treeView-beta/.test(e),`detector`),loader:i(async()=>{let{diagram:e}=await n(async()=>{let{diagram:e}=await import(`./diagram-S7CK7UJ4-BbgOrdTP.js`);return{diagram:e}},__vite__mapDeps([41,17,18,19,3,4]));return{id:xb,diagram:e}},`loader`)},Cb=`architecture`,wb={id:Cb,detector:i(e=>/^\s*architecture/.test(e),`detector`),loader:i(async()=>{let{diagram:e}=await n(async()=>{let{diagram:e}=await import(`./architectureDiagram-5GKGNRK7-Cz6oQJGV.js`);return{diagram:e}},__vite__mapDeps([42,3,4,18,19,5]));return{id:Cb,diagram:e}},`loader`)},Tb=`eventmodeling`,Eb={id:Tb,detector:i(e=>/^\s*eventmodeling/.test(e),`detector`),loader:i(async()=>{let{diagram:e}=await n(async()=>{let{diagram:e}=await import(`./diagram-VSXAHHWV-C1AAi9ds.js`);return{diagram:e}},__vite__mapDeps([43,18,19,3,4]));return{id:Tb,diagram:e}},`loader`)},Db=`ishikawa`,Ob={id:Db,detector:i(e=>/^\s*ishikawa(-beta)?\b/i.test(e),`detector`),loader:i(async()=>{let{diagram:e}=await n(async()=>{let{diagram:e}=await import(`./ishikawaDiagram-5VMMS53U-BVrp2sns.js`);return{diagram:e}},[]);return{id:Db,diagram:e}},`loader`)},kb=`venn`,Ab={id:kb,detector:i(e=>/^\s*venn-beta/.test(e),`detector`),loader:i(async()=>{let{diagram:e}=await n(async()=>{let{diagram:e}=await import(`./vennDiagram-4TSXK5OY-spL-BBOp.js`);return{diagram:e}},[]);return{id:kb,diagram:e}},`loader`)},jb=`treemap`,Mb={id:jb,detector:i(e=>/^\s*treemap/.test(e),`detector`),loader:i(async()=>{let{diagram:e}=await n(async()=>{let{diagram:e}=await import(`./diagram-VX7I27RA-CXE3jVhR.js`);return{diagram:e}},__vite__mapDeps([44,18,13,19,3,4,21]));return{id:jb,diagram:e}},`loader`)},Nb=`wardley`,Pb={id:Nb,detector:i(e=>/^\s*wardley-beta/i.test(e),`detector`),loader:i(async()=>{let{diagram:e}=await n(async()=>{let{diagram:e}=await import(`./wardleyDiagram-VM6X3IG4-ubLr3NNH.js`);return{diagram:e}},__vite__mapDeps([45,18,19,3,4]));return{id:Nb,diagram:e}},`loader`)},Fb=`cynefin`,Ib={id:Fb,detector:i(e=>/^\s*cynefin-beta(?:[\s:]|$)/.test(e),`detector`),loader:i(async()=>{let{diagram:e}=await n(async()=>{let{diagram:e}=await import(`./cynefinDiagram-5FMLGOSQ-B2BjF2Np.js`);return{diagram:e}},__vite__mapDeps([46,18,19,3,4]));return{id:Fb,diagram:e}},`loader`)},Lb=`railroad`,Rb={id:Lb,detector:i(e=>/^\s*railroad-beta/i.test(e),`detector`),loader:i(async()=>{let{diagram:e}=await n(async()=>{let{diagram:e}=await import(`./railroadDiagram-O6MQD6OU-BxEd5py5.js`);return{diagram:e}},__vite__mapDeps([47,48,18,19,3,4]));return{id:Lb,diagram:e}},`loader`)},zb=`railroadEbnf`,Bb={id:zb,detector:i(e=>/^\s*railroad-ebnf-beta/i.test(e),`detector`),loader:i(async()=>{let{diagram:e}=await n(async()=>{let{diagram:e}=await import(`./ebnfDiagram-PWID7BFC-BfTsv3U-.js`);return{diagram:e}},__vite__mapDeps([49,48,18,19,3,4]));return{id:zb,diagram:e}},`loader`)},Vb=`railroadAbnf`,Hb={id:Vb,detector:i(e=>/^\s*railroad-abnf-beta/i.test(e),`detector`),loader:i(async()=>{let{diagram:e}=await n(async()=>{let{diagram:e}=await import(`./abnfDiagram-VCTEODGH-C49HvP8-.js`);return{diagram:e}},__vite__mapDeps([50,48,18,19,3,4]));return{id:Vb,diagram:e}},`loader`)},Ub=`railroadPeg`,Wb={id:Ub,detector:i(e=>/^\s*railroad-peg-beta/i.test(e),`detector`),loader:i(async()=>{let{diagram:e}=await n(async()=>{let{diagram:e}=await import(`./pegDiagram-XKGWAZYB-DtH9gLh9.js`);return{diagram:e}},__vite__mapDeps([51,48,18,19,3,4]));return{id:Ub,diagram:e}},`loader`)},Gb=!1,Kb=i(()=>{Gb||(Gb=!0,ni(`error`,ib,e=>e.toLowerCase().trim()===`error`),ni(`---`,{db:{clear:i(()=>{},`clear`)},styles:{},renderer:{draw:i(()=>{},`draw`)},parser:{parse:i(()=>{throw 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:i(()=>null,`init`)},e=>e.toLowerCase().trimStart().startsWith(`---`)),Qn(ob,ub,wb),Qn(x6,fb,Y6,q6,k6,N6,F6,L6,U6,G6,D6,T6,C6,cb,j6,$6,Z6,tb,z6,mb,gb,V6,bb,Eb,Sb,vb,Ob,Mb,Rb,Bb,Hb,Wb,Ab,Pb,Ib))},`addDiagrams`),qb=i(async()=>{l.debug(`Loading registered diagrams`);let e=(await Promise.allSettled(Object.entries(Xn).map(async([e,{detector:t,loader:n}])=>{if(n)try{ri(e)}catch{try{let{diagram:e,id:r}=await n();ni(r,e,t)}catch(t){throw l.error(`Failed to load external diagram with key ${e}. Removing from detectors.`),delete Xn[e],t}}}))).filter(e=>e.status===`rejected`);if(e.length>0){l.error(`Failed to load ${e.length} external diagrams`);for(let t of e)l.error(t);throw Error(`Failed to load ${e.length} external diagrams`)}},`loadRegisteredDiagrams`),Jb=`graphics-document document`;function Yb(e,t){e.attr(`role`,Jb),t!==``&&e.attr(`aria-roledescription`,t)}i(Yb,`setA11yDiagramInfo`);function Xb(e,t,n,r){if(e.insert!==void 0){if(n){let t=`chart-desc-${r}`;e.attr(`aria-describedby`,t),e.insert(`desc`,`:first-child`).attr(`id`,t).text(n)}if(t){let n=`chart-title-${r}`;e.attr(`aria-labelledby`,n),e.insert(`title`,`:first-child`).attr(`id`,n).text(t)}}}i(Xb,`addSVGa11yTitleDescription`);var Zb=class e{constructor(e,t,n,r,i){this.type=e,this.text=t,this.db=n,this.parser=r,this.renderer=i}static{i(this,`Diagram`)}static async fromText(t,n={}){let r=z(),i=Zn(t,r);t=ou(t)+`
|
|
305
|
+
`;try{ri(i)}catch{let e=er(i);if(!e)throw new Yn(`Diagram ${i} not found.`);let{id:t,diagram:n}=await e();ni(t,n)}let{db:a,parser:o,renderer:s,init:c}=ri(i);return o.parser&&(o.parser.yy=a),a.clear?.(),c?.(r),n.title&&a.setDiagramTitle?.(n.title),await o.parse(t),new e(i,t,a,o,s)}async render(e,t){await this.renderer.draw(this.text,e,t,this)}getParser(){return this.parser}getType(){return this.type}},Qb=[],$b=i(()=>{Qb.forEach(e=>{e()}),Qb=[]},`attachFunctions`),e8=i(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,``).trimStart(),`cleanupComments`);function t8(e){let t=e.match(Kn);if(!t)return{text:e,metadata:{}};let n=t[1],r=b3(n?t[2].split(`
|
|
306
|
+
`).map(e=>e.startsWith(n)?e.slice(n.length):e).join(`
|
|
307
|
+
`):t[2],{schema:_3})??{};r=typeof r==`object`&&!Array.isArray(r)?r:{};let i={};return r.displayMode&&(i.displayMode=r.displayMode.toString()),r.title&&(i.title=r.title.toString()),r.config&&(i.config=r.config),{text:e.slice(t[0].length),metadata:i}}i(t8,`extractFrontMatter`);var n8=i(e=>e.replace(/\r\n?/g,`
|
|
308
|
+
`).replace(/<(\w+)([^>]*)>/g,(e,t,n)=>`<`+t+n.replace(/="([^"]*)"/g,`='$1'`)+`>`),`cleanupText`),r8=i(e=>{let{text:t,metadata:n}=t8(e),{displayMode:r,title:i,config:a={}}=n;return r&&(a.gantt||={},a.gantt.displayMode=r),{title:i,config:a,text:t}},`processFrontmatter`),i8=i(e=>{let t=au.detectInit(e)??{},n=au.detectDirective(e,`wrap`);return Array.isArray(n)?t.wrap=n.some(({type:e})=>e===`wrap`):n?.type===`wrap`&&(t.wrap=!0),{text:Ol(e),directive:t}},`processDirectives`);function a8(e){let t=r8(n8(e)),n=i8(t.text),r=iu(t.config,n.directive);return e=e8(n.text),{code:e,title:t.title,config:r}}i(a8,`preprocessDiagram`);function o8(e){let t=new TextEncoder().encode(e),n=Array.from(t,e=>String.fromCodePoint(e)).join(``);return btoa(n)}i(o8,`toBase64`);var s8=5e4,c8=`graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa`,l8=`sandbox`,u8=`loose`,d8=`http://www.w3.org/2000/svg`,f8=`http://www.w3.org/1999/xlink`,p8=`http://www.w3.org/1999/xhtml`,m8=`100%`,h8=`100%`,g8=`border:0;margin:0;`,_8=`margin:0`,v8=`allow-top-navigation-by-user-activation allow-popups`,y8=`The "iframe" tag is not supported by your browser.`,b8=[`foreignobject`],x8=[`dominant-baseline`];function S8(e){let t=a8(e);return zn(),Rn(t.config??{}),t}i(S8,`processAndSetConfigs`);async function C8(e,t){Kb();try{let{code:t,config:n}=S8(e);return{diagramType:(await F8(t)).type,config:n}}catch(e){if(t?.suppressErrors)return!1;throw e}}i(C8,`parse`);var w8=i((e,t,n=[])=>`.${e} ${t} ${wn(`{ ${n.join(` !important; `)} !important; }`)}`,`cssImportantStyles`),T8=i((e,t=new Map)=>{let n=new CSSStyleSheet;if(e.fontFamily!==void 0&&n.insertRule(`:root { --mermaid-font-family: ${e.fontFamily}}`,n.cssRules.length),e.altFontFamily!==void 0&&n.insertRule(`:root { --mermaid-alt-font-family: ${e.altFontFamily}}`,n.cssRules.length),t instanceof Map){let r=Gn(e)?[`> *`,`span`]:[`rect`,`polygon`,`ellipse`,`circle`,`path`];t.forEach(e=>{Sl(e.styles)||r.forEach(t=>{n.insertRule(w8(e.id,t,e.styles),n.cssRules.length)}),Sl(e.textStyles)||n.insertRule(w8(e.id,`tspan`,(e?.textStyles||[]).map(e=>e.replace(`color`,`fill`))),n.cssRules.length)})}let r=``;if(e.themeCSS!==void 0){if(typeof n.replaceSync==`function`){let t=new CSSStyleSheet;t.replaceSync(e.themeCSS),r=Mr(t)+`
|
|
309
|
+
`}else r+=`${e.themeCSS}
|
|
310
|
+
`}return r+Mr(n)},`createCssStyles`),E8=i((e,t)=>_6(f6(`${e}{${t}}`),y6([i(function(t,n,r,i){if(t.type===`rule`&&Array.isArray(t.props)){if(t.parent&&t.parent.type===`@keyframes`)return;t.props=t.props.map(n=>n===e&&Array.isArray(t.children)&&t.children.every(e=>e.type===`decl`&&new Set([`font-family`,`font-size`,`fill`]).has(e.props))?n:!n.startsWith(`${e} `)&&!n.startsWith(`${e}>`)||n.startsWith(`${e} ||`)?`${e} ${n}`:n)}else t.type.startsWith(`@`)&&([`@media`,`@supports`,`@layer`,`@scope`,`@container`,`@starting-style`,`@keyframes`].includes(t.type)||(l.warn(`Removing unsupported at-rule ${t.type} from CSS`),t.type=O3))},`addNamespace`),v6])),`compileCSS`),D8=i((e,t,n,r)=>E8(r,Fr(t,T8(e,n),{...e.themeVariables,theme:e.theme,look:e.look},r)),`createUserStyles`),O8=i((e=``,t,n)=>{let r=e;return!n&&!t&&(r=r.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,`marker-end="url(#`)),r=su(r),r=r.replace(/<br>/g,`<br/>`),r},`cleanUpSvgCode`),k8=i((e=``,t)=>`<iframe style="width:${m8};height:${t?.viewBox?.baseVal?.height?t.viewBox.baseVal.height+`px`:h8};${g8}" src="data:text/html;charset=UTF-8;base64,${o8(`<body style="${_8}">${e}</body>`)}" sandbox="${v8}">
|
|
311
|
+
${y8}
|
|
312
|
+
</iframe>`,`putIntoIFrame`),A8=i((e,t,n,r,i)=>{let a=e.append(`div`);a.attr(`id`,n),r&&a.attr(`style`,r);let o=a.append(`svg`).attr(`id`,t).attr(`width`,`100%`).attr(`xmlns`,d8);return i&&o.attr(`xmlns:xlink`,i),o.append(`g`),e},`appendDivSvgG`);function j8(e,t){return e.append(`iframe`).attr(`id`,t).attr(`style`,`width: 100%; height: 100%;`).attr(`sandbox`,``)}i(j8,`sandboxedIframe`);var M8=i((e,t,n,r)=>{e.getElementById(t)?.remove(),e.getElementById(n)?.remove(),e.getElementById(r)?.remove()},`removeExistingElements`),N8=i(async function(e,t,n){Kb();let r=S8(t);t=r.code;let a=z();l.debug(a),t.length>(a?.maxTextSize??s8)&&(t=c8);let o=`#${e}`,s=`i`+e,c=`#`+s,u=`d`+e,d=`#`+u,f=i(()=>{let e=V(m?c:d).node();e&&`remove`in e&&e.remove()},`removeTempElements`),p=V(document.body),m=a.securityLevel===l8,h=a.securityLevel===u8,g=a.fontFamily;n===void 0?(M8(document,e,u,s),m?(p=V(j8(V(document.body),s).nodes()[0].contentDocument.body),p.node().style.margin=`0`):p=V(`body`),A8(p,e,u)):(n&&(n.innerHTML=``),m?(p=V(j8(V(n),s).nodes()[0].contentDocument.body),p.node().style.margin=`0`):p=V(n),A8(p,e,u,`font-family: ${g}`,f8));let _,v;try{_=await Zb.fromText(t,{title:r.title})}catch(e){if(a.suppressErrorRendering)throw f(),e;_=await Zb.fromText(`error`),v=e}let y=p.select(d).node(),b=_.type,x=y.firstChild,S=x.firstChild,C=D8(a,b,_.renderer.getClasses?.(t,_),o),w=document.createElement(`style`);w.innerHTML=C,x.insertBefore(w,S);try{await _.renderer.draw(t,e,`11.17.2`,_)}catch(n){throw a.suppressErrorRendering?f():rb.draw(t,e,`11.17.2`),n}I8(b,p.select(`${d} svg`),_.db.getAccTitle?.(),_.db.getAccDescription?.());let T=i(()=>{p.select(`[id="${e}"]`).selectAll(`foreignobject > *`).attr(`xmlns`,p8);let t=p.select(d).node().innerHTML;if(l.debug(`config.arrowMarkerAbsolute`,a.arrowMarkerAbsolute),t=O8(t,m,En(a.arrowMarkerAbsolute)),m){let e=p.select(d+` svg`).node();t=k8(t,e)}else h||(t=Ht.sanitize(t,{ADD_TAGS:b8,ADD_ATTR:x8,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));return $b(),t},`serializeSvg`)();if(v)throw v;return f(),{diagramType:b,svg:T,bindFunctions:_.db.bindFunctions}},`render`);function P8(e={}){let t=Wt({},e);t?.fontFamily&&!t.themeVariables?.fontFamily&&(t.themeVariables||={},t.themeVariables.fontFamily=t.fontFamily),Nn(t),t?.theme&&t.theme in hn?t.themeVariables=hn[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=hn.default.getThemeVariables(t.themeVariables)),u((typeof t==`object`?Mn(t):Fn()).logLevel),Kb()}i(P8,`initialize`);var F8=i((e,t={})=>{let{code:n}=a8(e);return Zb.fromText(n,t)},`getDiagramFromText`);function I8(e,t,n,r){Yb(t,e),Xb(t,n,r,t.attr(`id`))}i(I8,`addA11yInfo`);var L8=Object.freeze({render:N8,parse:C8,getDiagramFromText:F8,initialize:P8,getConfig:z,setConfig:In,getSiteConfig:Fn,updateSiteConfig:Pn,reset:i(()=>{zn()},`reset`),globalReset:i(()=>{zn(Tn)},`globalReset`),defaultConfig:Tn});u(z().logLevel),zn(z());var R8=i((e,t,n)=>{l.warn(e),tu(e)?(n&&n(e.str,e.hash),t.push({...e,message:e.str,error:e})):(n&&n(e),e instanceof Error&&t.push({str:e.message,message:e.message,hash:e.name,error:e}))},`handleError`),z8=i(async function(e={querySelector:`.mermaid`}){try{await B8(e)}catch(t){if(tu(t)&&l.error(t.str),Z8.parseError&&Z8.parseError(t),!e.suppressErrors)throw l.error(`Use the suppressErrors option to suppress these errors`),t}},`run`),B8=i(async function({postRenderCallback:e,querySelector:t,nodes:n}={querySelector:`.mermaid`}){let r=L8.getConfig();l.debug(`${e?``:`No `}Callback function found`);let i;if(n)i=n;else if(t)i=document.querySelectorAll(t);else throw Error(`Nodes and querySelector are both undefined`);l.debug(`Found ${i.length} diagrams`),r?.startOnLoad!==void 0&&(l.debug(`Start On Load: `+r?.startOnLoad),L8.updateSiteConfig({startOnLoad:r?.startOnLoad}));let a=new au.InitIDGenerator(r.deterministicIds,r.deterministicIDSeed),o,s=[];for(let t of Array.from(i)){if(l.info(`Rendering diagram: `+t.id),t.getAttribute(`data-processed`))continue;t.setAttribute(`data-processed`,`true`);let n=`mermaid-${a.next()}`;o=t.innerHTML,o=Bd(au.entityDecode(o)).trim().replace(/<br\s*\/?>/gi,`<br/>`);let r=au.detectInit(o);r&&l.debug(`Detected early reinit: `,r);try{let{svg:r,bindFunctions:i}=await X8(n,o,t);t.innerHTML=r,e&&await e(n),i&&i(t)}catch(e){R8(e,s,Z8.parseError)}}if(s.length>0)throw s[0]},`runThrowsErrors`),V8=i(function(e){L8.initialize(e)},`initialize`),H8=i(async function(e,t,n){l.warn(`mermaid.init is deprecated. Please use run instead.`),e&&V8(e);let r={postRenderCallback:n,querySelector:`.mermaid`};typeof t==`string`?r.querySelector=t:t&&(r.nodes=t instanceof HTMLElement?[t]:t),await z8(r)},`init`),U8=i(async(e,{lazyLoad:t=!0}={})=>{Kb(),Qn(...e),t===!1&&await qb()},`registerExternalDiagrams`),W8=i(function(){if(Z8.startOnLoad){let{startOnLoad:e}=L8.getConfig();e&&Z8.run().catch(e=>l.error(`Mermaid failed to initialize`,e))}},`contentLoaded`);typeof document<`u`&&window.addEventListener(`load`,W8,!1);var G8=i(function(e){Z8.parseError=e},`setParseErrorHandler`),K8=[],q8=!1,J8=i(async()=>{if(!q8){for(q8=!0;K8.length>0;){let e=K8.shift();if(e)try{await e()}catch(e){l.error(`Error executing queue`,e)}}q8=!1}},`executeQueue`),Y8=i(async(e,t)=>new Promise((n,r)=>{let a=i(()=>new Promise((i,a)=>{L8.parse(e,t).then(e=>{i(e),n(e)},e=>{l.error(`Error parsing`,e),Z8.parseError?.(e),a(e),r(e)})}),`performCall`);K8.push(a),J8().catch(r)}),`parse`),X8=i((e,t,n)=>new Promise((r,a)=>{let o=i(()=>new Promise((i,o)=>{L8.render(e,t,n).then(e=>{i(e),r(e)},e=>{l.error(`Error parsing`,e),Z8.parseError?.(e),o(e),a(e)})}),`performCall`);K8.push(o),J8().catch(a)}),`render`),Z8={startOnLoad:!0,mermaidAPI:L8,parse:Y8,render:X8,init:H8,run:z8,registerExternalDiagrams:U8,registerLayoutLoaders:d2,initialize:V8,parseError:void 0,contentLoaded:W8,setParseErrorHandler:G8,detectType:Zn,registerIconPacks:yc,getRegisteredDiagramsMetadata:i(()=>Object.keys(Xn).map(e=>({id:e})),`getRegisteredDiagramsMetadata`)},Q8=Z8;export{h1 as $,$r as $n,el as $t,cv as A,Ir as An,bf as At,U0 as B,Qt as Bn,Bl as Bt,Ty as C,is as Cn,vg as Ct,hy as D,Wt as Dn,mg as Dt,gy as E,V as En,hg as Et,Q0 as F,Gr as Fn,Yl as Ft,f0 as G,gr as Gn,al as Gt,v0 as H,Wn as Hn,Wl as Ht,Y0 as I,Ur as In,Xl as It,N1 as J,Wr as Jn,Hc as Jt,u0 as K,Tr as Kn,Lc as Kt,q0 as L,z as Ln,iu as Lt,ov as M,kr as Mn,uf as Mt,rv as N,Zr as Nn,hf as Nt,Tv as O,Cr as On,Y as Ot,tv as P,bn as Pn,Zl as Pt,g1 as Q,Ar as Qn,$c as Qt,K0 as R,B as Rn,Hl as Rt,Ey as S,zo as Sn,gg as St,by as T,Jo as Tn,yg as Tt,h0 as U,Sr as Un,au as Ut,y0 as V,pr as Vn,ru as Vt,m0 as W,tr as Wn,ql as Wt,x1 as X,Xr as Xn,Gc as Xt,O1 as Y,Hr as Yn,Ic as Yt,y1 as Z,Kr as Zn,zc as Zt,Py as _,wc as _n,Yg as _t,P2 as a,Wc as an,w as ar,n1 as at,ky as b,gc as bn,t_ as bt,g2 as c,Pc as cn,l as cr,D_ as ct,f2 as d,Q8 as default,Yc as dn,i as dr,b_ as dt,Zc as en,Ht as er,p1 as et,s2 as f,Kc as fn,y_ as ft,Iy as g,Ac as gn,i_ as gt,Vy as h,jc as hn,a_ as ht,$ as i,Fc as in,D as ir,r1 as it,sv as j,Er as jn,W as jt,wv as k,Vr as kn,q as kt,j2 as l,Rc as ln,o as lr,E_ as lt,Uy as m,Mc as mn,g_ as mt,b3 as n,Xc as nn,k as nr,a1 as nt,m2 as o,Nc as on,S as or,t1 as ot,Zy as p,qc as pn,__ as pt,o0 as q,sr as qn,Uc as qt,O2 as r,Bc as rn,O as rr,i1 as rt,E2 as s,Vc as sn,p as sr,M_ as st,_3 as t,Qc as tn,A as tr,f1 as tt,p2 as u,Jc as un,a as ur,x_ as ut,My as v,Sc as vn,Rg as vt,Cy as w,Go as wn,xg as wt,Oy as x,Us as xn,Bg as xt,jy as y,yc as yn,Cg as yt,W0 as z,qr as zn,cu as zt};
|