archyne 0.2.0

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.
Files changed (92) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +249 -0
  3. package/THIRD-PARTY-NOTICES.md +302 -0
  4. package/bin/archyne.mjs +179 -0
  5. package/desktop/main.cjs +141 -0
  6. package/dist/assets/_commonjs-dynamic-modules-TDtrdbi3.js +1 -0
  7. package/dist/assets/abnfDiagram-VRR7QNED-DxJn5x30.js +1 -0
  8. package/dist/assets/ar-DHpnjuQB.js +1 -0
  9. package/dist/assets/arc-Bi9nYi75.js +1 -0
  10. package/dist/assets/architectureDiagram-ZJ3FMSHR-CVVsX69f.js +36 -0
  11. package/dist/assets/blockDiagram-677ZJIJ3-CvyOVrtD.js +132 -0
  12. package/dist/assets/c4Diagram-LMCZKHZV-CeTXI2L5.js +10 -0
  13. package/dist/assets/channel-CgQghNFn.js +1 -0
  14. package/dist/assets/chunk-2Q5K7J3B-QWLx0LNh.js +1 -0
  15. package/dist/assets/chunk-32BRIVSS-Cx7PNJc5.js +1 -0
  16. package/dist/assets/chunk-5VM5RSS4-B-JlXrm9.js +15 -0
  17. package/dist/assets/chunk-EX3LRPZG-BZir2lEZ.js +231 -0
  18. package/dist/assets/chunk-JWPE2WC7-Bs6js5ed.js +1 -0
  19. package/dist/assets/chunk-MOJQB5TN-M9vORODQ.js +88 -0
  20. package/dist/assets/chunk-RYQCIY6F-C23BZB1s.js +1 -0
  21. package/dist/assets/chunk-V7JOEXUC-DP9DCEHY.js +206 -0
  22. package/dist/assets/chunk-VR4S4FIN-CXMOwHEw.js +1 -0
  23. package/dist/assets/chunk-XXDRQBXY-C-XBHYFW.js +1 -0
  24. package/dist/assets/classDiagram-OUVF2IWQ-C9iVyfdZ.js +1 -0
  25. package/dist/assets/classDiagram-v2-EOCWNBFH-C9iVyfdZ.js +1 -0
  26. package/dist/assets/cose-bilkent-JH36ORCC-DcImuxgn.js +1 -0
  27. package/dist/assets/cynefin-VYW2F7L2-CKc9sK58.js +178 -0
  28. package/dist/assets/cynefinDiagram-TSTJHNR4-_O9mLQTK.js +62 -0
  29. package/dist/assets/cytoscape.esm-DTSO7Bv0.js +331 -0
  30. package/dist/assets/dagre-VKFMJZFB-CMh1gN_B.js +4 -0
  31. package/dist/assets/de-BbF3ozkg.js +1 -0
  32. package/dist/assets/defaultLocale-DX6XiGOO.js +1 -0
  33. package/dist/assets/diagram-FQU43EPY-Cay_5WYD.js +3 -0
  34. package/dist/assets/diagram-G47NLZAW-DT1H2wTP.js +24 -0
  35. package/dist/assets/diagram-NH7WQ7WH-xuvv_D9N.js +24 -0
  36. package/dist/assets/diagram-OA4YK3LP-Bio-u38F.js +30 -0
  37. package/dist/assets/diagram-WEI45ONY-CD_QL4nf.js +41 -0
  38. package/dist/assets/ebnfDiagram-CCIWWBDH-CkGukNGk.js +1 -0
  39. package/dist/assets/elk-api-CF2Hej0P.js +1 -0
  40. package/dist/assets/elk-worker.min-BENGc9gn.js +22 -0
  41. package/dist/assets/elk-worker.min-D32ngsh5.js +1 -0
  42. package/dist/assets/elk.bundled-ajwJAWsK.js +24 -0
  43. package/dist/assets/erDiagram-Q63AITRT-CQGtCq5E.js +85 -0
  44. package/dist/assets/es-BB-VRPmB.js +1 -0
  45. package/dist/assets/flowDiagram-23GEKE2U-E3_Lcv6A.js +156 -0
  46. package/dist/assets/ganttDiagram-NO4QXBWP-AwojtMZ1.js +292 -0
  47. package/dist/assets/gitGraphDiagram-IHSO6WYX-D0klOOBk.js +106 -0
  48. package/dist/assets/graph-C9eacEi8.js +1 -0
  49. package/dist/assets/icon-names.generated-Ch4zjdI9.js +1 -0
  50. package/dist/assets/index--A4RGzRu.js +277 -0
  51. package/dist/assets/index-B29u660W.js +1 -0
  52. package/dist/assets/index-BDuFgzVF.js +1 -0
  53. package/dist/assets/index-C-tHkbn_.js +1 -0
  54. package/dist/assets/index-C1mNJrF6.js +1 -0
  55. package/dist/assets/index-CbxBfG1v.css +1 -0
  56. package/dist/assets/index-XppXLvIK.js +1 -0
  57. package/dist/assets/infoDiagram-FWYZ7A6U-2op9tD2c.js +2 -0
  58. package/dist/assets/init-Gi6I4Gst.js +1 -0
  59. package/dist/assets/ishikawaDiagram-FXEZZL3T-B1UsYLso.js +70 -0
  60. package/dist/assets/it-z1Rr2vYL.js +1 -0
  61. package/dist/assets/ja-DMZcFTAH.js +1 -0
  62. package/dist/assets/journeyDiagram-5HDEW3XC-CZ1oYiAr.js +139 -0
  63. package/dist/assets/kanban-definition-HUTT4EX6-B-XWcB9M.js +89 -0
  64. package/dist/assets/katex-C5jXJg4s.js +257 -0
  65. package/dist/assets/layout-DEXfKzaS.js +1 -0
  66. package/dist/assets/linear-GMYYDbJv.js +1 -0
  67. package/dist/assets/map-Czzmt4hB.js +1 -0
  68. package/dist/assets/mermaid.core-pPiwjbNO.js +314 -0
  69. package/dist/assets/mindmap-definition-LN4V7U3C-BB4SGbrE.js +96 -0
  70. package/dist/assets/ordinal-Cboi1Yqb.js +1 -0
  71. package/dist/assets/pegDiagram-2B236MQR-3keJbrGj.js +1 -0
  72. package/dist/assets/pieDiagram-ENE6RG2P-CVi3ig0y.js +39 -0
  73. package/dist/assets/quadrantDiagram-ABIIQ3AL-CPp6gXbB.js +7 -0
  74. package/dist/assets/railroadDiagram-RFXS5EU6-BCILT-8k.js +1 -0
  75. package/dist/assets/requirementDiagram-TGXJPOKE-DgmaKLiT.js +84 -0
  76. package/dist/assets/sankeyDiagram-HTMAVEWB-DHGaI0hQ.js +40 -0
  77. package/dist/assets/sequenceDiagram-DBY2YBRQ-3AycEqxZ.js +162 -0
  78. package/dist/assets/sizeCapture-X5ZJPWSS-uS50b7bJ.js +1 -0
  79. package/dist/assets/stateDiagram-2N3HPSRC-DaBzZNwx.js +1 -0
  80. package/dist/assets/stateDiagram-v2-6OUMAXLB-xJOnXuvC.js +1 -0
  81. package/dist/assets/swimlanes-5IMT3BWC-BR44KNOm.js +2 -0
  82. package/dist/assets/swimlanesDiagram-G3AALYLV-B3xqzED0.js +8 -0
  83. package/dist/assets/timeline-definition-FHXFAJF6-Msxd070e.js +120 -0
  84. package/dist/assets/vennDiagram-L72KCM5P-W9VDq1l8.js +34 -0
  85. package/dist/assets/wardleyDiagram-EHGQE667-DfDvmnIe.js +78 -0
  86. package/dist/assets/xychartDiagram-FW5EYKEG-HwKD44hb.js +7 -0
  87. package/dist/assets/zh-B2oIvhee.js +1 -0
  88. package/dist/embed-demo.html +114 -0
  89. package/dist/index.html +102 -0
  90. package/dist/logo.png +0 -0
  91. package/dist/logo.svg +55 -0
  92. package/package.json +123 -0
@@ -0,0 +1,314 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./dagre-VKFMJZFB-CMh1gN_B.js","./chunk-RYQCIY6F-C23BZB1s.js","./graph-C9eacEi8.js","./map-Czzmt4hB.js","./layout-DEXfKzaS.js","./index--A4RGzRu.js","./index-CbxBfG1v.css","./swimlanes-5IMT3BWC-BR44KNOm.js","./cose-bilkent-JH36ORCC-DcImuxgn.js","./cytoscape.esm-DTSO7Bv0.js","./c4Diagram-LMCZKHZV-CeTXI2L5.js","./chunk-32BRIVSS-Cx7PNJc5.js","./flowDiagram-23GEKE2U-E3_Lcv6A.js","./chunk-5VM5RSS4-B-JlXrm9.js","./chunk-XXDRQBXY-C-XBHYFW.js","./chunk-VR4S4FIN-CXMOwHEw.js","./channel-CgQghNFn.js","./swimlanesDiagram-G3AALYLV-B3xqzED0.js","./erDiagram-Q63AITRT-CQGtCq5E.js","./gitGraphDiagram-IHSO6WYX-D0klOOBk.js","./chunk-2Q5K7J3B-QWLx0LNh.js","./chunk-JWPE2WC7-Bs6js5ed.js","./cynefin-VYW2F7L2-CKc9sK58.js","./ganttDiagram-NO4QXBWP-AwojtMZ1.js","./linear-GMYYDbJv.js","./init-Gi6I4Gst.js","./defaultLocale-DX6XiGOO.js","./infoDiagram-FWYZ7A6U-2op9tD2c.js","./pieDiagram-ENE6RG2P-CVi3ig0y.js","./arc-Bi9nYi75.js","./ordinal-Cboi1Yqb.js","./quadrantDiagram-ABIIQ3AL-CPp6gXbB.js","./xychartDiagram-FW5EYKEG-HwKD44hb.js","./requirementDiagram-TGXJPOKE-DgmaKLiT.js","./sequenceDiagram-DBY2YBRQ-3AycEqxZ.js","./classDiagram-OUVF2IWQ-C9iVyfdZ.js","./chunk-V7JOEXUC-DP9DCEHY.js","./classDiagram-v2-EOCWNBFH-C9iVyfdZ.js","./stateDiagram-2N3HPSRC-DaBzZNwx.js","./chunk-EX3LRPZG-BZir2lEZ.js","./stateDiagram-v2-6OUMAXLB-xJOnXuvC.js","./journeyDiagram-5HDEW3XC-CZ1oYiAr.js","./timeline-definition-FHXFAJF6-Msxd070e.js","./mindmap-definition-LN4V7U3C-BB4SGbrE.js","./kanban-definition-HUTT4EX6-B-XWcB9M.js","./sankeyDiagram-HTMAVEWB-DHGaI0hQ.js","./diagram-NH7WQ7WH-xuvv_D9N.js","./diagram-WEI45ONY-CD_QL4nf.js","./blockDiagram-677ZJIJ3-CvyOVrtD.js","./diagram-OA4YK3LP-Bio-u38F.js","./architectureDiagram-ZJ3FMSHR-CVVsX69f.js","./diagram-FQU43EPY-Cay_5WYD.js","./ishikawaDiagram-FXEZZL3T-B1UsYLso.js","./vennDiagram-L72KCM5P-W9VDq1l8.js","./diagram-G47NLZAW-DT1H2wTP.js","./wardleyDiagram-EHGQE667-DfDvmnIe.js","./cynefinDiagram-TSTJHNR4-_O9mLQTK.js","./railroadDiagram-RFXS5EU6-BCILT-8k.js","./chunk-MOJQB5TN-M9vORODQ.js","./ebnfDiagram-CCIWWBDH-CkGukNGk.js","./abnfDiagram-VRR7QNED-DxJn5x30.js","./pegDiagram-2B236MQR-3keJbrGj.js"])))=>i.map(i=>d[i]);
2
+ var Pf=Object.defineProperty;var Rf=(e,t,r)=>t in e?Pf(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var Ft=(e,t,r)=>Rf(e,typeof t!="symbol"?t+"":t,r);import{g as qf,_ as Ct,s as xt,b as Nf,f as Wf,j as zf,k as Hf}from"./index--A4RGzRu.js";const Yf=(e,t,r,i="")=>{const s=e.split(":");if(e.slice(0,1)==="@"){if(s.length<2||s.length>3)return null;i=s.shift().slice(1)}if(s.length>3||!s.length)return null;if(s.length>1){const n=s.pop(),l=s.pop(),c={provider:s.length>0?s[0]:i,prefix:l,name:n};return Fa(c)?c:null}const a=s[0],o=a.split("-");if(o.length>1){const n={provider:i,prefix:o.shift(),name:o.join("-")};return Fa(n)?n:null}if(r&&i===""){const n={provider:i,prefix:"",name:a};return Fa(n,r)?n:null}return null},Fa=(e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1;var kh=Object.defineProperty,g=(e,t)=>kh(e,"name",{value:t,configurable:!0}),Uf=(e,t)=>{for(var r in t)kh(e,r,{get:t[r],enumerable:!0})},gs={exports:{}},jf=gs.exports,il;function Gf(){return il||(il=1,(function(e,t){(function(r,i){e.exports=i()})(jf,(function(){var r=1e3,i=6e4,s=36e5,a="millisecond",o="second",n="minute",l="hour",c="day",h="week",d="month",p="quarter",u="year",f="date",m="Invalid Date",y=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,C=/\[([^\]]+)]|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,b={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(O){var A=["th","st","nd","rd"],_=O%100;return"["+O+(A[(_-20)%10]||A[_]||A[0])+"]"}},k=function(O,A,_){var $=String(O);return!$||$.length>=A?O:""+Array(A+1-$.length).join(_)+O},w={s:k,z:function(O){var A=-O.utcOffset(),_=Math.abs(A),$=Math.floor(_/60),E=_%60;return(A<=0?"+":"-")+k($,2,"0")+":"+k(E,2,"0")},m:function O(A,_){if(A.date()<_.date())return-O(_,A);var $=12*(_.year()-A.year())+(_.month()-A.month()),E=A.clone().add($,d),N=_-E<0,Y=A.clone().add($+(N?-1:1),d);return+(-($+(_-E)/(N?E-Y:Y-E))||0)},a:function(O){return O<0?Math.ceil(O)||0:Math.floor(O)},p:function(O){return{M:d,y:u,w:h,d:c,D:f,h:l,m:n,s:o,ms:a,Q:p}[O]||String(O||"").toLowerCase().replace(/s$/,"")},u:function(O){return O===void 0}},S="en",B={};B[S]=b;var F="$isDayjsObject",v=function(O){return O instanceof U||!(!O||!O[F])},z=function O(A,_,$){var E;if(!A)return S;if(typeof A=="string"){var N=A.toLowerCase();B[N]&&(E=N),_&&(B[N]=_,E=N);var Y=A.split("-");if(!E&&Y.length>1)return O(Y[0])}else{var G=A.name;B[G]=A,E=G}return!$&&E&&(S=E),E||!$&&S},q=function(O,A){if(v(O))return O.clone();var _=typeof A=="object"?A:{};return _.date=O,_.args=arguments,new U(_)},M=w;M.l=z,M.i=v,M.w=function(O,A){return q(O,{locale:A.$L,utc:A.$u,x:A.$x,$offset:A.$offset})};var U=(function(){function O(_){this.$L=z(_.locale,null,!0),this.parse(_),this.$x=this.$x||_.x||{},this[F]=!0}var A=O.prototype;return A.parse=function(_){this.$d=(function($){var E=$.date,N=$.utc;if(E===null)return new Date(NaN);if(M.u(E))return new Date;if(E instanceof Date)return new Date(E);if(typeof E=="string"&&!/Z$/i.test(E)){var Y=E.match(y);if(Y){var G=Y[2]-1||0,et=(Y[7]||"0").substring(0,3);return N?new Date(Date.UTC(Y[1],G,Y[3]||1,Y[4]||0,Y[5]||0,Y[6]||0,et)):new Date(Y[1],G,Y[3]||1,Y[4]||0,Y[5]||0,Y[6]||0,et)}}return new Date(E)})(_),this.init()},A.init=function(){var _=this.$d;this.$y=_.getFullYear(),this.$M=_.getMonth(),this.$D=_.getDate(),this.$W=_.getDay(),this.$H=_.getHours(),this.$m=_.getMinutes(),this.$s=_.getSeconds(),this.$ms=_.getMilliseconds()},A.$utils=function(){return M},A.isValid=function(){return this.$d.toString()!==m},A.isSame=function(_,$){var E=q(_);return this.startOf($)<=E&&E<=this.endOf($)},A.isAfter=function(_,$){return q(_)<this.startOf($)},A.isBefore=function(_,$){return this.endOf($)<q(_)},A.$g=function(_,$,E){return M.u(_)?this[$]:this.set(E,_)},A.unix=function(){return Math.floor(this.valueOf()/1e3)},A.valueOf=function(){return this.$d.getTime()},A.startOf=function(_,$){var E=this,N=!!M.u($)||$,Y=M.p(_),G=function(Lt,Z){var V=M.w(E.$u?Date.UTC(E.$y,Z,Lt):new Date(E.$y,Z,Lt),E);return N?V:V.endOf(c)},et=function(Lt,Z){return M.w(E.toDate()[Lt].apply(E.toDate("s"),(N?[0,0,0,0]:[23,59,59,999]).slice(Z)),E)},lt=this.$W,ot=this.$M,ct=this.$D,kt="set"+(this.$u?"UTC":"");switch(Y){case u:return N?G(1,0):G(31,11);case d:return N?G(1,ot):G(0,ot+1);case h:var bt=this.$locale().weekStart||0,_t=(lt<bt?lt+7:lt)-bt;return G(N?ct-_t:ct+(6-_t),ot);case c:case f:return et(kt+"Hours",0);case l:return et(kt+"Minutes",1);case n:return et(kt+"Seconds",2);case o:return et(kt+"Milliseconds",3);default:return this.clone()}},A.endOf=function(_){return this.startOf(_,!1)},A.$set=function(_,$){var E,N=M.p(_),Y="set"+(this.$u?"UTC":""),G=(E={},E[c]=Y+"Date",E[f]=Y+"Date",E[d]=Y+"Month",E[u]=Y+"FullYear",E[l]=Y+"Hours",E[n]=Y+"Minutes",E[o]=Y+"Seconds",E[a]=Y+"Milliseconds",E)[N],et=N===c?this.$D+($-this.$W):$;if(N===d||N===u){var lt=this.clone().set(f,1);lt.$d[G](et),lt.init(),this.$d=lt.set(f,Math.min(this.$D,lt.daysInMonth())).$d}else G&&this.$d[G](et);return this.init(),this},A.set=function(_,$){return this.clone().$set(_,$)},A.get=function(_){return this[M.p(_)]()},A.add=function(_,$){var E,N=this;_=Number(_);var Y=M.p($),G=function(ot){var ct=q(N);return M.w(ct.date(ct.date()+Math.round(ot*_)),N)};if(Y===d)return this.set(d,this.$M+_);if(Y===u)return this.set(u,this.$y+_);if(Y===c)return G(1);if(Y===h)return G(7);var et=(E={},E[n]=i,E[l]=s,E[o]=r,E)[Y]||1,lt=this.$d.getTime()+_*et;return M.w(lt,this)},A.subtract=function(_,$){return this.add(-1*_,$)},A.format=function(_){var $=this,E=this.$locale();if(!this.isValid())return E.invalidDate||m;var N=_||"YYYY-MM-DDTHH:mm:ssZ",Y=M.z(this),G=this.$H,et=this.$m,lt=this.$M,ot=E.weekdays,ct=E.months,kt=E.meridiem,bt=function(Z,V,yt,nt){return Z&&(Z[V]||Z($,N))||yt[V].slice(0,nt)},_t=function(Z){return M.s(G%12||12,Z,"0")},Lt=kt||function(Z,V,yt){var nt=Z<12?"AM":"PM";return yt?nt.toLowerCase():nt};return N.replace(C,(function(Z,V){return V||(function(yt){switch(yt){case"YY":return String($.$y).slice(-2);case"YYYY":return M.s($.$y,4,"0");case"M":return lt+1;case"MM":return M.s(lt+1,2,"0");case"MMM":return bt(E.monthsShort,lt,ct,3);case"MMMM":return bt(ct,lt);case"D":return $.$D;case"DD":return M.s($.$D,2,"0");case"d":return String($.$W);case"dd":return bt(E.weekdaysMin,$.$W,ot,2);case"ddd":return bt(E.weekdaysShort,$.$W,ot,3);case"dddd":return ot[$.$W];case"H":return String(G);case"HH":return M.s(G,2,"0");case"h":return _t(1);case"hh":return _t(2);case"a":return Lt(G,et,!0);case"A":return Lt(G,et,!1);case"m":return String(et);case"mm":return M.s(et,2,"0");case"s":return String($.$s);case"ss":return M.s($.$s,2,"0");case"SSS":return M.s($.$ms,3,"0");case"Z":return Y}return null})(Z)||Y.replace(":","")}))},A.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},A.diff=function(_,$,E){var N,Y=this,G=M.p($),et=q(_),lt=(et.utcOffset()-this.utcOffset())*i,ot=this-et,ct=function(){return M.m(Y,et)};switch(G){case u:N=ct()/12;break;case d:N=ct();break;case p:N=ct()/3;break;case h:N=(ot-lt)/6048e5;break;case c:N=(ot-lt)/864e5;break;case l:N=ot/s;break;case n:N=ot/i;break;case o:N=ot/r;break;default:N=ot}return E?N:M.a(N)},A.daysInMonth=function(){return this.endOf(d).$D},A.$locale=function(){return B[this.$L]},A.locale=function(_,$){if(!_)return this.$L;var E=this.clone(),N=z(_,$,!0);return N&&(E.$L=N),E},A.clone=function(){return M.w(this.$d,this)},A.toDate=function(){return new Date(this.valueOf())},A.toJSON=function(){return this.isValid()?this.toISOString():null},A.toISOString=function(){return this.$d.toISOString()},A.toString=function(){return this.$d.toUTCString()},O})(),W=U.prototype;return q.prototype=W,[["$ms",a],["$s",o],["$m",n],["$H",l],["$W",c],["$M",d],["$y",u],["$D",f]].forEach((function(O){W[O[1]]=function(A){return this.$g(A,O[0],O[1])}})),q.extend=function(O,A){return O.$i||(O(A,U,q),O.$i=!0),q},q.locale=z,q.isDayjs=v,q.unix=function(O){return q(1e3*O)},q.en=B[S],q.Ls=B,q.p={},q}))})(gs)),gs.exports}var Xf=Gf();const Vf=qf(Xf);var Re={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},H={trace:g((...e)=>{},"trace"),debug:g((...e)=>{},"debug"),info:g((...e)=>{},"info"),warn:g((...e)=>{},"warn"),error:g((...e)=>{},"error"),fatal:g((...e)=>{},"fatal")},Wo=g(function(e="fatal"){let t=Re.fatal;typeof e=="string"?e.toLowerCase()in Re&&(t=Re[e]):typeof e=="number"&&(t=e),H.trace=()=>{},H.debug=()=>{},H.info=()=>{},H.warn=()=>{},H.error=()=>{},H.fatal=()=>{},t<=Re.fatal&&(H.fatal=console.error?console.error.bind(console,pe("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",pe("FATAL"))),t<=Re.error&&(H.error=console.error?console.error.bind(console,pe("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",pe("ERROR"))),t<=Re.warn&&(H.warn=console.warn?console.warn.bind(console,pe("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",pe("WARN"))),t<=Re.info&&(H.info=console.info?console.info.bind(console,pe("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",pe("INFO"))),t<=Re.debug&&(H.debug=console.debug?console.debug.bind(console,pe("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",pe("DEBUG"))),t<=Re.trace&&(H.trace=console.debug?console.debug.bind(console,pe("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",pe("TRACE")))},"setLogLevel"),pe=g(e=>`%c${Vf().format("ss.SSS")} : ${e} : `,"format");const fs={min:{r:0,g:0,b:0,s:0,l:0,a:0},max:{r:255,g:255,b:255,h:360,s:100,l:100,a:1},clamp:{r:e=>e>=255?255:e<0?0:e,g:e=>e>=255?255:e<0?0:e,b:e=>e>=255?255:e<0?0:e,h:e=>e%360,s:e=>e>=100?100:e<0?0:e,l:e=>e>=100?100:e<0?0:e,a:e=>e>=1?1:e<0?0:e},toLinear:e=>{const t=e/255;return e>.03928?Math.pow((t+.055)/1.055,2.4):t/12.92},hue2rgb:(e,t,r)=>(r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e),hsl2rgb:({h:e,s:t,l:r},i)=>{if(!t)return r*2.55;e/=360,t/=100,r/=100;const s=r<.5?r*(1+t):r+t-r*t,a=2*r-s;switch(i){case"r":return fs.hue2rgb(a,s,e+1/3)*255;case"g":return fs.hue2rgb(a,s,e)*255;case"b":return fs.hue2rgb(a,s,e-1/3)*255}},rgb2hsl:({r:e,g:t,b:r},i)=>{e/=255,t/=255,r/=255;const s=Math.max(e,t,r),a=Math.min(e,t,r),o=(s+a)/2;if(i==="l")return o*100;if(s===a)return 0;const n=s-a,l=o>.5?n/(2-s-a):n/(s+a);if(i==="s")return l*100;switch(s){case e:return((t-r)/n+(t<r?6:0))*60;case t:return((r-e)/n+2)*60;case r:return((e-t)/n+4)*60;default:return-1}}},Zf={clamp:(e,t,r)=>t>r?Math.min(t,Math.max(r,e)):Math.min(r,Math.max(t,e)),round:e=>Math.round(e*1e10)/1e10},Qf={dec2hex:e=>{const t=Math.round(e).toString(16);return t.length>1?t:`0${t}`}},ft={channel:fs,lang:Zf,unit:Qf},Ze={};for(let e=0;e<=255;e++)Ze[e]=ft.unit.dec2hex(e);const Zt={ALL:0,RGB:1,HSL:2};class Kf{constructor(){this.type=Zt.ALL}get(){return this.type}set(t){if(this.type&&this.type!==t)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=t}reset(){this.type=Zt.ALL}is(t){return this.type===t}}class Jf{constructor(t,r){this.color=r,this.changed=!1,this.data=t,this.type=new Kf}set(t,r){return this.color=r,this.changed=!1,this.data=t,this.type.type=Zt.ALL,this}_ensureHSL(){const t=this.data,{h:r,s:i,l:s}=t;r===void 0&&(t.h=ft.channel.rgb2hsl(t,"h")),i===void 0&&(t.s=ft.channel.rgb2hsl(t,"s")),s===void 0&&(t.l=ft.channel.rgb2hsl(t,"l"))}_ensureRGB(){const t=this.data,{r,g:i,b:s}=t;r===void 0&&(t.r=ft.channel.hsl2rgb(t,"r")),i===void 0&&(t.g=ft.channel.hsl2rgb(t,"g")),s===void 0&&(t.b=ft.channel.hsl2rgb(t,"b"))}get r(){const t=this.data,r=t.r;return!this.type.is(Zt.HSL)&&r!==void 0?r:(this._ensureHSL(),ft.channel.hsl2rgb(t,"r"))}get g(){const t=this.data,r=t.g;return!this.type.is(Zt.HSL)&&r!==void 0?r:(this._ensureHSL(),ft.channel.hsl2rgb(t,"g"))}get b(){const t=this.data,r=t.b;return!this.type.is(Zt.HSL)&&r!==void 0?r:(this._ensureHSL(),ft.channel.hsl2rgb(t,"b"))}get h(){const t=this.data,r=t.h;return!this.type.is(Zt.RGB)&&r!==void 0?r:(this._ensureRGB(),ft.channel.rgb2hsl(t,"h"))}get s(){const t=this.data,r=t.s;return!this.type.is(Zt.RGB)&&r!==void 0?r:(this._ensureRGB(),ft.channel.rgb2hsl(t,"s"))}get l(){const t=this.data,r=t.l;return!this.type.is(Zt.RGB)&&r!==void 0?r:(this._ensureRGB(),ft.channel.rgb2hsl(t,"l"))}get a(){return this.data.a}set r(t){this.type.set(Zt.RGB),this.changed=!0,this.data.r=t}set g(t){this.type.set(Zt.RGB),this.changed=!0,this.data.g=t}set b(t){this.type.set(Zt.RGB),this.changed=!0,this.data.b=t}set h(t){this.type.set(Zt.HSL),this.changed=!0,this.data.h=t}set s(t){this.type.set(Zt.HSL),this.changed=!0,this.data.s=t}set l(t){this.type.set(Zt.HSL),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}}const Vs=new Jf({r:0,g:0,b:0,a:0},"transparent"),zr={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:e=>{if(e.charCodeAt(0)!==35)return;const t=e.match(zr.re);if(!t)return;const r=t[1],i=parseInt(r,16),s=r.length,a=s%4===0,o=s>4,n=o?1:17,l=o?8:4,c=a?0:-1,h=o?255:15;return Vs.set({r:(i>>l*(c+3)&h)*n,g:(i>>l*(c+2)&h)*n,b:(i>>l*(c+1)&h)*n,a:a?(i&h)*n/255:1},e)},stringify:e=>{const{r:t,g:r,b:i,a:s}=e;return s<1?`#${Ze[Math.round(t)]}${Ze[Math.round(r)]}${Ze[Math.round(i)]}${Ze[Math.round(s*255)]}`:`#${Ze[Math.round(t)]}${Ze[Math.round(r)]}${Ze[Math.round(i)]}`}},gr={re:/^hsla?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(?:deg|grad|rad|turn)?)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(%)?))?\s*?\)$/i,hueRe:/^(.+?)(deg|grad|rad|turn)$/i,_hue2deg:e=>{const t=e.match(gr.hueRe);if(t){const[,r,i]=t;switch(i){case"grad":return ft.channel.clamp.h(parseFloat(r)*.9);case"rad":return ft.channel.clamp.h(parseFloat(r)*180/Math.PI);case"turn":return ft.channel.clamp.h(parseFloat(r)*360)}}return ft.channel.clamp.h(parseFloat(e))},parse:e=>{const t=e.charCodeAt(0);if(t!==104&&t!==72)return;const r=e.match(gr.re);if(!r)return;const[,i,s,a,o,n]=r;return Vs.set({h:gr._hue2deg(i),s:ft.channel.clamp.s(parseFloat(s)),l:ft.channel.clamp.l(parseFloat(a)),a:o?ft.channel.clamp.a(n?parseFloat(o)/100:parseFloat(o)):1},e)},stringify:e=>{const{h:t,s:r,l:i,a:s}=e;return s<1?`hsla(${ft.lang.round(t)}, ${ft.lang.round(r)}%, ${ft.lang.round(i)}%, ${s})`:`hsl(${ft.lang.round(t)}, ${ft.lang.round(r)}%, ${ft.lang.round(i)}%)`}},Fi={colors:{aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyanaqua:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",transparent:"#00000000",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},parse:e=>{e=e.toLowerCase();const t=Fi.colors[e];if(t)return zr.parse(t)},stringify:e=>{const t=zr.stringify(e);for(const r in Fi.colors)if(Fi.colors[r]===t)return r}},Si={re:/^rgba?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?)))?\s*?\)$/i,parse:e=>{const t=e.charCodeAt(0);if(t!==114&&t!==82)return;const r=e.match(Si.re);if(!r)return;const[,i,s,a,o,n,l,c,h]=r;return Vs.set({r:ft.channel.clamp.r(s?parseFloat(i)*2.55:parseFloat(i)),g:ft.channel.clamp.g(o?parseFloat(a)*2.55:parseFloat(a)),b:ft.channel.clamp.b(l?parseFloat(n)*2.55:parseFloat(n)),a:c?ft.channel.clamp.a(h?parseFloat(c)/100:parseFloat(c)):1},e)},stringify:e=>{const{r:t,g:r,b:i,a:s}=e;return s<1?`rgba(${ft.lang.round(t)}, ${ft.lang.round(r)}, ${ft.lang.round(i)}, ${ft.lang.round(s)})`:`rgb(${ft.lang.round(t)}, ${ft.lang.round(r)}, ${ft.lang.round(i)})`}},Me={format:{keyword:Fi,hex:zr,rgb:Si,rgba:Si,hsl:gr,hsla:gr},parse:e=>{if(typeof e!="string")return e;const t=zr.parse(e)||Si.parse(e)||gr.parse(e)||Fi.parse(e);if(t)return t;throw new Error(`Unsupported color format: "${e}"`)},stringify:e=>!e.changed&&e.color?e.color:e.type.is(Zt.HSL)||e.data.r===void 0?gr.stringify(e):e.a<1||!Number.isInteger(e.r)||!Number.isInteger(e.g)||!Number.isInteger(e.b)?Si.stringify(e):zr.stringify(e)},Th=(e,t)=>{const r=Me.parse(e);for(const i in t)r[i]=ft.channel.clamp[i](t[i]);return Me.stringify(r)},tr=(e,t,r=0,i=1)=>{if(typeof e!="number")return Th(e,{a:t});const s=Vs.set({r:ft.channel.clamp.r(e),g:ft.channel.clamp.g(t),b:ft.channel.clamp.b(r),a:ft.channel.clamp.a(i)});return Me.stringify(s)},tm=e=>{const{r:t,g:r,b:i}=Me.parse(e),s=.2126*ft.channel.toLinear(t)+.7152*ft.channel.toLinear(r)+.0722*ft.channel.toLinear(i);return ft.lang.round(s)},em=e=>tm(e)>=.5,we=e=>!em(e),Sh=(e,t,r)=>{const i=Me.parse(e),s=i[t],a=ft.channel.clamp[t](s+r);return s!==a&&(i[t]=a),Me.stringify(i)},P=(e,t)=>Sh(e,"l",t),R=(e,t)=>Sh(e,"l",-t),x=(e,t)=>{const r=Me.parse(e),i={};for(const s in t)t[s]&&(i[s]=r[s]+t[s]);return Th(e,i)},rm=(e,t,r=50)=>{const{r:i,g:s,b:a,a:o}=Me.parse(e),{r:n,g:l,b:c,a:h}=Me.parse(t),d=r/100,p=d*2-1,u=o-h,m=((p*u===-1?p:(p+u)/(1+p*u))+1)/2,y=1-m,C=i*m+n*y,b=s*m+l*y,k=a*m+c*y,w=o*d+h*(1-d);return tr(C,b,k,w)},L=(e,t=100)=>{const r=Me.parse(e);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,rm(r,e,t)};/*! @license DOMPurify 3.4.12 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.12/LICENSE */function sl(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,i=Array(t);r<t;r++)i[r]=e[r];return i}function im(e){if(Array.isArray(e))return e}function sm(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var i,s,a,o,n=[],l=!0,c=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(l=(i=a.call(r)).done)&&(n.push(i.value),n.length!==t);l=!0);}catch(h){c=!0,s=h}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw s}}return n}}function am(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
3
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function om(e,t){return im(e)||sm(e,t)||nm(e,t)||am()}function nm(e,t){if(e){if(typeof e=="string")return sl(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?sl(e,t):void 0}}const wh=Object.entries,al=Object.setPrototypeOf,lm=Object.isFrozen,hm=Object.getPrototypeOf,cm=Object.getOwnPropertyDescriptor;let Gt=Object.freeze,Xt=Object.seal,Dr=Object.create,Bh=typeof Reflect<"u"&&Reflect,Ga=Bh.apply,Xa=Bh.construct;Gt||(Gt=function(t){return t});Xt||(Xt=function(t){return t});Ga||(Ga=function(t,r){for(var i=arguments.length,s=new Array(i>2?i-2:0),a=2;a<i;a++)s[a-2]=arguments[a];return t.apply(r,s)});Xa||(Xa=function(t){for(var r=arguments.length,i=new Array(r>1?r-1:0),s=1;s<r;s++)i[s-1]=arguments[s];return new t(...i)});const Er=Pt(Array.prototype.forEach),dm=Pt(Array.prototype.lastIndexOf),ol=Pt(Array.prototype.pop),Mr=Pt(Array.prototype.push),um=Pt(Array.prototype.splice),Qe=Array.isArray,wi=Pt(String.prototype.toLowerCase),Aa=Pt(String.prototype.toString),nl=Pt(String.prototype.match),fi=Pt(String.prototype.replace),ll=Pt(String.prototype.indexOf),pm=Pt(String.prototype.trim),gm=Pt(Number.prototype.toString),fm=Pt(Boolean.prototype.toString),hl=typeof BigInt>"u"?null:Pt(BigInt.prototype.toString),cl=typeof Symbol>"u"?null:Pt(Symbol.prototype.toString),zt=Pt(Object.prototype.hasOwnProperty),mi=Pt(Object.prototype.toString),Wt=Pt(RegExp.prototype.test),hr=mm(TypeError);function Pt(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var r=arguments.length,i=new Array(r>1?r-1:0),s=1;s<r;s++)i[s-1]=arguments[s];return Ga(e,t,i)}}function mm(e){return function(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return Xa(e,r)}}function St(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:wi;if(al&&al(e,null),!Qe(t))return e;let i=t.length;for(;i--;){let s=t[i];if(typeof s=="string"){const a=r(s);a!==s&&(lm(t)||(t[i]=a),s=a)}e[s]=!0}return e}function ym(e){for(let t=0;t<e.length;t++)zt(e,t)||(e[t]=null);return e}function ee(e){const t=Dr(null);for(const i of wh(e)){var r=om(i,2);const s=r[0],a=r[1];zt(e,s)&&(Qe(a)?t[s]=ym(a):a&&typeof a=="object"&&a.constructor===Object?t[s]=ee(a):t[s]=a)}return t}function Cm(e){switch(typeof e){case"string":return e;case"number":return gm(e);case"boolean":return fm(e);case"bigint":return hl?hl(e):"0";case"symbol":return cl?cl(e):"Symbol()";case"undefined":return mi(e);case"function":case"object":{if(e===null)return mi(e);const t=e,r=Le(t,"toString");if(typeof r=="function"){const i=r(t);return typeof i=="string"?i:mi(i)}return mi(e)}default:return mi(e)}}function Le(e,t){for(;e!==null;){const i=cm(e,t);if(i){if(i.get)return Pt(i.get);if(typeof i.value=="function")return Pt(i.value)}e=hm(e)}function r(){return null}return r}function xm(e){try{return Wt(e,""),!0}catch{return!1}}const dl=Gt(["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"]),Ea=Gt(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Ma=Gt(["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"]),bm=Gt(["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"]),$a=Gt(["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"]),km=Gt(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),ul=Gt(["#text"]),pl=Gt(["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"]),Oa=Gt(["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","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","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"]),gl=Gt(["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"]),ss=Gt(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Tm=Xt(/{{[\w\W]*|^[\w\W]*}}/g),Sm=Xt(/<%[\w\W]*|^[\w\W]*%>/g),wm=Xt(/\${[\w\W]*/g),Bm=Xt(/^data-[\-\w.\u00B7-\uFFFF]+$/),_m=Xt(/^aria-[\-\w]+$/),fl=Xt(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),vm=Xt(/^(?:\w+script|data):/i),Lm=Xt(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Fm=Xt(/^html$/i),Am=Xt(/^[a-z][.\w]*(-[.\w]+)+$/i),ml=Xt(/<[/\w!]/g),yl=Xt(/<[/\w]/g),Em=Xt(/<\/no(script|embed|frames)/i),Mm=Xt(/\/>/i),he={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},$m=function(){return typeof window>"u"?null:window},Om=function(t,r){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let i=null;const s="data-tt-policy-suffix";r&&r.hasAttribute(s)&&(i=r.getAttribute(s));const a="dompurify"+(i?"#"+i:"");try{return t.createPolicy(a,{createHTML(o){return o},createScriptURL(o){return o}})}catch{return console.warn("TrustedTypes policy "+a+" could not be created."),null}},Cl=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},Ve=function(t,r,i,s){return zt(t,r)&&Qe(t[r])?St(s.base?ee(s.base):{},t[r],s.transform):i};function _h(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:$m();const t=X=>_h(X);if(t.version="3.4.12",t.removed=[],!e||!e.document||e.document.nodeType!==he.document||!e.Element)return t.isSupported=!1,t;let r=e.document;const i=r,s=i.currentScript;e.DocumentFragment;const a=e.HTMLTemplateElement,o=e.Node,n=e.Element,l=e.NodeFilter,c=e.NamedNodeMap;c===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;const h=e.DOMParser,d=e.trustedTypes,p=n.prototype,u=Le(p,"cloneNode"),f=Le(p,"remove"),m=Le(p,"nextSibling"),y=Le(p,"childNodes"),C=Le(p,"parentNode"),b=Le(p,"shadowRoot"),k=Le(p,"attributes"),w=o&&o.prototype?Le(o.prototype,"nodeType"):null,S=o&&o.prototype?Le(o.prototype,"nodeName"):null;if(typeof a=="function"){const X=r.createElement("template");X.content&&X.content.ownerDocument&&(r=X.content.ownerDocument)}let B,F="",v,z=!1,q=0;const M=function(){if(q>0)throw hr('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.')},U=function(T){M(),q++;try{return B.createHTML(T)}finally{q--}},W=function(T){M(),q++;try{return B.createScriptURL(T)}finally{q--}},O=function(){return z||(v=Om(d,s),z=!0),v},A=r,_=A.implementation,$=A.createNodeIterator,E=A.createDocumentFragment,N=A.getElementsByTagName,Y=i.importNode;let G=Cl();t.isSupported=typeof wh=="function"&&typeof C=="function"&&_&&_.createHTMLDocument!==void 0;const et=Tm,lt=Sm,ot=wm,ct=Bm,kt=_m,bt=vm,_t=Lm,Lt=Am;let Z=fl,V=null;const yt=St({},[...dl,...Ea,...Ma,...$a,...ul]);let nt=null;const D=St({},[...pl,...Oa,...gl,...ss]);let Q=Object.seal(Dr(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Ue=null,da=null;const ue=Object.seal(Dr(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Pn=!0,ua=!0,Rn=!1,qn=!0,je=!1,Ge=!0,nr=!1,pa=!1,ga=null,fa=null,ma=!1,_r=!1,Zi=!1,Qi=!1,Nn=!0,Wn=!1;const zn="user-content-";let ya=!0,Ca=!1,vr={},Be=null;const xa=St({},["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"]);let Hn=null;const Yn=St({},["audio","video","img","source","image","track"]);let ba=null;const Un=St({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ki="http://www.w3.org/1998/Math/MathML",Ji="http://www.w3.org/2000/svg",_e="http://www.w3.org/1999/xhtml";let Lr=_e,ka=!1,Ta=null;const kf=St({},[Ki,Ji,_e],Aa),jn=Gt(["mi","mo","mn","ms","mtext"]);let Sa=St({},jn);const Gn=Gt(["annotation-xml"]);let wa=St({},Gn);const Tf=St({},["title","style","font","a","script"]);let pi=null;const Sf=["application/xhtml+xml","text/html"],wf="text/html";let Et=null,Fr=null;const Bf=r.createElement("form"),Xn=function(T){return T instanceof RegExp||T instanceof Function},Ba=function(){let T=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Fr&&Fr===T)return;(!T||typeof T!="object")&&(T={}),T=ee(T),pi=Sf.indexOf(T.PARSER_MEDIA_TYPE)===-1?wf:T.PARSER_MEDIA_TYPE,Et=pi==="application/xhtml+xml"?Aa:wi,V=Ve(T,"ALLOWED_TAGS",yt,{transform:Et}),nt=Ve(T,"ALLOWED_ATTR",D,{transform:Et}),Ta=Ve(T,"ALLOWED_NAMESPACES",kf,{transform:Aa}),ba=Ve(T,"ADD_URI_SAFE_ATTR",Un,{transform:Et,base:Un}),Hn=Ve(T,"ADD_DATA_URI_TAGS",Yn,{transform:Et,base:Yn}),Be=Ve(T,"FORBID_CONTENTS",xa,{transform:Et}),Ue=Ve(T,"FORBID_TAGS",ee({}),{transform:Et}),da=Ve(T,"FORBID_ATTR",ee({}),{transform:Et}),vr=zt(T,"USE_PROFILES")?T.USE_PROFILES&&typeof T.USE_PROFILES=="object"?ee(T.USE_PROFILES):T.USE_PROFILES:!1,Pn=T.ALLOW_ARIA_ATTR!==!1,ua=T.ALLOW_DATA_ATTR!==!1,Rn=T.ALLOW_UNKNOWN_PROTOCOLS||!1,qn=T.ALLOW_SELF_CLOSE_IN_ATTR!==!1,je=T.SAFE_FOR_TEMPLATES||!1,Ge=T.SAFE_FOR_XML!==!1,nr=T.WHOLE_DOCUMENT||!1,_r=T.RETURN_DOM||!1,Zi=T.RETURN_DOM_FRAGMENT||!1,Qi=T.RETURN_TRUSTED_TYPE||!1,ma=T.FORCE_BODY||!1,Nn=T.SANITIZE_DOM!==!1,Wn=T.SANITIZE_NAMED_PROPS||!1,ya=T.KEEP_CONTENT!==!1,Ca=T.IN_PLACE||!1,Z=xm(T.ALLOWED_URI_REGEXP)?T.ALLOWED_URI_REGEXP:fl,Lr=typeof T.NAMESPACE=="string"?T.NAMESPACE:_e,Sa=zt(T,"MATHML_TEXT_INTEGRATION_POINTS")&&T.MATHML_TEXT_INTEGRATION_POINTS&&typeof T.MATHML_TEXT_INTEGRATION_POINTS=="object"?ee(T.MATHML_TEXT_INTEGRATION_POINTS):St({},jn),wa=zt(T,"HTML_INTEGRATION_POINTS")&&T.HTML_INTEGRATION_POINTS&&typeof T.HTML_INTEGRATION_POINTS=="object"?ee(T.HTML_INTEGRATION_POINTS):St({},Gn);const I=zt(T,"CUSTOM_ELEMENT_HANDLING")&&T.CUSTOM_ELEMENT_HANDLING&&typeof T.CUSTOM_ELEMENT_HANDLING=="object"?ee(T.CUSTOM_ELEMENT_HANDLING):Dr(null);if(Q=Dr(null),zt(I,"tagNameCheck")&&Xn(I.tagNameCheck)&&(Q.tagNameCheck=I.tagNameCheck),zt(I,"attributeNameCheck")&&Xn(I.attributeNameCheck)&&(Q.attributeNameCheck=I.attributeNameCheck),zt(I,"allowCustomizedBuiltInElements")&&typeof I.allowCustomizedBuiltInElements=="boolean"&&(Q.allowCustomizedBuiltInElements=I.allowCustomizedBuiltInElements),Xt(Q),je&&(ua=!1),Zi&&(_r=!0),vr&&(V=St({},ul),nt=Dr(null),vr.html===!0&&(St(V,dl),St(nt,pl)),vr.svg===!0&&(St(V,Ea),St(nt,Oa),St(nt,ss)),vr.svgFilters===!0&&(St(V,Ma),St(nt,Oa),St(nt,ss)),vr.mathMl===!0&&(St(V,$a),St(nt,gl),St(nt,ss))),ue.tagCheck=null,ue.attributeCheck=null,zt(T,"ADD_TAGS")&&(typeof T.ADD_TAGS=="function"?ue.tagCheck=T.ADD_TAGS:Qe(T.ADD_TAGS)&&(V===yt&&(V=ee(V)),St(V,T.ADD_TAGS,Et))),zt(T,"ADD_ATTR")&&(typeof T.ADD_ATTR=="function"?ue.attributeCheck=T.ADD_ATTR:Qe(T.ADD_ATTR)&&(nt===D&&(nt=ee(nt)),St(nt,T.ADD_ATTR,Et))),zt(T,"ADD_URI_SAFE_ATTR")&&Qe(T.ADD_URI_SAFE_ATTR)&&St(ba,T.ADD_URI_SAFE_ATTR,Et),zt(T,"FORBID_CONTENTS")&&Qe(T.FORBID_CONTENTS)&&(Be===xa&&(Be=ee(Be)),St(Be,T.FORBID_CONTENTS,Et)),zt(T,"ADD_FORBID_CONTENTS")&&Qe(T.ADD_FORBID_CONTENTS)&&(Be===xa&&(Be=ee(Be)),St(Be,T.ADD_FORBID_CONTENTS,Et)),ya&&(V["#text"]=!0),nr&&St(V,["html","head","body"]),V.table&&(St(V,["tbody"]),delete Ue.tbody),T.TRUSTED_TYPES_POLICY){if(typeof T.TRUSTED_TYPES_POLICY.createHTML!="function")throw hr('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof T.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw hr('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const j=B;B=T.TRUSTED_TYPES_POLICY;try{F=U("")}catch(it){throw B=j,it}}else T.TRUSTED_TYPES_POLICY===null?(B=void 0,F=""):(B===void 0&&(B=O()),B&&typeof F=="string"&&(F=U("")));Gt&&Gt(T),Fr=T},Vn=St({},[...Ea,...Ma,...bm]),Zn=St({},[...$a,...km]),_f=function(T,I,j){return I.namespaceURI===_e?T==="svg":I.namespaceURI===Ki?T==="svg"&&(j==="annotation-xml"||Sa[j]):!!Vn[T]},vf=function(T,I,j){return I.namespaceURI===_e?T==="math":I.namespaceURI===Ji?T==="math"&&wa[j]:!!Zn[T]},Lf=function(T,I,j){return I.namespaceURI===Ji&&!wa[j]||I.namespaceURI===Ki&&!Sa[j]?!1:!Zn[T]&&(Tf[T]||!Vn[T])},Ff=function(T){let I=C(T);(!I||!I.tagName)&&(I={namespaceURI:Lr,tagName:"template"});const j=wi(T.tagName),it=wi(I.tagName);return Ta[T.namespaceURI]?T.namespaceURI===Ji?_f(j,I,it):T.namespaceURI===Ki?vf(j,I,it):T.namespaceURI===_e?Lf(j,I,it):!!(pi==="application/xhtml+xml"&&Ta[T.namespaceURI]):!1},Xe=function(T){Mr(t.removed,{element:T});try{C(T).removeChild(T)}catch{if(f(T),!C(T))throw hr("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},ts=function(T){_a(T);const I=y(T);if(I){const it=[];Er(I,ut=>{Mr(it,ut)}),Er(it,ut=>{try{f(ut)}catch{}})}const j=k(T);if(j)for(let it=j.length-1;it>=0;--it){const ut=j[it],mt=ut&&ut.name;if(typeof mt=="string")try{T.removeAttribute(mt)}catch{}}},lr=function(T,I){try{Mr(t.removed,{attribute:I.getAttributeNode(T),from:I})}catch{Mr(t.removed,{attribute:null,from:I})}if(I.removeAttribute(T),T==="is")if(_r||Zi)try{Xe(I)}catch{}else try{I.setAttribute(T,"")}catch{}},Af=function(T){const I=k(T);if(I)for(let j=I.length-1;j>=0;--j){const it=I[j],ut=it&&it.name;if(!(typeof ut!="string"||nt[Et(ut)]))try{T.removeAttribute(ut)}catch{}}},_a=function(T){const I=[T];for(;I.length>0;){const j=I.pop();(w?w(j):j.nodeType)===he.element&&Af(j);const ut=y(j);if(ut)for(let mt=ut.length-1;mt>=0;--mt)I.push(ut[mt])}},Ef=function(T){if(!Ge)return;const I=[T];for(;I.length>0;){const j=I.pop(),it=w?w(j):j.nodeType;if(it===he.processingInstruction||it===he.comment&&Wt(yl,j.data)){try{f(j)}catch{}continue}if(it===he.element){const mt=j,$t=Et(S?S(j):j.nodeName);try{mt.hasAttribute&&mt.hasAttribute("patchsrc")&&mt.removeAttribute("patchsrc"),mt.hasAttribute&&mt.hasAttribute("for")&&$t!=="label"&&$t!=="output"&&mt.removeAttribute("for")}catch{}}const ut=y(j);if(ut)for(let mt=ut.length-1;mt>=0;--mt)I.push(ut[mt])}},Qn=function(T){let I=null,j=null;if(ma)T="<remove></remove>"+T;else{const mt=nl(T,/^[\r\n\t ]+/);j=mt&&mt[0]}pi==="application/xhtml+xml"&&Lr===_e&&(T='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+T+"</body></html>");const it=B?U(T):T;if(Lr===_e)try{I=new h().parseFromString(it,pi)}catch{}if(!I||!I.documentElement){I=_.createDocument(Lr,"template",null);try{I.documentElement.innerHTML=ka?F:it}catch{}}const ut=I.body||I.documentElement;return T&&j&&ut.insertBefore(r.createTextNode(j),ut.childNodes[0]||null),Lr===_e?N.call(I,nr?"html":"body")[0]:nr?I.documentElement:ut},Kn=function(T){return $.call(T.ownerDocument||T,T,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT|l.SHOW_PROCESSING_INSTRUCTION|l.SHOW_CDATA_SECTION,null)},es=function(T){return T=fi(T,et," "),T=fi(T,lt," "),T=fi(T,ot," "),T},va=function(T){var I;T.normalize();const j=$.call(T.ownerDocument||T,T,l.SHOW_TEXT|l.SHOW_COMMENT|l.SHOW_CDATA_SECTION|l.SHOW_PROCESSING_INSTRUCTION,null);let it=j.nextNode();for(;it;)it.data=es(it.data),it=j.nextNode();const ut=(I=T.querySelectorAll)===null||I===void 0?void 0:I.call(T,"template");ut&&Er(ut,mt=>{Ar(mt.content)&&va(mt.content)})},rs=function(T){const I=S?S(T):null;return typeof I!="string"||Et(I)!=="form"?!1:typeof T.nodeName!="string"||typeof T.textContent!="string"||typeof T.removeChild!="function"||T.attributes!==k(T)||typeof T.removeAttribute!="function"||typeof T.setAttribute!="function"||typeof T.namespaceURI!="string"||typeof T.insertBefore!="function"||typeof T.hasChildNodes!="function"||T.nodeType!==w(T)||T.childNodes!==y(T)},Ar=function(T){if(!w||typeof T!="object"||T===null)return!1;try{return w(T)===he.documentFragment}catch{return!1}},gi=function(T){if(!w||typeof T!="object"||T===null)return!1;try{return typeof w(T)=="number"}catch{return!1}};function ve(X,T,I){X.length!==0&&Er(X,j=>{j.call(t,T,I,Fr)})}const Mf=function(T,I){return!!(Ge&&T.hasChildNodes()&&!gi(T.firstElementChild)&&Wt(ml,T.textContent)&&Wt(ml,T.innerHTML)||Ge&&T.namespaceURI===_e&&I==="style"&&gi(T.firstElementChild)||T.nodeType===he.processingInstruction||Ge&&T.nodeType===he.comment&&Wt(yl,T.data))},$f=function(T,I){if(!Ue[I]&&el(I)&&(Q.tagNameCheck instanceof RegExp&&Wt(Q.tagNameCheck,I)||Q.tagNameCheck instanceof Function&&Q.tagNameCheck(I)))return!1;if(ya&&!Be[I]){const j=C(T),it=y(T);if(it&&j){const ut=it.length;for(let mt=ut-1;mt>=0;--mt){const $t=Ca?it[mt]:u(it[mt],!0);j.insertBefore($t,m(T))}}}return Xe(T),!0},Jn=function(T,I){if(ve(G.beforeSanitizeElements,T,null),T!==I&&C(T)===null)return!0;if(rs(T))return Xe(T),!0;const j=Et(S?S(T):T.nodeName);if(ve(G.uponSanitizeElement,T,{tagName:j,allowedTags:V}),T!==I&&C(T)===null)return!0;if(Mf(T,j))return Xe(T),!0;if(Ue[j]||!(ue.tagCheck instanceof Function&&ue.tagCheck(j))&&!V[j]){const ut=$f(T,j);return ut===!1&&ve(G.afterSanitizeElements,T,null),ut}if((w?w(T):T.nodeType)===he.element&&!Ff(T)||(j==="noscript"||j==="noembed"||j==="noframes")&&Wt(Em,T.innerHTML))return Xe(T),!0;if(je&&T.nodeType===he.text){const ut=es(T.textContent);T.textContent!==ut&&(Mr(t.removed,{element:T.cloneNode()}),T.textContent=ut)}return ve(G.afterSanitizeElements,T,null),!1},tl=function(T,I,j){if(da[I]||Ge&&I==="patchsrc"||Ge&&I==="for"&&T!=="label"&&T!=="output"||Nn&&(I==="id"||I==="name")&&(j in r||j in Bf))return!1;const it=nt[I]||ue.attributeCheck instanceof Function&&ue.attributeCheck(I,T);if(!(ua&&Wt(ct,I))){if(!(Pn&&Wt(kt,I))){if(it){if(!ba[I]){if(!Wt(Z,fi(j,_t,""))){if(!((I==="src"||I==="xlink:href"||I==="href")&&T!=="script"&&ll(j,"data:")===0&&Hn[T])){if(!(Rn&&!Wt(bt,fi(j,_t,"")))){if(j)return!1}}}}}else if(!(el(T)&&(Q.tagNameCheck instanceof RegExp&&Wt(Q.tagNameCheck,T)||Q.tagNameCheck instanceof Function&&Q.tagNameCheck(T))&&(Q.attributeNameCheck instanceof RegExp&&Wt(Q.attributeNameCheck,I)||Q.attributeNameCheck instanceof Function&&Q.attributeNameCheck(I,T))||I==="is"&&Q.allowCustomizedBuiltInElements&&(Q.tagNameCheck instanceof RegExp&&Wt(Q.tagNameCheck,j)||Q.tagNameCheck instanceof Function&&Q.tagNameCheck(j))))return!1}}return!0},Of=St({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),el=function(T){return!Of[wi(T)]&&Wt(Lt,T)},If=function(T,I,j,it){if(B&&typeof d=="object"&&typeof d.getAttributeType=="function"&&!j)switch(d.getAttributeType(T,I)){case"TrustedHTML":return U(it);case"TrustedScriptURL":return W(it)}return it},Df=function(T,I,j,it){try{j?T.setAttributeNS(j,I,it):T.setAttribute(I,it),rs(T)?Xe(T):ol(t.removed)}catch{lr(I,T)}},rl=function(T){ve(G.beforeSanitizeAttributes,T,null);const I=T.attributes;if(!I||rs(T))return;const j={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:nt,forceKeepAttr:void 0};let it=I.length;const ut=Et(T.nodeName);for(;it--;){const mt=I[it],$t=mt.name,Vt=mt.namespaceURI,fe=mt.value,ae=Et($t),me=fe;let te=$t==="value"?me:pm(me);if(j.attrName=ae,j.attrValue=te,j.keepAttr=!0,j.forceKeepAttr=void 0,ve(G.uponSanitizeAttribute,T,j),te=j.attrValue,Wn&&(ae==="id"||ae==="name")&&ll(te,zn)!==0&&(lr($t,T),te=zn+te),Ge&&Wt(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,te)){lr($t,T);continue}if(ae==="attributename"&&nl(te,"href")){lr($t,T);continue}if(!j.forceKeepAttr){if(!j.keepAttr){lr($t,T);continue}if(!qn&&Wt(Mm,te)){lr($t,T);continue}if(je&&(te=es(te)),!tl(ut,ae,te)){lr($t,T);continue}te=If(ut,ae,Vt,te),te!==me&&Df(T,$t,Vt,te)}}ve(G.afterSanitizeAttributes,T,null)},is=function(T){let I=null;const j=Kn(T);for(ve(G.beforeSanitizeShadowDOM,T,null);I=j.nextNode();)if(ve(G.uponSanitizeShadowNode,I,null),Jn(I,T),rl(I),Ar(I.content)&&is(I.content),(w?w(I):I.nodeType)===he.element){const ut=b(I);Ar(ut)&&(La(ut),is(ut))}ve(G.afterSanitizeShadowDOM,T,null)},La=function(T){const I=[{node:T,shadow:null}];for(;I.length>0;){const j=I.pop();if(j.shadow){is(j.shadow);continue}const it=j.node,mt=(w?w(it):it.nodeType)===he.element,$t=y(it);if($t)for(let Vt=$t.length-1;Vt>=0;--Vt)I.push({node:$t[Vt],shadow:null});if(mt){const Vt=S?S(it):null;if(typeof Vt=="string"&&Et(Vt)==="template"){const fe=it.content;Ar(fe)&&I.push({node:fe,shadow:null})}}if(mt){const Vt=b(it);Ar(Vt)&&I.push({node:null,shadow:Vt},{node:Vt,shadow:null})}}};return t.sanitize=function(X){let T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},I=null,j=null,it=null,ut=null;if(ka=!X,ka&&(X="<!-->"),typeof X!="string"&&!gi(X)&&(X=Cm(X),typeof X!="string"))throw hr("dirty is not a string, aborting");if(!t.isSupported)return X;pa?(V=ga,nt=fa):Ba(T),(G.uponSanitizeElement.length>0||G.uponSanitizeAttribute.length>0)&&(V=ee(V)),G.uponSanitizeAttribute.length>0&&(nt=ee(nt)),t.removed=[];const mt=Ca&&typeof X!="string"&&gi(X);if(mt){Ef(X);const ae=S?S(X):X.nodeName;if(typeof ae=="string"){const me=Et(ae);if(!V[me]||Ue[me])throw ts(X),hr("root node is forbidden and cannot be sanitized in-place")}if(rs(X))throw ts(X),hr("root node is clobbered and cannot be sanitized in-place");try{La(X)}catch(me){throw ts(X),me}}else if(gi(X))I=Qn("<!---->"),j=I.ownerDocument.importNode(X,!0),j.nodeType===he.element&&j.nodeName==="BODY"||j.nodeName==="HTML"?I=j:I.appendChild(j),La(j);else{if(!_r&&!je&&!nr&&X.indexOf("<")===-1)return B&&Qi?U(X):X;if(I=Qn(X),!I)return _r?null:Qi?F:""}I&&ma&&Xe(I.firstChild);const $t=mt?X:I,Vt=Kn($t);try{for(;it=Vt.nextNode();)Jn(it,$t),rl(it),Ar(it.content)&&is(it.content)}catch(ae){throw mt&&(ts(X),Er(t.removed,me=>{me.element&&_a(me.element)})),ae}if(mt)return Er(t.removed,ae=>{ae.element&&_a(ae.element)}),je&&va(X),X;if(_r){if(je&&va(I),Zi)for(ut=E.call(I.ownerDocument);I.firstChild;)ut.appendChild(I.firstChild);else ut=I;return(nt.shadowroot||nt.shadowrootmode)&&(ut=Y.call(i,ut,!0)),ut}let fe=nr?I.outerHTML:I.innerHTML;return nr&&V["!doctype"]&&I.ownerDocument&&I.ownerDocument.doctype&&I.ownerDocument.doctype.name&&Wt(Fm,I.ownerDocument.doctype.name)&&(fe="<!DOCTYPE "+I.ownerDocument.doctype.name+`>
4
+ `+fe),je&&(fe=es(fe)),B&&Qi?U(fe):fe},t.setConfig=function(){let X=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Ba(X),pa=!0,ga=V,fa=nt},t.clearConfig=function(){Fr=null,pa=!1,ga=null,fa=null,B=v,F=""},t.isValidAttribute=function(X,T,I){Fr||Ba({});const j=Et(X),it=Et(T);return tl(j,it,I)},t.addHook=function(X,T){typeof T=="function"&&zt(G,X)&&Mr(G[X],T)},t.removeHook=function(X,T){if(zt(G,X)){if(T!==void 0){const I=dm(G[X],T);return I===-1?void 0:um(G[X],I,1)[0]}return ol(G[X])}},t.removeHooks=function(X){zt(G,X)&&(G[X]=[])},t.removeAllHooks=function(){G=Cl()},t}var si=_h(),Va=g((e,t,{depth:r=2,clobber:i=!1}={})=>{const s={depth:r,clobber:i};return Array.isArray(t)&&!Array.isArray(e)?(t.forEach(a=>Va(e,a,s)),e):Array.isArray(t)&&Array.isArray(e)?(t.forEach(a=>{e.includes(a)||e.push(a)}),e):e===void 0||r<=0?e!=null&&typeof e=="object"&&typeof t=="object"?Object.assign(e,t):t:(t!==void 0&&typeof e=="object"&&typeof t=="object"&&Object.keys(t).forEach(a=>{typeof t[a]=="object"&&t[a]!==null&&(e[a]===void 0||typeof e[a]=="object")?(e[a]===void 0&&(e[a]=Array.isArray(t[a])?[]:{}),e[a]=Va(e[a],t[a],{depth:r-1,clobber:i})):(i||typeof e[a]!="object"&&typeof t[a]!="object")&&(e[a]=t[a])}),e)},"assignWithDepth"),qt=Va,Oe="#ffffff",Ie="#f2f2f2",gt=g((e,t)=>t?x(e,{s:-40,l:10}):x(e,{s:-40,l:-10}),"mkBorder"),Yr,Im=(Yr=class{constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.useGradient=!0,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))"}updateColors(){var r,i,s,a,o,n,l,c,h,d,p,u,f,m,y,C,b,k,w,S,B,F,v,z,q,M,U,W,O,A,_,$,E,N,Y,G,et,lt,ot,ct,kt,bt,_t,Lt,Z,V,yt,nt,D;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||gt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||gt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||gt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||gt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||L(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||L(this.tertiaryColor),this.lineColor=this.lineColor||L(this.background),this.arrowheadColor=this.arrowheadColor||L(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?R(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||R(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||L(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||P(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||R(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||R(this.mainBkg,10)):(this.rowOdd=this.rowOdd||P(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||P(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||x(this.primaryColor,{h:30}),this.cScale4=this.cScale4||x(this.primaryColor,{h:60}),this.cScale5=this.cScale5||x(this.primaryColor,{h:90}),this.cScale6=this.cScale6||x(this.primaryColor,{h:120}),this.cScale7=this.cScale7||x(this.primaryColor,{h:150}),this.cScale8=this.cScale8||x(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||x(this.primaryColor,{h:270}),this.cScale10=this.cScale10||x(this.primaryColor,{h:300}),this.cScale11=this.cScale11||x(this.primaryColor,{h:330}),this.darkMode)for(let Q=0;Q<this.THEME_COLOR_LIMIT;Q++)this["cScale"+Q]=R(this["cScale"+Q],75);else for(let Q=0;Q<this.THEME_COLOR_LIMIT;Q++)this["cScale"+Q]=R(this["cScale"+Q],25);for(let Q=0;Q<this.THEME_COLOR_LIMIT;Q++)this["cScaleInv"+Q]=this["cScaleInv"+Q]||L(this["cScale"+Q]);for(let Q=0;Q<this.THEME_COLOR_LIMIT;Q++)this.darkMode?this["cScalePeer"+Q]=this["cScalePeer"+Q]||P(this["cScale"+Q],10):this["cScalePeer"+Q]=this["cScalePeer"+Q]||R(this["cScale"+Q],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let Q=0;Q<this.THEME_COLOR_LIMIT;Q++)this["cScaleLabel"+Q]=this["cScaleLabel"+Q]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let Q=0;Q<5;Q++)this["surface"+Q]=this["surface"+Q]||x(this.mainBkg,{h:180,s:-15,l:t*(5+Q*3)}),this["surfacePeer"+Q]=this["surfacePeer"+Q]||x(this.mainBkg,{h:180,s:-15,l:t*(8+Q*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||x(this.primaryColor,{h:64}),this.fillType3=this.fillType3||x(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||x(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||x(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||x(this.primaryColor,{h:128}),this.fillType7=this.fillType7||x(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||x(this.primaryColor,{l:-10}),this.pie5=this.pie5||x(this.secondaryColor,{l:-10}),this.pie6=this.pie6||x(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||x(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||x(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||x(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||x(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||x(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||x(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??x(this.primaryColor,{l:-30}),this.venn2=this.venn2??x(this.secondaryColor,{l:-30}),this.venn3=this.venn3??x(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??x(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??x(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??x(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??x(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??x(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:((r=this.cynefin)==null?void 0:r.domainFontSize)||16,itemFontSize:((i=this.cynefin)==null?void 0:i.itemFontSize)||12,boundaryColor:((s=this.cynefin)==null?void 0:s.boundaryColor)||this.lineColor,boundaryWidth:((a=this.cynefin)==null?void 0:a.boundaryWidth)||2,cliffColor:((o=this.cynefin)==null?void 0:o.cliffColor)||"#8B0000",cliffWidth:((n=this.cynefin)==null?void 0:n.cliffWidth)||4,arrowColor:((l=this.cynefin)==null?void 0:l.arrowColor)||this.lineColor,arrowWidth:((c=this.cynefin)==null?void 0:c.arrowWidth)||2,complexBg:((h=this.cynefin)==null?void 0:h.complexBg)||"#E8F5E9",complicatedBg:((d=this.cynefin)==null?void 0:d.complicatedBg)||"#E3F2FD",chaoticBg:((p=this.cynefin)==null?void 0:p.chaoticBg)||"#FBE9E7",clearBg:((u=this.cynefin)==null?void 0:u.clearBg)||"#FFF8E1",confusionBg:((f=this.cynefin)==null?void 0:f.confusionBg)||"#F3E5F5",textColor:((m=this.cynefin)==null?void 0:m.textColor)||this.textColor,labelColor:((y=this.cynefin)==null?void 0:y.labelColor)||this.primaryTextColor},this.radar={axisColor:((C=this.radar)==null?void 0:C.axisColor)||this.lineColor,axisStrokeWidth:((b=this.radar)==null?void 0:b.axisStrokeWidth)||2,axisLabelFontSize:((k=this.radar)==null?void 0:k.axisLabelFontSize)||12,curveOpacity:((w=this.radar)==null?void 0:w.curveOpacity)||.5,curveStrokeWidth:((S=this.radar)==null?void 0:S.curveStrokeWidth)||2,graticuleColor:((B=this.radar)==null?void 0:B.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((F=this.radar)==null?void 0:F.graticuleStrokeWidth)||1,graticuleOpacity:((v=this.radar)==null?void 0:v.graticuleOpacity)||.3,legendBoxSize:((z=this.radar)==null?void 0:z.legendBoxSize)||12,legendFontSize:((q=this.radar)==null?void 0:q.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:((M=this.wardley)==null?void 0:M.backgroundColor)||this.background,axisColor:((U=this.wardley)==null?void 0:U.axisColor)||this.lineColor,axisTextColor:((W=this.wardley)==null?void 0:W.axisTextColor)||this.primaryTextColor,gridColor:((O=this.wardley)==null?void 0:O.gridColor)||this.gridColor,componentFill:((A=this.wardley)==null?void 0:A.componentFill)||this.background,componentStroke:((_=this.wardley)==null?void 0:_.componentStroke)||this.lineColor,componentLabelColor:(($=this.wardley)==null?void 0:$.componentLabelColor)||this.primaryTextColor,linkStroke:((E=this.wardley)==null?void 0:E.linkStroke)||this.lineColor,evolutionStroke:((N=this.wardley)==null?void 0:N.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((Y=this.wardley)==null?void 0:Y.annotationStroke)||this.lineColor,annotationTextColor:((G=this.wardley)==null?void 0:G.annotationTextColor)||this.primaryTextColor,annotationFill:((et=this.wardley)==null?void 0:et.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||x(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||we(this.quadrant1Fill)?P(this.quadrant1Fill):R(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:((lt=this.xyChart)==null?void 0:lt.backgroundColor)||this.background,titleColor:((ot=this.xyChart)==null?void 0:ot.titleColor)||this.primaryTextColor,dataLabelColor:((ct=this.xyChart)==null?void 0:ct.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((kt=this.xyChart)==null?void 0:kt.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((bt=this.xyChart)==null?void 0:bt.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((_t=this.xyChart)==null?void 0:_t.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((Lt=this.xyChart)==null?void 0:Lt.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((Z=this.xyChart)==null?void 0:Z.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((V=this.xyChart)==null?void 0:V.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((yt=this.xyChart)==null?void 0:yt.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((nt=this.xyChart)==null?void 0:nt.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((D=this.xyChart)==null?void 0:D.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?R(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||x(this.primaryColor,{h:-30}),this.git4=this.git4||x(this.primaryColor,{h:-60}),this.git5=this.git5||x(this.primaryColor,{h:-90}),this.git6=this.git6||x(this.primaryColor,{h:60}),this.git7=this.git7||x(this.primaryColor,{h:120}),this.darkMode?(this.git0=P(this.git0,25),this.git1=P(this.git1,25),this.git2=P(this.git2,25),this.git3=P(this.git3,25),this.git4=P(this.git4,25),this.git5=P(this.git5,25),this.git6=P(this.git6,25),this.git7=P(this.git7,25)):(this.git0=R(this.git0,25),this.git1=R(this.git1,25),this.git2=R(this.git2,25),this.git3=R(this.git3,25),this.git4=R(this.git4,25),this.git5=R(this.git5,25),this.git6=R(this.git6,25),this.git7=R(this.git7,25)),this.gitInv0=this.gitInv0||L(this.git0),this.gitInv1=this.gitInv1||L(this.git1),this.gitInv2=this.gitInv2||L(this.git2),this.gitInv3=this.gitInv3||L(this.git3),this.gitInv4=this.gitInv4||L(this.git4),this.gitInv5=this.gitInv5||L(this.git5),this.gitInv6=this.gitInv6||L(this.git6),this.gitInv7=this.gitInv7||L(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||Oe,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ie,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},g(Yr,"Theme"),Yr),Dm=g(e=>{const t=new Im;return t.calculate(e),t},"getThemeVariables"),Ur,Pm=(Ur=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=P(this.primaryColor,16),this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=L(this.background),this.secondaryBorderColor=gt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=gt(this.tertiaryColor,this.darkMode),this.primaryTextColor=L(this.primaryColor),this.secondaryTextColor=L(this.secondaryColor),this.tertiaryTextColor=L(this.tertiaryColor),this.lineColor=L(this.background),this.textColor=L(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=P(L("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=tr(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=R("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=R(this.sectionBkgColor,10),this.taskBorderColor=tr(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=tr(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||P(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||R(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(){var t,r,i,s,a,o,n,l,c,h,d,p,u,f,m,y,C,b,k,w,S,B,F,v,z,q,M,U,W,O,A,_,$,E,N,Y,G,et,lt,ot,ct,kt,bt,_t,Lt,Z,V,yt,nt;this.secondBkg=P(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=P(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=P(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=L(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=x(this.primaryColor,{h:64}),this.fillType3=x(this.secondaryColor,{h:64}),this.fillType4=x(this.primaryColor,{h:-64}),this.fillType5=x(this.secondaryColor,{h:-64}),this.fillType6=x(this.primaryColor,{h:128}),this.fillType7=x(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||x(this.primaryColor,{h:30}),this.cScale4=this.cScale4||x(this.primaryColor,{h:60}),this.cScale5=this.cScale5||x(this.primaryColor,{h:90}),this.cScale6=this.cScale6||x(this.primaryColor,{h:120}),this.cScale7=this.cScale7||x(this.primaryColor,{h:150}),this.cScale8=this.cScale8||x(this.primaryColor,{h:210}),this.cScale9=this.cScale9||x(this.primaryColor,{h:270}),this.cScale10=this.cScale10||x(this.primaryColor,{h:300}),this.cScale11=this.cScale11||x(this.primaryColor,{h:330});for(let D=0;D<this.THEME_COLOR_LIMIT;D++)this["cScaleInv"+D]=this["cScaleInv"+D]||L(this["cScale"+D]);for(let D=0;D<this.THEME_COLOR_LIMIT;D++)this["cScalePeer"+D]=this["cScalePeer"+D]||P(this["cScale"+D],10);for(let D=0;D<5;D++)this["surface"+D]=this["surface"+D]||x(this.mainBkg,{h:30,s:-30,l:-(-10+D*4)}),this["surfacePeer"+D]=this["surfacePeer"+D]||x(this.mainBkg,{h:30,s:-30,l:-(-7+D*4)});this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor);for(let D=0;D<this.THEME_COLOR_LIMIT;D++)this["cScaleLabel"+D]=this["cScaleLabel"+D]||this.scaleLabelColor;for(let D=0;D<this.THEME_COLOR_LIMIT;D++)this["pie"+D]=this["cScale"+D];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 D=0;D<8;D++)this["venn"+(D+1)]=this["venn"+(D+1)]??P(this["cScale"+D],30);this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:((t=this.cynefin)==null?void 0:t.domainFontSize)||16,itemFontSize:((r=this.cynefin)==null?void 0:r.itemFontSize)||12,boundaryColor:((i=this.cynefin)==null?void 0:i.boundaryColor)||this.lineColor,boundaryWidth:((s=this.cynefin)==null?void 0:s.boundaryWidth)||2,cliffColor:((a=this.cynefin)==null?void 0:a.cliffColor)||"#FF6B6B",cliffWidth:((o=this.cynefin)==null?void 0:o.cliffWidth)||4,arrowColor:((n=this.cynefin)==null?void 0:n.arrowColor)||this.lineColor,arrowWidth:((l=this.cynefin)==null?void 0:l.arrowWidth)||2,complexBg:((c=this.cynefin)==null?void 0:c.complexBg)||"#1B5E20",complicatedBg:((h=this.cynefin)==null?void 0:h.complicatedBg)||"#0D47A1",chaoticBg:((d=this.cynefin)==null?void 0:d.chaoticBg)||"#BF360C",clearBg:((p=this.cynefin)==null?void 0:p.clearBg)||"#F57F17",confusionBg:((u=this.cynefin)==null?void 0:u.confusionBg)||"#4A148C",textColor:((f=this.cynefin)==null?void 0:f.textColor)||this.textColor,labelColor:((m=this.cynefin)==null?void 0:m.labelColor)||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||x(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||we(this.quadrant1Fill)?P(this.quadrant1Fill):R(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:((y=this.xyChart)==null?void 0:y.backgroundColor)||this.background,titleColor:((C=this.xyChart)==null?void 0:C.titleColor)||this.primaryTextColor,dataLabelColor:((b=this.xyChart)==null?void 0:b.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((k=this.xyChart)==null?void 0:k.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((w=this.xyChart)==null?void 0:w.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((S=this.xyChart)==null?void 0:S.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((B=this.xyChart)==null?void 0:B.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((F=this.xyChart)==null?void 0:F.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((v=this.xyChart)==null?void 0:v.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((z=this.xyChart)==null?void 0:z.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((q=this.xyChart)==null?void 0:q.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((M=this.xyChart)==null?void 0:M.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:((U=this.radar)==null?void 0:U.axisColor)||this.lineColor,axisStrokeWidth:((W=this.radar)==null?void 0:W.axisStrokeWidth)||2,axisLabelFontSize:((O=this.radar)==null?void 0:O.axisLabelFontSize)||12,curveOpacity:((A=this.radar)==null?void 0:A.curveOpacity)||.5,curveStrokeWidth:((_=this.radar)==null?void 0:_.curveStrokeWidth)||2,graticuleColor:(($=this.radar)==null?void 0:$.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((E=this.radar)==null?void 0:E.graticuleStrokeWidth)||1,graticuleOpacity:((N=this.radar)==null?void 0:N.graticuleOpacity)||.3,legendBoxSize:((Y=this.radar)==null?void 0:Y.legendBoxSize)||12,legendFontSize:((G=this.radar)==null?void 0:G.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#ff6b6b",this.wardley={backgroundColor:((et=this.wardley)==null?void 0:et.backgroundColor)||this.background,axisColor:((lt=this.wardley)==null?void 0:lt.axisColor)||this.lineColor,axisTextColor:((ot=this.wardley)==null?void 0:ot.axisTextColor)||this.primaryTextColor,gridColor:((ct=this.wardley)==null?void 0:ct.gridColor)||this.gridColor,componentFill:((kt=this.wardley)==null?void 0:kt.componentFill)||this.mainBkg,componentStroke:((bt=this.wardley)==null?void 0:bt.componentStroke)||this.lineColor,componentLabelColor:((_t=this.wardley)==null?void 0:_t.componentLabelColor)||this.primaryTextColor,linkStroke:((Lt=this.wardley)==null?void 0:Lt.linkStroke)||this.lineColor,evolutionStroke:((Z=this.wardley)==null?void 0:Z.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((V=this.wardley)==null?void 0:V.annotationStroke)||this.lineColor,annotationTextColor:((yt=this.wardley)==null?void 0:yt.annotationTextColor)||this.primaryTextColor,annotationFill:((nt=this.wardley)==null?void 0:nt.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?R(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=P(this.secondaryColor,20),this.git1=P(this.pie2||this.secondaryColor,20),this.git2=P(this.pie3||this.tertiaryColor,20),this.git3=P(this.pie4||x(this.primaryColor,{h:-30}),20),this.git4=P(this.pie5||x(this.primaryColor,{h:-60}),20),this.git5=P(this.pie6||x(this.primaryColor,{h:-90}),10),this.git6=P(this.pie7||x(this.primaryColor,{h:60}),10),this.git7=P(this.pie8||x(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||L(this.git0),this.gitInv1=this.gitInv1||L(this.git1),this.gitInv2=this.gitInv2||L(this.git2),this.gitInv3=this.gitInv3||L(this.git3),this.gitInv4=this.gitInv4||L(this.git4),this.gitInv5=this.gitInv5||L(this.git5),this.gitInv6=this.gitInv6||L(this.git6),this.gitInv7=this.gitInv7||L(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||L(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||L(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||P("#5a3d5c",10),this.emProcessorStroke=this.emProcessorStroke||"#8a6d8c",this.emReadModelFill=this.emReadModelFill||P("#3d5a2d",10),this.emReadModelStroke=this.emReadModelStroke||"#6d8c5c",this.emCommandFill=this.emCommandFill||P("#2d3d5a",10),this.emCommandStroke=this.emCommandStroke||"#5c6d8c",this.emEventFill=this.emEventFill||P("#5a452d",10),this.emEventStroke=this.emEventStroke||"#8c755c",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||P(this.background,5),this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||P(this.background,12),this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||P(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||P(this.background,2),this.nodeBorder=this.nodeBorder||"#999"}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},g(Ur,"Theme"),Ur),Rm=g(e=>{const t=new Pm;return t.calculate(e),t},"getThemeVariables"),jr,qm=(jr=class{constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=x(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=gt(this.primaryColor,this.darkMode),this.secondaryBorderColor=gt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=gt(this.tertiaryColor,this.darkMode),this.primaryTextColor=L(this.primaryColor),this.secondaryTextColor=L(this.secondaryColor),this.tertiaryTextColor=L(this.tertiaryColor),this.lineColor=L(this.background),this.textColor=L(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.primaryBorderColor=gt(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=tr(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(){var t,r,i,s,a,o,n,l,c,h,d,p,u,f,m,y,C,b,k,w,S,B,F,v,z,q,M,U,W,O,A,_,$,E,N,Y,G,et,lt,ot,ct,kt,bt,_t,Lt,Z,V,yt,nt;this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||x(this.primaryColor,{h:30}),this.cScale4=this.cScale4||x(this.primaryColor,{h:60}),this.cScale5=this.cScale5||x(this.primaryColor,{h:90}),this.cScale6=this.cScale6||x(this.primaryColor,{h:120}),this.cScale7=this.cScale7||x(this.primaryColor,{h:150}),this.cScale8=this.cScale8||x(this.primaryColor,{h:210}),this.cScale9=this.cScale9||x(this.primaryColor,{h:270}),this.cScale10=this.cScale10||x(this.primaryColor,{h:300}),this.cScale11=this.cScale11||x(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||R(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||R(this.tertiaryColor,40);for(let D=0;D<this.THEME_COLOR_LIMIT;D++)this["cScale"+D]=R(this["cScale"+D],10),this["cScalePeer"+D]=this["cScalePeer"+D]||R(this["cScale"+D],25);for(let D=0;D<this.THEME_COLOR_LIMIT;D++)this["cScaleInv"+D]=this["cScaleInv"+D]||x(this["cScale"+D],{h:180});for(let D=0;D<5;D++)this["surface"+D]=this["surface"+D]||x(this.mainBkg,{h:30,l:-(5+D*5)}),this["surfacePeer"+D]=this["surfacePeer"+D]||x(this.mainBkg,{h:30,l:-(7+D*5)});if(this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,this.labelTextColor!=="calculated"){this.cScaleLabel0=this.cScaleLabel0||L(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||L(this.labelTextColor);for(let D=0;D<this.THEME_COLOR_LIMIT;D++)this["cScaleLabel"+D]=this["cScaleLabel"+D]||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||P(this.primaryColor,75)||"#ffffff",this.rowEven=this.rowEven||P(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=x(this.primaryColor,{h:64}),this.fillType3=x(this.secondaryColor,{h:64}),this.fillType4=x(this.primaryColor,{h:-64}),this.fillType5=x(this.secondaryColor,{h:-64}),this.fillType6=x(this.primaryColor,{h:128}),this.fillType7=x(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||x(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||x(this.primaryColor,{l:-10}),this.pie5=this.pie5||x(this.secondaryColor,{l:-30}),this.pie6=this.pie6||x(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||x(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||x(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||x(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||x(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||x(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||x(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??x(this.primaryColor,{l:-30}),this.venn2=this.venn2??x(this.secondaryColor,{l:-30}),this.venn3=this.venn3??x(this.tertiaryColor,{l:-40}),this.venn4=this.venn4??x(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??x(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??x(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??x(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??x(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:((t=this.cynefin)==null?void 0:t.domainFontSize)||16,itemFontSize:((r=this.cynefin)==null?void 0:r.itemFontSize)||12,boundaryColor:((i=this.cynefin)==null?void 0:i.boundaryColor)||this.lineColor,boundaryWidth:((s=this.cynefin)==null?void 0:s.boundaryWidth)||2,cliffColor:((a=this.cynefin)==null?void 0:a.cliffColor)||"#8B0000",cliffWidth:((o=this.cynefin)==null?void 0:o.cliffWidth)||4,arrowColor:((n=this.cynefin)==null?void 0:n.arrowColor)||this.lineColor,arrowWidth:((l=this.cynefin)==null?void 0:l.arrowWidth)||2,complexBg:((c=this.cynefin)==null?void 0:c.complexBg)||"#E8F5E9",complicatedBg:((h=this.cynefin)==null?void 0:h.complicatedBg)||"#E3F2FD",chaoticBg:((d=this.cynefin)==null?void 0:d.chaoticBg)||"#FBE9E7",clearBg:((p=this.cynefin)==null?void 0:p.clearBg)||"#FFF8E1",confusionBg:((u=this.cynefin)==null?void 0:u.confusionBg)||"#F3E5F5",textColor:((f=this.cynefin)==null?void 0:f.textColor)||this.textColor,labelColor:((m=this.cynefin)==null?void 0:m.labelColor)||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||x(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||we(this.quadrant1Fill)?P(this.quadrant1Fill):R(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:((y=this.radar)==null?void 0:y.axisColor)||this.lineColor,axisStrokeWidth:((C=this.radar)==null?void 0:C.axisStrokeWidth)||2,axisLabelFontSize:((b=this.radar)==null?void 0:b.axisLabelFontSize)||12,curveOpacity:((k=this.radar)==null?void 0:k.curveOpacity)||.5,curveStrokeWidth:((w=this.radar)==null?void 0:w.curveStrokeWidth)||2,graticuleColor:((S=this.radar)==null?void 0:S.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((B=this.radar)==null?void 0:B.graticuleStrokeWidth)||1,graticuleOpacity:((F=this.radar)==null?void 0:F.graticuleOpacity)||.3,legendBoxSize:((v=this.radar)==null?void 0:v.legendBoxSize)||12,legendFontSize:((z=this.radar)==null?void 0:z.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:((q=this.wardley)==null?void 0:q.backgroundColor)||this.background,axisColor:((M=this.wardley)==null?void 0:M.axisColor)||this.lineColor,axisTextColor:((U=this.wardley)==null?void 0:U.axisTextColor)||this.primaryTextColor,gridColor:((W=this.wardley)==null?void 0:W.gridColor)||this.gridColor,componentFill:((O=this.wardley)==null?void 0:O.componentFill)||this.background,componentStroke:((A=this.wardley)==null?void 0:A.componentStroke)||this.lineColor,componentLabelColor:((_=this.wardley)==null?void 0:_.componentLabelColor)||this.primaryTextColor,linkStroke:(($=this.wardley)==null?void 0:$.linkStroke)||this.lineColor,evolutionStroke:((E=this.wardley)==null?void 0:E.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((N=this.wardley)==null?void 0:N.annotationStroke)||this.lineColor,annotationTextColor:((Y=this.wardley)==null?void 0:Y.annotationTextColor)||this.primaryTextColor,annotationFill:((G=this.wardley)==null?void 0:G.annotationFill)||this.background},this.xyChart={backgroundColor:((et=this.xyChart)==null?void 0:et.backgroundColor)||this.background,titleColor:((lt=this.xyChart)==null?void 0:lt.titleColor)||this.primaryTextColor,dataLabelColor:((ot=this.xyChart)==null?void 0:ot.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((ct=this.xyChart)==null?void 0:ct.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((kt=this.xyChart)==null?void 0:kt.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((bt=this.xyChart)==null?void 0:bt.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((_t=this.xyChart)==null?void 0:_t.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((Lt=this.xyChart)==null?void 0:Lt.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((Z=this.xyChart)==null?void 0:Z.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((V=this.xyChart)==null?void 0:V.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((yt=this.xyChart)==null?void 0:yt.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((nt=this.xyChart)==null?void 0:nt.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||x(this.primaryColor,{h:-30}),this.git4=this.git4||x(this.primaryColor,{h:-60}),this.git5=this.git5||x(this.primaryColor,{h:-90}),this.git6=this.git6||x(this.primaryColor,{h:60}),this.git7=this.git7||x(this.primaryColor,{h:120}),this.darkMode?(this.git0=P(this.git0,25),this.git1=P(this.git1,25),this.git2=P(this.git2,25),this.git3=P(this.git3,25),this.git4=P(this.git4,25),this.git5=P(this.git5,25),this.git6=P(this.git6,25),this.git7=P(this.git7,25)):(this.git0=R(this.git0,25),this.git1=R(this.git1,25),this.git2=R(this.git2,25),this.git3=R(this.git3,25),this.git4=R(this.git4,25),this.git5=R(this.git5,25),this.git6=R(this.git6,25),this.git7=R(this.git7,25)),this.gitInv0=this.gitInv0||R(L(this.git0),25),this.gitInv1=this.gitInv1||L(this.git1),this.gitInv2=this.gitInv2||L(this.git2),this.gitInv3=this.gitInv3||L(this.git3),this.gitInv4=this.gitInv4||L(this.git4),this.gitInv5=this.gitInv5||L(this.git5),this.gitInv6=this.gitInv6||L(this.git6),this.gitInv7=this.gitInv7||L(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||L(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||L(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||Oe,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ie}calculate(t){if(Object.keys(this).forEach(i=>{this[i]==="calculated"&&(this[i]=void 0)}),typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},g(jr,"Theme"),jr),Nm=g(e=>{const t=new qm;return t.calculate(e),t},"getThemeVariables"),Gr,Wm=(Gr=class{constructor(){this.background="#f4f4f4",this.primaryColor="#cde498",this.secondaryColor="#cdffb2",this.background="white",this.mainBkg="#cde498",this.secondBkg="#cdffb2",this.lineColor="green",this.border1="#13540c",this.border2="#6eaa49",this.arrowheadColor="green",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.tertiaryColor=P("#cde498",10),this.primaryBorderColor=gt(this.primaryColor,this.darkMode),this.secondaryBorderColor=gt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=gt(this.tertiaryColor,this.darkMode),this.primaryTextColor=L(this.primaryColor),this.secondaryTextColor=L(this.secondaryColor),this.tertiaryTextColor=L(this.primaryColor),this.lineColor=L(this.background),this.textColor=L(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(){var t,r,i,s,a,o,n,l,c,h,d,p,u,f,m,y,C,b,k,w,S,B,F,v,z,q,M,U,W,O,A,_,$,E,N,Y,G,et,lt,ot,ct,kt,bt,_t,Lt,Z,V,yt,nt;this.actorBorder=R(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||x(this.primaryColor,{h:30}),this.cScale4=this.cScale4||x(this.primaryColor,{h:60}),this.cScale5=this.cScale5||x(this.primaryColor,{h:90}),this.cScale6=this.cScale6||x(this.primaryColor,{h:120}),this.cScale7=this.cScale7||x(this.primaryColor,{h:150}),this.cScale8=this.cScale8||x(this.primaryColor,{h:210}),this.cScale9=this.cScale9||x(this.primaryColor,{h:270}),this.cScale10=this.cScale10||x(this.primaryColor,{h:300}),this.cScale11=this.cScale11||x(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||R(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||R(this.tertiaryColor,40);for(let D=0;D<this.THEME_COLOR_LIMIT;D++)this["cScale"+D]=R(this["cScale"+D],10),this["cScalePeer"+D]=this["cScalePeer"+D]||R(this["cScale"+D],25);for(let D=0;D<this.THEME_COLOR_LIMIT;D++)this["cScaleInv"+D]=this["cScaleInv"+D]||x(this["cScale"+D],{h:180});this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let D=0;D<this.THEME_COLOR_LIMIT;D++)this["cScaleLabel"+D]=this["cScaleLabel"+D]||this.scaleLabelColor;for(let D=0;D<5;D++)this["surface"+D]=this["surface"+D]||x(this.mainBkg,{h:30,s:-30,l:-(5+D*5)}),this["surfacePeer"+D]=this["surfacePeer"+D]||x(this.mainBkg,{h:30,s:-30,l:-(8+D*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||P(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||P(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=x(this.primaryColor,{h:64}),this.fillType3=x(this.secondaryColor,{h:64}),this.fillType4=x(this.primaryColor,{h:-64}),this.fillType5=x(this.secondaryColor,{h:-64}),this.fillType6=x(this.primaryColor,{h:128}),this.fillType7=x(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||x(this.primaryColor,{l:-30}),this.pie5=this.pie5||x(this.secondaryColor,{l:-30}),this.pie6=this.pie6||x(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||x(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||x(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||x(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||x(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||x(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||x(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??x(this.primaryColor,{l:-30}),this.venn2=this.venn2??x(this.secondaryColor,{l:-30}),this.venn3=this.venn3??x(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??x(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??x(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??x(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??x(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??x(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:((t=this.cynefin)==null?void 0:t.domainFontSize)||16,itemFontSize:((r=this.cynefin)==null?void 0:r.itemFontSize)||12,boundaryColor:((i=this.cynefin)==null?void 0:i.boundaryColor)||this.lineColor,boundaryWidth:((s=this.cynefin)==null?void 0:s.boundaryWidth)||2,cliffColor:((a=this.cynefin)==null?void 0:a.cliffColor)||"#8B4513",cliffWidth:((o=this.cynefin)==null?void 0:o.cliffWidth)||4,arrowColor:((n=this.cynefin)==null?void 0:n.arrowColor)||this.lineColor,arrowWidth:((l=this.cynefin)==null?void 0:l.arrowWidth)||2,complexBg:((c=this.cynefin)==null?void 0:c.complexBg)||"#C8E6C9",complicatedBg:((h=this.cynefin)==null?void 0:h.complicatedBg)||"#DCEDC8",chaoticBg:((d=this.cynefin)==null?void 0:d.chaoticBg)||"#FFE0B2",clearBg:((p=this.cynefin)==null?void 0:p.clearBg)||"#FFF9C4",confusionBg:((u=this.cynefin)==null?void 0:u.confusionBg)||"#D7CCC8",textColor:((f=this.cynefin)==null?void 0:f.textColor)||this.textColor,labelColor:((m=this.cynefin)==null?void 0:m.labelColor)||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||x(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||we(this.quadrant1Fill)?P(this.quadrant1Fill):R(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:((y=this.radar)==null?void 0:y.axisColor)||this.lineColor,axisStrokeWidth:((C=this.radar)==null?void 0:C.axisStrokeWidth)||2,axisLabelFontSize:((b=this.radar)==null?void 0:b.axisLabelFontSize)||12,curveOpacity:((k=this.radar)==null?void 0:k.curveOpacity)||.5,curveStrokeWidth:((w=this.radar)==null?void 0:w.curveStrokeWidth)||2,graticuleColor:((S=this.radar)==null?void 0:S.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((B=this.radar)==null?void 0:B.graticuleStrokeWidth)||1,graticuleOpacity:((F=this.radar)==null?void 0:F.graticuleOpacity)||.3,legendBoxSize:((v=this.radar)==null?void 0:v.legendBoxSize)||12,legendFontSize:((z=this.radar)==null?void 0:z.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:((q=this.wardley)==null?void 0:q.backgroundColor)||this.background,axisColor:((M=this.wardley)==null?void 0:M.axisColor)||this.lineColor,axisTextColor:((U=this.wardley)==null?void 0:U.axisTextColor)||this.primaryTextColor,gridColor:((W=this.wardley)==null?void 0:W.gridColor)||this.gridColor,componentFill:((O=this.wardley)==null?void 0:O.componentFill)||this.background,componentStroke:((A=this.wardley)==null?void 0:A.componentStroke)||this.lineColor,componentLabelColor:((_=this.wardley)==null?void 0:_.componentLabelColor)||this.primaryTextColor,linkStroke:(($=this.wardley)==null?void 0:$.linkStroke)||this.lineColor,evolutionStroke:((E=this.wardley)==null?void 0:E.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((N=this.wardley)==null?void 0:N.annotationStroke)||this.lineColor,annotationTextColor:((Y=this.wardley)==null?void 0:Y.annotationTextColor)||this.primaryTextColor,annotationFill:((G=this.wardley)==null?void 0:G.annotationFill)||this.background},this.xyChart={backgroundColor:((et=this.xyChart)==null?void 0:et.backgroundColor)||this.background,titleColor:((lt=this.xyChart)==null?void 0:lt.titleColor)||this.primaryTextColor,dataLabelColor:((ot=this.xyChart)==null?void 0:ot.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((ct=this.xyChart)==null?void 0:ct.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((kt=this.xyChart)==null?void 0:kt.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((bt=this.xyChart)==null?void 0:bt.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((_t=this.xyChart)==null?void 0:_t.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((Lt=this.xyChart)==null?void 0:Lt.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((Z=this.xyChart)==null?void 0:Z.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((V=this.xyChart)==null?void 0:V.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((yt=this.xyChart)==null?void 0:yt.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((nt=this.xyChart)==null?void 0:nt.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||x(this.primaryColor,{h:-30}),this.git4=this.git4||x(this.primaryColor,{h:-60}),this.git5=this.git5||x(this.primaryColor,{h:-90}),this.git6=this.git6||x(this.primaryColor,{h:60}),this.git7=this.git7||x(this.primaryColor,{h:120}),this.darkMode?(this.git0=P(this.git0,25),this.git1=P(this.git1,25),this.git2=P(this.git2,25),this.git3=P(this.git3,25),this.git4=P(this.git4,25),this.git5=P(this.git5,25),this.git6=P(this.git6,25),this.git7=P(this.git7,25)):(this.git0=R(this.git0,25),this.git1=R(this.git1,25),this.git2=R(this.git2,25),this.git3=R(this.git3,25),this.git4=R(this.git4,25),this.git5=R(this.git5,25),this.git6=R(this.git6,25),this.git7=R(this.git7,25)),this.gitInv0=this.gitInv0||L(this.git0),this.gitInv1=this.gitInv1||L(this.git1),this.gitInv2=this.gitInv2||L(this.git2),this.gitInv3=this.gitInv3||L(this.git3),this.gitInv4=this.gitInv4||L(this.git4),this.gitInv5=this.gitInv5||L(this.git5),this.gitInv6=this.gitInv6||L(this.git6),this.gitInv7=this.gitInv7||L(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||L(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||L(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||Oe,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ie}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},g(Gr,"Theme"),Gr),zm=g(e=>{const t=new Wm;return t.calculate(e),t},"getThemeVariables"),Xr,Hm=(Xr=class{constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=P(this.contrast,55),this.background="#ffffff",this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=gt(this.primaryColor,this.darkMode),this.secondaryBorderColor=gt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=gt(this.tertiaryColor,this.darkMode),this.primaryTextColor=L(this.primaryColor),this.secondaryTextColor=L(this.secondaryColor),this.tertiaryTextColor=L(this.tertiaryColor),this.lineColor=L(this.background),this.textColor=L(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||P(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(){var t,r,i,s,a,o,n,l,c,h,d,p,u,f,m,y,C,b,k,w,S,B,F,v,z,q,M,U,W,O,A,_,$,E,N,Y,G,et,lt,ot,ct,kt,bt,_t,Lt,Z,V,yt,nt;this.secondBkg=P(this.contrast,55),this.border2=this.contrast,this.actorBorder=P(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 D=0;D<this.THEME_COLOR_LIMIT;D++)this["cScaleInv"+D]=this["cScaleInv"+D]||L(this["cScale"+D]);for(let D=0;D<this.THEME_COLOR_LIMIT;D++)this.darkMode?this["cScalePeer"+D]=this["cScalePeer"+D]||P(this["cScale"+D],10):this["cScalePeer"+D]=this["cScalePeer"+D]||R(this["cScale"+D],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let D=0;D<this.THEME_COLOR_LIMIT;D++)this["cScaleLabel"+D]=this["cScaleLabel"+D]||this.scaleLabelColor;for(let D=0;D<5;D++)this["surface"+D]=this["surface"+D]||x(this.mainBkg,{l:-(5+D*5)}),this["surfacePeer"+D]=this["surfacePeer"+D]||x(this.mainBkg,{l:-(8+D*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=P(this.contrast,30),this.sectionBkgColor2=P(this.contrast,30),this.taskBorderColor=R(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=P(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=R(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=x(this.primaryColor,{h:64}),this.fillType3=x(this.secondaryColor,{h:64}),this.fillType4=x(this.primaryColor,{h:-64}),this.fillType5=x(this.secondaryColor,{h:-64}),this.fillType6=x(this.primaryColor,{h:128}),this.fillType7=x(this.secondaryColor,{h:128});for(let D=0;D<this.THEME_COLOR_LIMIT;D++)this["pie"+D]=this["cScale"+D];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 D=0;D<8;D++)this["venn"+(D+1)]=this["venn"+(D+1)]??this["cScale"+D];this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:((t=this.cynefin)==null?void 0:t.domainFontSize)||16,itemFontSize:((r=this.cynefin)==null?void 0:r.itemFontSize)||12,boundaryColor:((i=this.cynefin)==null?void 0:i.boundaryColor)||this.lineColor,boundaryWidth:((s=this.cynefin)==null?void 0:s.boundaryWidth)||2,cliffColor:((a=this.cynefin)==null?void 0:a.cliffColor)||"#8B0000",cliffWidth:((o=this.cynefin)==null?void 0:o.cliffWidth)||4,arrowColor:((n=this.cynefin)==null?void 0:n.arrowColor)||this.lineColor,arrowWidth:((l=this.cynefin)==null?void 0:l.arrowWidth)||2,complexBg:((c=this.cynefin)==null?void 0:c.complexBg)||"#E8F5E9",complicatedBg:((h=this.cynefin)==null?void 0:h.complicatedBg)||"#E3F2FD",chaoticBg:((d=this.cynefin)==null?void 0:d.chaoticBg)||"#FBE9E7",clearBg:((p=this.cynefin)==null?void 0:p.clearBg)||"#FFF8E1",confusionBg:((u=this.cynefin)==null?void 0:u.confusionBg)||"#F3E5F5",textColor:((f=this.cynefin)==null?void 0:f.textColor)||this.textColor,labelColor:((m=this.cynefin)==null?void 0:m.labelColor)||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||x(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||we(this.quadrant1Fill)?P(this.quadrant1Fill):R(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:((y=this.xyChart)==null?void 0:y.backgroundColor)||this.background,titleColor:((C=this.xyChart)==null?void 0:C.titleColor)||this.primaryTextColor,dataLabelColor:((b=this.xyChart)==null?void 0:b.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((k=this.xyChart)==null?void 0:k.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((w=this.xyChart)==null?void 0:w.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((S=this.xyChart)==null?void 0:S.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((B=this.xyChart)==null?void 0:B.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((F=this.xyChart)==null?void 0:F.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((v=this.xyChart)==null?void 0:v.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((z=this.xyChart)==null?void 0:z.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((q=this.xyChart)==null?void 0:q.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((M=this.xyChart)==null?void 0:M.plotColorPalette)||"#EEE,#6BB8E4,#8ACB88,#C7ACD6,#E8DCC2,#FFB2A8,#FFF380,#7E8D91,#FFD8B1,#FAF3E0"},this.radar={axisColor:((U=this.radar)==null?void 0:U.axisColor)||this.lineColor,axisStrokeWidth:((W=this.radar)==null?void 0:W.axisStrokeWidth)||2,axisLabelFontSize:((O=this.radar)==null?void 0:O.axisLabelFontSize)||12,curveOpacity:((A=this.radar)==null?void 0:A.curveOpacity)||.5,curveStrokeWidth:((_=this.radar)==null?void 0:_.curveStrokeWidth)||2,graticuleColor:(($=this.radar)==null?void 0:$.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((E=this.radar)==null?void 0:E.graticuleStrokeWidth)||1,graticuleOpacity:((N=this.radar)==null?void 0:N.graticuleOpacity)||.3,legendBoxSize:((Y=this.radar)==null?void 0:Y.legendBoxSize)||12,legendFontSize:((G=this.radar)==null?void 0:G.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:((et=this.wardley)==null?void 0:et.backgroundColor)||this.background,axisColor:((lt=this.wardley)==null?void 0:lt.axisColor)||this.lineColor,axisTextColor:((ot=this.wardley)==null?void 0:ot.axisTextColor)||this.primaryTextColor,gridColor:((ct=this.wardley)==null?void 0:ct.gridColor)||this.gridColor,componentFill:((kt=this.wardley)==null?void 0:kt.componentFill)||this.background,componentStroke:((bt=this.wardley)==null?void 0:bt.componentStroke)||this.lineColor,componentLabelColor:((_t=this.wardley)==null?void 0:_t.componentLabelColor)||this.primaryTextColor,linkStroke:((Lt=this.wardley)==null?void 0:Lt.linkStroke)||this.lineColor,evolutionStroke:((Z=this.wardley)==null?void 0:Z.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((V=this.wardley)==null?void 0:V.annotationStroke)||this.lineColor,annotationTextColor:((yt=this.wardley)==null?void 0:yt.annotationTextColor)||this.primaryTextColor,annotationFill:((nt=this.wardley)==null?void 0:nt.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=R(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||x(this.primaryColor,{h:-30}),this.git4=this.pie5||x(this.primaryColor,{h:-60}),this.git5=this.pie6||x(this.primaryColor,{h:-90}),this.git6=this.pie7||x(this.primaryColor,{h:60}),this.git7=this.pie8||x(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||L(this.git0),this.gitInv1=this.gitInv1||L(this.git1),this.gitInv2=this.gitInv2||L(this.git2),this.gitInv3=this.gitInv3||L(this.git3),this.gitInv4=this.gitInv4||L(this.git4),this.gitInv5=this.gitInv5||L(this.git5),this.gitInv6=this.gitInv6||L(this.git6),this.gitInv7=this.gitInv7||L(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||Oe,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ie}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},g(Xr,"Theme"),Xr),Ym=g(e=>{const t=new Hm;return t.calculate(e),t},"getThemeVariables"),Vr,Um=(Vr=class{constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=2,this.primaryBorderColor=gt(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(){var a,o,n,l,c,h,d,p,u,f,m;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||gt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||gt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||gt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||gt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||L(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||L(this.tertiaryColor),this.lineColor=this.lineColor||L(this.background),this.arrowheadColor=this.arrowheadColor||L(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?R(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||R(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||L(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;const t="#ECECFE",r="#E9E9F1",i=x(t,{h:180,l:5});if(this.sectionBkgColor=this.sectionBkgColor||i,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||r,this.sectionBkgColor2=this.sectionBkgColor2||t,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||t,this.activeTaskBorderColor=this.activeTaskBorderColor||t,this.activeTaskBkgColor=this.activeTaskBkgColor||P(t,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||t,this.cScale1=this.cScale1||r,this.cScale2=this.cScale2||i,this.cScale3=this.cScale3||x(t,{h:30}),this.cScale4=this.cScale4||x(t,{h:60}),this.cScale5=this.cScale5||x(t,{h:90}),this.cScale6=this.cScale6||x(t,{h:120}),this.cScale7=this.cScale7||x(t,{h:150}),this.cScale8=this.cScale8||x(t,{h:210,l:150}),this.cScale9=this.cScale9||x(t,{h:270}),this.cScale10=this.cScale10||x(t,{h:300}),this.cScale11=this.cScale11||x(t,{h:330}),this.darkMode)for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScale"+y]=R(this["cScale"+y],75);else for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScale"+y]=R(this["cScale"+y],25);for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScaleInv"+y]=this["cScaleInv"+y]||L(this["cScale"+y]);for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this.darkMode?this["cScalePeer"+y]=this["cScalePeer"+y]||P(this["cScale"+y],10):this["cScalePeer"+y]=this["cScalePeer"+y]||R(this["cScale"+y],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScaleLabel"+y]=this["cScaleLabel"+y]||this.scaleLabelColor;const s=this.darkMode?-4:-1;for(let y=0;y<5;y++)this["surface"+y]=this["surface"+y]||x(this.mainBkg,{h:180,s:-15,l:s*(5+y*3)}),this["surfacePeer"+y]=this["surfacePeer"+y]||x(this.mainBkg,{h:180,s:-15,l:s*(8+y*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||r,this.fillType2=this.fillType2||x(t,{h:64}),this.fillType3=this.fillType3||x(r,{h:64}),this.fillType4=this.fillType4||x(t,{h:-64}),this.fillType5=this.fillType5||x(r,{h:-64}),this.fillType6=this.fillType6||x(t,{h:128}),this.fillType7=this.fillType7||x(r,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||r,this.pie3=this.pie3||i,this.pie4=this.pie4||x(t,{l:-10}),this.pie5=this.pie5||x(r,{l:-10}),this.pie6=this.pie6||x(i,{l:-10}),this.pie7=this.pie7||x(t,{h:60,l:-10}),this.pie8=this.pie8||x(t,{h:-60,l:-10}),this.pie9=this.pie9||x(t,{h:120,l:0}),this.pie10=this.pie10||x(t,{h:60,l:-20}),this.pie11=this.pie11||x(t,{h:-60,l:-20}),this.pie12=this.pie12||x(t,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||t,this.quadrant2Fill=this.quadrant2Fill||x(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||we(this.quadrant1Fill)?P(this.quadrant1Fill):R(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:((a=this.xyChart)==null?void 0:a.backgroundColor)||this.background,titleColor:((o=this.xyChart)==null?void 0:o.titleColor)||this.primaryTextColor,xAxisTitleColor:((n=this.xyChart)==null?void 0:n.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((l=this.xyChart)==null?void 0:l.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((c=this.xyChart)==null?void 0:c.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((h=this.xyChart)==null?void 0:h.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((d=this.xyChart)==null?void 0:d.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((p=this.xyChart)==null?void 0:p.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((u=this.xyChart)==null?void 0:u.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((f=this.xyChart)==null?void 0:f.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((m=this.xyChart)==null?void 0:m.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||t,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?R(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||t,this.git1=this.git1||r,this.git2=this.git2||i,this.git3=this.git3||x(t,{h:-30}),this.git4=this.git4||x(t,{h:-60}),this.git5=this.git5||x(t,{h:-90}),this.git6=this.git6||x(t,{h:60}),this.git7=this.git7||x(t,{h:120}),this.darkMode?(this.git0=P(this.git0,25),this.git1=P(this.git1,25),this.git2=P(this.git2,25),this.git3=P(this.git3,25),this.git4=P(this.git4,25),this.git5=P(this.git5,25),this.git6=P(this.git6,25),this.git7=P(this.git7,25)):(this.git0=R(this.git0,25),this.git1=R(this.git1,25),this.git2=R(this.git2,25),this.git3=R(this.git3,25),this.git4=R(this.git4,25),this.git5=R(this.git5,25),this.git6=R(this.git6,25),this.git7=R(this.git7,25)),this.gitInv0=this.gitInv0||L(this.git0),this.gitInv1=this.gitInv1||L(this.git1),this.gitInv2=this.gitInv2||L(this.git2),this.gitInv3=this.gitInv3||L(this.git3),this.gitInv4=this.gitInv4||L(this.git4),this.gitInv5=this.gitInv5||L(this.git5),this.gitInv6=this.gitInv6||L(this.git6),this.gitInv7=this.gitInv7||L(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||Oe,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ie}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},g(Vr,"Theme"),Vr),jm=g(e=>{const t=new Um;return t.calculate(e),t},"getThemeVariables"),Zr,Gm=(Zr=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=P(this.primaryColor,16),this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=L(this.background),this.secondaryBorderColor=gt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=gt(this.tertiaryColor,this.darkMode),this.primaryTextColor=L(this.primaryColor),this.secondaryTextColor=L(this.secondaryColor),this.tertiaryTextColor=L(this.tertiaryColor),this.mainBkg="#2a2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=P(L("#323D47"),10),this.border1="#ccc",this.border2=tr(255,255,255,.25),this.arrowheadColor=L(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(){var r,i,s,a,o,n,l,c,h,d,p;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||gt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||gt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||gt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||gt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||L(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||L(this.tertiaryColor),this.lineColor=this.lineColor||L(this.background),this.arrowheadColor=this.arrowheadColor||L(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?R(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||R(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||L(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||P(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||x(this.primaryColor,{h:30}),this.cScale4=this.cScale4||x(this.primaryColor,{h:60}),this.cScale5=this.cScale5||x(this.primaryColor,{h:90}),this.cScale6=this.cScale6||x(this.primaryColor,{h:120}),this.cScale7=this.cScale7||x(this.primaryColor,{h:150}),this.cScale8=this.cScale8||x(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||x(this.primaryColor,{h:270}),this.cScale10=this.cScale10||x(this.primaryColor,{h:300}),this.cScale11=this.cScale11||x(this.primaryColor,{h:330}),this.darkMode)for(let u=0;u<this.THEME_COLOR_LIMIT;u++)this["cScale"+u]=R(this["cScale"+u],75);else for(let u=0;u<this.THEME_COLOR_LIMIT;u++)this["cScale"+u]=R(this["cScale"+u],25);for(let u=0;u<this.THEME_COLOR_LIMIT;u++)this["cScaleInv"+u]=this["cScaleInv"+u]||L(this["cScale"+u]);for(let u=0;u<this.THEME_COLOR_LIMIT;u++)this.darkMode?this["cScalePeer"+u]=this["cScalePeer"+u]||P(this["cScale"+u],10):this["cScalePeer"+u]=this["cScalePeer"+u]||R(this["cScale"+u],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let u=0;u<this.THEME_COLOR_LIMIT;u++)this["cScaleLabel"+u]=this["cScaleLabel"+u]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let u=0;u<5;u++)this["surface"+u]=this["surface"+u]||x(this.mainBkg,{h:180,s:-15,l:t*(5+u*3)}),this["surfacePeer"+u]=this["surfacePeer"+u]||x(this.mainBkg,{h:180,s:-15,l:t*(8+u*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||x(this.primaryColor,{h:64}),this.fillType3=this.fillType3||x(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||x(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||x(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||x(this.primaryColor,{h:128}),this.fillType7=this.fillType7||x(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||x(this.primaryColor,{l:-10}),this.pie5=this.pie5||x(this.secondaryColor,{l:-10}),this.pie6=this.pie6||x(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||x(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||x(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||x(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||x(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||x(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||x(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||x(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||we(this.quadrant1Fill)?P(this.quadrant1Fill):R(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:((r=this.xyChart)==null?void 0:r.backgroundColor)||this.background,titleColor:((i=this.xyChart)==null?void 0:i.titleColor)||this.primaryTextColor,xAxisTitleColor:((s=this.xyChart)==null?void 0:s.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((a=this.xyChart)==null?void 0:a.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((o=this.xyChart)==null?void 0:o.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((n=this.xyChart)==null?void 0:n.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((l=this.xyChart)==null?void 0:l.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((c=this.xyChart)==null?void 0:c.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((h=this.xyChart)==null?void 0:h.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((d=this.xyChart)==null?void 0:d.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((p=this.xyChart)==null?void 0:p.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?R(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=P(this.git0,25),this.git1=P(this.git1,25),this.git2=P(this.git2,25),this.git3=P(this.git3,25),this.git4=P(this.git4,25),this.git5=P(this.git5,25),this.git6=P(this.git6,25),this.git7=P(this.git7,25)):(this.git0=R(this.git0,25),this.git1=R(this.git1,25),this.git2=R(this.git2,25),this.git3=R(this.git3,25),this.git4=R(this.git4,25),this.git5=R(this.git5,25),this.git6=R(this.git6,25),this.git7=R(this.git7,25)),this.gitInv0=this.gitInv0||L(this.git0),this.gitInv1=this.gitInv1||L(this.git1),this.gitInv2=this.gitInv2||L(this.git2),this.gitInv3=this.gitInv3||L(this.git3),this.gitInv4=this.gitInv4||L(this.git4),this.gitInv5=this.gitInv5||L(this.git5),this.gitInv6=this.gitInv6||L(this.git6),this.gitInv7=this.gitInv7||L(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||Oe,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ie}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},g(Zr,"Theme"),Zr),Xm=g(e=>{const t=new Gm;return t.calculate(e),t},"getThemeVariables"),Qr,Vm=(Qr=class{constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#28253D",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=gt("#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(){var a,o,n,l,c,h,d,p,u,f,m;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||gt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||gt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||gt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||gt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#FEF9C3",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||L(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||L(this.tertiaryColor),this.lineColor=this.lineColor||L(this.background),this.arrowheadColor=this.arrowheadColor||L(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?R(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||R(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||L(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;const t="#ECECFE",r="#E9E9F1",i=x(t,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||i,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||r,this.sectionBkgColor2=this.sectionBkgColor2||t,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||t,this.activeTaskBorderColor=this.activeTaskBorderColor||t,this.activeTaskBkgColor=this.activeTaskBkgColor||P(t,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.compositeTitleBackground="#F9F9FB",this.altBackground="#F9F9FB",this.stateEdgeLabelBackground="#FFFFFF",this.fontWeight=600,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor;for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScale"+y]=this.mainBkg;if(this.darkMode)for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScale"+y]=R(this["cScale"+y],75);else for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScale"+y]=R(this["cScale"+y],25);for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScaleInv"+y]=this["cScaleInv"+y]||L(this["cScale"+y]);for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this.darkMode?this["cScalePeer"+y]=this["cScalePeer"+y]||P(this["cScale"+y],10):this["cScalePeer"+y]=this["cScalePeer"+y]||R(this["cScale"+y],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScaleLabel"+y]=this["cScaleLabel"+y]||this.scaleLabelColor;const s=this.darkMode?-4:-1;for(let y=0;y<5;y++)this["surface"+y]=this["surface"+y]||x(this.mainBkg,{h:180,s:-15,l:s*(5+y*3)}),this["surfacePeer"+y]=this["surfacePeer"+y]||x(this.mainBkg,{h:180,s:-15,l:s*(8+y*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||r,this.fillType2=this.fillType2||x(t,{h:64}),this.fillType3=this.fillType3||x(r,{h:64}),this.fillType4=this.fillType4||x(t,{h:-64}),this.fillType5=this.fillType5||x(r,{h:-64}),this.fillType6=this.fillType6||x(t,{h:128}),this.fillType7=this.fillType7||x(r,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||r,this.pie3=this.pie3||i,this.pie4=this.pie4||x(t,{l:-10}),this.pie5=this.pie5||x(r,{l:-10}),this.pie6=this.pie6||x(i,{l:-10}),this.pie7=this.pie7||x(t,{h:60,l:-10}),this.pie8=this.pie8||x(t,{h:-60,l:-10}),this.pie9=this.pie9||x(t,{h:120,l:0}),this.pie10=this.pie10||x(t,{h:60,l:-20}),this.pie11=this.pie11||x(t,{h:-60,l:-20}),this.pie12=this.pie12||x(t,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||t,this.quadrant2Fill=this.quadrant2Fill||x(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||we(this.quadrant1Fill)?P(this.quadrant1Fill):R(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:((a=this.xyChart)==null?void 0:a.backgroundColor)||this.background,titleColor:((o=this.xyChart)==null?void 0:o.titleColor)||this.primaryTextColor,xAxisTitleColor:((n=this.xyChart)==null?void 0:n.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((l=this.xyChart)==null?void 0:l.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((c=this.xyChart)==null?void 0:c.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((h=this.xyChart)==null?void 0:h.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((d=this.xyChart)==null?void 0:d.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((p=this.xyChart)==null?void 0:p.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((u=this.xyChart)==null?void 0:u.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((f=this.xyChart)==null?void 0:f.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((m=this.xyChart)==null?void 0:m.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||t,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?R(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground="#FFFFFF",this.git0=this.git0||t,this.git1=this.git1||r,this.git2=this.git2||i,this.git3=this.git3||x(t,{h:-30}),this.git4=this.git4||x(t,{h:-60}),this.git5=this.git5||x(t,{h:-90}),this.git6=this.git6||x(t,{h:60}),this.git7=this.git7||x(t,{h:120}),this.darkMode?(this.git0=P(this.git0,25),this.git1=P(this.git1,25),this.git2=P(this.git2,25),this.git3=P(this.git3,25),this.git4=P(this.git4,25),this.git5=P(this.git5,25),this.git6=P(this.git6,25),this.git7=P(this.git7,25)):(this.git0=R(this.git0,25),this.git1=R(this.git1,25),this.git2=R(this.git2,25),this.git3=R(this.git3,25),this.git4=R(this.git4,25),this.git5=R(this.git5,25),this.git6=R(this.git6,25),this.git7=R(this.git7,25)),this.gitInv0=this.gitInv0||L(this.git0),this.gitInv1=this.gitInv1||L(this.git1),this.gitInv2=this.gitInv2||L(this.git2),this.gitInv3=this.gitInv3||L(this.git3),this.gitInv4=this.gitInv4||L(this.git4),this.gitInv5=this.gitInv5||L(this.git5),this.gitInv6=this.gitInv6||L(this.git6),this.gitInv7=this.gitInv7||L(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||Oe,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ie}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},g(Qr,"Theme"),Qr),Zm=g(e=>{const t=new Vm;return t.calculate(e),t},"getThemeVariables"),Kr,Qm=(Kr=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=P(this.primaryColor,16),this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=L(this.background),this.secondaryBorderColor=gt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=gt(this.tertiaryColor,this.darkMode),this.primaryTextColor=L(this.primaryColor),this.secondaryTextColor=L(this.secondaryColor),this.tertiaryTextColor=L(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=P(L("#323D47"),10),this.border1="#ccc",this.border2=tr(255,255,255,.25),this.arrowheadColor=L(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(){var r,i,s,a,o,n,l,c,h,d,p;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||gt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||gt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||gt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||gt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||L(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||L(this.tertiaryColor),this.lineColor=this.lineColor||L(this.background),this.arrowheadColor=this.arrowheadColor||L(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?R(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||R(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||L(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||P(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||x(this.primaryColor,{h:30}),this.cScale4=this.cScale4||x(this.primaryColor,{h:60}),this.cScale5=this.cScale5||x(this.primaryColor,{h:90}),this.cScale6=this.cScale6||x(this.primaryColor,{h:120}),this.cScale7=this.cScale7||x(this.primaryColor,{h:150}),this.cScale8=this.cScale8||x(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||x(this.primaryColor,{h:270}),this.cScale10=this.cScale10||x(this.primaryColor,{h:300}),this.cScale11=this.cScale11||x(this.primaryColor,{h:330}),this.darkMode)for(let u=0;u<this.THEME_COLOR_LIMIT;u++)this["cScale"+u]=R(this["cScale"+u],75);else for(let u=0;u<this.THEME_COLOR_LIMIT;u++)this["cScale"+u]=R(this["cScale"+u],25);for(let u=0;u<this.THEME_COLOR_LIMIT;u++)this["cScaleInv"+u]=this["cScaleInv"+u]||L(this["cScale"+u]);for(let u=0;u<this.THEME_COLOR_LIMIT;u++)this.darkMode?this["cScalePeer"+u]=this["cScalePeer"+u]||P(this["cScale"+u],10):this["cScalePeer"+u]=this["cScalePeer"+u]||R(this["cScale"+u],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let u=0;u<this.THEME_COLOR_LIMIT;u++)this["cScaleLabel"+u]=this["cScaleLabel"+u]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let u=0;u<5;u++)this["surface"+u]=this["surface"+u]||x(this.mainBkg,{h:180,s:-15,l:t*(5+u*3)}),this["surfacePeer"+u]=this["surfacePeer"+u]||x(this.mainBkg,{h:180,s:-15,l:t*(8+u*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||x(this.primaryColor,{h:64}),this.fillType3=this.fillType3||x(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||x(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||x(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||x(this.primaryColor,{h:128}),this.fillType7=this.fillType7||x(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||x(this.primaryColor,{l:-10}),this.pie5=this.pie5||x(this.secondaryColor,{l:-10}),this.pie6=this.pie6||x(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||x(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||x(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||x(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||x(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||x(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||x(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||x(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||we(this.quadrant1Fill)?P(this.quadrant1Fill):R(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:((r=this.xyChart)==null?void 0:r.backgroundColor)||this.background,titleColor:((i=this.xyChart)==null?void 0:i.titleColor)||this.primaryTextColor,xAxisTitleColor:((s=this.xyChart)==null?void 0:s.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((a=this.xyChart)==null?void 0:a.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((o=this.xyChart)==null?void 0:o.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((n=this.xyChart)==null?void 0:n.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((l=this.xyChart)==null?void 0:l.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((c=this.xyChart)==null?void 0:c.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((h=this.xyChart)==null?void 0:h.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((d=this.xyChart)==null?void 0:d.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((p=this.xyChart)==null?void 0:p.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?R(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||x(this.primaryColor,{h:-30}),this.git4=this.git4||x(this.primaryColor,{h:-60}),this.git5=this.git5||x(this.primaryColor,{h:-90}),this.git6=this.git6||x(this.primaryColor,{h:60}),this.git7=this.git7||x(this.primaryColor,{h:120}),this.darkMode?(this.git0=P(this.git0,25),this.git1=P(this.git1,25),this.git2=P(this.git2,25),this.git3=P(this.git3,25),this.git4=P(this.git4,25),this.git5=P(this.git5,25),this.git6=P(this.git6,25),this.git7=P(this.git7,25)):(this.git0=R(this.git0,25),this.git1=R(this.git1,25),this.git2=R(this.git2,25),this.git3=R(this.git3,25),this.git4=R(this.git4,25),this.git5=R(this.git5,25),this.git6=R(this.git6,25),this.git7=R(this.git7,25)),this.gitInv0=this.gitInv0||L(this.git0),this.gitInv1=this.gitInv1||L(this.git1),this.gitInv2=this.gitInv2||L(this.git2),this.gitInv3=this.gitInv3||L(this.git3),this.gitInv4=this.gitInv4||L(this.git4),this.gitInv5=this.gitInv5||L(this.git5),this.gitInv6=this.gitInv6||L(this.git6),this.gitInv7=this.gitInv7||L(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||Oe,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ie}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},g(Kr,"Theme"),Kr),Km=g(e=>{const t=new Qm;return t.calculate(e),t},"getThemeVariables"),Jr,Jm=(Jr=class{constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#28253D",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=gt(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(){var a,o,n,l,c,h,d,p,u,f,m;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||gt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||gt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||gt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||gt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||L(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||L(this.tertiaryColor),this.lineColor=this.lineColor||L(this.background),this.arrowheadColor=this.arrowheadColor||L(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?R(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||R(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||L(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;const t="#ECECFE",r="#E9E9F1",i=x(t,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||i,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||r,this.sectionBkgColor2=this.sectionBkgColor2||t,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||t,this.activeTaskBorderColor=this.activeTaskBorderColor||t,this.activeTaskBkgColor=this.activeTaskBkgColor||P(t,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||"#f4a8ff",this.cScale1=this.cScale1||"#46ecd5",this.cScale2=this.cScale2||"#ffb86a",this.cScale3=this.cScale3||"#dab2ff",this.cScale4=this.cScale4||"#7bf1a8",this.cScale5=this.cScale5||"#c4b4ff",this.cScale6=this.cScale6||"#ffa2a2",this.cScale7=this.cScale7||"#ffdf20",this.cScale8=this.cScale8||"#a3b3ff",this.cScale9=this.cScale9||"#bbf451",this.cScale10=this.cScale10||"#74d4ff",this.cScale11=this.cScale11||"#ffa1ad";for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScaleInv"+y]=this["cScaleInv"+y]||L(this["cScale"+y]);for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this.darkMode?this["cScalePeer"+y]=this["cScalePeer"+y]||P(this["cScale"+y],10):this["cScalePeer"+y]=this["cScalePeer"+y]||R(this["cScale"+y],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScaleLabel"+y]=this["cScaleLabel"+y]||this.scaleLabelColor;const s=this.darkMode?-4:-1;for(let y=0;y<5;y++)this["surface"+y]=this["surface"+y]||x(this.mainBkg,{h:180,s:-15,l:s*(5+y*3)}),this["surfacePeer"+y]=this["surfacePeer"+y]||x(this.mainBkg,{h:180,s:-15,l:s*(8+y*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||r,this.fillType2=this.fillType2||x(t,{h:64}),this.fillType3=this.fillType3||x(r,{h:64}),this.fillType4=this.fillType4||x(t,{h:-64}),this.fillType5=this.fillType5||x(r,{h:-64}),this.fillType6=this.fillType6||x(t,{h:128}),this.fillType7=this.fillType7||x(r,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||r,this.pie3=this.pie3||i,this.pie4=this.pie4||x(t,{l:-10}),this.pie5=this.pie5||x(r,{l:-10}),this.pie6=this.pie6||x(i,{l:-10}),this.pie7=this.pie7||x(t,{h:60,l:-10}),this.pie8=this.pie8||x(t,{h:-60,l:-10}),this.pie9=this.pie9||x(t,{h:120,l:0}),this.pie10=this.pie10||x(t,{h:60,l:-20}),this.pie11=this.pie11||x(t,{h:-60,l:-20}),this.pie12=this.pie12||x(t,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||t,this.quadrant2Fill=this.quadrant2Fill||x(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||we(this.quadrant1Fill)?P(this.quadrant1Fill):R(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:((a=this.xyChart)==null?void 0:a.backgroundColor)||this.background,titleColor:((o=this.xyChart)==null?void 0:o.titleColor)||this.primaryTextColor,xAxisTitleColor:((n=this.xyChart)==null?void 0:n.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((l=this.xyChart)==null?void 0:l.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((c=this.xyChart)==null?void 0:c.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((h=this.xyChart)==null?void 0:h.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((d=this.xyChart)==null?void 0:d.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((p=this.xyChart)==null?void 0:p.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((u=this.xyChart)==null?void 0:u.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((f=this.xyChart)==null?void 0:f.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((m=this.xyChart)==null?void 0:m.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||t,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?R(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||t,this.git1=this.git1||r,this.git2=this.git2||i,this.git3=this.git3||x(t,{h:-30}),this.git4=this.git4||x(t,{h:-60}),this.git5=this.git5||x(t,{h:-90}),this.git6=this.git6||x(t,{h:60}),this.git7=this.git7||x(t,{h:120}),this.darkMode?(this.git0=P(this.git0,25),this.git1=P(this.git1,25),this.git2=P(this.git2,25),this.git3=P(this.git3,25),this.git4=P(this.git4,25),this.git5=P(this.git5,25),this.git6=P(this.git6,25),this.git7=P(this.git7,25)):(this.git0=R(this.git0,25),this.git1=R(this.git1,25),this.git2=R(this.git2,25),this.git3=R(this.git3,25),this.git4=R(this.git4,25),this.git5=R(this.git5,25),this.git6=R(this.git6,25),this.git7=R(this.git7,25)),this.gitInv0=this.gitInv0||L(this.git0),this.gitInv1=this.gitInv1||L(this.git1),this.gitInv2=this.gitInv2||L(this.git2),this.gitInv3=this.gitInv3||L(this.git3),this.gitInv4=this.gitInv4||L(this.git4),this.gitInv5=this.gitInv5||L(this.git5),this.gitInv6=this.gitInv6||L(this.git6),this.gitInv7=this.gitInv7||L(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||Oe,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ie}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},g(Jr,"Theme"),Jr),ty=g(e=>{const t=new Jm;return t.calculate(e),t},"getThemeVariables"),ti,ey=(ti=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=P(this.primaryColor,16),this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=L(this.background),this.secondaryBorderColor=gt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=gt(this.tertiaryColor,this.darkMode),this.primaryTextColor=L(this.primaryColor),this.secondaryTextColor=L(this.secondaryColor),this.tertiaryTextColor=L(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=P(L("#323D47"),10),this.border1="#ccc",this.border2=tr(255,255,255,.25),this.arrowheadColor=L(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(){var r,i,s,a,o,n,l,c,h,d,p;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||gt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||gt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||gt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||gt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||L(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||L(this.tertiaryColor),this.lineColor=this.lineColor||L(this.background),this.arrowheadColor=this.arrowheadColor||L(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?R(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||R(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||L(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||P(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 u=0;u<this.THEME_COLOR_LIMIT;u++)this["cScaleInv"+u]=this["cScaleInv"+u]||L(this["cScale"+u]);for(let u=0;u<this.THEME_COLOR_LIMIT;u++)this.darkMode?this["cScalePeer"+u]=this["cScalePeer"+u]||P(this["cScale"+u],10):this["cScalePeer"+u]=this["cScalePeer"+u]||R(this["cScale"+u],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let u=0;u<this.THEME_COLOR_LIMIT;u++)this["cScaleLabel"+u]=R(this["cScale"+u],75);const t=this.darkMode?-4:-1;for(let u=0;u<5;u++)this["surface"+u]=this["surface"+u]||x(this.mainBkg,{h:180,s:-15,l:t*(5+u*3)}),this["surfacePeer"+u]=this["surfacePeer"+u]||x(this.mainBkg,{h:180,s:-15,l:t*(8+u*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||x(this.primaryColor,{h:64}),this.fillType3=this.fillType3||x(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||x(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||x(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||x(this.primaryColor,{h:128}),this.fillType7=this.fillType7||x(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||x(this.primaryColor,{l:-10}),this.pie5=this.pie5||x(this.secondaryColor,{l:-10}),this.pie6=this.pie6||x(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||x(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||x(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||x(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||x(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||x(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||x(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||x(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||we(this.quadrant1Fill)?P(this.quadrant1Fill):R(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:((r=this.xyChart)==null?void 0:r.backgroundColor)||this.background,titleColor:((i=this.xyChart)==null?void 0:i.titleColor)||this.primaryTextColor,xAxisTitleColor:((s=this.xyChart)==null?void 0:s.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((a=this.xyChart)==null?void 0:a.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((o=this.xyChart)==null?void 0:o.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((n=this.xyChart)==null?void 0:n.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((l=this.xyChart)==null?void 0:l.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((c=this.xyChart)==null?void 0:c.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((h=this.xyChart)==null?void 0:h.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((d=this.xyChart)==null?void 0:d.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((p=this.xyChart)==null?void 0:p.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?R(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||x(this.primaryColor,{h:-30}),this.git4=this.git4||x(this.primaryColor,{h:-60}),this.git5=this.git5||x(this.primaryColor,{h:-90}),this.git6=this.git6||x(this.primaryColor,{h:60}),this.git7=this.git7||x(this.primaryColor,{h:120}),this.darkMode?(this.git0=P(this.git0,25),this.git1=P(this.git1,25),this.git2=P(this.git2,25),this.git3=P(this.git3,25),this.git4=P(this.git4,25),this.git5=P(this.git5,25),this.git6=P(this.git6,25),this.git7=P(this.git7,25)):(this.git0=R(this.git0,25),this.git1=R(this.git1,25),this.git2=R(this.git2,25),this.git3=R(this.git3,25),this.git4=R(this.git4,25),this.git5=R(this.git5,25),this.git6=R(this.git6,25),this.git7=R(this.git7,25)),this.gitInv0=this.gitInv0||L(this.git0),this.gitInv1=this.gitInv1||L(this.git1),this.gitInv2=this.gitInv2||L(this.git2),this.gitInv3=this.gitInv3||L(this.git3),this.gitInv4=this.gitInv4||L(this.git4),this.gitInv5=this.gitInv5||L(this.git5),this.gitInv6=this.gitInv6||L(this.git6),this.gitInv7=this.gitInv7||L(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||Oe,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ie}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},g(ti,"Theme"),ti),ry=g(e=>{const t=new ey;return t.calculate(e),t},"getThemeVariables"),We={base:{getThemeVariables:Dm},dark:{getThemeVariables:Rm},default:{getThemeVariables:Nm},forest:{getThemeVariables:zm},neutral:{getThemeVariables:Ym},neo:{getThemeVariables:jm},"neo-dark":{getThemeVariables:Xm},redux:{getThemeVariables:Zm},"redux-dark":{getThemeVariables:Km},"redux-color":{getThemeVariables:ty},"redux-dark-color":{getThemeVariables:ry}},Yt={flowchart:{useMaxWidth:!0,titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:null,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,defaultRenderer:"dagre-wrapper",wrappingWidth:200,inheritDir:!1},swimlane:{useMaxWidth:!0,lineHops:"arc",ignoreCrossLaneEdges:!0,optimizeRanksByCrossings:!0,automaticLaneOrdering:!1},sequence:{useMaxWidth:!0,hideUnusedParticipants:!1,activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",mirrorActors:!0,forceMenus:!1,bottomMarginAdj:1,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:400,noteFontSize:14,noteFontFamily:'"trebuchet ms", verdana, arial, sans-serif',noteFontWeight:400,noteAlign:"center",messageFontSize:16,messageFontFamily:'"trebuchet ms", verdana, arial, sans-serif',messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20},gantt:{useMaxWidth:!0,titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d",topAxis:!1,displayMode:"",weekday:"sunday"},journey:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,maxLabelWidth:360,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],titleColor:"",titleFontFamily:'"trebuchet ms", verdana, arial, sans-serif',titleFontSize:"4ex"},class:{useMaxWidth:!0,titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,defaultRenderer:"dagre-wrapper",htmlLabels:!1,hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},state:{useMaxWidth:!0,titleTopMargin:25,dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:"20",compositTitleSize:35,radius:5,defaultRenderer:"dagre-wrapper"},er:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,nodeSpacing:140,rankSpacing:80,stroke:"gray",fill:"honeydew",fontSize:12},pie:{useMaxWidth:!0,textPosition:.75,donutHole:0,legendPosition:"right",highlightSlice:""},quadrantChart:{useMaxWidth:!0,chartWidth:500,chartHeight:500,titleFontSize:20,titlePadding:10,quadrantPadding:5,xAxisLabelPadding:5,yAxisLabelPadding:5,xAxisLabelFontSize:16,yAxisLabelFontSize:16,quadrantLabelFontSize:16,quadrantTextTopPadding:5,pointTextPadding:5,pointLabelFontSize:12,pointRadius:5,xAxisPosition:"top",yAxisPosition:"left",quadrantInternalBorderStrokeWidth:1,quadrantExternalBorderStrokeWidth:2},xyChart:{useMaxWidth:!0,width:700,height:500,titleFontSize:20,titlePadding:10,showDataLabel:!1,showDataLabelOutsideBar:!1,showTitle:!0,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},vh={...Yt,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF",forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES"},themeCSS:void 0,themeVariables:We.default.getThemeVariables(),sequence:{...Yt.sequence,messageFont:g(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:g(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:g(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},gantt:{...Yt.gantt,tickInterval:void 0,useWidth:void 0},c4:{...Yt.c4,useWidth:void 0,personFont:g(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...Yt.flowchart,inheritDir:!1},external_personFont:g(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:g(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:g(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:g(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:g(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:g(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:g(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:g(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:g(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:g(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:g(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:g(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:g(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:g(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:g(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:g(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:g(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:g(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:g(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:g(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:g(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...Yt.pie,useWidth:984},xyChart:{...Yt.xyChart,useWidth:void 0},requirement:{...Yt.requirement,useWidth:void 0},packet:{...Yt.packet},eventmodeling:{...Yt.eventmodeling},treeView:{...Yt.treeView,useWidth:void 0},radar:{...Yt.radar},railroad:{...Yt.railroad,fontSize:void 0,fontFamily:void 0,terminalFill:void 0,terminalStroke:void 0,terminalTextColor:void 0,nonTerminalFill:void 0,nonTerminalStroke:void 0,nonTerminalTextColor:void 0,lineColor:void 0,markerFill:void 0,commentFill:void 0,commentStroke:void 0,commentTextColor:void 0,specialFill:void 0,specialStroke:void 0,ruleNameColor:void 0},ishikawa:{...Yt.ishikawa},sankey:{...Yt.sankey,nodeColors:void 0},treemap:{useMaxWidth:!0,padding:10,diagramPadding:8,showValues:!0,nodeWidth:100,nodeHeight:40,borderWidth:1,valueFontSize:12,labelFontSize:14,valueFormat:","},venn:{...Yt.venn},cynefin:{...Yt.cynefin}},Lh=g((e,t="")=>Object.keys(e).reduce((r,i)=>Array.isArray(e[i])?r:typeof e[i]=="object"&&e[i]!==null?[...r,t+i,...Lh(e[i],"")]:[...r,t+i],[]),"keyify"),iy=new Set(Lh(vh,"")),Fh=vh,sy={nodeColors:/^#[\da-f]{3,8}$|^rgb\([\d\s%,.]+\)$|^hsl\([\d\s%,.]+\)$|^[a-z]+$/i,filenameIcons:/^[\w-]+(?::[\w-]+)?$/,extensionIcons:/^[\w-]+(?::[\w-]+)?$/},ay=g((e,t)=>{for(const r of Object.keys(e)){const i=e[r];(r.startsWith("__")||r.includes("proto")||r.includes("constr")||typeof i!="string"||!t.test(i))&&(H.debug("sanitize deleting dictionary entry:",r,i),delete e[r])}},"sanitizeDictionaryConfig"),Bs=g(e=>{if(H.debug("sanitizeDirective called with",e),!(typeof e!="object"||e==null)){if(Array.isArray(e)){e.forEach(t=>Bs(t));return}for(const t of Object.keys(e)){if(H.debug("Checking key",t),t.startsWith("__")||t.includes("proto")||t.includes("constr")||!iy.has(t)||e[t]==null){H.debug("sanitize deleting key: ",t),delete e[t];continue}if(typeof e[t]=="object"){const i=sy[t];i?ay(e[t],i):(H.debug("sanitizing object",t),Bs(e[t]));continue}const r=["themeCSS","fontFamily","altFontFamily"];for(const i of r)t.includes(i)&&(H.debug("sanitizing css option",t),e[t]=Ah(e[t]))}if(e.themeVariables)for(const t of Object.keys(e.themeVariables)){const r=e.themeVariables[t];r!=null&&r.match&&!r.match(/^[\d "#%(),.;A-Za-z]+$/)&&(e.themeVariables[t]="")}H.debug("After sanitization",e)}},"sanitizeDirective"),Ah=g(e=>{let t=0,r=0;for(const i of e){if(t<r)return"{ /* ERROR: Unbalanced CSS */ }";i==="{"?t++:i==="}"&&r++}return t!==r?"{ /* ERROR: Unbalanced CSS */ }":e},"sanitizeCss"),ai=Object.freeze(Fh),De=g(e=>!(e===!1||["false","null","0"].includes(String(e).trim().toLowerCase())),"evaluate"),ne=qt({},ai),_s,Cr=[],Ai=qt({},ai),Zs=g((e,t)=>{let r=qt({},e),i={};for(const s of t)$h(s),i=qt(i,s);if(r=qt(r,i),i.theme&&i.theme in We){const s=qt({},_s),a=qt(s.themeVariables||{},i.themeVariables);r.theme&&r.theme in We&&(r.themeVariables=We[r.theme].getThemeVariables(a))}return Ai=r,Ih(Ai),Ai},"updateCurrentConfig"),oy=g(e=>(ne=qt({},ai),ne=qt(ne,e),e.theme&&We[e.theme]&&(ne.themeVariables=We[e.theme].getThemeVariables(e.themeVariables)),Zs(ne,Cr),ne),"setSiteConfig"),ny=g(e=>{_s=qt({},e)},"saveConfigFromInitialize"),ly=g(e=>(ne=qt(ne,e),Zs(ne,Cr),ne),"updateSiteConfig"),Eh=g(()=>qt({},ne),"getSiteConfig"),Mh=g(e=>(Ih(e),qt(Ai,e),Mt()),"setConfig"),Mt=g(()=>qt({},Ai),"getConfig"),$h=g(e=>{e&&(["secure",...ne.secure??[]].forEach(t=>{Object.hasOwn(e,t)&&(H.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"&&$h(e[t])}))},"sanitize"),hy=g(e=>{var t;Bs(e),e.fontFamily&&!((t=e.themeVariables)!=null&&t.fontFamily)&&(e.themeVariables={...e.themeVariables,fontFamily:e.fontFamily}),Cr.push(e),Zs(ne,Cr)},"addDirective"),vs=g((e=ne)=>{Cr=[],Zs(e,Cr)},"reset"),cy={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead.",FLOWCHART_HTML_LABELS_DEPRECATED:"flowchart.htmlLabels is deprecated. Please use global htmlLabels instead."},xl={},Oh=g(e=>{xl[e]||(H.warn(cy[e]),xl[e]=!0)},"issueWarning"),Ih=g(e=>{e&&(e.lazyLoadedDiagrams||e.loadExternalDiagramsAtStartup)&&Oh("LAZY_LOAD_DEPRECATED")},"checkConfig"),mS=g(()=>{let e={};_s&&(e=qt(e,_s));for(const t of Cr)e=qt(e,t);return e},"getUserDefinedConfig"),se=g(e=>{var t,r;return((t=e.flowchart)==null?void 0:t.htmlLabels)!=null&&Oh("FLOWCHART_HTML_LABELS_DEPRECATED"),De(e.htmlLabels??((r=e.flowchart)==null?void 0:r.htmlLabels)??!0)},"getEffectiveHtmlLabels"),Dh=/^([^\S\n\r]*)-{3}\s*[\n\r](.*?)[\n\r]\1-{3}\s*[\n\r]+/s,Ei=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,dy=/\s*%%.*\n/gm,ei,Ph=(ei=class extends Error{constructor(t){super(t),this.name="UnknownDiagramError"}},g(ei,"UnknownDiagramError"),ei),xr={},zo=g(function(e,t){e=e.replace(Dh,"").replace(Ei,"").replace(dy,`
5
+ `);for(const[r,{detector:i}]of Object.entries(xr))if(i(e,t))return r;throw new Ph(`No diagram type detected matching given configuration for text: ${e}`)},"detectType"),Za=g((...e)=>{for(const{id:t,detector:r,loader:i}of e)Rh(t,r,i)},"registerLazyLoadedDiagrams"),Rh=g((e,t,r)=>{xr[e]&&H.warn(`Detector with key ${e} already exists. Overwriting.`),xr[e]={detector:t,loader:r},H.debug(`Detector with key ${e} added${r?" with loader":""}`)},"addDetector"),uy=g(e=>xr[e].loader,"getDiagramLoader"),Hi=/<br\s*\/?>/gi,py=g(e=>e?Wh(e).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),gy=(()=>{let e=!1;return()=>{e||(qh(),e=!0)}})();function qh(){const e="data-temp-href-target";si.addHook("beforeSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute("target")&&t.setAttribute(e,t.getAttribute("target")??"")}),si.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"))})}g(qh,"setupDompurifyHooks");var Nh=g(e=>(gy(),si.sanitize(e)),"removeScript"),bl=g((e,t)=>{if(se(t)){const r=t.securityLevel;r==="antiscript"||r==="strict"||r==="sandbox"?e=Nh(e):r!=="loose"&&(e=Wh(e),e=e.replace(/</g,"&lt;").replace(/>/g,"&gt;"),e=e.replace(/=/g,"&equals;"),e=Cy(e))}return e},"sanitizeMore"),Se=g((e,t)=>e&&(t.dompurifyConfig?e=si.sanitize(bl(e,t),t.dompurifyConfig).toString():e=si.sanitize(bl(e,t),{FORBID_TAGS:["style"]}).toString(),e),"sanitizeText"),fy=g((e,t)=>typeof e=="string"?Se(e,t):e.flat().map(r=>Se(r,t)),"sanitizeTextOrArray"),my=g(e=>Hi.test(e),"hasBreaks"),yy=g(e=>e.split(Hi),"splitBreaks"),Cy=g(e=>e.replace(/#br#/g,"<br/>"),"placeholderToBreak"),Wh=g(e=>e.replace(Hi,"#br#"),"breakToPlaceholder"),xy=g(e=>{let t="";return e&&(t=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,t=CSS.escape(t)),t},"getUrl"),by=g(function(...e){const t=e.filter(r=>!isNaN(r));return Math.max(...t)},"getMax"),ky=g(function(...e){const t=e.filter(r=>!isNaN(r));return Math.min(...t)},"getMin"),kl=g(function(e){const t=e.split(/(,)/),r=[];for(let i=0;i<t.length;i++){let s=t[i];if(s===","&&i>0&&i+1<t.length){const a=t[i-1],o=t[i+1];Ty(a,o)&&(s=a+","+o,i++,r.pop())}r.push(Sy(s))}return r.join("")},"parseGenericTypes"),Qa=g((e,t)=>Math.max(0,e.split(t).length-1),"countOccurrence"),Ty=g((e,t)=>{const r=Qa(e,"~"),i=Qa(t,"~");return r===1&&i===1},"shouldCombineSets"),Sy=g(e=>{const t=Qa(e,"~");let r=!1;if(t<=1)return e;t%2!==0&&e.startsWith("~")&&(e=e.substring(1),r=!0);const i=[...e];let s=i.indexOf("~"),a=i.lastIndexOf("~");for(;s!==-1&&a!==-1&&s!==a;)i[s]="<",i[a]=">",s=i.indexOf("~"),a=i.lastIndexOf("~");return r&&i.unshift("~"),i.join("")},"processSet"),Tl=g(()=>window.MathMLElement!==void 0,"isMathMLSupported"),Ka=/\$\$(.*?)\$\$/g,Ii=g(e=>{var t;return(((t=e.match(Ka))==null?void 0:t.length)??0)>0},"hasKatex"),yS=g(async(e,t)=>{const r=document.createElement("div");r.innerHTML=await zh(e,t),r.id="katex-temp",r.style.visibility="hidden",r.style.position="absolute",r.style.top="0";const i=document.querySelector("body");i==null||i.insertAdjacentElement("beforeend",r);const s={width:r.clientWidth,height:r.clientHeight};return r.remove(),s},"calculateMathMLDimensions"),wy=g(async(e,t)=>{if(!Ii(e))return e;if(!(Tl()||t.legacyMathML||t.forceLegacyMathML))return e.replace(Ka,"MathML is unsupported in this environment.");{const{default:r}=await Ct(async()=>{const{default:s}=await import("./katex-C5jXJg4s.js");return{default:s}},[],import.meta.url),i=t.forceLegacyMathML||!Tl()&&t.legacyMathML?"htmlAndMathml":"mathml";return e.split(Hi).map(s=>Ii(s)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${s}</div>`:`<div>${s}</div>`).join("").replace(Ka,(s,a)=>r.renderToString(a,{throwOnError:!0,displayMode:!0,output:i}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))}},"renderKatexUnsanitized"),zh=g(async(e,t)=>Se(await wy(e,t),t),"renderKatexSanitized"),Yi={getRows:py,sanitizeText:Se,sanitizeTextOrArray:fy,hasBreaks:my,splitBreaks:yy,lineBreakRegex:Hi,removeScript:Nh,getUrl:xy,evaluate:De,getMax:by,getMin:ky},By=g(function(e,t){for(let r of t)e.attr(r[0],r[1])},"d3Attrs"),_y=g(function(e,t,r){let i=new Map;return r?(i.set("width","100%"),i.set("style",`max-width: ${t}px;`)):(i.set("height",e),i.set("width",t)),i},"calculateSvgSizeAttrs"),Hh=g(function(e,t,r,i){const s=_y(t,r,i);By(e,s)},"configureSvgSize"),vy=g(function(e,t,r,i){const s=t.node().getBBox(),a=s.width,o=s.height;H.info(`SVG bounds: ${a}x${o}`,s);let n=0,l=0;H.info(`Graph bounds: ${n}x${l}`,e),n=a+r*2,l=o+r*2,H.info(`Calculated bounds: ${n}x${l}`),Hh(t,l,n,i);const c=`${s.x-r} ${s.y-r} ${s.width+2*r} ${s.height+2*r}`;t.attr("viewBox",c)},"setupGraphViewbox"),ms={};function Ja(e){return[...e.cssRules].map(t=>t.cssText).join(`
6
+ `)}g(Ja,"cssStyleSheetToString");var Ly=g((e,t,r,i)=>{let s="";return e in ms&&ms[e]?s=ms[e]({...r,svgId:i}):H.warn(`No theme found for ${e}`),` & {
7
+ font-family: ${r.fontFamily};
8
+ font-size: ${r.fontSize};
9
+ fill: ${r.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: ${r.errorBkgColor};
37
+ }
38
+ & .error-text {
39
+ fill: ${r.errorTextColor};
40
+ stroke: ${r.errorTextColor};
41
+ }
42
+
43
+ & .edge-thickness-normal {
44
+ stroke-width: ${r.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: ${r.lineColor};
65
+ stroke: ${r.lineColor};
66
+ }
67
+ & .marker.cross {
68
+ stroke: ${r.lineColor};
69
+ }
70
+
71
+ & svg {
72
+ font-family: ${r.fontFamily};
73
+ font-size: ${r.fontSize};
74
+ }
75
+ & p {
76
+ margin: 0
77
+ }
78
+
79
+ ${s}
80
+ .node .neo-node {
81
+ stroke: ${r.nodeBorder};
82
+ }
83
+
84
+ [data-look="neo"].node rect, [data-look="neo"].cluster rect, [data-look="neo"].node polygon {
85
+ stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
86
+ filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-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: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
95
+ stroke-width: ${r.strokeWidth??1}px;
96
+ }
97
+
98
+ [data-look="neo"].node .outer-path {
99
+ filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
100
+ }
101
+
102
+ [data-look="neo"].node .neo-line path {
103
+ stroke: ${r.nodeBorder};
104
+ filter: none;
105
+ }
106
+
107
+ [data-look="neo"].node circle{
108
+ stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
109
+ filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-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: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
118
+ filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
119
+ }
120
+
121
+ [data-look="neo"].icon-shape .icon-neo path {
122
+ stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
123
+ filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
124
+ }
125
+
126
+ ${t}
127
+ `},"getStyles"),Fy=g((e,t)=>{t!==void 0&&(ms[e]=t)},"addStylesForDiagram"),Ay=Ly,Yh={};Uf(Yh,{clear:()=>Ey,getAccDescription:()=>Iy,getAccTitle:()=>$y,getDiagramTitle:()=>Py,setAccDescription:()=>Oy,setAccTitle:()=>My,setDiagramTitle:()=>Dy});var Ho="",Yo="",Uo="",jo=g(e=>Se(e,Mt()),"sanitizeText"),Ey=g(()=>{Ho="",Uo="",Yo=""},"clear"),My=g(e=>{Ho=jo(e).replace(/^\s+/g,"")},"setAccTitle"),$y=g(()=>Ho,"getAccTitle"),Oy=g(e=>{Uo=jo(e).replace(/\n\s+/g,`
128
+ `)},"setAccDescription"),Iy=g(()=>Uo,"getAccDescription"),Dy=g(e=>{Yo=jo(e)},"setDiagramTitle"),Py=g(()=>Yo,"getDiagramTitle"),Sl=H,Ry=Wo,wt=Mt,CS=Mh,xS=ai,Go=g(e=>Se(e,wt()),"sanitizeText"),qy=vy,Ny=g(()=>Yh,"getCommonDb"),Ls={},Fs=g((e,t,r)=>{var i;Ls[e]&&Sl.warn(`Diagram with id ${e} already registered. Overwriting.`),Ls[e]=t,r&&Rh(e,r),Fy(e,t.styles),(i=t.injectUtils)==null||i.call(t,Sl,Ry,wt,Go,qy,Ny(),()=>{})},"registerDiagram"),to=g(e=>{if(e in Ls)return Ls[e];throw new Wy(e)},"getDiagram"),ri,Wy=(ri=class extends Error{constructor(t){super(`Diagram ${t} not found.`)}},g(ri,"DiagramNotFoundError"),ri);const eo=Math.PI,ro=2*eo,ur=1e-6,zy=ro-ur;function Uh(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function Hy(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return Uh;const r=10**t;return function(i){this._+=i[0];for(let s=1,a=i.length;s<a;++s)this._+=Math.round(arguments[s]*r)/r+i[s]}}class Yy{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?Uh:Hy(t)}moveTo(t,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,r){this._append`L${this._x1=+t},${this._y1=+r}`}quadraticCurveTo(t,r,i,s){this._append`Q${+t},${+r},${this._x1=+i},${this._y1=+s}`}bezierCurveTo(t,r,i,s,a,o){this._append`C${+t},${+r},${+i},${+s},${this._x1=+a},${this._y1=+o}`}arcTo(t,r,i,s,a){if(t=+t,r=+r,i=+i,s=+s,a=+a,a<0)throw new Error(`negative radius: ${a}`);let o=this._x1,n=this._y1,l=i-t,c=s-r,h=o-t,d=n-r,p=h*h+d*d;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(p>ur)if(!(Math.abs(d*l-c*h)>ur)||!a)this._append`L${this._x1=t},${this._y1=r}`;else{let u=i-o,f=s-n,m=l*l+c*c,y=u*u+f*f,C=Math.sqrt(m),b=Math.sqrt(p),k=a*Math.tan((eo-Math.acos((m+p-y)/(2*C*b)))/2),w=k/b,S=k/C;Math.abs(w-1)>ur&&this._append`L${t+w*h},${r+w*d}`,this._append`A${a},${a},0,0,${+(d*u>h*f)},${this._x1=t+S*l},${this._y1=r+S*c}`}}arc(t,r,i,s,a,o){if(t=+t,r=+r,i=+i,o=!!o,i<0)throw new Error(`negative radius: ${i}`);let n=i*Math.cos(s),l=i*Math.sin(s),c=t+n,h=r+l,d=1^o,p=o?s-a:a-s;this._x1===null?this._append`M${c},${h}`:(Math.abs(this._x1-c)>ur||Math.abs(this._y1-h)>ur)&&this._append`L${c},${h}`,i&&(p<0&&(p=p%ro+ro),p>zy?this._append`A${i},${i},0,1,${d},${t-n},${r-l}A${i},${i},0,1,${d},${this._x1=c},${this._y1=h}`:p>ur&&this._append`A${i},${i},0,${+(p>=eo)},${d},${this._x1=t+i*Math.cos(a)},${this._y1=r+i*Math.sin(a)}`)}rect(t,r,i,s){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${i=+i}v${+s}h${-i}Z`}toString(){return this._}}function $r(e){return function(){return e}}const bS=Math.abs,kS=Math.atan2,TS=Math.cos,SS=Math.max,wS=Math.min,BS=Math.sin,_S=Math.sqrt,wl=1e-12,Xo=Math.PI,Bl=Xo/2,vS=2*Xo;function LS(e){return e>1?0:e<-1?Xo:Math.acos(e)}function FS(e){return e>=1?Bl:e<=-1?-Bl:Math.asin(e)}function Uy(e){let t=3;return e.digits=function(r){if(!arguments.length)return t;if(r==null)t=null;else{const i=Math.floor(r);if(!(i>=0))throw new RangeError(`invalid digits: ${r}`);t=i}return e},()=>new Yy(t)}function jy(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function jh(e){this._context=e}jh.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function Mi(e){return new jh(e)}function Gy(e){return e[0]}function Xy(e){return e[1]}function Vy(e,t){var r=$r(!0),i=null,s=Mi,a=null,o=Uy(n);e=typeof e=="function"?e:e===void 0?Gy:$r(e),t=typeof t=="function"?t:t===void 0?Xy:$r(t);function n(l){var c,h=(l=jy(l)).length,d,p=!1,u;for(i==null&&(a=s(u=o())),c=0;c<=h;++c)!(c<h&&r(d=l[c],c,l))===p&&((p=!p)?a.lineStart():a.lineEnd()),p&&a.point(+e(d,c,l),+t(d,c,l));if(u)return a=null,u+""||null}return n.x=function(l){return arguments.length?(e=typeof l=="function"?l:$r(+l),n):e},n.y=function(l){return arguments.length?(t=typeof l=="function"?l:$r(+l),n):t},n.defined=function(l){return arguments.length?(r=typeof l=="function"?l:$r(!!l),n):r},n.curve=function(l){return arguments.length?(s=l,i!=null&&(a=s(i)),n):s},n.context=function(l){return arguments.length?(l==null?i=a=null:a=s(i=l),n):i},n}class Gh{constructor(t,r){this._context=t,this._x=r}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,r){switch(t=+t,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,r):this._context.moveTo(t,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,r,t,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,t,this._y0,t,r);break}}this._x0=t,this._y0=r}}function Xh(e){return new Gh(e,!0)}function Vh(e){return new Gh(e,!1)}function rr(){}function As(e,t,r){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+r)/6)}function Qs(e){this._context=e}Qs.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:As(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:As(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function io(e){return new Qs(e)}function Zh(e){this._context=e}Zh.prototype={areaStart:rr,areaEnd:rr,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:As(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Zy(e){return new Zh(e)}function Qh(e){this._context=e}Qh.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+e)/6,i=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,i):this._context.moveTo(r,i);break;case 3:this._point=4;default:As(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Qy(e){return new Qh(e)}function Kh(e,t){this._basis=new Qs(e),this._beta=t}Kh.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,r=e.length-1;if(r>0)for(var i=e[0],s=t[0],a=e[r]-i,o=t[r]-s,n=-1,l;++n<=r;)l=n/r,this._basis.point(this._beta*e[n]+(1-this._beta)*(i+l*a),this._beta*t[n]+(1-this._beta)*(s+l*o));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};const Ky=(function e(t){function r(i){return t===1?new Qs(i):new Kh(i,t)}return r.beta=function(i){return e(+i)},r})(.85);function Es(e,t,r){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-r),e._x2,e._y2)}function Vo(e,t){this._context=e,this._k=(1-t)/6}Vo.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:Es(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:Es(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Jh=(function e(t){function r(i){return new Vo(i,t)}return r.tension=function(i){return e(+i)},r})(0);function Zo(e,t){this._context=e,this._k=(1-t)/6}Zo.prototype={areaStart:rr,areaEnd:rr,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:Es(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Jy=(function e(t){function r(i){return new Zo(i,t)}return r.tension=function(i){return e(+i)},r})(0);function Qo(e,t){this._context=e,this._k=(1-t)/6}Qo.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:Es(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const tC=(function e(t){function r(i){return new Qo(i,t)}return r.tension=function(i){return e(+i)},r})(0);function Ko(e,t,r){var i=e._x1,s=e._y1,a=e._x2,o=e._y2;if(e._l01_a>wl){var n=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,l=3*e._l01_a*(e._l01_a+e._l12_a);i=(i*n-e._x0*e._l12_2a+e._x2*e._l01_2a)/l,s=(s*n-e._y0*e._l12_2a+e._y2*e._l01_2a)/l}if(e._l23_a>wl){var c=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,h=3*e._l23_a*(e._l23_a+e._l12_a);a=(a*c+e._x1*e._l23_2a-t*e._l12_2a)/h,o=(o*c+e._y1*e._l23_2a-r*e._l12_2a)/h}e._context.bezierCurveTo(i,s,a,o,e._x2,e._y2)}function tc(e,t){this._context=e,this._alpha=t}tc.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:Ko(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const ec=(function e(t){function r(i){return t?new tc(i,t):new Vo(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function rc(e,t){this._context=e,this._alpha=t}rc.prototype={areaStart:rr,areaEnd:rr,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:Ko(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const eC=(function e(t){function r(i){return t?new rc(i,t):new Zo(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function ic(e,t){this._context=e,this._alpha=t}ic.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Ko(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const rC=(function e(t){function r(i){return t?new ic(i,t):new Qo(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function sc(e){this._context=e}sc.prototype={areaStart:rr,areaEnd:rr,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 iC(e){return new sc(e)}function _l(e){return e<0?-1:1}function vl(e,t,r){var i=e._x1-e._x0,s=t-e._x1,a=(e._y1-e._y0)/(i||s<0&&-0),o=(r-e._y1)/(s||i<0&&-0),n=(a*s+o*i)/(i+s);return(_l(a)+_l(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(n))||0}function Ll(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function Ia(e,t,r){var i=e._x0,s=e._y0,a=e._x1,o=e._y1,n=(a-i)/3;e._context.bezierCurveTo(i+n,s+n*t,a-n,o-n*r,a,o)}function Ms(e){this._context=e}Ms.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Ia(this,this._t0,Ll(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var r=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,Ia(this,Ll(this,r=vl(this,e,t)),r);break;default:Ia(this,this._t0,r=vl(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function ac(e){this._context=new oc(e)}(ac.prototype=Object.create(Ms.prototype)).point=function(e,t){Ms.prototype.point.call(this,t,e)};function oc(e){this._context=e}oc.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,r,i,s,a){this._context.bezierCurveTo(t,e,i,r,a,s)}};function nc(e){return new Ms(e)}function lc(e){return new ac(e)}function hc(e){this._context=e}hc.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),r===2)this._context.lineTo(e[1],t[1]);else for(var i=Fl(e),s=Fl(t),a=0,o=1;o<r;++a,++o)this._context.bezierCurveTo(i[0][a],s[0][a],i[1][a],s[1][a],e[o],t[o]);(this._line||this._line!==0&&r===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function Fl(e){var t,r=e.length-1,i,s=new Array(r),a=new Array(r),o=new Array(r);for(s[0]=0,a[0]=2,o[0]=e[0]+2*e[1],t=1;t<r-1;++t)s[t]=1,a[t]=4,o[t]=4*e[t]+2*e[t+1];for(s[r-1]=2,a[r-1]=7,o[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)i=s[t]/a[t-1],a[t]-=i,o[t]-=i*o[t-1];for(s[r-1]=o[r-1]/a[r-1],t=r-2;t>=0;--t)s[t]=(o[t]-s[t+1])/a[t];for(a[r-1]=(e[r]+s[r-1])/2,t=0;t<r-1;++t)a[t]=2*e[t+1]-s[t+1];return[s,a]}function cc(e){return new hc(e)}function Ks(e,t){this._context=e,this._t=t}Ks.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}break}}this._x=e,this._y=t}};function dc(e){return new Ks(e,.5)}function uc(e){return new Ks(e,0)}function pc(e){return new Ks(e,1)}var sC=g(e=>{var s;const{securityLevel:t}=wt();let r=xt("body");if(t==="sandbox"){const o=((s=xt(`#i${e}`).node())==null?void 0:s.contentDocument)??document;r=xt(o.body)}return r.select(`#${e}`)},"selectSvgElement");function Jo(e){return typeof e>"u"||e===null}g(Jo,"isNothing");function gc(e){return typeof e=="object"&&e!==null}g(gc,"isObject");function fc(e){return Array.isArray(e)?e:Jo(e)?[]:[e]}g(fc,"toArray");function mc(e,t){var r,i,s,a;if(t)for(a=Object.keys(t),r=0,i=a.length;r<i;r+=1)s=a[r],e[s]=t[s];return e}g(mc,"extend");function yc(e,t){var r="",i;for(i=0;i<t;i+=1)r+=e;return r}g(yc,"repeat");function Cc(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}g(Cc,"isNegativeZero");var aC=Jo,oC=gc,nC=fc,lC=yc,hC=Cc,cC=mc,Nt={isNothing:aC,isObject:oC,toArray:nC,repeat:lC,isNegativeZero:hC,extend:cC};function tn(e,t){var r="",i=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(r+='in "'+e.mark.name+'" '),r+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!t&&e.mark.snippet&&(r+=`
129
+
130
+ `+e.mark.snippet),i+" "+r):i}g(tn,"formatError");function oi(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=tn(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}g(oi,"YAMLException$1");oi.prototype=Object.create(Error.prototype);oi.prototype.constructor=oi;oi.prototype.toString=g(function(t){return this.name+": "+tn(this,t)},"toString");var le=oi;function ys(e,t,r,i,s){var a="",o="",n=Math.floor(s/2)-1;return i-t>n&&(a=" ... ",t=i-n+a.length),r-i>n&&(o=" ...",r=i+n-o.length),{str:a+e.slice(t,r).replace(/\t/g,"→")+o,pos:i-t+a.length}}g(ys,"getLine");function Cs(e,t){return Nt.repeat(" ",t-e.length)+e}g(Cs,"padStart");function xc(e,t){if(t=Object.create(t||null),!e.buffer)return null;t.maxLength||(t.maxLength=79),typeof t.indent!="number"&&(t.indent=1),typeof t.linesBefore!="number"&&(t.linesBefore=3),typeof t.linesAfter!="number"&&(t.linesAfter=2);for(var r=/\r?\n|\r|\0/g,i=[0],s=[],a,o=-1;a=r.exec(e.buffer);)s.push(a.index),i.push(a.index+a[0].length),e.position<=a.index&&o<0&&(o=i.length-2);o<0&&(o=i.length-1);var n="",l,c,h=Math.min(e.line+t.linesAfter,s.length).toString().length,d=t.maxLength-(t.indent+h+3);for(l=1;l<=t.linesBefore&&!(o-l<0);l++)c=ys(e.buffer,i[o-l],s[o-l],e.position-(i[o]-i[o-l]),d),n=Nt.repeat(" ",t.indent)+Cs((e.line-l+1).toString(),h)+" | "+c.str+`
131
+ `+n;for(c=ys(e.buffer,i[o],s[o],e.position,d),n+=Nt.repeat(" ",t.indent)+Cs((e.line+1).toString(),h)+" | "+c.str+`
132
+ `,n+=Nt.repeat("-",t.indent+h+3+c.pos)+`^
133
+ `,l=1;l<=t.linesAfter&&!(o+l>=s.length);l++)c=ys(e.buffer,i[o+l],s[o+l],e.position-(i[o]-i[o+l]),d),n+=Nt.repeat(" ",t.indent)+Cs((e.line+l+1).toString(),h)+" | "+c.str+`
134
+ `;return n.replace(/\n$/,"")}g(xc,"makeSnippet");var dC=xc,uC=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],pC=["scalar","sequence","mapping"];function bc(e){var t={};return e!==null&&Object.keys(e).forEach(function(r){e[r].forEach(function(i){t[String(i)]=r})}),t}g(bc,"compileStyleAliases");function kc(e,t){if(t=t||{},Object.keys(t).forEach(function(r){if(uC.indexOf(r)===-1)throw new le('Unknown option "'+r+'" is met in definition of "'+e+'" YAML type.')}),this.options=t,this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(r){return r},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.representName=t.representName||null,this.defaultStyle=t.defaultStyle||null,this.multi=t.multi||!1,this.styleAliases=bc(t.styleAliases||null),pC.indexOf(this.kind)===-1)throw new le('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}g(kc,"Type$1");var Kt=kc;function so(e,t){var r=[];return e[t].forEach(function(i){var s=r.length;r.forEach(function(a,o){a.tag===i.tag&&a.kind===i.kind&&a.multi===i.multi&&(s=o)}),r[s]=i}),r}g(so,"compileList");function Tc(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},t,r;function i(s){s.multi?(e.multi[s.kind].push(s),e.multi.fallback.push(s)):e[s.kind][s.tag]=e.fallback[s.tag]=s}for(g(i,"collectType"),t=0,r=arguments.length;t<r;t+=1)arguments[t].forEach(i);return e}g(Tc,"compileMap");function $s(e){return this.extend(e)}g($s,"Schema$1");$s.prototype.extend=g(function(t){var r=[],i=[];if(t instanceof Kt)i.push(t);else if(Array.isArray(t))i=i.concat(t);else if(t&&(Array.isArray(t.implicit)||Array.isArray(t.explicit)))t.implicit&&(r=r.concat(t.implicit)),t.explicit&&(i=i.concat(t.explicit));else throw new le("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");r.forEach(function(a){if(!(a instanceof Kt))throw new le("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(a.loadKind&&a.loadKind!=="scalar")throw new le("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(a.multi)throw new le("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),i.forEach(function(a){if(!(a instanceof Kt))throw new le("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var s=Object.create($s.prototype);return s.implicit=(this.implicit||[]).concat(r),s.explicit=(this.explicit||[]).concat(i),s.compiledImplicit=so(s,"implicit"),s.compiledExplicit=so(s,"explicit"),s.compiledTypeMap=Tc(s.compiledImplicit,s.compiledExplicit),s},"extend");var gC=$s,fC=new Kt("tag:yaml.org,2002:str",{kind:"scalar",construct:g(function(e){return e!==null?e:""},"construct")}),mC=new Kt("tag:yaml.org,2002:seq",{kind:"sequence",construct:g(function(e){return e!==null?e:[]},"construct")}),yC=new Kt("tag:yaml.org,2002:map",{kind:"mapping",construct:g(function(e){return e!==null?e:{}},"construct")}),CC=new gC({explicit:[fC,mC,yC]});function Sc(e){if(e===null)return!0;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}g(Sc,"resolveYamlNull");function wc(){return null}g(wc,"constructYamlNull");function Bc(e){return e===null}g(Bc,"isNull");var xC=new Kt("tag:yaml.org,2002:null",{kind:"scalar",resolve:Sc,construct:wc,predicate:Bc,represent:{canonical:g(function(){return"~"},"canonical"),lowercase:g(function(){return"null"},"lowercase"),uppercase:g(function(){return"NULL"},"uppercase"),camelcase:g(function(){return"Null"},"camelcase"),empty:g(function(){return""},"empty")},defaultStyle:"lowercase"});function _c(e){if(e===null)return!1;var t=e.length;return t===4&&(e==="true"||e==="True"||e==="TRUE")||t===5&&(e==="false"||e==="False"||e==="FALSE")}g(_c,"resolveYamlBoolean");function vc(e){return e==="true"||e==="True"||e==="TRUE"}g(vc,"constructYamlBoolean");function Lc(e){return Object.prototype.toString.call(e)==="[object Boolean]"}g(Lc,"isBoolean");var bC=new Kt("tag:yaml.org,2002:bool",{kind:"scalar",resolve:_c,construct:vc,predicate:Lc,represent:{lowercase:g(function(e){return e?"true":"false"},"lowercase"),uppercase:g(function(e){return e?"TRUE":"FALSE"},"uppercase"),camelcase:g(function(e){return e?"True":"False"},"camelcase")},defaultStyle:"lowercase"});function Fc(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}g(Fc,"isHexCode");function Ac(e){return 48<=e&&e<=55}g(Ac,"isOctCode");function Ec(e){return 48<=e&&e<=57}g(Ec,"isDecCode");function Mc(e){if(e===null)return!1;var t=e.length,r=0,i=!1,s;if(!t)return!1;if(s=e[r],(s==="-"||s==="+")&&(s=e[++r]),s==="0"){if(r+1===t)return!0;if(s=e[++r],s==="b"){for(r++;r<t;r++)if(s=e[r],s!=="_"){if(s!=="0"&&s!=="1")return!1;i=!0}return i&&s!=="_"}if(s==="x"){for(r++;r<t;r++)if(s=e[r],s!=="_"){if(!Fc(e.charCodeAt(r)))return!1;i=!0}return i&&s!=="_"}if(s==="o"){for(r++;r<t;r++)if(s=e[r],s!=="_"){if(!Ac(e.charCodeAt(r)))return!1;i=!0}return i&&s!=="_"}}if(s==="_")return!1;for(;r<t;r++)if(s=e[r],s!=="_"){if(!Ec(e.charCodeAt(r)))return!1;i=!0}return!(!i||s==="_")}g(Mc,"resolveYamlInteger");function $c(e){var t=e,r=1,i;if(t.indexOf("_")!==-1&&(t=t.replace(/_/g,"")),i=t[0],(i==="-"||i==="+")&&(i==="-"&&(r=-1),t=t.slice(1),i=t[0]),t==="0")return 0;if(i==="0"){if(t[1]==="b")return r*parseInt(t.slice(2),2);if(t[1]==="x")return r*parseInt(t.slice(2),16);if(t[1]==="o")return r*parseInt(t.slice(2),8)}return r*parseInt(t,10)}g($c,"constructYamlInteger");function Oc(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!Nt.isNegativeZero(e)}g(Oc,"isInteger");var kC=new Kt("tag:yaml.org,2002:int",{kind:"scalar",resolve:Mc,construct:$c,predicate:Oc,represent:{binary:g(function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},"binary"),octal:g(function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},"octal"),decimal:g(function(e){return e.toString(10)},"decimal"),hexadecimal:g(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"]}}),TC=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function Ic(e){return!(e===null||!TC.test(e)||e[e.length-1]==="_")}g(Ic,"resolveYamlFloat");function Dc(e){var t,r;return t=e.replace(/_/g,"").toLowerCase(),r=t[0]==="-"?-1:1,"+-".indexOf(t[0])>=0&&(t=t.slice(1)),t===".inf"?r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:t===".nan"?NaN:r*parseFloat(t,10)}g(Dc,"constructYamlFloat");var SC=/^[-+]?[0-9]+e/;function Pc(e,t){var r;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(Nt.isNegativeZero(e))return"-0.0";return r=e.toString(10),SC.test(r)?r.replace("e",".e"):r}g(Pc,"representYamlFloat");function Rc(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||Nt.isNegativeZero(e))}g(Rc,"isFloat");var wC=new Kt("tag:yaml.org,2002:float",{kind:"scalar",resolve:Ic,construct:Dc,predicate:Rc,represent:Pc,defaultStyle:"lowercase"}),qc=CC.extend({implicit:[xC,bC,kC,wC]}),BC=qc,Nc=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Wc=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function zc(e){return e===null?!1:Nc.exec(e)!==null||Wc.exec(e)!==null}g(zc,"resolveYamlTimestamp");function Hc(e){var t,r,i,s,a,o,n,l=0,c=null,h,d,p;if(t=Nc.exec(e),t===null&&(t=Wc.exec(e)),t===null)throw new Error("Date resolve error");if(r=+t[1],i=+t[2]-1,s=+t[3],!t[4])return new Date(Date.UTC(r,i,s));if(a=+t[4],o=+t[5],n=+t[6],t[7]){for(l=t[7].slice(0,3);l.length<3;)l+="0";l=+l}return t[9]&&(h=+t[10],d=+(t[11]||0),c=(h*60+d)*6e4,t[9]==="-"&&(c=-c)),p=new Date(Date.UTC(r,i,s,a,o,n,l)),c&&p.setTime(p.getTime()-c),p}g(Hc,"constructYamlTimestamp");function Yc(e){return e.toISOString()}g(Yc,"representYamlTimestamp");var _C=new Kt("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:zc,construct:Hc,instanceOf:Date,represent:Yc});function Uc(e){return e==="<<"||e===null}g(Uc,"resolveYamlMerge");var vC=new Kt("tag:yaml.org,2002:merge",{kind:"scalar",resolve:Uc}),en=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
135
+ \r`;function jc(e){if(e===null)return!1;var t,r,i=0,s=e.length,a=en;for(r=0;r<s;r++)if(t=a.indexOf(e.charAt(r)),!(t>64)){if(t<0)return!1;i+=6}return i%8===0}g(jc,"resolveYamlBinary");function Gc(e){var t,r,i=e.replace(/[\r\n=]/g,""),s=i.length,a=en,o=0,n=[];for(t=0;t<s;t++)t%4===0&&t&&(n.push(o>>16&255),n.push(o>>8&255),n.push(o&255)),o=o<<6|a.indexOf(i.charAt(t));return r=s%4*6,r===0?(n.push(o>>16&255),n.push(o>>8&255),n.push(o&255)):r===18?(n.push(o>>10&255),n.push(o>>2&255)):r===12&&n.push(o>>4&255),new Uint8Array(n)}g(Gc,"constructYamlBinary");function Xc(e){var t="",r=0,i,s,a=e.length,o=en;for(i=0;i<a;i++)i%3===0&&i&&(t+=o[r>>18&63],t+=o[r>>12&63],t+=o[r>>6&63],t+=o[r&63]),r=(r<<8)+e[i];return s=a%3,s===0?(t+=o[r>>18&63],t+=o[r>>12&63],t+=o[r>>6&63],t+=o[r&63]):s===2?(t+=o[r>>10&63],t+=o[r>>4&63],t+=o[r<<2&63],t+=o[64]):s===1&&(t+=o[r>>2&63],t+=o[r<<4&63],t+=o[64],t+=o[64]),t}g(Xc,"representYamlBinary");function Vc(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}g(Vc,"isBinary");var LC=new Kt("tag:yaml.org,2002:binary",{kind:"scalar",resolve:jc,construct:Gc,predicate:Vc,represent:Xc}),FC=Object.prototype.hasOwnProperty,AC=Object.prototype.toString;function Zc(e){if(e===null)return!0;var t=[],r,i,s,a,o,n=e;for(r=0,i=n.length;r<i;r+=1){if(s=n[r],o=!1,AC.call(s)!=="[object Object]")return!1;for(a in s)if(FC.call(s,a))if(!o)o=!0;else return!1;if(!o)return!1;if(t.indexOf(a)===-1)t.push(a);else return!1}return!0}g(Zc,"resolveYamlOmap");function Qc(e){return e!==null?e:[]}g(Qc,"constructYamlOmap");var EC=new Kt("tag:yaml.org,2002:omap",{kind:"sequence",resolve:Zc,construct:Qc}),MC=Object.prototype.toString;function Kc(e){if(e===null)return!0;var t,r,i,s,a,o=e;for(a=new Array(o.length),t=0,r=o.length;t<r;t+=1){if(i=o[t],MC.call(i)!=="[object Object]"||(s=Object.keys(i),s.length!==1))return!1;a[t]=[s[0],i[s[0]]]}return!0}g(Kc,"resolveYamlPairs");function Jc(e){if(e===null)return[];var t,r,i,s,a,o=e;for(a=new Array(o.length),t=0,r=o.length;t<r;t+=1)i=o[t],s=Object.keys(i),a[t]=[s[0],i[s[0]]];return a}g(Jc,"constructYamlPairs");var $C=new Kt("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:Kc,construct:Jc}),OC=Object.prototype.hasOwnProperty;function td(e){if(e===null)return!0;var t,r=e;for(t in r)if(OC.call(r,t)&&r[t]!==null)return!1;return!0}g(td,"resolveYamlSet");function ed(e){return e!==null?e:{}}g(ed,"constructYamlSet");var IC=new Kt("tag:yaml.org,2002:set",{kind:"mapping",resolve:td,construct:ed}),rd=BC.extend({implicit:[_C,vC],explicit:[LC,EC,$C,IC]}),ir=Object.prototype.hasOwnProperty,Os=1,id=2,sd=3,Is=4,Da=1,DC=2,Al=3,PC=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,RC=/[\x85\u2028\u2029]/,qC=/[,\[\]\{\}]/,ad=/^(?:!|!!|![a-z\-]+!)$/i,od=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function ao(e){return Object.prototype.toString.call(e)}g(ao,"_class");function ke(e){return e===10||e===13}g(ke,"is_EOL");function er(e){return e===9||e===32}g(er,"is_WHITE_SPACE");function re(e){return e===9||e===32||e===10||e===13}g(re,"is_WS_OR_EOL");function fr(e){return e===44||e===91||e===93||e===123||e===125}g(fr,"is_FLOW_INDICATOR");function nd(e){var t;return 48<=e&&e<=57?e-48:(t=e|32,97<=t&&t<=102?t-97+10:-1)}g(nd,"fromHexCode");function ld(e){return e===120?2:e===117?4:e===85?8:0}g(ld,"escapedHexLen");function hd(e){return 48<=e&&e<=57?e-48:-1}g(hd,"fromDecimalCode");function oo(e){return e===48?"\0":e===97?"\x07":e===98?"\b":e===116||e===9?" ":e===110?`
136
+ `:e===118?"\v":e===102?"\f":e===114?"\r":e===101?"\x1B":e===32?" ":e===34?'"':e===47?"/":e===92?"\\":e===78?"…":e===95?" ":e===76?"\u2028":e===80?"\u2029":""}g(oo,"simpleEscapeSequence");function cd(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}g(cd,"charFromCodepoint");function rn(e,t,r){t==="__proto__"?Object.defineProperty(e,t,{configurable:!0,enumerable:!0,writable:!0,value:r}):e[t]=r}g(rn,"setProperty");var dd=new Array(256),ud=new Array(256);for(cr=0;cr<256;cr++)dd[cr]=oo(cr)?1:0,ud[cr]=oo(cr);var cr;function pd(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||rd,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,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.firstTabInLine=-1,this.documents=[]}g(pd,"State$1");function sn(e,t){var r={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return r.snippet=dC(r),new le(t,r)}g(sn,"generateError");function at(e,t){throw sn(e,t)}g(at,"throwError");function Di(e,t){e.onWarning&&e.onWarning.call(null,sn(e,t))}g(Di,"throwWarning");var El={YAML:g(function(t,r,i){var s,a,o;t.version!==null&&at(t,"duplication of %YAML directive"),i.length!==1&&at(t,"YAML directive accepts exactly one argument"),s=/^([0-9]+)\.([0-9]+)$/.exec(i[0]),s===null&&at(t,"ill-formed argument of the YAML directive"),a=parseInt(s[1],10),o=parseInt(s[2],10),a!==1&&at(t,"unacceptable YAML version of the document"),t.version=i[0],t.checkLineBreaks=o<2,o!==1&&o!==2&&Di(t,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:g(function(t,r,i){var s,a;i.length!==2&&at(t,"TAG directive accepts exactly two arguments"),s=i[0],a=i[1],ad.test(s)||at(t,"ill-formed tag handle (first argument) of the TAG directive"),ir.call(t.tagMap,s)&&at(t,'there is a previously declared suffix for "'+s+'" tag handle'),od.test(a)||at(t,"ill-formed tag prefix (second argument) of the TAG directive");try{a=decodeURIComponent(a)}catch{at(t,"tag prefix is malformed: "+a)}t.tagMap[s]=a},"handleTagDirective")};function ze(e,t,r,i){var s,a,o,n;if(t<r){if(n=e.input.slice(t,r),i)for(s=0,a=n.length;s<a;s+=1)o=n.charCodeAt(s),o===9||32<=o&&o<=1114111||at(e,"expected valid JSON character");else PC.test(n)&&at(e,"the stream contains non-printable characters");e.result+=n}}g(ze,"captureSegment");function no(e,t,r,i){var s,a,o,n;for(Nt.isObject(r)||at(e,"cannot merge mappings; the provided source object is unacceptable"),s=Object.keys(r),o=0,n=s.length;o<n;o+=1)a=s[o],ir.call(t,a)||(rn(t,a,r[a]),i[a]=!0)}g(no,"mergeMappings");function mr(e,t,r,i,s,a,o,n,l){var c,h;if(Array.isArray(s))for(s=Array.prototype.slice.call(s),c=0,h=s.length;c<h;c+=1)Array.isArray(s[c])&&at(e,"nested arrays are not supported inside keys"),typeof s=="object"&&ao(s[c])==="[object Object]"&&(s[c]="[object Object]");if(typeof s=="object"&&ao(s)==="[object Object]"&&(s="[object Object]"),s=String(s),t===null&&(t={}),i==="tag:yaml.org,2002:merge")if(Array.isArray(a))for(c=0,h=a.length;c<h;c+=1)no(e,t,a[c],r);else no(e,t,a,r);else!e.json&&!ir.call(r,s)&&ir.call(t,s)&&(e.line=o||e.line,e.lineStart=n||e.lineStart,e.position=l||e.position,at(e,"duplicated mapping key")),rn(t,s,a),delete r[s];return t}g(mr,"storeMappingPair");function Js(e){var t;t=e.input.charCodeAt(e.position),t===10?e.position++:t===13?(e.position++,e.input.charCodeAt(e.position)===10&&e.position++):at(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}g(Js,"readLineBreak");function It(e,t,r){for(var i=0,s=e.input.charCodeAt(e.position);s!==0;){for(;er(s);)s===9&&e.firstTabInLine===-1&&(e.firstTabInLine=e.position),s=e.input.charCodeAt(++e.position);if(t&&s===35)do s=e.input.charCodeAt(++e.position);while(s!==10&&s!==13&&s!==0);if(ke(s))for(Js(e),s=e.input.charCodeAt(e.position),i++,e.lineIndent=0;s===32;)e.lineIndent++,s=e.input.charCodeAt(++e.position);else break}return r!==-1&&i!==0&&e.lineIndent<r&&Di(e,"deficient indentation"),i}g(It,"skipSeparationSpace");function Ui(e){var t=e.position,r;return r=e.input.charCodeAt(t),!!((r===45||r===46)&&r===e.input.charCodeAt(t+1)&&r===e.input.charCodeAt(t+2)&&(t+=3,r=e.input.charCodeAt(t),r===0||re(r)))}g(Ui,"testDocumentSeparator");function ta(e,t){t===1?e.result+=" ":t>1&&(e.result+=Nt.repeat(`
137
+ `,t-1))}g(ta,"writeFoldedLines");function gd(e,t,r){var i,s,a,o,n,l,c,h,d=e.kind,p=e.result,u;if(u=e.input.charCodeAt(e.position),re(u)||fr(u)||u===35||u===38||u===42||u===33||u===124||u===62||u===39||u===34||u===37||u===64||u===96||(u===63||u===45)&&(s=e.input.charCodeAt(e.position+1),re(s)||r&&fr(s)))return!1;for(e.kind="scalar",e.result="",a=o=e.position,n=!1;u!==0;){if(u===58){if(s=e.input.charCodeAt(e.position+1),re(s)||r&&fr(s))break}else if(u===35){if(i=e.input.charCodeAt(e.position-1),re(i))break}else{if(e.position===e.lineStart&&Ui(e)||r&&fr(u))break;if(ke(u))if(l=e.line,c=e.lineStart,h=e.lineIndent,It(e,!1,-1),e.lineIndent>=t){n=!0,u=e.input.charCodeAt(e.position);continue}else{e.position=o,e.line=l,e.lineStart=c,e.lineIndent=h;break}}n&&(ze(e,a,o,!1),ta(e,e.line-l),a=o=e.position,n=!1),er(u)||(o=e.position+1),u=e.input.charCodeAt(++e.position)}return ze(e,a,o,!1),e.result?!0:(e.kind=d,e.result=p,!1)}g(gd,"readPlainScalar");function fd(e,t){var r,i,s;if(r=e.input.charCodeAt(e.position),r!==39)return!1;for(e.kind="scalar",e.result="",e.position++,i=s=e.position;(r=e.input.charCodeAt(e.position))!==0;)if(r===39)if(ze(e,i,e.position,!0),r=e.input.charCodeAt(++e.position),r===39)i=e.position,e.position++,s=e.position;else return!0;else ke(r)?(ze(e,i,s,!0),ta(e,It(e,!1,t)),i=s=e.position):e.position===e.lineStart&&Ui(e)?at(e,"unexpected end of the document within a single quoted scalar"):(e.position++,s=e.position);at(e,"unexpected end of the stream within a single quoted scalar")}g(fd,"readSingleQuotedScalar");function md(e,t){var r,i,s,a,o,n;if(n=e.input.charCodeAt(e.position),n!==34)return!1;for(e.kind="scalar",e.result="",e.position++,r=i=e.position;(n=e.input.charCodeAt(e.position))!==0;){if(n===34)return ze(e,r,e.position,!0),e.position++,!0;if(n===92){if(ze(e,r,e.position,!0),n=e.input.charCodeAt(++e.position),ke(n))It(e,!1,t);else if(n<256&&dd[n])e.result+=ud[n],e.position++;else if((o=ld(n))>0){for(s=o,a=0;s>0;s--)n=e.input.charCodeAt(++e.position),(o=nd(n))>=0?a=(a<<4)+o:at(e,"expected hexadecimal character");e.result+=cd(a),e.position++}else at(e,"unknown escape sequence");r=i=e.position}else ke(n)?(ze(e,r,i,!0),ta(e,It(e,!1,t)),r=i=e.position):e.position===e.lineStart&&Ui(e)?at(e,"unexpected end of the document within a double quoted scalar"):(e.position++,i=e.position)}at(e,"unexpected end of the stream within a double quoted scalar")}g(md,"readDoubleQuotedScalar");function yd(e,t){var r=!0,i,s,a,o=e.tag,n,l=e.anchor,c,h,d,p,u,f=Object.create(null),m,y,C,b;if(b=e.input.charCodeAt(e.position),b===91)h=93,u=!1,n=[];else if(b===123)h=125,u=!0,n={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=n),b=e.input.charCodeAt(++e.position);b!==0;){if(It(e,!0,t),b=e.input.charCodeAt(e.position),b===h)return e.position++,e.tag=o,e.anchor=l,e.kind=u?"mapping":"sequence",e.result=n,!0;r?b===44&&at(e,"expected the node content, but found ','"):at(e,"missed comma between flow collection entries"),y=m=C=null,d=p=!1,b===63&&(c=e.input.charCodeAt(e.position+1),re(c)&&(d=p=!0,e.position++,It(e,!0,t))),i=e.line,s=e.lineStart,a=e.position,br(e,t,Os,!1,!0),y=e.tag,m=e.result,It(e,!0,t),b=e.input.charCodeAt(e.position),(p||e.line===i)&&b===58&&(d=!0,b=e.input.charCodeAt(++e.position),It(e,!0,t),br(e,t,Os,!1,!0),C=e.result),u?mr(e,n,f,y,m,C,i,s,a):d?n.push(mr(e,null,f,y,m,C,i,s,a)):n.push(m),It(e,!0,t),b=e.input.charCodeAt(e.position),b===44?(r=!0,b=e.input.charCodeAt(++e.position)):r=!1}at(e,"unexpected end of the stream within a flow collection")}g(yd,"readFlowCollection");function Cd(e,t){var r,i,s=Da,a=!1,o=!1,n=t,l=0,c=!1,h,d;if(d=e.input.charCodeAt(e.position),d===124)i=!1;else if(d===62)i=!0;else return!1;for(e.kind="scalar",e.result="";d!==0;)if(d=e.input.charCodeAt(++e.position),d===43||d===45)Da===s?s=d===43?Al:DC:at(e,"repeat of a chomping mode identifier");else if((h=hd(d))>=0)h===0?at(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):o?at(e,"repeat of an indentation width identifier"):(n=t+h-1,o=!0);else break;if(er(d)){do d=e.input.charCodeAt(++e.position);while(er(d));if(d===35)do d=e.input.charCodeAt(++e.position);while(!ke(d)&&d!==0)}for(;d!==0;){for(Js(e),e.lineIndent=0,d=e.input.charCodeAt(e.position);(!o||e.lineIndent<n)&&d===32;)e.lineIndent++,d=e.input.charCodeAt(++e.position);if(!o&&e.lineIndent>n&&(n=e.lineIndent),ke(d)){l++;continue}if(e.lineIndent<n){s===Al?e.result+=Nt.repeat(`
138
+ `,a?1+l:l):s===Da&&a&&(e.result+=`
139
+ `);break}for(i?er(d)?(c=!0,e.result+=Nt.repeat(`
140
+ `,a?1+l:l)):c?(c=!1,e.result+=Nt.repeat(`
141
+ `,l+1)):l===0?a&&(e.result+=" "):e.result+=Nt.repeat(`
142
+ `,l):e.result+=Nt.repeat(`
143
+ `,a?1+l:l),a=!0,o=!0,l=0,r=e.position;!ke(d)&&d!==0;)d=e.input.charCodeAt(++e.position);ze(e,r,e.position,!1)}return!0}g(Cd,"readBlockScalar");function lo(e,t){var r,i=e.tag,s=e.anchor,a=[],o,n=!1,l;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=a),l=e.input.charCodeAt(e.position);l!==0&&(e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,at(e,"tab characters must not be used in indentation")),!(l!==45||(o=e.input.charCodeAt(e.position+1),!re(o))));){if(n=!0,e.position++,It(e,!0,-1)&&e.lineIndent<=t){a.push(null),l=e.input.charCodeAt(e.position);continue}if(r=e.line,br(e,t,sd,!1,!0),a.push(e.result),It(e,!0,-1),l=e.input.charCodeAt(e.position),(e.line===r||e.lineIndent>t)&&l!==0)at(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break}return n?(e.tag=i,e.anchor=s,e.kind="sequence",e.result=a,!0):!1}g(lo,"readBlockSequence");function xd(e,t,r){var i,s,a,o,n,l,c=e.tag,h=e.anchor,d={},p=Object.create(null),u=null,f=null,m=null,y=!1,C=!1,b;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=d),b=e.input.charCodeAt(e.position);b!==0;){if(!y&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,at(e,"tab characters must not be used in indentation")),i=e.input.charCodeAt(e.position+1),a=e.line,(b===63||b===58)&&re(i))b===63?(y&&(mr(e,d,p,u,f,null,o,n,l),u=f=m=null),C=!0,y=!0,s=!0):y?(y=!1,s=!0):at(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,b=i;else{if(o=e.line,n=e.lineStart,l=e.position,!br(e,r,id,!1,!0))break;if(e.line===a){for(b=e.input.charCodeAt(e.position);er(b);)b=e.input.charCodeAt(++e.position);if(b===58)b=e.input.charCodeAt(++e.position),re(b)||at(e,"a whitespace character is expected after the key-value separator within a block mapping"),y&&(mr(e,d,p,u,f,null,o,n,l),u=f=m=null),C=!0,y=!1,s=!1,u=e.tag,f=e.result;else if(C)at(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=c,e.anchor=h,!0}else if(C)at(e,"can not read a block mapping entry; a multiline key may not be an implicit key");else return e.tag=c,e.anchor=h,!0}if((e.line===a||e.lineIndent>t)&&(y&&(o=e.line,n=e.lineStart,l=e.position),br(e,t,Is,!0,s)&&(y?f=e.result:m=e.result),y||(mr(e,d,p,u,f,m,o,n,l),u=f=m=null),It(e,!0,-1),b=e.input.charCodeAt(e.position)),(e.line===a||e.lineIndent>t)&&b!==0)at(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return y&&mr(e,d,p,u,f,null,o,n,l),C&&(e.tag=c,e.anchor=h,e.kind="mapping",e.result=d),C}g(xd,"readBlockMapping");function bd(e){var t,r=!1,i=!1,s,a,o;if(o=e.input.charCodeAt(e.position),o!==33)return!1;if(e.tag!==null&&at(e,"duplication of a tag property"),o=e.input.charCodeAt(++e.position),o===60?(r=!0,o=e.input.charCodeAt(++e.position)):o===33?(i=!0,s="!!",o=e.input.charCodeAt(++e.position)):s="!",t=e.position,r){do o=e.input.charCodeAt(++e.position);while(o!==0&&o!==62);e.position<e.length?(a=e.input.slice(t,e.position),o=e.input.charCodeAt(++e.position)):at(e,"unexpected end of the stream within a verbatim tag")}else{for(;o!==0&&!re(o);)o===33&&(i?at(e,"tag suffix cannot contain exclamation marks"):(s=e.input.slice(t-1,e.position+1),ad.test(s)||at(e,"named tag handle cannot contain such characters"),i=!0,t=e.position+1)),o=e.input.charCodeAt(++e.position);a=e.input.slice(t,e.position),qC.test(a)&&at(e,"tag suffix cannot contain flow indicator characters")}a&&!od.test(a)&&at(e,"tag name cannot contain such characters: "+a);try{a=decodeURIComponent(a)}catch{at(e,"tag name is malformed: "+a)}return r?e.tag=a:ir.call(e.tagMap,s)?e.tag=e.tagMap[s]+a:s==="!"?e.tag="!"+a:s==="!!"?e.tag="tag:yaml.org,2002:"+a:at(e,'undeclared tag handle "'+s+'"'),!0}g(bd,"readTagProperty");function kd(e){var t,r;if(r=e.input.charCodeAt(e.position),r!==38)return!1;for(e.anchor!==null&&at(e,"duplication of an anchor property"),r=e.input.charCodeAt(++e.position),t=e.position;r!==0&&!re(r)&&!fr(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&at(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}g(kd,"readAnchorProperty");function Td(e){var t,r,i;if(i=e.input.charCodeAt(e.position),i!==42)return!1;for(i=e.input.charCodeAt(++e.position),t=e.position;i!==0&&!re(i)&&!fr(i);)i=e.input.charCodeAt(++e.position);return e.position===t&&at(e,"name of an alias node must contain at least one character"),r=e.input.slice(t,e.position),ir.call(e.anchorMap,r)||at(e,'unidentified alias "'+r+'"'),e.result=e.anchorMap[r],It(e,!0,-1),!0}g(Td,"readAlias");function br(e,t,r,i,s){var a,o,n,l=1,c=!1,h=!1,d,p,u,f,m,y;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,a=o=n=Is===r||sd===r,i&&It(e,!0,-1)&&(c=!0,e.lineIndent>t?l=1:e.lineIndent===t?l=0:e.lineIndent<t&&(l=-1)),l===1)for(;bd(e)||kd(e);)It(e,!0,-1)?(c=!0,n=a,e.lineIndent>t?l=1:e.lineIndent===t?l=0:e.lineIndent<t&&(l=-1)):n=!1;if(n&&(n=c||s),(l===1||Is===r)&&(Os===r||id===r?m=t:m=t+1,y=e.position-e.lineStart,l===1?n&&(lo(e,y)||xd(e,y,m))||yd(e,m)?h=!0:(o&&Cd(e,m)||fd(e,m)||md(e,m)?h=!0:Td(e)?(h=!0,(e.tag!==null||e.anchor!==null)&&at(e,"alias node should not have any properties")):gd(e,m,Os===r)&&(h=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):l===0&&(h=n&&lo(e,y))),e.tag===null)e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);else if(e.tag==="?"){for(e.result!==null&&e.kind!=="scalar"&&at(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),d=0,p=e.implicitTypes.length;d<p;d+=1)if(f=e.implicitTypes[d],f.resolve(e.result)){e.result=f.construct(e.result),e.tag=f.tag,e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);break}}else if(e.tag!=="!"){if(ir.call(e.typeMap[e.kind||"fallback"],e.tag))f=e.typeMap[e.kind||"fallback"][e.tag];else for(f=null,u=e.typeMap.multi[e.kind||"fallback"],d=0,p=u.length;d<p;d+=1)if(e.tag.slice(0,u[d].tag.length)===u[d].tag){f=u[d];break}f||at(e,"unknown tag !<"+e.tag+">"),e.result!==null&&f.kind!==e.kind&&at(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&&(e.anchorMap[e.anchor]=e.result)):at(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return e.listener!==null&&e.listener("close",e),e.tag!==null||e.anchor!==null||h}g(br,"composeNode");function Sd(e){var t=e.position,r,i,s,a=!1,o;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);(o=e.input.charCodeAt(e.position))!==0&&(It(e,!0,-1),o=e.input.charCodeAt(e.position),!(e.lineIndent>0||o!==37));){for(a=!0,o=e.input.charCodeAt(++e.position),r=e.position;o!==0&&!re(o);)o=e.input.charCodeAt(++e.position);for(i=e.input.slice(r,e.position),s=[],i.length<1&&at(e,"directive name must not be less than one character in length");o!==0;){for(;er(o);)o=e.input.charCodeAt(++e.position);if(o===35){do o=e.input.charCodeAt(++e.position);while(o!==0&&!ke(o));break}if(ke(o))break;for(r=e.position;o!==0&&!re(o);)o=e.input.charCodeAt(++e.position);s.push(e.input.slice(r,e.position))}o!==0&&Js(e),ir.call(El,i)?El[i](e,i,s):Di(e,'unknown document directive "'+i+'"')}if(It(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,It(e,!0,-1)):a&&at(e,"directives end mark is expected"),br(e,e.lineIndent-1,Is,!1,!0),It(e,!0,-1),e.checkLineBreaks&&RC.test(e.input.slice(t,e.position))&&Di(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&Ui(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,It(e,!0,-1));return}if(e.position<e.length-1)at(e,"end of the stream or a document separator is expected");else return}g(Sd,"readDocument");function an(e,t){e=String(e),t=t||{},e.length!==0&&(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13&&(e+=`
144
+ `),e.charCodeAt(0)===65279&&(e=e.slice(1)));var r=new pd(e,t),i=e.indexOf("\0");for(i!==-1&&(r.position=i,at(r,"null byte is not allowed in input")),r.input+="\0";r.input.charCodeAt(r.position)===32;)r.lineIndent+=1,r.position+=1;for(;r.position<r.length-1;)Sd(r);return r.documents}g(an,"loadDocuments");function NC(e,t,r){t!==null&&typeof t=="object"&&typeof r>"u"&&(r=t,t=null);var i=an(e,r);if(typeof t!="function")return i;for(var s=0,a=i.length;s<a;s+=1)t(i[s])}g(NC,"loadAll$1");function wd(e,t){var r=an(e,t);if(r.length!==0){if(r.length===1)return r[0];throw new le("expected a single document in the stream, but found more")}}g(wd,"load$1");var WC=wd,zC={load:WC},Bd=Object.prototype.toString,_d=Object.prototype.hasOwnProperty,on=65279,HC=9,Pi=10,YC=13,UC=32,jC=33,GC=34,ho=35,XC=37,VC=38,ZC=39,QC=42,vd=44,KC=45,Ds=58,JC=61,t0=62,e0=63,r0=64,Ld=91,Fd=93,i0=96,Ad=123,s0=124,Ed=125,Jt={};Jt[0]="\\0";Jt[7]="\\a";Jt[8]="\\b";Jt[9]="\\t";Jt[10]="\\n";Jt[11]="\\v";Jt[12]="\\f";Jt[13]="\\r";Jt[27]="\\e";Jt[34]='\\"';Jt[92]="\\\\";Jt[133]="\\N";Jt[160]="\\_";Jt[8232]="\\L";Jt[8233]="\\P";var a0=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],o0=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function Md(e,t){var r,i,s,a,o,n,l;if(t===null)return{};for(r={},i=Object.keys(t),s=0,a=i.length;s<a;s+=1)o=i[s],n=String(t[o]),o.slice(0,2)==="!!"&&(o="tag:yaml.org,2002:"+o.slice(2)),l=e.compiledTypeMap.fallback[o],l&&_d.call(l.styleAliases,n)&&(n=l.styleAliases[n]),r[o]=n;return r}g(Md,"compileStyleMap");function $d(e){var t,r,i;if(t=e.toString(16).toUpperCase(),e<=255)r="x",i=2;else if(e<=65535)r="u",i=4;else if(e<=4294967295)r="U",i=8;else throw new le("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+r+Nt.repeat("0",i-t.length)+t}g($d,"encodeHex");var n0=1,Ri=2;function Od(e){this.schema=e.schema||rd,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=Nt.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=Md(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.quotingType=e.quotingType==='"'?Ri:n0,this.forceQuotes=e.forceQuotes||!1,this.replacer=typeof e.replacer=="function"?e.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}g(Od,"State");function co(e,t){for(var r=Nt.repeat(" ",t),i=0,s=-1,a="",o,n=e.length;i<n;)s=e.indexOf(`
145
+ `,i),s===-1?(o=e.slice(i),i=n):(o=e.slice(i,s+1),i=s+1),o.length&&o!==`
146
+ `&&(a+=r),a+=o;return a}g(co,"indentString");function Ps(e,t){return`
147
+ `+Nt.repeat(" ",e.indent*t)}g(Ps,"generateNextLine");function Id(e,t){var r,i,s;for(r=0,i=e.implicitTypes.length;r<i;r+=1)if(s=e.implicitTypes[r],s.resolve(t))return!0;return!1}g(Id,"testImplicitResolving");function qi(e){return e===UC||e===HC}g(qi,"isWhitespace");function ni(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==on||65536<=e&&e<=1114111}g(ni,"isPrintable");function uo(e){return ni(e)&&e!==on&&e!==YC&&e!==Pi}g(uo,"isNsCharOrWhitespace");function po(e,t,r){var i=uo(e),s=i&&!qi(e);return(r?i:i&&e!==vd&&e!==Ld&&e!==Fd&&e!==Ad&&e!==Ed)&&e!==ho&&!(t===Ds&&!s)||uo(t)&&!qi(t)&&e===ho||t===Ds&&s}g(po,"isPlainSafe");function Dd(e){return ni(e)&&e!==on&&!qi(e)&&e!==KC&&e!==e0&&e!==Ds&&e!==vd&&e!==Ld&&e!==Fd&&e!==Ad&&e!==Ed&&e!==ho&&e!==VC&&e!==QC&&e!==jC&&e!==s0&&e!==JC&&e!==t0&&e!==ZC&&e!==GC&&e!==XC&&e!==r0&&e!==i0}g(Dd,"isPlainSafeFirst");function Pd(e){return!qi(e)&&e!==Ds}g(Pd,"isPlainSafeLast");function Nr(e,t){var r=e.charCodeAt(t),i;return r>=55296&&r<=56319&&t+1<e.length&&(i=e.charCodeAt(t+1),i>=56320&&i<=57343)?(r-55296)*1024+i-56320+65536:r}g(Nr,"codePointAt");function nn(e){var t=/^\n* /;return t.test(e)}g(nn,"needIndentIndicator");var Rd=1,go=2,qd=3,Nd=4,Pr=5;function Wd(e,t,r,i,s,a,o,n){var l,c=0,h=null,d=!1,p=!1,u=i!==-1,f=-1,m=Dd(Nr(e,0))&&Pd(Nr(e,e.length-1));if(t||o)for(l=0;l<e.length;c>=65536?l+=2:l++){if(c=Nr(e,l),!ni(c))return Pr;m=m&&po(c,h,n),h=c}else{for(l=0;l<e.length;c>=65536?l+=2:l++){if(c=Nr(e,l),c===Pi)d=!0,u&&(p=p||l-f-1>i&&e[f+1]!==" ",f=l);else if(!ni(c))return Pr;m=m&&po(c,h,n),h=c}p=p||u&&l-f-1>i&&e[f+1]!==" "}return!d&&!p?m&&!o&&!s(e)?Rd:a===Ri?Pr:go:r>9&&nn(e)?Pr:o?a===Ri?Pr:go:p?Nd:qd}g(Wd,"chooseScalarStyle");function zd(e,t,r,i,s){e.dump=(function(){if(t.length===0)return e.quotingType===Ri?'""':"''";if(!e.noCompatMode&&(a0.indexOf(t)!==-1||o0.test(t)))return e.quotingType===Ri?'"'+t+'"':"'"+t+"'";var a=e.indent*Math.max(1,r),o=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-a),n=i||e.flowLevel>-1&&r>=e.flowLevel;function l(c){return Id(e,c)}switch(g(l,"testAmbiguity"),Wd(t,n,e.indent,o,l,e.quotingType,e.forceQuotes&&!i,s)){case Rd:return t;case go:return"'"+t.replace(/'/g,"''")+"'";case qd:return"|"+fo(t,e.indent)+mo(co(t,a));case Nd:return">"+fo(t,e.indent)+mo(co(Hd(t,o),a));case Pr:return'"'+Yd(t)+'"';default:throw new le("impossible error: invalid scalar style")}})()}g(zd,"writeScalar");function fo(e,t){var r=nn(e)?String(t):"",i=e[e.length-1]===`
148
+ `,s=i&&(e[e.length-2]===`
149
+ `||e===`
150
+ `),a=s?"+":i?"":"-";return r+a+`
151
+ `}g(fo,"blockHeader");function mo(e){return e[e.length-1]===`
152
+ `?e.slice(0,-1):e}g(mo,"dropEndingNewline");function Hd(e,t){for(var r=/(\n+)([^\n]*)/g,i=(function(){var c=e.indexOf(`
153
+ `);return c=c!==-1?c:e.length,r.lastIndex=c,yo(e.slice(0,c),t)})(),s=e[0]===`
154
+ `||e[0]===" ",a,o;o=r.exec(e);){var n=o[1],l=o[2];a=l[0]===" ",i+=n+(!s&&!a&&l!==""?`
155
+ `:"")+yo(l,t),s=a}return i}g(Hd,"foldString");function yo(e,t){if(e===""||e[0]===" ")return e;for(var r=/ [^ ]/g,i,s=0,a,o=0,n=0,l="";i=r.exec(e);)n=i.index,n-s>t&&(a=o>s?o:n,l+=`
156
+ `+e.slice(s,a),s=a+1),o=n;return l+=`
157
+ `,e.length-s>t&&o>s?l+=e.slice(s,o)+`
158
+ `+e.slice(o+1):l+=e.slice(s),l.slice(1)}g(yo,"foldLine");function Yd(e){for(var t="",r=0,i,s=0;s<e.length;r>=65536?s+=2:s++)r=Nr(e,s),i=Jt[r],!i&&ni(r)?(t+=e[s],r>=65536&&(t+=e[s+1])):t+=i||$d(r);return t}g(Yd,"escapeString");function Ud(e,t,r){var i="",s=e.tag,a,o,n;for(a=0,o=r.length;a<o;a+=1)n=r[a],e.replacer&&(n=e.replacer.call(r,String(a),n)),($e(e,t,n,!1,!1)||typeof n>"u"&&$e(e,t,null,!1,!1))&&(i!==""&&(i+=","+(e.condenseFlow?"":" ")),i+=e.dump);e.tag=s,e.dump="["+i+"]"}g(Ud,"writeFlowSequence");function Co(e,t,r,i){var s="",a=e.tag,o,n,l;for(o=0,n=r.length;o<n;o+=1)l=r[o],e.replacer&&(l=e.replacer.call(r,String(o),l)),($e(e,t+1,l,!0,!0,!1,!0)||typeof l>"u"&&$e(e,t+1,null,!0,!0,!1,!0))&&((!i||s!=="")&&(s+=Ps(e,t)),e.dump&&Pi===e.dump.charCodeAt(0)?s+="-":s+="- ",s+=e.dump);e.tag=a,e.dump=s||"[]"}g(Co,"writeBlockSequence");function jd(e,t,r){var i="",s=e.tag,a=Object.keys(r),o,n,l,c,h;for(o=0,n=a.length;o<n;o+=1)h="",i!==""&&(h+=", "),e.condenseFlow&&(h+='"'),l=a[o],c=r[l],e.replacer&&(c=e.replacer.call(r,l,c)),$e(e,t,l,!1,!1)&&(e.dump.length>1024&&(h+="? "),h+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),$e(e,t,c,!1,!1)&&(h+=e.dump,i+=h));e.tag=s,e.dump="{"+i+"}"}g(jd,"writeFlowMapping");function Gd(e,t,r,i){var s="",a=e.tag,o=Object.keys(r),n,l,c,h,d,p;if(e.sortKeys===!0)o.sort();else if(typeof e.sortKeys=="function")o.sort(e.sortKeys);else if(e.sortKeys)throw new le("sortKeys must be a boolean or a function");for(n=0,l=o.length;n<l;n+=1)p="",(!i||s!=="")&&(p+=Ps(e,t)),c=o[n],h=r[c],e.replacer&&(h=e.replacer.call(r,c,h)),$e(e,t+1,c,!0,!0,!0)&&(d=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,d&&(e.dump&&Pi===e.dump.charCodeAt(0)?p+="?":p+="? "),p+=e.dump,d&&(p+=Ps(e,t)),$e(e,t+1,h,!0,d)&&(e.dump&&Pi===e.dump.charCodeAt(0)?p+=":":p+=": ",p+=e.dump,s+=p));e.tag=a,e.dump=s||"{}"}g(Gd,"writeBlockMapping");function xo(e,t,r){var i,s,a,o,n,l;for(s=r?e.explicitTypes:e.implicitTypes,a=0,o=s.length;a<o;a+=1)if(n=s[a],(n.instanceOf||n.predicate)&&(!n.instanceOf||typeof t=="object"&&t instanceof n.instanceOf)&&(!n.predicate||n.predicate(t))){if(r?n.multi&&n.representName?e.tag=n.representName(t):e.tag=n.tag:e.tag="?",n.represent){if(l=e.styleMap[n.tag]||n.defaultStyle,Bd.call(n.represent)==="[object Function]")i=n.represent(t,l);else if(_d.call(n.represent,l))i=n.represent[l](t,l);else throw new le("!<"+n.tag+'> tag resolver accepts not "'+l+'" style');e.dump=i}return!0}return!1}g(xo,"detectType");function $e(e,t,r,i,s,a,o){e.tag=null,e.dump=r,xo(e,r,!1)||xo(e,r,!0);var n=Bd.call(e.dump),l=i,c;i&&(i=e.flowLevel<0||e.flowLevel>t);var h=n==="[object Object]"||n==="[object Array]",d,p;if(h&&(d=e.duplicates.indexOf(r),p=d!==-1),(e.tag!==null&&e.tag!=="?"||p||e.indent!==2&&t>0)&&(s=!1),p&&e.usedDuplicates[d])e.dump="*ref_"+d;else{if(h&&p&&!e.usedDuplicates[d]&&(e.usedDuplicates[d]=!0),n==="[object Object]")i&&Object.keys(e.dump).length!==0?(Gd(e,t,e.dump,s),p&&(e.dump="&ref_"+d+e.dump)):(jd(e,t,e.dump),p&&(e.dump="&ref_"+d+" "+e.dump));else if(n==="[object Array]")i&&e.dump.length!==0?(e.noArrayIndent&&!o&&t>0?Co(e,t-1,e.dump,s):Co(e,t,e.dump,s),p&&(e.dump="&ref_"+d+e.dump)):(Ud(e,t,e.dump),p&&(e.dump="&ref_"+d+" "+e.dump));else if(n==="[object String]")e.tag!=="?"&&zd(e,e.dump,t,a,l);else{if(n==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new le("unacceptable kind of an object to dump "+n)}e.tag!==null&&e.tag!=="?"&&(c=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21"),e.tag[0]==="!"?c="!"+c:c.slice(0,18)==="tag:yaml.org,2002:"?c="!!"+c.slice(18):c="!<"+c+">",e.dump=c+" "+e.dump)}return!0}g($e,"writeNode");function Xd(e,t){var r=[],i=[],s,a;for(Rs(e,r,i),s=0,a=i.length;s<a;s+=1)t.duplicates.push(r[i[s]]);t.usedDuplicates=new Array(a)}g(Xd,"getDuplicateReferences");function Rs(e,t,r){var i,s,a;if(e!==null&&typeof e=="object")if(s=t.indexOf(e),s!==-1)r.indexOf(s)===-1&&r.push(s);else if(t.push(e),Array.isArray(e))for(s=0,a=e.length;s<a;s+=1)Rs(e[s],t,r);else for(i=Object.keys(e),s=0,a=i.length;s<a;s+=1)Rs(e[i[s]],t,r)}g(Rs,"inspectNode");function l0(e,t){t=t||{};var r=new Od(t);r.noRefs||Xd(e,r);var i=e;return r.replacer&&(i=r.replacer.call({"":i},"",i)),$e(r,0,i,!0,!0)?r.dump+`
159
+ `:""}g(l0,"dump$1");function h0(e,t){return function(){throw new Error("Function yaml."+e+" is removed in js-yaml 4. Use yaml."+t+" instead, which is now safe by default.")}}g(h0,"renamed");var c0=qc,d0=zC.load;/*! Bundled license information:
160
+
161
+ js-yaml/dist/js-yaml.mjs:
162
+ (*! js-yaml 4.1.1 https://github.com/nodeca/js-yaml @license MIT *)
163
+ */var u0=g(e=>{const{handDrawnSeed:t}=wt();return{fill:e,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:e,seed:t}},"solidStateFill"),ci=g(e=>{const t=p0([...e.cssCompiledStyles||[],...e.cssStyles||[],...e.labelStyle||[]]);return{stylesMap:t,stylesArray:[...t]}},"compileStyles"),p0=g(e=>{const t=new Map;return e.forEach(r=>{const[i,s]=r.split(":");t.set(i.trim(),s==null?void 0:s.trim())}),t},"styles2Map"),Vd=g(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"),rt=g(e=>{const{stylesArray:t}=ci(e),r=[],i=[],s=[],a=[];return t.forEach(o=>{const n=o[0];Vd(n)?r.push(o.join(":")+" !important"):(i.push(o.join(":")+" !important"),n.includes("stroke")&&s.push(o.join(":")+" !important"),n==="fill"&&a.push(o.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:i.join(";"),stylesArray:t,borderStyles:s,backgroundStyles:a}},"styles2String"),J=g((e,t)=>{var l;const{themeVariables:r,handDrawnSeed:i}=wt(),{nodeBorder:s,mainBkg:a}=r,{stylesMap:o}=ci(e);return Object.assign({roughness:.7,fill:o.get("fill")||a,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:o.get("stroke")||s,seed:i,strokeWidth:((l=o.get("stroke-width"))==null?void 0:l.replace("px",""))||1.3,fillLineDash:[0,0],strokeLineDash:g0(o.get("stroke-dasharray"))},t)},"userNodeOverrides"),g0=g(e=>{if(!e)return[0,0];const t=e.trim().split(/\s+/).map(Number);if(t.length===1){const s=isNaN(t[0])?0:t[0];return[s,s]}const r=isNaN(t[0])?0:t[0],i=isNaN(t[1])?0:t[1];return[r,i]},"getStrokeDashArray"),as={},Rt={},Ml;function f0(){return Ml||(Ml=1,Object.defineProperty(Rt,"__esModule",{value:!0}),Rt.BLANK_URL=Rt.relativeFirstCharacters=Rt.whitespaceEscapeCharsRegex=Rt.urlSchemeRegex=Rt.ctrlCharactersRegex=Rt.htmlCtrlEntityRegex=Rt.htmlEntitiesRegex=Rt.invalidProtocolRegex=void 0,Rt.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,Rt.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,Rt.htmlCtrlEntityRegex=/&(newline|tab);/gi,Rt.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,Rt.urlSchemeRegex=/^.+(:|&colon;)/gim,Rt.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,Rt.relativeFirstCharacters=[".","/"],Rt.BLANK_URL="about:blank"),Rt}var $l;function m0(){if($l)return as;$l=1,Object.defineProperty(as,"__esModule",{value:!0}),as.sanitizeUrl=a;var e=f0();function t(o){return e.relativeFirstCharacters.indexOf(o[0])>-1}function r(o){var n=o.replace(e.ctrlCharactersRegex,"");return n.replace(e.htmlEntitiesRegex,function(l,c){return String.fromCharCode(c)})}function i(o){return URL.canParse(o)}function s(o){try{return decodeURIComponent(o)}catch{return o}}function a(o){if(!o)return e.BLANK_URL;var n,l=s(o.trim());do l=r(l).replace(e.htmlCtrlEntityRegex,"").replace(e.ctrlCharactersRegex,"").replace(e.whitespaceEscapeCharsRegex,"").trim(),l=s(l),n=l.match(e.ctrlCharactersRegex)||l.match(e.htmlEntitiesRegex)||l.match(e.htmlCtrlEntityRegex)||l.match(e.whitespaceEscapeCharsRegex);while(n&&n.length>0);var c=l;if(!c)return e.BLANK_URL;if(t(c))return c;var h=c.trimStart(),d=h.match(e.urlSchemeRegex);if(!d)return c;var p=d[0].toLowerCase().trim();if(e.invalidProtocolRegex.test(p))return e.BLANK_URL;var u=h.replace(/\\/g,"/");if(p==="mailto:"||p.includes("://"))return u;if(p==="http:"||p==="https:"){if(!i(u))return e.BLANK_URL;var f=new URL(u);return f.protocol=f.protocol.toLowerCase(),f.hostname=f.hostname.toLowerCase(),f.toString()}return u}return as}var y0=m0();function Pa(e){var r;if(typeof e!="object"||e==null)return!1;if(Object.getPrototypeOf(e)===null)return!0;if(Object.prototype.toString.call(e)!=="[object Object]"){const i=e[Symbol.toStringTag];return i==null||!((r=Object.getOwnPropertyDescriptor(e,Symbol.toStringTag))!=null&&r.writable)?!1:e.toString()===`[object ${i}]`}let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function C0(){}function Zd(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}function ln(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const x0="[object RegExp]",Qd="[object String]",Kd="[object Number]",Jd="[object Boolean]",tu="[object Arguments]",b0="[object Symbol]",k0="[object Date]",T0="[object Map]",S0="[object Set]",w0="[object Array]",B0="[object ArrayBuffer]",_0="[object Object]",v0="[object DataView]",L0="[object Uint8Array]",F0="[object Uint8ClampedArray]",A0="[object Uint16Array]",E0="[object Uint32Array]",M0="[object Int8Array]",$0="[object Int16Array]",O0="[object Int32Array]",I0="[object Float32Array]",D0="[object Float64Array]",Ol=typeof globalThis=="object"&&globalThis||typeof window=="object"&&window||typeof self=="object"&&self||typeof global=="object"&&global||(function(){return this})();function hn(e){return typeof Ol.Buffer<"u"&&Ol.Buffer.isBuffer(e)}function P0(e){return Number.isSafeInteger(e)&&e>=0}function eu(e){return e!=null&&typeof e!="function"&&P0(e.length)}function R0(e){return e==="__proto__"}function cn(e){return e==null||typeof e!="object"&&typeof e!="function"}function dn(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function q0(e,t){return Wr(e,void 0,e,new Map,t)}function Wr(e,t,r,i=new Map,s=void 0){const a=s==null?void 0:s(e,t,r,i);if(a!==void 0)return a;if(cn(e))return e;if(i.has(e))return i.get(e);if(Array.isArray(e)){const o=new Array(e.length);i.set(e,o);for(let n=0;n<e.length;n++)o[n]=Wr(e[n],n,r,i,s);return Object.hasOwn(e,"index")&&(o.index=e.index),Object.hasOwn(e,"input")&&(o.input=e.input),o}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp){const o=new RegExp(e.source,e.flags);return o.lastIndex=e.lastIndex,o}if(e instanceof Map){const o=new Map;i.set(e,o);for(const[n,l]of e)o.set(n,Wr(l,n,r,i,s));return o}if(e instanceof Set){const o=new Set;i.set(e,o);for(const n of e)o.add(Wr(n,void 0,r,i,s));return o}if(hn(e))return e.subarray();if(dn(e)){const o=new(Object.getPrototypeOf(e)).constructor(e.length);i.set(e,o);for(let n=0;n<e.length;n++)o[n]=Wr(e[n],n,r,i,s);return o}if(e instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer)return e.slice(0);if(e instanceof DataView){const o=new DataView(e.buffer.slice(0),e.byteOffset,e.byteLength);return i.set(e,o),ye(o,e,r,i,s),o}if(typeof File<"u"&&e instanceof File){const o=new File([e],e.name,{type:e.type});return i.set(e,o),ye(o,e,r,i,s),o}if(typeof Blob<"u"&&e instanceof Blob){const o=new Blob([e],{type:e.type});return i.set(e,o),ye(o,e,r,i,s),o}if(e instanceof Error){const o=structuredClone(e);return i.set(e,o),o.message=e.message,o.name=e.name,o.stack=e.stack,o.cause=e.cause,o.constructor=e.constructor,ye(o,e,r,i,s),o}if(e instanceof Boolean){const o=new Boolean(e.valueOf());return i.set(e,o),ye(o,e,r,i,s),o}if(e instanceof Number){const o=new Number(e.valueOf());return i.set(e,o),ye(o,e,r,i,s),o}if(e instanceof String){const o=new String(e.valueOf());return i.set(e,o),ye(o,e,r,i,s),o}if(typeof e=="object"&&N0(e)){const o=Object.create(Object.getPrototypeOf(e));return i.set(e,o),ye(o,e,r,i,s),o}return e}function ye(e,t,r=e,i,s){const a=[...Object.keys(t),...Zd(t)];for(let o=0;o<a.length;o++){const n=a[o],l=Object.getOwnPropertyDescriptor(e,n);(l==null||l.writable)&&(e[n]=Wr(t[n],n,r,i,s))}}function N0(e){switch(ln(e)){case tu:case w0:case B0:case v0:case Jd:case k0:case I0:case D0:case M0:case $0:case O0:case T0:case Kd:case _0:case x0:case S0:case Qd:case b0:case L0:case F0:case A0:case E0:return!0;default:return!1}}function W0(e,t){return q0(e,(r,i,s,a)=>{if(typeof e=="object"){if(ln(e)==="[object Object]"&&typeof e.constructor!="function"){const o={};return a.set(e,o),ye(o,e,s,a),o}switch(Object.prototype.toString.call(e)){case Kd:case Qd:case Jd:{const o=new e.constructor(e==null?void 0:e.valueOf());return ye(o,e),o}case tu:{const o={};return ye(o,e),o.length=e.length,o[Symbol.iterator]=e[Symbol.iterator],o}default:return}}})}function Il(e){return W0(e)}function bo(e){return e!==null&&typeof e=="object"&&ln(e)==="[object Arguments]"}function ko(e){return typeof e=="object"&&e!==null}function z0(e){return ko(e)&&eu(e)}function ji(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError("Expected a function");const r=function(...i){const s=t?t.apply(this,i):i[0],a=r.cache;if(a.has(s))return a.get(s);const o=e.apply(this,i);return r.cache=a.set(s,o)||a,o};return r.cache=new(ji.Cache||Map),r}ji.Cache=Map;function xs(e){return dn(e)}function H0(e){const t=e==null?void 0:e.constructor;return e===(typeof t=="function"?t.prototype:Object.prototype)}function Y0(e){if(cn(e))return e;if(Array.isArray(e)||dn(e)||e instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer)return e.slice(0);const t=Object.getPrototypeOf(e);if(t==null)return Object.assign(Object.create(t),e);const r=t.constructor;if(e instanceof Date||e instanceof Map||e instanceof Set)return new r(e);if(e instanceof RegExp){const i=new r(e);return i.lastIndex=e.lastIndex,i}if(e instanceof DataView)return new r(e.buffer.slice(0));if(e instanceof Error){let i;return e instanceof AggregateError?i=new r(e.errors,e.message,{cause:e.cause}):i=new r(e.message,{cause:e.cause}),i.stack=e.stack,Object.assign(i,e),i}return typeof File<"u"&&e instanceof File?new r([e],e.name,{type:e.type,lastModified:e.lastModified}):typeof e=="object"?Object.assign(Object.create(t),e):e}function U0(e,...t){const r=t.slice(0,-1),i=t[t.length-1];let s=e;for(let a=0;a<r.length;a++){const o=r[a];s=bs(s,o,i,new Map)}return s}function bs(e,t,r,i){if(cn(e)&&(e=Object(e)),t==null||typeof t!="object")return e;if(i.has(t))return Y0(i.get(t));if(i.set(t,e),Array.isArray(t)){t=t.slice();for(let a=0;a<t.length;a++)t[a]=t[a]??void 0}const s=[...Object.keys(t),...Zd(t)];for(let a=0;a<s.length;a++){const o=s[a];if(R0(o))continue;let n=t[o],l=e[o];if(bo(n)&&(n={...n}),bo(l)&&(l={...l}),hn(n)&&(n=Il(n)),Array.isArray(n))if(Array.isArray(l)){const h=[],d=Reflect.ownKeys(l);for(let p=0;p<d.length;p++){const u=d[p];h[u]=l[u]}l=h}else if(z0(l)){const h=[];for(let d=0;d<l.length;d++)h[d]=l[d];l=h}else l=[];const c=r(l,n,o,e,t,i);c!==void 0?e[o]=c:Array.isArray(n)||ko(l)&&ko(n)&&(Pa(l)||Pa(n)||xs(l)||xs(n))?e[o]=bs(l,n,r,i):l==null&&Pa(n)?e[o]=bs({},n,r,i):l==null&&xs(n)?e[o]=Il(n):(l===void 0||n!==void 0)&&(e[o]=n)}return e}function j0(e,...t){return U0(e,...t,C0)}function Dl(e){if(e==null)return!0;if(eu(e))return typeof e.splice!="function"&&typeof e!="string"&&!hn(e)&&!xs(e)&&!bo(e)?!1:e.length===0;if(typeof e=="object"||typeof e=="function"){if(e instanceof Map||e instanceof Set)return e.size===0;const t=Object.keys(e);return H0(e)?t.filter(r=>r!=="constructor").length===0:t.length===0}return!0}var G0="​",X0={curveBasis:io,curveBasisClosed:Zy,curveBasisOpen:Qy,curveBumpX:Xh,curveBumpY:Vh,curveBundle:Ky,curveCardinalClosed:Jy,curveCardinalOpen:tC,curveCardinal:Jh,curveCatmullRomClosed:eC,curveCatmullRomOpen:rC,curveCatmullRom:ec,curveLinear:Mi,curveLinearClosed:iC,curveMonotoneX:nc,curveMonotoneY:lc,curveNatural:cc,curveStep:dc,curveStepAfter:pc,curveStepBefore:uc},V0=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,Z0=g(function(e,t){const r=ru(e,/(?:init\b)|(?:initialize\b)/);let i={};if(Array.isArray(r)){const o=r.map(n=>n.args);Bs(o),i=qt(i,[...o])}else i=r.args;if(!i)return;let s=zo(e,t);const a="config";return i[a]!==void 0&&(s==="flowchart-v2"&&(s="flowchart"),i[s]=i[a],delete i[a]),i},"detectInit"),ru=g(function(e,t=null){var r,i;try{const s=new RegExp(`[%]{2}(?![{]${V0.source})(?=[}][%]{2}).*
164
+ `,"ig");e=e.trim().replace(s,"").replace(/'/gm,'"'),H.debug(`Detecting diagram directive${t!==null?" type:"+t:""} based on the text:${e}`);let a;const o=[];for(;(a=Ei.exec(e))!==null;)if(a.index===Ei.lastIndex&&Ei.lastIndex++,a&&!t||t&&((r=a[1])!=null&&r.match(t))||t&&((i=a[2])!=null&&i.match(t))){const n=a[1]?a[1]:a[2],l=a[3]?a[3].trim():a[4]?JSON.parse(a[4].trim()):null;o.push({type:n,args:l})}return o.length===0?{type:e,args:null}:o.length===1?o[0]:o}catch(s){return H.error(`ERROR: ${s.message} - Unable to parse directive type: '${t}' based on the text: '${e}'`),{type:void 0,args:null}}},"detectDirective"),Q0=g(function(e){return e.replace(Ei,"")},"removeDirectives"),K0=g(function(e,t){for(const[r,i]of t.entries())if(i.match(e))return r;return-1},"isSubstringInArray");function un(e,t){if(!e)return t;const r=`curve${e.charAt(0).toUpperCase()+e.slice(1)}`;return X0[r]??t}g(un,"interpolateToCurve");function iu(e,t){const r=e.trim();if(r)return t.securityLevel!=="loose"?y0.sanitizeUrl(r):r}g(iu,"formatUrl");var J0=g((e,...t)=>{const r=e.split("."),i=r.length-1,s=r[i];let a=window;for(let o=0;o<i;o++)if(a=a[r[o]],!a){H.error(`Function name: ${e} not found in window`);return}a[s](...t)},"runFunc");function pn(e,t){return!e||!t?0:Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}g(pn,"distance");function su(e){let t,r=0;e.forEach(s=>{r+=pn(s,t),t=s});const i=r/2;return gn(e,i)}g(su,"traverseEdge");function au(e){return e.length===1?e[0]:su(e)}g(au,"calcLabelPosition");var Pl=g((e,t=2)=>{const r=Math.pow(10,t);return Math.round(e*r)/r},"roundNumber"),gn=g((e,t)=>{let r,i=t;for(const s of e){if(r){const a=pn(s,r);if(a===0)return r;if(a<i)i-=a;else{const o=i/a;if(o<=0)return r;if(o>=1)return{x:s.x,y:s.y};if(o>0&&o<1)return{x:Pl((1-o)*r.x+o*s.x,5),y:Pl((1-o)*r.y+o*s.y,5)}}}r=s}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),tx=g((e,t,r)=>{H.info(`our points ${JSON.stringify(t)}`),t[0]!==r&&(t=t.reverse());const s=gn(t,25),a=e?10:5,o=Math.atan2(t[0].y-s.y,t[0].x-s.x),n={x:0,y:0};return n.x=Math.sin(o)*a+(t[0].x+s.x)/2,n.y=-Math.cos(o)*a+(t[0].y+s.y)/2,n},"calcCardinalityPosition");function ou(e,t,r){const i=structuredClone(r);H.info("our points",i),t!=="start_left"&&t!=="start_right"&&i.reverse();const s=25+e,a=gn(i,s),o=10+e*.5,n=Math.atan2(i[0].y-a.y,i[0].x-a.x),l={x:0,y:0};return t==="start_left"?(l.x=Math.sin(n+Math.PI)*o+(i[0].x+a.x)/2,l.y=-Math.cos(n+Math.PI)*o+(i[0].y+a.y)/2):t==="end_right"?(l.x=Math.sin(n-Math.PI)*o+(i[0].x+a.x)/2-5,l.y=-Math.cos(n-Math.PI)*o+(i[0].y+a.y)/2-5):t==="end_left"?(l.x=Math.sin(n)*o+(i[0].x+a.x)/2-5,l.y=-Math.cos(n)*o+(i[0].y+a.y)/2-5):(l.x=Math.sin(n)*o+(i[0].x+a.x)/2,l.y=-Math.cos(n)*o+(i[0].y+a.y)/2),l}g(ou,"calcTerminalLabelPosition");function nu(e){let t="",r="";for(const i of e)i!==void 0&&(i.startsWith("color:")||i.startsWith("text-align:")?r=r+i+";":t=t+i+";");return{style:t,labelStyle:r}}g(nu,"getStylesFromArray");var Rl=0,ex=g(()=>(Rl++,"id-"+Math.random().toString(36).substr(2,12)+"-"+Rl),"generateId");function lu(e){let t="";const r="0123456789abcdef",i=r.length;for(let s=0;s<e;s++)t+=r.charAt(Math.floor(Math.random()*i));return t}g(lu,"makeRandomHex");var rx=g(e=>lu(e.length),"random"),ix=g(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"),sx=g(function(e,t){const r=t.text.replace(Yi.lineBreakRegex," "),[,i]=ea(t.fontSize),s=e.append("text");s.attr("x",t.x),s.attr("y",t.y),s.style("text-anchor",t.anchor),s.style("font-family",t.fontFamily),s.style("font-size",i),s.style("font-weight",t.fontWeight),s.attr("fill",t.fill),t.class!==void 0&&s.attr("class",t.class);const a=s.append("tspan");return a.attr("x",t.x+t.textMargin*2),a.attr("fill",t.fill),a.text(r),s},"drawSimpleText"),ax=ji((e,t,r)=>{if(!e||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},r),Yi.lineBreakRegex.test(e)))return e;const i=e.split(" ").filter(Boolean),s=[];let a="";return i.forEach((o,n)=>{const l=He(`${o} `,r),c=He(a,r);if(l>t){const{hyphenatedStrings:p,remainingWord:u}=ox(o,t,"-",r);s.push(a,...p),a=u}else c+l>=t?(s.push(a),a=o):a=[a,o].filter(Boolean).join(" ");n+1===i.length&&s.push(a)}),s.filter(o=>o!=="").join(r.joinWith)},(e,t,r)=>`${e}${t}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),ox=ji((e,t,r="-",i)=>{i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},i);const s=[...e],a=[];let o="";return s.forEach((n,l)=>{const c=`${o}${n}`;if(He(c,i)>=t){const d=l+1,p=s.length===d,u=`${c}${r}`;a.push(p?c:u),o=""}else o=c}),{hyphenatedStrings:a,remainingWord:o}},(e,t,r="-",i)=>`${e}${t}${r}${i.fontSize}${i.fontWeight}${i.fontFamily}`);function hu(e,t){return fn(e,t).height}g(hu,"calculateTextHeight");function He(e,t){return fn(e,t).width}g(He,"calculateTextWidth");var fn=ji((e,t)=>{const{fontSize:r=12,fontFamily:i="Arial",fontWeight:s=400}=t;if(!e)return{width:0,height:0};const[,a]=ea(r),o=["sans-serif",i],n=e.split(Yi.lineBreakRegex),l=[],c=xt("body");if(!c.remove)return{width:0,height:0,lineHeight:0};const h=c.append("svg");for(const p of o){let u=0;const f={width:0,height:0,lineHeight:0};for(const m of n){const y=ix();y.text=m||G0;const C=sx(h,y).style("font-size",a).style("font-weight",s).style("font-family",p),b=(C._groups||C)[0][0].getBBox();if(b.width===0&&b.height===0)throw new Error("svg element not in render tree");f.width=Math.round(Math.max(f.width,b.width)),u=Math.round(b.height),f.height+=u,f.lineHeight=Math.round(Math.max(f.lineHeight,u))}l.push(f)}h.remove();const d=isNaN(l[1].height)||isNaN(l[1].width)||isNaN(l[1].lineHeight)||l[0].height>l[1].height&&l[0].width>l[1].width&&l[0].lineHeight>l[1].lineHeight?0:1;return l[d]},(e,t)=>`${e}${t.fontSize}${t.fontWeight}${t.fontFamily}`),ii,nx=(ii=class{constructor(t=!1,r){this.count=0,this.count=r?r.length:0,this.next=t?()=>this.count++:()=>Date.now()}},g(ii,"InitIDGenerator"),ii),os,lx=g(function(e){return os=os||document.createElement("div"),e=escape(e).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),os.innerHTML=e,unescape(os.textContent)},"entityDecode");function mn(e){return"str"in e}g(mn,"isDetailedError");var hx=g((e,t,r,i)=>{var a;if(!i)return;const s=(a=e.node())==null?void 0:a.getBBox();s&&e.append("text").text(i).attr("text-anchor","middle").attr("x",s.x+s.width/2).attr("y",-r).attr("class",t)},"insertTitle"),ea=g(e=>{if(typeof e=="number")return[e,e+"px"];const t=parseInt(e??"",10);return Number.isNaN(t)?[void 0,void 0]:e===String(t)?[t,e+"px"]:[t,e]},"parseFontSize");function yn(e,t){return j0({},e,t)}g(yn,"cleanAndMerge");var be={assignWithDepth:qt,wrapLabel:ax,calculateTextHeight:hu,calculateTextWidth:He,calculateTextDimensions:fn,cleanAndMerge:yn,detectInit:Z0,detectDirective:ru,isSubstringInArray:K0,interpolateToCurve:un,calcLabelPosition:au,calcCardinalityPosition:tx,calcTerminalLabelPosition:ou,formatUrl:iu,getStylesFromArray:nu,generateId:ex,random:rx,runFunc:J0,entityDecode:lx,insertTitle:hx,isLabelCoordinateInPath:cu,parseFontSize:ea,InitIDGenerator:nx},cx=g(function(e){let t=e;return t=t.replace(/style.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),t=t.replace(/classDef.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),t=t.replace(/#\w+;/g,function(r){const i=r.substring(1,r.length-1);return/^\+?\d+$/.test(i)?"fl°°"+i+"¶ß":"fl°"+i+"¶ß"}),t},"encodeEntities"),kr=g(function(e){return e.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),AS=g((e,t,{counter:r=0,prefix:i,suffix:s},a)=>a||`${i?`${i}_`:""}${e}_${t}_${r}${s?`_${s}`:""}`,"getEdgeId");function Ht(e){return e??null}g(Ht,"handleUndefinedAttr");function cu(e,t){const r=Math.round(e.x),i=Math.round(e.y),s=t.replace(/(\d+\.\d+)/g,a=>Math.round(parseFloat(a)).toString());return s.includes(r.toString())||s.includes(i.toString())}g(cu,"isLabelCoordinateInPath");var Cn=g(({flowchart:e})=>{var s,a;const t=((s=e==null?void 0:e.subGraphTitleMargin)==null?void 0:s.top)??0,r=((a=e==null?void 0:e.subGraphTitleMargin)==null?void 0:a.bottom)??0,i=t+r;return{subGraphTitleTopMargin:t,subGraphTitleBottomMargin:r,subGraphTitleTotalMargin:i}},"getSubGraphTitleMargins");async function du(e,t){const r=e.getElementsByTagName("img");if(!r||r.length===0)return;const i=t.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...r].map(s=>new Promise(a=>{function o(){if(s.style.display="flex",s.style.flexDirection="column",i){const n=wt().fontSize?wt().fontSize:window.getComputedStyle(document.body).fontSize,l=5,[c=Fh.fontSize]=ea(n),h=c*l+"px";s.style.minWidth=h,s.style.maxWidth=h}else s.style.width="100%";a(s)}g(o,"setupImage"),setTimeout(()=>{s.complete&&o()}),s.addEventListener("error",o),s.addEventListener("load",o)})))}g(du,"configureLabelImages");var dx={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},To=new Map,uu=new Map,ux=g(e=>{for(const t of e){if(!t.name)throw new Error('Invalid icon loader. Must have a "name" property with non-empty string value.');if(H.debug("Registering icon pack:",t.name),"loader"in t)uu.set(t.name,t.loader);else if("icons"in t)To.set(t.name,t.icons);else throw H.error("Invalid icon loader:",t),new Error('Invalid icon loader. Must have either "icons" or "loader" property.')}},"registerIconPacks"),pu=g(async(e,t)=>{const r=Yf(e,!0,t!==void 0);if(!r)throw new Error(`Invalid icon name: ${e}`);const i=r.prefix||t;if(!i)throw new Error(`Icon name must contain a prefix: ${e}`);let s=To.get(i);if(!s){const o=uu.get(i);if(!o)throw new Error(`Icon set not found: ${r.prefix}`);try{s={...await o(),prefix:i},To.set(i,s)}catch(n){throw H.error(n),new Error(`Failed to load icon set: ${r.prefix}`)}}const a=Hf(s,r.name);if(!a)throw new Error(`Icon not found: ${e}`);return a},"getRegisteredIconData"),px=g(async e=>{try{return await pu(e),!0}catch{return!1}},"isIconAvailable"),Gi=g(async(e,t,r)=>{let i;try{i=await pu(e,t==null?void 0:t.fallbackPrefix)}catch(o){H.error(o),i=dx}const s=Nf(i,t),a=Wf(zf(s.body),{...s.attributes,...r});return Se(a,Mt())},"getIconSVG");function xn(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var wr=xn();function gu(e){wr=e}var $i={exec:()=>null};function Bt(e,t=""){let r=typeof e=="string"?e:e.source,i={replace:(s,a)=>{let o=typeof a=="string"?a:a.source;return o=o.replace(ie.caret,"$1"),r=r.replace(s,o),i},getRegex:()=>new RegExp(r,t)};return i}var gx=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),ie={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i")},fx=/^(?:[ \t]*(?:\n|$))+/,mx=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,yx=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Xi=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Cx=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,bn=/(?:[*+-]|\d{1,9}[.)])/,fu=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,mu=Bt(fu).replace(/bull/g,bn).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(),xx=Bt(fu).replace(/bull/g,bn).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(),kn=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,bx=/^[^\n]+/,Tn=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,kx=Bt(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Tn).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Tx=Bt(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,bn).getRegex(),ra="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",Sn=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Sx=Bt("^ {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",Sn).replace("tag",ra).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),yu=Bt(kn).replace("hr",Xi).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",ra).getRegex(),wx=Bt(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",yu).getRegex(),wn={blockquote:wx,code:mx,def:kx,fences:yx,heading:Cx,hr:Xi,html:Sx,lheading:mu,list:Tx,newline:fx,paragraph:yu,table:$i,text:bx},ql=Bt("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Xi).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",ra).getRegex(),Bx={...wn,lheading:xx,table:ql,paragraph:Bt(kn).replace("hr",Xi).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",ql).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",ra).getRegex()},_x={...wn,html:Bt(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Sn).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:$i,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Bt(kn).replace("hr",Xi).replace("heading",` *#{1,6} *[^
165
+ ]`).replace("lheading",mu).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},vx=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Lx=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Cu=/^( {2,}|\\)\n(?!\s*$)/,Fx=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,ia=/[\p{P}\p{S}]/u,Bn=/[\s\p{P}\p{S}]/u,xu=/[^\s\p{P}\p{S}]/u,Ax=Bt(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Bn).getRegex(),bu=/(?!~)[\p{P}\p{S}]/u,Ex=/(?!~)[\s\p{P}\p{S}]/u,Mx=/(?:[^\s\p{P}\p{S}]|~)/u,$x=Bt(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",gx?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),ku=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,Ox=Bt(ku,"u").replace(/punct/g,ia).getRegex(),Ix=Bt(ku,"u").replace(/punct/g,bu).getRegex(),Tu="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",Dx=Bt(Tu,"gu").replace(/notPunctSpace/g,xu).replace(/punctSpace/g,Bn).replace(/punct/g,ia).getRegex(),Px=Bt(Tu,"gu").replace(/notPunctSpace/g,Mx).replace(/punctSpace/g,Ex).replace(/punct/g,bu).getRegex(),Rx=Bt("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,xu).replace(/punctSpace/g,Bn).replace(/punct/g,ia).getRegex(),qx=Bt(/\\(punct)/,"gu").replace(/punct/g,ia).getRegex(),Nx=Bt(/^<(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(),Wx=Bt(Sn).replace("(?:-->|$)","-->").getRegex(),zx=Bt("^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",Wx).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),qs=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,Hx=Bt(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",qs).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Su=Bt(/^!?\[(label)\]\[(ref)\]/).replace("label",qs).replace("ref",Tn).getRegex(),wu=Bt(/^!?\[(ref)\](?:\[\])?/).replace("ref",Tn).getRegex(),Yx=Bt("reflink|nolink(?!\\()","g").replace("reflink",Su).replace("nolink",wu).getRegex(),Nl=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,_n={_backpedal:$i,anyPunctuation:qx,autolink:Nx,blockSkip:$x,br:Cu,code:Lx,del:$i,emStrongLDelim:Ox,emStrongRDelimAst:Dx,emStrongRDelimUnd:Rx,escape:vx,link:Hx,nolink:wu,punctuation:Ax,reflink:Su,reflinkSearch:Yx,tag:zx,text:Fx,url:$i},Ux={..._n,link:Bt(/^!?\[(label)\]\((.*?)\)/).replace("label",qs).getRegex(),reflink:Bt(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",qs).getRegex()},So={..._n,emStrongRDelimAst:Px,emStrongLDelim:Ix,url:Bt(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",Nl).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:Bt(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",Nl).getRegex()},jx={...So,br:Bt(Cu).replace("{2,}","*").getRegex(),text:Bt(So.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},ns={normal:wn,gfm:Bx,pedantic:_x},yi={normal:_n,gfm:So,breaks:jx,pedantic:Ux},Gx={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Wl=e=>Gx[e];function Fe(e,t){if(t){if(ie.escapeTest.test(e))return e.replace(ie.escapeReplace,Wl)}else if(ie.escapeTestNoEncode.test(e))return e.replace(ie.escapeReplaceNoEncode,Wl);return e}function zl(e){try{e=encodeURI(e).replace(ie.percentDecode,"%")}catch{return null}return e}function Hl(e,t){var a;let r=e.replace(ie.findPipe,(o,n,l)=>{let c=!1,h=n;for(;--h>=0&&l[h]==="\\";)c=!c;return c?"|":" |"}),i=r.split(ie.splitPipe),s=0;if(i[0].trim()||i.shift(),i.length>0&&!((a=i.at(-1))!=null&&a.trim())&&i.pop(),t)if(i.length>t)i.splice(t);else for(;i.length<t;)i.push("");for(;s<i.length;s++)i[s]=i[s].trim().replace(ie.slashPipe,"|");return i}function Ci(e,t,r){let i=e.length;if(i===0)return"";let s=0;for(;s<i&&e.charAt(i-s-1)===t;)s++;return e.slice(0,i-s)}function Xx(e,t){if(e.indexOf(t[1])===-1)return-1;let r=0;for(let i=0;i<e.length;i++)if(e[i]==="\\")i++;else if(e[i]===t[0])r++;else if(e[i]===t[1]&&(r--,r<0))return i;return r>0?-2:-1}function Yl(e,t,r,i,s){let a=t.href,o=t.title||null,n=e[1].replace(s.other.outputLinkReplace,"$1");i.state.inLink=!0;let l={type:e[0].charAt(0)==="!"?"image":"link",raw:r,href:a,title:o,text:n,tokens:i.inlineTokens(n)};return i.state.inLink=!1,l}function Vx(e,t,r){let i=e.match(r.other.indentCodeCompensation);if(i===null)return t;let s=i[1];return t.split(`
166
+ `).map(a=>{let o=a.match(r.other.beginningSpace);if(o===null)return a;let[n]=o;return n.length>=s.length?a.slice(s.length):a}).join(`
167
+ `)}var Ns=class{constructor(t){Ft(this,"options");Ft(this,"rules");Ft(this,"lexer");this.options=t||wr}space(t){let r=this.rules.block.newline.exec(t);if(r&&r[0].length>0)return{type:"space",raw:r[0]}}code(t){let r=this.rules.block.code.exec(t);if(r){let i=r[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:r[0],codeBlockStyle:"indented",text:this.options.pedantic?i:Ci(i,`
168
+ `)}}}fences(t){let r=this.rules.block.fences.exec(t);if(r){let i=r[0],s=Vx(i,r[3]||"",this.rules);return{type:"code",raw:i,lang:r[2]?r[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):r[2],text:s}}}heading(t){let r=this.rules.block.heading.exec(t);if(r){let i=r[2].trim();if(this.rules.other.endingHash.test(i)){let s=Ci(i,"#");(this.options.pedantic||!s||this.rules.other.endingSpaceChar.test(s))&&(i=s.trim())}return{type:"heading",raw:r[0],depth:r[1].length,text:i,tokens:this.lexer.inline(i)}}}hr(t){let r=this.rules.block.hr.exec(t);if(r)return{type:"hr",raw:Ci(r[0],`
169
+ `)}}blockquote(t){let r=this.rules.block.blockquote.exec(t);if(r){let i=Ci(r[0],`
170
+ `).split(`
171
+ `),s="",a="",o=[];for(;i.length>0;){let n=!1,l=[],c;for(c=0;c<i.length;c++)if(this.rules.other.blockquoteStart.test(i[c]))l.push(i[c]),n=!0;else if(!n)l.push(i[c]);else break;i=i.slice(c);let h=l.join(`
172
+ `),d=h.replace(this.rules.other.blockquoteSetextReplace,`
173
+ $1`).replace(this.rules.other.blockquoteSetextReplace2,"");s=s?`${s}
174
+ ${h}`:h,a=a?`${a}
175
+ ${d}`:d;let p=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(d,o,!0),this.lexer.state.top=p,i.length===0)break;let u=o.at(-1);if((u==null?void 0:u.type)==="code")break;if((u==null?void 0:u.type)==="blockquote"){let f=u,m=f.raw+`
176
+ `+i.join(`
177
+ `),y=this.blockquote(m);o[o.length-1]=y,s=s.substring(0,s.length-f.raw.length)+y.raw,a=a.substring(0,a.length-f.text.length)+y.text;break}else if((u==null?void 0:u.type)==="list"){let f=u,m=f.raw+`
178
+ `+i.join(`
179
+ `),y=this.list(m);o[o.length-1]=y,s=s.substring(0,s.length-u.raw.length)+y.raw,a=a.substring(0,a.length-f.raw.length)+y.raw,i=m.substring(o.at(-1).raw.length).split(`
180
+ `);continue}}return{type:"blockquote",raw:s,tokens:o,text:a}}}list(t){let r=this.rules.block.list.exec(t);if(r){let i=r[1].trim(),s=i.length>1,a={type:"list",raw:"",ordered:s,start:s?+i.slice(0,-1):"",loose:!1,items:[]};i=s?`\\d{1,9}\\${i.slice(-1)}`:`\\${i}`,this.options.pedantic&&(i=s?i:"[*+-]");let o=this.rules.other.listItemRegex(i),n=!1;for(;t;){let c=!1,h="",d="";if(!(r=o.exec(t))||this.rules.block.hr.test(t))break;h=r[0],t=t.substring(h.length);let p=r[2].split(`
181
+ `,1)[0].replace(this.rules.other.listReplaceTabs,b=>" ".repeat(3*b.length)),u=t.split(`
182
+ `,1)[0],f=!p.trim(),m=0;if(this.options.pedantic?(m=2,d=p.trimStart()):f?m=r[1].length+1:(m=r[2].search(this.rules.other.nonSpaceChar),m=m>4?1:m,d=p.slice(m),m+=r[1].length),f&&this.rules.other.blankLine.test(u)&&(h+=u+`
183
+ `,t=t.substring(u.length+1),c=!0),!c){let b=this.rules.other.nextBulletRegex(m),k=this.rules.other.hrRegex(m),w=this.rules.other.fencesBeginRegex(m),S=this.rules.other.headingBeginRegex(m),B=this.rules.other.htmlBeginRegex(m);for(;t;){let F=t.split(`
184
+ `,1)[0],v;if(u=F,this.options.pedantic?(u=u.replace(this.rules.other.listReplaceNesting," "),v=u):v=u.replace(this.rules.other.tabCharGlobal," "),w.test(u)||S.test(u)||B.test(u)||b.test(u)||k.test(u))break;if(v.search(this.rules.other.nonSpaceChar)>=m||!u.trim())d+=`
185
+ `+v.slice(m);else{if(f||p.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||w.test(p)||S.test(p)||k.test(p))break;d+=`
186
+ `+u}!f&&!u.trim()&&(f=!0),h+=F+`
187
+ `,t=t.substring(F.length+1),p=v.slice(m)}}a.loose||(n?a.loose=!0:this.rules.other.doubleBlankLine.test(h)&&(n=!0));let y=null,C;this.options.gfm&&(y=this.rules.other.listIsTask.exec(d),y&&(C=y[0]!=="[ ] ",d=d.replace(this.rules.other.listReplaceTask,""))),a.items.push({type:"list_item",raw:h,task:!!y,checked:C,loose:!1,text:d,tokens:[]}),a.raw+=h}let l=a.items.at(-1);if(l)l.raw=l.raw.trimEnd(),l.text=l.text.trimEnd();else return;a.raw=a.raw.trimEnd();for(let c=0;c<a.items.length;c++)if(this.lexer.state.top=!1,a.items[c].tokens=this.lexer.blockTokens(a.items[c].text,[]),!a.loose){let h=a.items[c].tokens.filter(p=>p.type==="space"),d=h.length>0&&h.some(p=>this.rules.other.anyLine.test(p.raw));a.loose=d}if(a.loose)for(let c=0;c<a.items.length;c++)a.items[c].loose=!0;return a}}html(t){let r=this.rules.block.html.exec(t);if(r)return{type:"html",block:!0,raw:r[0],pre:r[1]==="pre"||r[1]==="script"||r[1]==="style",text:r[0]}}def(t){let r=this.rules.block.def.exec(t);if(r){let i=r[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),s=r[2]?r[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",a=r[3]?r[3].substring(1,r[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):r[3];return{type:"def",tag:i,raw:r[0],href:s,title:a}}}table(t){var n;let r=this.rules.block.table.exec(t);if(!r||!this.rules.other.tableDelimiter.test(r[2]))return;let i=Hl(r[1]),s=r[2].replace(this.rules.other.tableAlignChars,"").split("|"),a=(n=r[3])!=null&&n.trim()?r[3].replace(this.rules.other.tableRowBlankLine,"").split(`
188
+ `):[],o={type:"table",raw:r[0],header:[],align:[],rows:[]};if(i.length===s.length){for(let l of s)this.rules.other.tableAlignRight.test(l)?o.align.push("right"):this.rules.other.tableAlignCenter.test(l)?o.align.push("center"):this.rules.other.tableAlignLeft.test(l)?o.align.push("left"):o.align.push(null);for(let l=0;l<i.length;l++)o.header.push({text:i[l],tokens:this.lexer.inline(i[l]),header:!0,align:o.align[l]});for(let l of a)o.rows.push(Hl(l,o.header.length).map((c,h)=>({text:c,tokens:this.lexer.inline(c),header:!1,align:o.align[h]})));return o}}lheading(t){let r=this.rules.block.lheading.exec(t);if(r)return{type:"heading",raw:r[0],depth:r[2].charAt(0)==="="?1:2,text:r[1],tokens:this.lexer.inline(r[1])}}paragraph(t){let r=this.rules.block.paragraph.exec(t);if(r){let i=r[1].charAt(r[1].length-1)===`
189
+ `?r[1].slice(0,-1):r[1];return{type:"paragraph",raw:r[0],text:i,tokens:this.lexer.inline(i)}}}text(t){let r=this.rules.block.text.exec(t);if(r)return{type:"text",raw:r[0],text:r[0],tokens:this.lexer.inline(r[0])}}escape(t){let r=this.rules.inline.escape.exec(t);if(r)return{type:"escape",raw:r[0],text:r[1]}}tag(t){let r=this.rules.inline.tag.exec(t);if(r)return!this.lexer.state.inLink&&this.rules.other.startATag.test(r[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(r[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(r[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(r[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:r[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:r[0]}}link(t){let r=this.rules.inline.link.exec(t);if(r){let i=r[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(i)){if(!this.rules.other.endAngleBracket.test(i))return;let o=Ci(i.slice(0,-1),"\\");if((i.length-o.length)%2===0)return}else{let o=Xx(r[2],"()");if(o===-2)return;if(o>-1){let n=(r[0].indexOf("!")===0?5:4)+r[1].length+o;r[2]=r[2].substring(0,o),r[0]=r[0].substring(0,n).trim(),r[3]=""}}let s=r[2],a="";if(this.options.pedantic){let o=this.rules.other.pedanticHrefTitle.exec(s);o&&(s=o[1],a=o[3])}else a=r[3]?r[3].slice(1,-1):"";return s=s.trim(),this.rules.other.startAngleBracket.test(s)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(i)?s=s.slice(1):s=s.slice(1,-1)),Yl(r,{href:s&&s.replace(this.rules.inline.anyPunctuation,"$1"),title:a&&a.replace(this.rules.inline.anyPunctuation,"$1")},r[0],this.lexer,this.rules)}}reflink(t,r){let i;if((i=this.rules.inline.reflink.exec(t))||(i=this.rules.inline.nolink.exec(t))){let s=(i[2]||i[1]).replace(this.rules.other.multipleSpaceGlobal," "),a=r[s.toLowerCase()];if(!a){let o=i[0].charAt(0);return{type:"text",raw:o,text:o}}return Yl(i,a,i[0],this.lexer,this.rules)}}emStrong(t,r,i=""){let s=this.rules.inline.emStrongLDelim.exec(t);if(!(!s||s[3]&&i.match(this.rules.other.unicodeAlphaNumeric))&&(!(s[1]||s[2])||!i||this.rules.inline.punctuation.exec(i))){let a=[...s[0]].length-1,o,n,l=a,c=0,h=s[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(h.lastIndex=0,r=r.slice(-1*t.length+a);(s=h.exec(r))!=null;){if(o=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!o)continue;if(n=[...o].length,s[3]||s[4]){l+=n;continue}else if((s[5]||s[6])&&a%3&&!((a+n)%3)){c+=n;continue}if(l-=n,l>0)continue;n=Math.min(n,n+l+c);let d=[...s[0]][0].length,p=t.slice(0,a+s.index+d+n);if(Math.min(a,n)%2){let f=p.slice(1,-1);return{type:"em",raw:p,text:f,tokens:this.lexer.inlineTokens(f)}}let u=p.slice(2,-2);return{type:"strong",raw:p,text:u,tokens:this.lexer.inlineTokens(u)}}}}codespan(t){let r=this.rules.inline.code.exec(t);if(r){let i=r[2].replace(this.rules.other.newLineCharGlobal," "),s=this.rules.other.nonSpaceChar.test(i),a=this.rules.other.startingSpaceChar.test(i)&&this.rules.other.endingSpaceChar.test(i);return s&&a&&(i=i.substring(1,i.length-1)),{type:"codespan",raw:r[0],text:i}}}br(t){let r=this.rules.inline.br.exec(t);if(r)return{type:"br",raw:r[0]}}del(t){let r=this.rules.inline.del.exec(t);if(r)return{type:"del",raw:r[0],text:r[2],tokens:this.lexer.inlineTokens(r[2])}}autolink(t){let r=this.rules.inline.autolink.exec(t);if(r){let i,s;return r[2]==="@"?(i=r[1],s="mailto:"+i):(i=r[1],s=i),{type:"link",raw:r[0],text:i,href:s,tokens:[{type:"text",raw:i,text:i}]}}}url(t){var i;let r;if(r=this.rules.inline.url.exec(t)){let s,a;if(r[2]==="@")s=r[0],a="mailto:"+s;else{let o;do o=r[0],r[0]=((i=this.rules.inline._backpedal.exec(r[0]))==null?void 0:i[0])??"";while(o!==r[0]);s=r[0],r[1]==="www."?a="http://"+r[0]:a=r[0]}return{type:"link",raw:r[0],text:s,href:a,tokens:[{type:"text",raw:s,text:s}]}}}inlineText(t){let r=this.rules.inline.text.exec(t);if(r){let i=this.lexer.state.inRawBlock;return{type:"text",raw:r[0],text:r[0],escaped:i}}}},Ce=class wo{constructor(t){Ft(this,"tokens");Ft(this,"options");Ft(this,"state");Ft(this,"tokenizer");Ft(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=t||wr,this.options.tokenizer=this.options.tokenizer||new Ns,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let r={other:ie,block:ns.normal,inline:yi.normal};this.options.pedantic?(r.block=ns.pedantic,r.inline=yi.pedantic):this.options.gfm&&(r.block=ns.gfm,this.options.breaks?r.inline=yi.breaks:r.inline=yi.gfm),this.tokenizer.rules=r}static get rules(){return{block:ns,inline:yi}}static lex(t,r){return new wo(r).lex(t)}static lexInline(t,r){return new wo(r).inlineTokens(t)}lex(t){t=t.replace(ie.carriageReturn,`
190
+ `),this.blockTokens(t,this.tokens);for(let r=0;r<this.inlineQueue.length;r++){let i=this.inlineQueue[r];this.inlineTokens(i.src,i.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,r=[],i=!1){var s,a,o;for(this.options.pedantic&&(t=t.replace(ie.tabCharGlobal," ").replace(ie.spaceLine,""));t;){let n;if((a=(s=this.options.extensions)==null?void 0:s.block)!=null&&a.some(c=>(n=c.call({lexer:this},t,r))?(t=t.substring(n.raw.length),r.push(n),!0):!1))continue;if(n=this.tokenizer.space(t)){t=t.substring(n.raw.length);let c=r.at(-1);n.raw.length===1&&c!==void 0?c.raw+=`
191
+ `:r.push(n);continue}if(n=this.tokenizer.code(t)){t=t.substring(n.raw.length);let c=r.at(-1);(c==null?void 0:c.type)==="paragraph"||(c==null?void 0:c.type)==="text"?(c.raw+=(c.raw.endsWith(`
192
+ `)?"":`
193
+ `)+n.raw,c.text+=`
194
+ `+n.text,this.inlineQueue.at(-1).src=c.text):r.push(n);continue}if(n=this.tokenizer.fences(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.heading(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.hr(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.blockquote(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.list(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.html(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.def(t)){t=t.substring(n.raw.length);let c=r.at(-1);(c==null?void 0:c.type)==="paragraph"||(c==null?void 0:c.type)==="text"?(c.raw+=(c.raw.endsWith(`
195
+ `)?"":`
196
+ `)+n.raw,c.text+=`
197
+ `+n.raw,this.inlineQueue.at(-1).src=c.text):this.tokens.links[n.tag]||(this.tokens.links[n.tag]={href:n.href,title:n.title},r.push(n));continue}if(n=this.tokenizer.table(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.lheading(t)){t=t.substring(n.raw.length),r.push(n);continue}let l=t;if((o=this.options.extensions)!=null&&o.startBlock){let c=1/0,h=t.slice(1),d;this.options.extensions.startBlock.forEach(p=>{d=p.call({lexer:this},h),typeof d=="number"&&d>=0&&(c=Math.min(c,d))}),c<1/0&&c>=0&&(l=t.substring(0,c+1))}if(this.state.top&&(n=this.tokenizer.paragraph(l))){let c=r.at(-1);i&&(c==null?void 0:c.type)==="paragraph"?(c.raw+=(c.raw.endsWith(`
198
+ `)?"":`
199
+ `)+n.raw,c.text+=`
200
+ `+n.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=c.text):r.push(n),i=l.length!==t.length,t=t.substring(n.raw.length);continue}if(n=this.tokenizer.text(t)){t=t.substring(n.raw.length);let c=r.at(-1);(c==null?void 0:c.type)==="text"?(c.raw+=(c.raw.endsWith(`
201
+ `)?"":`
202
+ `)+n.raw,c.text+=`
203
+ `+n.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=c.text):r.push(n);continue}if(t){let c="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(c);break}else throw new Error(c)}}return this.state.top=!0,r}inline(t,r=[]){return this.inlineQueue.push({src:t,tokens:r}),r}inlineTokens(t,r=[]){var l,c,h,d,p;let i=t,s=null;if(this.tokens.links){let u=Object.keys(this.tokens.links);if(u.length>0)for(;(s=this.tokenizer.rules.inline.reflinkSearch.exec(i))!=null;)u.includes(s[0].slice(s[0].lastIndexOf("[")+1,-1))&&(i=i.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(s=this.tokenizer.rules.inline.anyPunctuation.exec(i))!=null;)i=i.slice(0,s.index)+"++"+i.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let a;for(;(s=this.tokenizer.rules.inline.blockSkip.exec(i))!=null;)a=s[2]?s[2].length:0,i=i.slice(0,s.index+a)+"["+"a".repeat(s[0].length-a-2)+"]"+i.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);i=((c=(l=this.options.hooks)==null?void 0:l.emStrongMask)==null?void 0:c.call({lexer:this},i))??i;let o=!1,n="";for(;t;){o||(n=""),o=!1;let u;if((d=(h=this.options.extensions)==null?void 0:h.inline)!=null&&d.some(m=>(u=m.call({lexer:this},t,r))?(t=t.substring(u.raw.length),r.push(u),!0):!1))continue;if(u=this.tokenizer.escape(t)){t=t.substring(u.raw.length),r.push(u);continue}if(u=this.tokenizer.tag(t)){t=t.substring(u.raw.length),r.push(u);continue}if(u=this.tokenizer.link(t)){t=t.substring(u.raw.length),r.push(u);continue}if(u=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(u.raw.length);let m=r.at(-1);u.type==="text"&&(m==null?void 0:m.type)==="text"?(m.raw+=u.raw,m.text+=u.text):r.push(u);continue}if(u=this.tokenizer.emStrong(t,i,n)){t=t.substring(u.raw.length),r.push(u);continue}if(u=this.tokenizer.codespan(t)){t=t.substring(u.raw.length),r.push(u);continue}if(u=this.tokenizer.br(t)){t=t.substring(u.raw.length),r.push(u);continue}if(u=this.tokenizer.del(t)){t=t.substring(u.raw.length),r.push(u);continue}if(u=this.tokenizer.autolink(t)){t=t.substring(u.raw.length),r.push(u);continue}if(!this.state.inLink&&(u=this.tokenizer.url(t))){t=t.substring(u.raw.length),r.push(u);continue}let f=t;if((p=this.options.extensions)!=null&&p.startInline){let m=1/0,y=t.slice(1),C;this.options.extensions.startInline.forEach(b=>{C=b.call({lexer:this},y),typeof C=="number"&&C>=0&&(m=Math.min(m,C))}),m<1/0&&m>=0&&(f=t.substring(0,m+1))}if(u=this.tokenizer.inlineText(f)){t=t.substring(u.raw.length),u.raw.slice(-1)!=="_"&&(n=u.raw.slice(-1)),o=!0;let m=r.at(-1);(m==null?void 0:m.type)==="text"?(m.raw+=u.raw,m.text+=u.text):r.push(u);continue}if(t){let m="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(m);break}else throw new Error(m)}}return r}},Ws=class{constructor(t){Ft(this,"options");Ft(this,"parser");this.options=t||wr}space(t){return""}code({text:t,lang:r,escaped:i}){var o;let s=(o=(r||"").match(ie.notSpaceStart))==null?void 0:o[0],a=t.replace(ie.endingNewline,"")+`
204
+ `;return s?'<pre><code class="language-'+Fe(s)+'">'+(i?a:Fe(a,!0))+`</code></pre>
205
+ `:"<pre><code>"+(i?a:Fe(a,!0))+`</code></pre>
206
+ `}blockquote({tokens:t}){return`<blockquote>
207
+ ${this.parser.parse(t)}</blockquote>
208
+ `}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:r}){return`<h${r}>${this.parser.parseInline(t)}</h${r}>
209
+ `}hr(t){return`<hr>
210
+ `}list(t){let r=t.ordered,i=t.start,s="";for(let n=0;n<t.items.length;n++){let l=t.items[n];s+=this.listitem(l)}let a=r?"ol":"ul",o=r&&i!==1?' start="'+i+'"':"";return"<"+a+o+`>
211
+ `+s+"</"+a+`>
212
+ `}listitem(t){var i;let r="";if(t.task){let s=this.checkbox({checked:!!t.checked});t.loose?((i=t.tokens[0])==null?void 0:i.type)==="paragraph"?(t.tokens[0].text=s+" "+t.tokens[0].text,t.tokens[0].tokens&&t.tokens[0].tokens.length>0&&t.tokens[0].tokens[0].type==="text"&&(t.tokens[0].tokens[0].text=s+" "+Fe(t.tokens[0].tokens[0].text),t.tokens[0].tokens[0].escaped=!0)):t.tokens.unshift({type:"text",raw:s+" ",text:s+" ",escaped:!0}):r+=s+" "}return r+=this.parser.parse(t.tokens,!!t.loose),`<li>${r}</li>
213
+ `}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>
214
+ `}table(t){let r="",i="";for(let a=0;a<t.header.length;a++)i+=this.tablecell(t.header[a]);r+=this.tablerow({text:i});let s="";for(let a=0;a<t.rows.length;a++){let o=t.rows[a];i="";for(let n=0;n<o.length;n++)i+=this.tablecell(o[n]);s+=this.tablerow({text:i})}return s&&(s=`<tbody>${s}</tbody>`),`<table>
215
+ <thead>
216
+ `+r+`</thead>
217
+ `+s+`</table>
218
+ `}tablerow({text:t}){return`<tr>
219
+ ${t}</tr>
220
+ `}tablecell(t){let r=this.parser.parseInline(t.tokens),i=t.header?"th":"td";return(t.align?`<${i} align="${t.align}">`:`<${i}>`)+r+`</${i}>
221
+ `}strong({tokens:t}){return`<strong>${this.parser.parseInline(t)}</strong>`}em({tokens:t}){return`<em>${this.parser.parseInline(t)}</em>`}codespan({text:t}){return`<code>${Fe(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:r,tokens:i}){let s=this.parser.parseInline(i),a=zl(t);if(a===null)return s;t=a;let o='<a href="'+t+'"';return r&&(o+=' title="'+Fe(r)+'"'),o+=">"+s+"</a>",o}image({href:t,title:r,text:i,tokens:s}){s&&(i=this.parser.parseInline(s,this.parser.textRenderer));let a=zl(t);if(a===null)return Fe(i);t=a;let o=`<img src="${t}" alt="${i}"`;return r&&(o+=` title="${Fe(r)}"`),o+=">",o}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:Fe(t.text)}},vn=class{strong({text:t}){return t}em({text:t}){return t}codespan({text:t}){return t}del({text:t}){return t}html({text:t}){return t}text({text:t}){return t}link({text:t}){return""+t}image({text:t}){return""+t}br(){return""}},xe=class Bo{constructor(t){Ft(this,"options");Ft(this,"renderer");Ft(this,"textRenderer");this.options=t||wr,this.options.renderer=this.options.renderer||new Ws,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new vn}static parse(t,r){return new Bo(r).parse(t)}static parseInline(t,r){return new Bo(r).parseInline(t)}parse(t,r=!0){var s,a;let i="";for(let o=0;o<t.length;o++){let n=t[o];if((a=(s=this.options.extensions)==null?void 0:s.renderers)!=null&&a[n.type]){let c=n,h=this.options.extensions.renderers[c.type].call({parser:this},c);if(h!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(c.type)){i+=h||"";continue}}let l=n;switch(l.type){case"space":{i+=this.renderer.space(l);continue}case"hr":{i+=this.renderer.hr(l);continue}case"heading":{i+=this.renderer.heading(l);continue}case"code":{i+=this.renderer.code(l);continue}case"table":{i+=this.renderer.table(l);continue}case"blockquote":{i+=this.renderer.blockquote(l);continue}case"list":{i+=this.renderer.list(l);continue}case"html":{i+=this.renderer.html(l);continue}case"def":{i+=this.renderer.def(l);continue}case"paragraph":{i+=this.renderer.paragraph(l);continue}case"text":{let c=l,h=this.renderer.text(c);for(;o+1<t.length&&t[o+1].type==="text";)c=t[++o],h+=`
222
+ `+this.renderer.text(c);r?i+=this.renderer.paragraph({type:"paragraph",raw:h,text:h,tokens:[{type:"text",raw:h,text:h,escaped:!0}]}):i+=h;continue}default:{let c='Token with "'+l.type+'" type was not found.';if(this.options.silent)return console.error(c),"";throw new Error(c)}}}return i}parseInline(t,r=this.renderer){var s,a;let i="";for(let o=0;o<t.length;o++){let n=t[o];if((a=(s=this.options.extensions)==null?void 0:s.renderers)!=null&&a[n.type]){let c=this.options.extensions.renderers[n.type].call({parser:this},n);if(c!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(n.type)){i+=c||"";continue}}let l=n;switch(l.type){case"escape":{i+=r.text(l);break}case"html":{i+=r.html(l);break}case"link":{i+=r.link(l);break}case"image":{i+=r.image(l);break}case"strong":{i+=r.strong(l);break}case"em":{i+=r.em(l);break}case"codespan":{i+=r.codespan(l);break}case"br":{i+=r.br(l);break}case"del":{i+=r.del(l);break}case"text":{i+=r.text(l);break}default:{let c='Token with "'+l.type+'" type was not found.';if(this.options.silent)return console.error(c),"";throw new Error(c)}}}return i}},ps,Bi=(ps=class{constructor(t){Ft(this,"options");Ft(this,"block");this.options=t||wr}preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}emStrongMask(t){return t}provideLexer(){return this.block?Ce.lex:Ce.lexInline}provideParser(){return this.block?xe.parse:xe.parseInline}},Ft(ps,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens","emStrongMask"])),Ft(ps,"passThroughHooksRespectAsync",new Set(["preprocess","postprocess","processAllTokens"])),ps),Zx=class{constructor(...t){Ft(this,"defaults",xn());Ft(this,"options",this.setOptions);Ft(this,"parse",this.parseMarkdown(!0));Ft(this,"parseInline",this.parseMarkdown(!1));Ft(this,"Parser",xe);Ft(this,"Renderer",Ws);Ft(this,"TextRenderer",vn);Ft(this,"Lexer",Ce);Ft(this,"Tokenizer",Ns);Ft(this,"Hooks",Bi);this.use(...t)}walkTokens(t,r){var s,a;let i=[];for(let o of t)switch(i=i.concat(r.call(this,o)),o.type){case"table":{let n=o;for(let l of n.header)i=i.concat(this.walkTokens(l.tokens,r));for(let l of n.rows)for(let c of l)i=i.concat(this.walkTokens(c.tokens,r));break}case"list":{let n=o;i=i.concat(this.walkTokens(n.items,r));break}default:{let n=o;(a=(s=this.defaults.extensions)==null?void 0:s.childTokens)!=null&&a[n.type]?this.defaults.extensions.childTokens[n.type].forEach(l=>{let c=n[l].flat(1/0);i=i.concat(this.walkTokens(c,r))}):n.tokens&&(i=i.concat(this.walkTokens(n.tokens,r)))}}return i}use(...t){let r=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(i=>{let s={...i};if(s.async=this.defaults.async||s.async||!1,i.extensions&&(i.extensions.forEach(a=>{if(!a.name)throw new Error("extension name required");if("renderer"in a){let o=r.renderers[a.name];o?r.renderers[a.name]=function(...n){let l=a.renderer.apply(this,n);return l===!1&&(l=o.apply(this,n)),l}:r.renderers[a.name]=a.renderer}if("tokenizer"in a){if(!a.level||a.level!=="block"&&a.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let o=r[a.level];o?o.unshift(a.tokenizer):r[a.level]=[a.tokenizer],a.start&&(a.level==="block"?r.startBlock?r.startBlock.push(a.start):r.startBlock=[a.start]:a.level==="inline"&&(r.startInline?r.startInline.push(a.start):r.startInline=[a.start]))}"childTokens"in a&&a.childTokens&&(r.childTokens[a.name]=a.childTokens)}),s.extensions=r),i.renderer){let a=this.defaults.renderer||new Ws(this.defaults);for(let o in i.renderer){if(!(o in a))throw new Error(`renderer '${o}' does not exist`);if(["options","parser"].includes(o))continue;let n=o,l=i.renderer[n],c=a[n];a[n]=(...h)=>{let d=l.apply(a,h);return d===!1&&(d=c.apply(a,h)),d||""}}s.renderer=a}if(i.tokenizer){let a=this.defaults.tokenizer||new Ns(this.defaults);for(let o in i.tokenizer){if(!(o in a))throw new Error(`tokenizer '${o}' does not exist`);if(["options","rules","lexer"].includes(o))continue;let n=o,l=i.tokenizer[n],c=a[n];a[n]=(...h)=>{let d=l.apply(a,h);return d===!1&&(d=c.apply(a,h)),d}}s.tokenizer=a}if(i.hooks){let a=this.defaults.hooks||new Bi;for(let o in i.hooks){if(!(o in a))throw new Error(`hook '${o}' does not exist`);if(["options","block"].includes(o))continue;let n=o,l=i.hooks[n],c=a[n];Bi.passThroughHooks.has(o)?a[n]=h=>{if(this.defaults.async&&Bi.passThroughHooksRespectAsync.has(o))return(async()=>{let p=await l.call(a,h);return c.call(a,p)})();let d=l.call(a,h);return c.call(a,d)}:a[n]=(...h)=>{if(this.defaults.async)return(async()=>{let p=await l.apply(a,h);return p===!1&&(p=await c.apply(a,h)),p})();let d=l.apply(a,h);return d===!1&&(d=c.apply(a,h)),d}}s.hooks=a}if(i.walkTokens){let a=this.defaults.walkTokens,o=i.walkTokens;s.walkTokens=function(n){let l=[];return l.push(o.call(this,n)),a&&(l=l.concat(a.call(this,n))),l}}this.defaults={...this.defaults,...s}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,r){return Ce.lex(t,r??this.defaults)}parser(t,r){return xe.parse(t,r??this.defaults)}parseMarkdown(t){return(r,i)=>{let s={...i},a={...this.defaults,...s},o=this.onError(!!a.silent,!!a.async);if(this.defaults.async===!0&&s.async===!1)return o(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof r>"u"||r===null)return o(new Error("marked(): input parameter is undefined or null"));if(typeof r!="string")return o(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));if(a.hooks&&(a.hooks.options=a,a.hooks.block=t),a.async)return(async()=>{let n=a.hooks?await a.hooks.preprocess(r):r,l=await(a.hooks?await a.hooks.provideLexer():t?Ce.lex:Ce.lexInline)(n,a),c=a.hooks?await a.hooks.processAllTokens(l):l;a.walkTokens&&await Promise.all(this.walkTokens(c,a.walkTokens));let h=await(a.hooks?await a.hooks.provideParser():t?xe.parse:xe.parseInline)(c,a);return a.hooks?await a.hooks.postprocess(h):h})().catch(o);try{a.hooks&&(r=a.hooks.preprocess(r));let n=(a.hooks?a.hooks.provideLexer():t?Ce.lex:Ce.lexInline)(r,a);a.hooks&&(n=a.hooks.processAllTokens(n)),a.walkTokens&&this.walkTokens(n,a.walkTokens);let l=(a.hooks?a.hooks.provideParser():t?xe.parse:xe.parseInline)(n,a);return a.hooks&&(l=a.hooks.postprocess(l)),l}catch(n){return o(n)}}}onError(t,r){return i=>{if(i.message+=`
223
+ Please report this to https://github.com/markedjs/marked.`,t){let s="<p>An error occurred:</p><pre>"+Fe(i.message+"",!0)+"</pre>";return r?Promise.resolve(s):s}if(r)return Promise.reject(i);throw i}}},Tr=new Zx;function vt(e,t){return Tr.parse(e,t)}vt.options=vt.setOptions=function(e){return Tr.setOptions(e),vt.defaults=Tr.defaults,gu(vt.defaults),vt};vt.getDefaults=xn;vt.defaults=wr;vt.use=function(...e){return Tr.use(...e),vt.defaults=Tr.defaults,gu(vt.defaults),vt};vt.walkTokens=function(e,t){return Tr.walkTokens(e,t)};vt.parseInline=Tr.parseInline;vt.Parser=xe;vt.parser=xe.parse;vt.Renderer=Ws;vt.TextRenderer=vn;vt.Lexer=Ce;vt.lexer=Ce.lex;vt.Tokenizer=Ns;vt.Hooks=Bi;vt.parse=vt;vt.options;vt.setOptions;vt.use;vt.walkTokens;vt.parseInline;xe.parse;Ce.lex;function Bu(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var i=Array.from(typeof e=="string"?[e]:e);i[i.length-1]=i[i.length-1].replace(/\r?\n([\t ]*)$/,"");var s=i.reduce(function(n,l){var c=l.match(/\n([\t ]+|(?!\s).)/g);return c?n.concat(c.map(function(h){var d,p;return(p=(d=h.match(/[\t ]/g))===null||d===void 0?void 0:d.length)!==null&&p!==void 0?p:0})):n},[]);if(s.length){var a=new RegExp(`
224
+ [ ]{`.concat(Math.min.apply(Math,s),"}"),"g");i=i.map(function(n){return n.replace(a,`
225
+ `)})}i[0]=i[0].replace(/^\r?\n/,"");var o=i[0];return t.forEach(function(n,l){var c=o.match(/(?:^|\n)( *)$/),h=c?c[1]:"",d=n;typeof n=="string"&&n.includes(`
226
+ `)&&(d=String(n).split(`
227
+ `).map(function(p,u){return u===0?p:"".concat(h).concat(p)}).join(`
228
+ `)),o+=d+i[l+1]}),o}function _u(e,{markdownAutoWrap:t}){const i=e.replace(/<br\/>/g,`
229
+ `).replace(/\n{2,}/g,`
230
+ `);return Bu(i)}g(_u,"preprocessMarkdown");function vu(e){return e.split(/\\n|\n|<br\s*\/?>/gi).map(t=>{var r;return((r=t.trim().match(/<[^>]+>|[^\s<>]+/g))==null?void 0:r.map(i=>({content:i,type:"normal"})))??[]})}g(vu,"nonMarkdownToLines");function Lu(e,t={}){const r=_u(e,t),i=vt.lexer(r),s=[[]];let a=0;function o(n,l="normal"){n.type==="text"?n.text.split(`
231
+ `).forEach((h,d)=>{d!==0&&(a++,s.push([])),h.split(" ").forEach(p=>{p=p.replace(/&#39;/g,"'"),p&&s[a].push({content:p,type:l})})}):n.type==="strong"||n.type==="em"?n.tokens.forEach(c=>{o(c,n.type)}):n.type==="html"&&s[a].push({content:n.text,type:"normal"})}return g(o,"processNode"),i.forEach(n=>{var l;n.type==="paragraph"?(l=n.tokens)==null||l.forEach(c=>{o(c)}):n.type==="html"?s[a].push({content:n.text,type:"normal"}):s[a].push({content:n.raw,type:"normal"})}),s}g(Lu,"markdownToLines");function Fu(e){return e?`<p>${e.replace(/\\n|\n/g,"<br />")}</p>`:""}g(Fu,"nonMarkdownToHTML");function Au(e,{markdownAutoWrap:t}={}){const r=vt.lexer(e);function i(s){var a,o,n;return s.type==="text"?t===!1?s.text.replace(/\n */g,"<br/>").replace(/ /g,"&nbsp;"):s.text.replace(/\n */g,"<br/>"):s.type==="strong"?`<strong>${(a=s.tokens)==null?void 0:a.map(i).join("")}</strong>`:s.type==="em"?`<em>${(o=s.tokens)==null?void 0:o.map(i).join("")}</em>`:s.type==="paragraph"?`<p>${(n=s.tokens)==null?void 0:n.map(i).join("")}</p>`:s.type==="space"?"":s.type==="html"?`${s.text}`:s.type==="escape"?s.text:(H.warn(`Unsupported markdown: ${s.type}`),s.raw)}return g(i,"output"),r.map(i).join("")}g(Au,"markdownToHTML");function Eu(e){return Intl.Segmenter?[...new Intl.Segmenter().segment(e)].map(t=>t.segment):[...e]}g(Eu,"splitTextToChars");function Mu(e,t){const r=Eu(t.content);return Ln(e,[],r,t.type)}g(Mu,"splitWordToFitWidth");function Ln(e,t,r,i){if(r.length===0)return[{content:t.join(""),type:i},{content:"",type:i}];const[s,...a]=r,o=[...t,s];return e([{content:o.join(""),type:i}])?Ln(e,o,a,i):(t.length===0&&s&&(t.push(s),r.shift()),[{content:t.join(""),type:i},{content:r.join(""),type:i}])}g(Ln,"splitWordToFitWidthRecursion");function $u(e,t){if(e.some(({content:r})=>r.includes(`
232
+ `)))throw new Error("splitLineToFitWidth does not support newlines in the line");return zs(e,t)}g($u,"splitLineToFitWidth");function zs(e,t,r=[],i=[]){if(e.length===0)return i.length>0&&r.push(i),r.length>0?r:[];let s="";e[0].content===" "&&(s=" ",e.shift());const a=e.shift()??{content:" ",type:"normal"},o=[...i];if(s!==""&&o.push({content:s,type:"normal"}),o.push(a),t(o))return zs(e,t,r,o);if(i.length>0)r.push(i),e.unshift(a);else if(a.content){const[n,l]=Mu(t,a);r.push([n]),l.content&&e.unshift(l)}return zs(e,t,r)}g(zs,"splitLineToFitWidthRecursion");function _o(e,t){t&&e.attr("style",t)}g(_o,"applyStyle");var Ul=16384;async function Ou(e,t,r,i,s=!1,a=Mt()){const o=e.append("foreignObject");o.attr("width",`${Math.min(10*r,Ul)}px`),o.attr("height",`${Math.min(10*r,Ul)}px`);const n=o.append("xhtml:div"),l=Ii(t.label)?await zh(t.label.replace(Yi.lineBreakRegex,`
233
+ `),a):Se(t.label,a),c=t.isNode?"nodeLabel":"edgeLabel",h=n.append("span");h.html(l),_o(h,t.labelStyle),h.attr("class",`${c} ${i}`),_o(n,t.labelStyle),n.style("display","table-cell"),n.style("white-space","nowrap"),n.style("line-height","1.5"),r!==Number.POSITIVE_INFINITY&&(n.style("max-width",r+"px"),n.style("text-align","center")),n.attr("xmlns","http://www.w3.org/1999/xhtml"),s&&n.attr("class","labelBkg");let d=n.node().getBoundingClientRect();return d.width===r&&(n.style("display","table"),n.style("white-space","break-spaces"),n.style("width",r+"px"),d=n.node().getBoundingClientRect()),o.node()}g(Ou,"addHtmlSpan");function sa(e,t,r,i=!1){const s=e.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",t*r-.1+"em").attr("dy",r+"em");return i&&s.attr("text-anchor","middle"),s}g(sa,"createTspan");function Iu(e,t,r){const i=e.append("text"),s=sa(i,1,t);aa(s,r);const a=s.node().getComputedTextLength();return i.remove(),a}g(Iu,"computeWidthOfText");function Qx(e,t,r){var o;const i=e.append("text"),s=sa(i,1,t);aa(s,[{content:r,type:"normal"}]);const a=(o=s.node())==null?void 0:o.getBoundingClientRect();return a&&i.remove(),a}g(Qx,"computeDimensionOfText");function Du(e,t,r,i=!1,s=!1){const o=t.append("g"),n=o.insert("rect").attr("class","background").attr("style","stroke: none"),l=o.append("text").attr("y","-10.1");s&&l.attr("text-anchor","middle");let c=0;for(const h of r){const d=g(u=>Iu(o,1.1,u)<=e,"checkWidth"),p=d(h)?[h]:$u(h,d);for(const u of p){const f=sa(l,c,1.1,s);aa(f,u),c++}}if(i){const h=l.node().getBBox(),d=2;return n.attr("x",h.x-d).attr("y",h.y-d).attr("width",h.width+2*d).attr("height",h.height+2*d),o.node()}else return l.node()}g(Du,"createFormattedText");function vo(e){const t=/&(amp|lt|gt);/g;return e.replace(t,(r,i)=>{switch(i){case"amp":return"&";case"lt":return"<";case"gt":return">";default:return r}})}g(vo,"decodeHTMLEntities");function aa(e,t){e.text(""),t.forEach((r,i)=>{const s=e.append("tspan").attr("font-style",r.type==="em"?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight",r.type==="strong"?"bold":"normal");i===0?s.text(vo(r.content)):s.text(" "+vo(r.content))})}g(aa,"updateTextContentAndStyles");async function Pu(e,t={}){const r=[];e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(s,a,o)=>(r.push((async()=>{const n=`${a}:${o}`;return await px(n)?await Gi(n,void 0,{class:"label-icon"}):`<i class='${Se(s,t).replace(":"," ")}'></i>`})()),s));const i=await Promise.all(r);return e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>i.shift()??"")}g(Pu,"replaceIconSubstring");var Pe=g(async(e,t="",{style:r="",isTitle:i=!1,classes:s="",useHtmlLabels:a=!0,markdown:o=!0,isNode:n=!0,width:l=200,addSvgBackground:c=!1}={},h)=>{if(H.debug("XYZ createText",t,r,i,s,a,n,"addSvgBackground: ",c),a){const d=o?Au(t,h):Fu(t),p=await Pu(kr(d),h),u=t.replace(/\\\\/g,"\\"),f={isNode:n,label:Ii(t)?u:p,labelStyle:r.replace("fill:","color:")};return await Ou(e,f,l,s,c,h)}else{const d=kr(t.replace(/<br\s*\/?>/g,"<br/>")),p=o?Lu(d.replace("<br>","<br/>"),h):vu(d),u=Du(l,e,p,t?c:!1,!n);if(n){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));const f=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");xt(u).attr("style",f)}else{const f=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");xt(u).select("rect").attr("style",f.replace(/background:/g,"fill:"));const m=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");xt(u).select("text").attr("style",m)}return i?xt(u).selectAll("tspan.text-outer-tspan").classed("title-row",!0):xt(u).selectAll("tspan.text-outer-tspan").classed("row",!0),u}},"createText");function Ra(e,t,r){if(e&&e.length){const[i,s]=t,a=Math.PI/180*r,o=Math.cos(a),n=Math.sin(a);for(const l of e){const[c,h]=l;l[0]=(c-i)*o-(h-s)*n+i,l[1]=(c-i)*n+(h-s)*o+s}}}function Kx(e,t){return e[0]===t[0]&&e[1]===t[1]}function Jx(e,t,r,i=1){const s=r,a=Math.max(t,.1),o=e[0]&&e[0][0]&&typeof e[0][0]=="number"?[e]:e,n=[0,0];if(s)for(const c of o)Ra(c,n,s);const l=(function(c,h,d){const p=[];for(const b of c){const k=[...b];Kx(k[0],k[k.length-1])||k.push([k[0][0],k[0][1]]),k.length>2&&p.push(k)}const u=[];h=Math.max(h,.1);const f=[];for(const b of p)for(let k=0;k<b.length-1;k++){const w=b[k],S=b[k+1];if(w[1]!==S[1]){const B=Math.min(w[1],S[1]);f.push({ymin:B,ymax:Math.max(w[1],S[1]),x:B===w[1]?w[0]:S[0],islope:(S[0]-w[0])/(S[1]-w[1])})}}if(f.sort(((b,k)=>b.ymin<k.ymin?-1:b.ymin>k.ymin?1:b.x<k.x?-1:b.x>k.x?1:b.ymax===k.ymax?0:(b.ymax-k.ymax)/Math.abs(b.ymax-k.ymax))),!f.length)return u;let m=[],y=f[0].ymin,C=0;for(;m.length||f.length;){if(f.length){let b=-1;for(let k=0;k<f.length&&!(f[k].ymin>y);k++)b=k;f.splice(0,b+1).forEach((k=>{m.push({s:y,edge:k})}))}if(m=m.filter((b=>!(b.edge.ymax<=y))),m.sort(((b,k)=>b.edge.x===k.edge.x?0:(b.edge.x-k.edge.x)/Math.abs(b.edge.x-k.edge.x))),(d!==1||C%h==0)&&m.length>1)for(let b=0;b<m.length;b+=2){const k=b+1;if(k>=m.length)break;const w=m[b].edge,S=m[k].edge;u.push([[Math.round(w.x),y],[Math.round(S.x),y]])}y+=d,m.forEach((b=>{b.edge.x=b.edge.x+d*b.edge.islope})),C++}return u})(o,a,i);if(s){for(const c of o)Ra(c,n,-s);(function(c,h,d){const p=[];c.forEach((u=>p.push(...u))),Ra(p,h,d)})(l,n,-s)}return l}function Vi(e,t){var r;const i=t.hachureAngle+90;let s=t.hachureGap;s<0&&(s=4*t.strokeWidth),s=Math.round(Math.max(s,.1));let a=1;return t.roughness>=1&&(((r=t.randomizer)===null||r===void 0?void 0:r.next())||Math.random())>.7&&(a=s),Jx(e,s,i,a||1)}class Fn{constructor(t){this.helper=t}fillPolygons(t,r){return this._fillPolygons(t,r)}_fillPolygons(t,r){const i=Vi(t,r);return{type:"fillSketch",ops:this.renderLines(i,r)}}renderLines(t,r){const i=[];for(const s of t)i.push(...this.helper.doubleLineOps(s[0][0],s[0][1],s[1][0],s[1][1],r));return i}}function oa(e){const t=e[0],r=e[1];return Math.sqrt(Math.pow(t[0]-r[0],2)+Math.pow(t[1]-r[1],2))}class tb extends Fn{fillPolygons(t,r){let i=r.hachureGap;i<0&&(i=4*r.strokeWidth),i=Math.max(i,.1);const s=Vi(t,Object.assign({},r,{hachureGap:i})),a=Math.PI/180*r.hachureAngle,o=[],n=.5*i*Math.cos(a),l=.5*i*Math.sin(a);for(const[c,h]of s)oa([c,h])&&o.push([[c[0]-n,c[1]+l],[...h]],[[c[0]+n,c[1]-l],[...h]]);return{type:"fillSketch",ops:this.renderLines(o,r)}}}class eb extends Fn{fillPolygons(t,r){const i=this._fillPolygons(t,r),s=Object.assign({},r,{hachureAngle:r.hachureAngle+90}),a=this._fillPolygons(t,s);return i.ops=i.ops.concat(a.ops),i}}class rb{constructor(t){this.helper=t}fillPolygons(t,r){const i=Vi(t,r=Object.assign({},r,{hachureAngle:0}));return this.dotsOnLines(i,r)}dotsOnLines(t,r){const i=[];let s=r.hachureGap;s<0&&(s=4*r.strokeWidth),s=Math.max(s,.1);let a=r.fillWeight;a<0&&(a=r.strokeWidth/2);const o=s/4;for(const n of t){const l=oa(n),c=l/s,h=Math.ceil(c)-1,d=l-h*s,p=(n[0][0]+n[1][0])/2-s/4,u=Math.min(n[0][1],n[1][1]);for(let f=0;f<h;f++){const m=u+d+f*s,y=p-o+2*Math.random()*o,C=m-o+2*Math.random()*o,b=this.helper.ellipse(y,C,a,a,r);i.push(...b.ops)}}return{type:"fillSketch",ops:i}}}class ib{constructor(t){this.helper=t}fillPolygons(t,r){const i=Vi(t,r);return{type:"fillSketch",ops:this.dashedLine(i,r)}}dashedLine(t,r){const i=r.dashOffset<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashOffset,s=r.dashGap<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashGap,a=[];return t.forEach((o=>{const n=oa(o),l=Math.floor(n/(i+s)),c=(n+s-l*(i+s))/2;let h=o[0],d=o[1];h[0]>d[0]&&(h=o[1],d=o[0]);const p=Math.atan((d[1]-h[1])/(d[0]-h[0]));for(let u=0;u<l;u++){const f=u*(i+s),m=f+i,y=[h[0]+f*Math.cos(p)+c*Math.cos(p),h[1]+f*Math.sin(p)+c*Math.sin(p)],C=[h[0]+m*Math.cos(p)+c*Math.cos(p),h[1]+m*Math.sin(p)+c*Math.sin(p)];a.push(...this.helper.doubleLineOps(y[0],y[1],C[0],C[1],r))}})),a}}class sb{constructor(t){this.helper=t}fillPolygons(t,r){const i=r.hachureGap<0?4*r.strokeWidth:r.hachureGap,s=r.zigzagOffset<0?i:r.zigzagOffset,a=Vi(t,r=Object.assign({},r,{hachureGap:i+s}));return{type:"fillSketch",ops:this.zigzagLines(a,s,r)}}zigzagLines(t,r,i){const s=[];return t.forEach((a=>{const o=oa(a),n=Math.round(o/(2*r));let l=a[0],c=a[1];l[0]>c[0]&&(l=a[1],c=a[0]);const h=Math.atan((c[1]-l[1])/(c[0]-l[0]));for(let d=0;d<n;d++){const p=2*d*r,u=2*(d+1)*r,f=Math.sqrt(2*Math.pow(r,2)),m=[l[0]+p*Math.cos(h),l[1]+p*Math.sin(h)],y=[l[0]+u*Math.cos(h),l[1]+u*Math.sin(h)],C=[m[0]+f*Math.cos(h+Math.PI/4),m[1]+f*Math.sin(h+Math.PI/4)];s.push(...this.helper.doubleLineOps(m[0],m[1],C[0],C[1],i),...this.helper.doubleLineOps(C[0],C[1],y[0],y[1],i))}})),s}}const oe={};class ab{constructor(t){this.seed=t}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}}const ob=0,qa=1,jl=2,ls={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 Na(e,t){return e.type===t}function An(e){const t=[],r=(function(o){const n=new Array;for(;o!=="";)if(o.match(/^([ \t\r\n,]+)/))o=o.substr(RegExp.$1.length);else if(o.match(/^([aAcChHlLmMqQsStTvVzZ])/))n[n.length]={type:ob,text:RegExp.$1},o=o.substr(RegExp.$1.length);else{if(!o.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];n[n.length]={type:qa,text:`${parseFloat(RegExp.$1)}`},o=o.substr(RegExp.$1.length)}return n[n.length]={type:jl,text:""},n})(e);let i="BOD",s=0,a=r[s];for(;!Na(a,jl);){let o=0;const n=[];if(i==="BOD"){if(a.text!=="M"&&a.text!=="m")return An("M0,0"+e);s++,o=ls[a.text],i=a.text}else Na(a,qa)?o=ls[i]:(s++,o=ls[a.text],i=a.text);if(!(s+o<r.length))throw new Error("Path data ended short");for(let l=s;l<s+o;l++){const c=r[l];if(!Na(c,qa))throw new Error("Param not a number: "+i+","+c.text);n[n.length]=+c.text}if(typeof ls[i]!="number")throw new Error("Bad segment: "+i);{const l={key:i,data:n};t.push(l),s+=o,a=r[s],i==="M"&&(i="L"),i==="m"&&(i="l")}}return t}function Ru(e){let t=0,r=0,i=0,s=0;const a=[];for(const{key:o,data:n}of e)switch(o){case"M":a.push({key:"M",data:[...n]}),[t,r]=n,[i,s]=n;break;case"m":t+=n[0],r+=n[1],a.push({key:"M",data:[t,r]}),i=t,s=r;break;case"L":a.push({key:"L",data:[...n]}),[t,r]=n;break;case"l":t+=n[0],r+=n[1],a.push({key:"L",data:[t,r]});break;case"C":a.push({key:"C",data:[...n]}),t=n[4],r=n[5];break;case"c":{const l=n.map(((c,h)=>h%2?c+r:c+t));a.push({key:"C",data:l}),t=l[4],r=l[5];break}case"Q":a.push({key:"Q",data:[...n]}),t=n[2],r=n[3];break;case"q":{const l=n.map(((c,h)=>h%2?c+r:c+t));a.push({key:"Q",data:l}),t=l[2],r=l[3];break}case"A":a.push({key:"A",data:[...n]}),t=n[5],r=n[6];break;case"a":t+=n[5],r+=n[6],a.push({key:"A",data:[n[0],n[1],n[2],n[3],n[4],t,r]});break;case"H":a.push({key:"H",data:[...n]}),t=n[0];break;case"h":t+=n[0],a.push({key:"H",data:[t]});break;case"V":a.push({key:"V",data:[...n]}),r=n[0];break;case"v":r+=n[0],a.push({key:"V",data:[r]});break;case"S":a.push({key:"S",data:[...n]}),t=n[2],r=n[3];break;case"s":{const l=n.map(((c,h)=>h%2?c+r:c+t));a.push({key:"S",data:l}),t=l[2],r=l[3];break}case"T":a.push({key:"T",data:[...n]}),t=n[0],r=n[1];break;case"t":t+=n[0],r+=n[1],a.push({key:"T",data:[t,r]});break;case"Z":case"z":a.push({key:"Z",data:[]}),t=i,r=s}return a}function qu(e){const t=[];let r="",i=0,s=0,a=0,o=0,n=0,l=0;for(const{key:c,data:h}of e){switch(c){case"M":t.push({key:"M",data:[...h]}),[i,s]=h,[a,o]=h;break;case"C":t.push({key:"C",data:[...h]}),i=h[4],s=h[5],n=h[2],l=h[3];break;case"L":t.push({key:"L",data:[...h]}),[i,s]=h;break;case"H":i=h[0],t.push({key:"L",data:[i,s]});break;case"V":s=h[0],t.push({key:"L",data:[i,s]});break;case"S":{let d=0,p=0;r==="C"||r==="S"?(d=i+(i-n),p=s+(s-l)):(d=i,p=s),t.push({key:"C",data:[d,p,...h]}),n=h[0],l=h[1],i=h[2],s=h[3];break}case"T":{const[d,p]=h;let u=0,f=0;r==="Q"||r==="T"?(u=i+(i-n),f=s+(s-l)):(u=i,f=s);const m=i+2*(u-i)/3,y=s+2*(f-s)/3,C=d+2*(u-d)/3,b=p+2*(f-p)/3;t.push({key:"C",data:[m,y,C,b,d,p]}),n=u,l=f,i=d,s=p;break}case"Q":{const[d,p,u,f]=h,m=i+2*(d-i)/3,y=s+2*(p-s)/3,C=u+2*(d-u)/3,b=f+2*(p-f)/3;t.push({key:"C",data:[m,y,C,b,u,f]}),n=d,l=p,i=u,s=f;break}case"A":{const d=Math.abs(h[0]),p=Math.abs(h[1]),u=h[2],f=h[3],m=h[4],y=h[5],C=h[6];d===0||p===0?(t.push({key:"C",data:[i,s,y,C,y,C]}),i=y,s=C):(i!==y||s!==C)&&(Nu(i,s,y,C,d,p,u,f,m).forEach((function(b){t.push({key:"C",data:b})})),i=y,s=C);break}case"Z":t.push({key:"Z",data:[]}),i=a,s=o}r=c}return t}function xi(e,t,r){return[e*Math.cos(r)-t*Math.sin(r),e*Math.sin(r)+t*Math.cos(r)]}function Nu(e,t,r,i,s,a,o,n,l,c){const h=(d=o,Math.PI*d/180);var d;let p=[],u=0,f=0,m=0,y=0;if(c)[u,f,m,y]=c;else{[e,t]=xi(e,t,-h),[r,i]=xi(r,i,-h);const W=(e-r)/2,O=(t-i)/2;let A=W*W/(s*s)+O*O/(a*a);A>1&&(A=Math.sqrt(A),s*=A,a*=A);const _=s*s,$=a*a,E=_*$-_*O*O-$*W*W,N=_*O*O+$*W*W,Y=(n===l?-1:1)*Math.sqrt(Math.abs(E/N));m=Y*s*O/a+(e+r)/2,y=Y*-a*W/s+(t+i)/2,u=Math.asin(parseFloat(((t-y)/a).toFixed(9))),f=Math.asin(parseFloat(((i-y)/a).toFixed(9))),e<m&&(u=Math.PI-u),r<m&&(f=Math.PI-f),u<0&&(u=2*Math.PI+u),f<0&&(f=2*Math.PI+f),l&&u>f&&(u-=2*Math.PI),!l&&f>u&&(f-=2*Math.PI)}let C=f-u;if(Math.abs(C)>120*Math.PI/180){const W=f,O=r,A=i;f=l&&f>u?u+120*Math.PI/180*1:u+120*Math.PI/180*-1,p=Nu(r=m+s*Math.cos(f),i=y+a*Math.sin(f),O,A,s,a,o,0,l,[f,W,m,y])}C=f-u;const b=Math.cos(u),k=Math.sin(u),w=Math.cos(f),S=Math.sin(f),B=Math.tan(C/4),F=4/3*s*B,v=4/3*a*B,z=[e,t],q=[e+F*k,t-v*b],M=[r+F*S,i-v*w],U=[r,i];if(q[0]=2*z[0]-q[0],q[1]=2*z[1]-q[1],c)return[q,M,U].concat(p);{p=[q,M,U].concat(p);const W=[];for(let O=0;O<p.length;O+=3){const A=xi(p[O][0],p[O][1],h),_=xi(p[O+1][0],p[O+1][1],h),$=xi(p[O+2][0],p[O+2][1],h);W.push([A[0],A[1],_[0],_[1],$[0],$[1]])}return W}}const nb={randOffset:function(e,t){return pt(e,t)},randOffsetWithRange:function(e,t,r){return Hs(e,t,r)},ellipse:function(e,t,r,i,s){const a=zu(r,i,s);return Lo(e,t,s,a).opset},doubleLineOps:function(e,t,r,i,s){return sr(e,t,r,i,s,!0)}};function Wu(e,t,r,i,s){return{type:"path",ops:sr(e,t,r,i,s)}}function ks(e,t,r){const i=(e||[]).length;if(i>2){const s=[];for(let a=0;a<i-1;a++)s.push(...sr(e[a][0],e[a][1],e[a+1][0],e[a+1][1],r));return t&&s.push(...sr(e[i-1][0],e[i-1][1],e[0][0],e[0][1],r)),{type:"path",ops:s}}return i===2?Wu(e[0][0],e[0][1],e[1][0],e[1][1],r):{type:"path",ops:[]}}function lb(e,t,r,i,s){return(function(a,o){return ks(a,!0,o)})([[e,t],[e+r,t],[e+r,t+i],[e,t+i]],s)}function Gl(e,t){if(e.length){const r=typeof e[0][0]=="number"?[e]:e,i=hs(r[0],1*(1+.2*t.roughness),t),s=t.disableMultiStroke?[]:hs(r[0],1.5*(1+.22*t.roughness),Zl(t));for(let a=1;a<r.length;a++){const o=r[a];if(o.length){const n=hs(o,1*(1+.2*t.roughness),t),l=t.disableMultiStroke?[]:hs(o,1.5*(1+.22*t.roughness),Zl(t));for(const c of n)c.op!=="move"&&i.push(c);for(const c of l)c.op!=="move"&&s.push(c)}}return{type:"path",ops:i.concat(s)}}return{type:"path",ops:[]}}function zu(e,t,r){const i=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(e/2,2)+Math.pow(t/2,2))/2)),s=Math.ceil(Math.max(r.curveStepCount,r.curveStepCount/Math.sqrt(200)*i)),a=2*Math.PI/s;let o=Math.abs(e/2),n=Math.abs(t/2);const l=1-r.curveFitting;return o+=pt(o*l,r),n+=pt(n*l,r),{increment:a,rx:o,ry:n}}function Lo(e,t,r,i){const[s,a]=Ql(i.increment,e,t,i.rx,i.ry,1,i.increment*Hs(.1,Hs(.4,1,r),r),r);let o=Ys(s,null,r);if(!r.disableMultiStroke&&r.roughness!==0){const[n]=Ql(i.increment,e,t,i.rx,i.ry,1.5,0,r),l=Ys(n,null,r);o=o.concat(l)}return{estimatedPoints:a,opset:{type:"path",ops:o}}}function Xl(e,t,r,i,s,a,o,n,l){const c=e,h=t;let d=Math.abs(r/2),p=Math.abs(i/2);d+=pt(.01*d,l),p+=pt(.01*p,l);let u=s,f=a;for(;u<0;)u+=2*Math.PI,f+=2*Math.PI;f-u>2*Math.PI&&(u=0,f=2*Math.PI);const m=2*Math.PI/l.curveStepCount,y=Math.min(m/2,(f-u)/2),C=Kl(y,c,h,d,p,u,f,1,l);if(!l.disableMultiStroke){const b=Kl(y,c,h,d,p,u,f,1.5,l);C.push(...b)}return o&&(n?C.push(...sr(c,h,c+d*Math.cos(u),h+p*Math.sin(u),l),...sr(c,h,c+d*Math.cos(f),h+p*Math.sin(f),l)):C.push({op:"lineTo",data:[c,h]},{op:"lineTo",data:[c+d*Math.cos(u),h+p*Math.sin(u)]})),{type:"path",ops:C}}function Vl(e,t){const r=qu(Ru(An(e))),i=[];let s=[0,0],a=[0,0];for(const{key:o,data:n}of r)switch(o){case"M":a=[n[0],n[1]],s=[n[0],n[1]];break;case"L":i.push(...sr(a[0],a[1],n[0],n[1],t)),a=[n[0],n[1]];break;case"C":{const[l,c,h,d,p,u]=n;i.push(...hb(l,c,h,d,p,u,a,t)),a=[p,u];break}case"Z":i.push(...sr(a[0],a[1],s[0],s[1],t)),a=[s[0],s[1]]}return{type:"path",ops:i}}function Wa(e,t){const r=[];for(const i of e)if(i.length){const s=t.maxRandomnessOffset||0,a=i.length;if(a>2){r.push({op:"move",data:[i[0][0]+pt(s,t),i[0][1]+pt(s,t)]});for(let o=1;o<a;o++)r.push({op:"lineTo",data:[i[o][0]+pt(s,t),i[o][1]+pt(s,t)]})}}return{type:"fillPath",ops:r}}function Or(e,t){return(function(r,i){let s=r.fillStyle||"hachure";if(!oe[s])switch(s){case"zigzag":oe[s]||(oe[s]=new tb(i));break;case"cross-hatch":oe[s]||(oe[s]=new eb(i));break;case"dots":oe[s]||(oe[s]=new rb(i));break;case"dashed":oe[s]||(oe[s]=new ib(i));break;case"zigzag-line":oe[s]||(oe[s]=new sb(i));break;default:s="hachure",oe[s]||(oe[s]=new Fn(i))}return oe[s]})(t,nb).fillPolygons(e,t)}function Zl(e){const t=Object.assign({},e);return t.randomizer=void 0,e.seed&&(t.seed=e.seed+1),t}function Hu(e){return e.randomizer||(e.randomizer=new ab(e.seed||0)),e.randomizer.next()}function Hs(e,t,r,i=1){return r.roughness*i*(Hu(r)*(t-e)+e)}function pt(e,t,r=1){return Hs(-e,e,t,r)}function sr(e,t,r,i,s,a=!1){const o=a?s.disableMultiStrokeFill:s.disableMultiStroke,n=Fo(e,t,r,i,s,!0,!1);if(o)return n;const l=Fo(e,t,r,i,s,!0,!0);return n.concat(l)}function Fo(e,t,r,i,s,a,o){const n=Math.pow(e-r,2)+Math.pow(t-i,2),l=Math.sqrt(n);let c=1;c=l<200?1:l>500?.4:-.0016668*l+1.233334;let h=s.maxRandomnessOffset||0;h*h*100>n&&(h=l/10);const d=h/2,p=.2+.2*Hu(s);let u=s.bowing*s.maxRandomnessOffset*(i-t)/200,f=s.bowing*s.maxRandomnessOffset*(e-r)/200;u=pt(u,s,c),f=pt(f,s,c);const m=[],y=()=>pt(d,s,c),C=()=>pt(h,s,c),b=s.preserveVertices;return o?m.push({op:"move",data:[e+(b?0:y()),t+(b?0:y())]}):m.push({op:"move",data:[e+(b?0:pt(h,s,c)),t+(b?0:pt(h,s,c))]}),o?m.push({op:"bcurveTo",data:[u+e+(r-e)*p+y(),f+t+(i-t)*p+y(),u+e+2*(r-e)*p+y(),f+t+2*(i-t)*p+y(),r+(b?0:y()),i+(b?0:y())]}):m.push({op:"bcurveTo",data:[u+e+(r-e)*p+C(),f+t+(i-t)*p+C(),u+e+2*(r-e)*p+C(),f+t+2*(i-t)*p+C(),r+(b?0:C()),i+(b?0:C())]}),m}function hs(e,t,r){if(!e.length)return[];const i=[];i.push([e[0][0]+pt(t,r),e[0][1]+pt(t,r)]),i.push([e[0][0]+pt(t,r),e[0][1]+pt(t,r)]);for(let s=1;s<e.length;s++)i.push([e[s][0]+pt(t,r),e[s][1]+pt(t,r)]),s===e.length-1&&i.push([e[s][0]+pt(t,r),e[s][1]+pt(t,r)]);return Ys(i,null,r)}function Ys(e,t,r){const i=e.length,s=[];if(i>3){const a=[],o=1-r.curveTightness;s.push({op:"move",data:[e[1][0],e[1][1]]});for(let n=1;n+2<i;n++){const l=e[n];a[0]=[l[0],l[1]],a[1]=[l[0]+(o*e[n+1][0]-o*e[n-1][0])/6,l[1]+(o*e[n+1][1]-o*e[n-1][1])/6],a[2]=[e[n+1][0]+(o*e[n][0]-o*e[n+2][0])/6,e[n+1][1]+(o*e[n][1]-o*e[n+2][1])/6],a[3]=[e[n+1][0],e[n+1][1]],s.push({op:"bcurveTo",data:[a[1][0],a[1][1],a[2][0],a[2][1],a[3][0],a[3][1]]})}}else i===3?(s.push({op:"move",data:[e[1][0],e[1][1]]}),s.push({op:"bcurveTo",data:[e[1][0],e[1][1],e[2][0],e[2][1],e[2][0],e[2][1]]})):i===2&&s.push(...Fo(e[0][0],e[0][1],e[1][0],e[1][1],r,!0,!0));return s}function Ql(e,t,r,i,s,a,o,n){const l=[],c=[];if(n.roughness===0){e/=4,c.push([t+i*Math.cos(-e),r+s*Math.sin(-e)]);for(let h=0;h<=2*Math.PI;h+=e){const d=[t+i*Math.cos(h),r+s*Math.sin(h)];l.push(d),c.push(d)}c.push([t+i*Math.cos(0),r+s*Math.sin(0)]),c.push([t+i*Math.cos(e),r+s*Math.sin(e)])}else{const h=pt(.5,n)-Math.PI/2;c.push([pt(a,n)+t+.9*i*Math.cos(h-e),pt(a,n)+r+.9*s*Math.sin(h-e)]);const d=2*Math.PI+h-.01;for(let p=h;p<d;p+=e){const u=[pt(a,n)+t+i*Math.cos(p),pt(a,n)+r+s*Math.sin(p)];l.push(u),c.push(u)}c.push([pt(a,n)+t+i*Math.cos(h+2*Math.PI+.5*o),pt(a,n)+r+s*Math.sin(h+2*Math.PI+.5*o)]),c.push([pt(a,n)+t+.98*i*Math.cos(h+o),pt(a,n)+r+.98*s*Math.sin(h+o)]),c.push([pt(a,n)+t+.9*i*Math.cos(h+.5*o),pt(a,n)+r+.9*s*Math.sin(h+.5*o)])}return[c,l]}function Kl(e,t,r,i,s,a,o,n,l){const c=a+pt(.1,l),h=[];h.push([pt(n,l)+t+.9*i*Math.cos(c-e),pt(n,l)+r+.9*s*Math.sin(c-e)]);for(let d=c;d<=o;d+=e)h.push([pt(n,l)+t+i*Math.cos(d),pt(n,l)+r+s*Math.sin(d)]);return h.push([t+i*Math.cos(o),r+s*Math.sin(o)]),h.push([t+i*Math.cos(o),r+s*Math.sin(o)]),Ys(h,null,l)}function hb(e,t,r,i,s,a,o,n){const l=[],c=[n.maxRandomnessOffset||1,(n.maxRandomnessOffset||1)+.3];let h=[0,0];const d=n.disableMultiStroke?1:2,p=n.preserveVertices;for(let u=0;u<d;u++)u===0?l.push({op:"move",data:[o[0],o[1]]}):l.push({op:"move",data:[o[0]+(p?0:pt(c[0],n)),o[1]+(p?0:pt(c[0],n))]}),h=p?[s,a]:[s+pt(c[u],n),a+pt(c[u],n)],l.push({op:"bcurveTo",data:[e+pt(c[u],n),t+pt(c[u],n),r+pt(c[u],n),i+pt(c[u],n),h[0],h[1]]});return l}function bi(e){return[...e]}function Jl(e,t=0){const r=e.length;if(r<3)throw new Error("A curve must have at least three points.");const i=[];if(r===3)i.push(bi(e[0]),bi(e[1]),bi(e[2]),bi(e[2]));else{const s=[];s.push(e[0],e[0]);for(let n=1;n<e.length;n++)s.push(e[n]),n===e.length-1&&s.push(e[n]);const a=[],o=1-t;i.push(bi(s[0]));for(let n=1;n+2<s.length;n++){const l=s[n];a[0]=[l[0],l[1]],a[1]=[l[0]+(o*s[n+1][0]-o*s[n-1][0])/6,l[1]+(o*s[n+1][1]-o*s[n-1][1])/6],a[2]=[s[n+1][0]+(o*s[n][0]-o*s[n+2][0])/6,s[n+1][1]+(o*s[n][1]-o*s[n+2][1])/6],a[3]=[s[n+1][0],s[n+1][1]],i.push(a[1],a[2],a[3])}}return i}function Ts(e,t){return Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)}function cb(e,t,r){const i=Ts(t,r);if(i===0)return Ts(e,t);let s=((e[0]-t[0])*(r[0]-t[0])+(e[1]-t[1])*(r[1]-t[1]))/i;return s=Math.max(0,Math.min(1,s)),Ts(e,pr(t,r,s))}function pr(e,t,r){return[e[0]+(t[0]-e[0])*r,e[1]+(t[1]-e[1])*r]}function Ao(e,t,r,i){const s=i||[];if((function(n,l){const c=n[l+0],h=n[l+1],d=n[l+2],p=n[l+3];let u=3*h[0]-2*c[0]-p[0];u*=u;let f=3*h[1]-2*c[1]-p[1];f*=f;let m=3*d[0]-2*p[0]-c[0];m*=m;let y=3*d[1]-2*p[1]-c[1];return y*=y,u<m&&(u=m),f<y&&(f=y),u+f})(e,t)<r){const n=e[t+0];s.length?(a=s[s.length-1],o=n,Math.sqrt(Ts(a,o))>1&&s.push(n)):s.push(n),s.push(e[t+3])}else{const l=e[t+0],c=e[t+1],h=e[t+2],d=e[t+3],p=pr(l,c,.5),u=pr(c,h,.5),f=pr(h,d,.5),m=pr(p,u,.5),y=pr(u,f,.5),C=pr(m,y,.5);Ao([l,p,m,C],0,r,s),Ao([C,y,f,d],0,r,s)}var a,o;return s}function db(e,t){return Us(e,0,e.length,t)}function Us(e,t,r,i,s){const a=s||[],o=e[t],n=e[r-1];let l=0,c=1;for(let h=t+1;h<r-1;++h){const d=cb(e[h],o,n);d>l&&(l=d,c=h)}return Math.sqrt(l)>i?(Us(e,t,c+1,i,a),Us(e,c,r,i,a)):(a.length||a.push(o),a.push(n)),a}function za(e,t=.15,r){const i=[],s=(e.length-1)/3;for(let a=0;a<s;a++)Ao(e,3*a,t,i);return r&&r>0?Us(i,0,i.length,r):i}const ce="none";class js{constructor(t){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:"#000",strokeWidth:1,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:"hachure",fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,seed:0,disableMultiStroke:!1,disableMultiStrokeFill:!1,preserveVertices:!1,fillShapeRoughnessGain:.8},this.config=t||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Math.floor(Math.random()*2**31)}_o(t){return t?Object.assign({},this.defaultOptions,t):this.defaultOptions}_d(t,r,i){return{shape:t,sets:r||[],options:i||this.defaultOptions}}line(t,r,i,s,a){const o=this._o(a);return this._d("line",[Wu(t,r,i,s,o)],o)}rectangle(t,r,i,s,a){const o=this._o(a),n=[],l=lb(t,r,i,s,o);if(o.fill){const c=[[t,r],[t+i,r],[t+i,r+s],[t,r+s]];o.fillStyle==="solid"?n.push(Wa([c],o)):n.push(Or([c],o))}return o.stroke!==ce&&n.push(l),this._d("rectangle",n,o)}ellipse(t,r,i,s,a){const o=this._o(a),n=[],l=zu(i,s,o),c=Lo(t,r,o,l);if(o.fill)if(o.fillStyle==="solid"){const h=Lo(t,r,o,l).opset;h.type="fillPath",n.push(h)}else n.push(Or([c.estimatedPoints],o));return o.stroke!==ce&&n.push(c.opset),this._d("ellipse",n,o)}circle(t,r,i,s){const a=this.ellipse(t,r,i,i,s);return a.shape="circle",a}linearPath(t,r){const i=this._o(r);return this._d("linearPath",[ks(t,!1,i)],i)}arc(t,r,i,s,a,o,n=!1,l){const c=this._o(l),h=[],d=Xl(t,r,i,s,a,o,n,!0,c);if(n&&c.fill)if(c.fillStyle==="solid"){const p=Object.assign({},c);p.disableMultiStroke=!0;const u=Xl(t,r,i,s,a,o,!0,!1,p);u.type="fillPath",h.push(u)}else h.push((function(p,u,f,m,y,C,b){const k=p,w=u;let S=Math.abs(f/2),B=Math.abs(m/2);S+=pt(.01*S,b),B+=pt(.01*B,b);let F=y,v=C;for(;F<0;)F+=2*Math.PI,v+=2*Math.PI;v-F>2*Math.PI&&(F=0,v=2*Math.PI);const z=(v-F)/b.curveStepCount,q=[];for(let M=F;M<=v;M+=z)q.push([k+S*Math.cos(M),w+B*Math.sin(M)]);return q.push([k+S*Math.cos(v),w+B*Math.sin(v)]),q.push([k,w]),Or([q],b)})(t,r,i,s,a,o,c));return c.stroke!==ce&&h.push(d),this._d("arc",h,c)}curve(t,r){const i=this._o(r),s=[],a=Gl(t,i);if(i.fill&&i.fill!==ce)if(i.fillStyle==="solid"){const o=Gl(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));s.push({type:"fillPath",ops:this._mergedShape(o.ops)})}else{const o=[],n=t;if(n.length){const l=typeof n[0][0]=="number"?[n]:n;for(const c of l)c.length<3?o.push(...c):c.length===3?o.push(...za(Jl([c[0],c[0],c[1],c[2]]),10,(1+i.roughness)/2)):o.push(...za(Jl(c),10,(1+i.roughness)/2))}o.length&&s.push(Or([o],i))}return i.stroke!==ce&&s.push(a),this._d("curve",s,i)}polygon(t,r){const i=this._o(r),s=[],a=ks(t,!0,i);return i.fill&&(i.fillStyle==="solid"?s.push(Wa([t],i)):s.push(Or([t],i))),i.stroke!==ce&&s.push(a),this._d("polygon",s,i)}path(t,r){const i=this._o(r),s=[];if(!t)return this._d("path",s,i);t=(t||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const a=i.fill&&i.fill!=="transparent"&&i.fill!==ce,o=i.stroke!==ce,n=!!(i.simplification&&i.simplification<1),l=(function(h,d,p){const u=qu(Ru(An(h))),f=[];let m=[],y=[0,0],C=[];const b=()=>{C.length>=4&&m.push(...za(C,d)),C=[]},k=()=>{b(),m.length&&(f.push(m),m=[])};for(const{key:S,data:B}of u)switch(S){case"M":k(),y=[B[0],B[1]],m.push(y);break;case"L":b(),m.push([B[0],B[1]]);break;case"C":if(!C.length){const F=m.length?m[m.length-1]:y;C.push([F[0],F[1]])}C.push([B[0],B[1]]),C.push([B[2],B[3]]),C.push([B[4],B[5]]);break;case"Z":b(),m.push([y[0],y[1]])}if(k(),!p)return f;const w=[];for(const S of f){const B=db(S,p);B.length&&w.push(B)}return w})(t,1,n?4-4*(i.simplification||1):(1+i.roughness)/2),c=Vl(t,i);if(a)if(i.fillStyle==="solid")if(l.length===1){const h=Vl(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));s.push({type:"fillPath",ops:this._mergedShape(h.ops)})}else s.push(Wa(l,i));else s.push(Or(l,i));return o&&(n?l.forEach((h=>{s.push(ks(h,!1,i))})):s.push(c)),this._d("path",s,i)}opsToPath(t,r){let i="";for(const s of t.ops){const a=typeof r=="number"&&r>=0?s.data.map((o=>+o.toFixed(r))):s.data;switch(s.op){case"move":i+=`M${a[0]} ${a[1]} `;break;case"bcurveTo":i+=`C${a[0]} ${a[1]}, ${a[2]} ${a[3]}, ${a[4]} ${a[5]} `;break;case"lineTo":i+=`L${a[0]} ${a[1]} `}}return i.trim()}toPaths(t){const r=t.sets||[],i=t.options||this.defaultOptions,s=[];for(const a of r){let o=null;switch(a.type){case"path":o={d:this.opsToPath(a),stroke:i.stroke,strokeWidth:i.strokeWidth,fill:ce};break;case"fillPath":o={d:this.opsToPath(a),stroke:ce,strokeWidth:0,fill:i.fill||ce};break;case"fillSketch":o=this.fillSketch(a,i)}o&&s.push(o)}return s}fillSketch(t,r){let i=r.fillWeight;return i<0&&(i=r.strokeWidth/2),{d:this.opsToPath(t),stroke:r.fill||ce,strokeWidth:i,fill:ce}}_mergedShape(t){return t.filter(((r,i)=>i===0||r.op!=="move"))}}class ub{constructor(t,r){this.canvas=t,this.ctx=this.canvas.getContext("2d"),this.gen=new js(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),s=this.ctx,a=t.options.fixedDecimalPlaceDigits;for(const o of r)switch(o.type){case"path":s.save(),s.strokeStyle=i.stroke==="none"?"transparent":i.stroke,s.lineWidth=i.strokeWidth,i.strokeLineDash&&s.setLineDash(i.strokeLineDash),i.strokeLineDashOffset&&(s.lineDashOffset=i.strokeLineDashOffset),this._drawToContext(s,o,a),s.restore();break;case"fillPath":{s.save(),s.fillStyle=i.fill||"";const n=t.shape==="curve"||t.shape==="polygon"||t.shape==="path"?"evenodd":"nonzero";this._drawToContext(s,o,a,n),s.restore();break}case"fillSketch":this.fillSketch(s,o,i)}}fillSketch(t,r,i){let s=i.fillWeight;s<0&&(s=i.strokeWidth/2),t.save(),i.fillLineDash&&t.setLineDash(i.fillLineDash),i.fillLineDashOffset&&(t.lineDashOffset=i.fillLineDashOffset),t.strokeStyle=i.fill||"",t.lineWidth=s,this._drawToContext(t,r,i.fixedDecimalPlaceDigits),t.restore()}_drawToContext(t,r,i,s="nonzero"){t.beginPath();for(const a of r.ops){const o=typeof i=="number"&&i>=0?a.data.map((n=>+n.toFixed(i))):a.data;switch(a.op){case"move":t.moveTo(o[0],o[1]);break;case"bcurveTo":t.bezierCurveTo(o[0],o[1],o[2],o[3],o[4],o[5]);break;case"lineTo":t.lineTo(o[0],o[1])}}r.type==="fillPath"?t.fill(s):t.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(t,r,i,s,a){const o=this.gen.line(t,r,i,s,a);return this.draw(o),o}rectangle(t,r,i,s,a){const o=this.gen.rectangle(t,r,i,s,a);return this.draw(o),o}ellipse(t,r,i,s,a){const o=this.gen.ellipse(t,r,i,s,a);return this.draw(o),o}circle(t,r,i,s){const a=this.gen.circle(t,r,i,s);return this.draw(a),a}linearPath(t,r){const i=this.gen.linearPath(t,r);return this.draw(i),i}polygon(t,r){const i=this.gen.polygon(t,r);return this.draw(i),i}arc(t,r,i,s,a,o,n=!1,l){const c=this.gen.arc(t,r,i,s,a,o,n,l);return this.draw(c),c}curve(t,r){const i=this.gen.curve(t,r);return this.draw(i),i}path(t,r){const i=this.gen.path(t,r);return this.draw(i),i}}const cs="http://www.w3.org/2000/svg";class pb{constructor(t,r){this.svg=t,this.gen=new js(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),s=this.svg.ownerDocument||window.document,a=s.createElementNS(cs,"g"),o=t.options.fixedDecimalPlaceDigits;for(const n of r){let l=null;switch(n.type){case"path":l=s.createElementNS(cs,"path"),l.setAttribute("d",this.opsToPath(n,o)),l.setAttribute("stroke",i.stroke),l.setAttribute("stroke-width",i.strokeWidth+""),l.setAttribute("fill","none"),i.strokeLineDash&&l.setAttribute("stroke-dasharray",i.strokeLineDash.join(" ").trim()),i.strokeLineDashOffset&&l.setAttribute("stroke-dashoffset",`${i.strokeLineDashOffset}`);break;case"fillPath":l=s.createElementNS(cs,"path"),l.setAttribute("d",this.opsToPath(n,o)),l.setAttribute("stroke","none"),l.setAttribute("stroke-width","0"),l.setAttribute("fill",i.fill||""),t.shape!=="curve"&&t.shape!=="polygon"||l.setAttribute("fill-rule","evenodd");break;case"fillSketch":l=this.fillSketch(s,n,i)}l&&a.appendChild(l)}return a}fillSketch(t,r,i){let s=i.fillWeight;s<0&&(s=i.strokeWidth/2);const a=t.createElementNS(cs,"path");return a.setAttribute("d",this.opsToPath(r,i.fixedDecimalPlaceDigits)),a.setAttribute("stroke",i.fill||""),a.setAttribute("stroke-width",s+""),a.setAttribute("fill","none"),i.fillLineDash&&a.setAttribute("stroke-dasharray",i.fillLineDash.join(" ").trim()),i.fillLineDashOffset&&a.setAttribute("stroke-dashoffset",`${i.fillLineDashOffset}`),a}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(t,r){return this.gen.opsToPath(t,r)}line(t,r,i,s,a){const o=this.gen.line(t,r,i,s,a);return this.draw(o)}rectangle(t,r,i,s,a){const o=this.gen.rectangle(t,r,i,s,a);return this.draw(o)}ellipse(t,r,i,s,a){const o=this.gen.ellipse(t,r,i,s,a);return this.draw(o)}circle(t,r,i,s){const a=this.gen.circle(t,r,i,s);return this.draw(a)}linearPath(t,r){const i=this.gen.linearPath(t,r);return this.draw(i)}polygon(t,r){const i=this.gen.polygon(t,r);return this.draw(i)}arc(t,r,i,s,a,o,n=!1,l){const c=this.gen.arc(t,r,i,s,a,o,n,l);return this.draw(c)}curve(t,r){const i=this.gen.curve(t,r);return this.draw(i)}path(t,r){const i=this.gen.path(t,r);return this.draw(i)}}var tt={canvas:(e,t)=>new ub(e,t),svg:(e,t)=>new pb(e,t),generator:e=>new js(e),newSeed:()=>js.newSeed()},dt=g(async(e,t,r)=>{var u,f;let i;const s=t.useHtmlLabels||De((u=wt())==null?void 0:u.htmlLabels);r?i=r:i="node default";const a=e.insert("g").attr("class",i).attr("id",t.domId||t.id),o=a.insert("g").attr("class","label").attr("style",Ht(t.labelStyle));let n;t.label===void 0?n="":n=typeof t.label=="string"?t.label:t.label[0];const l=!!t.icon||!!t.img,c=t.labelType==="markdown",h=await Pe(o,Se(kr(n),wt()),{useHtmlLabels:s,width:t.width||((f=wt().flowchart)==null?void 0:f.wrappingWidth),classes:c?"markdown-node-label":"",style:t.labelStyle,addSvgBackground:l,markdown:c},wt());let d=h.getBBox();const p=((t==null?void 0:t.padding)??0)/2;if(s){const m=h.children[0],y=xt(h);await du(m,n),d=m.getBoundingClientRect(),y.attr("width",d.width),y.attr("height",d.height)}return s?o.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"):o.attr("transform","translate(0, "+-d.height/2+")"),t.centerLabel&&o.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),o.insert("rect",":first-child"),{shapeSvg:a,bbox:d,halfPadding:p,label:o}},"labelHelper"),Ha=g(async(e,t,r)=>{var l,c;const i=r.useHtmlLabels??se(wt()),s=e.insert("g").attr("class","label").attr("style",r.labelStyle||""),a=await Pe(s,Se(kr(t),wt()),{useHtmlLabels:i,width:r.width||((c=(l=wt())==null?void 0:l.flowchart)==null?void 0:c.wrappingWidth),style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img});let o=a.getBBox();const n=r.padding/2;if(se(wt())){const h=a.children[0],d=xt(a);o=h.getBoundingClientRect(),d.attr("width",o.width),d.attr("height",o.height)}return i?s.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"):s.attr("transform","translate(0, "+-o.height/2+")"),r.centerLabel&&s.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),s.insert("rect",":first-child"),{shapeSvg:e,bbox:o,halfPadding:n,label:s}},"insertLabel"),st=g((e,t)=>{const r=t.node().getBBox();e.width=r.width,e.height=r.height},"updateNodeBounds"),ht=g((e,t)=>(e.look==="handDrawn"?"rough-node":"node")+" "+e.cssClasses+" "+(t||""),"getNodeClasses");function Tt(e){const t=e.map((r,i)=>`${i===0?"M":"L"}${r.x},${r.y}`);return t.push("Z"),t.join(" ")}g(Tt,"createPathFromPoints");function ar(e,t,r,i,s,a){const o=[],l=r-e,c=i-t,h=l/a,d=2*Math.PI/h,p=t+c/2;for(let u=0;u<=50;u++){const f=u/50,m=e+f*l,y=p+s*Math.sin(d*(m-e));o.push({x:m,y})}return o}g(ar,"generateFullSineWavePoints");function Ni(e,t,r,i,s,a){const o=[],n=s*Math.PI/180,h=(a*Math.PI/180-n)/(i-1);for(let d=0;d<i;d++){const p=n+d*h,u=e+r*Math.cos(p),f=t+r*Math.sin(p);o.push({x:-u,y:-f})}return o}g(Ni,"generateCirclePoints");function Eo(e){const t=Array.from(e.childNodes).filter(l=>l.tagName==="path"),r=document.createElementNS("http://www.w3.org/2000/svg","path"),i=t.map(l=>l.getAttribute("d")).filter(l=>l!==null).join(" ");r.setAttribute("d",i);const s=t.find(l=>l.getAttribute("fill")!=="none"),a=t.find(l=>l.getAttribute("stroke")!=="none"),o=g((l,c)=>(l==null?void 0:l.getAttribute(c))??void 0,"getAttr");if(s){const l={fill:o(s,"fill"),"fill-opacity":o(s,"fill-opacity")??"1"};Object.entries(l).forEach(([c,h])=>{h&&r.setAttribute(c,h)})}if(a){const l={stroke:o(a,"stroke"),"stroke-width":o(a,"stroke-width")??"1","stroke-opacity":o(a,"stroke-opacity")??"1"};Object.entries(l).forEach(([c,h])=>{h&&r.setAttribute(c,h)})}const n=document.createElementNS("http://www.w3.org/2000/svg","g");return n.appendChild(r),n}g(Eo,"mergePaths");var gb=g((e,t)=>{var r=e.x,i=e.y,s=t.x-r,a=t.y-i,o=e.width/2,n=e.height/2,l,c;return Math.abs(a)*o>Math.abs(s)*n?(a<0&&(n=-n),l=a===0?0:n*s/a,c=n):(s<0&&(o=-o),l=o,c=s===0?0:o*a/s),{x:r+l,y:i+c}},"intersectRect"),Br=gb,fb=g(async(e,t,r,i=!1,s=!1)=>{let a=t||"";typeof a=="object"&&(a=a[0]);const o=wt(),n=se(o);return await Pe(e,a,{style:r,isTitle:i,useHtmlLabels:n,markdown:!1,isNode:s,width:Number.POSITIVE_INFINITY},o)},"createLabel"),Ke=fb,or=g((e,t,r,i,s)=>["M",e+s,t,"H",e+r-s,"A",s,s,0,0,1,e+r,t+s,"V",t+i-s,"A",s,s,0,0,1,e+r-s,t+i,"H",e+s,"A",s,s,0,0,1,e,t+i-s,"V",t+s,"A",s,s,0,0,1,e+s,t,"Z"].join(" "),"createRoundedRectPathD"),mb=g(async(e,t)=>{const r=wt(),{themeVariables:i,handDrawnSeed:s}=r,{clusterBkg:a,clusterBorder:o}=i,n=o,{labelStyles:l,nodeStyles:c,borderStyles:h,backgroundStyles:d}=rt(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),u=De(r.flowchart.htmlLabels),f=t.direction==="LR",m=p.insert("g").attr("class","cluster-label swimlane-label"),y=await Pe(m,t.label,{style:t.labelStyle,useHtmlLabels:u,isNode:!0,width:t.width});let C=y.getBBox();if(u){const W=y.children[0],O=xt(y);C=W.getBoundingClientRect(),O.attr("width",C.width),O.attr("height",C.height)}const b=t.padding??0,k=t.width<=C.width+b?C.width+b:t.width;t.width<=C.width+b?t.diff=(k-t.width)/2-b:t.diff=-b;const w=t.height,S=t.y-w/2,B=t.y+w/2,F=t.x-k/2,v=t.swimlaneContentTop!==void 0?t.swimlaneContentTop:S+w/3,z=f?4:0,q=C.height+2*z;let M,U;if(f){const W=Math.max(q,C.height+2*z),O=F+W,A=Math.max(0,k-W);if(t.look==="handDrawn"){const E=tt.svg(p),N=J(t,{roughness:.7,fill:a,stroke:n,fillWeight:3,seed:s}),Y=J(t,{roughness:.7,fill:"none",stroke:n,seed:s}),G=E.rectangle(F,S,W,w,N);M=p.insert(()=>G,":first-child");const et=E.rectangle(O,S,A,w,Y);U=p.insert(()=>et,":first-child"),M.select("path:nth-child(2)").attr("style",h.join(";")),M.select("path").attr("style",d.join(";").replace("fill","stroke"))}else M=p.insert("rect",":first-child"),U=p.insert("rect",":first-child"),M.attr("class","swimlane-title").attr("style",c).attr("x",F).attr("y",S).attr("width",W).attr("height",w).attr("fill",a).attr("stroke",n),U.attr("class","swimlane-body").attr("style",c).attr("x",O).attr("y",S).attr("width",A).attr("height",w).attr("fill","none").attr("stroke",n);const _=F+W/2,$=t.y;m.attr("transform",`translate(${_}, ${$}) rotate(-90) translate(${-C.width/2}, ${-C.height/2})`)}else{const W=Math.max(0,v-S),O=Math.min(q,W),A=S+O,_=Math.max(0,B-A),$=t.x-k/2;if(t.look==="handDrawn"){const Y=tt.svg(p),G=J(t,{roughness:.7,fill:a,stroke:n,fillWeight:3,seed:s}),et=J(t,{roughness:.7,fill:"none",stroke:n,seed:s}),lt=Y.rectangle($,S,k,O,G);M=p.insert(()=>lt,":first-child");const ot=Y.rectangle($,A,k,_,et);U=p.insert(()=>ot,":first-child"),M.select("path:nth-child(2)").attr("style",h.join(";")),M.select("path").attr("style",d.join(";").replace("fill","stroke"))}else M=p.insert("rect",":first-child"),U=p.insert("rect",":first-child"),M.attr("class","swimlane-title").attr("style",c).attr("x",$).attr("y",S).attr("width",k).attr("height",O).attr("fill",a).attr("stroke",n),U.attr("class","swimlane-body").attr("style",c).attr("x",$).attr("y",A).attr("width",k).attr("height",_).attr("fill","none").attr("stroke",n);const E=t.x-C.width/2,N=S+(O-C.height)/2;m.attr("transform",`translate(${E}, ${N})`)}if(H.trace("Swimlane data ",t,JSON.stringify(t)),l){const W=m.select("span");W&&W.attr("style",l)}return t.offsetX=0,t.width=k,t.height=w,t.offsetY=C.height-b/2,t.intersect=function(W){return Br(t,W)},{cluster:p,labelBBox:C}},"swimlane"),Yu=g(async(e,t)=>{H.info("Creating subgraph rect for ",t.id,t);const r=wt(),{themeVariables:i,handDrawnSeed:s}=r,{clusterBkg:a,clusterBorder:o}=i,{labelStyles:n,nodeStyles:l,borderStyles:c,backgroundStyles:h}=rt(t),d=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.domId).attr("data-look",t.look),p=se(r),u=d.insert("g").attr("class","cluster-label ");let f;t.labelType==="markdown"?f=await Pe(u,t.label,{style:t.labelStyle,useHtmlLabels:p,isNode:!0,width:t.width}):f=await Ke(u,t.label,t.labelStyle||"",!1,!0);let m=f.getBBox();if(se(r)){const F=f.children[0],v=xt(f);m=F.getBoundingClientRect(),v.attr("width",m.width),v.attr("height",m.height)}const y=t.width<=m.width+t.padding?m.width+t.padding:t.width;t.width<=m.width+t.padding?t.diff=(y-t.width)/2-t.padding:t.diff=-t.padding;const C=t.height,b=t.x-y/2,k=t.y-C/2;H.trace("Data ",t,JSON.stringify(t));let w;if(t.look==="handDrawn"){const F=tt.svg(d),v=J(t,{roughness:.7,fill:a,stroke:o,fillWeight:3,seed:s}),z=F.path(or(b,k,y,C,0),v);w=d.insert(()=>(H.debug("Rough node insert CXC",z),z),":first-child"),w.select("path:nth-child(2)").attr("style",c.join(";")),w.select("path").attr("style",h.join(";").replace("fill","stroke"))}else w=d.insert("rect",":first-child"),w.attr("style",l).attr("rx",t.rx).attr("ry",t.ry).attr("x",b).attr("y",k).attr("width",y).attr("height",C);const{subGraphTitleTopMargin:S}=Cn(r);if(u.attr("transform",`translate(${t.x-m.width/2}, ${t.y-t.height/2+S})`),n){const F=u.select("span");F&&F.attr("style",n)}const B=w.node().getBBox();return t.offsetX=0,t.width=B.width,t.height=B.height,t.offsetY=m.height-t.padding/2,t.intersect=function(F){return Br(t,F)},{cluster:d,labelBBox:m}},"rect"),yb=g((e,t)=>{const r=e.insert("g").attr("class","note-cluster").attr("id",t.domId),i=r.insert("rect",":first-child"),s=0*t.padding,a=s/2;i.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+s).attr("height",t.height+s).attr("fill","none");const o=i.node().getBBox();return t.width=o.width,t.height=o.height,t.intersect=function(n){return Br(t,n)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),Cb=g(async(e,t)=>{const r=wt(),{themeVariables:i,handDrawnSeed:s}=r,{altBackground:a,compositeBackground:o,compositeTitleBackground:n,nodeBorder:l}=i,c=e.insert("g").attr("class",t.cssClasses).attr("id",t.domId).attr("data-id",t.id).attr("data-look",t.look),h=c.insert("g",":first-child"),d=c.insert("g").attr("class","cluster-label");let p=c.append("rect");const u=await Ke(d,t.label,t.labelStyle,void 0,!0);let f=u.getBBox();if(se(r)){const z=u.children[0],q=xt(u);f=z.getBoundingClientRect(),q.attr("width",f.width),q.attr("height",f.height)}const m=0*t.padding,y=m/2,C=(t.width<=f.width+t.padding?f.width+t.padding:t.width)+m;t.width<=f.width+t.padding?t.diff=(C-t.width)/2-t.padding:t.diff=-t.padding;const b=t.height+m,k=t.height+m-f.height-6,w=t.x-C/2,S=t.y-b/2;t.width=C;const B=t.y-t.height/2-y+f.height+2;let F;if(t.look==="handDrawn"){const z=t.cssClasses.includes("statediagram-cluster-alt"),q=tt.svg(c),M=t.rx||t.ry?q.path(or(w,S,C,b,10),{roughness:.7,fill:n,fillStyle:"solid",stroke:l,seed:s}):q.rectangle(w,S,C,b,{seed:s});F=c.insert(()=>M,":first-child");const U=q.rectangle(w,B,C,k,{fill:z?a:o,fillStyle:z?"hachure":"solid",stroke:l,seed:s});F=c.insert(()=>M,":first-child"),p=c.insert(()=>U)}else F=h.insert("rect",":first-child"),F.attr("class","outer").attr("x",w).attr("y",S).attr("width",C).attr("height",b).attr("data-look",t.look),p.attr("class","inner").attr("x",w).attr("y",B).attr("width",C).attr("height",k);d.attr("transform",`translate(${t.x-f.width/2}, ${S+1-(se(r)?0:3)})`);const v=F.node().getBBox();return t.height=v.height,t.offsetX=0,t.offsetY=f.height-t.padding/2,t.labelBBox=f,t.intersect=function(z){return Br(t,z)},{cluster:c,labelBBox:f}},"roundedWithTitle"),xb=g(async(e,t)=>{H.info("Creating subgraph rect for ",t.id,t);const r=wt(),{themeVariables:i,handDrawnSeed:s}=r,{clusterBkg:a,clusterBorder:o}=i,{labelStyles:n,nodeStyles:l,borderStyles:c,backgroundStyles:h}=rt(t),d=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.domId).attr("data-look",t.look),p=se(r),u=d.insert("g").attr("class","cluster-label "),f=await Pe(u,t.label,{style:t.labelStyle,useHtmlLabels:p,isNode:!0,width:t.width});let m=f.getBBox();if(se(r)){const F=f.children[0],v=xt(f);m=F.getBoundingClientRect(),v.attr("width",m.width),v.attr("height",m.height)}const y=t.width<=m.width+t.padding?m.width+t.padding:t.width;t.width<=m.width+t.padding?t.diff=(y-t.width)/2-t.padding:t.diff=-t.padding;const C=t.height,b=t.x-y/2,k=t.y-C/2;H.trace("Data ",t,JSON.stringify(t));let w;if(t.look==="handDrawn"){const F=tt.svg(d),v=J(t,{roughness:.7,fill:a,stroke:o,fillWeight:4,seed:s}),z=F.path(or(b,k,y,C,t.rx),v);w=d.insert(()=>(H.debug("Rough node insert CXC",z),z),":first-child"),w.select("path:nth-child(2)").attr("style",c.join(";")),w.select("path").attr("style",h.join(";").replace("fill","stroke"))}else w=d.insert("rect",":first-child"),w.attr("style",l).attr("rx",t.rx).attr("ry",t.ry).attr("x",b).attr("y",k).attr("width",y).attr("height",C);const{subGraphTitleTopMargin:S}=Cn(r);if(u.attr("transform",`translate(${t.x-m.width/2}, ${t.y-t.height/2+S})`),n){const F=u.select("span");F&&F.attr("style",n)}const B=w.node().getBBox();return t.offsetX=0,t.width=B.width,t.height=B.height,t.offsetY=m.height-t.padding/2,t.intersect=function(F){return Br(t,F)},{cluster:d,labelBBox:m}},"kanbanSection"),bb=g((e,t)=>{const r=wt(),{themeVariables:i,handDrawnSeed:s}=r,{nodeBorder:a}=i,o=e.insert("g").attr("class",t.cssClasses).attr("id",t.domId).attr("data-look",t.look),n=o.insert("g",":first-child"),l=0*t.padding,c=t.width+l;t.diff=-t.padding;const h=t.height+l,d=t.x-c/2,p=t.y-h/2;t.width=c;let u;if(t.look==="handDrawn"){const y=tt.svg(o).rectangle(d,p,c,h,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:a,seed:s});u=o.insert(()=>y,":first-child")}else{u=n.insert("rect",":first-child");let m="outer";t.look,m="divider",u.attr("class",m).attr("x",d).attr("y",p).attr("width",c).attr("height",h).attr("data-look",t.look)}const f=u.node().getBBox();return t.height=f.height,t.offsetX=0,t.offsetY=0,t.intersect=function(m){return Br(t,m)},{cluster:o,labelBBox:{}}},"divider"),kb=Yu,Tb={rect:Yu,squareRect:kb,roundedWithTitle:Cb,noteGroup:yb,divider:bb,kanbanSection:xb,swimlane:mb},Uu=new Map,Sb=g(async(e,t)=>{const r=t.shape||"rect",i=await Tb[r](e,t);return Uu.set(t.id,i),i},"insertCluster"),DS=g(()=>{Uu=new Map},"clear");function ju(e,t){return e.intersect(t)}g(ju,"intersectNode");var wb=ju;function Gu(e,t,r,i){var s=e.x,a=e.y,o=s-i.x,n=a-i.y,l=Math.sqrt(t*t*n*n+r*r*o*o),c=Math.abs(t*r*o/l);i.x<s&&(c=-c);var h=Math.abs(t*r*n/l);return i.y<a&&(h=-h),{x:s+c,y:a+h}}g(Gu,"intersectEllipse");var Xu=Gu;function Vu(e,t,r){return Xu(e,t,t,r)}g(Vu,"intersectCircle");var Bb=Vu;function Zu(e,t,r,i){{const s=t.y-e.y,a=e.x-t.x,o=t.x*e.y-e.x*t.y,n=s*r.x+a*r.y+o,l=s*i.x+a*i.y+o,c=1e-6;if(n!==0&&l!==0&&Mo(n,l))return;const h=i.y-r.y,d=r.x-i.x,p=i.x*r.y-r.x*i.y,u=h*e.x+d*e.y+p,f=h*t.x+d*t.y+p;if(Math.abs(u)<c&&Math.abs(f)<c&&Mo(u,f))return;const m=s*d-h*a;if(m===0)return;const y=Math.abs(m/2);let C=a*p-d*o;const b=C<0?(C-y)/m:(C+y)/m;C=h*o-s*p;const k=C<0?(C-y)/m:(C+y)/m;return{x:b,y:k}}}g(Zu,"intersectLine");function Mo(e,t){return e*t>0}g(Mo,"sameSign");var _b=Zu;function Qu(e,t,r){let i=e.x,s=e.y,a=[],o=Number.POSITIVE_INFINITY,n=Number.POSITIVE_INFINITY;typeof t.forEach=="function"?t.forEach(function(h){o=Math.min(o,h.x),n=Math.min(n,h.y)}):(o=Math.min(o,t.x),n=Math.min(n,t.y));let l=i-e.width/2-o,c=s-e.height/2-n;for(let h=0;h<t.length;h++){let d=t[h],p=t[h<t.length-1?h+1:0],u=_b(e,r,{x:l+d.x,y:c+d.y},{x:l+p.x,y:c+p.y});u&&a.push(u)}return a.length?(a.length>1&&a.sort(function(h,d){let p=h.x-r.x,u=h.y-r.y,f=Math.sqrt(p*p+u*u),m=d.x-r.x,y=d.y-r.y,C=Math.sqrt(m*m+y*y);return f<C?-1:f===C?0:1}),a[0]):e}g(Qu,"intersectPolygon");var vb=Qu,K={node:wb,circle:Bb,ellipse:Xu,polygon:vb,rect:Br};function Ku(e,t){const{labelStyles:r}=rt(t);t.labelStyle=r;const i=ht(t);let s=i;i||(s="anchor");const a=e.insert("g").attr("class",s).attr("id",t.domId||t.id),o=1,{cssStyles:n}=t,l=tt.svg(a),c=J(t,{fill:"black",stroke:"none",fillStyle:"solid"});t.look!=="handDrawn"&&(c.roughness=0);const h=l.circle(0,0,o*2,c),d=a.insert(()=>h,":first-child");return d.attr("class","anchor").attr("style",Ht(n)),st(t,d),t.intersect=function(p){return H.info("Circle intersect",t,o,p),K.circle(t,o,p)},a}g(Ku,"anchor");function $o(e,t,r,i,s,a,o){const l=(e+r)/2,c=(t+i)/2,h=Math.atan2(i-t,r-e),d=(r-e)/2,p=(i-t)/2,u=d/s,f=p/a,m=Math.sqrt(u**2+f**2);if(m>1)throw new Error("The given radii are too small to create an arc between the points.");const y=Math.sqrt(1-m**2),C=l+y*a*Math.sin(h)*(o?-1:1),b=c-y*s*Math.cos(h)*(o?-1:1),k=Math.atan2((t-b)/a,(e-C)/s);let S=Math.atan2((i-b)/a,(r-C)/s)-k;o&&S<0&&(S+=2*Math.PI),!o&&S>0&&(S-=2*Math.PI);const B=[];for(let F=0;F<20;F++){const v=F/19,z=k+v*S,q=C+s*Math.cos(z),M=b+a*Math.sin(z);B.push({x:q,y:M})}return B}g($o,"generateArcPoints");function Ju(e,t,r){const[i,s]=[t,r].sort((a,o)=>o-a);return s*(1-Math.sqrt(1-(e/i/2)**2))}g(Ju,"calculateArcSagitta");async function tp(e,t){const{labelStyles:r,nodeStyles:i}=rt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?12:s,n=g(z=>z+o,"calcTotalHeight"),l=g(z=>{const q=z/2;return[q/(2.5+z/50),q]},"calcEllipseRadius"),{shapeSvg:c,bbox:h}=await dt(e,t,ht(t)),d=n(t!=null&&t.height?t==null?void 0:t.height:h.height),[p,u]=l(d),f=Ju(d,p,u),y=(t!=null&&t.width?t==null?void 0:t.width:h.width)+a*2+f-f,C=d,{cssStyles:b}=t,k=[{x:y/2,y:-C/2},{x:-y/2,y:-C/2},...$o(-y/2,-C/2,-y/2,C/2,p,u,!1),{x:y/2,y:C/2},...$o(y/2,C/2,y/2,-C/2,p,u,!0)],w=tt.svg(c),S=J(t,{});t.look!=="handDrawn"&&(S.roughness=0,S.fillStyle="solid");const B=Tt(k),F=w.path(B,S),v=c.insert(()=>F,":first-child");return v.attr("class","basic label-container outer-path"),b&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",b),i&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",i),v.attr("transform",`translate(${p/2}, 0)`),st(t,v),t.intersect=function(z){return K.polygon(t,k,z)},c}g(tp,"bowTieRect");function Ye(e,t,r,i){return e.insert("polygon",":first-child").attr("points",i.map(function(s){return s.x+","+s.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+r/2+")")}g(Ye,"insertPolygonShape");var ds=12;async function ep(e,t){const{labelStyles:r,nodeStyles:i}=rt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?28:s,o=t.look==="neo"?24:s,{shapeSvg:n,bbox:l}=await dt(e,t,ht(t)),c=((t==null?void 0:t.width)??l.width)+(t.look==="neo"?a*2:a+ds),h=((t==null?void 0:t.height)??l.height)+(t.look==="neo"?o*2:o),d=0,p=c,u=-h,f=0,m=[{x:d+ds,y:u},{x:p,y:u},{x:p,y:f},{x:d,y:f},{x:d,y:u+ds},{x:d+ds,y:u}];let y;const{cssStyles:C}=t;if(t.look==="handDrawn"){const b=tt.svg(n),k=J(t,{}),w=Tt(m),S=b.path(w,k);y=n.insert(()=>S,":first-child").attr("transform",`translate(${-c/2}, ${h/2})`),C&&y.attr("style",C)}else y=Ye(n,c,h,m);return i&&y.attr("style",i),st(t,y),t.intersect=function(b){return K.polygon(t,m,b)},n}g(ep,"card");function rp(e,t){const{nodeStyles:r}=rt(t);t.label="";const i=e.insert("g").attr("class",ht(t)).attr("id",t.domId??t.id),{cssStyles:s}=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}],n=tt.svg(i),l=J(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const c=Tt(o),h=n.path(c,l),d=i.insert(()=>h,":first-child");return s&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",s),r&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",r),t.width=28,t.height=28,t.intersect=function(p){return K.polygon(t,o,p)},i}g(rp,"choice");async function En(e,t,r){const{labelStyles:i,nodeStyles:s}=rt(t);t.labelStyle=i;const{shapeSvg:a,bbox:o,halfPadding:n}=await dt(e,t,ht(t)),l=16,c=(r==null?void 0:r.padding)??n,h=t.look==="neo"?o.width/2+l*2:o.width/2+c;let d;const{cssStyles:p}=t;if(t.look==="handDrawn"){const u=tt.svg(a),f=J(t,{}),m=u.circle(0,0,h*2,f);d=a.insert(()=>m,":first-child"),d.attr("class","basic label-container").attr("style",Ht(p))}else d=a.insert("circle",":first-child").attr("class","basic label-container").attr("style",s).attr("r",h).attr("cx",0).attr("cy",0);return st(t,d),t.calcIntersect=function(u,f){const m=u.width/2;return K.circle(u,m,f)},t.intersect=function(u){return H.info("Circle intersect",t,h,u),K.circle(t,h,u)},a}g(En,"circle");function ip(e){const t=Math.cos(Math.PI/4),r=Math.sin(Math.PI/4),i=e*2,s={x:i/2*t,y:i/2*r},a={x:-(i/2)*t,y:i/2*r},o={x:-(i/2)*t,y:-(i/2)*r},n={x:i/2*t,y:-(i/2)*r};return`M ${a.x},${a.y} L ${n.x},${n.y}
234
+ M ${s.x},${s.y} L ${o.x},${o.y}`}g(ip,"createLine");function sp(e,t){const{labelStyles:r,nodeStyles:i}=rt(t);t.labelStyle=r,t.label="";const s=e.insert("g").attr("class",ht(t)).attr("id",t.domId??t.id),a=Math.max(30,(t==null?void 0:t.width)??0),{cssStyles:o}=t,n=tt.svg(s),l=J(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const c=n.circle(0,0,a*2,l),h=ip(a),d=n.path(h,l),p=s.insert(()=>c,":first-child");return p.insert(()=>d),p.attr("class","outer-path"),o&&t.look!=="handDrawn"&&p.selectAll("path").attr("style",o),i&&t.look!=="handDrawn"&&p.selectAll("path").attr("style",i),st(t,p),t.intersect=function(u){return H.info("crossedCircle intersect",t,{radius:a,point:u}),K.circle(t,a,u)},s}g(sp,"crossedCircle");function qe(e,t,r,i=100,s=0,a=180){const o=[],n=s*Math.PI/180,h=(a*Math.PI/180-n)/(i-1);for(let d=0;d<i;d++){const p=n+d*h,u=e+r*Math.cos(p),f=t+r*Math.sin(p);o.push({x:-u,y:-f})}return o}g(qe,"generateCirclePoints");async function ap(e,t){const{labelStyles:r,nodeStyles:i}=rt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,label:o}=await dt(e,t,ht(t)),n=t.look==="neo"?18:t.padding??0,l=t.look==="neo"?12:t.padding??0,c=a.width+n,h=a.height+l,d=Math.max(5,h*.1),{cssStyles:p}=t,u=[...qe(c/2,-h/2,d,30,-90,0),{x:-c/2-d,y:d},...qe(c/2+d*2,-d,d,20,-180,-270),...qe(c/2+d*2,d,d,20,-90,-180),{x:-c/2-d,y:-h/2},...qe(c/2,h/2,d,20,0,90)],f=[{x:c/2,y:-h/2-d},{x:-c/2,y:-h/2-d},...qe(c/2,-h/2,d,20,-90,0),{x:-c/2-d,y:-d},...qe(c/2+c*.1,-d,d,20,-180,-270),...qe(c/2+c*.1,d,d,20,-90,-180),{x:-c/2-d,y:h/2},...qe(c/2,h/2,d,20,0,90),{x:-c/2,y:h/2+d},{x:c/2,y:h/2+d}],m=tt.svg(s),y=J(t,{fill:"none"});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const b=Tt(u).replace("Z",""),k=m.path(b,y),w=Tt(f),S=m.path(w,{...y}),B=s.insert("g",":first-child");return B.insert(()=>S,":first-child").attr("stroke-opacity",0),B.insert(()=>k,":first-child"),B.attr("class","text"),p&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",p),i&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",i),B.attr("transform",`translate(${d}, 0)`),o.attr("transform",`translate(${-c/2+d-(a.x-(a.left??0))},${-h/2+(t.padding??0)/2-(a.y-(a.top??0))})`),st(t,B),t.intersect=function(F){return K.polygon(t,f,F)},s}g(ap,"curlyBraceLeft");function Ne(e,t,r,i=100,s=0,a=180){const o=[],n=s*Math.PI/180,h=(a*Math.PI/180-n)/(i-1);for(let d=0;d<i;d++){const p=n+d*h,u=e+r*Math.cos(p),f=t+r*Math.sin(p);o.push({x:u,y:f})}return o}g(Ne,"generateCirclePoints");async function op(e,t){const{labelStyles:r,nodeStyles:i}=rt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,label:o}=await dt(e,t,ht(t)),n=t.look==="neo"?18:t.padding??0,l=t.look==="neo"?12:t.padding??0,c=a.width+(t.look==="neo"?n*2:n),h=a.height+(t.look==="neo"?l*2:l),d=Math.max(5,h*.1),{cssStyles:p}=t,u=[...Ne(c/2,-h/2,d,20,-90,0),{x:c/2+d,y:-d},...Ne(c/2+d*2,-d,d,20,-180,-270),...Ne(c/2+d*2,d,d,20,-90,-180),{x:c/2+d,y:h/2},...Ne(c/2,h/2,d,20,0,90)],f=[{x:-c/2,y:-h/2-d},{x:c/2,y:-h/2-d},...Ne(c/2,-h/2,d,20,-90,0),{x:c/2+d,y:-d},...Ne(c/2+d*2,-d,d,20,-180,-270),...Ne(c/2+d*2,d,d,20,-90,-180),{x:c/2+d,y:h/2},...Ne(c/2,h/2,d,20,0,90),{x:c/2,y:h/2+d},{x:-c/2,y:h/2+d}],m=tt.svg(s),y=J(t,{fill:"none"});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const b=Tt(u).replace("Z",""),k=m.path(b,y),w=Tt(f),S=m.path(w,{...y}),B=s.insert("g",":first-child");return B.insert(()=>S,":first-child").attr("stroke-opacity",0),B.insert(()=>k,":first-child"),B.attr("class","text"),p&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",p),i&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",i),B.attr("transform",`translate(${-d}, 0)`),o.attr("transform",`translate(${-c/2+(t.padding??0)/2-(a.x-(a.left??0))},${-h/2+(t.padding??0)/2-(a.y-(a.top??0))})`),st(t,B),t.intersect=function(F){return K.polygon(t,f,F)},s}g(op,"curlyBraceRight");function Ut(e,t,r,i=100,s=0,a=180){const o=[],n=s*Math.PI/180,h=(a*Math.PI/180-n)/(i-1);for(let d=0;d<i;d++){const p=n+d*h,u=e+r*Math.cos(p),f=t+r*Math.sin(p);o.push({x:-u,y:-f})}return o}g(Ut,"generateCirclePoints");async function np(e,t){const{labelStyles:r,nodeStyles:i}=rt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,label:o}=await dt(e,t,ht(t)),n=t.look==="neo"?18:t.padding??0,l=t.look==="neo"?12:t.padding??0,c=a.width+(t.look==="neo"?n*2:n),h=a.height+(t.look==="neo"?l*2:l),d=Math.max(5,h*.1),{cssStyles:p}=t,u=[...Ut(c/2,-h/2,d,30,-90,0),{x:-c/2-d,y:d},...Ut(c/2+d*2,-d,d,20,-180,-270),...Ut(c/2+d*2,d,d,20,-90,-180),{x:-c/2-d,y:-h/2},...Ut(c/2,h/2,d,20,0,90)],f=[...Ut(-c/2+d+d/2,-h/2,d,20,-90,-180),{x:c/2-d/2,y:d},...Ut(-c/2-d/2,-d,d,20,0,90),...Ut(-c/2-d/2,d,d,20,-90,0),{x:c/2-d/2,y:-d},...Ut(-c/2+d+d/2,h/2,d,30,-180,-270)],m=[{x:c/2,y:-h/2-d},{x:-c/2,y:-h/2-d},...Ut(c/2,-h/2,d,20,-90,0),{x:-c/2-d,y:-d},...Ut(c/2+d*2,-d,d,20,-180,-270),...Ut(c/2+d*2,d,d,20,-90,-180),{x:-c/2-d,y:h/2},...Ut(c/2,h/2,d,20,0,90),{x:-c/2,y:h/2+d},{x:c/2-d-d/2,y:h/2+d},...Ut(-c/2+d+d/2,-h/2,d,20,-90,-180),{x:c/2-d/2,y:d},...Ut(-c/2-d/2,-d,d,20,0,90),...Ut(-c/2-d/2,d,d,20,-90,0),{x:c/2-d/2,y:-d},...Ut(-c/2+d+d/2,h/2,d,30,-180,-270)],y=tt.svg(s),C=J(t,{fill:"none"});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const k=Tt(u).replace("Z",""),w=y.path(k,C),B=Tt(f).replace("Z",""),F=y.path(B,C),v=Tt(m),z=y.path(v,{...C}),q=s.insert("g",":first-child");return q.insert(()=>z,":first-child").attr("stroke-opacity",0),q.insert(()=>w,":first-child"),q.insert(()=>F,":first-child"),q.attr("class","text"),p&&t.look!=="handDrawn"&&q.selectAll("path").attr("style",p),i&&t.look!=="handDrawn"&&q.selectAll("path").attr("style",i),q.attr("transform",`translate(${d-d/4}, 0)`),o.attr("transform",`translate(${-c/2+(t.padding??0)/2-(a.x-(a.left??0))},${-h/2+(t.padding??0)/2-(a.y-(a.top??0))})`),st(t,q),t.intersect=function(M){return K.polygon(t,m,M)},s}g(np,"curlyBraces");async function lp(e,t){const{labelStyles:r,nodeStyles:i}=rt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?12:s,n=20,l=5,{shapeSvg:c,bbox:h}=await dt(e,t,ht(t)),d=Math.max(n,(h.width+a*2)*1.25,(t==null?void 0:t.width)??0),p=Math.max(l,h.height+o*2,(t==null?void 0:t.height)??0),u=p/2,{cssStyles:f}=t,m=tt.svg(c),y=J(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const C=d,b=p,k=C-u,w=b/4,S=[{x:k,y:0},{x:w,y:0},{x:0,y:b/2},{x:w,y:b},{x:k,y:b},...Ni(-k,-b/2,u,50,270,90)],B=Tt(S),F=m.path(B,y),v=c.insert(()=>F,":first-child");return v.attr("class","basic label-container outer-path"),f&&t.look!=="handDrawn"&&v.selectChildren("path").attr("style",f),i&&t.look!=="handDrawn"&&v.selectChildren("path").attr("style",i),v.attr("transform",`translate(${-d/2}, ${-p/2})`),st(t,v),t.intersect=function(z){return K.polygon(t,S,z)},c}g(lp,"curvedTrapezoid");var Lb=g((e,t,r,i,s,a)=>[`M${e},${t+a}`,`a${s},${a} 0,0,0 ${r},0`,`a${s},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${s},${a} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createCylinderPathD"),Fb=g((e,t,r,i,s,a)=>[`M${e},${t+a}`,`M${e+r},${t+a}`,`a${s},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${s},${a} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createOuterCylinderPathD"),Ab=g((e,t,r,i,s,a)=>[`M${e-r/2},${-i/2}`,`a${s},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),th=8,eh=8;async function hp(e,t){const{labelStyles:r,nodeStyles:i}=rt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?24:s,o=t.look==="neo"?24:s;if(t.width||t.height){const y=t.width??0;t.width=(t.width??0)-o,t.width<eh&&(t.width=eh);const b=y/2/(2.5+y/50);t.height=(t.height??0)-a-b*3,t.height<th&&(t.height=th)}const{shapeSvg:n,bbox:l,label:c}=await dt(e,t,ht(t)),h=(t.width?t.width:l.width)+o,d=h/2,p=d/(2.5+h/50),u=(t.height?t.height:l.height)+a+p;let f;const{cssStyles:m}=t;if(t.look==="handDrawn"){const y=tt.svg(n),C=Fb(0,0,h,u,d,p),b=Ab(0,p,h,u,d,p),k=J(t,{}),w=y.path(C,k),S=y.path(b,J(t,{fill:"none"}));f=n.insert(()=>S,":first-child"),f=n.insert(()=>w,":first-child"),f.attr("class","basic label-container"),m&&f.attr("style",m)}else{const y=Lb(0,0,h,u,d,p);f=n.insert("path",":first-child").attr("d",y).attr("class","basic label-container outer-path").attr("style",Ht(m)).attr("style",i)}return f.attr("label-offset-y",p),f.attr("transform",`translate(${-h/2}, ${-(u/2+p)})`),st(t,f),c.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(y){const C=K.rect(t,y),b=C.x-(t.x??0);if(d!=0&&(Math.abs(b)<(t.width??0)/2||Math.abs(b)==(t.width??0)/2&&Math.abs(C.y-(t.y??0))>(t.height??0)/2-p)){let k=p*p*(1-b*b/(d*d));k>0&&(k=Math.sqrt(k)),k=p-k,y.y-(t.y??0)>0&&(k=-k),C.y+=k}return C},n}g(hp,"cylinder");async function di(e,t,r){const{labelStyles:i,nodeStyles:s}=rt(t);t.labelStyle=i;const{shapeSvg:a,bbox:o}=await dt(e,t,ht(t)),n=Math.max(o.width+r.labelPaddingX*2,(t==null?void 0:t.width)||0),l=Math.max(o.height+r.labelPaddingY*2,(t==null?void 0:t.height)||0),c=-n/2,h=-l/2;let d,{rx:p,ry:u}=t;const{cssStyles:f}=t;if(r!=null&&r.rx&&r.ry&&(p=r.rx,u=r.ry),t.look==="handDrawn"){const m=tt.svg(a),y=J(t,{}),C=p||u?m.path(or(c,h,n,l,p||0),y):m.rectangle(c,h,n,l,y);d=a.insert(()=>C,":first-child"),d.attr("class","basic label-container").attr("style",Ht(f))}else d=a.insert("rect",":first-child"),d.attr("class","basic label-container").attr("style",s).attr("rx",Ht(p)).attr("ry",Ht(u)).attr("x",c).attr("y",h).attr("width",n).attr("height",l);return st(t,d),t.calcIntersect=function(m,y){return K.rect(m,y)},t.intersect=function(m){return K.rect(t,m)},a}g(di,"drawRect");async function cp(e,t){const{cssClasses:r,labelPaddingX:i,labelPaddingY:s,padding:a,width:o,height:n}=t,l={rx:0,ry:0,labelPaddingX:i??(a??0)*2,labelPaddingY:s??a??0},c=await di(e,t,l);if(t.look==="handDrawn"){const u=tt.svg(c),f=J(t,{}),m=c.select(".basic.label-container > path:nth-child(2)"),y=m.node();if(!y)return c;let C=null;if(y instanceof SVGGraphicsElement)C=y.getBBox();else return c;return c.insert(()=>u.line(C.x,C.y,C.x+C.width,C.y,f),".basic.label-container g.label"),c.insert(()=>u.line(C.x,C.y+C.height,C.x+C.width,C.y+C.height,f),".basic.label-container g.label"),m.remove(),c}const h=c.select(".basic.label-container"),d=(Number(h.attr("width"))||o)??0,p=(Number(h.attr("height"))||n)??0;return d>0&&p>0&&h.attr("stroke-dasharray",`${d} ${p}`),c}g(cp,"datastore");async function dp(e,t){const{labelStyles:r,nodeStyles:i}=rt(t);t.labelStyle=r;const s=t.look==="neo"?16:t.padding??0,a=t.look==="neo"?16:t.padding??0,{shapeSvg:o,bbox:n,label:l}=await dt(e,t,ht(t)),c=n.width+s,h=n.height+a,d=h*.2,p=-c/2,u=-h/2-d/2,{cssStyles:f}=t,m=tt.svg(o),y=J(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const C=[{x:p,y:u+d},{x:-p,y:u+d},{x:-p,y:-u},{x:p,y:-u},{x:p,y:u},{x:-p,y:u},{x:-p,y:u+d}],b=m.polygon(C.map(w=>[w.x,w.y]),y),k=o.insert(()=>b,":first-child");return k.attr("class","basic label-container outer-path"),f&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",i),l.attr("transform",`translate(${p+(t.padding??0)/2-(n.x-(n.left??0))}, ${u+d+(t.padding??0)/2-(n.y-(n.top??0))})`),st(t,k),t.intersect=function(w){return K.rect(t,w)},o}g(dp,"dividedRectangle");async function up(e,t){var u,f;const{labelStyles:r,nodeStyles:i}=rt(t),s=t.look==="neo"?12:5;t.labelStyle=r;const a=t.padding??0,o=t.look==="neo"?16:a,{shapeSvg:n,bbox:l}=await dt(e,t,ht(t)),c=(t!=null&&t.width?(t==null?void 0:t.width)/2:l.width/2)+(o??0),h=c-s;let d;const{cssStyles:p}=t;if(t.look==="handDrawn"){const m=tt.svg(n),y=J(t,{roughness:.2,strokeWidth:2.5}),C=J(t,{roughness:.2,strokeWidth:1.5}),b=m.circle(0,0,c*2,y),k=m.circle(0,0,h*2,C);d=n.insert("g",":first-child"),d.attr("class",Ht(t.cssClasses)).attr("style",Ht(p)),(u=d.node())==null||u.appendChild(b),(f=d.node())==null||f.appendChild(k)}else{d=n.insert("g",":first-child");const m=d.insert("circle",":first-child"),y=d.insert("circle");d.attr("class","basic label-container").attr("style",i),m.attr("class","outer-circle").attr("style",i).attr("r",c).attr("cx",0).attr("cy",0),y.attr("class","inner-circle").attr("style",i).attr("r",h).attr("cx",0).attr("cy",0)}return st(t,d),t.intersect=function(m){return H.info("DoubleCircle intersect",t,c,m),K.circle(t,c,m)},n}g(up,"doublecircle");function pp(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:s}=rt(t);t.label="",t.labelStyle=i;const a=e.insert("g").attr("class",ht(t)).attr("id",t.domId??t.id),o=7,{cssStyles:n}=t,l=tt.svg(a),{nodeBorder:c}=r,h=J(t,{fillStyle:"solid"});t.look!=="handDrawn"&&(h.roughness=0);const d=l.circle(0,0,o*2,h),p=a.insert(()=>d,":first-child");return p.selectAll("path").attr("style",`fill: ${c} !important;`),n&&n.length>0&&t.look!=="handDrawn"&&p.selectAll("path").attr("style",n),s&&t.look!=="handDrawn"&&p.selectAll("path").attr("style",s),st(t,p),t.intersect=function(u){return H.info("filledCircle intersect",t,{radius:o,point:u}),K.circle(t,o,u)},a}g(pp,"filledCircle");var rh=10,ih=10;async function gp(e,t){const{labelStyles:r,nodeStyles:i}=rt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?s*2:s;(t.width||t.height)&&(t.height=(t==null?void 0:t.height)??0,t.height<rh&&(t.height=rh),t.width=((t==null?void 0:t.width)??0)-a-a/2,t.width<ih&&(t.width=ih));const{shapeSvg:o,bbox:n,label:l}=await dt(e,t,ht(t)),c=(t!=null&&t.width?t==null?void 0:t.width:n.width)+(a??0),h=t!=null&&t.height?t==null?void 0:t.height:c+n.height,d=h,p=[{x:0,y:-h},{x:d,y:-h},{x:d/2,y:0}],{cssStyles:u}=t,f=tt.svg(o),m=J(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=Tt(p),C=f.path(y,m),b=o.insert(()=>C,":first-child").attr("transform",`translate(${-h/2}, ${h/2})`).attr("class","outer-path");return u&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",u),i&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",i),t.width=c,t.height=h,st(t,b),l.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${-h/2+(t.padding??0)/2+(n.y-(n.top??0))})`),t.intersect=function(k){return H.info("Triangle intersect",t,p,k),K.polygon(t,p,k)},o}g(gp,"flippedTriangle");function fp(e,t,{dir:r,config:{state:i,themeVariables:s}}){const{nodeStyles:a}=rt(t);t.label="";const o=e.insert("g").attr("class",ht(t)).attr("id",t.domId??t.id),{cssStyles:n}=t;let l=Math.max(70,(t==null?void 0:t.width)??0),c=Math.max(10,(t==null?void 0:t.height)??0);r==="LR"&&(l=Math.max(10,(t==null?void 0:t.width)??0),c=Math.max(70,(t==null?void 0:t.height)??0));const h=-1*l/2,d=-1*c/2,p=tt.svg(o),u=J(t,{stroke:s.lineColor,fill:s.lineColor});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const f=p.rectangle(h,d,l,c,u),m=o.insert(()=>f,":first-child");n&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",n),a&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",a),st(t,m);const y=(i==null?void 0:i.padding)??0;return t.width&&t.height&&(t.width+=y/2||0,t.height+=y/2||0),t.intersect=function(C){return K.rect(t,C)},o}g(fp,"forkJoin");async function mp(e,t){const{labelStyles:r,nodeStyles:i}=rt(t);t.labelStyle=r;const s=15,a=10,o=t.look==="neo"?16:t.padding??0,n=t.look==="neo"?12:t.padding??0;(t.width||t.height)&&(t.height=((t==null?void 0:t.height)??0)-n*2,t.height<a&&(t.height=a),t.width=((t==null?void 0:t.width)??0)-o*2,t.width<s&&(t.width=s));const{shapeSvg:l,bbox:c}=await dt(e,t,ht(t)),h=(t!=null&&t.width?t==null?void 0:t.width:Math.max(s,c.width))+o*2,d=(t!=null&&t.height?t==null?void 0:t.height:Math.max(a,c.height))+n*2,p=d/2,{cssStyles:u}=t,f=tt.svg(l),m=J(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=[{x:-h/2,y:-d/2},{x:h/2-p,y:-d/2},...Ni(-h/2+p,0,p,50,90,270),{x:h/2-p,y:d/2},{x:-h/2,y:d/2}],C=Tt(y),b=f.path(C,m),k=l.insert(()=>b,":first-child");return k.attr("class","basic label-container outer-path"),u&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",u),i&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",i),st(t,k),t.intersect=function(w){return H.info("Pill intersect",t,{radius:p,point:w}),K.polygon(t,y,w)},l}g(mp,"halfRoundedRectangle");var Eb=g((e,t,r,i,s)=>[`M${e+s},${t}`,`L${e+r-s},${t}`,`L${e+r},${t-i/2}`,`L${e+r-s},${t-i}`,`L${e+s},${t-i}`,`L${e},${t-i/2}`,"Z"].join(" "),"createHexagonPathD");async function yp(e,t){const{labelStyles:r,nodeStyles:i}=rt(t),s=t.look==="neo"?3.5:4;t.labelStyle=r;const a=t.padding??0,o=70,n=32,l=t.look==="neo"?o:a,c=t.look==="neo"?n:a;if(t.width||t.height){const k=(t.height??0)/s;t.width=((t==null?void 0:t.width)??0)-2*k-c,t.height=(t.height??0)-l}const{shapeSvg:h,bbox:d}=await dt(e,t,ht(t)),p=(t!=null&&t.height?t==null?void 0:t.height:d.height)+l,u=p/s,f=(t!=null&&t.width?t==null?void 0:t.width:d.width)+2*u+c,m=[{x:u,y:0},{x:f-u,y:0},{x:f,y:-p/2},{x:f-u,y:-p},{x:u,y:-p},{x:0,y:-p/2}];let y;const{cssStyles:C}=t;if(t.look==="handDrawn"){const b=tt.svg(h),k=J(t,{}),w=Eb(0,0,f,p,u),S=b.path(w,k);y=h.insert(()=>S,":first-child").attr("transform",`translate(${-f/2}, ${p/2})`),C&&y.attr("style",C)}else y=Ye(h,f,p,m);return i&&y.attr("style",i),t.width=f,t.height=p,st(t,y),t.intersect=function(b){return K.polygon(t,m,b)},h}g(yp,"hexagon");async function Cp(e,t){const{labelStyles:r,nodeStyles:i}=rt(t);t.label="",t.labelStyle=r;const{shapeSvg:s}=await dt(e,t,ht(t)),a=Math.max(30,(t==null?void 0:t.width)??0),o=Math.max(30,(t==null?void 0:t.height)??0),{cssStyles:n}=t,l=tt.svg(s),c=J(t,{});t.look!=="handDrawn"&&(c.roughness=0,c.fillStyle="solid");const h=[{x:0,y:0},{x:a,y:0},{x:0,y:o},{x:a,y:o}],d=Tt(h),p=l.path(d,c),u=s.insert(()=>p,":first-child");return u.attr("class","basic label-container outer-path"),n&&t.look!=="handDrawn"&&u.selectChildren("path").attr("style",n),i&&t.look!=="handDrawn"&&u.selectChildren("path").attr("style",i),u.attr("transform",`translate(${-a/2}, ${-o/2})`),st(t,u),t.intersect=function(f){return H.info("Pill intersect",t,{points:h}),K.polygon(t,h,f)},s}g(Cp,"hourglass");async function xp(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=rt(t);t.labelStyle=s;const a=t.assetHeight??48,o=t.assetWidth??48,n=Math.max(a,o),l=i==null?void 0:i.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:c,bbox:h,label:d}=await dt(e,t,"icon-shape default"),p=t.pos==="t",u=n,f=n,{nodeBorder:m}=r,{stylesMap:y}=ci(t),C=-f/2,b=-u/2,k=t.label?8:0,w=tt.svg(c),S=J(t,{stroke:"none",fill:"none"});t.look!=="handDrawn"&&(S.roughness=0,S.fillStyle="solid");const B=w.rectangle(C,b,f,u,S),F=Math.max(f,h.width),v=u+h.height+k,z=w.rectangle(-F/2,-v/2,F,v,{...S,fill:"transparent",stroke:"none"}),q=c.insert(()=>B,":first-child"),M=c.insert(()=>z);if(t.icon){const U=c.append("g");U.html(`<g>${await Gi(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const W=U.node().getBBox(),O=W.width,A=W.height,_=W.x,$=W.y;U.attr("transform",`translate(${-O/2-_},${p?h.height/2+k/2-A/2-$:-h.height/2-k/2-A/2-$})`),U.attr("style",`color: ${y.get("stroke")??m};`)}return d.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${p?-v/2:v/2-h.height})`),q.attr("transform",`translate(0,${p?h.height/2+k/2:-h.height/2-k/2})`),st(t,M),t.intersect=function(U){if(H.info("iconSquare intersect",t,U),!t.label)return K.rect(t,U);const W=t.x??0,O=t.y??0,A=t.height??0;let _=[];return p?_=[{x:W-h.width/2,y:O-A/2},{x:W+h.width/2,y:O-A/2},{x:W+h.width/2,y:O-A/2+h.height+k},{x:W+f/2,y:O-A/2+h.height+k},{x:W+f/2,y:O+A/2},{x:W-f/2,y:O+A/2},{x:W-f/2,y:O-A/2+h.height+k},{x:W-h.width/2,y:O-A/2+h.height+k}]:_=[{x:W-f/2,y:O-A/2},{x:W+f/2,y:O-A/2},{x:W+f/2,y:O-A/2+u},{x:W+h.width/2,y:O-A/2+u},{x:W+h.width/2/2,y:O+A/2},{x:W-h.width/2,y:O+A/2},{x:W-h.width/2,y:O-A/2+u},{x:W-f/2,y:O-A/2+u}],K.polygon(t,_,U)},c}g(xp,"icon");async function bp(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=rt(t);t.labelStyle=s;const a=t.assetHeight??48,o=t.assetWidth??48,n=Math.max(a,o),l=i==null?void 0:i.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:c,bbox:h,label:d}=await dt(e,t,"icon-shape default"),p=20,u=t.label?8:0,f=t.pos==="t",{nodeBorder:m,mainBkg:y}=r,{stylesMap:C}=ci(t),b=tt.svg(c),k=J(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const w=C.get("fill");k.stroke=w??y;const S=c.append("g");t.icon&&S.html(`<g>${await Gi(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const B=S.node().getBBox(),F=B.width,v=B.height,z=B.x,q=B.y,M=Math.max(F,v)*Math.SQRT2+p*2,U=b.circle(0,0,M,k),W=Math.max(M,h.width),O=M+h.height+u,A=b.rectangle(-W/2,-O/2,W,O,{...k,fill:"transparent",stroke:"none"}),_=c.insert(()=>U,":first-child"),$=c.insert(()=>A);return S.attr("transform",`translate(${-F/2-z},${f?h.height/2+u/2-v/2-q:-h.height/2-u/2-v/2-q})`),S.attr("style",`color: ${C.get("stroke")??m};`),d.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${f?-O/2:O/2-h.height})`),_.attr("transform",`translate(0,${f?h.height/2+u/2:-h.height/2-u/2})`),st(t,$),t.intersect=function(E){return H.info("iconSquare intersect",t,E),K.rect(t,E)},c}g(bp,"iconCircle");async function kp(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=rt(t);t.labelStyle=s;const a=t.assetHeight??48,o=t.assetWidth??48,n=Math.max(a,o),l=i==null?void 0:i.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:c,bbox:h,halfPadding:d,label:p}=await dt(e,t,"icon-shape default"),u=t.pos==="t",f=n+d*2,m=n+d*2,{nodeBorder:y,mainBkg:C}=r,{stylesMap:b}=ci(t),k=-m/2,w=-f/2,S=t.label?8:0,B=tt.svg(c),F=J(t,{});t.look!=="handDrawn"&&(F.roughness=0,F.fillStyle="solid");const v=b.get("fill");F.stroke=v??C;const z=B.path(or(k,w,m,f,5),F),q=Math.max(m,h.width),M=f+h.height+S,U=B.rectangle(-q/2,-M/2,q,M,{...F,fill:"transparent",stroke:"none"}),W=c.insert(()=>z,":first-child").attr("class","icon-shape2"),O=c.insert(()=>U);if(t.icon){const A=c.append("g");A.html(`<g>${await Gi(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const _=A.node().getBBox(),$=_.width,E=_.height,N=_.x,Y=_.y;A.attr("transform",`translate(${-$/2-N},${u?h.height/2+S/2-E/2-Y:-h.height/2-S/2-E/2-Y})`),A.attr("style",`color: ${b.get("stroke")??y};`)}return p.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${u?-M/2:M/2-h.height})`),W.attr("transform",`translate(0,${u?h.height/2+S/2:-h.height/2-S/2})`),st(t,O),t.intersect=function(A){if(H.info("iconSquare intersect",t,A),!t.label)return K.rect(t,A);const _=t.x??0,$=t.y??0,E=t.height??0;let N=[];return u?N=[{x:_-h.width/2,y:$-E/2},{x:_+h.width/2,y:$-E/2},{x:_+h.width/2,y:$-E/2+h.height+S},{x:_+m/2,y:$-E/2+h.height+S},{x:_+m/2,y:$+E/2},{x:_-m/2,y:$+E/2},{x:_-m/2,y:$-E/2+h.height+S},{x:_-h.width/2,y:$-E/2+h.height+S}]:N=[{x:_-m/2,y:$-E/2},{x:_+m/2,y:$-E/2},{x:_+m/2,y:$-E/2+f},{x:_+h.width/2,y:$-E/2+f},{x:_+h.width/2/2,y:$+E/2},{x:_-h.width/2,y:$+E/2},{x:_-h.width/2,y:$-E/2+f},{x:_-m/2,y:$-E/2+f}],K.polygon(t,N,A)},c}g(kp,"iconRounded");async function Tp(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=rt(t);t.labelStyle=s;const a=t.assetHeight??48,o=t.assetWidth??48,n=Math.max(a,o),l=i==null?void 0:i.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:c,bbox:h,halfPadding:d,label:p}=await dt(e,t,"icon-shape default"),u=t.pos==="t",f=n+d*2,m=n+d*2,{nodeBorder:y,mainBkg:C}=r,{stylesMap:b}=ci(t),k=-m/2,w=-f/2,S=t.label?8:0,B=tt.svg(c),F=J(t,{});t.look!=="handDrawn"&&(F.roughness=0,F.fillStyle="solid");const v=b.get("fill");F.stroke=v??C;const z=B.path(or(k,w,m,f,.1),F),q=Math.max(m,h.width),M=f+h.height+S,U=B.rectangle(-q/2,-M/2,q,M,{...F,fill:"transparent",stroke:"none"}),W=c.insert(()=>z,":first-child"),O=c.insert(()=>U);if(t.icon){const A=c.append("g");A.html(`<g>${await Gi(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const _=A.node().getBBox(),$=_.width,E=_.height,N=_.x,Y=_.y;A.attr("transform",`translate(${-$/2-N},${u?h.height/2+S/2-E/2-Y:-h.height/2-S/2-E/2-Y})`),A.attr("style",`color: ${b.get("stroke")??y};`)}return p.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${u?-M/2:M/2-h.height})`),W.attr("transform",`translate(0,${u?h.height/2+S/2:-h.height/2-S/2})`),st(t,O),t.intersect=function(A){if(H.info("iconSquare intersect",t,A),!t.label)return K.rect(t,A);const _=t.x??0,$=t.y??0,E=t.height??0;let N=[];return u?N=[{x:_-h.width/2,y:$-E/2},{x:_+h.width/2,y:$-E/2},{x:_+h.width/2,y:$-E/2+h.height+S},{x:_+m/2,y:$-E/2+h.height+S},{x:_+m/2,y:$+E/2},{x:_-m/2,y:$+E/2},{x:_-m/2,y:$-E/2+h.height+S},{x:_-h.width/2,y:$-E/2+h.height+S}]:N=[{x:_-m/2,y:$-E/2},{x:_+m/2,y:$-E/2},{x:_+m/2,y:$-E/2+f},{x:_+h.width/2,y:$-E/2+f},{x:_+h.width/2/2,y:$+E/2},{x:_-h.width/2,y:$+E/2},{x:_-h.width/2,y:$-E/2+f},{x:_-m/2,y:$-E/2+f}],K.polygon(t,N,A)},c}g(Tp,"iconSquare");async function Sp(e,t,{config:{flowchart:r}}){const i=new Image;i.src=(t==null?void 0:t.img)??"",await i.decode();const s=Number(i.naturalWidth.toString().replace("px","")),a=Number(i.naturalHeight.toString().replace("px",""));t.imageAspectRatio=s/a;const{labelStyles:o}=rt(t);t.labelStyle=o;const n=r==null?void 0:r.wrappingWidth;t.defaultWidth=r==null?void 0:r.wrappingWidth;const l=Math.max(t.label?n??0:0,(t==null?void 0:t.assetWidth)??s),c=t.constraint==="on"&&t!=null&&t.assetHeight?t.assetHeight*t.imageAspectRatio:l,h=t.constraint==="on"?c/t.imageAspectRatio:(t==null?void 0:t.assetHeight)??a;t.width=Math.max(c,n??0);const{shapeSvg:d,bbox:p,label:u}=await dt(e,t,"image-shape default"),f=t.pos==="t",m=-c/2,y=-h/2,C=t.label?8:0,b=tt.svg(d),k=J(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const w=b.rectangle(m,y,c,h,k),S=Math.max(c,p.width),B=h+p.height+C,F=b.rectangle(-S/2,-B/2,S,B,{...k,fill:"none",stroke:"none"}),v=d.insert(()=>w,":first-child"),z=d.insert(()=>F);if(t.img){const q=d.append("image");q.attr("href",t.img),q.attr("width",c),q.attr("height",h),q.attr("preserveAspectRatio","none"),q.attr("transform",`translate(${-c/2},${f?B/2-h:-B/2})`)}return u.attr("transform",`translate(${-p.width/2-(p.x-(p.left??0))},${f?-h/2-p.height/2-C/2:h/2-p.height/2+C/2})`),v.attr("transform",`translate(0,${f?p.height/2+C/2:-p.height/2-C/2})`),st(t,z),t.intersect=function(q){if(H.info("iconSquare intersect",t,q),!t.label)return K.rect(t,q);const M=t.x??0,U=t.y??0,W=t.height??0;let O=[];return f?O=[{x:M-p.width/2,y:U-W/2},{x:M+p.width/2,y:U-W/2},{x:M+p.width/2,y:U-W/2+p.height+C},{x:M+c/2,y:U-W/2+p.height+C},{x:M+c/2,y:U+W/2},{x:M-c/2,y:U+W/2},{x:M-c/2,y:U-W/2+p.height+C},{x:M-p.width/2,y:U-W/2+p.height+C}]:O=[{x:M-c/2,y:U-W/2},{x:M+c/2,y:U-W/2},{x:M+c/2,y:U-W/2+h},{x:M+p.width/2,y:U-W/2+h},{x:M+p.width/2/2,y:U+W/2},{x:M-p.width/2,y:U+W/2},{x:M-p.width/2,y:U-W/2+h},{x:M-c/2,y:U-W/2+h}],K.polygon(t,O,q)},d}g(Sp,"imageSquare");async function wp(e,t){const{labelStyles:r,nodeStyles:i}=rt(t);t.labelStyle=r;const s=t.padding??0,a=s,o=t.look==="neo"?s*2:s,{shapeSvg:n,bbox:l}=await dt(e,t,ht(t)),c=Math.max(l.width+(o??0)*2,(t==null?void 0:t.width)??0),h=Math.max(l.height+(a??0)*2,(t==null?void 0:t.height)??0),d=[{x:0,y:0},{x:c,y:0},{x:c+3*h/6,y:-h},{x:-3*h/6,y:-h}];let p;const{cssStyles:u}=t;if(t.look==="handDrawn"){const f=tt.svg(n),m=J(t,{}),y=Tt(d),C=f.path(y,m);p=n.insert(()=>C,":first-child").attr("transform",`translate(${-c/2}, ${h/2})`),u&&p.attr("style",u)}else p=Ye(n,c,h,d);return i&&p.attr("style",i),t.width=c,t.height=h,st(t,p),t.intersect=function(f){return K.polygon(t,d,f)},n}g(wp,"inv_trapezoid");async function Bp(e,t){const{shapeSvg:r,bbox:i,label:s}=await dt(e,t,"label"),a=r.insert("rect",":first-child");return a.attr("width",.1).attr("height",.1),r.attr("class","label edgeLabel"),s.attr("transform",`translate(${-(i.width/2)-(i.x-(i.left??0))}, ${-(i.height/2)-(i.y-(i.top??0))})`),st(t,a),t.intersect=function(l){return K.rect(t,l)},r}g(Bp,"labelRect");async function _p(e,t){const{labelStyles:r,nodeStyles:i}=rt(t);t.labelStyle=r;const s=t.padding??0,a=s,o=t.look==="neo"?s*2:s,{shapeSvg:n,bbox:l}=await dt(e,t,ht(t)),c=((t==null?void 0:t.height)??l.height)+a,h=((t==null?void 0:t.width)??l.width)+o,d=[{x:0,y:0},{x:h+3*c/6,y:0},{x:h,y:-c},{x:-(3*c)/6,y:-c}];let p;const{cssStyles:u}=t;if(t.look==="handDrawn"){const f=tt.svg(n),m=J(t,{}),y=Tt(d),C=f.path(y,m);p=n.insert(()=>C,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),u&&p.attr("style",u)}else p=Ye(n,h,c,d);return i&&p.attr("style",i),t.width=h,t.height=c,st(t,p),t.intersect=function(f){return K.polygon(t,d,f)},n}g(_p,"lean_left");async function vp(e,t){const{labelStyles:r,nodeStyles:i}=rt(t);t.labelStyle=r;const s=t.padding??0,a=s,o=t.look==="neo"?s*2:s,{shapeSvg:n,bbox:l}=await dt(e,t,ht(t)),c=((t==null?void 0:t.height)??l.height)+a,h=((t==null?void 0:t.width)??l.width)+o,d=[{x:-3*c/6,y:0},{x:h,y:0},{x:h+3*c/6,y:-c},{x:0,y:-c}];let p;const{cssStyles:u}=t;if(t.look==="handDrawn"){const f=tt.svg(n),m=J(t,{}),y=Tt(d),C=f.path(y,m);p=n.insert(()=>C,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),u&&p.attr("style",u)}else p=Ye(n,h,c,d);return i&&p.attr("style",i),t.width=h,t.height=c,st(t,p),t.intersect=function(f){return K.polygon(t,d,f)},n}g(vp,"lean_right");function Lp(e,t){const{labelStyles:r,nodeStyles:i}=rt(t);t.label="",t.labelStyle=r;const s=e.insert("g").attr("class",ht(t)).attr("id",t.domId??t.id),{cssStyles:a}=t,o=Math.max(35,(t==null?void 0:t.width)??0),n=Math.max(35,(t==null?void 0:t.height)??0),l=7,c=[{x:o,y:0},{x:0,y:n+l/2},{x:o-2*l,y:n+l/2},{x:0,y:2*n},{x:o,y:n-l/2},{x:2*l,y:n-l/2}],h=tt.svg(s),d=J(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const p=Tt(c),u=h.path(p,d),f=s.insert(()=>u,":first-child");return f.attr("class","outer-path"),a&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",a),i&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",i),f.attr("transform",`translate(-${o/2},${-n})`),st(t,f),t.intersect=function(m){return H.info("lightningBolt intersect",t,m),K.polygon(t,c,m)},s}g(Lp,"lightningBolt");var Mb=g((e,t,r,i,s,a,o)=>[`M${e},${t+a}`,`a${s},${a} 0,0,0 ${r},0`,`a${s},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${s},${a} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+a+o}`,`a${s},${a} 0,0,0 ${r},0`].join(" "),"createCylinderPathD"),$b=g((e,t,r,i,s,a,o)=>[`M${e},${t+a}`,`M${e+r},${t+a}`,`a${s},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${s},${a} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+a+o}`,`a${s},${a} 0,0,0 ${r},0`].join(" "),"createOuterCylinderPathD"),Ob=g((e,t,r,i,s,a)=>[`M${e-r/2},${-i/2}`,`a${s},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),sh=10,ah=10;async function Fp(e,t){const{labelStyles:r,nodeStyles:i}=rt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?24:s;if(t.width||t.height){const C=t.width??0;t.width=(t.width??0)-a,t.width<ah&&(t.width=ah);const k=C/2/(2.5+C/50);t.height=(t.height??0)-o-k*3,t.height<sh&&(t.height=sh)}const{shapeSvg:n,bbox:l,label:c}=await dt(e,t,ht(t)),h=(t!=null&&t.width?t==null?void 0:t.width:l.width)+a*2,d=h/2,p=d/(2.5+h/50),u=(t!=null&&t.height?t==null?void 0:t.height:l.height)+p+o*2,f=u*.1;let m;const{cssStyles:y}=t;if(t.look==="handDrawn"){const C=tt.svg(n),b=$b(0,0,h,u,d,p,f),k=Ob(0,p,h,u,d,p),w=J(t,{}),S=C.path(b,w),B=C.path(k,w);n.insert(()=>B,":first-child").attr("class","line"),m=n.insert(()=>S,":first-child"),m.attr("class","basic label-container"),y&&m.attr("style",y)}else{const C=Mb(0,0,h,u,d,p,f);m=n.insert("path",":first-child").attr("d",C).attr("class","basic label-container outer-path").attr("style",Ht(y)).attr("style",i)}return m.attr("label-offset-y",p),m.attr("transform",`translate(${-h/2}, ${-(u/2+p)})`),st(t,m),c.attr("transform",`translate(${-(l.width/2)-(l.x-(l.left??0))}, ${-(l.height/2)+p-(l.y-(l.top??0))})`),t.intersect=function(C){const b=K.rect(t,C),k=b.x-(t.x??0);if(d!=0&&(Math.abs(k)<(t.width??0)/2||Math.abs(k)==(t.width??0)/2&&Math.abs(b.y-(t.y??0))>(t.height??0)/2-p)){let w=p*p*(1-k*k/(d*d));w>0&&(w=Math.sqrt(w)),w=p-w,C.y-(t.y??0)>0&&(w=-w),b.y+=w}return b},n}g(Fp,"linedCylinder");async function Ap(e,t){const{labelStyles:r,nodeStyles:i}=rt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?12:s;if(t.width||t.height){const w=t.width;t.width=(w??0)*10/11-a*2,t.width<10&&(t.width=10),t.height=((t==null?void 0:t.height)??0)-o*2,t.height<10&&(t.height=10)}const{shapeSvg:n,bbox:l,label:c}=await dt(e,t,ht(t)),h=(t!=null&&t.width?t==null?void 0:t.width:l.width)+(a??0)*2,d=(t!=null&&t.height?t==null?void 0:t.height:l.height)+(o??0)*2,p=t.look==="neo"?d/4:d/8,u=d+p,{cssStyles:f}=t,m=tt.svg(n),y=J(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const C=[{x:-h/2-h/2*.1,y:-u/2},{x:-h/2-h/2*.1,y:u/2},...ar(-h/2-h/2*.1,u/2,h/2+h/2*.1,u/2,p,.8),{x:h/2+h/2*.1,y:-u/2},{x:-h/2-h/2*.1,y:-u/2},{x:-h/2,y:-u/2},{x:-h/2,y:u/2*1.1},{x:-h/2,y:-u/2}],b=m.polygon(C.map(w=>[w.x,w.y]),y),k=n.insert(()=>b,":first-child");return k.attr("class","basic label-container outer-path"),f&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",i),k.attr("transform",`translate(0,${-p/2})`),c.attr("transform",`translate(${-h/2+(t.padding??0)+h/2*.1/2-(l.x-(l.left??0))},${-d/2+(t.padding??0)-p/2-(l.y-(l.top??0))})`),st(t,k),t.intersect=function(w){return K.polygon(t,C,w)},n}g(Ap,"linedWaveEdgedRect");async function Ep(e,t){const{labelStyles:r,nodeStyles:i}=rt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?12:s,n=t.look==="neo"?10:5;(t.width||t.height)&&(t.width=Math.max(((t==null?void 0:t.width)??0)-a*2-2*n,10),t.height=Math.max(((t==null?void 0:t.height)??0)-o*2-2*n,10));const{shapeSvg:l,bbox:c,label:h}=await dt(e,t,ht(t)),d=(t!=null&&t.width?t==null?void 0:t.width:c.width)+a*2+2*n,p=(t!=null&&t.height?t==null?void 0:t.height:c.height)+o*2+2*n,u=d-2*n,f=p-2*n,m=-u/2,y=-f/2,{cssStyles:C}=t,b=tt.svg(l),k=J(t,{}),w=[{x:m-n,y:y+n},{x:m-n,y:y+f+n},{x:m+u-n,y:y+f+n},{x:m+u-n,y:y+f},{x:m+u,y:y+f},{x:m+u,y:y+f-n},{x:m+u+n,y:y+f-n},{x:m+u+n,y:y-n},{x:m+n,y:y-n},{x:m+n,y},{x:m,y},{x:m,y:y+n}],S=[{x:m,y:y+n},{x:m+u-n,y:y+n},{x:m+u-n,y:y+f},{x:m+u,y:y+f},{x:m+u,y},{x:m,y}];t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const B=Tt(w);let F=b.path(B,k);const v=Tt(S);let z=b.path(v,k);t.look!=="handDrawn"&&(F=Eo(F),z=Eo(z));const q=l.insert("g",":first-child");return q.insert(()=>F),q.insert(()=>z),q.attr("class","basic label-container outer-path"),C&&t.look!=="handDrawn"&&q.selectAll("path").attr("style",C),i&&t.look!=="handDrawn"&&q.selectAll("path").attr("style",i),h.attr("transform",`translate(${-(c.width/2)-n-(c.x-(c.left??0))}, ${-(c.height/2)+n-(c.y-(c.top??0))})`),st(t,q),t.intersect=function(M){return K.polygon(t,w,M)},l}g(Ep,"multiRect");async function Mp(e,t){const{labelStyles:r,nodeStyles:i}=rt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,label:o}=await dt(e,t,ht(t)),n=t.padding??0,l=t.look==="neo"?16:n,c=t.look==="neo"?12:n;let h=!0;(t.width||t.height)&&(h=!1,t.width=((t==null?void 0:t.width)??0)-l*2,t.height=((t==null?void 0:t.height)??0)-c*3);const d=Math.max(a.width,(t==null?void 0:t.width)??0)+l*2,p=Math.max(a.height,(t==null?void 0:t.height)??0)+c*3,u=t.look==="neo"?p/4:p/8,f=p+(h?u/2:-u/2),m=-d/2,y=-f/2,C=10,{cssStyles:b}=t,k=ar(m-C,y+f+C,m+d-C,y+f+C,u,.8),w=k==null?void 0:k[k.length-1],S=[{x:m-C,y:y+C},{x:m-C,y:y+f+C},...k,{x:m+d-C,y:w.y-C},{x:m+d,y:w.y-C},{x:m+d,y:w.y-2*C},{x:m+d+C,y:w.y-2*C},{x:m+d+C,y:y-C},{x:m+C,y:y-C},{x:m+C,y},{x:m,y},{x:m,y:y+C}],B=[{x:m,y:y+C},{x:m+d-C,y:y+C},{x:m+d-C,y:w.y-C},{x:m+d,y:w.y-C},{x:m+d,y},{x:m,y}],F=tt.svg(s),v=J(t,{});t.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const z=Tt(S),q=F.path(z,v),M=Tt(B),U=F.path(M,v),W=s.insert(()=>q,":first-child");return W.insert(()=>U),W.attr("class","basic label-container outer-path"),b&&t.look!=="handDrawn"&&W.selectAll("path").attr("style",b),i&&t.look!=="handDrawn"&&W.selectAll("path").attr("style",i),W.attr("transform",`translate(0,${-u/2})`),o.attr("transform",`translate(${-(a.width/2)-C-(a.x-(a.left??0))}, ${-(a.height/2)+C-u/2-(a.y-(a.top??0))})`),st(t,W),t.intersect=function(O){return K.polygon(t,S,O)},s}g(Mp,"multiWaveEdgedRectangle");async function $p(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:s}=rt(t);t.labelStyle=i,t.useHtmlLabels||se(Mt())||(t.centerLabel=!0);const{shapeSvg:o,bbox:n,label:l}=await dt(e,t,ht(t)),c=Math.max(n.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),h=Math.max(n.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),d=-c/2,p=-h/2,{cssStyles:u}=t,f=tt.svg(o),m=J(t,{fill:r.noteBkgColor,stroke:r.noteBorderColor});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=f.rectangle(d,p,c,h,m),C=o.insert(()=>y,":first-child");return C.attr("class","basic label-container outer-path"),l.attr("class","label noteLabel"),u&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",u),s&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",s),l.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),st(t,C),t.intersect=function(b){return K.rect(t,b)},o}g($p,"note");var Ib=g((e,t,r)=>[`M${e+r/2},${t}`,`L${e+r},${t-r/2}`,`L${e+r/2},${t-r}`,`L${e},${t-r/2}`,"Z"].join(" "),"createDecisionBoxPathD");async function Op(e,t){const{labelStyles:r,nodeStyles:i}=rt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a}=await dt(e,t,ht(t)),o=a.width+(t.padding??0),n=a.height+(t.padding??0),l=o+n,c=.5,h=[{x:l/2,y:0},{x:l,y:-l/2},{x:l/2,y:-l},{x:0,y:-l/2}];let d;const{cssStyles:p}=t;if(t.look==="handDrawn"){const u=tt.svg(s),f=J(t,{}),m=Ib(0,0,l),y=u.path(m,f);d=s.insert(()=>y,":first-child").attr("transform",`translate(${-l/2+c}, ${l/2})`),p&&d.attr("style",p)}else d=Ye(s,l,l,h),d.attr("transform",`translate(${-l/2+c}, ${l/2})`);return i&&d.attr("style",i),st(t,d),t.calcIntersect=function(u,f){const m=u.width,y=[{x:m/2,y:0},{x:m,y:-m/2},{x:m/2,y:-m},{x:0,y:-m/2}],C=K.polygon(u,y,f);return{x:C.x-.5,y:C.y-.5}},t.intersect=function(u){return this.calcIntersect(t,u)},s}g(Op,"question");async function Ip(e,t){const{labelStyles:r,nodeStyles:i}=rt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?21:s??0,o=t.look==="neo"?12:s??0,{shapeSvg:n,bbox:l,label:c}=await dt(e,t,ht(t)),h=((t==null?void 0:t.width)??l.width)+(t.look==="neo"?a*2:a),d=((t==null?void 0:t.height)??l.height)+(t.look==="neo"?o*2:o),p=-h/2,u=-d/2,f=u/2,m=[{x:p+f,y:u},{x:p,y:0},{x:p+f,y:-u},{x:-p,y:-u},{x:-p,y:u}],{cssStyles:y}=t,C=tt.svg(n),b=J(t,{});t.look!=="handDrawn"&&(b.roughness=0,b.fillStyle="solid");const k=Tt(m),w=C.path(k,b),S=n.insert(()=>w,":first-child");return S.attr("class","basic label-container outer-path"),y&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",y),i&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",i),S.attr("transform",`translate(${-f/2},0)`),c.attr("transform",`translate(${-f/2-l.width/2-(l.x-(l.left??0))}, ${-(l.height/2)-(l.y-(l.top??0))})`),st(t,S),t.intersect=function(B){return K.polygon(t,m,B)},n}g(Ip,"rect_left_inv_arrow");async function Dp(e,t){const{labelStyles:r,nodeStyles:i}=rt(t);t.labelStyle=r;let s;t.cssClasses?s="node "+t.cssClasses:s="node default";const a=e.insert("g").attr("class",s).attr("id",t.domId||t.id),o=a.insert("g"),n=a.insert("g").attr("class","label").attr("style",i),l=t.description,c=t.label,h=await Ke(n,c,t.labelStyle,!0,!0);let d={width:0,height:0};if(se(wt())){const v=h.children[0],z=xt(h);d=v.getBoundingClientRect(),z.attr("width",d.width),z.attr("height",d.height)}H.info("Text 2",l);const p=l||[],u=h.getBBox(),f=await Ke(n,Array.isArray(p)?p.join("<br/>"):p,t.labelStyle,!0,!0),m=f.children[0],y=xt(f);d=m.getBoundingClientRect(),y.attr("width",d.width),y.attr("height",d.height);const C=(t.padding||0)/2;xt(f).attr("transform","translate( "+(d.width>u.width?0:(u.width-d.width)/2)+", "+(u.height+C+5)+")"),xt(h).attr("transform","translate( "+(d.width<u.width?0:-(u.width-d.width)/2)+", 0)"),d=n.node().getBBox(),n.attr("transform","translate("+-d.width/2+", "+(-d.height/2-C+3)+")");const b=d.width+(t.padding||0),k=d.height+(t.padding||0),w=-d.width/2-C,S=-d.height/2-C;let B,F;if(t.look==="handDrawn"){const v=tt.svg(a),z=J(t,{}),q=v.path(or(w,S,b,k,t.rx||0),z),M=v.line(-d.width/2-C,-d.height/2-C+u.height+C,d.width/2+C,-d.height/2-C+u.height+C,z);F=a.insert(()=>(H.debug("Rough node insert CXC",q),M),":first-child"),B=a.insert(()=>(H.debug("Rough node insert CXC",q),q),":first-child")}else B=o.insert("rect",":first-child"),F=o.insert("line"),B.attr("class","outer title-state").attr("style",i).attr("x",-d.width/2-C).attr("y",-d.height/2-C).attr("width",d.width+(t.padding||0)).attr("height",d.height+(t.padding||0)),F.attr("class","divider").attr("x1",-d.width/2-C).attr("x2",d.width/2+C).attr("y1",-d.height/2-C+u.height+C).attr("y2",-d.height/2-C+u.height+C);return st(t,B),t.intersect=function(v){return K.rect(t,v)},a}g(Dp,"rectWithTitle");async function Pp(e,t,{config:{themeVariables:r}}){const i=(r==null?void 0:r.radius)??5,s={rx:i,ry:i,labelPaddingX:((t==null?void 0:t.padding)??0)*1,labelPaddingY:((t==null?void 0:t.padding)??0)*1};return di(e,t,s)}g(Pp,"roundedRect");var dr=8;async function Rp(e,t){const{labelStyles:r,nodeStyles:i}=rt(t);t.labelStyle=r;const s=t.look==="neo"?16:t.padding??0,a=t.look==="neo"?12:t.padding??0,{shapeSvg:o,bbox:n,label:l}=await dt(e,t,ht(t)),c=((t==null?void 0:t.width)??n.width)+s*2+(t.look==="neo"?dr:dr*2),h=((t==null?void 0:t.height)??n.height)+a*2,d=c-dr,p=h,u=dr-c/2,f=-h/2,{cssStyles:m}=t,y=tt.svg(o),C=J(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const b=[{x:u,y:f},{x:u+d,y:f},{x:u+d,y:f+p},{x:u-dr,y:f+p},{x:u-dr,y:f},{x:u,y:f},{x:u,y:f+p}],k=y.polygon(b.map(S=>[S.x,S.y]),C),w=o.insert(()=>k,":first-child");return w.attr("class","basic label-container outer-path").attr("style",Ht(m)),i&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",i),m&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",i),l.attr("transform",`translate(${dr/2-n.width/2-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),st(t,w),t.intersect=function(S){return K.rect(t,S)},o}g(Rp,"shadedProcess");async function qp(e,t){const{labelStyles:r,nodeStyles:i}=rt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?12:s;(t.width||t.height)&&(t.width=Math.max(((t==null?void 0:t.width)??0)-a*2,10),t.height=Math.max(((t==null?void 0:t.height)??0)/1.5-o*2,10));const{shapeSvg:n,bbox:l,label:c}=await dt(e,t,ht(t)),h=(t!=null&&t.width?t==null?void 0:t.width:l.width)+a*2,d=((t!=null&&t.height?t==null?void 0:t.height:l.height)+o*2)*1.5,p=h,u=d/1.5,f=-p/2,m=-u/2,{cssStyles:y}=t,C=tt.svg(n),b=J(t,{});t.look!=="handDrawn"&&(b.roughness=0,b.fillStyle="solid");const k=[{x:f,y:m},{x:f,y:m+u},{x:f+p,y:m+u},{x:f+p,y:m-u/2}],w=Tt(k),S=C.path(w,b),B=n.insert(()=>S,":first-child");return B.attr("class","basic label-container outer-path"),y&&t.look!=="handDrawn"&&B.selectChildren("path").attr("style",y),i&&t.look!=="handDrawn"&&B.selectChildren("path").attr("style",i),B.attr("transform",`translate(0, ${u/4})`),c.attr("transform",`translate(${-p/2+(t.padding??0)-(l.x-(l.left??0))}, ${-u/4+(t.padding??0)-(l.y-(l.top??0))})`),st(t,B),t.intersect=function(F){return K.polygon(t,k,F)},n}g(qp,"slopedRect");async function Np(e,t){const r=t.padding??0,i=t.look==="neo"?16:r*2,s=t.look==="neo"?12:r,a={rx:0,ry:0,labelPaddingX:t.labelPaddingX??i,labelPaddingY:s};return di(e,t,a)}g(Np,"squareRect");async function Wp(e,t){const{labelStyles:r,nodeStyles:i}=rt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?20:s,o=t.look==="neo"?12:s,{shapeSvg:n,bbox:l}=await dt(e,t,ht(t)),c=l.height+(t.look==="neo"?o*2:o),h=l.width+c/4+(t.look==="neo"?a*2:a),d=c/2,{cssStyles:p}=t,u=tt.svg(n),f=J(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const m=[{x:-h/2+d,y:-c/2},{x:h/2-d,y:-c/2},...Ni(-h/2+d,0,d,50,90,270),{x:h/2-d,y:c/2},...Ni(h/2-d,0,d,50,270,450)],y=Tt(m),C=u.path(y,f),b=n.insert(()=>C,":first-child");return b.attr("class","basic label-container outer-path"),p&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",p),i&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",i),st(t,b),t.intersect=function(k){return K.polygon(t,m,k)},n}g(Wp,"stadium");async function zp(e,t){const r={rx:t.look==="neo"?3:5,ry:t.look==="neo"?3:5};return di(e,t,r)}g(zp,"state");function Hp(e,t,{config:{themeVariables:r}}){var b,k;const{labelStyles:i,nodeStyles:s}=rt(t);t.labelStyle=i;const{cssStyles:a}=t,{lineColor:o,stateBorder:n,nodeBorder:l,nodeShadow:c}=r;(t.width||t.height)&&((t.width??0)<14&&(t.width=14),(t.height??0)<14&&(t.height=14)),t.width||(t.width=14),t.height||(t.height=14);const h=e.insert("g").attr("class","node default").attr("id",t.domId??t.id),d=tt.svg(h),p=J(t,{});t.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const u=d.circle(0,0,t.width,{...p,stroke:o,strokeWidth:2}),f=n??l,m=(t.width??0)*5/14,y=d.circle(0,0,m,{...p,fill:f,stroke:f,strokeWidth:2,fillStyle:"solid"}),C=h.insert(()=>u,":first-child");if(C.insert(()=>y),t.look!=="handDrawn"&&C.attr("class","outer-path"),a&&C.selectAll("path").attr("style",a),s&&C.selectAll("path").attr("style",s),t.width<25&&c&&t.look!=="handDrawn"){const w=((k=(b=e.node())==null?void 0:b.ownerSVGElement)==null?void 0:k.id)??"",S=w?`${w}-drop-shadow-small`:"drop-shadow-small";C.attr("style",`filter:url(#${S})`)}return st(t,C),t.intersect=function(w){return K.circle(t,(t.width??0)/2,w)},h}g(Hp,"stateEnd");function Yp(e,t,{config:{themeVariables:r}}){var n,l;const{lineColor:i,nodeShadow:s}=r;(t.width||t.height)&&((t.width??0)<14&&(t.width=14),(t.height??0)<14&&(t.height=14)),t.width||(t.width=14),t.height||(t.height=14);const a=e.insert("g").attr("class","node default").attr("id",t.domId||t.id);let o;if(t.look==="handDrawn"){const h=tt.svg(a).circle(0,0,t.width,u0(i));o=a.insert(()=>h),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&&s&&t.look!=="handDrawn"){const c=((l=(n=e.node())==null?void 0:n.ownerSVGElement)==null?void 0:l.id)??"",h=c?`${c}-drop-shadow-small`:"drop-shadow-small";o.attr("style",`filter:url(#${h})`)}return st(t,o),t.intersect=function(c){return K.circle(t,(t.width??7)/2,c)},a}g(Yp,"stateStart");var Ir=8;async function Up(e,t){const{labelStyles:r,nodeStyles:i}=rt(t);t.labelStyle=r;const s=(t==null?void 0:t.padding)??8,a=t.look==="neo"?28:s,o=t.look==="neo"?12:s,{shapeSvg:n,bbox:l}=await dt(e,t,ht(t)),c=((t==null?void 0:t.width)??l.width)+2*Ir+a,h=((t==null?void 0:t.height)??l.height)+o,d=c-2*Ir,p=h,u=-c/2,f=-h/2,m=[{x:0,y:0},{x:d,y:0},{x:d,y:-p},{x:0,y:-p},{x:0,y:0},{x:-8,y:0},{x:d+8,y:0},{x:d+8,y:-p},{x:-8,y:-p},{x:-8,y:0}];if(t.look==="handDrawn"){const y=tt.svg(n),C=J(t,{}),b=y.rectangle(u,f,d+16,p,C),k=y.line(u+Ir,f,u+Ir,f+p,C),w=y.line(u+Ir+d,f,u+Ir+d,f+p,C);n.insert(()=>k,":first-child"),n.insert(()=>w,":first-child");const S=n.insert(()=>b,":first-child"),{cssStyles:B}=t;S.attr("class","basic label-container").attr("style",Ht(B)),st(t,S)}else{const y=Ye(n,d,p,m);i&&y.attr("style",i),st(t,y)}return t.intersect=function(y){return K.polygon(t,m,y)},n}g(Up,"subroutine");var Ya=.2;async function jp(e,t){const{labelStyles:r,nodeStyles:i}=rt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?12:s;(t.width||t.height)&&(t.height=Math.max(((t==null?void 0:t.height)??0)-o*2,10),t.width=Math.max(((t==null?void 0:t.width)??0)-a*2-Ya*(t.height+o*2),10));const{shapeSvg:n,bbox:l}=await dt(e,t,ht(t)),c=(t!=null&&t.height?t==null?void 0:t.height:l.height)+o*2,h=Ya*c,d=Ya*c,u=(t!=null&&t.width?t==null?void 0:t.width:l.width)+a*2+h-h,f=c,m=-u/2,y=-f/2,{cssStyles:C}=t,b=tt.svg(n),k=J(t,{}),w=[{x:m-h/2,y},{x:m+u+h/2,y},{x:m+u+h/2,y:y+f},{x:m-h/2,y:y+f}],S=[{x:m+u-h/2,y:y+f},{x:m+u+h/2,y:y+f},{x:m+u+h/2,y:y+f-d}];t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const B=Tt(w),F=b.path(B,k),v=Tt(S),z=b.path(v,{...k,fillStyle:"solid"}),q=n.insert(()=>z,":first-child");return q.insert(()=>F,":first-child"),q.attr("class","basic label-container outer-path"),C&&t.look!=="handDrawn"&&q.selectAll("path").attr("style",C),i&&t.look!=="handDrawn"&&q.selectAll("path").attr("style",i),st(t,q),t.intersect=function(M){return K.polygon(t,w,M)},n}g(jp,"taggedRect");async function Gp(e,t){const{labelStyles:r,nodeStyles:i}=rt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,label:o}=await dt(e,t,ht(t)),n=Math.max(a.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),l=Math.max(a.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),c=l/8,h=.2*n,d=.2*l,p=l+c,{cssStyles:u}=t,f=tt.svg(s),m=J(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=[{x:-n/2-n/2*.1,y:p/2},...ar(-n/2-n/2*.1,p/2,n/2+n/2*.1,p/2,c,.8),{x:n/2+n/2*.1,y:-p/2},{x:-n/2-n/2*.1,y:-p/2}],C=-n/2+n/2*.1,b=-p/2-d*.4,k=[{x:C+n-h,y:(b+l)*1.3},{x:C+n,y:b+l-d},{x:C+n,y:(b+l)*.9},...ar(C+n,(b+l)*1.25,C+n-h,(b+l)*1.3,-l*.02,.5)],w=Tt(y),S=f.path(w,m),B=Tt(k),F=f.path(B,{...m,fillStyle:"solid"}),v=s.insert(()=>F,":first-child");return v.insert(()=>S,":first-child"),v.attr("class","basic label-container outer-path"),u&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",u),i&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",i),v.attr("transform",`translate(0,${-c/2})`),o.attr("transform",`translate(${-n/2+(t.padding??0)-(a.x-(a.left??0))},${-l/2+(t.padding??0)-c/2-(a.y-(a.top??0))})`),st(t,v),t.intersect=function(z){return K.polygon(t,y,z)},s}g(Gp,"taggedWaveEdgedRectangle");async function Xp(e,t){const{labelStyles:r,nodeStyles:i}=rt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a}=await dt(e,t,ht(t)),o=Math.max(a.width+(t.padding??0),(t==null?void 0:t.width)||0),n=Math.max(a.height+(t.padding??0),(t==null?void 0:t.height)||0),l=-o/2,c=-n/2,h=s.insert("rect",":first-child");return h.attr("class","text").attr("style",i).attr("rx",0).attr("ry",0).attr("x",l).attr("y",c).attr("width",o).attr("height",n),st(t,h),t.intersect=function(d){return K.rect(t,d)},s}g(Xp,"text");var Db=g((e,t,r,i,s,a)=>`M${e},${t}
235
+ a${s},${a} 0,0,1 0,${-i}
236
+ l${r},0
237
+ a${s},${a} 0,0,1 0,${i}
238
+ M${r},${-i}
239
+ a${s},${a} 0,0,0 0,${i}
240
+ l${-r},0`,"createCylinderPathD"),Pb=g((e,t,r,i,s,a)=>[`M${e},${t}`,`M${e+r},${t}`,`a${s},${a} 0,0,0 0,${-i}`,`l${-r},0`,`a${s},${a} 0,0,0 0,${i}`,`l${r},0`].join(" "),"createOuterCylinderPathD"),Rb=g((e,t,r,i,s,a)=>[`M${e+r/2},${-i/2}`,`a${s},${a} 0,0,0 0,${i}`].join(" "),"createInnerCylinderPathD"),oh=5,nh=10;async function Vp(e,t){const{labelStyles:r,nodeStyles:i}=rt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?12:s/2;if(t.width||t.height){const m=t.height??0;t.height=(t.height??0)-a,t.height<oh&&(t.height=oh);const C=m/2/(2.5+m/50);t.width=(t.width??0)-a-C*3,t.width<nh&&(t.width=nh)}const{shapeSvg:o,bbox:n,label:l}=await dt(e,t,ht(t)),c=(t.height?t.height:n.height)+a,h=c/2,d=h/(2.5+c/50),p=(t.width?t.width:n.width)+d+a,{cssStyles:u}=t;let f;if(t.look==="handDrawn"){const m=tt.svg(o),y=Pb(0,0,p,c,d,h),C=Rb(0,0,p,c,d,h),b=m.path(y,J(t,{})),k=m.path(C,J(t,{fill:"none"}));f=o.insert(()=>k,":first-child"),f=o.insert(()=>b,":first-child"),f.attr("class","basic label-container"),u&&f.attr("style",u)}else{const m=Db(0,0,p,c,d,h);f=o.insert("path",":first-child").attr("d",m).attr("class","basic label-container").attr("style",Ht(u)).attr("style",i),f.attr("class","basic label-container outer-path"),u&&f.selectAll("path").attr("style",u),i&&f.selectAll("path").attr("style",i)}return f.attr("label-offset-x",d),f.attr("transform",`translate(${-p/2}, ${c/2} )`),l.attr("transform",`translate(${-(n.width/2)-d-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),st(t,f),t.intersect=function(m){const y=K.rect(t,m),C=y.y-(t.y??0);if(h!=0&&(Math.abs(C)<(t.height??0)/2||Math.abs(C)==(t.height??0)/2&&Math.abs(y.x-(t.x??0))>(t.width??0)/2-d)){let b=d*d*(1-C*C/(h*h));b!=0&&(b=Math.sqrt(Math.abs(b))),b=d-b,m.x-(t.x??0)>0&&(b=-b),y.x+=b}return y},o}g(Vp,"tiltedCylinder");async function Zp(e,t){const{labelStyles:r,nodeStyles:i}=rt(t);t.labelStyle=r;const s=t.padding??0,a=(t.look==="neo",s),o=t.look==="neo"?s*2:s,{shapeSvg:n,bbox:l}=await dt(e,t,ht(t)),c=((t==null?void 0:t.height)??l.height)+a,h=((t==null?void 0:t.width)??l.width)+o,d=[{x:-3*c/6,y:0},{x:h+3*c/6,y:0},{x:h,y:-c},{x:0,y:-c}];let p;const{cssStyles:u}=t;if(t.look==="handDrawn"){const f=tt.svg(n),m=J(t,{}),y=Tt(d),C=f.path(y,m);p=n.insert(()=>C,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),u&&p.attr("style",u)}else p=Ye(n,h,c,d);return i&&p.attr("style",i),t.width=h,t.height=c,st(t,p),t.intersect=function(f){return K.polygon(t,d,f)},n}g(Zp,"trapezoid");async function Qp(e,t){const{labelStyles:r,nodeStyles:i}=rt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?12:s,n=15,l=5;(t.width||t.height)&&(t.height=(t.height??0)-o*2,t.height<l&&(t.height=l),t.width=(t.width??0)-a*2,t.width<n&&(t.width=n));const{shapeSvg:c,bbox:h}=await dt(e,t,ht(t)),d=(t!=null&&t.width?t==null?void 0:t.width:h.width)+a*2,p=(t!=null&&t.height?t==null?void 0:t.height:h.height)+o*2,{cssStyles:u}=t,f=tt.svg(c),m=J(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=[{x:-d/2*.8,y:-p/2},{x:d/2*.8,y:-p/2},{x:d/2,y:-p/2*.6},{x:d/2,y:p/2},{x:-d/2,y:p/2},{x:-d/2,y:-p/2*.6}],C=Tt(y),b=f.path(C,m),k=c.insert(()=>b,":first-child");return k.attr("class","basic label-container outer-path"),u&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",u),i&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",i),st(t,k),t.intersect=function(w){return K.polygon(t,y,w)},c}g(Qp,"trapezoidalPentagon");var lh=10,hh=10;async function Kp(e,t){var w;const{labelStyles:r,nodeStyles:i}=rt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?s*2:s;(t.width||t.height)&&(t.width=(((t==null?void 0:t.width)??0)-a)/2,t.width<hh&&(t.width=hh),t.height=(t==null?void 0:t.height)??0,t.height<lh&&(t.height=lh));const{shapeSvg:o,bbox:n,label:l}=await dt(e,t,ht(t)),c=De((w=wt().flowchart)==null?void 0:w.htmlLabels),h=(t!=null&&t.width?t==null?void 0:t.width:n.width)+a,d=t!=null&&t.height?t==null?void 0:t.height:h+n.height,p=d,u=[{x:0,y:0},{x:p,y:0},{x:p/2,y:-d}],{cssStyles:f}=t,m=tt.svg(o),y=J(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const C=Tt(u),b=m.path(C,y),k=o.insert(()=>b,":first-child").attr("transform",`translate(${-d/2}, ${d/2})`).attr("class","outer-path");return f&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",f),i&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",i),t.width=h,t.height=d,st(t,k),l.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${d/2-(n.height+(t.padding??0)/(c?2:1)-(n.y-(n.top??0)))})`),t.intersect=function(S){return H.info("Triangle intersect",t,u,S),K.polygon(t,u,S)},o}g(Kp,"triangle");async function Jp(e,t){const{labelStyles:r,nodeStyles:i}=rt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?12:s;let n=!0;(t.width||t.height)&&(n=!1,t.width=((t==null?void 0:t.width)??0)-a*2,t.width<10&&(t.width=10),t.height=((t==null?void 0:t.height)??0)-o*2,t.height<10&&(t.height=10));const{shapeSvg:l,bbox:c,label:h}=await dt(e,t,ht(t)),d=(t!=null&&t.width?t==null?void 0:t.width:c.width)+(a??0)*2,p=(t!=null&&t.height?t==null?void 0:t.height:c.height)+(o??0)*2,u=t.look==="neo"?p/4:p/8,f=p+(n?u:-u),{cssStyles:m}=t,C=14-d,b=C>0?C/2:0,k=tt.svg(l),w=J(t,{});t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const S=[{x:-d/2-b,y:f/2},...ar(-d/2-b,f/2,d/2+b,f/2,u,.8),{x:d/2+b,y:-f/2},{x:-d/2-b,y:-f/2}],B=Tt(S),F=k.path(B,w),v=l.insert(()=>F,":first-child");return v.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",m),i&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",i),v.attr("transform",`translate(0,${-u/2})`),h.attr("transform",`translate(${-d/2+(t.padding??0)-(c.x-(c.left??0))},${-p/2+(t.padding??0)-u-(c.y-(c.top??0))})`),st(t,v),t.intersect=function(z){return K.polygon(t,S,z)},l}g(Jp,"waveEdgedRectangle");async function tg(e,t){const{labelStyles:r,nodeStyles:i}=rt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?20:s;if(t.width||t.height){t.width=(t==null?void 0:t.width)??0,t.width<20&&(t.width=20),t.height=(t==null?void 0:t.height)??0,t.height<10&&(t.height=10);const w=Math.min(t.height*.2,t.height/4);t.height=Math.ceil(t.height-o-w*(20/9)),t.width=t.width-a*2}const{shapeSvg:n,bbox:l}=await dt(e,t,ht(t)),c=(t!=null&&t.width?t==null?void 0:t.width:l.width)+a*2,h=(t!=null&&t.height?t==null?void 0:t.height:l.height)+o,d=h/8,p=h+d*2,{cssStyles:u}=t,f=tt.svg(n),m=J(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=[{x:-c/2,y:p/2},...ar(-c/2,p/2,c/2,p/2,d,1),{x:c/2,y:-p/2},...ar(c/2,-p/2,-c/2,-p/2,d,-1)],C=Tt(y),b=f.path(C,m),k=n.insert(()=>b,":first-child");return k.attr("class","basic label-container"),u&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",u),i&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",i),st(t,k),t.intersect=function(w){return K.polygon(t,y,w)},n}g(tg,"waveRectangle");var Ot=10;async function eg(e,t){const{labelStyles:r,nodeStyles:i}=rt(t);t.labelStyle=r;const s=t.look==="neo"?16:t.padding??0,a=t.look==="neo"?12:t.padding??0;(t.width||t.height)&&(t.width=Math.max(((t==null?void 0:t.width)??0)-s*2-Ot,10),t.height=Math.max(((t==null?void 0:t.height)??0)-a*2-Ot,10));const{shapeSvg:o,bbox:n,label:l}=await dt(e,t,ht(t)),c=(t!=null&&t.width?t==null?void 0:t.width:n.width)+s*2+Ot,h=(t!=null&&t.height?t==null?void 0:t.height:n.height)+a*2+Ot,d=c-Ot,p=h-Ot,u=-d/2,f=-p/2,{cssStyles:m}=t,y=tt.svg(o),C=J(t,{}),b=[{x:u-Ot,y:f-Ot},{x:u-Ot,y:f+p},{x:u+d,y:f+p},{x:u+d,y:f-Ot}],k=`M${u-Ot},${f-Ot} L${u+d},${f-Ot} L${u+d},${f+p} L${u-Ot},${f+p} L${u-Ot},${f-Ot}
241
+ M${u-Ot},${f} L${u+d},${f}
242
+ M${u},${f-Ot} L${u},${f+p}`;t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const w=y.path(k,C),S=o.insert(()=>w,":first-child");return S.attr("transform",`translate(${Ot/2}, ${Ot/2})`),S.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",m),i&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",i),l.attr("transform",`translate(${-(n.width/2)+Ot/2-(n.x-(n.left??0))}, ${-(n.height/2)+Ot/2-(n.y-(n.top??0))})`),st(t,S),t.intersect=function(B){return K.polygon(t,b,B)},o}g(eg,"windowPane");var ch=new Set(["redux-color","redux-dark-color"]),qb=new Set(["redux","redux-dark","redux-color","redux-dark-color"]);async function Mn(e,t){var kt,bt,_t,Lt;const r=t;r.alias&&(t.label=r.alias);const{theme:i,themeVariables:s}=Mt(),{rowEven:a,rowOdd:o,nodeBorder:n,borderColorArray:l}=s;if(t.look==="handDrawn"){const{themeVariables:Z}=Mt(),{background:V}=Z,yt={...t,id:t.id+"-background",domId:(t.domId||t.id)+"-background",look:"default",cssStyles:["stroke: none",`fill: ${V}`]};await Mn(e,yt)}const c=Mt();t.useHtmlLabels=c.htmlLabels;let h=((kt=c.er)==null?void 0:kt.diagramPadding)??10,d=((bt=c.er)==null?void 0:bt.entityPadding)??6;const{cssStyles:p}=t,{labelStyles:u,nodeStyles:f}=rt(t);if(r.attributes.length===0&&t.label){const Z={rx:0,ry:0,labelPaddingX:h,labelPaddingY:h*1.5};He(t.label,c)+Z.labelPaddingX*2<c.er.minEntityWidth&&(t.width=c.er.minEntityWidth);const V=await di(e,t,Z);if(i!=null&&ch.has(i)){const yt=r.colorIndex??0;V.attr("data-color-id",`color-${yt%l.length}`)}if(!De(c.htmlLabels)){const yt=V.select("text"),nt=(_t=yt.node())==null?void 0:_t.getBBox();yt.attr("transform",`translate(${-nt.width/2}, 0)`)}return V}c.htmlLabels||(h*=1.25,d*=1.25);let m=ht(t);m||(m="node default");const y=e.insert("g").attr("class",m).attr("id",t.domId||t.id),C=await Rr(y,t.label??"",c,0,0,["name"],u);C.height+=d;let b=0;const k=[],w=[];let S=0,B=0,F=0,v=0,z=!0,q=!0;for(const Z of r.attributes){const V=await Rr(y,Z.type,c,0,b,["attribute-type"],u);S=Math.max(S,V.width+h);const yt=await Rr(y,Z.name,c,0,b,["attribute-name"],u);B=Math.max(B,yt.width+h);const nt=await Rr(y,Z.keys.join(),c,0,b,["attribute-keys"],u);F=Math.max(F,nt.width+h);const D=await Rr(y,Z.comment,c,0,b,["attribute-comment"],u);v=Math.max(v,D.width+h);const Q=Math.max(V.height,yt.height,nt.height,D.height)+d;w.push({yOffset:b,rowHeight:Q}),b+=Q}let M=4;F<=h&&(z=!1,F=0,M--),v<=h&&(q=!1,v=0,M--);const U=y.node().getBBox();if(C.width+h*2-(S+B+F+v)>0){const Z=C.width+h*2-(S+B+F+v);S+=Z/M,B+=Z/M,F>0&&(F+=Z/M),v>0&&(v+=Z/M)}const W=S+B+F+v,O=tt.svg(y),A=J(t,{});t.look!=="handDrawn"&&(A.roughness=0,A.fillStyle="solid");let _=0;w.length>0&&(_=w.reduce((Z,V)=>Z+((V==null?void 0:V.rowHeight)??0),0));const $=Math.max(U.width+h*2,(t==null?void 0:t.width)||0,W),E=Math.max((_??0)+C.height,(t==null?void 0:t.height)||0),N=-$/2,Y=-E/2;if(y.selectAll("g:not(:first-child)").each((Z,V,yt)=>{const nt=xt(yt[V]),D=nt.attr("transform");let Q=0,Ue=0;if(D){const ue=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(D);ue&&(Q=parseFloat(ue[1]),Ue=parseFloat(ue[2]),nt.attr("class").includes("attribute-name")?Q+=S:nt.attr("class").includes("attribute-keys")?Q+=S+B:nt.attr("class").includes("attribute-comment")&&(Q+=S+B+F))}nt.attr("transform",`translate(${N+h/2+Q}, ${Ue+Y+C.height+d/2})`)}),y.select(".name").attr("transform","translate("+-C.width/2+", "+(Y+d/2)+")"),i!=null&&ch.has(i)){const Z=r.colorIndex??0;y.attr("data-color-id",`color-${Z%l.length}`)}const G=O.rectangle(N,Y,$,E,A),et=y.insert(()=>G,":first-child").attr("class","outer-path").attr("style",p.join(""));k.push(0);for(const[Z,V]of w.entries()){const nt=(Z+1)%2===0&&V.yOffset!==0,D=O.rectangle(N,C.height+Y+(V==null?void 0:V.yOffset),$,V==null?void 0:V.rowHeight,{...A,fill:nt?a:o,stroke:n});y.insert(()=>D,"g.label").attr("style",p.join("")).attr("class",`row-rect-${nt?"even":"odd"}`)}const lt=1e-4;let ot=qr(N,C.height+Y,$+N,C.height+Y,lt),ct=O.polygon(ot.map(Z=>[Z.x,Z.y]),A);if(y.insert(()=>ct).attr("class","divider"),ot=qr(S+N,C.height+Y,S+N,E+Y,lt),ct=O.polygon(ot.map(Z=>[Z.x,Z.y]),A),y.insert(()=>ct).attr("class","divider"),z){const Z=S+B+N;ot=qr(Z,C.height+Y,Z,E+Y,lt),ct=O.polygon(ot.map(V=>[V.x,V.y]),A),y.insert(()=>ct).attr("class","divider")}if(q){const Z=S+B+F+N;ot=qr(Z,C.height+Y,Z,E+Y,lt),ct=O.polygon(ot.map(V=>[V.x,V.y]),A),y.insert(()=>ct).attr("class","divider")}for(const Z of k){const V=C.height+Y+Z;ot=qr(N,V,$+N,V,lt),ct=O.polygon(ot.map(yt=>[yt.x,yt.y]),A),y.insert(()=>ct).attr("class","divider")}if(st(t,et),f&&t.look!=="handDrawn")if(i!=null&&qb.has(i))y.selectAll("path").attr("style",f);else{const Z=f.split(";"),V=(Lt=Z==null?void 0:Z.filter(yt=>yt.includes("stroke")))==null?void 0:Lt.map(yt=>`${yt}`).join("; ");y.selectAll("path").attr("style",V??""),y.selectAll(".row-rect-even path").attr("style",f)}return t.intersect=function(Z){return K.rect(t,Z)},y}g(Mn,"erBox");async function Rr(e,t,r,i=0,s=0,a=[],o=""){const n=e.insert("g").attr("class",`label ${a.join(" ")}`).attr("transform",`translate(${i}, ${s})`).attr("style",o);t!==kl(t)&&(t=kl(t),t=t.replaceAll("<","&lt;").replaceAll(">","&gt;"));const l=n.node().appendChild(await Pe(n,t,{width:He(t,r)+100,style:o,useHtmlLabels:r.htmlLabels},r));if(t.includes("&lt;")||t.includes("&gt;")){let h=l.children[0];for(h.textContent=h.textContent.replaceAll("&lt;","<").replaceAll("&gt;",">");h.childNodes[0];)h=h.childNodes[0],h.textContent=h.textContent.replaceAll("&lt;","<").replaceAll("&gt;",">")}let c=l.getBBox();if(De(r.htmlLabels)){const h=l.children[0];h.style.textAlign="start";const d=xt(l);c=h.getBoundingClientRect(),d.attr("width",c.width),d.attr("height",c.height)}return c}g(Rr,"addText");function qr(e,t,r,i,s){return e===r?[{x:e-s/2,y:t},{x:e+s/2,y:t},{x:r+s/2,y:i},{x:r-s/2,y:i}]:[{x:e,y:t-s/2},{x:e,y:t+s/2},{x:r,y:i+s/2},{x:r,y:i-s/2}]}g(qr,"lineToPolygon");async function rg(e,t,r,i,s=r.class.padding??12){const a=i?0:3,o=e.insert("g").attr("class",ht(t)).attr("id",t.domId||t.id);let n=null,l=null,c=null,h=null,d=0,p=0,u=0;if(n=o.insert("g").attr("class","annotation-group text"),t.annotations.length>0){const b=t.annotations[0];await _i(n,{text:`«${b}»`},0),d=n.node().getBBox().height}l=o.insert("g").attr("class","label-group text"),await _i(l,t,0,["font-weight: bolder"]);const f=l.node().getBBox();p=f.height,c=o.insert("g").attr("class","members-group text");let m=0;for(const b of t.members){const k=await _i(c,b,m,[b.parseClassifier()]);m+=k+a}u=c.node().getBBox().height,u<=0&&(u=s/2),h=o.insert("g").attr("class","methods-group text");let y=0;for(const b of t.methods){const k=await _i(h,b,y,[b.parseClassifier()]);y+=k+a}let C=o.node().getBBox();if(n!==null){const b=n.node().getBBox();n.attr("transform",`translate(${-b.width/2})`)}return l.attr("transform",`translate(${-f.width/2}, ${d})`),C=o.node().getBBox(),c.attr("transform",`translate(0, ${d+p+s*2})`),C=o.node().getBBox(),h.attr("transform",`translate(0, ${d+p+(u?u+s*4:s*2)})`),C=o.node().getBBox(),{shapeSvg:o,bbox:C}}g(rg,"textHelper");async function _i(e,t,r,i=[]){const s=e.insert("g").attr("class","label").attr("style",i.join("; ")),a=Mt();let o="useHtmlLabels"in t?t.useHtmlLabels:De(a.htmlLabels)??!0,n="";"text"in t?n=t.text:n=t.label,!o&&n.startsWith("\\")&&(n=n.substring(1)),Ii(n)&&(o=!0);const l=await Pe(s,Go(kr(n)),{width:He(n,a)+50,classes:"markdown-node-label",useHtmlLabels:o},a);let c,h=1;if(o){const d=l.children[0],p=xt(l);h=d.innerHTML.split("<br>").length,d.innerHTML.includes("</math>")&&(h+=d.innerHTML.split("<mrow>").length-1);const u=d.getElementsByTagName("img");if(u){const f=n.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...u].map(m=>new Promise(y=>{function C(){var b;if(m.style.display="flex",m.style.flexDirection="column",f){const k=((b=a.fontSize)==null?void 0:b.toString())??window.getComputedStyle(document.body).fontSize,S=parseInt(k,10)*5+"px";m.style.minWidth=S,m.style.maxWidth=S}else m.style.width="100%";y(m)}g(C,"setupImage"),setTimeout(()=>{m.complete&&C()}),m.addEventListener("error",C),m.addEventListener("load",C)})))}c=d.getBoundingClientRect(),p.attr("width",c.width),p.attr("height",c.height)}else{i.includes("font-weight: bolder")&&xt(l).selectAll("tspan").attr("font-weight",""),h=l.children.length;const d=l.children[0];(l.textContent===""||l.textContent.includes("&gt"))&&(d.textContent=n[0]+n.substring(1).replaceAll("&gt;",">").replaceAll("&lt;","<").trim(),n[1]===" "&&(d.textContent=d.textContent[0]+" "+d.textContent.substring(1))),d.textContent==="undefined"&&(d.textContent=""),c=l.getBBox()}return s.attr("transform","translate(0,"+(-c.height/(2*h)+r)+")"),c.height}g(_i,"addText");async function ig(e,t){var O,A;const r=wt(),{themeVariables:i}=r,{useGradient:s}=i,a=r.class.padding??12,o=a,n=t.useHtmlLabels??De(r.htmlLabels)??!0,l=t;l.annotations=l.annotations??[],l.members=l.members??[],l.methods=l.methods??[];const{shapeSvg:c,bbox:h}=await rg(e,t,r,n,o),{labelStyles:d,nodeStyles:p}=rt(t);t.labelStyle=d,t.cssStyles=l.styles||"";const u=((O=l.styles)==null?void 0:O.join(";"))||p||"";t.cssStyles||(t.cssStyles=u.replaceAll("!important","").split(";"));const f=l.members.length===0&&l.methods.length===0&&!((A=r.class)!=null&&A.hideEmptyMembersBox),m=tt.svg(c),y=J(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const C=Math.max(t.width??0,h.width);let b=Math.max(t.height??0,h.height);const k=(t.height??0)>h.height;l.members.length===0&&l.methods.length===0?b+=o:l.members.length>0&&l.methods.length===0&&(b+=o*2);const w=-C/2,S=-b/2;let B=f?a*2:l.members.length===0&&l.methods.length===0?-a:0;k&&(B=a*2);const F=m.rectangle(w-a,S-a-(f?a:l.members.length===0&&l.methods.length===0?-a/2:0),C+2*a,b+2*a+B,y),v=c.insert(()=>F,":first-child");v.attr("class","basic label-container outer-path");const z=v.node().getBBox(),q=c.select(".annotation-group").node().getBBox().height-(f?a/2:0)||0,M=c.select(".label-group").node().getBBox().height-(f?a/2:0)||0,U=c.select(".members-group").node().getBBox().height-(f?a/2:0)||0,W=(q+M+S+a-(S-a-(f?a:l.members.length===0&&l.methods.length===0?-a/2:0)))/2;if(c.selectAll(".text").each((_,$,E)=>{var ot,ct;const N=xt(E[$]),Y=N.attr("transform");let G=0;if(Y){const bt=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(Y);bt&&(G=parseFloat(bt[2]))}let et=G+S+a-(f?a:l.members.length===0&&l.methods.length===0?-a/2:0);if(N.attr("class").includes("methods-group")){const kt=Math.max(U,o/2);k?et=Math.max(W,q+M+kt+S+o*2+a)+o*2:et=q+M+kt+S+o*4+a}l.members.length===0&&l.methods.length===0&&((ot=r.class)!=null&&ot.hideEmptyMembersBox)&&(l.annotations.length>0?et=G-o:et=G),n||(et-=4);let lt=w;(N.attr("class").includes("label-group")||N.attr("class").includes("annotation-group"))&&(lt=-((ct=N.node())==null?void 0:ct.getBBox().width)/2||0,c.selectAll("text").each(function(kt,bt,_t){window.getComputedStyle(_t[bt]).textAnchor==="middle"&&(lt=0)})),N.attr("transform",`translate(${lt}, ${et})`)}),l.members.length>0||l.methods.length>0||f){const _=q+M+S+a,$=m.line(z.x,_,z.x+z.width,_+.001,y);c.insert(()=>$).attr("class",`divider${t.look==="neo"&&!s?" neo-line":""}`).attr("style",u)}if(f||l.members.length>0||l.methods.length>0){const _=q+M+U+S+o*2+a,$=m.line(z.x,k?Math.max(W,_):_,z.x+z.width,(k?Math.max(W,_):_)+.001,y);c.insert(()=>$).attr("class",`divider${t.look==="neo"&&!s?" neo-line":""}`).attr("style",u)}if(l.look!=="handDrawn"&&c.selectAll("path").attr("style",u),v.select(":nth-child(2)").attr("style",u),c.selectAll(".divider").select("path").attr("style",u),t.labelStyle?c.selectAll("span").attr("style",t.labelStyle):c.selectAll("span").attr("style",u),!n){const _=RegExp(/color\s*:\s*([^;]*)/),$=_.exec(u);if($){const E=$[0].replace("color","fill");c.selectAll("tspan").attr("style",E)}else if(d){const E=_.exec(d);if(E){const N=E[0].replace("color","fill");c.selectAll("tspan").attr("style",N)}}}return st(t,v),t.intersect=function(_){return K.rect(t,_)},c}g(ig,"classBox");async function sg(e,t){var z,q;const{labelStyles:r,nodeStyles:i}=rt(t);t.labelStyle=r;const s=t,a=t,o=20,n=20,l="verifyMethod"in t,c=ht(t),{themeVariables:h}=wt(),{borderColorArray:d,requirementEdgeLabelBackground:p}=h,u=e.insert("g").attr("class",c).attr("id",t.domId??t.id);let f;l?f=await Ae(u,`&lt;&lt;${s.type}&gt;&gt;`,0,t.labelStyle):f=await Ae(u,"&lt;&lt;Element&gt;&gt;",0,t.labelStyle);let m=f;const y=await Ae(u,s.name,m,t.labelStyle+"; font-weight: bold;");if(m+=y+n,l){const M=await Ae(u,`${s.requirementId?`ID: ${s.requirementId}`:""}`,m,t.labelStyle);m+=M;const U=await Ae(u,`${s.text?`Text: ${s.text}`:""}`,m,t.labelStyle);m+=U;const W=await Ae(u,`${s.risk?`Risk: ${s.risk}`:""}`,m,t.labelStyle);m+=W,await Ae(u,`${s.verifyMethod?`Verification: ${s.verifyMethod}`:""}`,m,t.labelStyle)}else{const M=await Ae(u,`${a.type?`Type: ${a.type}`:""}`,m,t.labelStyle);m+=M,await Ae(u,`${a.docRef?`Doc Ref: ${a.docRef}`:""}`,m,t.labelStyle)}const C=(((z=u.node())==null?void 0:z.getBBox().width)??200)+o,b=(((q=u.node())==null?void 0:q.getBBox().height)??200)+o,k=-C/2,w=-b/2,S=tt.svg(u),B=J(t,{});t.look!=="handDrawn"&&(B.roughness=0,B.fillStyle="solid");const F=S.rectangle(k,w,C,b,B),v=u.insert(()=>F,":first-child");if(v.attr("class","basic label-container outer-path").attr("style",i),d!=null&&d.length){const M=t.colorIndex??0;u.attr("data-color-id",`color-${M%d.length}`)}if(u.selectAll(".label").each((M,U,W)=>{const O=xt(W[U]),A=O.attr("transform");let _=0,$=0;if(A){const G=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(A);G&&(_=parseFloat(G[1]),$=parseFloat(G[2]))}const E=$-b/2;let N=k+o/2;(U===0||U===1)&&(N=_),O.attr("transform",`translate(${N}, ${E+o})`)}),m>f+y+n){const M=w+f+y+n;let U;if(t.look==="neo"){const A=[[k,M],[k+C,M],[k+C,M+.001],[k,M+.001]];U=S.polygon(A,B)}else U=S.line(k,M,k+C,M,B);u.insert(()=>U).attr("class","divider")}return st(t,v),t.intersect=function(M){return K.rect(t,M)},i&&t.look!=="handDrawn"&&(p||d!=null&&d.length)&&u.selectAll("path").attr("style",i),u}g(sg,"requirementBox");async function Ae(e,t,r,i=""){if(t==="")return 0;const s=e.insert("g").attr("class","label").attr("style",i),a=wt(),o=a.htmlLabels??!0,n=await Pe(s,Go(kr(t)),{width:He(t,a)+50,classes:"markdown-node-label",useHtmlLabels:o,style:i},a);let l;if(o){const c=n.children[0],h=xt(n);l=c.getBoundingClientRect(),h.attr("width",l.width),h.attr("height",l.height)}else{const c=n.children[0];for(const h of c.children)i&&h.setAttribute("style",i);l=n.getBBox(),l.height+=6}return s.attr("transform",`translate(${-l.width/2},${-l.height/2+r})`),l.height}g(Ae,"addText");var Nb=g(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 ag(e,t,{config:r}){var U,W;const{labelStyles:i,nodeStyles:s}=rt(t);t.labelStyle=i||"";const a=10,o=t.width;t.width=(t.width??200)-10;const{shapeSvg:n,bbox:l,label:c}=await dt(e,t,ht(t)),h=t.padding||10;let d="",p;"ticket"in t&&t.ticket&&((U=r==null?void 0:r.kanban)!=null&&U.ticketBaseUrl)&&(d=(W=r==null?void 0:r.kanban)==null?void 0:W.ticketBaseUrl.replace("#TICKET#",t.ticket),p=n.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",d).attr("target","_blank"));const u={useHtmlLabels:t.useHtmlLabels,labelStyle:t.labelStyle||"",width:t.width,img:t.img,padding:t.padding||8,centerLabel:!1};let f,m;p?{label:f,bbox:m}=await Ha(p,"ticket"in t&&t.ticket||"",u):{label:f,bbox:m}=await Ha(n,"ticket"in t&&t.ticket||"",u);const{label:y,bbox:C}=await Ha(n,"assigned"in t&&t.assigned||"",u);t.width=o;const b=10,k=(t==null?void 0:t.width)||0,w=Math.max(m.height,C.height)/2,S=Math.max(l.height+b*2,(t==null?void 0:t.height)||0)+w,B=-k/2,F=-S/2;c.attr("transform","translate("+(h-k/2)+", "+(-w-l.height/2)+")"),f.attr("transform","translate("+(h-k/2)+", "+(-w+l.height/2)+")"),y.attr("transform","translate("+(h+k/2-C.width-2*a)+", "+(-w+l.height/2)+")");let v;const{rx:z,ry:q}=t,{cssStyles:M}=t;if(t.look==="handDrawn"){const O=tt.svg(n),A=J(t,{}),_=z||q?O.path(or(B,F,k,S,z||0),A):O.rectangle(B,F,k,S,A);v=n.insert(()=>_,":first-child"),v.attr("class","basic label-container").attr("style",M||null)}else{v=n.insert("rect",":first-child"),v.attr("class","basic label-container __APA__").attr("style",s).attr("rx",z??5).attr("ry",q??5).attr("x",B).attr("y",F).attr("width",k).attr("height",S);const O="priority"in t&&t.priority;if(O){const A=n.append("line"),_=B+2,$=F+Math.floor((z??0)/2),E=F+S-Math.floor((z??0)/2);A.attr("x1",_).attr("y1",$).attr("x2",_).attr("y2",E).attr("stroke-width","4").attr("stroke",Nb(O))}}return st(t,v),t.height=S,t.intersect=function(O){return K.rect(t,O)},n}g(ag,"kanbanItem");async function og(e,t){const{labelStyles:r,nodeStyles:i}=rt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,halfPadding:o,label:n}=await dt(e,t,ht(t)),l=a.width+10*o,c=a.height+8*o,h=.15*l,{cssStyles:d}=t,p=a.width+20,u=a.height+20,f=Math.max(l,p),m=Math.max(c,u);n.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`);let y;const C=`M0 0
243
+ a${h},${h} 1 0,0 ${f*.25},${-1*m*.1}
244
+ a${h},${h} 1 0,0 ${f*.25},0
245
+ a${h},${h} 1 0,0 ${f*.25},0
246
+ a${h},${h} 1 0,0 ${f*.25},${m*.1}
247
+
248
+ a${h},${h} 1 0,0 ${f*.15},${m*.33}
249
+ a${h*.8},${h*.8} 1 0,0 0,${m*.34}
250
+ a${h},${h} 1 0,0 ${-1*f*.15},${m*.33}
251
+
252
+ a${h},${h} 1 0,0 ${-1*f*.25},${m*.15}
253
+ a${h},${h} 1 0,0 ${-1*f*.25},0
254
+ a${h},${h} 1 0,0 ${-1*f*.25},0
255
+ a${h},${h} 1 0,0 ${-1*f*.25},${-1*m*.15}
256
+
257
+ a${h},${h} 1 0,0 ${-1*f*.1},${-1*m*.33}
258
+ a${h*.8},${h*.8} 1 0,0 0,${-1*m*.34}
259
+ a${h},${h} 1 0,0 ${f*.1},${-1*m*.33}
260
+ H0 V0 Z`;if(t.look==="handDrawn"){const b=tt.svg(s),k=J(t,{}),w=b.path(C,k);y=s.insert(()=>w,":first-child"),y.attr("class","basic label-container").attr("style",Ht(d))}else y=s.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",C);return y.attr("transform",`translate(${-f/2}, ${-m/2})`),st(t,y),t.calcIntersect=function(b,k){return K.rect(b,k)},t.intersect=function(b){return H.info("Bang intersect",t,b),K.rect(t,b)},s}g(og,"bang");async function ng(e,t){const{labelStyles:r,nodeStyles:i}=rt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,halfPadding:o,label:n}=await dt(e,t,ht(t)),l=a.width+2*o,c=a.height+2*o,h=.15*l,d=.25*l,p=.35*l,u=.2*l,{cssStyles:f}=t;let m;const y=`M0 0
261
+ a${h},${h} 0 0,1 ${l*.25},${-1*l*.1}
262
+ a${p},${p} 1 0,1 ${l*.4},${-1*l*.1}
263
+ a${d},${d} 1 0,1 ${l*.35},${l*.2}
264
+
265
+ a${h},${h} 1 0,1 ${l*.15},${c*.35}
266
+ a${u},${u} 1 0,1 ${-1*l*.15},${c*.65}
267
+
268
+ a${d},${h} 1 0,1 ${-1*l*.25},${l*.15}
269
+ a${p},${p} 1 0,1 ${-1*l*.5},0
270
+ a${h},${h} 1 0,1 ${-1*l*.25},${-1*l*.15}
271
+
272
+ a${h},${h} 1 0,1 ${-1*l*.1},${-1*c*.35}
273
+ a${u},${u} 1 0,1 ${l*.1},${-1*c*.65}
274
+ H0 V0 Z`;if(t.look==="handDrawn"){const C=tt.svg(s),b=J(t,{}),k=C.path(y,b);m=s.insert(()=>k,":first-child"),m.attr("class","basic label-container").attr("style",Ht(f))}else m=s.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",y);return n.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`),m.attr("transform",`translate(${-l/2}, ${-c/2})`),st(t,m),t.calcIntersect=function(C,b){return K.rect(C,b)},t.intersect=function(C){return H.info("Cloud intersect",t,C),K.rect(t,C)},s}g(ng,"cloud");async function lg(e,t){const{labelStyles:r,nodeStyles:i}=rt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,halfPadding:o,label:n}=await dt(e,t,ht(t)),l=a.width+8*o,c=a.height+2*o,h=5,d=t.look==="neo"?`
275
+ M${-l/2} ${c/2-h}
276
+ v${-c+2*h}
277
+ q0,-${h} ${h},-${h}
278
+ h${l-2*h}
279
+ q${h},0 ${h},${h}
280
+ v${c-h}
281
+ H${-l/2}
282
+ Z
283
+ `:`
284
+ M${-l/2} ${c/2-h}
285
+ v${-c+2*h}
286
+ q0,-${h} ${h},-${h}
287
+ h${l-2*h}
288
+ q${h},0 ${h},${h}
289
+ v${c-2*h}
290
+ q0,${h} ${-h},${h}
291
+ h${-(l-2*h)}
292
+ q${-h},0 ${-h},${-h}
293
+ Z
294
+ `;if(!t.domId)throw new Error(`defaultMindmapNode: node "${t.id}" is missing a domId — was render.ts domId prefixing skipped?`);const p=s.append("path").attr("id",t.domId).attr("class","node-bkg node-"+t.type).attr("style",i).attr("d",d);return s.append("line").attr("class","node-line-").attr("x1",-l/2).attr("y1",c/2).attr("x2",l/2).attr("y2",c/2),n.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`),s.append(()=>n.node()),st(t,p),t.calcIntersect=function(u,f){return K.rect(u,f)},t.intersect=function(u){return K.rect(t,u)},s}g(lg,"defaultMindmapNode");async function hg(e,t){const r={padding:t.padding??0};return En(e,t,r)}g(hg,"mindmapCircle");var Wb=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:Np},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:Pp},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:Wp},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:Up},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:hp},{semanticName:"Data Store",name:"Data Store",shortName:"datastore",description:"Data flow diagram data store",aliases:["data-store"],handler:cp},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:En},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:og},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:ng},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:Op},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:yp},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:vp},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:_p},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:Zp},{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:wp},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:up},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:Xp},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:ep},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:Rp},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:Yp},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:Hp},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:fp},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:Cp},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:ap},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:op},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:np},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:Lp},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:Jp},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:mp},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:Vp},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:Fp},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:lp},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:dp},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:Kp},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:eg},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:pp},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:Qp},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:gp},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:qp},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:Mp},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:Ep},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:tp},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:sp},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:Gp},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:jp},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:tg},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:Ip},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:Ap}],zb=g(()=>{const t=[...Object.entries({state:zp,choice:rp,note:$p,rectWithTitle:Dp,labelRect:Bp,iconSquare:Tp,iconCircle:bp,icon:xp,iconRounded:kp,imageSquare:Sp,anchor:Ku,kanbanItem:ag,mindmapCircle:hg,defaultMindmapNode:lg,classBox:ig,erBox:Mn,requirementBox:sg}),...Wb.flatMap(r=>[r.shortName,..."aliases"in r?r.aliases:[],..."internalAliases"in r?r.internalAliases:[]].map(s=>[s,r.handler]))];return Object.fromEntries(t)},"generateShapeMap"),cg=zb();function Hb(e){return e in cg}g(Hb,"isValidShape");var na=new Map;async function dg(e,t,r){let i,s;t.shape==="rect"&&(t.rx&&t.ry?t.shape="roundedRect":t.shape="squareRect");const a=t.shape?cg[t.shape]:void 0;if(!a)throw new Error(`No such shape: ${t.shape}. Please check your syntax.`);if(t.link){let o;r.config.securityLevel==="sandbox"?o="_top":t.linkTarget&&(o=t.linkTarget||"_blank"),i=e.insert("svg:a").attr("xlink:href",t.link).attr("target",o??null),s=await a(i,t,r)}else s=await a(e,t,r),i=s;return i.attr("data-look",Ht(t.look)),t.tooltip&&s.attr("title",t.tooltip),na.set(t.id,i),t.haveCallback&&i.attr("class",i.attr("class")+" clickable"),i}g(dg,"insertNode");var PS=g((e,t)=>{na.set(t.id,e)},"setNodeElem"),RS=g(()=>{na.clear()},"clear"),qS=g(e=>{const t=na.get(e.id);H.trace("Transforming node",e.diff,e,"translate("+(e.x-e.width/2-5)+", "+e.width/2+")");const r=8,i=e.diff||0;return e.clusterNode?t.attr("transform","translate("+(e.x+i-e.width/2)+", "+(e.y-e.height/2-r)+")"):t.attr("transform","translate("+e.x+", "+e.y+")"),i},"positionNode"),ki=g((e,t)=>{if(t)return"translate("+-e.width/2+", "+-e.height/2+")";const r=e.x??0,i=e.y??0;return"translate("+-(r+e.width/2)+", "+-(i+e.height/2)+")"},"computeLabelTransform"),Qt={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},dh={arrow_point:4,arrow_cross:12.5,arrow_circle:12.5};function vi(e,t){if(e===void 0||t===void 0)return{angle:0,deltaX:0,deltaY:0};e=At(e),t=At(t);const[r,i]=[e.x,e.y],[s,a]=[t.x,t.y],o=s-r,n=a-i;return{angle:Math.atan(n/o),deltaX:o,deltaY:n}}g(vi,"calculateDeltaAndAngle");var At=g(e=>Array.isArray(e)?{x:e[0],y:e[1]}:e,"pointTransformer"),Yb=g(e=>({x:g(function(t,r,i){let s=0;const a=At(i[0]).x<At(i[i.length-1]).x?"left":"right";if(r===0&&Object.hasOwn(Qt,e.arrowTypeStart)){const{angle:u,deltaX:f}=vi(i[0],i[1]);s=Qt[e.arrowTypeStart]*Math.cos(u)*(f>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(Qt,e.arrowTypeEnd)){const{angle:u,deltaX:f}=vi(i[i.length-1],i[i.length-2]);s=Qt[e.arrowTypeEnd]*Math.cos(u)*(f>=0?1:-1)}const o=Math.abs(At(t).x-At(i[i.length-1]).x),n=Math.abs(At(t).y-At(i[i.length-1]).y),l=Math.abs(At(t).x-At(i[0]).x),c=Math.abs(At(t).y-At(i[0]).y),h=Qt[e.arrowTypeStart],d=Qt[e.arrowTypeEnd],p=1;if(o<d&&o>0&&n<d){let u=d+p-o;u*=a==="right"?-1:1,s-=u}if(l<h&&l>0&&c<h){let u=h+p-l;u*=a==="right"?-1:1,s+=u}return At(t).x+s},"x"),y:g(function(t,r,i){let s=0;const a=At(i[0]).y<At(i[i.length-1]).y?"down":"up";if(r===0&&Object.hasOwn(Qt,e.arrowTypeStart)){const{angle:u,deltaY:f}=vi(i[0],i[1]);s=Qt[e.arrowTypeStart]*Math.abs(Math.sin(u))*(f>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(Qt,e.arrowTypeEnd)){const{angle:u,deltaY:f}=vi(i[i.length-1],i[i.length-2]);s=Qt[e.arrowTypeEnd]*Math.abs(Math.sin(u))*(f>=0?1:-1)}const o=Math.abs(At(t).y-At(i[i.length-1]).y),n=Math.abs(At(t).x-At(i[i.length-1]).x),l=Math.abs(At(t).y-At(i[0]).y),c=Math.abs(At(t).x-At(i[0]).x),h=Qt[e.arrowTypeStart],d=Qt[e.arrowTypeEnd],p=1;if(o<d&&o>0&&n<d){let u=d+p-o;u*=a==="up"?-1:1,s-=u}if(l<h&&l>0&&c<h){let u=h+p-l;u*=a==="up"?-1:1,s+=u}return At(t).y+s},"y")}),"getLineFunctionsWithOffset"),Ub=g((e,t,r,i,s,a=!1,o)=>{t.arrowTypeStart&&uh(e,"start",t.arrowTypeStart,r,i,s,a,o),t.arrowTypeEnd&&uh(e,"end",t.arrowTypeEnd,r,i,s,a,o)},"addEdgeMarkers"),jb={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}},Gb=["cross","point","circle","lollipop","aggregation","extension","composition","dependency","barb"],uh=g((e,t,r,i,s,a,o=!1,n)=>{var f;const l=jb[r],c=l&&Gb.includes(l.type);if(!l){H.warn(`Unknown arrow type: ${r}`);return}const h=l.type,u=`${s}_${a}-${h}${t==="start"?"Start":"End"}${o&&c?"-margin":""}`;if(n&&n.trim()!==""){const m=n.replace(/[^\dA-Za-z]/g,"_"),y=`${u}_${m}`;if(!document.getElementById(y)){const C=document.getElementById(u);if(C){const b=C.cloneNode(!0);b.id=y,b.querySelectorAll("path, circle, line").forEach(w=>{w.setAttribute("stroke",n),l.fill&&w.setAttribute("fill",n)}),(f=C.parentNode)==null||f.appendChild(b)}}e.attr(`marker-${t}`,`url(${i}#${y})`)}else e.attr(`marker-${t}`,`url(${i}#${u})`)},"addEdgeMarker"),Xb=g(e=>{var t,r;return typeof e=="string"?e:(r=(t=wt())==null?void 0:t.flowchart)==null?void 0:r.curve},"resolveEdgeCurveType"),Gs=new Map,jt=new Map,NS=g(()=>{Gs.clear(),jt.clear()},"clear"),Ti=g(e=>e?typeof e=="string"?e:e.reduce((t,r)=>t+";"+r,""):"","getLabelStyles"),Vb=g(async(e,t)=>{const r=wt();let i=se(r);const{labelStyles:s}=rt(t);t.labelStyle=s;const a=e.insert("g").attr("class","edgeLabel"),o=a.insert("g").attr("class","label").attr("data-id",t.id),n=t.labelType==="markdown",c=await Pe(e,t.label,{style:Ti(t.labelStyle),useHtmlLabels:i,addSvgBackground:!0,isNode:!1,markdown:n,width:n?void 0:void 0},r);o.node().appendChild(c),H.info("abc82",t,t.labelType);let h=c.getBBox(),d=h;if(i){const u=c.children[0],f=xt(c);h=u.getBoundingClientRect(),d=h,f.attr("width",h.width),f.attr("height",h.height)}else{const u=xt(c).select("text").node();u&&typeof u.getBBox=="function"&&(d=u.getBBox())}o.attr("transform",ki(d,i)),Gs.set(t.id,a),t.width=h.width,t.height=h.height;let p;if(t.startLabelLeft){const u=e.insert("g").attr("class","edgeTerminals"),f=u.insert("g").attr("class","inner"),m=await Ke(f,t.startLabelLeft,Ti(t.labelStyle)||"",!1,!1);p=m;let y=m.getBBox();if(i){const C=m.children[0],b=xt(m);y=C.getBoundingClientRect(),b.attr("width",y.width),b.attr("height",y.height)}f.attr("transform",ki(y,i)),jt.get(t.id)||jt.set(t.id,{}),jt.get(t.id).startLeft=u,Li(p,t.startLabelLeft)}if(t.startLabelRight){const u=e.insert("g").attr("class","edgeTerminals"),f=u.insert("g").attr("class","inner"),m=await Ke(f,t.startLabelRight,Ti(t.labelStyle)||"",!1,!1);p=m;let y=m.getBBox();if(i){const C=m.children[0],b=xt(m);y=C.getBoundingClientRect(),b.attr("width",y.width),b.attr("height",y.height)}f.attr("transform",ki(y,i)),jt.get(t.id)||jt.set(t.id,{}),jt.get(t.id).startRight=u,Li(p,t.startLabelRight)}if(t.endLabelLeft){const u=e.insert("g").attr("class","edgeTerminals"),f=u.insert("g").attr("class","inner"),m=await Ke(u,t.endLabelLeft,Ti(t.labelStyle)||"",!1,!1);p=m;let y=m.getBBox();if(i){const C=m.children[0],b=xt(m);y=C.getBoundingClientRect(),b.attr("width",y.width),b.attr("height",y.height)}f.attr("transform",ki(y,i)),jt.get(t.id)||jt.set(t.id,{}),jt.get(t.id).endLeft=u,Li(p,t.endLabelLeft)}if(t.endLabelRight){const u=e.insert("g").attr("class","edgeTerminals"),f=u.insert("g").attr("class","inner"),m=await Ke(u,t.endLabelRight,Ti(t.labelStyle)||"",!1,!1);p=m;let y=m.getBBox();if(i){const C=m.children[0],b=xt(m);y=C.getBoundingClientRect(),b.attr("width",y.width),b.attr("height",y.height)}f.attr("transform",ki(y,i)),jt.get(t.id)||jt.set(t.id,{}),jt.get(t.id).endRight=u,Li(p,t.endLabelRight)}return c},"insertEdgeLabel");function Li(e,t){se(wt())&&e&&(e.style.width=t.length*9+"px",e.style.height="12px")}g(Li,"setTerminalWidth");var Zb=g((e,t)=>{H.debug("Moving label abc88 ",e.id,e.label,Gs.get(e.id),t);let r=t.updatedPath?t.updatedPath:t.originalPath;const i=wt(),{subGraphTitleTotalMargin:s}=Cn(i);if(e.label){const a=Gs.get(e.id);let o=e.x,n=e.y;if(r){const l=be.calcLabelPosition(r);H.debug("Moving label "+e.label+" from (",o,",",n,") to (",l.x,",",l.y,") abc88"),t.updatedPath&&(o=l.x,n=l.y)}a.attr("transform",`translate(${o}, ${n+s/2})`)}if(e.startLabelLeft){const a=jt.get(e.id).startLeft;let o=e.x,n=e.y;if(r){const l=be.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",r);o=l.x,n=l.y}a.attr("transform",`translate(${o}, ${n})`)}if(e.startLabelRight){const a=jt.get(e.id).startRight;let o=e.x,n=e.y;if(r){const l=be.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",r);o=l.x,n=l.y}a.attr("transform",`translate(${o}, ${n})`)}if(e.endLabelLeft){const a=jt.get(e.id).endLeft;let o=e.x,n=e.y;if(r){const l=be.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",r);o=l.x,n=l.y}a.attr("transform",`translate(${o}, ${n})`)}if(e.endLabelRight){const a=jt.get(e.id).endRight;let o=e.x,n=e.y;if(r){const l=be.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",r);o=l.x,n=l.y}a.attr("transform",`translate(${o}, ${n})`)}},"positionEdgeLabel"),Qb=g((e,t)=>{var o;if(!(e!=null&&e.isLabelEdge)||!((o=e==null?void 0:e.id)!=null&&o.endsWith("-to-label"))||!Array.isArray(t)||t.length!==2)return t;const[r,i]=t,s=Math.abs(i.x-r.x),a=Math.abs(i.y-r.y);return s<.001||a<.001?t:a>=s?[r,{x:r.x,y:i.y},i]:[r,{x:i.x,y:r.y},i]},"orthogonalizeToLabelClippedPoints"),Kb=g((e,t)=>{const r=e.x,i=e.y,s=Math.abs(t.x-r),a=Math.abs(t.y-i),o=e.width/2,n=e.height/2;return s>=o||a>=n},"outsideNode"),Jb=g((e,t,r)=>{H.debug(`intersection calc abc89:
295
+ outsidePoint: ${JSON.stringify(t)}
296
+ insidePoint : ${JSON.stringify(r)}
297
+ node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);const i=e.x,s=e.y,a=Math.abs(i-r.x),o=e.width/2;let n=r.x<t.x?o-a:o+a;const l=e.height/2,c=Math.abs(t.y-r.y),h=Math.abs(t.x-r.x);if(Math.abs(s-t.y)*o>Math.abs(i-t.x)*l){let d=r.y<t.y?t.y-l-s:s-l-t.y;n=h*d/c;const p={x:r.x<t.x?r.x+n:r.x-h+n,y:r.y<t.y?r.y+c-d:r.y-c+d};return n===0&&(p.x=t.x,p.y=t.y),h===0&&(p.x=t.x),c===0&&(p.y=t.y),H.debug(`abc89 top/bottom calc, Q ${c}, q ${d}, R ${h}, r ${n}`,p),p}else{r.x<t.x?n=t.x-o-i:n=i-o-t.x;let d=c*n/h,p=r.x<t.x?r.x+h-n:r.x-h+n,u=r.y<t.y?r.y+d:r.y-d;return H.debug(`sides calc abc89, Q ${c}, q ${d}, R ${h}, r ${n}`,{_x:p,_y:u}),n===0&&(p=t.x,u=t.y),h===0&&(p=t.x),c===0&&(u=t.y),{x:p,y:u}}},"intersection"),ph=g((e,t)=>{H.warn("abc88 cutPathAtIntersect",e,t);let r=[],i=e[0],s=!1;return e.forEach(a=>{if(H.info("abc88 checking point",a,t),!Kb(t,a)&&!s){const o=Jb(t,i,a);H.debug("abc88 inside",a,i,o),H.debug("abc88 intersection",o,t);let n=!1;r.forEach(l=>{n=n||l.x===o.x&&l.y===o.y}),r.some(l=>l.x===o.x&&l.y===o.y)?H.warn("abc88 no intersect",o,r):r.push(o),s=!0}else H.warn("abc88 outside",a,i),i=a,s||r.push(a)}),H.debug("returning points",r),r},"cutPathAtIntersect");function ug(e){const t=[],r=[];for(let i=1;i<e.length-1;i++){const s=e[i-1],a=e[i],o=e[i+1];(s.x===a.x&&a.y===o.y&&Math.abs(a.x-o.x)>5&&Math.abs(a.y-s.y)>5||s.y===a.y&&a.x===o.x&&Math.abs(a.x-s.x)>5&&Math.abs(a.y-o.y)>5)&&(t.push(a),r.push(i))}return{cornerPoints:t,cornerPointPositions:r}}g(ug,"extractCornerPoints");var gh=g(function(e,t,r){const i=t.x-e.x,s=t.y-e.y,a=Math.sqrt(i*i+s*s),o=r/a;return{x:t.x-o*i,y:t.y-o*s}},"findAdjacentPoint"),tk=g(function(e){const{cornerPointPositions:t}=ug(e),r=[];for(let i=0;i<e.length;i++)if(t.includes(i)){const s=e[i-1],a=e[i+1],o=e[i],n=gh(s,o,5),l=gh(a,o,5),c=l.x-n.x,h=l.y-n.y;r.push(n);const d=Math.sqrt(2)*2;let p={x:o.x,y:o.y};if(Math.abs(a.x-s.x)>10&&Math.abs(a.y-s.y)>=10){H.debug("Corner point fixing",Math.abs(a.x-s.x),Math.abs(a.y-s.y));const u=5;o.x===n.x?p={x:c<0?n.x-u+d:n.x+u-d,y:h<0?n.y-d:n.y+d}:p={x:c<0?n.x-d:n.x+d,y:h<0?n.y-u+d:n.y+u-d}}else H.debug("Corner point skipping fixing",Math.abs(a.x-s.x),Math.abs(a.y-s.y));r.push(p,l)}else r.push(e[i]);return r},"fixCorners"),ek=g((e,t,r)=>{const i=e-t-r,s=2,a=2,o=s+a,n=Math.floor(i/o),l=Array(n).fill(`${s} ${a}`).join(" ");return`0 ${t} ${l} ${r}`},"generateDashArray"),rk=g(function(e,t,r,i,s,a,o,n=!1){var E;if(!o)throw new Error(`insertEdge: missing diagramId for edge "${t.id}" — edge IDs require a diagram prefix for uniqueness`);const{handDrawnSeed:l,layout:c}=wt();let h=t.points,d=!1;const p=s;var u=a;const f=[];for(const N in t.cssCompiledStyles)Vd(N)||f.push(t.cssCompiledStyles[N]);if(c==="swimlane"){if(u.intersect&&p.intersect&&Array.isArray(h)&&h.length>=2)if(h.length===2)h=[p.intersect(h[0]),u.intersect(h[1])];else{const N=h.slice(1,-1),Y=N[0],G=N[N.length-1],et=.5,lt=Math.abs(h[h.length-1].x-G.x)<et&&Math.abs(h[h.length-1].y-G.y)<et,ot=p.intersect(Y),ct=lt?G:u.intersect(G),kt=Math.abs(ct.x-G.x)<et&&Math.abs(ct.y-G.y)<et,_t=Math.abs(ot.x-Y.x)<et&&Math.abs(ot.y-Y.y)<et?[]:[ot],Lt=kt?[]:[ct];h=[..._t,...N,...Lt]}h=Qb(t,h)}else u.intersect&&p.intersect&&!n&&(h=h.slice(1,t.points.length-1),h.unshift(p.intersect(h[0])),h.push(u.intersect(h[h.length-1])));const m=btoa(JSON.stringify(h));t.toCluster&&(H.info("to cluster abc88",r.get(t.toCluster)),h=ph(t.points,r.get(t.toCluster).node),d=!0),t.fromCluster&&(H.debug("from cluster abc88",r.get(t.fromCluster),JSON.stringify(h,null,2)),h=ph(h.reverse(),r.get(t.fromCluster).node).reverse(),d=!0);let y=h.filter(N=>!Number.isNaN(N.y));const C=Xb(t.curve);C!=="rounded"&&(y=tk(y));let b=Mi;switch(C){case"linear":b=Mi;break;case"basis":b=io;break;case"cardinal":b=Jh;break;case"bumpX":b=Xh;break;case"bumpY":b=Vh;break;case"catmullRom":b=ec;break;case"monotoneX":b=nc;break;case"monotoneY":b=lc;break;case"natural":b=cc;break;case"step":b=dc;break;case"stepAfter":b=pc;break;case"stepBefore":b=uc;break;case"rounded":b=Mi;break;default:b=io}const{x:k,y:w}=Yb(t),S=Vy().x(k).y(w).curve(b);let B;switch(t.thickness){case"normal":B="edge-thickness-normal";break;case"thick":B="edge-thickness-thick";break;case"invisible":B="edge-thickness-invisible";break;default:B="edge-thickness-normal"}switch(t.pattern){case"solid":B+=" edge-pattern-solid";break;case"dotted":B+=" edge-pattern-dotted";break;case"dashed":B+=" edge-pattern-dashed";break;default:B+=" edge-pattern-solid"}let F,v=C==="rounded"?pg(gg(y,t),5):S(y);const z=Array.isArray(t.style)?t.style:[t.style];let q=z.find(N=>N==null?void 0:N.startsWith("stroke:")),M="";t.animate&&(M="edge-animation-fast"),t.animation&&(M="edge-animation-"+t.animation);let U=!1;if(t.look==="handDrawn"){const N=tt.svg(e);Object.assign([],y);const Y=N.path(v,{roughness:.3,seed:l});B+=" transition",F=xt(Y).select("path").attr("id",`${o}-${t.id}`).attr("class"," "+B+(t.classes?" "+t.classes:"")+(M?" "+M:"")).attr("style",z?z.reduce((et,lt)=>et+";"+lt,""):"");let G=F.attr("d");F.attr("d",G),e.node().appendChild(F.node())}else{const N=f.join(";"),Y=z?z.reduce((kt,bt)=>kt+bt+";",""):"",G=(N?N+";"+Y+";":Y)+";"+(z?z.reduce((kt,bt)=>kt+";"+bt,""):"");F=e.append("path").attr("d",v).attr("id",`${o}-${t.id}`).attr("class"," "+B+(t.classes?" "+t.classes:"")+(M?" "+M:"")).attr("style",G),q=(E=G.match(/stroke:([^;]+)/))==null?void 0:E[1],U=t.animate===!0||!!t.animation||N.includes("animation");const et=F.node(),lt=typeof et.getTotalLength=="function"?et.getTotalLength():0,ot=dh[t.arrowTypeStart]||0,ct=dh[t.arrowTypeEnd]||0;if(t.look==="neo"&&!U){const bt=`stroke-dasharray: ${t.pattern==="dotted"||t.pattern==="dashed"?ek(lt,ot,ct):`0 ${ot} ${lt-ot-ct} ${ct}`}; stroke-dashoffset: 0;`;F.attr("style",bt+F.attr("style"))}}F.attr("data-edge",!0),F.attr("data-et","edge"),F.attr("data-id",t.id),F.attr("data-points",m),F.attr("data-look",Ht(t.look)),t.showPoints&&y.forEach(N=>{e.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",N.x).attr("cy",N.y)});let W="";(wt().flowchart.arrowMarkerAbsolute||wt().state.arrowMarkerAbsolute)&&(W=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,W=W.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),H.info("arrowTypeStart",t.arrowTypeStart),H.info("arrowTypeEnd",t.arrowTypeEnd);const O=!U&&(t==null?void 0:t.look)==="neo";Ub(F,t,W,o,i,O,q);const A=Math.floor(h.length/2),_=h[A];be.isLabelCoordinateInPath(_,F.attr("d"))||(d=!0);let $={};return d&&($.updatedPath=h),$.originalPath=t.points,$},"insertEdge");function pg(e,t){if(e.length<2)return"";let r="";const i=e.length,s=1e-5;for(let a=0;a<i;a++){const o=e[a],n=e[a-1],l=e[a+1];if(a===0)r+=`M${o.x},${o.y}`;else if(a===i-1)r+=`L${o.x},${o.y}`;else{const c=o.x-n.x,h=o.y-n.y,d=l.x-o.x,p=l.y-o.y,u=Math.hypot(c,h),f=Math.hypot(d,p);if(u<s||f<s){r+=`L${o.x},${o.y}`;continue}const m=c/u,y=h/u,C=d/f,b=p/f,k=m*C+y*b,w=Math.max(-1,Math.min(1,k)),S=Math.acos(w);if(S<s||Math.abs(Math.PI-S)<s){r+=`L${o.x},${o.y}`;continue}const B=Math.min(t/Math.sin(S/2),u/2,f/2),F=o.x-m*B,v=o.y-y*B,z=o.x+C*B,q=o.y+b*B;r+=`L${F},${v}`,r+=`Q${o.x},${o.y} ${z},${q}`}}return r}g(pg,"generateRoundedPath");function Oo(e,t){if(!e||!t)return{angle:0,deltaX:0,deltaY:0};const r=t.x-e.x,i=t.y-e.y;return{angle:Math.atan2(i,r),deltaX:r,deltaY:i}}g(Oo,"calculateDeltaAndAngle");function gg(e,t){const r=e.map(s=>({...s}));if(e.length>=2&&Qt[t.arrowTypeStart]){const s=Qt[t.arrowTypeStart],a=e[0],o=e[1],{angle:n}=Oo(a,o),l=s*Math.cos(n),c=s*Math.sin(n);r[0].x=a.x+l,r[0].y=a.y+c}const i=e.length;if(i>=2&&Qt[t.arrowTypeEnd]){const s=Qt[t.arrowTypeEnd],a=e[i-1],o=e[i-2],{angle:n}=Oo(o,a),l=s*Math.cos(n),c=s*Math.sin(n);r[i-1].x=a.x-l,r[i-1].y=a.y-c}return r}g(gg,"applyMarkerOffsetsToPoints");var ik=g((e,t,r,i)=>{t.forEach(s=>{_k[s](e,r,i)})},"insertMarkers"),sk=g((e,t,r)=>{H.trace("Making markers for ",r),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionStart").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 1,7 L18,13 V 1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionEnd").attr("class","marker extension "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z"),e.append("marker").attr("id",r+"_"+t+"-extensionStart-margin").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("viewBox","0 0 20 14").append("polygon").attr("points","10,7 18,13 18,1").style("stroke-width",2).style("stroke-dasharray","0"),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionEnd-margin").attr("class","marker extension "+t).attr("refX",9).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("viewBox","0 0 20 14").append("polygon").attr("points","10,1 10,13 18,7").style("stroke-width",2).style("stroke-dasharray","0")},"extension"),ak=g((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionStart").attr("class","marker composition "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionEnd").attr("class","marker composition "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionStart-margin").attr("class","marker composition "+t).attr("refX",15).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("viewBox","0 0 15 15").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionEnd-margin").attr("class","marker composition "+t).attr("refX",3.5).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),ok=g((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationStart").attr("class","marker aggregation "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationEnd").attr("class","marker aggregation "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationStart-margin").attr("class","marker aggregation "+t).attr("refX",15).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",2).attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationEnd-margin").attr("class","marker aggregation "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",2).attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),nk=g((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyStart").attr("class","marker dependency "+t).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyEnd").attr("class","marker dependency "+t).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyStart-margin").attr("class","marker dependency "+t).attr("refX",4).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyEnd-margin").attr("class","marker dependency "+t).attr("refX",16).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),lk=g((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopStart").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopEnd").attr("class","marker lollipop "+t).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopStart-margin").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6).attr("stroke-width",2),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopEnd-margin").attr("class","marker lollipop "+t).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6).attr("stroke-width",2)},"lollipop"),hk=g((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-pointEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointEnd-margin").attr("class","marker "+t).attr("viewBox","0 0 11.5 14").attr("refX",11.5).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",10.5).attr("markerHeight",14).attr("orient","auto").append("path").attr("d","M 0 0 L 11.5 7 L 0 14 z").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointStart-margin").attr("class","marker "+t).attr("viewBox","0 0 11.5 14").attr("refX",1).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11.5).attr("markerHeight",14).attr("orient","auto").append("polygon").attr("points","0,7 11.5,14 11.5,0").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0")},"point"),ck=g((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-circleEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleEnd-margin").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refY",5).attr("refX",12.25).attr("markerUnits","userSpaceOnUse").attr("markerWidth",14).attr("markerHeight",14).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleStart-margin").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-2).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",14).attr("markerHeight",14).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0")},"circle"),dk=g((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-crossEnd").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-crossStart").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-crossEnd-margin").attr("class","marker cross "+t).attr("viewBox","0 0 15 15").attr("refX",17.7).attr("refY",7.5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 1,1 L 14,14 M 1,14 L 14,1").attr("class","arrowMarkerPath").style("stroke-width",2.5),e.append("marker").attr("id",r+"_"+t+"-crossStart-margin").attr("class","marker cross "+t).attr("viewBox","0 0 15 15").attr("refX",-3.5).attr("refY",7.5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 1,1 L 14,14 M 1,14 L 14,1").attr("class","arrowMarkerPath").style("stroke-width",2.5).style("stroke-dasharray","1,0")},"cross"),uk=g((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb"),pk=g((e,t,r)=>{const i=Mt(),{themeVariables:s}=i,{transitionColor:a}=s;e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","strokeWidth").attr("orient","auto").append("path").attr("d","M 19,7 L11,14 L13,7 L11,0 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd-margin").attr("refX",17).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L11,14 L13,7 L11,0 Z").attr("fill",`${a}`)},"barbNeo"),gk=g((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneStart").attr("class","marker onlyOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M9,0 L9,18 M15,0 L15,18"),e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneEnd").attr("class","marker onlyOne "+t).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M3,0 L3,18 M9,0 L9,18")},"only_one"),fk=g((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneStart").attr("class","marker zeroOrOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),i.append("path").attr("d","M9,0 L9,18");const s=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+t).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");s.append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),s.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),mk=g((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreStart").attr("class","marker oneOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"),e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreEnd").attr("class","marker oneOrMore "+t).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18")},"one_or_more"),yk=g((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),i.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18");const s=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+t).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");s.append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),s.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),Ck=g((e,t,r)=>{const i=Mt(),{themeVariables:s}=i,{strokeWidth:a}=s;e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneStart").attr("class","marker onlyOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M9,0 L9,18 M15,0 L15,18").attr("stroke-width",`${a}`),e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneEnd").attr("class","marker onlyOne "+t).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M3,0 L3,18 M9,0 L9,18").attr("stroke-width",`${a}`)},"only_one_neo"),xk=g((e,t,r)=>{const i=Mt(),{themeVariables:s}=i,{strokeWidth:a,mainBkg:o}=s,n=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneStart").attr("class","marker zeroOrOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse");n.append("circle").attr("fill",o??"white").attr("cx",21).attr("cy",9).attr("stroke-width",`${a}`).attr("r",6),n.append("path").attr("d","M9,0 L9,18").attr("stroke-width",`${a}`);const l=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+t).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("markerUnits","userSpaceOnUse").attr("orient","auto");l.append("circle").attr("fill",o??"white").attr("cx",9).attr("cy",9).attr("stroke-width",`${a}`).attr("r",6),l.append("path").attr("d","M21,0 L21,18").attr("stroke-width",`${a}`)},"zero_or_one_neo"),bk=g((e,t,r)=>{const i=Mt(),{themeVariables:s}=i,{strokeWidth:a}=s;e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreStart").attr("class","marker oneOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27").attr("stroke-width",`${a}`),e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreEnd").attr("class","marker oneOrMore "+t).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18").attr("stroke-width",`${a}`)},"one_or_more_neo"),kk=g((e,t,r)=>{const i=Mt(),{themeVariables:s}=i,{strokeWidth:a,mainBkg:o}=s,n=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("markerUnits","userSpaceOnUse").attr("orient","auto");n.append("circle").attr("fill",o??"white").attr("cx",45.5).attr("cy",18).attr("r",6).attr("stroke-width",`${a}`),n.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18").attr("stroke-width",`${a}`);const l=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+t).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto").attr("markerUnits","userSpaceOnUse");l.append("circle").attr("fill",o??"white").attr("cx",11).attr("cy",18).attr("r",6).attr("stroke-width",`${a}`),l.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18").attr("stroke-width",`${a}`)},"zero_or_more_neo"),Tk=g((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("path").attr("d",`M0,0
298
+ L20,10
299
+ M20,10
300
+ L0,20`)},"requirement_arrow"),Sk=g((e,t,r)=>{const i=Mt(),{themeVariables:s}=i,{strokeWidth:a}=s;e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("stroke-width",`${a}`).attr("viewBox","0 0 25 20").append("path").attr("d",`M0,0
301
+ L20,10
302
+ M20,10
303
+ L0,20`).attr("stroke-linejoin","miter")},"requirement_arrow_neo"),wk=g((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g");i.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),i.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),i.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains"),Bk=g((e,t,r)=>{const i=Mt(),{themeVariables:s}=i,{strokeWidth:a}=s,o=e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("g");o.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),o.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),o.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10),o.selectAll("*").attr("stroke-width",`${a}`)},"requirement_contains_neo"),_k={extension:sk,composition:ak,aggregation:ok,dependency:nk,lollipop:lk,point:hk,circle:ck,cross:dk,barb:uk,barbNeo:pk,only_one:gk,zero_or_one:fk,one_or_more:mk,zero_or_more:yk,only_one_neo:Ck,zero_or_one_neo:xk,one_or_more_neo:bk,zero_or_more_neo:kk,requirement_arrow:Tk,requirement_contains:wk,requirement_arrow_neo:Sk,requirement_contains_neo:Bk},vk=ik,Lk={common:Yi,getConfig:Mt,insertCluster:Sb,insertEdge:rk,insertEdgeLabel:Vb,insertMarkers:vk,insertNode:dg,interpolateToCurve:un,labelHelper:dt,log:H,positionEdgeLabel:Zb},Wi={},fg=g(e=>{for(const t of e)Wi[t.name]=t},"registerLayoutLoaders"),Fk=g(()=>{fg([{name:"dagre",loader:g(async()=>await Ct(()=>import("./dagre-VKFMJZFB-CMh1gN_B.js"),__vite__mapDeps([0,1,2,3,4,5,6]),import.meta.url),"loader")},{name:"swimlane",loader:g(async()=>await Ct(()=>import("./swimlanes-5IMT3BWC-BR44KNOm.js"),__vite__mapDeps([7,5,6,1,2,3]),import.meta.url),"loader")},{name:"cose-bilkent",loader:g(async()=>await Ct(()=>import("./cose-bilkent-JH36ORCC-DcImuxgn.js"),__vite__mapDeps([8,9,5,6]),import.meta.url),"loader")}])},"registerDefaultLayoutLoaders");Fk();var WS=g(async(e,t,r)=>{if(!(e.layoutAlgorithm in Wi))throw new Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);if(e.diagramId)for(const d of e.nodes){const p=d.domId||d.id;d.domId=`${e.diagramId}-${p}`}const i=Wi[e.layoutAlgorithm],s=await i.loader(),{theme:a,themeVariables:o}=e.config,{useGradient:n,gradientStart:l,gradientStop:c}=o,h=t.attr("id");if(t.append("defs").append("filter").attr("id",`${h}-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",`${a!=null&&a.includes("dark")?"#FFFFFF":"#000000"}`),t.append("defs").append("filter").attr("id",`${h}-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",`${a!=null&&a.includes("dark")?"#FFFFFF":"#000000"}`),n){const d=t.append("linearGradient").attr("id",t.attr("id")+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");d.append("svg:stop").attr("offset","0%").attr("stop-color",l).attr("stop-opacity",1),d.append("svg:stop").attr("offset","100%").attr("stop-color",c).attr("stop-opacity",1)}return s.render(e,t,Lk,{algorithm:i.algorithm},r)},"render"),zS=g((e="",{fallback:t="dagre"}={})=>{if(e in Wi)return e;if(t in Wi)return H.warn(`Layout algorithm ${e} is not registered. Using ${t} as fallback.`),t;throw new Error(`Both layout algorithms ${e} and ${t} are not registered.`)},"getRegisteredLayoutAlgorithm"),$n="comm",mg="rule",yg="decl",Ak="@media",Ek="@import",Mk="@supports",$k="@namespace",Io="@keyframes",Cg="@layer",Ok="@scope",Ik=Math.abs,Oi=String.fromCharCode;function xg(e){return e.trim()}function Do(e,t,r){return e.replace(t,r)}function Hr(e,t){return e.charCodeAt(t)|0}function li(e,t,r){return e.slice(t,r)}function Ee(e){return e.length}function bg(e){return e.length}function us(e,t){return t.push(e),e}var la=1,hi=1,kg=0,ge=0,Dt=0,ui="";function On(e,t,r,i,s,a,o,n){return{value:e,root:t,parent:r,type:i,props:s,children:a,line:la,column:hi,length:o,return:"",siblings:n}}function Dk(){return Dt}function Pk(){return Dt=ge>0?Hr(ui,--ge):0,hi--,Dt===10&&(hi=1,la--),Dt}function Te(){return Dt=ge<kg?Hr(ui,ge++):0,hi++,Dt===10&&(hi=1,la++),Dt}function Je(){return Hr(ui,ge)}function Ss(){return ge}function ha(e,t){return li(ui,e,t)}function zi(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 Rk(e){return la=hi=1,kg=Ee(ui=e),ge=0,[]}function qk(e){return ui="",e}function Ua(e){return xg(ha(ge-1,Po(e===91?e+2:e===40?e+1:e)))}function Nk(e){for(;(Dt=Je())&&Dt<33;)Te();return zi(e)>2||zi(Dt)>3?"":" "}function Wk(e,t){for(;--t&&Te()&&!(Dt<48||Dt>102||Dt>57&&Dt<65||Dt>70&&Dt<97););return ha(e,Ss()+(t<6&&Je()==32&&Te()==32))}function Po(e){for(;Te();)switch(Dt){case e:return ge;case 34:case 39:e!==34&&e!==39&&Po(Dt);break;case 40:e===41&&Po(e);break;case 92:Te();break}return ge}function zk(e,t){for(;Te()&&e+Dt!==57;)if(e+Dt===84&&Je()===47)break;return"/*"+ha(t,ge-1)+"*"+Oi(e===47?e:Te())}function Hk(e){for(;!zi(Je());)Te();return ha(e,ge)}function Yk(e){return qk(ws("",null,null,null,[""],e=Rk(e),0,[0],e))}function ws(e,t,r,i,s,a,o,n,l){for(var c=0,h=0,d=o,p=0,u=0,f=0,m=1,y=1,C=1,b=0,k=0,w="",S=s,B=a,F=i,v=w;y;)switch(f=k,k=Te()){case 40:f!=108&&Hr(v,d-1)==58?(b++,v+="("):v+=Ua(k);break;case 41:b--,v+=")";break;case 34:case 39:case 91:v+=Ua(k);break;case 9:case 10:case 13:case 32:if(b>0){v+=Oi(k);break}v+=Nk(f);break;case 92:v+=Wk(Ss()-1,7);continue;case 47:switch(Je()){case 42:case 47:us(Uk(zk(Te(),Ss()),t,r,l),l),(zi(f||1)==5||zi(Je()||1)==5)&&Ee(v)&&li(v,-1,void 0)!==" "&&(v+=" ");break;default:v+="/"}break;case 123*m:n[c++]=Ee(v)*C;case 125*m:case 59:case 0:if(b>0&&k){v+=Oi(k);break}switch(k){case 0:case 125:y=0;case 59+h:C==-1&&(v=Do(v,/\f/g,"")),u>0&&(Ee(v)-d||m===0)&&us(u>32?mh(v+";",i,r,d-1,l):mh(Do(v," ","")+";",i,r,d-2,l),l);break;case 59:v+=";";default:if(us(F=fh(v,t,r,c,h,s,n,w,S=[],B=[],d,a),a),k===123)if(h===0)ws(v,t,F,F,S,a,d,n,B);else{switch(p){case 99:if(Hr(v,3)===110)break;case 108:if(Hr(v,2)===97)break;default:h=0;case 100:case 109:case 115:}h?ws(e,F,F,i&&us(fh(e,F,F,0,0,s,n,w,s,S=[],d,B),B),s,B,d,n,i?S:B):ws(v,F,F,F,[""],B,0,n,B)}}c=h=u=0,m=C=1,w=v="",d=o;break;case 58:d=1+Ee(v),u=f;default:if(m<1){if(k==123)--m;else if(k==125&&m++==0&&Pk()==125)continue}switch(v+=Oi(k),k*m){case 38:C=h>0?1:(v+="\f",-1);break;case 44:if(b>0)break;n[c++]=(Ee(v)-1)*C,C=1;break;case 64:Je()===45&&(v+=Ua(Te())),p=Je(),h=d=Ee(w=v+=Hk(Ss())),k++;break;case 45:f===45&&Ee(v)==2&&(m=0)}}return a}function fh(e,t,r,i,s,a,o,n,l,c,h,d){for(var p=s-1,u=s===0?a:[""],f=bg(u),m=0,y=0,C=0;m<i;++m)for(var b=0,k=li(e,p+1,p=Ik(y=o[m])),w=e;b<f;++b)(w=xg(y>0?u[b]+" "+k:Do(k,/&\f/g,u[b])))&&(l[C++]=w);return On(e,t,r,s===0?mg:n,l,c,h,d)}function Uk(e,t,r,i){return On(e,t,r,$n,Oi(Dk()),li(e,2,-2),0,i)}function mh(e,t,r,i,s){return On(e,t,r,yg,li(e,0,i),li(e,i+1,-1),i,s)}function Ro(e,t){for(var r="",i=0;i<e.length;i++)r+=t(e[i],i,e,t)||"";return r}function jk(e,t,r,i){switch(e.type){case Cg:if(e.children.length)break;case Ek:case $k:case yg:return e.return=e.return||e.value;case $n:return"";case Io:return e.return=e.value+"{"+Ro(e.children,i)+"}";case mg:if(!Ee(e.value=e.props.join(",")))return""}return Ee(r=Ro(e.children,i))?e.return=e.value+"{"+r+"}":""}function Gk(e){var t=bg(e);return function(r,i,s,a){for(var o="",n=0;n<t;n++)o+=e[n](r,i,s,a)||"";return o}}var Tg="c4",Xk=g(e=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),"detector"),Vk=g(async()=>{const{diagram:e}=await Ct(async()=>{const{diagram:t}=await import("./c4Diagram-LMCZKHZV-CeTXI2L5.js");return{diagram:t}},__vite__mapDeps([10,11,5,6]),import.meta.url);return{id:Tg,diagram:e}},"loader"),Zk={id:Tg,detector:Xk,loader:Vk},Qk=Zk,Sg="flowchart",Kk=g((e,t)=>{var r,i;return((r=t==null?void 0:t.flowchart)==null?void 0:r.defaultRenderer)==="dagre-wrapper"||((i=t==null?void 0:t.flowchart)==null?void 0:i.defaultRenderer)==="elk"?!1:/^\s*graph/.test(e)},"detector"),Jk=g(async()=>{const{diagram:e}=await Ct(async()=>{const{diagram:t}=await import("./flowDiagram-23GEKE2U-E3_Lcv6A.js").then(r=>r.f);return{diagram:t}},__vite__mapDeps([12,13,14,5,6,15,11,16]),import.meta.url);return{id:Sg,diagram:e}},"loader"),t1={id:Sg,detector:Kk,loader:Jk},e1=t1,wg="flowchart-v2",r1=g((e,t)=>{var r,i,s;return((r=t==null?void 0:t.flowchart)==null?void 0:r.defaultRenderer)==="dagre-d3"?!1:(((i=t==null?void 0:t.flowchart)==null?void 0:i.defaultRenderer)==="elk"&&(t.layout="elk"),/^\s*graph/.test(e)&&((s=t==null?void 0:t.flowchart)==null?void 0:s.defaultRenderer)==="dagre-wrapper"?!0:/^\s*flowchart/.test(e))},"detector"),i1=g(async()=>{const{diagram:e}=await Ct(async()=>{const{diagram:t}=await import("./flowDiagram-23GEKE2U-E3_Lcv6A.js").then(r=>r.f);return{diagram:t}},__vite__mapDeps([12,13,14,5,6,15,11,16]),import.meta.url);return{id:wg,diagram:e}},"loader"),s1={id:wg,detector:r1,loader:i1},a1=s1,Bg="swimlane",o1=g(e=>/^\s*swimlane-beta\b/.test(e),"detector"),n1=g(async()=>{const{diagram:e}=await Ct(async()=>{const{diagram:t}=await import("./swimlanesDiagram-G3AALYLV-B3xqzED0.js");return{diagram:t}},__vite__mapDeps([17,12,13,14,5,6,15,11,16]),import.meta.url);return{id:Bg,diagram:e}},"loader"),l1={id:Bg,detector:o1,loader:n1},h1=l1,_g="er",c1=g(e=>/^\s*erDiagram/.test(e),"detector"),d1=g(async()=>{const{diagram:e}=await Ct(async()=>{const{diagram:t}=await import("./erDiagram-Q63AITRT-CQGtCq5E.js");return{diagram:t}},__vite__mapDeps([18,14,5,6,15,16]),import.meta.url);return{id:_g,diagram:e}},"loader"),u1={id:_g,detector:c1,loader:d1},p1=u1,vg="gitGraph",g1=g(e=>/^\s*gitGraph/.test(e),"detector"),f1=g(async()=>{const{diagram:e}=await Ct(async()=>{const{diagram:t}=await import("./gitGraphDiagram-IHSO6WYX-D0klOOBk.js");return{diagram:t}},__vite__mapDeps([19,20,21,22,5,6]),import.meta.url);return{id:vg,diagram:e}},"loader"),m1={id:vg,detector:g1,loader:f1},y1=m1,Lg="gantt",C1=g(e=>/^\s*gantt/.test(e),"detector"),x1=g(async()=>{const{diagram:e}=await Ct(async()=>{const{diagram:t}=await import("./ganttDiagram-NO4QXBWP-AwojtMZ1.js");return{diagram:t}},__vite__mapDeps([23,5,6,24,25,26]),import.meta.url);return{id:Lg,diagram:e}},"loader"),b1={id:Lg,detector:C1,loader:x1},k1=b1,Fg="info",T1=g(e=>/^\s*info/.test(e),"detector"),S1=g(async()=>{const{diagram:e}=await Ct(async()=>{const{diagram:t}=await import("./infoDiagram-FWYZ7A6U-2op9tD2c.js");return{diagram:t}},__vite__mapDeps([27,22,5,6]),import.meta.url);return{id:Fg,diagram:e}},"loader"),w1={id:Fg,detector:T1,loader:S1},Ag="pie",B1=g(e=>/^\s*pie/.test(e),"detector"),_1=g(async()=>{const{diagram:e}=await Ct(async()=>{const{diagram:t}=await import("./pieDiagram-ENE6RG2P-CVi3ig0y.js");return{diagram:t}},__vite__mapDeps([28,21,22,5,6,29,30,25]),import.meta.url);return{id:Ag,diagram:e}},"loader"),v1={id:Ag,detector:B1,loader:_1},Eg="quadrantChart",L1=g(e=>/^\s*quadrantChart/.test(e),"detector"),F1=g(async()=>{const{diagram:e}=await Ct(async()=>{const{diagram:t}=await import("./quadrantDiagram-ABIIQ3AL-CPp6gXbB.js");return{diagram:t}},__vite__mapDeps([31,5,6,24,25,26]),import.meta.url);return{id:Eg,diagram:e}},"loader"),A1={id:Eg,detector:L1,loader:F1},E1=A1,Mg="xychart",M1=g(e=>/^\s*xychart(-beta)?/.test(e),"detector"),$1=g(async()=>{const{diagram:e}=await Ct(async()=>{const{diagram:t}=await import("./xychartDiagram-FW5EYKEG-HwKD44hb.js");return{diagram:t}},__vite__mapDeps([32,5,6,25,30,24,26]),import.meta.url);return{id:Mg,diagram:e}},"loader"),O1={id:Mg,detector:M1,loader:$1},I1=O1,$g="requirement",D1=g(e=>/^\s*requirement(Diagram)?/.test(e),"detector"),P1=g(async()=>{const{diagram:e}=await Ct(async()=>{const{diagram:t}=await import("./requirementDiagram-TGXJPOKE-DgmaKLiT.js");return{diagram:t}},__vite__mapDeps([33,14,5,6,15]),import.meta.url);return{id:$g,diagram:e}},"loader"),R1={id:$g,detector:D1,loader:P1},q1=R1,Og="sequence",N1=g(e=>/^\s*sequenceDiagram/.test(e),"detector"),W1=g(async()=>{const{diagram:e}=await Ct(async()=>{const{diagram:t}=await import("./sequenceDiagram-DBY2YBRQ-3AycEqxZ.js");return{diagram:t}},__vite__mapDeps([34,20,11,5,6]),import.meta.url);return{id:Og,diagram:e}},"loader"),z1={id:Og,detector:N1,loader:W1},H1=z1,Ig="class",Y1=g((e,t)=>{var r;return((r=t==null?void 0:t.class)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!1:/^\s*classDiagram/.test(e)},"detector"),U1=g(async()=>{const{diagram:e}=await Ct(async()=>{const{diagram:t}=await import("./classDiagram-OUVF2IWQ-C9iVyfdZ.js");return{diagram:t}},__vite__mapDeps([35,36,13,14,5,6,15,11]),import.meta.url);return{id:Ig,diagram:e}},"loader"),j1={id:Ig,detector:Y1,loader:U1},G1=j1,Dg="classDiagram",X1=g((e,t)=>{var r;return/^\s*classDiagram/.test(e)&&((r=t==null?void 0:t.class)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(e)},"detector"),V1=g(async()=>{const{diagram:e}=await Ct(async()=>{const{diagram:t}=await import("./classDiagram-v2-EOCWNBFH-C9iVyfdZ.js");return{diagram:t}},__vite__mapDeps([37,36,13,14,5,6,15,11]),import.meta.url);return{id:Dg,diagram:e}},"loader"),Z1={id:Dg,detector:X1,loader:V1},Q1=Z1,Pg="state",K1=g((e,t)=>{var r;return((r=t==null?void 0:t.state)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!1:/^\s*stateDiagram/.test(e)},"detector"),J1=g(async()=>{const{diagram:e}=await Ct(async()=>{const{diagram:t}=await import("./stateDiagram-2N3HPSRC-DaBzZNwx.js");return{diagram:t}},__vite__mapDeps([38,39,14,5,6,15,11,2,4,3]),import.meta.url);return{id:Pg,diagram:e}},"loader"),t2={id:Pg,detector:K1,loader:J1},e2=t2,Rg="stateDiagram",r2=g((e,t)=>{var r;return!!(/^\s*stateDiagram-v2/.test(e)||/^\s*stateDiagram/.test(e)&&((r=t==null?void 0:t.state)==null?void 0:r.defaultRenderer)==="dagre-wrapper")},"detector"),i2=g(async()=>{const{diagram:e}=await Ct(async()=>{const{diagram:t}=await import("./stateDiagram-v2-6OUMAXLB-xJOnXuvC.js");return{diagram:t}},__vite__mapDeps([40,39,14,5,6,15,11]),import.meta.url);return{id:Rg,diagram:e}},"loader"),s2={id:Rg,detector:r2,loader:i2},a2=s2,qg="journey",o2=g(e=>/^\s*journey/.test(e),"detector"),n2=g(async()=>{const{diagram:e}=await Ct(async()=>{const{diagram:t}=await import("./journeyDiagram-5HDEW3XC-CZ1oYiAr.js");return{diagram:t}},__vite__mapDeps([41,13,11,5,6,29]),import.meta.url);return{id:qg,diagram:e}},"loader"),l2={id:qg,detector:o2,loader:n2},h2=l2,c2=g((e,t,r)=>{H.debug(`rendering svg for syntax error
304
+ `);const i=sC(t),s=i.append("g");i.attr("viewBox","0 0 2412 512"),Hh(i,100,512,!0),s.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),s.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),s.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),s.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),s.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),s.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),s.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in text"),s.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${r}`)},"draw"),Ng={draw:c2},d2=Ng,u2={db:{},renderer:Ng,parser:{parse:g(()=>{},"parse")}},p2=u2,Wg="flowchart-elk",g2=g((e,t={})=>{var r;return/^\s*flowchart-elk/.test(e)||/^\s*(flowchart|graph)/.test(e)&&((r=t==null?void 0:t.flowchart)==null?void 0:r.defaultRenderer)==="elk"?(t.layout="elk",!0):!1},"detector"),f2=g(async()=>{const{diagram:e}=await Ct(async()=>{const{diagram:t}=await import("./flowDiagram-23GEKE2U-E3_Lcv6A.js").then(r=>r.f);return{diagram:t}},__vite__mapDeps([12,13,14,5,6,15,11,16]),import.meta.url);return{id:Wg,diagram:e}},"loader"),m2={id:Wg,detector:g2,loader:f2},y2=m2,zg="timeline",C2=g(e=>/^\s*timeline/.test(e),"detector"),x2=g(async()=>{const{diagram:e}=await Ct(async()=>{const{diagram:t}=await import("./timeline-definition-FHXFAJF6-Msxd070e.js");return{diagram:t}},__vite__mapDeps([42,5,6,29]),import.meta.url);return{id:zg,diagram:e}},"loader"),b2={id:zg,detector:C2,loader:x2},k2=b2,Hg="mindmap",T2=g(e=>/^\s*mindmap/.test(e),"detector"),S2=g(async()=>{const{diagram:e}=await Ct(async()=>{const{diagram:t}=await import("./mindmap-definition-LN4V7U3C-BB4SGbrE.js");return{diagram:t}},__vite__mapDeps([43,14,5,6,15]),import.meta.url);return{id:Hg,diagram:e}},"loader"),w2={id:Hg,detector:T2,loader:S2},B2=w2,Yg="kanban",_2=g(e=>/^\s*kanban/.test(e),"detector"),v2=g(async()=>{const{diagram:e}=await Ct(async()=>{const{diagram:t}=await import("./kanban-definition-HUTT4EX6-B-XWcB9M.js");return{diagram:t}},__vite__mapDeps([44,13,5,6]),import.meta.url);return{id:Yg,diagram:e}},"loader"),L2={id:Yg,detector:_2,loader:v2},F2=L2,Ug="sankey",A2=g(e=>/^\s*sankey(-beta)?/.test(e),"detector"),E2=g(async()=>{const{diagram:e}=await Ct(async()=>{const{diagram:t}=await import("./sankeyDiagram-HTMAVEWB-DHGaI0hQ.js");return{diagram:t}},__vite__mapDeps([45,5,6,30,25]),import.meta.url);return{id:Ug,diagram:e}},"loader"),M2={id:Ug,detector:A2,loader:E2},$2=M2,jg="packet",O2=g(e=>/^\s*packet(-beta)?/.test(e),"detector"),I2=g(async()=>{const{diagram:e}=await Ct(async()=>{const{diagram:t}=await import("./diagram-NH7WQ7WH-xuvv_D9N.js");return{diagram:t}},__vite__mapDeps([46,21,22,5,6]),import.meta.url);return{id:jg,diagram:e}},"loader"),D2={id:jg,detector:O2,loader:I2},Gg="radar",P2=g(e=>/^\s*radar-beta/.test(e),"detector"),R2=g(async()=>{const{diagram:e}=await Ct(async()=>{const{diagram:t}=await import("./diagram-WEI45ONY-CD_QL4nf.js");return{diagram:t}},__vite__mapDeps([47,21,22,5,6]),import.meta.url);return{id:Gg,diagram:e}},"loader"),q2={id:Gg,detector:P2,loader:R2},Xg="block",N2=g(e=>/^\s*block(-beta)?/.test(e),"detector"),W2=g(async()=>{const{diagram:e}=await Ct(async()=>{const{diagram:t}=await import("./blockDiagram-677ZJIJ3-CvyOVrtD.js");return{diagram:t}},__vite__mapDeps([48,13,5,6,2,16]),import.meta.url);return{id:Xg,diagram:e}},"loader"),z2={id:Xg,detector:N2,loader:W2},H2=z2,Vg="treeView",Y2=g(e=>/^\s*treeView-beta/.test(e),"detector"),U2=g(async()=>{const{diagram:e}=await Ct(async()=>{const{diagram:t}=await import("./diagram-OA4YK3LP-Bio-u38F.js");return{diagram:t}},__vite__mapDeps([49,20,21,22,5,6]),import.meta.url);return{id:Vg,diagram:e}},"loader"),j2={id:Vg,detector:Y2,loader:U2},G2=j2,Zg="architecture",X2=g(e=>/^\s*architecture/.test(e),"detector"),V2=g(async()=>{const{diagram:e}=await Ct(async()=>{const{diagram:t}=await import("./architectureDiagram-ZJ3FMSHR-CVVsX69f.js");return{diagram:t}},__vite__mapDeps([50,21,22,5,6,9]),import.meta.url);return{id:Zg,diagram:e}},"loader"),Z2={id:Zg,detector:X2,loader:V2},Q2=Z2,Qg="eventmodeling",K2=g(e=>/^\s*eventmodeling/.test(e),"detector"),J2=g(async()=>{const{diagram:e}=await Ct(async()=>{const{diagram:t}=await import("./diagram-FQU43EPY-Cay_5WYD.js");return{diagram:t}},__vite__mapDeps([51,21,22,5,6]),import.meta.url);return{id:Qg,diagram:e}},"loader"),tT={id:Qg,detector:K2,loader:J2},eT=tT,Kg="ishikawa",rT=g(e=>/^\s*ishikawa(-beta)?\b/i.test(e),"detector"),iT=g(async()=>{const{diagram:e}=await Ct(async()=>{const{diagram:t}=await import("./ishikawaDiagram-FXEZZL3T-B1UsYLso.js");return{diagram:t}},__vite__mapDeps([52,5,6]),import.meta.url);return{id:Kg,diagram:e}},"loader"),sT={id:Kg,detector:rT,loader:iT},Jg="venn",aT=g(e=>/^\s*venn-beta/.test(e),"detector"),oT=g(async()=>{const{diagram:e}=await Ct(async()=>{const{diagram:t}=await import("./vennDiagram-L72KCM5P-W9VDq1l8.js");return{diagram:t}},__vite__mapDeps([53,5,6]),import.meta.url);return{id:Jg,diagram:e}},"loader"),nT={id:Jg,detector:aT,loader:oT},lT=nT,tf="treemap",hT=g(e=>/^\s*treemap/.test(e),"detector"),cT=g(async()=>{const{diagram:e}=await Ct(async()=>{const{diagram:t}=await import("./diagram-G47NLZAW-DT1H2wTP.js");return{diagram:t}},__vite__mapDeps([54,21,15,22,5,6,26,30,25]),import.meta.url);return{id:tf,diagram:e}},"loader"),dT={id:tf,detector:hT,loader:cT},ef="wardley",uT=g(e=>/^\s*wardley-beta/i.test(e),"detector"),pT=g(async()=>{const{diagram:e}=await Ct(async()=>{const{diagram:t}=await import("./wardleyDiagram-EHGQE667-DfDvmnIe.js");return{diagram:t}},__vite__mapDeps([55,21,22,5,6]),import.meta.url);return{id:ef,diagram:e}},"loader"),gT={id:ef,detector:uT,loader:pT},fT=gT,rf="cynefin",mT=g(e=>/^\s*cynefin-beta(?:[\s:]|$)/.test(e),"detector"),yT=g(async()=>{const{diagram:e}=await Ct(async()=>{const{diagram:t}=await import("./cynefinDiagram-TSTJHNR4-_O9mLQTK.js");return{diagram:t}},__vite__mapDeps([56,21,22,5,6]),import.meta.url);return{id:rf,diagram:e}},"loader"),CT={id:rf,detector:mT,loader:yT},sf="railroad",xT=g(e=>/^\s*railroad-beta/i.test(e),"detector"),bT=g(async()=>{const{diagram:e}=await Ct(async()=>{const{diagram:t}=await import("./railroadDiagram-RFXS5EU6-BCILT-8k.js");return{diagram:t}},__vite__mapDeps([57,58,21,5,6,22]),import.meta.url);return{id:sf,diagram:e}},"loader"),kT={id:sf,detector:xT,loader:bT},af="railroadEbnf",TT=g(e=>/^\s*railroad-ebnf-beta/i.test(e),"detector"),ST=g(async()=>{const{diagram:e}=await Ct(async()=>{const{diagram:t}=await import("./ebnfDiagram-CCIWWBDH-CkGukNGk.js");return{diagram:t}},__vite__mapDeps([59,58,21,5,6,22]),import.meta.url);return{id:af,diagram:e}},"loader"),wT={id:af,detector:TT,loader:ST},of="railroadAbnf",BT=g(e=>/^\s*railroad-abnf-beta/i.test(e),"detector"),_T=g(async()=>{const{diagram:e}=await Ct(async()=>{const{diagram:t}=await import("./abnfDiagram-VRR7QNED-DxJn5x30.js");return{diagram:t}},__vite__mapDeps([60,58,21,5,6,22]),import.meta.url);return{id:of,diagram:e}},"loader"),vT={id:of,detector:BT,loader:_T},nf="railroadPeg",LT=g(e=>/^\s*railroad-peg-beta/i.test(e),"detector"),FT=g(async()=>{const{diagram:e}=await Ct(async()=>{const{diagram:t}=await import("./pegDiagram-2B236MQR-3keJbrGj.js");return{diagram:t}},__vite__mapDeps([61,58,21,5,6,22]),import.meta.url);return{id:nf,diagram:e}},"loader"),AT={id:nf,detector:LT,loader:FT},yh=!1,ca=g(()=>{yh||(yh=!0,Fs("error",p2,e=>e.toLowerCase().trim()==="error"),Fs("---",{db:{clear:g(()=>{},"clear")},styles:{},renderer:{draw:g(()=>{},"draw")},parser:{parse:g(()=>{throw new Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks")},"parse")},init:g(()=>null,"init")},e=>e.toLowerCase().trimStart().startsWith("---")),Za(y2,B2,Q2),Za(Qk,F2,Q1,G1,p1,k1,w1,v1,q1,H1,h1,a1,e1,k2,y1,a2,e2,h2,E1,$2,D2,I1,H2,eT,G2,q2,sT,dT,kT,wT,vT,AT,lT,fT,CT))},"addDiagrams"),ET=g(async()=>{H.debug("Loading registered diagrams");const t=(await Promise.allSettled(Object.entries(xr).map(async([r,{detector:i,loader:s}])=>{if(s)try{to(r)}catch{try{const{diagram:a,id:o}=await s();Fs(o,a,i)}catch(a){throw H.error(`Failed to load external diagram with key ${r}. Removing from detectors.`),delete xr[r],a}}}))).filter(r=>r.status==="rejected");if(t.length>0){H.error(`Failed to load ${t.length} external diagrams`);for(const r of t)H.error(r);throw new Error(`Failed to load ${t.length} external diagrams`)}},"loadRegisteredDiagrams"),MT="graphics-document document";function lf(e,t){e.attr("role",MT),t!==""&&e.attr("aria-roledescription",t)}g(lf,"setA11yDiagramInfo");function hf(e,t,r,i){if(e.insert!==void 0){if(r){const s=`chart-desc-${i}`;e.attr("aria-describedby",s),e.insert("desc",":first-child").attr("id",s).text(r)}if(t){const s=`chart-title-${i}`;e.attr("aria-labelledby",s),e.insert("title",":first-child").attr("id",s).text(t)}}}g(hf,"addSVGa11yTitleDescription");var yr,qo=(yr=class{constructor(t,r,i,s,a){this.type=t,this.text=r,this.db=i,this.parser=s,this.renderer=a}static async fromText(t,r={}){var c,h;const i=Mt(),s=zo(t,i);t=cx(t)+`
305
+ `;try{to(s)}catch{const d=uy(s);if(!d)throw new Ph(`Diagram ${s} not found.`);const{id:p,diagram:u}=await d();Fs(p,u)}const{db:a,parser:o,renderer:n,init:l}=to(s);return o.parser&&(o.parser.yy=a),(c=a.clear)==null||c.call(a),l==null||l(i),r.title&&((h=a.setDiagramTitle)==null||h.call(a,r.title)),await o.parse(t),new yr(s,t,a,o,n)}async render(t,r){await this.renderer.draw(this.text,t,r,this)}getParser(){return this.parser}getType(){return this.type}},g(yr,"Diagram"),yr),Ch=[],$T=g(()=>{Ch.forEach(e=>{e()}),Ch=[]},"attachFunctions"),OT=g(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function cf(e){const t=e.match(Dh);if(!t)return{text:e,metadata:{}};const r=t[1],i=r?t[2].split(`
306
+ `).map(o=>o.startsWith(r)?o.slice(r.length):o).join(`
307
+ `):t[2];let s=d0(i,{schema:c0})??{};s=typeof s=="object"&&!Array.isArray(s)?s:{};const a={};return s.displayMode&&(a.displayMode=s.displayMode.toString()),s.title&&(a.title=s.title.toString()),s.config&&(a.config=s.config),{text:e.slice(t[0].length),metadata:a}}g(cf,"extractFrontMatter");var IT=g(e=>e.replace(/\r\n?/g,`
308
+ `).replace(/<(\w+)([^>]*)>/g,(t,r,i)=>"<"+r+i.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),DT=g(e=>{const{text:t,metadata:r}=cf(e),{displayMode:i,title:s,config:a={}}=r;return i&&(a.gantt||(a.gantt={}),a.gantt.displayMode=i),{title:s,config:a,text:t}},"processFrontmatter"),PT=g(e=>{const t=be.detectInit(e)??{},r=be.detectDirective(e,"wrap");return Array.isArray(r)?t.wrap=r.some(({type:i})=>i==="wrap"):(r==null?void 0:r.type)==="wrap"&&(t.wrap=!0),{text:Q0(e),directive:t}},"processDirectives");function In(e){const t=IT(e),r=DT(t),i=PT(r.text),s=yn(r.config,i.directive);return e=OT(i.text),{code:e,title:r.title,config:s}}g(In,"preprocessDiagram");function df(e){const t=new TextEncoder().encode(e),r=Array.from(t,i=>String.fromCodePoint(i)).join("");return btoa(r)}g(df,"toBase64");var RT=5e4,qT="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",NT="sandbox",WT="loose",zT="http://www.w3.org/2000/svg",HT="http://www.w3.org/1999/xlink",YT="http://www.w3.org/1999/xhtml",UT="100%",jT="100%",GT="border:0;margin:0;",XT="margin:0",VT="allow-top-navigation-by-user-activation allow-popups",ZT='The "iframe" tag is not supported by your browser.',QT=["foreignobject"],KT=["dominant-baseline"];function Dn(e){const t=In(e);return vs(),hy(t.config??{}),t}g(Dn,"processAndSetConfigs");async function uf(e,t){ca();try{const{code:r,config:i}=Dn(e);return{diagramType:(await gf(r)).type,config:i}}catch(r){if(t!=null&&t.suppressErrors)return!1;throw r}}g(uf,"parse");var xh=g((e,t,r=[])=>{const i=Ah(`{ ${r.join(" !important; ")} !important; }`);return`.${e} ${t} ${i}`},"cssImportantStyles"),JT=g((e,t=new Map)=>{const r=new CSSStyleSheet;if(e.fontFamily!==void 0&&r.insertRule(`:root { --mermaid-font-family: ${e.fontFamily}}`,r.cssRules.length),e.altFontFamily!==void 0&&r.insertRule(`:root { --mermaid-alt-font-family: ${e.altFontFamily}}`,r.cssRules.length),t instanceof Map){const n=se(e)?["> *","span"]:["rect","polygon","ellipse","circle","path"];t.forEach(l=>{Dl(l.styles)||n.forEach(c=>{r.insertRule(xh(l.id,c,l.styles),r.cssRules.length)}),Dl(l.textStyles)||r.insertRule(xh(l.id,"tspan",((l==null?void 0:l.textStyles)||[]).map(c=>c.replace("color","fill"))),r.cssRules.length)})}let i="";if(e.themeCSS!==void 0)if(typeof r.replaceSync=="function"){const s=new CSSStyleSheet;s.replaceSync(e.themeCSS),i=Ja(s)+`
309
+ `}else i+=`${e.themeCSS}
310
+ `;return i+Ja(r)},"createCssStyles"),tS=g((e,t)=>Ro(Yk(`${e}{${t}}`),Gk([g(function(i,s,a,o){if(i.type==="rule"&&Array.isArray(i.props)){if(i.parent&&i.parent.type===Io)return;i.props=i.props.map(n=>n.startsWith(e)?n:`${e} ${n}`)}else i.type.startsWith("@")&&([...[Ak,Mk,Cg,Ok,"@container","@starting-style"],Io].includes(i.type)||(H.warn(`Removing unsupported at-rule ${i.type} from CSS`),i.type=$n))},"addNamespace"),jk])),"compileCSS"),eS=g((e,t,r,i)=>{const s=JT(e,r),a=Ay(t,s,{...e.themeVariables,theme:e.theme,look:e.look},i);return tS(i,a)},"createUserStyles"),rS=g((e="",t,r)=>{let i=e;return!r&&!t&&(i=i.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),i=kr(i),i=i.replace(/<br>/g,"<br/>"),i},"cleanUpSvgCode"),iS=g((e="",t)=>{var s,a;const r=(a=(s=t==null?void 0:t.viewBox)==null?void 0:s.baseVal)!=null&&a.height?t.viewBox.baseVal.height+"px":jT,i=df(`<body style="${XT}">${e}</body>`);return`<iframe style="width:${UT};height:${r};${GT}" src="data:text/html;charset=UTF-8;base64,${i}" sandbox="${VT}">
311
+ ${ZT}
312
+ </iframe>`},"putIntoIFrame"),bh=g((e,t,r,i,s)=>{const a=e.append("div");a.attr("id",r),i&&a.attr("style",i);const o=a.append("svg").attr("id",t).attr("width","100%").attr("xmlns",zT);return s&&o.attr("xmlns:xlink",s),o.append("g"),e},"appendDivSvgG");function No(e,t){return e.append("iframe").attr("id",t).attr("style","width: 100%; height: 100%;").attr("sandbox","")}g(No,"sandboxedIframe");var sS=g((e,t,r,i)=>{var s,a,o;(s=e.getElementById(t))==null||s.remove(),(a=e.getElementById(r))==null||a.remove(),(o=e.getElementById(i))==null||o.remove()},"removeExistingElements"),aS=g(async function(e,t,r){var U,W,O,A,_,$;ca();const i=Dn(t);t=i.code;const s=Mt();H.debug(s),t.length>((s==null?void 0:s.maxTextSize)??RT)&&(t=qT);const a=`#${e}`,o="i"+e,n="#"+o,l="d"+e,c="#"+l,h=g(()=>{const N=xt(p?n:c).node();N&&"remove"in N&&N.remove()},"removeTempElements");let d=xt(document.body);const p=s.securityLevel===NT,u=s.securityLevel===WT,f=s.fontFamily;if(r!==void 0){if(r&&(r.innerHTML=""),p){const E=No(xt(r),o);d=xt(E.nodes()[0].contentDocument.body),d.node().style.margin="0"}else d=xt(r);bh(d,e,l,`font-family: ${f}`,HT)}else{if(sS(document,e,l,o),p){const E=No(xt(document.body),o);d=xt(E.nodes()[0].contentDocument.body),d.node().style.margin="0"}else d=xt("body");bh(d,e,l)}let m,y;try{m=await qo.fromText(t,{title:i.title})}catch(E){if(s.suppressErrorRendering)throw h(),E;m=await qo.fromText("error"),y=E}const C=d.select(c).node(),b=m.type,k=C.firstChild,w=k.firstChild,S=(W=(U=m.renderer).getClasses)==null?void 0:W.call(U,t,m),B=eS(s,b,S,a),F=document.createElement("style");F.innerHTML=B,k.insertBefore(F,w);try{await m.renderer.draw(t,e,"11.16.0",m)}catch(E){throw s.suppressErrorRendering?h():d2.draw(t,e,"11.16.0"),E}const v=d.select(`${c} svg`),z=(A=(O=m.db).getAccTitle)==null?void 0:A.call(O),q=($=(_=m.db).getAccDescription)==null?void 0:$.call(_);ff(b,v,z,q),d.select(`[id="${e}"]`).selectAll("foreignobject > *").attr("xmlns",YT);let M=d.select(c).node().innerHTML;if(H.debug("config.arrowMarkerAbsolute",s.arrowMarkerAbsolute),M=rS(M,p,De(s.arrowMarkerAbsolute)),p){const E=d.select(c+" svg").node();M=iS(M,E)}else u||(M=si.sanitize(M,{ADD_TAGS:QT,ADD_ATTR:KT,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));if($T(),y)throw y;return h(),{diagramType:b,svg:M,bindFunctions:m.db.bindFunctions}},"render");function pf(e={}){var i;const t=qt({},e);t!=null&&t.fontFamily&&!((i=t.themeVariables)!=null&&i.fontFamily)&&(t.themeVariables||(t.themeVariables={}),t.themeVariables.fontFamily=t.fontFamily),ny(t),t!=null&&t.theme&&t.theme in We?t.themeVariables=We[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=We.default.getThemeVariables(t.themeVariables));const r=typeof t=="object"?oy(t):Eh();Wo(r.logLevel),ca()}g(pf,"initialize");var gf=g((e,t={})=>{const{code:r}=In(e);return qo.fromText(r,t)},"getDiagramFromText");function ff(e,t,r,i){lf(t,e),hf(t,r,i,t.attr("id"))}g(ff,"addA11yInfo");var Sr=Object.freeze({render:aS,parse:uf,getDiagramFromText:gf,initialize:pf,getConfig:Mt,setConfig:Mh,getSiteConfig:Eh,updateSiteConfig:ly,reset:g(()=>{vs()},"reset"),globalReset:g(()=>{vs(ai)},"globalReset"),defaultConfig:ai});Wo(Mt().logLevel);vs(Mt());var oS=g((e,t,r)=>{H.warn(e),mn(e)?(r&&r(e.str,e.hash),t.push({...e,message:e.str,error:e})):(r&&r(e),e instanceof Error&&t.push({str:e.message,message:e.message,hash:e.name,error:e}))},"handleError"),mf=g(async function(e={querySelector:".mermaid"}){try{await nS(e)}catch(t){if(mn(t)&&H.error(t.str),de.parseError&&de.parseError(t),!e.suppressErrors)throw H.error("Use the suppressErrors option to suppress these errors"),t}},"run"),nS=g(async function({postRenderCallback:e,querySelector:t,nodes:r}={querySelector:".mermaid"}){const i=Sr.getConfig();H.debug(`${e?"":"No "}Callback function found`);let s;if(r)s=r;else if(t)s=document.querySelectorAll(t);else throw new Error("Nodes and querySelector are both undefined");H.debug(`Found ${s.length} diagrams`),(i==null?void 0:i.startOnLoad)!==void 0&&(H.debug("Start On Load: "+(i==null?void 0:i.startOnLoad)),Sr.updateSiteConfig({startOnLoad:i==null?void 0:i.startOnLoad}));const a=new be.InitIDGenerator(i.deterministicIds,i.deterministicIDSeed);let o;const n=[];for(const l of Array.from(s)){if(H.info("Rendering diagram: "+l.id),l.getAttribute("data-processed"))continue;l.setAttribute("data-processed","true");const c=`mermaid-${a.next()}`;o=l.innerHTML,o=Bu(be.entityDecode(o)).trim().replace(/<br\s*\/?>/gi,"<br/>");const h=be.detectInit(o);h&&H.debug("Detected early reinit: ",h);try{const{svg:d,bindFunctions:p}=await bf(c,o,l);l.innerHTML=d,e&&await e(c),p&&p(l)}catch(d){oS(d,n,de.parseError)}}if(n.length>0)throw n[0]},"runThrowsErrors"),yf=g(function(e){Sr.initialize(e)},"initialize"),lS=g(async function(e,t,r){H.warn("mermaid.init is deprecated. Please use run instead."),e&&yf(e);const i={postRenderCallback:r,querySelector:".mermaid"};typeof t=="string"?i.querySelector=t:t&&(t instanceof HTMLElement?i.nodes=[t]:i.nodes=t),await mf(i)},"init"),hS=g(async(e,{lazyLoad:t=!0}={})=>{ca(),Za(...e),t===!1&&await ET()},"registerExternalDiagrams"),Cf=g(function(){if(de.startOnLoad){const{startOnLoad:e}=Sr.getConfig();e&&de.run().catch(t=>H.error("Mermaid failed to initialize",t))}},"contentLoaded");typeof document<"u"&&window.addEventListener("load",Cf,!1);var cS=g(function(e){de.parseError=e},"setParseErrorHandler"),Xs=[],ja=!1,xf=g(async()=>{if(!ja){for(ja=!0;Xs.length>0;){const e=Xs.shift();if(e)try{await e()}catch(t){H.error("Error executing queue",t)}}ja=!1}},"executeQueue"),dS=g(async(e,t)=>new Promise((r,i)=>{const s=g(()=>new Promise((a,o)=>{Sr.parse(e,t).then(n=>{a(n),r(n)},n=>{var l;H.error("Error parsing",n),(l=de.parseError)==null||l.call(de,n),o(n),i(n)})}),"performCall");Xs.push(s),xf().catch(i)}),"parse"),bf=g((e,t,r)=>new Promise((i,s)=>{const a=g(()=>new Promise((o,n)=>{Sr.render(e,t,r).then(l=>{o(l),i(l)},l=>{var c;H.error("Error parsing",l),(c=de.parseError)==null||c.call(de,l),n(l),s(l)})}),"performCall");Xs.push(a),xf().catch(s)}),"render"),uS=g(()=>Object.keys(xr).map(e=>({id:e})),"getRegisteredDiagramsMetadata"),de={startOnLoad:!0,mermaidAPI:Sr,parse:dS,render:bf,init:lS,run:mf,registerExternalDiagrams:hS,registerLayoutLoaders:fg,initialize:yf,parseError:void 0,contentLoaded:Cf,setParseErrorHandler:cS,detectType:zo,registerIconPacks:ux,getRegisteredDiagramsMetadata:uS},pS=de;/*! Check if previously processed *//*!
313
+ * Wait for document loaded before starting the execution
314
+ */const HS=Object.freeze(Object.defineProperty({__proto__:null,default:pS},Symbol.toStringTag,{value:"Module"}));export{wl as $,Fh as A,rx as B,sC as C,Nm as D,CS as E,d0 as F,Ii as G,yS as H,ea as I,c0 as J,xy as K,zh as L,si as M,kl as N,Vy as O,io as P,Hi as Q,Me as R,Uy as S,Xo as T,ft as U,TS as V,BS as W,$r as X,Bl as Y,G0 as Z,g as _,$y as a,ki as a$,vS as a0,_S as a1,wS as a2,bS as a3,kS as a4,SS as a5,FS as a6,LS as a7,ex as a8,we as a9,ln as aA,xs as aB,E0 as aC,A0 as aD,F0 as aE,L0 as aF,b0 as aG,Qd as aH,S0 as aI,x0 as aJ,_0 as aK,Kd as aL,T0 as aM,O0 as aN,$0 as aO,M0 as aP,D0 as aQ,I0 as aR,k0 as aS,Jd as aT,v0 as aU,B0 as aV,w0 as aW,tu as aX,Yb as aY,se as aZ,Pe as a_,P as aa,R as ab,vy as ac,Yh as ad,Sb as ae,dg as af,qS as ag,Gi as ah,ux as ai,fn as aj,tt as ak,vk as al,RS as am,NS as an,DS as ao,st as ap,PS as aq,Cn as ar,rk as as,Zb as at,Vb as au,Gs as av,jt as aw,Qt as ax,Qx as ay,cn as az,My as b,nu as b0,kr as b1,du as b2,Sh as b3,jy as b4,mS as b5,dx as b6,xS as b7,rt as b8,Vd as b9,Vf as ba,Hb as bb,HS as bc,wt as c,Hh as d,qt as e,He as f,Iy as g,Se as h,y0 as i,Yi as j,hu as k,H as l,Dy as m,Py as n,Ey as o,AS as p,Uf as q,tr as r,Oy as s,zS as t,WS as u,be as v,ax as w,Mt as x,qy as y,yn as z};