@marimo-team/frontend 0.9.15-dev7 → 0.9.15-dev9

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 (81) hide show
  1. package/dist/assets/{ConnectedDataExplorerComponent-p1uhaLu5.js → ConnectedDataExplorerComponent-CiAnUxcK.js} +1 -1
  2. package/dist/assets/{VegaLite-D30S6ZCi.js → VegaLite-BWUTy8V0.js} +1 -1
  3. package/dist/assets/{_baseEach-BMye5Nwh.js → _baseEach-DnNcEHlH.js} +1 -1
  4. package/dist/assets/_baseMap-BusrJNE7.js +1 -0
  5. package/dist/assets/{_baseUniq-DAxdF8Pw.js → _baseUniq-Cj00cPHg.js} +1 -1
  6. package/dist/assets/{any-language-editor-DZ_JhVtg.js → any-language-editor-BdvlWB49.js} +1 -1
  7. package/dist/assets/{architectureDiagram-IFBEXTG3-BUUyUyY4.js → architectureDiagram-IFBEXTG3-BVBQN81H.js} +1 -1
  8. package/dist/assets/{blockDiagram-TCMKQVZ6-C8hwVnTX.js → blockDiagram-TCMKQVZ6-Dee8Jr2A.js} +1 -1
  9. package/dist/assets/{c4Diagram-ZCSEYPFN-B6hKiRsz.js → c4Diagram-ZCSEYPFN-2a9TNS5c.js} +1 -1
  10. package/dist/assets/channel-CZnwPu9M.js +1 -0
  11. package/dist/assets/{chunk-4LC2V6XN-C3CCiOAa.js → chunk-4LC2V6XN-BmzjFbuj.js} +1 -1
  12. package/dist/assets/{chunk-5RIWM3LS-DFfFzycc.js → chunk-5RIWM3LS-DJZY7FZP.js} +1 -1
  13. package/dist/assets/{chunk-6JKP7OK7-BeVRKhip.js → chunk-6JKP7OK7-BD9KWPuh.js} +1 -1
  14. package/dist/assets/{chunk-NGC4727B-BOHRbEG_.js → chunk-NGC4727B-eGAL6ua8.js} +1 -1
  15. package/dist/assets/{chunk-REEJFE46-BnpA03VW.js → chunk-REEJFE46-BWQvoG1j.js} +1 -1
  16. package/dist/assets/{chunk-RYO7GUH3-Q1dXGX63.js → chunk-RYO7GUH3-Cnos49mw.js} +1 -1
  17. package/dist/assets/{chunk-V35ELUW5-Bx4QWhcn.js → chunk-V35ELUW5-h9ByFxzD.js} +1 -1
  18. package/dist/assets/{classDiagram-Q73GJZWF-DAdn1Yxt.js → classDiagram-Q73GJZWF-Dg1hLiwH.js} +1 -1
  19. package/dist/assets/{classDiagram-v2-C6QPLPW4-DnOh94Ik.js → classDiagram-v2-C6QPLPW4-C_-2E8CJ.js} +1 -1
  20. package/dist/assets/clone-DV35tsP8.js +1 -0
  21. package/dist/assets/{dagre-7KT5K2WU-kcp6m67r.js → dagre-7KT5K2WU-ygScfUFf.js} +1 -1
  22. package/dist/assets/{data-editor-CqM3d1bn.js → data-editor-B3nCwaRt.js} +1 -1
  23. package/dist/assets/{diagram-AVGMFHF7-Qk4KB2WS.js → diagram-AVGMFHF7-Dfq1cYt1.js} +1 -1
  24. package/dist/assets/{edit-page-CbdUq7F3.js → edit-page-Cgq7Bm2M.js} +3 -3
  25. package/dist/assets/{erDiagram-DKC2X5TE-CmqYNL45.js → erDiagram-DKC2X5TE-CqJyBonf.js} +1 -1
  26. package/dist/assets/{flowDiagram-NWEUNK3L-Cts11xJ5.js → flowDiagram-NWEUNK3L-DQXKt_1R.js} +1 -1
  27. package/dist/assets/{ganttDiagram-HLVPPPRE-CICB85_m.js → ganttDiagram-HLVPPPRE-BJe5-mEJ.js} +1 -1
  28. package/dist/assets/{gitGraph-YCYPL57B-DyaQXeFu.js → gitGraph-YCYPL57B-DKmr6H_9.js} +1 -1
  29. package/dist/assets/{gitGraphDiagram-JPZ3KUXI-B62QkoYb.js → gitGraphDiagram-JPZ3KUXI-B856k94f.js} +1 -1
  30. package/dist/assets/{graph-aLbp0MJ5.js → graph-CWjU_jY_.js} +1 -1
  31. package/dist/assets/{home-page-Bw8sEVuj.js → home-page-CsmcrAlk.js} +1 -1
  32. package/dist/assets/{index-CufiiwRr.js → index-AZ7VsUlt.js} +1 -1
  33. package/dist/assets/{index-C_kqgOXb.js → index-BGCkofcH.js} +1 -1
  34. package/dist/assets/{index-tRzawE5e.js → index-BgxFV15d.js} +1 -1
  35. package/dist/assets/{index-CdNgRkVT.js → index-BhMcUAbL.js} +1 -1
  36. package/dist/assets/{index-CaKmvdEq.js → index-Bivrg4Zg.js} +1 -1
  37. package/dist/assets/{index-Bw_Rh7go.js → index-BqiPwSoH.js} +1 -1
  38. package/dist/assets/{index-DwHRjKyo.js → index-CCo_gMO-.js} +1 -1
  39. package/dist/assets/{index-JjcyCuGv.js → index-CdTvDbtn.js} +1 -1
  40. package/dist/assets/{index-CV-uY42I.js → index-Ce_EoHVg.js} +1 -1
  41. package/dist/assets/{index-Br4oqDgh.js → index-CxK2c3uY.js} +1 -1
  42. package/dist/assets/{index-Bcta8bk3.js → index-D0sovBhz.js} +6 -6
  43. package/dist/assets/{index-6jhjDpD6.js → index-DGrrxk51.js} +1 -1
  44. package/dist/assets/{index-D8ec0kQd.js → index-DX0TDQ9o.js} +1 -1
  45. package/dist/assets/{index-CSy7Kxz1.js → index-DzLbZK7Z.js} +1 -1
  46. package/dist/assets/{index-Bkwu2tTQ.js → index-Etnu3rcP.js} +1 -1
  47. package/dist/assets/{index-BQj2RWzc.js → index-HCrjEoMr.js} +1 -1
  48. package/dist/assets/{index-CaGSC-6k.js → index-vaGqBjAo.js} +1 -1
  49. package/dist/assets/{infoDiagram-RZZSJVI2-CLz7BARX.js → infoDiagram-RZZSJVI2-S89OtAH5.js} +1 -1
  50. package/dist/assets/{journeyDiagram-BLD6N6MZ-ea1xaw37.js → journeyDiagram-BLD6N6MZ-BCWDa8Of.js} +1 -1
  51. package/dist/assets/{json-CGzZ7BEF.js → json-BDWHPwhW.js} +1 -1
  52. package/dist/assets/{layout-Dxx_T5Fu.js → layout-DVr4vTMt.js} +1 -1
  53. package/dist/assets/{linear-0xhgjE6J.js → linear-Do2jMujw.js} +1 -1
  54. package/dist/assets/{mermaid-mN6VUGYt.js → mermaid-D6wIHchJ.js} +3 -3
  55. package/dist/assets/{min-C0S9vRnd.js → min-CJmFKm0b.js} +1 -1
  56. package/dist/assets/{mindmap-definition-OEB2RXX2-BQglr0GN.js → mindmap-definition-OEB2RXX2-BquGOjTQ.js} +1 -1
  57. package/dist/assets/{pieDiagram-X7YZ5ZEZ-Bh4I4PCv.js → pieDiagram-X7YZ5ZEZ-IUwQKe6e.js} +1 -1
  58. package/dist/assets/{quadrantDiagram-F36EZAVT-DG9YWis2.js → quadrantDiagram-F36EZAVT-TMRbFxUO.js} +1 -1
  59. package/dist/assets/{react-plotly-Xj3XKGYl.js → react-plotly-EHYPZ51X.js} +1 -1
  60. package/dist/assets/{requirementDiagram-JG2LMPGF-D0LraHwS.js → requirementDiagram-JG2LMPGF-A2kisNxW.js} +1 -1
  61. package/dist/assets/{run-page-BXcvFxWF.js → run-page-BS8kIkM6.js} +1 -1
  62. package/dist/assets/{sankeyDiagram-ATFNWWW6-DqcM---j.js → sankeyDiagram-ATFNWWW6-D_zdiDfN.js} +1 -1
  63. package/dist/assets/{sequenceDiagram-WK7YDQ3N-CsMJ2kiZ.js → sequenceDiagram-WK7YDQ3N-BUDaE9hy.js} +1 -1
  64. package/dist/assets/{slides-component-C8FMx0N4.js → slides-component-dYmwDY42.js} +1 -1
  65. package/dist/assets/{sortBy-CPLZzu9-.js → sortBy-B5u3AJ5B.js} +1 -1
  66. package/dist/assets/{stateDiagram-4JV6CC6H-CZLqWq3w.js → stateDiagram-4JV6CC6H-DgBSWDh5.js} +1 -1
  67. package/dist/assets/stateDiagram-v2-7KT6RKTD-Bd_UwSw6.js +1 -0
  68. package/dist/assets/{terminal-BfyxvY8t.js → terminal-DucwHhVv.js} +1 -1
  69. package/dist/assets/{time-B7JN12xP.js → time-BUo3Bu3K.js} +1 -1
  70. package/dist/assets/{timeline-definition-3ZMEY6HS-3zsztxZX.js → timeline-definition-3ZMEY6HS-ZxX1_aNV.js} +1 -1
  71. package/dist/assets/{transform-YcSIPL63.js → transform-v6r2D_6X.js} +1 -1
  72. package/dist/assets/{tree-hzte9cco.js → tree-DBFBztRq.js} +1 -1
  73. package/dist/assets/{useMarimoWebSocket-Ddo0DAVC.js → useMarimoWebSocket-DAiE68H6.js} +3 -3
  74. package/dist/assets/{vega-component-CYw4xJt7.js → vega-component-D-_gvYF7.js} +1 -1
  75. package/dist/assets/{xychartDiagram-KECQ2H5Q-Cp64CgUv.js → xychartDiagram-KECQ2H5Q-CaOPiKTB.js} +1 -1
  76. package/dist/index.html +1 -1
  77. package/package.json +1 -1
  78. package/dist/assets/_baseMap-nfKKBQAG.js +0 -1
  79. package/dist/assets/channel-XJk9YWMd.js +0 -1
  80. package/dist/assets/clone-Dj6Hk00g.js +0 -1
  81. package/dist/assets/stateDiagram-v2-7KT6RKTD-DAo1O7e4.js +0 -1
@@ -1,11 +1,11 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./dagre-7KT5K2WU-kcp6m67r.js","./graph-aLbp0MJ5.js","./_baseUniq-DAxdF8Pw.js","./index-Bcta8bk3.js","./index-BkD6C0P6.css","./_baseEach-BMye5Nwh.js","./transform-YcSIPL63.js","./timer-CK-RIWfW.js","./layout-Dxx_T5Fu.js","./min-C0S9vRnd.js","./_baseMap-nfKKBQAG.js","./sortBy-CPLZzu9-.js","./json-CGzZ7BEF.js","./clone-Dj6Hk00g.js","./step-CNn2V7Th.js","./c4Diagram-ZCSEYPFN-B6hKiRsz.js","./chunk-V35ELUW5-Bx4QWhcn.js","./flowDiagram-NWEUNK3L-Cts11xJ5.js","./chunk-4LC2V6XN-C3CCiOAa.js","./channel-XJk9YWMd.js","./erDiagram-DKC2X5TE-CmqYNL45.js","./gitGraphDiagram-JPZ3KUXI-B62QkoYb.js","./chunk-RYO7GUH3-Q1dXGX63.js","./chunk-6JKP7OK7-BeVRKhip.js","./gitGraph-YCYPL57B-DyaQXeFu.js","./main-cdvIQCIX.js","./ganttDiagram-HLVPPPRE-CICB85_m.js","./time-B7JN12xP.js","./linear-0xhgjE6J.js","./init-DLRA0X12.js","./infoDiagram-RZZSJVI2-CLz7BARX.js","./pieDiagram-X7YZ5ZEZ-Bh4I4PCv.js","./arc-lt4NHaVr.js","./ordinal-DDUp3AbE.js","./quadrantDiagram-F36EZAVT-DG9YWis2.js","./xychartDiagram-KECQ2H5Q-Cp64CgUv.js","./range-CtcPcB_L.js","./requirementDiagram-JG2LMPGF-D0LraHwS.js","./sequenceDiagram-WK7YDQ3N-CsMJ2kiZ.js","./classDiagram-Q73GJZWF-DAdn1Yxt.js","./chunk-NGC4727B-BOHRbEG_.js","./classDiagram-v2-C6QPLPW4-DnOh94Ik.js","./chunk-REEJFE46-BnpA03VW.js","./stateDiagram-4JV6CC6H-CZLqWq3w.js","./chunk-5RIWM3LS-DFfFzycc.js","./stateDiagram-v2-7KT6RKTD-DAo1O7e4.js","./journeyDiagram-BLD6N6MZ-ea1xaw37.js","./timeline-definition-3ZMEY6HS-3zsztxZX.js","./mindmap-definition-OEB2RXX2-BQglr0GN.js","./cytoscape.esm-DXieaT54.js","./sankeyDiagram-ATFNWWW6-DqcM---j.js","./colors-bszWmPJw.js","./diagram-AVGMFHF7-Qk4KB2WS.js","./blockDiagram-TCMKQVZ6-C8hwVnTX.js","./architectureDiagram-IFBEXTG3-BUUyUyY4.js"])))=>i.map(i=>d[i]);
2
- var t,e,r,i,a,n,o,s,l,h,c,d,u,p=Object.defineProperty,g=t=>{throw TypeError(t)},f=(t,e,r)=>((t,e,r)=>e in t?p(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r)(t,"symbol"!=typeof e?e+"":e,r),y=(t,e,r)=>(((t,e,r)=>{e.has(t)||g("Cannot "+r)})(t,e,"access private method"),r);import{b_ as m,cv as x,cn as b,ad as C,cC as k,n as w,cD as S,cE as T,ci as v,cF as B,cG as _,cH as L,aT as M,cl as F,cI as A,a9 as $,cJ as E,A as D,bY as I,cj as O,cK as P,at as R,g as q,cL as z,cM as W,F as N,a4 as j,ah as H,K as U,ap as Y}from"./index-Bcta8bk3.js";import{b as V,a as G,s as Z}from"./transform-YcSIPL63.js";import{k as X,q as Q,r as K,u as J,v as tt,x as et,y as rt,z as it,A as at,B as nt,n as ot,C as st,D as lt,E as ht,F as ct,G as dt,H as ut,I as pt,l as gt}from"./step-CNn2V7Th.js";var ft=Object.create,yt=function(){function t(){}return function(e){if(!m(e))return{};if(ft)return ft(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}}();function mt(t,e){var r=-1,i=t.length;for(e||(e=Array(i));++r<i;)e[r]=t[r];return e}function xt(t,e,r,i){var a=!r;r||(r={});for(var n=-1,o=e.length;++n<o;){var s=e[n],l=void 0;void 0===l&&(l=t[s]),a?x(r,s,l):b(r,s,l)}return r}function bt(t){return V((function(e,r){var i=-1,a=r.length,n=a>1?r[a-1]:void 0,o=a>2?r[2]:void 0;for(n=t.length>3&&"function"==typeof n?(a--,n):void 0,o&&C(r[0],r[1],o)&&(n=a<3?void 0:n,a=1),e=Object(e);++i<a;){var s=r[i];s&&t(e,s,i,n)}return e}))}var Ct=Object.prototype.hasOwnProperty;function kt(t){if(!m(t))return function(t){var e=[];if(null!=t)for(var r in Object(t))e.push(r);return e}(t);var e=k(t),r=[];for(var i in t)("constructor"!=i||!e&&Ct.call(t,i))&&r.push(i);return r}function wt(t){return w(t)?S(t,!0):kt(t)}var St=T(Object.getPrototypeOf,Object),Tt=Function.prototype,vt=Object.prototype,Bt=Tt.toString,_t=vt.hasOwnProperty,Lt=Bt.call(Object);var Mt="object"==typeof exports&&exports&&!exports.nodeType&&exports,Ft=Mt&&"object"==typeof module&&module&&!module.nodeType&&module,At=Ft&&Ft.exports===Mt?_.Buffer:void 0,$t=At?At.allocUnsafe:void 0;function Et(t,e){if(e)return t.slice();var r=t.length,i=$t?$t(r):new t.constructor(r);return t.copy(i),i}function Dt(t){var e=new t.constructor(t.byteLength);return new L(e).set(new L(t)),e}function It(t,e){var r=e?Dt(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}function Ot(t){return"function"!=typeof t.constructor||k(t)?{}:yt(St(t))}function Pt(t,e,r){(void 0!==r&&!M(t[e],r)||void 0===r&&!(e in t))&&x(t,e,r)}function Rt(t){return v(t)&&w(t)}function qt(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}function zt(t,e,r,i,a,n,o){var s=qt(t,r),l=qt(e,r),h=o.get(l);if(h)Pt(t,r,h);else{var c,d=n?n(s,l,r+"",t,e,o):void 0,u=void 0===d;if(u){var p=$(l),g=!p&&F(l),f=!p&&!g&&A(l);d=l,p||g||f?$(s)?d=s:Rt(s)?d=mt(s):g?(u=!1,d=Et(l,!0)):f?(u=!1,d=It(l,!0)):d=[]:function(t){if(!v(t)||"[object Object]"!=B(t))return!1;var e=St(t);if(null===e)return!0;var r=_t.call(e,"constructor")&&e.constructor;return"function"==typeof r&&r instanceof r&&Bt.call(r)==Lt}(l)||E(l)?(d=s,E(s)?d=xt(c=s,wt(c)):m(s)&&!D(s)||(d=Ot(l))):u=!1}u&&(o.set(l,d),a(d,l,i,n,o),o.delete(l)),Pt(t,r,d)}}function Wt(t,e,r,i,a){t!==e&&G(e,(function(n,o){if(a||(a=new I),m(n))zt(t,e,o,r,Wt,i,a);else{var s=i?i(qt(t,o),n,o+"",t,e,a):void 0;void 0===s&&(s=n),Pt(t,o,s)}}),wt)}var Nt=Object.prototype.hasOwnProperty;function jt(t){if(null==t)return!0;if(w(t)&&($(t)||"string"==typeof t||"function"==typeof t.splice||F(t)||A(t)||E(t)))return!t.length;var e=O(t);if("[object Map]"==e||"[object Set]"==e)return!t.size;if(k(t))return!P(t).length;for(var r in t)if(Nt.call(t,r))return!1;return!0}var Ht=bt((function(t,e,r){Wt(t,e,r)}));class Ut{constructor(t,e){this._context=t,this._x=e}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line}point(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,e,t,e):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+e)/2,t,this._y0,t,e)}this._x0=t,this._y0=e}}var Yt={exports:{}};const Vt=q(Yt.exports=function(){var t=1e3,e=6e4,r=36e5,i="millisecond",a="second",n="minute",o="hour",s="day",l="week",h="month",c="quarter",d="year",u="date",p="Invalid Date",g=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,f=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,y={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(t){var e=["th","st","nd","rd"],r=t%100;return"["+t+(e[(r-20)%10]||e[r]||e[0])+"]"}},m=function(t,e,r){var i=String(t);return!i||i.length>=e?t:""+Array(e+1-i.length).join(r)+t},x={s:m,z:function(t){var e=-t.utcOffset(),r=Math.abs(e),i=Math.floor(r/60),a=r%60;return(e<=0?"+":"-")+m(i,2,"0")+":"+m(a,2,"0")},m:function t(e,r){if(e.date()<r.date())return-t(r,e);var i=12*(r.year()-e.year())+(r.month()-e.month()),a=e.clone().add(i,h),n=r-a<0,o=e.clone().add(i+(n?-1:1),h);return+(-(i+(r-a)/(n?a-o:o-a))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return{M:h,y:d,w:l,d:s,D:u,h:o,m:n,s:a,ms:i,Q:c}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},b="en",C={};C[b]=y;var k="$isDayjsObject",w=function(t){return t instanceof B||!(!t||!t[k])},S=function t(e,r,i){var a;if(!e)return b;if("string"==typeof e){var n=e.toLowerCase();C[n]&&(a=n),r&&(C[n]=r,a=n);var o=e.split("-");if(!a&&o.length>1)return t(o[0])}else{var s=e.name;C[s]=e,a=s}return!i&&a&&(b=a),a||!i&&b},T=function(t,e){if(w(t))return t.clone();var r="object"==typeof e?e:{};return r.date=t,r.args=arguments,new B(r)},v=x;v.l=S,v.i=w,v.w=function(t,e){return T(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var B=function(){function y(t){this.$L=S(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[k]=!0}var m=y.prototype;return m.parse=function(t){this.$d=function(t){var e=t.date,r=t.utc;if(null===e)return new Date(NaN);if(v.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var i=e.match(g);if(i){var a=i[2]-1||0,n=(i[7]||"0").substring(0,3);return r?new Date(Date.UTC(i[1],a,i[3]||1,i[4]||0,i[5]||0,i[6]||0,n)):new Date(i[1],a,i[3]||1,i[4]||0,i[5]||0,i[6]||0,n)}}return new Date(e)}(t),this.init()},m.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},m.$utils=function(){return v},m.isValid=function(){return!(this.$d.toString()===p)},m.isSame=function(t,e){var r=T(t);return this.startOf(e)<=r&&r<=this.endOf(e)},m.isAfter=function(t,e){return T(t)<this.startOf(e)},m.isBefore=function(t,e){return this.endOf(e)<T(t)},m.$g=function(t,e,r){return v.u(t)?this[e]:this.set(r,t)},m.unix=function(){return Math.floor(this.valueOf()/1e3)},m.valueOf=function(){return this.$d.getTime()},m.startOf=function(t,e){var r=this,i=!!v.u(e)||e,c=v.p(t),p=function(t,e){var a=v.w(r.$u?Date.UTC(r.$y,e,t):new Date(r.$y,e,t),r);return i?a:a.endOf(s)},g=function(t,e){return v.w(r.toDate()[t].apply(r.toDate("s"),(i?[0,0,0,0]:[23,59,59,999]).slice(e)),r)},f=this.$W,y=this.$M,m=this.$D,x="set"+(this.$u?"UTC":"");switch(c){case d:return i?p(1,0):p(31,11);case h:return i?p(1,y):p(0,y+1);case l:var b=this.$locale().weekStart||0,C=(f<b?f+7:f)-b;return p(i?m-C:m+(6-C),y);case s:case u:return g(x+"Hours",0);case o:return g(x+"Minutes",1);case n:return g(x+"Seconds",2);case a:return g(x+"Milliseconds",3);default:return this.clone()}},m.endOf=function(t){return this.startOf(t,!1)},m.$set=function(t,e){var r,l=v.p(t),c="set"+(this.$u?"UTC":""),p=(r={},r[s]=c+"Date",r[u]=c+"Date",r[h]=c+"Month",r[d]=c+"FullYear",r[o]=c+"Hours",r[n]=c+"Minutes",r[a]=c+"Seconds",r[i]=c+"Milliseconds",r)[l],g=l===s?this.$D+(e-this.$W):e;if(l===h||l===d){var f=this.clone().set(u,1);f.$d[p](g),f.init(),this.$d=f.set(u,Math.min(this.$D,f.daysInMonth())).$d}else p&&this.$d[p](g);return this.init(),this},m.set=function(t,e){return this.clone().$set(t,e)},m.get=function(t){return this[v.p(t)]()},m.add=function(i,c){var u,p=this;i=Number(i);var g=v.p(c),f=function(t){var e=T(p);return v.w(e.date(e.date()+Math.round(t*i)),p)};if(g===h)return this.set(h,this.$M+i);if(g===d)return this.set(d,this.$y+i);if(g===s)return f(1);if(g===l)return f(7);var y=(u={},u[n]=e,u[o]=r,u[a]=t,u)[g]||1,m=this.$d.getTime()+i*y;return v.w(m,this)},m.subtract=function(t,e){return this.add(-1*t,e)},m.format=function(t){var e=this,r=this.$locale();if(!this.isValid())return r.invalidDate||p;var i=t||"YYYY-MM-DDTHH:mm:ssZ",a=v.z(this),n=this.$H,o=this.$m,s=this.$M,l=r.weekdays,h=r.months,c=r.meridiem,d=function(t,r,a,n){return t&&(t[r]||t(e,i))||a[r].slice(0,n)},u=function(t){return v.s(n%12||12,t,"0")},g=c||function(t,e,r){var i=t<12?"AM":"PM";return r?i.toLowerCase():i};return i.replace(f,(function(t,i){return i||function(t){switch(t){case"YY":return String(e.$y).slice(-2);case"YYYY":return v.s(e.$y,4,"0");case"M":return s+1;case"MM":return v.s(s+1,2,"0");case"MMM":return d(r.monthsShort,s,h,3);case"MMMM":return d(h,s);case"D":return e.$D;case"DD":return v.s(e.$D,2,"0");case"d":return String(e.$W);case"dd":return d(r.weekdaysMin,e.$W,l,2);case"ddd":return d(r.weekdaysShort,e.$W,l,3);case"dddd":return l[e.$W];case"H":return String(n);case"HH":return v.s(n,2,"0");case"h":return u(1);case"hh":return u(2);case"a":return g(n,o,!0);case"A":return g(n,o,!1);case"m":return String(o);case"mm":return v.s(o,2,"0");case"s":return String(e.$s);case"ss":return v.s(e.$s,2,"0");case"SSS":return v.s(e.$ms,3,"0");case"Z":return a}return null}(t)||a.replace(":","")}))},m.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},m.diff=function(i,u,p){var g,f=this,y=v.p(u),m=T(i),x=(m.utcOffset()-this.utcOffset())*e,b=this-m,C=function(){return v.m(f,m)};switch(y){case d:g=C()/12;break;case h:g=C();break;case c:g=C()/3;break;case l:g=(b-x)/6048e5;break;case s:g=(b-x)/864e5;break;case o:g=b/r;break;case n:g=b/e;break;case a:g=b/t;break;default:g=b}return p?g:v.a(g)},m.daysInMonth=function(){return this.endOf(h).$D},m.$locale=function(){return C[this.$L]},m.locale=function(t,e){if(!t)return this.$L;var r=this.clone(),i=S(t,e,!0);return i&&(r.$L=i),r},m.clone=function(){return v.w(this.$d,this)},m.toDate=function(){return new Date(this.valueOf())},m.toJSON=function(){return this.isValid()?this.toISOString():null},m.toISOString=function(){return this.$d.toISOString()},m.toString=function(){return this.$d.toUTCString()},y}(),_=B.prototype;return T.prototype=_,[["$ms",i],["$s",a],["$m",n],["$H",o],["$W",s],["$M",h],["$y",d],["$D",u]].forEach((function(t){_[t[1]]=function(e){return this.$g(e,t[0],t[1])}})),T.extend=function(t,e){return t.$i||(t(e,B,T),t.$i=!0),T},T.locale=S,T.isDayjs=w,T.unix=function(t){return T(1e3*t)},T.en=C[b],T.Ls=C,T.p={},T}()),Gt={min:{r:0,g:0,b:0,s:0,l:0,a:0},max:{r:255,g:255,b:255,h:360,s:100,l:100,a:1},clamp:{r:t=>t>=255?255:t<0?0:t,g:t=>t>=255?255:t<0?0:t,b:t=>t>=255?255:t<0?0:t,h:t=>t%360,s:t=>t>=100?100:t<0?0:t,l:t=>t>=100?100:t<0?0:t,a:t=>t>=1?1:t<0?0:t},toLinear:t=>{const e=t/255;return t>.03928?Math.pow((e+.055)/1.055,2.4):e/12.92},hue2rgb:(t,e,r)=>(r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+6*(e-t)*r:r<.5?e:r<2/3?t+(e-t)*(2/3-r)*6:t),hsl2rgb:({h:t,s:e,l:r},i)=>{if(!e)return 2.55*r;t/=360,e/=100;const a=(r/=100)<.5?r*(1+e):r+e-r*e,n=2*r-a;switch(i){case"r":return 255*Gt.hue2rgb(n,a,t+1/3);case"g":return 255*Gt.hue2rgb(n,a,t);case"b":return 255*Gt.hue2rgb(n,a,t-1/3)}},rgb2hsl:({r:t,g:e,b:r},i)=>{t/=255,e/=255,r/=255;const a=Math.max(t,e,r),n=Math.min(t,e,r),o=(a+n)/2;if("l"===i)return 100*o;if(a===n)return 0;const s=a-n;if("s"===i)return 100*(o>.5?s/(2-a-n):s/(a+n));switch(a){case t:return 60*((e-r)/s+(e<r?6:0));case e:return 60*((r-t)/s+2);case r:return 60*((t-e)/s+4);default:return-1}}},Zt={channel:Gt,lang:{clamp:(t,e,r)=>e>r?Math.min(e,Math.max(r,t)):Math.min(r,Math.max(e,t)),round:t=>Math.round(1e10*t)/1e10},unit:{dec2hex:t=>{const e=Math.round(t).toString(16);return e.length>1?e:`0${e}`}}},Xt={};for(let by=0;by<=255;by++)Xt[by]=Zt.unit.dec2hex(by);const Qt=0,Kt=1,Jt=2;class te{constructor(){this.type=Qt}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=Qt}is(t){return this.type===t}}const ee=new class{constructor(t,e){this.color=e,this.changed=!1,this.data=t,this.type=new te}set(t,e){return this.color=e,this.changed=!1,this.data=t,this.type.type=Qt,this}_ensureHSL(){const t=this.data,{h:e,s:r,l:i}=t;void 0===e&&(t.h=Zt.channel.rgb2hsl(t,"h")),void 0===r&&(t.s=Zt.channel.rgb2hsl(t,"s")),void 0===i&&(t.l=Zt.channel.rgb2hsl(t,"l"))}_ensureRGB(){const t=this.data,{r:e,g:r,b:i}=t;void 0===e&&(t.r=Zt.channel.hsl2rgb(t,"r")),void 0===r&&(t.g=Zt.channel.hsl2rgb(t,"g")),void 0===i&&(t.b=Zt.channel.hsl2rgb(t,"b"))}get r(){const t=this.data,e=t.r;return this.type.is(Jt)||void 0===e?(this._ensureHSL(),Zt.channel.hsl2rgb(t,"r")):e}get g(){const t=this.data,e=t.g;return this.type.is(Jt)||void 0===e?(this._ensureHSL(),Zt.channel.hsl2rgb(t,"g")):e}get b(){const t=this.data,e=t.b;return this.type.is(Jt)||void 0===e?(this._ensureHSL(),Zt.channel.hsl2rgb(t,"b")):e}get h(){const t=this.data,e=t.h;return this.type.is(Kt)||void 0===e?(this._ensureRGB(),Zt.channel.rgb2hsl(t,"h")):e}get s(){const t=this.data,e=t.s;return this.type.is(Kt)||void 0===e?(this._ensureRGB(),Zt.channel.rgb2hsl(t,"s")):e}get l(){const t=this.data,e=t.l;return this.type.is(Kt)||void 0===e?(this._ensureRGB(),Zt.channel.rgb2hsl(t,"l")):e}get a(){return this.data.a}set r(t){this.type.set(Kt),this.changed=!0,this.data.r=t}set g(t){this.type.set(Kt),this.changed=!0,this.data.g=t}set b(t){this.type.set(Kt),this.changed=!0,this.data.b=t}set h(t){this.type.set(Jt),this.changed=!0,this.data.h=t}set s(t){this.type.set(Jt),this.changed=!0,this.data.s=t}set l(t){this.type.set(Jt),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}}({r:0,g:0,b:0,a:0},"transparent"),re={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:t=>{if(35!==t.charCodeAt(0))return;const e=t.match(re.re);if(!e)return;const r=e[1],i=parseInt(r,16),a=r.length,n=a%4==0,o=a>4,s=o?1:17,l=o?8:4,h=n?0:-1,c=o?255:15;return ee.set({r:(i>>l*(h+3)&c)*s,g:(i>>l*(h+2)&c)*s,b:(i>>l*(h+1)&c)*s,a:n?(i&c)*s/255:1},t)},stringify:t=>{const{r:e,g:r,b:i,a:a}=t;return a<1?`#${Xt[Math.round(e)]}${Xt[Math.round(r)]}${Xt[Math.round(i)]}${Xt[Math.round(255*a)]}`:`#${Xt[Math.round(e)]}${Xt[Math.round(r)]}${Xt[Math.round(i)]}`}},ie={re:/^hsla?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(?:deg|grad|rad|turn)?)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(%)?))?\s*?\)$/i,hueRe:/^(.+?)(deg|grad|rad|turn)$/i,_hue2deg:t=>{const e=t.match(ie.hueRe);if(e){const[,t,r]=e;switch(r){case"grad":return Zt.channel.clamp.h(.9*parseFloat(t));case"rad":return Zt.channel.clamp.h(180*parseFloat(t)/Math.PI);case"turn":return Zt.channel.clamp.h(360*parseFloat(t))}}return Zt.channel.clamp.h(parseFloat(t))},parse:t=>{const e=t.charCodeAt(0);if(104!==e&&72!==e)return;const r=t.match(ie.re);if(!r)return;const[,i,a,n,o,s]=r;return ee.set({h:ie._hue2deg(i),s:Zt.channel.clamp.s(parseFloat(a)),l:Zt.channel.clamp.l(parseFloat(n)),a:o?Zt.channel.clamp.a(s?parseFloat(o)/100:parseFloat(o)):1},t)},stringify:t=>{const{h:e,s:r,l:i,a:a}=t;return a<1?`hsla(${Zt.lang.round(e)}, ${Zt.lang.round(r)}%, ${Zt.lang.round(i)}%, ${a})`:`hsl(${Zt.lang.round(e)}, ${Zt.lang.round(r)}%, ${Zt.lang.round(i)}%)`}},ae={colors:{aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyanaqua:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",transparent:"#00000000",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},parse:t=>{t=t.toLowerCase();const e=ae.colors[t];if(e)return re.parse(e)},stringify:t=>{const e=re.stringify(t);for(const r in ae.colors)if(ae.colors[r]===e)return r}},ne={re:/^rgba?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?)))?\s*?\)$/i,parse:t=>{const e=t.charCodeAt(0);if(114!==e&&82!==e)return;const r=t.match(ne.re);if(!r)return;const[,i,a,n,o,s,l,h,c]=r;return ee.set({r:Zt.channel.clamp.r(a?2.55*parseFloat(i):parseFloat(i)),g:Zt.channel.clamp.g(o?2.55*parseFloat(n):parseFloat(n)),b:Zt.channel.clamp.b(l?2.55*parseFloat(s):parseFloat(s)),a:h?Zt.channel.clamp.a(c?parseFloat(h)/100:parseFloat(h)):1},t)},stringify:t=>{const{r:e,g:r,b:i,a:a}=t;return a<1?`rgba(${Zt.lang.round(e)}, ${Zt.lang.round(r)}, ${Zt.lang.round(i)}, ${Zt.lang.round(a)})`:`rgb(${Zt.lang.round(e)}, ${Zt.lang.round(r)}, ${Zt.lang.round(i)})`}},oe={format:{keyword:ae,hex:re,rgb:ne,rgba:ne,hsl:ie,hsla:ie},parse:t=>{if("string"!=typeof t)return t;const e=re.parse(t)||ne.parse(t)||ie.parse(t)||ae.parse(t);if(e)return e;throw new Error(`Unsupported color format: "${t}"`)},stringify:t=>!t.changed&&t.color?t.color:t.type.is(Jt)||void 0===t.data.r?ie.stringify(t):t.a<1||!Number.isInteger(t.r)||!Number.isInteger(t.g)||!Number.isInteger(t.b)?ne.stringify(t):re.stringify(t)},se=(t,e)=>{const r=oe.parse(t);for(const i in e)r[i]=Zt.channel.clamp[i](e[i]);return oe.stringify(r)},le=(t,e,r=0,i=1)=>{if("number"!=typeof t)return se(t,{a:e});const a=ee.set({r:Zt.channel.clamp.r(t),g:Zt.channel.clamp.g(e),b:Zt.channel.clamp.b(r),a:Zt.channel.clamp.a(i)});return oe.stringify(a)},he=t=>(t=>{const{r:e,g:r,b:i}=oe.parse(t),a=.2126*Zt.channel.toLinear(e)+.7152*Zt.channel.toLinear(r)+.0722*Zt.channel.toLinear(i);return Zt.lang.round(a)})(t)>=.5,ce=t=>!he(t),de=(t,e,r)=>{const i=oe.parse(t),a=i[e],n=Zt.channel.clamp[e](a+r);return a!==n&&(i[e]=n),oe.stringify(i)},ue=(t,e)=>de(t,"l",e),pe=(t,e)=>de(t,"l",-e),ge=(t,e)=>{const r=oe.parse(t),i={};for(const a in e)e[a]&&(i[a]=r[a]+e[a]);return se(t,i)},fe=(t,e=100)=>{const r=oe.parse(t);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,((t,e,r=50)=>{const{r:i,g:a,b:n,a:o}=oe.parse(t),{r:s,g:l,b:h,a:c}=oe.parse(e),d=r/100,u=2*d-1,p=o-c,g=((u*p==-1?u:(u+p)/(1+u*p))+1)/2,f=1-g;return le(i*g+s*f,a*g+l*f,n*g+h*f,o*d+c*(1-d))})(r,t,e)},{entries:ye,setPrototypeOf:me,isFrozen:xe,getPrototypeOf:be,getOwnPropertyDescriptor:Ce}=Object;let{freeze:ke,seal:we,create:Se}=Object,{apply:Te,construct:ve}="undefined"!=typeof Reflect&&Reflect;ke||(ke=function(t){return t}),we||(we=function(t){return t}),Te||(Te=function(t,e,r){return t.apply(e,r)}),ve||(ve=function(t,e){return new t(...e)});const Be=qe(Array.prototype.forEach),_e=qe(Array.prototype.pop),Le=qe(Array.prototype.push),Me=qe(String.prototype.toLowerCase),Fe=qe(String.prototype.toString),Ae=qe(String.prototype.match),$e=qe(String.prototype.replace),Ee=qe(String.prototype.indexOf),De=qe(String.prototype.trim),Ie=qe(Object.prototype.hasOwnProperty),Oe=qe(RegExp.prototype.test),Pe=(Re=TypeError,function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return ve(Re,e)});var Re;function qe(t){return function(e){for(var r=arguments.length,i=new Array(r>1?r-1:0),a=1;a<r;a++)i[a-1]=arguments[a];return Te(t,e,i)}}function ze(t,e){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Me;me&&me(t,null);let i=e.length;for(;i--;){let a=e[i];if("string"==typeof a){const t=r(a);t!==a&&(xe(e)||(e[i]=t),a=t)}t[a]=!0}return t}function We(t){for(let e=0;e<t.length;e++){Ie(t,e)||(t[e]=null)}return t}function Ne(t){const e=Se(null);for(const[r,i]of ye(t)){Ie(t,r)&&(Array.isArray(i)?e[r]=We(i):i&&"object"==typeof i&&i.constructor===Object?e[r]=Ne(i):e[r]=i)}return e}function je(t,e){for(;null!==t;){const r=Ce(t,e);if(r){if(r.get)return qe(r.get);if("function"==typeof r.value)return qe(r.value)}t=be(t)}return function(){return null}}const He=ke(["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","section","select","shadow","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"]),Ue=ke(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Ye=ke(["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"]),Ve=ke(["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"]),Ge=ke(["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"]),Ze=ke(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Xe=ke(["#text"]),Qe=ke(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","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","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),Ke=ke(["accent-height","accumulate","additive","alignment-baseline","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","dur","edgemode","elevation","end","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","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","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","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","targetx","targety","transform","transform-origin","text-anchor","text-decoration","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"]),Je=ke(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","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"]),tr=ke(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),er=we(/\{\{[\w\W]*|[\w\W]*\}\}/gm),rr=we(/<%[\w\W]*|[\w\W]*%>/gm),ir=we(/\${[\w\W]*}/gm),ar=we(/^data-[\-\w.\u00B7-\uFFFF]/),nr=we(/^aria-[\-\w]+$/),or=we(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),sr=we(/^(?:\w+script|data):/i),lr=we(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),hr=we(/^html$/i),cr=we(/^[a-z][.\w]*(-[.\w]+)+$/i);var dr=Object.freeze({__proto__:null,MUSTACHE_EXPR:er,ERB_EXPR:rr,TMPLIT_EXPR:ir,DATA_ATTR:ar,ARIA_ATTR:nr,IS_ALLOWED_URI:or,IS_SCRIPT_OR_DATA:sr,ATTR_WHITESPACE:lr,DOCTYPE_NAME:hr,CUSTOM_ELEMENT:cr});const ur=1,pr=3,gr=7,fr=8,yr=9;var mr,xr=function t(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"undefined"==typeof window?null:window;const r=e=>t(e);if(r.version="3.1.6",r.removed=[],!e||!e.document||e.document.nodeType!==yr)return r.isSupported=!1,r;let{document:i}=e;const a=i,n=a.currentScript,{DocumentFragment:o,HTMLTemplateElement:s,Node:l,Element:h,NodeFilter:c,NamedNodeMap:d=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:u,DOMParser:p,trustedTypes:g}=e,f=h.prototype,y=je(f,"cloneNode"),m=je(f,"remove"),x=je(f,"nextSibling"),b=je(f,"childNodes"),C=je(f,"parentNode");if("function"==typeof s){const t=i.createElement("template");t.content&&t.content.ownerDocument&&(i=t.content.ownerDocument)}let k,w="";const{implementation:S,createNodeIterator:T,createDocumentFragment:v,getElementsByTagName:B}=i,{importNode:_}=a;let L={};r.isSupported="function"==typeof ye&&"function"==typeof C&&S&&void 0!==S.createHTMLDocument;const{MUSTACHE_EXPR:M,ERB_EXPR:F,TMPLIT_EXPR:A,DATA_ATTR:$,ARIA_ATTR:E,IS_SCRIPT_OR_DATA:D,ATTR_WHITESPACE:I,CUSTOM_ELEMENT:O}=dr;let{IS_ALLOWED_URI:P}=dr,R=null;const q=ze({},[...He,...Ue,...Ye,...Ge,...Xe]);let z=null;const W=ze({},[...Qe,...Ke,...Je,...tr]);let N=Object.seal(Se(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}})),j=null,H=null,U=!0,Y=!0,V=!1,G=!0,Z=!1,X=!0,Q=!1,K=!1,J=!1,tt=!1,et=!1,rt=!1,it=!0,at=!1,nt=!0,ot=!1,st={},lt=null;const ht=ze({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let ct=null;const dt=ze({},["audio","video","img","source","image","track"]);let ut=null;const pt=ze({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),gt="http://www.w3.org/1998/Math/MathML",ft="http://www.w3.org/2000/svg",yt="http://www.w3.org/1999/xhtml";let mt=yt,xt=!1,bt=null;const Ct=ze({},[gt,ft,yt],Fe);let kt=null;const wt=["application/xhtml+xml","text/html"];let St=null,Tt=null;const vt=i.createElement("form"),Bt=function(t){return t instanceof RegExp||t instanceof Function},_t=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!Tt||Tt!==t){if(t&&"object"==typeof t||(t={}),t=Ne(t),kt=-1===wt.indexOf(t.PARSER_MEDIA_TYPE)?"text/html":t.PARSER_MEDIA_TYPE,St="application/xhtml+xml"===kt?Fe:Me,R=Ie(t,"ALLOWED_TAGS")?ze({},t.ALLOWED_TAGS,St):q,z=Ie(t,"ALLOWED_ATTR")?ze({},t.ALLOWED_ATTR,St):W,bt=Ie(t,"ALLOWED_NAMESPACES")?ze({},t.ALLOWED_NAMESPACES,Fe):Ct,ut=Ie(t,"ADD_URI_SAFE_ATTR")?ze(Ne(pt),t.ADD_URI_SAFE_ATTR,St):pt,ct=Ie(t,"ADD_DATA_URI_TAGS")?ze(Ne(dt),t.ADD_DATA_URI_TAGS,St):dt,lt=Ie(t,"FORBID_CONTENTS")?ze({},t.FORBID_CONTENTS,St):ht,j=Ie(t,"FORBID_TAGS")?ze({},t.FORBID_TAGS,St):{},H=Ie(t,"FORBID_ATTR")?ze({},t.FORBID_ATTR,St):{},st=!!Ie(t,"USE_PROFILES")&&t.USE_PROFILES,U=!1!==t.ALLOW_ARIA_ATTR,Y=!1!==t.ALLOW_DATA_ATTR,V=t.ALLOW_UNKNOWN_PROTOCOLS||!1,G=!1!==t.ALLOW_SELF_CLOSE_IN_ATTR,Z=t.SAFE_FOR_TEMPLATES||!1,X=!1!==t.SAFE_FOR_XML,Q=t.WHOLE_DOCUMENT||!1,tt=t.RETURN_DOM||!1,et=t.RETURN_DOM_FRAGMENT||!1,rt=t.RETURN_TRUSTED_TYPE||!1,J=t.FORCE_BODY||!1,it=!1!==t.SANITIZE_DOM,at=t.SANITIZE_NAMED_PROPS||!1,nt=!1!==t.KEEP_CONTENT,ot=t.IN_PLACE||!1,P=t.ALLOWED_URI_REGEXP||or,mt=t.NAMESPACE||yt,N=t.CUSTOM_ELEMENT_HANDLING||{},t.CUSTOM_ELEMENT_HANDLING&&Bt(t.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(N.tagNameCheck=t.CUSTOM_ELEMENT_HANDLING.tagNameCheck),t.CUSTOM_ELEMENT_HANDLING&&Bt(t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(N.attributeNameCheck=t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),t.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(N.allowCustomizedBuiltInElements=t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Z&&(Y=!1),et&&(tt=!0),st&&(R=ze({},Xe),z=[],!0===st.html&&(ze(R,He),ze(z,Qe)),!0===st.svg&&(ze(R,Ue),ze(z,Ke),ze(z,tr)),!0===st.svgFilters&&(ze(R,Ye),ze(z,Ke),ze(z,tr)),!0===st.mathMl&&(ze(R,Ge),ze(z,Je),ze(z,tr))),t.ADD_TAGS&&(R===q&&(R=Ne(R)),ze(R,t.ADD_TAGS,St)),t.ADD_ATTR&&(z===W&&(z=Ne(z)),ze(z,t.ADD_ATTR,St)),t.ADD_URI_SAFE_ATTR&&ze(ut,t.ADD_URI_SAFE_ATTR,St),t.FORBID_CONTENTS&&(lt===ht&&(lt=Ne(lt)),ze(lt,t.FORBID_CONTENTS,St)),nt&&(R["#text"]=!0),Q&&ze(R,["html","head","body"]),R.table&&(ze(R,["tbody"]),delete j.tbody),t.TRUSTED_TYPES_POLICY){if("function"!=typeof t.TRUSTED_TYPES_POLICY.createHTML)throw Pe('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof t.TRUSTED_TYPES_POLICY.createScriptURL)throw Pe('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');k=t.TRUSTED_TYPES_POLICY,w=k.createHTML("")}else void 0===k&&(k=function(t,e){if("object"!=typeof t||"function"!=typeof t.createPolicy)return null;let r=null;const i="data-tt-policy-suffix";e&&e.hasAttribute(i)&&(r=e.getAttribute(i));const a="dompurify"+(r?"#"+r:"");try{return t.createPolicy(a,{createHTML:t=>t,createScriptURL:t=>t})}catch(n){return console.warn("TrustedTypes policy "+a+" could not be created."),null}}(g,n)),null!==k&&"string"==typeof w&&(w=k.createHTML(""));ke&&ke(t),Tt=t}},Lt=ze({},["mi","mo","mn","ms","mtext"]),Mt=ze({},["foreignobject","annotation-xml"]),Ft=ze({},["title","style","font","a","script"]),At=ze({},[...Ue,...Ye,...Ve]),$t=ze({},[...Ge,...Ze]),Et=function(t){Le(r.removed,{element:t});try{C(t).removeChild(t)}catch(e){m(t)}},Dt=function(t,e){try{Le(r.removed,{attribute:e.getAttributeNode(t),from:e})}catch(i){Le(r.removed,{attribute:null,from:e})}if(e.removeAttribute(t),"is"===t&&!z[t])if(tt||et)try{Et(e)}catch(i){}else try{e.setAttribute(t,"")}catch(i){}},It=function(t){let e=null,r=null;if(J)t="<remove></remove>"+t;else{const e=Ae(t,/^[\r\n\t ]+/);r=e&&e[0]}"application/xhtml+xml"===kt&&mt===yt&&(t='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+t+"</body></html>");const a=k?k.createHTML(t):t;if(mt===yt)try{e=(new p).parseFromString(a,kt)}catch(o){}if(!e||!e.documentElement){e=S.createDocument(mt,"template",null);try{e.documentElement.innerHTML=xt?w:a}catch(o){}}const n=e.body||e.documentElement;return t&&r&&n.insertBefore(i.createTextNode(r),n.childNodes[0]||null),mt===yt?B.call(e,Q?"html":"body")[0]:Q?e.documentElement:n},Ot=function(t){return T.call(t.ownerDocument||t,t,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},Pt=function(t){return t instanceof u&&("string"!=typeof t.nodeName||"string"!=typeof t.textContent||"function"!=typeof t.removeChild||!(t.attributes instanceof d)||"function"!=typeof t.removeAttribute||"function"!=typeof t.setAttribute||"string"!=typeof t.namespaceURI||"function"!=typeof t.insertBefore||"function"!=typeof t.hasChildNodes)},Rt=function(t){return"function"==typeof l&&t instanceof l},qt=function(t,e,i){L[t]&&Be(L[t],(t=>{t.call(r,e,i,Tt)}))},zt=function(t){let e=null;if(qt("beforeSanitizeElements",t,null),Pt(t))return Et(t),!0;const i=St(t.nodeName);if(qt("uponSanitizeElement",t,{tagName:i,allowedTags:R}),t.hasChildNodes()&&!Rt(t.firstElementChild)&&Oe(/<[/\w]/g,t.innerHTML)&&Oe(/<[/\w]/g,t.textContent))return Et(t),!0;if(t.nodeType===gr)return Et(t),!0;if(X&&t.nodeType===fr&&Oe(/<[/\w]/g,t.data))return Et(t),!0;if(!R[i]||j[i]){if(!j[i]&&Nt(i)){if(N.tagNameCheck instanceof RegExp&&Oe(N.tagNameCheck,i))return!1;if(N.tagNameCheck instanceof Function&&N.tagNameCheck(i))return!1}if(nt&&!lt[i]){const e=C(t)||t.parentNode,r=b(t)||t.childNodes;if(r&&e){for(let i=r.length-1;i>=0;--i){const a=y(r[i],!0);a.__removalCount=(t.__removalCount||0)+1,e.insertBefore(a,x(t))}}}return Et(t),!0}return t instanceof h&&!function(t){let e=C(t);e&&e.tagName||(e={namespaceURI:mt,tagName:"template"});const r=Me(t.tagName),i=Me(e.tagName);return!!bt[t.namespaceURI]&&(t.namespaceURI===ft?e.namespaceURI===yt?"svg"===r:e.namespaceURI===gt?"svg"===r&&("annotation-xml"===i||Lt[i]):Boolean(At[r]):t.namespaceURI===gt?e.namespaceURI===yt?"math"===r:e.namespaceURI===ft?"math"===r&&Mt[i]:Boolean($t[r]):t.namespaceURI===yt?!(e.namespaceURI===ft&&!Mt[i])&&!(e.namespaceURI===gt&&!Lt[i])&&!$t[r]&&(Ft[r]||!At[r]):!("application/xhtml+xml"!==kt||!bt[t.namespaceURI]))}(t)?(Et(t),!0):"noscript"!==i&&"noembed"!==i&&"noframes"!==i||!Oe(/<\/no(script|embed|frames)/i,t.innerHTML)?(Z&&t.nodeType===pr&&(e=t.textContent,Be([M,F,A],(t=>{e=$e(e,t," ")})),t.textContent!==e&&(Le(r.removed,{element:t.cloneNode()}),t.textContent=e)),qt("afterSanitizeElements",t,null),!1):(Et(t),!0)},Wt=function(t,e,r){if(it&&("id"===e||"name"===e)&&(r in i||r in vt))return!1;if(Y&&!H[e]&&Oe($,e));else if(U&&Oe(E,e));else if(!z[e]||H[e]){if(!(Nt(t)&&(N.tagNameCheck instanceof RegExp&&Oe(N.tagNameCheck,t)||N.tagNameCheck instanceof Function&&N.tagNameCheck(t))&&(N.attributeNameCheck instanceof RegExp&&Oe(N.attributeNameCheck,e)||N.attributeNameCheck instanceof Function&&N.attributeNameCheck(e))||"is"===e&&N.allowCustomizedBuiltInElements&&(N.tagNameCheck instanceof RegExp&&Oe(N.tagNameCheck,r)||N.tagNameCheck instanceof Function&&N.tagNameCheck(r))))return!1}else if(ut[e]);else if(Oe(P,$e(r,I,"")));else if("src"!==e&&"xlink:href"!==e&&"href"!==e||"script"===t||0!==Ee(r,"data:")||!ct[t]){if(V&&!Oe(D,$e(r,I,"")));else if(r)return!1}else;return!0},Nt=function(t){return"annotation-xml"!==t&&Ae(t,O)},jt=function(t){qt("beforeSanitizeAttributes",t,null);const{attributes:e}=t;if(!e)return;const i={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:z};let a=e.length;for(;a--;){const o=e[a],{name:s,namespaceURI:l,value:h}=o,c=St(s);let d="value"===s?h:De(h);if(i.attrName=c,i.attrValue=d,i.keepAttr=!0,i.forceKeepAttr=void 0,qt("uponSanitizeAttribute",t,i),d=i.attrValue,X&&Oe(/((--!?|])>)|<\/(style|title)/i,d)){Dt(s,t);continue}if(i.forceKeepAttr)continue;if(Dt(s,t),!i.keepAttr)continue;if(!G&&Oe(/\/>/i,d)){Dt(s,t);continue}Z&&Be([M,F,A],(t=>{d=$e(d,t," ")}));const u=St(t.nodeName);if(Wt(u,c,d)){if(!at||"id"!==c&&"name"!==c||(Dt(s,t),d="user-content-"+d),k&&"object"==typeof g&&"function"==typeof g.getAttributeType)if(l);else switch(g.getAttributeType(u,c)){case"TrustedHTML":d=k.createHTML(d);break;case"TrustedScriptURL":d=k.createScriptURL(d)}try{l?t.setAttributeNS(l,s,d):t.setAttribute(s,d),Pt(t)?Et(t):_e(r.removed)}catch(n){}}}qt("afterSanitizeAttributes",t,null)},Ht=function t(e){let r=null;const i=Ot(e);for(qt("beforeSanitizeShadowDOM",e,null);r=i.nextNode();)qt("uponSanitizeShadowNode",r,null),zt(r)||(r.content instanceof o&&t(r.content),jt(r));qt("afterSanitizeShadowDOM",e,null)};return r.sanitize=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=null,n=null,s=null,h=null;if(xt=!t,xt&&(t="\x3c!--\x3e"),"string"!=typeof t&&!Rt(t)){if("function"!=typeof t.toString)throw Pe("toString is not a function");if("string"!=typeof(t=t.toString()))throw Pe("dirty is not a string, aborting")}if(!r.isSupported)return t;if(K||_t(e),r.removed=[],"string"==typeof t&&(ot=!1),ot){if(t.nodeName){const e=St(t.nodeName);if(!R[e]||j[e])throw Pe("root node is forbidden and cannot be sanitized in-place")}}else if(t instanceof l)i=It("\x3c!----\x3e"),n=i.ownerDocument.importNode(t,!0),n.nodeType===ur&&"BODY"===n.nodeName||"HTML"===n.nodeName?i=n:i.appendChild(n);else{if(!tt&&!Z&&!Q&&-1===t.indexOf("<"))return k&&rt?k.createHTML(t):t;if(i=It(t),!i)return tt?null:rt?w:""}i&&J&&Et(i.firstChild);const c=Ot(ot?t:i);for(;s=c.nextNode();)zt(s)||(s.content instanceof o&&Ht(s.content),jt(s));if(ot)return t;if(tt){if(et)for(h=v.call(i.ownerDocument);i.firstChild;)h.appendChild(i.firstChild);else h=i;return(z.shadowroot||z.shadowrootmode)&&(h=_.call(a,h,!0)),h}let d=Q?i.outerHTML:i.innerHTML;return Q&&R["!doctype"]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&Oe(hr,i.ownerDocument.doctype.name)&&(d="<!DOCTYPE "+i.ownerDocument.doctype.name+">\n"+d),Z&&Be([M,F,A],(t=>{d=$e(d,t," ")})),k&&rt?k.createHTML(d):d},r.setConfig=function(){_t(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),K=!0},r.clearConfig=function(){Tt=null,K=!1},r.isValidAttribute=function(t,e,r){Tt||_t({});const i=St(t),a=St(e);return Wt(i,a,r)},r.addHook=function(t,e){"function"==typeof e&&(L[t]=L[t]||[],Le(L[t],e))},r.removeHook=function(t){if(L[t])return _e(L[t])},r.removeHooks=function(t){L[t]&&(L[t]=[])},r.removeAllHooks=function(){L={}},r}(),br=Object.defineProperty,Cr=(t,e)=>br(t,"name",{value:e,configurable:!0}),kr=(t,e)=>{for(var r in e)br(t,r,{get:e[r],enumerable:!0})},wr={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},Sr={trace:Cr(((...t)=>{}),"trace"),debug:Cr(((...t)=>{}),"debug"),info:Cr(((...t)=>{}),"info"),warn:Cr(((...t)=>{}),"warn"),error:Cr(((...t)=>{}),"error"),fatal:Cr(((...t)=>{}),"fatal")},Tr=Cr((function(t="fatal"){let e=wr.fatal;"string"==typeof t?t.toLowerCase()in wr&&(e=wr[t]):"number"==typeof t&&(e=t),Sr.trace=()=>{},Sr.debug=()=>{},Sr.info=()=>{},Sr.warn=()=>{},Sr.error=()=>{},Sr.fatal=()=>{},e<=wr.fatal&&(Sr.fatal=console.error?console.error.bind(console,vr("FATAL"),"color: orange"):console.log.bind(console,"",vr("FATAL"))),e<=wr.error&&(Sr.error=console.error?console.error.bind(console,vr("ERROR"),"color: orange"):console.log.bind(console,"",vr("ERROR"))),e<=wr.warn&&(Sr.warn=console.warn?console.warn.bind(console,vr("WARN"),"color: orange"):console.log.bind(console,"",vr("WARN"))),e<=wr.info&&(Sr.info=console.info?console.info.bind(console,vr("INFO"),"color: lightblue"):console.log.bind(console,"",vr("INFO"))),e<=wr.debug&&(Sr.debug=console.debug?console.debug.bind(console,vr("DEBUG"),"color: lightgreen"):console.log.bind(console,"",vr("DEBUG"))),e<=wr.trace&&(Sr.trace=console.debug?console.debug.bind(console,vr("TRACE"),"color: lightgreen"):console.log.bind(console,"",vr("TRACE")))}),"setLogLevel"),vr=Cr((t=>`%c${Vt().format("ss.SSS")} : ${t} : `),"format"),Br=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,_r=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,Lr=/\s*%%.*\n/gm,Mr=(t=class extends Error{constructor(t){super(t),this.name="UnknownDiagramError"}},Cr(t,"UnknownDiagramError"),t),Fr={},Ar=Cr((function(t,e){t=t.replace(Br,"").replace(_r,"").replace(Lr,"\n");for(const[r,{detector:i}]of Object.entries(Fr)){if(i(t,e))return r}throw new Mr(`No diagram type detected matching given configuration for text: ${t}`)}),"detectType"),$r=Cr(((...t)=>{for(const{id:e,detector:r,loader:i}of t)Er(e,r,i)}),"registerLazyLoadedDiagrams"),Er=Cr(((t,e,r)=>{Fr[t]&&Sr.warn(`Detector with key ${t} already exists. Overwriting.`),Fr[t]={detector:e,loader:r},Sr.debug(`Detector with key ${t} added${r?" with loader":""}`)}),"addDetector"),Dr=Cr((t=>Fr[t].loader),"getDiagramLoader"),Ir=Cr(((t,e,{depth:r=2,clobber:i=!1}={})=>{const a={depth:r,clobber:i};return Array.isArray(e)&&!Array.isArray(t)?(e.forEach((e=>Ir(t,e,a))),t):Array.isArray(e)&&Array.isArray(t)?(e.forEach((e=>{t.includes(e)||t.push(e)})),t):void 0===t||r<=0?null!=t&&"object"==typeof t&&"object"==typeof e?Object.assign(t,e):e:(void 0!==e&&"object"==typeof t&&"object"==typeof e&&Object.keys(e).forEach((a=>{"object"!=typeof e[a]||void 0!==t[a]&&"object"!=typeof t[a]?(i||"object"!=typeof t[a]&&"object"!=typeof e[a])&&(t[a]=e[a]):(void 0===t[a]&&(t[a]=Array.isArray(e[a])?[]:{}),t[a]=Ir(t[a],e[a],{depth:r-1,clobber:i}))})),t)}),"assignWithDepth"),Or=Ir,Pr="#ffffff",Rr="#f2f2f2",qr=Cr(((t,e)=>ge(t,e?{s:-40,l:10}:{s:-40,l:-10})),"mkBorder"),zr=(Cr(e=class{constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px"}updateColors(){var t,e,r,i,a,n,o,s,l,h,c;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||ge(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||ge(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||qr(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||qr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||qr(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||qr(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||fe(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||fe(this.tertiaryColor),this.lineColor=this.lineColor||fe(this.background),this.arrowheadColor=this.arrowheadColor||fe(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?pe(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||pe(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||fe(this.lineColor),this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||ue(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||this.tertiaryColor,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||ge(this.primaryColor,{h:30}),this.cScale4=this.cScale4||ge(this.primaryColor,{h:60}),this.cScale5=this.cScale5||ge(this.primaryColor,{h:90}),this.cScale6=this.cScale6||ge(this.primaryColor,{h:120}),this.cScale7=this.cScale7||ge(this.primaryColor,{h:150}),this.cScale8=this.cScale8||ge(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||ge(this.primaryColor,{h:270}),this.cScale10=this.cScale10||ge(this.primaryColor,{h:300}),this.cScale11=this.cScale11||ge(this.primaryColor,{h:330}),this.darkMode)for(let u=0;u<this.THEME_COLOR_LIMIT;u++)this["cScale"+u]=pe(this["cScale"+u],75);else for(let u=0;u<this.THEME_COLOR_LIMIT;u++)this["cScale"+u]=pe(this["cScale"+u],25);for(let u=0;u<this.THEME_COLOR_LIMIT;u++)this["cScaleInv"+u]=this["cScaleInv"+u]||fe(this["cScale"+u]);for(let u=0;u<this.THEME_COLOR_LIMIT;u++)this.darkMode?this["cScalePeer"+u]=this["cScalePeer"+u]||ue(this["cScale"+u],10):this["cScalePeer"+u]=this["cScalePeer"+u]||pe(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 d=this.darkMode?-4:-1;for(let u=0;u<5;u++)this["surface"+u]=this["surface"+u]||ge(this.mainBkg,{h:180,s:-15,l:d*(5+3*u)}),this["surfacePeer"+u]=this["surfacePeer"+u]||ge(this.mainBkg,{h:180,s:-15,l:d*(8+3*u)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||ge(this.primaryColor,{h:64}),this.fillType3=this.fillType3||ge(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||ge(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||ge(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||ge(this.primaryColor,{h:128}),this.fillType7=this.fillType7||ge(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||ge(this.primaryColor,{l:-10}),this.pie5=this.pie5||ge(this.secondaryColor,{l:-10}),this.pie6=this.pie6||ge(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||ge(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||ge(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||ge(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||ge(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||ge(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||ge(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.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||ge(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||ge(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||ge(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||ge(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||ge(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||ge(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ce(this.quadrant1Fill)?ue(this.quadrant1Fill):pe(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:(null==(t=this.xyChart)?void 0:t.backgroundColor)||this.background,titleColor:(null==(e=this.xyChart)?void 0:e.titleColor)||this.primaryTextColor,xAxisTitleColor:(null==(r=this.xyChart)?void 0:r.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:(null==(i=this.xyChart)?void 0:i.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:(null==(a=this.xyChart)?void 0:a.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:(null==(n=this.xyChart)?void 0:n.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:(null==(o=this.xyChart)?void 0:o.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:(null==(s=this.xyChart)?void 0:s.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:(null==(l=this.xyChart)?void 0:l.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:(null==(h=this.xyChart)?void 0:h.yAxisLineColor)||this.primaryTextColor,plotColorPalette:(null==(c=this.xyChart)?void 0:c.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?pe(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||ge(this.primaryColor,{h:-30}),this.git4=this.git4||ge(this.primaryColor,{h:-60}),this.git5=this.git5||ge(this.primaryColor,{h:-90}),this.git6=this.git6||ge(this.primaryColor,{h:60}),this.git7=this.git7||ge(this.primaryColor,{h:120}),this.darkMode?(this.git0=ue(this.git0,25),this.git1=ue(this.git1,25),this.git2=ue(this.git2,25),this.git3=ue(this.git3,25),this.git4=ue(this.git4,25),this.git5=ue(this.git5,25),this.git6=ue(this.git6,25),this.git7=ue(this.git7,25)):(this.git0=pe(this.git0,25),this.git1=pe(this.git1,25),this.git2=pe(this.git2,25),this.git3=pe(this.git3,25),this.git4=pe(this.git4,25),this.git5=pe(this.git5,25),this.git6=pe(this.git6,25),this.git7=pe(this.git7,25)),this.gitInv0=this.gitInv0||fe(this.git0),this.gitInv1=this.gitInv1||fe(this.git1),this.gitInv2=this.gitInv2||fe(this.git2),this.gitInv3=this.gitInv3||fe(this.git3),this.gitInv4=this.gitInv4||fe(this.git4),this.gitInv5=this.gitInv5||fe(this.git5),this.gitInv6=this.gitInv6||fe(this.git6),this.gitInv7=this.gitInv7||fe(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||Pr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Rr}calculate(t){if("object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach((e=>{this[e]=t[e]})),this.updateColors(),e.forEach((e=>{this[e]=t[e]}))}},"Theme"),e),Wr=Cr((t=>{const e=new zr;return e.calculate(t),e}),"getThemeVariables"),Nr=(Cr(r=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=ue(this.primaryColor,16),this.tertiaryColor=ge(this.primaryColor,{h:-160}),this.primaryBorderColor=fe(this.background),this.secondaryBorderColor=qr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=qr(this.tertiaryColor,this.darkMode),this.primaryTextColor=fe(this.primaryColor),this.secondaryTextColor=fe(this.secondaryColor),this.tertiaryTextColor=fe(this.tertiaryColor),this.lineColor=fe(this.background),this.textColor=fe(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=ue(fe("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=le(255,255,255,.25),this.arrowheadColor="calculated",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#F9FFFE",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="calculated",this.activationBkgColor="calculated",this.sequenceNumberColor="black",this.sectionBkgColor=pe("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=pe(this.sectionBkgColor,10),this.taskBorderColor=le(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=le(255,255,255,50),this.activeTaskBkgColor="#81B1DB",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="grey",this.critBorderColor="#E83737",this.critBkgColor="#E83737",this.taskTextDarkColor="calculated",this.todayLineColor="#DB5757",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd"}updateColors(){var t,e,r,i,a,n,o,s,l,h,c;this.secondBkg=ue(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=ue(this.labelBackground,25),this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.actorTextColor=this.mainContrastColor,this.actorLineColor=this.actorBorder,this.signalColor=this.mainContrastColor,this.signalTextColor=this.mainContrastColor,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.mainContrastColor,this.loopTextColor=this.mainContrastColor,this.noteBorderColor=this.secondaryBorderColor,this.noteBkgColor=this.secondBkg,this.noteTextColor=this.secondaryTextColor,this.activationBorderColor=this.border1,this.activationBkgColor=this.secondBkg,this.altSectionBkgColor=this.background,this.taskBkgColor=ue(this.mainBkg,23),this.taskTextColor=this.darkTextColor,this.taskTextLightColor=this.mainContrastColor,this.taskTextOutsideColor=this.taskTextLightColor,this.gridColor=this.mainContrastColor,this.doneTaskBkgColor=this.mainContrastColor,this.taskTextDarkColor=this.darkTextColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#555",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#f4f4f4",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=ge(this.primaryColor,{h:64}),this.fillType3=ge(this.secondaryColor,{h:64}),this.fillType4=ge(this.primaryColor,{h:-64}),this.fillType5=ge(this.secondaryColor,{h:-64}),this.fillType6=ge(this.primaryColor,{h:128}),this.fillType7=ge(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||ge(this.primaryColor,{h:30}),this.cScale4=this.cScale4||ge(this.primaryColor,{h:60}),this.cScale5=this.cScale5||ge(this.primaryColor,{h:90}),this.cScale6=this.cScale6||ge(this.primaryColor,{h:120}),this.cScale7=this.cScale7||ge(this.primaryColor,{h:150}),this.cScale8=this.cScale8||ge(this.primaryColor,{h:210}),this.cScale9=this.cScale9||ge(this.primaryColor,{h:270}),this.cScale10=this.cScale10||ge(this.primaryColor,{h:300}),this.cScale11=this.cScale11||ge(this.primaryColor,{h:330});for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScaleInv"+d]=this["cScaleInv"+d]||fe(this["cScale"+d]);for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScalePeer"+d]=this["cScalePeer"+d]||ue(this["cScale"+d],10);for(let d=0;d<5;d++)this["surface"+d]=this["surface"+d]||ge(this.mainBkg,{h:30,s:-30,l:-(4*d-10)}),this["surfacePeer"+d]=this["surfacePeer"+d]||ge(this.mainBkg,{h:30,s:-30,l:-(4*d-7)});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.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.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||ge(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||ge(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||ge(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||ge(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||ge(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||ge(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ce(this.quadrant1Fill)?ue(this.quadrant1Fill):pe(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:(null==(t=this.xyChart)?void 0:t.backgroundColor)||this.background,titleColor:(null==(e=this.xyChart)?void 0:e.titleColor)||this.primaryTextColor,xAxisTitleColor:(null==(r=this.xyChart)?void 0:r.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:(null==(i=this.xyChart)?void 0:i.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:(null==(a=this.xyChart)?void 0:a.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:(null==(n=this.xyChart)?void 0:n.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:(null==(o=this.xyChart)?void 0:o.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:(null==(s=this.xyChart)?void 0:s.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:(null==(l=this.xyChart)?void 0:l.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:(null==(h=this.xyChart)?void 0:h.yAxisLineColor)||this.primaryTextColor,plotColorPalette:(null==(c=this.xyChart)?void 0:c.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.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?pe(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=ue(this.secondaryColor,20),this.git1=ue(this.pie2||this.secondaryColor,20),this.git2=ue(this.pie3||this.tertiaryColor,20),this.git3=ue(this.pie4||ge(this.primaryColor,{h:-30}),20),this.git4=ue(this.pie5||ge(this.primaryColor,{h:-60}),20),this.git5=ue(this.pie6||ge(this.primaryColor,{h:-90}),10),this.git6=ue(this.pie7||ge(this.primaryColor,{h:60}),10),this.git7=ue(this.pie8||ge(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||fe(this.git0),this.gitInv1=this.gitInv1||fe(this.git1),this.gitInv2=this.gitInv2||fe(this.git2),this.gitInv3=this.gitInv3||fe(this.git3),this.gitInv4=this.gitInv4||fe(this.git4),this.gitInv5=this.gitInv5||fe(this.git5),this.gitInv6=this.gitInv6||fe(this.git6),this.gitInv7=this.gitInv7||fe(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||fe(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||fe(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.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||ue(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ue(this.background,2),this.nodeBorder=this.nodeBorder||"#999"}calculate(t){if("object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach((e=>{this[e]=t[e]})),this.updateColors(),e.forEach((e=>{this[e]=t[e]}))}},"Theme"),r),jr=Cr((t=>{const e=new Nr;return e.calculate(t),e}),"getThemeVariables"),Hr=(Cr(i=class{constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=ge(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=ge(this.primaryColor,{h:-160}),this.primaryBorderColor=qr(this.primaryColor,this.darkMode),this.secondaryBorderColor=qr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=qr(this.tertiaryColor,this.darkMode),this.primaryTextColor=fe(this.primaryColor),this.secondaryTextColor=fe(this.secondaryColor),this.tertiaryTextColor=fe(this.tertiaryColor),this.lineColor=fe(this.background),this.textColor=fe(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.border2="#aaaa33",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="rgba(232,232,232, 0.8)",this.textColor="#333",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="calculated",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="calculated",this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor="calculated",this.taskTextOutsideColor=this.taskTextDarkColor,this.taskTextClickableColor="calculated",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBorderColor="calculated",this.critBkgColor="calculated",this.todayLineColor="calculated",this.sectionBkgColor=le(102,102,255,.49),this.altSectionBkgColor="white",this.sectionBkgColor2="#fff400",this.taskBorderColor="#534fbc",this.taskBkgColor="#8a90dd",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="#534fbc",this.activeTaskBkgColor="#bfc7ff",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.updateColors()}updateColors(){var t,e,r,i,a,n,o,s,l,h,c;this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||ge(this.primaryColor,{h:30}),this.cScale4=this.cScale4||ge(this.primaryColor,{h:60}),this.cScale5=this.cScale5||ge(this.primaryColor,{h:90}),this.cScale6=this.cScale6||ge(this.primaryColor,{h:120}),this.cScale7=this.cScale7||ge(this.primaryColor,{h:150}),this.cScale8=this.cScale8||ge(this.primaryColor,{h:210}),this.cScale9=this.cScale9||ge(this.primaryColor,{h:270}),this.cScale10=this.cScale10||ge(this.primaryColor,{h:300}),this.cScale11=this.cScale11||ge(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||pe(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||pe(this.tertiaryColor,40);for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScale"+d]=pe(this["cScale"+d],10),this["cScalePeer"+d]=this["cScalePeer"+d]||pe(this["cScale"+d],25);for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScaleInv"+d]=this["cScaleInv"+d]||ge(this["cScale"+d],{h:180});for(let d=0;d<5;d++)this["surface"+d]=this["surface"+d]||ge(this.mainBkg,{h:30,l:-(5+5*d)}),this["surfacePeer"+d]=this["surfacePeer"+d]||ge(this.mainBkg,{h:30,l:-(7+5*d)});if(this.scaleLabelColor="calculated"!==this.scaleLabelColor&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,"calculated"!==this.labelTextColor){this.cScaleLabel0=this.cScaleLabel0||fe(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||fe(this.labelTextColor);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.labelTextColor}this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.textColor,this.edgeLabelBackground=this.labelBackground,this.actorBorder=ue(this.border1,23),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.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,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||"#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=ge(this.primaryColor,{h:64}),this.fillType3=ge(this.secondaryColor,{h:64}),this.fillType4=ge(this.primaryColor,{h:-64}),this.fillType5=ge(this.secondaryColor,{h:-64}),this.fillType6=ge(this.primaryColor,{h:128}),this.fillType7=ge(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||ge(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||ge(this.primaryColor,{l:-10}),this.pie5=this.pie5||ge(this.secondaryColor,{l:-30}),this.pie6=this.pie6||ge(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||ge(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||ge(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||ge(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||ge(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||ge(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||ge(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.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||ge(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||ge(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||ge(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||ge(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||ge(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||ge(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ce(this.quadrant1Fill)?ue(this.quadrant1Fill):pe(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:(null==(t=this.xyChart)?void 0:t.backgroundColor)||this.background,titleColor:(null==(e=this.xyChart)?void 0:e.titleColor)||this.primaryTextColor,xAxisTitleColor:(null==(r=this.xyChart)?void 0:r.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:(null==(i=this.xyChart)?void 0:i.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:(null==(a=this.xyChart)?void 0:a.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:(null==(n=this.xyChart)?void 0:n.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:(null==(o=this.xyChart)?void 0:o.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:(null==(s=this.xyChart)?void 0:s.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:(null==(l=this.xyChart)?void 0:l.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:(null==(h=this.xyChart)?void 0:h.yAxisLineColor)||this.primaryTextColor,plotColorPalette:(null==(c=this.xyChart)?void 0:c.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||ge(this.primaryColor,{h:-30}),this.git4=this.git4||ge(this.primaryColor,{h:-60}),this.git5=this.git5||ge(this.primaryColor,{h:-90}),this.git6=this.git6||ge(this.primaryColor,{h:60}),this.git7=this.git7||ge(this.primaryColor,{h:120}),this.darkMode?(this.git0=ue(this.git0,25),this.git1=ue(this.git1,25),this.git2=ue(this.git2,25),this.git3=ue(this.git3,25),this.git4=ue(this.git4,25),this.git5=ue(this.git5,25),this.git6=ue(this.git6,25),this.git7=ue(this.git7,25)):(this.git0=pe(this.git0,25),this.git1=pe(this.git1,25),this.git2=pe(this.git2,25),this.git3=pe(this.git3,25),this.git4=pe(this.git4,25),this.git5=pe(this.git5,25),this.git6=pe(this.git6,25),this.git7=pe(this.git7,25)),this.gitInv0=this.gitInv0||pe(fe(this.git0),25),this.gitInv1=this.gitInv1||fe(this.git1),this.gitInv2=this.gitInv2||fe(this.git2),this.gitInv3=this.gitInv3||fe(this.git3),this.gitInv4=this.gitInv4||fe(this.git4),this.gitInv5=this.gitInv5||fe(this.git5),this.gitInv6=this.gitInv6||fe(this.git6),this.gitInv7=this.gitInv7||fe(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||fe(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||fe(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.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Pr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Rr}calculate(t){if("object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach((e=>{this[e]=t[e]})),this.updateColors(),e.forEach((e=>{this[e]=t[e]}))}},"Theme"),i),Ur=Cr((t=>{const e=new Hr;return e.calculate(t),e}),"getThemeVariables"),Yr=(Cr(a=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=ue("#cde498",10),this.primaryBorderColor=qr(this.primaryColor,this.darkMode),this.secondaryBorderColor=qr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=qr(this.tertiaryColor,this.darkMode),this.primaryTextColor=fe(this.primaryColor),this.secondaryTextColor=fe(this.secondaryColor),this.tertiaryTextColor=fe(this.primaryColor),this.lineColor=fe(this.background),this.textColor=fe(this.background),this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#333",this.edgeLabelBackground="#e8e8e8",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="#333",this.signalTextColor="#333",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="#326932",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="#6eaa49",this.altSectionBkgColor="white",this.sectionBkgColor2="#6eaa49",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="#487e3a",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){var t,e,r,i,a,n,o,s,l,h,c;this.actorBorder=pe(this.mainBkg,20),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||ge(this.primaryColor,{h:30}),this.cScale4=this.cScale4||ge(this.primaryColor,{h:60}),this.cScale5=this.cScale5||ge(this.primaryColor,{h:90}),this.cScale6=this.cScale6||ge(this.primaryColor,{h:120}),this.cScale7=this.cScale7||ge(this.primaryColor,{h:150}),this.cScale8=this.cScale8||ge(this.primaryColor,{h:210}),this.cScale9=this.cScale9||ge(this.primaryColor,{h:270}),this.cScale10=this.cScale10||ge(this.primaryColor,{h:300}),this.cScale11=this.cScale11||ge(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||pe(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||pe(this.tertiaryColor,40);for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScale"+d]=pe(this["cScale"+d],10),this["cScalePeer"+d]=this["cScalePeer"+d]||pe(this["cScale"+d],25);for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScaleInv"+d]=this["cScaleInv"+d]||ge(this["cScale"+d],{h:180});this.scaleLabelColor="calculated"!==this.scaleLabelColor&&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]||ge(this.mainBkg,{h:30,s:-30,l:-(5+5*d)}),this["surfacePeer"+d]=this["surfacePeer"+d]||ge(this.mainBkg,{h:30,s:-30,l:-(8+5*d)});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.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=ge(this.primaryColor,{h:64}),this.fillType3=ge(this.secondaryColor,{h:64}),this.fillType4=ge(this.primaryColor,{h:-64}),this.fillType5=ge(this.secondaryColor,{h:-64}),this.fillType6=ge(this.primaryColor,{h:128}),this.fillType7=ge(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||ge(this.primaryColor,{l:-30}),this.pie5=this.pie5||ge(this.secondaryColor,{l:-30}),this.pie6=this.pie6||ge(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||ge(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||ge(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||ge(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||ge(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||ge(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||ge(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.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||ge(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||ge(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||ge(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||ge(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||ge(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||ge(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ce(this.quadrant1Fill)?ue(this.quadrant1Fill):pe(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.xyChart={backgroundColor:(null==(t=this.xyChart)?void 0:t.backgroundColor)||this.background,titleColor:(null==(e=this.xyChart)?void 0:e.titleColor)||this.primaryTextColor,xAxisTitleColor:(null==(r=this.xyChart)?void 0:r.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:(null==(i=this.xyChart)?void 0:i.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:(null==(a=this.xyChart)?void 0:a.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:(null==(n=this.xyChart)?void 0:n.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:(null==(o=this.xyChart)?void 0:o.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:(null==(s=this.xyChart)?void 0:s.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:(null==(l=this.xyChart)?void 0:l.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:(null==(h=this.xyChart)?void 0:h.yAxisLineColor)||this.primaryTextColor,plotColorPalette:(null==(c=this.xyChart)?void 0:c.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||ge(this.primaryColor,{h:-30}),this.git4=this.git4||ge(this.primaryColor,{h:-60}),this.git5=this.git5||ge(this.primaryColor,{h:-90}),this.git6=this.git6||ge(this.primaryColor,{h:60}),this.git7=this.git7||ge(this.primaryColor,{h:120}),this.darkMode?(this.git0=ue(this.git0,25),this.git1=ue(this.git1,25),this.git2=ue(this.git2,25),this.git3=ue(this.git3,25),this.git4=ue(this.git4,25),this.git5=ue(this.git5,25),this.git6=ue(this.git6,25),this.git7=ue(this.git7,25)):(this.git0=pe(this.git0,25),this.git1=pe(this.git1,25),this.git2=pe(this.git2,25),this.git3=pe(this.git3,25),this.git4=pe(this.git4,25),this.git5=pe(this.git5,25),this.git6=pe(this.git6,25),this.git7=pe(this.git7,25)),this.gitInv0=this.gitInv0||fe(this.git0),this.gitInv1=this.gitInv1||fe(this.git1),this.gitInv2=this.gitInv2||fe(this.git2),this.gitInv3=this.gitInv3||fe(this.git3),this.gitInv4=this.gitInv4||fe(this.git4),this.gitInv5=this.gitInv5||fe(this.git5),this.gitInv6=this.gitInv6||fe(this.git6),this.gitInv7=this.gitInv7||fe(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||fe(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||fe(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.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Pr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Rr}calculate(t){if("object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach((e=>{this[e]=t[e]})),this.updateColors(),e.forEach((e=>{this[e]=t[e]}))}},"Theme"),a),Vr=Cr((t=>{const e=new Yr;return e.calculate(t),e}),"getThemeVariables"),Gr=(Cr(n=class{constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=ue(this.contrast,55),this.background="#ffffff",this.tertiaryColor=ge(this.primaryColor,{h:-160}),this.primaryBorderColor=qr(this.primaryColor,this.darkMode),this.secondaryBorderColor=qr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=qr(this.tertiaryColor,this.darkMode),this.primaryTextColor=fe(this.primaryColor),this.secondaryTextColor=fe(this.secondaryColor),this.tertiaryTextColor=fe(this.tertiaryColor),this.lineColor=fe(this.background),this.textColor=fe(this.background),this.mainBkg="#eee",this.secondBkg="calculated",this.lineColor="#666",this.border1="#999",this.border2="calculated",this.note="#ffa",this.text="#333",this.critical="#d42",this.done="#bbb",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="white",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor=this.actorBorder,this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="calculated",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="white",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBkgColor="calculated",this.critBorderColor="calculated",this.todayLineColor="calculated",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){var t,e,r,i,a,n,o,s,l,h,c;this.secondBkg=ue(this.contrast,55),this.border2=this.contrast,this.actorBorder=ue(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.actorBorder,this.signalColor=this.text,this.signalTextColor=this.text,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.text,this.loopTextColor=this.text,this.noteBorderColor="#999",this.noteBkgColor="#666",this.noteTextColor="#fff",this.cScale0=this.cScale0||"#555",this.cScale1=this.cScale1||"#F4F4F4",this.cScale2=this.cScale2||"#555",this.cScale3=this.cScale3||"#BBB",this.cScale4=this.cScale4||"#777",this.cScale5=this.cScale5||"#999",this.cScale6=this.cScale6||"#DDD",this.cScale7=this.cScale7||"#FFF",this.cScale8=this.cScale8||"#DDD",this.cScale9=this.cScale9||"#BBB",this.cScale10=this.cScale10||"#999",this.cScale11=this.cScale11||"#777";for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScaleInv"+d]=this["cScaleInv"+d]||fe(this["cScale"+d]);for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this.darkMode?this["cScalePeer"+d]=this["cScalePeer"+d]||ue(this["cScale"+d],10):this["cScalePeer"+d]=this["cScalePeer"+d]||pe(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]||ge(this.mainBkg,{l:-(5+5*d)}),this["surfacePeer"+d]=this["surfacePeer"+d]||ge(this.mainBkg,{l:-(8+5*d)});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=ue(this.contrast,30),this.sectionBkgColor2=ue(this.contrast,30),this.taskBorderColor=pe(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=ue(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=pe(this.critBkgColor,10),this.todayLineColor=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=ge(this.primaryColor,{h:64}),this.fillType3=ge(this.secondaryColor,{h:64}),this.fillType4=ge(this.primaryColor,{h:-64}),this.fillType5=ge(this.secondaryColor,{h:-64}),this.fillType6=ge(this.primaryColor,{h:128}),this.fillType7=ge(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",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||ge(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||ge(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||ge(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||ge(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||ge(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||ge(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ce(this.quadrant1Fill)?ue(this.quadrant1Fill):pe(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:(null==(t=this.xyChart)?void 0:t.backgroundColor)||this.background,titleColor:(null==(e=this.xyChart)?void 0:e.titleColor)||this.primaryTextColor,xAxisTitleColor:(null==(r=this.xyChart)?void 0:r.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:(null==(i=this.xyChart)?void 0:i.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:(null==(a=this.xyChart)?void 0:a.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:(null==(n=this.xyChart)?void 0:n.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:(null==(o=this.xyChart)?void 0:o.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:(null==(s=this.xyChart)?void 0:s.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:(null==(l=this.xyChart)?void 0:l.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:(null==(h=this.xyChart)?void 0:h.yAxisLineColor)||this.primaryTextColor,plotColorPalette:(null==(c=this.xyChart)?void 0:c.plotColorPalette)||"#EEE,#6BB8E4,#8ACB88,#C7ACD6,#E8DCC2,#FFB2A8,#FFF380,#7E8D91,#FFD8B1,#FAF3E0"},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=pe(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||ge(this.primaryColor,{h:-30}),this.git4=this.pie5||ge(this.primaryColor,{h:-60}),this.git5=this.pie6||ge(this.primaryColor,{h:-90}),this.git6=this.pie7||ge(this.primaryColor,{h:60}),this.git7=this.pie8||ge(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||fe(this.git0),this.gitInv1=this.gitInv1||fe(this.git1),this.gitInv2=this.gitInv2||fe(this.git2),this.gitInv3=this.gitInv3||fe(this.git3),this.gitInv4=this.gitInv4||fe(this.git4),this.gitInv5=this.gitInv5||fe(this.git5),this.gitInv6=this.gitInv6||fe(this.git6),this.gitInv7=this.gitInv7||fe(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.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Pr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Rr}calculate(t){if("object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach((e=>{this[e]=t[e]})),this.updateColors(),e.forEach((e=>{this[e]=t[e]}))}},"Theme"),n),Zr={base:{getThemeVariables:Wr},dark:{getThemeVariables:jr},default:{getThemeVariables:Ur},forest:{getThemeVariables:Vr},neutral:{getThemeVariables:Cr((t=>{const e=new Gr;return e.calculate(t),e}),"getThemeVariables")}},Xr={flowchart:{useMaxWidth:!0,titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:!0,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,defaultRenderer:"dagre-wrapper",wrappingWidth:200},sequence:{useMaxWidth:!0,hideUnusedParticipants:!1,activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",mirrorActors:!0,forceMenus:!1,bottomMarginAdj:1,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:400,noteFontSize:14,noteFontFamily:'"trebuchet ms", verdana, arial, sans-serif',noteFontWeight:400,noteAlign:"center",messageFontSize:16,messageFontFamily:'"trebuchet ms", verdana, arial, sans-serif',messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20},gantt:{useMaxWidth:!0,titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d",topAxis:!1,displayMode:"",weekday:"sunday"},journey:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"]},class:{useMaxWidth:!0,titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,defaultRenderer:"dagre-wrapper",htmlLabels:!1},state:{useMaxWidth:!0,titleTopMargin:25,dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:"20",compositTitleSize:35,radius:5,defaultRenderer:"dagre-wrapper"},er:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,stroke:"gray",fill:"honeydew",fontSize:12},pie:{useMaxWidth:!0,textPosition:.75},quadrantChart:{useMaxWidth:!0,chartWidth:500,chartHeight:500,titleFontSize:20,titlePadding:10,quadrantPadding:5,xAxisLabelPadding:5,yAxisLabelPadding:5,xAxisLabelFontSize:16,yAxisLabelFontSize:16,quadrantLabelFontSize:16,quadrantTextTopPadding:5,pointTextPadding:5,pointLabelFontSize:12,pointRadius:5,xAxisPosition:"top",yAxisPosition:"left",quadrantInternalBorderStrokeWidth:1,quadrantExternalBorderStrokeWidth:2},xyChart:{useMaxWidth:!0,width:700,height:500,titleFontSize:20,titlePadding:10,showTitle:!0,xAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},yAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},chartOrientation:"vertical",plotReservedSpacePercent:50},requirement:{useMaxWidth:!0,rect_fill:"#f9f9f9",text_color:"#333",rect_border_size:"0.5px",rect_border_color:"#bbb",rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200},timeline:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],disableMulticolor:!1},gitGraph:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:"main",mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0,parallelCommits:!1,arrowMarkerAbsolute:!1},c4:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,c4ShapeInRow:4,nextLinePaddingX:0,c4BoundaryInRow:2,personFontSize:14,personFontFamily:'"Open Sans", sans-serif',personFontWeight:"normal",external_personFontSize:14,external_personFontFamily:'"Open Sans", sans-serif',external_personFontWeight:"normal",systemFontSize:14,systemFontFamily:'"Open Sans", sans-serif',systemFontWeight:"normal",external_systemFontSize:14,external_systemFontFamily:'"Open Sans", sans-serif',external_systemFontWeight:"normal",system_dbFontSize:14,system_dbFontFamily:'"Open Sans", sans-serif',system_dbFontWeight:"normal",external_system_dbFontSize:14,external_system_dbFontFamily:'"Open Sans", sans-serif',external_system_dbFontWeight:"normal",system_queueFontSize:14,system_queueFontFamily:'"Open Sans", sans-serif',system_queueFontWeight:"normal",external_system_queueFontSize:14,external_system_queueFontFamily:'"Open Sans", sans-serif',external_system_queueFontWeight:"normal",boundaryFontSize:14,boundaryFontFamily:'"Open Sans", sans-serif',boundaryFontWeight:"normal",messageFontSize:12,messageFontFamily:'"Open Sans", sans-serif',messageFontWeight:"normal",containerFontSize:14,containerFontFamily:'"Open Sans", sans-serif',containerFontWeight:"normal",external_containerFontSize:14,external_containerFontFamily:'"Open Sans", sans-serif',external_containerFontWeight:"normal",container_dbFontSize:14,container_dbFontFamily:'"Open Sans", sans-serif',container_dbFontWeight:"normal",external_container_dbFontSize:14,external_container_dbFontFamily:'"Open Sans", sans-serif',external_container_dbFontWeight:"normal",container_queueFontSize:14,container_queueFontFamily:'"Open Sans", sans-serif',container_queueFontWeight:"normal",external_container_queueFontSize:14,external_container_queueFontFamily:'"Open Sans", sans-serif',external_container_queueFontWeight:"normal",componentFontSize:14,componentFontFamily:'"Open Sans", sans-serif',componentFontWeight:"normal",external_componentFontSize:14,external_componentFontFamily:'"Open Sans", sans-serif',external_componentFontWeight:"normal",component_dbFontSize:14,component_dbFontFamily:'"Open Sans", sans-serif',component_dbFontWeight:"normal",external_component_dbFontSize:14,external_component_dbFontFamily:'"Open Sans", sans-serif',external_component_dbFontWeight:"normal",component_queueFontSize:14,component_queueFontFamily:'"Open Sans", sans-serif',component_queueFontWeight:"normal",external_component_queueFontSize:14,external_component_queueFontFamily:'"Open Sans", sans-serif',external_component_queueFontWeight:"normal",wrap:!0,wrapPadding:10,person_bg_color:"#08427B",person_border_color:"#073B6F",external_person_bg_color:"#686868",external_person_border_color:"#8A8A8A",system_bg_color:"#1168BD",system_border_color:"#3C7FC0",system_db_bg_color:"#1168BD",system_db_border_color:"#3C7FC0",system_queue_bg_color:"#1168BD",system_queue_border_color:"#3C7FC0",external_system_bg_color:"#999999",external_system_border_color:"#8A8A8A",external_system_db_bg_color:"#999999",external_system_db_border_color:"#8A8A8A",external_system_queue_bg_color:"#999999",external_system_queue_border_color:"#8A8A8A",container_bg_color:"#438DD5",container_border_color:"#3C7FC0",container_db_bg_color:"#438DD5",container_db_border_color:"#3C7FC0",container_queue_bg_color:"#438DD5",container_queue_border_color:"#3C7FC0",external_container_bg_color:"#B3B3B3",external_container_border_color:"#A6A6A6",external_container_db_bg_color:"#B3B3B3",external_container_db_border_color:"#A6A6A6",external_container_queue_bg_color:"#B3B3B3",external_container_queue_border_color:"#A6A6A6",component_bg_color:"#85BBF0",component_border_color:"#78A8D8",component_db_bg_color:"#85BBF0",component_db_border_color:"#78A8D8",component_queue_bg_color:"#85BBF0",component_queue_border_color:"#78A8D8",external_component_bg_color:"#CCCCCC",external_component_border_color:"#BFBFBF",external_component_db_bg_color:"#CCCCCC",external_component_db_border_color:"#BFBFBF",external_component_queue_bg_color:"#CCCCCC",external_component_queue_border_color:"#BFBFBF"},sankey:{useMaxWidth:!0,width:600,height:400,linkColor:"gradient",nodeAlignment:"justify",showValues:!0,prefix:"",suffix:""},block:{useMaxWidth:!0,padding:8},packet:{useMaxWidth:!0,rowHeight:32,bitWidth:32,bitsPerRow:32,showBits:!0,paddingX:5,paddingY:5},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16},theme:"default",look:"classic",handDrawnSeed:0,layout:"dagre",maxTextSize:5e4,maxEdges:500,darkMode:!1,fontFamily:'"trebuchet ms", verdana, arial, sans-serif;',logLevel:5,securityLevel:"strict",startOnLoad:!0,arrowMarkerAbsolute:!1,secure:["secure","securityLevel","startOnLoad","maxTextSize","suppressErrorRendering","maxEdges"],legacyMathML:!1,forceLegacyMathML:!1,deterministicIds:!1,fontSize:16,markdownAutoWrap:!0,suppressErrorRendering:!1},Qr={...Xr,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF"},themeCSS:void 0,themeVariables:Zr.default.getThemeVariables(),sequence:{...Xr.sequence,messageFont:Cr((function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}}),"messageFont"),noteFont:Cr((function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}}),"noteFont"),actorFont:Cr((function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}}),"actorFont")},gantt:{...Xr.gantt,tickInterval:void 0,useWidth:void 0},c4:{...Xr.c4,useWidth:void 0,personFont:Cr((function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}}),"personFont"),external_personFont:Cr((function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}}),"external_personFont"),systemFont:Cr((function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}}),"systemFont"),external_systemFont:Cr((function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}}),"external_systemFont"),system_dbFont:Cr((function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}}),"system_dbFont"),external_system_dbFont:Cr((function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}}),"external_system_dbFont"),system_queueFont:Cr((function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}}),"system_queueFont"),external_system_queueFont:Cr((function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}}),"external_system_queueFont"),containerFont:Cr((function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}}),"containerFont"),external_containerFont:Cr((function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}}),"external_containerFont"),container_dbFont:Cr((function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}}),"container_dbFont"),external_container_dbFont:Cr((function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}}),"external_container_dbFont"),container_queueFont:Cr((function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}}),"container_queueFont"),external_container_queueFont:Cr((function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}}),"external_container_queueFont"),componentFont:Cr((function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}}),"componentFont"),external_componentFont:Cr((function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}}),"external_componentFont"),component_dbFont:Cr((function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}}),"component_dbFont"),external_component_dbFont:Cr((function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}}),"external_component_dbFont"),component_queueFont:Cr((function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}}),"component_queueFont"),external_component_queueFont:Cr((function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}}),"external_component_queueFont"),boundaryFont:Cr((function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}}),"boundaryFont"),messageFont:Cr((function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}}),"messageFont")},pie:{...Xr.pie,useWidth:984},xyChart:{...Xr.xyChart,useWidth:void 0},requirement:{...Xr.requirement,useWidth:void 0},packet:{...Xr.packet}},Kr=Cr(((t,e="")=>Object.keys(t).reduce(((r,i)=>Array.isArray(t[i])?r:"object"==typeof t[i]&&null!==t[i]?[...r,e+i,...Kr(t[i],"")]:[...r,e+i]),[])),"keyify"),Jr=new Set(Kr(Qr,"")),ti=Qr,ei=Cr((t=>{if(Sr.debug("sanitizeDirective called with",t),"object"==typeof t&&null!=t)if(Array.isArray(t))t.forEach((t=>ei(t)));else{for(const e of Object.keys(t)){if(Sr.debug("Checking key",e),e.startsWith("__")||e.includes("proto")||e.includes("constr")||!Jr.has(e)||null==t[e]){Sr.debug("sanitize deleting key: ",e),delete t[e];continue}if("object"==typeof t[e]){Sr.debug("sanitizing object",e),ei(t[e]);continue}const r=["themeCSS","fontFamily","altFontFamily"];for(const i of r)e.includes(i)&&(Sr.debug("sanitizing css option",e),t[e]=ri(t[e]))}if(t.themeVariables)for(const e of Object.keys(t.themeVariables)){const r=t.themeVariables[e];(null==r?void 0:r.match)&&!r.match(/^[\d "#%(),.;A-Za-z]+$/)&&(t.themeVariables[e]="")}Sr.debug("After sanitization",t)}}),"sanitizeDirective"),ri=Cr((t=>{let e=0,r=0;for(const i of t){if(e<r)return"{ /* ERROR: Unbalanced CSS */ }";"{"===i?e++:"}"===i&&r++}return e!==r?"{ /* ERROR: Unbalanced CSS */ }":t}),"sanitizeCss"),ii=Object.freeze(ti),ai=Or({},ii),ni=[],oi=Or({},ii),si=Cr(((t,e)=>{let r=Or({},t),i={};for(const a of e)gi(a),i=Or(i,a);if(r=Or(r,i),i.theme&&i.theme in Zr){const t=Or({},mr),e=Or(t.themeVariables||{},i.themeVariables);r.theme&&r.theme in Zr&&(r.themeVariables=Zr[r.theme].getThemeVariables(e))}return Ci(oi=r),oi}),"updateCurrentConfig"),li=Cr((t=>(ai=Or({},ii),ai=Or(ai,t),t.theme&&Zr[t.theme]&&(ai.themeVariables=Zr[t.theme].getThemeVariables(t.themeVariables)),si(ai,ni),ai)),"setSiteConfig"),hi=Cr((t=>{mr=Or({},t)}),"saveConfigFromInitialize"),ci=Cr((t=>(ai=Or(ai,t),si(ai,ni),ai)),"updateSiteConfig"),di=Cr((()=>Or({},ai)),"getSiteConfig"),ui=Cr((t=>(Ci(t),Or(oi,t),pi())),"setConfig"),pi=Cr((()=>Or({},oi)),"getConfig"),gi=Cr((t=>{t&&(["secure",...ai.secure??[]].forEach((e=>{Object.hasOwn(t,e)&&(Sr.debug(`Denied attempt to modify a secure key ${e}`,t[e]),delete t[e])})),Object.keys(t).forEach((e=>{e.startsWith("__")&&delete t[e]})),Object.keys(t).forEach((e=>{"string"==typeof t[e]&&(t[e].includes("<")||t[e].includes(">")||t[e].includes("url(data:"))&&delete t[e],"object"==typeof t[e]&&gi(t[e])})))}),"sanitize"),fi=Cr((t=>{var e;ei(t),t.fontFamily&&!(null==(e=t.themeVariables)?void 0:e.fontFamily)&&(t.themeVariables={...t.themeVariables,fontFamily:t.fontFamily}),ni.push(t),si(ai,ni)}),"addDirective"),yi=Cr(((t=ai)=>{si(t,ni=[])}),"reset"),mi={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead."},xi={},bi=Cr((t=>{xi[t]||(Sr.warn(mi[t]),xi[t]=!0)}),"issueWarning"),Ci=Cr((t=>{t&&(t.lazyLoadedDiagrams||t.loadExternalDiagramsAtStartup)&&bi("LAZY_LOAD_DEPRECATED")}),"checkConfig"),ki=/<br\s*\/?>/gi,wi=Cr((t=>{if(!t)return[""];return $i(t).replace(/\\n/g,"#br#").split("#br#")}),"getRows"),Si=(()=>{let t=!1;return()=>{t||(Ti(),t=!0)}})();function Ti(){const t="data-temp-href-target";xr.addHook("beforeSanitizeAttributes",(e=>{"A"===e.tagName&&e.hasAttribute("target")&&e.setAttribute(t,e.getAttribute("target")??"")})),xr.addHook("afterSanitizeAttributes",(e=>{"A"===e.tagName&&e.hasAttribute(t)&&(e.setAttribute("target",e.getAttribute(t)??""),e.removeAttribute(t),"_blank"===e.getAttribute("target")&&e.setAttribute("rel","noopener"))}))}Cr(Ti,"setupDompurifyHooks");var vi=Cr((t=>{Si();return xr.sanitize(t)}),"removeScript"),Bi=Cr(((t,e)=>{var r;if(!1!==(null==(r=e.flowchart)?void 0:r.htmlLabels)){const r=e.securityLevel;"antiscript"===r||"strict"===r?t=vi(t):"loose"!==r&&(t=(t=(t=$i(t)).replace(/</g,"&lt;").replace(/>/g,"&gt;")).replace(/=/g,"&equals;"),t=Ai(t))}return t}),"sanitizeMore"),_i=Cr(((t,e)=>t?t=e.dompurifyConfig?xr.sanitize(Bi(t,e),e.dompurifyConfig).toString():xr.sanitize(Bi(t,e),{FORBID_TAGS:["style"]}).toString():t),"sanitizeText"),Li=Cr(((t,e)=>"string"==typeof t?_i(t,e):t.flat().map((t=>_i(t,e)))),"sanitizeTextOrArray"),Mi=Cr((t=>ki.test(t)),"hasBreaks"),Fi=Cr((t=>t.split(ki)),"splitBreaks"),Ai=Cr((t=>t.replace(/#br#/g,"<br/>")),"placeholderToBreak"),$i=Cr((t=>t.replace(ki,"#br#")),"breakToPlaceholder"),Ei=Cr((t=>{let e="";return t&&(e=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,e=e.replaceAll(/\(/g,"\\("),e=e.replaceAll(/\)/g,"\\)")),e}),"getUrl"),Di=Cr((t=>!1!==t&&!["false","null","0"].includes(String(t).trim().toLowerCase())),"evaluate"),Ii=Cr((function(...t){const e=t.filter((t=>!isNaN(t)));return Math.max(...e)}),"getMax"),Oi=Cr((function(...t){const e=t.filter((t=>!isNaN(t)));return Math.min(...e)}),"getMin"),Pi=Cr((function(t){const e=t.split(/(,)/),r=[];for(let i=0;i<e.length;i++){let t=e[i];if(","===t&&i>0&&i+1<e.length){const a=e[i-1],n=e[i+1];qi(a,n)&&(t=a+","+n,i++,r.pop())}r.push(zi(t))}return r.join("")}),"parseGenericTypes"),Ri=Cr(((t,e)=>Math.max(0,t.split(e).length-1)),"countOccurrence"),qi=Cr(((t,e)=>{const r=Ri(t,"~"),i=Ri(e,"~");return 1===r&&1===i}),"shouldCombineSets"),zi=Cr((t=>{const e=Ri(t,"~");let r=!1;if(e<=1)return t;e%2!=0&&t.startsWith("~")&&(t=t.substring(1),r=!0);const i=[...t];let a=i.indexOf("~"),n=i.lastIndexOf("~");for(;-1!==a&&-1!==n&&a!==n;)i[a]="<",i[n]=">",a=i.indexOf("~"),n=i.lastIndexOf("~");return r&&i.unshift("~"),i.join("")}),"processSet"),Wi=Cr((()=>void 0!==window.MathMLElement),"isMathMLSupported"),Ni=/\$\$(.*)\$\$/g,ji=Cr((t=>{var e;return((null==(e=t.match(Ni))?void 0:e.length)??0)>0}),"hasKatex"),Hi=Cr((async(t,e)=>{t=await Ui(t,e);const r=document.createElement("div");r.innerHTML=t,r.id="katex-temp",r.style.visibility="hidden",r.style.position="absolute",r.style.top="0";const i=document.querySelector("body");null==i||i.insertAdjacentElement("beforeend",r);const a={width:r.clientWidth,height:r.clientHeight};return r.remove(),a}),"calculateMathMLDimensions"),Ui=Cr((async(t,e)=>{if(!ji(t))return t;if(!(Wi()||e.legacyMathML||e.forceLegacyMathML))return t.replace(Ni,"MathML is unsupported in this environment.");const{default:r}=await z((async()=>{const{default:t}=await import("./katex-D1MatCUS.js");return{default:t}}),[],import.meta.url),i=e.forceLegacyMathML||!Wi()&&e.legacyMathML?"htmlAndMathml":"mathml";return t.split(ki).map((t=>ji(t)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${t}</div>`:`<div>${t}</div>`)).join("").replace(Ni,((t,e)=>r.renderToString(e,{throwOnError:!0,displayMode:!0,output:i}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,"")))}),"renderKatex"),Yi={getRows:wi,sanitizeText:_i,sanitizeTextOrArray:Li,hasBreaks:Mi,splitBreaks:Fi,lineBreakRegex:ki,removeScript:vi,getUrl:Ei,evaluate:Di,getMax:Ii,getMin:Oi},Vi=Cr((function(t,e){for(let r of e)t.attr(r[0],r[1])}),"d3Attrs"),Gi=Cr((function(t,e,r){let i=new Map;return r?(i.set("width","100%"),i.set("style",`max-width: ${e}px;`)):(i.set("height",t),i.set("width",e)),i}),"calculateSvgSizeAttrs"),Zi=Cr((function(t,e,r,i){const a=Gi(e,r,i);Vi(t,a)}),"configureSvgSize"),Xi=Cr((function(t,e,r,i){const a=e.node().getBBox(),n=a.width,o=a.height;Sr.info(`SVG bounds: ${n}x${o}`,a);let s=0,l=0;Sr.info(`Graph bounds: ${s}x${l}`,t),s=n+2*r,l=o+2*r,Sr.info(`Calculated bounds: ${s}x${l}`),Zi(e,l,s,i);const h=`${a.x-r} ${a.y-r} ${a.width+2*r} ${a.height+2*r}`;e.attr("viewBox",h)}),"setupGraphViewbox"),Qi={},Ki=Cr(((t,e,r)=>{let i="";return t in Qi&&Qi[t]?i=Qi[t](r):Sr.warn(`No theme found for ${t}`),` & {\n font-family: ${r.fontFamily};\n font-size: ${r.fontSize};\n fill: ${r.textColor}\n }\n\n /* Classes common for multiple diagrams */\n\n & .error-icon {\n fill: ${r.errorBkgColor};\n }\n & .error-text {\n fill: ${r.errorTextColor};\n stroke: ${r.errorTextColor};\n }\n\n & .edge-thickness-normal {\n stroke-width: 1px;\n }\n & .edge-thickness-thick {\n stroke-width: 3.5px\n }\n & .edge-pattern-solid {\n stroke-dasharray: 0;\n }\n & .edge-thickness-invisible {\n stroke-width: 0;\n fill: none;\n }\n & .edge-pattern-dashed{\n stroke-dasharray: 3;\n }\n .edge-pattern-dotted {\n stroke-dasharray: 2;\n }\n\n & .marker {\n fill: ${r.lineColor};\n stroke: ${r.lineColor};\n }\n & .marker.cross {\n stroke: ${r.lineColor};\n }\n\n & svg {\n font-family: ${r.fontFamily};\n font-size: ${r.fontSize};\n }\n & p {\n margin: 0\n }\n\n ${i}\n\n ${e}\n`}),"getStyles"),Ji=Cr(((t,e)=>{void 0!==e&&(Qi[t]=e)}),"addStylesForDiagram"),ta=Ki,ea={};kr(ea,{clear:()=>oa,getAccDescription:()=>ca,getAccTitle:()=>la,getDiagramTitle:()=>ua,setAccDescription:()=>ha,setAccTitle:()=>sa,setDiagramTitle:()=>da});var ra="",ia="",aa="",na=Cr((t=>_i(t,pi())),"sanitizeText"),oa=Cr((()=>{ra="",aa="",ia=""}),"clear"),sa=Cr((t=>{ra=na(t).replace(/^\s+/g,"")}),"setAccTitle"),la=Cr((()=>ra),"getAccTitle"),ha=Cr((t=>{aa=na(t).replace(/\n\s+/g,"\n")}),"setAccDescription"),ca=Cr((()=>aa),"getAccDescription"),da=Cr((t=>{ia=na(t)}),"setDiagramTitle"),ua=Cr((()=>ia),"getDiagramTitle"),pa=Sr,ga=Tr,fa=pi,ya=ui,ma=ii,xa=Cr((t=>_i(t,fa())),"sanitizeText"),ba=Xi,Ca=Cr((()=>ea),"getCommonDb"),ka={},wa=Cr(((t,e,r)=>{var i;ka[t]&&pa.warn(`Diagram with id ${t} already registered. Overwriting.`),ka[t]=e,r&&Er(t,r),Ji(t,e.styles),null==(i=e.injectUtils)||i.call(e,pa,ga,fa,xa,ba,Ca(),(()=>{}))}),"registerDiagram"),Sa=Cr((t=>{if(t in ka)return ka[t];throw new Ta(t)}),"getDiagram"),Ta=(o=class extends Error{constructor(t){super(`Diagram ${t} not found.`)}},Cr(o,"DiagramNotFoundError"),o);function va(t){return null==t}function Ba(t){return"object"==typeof t&&null!==t}function _a(t){return Array.isArray(t)?t:va(t)?[]:[t]}function La(t,e){var r,i,a,n;if(e)for(r=0,i=(n=Object.keys(e)).length;r<i;r+=1)t[a=n[r]]=e[a];return t}function Ma(t,e){var r,i="";for(r=0;r<e;r+=1)i+=t;return i}function Fa(t){return 0===t&&Number.NEGATIVE_INFINITY===1/t}Cr(va,"isNothing"),Cr(Ba,"isObject"),Cr(_a,"toArray"),Cr(La,"extend"),Cr(Ma,"repeat"),Cr(Fa,"isNegativeZero");var Aa={isNothing:va,isObject:Ba,toArray:_a,repeat:Ma,isNegativeZero:Fa,extend:La};function $a(t,e){var r="",i=t.reason||"(unknown reason)";return t.mark?(t.mark.name&&(r+='in "'+t.mark.name+'" '),r+="("+(t.mark.line+1)+":"+(t.mark.column+1)+")",!e&&t.mark.snippet&&(r+="\n\n"+t.mark.snippet),i+" "+r):i}function Ea(t,e){Error.call(this),this.name="YAMLException",this.reason=t,this.mark=e,this.message=$a(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack||""}Cr($a,"formatError"),Cr(Ea,"YAMLException$1"),Ea.prototype=Object.create(Error.prototype),Ea.prototype.constructor=Ea,Ea.prototype.toString=Cr((function(t){return this.name+": "+$a(this,t)}),"toString");var Da=Ea;function Ia(t,e,r,i,a){var n="",o="",s=Math.floor(a/2)-1;return i-e>s&&(e=i-s+(n=" ... ").length),r-i>s&&(r=i+s-(o=" ...").length),{str:n+t.slice(e,r).replace(/\t/g,"→")+o,pos:i-e+n.length}}function Oa(t,e){return Aa.repeat(" ",e-t.length)+t}function Pa(t,e){if(e=Object.create(e||null),!t.buffer)return null;e.maxLength||(e.maxLength=79),"number"!=typeof e.indent&&(e.indent=1),"number"!=typeof e.linesBefore&&(e.linesBefore=3),"number"!=typeof e.linesAfter&&(e.linesAfter=2);for(var r,i=/\r?\n|\r|\0/g,a=[0],n=[],o=-1;r=i.exec(t.buffer);)n.push(r.index),a.push(r.index+r[0].length),t.position<=r.index&&o<0&&(o=a.length-2);o<0&&(o=a.length-1);var s,l,h="",c=Math.min(t.line+e.linesAfter,n.length).toString().length,d=e.maxLength-(e.indent+c+3);for(s=1;s<=e.linesBefore&&!(o-s<0);s++)l=Ia(t.buffer,a[o-s],n[o-s],t.position-(a[o]-a[o-s]),d),h=Aa.repeat(" ",e.indent)+Oa((t.line-s+1).toString(),c)+" | "+l.str+"\n"+h;for(l=Ia(t.buffer,a[o],n[o],t.position,d),h+=Aa.repeat(" ",e.indent)+Oa((t.line+1).toString(),c)+" | "+l.str+"\n",h+=Aa.repeat("-",e.indent+c+3+l.pos)+"^\n",s=1;s<=e.linesAfter&&!(o+s>=n.length);s++)l=Ia(t.buffer,a[o+s],n[o+s],t.position-(a[o]-a[o+s]),d),h+=Aa.repeat(" ",e.indent)+Oa((t.line+s+1).toString(),c)+" | "+l.str+"\n";return h.replace(/\n$/,"")}Cr(Ia,"getLine"),Cr(Oa,"padStart"),Cr(Pa,"makeSnippet");var Ra=Pa,qa=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],za=["scalar","sequence","mapping"];function Wa(t){var e={};return null!==t&&Object.keys(t).forEach((function(r){t[r].forEach((function(t){e[String(t)]=r}))})),e}function Na(t,e){if(e=e||{},Object.keys(e).forEach((function(e){if(-1===qa.indexOf(e))throw new Da('Unknown option "'+e+'" is met in definition of "'+t+'" YAML type.')})),this.options=e,this.tag=t,this.kind=e.kind||null,this.resolve=e.resolve||function(){return!0},this.construct=e.construct||function(t){return t},this.instanceOf=e.instanceOf||null,this.predicate=e.predicate||null,this.represent=e.represent||null,this.representName=e.representName||null,this.defaultStyle=e.defaultStyle||null,this.multi=e.multi||!1,this.styleAliases=Wa(e.styleAliases||null),-1===za.indexOf(this.kind))throw new Da('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')}Cr(Wa,"compileStyleAliases"),Cr(Na,"Type$1");var ja=Na;function Ha(t,e){var r=[];return t[e].forEach((function(t){var e=r.length;r.forEach((function(r,i){r.tag===t.tag&&r.kind===t.kind&&r.multi===t.multi&&(e=i)})),r[e]=t})),r}function Ua(){var t,e,r={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function i(t){t.multi?(r.multi[t.kind].push(t),r.multi.fallback.push(t)):r[t.kind][t.tag]=r.fallback[t.tag]=t}for(Cr(i,"collectType"),t=0,e=arguments.length;t<e;t+=1)arguments[t].forEach(i);return r}function Ya(t){return this.extend(t)}Cr(Ha,"compileList"),Cr(Ua,"compileMap"),Cr(Ya,"Schema$1"),Ya.prototype.extend=Cr((function(t){var e=[],r=[];if(t instanceof ja)r.push(t);else if(Array.isArray(t))r=r.concat(t);else{if(!t||!Array.isArray(t.implicit)&&!Array.isArray(t.explicit))throw new Da("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");t.implicit&&(e=e.concat(t.implicit)),t.explicit&&(r=r.concat(t.explicit))}e.forEach((function(t){if(!(t instanceof ja))throw new Da("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(t.loadKind&&"scalar"!==t.loadKind)throw new Da("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(t.multi)throw new Da("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")})),r.forEach((function(t){if(!(t instanceof ja))throw new Da("Specified list of YAML types (or a single Type object) contains a non-Type object.")}));var i=Object.create(Ya.prototype);return i.implicit=(this.implicit||[]).concat(e),i.explicit=(this.explicit||[]).concat(r),i.compiledImplicit=Ha(i,"implicit"),i.compiledExplicit=Ha(i,"explicit"),i.compiledTypeMap=Ua(i.compiledImplicit,i.compiledExplicit),i}),"extend");var Va=new Ya({explicit:[new ja("tag:yaml.org,2002:str",{kind:"scalar",construct:Cr((function(t){return null!==t?t:""}),"construct")}),new ja("tag:yaml.org,2002:seq",{kind:"sequence",construct:Cr((function(t){return null!==t?t:[]}),"construct")}),new ja("tag:yaml.org,2002:map",{kind:"mapping",construct:Cr((function(t){return null!==t?t:{}}),"construct")})]});function Ga(t){if(null===t)return!0;var e=t.length;return 1===e&&"~"===t||4===e&&("null"===t||"Null"===t||"NULL"===t)}function Za(){return null}function Xa(t){return null===t}Cr(Ga,"resolveYamlNull"),Cr(Za,"constructYamlNull"),Cr(Xa,"isNull");var Qa=new ja("tag:yaml.org,2002:null",{kind:"scalar",resolve:Ga,construct:Za,predicate:Xa,represent:{canonical:Cr((function(){return"~"}),"canonical"),lowercase:Cr((function(){return"null"}),"lowercase"),uppercase:Cr((function(){return"NULL"}),"uppercase"),camelcase:Cr((function(){return"Null"}),"camelcase"),empty:Cr((function(){return""}),"empty")},defaultStyle:"lowercase"});function Ka(t){if(null===t)return!1;var e=t.length;return 4===e&&("true"===t||"True"===t||"TRUE"===t)||5===e&&("false"===t||"False"===t||"FALSE"===t)}function Ja(t){return"true"===t||"True"===t||"TRUE"===t}function tn(t){return"[object Boolean]"===Object.prototype.toString.call(t)}Cr(Ka,"resolveYamlBoolean"),Cr(Ja,"constructYamlBoolean"),Cr(tn,"isBoolean");var en=new ja("tag:yaml.org,2002:bool",{kind:"scalar",resolve:Ka,construct:Ja,predicate:tn,represent:{lowercase:Cr((function(t){return t?"true":"false"}),"lowercase"),uppercase:Cr((function(t){return t?"TRUE":"FALSE"}),"uppercase"),camelcase:Cr((function(t){return t?"True":"False"}),"camelcase")},defaultStyle:"lowercase"});function rn(t){return 48<=t&&t<=57||65<=t&&t<=70||97<=t&&t<=102}function an(t){return 48<=t&&t<=55}function nn(t){return 48<=t&&t<=57}function on(t){if(null===t)return!1;var e,r=t.length,i=0,a=!1;if(!r)return!1;if("-"!==(e=t[i])&&"+"!==e||(e=t[++i]),"0"===e){if(i+1===r)return!0;if("b"===(e=t[++i])){for(i++;i<r;i++)if("_"!==(e=t[i])){if("0"!==e&&"1"!==e)return!1;a=!0}return a&&"_"!==e}if("x"===e){for(i++;i<r;i++)if("_"!==(e=t[i])){if(!rn(t.charCodeAt(i)))return!1;a=!0}return a&&"_"!==e}if("o"===e){for(i++;i<r;i++)if("_"!==(e=t[i])){if(!an(t.charCodeAt(i)))return!1;a=!0}return a&&"_"!==e}}if("_"===e)return!1;for(;i<r;i++)if("_"!==(e=t[i])){if(!nn(t.charCodeAt(i)))return!1;a=!0}return!(!a||"_"===e)}function sn(t){var e,r=t,i=1;if(-1!==r.indexOf("_")&&(r=r.replace(/_/g,"")),"-"!==(e=r[0])&&"+"!==e||("-"===e&&(i=-1),e=(r=r.slice(1))[0]),"0"===r)return 0;if("0"===e){if("b"===r[1])return i*parseInt(r.slice(2),2);if("x"===r[1])return i*parseInt(r.slice(2),16);if("o"===r[1])return i*parseInt(r.slice(2),8)}return i*parseInt(r,10)}function ln(t){return"[object Number]"===Object.prototype.toString.call(t)&&t%1==0&&!Aa.isNegativeZero(t)}Cr(rn,"isHexCode"),Cr(an,"isOctCode"),Cr(nn,"isDecCode"),Cr(on,"resolveYamlInteger"),Cr(sn,"constructYamlInteger"),Cr(ln,"isInteger");var hn=new ja("tag:yaml.org,2002:int",{kind:"scalar",resolve:on,construct:sn,predicate:ln,represent:{binary:Cr((function(t){return t>=0?"0b"+t.toString(2):"-0b"+t.toString(2).slice(1)}),"binary"),octal:Cr((function(t){return t>=0?"0o"+t.toString(8):"-0o"+t.toString(8).slice(1)}),"octal"),decimal:Cr((function(t){return t.toString(10)}),"decimal"),hexadecimal:Cr((function(t){return t>=0?"0x"+t.toString(16).toUpperCase():"-0x"+t.toString(16).toUpperCase().slice(1)}),"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),cn=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function dn(t){return null!==t&&!(!cn.test(t)||"_"===t[t.length-1])}function un(t){var e,r;return r="-"===(e=t.replace(/_/g,"").toLowerCase())[0]?-1:1,"+-".indexOf(e[0])>=0&&(e=e.slice(1)),".inf"===e?1===r?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===e?NaN:r*parseFloat(e,10)}Cr(dn,"resolveYamlFloat"),Cr(un,"constructYamlFloat");var pn=/^[-+]?[0-9]+e/;function gn(t,e){var r;if(isNaN(t))switch(e){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===t)switch(e){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===t)switch(e){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(Aa.isNegativeZero(t))return"-0.0";return r=t.toString(10),pn.test(r)?r.replace("e",".e"):r}function fn(t){return"[object Number]"===Object.prototype.toString.call(t)&&(t%1!=0||Aa.isNegativeZero(t))}Cr(gn,"representYamlFloat"),Cr(fn,"isFloat");var yn=new ja("tag:yaml.org,2002:float",{kind:"scalar",resolve:dn,construct:un,predicate:fn,represent:gn,defaultStyle:"lowercase"}),mn=Va.extend({implicit:[Qa,en,hn,yn]}),xn=mn,bn=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Cn=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 kn(t){return null!==t&&(null!==bn.exec(t)||null!==Cn.exec(t))}function wn(t){var e,r,i,a,n,o,s,l,h=0,c=null;if(null===(e=bn.exec(t))&&(e=Cn.exec(t)),null===e)throw new Error("Date resolve error");if(r=+e[1],i=+e[2]-1,a=+e[3],!e[4])return new Date(Date.UTC(r,i,a));if(n=+e[4],o=+e[5],s=+e[6],e[7]){for(h=e[7].slice(0,3);h.length<3;)h+="0";h=+h}return e[9]&&(c=6e4*(60*+e[10]+ +(e[11]||0)),"-"===e[9]&&(c=-c)),l=new Date(Date.UTC(r,i,a,n,o,s,h)),c&&l.setTime(l.getTime()-c),l}function Sn(t){return t.toISOString()}Cr(kn,"resolveYamlTimestamp"),Cr(wn,"constructYamlTimestamp"),Cr(Sn,"representYamlTimestamp");var Tn=new ja("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:kn,construct:wn,instanceOf:Date,represent:Sn});function vn(t){return"<<"===t||null===t}Cr(vn,"resolveYamlMerge");var Bn=new ja("tag:yaml.org,2002:merge",{kind:"scalar",resolve:vn}),_n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";function Ln(t){if(null===t)return!1;var e,r,i=0,a=t.length,n=_n;for(r=0;r<a;r++)if(!((e=n.indexOf(t.charAt(r)))>64)){if(e<0)return!1;i+=6}return i%8==0}function Mn(t){var e,r,i=t.replace(/[\r\n=]/g,""),a=i.length,n=_n,o=0,s=[];for(e=0;e<a;e++)e%4==0&&e&&(s.push(o>>16&255),s.push(o>>8&255),s.push(255&o)),o=o<<6|n.indexOf(i.charAt(e));return 0===(r=a%4*6)?(s.push(o>>16&255),s.push(o>>8&255),s.push(255&o)):18===r?(s.push(o>>10&255),s.push(o>>2&255)):12===r&&s.push(o>>4&255),new Uint8Array(s)}function Fn(t){var e,r,i="",a=0,n=t.length,o=_n;for(e=0;e<n;e++)e%3==0&&e&&(i+=o[a>>18&63],i+=o[a>>12&63],i+=o[a>>6&63],i+=o[63&a]),a=(a<<8)+t[e];return 0===(r=n%3)?(i+=o[a>>18&63],i+=o[a>>12&63],i+=o[a>>6&63],i+=o[63&a]):2===r?(i+=o[a>>10&63],i+=o[a>>4&63],i+=o[a<<2&63],i+=o[64]):1===r&&(i+=o[a>>2&63],i+=o[a<<4&63],i+=o[64],i+=o[64]),i}function An(t){return"[object Uint8Array]"===Object.prototype.toString.call(t)}Cr(Ln,"resolveYamlBinary"),Cr(Mn,"constructYamlBinary"),Cr(Fn,"representYamlBinary"),Cr(An,"isBinary");var $n=new ja("tag:yaml.org,2002:binary",{kind:"scalar",resolve:Ln,construct:Mn,predicate:An,represent:Fn}),En=Object.prototype.hasOwnProperty,Dn=Object.prototype.toString;function In(t){if(null===t)return!0;var e,r,i,a,n,o=[],s=t;for(e=0,r=s.length;e<r;e+=1){if(i=s[e],n=!1,"[object Object]"!==Dn.call(i))return!1;for(a in i)if(En.call(i,a)){if(n)return!1;n=!0}if(!n)return!1;if(-1!==o.indexOf(a))return!1;o.push(a)}return!0}function On(t){return null!==t?t:[]}Cr(In,"resolveYamlOmap"),Cr(On,"constructYamlOmap");var Pn=new ja("tag:yaml.org,2002:omap",{kind:"sequence",resolve:In,construct:On}),Rn=Object.prototype.toString;function qn(t){if(null===t)return!0;var e,r,i,a,n,o=t;for(n=new Array(o.length),e=0,r=o.length;e<r;e+=1){if(i=o[e],"[object Object]"!==Rn.call(i))return!1;if(1!==(a=Object.keys(i)).length)return!1;n[e]=[a[0],i[a[0]]]}return!0}function zn(t){if(null===t)return[];var e,r,i,a,n,o=t;for(n=new Array(o.length),e=0,r=o.length;e<r;e+=1)i=o[e],a=Object.keys(i),n[e]=[a[0],i[a[0]]];return n}Cr(qn,"resolveYamlPairs"),Cr(zn,"constructYamlPairs");var Wn=new ja("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:qn,construct:zn}),Nn=Object.prototype.hasOwnProperty;function jn(t){if(null===t)return!0;var e,r=t;for(e in r)if(Nn.call(r,e)&&null!==r[e])return!1;return!0}function Hn(t){return null!==t?t:{}}Cr(jn,"resolveYamlSet"),Cr(Hn,"constructYamlSet");var Un=new ja("tag:yaml.org,2002:set",{kind:"mapping",resolve:jn,construct:Hn}),Yn=xn.extend({implicit:[Tn,Bn],explicit:[$n,Pn,Wn,Un]}),Vn=Object.prototype.hasOwnProperty,Gn=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,Zn=/[\x85\u2028\u2029]/,Xn=/[,\[\]\{\}]/,Qn=/^(?:!|!!|![a-z\-]+!)$/i,Kn=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function Jn(t){return Object.prototype.toString.call(t)}function to(t){return 10===t||13===t}function eo(t){return 9===t||32===t}function ro(t){return 9===t||32===t||10===t||13===t}function io(t){return 44===t||91===t||93===t||123===t||125===t}function ao(t){var e;return 48<=t&&t<=57?t-48:97<=(e=32|t)&&e<=102?e-97+10:-1}function no(t){return 120===t?2:117===t?4:85===t?8:0}function oo(t){return 48<=t&&t<=57?t-48:-1}function so(t){return 48===t?"\0":97===t?"":98===t?"\b":116===t||9===t?"\t":110===t?"\n":118===t?"\v":102===t?"\f":114===t?"\r":101===t?"":32===t?" ":34===t?'"':47===t?"/":92===t?"\\":78===t?"…":95===t?" ":76===t?"\u2028":80===t?"\u2029":""}function lo(t){return t<=65535?String.fromCharCode(t):String.fromCharCode(55296+(t-65536>>10),56320+(t-65536&1023))}Cr(Jn,"_class"),Cr(to,"is_EOL"),Cr(eo,"is_WHITE_SPACE"),Cr(ro,"is_WS_OR_EOL"),Cr(io,"is_FLOW_INDICATOR"),Cr(ao,"fromHexCode"),Cr(no,"escapedHexLen"),Cr(oo,"fromDecimalCode"),Cr(so,"simpleEscapeSequence"),Cr(lo,"charFromCodepoint");var ho,co=new Array(256),uo=new Array(256);for(ho=0;ho<256;ho++)co[ho]=so(ho)?1:0,uo[ho]=so(ho);function po(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||Yn,this.onWarning=e.onWarning||null,this.legacy=e.legacy||!1,this.json=e.json||!1,this.listener=e.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=t.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function go(t,e){var r={name:t.filename,buffer:t.input.slice(0,-1),position:t.position,line:t.line,column:t.position-t.lineStart};return r.snippet=Ra(r),new Da(e,r)}function fo(t,e){throw go(t,e)}function yo(t,e){t.onWarning&&t.onWarning.call(null,go(t,e))}Cr(po,"State$1"),Cr(go,"generateError"),Cr(fo,"throwError"),Cr(yo,"throwWarning");var mo={YAML:Cr((function(t,e,r){var i,a,n;null!==t.version&&fo(t,"duplication of %YAML directive"),1!==r.length&&fo(t,"YAML directive accepts exactly one argument"),null===(i=/^([0-9]+)\.([0-9]+)$/.exec(r[0]))&&fo(t,"ill-formed argument of the YAML directive"),a=parseInt(i[1],10),n=parseInt(i[2],10),1!==a&&fo(t,"unacceptable YAML version of the document"),t.version=r[0],t.checkLineBreaks=n<2,1!==n&&2!==n&&yo(t,"unsupported YAML version of the document")}),"handleYamlDirective"),TAG:Cr((function(t,e,r){var i,a;2!==r.length&&fo(t,"TAG directive accepts exactly two arguments"),i=r[0],a=r[1],Qn.test(i)||fo(t,"ill-formed tag handle (first argument) of the TAG directive"),Vn.call(t.tagMap,i)&&fo(t,'there is a previously declared suffix for "'+i+'" tag handle'),Kn.test(a)||fo(t,"ill-formed tag prefix (second argument) of the TAG directive");try{a=decodeURIComponent(a)}catch(n){fo(t,"tag prefix is malformed: "+a)}t.tagMap[i]=a}),"handleTagDirective")};function xo(t,e,r,i){var a,n,o,s;if(e<r){if(s=t.input.slice(e,r),i)for(a=0,n=s.length;a<n;a+=1)9===(o=s.charCodeAt(a))||32<=o&&o<=1114111||fo(t,"expected valid JSON character");else Gn.test(s)&&fo(t,"the stream contains non-printable characters");t.result+=s}}function bo(t,e,r,i){var a,n,o,s;for(Aa.isObject(r)||fo(t,"cannot merge mappings; the provided source object is unacceptable"),o=0,s=(a=Object.keys(r)).length;o<s;o+=1)n=a[o],Vn.call(e,n)||(e[n]=r[n],i[n]=!0)}function Co(t,e,r,i,a,n,o,s,l){var h,c;if(Array.isArray(a))for(h=0,c=(a=Array.prototype.slice.call(a)).length;h<c;h+=1)Array.isArray(a[h])&&fo(t,"nested arrays are not supported inside keys"),"object"==typeof a&&"[object Object]"===Jn(a[h])&&(a[h]="[object Object]");if("object"==typeof a&&"[object Object]"===Jn(a)&&(a="[object Object]"),a=String(a),null===e&&(e={}),"tag:yaml.org,2002:merge"===i)if(Array.isArray(n))for(h=0,c=n.length;h<c;h+=1)bo(t,e,n[h],r);else bo(t,e,n,r);else t.json||Vn.call(r,a)||!Vn.call(e,a)||(t.line=o||t.line,t.lineStart=s||t.lineStart,t.position=l||t.position,fo(t,"duplicated mapping key")),"__proto__"===a?Object.defineProperty(e,a,{configurable:!0,enumerable:!0,writable:!0,value:n}):e[a]=n,delete r[a];return e}function ko(t){var e;10===(e=t.input.charCodeAt(t.position))?t.position++:13===e?(t.position++,10===t.input.charCodeAt(t.position)&&t.position++):fo(t,"a line break is expected"),t.line+=1,t.lineStart=t.position,t.firstTabInLine=-1}function wo(t,e,r){for(var i=0,a=t.input.charCodeAt(t.position);0!==a;){for(;eo(a);)9===a&&-1===t.firstTabInLine&&(t.firstTabInLine=t.position),a=t.input.charCodeAt(++t.position);if(e&&35===a)do{a=t.input.charCodeAt(++t.position)}while(10!==a&&13!==a&&0!==a);if(!to(a))break;for(ko(t),a=t.input.charCodeAt(t.position),i++,t.lineIndent=0;32===a;)t.lineIndent++,a=t.input.charCodeAt(++t.position)}return-1!==r&&0!==i&&t.lineIndent<r&&yo(t,"deficient indentation"),i}function So(t){var e,r=t.position;return!(45!==(e=t.input.charCodeAt(r))&&46!==e||e!==t.input.charCodeAt(r+1)||e!==t.input.charCodeAt(r+2)||(r+=3,0!==(e=t.input.charCodeAt(r))&&!ro(e)))}function To(t,e){1===e?t.result+=" ":e>1&&(t.result+=Aa.repeat("\n",e-1))}function vo(t,e,r){var i,a,n,o,s,l,h,c,d=t.kind,u=t.result;if(ro(c=t.input.charCodeAt(t.position))||io(c)||35===c||38===c||42===c||33===c||124===c||62===c||39===c||34===c||37===c||64===c||96===c)return!1;if((63===c||45===c)&&(ro(i=t.input.charCodeAt(t.position+1))||r&&io(i)))return!1;for(t.kind="scalar",t.result="",a=n=t.position,o=!1;0!==c;){if(58===c){if(ro(i=t.input.charCodeAt(t.position+1))||r&&io(i))break}else if(35===c){if(ro(t.input.charCodeAt(t.position-1)))break}else{if(t.position===t.lineStart&&So(t)||r&&io(c))break;if(to(c)){if(s=t.line,l=t.lineStart,h=t.lineIndent,wo(t,!1,-1),t.lineIndent>=e){o=!0,c=t.input.charCodeAt(t.position);continue}t.position=n,t.line=s,t.lineStart=l,t.lineIndent=h;break}}o&&(xo(t,a,n,!1),To(t,t.line-s),a=n=t.position,o=!1),eo(c)||(n=t.position+1),c=t.input.charCodeAt(++t.position)}return xo(t,a,n,!1),!!t.result||(t.kind=d,t.result=u,!1)}function Bo(t,e){var r,i,a;if(39!==(r=t.input.charCodeAt(t.position)))return!1;for(t.kind="scalar",t.result="",t.position++,i=a=t.position;0!==(r=t.input.charCodeAt(t.position));)if(39===r){if(xo(t,i,t.position,!0),39!==(r=t.input.charCodeAt(++t.position)))return!0;i=t.position,t.position++,a=t.position}else to(r)?(xo(t,i,a,!0),To(t,wo(t,!1,e)),i=a=t.position):t.position===t.lineStart&&So(t)?fo(t,"unexpected end of the document within a single quoted scalar"):(t.position++,a=t.position);fo(t,"unexpected end of the stream within a single quoted scalar")}function _o(t,e){var r,i,a,n,o,s;if(34!==(s=t.input.charCodeAt(t.position)))return!1;for(t.kind="scalar",t.result="",t.position++,r=i=t.position;0!==(s=t.input.charCodeAt(t.position));){if(34===s)return xo(t,r,t.position,!0),t.position++,!0;if(92===s){if(xo(t,r,t.position,!0),to(s=t.input.charCodeAt(++t.position)))wo(t,!1,e);else if(s<256&&co[s])t.result+=uo[s],t.position++;else if((o=no(s))>0){for(a=o,n=0;a>0;a--)(o=ao(s=t.input.charCodeAt(++t.position)))>=0?n=(n<<4)+o:fo(t,"expected hexadecimal character");t.result+=lo(n),t.position++}else fo(t,"unknown escape sequence");r=i=t.position}else to(s)?(xo(t,r,i,!0),To(t,wo(t,!1,e)),r=i=t.position):t.position===t.lineStart&&So(t)?fo(t,"unexpected end of the document within a double quoted scalar"):(t.position++,i=t.position)}fo(t,"unexpected end of the stream within a double quoted scalar")}function Lo(t,e){var r,i,a,n,o,s,l,h,c,d,u,p,g=!0,f=t.tag,y=t.anchor,m=Object.create(null);if(91===(p=t.input.charCodeAt(t.position)))o=93,h=!1,n=[];else{if(123!==p)return!1;o=125,h=!0,n={}}for(null!==t.anchor&&(t.anchorMap[t.anchor]=n),p=t.input.charCodeAt(++t.position);0!==p;){if(wo(t,!0,e),(p=t.input.charCodeAt(t.position))===o)return t.position++,t.tag=f,t.anchor=y,t.kind=h?"mapping":"sequence",t.result=n,!0;g?44===p&&fo(t,"expected the node content, but found ','"):fo(t,"missed comma between flow collection entries"),u=null,s=l=!1,63===p&&ro(t.input.charCodeAt(t.position+1))&&(s=l=!0,t.position++,wo(t,!0,e)),r=t.line,i=t.lineStart,a=t.position,Io(t,e,1,!1,!0),d=t.tag,c=t.result,wo(t,!0,e),p=t.input.charCodeAt(t.position),!l&&t.line!==r||58!==p||(s=!0,p=t.input.charCodeAt(++t.position),wo(t,!0,e),Io(t,e,1,!1,!0),u=t.result),h?Co(t,n,m,d,c,u,r,i,a):s?n.push(Co(t,null,m,d,c,u,r,i,a)):n.push(c),wo(t,!0,e),44===(p=t.input.charCodeAt(t.position))?(g=!0,p=t.input.charCodeAt(++t.position)):g=!1}fo(t,"unexpected end of the stream within a flow collection")}function Mo(t,e){var r,i,a,n,o=1,s=!1,l=!1,h=e,c=0,d=!1;if(124===(n=t.input.charCodeAt(t.position)))i=!1;else{if(62!==n)return!1;i=!0}for(t.kind="scalar",t.result="";0!==n;)if(43===(n=t.input.charCodeAt(++t.position))||45===n)1===o?o=43===n?3:2:fo(t,"repeat of a chomping mode identifier");else{if(!((a=oo(n))>=0))break;0===a?fo(t,"bad explicit indentation width of a block scalar; it cannot be less than one"):l?fo(t,"repeat of an indentation width identifier"):(h=e+a-1,l=!0)}if(eo(n)){do{n=t.input.charCodeAt(++t.position)}while(eo(n));if(35===n)do{n=t.input.charCodeAt(++t.position)}while(!to(n)&&0!==n)}for(;0!==n;){for(ko(t),t.lineIndent=0,n=t.input.charCodeAt(t.position);(!l||t.lineIndent<h)&&32===n;)t.lineIndent++,n=t.input.charCodeAt(++t.position);if(!l&&t.lineIndent>h&&(h=t.lineIndent),to(n))c++;else{if(t.lineIndent<h){3===o?t.result+=Aa.repeat("\n",s?1+c:c):1===o&&s&&(t.result+="\n");break}for(i?eo(n)?(d=!0,t.result+=Aa.repeat("\n",s?1+c:c)):d?(d=!1,t.result+=Aa.repeat("\n",c+1)):0===c?s&&(t.result+=" "):t.result+=Aa.repeat("\n",c):t.result+=Aa.repeat("\n",s?1+c:c),s=!0,l=!0,c=0,r=t.position;!to(n)&&0!==n;)n=t.input.charCodeAt(++t.position);xo(t,r,t.position,!1)}}return!0}function Fo(t,e){var r,i,a=t.tag,n=t.anchor,o=[],s=!1;if(-1!==t.firstTabInLine)return!1;for(null!==t.anchor&&(t.anchorMap[t.anchor]=o),i=t.input.charCodeAt(t.position);0!==i&&(-1!==t.firstTabInLine&&(t.position=t.firstTabInLine,fo(t,"tab characters must not be used in indentation")),45===i)&&ro(t.input.charCodeAt(t.position+1));)if(s=!0,t.position++,wo(t,!0,-1)&&t.lineIndent<=e)o.push(null),i=t.input.charCodeAt(t.position);else if(r=t.line,Io(t,e,3,!1,!0),o.push(t.result),wo(t,!0,-1),i=t.input.charCodeAt(t.position),(t.line===r||t.lineIndent>e)&&0!==i)fo(t,"bad indentation of a sequence entry");else if(t.lineIndent<e)break;return!!s&&(t.tag=a,t.anchor=n,t.kind="sequence",t.result=o,!0)}function Ao(t,e,r){var i,a,n,o,s,l,h,c=t.tag,d=t.anchor,u={},p=Object.create(null),g=null,f=null,y=null,m=!1,x=!1;if(-1!==t.firstTabInLine)return!1;for(null!==t.anchor&&(t.anchorMap[t.anchor]=u),h=t.input.charCodeAt(t.position);0!==h;){if(m||-1===t.firstTabInLine||(t.position=t.firstTabInLine,fo(t,"tab characters must not be used in indentation")),i=t.input.charCodeAt(t.position+1),n=t.line,63!==h&&58!==h||!ro(i)){if(o=t.line,s=t.lineStart,l=t.position,!Io(t,r,2,!1,!0))break;if(t.line===n){for(h=t.input.charCodeAt(t.position);eo(h);)h=t.input.charCodeAt(++t.position);if(58===h)ro(h=t.input.charCodeAt(++t.position))||fo(t,"a whitespace character is expected after the key-value separator within a block mapping"),m&&(Co(t,u,p,g,f,null,o,s,l),g=f=y=null),x=!0,m=!1,a=!1,g=t.tag,f=t.result;else{if(!x)return t.tag=c,t.anchor=d,!0;fo(t,"can not read an implicit mapping pair; a colon is missed")}}else{if(!x)return t.tag=c,t.anchor=d,!0;fo(t,"can not read a block mapping entry; a multiline key may not be an implicit key")}}else 63===h?(m&&(Co(t,u,p,g,f,null,o,s,l),g=f=y=null),x=!0,m=!0,a=!0):m?(m=!1,a=!0):fo(t,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),t.position+=1,h=i;if((t.line===n||t.lineIndent>e)&&(m&&(o=t.line,s=t.lineStart,l=t.position),Io(t,e,4,!0,a)&&(m?f=t.result:y=t.result),m||(Co(t,u,p,g,f,y,o,s,l),g=f=y=null),wo(t,!0,-1),h=t.input.charCodeAt(t.position)),(t.line===n||t.lineIndent>e)&&0!==h)fo(t,"bad indentation of a mapping entry");else if(t.lineIndent<e)break}return m&&Co(t,u,p,g,f,null,o,s,l),x&&(t.tag=c,t.anchor=d,t.kind="mapping",t.result=u),x}function $o(t){var e,r,i,a,n=!1,o=!1;if(33!==(a=t.input.charCodeAt(t.position)))return!1;if(null!==t.tag&&fo(t,"duplication of a tag property"),60===(a=t.input.charCodeAt(++t.position))?(n=!0,a=t.input.charCodeAt(++t.position)):33===a?(o=!0,r="!!",a=t.input.charCodeAt(++t.position)):r="!",e=t.position,n){do{a=t.input.charCodeAt(++t.position)}while(0!==a&&62!==a);t.position<t.length?(i=t.input.slice(e,t.position),a=t.input.charCodeAt(++t.position)):fo(t,"unexpected end of the stream within a verbatim tag")}else{for(;0!==a&&!ro(a);)33===a&&(o?fo(t,"tag suffix cannot contain exclamation marks"):(r=t.input.slice(e-1,t.position+1),Qn.test(r)||fo(t,"named tag handle cannot contain such characters"),o=!0,e=t.position+1)),a=t.input.charCodeAt(++t.position);i=t.input.slice(e,t.position),Xn.test(i)&&fo(t,"tag suffix cannot contain flow indicator characters")}i&&!Kn.test(i)&&fo(t,"tag name cannot contain such characters: "+i);try{i=decodeURIComponent(i)}catch(s){fo(t,"tag name is malformed: "+i)}return n?t.tag=i:Vn.call(t.tagMap,r)?t.tag=t.tagMap[r]+i:"!"===r?t.tag="!"+i:"!!"===r?t.tag="tag:yaml.org,2002:"+i:fo(t,'undeclared tag handle "'+r+'"'),!0}function Eo(t){var e,r;if(38!==(r=t.input.charCodeAt(t.position)))return!1;for(null!==t.anchor&&fo(t,"duplication of an anchor property"),r=t.input.charCodeAt(++t.position),e=t.position;0!==r&&!ro(r)&&!io(r);)r=t.input.charCodeAt(++t.position);return t.position===e&&fo(t,"name of an anchor node must contain at least one character"),t.anchor=t.input.slice(e,t.position),!0}function Do(t){var e,r,i;if(42!==(i=t.input.charCodeAt(t.position)))return!1;for(i=t.input.charCodeAt(++t.position),e=t.position;0!==i&&!ro(i)&&!io(i);)i=t.input.charCodeAt(++t.position);return t.position===e&&fo(t,"name of an alias node must contain at least one character"),r=t.input.slice(e,t.position),Vn.call(t.anchorMap,r)||fo(t,'unidentified alias "'+r+'"'),t.result=t.anchorMap[r],wo(t,!0,-1),!0}function Io(t,e,r,i,a){var n,o,s,l,h,c,d,u,p,g=1,f=!1,y=!1;if(null!==t.listener&&t.listener("open",t),t.tag=null,t.anchor=null,t.kind=null,t.result=null,n=o=s=4===r||3===r,i&&wo(t,!0,-1)&&(f=!0,t.lineIndent>e?g=1:t.lineIndent===e?g=0:t.lineIndent<e&&(g=-1)),1===g)for(;$o(t)||Eo(t);)wo(t,!0,-1)?(f=!0,s=n,t.lineIndent>e?g=1:t.lineIndent===e?g=0:t.lineIndent<e&&(g=-1)):s=!1;if(s&&(s=f||a),1!==g&&4!==r||(u=1===r||2===r?e:e+1,p=t.position-t.lineStart,1===g?s&&(Fo(t,p)||Ao(t,p,u))||Lo(t,u)?y=!0:(o&&Mo(t,u)||Bo(t,u)||_o(t,u)?y=!0:Do(t)?(y=!0,null===t.tag&&null===t.anchor||fo(t,"alias node should not have any properties")):vo(t,u,1===r)&&(y=!0,null===t.tag&&(t.tag="?")),null!==t.anchor&&(t.anchorMap[t.anchor]=t.result)):0===g&&(y=s&&Fo(t,p))),null===t.tag)null!==t.anchor&&(t.anchorMap[t.anchor]=t.result);else if("?"===t.tag){for(null!==t.result&&"scalar"!==t.kind&&fo(t,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+t.kind+'"'),l=0,h=t.implicitTypes.length;l<h;l+=1)if((d=t.implicitTypes[l]).resolve(t.result)){t.result=d.construct(t.result),t.tag=d.tag,null!==t.anchor&&(t.anchorMap[t.anchor]=t.result);break}}else if("!"!==t.tag){if(Vn.call(t.typeMap[t.kind||"fallback"],t.tag))d=t.typeMap[t.kind||"fallback"][t.tag];else for(d=null,l=0,h=(c=t.typeMap.multi[t.kind||"fallback"]).length;l<h;l+=1)if(t.tag.slice(0,c[l].tag.length)===c[l].tag){d=c[l];break}d||fo(t,"unknown tag !<"+t.tag+">"),null!==t.result&&d.kind!==t.kind&&fo(t,"unacceptable node kind for !<"+t.tag+'> tag; it should be "'+d.kind+'", not "'+t.kind+'"'),d.resolve(t.result,t.tag)?(t.result=d.construct(t.result,t.tag),null!==t.anchor&&(t.anchorMap[t.anchor]=t.result)):fo(t,"cannot resolve a node with !<"+t.tag+"> explicit tag")}return null!==t.listener&&t.listener("close",t),null!==t.tag||null!==t.anchor||y}function Oo(t){var e,r,i,a,n=t.position,o=!1;for(t.version=null,t.checkLineBreaks=t.legacy,t.tagMap=Object.create(null),t.anchorMap=Object.create(null);0!==(a=t.input.charCodeAt(t.position))&&(wo(t,!0,-1),a=t.input.charCodeAt(t.position),!(t.lineIndent>0||37!==a));){for(o=!0,a=t.input.charCodeAt(++t.position),e=t.position;0!==a&&!ro(a);)a=t.input.charCodeAt(++t.position);for(i=[],(r=t.input.slice(e,t.position)).length<1&&fo(t,"directive name must not be less than one character in length");0!==a;){for(;eo(a);)a=t.input.charCodeAt(++t.position);if(35===a){do{a=t.input.charCodeAt(++t.position)}while(0!==a&&!to(a));break}if(to(a))break;for(e=t.position;0!==a&&!ro(a);)a=t.input.charCodeAt(++t.position);i.push(t.input.slice(e,t.position))}0!==a&&ko(t),Vn.call(mo,r)?mo[r](t,r,i):yo(t,'unknown document directive "'+r+'"')}wo(t,!0,-1),0===t.lineIndent&&45===t.input.charCodeAt(t.position)&&45===t.input.charCodeAt(t.position+1)&&45===t.input.charCodeAt(t.position+2)?(t.position+=3,wo(t,!0,-1)):o&&fo(t,"directives end mark is expected"),Io(t,t.lineIndent-1,4,!1,!0),wo(t,!0,-1),t.checkLineBreaks&&Zn.test(t.input.slice(n,t.position))&&yo(t,"non-ASCII line breaks are interpreted as content"),t.documents.push(t.result),t.position===t.lineStart&&So(t)?46===t.input.charCodeAt(t.position)&&(t.position+=3,wo(t,!0,-1)):t.position<t.length-1&&fo(t,"end of the stream or a document separator is expected")}function Po(t,e){e=e||{},0!==(t=String(t)).length&&(10!==t.charCodeAt(t.length-1)&&13!==t.charCodeAt(t.length-1)&&(t+="\n"),65279===t.charCodeAt(0)&&(t=t.slice(1)));var r=new po(t,e),i=t.indexOf("\0");for(-1!==i&&(r.position=i,fo(r,"null byte is not allowed in input")),r.input+="\0";32===r.input.charCodeAt(r.position);)r.lineIndent+=1,r.position+=1;for(;r.position<r.length-1;)Oo(r);return r.documents}function Ro(t,e,r){null!==e&&"object"==typeof e&&void 0===r&&(r=e,e=null);var i=Po(t,r);if("function"!=typeof e)return i;for(var a=0,n=i.length;a<n;a+=1)e(i[a])}function qo(t,e){var r=Po(t,e);if(0!==r.length){if(1===r.length)return r[0];throw new Da("expected a single document in the stream, but found more")}}Cr(xo,"captureSegment"),Cr(bo,"mergeMappings"),Cr(Co,"storeMappingPair"),Cr(ko,"readLineBreak"),Cr(wo,"skipSeparationSpace"),Cr(So,"testDocumentSeparator"),Cr(To,"writeFoldedLines"),Cr(vo,"readPlainScalar"),Cr(Bo,"readSingleQuotedScalar"),Cr(_o,"readDoubleQuotedScalar"),Cr(Lo,"readFlowCollection"),Cr(Mo,"readBlockScalar"),Cr(Fo,"readBlockSequence"),Cr(Ao,"readBlockMapping"),Cr($o,"readTagProperty"),Cr(Eo,"readAnchorProperty"),Cr(Do,"readAlias"),Cr(Io,"composeNode"),Cr(Oo,"readDocument"),Cr(Po,"loadDocuments"),Cr(Ro,"loadAll$1"),Cr(qo,"load$1");var zo={loadAll:Ro,load:qo},Wo=Object.prototype.toString,No=Object.prototype.hasOwnProperty,jo=65279,Ho={0:"\\0",7:"\\a",8:"\\b",9:"\\t",10:"\\n",11:"\\v",12:"\\f",13:"\\r",27:"\\e",34:'\\"',92:"\\\\",133:"\\N",160:"\\_",8232:"\\L",8233:"\\P"},Uo=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],Yo=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function Vo(t,e){var r,i,a,n,o,s,l;if(null===e)return{};for(r={},a=0,n=(i=Object.keys(e)).length;a<n;a+=1)o=i[a],s=String(e[o]),"!!"===o.slice(0,2)&&(o="tag:yaml.org,2002:"+o.slice(2)),(l=t.compiledTypeMap.fallback[o])&&No.call(l.styleAliases,s)&&(s=l.styleAliases[s]),r[o]=s;return r}function Go(t){var e,r,i;if(e=t.toString(16).toUpperCase(),t<=255)r="x",i=2;else if(t<=65535)r="u",i=4;else{if(!(t<=4294967295))throw new Da("code point within a string may not be greater than 0xFFFFFFFF");r="U",i=8}return"\\"+r+Aa.repeat("0",i-e.length)+e}Cr(Vo,"compileStyleMap"),Cr(Go,"encodeHex");function Zo(t){this.schema=t.schema||Yn,this.indent=Math.max(1,t.indent||2),this.noArrayIndent=t.noArrayIndent||!1,this.skipInvalid=t.skipInvalid||!1,this.flowLevel=Aa.isNothing(t.flowLevel)?-1:t.flowLevel,this.styleMap=Vo(this.schema,t.styles||null),this.sortKeys=t.sortKeys||!1,this.lineWidth=t.lineWidth||80,this.noRefs=t.noRefs||!1,this.noCompatMode=t.noCompatMode||!1,this.condenseFlow=t.condenseFlow||!1,this.quotingType='"'===t.quotingType?2:1,this.forceQuotes=t.forceQuotes||!1,this.replacer="function"==typeof t.replacer?t.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function Xo(t,e){for(var r,i=Aa.repeat(" ",e),a=0,n=-1,o="",s=t.length;a<s;)-1===(n=t.indexOf("\n",a))?(r=t.slice(a),a=s):(r=t.slice(a,n+1),a=n+1),r.length&&"\n"!==r&&(o+=i),o+=r;return o}function Qo(t,e){return"\n"+Aa.repeat(" ",t.indent*e)}function Ko(t,e){var r,i;for(r=0,i=t.implicitTypes.length;r<i;r+=1)if(t.implicitTypes[r].resolve(e))return!0;return!1}function Jo(t){return 32===t||9===t}function ts(t){return 32<=t&&t<=126||161<=t&&t<=55295&&8232!==t&&8233!==t||57344<=t&&t<=65533&&t!==jo||65536<=t&&t<=1114111}function es(t){return ts(t)&&t!==jo&&13!==t&&10!==t}function rs(t,e,r){var i=es(t),a=i&&!Jo(t);return(r?i:i&&44!==t&&91!==t&&93!==t&&123!==t&&125!==t)&&35!==t&&!(58===e&&!a)||es(e)&&!Jo(e)&&35===t||58===e&&a}function is(t){return ts(t)&&t!==jo&&!Jo(t)&&45!==t&&63!==t&&58!==t&&44!==t&&91!==t&&93!==t&&123!==t&&125!==t&&35!==t&&38!==t&&42!==t&&33!==t&&124!==t&&61!==t&&62!==t&&39!==t&&34!==t&&37!==t&&64!==t&&96!==t}function as(t){return!Jo(t)&&58!==t}function ns(t,e){var r,i=t.charCodeAt(e);return i>=55296&&i<=56319&&e+1<t.length&&(r=t.charCodeAt(e+1))>=56320&&r<=57343?1024*(i-55296)+r-56320+65536:i}function os(t){return/^\n* /.test(t)}Cr(Zo,"State"),Cr(Xo,"indentString"),Cr(Qo,"generateNextLine"),Cr(Ko,"testImplicitResolving"),Cr(Jo,"isWhitespace"),Cr(ts,"isPrintable"),Cr(es,"isNsCharOrWhitespace"),Cr(rs,"isPlainSafe"),Cr(is,"isPlainSafeFirst"),Cr(as,"isPlainSafeLast"),Cr(ns,"codePointAt"),Cr(os,"needIndentIndicator");function ss(t,e,r,i,a,n,o,s){var l,h=0,c=null,d=!1,u=!1,p=-1!==i,g=-1,f=is(ns(t,0))&&as(ns(t,t.length-1));if(e||o)for(l=0;l<t.length;h>=65536?l+=2:l++){if(!ts(h=ns(t,l)))return 5;f=f&&rs(h,c,s),c=h}else{for(l=0;l<t.length;h>=65536?l+=2:l++){if(10===(h=ns(t,l)))d=!0,p&&(u=u||l-g-1>i&&" "!==t[g+1],g=l);else if(!ts(h))return 5;f=f&&rs(h,c,s),c=h}u=u||p&&l-g-1>i&&" "!==t[g+1]}return d||u?r>9&&os(t)?5:o?2===n?5:2:u?4:3:!f||o||a(t)?2===n?5:2:1}function ls(t,e,r,i,a){t.dump=function(){if(0===e.length)return 2===t.quotingType?'""':"''";if(!t.noCompatMode&&(-1!==Uo.indexOf(e)||Yo.test(e)))return 2===t.quotingType?'"'+e+'"':"'"+e+"'";var n=t.indent*Math.max(1,r),o=-1===t.lineWidth?-1:Math.max(Math.min(t.lineWidth,40),t.lineWidth-n),s=i||t.flowLevel>-1&&r>=t.flowLevel;function l(e){return Ko(t,e)}switch(Cr(l,"testAmbiguity"),ss(e,s,t.indent,o,l,t.quotingType,t.forceQuotes&&!i,a)){case 1:return e;case 2:return"'"+e.replace(/'/g,"''")+"'";case 3:return"|"+hs(e,t.indent)+cs(Xo(e,n));case 4:return">"+hs(e,t.indent)+cs(Xo(ds(e,o),n));case 5:return'"'+ps(e)+'"';default:throw new Da("impossible error: invalid scalar style")}}()}function hs(t,e){var r=os(t)?String(e):"",i="\n"===t[t.length-1];return r+(i&&("\n"===t[t.length-2]||"\n"===t)?"+":i?"":"-")+"\n"}function cs(t){return"\n"===t[t.length-1]?t.slice(0,-1):t}function ds(t,e){for(var r,i,a,n=/(\n+)([^\n]*)/g,o=(r=-1!==(r=t.indexOf("\n"))?r:t.length,n.lastIndex=r,us(t.slice(0,r),e)),s="\n"===t[0]||" "===t[0];a=n.exec(t);){var l=a[1],h=a[2];i=" "===h[0],o+=l+(s||i||""===h?"":"\n")+us(h,e),s=i}return o}function us(t,e){if(""===t||" "===t[0])return t;for(var r,i,a=/ [^ ]/g,n=0,o=0,s=0,l="";r=a.exec(t);)(s=r.index)-n>e&&(i=o>n?o:s,l+="\n"+t.slice(n,i),n=i+1),o=s;return l+="\n",t.length-n>e&&o>n?l+=t.slice(n,o)+"\n"+t.slice(o+1):l+=t.slice(n),l.slice(1)}function ps(t){for(var e,r="",i=0,a=0;a<t.length;i>=65536?a+=2:a++)i=ns(t,a),!(e=Ho[i])&&ts(i)?(r+=t[a],i>=65536&&(r+=t[a+1])):r+=e||Go(i);return r}function gs(t,e,r){var i,a,n,o="",s=t.tag;for(i=0,a=r.length;i<a;i+=1)n=r[i],t.replacer&&(n=t.replacer.call(r,String(i),n)),(bs(t,e,n,!1,!1)||void 0===n&&bs(t,e,null,!1,!1))&&(""!==o&&(o+=","+(t.condenseFlow?"":" ")),o+=t.dump);t.tag=s,t.dump="["+o+"]"}function fs(t,e,r,i){var a,n,o,s="",l=t.tag;for(a=0,n=r.length;a<n;a+=1)o=r[a],t.replacer&&(o=t.replacer.call(r,String(a),o)),(bs(t,e+1,o,!0,!0,!1,!0)||void 0===o&&bs(t,e+1,null,!0,!0,!1,!0))&&(i&&""===s||(s+=Qo(t,e)),t.dump&&10===t.dump.charCodeAt(0)?s+="-":s+="- ",s+=t.dump);t.tag=l,t.dump=s||"[]"}function ys(t,e,r){var i,a,n,o,s,l="",h=t.tag,c=Object.keys(r);for(i=0,a=c.length;i<a;i+=1)s="",""!==l&&(s+=", "),t.condenseFlow&&(s+='"'),o=r[n=c[i]],t.replacer&&(o=t.replacer.call(r,n,o)),bs(t,e,n,!1,!1)&&(t.dump.length>1024&&(s+="? "),s+=t.dump+(t.condenseFlow?'"':"")+":"+(t.condenseFlow?"":" "),bs(t,e,o,!1,!1)&&(l+=s+=t.dump));t.tag=h,t.dump="{"+l+"}"}function ms(t,e,r,i){var a,n,o,s,l,h,c="",d=t.tag,u=Object.keys(r);if(!0===t.sortKeys)u.sort();else if("function"==typeof t.sortKeys)u.sort(t.sortKeys);else if(t.sortKeys)throw new Da("sortKeys must be a boolean or a function");for(a=0,n=u.length;a<n;a+=1)h="",i&&""===c||(h+=Qo(t,e)),s=r[o=u[a]],t.replacer&&(s=t.replacer.call(r,o,s)),bs(t,e+1,o,!0,!0,!0)&&((l=null!==t.tag&&"?"!==t.tag||t.dump&&t.dump.length>1024)&&(t.dump&&10===t.dump.charCodeAt(0)?h+="?":h+="? "),h+=t.dump,l&&(h+=Qo(t,e)),bs(t,e+1,s,!0,l)&&(t.dump&&10===t.dump.charCodeAt(0)?h+=":":h+=": ",c+=h+=t.dump));t.tag=d,t.dump=c||"{}"}function xs(t,e,r){var i,a,n,o,s,l;for(n=0,o=(a=r?t.explicitTypes:t.implicitTypes).length;n<o;n+=1)if(((s=a[n]).instanceOf||s.predicate)&&(!s.instanceOf||"object"==typeof e&&e instanceof s.instanceOf)&&(!s.predicate||s.predicate(e))){if(r?s.multi&&s.representName?t.tag=s.representName(e):t.tag=s.tag:t.tag="?",s.represent){if(l=t.styleMap[s.tag]||s.defaultStyle,"[object Function]"===Wo.call(s.represent))i=s.represent(e,l);else{if(!No.call(s.represent,l))throw new Da("!<"+s.tag+'> tag resolver accepts not "'+l+'" style');i=s.represent[l](e,l)}t.dump=i}return!0}return!1}function bs(t,e,r,i,a,n,o){t.tag=null,t.dump=r,xs(t,r,!1)||xs(t,r,!0);var s,l=Wo.call(t.dump),h=i;i&&(i=t.flowLevel<0||t.flowLevel>e);var c,d,u="[object Object]"===l||"[object Array]"===l;if(u&&(d=-1!==(c=t.duplicates.indexOf(r))),(null!==t.tag&&"?"!==t.tag||d||2!==t.indent&&e>0)&&(a=!1),d&&t.usedDuplicates[c])t.dump="*ref_"+c;else{if(u&&d&&!t.usedDuplicates[c]&&(t.usedDuplicates[c]=!0),"[object Object]"===l)i&&0!==Object.keys(t.dump).length?(ms(t,e,t.dump,a),d&&(t.dump="&ref_"+c+t.dump)):(ys(t,e,t.dump),d&&(t.dump="&ref_"+c+" "+t.dump));else if("[object Array]"===l)i&&0!==t.dump.length?(t.noArrayIndent&&!o&&e>0?fs(t,e-1,t.dump,a):fs(t,e,t.dump,a),d&&(t.dump="&ref_"+c+t.dump)):(gs(t,e,t.dump),d&&(t.dump="&ref_"+c+" "+t.dump));else{if("[object String]"!==l){if("[object Undefined]"===l)return!1;if(t.skipInvalid)return!1;throw new Da("unacceptable kind of an object to dump "+l)}"?"!==t.tag&&ls(t,t.dump,e,n,h)}null!==t.tag&&"?"!==t.tag&&(s=encodeURI("!"===t.tag[0]?t.tag.slice(1):t.tag).replace(/!/g,"%21"),s="!"===t.tag[0]?"!"+s:"tag:yaml.org,2002:"===s.slice(0,18)?"!!"+s.slice(18):"!<"+s+">",t.dump=s+" "+t.dump)}return!0}function Cs(t,e){var r,i,a=[],n=[];for(ks(t,a,n),r=0,i=n.length;r<i;r+=1)e.duplicates.push(a[n[r]]);e.usedDuplicates=new Array(i)}function ks(t,e,r){var i,a,n;if(null!==t&&"object"==typeof t)if(-1!==(a=e.indexOf(t)))-1===r.indexOf(a)&&r.push(a);else if(e.push(t),Array.isArray(t))for(a=0,n=t.length;a<n;a+=1)ks(t[a],e,r);else for(a=0,n=(i=Object.keys(t)).length;a<n;a+=1)ks(t[i[a]],e,r)}Cr(ss,"chooseScalarStyle"),Cr(ls,"writeScalar"),Cr(hs,"blockHeader"),Cr(cs,"dropEndingNewline"),Cr(ds,"foldString"),Cr(us,"foldLine"),Cr(ps,"escapeString"),Cr(gs,"writeFlowSequence"),Cr(fs,"writeBlockSequence"),Cr(ys,"writeFlowMapping"),Cr(ms,"writeBlockMapping"),Cr(xs,"detectType"),Cr(bs,"writeNode"),Cr(Cs,"getDuplicateReferences"),Cr(ks,"inspectNode"),Cr((function(t,e){var r=new Zo(e=e||{});r.noRefs||Cs(t,r);var i=t;return r.replacer&&(i=r.replacer.call({"":i},"",i)),bs(r,0,i,!0,!0)?r.dump+"\n":""}),"dump$1"),Cr((function(t,e){return function(){throw new Error("Function yaml."+t+" is removed in js-yaml 4. Use yaml."+e+" instead, which is now safe by default.")}}),"renamed");var ws=mn,Ss=zo.load;
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./dagre-7KT5K2WU-ygScfUFf.js","./graph-CWjU_jY_.js","./_baseUniq-Cj00cPHg.js","./index-D0sovBhz.js","./index-BkD6C0P6.css","./_baseEach-DnNcEHlH.js","./transform-v6r2D_6X.js","./timer-CK-RIWfW.js","./layout-DVr4vTMt.js","./min-CJmFKm0b.js","./_baseMap-BusrJNE7.js","./sortBy-B5u3AJ5B.js","./json-BDWHPwhW.js","./clone-DV35tsP8.js","./step-CNn2V7Th.js","./c4Diagram-ZCSEYPFN-2a9TNS5c.js","./chunk-V35ELUW5-h9ByFxzD.js","./flowDiagram-NWEUNK3L-DQXKt_1R.js","./chunk-4LC2V6XN-BmzjFbuj.js","./channel-CZnwPu9M.js","./erDiagram-DKC2X5TE-CqJyBonf.js","./gitGraphDiagram-JPZ3KUXI-B856k94f.js","./chunk-RYO7GUH3-Cnos49mw.js","./chunk-6JKP7OK7-BD9KWPuh.js","./gitGraph-YCYPL57B-DKmr6H_9.js","./main-cdvIQCIX.js","./ganttDiagram-HLVPPPRE-BJe5-mEJ.js","./time-BUo3Bu3K.js","./linear-Do2jMujw.js","./init-DLRA0X12.js","./infoDiagram-RZZSJVI2-S89OtAH5.js","./pieDiagram-X7YZ5ZEZ-IUwQKe6e.js","./arc-lt4NHaVr.js","./ordinal-DDUp3AbE.js","./quadrantDiagram-F36EZAVT-TMRbFxUO.js","./xychartDiagram-KECQ2H5Q-CaOPiKTB.js","./range-CtcPcB_L.js","./requirementDiagram-JG2LMPGF-A2kisNxW.js","./sequenceDiagram-WK7YDQ3N-BUDaE9hy.js","./classDiagram-Q73GJZWF-Dg1hLiwH.js","./chunk-NGC4727B-eGAL6ua8.js","./classDiagram-v2-C6QPLPW4-C_-2E8CJ.js","./chunk-REEJFE46-BWQvoG1j.js","./stateDiagram-4JV6CC6H-DgBSWDh5.js","./chunk-5RIWM3LS-DJZY7FZP.js","./stateDiagram-v2-7KT6RKTD-Bd_UwSw6.js","./journeyDiagram-BLD6N6MZ-BCWDa8Of.js","./timeline-definition-3ZMEY6HS-ZxX1_aNV.js","./mindmap-definition-OEB2RXX2-BquGOjTQ.js","./cytoscape.esm-DXieaT54.js","./sankeyDiagram-ATFNWWW6-D_zdiDfN.js","./colors-bszWmPJw.js","./diagram-AVGMFHF7-Dfq1cYt1.js","./blockDiagram-TCMKQVZ6-Dee8Jr2A.js","./architectureDiagram-IFBEXTG3-BVBQN81H.js"])))=>i.map(i=>d[i]);
2
+ var t,e,r,i,a,n,o,s,l,h,c,d,u,p=Object.defineProperty,g=t=>{throw TypeError(t)},f=(t,e,r)=>((t,e,r)=>e in t?p(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r)(t,"symbol"!=typeof e?e+"":e,r),y=(t,e,r)=>(((t,e,r)=>{e.has(t)||g("Cannot "+r)})(t,e,"access private method"),r);import{b_ as m,cv as x,cn as b,ad as C,cC as k,n as w,cD as S,cE as T,ci as v,cF as B,cG as _,cH as L,aT as M,cl as F,cI as A,a9 as $,cJ as E,A as D,bY as I,cj as O,cK as P,at as R,g as q,cL as z,cM as W,F as N,a4 as j,ah as H,K as U,ap as Y}from"./index-D0sovBhz.js";import{b as V,a as G,s as Z}from"./transform-v6r2D_6X.js";import{k as X,q as Q,r as K,u as J,v as tt,x as et,y as rt,z as it,A as at,B as nt,n as ot,C as st,D as lt,E as ht,F as ct,G as dt,H as ut,I as pt,l as gt}from"./step-CNn2V7Th.js";var ft=Object.create,yt=function(){function t(){}return function(e){if(!m(e))return{};if(ft)return ft(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}}();function mt(t,e){var r=-1,i=t.length;for(e||(e=Array(i));++r<i;)e[r]=t[r];return e}function xt(t,e,r,i){var a=!r;r||(r={});for(var n=-1,o=e.length;++n<o;){var s=e[n],l=void 0;void 0===l&&(l=t[s]),a?x(r,s,l):b(r,s,l)}return r}function bt(t){return V((function(e,r){var i=-1,a=r.length,n=a>1?r[a-1]:void 0,o=a>2?r[2]:void 0;for(n=t.length>3&&"function"==typeof n?(a--,n):void 0,o&&C(r[0],r[1],o)&&(n=a<3?void 0:n,a=1),e=Object(e);++i<a;){var s=r[i];s&&t(e,s,i,n)}return e}))}var Ct=Object.prototype.hasOwnProperty;function kt(t){if(!m(t))return function(t){var e=[];if(null!=t)for(var r in Object(t))e.push(r);return e}(t);var e=k(t),r=[];for(var i in t)("constructor"!=i||!e&&Ct.call(t,i))&&r.push(i);return r}function wt(t){return w(t)?S(t,!0):kt(t)}var St=T(Object.getPrototypeOf,Object),Tt=Function.prototype,vt=Object.prototype,Bt=Tt.toString,_t=vt.hasOwnProperty,Lt=Bt.call(Object);var Mt="object"==typeof exports&&exports&&!exports.nodeType&&exports,Ft=Mt&&"object"==typeof module&&module&&!module.nodeType&&module,At=Ft&&Ft.exports===Mt?_.Buffer:void 0,$t=At?At.allocUnsafe:void 0;function Et(t,e){if(e)return t.slice();var r=t.length,i=$t?$t(r):new t.constructor(r);return t.copy(i),i}function Dt(t){var e=new t.constructor(t.byteLength);return new L(e).set(new L(t)),e}function It(t,e){var r=e?Dt(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}function Ot(t){return"function"!=typeof t.constructor||k(t)?{}:yt(St(t))}function Pt(t,e,r){(void 0!==r&&!M(t[e],r)||void 0===r&&!(e in t))&&x(t,e,r)}function Rt(t){return v(t)&&w(t)}function qt(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}function zt(t,e,r,i,a,n,o){var s=qt(t,r),l=qt(e,r),h=o.get(l);if(h)Pt(t,r,h);else{var c,d=n?n(s,l,r+"",t,e,o):void 0,u=void 0===d;if(u){var p=$(l),g=!p&&F(l),f=!p&&!g&&A(l);d=l,p||g||f?$(s)?d=s:Rt(s)?d=mt(s):g?(u=!1,d=Et(l,!0)):f?(u=!1,d=It(l,!0)):d=[]:function(t){if(!v(t)||"[object Object]"!=B(t))return!1;var e=St(t);if(null===e)return!0;var r=_t.call(e,"constructor")&&e.constructor;return"function"==typeof r&&r instanceof r&&Bt.call(r)==Lt}(l)||E(l)?(d=s,E(s)?d=xt(c=s,wt(c)):m(s)&&!D(s)||(d=Ot(l))):u=!1}u&&(o.set(l,d),a(d,l,i,n,o),o.delete(l)),Pt(t,r,d)}}function Wt(t,e,r,i,a){t!==e&&G(e,(function(n,o){if(a||(a=new I),m(n))zt(t,e,o,r,Wt,i,a);else{var s=i?i(qt(t,o),n,o+"",t,e,a):void 0;void 0===s&&(s=n),Pt(t,o,s)}}),wt)}var Nt=Object.prototype.hasOwnProperty;function jt(t){if(null==t)return!0;if(w(t)&&($(t)||"string"==typeof t||"function"==typeof t.splice||F(t)||A(t)||E(t)))return!t.length;var e=O(t);if("[object Map]"==e||"[object Set]"==e)return!t.size;if(k(t))return!P(t).length;for(var r in t)if(Nt.call(t,r))return!1;return!0}var Ht=bt((function(t,e,r){Wt(t,e,r)}));class Ut{constructor(t,e){this._context=t,this._x=e}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line}point(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,e,t,e):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+e)/2,t,this._y0,t,e)}this._x0=t,this._y0=e}}var Yt={exports:{}};const Vt=q(Yt.exports=function(){var t=1e3,e=6e4,r=36e5,i="millisecond",a="second",n="minute",o="hour",s="day",l="week",h="month",c="quarter",d="year",u="date",p="Invalid Date",g=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,f=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,y={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(t){var e=["th","st","nd","rd"],r=t%100;return"["+t+(e[(r-20)%10]||e[r]||e[0])+"]"}},m=function(t,e,r){var i=String(t);return!i||i.length>=e?t:""+Array(e+1-i.length).join(r)+t},x={s:m,z:function(t){var e=-t.utcOffset(),r=Math.abs(e),i=Math.floor(r/60),a=r%60;return(e<=0?"+":"-")+m(i,2,"0")+":"+m(a,2,"0")},m:function t(e,r){if(e.date()<r.date())return-t(r,e);var i=12*(r.year()-e.year())+(r.month()-e.month()),a=e.clone().add(i,h),n=r-a<0,o=e.clone().add(i+(n?-1:1),h);return+(-(i+(r-a)/(n?a-o:o-a))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return{M:h,y:d,w:l,d:s,D:u,h:o,m:n,s:a,ms:i,Q:c}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},b="en",C={};C[b]=y;var k="$isDayjsObject",w=function(t){return t instanceof B||!(!t||!t[k])},S=function t(e,r,i){var a;if(!e)return b;if("string"==typeof e){var n=e.toLowerCase();C[n]&&(a=n),r&&(C[n]=r,a=n);var o=e.split("-");if(!a&&o.length>1)return t(o[0])}else{var s=e.name;C[s]=e,a=s}return!i&&a&&(b=a),a||!i&&b},T=function(t,e){if(w(t))return t.clone();var r="object"==typeof e?e:{};return r.date=t,r.args=arguments,new B(r)},v=x;v.l=S,v.i=w,v.w=function(t,e){return T(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var B=function(){function y(t){this.$L=S(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[k]=!0}var m=y.prototype;return m.parse=function(t){this.$d=function(t){var e=t.date,r=t.utc;if(null===e)return new Date(NaN);if(v.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var i=e.match(g);if(i){var a=i[2]-1||0,n=(i[7]||"0").substring(0,3);return r?new Date(Date.UTC(i[1],a,i[3]||1,i[4]||0,i[5]||0,i[6]||0,n)):new Date(i[1],a,i[3]||1,i[4]||0,i[5]||0,i[6]||0,n)}}return new Date(e)}(t),this.init()},m.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},m.$utils=function(){return v},m.isValid=function(){return!(this.$d.toString()===p)},m.isSame=function(t,e){var r=T(t);return this.startOf(e)<=r&&r<=this.endOf(e)},m.isAfter=function(t,e){return T(t)<this.startOf(e)},m.isBefore=function(t,e){return this.endOf(e)<T(t)},m.$g=function(t,e,r){return v.u(t)?this[e]:this.set(r,t)},m.unix=function(){return Math.floor(this.valueOf()/1e3)},m.valueOf=function(){return this.$d.getTime()},m.startOf=function(t,e){var r=this,i=!!v.u(e)||e,c=v.p(t),p=function(t,e){var a=v.w(r.$u?Date.UTC(r.$y,e,t):new Date(r.$y,e,t),r);return i?a:a.endOf(s)},g=function(t,e){return v.w(r.toDate()[t].apply(r.toDate("s"),(i?[0,0,0,0]:[23,59,59,999]).slice(e)),r)},f=this.$W,y=this.$M,m=this.$D,x="set"+(this.$u?"UTC":"");switch(c){case d:return i?p(1,0):p(31,11);case h:return i?p(1,y):p(0,y+1);case l:var b=this.$locale().weekStart||0,C=(f<b?f+7:f)-b;return p(i?m-C:m+(6-C),y);case s:case u:return g(x+"Hours",0);case o:return g(x+"Minutes",1);case n:return g(x+"Seconds",2);case a:return g(x+"Milliseconds",3);default:return this.clone()}},m.endOf=function(t){return this.startOf(t,!1)},m.$set=function(t,e){var r,l=v.p(t),c="set"+(this.$u?"UTC":""),p=(r={},r[s]=c+"Date",r[u]=c+"Date",r[h]=c+"Month",r[d]=c+"FullYear",r[o]=c+"Hours",r[n]=c+"Minutes",r[a]=c+"Seconds",r[i]=c+"Milliseconds",r)[l],g=l===s?this.$D+(e-this.$W):e;if(l===h||l===d){var f=this.clone().set(u,1);f.$d[p](g),f.init(),this.$d=f.set(u,Math.min(this.$D,f.daysInMonth())).$d}else p&&this.$d[p](g);return this.init(),this},m.set=function(t,e){return this.clone().$set(t,e)},m.get=function(t){return this[v.p(t)]()},m.add=function(i,c){var u,p=this;i=Number(i);var g=v.p(c),f=function(t){var e=T(p);return v.w(e.date(e.date()+Math.round(t*i)),p)};if(g===h)return this.set(h,this.$M+i);if(g===d)return this.set(d,this.$y+i);if(g===s)return f(1);if(g===l)return f(7);var y=(u={},u[n]=e,u[o]=r,u[a]=t,u)[g]||1,m=this.$d.getTime()+i*y;return v.w(m,this)},m.subtract=function(t,e){return this.add(-1*t,e)},m.format=function(t){var e=this,r=this.$locale();if(!this.isValid())return r.invalidDate||p;var i=t||"YYYY-MM-DDTHH:mm:ssZ",a=v.z(this),n=this.$H,o=this.$m,s=this.$M,l=r.weekdays,h=r.months,c=r.meridiem,d=function(t,r,a,n){return t&&(t[r]||t(e,i))||a[r].slice(0,n)},u=function(t){return v.s(n%12||12,t,"0")},g=c||function(t,e,r){var i=t<12?"AM":"PM";return r?i.toLowerCase():i};return i.replace(f,(function(t,i){return i||function(t){switch(t){case"YY":return String(e.$y).slice(-2);case"YYYY":return v.s(e.$y,4,"0");case"M":return s+1;case"MM":return v.s(s+1,2,"0");case"MMM":return d(r.monthsShort,s,h,3);case"MMMM":return d(h,s);case"D":return e.$D;case"DD":return v.s(e.$D,2,"0");case"d":return String(e.$W);case"dd":return d(r.weekdaysMin,e.$W,l,2);case"ddd":return d(r.weekdaysShort,e.$W,l,3);case"dddd":return l[e.$W];case"H":return String(n);case"HH":return v.s(n,2,"0");case"h":return u(1);case"hh":return u(2);case"a":return g(n,o,!0);case"A":return g(n,o,!1);case"m":return String(o);case"mm":return v.s(o,2,"0");case"s":return String(e.$s);case"ss":return v.s(e.$s,2,"0");case"SSS":return v.s(e.$ms,3,"0");case"Z":return a}return null}(t)||a.replace(":","")}))},m.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},m.diff=function(i,u,p){var g,f=this,y=v.p(u),m=T(i),x=(m.utcOffset()-this.utcOffset())*e,b=this-m,C=function(){return v.m(f,m)};switch(y){case d:g=C()/12;break;case h:g=C();break;case c:g=C()/3;break;case l:g=(b-x)/6048e5;break;case s:g=(b-x)/864e5;break;case o:g=b/r;break;case n:g=b/e;break;case a:g=b/t;break;default:g=b}return p?g:v.a(g)},m.daysInMonth=function(){return this.endOf(h).$D},m.$locale=function(){return C[this.$L]},m.locale=function(t,e){if(!t)return this.$L;var r=this.clone(),i=S(t,e,!0);return i&&(r.$L=i),r},m.clone=function(){return v.w(this.$d,this)},m.toDate=function(){return new Date(this.valueOf())},m.toJSON=function(){return this.isValid()?this.toISOString():null},m.toISOString=function(){return this.$d.toISOString()},m.toString=function(){return this.$d.toUTCString()},y}(),_=B.prototype;return T.prototype=_,[["$ms",i],["$s",a],["$m",n],["$H",o],["$W",s],["$M",h],["$y",d],["$D",u]].forEach((function(t){_[t[1]]=function(e){return this.$g(e,t[0],t[1])}})),T.extend=function(t,e){return t.$i||(t(e,B,T),t.$i=!0),T},T.locale=S,T.isDayjs=w,T.unix=function(t){return T(1e3*t)},T.en=C[b],T.Ls=C,T.p={},T}()),Gt={min:{r:0,g:0,b:0,s:0,l:0,a:0},max:{r:255,g:255,b:255,h:360,s:100,l:100,a:1},clamp:{r:t=>t>=255?255:t<0?0:t,g:t=>t>=255?255:t<0?0:t,b:t=>t>=255?255:t<0?0:t,h:t=>t%360,s:t=>t>=100?100:t<0?0:t,l:t=>t>=100?100:t<0?0:t,a:t=>t>=1?1:t<0?0:t},toLinear:t=>{const e=t/255;return t>.03928?Math.pow((e+.055)/1.055,2.4):e/12.92},hue2rgb:(t,e,r)=>(r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+6*(e-t)*r:r<.5?e:r<2/3?t+(e-t)*(2/3-r)*6:t),hsl2rgb:({h:t,s:e,l:r},i)=>{if(!e)return 2.55*r;t/=360,e/=100;const a=(r/=100)<.5?r*(1+e):r+e-r*e,n=2*r-a;switch(i){case"r":return 255*Gt.hue2rgb(n,a,t+1/3);case"g":return 255*Gt.hue2rgb(n,a,t);case"b":return 255*Gt.hue2rgb(n,a,t-1/3)}},rgb2hsl:({r:t,g:e,b:r},i)=>{t/=255,e/=255,r/=255;const a=Math.max(t,e,r),n=Math.min(t,e,r),o=(a+n)/2;if("l"===i)return 100*o;if(a===n)return 0;const s=a-n;if("s"===i)return 100*(o>.5?s/(2-a-n):s/(a+n));switch(a){case t:return 60*((e-r)/s+(e<r?6:0));case e:return 60*((r-t)/s+2);case r:return 60*((t-e)/s+4);default:return-1}}},Zt={channel:Gt,lang:{clamp:(t,e,r)=>e>r?Math.min(e,Math.max(r,t)):Math.min(r,Math.max(e,t)),round:t=>Math.round(1e10*t)/1e10},unit:{dec2hex:t=>{const e=Math.round(t).toString(16);return e.length>1?e:`0${e}`}}},Xt={};for(let by=0;by<=255;by++)Xt[by]=Zt.unit.dec2hex(by);const Qt=0,Kt=1,Jt=2;class te{constructor(){this.type=Qt}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=Qt}is(t){return this.type===t}}const ee=new class{constructor(t,e){this.color=e,this.changed=!1,this.data=t,this.type=new te}set(t,e){return this.color=e,this.changed=!1,this.data=t,this.type.type=Qt,this}_ensureHSL(){const t=this.data,{h:e,s:r,l:i}=t;void 0===e&&(t.h=Zt.channel.rgb2hsl(t,"h")),void 0===r&&(t.s=Zt.channel.rgb2hsl(t,"s")),void 0===i&&(t.l=Zt.channel.rgb2hsl(t,"l"))}_ensureRGB(){const t=this.data,{r:e,g:r,b:i}=t;void 0===e&&(t.r=Zt.channel.hsl2rgb(t,"r")),void 0===r&&(t.g=Zt.channel.hsl2rgb(t,"g")),void 0===i&&(t.b=Zt.channel.hsl2rgb(t,"b"))}get r(){const t=this.data,e=t.r;return this.type.is(Jt)||void 0===e?(this._ensureHSL(),Zt.channel.hsl2rgb(t,"r")):e}get g(){const t=this.data,e=t.g;return this.type.is(Jt)||void 0===e?(this._ensureHSL(),Zt.channel.hsl2rgb(t,"g")):e}get b(){const t=this.data,e=t.b;return this.type.is(Jt)||void 0===e?(this._ensureHSL(),Zt.channel.hsl2rgb(t,"b")):e}get h(){const t=this.data,e=t.h;return this.type.is(Kt)||void 0===e?(this._ensureRGB(),Zt.channel.rgb2hsl(t,"h")):e}get s(){const t=this.data,e=t.s;return this.type.is(Kt)||void 0===e?(this._ensureRGB(),Zt.channel.rgb2hsl(t,"s")):e}get l(){const t=this.data,e=t.l;return this.type.is(Kt)||void 0===e?(this._ensureRGB(),Zt.channel.rgb2hsl(t,"l")):e}get a(){return this.data.a}set r(t){this.type.set(Kt),this.changed=!0,this.data.r=t}set g(t){this.type.set(Kt),this.changed=!0,this.data.g=t}set b(t){this.type.set(Kt),this.changed=!0,this.data.b=t}set h(t){this.type.set(Jt),this.changed=!0,this.data.h=t}set s(t){this.type.set(Jt),this.changed=!0,this.data.s=t}set l(t){this.type.set(Jt),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}}({r:0,g:0,b:0,a:0},"transparent"),re={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:t=>{if(35!==t.charCodeAt(0))return;const e=t.match(re.re);if(!e)return;const r=e[1],i=parseInt(r,16),a=r.length,n=a%4==0,o=a>4,s=o?1:17,l=o?8:4,h=n?0:-1,c=o?255:15;return ee.set({r:(i>>l*(h+3)&c)*s,g:(i>>l*(h+2)&c)*s,b:(i>>l*(h+1)&c)*s,a:n?(i&c)*s/255:1},t)},stringify:t=>{const{r:e,g:r,b:i,a:a}=t;return a<1?`#${Xt[Math.round(e)]}${Xt[Math.round(r)]}${Xt[Math.round(i)]}${Xt[Math.round(255*a)]}`:`#${Xt[Math.round(e)]}${Xt[Math.round(r)]}${Xt[Math.round(i)]}`}},ie={re:/^hsla?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(?:deg|grad|rad|turn)?)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(%)?))?\s*?\)$/i,hueRe:/^(.+?)(deg|grad|rad|turn)$/i,_hue2deg:t=>{const e=t.match(ie.hueRe);if(e){const[,t,r]=e;switch(r){case"grad":return Zt.channel.clamp.h(.9*parseFloat(t));case"rad":return Zt.channel.clamp.h(180*parseFloat(t)/Math.PI);case"turn":return Zt.channel.clamp.h(360*parseFloat(t))}}return Zt.channel.clamp.h(parseFloat(t))},parse:t=>{const e=t.charCodeAt(0);if(104!==e&&72!==e)return;const r=t.match(ie.re);if(!r)return;const[,i,a,n,o,s]=r;return ee.set({h:ie._hue2deg(i),s:Zt.channel.clamp.s(parseFloat(a)),l:Zt.channel.clamp.l(parseFloat(n)),a:o?Zt.channel.clamp.a(s?parseFloat(o)/100:parseFloat(o)):1},t)},stringify:t=>{const{h:e,s:r,l:i,a:a}=t;return a<1?`hsla(${Zt.lang.round(e)}, ${Zt.lang.round(r)}%, ${Zt.lang.round(i)}%, ${a})`:`hsl(${Zt.lang.round(e)}, ${Zt.lang.round(r)}%, ${Zt.lang.round(i)}%)`}},ae={colors:{aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyanaqua:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",transparent:"#00000000",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},parse:t=>{t=t.toLowerCase();const e=ae.colors[t];if(e)return re.parse(e)},stringify:t=>{const e=re.stringify(t);for(const r in ae.colors)if(ae.colors[r]===e)return r}},ne={re:/^rgba?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?)))?\s*?\)$/i,parse:t=>{const e=t.charCodeAt(0);if(114!==e&&82!==e)return;const r=t.match(ne.re);if(!r)return;const[,i,a,n,o,s,l,h,c]=r;return ee.set({r:Zt.channel.clamp.r(a?2.55*parseFloat(i):parseFloat(i)),g:Zt.channel.clamp.g(o?2.55*parseFloat(n):parseFloat(n)),b:Zt.channel.clamp.b(l?2.55*parseFloat(s):parseFloat(s)),a:h?Zt.channel.clamp.a(c?parseFloat(h)/100:parseFloat(h)):1},t)},stringify:t=>{const{r:e,g:r,b:i,a:a}=t;return a<1?`rgba(${Zt.lang.round(e)}, ${Zt.lang.round(r)}, ${Zt.lang.round(i)}, ${Zt.lang.round(a)})`:`rgb(${Zt.lang.round(e)}, ${Zt.lang.round(r)}, ${Zt.lang.round(i)})`}},oe={format:{keyword:ae,hex:re,rgb:ne,rgba:ne,hsl:ie,hsla:ie},parse:t=>{if("string"!=typeof t)return t;const e=re.parse(t)||ne.parse(t)||ie.parse(t)||ae.parse(t);if(e)return e;throw new Error(`Unsupported color format: "${t}"`)},stringify:t=>!t.changed&&t.color?t.color:t.type.is(Jt)||void 0===t.data.r?ie.stringify(t):t.a<1||!Number.isInteger(t.r)||!Number.isInteger(t.g)||!Number.isInteger(t.b)?ne.stringify(t):re.stringify(t)},se=(t,e)=>{const r=oe.parse(t);for(const i in e)r[i]=Zt.channel.clamp[i](e[i]);return oe.stringify(r)},le=(t,e,r=0,i=1)=>{if("number"!=typeof t)return se(t,{a:e});const a=ee.set({r:Zt.channel.clamp.r(t),g:Zt.channel.clamp.g(e),b:Zt.channel.clamp.b(r),a:Zt.channel.clamp.a(i)});return oe.stringify(a)},he=t=>(t=>{const{r:e,g:r,b:i}=oe.parse(t),a=.2126*Zt.channel.toLinear(e)+.7152*Zt.channel.toLinear(r)+.0722*Zt.channel.toLinear(i);return Zt.lang.round(a)})(t)>=.5,ce=t=>!he(t),de=(t,e,r)=>{const i=oe.parse(t),a=i[e],n=Zt.channel.clamp[e](a+r);return a!==n&&(i[e]=n),oe.stringify(i)},ue=(t,e)=>de(t,"l",e),pe=(t,e)=>de(t,"l",-e),ge=(t,e)=>{const r=oe.parse(t),i={};for(const a in e)e[a]&&(i[a]=r[a]+e[a]);return se(t,i)},fe=(t,e=100)=>{const r=oe.parse(t);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,((t,e,r=50)=>{const{r:i,g:a,b:n,a:o}=oe.parse(t),{r:s,g:l,b:h,a:c}=oe.parse(e),d=r/100,u=2*d-1,p=o-c,g=((u*p==-1?u:(u+p)/(1+u*p))+1)/2,f=1-g;return le(i*g+s*f,a*g+l*f,n*g+h*f,o*d+c*(1-d))})(r,t,e)},{entries:ye,setPrototypeOf:me,isFrozen:xe,getPrototypeOf:be,getOwnPropertyDescriptor:Ce}=Object;let{freeze:ke,seal:we,create:Se}=Object,{apply:Te,construct:ve}="undefined"!=typeof Reflect&&Reflect;ke||(ke=function(t){return t}),we||(we=function(t){return t}),Te||(Te=function(t,e,r){return t.apply(e,r)}),ve||(ve=function(t,e){return new t(...e)});const Be=qe(Array.prototype.forEach),_e=qe(Array.prototype.pop),Le=qe(Array.prototype.push),Me=qe(String.prototype.toLowerCase),Fe=qe(String.prototype.toString),Ae=qe(String.prototype.match),$e=qe(String.prototype.replace),Ee=qe(String.prototype.indexOf),De=qe(String.prototype.trim),Ie=qe(Object.prototype.hasOwnProperty),Oe=qe(RegExp.prototype.test),Pe=(Re=TypeError,function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return ve(Re,e)});var Re;function qe(t){return function(e){for(var r=arguments.length,i=new Array(r>1?r-1:0),a=1;a<r;a++)i[a-1]=arguments[a];return Te(t,e,i)}}function ze(t,e){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Me;me&&me(t,null);let i=e.length;for(;i--;){let a=e[i];if("string"==typeof a){const t=r(a);t!==a&&(xe(e)||(e[i]=t),a=t)}t[a]=!0}return t}function We(t){for(let e=0;e<t.length;e++){Ie(t,e)||(t[e]=null)}return t}function Ne(t){const e=Se(null);for(const[r,i]of ye(t)){Ie(t,r)&&(Array.isArray(i)?e[r]=We(i):i&&"object"==typeof i&&i.constructor===Object?e[r]=Ne(i):e[r]=i)}return e}function je(t,e){for(;null!==t;){const r=Ce(t,e);if(r){if(r.get)return qe(r.get);if("function"==typeof r.value)return qe(r.value)}t=be(t)}return function(){return null}}const He=ke(["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","section","select","shadow","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"]),Ue=ke(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Ye=ke(["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"]),Ve=ke(["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"]),Ge=ke(["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"]),Ze=ke(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Xe=ke(["#text"]),Qe=ke(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","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","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),Ke=ke(["accent-height","accumulate","additive","alignment-baseline","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","dur","edgemode","elevation","end","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","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","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","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","targetx","targety","transform","transform-origin","text-anchor","text-decoration","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"]),Je=ke(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","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"]),tr=ke(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),er=we(/\{\{[\w\W]*|[\w\W]*\}\}/gm),rr=we(/<%[\w\W]*|[\w\W]*%>/gm),ir=we(/\${[\w\W]*}/gm),ar=we(/^data-[\-\w.\u00B7-\uFFFF]/),nr=we(/^aria-[\-\w]+$/),or=we(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),sr=we(/^(?:\w+script|data):/i),lr=we(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),hr=we(/^html$/i),cr=we(/^[a-z][.\w]*(-[.\w]+)+$/i);var dr=Object.freeze({__proto__:null,MUSTACHE_EXPR:er,ERB_EXPR:rr,TMPLIT_EXPR:ir,DATA_ATTR:ar,ARIA_ATTR:nr,IS_ALLOWED_URI:or,IS_SCRIPT_OR_DATA:sr,ATTR_WHITESPACE:lr,DOCTYPE_NAME:hr,CUSTOM_ELEMENT:cr});const ur=1,pr=3,gr=7,fr=8,yr=9;var mr,xr=function t(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"undefined"==typeof window?null:window;const r=e=>t(e);if(r.version="3.1.6",r.removed=[],!e||!e.document||e.document.nodeType!==yr)return r.isSupported=!1,r;let{document:i}=e;const a=i,n=a.currentScript,{DocumentFragment:o,HTMLTemplateElement:s,Node:l,Element:h,NodeFilter:c,NamedNodeMap:d=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:u,DOMParser:p,trustedTypes:g}=e,f=h.prototype,y=je(f,"cloneNode"),m=je(f,"remove"),x=je(f,"nextSibling"),b=je(f,"childNodes"),C=je(f,"parentNode");if("function"==typeof s){const t=i.createElement("template");t.content&&t.content.ownerDocument&&(i=t.content.ownerDocument)}let k,w="";const{implementation:S,createNodeIterator:T,createDocumentFragment:v,getElementsByTagName:B}=i,{importNode:_}=a;let L={};r.isSupported="function"==typeof ye&&"function"==typeof C&&S&&void 0!==S.createHTMLDocument;const{MUSTACHE_EXPR:M,ERB_EXPR:F,TMPLIT_EXPR:A,DATA_ATTR:$,ARIA_ATTR:E,IS_SCRIPT_OR_DATA:D,ATTR_WHITESPACE:I,CUSTOM_ELEMENT:O}=dr;let{IS_ALLOWED_URI:P}=dr,R=null;const q=ze({},[...He,...Ue,...Ye,...Ge,...Xe]);let z=null;const W=ze({},[...Qe,...Ke,...Je,...tr]);let N=Object.seal(Se(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}})),j=null,H=null,U=!0,Y=!0,V=!1,G=!0,Z=!1,X=!0,Q=!1,K=!1,J=!1,tt=!1,et=!1,rt=!1,it=!0,at=!1,nt=!0,ot=!1,st={},lt=null;const ht=ze({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let ct=null;const dt=ze({},["audio","video","img","source","image","track"]);let ut=null;const pt=ze({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),gt="http://www.w3.org/1998/Math/MathML",ft="http://www.w3.org/2000/svg",yt="http://www.w3.org/1999/xhtml";let mt=yt,xt=!1,bt=null;const Ct=ze({},[gt,ft,yt],Fe);let kt=null;const wt=["application/xhtml+xml","text/html"];let St=null,Tt=null;const vt=i.createElement("form"),Bt=function(t){return t instanceof RegExp||t instanceof Function},_t=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!Tt||Tt!==t){if(t&&"object"==typeof t||(t={}),t=Ne(t),kt=-1===wt.indexOf(t.PARSER_MEDIA_TYPE)?"text/html":t.PARSER_MEDIA_TYPE,St="application/xhtml+xml"===kt?Fe:Me,R=Ie(t,"ALLOWED_TAGS")?ze({},t.ALLOWED_TAGS,St):q,z=Ie(t,"ALLOWED_ATTR")?ze({},t.ALLOWED_ATTR,St):W,bt=Ie(t,"ALLOWED_NAMESPACES")?ze({},t.ALLOWED_NAMESPACES,Fe):Ct,ut=Ie(t,"ADD_URI_SAFE_ATTR")?ze(Ne(pt),t.ADD_URI_SAFE_ATTR,St):pt,ct=Ie(t,"ADD_DATA_URI_TAGS")?ze(Ne(dt),t.ADD_DATA_URI_TAGS,St):dt,lt=Ie(t,"FORBID_CONTENTS")?ze({},t.FORBID_CONTENTS,St):ht,j=Ie(t,"FORBID_TAGS")?ze({},t.FORBID_TAGS,St):{},H=Ie(t,"FORBID_ATTR")?ze({},t.FORBID_ATTR,St):{},st=!!Ie(t,"USE_PROFILES")&&t.USE_PROFILES,U=!1!==t.ALLOW_ARIA_ATTR,Y=!1!==t.ALLOW_DATA_ATTR,V=t.ALLOW_UNKNOWN_PROTOCOLS||!1,G=!1!==t.ALLOW_SELF_CLOSE_IN_ATTR,Z=t.SAFE_FOR_TEMPLATES||!1,X=!1!==t.SAFE_FOR_XML,Q=t.WHOLE_DOCUMENT||!1,tt=t.RETURN_DOM||!1,et=t.RETURN_DOM_FRAGMENT||!1,rt=t.RETURN_TRUSTED_TYPE||!1,J=t.FORCE_BODY||!1,it=!1!==t.SANITIZE_DOM,at=t.SANITIZE_NAMED_PROPS||!1,nt=!1!==t.KEEP_CONTENT,ot=t.IN_PLACE||!1,P=t.ALLOWED_URI_REGEXP||or,mt=t.NAMESPACE||yt,N=t.CUSTOM_ELEMENT_HANDLING||{},t.CUSTOM_ELEMENT_HANDLING&&Bt(t.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(N.tagNameCheck=t.CUSTOM_ELEMENT_HANDLING.tagNameCheck),t.CUSTOM_ELEMENT_HANDLING&&Bt(t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(N.attributeNameCheck=t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),t.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(N.allowCustomizedBuiltInElements=t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Z&&(Y=!1),et&&(tt=!0),st&&(R=ze({},Xe),z=[],!0===st.html&&(ze(R,He),ze(z,Qe)),!0===st.svg&&(ze(R,Ue),ze(z,Ke),ze(z,tr)),!0===st.svgFilters&&(ze(R,Ye),ze(z,Ke),ze(z,tr)),!0===st.mathMl&&(ze(R,Ge),ze(z,Je),ze(z,tr))),t.ADD_TAGS&&(R===q&&(R=Ne(R)),ze(R,t.ADD_TAGS,St)),t.ADD_ATTR&&(z===W&&(z=Ne(z)),ze(z,t.ADD_ATTR,St)),t.ADD_URI_SAFE_ATTR&&ze(ut,t.ADD_URI_SAFE_ATTR,St),t.FORBID_CONTENTS&&(lt===ht&&(lt=Ne(lt)),ze(lt,t.FORBID_CONTENTS,St)),nt&&(R["#text"]=!0),Q&&ze(R,["html","head","body"]),R.table&&(ze(R,["tbody"]),delete j.tbody),t.TRUSTED_TYPES_POLICY){if("function"!=typeof t.TRUSTED_TYPES_POLICY.createHTML)throw Pe('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof t.TRUSTED_TYPES_POLICY.createScriptURL)throw Pe('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');k=t.TRUSTED_TYPES_POLICY,w=k.createHTML("")}else void 0===k&&(k=function(t,e){if("object"!=typeof t||"function"!=typeof t.createPolicy)return null;let r=null;const i="data-tt-policy-suffix";e&&e.hasAttribute(i)&&(r=e.getAttribute(i));const a="dompurify"+(r?"#"+r:"");try{return t.createPolicy(a,{createHTML:t=>t,createScriptURL:t=>t})}catch(n){return console.warn("TrustedTypes policy "+a+" could not be created."),null}}(g,n)),null!==k&&"string"==typeof w&&(w=k.createHTML(""));ke&&ke(t),Tt=t}},Lt=ze({},["mi","mo","mn","ms","mtext"]),Mt=ze({},["foreignobject","annotation-xml"]),Ft=ze({},["title","style","font","a","script"]),At=ze({},[...Ue,...Ye,...Ve]),$t=ze({},[...Ge,...Ze]),Et=function(t){Le(r.removed,{element:t});try{C(t).removeChild(t)}catch(e){m(t)}},Dt=function(t,e){try{Le(r.removed,{attribute:e.getAttributeNode(t),from:e})}catch(i){Le(r.removed,{attribute:null,from:e})}if(e.removeAttribute(t),"is"===t&&!z[t])if(tt||et)try{Et(e)}catch(i){}else try{e.setAttribute(t,"")}catch(i){}},It=function(t){let e=null,r=null;if(J)t="<remove></remove>"+t;else{const e=Ae(t,/^[\r\n\t ]+/);r=e&&e[0]}"application/xhtml+xml"===kt&&mt===yt&&(t='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+t+"</body></html>");const a=k?k.createHTML(t):t;if(mt===yt)try{e=(new p).parseFromString(a,kt)}catch(o){}if(!e||!e.documentElement){e=S.createDocument(mt,"template",null);try{e.documentElement.innerHTML=xt?w:a}catch(o){}}const n=e.body||e.documentElement;return t&&r&&n.insertBefore(i.createTextNode(r),n.childNodes[0]||null),mt===yt?B.call(e,Q?"html":"body")[0]:Q?e.documentElement:n},Ot=function(t){return T.call(t.ownerDocument||t,t,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},Pt=function(t){return t instanceof u&&("string"!=typeof t.nodeName||"string"!=typeof t.textContent||"function"!=typeof t.removeChild||!(t.attributes instanceof d)||"function"!=typeof t.removeAttribute||"function"!=typeof t.setAttribute||"string"!=typeof t.namespaceURI||"function"!=typeof t.insertBefore||"function"!=typeof t.hasChildNodes)},Rt=function(t){return"function"==typeof l&&t instanceof l},qt=function(t,e,i){L[t]&&Be(L[t],(t=>{t.call(r,e,i,Tt)}))},zt=function(t){let e=null;if(qt("beforeSanitizeElements",t,null),Pt(t))return Et(t),!0;const i=St(t.nodeName);if(qt("uponSanitizeElement",t,{tagName:i,allowedTags:R}),t.hasChildNodes()&&!Rt(t.firstElementChild)&&Oe(/<[/\w]/g,t.innerHTML)&&Oe(/<[/\w]/g,t.textContent))return Et(t),!0;if(t.nodeType===gr)return Et(t),!0;if(X&&t.nodeType===fr&&Oe(/<[/\w]/g,t.data))return Et(t),!0;if(!R[i]||j[i]){if(!j[i]&&Nt(i)){if(N.tagNameCheck instanceof RegExp&&Oe(N.tagNameCheck,i))return!1;if(N.tagNameCheck instanceof Function&&N.tagNameCheck(i))return!1}if(nt&&!lt[i]){const e=C(t)||t.parentNode,r=b(t)||t.childNodes;if(r&&e){for(let i=r.length-1;i>=0;--i){const a=y(r[i],!0);a.__removalCount=(t.__removalCount||0)+1,e.insertBefore(a,x(t))}}}return Et(t),!0}return t instanceof h&&!function(t){let e=C(t);e&&e.tagName||(e={namespaceURI:mt,tagName:"template"});const r=Me(t.tagName),i=Me(e.tagName);return!!bt[t.namespaceURI]&&(t.namespaceURI===ft?e.namespaceURI===yt?"svg"===r:e.namespaceURI===gt?"svg"===r&&("annotation-xml"===i||Lt[i]):Boolean(At[r]):t.namespaceURI===gt?e.namespaceURI===yt?"math"===r:e.namespaceURI===ft?"math"===r&&Mt[i]:Boolean($t[r]):t.namespaceURI===yt?!(e.namespaceURI===ft&&!Mt[i])&&!(e.namespaceURI===gt&&!Lt[i])&&!$t[r]&&(Ft[r]||!At[r]):!("application/xhtml+xml"!==kt||!bt[t.namespaceURI]))}(t)?(Et(t),!0):"noscript"!==i&&"noembed"!==i&&"noframes"!==i||!Oe(/<\/no(script|embed|frames)/i,t.innerHTML)?(Z&&t.nodeType===pr&&(e=t.textContent,Be([M,F,A],(t=>{e=$e(e,t," ")})),t.textContent!==e&&(Le(r.removed,{element:t.cloneNode()}),t.textContent=e)),qt("afterSanitizeElements",t,null),!1):(Et(t),!0)},Wt=function(t,e,r){if(it&&("id"===e||"name"===e)&&(r in i||r in vt))return!1;if(Y&&!H[e]&&Oe($,e));else if(U&&Oe(E,e));else if(!z[e]||H[e]){if(!(Nt(t)&&(N.tagNameCheck instanceof RegExp&&Oe(N.tagNameCheck,t)||N.tagNameCheck instanceof Function&&N.tagNameCheck(t))&&(N.attributeNameCheck instanceof RegExp&&Oe(N.attributeNameCheck,e)||N.attributeNameCheck instanceof Function&&N.attributeNameCheck(e))||"is"===e&&N.allowCustomizedBuiltInElements&&(N.tagNameCheck instanceof RegExp&&Oe(N.tagNameCheck,r)||N.tagNameCheck instanceof Function&&N.tagNameCheck(r))))return!1}else if(ut[e]);else if(Oe(P,$e(r,I,"")));else if("src"!==e&&"xlink:href"!==e&&"href"!==e||"script"===t||0!==Ee(r,"data:")||!ct[t]){if(V&&!Oe(D,$e(r,I,"")));else if(r)return!1}else;return!0},Nt=function(t){return"annotation-xml"!==t&&Ae(t,O)},jt=function(t){qt("beforeSanitizeAttributes",t,null);const{attributes:e}=t;if(!e)return;const i={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:z};let a=e.length;for(;a--;){const o=e[a],{name:s,namespaceURI:l,value:h}=o,c=St(s);let d="value"===s?h:De(h);if(i.attrName=c,i.attrValue=d,i.keepAttr=!0,i.forceKeepAttr=void 0,qt("uponSanitizeAttribute",t,i),d=i.attrValue,X&&Oe(/((--!?|])>)|<\/(style|title)/i,d)){Dt(s,t);continue}if(i.forceKeepAttr)continue;if(Dt(s,t),!i.keepAttr)continue;if(!G&&Oe(/\/>/i,d)){Dt(s,t);continue}Z&&Be([M,F,A],(t=>{d=$e(d,t," ")}));const u=St(t.nodeName);if(Wt(u,c,d)){if(!at||"id"!==c&&"name"!==c||(Dt(s,t),d="user-content-"+d),k&&"object"==typeof g&&"function"==typeof g.getAttributeType)if(l);else switch(g.getAttributeType(u,c)){case"TrustedHTML":d=k.createHTML(d);break;case"TrustedScriptURL":d=k.createScriptURL(d)}try{l?t.setAttributeNS(l,s,d):t.setAttribute(s,d),Pt(t)?Et(t):_e(r.removed)}catch(n){}}}qt("afterSanitizeAttributes",t,null)},Ht=function t(e){let r=null;const i=Ot(e);for(qt("beforeSanitizeShadowDOM",e,null);r=i.nextNode();)qt("uponSanitizeShadowNode",r,null),zt(r)||(r.content instanceof o&&t(r.content),jt(r));qt("afterSanitizeShadowDOM",e,null)};return r.sanitize=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=null,n=null,s=null,h=null;if(xt=!t,xt&&(t="\x3c!--\x3e"),"string"!=typeof t&&!Rt(t)){if("function"!=typeof t.toString)throw Pe("toString is not a function");if("string"!=typeof(t=t.toString()))throw Pe("dirty is not a string, aborting")}if(!r.isSupported)return t;if(K||_t(e),r.removed=[],"string"==typeof t&&(ot=!1),ot){if(t.nodeName){const e=St(t.nodeName);if(!R[e]||j[e])throw Pe("root node is forbidden and cannot be sanitized in-place")}}else if(t instanceof l)i=It("\x3c!----\x3e"),n=i.ownerDocument.importNode(t,!0),n.nodeType===ur&&"BODY"===n.nodeName||"HTML"===n.nodeName?i=n:i.appendChild(n);else{if(!tt&&!Z&&!Q&&-1===t.indexOf("<"))return k&&rt?k.createHTML(t):t;if(i=It(t),!i)return tt?null:rt?w:""}i&&J&&Et(i.firstChild);const c=Ot(ot?t:i);for(;s=c.nextNode();)zt(s)||(s.content instanceof o&&Ht(s.content),jt(s));if(ot)return t;if(tt){if(et)for(h=v.call(i.ownerDocument);i.firstChild;)h.appendChild(i.firstChild);else h=i;return(z.shadowroot||z.shadowrootmode)&&(h=_.call(a,h,!0)),h}let d=Q?i.outerHTML:i.innerHTML;return Q&&R["!doctype"]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&Oe(hr,i.ownerDocument.doctype.name)&&(d="<!DOCTYPE "+i.ownerDocument.doctype.name+">\n"+d),Z&&Be([M,F,A],(t=>{d=$e(d,t," ")})),k&&rt?k.createHTML(d):d},r.setConfig=function(){_t(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),K=!0},r.clearConfig=function(){Tt=null,K=!1},r.isValidAttribute=function(t,e,r){Tt||_t({});const i=St(t),a=St(e);return Wt(i,a,r)},r.addHook=function(t,e){"function"==typeof e&&(L[t]=L[t]||[],Le(L[t],e))},r.removeHook=function(t){if(L[t])return _e(L[t])},r.removeHooks=function(t){L[t]&&(L[t]=[])},r.removeAllHooks=function(){L={}},r}(),br=Object.defineProperty,Cr=(t,e)=>br(t,"name",{value:e,configurable:!0}),kr=(t,e)=>{for(var r in e)br(t,r,{get:e[r],enumerable:!0})},wr={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},Sr={trace:Cr(((...t)=>{}),"trace"),debug:Cr(((...t)=>{}),"debug"),info:Cr(((...t)=>{}),"info"),warn:Cr(((...t)=>{}),"warn"),error:Cr(((...t)=>{}),"error"),fatal:Cr(((...t)=>{}),"fatal")},Tr=Cr((function(t="fatal"){let e=wr.fatal;"string"==typeof t?t.toLowerCase()in wr&&(e=wr[t]):"number"==typeof t&&(e=t),Sr.trace=()=>{},Sr.debug=()=>{},Sr.info=()=>{},Sr.warn=()=>{},Sr.error=()=>{},Sr.fatal=()=>{},e<=wr.fatal&&(Sr.fatal=console.error?console.error.bind(console,vr("FATAL"),"color: orange"):console.log.bind(console,"",vr("FATAL"))),e<=wr.error&&(Sr.error=console.error?console.error.bind(console,vr("ERROR"),"color: orange"):console.log.bind(console,"",vr("ERROR"))),e<=wr.warn&&(Sr.warn=console.warn?console.warn.bind(console,vr("WARN"),"color: orange"):console.log.bind(console,"",vr("WARN"))),e<=wr.info&&(Sr.info=console.info?console.info.bind(console,vr("INFO"),"color: lightblue"):console.log.bind(console,"",vr("INFO"))),e<=wr.debug&&(Sr.debug=console.debug?console.debug.bind(console,vr("DEBUG"),"color: lightgreen"):console.log.bind(console,"",vr("DEBUG"))),e<=wr.trace&&(Sr.trace=console.debug?console.debug.bind(console,vr("TRACE"),"color: lightgreen"):console.log.bind(console,"",vr("TRACE")))}),"setLogLevel"),vr=Cr((t=>`%c${Vt().format("ss.SSS")} : ${t} : `),"format"),Br=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,_r=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,Lr=/\s*%%.*\n/gm,Mr=(t=class extends Error{constructor(t){super(t),this.name="UnknownDiagramError"}},Cr(t,"UnknownDiagramError"),t),Fr={},Ar=Cr((function(t,e){t=t.replace(Br,"").replace(_r,"").replace(Lr,"\n");for(const[r,{detector:i}]of Object.entries(Fr)){if(i(t,e))return r}throw new Mr(`No diagram type detected matching given configuration for text: ${t}`)}),"detectType"),$r=Cr(((...t)=>{for(const{id:e,detector:r,loader:i}of t)Er(e,r,i)}),"registerLazyLoadedDiagrams"),Er=Cr(((t,e,r)=>{Fr[t]&&Sr.warn(`Detector with key ${t} already exists. Overwriting.`),Fr[t]={detector:e,loader:r},Sr.debug(`Detector with key ${t} added${r?" with loader":""}`)}),"addDetector"),Dr=Cr((t=>Fr[t].loader),"getDiagramLoader"),Ir=Cr(((t,e,{depth:r=2,clobber:i=!1}={})=>{const a={depth:r,clobber:i};return Array.isArray(e)&&!Array.isArray(t)?(e.forEach((e=>Ir(t,e,a))),t):Array.isArray(e)&&Array.isArray(t)?(e.forEach((e=>{t.includes(e)||t.push(e)})),t):void 0===t||r<=0?null!=t&&"object"==typeof t&&"object"==typeof e?Object.assign(t,e):e:(void 0!==e&&"object"==typeof t&&"object"==typeof e&&Object.keys(e).forEach((a=>{"object"!=typeof e[a]||void 0!==t[a]&&"object"!=typeof t[a]?(i||"object"!=typeof t[a]&&"object"!=typeof e[a])&&(t[a]=e[a]):(void 0===t[a]&&(t[a]=Array.isArray(e[a])?[]:{}),t[a]=Ir(t[a],e[a],{depth:r-1,clobber:i}))})),t)}),"assignWithDepth"),Or=Ir,Pr="#ffffff",Rr="#f2f2f2",qr=Cr(((t,e)=>ge(t,e?{s:-40,l:10}:{s:-40,l:-10})),"mkBorder"),zr=(Cr(e=class{constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px"}updateColors(){var t,e,r,i,a,n,o,s,l,h,c;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||ge(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||ge(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||qr(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||qr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||qr(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||qr(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||fe(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||fe(this.tertiaryColor),this.lineColor=this.lineColor||fe(this.background),this.arrowheadColor=this.arrowheadColor||fe(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?pe(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||pe(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||fe(this.lineColor),this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||ue(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||this.tertiaryColor,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||ge(this.primaryColor,{h:30}),this.cScale4=this.cScale4||ge(this.primaryColor,{h:60}),this.cScale5=this.cScale5||ge(this.primaryColor,{h:90}),this.cScale6=this.cScale6||ge(this.primaryColor,{h:120}),this.cScale7=this.cScale7||ge(this.primaryColor,{h:150}),this.cScale8=this.cScale8||ge(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||ge(this.primaryColor,{h:270}),this.cScale10=this.cScale10||ge(this.primaryColor,{h:300}),this.cScale11=this.cScale11||ge(this.primaryColor,{h:330}),this.darkMode)for(let u=0;u<this.THEME_COLOR_LIMIT;u++)this["cScale"+u]=pe(this["cScale"+u],75);else for(let u=0;u<this.THEME_COLOR_LIMIT;u++)this["cScale"+u]=pe(this["cScale"+u],25);for(let u=0;u<this.THEME_COLOR_LIMIT;u++)this["cScaleInv"+u]=this["cScaleInv"+u]||fe(this["cScale"+u]);for(let u=0;u<this.THEME_COLOR_LIMIT;u++)this.darkMode?this["cScalePeer"+u]=this["cScalePeer"+u]||ue(this["cScale"+u],10):this["cScalePeer"+u]=this["cScalePeer"+u]||pe(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 d=this.darkMode?-4:-1;for(let u=0;u<5;u++)this["surface"+u]=this["surface"+u]||ge(this.mainBkg,{h:180,s:-15,l:d*(5+3*u)}),this["surfacePeer"+u]=this["surfacePeer"+u]||ge(this.mainBkg,{h:180,s:-15,l:d*(8+3*u)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||ge(this.primaryColor,{h:64}),this.fillType3=this.fillType3||ge(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||ge(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||ge(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||ge(this.primaryColor,{h:128}),this.fillType7=this.fillType7||ge(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||ge(this.primaryColor,{l:-10}),this.pie5=this.pie5||ge(this.secondaryColor,{l:-10}),this.pie6=this.pie6||ge(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||ge(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||ge(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||ge(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||ge(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||ge(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||ge(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.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||ge(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||ge(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||ge(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||ge(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||ge(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||ge(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ce(this.quadrant1Fill)?ue(this.quadrant1Fill):pe(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:(null==(t=this.xyChart)?void 0:t.backgroundColor)||this.background,titleColor:(null==(e=this.xyChart)?void 0:e.titleColor)||this.primaryTextColor,xAxisTitleColor:(null==(r=this.xyChart)?void 0:r.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:(null==(i=this.xyChart)?void 0:i.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:(null==(a=this.xyChart)?void 0:a.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:(null==(n=this.xyChart)?void 0:n.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:(null==(o=this.xyChart)?void 0:o.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:(null==(s=this.xyChart)?void 0:s.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:(null==(l=this.xyChart)?void 0:l.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:(null==(h=this.xyChart)?void 0:h.yAxisLineColor)||this.primaryTextColor,plotColorPalette:(null==(c=this.xyChart)?void 0:c.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?pe(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||ge(this.primaryColor,{h:-30}),this.git4=this.git4||ge(this.primaryColor,{h:-60}),this.git5=this.git5||ge(this.primaryColor,{h:-90}),this.git6=this.git6||ge(this.primaryColor,{h:60}),this.git7=this.git7||ge(this.primaryColor,{h:120}),this.darkMode?(this.git0=ue(this.git0,25),this.git1=ue(this.git1,25),this.git2=ue(this.git2,25),this.git3=ue(this.git3,25),this.git4=ue(this.git4,25),this.git5=ue(this.git5,25),this.git6=ue(this.git6,25),this.git7=ue(this.git7,25)):(this.git0=pe(this.git0,25),this.git1=pe(this.git1,25),this.git2=pe(this.git2,25),this.git3=pe(this.git3,25),this.git4=pe(this.git4,25),this.git5=pe(this.git5,25),this.git6=pe(this.git6,25),this.git7=pe(this.git7,25)),this.gitInv0=this.gitInv0||fe(this.git0),this.gitInv1=this.gitInv1||fe(this.git1),this.gitInv2=this.gitInv2||fe(this.git2),this.gitInv3=this.gitInv3||fe(this.git3),this.gitInv4=this.gitInv4||fe(this.git4),this.gitInv5=this.gitInv5||fe(this.git5),this.gitInv6=this.gitInv6||fe(this.git6),this.gitInv7=this.gitInv7||fe(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||Pr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Rr}calculate(t){if("object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach((e=>{this[e]=t[e]})),this.updateColors(),e.forEach((e=>{this[e]=t[e]}))}},"Theme"),e),Wr=Cr((t=>{const e=new zr;return e.calculate(t),e}),"getThemeVariables"),Nr=(Cr(r=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=ue(this.primaryColor,16),this.tertiaryColor=ge(this.primaryColor,{h:-160}),this.primaryBorderColor=fe(this.background),this.secondaryBorderColor=qr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=qr(this.tertiaryColor,this.darkMode),this.primaryTextColor=fe(this.primaryColor),this.secondaryTextColor=fe(this.secondaryColor),this.tertiaryTextColor=fe(this.tertiaryColor),this.lineColor=fe(this.background),this.textColor=fe(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=ue(fe("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=le(255,255,255,.25),this.arrowheadColor="calculated",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#F9FFFE",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="calculated",this.activationBkgColor="calculated",this.sequenceNumberColor="black",this.sectionBkgColor=pe("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=pe(this.sectionBkgColor,10),this.taskBorderColor=le(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=le(255,255,255,50),this.activeTaskBkgColor="#81B1DB",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="grey",this.critBorderColor="#E83737",this.critBkgColor="#E83737",this.taskTextDarkColor="calculated",this.todayLineColor="#DB5757",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd"}updateColors(){var t,e,r,i,a,n,o,s,l,h,c;this.secondBkg=ue(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=ue(this.labelBackground,25),this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.actorTextColor=this.mainContrastColor,this.actorLineColor=this.actorBorder,this.signalColor=this.mainContrastColor,this.signalTextColor=this.mainContrastColor,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.mainContrastColor,this.loopTextColor=this.mainContrastColor,this.noteBorderColor=this.secondaryBorderColor,this.noteBkgColor=this.secondBkg,this.noteTextColor=this.secondaryTextColor,this.activationBorderColor=this.border1,this.activationBkgColor=this.secondBkg,this.altSectionBkgColor=this.background,this.taskBkgColor=ue(this.mainBkg,23),this.taskTextColor=this.darkTextColor,this.taskTextLightColor=this.mainContrastColor,this.taskTextOutsideColor=this.taskTextLightColor,this.gridColor=this.mainContrastColor,this.doneTaskBkgColor=this.mainContrastColor,this.taskTextDarkColor=this.darkTextColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#555",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#f4f4f4",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=ge(this.primaryColor,{h:64}),this.fillType3=ge(this.secondaryColor,{h:64}),this.fillType4=ge(this.primaryColor,{h:-64}),this.fillType5=ge(this.secondaryColor,{h:-64}),this.fillType6=ge(this.primaryColor,{h:128}),this.fillType7=ge(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||ge(this.primaryColor,{h:30}),this.cScale4=this.cScale4||ge(this.primaryColor,{h:60}),this.cScale5=this.cScale5||ge(this.primaryColor,{h:90}),this.cScale6=this.cScale6||ge(this.primaryColor,{h:120}),this.cScale7=this.cScale7||ge(this.primaryColor,{h:150}),this.cScale8=this.cScale8||ge(this.primaryColor,{h:210}),this.cScale9=this.cScale9||ge(this.primaryColor,{h:270}),this.cScale10=this.cScale10||ge(this.primaryColor,{h:300}),this.cScale11=this.cScale11||ge(this.primaryColor,{h:330});for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScaleInv"+d]=this["cScaleInv"+d]||fe(this["cScale"+d]);for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScalePeer"+d]=this["cScalePeer"+d]||ue(this["cScale"+d],10);for(let d=0;d<5;d++)this["surface"+d]=this["surface"+d]||ge(this.mainBkg,{h:30,s:-30,l:-(4*d-10)}),this["surfacePeer"+d]=this["surfacePeer"+d]||ge(this.mainBkg,{h:30,s:-30,l:-(4*d-7)});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.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.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||ge(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||ge(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||ge(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||ge(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||ge(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||ge(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ce(this.quadrant1Fill)?ue(this.quadrant1Fill):pe(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:(null==(t=this.xyChart)?void 0:t.backgroundColor)||this.background,titleColor:(null==(e=this.xyChart)?void 0:e.titleColor)||this.primaryTextColor,xAxisTitleColor:(null==(r=this.xyChart)?void 0:r.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:(null==(i=this.xyChart)?void 0:i.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:(null==(a=this.xyChart)?void 0:a.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:(null==(n=this.xyChart)?void 0:n.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:(null==(o=this.xyChart)?void 0:o.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:(null==(s=this.xyChart)?void 0:s.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:(null==(l=this.xyChart)?void 0:l.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:(null==(h=this.xyChart)?void 0:h.yAxisLineColor)||this.primaryTextColor,plotColorPalette:(null==(c=this.xyChart)?void 0:c.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.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?pe(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=ue(this.secondaryColor,20),this.git1=ue(this.pie2||this.secondaryColor,20),this.git2=ue(this.pie3||this.tertiaryColor,20),this.git3=ue(this.pie4||ge(this.primaryColor,{h:-30}),20),this.git4=ue(this.pie5||ge(this.primaryColor,{h:-60}),20),this.git5=ue(this.pie6||ge(this.primaryColor,{h:-90}),10),this.git6=ue(this.pie7||ge(this.primaryColor,{h:60}),10),this.git7=ue(this.pie8||ge(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||fe(this.git0),this.gitInv1=this.gitInv1||fe(this.git1),this.gitInv2=this.gitInv2||fe(this.git2),this.gitInv3=this.gitInv3||fe(this.git3),this.gitInv4=this.gitInv4||fe(this.git4),this.gitInv5=this.gitInv5||fe(this.git5),this.gitInv6=this.gitInv6||fe(this.git6),this.gitInv7=this.gitInv7||fe(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||fe(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||fe(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.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||ue(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ue(this.background,2),this.nodeBorder=this.nodeBorder||"#999"}calculate(t){if("object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach((e=>{this[e]=t[e]})),this.updateColors(),e.forEach((e=>{this[e]=t[e]}))}},"Theme"),r),jr=Cr((t=>{const e=new Nr;return e.calculate(t),e}),"getThemeVariables"),Hr=(Cr(i=class{constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=ge(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=ge(this.primaryColor,{h:-160}),this.primaryBorderColor=qr(this.primaryColor,this.darkMode),this.secondaryBorderColor=qr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=qr(this.tertiaryColor,this.darkMode),this.primaryTextColor=fe(this.primaryColor),this.secondaryTextColor=fe(this.secondaryColor),this.tertiaryTextColor=fe(this.tertiaryColor),this.lineColor=fe(this.background),this.textColor=fe(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.border2="#aaaa33",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="rgba(232,232,232, 0.8)",this.textColor="#333",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="calculated",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="calculated",this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor="calculated",this.taskTextOutsideColor=this.taskTextDarkColor,this.taskTextClickableColor="calculated",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBorderColor="calculated",this.critBkgColor="calculated",this.todayLineColor="calculated",this.sectionBkgColor=le(102,102,255,.49),this.altSectionBkgColor="white",this.sectionBkgColor2="#fff400",this.taskBorderColor="#534fbc",this.taskBkgColor="#8a90dd",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="#534fbc",this.activeTaskBkgColor="#bfc7ff",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.updateColors()}updateColors(){var t,e,r,i,a,n,o,s,l,h,c;this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||ge(this.primaryColor,{h:30}),this.cScale4=this.cScale4||ge(this.primaryColor,{h:60}),this.cScale5=this.cScale5||ge(this.primaryColor,{h:90}),this.cScale6=this.cScale6||ge(this.primaryColor,{h:120}),this.cScale7=this.cScale7||ge(this.primaryColor,{h:150}),this.cScale8=this.cScale8||ge(this.primaryColor,{h:210}),this.cScale9=this.cScale9||ge(this.primaryColor,{h:270}),this.cScale10=this.cScale10||ge(this.primaryColor,{h:300}),this.cScale11=this.cScale11||ge(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||pe(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||pe(this.tertiaryColor,40);for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScale"+d]=pe(this["cScale"+d],10),this["cScalePeer"+d]=this["cScalePeer"+d]||pe(this["cScale"+d],25);for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScaleInv"+d]=this["cScaleInv"+d]||ge(this["cScale"+d],{h:180});for(let d=0;d<5;d++)this["surface"+d]=this["surface"+d]||ge(this.mainBkg,{h:30,l:-(5+5*d)}),this["surfacePeer"+d]=this["surfacePeer"+d]||ge(this.mainBkg,{h:30,l:-(7+5*d)});if(this.scaleLabelColor="calculated"!==this.scaleLabelColor&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,"calculated"!==this.labelTextColor){this.cScaleLabel0=this.cScaleLabel0||fe(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||fe(this.labelTextColor);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.labelTextColor}this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.textColor,this.edgeLabelBackground=this.labelBackground,this.actorBorder=ue(this.border1,23),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.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,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||"#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=ge(this.primaryColor,{h:64}),this.fillType3=ge(this.secondaryColor,{h:64}),this.fillType4=ge(this.primaryColor,{h:-64}),this.fillType5=ge(this.secondaryColor,{h:-64}),this.fillType6=ge(this.primaryColor,{h:128}),this.fillType7=ge(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||ge(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||ge(this.primaryColor,{l:-10}),this.pie5=this.pie5||ge(this.secondaryColor,{l:-30}),this.pie6=this.pie6||ge(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||ge(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||ge(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||ge(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||ge(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||ge(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||ge(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.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||ge(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||ge(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||ge(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||ge(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||ge(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||ge(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ce(this.quadrant1Fill)?ue(this.quadrant1Fill):pe(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:(null==(t=this.xyChart)?void 0:t.backgroundColor)||this.background,titleColor:(null==(e=this.xyChart)?void 0:e.titleColor)||this.primaryTextColor,xAxisTitleColor:(null==(r=this.xyChart)?void 0:r.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:(null==(i=this.xyChart)?void 0:i.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:(null==(a=this.xyChart)?void 0:a.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:(null==(n=this.xyChart)?void 0:n.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:(null==(o=this.xyChart)?void 0:o.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:(null==(s=this.xyChart)?void 0:s.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:(null==(l=this.xyChart)?void 0:l.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:(null==(h=this.xyChart)?void 0:h.yAxisLineColor)||this.primaryTextColor,plotColorPalette:(null==(c=this.xyChart)?void 0:c.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||ge(this.primaryColor,{h:-30}),this.git4=this.git4||ge(this.primaryColor,{h:-60}),this.git5=this.git5||ge(this.primaryColor,{h:-90}),this.git6=this.git6||ge(this.primaryColor,{h:60}),this.git7=this.git7||ge(this.primaryColor,{h:120}),this.darkMode?(this.git0=ue(this.git0,25),this.git1=ue(this.git1,25),this.git2=ue(this.git2,25),this.git3=ue(this.git3,25),this.git4=ue(this.git4,25),this.git5=ue(this.git5,25),this.git6=ue(this.git6,25),this.git7=ue(this.git7,25)):(this.git0=pe(this.git0,25),this.git1=pe(this.git1,25),this.git2=pe(this.git2,25),this.git3=pe(this.git3,25),this.git4=pe(this.git4,25),this.git5=pe(this.git5,25),this.git6=pe(this.git6,25),this.git7=pe(this.git7,25)),this.gitInv0=this.gitInv0||pe(fe(this.git0),25),this.gitInv1=this.gitInv1||fe(this.git1),this.gitInv2=this.gitInv2||fe(this.git2),this.gitInv3=this.gitInv3||fe(this.git3),this.gitInv4=this.gitInv4||fe(this.git4),this.gitInv5=this.gitInv5||fe(this.git5),this.gitInv6=this.gitInv6||fe(this.git6),this.gitInv7=this.gitInv7||fe(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||fe(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||fe(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.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Pr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Rr}calculate(t){if("object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach((e=>{this[e]=t[e]})),this.updateColors(),e.forEach((e=>{this[e]=t[e]}))}},"Theme"),i),Ur=Cr((t=>{const e=new Hr;return e.calculate(t),e}),"getThemeVariables"),Yr=(Cr(a=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=ue("#cde498",10),this.primaryBorderColor=qr(this.primaryColor,this.darkMode),this.secondaryBorderColor=qr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=qr(this.tertiaryColor,this.darkMode),this.primaryTextColor=fe(this.primaryColor),this.secondaryTextColor=fe(this.secondaryColor),this.tertiaryTextColor=fe(this.primaryColor),this.lineColor=fe(this.background),this.textColor=fe(this.background),this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#333",this.edgeLabelBackground="#e8e8e8",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="#333",this.signalTextColor="#333",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="#326932",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="#6eaa49",this.altSectionBkgColor="white",this.sectionBkgColor2="#6eaa49",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="#487e3a",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){var t,e,r,i,a,n,o,s,l,h,c;this.actorBorder=pe(this.mainBkg,20),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||ge(this.primaryColor,{h:30}),this.cScale4=this.cScale4||ge(this.primaryColor,{h:60}),this.cScale5=this.cScale5||ge(this.primaryColor,{h:90}),this.cScale6=this.cScale6||ge(this.primaryColor,{h:120}),this.cScale7=this.cScale7||ge(this.primaryColor,{h:150}),this.cScale8=this.cScale8||ge(this.primaryColor,{h:210}),this.cScale9=this.cScale9||ge(this.primaryColor,{h:270}),this.cScale10=this.cScale10||ge(this.primaryColor,{h:300}),this.cScale11=this.cScale11||ge(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||pe(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||pe(this.tertiaryColor,40);for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScale"+d]=pe(this["cScale"+d],10),this["cScalePeer"+d]=this["cScalePeer"+d]||pe(this["cScale"+d],25);for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScaleInv"+d]=this["cScaleInv"+d]||ge(this["cScale"+d],{h:180});this.scaleLabelColor="calculated"!==this.scaleLabelColor&&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]||ge(this.mainBkg,{h:30,s:-30,l:-(5+5*d)}),this["surfacePeer"+d]=this["surfacePeer"+d]||ge(this.mainBkg,{h:30,s:-30,l:-(8+5*d)});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.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=ge(this.primaryColor,{h:64}),this.fillType3=ge(this.secondaryColor,{h:64}),this.fillType4=ge(this.primaryColor,{h:-64}),this.fillType5=ge(this.secondaryColor,{h:-64}),this.fillType6=ge(this.primaryColor,{h:128}),this.fillType7=ge(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||ge(this.primaryColor,{l:-30}),this.pie5=this.pie5||ge(this.secondaryColor,{l:-30}),this.pie6=this.pie6||ge(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||ge(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||ge(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||ge(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||ge(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||ge(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||ge(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.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||ge(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||ge(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||ge(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||ge(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||ge(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||ge(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ce(this.quadrant1Fill)?ue(this.quadrant1Fill):pe(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.xyChart={backgroundColor:(null==(t=this.xyChart)?void 0:t.backgroundColor)||this.background,titleColor:(null==(e=this.xyChart)?void 0:e.titleColor)||this.primaryTextColor,xAxisTitleColor:(null==(r=this.xyChart)?void 0:r.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:(null==(i=this.xyChart)?void 0:i.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:(null==(a=this.xyChart)?void 0:a.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:(null==(n=this.xyChart)?void 0:n.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:(null==(o=this.xyChart)?void 0:o.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:(null==(s=this.xyChart)?void 0:s.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:(null==(l=this.xyChart)?void 0:l.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:(null==(h=this.xyChart)?void 0:h.yAxisLineColor)||this.primaryTextColor,plotColorPalette:(null==(c=this.xyChart)?void 0:c.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||ge(this.primaryColor,{h:-30}),this.git4=this.git4||ge(this.primaryColor,{h:-60}),this.git5=this.git5||ge(this.primaryColor,{h:-90}),this.git6=this.git6||ge(this.primaryColor,{h:60}),this.git7=this.git7||ge(this.primaryColor,{h:120}),this.darkMode?(this.git0=ue(this.git0,25),this.git1=ue(this.git1,25),this.git2=ue(this.git2,25),this.git3=ue(this.git3,25),this.git4=ue(this.git4,25),this.git5=ue(this.git5,25),this.git6=ue(this.git6,25),this.git7=ue(this.git7,25)):(this.git0=pe(this.git0,25),this.git1=pe(this.git1,25),this.git2=pe(this.git2,25),this.git3=pe(this.git3,25),this.git4=pe(this.git4,25),this.git5=pe(this.git5,25),this.git6=pe(this.git6,25),this.git7=pe(this.git7,25)),this.gitInv0=this.gitInv0||fe(this.git0),this.gitInv1=this.gitInv1||fe(this.git1),this.gitInv2=this.gitInv2||fe(this.git2),this.gitInv3=this.gitInv3||fe(this.git3),this.gitInv4=this.gitInv4||fe(this.git4),this.gitInv5=this.gitInv5||fe(this.git5),this.gitInv6=this.gitInv6||fe(this.git6),this.gitInv7=this.gitInv7||fe(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||fe(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||fe(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.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Pr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Rr}calculate(t){if("object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach((e=>{this[e]=t[e]})),this.updateColors(),e.forEach((e=>{this[e]=t[e]}))}},"Theme"),a),Vr=Cr((t=>{const e=new Yr;return e.calculate(t),e}),"getThemeVariables"),Gr=(Cr(n=class{constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=ue(this.contrast,55),this.background="#ffffff",this.tertiaryColor=ge(this.primaryColor,{h:-160}),this.primaryBorderColor=qr(this.primaryColor,this.darkMode),this.secondaryBorderColor=qr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=qr(this.tertiaryColor,this.darkMode),this.primaryTextColor=fe(this.primaryColor),this.secondaryTextColor=fe(this.secondaryColor),this.tertiaryTextColor=fe(this.tertiaryColor),this.lineColor=fe(this.background),this.textColor=fe(this.background),this.mainBkg="#eee",this.secondBkg="calculated",this.lineColor="#666",this.border1="#999",this.border2="calculated",this.note="#ffa",this.text="#333",this.critical="#d42",this.done="#bbb",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="white",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor=this.actorBorder,this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="calculated",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="white",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBkgColor="calculated",this.critBorderColor="calculated",this.todayLineColor="calculated",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){var t,e,r,i,a,n,o,s,l,h,c;this.secondBkg=ue(this.contrast,55),this.border2=this.contrast,this.actorBorder=ue(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.actorBorder,this.signalColor=this.text,this.signalTextColor=this.text,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.text,this.loopTextColor=this.text,this.noteBorderColor="#999",this.noteBkgColor="#666",this.noteTextColor="#fff",this.cScale0=this.cScale0||"#555",this.cScale1=this.cScale1||"#F4F4F4",this.cScale2=this.cScale2||"#555",this.cScale3=this.cScale3||"#BBB",this.cScale4=this.cScale4||"#777",this.cScale5=this.cScale5||"#999",this.cScale6=this.cScale6||"#DDD",this.cScale7=this.cScale7||"#FFF",this.cScale8=this.cScale8||"#DDD",this.cScale9=this.cScale9||"#BBB",this.cScale10=this.cScale10||"#999",this.cScale11=this.cScale11||"#777";for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScaleInv"+d]=this["cScaleInv"+d]||fe(this["cScale"+d]);for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this.darkMode?this["cScalePeer"+d]=this["cScalePeer"+d]||ue(this["cScale"+d],10):this["cScalePeer"+d]=this["cScalePeer"+d]||pe(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]||ge(this.mainBkg,{l:-(5+5*d)}),this["surfacePeer"+d]=this["surfacePeer"+d]||ge(this.mainBkg,{l:-(8+5*d)});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=ue(this.contrast,30),this.sectionBkgColor2=ue(this.contrast,30),this.taskBorderColor=pe(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=ue(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=pe(this.critBkgColor,10),this.todayLineColor=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=ge(this.primaryColor,{h:64}),this.fillType3=ge(this.secondaryColor,{h:64}),this.fillType4=ge(this.primaryColor,{h:-64}),this.fillType5=ge(this.secondaryColor,{h:-64}),this.fillType6=ge(this.primaryColor,{h:128}),this.fillType7=ge(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",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||ge(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||ge(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||ge(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||ge(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||ge(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||ge(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ce(this.quadrant1Fill)?ue(this.quadrant1Fill):pe(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:(null==(t=this.xyChart)?void 0:t.backgroundColor)||this.background,titleColor:(null==(e=this.xyChart)?void 0:e.titleColor)||this.primaryTextColor,xAxisTitleColor:(null==(r=this.xyChart)?void 0:r.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:(null==(i=this.xyChart)?void 0:i.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:(null==(a=this.xyChart)?void 0:a.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:(null==(n=this.xyChart)?void 0:n.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:(null==(o=this.xyChart)?void 0:o.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:(null==(s=this.xyChart)?void 0:s.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:(null==(l=this.xyChart)?void 0:l.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:(null==(h=this.xyChart)?void 0:h.yAxisLineColor)||this.primaryTextColor,plotColorPalette:(null==(c=this.xyChart)?void 0:c.plotColorPalette)||"#EEE,#6BB8E4,#8ACB88,#C7ACD6,#E8DCC2,#FFB2A8,#FFF380,#7E8D91,#FFD8B1,#FAF3E0"},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=pe(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||ge(this.primaryColor,{h:-30}),this.git4=this.pie5||ge(this.primaryColor,{h:-60}),this.git5=this.pie6||ge(this.primaryColor,{h:-90}),this.git6=this.pie7||ge(this.primaryColor,{h:60}),this.git7=this.pie8||ge(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||fe(this.git0),this.gitInv1=this.gitInv1||fe(this.git1),this.gitInv2=this.gitInv2||fe(this.git2),this.gitInv3=this.gitInv3||fe(this.git3),this.gitInv4=this.gitInv4||fe(this.git4),this.gitInv5=this.gitInv5||fe(this.git5),this.gitInv6=this.gitInv6||fe(this.git6),this.gitInv7=this.gitInv7||fe(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.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Pr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Rr}calculate(t){if("object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach((e=>{this[e]=t[e]})),this.updateColors(),e.forEach((e=>{this[e]=t[e]}))}},"Theme"),n),Zr={base:{getThemeVariables:Wr},dark:{getThemeVariables:jr},default:{getThemeVariables:Ur},forest:{getThemeVariables:Vr},neutral:{getThemeVariables:Cr((t=>{const e=new Gr;return e.calculate(t),e}),"getThemeVariables")}},Xr={flowchart:{useMaxWidth:!0,titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:!0,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,defaultRenderer:"dagre-wrapper",wrappingWidth:200},sequence:{useMaxWidth:!0,hideUnusedParticipants:!1,activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",mirrorActors:!0,forceMenus:!1,bottomMarginAdj:1,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:400,noteFontSize:14,noteFontFamily:'"trebuchet ms", verdana, arial, sans-serif',noteFontWeight:400,noteAlign:"center",messageFontSize:16,messageFontFamily:'"trebuchet ms", verdana, arial, sans-serif',messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20},gantt:{useMaxWidth:!0,titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d",topAxis:!1,displayMode:"",weekday:"sunday"},journey:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"]},class:{useMaxWidth:!0,titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,defaultRenderer:"dagre-wrapper",htmlLabels:!1},state:{useMaxWidth:!0,titleTopMargin:25,dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:"20",compositTitleSize:35,radius:5,defaultRenderer:"dagre-wrapper"},er:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,stroke:"gray",fill:"honeydew",fontSize:12},pie:{useMaxWidth:!0,textPosition:.75},quadrantChart:{useMaxWidth:!0,chartWidth:500,chartHeight:500,titleFontSize:20,titlePadding:10,quadrantPadding:5,xAxisLabelPadding:5,yAxisLabelPadding:5,xAxisLabelFontSize:16,yAxisLabelFontSize:16,quadrantLabelFontSize:16,quadrantTextTopPadding:5,pointTextPadding:5,pointLabelFontSize:12,pointRadius:5,xAxisPosition:"top",yAxisPosition:"left",quadrantInternalBorderStrokeWidth:1,quadrantExternalBorderStrokeWidth:2},xyChart:{useMaxWidth:!0,width:700,height:500,titleFontSize:20,titlePadding:10,showTitle:!0,xAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},yAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},chartOrientation:"vertical",plotReservedSpacePercent:50},requirement:{useMaxWidth:!0,rect_fill:"#f9f9f9",text_color:"#333",rect_border_size:"0.5px",rect_border_color:"#bbb",rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200},timeline:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],disableMulticolor:!1},gitGraph:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:"main",mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0,parallelCommits:!1,arrowMarkerAbsolute:!1},c4:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,c4ShapeInRow:4,nextLinePaddingX:0,c4BoundaryInRow:2,personFontSize:14,personFontFamily:'"Open Sans", sans-serif',personFontWeight:"normal",external_personFontSize:14,external_personFontFamily:'"Open Sans", sans-serif',external_personFontWeight:"normal",systemFontSize:14,systemFontFamily:'"Open Sans", sans-serif',systemFontWeight:"normal",external_systemFontSize:14,external_systemFontFamily:'"Open Sans", sans-serif',external_systemFontWeight:"normal",system_dbFontSize:14,system_dbFontFamily:'"Open Sans", sans-serif',system_dbFontWeight:"normal",external_system_dbFontSize:14,external_system_dbFontFamily:'"Open Sans", sans-serif',external_system_dbFontWeight:"normal",system_queueFontSize:14,system_queueFontFamily:'"Open Sans", sans-serif',system_queueFontWeight:"normal",external_system_queueFontSize:14,external_system_queueFontFamily:'"Open Sans", sans-serif',external_system_queueFontWeight:"normal",boundaryFontSize:14,boundaryFontFamily:'"Open Sans", sans-serif',boundaryFontWeight:"normal",messageFontSize:12,messageFontFamily:'"Open Sans", sans-serif',messageFontWeight:"normal",containerFontSize:14,containerFontFamily:'"Open Sans", sans-serif',containerFontWeight:"normal",external_containerFontSize:14,external_containerFontFamily:'"Open Sans", sans-serif',external_containerFontWeight:"normal",container_dbFontSize:14,container_dbFontFamily:'"Open Sans", sans-serif',container_dbFontWeight:"normal",external_container_dbFontSize:14,external_container_dbFontFamily:'"Open Sans", sans-serif',external_container_dbFontWeight:"normal",container_queueFontSize:14,container_queueFontFamily:'"Open Sans", sans-serif',container_queueFontWeight:"normal",external_container_queueFontSize:14,external_container_queueFontFamily:'"Open Sans", sans-serif',external_container_queueFontWeight:"normal",componentFontSize:14,componentFontFamily:'"Open Sans", sans-serif',componentFontWeight:"normal",external_componentFontSize:14,external_componentFontFamily:'"Open Sans", sans-serif',external_componentFontWeight:"normal",component_dbFontSize:14,component_dbFontFamily:'"Open Sans", sans-serif',component_dbFontWeight:"normal",external_component_dbFontSize:14,external_component_dbFontFamily:'"Open Sans", sans-serif',external_component_dbFontWeight:"normal",component_queueFontSize:14,component_queueFontFamily:'"Open Sans", sans-serif',component_queueFontWeight:"normal",external_component_queueFontSize:14,external_component_queueFontFamily:'"Open Sans", sans-serif',external_component_queueFontWeight:"normal",wrap:!0,wrapPadding:10,person_bg_color:"#08427B",person_border_color:"#073B6F",external_person_bg_color:"#686868",external_person_border_color:"#8A8A8A",system_bg_color:"#1168BD",system_border_color:"#3C7FC0",system_db_bg_color:"#1168BD",system_db_border_color:"#3C7FC0",system_queue_bg_color:"#1168BD",system_queue_border_color:"#3C7FC0",external_system_bg_color:"#999999",external_system_border_color:"#8A8A8A",external_system_db_bg_color:"#999999",external_system_db_border_color:"#8A8A8A",external_system_queue_bg_color:"#999999",external_system_queue_border_color:"#8A8A8A",container_bg_color:"#438DD5",container_border_color:"#3C7FC0",container_db_bg_color:"#438DD5",container_db_border_color:"#3C7FC0",container_queue_bg_color:"#438DD5",container_queue_border_color:"#3C7FC0",external_container_bg_color:"#B3B3B3",external_container_border_color:"#A6A6A6",external_container_db_bg_color:"#B3B3B3",external_container_db_border_color:"#A6A6A6",external_container_queue_bg_color:"#B3B3B3",external_container_queue_border_color:"#A6A6A6",component_bg_color:"#85BBF0",component_border_color:"#78A8D8",component_db_bg_color:"#85BBF0",component_db_border_color:"#78A8D8",component_queue_bg_color:"#85BBF0",component_queue_border_color:"#78A8D8",external_component_bg_color:"#CCCCCC",external_component_border_color:"#BFBFBF",external_component_db_bg_color:"#CCCCCC",external_component_db_border_color:"#BFBFBF",external_component_queue_bg_color:"#CCCCCC",external_component_queue_border_color:"#BFBFBF"},sankey:{useMaxWidth:!0,width:600,height:400,linkColor:"gradient",nodeAlignment:"justify",showValues:!0,prefix:"",suffix:""},block:{useMaxWidth:!0,padding:8},packet:{useMaxWidth:!0,rowHeight:32,bitWidth:32,bitsPerRow:32,showBits:!0,paddingX:5,paddingY:5},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16},theme:"default",look:"classic",handDrawnSeed:0,layout:"dagre",maxTextSize:5e4,maxEdges:500,darkMode:!1,fontFamily:'"trebuchet ms", verdana, arial, sans-serif;',logLevel:5,securityLevel:"strict",startOnLoad:!0,arrowMarkerAbsolute:!1,secure:["secure","securityLevel","startOnLoad","maxTextSize","suppressErrorRendering","maxEdges"],legacyMathML:!1,forceLegacyMathML:!1,deterministicIds:!1,fontSize:16,markdownAutoWrap:!0,suppressErrorRendering:!1},Qr={...Xr,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF"},themeCSS:void 0,themeVariables:Zr.default.getThemeVariables(),sequence:{...Xr.sequence,messageFont:Cr((function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}}),"messageFont"),noteFont:Cr((function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}}),"noteFont"),actorFont:Cr((function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}}),"actorFont")},gantt:{...Xr.gantt,tickInterval:void 0,useWidth:void 0},c4:{...Xr.c4,useWidth:void 0,personFont:Cr((function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}}),"personFont"),external_personFont:Cr((function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}}),"external_personFont"),systemFont:Cr((function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}}),"systemFont"),external_systemFont:Cr((function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}}),"external_systemFont"),system_dbFont:Cr((function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}}),"system_dbFont"),external_system_dbFont:Cr((function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}}),"external_system_dbFont"),system_queueFont:Cr((function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}}),"system_queueFont"),external_system_queueFont:Cr((function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}}),"external_system_queueFont"),containerFont:Cr((function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}}),"containerFont"),external_containerFont:Cr((function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}}),"external_containerFont"),container_dbFont:Cr((function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}}),"container_dbFont"),external_container_dbFont:Cr((function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}}),"external_container_dbFont"),container_queueFont:Cr((function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}}),"container_queueFont"),external_container_queueFont:Cr((function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}}),"external_container_queueFont"),componentFont:Cr((function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}}),"componentFont"),external_componentFont:Cr((function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}}),"external_componentFont"),component_dbFont:Cr((function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}}),"component_dbFont"),external_component_dbFont:Cr((function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}}),"external_component_dbFont"),component_queueFont:Cr((function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}}),"component_queueFont"),external_component_queueFont:Cr((function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}}),"external_component_queueFont"),boundaryFont:Cr((function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}}),"boundaryFont"),messageFont:Cr((function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}}),"messageFont")},pie:{...Xr.pie,useWidth:984},xyChart:{...Xr.xyChart,useWidth:void 0},requirement:{...Xr.requirement,useWidth:void 0},packet:{...Xr.packet}},Kr=Cr(((t,e="")=>Object.keys(t).reduce(((r,i)=>Array.isArray(t[i])?r:"object"==typeof t[i]&&null!==t[i]?[...r,e+i,...Kr(t[i],"")]:[...r,e+i]),[])),"keyify"),Jr=new Set(Kr(Qr,"")),ti=Qr,ei=Cr((t=>{if(Sr.debug("sanitizeDirective called with",t),"object"==typeof t&&null!=t)if(Array.isArray(t))t.forEach((t=>ei(t)));else{for(const e of Object.keys(t)){if(Sr.debug("Checking key",e),e.startsWith("__")||e.includes("proto")||e.includes("constr")||!Jr.has(e)||null==t[e]){Sr.debug("sanitize deleting key: ",e),delete t[e];continue}if("object"==typeof t[e]){Sr.debug("sanitizing object",e),ei(t[e]);continue}const r=["themeCSS","fontFamily","altFontFamily"];for(const i of r)e.includes(i)&&(Sr.debug("sanitizing css option",e),t[e]=ri(t[e]))}if(t.themeVariables)for(const e of Object.keys(t.themeVariables)){const r=t.themeVariables[e];(null==r?void 0:r.match)&&!r.match(/^[\d "#%(),.;A-Za-z]+$/)&&(t.themeVariables[e]="")}Sr.debug("After sanitization",t)}}),"sanitizeDirective"),ri=Cr((t=>{let e=0,r=0;for(const i of t){if(e<r)return"{ /* ERROR: Unbalanced CSS */ }";"{"===i?e++:"}"===i&&r++}return e!==r?"{ /* ERROR: Unbalanced CSS */ }":t}),"sanitizeCss"),ii=Object.freeze(ti),ai=Or({},ii),ni=[],oi=Or({},ii),si=Cr(((t,e)=>{let r=Or({},t),i={};for(const a of e)gi(a),i=Or(i,a);if(r=Or(r,i),i.theme&&i.theme in Zr){const t=Or({},mr),e=Or(t.themeVariables||{},i.themeVariables);r.theme&&r.theme in Zr&&(r.themeVariables=Zr[r.theme].getThemeVariables(e))}return Ci(oi=r),oi}),"updateCurrentConfig"),li=Cr((t=>(ai=Or({},ii),ai=Or(ai,t),t.theme&&Zr[t.theme]&&(ai.themeVariables=Zr[t.theme].getThemeVariables(t.themeVariables)),si(ai,ni),ai)),"setSiteConfig"),hi=Cr((t=>{mr=Or({},t)}),"saveConfigFromInitialize"),ci=Cr((t=>(ai=Or(ai,t),si(ai,ni),ai)),"updateSiteConfig"),di=Cr((()=>Or({},ai)),"getSiteConfig"),ui=Cr((t=>(Ci(t),Or(oi,t),pi())),"setConfig"),pi=Cr((()=>Or({},oi)),"getConfig"),gi=Cr((t=>{t&&(["secure",...ai.secure??[]].forEach((e=>{Object.hasOwn(t,e)&&(Sr.debug(`Denied attempt to modify a secure key ${e}`,t[e]),delete t[e])})),Object.keys(t).forEach((e=>{e.startsWith("__")&&delete t[e]})),Object.keys(t).forEach((e=>{"string"==typeof t[e]&&(t[e].includes("<")||t[e].includes(">")||t[e].includes("url(data:"))&&delete t[e],"object"==typeof t[e]&&gi(t[e])})))}),"sanitize"),fi=Cr((t=>{var e;ei(t),t.fontFamily&&!(null==(e=t.themeVariables)?void 0:e.fontFamily)&&(t.themeVariables={...t.themeVariables,fontFamily:t.fontFamily}),ni.push(t),si(ai,ni)}),"addDirective"),yi=Cr(((t=ai)=>{si(t,ni=[])}),"reset"),mi={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead."},xi={},bi=Cr((t=>{xi[t]||(Sr.warn(mi[t]),xi[t]=!0)}),"issueWarning"),Ci=Cr((t=>{t&&(t.lazyLoadedDiagrams||t.loadExternalDiagramsAtStartup)&&bi("LAZY_LOAD_DEPRECATED")}),"checkConfig"),ki=/<br\s*\/?>/gi,wi=Cr((t=>{if(!t)return[""];return $i(t).replace(/\\n/g,"#br#").split("#br#")}),"getRows"),Si=(()=>{let t=!1;return()=>{t||(Ti(),t=!0)}})();function Ti(){const t="data-temp-href-target";xr.addHook("beforeSanitizeAttributes",(e=>{"A"===e.tagName&&e.hasAttribute("target")&&e.setAttribute(t,e.getAttribute("target")??"")})),xr.addHook("afterSanitizeAttributes",(e=>{"A"===e.tagName&&e.hasAttribute(t)&&(e.setAttribute("target",e.getAttribute(t)??""),e.removeAttribute(t),"_blank"===e.getAttribute("target")&&e.setAttribute("rel","noopener"))}))}Cr(Ti,"setupDompurifyHooks");var vi=Cr((t=>{Si();return xr.sanitize(t)}),"removeScript"),Bi=Cr(((t,e)=>{var r;if(!1!==(null==(r=e.flowchart)?void 0:r.htmlLabels)){const r=e.securityLevel;"antiscript"===r||"strict"===r?t=vi(t):"loose"!==r&&(t=(t=(t=$i(t)).replace(/</g,"&lt;").replace(/>/g,"&gt;")).replace(/=/g,"&equals;"),t=Ai(t))}return t}),"sanitizeMore"),_i=Cr(((t,e)=>t?t=e.dompurifyConfig?xr.sanitize(Bi(t,e),e.dompurifyConfig).toString():xr.sanitize(Bi(t,e),{FORBID_TAGS:["style"]}).toString():t),"sanitizeText"),Li=Cr(((t,e)=>"string"==typeof t?_i(t,e):t.flat().map((t=>_i(t,e)))),"sanitizeTextOrArray"),Mi=Cr((t=>ki.test(t)),"hasBreaks"),Fi=Cr((t=>t.split(ki)),"splitBreaks"),Ai=Cr((t=>t.replace(/#br#/g,"<br/>")),"placeholderToBreak"),$i=Cr((t=>t.replace(ki,"#br#")),"breakToPlaceholder"),Ei=Cr((t=>{let e="";return t&&(e=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,e=e.replaceAll(/\(/g,"\\("),e=e.replaceAll(/\)/g,"\\)")),e}),"getUrl"),Di=Cr((t=>!1!==t&&!["false","null","0"].includes(String(t).trim().toLowerCase())),"evaluate"),Ii=Cr((function(...t){const e=t.filter((t=>!isNaN(t)));return Math.max(...e)}),"getMax"),Oi=Cr((function(...t){const e=t.filter((t=>!isNaN(t)));return Math.min(...e)}),"getMin"),Pi=Cr((function(t){const e=t.split(/(,)/),r=[];for(let i=0;i<e.length;i++){let t=e[i];if(","===t&&i>0&&i+1<e.length){const a=e[i-1],n=e[i+1];qi(a,n)&&(t=a+","+n,i++,r.pop())}r.push(zi(t))}return r.join("")}),"parseGenericTypes"),Ri=Cr(((t,e)=>Math.max(0,t.split(e).length-1)),"countOccurrence"),qi=Cr(((t,e)=>{const r=Ri(t,"~"),i=Ri(e,"~");return 1===r&&1===i}),"shouldCombineSets"),zi=Cr((t=>{const e=Ri(t,"~");let r=!1;if(e<=1)return t;e%2!=0&&t.startsWith("~")&&(t=t.substring(1),r=!0);const i=[...t];let a=i.indexOf("~"),n=i.lastIndexOf("~");for(;-1!==a&&-1!==n&&a!==n;)i[a]="<",i[n]=">",a=i.indexOf("~"),n=i.lastIndexOf("~");return r&&i.unshift("~"),i.join("")}),"processSet"),Wi=Cr((()=>void 0!==window.MathMLElement),"isMathMLSupported"),Ni=/\$\$(.*)\$\$/g,ji=Cr((t=>{var e;return((null==(e=t.match(Ni))?void 0:e.length)??0)>0}),"hasKatex"),Hi=Cr((async(t,e)=>{t=await Ui(t,e);const r=document.createElement("div");r.innerHTML=t,r.id="katex-temp",r.style.visibility="hidden",r.style.position="absolute",r.style.top="0";const i=document.querySelector("body");null==i||i.insertAdjacentElement("beforeend",r);const a={width:r.clientWidth,height:r.clientHeight};return r.remove(),a}),"calculateMathMLDimensions"),Ui=Cr((async(t,e)=>{if(!ji(t))return t;if(!(Wi()||e.legacyMathML||e.forceLegacyMathML))return t.replace(Ni,"MathML is unsupported in this environment.");const{default:r}=await z((async()=>{const{default:t}=await import("./katex-D1MatCUS.js");return{default:t}}),[],import.meta.url),i=e.forceLegacyMathML||!Wi()&&e.legacyMathML?"htmlAndMathml":"mathml";return t.split(ki).map((t=>ji(t)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${t}</div>`:`<div>${t}</div>`)).join("").replace(Ni,((t,e)=>r.renderToString(e,{throwOnError:!0,displayMode:!0,output:i}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,"")))}),"renderKatex"),Yi={getRows:wi,sanitizeText:_i,sanitizeTextOrArray:Li,hasBreaks:Mi,splitBreaks:Fi,lineBreakRegex:ki,removeScript:vi,getUrl:Ei,evaluate:Di,getMax:Ii,getMin:Oi},Vi=Cr((function(t,e){for(let r of e)t.attr(r[0],r[1])}),"d3Attrs"),Gi=Cr((function(t,e,r){let i=new Map;return r?(i.set("width","100%"),i.set("style",`max-width: ${e}px;`)):(i.set("height",t),i.set("width",e)),i}),"calculateSvgSizeAttrs"),Zi=Cr((function(t,e,r,i){const a=Gi(e,r,i);Vi(t,a)}),"configureSvgSize"),Xi=Cr((function(t,e,r,i){const a=e.node().getBBox(),n=a.width,o=a.height;Sr.info(`SVG bounds: ${n}x${o}`,a);let s=0,l=0;Sr.info(`Graph bounds: ${s}x${l}`,t),s=n+2*r,l=o+2*r,Sr.info(`Calculated bounds: ${s}x${l}`),Zi(e,l,s,i);const h=`${a.x-r} ${a.y-r} ${a.width+2*r} ${a.height+2*r}`;e.attr("viewBox",h)}),"setupGraphViewbox"),Qi={},Ki=Cr(((t,e,r)=>{let i="";return t in Qi&&Qi[t]?i=Qi[t](r):Sr.warn(`No theme found for ${t}`),` & {\n font-family: ${r.fontFamily};\n font-size: ${r.fontSize};\n fill: ${r.textColor}\n }\n\n /* Classes common for multiple diagrams */\n\n & .error-icon {\n fill: ${r.errorBkgColor};\n }\n & .error-text {\n fill: ${r.errorTextColor};\n stroke: ${r.errorTextColor};\n }\n\n & .edge-thickness-normal {\n stroke-width: 1px;\n }\n & .edge-thickness-thick {\n stroke-width: 3.5px\n }\n & .edge-pattern-solid {\n stroke-dasharray: 0;\n }\n & .edge-thickness-invisible {\n stroke-width: 0;\n fill: none;\n }\n & .edge-pattern-dashed{\n stroke-dasharray: 3;\n }\n .edge-pattern-dotted {\n stroke-dasharray: 2;\n }\n\n & .marker {\n fill: ${r.lineColor};\n stroke: ${r.lineColor};\n }\n & .marker.cross {\n stroke: ${r.lineColor};\n }\n\n & svg {\n font-family: ${r.fontFamily};\n font-size: ${r.fontSize};\n }\n & p {\n margin: 0\n }\n\n ${i}\n\n ${e}\n`}),"getStyles"),Ji=Cr(((t,e)=>{void 0!==e&&(Qi[t]=e)}),"addStylesForDiagram"),ta=Ki,ea={};kr(ea,{clear:()=>oa,getAccDescription:()=>ca,getAccTitle:()=>la,getDiagramTitle:()=>ua,setAccDescription:()=>ha,setAccTitle:()=>sa,setDiagramTitle:()=>da});var ra="",ia="",aa="",na=Cr((t=>_i(t,pi())),"sanitizeText"),oa=Cr((()=>{ra="",aa="",ia=""}),"clear"),sa=Cr((t=>{ra=na(t).replace(/^\s+/g,"")}),"setAccTitle"),la=Cr((()=>ra),"getAccTitle"),ha=Cr((t=>{aa=na(t).replace(/\n\s+/g,"\n")}),"setAccDescription"),ca=Cr((()=>aa),"getAccDescription"),da=Cr((t=>{ia=na(t)}),"setDiagramTitle"),ua=Cr((()=>ia),"getDiagramTitle"),pa=Sr,ga=Tr,fa=pi,ya=ui,ma=ii,xa=Cr((t=>_i(t,fa())),"sanitizeText"),ba=Xi,Ca=Cr((()=>ea),"getCommonDb"),ka={},wa=Cr(((t,e,r)=>{var i;ka[t]&&pa.warn(`Diagram with id ${t} already registered. Overwriting.`),ka[t]=e,r&&Er(t,r),Ji(t,e.styles),null==(i=e.injectUtils)||i.call(e,pa,ga,fa,xa,ba,Ca(),(()=>{}))}),"registerDiagram"),Sa=Cr((t=>{if(t in ka)return ka[t];throw new Ta(t)}),"getDiagram"),Ta=(o=class extends Error{constructor(t){super(`Diagram ${t} not found.`)}},Cr(o,"DiagramNotFoundError"),o);function va(t){return null==t}function Ba(t){return"object"==typeof t&&null!==t}function _a(t){return Array.isArray(t)?t:va(t)?[]:[t]}function La(t,e){var r,i,a,n;if(e)for(r=0,i=(n=Object.keys(e)).length;r<i;r+=1)t[a=n[r]]=e[a];return t}function Ma(t,e){var r,i="";for(r=0;r<e;r+=1)i+=t;return i}function Fa(t){return 0===t&&Number.NEGATIVE_INFINITY===1/t}Cr(va,"isNothing"),Cr(Ba,"isObject"),Cr(_a,"toArray"),Cr(La,"extend"),Cr(Ma,"repeat"),Cr(Fa,"isNegativeZero");var Aa={isNothing:va,isObject:Ba,toArray:_a,repeat:Ma,isNegativeZero:Fa,extend:La};function $a(t,e){var r="",i=t.reason||"(unknown reason)";return t.mark?(t.mark.name&&(r+='in "'+t.mark.name+'" '),r+="("+(t.mark.line+1)+":"+(t.mark.column+1)+")",!e&&t.mark.snippet&&(r+="\n\n"+t.mark.snippet),i+" "+r):i}function Ea(t,e){Error.call(this),this.name="YAMLException",this.reason=t,this.mark=e,this.message=$a(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack||""}Cr($a,"formatError"),Cr(Ea,"YAMLException$1"),Ea.prototype=Object.create(Error.prototype),Ea.prototype.constructor=Ea,Ea.prototype.toString=Cr((function(t){return this.name+": "+$a(this,t)}),"toString");var Da=Ea;function Ia(t,e,r,i,a){var n="",o="",s=Math.floor(a/2)-1;return i-e>s&&(e=i-s+(n=" ... ").length),r-i>s&&(r=i+s-(o=" ...").length),{str:n+t.slice(e,r).replace(/\t/g,"→")+o,pos:i-e+n.length}}function Oa(t,e){return Aa.repeat(" ",e-t.length)+t}function Pa(t,e){if(e=Object.create(e||null),!t.buffer)return null;e.maxLength||(e.maxLength=79),"number"!=typeof e.indent&&(e.indent=1),"number"!=typeof e.linesBefore&&(e.linesBefore=3),"number"!=typeof e.linesAfter&&(e.linesAfter=2);for(var r,i=/\r?\n|\r|\0/g,a=[0],n=[],o=-1;r=i.exec(t.buffer);)n.push(r.index),a.push(r.index+r[0].length),t.position<=r.index&&o<0&&(o=a.length-2);o<0&&(o=a.length-1);var s,l,h="",c=Math.min(t.line+e.linesAfter,n.length).toString().length,d=e.maxLength-(e.indent+c+3);for(s=1;s<=e.linesBefore&&!(o-s<0);s++)l=Ia(t.buffer,a[o-s],n[o-s],t.position-(a[o]-a[o-s]),d),h=Aa.repeat(" ",e.indent)+Oa((t.line-s+1).toString(),c)+" | "+l.str+"\n"+h;for(l=Ia(t.buffer,a[o],n[o],t.position,d),h+=Aa.repeat(" ",e.indent)+Oa((t.line+1).toString(),c)+" | "+l.str+"\n",h+=Aa.repeat("-",e.indent+c+3+l.pos)+"^\n",s=1;s<=e.linesAfter&&!(o+s>=n.length);s++)l=Ia(t.buffer,a[o+s],n[o+s],t.position-(a[o]-a[o+s]),d),h+=Aa.repeat(" ",e.indent)+Oa((t.line+s+1).toString(),c)+" | "+l.str+"\n";return h.replace(/\n$/,"")}Cr(Ia,"getLine"),Cr(Oa,"padStart"),Cr(Pa,"makeSnippet");var Ra=Pa,qa=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],za=["scalar","sequence","mapping"];function Wa(t){var e={};return null!==t&&Object.keys(t).forEach((function(r){t[r].forEach((function(t){e[String(t)]=r}))})),e}function Na(t,e){if(e=e||{},Object.keys(e).forEach((function(e){if(-1===qa.indexOf(e))throw new Da('Unknown option "'+e+'" is met in definition of "'+t+'" YAML type.')})),this.options=e,this.tag=t,this.kind=e.kind||null,this.resolve=e.resolve||function(){return!0},this.construct=e.construct||function(t){return t},this.instanceOf=e.instanceOf||null,this.predicate=e.predicate||null,this.represent=e.represent||null,this.representName=e.representName||null,this.defaultStyle=e.defaultStyle||null,this.multi=e.multi||!1,this.styleAliases=Wa(e.styleAliases||null),-1===za.indexOf(this.kind))throw new Da('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')}Cr(Wa,"compileStyleAliases"),Cr(Na,"Type$1");var ja=Na;function Ha(t,e){var r=[];return t[e].forEach((function(t){var e=r.length;r.forEach((function(r,i){r.tag===t.tag&&r.kind===t.kind&&r.multi===t.multi&&(e=i)})),r[e]=t})),r}function Ua(){var t,e,r={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function i(t){t.multi?(r.multi[t.kind].push(t),r.multi.fallback.push(t)):r[t.kind][t.tag]=r.fallback[t.tag]=t}for(Cr(i,"collectType"),t=0,e=arguments.length;t<e;t+=1)arguments[t].forEach(i);return r}function Ya(t){return this.extend(t)}Cr(Ha,"compileList"),Cr(Ua,"compileMap"),Cr(Ya,"Schema$1"),Ya.prototype.extend=Cr((function(t){var e=[],r=[];if(t instanceof ja)r.push(t);else if(Array.isArray(t))r=r.concat(t);else{if(!t||!Array.isArray(t.implicit)&&!Array.isArray(t.explicit))throw new Da("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");t.implicit&&(e=e.concat(t.implicit)),t.explicit&&(r=r.concat(t.explicit))}e.forEach((function(t){if(!(t instanceof ja))throw new Da("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(t.loadKind&&"scalar"!==t.loadKind)throw new Da("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(t.multi)throw new Da("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")})),r.forEach((function(t){if(!(t instanceof ja))throw new Da("Specified list of YAML types (or a single Type object) contains a non-Type object.")}));var i=Object.create(Ya.prototype);return i.implicit=(this.implicit||[]).concat(e),i.explicit=(this.explicit||[]).concat(r),i.compiledImplicit=Ha(i,"implicit"),i.compiledExplicit=Ha(i,"explicit"),i.compiledTypeMap=Ua(i.compiledImplicit,i.compiledExplicit),i}),"extend");var Va=new Ya({explicit:[new ja("tag:yaml.org,2002:str",{kind:"scalar",construct:Cr((function(t){return null!==t?t:""}),"construct")}),new ja("tag:yaml.org,2002:seq",{kind:"sequence",construct:Cr((function(t){return null!==t?t:[]}),"construct")}),new ja("tag:yaml.org,2002:map",{kind:"mapping",construct:Cr((function(t){return null!==t?t:{}}),"construct")})]});function Ga(t){if(null===t)return!0;var e=t.length;return 1===e&&"~"===t||4===e&&("null"===t||"Null"===t||"NULL"===t)}function Za(){return null}function Xa(t){return null===t}Cr(Ga,"resolveYamlNull"),Cr(Za,"constructYamlNull"),Cr(Xa,"isNull");var Qa=new ja("tag:yaml.org,2002:null",{kind:"scalar",resolve:Ga,construct:Za,predicate:Xa,represent:{canonical:Cr((function(){return"~"}),"canonical"),lowercase:Cr((function(){return"null"}),"lowercase"),uppercase:Cr((function(){return"NULL"}),"uppercase"),camelcase:Cr((function(){return"Null"}),"camelcase"),empty:Cr((function(){return""}),"empty")},defaultStyle:"lowercase"});function Ka(t){if(null===t)return!1;var e=t.length;return 4===e&&("true"===t||"True"===t||"TRUE"===t)||5===e&&("false"===t||"False"===t||"FALSE"===t)}function Ja(t){return"true"===t||"True"===t||"TRUE"===t}function tn(t){return"[object Boolean]"===Object.prototype.toString.call(t)}Cr(Ka,"resolveYamlBoolean"),Cr(Ja,"constructYamlBoolean"),Cr(tn,"isBoolean");var en=new ja("tag:yaml.org,2002:bool",{kind:"scalar",resolve:Ka,construct:Ja,predicate:tn,represent:{lowercase:Cr((function(t){return t?"true":"false"}),"lowercase"),uppercase:Cr((function(t){return t?"TRUE":"FALSE"}),"uppercase"),camelcase:Cr((function(t){return t?"True":"False"}),"camelcase")},defaultStyle:"lowercase"});function rn(t){return 48<=t&&t<=57||65<=t&&t<=70||97<=t&&t<=102}function an(t){return 48<=t&&t<=55}function nn(t){return 48<=t&&t<=57}function on(t){if(null===t)return!1;var e,r=t.length,i=0,a=!1;if(!r)return!1;if("-"!==(e=t[i])&&"+"!==e||(e=t[++i]),"0"===e){if(i+1===r)return!0;if("b"===(e=t[++i])){for(i++;i<r;i++)if("_"!==(e=t[i])){if("0"!==e&&"1"!==e)return!1;a=!0}return a&&"_"!==e}if("x"===e){for(i++;i<r;i++)if("_"!==(e=t[i])){if(!rn(t.charCodeAt(i)))return!1;a=!0}return a&&"_"!==e}if("o"===e){for(i++;i<r;i++)if("_"!==(e=t[i])){if(!an(t.charCodeAt(i)))return!1;a=!0}return a&&"_"!==e}}if("_"===e)return!1;for(;i<r;i++)if("_"!==(e=t[i])){if(!nn(t.charCodeAt(i)))return!1;a=!0}return!(!a||"_"===e)}function sn(t){var e,r=t,i=1;if(-1!==r.indexOf("_")&&(r=r.replace(/_/g,"")),"-"!==(e=r[0])&&"+"!==e||("-"===e&&(i=-1),e=(r=r.slice(1))[0]),"0"===r)return 0;if("0"===e){if("b"===r[1])return i*parseInt(r.slice(2),2);if("x"===r[1])return i*parseInt(r.slice(2),16);if("o"===r[1])return i*parseInt(r.slice(2),8)}return i*parseInt(r,10)}function ln(t){return"[object Number]"===Object.prototype.toString.call(t)&&t%1==0&&!Aa.isNegativeZero(t)}Cr(rn,"isHexCode"),Cr(an,"isOctCode"),Cr(nn,"isDecCode"),Cr(on,"resolveYamlInteger"),Cr(sn,"constructYamlInteger"),Cr(ln,"isInteger");var hn=new ja("tag:yaml.org,2002:int",{kind:"scalar",resolve:on,construct:sn,predicate:ln,represent:{binary:Cr((function(t){return t>=0?"0b"+t.toString(2):"-0b"+t.toString(2).slice(1)}),"binary"),octal:Cr((function(t){return t>=0?"0o"+t.toString(8):"-0o"+t.toString(8).slice(1)}),"octal"),decimal:Cr((function(t){return t.toString(10)}),"decimal"),hexadecimal:Cr((function(t){return t>=0?"0x"+t.toString(16).toUpperCase():"-0x"+t.toString(16).toUpperCase().slice(1)}),"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),cn=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function dn(t){return null!==t&&!(!cn.test(t)||"_"===t[t.length-1])}function un(t){var e,r;return r="-"===(e=t.replace(/_/g,"").toLowerCase())[0]?-1:1,"+-".indexOf(e[0])>=0&&(e=e.slice(1)),".inf"===e?1===r?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===e?NaN:r*parseFloat(e,10)}Cr(dn,"resolveYamlFloat"),Cr(un,"constructYamlFloat");var pn=/^[-+]?[0-9]+e/;function gn(t,e){var r;if(isNaN(t))switch(e){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===t)switch(e){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===t)switch(e){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(Aa.isNegativeZero(t))return"-0.0";return r=t.toString(10),pn.test(r)?r.replace("e",".e"):r}function fn(t){return"[object Number]"===Object.prototype.toString.call(t)&&(t%1!=0||Aa.isNegativeZero(t))}Cr(gn,"representYamlFloat"),Cr(fn,"isFloat");var yn=new ja("tag:yaml.org,2002:float",{kind:"scalar",resolve:dn,construct:un,predicate:fn,represent:gn,defaultStyle:"lowercase"}),mn=Va.extend({implicit:[Qa,en,hn,yn]}),xn=mn,bn=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Cn=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 kn(t){return null!==t&&(null!==bn.exec(t)||null!==Cn.exec(t))}function wn(t){var e,r,i,a,n,o,s,l,h=0,c=null;if(null===(e=bn.exec(t))&&(e=Cn.exec(t)),null===e)throw new Error("Date resolve error");if(r=+e[1],i=+e[2]-1,a=+e[3],!e[4])return new Date(Date.UTC(r,i,a));if(n=+e[4],o=+e[5],s=+e[6],e[7]){for(h=e[7].slice(0,3);h.length<3;)h+="0";h=+h}return e[9]&&(c=6e4*(60*+e[10]+ +(e[11]||0)),"-"===e[9]&&(c=-c)),l=new Date(Date.UTC(r,i,a,n,o,s,h)),c&&l.setTime(l.getTime()-c),l}function Sn(t){return t.toISOString()}Cr(kn,"resolveYamlTimestamp"),Cr(wn,"constructYamlTimestamp"),Cr(Sn,"representYamlTimestamp");var Tn=new ja("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:kn,construct:wn,instanceOf:Date,represent:Sn});function vn(t){return"<<"===t||null===t}Cr(vn,"resolveYamlMerge");var Bn=new ja("tag:yaml.org,2002:merge",{kind:"scalar",resolve:vn}),_n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";function Ln(t){if(null===t)return!1;var e,r,i=0,a=t.length,n=_n;for(r=0;r<a;r++)if(!((e=n.indexOf(t.charAt(r)))>64)){if(e<0)return!1;i+=6}return i%8==0}function Mn(t){var e,r,i=t.replace(/[\r\n=]/g,""),a=i.length,n=_n,o=0,s=[];for(e=0;e<a;e++)e%4==0&&e&&(s.push(o>>16&255),s.push(o>>8&255),s.push(255&o)),o=o<<6|n.indexOf(i.charAt(e));return 0===(r=a%4*6)?(s.push(o>>16&255),s.push(o>>8&255),s.push(255&o)):18===r?(s.push(o>>10&255),s.push(o>>2&255)):12===r&&s.push(o>>4&255),new Uint8Array(s)}function Fn(t){var e,r,i="",a=0,n=t.length,o=_n;for(e=0;e<n;e++)e%3==0&&e&&(i+=o[a>>18&63],i+=o[a>>12&63],i+=o[a>>6&63],i+=o[63&a]),a=(a<<8)+t[e];return 0===(r=n%3)?(i+=o[a>>18&63],i+=o[a>>12&63],i+=o[a>>6&63],i+=o[63&a]):2===r?(i+=o[a>>10&63],i+=o[a>>4&63],i+=o[a<<2&63],i+=o[64]):1===r&&(i+=o[a>>2&63],i+=o[a<<4&63],i+=o[64],i+=o[64]),i}function An(t){return"[object Uint8Array]"===Object.prototype.toString.call(t)}Cr(Ln,"resolveYamlBinary"),Cr(Mn,"constructYamlBinary"),Cr(Fn,"representYamlBinary"),Cr(An,"isBinary");var $n=new ja("tag:yaml.org,2002:binary",{kind:"scalar",resolve:Ln,construct:Mn,predicate:An,represent:Fn}),En=Object.prototype.hasOwnProperty,Dn=Object.prototype.toString;function In(t){if(null===t)return!0;var e,r,i,a,n,o=[],s=t;for(e=0,r=s.length;e<r;e+=1){if(i=s[e],n=!1,"[object Object]"!==Dn.call(i))return!1;for(a in i)if(En.call(i,a)){if(n)return!1;n=!0}if(!n)return!1;if(-1!==o.indexOf(a))return!1;o.push(a)}return!0}function On(t){return null!==t?t:[]}Cr(In,"resolveYamlOmap"),Cr(On,"constructYamlOmap");var Pn=new ja("tag:yaml.org,2002:omap",{kind:"sequence",resolve:In,construct:On}),Rn=Object.prototype.toString;function qn(t){if(null===t)return!0;var e,r,i,a,n,o=t;for(n=new Array(o.length),e=0,r=o.length;e<r;e+=1){if(i=o[e],"[object Object]"!==Rn.call(i))return!1;if(1!==(a=Object.keys(i)).length)return!1;n[e]=[a[0],i[a[0]]]}return!0}function zn(t){if(null===t)return[];var e,r,i,a,n,o=t;for(n=new Array(o.length),e=0,r=o.length;e<r;e+=1)i=o[e],a=Object.keys(i),n[e]=[a[0],i[a[0]]];return n}Cr(qn,"resolveYamlPairs"),Cr(zn,"constructYamlPairs");var Wn=new ja("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:qn,construct:zn}),Nn=Object.prototype.hasOwnProperty;function jn(t){if(null===t)return!0;var e,r=t;for(e in r)if(Nn.call(r,e)&&null!==r[e])return!1;return!0}function Hn(t){return null!==t?t:{}}Cr(jn,"resolveYamlSet"),Cr(Hn,"constructYamlSet");var Un=new ja("tag:yaml.org,2002:set",{kind:"mapping",resolve:jn,construct:Hn}),Yn=xn.extend({implicit:[Tn,Bn],explicit:[$n,Pn,Wn,Un]}),Vn=Object.prototype.hasOwnProperty,Gn=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,Zn=/[\x85\u2028\u2029]/,Xn=/[,\[\]\{\}]/,Qn=/^(?:!|!!|![a-z\-]+!)$/i,Kn=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function Jn(t){return Object.prototype.toString.call(t)}function to(t){return 10===t||13===t}function eo(t){return 9===t||32===t}function ro(t){return 9===t||32===t||10===t||13===t}function io(t){return 44===t||91===t||93===t||123===t||125===t}function ao(t){var e;return 48<=t&&t<=57?t-48:97<=(e=32|t)&&e<=102?e-97+10:-1}function no(t){return 120===t?2:117===t?4:85===t?8:0}function oo(t){return 48<=t&&t<=57?t-48:-1}function so(t){return 48===t?"\0":97===t?"":98===t?"\b":116===t||9===t?"\t":110===t?"\n":118===t?"\v":102===t?"\f":114===t?"\r":101===t?"":32===t?" ":34===t?'"':47===t?"/":92===t?"\\":78===t?"…":95===t?" ":76===t?"\u2028":80===t?"\u2029":""}function lo(t){return t<=65535?String.fromCharCode(t):String.fromCharCode(55296+(t-65536>>10),56320+(t-65536&1023))}Cr(Jn,"_class"),Cr(to,"is_EOL"),Cr(eo,"is_WHITE_SPACE"),Cr(ro,"is_WS_OR_EOL"),Cr(io,"is_FLOW_INDICATOR"),Cr(ao,"fromHexCode"),Cr(no,"escapedHexLen"),Cr(oo,"fromDecimalCode"),Cr(so,"simpleEscapeSequence"),Cr(lo,"charFromCodepoint");var ho,co=new Array(256),uo=new Array(256);for(ho=0;ho<256;ho++)co[ho]=so(ho)?1:0,uo[ho]=so(ho);function po(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||Yn,this.onWarning=e.onWarning||null,this.legacy=e.legacy||!1,this.json=e.json||!1,this.listener=e.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=t.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function go(t,e){var r={name:t.filename,buffer:t.input.slice(0,-1),position:t.position,line:t.line,column:t.position-t.lineStart};return r.snippet=Ra(r),new Da(e,r)}function fo(t,e){throw go(t,e)}function yo(t,e){t.onWarning&&t.onWarning.call(null,go(t,e))}Cr(po,"State$1"),Cr(go,"generateError"),Cr(fo,"throwError"),Cr(yo,"throwWarning");var mo={YAML:Cr((function(t,e,r){var i,a,n;null!==t.version&&fo(t,"duplication of %YAML directive"),1!==r.length&&fo(t,"YAML directive accepts exactly one argument"),null===(i=/^([0-9]+)\.([0-9]+)$/.exec(r[0]))&&fo(t,"ill-formed argument of the YAML directive"),a=parseInt(i[1],10),n=parseInt(i[2],10),1!==a&&fo(t,"unacceptable YAML version of the document"),t.version=r[0],t.checkLineBreaks=n<2,1!==n&&2!==n&&yo(t,"unsupported YAML version of the document")}),"handleYamlDirective"),TAG:Cr((function(t,e,r){var i,a;2!==r.length&&fo(t,"TAG directive accepts exactly two arguments"),i=r[0],a=r[1],Qn.test(i)||fo(t,"ill-formed tag handle (first argument) of the TAG directive"),Vn.call(t.tagMap,i)&&fo(t,'there is a previously declared suffix for "'+i+'" tag handle'),Kn.test(a)||fo(t,"ill-formed tag prefix (second argument) of the TAG directive");try{a=decodeURIComponent(a)}catch(n){fo(t,"tag prefix is malformed: "+a)}t.tagMap[i]=a}),"handleTagDirective")};function xo(t,e,r,i){var a,n,o,s;if(e<r){if(s=t.input.slice(e,r),i)for(a=0,n=s.length;a<n;a+=1)9===(o=s.charCodeAt(a))||32<=o&&o<=1114111||fo(t,"expected valid JSON character");else Gn.test(s)&&fo(t,"the stream contains non-printable characters");t.result+=s}}function bo(t,e,r,i){var a,n,o,s;for(Aa.isObject(r)||fo(t,"cannot merge mappings; the provided source object is unacceptable"),o=0,s=(a=Object.keys(r)).length;o<s;o+=1)n=a[o],Vn.call(e,n)||(e[n]=r[n],i[n]=!0)}function Co(t,e,r,i,a,n,o,s,l){var h,c;if(Array.isArray(a))for(h=0,c=(a=Array.prototype.slice.call(a)).length;h<c;h+=1)Array.isArray(a[h])&&fo(t,"nested arrays are not supported inside keys"),"object"==typeof a&&"[object Object]"===Jn(a[h])&&(a[h]="[object Object]");if("object"==typeof a&&"[object Object]"===Jn(a)&&(a="[object Object]"),a=String(a),null===e&&(e={}),"tag:yaml.org,2002:merge"===i)if(Array.isArray(n))for(h=0,c=n.length;h<c;h+=1)bo(t,e,n[h],r);else bo(t,e,n,r);else t.json||Vn.call(r,a)||!Vn.call(e,a)||(t.line=o||t.line,t.lineStart=s||t.lineStart,t.position=l||t.position,fo(t,"duplicated mapping key")),"__proto__"===a?Object.defineProperty(e,a,{configurable:!0,enumerable:!0,writable:!0,value:n}):e[a]=n,delete r[a];return e}function ko(t){var e;10===(e=t.input.charCodeAt(t.position))?t.position++:13===e?(t.position++,10===t.input.charCodeAt(t.position)&&t.position++):fo(t,"a line break is expected"),t.line+=1,t.lineStart=t.position,t.firstTabInLine=-1}function wo(t,e,r){for(var i=0,a=t.input.charCodeAt(t.position);0!==a;){for(;eo(a);)9===a&&-1===t.firstTabInLine&&(t.firstTabInLine=t.position),a=t.input.charCodeAt(++t.position);if(e&&35===a)do{a=t.input.charCodeAt(++t.position)}while(10!==a&&13!==a&&0!==a);if(!to(a))break;for(ko(t),a=t.input.charCodeAt(t.position),i++,t.lineIndent=0;32===a;)t.lineIndent++,a=t.input.charCodeAt(++t.position)}return-1!==r&&0!==i&&t.lineIndent<r&&yo(t,"deficient indentation"),i}function So(t){var e,r=t.position;return!(45!==(e=t.input.charCodeAt(r))&&46!==e||e!==t.input.charCodeAt(r+1)||e!==t.input.charCodeAt(r+2)||(r+=3,0!==(e=t.input.charCodeAt(r))&&!ro(e)))}function To(t,e){1===e?t.result+=" ":e>1&&(t.result+=Aa.repeat("\n",e-1))}function vo(t,e,r){var i,a,n,o,s,l,h,c,d=t.kind,u=t.result;if(ro(c=t.input.charCodeAt(t.position))||io(c)||35===c||38===c||42===c||33===c||124===c||62===c||39===c||34===c||37===c||64===c||96===c)return!1;if((63===c||45===c)&&(ro(i=t.input.charCodeAt(t.position+1))||r&&io(i)))return!1;for(t.kind="scalar",t.result="",a=n=t.position,o=!1;0!==c;){if(58===c){if(ro(i=t.input.charCodeAt(t.position+1))||r&&io(i))break}else if(35===c){if(ro(t.input.charCodeAt(t.position-1)))break}else{if(t.position===t.lineStart&&So(t)||r&&io(c))break;if(to(c)){if(s=t.line,l=t.lineStart,h=t.lineIndent,wo(t,!1,-1),t.lineIndent>=e){o=!0,c=t.input.charCodeAt(t.position);continue}t.position=n,t.line=s,t.lineStart=l,t.lineIndent=h;break}}o&&(xo(t,a,n,!1),To(t,t.line-s),a=n=t.position,o=!1),eo(c)||(n=t.position+1),c=t.input.charCodeAt(++t.position)}return xo(t,a,n,!1),!!t.result||(t.kind=d,t.result=u,!1)}function Bo(t,e){var r,i,a;if(39!==(r=t.input.charCodeAt(t.position)))return!1;for(t.kind="scalar",t.result="",t.position++,i=a=t.position;0!==(r=t.input.charCodeAt(t.position));)if(39===r){if(xo(t,i,t.position,!0),39!==(r=t.input.charCodeAt(++t.position)))return!0;i=t.position,t.position++,a=t.position}else to(r)?(xo(t,i,a,!0),To(t,wo(t,!1,e)),i=a=t.position):t.position===t.lineStart&&So(t)?fo(t,"unexpected end of the document within a single quoted scalar"):(t.position++,a=t.position);fo(t,"unexpected end of the stream within a single quoted scalar")}function _o(t,e){var r,i,a,n,o,s;if(34!==(s=t.input.charCodeAt(t.position)))return!1;for(t.kind="scalar",t.result="",t.position++,r=i=t.position;0!==(s=t.input.charCodeAt(t.position));){if(34===s)return xo(t,r,t.position,!0),t.position++,!0;if(92===s){if(xo(t,r,t.position,!0),to(s=t.input.charCodeAt(++t.position)))wo(t,!1,e);else if(s<256&&co[s])t.result+=uo[s],t.position++;else if((o=no(s))>0){for(a=o,n=0;a>0;a--)(o=ao(s=t.input.charCodeAt(++t.position)))>=0?n=(n<<4)+o:fo(t,"expected hexadecimal character");t.result+=lo(n),t.position++}else fo(t,"unknown escape sequence");r=i=t.position}else to(s)?(xo(t,r,i,!0),To(t,wo(t,!1,e)),r=i=t.position):t.position===t.lineStart&&So(t)?fo(t,"unexpected end of the document within a double quoted scalar"):(t.position++,i=t.position)}fo(t,"unexpected end of the stream within a double quoted scalar")}function Lo(t,e){var r,i,a,n,o,s,l,h,c,d,u,p,g=!0,f=t.tag,y=t.anchor,m=Object.create(null);if(91===(p=t.input.charCodeAt(t.position)))o=93,h=!1,n=[];else{if(123!==p)return!1;o=125,h=!0,n={}}for(null!==t.anchor&&(t.anchorMap[t.anchor]=n),p=t.input.charCodeAt(++t.position);0!==p;){if(wo(t,!0,e),(p=t.input.charCodeAt(t.position))===o)return t.position++,t.tag=f,t.anchor=y,t.kind=h?"mapping":"sequence",t.result=n,!0;g?44===p&&fo(t,"expected the node content, but found ','"):fo(t,"missed comma between flow collection entries"),u=null,s=l=!1,63===p&&ro(t.input.charCodeAt(t.position+1))&&(s=l=!0,t.position++,wo(t,!0,e)),r=t.line,i=t.lineStart,a=t.position,Io(t,e,1,!1,!0),d=t.tag,c=t.result,wo(t,!0,e),p=t.input.charCodeAt(t.position),!l&&t.line!==r||58!==p||(s=!0,p=t.input.charCodeAt(++t.position),wo(t,!0,e),Io(t,e,1,!1,!0),u=t.result),h?Co(t,n,m,d,c,u,r,i,a):s?n.push(Co(t,null,m,d,c,u,r,i,a)):n.push(c),wo(t,!0,e),44===(p=t.input.charCodeAt(t.position))?(g=!0,p=t.input.charCodeAt(++t.position)):g=!1}fo(t,"unexpected end of the stream within a flow collection")}function Mo(t,e){var r,i,a,n,o=1,s=!1,l=!1,h=e,c=0,d=!1;if(124===(n=t.input.charCodeAt(t.position)))i=!1;else{if(62!==n)return!1;i=!0}for(t.kind="scalar",t.result="";0!==n;)if(43===(n=t.input.charCodeAt(++t.position))||45===n)1===o?o=43===n?3:2:fo(t,"repeat of a chomping mode identifier");else{if(!((a=oo(n))>=0))break;0===a?fo(t,"bad explicit indentation width of a block scalar; it cannot be less than one"):l?fo(t,"repeat of an indentation width identifier"):(h=e+a-1,l=!0)}if(eo(n)){do{n=t.input.charCodeAt(++t.position)}while(eo(n));if(35===n)do{n=t.input.charCodeAt(++t.position)}while(!to(n)&&0!==n)}for(;0!==n;){for(ko(t),t.lineIndent=0,n=t.input.charCodeAt(t.position);(!l||t.lineIndent<h)&&32===n;)t.lineIndent++,n=t.input.charCodeAt(++t.position);if(!l&&t.lineIndent>h&&(h=t.lineIndent),to(n))c++;else{if(t.lineIndent<h){3===o?t.result+=Aa.repeat("\n",s?1+c:c):1===o&&s&&(t.result+="\n");break}for(i?eo(n)?(d=!0,t.result+=Aa.repeat("\n",s?1+c:c)):d?(d=!1,t.result+=Aa.repeat("\n",c+1)):0===c?s&&(t.result+=" "):t.result+=Aa.repeat("\n",c):t.result+=Aa.repeat("\n",s?1+c:c),s=!0,l=!0,c=0,r=t.position;!to(n)&&0!==n;)n=t.input.charCodeAt(++t.position);xo(t,r,t.position,!1)}}return!0}function Fo(t,e){var r,i,a=t.tag,n=t.anchor,o=[],s=!1;if(-1!==t.firstTabInLine)return!1;for(null!==t.anchor&&(t.anchorMap[t.anchor]=o),i=t.input.charCodeAt(t.position);0!==i&&(-1!==t.firstTabInLine&&(t.position=t.firstTabInLine,fo(t,"tab characters must not be used in indentation")),45===i)&&ro(t.input.charCodeAt(t.position+1));)if(s=!0,t.position++,wo(t,!0,-1)&&t.lineIndent<=e)o.push(null),i=t.input.charCodeAt(t.position);else if(r=t.line,Io(t,e,3,!1,!0),o.push(t.result),wo(t,!0,-1),i=t.input.charCodeAt(t.position),(t.line===r||t.lineIndent>e)&&0!==i)fo(t,"bad indentation of a sequence entry");else if(t.lineIndent<e)break;return!!s&&(t.tag=a,t.anchor=n,t.kind="sequence",t.result=o,!0)}function Ao(t,e,r){var i,a,n,o,s,l,h,c=t.tag,d=t.anchor,u={},p=Object.create(null),g=null,f=null,y=null,m=!1,x=!1;if(-1!==t.firstTabInLine)return!1;for(null!==t.anchor&&(t.anchorMap[t.anchor]=u),h=t.input.charCodeAt(t.position);0!==h;){if(m||-1===t.firstTabInLine||(t.position=t.firstTabInLine,fo(t,"tab characters must not be used in indentation")),i=t.input.charCodeAt(t.position+1),n=t.line,63!==h&&58!==h||!ro(i)){if(o=t.line,s=t.lineStart,l=t.position,!Io(t,r,2,!1,!0))break;if(t.line===n){for(h=t.input.charCodeAt(t.position);eo(h);)h=t.input.charCodeAt(++t.position);if(58===h)ro(h=t.input.charCodeAt(++t.position))||fo(t,"a whitespace character is expected after the key-value separator within a block mapping"),m&&(Co(t,u,p,g,f,null,o,s,l),g=f=y=null),x=!0,m=!1,a=!1,g=t.tag,f=t.result;else{if(!x)return t.tag=c,t.anchor=d,!0;fo(t,"can not read an implicit mapping pair; a colon is missed")}}else{if(!x)return t.tag=c,t.anchor=d,!0;fo(t,"can not read a block mapping entry; a multiline key may not be an implicit key")}}else 63===h?(m&&(Co(t,u,p,g,f,null,o,s,l),g=f=y=null),x=!0,m=!0,a=!0):m?(m=!1,a=!0):fo(t,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),t.position+=1,h=i;if((t.line===n||t.lineIndent>e)&&(m&&(o=t.line,s=t.lineStart,l=t.position),Io(t,e,4,!0,a)&&(m?f=t.result:y=t.result),m||(Co(t,u,p,g,f,y,o,s,l),g=f=y=null),wo(t,!0,-1),h=t.input.charCodeAt(t.position)),(t.line===n||t.lineIndent>e)&&0!==h)fo(t,"bad indentation of a mapping entry");else if(t.lineIndent<e)break}return m&&Co(t,u,p,g,f,null,o,s,l),x&&(t.tag=c,t.anchor=d,t.kind="mapping",t.result=u),x}function $o(t){var e,r,i,a,n=!1,o=!1;if(33!==(a=t.input.charCodeAt(t.position)))return!1;if(null!==t.tag&&fo(t,"duplication of a tag property"),60===(a=t.input.charCodeAt(++t.position))?(n=!0,a=t.input.charCodeAt(++t.position)):33===a?(o=!0,r="!!",a=t.input.charCodeAt(++t.position)):r="!",e=t.position,n){do{a=t.input.charCodeAt(++t.position)}while(0!==a&&62!==a);t.position<t.length?(i=t.input.slice(e,t.position),a=t.input.charCodeAt(++t.position)):fo(t,"unexpected end of the stream within a verbatim tag")}else{for(;0!==a&&!ro(a);)33===a&&(o?fo(t,"tag suffix cannot contain exclamation marks"):(r=t.input.slice(e-1,t.position+1),Qn.test(r)||fo(t,"named tag handle cannot contain such characters"),o=!0,e=t.position+1)),a=t.input.charCodeAt(++t.position);i=t.input.slice(e,t.position),Xn.test(i)&&fo(t,"tag suffix cannot contain flow indicator characters")}i&&!Kn.test(i)&&fo(t,"tag name cannot contain such characters: "+i);try{i=decodeURIComponent(i)}catch(s){fo(t,"tag name is malformed: "+i)}return n?t.tag=i:Vn.call(t.tagMap,r)?t.tag=t.tagMap[r]+i:"!"===r?t.tag="!"+i:"!!"===r?t.tag="tag:yaml.org,2002:"+i:fo(t,'undeclared tag handle "'+r+'"'),!0}function Eo(t){var e,r;if(38!==(r=t.input.charCodeAt(t.position)))return!1;for(null!==t.anchor&&fo(t,"duplication of an anchor property"),r=t.input.charCodeAt(++t.position),e=t.position;0!==r&&!ro(r)&&!io(r);)r=t.input.charCodeAt(++t.position);return t.position===e&&fo(t,"name of an anchor node must contain at least one character"),t.anchor=t.input.slice(e,t.position),!0}function Do(t){var e,r,i;if(42!==(i=t.input.charCodeAt(t.position)))return!1;for(i=t.input.charCodeAt(++t.position),e=t.position;0!==i&&!ro(i)&&!io(i);)i=t.input.charCodeAt(++t.position);return t.position===e&&fo(t,"name of an alias node must contain at least one character"),r=t.input.slice(e,t.position),Vn.call(t.anchorMap,r)||fo(t,'unidentified alias "'+r+'"'),t.result=t.anchorMap[r],wo(t,!0,-1),!0}function Io(t,e,r,i,a){var n,o,s,l,h,c,d,u,p,g=1,f=!1,y=!1;if(null!==t.listener&&t.listener("open",t),t.tag=null,t.anchor=null,t.kind=null,t.result=null,n=o=s=4===r||3===r,i&&wo(t,!0,-1)&&(f=!0,t.lineIndent>e?g=1:t.lineIndent===e?g=0:t.lineIndent<e&&(g=-1)),1===g)for(;$o(t)||Eo(t);)wo(t,!0,-1)?(f=!0,s=n,t.lineIndent>e?g=1:t.lineIndent===e?g=0:t.lineIndent<e&&(g=-1)):s=!1;if(s&&(s=f||a),1!==g&&4!==r||(u=1===r||2===r?e:e+1,p=t.position-t.lineStart,1===g?s&&(Fo(t,p)||Ao(t,p,u))||Lo(t,u)?y=!0:(o&&Mo(t,u)||Bo(t,u)||_o(t,u)?y=!0:Do(t)?(y=!0,null===t.tag&&null===t.anchor||fo(t,"alias node should not have any properties")):vo(t,u,1===r)&&(y=!0,null===t.tag&&(t.tag="?")),null!==t.anchor&&(t.anchorMap[t.anchor]=t.result)):0===g&&(y=s&&Fo(t,p))),null===t.tag)null!==t.anchor&&(t.anchorMap[t.anchor]=t.result);else if("?"===t.tag){for(null!==t.result&&"scalar"!==t.kind&&fo(t,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+t.kind+'"'),l=0,h=t.implicitTypes.length;l<h;l+=1)if((d=t.implicitTypes[l]).resolve(t.result)){t.result=d.construct(t.result),t.tag=d.tag,null!==t.anchor&&(t.anchorMap[t.anchor]=t.result);break}}else if("!"!==t.tag){if(Vn.call(t.typeMap[t.kind||"fallback"],t.tag))d=t.typeMap[t.kind||"fallback"][t.tag];else for(d=null,l=0,h=(c=t.typeMap.multi[t.kind||"fallback"]).length;l<h;l+=1)if(t.tag.slice(0,c[l].tag.length)===c[l].tag){d=c[l];break}d||fo(t,"unknown tag !<"+t.tag+">"),null!==t.result&&d.kind!==t.kind&&fo(t,"unacceptable node kind for !<"+t.tag+'> tag; it should be "'+d.kind+'", not "'+t.kind+'"'),d.resolve(t.result,t.tag)?(t.result=d.construct(t.result,t.tag),null!==t.anchor&&(t.anchorMap[t.anchor]=t.result)):fo(t,"cannot resolve a node with !<"+t.tag+"> explicit tag")}return null!==t.listener&&t.listener("close",t),null!==t.tag||null!==t.anchor||y}function Oo(t){var e,r,i,a,n=t.position,o=!1;for(t.version=null,t.checkLineBreaks=t.legacy,t.tagMap=Object.create(null),t.anchorMap=Object.create(null);0!==(a=t.input.charCodeAt(t.position))&&(wo(t,!0,-1),a=t.input.charCodeAt(t.position),!(t.lineIndent>0||37!==a));){for(o=!0,a=t.input.charCodeAt(++t.position),e=t.position;0!==a&&!ro(a);)a=t.input.charCodeAt(++t.position);for(i=[],(r=t.input.slice(e,t.position)).length<1&&fo(t,"directive name must not be less than one character in length");0!==a;){for(;eo(a);)a=t.input.charCodeAt(++t.position);if(35===a){do{a=t.input.charCodeAt(++t.position)}while(0!==a&&!to(a));break}if(to(a))break;for(e=t.position;0!==a&&!ro(a);)a=t.input.charCodeAt(++t.position);i.push(t.input.slice(e,t.position))}0!==a&&ko(t),Vn.call(mo,r)?mo[r](t,r,i):yo(t,'unknown document directive "'+r+'"')}wo(t,!0,-1),0===t.lineIndent&&45===t.input.charCodeAt(t.position)&&45===t.input.charCodeAt(t.position+1)&&45===t.input.charCodeAt(t.position+2)?(t.position+=3,wo(t,!0,-1)):o&&fo(t,"directives end mark is expected"),Io(t,t.lineIndent-1,4,!1,!0),wo(t,!0,-1),t.checkLineBreaks&&Zn.test(t.input.slice(n,t.position))&&yo(t,"non-ASCII line breaks are interpreted as content"),t.documents.push(t.result),t.position===t.lineStart&&So(t)?46===t.input.charCodeAt(t.position)&&(t.position+=3,wo(t,!0,-1)):t.position<t.length-1&&fo(t,"end of the stream or a document separator is expected")}function Po(t,e){e=e||{},0!==(t=String(t)).length&&(10!==t.charCodeAt(t.length-1)&&13!==t.charCodeAt(t.length-1)&&(t+="\n"),65279===t.charCodeAt(0)&&(t=t.slice(1)));var r=new po(t,e),i=t.indexOf("\0");for(-1!==i&&(r.position=i,fo(r,"null byte is not allowed in input")),r.input+="\0";32===r.input.charCodeAt(r.position);)r.lineIndent+=1,r.position+=1;for(;r.position<r.length-1;)Oo(r);return r.documents}function Ro(t,e,r){null!==e&&"object"==typeof e&&void 0===r&&(r=e,e=null);var i=Po(t,r);if("function"!=typeof e)return i;for(var a=0,n=i.length;a<n;a+=1)e(i[a])}function qo(t,e){var r=Po(t,e);if(0!==r.length){if(1===r.length)return r[0];throw new Da("expected a single document in the stream, but found more")}}Cr(xo,"captureSegment"),Cr(bo,"mergeMappings"),Cr(Co,"storeMappingPair"),Cr(ko,"readLineBreak"),Cr(wo,"skipSeparationSpace"),Cr(So,"testDocumentSeparator"),Cr(To,"writeFoldedLines"),Cr(vo,"readPlainScalar"),Cr(Bo,"readSingleQuotedScalar"),Cr(_o,"readDoubleQuotedScalar"),Cr(Lo,"readFlowCollection"),Cr(Mo,"readBlockScalar"),Cr(Fo,"readBlockSequence"),Cr(Ao,"readBlockMapping"),Cr($o,"readTagProperty"),Cr(Eo,"readAnchorProperty"),Cr(Do,"readAlias"),Cr(Io,"composeNode"),Cr(Oo,"readDocument"),Cr(Po,"loadDocuments"),Cr(Ro,"loadAll$1"),Cr(qo,"load$1");var zo={loadAll:Ro,load:qo},Wo=Object.prototype.toString,No=Object.prototype.hasOwnProperty,jo=65279,Ho={0:"\\0",7:"\\a",8:"\\b",9:"\\t",10:"\\n",11:"\\v",12:"\\f",13:"\\r",27:"\\e",34:'\\"',92:"\\\\",133:"\\N",160:"\\_",8232:"\\L",8233:"\\P"},Uo=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],Yo=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function Vo(t,e){var r,i,a,n,o,s,l;if(null===e)return{};for(r={},a=0,n=(i=Object.keys(e)).length;a<n;a+=1)o=i[a],s=String(e[o]),"!!"===o.slice(0,2)&&(o="tag:yaml.org,2002:"+o.slice(2)),(l=t.compiledTypeMap.fallback[o])&&No.call(l.styleAliases,s)&&(s=l.styleAliases[s]),r[o]=s;return r}function Go(t){var e,r,i;if(e=t.toString(16).toUpperCase(),t<=255)r="x",i=2;else if(t<=65535)r="u",i=4;else{if(!(t<=4294967295))throw new Da("code point within a string may not be greater than 0xFFFFFFFF");r="U",i=8}return"\\"+r+Aa.repeat("0",i-e.length)+e}Cr(Vo,"compileStyleMap"),Cr(Go,"encodeHex");function Zo(t){this.schema=t.schema||Yn,this.indent=Math.max(1,t.indent||2),this.noArrayIndent=t.noArrayIndent||!1,this.skipInvalid=t.skipInvalid||!1,this.flowLevel=Aa.isNothing(t.flowLevel)?-1:t.flowLevel,this.styleMap=Vo(this.schema,t.styles||null),this.sortKeys=t.sortKeys||!1,this.lineWidth=t.lineWidth||80,this.noRefs=t.noRefs||!1,this.noCompatMode=t.noCompatMode||!1,this.condenseFlow=t.condenseFlow||!1,this.quotingType='"'===t.quotingType?2:1,this.forceQuotes=t.forceQuotes||!1,this.replacer="function"==typeof t.replacer?t.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function Xo(t,e){for(var r,i=Aa.repeat(" ",e),a=0,n=-1,o="",s=t.length;a<s;)-1===(n=t.indexOf("\n",a))?(r=t.slice(a),a=s):(r=t.slice(a,n+1),a=n+1),r.length&&"\n"!==r&&(o+=i),o+=r;return o}function Qo(t,e){return"\n"+Aa.repeat(" ",t.indent*e)}function Ko(t,e){var r,i;for(r=0,i=t.implicitTypes.length;r<i;r+=1)if(t.implicitTypes[r].resolve(e))return!0;return!1}function Jo(t){return 32===t||9===t}function ts(t){return 32<=t&&t<=126||161<=t&&t<=55295&&8232!==t&&8233!==t||57344<=t&&t<=65533&&t!==jo||65536<=t&&t<=1114111}function es(t){return ts(t)&&t!==jo&&13!==t&&10!==t}function rs(t,e,r){var i=es(t),a=i&&!Jo(t);return(r?i:i&&44!==t&&91!==t&&93!==t&&123!==t&&125!==t)&&35!==t&&!(58===e&&!a)||es(e)&&!Jo(e)&&35===t||58===e&&a}function is(t){return ts(t)&&t!==jo&&!Jo(t)&&45!==t&&63!==t&&58!==t&&44!==t&&91!==t&&93!==t&&123!==t&&125!==t&&35!==t&&38!==t&&42!==t&&33!==t&&124!==t&&61!==t&&62!==t&&39!==t&&34!==t&&37!==t&&64!==t&&96!==t}function as(t){return!Jo(t)&&58!==t}function ns(t,e){var r,i=t.charCodeAt(e);return i>=55296&&i<=56319&&e+1<t.length&&(r=t.charCodeAt(e+1))>=56320&&r<=57343?1024*(i-55296)+r-56320+65536:i}function os(t){return/^\n* /.test(t)}Cr(Zo,"State"),Cr(Xo,"indentString"),Cr(Qo,"generateNextLine"),Cr(Ko,"testImplicitResolving"),Cr(Jo,"isWhitespace"),Cr(ts,"isPrintable"),Cr(es,"isNsCharOrWhitespace"),Cr(rs,"isPlainSafe"),Cr(is,"isPlainSafeFirst"),Cr(as,"isPlainSafeLast"),Cr(ns,"codePointAt"),Cr(os,"needIndentIndicator");function ss(t,e,r,i,a,n,o,s){var l,h=0,c=null,d=!1,u=!1,p=-1!==i,g=-1,f=is(ns(t,0))&&as(ns(t,t.length-1));if(e||o)for(l=0;l<t.length;h>=65536?l+=2:l++){if(!ts(h=ns(t,l)))return 5;f=f&&rs(h,c,s),c=h}else{for(l=0;l<t.length;h>=65536?l+=2:l++){if(10===(h=ns(t,l)))d=!0,p&&(u=u||l-g-1>i&&" "!==t[g+1],g=l);else if(!ts(h))return 5;f=f&&rs(h,c,s),c=h}u=u||p&&l-g-1>i&&" "!==t[g+1]}return d||u?r>9&&os(t)?5:o?2===n?5:2:u?4:3:!f||o||a(t)?2===n?5:2:1}function ls(t,e,r,i,a){t.dump=function(){if(0===e.length)return 2===t.quotingType?'""':"''";if(!t.noCompatMode&&(-1!==Uo.indexOf(e)||Yo.test(e)))return 2===t.quotingType?'"'+e+'"':"'"+e+"'";var n=t.indent*Math.max(1,r),o=-1===t.lineWidth?-1:Math.max(Math.min(t.lineWidth,40),t.lineWidth-n),s=i||t.flowLevel>-1&&r>=t.flowLevel;function l(e){return Ko(t,e)}switch(Cr(l,"testAmbiguity"),ss(e,s,t.indent,o,l,t.quotingType,t.forceQuotes&&!i,a)){case 1:return e;case 2:return"'"+e.replace(/'/g,"''")+"'";case 3:return"|"+hs(e,t.indent)+cs(Xo(e,n));case 4:return">"+hs(e,t.indent)+cs(Xo(ds(e,o),n));case 5:return'"'+ps(e)+'"';default:throw new Da("impossible error: invalid scalar style")}}()}function hs(t,e){var r=os(t)?String(e):"",i="\n"===t[t.length-1];return r+(i&&("\n"===t[t.length-2]||"\n"===t)?"+":i?"":"-")+"\n"}function cs(t){return"\n"===t[t.length-1]?t.slice(0,-1):t}function ds(t,e){for(var r,i,a,n=/(\n+)([^\n]*)/g,o=(r=-1!==(r=t.indexOf("\n"))?r:t.length,n.lastIndex=r,us(t.slice(0,r),e)),s="\n"===t[0]||" "===t[0];a=n.exec(t);){var l=a[1],h=a[2];i=" "===h[0],o+=l+(s||i||""===h?"":"\n")+us(h,e),s=i}return o}function us(t,e){if(""===t||" "===t[0])return t;for(var r,i,a=/ [^ ]/g,n=0,o=0,s=0,l="";r=a.exec(t);)(s=r.index)-n>e&&(i=o>n?o:s,l+="\n"+t.slice(n,i),n=i+1),o=s;return l+="\n",t.length-n>e&&o>n?l+=t.slice(n,o)+"\n"+t.slice(o+1):l+=t.slice(n),l.slice(1)}function ps(t){for(var e,r="",i=0,a=0;a<t.length;i>=65536?a+=2:a++)i=ns(t,a),!(e=Ho[i])&&ts(i)?(r+=t[a],i>=65536&&(r+=t[a+1])):r+=e||Go(i);return r}function gs(t,e,r){var i,a,n,o="",s=t.tag;for(i=0,a=r.length;i<a;i+=1)n=r[i],t.replacer&&(n=t.replacer.call(r,String(i),n)),(bs(t,e,n,!1,!1)||void 0===n&&bs(t,e,null,!1,!1))&&(""!==o&&(o+=","+(t.condenseFlow?"":" ")),o+=t.dump);t.tag=s,t.dump="["+o+"]"}function fs(t,e,r,i){var a,n,o,s="",l=t.tag;for(a=0,n=r.length;a<n;a+=1)o=r[a],t.replacer&&(o=t.replacer.call(r,String(a),o)),(bs(t,e+1,o,!0,!0,!1,!0)||void 0===o&&bs(t,e+1,null,!0,!0,!1,!0))&&(i&&""===s||(s+=Qo(t,e)),t.dump&&10===t.dump.charCodeAt(0)?s+="-":s+="- ",s+=t.dump);t.tag=l,t.dump=s||"[]"}function ys(t,e,r){var i,a,n,o,s,l="",h=t.tag,c=Object.keys(r);for(i=0,a=c.length;i<a;i+=1)s="",""!==l&&(s+=", "),t.condenseFlow&&(s+='"'),o=r[n=c[i]],t.replacer&&(o=t.replacer.call(r,n,o)),bs(t,e,n,!1,!1)&&(t.dump.length>1024&&(s+="? "),s+=t.dump+(t.condenseFlow?'"':"")+":"+(t.condenseFlow?"":" "),bs(t,e,o,!1,!1)&&(l+=s+=t.dump));t.tag=h,t.dump="{"+l+"}"}function ms(t,e,r,i){var a,n,o,s,l,h,c="",d=t.tag,u=Object.keys(r);if(!0===t.sortKeys)u.sort();else if("function"==typeof t.sortKeys)u.sort(t.sortKeys);else if(t.sortKeys)throw new Da("sortKeys must be a boolean or a function");for(a=0,n=u.length;a<n;a+=1)h="",i&&""===c||(h+=Qo(t,e)),s=r[o=u[a]],t.replacer&&(s=t.replacer.call(r,o,s)),bs(t,e+1,o,!0,!0,!0)&&((l=null!==t.tag&&"?"!==t.tag||t.dump&&t.dump.length>1024)&&(t.dump&&10===t.dump.charCodeAt(0)?h+="?":h+="? "),h+=t.dump,l&&(h+=Qo(t,e)),bs(t,e+1,s,!0,l)&&(t.dump&&10===t.dump.charCodeAt(0)?h+=":":h+=": ",c+=h+=t.dump));t.tag=d,t.dump=c||"{}"}function xs(t,e,r){var i,a,n,o,s,l;for(n=0,o=(a=r?t.explicitTypes:t.implicitTypes).length;n<o;n+=1)if(((s=a[n]).instanceOf||s.predicate)&&(!s.instanceOf||"object"==typeof e&&e instanceof s.instanceOf)&&(!s.predicate||s.predicate(e))){if(r?s.multi&&s.representName?t.tag=s.representName(e):t.tag=s.tag:t.tag="?",s.represent){if(l=t.styleMap[s.tag]||s.defaultStyle,"[object Function]"===Wo.call(s.represent))i=s.represent(e,l);else{if(!No.call(s.represent,l))throw new Da("!<"+s.tag+'> tag resolver accepts not "'+l+'" style');i=s.represent[l](e,l)}t.dump=i}return!0}return!1}function bs(t,e,r,i,a,n,o){t.tag=null,t.dump=r,xs(t,r,!1)||xs(t,r,!0);var s,l=Wo.call(t.dump),h=i;i&&(i=t.flowLevel<0||t.flowLevel>e);var c,d,u="[object Object]"===l||"[object Array]"===l;if(u&&(d=-1!==(c=t.duplicates.indexOf(r))),(null!==t.tag&&"?"!==t.tag||d||2!==t.indent&&e>0)&&(a=!1),d&&t.usedDuplicates[c])t.dump="*ref_"+c;else{if(u&&d&&!t.usedDuplicates[c]&&(t.usedDuplicates[c]=!0),"[object Object]"===l)i&&0!==Object.keys(t.dump).length?(ms(t,e,t.dump,a),d&&(t.dump="&ref_"+c+t.dump)):(ys(t,e,t.dump),d&&(t.dump="&ref_"+c+" "+t.dump));else if("[object Array]"===l)i&&0!==t.dump.length?(t.noArrayIndent&&!o&&e>0?fs(t,e-1,t.dump,a):fs(t,e,t.dump,a),d&&(t.dump="&ref_"+c+t.dump)):(gs(t,e,t.dump),d&&(t.dump="&ref_"+c+" "+t.dump));else{if("[object String]"!==l){if("[object Undefined]"===l)return!1;if(t.skipInvalid)return!1;throw new Da("unacceptable kind of an object to dump "+l)}"?"!==t.tag&&ls(t,t.dump,e,n,h)}null!==t.tag&&"?"!==t.tag&&(s=encodeURI("!"===t.tag[0]?t.tag.slice(1):t.tag).replace(/!/g,"%21"),s="!"===t.tag[0]?"!"+s:"tag:yaml.org,2002:"===s.slice(0,18)?"!!"+s.slice(18):"!<"+s+">",t.dump=s+" "+t.dump)}return!0}function Cs(t,e){var r,i,a=[],n=[];for(ks(t,a,n),r=0,i=n.length;r<i;r+=1)e.duplicates.push(a[n[r]]);e.usedDuplicates=new Array(i)}function ks(t,e,r){var i,a,n;if(null!==t&&"object"==typeof t)if(-1!==(a=e.indexOf(t)))-1===r.indexOf(a)&&r.push(a);else if(e.push(t),Array.isArray(t))for(a=0,n=t.length;a<n;a+=1)ks(t[a],e,r);else for(a=0,n=(i=Object.keys(t)).length;a<n;a+=1)ks(t[i[a]],e,r)}Cr(ss,"chooseScalarStyle"),Cr(ls,"writeScalar"),Cr(hs,"blockHeader"),Cr(cs,"dropEndingNewline"),Cr(ds,"foldString"),Cr(us,"foldLine"),Cr(ps,"escapeString"),Cr(gs,"writeFlowSequence"),Cr(fs,"writeBlockSequence"),Cr(ys,"writeFlowMapping"),Cr(ms,"writeBlockMapping"),Cr(xs,"detectType"),Cr(bs,"writeNode"),Cr(Cs,"getDuplicateReferences"),Cr(ks,"inspectNode"),Cr((function(t,e){var r=new Zo(e=e||{});r.noRefs||Cs(t,r);var i=t;return r.replacer&&(i=r.replacer.call({"":i},"",i)),bs(r,0,i,!0,!0)?r.dump+"\n":""}),"dump$1"),Cr((function(t,e){return function(){throw new Error("Function yaml."+t+" is removed in js-yaml 4. Use yaml."+e+" instead, which is now safe by default.")}}),"renamed");var ws=mn,Ss=zo.load;
3
3
  /*! Bundled license information:
4
4
 
5
5
  js-yaml/dist/js-yaml.mjs:
6
6
  (*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT *)
7
7
  */
8
- const Ts=Object.freeze({left:0,top:0,width:16,height:16}),vs=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),Bs=Object.freeze({...Ts,...vs}),_s=Object.freeze({...Bs,body:"",hidden:!1}),Ls=Object.freeze({width:null,height:null}),Ms=Object.freeze({...Ls,...vs}),Fs=/^[a-z0-9]+(-[a-z0-9]+)*$/,As=(t,e)=>!!t&&!(""!==t.provider&&!t.provider.match(Fs)||!(e&&""===t.prefix||t.prefix.match(Fs))||!t.name.match(Fs));function $s(t,e){const r=function(t,e){const r={};!t.hFlip!=!e.hFlip&&(r.hFlip=!0),!t.vFlip!=!e.vFlip&&(r.vFlip=!0);const i=((t.rotate||0)+(e.rotate||0))%4;return i&&(r.rotate=i),r}(t,e);for(const i in _s)i in vs?i in t&&!(i in r)&&(r[i]=vs[i]):i in e?r[i]=e[i]:i in t&&(r[i]=t[i]);return r}function Es(t,e,r){const i=t.icons,a=t.aliases||Object.create(null);let n={};function o(t){n=$s(i[t]||a[t],n)}return o(e),r.forEach(o),$s(t,n)}function Ds(t,e){if(t.icons[e])return Es(t,e,[]);const r=function(t,e){const r=t.icons,i=t.aliases||Object.create(null),a=Object.create(null);return(e||Object.keys(r).concat(Object.keys(i))).forEach((function t(e){if(r[e])return a[e]=[];if(!(e in a)){a[e]=null;const r=i[e]&&i[e].parent,n=r&&t(r);n&&(a[e]=[r].concat(n))}return a[e]})),a}(t,[e])[e];return r?Es(t,e,r):null}const Is=/(-?[0-9.]*[0-9]+[0-9.]*)/g,Os=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function Ps(t,e,r){if(1===e)return t;if(r=r||100,"number"==typeof t)return Math.ceil(t*e*r)/r;if("string"!=typeof t)return t;const i=t.split(Is);if(null===i||!i.length)return t;const a=[];let n=i.shift(),o=Os.test(n);for(;;){if(o){const t=parseFloat(n);isNaN(t)?a.push(n):a.push(Math.ceil(t*e*r)/r)}else a.push(n);if(n=i.shift(),void 0===n)return a.join("");o=!o}}const Rs=/\sid="(\S+)"/g,qs="IconifyId"+Date.now().toString(16)+(16777216*Math.random()|0).toString(16);let zs=0;var Ws={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},Ns=new Map,js=new Map,Hs=Cr((t=>{for(const e of t){if(!e.name)throw new Error('Invalid icon loader. Must have a "name" property with non-empty string value.');if(Sr.debug("Registering icon pack:",e.name),"loader"in e)js.set(e.name,e.loader);else{if(!("icons"in e))throw Sr.error("Invalid icon loader:",e),new Error('Invalid icon loader. Must have either "icons" or "loader" property.');Ns.set(e.name,e.icons)}}}),"registerIconPacks"),Us=Cr((async(t,e)=>{const r=((t,e,r,i="")=>{const a=t.split(":");if("@"===t.slice(0,1)){if(a.length<2||a.length>3)return null;i=a.shift().slice(1)}if(a.length>3||!a.length)return null;if(a.length>1){const t=a.pop(),e=a.pop(),r={provider:a.length>0?a[0]:i,prefix:e,name:t};return As(r)?r:null}const n=a[0],o=n.split("-");if(o.length>1){const t={provider:i,prefix:o.shift(),name:o.join("-")};return As(t)?t:null}if(r&&""===i){const t={provider:i,prefix:"",name:n};return As(t,r)?t:null}return null})(t,0,void 0!==e);if(!r)throw new Error(`Invalid icon name: ${t}`);const i=r.prefix||e;if(!i)throw new Error(`Icon name must contain a prefix: ${t}`);let a=Ns.get(i);if(!a){const t=js.get(i);if(!t)throw new Error(`Icon set not found: ${r.prefix}`);try{a={...await t(),prefix:i},Ns.set(i,a)}catch(o){throw Sr.error(o),new Error(`Failed to load icon set: ${r.prefix}`)}}const n=Ds(a,r.name);if(!n)throw new Error(`Icon not found: ${t}`);return n}),"getRegisteredIconData"),Ys=Cr((async(t,e)=>{let r;try{r=await Us(t,null==e?void 0:e.fallbackPrefix)}catch(a){Sr.error(a),r=Ws}const i=function(t,e){const r={...Bs,...t},i={...Ms,...e},a={left:r.left,top:r.top,width:r.width,height:r.height};let n=r.body;[r,i].forEach((t=>{const e=[],r=t.hFlip,i=t.vFlip;let o,s=t.rotate;switch(r?i?s+=2:(e.push("translate("+(a.width+a.left).toString()+" "+(0-a.top).toString()+")"),e.push("scale(-1 1)"),a.top=a.left=0):i&&(e.push("translate("+(0-a.left).toString()+" "+(a.height+a.top).toString()+")"),e.push("scale(1 -1)"),a.top=a.left=0),s<0&&(s-=4*Math.floor(s/4)),s%=4,s){case 1:o=a.height/2+a.top,e.unshift("rotate(90 "+o.toString()+" "+o.toString()+")");break;case 2:e.unshift("rotate(180 "+(a.width/2+a.left).toString()+" "+(a.height/2+a.top).toString()+")");break;case 3:o=a.width/2+a.left,e.unshift("rotate(-90 "+o.toString()+" "+o.toString()+")")}s%2==1&&(a.left!==a.top&&(o=a.left,a.left=a.top,a.top=o),a.width!==a.height&&(o=a.width,a.width=a.height,a.height=o)),e.length&&(n=function(t,e,r){const i=function(t,e="defs"){let r="";const i=t.indexOf("<"+e);for(;i>=0;){const a=t.indexOf(">",i),n=t.indexOf("</"+e);if(-1===a||-1===n)break;const o=t.indexOf(">",n);if(-1===o)break;r+=t.slice(a+1,n).trim(),t=t.slice(0,i).trim()+t.slice(o+1)}return{defs:r,content:t}}(t);return a=i.defs,n=e+i.content+r,a?"<defs>"+a+"</defs>"+n:n;var a,n}(n,'<g transform="'+e.join(" ")+'">',"</g>"))}));const o=i.width,s=i.height,l=a.width,h=a.height;let c,d;null===o?(d=null===s?"1em":"auto"===s?h:s,c=Ps(d,l/h)):(c="auto"===o?l:o,d=null===s?Ps(c,h/l):"auto"===s?h:s);const u={},p=(t,e)=>{(t=>"unset"===t||"undefined"===t||"none"===t)(e)||(u[t]=e.toString())};p("width",c),p("height",d);const g=[a.left,a.top,l,h];return u.viewBox=g.join(" "),{attributes:u,viewBox:g,body:n}}(r,e);return function(t,e){let r=-1===t.indexOf("xlink:")?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const i in e)r+=" "+i+'="'+e[i]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+r+">"+t+"</svg>"}(function(t,e=qs){const r=[];let i;for(;i=Rs.exec(t);)r.push(i[1]);if(!r.length)return t;const a="suffix"+(16777216*Math.random()|Date.now()).toString(16);return r.forEach((r=>{const i="function"==typeof e?e(r):e+(zs++).toString(),n=r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");t=t.replace(new RegExp('([#;"])('+n+')([")]|\\.[a-z])',"g"),"$1"+i+a+"$3")})),t=t.replace(new RegExp(a,"g"),"")}(i.body),i.attributes)}),"getIconSVG"),Vs=Cr((({flowchart:t})=>{var e,r;const i=(null==(e=null==t?void 0:t.subGraphTitleMargin)?void 0:e.top)??0,a=(null==(r=null==t?void 0:t.subGraphTitleMargin)?void 0:r.bottom)??0;return{subGraphTitleTopMargin:i,subGraphTitleBottomMargin:a,subGraphTitleTotalMargin:i+a}}),"getSubGraphTitleMargins"),Gs={aggregation:18,extension:18,composition:18,dependency:6,lollipop:13.5,arrow_point:4};function Zs(t,e){if(void 0===t||void 0===e)return{angle:0,deltaX:0,deltaY:0};t=Xs(t),e=Xs(e);const[r,i]=[t.x,t.y],[a,n]=[e.x,e.y],o=a-r,s=n-i;return{angle:Math.atan(s/o),deltaX:o,deltaY:s}}Cr(Zs,"calculateDeltaAndAngle");var Xs=Cr((t=>Array.isArray(t)?{x:t[0],y:t[1]}:t),"pointTransformer"),Qs=Cr((t=>({x:Cr((function(e,r,i){let a=0;if(0===r&&Object.hasOwn(Gs,t.arrowTypeStart)){const{angle:e,deltaX:r}=Zs(i[0],i[1]);a=Gs[t.arrowTypeStart]*Math.cos(e)*(r>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(Gs,t.arrowTypeEnd)){const{angle:e,deltaX:r}=Zs(i[i.length-1],i[i.length-2]);a=Gs[t.arrowTypeEnd]*Math.cos(e)*(r>=0?1:-1)}return Xs(e).x+a}),"x"),y:Cr((function(e,r,i){let a=0;if(0===r&&Object.hasOwn(Gs,t.arrowTypeStart)){const{angle:e,deltaY:r}=Zs(i[0],i[1]);a=Gs[t.arrowTypeStart]*Math.abs(Math.sin(e))*(r>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(Gs,t.arrowTypeEnd)){const{angle:e,deltaY:r}=Zs(i[i.length-1],i[i.length-2]);a=Gs[t.arrowTypeEnd]*Math.abs(Math.sin(e))*(r>=0?1:-1)}return Xs(e).y+a}),"y")})),"getLineFunctionsWithOffset"),Ks={},Js={};Object.defineProperty(Js,"__esModule",{value:!0}),Js.BLANK_URL=Js.relativeFirstCharacters=Js.whitespaceEscapeCharsRegex=Js.urlSchemeRegex=Js.ctrlCharactersRegex=Js.htmlCtrlEntityRegex=Js.htmlEntitiesRegex=Js.invalidProtocolRegex=void 0,Js.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,Js.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,Js.htmlCtrlEntityRegex=/&(newline|tab);/gi,Js.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,Js.urlSchemeRegex=/^.+(:|&colon;)/gim,Js.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,Js.relativeFirstCharacters=[".","/"],Js.BLANK_URL="about:blank",Object.defineProperty(Ks,"__esModule",{value:!0});var tl=Ks.sanitizeUrl=void 0,el=Js;function rl(t){try{return decodeURIComponent(t)}catch(e){return t}}tl=Ks.sanitizeUrl=function(t){if(!t)return el.BLANK_URL;var e,r,i=rl(t.trim());do{e=(i=rl(i=(r=i,r.replace(el.ctrlCharactersRegex,"").replace(el.htmlEntitiesRegex,(function(t,e){return String.fromCharCode(e)}))).replace(el.htmlCtrlEntityRegex,"").replace(el.ctrlCharactersRegex,"").replace(el.whitespaceEscapeCharsRegex,"").trim())).match(el.ctrlCharactersRegex)||i.match(el.htmlEntitiesRegex)||i.match(el.htmlCtrlEntityRegex)||i.match(el.whitespaceEscapeCharsRegex)}while(e&&e.length>0);var a=i;if(!a)return el.BLANK_URL;if(function(t){return el.relativeFirstCharacters.indexOf(t[0])>-1}(a))return a;var n=a.trimStart(),o=n.match(el.urlSchemeRegex);if(!o)return a;var s=o[0].toLowerCase().trim();if(el.invalidProtocolRegex.test(s))return el.BLANK_URL;var l=n.replace(/\\/g,"/");if("mailto:"===s||s.includes("://"))return l;if("http:"===s||"https:"===s){if(!function(t){return URL.canParse(t)}(l))return el.BLANK_URL;var h=new URL(l);return h.protocol=h.protocol.toLowerCase(),h.hostname=h.hostname.toLowerCase(),h.toString()}return l};var il="​",al={curveBasis:X,curveBasisClosed:Q,curveBasisOpen:K,curveBumpX:function(t){return new Ut(t,!0)},curveBumpY:function(t){return new Ut(t,!1)},curveBundle:J,curveCardinalClosed:tt,curveCardinalOpen:et,curveCardinal:rt,curveCatmullRomClosed:it,curveCatmullRomOpen:at,curveCatmullRom:nt,curveLinear:ot,curveLinearClosed:st,curveMonotoneX:lt,curveMonotoneY:ht,curveNatural:ct,curveStep:dt,curveStepAfter:ut,curveStepBefore:pt},nl=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,ol=Cr((function(t,e){const r=sl(t,/(?:init\b)|(?:initialize\b)/);let i={};if(Array.isArray(r)){const t=r.map((t=>t.args));ei(t),i=Or(i,[...t])}else i=r.args;if(!i)return;let a=Ar(t,e);const n="config";return void 0!==i[n]&&("flowchart-v2"===a&&(a="flowchart"),i[a]=i[n],delete i[n]),i}),"detectInit"),sl=Cr((function(t,e=null){var r,i;try{const a=new RegExp(`[%]{2}(?![{]${nl.source})(?=[}][%]{2}).*\n`,"ig");let n;t=t.trim().replace(a,"").replace(/'/gm,'"'),Sr.debug(`Detecting diagram directive${null!==e?" type:"+e:""} based on the text:${t}`);const o=[];for(;null!==(n=_r.exec(t));)if(n.index===_r.lastIndex&&_r.lastIndex++,n&&!e||e&&(null==(r=n[1])?void 0:r.match(e))||e&&(null==(i=n[2])?void 0:i.match(e))){const t=n[1]?n[1]:n[2],e=n[3]?n[3].trim():n[4]?JSON.parse(n[4].trim()):null;o.push({type:t,args:e})}return 0===o.length?{type:t,args:null}:1===o.length?o[0]:o}catch(a){return Sr.error(`ERROR: ${a.message} - Unable to parse directive type: '${e}' based on the text: '${t}'`),{type:void 0,args:null}}}),"detectDirective"),ll=Cr((function(t){return t.replace(_r,"")}),"removeDirectives"),hl=Cr((function(t,e){for(const[r,i]of e.entries())if(i.match(t))return r;return-1}),"isSubstringInArray");function cl(t,e){if(!t)return e;const r=`curve${t.charAt(0).toUpperCase()+t.slice(1)}`;return al[r]??e}function dl(t,e){const r=t.trim();if(r)return"loose"!==e.securityLevel?tl(r):r}Cr(cl,"interpolateToCurve"),Cr(dl,"formatUrl");var ul=Cr(((t,...e)=>{const r=t.split("."),i=r.length-1,a=r[i];let n=window;for(let o=0;o<i;o++)if(n=n[r[o]],!n)return void Sr.error(`Function name: ${t} not found in window`);n[a](...e)}),"runFunc");function pl(t,e){return t&&e?Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2)):0}function gl(t){let e,r=0;t.forEach((t=>{r+=pl(t,e),e=t}));return ml(t,r/2)}function fl(t){return 1===t.length?t[0]:gl(t)}Cr(pl,"distance"),Cr(gl,"traverseEdge"),Cr(fl,"calcLabelPosition");var yl=Cr(((t,e=2)=>{const r=Math.pow(10,e);return Math.round(t*r)/r}),"roundNumber"),ml=Cr(((t,e)=>{let r,i=e;for(const a of t){if(r){const t=pl(a,r);if(t<i)i-=t;else{const e=i/t;if(e<=0)return r;if(e>=1)return{x:a.x,y:a.y};if(e>0&&e<1)return{x:yl((1-e)*r.x+e*a.x,5),y:yl((1-e)*r.y+e*a.y,5)}}}r=a}throw new Error("Could not find a suitable point for the given distance")}),"calculatePoint"),xl=Cr(((t,e,r)=>{Sr.info(`our points ${JSON.stringify(e)}`),e[0]!==r&&(e=e.reverse());const i=ml(e,25),a=t?10:5,n=Math.atan2(e[0].y-i.y,e[0].x-i.x),o={x:0,y:0};return o.x=Math.sin(n)*a+(e[0].x+i.x)/2,o.y=-Math.cos(n)*a+(e[0].y+i.y)/2,o}),"calcCardinalityPosition");function bl(t,e,r){const i=structuredClone(r);Sr.info("our points",i),"start_left"!==e&&"start_right"!==e&&i.reverse();const a=ml(i,25+t),n=10+.5*t,o=Math.atan2(i[0].y-a.y,i[0].x-a.x),s={x:0,y:0};return"start_left"===e?(s.x=Math.sin(o+Math.PI)*n+(i[0].x+a.x)/2,s.y=-Math.cos(o+Math.PI)*n+(i[0].y+a.y)/2):"end_right"===e?(s.x=Math.sin(o-Math.PI)*n+(i[0].x+a.x)/2-5,s.y=-Math.cos(o-Math.PI)*n+(i[0].y+a.y)/2-5):"end_left"===e?(s.x=Math.sin(o)*n+(i[0].x+a.x)/2-5,s.y=-Math.cos(o)*n+(i[0].y+a.y)/2-5):(s.x=Math.sin(o)*n+(i[0].x+a.x)/2,s.y=-Math.cos(o)*n+(i[0].y+a.y)/2),s}function Cl(t){let e="",r="";for(const i of t)void 0!==i&&(i.startsWith("color:")||i.startsWith("text-align:")?r=r+i+";":e=e+i+";");return{style:e,labelStyle:r}}Cr(bl,"calcTerminalLabelPosition"),Cr(Cl,"getStylesFromArray");var kl=0,wl=Cr((()=>(kl++,"id-"+Math.random().toString(36).substr(2,12)+"-"+kl)),"generateId");function Sl(t){let e="";const r="0123456789abcdef";for(let i=0;i<t;i++)e+=r.charAt(Math.floor(16*Math.random()));return e}Cr(Sl,"makeRandomHex");var Tl=Cr((t=>Sl(t.length)),"random"),vl=Cr((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"),Bl=Cr((function(t,e){const r=e.text.replace(Yi.lineBreakRegex," "),[,i]=Pl(e.fontSize),a=t.append("text");a.attr("x",e.x),a.attr("y",e.y),a.style("text-anchor",e.anchor),a.style("font-family",e.fontFamily),a.style("font-size",i),a.style("font-weight",e.fontWeight),a.attr("fill",e.fill),void 0!==e.class&&a.attr("class",e.class);const n=a.append("tspan");return n.attr("x",e.x+2*e.textMargin),n.attr("fill",e.fill),n.text(r),a}),"drawSimpleText"),_l=W(((t,e,r)=>{if(!t)return t;if(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},r),Yi.lineBreakRegex.test(t))return t;const i=t.split(" ").filter(Boolean),a=[];let n="";return i.forEach(((t,o)=>{const s=Fl(`${t} `,r),l=Fl(n,r);if(s>e){const{hyphenatedStrings:i,remainingWord:o}=Ll(t,e,"-",r);a.push(n,...i),n=o}else l+s>=e?(a.push(n),n=t):n=[n,t].filter(Boolean).join(" ");o+1===i.length&&a.push(n)})),a.filter((t=>""!==t)).join(r.joinWith)}),((t,e,r)=>`${t}${e}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`)),Ll=W(((t,e,r="-",i)=>{i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},i);const a=[...t],n=[];let o="";return a.forEach(((t,s)=>{const l=`${o}${t}`;if(Fl(l,i)>=e){const t=s+1,e=a.length===t,i=`${l}${r}`;n.push(e?l:i),o=""}else o=l})),{hyphenatedStrings:n,remainingWord:o}}),((t,e,r="-",i)=>`${t}${e}${r}${i.fontSize}${i.fontWeight}${i.fontFamily}`));function Ml(t,e){return $l(t,e).height}function Fl(t,e){return $l(t,e).width}Cr(Ml,"calculateTextHeight"),Cr(Fl,"calculateTextWidth");var Al,$l=W(((t,e)=>{const{fontSize:r=12,fontFamily:i="Arial",fontWeight:a=400}=e;if(!t)return{width:0,height:0};const[,n]=Pl(r),o=["sans-serif",i],s=t.split(Yi.lineBreakRegex),l=[],h=Z("body");if(!h.remove)return{width:0,height:0,lineHeight:0};const c=h.append("svg");for(const d of o){let t=0;const e={width:0,height:0,lineHeight:0};for(const r of s){const i=vl();i.text=r||"​";const o=Bl(c,i).style("font-size",n).style("font-weight",a).style("font-family",d),s=(o._groups||o)[0][0].getBBox();if(0===s.width&&0===s.height)throw new Error("svg element not in render tree");e.width=Math.round(Math.max(e.width,s.width)),t=Math.round(s.height),e.height+=t,e.lineHeight=Math.round(Math.max(e.lineHeight,t))}l.push(e)}c.remove();return l[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]}),((t,e)=>`${t}${e.fontSize}${e.fontWeight}${e.fontFamily}`)),El=(Cr(s=class{constructor(t=!1,e){this.count=0,this.count=e?e.length:0,this.next=t?()=>this.count++:()=>Date.now()}},"InitIDGenerator"),s),Dl=Cr((function(t){return Al=Al||document.createElement("div"),t=escape(t).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),Al.innerHTML=t,unescape(Al.textContent)}),"entityDecode");function Il(t){return"str"in t}Cr(Il,"isDetailedError");var Ol=Cr(((t,e,r,i)=>{var a;if(!i)return;const n=null==(a=t.node())?void 0:a.getBBox();n&&t.append("text").text(i).attr("x",n.x+n.width/2).attr("y",-r).attr("class",e)}),"insertTitle"),Pl=Cr((t=>{if("number"==typeof t)return[t,t+"px"];const e=parseInt(t??"",10);return Number.isNaN(e)?[void 0,void 0]:t===String(e)?[e,t+"px"]:[e,t]}),"parseFontSize");function Rl(t,e){return Ht({},t,e)}Cr(Rl,"cleanAndMerge");var ql={assignWithDepth:Or,wrapLabel:_l,calculateTextHeight:Ml,calculateTextWidth:Fl,calculateTextDimensions:$l,cleanAndMerge:Rl,detectInit:ol,detectDirective:sl,isSubstringInArray:hl,interpolateToCurve:cl,calcLabelPosition:fl,calcCardinalityPosition:xl,calcTerminalLabelPosition:bl,formatUrl:dl,getStylesFromArray:Cl,generateId:wl,random:Tl,runFunc:ul,entityDecode:Dl,insertTitle:Ol,parseFontSize:Pl,InitIDGenerator:El},zl=Cr((function(t){let e=t;return e=e.replace(/style.*:\S*#.*;/g,(function(t){return t.substring(0,t.length-1)})),e=e.replace(/classDef.*:\S*#.*;/g,(function(t){return t.substring(0,t.length-1)})),e=e.replace(/#\w+;/g,(function(t){const e=t.substring(1,t.length-1);return/^\+?\d+$/.test(e)?"fl°°"+e+"¶ß":"fl°"+e+"¶ß"})),e}),"encodeEntities"),Wl=Cr((function(t){return t.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")}),"decodeEntities"),Nl=Cr(((t,e,{counter:r=0,prefix:i,suffix:a})=>`${i?`${i}_`:""}${t}_${e}_${r}${a?`_${a}`:""}`),"getEdgeId");function jl(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}let Hl={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};function Ul(t){Hl=t}const Yl=/[&<>"']/,Vl=new RegExp(Yl.source,"g"),Gl=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,Zl=new RegExp(Gl.source,"g"),Xl={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Ql=t=>Xl[t];function Kl(t,e){if(e){if(Yl.test(t))return t.replace(Vl,Ql)}else if(Gl.test(t))return t.replace(Zl,Ql);return t}const Jl=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;const th=/(^|[^\[])\^/g;function eh(t,e){let r="string"==typeof t?t:t.source;e=e||"";const i={replace:(t,e)=>{let a="string"==typeof e?e:e.source;return a=a.replace(th,"$1"),r=r.replace(t,a),i},getRegex:()=>new RegExp(r,e)};return i}function rh(t){try{t=encodeURI(t).replace(/%25/g,"%")}catch{return null}return t}const ih={exec:()=>null};function ah(t,e){const r=t.replace(/\|/g,((t,e,r)=>{let i=!1,a=e;for(;--a>=0&&"\\"===r[a];)i=!i;return i?"|":" |"})).split(/ \|/);let i=0;if(r[0].trim()||r.shift(),r.length>0&&!r[r.length-1].trim()&&r.pop(),e)if(r.length>e)r.splice(e);else for(;r.length<e;)r.push("");for(;i<r.length;i++)r[i]=r[i].trim().replace(/\\\|/g,"|");return r}function nh(t,e,r){const i=t.length;if(0===i)return"";let a=0;for(;a<i;){const n=t.charAt(i-a-1);if(n!==e||r){if(n===e||!r)break;a++}else a++}return t.slice(0,i-a)}function oh(t,e,r,i){const a=e.href,n=e.title?Kl(e.title):null,o=t[1].replace(/\\([\[\]])/g,"$1");if("!"!==t[0].charAt(0)){i.state.inLink=!0;const t={type:"link",raw:r,href:a,title:n,text:o,tokens:i.inlineTokens(o)};return i.state.inLink=!1,t}return{type:"image",raw:r,href:a,title:n,text:Kl(o)}}class sh{constructor(t){f(this,"options"),f(this,"rules"),f(this,"lexer"),this.options=t||Hl}space(t){const e=this.rules.block.newline.exec(t);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(t){const e=this.rules.block.code.exec(t);if(e){const t=e[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?t:nh(t,"\n")}}}fences(t){const e=this.rules.block.fences.exec(t);if(e){const t=e[0],r=function(t,e){const r=t.match(/^(\s+)(?:```)/);if(null===r)return e;const i=r[1];return e.split("\n").map((t=>{const e=t.match(/^\s+/);if(null===e)return t;const[r]=e;return r.length>=i.length?t.slice(i.length):t})).join("\n")}(t,e[3]||"");return{type:"code",raw:t,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:r}}}heading(t){const e=this.rules.block.heading.exec(t);if(e){let t=e[2].trim();if(/#$/.test(t)){const e=nh(t,"#");this.options.pedantic?t=e.trim():e&&!/ $/.test(e)||(t=e.trim())}return{type:"heading",raw:e[0],depth:e[1].length,text:t,tokens:this.lexer.inline(t)}}}hr(t){const e=this.rules.block.hr.exec(t);if(e)return{type:"hr",raw:nh(e[0],"\n")}}blockquote(t){const e=this.rules.block.blockquote.exec(t);if(e){let t=nh(e[0],"\n").split("\n"),r="",i="";const a=[];for(;t.length>0;){let e=!1;const n=[];let o;for(o=0;o<t.length;o++)if(/^ {0,3}>/.test(t[o]))n.push(t[o]),e=!0;else{if(e)break;n.push(t[o])}t=t.slice(o);const s=n.join("\n"),l=s.replace(/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,"\n $1").replace(/^ {0,3}>[ \t]?/gm,"");r=r?`${r}\n${s}`:s,i=i?`${i}\n${l}`:l;const h=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(l,a,!0),this.lexer.state.top=h,0===t.length)break;const c=a[a.length-1];if("code"===(null==c?void 0:c.type))break;if("blockquote"===(null==c?void 0:c.type)){const e=c,n=e.raw+"\n"+t.join("\n"),o=this.blockquote(n);a[a.length-1]=o,r=r.substring(0,r.length-e.raw.length)+o.raw,i=i.substring(0,i.length-e.text.length)+o.text;break}if("list"!==(null==c?void 0:c.type));else{const e=c,n=e.raw+"\n"+t.join("\n"),o=this.list(n);a[a.length-1]=o,r=r.substring(0,r.length-c.raw.length)+o.raw,i=i.substring(0,i.length-e.raw.length)+o.raw,t=n.substring(a[a.length-1].raw.length).split("\n")}}return{type:"blockquote",raw:r,tokens:a,text:i}}}list(t){let e=this.rules.block.list.exec(t);if(e){let r=e[1].trim();const i=r.length>1,a={type:"list",raw:"",ordered:i,start:i?+r.slice(0,-1):"",loose:!1,items:[]};r=i?`\\d{1,9}\\${r.slice(-1)}`:`\\${r}`,this.options.pedantic&&(r=i?r:"[*+-]");const n=new RegExp(`^( {0,3}${r})((?:[\t ][^\\n]*)?(?:\\n|$))`);let o=!1;for(;t;){let r=!1,i="",s="";if(!(e=n.exec(t)))break;if(this.rules.block.hr.test(t))break;i=e[0],t=t.substring(i.length);let l=e[2].split("\n",1)[0].replace(/^\t+/,(t=>" ".repeat(3*t.length))),h=t.split("\n",1)[0],c=!l.trim(),d=0;if(this.options.pedantic?(d=2,s=l.trimStart()):c?d=e[1].length+1:(d=e[2].search(/[^ ]/),d=d>4?1:d,s=l.slice(d),d+=e[1].length),c&&/^ *$/.test(h)&&(i+=h+"\n",t=t.substring(h.length+1),r=!0),!r){const e=new RegExp(`^ {0,${Math.min(3,d-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ \t][^\\n]*)?(?:\\n|$))`),r=new RegExp(`^ {0,${Math.min(3,d-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),a=new RegExp(`^ {0,${Math.min(3,d-1)}}(?:\`\`\`|~~~)`),n=new RegExp(`^ {0,${Math.min(3,d-1)}}#`);for(;t;){const o=t.split("\n",1)[0];if(h=o,this.options.pedantic&&(h=h.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),a.test(h))break;if(n.test(h))break;if(e.test(h))break;if(r.test(t))break;if(h.search(/[^ ]/)>=d||!h.trim())s+="\n"+h.slice(d);else{if(c)break;if(l.search(/[^ ]/)>=4)break;if(a.test(l))break;if(n.test(l))break;if(r.test(l))break;s+="\n"+h}c||h.trim()||(c=!0),i+=o+"\n",t=t.substring(o.length+1),l=h.slice(d)}}a.loose||(o?a.loose=!0:/\n *\n *$/.test(i)&&(o=!0));let u,p=null;this.options.gfm&&(p=/^\[[ xX]\] /.exec(s),p&&(u="[ ] "!==p[0],s=s.replace(/^\[[ xX]\] +/,""))),a.items.push({type:"list_item",raw:i,task:!!p,checked:u,loose:!1,text:s,tokens:[]}),a.raw+=i}a.items[a.items.length-1].raw=a.items[a.items.length-1].raw.trimEnd(),a.items[a.items.length-1].text=a.items[a.items.length-1].text.trimEnd(),a.raw=a.raw.trimEnd();for(let t=0;t<a.items.length;t++)if(this.lexer.state.top=!1,a.items[t].tokens=this.lexer.blockTokens(a.items[t].text,[]),!a.loose){const e=a.items[t].tokens.filter((t=>"space"===t.type)),r=e.length>0&&e.some((t=>/\n.*\n/.test(t.raw)));a.loose=r}if(a.loose)for(let t=0;t<a.items.length;t++)a.items[t].loose=!0;return a}}html(t){const e=this.rules.block.html.exec(t);if(e){return{type:"html",block:!0,raw:e[0],pre:"pre"===e[1]||"script"===e[1]||"style"===e[1],text:e[0]}}}def(t){const e=this.rules.block.def.exec(t);if(e){const t=e[1].toLowerCase().replace(/\s+/g," "),r=e[2]?e[2].replace(/^<(.*)>$/,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",i=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:t,raw:e[0],href:r,title:i}}}table(t){const e=this.rules.block.table.exec(t);if(!e)return;if(!/[:|]/.test(e[2]))return;const r=ah(e[1]),i=e[2].replace(/^\||\| *$/g,"").split("|"),a=e[3]&&e[3].trim()?e[3].replace(/\n[ \t]*$/,"").split("\n"):[],n={type:"table",raw:e[0],header:[],align:[],rows:[]};if(r.length===i.length){for(const t of i)/^ *-+: *$/.test(t)?n.align.push("right"):/^ *:-+: *$/.test(t)?n.align.push("center"):/^ *:-+ *$/.test(t)?n.align.push("left"):n.align.push(null);for(let t=0;t<r.length;t++)n.header.push({text:r[t],tokens:this.lexer.inline(r[t]),header:!0,align:n.align[t]});for(const t of a)n.rows.push(ah(t,n.header.length).map(((t,e)=>({text:t,tokens:this.lexer.inline(t),header:!1,align:n.align[e]}))));return n}}lheading(t){const e=this.rules.block.lheading.exec(t);if(e)return{type:"heading",raw:e[0],depth:"="===e[2].charAt(0)?1:2,text:e[1],tokens:this.lexer.inline(e[1])}}paragraph(t){const e=this.rules.block.paragraph.exec(t);if(e){const t="\n"===e[1].charAt(e[1].length-1)?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:t,tokens:this.lexer.inline(t)}}}text(t){const e=this.rules.block.text.exec(t);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(t){const e=this.rules.inline.escape.exec(t);if(e)return{type:"escape",raw:e[0],text:Kl(e[1])}}tag(t){const e=this.rules.inline.tag.exec(t);if(e)return!this.lexer.state.inLink&&/^<a /i.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&/^<\/a>/i.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(t){const e=this.rules.inline.link.exec(t);if(e){const t=e[2].trim();if(!this.options.pedantic&&/^</.test(t)){if(!/>$/.test(t))return;const e=nh(t.slice(0,-1),"\\");if((t.length-e.length)%2==0)return}else{const t=function(t,e){if(-1===t.indexOf(e[1]))return-1;let r=0;for(let i=0;i<t.length;i++)if("\\"===t[i])i++;else if(t[i]===e[0])r++;else if(t[i]===e[1]&&(r--,r<0))return i;return-1}(e[2],"()");if(t>-1){const r=(0===e[0].indexOf("!")?5:4)+e[1].length+t;e[2]=e[2].substring(0,t),e[0]=e[0].substring(0,r).trim(),e[3]=""}}let r=e[2],i="";if(this.options.pedantic){const t=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(r);t&&(r=t[1],i=t[3])}else i=e[3]?e[3].slice(1,-1):"";return r=r.trim(),/^</.test(r)&&(r=this.options.pedantic&&!/>$/.test(t)?r.slice(1):r.slice(1,-1)),oh(e,{href:r?r.replace(this.rules.inline.anyPunctuation,"$1"):r,title:i?i.replace(this.rules.inline.anyPunctuation,"$1"):i},e[0],this.lexer)}}reflink(t,e){let r;if((r=this.rules.inline.reflink.exec(t))||(r=this.rules.inline.nolink.exec(t))){const t=e[(r[2]||r[1]).replace(/\s+/g," ").toLowerCase()];if(!t){const t=r[0].charAt(0);return{type:"text",raw:t,text:t}}return oh(r,t,r[0],this.lexer)}}emStrong(t,e,r=""){let i=this.rules.inline.emStrongLDelim.exec(t);if(!i)return;if(i[3]&&r.match(/[\p{L}\p{N}]/u))return;if(!(i[1]||i[2]||"")||!r||this.rules.inline.punctuation.exec(r)){const r=[...i[0]].length-1;let a,n,o=r,s=0;const l="*"===i[0][0]?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(l.lastIndex=0,e=e.slice(-1*t.length+r);null!=(i=l.exec(e));){if(a=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!a)continue;if(n=[...a].length,i[3]||i[4]){o+=n;continue}if((i[5]||i[6])&&r%3&&!((r+n)%3)){s+=n;continue}if(o-=n,o>0)continue;n=Math.min(n,n+o+s);const e=[...i[0]][0].length,l=t.slice(0,r+i.index+e+n);if(Math.min(r,n)%2){const t=l.slice(1,-1);return{type:"em",raw:l,text:t,tokens:this.lexer.inlineTokens(t)}}const h=l.slice(2,-2);return{type:"strong",raw:l,text:h,tokens:this.lexer.inlineTokens(h)}}}}codespan(t){const e=this.rules.inline.code.exec(t);if(e){let t=e[2].replace(/\n/g," ");const r=/[^ ]/.test(t),i=/^ /.test(t)&&/ $/.test(t);return r&&i&&(t=t.substring(1,t.length-1)),t=Kl(t,!0),{type:"codespan",raw:e[0],text:t}}}br(t){const e=this.rules.inline.br.exec(t);if(e)return{type:"br",raw:e[0]}}del(t){const e=this.rules.inline.del.exec(t);if(e)return{type:"del",raw:e[0],text:e[2],tokens:this.lexer.inlineTokens(e[2])}}autolink(t){const e=this.rules.inline.autolink.exec(t);if(e){let t,r;return"@"===e[2]?(t=Kl(e[1]),r="mailto:"+t):(t=Kl(e[1]),r=t),{type:"link",raw:e[0],text:t,href:r,tokens:[{type:"text",raw:t,text:t}]}}}url(t){var e;let r;if(r=this.rules.inline.url.exec(t)){let t,i;if("@"===r[2])t=Kl(r[0]),i="mailto:"+t;else{let a;do{a=r[0],r[0]=(null==(e=this.rules.inline._backpedal.exec(r[0]))?void 0:e[0])??""}while(a!==r[0]);t=Kl(r[0]),i="www."===r[1]?"http://"+r[0]:r[0]}return{type:"link",raw:r[0],text:t,href:i,tokens:[{type:"text",raw:t,text:t}]}}}inlineText(t){const e=this.rules.inline.text.exec(t);if(e){let t;return t=this.lexer.state.inRawBlock?e[0]:Kl(e[0]),{type:"text",raw:e[0],text:t}}}}const lh=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,hh=/(?:[*+-]|\d{1,9}[.)])/,ch=eh(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,hh).replace(/blockCode/g,/ {4}/).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/).getRegex(),dh=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,uh=/(?!\s*\])(?:\\.|[^\[\]\\])+/,ph=eh(/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/).replace("label",uh).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),gh=eh(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,hh).getRegex(),fh="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",yh=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,mh=eh("^ {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",yh).replace("tag",fh).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),xh=eh(dh).replace("hr",lh).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",fh).getRegex(),bh={blockquote:eh(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",xh).getRegex(),code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,def:ph,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hr:lh,html:mh,lheading:ch,list:gh,newline:/^(?: *(?:\n|$))+/,paragraph:xh,table:ih,text:/^[^\n]+/},Ch=eh("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",lh).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\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",fh).getRegex(),kh={...bh,table:Ch,paragraph:eh(dh).replace("hr",lh).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Ch).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",fh).getRegex()},wh={...bh,html:eh("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",yh).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:ih,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:eh(dh).replace("hr",lh).replace("heading"," *#{1,6} *[^\n]").replace("lheading",ch).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Sh=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Th=/^( {2,}|\\)\n(?!\s*$)/,vh="\\p{P}\\p{S}",Bh=eh(/^((?![*_])[\spunctuation])/,"u").replace(/punctuation/g,vh).getRegex(),_h=eh(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,"u").replace(/punct/g,vh).getRegex(),Lh=eh("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])","gu").replace(/punct/g,vh).getRegex(),Mh=eh("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])","gu").replace(/punct/g,vh).getRegex(),Fh=eh(/\\([punct])/,"gu").replace(/punct/g,vh).getRegex(),Ah=eh(/^<(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(),$h=eh(yh).replace("(?:--\x3e|$)","--\x3e").getRegex(),Eh=eh("^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",$h).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Dh=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,Ih=eh(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",Dh).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Oh=eh(/^!?\[(label)\]\[(ref)\]/).replace("label",Dh).replace("ref",uh).getRegex(),Ph=eh(/^!?\[(ref)\](?:\[\])?/).replace("ref",uh).getRegex(),Rh={_backpedal:ih,anyPunctuation:Fh,autolink:Ah,blockSkip:/\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g,br:Th,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,del:ih,emStrongLDelim:_h,emStrongRDelimAst:Lh,emStrongRDelimUnd:Mh,escape:Sh,link:Ih,nolink:Ph,punctuation:Bh,reflink:Oh,reflinkSearch:eh("reflink|nolink(?!\\()","g").replace("reflink",Oh).replace("nolink",Ph).getRegex(),tag:Eh,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,url:ih},qh={...Rh,link:eh(/^!?\[(label)\]\((.*?)\)/).replace("label",Dh).getRegex(),reflink:eh(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Dh).getRegex()},zh={...Rh,escape:eh(Sh).replace("])","~|])").getRegex(),url:eh(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").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~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},Wh={...zh,br:eh(Th).replace("{2,}","*").getRegex(),text:eh(zh.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Nh={normal:bh,gfm:kh,pedantic:wh},jh={normal:Rh,gfm:zh,breaks:Wh,pedantic:qh};class Hh{constructor(t){f(this,"tokens"),f(this,"options"),f(this,"state"),f(this,"tokenizer"),f(this,"inlineQueue"),this.tokens=[],this.tokens.links=Object.create(null),this.options=t||Hl,this.options.tokenizer=this.options.tokenizer||new sh,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const e={block:Nh.normal,inline:jh.normal};this.options.pedantic?(e.block=Nh.pedantic,e.inline=jh.pedantic):this.options.gfm&&(e.block=Nh.gfm,this.options.breaks?e.inline=jh.breaks:e.inline=jh.gfm),this.tokenizer.rules=e}static get rules(){return{block:Nh,inline:jh}}static lex(t,e){return new Hh(e).lex(t)}static lexInline(t,e){return new Hh(e).inlineTokens(t)}lex(t){t=t.replace(/\r\n|\r/g,"\n"),this.blockTokens(t,this.tokens);for(let e=0;e<this.inlineQueue.length;e++){const t=this.inlineQueue[e];this.inlineTokens(t.src,t.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,e=[],r=!1){let i,a,n;for(t=this.options.pedantic?t.replace(/\t/g," ").replace(/^ +$/gm,""):t.replace(/^( *)(\t+)/gm,((t,e,r)=>e+" ".repeat(r.length)));t;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some((r=>!!(i=r.call({lexer:this},t,e))&&(t=t.substring(i.raw.length),e.push(i),!0)))))if(i=this.tokenizer.space(t))t=t.substring(i.raw.length),1===i.raw.length&&e.length>0?e[e.length-1].raw+="\n":e.push(i);else if(i=this.tokenizer.code(t))t=t.substring(i.raw.length),a=e[e.length-1],!a||"paragraph"!==a.type&&"text"!==a.type?e.push(i):(a.raw+="\n"+i.raw,a.text+="\n"+i.text,this.inlineQueue[this.inlineQueue.length-1].src=a.text);else if(i=this.tokenizer.fences(t))t=t.substring(i.raw.length),e.push(i);else if(i=this.tokenizer.heading(t))t=t.substring(i.raw.length),e.push(i);else if(i=this.tokenizer.hr(t))t=t.substring(i.raw.length),e.push(i);else if(i=this.tokenizer.blockquote(t))t=t.substring(i.raw.length),e.push(i);else if(i=this.tokenizer.list(t))t=t.substring(i.raw.length),e.push(i);else if(i=this.tokenizer.html(t))t=t.substring(i.raw.length),e.push(i);else if(i=this.tokenizer.def(t))t=t.substring(i.raw.length),a=e[e.length-1],!a||"paragraph"!==a.type&&"text"!==a.type?this.tokens.links[i.tag]||(this.tokens.links[i.tag]={href:i.href,title:i.title}):(a.raw+="\n"+i.raw,a.text+="\n"+i.raw,this.inlineQueue[this.inlineQueue.length-1].src=a.text);else if(i=this.tokenizer.table(t))t=t.substring(i.raw.length),e.push(i);else if(i=this.tokenizer.lheading(t))t=t.substring(i.raw.length),e.push(i);else{if(n=t,this.options.extensions&&this.options.extensions.startBlock){let e=1/0;const r=t.slice(1);let i;this.options.extensions.startBlock.forEach((t=>{i=t.call({lexer:this},r),"number"==typeof i&&i>=0&&(e=Math.min(e,i))})),e<1/0&&e>=0&&(n=t.substring(0,e+1))}if(this.state.top&&(i=this.tokenizer.paragraph(n)))a=e[e.length-1],r&&"paragraph"===(null==a?void 0:a.type)?(a.raw+="\n"+i.raw,a.text+="\n"+i.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=a.text):e.push(i),r=n.length!==t.length,t=t.substring(i.raw.length);else if(i=this.tokenizer.text(t))t=t.substring(i.raw.length),a=e[e.length-1],a&&"text"===a.type?(a.raw+="\n"+i.raw,a.text+="\n"+i.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=a.text):e.push(i);else if(t){const e="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(e);break}throw new Error(e)}}return this.state.top=!0,e}inline(t,e=[]){return this.inlineQueue.push({src:t,tokens:e}),e}inlineTokens(t,e=[]){let r,i,a,n,o,s,l=t;if(this.tokens.links){const t=Object.keys(this.tokens.links);if(t.length>0)for(;null!=(n=this.tokenizer.rules.inline.reflinkSearch.exec(l));)t.includes(n[0].slice(n[0].lastIndexOf("[")+1,-1))&&(l=l.slice(0,n.index)+"["+"a".repeat(n[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(n=this.tokenizer.rules.inline.blockSkip.exec(l));)l=l.slice(0,n.index)+"["+"a".repeat(n[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;null!=(n=this.tokenizer.rules.inline.anyPunctuation.exec(l));)l=l.slice(0,n.index)+"++"+l.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;t;)if(o||(s=""),o=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some((i=>!!(r=i.call({lexer:this},t,e))&&(t=t.substring(r.raw.length),e.push(r),!0)))))if(r=this.tokenizer.escape(t))t=t.substring(r.raw.length),e.push(r);else if(r=this.tokenizer.tag(t))t=t.substring(r.raw.length),i=e[e.length-1],i&&"text"===r.type&&"text"===i.type?(i.raw+=r.raw,i.text+=r.text):e.push(r);else if(r=this.tokenizer.link(t))t=t.substring(r.raw.length),e.push(r);else if(r=this.tokenizer.reflink(t,this.tokens.links))t=t.substring(r.raw.length),i=e[e.length-1],i&&"text"===r.type&&"text"===i.type?(i.raw+=r.raw,i.text+=r.text):e.push(r);else if(r=this.tokenizer.emStrong(t,l,s))t=t.substring(r.raw.length),e.push(r);else if(r=this.tokenizer.codespan(t))t=t.substring(r.raw.length),e.push(r);else if(r=this.tokenizer.br(t))t=t.substring(r.raw.length),e.push(r);else if(r=this.tokenizer.del(t))t=t.substring(r.raw.length),e.push(r);else if(r=this.tokenizer.autolink(t))t=t.substring(r.raw.length),e.push(r);else if(this.state.inLink||!(r=this.tokenizer.url(t))){if(a=t,this.options.extensions&&this.options.extensions.startInline){let e=1/0;const r=t.slice(1);let i;this.options.extensions.startInline.forEach((t=>{i=t.call({lexer:this},r),"number"==typeof i&&i>=0&&(e=Math.min(e,i))})),e<1/0&&e>=0&&(a=t.substring(0,e+1))}if(r=this.tokenizer.inlineText(a))t=t.substring(r.raw.length),"_"!==r.raw.slice(-1)&&(s=r.raw.slice(-1)),o=!0,i=e[e.length-1],i&&"text"===i.type?(i.raw+=r.raw,i.text+=r.text):e.push(r);else if(t){const e="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(e);break}throw new Error(e)}}else t=t.substring(r.raw.length),e.push(r);return e}}class Uh{constructor(t){f(this,"options"),f(this,"parser"),this.options=t||Hl}space(t){return""}code({text:t,lang:e,escaped:r}){var i;const a=null==(i=(e||"").match(/^\S*/))?void 0:i[0],n=t.replace(/\n$/,"")+"\n";return a?'<pre><code class="language-'+Kl(a)+'">'+(r?n:Kl(n,!0))+"</code></pre>\n":"<pre><code>"+(r?n:Kl(n,!0))+"</code></pre>\n"}blockquote({tokens:t}){return`<blockquote>\n${this.parser.parse(t)}</blockquote>\n`}html({text:t}){return t}heading({tokens:t,depth:e}){return`<h${e}>${this.parser.parseInline(t)}</h${e}>\n`}hr(t){return"<hr>\n"}list(t){const e=t.ordered,r=t.start;let i="";for(let n=0;n<t.items.length;n++){const e=t.items[n];i+=this.listitem(e)}const a=e?"ol":"ul";return"<"+a+(e&&1!==r?' start="'+r+'"':"")+">\n"+i+"</"+a+">\n"}listitem(t){let e="";if(t.task){const r=this.checkbox({checked:!!t.checked});t.loose?t.tokens.length>0&&"paragraph"===t.tokens[0].type?(t.tokens[0].text=r+" "+t.tokens[0].text,t.tokens[0].tokens&&t.tokens[0].tokens.length>0&&"text"===t.tokens[0].tokens[0].type&&(t.tokens[0].tokens[0].text=r+" "+t.tokens[0].tokens[0].text)):t.tokens.unshift({type:"text",raw:r+" ",text:r+" "}):e+=r+" "}return e+=this.parser.parse(t.tokens,!!t.loose),`<li>${e}</li>\n`}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>\n`}table(t){let e="",r="";for(let a=0;a<t.header.length;a++)r+=this.tablecell(t.header[a]);e+=this.tablerow({text:r});let i="";for(let a=0;a<t.rows.length;a++){const e=t.rows[a];r="";for(let t=0;t<e.length;t++)r+=this.tablecell(e[t]);i+=this.tablerow({text:r})}return i&&(i=`<tbody>${i}</tbody>`),"<table>\n<thead>\n"+e+"</thead>\n"+i+"</table>\n"}tablerow({text:t}){return`<tr>\n${t}</tr>\n`}tablecell(t){const e=this.parser.parseInline(t.tokens),r=t.header?"th":"td";return(t.align?`<${r} align="${t.align}">`:`<${r}>`)+e+`</${r}>\n`}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>${t}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:e,tokens:r}){const i=this.parser.parseInline(r),a=rh(t);if(null===a)return i;let n='<a href="'+(t=a)+'"';return e&&(n+=' title="'+e+'"'),n+=">"+i+"</a>",n}image({href:t,title:e,text:r}){const i=rh(t);if(null===i)return r;let a=`<img src="${t=i}" alt="${r}"`;return e&&(a+=` title="${e}"`),a+=">",a}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):t.text}}class Yh{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""}}class Vh{constructor(t){f(this,"options"),f(this,"renderer"),f(this,"textRenderer"),this.options=t||Hl,this.options.renderer=this.options.renderer||new Uh,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Yh}static parse(t,e){return new Vh(e).parse(t)}static parseInline(t,e){return new Vh(e).parseInline(t)}parse(t,e=!0){let r="";for(let i=0;i<t.length;i++){const a=t[i];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[a.type]){const t=a,e=this.options.extensions.renderers[t.type].call({parser:this},t);if(!1!==e||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(t.type)){r+=e||"";continue}}const n=a;switch(n.type){case"space":r+=this.renderer.space(n);continue;case"hr":r+=this.renderer.hr(n);continue;case"heading":r+=this.renderer.heading(n);continue;case"code":r+=this.renderer.code(n);continue;case"table":r+=this.renderer.table(n);continue;case"blockquote":r+=this.renderer.blockquote(n);continue;case"list":r+=this.renderer.list(n);continue;case"html":r+=this.renderer.html(n);continue;case"paragraph":r+=this.renderer.paragraph(n);continue;case"text":{let a=n,o=this.renderer.text(a);for(;i+1<t.length&&"text"===t[i+1].type;)a=t[++i],o+="\n"+this.renderer.text(a);r+=e?this.renderer.paragraph({type:"paragraph",raw:o,text:o,tokens:[{type:"text",raw:o,text:o}]}):o;continue}default:{const t='Token with "'+n.type+'" type was not found.';if(this.options.silent)return console.error(t),"";throw new Error(t)}}}return r}parseInline(t,e){e=e||this.renderer;let r="";for(let i=0;i<t.length;i++){const a=t[i];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[a.type]){const t=this.options.extensions.renderers[a.type].call({parser:this},a);if(!1!==t||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(a.type)){r+=t||"";continue}}const n=a;switch(n.type){case"escape":case"text":r+=e.text(n);break;case"html":r+=e.html(n);break;case"link":r+=e.link(n);break;case"image":r+=e.image(n);break;case"strong":r+=e.strong(n);break;case"em":r+=e.em(n);break;case"codespan":r+=e.codespan(n);break;case"br":r+=e.br(n);break;case"del":r+=e.del(n);break;default:{const t='Token with "'+n.type+'" type was not found.';if(this.options.silent)return console.error(t),"";throw new Error(t)}}}return r}}class Gh{constructor(t){f(this,"options"),this.options=t||Hl}preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}}f(Gh,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"]));l=new WeakSet,h=function(t,e,r){switch(e){case"heading":return function(i){return i.type&&i.type===e?t.call(this,r.parser.parseInline(i.tokens),i.depth,r.parser.parseInline(i.tokens,r.parser.textRenderer).replace(Jl,((t,e)=>"colon"===(e=e.toLowerCase())?":":"#"===e.charAt(0)?"x"===e.charAt(1)?String.fromCharCode(parseInt(e.substring(2),16)):String.fromCharCode(+e.substring(1)):""))):t.apply(this,arguments)};case"code":return function(r){return r.type&&r.type===e?t.call(this,r.text,r.lang,!!r.escaped):t.apply(this,arguments)};case"table":return function(r){if(!r.type||r.type!==e)return t.apply(this,arguments);let i="",a="";for(let t=0;t<r.header.length;t++)a+=this.tablecell({text:r.header[t].text,tokens:r.header[t].tokens,header:!0,align:r.align[t]});i+=this.tablerow({text:a});let n="";for(let t=0;t<r.rows.length;t++){const e=r.rows[t];a="";for(let t=0;t<e.length;t++)a+=this.tablecell({text:e[t].text,tokens:e[t].tokens,header:!1,align:r.align[t]});n+=this.tablerow({text:a})}return t.call(this,i,n)};case"blockquote":return function(r){if(!r.type||r.type!==e)return t.apply(this,arguments);const i=this.parser.parse(r.tokens);return t.call(this,i)};case"list":return function(r){if(!r.type||r.type!==e)return t.apply(this,arguments);const i=r.ordered,a=r.start,n=r.loose;let o="";for(let t=0;t<r.items.length;t++){const e=r.items[t],i=e.checked,a=e.task;let s="";if(e.task){const t=this.checkbox({checked:!!i});n?e.tokens.length>0&&"paragraph"===e.tokens[0].type?(e.tokens[0].text=t+" "+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&"text"===e.tokens[0].tokens[0].type&&(e.tokens[0].tokens[0].text=t+" "+e.tokens[0].tokens[0].text)):e.tokens.unshift({type:"text",text:t+" "}):s+=t+" "}s+=this.parser.parse(e.tokens,n),o+=this.listitem({type:"list_item",raw:s,text:s,task:a,checked:!!i,loose:n,tokens:e.tokens})}return t.call(this,o,i,a)};case"html":return function(r){return r.type&&r.type===e?t.call(this,r.text,r.block):t.apply(this,arguments)};case"paragraph":case"strong":case"em":case"del":return function(r){return r.type&&r.type===e?t.call(this,this.parser.parseInline(r.tokens)):t.apply(this,arguments)};case"escape":case"codespan":case"text":return function(r){return r.type&&r.type===e?t.call(this,r.text):t.apply(this,arguments)};case"link":return function(r){return r.type&&r.type===e?t.call(this,r.href,r.title,this.parser.parseInline(r.tokens)):t.apply(this,arguments)};case"image":return function(r){return r.type&&r.type===e?t.call(this,r.href,r.title,r.text):t.apply(this,arguments)}}return t},c=function(t,e){return(r,i)=>{const a={...i},n={...this.defaults,...a};!0===this.defaults.async&&!1===a.async&&(n.silent||console.warn("marked(): The async option was set to true by an extension. The async: false option sent to parse will be ignored."),n.async=!0);const o=y(this,l,d).call(this,!!n.silent,!!n.async);if(null==r)return o(new Error("marked(): input parameter is undefined or null"));if("string"!=typeof r)return o(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));if(n.hooks&&(n.hooks.options=n),n.async)return Promise.resolve(n.hooks?n.hooks.preprocess(r):r).then((e=>t(e,n))).then((t=>n.hooks?n.hooks.processAllTokens(t):t)).then((t=>n.walkTokens?Promise.all(this.walkTokens(t,n.walkTokens)).then((()=>t)):t)).then((t=>e(t,n))).then((t=>n.hooks?n.hooks.postprocess(t):t)).catch(o);try{n.hooks&&(r=n.hooks.preprocess(r));let i=t(r,n);n.hooks&&(i=n.hooks.processAllTokens(i)),n.walkTokens&&this.walkTokens(i,n.walkTokens);let a=e(i,n);return n.hooks&&(a=n.hooks.postprocess(a)),a}catch(s){return o(s)}}},d=function(t,e){return r=>{if(r.message+="\nPlease report this to https://github.com/markedjs/marked.",t){const t="<p>An error occurred:</p><pre>"+Kl(r.message+"",!0)+"</pre>";return e?Promise.resolve(t):t}if(e)return Promise.reject(r);throw r}};const Zh=new class{constructor(...t){var e,r,i;e=this,(r=l).has(e)?g("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(e):r.set(e,i),f(this,"defaults",{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}),f(this,"options",this.setOptions),f(this,"parse",y(this,l,c).call(this,Hh.lex,Vh.parse)),f(this,"parseInline",y(this,l,c).call(this,Hh.lexInline,Vh.parseInline)),f(this,"Parser",Vh),f(this,"Renderer",Uh),f(this,"TextRenderer",Yh),f(this,"Lexer",Hh),f(this,"Tokenizer",sh),f(this,"Hooks",Gh),this.use(...t)}walkTokens(t,e){var r,i;let a=[];for(const n of t)switch(a=a.concat(e.call(this,n)),n.type){case"table":{const t=n;for(const r of t.header)a=a.concat(this.walkTokens(r.tokens,e));for(const r of t.rows)for(const t of r)a=a.concat(this.walkTokens(t.tokens,e));break}case"list":{const t=n;a=a.concat(this.walkTokens(t.items,e));break}default:{const t=n;(null==(i=null==(r=this.defaults.extensions)?void 0:r.childTokens)?void 0:i[t.type])?this.defaults.extensions.childTokens[t.type].forEach((r=>{const i=t[r].flat(1/0);a=a.concat(this.walkTokens(i,e))})):t.tokens&&(a=a.concat(this.walkTokens(t.tokens,e)))}}return a}use(...t){const e=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach((t=>{const r={...t};if(r.async=this.defaults.async||r.async||!1,t.extensions&&(t.extensions.forEach((t=>{if(!t.name)throw new Error("extension name required");if("renderer"in t){const r=e.renderers[t.name];e.renderers[t.name]=r?function(...e){let i=t.renderer.apply(this,e);return!1===i&&(i=r.apply(this,e)),i}:t.renderer}if("tokenizer"in t){if(!t.level||"block"!==t.level&&"inline"!==t.level)throw new Error("extension level must be 'block' or 'inline'");const r=e[t.level];r?r.unshift(t.tokenizer):e[t.level]=[t.tokenizer],t.start&&("block"===t.level?e.startBlock?e.startBlock.push(t.start):e.startBlock=[t.start]:"inline"===t.level&&(e.startInline?e.startInline.push(t.start):e.startInline=[t.start]))}"childTokens"in t&&t.childTokens&&(e.childTokens[t.name]=t.childTokens)})),r.extensions=e),t.renderer){const e=this.defaults.renderer||new Uh(this.defaults);for(const r in t.renderer){if(!(r in e))throw new Error(`renderer '${r}' does not exist`);if(["options","parser"].includes(r))continue;const i=r;let a=t.renderer[i];t.useNewRenderer||(a=y(this,l,h).call(this,a,i,e));const n=e[i];e[i]=(...t)=>{let r=a.apply(e,t);return!1===r&&(r=n.apply(e,t)),r||""}}r.renderer=e}if(t.tokenizer){const e=this.defaults.tokenizer||new sh(this.defaults);for(const r in t.tokenizer){if(!(r in e))throw new Error(`tokenizer '${r}' does not exist`);if(["options","rules","lexer"].includes(r))continue;const i=r,a=t.tokenizer[i],n=e[i];e[i]=(...t)=>{let r=a.apply(e,t);return!1===r&&(r=n.apply(e,t)),r}}r.tokenizer=e}if(t.hooks){const e=this.defaults.hooks||new Gh;for(const r in t.hooks){if(!(r in e))throw new Error(`hook '${r}' does not exist`);if("options"===r)continue;const i=r,a=t.hooks[i],n=e[i];Gh.passThroughHooks.has(r)?e[i]=t=>{if(this.defaults.async)return Promise.resolve(a.call(e,t)).then((t=>n.call(e,t)));const r=a.call(e,t);return n.call(e,r)}:e[i]=(...t)=>{let r=a.apply(e,t);return!1===r&&(r=n.apply(e,t)),r}}r.hooks=e}if(t.walkTokens){const e=this.defaults.walkTokens,i=t.walkTokens;r.walkTokens=function(t){let r=[];return r.push(i.call(this,t)),e&&(r=r.concat(e.call(this,t))),r}}this.defaults={...this.defaults,...r}})),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,e){return Hh.lex(t,e??this.defaults)}parser(t,e){return Vh.parse(t,e??this.defaults)}};function Xh(t,e){return Zh.parse(t,e)}function Qh(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];var i=Array.from("string"==typeof t?[t]:t);i[i.length-1]=i[i.length-1].replace(/\r?\n([\t ]*)$/,"");var a=i.reduce((function(t,e){var r=e.match(/\n([\t ]+|(?!\s).)/g);return r?t.concat(r.map((function(t){var e,r;return null!==(r=null===(e=t.match(/[\t ]/g))||void 0===e?void 0:e.length)&&void 0!==r?r:0}))):t}),[]);if(a.length){var n=new RegExp("\n[\t ]{"+Math.min.apply(Math,a)+"}","g");i=i.map((function(t){return t.replace(n,"\n")}))}i[0]=i[0].replace(/^\r?\n/,"");var o=i[0];return e.forEach((function(t,e){var r=o.match(/(?:^|\n)( *)$/),a=r?r[1]:"",n=t;"string"==typeof t&&t.includes("\n")&&(n=String(t).split("\n").map((function(t,e){return 0===e?t:""+a+t})).join("\n")),o+=n+i[e+1]})),o}function Kh(t,{markdownAutoWrap:e}){const r=Qh(t.replace(/<br\/>/g,"\n").replace(/\n{2,}/g,"\n"));return!1===e?r.replace(/ /g,"&nbsp;"):r}function Jh(t,e={}){const r=Kh(t,e),i=Xh.lexer(r),a=[[]];let n=0;function o(t,e="normal"){if("text"===t.type){t.text.split("\n").forEach(((t,r)=>{0!==r&&(n++,a.push([])),t.split(" ").forEach((t=>{t&&a[n].push({content:t,type:e})}))}))}else"strong"===t.type||"em"===t.type?t.tokens.forEach((e=>{o(e,t.type)})):"html"===t.type&&a[n].push({content:t.text,type:"normal"})}return Cr(o,"processNode"),i.forEach((t=>{var e;"paragraph"===t.type?null==(e=t.tokens)||e.forEach((t=>{o(t)})):"html"===t.type&&a[n].push({content:t.text,type:"normal"})})),a}function tc(t,{markdownAutoWrap:e}={}){const r=Xh.lexer(t);function i(t){var r,a,n;return"text"===t.type?!1===e?t.text.replace(/\n */g,"<br/>").replace(/ /g,"&nbsp;"):t.text.replace(/\n */g,"<br/>"):"strong"===t.type?`<strong>${null==(r=t.tokens)?void 0:r.map(i).join("")}</strong>`:"em"===t.type?`<em>${null==(a=t.tokens)?void 0:a.map(i).join("")}</em>`:"paragraph"===t.type?`<p>${null==(n=t.tokens)?void 0:n.map(i).join("")}</p>`:"space"===t.type?"":"html"===t.type?`${t.text}`:`Unsupported markdown: ${t.type}`}return Cr(i,"output"),r.map(i).join("")}function ec(t){return Intl.Segmenter?[...(new Intl.Segmenter).segment(t)].map((t=>t.segment)):[...t]}function rc(t,e){return ic(t,[],ec(e.content),e.type)}function ic(t,e,r,i){if(0===r.length)return[{content:e.join(""),type:i},{content:"",type:i}];const[a,...n]=r,o=[...e,a];return t([{content:o.join(""),type:i}])?ic(t,o,n,i):(0===e.length&&a&&(e.push(a),r.shift()),[{content:e.join(""),type:i},{content:r.join(""),type:i}])}function ac(t,e){if(t.some((({content:t})=>t.includes("\n"))))throw new Error("splitLineToFitWidth does not support newlines in the line");return nc(t,e)}function nc(t,e,r=[],i=[]){if(0===t.length)return i.length>0&&r.push(i),r.length>0?r:[];let a="";" "===t[0].content&&(a=" ",t.shift());const n=t.shift()??{content:" ",type:"normal"},o=[...i];if(""!==a&&o.push({content:a,type:"normal"}),o.push(n),e(o))return nc(t,e,r,o);if(i.length>0)r.push(i),t.unshift(n);else if(n.content){const[i,a]=rc(e,n);r.push([i]),a.content&&t.unshift(a)}return nc(t,e,r)}function oc(t,e){e&&t.attr("style",e)}async function sc(t,e,r,i,a=!1){const n=t.append("foreignObject");n.attr("width",10*r+"px"),n.attr("height",10*r+"px");const o=n.append("xhtml:div");let s=e.label;e.label&&ji(e.label)&&(s=await Ui(e.label.replace(Yi.lineBreakRegex,"\n"),fa()));const l=e.isNode?"nodeLabel":"edgeLabel",h=o.append("span");h.html(s),oc(h,e.labelStyle),h.attr("class",`${l} ${i}`),oc(o,e.labelStyle),o.style("display","table-cell"),o.style("white-space","nowrap"),o.style("line-height","1.5"),o.style("max-width",r+"px"),o.style("text-align","center"),o.attr("xmlns","http://www.w3.org/1999/xhtml"),a&&o.attr("class","labelBkg");let c=o.node().getBoundingClientRect();return c.width===r&&(o.style("display","table"),o.style("white-space","break-spaces"),o.style("width",r+"px"),c=o.node().getBoundingClientRect()),n.node()}function lc(t,e,r){return t.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",e*r-.1+"em").attr("dy",r+"em")}function hc(t,e,r){const i=t.append("text"),a=lc(i,1,e);uc(a,r);const n=a.node().getComputedTextLength();return i.remove(),n}function cc(t,e,r){var i;const a=t.append("text"),n=lc(a,1,e);uc(n,[{content:r,type:"normal"}]);const o=null==(i=n.node())?void 0:i.getBoundingClientRect();return o&&a.remove(),o}function dc(t,e,r,i=!1){const a=e.append("g"),n=a.insert("rect").attr("class","background").attr("style","stroke: none"),o=a.append("text").attr("y","-10.1");let s=0;for(const l of r){const e=Cr((e=>hc(a,1.1,e)<=t),"checkWidth"),r=e(l)?[l]:ac(l,e);for(const t of r){uc(lc(o,s,1.1),t),s++}}if(i){const t=o.node().getBBox(),e=2;return n.attr("x",t.x-e).attr("y",t.y-e).attr("width",t.width+2*e).attr("height",t.height+2*e),a.node()}return o.node()}function uc(t,e){t.text(""),e.forEach(((e,r)=>{const i=t.append("tspan").attr("font-style","em"===e.type?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight","strong"===e.type?"bold":"normal");0===r?i.text(e.content):i.text(" "+e.content)}))}function pc(t){return t.replace(/fa[bklrs]?:fa-[\w-]+/g,(t=>`<i class='${t.replace(":"," ")}'></i>`))}Xh.options=Xh.setOptions=function(t){return Zh.setOptions(t),Xh.defaults=Zh.defaults,Ul(Xh.defaults),Xh},Xh.getDefaults=jl,Xh.defaults=Hl,Xh.use=function(...t){return Zh.use(...t),Xh.defaults=Zh.defaults,Ul(Xh.defaults),Xh},Xh.walkTokens=function(t,e){return Zh.walkTokens(t,e)},Xh.parseInline=Zh.parseInline,Xh.Parser=Vh,Xh.parser=Vh.parse,Xh.Renderer=Uh,Xh.TextRenderer=Yh,Xh.Lexer=Hh,Xh.lexer=Hh.lex,Xh.Tokenizer=sh,Xh.Hooks=Gh,Xh.parse=Xh,Xh.options,Xh.setOptions,Xh.use,Xh.walkTokens,Xh.parseInline,Vh.parse,Hh.lex,Cr(Kh,"preprocessMarkdown"),Cr(Jh,"markdownToLines"),Cr(tc,"markdownToHTML"),Cr(ec,"splitTextToChars"),Cr(rc,"splitWordToFitWidth"),Cr(ic,"splitWordToFitWidthRecursion"),Cr(ac,"splitLineToFitWidth"),Cr(nc,"splitLineToFitWidthRecursion"),Cr(oc,"applyStyle"),Cr(sc,"addHtmlSpan"),Cr(lc,"createTspan"),Cr(hc,"computeWidthOfText"),Cr(cc,"computeDimensionOfText"),Cr(dc,"createFormattedText"),Cr(uc,"updateTextContentAndStyles"),Cr(pc,"replaceIconSubstring");var gc=Cr((async(t,e="",{style:r="",isTitle:i=!1,classes:a="",useHtmlLabels:n=!0,isNode:o=!0,width:s=200,addSvgBackground:l=!1}={},h)=>{if(Sr.debug("XYZ createText",e,r,i,a,n,o,"addSvgBackground: ",l),n){const i=tc(e,h),n=pc(Wl(i)),c=e.replace(/\\\\/g,"\\"),d={isNode:o,label:ji(e)?c:n,labelStyle:r.replace("fill:","color:")};return await sc(t,d,s,a,l)}{const i=dc(s,t,Jh(e.replace(/<br\s*\/?>/g,"<br/>").replace("<br>","<br/>"),h),!!e&&l);if(o){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));const t=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");Z(i).attr("style",t)}else{const t=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");Z(i).select("rect").attr("style",t.replace(/background:/g,"fill:"));const e=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");Z(i).select("text").attr("style",e)}return i}}),"createText");function fc(t,e,r){if(t&&t.length){const[i,a]=e,n=Math.PI/180*r,o=Math.cos(n),s=Math.sin(n);for(const e of t){const[t,r]=e;e[0]=(t-i)*o-(r-a)*s+i,e[1]=(t-i)*s+(r-a)*o+a}}}function yc(t,e){return t[0]===e[0]&&t[1]===e[1]}function mc(t,e){var r;const i=e.hachureAngle+90;let a=e.hachureGap;a<0&&(a=4*e.strokeWidth),a=Math.round(Math.max(a,.1));let n=1;return e.roughness>=1&&((null===(r=e.randomizer)||void 0===r?void 0:r.next())||Math.random())>.7&&(n=a),function(t,e,r,i=1){const a=r,n=Math.max(e,.1),o=t[0]&&t[0][0]&&"number"==typeof t[0][0]?[t]:t,s=[0,0];if(a)for(const h of o)fc(h,s,a);const l=function(t,e,r){const i=[];for(const h of t){const t=[...h];yc(t[0],t[t.length-1])||t.push([t[0][0],t[0][1]]),t.length>2&&i.push(t)}const a=[];e=Math.max(e,.1);const n=[];for(const h of i)for(let t=0;t<h.length-1;t++){const e=h[t],r=h[t+1];if(e[1]!==r[1]){const t=Math.min(e[1],r[1]);n.push({ymin:t,ymax:Math.max(e[1],r[1]),x:t===e[1]?e[0]:r[0],islope:(r[0]-e[0])/(r[1]-e[1])})}}if(n.sort(((t,e)=>t.ymin<e.ymin?-1:t.ymin>e.ymin?1:t.x<e.x?-1:t.x>e.x?1:t.ymax===e.ymax?0:(t.ymax-e.ymax)/Math.abs(t.ymax-e.ymax))),!n.length)return a;let o=[],s=n[0].ymin,l=0;for(;o.length||n.length;){if(n.length){let t=-1;for(let e=0;e<n.length&&!(n[e].ymin>s);e++)t=e;n.splice(0,t+1).forEach((t=>{o.push({s:s,edge:t})}))}if(o=o.filter((t=>!(t.edge.ymax<=s))),o.sort(((t,e)=>t.edge.x===e.edge.x?0:(t.edge.x-e.edge.x)/Math.abs(t.edge.x-e.edge.x))),(1!==r||l%e==0)&&o.length>1)for(let t=0;t<o.length;t+=2){const e=t+1;if(e>=o.length)break;const r=o[t].edge,i=o[e].edge;a.push([[Math.round(r.x),s],[Math.round(i.x),s]])}s+=r,o.forEach((t=>{t.edge.x=t.edge.x+r*t.edge.islope})),l++}return a}(o,n,i);if(a){for(const t of o)fc(t,s,-a);!function(t,e,r){const i=[];t.forEach((t=>i.push(...t))),fc(i,e,r)}(l,s,-a)}return l}(t,a,i,n||1)}class xc{constructor(t){this.helper=t}fillPolygons(t,e){return this._fillPolygons(t,e)}_fillPolygons(t,e){const r=mc(t,e);return{type:"fillSketch",ops:this.renderLines(r,e)}}renderLines(t,e){const r=[];for(const i of t)r.push(...this.helper.doubleLineOps(i[0][0],i[0][1],i[1][0],i[1][1],e));return r}}function bc(t){const e=t[0],r=t[1];return Math.sqrt(Math.pow(e[0]-r[0],2)+Math.pow(e[1]-r[1],2))}class Cc extends xc{fillPolygons(t,e){let r=e.hachureGap;r<0&&(r=4*e.strokeWidth),r=Math.max(r,.1);const i=mc(t,Object.assign({},e,{hachureGap:r})),a=Math.PI/180*e.hachureAngle,n=[],o=.5*r*Math.cos(a),s=.5*r*Math.sin(a);for(const[l,h]of i)bc([l,h])&&n.push([[l[0]-o,l[1]+s],[...h]],[[l[0]+o,l[1]-s],[...h]]);return{type:"fillSketch",ops:this.renderLines(n,e)}}}class kc extends xc{fillPolygons(t,e){const r=this._fillPolygons(t,e),i=Object.assign({},e,{hachureAngle:e.hachureAngle+90}),a=this._fillPolygons(t,i);return r.ops=r.ops.concat(a.ops),r}}class wc{constructor(t){this.helper=t}fillPolygons(t,e){const r=mc(t,e=Object.assign({},e,{hachureAngle:0}));return this.dotsOnLines(r,e)}dotsOnLines(t,e){const r=[];let i=e.hachureGap;i<0&&(i=4*e.strokeWidth),i=Math.max(i,.1);let a=e.fillWeight;a<0&&(a=e.strokeWidth/2);const n=i/4;for(const o of t){const t=bc(o),s=t/i,l=Math.ceil(s)-1,h=t-l*i,c=(o[0][0]+o[1][0])/2-i/4,d=Math.min(o[0][1],o[1][1]);for(let o=0;o<l;o++){const t=d+h+o*i,s=c-n+2*Math.random()*n,l=t-n+2*Math.random()*n,u=this.helper.ellipse(s,l,a,a,e);r.push(...u.ops)}}return{type:"fillSketch",ops:r}}}class Sc{constructor(t){this.helper=t}fillPolygons(t,e){const r=mc(t,e);return{type:"fillSketch",ops:this.dashedLine(r,e)}}dashedLine(t,e){const r=e.dashOffset<0?e.hachureGap<0?4*e.strokeWidth:e.hachureGap:e.dashOffset,i=e.dashGap<0?e.hachureGap<0?4*e.strokeWidth:e.hachureGap:e.dashGap,a=[];return t.forEach((t=>{const n=bc(t),o=Math.floor(n/(r+i)),s=(n+i-o*(r+i))/2;let l=t[0],h=t[1];l[0]>h[0]&&(l=t[1],h=t[0]);const c=Math.atan((h[1]-l[1])/(h[0]-l[0]));for(let d=0;d<o;d++){const t=d*(r+i),n=t+r,o=[l[0]+t*Math.cos(c)+s*Math.cos(c),l[1]+t*Math.sin(c)+s*Math.sin(c)],h=[l[0]+n*Math.cos(c)+s*Math.cos(c),l[1]+n*Math.sin(c)+s*Math.sin(c)];a.push(...this.helper.doubleLineOps(o[0],o[1],h[0],h[1],e))}})),a}}class Tc{constructor(t){this.helper=t}fillPolygons(t,e){const r=e.hachureGap<0?4*e.strokeWidth:e.hachureGap,i=e.zigzagOffset<0?r:e.zigzagOffset,a=mc(t,e=Object.assign({},e,{hachureGap:r+i}));return{type:"fillSketch",ops:this.zigzagLines(a,i,e)}}zigzagLines(t,e,r){const i=[];return t.forEach((t=>{const a=bc(t),n=Math.round(a/(2*e));let o=t[0],s=t[1];o[0]>s[0]&&(o=t[1],s=t[0]);const l=Math.atan((s[1]-o[1])/(s[0]-o[0]));for(let h=0;h<n;h++){const t=2*h*e,a=2*(h+1)*e,n=Math.sqrt(2*Math.pow(e,2)),s=[o[0]+t*Math.cos(l),o[1]+t*Math.sin(l)],c=[o[0]+a*Math.cos(l),o[1]+a*Math.sin(l)],d=[s[0]+n*Math.cos(l+Math.PI/4),s[1]+n*Math.sin(l+Math.PI/4)];i.push(...this.helper.doubleLineOps(s[0],s[1],d[0],d[1],r),...this.helper.doubleLineOps(d[0],d[1],c[0],c[1],r))}})),i}}const vc={};class Bc{constructor(t){this.seed=t}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}}const _c={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 Lc(t,e){return t.type===e}function Mc(t){const e=[],r=function(t){const e=new Array;for(;""!==t;)if(t.match(/^([ \t\r\n,]+)/))t=t.substr(RegExp.$1.length);else if(t.match(/^([aAcChHlLmMqQsStTvVzZ])/))e[e.length]={type:0,text:RegExp.$1},t=t.substr(RegExp.$1.length);else{if(!t.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];e[e.length]={type:1,text:`${parseFloat(RegExp.$1)}`},t=t.substr(RegExp.$1.length)}return e[e.length]={type:2,text:""},e}(t);let i="BOD",a=0,n=r[a];for(;!Lc(n,2);){let o=0;const s=[];if("BOD"===i){if("M"!==n.text&&"m"!==n.text)return Mc("M0,0"+t);a++,o=_c[n.text],i=n.text}else Lc(n,1)?o=_c[i]:(a++,o=_c[n.text],i=n.text);if(!(a+o<r.length))throw new Error("Path data ended short");for(let t=a;t<a+o;t++){const e=r[t];if(!Lc(e,1))throw new Error("Param not a number: "+i+","+e.text);s[s.length]=+e.text}if("number"!=typeof _c[i])throw new Error("Bad segment: "+i);{const t={key:i,data:s};e.push(t),a+=o,n=r[a],"M"===i&&(i="L"),"m"===i&&(i="l")}}return e}function Fc(t){let e=0,r=0,i=0,a=0;const n=[];for(const{key:o,data:s}of t)switch(o){case"M":n.push({key:"M",data:[...s]}),[e,r]=s,[i,a]=s;break;case"m":e+=s[0],r+=s[1],n.push({key:"M",data:[e,r]}),i=e,a=r;break;case"L":n.push({key:"L",data:[...s]}),[e,r]=s;break;case"l":e+=s[0],r+=s[1],n.push({key:"L",data:[e,r]});break;case"C":n.push({key:"C",data:[...s]}),e=s[4],r=s[5];break;case"c":{const t=s.map(((t,i)=>i%2?t+r:t+e));n.push({key:"C",data:t}),e=t[4],r=t[5];break}case"Q":n.push({key:"Q",data:[...s]}),e=s[2],r=s[3];break;case"q":{const t=s.map(((t,i)=>i%2?t+r:t+e));n.push({key:"Q",data:t}),e=t[2],r=t[3];break}case"A":n.push({key:"A",data:[...s]}),e=s[5],r=s[6];break;case"a":e+=s[5],r+=s[6],n.push({key:"A",data:[s[0],s[1],s[2],s[3],s[4],e,r]});break;case"H":n.push({key:"H",data:[...s]}),e=s[0];break;case"h":e+=s[0],n.push({key:"H",data:[e]});break;case"V":n.push({key:"V",data:[...s]}),r=s[0];break;case"v":r+=s[0],n.push({key:"V",data:[r]});break;case"S":n.push({key:"S",data:[...s]}),e=s[2],r=s[3];break;case"s":{const t=s.map(((t,i)=>i%2?t+r:t+e));n.push({key:"S",data:t}),e=t[2],r=t[3];break}case"T":n.push({key:"T",data:[...s]}),e=s[0],r=s[1];break;case"t":e+=s[0],r+=s[1],n.push({key:"T",data:[e,r]});break;case"Z":case"z":n.push({key:"Z",data:[]}),e=i,r=a}return n}function Ac(t){const e=[];let r="",i=0,a=0,n=0,o=0,s=0,l=0;for(const{key:h,data:c}of t){switch(h){case"M":e.push({key:"M",data:[...c]}),[i,a]=c,[n,o]=c;break;case"C":e.push({key:"C",data:[...c]}),i=c[4],a=c[5],s=c[2],l=c[3];break;case"L":e.push({key:"L",data:[...c]}),[i,a]=c;break;case"H":i=c[0],e.push({key:"L",data:[i,a]});break;case"V":a=c[0],e.push({key:"L",data:[i,a]});break;case"S":{let t=0,n=0;"C"===r||"S"===r?(t=i+(i-s),n=a+(a-l)):(t=i,n=a),e.push({key:"C",data:[t,n,...c]}),s=c[0],l=c[1],i=c[2],a=c[3];break}case"T":{const[t,n]=c;let o=0,h=0;"Q"===r||"T"===r?(o=i+(i-s),h=a+(a-l)):(o=i,h=a);const d=i+2*(o-i)/3,u=a+2*(h-a)/3,p=t+2*(o-t)/3,g=n+2*(h-n)/3;e.push({key:"C",data:[d,u,p,g,t,n]}),s=o,l=h,i=t,a=n;break}case"Q":{const[t,r,n,o]=c,h=i+2*(t-i)/3,d=a+2*(r-a)/3,u=n+2*(t-n)/3,p=o+2*(r-o)/3;e.push({key:"C",data:[h,d,u,p,n,o]}),s=t,l=r,i=n,a=o;break}case"A":{const t=Math.abs(c[0]),r=Math.abs(c[1]),n=c[2],o=c[3],s=c[4],l=c[5],h=c[6];0===t||0===r?(e.push({key:"C",data:[i,a,l,h,l,h]}),i=l,a=h):i===l&&a===h||(Ec(i,a,l,h,t,r,n,o,s).forEach((function(t){e.push({key:"C",data:t})})),i=l,a=h);break}case"Z":e.push({key:"Z",data:[]}),i=n,a=o}r=h}return e}function $c(t,e,r){return[t*Math.cos(r)-e*Math.sin(r),t*Math.sin(r)+e*Math.cos(r)]}function Ec(t,e,r,i,a,n,o,s,l,h){const c=(d=o,Math.PI*d/180);var d;let u=[],p=0,g=0,f=0,y=0;if(h)[p,g,f,y]=h;else{[t,e]=$c(t,e,-c),[r,i]=$c(r,i,-c);const o=(t-r)/2,h=(e-i)/2;let d=o*o/(a*a)+h*h/(n*n);d>1&&(d=Math.sqrt(d),a*=d,n*=d);const u=a*a,m=n*n,x=u*m-u*h*h-m*o*o,b=u*h*h+m*o*o,C=(s===l?-1:1)*Math.sqrt(Math.abs(x/b));f=C*a*h/n+(t+r)/2,y=C*-n*o/a+(e+i)/2,p=Math.asin(parseFloat(((e-y)/n).toFixed(9))),g=Math.asin(parseFloat(((i-y)/n).toFixed(9))),t<f&&(p=Math.PI-p),r<f&&(g=Math.PI-g),p<0&&(p=2*Math.PI+p),g<0&&(g=2*Math.PI+g),l&&p>g&&(p-=2*Math.PI),!l&&g>p&&(g-=2*Math.PI)}let m=g-p;if(Math.abs(m)>120*Math.PI/180){const t=g,e=r,s=i;g=l&&g>p?p+120*Math.PI/180*1:p+120*Math.PI/180*-1,u=Ec(r=f+a*Math.cos(g),i=y+n*Math.sin(g),e,s,a,n,o,0,l,[g,t,f,y])}m=g-p;const x=Math.cos(p),b=Math.sin(p),C=Math.cos(g),k=Math.sin(g),w=Math.tan(m/4),S=4/3*a*w,T=4/3*n*w,v=[t,e],B=[t+S*b,e-T*x],_=[r+S*k,i-T*C],L=[r,i];if(B[0]=2*v[0]-B[0],B[1]=2*v[1]-B[1],h)return[B,_,L].concat(u);{u=[B,_,L].concat(u);const t=[];for(let e=0;e<u.length;e+=3){const r=$c(u[e][0],u[e][1],c),i=$c(u[e+1][0],u[e+1][1],c),a=$c(u[e+2][0],u[e+2][1],c);t.push([r[0],r[1],i[0],i[1],a[0],a[1]])}return t}}const Dc={randOffset:function(t,e){return Vc(t,e)},randOffsetWithRange:function(t,e,r){return Yc(t,e,r)},ellipse:function(t,e,r,i,a){return qc(t,e,a,Rc(r,i,a)).opset},doubleLineOps:function(t,e,r,i,a){return Gc(t,e,r,i,a,!0)}};function Ic(t,e,r,i,a){return{type:"path",ops:Gc(t,e,r,i,a)}}function Oc(t,e,r){const i=(t||[]).length;if(i>2){const a=[];for(let e=0;e<i-1;e++)a.push(...Gc(t[e][0],t[e][1],t[e+1][0],t[e+1][1],r));return e&&a.push(...Gc(t[i-1][0],t[i-1][1],t[0][0],t[0][1],r)),{type:"path",ops:a}}return 2===i?Ic(t[0][0],t[0][1],t[1][0],t[1][1],r):{type:"path",ops:[]}}function Pc(t,e){if(t.length){const r="number"==typeof t[0][0]?[t]:t,i=Xc(r[0],1*(1+.2*e.roughness),e),a=e.disableMultiStroke?[]:Xc(r[0],1.5*(1+.22*e.roughness),Hc(e));for(let t=1;t<r.length;t++){const n=r[t];if(n.length){const t=Xc(n,1*(1+.2*e.roughness),e),r=e.disableMultiStroke?[]:Xc(n,1.5*(1+.22*e.roughness),Hc(e));for(const e of t)"move"!==e.op&&i.push(e);for(const e of r)"move"!==e.op&&a.push(e)}}return{type:"path",ops:i.concat(a)}}return{type:"path",ops:[]}}function Rc(t,e,r){const i=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(t/2,2)+Math.pow(e/2,2))/2)),a=Math.ceil(Math.max(r.curveStepCount,r.curveStepCount/Math.sqrt(200)*i)),n=2*Math.PI/a;let o=Math.abs(t/2),s=Math.abs(e/2);const l=1-r.curveFitting;return o+=Vc(o*l,r),s+=Vc(s*l,r),{increment:n,rx:o,ry:s}}function qc(t,e,r,i){const[a,n]=Kc(i.increment,t,e,i.rx,i.ry,1,i.increment*Yc(.1,Yc(.4,1,r),r),r);let o=Qc(a,null,r);if(!r.disableMultiStroke&&0!==r.roughness){const[a]=Kc(i.increment,t,e,i.rx,i.ry,1.5,0,r),n=Qc(a,null,r);o=o.concat(n)}return{estimatedPoints:n,opset:{type:"path",ops:o}}}function zc(t,e,r,i,a,n,o,s,l){const h=t,c=e;let d=Math.abs(r/2),u=Math.abs(i/2);d+=Vc(.01*d,l),u+=Vc(.01*u,l);let p=a,g=n;for(;p<0;)p+=2*Math.PI,g+=2*Math.PI;g-p>2*Math.PI&&(p=0,g=2*Math.PI);const f=2*Math.PI/l.curveStepCount,y=Math.min(f/2,(g-p)/2),m=Jc(y,h,c,d,u,p,g,1,l);if(!l.disableMultiStroke){const t=Jc(y,h,c,d,u,p,g,1.5,l);m.push(...t)}return o&&(s?m.push(...Gc(h,c,h+d*Math.cos(p),c+u*Math.sin(p),l),...Gc(h,c,h+d*Math.cos(g),c+u*Math.sin(g),l)):m.push({op:"lineTo",data:[h,c]},{op:"lineTo",data:[h+d*Math.cos(p),c+u*Math.sin(p)]})),{type:"path",ops:m}}function Wc(t,e){const r=Ac(Fc(Mc(t))),i=[];let a=[0,0],n=[0,0];for(const{key:o,data:s}of r)switch(o){case"M":n=[s[0],s[1]],a=[s[0],s[1]];break;case"L":i.push(...Gc(n[0],n[1],s[0],s[1],e)),n=[s[0],s[1]];break;case"C":{const[t,r,a,o,l,h]=s;i.push(...td(t,r,a,o,l,h,n,e)),n=[l,h];break}case"Z":i.push(...Gc(n[0],n[1],a[0],a[1],e)),n=[a[0],a[1]]}return{type:"path",ops:i}}function Nc(t,e){const r=[];for(const i of t)if(i.length){const t=e.maxRandomnessOffset||0,a=i.length;if(a>2){r.push({op:"move",data:[i[0][0]+Vc(t,e),i[0][1]+Vc(t,e)]});for(let n=1;n<a;n++)r.push({op:"lineTo",data:[i[n][0]+Vc(t,e),i[n][1]+Vc(t,e)]})}}return{type:"fillPath",ops:r}}function jc(t,e){return function(t,e){let r=t.fillStyle||"hachure";if(!vc[r])switch(r){case"zigzag":vc[r]||(vc[r]=new Cc(e));break;case"cross-hatch":vc[r]||(vc[r]=new kc(e));break;case"dots":vc[r]||(vc[r]=new wc(e));break;case"dashed":vc[r]||(vc[r]=new Sc(e));break;case"zigzag-line":vc[r]||(vc[r]=new Tc(e));break;default:r="hachure",vc[r]||(vc[r]=new xc(e))}return vc[r]}(e,Dc).fillPolygons(t,e)}function Hc(t){const e=Object.assign({},t);return e.randomizer=void 0,t.seed&&(e.seed=t.seed+1),e}function Uc(t){return t.randomizer||(t.randomizer=new Bc(t.seed||0)),t.randomizer.next()}function Yc(t,e,r,i=1){return r.roughness*i*(Uc(r)*(e-t)+t)}function Vc(t,e,r=1){return Yc(-t,t,e,r)}function Gc(t,e,r,i,a,n=!1){const o=n?a.disableMultiStrokeFill:a.disableMultiStroke,s=Zc(t,e,r,i,a,!0,!1);if(o)return s;const l=Zc(t,e,r,i,a,!0,!0);return s.concat(l)}function Zc(t,e,r,i,a,n,o){const s=Math.pow(t-r,2)+Math.pow(e-i,2),l=Math.sqrt(s);let h=1;h=l<200?1:l>500?.4:-.0016668*l+1.233334;let c=a.maxRandomnessOffset||0;c*c*100>s&&(c=l/10);const d=c/2,u=.2+.2*Uc(a);let p=a.bowing*a.maxRandomnessOffset*(i-e)/200,g=a.bowing*a.maxRandomnessOffset*(t-r)/200;p=Vc(p,a,h),g=Vc(g,a,h);const f=[],y=()=>Vc(d,a,h),m=()=>Vc(c,a,h),x=a.preserveVertices;return o?f.push({op:"move",data:[t+(x?0:y()),e+(x?0:y())]}):f.push({op:"move",data:[t+(x?0:Vc(c,a,h)),e+(x?0:Vc(c,a,h))]}),o?f.push({op:"bcurveTo",data:[p+t+(r-t)*u+y(),g+e+(i-e)*u+y(),p+t+2*(r-t)*u+y(),g+e+2*(i-e)*u+y(),r+(x?0:y()),i+(x?0:y())]}):f.push({op:"bcurveTo",data:[p+t+(r-t)*u+m(),g+e+(i-e)*u+m(),p+t+2*(r-t)*u+m(),g+e+2*(i-e)*u+m(),r+(x?0:m()),i+(x?0:m())]}),f}function Xc(t,e,r){if(!t.length)return[];const i=[];i.push([t[0][0]+Vc(e,r),t[0][1]+Vc(e,r)]),i.push([t[0][0]+Vc(e,r),t[0][1]+Vc(e,r)]);for(let a=1;a<t.length;a++)i.push([t[a][0]+Vc(e,r),t[a][1]+Vc(e,r)]),a===t.length-1&&i.push([t[a][0]+Vc(e,r),t[a][1]+Vc(e,r)]);return Qc(i,null,r)}function Qc(t,e,r){const i=t.length,a=[];if(i>3){const e=[],n=1-r.curveTightness;a.push({op:"move",data:[t[1][0],t[1][1]]});for(let r=1;r+2<i;r++){const i=t[r];e[0]=[i[0],i[1]],e[1]=[i[0]+(n*t[r+1][0]-n*t[r-1][0])/6,i[1]+(n*t[r+1][1]-n*t[r-1][1])/6],e[2]=[t[r+1][0]+(n*t[r][0]-n*t[r+2][0])/6,t[r+1][1]+(n*t[r][1]-n*t[r+2][1])/6],e[3]=[t[r+1][0],t[r+1][1]],a.push({op:"bcurveTo",data:[e[1][0],e[1][1],e[2][0],e[2][1],e[3][0],e[3][1]]})}}else 3===i?(a.push({op:"move",data:[t[1][0],t[1][1]]}),a.push({op:"bcurveTo",data:[t[1][0],t[1][1],t[2][0],t[2][1],t[2][0],t[2][1]]})):2===i&&a.push(...Zc(t[0][0],t[0][1],t[1][0],t[1][1],r,0,!0));return a}function Kc(t,e,r,i,a,n,o,s){const l=[],h=[];if(0===s.roughness){t/=4,h.push([e+i*Math.cos(-t),r+a*Math.sin(-t)]);for(let n=0;n<=2*Math.PI;n+=t){const t=[e+i*Math.cos(n),r+a*Math.sin(n)];l.push(t),h.push(t)}h.push([e+i*Math.cos(0),r+a*Math.sin(0)]),h.push([e+i*Math.cos(t),r+a*Math.sin(t)])}else{const c=Vc(.5,s)-Math.PI/2;h.push([Vc(n,s)+e+.9*i*Math.cos(c-t),Vc(n,s)+r+.9*a*Math.sin(c-t)]);const d=2*Math.PI+c-.01;for(let o=c;o<d;o+=t){const t=[Vc(n,s)+e+i*Math.cos(o),Vc(n,s)+r+a*Math.sin(o)];l.push(t),h.push(t)}h.push([Vc(n,s)+e+i*Math.cos(c+2*Math.PI+.5*o),Vc(n,s)+r+a*Math.sin(c+2*Math.PI+.5*o)]),h.push([Vc(n,s)+e+.98*i*Math.cos(c+o),Vc(n,s)+r+.98*a*Math.sin(c+o)]),h.push([Vc(n,s)+e+.9*i*Math.cos(c+.5*o),Vc(n,s)+r+.9*a*Math.sin(c+.5*o)])}return[h,l]}function Jc(t,e,r,i,a,n,o,s,l){const h=n+Vc(.1,l),c=[];c.push([Vc(s,l)+e+.9*i*Math.cos(h-t),Vc(s,l)+r+.9*a*Math.sin(h-t)]);for(let d=h;d<=o;d+=t)c.push([Vc(s,l)+e+i*Math.cos(d),Vc(s,l)+r+a*Math.sin(d)]);return c.push([e+i*Math.cos(o),r+a*Math.sin(o)]),c.push([e+i*Math.cos(o),r+a*Math.sin(o)]),Qc(c,0,l)}function td(t,e,r,i,a,n,o,s){const l=[],h=[s.maxRandomnessOffset||1,(s.maxRandomnessOffset||1)+.3];let c=[0,0];const d=s.disableMultiStroke?1:2,u=s.preserveVertices;for(let p=0;p<d;p++)0===p?l.push({op:"move",data:[o[0],o[1]]}):l.push({op:"move",data:[o[0]+(u?0:Vc(h[0],s)),o[1]+(u?0:Vc(h[0],s))]}),c=u?[a,n]:[a+Vc(h[p],s),n+Vc(h[p],s)],l.push({op:"bcurveTo",data:[t+Vc(h[p],s),e+Vc(h[p],s),r+Vc(h[p],s),i+Vc(h[p],s),c[0],c[1]]});return l}function ed(t){return[...t]}function rd(t,e=0){const r=t.length;if(r<3)throw new Error("A curve must have at least three points.");const i=[];if(3===r)i.push(ed(t[0]),ed(t[1]),ed(t[2]),ed(t[2]));else{const r=[];r.push(t[0],t[0]);for(let e=1;e<t.length;e++)r.push(t[e]),e===t.length-1&&r.push(t[e]);const a=[],n=1-e;i.push(ed(r[0]));for(let t=1;t+2<r.length;t++){const e=r[t];a[0]=[e[0],e[1]],a[1]=[e[0]+(n*r[t+1][0]-n*r[t-1][0])/6,e[1]+(n*r[t+1][1]-n*r[t-1][1])/6],a[2]=[r[t+1][0]+(n*r[t][0]-n*r[t+2][0])/6,r[t+1][1]+(n*r[t][1]-n*r[t+2][1])/6],a[3]=[r[t+1][0],r[t+1][1]],i.push(a[1],a[2],a[3])}}return i}function id(t,e){return Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2)}function ad(t,e,r){const i=id(e,r);if(0===i)return id(t,e);let a=((t[0]-e[0])*(r[0]-e[0])+(t[1]-e[1])*(r[1]-e[1]))/i;return a=Math.max(0,Math.min(1,a)),id(t,nd(e,r,a))}function nd(t,e,r){return[t[0]+(e[0]-t[0])*r,t[1]+(e[1]-t[1])*r]}function od(t,e,r,i){const a=i||[];if(function(t,e){const r=t[e+0],i=t[e+1],a=t[e+2],n=t[e+3];let o=3*i[0]-2*r[0]-n[0];o*=o;let s=3*i[1]-2*r[1]-n[1];s*=s;let l=3*a[0]-2*n[0]-r[0];l*=l;let h=3*a[1]-2*n[1]-r[1];return h*=h,o<l&&(o=l),s<h&&(s=h),o+s}(t,e)<r){const r=t[e+0];a.length?(n=a[a.length-1],o=r,Math.sqrt(id(n,o))>1&&a.push(r)):a.push(r),a.push(t[e+3])}else{const i=.5,n=t[e+0],o=t[e+1],s=t[e+2],l=t[e+3],h=nd(n,o,i),c=nd(o,s,i),d=nd(s,l,i),u=nd(h,c,i),p=nd(c,d,i),g=nd(u,p,i);od([n,h,u,g],0,r,a),od([g,p,d,l],0,r,a)}var n,o;return a}function sd(t,e){return ld(t,0,t.length,e)}function ld(t,e,r,i,a){const n=a||[],o=t[e],s=t[r-1];let l=0,h=1;for(let c=e+1;c<r-1;++c){const e=ad(t[c],o,s);e>l&&(l=e,h=c)}return Math.sqrt(l)>i?(ld(t,e,h+1,i,n),ld(t,h,r,i,n)):(n.length||n.push(o),n.push(s)),n}function hd(t,e=.15,r){const i=[],a=(t.length-1)/3;for(let n=0;n<a;n++)od(t,3*n,e,i);return r&&r>0?ld(i,0,i.length,r):i}const cd="none";class dd{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,e,r){return{shape:t,sets:e||[],options:r||this.defaultOptions}}line(t,e,r,i,a){const n=this._o(a);return this._d("line",[Ic(t,e,r,i,n)],n)}rectangle(t,e,r,i,a){const n=this._o(a),o=[],s=function(t,e,r,i,a){return Oc([[t,e],[t+r,e],[t+r,e+i],[t,e+i]],!0,a)}(t,e,r,i,n);if(n.fill){const a=[[t,e],[t+r,e],[t+r,e+i],[t,e+i]];"solid"===n.fillStyle?o.push(Nc([a],n)):o.push(jc([a],n))}return n.stroke!==cd&&o.push(s),this._d("rectangle",o,n)}ellipse(t,e,r,i,a){const n=this._o(a),o=[],s=Rc(r,i,n),l=qc(t,e,n,s);if(n.fill)if("solid"===n.fillStyle){const r=qc(t,e,n,s).opset;r.type="fillPath",o.push(r)}else o.push(jc([l.estimatedPoints],n));return n.stroke!==cd&&o.push(l.opset),this._d("ellipse",o,n)}circle(t,e,r,i){const a=this.ellipse(t,e,r,r,i);return a.shape="circle",a}linearPath(t,e){const r=this._o(e);return this._d("linearPath",[Oc(t,!1,r)],r)}arc(t,e,r,i,a,n,o=!1,s){const l=this._o(s),h=[],c=zc(t,e,r,i,a,n,o,!0,l);if(o&&l.fill)if("solid"===l.fillStyle){const o=Object.assign({},l);o.disableMultiStroke=!0;const s=zc(t,e,r,i,a,n,!0,!1,o);s.type="fillPath",h.push(s)}else h.push(function(t,e,r,i,a,n,o){const s=t,l=e;let h=Math.abs(r/2),c=Math.abs(i/2);h+=Vc(.01*h,o),c+=Vc(.01*c,o);let d=a,u=n;for(;d<0;)d+=2*Math.PI,u+=2*Math.PI;u-d>2*Math.PI&&(d=0,u=2*Math.PI);const p=(u-d)/o.curveStepCount,g=[];for(let f=d;f<=u;f+=p)g.push([s+h*Math.cos(f),l+c*Math.sin(f)]);return g.push([s+h*Math.cos(u),l+c*Math.sin(u)]),g.push([s,l]),jc([g],o)}(t,e,r,i,a,n,l));return l.stroke!==cd&&h.push(c),this._d("arc",h,l)}curve(t,e){const r=this._o(e),i=[],a=Pc(t,r);if(r.fill&&r.fill!==cd)if("solid"===r.fillStyle){const e=Pc(t,Object.assign(Object.assign({},r),{disableMultiStroke:!0,roughness:r.roughness?r.roughness+r.fillShapeRoughnessGain:0}));i.push({type:"fillPath",ops:this._mergedShape(e.ops)})}else{const e=[],a=t;if(a.length){const t="number"==typeof a[0][0]?[a]:a;for(const i of t)i.length<3?e.push(...i):3===i.length?e.push(...hd(rd([i[0],i[0],i[1],i[2]]),10,(1+r.roughness)/2)):e.push(...hd(rd(i),10,(1+r.roughness)/2))}e.length&&i.push(jc([e],r))}return r.stroke!==cd&&i.push(a),this._d("curve",i,r)}polygon(t,e){const r=this._o(e),i=[],a=Oc(t,!0,r);return r.fill&&("solid"===r.fillStyle?i.push(Nc([t],r)):i.push(jc([t],r))),r.stroke!==cd&&i.push(a),this._d("polygon",i,r)}path(t,e){const r=this._o(e),i=[];if(!t)return this._d("path",i,r);t=(t||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const a=r.fill&&"transparent"!==r.fill&&r.fill!==cd,n=r.stroke!==cd,o=!!(r.simplification&&r.simplification<1),s=function(t,e,r){const i=Ac(Fc(Mc(t))),a=[];let n=[],o=[0,0],s=[];const l=()=>{s.length>=4&&n.push(...hd(s,1)),s=[]},h=()=>{l(),n.length&&(a.push(n),n=[])};for(const{key:d,data:u}of i)switch(d){case"M":h(),o=[u[0],u[1]],n.push(o);break;case"L":l(),n.push([u[0],u[1]]);break;case"C":if(!s.length){const t=n.length?n[n.length-1]:o;s.push([t[0],t[1]])}s.push([u[0],u[1]]),s.push([u[2],u[3]]),s.push([u[4],u[5]]);break;case"Z":l(),n.push([o[0],o[1]])}if(h(),!r)return a;const c=[];for(const d of a){const t=sd(d,r);t.length&&c.push(t)}return c}(t,0,o?4-4*(r.simplification||1):(1+r.roughness)/2),l=Wc(t,r);if(a)if("solid"===r.fillStyle)if(1===s.length){const e=Wc(t,Object.assign(Object.assign({},r),{disableMultiStroke:!0,roughness:r.roughness?r.roughness+r.fillShapeRoughnessGain:0}));i.push({type:"fillPath",ops:this._mergedShape(e.ops)})}else i.push(Nc(s,r));else i.push(jc(s,r));return n&&(o?s.forEach((t=>{i.push(Oc(t,!1,r))})):i.push(l)),this._d("path",i,r)}opsToPath(t,e){let r="";for(const i of t.ops){const t="number"==typeof e&&e>=0?i.data.map((t=>+t.toFixed(e))):i.data;switch(i.op){case"move":r+=`M${t[0]} ${t[1]} `;break;case"bcurveTo":r+=`C${t[0]} ${t[1]}, ${t[2]} ${t[3]}, ${t[4]} ${t[5]} `;break;case"lineTo":r+=`L${t[0]} ${t[1]} `}}return r.trim()}toPaths(t){const e=t.sets||[],r=t.options||this.defaultOptions,i=[];for(const a of e){let t=null;switch(a.type){case"path":t={d:this.opsToPath(a),stroke:r.stroke,strokeWidth:r.strokeWidth,fill:cd};break;case"fillPath":t={d:this.opsToPath(a),stroke:cd,strokeWidth:0,fill:r.fill||cd};break;case"fillSketch":t=this.fillSketch(a,r)}t&&i.push(t)}return i}fillSketch(t,e){let r=e.fillWeight;return r<0&&(r=e.strokeWidth/2),{d:this.opsToPath(t),stroke:e.fill||cd,strokeWidth:r,fill:cd}}_mergedShape(t){return t.filter(((t,e)=>0===e||"move"!==t.op))}}const ud="http://www.w3.org/2000/svg";class pd{constructor(t,e){this.svg=t,this.gen=new dd(e)}draw(t){const e=t.sets||[],r=t.options||this.getDefaultOptions(),i=this.svg.ownerDocument||window.document,a=i.createElementNS(ud,"g"),n=t.options.fixedDecimalPlaceDigits;for(const o of e){let e=null;switch(o.type){case"path":e=i.createElementNS(ud,"path"),e.setAttribute("d",this.opsToPath(o,n)),e.setAttribute("stroke",r.stroke),e.setAttribute("stroke-width",r.strokeWidth+""),e.setAttribute("fill","none"),r.strokeLineDash&&e.setAttribute("stroke-dasharray",r.strokeLineDash.join(" ").trim()),r.strokeLineDashOffset&&e.setAttribute("stroke-dashoffset",`${r.strokeLineDashOffset}`);break;case"fillPath":e=i.createElementNS(ud,"path"),e.setAttribute("d",this.opsToPath(o,n)),e.setAttribute("stroke","none"),e.setAttribute("stroke-width","0"),e.setAttribute("fill",r.fill||""),"curve"!==t.shape&&"polygon"!==t.shape||e.setAttribute("fill-rule","evenodd");break;case"fillSketch":e=this.fillSketch(i,o,r)}e&&a.appendChild(e)}return a}fillSketch(t,e,r){let i=r.fillWeight;i<0&&(i=r.strokeWidth/2);const a=t.createElementNS(ud,"path");return a.setAttribute("d",this.opsToPath(e,r.fixedDecimalPlaceDigits)),a.setAttribute("stroke",r.fill||""),a.setAttribute("stroke-width",i+""),a.setAttribute("fill","none"),r.fillLineDash&&a.setAttribute("stroke-dasharray",r.fillLineDash.join(" ").trim()),r.fillLineDashOffset&&a.setAttribute("stroke-dashoffset",`${r.fillLineDashOffset}`),a}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(t,e){return this.gen.opsToPath(t,e)}line(t,e,r,i,a){const n=this.gen.line(t,e,r,i,a);return this.draw(n)}rectangle(t,e,r,i,a){const n=this.gen.rectangle(t,e,r,i,a);return this.draw(n)}ellipse(t,e,r,i,a){const n=this.gen.ellipse(t,e,r,i,a);return this.draw(n)}circle(t,e,r,i){const a=this.gen.circle(t,e,r,i);return this.draw(a)}linearPath(t,e){const r=this.gen.linearPath(t,e);return this.draw(r)}polygon(t,e){const r=this.gen.polygon(t,e);return this.draw(r)}arc(t,e,r,i,a,n,o=!1,s){const l=this.gen.arc(t,e,r,i,a,n,o,s);return this.draw(l)}curve(t,e){const r=this.gen.curve(t,e);return this.draw(r)}path(t,e){const r=this.gen.path(t,e);return this.draw(r)}}var gd=(t,e)=>new pd(t,e),fd=Cr(((t,e)=>{var r,i,a=t.x,n=t.y,o=e.x-a,s=e.y-n,l=t.width/2,h=t.height/2;return Math.abs(s)*l>Math.abs(o)*h?(s<0&&(h=-h),r=0===s?0:h*o/s,i=h):(o<0&&(l=-l),r=l,i=0===o?0:l*s/o),{x:a+r,y:n+i}}),"intersectRect");function yd(t,e){e&&t.attr("style",e)}async function md(t){const e=Z(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),r=e.append("xhtml:div");let i=t.label;t.label&&ji(t.label)&&(i=await Ui(t.label.replace(Yi.lineBreakRegex,"\n"),fa()));const a=t.isNode?"nodeLabel":"edgeLabel";return r.html('<span class="'+a+'" '+(t.labelStyle?'style="'+t.labelStyle+'"':"")+">"+i+"</span>"),yd(r,t.labelStyle),r.style("display","inline-block"),r.style("padding-right","1px"),r.style("white-space","nowrap"),r.attr("xmlns","http://www.w3.org/1999/xhtml"),e.node()}Cr(yd,"applyStyle"),Cr(md,"addHtmlLabel");var xd=Cr((async(t,e,r,i)=>{let a=t||"";if("object"==typeof a&&(a=a[0]),Di(fa().flowchart.htmlLabels)){a=a.replace(/\\n|\n/g,"<br />"),Sr.info("vertexText"+a);const t={isNode:i,label:Wl(a).replace(/fa[blrs]?:fa-[\w-]+/g,(t=>`<i class='${t.replace(":"," ")}'></i>`)),labelStyle:e?e.replace("fill:","color:"):e};return await md(t)}{const t=document.createElementNS("http://www.w3.org/2000/svg","text");t.setAttribute("style",e.replace("color:","fill:"));let i=[];i="string"==typeof a?a.split(/\\n|\n|<br\s*\/?>/gi):Array.isArray(a)?a:[];for(const e of i){const i=document.createElementNS("http://www.w3.org/2000/svg","tspan");i.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),i.setAttribute("dy","1em"),i.setAttribute("x","0"),r?i.setAttribute("class","title-row"):i.setAttribute("class","row"),i.textContent=e.trim(),t.appendChild(i)}return t}}),"createLabel"),bd=Cr(((t,e,r,i,a)=>["M",t+a,e,"H",t+r-a,"A",a,a,0,0,1,t+r,e+a,"V",e+i-a,"A",a,a,0,0,1,t+r-a,e+i,"H",t+a,"A",a,a,0,0,1,t,e+i-a,"V",e+a,"A",a,a,0,0,1,t+a,e,"Z"].join(" ")),"createRoundedRectPathD"),Cd=Cr((t=>{const{handDrawnSeed:e}=fa();return{fill:t,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:t,seed:e}}),"solidStateFill"),kd=Cr((t=>{const e=wd([...t.cssCompiledStyles||[],...t.cssStyles||[]]);return{stylesMap:e,stylesArray:[...e]}}),"compileStyles"),wd=Cr((t=>{const e=new Map;return t.forEach((t=>{const[r,i]=t.split(":");e.set(r.trim(),null==i?void 0:i.trim())})),e}),"styles2Map"),Sd=Cr((t=>{const{stylesArray:e}=kd(t),r=[],i=[],a=[],n=[];return e.forEach((t=>{const e=t[0];"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"===e?r.push(t.join(":")+" !important"):(i.push(t.join(":")+" !important"),e.includes("stroke")&&a.push(t.join(":")+" !important"),"fill"===e&&n.push(t.join(":")+" !important"))})),{labelStyles:r.join(";"),nodeStyles:i.join(";"),stylesArray:e,borderStyles:a,backgroundStyles:n}}),"styles2String"),Td=Cr(((t,e)=>{var r;const{themeVariables:i,handDrawnSeed:a}=fa(),{nodeBorder:n,mainBkg:o}=i,{stylesMap:s}=kd(t);return Object.assign({roughness:.7,fill:s.get("fill")||o,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:s.get("stroke")||n,seed:a,strokeWidth:(null==(r=s.get("stroke-width"))?void 0:r.replace("px",""))||1.3,fillLineDash:[0,0]},e)}),"userNodeOverrides"),vd=Cr((async(t,e)=>{Sr.info("Creating subgraph rect for ",e.id,e);const r=fa(),{themeVariables:i,handDrawnSeed:a}=r,{clusterBkg:n,clusterBorder:o}=i,{labelStyles:s,nodeStyles:l,borderStyles:h,backgroundStyles:c}=Sd(e),d=t.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.id).attr("data-look",e.look),u=Di(r.flowchart.htmlLabels),p=d.insert("g").attr("class","cluster-label "),g=await gc(p,e.label,{style:e.labelStyle,useHtmlLabels:u,isNode:!0});let f=g.getBBox();if(Di(r.flowchart.htmlLabels)){const t=g.children[0],e=Z(g);f=t.getBoundingClientRect(),e.attr("width",f.width),e.attr("height",f.height)}const y=e.width<=f.width+e.padding?f.width+e.padding:e.width;e.width<=f.width+e.padding?e.diff=(y-e.width)/2-e.padding:e.diff=-e.padding;const m=e.height,x=e.x-y/2,b=e.y-m/2;let C;if(Sr.trace("Data ",e,JSON.stringify(e)),"handDrawn"===e.look){const t=gd(d),r=Td(e,{roughness:.7,fill:n,stroke:o,fillWeight:3,seed:a}),i=t.path(bd(x,b,y,m,0),r);C=d.insert((()=>(Sr.debug("Rough node insert CXC",i),i)),":first-child"),C.select("path:nth-child(2)").attr("style",h.join(";")),C.select("path").attr("style",c.join(";").replace("fill","stroke"))}else C=d.insert("rect",":first-child"),C.attr("style",l).attr("rx",e.rx).attr("ry",e.ry).attr("x",x).attr("y",b).attr("width",y).attr("height",m);const{subGraphTitleTopMargin:k}=Vs(r);if(p.attr("transform",`translate(${e.x-f.width/2}, ${e.y-e.height/2+k})`),s){const t=p.select("span");t&&t.attr("style",s)}const w=C.node().getBBox();return e.offsetX=0,e.width=w.width,e.height=w.height,e.offsetY=f.height-e.padding/2,e.intersect=function(t){return fd(e,t)},{cluster:d,labelBBox:f}}),"rect"),Bd=Cr(((t,e)=>{const r=t.insert("g").attr("class","note-cluster").attr("id",e.id),i=r.insert("rect",":first-child"),a=0*e.padding,n=a/2;i.attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-e.width/2-n).attr("y",e.y-e.height/2-n).attr("width",e.width+a).attr("height",e.height+a).attr("fill","none");const o=i.node().getBBox();return e.width=o.width,e.height=o.height,e.intersect=function(t){return fd(e,t)},{cluster:r,labelBBox:{width:0,height:0}}}),"noteGroup"),_d={rect:vd,squareRect:vd,roundedWithTitle:Cr((async(t,e)=>{const r=fa(),{themeVariables:i,handDrawnSeed:a}=r,{altBackground:n,compositeBackground:o,compositeTitleBackground:s,nodeBorder:l}=i,h=t.insert("g").attr("class",e.cssClasses).attr("id",e.id).attr("data-id",e.id).attr("data-look",e.look),c=h.insert("g",":first-child"),d=h.insert("g").attr("class","cluster-label");let u=h.append("rect");const p=d.node().appendChild(await xd(e.label,e.labelStyle,void 0,!0));let g=p.getBBox();if(Di(r.flowchart.htmlLabels)){const t=p.children[0],e=Z(p);g=t.getBoundingClientRect(),e.attr("width",g.width),e.attr("height",g.height)}const f=0*e.padding,y=f/2,m=(e.width<=g.width+e.padding?g.width+e.padding:e.width)+f;e.width<=g.width+e.padding?e.diff=(m-e.width)/2-e.padding:e.diff=-e.padding;const x=e.height+f,b=e.height+f-g.height-6,C=e.x-m/2,k=e.y-x/2;e.width=m;const w=e.y-e.height/2-y+g.height+2;let S;if("handDrawn"===e.look){const t=e.cssClasses.includes("statediagram-cluster-alt"),r=gd(h),i=e.rx||e.ry?r.path(bd(C,k,m,x,10),{roughness:.7,fill:s,fillStyle:"solid",stroke:l,seed:a}):r.rectangle(C,k,m,x,{seed:a});S=h.insert((()=>i),":first-child");const c=r.rectangle(C,w,m,b,{fill:t?n:o,fillStyle:t?"hachure":"solid",stroke:l,seed:a});S=h.insert((()=>i),":first-child"),u=h.insert((()=>c))}else{S=c.insert("rect",":first-child");const t="outer";S.attr("class",t).attr("x",C).attr("y",k).attr("width",m).attr("height",x).attr("data-look",e.look),u.attr("class","inner").attr("x",C).attr("y",w).attr("width",m).attr("height",b)}d.attr("transform",`translate(${e.x-g.width/2}, ${k+1-(Di(r.flowchart.htmlLabels)?0:3)})`);const T=S.node().getBBox();return e.height=T.height,e.offsetX=0,e.offsetY=g.height-e.padding/2,e.labelBBox=g,e.intersect=function(t){return fd(e,t)},{cluster:h,labelBBox:g}}),"roundedWithTitle"),noteGroup:Bd,divider:Cr(((t,e)=>{const r=fa(),{themeVariables:i,handDrawnSeed:a}=r,{nodeBorder:n}=i,o=t.insert("g").attr("class",e.cssClasses).attr("id",e.id).attr("data-look",e.look),s=o.insert("g",":first-child"),l=0*e.padding,h=e.width+l;e.diff=-e.padding;const c=e.height+l,d=e.x-h/2,u=e.y-c/2;let p;if(e.width=h,"handDrawn"===e.look){const t=gd(o).rectangle(d,u,h,c,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:n,seed:a});p=o.insert((()=>t),":first-child")}else{p=s.insert("rect",":first-child");const t="divider";p.attr("class",t).attr("x",d).attr("y",u).attr("width",h).attr("height",c).attr("data-look",e.look)}const g=p.node().getBBox();return e.height=g.height,e.offsetX=0,e.offsetY=0,e.intersect=function(t){return fd(e,t)},{cluster:o,labelBBox:{}}}),"divider")},Ld=new Map,Md=Cr((async(t,e)=>{const r=e.shape||"rect",i=await _d[r](t,e);return Ld.set(e.id,i),i}),"insertCluster"),Fd=Cr((()=>{Ld=new Map}),"clear"),Ad=Cr(((t,e,r,i,a)=>{e.arrowTypeStart&&Ed(t,"start",e.arrowTypeStart,r,i,a),e.arrowTypeEnd&&Ed(t,"end",e.arrowTypeEnd,r,i,a)}),"addEdgeMarkers"),$d={arrow_cross:"cross",arrow_point:"point",arrow_barb:"barb",arrow_circle:"circle",aggregation:"aggregation",extension:"extension",composition:"composition",dependency:"dependency",lollipop:"lollipop"},Ed=Cr(((t,e,r,i,a,n)=>{const o=$d[r];if(!o)return void Sr.warn(`Unknown arrow type: ${r}`);const s="start"===e?"Start":"End";t.attr(`marker-${e}`,`url(${i}#${a}_${n}-${o}${s})`)}),"addEdgeMarker"),Dd=new Map,Id=new Map,Od=Cr((()=>{Dd.clear(),Id.clear()}),"clear"),Pd=Cr((t=>t?t.reduce(((t,e)=>t+";"+e),""):""),"getLabelStyles"),Rd=Cr((async(t,e)=>{let r=Di(fa().flowchart.htmlLabels);const i=await gc(t,e.label,{style:Pd(e.labelStyle),useHtmlLabels:r,addSvgBackground:!0,isNode:!1});Sr.info("abc82",e,e.labelType);const a=t.insert("g").attr("class","edgeLabel"),n=a.insert("g").attr("class","label");n.node().appendChild(i);let o,s=i.getBBox();if(r){const t=i.children[0],e=Z(i);s=t.getBoundingClientRect(),e.attr("width",s.width),e.attr("height",s.height)}if(n.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"),Dd.set(e.id,a),e.width=s.width,e.height=s.height,e.startLabelLeft){const r=await xd(e.startLabelLeft,Pd(e.labelStyle)),i=t.insert("g").attr("class","edgeTerminals"),a=i.insert("g").attr("class","inner");o=a.node().appendChild(r);const n=r.getBBox();a.attr("transform","translate("+-n.width/2+", "+-n.height/2+")"),Id.get(e.id)||Id.set(e.id,{}),Id.get(e.id).startLeft=i,qd(o,e.startLabelLeft)}if(e.startLabelRight){const r=await xd(e.startLabelRight,Pd(e.labelStyle)),i=t.insert("g").attr("class","edgeTerminals"),a=i.insert("g").attr("class","inner");o=i.node().appendChild(r),a.node().appendChild(r);const n=r.getBBox();a.attr("transform","translate("+-n.width/2+", "+-n.height/2+")"),Id.get(e.id)||Id.set(e.id,{}),Id.get(e.id).startRight=i,qd(o,e.startLabelRight)}if(e.endLabelLeft){const r=await xd(e.endLabelLeft,Pd(e.labelStyle)),i=t.insert("g").attr("class","edgeTerminals"),a=i.insert("g").attr("class","inner");o=a.node().appendChild(r);const n=r.getBBox();a.attr("transform","translate("+-n.width/2+", "+-n.height/2+")"),i.node().appendChild(r),Id.get(e.id)||Id.set(e.id,{}),Id.get(e.id).endLeft=i,qd(o,e.endLabelLeft)}if(e.endLabelRight){const r=await xd(e.endLabelRight,Pd(e.labelStyle)),i=t.insert("g").attr("class","edgeTerminals"),a=i.insert("g").attr("class","inner");o=a.node().appendChild(r);const n=r.getBBox();a.attr("transform","translate("+-n.width/2+", "+-n.height/2+")"),i.node().appendChild(r),Id.get(e.id)||Id.set(e.id,{}),Id.get(e.id).endRight=i,qd(o,e.endLabelRight)}return i}),"insertEdgeLabel");function qd(t,e){fa().flowchart.htmlLabels&&t&&(t.style.width=9*e.length+"px",t.style.height="12px")}Cr(qd,"setTerminalWidth");var zd=Cr(((t,e)=>{Sr.debug("Moving label abc88 ",t.id,t.label,Dd.get(t.id),e);let r=e.updatedPath?e.updatedPath:e.originalPath;const i=fa(),{subGraphTitleTotalMargin:a}=Vs(i);if(t.label){const i=Dd.get(t.id);let n=t.x,o=t.y;if(r){const i=ql.calcLabelPosition(r);Sr.debug("Moving label "+t.label+" from (",n,",",o,") to (",i.x,",",i.y,") abc88"),e.updatedPath&&(n=i.x,o=i.y)}i.attr("transform",`translate(${n}, ${o+a/2})`)}if(t.startLabelLeft){const e=Id.get(t.id).startLeft;let i=t.x,a=t.y;if(r){const e=ql.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_left",r);i=e.x,a=e.y}e.attr("transform",`translate(${i}, ${a})`)}if(t.startLabelRight){const e=Id.get(t.id).startRight;let i=t.x,a=t.y;if(r){const e=ql.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_right",r);i=e.x,a=e.y}e.attr("transform",`translate(${i}, ${a})`)}if(t.endLabelLeft){const e=Id.get(t.id).endLeft;let i=t.x,a=t.y;if(r){const e=ql.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_left",r);i=e.x,a=e.y}e.attr("transform",`translate(${i}, ${a})`)}if(t.endLabelRight){const e=Id.get(t.id).endRight;let i=t.x,a=t.y;if(r){const e=ql.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_right",r);i=e.x,a=e.y}e.attr("transform",`translate(${i}, ${a})`)}}),"positionEdgeLabel"),Wd=Cr(((t,e)=>{const r=t.x,i=t.y,a=Math.abs(e.x-r),n=Math.abs(e.y-i),o=t.width/2,s=t.height/2;return a>=o||n>=s}),"outsideNode"),Nd=Cr(((t,e,r)=>{Sr.debug(`intersection calc abc89:\n outsidePoint: ${JSON.stringify(e)}\n insidePoint : ${JSON.stringify(r)}\n node : x:${t.x} y:${t.y} w:${t.width} h:${t.height}`);const i=t.x,a=t.y,n=Math.abs(i-r.x),o=t.width/2;let s=r.x<e.x?o-n:o+n;const l=t.height/2,h=Math.abs(e.y-r.y),c=Math.abs(e.x-r.x);if(Math.abs(a-e.y)*o>Math.abs(i-e.x)*l){let t=r.y<e.y?e.y-l-a:a-l-e.y;s=c*t/h;const i={x:r.x<e.x?r.x+s:r.x-c+s,y:r.y<e.y?r.y+h-t:r.y-h+t};return 0===s&&(i.x=e.x,i.y=e.y),0===c&&(i.x=e.x),0===h&&(i.y=e.y),Sr.debug(`abc89 top/bottom calc, Q ${h}, q ${t}, R ${c}, r ${s}`,i),i}{s=r.x<e.x?e.x-o-i:i-o-e.x;let t=h*s/c,a=r.x<e.x?r.x+c-s:r.x-c+s,n=r.y<e.y?r.y+t:r.y-t;return Sr.debug(`sides calc abc89, Q ${h}, q ${t}, R ${c}, r ${s}`,{_x:a,_y:n}),0===s&&(a=e.x,n=e.y),0===c&&(a=e.x),0===h&&(n=e.y),{x:a,y:n}}}),"intersection"),jd=Cr(((t,e)=>{Sr.warn("abc88 cutPathAtIntersect",t,e);let r=[],i=t[0],a=!1;return t.forEach((t=>{if(Sr.info("abc88 checking point",t,e),Wd(e,t)||a)Sr.warn("abc88 outside",t,i),i=t,a||r.push(t);else{const n=Nd(e,i,t);Sr.debug("abc88 inside",t,i,n),Sr.debug("abc88 intersection",n,e);let o=!1;r.forEach((t=>{o=o||t.x===n.x&&t.y===n.y})),r.some((t=>t.x===n.x&&t.y===n.y))?Sr.warn("abc88 no intersect",n,r):r.push(n),a=!0}})),Sr.debug("returning points",r),r}),"cutPathAtIntersect");function Hd(t){const e=[],r=[];for(let i=1;i<t.length-1;i++){const a=t[i-1],n=t[i],o=t[i+1];(a.x===n.x&&n.y===o.y&&Math.abs(n.x-o.x)>5&&Math.abs(n.y-a.y)>5||a.y===n.y&&n.x===o.x&&Math.abs(n.x-a.x)>5&&Math.abs(n.y-o.y)>5)&&(e.push(n),r.push(i))}return{cornerPoints:e,cornerPointPositions:r}}Cr(Hd,"extractCornerPoints");var Ud=Cr((function(t,e,r){const i=e.x-t.x,a=e.y-t.y,n=r/Math.sqrt(i*i+a*a);return{x:e.x-n*i,y:e.y-n*a}}),"findAdjacentPoint"),Yd=Cr((function(t){const{cornerPointPositions:e}=Hd(t),r=[];for(let i=0;i<t.length;i++)if(e.includes(i)){const e=t[i-1],a=t[i+1],n=t[i],o=Ud(e,n,5),s=Ud(a,n,5),l=s.x-o.x,h=s.y-o.y;r.push(o);const c=2*Math.sqrt(2);let d={x:n.x,y:n.y};if(Math.abs(a.x-e.x)>10&&Math.abs(a.y-e.y)>=10){Sr.debug("Corner point fixing",Math.abs(a.x-e.x),Math.abs(a.y-e.y));const t=5;d=n.x===o.x?{x:l<0?o.x-t+c:o.x+t-c,y:h<0?o.y-c:o.y+c}:{x:l<0?o.x-c:o.x+c,y:h<0?o.y-t+c:o.y+t-c}}else Sr.debug("Corner point skipping fixing",Math.abs(a.x-e.x),Math.abs(a.y-e.y));r.push(d,s)}else r.push(t[i]);return r}),"fixCorners"),Vd=Cr((function(t,e,r,i,a,n,o){const{handDrawnSeed:s}=fa();let l=e.points,h=!1;const c=a;var d=n;d.intersect&&c.intersect&&(l=l.slice(1,e.points.length-1),l.unshift(c.intersect(l[0])),Sr.debug("Last point APA12",e.start,"--\x3e",e.end,l[l.length-1],d,d.intersect(l[l.length-1])),l.push(d.intersect(l[l.length-1]))),e.toCluster&&(Sr.info("to cluster abc88",r.get(e.toCluster)),l=jd(e.points,r.get(e.toCluster).node),h=!0),e.fromCluster&&(Sr.debug("from cluster abc88",r.get(e.fromCluster),JSON.stringify(l,null,2)),l=jd(l.reverse(),r.get(e.fromCluster).node).reverse(),h=!0);let u=l.filter((t=>!Number.isNaN(t.y)));u=Yd(u);let p=u[u.length-1];if(u.length>1){p=u[u.length-1];const t=u[u.length-2],e=(p.x-t.x)/2,r=(p.y-t.y)/2,i={x:t.x+e,y:t.y+r};u.splice(-1,0,i)}let g=X;e.curve&&(g=e.curve);const{x:f,y:y}=Qs(e),m=gt().x(f).y(y).curve(g);let x,b;switch(e.thickness){case"normal":default:x="edge-thickness-normal";break;case"thick":x="edge-thickness-thick";break;case"invisible":x="edge-thickness-invisible"}switch(e.pattern){case"solid":default:x+=" edge-pattern-solid";break;case"dotted":x+=" edge-pattern-dotted";break;case"dashed":x+=" edge-pattern-dashed"}let C=m(u);const k=Array.isArray(e.style)?e.style:[e.style];if("handDrawn"===e.look){const r=gd(t);Object.assign([],u);const i=r.path(C,{roughness:.3,seed:s});x+=" transition",b=Z(i).select("path").attr("id",e.id).attr("class"," "+x+(e.classes?" "+e.classes:"")).attr("style",k?k.reduce(((t,e)=>t+";"+e),""):"");let a=b.attr("d");b.attr("d",a),t.node().appendChild(b.node())}else b=t.append("path").attr("d",C).attr("id",e.id).attr("class"," "+x+(e.classes?" "+e.classes:"")).attr("style",k?k.reduce(((t,e)=>t+";"+e),""):"");let w="";(fa().flowchart.arrowMarkerAbsolute||fa().state.arrowMarkerAbsolute)&&(w=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,w=w.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),Sr.info("arrowTypeStart",e.arrowTypeStart),Sr.info("arrowTypeEnd",e.arrowTypeEnd),Ad(b,e,w,o,i);let S={};return h&&(S.updatedPath=l),S.originalPath=e.points,S}),"insertEdge"),Gd=Cr(((t,e,r,i)=>{e.forEach((e=>{Zd[e](t,r,i)}))}),"insertMarkers"),Zd={extension:Cr(((t,e,r)=>{Sr.trace("Making markers for ",r),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionStart").attr("class","marker extension "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionEnd").attr("class","marker extension "+e).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")}),"extension"),composition:Cr(((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionStart").attr("class","marker composition "+e).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"),t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionEnd").attr("class","marker composition "+e).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")}),"composition"),aggregation:Cr(((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationStart").attr("class","marker aggregation "+e).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"),t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationEnd").attr("class","marker aggregation "+e).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")}),"aggregation"),dependency:Cr(((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyStart").attr("class","marker dependency "+e).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"),t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyEnd").attr("class","marker dependency "+e).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")}),"dependency"),lollipop:Cr(((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopStart").attr("class","marker lollipop "+e).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopEnd").attr("class","marker lollipop "+e).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6)}),"lollipop"),point:Cr(((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-pointEnd").attr("class","marker "+e).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"),t.append("marker").attr("id",r+"_"+e+"-pointStart").attr("class","marker "+e).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")}),"point"),circle:Cr(((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-circleEnd").attr("class","marker "+e).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"),t.append("marker").attr("id",r+"_"+e+"-circleStart").attr("class","marker "+e).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")}),"circle"),cross:Cr(((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-crossEnd").attr("class","marker cross "+e).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"),t.append("marker").attr("id",r+"_"+e+"-crossStart").attr("class","marker cross "+e).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")}),"cross"),barb:Cr(((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-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")},Xd=Gd,Qd=Cr((async(t,e,r)=>{let i;const a=e.useHtmlLabels||Di(fa().flowchart.htmlLabels);i=r||"node default";const n=t.insert("g").attr("class",i).attr("id",e.domId||e.id),o=n.insert("g").attr("class","label").attr("style",e.labelStyle);let s,l;s=void 0===e.label?"":"string"==typeof e.label?e.label:e.label[0],l=await gc(o,_i(Wl(s),fa()),{useHtmlLabels:a,width:e.width||fa().flowchart.wrappingWidth,cssClasses:"markdown-node-label",style:e.labelStyle,addSvgBackground:!!e.icon||!!e.img});let h=l.getBBox();const c=e.padding/2;if(Di(fa().flowchart.htmlLabels)){const t=l.children[0],e=Z(l),r=t.getElementsByTagName("img");if(r){const t=""===s.replace(/<img[^>]*>/g,"").trim();await Promise.all([...r].map((e=>new Promise((r=>{function i(){if(e.style.display="flex",e.style.flexDirection="column",t){const t=fa().fontSize?fa().fontSize:window.getComputedStyle(document.body).fontSize,r=5,i=parseInt(t,10)*r+"px";e.style.minWidth=i,e.style.maxWidth=i}else e.style.width="100%";r(e)}Cr(i,"setupImage"),setTimeout((()=>{e.complete&&i()})),e.addEventListener("error",i),e.addEventListener("load",i)})))))}h=t.getBoundingClientRect(),e.attr("width",h.width),e.attr("height",h.height)}return a?o.attr("transform","translate("+-h.width/2+", "+-h.height/2+")"):o.attr("transform","translate(0, "+-h.height/2+")"),e.centerLabel&&o.attr("transform","translate("+-h.width/2+", "+-h.height/2+")"),o.insert("rect",":first-child"),{shapeSvg:n,bbox:h,halfPadding:c,label:o}}),"labelHelper"),Kd=Cr(((t,e)=>{const r=e.node().getBBox();t.width=r.width,t.height=r.height}),"updateNodeBounds"),Jd=Cr(((t,e)=>("handDrawn"===t.look?"rough-node":"node")+" "+t.cssClasses+" "+(e||"")),"getNodeClasses");function tu(t){const e=t.map(((t,e)=>`${0===e?"M":"L"}${t.x},${t.y}`));return e.push("Z"),e.join(" ")}function eu(t,e,r,i,a,n){const o=[],s=r-t,l=i-e,h=s/n,c=2*Math.PI/h,d=e+l/2;for(let u=0;u<=50;u++){const e=t+u/50*s,r=d+a*Math.sin(c*(e-t));o.push({x:e,y:r})}return o}function ru(t,e,r,i,a,n){const o=[],s=a*Math.PI/180,l=(n*Math.PI/180-s)/(i-1);for(let h=0;h<i;h++){const i=s+h*l,a=t+r*Math.cos(i),n=e+r*Math.sin(i);o.push({x:-a,y:-n})}return o}function iu(t,e){return t.intersect(e)}Cr(tu,"createPathFromPoints"),Cr(eu,"generateFullSineWavePoints"),Cr(ru,"generateCirclePoints"),Cr(iu,"intersectNode");var au=iu;function nu(t,e,r,i){var a=t.x,n=t.y,o=a-i.x,s=n-i.y,l=Math.sqrt(e*e*s*s+r*r*o*o),h=Math.abs(e*r*o/l);i.x<a&&(h=-h);var c=Math.abs(e*r*s/l);return i.y<n&&(c=-c),{x:a+h,y:n+c}}Cr(nu,"intersectEllipse");var ou=nu;function su(t,e,r){return ou(t,e,e,r)}Cr(su,"intersectCircle");var lu=su;function hu(t,e,r,i){var a,n,o,s,l,h,c,d,u,p,g,f,y;if(a=e.y-t.y,o=t.x-e.x,l=e.x*t.y-t.x*e.y,u=a*r.x+o*r.y+l,p=a*i.x+o*i.y+l,!(0!==u&&0!==p&&cu(u,p)||(n=i.y-r.y,s=r.x-i.x,h=i.x*r.y-r.x*i.y,c=n*t.x+s*t.y+h,d=n*e.x+s*e.y+h,0!==c&&0!==d&&cu(c,d)||0==(g=a*s-n*o))))return f=Math.abs(g/2),{x:(y=o*h-s*l)<0?(y-f)/g:(y+f)/g,y:(y=n*l-a*h)<0?(y-f)/g:(y+f)/g}}function cu(t,e){return t*e>0}Cr(hu,"intersectLine"),Cr(cu,"sameSign");var du=hu;function uu(t,e,r){let i=t.x,a=t.y,n=[],o=Number.POSITIVE_INFINITY,s=Number.POSITIVE_INFINITY;"function"==typeof e.forEach?e.forEach((function(t){o=Math.min(o,t.x),s=Math.min(s,t.y)})):(o=Math.min(o,e.x),s=Math.min(s,e.y));let l=i-t.width/2-o,h=a-t.height/2-s;for(let c=0;c<e.length;c++){let i=e[c],a=e[c<e.length-1?c+1:0],o=du(t,r,{x:l+i.x,y:h+i.y},{x:l+a.x,y:h+a.y});o&&n.push(o)}return n.length?(n.length>1&&n.sort((function(t,e){let i=t.x-r.x,a=t.y-r.y,n=Math.sqrt(i*i+a*a),o=e.x-r.x,s=e.y-r.y,l=Math.sqrt(o*o+s*s);return n<l?-1:n===l?0:1})),n[0]):t}Cr(uu,"intersectPolygon");var pu={node:au,circle:lu,ellipse:ou,polygon:uu,rect:fd},gu=Cr((async(t,e,r)=>{const{labelStyles:i,nodeStyles:a}=Sd(e);e.labelStyle=i;const{shapeSvg:n,bbox:o}=await Qd(t,e,Jd(e)),s=Math.max(o.width+2*r.labelPaddingX,(null==e?void 0:e.width)||0),l=Math.max(o.height+2*r.labelPaddingY,(null==e?void 0:e.height)||0),h=-s/2,c=-l/2;let d,{rx:u,ry:p}=e;const{cssStyles:g}=e;if((null==r?void 0:r.rx)&&r.ry&&(u=r.rx,p=r.ry),"handDrawn"===e.look){const t=gd(n),r=Td(e,{}),i=u||p?t.path(bd(h,c,s,l,u||0),r):t.rectangle(h,c,s,l,r);d=n.insert((()=>i),":first-child"),d.attr("class","basic label-container").attr("style",g)}else d=n.insert("rect",":first-child"),d.attr("class","basic label-container").attr("style",a).attr("rx",u).attr("ry",p).attr("x",h).attr("y",c).attr("width",s).attr("height",l);return Kd(e,d),e.intersect=function(t){return pu.rect(e,t)},n}),"drawRect"),fu=Cr((async(t,e)=>gu(t,e,{rx:5,ry:5,classes:"flowchart-node"})),"state"),yu=Cr((async(t,e)=>{const r={rx:5,ry:5,classes:"",labelPaddingX:1*((null==e?void 0:e.padding)||0),labelPaddingY:1*((null==e?void 0:e.padding)||0)};return gu(t,e,r)}),"roundedRect"),mu=Cr((async(t,e)=>{const r={rx:0,ry:0,classes:"",labelPaddingX:2*((null==e?void 0:e.padding)||0),labelPaddingY:1*((null==e?void 0:e.padding)||0)};return gu(t,e,r)}),"squareRect"),xu=Cr(((t,e,{config:{themeVariables:r}})=>{const{lineColor:i}=r,a=t.insert("g").attr("class","node default").attr("id",e.domId||e.id);let n;if("handDrawn"===e.look){const t=gd(a).circle(0,0,14,Cd(i));n=a.insert((()=>t))}else n=a.insert("circle",":first-child");return n.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),Kd(e,n),e.intersect=function(t){return pu.circle(e,7,t)},a}),"stateStart"),bu=Cr(((t,e,{config:{themeVariables:r}})=>{const{labelStyles:i,nodeStyles:a}=Sd(e);e.labelStyle=i;const{cssStyles:n}=e,{lineColor:o,stateBorder:s,nodeBorder:l}=r,h=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),c=gd(h),d=Td(e,{});"handDrawn"!==e.look&&(d.roughness=0,d.fillStyle="solid");const u=c.circle(0,0,14,{...d,stroke:o,strokeWidth:2}),p=s??l,g=c.circle(0,0,5,{...d,fill:p,stroke:p,strokeWidth:2,fillStyle:"solid"}),f=h.insert((()=>u),":first-child");return f.insert((()=>g)),n&&f.selectAll("path").attr("style",n),a&&f.selectAll("path").attr("style",a),Kd(e,f),e.intersect=function(t){return pu.circle(e,7,t)},h}),"stateEnd"),Cu=Cr(((t,e,{dir:r,config:{state:i,themeVariables:a}})=>{const{nodeStyles:n}=Sd(e);e.label="";const o=t.insert("g").attr("class",Jd(e)).attr("id",e.domId??e.id),{cssStyles:s}=e;let l=Math.max(70,(null==e?void 0:e.width)??0),h=Math.max(10,(null==e?void 0:e.height)??0);"LR"===r&&(l=Math.max(10,(null==e?void 0:e.width)??0),h=Math.max(70,(null==e?void 0:e.height)??0));const c=-1*l/2,d=-1*h/2,u=gd(o),p=Td(e,{stroke:a.lineColor,fill:a.lineColor});"handDrawn"!==e.look&&(p.roughness=0,p.fillStyle="solid");const g=u.rectangle(c,d,l,h,p),f=o.insert((()=>g),":first-child");s&&"handDrawn"!==e.look&&f.selectAll("path").attr("style",s),n&&"handDrawn"!==e.look&&f.selectAll("path").attr("style",n),Kd(e,f);const y=(null==i?void 0:i.padding)??0;return e.width&&e.height&&(e.width+=y/2||0,e.height+=y/2||0),e.intersect=function(t){return pu.rect(e,t)},o}),"forkJoin"),ku=Cr(((t,e)=>{const{nodeStyles:r}=Sd(e);e.label="";const i=t.insert("g").attr("class",Jd(e)).attr("id",e.domId??e.id),{cssStyles:a}=e,n=Math.max(28,e.width??0),o=[{x:0,y:n/2},{x:n/2,y:0},{x:0,y:-n/2},{x:-n/2,y:0}],s=gd(i),l=Td(e,{});"handDrawn"!==e.look&&(l.roughness=0,l.fillStyle="solid");const h=tu(o),c=s.path(h,l),d=i.insert((()=>c),":first-child");return a&&"handDrawn"!==e.look&&d.selectAll("path").attr("style",a),r&&"handDrawn"!==e.look&&d.selectAll("path").attr("style",r),e.width=28,e.height=28,e.intersect=function(t){return pu.polygon(e,o,t)},i}),"choice"),wu=Cr((async(t,e,{config:{themeVariables:r}})=>{const{labelStyles:i,nodeStyles:a}=Sd(e);e.labelStyle=i;const{shapeSvg:n,bbox:o}=await Qd(t,e,Jd(e)),s=Math.max(o.width+2*(e.padding??0),(null==e?void 0:e.width)??0),l=Math.max(o.height+2*(e.padding??0),(null==e?void 0:e.height)??0),h=-s/2,c=-l/2,{cssStyles:d}=e;e.useHtmlLabels||(e.centerLabel=!0);const u=gd(n),p=Td(e,{fill:r.noteBkgColor,stroke:r.noteBorderColor});"handDrawn"!==e.look&&(p.roughness=0,p.fillStyle="solid");const g=u.rectangle(h,c,s,l,p),f=n.insert((()=>g),":first-child");return f.attr("class","basic label-container"),d&&"handDrawn"!==e.look&&f.selectAll("path").attr("style",d),a&&"handDrawn"!==e.look&&f.selectAll("path").attr("style",a),Kd(e,f),e.intersect=function(t){return pu.rect(e,t)},n}),"note"),Su=Cr((async(t,e)=>{const{labelStyles:r,nodeStyles:i}=Sd(e);e.labelStyle=r;const{shapeSvg:a,bbox:n}=await Qd(t,e,Jd(e)),o=n.height+e.padding,s=n.width+o/4+e.padding;let l;const{cssStyles:h}=e;if("handDrawn"===e.look){const t=gd(a),r=Td(e,{}),i=bd(-s/2,-o/2,s,o,o/2),n=t.path(i,r);l=a.insert((()=>n),":first-child"),l.attr("class","basic label-container").attr("style",h)}else l=a.insert("rect",":first-child"),l.attr("class","basic label-container").attr("style",i).attr("rx",o/2).attr("ry",o/2).attr("x",-s/2).attr("y",-o/2).attr("width",s).attr("height",o);return Kd(e,l),e.intersect=function(t){return pu.rect(e,t)},a}),"stadium"),Tu=Cr((async(t,e)=>{var r,i;const{labelStyles:a,nodeStyles:n}=Sd(e);let o;e.labelStyle=a,o=e.cssClasses?"node "+e.cssClasses:"node default";const s=t.insert("g").attr("class",o).attr("id",e.domId||e.id),l=s.insert("g"),h=s.insert("g").attr("class","label").attr("style",n),c=e.description,d=e.label,u=h.node().appendChild(await xd(d,e.labelStyle,!0,!0));let p={width:0,height:0};if(Di(null==(i=null==(r=fa())?void 0:r.flowchart)?void 0:i.htmlLabels)){const t=u.children[0],e=Z(u);p=t.getBoundingClientRect(),e.attr("width",p.width),e.attr("height",p.height)}Sr.info("Text 2",c);const g=c||[],f=u.getBBox(),y=h.node().appendChild(await xd(g.join?g.join("<br/>"):g,e.labelStyle,!0,!0)),m=y.children[0],x=Z(y);p=m.getBoundingClientRect(),x.attr("width",p.width),x.attr("height",p.height);const b=(e.padding||0)/2;Z(y).attr("transform","translate( "+(p.width>f.width?0:(f.width-p.width)/2)+", "+(f.height+b+5)+")"),Z(u).attr("transform","translate( "+(p.width<f.width?0:-(f.width-p.width)/2)+", 0)"),p=h.node().getBBox(),h.attr("transform","translate("+-p.width/2+", "+(-p.height/2-b+3)+")");const C=p.width+(e.padding||0),k=p.height+(e.padding||0),w=-p.width/2-b,S=-p.height/2-b;let T,v;if("handDrawn"===e.look){const t=gd(s),r=Td(e,{}),i=t.path(bd(w,S,C,k,e.rx||0),r),a=t.line(-p.width/2-b,-p.height/2-b+f.height+b,p.width/2+b,-p.height/2-b+f.height+b,r);v=s.insert((()=>(Sr.debug("Rough node insert CXC",i),a)),":first-child"),T=s.insert((()=>(Sr.debug("Rough node insert CXC",i),i)),":first-child")}else T=l.insert("rect",":first-child"),v=l.insert("line"),T.attr("class","outer title-state").attr("style",n).attr("x",-p.width/2-b).attr("y",-p.height/2-b).attr("width",p.width+(e.padding||0)).attr("height",p.height+(e.padding||0)),v.attr("class","divider").attr("x1",-p.width/2-b).attr("x2",p.width/2+b).attr("y1",-p.height/2-b+f.height+b).attr("y2",-p.height/2-b+f.height+b);return Kd(e,T),e.intersect=function(t){return pu.rect(e,t)},s}),"rectWithTitle");function vu(t,e,r,i){return t.insert("polygon",":first-child").attr("points",i.map((function(t){return t.x+","+t.y})).join(" ")).attr("class","label-container").attr("transform","translate("+-e/2+","+r/2+")")}Cr(vu,"insertPolygonShape");var Bu=Cr((async(t,e)=>{const{labelStyles:r,nodeStyles:i}=Sd(e);e.labelStyle=r;const{shapeSvg:a,bbox:n}=await Qd(t,e,Jd(e)),o=((null==e?void 0:e.padding)||0)/2,s=n.width+e.padding,l=n.height+e.padding,h=-n.width/2-o,c=-n.height/2-o,d=[{x:0,y:0},{x:s,y:0},{x:s,y:-l},{x:0,y:-l},{x:0,y:0},{x:-8,y:0},{x:s+8,y:0},{x:s+8,y:-l},{x:-8,y:-l},{x:-8,y:0}];if("handDrawn"===e.look){const t=gd(a),r=Td(e,{}),i=t.rectangle(h-8,c,s+16,l,r),n=t.line(h,c,h,c+l,r),o=t.line(h+s,c,h+s,c+l,r);a.insert((()=>n),":first-child"),a.insert((()=>o),":first-child");const d=a.insert((()=>i),":first-child"),{cssStyles:u}=e;d.attr("class","basic label-container").attr("style",u),Kd(e,d)}else{const t=vu(a,s,l,d);i&&t.attr("style",i),Kd(e,t)}return e.intersect=function(t){return pu.polygon(e,d,t)},a}),"subroutine"),_u=Cr(((t,e,r,i,a,n)=>[`M${t},${e+n}`,`a${a},${n} 0,0,0 ${r},0`,`a${a},${n} 0,0,0 ${-r},0`,`l0,${i}`,`a${a},${n} 0,0,0 ${r},0`,"l0,"+-i].join(" ")),"createCylinderPathD"),Lu=Cr(((t,e,r,i,a,n)=>[`M${t},${e+n}`,`M${t+r},${e+n}`,`a${a},${n} 0,0,0 ${-r},0`,`l0,${i}`,`a${a},${n} 0,0,0 ${r},0`,"l0,"+-i].join(" ")),"createOuterCylinderPathD"),Mu=Cr(((t,e,r,i,a,n)=>[`M${t-r/2},${-i/2}`,`a${a},${n} 0,0,0 ${r},0`].join(" ")),"createInnerCylinderPathD"),Fu=Cr((async(t,e)=>{const{labelStyles:r,nodeStyles:i}=Sd(e);e.labelStyle=r;const{shapeSvg:a,bbox:n,label:o}=await Qd(t,e,Jd(e)),s=Math.max(n.width+e.padding,e.width??0),l=s/2,h=l/(2.5+s/50),c=Math.max(n.height+h+e.padding,e.height??0);let d;const{cssStyles:u}=e;if("handDrawn"===e.look){const t=gd(a),r=Lu(0,0,s,c,l,h),i=Mu(0,h,s,c,l,h),n=t.path(r,Td(e,{})),o=t.path(i,Td(e,{fill:"none"}));d=a.insert((()=>o),":first-child"),d=a.insert((()=>n),":first-child"),d.attr("class","basic label-container"),u&&d.attr("style",u)}else{const t=_u(0,0,s,c,l,h);d=a.insert("path",":first-child").attr("d",t).attr("class","basic label-container").attr("style",u).attr("style",i)}return d.attr("label-offset-y",h),d.attr("transform",`translate(${-s/2}, ${-(c/2+h)})`),Kd(e,d),o.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${-n.height/2+(e.padding??0)/1.5-(n.y-(n.top??0))})`),e.intersect=function(t){const r=pu.rect(e,t),i=r.x-(e.x??0);if(0!=l&&(Math.abs(i)<(e.width??0)/2||Math.abs(i)==(e.width??0)/2&&Math.abs(r.y-(e.y??0))>(e.height??0)/2-h)){let a=h*h*(1-i*i/(l*l));a>0&&(a=Math.sqrt(a)),a=h-a,t.y-(e.y??0)>0&&(a=-a),r.y+=a}return r},a}),"cylinder"),Au=Cr((async(t,e)=>{const{labelStyles:r,nodeStyles:i}=Sd(e);e.labelStyle=r;const{shapeSvg:a,bbox:n,halfPadding:o}=await Qd(t,e,Jd(e)),s=n.width/2+o;let l;const{cssStyles:h}=e;if("handDrawn"===e.look){const t=gd(a),r=Td(e,{}),i=t.circle(0,0,2*s,r);l=a.insert((()=>i),":first-child"),l.attr("class","basic label-container").attr("style",h)}else l=a.insert("circle",":first-child").attr("class","basic label-container").attr("style",i).attr("r",s).attr("cx",0).attr("cy",0);return Kd(e,l),e.intersect=function(t){return Sr.info("Circle intersect",e,s,t),pu.circle(e,s,t)},a}),"circle"),$u=Cr((async(t,e)=>{var r,i;const{labelStyles:a,nodeStyles:n}=Sd(e);e.labelStyle=a;const{shapeSvg:o,bbox:s,halfPadding:l}=await Qd(t,e,Jd(e)),h=s.width/2+l+5,c=s.width/2+l;let d;const{cssStyles:u}=e;if("handDrawn"===e.look){const t=gd(o),a=Td(e,{roughness:.2,strokeWidth:2.5}),n=Td(e,{roughness:.2,strokeWidth:1.5}),s=t.circle(0,0,2*h,a),l=t.circle(0,0,2*c,n);d=o.insert("g",":first-child"),d.attr("class",e.cssClasses).attr("style",u),null==(r=d.node())||r.appendChild(s),null==(i=d.node())||i.appendChild(l)}else{d=o.insert("g",":first-child");const t=d.insert("circle",":first-child"),e=d.insert("circle");d.attr("class","basic label-container").attr("style",n),t.attr("class","outer-circle").attr("style",n).attr("r",h).attr("cx",0).attr("cy",0),e.attr("class","inner-circle").attr("style",n).attr("r",c).attr("cx",0).attr("cy",0)}return Kd(e,d),e.intersect=function(t){return Sr.info("DoubleCircle intersect",e,h,t),pu.circle(e,h,t)},o}),"doublecircle"),Eu=Cr((async(t,e)=>{const{labelStyles:r,nodeStyles:i}=Sd(e);e.labelStyle=r;const{shapeSvg:a,bbox:n,label:o}=await Qd(t,e,Jd(e)),s=-Math.max(n.width+(e.padding??0),(null==e?void 0:e.width)??0)/2,l=-Math.max(n.height+(e.padding??0),(null==e?void 0:e.height)??0)/2,h=l/2,c=[{x:s+h,y:l},{x:s,y:0},{x:s+h,y:-l},{x:-s,y:-l},{x:-s,y:l}],{cssStyles:d}=e,u=gd(a),p=Td(e,{});"handDrawn"!==e.look&&(p.roughness=0,p.fillStyle="solid");const g=tu(c),f=u.path(g,p),y=a.insert((()=>f),":first-child");return y.attr("class","basic label-container"),d&&"handDrawn"!==e.look&&y.selectAll("path").attr("style",d),i&&"handDrawn"!==e.look&&y.selectAll("path").attr("style",i),y.attr("transform",`translate(${-h/2},0)`),o.attr("transform",`translate(${-h/2-n.width/2-(n.x-(n.left??0))}, ${-n.height/2-(n.y-(n.top??0))})`),Kd(e,y),e.intersect=function(t){return pu.polygon(e,c,t)},a}),"rect_left_inv_arrow"),Du=Cr(((t,e,r)=>[`M${t+r/2},${e}`,`L${t+r},${e-r/2}`,`L${t+r/2},${e-r}`,`L${t},${e-r/2}`,"Z"].join(" ")),"createDecisionBoxPathD"),Iu=Cr((async(t,e)=>{const{labelStyles:r,nodeStyles:i}=Sd(e);e.labelStyle=r;const{shapeSvg:a,bbox:n}=await Qd(t,e,Jd(e)),o=n.width+e.padding+(n.height+e.padding),s=[{x:o/2,y:0},{x:o,y:-o/2},{x:o/2,y:-o},{x:0,y:-o/2}];let l;const{cssStyles:h}=e;if("handDrawn"===e.look){const t=gd(a),r=Td(e,{}),i=Du(0,0,o),n=t.path(i,r);l=a.insert((()=>n),":first-child").attr("transform",`translate(${-o/2}, ${o/2})`),h&&l.attr("style",h)}else l=vu(a,o,o,s);return i&&l.attr("style",i),Kd(e,l),e.intersect=function(t){return Sr.debug("APA12 Intersect called SPLIT\npoint:",t,"\nnode:\n",e,"\nres:",pu.polygon(e,s,t)),pu.polygon(e,s,t)},a}),"question"),Ou=Cr(((t,e,r,i,a)=>[`M${t+a},${e}`,`L${t+r-a},${e}`,`L${t+r},${e-i/2}`,`L${t+r-a},${e-i}`,`L${t+a},${e-i}`,`L${t},${e-i/2}`,"Z"].join(" ")),"createHexagonPathD"),Pu=Cr((async(t,e)=>{const{labelStyles:r,nodeStyles:i}=Sd(e);e.labelStyle=r;const{shapeSvg:a,bbox:n}=await Qd(t,e,Jd(e)),o=n.height+e.padding,s=o/4,l=n.width+2*s+e.padding,h=[{x:s,y:0},{x:l-s,y:0},{x:l,y:-o/2},{x:l-s,y:-o},{x:s,y:-o},{x:0,y:-o/2}];let c;const{cssStyles:d}=e;if("handDrawn"===e.look){const t=gd(a),r=Td(e,{}),i=Ou(0,0,l,o,s),n=t.path(i,r);c=a.insert((()=>n),":first-child").attr("transform",`translate(${-l/2}, ${o/2})`),d&&c.attr("style",d)}else c=vu(a,l,o,h);return i&&c.attr("style",i),e.width=l,e.height=o,Kd(e,c),e.intersect=function(t){return pu.polygon(e,h,t)},a}),"hexagon");async function Ru(t,e){const{labelStyles:r,nodeStyles:i}=Sd(e);e.labelStyle=r;const{shapeSvg:a,bbox:n}=await Qd(t,e,Jd(e)),o=Math.max(n.width+e.padding,(null==e?void 0:e.width)||0),s=Math.max(n.height+e.padding,(null==e?void 0:e.height)||0),l=-o/2,h=-s/2,c=a.insert("rect",":first-child");return c.attr("class","text").attr("style",i).attr("rx",0).attr("ry",0).attr("x",l).attr("y",h).attr("width",o).attr("height",s),Kd(e,c),e.intersect=function(t){return pu.rect(e,t)},a}async function qu(t,e){const{labelStyles:r,nodeStyles:i}=Sd(e);e.labelStyle=r;const{shapeSvg:a,bbox:n}=await Qd(t,e,Jd(e)),o=n.height+e.padding,s=n.width+e.padding+12,l=-o,h=[{x:12,y:l},{x:s,y:l},{x:s,y:0},{x:0,y:0},{x:0,y:l+12},{x:12,y:l}];let c;const{cssStyles:d}=e;if("handDrawn"===e.look){const t=gd(a),r=Td(e,{}),i=tu(h),n=t.path(i,r);c=a.insert((()=>n),":first-child").attr("transform",`translate(${-s/2}, ${o/2})`),d&&c.attr("style",d)}else c=vu(a,s,o,h);return i&&c.attr("style",i),Kd(e,c),e.intersect=function(t){return pu.polygon(e,h,t)},a}Cr(Ru,"text"),Cr(qu,"card");var zu=Cr((async(t,e)=>{const{labelStyles:r,nodeStyles:i}=Sd(e);e.labelStyle=r;const{shapeSvg:a,bbox:n,label:o}=await Qd(t,e,Jd(e)),s=(null==e?void 0:e.padding)??0,l=Math.max(n.width+2*(e.padding??0),(null==e?void 0:e.width)??0),h=Math.max(n.height+2*(e.padding??0),(null==e?void 0:e.height)??0),c=-n.width/2-s,d=-n.height/2-s,{cssStyles:u}=e,p=gd(a),g=Td(e,{});"handDrawn"!==e.look&&(g.roughness=0,g.fillStyle="solid");const f=[{x:c,y:d},{x:c+l+8,y:d},{x:c+l+8,y:d+h},{x:c-8,y:d+h},{x:c-8,y:d},{x:c,y:d},{x:c,y:d+h}],y=p.polygon(f.map((t=>[t.x,t.y])),g),m=a.insert((()=>y),":first-child");return m.attr("class","basic label-container").attr("style",u),i&&"handDrawn"!==e.look&&m.selectAll("path").attr("style",i),u&&"handDrawn"!==e.look&&m.selectAll("path").attr("style",i),o.attr("transform",`translate(${-l/2+4+(e.padding??0)-(n.x-(n.left??0))},${-h/2+(e.padding??0)-(n.y-(n.top??0))})`),Kd(e,m),e.intersect=function(t){return pu.rect(e,t)},a}),"shadedProcess"),Wu=Cr(((t,e)=>{const{labelStyles:r}=Sd(e);e.labelStyle=r;const i=Jd(e);let a=i;i||(a="anchor");const n=t.insert("g").attr("class",a).attr("id",e.domId||e.id),{cssStyles:o}=e,s=gd(n),l=Td(e,{fill:"black",stroke:"none",fillStyle:"solid"});"handDrawn"!==e.look&&(l.roughness=0);const h=s.circle(0,0,2,l),c=n.insert((()=>h),":first-child");return c.attr("class","anchor").attr("style",o),Kd(e,c),e.intersect=function(t){return Sr.info("Circle intersect",e,1,t),pu.circle(e,1,t)},n}),"anchor"),Nu=Cr((async(t,e)=>{const{labelStyles:r,nodeStyles:i}=Sd(e);e.labelStyle=r;const{shapeSvg:a,bbox:n}=await Qd(t,e,Jd(e)),o=Math.max(n.width+(e.padding??0),(null==e?void 0:e.width)??0),s=Math.max(n.height+(e.padding??0),(null==e?void 0:e.height)??0),l=[{x:-3*s/6,y:0},{x:o,y:0},{x:o+3*s/6,y:-s},{x:0,y:-s}];let h;const{cssStyles:c}=e;if("handDrawn"===e.look){const t=gd(a),r=Td(e,{}),i=tu(l),n=t.path(i,r);h=a.insert((()=>n),":first-child").attr("transform",`translate(${-o/2}, ${s/2})`),c&&h.attr("style",c)}else h=vu(a,o,s,l);return i&&h.attr("style",i),e.width=o,e.height=s,Kd(e,h),e.intersect=function(t){return pu.polygon(e,l,t)},a}),"lean_right"),ju=Cr((async(t,e)=>{const{labelStyles:r,nodeStyles:i}=Sd(e);e.labelStyle=r;const{shapeSvg:a,bbox:n}=await Qd(t,e,Jd(e)),o=Math.max(n.width+(e.padding??0),(null==e?void 0:e.width)??0),s=Math.max(n.height+(e.padding??0),(null==e?void 0:e.height)??0),l=[{x:0,y:0},{x:o+3*s/6,y:0},{x:o,y:-s},{x:-3*s/6,y:-s}];let h;const{cssStyles:c}=e;if("handDrawn"===e.look){const t=gd(a),r=Td(e,{}),i=tu(l),n=t.path(i,r);h=a.insert((()=>n),":first-child").attr("transform",`translate(${-o/2}, ${s/2})`),c&&h.attr("style",c)}else h=vu(a,o,s,l);return i&&h.attr("style",i),e.width=o,e.height=s,Kd(e,h),e.intersect=function(t){return pu.polygon(e,l,t)},a}),"lean_left"),Hu=Cr((async(t,e)=>{const{labelStyles:r,nodeStyles:i}=Sd(e);e.labelStyle=r;const{shapeSvg:a,bbox:n}=await Qd(t,e,Jd(e)),o=n.width+e.padding,s=n.height+e.padding,l=[{x:-3*s/6,y:0},{x:o+3*s/6,y:0},{x:o,y:-s},{x:0,y:-s}];let h;const{cssStyles:c}=e;if("handDrawn"===e.look){const t=gd(a),r=Td(e,{}),i=tu(l),n=t.path(i,r);h=a.insert((()=>n),":first-child").attr("transform",`translate(${-o/2}, ${s/2})`),c&&h.attr("style",c)}else h=vu(a,o,s,l);return i&&h.attr("style",i),e.width=o,e.height=s,Kd(e,h),e.intersect=function(t){return pu.polygon(e,l,t)},a}),"trapezoid"),Uu=Cr((async(t,e)=>{const{labelStyles:r,nodeStyles:i}=Sd(e);e.labelStyle=r;const{shapeSvg:a,bbox:n}=await Qd(t,e,Jd(e)),o=Math.max(n.width+2*(e.padding??0),(null==e?void 0:e.width)??0),s=Math.max(n.height+2*(e.padding??0),(null==e?void 0:e.height)??0),l=[{x:0,y:0},{x:o,y:0},{x:o+3*s/6,y:-s},{x:-3*s/6,y:-s}];let h;const{cssStyles:c}=e;if("handDrawn"===e.look){const t=gd(a),r=Td(e,{}),i=tu(l),n=t.path(i,r);h=a.insert((()=>n),":first-child").attr("transform",`translate(${-o/2}, ${s/2})`),c&&h.attr("style",c)}else h=vu(a,o,s,l);return i&&h.attr("style",i),e.width=o,e.height=s,Kd(e,h),e.intersect=function(t){return pu.polygon(e,l,t)},a}),"inv_trapezoid"),Yu=Cr((async(t,e)=>{const{shapeSvg:r,bbox:i,label:a}=await Qd(t,e,"label"),n=r.insert("rect",":first-child");return n.attr("width",.1).attr("height",.1),r.attr("class","label edgeLabel"),a.attr("transform",`translate(${-i.width/2-(i.x-(i.left??0))}, ${-i.height/2-(i.y-(i.top??0))})`),Kd(e,n),e.intersect=function(t){return pu.rect(e,t)},r}),"labelRect"),Vu=Cr((async(t,e)=>{var r;const{labelStyles:i,nodeStyles:a}=Sd(e);e.labelStyle=i;const{shapeSvg:n,bbox:o,label:s}=await Qd(t,e,Jd(e)),l=Di(null==(r=fa().flowchart)?void 0:r.htmlLabels),h=o.width+(e.padding??0),c=h+o.height,d=h+o.height,u=[{x:0,y:0},{x:d,y:0},{x:d/2,y:-c}],{cssStyles:p}=e,g=gd(n),f=Td(e,{});"handDrawn"!==e.look&&(f.roughness=0,f.fillStyle="solid");const y=tu(u),m=g.path(y,f),x=n.insert((()=>m),":first-child").attr("transform",`translate(${-c/2}, ${c/2})`);return p&&"handDrawn"!==e.look&&x.selectChildren("path").attr("style",p),a&&"handDrawn"!==e.look&&x.selectChildren("path").attr("style",a),e.width=h,e.height=c,Kd(e,x),s.attr("transform",`translate(${-o.width/2-(o.x-(o.left??0))}, ${c/2-(o.height+(e.padding??0)/(l?2:1)-(o.y-(o.top??0)))})`),e.intersect=function(t){return Sr.info("Triangle intersect",e,u,t),pu.polygon(e,u,t)},n}),"triangle"),Gu=Cr((async(t,e)=>{const{labelStyles:r,nodeStyles:i}=Sd(e);e.labelStyle=r;const{shapeSvg:a,bbox:n}=await Qd(t,e,Jd(e)),o=Math.max(80,n.width+2*(e.padding??0),(null==e?void 0:e.width)??0),s=Math.max(50,n.height+2*(e.padding??0),(null==e?void 0:e.height)??0),l=s/2,{cssStyles:h}=e,c=gd(a),d=Td(e,{});"handDrawn"!==e.look&&(d.roughness=0,d.fillStyle="solid");const u=[{x:-o/2,y:-s/2},{x:o/2-l,y:-s/2},...ru(-o/2+l,0,l,50,90,270),{x:o/2-l,y:s/2},{x:-o/2,y:s/2}],p=tu(u),g=c.path(p,d),f=a.insert((()=>g),":first-child");return f.attr("class","basic label-container"),h&&"handDrawn"!==e.look&&f.selectChildren("path").attr("style",h),i&&"handDrawn"!==e.look&&f.selectChildren("path").attr("style",i),Kd(e,f),e.intersect=function(t){Sr.info("Pill intersect",e,{radius:l,point:t});return pu.polygon(e,u,t)},a}),"halfRoundedRectangle"),Zu=Cr((async(t,e)=>{const{labelStyles:r,nodeStyles:i}=Sd(e);e.labelStyle=r;const{shapeSvg:a,bbox:n}=await Qd(t,e,Jd(e)),o=Math.max(80,1.25*(n.width+2*(e.padding??0)),(null==e?void 0:e.width)??0),s=Math.max(20,n.height+2*(e.padding??0),(null==e?void 0:e.height)??0),l=s/2,{cssStyles:h}=e,c=gd(a),d=Td(e,{});"handDrawn"!==e.look&&(d.roughness=0,d.fillStyle="solid");const u=o-l,p=s/4,g=[{x:u,y:0},{x:p,y:0},{x:0,y:s/2},{x:p,y:s},{x:u,y:s},...ru(-u,-s/2,l,50,270,90)],f=tu(g),y=c.path(f,d),m=a.insert((()=>y),":first-child");return m.attr("class","basic label-container"),h&&"handDrawn"!==e.look&&m.selectChildren("path").attr("style",h),i&&"handDrawn"!==e.look&&m.selectChildren("path").attr("style",i),m.attr("transform",`translate(${-o/2}, ${-s/2})`),Kd(e,m),e.intersect=function(t){return pu.polygon(e,g,t)},a}),"curvedTrapezoid"),Xu=Cr((async(t,e)=>{const{labelStyles:r,nodeStyles:i}=Sd(e);e.labelStyle=r;const{shapeSvg:a,bbox:n,label:o}=await Qd(t,e,Jd(e)),s=Math.max(n.width+2*(e.padding??0),(null==e?void 0:e.width)??0),l=Math.max(n.height+2*(e.padding??0),(null==e?void 0:e.height)??0),h=-s/2,c=-l/2,{cssStyles:d}=e,u=gd(a),p=Td(e,{});"handDrawn"!==e.look&&(p.roughness=0,p.fillStyle="solid");const g=[{x:h,y:c},{x:h,y:c+l},{x:h+s,y:c+l},{x:h+s,y:c-l/2}],f=tu(g),y=u.path(f,p),m=a.insert((()=>y),":first-child");return m.attr("class","basic label-container"),d&&"handDrawn"!==e.look&&m.selectChildren("path").attr("style",d),i&&"handDrawn"!==e.look&&m.selectChildren("path").attr("style",i),m.attr("transform",`translate(0, ${l/4})`),o.attr("transform",`translate(${-s/2+(e.padding??0)-(n.x-(n.left??0))}, ${-l/4+(e.padding??0)-(n.y-(n.top??0))})`),Kd(e,m),e.intersect=function(t){return pu.polygon(e,g,t)},a}),"slopedRect");function Qu(t,e,r,i,a,n,o){const s=(t+r)/2,l=(e+i)/2,h=Math.atan2(i-e,r-t),c=(r-t)/2/a,d=(i-e)/2/n,u=Math.sqrt(c**2+d**2);if(u>1)throw new Error("The given radii are too small to create an arc between the points.");const p=Math.sqrt(1-u**2),g=s+p*n*Math.sin(h)*(o?-1:1),f=l-p*a*Math.cos(h)*(o?-1:1),y=Math.atan2((e-f)/n,(t-g)/a);let m=Math.atan2((i-f)/n,(r-g)/a)-y;o&&m<0&&(m+=2*Math.PI),!o&&m>0&&(m-=2*Math.PI);const x=[];for(let b=0;b<20;b++){const t=y+b/19*m,e=g+a*Math.cos(t),r=f+n*Math.sin(t);x.push({x:e,y:r})}return x}Cr(Qu,"generateArcPoints");var Ku=Cr((async(t,e)=>{const{labelStyles:r,nodeStyles:i}=Sd(e);e.labelStyle=r;const{shapeSvg:a,bbox:n}=await Qd(t,e,Jd(e)),o=n.width+e.padding+20,s=n.height+e.padding,l=s/2,h=l/(2.5+s/50),{cssStyles:c}=e,d=[{x:o/2,y:-s/2},{x:-o/2,y:-s/2},...Qu(-o/2,-s/2,-o/2,s/2,h,l,!1),{x:o/2,y:s/2},...Qu(o/2,s/2,o/2,-s/2,h,l,!0)],u=gd(a),p=Td(e,{});"handDrawn"!==e.look&&(p.roughness=0,p.fillStyle="solid");const g=tu(d),f=u.path(g,p),y=a.insert((()=>f),":first-child");return y.attr("class","basic label-container"),c&&"handDrawn"!==e.look&&y.selectAll("path").attr("style",c),i&&"handDrawn"!==e.look&&y.selectAll("path").attr("style",i),y.attr("transform",`translate(${h/2}, 0)`),Kd(e,y),e.intersect=function(t){return pu.polygon(e,d,t)},a}),"bowTieRect"),Ju=Cr((async(t,e)=>{const{labelStyles:r,nodeStyles:i}=Sd(e);e.labelStyle=r;const{shapeSvg:a,bbox:n,label:o}=await Qd(t,e,Jd(e)),s=n.width+e.padding,l=n.height+e.padding,h=.2*l,c=-s/2,d=-l/2-h/2,{cssStyles:u}=e,p=gd(a),g=Td(e,{});"handDrawn"!==e.look&&(g.roughness=0,g.fillStyle="solid");const f=[{x:c,y:d+h},{x:-c,y:d+h},{x:-c,y:-d},{x:c,y:-d},{x:c,y:d},{x:-c,y:d},{x:-c,y:d+h}],y=p.polygon(f.map((t=>[t.x,t.y])),g),m=a.insert((()=>y),":first-child");return m.attr("class","basic label-container"),u&&"handDrawn"!==e.look&&m.selectAll("path").attr("style",u),i&&"handDrawn"!==e.look&&m.selectAll("path").attr("style",i),o.attr("transform",`translate(${c+(e.padding??0)/2-(n.x-(n.left??0))}, ${d+h+(e.padding??0)/2-(n.y-(n.top??0))})`),Kd(e,m),e.intersect=function(t){return pu.rect(e,t)},a}),"dividedRectangle");function tp(t){const e=Math.cos(Math.PI/4),r=Math.sin(Math.PI/4),i=2*t;return`M ${-i/2*e},${i/2*r} L ${i/2*e},${-i/2*r}\n M ${i/2*e},${i/2*r} L ${-i/2*e},${-i/2*r}`}Cr(tp,"createLine");var ep=Cr(((t,e)=>{const{labelStyles:r,nodeStyles:i}=Sd(e);e.labelStyle=r,e.label="";const a=t.insert("g").attr("class",Jd(e)).attr("id",e.domId??e.id),n=Math.max(30,(null==e?void 0:e.width)??0),{cssStyles:o}=e,s=gd(a),l=Td(e,{});"handDrawn"!==e.look&&(l.roughness=0,l.fillStyle="solid");const h=s.circle(0,0,2*n,l),c=tp(n),d=s.path(c,l),u=a.insert((()=>h),":first-child");return u.insert((()=>d)),o&&"handDrawn"!==e.look&&u.selectAll("path").attr("style",o),i&&"handDrawn"!==e.look&&u.selectAll("path").attr("style",i),Kd(e,u),e.intersect=function(t){Sr.info("crossedCircle intersect",e,{radius:n,point:t});return pu.circle(e,n,t)},a}),"crossedCircle"),rp=Cr((async(t,e)=>{const{labelStyles:r,nodeStyles:i}=Sd(e);e.labelStyle=r;const{shapeSvg:a,bbox:n}=await Qd(t,e,Jd(e)),o=Math.max(n.width+2*(e.padding??0),(null==e?void 0:e.width)??0),s=Math.max(n.height+2*(e.padding??0),(null==e?void 0:e.height)??0),l=o/s;let h=o,c=s;h>c*l?c=h/l:h=c*l,h=Math.max(h,100),c=Math.max(c,50);const d=Math.min(.2*c,c/4),u=c+2*d,{cssStyles:p}=e,g=gd(a),f=Td(e,{});"handDrawn"!==e.look&&(f.roughness=0,f.fillStyle="solid");const y=[{x:-h/2,y:u/2},...eu(-h/2,u/2,h/2,u/2,d,1),{x:h/2,y:-u/2},...eu(h/2,-u/2,-h/2,-u/2,d,-1)],m=tu(y),x=g.path(m,f),b=a.insert((()=>x),":first-child");return b.attr("class","basic label-container"),p&&"handDrawn"!==e.look&&b.selectAll("path").attr("style",p),i&&"handDrawn"!==e.look&&b.selectAll("path").attr("style",i),Kd(e,b),e.intersect=function(t){return pu.polygon(e,y,t)},a}),"waveRectangle"),ip=Cr(((t,e,r,i,a,n)=>`M${t},${e}\n a${a},${n} 0,0,1 0,${-i}\n l${r},0\n a${a},${n} 0,0,1 0,${i}\n M${r},${-i}\n a${a},${n} 0,0,0 0,${i}\n l${-r},0`),"createCylinderPathD"),ap=Cr(((t,e,r,i,a,n)=>[`M${t},${e}`,`M${t+r},${e}`,`a${a},${n} 0,0,0 0,${-i}`,`l${-r},0`,`a${a},${n} 0,0,0 0,${i}`,`l${r},0`].join(" ")),"createOuterCylinderPathD"),np=Cr(((t,e,r,i,a,n)=>[`M${t+r/2},${-i/2}`,`a${a},${n} 0,0,0 0,${i}`].join(" ")),"createInnerCylinderPathD"),op=Cr((async(t,e)=>{const{labelStyles:r,nodeStyles:i}=Sd(e);e.labelStyle=r;const{shapeSvg:a,bbox:n,label:o,halfPadding:s}=await Qd(t,e,Jd(e)),l="neo"===e.look?2*s:s,h=n.height+l,c=h/2,d=c/(2.5+h/50),u=n.width+d+l,{cssStyles:p}=e;let g;if("handDrawn"===e.look){const t=gd(a),r=ap(0,0,u,h,d,c),i=np(0,0,u,h,d,c),n=t.path(r,Td(e,{})),o=t.path(i,Td(e,{fill:"none"}));g=a.insert((()=>o),":first-child"),g=a.insert((()=>n),":first-child"),g.attr("class","basic label-container"),p&&g.attr("style",p)}else{const t=ip(0,0,u,h,d,c);g=a.insert("path",":first-child").attr("d",t).attr("class","basic label-container").attr("style",p).attr("style",i)}return g.attr("class","basic label-container"),p&&"handDrawn"!==e.look&&g.selectAll("path").attr("style",p),i&&"handDrawn"!==e.look&&g.selectAll("path").attr("style",i),g.attr("label-offset-x",d),g.attr("transform",`translate(${-u/2}, ${h/2} )`),o.attr("transform",`translate(${-n.width/2-d-(n.x-(n.left??0))}, ${-n.height/2-(n.y-(n.top??0))})`),Kd(e,g),e.intersect=function(t){const r=pu.rect(e,t),i=r.y-(e.y??0);if(0!=c&&(Math.abs(i)<(e.height??0)/2||Math.abs(i)==(e.height??0)/2&&Math.abs(r.x-(e.x??0))>(e.width??0)/2-d)){let a=d*d*(1-i*i/(c*c));0!=a&&(a=Math.sqrt(a)),a=d-a,t.x-(e.x??0)>0&&(a=-a),r.x+=a}return r},a}),"tiltedCylinder"),sp=Cr((async(t,e)=>{const{labelStyles:r,nodeStyles:i}=Sd(e);e.labelStyle=r;const{shapeSvg:a,bbox:n}=await Qd(t,e,Jd(e)),o=Math.max(60,n.width+2*(e.padding??0),(null==e?void 0:e.width)??0),s=Math.max(20,n.height+2*(e.padding??0),(null==e?void 0:e.height)??0),{cssStyles:l}=e,h=gd(a),c=Td(e,{});"handDrawn"!==e.look&&(c.roughness=0,c.fillStyle="solid");const d=[{x:-o/2*.8,y:-s/2},{x:o/2*.8,y:-s/2},{x:o/2,y:-s/2*.6},{x:o/2,y:s/2},{x:-o/2,y:s/2},{x:-o/2,y:-s/2*.6}],u=tu(d),p=h.path(u,c),g=a.insert((()=>p),":first-child");return g.attr("class","basic label-container"),l&&"handDrawn"!==e.look&&g.selectChildren("path").attr("style",l),i&&"handDrawn"!==e.look&&g.selectChildren("path").attr("style",i),Kd(e,g),e.intersect=function(t){return pu.polygon(e,d,t)},a}),"trapezoidalPentagon"),lp=Cr((async(t,e)=>{const{labelStyles:r,nodeStyles:i}=Sd(e);e.labelStyle=r;const{shapeSvg:a,bbox:n,label:o}=await Qd(t,e,Jd(e)),s=n.width+(e.padding??0),l=s+n.height,h=s+n.height,c=[{x:0,y:-l},{x:h,y:-l},{x:h/2,y:0}],{cssStyles:d}=e,u=gd(a),p=Td(e,{});"handDrawn"!==e.look&&(p.roughness=0,p.fillStyle="solid");const g=tu(c),f=u.path(g,p),y=a.insert((()=>f),":first-child").attr("transform",`translate(${-l/2}, ${l/2})`);return d&&"handDrawn"!==e.look&&y.selectChildren("path").attr("style",d),i&&"handDrawn"!==e.look&&y.selectChildren("path").attr("style",i),e.width=s,e.height=l,Kd(e,y),o.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${-l/2+(e.padding??0)/2+(n.y-(n.top??0))})`),e.intersect=function(t){return Sr.info("Triangle intersect",e,c,t),pu.polygon(e,c,t)},a}),"flippedTriangle"),hp=Cr((async(t,e)=>{const{labelStyles:r,nodeStyles:i}=Sd(e);e.label="",e.labelStyle=r;const{shapeSvg:a}=await Qd(t,e,Jd(e)),n=Math.max(30,(null==e?void 0:e.width)??0),o=Math.max(30,(null==e?void 0:e.height)??0),{cssStyles:s}=e,l=gd(a),h=Td(e,{});"handDrawn"!==e.look&&(h.roughness=0,h.fillStyle="solid");const c=[{x:0,y:0},{x:n,y:0},{x:0,y:o},{x:n,y:o}],d=tu(c),u=l.path(d,h),p=a.insert((()=>u),":first-child");return p.attr("class","basic label-container"),s&&"handDrawn"!==e.look&&p.selectChildren("path").attr("style",s),i&&"handDrawn"!==e.look&&p.selectChildren("path").attr("style",i),p.attr("transform",`translate(${-n/2}, ${-o/2})`),Kd(e,p),e.intersect=function(t){Sr.info("Pill intersect",e,{points:c});return pu.polygon(e,c,t)},a}),"hourglass"),cp=Cr((async(t,e)=>{const{labelStyles:r,nodeStyles:i}=Sd(e);e.labelStyle=r;const{shapeSvg:a,bbox:n}=await Qd(t,e,Jd(e)),o=Math.max(n.width+2*(e.padding??0),(null==e?void 0:e.width)??0),s=Math.max(n.height+2*(e.padding??0),(null==e?void 0:e.height)??0),l=-o/2,h=-s/2,c=.2*s,d=.2*s,{cssStyles:u}=e,p=gd(a),g=Td(e,{}),f=[{x:l-c/2,y:h},{x:l+o+c/2,y:h},{x:l+o+c/2,y:h+s},{x:l-c/2,y:h+s}],y=[{x:l+o-c/2,y:h+s},{x:l+o+c/2,y:h+s},{x:l+o+c/2,y:h+s-d}];"handDrawn"!==e.look&&(g.roughness=0,g.fillStyle="solid");const m=tu(f),x=p.path(m,g),b=tu(y),C=p.path(b,{...g,fillStyle:"solid"}),k=a.insert((()=>C),":first-child");return k.insert((()=>x),":first-child"),k.attr("class","basic label-container"),u&&"handDrawn"!==e.look&&k.selectAll("path").attr("style",u),i&&"handDrawn"!==e.look&&k.selectAll("path").attr("style",i),Kd(e,k),e.intersect=function(t){return pu.polygon(e,f,t)},a}),"taggedRect"),dp=Cr((async(t,e)=>{const{labelStyles:r,nodeStyles:i}=Sd(e);e.labelStyle=r;const{shapeSvg:a,bbox:n,label:o}=await Qd(t,e,Jd(e)),s=Math.max(n.width+2*(e.padding??0),(null==e?void 0:e.width)??0),l=Math.max(n.height+2*(e.padding??0),(null==e?void 0:e.height)??0),h=-s/2,c=-l/2,{cssStyles:d}=e,u=gd(a),p=Td(e,{}),g=[{x:h-5,y:c+5},{x:h-5,y:c+l+5},{x:h+s-5,y:c+l+5},{x:h+s-5,y:c+l},{x:h+s,y:c+l},{x:h+s,y:c+l-5},{x:h+s+5,y:c+l-5},{x:h+s+5,y:c-5},{x:h+5,y:c-5},{x:h+5,y:c},{x:h,y:c},{x:h,y:c+5}],f=[{x:h,y:c+5},{x:h+s-5,y:c+5},{x:h+s-5,y:c+l},{x:h+s,y:c+l},{x:h+s,y:c},{x:h,y:c}];"handDrawn"!==e.look&&(p.roughness=0,p.fillStyle="solid");const y=tu(g),m=u.path(y,p),x=tu(f),b=u.path(x,{...p,fill:"none"}),C=a.insert((()=>b),":first-child");return C.insert((()=>m),":first-child"),C.attr("class","basic label-container"),d&&"handDrawn"!==e.look&&C.selectAll("path").attr("style",d),i&&"handDrawn"!==e.look&&C.selectAll("path").attr("style",i),o.attr("transform",`translate(${-n.width/2-5-(n.x-(n.left??0))}, ${-n.height/2+5-(n.y-(n.top??0))})`),Kd(e,C),e.intersect=function(t){return pu.polygon(e,g,t)},a}),"multiRect"),up=Cr(((t,e,r,i,a,n,o)=>[`M${t},${e+n}`,`a${a},${n} 0,0,0 ${r},0`,`a${a},${n} 0,0,0 ${-r},0`,`l0,${i}`,`a${a},${n} 0,0,0 ${r},0`,"l0,"+-i,`M${t},${e+n+o}`,`a${a},${n} 0,0,0 ${r},0`].join(" ")),"createCylinderPathD"),pp=Cr(((t,e,r,i,a,n,o)=>[`M${t},${e+n}`,`M${t+r},${e+n}`,`a${a},${n} 0,0,0 ${-r},0`,`l0,${i}`,`a${a},${n} 0,0,0 ${r},0`,"l0,"+-i,`M${t},${e+n+o}`,`a${a},${n} 0,0,0 ${r},0`].join(" ")),"createOuterCylinderPathD"),gp=Cr(((t,e,r,i,a,n)=>[`M${t-r/2},${-i/2}`,`a${a},${n} 0,0,0 ${r},0`].join(" ")),"createInnerCylinderPathD"),fp=Cr((async(t,e)=>{const{labelStyles:r,nodeStyles:i}=Sd(e);e.labelStyle=r;const{shapeSvg:a,bbox:n,label:o}=await Qd(t,e,Jd(e)),s=Math.max(n.width+(e.padding??0),e.width??0),l=s/2,h=l/(2.5+s/50),c=Math.max(n.height+h+(e.padding??0),e.height??0),d=.1*c;let u;const{cssStyles:p}=e;if("handDrawn"===e.look){const t=gd(a),r=pp(0,0,s,c,l,h,d),i=gp(0,h,s,c,l,h),n=Td(e,{}),o=t.path(r,n),g=t.path(i,n);a.insert((()=>g),":first-child").attr("class","line"),u=a.insert((()=>o),":first-child"),u.attr("class","basic label-container"),p&&u.attr("style",p)}else{const t=up(0,0,s,c,l,h,d);u=a.insert("path",":first-child").attr("d",t).attr("class","basic label-container").attr("style",p).attr("style",i)}return u.attr("label-offset-y",h),u.attr("transform",`translate(${-s/2}, ${-(c/2+h)})`),Kd(e,u),o.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${-n.height/2+h-(n.y-(n.top??0))})`),e.intersect=function(t){const r=pu.rect(e,t),i=r.x-(e.x??0);if(0!=l&&(Math.abs(i)<(e.width??0)/2||Math.abs(i)==(e.width??0)/2&&Math.abs(r.y-(e.y??0))>(e.height??0)/2-h)){let a=h*h*(1-i*i/(l*l));a>0&&(a=Math.sqrt(a)),a=h-a,t.y-(e.y??0)>0&&(a=-a),r.y+=a}return r},a}),"linedCylinder"),yp=Cr((async(t,e)=>{const{labelStyles:r,nodeStyles:i}=Sd(e);e.labelStyle=r;const{shapeSvg:a,bbox:n,label:o}=await Qd(t,e,Jd(e)),s=Math.max(n.width+2*(e.padding??0),(null==e?void 0:e.width)??0),l=Math.max(n.height+2*(e.padding??0),(null==e?void 0:e.height)??0),h=l/8,c=l+h,{cssStyles:d}=e,u=70-s,p=u>0?u/2:0,g=gd(a),f=Td(e,{});"handDrawn"!==e.look&&(f.roughness=0,f.fillStyle="solid");const y=[{x:-s/2-p,y:c/2},...eu(-s/2-p,c/2,s/2+p,c/2,h,.8),{x:s/2+p,y:-c/2},{x:-s/2-p,y:-c/2}],m=tu(y),x=g.path(m,f),b=a.insert((()=>x),":first-child");return b.attr("class","basic label-container"),d&&"handDrawn"!==e.look&&b.selectAll("path").attr("style",d),i&&"handDrawn"!==e.look&&b.selectAll("path").attr("style",i),b.attr("transform",`translate(0,${-h/2})`),o.attr("transform",`translate(${-s/2+(e.padding??0)-(n.x-(n.left??0))},${-l/2+(e.padding??0)-h-(n.y-(n.top??0))})`),Kd(e,b),e.intersect=function(t){return pu.polygon(e,y,t)},a}),"waveEdgedRectangle"),mp=Cr(((t,e)=>{const{labelStyles:r,nodeStyles:i}=Sd(e);e.label="",e.labelStyle=r;const a=t.insert("g").attr("class",Jd(e)).attr("id",e.domId??e.id),{cssStyles:n}=e,o=Math.max(35,(null==e?void 0:e.width)??0),s=Math.max(35,(null==e?void 0:e.height)??0),l=[{x:o,y:0},{x:0,y:s+3.5},{x:o-14,y:s+3.5},{x:0,y:2*s},{x:o,y:s-3.5},{x:14,y:s-3.5}],h=gd(a),c=Td(e,{});"handDrawn"!==e.look&&(c.roughness=0,c.fillStyle="solid");const d=tu(l),u=h.path(d,c),p=a.insert((()=>u),":first-child");return n&&"handDrawn"!==e.look&&p.selectAll("path").attr("style",n),i&&"handDrawn"!==e.look&&p.selectAll("path").attr("style",i),p.attr("transform",`translate(-${o/2},${-s})`),Kd(e,p),e.intersect=function(t){Sr.info("lightningBolt intersect",e,t);return pu.polygon(e,l,t)},a}),"lightningBolt"),xp=Cr(((t,e,{config:{themeVariables:r}})=>{const{labelStyles:i,nodeStyles:a}=Sd(e);e.label="",e.labelStyle=i;const n=t.insert("g").attr("class",Jd(e)).attr("id",e.domId??e.id),{cssStyles:o}=e,s=gd(n),{nodeBorder:l}=r,h=Td(e,{fillStyle:"solid"});"handDrawn"!==e.look&&(h.roughness=0);const c=s.circle(0,0,14,h),d=n.insert((()=>c),":first-child");return d.selectAll("path").attr("style",`fill: ${l} !important;`),o&&o.length>0&&"handDrawn"!==e.look&&d.selectAll("path").attr("style",o),a&&"handDrawn"!==e.look&&d.selectAll("path").attr("style",a),Kd(e,d),e.intersect=function(t){Sr.info("filledCircle intersect",e,{radius:7,point:t});return pu.circle(e,7,t)},n}),"filledCircle"),bp=Cr((async(t,e)=>{const{labelStyles:r,nodeStyles:i}=Sd(e);e.labelStyle=r;const{shapeSvg:a,bbox:n,label:o}=await Qd(t,e,Jd(e)),s=Math.max(n.width+2*(e.padding??0),(null==e?void 0:e.width)??0),l=Math.max(n.height+2*(e.padding??0),(null==e?void 0:e.height)??0),h=l/4,c=l+h,d=-s/2,u=-c/2,{cssStyles:p}=e,g=eu(d-5,u+c+5,d+s-5,u+c+5,h,.8),f=null==g?void 0:g[g.length-1],y=[{x:d-5,y:u+5},{x:d-5,y:u+c+5},...g,{x:d+s-5,y:f.y-5},{x:d+s,y:f.y-5},{x:d+s,y:f.y-10},{x:d+s+5,y:f.y-10},{x:d+s+5,y:u-5},{x:d+5,y:u-5},{x:d+5,y:u},{x:d,y:u},{x:d,y:u+5}],m=[{x:d,y:u+5},{x:d+s-5,y:u+5},{x:d+s-5,y:f.y-5},{x:d+s,y:f.y-5},{x:d+s,y:u},{x:d,y:u}],x=gd(a),b=Td(e,{});"handDrawn"!==e.look&&(b.roughness=0,b.fillStyle="solid");const C=tu(y),k=x.path(C,b),w=tu(m),S=x.path(w,b),T=a.insert((()=>k),":first-child");return T.insert((()=>S)),T.attr("class","basic label-container"),p&&"handDrawn"!==e.look&&T.selectAll("path").attr("style",p),i&&"handDrawn"!==e.look&&T.selectAll("path").attr("style",i),T.attr("transform",`translate(0,${-h/2})`),o.attr("transform",`translate(${-n.width/2-5-(n.x-(n.left??0))}, ${-n.height/2+5-h/2-(n.y-(n.top??0))})`),Kd(e,T),e.intersect=function(t){return pu.polygon(e,y,t)},a}),"multiWaveEdgedRectangle"),Cp=Cr((async(t,e)=>{const{labelStyles:r,nodeStyles:i}=Sd(e);e.labelStyle=r;const{shapeSvg:a,bbox:n,label:o}=await Qd(t,e,Jd(e)),s=Math.max(n.width+2*(e.padding??0),(null==e?void 0:e.width)??0),l=Math.max(n.height+2*(e.padding??0),(null==e?void 0:e.height)??0),h=-s/2,c=-l/2,{cssStyles:d}=e,u=gd(a),p=Td(e,{}),g=[{x:h-5,y:c-5},{x:h-5,y:c+l},{x:h+s,y:c+l},{x:h+s,y:c-5}],f=`M${h-5},${c-5} L${h+s},${c-5} L${h+s},${c+l} L${h-5},${c+l} L${h-5},${c-5}\n M${h-5},${c} L${h+s},${c}\n M${h},${c-5} L${h},${c+l}`;"handDrawn"!==e.look&&(p.roughness=0,p.fillStyle="solid");const y=u.path(f,p),m=a.insert((()=>y),":first-child");return m.attr("transform","translate(2.5, 2.5)"),m.attr("class","basic label-container"),d&&"handDrawn"!==e.look&&m.selectAll("path").attr("style",d),i&&"handDrawn"!==e.look&&m.selectAll("path").attr("style",i),o.attr("transform",`translate(${-n.width/2+2.5-(n.x-(n.left??0))}, ${-n.height/2+2.5-(n.y-(n.top??0))})`),Kd(e,m),e.intersect=function(t){return pu.polygon(e,g,t)},a}),"windowPane"),kp=Cr((async(t,e)=>{const{labelStyles:r,nodeStyles:i}=Sd(e);e.labelStyle=r;const{shapeSvg:a,bbox:n,label:o}=await Qd(t,e,Jd(e)),s=Math.max(n.width+2*(e.padding??0),(null==e?void 0:e.width)??0),l=Math.max(n.height+2*(e.padding??0),(null==e?void 0:e.height)??0),h=l/4,c=l+h,{cssStyles:d}=e,u=gd(a),p=Td(e,{});"handDrawn"!==e.look&&(p.roughness=0,p.fillStyle="solid");const g=[{x:-s/2-s/2*.1,y:-c/2},{x:-s/2-s/2*.1,y:c/2},...eu(-s/2-s/2*.1,c/2,s/2+s/2*.1,c/2,h,.8),{x:s/2+s/2*.1,y:-c/2},{x:-s/2-s/2*.1,y:-c/2},{x:-s/2,y:-c/2},{x:-s/2,y:c/2*1.1},{x:-s/2,y:-c/2}],f=u.polygon(g.map((t=>[t.x,t.y])),p),y=a.insert((()=>f),":first-child");return y.attr("class","basic label-container"),d&&"handDrawn"!==e.look&&y.selectAll("path").attr("style",d),i&&"handDrawn"!==e.look&&y.selectAll("path").attr("style",i),y.attr("transform",`translate(0,${-h/2})`),o.attr("transform",`translate(${-s/2+(e.padding??0)+s/2*.1/2-(n.x-(n.left??0))},${-l/2+(e.padding??0)-h/2-(n.y-(n.top??0))})`),Kd(e,y),e.intersect=function(t){return pu.polygon(e,g,t)},a}),"linedWaveEdgedRect"),wp=Cr((async(t,e)=>{const{labelStyles:r,nodeStyles:i}=Sd(e);e.labelStyle=r;const{shapeSvg:a,bbox:n,label:o}=await Qd(t,e,Jd(e)),s=Math.max(n.width+2*(e.padding??0),(null==e?void 0:e.width)??0),l=Math.max(n.height+2*(e.padding??0),(null==e?void 0:e.height)??0),h=l/4,c=.2*s,d=.2*l,u=l+h,{cssStyles:p}=e,g=gd(a),f=Td(e,{});"handDrawn"!==e.look&&(f.roughness=0,f.fillStyle="solid");const y=[{x:-s/2-s/2*.1,y:u/2},...eu(-s/2-s/2*.1,u/2,s/2+s/2*.1,u/2,h,.8),{x:s/2+s/2*.1,y:-u/2},{x:-s/2-s/2*.1,y:-u/2}],m=-s/2+s/2*.1,x=-u/2-.4*d,b=[{x:m+s-c,y:1.4*(x+l)},{x:m+s,y:x+l-d},{x:m+s,y:.9*(x+l)},...eu(m+s,1.3*(x+l),m+s-c,1.5*(x+l),.03*-l,.5)],C=tu(y),k=g.path(C,f),w=tu(b),S=g.path(w,{...f,fillStyle:"solid"}),T=a.insert((()=>S),":first-child");return T.insert((()=>k),":first-child"),T.attr("class","basic label-container"),p&&"handDrawn"!==e.look&&T.selectAll("path").attr("style",p),i&&"handDrawn"!==e.look&&T.selectAll("path").attr("style",i),T.attr("transform",`translate(0,${-h/2})`),o.attr("transform",`translate(${-s/2+(e.padding??0)-(n.x-(n.left??0))},${-l/2+(e.padding??0)-h/2-(n.y-(n.top??0))})`),Kd(e,T),e.intersect=function(t){return pu.polygon(e,y,t)},a}),"taggedWaveEdgedRectangle");function Sp(t,e,r,i=100,a=0,n=180){const o=[],s=a*Math.PI/180,l=(n*Math.PI/180-s)/(i-1);for(let h=0;h<i;h++){const i=s+h*l,a=t+r*Math.cos(i),n=e+r*Math.sin(i);o.push({x:-a,y:-n})}return o}Cr(Sp,"generateCirclePoints");var Tp=Cr((async(t,e)=>{const{labelStyles:r,nodeStyles:i}=Sd(e);e.labelStyle=r;const{shapeSvg:a,bbox:n,label:o}=await Qd(t,e,Jd(e)),s=n.width+(e.padding??0),l=n.height+(e.padding??0),h=Math.max(5,.1*l),{cssStyles:c}=e,d=[...Sp(s/2,-l/2,h,30,-90,0),{x:-s/2-h,y:h},...Sp(s/2+2*h,-h,h,20,-180,-270),...Sp(s/2+2*h,h,h,20,-90,-180),{x:-s/2-h,y:-l/2},...Sp(s/2,l/2,h,20,0,90)],u=[{x:s/2,y:-l/2-h},{x:-s/2,y:-l/2-h},...Sp(s/2,-l/2,h,20,-90,0),{x:-s/2-h,y:-h},...Sp(s/2+.1*s,-h,h,20,-180,-270),...Sp(s/2+.1*s,h,h,20,-90,-180),{x:-s/2-h,y:l/2},...Sp(s/2,l/2,h,20,0,90),{x:-s/2,y:l/2+h},{x:s/2,y:l/2+h}],p=gd(a),g=Td(e,{fill:"none"});"handDrawn"!==e.look&&(g.roughness=0,g.fillStyle="solid");const f=tu(d).replace("Z",""),y=p.path(f,g),m=tu(u),x=p.path(m,{...g}),b=a.insert("g",":first-child");return b.insert((()=>x),":first-child").attr("stroke-opacity",0),b.insert((()=>y),":first-child"),b.attr("class","text"),c&&"handDrawn"!==e.look&&b.selectAll("path").attr("style",c),i&&"handDrawn"!==e.look&&b.selectAll("path").attr("style",i),b.attr("transform",`translate(${h}, 0)`),o.attr("transform",`translate(${-s/2+h-(n.x-(n.left??0))},${-l/2+(e.padding??0)/2-(n.y-(n.top??0))})`),Kd(e,b),e.intersect=function(t){return pu.polygon(e,u,t)},a}),"curlyBraceLeft");function vp(t,e,r,i=100,a=0,n=180){const o=[],s=a*Math.PI/180,l=(n*Math.PI/180-s)/(i-1);for(let h=0;h<i;h++){const i=s+h*l,a=t+r*Math.cos(i),n=e+r*Math.sin(i);o.push({x:a,y:n})}return o}Cr(vp,"generateCirclePoints");var Bp=Cr((async(t,e)=>{const{labelStyles:r,nodeStyles:i}=Sd(e);e.labelStyle=r;const{shapeSvg:a,bbox:n,label:o}=await Qd(t,e,Jd(e)),s=n.width+(e.padding??0),l=n.height+(e.padding??0),h=Math.max(5,.1*l),{cssStyles:c}=e,d=[...vp(s/2,-l/2,h,20,-90,0),{x:s/2+h,y:-h},...vp(s/2+2*h,-h,h,20,-180,-270),...vp(s/2+2*h,h,h,20,-90,-180),{x:s/2+h,y:l/2},...vp(s/2,l/2,h,20,0,90)],u=[{x:-s/2,y:-l/2-h},{x:s/2,y:-l/2-h},...vp(s/2,-l/2,h,20,-90,0),{x:s/2+h,y:-h},...vp(s/2+2*h,-h,h,20,-180,-270),...vp(s/2+2*h,h,h,20,-90,-180),{x:s/2+h,y:l/2},...vp(s/2,l/2,h,20,0,90),{x:s/2,y:l/2+h},{x:-s/2,y:l/2+h}],p=gd(a),g=Td(e,{fill:"none"});"handDrawn"!==e.look&&(g.roughness=0,g.fillStyle="solid");const f=tu(d).replace("Z",""),y=p.path(f,g),m=tu(u),x=p.path(m,{...g}),b=a.insert("g",":first-child");return b.insert((()=>x),":first-child").attr("stroke-opacity",0),b.insert((()=>y),":first-child"),b.attr("class","text"),c&&"handDrawn"!==e.look&&b.selectAll("path").attr("style",c),i&&"handDrawn"!==e.look&&b.selectAll("path").attr("style",i),b.attr("transform",`translate(${-h}, 0)`),o.attr("transform",`translate(${-s/2+(e.padding??0)/2-(n.x-(n.left??0))},${-l/2+(e.padding??0)/2-(n.y-(n.top??0))})`),Kd(e,b),e.intersect=function(t){return pu.polygon(e,u,t)},a}),"curlyBraceRight");function _p(t,e,r,i=100,a=0,n=180){const o=[],s=a*Math.PI/180,l=(n*Math.PI/180-s)/(i-1);for(let h=0;h<i;h++){const i=s+h*l,a=t+r*Math.cos(i),n=e+r*Math.sin(i);o.push({x:-a,y:-n})}return o}Cr(_p,"generateCirclePoints");var Lp=Cr((async(t,e)=>{const{labelStyles:r,nodeStyles:i}=Sd(e);e.labelStyle=r;const{shapeSvg:a,bbox:n,label:o}=await Qd(t,e,Jd(e)),s=n.width+(e.padding??0),l=n.height+(e.padding??0),h=Math.max(5,.1*l),{cssStyles:c}=e,d=[..._p(s/2,-l/2,h,30,-90,0),{x:-s/2-h,y:h},..._p(s/2+2*h,-h,h,20,-180,-270),..._p(s/2+2*h,h,h,20,-90,-180),{x:-s/2-h,y:-l/2},..._p(s/2,l/2,h,20,0,90)],u=[..._p(-s/2+h+h/2,-l/2,h,20,-90,-180),{x:s/2-h/2,y:h},..._p(-s/2-h/2,-h,h,20,0,90),..._p(-s/2-h/2,h,h,20,-90,0),{x:s/2-h/2,y:-h},..._p(-s/2+h+h/2,l/2,h,30,-180,-270)],p=[{x:s/2,y:-l/2-h},{x:-s/2,y:-l/2-h},..._p(s/2,-l/2,h,20,-90,0),{x:-s/2-h,y:-h},..._p(s/2+2*h,-h,h,20,-180,-270),..._p(s/2+2*h,h,h,20,-90,-180),{x:-s/2-h,y:l/2},..._p(s/2,l/2,h,20,0,90),{x:-s/2,y:l/2+h},{x:s/2-h-h/2,y:l/2+h},..._p(-s/2+h+h/2,-l/2,h,20,-90,-180),{x:s/2-h/2,y:h},..._p(-s/2-h/2,-h,h,20,0,90),..._p(-s/2-h/2,h,h,20,-90,0),{x:s/2-h/2,y:-h},..._p(-s/2+h+h/2,l/2,h,30,-180,-270)],g=gd(a),f=Td(e,{fill:"none"});"handDrawn"!==e.look&&(f.roughness=0,f.fillStyle="solid");const y=tu(d).replace("Z",""),m=g.path(y,f),x=tu(u).replace("Z",""),b=g.path(x,f),C=tu(p),k=g.path(C,{...f}),w=a.insert("g",":first-child");return w.insert((()=>k),":first-child").attr("stroke-opacity",0),w.insert((()=>m),":first-child"),w.insert((()=>b),":first-child"),w.attr("class","text"),c&&"handDrawn"!==e.look&&w.selectAll("path").attr("style",c),i&&"handDrawn"!==e.look&&w.selectAll("path").attr("style",i),w.attr("transform",`translate(${h-h/4}, 0)`),o.attr("transform",`translate(${-s/2+(e.padding??0)/2-(n.x-(n.left??0))},${-l/2+(e.padding??0)/2-(n.y-(n.top??0))})`),Kd(e,w),e.intersect=function(t){return pu.polygon(e,p,t)},a}),"curlyBraces"),Mp=Cr((async(t,e,{config:{themeVariables:r,flowchart:i}})=>{const{labelStyles:a}=Sd(e);e.labelStyle=a;const n=e.assetHeight??48,o=e.assetWidth??48,s=Math.max(n,o),l=null==i?void 0:i.wrappingWidth;e.width=Math.max(s,l??0);const{shapeSvg:h,bbox:c,halfPadding:d,label:u}=await Qd(t,e,"icon-shape default"),p="t"===e.pos,g=s+2*d,f=s+2*d,{nodeBorder:y,mainBkg:m}=r,{stylesMap:x}=kd(e),b=-f/2,C=-g/2,k=e.label?8:0,w=gd(h),S=Td(e,{stroke:x.get("fill")||m});"handDrawn"!==e.look&&(S.roughness=0,S.fillStyle="solid");const T=w.rectangle(b,C,f,g,S),v=Math.max(f,c.width),B=g+c.height+k,_=w.rectangle(-v/2,-B/2,v,B,{...S,fill:"transparent",stroke:"none"}),L=h.insert((()=>T),":first-child"),M=h.insert((()=>_));if(e.icon){const t=h.append("g");t.html(`<g>${await Ys(e.icon,{height:s,width:s,fallbackPrefix:""})}</g>`);const r=t.node().getBBox(),i=r.width,a=r.height,n=r.x,o=r.y;t.attr("transform",`translate(${-i/2-n},${p?c.height/2+k/2-a/2-o:-c.height/2-k/2-a/2-o})`),t.selectAll("path").attr("fill",x.get("stroke")??y)}return u.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))},${p?-B/2:B/2-c.height})`),L.attr("transform",`translate(0,${p?c.height/2+k/2:-c.height/2-k/2})`),Kd(e,M),e.intersect=function(t){if(Sr.info("iconSquare intersect",e,t),!e.label)return pu.rect(e,t);const r=e.x??0,i=e.y??0,a=e.height??0;let n=[];n=p?[{x:r-c.width/2,y:i-a/2},{x:r+c.width/2,y:i-a/2},{x:r+c.width/2,y:i-a/2+c.height+k},{x:r+f/2,y:i-a/2+c.height+k},{x:r+f/2,y:i+a/2},{x:r-f/2,y:i+a/2},{x:r-f/2,y:i-a/2+c.height+k},{x:r-c.width/2,y:i-a/2+c.height+k}]:[{x:r-f/2,y:i-a/2},{x:r+f/2,y:i-a/2},{x:r+f/2,y:i-a/2+g},{x:r+c.width/2,y:i-a/2+g},{x:r+c.width/2/2,y:i+a/2},{x:r-c.width/2,y:i+a/2},{x:r-c.width/2,y:i-a/2+g},{x:r-f/2,y:i-a/2+g}];return pu.polygon(e,n,t)},h}),"iconSquare"),Fp=Cr((async(t,e,{config:{themeVariables:r,flowchart:i}})=>{const{labelStyles:a}=Sd(e);e.labelStyle=a;const n=e.assetHeight??48,o=e.assetWidth??48,s=Math.max(n,o),l=null==i?void 0:i.wrappingWidth;e.width=Math.max(s,l??0);const{shapeSvg:h,bbox:c,label:d}=await Qd(t,e,"icon-shape default"),u=e.label?8:0,p="t"===e.pos,{nodeBorder:g,mainBkg:f}=r,{stylesMap:y}=kd(e),m=gd(h),x=Td(e,{stroke:y.get("fill")||f});"handDrawn"!==e.look&&(x.roughness=0,x.fillStyle="solid");const b=h.append("g");e.icon&&b.html(`<g>${await Ys(e.icon,{height:s,width:s,fallbackPrefix:""})}</g>`);const C=b.node().getBBox(),k=C.width,w=C.height,S=C.x,T=C.y,v=Math.max(k,w)*Math.SQRT2+40,B=m.circle(0,0,v,x),_=Math.max(v,c.width),L=v+c.height+u,M=m.rectangle(-_/2,-L/2,_,L,{...x,fill:"transparent",stroke:"none"}),F=h.insert((()=>B),":first-child"),A=h.insert((()=>M));return b.attr("transform",`translate(${-k/2-S},${p?c.height/2+u/2-w/2-T:-c.height/2-u/2-w/2-T})`),b.selectAll("path").attr("fill",y.get("stroke")||g),d.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))},${p?-L/2:L/2-c.height})`),F.attr("transform",`translate(0,${p?c.height/2+u/2:-c.height/2-u/2})`),Kd(e,A),e.intersect=function(t){Sr.info("iconSquare intersect",e,t);return pu.rect(e,t)},h}),"iconCircle"),Ap=Cr((async(t,e,{config:{themeVariables:r,flowchart:i}})=>{const{labelStyles:a}=Sd(e);e.labelStyle=a;const n=e.assetHeight??48,o=e.assetWidth??48,s=Math.max(n,o),l=null==i?void 0:i.wrappingWidth;e.width=Math.max(s,l??0);const{shapeSvg:h,bbox:c,label:d}=await Qd(t,e,"icon-shape default"),u="t"===e.pos,p=s,g=s,{nodeBorder:f}=r,{stylesMap:y}=kd(e),m=-g/2,x=-p/2,b=e.label?8:0,C=gd(h),k=Td(e,{stroke:"none",fill:"none"});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");const w=C.rectangle(m,x,g,p,k),S=Math.max(g,c.width),T=p+c.height+b,v=C.rectangle(-S/2,-T/2,S,T,{...k,fill:"transparent",stroke:"none"}),B=h.insert((()=>w),":first-child"),_=h.insert((()=>v));if(e.icon){const t=h.append("g");t.html(`<g>${await Ys(e.icon,{height:s,width:s,fallbackPrefix:""})}</g>`);const r=t.node().getBBox(),i=r.width,a=r.height,n=r.x,o=r.y;t.attr("transform",`translate(${-i/2-n},${u?c.height/2+b/2-a/2-o:-c.height/2-b/2-a/2-o})`),t.selectAll("path").attr("fill",y.get("stroke")||f)}return d.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))},${u?-T/2:T/2-c.height})`),B.attr("transform",`translate(0,${u?c.height/2+b/2:-c.height/2-b/2})`),Kd(e,_),e.intersect=function(t){if(Sr.info("iconSquare intersect",e,t),!e.label)return pu.rect(e,t);const r=e.x??0,i=e.y??0,a=e.height??0;let n=[];n=u?[{x:r-c.width/2,y:i-a/2},{x:r+c.width/2,y:i-a/2},{x:r+c.width/2,y:i-a/2+c.height+b},{x:r+g/2,y:i-a/2+c.height+b},{x:r+g/2,y:i+a/2},{x:r-g/2,y:i+a/2},{x:r-g/2,y:i-a/2+c.height+b},{x:r-c.width/2,y:i-a/2+c.height+b}]:[{x:r-g/2,y:i-a/2},{x:r+g/2,y:i-a/2},{x:r+g/2,y:i-a/2+p},{x:r+c.width/2,y:i-a/2+p},{x:r+c.width/2/2,y:i+a/2},{x:r-c.width/2,y:i+a/2},{x:r-c.width/2,y:i-a/2+p},{x:r-g/2,y:i-a/2+p}];return pu.polygon(e,n,t)},h}),"icon"),$p=Cr((async(t,e,{config:{flowchart:r}})=>{const i=new Image;i.src=(null==e?void 0:e.img)??"",await i.decode();const a=Number(i.naturalWidth.toString().replace("px","")),n=Number(i.naturalHeight.toString().replace("px",""));e.imageAspectRatio=a/n;const{labelStyles:o}=Sd(e);e.labelStyle=o;const s=null==r?void 0:r.wrappingWidth;e.defaultWidth=null==r?void 0:r.wrappingWidth;const l=Math.max(e.label?s??0:0,(null==e?void 0:e.assetWidth)??a),h="on"===e.constraint&&(null==e?void 0:e.assetHeight)?e.assetHeight*e.imageAspectRatio:l,c="on"===e.constraint?h/e.imageAspectRatio:(null==e?void 0:e.assetHeight)??n;e.width=Math.max(h,s??0);const{shapeSvg:d,bbox:u,label:p}=await Qd(t,e,"image-shape default"),g="t"===e.pos,f=-h/2,y=-c/2,m=e.label?8:0,x=gd(d),b=Td(e,{});"handDrawn"!==e.look&&(b.roughness=0,b.fillStyle="solid");const C=x.rectangle(f,y,h,c,b),k=Math.max(h,u.width),w=c+u.height+m,S=x.rectangle(-k/2,-w/2,k,w,{...b,fill:"none",stroke:"none"}),T=d.insert((()=>C),":first-child"),v=d.insert((()=>S));if(e.img){const t=d.append("image");t.attr("href",e.img),t.attr("width",h),t.attr("height",c),t.attr("preserveAspectRatio","none"),t.attr("transform",`translate(${-h/2},${g?w/2-c:-w/2})`)}return p.attr("transform",`translate(${-u.width/2-(u.x-(u.left??0))},${g?-c/2-u.height/2-m/2:c/2-u.height/2+m/2})`),T.attr("transform",`translate(0,${g?u.height/2+m/2:-u.height/2-m/2})`),Kd(e,v),e.intersect=function(t){if(Sr.info("iconSquare intersect",e,t),!e.label)return pu.rect(e,t);const r=e.x??0,i=e.y??0,a=e.height??0;let n=[];n=g?[{x:r-u.width/2,y:i-a/2},{x:r+u.width/2,y:i-a/2},{x:r+u.width/2,y:i-a/2+u.height+m},{x:r+h/2,y:i-a/2+u.height+m},{x:r+h/2,y:i+a/2},{x:r-h/2,y:i+a/2},{x:r-h/2,y:i-a/2+u.height+m},{x:r-u.width/2,y:i-a/2+u.height+m}]:[{x:r-h/2,y:i-a/2},{x:r+h/2,y:i-a/2},{x:r+h/2,y:i-a/2+c},{x:r+u.width/2,y:i-a/2+c},{x:r+u.width/2/2,y:i+a/2},{x:r-u.width/2,y:i+a/2},{x:r-u.width/2,y:i-a/2+c},{x:r-h/2,y:i-a/2+c}];return pu.polygon(e,n,t)},d}),"imageSquare"),Ep={state:fu,stateStart:xu,stateEnd:bu,forkJoin:Cu,choice:ku,note:wu,rectWithTitle:Tu,roundedRect:yu,squareRect:mu,rectangle:mu,rect:mu,process:mu,proc:mu,rounded:yu,event:yu,stadium:Su,pill:Su,terminal:Su,subroutine:Bu,"framed-rectangle":Bu,"fr-rect":Bu,subprocess:Bu,subproc:Bu,cylinder:Fu,db:Fu,cyl:Fu,database:Fu,question:Iu,diam:Iu,diamond:Iu,decision:Iu,hexagon:Pu,hex:Pu,prepare:Pu,lean_right:Nu,"lean-r":Nu,"lean-right":Nu,"in-out":Nu,lean_left:ju,"lean-l":ju,"lean-left":ju,"out-in":ju,trapezoid:Hu,"trap-b":Hu,"trapezoid-bottom":Hu,priority:Hu,inv_trapezoid:Uu,"inv-trapezoid":Uu,"trapezoid-top":Uu,"trap-t":Uu,manual:Uu,doublecircle:$u,"dbl-circ":$u,"double-circle":$u,circle:Au,circ:Au,rect_left_inv_arrow:Eu,odd:Eu,card:qu,"notched-rectangle":qu,"notch-rect":qu,"lined-rectangle":zu,"lin-rect":zu,"lin-proc":zu,"lined-process":zu,"shaded-process":zu,"small-circle":xu,"sm-circ":xu,start:xu,stop:bu,"framed-circle":bu,"fr-circ":bu,join:Cu,fork:Cu,comment:Tp,"brace-l":Tp,bolt:mp,"com-link":mp,"lightning-bolt":mp,doc:yp,document:yp,delay:Gu,"half-rounded-rectangle":Gu,"horizontal-cylinder":op,"h-cyl":op,das:op,"lined-cylinder":fp,"lin-cyl":fp,disk:fp,"curved-trapezoid":Zu,"curv-trap":Zu,display:Zu,"divided-rectangle":Ju,"div-rect":Ju,"div-proc":Ju,"divided-process":Ju,triangle:Vu,tri:Vu,extract:Vu,"window-pane":Cp,"win-pane":Cp,"internal-storage":Cp,"f-circ":xp,junction:xp,"filled-circle":xp,"lin-doc":kp,"lined-document":kp,"notched-pentagon":sp,"notch-pent":sp,"loop-limit":sp,"flipped-triangle":lp,"flip-tri":lp,"manual-file":lp,"sloped-rectangle":Xu,"sl-rect":Xu,"manual-input":Xu,docs:bp,documents:bp,"st-doc":bp,"stacked-document":bp,processes:dp,procs:dp,"stacked-rectangle":dp,"st-rect":dp,flag:rp,"paper-tape":rp,"bow-tie-rectangle":Ku,"bow-rect":Ku,"stored-data":Ku,"crossed-circle":ep,"cross-circ":ep,summary:ep,"tag-doc":wp,"tagged-document":wp,"tag-rect":cp,"tagged-rectangle":cp,"tag-proc":cp,"tagged-process":cp,hourglass:hp,collate:hp,text:Ru,anchor:Wu,brace:Tp,labelRect:Yu,"brace-r":Bp,braces:Lp,iconSquare:Mp,iconCircle:Fp,icon:Ap,iconRounded:Cr((async(t,e,{config:{themeVariables:r,flowchart:i}})=>{const{labelStyles:a}=Sd(e);e.labelStyle=a;const n=e.assetHeight??48,o=e.assetWidth??48,s=Math.max(n,o),l=null==i?void 0:i.wrappingWidth;e.width=Math.max(s,l??0);const{shapeSvg:h,bbox:c,halfPadding:d,label:u}=await Qd(t,e,"icon-shape default"),p="t"===e.pos,g=s+2*d,f=s+2*d,{nodeBorder:y,mainBkg:m}=r,{stylesMap:x}=kd(e),b=-f/2,C=-g/2,k=e.label?8:0,w=gd(h),S=Td(e,{stroke:x.get("fill")||m});"handDrawn"!==e.look&&(S.roughness=0,S.fillStyle="solid");const T=w.path(bd(b,C,f,g,5),S),v=Math.max(f,c.width),B=g+c.height+k,_=w.rectangle(-v/2,-B/2,v,B,{...S,fill:"transparent",stroke:"none"}),L=h.insert((()=>T),":first-child"),M=h.insert((()=>_));if(e.icon){const t=h.append("g");t.html(`<g>${await Ys(e.icon,{height:s,width:s,fallbackPrefix:""})}</g>`);const r=t.node().getBBox(),i=r.width,a=r.height,n=r.x,o=r.y;t.attr("transform",`translate(${-i/2-n},${p?c.height/2+k/2-a/2-o:-c.height/2-k/2-a/2-o})`),t.selectAll("path").attr("fill",x.get("stroke")??y)}return u.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))},${p?-B/2:B/2-c.height})`),L.attr("transform",`translate(0,${p?c.height/2+k/2:-c.height/2-k/2})`),Kd(e,M),e.intersect=function(t){if(Sr.info("iconSquare intersect",e,t),!e.label)return pu.rect(e,t);const r=e.x??0,i=e.y??0,a=e.height??0;let n=[];n=p?[{x:r-c.width/2,y:i-a/2},{x:r+c.width/2,y:i-a/2},{x:r+c.width/2,y:i-a/2+c.height+k},{x:r+f/2,y:i-a/2+c.height+k},{x:r+f/2,y:i+a/2},{x:r-f/2,y:i+a/2},{x:r-f/2,y:i-a/2+c.height+k},{x:r-c.width/2,y:i-a/2+c.height+k}]:[{x:r-f/2,y:i-a/2},{x:r+f/2,y:i-a/2},{x:r+f/2,y:i-a/2+g},{x:r+c.width/2,y:i-a/2+g},{x:r+c.width/2/2,y:i+a/2},{x:r-c.width/2,y:i+a/2},{x:r-c.width/2,y:i-a/2+g},{x:r-f/2,y:i-a/2+g}];return pu.polygon(e,n,t)},h}),"iconRounded"),imageSquare:$p},Dp=new Map,Ip=Cr((async(t,e,r)=>{let i,a;if("rect"===e.shape&&(e.rx&&e.ry?e.shape="roundedRect":e.shape="squareRect"),!Ep[e.shape])throw new Error(`No such shape: ${e.shape}. Please check your syntax.`);if(e.link){let n;"sandbox"===r.config.securityLevel?n="_top":e.linkTarget&&(n=e.linkTarget||"_blank"),i=t.insert("svg:a").attr("xlink:href",e.link).attr("target",n),a=await Ep[e.shape](i,e,r)}else a=await Ep[e.shape](t,e,r),i=a;return e.tooltip&&a.attr("title",e.tooltip),Dp.set(e.id,i),e.haveCallback&&Dp.get(e.id).attr("class",Dp.get(e.id).attr("class")+" clickable"),i}),"insertNode"),Op=Cr(((t,e)=>{Dp.set(e.id,t)}),"setNodeElem"),Pp=Cr((()=>{Dp.clear()}),"clear"),Rp=Cr((t=>{const e=Dp.get(t.id);Sr.trace("Transforming node",t.diff,t,"translate("+(t.x-t.width/2-5)+", "+t.width/2+")");const r=t.diff||0;return t.clusterNode?e.attr("transform","translate("+(t.x+r-t.width/2)+", "+(t.y-t.height/2-8)+")"):e.attr("transform","translate("+t.x+", "+t.y+")"),r}),"positionNode"),qp={common:Yi,getConfig:pi,insertCluster:Md,insertEdge:Vd,insertEdgeLabel:Rd,insertMarkers:Xd,insertNode:Ip,interpolateToCurve:cl,labelHelper:Qd,log:Sr,positionEdgeLabel:zd},zp={},Wp=Cr((t=>{for(const e of t)zp[e.name]=e}),"registerLayoutLoaders");Cr((()=>{Wp([{name:"dagre",loader:Cr((async()=>await z((()=>import("./dagre-7KT5K2WU-kcp6m67r.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14]),import.meta.url)),"loader")}])}),"registerDefaultLayoutLoaders")();var Np=Cr((async(t,e)=>{if(!(t.layoutAlgorithm in zp))throw new Error(`Unknown layout algorithm: ${t.layoutAlgorithm}`);const r=zp[t.layoutAlgorithm];return(await r.loader()).render(t,e,qp,{algorithm:r.algorithm})}),"render"),jp=Cr(((t="",{fallback:e="dagre"}={})=>{if(t in zp)return t;if(e in zp)return Sr.warn(`Layout algorithm ${t} is not registered. Using ${e} as fallback.`),e;throw new Error(`Both layout algorithms ${t} and ${e} are not registered.`)}),"getRegisteredLayoutAlgorithm"),Hp="11.3.0",Up=Cr((t=>{var e;const{securityLevel:r}=fa();let i=Z("body");if("sandbox"===r){const r=(null==(e=Z(`#i${t}`).node())?void 0:e.contentDocument)??document;i=Z(r.body)}return i.select(`#${t}`)}),"selectSvgElement"),Yp="comm",Vp="rule",Gp="decl",Zp=Math.abs,Xp=String.fromCharCode;function Qp(t){return t.trim()}function Kp(t,e,r){return t.replace(e,r)}function Jp(t,e,r){return t.indexOf(e,r)}function tg(t,e){return 0|t.charCodeAt(e)}function eg(t,e,r){return t.slice(e,r)}function rg(t){return t.length}function ig(t,e){return e.push(t),t}var ag=1,ng=1,og=0,sg=0,lg=0,hg="";function cg(t,e,r,i,a,n,o,s){return{value:t,root:e,parent:r,type:i,props:a,children:n,line:ag,column:ng,length:o,return:"",siblings:s}}function dg(){return lg=sg<og?tg(hg,sg++):0,ng++,10===lg&&(ng=1,ag++),lg}function ug(){return tg(hg,sg)}function pg(){return sg}function gg(t,e){return eg(hg,t,e)}function fg(t){switch(t){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 yg(t){return Qp(gg(sg-1,bg(91===t?t+2:40===t?t+1:t)))}function mg(t){for(;(lg=ug())&&lg<33;)dg();return fg(t)>2||fg(lg)>3?"":" "}function xg(t,e){for(;--e&&dg()&&!(lg<48||lg>102||lg>57&&lg<65||lg>70&&lg<97););return gg(t,pg()+(e<6&&32==ug()&&32==dg()))}function bg(t){for(;dg();)switch(lg){case t:return sg;case 34:case 39:34!==t&&39!==t&&bg(lg);break;case 40:41===t&&bg(t);break;case 92:dg()}return sg}function Cg(t,e){for(;dg()&&t+lg!==57&&(t+lg!==84||47!==ug()););return"/*"+gg(e,sg-1)+"*"+Xp(47===t?t:dg())}function kg(t){for(;!fg(ug());)dg();return gg(t,sg)}function wg(t){return function(t){return hg="",t}(Sg("",null,null,null,[""],t=function(t){return ag=ng=1,og=rg(hg=t),sg=0,[]}(t),0,[0],t))}function Sg(t,e,r,i,a,n,o,s,l){for(var h=0,c=0,d=o,u=0,p=0,g=0,f=1,y=1,m=1,x=0,b="",C=a,k=n,w=i,S=b;y;)switch(g=x,x=dg()){case 40:if(108!=g&&58==tg(S,d-1)){-1!=Jp(S+=Kp(yg(x),"&","&\f"),"&\f",Zp(h?s[h-1]:0))&&(m=-1);break}case 34:case 39:case 91:S+=yg(x);break;case 9:case 10:case 13:case 32:S+=mg(g);break;case 92:S+=xg(pg()-1,7);continue;case 47:switch(ug()){case 42:case 47:ig(vg(Cg(dg(),pg()),e,r,l),l),5!=fg(g||1)&&5!=fg(ug()||1)||!rg(S)||" "===eg(S,-1,void 0)||(S+=" ");break;default:S+="/"}break;case 123*f:s[h++]=rg(S)*m;case 125*f:case 59:case 0:switch(x){case 0:case 125:y=0;case 59+c:-1==m&&(S=Kp(S,/\f/g,"")),p>0&&(rg(S)-d||0===f&&47===g)&&ig(p>32?Bg(S+";",i,r,d-1,l):Bg(Kp(S," ","")+";",i,r,d-2,l),l);break;case 59:S+=";";default:if(ig(w=Tg(S,e,r,h,c,a,s,b,C=[],k=[],d,n),n),123===x)if(0===c)Sg(S,e,w,w,C,n,d,s,k);else switch(99===u&&110===tg(S,3)?100:u){case 100:case 108:case 109:case 115:Sg(t,w,w,i&&ig(Tg(t,w,w,0,0,a,s,b,a,C=[],d,k),k),a,k,d,s,i?C:k);break;default:Sg(S,w,w,w,[""],k,0,s,k)}}h=c=p=0,f=m=1,b=S="",d=o;break;case 58:d=1+rg(S),p=g;default:if(f<1)if(123==x)--f;else if(125==x&&0==f++&&125==(lg=sg>0?tg(hg,--sg):0,ng--,10===lg&&(ng=1,ag--),lg))continue;switch(S+=Xp(x),x*f){case 38:m=c>0?1:(S+="\f",-1);break;case 44:s[h++]=(rg(S)-1)*m,m=1;break;case 64:45===ug()&&(S+=yg(dg())),u=ug(),c=d=rg(b=S+=kg(pg())),x++;break;case 45:45===g&&2==rg(S)&&(f=0)}}return n}function Tg(t,e,r,i,a,n,o,s,l,h,c,d){for(var u=a-1,p=0===a?n:[""],g=function(t){return t.length}(p),f=0,y=0,m=0;f<i;++f)for(var x=0,b=eg(t,u+1,u=Zp(y=o[f])),C=t;x<g;++x)(C=Qp(y>0?p[x]+" "+b:Kp(b,/&\f/g,p[x])))&&(l[m++]=C);return cg(t,e,r,0===a?Vp:s,l,h,c,d)}function vg(t,e,r,i){return cg(t,e,r,Yp,Xp(lg),eg(t,2,-2),0,i)}function Bg(t,e,r,i,a){return cg(t,e,r,Gp,eg(t,0,i),eg(t,i+1,-1),i,a)}function _g(t,e){for(var r="",i=0;i<t.length;i++)r+=e(t[i],i,t,e)||"";return r}function Lg(t,e,r,i){switch(t.type){case"@layer":if(t.children.length)break;case"@import":case Gp:return t.return=t.return||t.value;case Yp:return"";case"@keyframes":return t.return=t.value+"{"+_g(t.children,i)+"}";case Vp:if(!rg(t.value=t.props.join(",")))return""}return rg(r=_g(t.children,i))?t.return=t.value+"{"+r+"}":""}var Mg={id:"c4",detector:Cr((t=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(t)),"detector"),loader:Cr((async()=>{const{diagram:t}=await z((async()=>{const{diagram:t}=await import("./c4Diagram-ZCSEYPFN-B6hKiRsz.js");return{diagram:t}}),__vite__mapDeps([15,16,6,3,4,7,14]),import.meta.url);return{id:"c4",diagram:t}}),"loader")},Fg="flowchart",Ag={id:Fg,detector:Cr(((t,e)=>{var r,i;return"dagre-wrapper"!==(null==(r=null==e?void 0:e.flowchart)?void 0:r.defaultRenderer)&&"elk"!==(null==(i=null==e?void 0:e.flowchart)?void 0:i.defaultRenderer)&&/^\s*graph/.test(t)}),"detector"),loader:Cr((async()=>{const{diagram:t}=await z((async()=>{const{diagram:t}=await import("./flowDiagram-NWEUNK3L-Cts11xJ5.js");return{diagram:t}}),__vite__mapDeps([17,18,6,3,4,7,19,14]),import.meta.url);return{id:Fg,diagram:t}}),"loader")},$g="flowchart-v2",Eg={id:$g,detector:Cr(((t,e)=>{var r,i,a;return"dagre-d3"!==(null==(r=null==e?void 0:e.flowchart)?void 0:r.defaultRenderer)&&("elk"===(null==(i=null==e?void 0:e.flowchart)?void 0:i.defaultRenderer)&&(e.layout="elk"),!(!/^\s*graph/.test(t)||"dagre-wrapper"!==(null==(a=null==e?void 0:e.flowchart)?void 0:a.defaultRenderer))||/^\s*flowchart/.test(t))}),"detector"),loader:Cr((async()=>{const{diagram:t}=await z((async()=>{const{diagram:t}=await import("./flowDiagram-NWEUNK3L-Cts11xJ5.js");return{diagram:t}}),__vite__mapDeps([17,18,6,3,4,7,19,14]),import.meta.url);return{id:$g,diagram:t}}),"loader")},Dg={id:"er",detector:Cr((t=>/^\s*erDiagram/.test(t)),"detector"),loader:Cr((async()=>{const{diagram:t}=await z((async()=>{const{diagram:t}=await import("./erDiagram-DKC2X5TE-CmqYNL45.js");return{diagram:t}}),__vite__mapDeps([20,1,2,3,4,5,6,7,8,9,10,11,14]),import.meta.url);return{id:"er",diagram:t}}),"loader")},Ig="gitGraph",Og={id:Ig,detector:Cr((t=>/^\s*gitGraph/.test(t)),"detector"),loader:Cr((async()=>{const{diagram:t}=await z((async()=>{const{diagram:t}=await import("./gitGraphDiagram-JPZ3KUXI-B62QkoYb.js");return{diagram:t}}),__vite__mapDeps([21,22,23,24,3,4,25,5,6,7,2,9,10,13,14]),import.meta.url);return{id:Ig,diagram:t}}),"loader")},Pg="gantt",Rg={id:Pg,detector:Cr((t=>/^\s*gantt/.test(t)),"detector"),loader:Cr((async()=>{const{diagram:t}=await z((async()=>{const{diagram:t}=await import("./ganttDiagram-HLVPPPRE-CICB85_m.js");return{diagram:t}}),__vite__mapDeps([26,3,4,6,7,27,28,29,14]),import.meta.url);return{id:Pg,diagram:t}}),"loader")},qg="info",zg={id:qg,detector:Cr((t=>/^\s*info/.test(t)),"detector"),loader:Cr((async()=>{const{diagram:t}=await z((async()=>{const{diagram:t}=await import("./infoDiagram-RZZSJVI2-CLz7BARX.js");return{diagram:t}}),__vite__mapDeps([30,24,3,4,25,5,6,7,2,9,10,13,14]),import.meta.url);return{id:qg,diagram:t}}),"loader")},Wg={id:"pie",detector:Cr((t=>/^\s*pie/.test(t)),"detector"),loader:Cr((async()=>{const{diagram:t}=await z((async()=>{const{diagram:t}=await import("./pieDiagram-X7YZ5ZEZ-Bh4I4PCv.js");return{diagram:t}}),__vite__mapDeps([31,22,24,3,4,25,5,6,7,2,9,10,13,32,14,33,29]),import.meta.url);return{id:"pie",diagram:t}}),"loader")},Ng="quadrantChart",jg={id:Ng,detector:Cr((t=>/^\s*quadrantChart/.test(t)),"detector"),loader:Cr((async()=>{const{diagram:t}=await z((async()=>{const{diagram:t}=await import("./quadrantDiagram-F36EZAVT-DG9YWis2.js");return{diagram:t}}),__vite__mapDeps([34,6,3,4,7,28,29,14]),import.meta.url);return{id:Ng,diagram:t}}),"loader")},Hg="xychart",Ug={id:Hg,detector:Cr((t=>/^\s*xychart-beta/.test(t)),"detector"),loader:Cr((async()=>{const{diagram:t}=await z((async()=>{const{diagram:t}=await import("./xychartDiagram-KECQ2H5Q-Cp64CgUv.js");return{diagram:t}}),__vite__mapDeps([35,6,3,4,7,29,33,36,28,14]),import.meta.url);return{id:Hg,diagram:t}}),"loader")},Yg="requirement",Vg={id:Yg,detector:Cr((t=>/^\s*requirement(Diagram)?/.test(t)),"detector"),loader:Cr((async()=>{const{diagram:t}=await z((async()=>{const{diagram:t}=await import("./requirementDiagram-JG2LMPGF-D0LraHwS.js");return{diagram:t}}),__vite__mapDeps([37,6,3,4,7,1,2,5,8,9,10,11,14]),import.meta.url);return{id:Yg,diagram:t}}),"loader")},Gg="sequence",Zg={id:Gg,detector:Cr((t=>/^\s*sequenceDiagram/.test(t)),"detector"),loader:Cr((async()=>{const{diagram:t}=await z((async()=>{const{diagram:t}=await import("./sequenceDiagram-WK7YDQ3N-CsMJ2kiZ.js");return{diagram:t}}),__vite__mapDeps([38,16,23,6,3,4,7,14]),import.meta.url);return{id:Gg,diagram:t}}),"loader")},Xg="class",Qg={id:Xg,detector:Cr(((t,e)=>{var r;return"dagre-wrapper"!==(null==(r=null==e?void 0:e.class)?void 0:r.defaultRenderer)&&/^\s*classDiagram/.test(t)}),"detector"),loader:Cr((async()=>{const{diagram:t}=await z((async()=>{const{diagram:t}=await import("./classDiagram-Q73GJZWF-DAdn1Yxt.js");return{diagram:t}}),__vite__mapDeps([39,40,6,3,4,7,1,2,5,8,9,10,11,14]),import.meta.url);return{id:Xg,diagram:t}}),"loader")},Kg="classDiagram",Jg={id:Kg,detector:Cr(((t,e)=>{var r;return!(!/^\s*classDiagram/.test(t)||"dagre-wrapper"!==(null==(r=null==e?void 0:e.class)?void 0:r.defaultRenderer))||/^\s*classDiagram-v2/.test(t)}),"detector"),loader:Cr((async()=>{const{diagram:t}=await z((async()=>{const{diagram:t}=await import("./classDiagram-v2-C6QPLPW4-DnOh94Ik.js");return{diagram:t}}),__vite__mapDeps([41,42,6,3,4,7,14,40,1,2,5,8,9,10,11,12,13]),import.meta.url);return{id:Kg,diagram:t}}),"loader")},tf="state",ef={id:tf,detector:Cr(((t,e)=>{var r;return"dagre-wrapper"!==(null==(r=null==e?void 0:e.state)?void 0:r.defaultRenderer)&&/^\s*stateDiagram/.test(t)}),"detector"),loader:Cr((async()=>{const{diagram:t}=await z((async()=>{const{diagram:t}=await import("./stateDiagram-4JV6CC6H-CZLqWq3w.js");return{diagram:t}}),__vite__mapDeps([43,44,18,6,3,4,7,1,2,5,8,9,10,11,14]),import.meta.url);return{id:tf,diagram:t}}),"loader")},rf="stateDiagram",af={id:rf,detector:Cr(((t,e)=>{var r;return!!/^\s*stateDiagram-v2/.test(t)||!(!/^\s*stateDiagram/.test(t)||"dagre-wrapper"!==(null==(r=null==e?void 0:e.state)?void 0:r.defaultRenderer))}),"detector"),loader:Cr((async()=>{const{diagram:t}=await z((async()=>{const{diagram:t}=await import("./stateDiagram-v2-7KT6RKTD-DAo1O7e4.js");return{diagram:t}}),__vite__mapDeps([45,44,18,6,3,4,7,14]),import.meta.url);return{id:rf,diagram:t}}),"loader")},nf="journey",of={id:nf,detector:Cr((t=>/^\s*journey/.test(t)),"detector"),loader:Cr((async()=>{const{diagram:t}=await z((async()=>{const{diagram:t}=await import("./journeyDiagram-BLD6N6MZ-ea1xaw37.js");return{diagram:t}}),__vite__mapDeps([46,16,6,3,4,7,32,14]),import.meta.url);return{id:nf,diagram:t}}),"loader")},sf={draw:Cr(((t,e,r)=>{Sr.debug("rendering svg for syntax error\n");const i=Up(e),a=i.append("g");i.attr("viewBox","0 0 2412 512"),Zi(i,100,512,!0),a.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"),a.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"),a.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"),a.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"),a.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"),a.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"),a.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"),a.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")},lf=sf,hf={db:{},renderer:sf,parser:{parse:Cr((()=>{}),"parse")}},cf="flowchart-elk",df={id:cf,detector:Cr(((t,e={})=>{var r;return!!(/^\s*flowchart-elk/.test(t)||/^\s*flowchart|graph/.test(t)&&"elk"===(null==(r=null==e?void 0:e.flowchart)?void 0:r.defaultRenderer))&&(e.layout="elk",!0)}),"detector"),loader:Cr((async()=>{const{diagram:t}=await z((async()=>{const{diagram:t}=await import("./flowDiagram-NWEUNK3L-Cts11xJ5.js");return{diagram:t}}),__vite__mapDeps([17,18,6,3,4,7,19,14]),import.meta.url);return{id:cf,diagram:t}}),"loader")},uf="timeline",pf={id:uf,detector:Cr((t=>/^\s*timeline/.test(t)),"detector"),loader:Cr((async()=>{const{diagram:t}=await z((async()=>{const{diagram:t}=await import("./timeline-definition-3ZMEY6HS-3zsztxZX.js");return{diagram:t}}),__vite__mapDeps([47,6,3,4,7,32,14]),import.meta.url);return{id:uf,diagram:t}}),"loader")},gf="mindmap",ff={id:gf,detector:Cr((t=>/^\s*mindmap/.test(t)),"detector"),loader:Cr((async()=>{const{diagram:t}=await z((async()=>{const{diagram:t}=await import("./mindmap-definition-OEB2RXX2-BQglr0GN.js");return{diagram:t}}),__vite__mapDeps([48,49,3,4,6,7,14]),import.meta.url);return{id:gf,diagram:t}}),"loader")},yf="sankey",mf={id:yf,detector:Cr((t=>/^\s*sankey-beta/.test(t)),"detector"),loader:Cr((async()=>{const{diagram:t}=await z((async()=>{const{diagram:t}=await import("./sankeyDiagram-ATFNWWW6-DqcM---j.js");return{diagram:t}}),__vite__mapDeps([50,6,3,4,7,33,29,51,14]),import.meta.url);return{id:yf,diagram:t}}),"loader")},xf="packet",bf={id:xf,detector:Cr((t=>/^\s*packet-beta/.test(t)),"detector"),loader:Cr((async()=>{const{diagram:t}=await z((async()=>{const{diagram:t}=await import("./diagram-AVGMFHF7-Qk4KB2WS.js");return{diagram:t}}),__vite__mapDeps([52,22,24,3,4,25,5,6,7,2,9,10,13,14]),import.meta.url);return{id:xf,diagram:t}}),"loader")},Cf="block",kf={id:Cf,detector:Cr((t=>/^\s*block-beta/.test(t)),"detector"),loader:Cr((async()=>{const{diagram:t}=await z((async()=>{const{diagram:t}=await import("./blockDiagram-TCMKQVZ6-C8hwVnTX.js");return{diagram:t}}),__vite__mapDeps([53,42,6,3,4,7,14,13,2,5,1,19]),import.meta.url);return{id:Cf,diagram:t}}),"loader")},wf="architecture",Sf={id:wf,detector:Cr((t=>/^\s*architecture/.test(t)),"detector"),loader:Cr((async()=>{const{diagram:t}=await z((async()=>{const{diagram:t}=await import("./architectureDiagram-IFBEXTG3-BUUyUyY4.js");return{diagram:t}}),__vite__mapDeps([54,22,23,24,3,4,25,5,6,7,2,9,10,13,49,14]),import.meta.url);return{id:wf,diagram:t}}),"loader")},Tf=!1,vf=Cr((()=>{Tf||(Tf=!0,wa("error",hf,(t=>"error"===t.toLowerCase().trim())),wa("---",{db:{clear:Cr((()=>{}),"clear")},styles:{},renderer:{draw:Cr((()=>{}),"draw")},parser:{parse:Cr((()=>{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:Cr((()=>null),"init")},(t=>t.toLowerCase().trimStart().startsWith("---"))),$r(Mg,Jg,Qg,Dg,Rg,zg,Wg,Vg,Zg,df,Eg,Ag,ff,pf,Og,af,ef,of,jg,mf,bf,Ug,kf,Sf))}),"addDiagrams"),Bf=Cr((async()=>{Sr.debug("Loading registered diagrams");const t=(await Promise.allSettled(Object.entries(Fr).map((async([t,{detector:e,loader:r}])=>{if(r)try{Sa(t)}catch{try{const{diagram:t,id:i}=await r();wa(i,t,e)}catch(i){throw Sr.error(`Failed to load external diagram with key ${t}. Removing from detectors.`),delete Fr[t],i}}})))).filter((t=>"rejected"===t.status));if(t.length>0){Sr.error(`Failed to load ${t.length} external diagrams`);for(const e of t)Sr.error(e);throw new Error(`Failed to load ${t.length} external diagrams`)}}),"loadRegisteredDiagrams");function _f(t,e){t.attr("role","graphics-document document"),""!==e&&t.attr("aria-roledescription",e)}function Lf(t,e,r,i){if(void 0!==t.insert){if(r){const e=`chart-desc-${i}`;t.attr("aria-describedby",e),t.insert("desc",":first-child").attr("id",e).text(r)}if(e){const r=`chart-title-${i}`;t.attr("aria-labelledby",r),t.insert("title",":first-child").attr("id",r).text(e)}}}Cr(_f,"setA11yDiagramInfo"),Cr(Lf,"addSVGa11yTitleDescription");var Mf=(Cr(u=class{constructor(t,e,r,i,a){this.type=t,this.text=e,this.db=r,this.parser=i,this.renderer=a}static async fromText(t,e={}){var r,i;const a=pi(),n=Ar(t,a);t=zl(t)+"\n";try{Sa(n)}catch{const t=Dr(n);if(!t)throw new Mr(`Diagram ${n} not found.`);const{id:e,diagram:r}=await t();wa(e,r)}const{db:o,parser:s,renderer:l,init:h}=Sa(n);return s.parser&&(s.parser.yy=o),null==(r=o.clear)||r.call(o),null==h||h(a),e.title&&(null==(i=o.setDiagramTitle)||i.call(o,e.title)),await s.parse(t),new u(n,t,o,s,l)}async render(t,e){await this.renderer.draw(this.text,t,e,this)}getParser(){return this.parser}getType(){return this.type}},"Diagram"),u),Ff=[],Af=Cr((()=>{Ff.forEach((t=>{t()})),Ff=[]}),"attachFunctions"),$f=Cr((t=>t.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart()),"cleanupComments");function Ef(t){const e=t.match(Br);if(!e)return{text:t,metadata:{}};let r=Ss(e[1],{schema:ws})??{};r="object"!=typeof r||Array.isArray(r)?{}:r;const i={};return r.displayMode&&(i.displayMode=r.displayMode.toString()),r.title&&(i.title=r.title.toString()),r.config&&(i.config=r.config),{text:t.slice(e[0].length),metadata:i}}Cr(Ef,"extractFrontMatter");var Df=Cr((t=>t.replace(/\r\n?/g,"\n").replace(/<(\w+)([^>]*)>/g,((t,e,r)=>"<"+e+r.replace(/="([^"]*)"/g,"='$1'")+">"))),"cleanupText"),If=Cr((t=>{const{text:e,metadata:r}=Ef(t),{displayMode:i,title:a,config:n={}}=r;return i&&(n.gantt||(n.gantt={}),n.gantt.displayMode=i),{title:a,config:n,text:e}}),"processFrontmatter"),Of=Cr((t=>{const e=ql.detectInit(t)??{},r=ql.detectDirective(t,"wrap");return Array.isArray(r)?e.wrap=r.some((({type:t})=>"wrap"===t)):"wrap"===(null==r?void 0:r.type)&&(e.wrap=!0),{text:ll(t),directive:e}}),"processDirectives");function Pf(t){const e=Df(t),r=If(e),i=Of(r.text),a=Rl(r.config,i.directive);return{code:t=$f(i.text),title:r.title,config:a}}function Rf(t){const e=(new TextEncoder).encode(t),r=Array.from(e,(t=>String.fromCodePoint(t))).join("");return btoa(r)}Cr(Pf,"preprocessDiagram"),Cr(Rf,"toBase64");var qf=["foreignobject"],zf=["dominant-baseline"];function Wf(t){const e=Pf(t);return yi(),fi(e.config??{}),e}async function Nf(t,e){vf();try{const{code:e,config:r}=Wf(t);return{diagramType:(await Jf(e)).type,config:r}}catch(r){if(null==e?void 0:e.suppressErrors)return!1;throw r}}Cr(Wf,"processAndSetConfigs"),Cr(Nf,"parse");var jf=Cr(((t,e,r=[])=>`\n.${t} ${e} { ${r.join(" !important; ")} !important; }`),"cssImportantStyles"),Hf=Cr(((t,e=new Map)=>{var r;let i="";if(void 0!==t.themeCSS&&(i+=`\n${t.themeCSS}`),void 0!==t.fontFamily&&(i+=`\n:root { --mermaid-font-family: ${t.fontFamily}}`),void 0!==t.altFontFamily&&(i+=`\n:root { --mermaid-alt-font-family: ${t.altFontFamily}}`),e instanceof Map){const a=t.htmlLabels??(null==(r=t.flowchart)?void 0:r.htmlLabels)?["> *","span"]:["rect","polygon","ellipse","circle","path"];e.forEach((t=>{jt(t.styles)||a.forEach((e=>{i+=jf(t.id,e,t.styles)})),jt(t.textStyles)||(i+=jf(t.id,"tspan",((null==t?void 0:t.textStyles)||[]).map((t=>t.replace("color","fill")))))}))}return i}),"createCssStyles"),Uf=Cr(((t,e,r,i)=>{const a=Hf(t,r);return _g(wg(`${i}{${ta(e,a,t.themeVariables)}}`),Lg)}),"createUserStyles"),Yf=Cr(((t="",e,r)=>{let i=t;return r||e||(i=i.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),i=Wl(i),i=i.replace(/<br>/g,"<br/>"),i}),"cleanUpSvgCode"),Vf=Cr(((t="",e)=>{var r,i;return`<iframe style="width:100%;height:${(null==(i=null==(r=null==e?void 0:e.viewBox)?void 0:r.baseVal)?void 0:i.height)?e.viewBox.baseVal.height+"px":"100%"};border:0;margin:0;" src="data:text/html;charset=UTF-8;base64,${Rf(`<body style="margin:0">${t}</body>`)}" sandbox="allow-top-navigation-by-user-activation allow-popups">\n The "iframe" tag is not supported by your browser.\n</iframe>`}),"putIntoIFrame"),Gf=Cr(((t,e,r,i,a)=>{const n=t.append("div");n.attr("id",r),i&&n.attr("style",i);const o=n.append("svg").attr("id",e).attr("width","100%").attr("xmlns","http://www.w3.org/2000/svg");return a&&o.attr("xmlns:xlink",a),o.append("g"),t}),"appendDivSvgG");function Zf(t,e){return t.append("iframe").attr("id",e).attr("style","width: 100%; height: 100%;").attr("sandbox","")}Cr(Zf,"sandboxedIframe");var Xf=Cr(((t,e,r,i)=>{var a,n,o;null==(a=t.getElementById(e))||a.remove(),null==(n=t.getElementById(r))||n.remove(),null==(o=t.getElementById(i))||o.remove()}),"removeExistingElements"),Qf=Cr((async function(t,e,r){var i,a,n,o,s,l;vf();const h=Wf(e);e=h.code;const c=pi();Sr.debug(c),e.length>((null==c?void 0:c.maxTextSize)??5e4)&&(e="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa");const d="#"+t,u="i"+t,p="#"+u,g="d"+t,f="#"+g,y=Cr((()=>{const t=Z(x?p:f).node();t&&"remove"in t&&t.remove()}),"removeTempElements");let m=Z("body");const x="sandbox"===c.securityLevel,b="loose"===c.securityLevel,C=c.fontFamily;if(void 0!==r){if(r&&(r.innerHTML=""),x){const t=Zf(Z(r),u);m=Z(t.nodes()[0].contentDocument.body),m.node().style.margin=0}else m=Z(r);Gf(m,t,g,`font-family: ${C}`,"http://www.w3.org/1999/xlink")}else{if(Xf(document,t,g,u),x){const t=Zf(Z("body"),u);m=Z(t.nodes()[0].contentDocument.body),m.node().style.margin=0}else m=Z("body");Gf(m,t,g)}let k,w;try{k=await Mf.fromText(e,{title:h.title})}catch(A){if(c.suppressErrorRendering)throw y(),A;k=await Mf.fromText("error"),w=A}const S=m.select(f).node(),T=k.type,v=S.firstChild,B=v.firstChild,_=null==(a=(i=k.renderer).getClasses)?void 0:a.call(i,e,k),L=Uf(c,T,_,d),M=document.createElement("style");M.innerHTML=L,v.insertBefore(M,B);try{await k.renderer.draw(e,t,Hp,k)}catch($){throw c.suppressErrorRendering?y():lf.draw(e,t,Hp),$}ty(T,m.select(`${f} svg`),null==(o=(n=k.db).getAccTitle)?void 0:o.call(n),null==(l=(s=k.db).getAccDescription)?void 0:l.call(s)),m.select(`[id="${t}"]`).selectAll("foreignobject > *").attr("xmlns","http://www.w3.org/1999/xhtml");let F=m.select(f).node().innerHTML;if(Sr.debug("config.arrowMarkerAbsolute",c.arrowMarkerAbsolute),F=Yf(F,x,Di(c.arrowMarkerAbsolute)),x){const t=m.select(f+" svg").node();F=Vf(F,t)}else b||(F=xr.sanitize(F,{ADD_TAGS:qf,ADD_ATTR:zf}));if(Af(),w)throw w;return y(),{diagramType:T,svg:F,bindFunctions:k.db.bindFunctions}}),"render");function Kf(t={}){var e;const r=Or({},t);(null==r?void 0:r.fontFamily)&&!(null==(e=r.themeVariables)?void 0:e.fontFamily)&&(r.themeVariables||(r.themeVariables={}),r.themeVariables.fontFamily=r.fontFamily),hi(r),(null==r?void 0:r.theme)&&r.theme in Zr?r.themeVariables=Zr[r.theme].getThemeVariables(r.themeVariables):r&&(r.themeVariables=Zr.default.getThemeVariables(r.themeVariables));const i="object"==typeof r?li(r):di();Tr(i.logLevel),vf()}Cr(Kf,"initialize");var Jf=Cr(((t,e={})=>{const{code:r}=Pf(t);return Mf.fromText(r,e)}),"getDiagramFromText");function ty(t,e,r,i){_f(e,t),Lf(e,r,i,e.attr("id"))}Cr(ty,"addA11yInfo");var ey=Object.freeze({render:Qf,parse:Nf,getDiagramFromText:Jf,initialize:Kf,getConfig:pi,setConfig:ui,getSiteConfig:di,updateSiteConfig:ci,reset:Cr((()=>{yi()}),"reset"),globalReset:Cr((()=>{yi(ii)}),"globalReset"),defaultConfig:ii});Tr(pi().logLevel),yi(pi());var ry=Cr(((t,e,r)=>{Sr.warn(t),Il(t)?(r&&r(t.str,t.hash),e.push({...t,message:t.str,error:t})):(r&&r(t),t instanceof Error&&e.push({str:t.message,message:t.message,hash:t.name,error:t}))}),"handleError"),iy=Cr((async function(t={querySelector:".mermaid"}){try{await ay(t)}catch(e){if(Il(e)&&Sr.error(e.str),fy.parseError&&fy.parseError(e),!t.suppressErrors)throw Sr.error("Use the suppressErrors option to suppress these errors"),e}}),"run"),ay=Cr((async function({postRenderCallback:t,querySelector:e,nodes:r}={querySelector:".mermaid"}){const i=ey.getConfig();let a;if(Sr.debug((t?"":"No ")+"Callback function found"),r)a=r;else{if(!e)throw new Error("Nodes and querySelector are both undefined");a=document.querySelectorAll(e)}Sr.debug(`Found ${a.length} diagrams`),void 0!==(null==i?void 0:i.startOnLoad)&&(Sr.debug("Start On Load: "+(null==i?void 0:i.startOnLoad)),ey.updateSiteConfig({startOnLoad:null==i?void 0:i.startOnLoad}));const n=new ql.InitIDGenerator(i.deterministicIds,i.deterministicIDSeed);let o;const s=[];for(const h of Array.from(a)){if(Sr.info("Rendering diagram: "+h.id),h.getAttribute("data-processed"))continue;h.setAttribute("data-processed","true");const e=`mermaid-${n.next()}`;o=h.innerHTML,o=Qh(ql.entityDecode(o)).trim().replace(/<br\s*\/?>/gi,"<br/>");const r=ql.detectInit(o);r&&Sr.debug("Detected early reinit: ",r);try{const{svg:r,bindFunctions:i}=await gy(e,o,h);h.innerHTML=r,t&&await t(e),i&&i(h)}catch(l){ry(l,s,fy.parseError)}}if(s.length>0)throw s[0]}),"runThrowsErrors"),ny=Cr((function(t){ey.initialize(t)}),"initialize"),oy=Cr((async function(t,e,r){Sr.warn("mermaid.init is deprecated. Please use run instead."),t&&ny(t);const i={postRenderCallback:r,querySelector:".mermaid"};"string"==typeof e?i.querySelector=e:e&&(e instanceof HTMLElement?i.nodes=[e]:i.nodes=e),await iy(i)}),"init"),sy=Cr((async(t,{lazyLoad:e=!0}={})=>{vf(),$r(...t),!1===e&&await Bf()}),"registerExternalDiagrams"),ly=Cr((function(){if(fy.startOnLoad){const{startOnLoad:t}=ey.getConfig();t&&fy.run().catch((t=>Sr.error("Mermaid failed to initialize",t)))}}),"contentLoaded");"undefined"!=typeof document&&window.addEventListener("load",ly,!1);var hy=Cr((function(t){fy.parseError=t}),"setParseErrorHandler"),cy=[],dy=!1,uy=Cr((async()=>{if(!dy){for(dy=!0;cy.length>0;){const e=cy.shift();if(e)try{await e()}catch(t){Sr.error("Error executing queue",t)}}dy=!1}}),"executeQueue"),py=Cr((async(t,e)=>new Promise(((r,i)=>{const a=Cr((()=>new Promise(((a,n)=>{ey.parse(t,e).then((t=>{a(t),r(t)}),(t=>{var e;Sr.error("Error parsing",t),null==(e=fy.parseError)||e.call(fy,t),n(t),i(t)}))}))),"performCall");cy.push(a),uy().catch(i)}))),"parse"),gy=Cr(((t,e,r)=>new Promise(((i,a)=>{const n=Cr((()=>new Promise(((n,o)=>{ey.render(t,e,r).then((t=>{n(t),i(t)}),(t=>{var e;Sr.error("Error parsing",t),null==(e=fy.parseError)||e.call(fy,t),o(t),a(t)}))}))),"performCall");cy.push(n),uy().catch(a)}))),"render"),fy={startOnLoad:!0,mermaidAPI:ey,parse:py,render:gy,init:oy,run:iy,registerExternalDiagrams:sy,registerLayoutLoaders:Wp,initialize:ny,parseError:void 0,contentLoaded:ly,setParseErrorHandler:hy,detectType:Ar,registerIconPacks:Hs},yy=fy;
8
+ const Ts=Object.freeze({left:0,top:0,width:16,height:16}),vs=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),Bs=Object.freeze({...Ts,...vs}),_s=Object.freeze({...Bs,body:"",hidden:!1}),Ls=Object.freeze({width:null,height:null}),Ms=Object.freeze({...Ls,...vs}),Fs=/^[a-z0-9]+(-[a-z0-9]+)*$/,As=(t,e)=>!!t&&!(""!==t.provider&&!t.provider.match(Fs)||!(e&&""===t.prefix||t.prefix.match(Fs))||!t.name.match(Fs));function $s(t,e){const r=function(t,e){const r={};!t.hFlip!=!e.hFlip&&(r.hFlip=!0),!t.vFlip!=!e.vFlip&&(r.vFlip=!0);const i=((t.rotate||0)+(e.rotate||0))%4;return i&&(r.rotate=i),r}(t,e);for(const i in _s)i in vs?i in t&&!(i in r)&&(r[i]=vs[i]):i in e?r[i]=e[i]:i in t&&(r[i]=t[i]);return r}function Es(t,e,r){const i=t.icons,a=t.aliases||Object.create(null);let n={};function o(t){n=$s(i[t]||a[t],n)}return o(e),r.forEach(o),$s(t,n)}function Ds(t,e){if(t.icons[e])return Es(t,e,[]);const r=function(t,e){const r=t.icons,i=t.aliases||Object.create(null),a=Object.create(null);return(e||Object.keys(r).concat(Object.keys(i))).forEach((function t(e){if(r[e])return a[e]=[];if(!(e in a)){a[e]=null;const r=i[e]&&i[e].parent,n=r&&t(r);n&&(a[e]=[r].concat(n))}return a[e]})),a}(t,[e])[e];return r?Es(t,e,r):null}const Is=/(-?[0-9.]*[0-9]+[0-9.]*)/g,Os=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function Ps(t,e,r){if(1===e)return t;if(r=r||100,"number"==typeof t)return Math.ceil(t*e*r)/r;if("string"!=typeof t)return t;const i=t.split(Is);if(null===i||!i.length)return t;const a=[];let n=i.shift(),o=Os.test(n);for(;;){if(o){const t=parseFloat(n);isNaN(t)?a.push(n):a.push(Math.ceil(t*e*r)/r)}else a.push(n);if(n=i.shift(),void 0===n)return a.join("");o=!o}}const Rs=/\sid="(\S+)"/g,qs="IconifyId"+Date.now().toString(16)+(16777216*Math.random()|0).toString(16);let zs=0;var Ws={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},Ns=new Map,js=new Map,Hs=Cr((t=>{for(const e of t){if(!e.name)throw new Error('Invalid icon loader. Must have a "name" property with non-empty string value.');if(Sr.debug("Registering icon pack:",e.name),"loader"in e)js.set(e.name,e.loader);else{if(!("icons"in e))throw Sr.error("Invalid icon loader:",e),new Error('Invalid icon loader. Must have either "icons" or "loader" property.');Ns.set(e.name,e.icons)}}}),"registerIconPacks"),Us=Cr((async(t,e)=>{const r=((t,e,r,i="")=>{const a=t.split(":");if("@"===t.slice(0,1)){if(a.length<2||a.length>3)return null;i=a.shift().slice(1)}if(a.length>3||!a.length)return null;if(a.length>1){const t=a.pop(),e=a.pop(),r={provider:a.length>0?a[0]:i,prefix:e,name:t};return As(r)?r:null}const n=a[0],o=n.split("-");if(o.length>1){const t={provider:i,prefix:o.shift(),name:o.join("-")};return As(t)?t:null}if(r&&""===i){const t={provider:i,prefix:"",name:n};return As(t,r)?t:null}return null})(t,0,void 0!==e);if(!r)throw new Error(`Invalid icon name: ${t}`);const i=r.prefix||e;if(!i)throw new Error(`Icon name must contain a prefix: ${t}`);let a=Ns.get(i);if(!a){const t=js.get(i);if(!t)throw new Error(`Icon set not found: ${r.prefix}`);try{a={...await t(),prefix:i},Ns.set(i,a)}catch(o){throw Sr.error(o),new Error(`Failed to load icon set: ${r.prefix}`)}}const n=Ds(a,r.name);if(!n)throw new Error(`Icon not found: ${t}`);return n}),"getRegisteredIconData"),Ys=Cr((async(t,e)=>{let r;try{r=await Us(t,null==e?void 0:e.fallbackPrefix)}catch(a){Sr.error(a),r=Ws}const i=function(t,e){const r={...Bs,...t},i={...Ms,...e},a={left:r.left,top:r.top,width:r.width,height:r.height};let n=r.body;[r,i].forEach((t=>{const e=[],r=t.hFlip,i=t.vFlip;let o,s=t.rotate;switch(r?i?s+=2:(e.push("translate("+(a.width+a.left).toString()+" "+(0-a.top).toString()+")"),e.push("scale(-1 1)"),a.top=a.left=0):i&&(e.push("translate("+(0-a.left).toString()+" "+(a.height+a.top).toString()+")"),e.push("scale(1 -1)"),a.top=a.left=0),s<0&&(s-=4*Math.floor(s/4)),s%=4,s){case 1:o=a.height/2+a.top,e.unshift("rotate(90 "+o.toString()+" "+o.toString()+")");break;case 2:e.unshift("rotate(180 "+(a.width/2+a.left).toString()+" "+(a.height/2+a.top).toString()+")");break;case 3:o=a.width/2+a.left,e.unshift("rotate(-90 "+o.toString()+" "+o.toString()+")")}s%2==1&&(a.left!==a.top&&(o=a.left,a.left=a.top,a.top=o),a.width!==a.height&&(o=a.width,a.width=a.height,a.height=o)),e.length&&(n=function(t,e,r){const i=function(t,e="defs"){let r="";const i=t.indexOf("<"+e);for(;i>=0;){const a=t.indexOf(">",i),n=t.indexOf("</"+e);if(-1===a||-1===n)break;const o=t.indexOf(">",n);if(-1===o)break;r+=t.slice(a+1,n).trim(),t=t.slice(0,i).trim()+t.slice(o+1)}return{defs:r,content:t}}(t);return a=i.defs,n=e+i.content+r,a?"<defs>"+a+"</defs>"+n:n;var a,n}(n,'<g transform="'+e.join(" ")+'">',"</g>"))}));const o=i.width,s=i.height,l=a.width,h=a.height;let c,d;null===o?(d=null===s?"1em":"auto"===s?h:s,c=Ps(d,l/h)):(c="auto"===o?l:o,d=null===s?Ps(c,h/l):"auto"===s?h:s);const u={},p=(t,e)=>{(t=>"unset"===t||"undefined"===t||"none"===t)(e)||(u[t]=e.toString())};p("width",c),p("height",d);const g=[a.left,a.top,l,h];return u.viewBox=g.join(" "),{attributes:u,viewBox:g,body:n}}(r,e);return function(t,e){let r=-1===t.indexOf("xlink:")?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const i in e)r+=" "+i+'="'+e[i]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+r+">"+t+"</svg>"}(function(t,e=qs){const r=[];let i;for(;i=Rs.exec(t);)r.push(i[1]);if(!r.length)return t;const a="suffix"+(16777216*Math.random()|Date.now()).toString(16);return r.forEach((r=>{const i="function"==typeof e?e(r):e+(zs++).toString(),n=r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");t=t.replace(new RegExp('([#;"])('+n+')([")]|\\.[a-z])',"g"),"$1"+i+a+"$3")})),t=t.replace(new RegExp(a,"g"),"")}(i.body),i.attributes)}),"getIconSVG"),Vs=Cr((({flowchart:t})=>{var e,r;const i=(null==(e=null==t?void 0:t.subGraphTitleMargin)?void 0:e.top)??0,a=(null==(r=null==t?void 0:t.subGraphTitleMargin)?void 0:r.bottom)??0;return{subGraphTitleTopMargin:i,subGraphTitleBottomMargin:a,subGraphTitleTotalMargin:i+a}}),"getSubGraphTitleMargins"),Gs={aggregation:18,extension:18,composition:18,dependency:6,lollipop:13.5,arrow_point:4};function Zs(t,e){if(void 0===t||void 0===e)return{angle:0,deltaX:0,deltaY:0};t=Xs(t),e=Xs(e);const[r,i]=[t.x,t.y],[a,n]=[e.x,e.y],o=a-r,s=n-i;return{angle:Math.atan(s/o),deltaX:o,deltaY:s}}Cr(Zs,"calculateDeltaAndAngle");var Xs=Cr((t=>Array.isArray(t)?{x:t[0],y:t[1]}:t),"pointTransformer"),Qs=Cr((t=>({x:Cr((function(e,r,i){let a=0;if(0===r&&Object.hasOwn(Gs,t.arrowTypeStart)){const{angle:e,deltaX:r}=Zs(i[0],i[1]);a=Gs[t.arrowTypeStart]*Math.cos(e)*(r>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(Gs,t.arrowTypeEnd)){const{angle:e,deltaX:r}=Zs(i[i.length-1],i[i.length-2]);a=Gs[t.arrowTypeEnd]*Math.cos(e)*(r>=0?1:-1)}return Xs(e).x+a}),"x"),y:Cr((function(e,r,i){let a=0;if(0===r&&Object.hasOwn(Gs,t.arrowTypeStart)){const{angle:e,deltaY:r}=Zs(i[0],i[1]);a=Gs[t.arrowTypeStart]*Math.abs(Math.sin(e))*(r>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(Gs,t.arrowTypeEnd)){const{angle:e,deltaY:r}=Zs(i[i.length-1],i[i.length-2]);a=Gs[t.arrowTypeEnd]*Math.abs(Math.sin(e))*(r>=0?1:-1)}return Xs(e).y+a}),"y")})),"getLineFunctionsWithOffset"),Ks={},Js={};Object.defineProperty(Js,"__esModule",{value:!0}),Js.BLANK_URL=Js.relativeFirstCharacters=Js.whitespaceEscapeCharsRegex=Js.urlSchemeRegex=Js.ctrlCharactersRegex=Js.htmlCtrlEntityRegex=Js.htmlEntitiesRegex=Js.invalidProtocolRegex=void 0,Js.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,Js.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,Js.htmlCtrlEntityRegex=/&(newline|tab);/gi,Js.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,Js.urlSchemeRegex=/^.+(:|&colon;)/gim,Js.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,Js.relativeFirstCharacters=[".","/"],Js.BLANK_URL="about:blank",Object.defineProperty(Ks,"__esModule",{value:!0});var tl=Ks.sanitizeUrl=void 0,el=Js;function rl(t){try{return decodeURIComponent(t)}catch(e){return t}}tl=Ks.sanitizeUrl=function(t){if(!t)return el.BLANK_URL;var e,r,i=rl(t.trim());do{e=(i=rl(i=(r=i,r.replace(el.ctrlCharactersRegex,"").replace(el.htmlEntitiesRegex,(function(t,e){return String.fromCharCode(e)}))).replace(el.htmlCtrlEntityRegex,"").replace(el.ctrlCharactersRegex,"").replace(el.whitespaceEscapeCharsRegex,"").trim())).match(el.ctrlCharactersRegex)||i.match(el.htmlEntitiesRegex)||i.match(el.htmlCtrlEntityRegex)||i.match(el.whitespaceEscapeCharsRegex)}while(e&&e.length>0);var a=i;if(!a)return el.BLANK_URL;if(function(t){return el.relativeFirstCharacters.indexOf(t[0])>-1}(a))return a;var n=a.trimStart(),o=n.match(el.urlSchemeRegex);if(!o)return a;var s=o[0].toLowerCase().trim();if(el.invalidProtocolRegex.test(s))return el.BLANK_URL;var l=n.replace(/\\/g,"/");if("mailto:"===s||s.includes("://"))return l;if("http:"===s||"https:"===s){if(!function(t){return URL.canParse(t)}(l))return el.BLANK_URL;var h=new URL(l);return h.protocol=h.protocol.toLowerCase(),h.hostname=h.hostname.toLowerCase(),h.toString()}return l};var il="​",al={curveBasis:X,curveBasisClosed:Q,curveBasisOpen:K,curveBumpX:function(t){return new Ut(t,!0)},curveBumpY:function(t){return new Ut(t,!1)},curveBundle:J,curveCardinalClosed:tt,curveCardinalOpen:et,curveCardinal:rt,curveCatmullRomClosed:it,curveCatmullRomOpen:at,curveCatmullRom:nt,curveLinear:ot,curveLinearClosed:st,curveMonotoneX:lt,curveMonotoneY:ht,curveNatural:ct,curveStep:dt,curveStepAfter:ut,curveStepBefore:pt},nl=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,ol=Cr((function(t,e){const r=sl(t,/(?:init\b)|(?:initialize\b)/);let i={};if(Array.isArray(r)){const t=r.map((t=>t.args));ei(t),i=Or(i,[...t])}else i=r.args;if(!i)return;let a=Ar(t,e);const n="config";return void 0!==i[n]&&("flowchart-v2"===a&&(a="flowchart"),i[a]=i[n],delete i[n]),i}),"detectInit"),sl=Cr((function(t,e=null){var r,i;try{const a=new RegExp(`[%]{2}(?![{]${nl.source})(?=[}][%]{2}).*\n`,"ig");let n;t=t.trim().replace(a,"").replace(/'/gm,'"'),Sr.debug(`Detecting diagram directive${null!==e?" type:"+e:""} based on the text:${t}`);const o=[];for(;null!==(n=_r.exec(t));)if(n.index===_r.lastIndex&&_r.lastIndex++,n&&!e||e&&(null==(r=n[1])?void 0:r.match(e))||e&&(null==(i=n[2])?void 0:i.match(e))){const t=n[1]?n[1]:n[2],e=n[3]?n[3].trim():n[4]?JSON.parse(n[4].trim()):null;o.push({type:t,args:e})}return 0===o.length?{type:t,args:null}:1===o.length?o[0]:o}catch(a){return Sr.error(`ERROR: ${a.message} - Unable to parse directive type: '${e}' based on the text: '${t}'`),{type:void 0,args:null}}}),"detectDirective"),ll=Cr((function(t){return t.replace(_r,"")}),"removeDirectives"),hl=Cr((function(t,e){for(const[r,i]of e.entries())if(i.match(t))return r;return-1}),"isSubstringInArray");function cl(t,e){if(!t)return e;const r=`curve${t.charAt(0).toUpperCase()+t.slice(1)}`;return al[r]??e}function dl(t,e){const r=t.trim();if(r)return"loose"!==e.securityLevel?tl(r):r}Cr(cl,"interpolateToCurve"),Cr(dl,"formatUrl");var ul=Cr(((t,...e)=>{const r=t.split("."),i=r.length-1,a=r[i];let n=window;for(let o=0;o<i;o++)if(n=n[r[o]],!n)return void Sr.error(`Function name: ${t} not found in window`);n[a](...e)}),"runFunc");function pl(t,e){return t&&e?Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2)):0}function gl(t){let e,r=0;t.forEach((t=>{r+=pl(t,e),e=t}));return ml(t,r/2)}function fl(t){return 1===t.length?t[0]:gl(t)}Cr(pl,"distance"),Cr(gl,"traverseEdge"),Cr(fl,"calcLabelPosition");var yl=Cr(((t,e=2)=>{const r=Math.pow(10,e);return Math.round(t*r)/r}),"roundNumber"),ml=Cr(((t,e)=>{let r,i=e;for(const a of t){if(r){const t=pl(a,r);if(t<i)i-=t;else{const e=i/t;if(e<=0)return r;if(e>=1)return{x:a.x,y:a.y};if(e>0&&e<1)return{x:yl((1-e)*r.x+e*a.x,5),y:yl((1-e)*r.y+e*a.y,5)}}}r=a}throw new Error("Could not find a suitable point for the given distance")}),"calculatePoint"),xl=Cr(((t,e,r)=>{Sr.info(`our points ${JSON.stringify(e)}`),e[0]!==r&&(e=e.reverse());const i=ml(e,25),a=t?10:5,n=Math.atan2(e[0].y-i.y,e[0].x-i.x),o={x:0,y:0};return o.x=Math.sin(n)*a+(e[0].x+i.x)/2,o.y=-Math.cos(n)*a+(e[0].y+i.y)/2,o}),"calcCardinalityPosition");function bl(t,e,r){const i=structuredClone(r);Sr.info("our points",i),"start_left"!==e&&"start_right"!==e&&i.reverse();const a=ml(i,25+t),n=10+.5*t,o=Math.atan2(i[0].y-a.y,i[0].x-a.x),s={x:0,y:0};return"start_left"===e?(s.x=Math.sin(o+Math.PI)*n+(i[0].x+a.x)/2,s.y=-Math.cos(o+Math.PI)*n+(i[0].y+a.y)/2):"end_right"===e?(s.x=Math.sin(o-Math.PI)*n+(i[0].x+a.x)/2-5,s.y=-Math.cos(o-Math.PI)*n+(i[0].y+a.y)/2-5):"end_left"===e?(s.x=Math.sin(o)*n+(i[0].x+a.x)/2-5,s.y=-Math.cos(o)*n+(i[0].y+a.y)/2-5):(s.x=Math.sin(o)*n+(i[0].x+a.x)/2,s.y=-Math.cos(o)*n+(i[0].y+a.y)/2),s}function Cl(t){let e="",r="";for(const i of t)void 0!==i&&(i.startsWith("color:")||i.startsWith("text-align:")?r=r+i+";":e=e+i+";");return{style:e,labelStyle:r}}Cr(bl,"calcTerminalLabelPosition"),Cr(Cl,"getStylesFromArray");var kl=0,wl=Cr((()=>(kl++,"id-"+Math.random().toString(36).substr(2,12)+"-"+kl)),"generateId");function Sl(t){let e="";const r="0123456789abcdef";for(let i=0;i<t;i++)e+=r.charAt(Math.floor(16*Math.random()));return e}Cr(Sl,"makeRandomHex");var Tl=Cr((t=>Sl(t.length)),"random"),vl=Cr((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"),Bl=Cr((function(t,e){const r=e.text.replace(Yi.lineBreakRegex," "),[,i]=Pl(e.fontSize),a=t.append("text");a.attr("x",e.x),a.attr("y",e.y),a.style("text-anchor",e.anchor),a.style("font-family",e.fontFamily),a.style("font-size",i),a.style("font-weight",e.fontWeight),a.attr("fill",e.fill),void 0!==e.class&&a.attr("class",e.class);const n=a.append("tspan");return n.attr("x",e.x+2*e.textMargin),n.attr("fill",e.fill),n.text(r),a}),"drawSimpleText"),_l=W(((t,e,r)=>{if(!t)return t;if(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},r),Yi.lineBreakRegex.test(t))return t;const i=t.split(" ").filter(Boolean),a=[];let n="";return i.forEach(((t,o)=>{const s=Fl(`${t} `,r),l=Fl(n,r);if(s>e){const{hyphenatedStrings:i,remainingWord:o}=Ll(t,e,"-",r);a.push(n,...i),n=o}else l+s>=e?(a.push(n),n=t):n=[n,t].filter(Boolean).join(" ");o+1===i.length&&a.push(n)})),a.filter((t=>""!==t)).join(r.joinWith)}),((t,e,r)=>`${t}${e}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`)),Ll=W(((t,e,r="-",i)=>{i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},i);const a=[...t],n=[];let o="";return a.forEach(((t,s)=>{const l=`${o}${t}`;if(Fl(l,i)>=e){const t=s+1,e=a.length===t,i=`${l}${r}`;n.push(e?l:i),o=""}else o=l})),{hyphenatedStrings:n,remainingWord:o}}),((t,e,r="-",i)=>`${t}${e}${r}${i.fontSize}${i.fontWeight}${i.fontFamily}`));function Ml(t,e){return $l(t,e).height}function Fl(t,e){return $l(t,e).width}Cr(Ml,"calculateTextHeight"),Cr(Fl,"calculateTextWidth");var Al,$l=W(((t,e)=>{const{fontSize:r=12,fontFamily:i="Arial",fontWeight:a=400}=e;if(!t)return{width:0,height:0};const[,n]=Pl(r),o=["sans-serif",i],s=t.split(Yi.lineBreakRegex),l=[],h=Z("body");if(!h.remove)return{width:0,height:0,lineHeight:0};const c=h.append("svg");for(const d of o){let t=0;const e={width:0,height:0,lineHeight:0};for(const r of s){const i=vl();i.text=r||"​";const o=Bl(c,i).style("font-size",n).style("font-weight",a).style("font-family",d),s=(o._groups||o)[0][0].getBBox();if(0===s.width&&0===s.height)throw new Error("svg element not in render tree");e.width=Math.round(Math.max(e.width,s.width)),t=Math.round(s.height),e.height+=t,e.lineHeight=Math.round(Math.max(e.lineHeight,t))}l.push(e)}c.remove();return l[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]}),((t,e)=>`${t}${e.fontSize}${e.fontWeight}${e.fontFamily}`)),El=(Cr(s=class{constructor(t=!1,e){this.count=0,this.count=e?e.length:0,this.next=t?()=>this.count++:()=>Date.now()}},"InitIDGenerator"),s),Dl=Cr((function(t){return Al=Al||document.createElement("div"),t=escape(t).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),Al.innerHTML=t,unescape(Al.textContent)}),"entityDecode");function Il(t){return"str"in t}Cr(Il,"isDetailedError");var Ol=Cr(((t,e,r,i)=>{var a;if(!i)return;const n=null==(a=t.node())?void 0:a.getBBox();n&&t.append("text").text(i).attr("x",n.x+n.width/2).attr("y",-r).attr("class",e)}),"insertTitle"),Pl=Cr((t=>{if("number"==typeof t)return[t,t+"px"];const e=parseInt(t??"",10);return Number.isNaN(e)?[void 0,void 0]:t===String(e)?[e,t+"px"]:[e,t]}),"parseFontSize");function Rl(t,e){return Ht({},t,e)}Cr(Rl,"cleanAndMerge");var ql={assignWithDepth:Or,wrapLabel:_l,calculateTextHeight:Ml,calculateTextWidth:Fl,calculateTextDimensions:$l,cleanAndMerge:Rl,detectInit:ol,detectDirective:sl,isSubstringInArray:hl,interpolateToCurve:cl,calcLabelPosition:fl,calcCardinalityPosition:xl,calcTerminalLabelPosition:bl,formatUrl:dl,getStylesFromArray:Cl,generateId:wl,random:Tl,runFunc:ul,entityDecode:Dl,insertTitle:Ol,parseFontSize:Pl,InitIDGenerator:El},zl=Cr((function(t){let e=t;return e=e.replace(/style.*:\S*#.*;/g,(function(t){return t.substring(0,t.length-1)})),e=e.replace(/classDef.*:\S*#.*;/g,(function(t){return t.substring(0,t.length-1)})),e=e.replace(/#\w+;/g,(function(t){const e=t.substring(1,t.length-1);return/^\+?\d+$/.test(e)?"fl°°"+e+"¶ß":"fl°"+e+"¶ß"})),e}),"encodeEntities"),Wl=Cr((function(t){return t.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")}),"decodeEntities"),Nl=Cr(((t,e,{counter:r=0,prefix:i,suffix:a})=>`${i?`${i}_`:""}${t}_${e}_${r}${a?`_${a}`:""}`),"getEdgeId");function jl(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}let Hl={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};function Ul(t){Hl=t}const Yl=/[&<>"']/,Vl=new RegExp(Yl.source,"g"),Gl=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,Zl=new RegExp(Gl.source,"g"),Xl={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Ql=t=>Xl[t];function Kl(t,e){if(e){if(Yl.test(t))return t.replace(Vl,Ql)}else if(Gl.test(t))return t.replace(Zl,Ql);return t}const Jl=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;const th=/(^|[^\[])\^/g;function eh(t,e){let r="string"==typeof t?t:t.source;e=e||"";const i={replace:(t,e)=>{let a="string"==typeof e?e:e.source;return a=a.replace(th,"$1"),r=r.replace(t,a),i},getRegex:()=>new RegExp(r,e)};return i}function rh(t){try{t=encodeURI(t).replace(/%25/g,"%")}catch{return null}return t}const ih={exec:()=>null};function ah(t,e){const r=t.replace(/\|/g,((t,e,r)=>{let i=!1,a=e;for(;--a>=0&&"\\"===r[a];)i=!i;return i?"|":" |"})).split(/ \|/);let i=0;if(r[0].trim()||r.shift(),r.length>0&&!r[r.length-1].trim()&&r.pop(),e)if(r.length>e)r.splice(e);else for(;r.length<e;)r.push("");for(;i<r.length;i++)r[i]=r[i].trim().replace(/\\\|/g,"|");return r}function nh(t,e,r){const i=t.length;if(0===i)return"";let a=0;for(;a<i;){const n=t.charAt(i-a-1);if(n!==e||r){if(n===e||!r)break;a++}else a++}return t.slice(0,i-a)}function oh(t,e,r,i){const a=e.href,n=e.title?Kl(e.title):null,o=t[1].replace(/\\([\[\]])/g,"$1");if("!"!==t[0].charAt(0)){i.state.inLink=!0;const t={type:"link",raw:r,href:a,title:n,text:o,tokens:i.inlineTokens(o)};return i.state.inLink=!1,t}return{type:"image",raw:r,href:a,title:n,text:Kl(o)}}class sh{constructor(t){f(this,"options"),f(this,"rules"),f(this,"lexer"),this.options=t||Hl}space(t){const e=this.rules.block.newline.exec(t);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(t){const e=this.rules.block.code.exec(t);if(e){const t=e[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?t:nh(t,"\n")}}}fences(t){const e=this.rules.block.fences.exec(t);if(e){const t=e[0],r=function(t,e){const r=t.match(/^(\s+)(?:```)/);if(null===r)return e;const i=r[1];return e.split("\n").map((t=>{const e=t.match(/^\s+/);if(null===e)return t;const[r]=e;return r.length>=i.length?t.slice(i.length):t})).join("\n")}(t,e[3]||"");return{type:"code",raw:t,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:r}}}heading(t){const e=this.rules.block.heading.exec(t);if(e){let t=e[2].trim();if(/#$/.test(t)){const e=nh(t,"#");this.options.pedantic?t=e.trim():e&&!/ $/.test(e)||(t=e.trim())}return{type:"heading",raw:e[0],depth:e[1].length,text:t,tokens:this.lexer.inline(t)}}}hr(t){const e=this.rules.block.hr.exec(t);if(e)return{type:"hr",raw:nh(e[0],"\n")}}blockquote(t){const e=this.rules.block.blockquote.exec(t);if(e){let t=nh(e[0],"\n").split("\n"),r="",i="";const a=[];for(;t.length>0;){let e=!1;const n=[];let o;for(o=0;o<t.length;o++)if(/^ {0,3}>/.test(t[o]))n.push(t[o]),e=!0;else{if(e)break;n.push(t[o])}t=t.slice(o);const s=n.join("\n"),l=s.replace(/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,"\n $1").replace(/^ {0,3}>[ \t]?/gm,"");r=r?`${r}\n${s}`:s,i=i?`${i}\n${l}`:l;const h=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(l,a,!0),this.lexer.state.top=h,0===t.length)break;const c=a[a.length-1];if("code"===(null==c?void 0:c.type))break;if("blockquote"===(null==c?void 0:c.type)){const e=c,n=e.raw+"\n"+t.join("\n"),o=this.blockquote(n);a[a.length-1]=o,r=r.substring(0,r.length-e.raw.length)+o.raw,i=i.substring(0,i.length-e.text.length)+o.text;break}if("list"!==(null==c?void 0:c.type));else{const e=c,n=e.raw+"\n"+t.join("\n"),o=this.list(n);a[a.length-1]=o,r=r.substring(0,r.length-c.raw.length)+o.raw,i=i.substring(0,i.length-e.raw.length)+o.raw,t=n.substring(a[a.length-1].raw.length).split("\n")}}return{type:"blockquote",raw:r,tokens:a,text:i}}}list(t){let e=this.rules.block.list.exec(t);if(e){let r=e[1].trim();const i=r.length>1,a={type:"list",raw:"",ordered:i,start:i?+r.slice(0,-1):"",loose:!1,items:[]};r=i?`\\d{1,9}\\${r.slice(-1)}`:`\\${r}`,this.options.pedantic&&(r=i?r:"[*+-]");const n=new RegExp(`^( {0,3}${r})((?:[\t ][^\\n]*)?(?:\\n|$))`);let o=!1;for(;t;){let r=!1,i="",s="";if(!(e=n.exec(t)))break;if(this.rules.block.hr.test(t))break;i=e[0],t=t.substring(i.length);let l=e[2].split("\n",1)[0].replace(/^\t+/,(t=>" ".repeat(3*t.length))),h=t.split("\n",1)[0],c=!l.trim(),d=0;if(this.options.pedantic?(d=2,s=l.trimStart()):c?d=e[1].length+1:(d=e[2].search(/[^ ]/),d=d>4?1:d,s=l.slice(d),d+=e[1].length),c&&/^ *$/.test(h)&&(i+=h+"\n",t=t.substring(h.length+1),r=!0),!r){const e=new RegExp(`^ {0,${Math.min(3,d-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ \t][^\\n]*)?(?:\\n|$))`),r=new RegExp(`^ {0,${Math.min(3,d-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),a=new RegExp(`^ {0,${Math.min(3,d-1)}}(?:\`\`\`|~~~)`),n=new RegExp(`^ {0,${Math.min(3,d-1)}}#`);for(;t;){const o=t.split("\n",1)[0];if(h=o,this.options.pedantic&&(h=h.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),a.test(h))break;if(n.test(h))break;if(e.test(h))break;if(r.test(t))break;if(h.search(/[^ ]/)>=d||!h.trim())s+="\n"+h.slice(d);else{if(c)break;if(l.search(/[^ ]/)>=4)break;if(a.test(l))break;if(n.test(l))break;if(r.test(l))break;s+="\n"+h}c||h.trim()||(c=!0),i+=o+"\n",t=t.substring(o.length+1),l=h.slice(d)}}a.loose||(o?a.loose=!0:/\n *\n *$/.test(i)&&(o=!0));let u,p=null;this.options.gfm&&(p=/^\[[ xX]\] /.exec(s),p&&(u="[ ] "!==p[0],s=s.replace(/^\[[ xX]\] +/,""))),a.items.push({type:"list_item",raw:i,task:!!p,checked:u,loose:!1,text:s,tokens:[]}),a.raw+=i}a.items[a.items.length-1].raw=a.items[a.items.length-1].raw.trimEnd(),a.items[a.items.length-1].text=a.items[a.items.length-1].text.trimEnd(),a.raw=a.raw.trimEnd();for(let t=0;t<a.items.length;t++)if(this.lexer.state.top=!1,a.items[t].tokens=this.lexer.blockTokens(a.items[t].text,[]),!a.loose){const e=a.items[t].tokens.filter((t=>"space"===t.type)),r=e.length>0&&e.some((t=>/\n.*\n/.test(t.raw)));a.loose=r}if(a.loose)for(let t=0;t<a.items.length;t++)a.items[t].loose=!0;return a}}html(t){const e=this.rules.block.html.exec(t);if(e){return{type:"html",block:!0,raw:e[0],pre:"pre"===e[1]||"script"===e[1]||"style"===e[1],text:e[0]}}}def(t){const e=this.rules.block.def.exec(t);if(e){const t=e[1].toLowerCase().replace(/\s+/g," "),r=e[2]?e[2].replace(/^<(.*)>$/,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",i=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:t,raw:e[0],href:r,title:i}}}table(t){const e=this.rules.block.table.exec(t);if(!e)return;if(!/[:|]/.test(e[2]))return;const r=ah(e[1]),i=e[2].replace(/^\||\| *$/g,"").split("|"),a=e[3]&&e[3].trim()?e[3].replace(/\n[ \t]*$/,"").split("\n"):[],n={type:"table",raw:e[0],header:[],align:[],rows:[]};if(r.length===i.length){for(const t of i)/^ *-+: *$/.test(t)?n.align.push("right"):/^ *:-+: *$/.test(t)?n.align.push("center"):/^ *:-+ *$/.test(t)?n.align.push("left"):n.align.push(null);for(let t=0;t<r.length;t++)n.header.push({text:r[t],tokens:this.lexer.inline(r[t]),header:!0,align:n.align[t]});for(const t of a)n.rows.push(ah(t,n.header.length).map(((t,e)=>({text:t,tokens:this.lexer.inline(t),header:!1,align:n.align[e]}))));return n}}lheading(t){const e=this.rules.block.lheading.exec(t);if(e)return{type:"heading",raw:e[0],depth:"="===e[2].charAt(0)?1:2,text:e[1],tokens:this.lexer.inline(e[1])}}paragraph(t){const e=this.rules.block.paragraph.exec(t);if(e){const t="\n"===e[1].charAt(e[1].length-1)?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:t,tokens:this.lexer.inline(t)}}}text(t){const e=this.rules.block.text.exec(t);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(t){const e=this.rules.inline.escape.exec(t);if(e)return{type:"escape",raw:e[0],text:Kl(e[1])}}tag(t){const e=this.rules.inline.tag.exec(t);if(e)return!this.lexer.state.inLink&&/^<a /i.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&/^<\/a>/i.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(t){const e=this.rules.inline.link.exec(t);if(e){const t=e[2].trim();if(!this.options.pedantic&&/^</.test(t)){if(!/>$/.test(t))return;const e=nh(t.slice(0,-1),"\\");if((t.length-e.length)%2==0)return}else{const t=function(t,e){if(-1===t.indexOf(e[1]))return-1;let r=0;for(let i=0;i<t.length;i++)if("\\"===t[i])i++;else if(t[i]===e[0])r++;else if(t[i]===e[1]&&(r--,r<0))return i;return-1}(e[2],"()");if(t>-1){const r=(0===e[0].indexOf("!")?5:4)+e[1].length+t;e[2]=e[2].substring(0,t),e[0]=e[0].substring(0,r).trim(),e[3]=""}}let r=e[2],i="";if(this.options.pedantic){const t=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(r);t&&(r=t[1],i=t[3])}else i=e[3]?e[3].slice(1,-1):"";return r=r.trim(),/^</.test(r)&&(r=this.options.pedantic&&!/>$/.test(t)?r.slice(1):r.slice(1,-1)),oh(e,{href:r?r.replace(this.rules.inline.anyPunctuation,"$1"):r,title:i?i.replace(this.rules.inline.anyPunctuation,"$1"):i},e[0],this.lexer)}}reflink(t,e){let r;if((r=this.rules.inline.reflink.exec(t))||(r=this.rules.inline.nolink.exec(t))){const t=e[(r[2]||r[1]).replace(/\s+/g," ").toLowerCase()];if(!t){const t=r[0].charAt(0);return{type:"text",raw:t,text:t}}return oh(r,t,r[0],this.lexer)}}emStrong(t,e,r=""){let i=this.rules.inline.emStrongLDelim.exec(t);if(!i)return;if(i[3]&&r.match(/[\p{L}\p{N}]/u))return;if(!(i[1]||i[2]||"")||!r||this.rules.inline.punctuation.exec(r)){const r=[...i[0]].length-1;let a,n,o=r,s=0;const l="*"===i[0][0]?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(l.lastIndex=0,e=e.slice(-1*t.length+r);null!=(i=l.exec(e));){if(a=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!a)continue;if(n=[...a].length,i[3]||i[4]){o+=n;continue}if((i[5]||i[6])&&r%3&&!((r+n)%3)){s+=n;continue}if(o-=n,o>0)continue;n=Math.min(n,n+o+s);const e=[...i[0]][0].length,l=t.slice(0,r+i.index+e+n);if(Math.min(r,n)%2){const t=l.slice(1,-1);return{type:"em",raw:l,text:t,tokens:this.lexer.inlineTokens(t)}}const h=l.slice(2,-2);return{type:"strong",raw:l,text:h,tokens:this.lexer.inlineTokens(h)}}}}codespan(t){const e=this.rules.inline.code.exec(t);if(e){let t=e[2].replace(/\n/g," ");const r=/[^ ]/.test(t),i=/^ /.test(t)&&/ $/.test(t);return r&&i&&(t=t.substring(1,t.length-1)),t=Kl(t,!0),{type:"codespan",raw:e[0],text:t}}}br(t){const e=this.rules.inline.br.exec(t);if(e)return{type:"br",raw:e[0]}}del(t){const e=this.rules.inline.del.exec(t);if(e)return{type:"del",raw:e[0],text:e[2],tokens:this.lexer.inlineTokens(e[2])}}autolink(t){const e=this.rules.inline.autolink.exec(t);if(e){let t,r;return"@"===e[2]?(t=Kl(e[1]),r="mailto:"+t):(t=Kl(e[1]),r=t),{type:"link",raw:e[0],text:t,href:r,tokens:[{type:"text",raw:t,text:t}]}}}url(t){var e;let r;if(r=this.rules.inline.url.exec(t)){let t,i;if("@"===r[2])t=Kl(r[0]),i="mailto:"+t;else{let a;do{a=r[0],r[0]=(null==(e=this.rules.inline._backpedal.exec(r[0]))?void 0:e[0])??""}while(a!==r[0]);t=Kl(r[0]),i="www."===r[1]?"http://"+r[0]:r[0]}return{type:"link",raw:r[0],text:t,href:i,tokens:[{type:"text",raw:t,text:t}]}}}inlineText(t){const e=this.rules.inline.text.exec(t);if(e){let t;return t=this.lexer.state.inRawBlock?e[0]:Kl(e[0]),{type:"text",raw:e[0],text:t}}}}const lh=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,hh=/(?:[*+-]|\d{1,9}[.)])/,ch=eh(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,hh).replace(/blockCode/g,/ {4}/).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/).getRegex(),dh=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,uh=/(?!\s*\])(?:\\.|[^\[\]\\])+/,ph=eh(/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/).replace("label",uh).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),gh=eh(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,hh).getRegex(),fh="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",yh=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,mh=eh("^ {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",yh).replace("tag",fh).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),xh=eh(dh).replace("hr",lh).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",fh).getRegex(),bh={blockquote:eh(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",xh).getRegex(),code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,def:ph,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hr:lh,html:mh,lheading:ch,list:gh,newline:/^(?: *(?:\n|$))+/,paragraph:xh,table:ih,text:/^[^\n]+/},Ch=eh("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",lh).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\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",fh).getRegex(),kh={...bh,table:Ch,paragraph:eh(dh).replace("hr",lh).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Ch).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",fh).getRegex()},wh={...bh,html:eh("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",yh).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:ih,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:eh(dh).replace("hr",lh).replace("heading"," *#{1,6} *[^\n]").replace("lheading",ch).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Sh=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Th=/^( {2,}|\\)\n(?!\s*$)/,vh="\\p{P}\\p{S}",Bh=eh(/^((?![*_])[\spunctuation])/,"u").replace(/punctuation/g,vh).getRegex(),_h=eh(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,"u").replace(/punct/g,vh).getRegex(),Lh=eh("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])","gu").replace(/punct/g,vh).getRegex(),Mh=eh("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])","gu").replace(/punct/g,vh).getRegex(),Fh=eh(/\\([punct])/,"gu").replace(/punct/g,vh).getRegex(),Ah=eh(/^<(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(),$h=eh(yh).replace("(?:--\x3e|$)","--\x3e").getRegex(),Eh=eh("^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",$h).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Dh=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,Ih=eh(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",Dh).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Oh=eh(/^!?\[(label)\]\[(ref)\]/).replace("label",Dh).replace("ref",uh).getRegex(),Ph=eh(/^!?\[(ref)\](?:\[\])?/).replace("ref",uh).getRegex(),Rh={_backpedal:ih,anyPunctuation:Fh,autolink:Ah,blockSkip:/\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g,br:Th,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,del:ih,emStrongLDelim:_h,emStrongRDelimAst:Lh,emStrongRDelimUnd:Mh,escape:Sh,link:Ih,nolink:Ph,punctuation:Bh,reflink:Oh,reflinkSearch:eh("reflink|nolink(?!\\()","g").replace("reflink",Oh).replace("nolink",Ph).getRegex(),tag:Eh,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,url:ih},qh={...Rh,link:eh(/^!?\[(label)\]\((.*?)\)/).replace("label",Dh).getRegex(),reflink:eh(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Dh).getRegex()},zh={...Rh,escape:eh(Sh).replace("])","~|])").getRegex(),url:eh(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").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~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},Wh={...zh,br:eh(Th).replace("{2,}","*").getRegex(),text:eh(zh.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Nh={normal:bh,gfm:kh,pedantic:wh},jh={normal:Rh,gfm:zh,breaks:Wh,pedantic:qh};class Hh{constructor(t){f(this,"tokens"),f(this,"options"),f(this,"state"),f(this,"tokenizer"),f(this,"inlineQueue"),this.tokens=[],this.tokens.links=Object.create(null),this.options=t||Hl,this.options.tokenizer=this.options.tokenizer||new sh,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const e={block:Nh.normal,inline:jh.normal};this.options.pedantic?(e.block=Nh.pedantic,e.inline=jh.pedantic):this.options.gfm&&(e.block=Nh.gfm,this.options.breaks?e.inline=jh.breaks:e.inline=jh.gfm),this.tokenizer.rules=e}static get rules(){return{block:Nh,inline:jh}}static lex(t,e){return new Hh(e).lex(t)}static lexInline(t,e){return new Hh(e).inlineTokens(t)}lex(t){t=t.replace(/\r\n|\r/g,"\n"),this.blockTokens(t,this.tokens);for(let e=0;e<this.inlineQueue.length;e++){const t=this.inlineQueue[e];this.inlineTokens(t.src,t.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,e=[],r=!1){let i,a,n;for(t=this.options.pedantic?t.replace(/\t/g," ").replace(/^ +$/gm,""):t.replace(/^( *)(\t+)/gm,((t,e,r)=>e+" ".repeat(r.length)));t;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some((r=>!!(i=r.call({lexer:this},t,e))&&(t=t.substring(i.raw.length),e.push(i),!0)))))if(i=this.tokenizer.space(t))t=t.substring(i.raw.length),1===i.raw.length&&e.length>0?e[e.length-1].raw+="\n":e.push(i);else if(i=this.tokenizer.code(t))t=t.substring(i.raw.length),a=e[e.length-1],!a||"paragraph"!==a.type&&"text"!==a.type?e.push(i):(a.raw+="\n"+i.raw,a.text+="\n"+i.text,this.inlineQueue[this.inlineQueue.length-1].src=a.text);else if(i=this.tokenizer.fences(t))t=t.substring(i.raw.length),e.push(i);else if(i=this.tokenizer.heading(t))t=t.substring(i.raw.length),e.push(i);else if(i=this.tokenizer.hr(t))t=t.substring(i.raw.length),e.push(i);else if(i=this.tokenizer.blockquote(t))t=t.substring(i.raw.length),e.push(i);else if(i=this.tokenizer.list(t))t=t.substring(i.raw.length),e.push(i);else if(i=this.tokenizer.html(t))t=t.substring(i.raw.length),e.push(i);else if(i=this.tokenizer.def(t))t=t.substring(i.raw.length),a=e[e.length-1],!a||"paragraph"!==a.type&&"text"!==a.type?this.tokens.links[i.tag]||(this.tokens.links[i.tag]={href:i.href,title:i.title}):(a.raw+="\n"+i.raw,a.text+="\n"+i.raw,this.inlineQueue[this.inlineQueue.length-1].src=a.text);else if(i=this.tokenizer.table(t))t=t.substring(i.raw.length),e.push(i);else if(i=this.tokenizer.lheading(t))t=t.substring(i.raw.length),e.push(i);else{if(n=t,this.options.extensions&&this.options.extensions.startBlock){let e=1/0;const r=t.slice(1);let i;this.options.extensions.startBlock.forEach((t=>{i=t.call({lexer:this},r),"number"==typeof i&&i>=0&&(e=Math.min(e,i))})),e<1/0&&e>=0&&(n=t.substring(0,e+1))}if(this.state.top&&(i=this.tokenizer.paragraph(n)))a=e[e.length-1],r&&"paragraph"===(null==a?void 0:a.type)?(a.raw+="\n"+i.raw,a.text+="\n"+i.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=a.text):e.push(i),r=n.length!==t.length,t=t.substring(i.raw.length);else if(i=this.tokenizer.text(t))t=t.substring(i.raw.length),a=e[e.length-1],a&&"text"===a.type?(a.raw+="\n"+i.raw,a.text+="\n"+i.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=a.text):e.push(i);else if(t){const e="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(e);break}throw new Error(e)}}return this.state.top=!0,e}inline(t,e=[]){return this.inlineQueue.push({src:t,tokens:e}),e}inlineTokens(t,e=[]){let r,i,a,n,o,s,l=t;if(this.tokens.links){const t=Object.keys(this.tokens.links);if(t.length>0)for(;null!=(n=this.tokenizer.rules.inline.reflinkSearch.exec(l));)t.includes(n[0].slice(n[0].lastIndexOf("[")+1,-1))&&(l=l.slice(0,n.index)+"["+"a".repeat(n[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(n=this.tokenizer.rules.inline.blockSkip.exec(l));)l=l.slice(0,n.index)+"["+"a".repeat(n[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;null!=(n=this.tokenizer.rules.inline.anyPunctuation.exec(l));)l=l.slice(0,n.index)+"++"+l.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;t;)if(o||(s=""),o=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some((i=>!!(r=i.call({lexer:this},t,e))&&(t=t.substring(r.raw.length),e.push(r),!0)))))if(r=this.tokenizer.escape(t))t=t.substring(r.raw.length),e.push(r);else if(r=this.tokenizer.tag(t))t=t.substring(r.raw.length),i=e[e.length-1],i&&"text"===r.type&&"text"===i.type?(i.raw+=r.raw,i.text+=r.text):e.push(r);else if(r=this.tokenizer.link(t))t=t.substring(r.raw.length),e.push(r);else if(r=this.tokenizer.reflink(t,this.tokens.links))t=t.substring(r.raw.length),i=e[e.length-1],i&&"text"===r.type&&"text"===i.type?(i.raw+=r.raw,i.text+=r.text):e.push(r);else if(r=this.tokenizer.emStrong(t,l,s))t=t.substring(r.raw.length),e.push(r);else if(r=this.tokenizer.codespan(t))t=t.substring(r.raw.length),e.push(r);else if(r=this.tokenizer.br(t))t=t.substring(r.raw.length),e.push(r);else if(r=this.tokenizer.del(t))t=t.substring(r.raw.length),e.push(r);else if(r=this.tokenizer.autolink(t))t=t.substring(r.raw.length),e.push(r);else if(this.state.inLink||!(r=this.tokenizer.url(t))){if(a=t,this.options.extensions&&this.options.extensions.startInline){let e=1/0;const r=t.slice(1);let i;this.options.extensions.startInline.forEach((t=>{i=t.call({lexer:this},r),"number"==typeof i&&i>=0&&(e=Math.min(e,i))})),e<1/0&&e>=0&&(a=t.substring(0,e+1))}if(r=this.tokenizer.inlineText(a))t=t.substring(r.raw.length),"_"!==r.raw.slice(-1)&&(s=r.raw.slice(-1)),o=!0,i=e[e.length-1],i&&"text"===i.type?(i.raw+=r.raw,i.text+=r.text):e.push(r);else if(t){const e="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(e);break}throw new Error(e)}}else t=t.substring(r.raw.length),e.push(r);return e}}class Uh{constructor(t){f(this,"options"),f(this,"parser"),this.options=t||Hl}space(t){return""}code({text:t,lang:e,escaped:r}){var i;const a=null==(i=(e||"").match(/^\S*/))?void 0:i[0],n=t.replace(/\n$/,"")+"\n";return a?'<pre><code class="language-'+Kl(a)+'">'+(r?n:Kl(n,!0))+"</code></pre>\n":"<pre><code>"+(r?n:Kl(n,!0))+"</code></pre>\n"}blockquote({tokens:t}){return`<blockquote>\n${this.parser.parse(t)}</blockquote>\n`}html({text:t}){return t}heading({tokens:t,depth:e}){return`<h${e}>${this.parser.parseInline(t)}</h${e}>\n`}hr(t){return"<hr>\n"}list(t){const e=t.ordered,r=t.start;let i="";for(let n=0;n<t.items.length;n++){const e=t.items[n];i+=this.listitem(e)}const a=e?"ol":"ul";return"<"+a+(e&&1!==r?' start="'+r+'"':"")+">\n"+i+"</"+a+">\n"}listitem(t){let e="";if(t.task){const r=this.checkbox({checked:!!t.checked});t.loose?t.tokens.length>0&&"paragraph"===t.tokens[0].type?(t.tokens[0].text=r+" "+t.tokens[0].text,t.tokens[0].tokens&&t.tokens[0].tokens.length>0&&"text"===t.tokens[0].tokens[0].type&&(t.tokens[0].tokens[0].text=r+" "+t.tokens[0].tokens[0].text)):t.tokens.unshift({type:"text",raw:r+" ",text:r+" "}):e+=r+" "}return e+=this.parser.parse(t.tokens,!!t.loose),`<li>${e}</li>\n`}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>\n`}table(t){let e="",r="";for(let a=0;a<t.header.length;a++)r+=this.tablecell(t.header[a]);e+=this.tablerow({text:r});let i="";for(let a=0;a<t.rows.length;a++){const e=t.rows[a];r="";for(let t=0;t<e.length;t++)r+=this.tablecell(e[t]);i+=this.tablerow({text:r})}return i&&(i=`<tbody>${i}</tbody>`),"<table>\n<thead>\n"+e+"</thead>\n"+i+"</table>\n"}tablerow({text:t}){return`<tr>\n${t}</tr>\n`}tablecell(t){const e=this.parser.parseInline(t.tokens),r=t.header?"th":"td";return(t.align?`<${r} align="${t.align}">`:`<${r}>`)+e+`</${r}>\n`}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>${t}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:e,tokens:r}){const i=this.parser.parseInline(r),a=rh(t);if(null===a)return i;let n='<a href="'+(t=a)+'"';return e&&(n+=' title="'+e+'"'),n+=">"+i+"</a>",n}image({href:t,title:e,text:r}){const i=rh(t);if(null===i)return r;let a=`<img src="${t=i}" alt="${r}"`;return e&&(a+=` title="${e}"`),a+=">",a}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):t.text}}class Yh{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""}}class Vh{constructor(t){f(this,"options"),f(this,"renderer"),f(this,"textRenderer"),this.options=t||Hl,this.options.renderer=this.options.renderer||new Uh,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Yh}static parse(t,e){return new Vh(e).parse(t)}static parseInline(t,e){return new Vh(e).parseInline(t)}parse(t,e=!0){let r="";for(let i=0;i<t.length;i++){const a=t[i];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[a.type]){const t=a,e=this.options.extensions.renderers[t.type].call({parser:this},t);if(!1!==e||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(t.type)){r+=e||"";continue}}const n=a;switch(n.type){case"space":r+=this.renderer.space(n);continue;case"hr":r+=this.renderer.hr(n);continue;case"heading":r+=this.renderer.heading(n);continue;case"code":r+=this.renderer.code(n);continue;case"table":r+=this.renderer.table(n);continue;case"blockquote":r+=this.renderer.blockquote(n);continue;case"list":r+=this.renderer.list(n);continue;case"html":r+=this.renderer.html(n);continue;case"paragraph":r+=this.renderer.paragraph(n);continue;case"text":{let a=n,o=this.renderer.text(a);for(;i+1<t.length&&"text"===t[i+1].type;)a=t[++i],o+="\n"+this.renderer.text(a);r+=e?this.renderer.paragraph({type:"paragraph",raw:o,text:o,tokens:[{type:"text",raw:o,text:o}]}):o;continue}default:{const t='Token with "'+n.type+'" type was not found.';if(this.options.silent)return console.error(t),"";throw new Error(t)}}}return r}parseInline(t,e){e=e||this.renderer;let r="";for(let i=0;i<t.length;i++){const a=t[i];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[a.type]){const t=this.options.extensions.renderers[a.type].call({parser:this},a);if(!1!==t||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(a.type)){r+=t||"";continue}}const n=a;switch(n.type){case"escape":case"text":r+=e.text(n);break;case"html":r+=e.html(n);break;case"link":r+=e.link(n);break;case"image":r+=e.image(n);break;case"strong":r+=e.strong(n);break;case"em":r+=e.em(n);break;case"codespan":r+=e.codespan(n);break;case"br":r+=e.br(n);break;case"del":r+=e.del(n);break;default:{const t='Token with "'+n.type+'" type was not found.';if(this.options.silent)return console.error(t),"";throw new Error(t)}}}return r}}class Gh{constructor(t){f(this,"options"),this.options=t||Hl}preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}}f(Gh,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"]));l=new WeakSet,h=function(t,e,r){switch(e){case"heading":return function(i){return i.type&&i.type===e?t.call(this,r.parser.parseInline(i.tokens),i.depth,r.parser.parseInline(i.tokens,r.parser.textRenderer).replace(Jl,((t,e)=>"colon"===(e=e.toLowerCase())?":":"#"===e.charAt(0)?"x"===e.charAt(1)?String.fromCharCode(parseInt(e.substring(2),16)):String.fromCharCode(+e.substring(1)):""))):t.apply(this,arguments)};case"code":return function(r){return r.type&&r.type===e?t.call(this,r.text,r.lang,!!r.escaped):t.apply(this,arguments)};case"table":return function(r){if(!r.type||r.type!==e)return t.apply(this,arguments);let i="",a="";for(let t=0;t<r.header.length;t++)a+=this.tablecell({text:r.header[t].text,tokens:r.header[t].tokens,header:!0,align:r.align[t]});i+=this.tablerow({text:a});let n="";for(let t=0;t<r.rows.length;t++){const e=r.rows[t];a="";for(let t=0;t<e.length;t++)a+=this.tablecell({text:e[t].text,tokens:e[t].tokens,header:!1,align:r.align[t]});n+=this.tablerow({text:a})}return t.call(this,i,n)};case"blockquote":return function(r){if(!r.type||r.type!==e)return t.apply(this,arguments);const i=this.parser.parse(r.tokens);return t.call(this,i)};case"list":return function(r){if(!r.type||r.type!==e)return t.apply(this,arguments);const i=r.ordered,a=r.start,n=r.loose;let o="";for(let t=0;t<r.items.length;t++){const e=r.items[t],i=e.checked,a=e.task;let s="";if(e.task){const t=this.checkbox({checked:!!i});n?e.tokens.length>0&&"paragraph"===e.tokens[0].type?(e.tokens[0].text=t+" "+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&"text"===e.tokens[0].tokens[0].type&&(e.tokens[0].tokens[0].text=t+" "+e.tokens[0].tokens[0].text)):e.tokens.unshift({type:"text",text:t+" "}):s+=t+" "}s+=this.parser.parse(e.tokens,n),o+=this.listitem({type:"list_item",raw:s,text:s,task:a,checked:!!i,loose:n,tokens:e.tokens})}return t.call(this,o,i,a)};case"html":return function(r){return r.type&&r.type===e?t.call(this,r.text,r.block):t.apply(this,arguments)};case"paragraph":case"strong":case"em":case"del":return function(r){return r.type&&r.type===e?t.call(this,this.parser.parseInline(r.tokens)):t.apply(this,arguments)};case"escape":case"codespan":case"text":return function(r){return r.type&&r.type===e?t.call(this,r.text):t.apply(this,arguments)};case"link":return function(r){return r.type&&r.type===e?t.call(this,r.href,r.title,this.parser.parseInline(r.tokens)):t.apply(this,arguments)};case"image":return function(r){return r.type&&r.type===e?t.call(this,r.href,r.title,r.text):t.apply(this,arguments)}}return t},c=function(t,e){return(r,i)=>{const a={...i},n={...this.defaults,...a};!0===this.defaults.async&&!1===a.async&&(n.silent||console.warn("marked(): The async option was set to true by an extension. The async: false option sent to parse will be ignored."),n.async=!0);const o=y(this,l,d).call(this,!!n.silent,!!n.async);if(null==r)return o(new Error("marked(): input parameter is undefined or null"));if("string"!=typeof r)return o(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));if(n.hooks&&(n.hooks.options=n),n.async)return Promise.resolve(n.hooks?n.hooks.preprocess(r):r).then((e=>t(e,n))).then((t=>n.hooks?n.hooks.processAllTokens(t):t)).then((t=>n.walkTokens?Promise.all(this.walkTokens(t,n.walkTokens)).then((()=>t)):t)).then((t=>e(t,n))).then((t=>n.hooks?n.hooks.postprocess(t):t)).catch(o);try{n.hooks&&(r=n.hooks.preprocess(r));let i=t(r,n);n.hooks&&(i=n.hooks.processAllTokens(i)),n.walkTokens&&this.walkTokens(i,n.walkTokens);let a=e(i,n);return n.hooks&&(a=n.hooks.postprocess(a)),a}catch(s){return o(s)}}},d=function(t,e){return r=>{if(r.message+="\nPlease report this to https://github.com/markedjs/marked.",t){const t="<p>An error occurred:</p><pre>"+Kl(r.message+"",!0)+"</pre>";return e?Promise.resolve(t):t}if(e)return Promise.reject(r);throw r}};const Zh=new class{constructor(...t){var e,r,i;e=this,(r=l).has(e)?g("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(e):r.set(e,i),f(this,"defaults",{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}),f(this,"options",this.setOptions),f(this,"parse",y(this,l,c).call(this,Hh.lex,Vh.parse)),f(this,"parseInline",y(this,l,c).call(this,Hh.lexInline,Vh.parseInline)),f(this,"Parser",Vh),f(this,"Renderer",Uh),f(this,"TextRenderer",Yh),f(this,"Lexer",Hh),f(this,"Tokenizer",sh),f(this,"Hooks",Gh),this.use(...t)}walkTokens(t,e){var r,i;let a=[];for(const n of t)switch(a=a.concat(e.call(this,n)),n.type){case"table":{const t=n;for(const r of t.header)a=a.concat(this.walkTokens(r.tokens,e));for(const r of t.rows)for(const t of r)a=a.concat(this.walkTokens(t.tokens,e));break}case"list":{const t=n;a=a.concat(this.walkTokens(t.items,e));break}default:{const t=n;(null==(i=null==(r=this.defaults.extensions)?void 0:r.childTokens)?void 0:i[t.type])?this.defaults.extensions.childTokens[t.type].forEach((r=>{const i=t[r].flat(1/0);a=a.concat(this.walkTokens(i,e))})):t.tokens&&(a=a.concat(this.walkTokens(t.tokens,e)))}}return a}use(...t){const e=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach((t=>{const r={...t};if(r.async=this.defaults.async||r.async||!1,t.extensions&&(t.extensions.forEach((t=>{if(!t.name)throw new Error("extension name required");if("renderer"in t){const r=e.renderers[t.name];e.renderers[t.name]=r?function(...e){let i=t.renderer.apply(this,e);return!1===i&&(i=r.apply(this,e)),i}:t.renderer}if("tokenizer"in t){if(!t.level||"block"!==t.level&&"inline"!==t.level)throw new Error("extension level must be 'block' or 'inline'");const r=e[t.level];r?r.unshift(t.tokenizer):e[t.level]=[t.tokenizer],t.start&&("block"===t.level?e.startBlock?e.startBlock.push(t.start):e.startBlock=[t.start]:"inline"===t.level&&(e.startInline?e.startInline.push(t.start):e.startInline=[t.start]))}"childTokens"in t&&t.childTokens&&(e.childTokens[t.name]=t.childTokens)})),r.extensions=e),t.renderer){const e=this.defaults.renderer||new Uh(this.defaults);for(const r in t.renderer){if(!(r in e))throw new Error(`renderer '${r}' does not exist`);if(["options","parser"].includes(r))continue;const i=r;let a=t.renderer[i];t.useNewRenderer||(a=y(this,l,h).call(this,a,i,e));const n=e[i];e[i]=(...t)=>{let r=a.apply(e,t);return!1===r&&(r=n.apply(e,t)),r||""}}r.renderer=e}if(t.tokenizer){const e=this.defaults.tokenizer||new sh(this.defaults);for(const r in t.tokenizer){if(!(r in e))throw new Error(`tokenizer '${r}' does not exist`);if(["options","rules","lexer"].includes(r))continue;const i=r,a=t.tokenizer[i],n=e[i];e[i]=(...t)=>{let r=a.apply(e,t);return!1===r&&(r=n.apply(e,t)),r}}r.tokenizer=e}if(t.hooks){const e=this.defaults.hooks||new Gh;for(const r in t.hooks){if(!(r in e))throw new Error(`hook '${r}' does not exist`);if("options"===r)continue;const i=r,a=t.hooks[i],n=e[i];Gh.passThroughHooks.has(r)?e[i]=t=>{if(this.defaults.async)return Promise.resolve(a.call(e,t)).then((t=>n.call(e,t)));const r=a.call(e,t);return n.call(e,r)}:e[i]=(...t)=>{let r=a.apply(e,t);return!1===r&&(r=n.apply(e,t)),r}}r.hooks=e}if(t.walkTokens){const e=this.defaults.walkTokens,i=t.walkTokens;r.walkTokens=function(t){let r=[];return r.push(i.call(this,t)),e&&(r=r.concat(e.call(this,t))),r}}this.defaults={...this.defaults,...r}})),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,e){return Hh.lex(t,e??this.defaults)}parser(t,e){return Vh.parse(t,e??this.defaults)}};function Xh(t,e){return Zh.parse(t,e)}function Qh(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];var i=Array.from("string"==typeof t?[t]:t);i[i.length-1]=i[i.length-1].replace(/\r?\n([\t ]*)$/,"");var a=i.reduce((function(t,e){var r=e.match(/\n([\t ]+|(?!\s).)/g);return r?t.concat(r.map((function(t){var e,r;return null!==(r=null===(e=t.match(/[\t ]/g))||void 0===e?void 0:e.length)&&void 0!==r?r:0}))):t}),[]);if(a.length){var n=new RegExp("\n[\t ]{"+Math.min.apply(Math,a)+"}","g");i=i.map((function(t){return t.replace(n,"\n")}))}i[0]=i[0].replace(/^\r?\n/,"");var o=i[0];return e.forEach((function(t,e){var r=o.match(/(?:^|\n)( *)$/),a=r?r[1]:"",n=t;"string"==typeof t&&t.includes("\n")&&(n=String(t).split("\n").map((function(t,e){return 0===e?t:""+a+t})).join("\n")),o+=n+i[e+1]})),o}function Kh(t,{markdownAutoWrap:e}){const r=Qh(t.replace(/<br\/>/g,"\n").replace(/\n{2,}/g,"\n"));return!1===e?r.replace(/ /g,"&nbsp;"):r}function Jh(t,e={}){const r=Kh(t,e),i=Xh.lexer(r),a=[[]];let n=0;function o(t,e="normal"){if("text"===t.type){t.text.split("\n").forEach(((t,r)=>{0!==r&&(n++,a.push([])),t.split(" ").forEach((t=>{t&&a[n].push({content:t,type:e})}))}))}else"strong"===t.type||"em"===t.type?t.tokens.forEach((e=>{o(e,t.type)})):"html"===t.type&&a[n].push({content:t.text,type:"normal"})}return Cr(o,"processNode"),i.forEach((t=>{var e;"paragraph"===t.type?null==(e=t.tokens)||e.forEach((t=>{o(t)})):"html"===t.type&&a[n].push({content:t.text,type:"normal"})})),a}function tc(t,{markdownAutoWrap:e}={}){const r=Xh.lexer(t);function i(t){var r,a,n;return"text"===t.type?!1===e?t.text.replace(/\n */g,"<br/>").replace(/ /g,"&nbsp;"):t.text.replace(/\n */g,"<br/>"):"strong"===t.type?`<strong>${null==(r=t.tokens)?void 0:r.map(i).join("")}</strong>`:"em"===t.type?`<em>${null==(a=t.tokens)?void 0:a.map(i).join("")}</em>`:"paragraph"===t.type?`<p>${null==(n=t.tokens)?void 0:n.map(i).join("")}</p>`:"space"===t.type?"":"html"===t.type?`${t.text}`:`Unsupported markdown: ${t.type}`}return Cr(i,"output"),r.map(i).join("")}function ec(t){return Intl.Segmenter?[...(new Intl.Segmenter).segment(t)].map((t=>t.segment)):[...t]}function rc(t,e){return ic(t,[],ec(e.content),e.type)}function ic(t,e,r,i){if(0===r.length)return[{content:e.join(""),type:i},{content:"",type:i}];const[a,...n]=r,o=[...e,a];return t([{content:o.join(""),type:i}])?ic(t,o,n,i):(0===e.length&&a&&(e.push(a),r.shift()),[{content:e.join(""),type:i},{content:r.join(""),type:i}])}function ac(t,e){if(t.some((({content:t})=>t.includes("\n"))))throw new Error("splitLineToFitWidth does not support newlines in the line");return nc(t,e)}function nc(t,e,r=[],i=[]){if(0===t.length)return i.length>0&&r.push(i),r.length>0?r:[];let a="";" "===t[0].content&&(a=" ",t.shift());const n=t.shift()??{content:" ",type:"normal"},o=[...i];if(""!==a&&o.push({content:a,type:"normal"}),o.push(n),e(o))return nc(t,e,r,o);if(i.length>0)r.push(i),t.unshift(n);else if(n.content){const[i,a]=rc(e,n);r.push([i]),a.content&&t.unshift(a)}return nc(t,e,r)}function oc(t,e){e&&t.attr("style",e)}async function sc(t,e,r,i,a=!1){const n=t.append("foreignObject");n.attr("width",10*r+"px"),n.attr("height",10*r+"px");const o=n.append("xhtml:div");let s=e.label;e.label&&ji(e.label)&&(s=await Ui(e.label.replace(Yi.lineBreakRegex,"\n"),fa()));const l=e.isNode?"nodeLabel":"edgeLabel",h=o.append("span");h.html(s),oc(h,e.labelStyle),h.attr("class",`${l} ${i}`),oc(o,e.labelStyle),o.style("display","table-cell"),o.style("white-space","nowrap"),o.style("line-height","1.5"),o.style("max-width",r+"px"),o.style("text-align","center"),o.attr("xmlns","http://www.w3.org/1999/xhtml"),a&&o.attr("class","labelBkg");let c=o.node().getBoundingClientRect();return c.width===r&&(o.style("display","table"),o.style("white-space","break-spaces"),o.style("width",r+"px"),c=o.node().getBoundingClientRect()),n.node()}function lc(t,e,r){return t.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",e*r-.1+"em").attr("dy",r+"em")}function hc(t,e,r){const i=t.append("text"),a=lc(i,1,e);uc(a,r);const n=a.node().getComputedTextLength();return i.remove(),n}function cc(t,e,r){var i;const a=t.append("text"),n=lc(a,1,e);uc(n,[{content:r,type:"normal"}]);const o=null==(i=n.node())?void 0:i.getBoundingClientRect();return o&&a.remove(),o}function dc(t,e,r,i=!1){const a=e.append("g"),n=a.insert("rect").attr("class","background").attr("style","stroke: none"),o=a.append("text").attr("y","-10.1");let s=0;for(const l of r){const e=Cr((e=>hc(a,1.1,e)<=t),"checkWidth"),r=e(l)?[l]:ac(l,e);for(const t of r){uc(lc(o,s,1.1),t),s++}}if(i){const t=o.node().getBBox(),e=2;return n.attr("x",t.x-e).attr("y",t.y-e).attr("width",t.width+2*e).attr("height",t.height+2*e),a.node()}return o.node()}function uc(t,e){t.text(""),e.forEach(((e,r)=>{const i=t.append("tspan").attr("font-style","em"===e.type?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight","strong"===e.type?"bold":"normal");0===r?i.text(e.content):i.text(" "+e.content)}))}function pc(t){return t.replace(/fa[bklrs]?:fa-[\w-]+/g,(t=>`<i class='${t.replace(":"," ")}'></i>`))}Xh.options=Xh.setOptions=function(t){return Zh.setOptions(t),Xh.defaults=Zh.defaults,Ul(Xh.defaults),Xh},Xh.getDefaults=jl,Xh.defaults=Hl,Xh.use=function(...t){return Zh.use(...t),Xh.defaults=Zh.defaults,Ul(Xh.defaults),Xh},Xh.walkTokens=function(t,e){return Zh.walkTokens(t,e)},Xh.parseInline=Zh.parseInline,Xh.Parser=Vh,Xh.parser=Vh.parse,Xh.Renderer=Uh,Xh.TextRenderer=Yh,Xh.Lexer=Hh,Xh.lexer=Hh.lex,Xh.Tokenizer=sh,Xh.Hooks=Gh,Xh.parse=Xh,Xh.options,Xh.setOptions,Xh.use,Xh.walkTokens,Xh.parseInline,Vh.parse,Hh.lex,Cr(Kh,"preprocessMarkdown"),Cr(Jh,"markdownToLines"),Cr(tc,"markdownToHTML"),Cr(ec,"splitTextToChars"),Cr(rc,"splitWordToFitWidth"),Cr(ic,"splitWordToFitWidthRecursion"),Cr(ac,"splitLineToFitWidth"),Cr(nc,"splitLineToFitWidthRecursion"),Cr(oc,"applyStyle"),Cr(sc,"addHtmlSpan"),Cr(lc,"createTspan"),Cr(hc,"computeWidthOfText"),Cr(cc,"computeDimensionOfText"),Cr(dc,"createFormattedText"),Cr(uc,"updateTextContentAndStyles"),Cr(pc,"replaceIconSubstring");var gc=Cr((async(t,e="",{style:r="",isTitle:i=!1,classes:a="",useHtmlLabels:n=!0,isNode:o=!0,width:s=200,addSvgBackground:l=!1}={},h)=>{if(Sr.debug("XYZ createText",e,r,i,a,n,o,"addSvgBackground: ",l),n){const i=tc(e,h),n=pc(Wl(i)),c=e.replace(/\\\\/g,"\\"),d={isNode:o,label:ji(e)?c:n,labelStyle:r.replace("fill:","color:")};return await sc(t,d,s,a,l)}{const i=dc(s,t,Jh(e.replace(/<br\s*\/?>/g,"<br/>").replace("<br>","<br/>"),h),!!e&&l);if(o){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));const t=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");Z(i).attr("style",t)}else{const t=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");Z(i).select("rect").attr("style",t.replace(/background:/g,"fill:"));const e=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");Z(i).select("text").attr("style",e)}return i}}),"createText");function fc(t,e,r){if(t&&t.length){const[i,a]=e,n=Math.PI/180*r,o=Math.cos(n),s=Math.sin(n);for(const e of t){const[t,r]=e;e[0]=(t-i)*o-(r-a)*s+i,e[1]=(t-i)*s+(r-a)*o+a}}}function yc(t,e){return t[0]===e[0]&&t[1]===e[1]}function mc(t,e){var r;const i=e.hachureAngle+90;let a=e.hachureGap;a<0&&(a=4*e.strokeWidth),a=Math.round(Math.max(a,.1));let n=1;return e.roughness>=1&&((null===(r=e.randomizer)||void 0===r?void 0:r.next())||Math.random())>.7&&(n=a),function(t,e,r,i=1){const a=r,n=Math.max(e,.1),o=t[0]&&t[0][0]&&"number"==typeof t[0][0]?[t]:t,s=[0,0];if(a)for(const h of o)fc(h,s,a);const l=function(t,e,r){const i=[];for(const h of t){const t=[...h];yc(t[0],t[t.length-1])||t.push([t[0][0],t[0][1]]),t.length>2&&i.push(t)}const a=[];e=Math.max(e,.1);const n=[];for(const h of i)for(let t=0;t<h.length-1;t++){const e=h[t],r=h[t+1];if(e[1]!==r[1]){const t=Math.min(e[1],r[1]);n.push({ymin:t,ymax:Math.max(e[1],r[1]),x:t===e[1]?e[0]:r[0],islope:(r[0]-e[0])/(r[1]-e[1])})}}if(n.sort(((t,e)=>t.ymin<e.ymin?-1:t.ymin>e.ymin?1:t.x<e.x?-1:t.x>e.x?1:t.ymax===e.ymax?0:(t.ymax-e.ymax)/Math.abs(t.ymax-e.ymax))),!n.length)return a;let o=[],s=n[0].ymin,l=0;for(;o.length||n.length;){if(n.length){let t=-1;for(let e=0;e<n.length&&!(n[e].ymin>s);e++)t=e;n.splice(0,t+1).forEach((t=>{o.push({s:s,edge:t})}))}if(o=o.filter((t=>!(t.edge.ymax<=s))),o.sort(((t,e)=>t.edge.x===e.edge.x?0:(t.edge.x-e.edge.x)/Math.abs(t.edge.x-e.edge.x))),(1!==r||l%e==0)&&o.length>1)for(let t=0;t<o.length;t+=2){const e=t+1;if(e>=o.length)break;const r=o[t].edge,i=o[e].edge;a.push([[Math.round(r.x),s],[Math.round(i.x),s]])}s+=r,o.forEach((t=>{t.edge.x=t.edge.x+r*t.edge.islope})),l++}return a}(o,n,i);if(a){for(const t of o)fc(t,s,-a);!function(t,e,r){const i=[];t.forEach((t=>i.push(...t))),fc(i,e,r)}(l,s,-a)}return l}(t,a,i,n||1)}class xc{constructor(t){this.helper=t}fillPolygons(t,e){return this._fillPolygons(t,e)}_fillPolygons(t,e){const r=mc(t,e);return{type:"fillSketch",ops:this.renderLines(r,e)}}renderLines(t,e){const r=[];for(const i of t)r.push(...this.helper.doubleLineOps(i[0][0],i[0][1],i[1][0],i[1][1],e));return r}}function bc(t){const e=t[0],r=t[1];return Math.sqrt(Math.pow(e[0]-r[0],2)+Math.pow(e[1]-r[1],2))}class Cc extends xc{fillPolygons(t,e){let r=e.hachureGap;r<0&&(r=4*e.strokeWidth),r=Math.max(r,.1);const i=mc(t,Object.assign({},e,{hachureGap:r})),a=Math.PI/180*e.hachureAngle,n=[],o=.5*r*Math.cos(a),s=.5*r*Math.sin(a);for(const[l,h]of i)bc([l,h])&&n.push([[l[0]-o,l[1]+s],[...h]],[[l[0]+o,l[1]-s],[...h]]);return{type:"fillSketch",ops:this.renderLines(n,e)}}}class kc extends xc{fillPolygons(t,e){const r=this._fillPolygons(t,e),i=Object.assign({},e,{hachureAngle:e.hachureAngle+90}),a=this._fillPolygons(t,i);return r.ops=r.ops.concat(a.ops),r}}class wc{constructor(t){this.helper=t}fillPolygons(t,e){const r=mc(t,e=Object.assign({},e,{hachureAngle:0}));return this.dotsOnLines(r,e)}dotsOnLines(t,e){const r=[];let i=e.hachureGap;i<0&&(i=4*e.strokeWidth),i=Math.max(i,.1);let a=e.fillWeight;a<0&&(a=e.strokeWidth/2);const n=i/4;for(const o of t){const t=bc(o),s=t/i,l=Math.ceil(s)-1,h=t-l*i,c=(o[0][0]+o[1][0])/2-i/4,d=Math.min(o[0][1],o[1][1]);for(let o=0;o<l;o++){const t=d+h+o*i,s=c-n+2*Math.random()*n,l=t-n+2*Math.random()*n,u=this.helper.ellipse(s,l,a,a,e);r.push(...u.ops)}}return{type:"fillSketch",ops:r}}}class Sc{constructor(t){this.helper=t}fillPolygons(t,e){const r=mc(t,e);return{type:"fillSketch",ops:this.dashedLine(r,e)}}dashedLine(t,e){const r=e.dashOffset<0?e.hachureGap<0?4*e.strokeWidth:e.hachureGap:e.dashOffset,i=e.dashGap<0?e.hachureGap<0?4*e.strokeWidth:e.hachureGap:e.dashGap,a=[];return t.forEach((t=>{const n=bc(t),o=Math.floor(n/(r+i)),s=(n+i-o*(r+i))/2;let l=t[0],h=t[1];l[0]>h[0]&&(l=t[1],h=t[0]);const c=Math.atan((h[1]-l[1])/(h[0]-l[0]));for(let d=0;d<o;d++){const t=d*(r+i),n=t+r,o=[l[0]+t*Math.cos(c)+s*Math.cos(c),l[1]+t*Math.sin(c)+s*Math.sin(c)],h=[l[0]+n*Math.cos(c)+s*Math.cos(c),l[1]+n*Math.sin(c)+s*Math.sin(c)];a.push(...this.helper.doubleLineOps(o[0],o[1],h[0],h[1],e))}})),a}}class Tc{constructor(t){this.helper=t}fillPolygons(t,e){const r=e.hachureGap<0?4*e.strokeWidth:e.hachureGap,i=e.zigzagOffset<0?r:e.zigzagOffset,a=mc(t,e=Object.assign({},e,{hachureGap:r+i}));return{type:"fillSketch",ops:this.zigzagLines(a,i,e)}}zigzagLines(t,e,r){const i=[];return t.forEach((t=>{const a=bc(t),n=Math.round(a/(2*e));let o=t[0],s=t[1];o[0]>s[0]&&(o=t[1],s=t[0]);const l=Math.atan((s[1]-o[1])/(s[0]-o[0]));for(let h=0;h<n;h++){const t=2*h*e,a=2*(h+1)*e,n=Math.sqrt(2*Math.pow(e,2)),s=[o[0]+t*Math.cos(l),o[1]+t*Math.sin(l)],c=[o[0]+a*Math.cos(l),o[1]+a*Math.sin(l)],d=[s[0]+n*Math.cos(l+Math.PI/4),s[1]+n*Math.sin(l+Math.PI/4)];i.push(...this.helper.doubleLineOps(s[0],s[1],d[0],d[1],r),...this.helper.doubleLineOps(d[0],d[1],c[0],c[1],r))}})),i}}const vc={};class Bc{constructor(t){this.seed=t}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}}const _c={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 Lc(t,e){return t.type===e}function Mc(t){const e=[],r=function(t){const e=new Array;for(;""!==t;)if(t.match(/^([ \t\r\n,]+)/))t=t.substr(RegExp.$1.length);else if(t.match(/^([aAcChHlLmMqQsStTvVzZ])/))e[e.length]={type:0,text:RegExp.$1},t=t.substr(RegExp.$1.length);else{if(!t.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];e[e.length]={type:1,text:`${parseFloat(RegExp.$1)}`},t=t.substr(RegExp.$1.length)}return e[e.length]={type:2,text:""},e}(t);let i="BOD",a=0,n=r[a];for(;!Lc(n,2);){let o=0;const s=[];if("BOD"===i){if("M"!==n.text&&"m"!==n.text)return Mc("M0,0"+t);a++,o=_c[n.text],i=n.text}else Lc(n,1)?o=_c[i]:(a++,o=_c[n.text],i=n.text);if(!(a+o<r.length))throw new Error("Path data ended short");for(let t=a;t<a+o;t++){const e=r[t];if(!Lc(e,1))throw new Error("Param not a number: "+i+","+e.text);s[s.length]=+e.text}if("number"!=typeof _c[i])throw new Error("Bad segment: "+i);{const t={key:i,data:s};e.push(t),a+=o,n=r[a],"M"===i&&(i="L"),"m"===i&&(i="l")}}return e}function Fc(t){let e=0,r=0,i=0,a=0;const n=[];for(const{key:o,data:s}of t)switch(o){case"M":n.push({key:"M",data:[...s]}),[e,r]=s,[i,a]=s;break;case"m":e+=s[0],r+=s[1],n.push({key:"M",data:[e,r]}),i=e,a=r;break;case"L":n.push({key:"L",data:[...s]}),[e,r]=s;break;case"l":e+=s[0],r+=s[1],n.push({key:"L",data:[e,r]});break;case"C":n.push({key:"C",data:[...s]}),e=s[4],r=s[5];break;case"c":{const t=s.map(((t,i)=>i%2?t+r:t+e));n.push({key:"C",data:t}),e=t[4],r=t[5];break}case"Q":n.push({key:"Q",data:[...s]}),e=s[2],r=s[3];break;case"q":{const t=s.map(((t,i)=>i%2?t+r:t+e));n.push({key:"Q",data:t}),e=t[2],r=t[3];break}case"A":n.push({key:"A",data:[...s]}),e=s[5],r=s[6];break;case"a":e+=s[5],r+=s[6],n.push({key:"A",data:[s[0],s[1],s[2],s[3],s[4],e,r]});break;case"H":n.push({key:"H",data:[...s]}),e=s[0];break;case"h":e+=s[0],n.push({key:"H",data:[e]});break;case"V":n.push({key:"V",data:[...s]}),r=s[0];break;case"v":r+=s[0],n.push({key:"V",data:[r]});break;case"S":n.push({key:"S",data:[...s]}),e=s[2],r=s[3];break;case"s":{const t=s.map(((t,i)=>i%2?t+r:t+e));n.push({key:"S",data:t}),e=t[2],r=t[3];break}case"T":n.push({key:"T",data:[...s]}),e=s[0],r=s[1];break;case"t":e+=s[0],r+=s[1],n.push({key:"T",data:[e,r]});break;case"Z":case"z":n.push({key:"Z",data:[]}),e=i,r=a}return n}function Ac(t){const e=[];let r="",i=0,a=0,n=0,o=0,s=0,l=0;for(const{key:h,data:c}of t){switch(h){case"M":e.push({key:"M",data:[...c]}),[i,a]=c,[n,o]=c;break;case"C":e.push({key:"C",data:[...c]}),i=c[4],a=c[5],s=c[2],l=c[3];break;case"L":e.push({key:"L",data:[...c]}),[i,a]=c;break;case"H":i=c[0],e.push({key:"L",data:[i,a]});break;case"V":a=c[0],e.push({key:"L",data:[i,a]});break;case"S":{let t=0,n=0;"C"===r||"S"===r?(t=i+(i-s),n=a+(a-l)):(t=i,n=a),e.push({key:"C",data:[t,n,...c]}),s=c[0],l=c[1],i=c[2],a=c[3];break}case"T":{const[t,n]=c;let o=0,h=0;"Q"===r||"T"===r?(o=i+(i-s),h=a+(a-l)):(o=i,h=a);const d=i+2*(o-i)/3,u=a+2*(h-a)/3,p=t+2*(o-t)/3,g=n+2*(h-n)/3;e.push({key:"C",data:[d,u,p,g,t,n]}),s=o,l=h,i=t,a=n;break}case"Q":{const[t,r,n,o]=c,h=i+2*(t-i)/3,d=a+2*(r-a)/3,u=n+2*(t-n)/3,p=o+2*(r-o)/3;e.push({key:"C",data:[h,d,u,p,n,o]}),s=t,l=r,i=n,a=o;break}case"A":{const t=Math.abs(c[0]),r=Math.abs(c[1]),n=c[2],o=c[3],s=c[4],l=c[5],h=c[6];0===t||0===r?(e.push({key:"C",data:[i,a,l,h,l,h]}),i=l,a=h):i===l&&a===h||(Ec(i,a,l,h,t,r,n,o,s).forEach((function(t){e.push({key:"C",data:t})})),i=l,a=h);break}case"Z":e.push({key:"Z",data:[]}),i=n,a=o}r=h}return e}function $c(t,e,r){return[t*Math.cos(r)-e*Math.sin(r),t*Math.sin(r)+e*Math.cos(r)]}function Ec(t,e,r,i,a,n,o,s,l,h){const c=(d=o,Math.PI*d/180);var d;let u=[],p=0,g=0,f=0,y=0;if(h)[p,g,f,y]=h;else{[t,e]=$c(t,e,-c),[r,i]=$c(r,i,-c);const o=(t-r)/2,h=(e-i)/2;let d=o*o/(a*a)+h*h/(n*n);d>1&&(d=Math.sqrt(d),a*=d,n*=d);const u=a*a,m=n*n,x=u*m-u*h*h-m*o*o,b=u*h*h+m*o*o,C=(s===l?-1:1)*Math.sqrt(Math.abs(x/b));f=C*a*h/n+(t+r)/2,y=C*-n*o/a+(e+i)/2,p=Math.asin(parseFloat(((e-y)/n).toFixed(9))),g=Math.asin(parseFloat(((i-y)/n).toFixed(9))),t<f&&(p=Math.PI-p),r<f&&(g=Math.PI-g),p<0&&(p=2*Math.PI+p),g<0&&(g=2*Math.PI+g),l&&p>g&&(p-=2*Math.PI),!l&&g>p&&(g-=2*Math.PI)}let m=g-p;if(Math.abs(m)>120*Math.PI/180){const t=g,e=r,s=i;g=l&&g>p?p+120*Math.PI/180*1:p+120*Math.PI/180*-1,u=Ec(r=f+a*Math.cos(g),i=y+n*Math.sin(g),e,s,a,n,o,0,l,[g,t,f,y])}m=g-p;const x=Math.cos(p),b=Math.sin(p),C=Math.cos(g),k=Math.sin(g),w=Math.tan(m/4),S=4/3*a*w,T=4/3*n*w,v=[t,e],B=[t+S*b,e-T*x],_=[r+S*k,i-T*C],L=[r,i];if(B[0]=2*v[0]-B[0],B[1]=2*v[1]-B[1],h)return[B,_,L].concat(u);{u=[B,_,L].concat(u);const t=[];for(let e=0;e<u.length;e+=3){const r=$c(u[e][0],u[e][1],c),i=$c(u[e+1][0],u[e+1][1],c),a=$c(u[e+2][0],u[e+2][1],c);t.push([r[0],r[1],i[0],i[1],a[0],a[1]])}return t}}const Dc={randOffset:function(t,e){return Vc(t,e)},randOffsetWithRange:function(t,e,r){return Yc(t,e,r)},ellipse:function(t,e,r,i,a){return qc(t,e,a,Rc(r,i,a)).opset},doubleLineOps:function(t,e,r,i,a){return Gc(t,e,r,i,a,!0)}};function Ic(t,e,r,i,a){return{type:"path",ops:Gc(t,e,r,i,a)}}function Oc(t,e,r){const i=(t||[]).length;if(i>2){const a=[];for(let e=0;e<i-1;e++)a.push(...Gc(t[e][0],t[e][1],t[e+1][0],t[e+1][1],r));return e&&a.push(...Gc(t[i-1][0],t[i-1][1],t[0][0],t[0][1],r)),{type:"path",ops:a}}return 2===i?Ic(t[0][0],t[0][1],t[1][0],t[1][1],r):{type:"path",ops:[]}}function Pc(t,e){if(t.length){const r="number"==typeof t[0][0]?[t]:t,i=Xc(r[0],1*(1+.2*e.roughness),e),a=e.disableMultiStroke?[]:Xc(r[0],1.5*(1+.22*e.roughness),Hc(e));for(let t=1;t<r.length;t++){const n=r[t];if(n.length){const t=Xc(n,1*(1+.2*e.roughness),e),r=e.disableMultiStroke?[]:Xc(n,1.5*(1+.22*e.roughness),Hc(e));for(const e of t)"move"!==e.op&&i.push(e);for(const e of r)"move"!==e.op&&a.push(e)}}return{type:"path",ops:i.concat(a)}}return{type:"path",ops:[]}}function Rc(t,e,r){const i=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(t/2,2)+Math.pow(e/2,2))/2)),a=Math.ceil(Math.max(r.curveStepCount,r.curveStepCount/Math.sqrt(200)*i)),n=2*Math.PI/a;let o=Math.abs(t/2),s=Math.abs(e/2);const l=1-r.curveFitting;return o+=Vc(o*l,r),s+=Vc(s*l,r),{increment:n,rx:o,ry:s}}function qc(t,e,r,i){const[a,n]=Kc(i.increment,t,e,i.rx,i.ry,1,i.increment*Yc(.1,Yc(.4,1,r),r),r);let o=Qc(a,null,r);if(!r.disableMultiStroke&&0!==r.roughness){const[a]=Kc(i.increment,t,e,i.rx,i.ry,1.5,0,r),n=Qc(a,null,r);o=o.concat(n)}return{estimatedPoints:n,opset:{type:"path",ops:o}}}function zc(t,e,r,i,a,n,o,s,l){const h=t,c=e;let d=Math.abs(r/2),u=Math.abs(i/2);d+=Vc(.01*d,l),u+=Vc(.01*u,l);let p=a,g=n;for(;p<0;)p+=2*Math.PI,g+=2*Math.PI;g-p>2*Math.PI&&(p=0,g=2*Math.PI);const f=2*Math.PI/l.curveStepCount,y=Math.min(f/2,(g-p)/2),m=Jc(y,h,c,d,u,p,g,1,l);if(!l.disableMultiStroke){const t=Jc(y,h,c,d,u,p,g,1.5,l);m.push(...t)}return o&&(s?m.push(...Gc(h,c,h+d*Math.cos(p),c+u*Math.sin(p),l),...Gc(h,c,h+d*Math.cos(g),c+u*Math.sin(g),l)):m.push({op:"lineTo",data:[h,c]},{op:"lineTo",data:[h+d*Math.cos(p),c+u*Math.sin(p)]})),{type:"path",ops:m}}function Wc(t,e){const r=Ac(Fc(Mc(t))),i=[];let a=[0,0],n=[0,0];for(const{key:o,data:s}of r)switch(o){case"M":n=[s[0],s[1]],a=[s[0],s[1]];break;case"L":i.push(...Gc(n[0],n[1],s[0],s[1],e)),n=[s[0],s[1]];break;case"C":{const[t,r,a,o,l,h]=s;i.push(...td(t,r,a,o,l,h,n,e)),n=[l,h];break}case"Z":i.push(...Gc(n[0],n[1],a[0],a[1],e)),n=[a[0],a[1]]}return{type:"path",ops:i}}function Nc(t,e){const r=[];for(const i of t)if(i.length){const t=e.maxRandomnessOffset||0,a=i.length;if(a>2){r.push({op:"move",data:[i[0][0]+Vc(t,e),i[0][1]+Vc(t,e)]});for(let n=1;n<a;n++)r.push({op:"lineTo",data:[i[n][0]+Vc(t,e),i[n][1]+Vc(t,e)]})}}return{type:"fillPath",ops:r}}function jc(t,e){return function(t,e){let r=t.fillStyle||"hachure";if(!vc[r])switch(r){case"zigzag":vc[r]||(vc[r]=new Cc(e));break;case"cross-hatch":vc[r]||(vc[r]=new kc(e));break;case"dots":vc[r]||(vc[r]=new wc(e));break;case"dashed":vc[r]||(vc[r]=new Sc(e));break;case"zigzag-line":vc[r]||(vc[r]=new Tc(e));break;default:r="hachure",vc[r]||(vc[r]=new xc(e))}return vc[r]}(e,Dc).fillPolygons(t,e)}function Hc(t){const e=Object.assign({},t);return e.randomizer=void 0,t.seed&&(e.seed=t.seed+1),e}function Uc(t){return t.randomizer||(t.randomizer=new Bc(t.seed||0)),t.randomizer.next()}function Yc(t,e,r,i=1){return r.roughness*i*(Uc(r)*(e-t)+t)}function Vc(t,e,r=1){return Yc(-t,t,e,r)}function Gc(t,e,r,i,a,n=!1){const o=n?a.disableMultiStrokeFill:a.disableMultiStroke,s=Zc(t,e,r,i,a,!0,!1);if(o)return s;const l=Zc(t,e,r,i,a,!0,!0);return s.concat(l)}function Zc(t,e,r,i,a,n,o){const s=Math.pow(t-r,2)+Math.pow(e-i,2),l=Math.sqrt(s);let h=1;h=l<200?1:l>500?.4:-.0016668*l+1.233334;let c=a.maxRandomnessOffset||0;c*c*100>s&&(c=l/10);const d=c/2,u=.2+.2*Uc(a);let p=a.bowing*a.maxRandomnessOffset*(i-e)/200,g=a.bowing*a.maxRandomnessOffset*(t-r)/200;p=Vc(p,a,h),g=Vc(g,a,h);const f=[],y=()=>Vc(d,a,h),m=()=>Vc(c,a,h),x=a.preserveVertices;return o?f.push({op:"move",data:[t+(x?0:y()),e+(x?0:y())]}):f.push({op:"move",data:[t+(x?0:Vc(c,a,h)),e+(x?0:Vc(c,a,h))]}),o?f.push({op:"bcurveTo",data:[p+t+(r-t)*u+y(),g+e+(i-e)*u+y(),p+t+2*(r-t)*u+y(),g+e+2*(i-e)*u+y(),r+(x?0:y()),i+(x?0:y())]}):f.push({op:"bcurveTo",data:[p+t+(r-t)*u+m(),g+e+(i-e)*u+m(),p+t+2*(r-t)*u+m(),g+e+2*(i-e)*u+m(),r+(x?0:m()),i+(x?0:m())]}),f}function Xc(t,e,r){if(!t.length)return[];const i=[];i.push([t[0][0]+Vc(e,r),t[0][1]+Vc(e,r)]),i.push([t[0][0]+Vc(e,r),t[0][1]+Vc(e,r)]);for(let a=1;a<t.length;a++)i.push([t[a][0]+Vc(e,r),t[a][1]+Vc(e,r)]),a===t.length-1&&i.push([t[a][0]+Vc(e,r),t[a][1]+Vc(e,r)]);return Qc(i,null,r)}function Qc(t,e,r){const i=t.length,a=[];if(i>3){const e=[],n=1-r.curveTightness;a.push({op:"move",data:[t[1][0],t[1][1]]});for(let r=1;r+2<i;r++){const i=t[r];e[0]=[i[0],i[1]],e[1]=[i[0]+(n*t[r+1][0]-n*t[r-1][0])/6,i[1]+(n*t[r+1][1]-n*t[r-1][1])/6],e[2]=[t[r+1][0]+(n*t[r][0]-n*t[r+2][0])/6,t[r+1][1]+(n*t[r][1]-n*t[r+2][1])/6],e[3]=[t[r+1][0],t[r+1][1]],a.push({op:"bcurveTo",data:[e[1][0],e[1][1],e[2][0],e[2][1],e[3][0],e[3][1]]})}}else 3===i?(a.push({op:"move",data:[t[1][0],t[1][1]]}),a.push({op:"bcurveTo",data:[t[1][0],t[1][1],t[2][0],t[2][1],t[2][0],t[2][1]]})):2===i&&a.push(...Zc(t[0][0],t[0][1],t[1][0],t[1][1],r,0,!0));return a}function Kc(t,e,r,i,a,n,o,s){const l=[],h=[];if(0===s.roughness){t/=4,h.push([e+i*Math.cos(-t),r+a*Math.sin(-t)]);for(let n=0;n<=2*Math.PI;n+=t){const t=[e+i*Math.cos(n),r+a*Math.sin(n)];l.push(t),h.push(t)}h.push([e+i*Math.cos(0),r+a*Math.sin(0)]),h.push([e+i*Math.cos(t),r+a*Math.sin(t)])}else{const c=Vc(.5,s)-Math.PI/2;h.push([Vc(n,s)+e+.9*i*Math.cos(c-t),Vc(n,s)+r+.9*a*Math.sin(c-t)]);const d=2*Math.PI+c-.01;for(let o=c;o<d;o+=t){const t=[Vc(n,s)+e+i*Math.cos(o),Vc(n,s)+r+a*Math.sin(o)];l.push(t),h.push(t)}h.push([Vc(n,s)+e+i*Math.cos(c+2*Math.PI+.5*o),Vc(n,s)+r+a*Math.sin(c+2*Math.PI+.5*o)]),h.push([Vc(n,s)+e+.98*i*Math.cos(c+o),Vc(n,s)+r+.98*a*Math.sin(c+o)]),h.push([Vc(n,s)+e+.9*i*Math.cos(c+.5*o),Vc(n,s)+r+.9*a*Math.sin(c+.5*o)])}return[h,l]}function Jc(t,e,r,i,a,n,o,s,l){const h=n+Vc(.1,l),c=[];c.push([Vc(s,l)+e+.9*i*Math.cos(h-t),Vc(s,l)+r+.9*a*Math.sin(h-t)]);for(let d=h;d<=o;d+=t)c.push([Vc(s,l)+e+i*Math.cos(d),Vc(s,l)+r+a*Math.sin(d)]);return c.push([e+i*Math.cos(o),r+a*Math.sin(o)]),c.push([e+i*Math.cos(o),r+a*Math.sin(o)]),Qc(c,0,l)}function td(t,e,r,i,a,n,o,s){const l=[],h=[s.maxRandomnessOffset||1,(s.maxRandomnessOffset||1)+.3];let c=[0,0];const d=s.disableMultiStroke?1:2,u=s.preserveVertices;for(let p=0;p<d;p++)0===p?l.push({op:"move",data:[o[0],o[1]]}):l.push({op:"move",data:[o[0]+(u?0:Vc(h[0],s)),o[1]+(u?0:Vc(h[0],s))]}),c=u?[a,n]:[a+Vc(h[p],s),n+Vc(h[p],s)],l.push({op:"bcurveTo",data:[t+Vc(h[p],s),e+Vc(h[p],s),r+Vc(h[p],s),i+Vc(h[p],s),c[0],c[1]]});return l}function ed(t){return[...t]}function rd(t,e=0){const r=t.length;if(r<3)throw new Error("A curve must have at least three points.");const i=[];if(3===r)i.push(ed(t[0]),ed(t[1]),ed(t[2]),ed(t[2]));else{const r=[];r.push(t[0],t[0]);for(let e=1;e<t.length;e++)r.push(t[e]),e===t.length-1&&r.push(t[e]);const a=[],n=1-e;i.push(ed(r[0]));for(let t=1;t+2<r.length;t++){const e=r[t];a[0]=[e[0],e[1]],a[1]=[e[0]+(n*r[t+1][0]-n*r[t-1][0])/6,e[1]+(n*r[t+1][1]-n*r[t-1][1])/6],a[2]=[r[t+1][0]+(n*r[t][0]-n*r[t+2][0])/6,r[t+1][1]+(n*r[t][1]-n*r[t+2][1])/6],a[3]=[r[t+1][0],r[t+1][1]],i.push(a[1],a[2],a[3])}}return i}function id(t,e){return Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2)}function ad(t,e,r){const i=id(e,r);if(0===i)return id(t,e);let a=((t[0]-e[0])*(r[0]-e[0])+(t[1]-e[1])*(r[1]-e[1]))/i;return a=Math.max(0,Math.min(1,a)),id(t,nd(e,r,a))}function nd(t,e,r){return[t[0]+(e[0]-t[0])*r,t[1]+(e[1]-t[1])*r]}function od(t,e,r,i){const a=i||[];if(function(t,e){const r=t[e+0],i=t[e+1],a=t[e+2],n=t[e+3];let o=3*i[0]-2*r[0]-n[0];o*=o;let s=3*i[1]-2*r[1]-n[1];s*=s;let l=3*a[0]-2*n[0]-r[0];l*=l;let h=3*a[1]-2*n[1]-r[1];return h*=h,o<l&&(o=l),s<h&&(s=h),o+s}(t,e)<r){const r=t[e+0];a.length?(n=a[a.length-1],o=r,Math.sqrt(id(n,o))>1&&a.push(r)):a.push(r),a.push(t[e+3])}else{const i=.5,n=t[e+0],o=t[e+1],s=t[e+2],l=t[e+3],h=nd(n,o,i),c=nd(o,s,i),d=nd(s,l,i),u=nd(h,c,i),p=nd(c,d,i),g=nd(u,p,i);od([n,h,u,g],0,r,a),od([g,p,d,l],0,r,a)}var n,o;return a}function sd(t,e){return ld(t,0,t.length,e)}function ld(t,e,r,i,a){const n=a||[],o=t[e],s=t[r-1];let l=0,h=1;for(let c=e+1;c<r-1;++c){const e=ad(t[c],o,s);e>l&&(l=e,h=c)}return Math.sqrt(l)>i?(ld(t,e,h+1,i,n),ld(t,h,r,i,n)):(n.length||n.push(o),n.push(s)),n}function hd(t,e=.15,r){const i=[],a=(t.length-1)/3;for(let n=0;n<a;n++)od(t,3*n,e,i);return r&&r>0?ld(i,0,i.length,r):i}const cd="none";class dd{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,e,r){return{shape:t,sets:e||[],options:r||this.defaultOptions}}line(t,e,r,i,a){const n=this._o(a);return this._d("line",[Ic(t,e,r,i,n)],n)}rectangle(t,e,r,i,a){const n=this._o(a),o=[],s=function(t,e,r,i,a){return Oc([[t,e],[t+r,e],[t+r,e+i],[t,e+i]],!0,a)}(t,e,r,i,n);if(n.fill){const a=[[t,e],[t+r,e],[t+r,e+i],[t,e+i]];"solid"===n.fillStyle?o.push(Nc([a],n)):o.push(jc([a],n))}return n.stroke!==cd&&o.push(s),this._d("rectangle",o,n)}ellipse(t,e,r,i,a){const n=this._o(a),o=[],s=Rc(r,i,n),l=qc(t,e,n,s);if(n.fill)if("solid"===n.fillStyle){const r=qc(t,e,n,s).opset;r.type="fillPath",o.push(r)}else o.push(jc([l.estimatedPoints],n));return n.stroke!==cd&&o.push(l.opset),this._d("ellipse",o,n)}circle(t,e,r,i){const a=this.ellipse(t,e,r,r,i);return a.shape="circle",a}linearPath(t,e){const r=this._o(e);return this._d("linearPath",[Oc(t,!1,r)],r)}arc(t,e,r,i,a,n,o=!1,s){const l=this._o(s),h=[],c=zc(t,e,r,i,a,n,o,!0,l);if(o&&l.fill)if("solid"===l.fillStyle){const o=Object.assign({},l);o.disableMultiStroke=!0;const s=zc(t,e,r,i,a,n,!0,!1,o);s.type="fillPath",h.push(s)}else h.push(function(t,e,r,i,a,n,o){const s=t,l=e;let h=Math.abs(r/2),c=Math.abs(i/2);h+=Vc(.01*h,o),c+=Vc(.01*c,o);let d=a,u=n;for(;d<0;)d+=2*Math.PI,u+=2*Math.PI;u-d>2*Math.PI&&(d=0,u=2*Math.PI);const p=(u-d)/o.curveStepCount,g=[];for(let f=d;f<=u;f+=p)g.push([s+h*Math.cos(f),l+c*Math.sin(f)]);return g.push([s+h*Math.cos(u),l+c*Math.sin(u)]),g.push([s,l]),jc([g],o)}(t,e,r,i,a,n,l));return l.stroke!==cd&&h.push(c),this._d("arc",h,l)}curve(t,e){const r=this._o(e),i=[],a=Pc(t,r);if(r.fill&&r.fill!==cd)if("solid"===r.fillStyle){const e=Pc(t,Object.assign(Object.assign({},r),{disableMultiStroke:!0,roughness:r.roughness?r.roughness+r.fillShapeRoughnessGain:0}));i.push({type:"fillPath",ops:this._mergedShape(e.ops)})}else{const e=[],a=t;if(a.length){const t="number"==typeof a[0][0]?[a]:a;for(const i of t)i.length<3?e.push(...i):3===i.length?e.push(...hd(rd([i[0],i[0],i[1],i[2]]),10,(1+r.roughness)/2)):e.push(...hd(rd(i),10,(1+r.roughness)/2))}e.length&&i.push(jc([e],r))}return r.stroke!==cd&&i.push(a),this._d("curve",i,r)}polygon(t,e){const r=this._o(e),i=[],a=Oc(t,!0,r);return r.fill&&("solid"===r.fillStyle?i.push(Nc([t],r)):i.push(jc([t],r))),r.stroke!==cd&&i.push(a),this._d("polygon",i,r)}path(t,e){const r=this._o(e),i=[];if(!t)return this._d("path",i,r);t=(t||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const a=r.fill&&"transparent"!==r.fill&&r.fill!==cd,n=r.stroke!==cd,o=!!(r.simplification&&r.simplification<1),s=function(t,e,r){const i=Ac(Fc(Mc(t))),a=[];let n=[],o=[0,0],s=[];const l=()=>{s.length>=4&&n.push(...hd(s,1)),s=[]},h=()=>{l(),n.length&&(a.push(n),n=[])};for(const{key:d,data:u}of i)switch(d){case"M":h(),o=[u[0],u[1]],n.push(o);break;case"L":l(),n.push([u[0],u[1]]);break;case"C":if(!s.length){const t=n.length?n[n.length-1]:o;s.push([t[0],t[1]])}s.push([u[0],u[1]]),s.push([u[2],u[3]]),s.push([u[4],u[5]]);break;case"Z":l(),n.push([o[0],o[1]])}if(h(),!r)return a;const c=[];for(const d of a){const t=sd(d,r);t.length&&c.push(t)}return c}(t,0,o?4-4*(r.simplification||1):(1+r.roughness)/2),l=Wc(t,r);if(a)if("solid"===r.fillStyle)if(1===s.length){const e=Wc(t,Object.assign(Object.assign({},r),{disableMultiStroke:!0,roughness:r.roughness?r.roughness+r.fillShapeRoughnessGain:0}));i.push({type:"fillPath",ops:this._mergedShape(e.ops)})}else i.push(Nc(s,r));else i.push(jc(s,r));return n&&(o?s.forEach((t=>{i.push(Oc(t,!1,r))})):i.push(l)),this._d("path",i,r)}opsToPath(t,e){let r="";for(const i of t.ops){const t="number"==typeof e&&e>=0?i.data.map((t=>+t.toFixed(e))):i.data;switch(i.op){case"move":r+=`M${t[0]} ${t[1]} `;break;case"bcurveTo":r+=`C${t[0]} ${t[1]}, ${t[2]} ${t[3]}, ${t[4]} ${t[5]} `;break;case"lineTo":r+=`L${t[0]} ${t[1]} `}}return r.trim()}toPaths(t){const e=t.sets||[],r=t.options||this.defaultOptions,i=[];for(const a of e){let t=null;switch(a.type){case"path":t={d:this.opsToPath(a),stroke:r.stroke,strokeWidth:r.strokeWidth,fill:cd};break;case"fillPath":t={d:this.opsToPath(a),stroke:cd,strokeWidth:0,fill:r.fill||cd};break;case"fillSketch":t=this.fillSketch(a,r)}t&&i.push(t)}return i}fillSketch(t,e){let r=e.fillWeight;return r<0&&(r=e.strokeWidth/2),{d:this.opsToPath(t),stroke:e.fill||cd,strokeWidth:r,fill:cd}}_mergedShape(t){return t.filter(((t,e)=>0===e||"move"!==t.op))}}const ud="http://www.w3.org/2000/svg";class pd{constructor(t,e){this.svg=t,this.gen=new dd(e)}draw(t){const e=t.sets||[],r=t.options||this.getDefaultOptions(),i=this.svg.ownerDocument||window.document,a=i.createElementNS(ud,"g"),n=t.options.fixedDecimalPlaceDigits;for(const o of e){let e=null;switch(o.type){case"path":e=i.createElementNS(ud,"path"),e.setAttribute("d",this.opsToPath(o,n)),e.setAttribute("stroke",r.stroke),e.setAttribute("stroke-width",r.strokeWidth+""),e.setAttribute("fill","none"),r.strokeLineDash&&e.setAttribute("stroke-dasharray",r.strokeLineDash.join(" ").trim()),r.strokeLineDashOffset&&e.setAttribute("stroke-dashoffset",`${r.strokeLineDashOffset}`);break;case"fillPath":e=i.createElementNS(ud,"path"),e.setAttribute("d",this.opsToPath(o,n)),e.setAttribute("stroke","none"),e.setAttribute("stroke-width","0"),e.setAttribute("fill",r.fill||""),"curve"!==t.shape&&"polygon"!==t.shape||e.setAttribute("fill-rule","evenodd");break;case"fillSketch":e=this.fillSketch(i,o,r)}e&&a.appendChild(e)}return a}fillSketch(t,e,r){let i=r.fillWeight;i<0&&(i=r.strokeWidth/2);const a=t.createElementNS(ud,"path");return a.setAttribute("d",this.opsToPath(e,r.fixedDecimalPlaceDigits)),a.setAttribute("stroke",r.fill||""),a.setAttribute("stroke-width",i+""),a.setAttribute("fill","none"),r.fillLineDash&&a.setAttribute("stroke-dasharray",r.fillLineDash.join(" ").trim()),r.fillLineDashOffset&&a.setAttribute("stroke-dashoffset",`${r.fillLineDashOffset}`),a}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(t,e){return this.gen.opsToPath(t,e)}line(t,e,r,i,a){const n=this.gen.line(t,e,r,i,a);return this.draw(n)}rectangle(t,e,r,i,a){const n=this.gen.rectangle(t,e,r,i,a);return this.draw(n)}ellipse(t,e,r,i,a){const n=this.gen.ellipse(t,e,r,i,a);return this.draw(n)}circle(t,e,r,i){const a=this.gen.circle(t,e,r,i);return this.draw(a)}linearPath(t,e){const r=this.gen.linearPath(t,e);return this.draw(r)}polygon(t,e){const r=this.gen.polygon(t,e);return this.draw(r)}arc(t,e,r,i,a,n,o=!1,s){const l=this.gen.arc(t,e,r,i,a,n,o,s);return this.draw(l)}curve(t,e){const r=this.gen.curve(t,e);return this.draw(r)}path(t,e){const r=this.gen.path(t,e);return this.draw(r)}}var gd=(t,e)=>new pd(t,e),fd=Cr(((t,e)=>{var r,i,a=t.x,n=t.y,o=e.x-a,s=e.y-n,l=t.width/2,h=t.height/2;return Math.abs(s)*l>Math.abs(o)*h?(s<0&&(h=-h),r=0===s?0:h*o/s,i=h):(o<0&&(l=-l),r=l,i=0===o?0:l*s/o),{x:a+r,y:n+i}}),"intersectRect");function yd(t,e){e&&t.attr("style",e)}async function md(t){const e=Z(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),r=e.append("xhtml:div");let i=t.label;t.label&&ji(t.label)&&(i=await Ui(t.label.replace(Yi.lineBreakRegex,"\n"),fa()));const a=t.isNode?"nodeLabel":"edgeLabel";return r.html('<span class="'+a+'" '+(t.labelStyle?'style="'+t.labelStyle+'"':"")+">"+i+"</span>"),yd(r,t.labelStyle),r.style("display","inline-block"),r.style("padding-right","1px"),r.style("white-space","nowrap"),r.attr("xmlns","http://www.w3.org/1999/xhtml"),e.node()}Cr(yd,"applyStyle"),Cr(md,"addHtmlLabel");var xd=Cr((async(t,e,r,i)=>{let a=t||"";if("object"==typeof a&&(a=a[0]),Di(fa().flowchart.htmlLabels)){a=a.replace(/\\n|\n/g,"<br />"),Sr.info("vertexText"+a);const t={isNode:i,label:Wl(a).replace(/fa[blrs]?:fa-[\w-]+/g,(t=>`<i class='${t.replace(":"," ")}'></i>`)),labelStyle:e?e.replace("fill:","color:"):e};return await md(t)}{const t=document.createElementNS("http://www.w3.org/2000/svg","text");t.setAttribute("style",e.replace("color:","fill:"));let i=[];i="string"==typeof a?a.split(/\\n|\n|<br\s*\/?>/gi):Array.isArray(a)?a:[];for(const e of i){const i=document.createElementNS("http://www.w3.org/2000/svg","tspan");i.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),i.setAttribute("dy","1em"),i.setAttribute("x","0"),r?i.setAttribute("class","title-row"):i.setAttribute("class","row"),i.textContent=e.trim(),t.appendChild(i)}return t}}),"createLabel"),bd=Cr(((t,e,r,i,a)=>["M",t+a,e,"H",t+r-a,"A",a,a,0,0,1,t+r,e+a,"V",e+i-a,"A",a,a,0,0,1,t+r-a,e+i,"H",t+a,"A",a,a,0,0,1,t,e+i-a,"V",e+a,"A",a,a,0,0,1,t+a,e,"Z"].join(" ")),"createRoundedRectPathD"),Cd=Cr((t=>{const{handDrawnSeed:e}=fa();return{fill:t,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:t,seed:e}}),"solidStateFill"),kd=Cr((t=>{const e=wd([...t.cssCompiledStyles||[],...t.cssStyles||[]]);return{stylesMap:e,stylesArray:[...e]}}),"compileStyles"),wd=Cr((t=>{const e=new Map;return t.forEach((t=>{const[r,i]=t.split(":");e.set(r.trim(),null==i?void 0:i.trim())})),e}),"styles2Map"),Sd=Cr((t=>{const{stylesArray:e}=kd(t),r=[],i=[],a=[],n=[];return e.forEach((t=>{const e=t[0];"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"===e?r.push(t.join(":")+" !important"):(i.push(t.join(":")+" !important"),e.includes("stroke")&&a.push(t.join(":")+" !important"),"fill"===e&&n.push(t.join(":")+" !important"))})),{labelStyles:r.join(";"),nodeStyles:i.join(";"),stylesArray:e,borderStyles:a,backgroundStyles:n}}),"styles2String"),Td=Cr(((t,e)=>{var r;const{themeVariables:i,handDrawnSeed:a}=fa(),{nodeBorder:n,mainBkg:o}=i,{stylesMap:s}=kd(t);return Object.assign({roughness:.7,fill:s.get("fill")||o,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:s.get("stroke")||n,seed:a,strokeWidth:(null==(r=s.get("stroke-width"))?void 0:r.replace("px",""))||1.3,fillLineDash:[0,0]},e)}),"userNodeOverrides"),vd=Cr((async(t,e)=>{Sr.info("Creating subgraph rect for ",e.id,e);const r=fa(),{themeVariables:i,handDrawnSeed:a}=r,{clusterBkg:n,clusterBorder:o}=i,{labelStyles:s,nodeStyles:l,borderStyles:h,backgroundStyles:c}=Sd(e),d=t.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.id).attr("data-look",e.look),u=Di(r.flowchart.htmlLabels),p=d.insert("g").attr("class","cluster-label "),g=await gc(p,e.label,{style:e.labelStyle,useHtmlLabels:u,isNode:!0});let f=g.getBBox();if(Di(r.flowchart.htmlLabels)){const t=g.children[0],e=Z(g);f=t.getBoundingClientRect(),e.attr("width",f.width),e.attr("height",f.height)}const y=e.width<=f.width+e.padding?f.width+e.padding:e.width;e.width<=f.width+e.padding?e.diff=(y-e.width)/2-e.padding:e.diff=-e.padding;const m=e.height,x=e.x-y/2,b=e.y-m/2;let C;if(Sr.trace("Data ",e,JSON.stringify(e)),"handDrawn"===e.look){const t=gd(d),r=Td(e,{roughness:.7,fill:n,stroke:o,fillWeight:3,seed:a}),i=t.path(bd(x,b,y,m,0),r);C=d.insert((()=>(Sr.debug("Rough node insert CXC",i),i)),":first-child"),C.select("path:nth-child(2)").attr("style",h.join(";")),C.select("path").attr("style",c.join(";").replace("fill","stroke"))}else C=d.insert("rect",":first-child"),C.attr("style",l).attr("rx",e.rx).attr("ry",e.ry).attr("x",x).attr("y",b).attr("width",y).attr("height",m);const{subGraphTitleTopMargin:k}=Vs(r);if(p.attr("transform",`translate(${e.x-f.width/2}, ${e.y-e.height/2+k})`),s){const t=p.select("span");t&&t.attr("style",s)}const w=C.node().getBBox();return e.offsetX=0,e.width=w.width,e.height=w.height,e.offsetY=f.height-e.padding/2,e.intersect=function(t){return fd(e,t)},{cluster:d,labelBBox:f}}),"rect"),Bd=Cr(((t,e)=>{const r=t.insert("g").attr("class","note-cluster").attr("id",e.id),i=r.insert("rect",":first-child"),a=0*e.padding,n=a/2;i.attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-e.width/2-n).attr("y",e.y-e.height/2-n).attr("width",e.width+a).attr("height",e.height+a).attr("fill","none");const o=i.node().getBBox();return e.width=o.width,e.height=o.height,e.intersect=function(t){return fd(e,t)},{cluster:r,labelBBox:{width:0,height:0}}}),"noteGroup"),_d={rect:vd,squareRect:vd,roundedWithTitle:Cr((async(t,e)=>{const r=fa(),{themeVariables:i,handDrawnSeed:a}=r,{altBackground:n,compositeBackground:o,compositeTitleBackground:s,nodeBorder:l}=i,h=t.insert("g").attr("class",e.cssClasses).attr("id",e.id).attr("data-id",e.id).attr("data-look",e.look),c=h.insert("g",":first-child"),d=h.insert("g").attr("class","cluster-label");let u=h.append("rect");const p=d.node().appendChild(await xd(e.label,e.labelStyle,void 0,!0));let g=p.getBBox();if(Di(r.flowchart.htmlLabels)){const t=p.children[0],e=Z(p);g=t.getBoundingClientRect(),e.attr("width",g.width),e.attr("height",g.height)}const f=0*e.padding,y=f/2,m=(e.width<=g.width+e.padding?g.width+e.padding:e.width)+f;e.width<=g.width+e.padding?e.diff=(m-e.width)/2-e.padding:e.diff=-e.padding;const x=e.height+f,b=e.height+f-g.height-6,C=e.x-m/2,k=e.y-x/2;e.width=m;const w=e.y-e.height/2-y+g.height+2;let S;if("handDrawn"===e.look){const t=e.cssClasses.includes("statediagram-cluster-alt"),r=gd(h),i=e.rx||e.ry?r.path(bd(C,k,m,x,10),{roughness:.7,fill:s,fillStyle:"solid",stroke:l,seed:a}):r.rectangle(C,k,m,x,{seed:a});S=h.insert((()=>i),":first-child");const c=r.rectangle(C,w,m,b,{fill:t?n:o,fillStyle:t?"hachure":"solid",stroke:l,seed:a});S=h.insert((()=>i),":first-child"),u=h.insert((()=>c))}else{S=c.insert("rect",":first-child");const t="outer";S.attr("class",t).attr("x",C).attr("y",k).attr("width",m).attr("height",x).attr("data-look",e.look),u.attr("class","inner").attr("x",C).attr("y",w).attr("width",m).attr("height",b)}d.attr("transform",`translate(${e.x-g.width/2}, ${k+1-(Di(r.flowchart.htmlLabels)?0:3)})`);const T=S.node().getBBox();return e.height=T.height,e.offsetX=0,e.offsetY=g.height-e.padding/2,e.labelBBox=g,e.intersect=function(t){return fd(e,t)},{cluster:h,labelBBox:g}}),"roundedWithTitle"),noteGroup:Bd,divider:Cr(((t,e)=>{const r=fa(),{themeVariables:i,handDrawnSeed:a}=r,{nodeBorder:n}=i,o=t.insert("g").attr("class",e.cssClasses).attr("id",e.id).attr("data-look",e.look),s=o.insert("g",":first-child"),l=0*e.padding,h=e.width+l;e.diff=-e.padding;const c=e.height+l,d=e.x-h/2,u=e.y-c/2;let p;if(e.width=h,"handDrawn"===e.look){const t=gd(o).rectangle(d,u,h,c,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:n,seed:a});p=o.insert((()=>t),":first-child")}else{p=s.insert("rect",":first-child");const t="divider";p.attr("class",t).attr("x",d).attr("y",u).attr("width",h).attr("height",c).attr("data-look",e.look)}const g=p.node().getBBox();return e.height=g.height,e.offsetX=0,e.offsetY=0,e.intersect=function(t){return fd(e,t)},{cluster:o,labelBBox:{}}}),"divider")},Ld=new Map,Md=Cr((async(t,e)=>{const r=e.shape||"rect",i=await _d[r](t,e);return Ld.set(e.id,i),i}),"insertCluster"),Fd=Cr((()=>{Ld=new Map}),"clear"),Ad=Cr(((t,e,r,i,a)=>{e.arrowTypeStart&&Ed(t,"start",e.arrowTypeStart,r,i,a),e.arrowTypeEnd&&Ed(t,"end",e.arrowTypeEnd,r,i,a)}),"addEdgeMarkers"),$d={arrow_cross:"cross",arrow_point:"point",arrow_barb:"barb",arrow_circle:"circle",aggregation:"aggregation",extension:"extension",composition:"composition",dependency:"dependency",lollipop:"lollipop"},Ed=Cr(((t,e,r,i,a,n)=>{const o=$d[r];if(!o)return void Sr.warn(`Unknown arrow type: ${r}`);const s="start"===e?"Start":"End";t.attr(`marker-${e}`,`url(${i}#${a}_${n}-${o}${s})`)}),"addEdgeMarker"),Dd=new Map,Id=new Map,Od=Cr((()=>{Dd.clear(),Id.clear()}),"clear"),Pd=Cr((t=>t?t.reduce(((t,e)=>t+";"+e),""):""),"getLabelStyles"),Rd=Cr((async(t,e)=>{let r=Di(fa().flowchart.htmlLabels);const i=await gc(t,e.label,{style:Pd(e.labelStyle),useHtmlLabels:r,addSvgBackground:!0,isNode:!1});Sr.info("abc82",e,e.labelType);const a=t.insert("g").attr("class","edgeLabel"),n=a.insert("g").attr("class","label");n.node().appendChild(i);let o,s=i.getBBox();if(r){const t=i.children[0],e=Z(i);s=t.getBoundingClientRect(),e.attr("width",s.width),e.attr("height",s.height)}if(n.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"),Dd.set(e.id,a),e.width=s.width,e.height=s.height,e.startLabelLeft){const r=await xd(e.startLabelLeft,Pd(e.labelStyle)),i=t.insert("g").attr("class","edgeTerminals"),a=i.insert("g").attr("class","inner");o=a.node().appendChild(r);const n=r.getBBox();a.attr("transform","translate("+-n.width/2+", "+-n.height/2+")"),Id.get(e.id)||Id.set(e.id,{}),Id.get(e.id).startLeft=i,qd(o,e.startLabelLeft)}if(e.startLabelRight){const r=await xd(e.startLabelRight,Pd(e.labelStyle)),i=t.insert("g").attr("class","edgeTerminals"),a=i.insert("g").attr("class","inner");o=i.node().appendChild(r),a.node().appendChild(r);const n=r.getBBox();a.attr("transform","translate("+-n.width/2+", "+-n.height/2+")"),Id.get(e.id)||Id.set(e.id,{}),Id.get(e.id).startRight=i,qd(o,e.startLabelRight)}if(e.endLabelLeft){const r=await xd(e.endLabelLeft,Pd(e.labelStyle)),i=t.insert("g").attr("class","edgeTerminals"),a=i.insert("g").attr("class","inner");o=a.node().appendChild(r);const n=r.getBBox();a.attr("transform","translate("+-n.width/2+", "+-n.height/2+")"),i.node().appendChild(r),Id.get(e.id)||Id.set(e.id,{}),Id.get(e.id).endLeft=i,qd(o,e.endLabelLeft)}if(e.endLabelRight){const r=await xd(e.endLabelRight,Pd(e.labelStyle)),i=t.insert("g").attr("class","edgeTerminals"),a=i.insert("g").attr("class","inner");o=a.node().appendChild(r);const n=r.getBBox();a.attr("transform","translate("+-n.width/2+", "+-n.height/2+")"),i.node().appendChild(r),Id.get(e.id)||Id.set(e.id,{}),Id.get(e.id).endRight=i,qd(o,e.endLabelRight)}return i}),"insertEdgeLabel");function qd(t,e){fa().flowchart.htmlLabels&&t&&(t.style.width=9*e.length+"px",t.style.height="12px")}Cr(qd,"setTerminalWidth");var zd=Cr(((t,e)=>{Sr.debug("Moving label abc88 ",t.id,t.label,Dd.get(t.id),e);let r=e.updatedPath?e.updatedPath:e.originalPath;const i=fa(),{subGraphTitleTotalMargin:a}=Vs(i);if(t.label){const i=Dd.get(t.id);let n=t.x,o=t.y;if(r){const i=ql.calcLabelPosition(r);Sr.debug("Moving label "+t.label+" from (",n,",",o,") to (",i.x,",",i.y,") abc88"),e.updatedPath&&(n=i.x,o=i.y)}i.attr("transform",`translate(${n}, ${o+a/2})`)}if(t.startLabelLeft){const e=Id.get(t.id).startLeft;let i=t.x,a=t.y;if(r){const e=ql.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_left",r);i=e.x,a=e.y}e.attr("transform",`translate(${i}, ${a})`)}if(t.startLabelRight){const e=Id.get(t.id).startRight;let i=t.x,a=t.y;if(r){const e=ql.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_right",r);i=e.x,a=e.y}e.attr("transform",`translate(${i}, ${a})`)}if(t.endLabelLeft){const e=Id.get(t.id).endLeft;let i=t.x,a=t.y;if(r){const e=ql.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_left",r);i=e.x,a=e.y}e.attr("transform",`translate(${i}, ${a})`)}if(t.endLabelRight){const e=Id.get(t.id).endRight;let i=t.x,a=t.y;if(r){const e=ql.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_right",r);i=e.x,a=e.y}e.attr("transform",`translate(${i}, ${a})`)}}),"positionEdgeLabel"),Wd=Cr(((t,e)=>{const r=t.x,i=t.y,a=Math.abs(e.x-r),n=Math.abs(e.y-i),o=t.width/2,s=t.height/2;return a>=o||n>=s}),"outsideNode"),Nd=Cr(((t,e,r)=>{Sr.debug(`intersection calc abc89:\n outsidePoint: ${JSON.stringify(e)}\n insidePoint : ${JSON.stringify(r)}\n node : x:${t.x} y:${t.y} w:${t.width} h:${t.height}`);const i=t.x,a=t.y,n=Math.abs(i-r.x),o=t.width/2;let s=r.x<e.x?o-n:o+n;const l=t.height/2,h=Math.abs(e.y-r.y),c=Math.abs(e.x-r.x);if(Math.abs(a-e.y)*o>Math.abs(i-e.x)*l){let t=r.y<e.y?e.y-l-a:a-l-e.y;s=c*t/h;const i={x:r.x<e.x?r.x+s:r.x-c+s,y:r.y<e.y?r.y+h-t:r.y-h+t};return 0===s&&(i.x=e.x,i.y=e.y),0===c&&(i.x=e.x),0===h&&(i.y=e.y),Sr.debug(`abc89 top/bottom calc, Q ${h}, q ${t}, R ${c}, r ${s}`,i),i}{s=r.x<e.x?e.x-o-i:i-o-e.x;let t=h*s/c,a=r.x<e.x?r.x+c-s:r.x-c+s,n=r.y<e.y?r.y+t:r.y-t;return Sr.debug(`sides calc abc89, Q ${h}, q ${t}, R ${c}, r ${s}`,{_x:a,_y:n}),0===s&&(a=e.x,n=e.y),0===c&&(a=e.x),0===h&&(n=e.y),{x:a,y:n}}}),"intersection"),jd=Cr(((t,e)=>{Sr.warn("abc88 cutPathAtIntersect",t,e);let r=[],i=t[0],a=!1;return t.forEach((t=>{if(Sr.info("abc88 checking point",t,e),Wd(e,t)||a)Sr.warn("abc88 outside",t,i),i=t,a||r.push(t);else{const n=Nd(e,i,t);Sr.debug("abc88 inside",t,i,n),Sr.debug("abc88 intersection",n,e);let o=!1;r.forEach((t=>{o=o||t.x===n.x&&t.y===n.y})),r.some((t=>t.x===n.x&&t.y===n.y))?Sr.warn("abc88 no intersect",n,r):r.push(n),a=!0}})),Sr.debug("returning points",r),r}),"cutPathAtIntersect");function Hd(t){const e=[],r=[];for(let i=1;i<t.length-1;i++){const a=t[i-1],n=t[i],o=t[i+1];(a.x===n.x&&n.y===o.y&&Math.abs(n.x-o.x)>5&&Math.abs(n.y-a.y)>5||a.y===n.y&&n.x===o.x&&Math.abs(n.x-a.x)>5&&Math.abs(n.y-o.y)>5)&&(e.push(n),r.push(i))}return{cornerPoints:e,cornerPointPositions:r}}Cr(Hd,"extractCornerPoints");var Ud=Cr((function(t,e,r){const i=e.x-t.x,a=e.y-t.y,n=r/Math.sqrt(i*i+a*a);return{x:e.x-n*i,y:e.y-n*a}}),"findAdjacentPoint"),Yd=Cr((function(t){const{cornerPointPositions:e}=Hd(t),r=[];for(let i=0;i<t.length;i++)if(e.includes(i)){const e=t[i-1],a=t[i+1],n=t[i],o=Ud(e,n,5),s=Ud(a,n,5),l=s.x-o.x,h=s.y-o.y;r.push(o);const c=2*Math.sqrt(2);let d={x:n.x,y:n.y};if(Math.abs(a.x-e.x)>10&&Math.abs(a.y-e.y)>=10){Sr.debug("Corner point fixing",Math.abs(a.x-e.x),Math.abs(a.y-e.y));const t=5;d=n.x===o.x?{x:l<0?o.x-t+c:o.x+t-c,y:h<0?o.y-c:o.y+c}:{x:l<0?o.x-c:o.x+c,y:h<0?o.y-t+c:o.y+t-c}}else Sr.debug("Corner point skipping fixing",Math.abs(a.x-e.x),Math.abs(a.y-e.y));r.push(d,s)}else r.push(t[i]);return r}),"fixCorners"),Vd=Cr((function(t,e,r,i,a,n,o){const{handDrawnSeed:s}=fa();let l=e.points,h=!1;const c=a;var d=n;d.intersect&&c.intersect&&(l=l.slice(1,e.points.length-1),l.unshift(c.intersect(l[0])),Sr.debug("Last point APA12",e.start,"--\x3e",e.end,l[l.length-1],d,d.intersect(l[l.length-1])),l.push(d.intersect(l[l.length-1]))),e.toCluster&&(Sr.info("to cluster abc88",r.get(e.toCluster)),l=jd(e.points,r.get(e.toCluster).node),h=!0),e.fromCluster&&(Sr.debug("from cluster abc88",r.get(e.fromCluster),JSON.stringify(l,null,2)),l=jd(l.reverse(),r.get(e.fromCluster).node).reverse(),h=!0);let u=l.filter((t=>!Number.isNaN(t.y)));u=Yd(u);let p=u[u.length-1];if(u.length>1){p=u[u.length-1];const t=u[u.length-2],e=(p.x-t.x)/2,r=(p.y-t.y)/2,i={x:t.x+e,y:t.y+r};u.splice(-1,0,i)}let g=X;e.curve&&(g=e.curve);const{x:f,y:y}=Qs(e),m=gt().x(f).y(y).curve(g);let x,b;switch(e.thickness){case"normal":default:x="edge-thickness-normal";break;case"thick":x="edge-thickness-thick";break;case"invisible":x="edge-thickness-invisible"}switch(e.pattern){case"solid":default:x+=" edge-pattern-solid";break;case"dotted":x+=" edge-pattern-dotted";break;case"dashed":x+=" edge-pattern-dashed"}let C=m(u);const k=Array.isArray(e.style)?e.style:[e.style];if("handDrawn"===e.look){const r=gd(t);Object.assign([],u);const i=r.path(C,{roughness:.3,seed:s});x+=" transition",b=Z(i).select("path").attr("id",e.id).attr("class"," "+x+(e.classes?" "+e.classes:"")).attr("style",k?k.reduce(((t,e)=>t+";"+e),""):"");let a=b.attr("d");b.attr("d",a),t.node().appendChild(b.node())}else b=t.append("path").attr("d",C).attr("id",e.id).attr("class"," "+x+(e.classes?" "+e.classes:"")).attr("style",k?k.reduce(((t,e)=>t+";"+e),""):"");let w="";(fa().flowchart.arrowMarkerAbsolute||fa().state.arrowMarkerAbsolute)&&(w=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,w=w.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),Sr.info("arrowTypeStart",e.arrowTypeStart),Sr.info("arrowTypeEnd",e.arrowTypeEnd),Ad(b,e,w,o,i);let S={};return h&&(S.updatedPath=l),S.originalPath=e.points,S}),"insertEdge"),Gd=Cr(((t,e,r,i)=>{e.forEach((e=>{Zd[e](t,r,i)}))}),"insertMarkers"),Zd={extension:Cr(((t,e,r)=>{Sr.trace("Making markers for ",r),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionStart").attr("class","marker extension "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionEnd").attr("class","marker extension "+e).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")}),"extension"),composition:Cr(((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionStart").attr("class","marker composition "+e).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"),t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionEnd").attr("class","marker composition "+e).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")}),"composition"),aggregation:Cr(((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationStart").attr("class","marker aggregation "+e).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"),t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationEnd").attr("class","marker aggregation "+e).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")}),"aggregation"),dependency:Cr(((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyStart").attr("class","marker dependency "+e).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"),t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyEnd").attr("class","marker dependency "+e).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")}),"dependency"),lollipop:Cr(((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopStart").attr("class","marker lollipop "+e).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopEnd").attr("class","marker lollipop "+e).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6)}),"lollipop"),point:Cr(((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-pointEnd").attr("class","marker "+e).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"),t.append("marker").attr("id",r+"_"+e+"-pointStart").attr("class","marker "+e).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")}),"point"),circle:Cr(((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-circleEnd").attr("class","marker "+e).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"),t.append("marker").attr("id",r+"_"+e+"-circleStart").attr("class","marker "+e).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")}),"circle"),cross:Cr(((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-crossEnd").attr("class","marker cross "+e).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"),t.append("marker").attr("id",r+"_"+e+"-crossStart").attr("class","marker cross "+e).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")}),"cross"),barb:Cr(((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-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")},Xd=Gd,Qd=Cr((async(t,e,r)=>{let i;const a=e.useHtmlLabels||Di(fa().flowchart.htmlLabels);i=r||"node default";const n=t.insert("g").attr("class",i).attr("id",e.domId||e.id),o=n.insert("g").attr("class","label").attr("style",e.labelStyle);let s,l;s=void 0===e.label?"":"string"==typeof e.label?e.label:e.label[0],l=await gc(o,_i(Wl(s),fa()),{useHtmlLabels:a,width:e.width||fa().flowchart.wrappingWidth,cssClasses:"markdown-node-label",style:e.labelStyle,addSvgBackground:!!e.icon||!!e.img});let h=l.getBBox();const c=e.padding/2;if(Di(fa().flowchart.htmlLabels)){const t=l.children[0],e=Z(l),r=t.getElementsByTagName("img");if(r){const t=""===s.replace(/<img[^>]*>/g,"").trim();await Promise.all([...r].map((e=>new Promise((r=>{function i(){if(e.style.display="flex",e.style.flexDirection="column",t){const t=fa().fontSize?fa().fontSize:window.getComputedStyle(document.body).fontSize,r=5,i=parseInt(t,10)*r+"px";e.style.minWidth=i,e.style.maxWidth=i}else e.style.width="100%";r(e)}Cr(i,"setupImage"),setTimeout((()=>{e.complete&&i()})),e.addEventListener("error",i),e.addEventListener("load",i)})))))}h=t.getBoundingClientRect(),e.attr("width",h.width),e.attr("height",h.height)}return a?o.attr("transform","translate("+-h.width/2+", "+-h.height/2+")"):o.attr("transform","translate(0, "+-h.height/2+")"),e.centerLabel&&o.attr("transform","translate("+-h.width/2+", "+-h.height/2+")"),o.insert("rect",":first-child"),{shapeSvg:n,bbox:h,halfPadding:c,label:o}}),"labelHelper"),Kd=Cr(((t,e)=>{const r=e.node().getBBox();t.width=r.width,t.height=r.height}),"updateNodeBounds"),Jd=Cr(((t,e)=>("handDrawn"===t.look?"rough-node":"node")+" "+t.cssClasses+" "+(e||"")),"getNodeClasses");function tu(t){const e=t.map(((t,e)=>`${0===e?"M":"L"}${t.x},${t.y}`));return e.push("Z"),e.join(" ")}function eu(t,e,r,i,a,n){const o=[],s=r-t,l=i-e,h=s/n,c=2*Math.PI/h,d=e+l/2;for(let u=0;u<=50;u++){const e=t+u/50*s,r=d+a*Math.sin(c*(e-t));o.push({x:e,y:r})}return o}function ru(t,e,r,i,a,n){const o=[],s=a*Math.PI/180,l=(n*Math.PI/180-s)/(i-1);for(let h=0;h<i;h++){const i=s+h*l,a=t+r*Math.cos(i),n=e+r*Math.sin(i);o.push({x:-a,y:-n})}return o}function iu(t,e){return t.intersect(e)}Cr(tu,"createPathFromPoints"),Cr(eu,"generateFullSineWavePoints"),Cr(ru,"generateCirclePoints"),Cr(iu,"intersectNode");var au=iu;function nu(t,e,r,i){var a=t.x,n=t.y,o=a-i.x,s=n-i.y,l=Math.sqrt(e*e*s*s+r*r*o*o),h=Math.abs(e*r*o/l);i.x<a&&(h=-h);var c=Math.abs(e*r*s/l);return i.y<n&&(c=-c),{x:a+h,y:n+c}}Cr(nu,"intersectEllipse");var ou=nu;function su(t,e,r){return ou(t,e,e,r)}Cr(su,"intersectCircle");var lu=su;function hu(t,e,r,i){var a,n,o,s,l,h,c,d,u,p,g,f,y;if(a=e.y-t.y,o=t.x-e.x,l=e.x*t.y-t.x*e.y,u=a*r.x+o*r.y+l,p=a*i.x+o*i.y+l,!(0!==u&&0!==p&&cu(u,p)||(n=i.y-r.y,s=r.x-i.x,h=i.x*r.y-r.x*i.y,c=n*t.x+s*t.y+h,d=n*e.x+s*e.y+h,0!==c&&0!==d&&cu(c,d)||0==(g=a*s-n*o))))return f=Math.abs(g/2),{x:(y=o*h-s*l)<0?(y-f)/g:(y+f)/g,y:(y=n*l-a*h)<0?(y-f)/g:(y+f)/g}}function cu(t,e){return t*e>0}Cr(hu,"intersectLine"),Cr(cu,"sameSign");var du=hu;function uu(t,e,r){let i=t.x,a=t.y,n=[],o=Number.POSITIVE_INFINITY,s=Number.POSITIVE_INFINITY;"function"==typeof e.forEach?e.forEach((function(t){o=Math.min(o,t.x),s=Math.min(s,t.y)})):(o=Math.min(o,e.x),s=Math.min(s,e.y));let l=i-t.width/2-o,h=a-t.height/2-s;for(let c=0;c<e.length;c++){let i=e[c],a=e[c<e.length-1?c+1:0],o=du(t,r,{x:l+i.x,y:h+i.y},{x:l+a.x,y:h+a.y});o&&n.push(o)}return n.length?(n.length>1&&n.sort((function(t,e){let i=t.x-r.x,a=t.y-r.y,n=Math.sqrt(i*i+a*a),o=e.x-r.x,s=e.y-r.y,l=Math.sqrt(o*o+s*s);return n<l?-1:n===l?0:1})),n[0]):t}Cr(uu,"intersectPolygon");var pu={node:au,circle:lu,ellipse:ou,polygon:uu,rect:fd},gu=Cr((async(t,e,r)=>{const{labelStyles:i,nodeStyles:a}=Sd(e);e.labelStyle=i;const{shapeSvg:n,bbox:o}=await Qd(t,e,Jd(e)),s=Math.max(o.width+2*r.labelPaddingX,(null==e?void 0:e.width)||0),l=Math.max(o.height+2*r.labelPaddingY,(null==e?void 0:e.height)||0),h=-s/2,c=-l/2;let d,{rx:u,ry:p}=e;const{cssStyles:g}=e;if((null==r?void 0:r.rx)&&r.ry&&(u=r.rx,p=r.ry),"handDrawn"===e.look){const t=gd(n),r=Td(e,{}),i=u||p?t.path(bd(h,c,s,l,u||0),r):t.rectangle(h,c,s,l,r);d=n.insert((()=>i),":first-child"),d.attr("class","basic label-container").attr("style",g)}else d=n.insert("rect",":first-child"),d.attr("class","basic label-container").attr("style",a).attr("rx",u).attr("ry",p).attr("x",h).attr("y",c).attr("width",s).attr("height",l);return Kd(e,d),e.intersect=function(t){return pu.rect(e,t)},n}),"drawRect"),fu=Cr((async(t,e)=>gu(t,e,{rx:5,ry:5,classes:"flowchart-node"})),"state"),yu=Cr((async(t,e)=>{const r={rx:5,ry:5,classes:"",labelPaddingX:1*((null==e?void 0:e.padding)||0),labelPaddingY:1*((null==e?void 0:e.padding)||0)};return gu(t,e,r)}),"roundedRect"),mu=Cr((async(t,e)=>{const r={rx:0,ry:0,classes:"",labelPaddingX:2*((null==e?void 0:e.padding)||0),labelPaddingY:1*((null==e?void 0:e.padding)||0)};return gu(t,e,r)}),"squareRect"),xu=Cr(((t,e,{config:{themeVariables:r}})=>{const{lineColor:i}=r,a=t.insert("g").attr("class","node default").attr("id",e.domId||e.id);let n;if("handDrawn"===e.look){const t=gd(a).circle(0,0,14,Cd(i));n=a.insert((()=>t))}else n=a.insert("circle",":first-child");return n.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),Kd(e,n),e.intersect=function(t){return pu.circle(e,7,t)},a}),"stateStart"),bu=Cr(((t,e,{config:{themeVariables:r}})=>{const{labelStyles:i,nodeStyles:a}=Sd(e);e.labelStyle=i;const{cssStyles:n}=e,{lineColor:o,stateBorder:s,nodeBorder:l}=r,h=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),c=gd(h),d=Td(e,{});"handDrawn"!==e.look&&(d.roughness=0,d.fillStyle="solid");const u=c.circle(0,0,14,{...d,stroke:o,strokeWidth:2}),p=s??l,g=c.circle(0,0,5,{...d,fill:p,stroke:p,strokeWidth:2,fillStyle:"solid"}),f=h.insert((()=>u),":first-child");return f.insert((()=>g)),n&&f.selectAll("path").attr("style",n),a&&f.selectAll("path").attr("style",a),Kd(e,f),e.intersect=function(t){return pu.circle(e,7,t)},h}),"stateEnd"),Cu=Cr(((t,e,{dir:r,config:{state:i,themeVariables:a}})=>{const{nodeStyles:n}=Sd(e);e.label="";const o=t.insert("g").attr("class",Jd(e)).attr("id",e.domId??e.id),{cssStyles:s}=e;let l=Math.max(70,(null==e?void 0:e.width)??0),h=Math.max(10,(null==e?void 0:e.height)??0);"LR"===r&&(l=Math.max(10,(null==e?void 0:e.width)??0),h=Math.max(70,(null==e?void 0:e.height)??0));const c=-1*l/2,d=-1*h/2,u=gd(o),p=Td(e,{stroke:a.lineColor,fill:a.lineColor});"handDrawn"!==e.look&&(p.roughness=0,p.fillStyle="solid");const g=u.rectangle(c,d,l,h,p),f=o.insert((()=>g),":first-child");s&&"handDrawn"!==e.look&&f.selectAll("path").attr("style",s),n&&"handDrawn"!==e.look&&f.selectAll("path").attr("style",n),Kd(e,f);const y=(null==i?void 0:i.padding)??0;return e.width&&e.height&&(e.width+=y/2||0,e.height+=y/2||0),e.intersect=function(t){return pu.rect(e,t)},o}),"forkJoin"),ku=Cr(((t,e)=>{const{nodeStyles:r}=Sd(e);e.label="";const i=t.insert("g").attr("class",Jd(e)).attr("id",e.domId??e.id),{cssStyles:a}=e,n=Math.max(28,e.width??0),o=[{x:0,y:n/2},{x:n/2,y:0},{x:0,y:-n/2},{x:-n/2,y:0}],s=gd(i),l=Td(e,{});"handDrawn"!==e.look&&(l.roughness=0,l.fillStyle="solid");const h=tu(o),c=s.path(h,l),d=i.insert((()=>c),":first-child");return a&&"handDrawn"!==e.look&&d.selectAll("path").attr("style",a),r&&"handDrawn"!==e.look&&d.selectAll("path").attr("style",r),e.width=28,e.height=28,e.intersect=function(t){return pu.polygon(e,o,t)},i}),"choice"),wu=Cr((async(t,e,{config:{themeVariables:r}})=>{const{labelStyles:i,nodeStyles:a}=Sd(e);e.labelStyle=i;const{shapeSvg:n,bbox:o}=await Qd(t,e,Jd(e)),s=Math.max(o.width+2*(e.padding??0),(null==e?void 0:e.width)??0),l=Math.max(o.height+2*(e.padding??0),(null==e?void 0:e.height)??0),h=-s/2,c=-l/2,{cssStyles:d}=e;e.useHtmlLabels||(e.centerLabel=!0);const u=gd(n),p=Td(e,{fill:r.noteBkgColor,stroke:r.noteBorderColor});"handDrawn"!==e.look&&(p.roughness=0,p.fillStyle="solid");const g=u.rectangle(h,c,s,l,p),f=n.insert((()=>g),":first-child");return f.attr("class","basic label-container"),d&&"handDrawn"!==e.look&&f.selectAll("path").attr("style",d),a&&"handDrawn"!==e.look&&f.selectAll("path").attr("style",a),Kd(e,f),e.intersect=function(t){return pu.rect(e,t)},n}),"note"),Su=Cr((async(t,e)=>{const{labelStyles:r,nodeStyles:i}=Sd(e);e.labelStyle=r;const{shapeSvg:a,bbox:n}=await Qd(t,e,Jd(e)),o=n.height+e.padding,s=n.width+o/4+e.padding;let l;const{cssStyles:h}=e;if("handDrawn"===e.look){const t=gd(a),r=Td(e,{}),i=bd(-s/2,-o/2,s,o,o/2),n=t.path(i,r);l=a.insert((()=>n),":first-child"),l.attr("class","basic label-container").attr("style",h)}else l=a.insert("rect",":first-child"),l.attr("class","basic label-container").attr("style",i).attr("rx",o/2).attr("ry",o/2).attr("x",-s/2).attr("y",-o/2).attr("width",s).attr("height",o);return Kd(e,l),e.intersect=function(t){return pu.rect(e,t)},a}),"stadium"),Tu=Cr((async(t,e)=>{var r,i;const{labelStyles:a,nodeStyles:n}=Sd(e);let o;e.labelStyle=a,o=e.cssClasses?"node "+e.cssClasses:"node default";const s=t.insert("g").attr("class",o).attr("id",e.domId||e.id),l=s.insert("g"),h=s.insert("g").attr("class","label").attr("style",n),c=e.description,d=e.label,u=h.node().appendChild(await xd(d,e.labelStyle,!0,!0));let p={width:0,height:0};if(Di(null==(i=null==(r=fa())?void 0:r.flowchart)?void 0:i.htmlLabels)){const t=u.children[0],e=Z(u);p=t.getBoundingClientRect(),e.attr("width",p.width),e.attr("height",p.height)}Sr.info("Text 2",c);const g=c||[],f=u.getBBox(),y=h.node().appendChild(await xd(g.join?g.join("<br/>"):g,e.labelStyle,!0,!0)),m=y.children[0],x=Z(y);p=m.getBoundingClientRect(),x.attr("width",p.width),x.attr("height",p.height);const b=(e.padding||0)/2;Z(y).attr("transform","translate( "+(p.width>f.width?0:(f.width-p.width)/2)+", "+(f.height+b+5)+")"),Z(u).attr("transform","translate( "+(p.width<f.width?0:-(f.width-p.width)/2)+", 0)"),p=h.node().getBBox(),h.attr("transform","translate("+-p.width/2+", "+(-p.height/2-b+3)+")");const C=p.width+(e.padding||0),k=p.height+(e.padding||0),w=-p.width/2-b,S=-p.height/2-b;let T,v;if("handDrawn"===e.look){const t=gd(s),r=Td(e,{}),i=t.path(bd(w,S,C,k,e.rx||0),r),a=t.line(-p.width/2-b,-p.height/2-b+f.height+b,p.width/2+b,-p.height/2-b+f.height+b,r);v=s.insert((()=>(Sr.debug("Rough node insert CXC",i),a)),":first-child"),T=s.insert((()=>(Sr.debug("Rough node insert CXC",i),i)),":first-child")}else T=l.insert("rect",":first-child"),v=l.insert("line"),T.attr("class","outer title-state").attr("style",n).attr("x",-p.width/2-b).attr("y",-p.height/2-b).attr("width",p.width+(e.padding||0)).attr("height",p.height+(e.padding||0)),v.attr("class","divider").attr("x1",-p.width/2-b).attr("x2",p.width/2+b).attr("y1",-p.height/2-b+f.height+b).attr("y2",-p.height/2-b+f.height+b);return Kd(e,T),e.intersect=function(t){return pu.rect(e,t)},s}),"rectWithTitle");function vu(t,e,r,i){return t.insert("polygon",":first-child").attr("points",i.map((function(t){return t.x+","+t.y})).join(" ")).attr("class","label-container").attr("transform","translate("+-e/2+","+r/2+")")}Cr(vu,"insertPolygonShape");var Bu=Cr((async(t,e)=>{const{labelStyles:r,nodeStyles:i}=Sd(e);e.labelStyle=r;const{shapeSvg:a,bbox:n}=await Qd(t,e,Jd(e)),o=((null==e?void 0:e.padding)||0)/2,s=n.width+e.padding,l=n.height+e.padding,h=-n.width/2-o,c=-n.height/2-o,d=[{x:0,y:0},{x:s,y:0},{x:s,y:-l},{x:0,y:-l},{x:0,y:0},{x:-8,y:0},{x:s+8,y:0},{x:s+8,y:-l},{x:-8,y:-l},{x:-8,y:0}];if("handDrawn"===e.look){const t=gd(a),r=Td(e,{}),i=t.rectangle(h-8,c,s+16,l,r),n=t.line(h,c,h,c+l,r),o=t.line(h+s,c,h+s,c+l,r);a.insert((()=>n),":first-child"),a.insert((()=>o),":first-child");const d=a.insert((()=>i),":first-child"),{cssStyles:u}=e;d.attr("class","basic label-container").attr("style",u),Kd(e,d)}else{const t=vu(a,s,l,d);i&&t.attr("style",i),Kd(e,t)}return e.intersect=function(t){return pu.polygon(e,d,t)},a}),"subroutine"),_u=Cr(((t,e,r,i,a,n)=>[`M${t},${e+n}`,`a${a},${n} 0,0,0 ${r},0`,`a${a},${n} 0,0,0 ${-r},0`,`l0,${i}`,`a${a},${n} 0,0,0 ${r},0`,"l0,"+-i].join(" ")),"createCylinderPathD"),Lu=Cr(((t,e,r,i,a,n)=>[`M${t},${e+n}`,`M${t+r},${e+n}`,`a${a},${n} 0,0,0 ${-r},0`,`l0,${i}`,`a${a},${n} 0,0,0 ${r},0`,"l0,"+-i].join(" ")),"createOuterCylinderPathD"),Mu=Cr(((t,e,r,i,a,n)=>[`M${t-r/2},${-i/2}`,`a${a},${n} 0,0,0 ${r},0`].join(" ")),"createInnerCylinderPathD"),Fu=Cr((async(t,e)=>{const{labelStyles:r,nodeStyles:i}=Sd(e);e.labelStyle=r;const{shapeSvg:a,bbox:n,label:o}=await Qd(t,e,Jd(e)),s=Math.max(n.width+e.padding,e.width??0),l=s/2,h=l/(2.5+s/50),c=Math.max(n.height+h+e.padding,e.height??0);let d;const{cssStyles:u}=e;if("handDrawn"===e.look){const t=gd(a),r=Lu(0,0,s,c,l,h),i=Mu(0,h,s,c,l,h),n=t.path(r,Td(e,{})),o=t.path(i,Td(e,{fill:"none"}));d=a.insert((()=>o),":first-child"),d=a.insert((()=>n),":first-child"),d.attr("class","basic label-container"),u&&d.attr("style",u)}else{const t=_u(0,0,s,c,l,h);d=a.insert("path",":first-child").attr("d",t).attr("class","basic label-container").attr("style",u).attr("style",i)}return d.attr("label-offset-y",h),d.attr("transform",`translate(${-s/2}, ${-(c/2+h)})`),Kd(e,d),o.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${-n.height/2+(e.padding??0)/1.5-(n.y-(n.top??0))})`),e.intersect=function(t){const r=pu.rect(e,t),i=r.x-(e.x??0);if(0!=l&&(Math.abs(i)<(e.width??0)/2||Math.abs(i)==(e.width??0)/2&&Math.abs(r.y-(e.y??0))>(e.height??0)/2-h)){let a=h*h*(1-i*i/(l*l));a>0&&(a=Math.sqrt(a)),a=h-a,t.y-(e.y??0)>0&&(a=-a),r.y+=a}return r},a}),"cylinder"),Au=Cr((async(t,e)=>{const{labelStyles:r,nodeStyles:i}=Sd(e);e.labelStyle=r;const{shapeSvg:a,bbox:n,halfPadding:o}=await Qd(t,e,Jd(e)),s=n.width/2+o;let l;const{cssStyles:h}=e;if("handDrawn"===e.look){const t=gd(a),r=Td(e,{}),i=t.circle(0,0,2*s,r);l=a.insert((()=>i),":first-child"),l.attr("class","basic label-container").attr("style",h)}else l=a.insert("circle",":first-child").attr("class","basic label-container").attr("style",i).attr("r",s).attr("cx",0).attr("cy",0);return Kd(e,l),e.intersect=function(t){return Sr.info("Circle intersect",e,s,t),pu.circle(e,s,t)},a}),"circle"),$u=Cr((async(t,e)=>{var r,i;const{labelStyles:a,nodeStyles:n}=Sd(e);e.labelStyle=a;const{shapeSvg:o,bbox:s,halfPadding:l}=await Qd(t,e,Jd(e)),h=s.width/2+l+5,c=s.width/2+l;let d;const{cssStyles:u}=e;if("handDrawn"===e.look){const t=gd(o),a=Td(e,{roughness:.2,strokeWidth:2.5}),n=Td(e,{roughness:.2,strokeWidth:1.5}),s=t.circle(0,0,2*h,a),l=t.circle(0,0,2*c,n);d=o.insert("g",":first-child"),d.attr("class",e.cssClasses).attr("style",u),null==(r=d.node())||r.appendChild(s),null==(i=d.node())||i.appendChild(l)}else{d=o.insert("g",":first-child");const t=d.insert("circle",":first-child"),e=d.insert("circle");d.attr("class","basic label-container").attr("style",n),t.attr("class","outer-circle").attr("style",n).attr("r",h).attr("cx",0).attr("cy",0),e.attr("class","inner-circle").attr("style",n).attr("r",c).attr("cx",0).attr("cy",0)}return Kd(e,d),e.intersect=function(t){return Sr.info("DoubleCircle intersect",e,h,t),pu.circle(e,h,t)},o}),"doublecircle"),Eu=Cr((async(t,e)=>{const{labelStyles:r,nodeStyles:i}=Sd(e);e.labelStyle=r;const{shapeSvg:a,bbox:n,label:o}=await Qd(t,e,Jd(e)),s=-Math.max(n.width+(e.padding??0),(null==e?void 0:e.width)??0)/2,l=-Math.max(n.height+(e.padding??0),(null==e?void 0:e.height)??0)/2,h=l/2,c=[{x:s+h,y:l},{x:s,y:0},{x:s+h,y:-l},{x:-s,y:-l},{x:-s,y:l}],{cssStyles:d}=e,u=gd(a),p=Td(e,{});"handDrawn"!==e.look&&(p.roughness=0,p.fillStyle="solid");const g=tu(c),f=u.path(g,p),y=a.insert((()=>f),":first-child");return y.attr("class","basic label-container"),d&&"handDrawn"!==e.look&&y.selectAll("path").attr("style",d),i&&"handDrawn"!==e.look&&y.selectAll("path").attr("style",i),y.attr("transform",`translate(${-h/2},0)`),o.attr("transform",`translate(${-h/2-n.width/2-(n.x-(n.left??0))}, ${-n.height/2-(n.y-(n.top??0))})`),Kd(e,y),e.intersect=function(t){return pu.polygon(e,c,t)},a}),"rect_left_inv_arrow"),Du=Cr(((t,e,r)=>[`M${t+r/2},${e}`,`L${t+r},${e-r/2}`,`L${t+r/2},${e-r}`,`L${t},${e-r/2}`,"Z"].join(" ")),"createDecisionBoxPathD"),Iu=Cr((async(t,e)=>{const{labelStyles:r,nodeStyles:i}=Sd(e);e.labelStyle=r;const{shapeSvg:a,bbox:n}=await Qd(t,e,Jd(e)),o=n.width+e.padding+(n.height+e.padding),s=[{x:o/2,y:0},{x:o,y:-o/2},{x:o/2,y:-o},{x:0,y:-o/2}];let l;const{cssStyles:h}=e;if("handDrawn"===e.look){const t=gd(a),r=Td(e,{}),i=Du(0,0,o),n=t.path(i,r);l=a.insert((()=>n),":first-child").attr("transform",`translate(${-o/2}, ${o/2})`),h&&l.attr("style",h)}else l=vu(a,o,o,s);return i&&l.attr("style",i),Kd(e,l),e.intersect=function(t){return Sr.debug("APA12 Intersect called SPLIT\npoint:",t,"\nnode:\n",e,"\nres:",pu.polygon(e,s,t)),pu.polygon(e,s,t)},a}),"question"),Ou=Cr(((t,e,r,i,a)=>[`M${t+a},${e}`,`L${t+r-a},${e}`,`L${t+r},${e-i/2}`,`L${t+r-a},${e-i}`,`L${t+a},${e-i}`,`L${t},${e-i/2}`,"Z"].join(" ")),"createHexagonPathD"),Pu=Cr((async(t,e)=>{const{labelStyles:r,nodeStyles:i}=Sd(e);e.labelStyle=r;const{shapeSvg:a,bbox:n}=await Qd(t,e,Jd(e)),o=n.height+e.padding,s=o/4,l=n.width+2*s+e.padding,h=[{x:s,y:0},{x:l-s,y:0},{x:l,y:-o/2},{x:l-s,y:-o},{x:s,y:-o},{x:0,y:-o/2}];let c;const{cssStyles:d}=e;if("handDrawn"===e.look){const t=gd(a),r=Td(e,{}),i=Ou(0,0,l,o,s),n=t.path(i,r);c=a.insert((()=>n),":first-child").attr("transform",`translate(${-l/2}, ${o/2})`),d&&c.attr("style",d)}else c=vu(a,l,o,h);return i&&c.attr("style",i),e.width=l,e.height=o,Kd(e,c),e.intersect=function(t){return pu.polygon(e,h,t)},a}),"hexagon");async function Ru(t,e){const{labelStyles:r,nodeStyles:i}=Sd(e);e.labelStyle=r;const{shapeSvg:a,bbox:n}=await Qd(t,e,Jd(e)),o=Math.max(n.width+e.padding,(null==e?void 0:e.width)||0),s=Math.max(n.height+e.padding,(null==e?void 0:e.height)||0),l=-o/2,h=-s/2,c=a.insert("rect",":first-child");return c.attr("class","text").attr("style",i).attr("rx",0).attr("ry",0).attr("x",l).attr("y",h).attr("width",o).attr("height",s),Kd(e,c),e.intersect=function(t){return pu.rect(e,t)},a}async function qu(t,e){const{labelStyles:r,nodeStyles:i}=Sd(e);e.labelStyle=r;const{shapeSvg:a,bbox:n}=await Qd(t,e,Jd(e)),o=n.height+e.padding,s=n.width+e.padding+12,l=-o,h=[{x:12,y:l},{x:s,y:l},{x:s,y:0},{x:0,y:0},{x:0,y:l+12},{x:12,y:l}];let c;const{cssStyles:d}=e;if("handDrawn"===e.look){const t=gd(a),r=Td(e,{}),i=tu(h),n=t.path(i,r);c=a.insert((()=>n),":first-child").attr("transform",`translate(${-s/2}, ${o/2})`),d&&c.attr("style",d)}else c=vu(a,s,o,h);return i&&c.attr("style",i),Kd(e,c),e.intersect=function(t){return pu.polygon(e,h,t)},a}Cr(Ru,"text"),Cr(qu,"card");var zu=Cr((async(t,e)=>{const{labelStyles:r,nodeStyles:i}=Sd(e);e.labelStyle=r;const{shapeSvg:a,bbox:n,label:o}=await Qd(t,e,Jd(e)),s=(null==e?void 0:e.padding)??0,l=Math.max(n.width+2*(e.padding??0),(null==e?void 0:e.width)??0),h=Math.max(n.height+2*(e.padding??0),(null==e?void 0:e.height)??0),c=-n.width/2-s,d=-n.height/2-s,{cssStyles:u}=e,p=gd(a),g=Td(e,{});"handDrawn"!==e.look&&(g.roughness=0,g.fillStyle="solid");const f=[{x:c,y:d},{x:c+l+8,y:d},{x:c+l+8,y:d+h},{x:c-8,y:d+h},{x:c-8,y:d},{x:c,y:d},{x:c,y:d+h}],y=p.polygon(f.map((t=>[t.x,t.y])),g),m=a.insert((()=>y),":first-child");return m.attr("class","basic label-container").attr("style",u),i&&"handDrawn"!==e.look&&m.selectAll("path").attr("style",i),u&&"handDrawn"!==e.look&&m.selectAll("path").attr("style",i),o.attr("transform",`translate(${-l/2+4+(e.padding??0)-(n.x-(n.left??0))},${-h/2+(e.padding??0)-(n.y-(n.top??0))})`),Kd(e,m),e.intersect=function(t){return pu.rect(e,t)},a}),"shadedProcess"),Wu=Cr(((t,e)=>{const{labelStyles:r}=Sd(e);e.labelStyle=r;const i=Jd(e);let a=i;i||(a="anchor");const n=t.insert("g").attr("class",a).attr("id",e.domId||e.id),{cssStyles:o}=e,s=gd(n),l=Td(e,{fill:"black",stroke:"none",fillStyle:"solid"});"handDrawn"!==e.look&&(l.roughness=0);const h=s.circle(0,0,2,l),c=n.insert((()=>h),":first-child");return c.attr("class","anchor").attr("style",o),Kd(e,c),e.intersect=function(t){return Sr.info("Circle intersect",e,1,t),pu.circle(e,1,t)},n}),"anchor"),Nu=Cr((async(t,e)=>{const{labelStyles:r,nodeStyles:i}=Sd(e);e.labelStyle=r;const{shapeSvg:a,bbox:n}=await Qd(t,e,Jd(e)),o=Math.max(n.width+(e.padding??0),(null==e?void 0:e.width)??0),s=Math.max(n.height+(e.padding??0),(null==e?void 0:e.height)??0),l=[{x:-3*s/6,y:0},{x:o,y:0},{x:o+3*s/6,y:-s},{x:0,y:-s}];let h;const{cssStyles:c}=e;if("handDrawn"===e.look){const t=gd(a),r=Td(e,{}),i=tu(l),n=t.path(i,r);h=a.insert((()=>n),":first-child").attr("transform",`translate(${-o/2}, ${s/2})`),c&&h.attr("style",c)}else h=vu(a,o,s,l);return i&&h.attr("style",i),e.width=o,e.height=s,Kd(e,h),e.intersect=function(t){return pu.polygon(e,l,t)},a}),"lean_right"),ju=Cr((async(t,e)=>{const{labelStyles:r,nodeStyles:i}=Sd(e);e.labelStyle=r;const{shapeSvg:a,bbox:n}=await Qd(t,e,Jd(e)),o=Math.max(n.width+(e.padding??0),(null==e?void 0:e.width)??0),s=Math.max(n.height+(e.padding??0),(null==e?void 0:e.height)??0),l=[{x:0,y:0},{x:o+3*s/6,y:0},{x:o,y:-s},{x:-3*s/6,y:-s}];let h;const{cssStyles:c}=e;if("handDrawn"===e.look){const t=gd(a),r=Td(e,{}),i=tu(l),n=t.path(i,r);h=a.insert((()=>n),":first-child").attr("transform",`translate(${-o/2}, ${s/2})`),c&&h.attr("style",c)}else h=vu(a,o,s,l);return i&&h.attr("style",i),e.width=o,e.height=s,Kd(e,h),e.intersect=function(t){return pu.polygon(e,l,t)},a}),"lean_left"),Hu=Cr((async(t,e)=>{const{labelStyles:r,nodeStyles:i}=Sd(e);e.labelStyle=r;const{shapeSvg:a,bbox:n}=await Qd(t,e,Jd(e)),o=n.width+e.padding,s=n.height+e.padding,l=[{x:-3*s/6,y:0},{x:o+3*s/6,y:0},{x:o,y:-s},{x:0,y:-s}];let h;const{cssStyles:c}=e;if("handDrawn"===e.look){const t=gd(a),r=Td(e,{}),i=tu(l),n=t.path(i,r);h=a.insert((()=>n),":first-child").attr("transform",`translate(${-o/2}, ${s/2})`),c&&h.attr("style",c)}else h=vu(a,o,s,l);return i&&h.attr("style",i),e.width=o,e.height=s,Kd(e,h),e.intersect=function(t){return pu.polygon(e,l,t)},a}),"trapezoid"),Uu=Cr((async(t,e)=>{const{labelStyles:r,nodeStyles:i}=Sd(e);e.labelStyle=r;const{shapeSvg:a,bbox:n}=await Qd(t,e,Jd(e)),o=Math.max(n.width+2*(e.padding??0),(null==e?void 0:e.width)??0),s=Math.max(n.height+2*(e.padding??0),(null==e?void 0:e.height)??0),l=[{x:0,y:0},{x:o,y:0},{x:o+3*s/6,y:-s},{x:-3*s/6,y:-s}];let h;const{cssStyles:c}=e;if("handDrawn"===e.look){const t=gd(a),r=Td(e,{}),i=tu(l),n=t.path(i,r);h=a.insert((()=>n),":first-child").attr("transform",`translate(${-o/2}, ${s/2})`),c&&h.attr("style",c)}else h=vu(a,o,s,l);return i&&h.attr("style",i),e.width=o,e.height=s,Kd(e,h),e.intersect=function(t){return pu.polygon(e,l,t)},a}),"inv_trapezoid"),Yu=Cr((async(t,e)=>{const{shapeSvg:r,bbox:i,label:a}=await Qd(t,e,"label"),n=r.insert("rect",":first-child");return n.attr("width",.1).attr("height",.1),r.attr("class","label edgeLabel"),a.attr("transform",`translate(${-i.width/2-(i.x-(i.left??0))}, ${-i.height/2-(i.y-(i.top??0))})`),Kd(e,n),e.intersect=function(t){return pu.rect(e,t)},r}),"labelRect"),Vu=Cr((async(t,e)=>{var r;const{labelStyles:i,nodeStyles:a}=Sd(e);e.labelStyle=i;const{shapeSvg:n,bbox:o,label:s}=await Qd(t,e,Jd(e)),l=Di(null==(r=fa().flowchart)?void 0:r.htmlLabels),h=o.width+(e.padding??0),c=h+o.height,d=h+o.height,u=[{x:0,y:0},{x:d,y:0},{x:d/2,y:-c}],{cssStyles:p}=e,g=gd(n),f=Td(e,{});"handDrawn"!==e.look&&(f.roughness=0,f.fillStyle="solid");const y=tu(u),m=g.path(y,f),x=n.insert((()=>m),":first-child").attr("transform",`translate(${-c/2}, ${c/2})`);return p&&"handDrawn"!==e.look&&x.selectChildren("path").attr("style",p),a&&"handDrawn"!==e.look&&x.selectChildren("path").attr("style",a),e.width=h,e.height=c,Kd(e,x),s.attr("transform",`translate(${-o.width/2-(o.x-(o.left??0))}, ${c/2-(o.height+(e.padding??0)/(l?2:1)-(o.y-(o.top??0)))})`),e.intersect=function(t){return Sr.info("Triangle intersect",e,u,t),pu.polygon(e,u,t)},n}),"triangle"),Gu=Cr((async(t,e)=>{const{labelStyles:r,nodeStyles:i}=Sd(e);e.labelStyle=r;const{shapeSvg:a,bbox:n}=await Qd(t,e,Jd(e)),o=Math.max(80,n.width+2*(e.padding??0),(null==e?void 0:e.width)??0),s=Math.max(50,n.height+2*(e.padding??0),(null==e?void 0:e.height)??0),l=s/2,{cssStyles:h}=e,c=gd(a),d=Td(e,{});"handDrawn"!==e.look&&(d.roughness=0,d.fillStyle="solid");const u=[{x:-o/2,y:-s/2},{x:o/2-l,y:-s/2},...ru(-o/2+l,0,l,50,90,270),{x:o/2-l,y:s/2},{x:-o/2,y:s/2}],p=tu(u),g=c.path(p,d),f=a.insert((()=>g),":first-child");return f.attr("class","basic label-container"),h&&"handDrawn"!==e.look&&f.selectChildren("path").attr("style",h),i&&"handDrawn"!==e.look&&f.selectChildren("path").attr("style",i),Kd(e,f),e.intersect=function(t){Sr.info("Pill intersect",e,{radius:l,point:t});return pu.polygon(e,u,t)},a}),"halfRoundedRectangle"),Zu=Cr((async(t,e)=>{const{labelStyles:r,nodeStyles:i}=Sd(e);e.labelStyle=r;const{shapeSvg:a,bbox:n}=await Qd(t,e,Jd(e)),o=Math.max(80,1.25*(n.width+2*(e.padding??0)),(null==e?void 0:e.width)??0),s=Math.max(20,n.height+2*(e.padding??0),(null==e?void 0:e.height)??0),l=s/2,{cssStyles:h}=e,c=gd(a),d=Td(e,{});"handDrawn"!==e.look&&(d.roughness=0,d.fillStyle="solid");const u=o-l,p=s/4,g=[{x:u,y:0},{x:p,y:0},{x:0,y:s/2},{x:p,y:s},{x:u,y:s},...ru(-u,-s/2,l,50,270,90)],f=tu(g),y=c.path(f,d),m=a.insert((()=>y),":first-child");return m.attr("class","basic label-container"),h&&"handDrawn"!==e.look&&m.selectChildren("path").attr("style",h),i&&"handDrawn"!==e.look&&m.selectChildren("path").attr("style",i),m.attr("transform",`translate(${-o/2}, ${-s/2})`),Kd(e,m),e.intersect=function(t){return pu.polygon(e,g,t)},a}),"curvedTrapezoid"),Xu=Cr((async(t,e)=>{const{labelStyles:r,nodeStyles:i}=Sd(e);e.labelStyle=r;const{shapeSvg:a,bbox:n,label:o}=await Qd(t,e,Jd(e)),s=Math.max(n.width+2*(e.padding??0),(null==e?void 0:e.width)??0),l=Math.max(n.height+2*(e.padding??0),(null==e?void 0:e.height)??0),h=-s/2,c=-l/2,{cssStyles:d}=e,u=gd(a),p=Td(e,{});"handDrawn"!==e.look&&(p.roughness=0,p.fillStyle="solid");const g=[{x:h,y:c},{x:h,y:c+l},{x:h+s,y:c+l},{x:h+s,y:c-l/2}],f=tu(g),y=u.path(f,p),m=a.insert((()=>y),":first-child");return m.attr("class","basic label-container"),d&&"handDrawn"!==e.look&&m.selectChildren("path").attr("style",d),i&&"handDrawn"!==e.look&&m.selectChildren("path").attr("style",i),m.attr("transform",`translate(0, ${l/4})`),o.attr("transform",`translate(${-s/2+(e.padding??0)-(n.x-(n.left??0))}, ${-l/4+(e.padding??0)-(n.y-(n.top??0))})`),Kd(e,m),e.intersect=function(t){return pu.polygon(e,g,t)},a}),"slopedRect");function Qu(t,e,r,i,a,n,o){const s=(t+r)/2,l=(e+i)/2,h=Math.atan2(i-e,r-t),c=(r-t)/2/a,d=(i-e)/2/n,u=Math.sqrt(c**2+d**2);if(u>1)throw new Error("The given radii are too small to create an arc between the points.");const p=Math.sqrt(1-u**2),g=s+p*n*Math.sin(h)*(o?-1:1),f=l-p*a*Math.cos(h)*(o?-1:1),y=Math.atan2((e-f)/n,(t-g)/a);let m=Math.atan2((i-f)/n,(r-g)/a)-y;o&&m<0&&(m+=2*Math.PI),!o&&m>0&&(m-=2*Math.PI);const x=[];for(let b=0;b<20;b++){const t=y+b/19*m,e=g+a*Math.cos(t),r=f+n*Math.sin(t);x.push({x:e,y:r})}return x}Cr(Qu,"generateArcPoints");var Ku=Cr((async(t,e)=>{const{labelStyles:r,nodeStyles:i}=Sd(e);e.labelStyle=r;const{shapeSvg:a,bbox:n}=await Qd(t,e,Jd(e)),o=n.width+e.padding+20,s=n.height+e.padding,l=s/2,h=l/(2.5+s/50),{cssStyles:c}=e,d=[{x:o/2,y:-s/2},{x:-o/2,y:-s/2},...Qu(-o/2,-s/2,-o/2,s/2,h,l,!1),{x:o/2,y:s/2},...Qu(o/2,s/2,o/2,-s/2,h,l,!0)],u=gd(a),p=Td(e,{});"handDrawn"!==e.look&&(p.roughness=0,p.fillStyle="solid");const g=tu(d),f=u.path(g,p),y=a.insert((()=>f),":first-child");return y.attr("class","basic label-container"),c&&"handDrawn"!==e.look&&y.selectAll("path").attr("style",c),i&&"handDrawn"!==e.look&&y.selectAll("path").attr("style",i),y.attr("transform",`translate(${h/2}, 0)`),Kd(e,y),e.intersect=function(t){return pu.polygon(e,d,t)},a}),"bowTieRect"),Ju=Cr((async(t,e)=>{const{labelStyles:r,nodeStyles:i}=Sd(e);e.labelStyle=r;const{shapeSvg:a,bbox:n,label:o}=await Qd(t,e,Jd(e)),s=n.width+e.padding,l=n.height+e.padding,h=.2*l,c=-s/2,d=-l/2-h/2,{cssStyles:u}=e,p=gd(a),g=Td(e,{});"handDrawn"!==e.look&&(g.roughness=0,g.fillStyle="solid");const f=[{x:c,y:d+h},{x:-c,y:d+h},{x:-c,y:-d},{x:c,y:-d},{x:c,y:d},{x:-c,y:d},{x:-c,y:d+h}],y=p.polygon(f.map((t=>[t.x,t.y])),g),m=a.insert((()=>y),":first-child");return m.attr("class","basic label-container"),u&&"handDrawn"!==e.look&&m.selectAll("path").attr("style",u),i&&"handDrawn"!==e.look&&m.selectAll("path").attr("style",i),o.attr("transform",`translate(${c+(e.padding??0)/2-(n.x-(n.left??0))}, ${d+h+(e.padding??0)/2-(n.y-(n.top??0))})`),Kd(e,m),e.intersect=function(t){return pu.rect(e,t)},a}),"dividedRectangle");function tp(t){const e=Math.cos(Math.PI/4),r=Math.sin(Math.PI/4),i=2*t;return`M ${-i/2*e},${i/2*r} L ${i/2*e},${-i/2*r}\n M ${i/2*e},${i/2*r} L ${-i/2*e},${-i/2*r}`}Cr(tp,"createLine");var ep=Cr(((t,e)=>{const{labelStyles:r,nodeStyles:i}=Sd(e);e.labelStyle=r,e.label="";const a=t.insert("g").attr("class",Jd(e)).attr("id",e.domId??e.id),n=Math.max(30,(null==e?void 0:e.width)??0),{cssStyles:o}=e,s=gd(a),l=Td(e,{});"handDrawn"!==e.look&&(l.roughness=0,l.fillStyle="solid");const h=s.circle(0,0,2*n,l),c=tp(n),d=s.path(c,l),u=a.insert((()=>h),":first-child");return u.insert((()=>d)),o&&"handDrawn"!==e.look&&u.selectAll("path").attr("style",o),i&&"handDrawn"!==e.look&&u.selectAll("path").attr("style",i),Kd(e,u),e.intersect=function(t){Sr.info("crossedCircle intersect",e,{radius:n,point:t});return pu.circle(e,n,t)},a}),"crossedCircle"),rp=Cr((async(t,e)=>{const{labelStyles:r,nodeStyles:i}=Sd(e);e.labelStyle=r;const{shapeSvg:a,bbox:n}=await Qd(t,e,Jd(e)),o=Math.max(n.width+2*(e.padding??0),(null==e?void 0:e.width)??0),s=Math.max(n.height+2*(e.padding??0),(null==e?void 0:e.height)??0),l=o/s;let h=o,c=s;h>c*l?c=h/l:h=c*l,h=Math.max(h,100),c=Math.max(c,50);const d=Math.min(.2*c,c/4),u=c+2*d,{cssStyles:p}=e,g=gd(a),f=Td(e,{});"handDrawn"!==e.look&&(f.roughness=0,f.fillStyle="solid");const y=[{x:-h/2,y:u/2},...eu(-h/2,u/2,h/2,u/2,d,1),{x:h/2,y:-u/2},...eu(h/2,-u/2,-h/2,-u/2,d,-1)],m=tu(y),x=g.path(m,f),b=a.insert((()=>x),":first-child");return b.attr("class","basic label-container"),p&&"handDrawn"!==e.look&&b.selectAll("path").attr("style",p),i&&"handDrawn"!==e.look&&b.selectAll("path").attr("style",i),Kd(e,b),e.intersect=function(t){return pu.polygon(e,y,t)},a}),"waveRectangle"),ip=Cr(((t,e,r,i,a,n)=>`M${t},${e}\n a${a},${n} 0,0,1 0,${-i}\n l${r},0\n a${a},${n} 0,0,1 0,${i}\n M${r},${-i}\n a${a},${n} 0,0,0 0,${i}\n l${-r},0`),"createCylinderPathD"),ap=Cr(((t,e,r,i,a,n)=>[`M${t},${e}`,`M${t+r},${e}`,`a${a},${n} 0,0,0 0,${-i}`,`l${-r},0`,`a${a},${n} 0,0,0 0,${i}`,`l${r},0`].join(" ")),"createOuterCylinderPathD"),np=Cr(((t,e,r,i,a,n)=>[`M${t+r/2},${-i/2}`,`a${a},${n} 0,0,0 0,${i}`].join(" ")),"createInnerCylinderPathD"),op=Cr((async(t,e)=>{const{labelStyles:r,nodeStyles:i}=Sd(e);e.labelStyle=r;const{shapeSvg:a,bbox:n,label:o,halfPadding:s}=await Qd(t,e,Jd(e)),l="neo"===e.look?2*s:s,h=n.height+l,c=h/2,d=c/(2.5+h/50),u=n.width+d+l,{cssStyles:p}=e;let g;if("handDrawn"===e.look){const t=gd(a),r=ap(0,0,u,h,d,c),i=np(0,0,u,h,d,c),n=t.path(r,Td(e,{})),o=t.path(i,Td(e,{fill:"none"}));g=a.insert((()=>o),":first-child"),g=a.insert((()=>n),":first-child"),g.attr("class","basic label-container"),p&&g.attr("style",p)}else{const t=ip(0,0,u,h,d,c);g=a.insert("path",":first-child").attr("d",t).attr("class","basic label-container").attr("style",p).attr("style",i)}return g.attr("class","basic label-container"),p&&"handDrawn"!==e.look&&g.selectAll("path").attr("style",p),i&&"handDrawn"!==e.look&&g.selectAll("path").attr("style",i),g.attr("label-offset-x",d),g.attr("transform",`translate(${-u/2}, ${h/2} )`),o.attr("transform",`translate(${-n.width/2-d-(n.x-(n.left??0))}, ${-n.height/2-(n.y-(n.top??0))})`),Kd(e,g),e.intersect=function(t){const r=pu.rect(e,t),i=r.y-(e.y??0);if(0!=c&&(Math.abs(i)<(e.height??0)/2||Math.abs(i)==(e.height??0)/2&&Math.abs(r.x-(e.x??0))>(e.width??0)/2-d)){let a=d*d*(1-i*i/(c*c));0!=a&&(a=Math.sqrt(a)),a=d-a,t.x-(e.x??0)>0&&(a=-a),r.x+=a}return r},a}),"tiltedCylinder"),sp=Cr((async(t,e)=>{const{labelStyles:r,nodeStyles:i}=Sd(e);e.labelStyle=r;const{shapeSvg:a,bbox:n}=await Qd(t,e,Jd(e)),o=Math.max(60,n.width+2*(e.padding??0),(null==e?void 0:e.width)??0),s=Math.max(20,n.height+2*(e.padding??0),(null==e?void 0:e.height)??0),{cssStyles:l}=e,h=gd(a),c=Td(e,{});"handDrawn"!==e.look&&(c.roughness=0,c.fillStyle="solid");const d=[{x:-o/2*.8,y:-s/2},{x:o/2*.8,y:-s/2},{x:o/2,y:-s/2*.6},{x:o/2,y:s/2},{x:-o/2,y:s/2},{x:-o/2,y:-s/2*.6}],u=tu(d),p=h.path(u,c),g=a.insert((()=>p),":first-child");return g.attr("class","basic label-container"),l&&"handDrawn"!==e.look&&g.selectChildren("path").attr("style",l),i&&"handDrawn"!==e.look&&g.selectChildren("path").attr("style",i),Kd(e,g),e.intersect=function(t){return pu.polygon(e,d,t)},a}),"trapezoidalPentagon"),lp=Cr((async(t,e)=>{const{labelStyles:r,nodeStyles:i}=Sd(e);e.labelStyle=r;const{shapeSvg:a,bbox:n,label:o}=await Qd(t,e,Jd(e)),s=n.width+(e.padding??0),l=s+n.height,h=s+n.height,c=[{x:0,y:-l},{x:h,y:-l},{x:h/2,y:0}],{cssStyles:d}=e,u=gd(a),p=Td(e,{});"handDrawn"!==e.look&&(p.roughness=0,p.fillStyle="solid");const g=tu(c),f=u.path(g,p),y=a.insert((()=>f),":first-child").attr("transform",`translate(${-l/2}, ${l/2})`);return d&&"handDrawn"!==e.look&&y.selectChildren("path").attr("style",d),i&&"handDrawn"!==e.look&&y.selectChildren("path").attr("style",i),e.width=s,e.height=l,Kd(e,y),o.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${-l/2+(e.padding??0)/2+(n.y-(n.top??0))})`),e.intersect=function(t){return Sr.info("Triangle intersect",e,c,t),pu.polygon(e,c,t)},a}),"flippedTriangle"),hp=Cr((async(t,e)=>{const{labelStyles:r,nodeStyles:i}=Sd(e);e.label="",e.labelStyle=r;const{shapeSvg:a}=await Qd(t,e,Jd(e)),n=Math.max(30,(null==e?void 0:e.width)??0),o=Math.max(30,(null==e?void 0:e.height)??0),{cssStyles:s}=e,l=gd(a),h=Td(e,{});"handDrawn"!==e.look&&(h.roughness=0,h.fillStyle="solid");const c=[{x:0,y:0},{x:n,y:0},{x:0,y:o},{x:n,y:o}],d=tu(c),u=l.path(d,h),p=a.insert((()=>u),":first-child");return p.attr("class","basic label-container"),s&&"handDrawn"!==e.look&&p.selectChildren("path").attr("style",s),i&&"handDrawn"!==e.look&&p.selectChildren("path").attr("style",i),p.attr("transform",`translate(${-n/2}, ${-o/2})`),Kd(e,p),e.intersect=function(t){Sr.info("Pill intersect",e,{points:c});return pu.polygon(e,c,t)},a}),"hourglass"),cp=Cr((async(t,e)=>{const{labelStyles:r,nodeStyles:i}=Sd(e);e.labelStyle=r;const{shapeSvg:a,bbox:n}=await Qd(t,e,Jd(e)),o=Math.max(n.width+2*(e.padding??0),(null==e?void 0:e.width)??0),s=Math.max(n.height+2*(e.padding??0),(null==e?void 0:e.height)??0),l=-o/2,h=-s/2,c=.2*s,d=.2*s,{cssStyles:u}=e,p=gd(a),g=Td(e,{}),f=[{x:l-c/2,y:h},{x:l+o+c/2,y:h},{x:l+o+c/2,y:h+s},{x:l-c/2,y:h+s}],y=[{x:l+o-c/2,y:h+s},{x:l+o+c/2,y:h+s},{x:l+o+c/2,y:h+s-d}];"handDrawn"!==e.look&&(g.roughness=0,g.fillStyle="solid");const m=tu(f),x=p.path(m,g),b=tu(y),C=p.path(b,{...g,fillStyle:"solid"}),k=a.insert((()=>C),":first-child");return k.insert((()=>x),":first-child"),k.attr("class","basic label-container"),u&&"handDrawn"!==e.look&&k.selectAll("path").attr("style",u),i&&"handDrawn"!==e.look&&k.selectAll("path").attr("style",i),Kd(e,k),e.intersect=function(t){return pu.polygon(e,f,t)},a}),"taggedRect"),dp=Cr((async(t,e)=>{const{labelStyles:r,nodeStyles:i}=Sd(e);e.labelStyle=r;const{shapeSvg:a,bbox:n,label:o}=await Qd(t,e,Jd(e)),s=Math.max(n.width+2*(e.padding??0),(null==e?void 0:e.width)??0),l=Math.max(n.height+2*(e.padding??0),(null==e?void 0:e.height)??0),h=-s/2,c=-l/2,{cssStyles:d}=e,u=gd(a),p=Td(e,{}),g=[{x:h-5,y:c+5},{x:h-5,y:c+l+5},{x:h+s-5,y:c+l+5},{x:h+s-5,y:c+l},{x:h+s,y:c+l},{x:h+s,y:c+l-5},{x:h+s+5,y:c+l-5},{x:h+s+5,y:c-5},{x:h+5,y:c-5},{x:h+5,y:c},{x:h,y:c},{x:h,y:c+5}],f=[{x:h,y:c+5},{x:h+s-5,y:c+5},{x:h+s-5,y:c+l},{x:h+s,y:c+l},{x:h+s,y:c},{x:h,y:c}];"handDrawn"!==e.look&&(p.roughness=0,p.fillStyle="solid");const y=tu(g),m=u.path(y,p),x=tu(f),b=u.path(x,{...p,fill:"none"}),C=a.insert((()=>b),":first-child");return C.insert((()=>m),":first-child"),C.attr("class","basic label-container"),d&&"handDrawn"!==e.look&&C.selectAll("path").attr("style",d),i&&"handDrawn"!==e.look&&C.selectAll("path").attr("style",i),o.attr("transform",`translate(${-n.width/2-5-(n.x-(n.left??0))}, ${-n.height/2+5-(n.y-(n.top??0))})`),Kd(e,C),e.intersect=function(t){return pu.polygon(e,g,t)},a}),"multiRect"),up=Cr(((t,e,r,i,a,n,o)=>[`M${t},${e+n}`,`a${a},${n} 0,0,0 ${r},0`,`a${a},${n} 0,0,0 ${-r},0`,`l0,${i}`,`a${a},${n} 0,0,0 ${r},0`,"l0,"+-i,`M${t},${e+n+o}`,`a${a},${n} 0,0,0 ${r},0`].join(" ")),"createCylinderPathD"),pp=Cr(((t,e,r,i,a,n,o)=>[`M${t},${e+n}`,`M${t+r},${e+n}`,`a${a},${n} 0,0,0 ${-r},0`,`l0,${i}`,`a${a},${n} 0,0,0 ${r},0`,"l0,"+-i,`M${t},${e+n+o}`,`a${a},${n} 0,0,0 ${r},0`].join(" ")),"createOuterCylinderPathD"),gp=Cr(((t,e,r,i,a,n)=>[`M${t-r/2},${-i/2}`,`a${a},${n} 0,0,0 ${r},0`].join(" ")),"createInnerCylinderPathD"),fp=Cr((async(t,e)=>{const{labelStyles:r,nodeStyles:i}=Sd(e);e.labelStyle=r;const{shapeSvg:a,bbox:n,label:o}=await Qd(t,e,Jd(e)),s=Math.max(n.width+(e.padding??0),e.width??0),l=s/2,h=l/(2.5+s/50),c=Math.max(n.height+h+(e.padding??0),e.height??0),d=.1*c;let u;const{cssStyles:p}=e;if("handDrawn"===e.look){const t=gd(a),r=pp(0,0,s,c,l,h,d),i=gp(0,h,s,c,l,h),n=Td(e,{}),o=t.path(r,n),g=t.path(i,n);a.insert((()=>g),":first-child").attr("class","line"),u=a.insert((()=>o),":first-child"),u.attr("class","basic label-container"),p&&u.attr("style",p)}else{const t=up(0,0,s,c,l,h,d);u=a.insert("path",":first-child").attr("d",t).attr("class","basic label-container").attr("style",p).attr("style",i)}return u.attr("label-offset-y",h),u.attr("transform",`translate(${-s/2}, ${-(c/2+h)})`),Kd(e,u),o.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${-n.height/2+h-(n.y-(n.top??0))})`),e.intersect=function(t){const r=pu.rect(e,t),i=r.x-(e.x??0);if(0!=l&&(Math.abs(i)<(e.width??0)/2||Math.abs(i)==(e.width??0)/2&&Math.abs(r.y-(e.y??0))>(e.height??0)/2-h)){let a=h*h*(1-i*i/(l*l));a>0&&(a=Math.sqrt(a)),a=h-a,t.y-(e.y??0)>0&&(a=-a),r.y+=a}return r},a}),"linedCylinder"),yp=Cr((async(t,e)=>{const{labelStyles:r,nodeStyles:i}=Sd(e);e.labelStyle=r;const{shapeSvg:a,bbox:n,label:o}=await Qd(t,e,Jd(e)),s=Math.max(n.width+2*(e.padding??0),(null==e?void 0:e.width)??0),l=Math.max(n.height+2*(e.padding??0),(null==e?void 0:e.height)??0),h=l/8,c=l+h,{cssStyles:d}=e,u=70-s,p=u>0?u/2:0,g=gd(a),f=Td(e,{});"handDrawn"!==e.look&&(f.roughness=0,f.fillStyle="solid");const y=[{x:-s/2-p,y:c/2},...eu(-s/2-p,c/2,s/2+p,c/2,h,.8),{x:s/2+p,y:-c/2},{x:-s/2-p,y:-c/2}],m=tu(y),x=g.path(m,f),b=a.insert((()=>x),":first-child");return b.attr("class","basic label-container"),d&&"handDrawn"!==e.look&&b.selectAll("path").attr("style",d),i&&"handDrawn"!==e.look&&b.selectAll("path").attr("style",i),b.attr("transform",`translate(0,${-h/2})`),o.attr("transform",`translate(${-s/2+(e.padding??0)-(n.x-(n.left??0))},${-l/2+(e.padding??0)-h-(n.y-(n.top??0))})`),Kd(e,b),e.intersect=function(t){return pu.polygon(e,y,t)},a}),"waveEdgedRectangle"),mp=Cr(((t,e)=>{const{labelStyles:r,nodeStyles:i}=Sd(e);e.label="",e.labelStyle=r;const a=t.insert("g").attr("class",Jd(e)).attr("id",e.domId??e.id),{cssStyles:n}=e,o=Math.max(35,(null==e?void 0:e.width)??0),s=Math.max(35,(null==e?void 0:e.height)??0),l=[{x:o,y:0},{x:0,y:s+3.5},{x:o-14,y:s+3.5},{x:0,y:2*s},{x:o,y:s-3.5},{x:14,y:s-3.5}],h=gd(a),c=Td(e,{});"handDrawn"!==e.look&&(c.roughness=0,c.fillStyle="solid");const d=tu(l),u=h.path(d,c),p=a.insert((()=>u),":first-child");return n&&"handDrawn"!==e.look&&p.selectAll("path").attr("style",n),i&&"handDrawn"!==e.look&&p.selectAll("path").attr("style",i),p.attr("transform",`translate(-${o/2},${-s})`),Kd(e,p),e.intersect=function(t){Sr.info("lightningBolt intersect",e,t);return pu.polygon(e,l,t)},a}),"lightningBolt"),xp=Cr(((t,e,{config:{themeVariables:r}})=>{const{labelStyles:i,nodeStyles:a}=Sd(e);e.label="",e.labelStyle=i;const n=t.insert("g").attr("class",Jd(e)).attr("id",e.domId??e.id),{cssStyles:o}=e,s=gd(n),{nodeBorder:l}=r,h=Td(e,{fillStyle:"solid"});"handDrawn"!==e.look&&(h.roughness=0);const c=s.circle(0,0,14,h),d=n.insert((()=>c),":first-child");return d.selectAll("path").attr("style",`fill: ${l} !important;`),o&&o.length>0&&"handDrawn"!==e.look&&d.selectAll("path").attr("style",o),a&&"handDrawn"!==e.look&&d.selectAll("path").attr("style",a),Kd(e,d),e.intersect=function(t){Sr.info("filledCircle intersect",e,{radius:7,point:t});return pu.circle(e,7,t)},n}),"filledCircle"),bp=Cr((async(t,e)=>{const{labelStyles:r,nodeStyles:i}=Sd(e);e.labelStyle=r;const{shapeSvg:a,bbox:n,label:o}=await Qd(t,e,Jd(e)),s=Math.max(n.width+2*(e.padding??0),(null==e?void 0:e.width)??0),l=Math.max(n.height+2*(e.padding??0),(null==e?void 0:e.height)??0),h=l/4,c=l+h,d=-s/2,u=-c/2,{cssStyles:p}=e,g=eu(d-5,u+c+5,d+s-5,u+c+5,h,.8),f=null==g?void 0:g[g.length-1],y=[{x:d-5,y:u+5},{x:d-5,y:u+c+5},...g,{x:d+s-5,y:f.y-5},{x:d+s,y:f.y-5},{x:d+s,y:f.y-10},{x:d+s+5,y:f.y-10},{x:d+s+5,y:u-5},{x:d+5,y:u-5},{x:d+5,y:u},{x:d,y:u},{x:d,y:u+5}],m=[{x:d,y:u+5},{x:d+s-5,y:u+5},{x:d+s-5,y:f.y-5},{x:d+s,y:f.y-5},{x:d+s,y:u},{x:d,y:u}],x=gd(a),b=Td(e,{});"handDrawn"!==e.look&&(b.roughness=0,b.fillStyle="solid");const C=tu(y),k=x.path(C,b),w=tu(m),S=x.path(w,b),T=a.insert((()=>k),":first-child");return T.insert((()=>S)),T.attr("class","basic label-container"),p&&"handDrawn"!==e.look&&T.selectAll("path").attr("style",p),i&&"handDrawn"!==e.look&&T.selectAll("path").attr("style",i),T.attr("transform",`translate(0,${-h/2})`),o.attr("transform",`translate(${-n.width/2-5-(n.x-(n.left??0))}, ${-n.height/2+5-h/2-(n.y-(n.top??0))})`),Kd(e,T),e.intersect=function(t){return pu.polygon(e,y,t)},a}),"multiWaveEdgedRectangle"),Cp=Cr((async(t,e)=>{const{labelStyles:r,nodeStyles:i}=Sd(e);e.labelStyle=r;const{shapeSvg:a,bbox:n,label:o}=await Qd(t,e,Jd(e)),s=Math.max(n.width+2*(e.padding??0),(null==e?void 0:e.width)??0),l=Math.max(n.height+2*(e.padding??0),(null==e?void 0:e.height)??0),h=-s/2,c=-l/2,{cssStyles:d}=e,u=gd(a),p=Td(e,{}),g=[{x:h-5,y:c-5},{x:h-5,y:c+l},{x:h+s,y:c+l},{x:h+s,y:c-5}],f=`M${h-5},${c-5} L${h+s},${c-5} L${h+s},${c+l} L${h-5},${c+l} L${h-5},${c-5}\n M${h-5},${c} L${h+s},${c}\n M${h},${c-5} L${h},${c+l}`;"handDrawn"!==e.look&&(p.roughness=0,p.fillStyle="solid");const y=u.path(f,p),m=a.insert((()=>y),":first-child");return m.attr("transform","translate(2.5, 2.5)"),m.attr("class","basic label-container"),d&&"handDrawn"!==e.look&&m.selectAll("path").attr("style",d),i&&"handDrawn"!==e.look&&m.selectAll("path").attr("style",i),o.attr("transform",`translate(${-n.width/2+2.5-(n.x-(n.left??0))}, ${-n.height/2+2.5-(n.y-(n.top??0))})`),Kd(e,m),e.intersect=function(t){return pu.polygon(e,g,t)},a}),"windowPane"),kp=Cr((async(t,e)=>{const{labelStyles:r,nodeStyles:i}=Sd(e);e.labelStyle=r;const{shapeSvg:a,bbox:n,label:o}=await Qd(t,e,Jd(e)),s=Math.max(n.width+2*(e.padding??0),(null==e?void 0:e.width)??0),l=Math.max(n.height+2*(e.padding??0),(null==e?void 0:e.height)??0),h=l/4,c=l+h,{cssStyles:d}=e,u=gd(a),p=Td(e,{});"handDrawn"!==e.look&&(p.roughness=0,p.fillStyle="solid");const g=[{x:-s/2-s/2*.1,y:-c/2},{x:-s/2-s/2*.1,y:c/2},...eu(-s/2-s/2*.1,c/2,s/2+s/2*.1,c/2,h,.8),{x:s/2+s/2*.1,y:-c/2},{x:-s/2-s/2*.1,y:-c/2},{x:-s/2,y:-c/2},{x:-s/2,y:c/2*1.1},{x:-s/2,y:-c/2}],f=u.polygon(g.map((t=>[t.x,t.y])),p),y=a.insert((()=>f),":first-child");return y.attr("class","basic label-container"),d&&"handDrawn"!==e.look&&y.selectAll("path").attr("style",d),i&&"handDrawn"!==e.look&&y.selectAll("path").attr("style",i),y.attr("transform",`translate(0,${-h/2})`),o.attr("transform",`translate(${-s/2+(e.padding??0)+s/2*.1/2-(n.x-(n.left??0))},${-l/2+(e.padding??0)-h/2-(n.y-(n.top??0))})`),Kd(e,y),e.intersect=function(t){return pu.polygon(e,g,t)},a}),"linedWaveEdgedRect"),wp=Cr((async(t,e)=>{const{labelStyles:r,nodeStyles:i}=Sd(e);e.labelStyle=r;const{shapeSvg:a,bbox:n,label:o}=await Qd(t,e,Jd(e)),s=Math.max(n.width+2*(e.padding??0),(null==e?void 0:e.width)??0),l=Math.max(n.height+2*(e.padding??0),(null==e?void 0:e.height)??0),h=l/4,c=.2*s,d=.2*l,u=l+h,{cssStyles:p}=e,g=gd(a),f=Td(e,{});"handDrawn"!==e.look&&(f.roughness=0,f.fillStyle="solid");const y=[{x:-s/2-s/2*.1,y:u/2},...eu(-s/2-s/2*.1,u/2,s/2+s/2*.1,u/2,h,.8),{x:s/2+s/2*.1,y:-u/2},{x:-s/2-s/2*.1,y:-u/2}],m=-s/2+s/2*.1,x=-u/2-.4*d,b=[{x:m+s-c,y:1.4*(x+l)},{x:m+s,y:x+l-d},{x:m+s,y:.9*(x+l)},...eu(m+s,1.3*(x+l),m+s-c,1.5*(x+l),.03*-l,.5)],C=tu(y),k=g.path(C,f),w=tu(b),S=g.path(w,{...f,fillStyle:"solid"}),T=a.insert((()=>S),":first-child");return T.insert((()=>k),":first-child"),T.attr("class","basic label-container"),p&&"handDrawn"!==e.look&&T.selectAll("path").attr("style",p),i&&"handDrawn"!==e.look&&T.selectAll("path").attr("style",i),T.attr("transform",`translate(0,${-h/2})`),o.attr("transform",`translate(${-s/2+(e.padding??0)-(n.x-(n.left??0))},${-l/2+(e.padding??0)-h/2-(n.y-(n.top??0))})`),Kd(e,T),e.intersect=function(t){return pu.polygon(e,y,t)},a}),"taggedWaveEdgedRectangle");function Sp(t,e,r,i=100,a=0,n=180){const o=[],s=a*Math.PI/180,l=(n*Math.PI/180-s)/(i-1);for(let h=0;h<i;h++){const i=s+h*l,a=t+r*Math.cos(i),n=e+r*Math.sin(i);o.push({x:-a,y:-n})}return o}Cr(Sp,"generateCirclePoints");var Tp=Cr((async(t,e)=>{const{labelStyles:r,nodeStyles:i}=Sd(e);e.labelStyle=r;const{shapeSvg:a,bbox:n,label:o}=await Qd(t,e,Jd(e)),s=n.width+(e.padding??0),l=n.height+(e.padding??0),h=Math.max(5,.1*l),{cssStyles:c}=e,d=[...Sp(s/2,-l/2,h,30,-90,0),{x:-s/2-h,y:h},...Sp(s/2+2*h,-h,h,20,-180,-270),...Sp(s/2+2*h,h,h,20,-90,-180),{x:-s/2-h,y:-l/2},...Sp(s/2,l/2,h,20,0,90)],u=[{x:s/2,y:-l/2-h},{x:-s/2,y:-l/2-h},...Sp(s/2,-l/2,h,20,-90,0),{x:-s/2-h,y:-h},...Sp(s/2+.1*s,-h,h,20,-180,-270),...Sp(s/2+.1*s,h,h,20,-90,-180),{x:-s/2-h,y:l/2},...Sp(s/2,l/2,h,20,0,90),{x:-s/2,y:l/2+h},{x:s/2,y:l/2+h}],p=gd(a),g=Td(e,{fill:"none"});"handDrawn"!==e.look&&(g.roughness=0,g.fillStyle="solid");const f=tu(d).replace("Z",""),y=p.path(f,g),m=tu(u),x=p.path(m,{...g}),b=a.insert("g",":first-child");return b.insert((()=>x),":first-child").attr("stroke-opacity",0),b.insert((()=>y),":first-child"),b.attr("class","text"),c&&"handDrawn"!==e.look&&b.selectAll("path").attr("style",c),i&&"handDrawn"!==e.look&&b.selectAll("path").attr("style",i),b.attr("transform",`translate(${h}, 0)`),o.attr("transform",`translate(${-s/2+h-(n.x-(n.left??0))},${-l/2+(e.padding??0)/2-(n.y-(n.top??0))})`),Kd(e,b),e.intersect=function(t){return pu.polygon(e,u,t)},a}),"curlyBraceLeft");function vp(t,e,r,i=100,a=0,n=180){const o=[],s=a*Math.PI/180,l=(n*Math.PI/180-s)/(i-1);for(let h=0;h<i;h++){const i=s+h*l,a=t+r*Math.cos(i),n=e+r*Math.sin(i);o.push({x:a,y:n})}return o}Cr(vp,"generateCirclePoints");var Bp=Cr((async(t,e)=>{const{labelStyles:r,nodeStyles:i}=Sd(e);e.labelStyle=r;const{shapeSvg:a,bbox:n,label:o}=await Qd(t,e,Jd(e)),s=n.width+(e.padding??0),l=n.height+(e.padding??0),h=Math.max(5,.1*l),{cssStyles:c}=e,d=[...vp(s/2,-l/2,h,20,-90,0),{x:s/2+h,y:-h},...vp(s/2+2*h,-h,h,20,-180,-270),...vp(s/2+2*h,h,h,20,-90,-180),{x:s/2+h,y:l/2},...vp(s/2,l/2,h,20,0,90)],u=[{x:-s/2,y:-l/2-h},{x:s/2,y:-l/2-h},...vp(s/2,-l/2,h,20,-90,0),{x:s/2+h,y:-h},...vp(s/2+2*h,-h,h,20,-180,-270),...vp(s/2+2*h,h,h,20,-90,-180),{x:s/2+h,y:l/2},...vp(s/2,l/2,h,20,0,90),{x:s/2,y:l/2+h},{x:-s/2,y:l/2+h}],p=gd(a),g=Td(e,{fill:"none"});"handDrawn"!==e.look&&(g.roughness=0,g.fillStyle="solid");const f=tu(d).replace("Z",""),y=p.path(f,g),m=tu(u),x=p.path(m,{...g}),b=a.insert("g",":first-child");return b.insert((()=>x),":first-child").attr("stroke-opacity",0),b.insert((()=>y),":first-child"),b.attr("class","text"),c&&"handDrawn"!==e.look&&b.selectAll("path").attr("style",c),i&&"handDrawn"!==e.look&&b.selectAll("path").attr("style",i),b.attr("transform",`translate(${-h}, 0)`),o.attr("transform",`translate(${-s/2+(e.padding??0)/2-(n.x-(n.left??0))},${-l/2+(e.padding??0)/2-(n.y-(n.top??0))})`),Kd(e,b),e.intersect=function(t){return pu.polygon(e,u,t)},a}),"curlyBraceRight");function _p(t,e,r,i=100,a=0,n=180){const o=[],s=a*Math.PI/180,l=(n*Math.PI/180-s)/(i-1);for(let h=0;h<i;h++){const i=s+h*l,a=t+r*Math.cos(i),n=e+r*Math.sin(i);o.push({x:-a,y:-n})}return o}Cr(_p,"generateCirclePoints");var Lp=Cr((async(t,e)=>{const{labelStyles:r,nodeStyles:i}=Sd(e);e.labelStyle=r;const{shapeSvg:a,bbox:n,label:o}=await Qd(t,e,Jd(e)),s=n.width+(e.padding??0),l=n.height+(e.padding??0),h=Math.max(5,.1*l),{cssStyles:c}=e,d=[..._p(s/2,-l/2,h,30,-90,0),{x:-s/2-h,y:h},..._p(s/2+2*h,-h,h,20,-180,-270),..._p(s/2+2*h,h,h,20,-90,-180),{x:-s/2-h,y:-l/2},..._p(s/2,l/2,h,20,0,90)],u=[..._p(-s/2+h+h/2,-l/2,h,20,-90,-180),{x:s/2-h/2,y:h},..._p(-s/2-h/2,-h,h,20,0,90),..._p(-s/2-h/2,h,h,20,-90,0),{x:s/2-h/2,y:-h},..._p(-s/2+h+h/2,l/2,h,30,-180,-270)],p=[{x:s/2,y:-l/2-h},{x:-s/2,y:-l/2-h},..._p(s/2,-l/2,h,20,-90,0),{x:-s/2-h,y:-h},..._p(s/2+2*h,-h,h,20,-180,-270),..._p(s/2+2*h,h,h,20,-90,-180),{x:-s/2-h,y:l/2},..._p(s/2,l/2,h,20,0,90),{x:-s/2,y:l/2+h},{x:s/2-h-h/2,y:l/2+h},..._p(-s/2+h+h/2,-l/2,h,20,-90,-180),{x:s/2-h/2,y:h},..._p(-s/2-h/2,-h,h,20,0,90),..._p(-s/2-h/2,h,h,20,-90,0),{x:s/2-h/2,y:-h},..._p(-s/2+h+h/2,l/2,h,30,-180,-270)],g=gd(a),f=Td(e,{fill:"none"});"handDrawn"!==e.look&&(f.roughness=0,f.fillStyle="solid");const y=tu(d).replace("Z",""),m=g.path(y,f),x=tu(u).replace("Z",""),b=g.path(x,f),C=tu(p),k=g.path(C,{...f}),w=a.insert("g",":first-child");return w.insert((()=>k),":first-child").attr("stroke-opacity",0),w.insert((()=>m),":first-child"),w.insert((()=>b),":first-child"),w.attr("class","text"),c&&"handDrawn"!==e.look&&w.selectAll("path").attr("style",c),i&&"handDrawn"!==e.look&&w.selectAll("path").attr("style",i),w.attr("transform",`translate(${h-h/4}, 0)`),o.attr("transform",`translate(${-s/2+(e.padding??0)/2-(n.x-(n.left??0))},${-l/2+(e.padding??0)/2-(n.y-(n.top??0))})`),Kd(e,w),e.intersect=function(t){return pu.polygon(e,p,t)},a}),"curlyBraces"),Mp=Cr((async(t,e,{config:{themeVariables:r,flowchart:i}})=>{const{labelStyles:a}=Sd(e);e.labelStyle=a;const n=e.assetHeight??48,o=e.assetWidth??48,s=Math.max(n,o),l=null==i?void 0:i.wrappingWidth;e.width=Math.max(s,l??0);const{shapeSvg:h,bbox:c,halfPadding:d,label:u}=await Qd(t,e,"icon-shape default"),p="t"===e.pos,g=s+2*d,f=s+2*d,{nodeBorder:y,mainBkg:m}=r,{stylesMap:x}=kd(e),b=-f/2,C=-g/2,k=e.label?8:0,w=gd(h),S=Td(e,{stroke:x.get("fill")||m});"handDrawn"!==e.look&&(S.roughness=0,S.fillStyle="solid");const T=w.rectangle(b,C,f,g,S),v=Math.max(f,c.width),B=g+c.height+k,_=w.rectangle(-v/2,-B/2,v,B,{...S,fill:"transparent",stroke:"none"}),L=h.insert((()=>T),":first-child"),M=h.insert((()=>_));if(e.icon){const t=h.append("g");t.html(`<g>${await Ys(e.icon,{height:s,width:s,fallbackPrefix:""})}</g>`);const r=t.node().getBBox(),i=r.width,a=r.height,n=r.x,o=r.y;t.attr("transform",`translate(${-i/2-n},${p?c.height/2+k/2-a/2-o:-c.height/2-k/2-a/2-o})`),t.selectAll("path").attr("fill",x.get("stroke")??y)}return u.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))},${p?-B/2:B/2-c.height})`),L.attr("transform",`translate(0,${p?c.height/2+k/2:-c.height/2-k/2})`),Kd(e,M),e.intersect=function(t){if(Sr.info("iconSquare intersect",e,t),!e.label)return pu.rect(e,t);const r=e.x??0,i=e.y??0,a=e.height??0;let n=[];n=p?[{x:r-c.width/2,y:i-a/2},{x:r+c.width/2,y:i-a/2},{x:r+c.width/2,y:i-a/2+c.height+k},{x:r+f/2,y:i-a/2+c.height+k},{x:r+f/2,y:i+a/2},{x:r-f/2,y:i+a/2},{x:r-f/2,y:i-a/2+c.height+k},{x:r-c.width/2,y:i-a/2+c.height+k}]:[{x:r-f/2,y:i-a/2},{x:r+f/2,y:i-a/2},{x:r+f/2,y:i-a/2+g},{x:r+c.width/2,y:i-a/2+g},{x:r+c.width/2/2,y:i+a/2},{x:r-c.width/2,y:i+a/2},{x:r-c.width/2,y:i-a/2+g},{x:r-f/2,y:i-a/2+g}];return pu.polygon(e,n,t)},h}),"iconSquare"),Fp=Cr((async(t,e,{config:{themeVariables:r,flowchart:i}})=>{const{labelStyles:a}=Sd(e);e.labelStyle=a;const n=e.assetHeight??48,o=e.assetWidth??48,s=Math.max(n,o),l=null==i?void 0:i.wrappingWidth;e.width=Math.max(s,l??0);const{shapeSvg:h,bbox:c,label:d}=await Qd(t,e,"icon-shape default"),u=e.label?8:0,p="t"===e.pos,{nodeBorder:g,mainBkg:f}=r,{stylesMap:y}=kd(e),m=gd(h),x=Td(e,{stroke:y.get("fill")||f});"handDrawn"!==e.look&&(x.roughness=0,x.fillStyle="solid");const b=h.append("g");e.icon&&b.html(`<g>${await Ys(e.icon,{height:s,width:s,fallbackPrefix:""})}</g>`);const C=b.node().getBBox(),k=C.width,w=C.height,S=C.x,T=C.y,v=Math.max(k,w)*Math.SQRT2+40,B=m.circle(0,0,v,x),_=Math.max(v,c.width),L=v+c.height+u,M=m.rectangle(-_/2,-L/2,_,L,{...x,fill:"transparent",stroke:"none"}),F=h.insert((()=>B),":first-child"),A=h.insert((()=>M));return b.attr("transform",`translate(${-k/2-S},${p?c.height/2+u/2-w/2-T:-c.height/2-u/2-w/2-T})`),b.selectAll("path").attr("fill",y.get("stroke")||g),d.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))},${p?-L/2:L/2-c.height})`),F.attr("transform",`translate(0,${p?c.height/2+u/2:-c.height/2-u/2})`),Kd(e,A),e.intersect=function(t){Sr.info("iconSquare intersect",e,t);return pu.rect(e,t)},h}),"iconCircle"),Ap=Cr((async(t,e,{config:{themeVariables:r,flowchart:i}})=>{const{labelStyles:a}=Sd(e);e.labelStyle=a;const n=e.assetHeight??48,o=e.assetWidth??48,s=Math.max(n,o),l=null==i?void 0:i.wrappingWidth;e.width=Math.max(s,l??0);const{shapeSvg:h,bbox:c,label:d}=await Qd(t,e,"icon-shape default"),u="t"===e.pos,p=s,g=s,{nodeBorder:f}=r,{stylesMap:y}=kd(e),m=-g/2,x=-p/2,b=e.label?8:0,C=gd(h),k=Td(e,{stroke:"none",fill:"none"});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");const w=C.rectangle(m,x,g,p,k),S=Math.max(g,c.width),T=p+c.height+b,v=C.rectangle(-S/2,-T/2,S,T,{...k,fill:"transparent",stroke:"none"}),B=h.insert((()=>w),":first-child"),_=h.insert((()=>v));if(e.icon){const t=h.append("g");t.html(`<g>${await Ys(e.icon,{height:s,width:s,fallbackPrefix:""})}</g>`);const r=t.node().getBBox(),i=r.width,a=r.height,n=r.x,o=r.y;t.attr("transform",`translate(${-i/2-n},${u?c.height/2+b/2-a/2-o:-c.height/2-b/2-a/2-o})`),t.selectAll("path").attr("fill",y.get("stroke")||f)}return d.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))},${u?-T/2:T/2-c.height})`),B.attr("transform",`translate(0,${u?c.height/2+b/2:-c.height/2-b/2})`),Kd(e,_),e.intersect=function(t){if(Sr.info("iconSquare intersect",e,t),!e.label)return pu.rect(e,t);const r=e.x??0,i=e.y??0,a=e.height??0;let n=[];n=u?[{x:r-c.width/2,y:i-a/2},{x:r+c.width/2,y:i-a/2},{x:r+c.width/2,y:i-a/2+c.height+b},{x:r+g/2,y:i-a/2+c.height+b},{x:r+g/2,y:i+a/2},{x:r-g/2,y:i+a/2},{x:r-g/2,y:i-a/2+c.height+b},{x:r-c.width/2,y:i-a/2+c.height+b}]:[{x:r-g/2,y:i-a/2},{x:r+g/2,y:i-a/2},{x:r+g/2,y:i-a/2+p},{x:r+c.width/2,y:i-a/2+p},{x:r+c.width/2/2,y:i+a/2},{x:r-c.width/2,y:i+a/2},{x:r-c.width/2,y:i-a/2+p},{x:r-g/2,y:i-a/2+p}];return pu.polygon(e,n,t)},h}),"icon"),$p=Cr((async(t,e,{config:{flowchart:r}})=>{const i=new Image;i.src=(null==e?void 0:e.img)??"",await i.decode();const a=Number(i.naturalWidth.toString().replace("px","")),n=Number(i.naturalHeight.toString().replace("px",""));e.imageAspectRatio=a/n;const{labelStyles:o}=Sd(e);e.labelStyle=o;const s=null==r?void 0:r.wrappingWidth;e.defaultWidth=null==r?void 0:r.wrappingWidth;const l=Math.max(e.label?s??0:0,(null==e?void 0:e.assetWidth)??a),h="on"===e.constraint&&(null==e?void 0:e.assetHeight)?e.assetHeight*e.imageAspectRatio:l,c="on"===e.constraint?h/e.imageAspectRatio:(null==e?void 0:e.assetHeight)??n;e.width=Math.max(h,s??0);const{shapeSvg:d,bbox:u,label:p}=await Qd(t,e,"image-shape default"),g="t"===e.pos,f=-h/2,y=-c/2,m=e.label?8:0,x=gd(d),b=Td(e,{});"handDrawn"!==e.look&&(b.roughness=0,b.fillStyle="solid");const C=x.rectangle(f,y,h,c,b),k=Math.max(h,u.width),w=c+u.height+m,S=x.rectangle(-k/2,-w/2,k,w,{...b,fill:"none",stroke:"none"}),T=d.insert((()=>C),":first-child"),v=d.insert((()=>S));if(e.img){const t=d.append("image");t.attr("href",e.img),t.attr("width",h),t.attr("height",c),t.attr("preserveAspectRatio","none"),t.attr("transform",`translate(${-h/2},${g?w/2-c:-w/2})`)}return p.attr("transform",`translate(${-u.width/2-(u.x-(u.left??0))},${g?-c/2-u.height/2-m/2:c/2-u.height/2+m/2})`),T.attr("transform",`translate(0,${g?u.height/2+m/2:-u.height/2-m/2})`),Kd(e,v),e.intersect=function(t){if(Sr.info("iconSquare intersect",e,t),!e.label)return pu.rect(e,t);const r=e.x??0,i=e.y??0,a=e.height??0;let n=[];n=g?[{x:r-u.width/2,y:i-a/2},{x:r+u.width/2,y:i-a/2},{x:r+u.width/2,y:i-a/2+u.height+m},{x:r+h/2,y:i-a/2+u.height+m},{x:r+h/2,y:i+a/2},{x:r-h/2,y:i+a/2},{x:r-h/2,y:i-a/2+u.height+m},{x:r-u.width/2,y:i-a/2+u.height+m}]:[{x:r-h/2,y:i-a/2},{x:r+h/2,y:i-a/2},{x:r+h/2,y:i-a/2+c},{x:r+u.width/2,y:i-a/2+c},{x:r+u.width/2/2,y:i+a/2},{x:r-u.width/2,y:i+a/2},{x:r-u.width/2,y:i-a/2+c},{x:r-h/2,y:i-a/2+c}];return pu.polygon(e,n,t)},d}),"imageSquare"),Ep={state:fu,stateStart:xu,stateEnd:bu,forkJoin:Cu,choice:ku,note:wu,rectWithTitle:Tu,roundedRect:yu,squareRect:mu,rectangle:mu,rect:mu,process:mu,proc:mu,rounded:yu,event:yu,stadium:Su,pill:Su,terminal:Su,subroutine:Bu,"framed-rectangle":Bu,"fr-rect":Bu,subprocess:Bu,subproc:Bu,cylinder:Fu,db:Fu,cyl:Fu,database:Fu,question:Iu,diam:Iu,diamond:Iu,decision:Iu,hexagon:Pu,hex:Pu,prepare:Pu,lean_right:Nu,"lean-r":Nu,"lean-right":Nu,"in-out":Nu,lean_left:ju,"lean-l":ju,"lean-left":ju,"out-in":ju,trapezoid:Hu,"trap-b":Hu,"trapezoid-bottom":Hu,priority:Hu,inv_trapezoid:Uu,"inv-trapezoid":Uu,"trapezoid-top":Uu,"trap-t":Uu,manual:Uu,doublecircle:$u,"dbl-circ":$u,"double-circle":$u,circle:Au,circ:Au,rect_left_inv_arrow:Eu,odd:Eu,card:qu,"notched-rectangle":qu,"notch-rect":qu,"lined-rectangle":zu,"lin-rect":zu,"lin-proc":zu,"lined-process":zu,"shaded-process":zu,"small-circle":xu,"sm-circ":xu,start:xu,stop:bu,"framed-circle":bu,"fr-circ":bu,join:Cu,fork:Cu,comment:Tp,"brace-l":Tp,bolt:mp,"com-link":mp,"lightning-bolt":mp,doc:yp,document:yp,delay:Gu,"half-rounded-rectangle":Gu,"horizontal-cylinder":op,"h-cyl":op,das:op,"lined-cylinder":fp,"lin-cyl":fp,disk:fp,"curved-trapezoid":Zu,"curv-trap":Zu,display:Zu,"divided-rectangle":Ju,"div-rect":Ju,"div-proc":Ju,"divided-process":Ju,triangle:Vu,tri:Vu,extract:Vu,"window-pane":Cp,"win-pane":Cp,"internal-storage":Cp,"f-circ":xp,junction:xp,"filled-circle":xp,"lin-doc":kp,"lined-document":kp,"notched-pentagon":sp,"notch-pent":sp,"loop-limit":sp,"flipped-triangle":lp,"flip-tri":lp,"manual-file":lp,"sloped-rectangle":Xu,"sl-rect":Xu,"manual-input":Xu,docs:bp,documents:bp,"st-doc":bp,"stacked-document":bp,processes:dp,procs:dp,"stacked-rectangle":dp,"st-rect":dp,flag:rp,"paper-tape":rp,"bow-tie-rectangle":Ku,"bow-rect":Ku,"stored-data":Ku,"crossed-circle":ep,"cross-circ":ep,summary:ep,"tag-doc":wp,"tagged-document":wp,"tag-rect":cp,"tagged-rectangle":cp,"tag-proc":cp,"tagged-process":cp,hourglass:hp,collate:hp,text:Ru,anchor:Wu,brace:Tp,labelRect:Yu,"brace-r":Bp,braces:Lp,iconSquare:Mp,iconCircle:Fp,icon:Ap,iconRounded:Cr((async(t,e,{config:{themeVariables:r,flowchart:i}})=>{const{labelStyles:a}=Sd(e);e.labelStyle=a;const n=e.assetHeight??48,o=e.assetWidth??48,s=Math.max(n,o),l=null==i?void 0:i.wrappingWidth;e.width=Math.max(s,l??0);const{shapeSvg:h,bbox:c,halfPadding:d,label:u}=await Qd(t,e,"icon-shape default"),p="t"===e.pos,g=s+2*d,f=s+2*d,{nodeBorder:y,mainBkg:m}=r,{stylesMap:x}=kd(e),b=-f/2,C=-g/2,k=e.label?8:0,w=gd(h),S=Td(e,{stroke:x.get("fill")||m});"handDrawn"!==e.look&&(S.roughness=0,S.fillStyle="solid");const T=w.path(bd(b,C,f,g,5),S),v=Math.max(f,c.width),B=g+c.height+k,_=w.rectangle(-v/2,-B/2,v,B,{...S,fill:"transparent",stroke:"none"}),L=h.insert((()=>T),":first-child"),M=h.insert((()=>_));if(e.icon){const t=h.append("g");t.html(`<g>${await Ys(e.icon,{height:s,width:s,fallbackPrefix:""})}</g>`);const r=t.node().getBBox(),i=r.width,a=r.height,n=r.x,o=r.y;t.attr("transform",`translate(${-i/2-n},${p?c.height/2+k/2-a/2-o:-c.height/2-k/2-a/2-o})`),t.selectAll("path").attr("fill",x.get("stroke")??y)}return u.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))},${p?-B/2:B/2-c.height})`),L.attr("transform",`translate(0,${p?c.height/2+k/2:-c.height/2-k/2})`),Kd(e,M),e.intersect=function(t){if(Sr.info("iconSquare intersect",e,t),!e.label)return pu.rect(e,t);const r=e.x??0,i=e.y??0,a=e.height??0;let n=[];n=p?[{x:r-c.width/2,y:i-a/2},{x:r+c.width/2,y:i-a/2},{x:r+c.width/2,y:i-a/2+c.height+k},{x:r+f/2,y:i-a/2+c.height+k},{x:r+f/2,y:i+a/2},{x:r-f/2,y:i+a/2},{x:r-f/2,y:i-a/2+c.height+k},{x:r-c.width/2,y:i-a/2+c.height+k}]:[{x:r-f/2,y:i-a/2},{x:r+f/2,y:i-a/2},{x:r+f/2,y:i-a/2+g},{x:r+c.width/2,y:i-a/2+g},{x:r+c.width/2/2,y:i+a/2},{x:r-c.width/2,y:i+a/2},{x:r-c.width/2,y:i-a/2+g},{x:r-f/2,y:i-a/2+g}];return pu.polygon(e,n,t)},h}),"iconRounded"),imageSquare:$p},Dp=new Map,Ip=Cr((async(t,e,r)=>{let i,a;if("rect"===e.shape&&(e.rx&&e.ry?e.shape="roundedRect":e.shape="squareRect"),!Ep[e.shape])throw new Error(`No such shape: ${e.shape}. Please check your syntax.`);if(e.link){let n;"sandbox"===r.config.securityLevel?n="_top":e.linkTarget&&(n=e.linkTarget||"_blank"),i=t.insert("svg:a").attr("xlink:href",e.link).attr("target",n),a=await Ep[e.shape](i,e,r)}else a=await Ep[e.shape](t,e,r),i=a;return e.tooltip&&a.attr("title",e.tooltip),Dp.set(e.id,i),e.haveCallback&&Dp.get(e.id).attr("class",Dp.get(e.id).attr("class")+" clickable"),i}),"insertNode"),Op=Cr(((t,e)=>{Dp.set(e.id,t)}),"setNodeElem"),Pp=Cr((()=>{Dp.clear()}),"clear"),Rp=Cr((t=>{const e=Dp.get(t.id);Sr.trace("Transforming node",t.diff,t,"translate("+(t.x-t.width/2-5)+", "+t.width/2+")");const r=t.diff||0;return t.clusterNode?e.attr("transform","translate("+(t.x+r-t.width/2)+", "+(t.y-t.height/2-8)+")"):e.attr("transform","translate("+t.x+", "+t.y+")"),r}),"positionNode"),qp={common:Yi,getConfig:pi,insertCluster:Md,insertEdge:Vd,insertEdgeLabel:Rd,insertMarkers:Xd,insertNode:Ip,interpolateToCurve:cl,labelHelper:Qd,log:Sr,positionEdgeLabel:zd},zp={},Wp=Cr((t=>{for(const e of t)zp[e.name]=e}),"registerLayoutLoaders");Cr((()=>{Wp([{name:"dagre",loader:Cr((async()=>await z((()=>import("./dagre-7KT5K2WU-ygScfUFf.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14]),import.meta.url)),"loader")}])}),"registerDefaultLayoutLoaders")();var Np=Cr((async(t,e)=>{if(!(t.layoutAlgorithm in zp))throw new Error(`Unknown layout algorithm: ${t.layoutAlgorithm}`);const r=zp[t.layoutAlgorithm];return(await r.loader()).render(t,e,qp,{algorithm:r.algorithm})}),"render"),jp=Cr(((t="",{fallback:e="dagre"}={})=>{if(t in zp)return t;if(e in zp)return Sr.warn(`Layout algorithm ${t} is not registered. Using ${e} as fallback.`),e;throw new Error(`Both layout algorithms ${t} and ${e} are not registered.`)}),"getRegisteredLayoutAlgorithm"),Hp="11.3.0",Up=Cr((t=>{var e;const{securityLevel:r}=fa();let i=Z("body");if("sandbox"===r){const r=(null==(e=Z(`#i${t}`).node())?void 0:e.contentDocument)??document;i=Z(r.body)}return i.select(`#${t}`)}),"selectSvgElement"),Yp="comm",Vp="rule",Gp="decl",Zp=Math.abs,Xp=String.fromCharCode;function Qp(t){return t.trim()}function Kp(t,e,r){return t.replace(e,r)}function Jp(t,e,r){return t.indexOf(e,r)}function tg(t,e){return 0|t.charCodeAt(e)}function eg(t,e,r){return t.slice(e,r)}function rg(t){return t.length}function ig(t,e){return e.push(t),t}var ag=1,ng=1,og=0,sg=0,lg=0,hg="";function cg(t,e,r,i,a,n,o,s){return{value:t,root:e,parent:r,type:i,props:a,children:n,line:ag,column:ng,length:o,return:"",siblings:s}}function dg(){return lg=sg<og?tg(hg,sg++):0,ng++,10===lg&&(ng=1,ag++),lg}function ug(){return tg(hg,sg)}function pg(){return sg}function gg(t,e){return eg(hg,t,e)}function fg(t){switch(t){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 yg(t){return Qp(gg(sg-1,bg(91===t?t+2:40===t?t+1:t)))}function mg(t){for(;(lg=ug())&&lg<33;)dg();return fg(t)>2||fg(lg)>3?"":" "}function xg(t,e){for(;--e&&dg()&&!(lg<48||lg>102||lg>57&&lg<65||lg>70&&lg<97););return gg(t,pg()+(e<6&&32==ug()&&32==dg()))}function bg(t){for(;dg();)switch(lg){case t:return sg;case 34:case 39:34!==t&&39!==t&&bg(lg);break;case 40:41===t&&bg(t);break;case 92:dg()}return sg}function Cg(t,e){for(;dg()&&t+lg!==57&&(t+lg!==84||47!==ug()););return"/*"+gg(e,sg-1)+"*"+Xp(47===t?t:dg())}function kg(t){for(;!fg(ug());)dg();return gg(t,sg)}function wg(t){return function(t){return hg="",t}(Sg("",null,null,null,[""],t=function(t){return ag=ng=1,og=rg(hg=t),sg=0,[]}(t),0,[0],t))}function Sg(t,e,r,i,a,n,o,s,l){for(var h=0,c=0,d=o,u=0,p=0,g=0,f=1,y=1,m=1,x=0,b="",C=a,k=n,w=i,S=b;y;)switch(g=x,x=dg()){case 40:if(108!=g&&58==tg(S,d-1)){-1!=Jp(S+=Kp(yg(x),"&","&\f"),"&\f",Zp(h?s[h-1]:0))&&(m=-1);break}case 34:case 39:case 91:S+=yg(x);break;case 9:case 10:case 13:case 32:S+=mg(g);break;case 92:S+=xg(pg()-1,7);continue;case 47:switch(ug()){case 42:case 47:ig(vg(Cg(dg(),pg()),e,r,l),l),5!=fg(g||1)&&5!=fg(ug()||1)||!rg(S)||" "===eg(S,-1,void 0)||(S+=" ");break;default:S+="/"}break;case 123*f:s[h++]=rg(S)*m;case 125*f:case 59:case 0:switch(x){case 0:case 125:y=0;case 59+c:-1==m&&(S=Kp(S,/\f/g,"")),p>0&&(rg(S)-d||0===f&&47===g)&&ig(p>32?Bg(S+";",i,r,d-1,l):Bg(Kp(S," ","")+";",i,r,d-2,l),l);break;case 59:S+=";";default:if(ig(w=Tg(S,e,r,h,c,a,s,b,C=[],k=[],d,n),n),123===x)if(0===c)Sg(S,e,w,w,C,n,d,s,k);else switch(99===u&&110===tg(S,3)?100:u){case 100:case 108:case 109:case 115:Sg(t,w,w,i&&ig(Tg(t,w,w,0,0,a,s,b,a,C=[],d,k),k),a,k,d,s,i?C:k);break;default:Sg(S,w,w,w,[""],k,0,s,k)}}h=c=p=0,f=m=1,b=S="",d=o;break;case 58:d=1+rg(S),p=g;default:if(f<1)if(123==x)--f;else if(125==x&&0==f++&&125==(lg=sg>0?tg(hg,--sg):0,ng--,10===lg&&(ng=1,ag--),lg))continue;switch(S+=Xp(x),x*f){case 38:m=c>0?1:(S+="\f",-1);break;case 44:s[h++]=(rg(S)-1)*m,m=1;break;case 64:45===ug()&&(S+=yg(dg())),u=ug(),c=d=rg(b=S+=kg(pg())),x++;break;case 45:45===g&&2==rg(S)&&(f=0)}}return n}function Tg(t,e,r,i,a,n,o,s,l,h,c,d){for(var u=a-1,p=0===a?n:[""],g=function(t){return t.length}(p),f=0,y=0,m=0;f<i;++f)for(var x=0,b=eg(t,u+1,u=Zp(y=o[f])),C=t;x<g;++x)(C=Qp(y>0?p[x]+" "+b:Kp(b,/&\f/g,p[x])))&&(l[m++]=C);return cg(t,e,r,0===a?Vp:s,l,h,c,d)}function vg(t,e,r,i){return cg(t,e,r,Yp,Xp(lg),eg(t,2,-2),0,i)}function Bg(t,e,r,i,a){return cg(t,e,r,Gp,eg(t,0,i),eg(t,i+1,-1),i,a)}function _g(t,e){for(var r="",i=0;i<t.length;i++)r+=e(t[i],i,t,e)||"";return r}function Lg(t,e,r,i){switch(t.type){case"@layer":if(t.children.length)break;case"@import":case Gp:return t.return=t.return||t.value;case Yp:return"";case"@keyframes":return t.return=t.value+"{"+_g(t.children,i)+"}";case Vp:if(!rg(t.value=t.props.join(",")))return""}return rg(r=_g(t.children,i))?t.return=t.value+"{"+r+"}":""}var Mg={id:"c4",detector:Cr((t=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(t)),"detector"),loader:Cr((async()=>{const{diagram:t}=await z((async()=>{const{diagram:t}=await import("./c4Diagram-ZCSEYPFN-2a9TNS5c.js");return{diagram:t}}),__vite__mapDeps([15,16,6,3,4,7,14]),import.meta.url);return{id:"c4",diagram:t}}),"loader")},Fg="flowchart",Ag={id:Fg,detector:Cr(((t,e)=>{var r,i;return"dagre-wrapper"!==(null==(r=null==e?void 0:e.flowchart)?void 0:r.defaultRenderer)&&"elk"!==(null==(i=null==e?void 0:e.flowchart)?void 0:i.defaultRenderer)&&/^\s*graph/.test(t)}),"detector"),loader:Cr((async()=>{const{diagram:t}=await z((async()=>{const{diagram:t}=await import("./flowDiagram-NWEUNK3L-DQXKt_1R.js");return{diagram:t}}),__vite__mapDeps([17,18,6,3,4,7,19,14]),import.meta.url);return{id:Fg,diagram:t}}),"loader")},$g="flowchart-v2",Eg={id:$g,detector:Cr(((t,e)=>{var r,i,a;return"dagre-d3"!==(null==(r=null==e?void 0:e.flowchart)?void 0:r.defaultRenderer)&&("elk"===(null==(i=null==e?void 0:e.flowchart)?void 0:i.defaultRenderer)&&(e.layout="elk"),!(!/^\s*graph/.test(t)||"dagre-wrapper"!==(null==(a=null==e?void 0:e.flowchart)?void 0:a.defaultRenderer))||/^\s*flowchart/.test(t))}),"detector"),loader:Cr((async()=>{const{diagram:t}=await z((async()=>{const{diagram:t}=await import("./flowDiagram-NWEUNK3L-DQXKt_1R.js");return{diagram:t}}),__vite__mapDeps([17,18,6,3,4,7,19,14]),import.meta.url);return{id:$g,diagram:t}}),"loader")},Dg={id:"er",detector:Cr((t=>/^\s*erDiagram/.test(t)),"detector"),loader:Cr((async()=>{const{diagram:t}=await z((async()=>{const{diagram:t}=await import("./erDiagram-DKC2X5TE-CqJyBonf.js");return{diagram:t}}),__vite__mapDeps([20,1,2,3,4,5,6,7,8,9,10,11,14]),import.meta.url);return{id:"er",diagram:t}}),"loader")},Ig="gitGraph",Og={id:Ig,detector:Cr((t=>/^\s*gitGraph/.test(t)),"detector"),loader:Cr((async()=>{const{diagram:t}=await z((async()=>{const{diagram:t}=await import("./gitGraphDiagram-JPZ3KUXI-B856k94f.js");return{diagram:t}}),__vite__mapDeps([21,22,23,24,3,4,25,5,6,7,2,9,10,13,14]),import.meta.url);return{id:Ig,diagram:t}}),"loader")},Pg="gantt",Rg={id:Pg,detector:Cr((t=>/^\s*gantt/.test(t)),"detector"),loader:Cr((async()=>{const{diagram:t}=await z((async()=>{const{diagram:t}=await import("./ganttDiagram-HLVPPPRE-BJe5-mEJ.js");return{diagram:t}}),__vite__mapDeps([26,3,4,6,7,27,28,29,14]),import.meta.url);return{id:Pg,diagram:t}}),"loader")},qg="info",zg={id:qg,detector:Cr((t=>/^\s*info/.test(t)),"detector"),loader:Cr((async()=>{const{diagram:t}=await z((async()=>{const{diagram:t}=await import("./infoDiagram-RZZSJVI2-S89OtAH5.js");return{diagram:t}}),__vite__mapDeps([30,24,3,4,25,5,6,7,2,9,10,13,14]),import.meta.url);return{id:qg,diagram:t}}),"loader")},Wg={id:"pie",detector:Cr((t=>/^\s*pie/.test(t)),"detector"),loader:Cr((async()=>{const{diagram:t}=await z((async()=>{const{diagram:t}=await import("./pieDiagram-X7YZ5ZEZ-IUwQKe6e.js");return{diagram:t}}),__vite__mapDeps([31,22,24,3,4,25,5,6,7,2,9,10,13,32,14,33,29]),import.meta.url);return{id:"pie",diagram:t}}),"loader")},Ng="quadrantChart",jg={id:Ng,detector:Cr((t=>/^\s*quadrantChart/.test(t)),"detector"),loader:Cr((async()=>{const{diagram:t}=await z((async()=>{const{diagram:t}=await import("./quadrantDiagram-F36EZAVT-TMRbFxUO.js");return{diagram:t}}),__vite__mapDeps([34,6,3,4,7,28,29,14]),import.meta.url);return{id:Ng,diagram:t}}),"loader")},Hg="xychart",Ug={id:Hg,detector:Cr((t=>/^\s*xychart-beta/.test(t)),"detector"),loader:Cr((async()=>{const{diagram:t}=await z((async()=>{const{diagram:t}=await import("./xychartDiagram-KECQ2H5Q-CaOPiKTB.js");return{diagram:t}}),__vite__mapDeps([35,6,3,4,7,29,33,36,28,14]),import.meta.url);return{id:Hg,diagram:t}}),"loader")},Yg="requirement",Vg={id:Yg,detector:Cr((t=>/^\s*requirement(Diagram)?/.test(t)),"detector"),loader:Cr((async()=>{const{diagram:t}=await z((async()=>{const{diagram:t}=await import("./requirementDiagram-JG2LMPGF-A2kisNxW.js");return{diagram:t}}),__vite__mapDeps([37,6,3,4,7,1,2,5,8,9,10,11,14]),import.meta.url);return{id:Yg,diagram:t}}),"loader")},Gg="sequence",Zg={id:Gg,detector:Cr((t=>/^\s*sequenceDiagram/.test(t)),"detector"),loader:Cr((async()=>{const{diagram:t}=await z((async()=>{const{diagram:t}=await import("./sequenceDiagram-WK7YDQ3N-BUDaE9hy.js");return{diagram:t}}),__vite__mapDeps([38,16,23,6,3,4,7,14]),import.meta.url);return{id:Gg,diagram:t}}),"loader")},Xg="class",Qg={id:Xg,detector:Cr(((t,e)=>{var r;return"dagre-wrapper"!==(null==(r=null==e?void 0:e.class)?void 0:r.defaultRenderer)&&/^\s*classDiagram/.test(t)}),"detector"),loader:Cr((async()=>{const{diagram:t}=await z((async()=>{const{diagram:t}=await import("./classDiagram-Q73GJZWF-Dg1hLiwH.js");return{diagram:t}}),__vite__mapDeps([39,40,6,3,4,7,1,2,5,8,9,10,11,14]),import.meta.url);return{id:Xg,diagram:t}}),"loader")},Kg="classDiagram",Jg={id:Kg,detector:Cr(((t,e)=>{var r;return!(!/^\s*classDiagram/.test(t)||"dagre-wrapper"!==(null==(r=null==e?void 0:e.class)?void 0:r.defaultRenderer))||/^\s*classDiagram-v2/.test(t)}),"detector"),loader:Cr((async()=>{const{diagram:t}=await z((async()=>{const{diagram:t}=await import("./classDiagram-v2-C6QPLPW4-C_-2E8CJ.js");return{diagram:t}}),__vite__mapDeps([41,42,6,3,4,7,14,40,1,2,5,8,9,10,11,12,13]),import.meta.url);return{id:Kg,diagram:t}}),"loader")},tf="state",ef={id:tf,detector:Cr(((t,e)=>{var r;return"dagre-wrapper"!==(null==(r=null==e?void 0:e.state)?void 0:r.defaultRenderer)&&/^\s*stateDiagram/.test(t)}),"detector"),loader:Cr((async()=>{const{diagram:t}=await z((async()=>{const{diagram:t}=await import("./stateDiagram-4JV6CC6H-DgBSWDh5.js");return{diagram:t}}),__vite__mapDeps([43,44,18,6,3,4,7,1,2,5,8,9,10,11,14]),import.meta.url);return{id:tf,diagram:t}}),"loader")},rf="stateDiagram",af={id:rf,detector:Cr(((t,e)=>{var r;return!!/^\s*stateDiagram-v2/.test(t)||!(!/^\s*stateDiagram/.test(t)||"dagre-wrapper"!==(null==(r=null==e?void 0:e.state)?void 0:r.defaultRenderer))}),"detector"),loader:Cr((async()=>{const{diagram:t}=await z((async()=>{const{diagram:t}=await import("./stateDiagram-v2-7KT6RKTD-Bd_UwSw6.js");return{diagram:t}}),__vite__mapDeps([45,44,18,6,3,4,7,14]),import.meta.url);return{id:rf,diagram:t}}),"loader")},nf="journey",of={id:nf,detector:Cr((t=>/^\s*journey/.test(t)),"detector"),loader:Cr((async()=>{const{diagram:t}=await z((async()=>{const{diagram:t}=await import("./journeyDiagram-BLD6N6MZ-BCWDa8Of.js");return{diagram:t}}),__vite__mapDeps([46,16,6,3,4,7,32,14]),import.meta.url);return{id:nf,diagram:t}}),"loader")},sf={draw:Cr(((t,e,r)=>{Sr.debug("rendering svg for syntax error\n");const i=Up(e),a=i.append("g");i.attr("viewBox","0 0 2412 512"),Zi(i,100,512,!0),a.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"),a.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"),a.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"),a.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"),a.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"),a.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"),a.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"),a.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")},lf=sf,hf={db:{},renderer:sf,parser:{parse:Cr((()=>{}),"parse")}},cf="flowchart-elk",df={id:cf,detector:Cr(((t,e={})=>{var r;return!!(/^\s*flowchart-elk/.test(t)||/^\s*flowchart|graph/.test(t)&&"elk"===(null==(r=null==e?void 0:e.flowchart)?void 0:r.defaultRenderer))&&(e.layout="elk",!0)}),"detector"),loader:Cr((async()=>{const{diagram:t}=await z((async()=>{const{diagram:t}=await import("./flowDiagram-NWEUNK3L-DQXKt_1R.js");return{diagram:t}}),__vite__mapDeps([17,18,6,3,4,7,19,14]),import.meta.url);return{id:cf,diagram:t}}),"loader")},uf="timeline",pf={id:uf,detector:Cr((t=>/^\s*timeline/.test(t)),"detector"),loader:Cr((async()=>{const{diagram:t}=await z((async()=>{const{diagram:t}=await import("./timeline-definition-3ZMEY6HS-ZxX1_aNV.js");return{diagram:t}}),__vite__mapDeps([47,6,3,4,7,32,14]),import.meta.url);return{id:uf,diagram:t}}),"loader")},gf="mindmap",ff={id:gf,detector:Cr((t=>/^\s*mindmap/.test(t)),"detector"),loader:Cr((async()=>{const{diagram:t}=await z((async()=>{const{diagram:t}=await import("./mindmap-definition-OEB2RXX2-BquGOjTQ.js");return{diagram:t}}),__vite__mapDeps([48,49,3,4,6,7,14]),import.meta.url);return{id:gf,diagram:t}}),"loader")},yf="sankey",mf={id:yf,detector:Cr((t=>/^\s*sankey-beta/.test(t)),"detector"),loader:Cr((async()=>{const{diagram:t}=await z((async()=>{const{diagram:t}=await import("./sankeyDiagram-ATFNWWW6-D_zdiDfN.js");return{diagram:t}}),__vite__mapDeps([50,6,3,4,7,33,29,51,14]),import.meta.url);return{id:yf,diagram:t}}),"loader")},xf="packet",bf={id:xf,detector:Cr((t=>/^\s*packet-beta/.test(t)),"detector"),loader:Cr((async()=>{const{diagram:t}=await z((async()=>{const{diagram:t}=await import("./diagram-AVGMFHF7-Dfq1cYt1.js");return{diagram:t}}),__vite__mapDeps([52,22,24,3,4,25,5,6,7,2,9,10,13,14]),import.meta.url);return{id:xf,diagram:t}}),"loader")},Cf="block",kf={id:Cf,detector:Cr((t=>/^\s*block-beta/.test(t)),"detector"),loader:Cr((async()=>{const{diagram:t}=await z((async()=>{const{diagram:t}=await import("./blockDiagram-TCMKQVZ6-Dee8Jr2A.js");return{diagram:t}}),__vite__mapDeps([53,42,6,3,4,7,14,13,2,5,1,19]),import.meta.url);return{id:Cf,diagram:t}}),"loader")},wf="architecture",Sf={id:wf,detector:Cr((t=>/^\s*architecture/.test(t)),"detector"),loader:Cr((async()=>{const{diagram:t}=await z((async()=>{const{diagram:t}=await import("./architectureDiagram-IFBEXTG3-BVBQN81H.js");return{diagram:t}}),__vite__mapDeps([54,22,23,24,3,4,25,5,6,7,2,9,10,13,49,14]),import.meta.url);return{id:wf,diagram:t}}),"loader")},Tf=!1,vf=Cr((()=>{Tf||(Tf=!0,wa("error",hf,(t=>"error"===t.toLowerCase().trim())),wa("---",{db:{clear:Cr((()=>{}),"clear")},styles:{},renderer:{draw:Cr((()=>{}),"draw")},parser:{parse:Cr((()=>{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:Cr((()=>null),"init")},(t=>t.toLowerCase().trimStart().startsWith("---"))),$r(Mg,Jg,Qg,Dg,Rg,zg,Wg,Vg,Zg,df,Eg,Ag,ff,pf,Og,af,ef,of,jg,mf,bf,Ug,kf,Sf))}),"addDiagrams"),Bf=Cr((async()=>{Sr.debug("Loading registered diagrams");const t=(await Promise.allSettled(Object.entries(Fr).map((async([t,{detector:e,loader:r}])=>{if(r)try{Sa(t)}catch{try{const{diagram:t,id:i}=await r();wa(i,t,e)}catch(i){throw Sr.error(`Failed to load external diagram with key ${t}. Removing from detectors.`),delete Fr[t],i}}})))).filter((t=>"rejected"===t.status));if(t.length>0){Sr.error(`Failed to load ${t.length} external diagrams`);for(const e of t)Sr.error(e);throw new Error(`Failed to load ${t.length} external diagrams`)}}),"loadRegisteredDiagrams");function _f(t,e){t.attr("role","graphics-document document"),""!==e&&t.attr("aria-roledescription",e)}function Lf(t,e,r,i){if(void 0!==t.insert){if(r){const e=`chart-desc-${i}`;t.attr("aria-describedby",e),t.insert("desc",":first-child").attr("id",e).text(r)}if(e){const r=`chart-title-${i}`;t.attr("aria-labelledby",r),t.insert("title",":first-child").attr("id",r).text(e)}}}Cr(_f,"setA11yDiagramInfo"),Cr(Lf,"addSVGa11yTitleDescription");var Mf=(Cr(u=class{constructor(t,e,r,i,a){this.type=t,this.text=e,this.db=r,this.parser=i,this.renderer=a}static async fromText(t,e={}){var r,i;const a=pi(),n=Ar(t,a);t=zl(t)+"\n";try{Sa(n)}catch{const t=Dr(n);if(!t)throw new Mr(`Diagram ${n} not found.`);const{id:e,diagram:r}=await t();wa(e,r)}const{db:o,parser:s,renderer:l,init:h}=Sa(n);return s.parser&&(s.parser.yy=o),null==(r=o.clear)||r.call(o),null==h||h(a),e.title&&(null==(i=o.setDiagramTitle)||i.call(o,e.title)),await s.parse(t),new u(n,t,o,s,l)}async render(t,e){await this.renderer.draw(this.text,t,e,this)}getParser(){return this.parser}getType(){return this.type}},"Diagram"),u),Ff=[],Af=Cr((()=>{Ff.forEach((t=>{t()})),Ff=[]}),"attachFunctions"),$f=Cr((t=>t.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart()),"cleanupComments");function Ef(t){const e=t.match(Br);if(!e)return{text:t,metadata:{}};let r=Ss(e[1],{schema:ws})??{};r="object"!=typeof r||Array.isArray(r)?{}:r;const i={};return r.displayMode&&(i.displayMode=r.displayMode.toString()),r.title&&(i.title=r.title.toString()),r.config&&(i.config=r.config),{text:t.slice(e[0].length),metadata:i}}Cr(Ef,"extractFrontMatter");var Df=Cr((t=>t.replace(/\r\n?/g,"\n").replace(/<(\w+)([^>]*)>/g,((t,e,r)=>"<"+e+r.replace(/="([^"]*)"/g,"='$1'")+">"))),"cleanupText"),If=Cr((t=>{const{text:e,metadata:r}=Ef(t),{displayMode:i,title:a,config:n={}}=r;return i&&(n.gantt||(n.gantt={}),n.gantt.displayMode=i),{title:a,config:n,text:e}}),"processFrontmatter"),Of=Cr((t=>{const e=ql.detectInit(t)??{},r=ql.detectDirective(t,"wrap");return Array.isArray(r)?e.wrap=r.some((({type:t})=>"wrap"===t)):"wrap"===(null==r?void 0:r.type)&&(e.wrap=!0),{text:ll(t),directive:e}}),"processDirectives");function Pf(t){const e=Df(t),r=If(e),i=Of(r.text),a=Rl(r.config,i.directive);return{code:t=$f(i.text),title:r.title,config:a}}function Rf(t){const e=(new TextEncoder).encode(t),r=Array.from(e,(t=>String.fromCodePoint(t))).join("");return btoa(r)}Cr(Pf,"preprocessDiagram"),Cr(Rf,"toBase64");var qf=["foreignobject"],zf=["dominant-baseline"];function Wf(t){const e=Pf(t);return yi(),fi(e.config??{}),e}async function Nf(t,e){vf();try{const{code:e,config:r}=Wf(t);return{diagramType:(await Jf(e)).type,config:r}}catch(r){if(null==e?void 0:e.suppressErrors)return!1;throw r}}Cr(Wf,"processAndSetConfigs"),Cr(Nf,"parse");var jf=Cr(((t,e,r=[])=>`\n.${t} ${e} { ${r.join(" !important; ")} !important; }`),"cssImportantStyles"),Hf=Cr(((t,e=new Map)=>{var r;let i="";if(void 0!==t.themeCSS&&(i+=`\n${t.themeCSS}`),void 0!==t.fontFamily&&(i+=`\n:root { --mermaid-font-family: ${t.fontFamily}}`),void 0!==t.altFontFamily&&(i+=`\n:root { --mermaid-alt-font-family: ${t.altFontFamily}}`),e instanceof Map){const a=t.htmlLabels??(null==(r=t.flowchart)?void 0:r.htmlLabels)?["> *","span"]:["rect","polygon","ellipse","circle","path"];e.forEach((t=>{jt(t.styles)||a.forEach((e=>{i+=jf(t.id,e,t.styles)})),jt(t.textStyles)||(i+=jf(t.id,"tspan",((null==t?void 0:t.textStyles)||[]).map((t=>t.replace("color","fill")))))}))}return i}),"createCssStyles"),Uf=Cr(((t,e,r,i)=>{const a=Hf(t,r);return _g(wg(`${i}{${ta(e,a,t.themeVariables)}}`),Lg)}),"createUserStyles"),Yf=Cr(((t="",e,r)=>{let i=t;return r||e||(i=i.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),i=Wl(i),i=i.replace(/<br>/g,"<br/>"),i}),"cleanUpSvgCode"),Vf=Cr(((t="",e)=>{var r,i;return`<iframe style="width:100%;height:${(null==(i=null==(r=null==e?void 0:e.viewBox)?void 0:r.baseVal)?void 0:i.height)?e.viewBox.baseVal.height+"px":"100%"};border:0;margin:0;" src="data:text/html;charset=UTF-8;base64,${Rf(`<body style="margin:0">${t}</body>`)}" sandbox="allow-top-navigation-by-user-activation allow-popups">\n The "iframe" tag is not supported by your browser.\n</iframe>`}),"putIntoIFrame"),Gf=Cr(((t,e,r,i,a)=>{const n=t.append("div");n.attr("id",r),i&&n.attr("style",i);const o=n.append("svg").attr("id",e).attr("width","100%").attr("xmlns","http://www.w3.org/2000/svg");return a&&o.attr("xmlns:xlink",a),o.append("g"),t}),"appendDivSvgG");function Zf(t,e){return t.append("iframe").attr("id",e).attr("style","width: 100%; height: 100%;").attr("sandbox","")}Cr(Zf,"sandboxedIframe");var Xf=Cr(((t,e,r,i)=>{var a,n,o;null==(a=t.getElementById(e))||a.remove(),null==(n=t.getElementById(r))||n.remove(),null==(o=t.getElementById(i))||o.remove()}),"removeExistingElements"),Qf=Cr((async function(t,e,r){var i,a,n,o,s,l;vf();const h=Wf(e);e=h.code;const c=pi();Sr.debug(c),e.length>((null==c?void 0:c.maxTextSize)??5e4)&&(e="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa");const d="#"+t,u="i"+t,p="#"+u,g="d"+t,f="#"+g,y=Cr((()=>{const t=Z(x?p:f).node();t&&"remove"in t&&t.remove()}),"removeTempElements");let m=Z("body");const x="sandbox"===c.securityLevel,b="loose"===c.securityLevel,C=c.fontFamily;if(void 0!==r){if(r&&(r.innerHTML=""),x){const t=Zf(Z(r),u);m=Z(t.nodes()[0].contentDocument.body),m.node().style.margin=0}else m=Z(r);Gf(m,t,g,`font-family: ${C}`,"http://www.w3.org/1999/xlink")}else{if(Xf(document,t,g,u),x){const t=Zf(Z("body"),u);m=Z(t.nodes()[0].contentDocument.body),m.node().style.margin=0}else m=Z("body");Gf(m,t,g)}let k,w;try{k=await Mf.fromText(e,{title:h.title})}catch(A){if(c.suppressErrorRendering)throw y(),A;k=await Mf.fromText("error"),w=A}const S=m.select(f).node(),T=k.type,v=S.firstChild,B=v.firstChild,_=null==(a=(i=k.renderer).getClasses)?void 0:a.call(i,e,k),L=Uf(c,T,_,d),M=document.createElement("style");M.innerHTML=L,v.insertBefore(M,B);try{await k.renderer.draw(e,t,Hp,k)}catch($){throw c.suppressErrorRendering?y():lf.draw(e,t,Hp),$}ty(T,m.select(`${f} svg`),null==(o=(n=k.db).getAccTitle)?void 0:o.call(n),null==(l=(s=k.db).getAccDescription)?void 0:l.call(s)),m.select(`[id="${t}"]`).selectAll("foreignobject > *").attr("xmlns","http://www.w3.org/1999/xhtml");let F=m.select(f).node().innerHTML;if(Sr.debug("config.arrowMarkerAbsolute",c.arrowMarkerAbsolute),F=Yf(F,x,Di(c.arrowMarkerAbsolute)),x){const t=m.select(f+" svg").node();F=Vf(F,t)}else b||(F=xr.sanitize(F,{ADD_TAGS:qf,ADD_ATTR:zf}));if(Af(),w)throw w;return y(),{diagramType:T,svg:F,bindFunctions:k.db.bindFunctions}}),"render");function Kf(t={}){var e;const r=Or({},t);(null==r?void 0:r.fontFamily)&&!(null==(e=r.themeVariables)?void 0:e.fontFamily)&&(r.themeVariables||(r.themeVariables={}),r.themeVariables.fontFamily=r.fontFamily),hi(r),(null==r?void 0:r.theme)&&r.theme in Zr?r.themeVariables=Zr[r.theme].getThemeVariables(r.themeVariables):r&&(r.themeVariables=Zr.default.getThemeVariables(r.themeVariables));const i="object"==typeof r?li(r):di();Tr(i.logLevel),vf()}Cr(Kf,"initialize");var Jf=Cr(((t,e={})=>{const{code:r}=Pf(t);return Mf.fromText(r,e)}),"getDiagramFromText");function ty(t,e,r,i){_f(e,t),Lf(e,r,i,e.attr("id"))}Cr(ty,"addA11yInfo");var ey=Object.freeze({render:Qf,parse:Nf,getDiagramFromText:Jf,initialize:Kf,getConfig:pi,setConfig:ui,getSiteConfig:di,updateSiteConfig:ci,reset:Cr((()=>{yi()}),"reset"),globalReset:Cr((()=>{yi(ii)}),"globalReset"),defaultConfig:ii});Tr(pi().logLevel),yi(pi());var ry=Cr(((t,e,r)=>{Sr.warn(t),Il(t)?(r&&r(t.str,t.hash),e.push({...t,message:t.str,error:t})):(r&&r(t),t instanceof Error&&e.push({str:t.message,message:t.message,hash:t.name,error:t}))}),"handleError"),iy=Cr((async function(t={querySelector:".mermaid"}){try{await ay(t)}catch(e){if(Il(e)&&Sr.error(e.str),fy.parseError&&fy.parseError(e),!t.suppressErrors)throw Sr.error("Use the suppressErrors option to suppress these errors"),e}}),"run"),ay=Cr((async function({postRenderCallback:t,querySelector:e,nodes:r}={querySelector:".mermaid"}){const i=ey.getConfig();let a;if(Sr.debug((t?"":"No ")+"Callback function found"),r)a=r;else{if(!e)throw new Error("Nodes and querySelector are both undefined");a=document.querySelectorAll(e)}Sr.debug(`Found ${a.length} diagrams`),void 0!==(null==i?void 0:i.startOnLoad)&&(Sr.debug("Start On Load: "+(null==i?void 0:i.startOnLoad)),ey.updateSiteConfig({startOnLoad:null==i?void 0:i.startOnLoad}));const n=new ql.InitIDGenerator(i.deterministicIds,i.deterministicIDSeed);let o;const s=[];for(const h of Array.from(a)){if(Sr.info("Rendering diagram: "+h.id),h.getAttribute("data-processed"))continue;h.setAttribute("data-processed","true");const e=`mermaid-${n.next()}`;o=h.innerHTML,o=Qh(ql.entityDecode(o)).trim().replace(/<br\s*\/?>/gi,"<br/>");const r=ql.detectInit(o);r&&Sr.debug("Detected early reinit: ",r);try{const{svg:r,bindFunctions:i}=await gy(e,o,h);h.innerHTML=r,t&&await t(e),i&&i(h)}catch(l){ry(l,s,fy.parseError)}}if(s.length>0)throw s[0]}),"runThrowsErrors"),ny=Cr((function(t){ey.initialize(t)}),"initialize"),oy=Cr((async function(t,e,r){Sr.warn("mermaid.init is deprecated. Please use run instead."),t&&ny(t);const i={postRenderCallback:r,querySelector:".mermaid"};"string"==typeof e?i.querySelector=e:e&&(e instanceof HTMLElement?i.nodes=[e]:i.nodes=e),await iy(i)}),"init"),sy=Cr((async(t,{lazyLoad:e=!0}={})=>{vf(),$r(...t),!1===e&&await Bf()}),"registerExternalDiagrams"),ly=Cr((function(){if(fy.startOnLoad){const{startOnLoad:t}=ey.getConfig();t&&fy.run().catch((t=>Sr.error("Mermaid failed to initialize",t)))}}),"contentLoaded");"undefined"!=typeof document&&window.addEventListener("load",ly,!1);var hy=Cr((function(t){fy.parseError=t}),"setParseErrorHandler"),cy=[],dy=!1,uy=Cr((async()=>{if(!dy){for(dy=!0;cy.length>0;){const e=cy.shift();if(e)try{await e()}catch(t){Sr.error("Error executing queue",t)}}dy=!1}}),"executeQueue"),py=Cr((async(t,e)=>new Promise(((r,i)=>{const a=Cr((()=>new Promise(((a,n)=>{ey.parse(t,e).then((t=>{a(t),r(t)}),(t=>{var e;Sr.error("Error parsing",t),null==(e=fy.parseError)||e.call(fy,t),n(t),i(t)}))}))),"performCall");cy.push(a),uy().catch(i)}))),"parse"),gy=Cr(((t,e,r)=>new Promise(((i,a)=>{const n=Cr((()=>new Promise(((n,o)=>{ey.render(t,e,r).then((t=>{n(t),i(t)}),(t=>{var e;Sr.error("Error parsing",t),null==(e=fy.parseError)||e.call(fy,t),o(t),a(t)}))}))),"performCall");cy.push(n),uy().catch(a)}))),"render"),fy={startOnLoad:!0,mermaidAPI:ey,parse:py,render:gy,init:oy,run:iy,registerExternalDiagrams:sy,registerLayoutLoaders:Wp,initialize:ny,parseError:void 0,contentLoaded:ly,setParseErrorHandler:hy,detectType:Ar,registerIconPacks:Hs},yy=fy;
9
9
  /*! Check if previously processed */
10
10
  /*!
11
11
  * Wait for document loaded before starting the execution